From 6a79f618321c17564d1bb255a7628e21c37ab2be Mon Sep 17 00:00:00 2001 From: Franko Morales <67804607+cochi2@users.noreply.github.com> Date: Mon, 15 Nov 2021 15:21:16 -0800 Subject: [PATCH] Merging main. (#21768) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [Purview catalog] release for new api-version `2021-05-01-preview` (#21169) * regenerate with api-version 2021-05-01-preview * Update CHANGELOG.md * update readme.me and setup.py (#21170) * [Purview administration] first release (#20874) * part1 test * test and readme * CI fix * fix dependency * fix CI * regenerate * review * regenerate with new api version 2021-07-01-preview * update readme.md for python2.7 claim and setup.py for python 3.10 * Fix py.typed packaging Co-authored-by: Laurent Mazuel * [webpubsub] support AAD, Api management proxy (#21235) * codegen * update test * update readme.md * add test * from connection string * example * Update _version.py * api management proxy * Update _web_pub_sub_service_client.py * review * api management * fix dependency * fix dependency * apim proxy * edit code in _patch.py instead of generated code * review * fix broken link * Update setup.py * Update dev_requirements.txt * fix ci * fix ci * fix ci failure of windows_python27 * Update sdk/webpubsub/azure-messaging-webpubsubservice/examples/send_messages_aad.py Co-authored-by: Liangying.Wei * Update sdk/webpubsub/azure-messaging-webpubsubservice/examples/send_messages_aad.py Co-authored-by: Liangying.Wei * Update README.md * review * regenerate code * fix ci * fix ci * move operation onto client * review * Update send_messages_connection_string_apim_proxy.py * Update send_messages_aad_apim_proxy.py * regenerate for 2021-10-01 * test * Update CHANGELOG.md * Update sdk/webpubsub/azure-messaging-webpubsubservice/README.md Co-authored-by: Liangying.Wei * Update sdk/webpubsub/azure-messaging-webpubsubservice/README.md Co-authored-by: Liangying.Wei Co-authored-by: Liangying.Wei * Update Cosmos CODEOWNERS (#20572) Replacing @southpolesteve and @zfoster with new owners * Fix typo in doc/dev/README.md (#20411) * fix typo compatability to compatibility * Use xxx_if_not_exists API to simplify code example and to avoid uncessary issue (#20670) * Replace deprecated unittest aliases (#20337) * fix function has duplicate type signatures mypy error (#19739) * fix for service principal environment vars (#21287) * [Storage]fix type annotation (#20096) * [Storage][Logging]Let users opt in logging_request_body (#19710) * [Storage][Logging]Let users opt in logging_request_body * Update policies.py * Update policies.py * Update policies.py * Update policies.py * logging response body * Update settings_fake.py * Feature/storage stg79 (#21286) * update swagger * encryption scope sas * permanent delete sas * sync copy from url with encryption scope * manually edit swagger * Update _version.py * [AutoRelease] t2-containerservice-2021-10-18-97657 (#21294) * CodeGen from PR 16215 in Azure/azure-rest-api-specs Dev containerservice microsoft.container service 2021 09 01 (#16215) * Adds base for updating Microsoft.ContainerService from version stable/2021-08-01 to version 2021-09-01 * Updates readme * Updates API version in new specs and examples * Add gmsaProfile in WindowsProfile for AKS (#15976) * Add gmsaProfile in WindowsProfile for AKS * fix spell errors * Fix lint issue * Update readme.md for AKS 2021-09-01 * Expose a few more snapshot properties in 2021-09-01 swagger to match 2021-09-01 API (#16082) * Expose a few more snapshot properties in 2021-09-01 swagger to match 2021-09-01 RP API * Expose a few more snapshot properties in 2021-09-01 swagger to match 2021-09-01 RP API Co-authored-by: Charlie Li * Agent pool start/stop (#16105) * added examples for agentpool start/stop * fixed code styling * added 201 response code in examples * added 201 response code object * added missing parameter * updated description for power state and added title * added power state to request body properties * Update specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2021-09-01/managedClusters.json Co-authored-by: Matthew Christopher Co-authored-by: Matthew Christopher Co-authored-by: Charlie Li <39974812+chengliangli0918@users.noreply.github.com> Co-authored-by: Charlie Li Co-authored-by: rsamigullin <89222124+rsamigullin@users.noreply.github.com> Co-authored-by: Matthew Christopher * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: Charlie Li <39974812+chengliangli0918@users.noreply.github.com> Co-authored-by: Charlie Li Co-authored-by: rsamigullin <89222124+rsamigullin@users.noreply.github.com> Co-authored-by: Matthew Christopher Co-authored-by: PythonSdkPipelines * Increment package version after release of azure-messaging-webpubsubservice (#21280) * Increment version for purview releases (#21279) * Increment package version after release of azure-purview-administration * Increment package version after release of azure-purview-catalog * Increment package version after release of azure-purview-scanning * [WIP]Refactor AzureJSONEncoder (#21028) * Refactor AzureJSONEncoder * Improved readability of AzureJSONEncoder datetime handling * Rename _timestr_as_isostr() to _datetime_as_isostr() * Move datetime.timedelta object handling function call (_timedelta_as_str()) to _datetime_as_isostr() inside * Rename private method (_datetime_as_isostr, _timedelta_as_str) parameter value, o to dt, td * Add some docstring * Fix typo and add type checking * Fix typo some docstring * Renamed _timedelta_as_str to _timedelta_as_isostr * Add type checking in _datetime_as_isostr * Improve type checking and rename some inner variables * update changelog (#21308) * adjust the docker-start-proxy to take advantage of the linux specific commands that allow contact of localhost (#21310) Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> * Remove link to private repo (#21312) * fix uri (#20632) * fix uri * update * update changelog * udpates * [formrecognizer] Add proper defaults on DocumentTableCell (#21213) * add proper defaults on document table cell * default kind field * set default in _from_generated and improve init * revert changes to init, fix test comment * set content default for kind * update testcase to account for default scenarios * Sync eng/common directory with azure-sdk-tools for PR 2100 (#21311) * Add group id into metadata for java use * Update Update-DocsMsPackages.ps1 * Update Update-DocsMsPackages.ps1 * Update eng/common/scripts/Update-DocsMsPackages.ps1 Co-authored-by: Ben Broderick Phillips * Update eng/common/scripts/Update-DocsMsPackages.ps1 Co-authored-by: Ben Broderick Phillips Co-authored-by: Sima Zhu Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips * Revert "Feature/storage stg79 (#21286)" (#21317) This reverts commit 14496e7d739a14b7a91f4ad10d0e5a3ddf7b27a1. * Sync eng/common directory with azure-sdk-tools for PR 2085 (#21325) * Fix up identity resolver to make it more reliable, publish notification configuration as a tool * Use both username and email to resolve queuing user Co-authored-by: Chidozie Ononiwu * [AutoRelease] t2-recoveryservicesbackup-2021-10-19-33781 (#21330) * CodeGen from PR 15881 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.RecoveryServices to add version stable/2021-08-01 (#15881) * Adds base for updating Microsoft.RecoveryServices from version stable/2021-07-01 to version 2021-08-01 * Updates readme * Updates API version in new specs and examples * Fixing readme file * version,CHANGELOG * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Zed Lei <59104634+RAY-316@users.noreply.github.com> * update to latest test-proxy tag (#21334) Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> * [Perf] Support multiple test proxies (#21203) - Some scenarios require multiple test-proxy URLs to bottleneck client - test-proxy URLs are assigned round-robin to parallel test instances - Ported from Azure/azure-sdk-for-net#24265 * [AutoRelease] t2-hybridkubernetes-2021-10-04-45305 (#21037) * CodeGen from PR 15956 in Azure/azure-rest-api-specs New GA version changes - 2021-10-01 (#15956) * New GA api-version changes- 2021-01-01 * readme changes * readme changes * add systemdata definition * system data ref fix * system data ref fix * fix * fix * fix * remove empty patch section * revert patch section * lint fix * lint fix * lintfix * readme changes * Update readme.md * remove property bag from cc update example * Fixing listClusterUserCreds examples * hide creds * example file naming changes and clientProxy flag correction Co-authored-by: Siri Teja Reddy Kasireddy Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: Siri Teja Reddy Kasireddy Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: PythonSdkPipelines Co-authored-by: Yuchao Yan * del useless version (#21345) * Updating CODEOWNERS for ACS Identity (#20881) Co-authored-by: Aigerim Beishenbekova * [core] fix isinstace str check in core rest (#21341) * Sync eng/common directory with azure-sdk-tools for PR 2093 (#21350) * Consume Codeowners parser library, ceperate users from teams in codeownerse * Update get-pr-owners and related logic Co-authored-by: Chidozie Ononiwu * [Search] Update for missing properties (#21205) * Expose select kwarg on list operations. * Update search for missing properties: session_id, scoring_statistics * Update `SearchIndexerDataSourceConnection` missing properties: identity, encryption_key * Fix linter issues. * Update CHANGELOG. * [ACR] React to stable/2021-07-01 swagger changes (#21110) * Fix OrMetadata (#21316) * settings files * OrMedata Fix * [AutoRelease] t2-chaos-2021-10-21-14806 (#21354) * CodeGen from PR 16453 in Azure/azure-rest-api-specs Adding Microsoft.Chaos API Version 2021-09-15-preview. (#16453) * [baseline] Microsoft.Chaos private preview API Version 2021-09-15-preview. * msft.chaos PublicPreview API 2021-09-15-preview * Add neccessary readme's from swagger tool branch generation. * remove artifiact resource from public preview. * fix static linter issues. * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines * [AutoRelease] t2-dataprotection-2021-10-19-69515 (#21333) * CodeGen from PR 16451 in Azure/azure-rest-api-specs Update readme.python.md (#16451) * Update readme.python.md * config readme * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Yuchao Yan * docs (#21360) * Fix Monitor Query async logs query sample (#21351) * Fix Monitor Query async logs query sample * Remove extra space * Added support for Async Generators in TableClient.submit_transaction method (#21119) * added support for async iterables in submit_transcation method * the warning is a known issue in pylint https://github.com/PyCQA/pylint/issues/3507 * fixed formatting issues * Code tweaks + tests * Fixed grammar * Improved readability * Fix for Py27 Co-authored-by: antisch * move async test to _async (#21363) * [SchemaRegistry] add async version of avro serializer (#21026) fixes: #20709 * Remove azure-mgmt-webpubsub (#21347) * Update Language-Settings.ps1 (#21367) * patching last references to master in the repo! (#21339) * [AutoRelease] t2-network-2021-10-21-48085 (#21357) * CodeGen from PR 16471 in Azure/azure-rest-api-specs readme.python config (#16471) * version,CHANGELOG * test * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Yuchao Yan * Removed auto pagination (#21358) * Removed auto pagenation * removed * added manual pagenation * fixed issue * spacing * pylint * linter * [Cosmos] get_user_client() method documentation update (#21379) * Fully automate cluster buildout. Add azure file share mount to stress tests. (#21382) Co-authored-by: Ben Broderick Phillips * update error code in tests (#21362) * [formrecognizer] Rename DocumentElement to DocumentContentElement (#21323) * rename DocumentElement to DocumentContentElement * add to changelog * [AutoRelease] t2-keyvault-2021-10-15-69767 (#21276) * CodeGen from PR 16400 in Azure/azure-rest-api-specs Update readme.python.md (#16400) * version,CHANGELOG * test Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines * [AutoRelease] t2-chaos-2021-10-25-61789 (#21390) * CodeGen from PR 16501 in Azure/azure-rest-api-specs Update Chaos Client Name + Update outdated examples. (#16501) * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> * [AVA] Updated sdk to 1.1 (#21326) * updated sdk to 1.1 * small changes to changelog and readme * adding preview version back to changelog * updating version number * changing order of versions in readme * [AutoRelease] t2-azurearcdata-2021-10-14-24172 (#21251) * CodeGen from PR 16275 in Azure/azure-rest-api-specs Adding 2021-11-01 version for Microsoft.AzureArcData (#16275) * Adding API Version 2021-11-01 * Updating example and naming * Remove password * Update field description * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Yuchao Yan * [AutoRelease] t2-containerregistry-2021-10-26-15283 (#21410) * CodeGen from PR 15990 in Azure/azure-rest-api-specs [ACR] [New Api Version] add 2021-08-01-preview (#15990) * Initial commit for comparison with previous release * Add new swagger 2021-08-01-preview and examples * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines * [AutoRelease] t2-cosmosdb-2021-10-26-16894 (#21412) * CodeGen from PR 15733 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.DocumentDB to add version stable/2021-10-15 (#15733) * Adds base for updating Microsoft.DocumentDB from version stable/2021-06-15 to version 2021-09-15 * Updates readme * Updates API version in new specs and examples * Add support for fetching continuous backup information for latest restorable timestamp. * Adding locations API and backupRedundancy * Fixing ref * Add 10-15 Preview along with ClientEncryptionKey management changes * Renaming 2021-09-15 api version to 2021-10-15 * Fixing some more renames * fix validation checks * add clientencryptionkeys to custom-words * initial commit * Swagger specifiations * readme file updated * Review comments addressed * Added TotalThroughputLimit property to Database Create and Update * Rebased and added type to capacity * Added changes to preview folder as well * Added changes to missing files * initial checkin of base version * Adding examples; /deallocate and /start api in swagger * update readme.md file * Removing 2021-10-15-preview changes * managed cassandra swagger changes for GA * Fixing linter issues * minor description fixes * adding missing example * add stable and preview swagger * revert to Thu Sep 9 2021 change * fix linter errors in swagger * fix validation errors * validation fixes * remove fetchNodeStatus from stable * remove unused example file, fix validation error * Fixing the spell check and formatting issues * remove /repair api, make /command async * remove unreferrenced example json * remove pageable link from /status api * remove backups api, add cassandraAuditLoggingEnabled property * add cassandraAuditLoggingEnabled property * make /status api async, minor fixes * remove async tag to /status * remove connectivity property, add Ldap as preview * remove unreferenced example files * use guid in subid for examples * add backupStorageCustomerKeyUri property * fix api response code * remove ldap * Changing operationId for locations API * review comments Co-authored-by: REDMOND\amisi Co-authored-by: Anuj Toshniwal Co-authored-by: Abhijit Karanjkar Co-authored-by: Praful Johari Co-authored-by: visunda Co-authored-by: Vivek Sundararajan Co-authored-by: vivek-microsoft <32766101+vivek-microsoft@users.noreply.github.com> * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: REDMOND\amisi Co-authored-by: Anuj Toshniwal Co-authored-by: Abhijit Karanjkar Co-authored-by: Praful Johari Co-authored-by: visunda Co-authored-by: Vivek Sundararajan Co-authored-by: vivek-microsoft <32766101+vivek-microsoft@users.noreply.github.com> Co-authored-by: PythonSdkPipelines * Update reply comment (#21399) * release_iseus_status_auto_reply * issue_aoto_close_revert * Update main.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update reply_generator.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update reply_generator.py * Add files via upload * Update reply_generator.py * Update update_issue_body.py * Update reply_generator.py * Update auto_pipeline_run.py * Update auto_pipeline_run.py * add auto-close * Update release_issue_status.yml for Azure Pipelines * Update auto_close.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * fix bug * Update main.py * Update auto_close.py * Update auto_close.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update auto_close.py * Update main.py * Update auto-close * Update auto_pipeline_run.py * Update update_issue_body.py * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update auto_pipeline_run.py * Add pipeline link * Update pipeline link * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update requirement.txt * Update auto_pipeline_run.py * Add get_python_pipeline * Update auto_pipeline_run.py * test * test * add outputfolder * add label * Update main.py * Update get_python_pipeline.py * Update main.py * Update auto_pipeline_run.py * Add utils * Update main.py * Update main.py * Delete old py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update utils.py * Update utils.py * Update main.py * Update main.py * Update reply_generator.py * Update utils.py * Add get_changelog function * Update utils.py * Update reply_generator.py * Update main.py * Update reply_generator.py * Update function * del useless code * Update utils.py * Update main.py * Update reply_generator.py * Update main.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update utils.py * Update auto-close * Update release_issue_status.yml for Azure Pipelines * Update utils.py * Update utils.py * Fix auto-close bug * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update release_issue_status.yml for Azure Pipelines * Add assign * Update reply_generator.py * Update reply_generator.py * Update assignee * Update assignee * Update main.py Co-authored-by: Zed <601306339@qq.com> Co-authored-by: Zed Lei <59104634+RAY-316@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Yuchao Yan * [textanalytics] feature/ta-v3.2-preview.2 (#21409) * [textanalytics] regen on v3.2 preview.2 (#20674) * regenerate with version 3.2-preview.2 * hook up convenience layer to new api version * fix import and skip tests for now * [textanalytics] add support for custom text actions (#20721) * impl for custom actions sync/async + models * remove project_name and deployment_name from result models * update naming to classify documents * add samples for arch board * fix sample * update naming to align with all langs * update sample names * arch board feedback * rename samples and fix types * regenerate on latest swagger * add new tests and recordings * make corrections to code based on renames * remove samples from PR * fix * update changelog * update missing docstrings * bump azure-core for azure.core.rest * re-enable tests and record for v3.2-preview.2 (#21106) * add 2.7 disclaimer in readme and 3.10 to setup classifiers (#21096) * [textanalytics] support multiple actions of the same type (#21152) * allow support for multiple actions of the same type * rerecord all analyze tests now that we set task_name * lint * review feedback * izzy's feedback * [textanalytics] add samples for custom text actions (#21182) * add samples for custom text actions * add samples + links to samples readme * wording * switch to asyncio.run in async samples * [textanalytics] update readme + docs (#21272) * readme updates * more docs updates * update with aka links to service docs * updating env vars with temp persistent resource (#21342) * rerecord test * [textanalytics] enabling support for rehydration of LROs in TA (#21338) * enabling support for rehydration of LROs in TA * lint * updating docs * review feedback * update envars so live tests pass * Add latest released version to prepare prerelease (#21420) Co-authored-by: Chidozie Ononiwu * Removing URL validation * Removing validations for recording apis * remove unnecessary awaits in test (#21423) * Update Monitor Query library samples (#21371) * Update Monitor Query library samples * Update casing of uri * Link to DefaultAzureCredential docs * [core] remove asynciterable inclusion in 2.7 HttpRequest content keyword description (#21424) fixes #21406 * fix doc about duplicate actions (#21429) * [core] fix "read" not awaited warning in ContentDecodePolicy for async responses (#21318) * fix assertion for signature type fields (#21428) * Auto check base branch (#21441) * version auto-calculation rule * single api version rule * Update main.py * additional rule for track1 * when changelog is null * Update PythonSdkLiveTest.yml for Azure Pipelines Add `ISSUE_LINK` * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update livetest_package.txt * Create create_pr.py * Update PythonSdkLiveTest.yml for Azure Pipelines use python script tu create pr * Update PythonSdkLiveTest.yml for Azure Pipelines * create py * Update PythonSdkLiveTest.yml for Azure Pipelines * Update token * Update token * test create_pr * Update PythonSdkLiveTest.yml for Azure Pipelines * Update create_pr.py * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * Update PythonSdkLiveTest.yml for Azure Pipelines * add_comment * update by jf * Update PythonSdkLiveTest.yml * Update create_auto_release_pr * Update create_auto_release_pr.py * Update create_auto_release_pr.py * Update yaml and py * Update create_auto_release_pr.py * Update create_auto_release_pr.py * Update create_auto_release_pr.py * Update PythonSdkLiveTest.yml * Update create_auto_release_pr.py * Update PythonSdkLiveTest.yml * Update PythonSdkLiveTest.yml for Azure Pipelines * Update create_auto_release_pr.py * update for swagger exception * update * Update create_auto_release_pr.py * update * update * update * update * update * update * update * Update main.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Co-authored-by: BigCat20196 <1095260342@qq.com> Co-authored-by: Yuchao Yan * auto branch attention (#21445) * release_iseus_status_auto_reply * issue_aoto_close_revert * Update main.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update reply_generator.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update reply_generator.py * Add files via upload * Update reply_generator.py * Update update_issue_body.py * Update reply_generator.py * Update auto_pipeline_run.py * Update auto_pipeline_run.py * add auto-close * Update release_issue_status.yml for Azure Pipelines * Update auto_close.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * fix bug * Update main.py * Update auto_close.py * Update auto_close.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update auto_close.py * Update main.py * Update auto-close * Update auto_pipeline_run.py * Update update_issue_body.py * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update auto_pipeline_run.py * Add pipeline link * Update pipeline link * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update requirement.txt * Update auto_pipeline_run.py * Add get_python_pipeline * Update auto_pipeline_run.py * test * test * add outputfolder * add label * Update main.py * Update get_python_pipeline.py * Update main.py * Update auto_pipeline_run.py * Add utils * Update main.py * Update main.py * Delete old py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update utils.py * Update utils.py * Update main.py * Update main.py * Update reply_generator.py * Update utils.py * Add get_changelog function * Update utils.py * Update reply_generator.py * Update main.py * Update reply_generator.py * Update function * del useless code * Update utils.py * Update main.py * Update reply_generator.py * Update main.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update utils.py * Update auto-close * Update release_issue_status.yml for Azure Pipelines * Update utils.py * Update utils.py * Fix auto-close bug * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update release_issue_status.yml for Azure Pipelines * Add assign * Update reply_generator.py * Update reply_generator.py * Update assignee * Update assignee * Update main.py * Update main.py * Update main.py Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: BigCat20196 <1095260342@qq.com> Co-authored-by: Yuchao Yan * [SchemaRegistry] avro serializer add exceptions (#21381) * exceptions file * abstract object serializer * add tests * async apache tests * lint * update internal docstring * more docstring * fix tests * async update * fix * remove fastavro * docstring * test fix * adams comments * lint * comments * changelog * nit * lint * nit * [qna] fix metadata conversion from user's tuples to the dict object the service requires (#21432) * [textanalytics] updating custom samples (#21434) * updating samples to use given training data * updates * Sync eng/common directory with azure-sdk-tools for PR 2152 (#21425) * Remove the new sdk check and populate json for track 1 package * Update Save-Package-Properties.ps1 Co-authored-by: Sima Zhu Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> * Removing bad comments * [Test Proxy] Rename decorators, support variables API (#21386) * [AutoRelease] t2-videoanalyzer-2021-10-25-84743 (#21389) * CodeGen from PR 16513 in Azure/azure-rest-api-specs Remove readonly on segment length property (#16513) * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines * [ServiceBus] GA SBAdminClient maxMessageSizeInKilobytes (#21353) * [ServiceBus] Add large message support to SBAdministrationClient (#20812) * impl * update swagger * upload recordings * fix mypy pylint * review feedback * update classifier * Increment version for servicebus releases (#21115) Increment package version after release of azure-servicebus * add multi api version support * add api version * fix mypy * more mypy fix * address review Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> * opt out of autorest verification (#21473) * Bit more complicated parsing of the `requirements_to_exclude` during `install_depend_packages.py` (#21459) * we split the reqs being compared by specifier, then compare the whole package names. no more startsWith means we don't accidentally clean out a real dev_req * apply black to install_depend_packages.py * Remove legacy resource group live test deployment (#21458) * Remove legacy resource group live test deployment * Remove DeployArmTemplate flag and deploy by default * Use absolute path to deploy test resources template * [QnA] Renames (#21464) * First GA regen * Updated operations * Updated tests * Updated samples * Updated changelog * Fixed some type hints * Review feedback * Fixed URLs * Renamed context * [QnA] Made operations groups internal (#21477) * Made operations private * Updated changelog * update doc links (#21483) * [KV] Update logging tests (#21454) * update release issue status (#21489) * release_iseus_status_auto_reply * issue_aoto_close_revert * Update main.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update reply_generator.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update reply_generator.py * Add files via upload * Update reply_generator.py * Update update_issue_body.py * Update reply_generator.py * Update auto_pipeline_run.py * Update auto_pipeline_run.py * add auto-close * Update release_issue_status.yml for Azure Pipelines * Update auto_close.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * fix bug * Update main.py * Update auto_close.py * Update auto_close.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update auto_close.py * Update main.py * Update auto-close * Update auto_pipeline_run.py * Update update_issue_body.py * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update auto_pipeline_run.py * Add pipeline link * Update pipeline link * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update requirement.txt * Update auto_pipeline_run.py * Add get_python_pipeline * Update auto_pipeline_run.py * test * test * add outputfolder * add label * Update main.py * Update get_python_pipeline.py * Update main.py * Update auto_pipeline_run.py * Add utils * Update main.py * Update main.py * Delete old py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update utils.py * Update utils.py * Update main.py * Update main.py * Update reply_generator.py * Update utils.py * Add get_changelog function * Update utils.py * Update reply_generator.py * Update main.py * Update reply_generator.py * Update function * del useless code * Update utils.py * Update main.py * Update reply_generator.py * Update main.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update utils.py * Update auto-close * Update release_issue_status.yml for Azure Pipelines * Update utils.py * Update utils.py * Fix auto-close bug * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update release_issue_status.yml for Azure Pipelines * Add assign * Update reply_generator.py * Update reply_generator.py * Update assignee * Update assignee * Update main.py * Update main.py * Update main.py * update md * update md * update md * update md * update md * update md Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: BigCat20196 <1095260342@qq.com> Co-authored-by: Yuchao Yan * version rule (#21490) * [textanalytics] expose action errors (#21472) * update implementation * add tests and edits * update changelog * review feedback * update (#19662) * [formrecognizer] Add signature field type tests (#21480) * add signature field type tests, update recordings * update test assertion method * [Search] Add reset_documents and reset_skills operations (#21475) * Add reset_skills and reset_documents calls. * Update changelog. * Add async operations. Allow name or object invocation. * Code review comment. * Expose DocumentKeysOrIds and update typehints. * Add reset_skills tests. * Code review feedback. * [SchemaRegistry] fix failing avro tests (#21478) * fix * recordings * update avro version * importerror * pin avro dep * [SchemaRegistry] remove serializer namespace from client package (#21474) * remove serializer nmspc from schemaregistry * newline * [Identity] Fix multi-tenant auth using async AadClient (#21322) * [Schema Registry] bug bash docs (#21457) fixes: #21177 * [textanalytics] custom model docstrings edits (#21498) * update model docstrings * fix * Handling Proper Defaulting of `BuildTargetingString` within nested templates (#21426) * adding targeting-string-resolve.yml and calling at the root of each "job" in our pipeline. The BuildTargetingString should apply appropriately in all cases now. * Improved some error behaviour (#21499) * re-gen clu LLC client (#21417) * regenrate client * update model names * tmp commit * update model names * fixing tests * fix samples * update readme * fix remaining samples * fix env key error * add recorded tests * update samples * add additional samples * async samples * disable some samples * update samples readme * revert setup.py * fix broken link * [AutoRelease] t2-eventhub-2021-10-25-83263 (#21397) * CodeGen from PR 16363 in Azure/azure-rest-api-specs EventHub : New API version 2021-11-01 (#16363) * base commit for new api version 2021-11-01 * new api version 2021-11-01 changes * CI fixes * CI fixes * fix for Python SDK * added common def v2 * avocado fix * updated common types * update to address S360 * S360 fix for DisasterRecoveryConfigs * Revert "S360 fix for DisasterRecoveryConfigs" This reverts commit 2476975abd304ee89f1382ceaee280ad3a711e15. * Added SchemaRegistry API * CI fixes - Schemagroup * corrected Schemagroup group properties * reverted the proxyresource location change * Revert "reverted the proxyresource location change" This reverts commit ac79e8a163198742f32adfdc40cc11aa2e039e90. * addresing S360 swagger correctness fro operations and capture * updated description for datalake in capture * subscription format to uuid Co-authored-by: Damodar Avadhani Co-authored-by: v-ajnava * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: Damodar Avadhani Co-authored-by: v-ajnava Co-authored-by: PythonSdkPipelines Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> * delete eventgrid (#21509) * Eventgrid del temporarily (#21510) * delete eventgrid * Update ci.yml * Revert "delete eventgrid" (#21512) * Revert "delete eventgrid (#21509)" This reverts commit 700dc5e334e868df4b61fba97cf183c31084bbd4. * Update ci.yml * Update CHANGELOG.md * [formrecognizer] Initial work for adding get_children methods (#21224) * initial get_children work * add support for cross page elements, update return types * add tests * add recordings * update DocumentContentElement test * move get children to DocumentKeyValueElement, typing fixes * remove references to selection marks * fix document key value element test * remove long type annotation * update changelog * newline * doc fixes and improvements * rename test class * refactor get children methods * update wording for confidence * fix document content element docs * specify return type in get element list helper * more doc fixes * fix type return * refactor get_children into separate methods * update tests for new methods * add docs * update changelog * remove extra param and check from internal _get_children * transform words and lines to convenience layer versions * add test * pass named params * pin chardet to assist withfailures (#21521) * Sync eng/common directory with azure-sdk-tools for PR 2177 (#21523) * support charset_normalizer (#21520) * support charset_normalizer * update * update * Increment package version after release of azure-core (#21532) * [textanalytics] release prep (#21522) * update release date * update sample descriptions * update swagger readme * bump azure-core * [AutoRelease] t2-signalr-2021-11-01-50053 (#21514) * CodeGen from PR 16044 in Azure/azure-rest-api-specs [SignalR] Add stable version 2021-10-01 (#16044) * init * remove * Add 2021-10-01 * Minor update * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines * Use https for sparse checkout command (#21535) Co-authored-by: Ben Broderick Phillips * Use docker to do package validation. (#21541) Co-authored-by: Sima Zhu * fix UnboundLocalError (#19744) * fix UnboundLocalError * update * update * update * update * update * update * update * update * update * update * update * update * update * update * [rest] add kwargs to iter_bytes and iter_raw (#21529) * add ReplaceLatestEntryTitle parameter for updating changelog (#21485) * [SchemaRegistry] fix logging_enable bug (#21488) * move kwarg * adams comments * move to helper * update samples/tests with logging * remove from samples * Increment package version after release of azure-ai-textanalytics (#21547) * [QnA][CLU] Release prep (#21518) * Added release date * Bump core version * Fix async samples * Bug in setup.py * Monitor metadata bg (#21513) * Sync eng/common directory with azure-sdk-tools for PR 2053 (#21558) * Changing inline bash for stress test resource deployment * PR-mod * pr-mod * pr-mod * pr-mod Co-authored-by: Albert Cheng * raise IncompleteReadError if only receive partial response (#20888) * raise IncompleteReadError if only receive partial response * update * Update CHANGELOG.md * update * update * update * update * update * update * update * address review feedback * update * update * update * update * Update exceptions.py * [rest] fix str check in content kwarg to be six.string_types check for 2.7 (#21550) * Exclude azure-mgmt-videoanalyzer from docs onboarding (#21564) * [rest] GA in docs! (#21545) * Support for CNCF cloud event (#21236) * Support for CNCF cloud event * changelog * lint * Update sdk/eventgrid/azure-eventgrid/dev_requirements.txt * comments * ci plus do * tests * comments * readme * comments * Update _helpers.py * lint * Update _helpers.py * Update _helpers.py * [rest] allow users to pass file descriptors to json without raising (#21504) * update release date (#21574) * Stress test usability feedback (#21569) Co-authored-by: Ben Broderick Phillips * [formrecognizer] Improve URL related doc strings (#21208) Fixes #20953 Fixes #21173 * [formrecognizer] Use get_words and get_lines in samples (#21533) * use get_words and get_lines in samples * fix comment and add info on README * fix wording in sample * update readme * revert additions to README * add get_words() example to README * add get children samples * remove get_lines from entities * update comment * Minor updated to parameters and argument message (#21551) * unredact some headers/query params at the debug info level (#21571) * fix test by adding raw property in mock response (#21577) * [AutoRelease] t2-deviceupdate-2021-11-04-38122 (#21250) * CodeGen from PR 16197 in Azure/azure-rest-api-specs Changing Identity definition reference to common type (#16197) This also adds the necessary user assigned identity definitions * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Yuchao Yan Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> * [AutoRelease] t2-quota-2021-11-01-54332 (#21507) * CodeGen from PR 16438 in Azure/azure-rest-api-specs [QuotaRP] Fix LimitObject polymorphism (#16438) * Fix LimitObject polymorphism * move properties out of allOf * add type to LimitObject * value is required * Updating Operations Tag to QuotaOperations. * Update quota.json Updating Summary field for operations. Co-authored-by: Rahul Singh <53578268+rahuls-microsoft@users.noreply.github.com> * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: Rahul Singh <53578268+rahuls-microsoft@users.noreply.github.com> Co-authored-by: PythonSdkPipelines * Add prompt before replasing latest release title on prepare release run (#21579) Co-authored-by: Chidozie Ononiwu * [SchemaRegistry] final api review changes (#21589) * adding exception to regression tests for telemetry-exporter (#21576) * Increment package version after release of azure-core (#21594) * update type hints to reflect actual document body (#21593) * [formrecognizer] Update changelog for release (#21555) * update changelog for release * update samples readme * add changelog entry for new samples * reword samples entry * Update azure-core version to unbreak Search. (#21599) * [acr] regen with autorest 5.11.0, bump min core dep to 1.20.0 (#21600) * Revert "Update azure-core version to unbreak Search. (#21599)" (#21610) This reverts commit 8e98c7f4c38c8303475ca125a63258915c4c5d08. * update changelog (#21608) * [SchemaRegistry] update core + SR version (#21573) for issue #21460 * [SchemaRegistry] generate GA SR from swagger (#21570) fixes: #20661 * [formrecognizer] Remove get children methods (#21602) * remove get_words and get_lines methods on models * remove references to parent elements * remove extra tests * delete recordings * update sample to use document get_words * remove references to deleted methods in samples * update changelog * remove references to old samples in README * add error for DocumentLines converted from dicts * shorten long line * [WebPubSub] Use consistent service description and introduction across all languages (#21544) * Update Web PubSub readme 1. To keep the service description consistent across different languages 2. update some links * Update README.md * delete redundant network version (#21612) * STG79 Preview (#21591) * settings files * update swagger * encryption scope sas * permanent delete sas * sync copy from url with encryption scope * manually edit swagger * Update _version.py * gitignore * skip failure * updated versions * changelog Co-authored-by: xiafu Co-authored-by: Xiaoxi Fu <49707495+xiafu-msft@users.noreply.github.com> * [AutoRelease] t2-eventgrid-2021-10-21-28743 (#21361) * CodeGen from PR 16469 in Azure/azure-rest-api-specs Adding missing identity properties and ExtensionTopics operation (#16469) * Adding missing identity properties and ExtensionTopics operation * fixing prettier check issues * Add identity to topic * Add system data to Extension topic response * fix lintdiff issue * version,CHANGELOG * test * update test * Update test Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: BigCat20196 <1095260342@qq.com> * Latest API(2021-10-31-preview) changes implementation in azure-communication-identity (#21331) * update Communication Identity API to enable to use M365 Teams identities to build custom Teams endpoint * the convenience layer for custom teams endpoint is created, samples are added, updated CHANGELOG.md, README.md * live tests & recordings are added * changed communication identity SDK version & updated live test recordings * fixed API review comment&updated all related files * replacing ACS --> Communication Services * renamed function name as per the azure board review * disable tests for custom teams endpoint in int * fix lint issues * small lint issue fix * regenerated code which supports older api switching * api version switching added to clients classes * fixed failed tests for azure-communication-networktraversal * recordings are updated * indent fix in identity_samples.py Co-authored-by: Petr Švihlík * indent fix in identity_samples_async.py Co-authored-by: Petr Švihlík * generate_teams_user_aad_token replaced to test utils * test commit, reverting generated code imports * reverting the last commit * upgraded min version of azure-core&msrest for autogenerated code * upgraded min version of azure-core&msrest in shared_requirements.txt * upgraded min version of azure-core&msrest for chat SDK * upgraded min version of azure-core&msrest in shared_requirements.txt for chat sdk * classifiers dev status updated to beta, azure-core&msrect upgraded for networktraversal Co-authored-by: Martin Barnas Co-authored-by: Aigerim Beishenbekova Co-authored-by: Aigerim Beishenbekova Co-authored-by: Petr Švihlík Co-authored-by: Aigerim Beishenbekova * [AutoRelease] t2-monitor-2021-11-03-63776 (#21559) * CodeGen from PR 16645 in Azure/azure-rest-api-specs config readme (#16645) * version,CHANGELOG * test * Update dev_requirements.txt * Update dev_requirements.txt * test,version,CHANGELOG * test,version,CHANGELOG * test yaml * Update CHANGELOG.md * fix test * fix test * fix test Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Co-authored-by: BigCat20196 <1095260342@qq.com> * Add Mixed Reality Remote Rendering SDK (#16643) * Azure Remote Rendering python SDK fix type hints, fix linter issues linter and type hints mypy type fixes rebase to new authorization pr, regenerate models for updated swagger spec pulling out remoterendering functions update MANIFEST.in to include all needed files fix mypy type issues linter issues add namespace exclusion for mixed reality install and extra requires dev requirements TokenCredential -> AsyncTokenCredential version to 1.0.0b1 preview version remove yaml from manifest factoring out polling, start models, linting and mypy add option to specify api version when creating a client making params to constructor keyword only undo kwargs changes to client, but want to be able to go back add rehyrdration of poller fix linting issues copy shared code from authentication package rename of models make params in async client keyword only rename update_rendering_session to extend_rendering_session change kwargs, point to release swagger, change typo move out of mixedreality folder pipeline setup files fix relative path, fename env variable rename md files so that they are not flagged because of missing headings in the ci pipeline intermediate rename rename and move move pipeline things back add test infra setup fix relative paths fix ci.yml fix msrest version in line with mr authentication update azure-core minimum version remove package version from namespace package switch to released api version, use swagger directive to rename conversion output fix changelog reference namespace package fix relative dev requirements path construct client tests tests debug live pipeline try to get live tests fix python 27 add async client tests, exclude async tests from python 2.7 fix python 3.5 type hinting issue add recorded tests, enable configuring polling interval on client and per request put back nspkg to dev requirements linting add line to changelog fix artifact paramater name prolong session time to prevent live issues in spin up fix recorded tests rename Error to RemoteRenderingError, change poller continuation token to not use pickle try to fix CI try to fix 2.7 bump template azure core version so analyze step does not complain more fudging with dev_requirements to fix pipeline remove pickle from polling python 2.7 fix rename max_lease_time_minutes to lease_time_minutes, rename extend_sesssion to update_session * AsyncLROPoller was introduced in 1.6.0 * fix frozen requirement * fix mypy error * throw an exception on error state of conversion and session polling * fix issues with polling interval in kwargs * updated README * updated samples * fix link * async polling and readme fix * fix README long description issue * polling type fix * fix README long description issue * fix tests for failing conversion * add py.typed to Manifest * fix package name * fix type and add how to create sts client * do not expose RemoteRenderingApiVersion * make error message clearer * fix documentation path * rename remote_renderin_endpoint to endpoint * adjust session poller default polling interval * added python 2.7 disclaimer, fix AAD example * 'can not' -> 'cannot' in clients * remove deleted: azure-mixedreality-remoterendering_python.json * remove outdated comment * make lease_time_minutes in update_rendering_session a kwargs * update for release * [formrecognizer] Add new samples to README (#21607) * add new sample to table * fix link * regenerate artifacts (#21525) * regenerate artifacts * update * update * update * [ServiceBus] update release notes (#21615) * [SchemaRegistry] remove version from docstring (#21617) * update azure-search-documents dependency on typing-extensions to >= 3.7.4.3 (#21618) * [Key Vault] Address archboard feedback (#21567) * Changelog and version (#21614) * adding trust-proxy-cert to the repo itself (#21624) * Update changelog. (#21625) * [SchemaRegistry] avro docs cleanup (#21619) * avro cleanup * readme update * [rest] store decompressed body in response content for aiohttp with decompression headers (#21620) * [SchemaRegistry] regenerate to fix client side validation (#21629) * doc updates (#21628) * Change versions to beta (#21627) * settings files * gitignore * update versions * [KV-keys]Name change in SKR (#21609) * [SchemaRegistry] swagger updates + run black (#21631) * regen josh's swagger updates + run black * rerecord * changelog * [rest] add decompression tests and fix multiple body() calls (#21630) * [KV] Enable SKR tests on KV (#21621) * Sync eng/common directory with azure-sdk-tools for PR 2219 (#21622) * adding retry to docker container start Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> * Increment package version after release of azure-batch (#20007) * update changelog (#21644) * Changelog Date Formatting (#21646) * settings files * gitignore * changelog date fix * changelog date fix * Use working region/subscription for search deployments (#21568) * update changelog (#21648) * Increment version for core releases (#21649) Increment package version after release of azure-core * update broken links (#21643) * update broken links * update links * fix dup content (#21651) * [SchemaRegistry] update format type (#21647) * updating chart.yaml for stress-test-addons (#21650) Co-authored-by: Albert Cheng * [AutoRelease] t2-synapse-2021-11-08-68636 (#21640) * CodeGen from PR 16581 in Azure/azure-rest-api-specs [Synapse]Add auto gen readme files for cli kusto support (#16581) * Add blockchain to latest profile * Add additional types * addclikustosupportautogenfiles * removealias * addrepo Co-authored-by: Mark Cowlishaw * version,CHANGELOG Co-authored-by: SDKAuto Co-authored-by: Mark Cowlishaw Co-authored-by: PythonSdkPipelines * [webpubsub] add live tests (#21654) * [AutoRelease] t2-network-2021-11-05-99038 (#21613) * CodeGen from PR 16618 in Azure/azure-rest-api-specs [python] replace api-version `2021-03-01` with `2021-05-01` (#16618) * Update readme.python.md * Update readme.python.md * Update readme.python.md * version,CHANGELOG * test Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines * [webpubsub] update for api-version `2021-10-01` (#21393) * head-as-boolean * build_auth_token * review * handwrite fix for text/plain * review * update __init__ * update patch format * review * revert reamde.me * regenerate * bump min azure-core version for aiohttp fix * rengerate * test * review * update changelog * async for get_client_access_token * dependency * Code regen * Fix smoke test * bump azure-core min dep to 1.20.1 * add client access token tests * record tests * add back in JSONType typehints and remove whitespace * rerecord with unblank * make super call 2.7 compatible * address my comments * get samples running * context manage from connection string async sample Co-authored-by: iscai-msft Co-authored-by: antisch * The release date of 1.1.0b1 is changed in CHANGELOG.md (#21641) * the release date of 1.1.0b1 is changed in CHANGELOG.md * checking skipping get_token_for_teams_user env in samples is added Co-authored-by: Aigerim Beishenbekova Co-authored-by: Aigerim Beishenbekova * Added reference to exchange teams token section (#21662) Co-authored-by: Aigerim Beishenbekova * Increment package version after release of azure-search-documents (#21669) * Increment version for identity releases (#21673) Increment package version after release of azure-identity * Increment version for synapse releases (#21672) Increment package version after release of azure-synapse-artifacts * update git helper (#21670) * Validate python docs packages using docker (#21657) * [SchemaRegistry] remove schema prefix in params (#21675) * Re-add get-codeowners.ps1 (#21676) Co-authored-by: Chidozie Ononiwu * resolve mac agent failure (#21677) Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> * Update CHANGELOG.md (#21679) * raise decode error instead of ContentDecodingError (#19433) * raise decode error instead of ContentDecodingError * Update _requests_basic.py * Increment version for communication releases (#21667) Increment package version after release of azure-communication-identity * Increment version for storage releases (#21652) Increment package version after release of azure-storage-blob * Increment version for cognitivelanguage releases (#21566) Increment package version after release of azure-ai-language-conversations * Increment version for videoanalyzer releases (#21455) Increment package version after release of azure-media-videoanalyzer-edge * Increment version for formrecognizer releases (#21678) Increment package version after release of azure-ai-formrecognizer * Update CHANGELOG.md (#21681) * Update CHANGELOG.md * Update CHANGELOG.md * Update docs for Web PubSub GA (#21659) * Update setup.py * Update README.md * Create Readme.md * Migration Guide from Azure-loganalytics (#21674) * Migration Guide from Azure-loganalytics * Apply suggestions from code review Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com> * Update sdk/monitor/azure-monitor-query/migration_guide.md Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com> * Update sdk/monitor/azure-monitor-query/migration_guide.md Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com> Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com> * Update Monitor Query API ref link (#21683) * [Test Proxy] Add fixture to automatically start/stop Docker container (#21538) Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> * update automatic close mechanism (#21580) * release_iseus_status_auto_reply * issue_aoto_close_revert * Update main.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py * Update update_issue_body.py * Update main.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update scripts/release_issue_status/main.py * Update scripts/release_issue_status/update_issue_body.py * Update reply_generator.py * Update main.py * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update scripts/release_issue_status/update_issue_body.py Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update scripts/release_issue_status/main.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update reply_generator.py * Update update_issue_body.py * Update main.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update update_issue_body.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update reply_generator.py * Add files via upload * Update reply_generator.py * Update update_issue_body.py * Update reply_generator.py * Update auto_pipeline_run.py * Update auto_pipeline_run.py * add auto-close * Update release_issue_status.yml for Azure Pipelines * Update auto_close.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * fix bug * Update main.py * Update auto_close.py * Update auto_close.py * Update main.py * Update reply_generator.py * Update main.py * Update main.py * Update auto_close.py * Update main.py * Update auto-close * Update auto_pipeline_run.py * Update update_issue_body.py * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update auto_pipeline_run.py * Add pipeline link * Update pipeline link * Update auto_pipeline_run.py * Update release_issue_status.yml for Azure Pipelines * Update auto_pipeline_run.py * Update requirement.txt * Update auto_pipeline_run.py * Add get_python_pipeline * Update auto_pipeline_run.py * test * test * add outputfolder * add label * Update main.py * Update get_python_pipeline.py * Update main.py * Update auto_pipeline_run.py * Add utils * Update main.py * Update main.py * Delete old py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update utils.py * Update utils.py * Update main.py * Update main.py * Update reply_generator.py * Update utils.py * Add get_changelog function * Update utils.py * Update reply_generator.py * Update main.py * Update reply_generator.py * Update function * del useless code * Update utils.py * Update main.py * Update reply_generator.py * Update main.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update reply_generator.py * Update main.py * Update main.py * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update release_issue_status.yml for Azure Pipelines * Update release_issue_status.yml for Azure Pipelines * Update main.py * Update utils.py * Update auto-close * Update release_issue_status.yml for Azure Pipelines * Update utils.py * Update utils.py * Fix auto-close bug * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update utils.py * Update release_issue_status.yml for Azure Pipelines * Add assign * Update reply_generator.py * Update reply_generator.py * Update assignee * Update assignee * Update main.py * Update main.py * Update main.py * update md * update md * update md * update md * update md * update md * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py * Update main.py Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: BigCat20196 <1095260342@qq.com> Co-authored-by: Yuchao Yan * [webpubsub] regen with hub as a client parameter (#21688) * [Key Vault] Add support for multi-tenant authentication (#21290) * [webpubsub] fix some typehints (#21692) * [SchemaRegistry] update changelog (#21695) * [Key Vault] Skip SKR tests on KV (#21694) * [webpubsub] add async type hints (#21697) * Update CHANGELOG.md (#21699) * Update CHANGELOG.md (#21702) * [webpubsub] add jwt and reverse proxy tests (#21680) * [SchemaRegistry] bump sr version in avrosr (#21590) * bump sr version * update test recordings * update recordings after update to swagger * changelog * adams comments * update * update * update api ref links * adams comments * add breaking changes section to cl * unindent * Sync eng/common directory with azure-sdk-tools for PR 2249 (#21705) * notify of running build * get rid of extraneous path setting Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> * [AutoRelease] t2-desktopvirtualization-2021-10-28-59198 (#21466) * CodeGen from PR 16579 in Azure/azure-rest-api-specs config desktopvirtualization readme and readme python (#16579) * config readme * Update readme.python.md Co-authored-by: Yuchao Yan * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: Yuchao Yan Co-authored-by: PythonSdkPipelines Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> * [webpubsub] prepare for release (#21707) * [AutoRelease] t2-avs-2021-10-26-52978(Do not merge) (#21422) * CodeGen from PR 16426 in Azure/azure-rest-api-specs publish Microsoft.AVS 2021-12-01 API (#16426) * copy 2021-06-01 API * replace "2021-06-01" with "2021-12-01" * add 2021-12-01 changes * update readme * add go * add java * fix go * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Yuchao Yan * [AutoRelease] t2-iotcentral-2021-10-12-72051(Do not merge) (#21229) * CodeGen from PR 16139 in Azure/azure-rest-api-specs [Hub Generated] Review request for Microsoft.IoTCentral to add version stable/2021-06-01 (#16139) * [IoT-Central] Added identity request and response objects for IoT Central APIs to support Managed Identities * Updated model as string * Updated case for none * Updated ArmIdentity to ManagedIdentity * Added description and title for ManagedIdentity * Updated casing for mI type * Reset casing for MI type * Updated comments for principalId and tenantId * Use common-types for supported system-assigned managed identities Co-authored-by: Ganesh Viswanathan * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: Ganesh Viswanathan Co-authored-by: PythonSdkPipelines Co-authored-by: Yuchao Yan * [Key Vault] Update changelogs for release (#21710) * [AutoRelease] t2-keyvault-2021-11-11-01788 (#21712) * CodeGen from PR 16536 in Azure/azure-rest-api-specs Add {release|rotate}-related AKV key permissions for 2021-06-01-preview. (#16536) * version,CHANGELOG * test * version Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> * communication identity related codes replaced to tests folder from shared (#21716) Co-authored-by: Aigerim Beishenbekova * Increment package version after release of azure-appconfiguration (#21708) * Increment package version after release of azure-data-tables (#21709) * [SchemaRegistry] avro docs update (#21721) * Increment package version after release of azure-keyvault-administration (#21726) * make Log analytics track1 obselete (#21730) * Update sdk_packaging.toml * Update README.md * Update version.py * Update CHANGELOG.md * Update setup.py * [formrecognizer] Add samples for searching with spans (#21704) * add samples for searching with spans * remove printing extra data * move samples to subfolder * add README * remove unused links * address feedback * [AutoRelease] t2-resourceconnector-2021-10-22-84842 (#21383) * CodeGen from PR 16384 in Azure/azure-rest-api-specs Add Microsoft.ResourceConnector [Appliance] 2021-10-31-preview API (#16384) * Add Microsoft.ResourceConnector [Appliance] 2021-10-31-preview API * Run prettier on violation files * Add SCVMM to custom-words.txt * Fix validation issues * Fix prettier issue with AppliancesListClusterUserCredential.json * Add multi API section for go readme and update namespace for python readme * Update Example files to be more accurate * Add None to Managed Identity typ in parity with other Azure Arc Resources * Add default value as AKSEdge for distro * Adding type object for ApplianceListResult * Update Identity to use SystemAssignedServiceIdentity from common-types v3 managedidentity.json * Reverting to using custom Identity * Update readme.md * Update readme.python.md Co-authored-by: Anirban Thakur Co-authored-by: Yiming Lei <59104634+RAY-316@users.noreply.github.com> * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: Anirban Thakur Co-authored-by: Yiming Lei <59104634+RAY-316@users.noreply.github.com> Co-authored-by: PythonSdkPipelines Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> * Remove DeployArmTemplate flag, Remove legacy resource group live test deployment (#21738) * Add default cloud configuration values to source (#21723) Co-authored-by: Ben Broderick Phillips * [textanalytics] raise better error message in job failure (#21742) * Mixed Reality Authentication 1.0.0b1 release preparation (#21744) - This change udpates the changelog for the Mixed Reality authentication package for the initial 1.0.0b1 release. Co-authored-by: Craig Treasure * simplify the commit history so that the patch can apply properly (#21733) Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> * [AutoRelease] t2-cognitiveservices-2021-11-03-56855 (#21556) * CodeGen from PR 16418 in Azure/azure-rest-api-specs Cognitive Services Resource Provider API Version 2021-10-01 (#16418) * Adds base for updating Microsoft.CognitiveServices from version stable/2021-04-30 to version 2021-10-01 * Updates readme * Updates API version in new specs and examples * Changes for 2021-10-01 * Use 201 instead of 202 for Put, Add x-ms-pageable for List. * address comments * version,CHANGELOG * Update CHANGELOG.md Co-authored-by: SDKAuto Co-authored-by: PythonSdkPipelines Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> * add dependency to azure-mixedreality-authentication library (#21757) * add dependency to azure-mixedreality-authentication library * add azure-mixedreality-authorization to shared_requirements.txt * fix azure remote rendering release date in CHANGELOG.md (#21758) * Use arm template parameters as sole input for live test environment variables (#21693) * Sync eng/common directory with azure-sdk-tools for PR 2265 (#21759) * Improve devops logging for link checker * Update eng/common/scripts/Verify-Links.ps1 Co-authored-by: Wes Haggard Co-authored-by: Wes Haggard * [storage] remove private code from proxy sample (#21762) Co-authored-by: Yuchao Yan Co-authored-by: Laurent Mazuel Co-authored-by: Liangying.Wei Co-authored-by: Steve Faulkner Co-authored-by: Codejune Co-authored-by: Xingyu Long Co-authored-by: Hugo van Kemenade Co-authored-by: Thomas Grainger Co-authored-by: Xiaoxi Fu <49707495+xiafu-msft@users.noreply.github.com> Co-authored-by: Azure CLI Bot Co-authored-by: SDKAuto Co-authored-by: Charlie Li <39974812+chengliangli0918@users.noreply.github.com> Co-authored-by: Charlie Li Co-authored-by: rsamigullin <89222124+rsamigullin@users.noreply.github.com> Co-authored-by: Matthew Christopher Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Co-authored-by: Xiang Yan Co-authored-by: scbedd <45376673+scbedd@users.noreply.github.com> Co-authored-by: McCoy Patiño <39780829+mccoyp@users.noreply.github.com> Co-authored-by: catalinaperalta Co-authored-by: Sima Zhu Co-authored-by: Sima Zhu <48036328+sima-zhu@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips Co-authored-by: tasherif-msft <69483382+tasherif-msft@users.noreply.github.com> Co-authored-by: Chidozie Ononiwu Co-authored-by: Zed Lei <59104634+RAY-316@users.noreply.github.com> Co-authored-by: Mike Harder Co-authored-by: Siri Teja Reddy Kasireddy Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> Co-authored-by: Aigerim Co-authored-by: Aigerim Beishenbekova Co-authored-by: iscai-msft <43154838+iscai-msft@users.noreply.github.com> Co-authored-by: Travis Prescott Co-authored-by: Yalin Li Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com> Co-authored-by: Yash Bhutoria Co-authored-by: antisch Co-authored-by: swathipil <76007337+swathipil@users.noreply.github.com> Co-authored-by: Daniel Jurek Co-authored-by: Simon Moreno <30335873+simorenoh@users.noreply.github.com> Co-authored-by: Ben Broderick Phillips Co-authored-by: Krista Pratico Co-authored-by: Jiefeng Chen <51037443+BigCat20196@users.noreply.github.com> Co-authored-by: hivyas <61890270+hivyas@users.noreply.github.com> Co-authored-by: REDMOND\amisi Co-authored-by: Anuj Toshniwal Co-authored-by: Abhijit Karanjkar Co-authored-by: Praful Johari Co-authored-by: visunda Co-authored-by: Vivek Sundararajan Co-authored-by: vivek-microsoft <32766101+vivek-microsoft@users.noreply.github.com> Co-authored-by: Zed <601306339@qq.com> Co-authored-by: BigCat20196 <1095260342@qq.com> Co-authored-by: Adam Ling (MSFT) Co-authored-by: Tong Xu (MSFT) <57166602+v-xuto@users.noreply.github.com> Co-authored-by: Mohamed Shaban Co-authored-by: Damodar Avadhani Co-authored-by: v-ajnava Co-authored-by: Chidozie Ononiwu (His Righteousness) <31145988+chidozieononiwu@users.noreply.github.com> Co-authored-by: Rakshith Bhyravabhotla Co-authored-by: Albert Cheng Co-authored-by: Rahul Singh <53578268+rahuls-microsoft@users.noreply.github.com> Co-authored-by: xiafu Co-authored-by: Martin Barnas Co-authored-by: Aigerim Beishenbekova Co-authored-by: Aigerim Beishenbekova Co-authored-by: Petr Švihlík Co-authored-by: Aigerim Beishenbekova Co-authored-by: rikogeln <40666347+rikogeln@users.noreply.github.com> Co-authored-by: Mark Cowlishaw Co-authored-by: iscai-msft Co-authored-by: Ganesh Viswanathan Co-authored-by: Anirban Thakur Co-authored-by: Craig Treasure Co-authored-by: Craig Treasure Co-authored-by: Wes Haggard Co-authored-by: Wes Haggard --- .github/CODEOWNERS | 3 +- .gitignore | 9 +- README.md | 2 +- doc/dev/README.md | 2 +- doc/dev/get_unreleased_package_guide.md | 2 +- .../package_version/package_version_rule.md | 44 + doc/dev/package_version/version summary.xlsx | Bin 0 -> 11318 bytes doc/dev/package_version/version_summary.png | Bin 0 -> 14570 bytes doc/dev/perfstress_tests.md | 2 +- doc/dev/test_proxy_migration_guide.md | 53 +- eng/.docsettings.yml | 1 + eng/CredScanSuppression.json | 2 +- eng/ci_tools.txt | 7 +- .../TestResources/New-TestResources.ps1 | 30 +- .../TestResources/clouds/AzureChinaCloud.json | 15 + .../TestResources/clouds/AzureCloud.json | 8 + .../clouds/AzureUSGovernment.json | 15 + .../templates/steps/docker-pull-image.yml | 15 + .../templates/steps/get-pr-owners.yml | 51 +- .../templates/steps/sparse-checkout.yml | 4 +- eng/common/scripts/ChangeLog-Operations.ps1 | 11 + eng/common/scripts/Invoke-GitHubAPI.ps1 | 30 + eng/common/scripts/Prepare-Release.ps1 | 21 +- .../scripts/Save-Package-Properties.ps1 | 32 +- eng/common/scripts/Update-DocsMsPackages.ps1 | 16 +- eng/common/scripts/Verify-Links.ps1 | 14 +- eng/common/scripts/get-codeowners.ps1 | 1 - .../stress-testing/deploy-stress-tests.ps1 | 14 +- .../find-all-stress-packages.ps1 | 16 +- eng/common/testproxy/docker-start-proxy.ps1 | 30 +- eng/common/testproxy/test-proxy-docker.yml | 10 +- eng/common/testproxy/test-proxy-tool.yml | 23 +- eng/pipelines/docindex.yml | 11 +- eng/pipelines/templates/jobs/ci.tests.yml | 6 +- eng/pipelines/templates/jobs/ci.yml | 15 +- eng/pipelines/templates/jobs/live.tests.yml | 63 +- .../templates/stages/archetype-sdk-client.yml | 5 +- .../templates/stages/archetype-sdk-tests.yml | 8 - ...atform-matrix-cryptography-dependency.json | 11 + .../templates/stages/platform-matrix.json | 11 + eng/pipelines/templates/steps/analyze.yml | 31 +- .../templates/steps/build-artifacts.yml | 19 +- eng/pipelines/templates/steps/build-test.yml | 12 +- eng/pipelines/templates/steps/run_apistub.yml | 9 +- eng/pipelines/templates/steps/run_bandit.yml | 9 +- eng/pipelines/templates/steps/run_black.yml | 1 - .../templates/steps/run_breaking_changes.yml | 9 +- eng/pipelines/templates/steps/run_mypy.yml | 8 +- eng/pipelines/templates/steps/run_pylint.yml | 9 +- .../templates/steps/set-dev-build.yml | 9 +- .../steps/targeting-string-resolve.yml | 18 + .../templates/steps/test_regression.yml | 14 +- eng/scripts/Language-Settings.ps1 | 49 +- eng/test_tools.txt | 10 +- eng/tox/allowed_pylint_failures.py | 2 + eng/tox/install_depend_packages.py | 90 +- eng/tox/mypy_hard_failure_packages.py | 1 + eng/versioning/version_set.py | 3 +- scripts/auto_release/PythonSdkLiveTest.yml | 6 +- .../auto_release/create_auto_release_pr.py | 2 +- scripts/auto_release/main.py | 10 +- scripts/devops_tasks/common_tasks.py | 24 +- scripts/devops_tasks/git_helper.py | 5 +- .../devops_tasks/install_python_version.py | 2 +- scripts/devops_tasks/setup_execute_tests.py | 12 +- scripts/devops_tasks/test_run_samples.py | 103 +- scripts/devops_tasks/trust_proxy_cert.py | 37 + scripts/release_issue_status/main.py | 106 +- .../release_issue_status.yml | 2 + .../release_issue_status/reply_generator.py | 11 +- scripts/release_issue_status/utils.py | 7 +- sdk/agrifood/tests.yml | 4 +- .../azure-appconfiguration/CHANGELOG.md | 14 +- .../azure/appconfiguration/_models.py | 10 +- .../azure/appconfiguration/_version.py | 2 +- ...e_configuration_client.test_breaking2.yaml | 12 +- ....test_config_setting_secret_reference.yaml | 10 +- ....test_config_setting_secret_reference.yaml | 10 +- ....test_config_setting_secret_reference.yaml | 10 +- ....test_config_setting_secret_reference.yaml | 10 +- .../tests/test_azure_configuration_client.py | 4 +- .../test_azure_configuration_client_aad.py | 4 +- ...st_azure_configuration_client_aad_async.py | 4 +- .../test_azure_configuration_client_async.py | 4 +- sdk/appconfiguration/ci.yml | 2 +- sdk/appconfiguration/tests.yml | 2 - sdk/attestation/test-resources.json | 13 +- sdk/attestation/tests.yml | 2 - .../v2018_01_01_preview/_version.py | 2 +- .../azure-mgmt-azurearcdata/CHANGELOG.md | 7 + .../azure-mgmt-azurearcdata/_meta.json | 2 +- .../azure/mgmt/azurearcdata/_configuration.py | 2 +- .../azure/mgmt/azurearcdata/_metadata.json | 4 +- .../azure/mgmt/azurearcdata/_version.py | 2 +- .../mgmt/azurearcdata/aio/_configuration.py | 2 +- .../_data_controllers_operations.py | 12 +- .../aio/operations/_operations.py | 2 +- .../_sql_managed_instances_operations.py | 12 +- .../_sql_server_instances_operations.py | 12 +- .../azure/mgmt/azurearcdata/models/_models.py | 17 +- .../mgmt/azurearcdata/models/_models_py3.py | 19 +- .../_data_controllers_operations.py | 12 +- .../azurearcdata/operations/_operations.py | 2 +- .../_sql_managed_instances_operations.py | 12 +- .../_sql_server_instances_operations.py | 12 +- .../CHANGELOG.md | 16 + .../MANIFEST.in | 1 + .../_meta.json | 11 + .../_bare_metal_infrastructure_client.py | 21 +- .../baremetalinfrastructure/_configuration.py | 2 +- .../baremetalinfrastructure/_metadata.json | 75 +- .../mgmt/baremetalinfrastructure/_version.py | 2 +- .../aio/_bare_metal_infrastructure_client.py | 20 +- .../aio/_configuration.py | 2 +- .../_azure_bare_metal_instances_operations.py | 482 +- .../aio/operations/_operations.py | 14 +- .../models/__init__.py | 5 + ..._bare_metal_infrastructure_client_enums.py | 9 + .../baremetalinfrastructure/models/_models.py | 94 +- .../models/_models_py3.py | 107 +- .../_azure_bare_metal_instances_operations.py | 482 +- .../operations/_operations.py | 12 +- sdk/batch/azure-batch/CHANGELOG.md | 10 + sdk/batch/azure-batch/azure/batch/_version.py | 2 +- sdk/chaos/azure-mgmt-chaos/CHANGELOG.md | 11 + sdk/chaos/azure-mgmt-chaos/LICENSE.txt | 21 + sdk/chaos/azure-mgmt-chaos/MANIFEST.in | 6 + sdk/chaos/azure-mgmt-chaos/README.md | 27 + sdk/chaos/azure-mgmt-chaos/_meta.json | 11 + sdk/chaos/azure-mgmt-chaos/azure/__init__.py | 1 + .../azure-mgmt-chaos/azure/mgmt/__init__.py | 1 + .../azure/mgmt/chaos}/__init__.py | 4 +- .../mgmt/chaos/_chaos_management_client.py | 114 + .../azure/mgmt/chaos/_configuration.py | 71 + .../azure/mgmt/chaos/_metadata.json | 108 + .../azure/mgmt/chaos/_version.py | 9 + .../azure/mgmt/chaos}/aio/__init__.py | 4 +- .../chaos/aio/_chaos_management_client.py | 107 + .../azure/mgmt/chaos/aio/_configuration.py | 67 + .../mgmt/chaos/aio/operations/__init__.py | 23 + .../operations/_capabilities_operations.py | 364 + .../_capability_types_operations.py} | 101 +- .../aio/operations/_experiments_operations.py | 894 + .../mgmt/chaos/aio/operations/_operations.py | 105 + .../operations/_target_types_operations.py} | 91 +- .../aio/operations/_targets_operations.py | 348 + .../azure/mgmt/chaos/models/__init__.py | 149 + .../models/_chaos_management_client_enums.py | 67 + .../azure/mgmt/chaos/models/_models.py | 1635 + .../azure/mgmt/chaos/models/_models_py3.py | 1699 + .../azure/mgmt/chaos/operations/__init__.py | 23 + .../operations/_capabilities_operations.py | 372 + .../_capability_types_operations.py} | 101 +- .../operations/_experiments_operations.py | 911 + .../mgmt/chaos/operations/_operations.py | 110 + .../operations/_target_types_operations.py | 183 + .../chaos/operations/_targets_operations.py | 356 + .../azure/mgmt/chaos}/py.typed | 0 sdk/chaos/azure-mgmt-chaos/sdk_packaging.toml | 9 + sdk/chaos/azure-mgmt-chaos/setup.cfg | 2 + sdk/chaos/azure-mgmt-chaos/setup.py | 90 + sdk/chaos/ci.yml | 33 + .../CHANGELOG.md | 12 +- .../azure-ai-language-conversations/README.md | 51 +- .../language/conversations/_configuration.py | 2 +- .../ai/language/conversations/_version.py | 2 +- .../conversations/aio/_configuration.py | 2 +- .../aio/operations/_operations.py | 10 +- .../language/conversations/models/__init__.py | 86 +- .../_conversation_analysis_client_enums.py | 16 +- .../language/conversations/models/_models.py | 781 +- .../conversations/models/_models_py3.py | 855 +- .../conversations/operations/_operations.py | 12 +- .../samples/README.md | 41 +- .../sample_analyze_conversation_app_async.py | 10 +- ...ze_conversation_app_language_parm_async.py | 78 + .../sample_analyze_orchestration_app_async.py | 75 + ...tration_app_conversation_response_async.py | 86 + ...e_orchestration_app_luis_response_async.py | 77 + ...ze_orchestration_app_qna_response_async.py | 79 + ...yze_orchestration_app_with_params_async.py | 94 + .../sample_analyze_conversation_app.py | 10 +- ..._analyze_conversation_app_language_parm.py | 73 + .../sample_analyze_orchestration_app.py | 69 + ...orchestration_app_conversation_response.py | 80 + ...analyze_orchestration_app_luis_response.py | 71 + ..._analyze_orchestration_app_qna_response.py | 72 + ...e_analyze_orchestration_app_with_params.py | 88 + ...ation_app_async.test_conversation_app.yaml | 34 + ...test_conversation_app_with_dictparams.yaml | 34 + ...tion_app_async.test_orchestration_app.yaml | 76 + ...ync.test_orchestration_app_with_model.yaml | 44 + ...est_orchestration_app_with_parameters.yaml | 44 + .../async/test_conversation_app_async.py | 89 + .../async/test_orchestration_app_async.py | 151 + .../async/test_orchestration_direct_async.py | 175 + ...onversation_app.test_conversation_app.yaml | 23 +- ...test_conversation_app_with_dictparams.yaml | 23 +- ...hestration_app.test_orchestration_app.yaml | 102 + ...app.test_orchestration_app_with_model.yaml | 57 + ...est_orchestration_app_with_parameters.yaml | 57 + .../tests/test_conversation_app.py | 11 +- .../tests/test_orchestration_app.py | 151 + .../tests/test_orchestration_direct.py | 179 + .../tests/testcase.py | 4 +- .../CHANGELOG.md | 48 +- .../README.md | 59 +- .../questionanswering/_configuration.py | 2 +- .../operations => _operations}/__init__.py | 0 .../_operations/_operations.py | 301 + .../ai/language/questionanswering/_patch.py | 58 +- .../_question_answering_client.py | 6 +- .../ai/language/questionanswering/_version.py | 2 +- .../questionanswering/aio/_configuration.py | 2 +- .../_operations}/__init__.py | 0 .../aio/_operations/_operations.py | 232 + .../aio/_question_answering_client.py | 6 +- .../questionanswering/models/__init__.py | 46 +- .../questionanswering/models/_models.py | 563 +- .../questionanswering/models/_models_py3.py | 629 +- .../_question_answering_client_enums.py | 20 +- .../async_samples/sample_chat_async.py | 51 +- .../sample_query_knowledgebase_async.py | 22 +- .../async_samples/sample_query_text_async.py | 22 +- .../samples/sample_chat.py | 52 +- .../samples/sample_query_knowledgebase.py | 22 +- .../samples/sample_query_text.py | 27 +- .../setup.py | 4 +- .../swagger/README.md | 46 +- ...nowledgebase.test_query_knowledgebase.yaml | 32 +- ...ebase.test_query_knowledgebase_filter.yaml | 34 +- ...uery_knowledgebase_filter_dict_params.yaml | 60 + ...edgebase.test_query_knowledgebase_llc.yaml | 32 +- ...ery_knowledgebase_llc_with_answerspan.yaml | 32 +- ...base.test_query_knowledgebase_only_id.yaml | 24 +- ...ase.test_query_knowledgebase_overload.yaml | 18 +- ....test_query_knowledgebase_python_dict.yaml | 24 +- ...t_query_knowledgebase_with_answerspan.yaml | 36 +- ...t_query_knowledgebase_with_dictparams.yaml | 18 +- ...est_query_knowledgebase_with_followup.yaml | 54 +- ...gebase_async.test_query_knowledgebase.yaml | 38 +- ...async.test_query_knowledgebase_filter.yaml | 36 +- ...uery_knowledgebase_filter_dict_params.yaml | 49 + ...se_async.test_query_knowledgebase_llc.yaml | 34 +- ...ery_knowledgebase_llc_with_answerspan.yaml | 38 +- ...sync.test_query_knowledgebase_only_id.yaml | 26 +- ...ync.test_query_knowledgebase_overload.yaml | 20 +- ....test_query_knowledgebase_python_dict.yaml | 26 +- ...t_query_knowledgebase_with_answerspan.yaml | 44 +- ...t_query_knowledgebase_with_dictparams.yaml | 20 +- ...est_query_knowledgebase_with_followup.yaml | 58 +- .../test_query_text.test_query_text.yaml | 10 +- .../test_query_text.test_query_text_llc.yaml | 14 +- ...t_query_text.test_query_text_overload.yaml | 20 +- ..._text.test_query_text_with_dictparams.yaml | 10 +- ...text.test_query_text_with_str_records.yaml | 18 +- ...test_query_text_async.test_query_text.yaml | 14 +- ..._query_text_async.test_query_text_llc.yaml | 18 +- ...y_text_async.test_query_text_overload.yaml | 22 +- ...async.test_query_text_with_dictparams.yaml | 16 +- ...sync.test_query_text_with_str_records.yaml | 20 +- .../tests/test_query_knowledgebase.py | 175 +- .../tests/test_query_knowledgebase_async.py | 162 +- .../tests/test_query_text.py | 86 +- .../tests/test_query_text_async.py | 60 +- sdk/cognitivelanguage/tests.yml | 1 - .../azure-mgmt-cognitiveservices/CHANGELOG.md | 14 + .../azure-mgmt-cognitiveservices/_meta.json | 8 +- .../_cognitive_services_management_client.py | 15 + .../mgmt/cognitiveservices/_configuration.py | 2 +- .../mgmt/cognitiveservices/_metadata.json | 19 +- .../azure/mgmt/cognitiveservices/_version.py | 2 +- .../_cognitive_services_management_client.py | 15 + .../cognitiveservices/aio/_configuration.py | 2 +- .../aio/operations/__init__.py | 6 + .../aio/operations/_accounts_operations.py | 44 +- ...e_services_management_client_operations.py | 9 +- .../_commitment_plans_operations.py | 376 + .../_commitment_tiers_operations.py} | 29 +- .../_deleted_accounts_operations.py | 12 +- .../aio/operations/_deployments_operations.py | 437 + .../aio/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 20 +- .../_private_link_resources_operations.py | 4 +- .../operations/_resource_skus_operations.py | 2 +- .../mgmt/cognitiveservices/models/__init__.py | 48 + ...nitive_services_management_client_enums.py | 25 + .../mgmt/cognitiveservices/models/_models.py | 493 + .../cognitiveservices/models/_models_py3.py | 539 + .../cognitiveservices/operations/__init__.py | 6 + .../operations/_accounts_operations.py | 44 +- ...e_services_management_client_operations.py | 9 +- .../_commitment_plans_operations.py | 385 + .../_commitment_tiers_operations.py} | 29 +- .../_deleted_accounts_operations.py | 12 +- .../operations/_deployments_operations.py | 447 + .../operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 20 +- .../_private_link_resources_operations.py | 4 +- .../operations/_resource_skus_operations.py | 2 +- .../azure-communication-chat/setup.py | 4 +- .../azure-communication-chat/tests.yml | 2 - .../azure-communication-identity/CHANGELOG.md | 15 + .../azure-communication-identity/README.md | 8 + .../communication/identity/_api_versions.py | 14 + .../_communication_identity_client.py | 40 +- .../_communication_identity_client.py | 67 +- .../identity/_generated/_configuration.py | 8 +- .../identity/_generated/_vendor.py | 27 + .../aio/_communication_identity_client.py | 63 +- .../identity/_generated/aio/_configuration.py | 8 +- .../_communication_identity_operations.py | 241 +- .../identity/_generated/models/__init__.py | 3 + .../_communication_identity_client_enums.py | 21 +- .../identity/_generated/models/_models.py | 106 +- .../identity/_generated/models/_models_py3.py | 108 +- .../_communication_identity_operations.py | 407 +- .../azure/communication/identity/_version.py | 2 +- .../_communication_identity_client_async.py | 37 +- .../samples/identity_samples.py | 44 +- .../samples/identity_samples_async.py | 41 +- .../azure-communication-identity/setup.py | 6 +- .../swagger/SWAGGER.md | 5 +- .../azure-communication-identity/tests.yml | 2 - .../tests/_shared/testcase.py | 1 - .../tests/asynctestcase.py | 27 + ...tion_identity_client.test_create_user.yaml | 19 +- ...ity_client.test_create_user_and_token.yaml | 21 +- ..._create_user_and_token_with_no_scopes.yaml | 19 +- ...est_create_user_from_managed_identity.yaml | 17 +- ...tion_identity_client.test_delete_user.yaml | 34 +- ...est_delete_user_from_managed_identity.yaml | 30 +- ...cation_identity_client.test_get_token.yaml | 40 +- ..._for_teams_user_from_managed_identity.yaml | 95 + ...token_for_teams_user_with_empty_token.yaml | 47 + ...ken_for_teams_user_with_expired_token.yaml | 47 + ...ken_for_teams_user_with_invalid_token.yaml | 47 + ...token_for_teams_user_with_valid_token.yaml | 99 + ....test_get_token_from_managed_identity.yaml | 36 +- ..._client.test_get_token_with_no_scopes.yaml | 31 +- ...on_identity_client.test_revoke_tokens.yaml | 55 +- ...t_revoke_tokens_from_managed_identity.yaml | 49 +- ...dentity_client_async.test_create_user.yaml | 18 +- ...ient_async.test_create_user_and_token.yaml | 20 +- ..._create_user_and_token_with_no_scopes.yaml | 18 +- ...est_create_user_from_managed_identity.yaml | 16 +- ...dentity_client_async.test_delete_user.yaml | 34 +- ...est_delete_user_from_managed_identity.yaml | 30 +- ..._identity_client_async.test_get_token.yaml | 38 +- ..._for_teams_user_from_managed_identity.yaml | 83 + ...token_for_teams_user_with_empty_token.yaml | 36 + ...ken_for_teams_user_with_expired_token.yaml | 36 + ...ken_for_teams_user_with_invalid_token.yaml | 36 + ...token_for_teams_user_with_valid_token.yaml | 87 + ....test_get_token_from_managed_identity.yaml | 34 +- ...t_async.test_get_token_with_no_scopes.yaml | 32 +- ...ntity_client_async.test_revoke_tokens.yaml | 54 +- ...t_revoke_tokens_from_managed_identity.yaml | 48 +- .../test_communication_identity_client.py | 82 +- ...est_communication_identity_client_async.py | 85 +- .../tests/testcase.py | 56 + .../setup.py | 4 +- .../tests.yml | 2 - .../tests/test_communication_relay_client.py | 2 + .../test_communication_relay_client_async.py | 2 + .../tests.yml | 2 - .../azure-communication-sms/tests.yml | 2 - sdk/compute/azure-mgmt-avs/CHANGELOG.md | 23 + sdk/compute/azure-mgmt-avs/_meta.json | 6 +- .../azure/mgmt/avs/_avs_client.py | 10 + .../azure/mgmt/avs/_configuration.py | 2 +- .../azure/mgmt/avs/_metadata.json | 6 +- .../azure-mgmt-avs/azure/mgmt/avs/_version.py | 2 +- .../azure/mgmt/avs/aio/_avs_client.py | 10 + .../azure/mgmt/avs/aio/_configuration.py | 2 +- .../azure/mgmt/avs/aio/operations/__init__.py | 4 + .../avs/aio/operations/_addons_operations.py | 8 +- .../operations/_authorizations_operations.py | 8 +- .../aio/operations/_cloud_links_operations.py | 8 +- .../aio/operations/_clusters_operations.py | 10 +- .../aio/operations/_datastores_operations.py | 8 +- .../_global_reach_connections_operations.py | 8 +- .../_hcx_enterprise_sites_operations.py | 8 +- .../aio/operations/_locations_operations.py | 4 +- .../mgmt/avs/aio/operations/_operations.py | 2 +- .../_placement_policies_operations.py} | 547 +- .../operations/_private_clouds_operations.py | 18 +- .../operations/_script_cmdlets_operations.py | 8 +- .../_script_executions_operations.py | 22 +- .../operations/_script_packages_operations.py | 8 +- .../_virtual_machines_operations.py | 327 + .../_workload_networks_operations.py | 76 +- .../azure/mgmt/avs/models/__init__.py | 61 + .../mgmt/avs/models/_avs_client_enums.py | 103 +- .../azure/mgmt/avs/models/_models.py | 601 +- .../azure/mgmt/avs/models/_models_py3.py | 662 +- .../azure/mgmt/avs/operations/__init__.py | 4 + .../mgmt/avs/operations/_addons_operations.py | 8 +- .../operations/_authorizations_operations.py | 8 +- .../avs/operations/_cloud_links_operations.py | 8 +- .../avs/operations/_clusters_operations.py | 10 +- .../avs/operations/_datastores_operations.py | 8 +- .../_global_reach_connections_operations.py | 8 +- .../_hcx_enterprise_sites_operations.py | 8 +- .../avs/operations/_locations_operations.py | 4 +- .../azure/mgmt/avs/operations/_operations.py | 2 +- .../_placement_policies_operations.py | 620 + .../operations/_private_clouds_operations.py | 18 +- .../operations/_script_cmdlets_operations.py | 8 +- .../_script_executions_operations.py | 22 +- .../operations/_script_packages_operations.py | 8 +- .../_virtual_machines_operations.py | 335 + .../_workload_networks_operations.py | 76 +- sdk/compute/azure-mgmt-compute/CHANGELOG.md | 25 + sdk/compute/azure-mgmt-compute/_meta.json | 2 +- .../compute/_compute_management_client.py | 64 +- .../azure/mgmt/compute/_version.py | 2 +- .../compute/aio/_compute_management_client.py | 64 +- .../azure/mgmt/compute/models.py | 2 +- .../mgmt/compute/v2015_06_15/_version.py | 2 +- .../mgmt/compute/v2016_03_30/_version.py | 2 +- .../compute/v2016_04_30_preview/_version.py | 2 +- .../mgmt/compute/v2017_03_30/_version.py | 2 +- .../mgmt/compute/v2017_09_01/_version.py | 2 +- .../mgmt/compute/v2017_12_01/_version.py | 2 +- .../mgmt/compute/v2018_04_01/_version.py | 2 +- .../mgmt/compute/v2018_06_01/_version.py | 2 +- .../mgmt/compute/v2018_09_30/_version.py | 2 +- .../mgmt/compute/v2018_10_01/_version.py | 2 +- .../mgmt/compute/v2019_03_01/_version.py | 2 +- .../mgmt/compute/v2019_04_01/_version.py | 2 +- .../mgmt/compute/v2019_07_01/_version.py | 2 +- .../mgmt/compute/v2019_11_01/_version.py | 2 +- .../mgmt/compute/v2019_12_01/_version.py | 2 +- .../mgmt/compute/v2020_05_01/_version.py | 2 +- .../mgmt/compute/v2020_06_01/_version.py | 2 +- .../mgmt/compute/v2020_06_30/_version.py | 2 +- .../mgmt/compute/v2020_09_30/_version.py | 2 +- .../compute/v2020_10_01_preview/_version.py | 2 +- .../mgmt/compute/v2020_12_01/_version.py | 2 +- .../mgmt/compute/v2021_03_01/_version.py | 2 +- .../v2021_04_01/_compute_management_client.py | 25 + .../mgmt/compute/v2021_04_01/_metadata.json | 7 +- .../mgmt/compute/v2021_04_01/_version.py | 2 +- .../aio/_compute_management_client.py | 25 + .../v2021_04_01/aio/operations/__init__.py | 10 + .../operations/_disk_accesses_operations.py} | 867 +- .../_disk_encryption_sets_operations.py} | 494 +- .../_disk_restore_point_operations.py | 459 + .../aio/operations/_disks_operations.py} | 637 +- .../aio/operations/_snapshots_operations.py} | 686 +- .../compute/v2021_04_01/models/__init__.py | 151 + .../_compute_management_client_enums.py | 176 + .../compute/v2021_04_01/models/_models.py | 1923 +- .../compute/v2021_04_01/models/_models_py3.py | 2208 +- .../v2021_04_01/operations/__init__.py | 10 + .../operations/_disk_accesses_operations.py} | 874 +- .../_disk_encryption_sets_operations.py} | 497 +- .../_disk_restore_point_operations.py | 469 + .../operations/_disks_operations.py} | 641 +- .../operations/_snapshots_operations.py} | 690 +- .../v2021_07_01/_compute_management_client.py | 15 + .../mgmt/compute/v2021_07_01/_metadata.json | 5 +- .../mgmt/compute/v2021_07_01/_version.py | 2 +- .../aio/_compute_management_client.py | 15 + .../v2021_07_01/aio/operations/__init__.py | 6 + .../_community_galleries_operations.py} | 57 +- ...unity_gallery_image_versions_operations.py | 110 + .../_community_gallery_images_operations.py | 103 + .../compute/v2021_07_01/models/__init__.py | 12 + .../compute/v2021_07_01/models/_models.py | 199 + .../compute/v2021_07_01/models/_models_py3.py | 218 + .../v2021_07_01/operations/__init__.py | 6 + .../_community_galleries_operations.py} | 57 +- ...unity_gallery_image_versions_operations.py | 115 + .../_community_gallery_images_operations.py | 108 + ...ompute.test_compute_availability_sets.yaml | 24 +- ...mt_compute.test_compute_log_analytics.yaml | 82 +- ...st_compute_proximity_placement_groups.yaml | 16 +- ...mgmt_compute_disks.test_compute_disks.yaml | 223 +- ...ompute_disks.test_compute_disks_multi.yaml | 172 +- ..._mgmt_compute_disks.test_compute_shot.yaml | 359 +- ...pute_galleries.test_compute_galleries.yaml | 581 +- .../test_mgmt_compute_vm.test_compute_vm.yaml | 798 +- ...te_vm.test_compute_vm_extension_image.yaml | 20 +- ...mgmt_compute_vm.test_compute_vm_image.yaml | 72 +- ...compute_vmss.test_compute_vmss_base_2.yaml | 2663 - ...test_compute_vmss_perform_maintenance.yaml | 265 +- ...gmt_compute_vmss.test_compute_vmss_vm.yaml | 711 +- ...t_compute_vmss.test_compute_vmss_vm_2.yaml | 641 +- .../tests/test_mgmt_compute_vm.py | 6 +- .../azure-mgmt-containerinstance/CHANGELOG.md | 7 + .../azure-mgmt-containerinstance/_meta.json | 2 +- .../mgmt/containerinstance/_configuration.py | 2 +- .../mgmt/containerinstance/_metadata.json | 4 +- .../azure/mgmt/containerinstance/_version.py | 2 +- .../containerinstance/aio/_configuration.py | 2 +- .../_container_groups_operations.py | 20 +- .../aio/operations/_containers_operations.py | 6 +- .../aio/operations/_location_operations.py | 6 +- .../aio/operations/_operations.py | 2 +- .../mgmt/containerinstance/models/_models.py | 7 + .../containerinstance/models/_models_py3.py | 11 +- .../_container_groups_operations.py | 20 +- .../operations/_containers_operations.py | 6 +- .../operations/_location_operations.py | 6 +- .../operations/_operations.py | 2 +- .../_container_registry_client.py | 2 +- .../containerregistry/_generated/__init__.py | 2 +- .../_generated/_configuration.py | 4 +- .../_generated/_container_registry.py | 68 +- .../containerregistry/_generated/_vendor.py | 25 + .../_generated/aio/__init__.py | 8 +- .../_generated/aio/_configuration.py | 4 +- .../_generated/aio/_container_registry.py | 69 +- .../_generated/aio/operations/__init__.py | 2 +- .../operations/_authentication_operations.py | 107 +- .../_container_registry_blob_operations.py | 367 +- .../_container_registry_operations.py | 648 +- .../_generated/models/__init__.py | 22 +- .../models/_container_registry_enums.py | 51 +- .../_generated/models/_models.py | 1281 +- .../_generated/models/_models_py3.py | 1301 +- .../_generated/operations/__init__.py | 2 +- .../operations/_authentication_operations.py | 154 +- .../_container_registry_blob_operations.py | 673 +- .../_container_registry_operations.py | 1074 +- .../azure/containerregistry/_models.py | 2 +- .../aio/_async_container_registry_client.py | 2 +- .../azure-containerregistry/setup.py | 2 +- .../azure-containerregistry/swagger/README.md | 3 +- .../azure-mgmt-containerregistry/CHANGELOG.md | 7 + .../azure-mgmt-containerregistry/_meta.json | 2 +- .../_container_registry_management_client.py | 37 + .../azure/mgmt/containerregistry/_version.py | 2 +- .../_container_registry_management_client.py | 37 + .../containerregistry/v2017_03_01/_version.py | 2 +- .../containerregistry/v2017_10_01/_version.py | 2 +- .../v2018_02_01_preview/_version.py | 2 +- .../containerregistry/v2018_09_01/_version.py | 2 +- .../containerregistry/v2019_04_01/_version.py | 2 +- .../containerregistry/v2019_05_01/_version.py | 2 +- .../v2019_05_01_preview/_version.py | 2 +- .../v2019_06_01_preview/_version.py | 2 +- .../v2019_12_01_preview/_version.py | 2 +- .../v2020_11_01_preview/_version.py | 2 +- .../v2021_06_01_preview/_version.py | 2 +- .../v2021_08_01_preview/__init__.py | 19 + .../v2021_08_01_preview/_configuration.py | 71 + .../_container_registry_management_client.py | 139 + .../v2021_08_01_preview/_metadata.json | 113 + .../v2021_08_01_preview/_version.py | 9 + .../v2021_08_01_preview/aio/__init__.py | 10 + .../v2021_08_01_preview/aio/_configuration.py | 67 + .../_container_registry_management_client.py | 132 + .../aio/operations/__init__.py | 33 + .../_connected_registries_operations.py | 699 + .../_export_pipelines_operations.py} | 354 +- .../_import_pipelines_operations.py | 432 + .../aio/operations/_operations.py} | 26 +- .../operations/_pipeline_runs_operations.py | 432 + ...private_endpoint_connections_operations.py | 433 + .../aio/operations/_registries_operations.py} | 982 +- .../operations/_replications_operations.py | 568 + .../aio/operations/_scope_maps_operations.py} | 539 +- .../aio/operations/_tokens_operations.py} | 539 +- .../aio/operations/_webhooks_operations.py | 773 + .../v2021_08_01_preview/models/__init__.py | 402 + ...tainer_registry_management_client_enums.py | 303 + .../v2021_08_01_preview/models/_models.py | 3676 ++ .../v2021_08_01_preview/models/_models_py3.py | 4079 ++ .../operations/__init__.py | 33 + .../_connected_registries_operations.py | 713 + .../_export_pipelines_operations.py} | 356 +- .../_import_pipelines_operations.py | 442 + .../operations/_operations.py} | 26 +- .../operations/_pipeline_runs_operations.py | 442 + ...rivate_endpoint_connections_operations.py} | 428 +- .../operations/_registries_operations.py} | 991 +- .../operations/_replications_operations.py | 580 + .../operations/_scope_maps_operations.py} | 541 +- .../operations/_tokens_operations.py} | 541 +- .../operations/_webhooks_operations.py | 788 + .../v2021_08_01_preview}/py.typed | 0 sdk/containerregistry/tests.yml | 2 - .../azure-mgmt-containerservice/CHANGELOG.md | 12 + .../azure-mgmt-containerservice/_meta.json | 2 +- .../_container_service_client.py | 30 +- .../azure/mgmt/containerservice/_version.py | 2 +- .../aio/_container_service_client.py | 30 +- .../azure/mgmt/containerservice/models.py | 2 +- .../v2021_08_01/models/_models.py | 18 +- .../v2021_08_01/models/_models_py3.py | 18 +- .../containerservice/v2021_09_01/__init__.py | 16 + .../v2021_09_01/_configuration.py | 70 + .../v2021_09_01/_container_service_client.py | 124 + .../v2021_09_01/_metadata.json | 110 + .../v2021_09_01/aio/__init__.py | 10 + .../v2021_09_01/aio/_configuration.py | 66 + .../aio/_container_service_client.py | 117 + .../v2021_09_01/aio/operations/__init__.py | 27 + .../operations/_agent_pools_operations.py} | 640 +- .../_maintenance_configurations_operations.py | 315 + .../_managed_clusters_operations.py} | 1488 +- .../v2021_09_01/aio/operations/_operations.py | 106 + ...private_endpoint_connections_operations.py | 358 + .../_private_link_resources_operations.py | 102 + ...olve_private_link_service_id_operations.py | 109 + .../aio/operations/_snapshots_operations.py | 439 + .../v2021_09_01/models/__init__.py | 342 + .../models/_container_service_client_enums.py | 584 + .../v2021_09_01/models/_models.py | 3899 ++ .../v2021_09_01/models/_models_py3.py | 4362 ++ .../v2021_09_01/operations/__init__.py | 27 + .../operations/_agent_pools_operations.py} | 644 +- .../_maintenance_configurations_operations.py | 323 + .../_managed_clusters_operations.py} | 1491 +- .../v2021_09_01/operations/_operations.py | 111 + ...private_endpoint_connections_operations.py | 367 + .../_private_link_resources_operations.py | 107 + ...olve_private_link_service_id_operations.py | 114 + .../operations/_snapshots_operations.py | 449 + .../containerservice/v2021_09_01}/py.typed | 0 .../tests/conftest.py | 1 + sdk/core/azure-core/CHANGELOG.md | 46 +- .../azure-core/CLIENT_LIBRARY_DEVELOPER.md | 201 +- sdk/core/azure-core/README.md | 15 +- .../azure-core/azure/core/_pipeline_client.py | 4 +- .../azure/core/_pipeline_client_async.py | 4 +- sdk/core/azure-core/azure/core/_version.py | 2 +- sdk/core/azure-core/azure/core/exceptions.py | 19 +- .../azure-core/azure/core/pipeline/_base.py | 4 +- .../core/pipeline/policies/_authentication.py | 16 +- .../policies/_authentication_async.py | 6 +- .../azure/core/pipeline/policies/_base.py | 9 +- .../pipeline/policies/_distributed_tracing.py | 5 +- .../core/pipeline/policies/_universal.py | 16 +- .../azure/core/pipeline/transport/_aiohttp.py | 28 +- .../pipeline/transport/_requests_asyncio.py | 28 +- .../pipeline/transport/_requests_basic.py | 45 +- .../core/pipeline/transport/_requests_trio.py | 28 +- .../azure/core/polling/async_base_polling.py | 1 - .../azure/core/polling/base_polling.py | 2 - .../azure-core/azure/core/rest/_aiohttp.py | 11 +- .../azure-core/azure/core/rest/_helpers.py | 19 +- .../azure/core/rest/_http_response_impl.py | 12 +- .../core/rest/_http_response_impl_async.py | 10 +- .../azure/core/rest/_requests_basic.py | 3 +- sdk/core/azure-core/azure/core/rest/_rest.py | 17 +- .../azure-core/azure/core/rest/_rest_py3.py | 18 +- .../azure-core/azure/core/serialization.py | 80 +- .../utils/_pipeline_transport_rest_shared.py | 9 +- sdk/core/azure-core/doc/azure.core.rst | 3 - .../azure-core/samples/test_example_sansio.py | 14 - .../async_tests/test_basic_transport_async.py | 10 + .../test_content_length_checking_async.py | 28 + .../test_rest_asyncio_transport.py | 63 +- .../test_rest_http_response_async.py | 25 +- .../test_rest_stream_responses_async.py | 44 +- .../async_tests/test_rest_trio_transport.py | 64 +- .../azure-core/tests/test_basic_transport.py | 9 - .../tests/test_content_length_checking.py | 27 + .../tests/test_rest_http_request.py | 53 + .../tests/test_rest_stream_responses.py | 38 + sdk/core/azure-core/tests/test_streaming.py | 3 +- .../coretestserver/test_routes/encoding.py | 9 + .../coretestserver/test_routes/errors.py | 7 + .../azure-cosmos/azure/cosmos/container.py | 10 +- .../azure-cosmos/azure/cosmos/database.py | 2 +- .../samples/document_management.py | 14 +- sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md | 71 + sdk/cosmos/azure-mgmt-cosmosdb/_meta.json | 2 +- .../azure/mgmt/cosmosdb/_configuration.py | 2 +- .../cosmosdb/_cosmos_db_management_client.py | 11 +- .../azure/mgmt/cosmosdb/_metadata.json | 38 +- .../azure/mgmt/cosmosdb/_version.py | 2 +- .../azure/mgmt/cosmosdb/aio/_configuration.py | 2 +- .../aio/_cosmos_db_management_client.py | 11 +- .../mgmt/cosmosdb/aio/operations/__init__.py | 6 +- .../_cassandra_clusters_operations.py | 274 +- .../_cassandra_data_centers_operations.py | 10 +- .../_cassandra_resources_operations.py | 32 +- .../aio/operations/_collection_operations.py | 6 +- .../_collection_partition_operations.py | 4 +- ..._collection_partition_region_operations.py | 2 +- .../_collection_region_operations.py | 2 +- .../_database_account_region_operations.py | 2 +- .../_database_accounts_operations.py | 36 +- .../aio/operations/_database_operations.py | 6 +- .../_gremlin_resources_operations.py | 32 +- .../aio/operations/_locations_operations.py | 162 + .../_mongo_db_resources_operations.py | 172 +- .../_notebook_workspaces_operations.py | 14 +- .../cosmosdb/aio/operations/_operations.py | 2 +- .../_partition_key_range_id_operations.py | 2 +- ...artition_key_range_id_region_operations.py | 2 +- .../aio/operations/_percentile_operations.py | 2 +- .../_percentile_source_target_operations.py | 2 +- .../_percentile_target_operations.py | 2 +- ...private_endpoint_connections_operations.py | 8 +- .../_private_link_resources_operations.py | 4 +- ...restorable_database_accounts_operations.py | 6 +- ...storable_mongodb_collections_operations.py | 2 +- ...restorable_mongodb_databases_operations.py | 2 +- ...restorable_mongodb_resources_operations.py | 2 +- .../_restorable_sql_containers_operations.py | 2 +- .../_restorable_sql_databases_operations.py | 2 +- .../_restorable_sql_resources_operations.py | 2 +- .../operations/_sql_resources_operations.py | 74 +- .../operations/_table_resources_operations.py | 16 +- .../azure/mgmt/cosmosdb/models/__init__.py | 82 +- .../_cosmos_db_management_client_enums.py | 20 +- .../azure/mgmt/cosmosdb/models/_models.py | 3145 +- .../azure/mgmt/cosmosdb/models/_models_py3.py | 4159 +- .../mgmt/cosmosdb/operations/__init__.py | 6 +- .../_cassandra_clusters_operations.py | 275 +- .../_cassandra_data_centers_operations.py | 10 +- .../_cassandra_resources_operations.py | 32 +- .../operations/_collection_operations.py | 6 +- .../_collection_partition_operations.py | 4 +- ..._collection_partition_region_operations.py | 2 +- .../_collection_region_operations.py | 2 +- .../_database_account_region_operations.py | 2 +- .../_database_accounts_operations.py | 36 +- .../operations/_database_operations.py | 6 +- .../_gremlin_resources_operations.py | 32 +- .../operations/_locations_operations.py | 168 + .../_mongo_db_resources_operations.py | 174 +- .../_notebook_workspaces_operations.py | 14 +- .../mgmt/cosmosdb/operations/_operations.py | 2 +- .../_partition_key_range_id_operations.py | 2 +- ...artition_key_range_id_region_operations.py | 2 +- .../operations/_percentile_operations.py | 2 +- .../_percentile_source_target_operations.py | 2 +- .../_percentile_target_operations.py | 2 +- ...private_endpoint_connections_operations.py | 8 +- .../_private_link_resources_operations.py | 4 +- ...restorable_database_accounts_operations.py | 6 +- ...storable_mongodb_collections_operations.py | 2 +- ...restorable_mongodb_databases_operations.py | 2 +- ...restorable_mongodb_resources_operations.py | 2 +- .../_restorable_sql_containers_operations.py | 2 +- .../_restorable_sql_databases_operations.py | 2 +- .../_restorable_sql_resources_operations.py | 2 +- .../operations/_sql_resources_operations.py | 74 +- .../operations/_table_resources_operations.py | 16 +- sdk/cosmos/tests.yml | 1 - .../azure-mgmt-dataprotection/CHANGELOG.md | 5 + .../azure-mgmt-dataprotection/LICENSE.txt | 21 + .../azure-mgmt-dataprotection/MANIFEST.in | 6 + .../azure-mgmt-dataprotection/README.md | 27 + .../azure-mgmt-dataprotection/_meta.json | 11 + .../azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/dataprotection/__init__.py | 19 + .../mgmt/dataprotection/_configuration.py | 71 + .../dataprotection/_data_protection_client.py | 154 + .../azure/mgmt/dataprotection/_metadata.json | 116 + .../azure/mgmt/dataprotection/_version.py | 9 + .../azure/mgmt/dataprotection/aio/__init__.py | 10 + .../mgmt/dataprotection/aio/_configuration.py | 67 + .../aio/_data_protection_client.py | 147 + .../dataprotection/aio/operations/__init__.py | 39 + .../_backup_instances_operations.py} | 959 +- .../operations/_backup_policies_operations.py | 313 + ...ckup_vault_operation_results_operations.py | 111 + .../operations/_backup_vaults_operations.py | 616 + .../operations/_data_protection_operations.py | 105 + .../_data_protection_operations_operations.py | 104 + ...export_jobs_operation_result_operations.py | 107 + .../aio/operations/_export_jobs_operations.py | 156 + .../aio/operations/_jobs_operations.py} | 75 +- .../_operation_result_operations.py | 109 + .../_operation_status_operations.py} | 59 +- .../operations/_recovery_points_operations.py | 196 + .../operations/_resource_guards_operations.py | 1288 + .../_restorable_time_ranges_operations.py | 111 + .../mgmt/dataprotection/models/__init__.py | 403 + .../models/_data_protection_client_enums.py | 226 + .../mgmt/dataprotection/models/_models.py | 4205 ++ .../mgmt/dataprotection/models/_models_py3.py | 4595 ++ .../dataprotection/operations/__init__.py | 39 + .../_backup_instances_operations.py} | 962 +- .../operations/_backup_policies_operations.py | 321 + ...ckup_vault_operation_results_operations.py | 116 + .../operations/_backup_vaults_operations.py | 629 + .../operations/_data_protection_operations.py | 110 + .../_data_protection_operations_operations.py | 109 + ...export_jobs_operation_result_operations.py | 112 + .../operations/_export_jobs_operations.py | 162 + .../operations/_jobs_operations.py} | 75 +- .../_operation_result_operations.py | 114 + .../_operation_status_operations.py} | 59 +- .../_recovery_points_operations.py} | 88 +- .../operations/_resource_guards_operations.py | 1310 + .../_restorable_time_ranges_operations.py | 116 + .../azure/mgmt/dataprotection}/py.typed | 0 .../sdk_packaging.toml | 9 + .../azure-mgmt-dataprotection/setup.cfg | 2 + .../azure-mgmt-dataprotection/setup.py | 90 + sdk/dataprotection/ci.yml | 33 + .../CHANGELOG.md | 5 + .../LICENSE.txt | 21 + .../MANIFEST.in | 6 + .../README.md | 27 + .../_meta.json | 11 + .../azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../mgmt/desktopvirtualization/__init__.py | 19 + .../desktopvirtualization/_configuration.py | 71 + .../_desktop_virtualization_api_client.py | 153 + .../mgmt/desktopvirtualization/_metadata.json | 116 + .../mgmt/desktopvirtualization/_version.py | 9 + .../desktopvirtualization/aio/__init__.py | 10 + .../aio/_configuration.py | 67 + .../aio/_desktop_virtualization_api_client.py | 146 + .../aio/operations/__init__.py | 39 + .../_application_groups_operations.py | 442 + .../operations/_applications_operations.py | 384 + .../aio/operations/_desktops_operations.py | 251 + .../aio/operations/_host_pools_operations.py} | 429 +- .../aio/operations/_msix_images_operations.py | 127 + .../operations/_msix_packages_operations.py | 388 + .../aio/operations/_operations.py | 104 + ...private_endpoint_connections_operations.py | 578 + .../_private_link_resources_operations.py | 190 + .../operations/_scaling_plans_operations.py} | 289 +- .../operations/_session_hosts_operations.py | 320 + .../_start_menu_items_operations.py | 116 + .../operations/_user_sessions_operations.py | 471 + .../aio/operations/_workspaces_operations.py | 430 + .../desktopvirtualization/models/__init__.py | 261 + ...desktop_virtualization_api_client_enums.py | 327 + .../desktopvirtualization/models/_models.py | 3114 ++ .../models/_models_py3.py | 3469 ++ .../operations/__init__.py | 39 + .../_application_groups_operations.py | 452 + .../operations/_applications_operations.py | 393 + .../operations/_desktops_operations.py} | 232 +- .../operations/_host_pools_operations.py} | 430 +- .../operations/_msix_images_operations.py | 132 + .../operations/_msix_packages_operations.py | 397 + .../operations/_operations.py | 109 + ...private_endpoint_connections_operations.py | 590 + .../_private_link_resources_operations.py | 196 + .../operations/_scaling_plans_operations.py} | 289 +- .../operations/_session_hosts_operations.py | 328 + .../_start_menu_items_operations.py} | 38 +- .../operations/_user_sessions_operations.py | 481 + .../operations/_workspaces_operations.py | 440 + .../azure/mgmt/desktopvirtualization/py.typed | 1 + .../sdk_packaging.toml | 9 + .../setup.cfg | 2 + .../azure-mgmt-desktopvirtualization/setup.py | 90 + sdk/desktopvirtualization/ci.yml | 33 + .../azure-mgmt-deviceupdate/CHANGELOG.md | 28 + .../azure-mgmt-deviceupdate/MANIFEST.in | 1 + .../azure-mgmt-deviceupdate/_meta.json | 11 + .../azure/mgmt/deviceupdate/_device_update.py | 33 +- .../azure/mgmt/deviceupdate/_metadata.json | 78 +- .../azure/mgmt/deviceupdate/_version.py | 2 +- .../mgmt/deviceupdate/aio/_device_update.py | 32 +- .../deviceupdate/aio/operations/__init__.py | 6 + .../aio/operations/_accounts_operations.py | 121 +- .../operations/_device_update_operations.py | 80 + .../aio/operations/_instances_operations.py | 121 +- .../aio/operations/_operations.py | 4 +- ...private_endpoint_connections_operations.py | 434 + .../_private_link_resources_operations.py | 180 + .../mgmt/deviceupdate/models/__init__.py | 67 +- .../models/_device_update_enums.py | 64 + .../azure/mgmt/deviceupdate/models/_models.py | 620 +- .../mgmt/deviceupdate/models/_models_py3.py | 671 +- .../mgmt/deviceupdate/operations/__init__.py | 6 + .../operations/_accounts_operations.py | 104 +- .../operations/_device_update_operations.py | 85 + .../operations/_instances_operations.py | 108 +- .../deviceupdate/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 444 + .../_private_link_resources_operations.py} | 86 +- .../azure-mgmt-deviceupdate/setup.py | 2 +- sdk/digitaltwins/tests.yml | 11 +- sdk/eventgrid/azure-eventgrid/CHANGELOG.md | 4 +- sdk/eventgrid/azure-eventgrid/README.md | 13 + .../azure/eventgrid/_helpers.py | 18 +- .../azure/eventgrid/_publisher_client.py | 6 +- .../azure/eventgrid/_version.py | 2 +- .../eventgrid/aio/_publisher_client_async.py | 6 +- .../azure-eventgrid/dev_requirements.txt | 1 + .../sample_publish_cncf_cloud_events_async.py | 43 + .../sample_publish_cncf_cloud_events.py | 37 + .../azure-eventgrid/tests/conftest.py | 1 + ...ts.test_send_cloud_event_data_as_list.yaml | 38 + ...nd_cloud_event_data_base64_using_data.yaml | 38 + ...vents.test_send_cloud_event_data_dict.yaml | 38 + ...vents.test_send_cloud_event_data_none.yaml | 38 + ...events.test_send_cloud_event_data_str.yaml | 38 + ...send_cloud_event_data_with_extensions.yaml | 38 + ...nc.test_send_cloud_event_data_as_list.yaml | 28 + ...nd_cloud_event_data_base64_using_data.yaml | 28 + ...async.test_send_cloud_event_data_dict.yaml | 28 + ...async.test_send_cloud_event_data_none.yaml | 28 + ..._async.test_send_cloud_event_data_str.yaml | 28 + ...send_cloud_event_data_with_extensions.yaml | 28 + .../azure-eventgrid/tests/test_cncf_events.py | 110 + .../tests/test_cncf_events_async.py | 118 + .../tests/test_eg_publisher_client.py | 4 +- .../tests/test_eg_publisher_client_async.py | 4 +- .../azure-mgmt-eventgrid/CHANGELOG.md | 28 + sdk/eventgrid/azure-mgmt-eventgrid/_meta.json | 10 +- .../azure/mgmt/eventgrid/_configuration.py | 2 +- .../_event_grid_management_client.py | 33 +- .../azure/mgmt/eventgrid/_metadata.json | 11 +- .../azure/mgmt/eventgrid/_version.py | 2 +- .../mgmt/eventgrid/aio/_configuration.py | 2 +- .../aio/_event_grid_management_client.py | 33 +- .../mgmt/eventgrid/aio/operations/__init__.py | 14 +- .../operations/_domain_topics_operations.py | 8 +- .../aio/operations/_domains_operations.py | 16 +- .../_event_subscriptions_operations.py | 32 +- .../_extension_topics_operations.py | 2 +- .../eventgrid/aio/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 28 +- .../_private_link_resources_operations.py | 4 +- ...em_topic_event_subscriptions_operations.py | 14 +- .../operations/_system_topics_operations.py | 12 +- .../aio/operations/_topic_types_operations.py | 6 +- .../aio/operations/_topics_operations.py | 28 +- .../azure/mgmt/eventgrid/models/__init__.py | 120 +- .../_event_grid_management_client_enums.py | 109 +- .../azure/mgmt/eventgrid/models/_models.py | 1266 +- .../mgmt/eventgrid/models/_models_py3.py | 1457 +- .../mgmt/eventgrid/operations/__init__.py | 14 +- .../operations/_domain_topics_operations.py | 8 +- .../operations/_domains_operations.py | 16 +- .../_event_subscriptions_operations.py | 32 +- .../_extension_topics_operations.py | 2 +- .../mgmt/eventgrid/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 28 +- .../_private_link_resources_operations.py | 4 +- ...em_topic_event_subscriptions_operations.py | 14 +- .../operations/_system_topics_operations.py | 12 +- .../operations/_topic_types_operations.py | 6 +- .../operations/_topics_operations.py | 28 +- .../recordings/test_domain.test_domain.yaml | 111 +- .../azure-mgmt-eventgrid/tests/test_domain.py | 4 +- sdk/eventgrid/tests.yml | 1 - sdk/eventhub/azure-eventhub/CHANGELOG.md | 10 + .../azure-eventhub/azure/eventhub/_version.py | 2 +- sdk/eventhub/azure-mgmt-eventhub/CHANGELOG.md | 29 +- sdk/eventhub/azure-mgmt-eventhub/_meta.json | 2 +- .../eventhub/_event_hub_management_client.py | 49 +- .../azure/mgmt/eventhub/_version.py | 2 +- .../aio/_event_hub_management_client.py | 49 +- .../azure/mgmt/eventhub/models.py | 1 + .../mgmt/eventhub/v2015_08_01/_version.py | 2 +- .../mgmt/eventhub/v2017_04_01/_version.py | 2 +- .../eventhub/v2017_04_01/models/_models.py | 82 +- .../v2017_04_01/models/_models_py3.py | 82 +- .../eventhub/v2018_01_01_preview/_version.py | 2 +- .../v2018_01_01_preview/models/_models.py | 106 +- .../v2018_01_01_preview/models/_models_py3.py | 106 +- .../eventhub/v2021_01_01_preview/_version.py | 2 +- .../v2021_01_01_preview/models/_models.py | 74 +- .../v2021_01_01_preview/models/_models_py3.py | 74 +- .../eventhub/v2021_06_01_preview/_version.py | 2 +- .../v2021_06_01_preview/models/_models.py | 82 +- .../v2021_06_01_preview/models/_models_py3.py | 82 +- .../mgmt/eventhub/v2021_11_01/__init__.py | 19 + .../eventhub/v2021_11_01/_configuration.py | 71 + .../_event_hub_management_client.py | 134 + .../mgmt/eventhub/v2021_11_01/_metadata.json | 112 + .../mgmt/eventhub/v2021_11_01/_version.py | 9 + .../mgmt/eventhub/v2021_11_01/aio/__init__.py | 10 + .../v2021_11_01/aio/_configuration.py | 67 + .../aio/_event_hub_management_client.py | 127 + .../v2021_11_01/aio/operations/__init__.py | 31 + .../aio/operations/_clusters_operations.py | 720 + .../operations/_configuration_operations.py | 174 + .../operations/_consumer_groups_operations.py | 340 + .../_disaster_recovery_configs_operations.py | 714 + .../aio/operations/_event_hubs_operations.py | 752 + .../aio/operations/_namespaces_operations.py | 1202 + .../v2021_11_01/aio/operations/_operations.py | 105 + ...rivate_endpoint_connections_operations.py} | 319 +- .../_private_link_resources_operations.py | 100 + .../operations/_schema_registry_operations.py | 323 + .../eventhub/v2021_11_01/models/__init__.py | 213 + .../_event_hub_management_client_enums.py | 182 + .../eventhub/v2021_11_01/models/_models.py | 1974 + .../v2021_11_01/models/_models_py3.py | 2143 + .../v2021_11_01/operations/__init__.py | 31 + .../operations/_clusters_operations.py | 735 + .../operations/_configuration_operations.py | 180 + .../operations/_consumer_groups_operations.py | 348 + .../_disaster_recovery_configs_operations.py | 728 + .../operations/_event_hubs_operations.py | 766 + .../operations/_namespaces_operations.py | 1224 + .../v2021_11_01/operations/_operations.py | 110 + ...rivate_endpoint_connections_operations.py} | 319 +- .../_private_link_resources_operations.py | 105 + .../operations/_schema_registry_operations.py | 331 + .../azure/mgmt/eventhub/v2021_11_01/py.typed | 1 + sdk/eventhub/azure-mgmt-eventhub/tests.yml | 1 - sdk/eventhub/tests.yml | 2 - .../azure-ai-formrecognizer/CHANGELOG.md | 27 +- .../MIGRATION_GUIDE.md | 4 +- .../azure-ai-formrecognizer/README.md | 34 +- .../azure/ai/formrecognizer/__init__.py | 4 +- .../_document_analysis_client.py | 5 +- .../azure/ai/formrecognizer/_models.py | 89 +- .../azure/ai/formrecognizer/_version.py | 2 +- .../aio/_document_analysis_client_async.py | 6 +- .../azure-ai-formrecognizer/samples/README.md | 3 + .../v3.2-beta/advanced_samples/README.md | 26 + .../sample_get_elements_with_spans_async.py | 144 + .../sample_get_elements_with_spans.py | 136 + .../sample_analyze_business_cards_async.py | 1 + .../sample_analyze_general_documents_async.py | 14 +- .../sample_analyze_layout_async.py | 15 +- .../sample_analyze_receipts_async.py | 1 + .../sample_get_operations_async.py | 30 +- ...sample_get_words_on_document_line_async.py | 101 + .../sample_analyze_business_cards.py | 1 + .../sample_analyze_general_documents.py | 14 +- .../v3.2-beta/sample_analyze_layout.py | 15 +- .../v3.2-beta/sample_analyze_receipts.py | 1 + .../v3.2-beta/sample_get_operations.py | 25 +- .../sample_get_words_on_document_line.py | 93 + ....test_custom_document_signature_field.yaml | 654 + ..._forms.test_custom_document_transform.yaml | 171 +- ...stom_forms.test_pages_kwarg_specified.yaml | 165 +- ....test_custom_document_signature_field.yaml | 608 + ..._async.test_custom_document_transform.yaml | 190 +- ...orms_async.test_pages_kwarg_specified.yaml | 169 +- ...children.test_document_line_get_words.yaml | 343 + ...en.test_document_line_get_words_error.yaml | 343 + .../tests/test_custom_forms.py | 23 + .../tests/test_custom_forms_async.py | 24 + .../tests/test_get_children.py | 52 + .../tests/test_repr.py | 4 +- .../tests/test_to_dict_v3.py | 65 +- .../azure-ai-formrecognizer/tests/testcase.py | 21 +- sdk/formrecognizer/tests.yml | 1 - .../azure-mgmt-hybridkubernetes/CHANGELOG.md | 6 + .../azure-mgmt-hybridkubernetes/_meta.json | 11 +- .../mgmt/hybridkubernetes/_configuration.py | 2 +- .../mgmt/hybridkubernetes/_metadata.json | 4 +- .../azure/mgmt/hybridkubernetes/_version.py | 2 +- .../hybridkubernetes/aio/_configuration.py | 2 +- .../_connected_cluster_operations.py | 120 +- .../aio/operations/_operations.py | 4 +- .../mgmt/hybridkubernetes/models/__init__.py | 14 + .../_connected_kubernetes_client_enums.py | 7 + .../mgmt/hybridkubernetes/models/_models.py | 141 +- .../hybridkubernetes/models/_models_py3.py | 148 +- .../_connected_cluster_operations.py | 105 +- .../operations/_operations.py | 2 +- sdk/identity/azure-identity/CHANGELOG.md | 25 +- sdk/identity/azure-identity/README.md | 70 +- .../azure-identity/azure/identity/_version.py | 2 +- .../identity/aio/_internal/aad_client.py | 33 +- sdk/identity/azure-identity/setup.py | 2 +- .../tests/test_client_secret_credential.py | 17 +- .../test_client_secret_credential_async.py | 20 +- sdk/identity/tests.yml | 1 - sdk/iothub/azure-mgmt-iotcentral/CHANGELOG.md | 11 +- sdk/iothub/azure-mgmt-iotcentral/_meta.json | 11 +- .../azure/mgmt/iotcentral/_configuration.py | 2 +- .../azure/mgmt/iotcentral/_metadata.json | 4 +- .../azure/mgmt/iotcentral/_version.py | 2 +- .../mgmt/iotcentral/aio/_configuration.py | 2 +- .../aio/operations/_apps_operations.py | 54 +- .../iotcentral/aio/operations/_operations.py | 6 +- .../azure/mgmt/iotcentral/models/__init__.py | 7 + .../models/_iot_central_client_enums.py | 16 +- .../azure/mgmt/iotcentral/models/_models.py | 67 +- .../mgmt/iotcentral/models/_models_py3.py | 71 +- .../iotcentral/operations/_apps_operations.py | 30 +- .../mgmt/iotcentral/operations/_operations.py | 4 +- .../CHANGELOG.md | 11 +- .../administration/_internal/__init__.py | 3 +- .../_internal/async_challenge_auth_policy.py | 98 +- .../_internal/challenge_auth_policy.py | 121 +- .../_internal/http_challenge.py | 5 + .../azure/keyvault/administration/_version.py | 2 +- .../azure-keyvault-administration/setup.py | 2 +- .../azure-keyvault-certificates/CHANGELOG.md | 11 +- .../keyvault/certificates/_shared/__init__.py | 3 +- .../_shared/async_challenge_auth_policy.py | 98 +- .../_shared/challenge_auth_policy.py | 121 +- .../certificates/_shared/http_challenge.py | 5 + .../azure/keyvault/certificates/_version.py | 2 +- .../azure-keyvault-certificates/setup.py | 2 +- .../tests/test_certificates_client.py | 28 +- .../tests/test_certificates_client_async.py | 28 +- sdk/keyvault/azure-keyvault-keys/CHANGELOG.md | 21 +- .../azure/keyvault/keys/__init__.py | 2 - .../azure/keyvault/keys/_client.py | 24 +- .../azure/keyvault/keys/_models.py | 12 +- .../azure/keyvault/keys/_shared/__init__.py | 3 +- .../_shared/async_challenge_auth_policy.py | 98 +- .../keys/_shared/challenge_auth_policy.py | 121 +- .../keyvault/keys/_shared/http_challenge.py | 5 + .../azure/keyvault/keys/_version.py | 2 +- .../azure/keyvault/keys/aio/_client.py | 23 +- sdk/keyvault/azure-keyvault-keys/setup.py | 2 +- ...enant_authentication_7_3_preview_mhsm.yaml | 173 + ...nant_authentication_7_3_preview_vault.yaml | 190 + ...enant_authentication_2016_10_01_vault.yaml | 71 + ..._multitenant_authentication_7_0_vault.yaml | 71 + ..._multitenant_authentication_7_1_vault.yaml | 71 + ...t_multitenant_authentication_7_2_mhsm.yaml | 64 + ..._multitenant_authentication_7_2_vault.yaml | 71 + ...enant_authentication_7_3_preview_mhsm.yaml | 120 + ...nant_authentication_7_3_preview_vault.yaml | 129 + ...ent.test_key_release_7_3_preview_mhsm.yaml | 36 +- ...ync.test_key_release_7_3_preview_mhsm.yaml | 34 +- .../tests/test_challenge_auth.py | 149 +- .../tests/test_challenge_auth_async.py | 147 +- .../tests/test_key_client.py | 41 +- .../tests/test_keys_async.py | 41 +- .../azure-keyvault-secrets/CHANGELOG.md | 11 +- .../keyvault/secrets/_shared/__init__.py | 3 +- .../_shared/async_challenge_auth_policy.py | 98 +- .../secrets/_shared/challenge_auth_policy.py | 121 +- .../secrets/_shared/http_challenge.py | 5 + .../azure/keyvault/secrets/_version.py | 2 +- sdk/keyvault/azure-keyvault-secrets/setup.py | 2 +- .../tests/test_secrets_async.py | 26 +- .../tests/test_secrets_client.py | 26 +- sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md | 19 + sdk/keyvault/azure-mgmt-keyvault/_meta.json | 2 +- .../keyvault/_key_vault_management_client.py | 31 + .../azure/mgmt/keyvault/_version.py | 2 +- .../aio/_key_vault_management_client.py | 31 + .../mgmt/keyvault/v2016_10_01/_version.py | 2 +- .../mgmt/keyvault/v2018_02_14/_version.py | 2 +- .../mgmt/keyvault/v2019_09_01/_version.py | 2 +- .../keyvault/v2020_04_01_preview/_version.py | 2 +- .../keyvault/v2021_04_01_preview/_version.py | 2 +- .../keyvault/v2021_06_01_preview/__init__.py | 19 + .../v2021_06_01_preview/_configuration.py | 71 + .../_key_vault_management_client.py | 129 + .../v2021_06_01_preview/_metadata.json | 111 + .../keyvault/v2021_06_01_preview/_version.py | 9 + .../v2021_06_01_preview/aio/__init__.py | 10 + .../v2021_06_01_preview/aio/_configuration.py | 67 + .../aio/_key_vault_management_client.py | 122 + .../aio/operations/__init__.py | 29 + .../aio/operations/_keys_operations.py | 399 + .../operations/_managed_hsms_operations.py | 858 + ...private_endpoint_connections_operations.py | 387 + ..._mhsm_private_link_resources_operations.py | 99 + .../aio/operations/_operations.py | 10 +- ...private_endpoint_connections_operations.py | 387 + .../_private_link_resources_operations.py | 99 + .../aio/operations/_secrets_operations.py | 338 + .../aio/operations/_vaults_operations.py} | 768 +- .../v2021_06_01_preview/models/__init__.py | 294 + .../_key_vault_management_client_enums.py | 285 + .../v2021_06_01_preview/models/_models.py | 2859 ++ .../v2021_06_01_preview/models/_models_py3.py | 3148 ++ .../operations/__init__.py | 29 + .../operations/_keys_operations.py | 408 + .../operations/_managed_hsms_operations.py | 875 + ...private_endpoint_connections_operations.py | 396 + ..._mhsm_private_link_resources_operations.py | 104 + .../operations/_operations.py | 10 +- ...private_endpoint_connections_operations.py | 396 + .../_private_link_resources_operations.py | 104 + .../operations/_secrets_operations.py | 346 + .../operations/_vaults_operations.py} | 772 +- .../keyvault/v2021_06_01_preview/py.typed | 1 + sdk/keyvault/azure-mgmt-keyvault/tests.yml | 1 - .../test_cli_mgmt_keyvault.test_keyvault.yaml | 129 +- ...cli_mgmt_keyvault_async.test_keyvault.yaml | 1566 +- sdk/keyvault/test-resources.json | 14 +- sdk/keyvault/tests.yml | 2 - .../azure-loganalytics/CHANGELOG.md | 6 +- sdk/loganalytics/azure-loganalytics/README.md | 37 +- .../azure/loganalytics/version.py | 2 +- .../azure-loganalytics/sdk_packaging.toml | 2 + sdk/loganalytics/azure-loganalytics/setup.py | 2 +- .../CHANGELOG.md | 6 +- sdk/mixedreality/tests.yml | 4 +- sdk/modelsrepository/tests.yml | 1 - sdk/monitor/azure-mgmt-monitor/CHANGELOG.md | 114 + sdk/monitor/azure-mgmt-monitor/MANIFEST.in | 1 + sdk/monitor/azure-mgmt-monitor/_meta.json | 11 + .../azure/mgmt/monitor/_configuration.py | 9 +- .../monitor/_monitor_management_client.py | 136 +- .../azure/mgmt/monitor/_version.py | 2 +- .../azure/mgmt/monitor/aio/_configuration.py | 11 +- .../monitor/aio/_monitor_management_client.py | 138 +- .../azure/mgmt/monitor/models.py | 8 +- .../mgmt/monitor/v2015_04_01/__init__.py | 3 + .../monitor/v2015_04_01/_configuration.py | 6 +- .../mgmt/monitor/v2015_04_01/_metadata.json | 71 +- .../v2015_04_01/_monitor_management_client.py | 26 +- .../mgmt/monitor/v2015_04_01/_version.py | 9 + .../monitor/v2015_04_01/aio/_configuration.py | 6 +- .../aio/_monitor_management_client.py | 25 +- .../v2015_04_01/aio/operations/__init__.py | 2 + .../operations/_activity_logs_operations.py | 8 +- .../aio/operations/_alert_rules_operations.py | 438 + .../_autoscale_settings_operations.py | 48 +- .../_event_categories_operations.py | 6 +- .../v2015_04_01/aio/operations/_operations.py | 4 +- .../_tenant_activity_logs_operations.py | 15 +- .../monitor/v2015_04_01/models/__init__.py | 49 + .../monitor/v2015_04_01/models/_models.py | 789 +- .../monitor/v2015_04_01/models/_models_py3.py | 872 +- .../_monitor_management_client_enums.py | 21 + .../v2015_04_01/operations/__init__.py | 2 + .../operations/_activity_logs_operations.py | 6 +- .../operations/_alert_rules_operations.py | 448 + .../_autoscale_settings_operations.py | 36 +- .../_event_categories_operations.py | 4 +- .../v2015_04_01/operations/_operations.py | 2 +- .../_tenant_activity_logs_operations.py | 13 +- .../mgmt/monitor/v2015_07_01/__init__.py | 3 + .../monitor/v2015_07_01/_configuration.py | 10 +- .../mgmt/monitor/v2015_07_01/_metadata.json | 79 +- .../v2015_07_01/_monitor_management_client.py | 39 +- .../mgmt/monitor/v2015_07_01/_version.py | 9 + .../monitor/v2015_07_01/aio/_configuration.py | 10 +- .../aio/_monitor_management_client.py | 38 +- .../v2015_07_01/aio/operations/__init__.py | 6 + .../aio/operations/_alert_rules_operations.py | 438 + .../_metric_definitions_operations.py | 122 + .../v2015_07_01/aio/operations/_operations.py | 88 + ..._service_diagnostic_settings_operations.py | 6 +- .../monitor/v2015_07_01/models/__init__.py | 98 + .../monitor/v2015_07_01/models/_models.py | 1259 +- .../monitor/v2015_07_01/models/_models_py3.py | 1392 +- .../_monitor_management_client_enums.py | 69 + .../v2015_07_01/operations/__init__.py | 6 + .../operations/_alert_rules_operations.py | 448 + .../_metric_definitions_operations.py | 127 + .../v2015_07_01/operations/_operations.py | 93 + ..._service_diagnostic_settings_operations.py | 2 +- .../mgmt/monitor/v2016_03_01/__init__.py | 3 + .../monitor/v2016_03_01/_configuration.py | 5 +- .../mgmt/monitor/v2016_03_01/_metadata.json | 66 +- .../v2016_03_01/_monitor_management_client.py | 21 +- .../mgmt/monitor/v2016_03_01/_version.py | 9 + .../monitor/v2016_03_01/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- .../_alert_rule_incidents_operations.py | 10 +- .../aio/operations/_alert_rules_operations.py | 54 +- .../operations/_log_profiles_operations.py | 34 +- .../_metric_definitions_operations.py | 4 +- .../monitor/v2016_03_01/models/_models.py | 70 +- .../monitor/v2016_03_01/models/_models_py3.py | 87 +- .../_monitor_management_client_enums.py | 8 +- .../_alert_rule_incidents_operations.py | 6 +- .../operations/_alert_rules_operations.py | 42 +- .../operations/_log_profiles_operations.py | 24 +- .../_metric_definitions_operations.py | 2 +- .../mgmt/monitor/v2016_09_01/__init__.py | 3 + .../monitor/v2016_09_01/_configuration.py | 3 +- .../mgmt/monitor/v2016_09_01/_metadata.json | 60 +- .../v2016_09_01/_monitor_management_client.py | 16 + .../mgmt/monitor/v2016_09_01/_version.py | 9 + .../monitor/v2016_09_01/aio/_configuration.py | 3 +- .../aio/_monitor_management_client.py | 15 + .../aio/operations/_metrics_operations.py | 4 +- ..._service_diagnostic_settings_operations.py | 10 +- .../monitor/v2016_09_01/models/_models.py | 9 +- .../monitor/v2016_09_01/models/_models_py3.py | 9 +- .../_monitor_management_client_enums.py | 8 +- .../operations/_metrics_operations.py | 2 +- ..._service_diagnostic_settings_operations.py | 4 +- .../monitor/v2017_03_01_preview/__init__.py | 3 + .../v2017_03_01_preview/_configuration.py | 5 +- .../v2017_03_01_preview/_metadata.json | 66 +- .../_monitor_management_client.py | 21 +- .../monitor/v2017_03_01_preview/_version.py | 9 + .../v2017_03_01_preview/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- .../_activity_log_alerts_operations.py | 36 +- .../v2017_03_01_preview/models/_models.py | 16 +- .../v2017_03_01_preview/models/_models_py3.py | 16 +- .../_activity_log_alerts_operations.py | 24 +- .../mgmt/monitor/v2017_04_01/__init__.py | 3 + .../monitor/v2017_04_01/_configuration.py | 5 +- .../mgmt/monitor/v2017_04_01/_metadata.json | 66 +- .../v2017_04_01/_monitor_management_client.py | 21 +- .../mgmt/monitor/v2017_04_01/_version.py | 9 + .../monitor/v2017_04_01/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- .../operations/_action_groups_operations.py | 42 +- .../_activity_log_alerts_operations.py | 36 +- .../monitor/v2017_04_01/models/_models.py | 12 +- .../monitor/v2017_04_01/models/_models_py3.py | 12 +- .../operations/_action_groups_operations.py | 28 +- .../_activity_log_alerts_operations.py | 24 +- .../monitor/v2017_05_01_preview/__init__.py | 3 + .../v2017_05_01_preview/_configuration.py | 9 +- .../v2017_05_01_preview/_metadata.json | 72 +- .../_monitor_management_client.py | 24 +- .../monitor/v2017_05_01_preview/_version.py | 9 + .../v2017_05_01_preview/aio/_configuration.py | 9 +- .../aio/_monitor_management_client.py | 23 +- ...diagnostic_settings_category_operations.py | 12 +- .../_diagnostic_settings_operations.py | 24 +- .../_metric_definitions_operations.py | 4 +- .../aio/operations/_metrics_operations.py | 4 +- ...cription_diagnostic_settings_operations.py | 36 +- .../v2017_05_01_preview/models/_models.py | 53 +- .../v2017_05_01_preview/models/_models_py3.py | 58 +- .../_monitor_management_client_enums.py | 6 +- ...diagnostic_settings_category_operations.py | 8 +- .../_diagnostic_settings_operations.py | 16 +- .../_metric_definitions_operations.py | 2 +- .../operations/_metrics_operations.py | 2 +- ...cription_diagnostic_settings_operations.py | 28 +- .../monitor/v2017_11_01_preview/__init__.py | 3 + .../v2017_11_01_preview/_configuration.py | 3 +- .../v2017_11_01_preview/_metadata.json | 60 +- .../_monitor_management_client.py | 16 + .../monitor/v2017_11_01_preview/_version.py | 9 + .../v2017_11_01_preview/aio/_configuration.py | 3 +- .../aio/_monitor_management_client.py | 15 + .../operations/_metric_baseline_operations.py | 12 +- .../v2017_11_01_preview/models/_models.py | 8 +- .../v2017_11_01_preview/models/_models_py3.py | 9 +- .../operations/_metric_baseline_operations.py | 8 +- .../monitor/v2017_12_01_preview/__init__.py | 3 + .../v2017_12_01_preview/_configuration.py | 3 +- .../v2017_12_01_preview/_metadata.json | 60 +- .../_monitor_management_client.py | 16 + .../monitor/v2017_12_01_preview/_version.py | 9 + .../v2017_12_01_preview/aio/_configuration.py | 3 +- .../aio/_monitor_management_client.py | 15 + .../_metric_namespaces_operations.py | 4 +- .../v2017_12_01_preview/models/__init__.py | 5 + .../v2017_12_01_preview/models/_models.py | 9 +- .../v2017_12_01_preview/models/_models_py3.py | 14 +- .../_monitor_management_client_enums.py | 35 + .../_metric_namespaces_operations.py | 2 +- .../mgmt/monitor/v2018_01_01/__init__.py | 3 + .../monitor/v2018_01_01/_configuration.py | 3 +- .../mgmt/monitor/v2018_01_01/_metadata.json | 60 +- .../v2018_01_01/_monitor_management_client.py | 16 + .../mgmt/monitor/v2018_01_01/_version.py | 9 + .../monitor/v2018_01_01/aio/_configuration.py | 3 +- .../aio/_monitor_management_client.py | 15 + .../_metric_definitions_operations.py | 6 +- .../aio/operations/_metrics_operations.py | 31 +- .../monitor/v2018_01_01/models/__init__.py | 6 +- .../monitor/v2018_01_01/models/_models.py | 51 +- .../monitor/v2018_01_01/models/_models_py3.py | 61 +- .../_monitor_management_client_enums.py | 20 +- .../_metric_definitions_operations.py | 4 +- .../operations/_metrics_operations.py | 29 +- .../mgmt/monitor/v2018_03_01/__init__.py | 3 + .../monitor/v2018_03_01/_configuration.py | 5 +- .../mgmt/monitor/v2018_03_01/_metadata.json | 66 +- .../v2018_03_01/_monitor_management_client.py | 21 +- .../mgmt/monitor/v2018_03_01/_version.py | 9 + .../monitor/v2018_03_01/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- .../operations/_action_groups_operations.py | 42 +- .../operations/_metric_alerts_operations.py | 39 +- .../_metric_alerts_status_operations.py | 12 +- .../monitor/v2018_03_01/models/__init__.py | 4 +- .../monitor/v2018_03_01/models/_models.py | 73 +- .../monitor/v2018_03_01/models/_models_py3.py | 95 +- .../_monitor_management_client_enums.py | 3 +- .../operations/_action_groups_operations.py | 28 +- .../operations/_metric_alerts_operations.py | 27 +- .../_metric_alerts_status_operations.py | 8 +- .../mgmt/monitor/v2018_04_16/__init__.py | 3 + .../monitor/v2018_04_16/_configuration.py | 5 +- .../mgmt/monitor/v2018_04_16/_metadata.json | 66 +- .../v2018_04_16/_monitor_management_client.py | 21 +- .../mgmt/monitor/v2018_04_16/_version.py | 9 + .../monitor/v2018_04_16/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- .../_scheduled_query_rules_operations.py | 48 +- .../monitor/v2018_04_16/models/__init__.py | 3 + .../monitor/v2018_04_16/models/_models.py | 98 +- .../monitor/v2018_04_16/models/_models_py3.py | 102 +- .../_monitor_management_client_enums.py | 2 + .../_scheduled_query_rules_operations.py | 36 +- .../monitor/v2018_06_01_preview/__init__.py | 3 + .../v2018_06_01_preview/_configuration.py | 5 +- .../v2018_06_01_preview/_metadata.json | 66 +- .../_monitor_management_client.py | 21 +- .../monitor/v2018_06_01_preview/_version.py | 9 + .../v2018_06_01_preview/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- ...nostics_settings_association_operations.py | 28 +- .../_guest_diagnostics_settings_operations.py | 36 +- .../v2018_06_01_preview/models/_models.py | 32 +- .../v2018_06_01_preview/models/_models_py3.py | 32 +- ...nostics_settings_association_operations.py | 16 +- .../_guest_diagnostics_settings_operations.py | 24 +- .../mgmt/monitor/v2018_09_01/__init__.py | 3 + .../monitor/v2018_09_01/_configuration.py | 5 +- .../mgmt/monitor/v2018_09_01/_metadata.json | 66 +- .../v2018_09_01/_monitor_management_client.py | 21 +- .../mgmt/monitor/v2018_09_01/_version.py | 9 + .../monitor/v2018_09_01/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- .../operations/_action_groups_operations.py | 42 +- .../aio/operations/_baseline_operations.py | 10 +- .../operations/_metric_baseline_operations.py | 12 +- .../monitor/v2018_09_01/models/__init__.py | 7 + .../monitor/v2018_09_01/models/_models.py | 111 +- .../monitor/v2018_09_01/models/_models_py3.py | 128 +- .../_monitor_management_client_enums.py | 20 + .../operations/_action_groups_operations.py | 28 +- .../operations/_baseline_operations.py | 8 +- .../operations/_metric_baseline_operations.py | 8 +- .../monitor/v2018_11_27_preview/__init__.py | 3 + .../v2018_11_27_preview/_configuration.py | 3 +- .../v2018_11_27_preview/_metadata.json | 60 +- .../_monitor_management_client.py | 16 + .../monitor/v2018_11_27_preview/_version.py | 9 + .../v2018_11_27_preview/aio/_configuration.py | 3 +- .../aio/_monitor_management_client.py | 15 + .../aio/operations/_vm_insights_operations.py | 4 +- .../v2018_11_27_preview/models/_models.py | 4 +- .../v2018_11_27_preview/models/_models_py3.py | 4 +- .../operations/_vm_insights_operations.py | 2 +- .../mgmt/monitor/v2019_03_01/__init__.py | 3 + .../monitor/v2019_03_01/_configuration.py | 5 +- .../mgmt/monitor/v2019_03_01/_metadata.json | 66 +- .../v2019_03_01/_monitor_management_client.py | 21 +- .../mgmt/monitor/v2019_03_01/_version.py | 9 + .../monitor/v2019_03_01/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- .../operations/_action_groups_operations.py | 42 +- .../aio/operations/_baselines_operations.py | 31 +- .../monitor/v2019_03_01/models/__init__.py | 6 +- .../monitor/v2019_03_01/models/_models.py | 74 +- .../monitor/v2019_03_01/models/_models_py3.py | 76 +- .../operations/_action_groups_operations.py | 28 +- .../operations/_baselines_operations.py | 29 +- .../mgmt/monitor/v2019_06_01/__init__.py | 3 + .../monitor/v2019_06_01/_configuration.py | 5 +- .../mgmt/monitor/v2019_06_01/_metadata.json | 66 +- .../v2019_06_01/_monitor_management_client.py | 21 +- .../mgmt/monitor/v2019_06_01/_version.py | 9 + .../monitor/v2019_06_01/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- .../operations/_action_groups_operations.py | 42 +- .../monitor/v2019_06_01/models/__init__.py | 6 +- .../monitor/v2019_06_01/models/_models.py | 66 +- .../monitor/v2019_06_01/models/_models_py3.py | 66 +- .../operations/_action_groups_operations.py | 28 +- .../mgmt/monitor/v2019_10_17/__init__.py | 3 + .../monitor/v2019_10_17/_configuration.py | 5 +- .../mgmt/monitor/v2019_10_17/_metadata.json | 66 +- .../v2019_10_17/_monitor_management_client.py | 21 +- .../mgmt/monitor/v2019_10_17/_version.py | 9 + .../monitor/v2019_10_17/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- ...private_endpoint_connections_operations.py | 32 +- .../_private_link_resources_operations.py | 8 +- ..._link_scope_operation_status_operations.py | 4 +- ...rivate_link_scoped_resources_operations.py | 32 +- .../_private_link_scopes_operations.py | 32 +- .../monitor/v2019_10_17/models/_models.py | 14 +- .../monitor/v2019_10_17/models/_models_py3.py | 14 +- ...private_endpoint_connections_operations.py | 20 +- .../_private_link_resources_operations.py | 4 +- ..._link_scope_operation_status_operations.py | 2 +- ...rivate_link_scoped_resources_operations.py | 20 +- .../_private_link_scopes_operations.py | 18 +- .../monitor/v2019_11_01_preview/__init__.py | 3 + .../v2019_11_01_preview/_configuration.py | 3 +- .../v2019_11_01_preview/_metadata.json | 62 +- .../_monitor_management_client.py | 19 + .../monitor/v2019_11_01_preview/_version.py | 9 + .../v2019_11_01_preview/aio/_configuration.py | 3 +- .../aio/_monitor_management_client.py | 18 + ...collection_rule_associations_operations.py | 36 +- .../_data_collection_rules_operations.py | 42 +- .../v2019_11_01_preview/models/__init__.py | 24 +- .../v2019_11_01_preview/models/_models.py | 570 +- .../v2019_11_01_preview/models/_models_py3.py | 598 +- .../_monitor_management_client_enums.py | 61 +- ...collection_rule_associations_operations.py | 26 +- .../_data_collection_rules_operations.py | 30 +- .../monitor/v2020_01_01_preview/__init__.py | 3 + .../v2020_01_01_preview/_configuration.py | 3 +- .../v2020_01_01_preview/_metadata.json | 60 +- .../_monitor_management_client.py | 16 + .../monitor/v2020_01_01_preview/_version.py | 9 + .../v2020_01_01_preview/aio/_configuration.py | 3 +- .../aio/_monitor_management_client.py | 15 + ...nt_group_diagnostic_settings_operations.py | 16 +- .../v2020_01_01_preview/models/_models.py | 11 +- .../v2020_01_01_preview/models/_models_py3.py | 11 +- ...nt_group_diagnostic_settings_operations.py | 8 +- .../monitor/v2020_05_01_preview/__init__.py | 3 + .../v2020_05_01_preview/_configuration.py | 5 +- .../v2020_05_01_preview/_metadata.json | 66 +- .../_monitor_management_client.py | 21 +- .../monitor/v2020_05_01_preview/_version.py | 9 + .../v2020_05_01_preview/aio/_configuration.py | 5 +- .../aio/_monitor_management_client.py | 20 +- .../_scheduled_query_rules_operations.py | 36 +- .../v2020_05_01_preview/models/_models.py | 77 +- .../v2020_05_01_preview/models/_models_py3.py | 81 +- .../_scheduled_query_rules_operations.py | 24 +- .../mgmt/monitor/v2020_10_01/__init__.py | 19 + .../monitor/v2020_10_01}/_configuration.py | 11 +- .../mgmt/monitor/v2020_10_01/_metadata.json | 103 + .../v2020_10_01/_monitor_management_client.py | 88 + .../mgmt/monitor/v2020_10_01/_version.py | 9 + .../mgmt/monitor/v2020_10_01/aio/__init__.py | 10 + .../v2020_10_01}/aio/_configuration.py | 11 +- .../aio/_monitor_management_client.py | 81 + .../v2020_10_01/aio/operations/__init__.py | 13 + .../_activity_log_alerts_operations.py | 435 + .../monitor/v2020_10_01/models/__init__.py | 43 + .../monitor/v2020_10_01/models/_models.py | 344 + .../monitor/v2020_10_01/models/_models_py3.py | 379 + .../v2020_10_01/operations/__init__.py | 13 + .../_activity_log_alerts_operations.py | 445 + .../azure/mgmt/monitor/v2020_10_01/py.typed | 1 + .../mgmt/monitor/v2021_04_01/__init__.py | 19 + .../monitor/v2021_04_01/_configuration.py | 71 + .../mgmt/monitor/v2021_04_01/_metadata.json | 105 + .../v2021_04_01/_monitor_management_client.py | 98 + .../mgmt/monitor/v2021_04_01/_version.py | 9 + .../mgmt/monitor/v2021_04_01/aio/__init__.py | 10 + .../monitor/v2021_04_01/aio/_configuration.py | 67 + .../aio/_monitor_management_client.py | 91 + .../v2021_04_01/aio/operations/__init__.py | 17 + .../_data_collection_endpoints_operations.py | 455 + ...collection_rule_associations_operations.py | 384 + .../_data_collection_rules_operations.py | 455 + .../monitor/v2021_04_01/models/__init__.py | 158 + .../monitor/v2021_04_01/models/_models.py | 1386 + .../monitor/v2021_04_01/models/_models_py3.py | 1533 + .../_monitor_management_client_enums.py | 154 + .../v2021_04_01/operations/__init__.py | 17 + .../_data_collection_endpoints_operations.py | 465 + ...collection_rule_associations_operations.py | 393 + .../_data_collection_rules_operations.py | 465 + .../azure/mgmt/monitor/v2021_04_01/py.typed | 1 + .../monitor/v2021_05_01_preview/__init__.py | 19 + .../v2021_05_01_preview/_configuration.py | 71 + .../v2021_05_01_preview/_metadata.json | 108 + .../_monitor_management_client.py | 113 + .../monitor/v2021_05_01_preview/_version.py | 9 + .../v2021_05_01_preview/aio/__init__.py | 10 + .../v2021_05_01_preview/aio/_configuration.py | 67 + .../aio/_monitor_management_client.py | 106 + .../aio/operations/__init__.py | 23 + .../_autoscale_settings_operations.py | 434 + ...diagnostic_settings_category_operations.py | 170 + .../_diagnostic_settings_operations.py | 291 + ...nt_group_diagnostic_settings_operations.py | 291 + .../_predictive_metric_operations.py | 124 + ...cription_diagnostic_settings_operations.py | 279 + .../v2021_05_01_preview/models/__init__.py | 144 + .../v2021_05_01_preview/models/_models.py | 1535 + .../v2021_05_01_preview/models/_models_py3.py | 1706 + .../_monitor_management_client_enums.py | 125 + .../operations/__init__.py | 23 + .../_autoscale_settings_operations.py | 444 + ...diagnostic_settings_category_operations.py | 176 + .../_diagnostic_settings_operations.py | 299 + ...nt_group_diagnostic_settings_operations.py | 299 + .../_predictive_metric_operations.py | 129 + ...cription_diagnostic_settings_operations.py | 287 + .../mgmt/monitor/v2021_05_01_preview/py.typed | 1 + .../mgmt/monitor/v2021_09_01/__init__.py | 19 + .../monitor/v2021_09_01/_configuration.py | 71 + .../mgmt/monitor/v2021_09_01/_metadata.json | 103 + .../v2021_09_01/_monitor_management_client.py | 89 + .../mgmt/monitor/v2021_09_01/_version.py | 9 + .../mgmt/monitor/v2021_09_01/aio/__init__.py | 10 + .../monitor/v2021_09_01/aio/_configuration.py | 67 + .../aio/_monitor_management_client.py | 82 + .../v2021_09_01/aio/operations/__init__.py | 13 + .../operations/_action_groups_operations.py | 666 + .../monitor/v2021_09_01/models/__init__.py | 84 + .../monitor/v2021_09_01/models/_models.py | 961 + .../monitor/v2021_09_01/models/_models_py3.py | 1085 + .../_monitor_management_client_enums.py | 36 + .../v2021_09_01/operations/__init__.py | 13 + .../operations/_action_groups_operations.py | 680 + .../azure/mgmt/monitor/v2021_09_01/py.typed | 1 + .../azure-mgmt-monitor/dev_requirements.txt | 10 +- sdk/monitor/azure-mgmt-monitor/setup.py | 2 +- ...t_cli_mgmt_monitor.test_action_groups.yaml | 123 +- ...mgmt_monitor.test_activity_log_alerts.yaml | 44 +- ..._mgmt_monitor.test_autoscale_settings.yaml | 952 - ...st_cli_mgmt_monitor.test_log_profiles.yaml | 133 +- ...t_cli_mgmt_monitor.test_metric_alerts.yaml | 2471 - ...itor.test_monitor_diagnostic_settings.yaml | 681 +- ...mt_monitor.test_scheduled_query_rules.yaml | 221 +- .../tests/test_cli_mgmt_monitor.py | 29 +- .../tests/test_cli_mgmt_monitor_async.py | 18 +- .../tests/test_base_exporter.py | 5 + sdk/monitor/azure-monitor-query/CHANGELOG.md | 8 +- sdk/monitor/azure-monitor-query/README.md | 2 +- .../azure/monitor/query/_models.py | 2 +- .../azure-monitor-query/migration_guide.md | 100 + .../async_samples/sample_log_query_async.py | 22 +- .../sample_metric_definitions_async.py | 11 +- .../sample_metric_namespaces_async.py | 11 +- .../samples/sample_batch_query.py | 17 +- .../sample_log_query_multiple_workspaces.py | 12 +- .../sample_logs_query_key_value_form.py | 12 +- .../samples/sample_logs_single_query.py | 12 +- ...sample_logs_single_query_partial_result.py | 12 +- .../samples/sample_metric_definitions.py | 11 +- .../samples/sample_metric_namespaces.py | 11 +- .../samples/sample_metrics_query.py | 14 +- .../samples/sample_server_timeout.py | 14 +- .../sample_single_log_query_without_pandas.py | 9 +- .../tests/async/test_metrics_client_async.py | 37 + .../tests/test_metrics_client.py | 17 + sdk/network/azure-mgmt-network/CHANGELOG.md | 43 + sdk/network/azure-mgmt-network/_meta.json | 2 +- .../network/_network_management_client.py | 1315 +- .../azure/mgmt/network/_operations_mixin.py | 62 +- .../azure/mgmt/network/_version.py | 2 +- .../network/aio/_network_management_client.py | 1315 +- .../mgmt/network/aio/_operations_mixin.py | 62 +- .../azure/mgmt/network/models.py | 3 +- .../mgmt/network/v2015_06_15/_version.py | 2 +- .../mgmt/network/v2016_09_01/_version.py | 2 +- .../mgmt/network/v2016_12_01/_version.py | 2 +- .../mgmt/network/v2017_03_01/_version.py | 2 +- .../mgmt/network/v2017_06_01/_version.py | 2 +- .../mgmt/network/v2017_08_01/_metadata.json | 154 - .../v2017_08_01/_network_management_client.py | 255 - .../aio/_network_management_client.py | 248 - .../v2017_08_01/aio/operations/__init__.py | 81 - .../_default_security_rules_operations.py | 178 - .../_network_watchers_operations.py | 1505 - .../_public_ip_addresses_operations.py | 717 - .../_virtual_network_peerings_operations.py | 429 - .../network/v2017_08_01/models/__init__.py | 717 - .../network/v2017_08_01/models/_models.py | 7796 --- .../network/v2017_08_01/models/_models_py3.py | 8826 ---- .../_network_management_client_enums.py | 623 - .../v2017_08_01/operations/__init__.py | 81 - ...ress_route_service_providers_operations.py | 113 - .../_network_watchers_operations.py | 1532 - .../_public_ip_addresses_operations.py | 731 - .../_route_filter_rules_operations.py | 573 - .../operations/_usages_operations.py | 117 - .../mgmt/network/v2017_09_01/_metadata.json | 156 - .../v2017_09_01/_network_management_client.py | 265 - .../aio/_network_management_client.py | 258 - .../v2017_09_01/aio/operations/__init__.py | 85 - .../_default_security_rules_operations.py | 178 - ...ress_route_service_providers_operations.py | 108 - ...r_frontend_ip_configurations_operations.py | 178 - ..._interface_ip_configurations_operations.py | 178 - .../_virtual_network_gateways_operations.py | 1589 - .../network/v2017_09_01/models/__init__.py | 783 - .../network/v2017_09_01/models/_models.py | 8524 ---- .../network/v2017_09_01/models/_models_py3.py | 9654 ---- .../_network_management_client_enums.py | 624 - .../v2017_09_01/operations/__init__.py | 85 - .../_default_security_rules_operations.py | 184 - ..._interface_ip_configurations_operations.py | 184 - .../_network_security_groups_operations.py | 615 - .../_virtual_network_gateways_operations.py | 1618 - .../mgmt/network/v2017_10_01/_version.py | 2 +- .../mgmt/network/v2017_11_01/_metadata.json | 157 - .../v2017_11_01/_network_management_client.py | 270 - .../aio/_network_management_client.py | 263 - .../v2017_11_01/aio/operations/__init__.py | 87 - ...route_circuit_authorizations_operations.py | 429 - ...ress_route_service_providers_operations.py | 108 - ...r_frontend_ip_configurations_operations.py | 178 - ..._interface_ip_configurations_operations.py | 178 - ...ork_interface_load_balancers_operations.py | 116 - .../aio/operations/_usages_operations.py | 112 - .../_virtual_network_peerings_operations.py | 429 - .../network/v2017_11_01/models/__init__.py | 817 - .../network/v2017_11_01/models/_models.py | 8913 ---- .../network/v2017_11_01/models/_models_py3.py | 10098 ---- .../_network_management_client_enums.py | 640 - .../v2017_11_01/operations/__init__.py | 87 - .../_default_security_rules_operations.py | 184 - ...route_circuit_authorizations_operations.py | 439 - ...ress_route_service_providers_operations.py | 113 - ...r_frontend_ip_configurations_operations.py | 184 - ..._interface_ip_configurations_operations.py | 184 - .../operations/_usages_operations.py | 117 - .../mgmt/network/v2018_01_01/_version.py | 2 +- .../mgmt/network/v2018_02_01/_version.py | 2 +- .../mgmt/network/v2018_04_01/_version.py | 2 +- .../mgmt/network/v2018_06_01/_version.py | 2 +- .../mgmt/network/v2018_07_01/_version.py | 2 +- .../mgmt/network/v2018_08_01/_version.py | 2 +- .../mgmt/network/v2018_10_01/_version.py | 2 +- .../mgmt/network/v2018_11_01/_version.py | 2 +- .../mgmt/network/v2018_12_01/_version.py | 2 +- .../mgmt/network/v2019_02_01/_version.py | 2 +- .../mgmt/network/v2019_04_01/_version.py | 2 +- .../mgmt/network/v2019_06_01/_version.py | 2 +- .../mgmt/network/v2019_07_01/_version.py | 2 +- .../mgmt/network/v2019_08_01/_version.py | 2 +- .../mgmt/network/v2019_09_01/_version.py | 2 +- .../mgmt/network/v2019_11_01/_version.py | 2 +- .../mgmt/network/v2019_12_01/_version.py | 2 +- .../mgmt/network/v2020_03_01/_version.py | 2 +- .../mgmt/network/v2020_04_01/_version.py | 2 +- .../mgmt/network/v2020_05_01/_version.py | 2 +- .../mgmt/network/v2020_06_01/_version.py | 2 +- .../mgmt/network/v2020_07_01/_version.py | 2 +- .../mgmt/network/v2020_08_01/_version.py | 2 +- .../mgmt/network/v2020_11_01/_version.py | 2 +- .../mgmt/network/v2021_02_01/_version.py | 2 +- .../__init__.py | 0 .../_configuration.py | 1 + .../v2021_02_01_preview/_metadata.json | 121 + .../_network_management_client.py | 178 + .../network/v2021_02_01_preview/_version.py | 9 + .../aio/__init__.py | 0 .../aio/_configuration.py | 1 + .../aio/_network_management_client.py | 171 + .../aio/operations/__init__.py | 49 + ..._connectivity_configurations_operations.py | 107 + ..._active_security_admin_rules_operations.py | 107 + .../_active_security_user_rules_operations.py | 107 + .../_admin_rule_collections_operations.py | 343 + .../aio/operations/_admin_rules_operations.py | 360 + ..._connectivity_configurations_operations.py | 327 + ..._connectivity_configurations_operations.py | 107 + .../_effective_virtual_networks_operations.py | 190 + .../operations/_network_groups_operations.py | 334 + .../_network_manager_commits_operations.py | 107 + ...rk_manager_deployment_status_operations.py | 107 + ...fective_security_admin_rules_operations.py | 107 + .../_network_managers_operations.py | 453 + ..._network_security_perimeters_operations.py | 387 + ...er_associable_resource_types_operations.py | 96 + ...ecurity_admin_configurations_operations.py | 325 + ...security_user_configurations_operations.py | 325 + .../_user_rule_collections_operations.py | 343 + .../aio/operations/_user_rules_operations.py | 360 + .../v2021_02_01_preview/models/__init__.py | 233 + .../v2021_02_01_preview/models/_models.py | 2956 ++ .../v2021_02_01_preview/models/_models_py3.py | 3281 ++ .../_network_management_client_enums.py | 180 + .../operations/__init__.py | 49 + ..._connectivity_configurations_operations.py | 112 + ..._active_security_admin_rules_operations.py | 112 + .../_active_security_user_rules_operations.py | 112 + .../_admin_rule_collections_operations.py | 351 + .../operations/_admin_rules_operations.py | 368 + ..._connectivity_configurations_operations.py | 335 + ..._connectivity_configurations_operations.py | 112 + .../_effective_virtual_networks_operations.py | 196 + .../operations/_network_groups_operations.py | 342 + .../_network_manager_commits_operations.py | 112 + ...rk_manager_deployment_status_operations.py | 112 + ...fective_security_admin_rules_operations.py | 112 + .../_network_managers_operations.py | 463 + ..._network_security_perimeters_operations.py | 396 + ...er_associable_resource_types_operations.py | 101 + ...ecurity_admin_configurations_operations.py | 333 + ...security_user_configurations_operations.py | 333 + .../_user_rule_collections_operations.py | 351 + .../operations/_user_rules_operations.py | 368 + .../mgmt/network/v2021_02_01_preview/py.typed | 1 + .../{v2017_09_01 => v2021_05_01}/__init__.py | 0 .../_configuration.py | 0 .../mgmt/network/v2021_05_01/_metadata.json | 364 + .../v2021_05_01/_network_management_client.py | 645 + .../mgmt/network/v2021_05_01/_version.py | 9 + .../aio/__init__.py | 0 .../aio/_configuration.py | 0 .../aio/_network_management_client.py | 638 + .../v2021_05_01/aio/operations/__init__.py | 237 + ...private_endpoint_connections_operations.py | 429 + ...eway_private_link_resources_operations.py} | 32 +- .../_application_gateways_operations.py | 443 +- ..._application_security_groups_operations.py | 94 +- .../_available_delegations_operations.py} | 24 +- ..._available_endpoint_services_operations.py | 6 +- ...lable_private_endpoint_types_operations.py | 188 + ..._resource_group_delegations_operations.py} | 32 +- .../_available_service_aliases_operations.py} | 130 +- .../_azure_firewall_fqdn_tags_operations.py} | 26 +- .../_azure_firewalls_operations.py} | 219 +- .../operations/_bastion_hosts_operations.py} | 219 +- .../_bgp_service_communities_operations.py | 6 +- .../_connection_monitors_operations.py | 149 +- .../_custom_ip_prefixes_operations.py} | 252 +- .../_ddos_custom_policies_operations.py | 403 + .../_ddos_protection_plans_operations.py | 540 + .../_default_security_rules_operations.py | 14 +- .../_dscp_configuration_operations.py} | 327 +- ...route_circuit_authorizations_operations.py | 30 +- ...s_route_circuit_connections_operations.py} | 124 +- ...press_route_circuit_peerings_operations.py | 32 +- .../_express_route_circuits_operations.py | 166 +- .../_express_route_connections_operations.py | 414 + ...e_cross_connection_peerings_operations.py} | 262 +- ...ess_route_cross_connections_operations.py} | 736 +- .../_express_route_gateways_operations.py | 570 + .../_express_route_links_operations.py | 178 + ...xpress_route_ports_locations_operations.py | 165 + .../_express_route_ports_operations.py} | 342 +- ...ress_route_service_providers_operations.py | 8 +- .../_firewall_policies_operations.py} | 148 +- ...dps_signatures_filter_values_operations.py | 105 + ...ewall_policy_idps_signatures_operations.py | 105 + ...cy_idps_signatures_overrides_operations.py | 282 + ...licy_rule_collection_groups_operations.py} | 178 +- .../aio/operations/_flow_logs_operations.py} | 331 +- .../_hub_route_tables_operations.py} | 232 +- ..._virtual_network_connections_operations.py | 431 + .../_inbound_nat_rules_operations.py | 46 +- .../_inbound_security_rule_operations.py | 179 + .../operations/_ip_allocations_operations.py | 545 + .../aio/operations/_ip_groups_operations.py | 552 + ...ancer_backend_address_pools_operations.py} | 303 +- ...r_frontend_ip_configurations_operations.py | 14 +- ...alancer_load_balancing_rules_operations.py | 14 +- ..._balancer_network_interfaces_operations.py | 8 +- ...oad_balancer_outbound_rules_operations.py} | 50 +- .../_load_balancer_probes_operations.py | 14 +- .../operations/_load_balancers_operations.py} | 613 +- .../_local_network_gateways_operations.py | 122 +- .../operations/_nat_gateways_operations.py | 546 + .../aio/operations/_nat_rules_operations.py} | 354 +- ..._interface_ip_configurations_operations.py | 14 +- ...ork_interface_load_balancers_operations.py | 8 +- ...nterface_tap_configurations_operations.py} | 178 +- .../_network_interfaces_operations.py | 399 +- .../_network_management_client_operations.py} | 938 +- .../_network_profiles_operations.py | 487 + .../_network_security_groups_operations.py | 130 +- .../_network_virtual_appliances_operations.py | 545 + .../_network_watchers_operations.py | 349 +- .../aio/operations/_operations.py | 6 +- .../_p2_svpn_gateways_operations.py | 1208 + .../operations/_packet_captures_operations.py | 60 +- ...s_route_circuit_connections_operations.py} | 166 +- .../_private_dns_zone_groups_operations.py | 432 + .../_private_endpoints_operations.py | 484 + .../_private_link_services_operations.py} | 994 +- .../_public_ip_addresses_operations.py | 392 +- .../_public_ip_prefixes_operations.py | 545 + .../_resource_navigation_links_operations.py | 103 + .../_route_filter_rules_operations.py} | 225 +- .../operations/_route_filters_operations.py | 124 +- .../operations/_route_tables_operations.py | 130 +- .../aio/operations/_routes_operations.py | 30 +- .../operations/_routing_intent_operations.py} | 267 +- ..._security_partner_providers_operations.py} | 253 +- .../operations/_security_rules_operations.py | 30 +- .../_service_association_links_operations.py | 103 + .../_service_endpoint_policies_operations.py} | 266 +- ..._endpoint_policy_definitions_operations.py | 435 + .../_service_tag_information_operations.py | 124 + .../operations/_service_tags_operations.py} | 53 +- .../aio/operations/_subnets_operations.py} | 391 +- .../aio/operations/_usages_operations.py | 8 +- .../_virtual_appliance_sites_operations.py} | 178 +- .../_virtual_appliance_skus_operations.py | 162 + .../_virtual_hub_bgp_connection_operations.py | 356 + ..._virtual_hub_bgp_connections_operations.py | 364 + ...irtual_hub_ip_configuration_operations.py} | 350 +- ...irtual_hub_route_table_v2_s_operations.py} | 329 +- .../operations/_virtual_hubs_operations.py | 662 + ...network_gateway_connections_operations.py} | 845 +- ...al_network_gateway_nat_rules_operations.py | 431 + .../_virtual_network_gateways_operations.py | 997 +- .../_virtual_network_peerings_operations.py | 38 +- .../_virtual_network_taps_operations.py} | 211 +- .../_virtual_networks_operations.py | 147 +- .../_virtual_router_peerings_operations.py | 435 + .../_virtual_routers_operations.py} | 176 +- .../operations/_virtual_wans_operations.py | 540 + .../_vpn_connections_operations.py} | 473 +- .../operations/_vpn_gateways_operations.py} | 732 +- .../_vpn_link_connections_operations.py | 377 + ..._associated_with_virtual_wan_operations.py | 160 + .../_vpn_server_configurations_operations.py | 544 + .../_vpn_site_link_connections_operations.py | 107 + .../operations/_vpn_site_links_operations.py} | 164 +- .../_vpn_sites_configuration_operations.py | 162 + .../aio/operations/_vpn_sites_operations.py | 540 + ...pplication_firewall_policies_operations.py | 416 + .../operations/_web_categories_operations.py | 167 + .../network/v2021_05_01/models/__init__.py | 2132 + .../network/v2021_05_01/models/_models.py | 24239 +++++++++ .../network/v2021_05_01/models/_models_py3.py | 26986 ++++++++++ .../_network_management_client_enums.py | 1488 + .../v2021_05_01/operations/__init__.py | 237 + ...private_endpoint_connections_operations.py | 439 + ...eway_private_link_resources_operations.py} | 32 +- .../_application_gateways_operations.py | 449 +- ..._application_security_groups_operations.py | 95 +- .../_available_delegations_operations.py} | 24 +- ..._available_endpoint_services_operations.py | 6 +- ...lable_private_endpoint_types_operations.py | 194 + ..._resource_group_delegations_operations.py} | 32 +- .../_available_service_aliases_operations.py | 192 + .../_azure_firewall_fqdn_tags_operations.py} | 26 +- .../_azure_firewalls_operations.py} | 219 +- .../operations/_bastion_hosts_operations.py} | 219 +- .../_bgp_service_communities_operations.py | 6 +- .../_connection_monitors_operations.py | 150 +- .../_custom_ip_prefixes_operations.py} | 253 +- .../_ddos_custom_policies_operations.py | 413 + .../_ddos_protection_plans_operations.py | 552 + .../_default_security_rules_operations.py | 14 +- .../_dscp_configuration_operations.py} | 329 +- ...route_circuit_authorizations_operations.py | 30 +- ...s_route_circuit_connections_operations.py} | 124 +- ...press_route_circuit_peerings_operations.py | 32 +- .../_express_route_circuits_operations.py | 167 +- .../_express_route_connections_operations.py | 424 + ...e_cross_connection_peerings_operations.py} | 264 +- ...ess_route_cross_connections_operations.py} | 741 +- .../_express_route_gateways_operations.py | 583 + .../_express_route_links_operations.py | 184 + ...xpress_route_ports_locations_operations.py | 171 + .../_express_route_ports_operations.py | 619 + ...ress_route_service_providers_operations.py | 8 +- .../_firewall_policies_operations.py} | 148 +- ...dps_signatures_filter_values_operations.py | 110 + ...ewall_policy_idps_signatures_operations.py | 110 + ...cy_idps_signatures_overrides_operations.py | 290 + ...licy_rule_collection_groups_operations.py} | 178 +- .../operations/_flow_logs_operations.py} | 332 +- .../_hub_route_tables_operations.py} | 232 +- ..._virtual_network_connections_operations.py | 441 + .../_inbound_nat_rules_operations.py | 46 +- .../_inbound_security_rule_operations.py | 185 + .../operations/_ip_allocations_operations.py | 557 + .../operations/_ip_groups_operations.py | 564 + ...ancer_backend_address_pools_operations.py} | 305 +- ...r_frontend_ip_configurations_operations.py | 14 +- ...alancer_load_balancing_rules_operations.py | 14 +- ..._balancer_network_interfaces_operations.py | 8 +- ...oad_balancer_outbound_rules_operations.py} | 50 +- .../_load_balancer_probes_operations.py | 14 +- .../operations/_load_balancers_operations.py} | 618 +- .../_local_network_gateways_operations.py | 123 +- .../operations/_nat_gateways_operations.py | 558 + .../operations/_nat_rules_operations.py} | 265 +- ..._interface_ip_configurations_operations.py | 14 +- ...ork_interface_load_balancers_operations.py | 8 +- ...nterface_tap_configurations_operations.py} | 178 +- .../_network_interfaces_operations.py | 403 +- .../_network_management_client_operations.py} | 944 +- .../_network_profiles_operations.py | 498 + .../_network_security_groups_operations.py | 131 +- .../_network_virtual_appliances_operations.py | 557 + .../_network_watchers_operations.py | 351 +- .../operations/_operations.py | 6 +- .../_p2_svpn_gateways_operations.py | 1231 + .../operations/_packet_captures_operations.py | 60 +- ...s_route_circuit_connections_operations.py} | 168 +- .../_private_dns_zone_groups_operations.py | 442 + .../_private_endpoints_operations.py | 495 + .../_private_link_services_operations.py} | 1002 +- .../_public_ip_addresses_operations.py | 396 +- .../_public_ip_prefixes_operations.py | 557 + .../_resource_navigation_links_operations.py | 108 + .../_route_filter_rules_operations.py} | 181 +- .../operations/_route_filters_operations.py | 125 +- .../operations/_route_tables_operations.py | 131 +- .../operations/_routes_operations.py | 30 +- .../operations/_routing_intent_operations.py} | 267 +- ..._security_partner_providers_operations.py} | 254 +- .../operations/_security_rules_operations.py | 30 +- .../_service_association_links_operations.py | 108 + .../_service_endpoint_policies_operations.py} | 267 +- ..._endpoint_policy_definitions_operations.py | 445 + .../_service_tag_information_operations.py | 129 + .../operations/_service_tags_operations.py} | 53 +- .../operations/_subnets_operations.py} | 391 +- .../operations/_usages_operations.py | 8 +- .../_virtual_appliance_sites_operations.py} | 178 +- .../_virtual_appliance_skus_operations.py | 168 + .../_virtual_hub_bgp_connection_operations.py | 365 + ..._virtual_hub_bgp_connections_operations.py | 373 + ...irtual_hub_ip_configuration_operations.py} | 352 +- ...virtual_hub_route_table_v2_s_operations.py | 445 + .../operations/_virtual_hubs_operations.py | 676 + ...network_gateway_connections_operations.py} | 849 +- ...l_network_gateway_nat_rules_operations.py} | 352 +- .../_virtual_network_gateways_operations.py | 1011 +- .../_virtual_network_peerings_operations.py | 38 +- .../_virtual_network_taps_operations.py} | 212 +- .../_virtual_networks_operations.py | 148 +- .../_virtual_router_peerings_operations.py | 445 + .../_virtual_routers_operations.py} | 176 +- .../operations/_virtual_wans_operations.py | 552 + .../_vpn_connections_operations.py} | 475 +- .../operations/_vpn_gateways_operations.py} | 736 +- .../_vpn_link_connections_operations.py | 386 + ..._associated_with_virtual_wan_operations.py | 166 + .../_vpn_server_configurations_operations.py | 556 + .../_vpn_site_link_connections_operations.py | 112 + .../operations/_vpn_site_links_operations.py} | 166 +- .../_vpn_sites_configuration_operations.py | 168 + .../operations/_vpn_sites_operations.py | 552 + ...pplication_firewall_policies_operations.py | 426 + .../operations/_web_categories_operations.py | 173 + .../azure/mgmt/network/v2021_05_01/py.typed | 1 + ...st_cli_mgmt_network_base.test_network.yaml | 2382 +- ..._mgmt_network_base_async.test_network.yaml | 496 +- ...li_mgmt_network_endpoint.test_network.yaml | 1067 +- ..._network_endpoint_policy.test_network.yaml | 277 +- ...li_mgmt_network_firewall.test_network.yaml | 888 +- ..._network_firewall_policy.test_network.yaml | 260 +- ...test_cli_mgmt_network_ip.test_network.yaml | 85 +- ...gmt_network_ip_addresses.test_network.yaml | 287 +- ...mt_network_load_balancer.test_network.yaml | 978 +- ...est_cli_mgmt_network_nat.test_network.yaml | 300 +- ...gmt_network_route_filter.test_network.yaml | 42100 +++++++--------- ...mgmt_network_route_table.test_network.yaml | 244 +- ...cli_mgmt_network_wan_hub.test_network.yaml | 1724 +- ...lication_firewall_policy.test_network.yaml | 90 +- .../tests/test_cli_mgmt_network_watcher.py | 2 +- .../azure-purview-administration/CHANGELOG.md | 16 + .../azure-purview-administration/MANIFEST.in | 7 + .../azure-purview-administration/README.md | 178 + .../azure/__init__.py | 1 + .../azure/purview/__init__.py | 1 + .../azure/purview/administration/__init__.py | 1 + .../azure/purview/administration/_version.py | 8 + .../administration/account/__init__.py | 19 + .../administration/account/_configuration.py | 70 + .../account/_purview_account_client.py | 103 + .../purview/administration/account/_vendor.py | 27 + .../administration/account/_version.py | 9 + .../administration/account/aio/__init__.py | 10 + .../account/aio/_configuration.py | 66 + .../account/aio/_purview_account_client.py | 98 + .../account/aio/operations/__init__.py | 17 + .../account/aio/operations/_operations.py | 1674 + .../account/operations/__init__.py | 17 + .../account/operations/_operations.py | 2116 + .../purview/administration/account/py.typed | 1 + .../metadatapolicies/__init__.py | 19 + .../metadatapolicies/_configuration.py | 70 + .../_purview_metadata_policies_client.py | 101 + .../metadatapolicies/_vendor.py | 27 + .../metadatapolicies/_version.py | 9 + .../metadatapolicies/aio/__init__.py | 10 + .../metadatapolicies/aio/_configuration.py | 66 + .../aio/_purview_metadata_policies_client.py | 96 + .../aio/operations/__init__.py | 15 + .../aio/operations/_operations.py | 616 + .../metadatapolicies/operations/__init__.py | 15 + .../operations/_operations.py | 750 + .../administration/metadatapolicies/py.typed | 1 + .../dev_requirements.txt | 5 + .../sdk_packaging.toml | 9 + .../azure-purview-administration/setup.cfg | 2 + .../azure-purview-administration/setup.py | 90 + .../swagger/README.md | 68 + .../tests/_util.py | 19 + .../tests/conftest.py | 15 + .../test_smoke.test_basic_smoke_test.yaml | 34 + .../test_smoke.test_collections_list.yaml | 34 + ...est_smoke.test_meta_policy_smoke_test.yaml | 34 + ...test_smoke.test_meta_roles_smoke_test.yaml | 70 + ...est_smoke_async.test_basic_smoke_test.yaml | 24 + ...est_smoke_async.test_collections_list.yaml | 26 + ...sync.test_metadata_policy_smoke_async.yaml | 25 + ..._async.test_metadata_role_smoke_async.yaml | 52 + .../tests/test_smoke.py | 45 + .../tests/test_smoke_async.py | 45 + .../tests/testcase.py | 50 + .../tests/testcase_async.py | 35 + .../azure-purview-catalog/CHANGELOG.md | 11 +- sdk/purview/azure-purview-catalog/README.md | 11 +- .../azure/purview/catalog/_configuration.py | 2 +- .../azure/purview/catalog/_version.py | 2 +- .../purview/catalog/aio/_configuration.py | 2 +- .../purview/catalog/operations/_operations.py | 30 +- sdk/purview/azure-purview-catalog/setup.py | 1 + .../azure-purview-catalog/swagger/README.md | 2 +- .../test_smoke.test_basic_smoke_test.yaml | 6 +- ...est_smoke_async.test_basic_smoke_test.yaml | 6 +- .../azure-purview-catalog/tests/testcase.py | 2 +- .../azure-purview-scanning/CHANGELOG.md | 10 + sdk/purview/azure-purview-scanning/README.md | 5 + .../azure/purview/scanning/_version.py | 2 +- sdk/purview/azure-purview-scanning/setup.py | 1 + sdk/purview/ci.yml | 2 + sdk/quota/azure-mgmt-quota/CHANGELOG.md | 11 + sdk/quota/azure-mgmt-quota/_meta.json | 2 +- .../mgmt/quota/_azure_quota_extension_api.py | 8 +- .../azure/mgmt/quota/_metadata.json | 2 +- .../azure/mgmt/quota/_version.py | 2 +- .../quota/aio/_azure_quota_extension_api.py | 8 +- .../operations/_quota_operation_operations.py | 107 + .../azure/mgmt/quota/models/__init__.py | 3 - .../azure/mgmt/quota/models/_models.py | 53 +- .../azure/mgmt/quota/models/_models_py3.py | 57 +- .../operations/_quota_operation_operations.py | 112 + .../CHANGELOG.md | 34 + .../_meta.json | 2 +- .../recoveryservicesbackup/_metadata.json | 5 +- .../_recovery_services_backup_client.py | 15 + .../mgmt/recoveryservicesbackup/_version.py | 2 +- .../aio/_recovery_services_backup_client.py | 15 + .../aio/operations/__init__.py | 6 + .../operations/_backup_engines_operations.py | 4 +- .../aio/operations/_backup_jobs_operations.py | 2 +- .../_backup_operation_results_operations.py | 2 +- .../_backup_operation_statuses_operations.py | 2 +- .../operations/_backup_policies_operations.py | 2 +- .../_backup_protectable_items_operations.py | 2 +- .../_backup_protected_items_operations.py | 2 +- ...backup_protection_containers_operations.py | 2 +- .../_backup_protection_intent_operations.py | 2 +- ..._resource_encryption_configs_operations.py | 4 +- ...urce_storage_configs_non_crr_operations.py | 234 + ...ackup_resource_vault_configs_operations.py | 6 +- .../operations/_backup_status_operations.py | 2 +- .../_backup_usage_summaries_operations.py | 2 +- .../_backup_workload_items_operations.py | 2 +- .../aio/operations/_backups_operations.py | 2 +- ...e_data_move_operation_result_operations.py | 2 +- ...xport_jobs_operation_results_operations.py | 2 +- .../operations/_feature_support_operations.py | 2 +- ...m_level_recovery_connections_operations.py | 4 +- .../_job_cancellations_operations.py | 2 +- .../aio/operations/_job_details_operations.py | 2 +- .../_job_operation_results_operations.py | 2 +- .../aio/operations/_jobs_operations.py | 2 +- .../aio/operations/_operation_operations.py | 2 +- .../aio/operations/_operations.py | 2 +- ..._private_endpoint_connection_operations.py | 6 +- .../_private_endpoint_operations.py | 2 +- .../_protectable_containers_operations.py | 2 +- ...ected_item_operation_results_operations.py | 2 +- ...cted_item_operation_statuses_operations.py | 2 +- .../operations/_protected_items_operations.py | 6 +- ..._container_operation_results_operations.py | 2 +- ...er_refresh_operation_results_operations.py | 2 +- .../_protection_containers_operations.py | 10 +- .../_protection_intent_operations.py | 8 +- .../_protection_policies_operations.py | 6 +- ...ion_policy_operation_results_operations.py | 2 +- ...on_policy_operation_statuses_operations.py | 2 +- .../operations/_recovery_points_operations.py | 4 +- ..._points_recommended_for_move_operations.py | 2 +- ...overy_services_backup_client_operations.py | 8 +- .../_resource_guard_proxies_operations.py} | 39 +- .../_resource_guard_proxy_operations.py | 299 + .../aio/operations/_restores_operations.py | 2 +- .../operations/_security_pins_operations.py | 15 +- .../recoveryservicesbackup/models/__init__.py | 27 + .../recoveryservicesbackup/models/_models.py | 423 +- .../models/_models_py3.py | 530 +- .../operations/__init__.py | 6 + .../operations/_backup_engines_operations.py | 4 +- .../operations/_backup_jobs_operations.py | 2 +- .../_backup_operation_results_operations.py | 2 +- .../_backup_operation_statuses_operations.py | 2 +- .../operations/_backup_policies_operations.py | 2 +- .../_backup_protectable_items_operations.py | 2 +- .../_backup_protected_items_operations.py | 2 +- ...backup_protection_containers_operations.py | 2 +- .../_backup_protection_intent_operations.py | 2 +- ..._resource_encryption_configs_operations.py | 4 +- ...urce_storage_configs_non_crr_operations.py | 241 + ...ackup_resource_vault_configs_operations.py | 6 +- .../operations/_backup_status_operations.py | 2 +- .../_backup_usage_summaries_operations.py | 2 +- .../_backup_workload_items_operations.py | 2 +- .../operations/_backups_operations.py | 2 +- ...e_data_move_operation_result_operations.py | 2 +- ...xport_jobs_operation_results_operations.py | 2 +- .../operations/_feature_support_operations.py | 2 +- ...m_level_recovery_connections_operations.py | 4 +- .../_job_cancellations_operations.py | 2 +- .../operations/_job_details_operations.py | 2 +- .../_job_operation_results_operations.py | 2 +- .../operations/_jobs_operations.py | 2 +- .../operations/_operation_operations.py | 2 +- .../operations/_operations.py | 2 +- ..._private_endpoint_connection_operations.py | 6 +- .../_private_endpoint_operations.py | 2 +- .../_protectable_containers_operations.py | 2 +- ...ected_item_operation_results_operations.py | 2 +- ...cted_item_operation_statuses_operations.py | 2 +- .../operations/_protected_items_operations.py | 6 +- ..._container_operation_results_operations.py | 2 +- ...er_refresh_operation_results_operations.py | 2 +- .../_protection_containers_operations.py | 10 +- .../_protection_intent_operations.py | 8 +- .../_protection_policies_operations.py | 6 +- ...ion_policy_operation_results_operations.py | 2 +- ...on_policy_operation_statuses_operations.py | 2 +- .../operations/_recovery_points_operations.py | 4 +- ..._points_recommended_for_move_operations.py | 2 +- ...overy_services_backup_client_operations.py | 8 +- .../_resource_guard_proxies_operations.py} | 39 +- .../_resource_guard_proxy_operations.py | 307 + .../operations/_restores_operations.py | 2 +- .../operations/_security_pins_operations.py | 15 +- sdk/remoterendering/TestResources/testBox.fbx | 346 + .../CHANGELOG.md | 5 + .../MANIFEST.in | 7 + .../README.md | 380 + .../azure/__init__.py | 8 + .../azure/mixedreality/__init__.py | 8 + .../mixedreality/remoterendering/__init__.py | 29 + .../remoterendering/_api_version.py | 30 + .../remoterendering/_generated/__init__.py | 16 + .../_generated/_configuration.py | 58 + .../_remote_rendering_rest_client.py | 62 + .../_generated/aio/__init__.py | 10 + .../_generated/aio/_configuration_async.py | 52 + .../_remote_rendering_rest_client_async.py | 54 + .../aio/operations_async/__init__.py | 13 + .../_remote_rendering_operations_async.py | 620 + .../_generated/models/__init__.py | 61 + .../_generated/models/_models.py | 538 + .../_generated/models/_models_py3.py | 582 + .../_remote_rendering_rest_client_enums.py | 56 + .../_generated/operations/__init__.py | 13 + .../_remote_rendering_operations.py | 632 + .../remoterendering/_generated/py.typed | 1 + .../mixedreality/remoterendering/_polling.py | 175 + .../_remote_rendering_client.py | 361 + .../remoterendering/_shared/INFO.md | 1 + .../remoterendering/_shared/__init__.py | 5 + .../remoterendering/_shared/aio/__init__.py | 5 + .../aio/mixed_reality_token_credential.py | 68 + .../mixedreality_account_key_credential.py | 56 + .../aio/static_access_token_credential.py | 38 + .../_shared/authentication_endpoint.py} | 4 +- .../_shared/mixed_reality_token_credential.py | 50 + .../mixedreality_account_key_credential.py | 46 + .../_shared/static_access_token_credential.py | 27 + .../mixedreality/remoterendering/_version.py | 10 + .../remoterendering/aio/__init__.py | 11 + .../remoterendering/aio/_polling_async.py | 181 + .../aio/_remote_rendering_client_async.py | 358 + .../dev_requirements.txt | 8 + .../mypy.ini | 12 + .../samples/remote_rendering_client_sample.py | 207 + .../remote_rendering_client_sample_async.py | 212 + .../sdk_packaging.toml | 7 + .../setup.cfg | 5 + .../setup.py | 80 + .../swagger/AUTOREST.md | 233 + .../tests/conftest.py | 11 + .../tests/preparers.py | 60 + ....test_failed_conversion_missing_asset.yaml | 512 + ...ient.test_failed_conversion_no_access.yaml | 80 + ...t.test_failed_conversion_unauthorized.yaml | 32 + ...st_client.test_failed_session_request.yaml | 75 + .../test_client.test_simple_conversion.yaml | 528 + .../test_client.test_simple_session.yaml | 1508 + ....test_failed_conversion_missing_asset.yaml | 661 + ...sync.test_failed_conversion_no_access.yaml | 61 + ...c.test_failed_conversion_unauthorized.yaml | 25 + ...ent_async.test_failed_session_request.yaml | 56 + ...t_client_async.test_simple_conversion.yaml | 533 + ...test_client_async.test_simple_session.yaml | 1076 + .../tests/test_client.py | 356 + .../tests/test_client_async.py | 355 + sdk/remoterendering/ci.yml | 34 + sdk/remoterendering/test-resources-post.ps1 | 30 + sdk/remoterendering/test-resources.json | 121 + sdk/remoterendering/tests.yml | 13 + .../azure-mgmt-resourceconnector/CHANGELOG.md | 5 + .../azure-mgmt-resourceconnector/LICENSE.txt | 21 + .../azure-mgmt-resourceconnector/MANIFEST.in | 6 + .../azure-mgmt-resourceconnector/README.md | 27 + .../azure-mgmt-resourceconnector/_meta.json | 11 + .../azure/__init__.py | 1 + .../azure/mgmt/__init__.py | 1 + .../azure/mgmt/resourceconnector/__init__.py | 19 + .../mgmt/resourceconnector/_appliances.py | 89 + .../mgmt/resourceconnector/_configuration.py | 71 + .../mgmt/resourceconnector/_metadata.json | 103 + .../azure/mgmt/resourceconnector/_version.py | 9 + .../mgmt/resourceconnector/aio/__init__.py | 10 + .../mgmt/resourceconnector/aio/_appliances.py | 82 + .../resourceconnector/aio/_configuration.py | 67 + .../aio/operations/__init__.py | 13 + .../aio/operations/_appliances_operations.py} | 719 +- .../mgmt/resourceconnector/models/__init__.py | 76 + .../models/_appliances_enums.py | 72 + .../mgmt/resourceconnector/models/_models.py | 598 + .../resourceconnector/models/_models_py3.py | 631 + .../resourceconnector/operations/__init__.py | 13 + .../operations/_appliances_operations.py} | 720 +- .../azure/mgmt/resourceconnector/py.typed | 1 + .../sdk_packaging.toml | 9 + .../azure-mgmt-resourceconnector/setup.cfg | 2 + .../azure-mgmt-resourceconnector/setup.py | 90 + sdk/resourceconnector/ci.yml | 33 + .../CHANGELOG.md | 29 +- .../MANIFEST.in | 3 +- .../README.md | 49 +- .../_abstract_avro_serializer.py | 65 + ...rializer.py => _apache_avro_serializer.py} | 56 +- .../_schema_registry_avro_serializer.py | 85 +- .../avroserializer/aio}/__init__.py | 6 +- .../avroserializer/aio/_async_lru.py | 230 + .../_schema_registry_avro_serializer_async.py | 197 + .../serializer/avroserializer/exceptions.py | 69 + .../dev_requirements.txt | 2 +- .../samples/README.md | 17 +- .../async_samples/avro_serializer_async.py | 93 + .../eventhub_receive_integration_async.py | 73 + .../eventhub_send_integration_async.py | 80 + .../{ => sync_samples}/avro_serializer.py | 0 .../eventhub_receive_integration.py | 0 .../eventhub_send_integration.py | 0 .../setup.py | 5 +- .../tests/conftest.py | 16 + ...serializer_with_auto_register_schemas.yaml | 104 +- ...ializer_without_auto_register_schemas.yaml | 104 +- ...zer.test_parse_error_schema_as_record.yaml | 94 + ...vro_serializer.test_parse_record_name.yaml | 185 + ...o_serializer.test_serialize_primitive.yaml | 48 + ...avro_serializer.test_serialize_record.yaml | 96 + ...serializer_with_auto_register_schemas.yaml | 99 + ...ializer_without_auto_register_schemas.yaml | 99 + ...ync.test_parse_error_schema_as_record.yaml | 65 + ...rializer_async.test_parse_record_name.yaml | 127 + ...alizer_async.test_serialize_primitive.yaml | 34 + ...erializer_async.test_serialize_record.yaml | 67 + .../tests/test_avro_serializer.py | 331 +- .../tests/test_avro_serializer_async.py | 396 + .../azure-schemaregistry/CHANGELOG.md | 24 +- .../azure-schemaregistry/README.md | 68 +- .../azure/schemaregistry/__init__.py | 3 +- .../schemaregistry/_common/_constants.py | 19 +- .../_common/_response_handlers.py | 23 +- .../azure/schemaregistry/_common/_schema.py | 57 +- .../_generated/_azure_schema_registry.py | 38 +- .../_generated/_configuration.py | 20 +- .../schemaregistry/_generated/_vendor.py | 21 + .../schemaregistry/_generated/_version.py | 2 +- .../schemaregistry/_generated/aio/__init__.py | 6 + .../_generated/aio/_azure_schema_registry.py | 38 +- .../_generated/aio/_configuration.py | 20 +- .../_generated/rest/schema/__init__.py | 3 + .../rest/schema/_request_builders.py | 129 +- .../rest/schema/_request_builders_py3.py | 128 +- .../_generated/rest/schema_groups/__init__.py | 16 + .../rest/schema_groups/_request_builders.py | 77 + .../schema_groups/_request_builders_py3.py | 71 + .../schemaregistry/_schema_registry_client.py | 88 +- .../azure/schemaregistry/_utils.py | 12 + .../azure/schemaregistry/_version.py | 2 +- .../aio/_schema_registry_client_async.py | 91 +- .../azure-schemaregistry/samples/README.md | 12 +- .../sample_code_schemaregistry_async.py | 95 +- .../async_samples/schema_registry_async.py | 91 +- .../sample_code_schemaregistry.py | 105 +- .../samples/sync_samples/schema_registry.py | 95 +- .../azure-schemaregistry/setup.py | 4 +- .../azure-schemaregistry/swagger/README.md | 6 +- ...egistry_async.test_schema_basic_async.yaml | 87 +- ....test_schema_negative_no_schema_async.yaml | 30 +- ...ry_async.test_schema_same_twice_async.yaml | 64 +- ...gistry_async.test_schema_update_async.yaml | 87 +- .../async_tests/test_schema_registry_async.py | 40 +- ...est_schema_registry.test_schema_basic.yaml | 96 +- ...gistry.test_schema_negative_no_schema.yaml | 26 +- ...chema_registry.test_schema_same_twice.yaml | 72 +- ...st_schema_registry.test_schema_update.yaml | 96 +- .../tests/test_schema_registry.py | 40 +- sdk/schemaregistry/tests.yml | 2 - .../azure-search-documents/CHANGELOG.md | 13 +- .../azure/search/documents/_search_client.py | 16 + .../azure/search/documents/_version.py | 2 +- .../documents/aio/_search_client_async.py | 17 + .../documents/indexes/_search_index_client.py | 12 + .../indexes/_search_indexer_client.py | 68 +- .../indexes/aio/_search_index_client.py | 13 +- .../indexes/aio/_search_indexer_client.py | 70 +- .../documents/indexes/models/__init__.py | 2 + .../documents/indexes/models/_models.py | 23 + .../azure/search/documents/models/__init__.py | 4 +- .../dev_requirements.txt | 2 +- sdk/search/azure-search-documents/setup.py | 2 +- ...llset_live_async.test_create_skillset.yaml | 76 +- ...search_index_client_skillset_live_async.py | 17 +- ...nt_skillset_live.test_create_skillset.yaml | 111 +- .../test_search_index_client_skillset_live.py | 17 +- sdk/search/tests.yml | 15 +- sdk/servicebus/azure-servicebus/CHANGELOG.md | 17 +- .../azure/servicebus/_common/message.py | 14 +- .../azure/servicebus/_servicebus_receiver.py | 2 +- .../azure/servicebus/_version.py | 2 +- .../aio/_servicebus_receiver_async.py | 2 +- .../management/_management_client_async.py | 53 +- .../azure/servicebus/aio/management/_utils.py | 3 +- .../azure/servicebus/management/__init__.py | 2 + .../servicebus/management/_api_version.py | 14 + .../azure/servicebus/management/_constants.py | 1 - .../management/_management_client.py | 53 +- .../azure/servicebus/management/_models.py | 4 +- .../azure/servicebus/management/_utils.py | 3 +- ...t_async_mgmt_namespace_get_properties.yaml | 12 +- ....test_async_mgmt_queue_basic_v2017_04.yaml | 356 + ....test_async_mgmt_queue_create_by_name.yaml | 40 +- ...est_async_mgmt_queue_create_duplicate.yaml | 36 +- ...t_queue_create_with_queue_description.yaml | 114 +- ...nc.test_async_mgmt_queue_delete_basic.yaml | 100 +- ....test_async_mgmt_queue_delete_negtive.yaml | 64 +- ...eue_delete_one_and_check_not_existing.yaml | 258 +- ...mt_queue_get_runtime_properties_basic.yaml | 40 +- ...queue_get_runtime_properties_negative.yaml | 6 +- ...sync.test_async_mgmt_queue_list_basic.yaml | 104 +- ...t_queue_list_runtime_properties_basic.yaml | 78 +- ...t_queue_list_with_negative_credential.yaml | 16 +- ...nc_mgmt_queue_list_with_special_chars.yaml | 56 +- ...premium_create_with_queue_description.yaml | 118 +- ....test_async_mgmt_queue_update_invalid.yaml | 60 +- ....test_async_mgmt_queue_update_success.yaml | 248 +- ...st_mgmt_queue_async_update_dict_error.yaml | 26 +- ..._mgmt_queue_async_update_dict_success.yaml | 114 +- ...les_async.test_async_mgmt_rule_create.yaml | 182 +- ...test_async_mgmt_rule_create_duplicate.yaml | 76 +- ....test_async_mgmt_rule_list_and_delete.yaml | 200 +- ...c.test_async_mgmt_rule_update_invalid.yaml | 92 +- ...c.test_async_mgmt_rule_update_success.yaml | 140 +- ...est_mgmt_rule_async_update_dict_error.yaml | 66 +- ...t_mgmt_rule_async_update_dict_success.yaml | 140 +- ...sync_mgmt_subscription_create_by_name.yaml | 60 +- ...nc_mgmt_subscription_create_duplicate.yaml | 56 +- ...t_subscription_create_with_forward_to.yaml | 86 +- ..._create_with_subscription_description.yaml | 94 +- ...c.test_async_mgmt_subscription_delete.yaml | 144 +- ...cription_get_runtime_properties_basic.yaml | 60 +- ...ync.test_async_mgmt_subscription_list.yaml | 108 +- ..._subscription_list_runtime_properties.yaml | 108 +- ...sync_mgmt_subscription_update_invalid.yaml | 70 +- ...sync_mgmt_subscription_update_success.yaml | 298 +- ..._subscription_async_update_dict_error.yaml | 46 +- ...ubscription_async_update_dict_success.yaml | 166 +- ....test_async_mgmt_topic_basic_v2017_04.yaml | 356 + ....test_async_mgmt_topic_create_by_name.yaml | 40 +- ...est_async_mgmt_topic_create_duplicate.yaml | 36 +- ...t_topic_create_with_topic_description.yaml | 80 +- ...cs_async.test_async_mgmt_topic_delete.yaml | 128 +- ...mt_topic_get_runtime_properties_basic.yaml | 40 +- ...pics_async.test_async_mgmt_topic_list.yaml | 80 +- ...nc_mgmt_topic_list_runtime_properties.yaml | 78 +- ...premium_create_with_topic_description.yaml | 118 +- ....test_async_mgmt_topic_update_invalid.yaml | 48 +- ....test_async_mgmt_topic_update_success.yaml | 146 +- ...st_mgmt_topic_async_update_dict_error.yaml | 26 +- ..._mgmt_topic_async_update_dict_success.yaml | 104 +- .../mgmt_tests/test_mgmt_queues_async.py | 39 + .../mgmt_tests/test_mgmt_topics_async.py | 40 + .../tests/async_tests/test_sessions_async.py | 21 + ...es.test_mgmt_namespace_get_properties.yaml | 10 +- ...queues.test_mgmt_queue_basic_v2017_04.yaml | 461 + ...queues.test_mgmt_queue_create_by_name.yaml | 32 +- ...eues.test_mgmt_queue_create_duplicate.yaml | 28 +- ...t_queue_create_with_queue_description.yaml | 94 +- ...t_queues.test_mgmt_queue_delete_basic.yaml | 82 +- ...queues.test_mgmt_queue_delete_negtive.yaml | 50 +- ...eue_delete_one_and_check_not_existing.yaml | 212 +- ...mt_queue_get_runtime_properties_basic.yaml | 32 +- ...queue_get_runtime_properties_negative.yaml | 4 +- ...gmt_queues.test_mgmt_queue_list_basic.yaml | 82 +- ...t_queue_list_runtime_properties_basic.yaml | 62 +- ...t_queue_list_with_negative_credential.yaml | 12 +- ...st_mgmt_queue_list_with_special_chars.yaml | 44 +- ...premium_create_with_queue_description.yaml | 96 +- ...ues.test_mgmt_queue_update_dict_error.yaml | 20 +- ...s.test_mgmt_queue_update_dict_success.yaml | 96 +- ...queues.test_mgmt_queue_update_invalid.yaml | 48 +- ...queues.test_mgmt_queue_update_success.yaml | 224 +- ..._mgmt_queues.test_mgmt_queue_v2017_04.yaml | 403 + ...test_mgmt_rules.test_mgmt_rule_create.yaml | 148 +- ...rules.test_mgmt_rule_create_duplicate.yaml | 60 +- ..._rules.test_mgmt_rule_list_and_delete.yaml | 170 +- ...ules.test_mgmt_rule_update_dict_error.yaml | 52 +- ...es.test_mgmt_rule_update_dict_success.yaml | 116 +- ...t_rules.test_mgmt_rule_update_invalid.yaml | 74 +- ...t_rules.test_mgmt_rule_update_success.yaml | 116 +- ...test_mgmt_subscription_create_by_name.yaml | 48 +- ...st_mgmt_subscription_create_duplicate.yaml | 44 +- ...t_subscription_create_with_forward_to.yaml | 70 +- ..._create_with_subscription_description.yaml | 76 +- ...iptions.test_mgmt_subscription_delete.yaml | 120 +- ...cription_get_runtime_properties_basic.yaml | 48 +- ...criptions.test_mgmt_subscription_list.yaml | 88 +- ..._subscription_list_runtime_properties.yaml | 88 +- ...t_mgmt_subscription_update_dict_error.yaml | 36 +- ...mgmt_subscription_update_dict_success.yaml | 140 +- ...test_mgmt_subscription_update_invalid.yaml | 56 +- ...test_mgmt_subscription_update_success.yaml | 256 +- ...topics.test_mgmt_queue_basic_v2017_04.yaml | 461 + ...topics.test_mgmt_topic_basic_v2017_04.yaml | 461 + ...topics.test_mgmt_topic_create_by_name.yaml | 32 +- ...pics.test_mgmt_topic_create_duplicate.yaml | 28 +- ...t_topic_create_with_topic_description.yaml | 64 +- ...st_mgmt_topics.test_mgmt_topic_delete.yaml | 106 +- ...mt_topic_get_runtime_properties_basic.yaml | 32 +- ...test_mgmt_topics.test_mgmt_topic_list.yaml | 64 +- ...st_mgmt_topic_list_runtime_properties.yaml | 62 +- ...premium_create_with_topic_description.yaml | 96 +- ...ics.test_mgmt_topic_update_dict_error.yaml | 20 +- ...s.test_mgmt_topic_update_dict_success.yaml | 86 +- ...topics.test_mgmt_topic_update_invalid.yaml | 38 +- ...topics.test_mgmt_topic_update_success.yaml | 124 +- .../tests/mgmt_tests/test_mgmt_queues.py | 39 +- .../tests/mgmt_tests/test_mgmt_topics.py | 41 +- .../azure-servicebus/tests/test_sessions.py | 57 + sdk/servicebus/tests.yml | 1 - sdk/signalr/azure-mgmt-signalr/CHANGELOG.md | 12 + sdk/signalr/azure-mgmt-signalr/_meta.json | 10 +- .../azure/mgmt/signalr/_configuration.py | 2 +- .../azure/mgmt/signalr/_metadata.json | 4 +- .../azure/mgmt/signalr/_version.py | 2 +- .../azure/mgmt/signalr/aio/_configuration.py | 2 +- .../signalr/aio/operations/_operations.py | 2 +- .../aio/operations/_signal_r_operations.py | 80 +- ...private_endpoint_connections_operations.py | 8 +- ...gnal_rprivate_link_resources_operations.py | 2 +- ...hared_private_link_resources_operations.py | 8 +- .../aio/operations/_usages_operations.py | 2 +- .../azure/mgmt/signalr/models/__init__.py | 17 + .../azure/mgmt/signalr/models/_models.py | 201 +- .../azure/mgmt/signalr/models/_models_py3.py | 210 +- .../_signal_rmanagement_client_enums.py | 9 + .../mgmt/signalr/operations/_operations.py | 2 +- .../operations/_signal_r_operations.py | 81 +- ...private_endpoint_connections_operations.py | 8 +- ...gnal_rprivate_link_resources_operations.py | 2 +- ...hared_private_link_resources_operations.py | 8 +- .../signalr/operations/_usages_operations.py | 2 +- .../tests/_shared/testcase.py | 452 - .../tests/conftest.py | 7 - .../tests/{_shared => settings}/__init__.py | 0 .../tests/settings}/settings_fake.py | 11 +- .../tests/settings/testcase.py | 60 + .../tests/test_change_feed.py | 64 +- sdk/storage/azure-storage-blob/CHANGELOG.md | 21 + sdk/storage/azure-storage-blob/README.md | 10 + .../azure/storage/blob/_blob_client.py | 36 +- .../storage/blob/_blob_service_client.py | 11 +- .../azure/storage/blob/_container_client.py | 14 +- .../storage/blob/_generated/_configuration.py | 2 +- .../blob/_generated/aio/_configuration.py | 2 +- .../aio/operations/_blob_operations.py | 9 + .../aio/operations/_directory_operations.py | 742 - .../models/_azure_blob_storage_enums.py | 3 +- .../storage/blob/_generated/models/_models.py | 8 +- .../blob/_generated/models/_models_py3.py | 10 +- .../_generated/operations/_blob_operations.py | 9 + .../operations/_directory_operations.py | 751 - .../azure/storage/blob/_models.py | 14 +- .../azure/storage/blob/_serialize.py | 3 +- .../azure/storage/blob/_shared/models.py | 9 +- .../azure/storage/blob/_shared/policies.py | 30 +- .../storage/blob/_shared/response_handlers.py | 6 +- .../blob/_shared/shared_access_signature.py | 14 +- .../storage/blob/_shared_access_signature.py | 17 +- .../azure/storage/blob/_version.py | 2 +- .../storage/blob/aio/_blob_client_async.py | 11 + .../azure-storage-blob/migration_guide.md | 1640 + .../blob_samples_proxy_configuration.py | 7 +- sdk/storage/azure-storage-blob/setup.py | 2 +- .../azure-storage-blob/swagger/README.md | 13 +- .../tests/_shared/testcase.py | 269 - .../azure-storage-blob/tests/conftest.py | 7 - ...p.4ebacace-c663-4994-b478-01affe7284f1.dat | 1 - .../tests/perfstress_tests/README.md | 2 +- .../T1_legacy_tests/_test_base_legacy.py | 4 +- .../tests/perfstress_tests/_test_base.py | 2 +- ...service_stats.test_blob_service_stats.yaml | 14 +- ...t_blob_service_stats_when_unavailable.yaml | 14 +- ...s_async.test_blob_service_stats_async.yaml | 25 +- ..._service_stats_when_unavailable_async.yaml | 22 +- ...tags.test_commit_block_list_with_tags.yaml | 134 +- ...ags.test_create_append_blob_with_tags.yaml | 50 +- ..._tags.test_create_page_blob_with_tags.yaml | 50 +- .../test_blob_tags.test_filter_blobs.yaml | 220 +- ..._get_blob_properties_returns_tags_num.yaml | 78 +- .../test_blob_tags.test_get_blob_tags.yaml | 68 +- ...ags.test_get_blob_tags_for_a_snapshot.yaml | 70 +- ...lob_tags.test_list_blobs_returns_tags.yaml | 56 +- .../test_blob_tags.test_set_blob_tags.yaml | 67 +- ...tags.test_set_blob_tags_for_a_version.yaml | 87 +- ...ob_tags.test_set_blob_tags_with_lease.yaml | 151 +- ...gs.test_start_copy_from_url_with_tags.yaml | 100 +- ...tags.test_upload_block_blob_with_tags.yaml | 50 +- ...sync.test_commit_block_list_with_tags.yaml | 145 +- ...ync.test_create_append_blob_with_tags.yaml | 64 +- ...async.test_create_page_blob_with_tags.yaml | 64 +- ...est_blob_tags_async.test_filter_blobs.yaml | 176 +- ..._get_blob_properties_returns_tags_num.yaml | 93 +- ...st_blob_tags_async.test_get_blob_tags.yaml | 84 +- ...ync.test_get_blob_tags_for_a_snapshot.yaml | 86 +- ...gs_async.test_list_blobs_returns_tags.yaml | 70 +- ...st_blob_tags_async.test_set_blob_tags.yaml | 69 +- ...sync.test_set_blob_tags_for_a_version.yaml | 89 +- ...s_async.test_set_blob_tags_with_lease.yaml | 164 +- ...nc.test_start_copy_from_url_with_tags.yaml | 117 +- ...sync.test_upload_block_blob_with_tags.yaml | 64 +- ...ck_blob.test_get_block_list_no_blocks.yaml | 112 +- ...b_async.test_get_block_list_no_blocks.yaml | 104 +- ...est_logging_request_and_response_body.yaml | 253 + ...est_logging_request_and_response_body.yaml | 141 + ...t_quick_query_input_in_parquet_format.yaml | 6 +- .../tests/{_shared => settings}/__init__.py | 0 .../tests/settings/settings_fake.py | 28 + .../tests/settings/testcase.py | 71 + .../tests/test_append_blob.py | 322 +- .../tests/test_append_blob_async.py | 335 +- .../tests/test_blob_access_conditions.py | 806 +- .../test_blob_access_conditions_async.py | 794 +- .../tests/test_blob_api_version.py | 8 +- .../tests/test_blob_api_version_async.py | 8 +- .../tests/test_blob_client.py | 262 +- .../tests/test_blob_client_async.py | 256 +- .../tests/test_blob_encryption.py | 205 +- .../tests/test_blob_encryption_async.py | 219 +- .../tests/test_blob_retry.py | 22 +- .../tests/test_blob_retry_async.py | 23 +- .../tests/test_blob_service_properties.py | 110 +- .../test_blob_service_properties_async.py | 110 +- .../tests/test_blob_service_stats.py | 17 +- .../tests/test_blob_service_stats_async.py | 18 +- .../tests/test_blob_storage_account.py | 20 +- .../tests/test_blob_storage_account_async.py | 20 +- .../tests/test_blob_tags.py | 119 +- .../tests/test_blob_tags_async.py | 111 +- .../tests/test_block_blob.py | 407 +- .../tests/test_block_blob_async.py | 410 +- .../tests/test_block_blob_sync_copy.py | 36 +- .../tests/test_block_blob_sync_copy_async.py | 36 +- .../tests/test_common_blob.py | 796 +- .../tests/test_common_blob_async.py | 748 +- .../tests/test_container.py | 525 +- .../tests/test_container_async.py | 486 +- .../azure-storage-blob/tests/test_cpk.py | 80 +- .../tests/test_cpk_async.py | 80 +- .../azure-storage-blob/tests/test_cpk_n.py | 449 +- .../tests/test_cpk_n_async.py | 453 +- .../azure-storage-blob/tests/test_get_blob.py | 232 +- .../tests/test_get_blob_async.py | 234 +- .../tests/test_large_block_blob.py | 97 +- .../tests/test_large_block_blob_async.py | 90 +- .../tests/test_largest_block_blob.py | 64 +- .../tests/test_largest_block_blob_async.py | 66 +- .../azure-storage-blob/tests/test_logging.py | 52 +- .../tests/test_logging_async.py | 46 +- .../azure-storage-blob/tests/test_ors.py | 14 +- .../tests/test_ors_async.py | 14 +- .../tests/test_page_blob.py | 414 +- .../tests/test_page_blob_async.py | 408 +- .../tests/test_quick_query.py | 174 +- .../azure-storage-blob/tests/test_retry.py | 76 +- .../tests/test_retry_async.py | 76 +- .../tests/test_upload_chunking.py | 10 +- .../azure-storage-file-datalake/CHANGELOG.md | 20 + .../azure-storage-file-datalake/README.md | 38 + .../_data_lake_directory_client.py | 9 +- .../filedatalake/_data_lake_file_client.py | 9 +- .../filedatalake/_data_lake_service_client.py | 9 +- .../storage/filedatalake/_deserialize.py | 4 + .../filedatalake/_file_system_client.py | 90 +- .../_azure_data_lake_storage_restapi.py | 2 +- .../filedatalake/_generated/_configuration.py | 2 +- .../aio/_azure_data_lake_storage_restapi.py | 2 +- .../_generated/aio/_configuration.py | 2 +- .../aio/operations/_file_system_operations.py | 186 +- .../aio/operations/_path_operations.py | 133 +- .../aio/operations/_service_operations.py | 7 +- .../operations/_file_system_operations.py | 172 +- .../_generated/operations/_path_operations.py | 109 +- .../operations/_service_operations.py | 5 +- .../filedatalake/_list_paths_helper.py | 67 +- .../azure/storage/filedatalake/_models.py | 2 +- .../storage/filedatalake/_shared/models.py | 17 +- .../storage/filedatalake/_shared/policies.py | 30 +- .../filedatalake/_shared/response_handlers.py | 6 +- .../azure/storage/filedatalake/_version.py | 2 +- .../aio/_file_system_client_async.py | 84 +- .../filedatalake/aio/_list_paths_helper.py | 70 +- .../samples/datalake_samples_file_system.py | 50 + .../datalake_samples_file_system_async.py | 59 + .../azure-storage-file-datalake/setup.py | 2 +- .../swagger/README.md | 29 + .../tests/asynctestcase.py | 38 - ...tem.test_delete_files_simple_no_raise.yaml | 796 + ...t_delete_files_with_failed_subrequest.yaml | 801 + ...ync.test_delete_files_simple_no_raise.yaml | 574 + ...t_delete_files_with_failed_subrequest.yaml | 506 + .../tests/settings}/__init__.py | 0 .../tests/settings}/settings_fake.py | 11 +- .../tests/settings/testcase.py | 45 + .../tests/test_datalake_service_client.py | 8 +- .../test_datalake_service_client_async.py | 6 +- .../tests/test_directory.py | 16 +- .../tests/test_directory_async.py | 18 +- .../tests/test_file.py | 19 +- .../tests/test_file_async.py | 12 +- .../tests/test_file_system.py | 112 +- .../tests/test_file_system_async.py | 113 +- .../tests/test_large_file.py | 7 +- .../tests/test_large_file_async.py | 10 +- .../tests/test_quick_query.py | 7 +- .../tests/testcase.py | 193 - .../azure-storage-file-share/CHANGELOG.md | 2 + .../azure-storage-file-share/README.md | 2 + .../storage/fileshare/_directory_client.py | 2 +- .../azure/storage/fileshare/_file_client.py | 4 +- .../azure/storage/fileshare/_shared/models.py | 17 +- .../storage/fileshare/_shared/policies.py | 30 +- .../fileshare/_shared/response_handlers.py | 6 +- .../azure/storage/fileshare/_version.py | 2 +- sdk/storage/azure-storage-file-share/setup.py | 2 +- .../tests/_shared/asynctestcase.py | 88 - .../tests/_shared/testcase.py | 504 - .../tests/conftest.py | 8 - .../test_file.test_file_snapshot_exists.yaml | 354 + .../test_file_async.test_snapshot_exists.yaml | 251 + .../tests/settings}/__init__.py | 0 .../tests/settings/settings_fake.py | 22 + .../tests/settings/testcase.py | 71 + .../tests/test_directory.py | 189 +- .../tests/test_directory_async.py | 187 +- .../tests/test_file.py | 652 +- .../tests/test_file_api_version.py | 11 +- .../tests/test_file_api_version_async.py | 12 +- .../tests/test_file_async.py | 827 +- .../tests/test_file_client.py | 166 +- .../tests/test_file_client_async.py | 154 +- .../tests/test_file_service_properties.py | 49 +- .../test_file_service_properties_async.py | 42 +- .../tests/test_get_file.py | 354 +- .../tests/test_get_file_async.py | 354 +- .../tests/test_handle.py | 60 +- .../tests/test_handle_async.py | 22 +- .../tests/test_share.py | 410 +- .../tests/test_share_async.py | 412 +- sdk/storage/azure-storage-queue/CHANGELOG.md | 2 + sdk/storage/azure-storage-queue/README.md | 2 + .../azure/storage/queue/_shared/models.py | 17 +- .../azure/storage/queue/_shared/policies.py | 30 +- .../queue/_shared/response_handlers.py | 6 +- .../azure/storage/queue/_version.py | 2 +- sdk/storage/azure-storage-queue/setup.py | 2 +- .../tests/_shared/asynctestcase.py | 88 - .../tests/_shared/testcase.py | 534 - .../azure-storage-queue/tests/conftest.py | 8 - ...vice_stats.test_queue_service_stats_f.yaml | 15 +- ..._queue_service_stats_when_unavailable.yaml | 15 +- ...tats_async.test_queue_service_stats_f.yaml | 24 +- ..._queue_service_stats_when_unavailable.yaml | 25 +- .../tests/settings}/__init__.py | 0 .../{_shared => settings}/service_versions.py | 0 .../{_shared => settings}/settings_fake.py | 11 +- .../tests/settings/testcase.py | 54 + .../azure-storage-queue/tests/test_queue.py | 284 +- .../tests/test_queue_api_version.py | 7 +- .../tests/test_queue_api_version_async.py | 3 +- .../tests/test_queue_async.py | 289 +- .../tests/test_queue_client.py | 229 +- .../tests/test_queue_client_async.py | 236 +- .../tests/test_queue_encodings.py | 60 +- .../tests/test_queue_encodings_async.py | 64 +- .../tests/test_queue_encryption.py | 112 +- .../tests/test_queue_encryption_async.py | 112 +- .../tests/test_queue_service_properties.py | 51 +- .../test_queue_service_properties_async.py | 55 +- .../tests/test_queue_service_stats.py | 19 +- .../tests/test_queue_service_stats_async.py | 18 +- sdk/storage/test-resources.json | 598 +- sdk/storage/tests.yml | 7 +- .../azure-mgmt-storagepool/CHANGELOG.md | 21 + .../azure-mgmt-storagepool/_meta.json | 10 +- .../azure/mgmt/storagepool/_configuration.py | 2 +- .../azure/mgmt/storagepool/_metadata.json | 5 +- .../storagepool/_storage_pool_management.py | 5 + .../azure/mgmt/storagepool/_version.py | 2 +- .../mgmt/storagepool/aio/_configuration.py | 2 +- .../aio/_storage_pool_management.py | 5 + .../storagepool/aio/operations/__init__.py | 2 + .../operations/_disk_pool_zones_operations.py | 2 +- .../aio/operations/_disk_pools_operations.py | 140 +- .../operations/_iscsi_targets_operations.py | 10 +- .../storagepool/aio/operations/_operations.py | 2 +- .../operations/_resource_skus_operations.py} | 33 +- .../azure/mgmt/storagepool/models/__init__.py | 25 + .../azure/mgmt/storagepool/models/_models.py | 361 +- .../mgmt/storagepool/models/_models_py3.py | 380 +- .../models/_storage_pool_management_enums.py | 14 + .../mgmt/storagepool/operations/__init__.py | 2 + .../operations/_disk_pool_zones_operations.py | 2 +- .../operations/_disk_pools_operations.py | 142 +- .../operations/_iscsi_targets_operations.py | 10 +- .../storagepool/operations/_operations.py | 2 +- .../operations/_resource_skus_operations.py | 118 + sdk/synapse/azure-mgmt-synapse/CHANGELOG.md | 11 + sdk/synapse/azure-mgmt-synapse/_meta.json | 2 +- .../azure/mgmt/synapse/_metadata.json | 1 - .../synapse/_synapse_management_client.py | 5 - .../azure/mgmt/synapse/_version.py | 2 +- .../synapse/aio/_synapse_management_client.py | 5 - .../mgmt/synapse/aio/operations/__init__.py | 2 - .../aio/operations/_kusto_pools_operations.py | 67 + .../azure/mgmt/synapse/models/_models.py | 5 + .../azure/mgmt/synapse/models/_models_py3.py | 6 + .../azure/mgmt/synapse/operations/__init__.py | 2 - .../operations/_kusto_pools_operations.py | 68 + .../azure-synapse-accesscontrol/setup.py | 2 +- .../azure-synapse-artifacts/CHANGELOG.md | 14 +- .../synapse/artifacts/_artifacts_client.py | 157 +- .../azure/synapse/artifacts/_configuration.py | 2 +- .../azure/synapse/artifacts/_vendor.py | 27 + .../azure/synapse/artifacts/_version.py | 2 +- .../azure/synapse/artifacts/aio/__init__.py | 6 + .../artifacts/aio/_artifacts_client.py | 166 +- .../synapse/artifacts/aio/_configuration.py | 2 +- sdk/synapse/azure-synapse-artifacts/setup.py | 4 +- .../README.md | 8 +- .../setup.py | 3 +- sdk/synapse/azure-synapse-monitoring/setup.py | 2 +- sdk/synapse/azure-synapse-spark/CHANGELOG.md | 6 + sdk/synapse/azure-synapse-spark/setup.py | 2 +- sdk/tables/azure-data-tables/CHANGELOG.md | 27 +- .../azure/data/tables/_table_batch.py | 21 +- .../azure/data/tables/_table_client.py | 36 +- .../azure/data/tables/_version.py | 2 +- .../data/tables/aio/_table_batch_async.py | 13 +- .../data/tables/aio/_table_client_async.py | 39 +- ..._batch_async.test_async_batch_inserts.yaml | 272 + ...cosmos_async.test_async_batch_inserts.yaml | 252 + .../tests/test_table_batch_async.py | 26 + .../tests/test_table_batch_cosmos_async.py | 26 + sdk/tables/test-resources.json | 13 +- sdk/tables/tests.yml | 2 - sdk/template/tests.yml | 1 - .../azure-ai-textanalytics/CHANGELOG.md | 19 +- .../azure-ai-textanalytics/README.md | 30 +- .../azure/ai/textanalytics/__init__.py | 14 + .../azure/ai/textanalytics/_base_client.py | 33 +- .../_generated/_operations_mixin.py | 166 +- .../_generated/_text_analytics_client.py | 13 +- .../_generated/aio/_operations_mixin.py | 147 +- .../_generated/aio/_text_analytics_client.py | 14 +- .../ai/textanalytics/_generated/models.py | 2 +- .../_generated/v3_0/_metadata.json | 27 +- .../_generated/v3_0/_text_analytics_client.py | 56 +- .../textanalytics/_generated/v3_0/_vendor.py | 15 + .../v3_0/aio/_text_analytics_client.py | 56 +- .../_text_analytics_client_operations.py | 227 +- .../_generated/v3_0/models/_models.py | 687 +- .../_generated/v3_0/models/_models_py3.py | 687 +- .../models/_text_analytics_client_enums.py | 29 +- .../_text_analytics_client_operations.py | 400 +- .../_generated/v3_1/_metadata.json | 69 +- .../_generated/v3_1/_text_analytics_client.py | 59 +- .../textanalytics/_generated/v3_1/_vendor.py | 27 + .../v3_1/aio/_text_analytics_client.py | 59 +- .../_text_analytics_client_operations.py | 589 +- .../_generated/v3_1/models/_models.py | 1908 +- .../_generated/v3_1/models/_models_py3.py | 1908 +- .../models/_text_analytics_client_enums.py | 51 +- .../_text_analytics_client_operations.py | 1001 +- .../v3_2_preview_1/models/_models.py | 3106 -- .../v3_2_preview_1/models/_models_py3.py | 3496 -- .../__init__.py | 0 .../_configuration.py | 0 .../_metadata.json | 105 +- .../_text_analytics_client.py | 59 +- .../_generated/v3_2_preview_2/_vendor.py | 27 + .../aio/__init__.py | 0 .../aio/_configuration.py | 0 .../aio/_text_analytics_client.py | 59 +- .../aio/operations/__init__.py | 0 .../_text_analytics_client_operations.py | 633 +- .../models/__init__.py | 54 + .../v3_2_preview_2/models/_models.py | 4842 ++ .../v3_2_preview_2/models/_models_py3.py | 5312 ++ .../models/_text_analytics_client_enums.py | 53 +- .../operations/__init__.py | 0 .../_text_analytics_client_operations.py | 1048 +- .../_generated/v3_2_preview_2/py.typed | 1 + .../azure/ai/textanalytics/_lro.py | 72 +- .../azure/ai/textanalytics/_models.py | 444 +- .../ai/textanalytics/_request_handlers.py | 34 +- .../ai/textanalytics/_response_handlers.py | 139 +- .../textanalytics/_text_analytics_client.py | 198 +- .../azure/ai/textanalytics/_version.py | 4 +- .../textanalytics/aio/_base_client_async.py | 31 +- .../azure/ai/textanalytics/aio/_lro_async.py | 79 +- .../aio/_text_analytics_client_async.py | 199 +- .../azure-ai-textanalytics/samples/README.md | 9 + .../sample_multi_category_classify_async.py | 98 + .../sample_recognize_custom_entities_async.py | 94 + .../sample_single_category_classify_async.py | 97 + .../samples/sample_multi_category_classify.py | 89 + .../sample_recognize_custom_entities.py | 88 + .../sample_single_category_classify.py | 87 + .../text_samples/custom_classify_sample.txt | 1 + .../text_samples/custom_entities_sample.txt | 31 + .../azure-ai-textanalytics/setup.py | 3 +- .../azure-ai-textanalytics/swagger/README.md | 34 +- .../tests/asynctestcase.py | 6 +- .../action_error_no_target.json | 40 + .../action_error_with_targets.json | 175 + .../action_job_failure.json | 26 + ...l_passing_dict_extract_summary_action.yaml | 143 +- ...ccessful_passing_dict_key_phrase_task.yaml | 126 +- ...uccessful_passing_dict_sentiment_task.yaml | 96 +- ...sful_passing_string_pii_entities_task.yaml | 76 +- ...ing_text_document_input_entities_task.yaml | 77 +- ...alyze.test_analyze_continuation_token.yaml | 691 + .../test_analyze.test_bad_credentials.yaml | 32 +- ...est_bad_model_version_error_all_tasks.yaml | 35 +- ...ad_model_version_error_multiple_tasks.yaml | 34 +- ...ze.test_bad_request_on_empty_document.yaml | 18 +- ...est_analyze.test_custom_partial_error.yaml | 95 + ...est_analyze.test_disable_service_logs.yaml | 181 +- ...t_analyze.test_empty_credential_class.yaml | 32 +- ...t_extract_summary_action_with_options.yaml | 128 +- ....test_extract_summary_partial_results.yaml | 91 +- ...yze.test_invalid_language_hint_method.yaml | 192 +- ..._analyze.test_multi_category_classify.yaml | 88 + ..._analyze.test_multiple_of_same_action.yaml | 918 + ...e_of_same_action_with_partial_results.yaml | 184 + ...ages_of_results_returned_successfully.yaml | 321 +- ....test_out_of_order_ids_multiple_tasks.yaml | 142 +- ...lyze.test_partial_success_for_actions.yaml | 168 +- .../test_analyze.test_pass_cls.yaml | 71 +- ...yze.test_pii_action_categories_filter.yaml | 68 +- .../test_analyze.test_poller_metadata.yaml | 48 +- ...nalyze.test_recognize_custom_entities.yaml | 93 + ...ent_analysis_task_with_opinion_mining.yaml | 147 +- ...tats_and_model_version_multiple_tasks.yaml | 162 +- ...analyze.test_single_category_classify.yaml | 88 + .../test_analyze.test_too_many_documents.yaml | 44 +- ...l_passing_dict_extract_summary_action.yaml | 153 +- ...ccessful_passing_dict_key_phrase_task.yaml | 60 +- ...uccessful_passing_dict_sentiment_task.yaml | 136 +- ...sful_passing_string_pii_entities_task.yaml | 68 +- ...ing_text_document_input_entities_task.yaml | 69 +- ...async.test_analyze_continuation_token.yaml | 293 + ...st_analyze_async.test_bad_credentials.yaml | 34 +- ...est_bad_model_version_error_all_tasks.yaml | 37 +- ...ad_model_version_error_multiple_tasks.yaml | 36 +- ...nc.test_bad_request_on_empty_document.yaml | 20 +- ...alyze_async.test_custom_partial_error.yaml | 73 + ...alyze_async.test_disable_service_logs.yaml | 111 +- ...yze_async.test_empty_credential_class.yaml | 34 +- ...t_extract_summary_action_with_options.yaml | 132 +- ....test_extract_summary_partial_results.yaml | 85 +- ...ze_async.test_multi_category_classify.yaml | 66 + ...ze_async.test_multiple_of_same_action.yaml | 340 + ...e_of_same_action_with_partial_results.yaml | 129 + ...ages_of_results_returned_successfully.yaml | 301 +- ....test_out_of_order_ids_multiple_tasks.yaml | 148 +- ...sync.test_partial_success_for_actions.yaml | 108 +- .../test_analyze_async.test_pass_cls.yaml | 63 +- ...ync.test_pii_action_categories_filter.yaml | 52 +- ...st_analyze_async.test_poller_metadata.yaml | 62 +- ..._async.test_recognize_custom_entities.yaml | 71 + ...ent_analysis_task_with_opinion_mining.yaml | 133 +- ...tats_and_model_version_multiple_tasks.yaml | 118 +- ...e_async.test_single_category_classify.yaml | 66 + ...analyze_async.test_too_many_documents.yaml | 46 +- ...althcare.test_bad_model_version_error.yaml | 126 +- ..._analyze_healthcare.test_cancellation.yaml | 116 +- ...string_index_type_is_UnicodeCodePoint.yaml | 92 +- ..._healthcare.test_disable_service_logs.yaml | 24 +- ...t_attribute_error_no_result_attribute.yaml | 24 +- ...alyze_healthcare.test_document_errors.yaml | 24 +- ...e_healthcare.test_duplicate_ids_error.yaml | 10 +- ...e.test_explicit_set_string_index_type.yaml | 24 +- ..._healthcare.test_healthcare_assertion.yaml | 24 +- ...re.test_healthcare_continuation_token.yaml | 300 + ...ealthcare.test_input_with_some_errors.yaml | 24 +- ...hcare.test_invalid_language_hint_docs.yaml | 24 +- ...are.test_invalid_language_hint_method.yaml | 24 +- ...alyze_healthcare.test_normalized_text.yaml | 24 +- ...lyze_healthcare.test_out_of_order_ids.yaml | 24 +- ...test_analyze_healthcare.test_pass_cls.yaml | 24 +- ...e_healthcare.test_passing_only_string.yaml | 24 +- ...yze_healthcare.test_payload_too_large.yaml | 10 +- ...est_analyze_healthcare.test_relations.yaml | 24 +- ...are.test_show_stats_and_model_version.yaml | 24 +- ...ze_healthcare.test_too_many_documents.yaml | 10 +- ...st_analyze_healthcare.test_user_agent.yaml | 24 +- ...le_batch_language_hint_and_dict_input.yaml | 24 +- ...re_async.test_bad_model_version_error.yaml | 28 +- ...ze_healthcare_async.test_cancellation.yaml | 56 +- ...string_index_type_is_UnicodeCodePoint.yaml | 28 +- ...hcare_async.test_disable_service_logs.yaml | 28 +- ...healthcare_async.test_document_errors.yaml | 28 +- ...thcare_async.test_duplicate_ids_error.yaml | 12 +- ...c.test_explicit_set_string_index_type.yaml | 28 +- ...hcare_async.test_healthcare_assertion.yaml | 28 +- ...nc.test_healthcare_continuation_token.yaml | 96 + ...are_async.test_input_with_some_errors.yaml | 28 +- ...async.test_invalid_language_hint_docs.yaml | 28 +- ...ync.test_invalid_language_hint_method.yaml | 28 +- ...healthcare_async.test_normalized_text.yaml | 28 +- ...ealthcare_async.test_out_of_order_ids.yaml | 28 +- ...nalyze_healthcare_async.test_pass_cls.yaml | 28 +- ...thcare_async.test_passing_only_string.yaml | 28 +- ...althcare_async.test_payload_too_large.yaml | 12 +- ...alyze_healthcare_async.test_relations.yaml | 28 +- ...ync.test_show_stats_and_model_version.yaml | 28 +- ...lthcare_async.test_too_many_documents.yaml | 12 +- ...lyze_healthcare_async.test_user_agent.yaml | 28 +- ...le_batch_language_hint_and_dict_input.yaml | 28 +- ...ment.test_all_successful_passing_dict.yaml | 10 +- ...uccessful_passing_text_document_input.yaml | 10 +- ...nalyze_sentiment.test_bad_credentials.yaml | 8 +- ...entiment.test_bad_model_version_error.yaml | 10 +- ..._sentiment.test_batch_size_over_limit.yaml | 10 +- ...ment.test_batch_size_over_limit_error.yaml | 10 +- ...t_client_passed_default_language_hint.yaml | 30 +- ...string_index_type_is_UnicodeCodePoint.yaml | 10 +- ...e_sentiment.test_disable_service_logs.yaml | 10 +- ...t_attribute_error_no_result_attribute.yaml | 10 +- ...attribute_error_nonexistent_attribute.yaml | 10 +- ...nalyze_sentiment.test_document_errors.yaml | 10 +- ...lyze_sentiment.test_document_warnings.yaml | 10 +- ...ze_sentiment.test_duplicate_ids_error.yaml | 10 +- ...sentiment.test_empty_credential_class.yaml | 8 +- ...t.test_explicit_set_string_index_type.yaml | 10 +- ..._sentiment.test_input_with_all_errors.yaml | 10 +- ...sentiment.test_input_with_some_errors.yaml | 10 +- ...iment.test_invalid_language_hint_docs.yaml | 10 +- ...ent.test_invalid_language_hint_method.yaml | 10 +- ...sentiment.test_language_kwarg_spanish.yaml | 10 +- ....test_no_offset_v3_sentence_sentiment.yaml | 8 +- .../test_analyze_sentiment.test_offset.yaml | 10 +- ...analyze_sentiment.test_opinion_mining.yaml | 10 +- ..._opinion_mining_more_than_5_documents.yaml | 10 +- ...test_opinion_mining_no_mined_opinions.yaml | 10 +- ...t_opinion_mining_with_negated_opinion.yaml | 10 +- ...alyze_sentiment.test_out_of_order_ids.yaml | 10 +- ...iment.test_output_same_order_as_input.yaml | 10 +- .../test_analyze_sentiment.test_pass_cls.yaml | 10 +- ...ze_sentiment.test_passing_only_string.yaml | 10 +- ....test_per_item_dont_use_language_hint.yaml | 10 +- ...entiment.test_rotate_subscription_key.yaml | 28 +- ...ent.test_show_stats_and_model_version.yaml | 10 +- ...nt.test_string_index_type_not_fail_v3.yaml | 8 +- ...yze_sentiment.test_too_many_documents.yaml | 10 +- ...est_analyze_sentiment.test_user_agent.yaml | 10 +- ...st_whole_batch_dont_use_language_hint.yaml | 10 +- ...timent.test_whole_batch_language_hint.yaml | 10 +- ...le_batch_language_hint_and_dict_input.yaml | 10 +- ...language_hint_and_dict_per_item_hints.yaml | 10 +- ...ole_batch_language_hint_and_obj_input.yaml | 10 +- ..._language_hint_and_obj_per_item_hints.yaml | 10 +- ...sync.test_all_successful_passing_dict.yaml | 12 +- ...uccessful_passing_text_document_input.yaml | 12 +- ..._sentiment_async.test_bad_credentials.yaml | 10 +- ...nt_async.test_bad_model_version_error.yaml | 12 +- ...ment_async.test_batch_size_over_limit.yaml | 12 +- ...sync.test_batch_size_over_limit_error.yaml | 12 +- ...t_client_passed_default_language_hint.yaml | 36 +- ...string_index_type_is_UnicodeCodePoint.yaml | 12 +- ...iment_async.test_disable_service_logs.yaml | 12 +- ...t_attribute_error_no_result_attribute.yaml | 12 +- ...attribute_error_nonexistent_attribute.yaml | 12 +- ..._sentiment_async.test_document_errors.yaml | 12 +- ...entiment_async.test_document_warnings.yaml | 12 +- ...timent_async.test_duplicate_ids_error.yaml | 12 +- ...ent_async.test_empty_credential_class.yaml | 10 +- ...c.test_explicit_set_string_index_type.yaml | 12 +- ...ment_async.test_input_with_all_errors.yaml | 12 +- ...ent_async.test_input_with_some_errors.yaml | 12 +- ...async.test_invalid_language_hint_docs.yaml | 12 +- ...ync.test_invalid_language_hint_method.yaml | 12 +- ...ent_async.test_language_kwarg_spanish.yaml | 12 +- ....test_no_offset_v3_sentence_sentiment.yaml | 10 +- ...t_analyze_sentiment_async.test_offset.yaml | 12 +- ...e_sentiment_async.test_opinion_mining.yaml | 12 +- ..._opinion_mining_more_than_5_documents.yaml | 12 +- ...test_opinion_mining_no_mined_opinions.yaml | 12 +- ...t_opinion_mining_with_negated_opinion.yaml | 12 +- ...sentiment_async.test_out_of_order_ids.yaml | 12 +- ...async.test_output_same_order_as_input.yaml | 12 +- ...analyze_sentiment_async.test_pass_cls.yaml | 12 +- ...timent_async.test_passing_only_string.yaml | 12 +- ....test_per_item_dont_use_language_hint.yaml | 12 +- ...nt_async.test_rotate_subscription_key.yaml | 34 +- ...ync.test_show_stats_and_model_version.yaml | 12 +- ...nc.test_string_index_type_not_fail_v3.yaml | 10 +- ...ntiment_async.test_too_many_documents.yaml | 12 +- ...alyze_sentiment_async.test_user_agent.yaml | 12 +- ...st_whole_batch_dont_use_language_hint.yaml | 12 +- ..._async.test_whole_batch_language_hint.yaml | 12 +- ...le_batch_language_hint_and_dict_input.yaml | 12 +- ...language_hint_and_dict_per_item_hints.yaml | 12 +- ...ole_batch_language_hint_and_obj_input.yaml | 12 +- ..._language_hint_and_obj_per_item_hints.yaml | 12 +- ...uage.test_all_successful_passing_dict.yaml | 10 +- ...uccessful_passing_text_document_input.yaml | 10 +- ..._detect_language.test_bad_credentials.yaml | 8 +- ...language.test_bad_model_version_error.yaml | 10 +- ...t_language.test_batch_size_over_limit.yaml | 10 +- ...uage.test_batch_size_over_limit_error.yaml | 10 +- ...st_client_passed_default_country_hint.yaml | 30 +- ...tect_language.test_country_hint_kwarg.yaml | 10 +- ...etect_language.test_country_hint_none.yaml | 40 +- ...ct_language.test_disable_service_logs.yaml | 10 +- ...t_attribute_error_no_result_attribute.yaml | 10 +- ...attribute_error_nonexistent_attribute.yaml | 10 +- ..._detect_language.test_document_errors.yaml | 10 +- ...etect_language.test_document_warnings.yaml | 10 +- ...ect_language.test_duplicate_ids_error.yaml | 10 +- ..._language.test_empty_credential_class.yaml | 8 +- ...t_language.test_input_with_all_errors.yaml | 10 +- ..._language.test_input_with_some_errors.yaml | 10 +- ...nguage.test_invalid_country_hint_docs.yaml | 10 +- ...uage.test_invalid_country_hint_method.yaml | 10 +- ...detect_language.test_out_of_order_ids.yaml | 10 +- ...guage.test_output_same_order_as_input.yaml | 10 +- .../test_detect_language.test_pass_cls.yaml | 10 +- ...ect_language.test_passing_only_string.yaml | 10 +- ...e.test_per_item_dont_use_country_hint.yaml | 10 +- ...language.test_rotate_subscription_key.yaml | 28 +- ...age.test_show_stats_and_model_version.yaml | 10 +- ...ge.test_string_index_type_not_fail_v3.yaml | 8 +- .../test_detect_language.test_user_agent.yaml | 10 +- ...anguage.test_whole_batch_country_hint.yaml | 10 +- ...ole_batch_country_hint_and_dict_input.yaml | 10 +- ..._country_hint_and_dict_per_item_hints.yaml | 10 +- ...hole_batch_country_hint_and_obj_input.yaml | 10 +- ...h_country_hint_and_obj_per_item_hints.yaml | 10 +- ...est_whole_batch_dont_use_country_hint.yaml | 10 +- ...sync.test_all_successful_passing_dict.yaml | 12 +- ...uccessful_passing_text_document_input.yaml | 12 +- ...t_language_async.test_bad_credentials.yaml | 10 +- ...ge_async.test_bad_model_version_error.yaml | 12 +- ...uage_async.test_batch_size_over_limit.yaml | 12 +- ...sync.test_batch_size_over_limit_error.yaml | 12 +- ...st_client_passed_default_country_hint.yaml | 36 +- ...anguage_async.test_country_hint_kwarg.yaml | 12 +- ...language_async.test_country_hint_none.yaml | 48 +- ...guage_async.test_disable_service_logs.yaml | 12 +- ...t_attribute_error_no_result_attribute.yaml | 12 +- ...attribute_error_nonexistent_attribute.yaml | 12 +- ...t_language_async.test_document_errors.yaml | 12 +- ...language_async.test_document_warnings.yaml | 12 +- ...nguage_async.test_duplicate_ids_error.yaml | 12 +- ...age_async.test_empty_credential_class.yaml | 10 +- ...uage_async.test_input_with_all_errors.yaml | 12 +- ...age_async.test_input_with_some_errors.yaml | 12 +- ..._async.test_invalid_country_hint_docs.yaml | 12 +- ...sync.test_invalid_country_hint_method.yaml | 12 +- ..._language_async.test_out_of_order_ids.yaml | 12 +- ...async.test_output_same_order_as_input.yaml | 12 +- ...t_detect_language_async.test_pass_cls.yaml | 12 +- ...nguage_async.test_passing_only_string.yaml | 12 +- ...c.test_per_item_dont_use_country_hint.yaml | 12 +- ...ge_async.test_rotate_subscription_key.yaml | 34 +- ...ync.test_show_stats_and_model_version.yaml | 12 +- ...nc.test_string_index_type_not_fail_v3.yaml | 10 +- ...detect_language_async.test_user_agent.yaml | 12 +- ...e_async.test_whole_batch_country_hint.yaml | 12 +- ...ole_batch_country_hint_and_dict_input.yaml | 12 +- ..._country_hint_and_dict_per_item_hints.yaml | 12 +- ...hole_batch_country_hint_and_obj_input.yaml | 12 +- ...h_country_hint_and_obj_per_item_hints.yaml | 12 +- ...est_whole_batch_dont_use_country_hint.yaml | 12 +- .../test_encoding.test_diacritics_nfc.yaml | 10 +- .../test_encoding.test_diacritics_nfd.yaml | 10 +- .../recordings/test_encoding.test_emoji.yaml | 10 +- .../test_encoding.test_emoji_family.yaml | 10 +- ..._emoji_family_with_skin_tone_modifier.yaml | 10 +- ...ng.test_emoji_with_skin_tone_modifier.yaml | 10 +- .../test_encoding.test_korean_nfc.yaml | 10 +- .../test_encoding.test_korean_nfd.yaml | 10 +- .../test_encoding.test_zalgo_text.yaml | 10 +- ...st_encoding_async.test_diacritics_nfc.yaml | 12 +- ...st_encoding_async.test_diacritics_nfd.yaml | 12 +- .../test_encoding_async.test_emoji.yaml | 12 +- ...test_encoding_async.test_emoji_family.yaml | 12 +- ..._emoji_family_with_skin_tone_modifier.yaml | 12 +- ...nc.test_emoji_with_skin_tone_modifier.yaml | 12 +- .../test_encoding_async.test_korean_nfc.yaml | 12 +- .../test_encoding_async.test_korean_nfd.yaml | 12 +- .../test_encoding_async.test_zalgo_text.yaml | 12 +- ...ases.test_all_successful_passing_dict.yaml | 10 +- ...uccessful_passing_text_document_input.yaml | 10 +- ...ract_key_phrases.test_bad_credentials.yaml | 8 +- ..._phrases.test_bad_model_version_error.yaml | 10 +- ...ey_phrases.test_batch_size_over_limit.yaml | 10 +- ...ases.test_batch_size_over_limit_error.yaml | 10 +- ...t_client_passed_default_language_hint.yaml | 30 +- ...key_phrases.test_disable_service_logs.yaml | 10 +- ...t_attribute_error_no_result_attribute.yaml | 10 +- ...attribute_error_nonexistent_attribute.yaml | 10 +- ...ract_key_phrases.test_document_errors.yaml | 10 +- ..._key_phrases.test_duplicate_ids_error.yaml | 10 +- ...y_phrases.test_empty_credential_class.yaml | 8 +- ...ey_phrases.test_input_with_all_errors.yaml | 10 +- ...y_phrases.test_input_with_some_errors.yaml | 10 +- ...rases.test_invalid_language_hint_docs.yaml | 10 +- ...ses.test_invalid_language_hint_method.yaml | 10 +- ...y_phrases.test_language_kwarg_spanish.yaml | 10 +- ...act_key_phrases.test_out_of_order_ids.yaml | 10 +- ...rases.test_output_same_order_as_input.yaml | 10 +- ...est_extract_key_phrases.test_pass_cls.yaml | 10 +- ..._key_phrases.test_passing_only_string.yaml | 10 +- ....test_per_item_dont_use_language_hint.yaml | 10 +- ..._phrases.test_rotate_subscription_key.yaml | 28 +- ...ses.test_show_stats_and_model_version.yaml | 10 +- ...es.test_string_index_type_not_fail_v3.yaml | 8 +- ...t_key_phrases.test_too_many_documents.yaml | 10 +- ...t_extract_key_phrases.test_user_agent.yaml | 10 +- ...st_whole_batch_dont_use_language_hint.yaml | 10 +- ...hrases.test_whole_batch_language_hint.yaml | 10 +- ...language_hint_and_dict_per_item_hints.yaml | 10 +- ...ole_batch_language_hint_and_obj_input.yaml | 14 +- ..._language_hint_and_obj_per_item_hints.yaml | 14 +- ...sync.test_all_successful_passing_dict.yaml | 12 +- ...uccessful_passing_text_document_input.yaml | 12 +- ...ey_phrases_async.test_bad_credentials.yaml | 10 +- ...es_async.test_bad_model_version_error.yaml | 12 +- ...ases_async.test_batch_size_over_limit.yaml | 12 +- ...sync.test_batch_size_over_limit_error.yaml | 12 +- ...t_client_passed_default_language_hint.yaml | 36 +- ...rases_async.test_disable_service_logs.yaml | 12 +- ...t_attribute_error_no_result_attribute.yaml | 12 +- ...attribute_error_nonexistent_attribute.yaml | 12 +- ...ey_phrases_async.test_document_errors.yaml | 12 +- ...hrases_async.test_duplicate_ids_error.yaml | 12 +- ...ses_async.test_empty_credential_class.yaml | 10 +- ...ases_async.test_input_with_all_errors.yaml | 12 +- ...ses_async.test_input_with_some_errors.yaml | 12 +- ...async.test_invalid_language_hint_docs.yaml | 12 +- ...ync.test_invalid_language_hint_method.yaml | 12 +- ...ses_async.test_language_kwarg_spanish.yaml | 12 +- ...y_phrases_async.test_out_of_order_ids.yaml | 12 +- ...async.test_output_same_order_as_input.yaml | 12 +- ...tract_key_phrases_async.test_pass_cls.yaml | 12 +- ...hrases_async.test_passing_only_string.yaml | 12 +- ....test_per_item_dont_use_language_hint.yaml | 12 +- ...es_async.test_rotate_subscription_key.yaml | 34 +- ...ync.test_show_stats_and_model_version.yaml | 12 +- ...nc.test_string_index_type_not_fail_v3.yaml | 10 +- ...phrases_async.test_too_many_documents.yaml | 12 +- ...act_key_phrases_async.test_user_agent.yaml | 12 +- ...st_whole_batch_dont_use_language_hint.yaml | 12 +- ..._async.test_whole_batch_language_hint.yaml | 12 +- ...language_hint_and_dict_per_item_hints.yaml | 12 +- ...ole_batch_language_hint_and_obj_input.yaml | 16 +- ..._language_hint_and_obj_per_item_hints.yaml | 16 +- ...ties.test_all_successful_passing_dict.yaml | 10 +- ...uccessful_passing_text_document_input.yaml | 10 +- ...cognize_entities.test_bad_credentials.yaml | 8 +- ...entities.test_bad_model_version_error.yaml | 10 +- ...e_entities.test_batch_size_over_limit.yaml | 10 +- ...ties.test_batch_size_over_limit_error.yaml | 10 +- ...t_client_passed_default_language_hint.yaml | 30 +- ...string_index_type_is_UnicodeCodePoint.yaml | 10 +- ...ze_entities.test_disable_service_logs.yaml | 10 +- ...t_attribute_error_no_result_attribute.yaml | 10 +- ...attribute_error_nonexistent_attribute.yaml | 10 +- ...cognize_entities.test_document_errors.yaml | 10 +- ...gnize_entities.test_document_warnings.yaml | 10 +- ...ize_entities.test_duplicate_ids_error.yaml | 10 +- ..._entities.test_empty_credential_class.yaml | 8 +- ...s.test_explicit_set_string_index_type.yaml | 10 +- ...e_entities.test_input_with_all_errors.yaml | 10 +- ..._entities.test_input_with_some_errors.yaml | 10 +- ...ities.test_invalid_language_hint_docs.yaml | 10 +- ...ies.test_invalid_language_hint_method.yaml | 10 +- ..._entities.test_language_kwarg_spanish.yaml | 10 +- ...est_no_offset_v3_categorized_entities.yaml | 8 +- .../test_recognize_entities.test_offset.yaml | 10 +- ...ognize_entities.test_out_of_order_ids.yaml | 10 +- ...ities.test_output_same_order_as_input.yaml | 10 +- ...test_recognize_entities.test_pass_cls.yaml | 10 +- ...ize_entities.test_passing_only_string.yaml | 10 +- ....test_per_item_dont_use_language_hint.yaml | 10 +- ...entities.test_rotate_subscription_key.yaml | 28 +- ...ies.test_show_stats_and_model_version.yaml | 10 +- ...es.test_string_index_type_not_fail_v3.yaml | 8 +- ...nize_entities.test_too_many_documents.yaml | 10 +- ...st_recognize_entities.test_user_agent.yaml | 10 +- ...st_whole_batch_dont_use_language_hint.yaml | 10 +- ...tities.test_whole_batch_language_hint.yaml | 10 +- ...language_hint_and_dict_per_item_hints.yaml | 10 +- ...ole_batch_language_hint_and_obj_input.yaml | 10 +- ..._language_hint_and_obj_per_item_hints.yaml | 10 +- ...sync.test_all_successful_passing_dict.yaml | 12 +- ...uccessful_passing_text_document_input.yaml | 12 +- ...e_entities_async.test_bad_credentials.yaml | 10 +- ...es_async.test_bad_model_version_error.yaml | 12 +- ...ties_async.test_batch_size_over_limit.yaml | 10 +- ...sync.test_batch_size_over_limit_error.yaml | 12 +- ...t_client_passed_default_language_hint.yaml | 36 +- ...string_index_type_is_UnicodeCodePoint.yaml | 12 +- ...ities_async.test_disable_service_logs.yaml | 12 +- ...t_attribute_error_no_result_attribute.yaml | 12 +- ...attribute_error_nonexistent_attribute.yaml | 12 +- ...e_entities_async.test_document_errors.yaml | 12 +- ...entities_async.test_document_warnings.yaml | 12 +- ...tities_async.test_duplicate_ids_error.yaml | 12 +- ...ies_async.test_empty_credential_class.yaml | 10 +- ...c.test_explicit_set_string_index_type.yaml | 12 +- ...ties_async.test_input_with_all_errors.yaml | 12 +- ...ies_async.test_input_with_some_errors.yaml | 12 +- ...async.test_invalid_language_hint_docs.yaml | 12 +- ...ync.test_invalid_language_hint_method.yaml | 12 +- ...ies_async.test_language_kwarg_spanish.yaml | 12 +- ...est_no_offset_v3_categorized_entities.yaml | 10 +- ..._recognize_entities_async.test_offset.yaml | 12 +- ..._entities_async.test_out_of_order_ids.yaml | 12 +- ...async.test_output_same_order_as_input.yaml | 12 +- ...ecognize_entities_async.test_pass_cls.yaml | 12 +- ...tities_async.test_passing_only_string.yaml | 12 +- ....test_per_item_dont_use_language_hint.yaml | 12 +- ...es_async.test_rotate_subscription_key.yaml | 34 +- ...ync.test_show_stats_and_model_version.yaml | 12 +- ...nc.test_string_index_type_not_fail_v3.yaml | 10 +- ...ntities_async.test_too_many_documents.yaml | 12 +- ...ognize_entities_async.test_user_agent.yaml | 12 +- ...st_whole_batch_dont_use_language_hint.yaml | 12 +- ..._async.test_whole_batch_language_hint.yaml | 12 +- ...language_hint_and_dict_per_item_hints.yaml | 12 +- ...ole_batch_language_hint_and_obj_input.yaml | 12 +- ..._language_hint_and_obj_per_item_hints.yaml | 12 +- ...ties.test_all_successful_passing_dict.yaml | 10 +- ...uccessful_passing_text_document_input.yaml | 10 +- ..._linked_entities.test_bad_credentials.yaml | 8 +- ...entities.test_bad_model_version_error.yaml | 10 +- ...d_entities.test_batch_size_over_limit.yaml | 10 +- ...ties.test_batch_size_over_limit_error.yaml | 10 +- ...ecognize_linked_entities.test_bing_id.yaml | 10 +- ...t_client_passed_default_language_hint.yaml | 30 +- ...string_index_type_is_UnicodeCodePoint.yaml | 10 +- ...ed_entities.test_disable_service_logs.yaml | 10 +- ...t_attribute_error_no_result_attribute.yaml | 10 +- ...attribute_error_nonexistent_attribute.yaml | 10 +- ..._linked_entities.test_document_errors.yaml | 10 +- ...inked_entities.test_document_warnings.yaml | 10 +- ...ked_entities.test_duplicate_ids_error.yaml | 10 +- ..._entities.test_empty_credential_class.yaml | 8 +- ...s.test_explicit_set_string_index_type.yaml | 10 +- ...d_entities.test_input_with_all_errors.yaml | 10 +- ..._entities.test_input_with_some_errors.yaml | 10 +- ...ities.test_invalid_language_hint_docs.yaml | 10 +- ...ies.test_invalid_language_hint_method.yaml | 10 +- ..._entities.test_language_kwarg_spanish.yaml | 10 +- ...test_no_offset_v3_linked_entity_match.yaml | 8 +- ...recognize_linked_entities.test_offset.yaml | 10 +- ...linked_entities.test_out_of_order_ids.yaml | 10 +- ...ities.test_output_same_order_as_input.yaml | 10 +- ...cognize_linked_entities.test_pass_cls.yaml | 10 +- ...ked_entities.test_passing_only_string.yaml | 10 +- ....test_per_item_dont_use_language_hint.yaml | 10 +- ...entities.test_rotate_subscription_key.yaml | 28 +- ...ies.test_show_stats_and_model_version.yaml | 10 +- ...es.test_string_index_type_not_fail_v3.yaml | 8 +- ...nked_entities.test_too_many_documents.yaml | 10 +- ...gnize_linked_entities.test_user_agent.yaml | 10 +- ...st_whole_batch_dont_use_language_hint.yaml | 10 +- ...tities.test_whole_batch_language_hint.yaml | 8 +- ...language_hint_and_dict_per_item_hints.yaml | 10 +- ...ole_batch_language_hint_and_obj_input.yaml | 10 +- ..._language_hint_and_obj_per_item_hints.yaml | 10 +- ...sync.test_all_successful_passing_dict.yaml | 12 +- ...uccessful_passing_text_document_input.yaml | 12 +- ...d_entities_async.test_bad_credentials.yaml | 10 +- ...es_async.test_bad_model_version_error.yaml | 12 +- ...ties_async.test_batch_size_over_limit.yaml | 10 +- ...sync.test_batch_size_over_limit_error.yaml | 12 +- ...ze_linked_entities_async.test_bing_id.yaml | 12 +- ...t_client_passed_default_language_hint.yaml | 36 +- ...string_index_type_is_UnicodeCodePoint.yaml | 12 +- ...ities_async.test_disable_service_logs.yaml | 12 +- ...t_attribute_error_no_result_attribute.yaml | 12 +- ...attribute_error_nonexistent_attribute.yaml | 12 +- ...d_entities_async.test_document_errors.yaml | 12 +- ...entities_async.test_document_warnings.yaml | 12 +- ...tities_async.test_duplicate_ids_error.yaml | 12 +- ...ies_async.test_empty_credential_class.yaml | 10 +- ...c.test_explicit_set_string_index_type.yaml | 12 +- ...ties_async.test_input_with_all_errors.yaml | 12 +- ...ies_async.test_input_with_some_errors.yaml | 12 +- ...async.test_invalid_language_hint_docs.yaml | 10 +- ...ync.test_invalid_language_hint_method.yaml | 12 +- ...ies_async.test_language_kwarg_spanish.yaml | 12 +- ...test_no_offset_v3_linked_entity_match.yaml | 10 +- ...ize_linked_entities_async.test_offset.yaml | 12 +- ..._entities_async.test_out_of_order_ids.yaml | 12 +- ...async.test_output_same_order_as_input.yaml | 12 +- ...e_linked_entities_async.test_pass_cls.yaml | 12 +- ...tities_async.test_passing_only_string.yaml | 12 +- ....test_per_item_dont_use_language_hint.yaml | 12 +- ...es_async.test_rotate_subscription_key.yaml | 34 +- ...ync.test_show_stats_and_model_version.yaml | 12 +- ...nc.test_string_index_type_not_fail_v3.yaml | 10 +- ...ntities_async.test_too_many_documents.yaml | 10 +- ...linked_entities_async.test_user_agent.yaml | 12 +- ...st_whole_batch_dont_use_language_hint.yaml | 12 +- ..._async.test_whole_batch_language_hint.yaml | 12 +- ...language_hint_and_dict_per_item_hints.yaml | 12 +- ...ole_batch_language_hint_and_obj_input.yaml | 10 +- ..._language_hint_and_obj_per_item_hints.yaml | 12 +- ...ties.test_all_successful_passing_dict.yaml | 10 +- ...uccessful_passing_text_document_input.yaml | 10 +- ...ize_pii_entities.test_bad_credentials.yaml | 8 +- ...entities.test_bad_model_version_error.yaml | 10 +- ...i_entities.test_batch_size_over_limit.yaml | 10 +- ...ties.test_batch_size_over_limit_error.yaml | 10 +- ...e_pii_entities.test_categories_filter.yaml | 20 +- ..._categories_filter_with_domain_filter.yaml | 10 +- ...t_client_passed_default_language_hint.yaml | 30 +- ...string_index_type_is_UnicodeCodePoint.yaml | 10 +- ...ii_entities.test_disable_service_logs.yaml | 10 +- ...t_attribute_error_no_result_attribute.yaml | 10 +- ...attribute_error_nonexistent_attribute.yaml | 10 +- ...ize_pii_entities.test_document_errors.yaml | 10 +- ...e_pii_entities.test_document_warnings.yaml | 10 +- ...pii_entities.test_duplicate_ids_error.yaml | 10 +- ..._entities.test_empty_credential_class.yaml | 8 +- ...s.test_explicit_set_string_index_type.yaml | 10 +- ...i_entities.test_input_with_all_errors.yaml | 10 +- ..._entities.test_input_with_some_errors.yaml | 10 +- ...ities.test_invalid_language_hint_docs.yaml | 10 +- ...ies.test_invalid_language_hint_method.yaml | 10 +- ..._entities.test_language_kwarg_english.yaml | 10 +- ...ze_pii_entities.test_out_of_order_ids.yaml | 10 +- ...ities.test_output_same_order_as_input.yaml | 10 +- ..._recognize_pii_entities.test_pass_cls.yaml | 10 +- ...pii_entities.test_passing_only_string.yaml | 10 +- ....test_per_item_dont_use_language_hint.yaml | 10 +- ...e_pii_entities.test_phi_domain_filter.yaml | 10 +- ...gnize_pii_entities.test_redacted_text.yaml | 10 +- ...entities.test_rotate_subscription_key.yaml | 28 +- ...ies.test_show_stats_and_model_version.yaml | 10 +- ..._pii_entities.test_too_many_documents.yaml | 10 +- ...ecognize_pii_entities.test_user_agent.yaml | 10 +- ...st_whole_batch_dont_use_language_hint.yaml | 10 +- ...tities.test_whole_batch_language_hint.yaml | 10 +- ...language_hint_and_dict_per_item_hints.yaml | 10 +- ...ole_batch_language_hint_and_obj_input.yaml | 10 +- ..._language_hint_and_obj_per_item_hints.yaml | 10 +- ...sync.test_all_successful_passing_dict.yaml | 12 +- ...uccessful_passing_text_document_input.yaml | 12 +- ...i_entities_async.test_bad_credentials.yaml | 10 +- ...es_async.test_bad_model_version_error.yaml | 12 +- ...ties_async.test_batch_size_over_limit.yaml | 12 +- ...sync.test_batch_size_over_limit_error.yaml | 12 +- ...entities_async.test_categories_filter.yaml | 24 +- ..._categories_filter_with_domain_filter.yaml | 12 +- ...t_client_passed_default_language_hint.yaml | 36 +- ...string_index_type_is_UnicodeCodePoint.yaml | 12 +- ...ities_async.test_disable_service_logs.yaml | 12 +- ...t_attribute_error_no_result_attribute.yaml | 12 +- ...attribute_error_nonexistent_attribute.yaml | 10 +- ...i_entities_async.test_document_errors.yaml | 12 +- ...entities_async.test_document_warnings.yaml | 12 +- ...tities_async.test_duplicate_ids_error.yaml | 12 +- ...ies_async.test_empty_credential_class.yaml | 10 +- ...c.test_explicit_set_string_index_type.yaml | 12 +- ...ties_async.test_input_with_all_errors.yaml | 10 +- ...ies_async.test_input_with_some_errors.yaml | 12 +- ...async.test_invalid_language_hint_docs.yaml | 12 +- ...ync.test_invalid_language_hint_method.yaml | 10 +- ...ies_async.test_language_kwarg_english.yaml | 12 +- ..._entities_async.test_out_of_order_ids.yaml | 12 +- ...async.test_output_same_order_as_input.yaml | 12 +- ...nize_pii_entities_async.test_pass_cls.yaml | 12 +- ...tities_async.test_passing_only_string.yaml | 12 +- ....test_per_item_dont_use_language_hint.yaml | 12 +- ...entities_async.test_phi_domain_filter.yaml | 12 +- ...pii_entities_async.test_redacted_text.yaml | 12 +- ...es_async.test_rotate_subscription_key.yaml | 34 +- ...ync.test_show_stats_and_model_version.yaml | 12 +- ...ntities_async.test_too_many_documents.yaml | 12 +- ...ze_pii_entities_async.test_user_agent.yaml | 12 +- ...st_whole_batch_dont_use_language_hint.yaml | 12 +- ..._async.test_whole_batch_language_hint.yaml | 12 +- ...language_hint_and_dict_per_item_hints.yaml | 12 +- ...ole_batch_language_hint_and_obj_input.yaml | 12 +- ..._language_hint_and_obj_per_item_hints.yaml | 12 +- .../tests/test_analyze.py | 601 +- .../tests/test_analyze_async.py | 662 +- .../tests/test_analyze_healthcare.py | 35 + .../tests/test_analyze_healthcare_async.py | 39 + .../tests/test_multiapi.py | 6 +- .../tests/test_multiapi_async.py | 6 +- .../tests/test_recognize_pii_entities.py | 2 +- .../test_recognize_pii_entities_async.py | 2 +- .../azure-ai-textanalytics/tests/testcase.py | 8 + sdk/textanalytics/test-resources.json | 8 - sdk/textanalytics/tests.yml | 19 +- .../test_translation.test_empty_document.yaml | 155 +- ...translation_async.test_empty_document.yaml | 293 +- .../tests/test_translation.py | 2 +- .../tests/test_translation_async.py | 2 +- sdk/translation/tests.yml | 1 - .../CHANGELOG.md | 20 +- .../azure-media-videoanalyzer-edge/README.md | 6 +- .../azure/media/videoanalyzeredge/__init__.py | 9 + .../videoanalyzeredge/_generated/_vendor.py | 15 + .../_generated/models/__init__.py | 89 + .../_azure_video_analyzerfor_edge_enums.py | 83 +- .../_generated/models/_models.py | 2949 +- .../_generated/models/_models_py3.py | 3151 +- .../azure/media/videoanalyzeredge/_version.py | 2 +- .../samples/sample_lva.py | 103 +- .../swagger/autorest.md | 2 +- .../azure-mgmt-videoanalyzer/CHANGELOG.md | 47 + .../azure-mgmt-videoanalyzer/_meta.json | 11 +- .../mgmt/videoanalyzer/_configuration.py | 2 +- .../azure/mgmt/videoanalyzer/_metadata.json | 21 +- .../azure/mgmt/videoanalyzer/_version.py | 2 +- .../mgmt/videoanalyzer/_video_analyzer.py | 68 +- .../mgmt/videoanalyzer/aio/_configuration.py | 2 +- .../mgmt/videoanalyzer/aio/_video_analyzer.py | 68 +- .../videoanalyzer/aio/operations/__init__.py | 26 +- .../operations/_access_policies_operations.py | 58 +- .../operations/_edge_modules_operations.py | 54 +- ..._pipeline_operation_statuses_operations.py | 110 + .../operations/_live_pipelines_operations.py | 650 + .../aio/operations/_locations_operations.py | 6 +- .../_operation_results_operations.py | 112 + .../_operation_statuses_operations.py | 110 + .../aio/operations/_operations.py | 4 +- ...eline_job_operation_statuses_operations.py | 110 + .../operations/_pipeline_jobs_operations.py | 531 + .../_pipeline_topologies_operations.py | 417 + ...private_endpoint_connections_operations.py | 306 + .../_private_link_resources_operations.py | 167 + ...o_analyzer_operation_results_operations.py | 104 + ..._analyzer_operation_statuses_operations.py | 102 + .../operations/_video_analyzers_operations.py | 274 +- .../aio/operations/_videos_operations.py | 86 +- .../mgmt/videoanalyzer/models/__init__.py | 224 +- .../mgmt/videoanalyzer/models/_models.py | 3176 +- .../mgmt/videoanalyzer/models/_models_py3.py | 3487 +- .../models/_video_analyzer_enums.py | 178 +- .../mgmt/videoanalyzer/operations/__init__.py | 26 +- .../operations/_access_policies_operations.py | 48 +- .../operations/_edge_modules_operations.py | 44 +- ..._pipeline_operation_statuses_operations.py | 115 + .../operations/_live_pipelines_operations.py | 663 + .../operations/_locations_operations.py | 4 +- .../_operation_results_operations.py | 117 + .../_operation_statuses_operations.py | 115 + .../videoanalyzer/operations/_operations.py | 2 +- ...eline_job_operation_statuses_operations.py | 115 + .../operations/_pipeline_jobs_operations.py | 542 + .../_pipeline_topologies_operations.py | 426 + ...private_endpoint_connections_operations.py | 314 + .../_private_link_resources_operations.py | 173 + ...o_analyzer_operation_results_operations.py | 109 + ..._analyzer_operation_statuses_operations.py | 107 + .../operations/_video_analyzers_operations.py | 261 +- .../operations/_videos_operations.py | 74 +- .../CHANGELOG.md | 27 +- .../MANIFEST.in | 2 +- .../README.md | 169 +- .../messaging/webpubsubservice/__init__.py | 235 +- .../webpubsubservice/_configuration.py | 80 + .../webpubsubservice/_operations/__init__.py | 13 + .../_operations/_operations.py | 2042 + .../messaging/webpubsubservice/_patch.py | 379 + .../messaging/webpubsubservice/_policies.py | 83 - .../messaging/webpubsubservice/_utils.py | 45 - .../messaging/webpubsubservice/_vendor.py | 21 + .../messaging/webpubsubservice/_version.py | 13 +- .../_web_pub_sub_service_client.py | 99 + .../azure/messaging/webpubsubservice/aio.py | 110 - .../webpubsubservice/aio/__init__.py | 16 + .../webpubsubservice/aio/_configuration.py | 76 + .../aio/_operations/__init__.py | 13 + .../aio/_operations/_operations.py | 1258 + .../messaging/webpubsubservice/aio/_patch.py | 249 + .../aio/_web_pub_sub_service_client.py | 94 + .../webpubsubservice/core/rest/_rest.py | 625 - .../webpubsubservice/core/rest/_rest_py3.py | 739 - .../azure/messaging/webpubsubservice/py.typed | 1 + .../azure/messaging/webpubsubservice/rest.py | 942 - .../dev_requirements.txt | 1 + .../examples/send_messages.py | 54 - .../samples/Readme.md | 52 + .../get_client_access_token.py} | 66 +- .../samples/get_client_access_token_async.py | 63 + .../samples/send_messages_aad.py | 72 + .../samples/send_messages_aad_apim_proxy.py | 75 + .../send_messages_connection_string.py | 70 + ...d_messages_connection_string_apim_proxy.py | 72 + .../azure-messaging-webpubsubservice/setup.py | 10 +- .../swagger/README.md | 247 + .../tests/conftest.py | 15 + .../test_smoke.test_add_user_to_group.yaml | 39 + ...st_smoke.test_get_client_access_token.yaml | 40 + ...st_hello_world_with_connection_string.yaml | 36 + ...o_world_with_connection_string_binary.yaml | 36 + ...llo_world_with_connection_string_json.yaml | 36 + .../test_smoke.test_no_users_groups.yaml | 70 + ...est_smoke.test_webpubsub_send_request.yaml | 36 + ...test_smoke.test_webpubsub_send_to_all.yaml | 36 + ...bsub_send_to_all_api_management_proxy.yaml | 34 + ...ke_async.test_get_client_access_token.yaml | 26 + ...st_hello_world_with_connection_string.yaml | 28 + ...o_world_with_connection_string_binary.yaml | 28 + ...llo_world_with_connection_string_json.yaml | 28 + ...test_smoke_async.test_no_users_groups.yaml | 50 + ...moke_async.test_webpubsub_send_to_all.yaml | 28 + ...test_webpubsub_send_to_all_apim_proxy.yaml | 27 + .../tests/test_jwt.py | 113 + .../tests/test_jwt_async.py | 115 + .../tests/test_reverse_proxy.py | 39 + .../tests/test_reverse_proxy_async.py | 39 + .../tests/test_send_requests.py | 38 - .../tests/test_smoke.py | 68 + .../tests/test_smoke_async.py | 51 + .../tests/testcase.py | 35 + .../tests/testcase_async.py | 25 + .../azure-mgmt-webpubsub/CHANGELOG.md | 18 + sdk/webpubsub/azure-mgmt-webpubsub/_meta.json | 11 +- .../azure/mgmt/webpubsub/_configuration.py | 2 +- .../azure/mgmt/webpubsub/_metadata.json | 5 +- .../azure/mgmt/webpubsub/_version.py | 2 +- .../_web_pub_sub_management_client.py | 5 + .../mgmt/webpubsub/aio/_configuration.py | 2 +- .../aio/_web_pub_sub_management_client.py | 5 + .../mgmt/webpubsub/aio/operations/__init__.py | 2 + .../webpubsub/aio/operations/_operations.py | 4 +- .../aio/operations/_usages_operations.py | 4 +- .../_web_pub_sub_hubs_operations.py | 438 + .../aio/operations/_web_pub_sub_operations.py | 130 +- ...private_endpoint_connections_operations.py | 22 +- ...b_sub_private_link_resources_operations.py | 4 +- ...hared_private_link_resources_operations.py | 28 +- .../azure/mgmt/webpubsub/models/__init__.py | 46 +- .../azure/mgmt/webpubsub/models/_models.py | 421 +- .../mgmt/webpubsub/models/_models_py3.py | 449 +- .../_web_pub_sub_management_client_enums.py | 28 +- .../mgmt/webpubsub/operations/__init__.py | 2 + .../mgmt/webpubsub/operations/_operations.py | 2 +- .../operations/_usages_operations.py | 2 +- .../_web_pub_sub_hubs_operations.py} | 441 +- .../operations/_web_pub_sub_operations.py | 101 +- ...private_endpoint_connections_operations.py | 12 +- ...b_sub_private_link_resources_operations.py | 2 +- ...hared_private_link_resources_operations.py | 16 +- sdk/webpubsub/tests.yml | 23 + shared_requirements.txt | 57 +- .../perfstress_tests/perf_stress_runner.py | 7 +- .../perfstress_tests/perf_stress_test.py | 21 +- .../devtools_testutils/__init__.py | 11 +- .../devtools_testutils/aio/__init__.py | 4 +- .../aio/proxy_testcase_async.py | 37 +- .../devtools_testutils/fake_credential.py | 2 + .../proxy_docker_startup.py | 160 + .../devtools_testutils/proxy_testcase.py | 67 +- .../devtools_testutils/storage/__init__.py | 5 +- .../devtools_testutils/storage/testcase.py | 70 +- .../swaggertosdk/SwaggerToSdkCore.py | 2 +- .../swaggertosdk/SwaggerToSdkNewCLI.py | 2 +- .../packaging_tools/templates/LICENSE.txt | 21 + .../packaging_tools/templates/MANIFEST.in | 2 +- 3675 files changed, 443689 insertions(+), 199059 deletions(-) create mode 100644 doc/dev/package_version/package_version_rule.md create mode 100644 doc/dev/package_version/version summary.xlsx create mode 100644 doc/dev/package_version/version_summary.png create mode 100644 eng/common/TestResources/clouds/AzureChinaCloud.json create mode 100644 eng/common/TestResources/clouds/AzureCloud.json create mode 100644 eng/common/TestResources/clouds/AzureUSGovernment.json create mode 100644 eng/common/pipelines/templates/steps/docker-pull-image.yml create mode 100644 eng/pipelines/templates/steps/targeting-string-resolve.yml create mode 100644 scripts/devops_tasks/trust_proxy_cert.py create mode 100644 sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/_meta.json create mode 100644 sdk/chaos/azure-mgmt-chaos/CHANGELOG.md create mode 100644 sdk/chaos/azure-mgmt-chaos/LICENSE.txt create mode 100644 sdk/chaos/azure-mgmt-chaos/MANIFEST.in create mode 100644 sdk/chaos/azure-mgmt-chaos/README.md create mode 100644 sdk/chaos/azure-mgmt-chaos/_meta.json create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/__init__.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/__init__.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01 => chaos/azure-mgmt-chaos/azure/mgmt/chaos}/__init__.py (85%) create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_chaos_management_client.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_configuration.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_metadata.json create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_version.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01 => chaos/azure-mgmt-chaos/azure/mgmt/chaos}/aio/__init__.py (82%) create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_chaos_management_client.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_configuration.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/__init__.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_capabilities_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_backend_address_pools_operations.py => chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_capability_types_operations.py} (58%) create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_experiments_operations.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_backend_address_pools_operations.py => chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_target_types_operations.py} (63%) create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_targets_operations.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/__init__.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_chaos_management_client_enums.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models_py3.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/__init__.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_capabilities_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_backend_address_pools_operations.py => chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_capability_types_operations.py} (58%) create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_experiments_operations.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_operations.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_target_types_operations.py create mode 100644 sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_targets_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01 => chaos/azure-mgmt-chaos/azure/mgmt/chaos}/py.typed (100%) create mode 100644 sdk/chaos/azure-mgmt-chaos/sdk_packaging.toml create mode 100644 sdk/chaos/azure-mgmt-chaos/setup.cfg create mode 100644 sdk/chaos/azure-mgmt-chaos/setup.py create mode 100644 sdk/chaos/ci.yml create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_language_parm_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_conversation_response_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_luis_response_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_qna_response_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_with_params_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app_language_parm.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_conversation_response.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_luis_response.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_qna_response.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_with_params.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_conversation_app_async.test_conversation_app.yaml create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_conversation_app_async.test_conversation_app_with_dictparams.yaml create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app.yaml create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app_with_model.yaml create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app_with_parameters.yaml create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_conversation_app_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_orchestration_app_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_orchestration_direct_async.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app.yaml create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app_with_model.yaml create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app_with_parameters.yaml create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_app.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_direct.py rename sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/{aio/operations => _operations}/__init__.py (100%) create mode 100644 sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/_operations.py rename sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/{operations => aio/_operations}/__init__.py (100%) create mode 100644 sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/_operations.py create mode 100644 sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_filter_dict_params.yaml create mode 100644 sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_filter_dict_params.yaml create mode 100644 sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_commitment_plans_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_available_endpoint_services_operations.py => cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_commitment_tiers_operations.py} (81%) create mode 100644 sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_deployments_operations.py create mode 100644 sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_commitment_plans_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_available_endpoint_services_operations.py => cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_commitment_tiers_operations.py} (81%) create mode 100644 sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deployments_operations.py create mode 100644 sdk/communication/azure-communication-identity/azure/communication/identity/_api_versions.py create mode 100644 sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_vendor.py create mode 100644 sdk/communication/azure-communication-identity/tests/asynctestcase.py create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_from_managed_identity.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_empty_token.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_expired_token.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_invalid_token.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_valid_token.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_from_managed_identity.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_empty_token.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_expired_token.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_invalid_token.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_valid_token.yaml create mode 100644 sdk/communication/azure-communication-identity/tests/testcase.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_filter_rules_operations.py => compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_placement_policies_operations.py} (63%) create mode 100644 sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_virtual_machines_operations.py create mode 100644 sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_placement_policies_operations.py create mode 100644 sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_virtual_machines_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_application_gateways_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_accesses_operations.py} (65%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_networks_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_encryption_sets_operations.py} (69%) create mode 100644 sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_restore_point_operations.py rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_namespaces_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disks_operations.py} (66%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_gateway_connections_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_snapshots_operations.py} (63%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_application_gateways_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_accesses_operations.py} (65%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_networks_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_encryption_sets_operations.py} (68%) create mode 100644 sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_restore_point_operations.py rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_namespaces_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disks_operations.py} (65%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_gateway_connections_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_snapshots_operations.py} (62%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_management_client_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_galleries_operations.py} (60%) create mode 100644 sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_gallery_image_versions_operations.py create mode 100644 sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_gallery_images_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_management_client_operations.py => compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_galleries_operations.py} (61%) create mode 100644 sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_gallery_image_versions_operations.py create mode 100644 sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_gallery_images_operations.py delete mode 100644 sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_base_2.yaml create mode 100644 sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_vendor.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/__init__.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_configuration.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_container_registry_management_client.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_metadata.json create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_version.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/__init__.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/_configuration.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/_container_registry_management_client.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/__init__.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_connected_registries_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_inbound_nat_rules_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_export_pipelines_operations.py} (68%) create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_import_pipelines_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_bgp_service_communities_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_operations.py} (80%) create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_pipeline_runs_operations.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_private_endpoint_connections_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_application_gateways_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_registries_operations.py} (65%) create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_replications_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_filter_rules_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_scope_maps_operations.py} (68%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_filter_rules_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_tokens_operations.py} (69%) create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_webhooks_operations.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/__init__.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_container_registry_management_client_enums.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_models.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_models_py3.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/__init__.py create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_connected_registries_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_inbound_nat_rules_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_export_pipelines_operations.py} (68%) create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_import_pipelines_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_bgp_service_communities_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_operations.py} (79%) create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_pipeline_runs_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_peerings_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_private_endpoint_connections_operations.py} (67%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_application_gateways_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_registries_operations.py} (64%) create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_replications_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_filter_rules_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_scope_maps_operations.py} (67%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_filter_rules_operations.py => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_tokens_operations.py} (68%) create mode 100644 sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_webhooks_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01 => containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview}/py.typed (100%) create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_configuration.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_container_service_client.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_metadata.json create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_configuration.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_container_service_client.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/__init__.py rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topic_event_subscriptions_operations.py => containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_agent_pools_operations.py} (61%) create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_maintenance_configurations_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_watchers_operations.py => containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_managed_clusters_operations.py} (58%) create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_link_resources_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_resolve_private_link_service_id_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_snapshots_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/__init__.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_container_service_client_enums.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models_py3.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/__init__.py rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topic_event_subscriptions_operations.py => containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_agent_pools_operations.py} (60%) create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_maintenance_configurations_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_watchers_operations.py => containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_managed_clusters_operations.py} (57%) create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_link_resources_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_resolve_private_link_service_id_operations.py create mode 100644 sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_snapshots_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01 => containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01}/py.typed (100%) create mode 100644 sdk/core/azure-core/tests/async_tests/test_content_length_checking_async.py create mode 100644 sdk/core/azure-core/tests/test_content_length_checking.py create mode 100644 sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_locations_operations.py create mode 100644 sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_locations_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/CHANGELOG.md create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/LICENSE.txt create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/MANIFEST.in create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/README.md create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/_meta.json create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/__init__.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/__init__.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/__init__.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_configuration.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_data_protection_client.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_metadata.json create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_version.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/__init__.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_configuration.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_data_protection_client.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/__init__.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuits_operations.py => dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_instances_operations.py} (59%) create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_policies_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_vault_operation_results_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_vaults_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_data_protection_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_data_protection_operations_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_export_jobs_operation_result_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_export_jobs_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_probes_operations.py => dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_jobs_operations.py} (77%) create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_operation_result_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_management_client_operations.py => dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_operation_status_operations.py} (61%) create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_recovery_points_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_resource_guards_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_restorable_time_ranges_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/__init__.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_data_protection_client_enums.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_models.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_models_py3.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/__init__.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuits_operations.py => dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_instances_operations.py} (58%) create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_policies_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_vault_operation_results_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_vaults_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_data_protection_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_data_protection_operations_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_export_jobs_operation_result_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_export_jobs_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_probes_operations.py => dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_jobs_operations.py} (76%) create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_operation_result_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_management_client_operations.py => dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_operation_status_operations.py} (62%) rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_frontend_ip_configurations_operations.py => dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_recovery_points_operations.py} (66%) create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_resource_guards_operations.py create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_restorable_time_ranges_operations.py rename sdk/{textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1 => dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection}/py.typed (100%) create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/sdk_packaging.toml create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/setup.cfg create mode 100644 sdk/dataprotection/azure-mgmt-dataprotection/setup.py create mode 100644 sdk/dataprotection/ci.yml create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/CHANGELOG.md create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/LICENSE.txt create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/MANIFEST.in create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/README.md create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/_meta.json create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/__init__.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/__init__.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/__init__.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_configuration.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_desktop_virtualization_api_client.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_metadata.json create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_version.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/__init__.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_configuration.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_desktop_virtualization_api_client.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/__init__.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_application_groups_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_applications_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_desktops_operations.py rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topics_operations.py => desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_host_pools_operations.py} (56%) create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_msix_images_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_msix_packages_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_private_link_resources_operations.py rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_registrations_operations.py => desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_scaling_plans_operations.py} (63%) create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_session_hosts_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_start_menu_items_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_user_sessions_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_workspaces_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/__init__.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_desktop_virtualization_api_client_enums.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_models.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_models_py3.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/__init__.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_application_groups_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_applications_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_load_balancing_rules_operations.py => desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_desktops_operations.py} (50%) rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topics_operations.py => desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_host_pools_operations.py} (56%) create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_msix_images_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_msix_packages_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_private_link_resources_operations.py rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_registrations_operations.py => desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_scaling_plans_operations.py} (63%) create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_session_hosts_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_load_balancers_operations.py => desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_start_menu_items_operations.py} (77%) create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_user_sessions_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_workspaces_operations.py create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/py.typed create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/sdk_packaging.toml create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.cfg create mode 100644 sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.py create mode 100644 sdk/desktopvirtualization/ci.yml create mode 100644 sdk/deviceupdate/azure-mgmt-deviceupdate/_meta.json create mode 100644 sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_device_update_operations.py create mode 100644 sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_private_link_resources_operations.py create mode 100644 sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_device_update_operations.py create mode 100644 sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_endpoint_connections_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_backend_address_pools_operations.py => deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_link_resources_operations.py} (67%) create mode 100644 sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_cncf_cloud_events_async.py create mode 100644 sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_cncf_cloud_events.py create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_as_list.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_base64_using_data.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_dict.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_none.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_str.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_with_extensions.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_as_list.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_base64_using_data.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_dict.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_none.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_str.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_with_extensions.yaml create mode 100644 sdk/eventgrid/azure-eventgrid/tests/test_cncf_events.py create mode 100644 sdk/eventgrid/azure-eventgrid/tests/test_cncf_events_async.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/__init__.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_configuration.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_event_hub_management_client.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_metadata.json create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_version.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/__init__.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/_configuration.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/_event_hub_management_client.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/__init__.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_clusters_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_configuration_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_consumer_groups_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_disaster_recovery_configs_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_event_hubs_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_namespaces_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_operations.py rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_channels_operations.py => eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_private_endpoint_connections_operations.py} (64%) create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_private_link_resources_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_schema_registry_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/__init__.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_event_hub_management_client_enums.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_models.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_models_py3.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/__init__.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_clusters_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_configuration_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_consumer_groups_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_disaster_recovery_configs_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_event_hubs_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_namespaces_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_operations.py rename sdk/{eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_channels_operations.py => eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_private_endpoint_connections_operations.py} (64%) create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_private_link_resources_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_schema_registry_operations.py create mode 100644 sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/py.typed create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/README.md create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/async_advanced_samples/sample_get_elements_with_spans_async.py create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/sample_get_elements_with_spans.py create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_words_on_document_line_async.py create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_get_words_on_document_line.py create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_custom_document_signature_field.yaml create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_custom_document_signature_field.yaml create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_get_children.test_document_line_get_words.yaml create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_get_children.test_document_line_get_words_error.yaml create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/tests/test_get_children.py create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth.test_multitenant_authentication_7_3_preview_mhsm.yaml create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth.test_multitenant_authentication_7_3_preview_vault.yaml create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_2016_10_01_vault.yaml create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_0_vault.yaml create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_1_vault.yaml create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_2_mhsm.yaml create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_2_vault.yaml create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_3_preview_mhsm.yaml create mode 100644 sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_3_preview_vault.yaml create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/__init__.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_configuration.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_key_vault_management_client.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_metadata.json create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_version.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/__init__.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/_configuration.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/_key_vault_management_client.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/__init__.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_keys_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_managed_hsms_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_mhsm_private_endpoint_connections_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_mhsm_private_link_resources_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01 => keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview}/aio/operations/_operations.py (93%) create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_private_link_resources_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_secrets_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_public_ip_addresses_operations.py => keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_vaults_operations.py} (58%) create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/__init__.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_key_vault_management_client_enums.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_models.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_models_py3.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/__init__.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_keys_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_managed_hsms_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_mhsm_private_endpoint_connections_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_mhsm_private_link_resources_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01 => keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview}/operations/_operations.py (92%) create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_private_link_resources_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_secrets_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_public_ip_addresses_operations.py => keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_vaults_operations.py} (57%) create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/py.typed create mode 100644 sdk/monitor/azure-mgmt-monitor/_meta.json create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_monitor_management_client_enums.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_monitor_management_client_enums.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/__init__.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01 => monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01}/_configuration.py (87%) create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_metadata.json create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_management_client.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/__init__.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01 => monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01}/aio/_configuration.py (87%) create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_management_client.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models_py3.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/py.typed create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_metadata.json create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_management_client.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_management_client.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models_py3.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_monitor_management_client_enums.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/py.typed create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_metadata.json create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_management_client.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_management_client.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models_py3.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_monitor_management_client_enums.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/py.typed create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_metadata.json create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_management_client.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_management_client.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models_py3.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_monitor_management_client_enums.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/__init__.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py create mode 100644 sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/py.typed delete mode 100644 sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_autoscale_settings.yaml delete mode 100644 sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_metric_alerts.yaml create mode 100644 sdk/monitor/azure-monitor-query/migration_guide.md delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_metadata.json delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_network_management_client.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/_network_management_client.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/__init__.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_default_security_rules_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_watchers_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_public_ip_addresses_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_peerings_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/__init__.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_models.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_models_py3.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_network_management_client_enums.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/__init__.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_service_providers_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_watchers_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_public_ip_addresses_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_filter_rules_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_usages_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_metadata.json delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_network_management_client.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/_network_management_client.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/__init__.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_default_security_rules_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_service_providers_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interface_ip_configurations_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_gateways_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/__init__.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_models.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_models_py3.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_network_management_client_enums.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/__init__.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_default_security_rules_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_ip_configurations_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_security_groups_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_gateways_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_metadata.json delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_network_management_client.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/_network_management_client.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/__init__.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuit_authorizations_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_service_providers_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interface_ip_configurations_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interface_load_balancers_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_usages_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_peerings_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/__init__.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_models.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_models_py3.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_network_management_client_enums.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/__init__.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_default_security_rules_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuit_authorizations_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_service_providers_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_frontend_ip_configurations_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interface_ip_configurations_operations.py delete mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_usages_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_02_01_preview}/__init__.py (100%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_02_01_preview}/_configuration.py (98%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_metadata.json create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_network_management_client.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_version.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_02_01_preview}/aio/__init__.py (100%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_02_01_preview}/aio/_configuration.py (98%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_network_management_client.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/__init__.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_connectivity_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_admin_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_user_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rule_collections_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_connectivity_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_connectivity_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_virtual_networks_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_groups_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_commits_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_deployment_status_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_effective_security_admin_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_managers_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_security_perimeters_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_perimeter_associable_resource_types_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_admin_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_user_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rule_collections_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/__init__.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models_py3.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_network_management_client_enums.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/__init__.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_connectivity_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_admin_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_user_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rule_collections_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_connectivity_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_connectivity_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_virtual_networks_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_groups_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_commits_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_deployment_status_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_effective_security_admin_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_managers_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_security_perimeters_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_perimeter_associable_resource_types_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_admin_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_user_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rule_collections_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rules_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/py.typed rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/__init__.py (100%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/_configuration.py (100%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_metadata.json create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_network_management_client.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_version.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/__init__.py (100%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/aio/_configuration.py (100%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/_network_management_client.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/__init__.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateway_private_endpoint_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_network_interface_load_balancers_operations.py => v2021_05_01/aio/operations/_application_gateway_private_link_resources_operations.py} (79%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_application_gateways_operations.py (79%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_application_security_groups_operations.py (84%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_available_endpoint_services_operations.py => v2021_05_01/aio/operations/_available_delegations_operations.py} (84%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_available_endpoint_services_operations.py (97%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_private_endpoint_types_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_load_balancer_network_interfaces_operations.py => v2021_05_01/aio/operations/_available_resource_group_delegations_operations.py} (81%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_load_balancer_load_balancing_rules_operations.py => v2021_05_01/aio/operations/_available_service_aliases_operations.py} (55%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_bgp_service_communities_operations.py => v2021_05_01/aio/operations/_azure_firewall_fqdn_tags_operations.py} (83%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_load_balancers_operations.py => v2021_05_01/aio/operations/_azure_firewalls_operations.py} (80%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_route_tables_operations.py => v2021_05_01/aio/operations/_bastion_hosts_operations.py} (80%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_bgp_service_communities_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_connection_monitors_operations.py (84%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_load_balancers_operations.py => v2021_05_01/aio/operations/_custom_ip_prefixes_operations.py} (72%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ddos_custom_policies_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ddos_protection_plans_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_default_security_rules_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_load_balancers_operations.py => v2021_05_01/aio/operations/_dscp_configuration_operations.py} (80%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/aio/operations/_express_route_circuit_authorizations_operations.py (95%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_express_route_circuit_peerings_operations.py => v2021_05_01/aio/operations/_express_route_circuit_connections_operations.py} (80%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_express_route_circuit_peerings_operations.py (95%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_express_route_circuits_operations.py (90%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_express_route_circuit_peerings_operations.py => v2021_05_01/aio/operations/_express_route_cross_connection_peerings_operations.py} (78%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_express_route_circuits_operations.py => v2021_05_01/aio/operations/_express_route_cross_connections_operations.py} (67%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_gateways_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_links_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_ports_locations_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_network_security_groups_operations.py => v2021_05_01/aio/operations/_express_route_ports_operations.py} (69%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/aio/operations/_express_route_service_providers_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_route_tables_operations.py => v2021_05_01/aio/operations/_firewall_policies_operations.py} (81%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_filter_values_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_overrides_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_express_route_circuit_authorizations_operations.py => v2021_05_01/aio/operations/_firewall_policy_rule_collection_groups_operations.py} (71%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_local_network_gateways_operations.py => v2021_05_01/aio/operations/_flow_logs_operations.py} (66%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_routes_operations.py => v2021_05_01/aio/operations/_hub_route_tables_operations.py} (77%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_hub_virtual_network_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_inbound_nat_rules_operations.py (93%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_inbound_security_rule_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ip_allocations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ip_groups_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_inbound_nat_rules_operations.py => v2021_05_01/aio/operations/_load_balancer_backend_address_pools_operations.py} (79%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/aio/operations/_load_balancer_frontend_ip_configurations_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_load_balancer_load_balancing_rules_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_load_balancer_network_interfaces_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_load_balancer_probes_operations.py => v2021_05_01/aio/operations/_load_balancer_outbound_rules_operations.py} (84%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_load_balancer_probes_operations.py (95%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_virtual_network_gateway_connections_operations.py => v2021_05_01/aio/operations/_load_balancers_operations.py} (65%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_local_network_gateways_operations.py (83%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_nat_gateways_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_subnets_operations.py => v2021_05_01/aio/operations/_nat_rules_operations.py} (73%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/aio/operations/_network_interface_ip_configurations_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/aio/operations/_network_interface_load_balancers_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_security_rules_operations.py => v2021_05_01/aio/operations/_network_interface_tap_configurations_operations.py} (72%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_network_interfaces_operations.py (81%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_network_interfaces_operations.py => v2021_05_01/aio/operations/_network_management_client_operations.py} (61%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_profiles_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_network_security_groups_operations.py (84%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_virtual_appliances_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_network_watchers_operations.py (85%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_operations.py (96%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_p2_svpn_gateways_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_packet_captures_operations.py (93%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_load_balancer_load_balancing_rules_operations.py => v2021_05_01/aio/operations/_peer_express_route_circuit_connections_operations.py} (70%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_dns_zone_groups_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_endpoints_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_network_interfaces_operations.py => v2021_05_01/aio/operations/_private_link_services_operations.py} (66%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_public_ip_addresses_operations.py (73%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_public_ip_prefixes_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_resource_navigation_links_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_local_network_gateways_operations.py => v2021_05_01/aio/operations/_route_filter_rules_operations.py} (75%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/aio/operations/_route_filters_operations.py (84%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_route_tables_operations.py (84%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/aio/operations/_routes_operations.py (95%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_subnets_operations.py => v2021_05_01/aio/operations/_routing_intent_operations.py} (73%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_route_filters_operations.py => v2021_05_01/aio/operations/_security_partner_providers_operations.py} (71%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/aio/operations/_security_rules_operations.py (95%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_association_links_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_route_filters_operations.py => v2021_05_01/aio/operations/_service_endpoint_policies_operations.py} (71%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_endpoint_policy_definitions_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_tag_information_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_network_management_client_operations.py => v2021_05_01/aio/operations/_service_tags_operations.py} (61%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_packet_captures_operations.py => v2021_05_01/aio/operations/_subnets_operations.py} (66%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_usages_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_security_rules_operations.py => v2021_05_01/aio/operations/_virtual_appliance_sites_operations.py} (73%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_appliance_skus_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_bgp_connection_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_bgp_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_subnets_operations.py => v2021_05_01/aio/operations/_virtual_hub_ip_configuration_operations.py} (74%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_routes_operations.py => v2021_05_01/aio/operations/_virtual_hub_route_table_v2_s_operations.py} (74%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hubs_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_virtual_network_gateways_operations.py => v2021_05_01/aio/operations/_virtual_network_gateway_connections_operations.py} (66%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_nat_rules_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/aio/operations/_virtual_network_gateways_operations.py (62%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_virtual_network_peerings_operations.py (93%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_application_security_groups_operations.py => v2021_05_01/aio/operations/_virtual_network_taps_operations.py} (71%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/aio/operations/_virtual_networks_operations.py (86%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_router_peerings_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_network_security_groups_operations.py => v2021_05_01/aio/operations/_virtual_routers_operations.py} (77%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_wans_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/aio/operations/_packet_captures_operations.py => v2021_05_01/aio/operations/_vpn_connections_operations.py} (64%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/aio/operations/_virtual_network_gateway_connections_operations.py => v2021_05_01/aio/operations/_vpn_gateways_operations.py} (64%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_link_connections_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_server_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_site_link_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/aio/operations/_load_balancer_backend_address_pools_operations.py => v2021_05_01/aio/operations/_vpn_site_links_operations.py} (71%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_sites_configuration_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_sites_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_web_application_firewall_policies_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_web_categories_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/__init__.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_models.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_models_py3.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_network_management_client_enums.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/__init__.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateway_private_endpoint_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_network_interface_load_balancers_operations.py => v2021_05_01/operations/_application_gateway_private_link_resources_operations.py} (79%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_application_gateways_operations.py (79%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/operations/_application_security_groups_operations.py (84%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_available_endpoint_services_operations.py => v2021_05_01/operations/_available_delegations_operations.py} (85%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_available_endpoint_services_operations.py (97%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_private_endpoint_types_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_load_balancer_network_interfaces_operations.py => v2021_05_01/operations/_available_resource_group_delegations_operations.py} (81%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_service_aliases_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_bgp_service_communities_operations.py => v2021_05_01/operations/_azure_firewall_fqdn_tags_operations.py} (83%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_load_balancers_operations.py => v2021_05_01/operations/_azure_firewalls_operations.py} (79%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_route_tables_operations.py => v2021_05_01/operations/_bastion_hosts_operations.py} (79%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_bgp_service_communities_operations.py (97%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_connection_monitors_operations.py (84%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_load_balancers_operations.py => v2021_05_01/operations/_custom_ip_prefixes_operations.py} (71%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ddos_custom_policies_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ddos_protection_plans_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_default_security_rules_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_load_balancers_operations.py => v2021_05_01/operations/_dscp_configuration_operations.py} (80%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_express_route_circuit_authorizations_operations.py (95%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_express_route_circuit_peerings_operations.py => v2021_05_01/operations/_express_route_circuit_connections_operations.py} (79%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_express_route_circuit_peerings_operations.py (95%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/operations/_express_route_circuits_operations.py (90%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_express_route_circuit_peerings_operations.py => v2021_05_01/operations/_express_route_cross_connection_peerings_operations.py} (78%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_express_route_circuits_operations.py => v2021_05_01/operations/_express_route_cross_connections_operations.py} (67%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_gateways_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_links_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_ports_locations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_ports_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/operations/_express_route_service_providers_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_route_tables_operations.py => v2021_05_01/operations/_firewall_policies_operations.py} (80%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_filter_values_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_overrides_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_express_route_circuit_authorizations_operations.py => v2021_05_01/operations/_firewall_policy_rule_collection_groups_operations.py} (70%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_local_network_gateways_operations.py => v2021_05_01/operations/_flow_logs_operations.py} (66%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_routes_operations.py => v2021_05_01/operations/_hub_route_tables_operations.py} (77%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_hub_virtual_network_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_inbound_nat_rules_operations.py (94%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_inbound_security_rule_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ip_allocations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ip_groups_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_inbound_nat_rules_operations.py => v2021_05_01/operations/_load_balancer_backend_address_pools_operations.py} (79%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/operations/_load_balancer_frontend_ip_configurations_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_load_balancer_load_balancing_rules_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_load_balancer_network_interfaces_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_load_balancer_probes_operations.py => v2021_05_01/operations/_load_balancer_outbound_rules_operations.py} (83%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_load_balancer_probes_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_virtual_network_gateway_connections_operations.py => v2021_05_01/operations/_load_balancers_operations.py} (64%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_local_network_gateways_operations.py (84%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_nat_gateways_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_local_network_gateways_operations.py => v2021_05_01/operations/_nat_rules_operations.py} (73%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_network_interface_ip_configurations_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_network_interface_load_balancers_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_security_rules_operations.py => v2021_05_01/operations/_network_interface_tap_configurations_operations.py} (71%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_network_interfaces_operations.py (81%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_network_interfaces_operations.py => v2021_05_01/operations/_network_management_client_operations.py} (61%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_profiles_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_network_security_groups_operations.py (85%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_virtual_appliances_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/operations/_network_watchers_operations.py (85%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/operations/_operations.py (97%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_p2_svpn_gateways_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_packet_captures_operations.py (93%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_load_balancer_load_balancing_rules_operations.py => v2021_05_01/operations/_peer_express_route_circuit_connections_operations.py} (70%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_dns_zone_groups_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_endpoints_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_network_interfaces_operations.py => v2021_05_01/operations/_private_link_services_operations.py} (65%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_public_ip_addresses_operations.py (73%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_public_ip_prefixes_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_resource_navigation_links_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_routes_operations.py => v2021_05_01/operations/_route_filter_rules_operations.py} (74%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_route_filters_operations.py (84%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/operations/_route_tables_operations.py (85%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_routes_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_subnets_operations.py => v2021_05_01/operations/_routing_intent_operations.py} (73%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_route_filters_operations.py => v2021_05_01/operations/_security_partner_providers_operations.py} (70%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01 => v2021_05_01}/operations/_security_rules_operations.py (96%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_association_links_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_route_filters_operations.py => v2021_05_01/operations/_service_endpoint_policies_operations.py} (71%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_endpoint_policy_definitions_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_tag_information_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_network_management_client_operations.py => v2021_05_01/operations/_service_tags_operations.py} (62%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_packet_captures_operations.py => v2021_05_01/operations/_subnets_operations.py} (65%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/operations/_usages_operations.py (96%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_security_rules_operations.py => v2021_05_01/operations/_virtual_appliance_sites_operations.py} (72%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_appliance_skus_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_bgp_connection_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_bgp_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_subnets_operations.py => v2021_05_01/operations/_virtual_hub_ip_configuration_operations.py} (73%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_route_table_v2_s_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hubs_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_virtual_network_gateways_operations.py => v2021_05_01/operations/_virtual_network_gateway_connections_operations.py} (66%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_virtual_network_peerings_operations.py => v2021_05_01/operations/_virtual_network_gateway_nat_rules_operations.py} (70%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_virtual_network_gateways_operations.py (62%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01 => v2021_05_01}/operations/_virtual_network_peerings_operations.py (93%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_application_security_groups_operations.py => v2021_05_01/operations/_virtual_network_taps_operations.py} (71%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01 => v2021_05_01}/operations/_virtual_networks_operations.py (86%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_router_peerings_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_network_security_groups_operations.py => v2021_05_01/operations/_virtual_routers_operations.py} (76%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_wans_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_09_01/operations/_packet_captures_operations.py => v2021_05_01/operations/_vpn_connections_operations.py} (63%) rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_11_01/operations/_virtual_network_gateway_connections_operations.py => v2021_05_01/operations/_vpn_gateways_operations.py} (63%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_link_connections_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_server_configurations_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_link_connections_operations.py rename sdk/network/azure-mgmt-network/azure/mgmt/network/{v2017_08_01/operations/_load_balancer_backend_address_pools_operations.py => v2021_05_01/operations/_vpn_site_links_operations.py} (71%) create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_sites_configuration_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_sites_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_web_application_firewall_policies_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_web_categories_operations.py create mode 100644 sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/py.typed create mode 100644 sdk/purview/azure-purview-administration/CHANGELOG.md create mode 100644 sdk/purview/azure-purview-administration/MANIFEST.in create mode 100644 sdk/purview/azure-purview-administration/README.md create mode 100644 sdk/purview/azure-purview-administration/azure/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/_version.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/_configuration.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/_purview_account_client.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/_vendor.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/_version.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_configuration.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_purview_account_client.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/_operations.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/_operations.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/account/py.typed create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_configuration.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_purview_metadata_policies_client.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_vendor.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_version.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_configuration.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_purview_metadata_policies_client.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/_operations.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/__init__.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/_operations.py create mode 100644 sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/py.typed create mode 100644 sdk/purview/azure-purview-administration/dev_requirements.txt create mode 100644 sdk/purview/azure-purview-administration/sdk_packaging.toml create mode 100644 sdk/purview/azure-purview-administration/setup.cfg create mode 100644 sdk/purview/azure-purview-administration/setup.py create mode 100644 sdk/purview/azure-purview-administration/swagger/README.md create mode 100644 sdk/purview/azure-purview-administration/tests/_util.py create mode 100644 sdk/purview/azure-purview-administration/tests/conftest.py create mode 100644 sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_basic_smoke_test.yaml create mode 100644 sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_collections_list.yaml create mode 100644 sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_meta_policy_smoke_test.yaml create mode 100644 sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_meta_roles_smoke_test.yaml create mode 100644 sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_basic_smoke_test.yaml create mode 100644 sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_collections_list.yaml create mode 100644 sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_metadata_policy_smoke_async.yaml create mode 100644 sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_metadata_role_smoke_async.yaml create mode 100644 sdk/purview/azure-purview-administration/tests/test_smoke.py create mode 100644 sdk/purview/azure-purview-administration/tests/test_smoke_async.py create mode 100644 sdk/purview/azure-purview-administration/tests/testcase.py create mode 100644 sdk/purview/azure-purview-administration/tests/testcase_async.py create mode 100644 sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_quota_operation_operations.py create mode 100644 sdk/quota/azure-mgmt-quota/azure/mgmt/quota/operations/_quota_operation_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_network_interfaces_operations.py => recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py} (78%) create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_network_interfaces_operations.py => recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py} (77%) create mode 100644 sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py create mode 100644 sdk/remoterendering/TestResources/testBox.fbx create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/CHANGELOG.md create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/MANIFEST.in create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/README.md create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_api_version.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_configuration.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_remote_rendering_rest_client.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_configuration_async.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_remote_rendering_rest_client_async.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/_remote_rendering_operations_async.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models_py3.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_remote_rendering_rest_client_enums.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/_remote_rendering_operations.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/py.typed create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_polling.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_remote_rendering_client.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/INFO.md create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixed_reality_token_credential.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixedreality_account_key_credential.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/static_access_token_credential.py rename sdk/{storage/azure-storage-file-datalake/tests/fake_credentials.py => remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/authentication_endpoint.py} (70%) create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixed_reality_token_credential.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixedreality_account_key_credential.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/static_access_token_credential.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_version.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/__init__.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_polling_async.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_remote_rendering_client_async.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/dev_requirements.txt create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/mypy.ini create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample_async.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/sdk_packaging.toml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/setup.cfg create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/setup.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/swagger/AUTOREST.md create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/conftest.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/preparers.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_missing_asset.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_no_access.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_unauthorized.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_session_request.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_simple_conversion.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_simple_session.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_missing_asset.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_no_access.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_unauthorized.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_session_request.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_simple_conversion.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_simple_session.yaml create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client.py create mode 100644 sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client_async.py create mode 100644 sdk/remoterendering/ci.yml create mode 100644 sdk/remoterendering/test-resources-post.ps1 create mode 100644 sdk/remoterendering/test-resources.json create mode 100644 sdk/remoterendering/tests.yml create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/CHANGELOG.md create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/LICENSE.txt create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/MANIFEST.in create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/README.md create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/_meta.json create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/__init__.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/__init__.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/__init__.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_appliances.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_configuration.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_metadata.json create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_version.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/__init__.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_appliances.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_configuration.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/__init__.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_networks_operations.py => resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/_appliances_operations.py} (60%) create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/__init__.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_appliances_enums.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_models.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_models_py3.py create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/__init__.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_networks_operations.py => resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/_appliances_operations.py} (59%) create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/py.typed create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/sdk_packaging.toml create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/setup.cfg create mode 100644 sdk/resourceconnector/azure-mgmt-resourceconnector/setup.py create mode 100644 sdk/resourceconnector/ci.yml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_abstract_avro_serializer.py rename sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/{_avro_serializer.py => _apache_avro_serializer.py} (62%) rename sdk/schemaregistry/{azure-schemaregistry/azure/schemaregistry/serializer => azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio}/__init__.py (92%) create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/_async_lru.py create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/_schema_registry_avro_serializer_async.py create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/exceptions.py create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/avro_serializer_async.py create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_receive_integration_async.py create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_send_integration_async.py rename sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/{ => sync_samples}/avro_serializer.py (100%) rename sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/{ => sync_samples}/eventhub_receive_integration.py (100%) rename sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/{ => sync_samples}/eventhub_send_integration.py (100%) create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/conftest.py create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_parse_error_schema_as_record.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_parse_record_name.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_serialize_primitive.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_serialize_record.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_parse_error_schema_as_record.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_parse_record_name.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_serialize_primitive.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_serialize_record.yaml create mode 100644 sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer_async.py create mode 100644 sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_vendor.py create mode 100644 sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/__init__.py create mode 100644 sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/_request_builders.py create mode 100644 sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/_request_builders_py3.py create mode 100644 sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_utils.py create mode 100644 sdk/servicebus/azure-servicebus/azure/servicebus/management/_api_version.py create mode 100644 sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_basic_v2017_04.yaml create mode 100644 sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_basic_v2017_04.yaml create mode 100644 sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_basic_v2017_04.yaml create mode 100644 sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_v2017_04.yaml create mode 100644 sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_queue_basic_v2017_04.yaml create mode 100644 sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_basic_v2017_04.yaml delete mode 100644 sdk/storage/azure-storage-blob-changefeed/tests/_shared/testcase.py rename sdk/storage/azure-storage-blob-changefeed/tests/{_shared => settings}/__init__.py (100%) rename sdk/storage/{azure-storage-file-share/tests/_shared => azure-storage-blob-changefeed/tests/settings}/settings_fake.py (65%) create mode 100644 sdk/storage/azure-storage-blob-changefeed/tests/settings/testcase.py delete mode 100644 sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_directory_operations.py delete mode 100644 sdk/storage/azure-storage-blob/azure/storage/blob/_generated/operations/_directory_operations.py create mode 100644 sdk/storage/azure-storage-blob/migration_guide.md delete mode 100644 sdk/storage/azure-storage-blob/tests/_shared/testcase.py delete mode 100644 sdk/storage/azure-storage-blob/tests/get_blob_to_stream_async.temp.4ebacace-c663-4994-b478-01affe7284f1.dat create mode 100644 sdk/storage/azure-storage-blob/tests/recordings/test_logging.test_logging_request_and_response_body.yaml create mode 100644 sdk/storage/azure-storage-blob/tests/recordings/test_logging_async.test_logging_request_and_response_body.yaml rename sdk/storage/azure-storage-blob/tests/{_shared => settings}/__init__.py (100%) create mode 100644 sdk/storage/azure-storage-blob/tests/settings/settings_fake.py create mode 100644 sdk/storage/azure-storage-blob/tests/settings/testcase.py delete mode 100644 sdk/storage/azure-storage-file-datalake/tests/asynctestcase.py create mode 100644 sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_simple_no_raise.yaml create mode 100644 sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_with_failed_subrequest.yaml create mode 100644 sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_simple_no_raise.yaml create mode 100644 sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_with_failed_subrequest.yaml rename sdk/storage/{azure-storage-file-share/tests/_shared => azure-storage-file-datalake/tests/settings}/__init__.py (100%) rename sdk/storage/{azure-storage-blob/tests/_shared => azure-storage-file-datalake/tests/settings}/settings_fake.py (63%) create mode 100644 sdk/storage/azure-storage-file-datalake/tests/settings/testcase.py delete mode 100644 sdk/storage/azure-storage-file-datalake/tests/testcase.py delete mode 100644 sdk/storage/azure-storage-file-share/tests/_shared/asynctestcase.py delete mode 100644 sdk/storage/azure-storage-file-share/tests/_shared/testcase.py create mode 100644 sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_snapshot_exists.yaml create mode 100644 sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_snapshot_exists.yaml rename sdk/storage/{azure-storage-queue/tests/_shared => azure-storage-file-share/tests/settings}/__init__.py (100%) create mode 100644 sdk/storage/azure-storage-file-share/tests/settings/settings_fake.py create mode 100644 sdk/storage/azure-storage-file-share/tests/settings/testcase.py delete mode 100644 sdk/storage/azure-storage-queue/tests/_shared/asynctestcase.py delete mode 100644 sdk/storage/azure-storage-queue/tests/_shared/testcase.py rename sdk/{webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core => storage/azure-storage-queue/tests/settings}/__init__.py (100%) rename sdk/storage/azure-storage-queue/tests/{_shared => settings}/service_versions.py (100%) rename sdk/storage/azure-storage-queue/tests/{_shared => settings}/settings_fake.py (65%) create mode 100644 sdk/storage/azure-storage-queue/tests/settings/testcase.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_usages_operations.py => storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_resource_skus_operations.py} (79%) create mode 100644 sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_resource_skus_operations.py create mode 100644 sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_vendor.py create mode 100644 sdk/tables/azure-data-tables/tests/recordings/test_table_batch_async.test_async_batch_inserts.yaml create mode 100644 sdk/tables/azure-data-tables/tests/recordings/test_table_batch_cosmos_async.test_async_batch_inserts.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_vendor.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_vendor.py delete mode 100644 sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models.py delete mode 100644 sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models_py3.py rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/__init__.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/_configuration.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/_metadata.json (77%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/_text_analytics_client.py (69%) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_vendor.py rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/__init__.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/_configuration.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/_text_analytics_client.py (68%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/operations/__init__.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/aio/operations/_text_analytics_client_operations.py (69%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/models/__init__.py (80%) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models_py3.py rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/models/_text_analytics_client_enums.py (89%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/operations/__init__.py (100%) rename sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/{v3_2_preview_1 => v3_2_preview_2}/operations/_text_analytics_client_operations.py (60%) create mode 100644 sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/py.typed create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_category_classify_async.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_category_classify_async.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_category_classify.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_category_classify.py create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/text_samples/custom_classify_sample.txt create mode 100644 sdk/textanalytics/azure-ai-textanalytics/samples/text_samples/custom_entities_sample.txt create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_error_no_target.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_error_with_targets.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_job_failure.json create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_analyze_continuation_token.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_custom_partial_error.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multi_category_classify.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_of_same_action.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_of_same_action_with_partial_results.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_recognize_custom_entities.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_single_category_classify.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_analyze_continuation_token.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_custom_partial_error.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multi_category_classify.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_of_same_action.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_of_same_action_with_partial_results.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_recognize_custom_entities.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_single_category_classify.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_continuation_token.yaml create mode 100644 sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_continuation_token.yaml create mode 100644 sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/_vendor.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipelines_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_results_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_statuses_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_job_operation_statuses_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_jobs_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_topologies_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_link_resources_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_results_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_statuses_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipeline_operation_statuses_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipelines_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_results_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_statuses_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_job_operation_statuses_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_jobs_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_topologies_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_endpoint_connections_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_link_resources_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_results_operations.py create mode 100644 sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_statuses_operations.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_configuration.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/__init__.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/_operations.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py delete mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_policies.py delete mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_utils.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_vendor.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_web_pub_sub_service_client.py delete mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/__init__.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_configuration.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/__init__.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/_operations.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_patch.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_web_pub_sub_service_client.py delete mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/_rest.py delete mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/_rest_py3.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/py.typed delete mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/rest.py delete mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/examples/send_messages.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/samples/Readme.md rename sdk/webpubsub/azure-messaging-webpubsubservice/{azure/messaging/webpubsubservice/core/rest/__init__.py => samples/get_client_access_token.py} (51%) create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token_async.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad_apim_proxy.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_connection_string.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_connection_string_apim_proxy.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/swagger/README.md create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/conftest.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_add_user_to_group.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_get_client_access_token.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string_binary.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string_json.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_no_users_groups.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_request.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_to_all.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_to_all_api_management_proxy.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_get_client_access_token.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string_binary.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string_json.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_no_users_groups.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_webpubsub_send_to_all.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_webpubsub_send_to_all_apim_proxy.yaml create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_jwt.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_jwt_async.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_reverse_proxy.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_reverse_proxy_async.py delete mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_send_requests.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_smoke.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_smoke_async.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/testcase.py create mode 100644 sdk/webpubsub/azure-messaging-webpubsubservice/tests/testcase_async.py create mode 100644 sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_hubs_operations.py rename sdk/{network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_subnets_operations.py => webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_hubs_operations.py} (72%) create mode 100644 sdk/webpubsub/tests.yml create mode 100644 tools/azure-sdk-tools/devtools_testutils/proxy_docker_startup.py create mode 100644 tools/azure-sdk-tools/packaging_tools/templates/LICENSE.txt diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 6dc495c82d27..c387bea59c01 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -41,6 +41,7 @@ /sdk/communication/ @acsdevx-msft /sdk/communication/azure-communication-phonenumbers/ @RoyHerrod @danielav7 @whisper6284 @AlonsoMondal /sdk/communication/azure-communication-sms/ @RoyHerrod @arifibrahim4 +/sdk/communication/azure-communication-identity/ @Azure/acs-identity-sdk # PRLabel: %KeyVault /sdk/keyvault/ @schaabs @chlowell @mccoyp @YalinLi0312 @@ -65,7 +66,7 @@ /sdk/containerservice/ @samkreter @zqingqing1 @GaneshaThirumurthi # PRLabel: %Cosmos -/sdk/cosmos/ @southpolesteve @zfoster +/sdk/cosmos/ @kushagraThapar @simorenoh @simplynaveen20 @xinlian12 @moderakh # PRLabel: %Data Factory /sdk/datafactory/ @hvermis diff --git a/.gitignore b/.gitignore index fa4e4fc71035..3e92932eda49 100644 --- a/.gitignore +++ b/.gitignore @@ -95,12 +95,17 @@ venv/ code_reports # Azure Storage test credentials +sdk/storage/azure-storage-blob/tests/settings/settings_real.py +sdk/storage/azure-storage-queue/tests/settings/settings_real.py +sdk/storage/azure-storage-file-share/tests/settings/settings_real.py +sdk/storage/azure-storage-file-datalake/tests/settings/settings_real.py + + +# The locations below are deprecated - keep to prevent any accidental secrets leakage ========== sdk/storage/azure-storage-blob/tests/_shared/settings_real.py sdk/storage/azure-storage-queue/tests/_shared/settings_real.py sdk/storage/azure-storage-file-share/tests/_shared/settings_real.py sdk/storage/azure-storage-file-datalake/tests/settings_real.py - -# The locations below are deprecated - keep to prevent any accidental secrets leakage ========== sdk/storage/azure-storage-blob/tests/settings_real.py sdk/storage/azure-storage-queue/tests/settings_real.py sdk/storage/azure-storage-file-share/tests/settings_real.py diff --git a/README.md b/README.md index 3a0192645f1b..2bdc9b637345 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ You can find the [most up to date list of all of the new packages on our page](h ### Client: Previous Versions -Last stable versions of packages that have been provided for usage with Azure and are production-ready. These libraries provide you with similar functionalities to the Preview ones as they allow you to use and consume existing resources and interact with them, for example: upload a blob. They might not implement the [guidelines](https://azure.github.io/azure-sdk/python/guidelines/index.html) or have the same feature set as the Novemeber releases. They do however offer wider coverage of services. +Last stable versions of packages that have been provided for usage with Azure and are production-ready. These libraries provide you with similar functionalities to the Preview ones as they allow you to use and consume existing resources and interact with them, for example: upload a blob. They might not implement the [guidelines](https://azure.github.io/azure-sdk/python/guidelines/index.html) or have the same feature set as the November releases. They do however offer wider coverage of services. ### Management: New Releases A new set of management libraries that follow the [Azure SDK Design Guidelines for Python](https://azure.github.io/azure-sdk/python/guidelines/) are now available. These new libraries provide a number of core capabilities that are shared amongst all Azure SDKs, including the intuitive Azure Identity library, an HTTP Pipeline with custom policies, error-handling, distributed tracing, and much more. diff --git a/doc/dev/README.md b/doc/dev/README.md index 02185160ea01..eb7031352e25 100644 --- a/doc/dev/README.md +++ b/doc/dev/README.md @@ -7,7 +7,7 @@ Overview of the documents: - [Release](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/release.md) : How to release a package when ready - [Packaging](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/packaging.md) : How to organize packaging information for packages under `azure` - [Testing](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md): How to write unit and functional tests for a library -- [Docstrings and Type hints](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/docstring_typehint.md): How to document an SDK for compatability with internal tools (API View) and our documentation at [MS Docs][ms_docs] and the [azure.github.io][azure_github_io] site. +- [Docstrings and Type hints](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/docstring_typehint.md): How to document an SDK for compatibility with internal tools (API View) and our documentation at [MS Docs][ms_docs] and the [azure.github.io][azure_github_io] site. The [mgmt](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/mgmt) folder contains information specific to management packages (i.e. packages prefixed by `azure-mgmt`) diff --git a/doc/dev/get_unreleased_package_guide.md b/doc/dev/get_unreleased_package_guide.md index 5fadb5729351..738e1455dc4d 100644 --- a/doc/dev/get_unreleased_package_guide.md +++ b/doc/dev/get_unreleased_package_guide.md @@ -16,4 +16,4 @@ The following figure shows the wheel and zip of the package.Click to download th (1) If there is no link in the figure above, it may be folded. You can also find it in the check. ![img.png](unreleased_package_guide_example3.png) -(2) [Private repo](https://github.com/Azure/azure-rest-api-specs-pr) can only be triggered when the target branch is `main` +(2) The private Azure/azure-rest-api-specs-pr repo can only be triggered when the target branch is `main` diff --git a/doc/dev/package_version/package_version_rule.md b/doc/dev/package_version/package_version_rule.md new file mode 100644 index 000000000000..658bb79e437b --- /dev/null +++ b/doc/dev/package_version/package_version_rule.md @@ -0,0 +1,44 @@ +This file claims the rules how Python decide next version number for package. + +The package version contains two part: +1. the package is preview or stable? +2. version number + +# How to judge preview or stable? +Python SDK is generated with [swagger](https://github.com/Azure/azure-rest-api-specs), so if swagger content is preview, +the package is preview; if swagger content is stable, the package is stable. + +(1) For single api package(for example: [datadog](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/datadog)), + as long as the current tag is preview, the package version should be preview + +(2) For multi api package(for example: [network](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/network/azure-mgmt-network)), +there will be `DEFAULT_API_VERSION`(for example: [`DEFAULT_API_VERSION` of network](https://github.com/Azure/azure-sdk-for-python/blob/59709af16b7cd29a51d562137bc5bbfdf53f9327/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py#L60)). +As long as it is preview, then the package version is preview. + +(note1: If the name of tag contains 'preview' or the tag contains files of 'preview' folder, then the tag is preview tag. +For exampe: [preview tag](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/compute/resource-manager#tag-package-2021-06-01-preview)) + +(note2: If the api-version contains 'preview', then it is preview api-version. for example: [preview api-version](https://github.com/Azure/azure-rest-api-specs/blob/69eacf00a36d565d3220d5dd6f4a5293664f1ae9/specification/network/resource-manager/Microsoft.Network/preview/2015-05-01-preview/network.json#L6)) + +(note3: The difference about single api and multi api, please see the detailed file) + +(note4: preview package version contains `b`, for example: `1.0.0b1`) + +# How to decide next version number +1\. If current version is preview version, the new tag is preview tag, then next version is `x.x.xbx+1` + +2\. If current version is stable version, the new tag is stable tag, then : + * if there is breaking change, next version is `x+1.x.x` + * if there is new feature but no breaking change, next version is `x.x+1.x` + * if there is only bugfix, next version is `x.x.x+1` + +3\. If current version is stable version, the new tag is preview tag, calculate version number according to `2` +and then append `b1` in the result + + +According to the up rules, we could summarize all the possibilities in the following table: + +![img.png](version_summary.png) + +(`-` means that this item doesn't influence result) + \ No newline at end of file diff --git a/doc/dev/package_version/version summary.xlsx b/doc/dev/package_version/version summary.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..ee436da901e36b16e41656e0e5a8cd8d40592bc3 GIT binary patch literal 11318 zcmeHt1y>x|7B24Y?hxGFf@=az0}1Z#(s*zS4vk9)9tchc2o{0_2(H0`L(t%^uQN0E z%?vZ|{egR{*XpxsRqbz8?b_eg15kxWAb>%FL4kpRp@p%=*DOhZg@N%zgn_|_L4nhk zb#?+-I)RL}d|WKu4LQ9X9cT&=;F$AZ;Gp;a@Axm)K!w&FrJp@kk9=FI;-Pc2 z`gY$=*Ndw+siI>Q7H>)V$>Q1f?Z!l_WE`sv-$Y0KWPL49le>5O0=GVV+qa_MYZDiZ zkrwkpH{$b$M;=uBxXDqXh_P&^9Y^xAGxU{gsC1nUK$~!%%&RA8lbYp`;4!X|n6|3? z@$X0D;?pwO?UChPtY-49`o>l#Rx~?wUM9*gWa6VX9^6e&^&WEa*pM-xc48O zQRfM@LTnt?bic)dfq8gi!W{$xa?i^GoonG7tsj54Tte1TFhL)U4)DA(soXYRI`}Rr;ix*D}#x1XI!< zRx#sw?FLbz>EmSBEqJndV{}aRSQ>#4U-oI+>Qc1&ur;Y6Y^mYWzNi)h7SGRy){{JcRHL8$>D;TtxW#DrX-!gC`j#Y*Z)c>Gi0egYj_x#P-vvYhU(GVfy>L;&ECw} z+5T5ptkBkQE)>QIc)EQLzq;^+NeU*lN(RQT*i*Z{>D;ooA5pUcZkTkU=>2*75{b;5 z(~EM03pz7%zspOjAK5FX0}W+y)=XlYbA1d?X83ioV?r7elCCaTWk1=1q8kt^zZ55Fn_9bXVtp^(PjaNs#i81_Frwrv}4Ok z8XRIJ%JW+V6vF^ip|t(rO?F(LrJ5IUG~g*M*t@FLT_+j)WAkM)*0!?B`}X=Dta5wQ4K`VKy5D z7RL>1Ig$zd)Y5bL65W^61$3B+#GI{O%bj+y6RVOCs)V%VR2ON~fY0mof)k&3mtu^d zJG|5n;U=m#t1FJ?kS~{t6l)K7=?;HhhnMHFmUTDb{xz>g%6OSAmLGdt)=OU7^0Y2~ zkm2@)d*!wBL6H)+#{+e@lKanmM9z5ro*U`~L_yvh1h3*E*o)1thzNHPlCo$tV_&Ld zMreC1JePj(GF()v_9kcwosWV)B8b#x(=4e;q_C&448PvInOzkVrf=gW{_t{&vxQ8Q zmr`k?V~lY@?FmAp1lOWX>*@mb_En^*=uH*nH~+mf$n%R5_%{9quU3w3CSL0qdcYyq z1Q{-dzbjwP;*pH@97Be5N335U&%F+;r3=fbHiP4H4qoHC%ydSlWje7q&2@xXiYwIf z#GmGYk{4}PbVo=k-^A2p2N0aP96p2&I)lg=N3+kwkykOc$1d=bcn>0dSt@d*m z1}29V`|K_T)Eg+5$a1Z;&H&(MvPh58UWdk(CHCGp!(2%MWA8Ux9}jZxQ&%v(jUn`L zka>E{bYrfU>56kkMdddwdpc`hEOXdB&%db`nq$sRtmTQ=_g~GnLmBtaFc&PDl70fc z(hLoAWH2bOP)`0H>Hf;h|3p1lXx0i1iT~Y41@O6QH#BQQzmMeh%JwA0odt2x?P>2~ zqkR3qGS5WI7jU{n&f09K^G%ft-Z{eOV5rygLI7(O9{;R^tuz`B!581*Kn&4&=wt{U z#q4J#Rfr-YKHlEWZuw7itSoo@CP{D~doF?Sk4t7o(#XORI=R!P@d$pqVQvpzJNHq_ z{^z=j10U9duER9vBsHh+q7j%e=ybOf-l3c~!`2AjT2Rod*SQ@|XlQyATC)cSsa7TQ zGfLl5CtQ^WuUHVg;}ci;5%a}{Xr#B$=VOMo&v986M|r!AXqm{fndV~x{dAj%7_>;{ z3^jwG05{LkgKxRC<<1qRliWBReUK{y8GF$Lw-bi9in{}p0;pk?1Lw( zCnjEp{Mw!GXt_a2J9D*_eVy~*OP|ZZODlUR;UoM*yDs45JH`nDAlhnxL#>wJ=b%7! zmz#R&zP{Rnv}r5!@|lD+=2+L1xsiQ~WaLmC9!FNEqrO5v$D&J*#lVtt@tJLJ0QTKo z?b{ONv;^w>jzJ2{olK-3bhjiJM$w_tlzM)jX=YpqO089PHhlyGYFJ2Gx}+&7A|ATP zu}=n9Z|(RWh{vr4i&rpz8P{(XmXfCL6v~Yw-x$&wbUdgTG)dw|{hIEKtrAXUeqq|` zvsDjPLi^TE_vPTTi1h{Q`E%`sY0LY|Yg8)47~N6-=?gXgW-8r7a%&IwyUX&qD%%79 zj)KONRG-2zuOX}@fX};eYtoGs$Y7ThgA*sNc}R;~NR%C2=Mg{}emmEd-#V;+ppQ{( zoxgmeq<7KgGp&-Y$*HEBM|vMOt-)##s)!%Eo5sk(cjh4?_UwgIIkF8r;&EmgEC`?3 z_&|SXqE)nq99)6bNQyv1qdX%(CR;U6*AQ+(jm!llk!JhFhO`o97&5IuVh~LSB+zKe zQV`va2z5M2wubp*JPNjq9Sy8>h-Vf6nGm82fGD}3?d8qzVxdRF*9t?Z!iM)m>0qUM zJc()6Ca}zh=**$0MEX0@TZ6thqL3gO>6X&OWuM4At0WpsVT72F-PeaSAS);$ml0h$ zWk}YS7@_=XC8^0Yq1|{VBN_namY5qQ?(S;@3!_lt7@>I2Ns}OrbZC0|EU<~bj=3!u zmz+d|xAdYxmHT`C-Mdq0ruN5Ya!Bm3>ypBd3$z?Vo}A745OqlQEkBsbx1ZR-e%5G5 zC#C|hH9gJqQ3B+g)yo}P(hNQY6}aXMAulm`xCAv{7b}#yFLPWgGT$Hdm?f`0iQy7l zd#W$KdHYE&u0Ki6h|2@J4&n{D%zS9-I(!SbPf0s>Y?{j>Mz!iUe!+}~7hrS6c(+O1$VD{vf=O-zNmte> z?}4}JnaL}iG56!`4!dz0lu$jtVq^GHgWj{-)~?@s3t80&XUtNt_s zG@jZ6*f~lf?SuGiSUqT<Lm zHtYWStl^d|Z%T-UD_6qr{&4#wvRxwZbnB|ixUQ+5Rn-ZZQB!k&D#7^S?v8lTxc&Zc z=SXOK^2t$Wcl+(tKzjSbk?2{?>UTn}PyWZp+sVXB{%4!&36yj56qFfS@&{%#UQ~&2 z$GB#Dt!yl1d5i4pjcEzq)n_$Pr~5e7p|2+xW!+2|ft(*?&0Y_5TGE8g9SW8BE#6(ZZQs-Jo zG(oXFBz}#O?mDBUd;^u2c zhIkV(N8v6NU6IKxs2B=wy-i<@iwNCdX+J9x} z!WQ5R=`}H4l=%4xf%KIfDb0D~`4EnVeTcYe1PU4k@j}RJ!g~X`H|2T``zhHo*@D>c z1PU+O@RQf$zKlfGJ-PMjr}BbzM?y@{Ke|Z~&1SaTlnaKSUQn~!``YAw|Lg*;aR26` z?QS%6`Ec{zYQjje+H%-F^F*)b?EFmHF0=Jja6i+*@m8*SYwZRfZOZ-t;+GZ~FMovA zu~=m8(s_;MCrx&+!*rKf0vYVzQ|LL?T$!Fe;hjqu#n6+rT=<+5{p?K3n~y2ayeQIx zjqvSg<&D~jcS78Rnsrk}b5JHJCIO^5+wAIN=VAN4O}>bOJ{AOt;~wV@Azon@8%n#; z?P<=8oa9w+GHW7tUI-VUXam7d@J3V(~FYuX#BiGEU_ zxIpuxC#iC-)1{Yb8YyvIq+E)qL9$vu5>HZwUrINJF-Kr3CjS^kfg{_?ARI}(wJa$% z>TFjWkXWBLZwI|?!~%&%t{Qdlie{C|{rfLVlobrK6rF9CZ zK{26jJ3~Cd*)@bo8&_VdCjBLex|J?nt&jtV_PI?o5J`wYG0Tr-C+k>?o$k~)+^Xz3o3QYvd{kOj zCjDdJJGeRC4)Q+NZB^@vhCnptKk%`mV5mC*VihWn*&E<9f z_tq&ZWUpXxUzb4Pcfc)xjB`3Y^Yu7+Uy7hf%=cv7IFzMUktZAv0W1#43o0`lDP*SY zI9j2=eB6fea8HsK19vqBJ07gq%O*)023Qlj*RTerqw=1%)xFc4`)eBn;{XdL|*j|ZPp)2#s$lSvK!R7Bl(uDhEtPU?L;8^QFf&SEXP#_7PuOH;AsD7 z$?qHIXu5Gd1>Mikzy%qYNrnyT*|&u-Hwq4zh@ynJu9-J7D|f$n3?9@`(Ei>elh;JzaQVT?d<;QtOTY zx5kcAhoB;l&*&zs({-~@hV&AuRrRKco8WV!mE_IHbYmNa!eZ0f_FQC==4YD8^z&_c z2(GQsx6ILL`);_L=Aoa+Ps^BtM3%Gg<07FB~YSrVz%SDt6^aRY%x*xYzM(YK;7J>4cNba(Np ziW_tudE&gEl-j-aZ$4qF$@HOh&Q!YYn|s7(+jck9bti2avqlMFMi`G689*o%KIf&3=7G#wQzr|27$@?Q`CC!Z&HwYto>>FxF+UZDdt_LxTEr8kGEd`F!tAFiZ3j83;mdqj&p>|5W=F z?7_>n{so=jcm_Ng22l$f-Q0|?A5<5RKNwW&w(^IF0g;}D9h?fAr2XUrE?2Y@<+w}4{I)v`mSYP$ik1>-InQx;f9KbT5}Io+7EAuE698&GygHxw?jw|-trkJMq z%`^QswA57s8(|teKkNoa4bYTB*6`JY&6#p+*M>j+R-Zkdjlg1}ky1lx906?_5&S_` z8&fw+3r&!lt&{a{oCSfOt95f@gkLCqr|r)z;dm-jI>eqR3`;@dDB&o#o6=1xDwak8 zgBrE#g0ChcN{Bw5Y5D2mc2Af^aAFifsq+pqOMSPm263G{LkV;%#l~M1FA?Fs8Z>F zSLm<)+aE2J-y3p&HdcOX$Au+yM0au%$X~$U%X<4Ie+$Qu)fA%psJ#hqc0GqQpPqO@ zaOVf1u>8ES;WDxzn0+H&Ms9_b#6H;!7rt&zY*TaSH^xS25(H74PjFkByN(aH-WFu&?{S z3>B3C>fZ0g`%{ZM6}As69gl=5izJ#z7AT4I$^SeKGLzo*I?uKD$3iG^92__~NBuVq zh?|7I7=xPADD?H8{H_5Ps4amk-83yhpkGGC_2`_3)6CXsPj4Z5LW1W+k2pvk5 zQRQwN^S#AS)>Unm0y8g`c@;JSl_FhKCwyhY1+;tdUda&kL!-aq&nGB9| zOtjn9N`0f_v$T$c=d6TPdAQlarRz zz0lVkf(FZa*jLr0;M}(+>_;_=a^zcqQiSOH1LdevXLXQ)hmEt@;z`s%u^z?|ZDt1v zd3Hpb^`63*b(yPFj*JLcPv#;aDs&ss=ku!+pA~bpWq<=S0s$O)P*AiVM2ok5`^pDR zn^2qpE+#%m!8M2v?SL)ath3A|9v_#U4wzS@)ag$OFk^`lCSC4ZOGu1!Y=y7W+R&^U ze}JKIy{6-mZbjqQUUJwLI`eLm=n$k@mTbUDZ)ezjHFwmzR1od5fhKJsnJyz99J!@9 zj+kYAhplew|0(NEl#74R(DVdjwt9UAvMvo##3M@R4MR-%(Y`)F!`aH>T^a-rIi-Oi)b;*EwAi zV3d4&Z=pvthdoAYPI%7Q?n?Z}|VTq;C; zv*s`t-zX;0>pd{zbKAw+z+9nWgCAAKP@Dg!U-)nmZFvU0A`A5kq|nvE+5EXB$kf6V zWXko-)XdUB*~!ZJSB9jOIA90eN+2Kj#fEDD_(n&t0e*pST)SN=L4$piUT0zyczuxC zV&|2P?k?>0V?YsO2>yK4T@S@sY+Qnpu6`o@;4sA$ejP1@dvtXK0%(UoLuDi#1+*p_ZN&HmL*>Z0S+1qv6kBaTxF zaQeA*ukA=`A^poNG%=ESS0|6BT3KIFX;&bVMT0T(|_E z98^!1P%nZDon%0D1#okAapy93cC-AYBk0)ve*+At>SDph>d?sXW$F1Xmg-WY6Fdh0 zywc<$LsS$=cVkK0=hf>cj;@D4e+p*MUoM*;h}@m!WLupSmWDWUH)!!HDiajKFle@> zv{1BF6Ri*+e$)7BTgW;}m2xk-Jfl1BEf|nA9D~PU3h`R6+YGD7Qsi`t5P89SC zF0_Eb`K#%fy14w$@}MU7$B_e;cAkgkga`1~)EEooA`1YF;0iOPm!~zRu;2#k=OyO( zbqud7lJ=$(8pbAPeRty4{k*T`lou#OjZYKDz5t>&3J4Gp$nA;GQ@v*v38dma;hmWfCY~Ed>>6jYR0?2ldcLLSUQkduL#biW5Inb zuWLN(yM6}|F>@%r45(R7&54QL zZZI*fD=g$p&1tl=kBbyQ-tF;5U|d4lp&G3D5a&u-zhgTUTAYCn3iNh-S#arygOsCk z$|Q#Wx)y1EGPYh_N%!fO+gJ{me6T}Cgt^GYu>FNRmm)mzW)H0ioaqXM>t-MPy`3P_ zgjn~0$Wb5nk(%&)u(PQ9u#i!v`t=h($`*^xq;So%u5jyDN-f^@C`Qvhl3MfMEK08s z)pjK@CncPDZ)hzRvT7o)r%u|r#qZZnyUvb%H3B%V46XSXm+tHCq1E;8<_inQ0ZrZi zebeH9KG%QNf7!waQ2jf=-*-#>NATC$2j#?H_D($(e7q;*Pf>DcGyc&Ik;lS+A71|{ z3IkJ(_M7nkW0d_E=kY}IPo!0h|N9XCm~TEtc|1Y*6XhfBZzzxF36B9D_dxyx5P}B( zzjZ_&i$1Q%{uEuO_+9jIefAjPaS8G#f&kTH9sFxS@)+=OM*kj3 z{QfcM(C2jjpY-T4%-?f`KS5w%e4zEmKQf2M;(zz|e-%Gv{EPS>-XEZfi1h0o POz6)M$_5DYue1LHaMY=g literal 0 HcmV?d00001 diff --git a/doc/dev/package_version/version_summary.png b/doc/dev/package_version/version_summary.png new file mode 100644 index 0000000000000000000000000000000000000000..c7f180a9d320e70b9d73553275f8515b5f22f2b9 GIT binary patch literal 14570 zcma)@by!vF+Vv3;P>_&rSV&2ObO|iFyPHLKcXuOF(%sz+(v85PLt09@>sz?@KKtx* z-uJuSf1K*IoNLaB&v?f8jeCa5N{hUGgZl;w3hJ$xC{P{>3Yq}&`)hbu$giSKice5b z#86^Denpqm!(}ZKJe3Z*^q1_^Xnph7Yb~s z`Oe(P7n17lJ>Hge%06ADO#%P_%&=eyfIy%j!vA)dCgZRug9XnVRyj1BP3A6PD*H1X zmCOw}axnu7;QWyw=cs=5k3(>5}a%jbt2}l3m_quii|2lq#jv~pF4-Rn%952oAO*piB^IJk+J(KhzwBM9^_M? z+`eT8(C6@S`4ETGQ1>B2-(3(P3Hdrjn=clvD%U@Rlf0oW45K>|Z(V`uwzBvH#6(C7 zi@&Ei$gUh#CNVV^kpPDeK0{9o_$hw#w#`nB@xmPk5s31dYF$}}mH4TM3kZQBIYMzP$$)2E*{5b_qKgA0hO@qyA8#U;D7GO3dXR{+V%m6)RzhQsdb}u z`n^+Gq&8fqhR58e>KScK-a@zfnfyMx3llmLcj%1N?mhI^Kv0`{e$tUTm>O^_X5uS@ zGi3=*B>GA(q2T;{q7`c3G~?qjCm?KmLQwE>LDj1K1OL)QBB^*Ulfe4rs(6r*S-!%{ zukqM#JSB_IEcL!KNr9}{amDV0mTr$Lvx!QiAT{gFQ3lu(iyKme)_|?t)vkx)*Oyo21J=pinZ`FCVwG zd1YJaJ^xiuDfDY4r4*Bwj%C4I-or=F&n}XT0JsStg!yK^-e0y)u}7ESfP#t|OWS_G zxcd0g)6G-{vaUhF%E|w@ey=&&zudVGBB!~v^emY0mXzE=@ z{O<+$&*k|1Cxzc@SoyfBygjr;2cvQm<5eR1zncAShIOgoyHe#Th4Ddw1na0k^T zF5d<9`?;xe2Ik)Kx4&TZ1*WV*51(}i1Yb3zxmcKQw5YhnQux#XGZ&jOrvi2)jc>dKx=it(=7uFU=+RMScs00BRDlxFL>S2b?<3k2mY<2xOl>o#ch?V*AOVcH9c6 z>L7HIhEMp(z3)AW4McXy#w-{daDpxRI#p-V;L)aUD-JWPPew?qa@*W{zpu}M+-t`a zcq5?C+q5G8s5nUJ$5e_rET-7HCMR6<9d~uBUb!mUQrFh)!6Vty9DC&)laM!*G_Gha zx_ZuBND^yGVBZ|x<=ip+;rduiK0`+aO}*12GuczuO>zHM%AVt_s*$usiC$U|$8del z_gg@S`rOq@wdJT4FTbXaZJA}6cLdEqepNh^M(_=zmB-2qXE|n+$_f7WrOio9@k%pdkwXxC;;VNaqi(V*0EeD^*66pbqmox&zgNb?a#NJn#M zB8Dn>mcH&4HS^>4sZx{Fx({DO-&;84U;R>3!U}s{(Fr=8(;rVvA}!6wc`3yVYRs17 zhtVn8nxzj}mSbb&Pj0RDOMkh0k~?Z_1Vt*Hf##lO#tH20_*BYr?7Zt8R@CPk;y2r8 zppjf-%btYKg?9wZ`$zX2GatRojTRSc2ri;T@(zNFspImtYP~cy9J2R81_@&iLAXR2 zZg-0VXsSMLfhda)vgtPK>bJnMIJrt)TpMhbc3##6?~60tHp!95t7LKs&K{!AgzXrl z;;3y_JRXxv`Vqj|daIBb`MUh!5J{fQpb#1r_E4R5M>^TZkK1UdbJZc2y;Itp_1Qw7 z;nZwx?%_+xez1hn4PP7g?8YfRN#ylbZ(8h1@wh25h%vkuZHgp~_V`MD>PQ|#oTx+wL#w%xOtRhQKS5RexH1iKyG z$~gA5&T?RV<+YMWoAqtp(TiL3nmjZ)zEU3~k|t(U*biME;sCoWj*LHHrvH$(YqRLt zYto61-!N$IsKG!uBgIEmfp@i!;Oi-F zb;#n}0GDVUO^h2BS6ozPO`iyd3}RNqk&xr6<6x#G2T)_9Zmcbq54!WBm#?kt&g7K}om)dLDJ}Z7>rpGb!yX)LYeTEAcE&Hk_CO|C4o^JW$rUk}C$aQb2ii9OD$4A#@z)YcFAU3w=fd;dFFro&_?=vb%8BMi)26(u71aAzL{$bV})CH%sWf z6UlM2-U_B>)`PqGT};fGVVc9mcS77ei5UCostEmMTC=|74Q=h0>E0AGGnV##PDB~_ z)o?*N%tW$kgp;m^gZ_)Zm`CFsT!QN&!jpCe6I|A5FiY~GPD3bZWvi8ChhcK-5*Ai_;{xq!=tu4pgNgW16fC4p8rbH(u5EhKu=F}RC`si>4KrTB zt>rva!ud){NQa7zgXm#Dbtym4Sw$RNdPj+?A*bu4^8Ukl6#ndjdUI6$ zjhpGkQbo!vs}7N!26Ej8_$u#knbRtqGqVUI)g^DsVgF&sZN4H%hr;~QsBRq>T0yKz zvxCYdnDSz(hSxF2Fnl>4tq&KxU#8TmXjWz!@2t95ccG49{zgbAS-&XO+NoKw+2NZ9 z$m}2oVFlOt%dXe#*|emV(My)A(R&*zaikf(!uT6%%$?*FxRIzpINw*VPE1TatCJeG z^$j;IWn1$Ws36C`}A_@3B2syjhUaEx?6M^U6my`^I38eBIUtnQkoKiZeS^o8Xg{h z+(SNU*B_qw_4IUF&F6{piO#>4x;i^QX($8RL@+5R-i6lFlo;{3s@1A6I(@Q7G{8~h zAxnxtwt+reA}SCvj!Jo0s3Nf9etea-a%q)nY{i@2mV3%>1C%!_QSY^TTS79jsV#U^ zuFc2_SEr#7t%1b>;z|wc57xZ-g<;00MuS!S;c*HUx?29NoW!pSi8eW z3R_E>2*h34L0xLwGS>g1`#XR&Ni}%4uN+!5t~@J% zPYyp|;SSayyL^~XZzr+g+LEh620Osn3UM|usHfoeG^Jx>K1a~-VztdaQK?GNWU6x)u>62Uja)&p5Jcq(AI)BLKa=*c~DWy=C zJ~pU2$qxigQe6;i>W=V7G4uMFuRc)c=im0y_s`v&aCj}E5g|W{z`P*OBbaw~sVnnL zZFR>86HQsYA&5RAfOaQ35phCSSYge#XNO!t)8|rw*Tp%kum+~x=Mc48&p^;-*d{i{ z@w0ove$~u?k3g?-*;Z?uRthSoN;=6UNyRl9|dv1<(nexv7Prb zAC%Xra=X0>>9NP#`i2oRX^tH?Hb2cfU+>PORPP}jts|C?U!{-_c084OV)GfmOWxW# zY2Mes;kRLR4J$g{Do=3`NN|Q|jxh5e5PcTKc*9jq6yxiM(}%zLZeGMXc7fZ9o3!o~ zN}Hkhng+$HF};)^!R0LdhD z6dW&V6ShP<**a~9Q7@{_Me@VNmbfzT>A$FD&22q(3gb)lX{_K}DVmc$LdkE( z>$0xaGtP<>id67EzQ?(6Kk!s`Pc=~@>%Xoo@Z@u7cft@W*-ecCQv>M=l&bKFQ^vxc zYD#E06fX%r;~iD%SWMVPqNu82uYGTJyVcV}fL9|h z?TPqpX?T>s5v@VXYU(hf!kG)NoB~dgIbEalH^|Un_(=>|ga38NOplFvg&L8EH(t{m zm@4J^9IW&v_#w=r{s+QpVcR4lOb#4;Sp`YwZ2Y@A;z(77Fn@@Xz80C*o+mxHKgE1n z8Y3-{{%dJ6%n=uPcs@M#(WQsgcEVfT-@m0(R|R>UIdi)^6jmVXdnWeY3e%R3CqLiw z#pmbcit^Q{^Sic)=!&>rgT+^P-g*U>h~(yql<}jG&NXc+n@Th9jbwQFp#o6D>W`Bb z$K9UJu!M-5g|1DsrR6=b-@TOpuLB;`-NQ}fQ!sU21Lz(vaMEWYR`*}W#=NF3$|DQJ z!2rI~n@$=w^m5FDBqX0i3(m;NqFgs5=Ix(8C#aftzjPQ`!1TW!kANtr!UzKO_H$VL z{X%huH!8uMOQ0p}n}~vFq_Q#znx}X|8_AWnH$tTfu=LSF$9`?m*Q8uwR7ZnsyS0$# zCM8Zv4viF|3&?^+gM`Yyn9J}^;?z(2`A!#Mi0tWz;U8anX5%&jQB%G{CuAF<^M~jH zVQ?3!RZz4DSltpvF%UDzg>WfbsU$7F(&0mDVz+tI^}&bR{9$1$0p% zliN~4r*ZRoesQgAXD`qdl;?#E=cAz0x_6l2-$O{qVz1Mf!jDX4qu4$P$?^dr}?1KpWfJ2 zoG_8D$Kd>W7~|?I5a?vwshZ}^!MVB0s6*Z`Mg&tn04Bck614GIo#D#BB{;~&)#8E0 zJzjM+R)oUlsJ{ksD=^*&Y#m|9xUA@fECP53M1qDcHmhTh195DpB(pz{i|1>Oqp1ph zqkb8g**HZdN*)JN(w|mK-&MO_x6Pdd*d*8rU%mulN51OACur!9Gg)Qy!*g7)mvv|S znVDb2R_wDPENI#Cy>K~@(1tkR0+=_1^rghj(%kofS)7`HXgGq48ICDQCBSjptO;+J5(aMuY#mm2Z*|WLvxms5~Fh}Xa za2>e{WYIx#HXtWKO9hM1Gyy;S4w?2?b$NZICS1MO@1@~Xb+atY+(G>$BV@~z*sw@~ z!LLp!@gTU9Ng1tcDinAA6|o|Hj$-XxYkHHGs-4FiQnRDJ5}^R0H`Dmu*s+QzUAm^9 zTlFyfp=F>D#PQ|Y(gKw=k3?K}0{r7C{d&_YQGs75voXRG4__yo$kOnsC+V7~s!J(f zlnO4fU(hx8emrQ>=g%T3&oazW1y_eU__V25$Q9~`8co|fCsSA%V>ee0efqImc3NH$ z=UgF}%-NR#cY6@bBs(EaTHL>gvfB~Ai;zdgGU+N}3;GrL)#_^H?DT|xyH9goOIaVX zPR$h^)X&^eBT5H@h(SFb7`wG8sWV1B4)aRktQi@5-`!*tWiWk3A_u3b+%P1_U#=c} z^xvYp6UQ9>6`G`%+q4(0zDq}^)yslvb)TP5F6y78nHs=!G**le3c-JJiHtV&zRu{Y zPuvT-`Cg8aQHv5=3g%KZpQWWU)SCfbU&qP}s-z$~jymrL`TTz!*28;yQ@k%OF0y9E zdwR$q%*}x-dYYt57v;5+0_7XryBBDva*Lif>%A5EI?|F$RgBcY<$mIkwk7-k2wLA_ zU4FcAYp7Xsv+Mi_!C?P)|D|&+38-*Lm0&ciu9#h=?kGa1P$35RdsZGa^MW*d$A(Ko*OV_mF%?Tf+lUUDf> z5EFo$Wtswwgiqp19k^U=3b>w=USl+}(SRW|x@1ca&CK#pce;B^NCd^V#D>g$$_0>Z zQhB2o0`UUC=~ugo?~X^m)h7w!5_Q$JsDSyqt@s)v2EUyj;$MzV8m_KA%krM7cOzG} z)ZASN-yRVCPw7_0Hy*^t%A8ZSleu`R5@o(xs+X!vf9E30~A3sC+m17Hwxg9&J`KP~x zPVX9&8vEdbh)(0cxIMQ@S$l-t70G$XQP>7?w3|+k4DV16g9?D}qFUB2xY-W8A)yug z4XLbD&~iL$#G&jXMaPY}H8y96Ir7qSN{`j^P0%&e6=UvFpNes*=S046{K9qF0XJ0> z_#xrrG;4163f-olla6O#f3)G15=5A~6#Xp_)A@2d=k6j}^*92Hle5kq(guqK8GjPn zF}ikZgc?s%9N4IOuVb>cgUd7 z6hJVURHf2n@l>KjW80I1(~0%1dYLgeYrh1MIDLha=FaW(mm{S@|Ml6Yj0ag*UGuTv0DZf1+VCmYjMYfA6WUyC^^6bHJN{$8Y6~RJG zvsm|+YKjofH$tgF0ivp+b7q_X0Gqt~K1_41-4SK`lWT34mfeft{D&J^c zNgIu`z34=2_ly}j3cs*G$4-F(B%`p^!ukedvO{HEz|;zFs2{%rK0sxI9UxZCYAYrv zmk?%V$RFX!1D^Nfh`(OjpQcP2jHNDIl=ziZS7!bbtEGep5V)z0^qN!sOI%sumT2o% zT{vMyX{rPOgvnF;H44&>^`_!E6q2qe!NG#hu4TbmOI)Q1pKEytASN~3^QNKW0q*wp z*6cA=+q5TJtWINwJ4I!hOs5A(wnX%6dwb)k$1-ulNcIY6yo_F_^&0HZ7aGdtv{`UC z$v7Y08$4l`Y1{(32n%4o+pYsX>e+ZVCjRd7w5;Mh-tssmBHl;r%$U-R6^b3!eMW!L ze~XLT{_Rs4(%=uldi`d#i$Sp|h*UNu<@h1d{)p)Yslv0rkH)IrH3lIkYARcjznR)5 zF3Tr{WKza{7y`Q`MA{z=M2Uj1WL-Z#h*z*28wkH(Itk7*ZKCB?Z0R1u3MRH@ zV+tAL=Fj7vzb^Y-zhVW%$*0jhN5zD&s&SQAHm(y@_Uv+RI;BbqVSZ>f|4?>gd`aS|zdmT72P9x9RNF zFSE)!`!Z_kxsr+(E7&w?ulXzFI#(3?2SIj;59N{jQ^=3~-0%bK-6fWX8@cJ1!7Zc< z0T5@KW7nD=m(LvQ?Fc`j)fd?tyZ!DGTe$)fa+L$KFVE!xqUd+YJDG3UHnvRKHyH$F ze<8`gWK{!v4BM zMrrc19JA9MAwwwj>@5k1;~IIcjph!qt@>-MC!(?DTY@St}W@Kmql9G zx$IvlXn9!AY&z#O7FKxMcp=6`%U_gOOH(~7%y!p#DY9){*elt^m>_(Iz-b^qL|N69z^URJ%qhCAH9vh;vH5)JbJYB)HZYms_SC^Gm*JYhKH~|Q68%_@nyG^i5@YZEeDUN0 z(yk&o%F}*_C@)9uh((D%gZE`YO0##{oc(3?wM9b1!Z4rb^U8uGUEMzd?>`UM`nD(A zI*`h-@Pe7q_Vvq`FPFzi9Yq(^?s8JHn}~+yY%%gi?urrKo}LYE z4bnh1NuBbLPiy^O4A>t3a{-B}x%@5zBEnR^alrEr%*!MH@>ukj0~h_}a~OwnMNyUT zIU*u;7AM7wSSPNHs)Jg+SycYtf;b||C7aWUVy@Eao4Yf%-r2F)xYc`taYBN<{W$CB zHkuhWGd<74VL|%mz&|Z9N%ekB(B$h25qE-rnl!Uks}+XXD0uu|@z8K3&u$Is-`tut z-LVM^a$69XT2X-$vu95ksi{oKF^1rff;_!zXy%H@u3yETit$~Uo`<$Q8DzP zCLrRN2tZf}>$p19DQ6KZlpJw({?rs83WKN2TR8T0?1yNSOfB;QxqbCTlVpg=IEtIGIvM|xnaG;#`u|g>%+UqW9rr-0Qsu$V#x|9vYZ2*9Fi;xqP6#Z0Ybi_6!?fRr|h2 z5dhn>Y6P$tt{+Zmp6RqlnI$|IMvfUgs`U}XO(p8yB*j7B1v4OW4qzai%lm&j+EYkE zuDN)G;?~ym(RN&~IIAtyu>iS;`>4RYtp3n{U^exQsf~!Kks)WaB*7;n{PzCXx3Qcy z^%lXcW$==Ty82f9FI+GQc?eV?jjHCe=$sGE*xu|fQ2EY@4H6Z8vjVDbknJMIlCAOz zXJMiC0;|{|XzZ$_qvh?QLrjw-K6T!ZSI=fnc%$hoz3c44YX}S&c8?sWhXzH;*0JJL zxAi7i9Gg!1)Xsy35L~vm1i8f$aKqhN0fro+dS{>@$1RMo7r}@hzg71LB5*4=uw#~L z)e29*4djDZvf=mUE%OW@`jFVy$ncuokWHnIWXH(<1;0|Wz41A8m|*Mj_xvqqJGb~T z;<0pUnU1??=Q$OP^sr8oGs~(yV~gSV zvJe-&Y{`-+4UL9d^wrlp-i>r@9zZtvT&S#~^=gy4DKJfw*dRirv+^>tT-eOK>*v`7`RJEWVlsXnev4J~D42y@v~e+IP> zooC~9?G7hjLl_OWE~;6oe0qSVc&CcB7;0FIF8ZwXu(C$YP4UkKjCbl;QhnsWpIuU+ z@Gd&5&6ce-eJAMQD7mjxeJ(5BvG9=NOLBSq z_5eh8865sYcWV?q?Qx$YMAOntv3hRB0L7t6BrEK++^@MOLdkK=V%15A(?)XMIMH(A z085}w`)r7J%LhQ{YAv#R##>7oaV2KKoja~LrC+HzwE2#ht)t5R!R!x(A;XM2TE97*NA)C>M-bf84H z2mvM%_$MZ?$AOg=&Let1Z$G>YDQG|%ZclG@Cm4bZ_Hj=b^L^3c!8-V_s3*VjuYb*EK9qEWPJ^ zus@5j|7gViuAY7V*{=Jf-H_l7vhk6p&a+kg8e4ct`)VZ`+t+0`nu>iw*{hKQ6^}Yyz9{xDN`KyB`SrQRtP23wua|A@uJXr9WyI{ zuhaRxDt;m1-kw>GrLVa6K5ksO3A{J_CSF~e%bw#W3W&h9Padf#N8dMp;iA644zQ~r zp}Yzf|E)YHYyc>en1c=Dwp@J}1BHjZf-b6PcvYmT@aGC?*vx=47$P&Urai#U7pRi& zr*#3rWnk<{FI4ORG|`a(s2`s^+Jb!6%IRN5QFH^O1TqR?>EwEhYJKu3afDC+*r>ii z^#>S0m0&6VkfrCM8w;rWdEzA+?dZ@4Y!{U8uL(93NPZ-p{m35F{ELwuGTaJvLbK>{ zxOpS~3}{_rE}%jJoH{lAdNf!3nu!LW+S}V zkE|Owl&BlGczGm%Y9nvbK&^`@cq^K>EJ-N~fn)@RklEyc;P~q|ezrPFp+OvFFo5); zB#*39XKUBp0B3C8_b2=b{L1ANiM_tp6liY&q2j#M$pADZCA|dI!Z$fVOVvm2o?K@s z6~~H}){GFY+RjM3m3awyOdxJwmiN%NLeI6+Pk~H0e0V(`xx!OQNvG)UE3FTFv0#H2F}n)}f!8%hY`NY$kxB-xj9t1jhm_@s?` z?`#IF%1<2+_$&#{(Zu{=T%IYG*>ugn}pg-ejA zCj4I-+(kN+3M++w2{p)Ty#J_QeXpd(Q1tD4u^WW1ZEg4saNAAG1I!Y#5K0hX(pM(^ z0=~)EiAeMP(bBjbKT8$I;RZyg_F5rB6lQ4KednEdV25Abd-0e>U}T0}OgHtL?vPwR zcvy)z!wX?X%43+y%pO$mqMC^kkypU1AiHWPK=t4?9zQTN>_I`=sYO%h+gUI@cnuTSs+#@ zFne+SC(hsWbMZagX7;boWZZrB`{-XB282V`2UTHkUPFc|R*rk8SaD$p)qfBNr%`g3 znRiK4@>fonH7~fb6`4VV$1Yi6B402HLyl1MdPmT#VDL5)vCfvzBMStX^eRh(`b?G7 z5NW}pRkt)Fh-x!XUa${el}G_miX|#|PW9aAGn+0A?YpCs;!(m;cf*e<(w?u?WuHRh zUy+$zO$C6f=peQ%_0R#9z^o!{uQSsv9e0@#Oo$zsV9A(J9ug(3-lzM4K0Gh^eoZ}z=>Qa06ZG4-G zTOE52xh1!E_z_GIOH90?HTpQL&s9b70mtnbneF$eSb5d+0C(UIA#Y zKe|a&&zF3`Ytz4ZzgwHh?~dU?8#vnoIqi3)^7~g|of`Aty7o4OR6cE6wk)IR~#?wpLBg`ioblOa4i3I;!w$ zIZ2g;7F3xlUXugheh)hRhk-3&{>#9!JwUb(3x(z@k-2%7y!xXUK0eDb9%a)7=Qkq?u% zJ3>$jj0@(RWCF0S5Lo)9t12ZS`%N!XTyG(1@PV)D%C}dH!~617;Sm;JaH1jwfW;4y z0(haQOFsiyQ8yB8H@Y0laE;`U6(EMUK$t~xe5>uXg{U~Vv~{5T6gGWW00}*#2)9$} zboa@Pfff+ZhzJXQI)E{AY`WbFSVKLoUBG$mTZAn)~ z5F}Dx%%<3us~p?|q7s675nZR7nGBNd@OnK$SMp-CQbxIDAUsL=>$fDqDU%;ud-x3p zcPqceKBl@)JbN?<)zO93X8hW0}6@@c5lFV5Em^IQ|<(oY&l&Chx~U0 ztGmXg4Thf<@5DWiD6|EZs-FZhSYsmAR*oD5BhnRGZ%v7RGOP=~t>#rOLup!h?6ZH! z=kdcMXS0OBYRiG9A~=|xv7fKr2D`N6NDUutp6^BSr}8*gJG^RnatZdV`yd2^1@Y8i z3Im0iGcVlAT>s)C`s%YV3Jlj2y4C@@$sa;a&zVRymVPLOwG~<9^1UllgkxKkX_l1m z{h+ypmgqOO7VVlBrZvOU#j1qsV!~a1j{#dJVKG~vHz{y9ln96%A)2ETfl9E@GS&nM zo;dUgJR3_e6IyN?g|4<+GESwEKLGtZ%&t+*-hmQ9FG%deCj z1pI;+0x;00iuby2PIFZJSESUvOaKa zBmvI2byKYq04jTug{xcvM;QL)$>(JM_T&`O1+jTpgsl(mZ(7_g!kw*z2`r~g+Z!Er zCv}W;R+{YLAQ;;*&(tWG8>UMg;mQE`8--cvxG7S z&NyxTKTrWA_r=S#G&^#kL7GI-KQY38@PiaKYbUN~2y)njI%r$hm$s<#diSsW(RrOU nO*p>a_qo;o*GqNbPspO3`f4Zu*$&7%j8I}i(!g>7UBCYac2`xh literal 0 HcmV?d00001 diff --git a/doc/dev/perfstress_tests.md b/doc/dev/perfstress_tests.md index 7759e45175aa..adb986e9320d 100644 --- a/doc/dev/perfstress_tests.md +++ b/doc/dev/perfstress_tests.md @@ -82,7 +82,7 @@ The framework has a series of common command line options built in: - `-w --warm-up=5` Number of seconds to spend warming up the connection before measuring begins. Default is 5. - `--sync` Whether to run the tests in sync or async. Default is False (async). - `--no-cleanup` Whether to keep newly created resources after test run. Default is False (resources will be deleted). -- `-x --test-proxy` Whether to run the tests against the test proxy server. Specfiy the URL for the proxy endpoint (e.g. "https://localhost:5001"). +- `-x --test-proxies` Whether to run the tests against the test proxy server. Specify the URL(s) for the proxy endpoint(s) (e.g. "https://localhost:5001"). - `--profile` Whether to run the perftest with cProfile. If enabled (default is False), the output file of the **last completed single iteration** will be written to the current working directory in the format `"cProfile---.pstats"`. diff --git a/doc/dev/test_proxy_migration_guide.md b/doc/dev/test_proxy_migration_guide.md index 51c50a1cae1c..d33d27911096 100644 --- a/doc/dev/test_proxy_migration_guide.md +++ b/doc/dev/test_proxy_migration_guide.md @@ -28,25 +28,25 @@ class TestExample(AzureTestCase): ### New test structure To use the proxy, test classes should inherit from AzureRecordedTestCase and recorded test methods should use a -RecordedByProxy decorator: +`recorded_by_proxy` decorator: ```py -from devtools_testutils import AzureRecordedTestCase, RecordedByProxy +from devtools_testutils import AzureRecordedTestCase, recorded_by_proxy class TestExample(AzureRecordedTestCase): - @RecordedByProxy + @recorded_by_proxy def test_example(self): ... @ExamplePreparer() - @RecordedByProxy + @recorded_by_proxy def test_example_with_preparer(self): ... ``` -For async tests, import the RecordedByProxyAsync decorator from `devtools_testutils.aio` and use it in the same -way as RecordedByProxy. +For async tests, import the `recorded_by_proxy_async` decorator from `devtools_testutils.aio` and use it in the same +way as `recorded_by_proxy`. > **Note:** since AzureRecordedTestCase doesn't inherit from `unittest.TestCase`, test class names need to start > with "Test" in order to be properly collected by pytest by default. For more information, please refer to @@ -135,6 +135,43 @@ made to `https://fakeendpoint-secondary.table.core.windows.net`, and URIs will a For more details about sanitizers and their options, please refer to [devtools_testutils/sanitizers.py][py_sanitizers]. +### Record test variables + +To run recorded tests successfully when there's an element of non-secret randomness to them, the test proxy provides a +[`variables` API](https://github.com/Azure/azure-sdk-tools/tree/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy#storing-variables). +This makes it possible for a test to record the values of variables that were used during recording and use the same +values in playback mode without a sanitizer. + +For example, imagine that a test uses a randomized `table_name` variable when creating resources. The same random value +for `table_name` can be used in playback mode by using this `variables` API. + +There are two requirements for a test to use recorded variables. First, the test method should accept `**kwargs` and/or +a `variables` parameter. Second, the test method should `return` a dictionary with any test variables that it wants to +record. This dictionary will be stored in the recording when the test is run live, and will be passed to the test as a +`variables` keyword argument when the test is run in playback. + +Below is a code example of how a test method could use recorded variables: + +```python +from devtools_testutils import AzureRecordedTestCase, recorded_by_proxy + +class TestExample(AzureRecordedTestCase): + + @recorded_by_proxy + def test_example(self, variables): + # in live mode, variables is an empty dictionary + # in playback mode, the value of variables is {"table_name": "random-value"} + if self.is_live: + table_name = "random-value" + variables = {"table_name": table_name} + + # use variables["table_name"] when using the table name throughout the test + ... + + # return the variables at the end of the test + return variables +``` + ## Implementation details ### What does the test proxy do? @@ -147,7 +184,7 @@ For example, if an operation would typically make a GET request to `https://localhost:5001/Tables` instead. The original endpoint should be stored in an `x-recording-upstream-base-uri` -- the proxy will send the original request and record the result. -The RecordedByProxy and RecordedByProxyAsync decorators patch test requests to do this for you. +The `recorded_by_proxy` and `recorded_by_proxy_async` decorators patch test requests to do this for you. ### How does the test proxy know when and what to record or play back? @@ -179,7 +216,7 @@ Running tests in playback follows the same pattern, except that requests will be `/playback/stop` instead. A header, `x-recording-mode`, should be set to `record` for all requests when recording and `playback` when playing recordings back. More details can be found [here][detailed_docs]. -The RecordedByProxy and RecordedByProxyAsync decorators send the appropriate requests at the start and end of each test +The `recorded_by_proxy` and `recorded_by_proxy_async` decorators send the appropriate requests at the start and end of each test case. [detailed_docs]: https://github.com/Azure/azure-sdk-tools/tree/main/tools/test-proxy/Azure.Sdk.Tools.TestProxy/README.md diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml index 3ed0535fbee3..12c0a65b3bcb 100644 --- a/eng/.docsettings.yml +++ b/eng/.docsettings.yml @@ -94,6 +94,7 @@ known_content_issues: - ['sdk/purview/azure-purview-scanning/swagger/README.md',  '#4554'] - ['sdk/agrifood/azure-agrifood-farming/swagger/README.md',  '#4554'] - ['sdk/purview/azure-purview-account/swagger/README.md', '#4554'] + - ['sdk/purview/azure-purview-administration/swagger/README.md', '#4554'] - ['sdk/containerregistry/azure-containerregistry/swagger/README.md', '#4554'] - ['sdk/appconfiguration/azure-appconfiguration/swagger/README.md', '#4554'] - ['sdk/attestation/azure-security-attestation/swagger/README.md', '#4554'] diff --git a/eng/CredScanSuppression.json b/eng/CredScanSuppression.json index d852becfee33..0f4b5f8de0f3 100644 --- a/eng/CredScanSuppression.json +++ b/eng/CredScanSuppression.json @@ -46,7 +46,7 @@ "sdk/identity/azure-identity/tests/ec-certificate.pem", "sdk/core/azure-servicemanagement-legacy/tests/legacy_mgmt_settings_fake.py", "sdk/storage/azure-storage-blob/tests/fake_credentials.py", - "sdk/storage/azure-storage-file-datalake/tests/fake_credentials.py", + "tools/azure-sdk-tools/devtools_testutils/fake_credentials.py", "tools/azure-sdk-tools/devtools_testutils/mgmt_settings_fake.py" ], "_justification": "File contains private key used by test code." diff --git a/eng/ci_tools.txt b/eng/ci_tools.txt index 8c693ec8b715..8f96bef7b118 100644 --- a/eng/ci_tools.txt +++ b/eng/ci_tools.txt @@ -3,7 +3,7 @@ cryptography==3.1 setuptools==44.1.0; python_version == '2.7' setuptools==46.4.0; python_version >= '3.5' virtualenv==20.0.23 -wheel==0.34.2 +wheel==0.37.0 Jinja2==2.11.2 packaging==20.4 tox==3.15.0 @@ -11,7 +11,7 @@ tox-monorepo==0.1.2 twine==1.15.0; python_version == '2.7' or python_version == '3.5' twine==3.1.1; python_version >= '3.6' pathlib2==2.3.5 -readme-renderer[md]==25.0 +readme-renderer[md]==25.0; python_version < '3.10' doc-warden==0.7.1 # we pin coverage to 4.5.4 because there is an bug with `pytest-cov`. the generated coverage files cannot be `coverage combine`ed coverage==4.5.4 @@ -22,6 +22,9 @@ pip==20.3 black==21.6b0; python_version >= '3.6' wrapt<=1.12.1; python_version == '2.7' +# python 3.10 pinned packages +cffi==1.15.0rc2; python_version >= '3.10' + # locking packages defined as deps from azure-sdk-tools or azure-devtools pytoml==0.1.21 pyOpenSSL==19.1.0 diff --git a/eng/common/TestResources/New-TestResources.ps1 b/eng/common/TestResources/New-TestResources.ps1 index 189f5185c71e..fed1bd7b38e8 100644 --- a/eng/common/TestResources/New-TestResources.ps1 +++ b/eng/common/TestResources/New-TestResources.ps1 @@ -84,11 +84,13 @@ if (!$PSBoundParameters.ContainsKey('ErrorAction')) { $ErrorActionPreference = 'Stop' } -function Log($Message) { +function Log($Message) +{ Write-Host ('{0} - {1}' -f [DateTime]::Now.ToLongTimeString(), $Message) } -function Retry([scriptblock] $Action, [int] $Attempts = 5) { +function Retry([scriptblock] $Action, [int] $Attempts = 5) +{ $attempt = 0 $sleep = 5 @@ -109,7 +111,20 @@ function Retry([scriptblock] $Action, [int] $Attempts = 5) { } } -function MergeHashes([hashtable] $source, [psvariable] $dest) { +function LoadCloudConfig([string] $env) +{ + $configPath = "$PSScriptRoot/clouds/$env.json" + if (!(Test-Path $configPath)) { + Write-Warning "Could not find cloud configuration for environment '$env'" + return @{} + } + + $config = Get-Content $configPath | ConvertFrom-Json -AsHashtable + return $config +} + +function MergeHashes([hashtable] $source, [psvariable] $dest) +{ foreach ($key in $source.Keys) { if ($dest.Value.ContainsKey($key) -and $dest.Value[$key] -ne $source[$key]) { Write-Warning ("Overwriting '$($dest.Name).$($key)' with value '$($dest.Value[$key])' " + @@ -119,7 +134,8 @@ function MergeHashes([hashtable] $source, [psvariable] $dest) { } } -function BuildBicepFile([System.IO.FileSystemInfo] $file) { +function BuildBicepFile([System.IO.FileSystemInfo] $file) +{ if (!(Get-Command bicep -ErrorAction Ignore)) { Write-Error "A bicep file was found at '$($file.FullName)' but the Azure Bicep CLI is not installed. See https://aka.ms/install-bicep-pwsh" throw @@ -334,7 +350,7 @@ try { $serviceName = if (Split-Path $ServiceDirectory) { Split-Path -Leaf $ServiceDirectory } else { - $ServiceDirectory + $ServiceDirectory.Trim('/') } $ResourceGroupName = if ($ResourceGroupName) { @@ -492,6 +508,8 @@ try { $templateParameters.Add('testApplicationSecret', $TestApplicationSecret) } + $defaultCloudParameters = LoadCloudConfig $Environment + MergeHashes $defaultCloudParameters $(Get-Variable templateParameters) MergeHashes $ArmTemplateParameters $(Get-Variable templateParameters) MergeHashes $AdditionalParameters $(Get-Variable templateParameters) @@ -600,7 +618,7 @@ try { $outputFile = "$($templateFile.originalFilePath).env" $environmentText = $deploymentOutputs | ConvertTo-Json; - $bytes = ([System.Text.Encoding]::UTF8).GetBytes($environmentText) + $bytes = [System.Text.Encoding]::UTF8.GetBytes($environmentText) $protectedBytes = [Security.Cryptography.ProtectedData]::Protect($bytes, $null, [Security.Cryptography.DataProtectionScope]::CurrentUser) Set-Content $outputFile -Value $protectedBytes -AsByteStream -Force diff --git a/eng/common/TestResources/clouds/AzureChinaCloud.json b/eng/common/TestResources/clouds/AzureChinaCloud.json new file mode 100644 index 000000000000..8c1ebd284e6d --- /dev/null +++ b/eng/common/TestResources/clouds/AzureChinaCloud.json @@ -0,0 +1,15 @@ +{ + "azConfigEndpointSuffix": ".azconfig.azure.cn", + "azureAuthorityHost": "https://login.chinacloudapi.cn/", + "cognitiveServicesEndpointSuffix": ".cognitiveservices.azure.cn", + "containerRegistryEndpointSuffix": ".azurecr.cn", + "cosmosEndpointSuffix": "cosmos.azure.cn", + "enableStorageVersioning": false, + "keyVaultDomainSuffix": ".vault.azure.cn", + "keyVaultEndpointSuffix": ".vault.azure.cn", + "keyVaultSku": "standard", + "searchEndpointSuffix": "search.azure.cn", + "serviceBusEndpointSuffix": ".servicebus.chinacloudapi.cn", + "storageEndpointSuffix": "core.chinacloudapi.cn", + "textAnalyticsSku": "S" +} diff --git a/eng/common/TestResources/clouds/AzureCloud.json b/eng/common/TestResources/clouds/AzureCloud.json new file mode 100644 index 000000000000..8af6815abd15 --- /dev/null +++ b/eng/common/TestResources/clouds/AzureCloud.json @@ -0,0 +1,8 @@ +{ + "azureAuthorityHost": "https://login.microsoftonline.com/", + "cognitiveServicesEndpointSuffix": ".cognitiveservices.azure.com", + "communicationServicesEndpointSuffix": ".communication.azure.com", + "keyVaultDomainSuffix": ".vault.azure.net", + "keyVaultEndpointSuffix": ".vault.azure.net", + "storageEndpointSuffix": "core.windows.net" +} diff --git a/eng/common/TestResources/clouds/AzureUSGovernment.json b/eng/common/TestResources/clouds/AzureUSGovernment.json new file mode 100644 index 000000000000..989975aad843 --- /dev/null +++ b/eng/common/TestResources/clouds/AzureUSGovernment.json @@ -0,0 +1,15 @@ +{ + "azConfigEndpointSuffix": ".azconfig.azure.us", + "azureAuthorityHost": "https://login.microsoftonline.us/", + "cognitiveServicesEndpointSuffix": ".cognitiveservices.azure.us", + "containerRegistryEndpointSuffix": ".azurecr.us", + "cosmosEndpointSuffix": "cosmos.azure.us", + "enableStorageVersioning": false, + "formRecognizerLocation": "usgovvirginia", + "keyVaultDomainSuffix": ".vault.usgovcloudapi.net", + "keyVaultEndpointSuffix": ".vault.usgovcloudapi.net", + "keyVaultSku": "premium", + "searchEndpointSuffix": "search.azure.us", + "serviceBusEndpointSuffix": ".servicebus.usgovcloudapi.net", + "storageEndpointSuffix": "core.usgovcloudapi.net" +} diff --git a/eng/common/pipelines/templates/steps/docker-pull-image.yml b/eng/common/pipelines/templates/steps/docker-pull-image.yml new file mode 100644 index 000000000000..fa22df31974b --- /dev/null +++ b/eng/common/pipelines/templates/steps/docker-pull-image.yml @@ -0,0 +1,15 @@ +parameters: + - name: ContainerRegistryClientId + type: string + - name: ContainerRegistryClientSecret + type: string + - name: ImageId + type: string +steps: +- pwsh: | + $containerRegistry = ("${{parameters.ImageId}}" -split "\/")[0] + docker login $containerRegistry -u "${{ parameters.ContainerRegistryClientId }}" -p "${{ parameters.ContainerRegistryClientSecret }}" + displayName: Login container registry +- pwsh: | + docker pull '${{ parameters.ImageId}}' + displayName: Pull docker image ${{ parameters.ImageId }} diff --git a/eng/common/pipelines/templates/steps/get-pr-owners.yml b/eng/common/pipelines/templates/steps/get-pr-owners.yml index bf2ee00ffc9e..1ea87e85680d 100644 --- a/eng/common/pipelines/templates/steps/get-pr-owners.yml +++ b/eng/common/pipelines/templates/steps/get-pr-owners.yml @@ -1,27 +1,41 @@ parameters: TargetVariable: '' + TargetUserVariable: 'notspecified' + TargetTeamVariable: 'notspecified' + TargetLabelVariable: 'notspecified' ServiceDirectory: '' + DevOpsFeed: "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json" steps: - - pwsh: | - git clone https://github.com/Azure/azure-sdk-tools.git $(Build.SourcesDirectory)/tools_repo - cd $(Build.SourcesDirectory)/tools_repo - git checkout azure-sdk-tools_20210114.1 - displayName: Setup Identity Resolver + - task: DotNetCoreCLI@2 + displayName: 'Install Identity Resolver' + inputs: + command: custom + custom: 'tool' + arguments: 'install --global --add-source "${{ parameters.DevOpsFeed }}" --version "1.0.0-dev.20211018.1" "Azure.Sdk.Tools.IdentityResolver"' + workingDirectory: '$(Agent.BuildDirectory)' + + - task: DotNetCoreCLI@2 + displayName: 'Install CodeOwners Retriever' + inputs: + command: custom + custom: 'tool' + arguments: 'install --global --add-source "${{ parameters.DevOpsFeed }}" --version "1.0.0-dev.20211019.1" "Azure.Sdk.Tools.RetrieveCodeOwners"' + workingDirectory: '$(Agent.BuildDirectory)' - pwsh: | - dotnet run -v q -- ` + identity-resolver ` --aad-app-id-var APP_ID ` --aad-app-secret-var APP_SECRET ` --aad-tenant-var AAD_TENANT ` --kusto-url-var KUSTO_URL ` --kusto-database-var KUSTO_DB ` --kusto-table-var KUSTO_TABLE ` - --identity "$(Build.QueuedBy)" ` - --targetvar "${{ parameters.TargetVariable }}" + --identity-name "$(Build.QueuedBy)" ` + --identity-email "$(Build.RequestedForEmail)" ` + --targetvar "${{ coalesce(parameters.TargetVariable, parameters.TargetUserVariable) }}" displayName: 'Resolving Queuing User' continueOnError: true - workingDirectory: $(Build.SourcesDirectory)/tools_repo/tools/notification-configuration/identity-resolver env: APP_ID: $(notification-aad-app-id) APP_SECRET: $(notification-aad-secret) @@ -31,15 +45,10 @@ steps: KUSTO_TABLE: $(notification-kusto-table) - pwsh: | - Remove-Item -Force -Recurse $(Build.SourcesDirectory)/tools_repo - displayName: Clean Up Cloned Tools Repo - - - task: PowerShell@2 - displayName: Add CodeOwners if Present - inputs: - pwsh: true - filePath: $(Build.SourcesDirectory)/eng/common/scripts/get-codeowners.ps1 - arguments: > - -TargetDirectory "/sdk/${{ parameters.ServiceDirectory }}/" - -RootDirectory "$(Build.SourcesDirectory)" - -VsoVariable "${{ parameters.TargetVariable }}" \ No newline at end of file + retrieve-codeowners ` + --target-directory "/sdk/${{ parameters.ServiceDirectory }}/" ` + --root-directory "$(Build.SourcesDirectory)" ` + --vso-owning-users "${{ coalesce(parameters.TargetVariable, parameters.TargetUserVariable) }}" ` + --vso-owning-teams "${{ parameters.TargetTeamVariable }}" ` + --vso-owning-labels "${{ parameters.TargetLabelVariable }}" + displayName: 'Add CodeOwners if Present' \ No newline at end of file diff --git a/eng/common/pipelines/templates/steps/sparse-checkout.yml b/eng/common/pipelines/templates/steps/sparse-checkout.yml index 5b36bf48e4a9..69db80fc82de 100644 --- a/eng/common/pipelines/templates/steps/sparse-checkout.yml +++ b/eng/common/pipelines/templates/steps/sparse-checkout.yml @@ -38,8 +38,8 @@ steps: } else { Write-Host "Repository $($repository.Name) is being initialized." - Write-Host "git clone --no-checkout --filter=tree:0 git://github.com/$($repository.Name) ." - git clone --no-checkout --filter=tree:0 git://github.com/$($repository.Name) . + Write-Host "git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) ." + git clone --no-checkout --filter=tree:0 https://github.com/$($repository.Name) . Write-Host "git sparse-checkout init" git sparse-checkout init diff --git a/eng/common/scripts/ChangeLog-Operations.ps1 b/eng/common/scripts/ChangeLog-Operations.ps1 index 02f498130246..df2bc9d1d29c 100644 --- a/eng/common/scripts/ChangeLog-Operations.ps1 +++ b/eng/common/scripts/ChangeLog-Operations.ps1 @@ -351,4 +351,15 @@ function Remove-EmptySections { } $ChangeLogEntry.ReleaseContent = $sanitizedReleaseContent.ToArray() } +} + +function Get-LatestReleaseDateFromChangeLog +{ + param ( + [Parameter(Mandatory = $true)] + $ChangeLogLocation + ) + $changeLogEntries = Get-ChangeLogEntries -ChangeLogLocation $ChangeLogLocation + $latestVersion = $changeLogEntries[0].ReleaseStatus.Trim("()") + return ($latestVersion -as [DateTime]) } \ No newline at end of file diff --git a/eng/common/scripts/Invoke-GitHubAPI.ps1 b/eng/common/scripts/Invoke-GitHubAPI.ps1 index 5d2981f01bb8..0f0469b8feba 100644 --- a/eng/common/scripts/Invoke-GitHubAPI.ps1 +++ b/eng/common/scripts/Invoke-GitHubAPI.ps1 @@ -157,6 +157,36 @@ function New-GitHubPullRequest { -MaximumRetryCount 3 } +function New-GitHubIssue { + param ( + [Parameter(Mandatory = $true)] + $RepoOwner, + [Parameter(Mandatory = $true)] + $RepoName, + [Parameter(Mandatory = $true)] + $Title, + [Parameter(Mandatory = $true)] + $Description, + [ValidateNotNullOrEmpty()] + [Parameter(Mandatory = $true)] + $AuthToken + ) + + $uri = "$GithubAPIBaseURI/$RepoOwner/$RepoName/issues" + + $parameters = @{ + title = $Title + body = $Description + } + + return Invoke-RestMethod ` + -Method POST ` + -Body ($parameters | ConvertTo-Json) ` + -Uri $uri ` + -Headers (Get-GitHubApiHeaders -token $AuthToken) ` + -MaximumRetryCount 3 +} + function Add-GitHubIssueComment { param ( [Parameter(Mandatory = $true)] diff --git a/eng/common/scripts/Prepare-Release.ps1 b/eng/common/scripts/Prepare-Release.ps1 index 2005347822fd..e764108a24ed 100644 --- a/eng/common/scripts/Prepare-Release.ps1 +++ b/eng/common/scripts/Prepare-Release.ps1 @@ -109,11 +109,15 @@ else $releaseDateString = $ParsedReleaseDate.ToString("MM/dd/yyyy") $month = $ParsedReleaseDate.ToString("MMMM") -Write-Host Write-Host "Assuming release is in $month with release date $releaseDateString" -ForegroundColor Green +if (Test-Path "Function:GetExistingPackageVersions") +{ + $releasedVersions = GetExistingPackageVersions -PackageName $packageProperties.Name -GroupId $packageProperties.Group + $latestReleasedVersion = $releasedVersions[$releasedVersions.Count - 1] + Write-Host "Latest released version: ${latestReleasedVersion}" -ForegroundColor Green +} $currentProjectVersion = $packageProperties.Version - $newVersion = Read-Host -Prompt "Input the new version, or press Enter to use use current project version '$currentProjectVersion'" if (!$newVersion) @@ -173,8 +177,17 @@ if ($releaseTrackingOnly) if (Test-Path "Function:SetPackageVersion") { - SetPackageVersion -PackageName $packageProperties.Name -Version $newVersion -ServiceDirectory $packageProperties.ServiceDirectory -ReleaseDate $releaseDateString ` - -PackageProperties $packageProperties + $replaceLatestEntryTitle = $true + $latestVersion = Get-LatestReleaseDateFromChangeLog -ChangeLogLocation $packageProperties.ChangeLogPath + if ($latestVersion) + { + $promptMessage = "The latest entry in the CHANGELOG.md already has a release date. Do you want to replace the latest entry title? Please enter (y or n)." + while (($readInput = Read-Host -Prompt $promptMessage) -notmatch '^[yn]$'){ } + $replaceLatestEntryTitle = ($readInput -eq "y") + } + SetPackageVersion -PackageName $packageProperties.Name -Version $newVersion ` + -ServiceDirectory $packageProperties.ServiceDirectory -ReleaseDate $releaseDateString ` + -PackageProperties $packageProperties -ReplaceLatestEntryTitle $replaceLatestEntryTitle } else { diff --git a/eng/common/scripts/Save-Package-Properties.ps1 b/eng/common/scripts/Save-Package-Properties.ps1 index 10cb4158c01f..db2470dbd0ff 100644 --- a/eng/common/scripts/Save-Package-Properties.ps1 +++ b/eng/common/scripts/Save-Package-Properties.ps1 @@ -73,6 +73,14 @@ function GetRelativePath($path) { if (!$path) { return '' } + + # If the path is already relative return the path. Calling `GetRelativePath` + # on a relative path converts the relative path to an absolute path based on + # the current working directory which can result in unexpected outputs. + if (![IO.Path]::IsPathRooted($path)) { + return $path + } + $relativeTo = Resolve-Path $PSScriptRoot/../../../ # Replace "\" with "/" so the path is valid across other platforms and tools $relativePath = [IO.Path]::GetRelativePath($relativeTo, $path) -replace "\\", '/' @@ -88,21 +96,19 @@ if ($allPackageProperties) } foreach($pkg in $allPackageProperties) { - if ($pkg.IsNewSdk) + Write-Host "Package Name: $($pkg.Name)" + Write-Host "Package Version: $($pkg.Version)" + Write-Host "Package SDK Type: $($pkg.SdkType)" + Write-Host "Artifact Name: $($pkg.ArtifactName)" + Write-Host "Release date: $($pkg.ReleaseStatus)" + $configFilePrefix = $pkg.Name + if ($pkg.ArtifactName) { - Write-Host "Package Name: $($pkg.Name)" - Write-Host "Package Version: $($pkg.Version)" - Write-Host "Package SDK Type: $($pkg.SdkType)" - Write-Host "Artifact Name: $($pkg.ArtifactName)" - Write-Host "Release date: $($pkg.ReleaseStatus)" - $configFilePrefix = $pkg.Name - if ($pkg.ArtifactName) - { - $configFilePrefix = $pkg.ArtifactName - } - $outputPath = Join-Path -Path $outDirectory "$configFilePrefix.json" - SetOutput $outputPath $pkg + $configFilePrefix = $pkg.ArtifactName } + $outputPath = Join-Path -Path $outDirectory "$configFilePrefix.json" + Write-Host "Output path of json file: $outputPath" + SetOutput $outputPath $pkg } Get-ChildItem -Path $outDirectory diff --git a/eng/common/scripts/Update-DocsMsPackages.ps1 b/eng/common/scripts/Update-DocsMsPackages.ps1 index 562cc307bef5..e9ede6161be6 100644 --- a/eng/common/scripts/Update-DocsMsPackages.ps1 +++ b/eng/common/scripts/Update-DocsMsPackages.ps1 @@ -24,13 +24,20 @@ docs generation from pacakges which are not published to the default feed). This variable is meant to be used in the domain-specific business logic in &$UpdateDocsMsPackagesFn +.PARAMETER ImageId +Optional The docker image for package validation in format of '$containerRegistry/$imageName:$tag'. +e.g. azuresdkimages.azurecr.io/jsrefautocr:latest + #> param ( [Parameter(Mandatory = $true)] [string] $DocRepoLocation, # the location of the cloned doc repo [Parameter(Mandatory = $false)] - [string] $PackageSourceOverride + [string] $PackageSourceOverride, + + [Parameter(Mandatory = $false)] + [string] $ImageId ) . (Join-Path $PSScriptRoot common.ps1) @@ -54,7 +61,7 @@ function GetDocsMetadataForMoniker($moniker) { $versionPreview = $fileObject.Version } - $metadata += @{ + $entry = @{ Package = $fileObject.Name; VersionGA = $versionGa; VersionPreview = $versionPreview; @@ -62,6 +69,11 @@ function GetDocsMetadataForMoniker($moniker) { Type = $fileObject.SdkType; New = $fileObject.IsNewSdk; } + if ($fileObject.PSObject.Members.Name -contains "Group") + { + $entry.Add("GroupId", $fileObject.Group) + } + $metadata += $entry } return $metadata diff --git a/eng/common/scripts/Verify-Links.ps1 b/eng/common/scripts/Verify-Links.ps1 index 3808d1f8bb5e..275d4bbde5bd 100644 --- a/eng/common/scripts/Verify-Links.ps1 +++ b/eng/common/scripts/Verify-Links.ps1 @@ -244,10 +244,10 @@ function CheckLink ([System.Uri]$linkUri, $allowRetry=$true) if ($statusCode -in $errorStatusCodes) { if ($originalLinkUri -ne $linkUri) { - LogWarning "[$statusCode] broken link $originalLinkUri (resolved to $linkUri)" + LogError "[$statusCode] broken link $originalLinkUri (resolved to $linkUri)" } else { - LogWarning "[$statusCode] broken link $linkUri" + LogError "[$statusCode] broken link $linkUri" } $linkValid = $false @@ -423,6 +423,9 @@ foreach ($url in $urls) { $pageUrisToCheck.Enqueue($uri); } +if ($devOpsLogging) { + Write-Host "##[group]Link checking details" +} while ($pageUrisToCheck.Count -ne 0) { $pageUri = $pageUrisToCheck.Dequeue(); @@ -430,7 +433,7 @@ while ($pageUrisToCheck.Count -ne 0) $checkedPages[$pageUri] = $true; $linkUris = GetLinks $pageUri - Write-Host "Found $($linkUris.Count) links on page $pageUri"; + Write-Host "Checking $($linkUris.Count) links found on page $pageUri"; $badLinksPerPage = @(); foreach ($linkUri in $linkUris) { $isLinkValid = CheckLink $linkUri @@ -450,6 +453,9 @@ while ($pageUrisToCheck.Count -ne 0) $badLinks[$pageUri] = $badLinksPerPage } } +if ($devOpsLogging) { + Write-Host "##[endgroup]" +} if ($badLinks.Count -gt 0) { Write-Host "Summary of broken links:" @@ -464,7 +470,7 @@ foreach ($pageLink in $badLinks.Keys) { $linksChecked = $checkedLinks.Count - $cachedLinksCount if ($badLinks.Count -gt 0) { - LogError "Checked $linksChecked links with $($badLinks.Count) page(s) broken." + Write-Host "Checked $linksChecked links with $($badLinks.Count) broken link(s) found." } else { Write-Host "Checked $linksChecked links. No broken links found." diff --git a/eng/common/scripts/get-codeowners.ps1 b/eng/common/scripts/get-codeowners.ps1 index f28cb3df7899..fdf8453aceeb 100644 --- a/eng/common/scripts/get-codeowners.ps1 +++ b/eng/common/scripts/get-codeowners.ps1 @@ -47,4 +47,3 @@ else { Write-Host ($ownedFolders | ConvertTo-Json) return "" } - diff --git a/eng/common/scripts/stress-testing/deploy-stress-tests.ps1 b/eng/common/scripts/stress-testing/deploy-stress-tests.ps1 index 76eff6a31e1f..a50dc1522ec6 100644 --- a/eng/common/scripts/stress-testing/deploy-stress-tests.ps1 +++ b/eng/common/scripts/stress-testing/deploy-stress-tests.ps1 @@ -12,7 +12,10 @@ param( [switch]$Login, [Parameter(ParameterSetName = 'DoLogin')] - [string]$Subscription + [string]$Subscription, + + # Default to true in Azure Pipelines environments + [switch] $CI = ($null -ne $env:SYSTEM_TEAMPROJECTID) ) $ErrorActionPreference = 'Stop' @@ -76,9 +79,9 @@ function DeployStressTests( [string]$environment = 'test', [string]$repository = 'images', [boolean]$pushImages = $false, - [string]$clusterGroup = 'rg-stress-test-cluster-', + [string]$clusterGroup = 'rg-stress-cluster-test', [string]$deployId = 'local', - [string]$subscription = 'Azure SDK Test Resources' + [string]$subscription = 'Azure SDK Developer Playground' ) { if ($PSCmdlet.ParameterSetName -eq 'DoLogin') { Login $subscription $clusterGroup $pushImages @@ -88,7 +91,7 @@ function DeployStressTests( Run helm repo update if ($LASTEXITCODE) { return $LASTEXITCODE } - $pkgs = FindStressPackages $searchDirectory $filters + $pkgs = FindStressPackages $searchDirectory $filters $CI Write-Host "" "Found $($pkgs.Length) stress test packages:" Write-Host $pkgs.Directory "" foreach ($pkg in $pkgs) { @@ -106,6 +109,8 @@ function DeployStressTests( } exit 1 } + + Write-Host "`nStress test telemetry links (dashboard, fileshare, etc.): https://aka.ms/azsdk/stress/dashboard" } function DeployStressPackage( @@ -151,6 +156,7 @@ function DeployStressPackage( Write-Host "Creating namespace $($pkg.Namespace) if it does not exist..." kubectl create namespace $pkg.Namespace --dry-run=client -o yaml | kubectl apply -f - + if ($LASTEXITCODE) {exit $LASTEXITCODE} Write-Host "Installing or upgrading stress test $($pkg.ReleaseName) from $($pkg.Directory)" Run helm upgrade $pkg.ReleaseName $pkg.Directory ` diff --git a/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 b/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 index 4d567926f9f8..883fda959866 100644 --- a/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 +++ b/eng/common/scripts/stress-testing/find-all-stress-packages.ps1 @@ -9,7 +9,7 @@ class StressTestPackageInfo { [string]$ReleaseName } -function FindStressPackages([string]$directory, [hashtable]$filters = @{}) { +function FindStressPackages([string]$directory, [hashtable]$filters = @{}, [boolean]$CI = $false) { # Bare minimum filter for stress tests $filters['stressTest'] = 'true' @@ -18,7 +18,7 @@ function FindStressPackages([string]$directory, [hashtable]$filters = @{}) { foreach ($chartFile in $chartFiles) { $chart = ParseChart $chartFile if (matchesAnnotations $chart $filters) { - $packages += NewStressTestPackageInfo $chart $chartFile + $packages += NewStressTestPackageInfo $chart $chartFile $CI } } @@ -39,9 +39,17 @@ function MatchesAnnotations([hashtable]$chart, [hashtable]$filters) { return $true } -function NewStressTestPackageInfo([hashtable]$chart, [System.IO.FileInfo]$chartFile) { +function NewStressTestPackageInfo([hashtable]$chart, [System.IO.FileInfo]$chartFile, [boolean]$CI) { + $namespace = if ($CI) { + $chart.annotations.namespace + } else { + $namespace = if ($env:USER) { $env:USER } else { "${env:USERNAME}" } + # Remove spaces, etc. that may be in $namespace + $namespace -replace '\W' + } + return [StressTestPackageInfo]@{ - Namespace = $chart.annotations.namespace + Namespace = $namespace.ToLower() Directory = $chartFile.DirectoryName ReleaseName = $chart.name } diff --git a/eng/common/testproxy/docker-start-proxy.ps1 b/eng/common/testproxy/docker-start-proxy.ps1 index d32cb4b43f48..577af6d24d87 100644 --- a/eng/common/testproxy/docker-start-proxy.ps1 +++ b/eng/common/testproxy/docker-start-proxy.ps1 @@ -25,7 +25,7 @@ catch { Write-Error "Please check your docker invocation and try running the script again." } -$SELECTED_IMAGE_TAG = "1108695" +$SELECTED_IMAGE_TAG = "1147815" $CONTAINER_NAME = "ambitious_azsdk_test_proxy" $LINUX_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:${SELECTED_IMAGE_TAG}" $WINDOWS_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:${SELECTED_IMAGE_TAG}" @@ -40,6 +40,7 @@ function Get-Proxy-Container(){ $SelectedImage = $LINUX_IMAGE_SOURCE $Initial = "" +$LinuxContainerArgs = "--add-host=host.docker.internal:host-gateway" # most of the time, running this script on a windows machine will work just fine, as docker defaults to linux containers # however, in CI, windows images default to _windows_ containers. We cannot swap them. We can tell if we're in a CI build by @@ -47,6 +48,7 @@ $Initial = "" if ($IsWindows -and $env:TF_BUILD){ $SelectedImage = $WINDOWS_IMAGE_SOURCE $Initial = "C:" + $LinuxContainerArgs = "" } if ($Mode -eq "start"){ @@ -62,9 +64,31 @@ if ($Mode -eq "start"){ } # else we need to create it else { + $attempts = 0 Write-Host "Attempting creation of Docker host $CONTAINER_NAME" - Write-Host "docker container create -v `"${root}:${Initial}/etc/testproxy`" -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage" - docker container create -v "${root}:${Initial}/etc/testproxy" -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage + Write-Host "docker container create -v `"${root}:${Initial}/etc/testproxy`" $LinuxContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage" + while($attempts -lt 3){ + docker container create -v "${root}:${Initial}/etc/testproxy" $LinuxContainerArgs -p 5001:5001 -p 5000:5000 --name $CONTAINER_NAME $SelectedImage + + if($LASTEXITCODE -ne 0){ + $attempts += 1 + Start-Sleep -s 10 + + if($attempts -lt 3){ + Write-Host "Attempt $attempts failed. Retrying." + } + + continue + } + else { + break + } + } + + if($LASTEXITCODE -ne 0){ + Write-Host "Unable to successfully create docker container. Exiting." + exit(1) + } } Write-Host "Attempting start of Docker host $CONTAINER_NAME" diff --git a/eng/common/testproxy/test-proxy-docker.yml b/eng/common/testproxy/test-proxy-docker.yml index 97617b6fd08a..8cde51a89819 100644 --- a/eng/common/testproxy/test-proxy-docker.yml +++ b/eng/common/testproxy/test-proxy-docker.yml @@ -6,10 +6,18 @@ steps: $(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1 displayName: 'Language Specific Certificate Trust' + - pwsh: | + docker info + displayName: 'Dump active docker information' + - pwsh: | $(Build.SourcesDirectory)/eng/common/testproxy/docker-start-proxy.ps1 -Mode start -TargetFolder "${{ parameters.rootFolder }}" displayName: 'Run the docker container' - pwsh: | docker container ls -a - displayName: Check running container \ No newline at end of file + displayName: Check running container + + - pwsh: | + Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true" + displayName: 'Set PROXY_MANUAL_START' diff --git a/eng/common/testproxy/test-proxy-tool.yml b/eng/common/testproxy/test-proxy-tool.yml index 9f24b0f0d527..8401c4f5d073 100644 --- a/eng/common/testproxy/test-proxy-tool.yml +++ b/eng/common/testproxy/test-proxy-tool.yml @@ -6,42 +6,29 @@ steps: $(Build.SourcesDirectory)/eng/common/scripts/trust-proxy-certificate.ps1 displayName: 'Language Specific Certificate Trust' - - pwsh: | - Write-Host "##vso[task.setvariable variable=OriginalPath]$env:PATH" - displayName: 'Store Path Value' - - pwsh: | Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Path]$(Build.SourcesDirectory)/eng/common/testproxy/dotnet-devcert.pfx" Write-Host "##vso[task.setvariable variable=ASPNETCORE_Kestrel__Certificates__Default__Password]password" - displayName: 'Configure Kestrel Environment Variables' - - - task: UseDotNet@2 - displayName: "Use .NET Core SDK" - inputs: - packageType: sdk - version: 5.0.205 + Write-Host "##vso[task.setvariable variable=PROXY_MANUAL_START]true" + displayName: 'Configure Kestrel and PROXY_MANUAL_START Variables' - pwsh: | dotnet tool install azure.sdk.tools.testproxy ` --tool-path $(Build.BinariesDirectory)/test-proxy ` --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json ` - --version 1.0.0-dev.20210811.2 + --version 1.0.0-dev.20211104.2 displayName: "Install test-proxy" - pwsh: | Start-Process $(Build.BinariesDirectory)/test-proxy/test-proxy.exe ` -ArgumentList "--storage-location '${{ parameters.rootFolder }}'" ` - -NoNewWindow -PassThru + -NoNewWindow -PassThru -RedirectStandardOutput $(Build.SourcesDirectory)/test-proxy.log displayName: 'Run the testproxy - windows' condition: and(succeeded(), eq(variables['Agent.OS'],'Windows_NT')) # nohup does NOT continue beyond the current session if you use it within powershell - bash: | - sudo nohup $(Build.BinariesDirectory)/test-proxy/test-proxy & + nohup $(Build.BinariesDirectory)/test-proxy/test-proxy > $(Build.SourcesDirectory)/test-proxy.log & displayName: "Run the testproxy - linux/mac" condition: and(succeeded(), ne(variables['Agent.OS'],'Windows_NT')) workingDirectory: "${{ parameters.rootFolder }}" - - - pwsh: | - Write-Host "##vso[task.setvariable variable=PATH]$(OriginalPath)" - displayName: 'Restore .NET version by resetting path' \ No newline at end of file diff --git a/eng/pipelines/docindex.yml b/eng/pipelines/docindex.yml index 9d59564d6cc2..22f587a1e558 100644 --- a/eng/pipelines/docindex.yml +++ b/eng/pipelines/docindex.yml @@ -10,6 +10,7 @@ jobs: DocRepoLocation: $(Pipeline.Workspace)/docs DocRepoOwner: MicrosoftDocs DocRepoName: azure-docs-sdk-python + DocValidationImageId: azuresdkimages.azurecr.io/pyrefautocr:latest steps: # Docs CI uses Python 3.6.8 but that is not available on this image - task: UsePythonVersion@0 @@ -21,6 +22,12 @@ jobs: - pwsh: pip install --upgrade pip wheel setuptools displayName: Update python tools for package verification + # Pull and build the docker image. + - template: /eng/common/pipelines/templates/steps/docker-pull-image.yml + parameters: + ContainerRegistryClientId: $(azuresdkimages-cr-clientid) + ContainerRegistryClientSecret: $(azuresdkimages-cr-clientsecret) + ImageId: "$(DocValidationImageId)" # Sync docs repo onboarding files/folders - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml parameters: @@ -38,7 +45,7 @@ jobs: inputs: pwsh: true filePath: eng/common/scripts/Update-DocsMsPackages.ps1 - arguments: -DocRepoLocation $(DocRepoLocation) + arguments: -DocRepoLocation $(DocRepoLocation) -ImageId '$(DocValidationImageId)' displayName: Update Docs Onboarding condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true'))) # Push changes to docs repo @@ -70,7 +77,7 @@ jobs: inputs: pwsh: true filePath: eng/common/scripts/Update-DocsMsPackages.ps1 - arguments: -DocRepoLocation $(DocRepoLocation) -PackageSourceOverride "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" + arguments: -DocRepoLocation $(DocRepoLocation) -PackageSourceOverride "https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/" -ImageId '$(DocValidationImageId)' displayName: Update Docs Onboarding for Daily branch - template: /eng/common/pipelines/templates/steps/git-push-changes.yml parameters: diff --git a/eng/pipelines/templates/jobs/ci.tests.yml b/eng/pipelines/templates/jobs/ci.tests.yml index 0a268202a88f..2ddc3881ac96 100644 --- a/eng/pipelines/templates/jobs/ci.tests.yml +++ b/eng/pipelines/templates/jobs/ci.tests.yml @@ -72,6 +72,10 @@ jobs: value: ${{ parameters.InjectedPackages }} steps: + - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml + parameters: + BuildTargetingString: ${{ parameters.BuildTargetingString }} + - template: /eng/common/pipelines/templates/steps/verify-agent-os.yml parameters: AgentImage: $(OSVmImage) @@ -99,7 +103,6 @@ jobs: OSVmImage: $(OSVmImage) CoverageArg: $(CoverageArg) PythonVersion: $(PythonVersion) - BuildTargetingString: ${{ parameters.BuildTargetingString }} ToxTestEnv: $(toxenv) ToxEnvParallel: ${{ parameters.ToxEnvParallel }} InjectedPackages: $(InjectedPackages) @@ -112,7 +115,6 @@ jobs: - template: ../steps/set-dev-build.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} - ${{ each step in parameters.BeforeTestSteps }}: - ${{ step }} diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml index 7c5a7d5e326a..085b3de41017 100644 --- a/eng/pipelines/templates/jobs/ci.yml +++ b/eng/pipelines/templates/jobs/ci.yml @@ -70,10 +70,13 @@ jobs: vmImage: MMSUbuntu20.04 steps: + - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml + parameters: + BuildTargetingString: ${{ parameters.BuildTargetingString }} + - template: ../steps/build-artifacts.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} BeforePublishSteps: ${{ parameters.BeforePublishSteps }} BuildDocs: ${{ parameters.BuildDocs }} TestPipeline: ${{ parameters.TestPipeline }} @@ -98,6 +101,10 @@ jobs: vmImage: MMSUbuntu20.04 steps: + - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml + parameters: + BuildTargetingString: ${{ parameters.BuildTargetingString }} + - template: /eng/common/pipelines/templates/steps/check-spelling.yml - template: /eng/common/pipelines/templates/steps/verify-links.yml @@ -112,7 +119,6 @@ jobs: - template: ../steps/analyze.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} TestMarkArgument: ${{ parameters.TestMarkArgument }} AdditionalTestArgs: '--wheel_dir="$(Build.ArtifactStagingDirectory)"' TestPipeline: ${{ parameters.TestPipeline }} @@ -180,7 +186,10 @@ jobs: vmImage: MMSUbuntu20.04 steps: + - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml + parameters: + BuildTargetingString: ${{ parameters.BuildTargetingString }} + - template: ../steps/test_regression.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} diff --git a/eng/pipelines/templates/jobs/live.tests.yml b/eng/pipelines/templates/jobs/live.tests.yml index 53c5d91c0a71..793c519010f1 100644 --- a/eng/pipelines/templates/jobs/live.tests.yml +++ b/eng/pipelines/templates/jobs/live.tests.yml @@ -35,12 +35,6 @@ parameters: - name: BuildDocs type: boolean default: true - - name: AllocateResourceGroup - type: boolean - default: true - - name: DeployArmTemplate - type: boolean - default: false - name: TestTimeoutInMinutes type: number default: 120 @@ -74,8 +68,6 @@ jobs: value: true - name: ArmTemplateParameters value: '@{}' - - name: BuildTargetingStringValue - value: $[ coalesce(variables['BuildTargetingString'], '${{ parameters.BuildTargetingString }}') ] timeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }} continueOnError: false @@ -93,38 +85,24 @@ jobs: parameters: AgentImage: $(OSVmImage) - - ${{ if eq(parameters['AllocateResourceGroup'], true) }}: - - pwsh: | - $BaseName = 't' + (New-Guid).ToString('n').Substring(0, 16) - $RgName = "rg-${{ parameters.ServiceDirectory }}-$($BaseName)" - $ResourceGroupExpiration = (Get-Date).ToUniversalTime().AddHours(24).ToString("o") - Write-Host "Creating Resource Group: $($RgName)" - Write-Host "##vso[task.setvariable variable=AZURE_RESOURCEGROUP_NAME]$RgName" - - az login --service-principal -u $(provisioner-aad-id) -p $(provisioner-aad-secret) --tenant $(provisioner-aad-tenant) - az account set --subscription $(provisioner-subscription) - - az group create --location westus2 --name $RgName --tags DeleteAfter=$ResourceGroupExpiration BuildId='$(Build.BuildId)' BuildJob='$(Agent.JobName)' BuildNumber='$(Build.BuildNumber)' BuildReason='$(Build.Reason)' - az group wait --created --resource-group $RgName - displayName: Create resource group and environment variable for tests + - template: /eng/pipelines/templates/steps/targeting-string-resolve.yml + parameters: + BuildTargetingString: ${{ parameters.BuildTargetingString }} - # figure out what's up with the create resource group above - - ${{ if eq(parameters['DeployArmTemplate'], true) }}: - - template: /eng/common/TestResources/build-test-resource-config.yml - parameters: - SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }} - SubscriptionConfigurations: ${{ parameters.CloudConfig.SubscriptionConfigurations }} + - template: /eng/common/TestResources/build-test-resource-config.yml + parameters: + SubscriptionConfiguration: ${{ parameters.CloudConfig.SubscriptionConfiguration }} + SubscriptionConfigurations: ${{ parameters.CloudConfig.SubscriptionConfigurations }} - - template: ../../../common/TestResources/deploy-test-resources.yml - parameters: - Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }} - ServiceDirectory: '${{ parameters.ServiceDirectory }}' - SubscriptionConfiguration: $(SubscriptionConfiguration) - ArmTemplateParameters: $(ArmTemplateParameters) + - template: /eng/common/TestResources/deploy-test-resources.yml + parameters: + Location: ${{ coalesce(parameters.Location, parameters.CloudConfig.Location) }} + ServiceDirectory: '${{ parameters.ServiceDirectory }}' + SubscriptionConfiguration: $(SubscriptionConfiguration) + ArmTemplateParameters: $(ArmTemplateParameters) - template: ../steps/build-test.yml parameters: - BuildTargetingString: $(BuildTargetingStringValue) ServiceDirectory: ${{ parameters.ServiceDirectory }} CloudName: ${{ parameters.CloudConfig.Cloud }} CoverageArg: $(CoverageArg) @@ -141,14 +119,7 @@ jobs: InjectedPackages: ${{ parameters.InjectedPackages }} BuildDocs: ${{parameters.BuildDocs}} - - ${{ if eq(parameters['AllocateResourceGroup'], true) }}: - - pwsh: | - az group delete --resource-group $env:AZURE_RESOURCEGROUP_NAME -y --no-wait - displayName: Delete resource group - condition: ne(variables['AZURE_RESOURCEGROUP_NAME'], '') - - - ${{ if eq(parameters['DeployArmTemplate'], true) }}: - - template: /eng/common/TestResources/remove-test-resources.yml - parameters: - ServiceDirectory: '${{ parameters.ServiceDirectory }}' - SubscriptionConfiguration: $(SubscriptionConfiguration) + - template: /eng/common/TestResources/remove-test-resources.yml + parameters: + ServiceDirectory: '${{ parameters.ServiceDirectory }}' + SubscriptionConfiguration: $(SubscriptionConfiguration) diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml index 99c4178ce1ee..f562ccee86b5 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-client.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml @@ -72,9 +72,6 @@ parameters: stages: - stage: Build - variables: - - name: BuildTargetingStringValue - value: $[ coalesce(variables['BuildTargetingString'], '${{ parameters.BuildTargetingString }}') ] jobs: - template: /eng/pipelines/templates/jobs/ci.yml parameters: @@ -87,7 +84,7 @@ stages: AfterTestSteps: ${{ parameters.AfterTestSteps }} BeforePublishSteps: ${{ parameters.BeforePublishSteps }} TestMarkArgument: ${{ parameters.TestMarkArgument }} - BuildTargetingString: $(BuildTargetingStringValue) + BuildTargetingString: '${{ parameters.BuildTargetingString }}' TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }} ToxEnvParallel: ${{ parameters.ToxEnvParallel }} InjectedPackages: ${{ parameters.InjectedPackages }} diff --git a/eng/pipelines/templates/stages/archetype-sdk-tests.yml b/eng/pipelines/templates/stages/archetype-sdk-tests.yml index d0f2952d967f..6a98a05988c0 100644 --- a/eng/pipelines/templates/stages/archetype-sdk-tests.yml +++ b/eng/pipelines/templates/stages/archetype-sdk-tests.yml @@ -38,12 +38,6 @@ parameters: - name: JobName type: string default: 'Test' - - name: AllocateResourceGroup - type: boolean - default: true - - name: DeployArmTemplate - type: boolean - default: false - name: TestTimeoutInMinutes type: number default: 120 @@ -123,8 +117,6 @@ stages: TestMarkArgument: ${{ parameters.TestMarkArgument }} InjectedPackages: ${{ parameters.InjectedPackages }} BuildDocs: ${{ parameters.BuildDocs }} - AllocateResourceGroup: ${{ parameters.AllocateResourceGroup }} - DeployArmTemplate: ${{ parameters.DeployArmTemplate }} TestTimeoutInMinutes: ${{ parameters.TestTimeoutInMinutes }} MatrixConfigs: # Enumerate platforms and additional platforms based on supported clouds (sparse platform<-->cloud matrix). diff --git a/eng/pipelines/templates/stages/platform-matrix-cryptography-dependency.json b/eng/pipelines/templates/stages/platform-matrix-cryptography-dependency.json index 44241f2384fc..a6694042057e 100644 --- a/eng/pipelines/templates/stages/platform-matrix-cryptography-dependency.json +++ b/eng/pipelines/templates/stages/platform-matrix-cryptography-dependency.json @@ -23,6 +23,17 @@ }, "PythonVersion": "3.6", "CoverageArg": "--disablecov" + }, + { + "Config": { + "Ubuntu2004_310": { + "OSVmImage": "MMSUbuntu20.04", + "Pool": "azsdk-pool-mms-ubuntu-2004-general", + "PythonVersion": "3.10.0", + "CoverageArg": "--disablecov", + "TestSamples": "false" + } + } } ] } diff --git a/eng/pipelines/templates/stages/platform-matrix.json b/eng/pipelines/templates/stages/platform-matrix.json index b37d6952fb68..31ed0b8e03e6 100644 --- a/eng/pipelines/templates/stages/platform-matrix.json +++ b/eng/pipelines/templates/stages/platform-matrix.json @@ -25,6 +25,17 @@ "TestSamples": "false" } } + }, + { + "Config": { + "Ubuntu2004_310": { + "OSVmImage": "MMSUbuntu20.04", + "Pool": "azsdk-pool-mms-ubuntu-2004-general", + "PythonVersion": "3.10.0", + "CoverageArg": "--disablecov", + "TestSamples": "false" + } + } } ] } diff --git a/eng/pipelines/templates/steps/analyze.yml b/eng/pipelines/templates/steps/analyze.yml index 87bb4a225481..c2199a443cb9 100644 --- a/eng/pipelines/templates/steps/analyze.yml +++ b/eng/pipelines/templates/steps/analyze.yml @@ -1,5 +1,4 @@ parameters: - BuildTargetingString: 'azure-*' ServiceDirectory: '' TestMarkArgument: '' AdditionalTestArgs: '' @@ -8,6 +7,12 @@ parameters: VerifyAutorest: false ValidateFormatting: false +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - template: /eng/pipelines/templates/steps/analyze_dependency.yml @@ -25,16 +30,6 @@ steps: ServiceName: ${{parameters.ServiceDirectory}} ForRelease: false -# - template: /eng/common/pipelines/templates/steps/verify-samples.yml -# parameters: -# ServiceDirectory: ${{parameters.ServiceDirectory}} - - # Using --always-succeed so as not to block the build. Once package - # target is based on data available per-package the --always-succeed should - # be removed so this script can help enforce correct practices - # (https://github.com/Azure/azure-sdk-for-python/issues/8697) - - - pwsh: | pip install -r eng/ci_tools.txt $(if($IsWindows) {"--user" }) displayName: 'Install Necessary Dependencies' @@ -83,31 +78,28 @@ steps: condition: and(succeededOrFailed(), ne(variables['Skip.VerifySdist'],'true')) inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' - arguments: '"${{ parameters.BuildTargetingString }}" --service=${{parameters.ServiceDirectory}} --toxenv=verifysdist' + arguments: '"$(TargetingString)" --service=${{parameters.ServiceDirectory}} --toxenv=verifysdist' - task: PythonScript@0 displayName: 'Verify whl' condition: and(succeededOrFailed(), ne(variables['Skip.VerifyWhl'],'true')) inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' - arguments: '"${{ parameters.BuildTargetingString }}" --service=${{parameters.ServiceDirectory}} --toxenv=verifywhl' + arguments: '"$(TargetingString)" --service=${{parameters.ServiceDirectory}} --toxenv=verifywhl' - template: run_mypy.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} TestMarkArgument: ${{ parameters.TestMarkArgument }} - template: run_pylint.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} - ${{ if parameters.ValidateFormatting }}: - template: run_black.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} ValidateFormatting: ${{ parameters.ValidateFormatting }} - task: DownloadPipelineArtifact@2 @@ -119,21 +111,18 @@ steps: - template: ../steps/run_apistub.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} TestMarkArgument: ${{ parameters.TestMarkArgument }} AdditionalTestArgs: ${{parameters.AdditionalTestArgs}} - template: ../steps/run_bandit.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} TestMarkArgument: ${{ parameters.TestMarkArgument }} AdditionalTestArgs: ${{parameters.AdditionalTestArgs}} - template: ../steps/run_breaking_changes.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} TestMarkArgument: ${{ parameters.TestMarkArgument }} AdditionalTestArgs: ${{parameters.AdditionalTestArgs}} @@ -141,6 +130,10 @@ steps: parameters: Artifacts: ${{ parameters.Artifacts }} + - template: /eng/common/pipelines/templates/steps/detect-api-changes.yml + parameters: + Artifacts: ${{ parameters.Artifacts }} + - template: /eng/common/pipelines/templates/steps/eng-common-workflow-enforcer.yml - template: /eng/common/pipelines/templates/steps/publish-artifact.yml diff --git a/eng/pipelines/templates/steps/build-artifacts.yml b/eng/pipelines/templates/steps/build-artifacts.yml index b8f2370d1581..df62b07b91a5 100644 --- a/eng/pipelines/templates/steps/build-artifacts.yml +++ b/eng/pipelines/templates/steps/build-artifacts.yml @@ -5,9 +5,6 @@ parameters: - name: TestPipeline type: boolean default: false - - name: BuildTargetingString - type: string - default: 'azure-*' - name: ServiceDirectory type: string default: '' @@ -18,13 +15,21 @@ parameters: type: object default: [] +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - template: /eng/common/pipelines/templates/steps/set-test-pipeline-version.yml parameters: PackageName: "azure-template" ServiceDirectory: "template" TestPipeline: ${{ parameters.TestPipeline }} + - template: /eng/common/pipelines/templates/steps/set-default-branch.yml + - script: | echo "##vso[build.addbuildtag]Scheduled" displayName: 'Tag scheduled builds' @@ -43,7 +48,7 @@ steps: displayName: 'Generate Python2 Applicable Namespace Packages' inputs: scriptPath: 'scripts/devops_tasks/build_packages.py' - arguments: '-d "$(Build.ArtifactStagingDirectory)" "${{ parameters.BuildTargetingString }}" --pkgfilter="nspkg" --service=${{parameters.ServiceDirectory}}' + arguments: '-d "$(Build.ArtifactStagingDirectory)" "$(TargetingString)" --pkgfilter="nspkg" --service=${{parameters.ServiceDirectory}}' - task: UsePythonVersion@0 displayName: 'Use Python $(PythonVersion)' @@ -57,7 +62,7 @@ steps: - template: ../steps/set-dev-build.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} + - task: Powershell@2 inputs: filePath: $(Build.SourcesDirectory)/eng/common/scripts/Save-Package-Properties.ps1 @@ -73,7 +78,7 @@ steps: displayName: 'Generate Packages' inputs: scriptPath: 'scripts/devops_tasks/build_packages.py' - arguments: '-d "$(Build.ArtifactStagingDirectory)" "${{ parameters.BuildTargetingString }}" --service=${{parameters.ServiceDirectory}} --devbuild="$(SetDevVersion)"' + arguments: '-d "$(Build.ArtifactStagingDirectory)" "$(TargetingString)" --service=${{parameters.ServiceDirectory}} --devbuild="$(SetDevVersion)"' - script: | twine check $(Build.ArtifactStagingDirectory)/**/*.whl @@ -86,7 +91,7 @@ steps: inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" --service="${{ parameters.ServiceDirectory }}" --toxenv=sphinx diff --git a/eng/pipelines/templates/steps/build-test.yml b/eng/pipelines/templates/steps/build-test.yml index 1a18f5a6adc6..e2dbe73d609d 100644 --- a/eng/pipelines/templates/steps/build-test.yml +++ b/eng/pipelines/templates/steps/build-test.yml @@ -9,16 +9,22 @@ parameters: BeforeTestSteps: [] AfterTestSteps: [] CoverageArg: '' - BuildTargetingString: 'azure-*' ToxTestEnv: "" RunCoverage: ne(variables['CoverageArg'], '--disablecov') ToxEnvParallel: '' InjectedPackages: '' DevFeedName: 'public/azure-sdk-for-python' +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - pwsh: | gci -r $(Build.ArtifactStagingDirectory) + displayName: Dump Artifact Directory - template: /eng/pipelines/templates/steps/use-python-version.yml parameters: @@ -43,7 +49,7 @@ steps: inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" ${{ parameters.AdditionalTestArgs }} ${{ parameters.CoverageArg }} --mark_arg="${{ parameters.TestMarkArgument }}" @@ -94,7 +100,7 @@ steps: inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" --service="${{ parameters.ServiceDirectory }}" --toxenv="samples" env: ${{ parameters.EnvVars }} diff --git a/eng/pipelines/templates/steps/run_apistub.yml b/eng/pipelines/templates/steps/run_apistub.yml index 5ad5273b64bc..ccd103e7f45c 100644 --- a/eng/pipelines/templates/steps/run_apistub.yml +++ b/eng/pipelines/templates/steps/run_apistub.yml @@ -1,9 +1,14 @@ parameters: - BuildTargetingString: 'azure-*' ServiceDirectory: '' TestMarkArgument: '' AdditionalTestArgs: '' +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - task: PythonScript@0 displayName: 'Run Api Stub Generation' @@ -11,7 +16,7 @@ steps: inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" ${{ parameters.AdditionalTestArgs }} --mark_arg="${{ parameters.TestMarkArgument }}" --service="${{ parameters.ServiceDirectory }}" diff --git a/eng/pipelines/templates/steps/run_bandit.yml b/eng/pipelines/templates/steps/run_bandit.yml index 02e6c5e8cb1d..a6fd7c61ce01 100644 --- a/eng/pipelines/templates/steps/run_bandit.yml +++ b/eng/pipelines/templates/steps/run_bandit.yml @@ -1,16 +1,21 @@ parameters: - BuildTargetingString: 'azure-*' ServiceDirectory: '' TestMarkArgument: '' EnvVars: {} +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - task: PythonScript@0 displayName: 'Run Bandit' inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" --mark_arg="${{ parameters.TestMarkArgument }}" --service="${{ parameters.ServiceDirectory }}" --toxenv="bandit" diff --git a/eng/pipelines/templates/steps/run_black.yml b/eng/pipelines/templates/steps/run_black.yml index f3af5bba1298..ace65b037e0c 100644 --- a/eng/pipelines/templates/steps/run_black.yml +++ b/eng/pipelines/templates/steps/run_black.yml @@ -1,5 +1,4 @@ parameters: - BuildTargetingString: 'azure-*' ServiceDirectory: '' ValidateFormatting: false EnvVars: {} diff --git a/eng/pipelines/templates/steps/run_breaking_changes.yml b/eng/pipelines/templates/steps/run_breaking_changes.yml index 82a43d582eff..e5341b1a7577 100644 --- a/eng/pipelines/templates/steps/run_breaking_changes.yml +++ b/eng/pipelines/templates/steps/run_breaking_changes.yml @@ -1,16 +1,21 @@ parameters: - BuildTargetingString: 'azure-*' ServiceDirectory: '' TestMarkArgument: '' EnvVars: {} +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - task: PythonScript@0 displayName: 'Run Breaking Changes' inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" --mark_arg="${{ parameters.TestMarkArgument }}" --service="${{ parameters.ServiceDirectory }}" --toxenv="breaking" diff --git a/eng/pipelines/templates/steps/run_mypy.yml b/eng/pipelines/templates/steps/run_mypy.yml index 4fa05f07cd29..6a6b77ad0252 100644 --- a/eng/pipelines/templates/steps/run_mypy.yml +++ b/eng/pipelines/templates/steps/run_mypy.yml @@ -4,6 +4,12 @@ parameters: TestMarkArgument: '' EnvVars: {} +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - task: UsePythonVersion@0 displayName: 'Use Python 3.7' @@ -21,7 +27,7 @@ steps: inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" --mark_arg="${{ parameters.TestMarkArgument }}" --service="${{ parameters.ServiceDirectory }}" --toxenv="mypy" diff --git a/eng/pipelines/templates/steps/run_pylint.yml b/eng/pipelines/templates/steps/run_pylint.yml index 1386c14c00a4..ea626731845e 100644 --- a/eng/pipelines/templates/steps/run_pylint.yml +++ b/eng/pipelines/templates/steps/run_pylint.yml @@ -1,9 +1,14 @@ parameters: - BuildTargetingString: 'azure-*' ServiceDirectory: '' TestMarkArgument: '' EnvVars: {} +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - task: UsePythonVersion@0 displayName: 'Use Python 3.7' @@ -21,7 +26,7 @@ steps: inputs: scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" --mark_arg="${{ parameters.TestMarkArgument }}" --service="${{ parameters.ServiceDirectory }}" --toxenv="lint" diff --git a/eng/pipelines/templates/steps/set-dev-build.yml b/eng/pipelines/templates/steps/set-dev-build.yml index 3160548fe81b..0936a5cb2e36 100644 --- a/eng/pipelines/templates/steps/set-dev-build.yml +++ b/eng/pipelines/templates/steps/set-dev-build.yml @@ -1,7 +1,12 @@ parameters: - BuildTargetingString: 'azure-*' ServiceDirectory: '' +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - template: /eng/common/pipelines/templates/steps/daily-dev-build-variable.yml parameters: @@ -12,4 +17,4 @@ steps: displayName: "Update package versions for dev build" inputs: scriptPath: 'eng/versioning/version_set_dev.py' - arguments: '"${{ parameters.BuildTargetingString }}" --service="${{parameters.ServiceDirectory}}" --build-id="$(Build.BuildNumber)"' + arguments: '"$(TargetingString)" --service="${{parameters.ServiceDirectory}}" --build-id="$(Build.BuildNumber)"' diff --git a/eng/pipelines/templates/steps/targeting-string-resolve.yml b/eng/pipelines/templates/steps/targeting-string-resolve.yml new file mode 100644 index 000000000000..10e95eba9350 --- /dev/null +++ b/eng/pipelines/templates/steps/targeting-string-resolve.yml @@ -0,0 +1,18 @@ +parameters: + - name: BuildTargetingString + type: string + default: 'azure-*' + +steps: + - pwsh: | + $setting = "${{ parameters.BuildTargetingString }}" + + # if the variable is not set, it'll just come back as the variable name. otherwise it's set. + if ('$(BuildTargetingString)' -ne ('$' + '(BuildTargetingString)')) { + $setting = "$(BuildTargetingString)" + } + + Write-Host "Setting TargetingString to $setting" + Write-Host "##vso[task.setvariable variable=TargetingString]$setting" + displayName: Check override of targeting string + condition: and(succeededOrFailed(), eq(variables['TargetingString'],'')) diff --git a/eng/pipelines/templates/steps/test_regression.yml b/eng/pipelines/templates/steps/test_regression.yml index 9d50fb4f2173..bdfc5cf04ebb 100644 --- a/eng/pipelines/templates/steps/test_regression.yml +++ b/eng/pipelines/templates/steps/test_regression.yml @@ -1,9 +1,14 @@ parameters: - BuildTargetingString: 'azure-*' ServiceDirectory: '' BuildStagingDirectory: $(Build.ArtifactStagingDirectory) DevFeedName: 'public/azure-sdk-for-python' - + +# The variable TargetingString is set by template `eng/pipelines/templates/steps/targeting-string-resolve.yml`. This template is invoked from yml files: +# eng/pipelines/templates/jobs/ci.tests.yml +# eng/pipelines/templates/jobs/ci.yml +# eng/pipelines/templates/jobs/live.test.yml + +# Please use `$(TargetingString)` to refer to the python packages glob string. This was previously `${{ parameters.BuildTargetingString }}`. steps: - task: UsePythonVersion@0 displayName: 'Use Python 3.7' @@ -22,7 +27,6 @@ steps: - template: ../steps/set-dev-build.yml parameters: ServiceDirectory: ${{ parameters.ServiceDirectory }} - BuildTargetingString: ${{ parameters.BuildTargetingString }} - ${{if eq(variables['System.TeamProject'], 'internal') }}: - template: ../steps/auth-dev-feed.yml @@ -34,7 +38,7 @@ steps: inputs: scriptPath: 'scripts/devops_tasks/test_regression.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" --service="${{ parameters.ServiceDirectory }}" --whl-dir="${{ parameters.BuildStagingDirectory }}" --mark-arg="not cosmosEmulator" @@ -44,7 +48,7 @@ steps: inputs: scriptPath: 'scripts/devops_tasks/test_regression.py' arguments: >- - "${{ parameters.BuildTargetingString }}" + "$(TargetingString)" --service="${{ parameters.ServiceDirectory }}" --whl-dir="${{ parameters.BuildStagingDirectory }}" --verify-latest=False diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index a8a5bf684c6a..eb8bdcae81f7 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -162,18 +162,43 @@ function Get-python-GithubIoDocIndex() } function ValidatePackage($packageName, $packageVersion, $workingDirectory) { - $packageExpression = "$packageName$packageVersion" - Write-Host "Validating $packageExpression" - - $installTargetFolder = Join-Path $workingDirectory $packageName - New-Item -ItemType Directory -Force -Path $installTargetFolder | Out-Null - # Add more validation by replicating as much of the docs CI process as # possible # https://github.com/Azure/azure-sdk-for-python/issues/20109 + if (!$ImageId) { + Write-Host "Validating using pip command directly on $packageName." + FallbackValidation -packageName "$packageName" -packageVersion "$packageVersion" -workingDirectory $workingDirectory + } + else { + Write-Host "Validating using $ImageId on $packageName." + DockerValidation -packageName "$packageName" -packageVersion "$packageVersion" + } +} +function DockerValidation($packageName, $packageVersion) { + $packageExpression = "$packageName==$packageVersion" + docker run -e TARGET_PACKAGE=$packageExpression -t $ImageId + # The docker exit codes: https://docs.docker.com/engine/reference/run/#exit-status + # If the docker failed because of docker itself instead of the application, + # we should skip the validation and keep the packages. + if ($LASTEXITCODE -eq 125 -Or $LASTEXITCODE -eq 126 -Or $LASTEXITCODE -eq 127) { + Write-Host $commandLine + LogWarning "The `docker` command does not work with exit code $LASTEXITCODE. Fall back to npm install $packageName directly." + FallbackValidation -packageName "$packageName" -packageVersion "$packageVersion" + } + elseif ($LASTEXITCODE -ne 0) { + Write-Host $commandLine + LogWarning "Package $($Package.name) ref docs validation failed." + return $false + } + return $true +} + +function FallbackValidation($packageName, $packageVersion, $workingDirectory) { + $installTargetFolder = Join-Path $workingDirectory $packageName + New-Item -ItemType Directory -Force -Path $installTargetFolder | Out-Null + $packageExpression = "$packageName$packageVersion" try { $pipInstallOutput = "" - $extraIndexUrl = " --extra-index-url=$PackageSourceOverride" if ($PackageSourceOverride) { Write-Host "pip install $packageExpression --no-cache-dir --target $installTargetFolder --extra-index-url=$PackageSourceOverride" $pipInstallOutput = pip ` @@ -206,7 +231,10 @@ function ValidatePackage($packageName, $packageVersion, $workingDirectory) { return $true } -$PackageExclusions = @{ +$PackageExclusions = @{ + 'azure-mgmt-videoanalyzer' = 'Unsupported doc directives: https://github.com/Azure/azure-sdk-for-python/issues/21563'; + 'azure-mgmt-quota' = 'Unsupported doc directives: https://github.com/Azure/azure-sdk-for-python/issues/21366'; + 'azure-mgmt-webpubsub' = 'Unsupported doc directives https://github.com/Azure/azure-sdk-for-python/issues/21346'; 'azure-mgmt-apimanagement' = 'Unsupported doc directives https://github.com/Azure/azure-sdk-for-python/issues/18084'; 'azure-mgmt-reservations' = 'Unsupported doc directives https://github.com/Azure/azure-sdk-for-python/issues/18077'; 'azure-mgmt-signalr' = 'Unsupported doc directives https://github.com/Azure/azure-sdk-for-python/issues/18085'; @@ -427,14 +455,15 @@ function Find-python-Artifacts-For-Apireview($artifactDir, $artifactName) return $packages } -function SetPackageVersion ($PackageName, $Version, $ServiceDirectory, $ReleaseDate) +function SetPackageVersion ($PackageName, $Version, $ServiceDirectory, $ReleaseDate, $ReplaceLatestEntryTitle=$True) { if($null -eq $ReleaseDate) { $ReleaseDate = Get-Date -Format "yyyy-MM-dd" } pip install -r "$EngDir/versioning/requirements.txt" -q -I - python "$EngDir/versioning/version_set.py" --package-name $PackageName --new-version $Version --service $ServiceDirectory --release-date $ReleaseDate + python "$EngDir/versioning/version_set.py" --package-name $PackageName --new-version $Version ` + --service $ServiceDirectory --release-date $ReleaseDate --replace-latest-entry-title $ReplaceLatestEntryTitle } function GetExistingPackageVersions ($PackageName, $GroupId=$null) diff --git a/eng/test_tools.txt b/eng/test_tools.txt index e96c25a54af8..57e34aad3b69 100644 --- a/eng/test_tools.txt +++ b/eng/test_tools.txt @@ -1,10 +1,7 @@ pip==20.3 -# manually published packages -https://docsupport.blob.core.windows.net/repackaged/cffi-1.14.6-cp310-cp310-win_amd64.whl; sys_platform=='win32' and python_version >= '3.10' -https://docsupport.blob.core.windows.net/repackaged/multidict-5.1.0-cp310-cp310-win_amd64.whl; sys_platform=='win32' and python_version >= '3.10' -https://docsupport.blob.core.windows.net/repackaged/pywin32-301.1-cp310-cp310-win_amd64.whl; sys_platform=='win32' and python_version >= '3.10' -https://docsupport.blob.core.windows.net/repackaged/yarl-1.6.3-cp310-cp310-win_amd64.whl; sys_platform=='win32' and python_version >= '3.10' +# python 3.10 pinned packages +cffi==1.15.0rc2; python_version >= '3.10' # requirements leveraged by ci for testing pytest==4.6.9; python_version == '2.7' @@ -19,6 +16,7 @@ coverage==4.5.4 bandit==1.6.2 protobuf==3.17.3; python_version == '2.7' wrapt<=1.12.1; python_version == '2.7' +chardet>=2.0,<5.0 # locking packages defined as deps from azure-sdk-tools or azure-devtools pytoml==0.1.21 @@ -29,7 +27,7 @@ ConfigArgParse==1.2.3 six==1.14.0 pyyaml==5.3.1 packaging==20.4 -wheel==0.34.2 +wheel==0.37.0 Jinja2==2.11.2 # Locking pylint and required packages diff --git a/eng/tox/allowed_pylint_failures.py b/eng/tox/allowed_pylint_failures.py index 4f2b35c5b718..64c51b8f77e9 100644 --- a/eng/tox/allowed_pylint_failures.py +++ b/eng/tox/allowed_pylint_failures.py @@ -55,6 +55,8 @@ "azure-purview-scanning", "azure-purview-catalog", "azure-purview-account", + "azure-messaging-webpubsubservice", + "azure-purview-administration", "azure-messaging-nspkg", "azure-agrifood-farming", "azure-eventhub", diff --git a/eng/tox/install_depend_packages.py b/eng/tox/install_depend_packages.py index f9f28c5e7094..78d4989178b2 100644 --- a/eng/tox/install_depend_packages.py +++ b/eng/tox/install_depend_packages.py @@ -13,12 +13,11 @@ import logging from packaging.specifiers import SpecifierSet from pkg_resources import Requirement, parse_version +import re from pypi_tools.pypi import PyPIClient -setup_parser_path = os.path.abspath( - os.path.join(os.path.abspath(__file__), "..", "..", "versioning") -) +setup_parser_path = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "versioning")) sys.path.append(setup_parser_path) from setup_parser import get_install_requires @@ -30,19 +29,18 @@ # both min and max overrides are *inclusive* of the version targeted MINIMUM_VERSION_SUPPORTED_OVERRIDE = { - 'azure-common': '1.1.10', - 'msrest': '0.6.10', - 'typing-extensions': '3.6.5', - 'opentelemetry-api': '1.3.0', - 'opentelemetry-sdk': '1.3.0', - 'azure-core': '1.11.0', - 'requests': '2.19.0', - 'six': '1.12.0' + "azure-common": "1.1.10", + "msrest": "0.6.10", + "typing-extensions": "3.6.5", + "opentelemetry-api": "1.3.0", + "opentelemetry-sdk": "1.3.0", + "azure-core": "1.11.0", + "requests": "2.19.0", + "six": "1.12.0", } -MAXIMUM_VERSION_SUPPORTED_OVERRIDE = { - 'cryptography': '3.4.8' -} +MAXIMUM_VERSION_SUPPORTED_OVERRIDE = {"cryptography": "3.4.8"} + def install_dependent_packages(setup_py_file_path, dependency_type, temp_dir): # This method identifies latest/ minimal version of dependent packages and installs them from pyPI @@ -65,7 +63,7 @@ def install_dependent_packages(setup_py_file_path, dependency_type, temp_dir): pkgs_file_path = os.path.join(temp_dir, PKGS_TXT_FILE) with open(pkgs_file_path, "w") as pkgs_file: for package in released_packages: - pkgs_file.write(package + '\n') + pkgs_file.write(package + "\n") logging.info("Created file %s to track azure packages found on PyPI", pkgs_file_path) @@ -73,7 +71,7 @@ def find_released_packages(setup_py_path, dependency_type): # this method returns list of required available package on PyPI in format == # parse setup.py and find install requires - requires = [r for r in get_install_requires(setup_py_path) if '-nspkg' not in r] + requires = [r for r in get_install_requires(setup_py_path) if "-nspkg" not in r] # Get available version on PyPI for each required package avlble_packages = [x for x in map(lambda x: process_requirement(x, dependency_type), requires) if x] @@ -99,11 +97,14 @@ def process_requirement(req, dependency_type): logging.info("Versions available on PyPI for %s: %s", pkg_name, versions) if pkg_name in MINIMUM_VERSION_SUPPORTED_OVERRIDE: - versions = [v for v in versions if parse_version(v) >= parse_version(MINIMUM_VERSION_SUPPORTED_OVERRIDE[pkg_name])] + versions = [ + v for v in versions if parse_version(v) >= parse_version(MINIMUM_VERSION_SUPPORTED_OVERRIDE[pkg_name]) + ] if pkg_name in MAXIMUM_VERSION_SUPPORTED_OVERRIDE: - versions = [v for v in versions if parse_version(v) <= parse_version(MAXIMUM_VERSION_SUPPORTED_OVERRIDE[pkg_name])] - + versions = [ + v for v in versions if parse_version(v) <= parse_version(MAXIMUM_VERSION_SUPPORTED_OVERRIDE[pkg_name]) + ] # Search from lowest to latest in case of finding minimum dependency # Search from latest to lowest in case of finding latest required version @@ -114,13 +115,43 @@ def process_requirement(req, dependency_type): # return first version that matches specifier in == format for version in versions: if version in spec: - logging.info("Found %s version %s that matches specifier %s", dependency_type, version, spec) + logging.info( + "Found %s version %s that matches specifier %s", + dependency_type, + version, + spec, + ) return pkg_name + "==" + version - logging.error("No version is found on PyPI for package %s that matches specifier %s", pkg_name, spec) + logging.error( + "No version is found on PyPI for package %s that matches specifier %s", + pkg_name, + spec, + ) return "" +def check_req_against_exclusion(req, req_to_exclude): + """ + This function evaluates a requirement from a dev_requirements file against a file name. Returns True + if the requirement is for the same package listed in "req_to_exclude". False otherwise. + + :param req: An incoming "req" looks like a requirement that appears in a dev_requirements file. EG: [ "../../../tools/azure-devtools", + "https://docsupport.blob.core.windows.net/repackaged/cffi-1.14.6-cp310-cp310-win_amd64.whl; sys_platform=='win32' and python_version >= '3.10'", + "msrestazure>=0.4.11", "pytest" ] + + :param req_to_exclude: A valid and complete python package name. No specifiers. + """ + req_id = "" + for c in req: + if re.match(r"[A-Za-z0-9_-]", c): + req_id += c + else: + break + + return req_id == req_to_exclude + + def filter_dev_requirements(setup_py_path, released_packages, temp_dir): # This method returns list of requirements from dev_requirements by filtering out packages in given list dev_req_path = os.path.join(os.path.dirname(setup_py_path), DEV_REQ_FILE) @@ -130,17 +161,18 @@ def filter_dev_requirements(setup_py_path, released_packages, temp_dir): # filter out any package available on PyPI (released_packages) # include packages without relative reference and packages not available on PyPI - released_packages = [p.split('==')[0] for p in released_packages] + released_packages = [p.split("==")[0] for p in released_packages] # find prebuilt whl paths in dev requiremente - prebuilt_dev_reqs = [os.path.basename(req.replace('\n', '')) for req in requirements if os.path.sep in req] + prebuilt_dev_reqs = [os.path.basename(req.replace("\n", "")) for req in requirements if os.path.sep in req] # filter any req if wheel is for a released package - req_to_exclude = [req for req in prebuilt_dev_reqs if req.split('-')[0].replace('_', '-') in released_packages] + req_to_exclude = [req for req in prebuilt_dev_reqs if req.split("-")[0].replace("_", "-") in released_packages] req_to_exclude.extend(released_packages) filtered_req = [ req for req in requirements - if os.path.basename(req.replace('\n', '')) not in req_to_exclude and not any([req.startswith(i) for i in req_to_exclude]) + if os.path.basename(req.replace("\n", "")) not in req_to_exclude + and not any([check_req_against_exclusion(req, i) for i in req_to_exclude]) ] logging.info("Filtered dev requirements: %s", filtered_req) @@ -175,9 +207,7 @@ def install_packages(packages, req_file): if __name__ == "__main__": - parser = argparse.ArgumentParser( - description="Install either latest or minimum version of dependent packages." - ) + parser = argparse.ArgumentParser(description="Install either latest or minimum version of dependent packages.") parser.add_argument( "-t", @@ -191,7 +221,7 @@ def install_packages(packages, req_file): "-d", "--dependency-type", dest="dependency_type", - choices=['Latest', 'Minimum'], + choices=["Latest", "Minimum"], help="Dependency type to install. Dependency type is either 'Latest' or 'Minimum'", required=True, ) @@ -207,7 +237,7 @@ def install_packages(packages, req_file): args = parser.parse_args() setup_path = os.path.join(os.path.abspath(args.target_package), "setup.py") - if not(os.path.exists(setup_path) and os.path.exists(args.work_dir)): + if not (os.path.exists(setup_path) and os.path.exists(args.work_dir)): logging.error("Invalid arguments. Please make sure target directory and working directory are valid path") sys.exit(1) diff --git a/eng/tox/mypy_hard_failure_packages.py b/eng/tox/mypy_hard_failure_packages.py index 175058d3f286..151d87364efd 100644 --- a/eng/tox/mypy_hard_failure_packages.py +++ b/eng/tox/mypy_hard_failure_packages.py @@ -21,4 +21,5 @@ "azure-eventgrid", "azure-appconfiguration", "azure-data-tables", + "azure-mixedreality-remoterendering", ] diff --git a/eng/versioning/version_set.py b/eng/versioning/version_set.py index 0bdfedd58e8b..b5289531e839 100644 --- a/eng/versioning/version_set.py +++ b/eng/versioning/version_set.py @@ -11,6 +11,7 @@ parser.add_argument('--new-version', required=True, help='new package version') parser.add_argument('--service', required=True, help='name of the service for which to set the dev build id (e.g. keyvault)') parser.add_argument('--release-date', help='date in the format "yyyy-MM-dd"') + parser.add_argument('--replace-latest-entry-title', help='indicate if to replace the latest changelog entry') parser.add_argument( dest="glob_string", nargs="?", @@ -38,4 +39,4 @@ set_version_py(target_package[0], new_version) set_dev_classifier(target_package[0], new_version) - update_change_log(target_package[0], new_version, args.service, args.package_name, False, True, args.release_date) \ No newline at end of file + update_change_log(target_package[0], new_version, args.service, args.package_name, False, args.replace_latest_entry_title, args.release_date) \ No newline at end of file diff --git a/scripts/auto_release/PythonSdkLiveTest.yml b/scripts/auto_release/PythonSdkLiveTest.yml index 433ecaa81a4d..5f1534ced6b0 100644 --- a/scripts/auto_release/PythonSdkLiveTest.yml +++ b/scripts/auto_release/PythonSdkLiveTest.yml @@ -55,6 +55,9 @@ jobs: export AZURE_CLIENT_ID=$(ENV_CLIENT_ID) export AZURE_CLIENT_SECRET=$(ENV_CLIENT_SECRET) export AZURE_SUBSCRIPTION_ID=$(ENV_SUBSCRIPTION_ID) + export ISSUE_LINK=$(ISSUE_LINK) + export UPDATE_TOKEN=$(UPDATE_TOKEN) + export USR_TOKEN=$(USR_TOKEN) # run cd azure-sdk-for-python @@ -74,12 +77,9 @@ jobs: # create PR export NEW_BRANCH=`sed -n '1p' $output_path/output.txt` export TARGET_BRANCH=`sed -n '2p' $output_path/output.txt` - export ISSUE_LINK=$(ISSUE_LINK) export PIPELINE_LINK=$(PIPELINE_LINK) export USR_NAME=$(USR_NAME) - export USR_TOKEN=$(USR_TOKEN) export TEST_RESULT=$test_result - export UPDATE_TOKEN=$(UPDATE_TOKEN) python $script_path/create_auto_release_pr.py echo "\'[AutoRelease] $new_branch \' has been created!!!" diff --git a/scripts/auto_release/create_auto_release_pr.py b/scripts/auto_release/create_auto_release_pr.py index 9dafa7213691..553859127018 100644 --- a/scripts/auto_release/create_auto_release_pr.py +++ b/scripts/auto_release/create_auto_release_pr.py @@ -15,6 +15,6 @@ def main(): # Add issue link on PR api = GhApi(owner='Azure', repo='azure-sdk-for-python', token=os.getenv('UPDATE_TOKEN')) api.issues.create_comment(issue_number=pr_number, body='issue link:{}'.format(os.getenv('ISSUE_LINK'))) - + if __name__ == '__main__': main() diff --git a/scripts/auto_release/main.py b/scripts/auto_release/main.py index d8a923ceea16..ee05ff4177a2 100644 --- a/scripts/auto_release/main.py +++ b/scripts/auto_release/main.py @@ -4,6 +4,7 @@ import time import argparse import logging +from ghapi.all import GhApi SERVICE_NAME = 'servicename' @@ -157,6 +158,12 @@ def edit_version(add_content): if TRACK == '1' and VERSION_LAST_RELEASE[0] == '0': num = VERSION_LAST_RELEASE.split('.') VERSION_NEW = f'{num[0]}.{int(num[1]) + 1}.0' + # '0.0.0' means there must be abnormal situation + if VERSION_NEW == '0.0.0': + api_request = GhApi(owner='Azure', repo='sdk-release-request', token=os.getenv('UPDATE_TOKEN')) + link = os.getenv('ISSUE_LINK') + issue_number = link.split('/')[-1] + api_request.issues.add_labels(issue_number=int(issue_number), labels=['base-branch-attention']) def edit_changelog(add_content): @@ -459,4 +466,5 @@ def main(): my_print(e) else: with open(f'{OUT_PATH}/output.txt', 'w') as file_out: - file_out.writelines([f'{NEW_BRANCH}\n', "main" if TRACK == '2' else 'release/v3']) + file_out.writelines([f'{NEW_BRANCH}\n', "main\n" if TRACK == '2' else 'release/v3\n']) + diff --git a/scripts/devops_tasks/common_tasks.py b/scripts/devops_tasks/common_tasks.py index 8cd715d9e5d2..58e502fcfab6 100644 --- a/scripts/devops_tasks/common_tasks.py +++ b/scripts/devops_tasks/common_tasks.py @@ -20,6 +20,7 @@ import io import re import fnmatch +import platform # Assumes the presence of setuptools from pkg_resources import parse_version, parse_requirements, Requirement, WorkingSet, working_set @@ -29,7 +30,6 @@ from packaging.version import Version from packaging.version import parse - DEV_REQ_FILE = "dev_requirements.txt" NEW_DEV_REQ_FILE = "new_dev_requirements.txt" NEW_REQ_PACKAGES = ["azure-core", "azure-mgmt-core"] @@ -64,6 +64,10 @@ "azure-mgmt-core", ] +TEST_COMPATIBILITY_MAP = { + "azure-core-tracing-opentelemetry": "<3.10" +} + omit_regression = ( lambda x: "nspkg" not in x and "mgmt" not in x @@ -212,6 +216,24 @@ def filter_for_compatibility(package_set): return collected_packages +def compare_python_version(version_spec): + current_sys_version = parse(platform.python_version()) + spec_set = SpecifierSet(version_spec) + + return current_sys_version in spec_set + + +def filter_packages_by_compatibility_override(package_set, resolve_basename=True): + return [ + p + for p in package_set + if compare_python_version( + TEST_COMPATIBILITY_MAP.get( + os.path.basename(p) if resolve_basename else p, ">=2.7" + ) + ) + ] + # this function is where a glob string gets translated to a list of packages # It is called by both BUILD (package) and TEST. In the future, this function will be the central location # for handling targeting of release packages diff --git a/scripts/devops_tasks/git_helper.py b/scripts/devops_tasks/git_helper.py index d4b1a4d0cd25..b480b3a0a067 100644 --- a/scripts/devops_tasks/git_helper.py +++ b/scripts/devops_tasks/git_helper.py @@ -23,14 +23,15 @@ 'azure-cosmos': '3.2.0', 'azure-servicebus': '0.50.3', 'azure-eventgrid': '1.3.0', - 'azure-schemaregistry-avroserializer': '1.0.0b2', + 'azure-schemaregistry-avroserializer': '1.0.0b3', 'azure-storage-blob-changefeed' : '12.0.0b2', 'azure-storage-file-datalake': '12.2.0b1', 'azure-communication-identity': '1.0.0', 'azure-communication-phonenumbers': '1.0.0', 'azure-communication-sms': '1.0.0', 'azure-search-documents': '11.2.0b3', - 'azure-ai-language-questionanswering': '1.0.0b1' + 'azure-ai-language-questionanswering': '1.0.0b1', + 'azure-monitor-opentelemetry-exporter': '1.0.0b5' } # This method identifies release tag for latest or oldest released version of a given package diff --git a/scripts/devops_tasks/install_python_version.py b/scripts/devops_tasks/install_python_version.py index 4c81443197b4..8ece34409021 100644 --- a/scripts/devops_tasks/install_python_version.py +++ b/scripts/devops_tasks/install_python_version.py @@ -19,7 +19,7 @@ MANIFEST_LOCATION = "https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json" MAX_INSTALLER_RETRY = 3 -CURRENT_UBUNTU_VERSION = "18.04" # full title is ubuntu-18.04 +CURRENT_UBUNTU_VERSION = "20.04" # full title is ubuntu-20.04 MAX_PRECACHED_VERSION = "3.9.0" UNIX_INSTALL_ARRAY = ["sh", "setup.sh"] diff --git a/scripts/devops_tasks/setup_execute_tests.py b/scripts/devops_tasks/setup_execute_tests.py index 4872c84f971d..61ae95988059 100644 --- a/scripts/devops_tasks/setup_execute_tests.py +++ b/scripts/devops_tasks/setup_execute_tests.py @@ -25,6 +25,7 @@ clean_coverage, is_error_code_5_allowed, create_code_coverage_params, + filter_packages_by_compatibility_override ) from tox_harness import prep_and_run_tox @@ -295,15 +296,20 @@ def execute_global_install_and_test( target_dir = root_dir targeted_packages = process_glob_string(args.glob_string, target_dir, "", args.filter_type) + compatible_targeted_packages = filter_packages_by_compatibility_override(targeted_packages) + + if targeted_packages != compatible_targeted_packages: + logging.info("At least one package incompatible with current platform was detected. Skipping: {}".format(set(targeted_packages) - set(compatible_targeted_packages))) + extended_pytest_args = [] - if len(targeted_packages) == 0: + if len(compatible_targeted_packages) == 0: exit(0) if args.xdist: extended_pytest_args.extend(["-n", "8", "--dist=loadscope"]) if args.runtype != "none": - execute_global_install_and_test(args, targeted_packages, extended_pytest_args) + execute_global_install_and_test(args, compatible_targeted_packages, extended_pytest_args) else: - prep_and_run_tox(targeted_packages, args, extended_pytest_args) + prep_and_run_tox(compatible_targeted_packages, args, extended_pytest_args) diff --git a/scripts/devops_tasks/test_run_samples.py b/scripts/devops_tasks/test_run_samples.py index cc9a908fa543..3fe337ed1797 100644 --- a/scripts/devops_tasks/test_run_samples.py +++ b/scripts/devops_tasks/test_run_samples.py @@ -11,19 +11,19 @@ import os import logging from fnmatch import fnmatch + try: from subprocess import TimeoutExpired, check_call, CalledProcessError except ImportError: from subprocess32 import TimeoutExpired, check_call, CalledProcessError -from common_tasks import ( - run_check_call, - process_glob_string, -) +from common_tasks import run_check_call, compare_python_version logging.getLogger().setLevel(logging.INFO) root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) +MINIMUM_TESTED_PYTHON_VERSION = ">=3.7.0" + """ Some samples may "run forever" or need to be timed out after a period of time. Add them here in the following format: TIMEOUT_SAMPLES = { @@ -54,15 +54,15 @@ "recv_with_custom_starting_position_async.py": (10), "sample_code_eventhub_async.py": (10), "send_and_receive_amqp_annotated_message.py": (10), - "send_and_receive_amqp_annotated_message_async.py": (10) + "send_and_receive_amqp_annotated_message_async.py": (10), }, "azure-eventhub-checkpointstoreblob": { "receive_events_using_checkpoint_store.py": (10), - "receive_events_using_checkpoint_store_storage_api_version.py": (10) + "receive_events_using_checkpoint_store_storage_api_version.py": (10), }, "azure-eventhub-checkpointstoreblob-aio": { "receive_events_using_checkpoint_store_async.py": (10), - "receive_events_using_checkpoint_store_storage_api_version_async.py": (10) + "receive_events_using_checkpoint_store_storage_api_version_async.py": (10), }, "azure-servicebus": { "failure_and_recovery.py": (10), @@ -71,8 +71,8 @@ "session_pool_receive.py": (20), "receive_iterator_queue_async.py": (10), "sample_code_servicebus_async.py": (30), - "session_pool_receive_async.py": (20) - } + "session_pool_receive_async.py": (20), + }, } @@ -81,17 +81,16 @@ "azure-eventgrid": [ "__init__.py", "consume_cloud_events_from_eventhub.py", - "consume_eventgrid_events_from_service_bus_queue.py"], + "consume_eventgrid_events_from_service_bus_queue.py", + ], "azure-eventhub": [ "connection_to_custom_endpoint_address.py", "proxy.py", "connection_to_custom_endpoint_address_async.py", "iot_hub_connection_string_receive_async.py", - "proxy_async.py" - ], - "azure-eventhub-checkpointstoretable":[ - "receive_events_using_checkpoint_store.py" + "proxy_async.py", ], + "azure-eventhub-checkpointstoretable": ["receive_events_using_checkpoint_store.py"], "azure-servicebus": [ "mgmt_queue.py", "mgmt_rule.py", @@ -104,19 +103,19 @@ "mgmt_subscription_async.py", "mgmt_topic_async.py", "proxy_async.py", - "receive_deferred_message_queue_async.py" + "receive_deferred_message_queue_async.py", ], "azure-communication-chat": [ "chat_client_sample_async.py", "chat_client_sample.py", "chat_thread_client_sample_async.py", - "chat_thread_client_sample.py" + "chat_thread_client_sample.py", ], "azure-communication-phonenumbers": [ "purchase_phone_number_sample_async.py", "purchase_phone_number_sample.py", "release_phone_number_sample_async.py", - "release_phone_number_sample.py" + "release_phone_number_sample.py", ], "azure-ai-translation-document": [ "sample_list_document_statuses_with_filters_async.py", @@ -130,19 +129,16 @@ "sample_manage_custom_models.py", "sample_manage_custom_models_async.py", ], - "azure-ai-language-questionanswering": [ - "sample_chat.py" - ] + "azure-ai-language-questionanswering": ["sample_chat.py"], } - def run_check_call_with_timeout( command_array, working_directory, timeout, pass_if_timeout, acceptable_return_codes=[], - always_exit=False + always_exit=False, ): """This is copied from common_tasks.py with some additions. Don't want to break anyone that's using the original code. @@ -163,13 +159,9 @@ def run_check_call_with_timeout( return err except TimeoutExpired as err: if pass_if_timeout: - logging.info( - "Sample timed out successfully" - ) + logging.info("Sample timed out successfully") else: - logging.info( - "Fail: Sample timed out" - ) + logging.info("Fail: Sample timed out") return err @@ -180,9 +172,7 @@ def execute_sample(sample, samples_errors, timed): if sys.version_info < (3, 5) and sample.endswith("_async.py"): return - logging.info( - "Testing {}".format(sample) - ) + logging.info("Testing {}".format(sample)) command_array = [sys.executable, sample] if not timed: @@ -195,13 +185,24 @@ def execute_sample(sample, samples_errors, timed): sample_name = os.path.basename(sample) if errors: samples_errors.append(sample_name) - logging.info( - "ERROR: {}".format(sample_name) - ) + logging.info("ERROR: {}".format(sample_name)) else: - logging.info( - "SUCCESS: {}.".format(sample_name) - ) + logging.info("SUCCESS: {}.".format(sample_name)) + + +def resolve_sample_ignore(sample_file, package_name): + ignored_files = [ + (f, ">=2.7") if not isinstance(f, tuple) else f + for f in IGNORED_SAMPLES.get(package_name, []) + ] + ignored_files_dict = {key: value for (key, value) in ignored_files} + + if sample_file in ignored_files_dict and compare_python_version( + ignored_files_dict[sample_file] + ): + return False + else: + return True def run_samples(targeted_package): @@ -219,7 +220,7 @@ def run_samples(targeted_package): try: with open(samples_dir_path + "/sample_dev_requirements.txt") as sample_dev_reqs: for dep in sample_dev_reqs.readlines(): - check_call([sys.executable, '-m', 'pip', 'install', dep]) + check_call([sys.executable, "-m", "pip", "install", dep]) except IOError: pass @@ -232,14 +233,18 @@ def run_samples(targeted_package): timeout, pass_if_timeout = timeout else: pass_if_timeout = True - timed_sample_paths.append((os.path.abspath(os.path.join(path, name)), timeout, pass_if_timeout)) - elif fnmatch(name, "*.py") and name not in IGNORED_SAMPLES.get(package_name, []): + timed_sample_paths.append( + ( + os.path.abspath(os.path.join(path, name)), + timeout, + pass_if_timeout, + ) + ) + elif fnmatch(name, "*.py") and resolve_sample_ignore(name, package_name): sample_paths.append(os.path.abspath(os.path.join(path, name))) if not sample_paths and not timed_sample_paths: - logging.info( - "No samples found in {}".format(targeted_package) - ) + logging.info("No samples found in {}".format(targeted_package)) exit(0) for sample in sample_paths: @@ -252,9 +257,7 @@ def run_samples(targeted_package): logging.error("Sample(s) that ran with errors: {}".format(samples_errors)) exit(1) - logging.info( - "All samples ran successfully in {}".format(targeted_package) - ) + logging.info("All samples ran successfully in {}".format(targeted_package)) if __name__ == "__main__": @@ -275,6 +278,8 @@ def run_samples(targeted_package): service_dir = os.path.join("sdk", args.target_package) target_dir = os.path.join(root_dir, service_dir) - logging.info("User opted to run samples") - - run_samples(target_dir) + if compare_python_version(MINIMUM_TESTED_PYTHON_VERSION): + logging.info( + "User opted to run samples, and python version is greater than minimum supported." + ) + run_samples(target_dir) diff --git a/scripts/devops_tasks/trust_proxy_cert.py b/scripts/devops_tasks/trust_proxy_cert.py new file mode 100644 index 000000000000..1fccdec3bdd2 --- /dev/null +++ b/scripts/devops_tasks/trust_proxy_cert.py @@ -0,0 +1,37 @@ +import requests +import os + +EXISTING_ROOT_PEM = requests.certs.where() + +root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) +LOCAL_DEV_CERT = os.path.abspath(os.path.join(root_dir, 'eng', 'common', 'testproxy', 'dotnet-devcert.crt')) +COMBINED_FILENAME = os.path.basename(LOCAL_DEV_CERT).split(".")[0] + ".pem" +COMBINED_FOLDER = os.path.join(root_dir, '.certificate') +COMBINED_LOCATION = os.path.join(COMBINED_FOLDER, COMBINED_FILENAME) + +def copy_cert_content(): + with open(LOCAL_DEV_CERT, 'r') as f: + data = f.read() + + if not os.path.exists(COMBINED_FOLDER): + os.mkdir(COMBINED_FOLDER) + + with open(COMBINED_LOCATION, 'w') as f: + f.write(data) + +def combine_cert_file(): + with open(EXISTING_ROOT_PEM, 'r') as f: + content = f.readlines(); + + with open(COMBINED_LOCATION, 'a') as f: + f.writelines(content) + +if __name__ == "__main__": + copy_cert_content() + combine_cert_file() + + print("Set the following certificate paths:") + print("\tSSL_CERT_DIR={}".format(os.path.dirname(COMBINED_LOCATION))) + print("\tREQUESTS_CA_BUNDLE={}".format(COMBINED_LOCATION)) + + print("\nBe aware that REQUESTS_CA_BUNDLE should only be modified ") \ No newline at end of file diff --git a/scripts/release_issue_status/main.py b/scripts/release_issue_status/main.py index 6bc1289cfc0a..ec98923120cf 100644 --- a/scripts/release_issue_status/main.py +++ b/scripts/release_issue_status/main.py @@ -11,16 +11,18 @@ import reply_generator as rg from utils import update_issue_body, get_readme_and_output_folder, \ - get_python_pipelines, get_pipeline_url, auto_close_issue - + get_python_pipelines, get_pipeline_url, auto_close_issue _NULL = ' ' _FILE_OUT = 'release_issue_status.csv' _FILE_OUT_PYTHON = 'release_python_status.md' -_PYTHON_SDK_ADMINISTRATORS = {'msyyc', 'RAY-316', 'BigCat20196'} +_PYTHON_SDK_ADMINISTRATORS = ['msyyc', 'RAY-316', 'BigCat20196'] +_PYTHON_SDK_ASSIGNEES = ['RAY-316', 'BigCat20196'] +_ASSIGNER_DICT = {'RAY-316': os.getenv('ZED_TOKEN'), 'BigCat20196': os.getenv('JF_TOKEN')} logging.basicConfig(level=logging.INFO, format='[auto-reply log] - %(funcName)s[line:%(lineno)d] - %(levelname)s: %(message)s') + def my_print(cmd): print('==' + cmd + ' ==\n') @@ -32,8 +34,9 @@ def print_check(cmd): def output_python_md(issue_status_python): with open(_FILE_OUT_PYTHON, 'w') as file_out: - file_out.write('| issue | author | package | assignee | bot advice | created date of issue | delay from created date |\n') - file_out.write('| ------ | ------ | ------ | ------ | ------ | ------ | :-----: |\n') + file_out.write( + '| issue | author | package | assignee | bot advice | created date of issue | target release date | date from target |\n') + file_out.write('| ------ | ------ | ------ | ------ | ------ | ------ | ------ | :-----: |\n') file_out.writelines([item.output_python() for item in sorted(issue_status_python, key=_key_select)]) @@ -42,7 +45,7 @@ def output_csv(issue_status): file_out.write('language,issue,author,package,created date,delay from created date,latest update time,' 'delay from latest update,status,bot advice\n') file_out.writelines([item.output() for item in sorted(issue_status, key=_key_select)]) - + class IssueStatus: link = _NULL @@ -61,6 +64,8 @@ class IssueStatus: issue_object = _NULL labels = _NULL assignee = _NULL + target_date = _NULL + days_from_target = _NULL def output(self): return '{},{},{},{},{},{},{},{},{},{}\n'.format(self.language, self.link, self.author, @@ -71,12 +76,22 @@ def output(self): self.delay_from_latest_update, self.status, self.bot_advice) - def output_python(self): - return '| [#{}]({}) | {} | {} | {} | {} | {} | {} |\n'.format(self.link.split('/')[-1], self.link, self.author, - self.package, self.assignee, self.bot_advice, - str(date.fromtimestamp(self.create_date)), - self.delay_from_create_date) + package = self.package.split('-')[-1] + create_date = str(date.fromtimestamp(self.create_date).strftime('%m-%d')) + target_date = str(datetime.strptime(self.target_date, "%Y-%m-%d").strftime('%m-%d')) + if abs(self.days_from_target) < 3: + days_from_target = str(self.days_from_target) + else: + days_from_target = ' ' + + return '| [#{}]({}) | {} | {} | {} | {} | {} | {} | {} |\n'.format(self.link.split('/')[-1], self.link, + self.author, + package, self.assignee, self.bot_advice, + create_date, + target_date, + days_from_target + ) def _extract(str_list, key_word): @@ -128,13 +143,14 @@ def _latest_comment_time(comments, delay_from_create_date): return delay_from_create_date if not q else int((time.time() - q[-1][0]) / 3600 / 24) -def auto_reply(item, request_repo, rest_repo, sdk_repo, duplicated_issue, python_piplines): +def auto_reply(item, request_repo, rest_repo, sdk_repo, duplicated_issue, python_piplines, assigner_repoes): logging.info("new issue number: {}".format(item.issue_object.number)) if 'auto-link' not in item.labels: item.issue_object.add_to_labels('auto-link') try: - package_name, readme_link, output_folder = update_issue_body(request_repo, rest_repo, item.issue_object.number) + package_name, readme_link, output_folder = update_issue_body(request_repo, rest_repo, + item.issue_object.number) logging.info("pkname, readme", package_name, readme_link) item.package = package_name key = ('Python', item.package) @@ -149,19 +165,20 @@ def auto_reply(item, request_repo, rest_repo, sdk_repo, duplicated_issue, python readme_link, output_folder = get_readme_and_output_folder(request_repo, rest_repo, item.issue_object.number) except Exception as e: logging.info('Issue: {} get pkname and output folder failed'.format(item.issue_object.number)) - item.bot_advice = 'failed to find Readme link and output folder. Please check !!' + item.bot_advice = 'failed to find Readme link and output folder!
' item.issue_object.add_to_labels('attention') logging.info(e) raise try: logging.info(python_piplines) pipeline_url = get_pipeline_url(python_piplines, output_folder) + assigner_repo = assigner_repoes[item.assignee] rg.begin_reply_generate(item=item, rest_repo=rest_repo, readme_link=readme_link, - sdk_repo=sdk_repo, pipeline_url=pipeline_url) + sdk_repo=sdk_repo, pipeline_url=pipeline_url, assigner_repo=assigner_repo) if 'Configured' in item.labels: item.issue_object.remove_from_labels('Configured') except Exception as e: - item.bot_advice = 'auto reply failed, Please intervene manually !!' + item.bot_advice = 'auto reply failed!
' logging.info('Error from auto reply') logging.info('Issue:{}'.format(item.issue_object.number)) logging.info(traceback.format_exc()) @@ -170,8 +187,11 @@ def auto_reply(item, request_repo, rest_repo, sdk_repo, duplicated_issue, python def main(): # get latest issue status g = Github(os.getenv('TOKEN')) # please fill user_token + assigner_repoes = {} + for k, v in _ASSIGNER_DICT.items(): + assigner_repoes[k] = Github(v).get_repo('Azure/sdk-release-request') request_repo = g.get_repo('Azure/sdk-release-request') - rest_repo = g.get_repo('Azure/azure-rest-api-specs') + rest_repo = g.get_repo('Azure/azure-rest-api-specs') sdk_repo = g.get_repo('Azure/azure-sdk-for-python') label1 = request_repo.get_label('ManagementPlane') open_issues = request_repo.get_issues(state='open', labels=[label1]) @@ -189,6 +209,9 @@ def main(): issue.link = f'https://github.com/Azure/sdk-release-request/issues/{item.number}' issue.author = item.user.login issue.package = _extract(item.body.split('\n'), 'azure-.*') + issue.target_date = [x.split(':')[-1].strip() for x in item.body.split('\n') if 'Target release date' in x][0] + issue.days_from_target = int( + (time.mktime(time.strptime(issue.target_date, '%Y-%m-%d')) - time.time()) / 3600 / 24) issue.create_date = item.created_at.timestamp() issue.delay_from_create_date = int((time.time() - item.created_at.timestamp()) / 3600 / 24) issue.latest_update = item.updated_at.timestamp() @@ -200,10 +223,9 @@ def main(): issue.whether_author_comment = _whether_author_comment(item.get_comments()) issue.issue_object = item issue.labels = [label.name for label in item.labels] - issue.days_from_latest_commit = _latest_comment_time(item.get_comments(), issue.delay_from_create_date) + issue.days_from_latest_comment = _latest_comment_time(item.get_comments(), issue.delay_from_create_date) if item.assignee: issue.assignee = item.assignee.login - issue_status.append(issue) key = (issue.language, issue.package) duplicated_issue[key] = duplicated_issue.get(key, 0) + 1 @@ -219,26 +241,26 @@ def main(): # rule7: if delay from created date is over 15 days and owner never reply, remind owner to handle it. for item in issue_status: if item.language == 'Python': - issue_status_python.append(item) + assigner_repo = assigner_repoes[item.assignee] + item.issue_object = assigner_repo.get_issue(number=item.issue_object.number) + issue_status_python.append(item) if item.status == 'release': item.bot_advice = 'better to release asap.' elif (item.comment_num == 0 or 'Configured' in item.labels) and 'Python' in item.labels: - item.bot_advice = 'new issue and better to confirm quickly.' + item.bot_advice = 'new issue !
' if 'assigned' not in item.labels: time.sleep(0.1) - assign_count = int(str(time.time())[-1]) % 2 - if assign_count == 1: - item.issue_object.remove_from_assignees(*['RAY-316']) - item.issue_object.add_to_assignees(*['BigCat20196']) + assign_count = int(str(time.time())[-1]) % len(_PYTHON_SDK_ASSIGNEES) + item.issue_object.remove_from_assignees(item.assignee) + item.issue_object.add_to_assignees(_PYTHON_SDK_ASSIGNEES[assign_count]) + item.assignee = item.issue_object.assignee.login item.issue_object.add_to_labels('assigned') try: - auto_reply(item, request_repo, rest_repo, sdk_repo, duplicated_issue, python_piplines) + auto_reply(item, request_repo, rest_repo, sdk_repo, duplicated_issue, python_piplines, assigner_repoes) except Exception as e: continue elif not item.author_latest_comment in _PYTHON_SDK_ADMINISTRATORS: - item.bot_advice = 'new comment for author.' - elif item.delay_from_latest_update >= 7: - item.bot_advice = 'delay for a long time and better to handle now.' + item.bot_advice = 'new comment.
' if item.comment_num > 1 and item.language == 'Python': try: auto_close_issue(request_repo, item) @@ -246,18 +268,25 @@ def main(): item.bot_advice = 'auto-close failed, please check!' logging.info(f"=====issue: {item.issue_object.number}, {e}") - if item.days_from_latest_commit >= 30 and item.language == 'Python' and '30days attention' not in item.labels: - item.issue_object.add_to_labels('30days attention') - item.issue_object.create_comment(f'hi @{item.author}, the issue is closed since there is no reply for a long time. Please reopen it if necessary or create new one.') + if 'base-branch-attention' in item.labels: + item.bot_advice = 'new version is 0.0.0, please check base branch! ' + item.bot_advice + + if abs(item.days_from_target) < 3: + item.bot_advice += ' release date < 2 !
' + + if item.days_from_latest_comment >= 15 and item.language == 'Python' and '7days attention' in item.labels and item.days_from_target < 0: + item.issue_object.create_comment( + f'hi @{item.author}, the issue is closed since there is no reply for a long time. Please reopen it if necessary or create new one.') item.issue_object.edit(state='close') - elif item.days_from_latest_commit >= 15 and item.language == 'Python' and '15days attention' not in item.labels: - item.issue_object.create_comment(f'hi @{item.author}, this release-request has been delayed more than 15 days,' - ' please deal with it ASAP. We will close the issue if there is still no response after 15 days!') - item.issue_object.add_to_labels('15days attention') + elif item.days_from_latest_comment >= 7 and item.language == 'Python' and '7days attention' not in item.labels and item.days_from_target < 7: + item.issue_object.create_comment( + f'hi @{item.author}, this release-request has been delayed more than 7 days,' + ' please deal with it ASAP. We will close the issue if there is still no response after 7 days!') + item.issue_object.add_to_labels('7days attention') # judge whether there is duplicated issue for same package if item.package != _NULL and duplicated_issue.get((item.language, item.package)) > 1: - item.bot_advice = f'Warning:There is duplicated issue for {item.package}. ' + item.bot_advice + item.bot_advice = f'duplicated issue
' + item.bot_advice # output result output_python_md(issue_status_python) @@ -268,12 +297,11 @@ def main(): print_check('git commit -m \"update excel\"') print_check('git push -f origin HEAD') - # upload to storage account(it is created in advance) +# upload to storage account(it is created in advance) # blob = BlobClient.from_connection_string(conn_str=os.getenv('CONN_STR'), container_name=os.getenv('FILE'), # blob_name=_FILE_OUT) # with open(_FILE_OUT, 'rb') as data: # blob.upload_blob(data, overwrite=True) - if __name__ == '__main__': main() diff --git a/scripts/release_issue_status/release_issue_status.yml b/scripts/release_issue_status/release_issue_status.yml index e9028867e5bb..7b88e2f8e961 100644 --- a/scripts/release_issue_status/release_issue_status.yml +++ b/scripts/release_issue_status/release_issue_status.yml @@ -39,6 +39,8 @@ jobs: export HEADERS=$(PIPELINE_HEADERS) export URL=$(PIPELINE_URL) export PIPELINE_TOKEN=$(PIPELINE-TOKEN) + export JF_TOKEN=$(Jiefeng-GitToken) + export ZED_TOKEN=$(Zed-GitToken) export COOKIE=$(USR_TOKEN) # create virtual env diff --git a/scripts/release_issue_status/reply_generator.py b/scripts/release_issue_status/reply_generator.py index ad586e04fac7..d6cfdafbce6e 100644 --- a/scripts/release_issue_status/reply_generator.py +++ b/scripts/release_issue_status/reply_generator.py @@ -52,8 +52,10 @@ def get_latest_pr_from_readme(rest_repo, link_dict): return latest_pr_number_int[-1] -def reply_owner(reply_content): - issue_object_rg.create_comment(reply_content) +def reply_owner(assigner_issue, reply_content): + assigner_issue.create_comment(reply_content) + user_tips = 'Tips: If you have special needs for release date or other things, please let us know. Otherwise we will release it ASAP after your check.' + assigner_issue.create_comment(user_tips) @@ -74,7 +76,7 @@ def get_reply_and_sdk_number_from_readme(rest_repo, link_dict): return info_model, sdk_link_number -def begin_reply_generate(item, rest_repo, readme_link, sdk_repo, pipeline_url): +def begin_reply_generate(item, rest_repo, readme_link, sdk_repo, pipeline_url, assigner_repo): global issue_object_rg issue_object_rg = item.issue_object link_dict = get_links(readme_link) @@ -91,7 +93,8 @@ def begin_reply_generate(item, rest_repo, readme_link, sdk_repo, pipeline_url): logging.info(f'{issue_object_rg.number} run pipeline successfully') else: logging.info(f'{issue_object_rg.number} run pipeline fail') - reply_owner(reply_content) + assigner_issue = assigner_repo.get_issue(number=issue_object_rg.number) + reply_owner(assigner_issue, reply_content) issue_object_rg.add_to_labels('auto-ask-check') else: logging.info('issue {} need config readme'.format(issue_object_rg.number)) diff --git a/scripts/release_issue_status/utils.py b/scripts/release_issue_status/utils.py index e2e6bf4b3065..272b20105294 100644 --- a/scripts/release_issue_status/utils.py +++ b/scripts/release_issue_status/utils.py @@ -202,8 +202,11 @@ def auto_close_issue(sdk_repo, item): assignee = issue_info.assignee.login link = issue_info.html_url closed_issue_info = f'{package_name},{assignee},{created_at},{closed_at},{link}\n' - with open(_FILE_OUT, 'a+') as file_out: - file_out.write(closed_issue_info) + with open(_FILE_OUT, 'r') as file_read: + lines = file_read.readlines() + with open(_FILE_OUT, 'w') as file_write: + lines.insert(1, closed_issue_info) + file_write.writelines(lines) def _get_last_released_date(package_name): pypi_link = f'https://pypi.org/project/{package_name}/#history' diff --git a/sdk/agrifood/tests.yml b/sdk/agrifood/tests.yml index 004442e819e6..05fb543d14ad 100644 --- a/sdk/agrifood/tests.yml +++ b/sdk/agrifood/tests.yml @@ -5,9 +5,7 @@ stages: parameters: Location: westcentralus ServiceDirectory: agrifood - DeployArmTemplate: true Clouds: Public_FarmBeats - AllocateResourceGroup: false CloudConfig: Public_Farmbeats: SubscriptionConfiguration: $(sub-config-farmbeats-azure-cloud-test-resources) @@ -17,4 +15,4 @@ stages: AZURE_TENANT_ID: $(AGRIFOOD_TENANT_ID) TEST_MODE: 'RunLiveNoRecord' AZURE_SKIP_LIVE_RECORDING: 'True' - AZURE_TEST_RUN_LIVE: 'true' \ No newline at end of file + AZURE_TEST_RUN_LIVE: 'true' diff --git a/sdk/appconfiguration/azure-appconfiguration/CHANGELOG.md b/sdk/appconfiguration/azure-appconfiguration/CHANGELOG.md index fabf293e888a..e928678c5837 100644 --- a/sdk/appconfiguration/azure-appconfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/azure-appconfiguration/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.2.1 (Unreleased) +## 1.3.1 (Unreleased) ### Features Added @@ -10,6 +10,18 @@ ### Other Changes +## 1.3.0 (2021-11-10) + +### Bugs Fixed +- Fix the issue that data was persisted according to an incorrect schema/in an incorrect format ([#20518](https://github.com/Azure/azure-sdk-for-python/issues/20518)) + + `SecretReferenceConfigurationSetting` in 1.2.0 used "secret_uri" rather than "uri" as the schema keywords which + broken inter-operation of `SecretReferenceConfigurationSetting` between SDK and the portal. + + Please: + - Use 1.3.0+ for any `SecretReferenceConfigurationSetting` uses. + - Call a get method for existing `SecretReferenceConfigurationSetting`s and set them back to correct the format. + ## 1.2.0 (2021-07-06) ### Features Added * Adds `FeatureFlagConfigurationSetting` and `SecretReferenceConfigurationSetting` models diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_models.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_models.py index 2ff870e99b16..1a9e1876882f 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_models.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_models.py @@ -308,13 +308,13 @@ def __init__(self, key, secret_id, **kwargs): # pylint: disable=super-init-not- self.read_only = kwargs.get("read_only", None) self.tags = kwargs.get("tags", {}) self.secret_id = secret_id - self._value = json.dumps({"secret_uri": secret_id}) + self._value = json.dumps({"uri": secret_id}) @property def value(self): try: temp = json.loads(self._value) - temp["secret_uri"] = self.secret_id + temp["uri"] = self.secret_id self._value = json.dumps(temp) return self._value except (JSONDecodeError, ValueError): @@ -325,7 +325,7 @@ def value(self, new_value): try: temp = json.loads(new_value) self._value = new_value - self.secret_id = temp.get("secret_uri") + self.secret_id = temp.get("uri") except(JSONDecodeError, ValueError): self._value = new_value self.secret_id = None @@ -338,7 +338,9 @@ def _from_generated(cls, key_value): secret_uri = None try: temp = json.loads(key_value.value) # type: ignore - secret_uri = temp.get("secret_uri") + secret_uri = temp.get("uri") + if not secret_uri: + secret_uri = temp.get("secret_uri") except (ValueError, JSONDecodeError): pass diff --git a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_version.py b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_version.py index c59569026cf6..59321c35175e 100644 --- a/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_version.py +++ b/sdk/appconfiguration/azure-appconfiguration/azure/appconfiguration/_version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "1.2.1" +VERSION = "1.3.1" diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_breaking2.yaml b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_breaking2.yaml index aea116ba3e52..6a6a04d4f064 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_breaking2.yaml +++ b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_breaking2.yaml @@ -279,7 +279,7 @@ interactions: message: OK - request: body: '{"key": "aref", "content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8", - "value": "{\"secret_uri\": \"notaurl\"}", "tags": {}}' + "value": "{\"uri\": \"notaurl\"}", "tags": {}}' headers: Accept: - application/vnd.microsoft.appconfig.kv+json @@ -303,7 +303,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/aref?api-version=1.0 response: body: - string: '{"etag":"XV3d02cqdYHZKgNdzki1wVDkyv5","key":"aref","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"XV3d02cqdYHZKgNdzki1wVDkyv5","key":"aref","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"notaurl\"}","tags":{},"locked":false,"last_modified":"2021-03-17T16:24:43+00:00"}' headers: access-control-allow-credentials: @@ -359,7 +359,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/aref?api-version=1.0 response: body: - string: '{"etag":"XV3d02cqdYHZKgNdzki1wVDkyv5","key":"aref","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"XV3d02cqdYHZKgNdzki1wVDkyv5","key":"aref","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"notaurl\"}","tags":{},"locked":false,"last_modified":"2021-03-17T16:24:43+00:00"}' headers: access-control-allow-credentials: @@ -395,7 +395,7 @@ interactions: code: 200 message: OK - request: - body: '{"key": "aref1", "content_type": "fkaeyjfdkal;", "value": "{\"secret_uri\": + body: '{"key": "aref1", "content_type": "fkaeyjfdkal;", "value": "{\"uri\": \"notaurl\"}", "tags": {}}' headers: Accept: @@ -420,7 +420,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/aref1?api-version=1.0 response: body: - string: '{"etag":"in0i0hpX7lRB0kHfOEuuxavvN4o","key":"aref1","label":null,"content_type":"fkaeyjfdkal;","value":"{\"secret_uri\": + string: '{"etag":"in0i0hpX7lRB0kHfOEuuxavvN4o","key":"aref1","label":null,"content_type":"fkaeyjfdkal;","value":"{\"uri\": \"notaurl\"}","tags":{},"locked":false,"last_modified":"2021-03-17T16:24:43+00:00"}' headers: access-control-allow-credentials: @@ -476,7 +476,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/aref1?api-version=1.0 response: body: - string: '{"etag":"in0i0hpX7lRB0kHfOEuuxavvN4o","key":"aref1","label":null,"content_type":"fkaeyjfdkal;","value":"{\"secret_uri\": + string: '{"etag":"in0i0hpX7lRB0kHfOEuuxavvN4o","key":"aref1","label":null,"content_type":"fkaeyjfdkal;","value":"{\"uri\": \"notaurl\"}","tags":{},"locked":false,"last_modified":"2021-03-17T16:24:43+00:00"}' headers: access-control-allow-credentials: diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_config_setting_secret_reference.yaml b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_config_setting_secret_reference.yaml index 3aff3ae5c080..5a5835e65dee 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_config_setting_secret_reference.yaml +++ b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client.test_config_setting_secret_reference.yaml @@ -279,7 +279,7 @@ interactions: message: OK - request: body: '{"key": "ConnectionString", "content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8", - "value": "{\"secret_uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", + "value": "{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", "tags": {}}' headers: Accept: @@ -304,7 +304,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"noRNIQV4p3jlzPGjmS8qNIARE4Z","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"noRNIQV4p3jlzPGjmS8qNIARE4Z","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:47+00:00"}' headers: access-control-allow-credentials: @@ -341,7 +341,7 @@ interactions: message: OK - request: body: '{"key": "ConnectionString", "content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8", - "value": "{\"secret_uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", + "value": "{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", "last_modified": "2021-03-30T16:18:47.000Z", "tags": {}, "locked": false, "etag": "noRNIQV4p3jlzPGjmS8qNIARE4Z"}' headers: @@ -367,7 +367,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"inYK833dmGpyBM7jdlu69devKCI","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"inYK833dmGpyBM7jdlu69devKCI","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:48+00:00"}' headers: access-control-allow-credentials: @@ -425,7 +425,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"inYK833dmGpyBM7jdlu69devKCI","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"inYK833dmGpyBM7jdlu69devKCI","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:48+00:00"}' headers: access-control-allow-credentials: diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_aad.test_config_setting_secret_reference.yaml b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_aad.test_config_setting_secret_reference.yaml index 168b315a741b..697b24fd5fcd 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_aad.test_config_setting_secret_reference.yaml +++ b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_aad.test_config_setting_secret_reference.yaml @@ -279,7 +279,7 @@ interactions: message: OK - request: body: '{"key": "ConnectionString", "content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8", - "value": "{\"secret_uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", + "value": "{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", "tags": {}}' headers: Accept: @@ -304,7 +304,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"6DfiLycS3eX8Ba67imiq467YMwt","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"6DfiLycS3eX8Ba67imiq467YMwt","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:49+00:00"}' headers: access-control-allow-credentials: @@ -341,7 +341,7 @@ interactions: message: OK - request: body: '{"key": "ConnectionString", "content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8", - "value": "{\"secret_uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", + "value": "{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", "last_modified": "2021-03-30T16:18:49.000Z", "tags": {}, "locked": false, "etag": "6DfiLycS3eX8Ba67imiq467YMwt"}' headers: @@ -367,7 +367,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"7NL7NOyLmOrwBLLaKJpGw5woPzk","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"7NL7NOyLmOrwBLLaKJpGw5woPzk","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:49+00:00"}' headers: access-control-allow-credentials: @@ -425,7 +425,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"7NL7NOyLmOrwBLLaKJpGw5woPzk","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"7NL7NOyLmOrwBLLaKJpGw5woPzk","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:49+00:00"}' headers: access-control-allow-credentials: diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_aad_async.test_config_setting_secret_reference.yaml b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_aad_async.test_config_setting_secret_reference.yaml index ec495e3055e7..11674ecc771d 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_aad_async.test_config_setting_secret_reference.yaml +++ b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_aad_async.test_config_setting_secret_reference.yaml @@ -279,7 +279,7 @@ interactions: message: OK - request: body: '{"key": "ConnectionString", "content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8", - "value": "{\"secret_uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", + "value": "{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", "tags": {}}' headers: Accept: @@ -304,7 +304,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"o90RpwBMVBl2swER9FgYfVKcygT","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"o90RpwBMVBl2swER9FgYfVKcygT","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:51+00:00"}' headers: access-control-allow-credentials: @@ -341,7 +341,7 @@ interactions: message: OK - request: body: '{"key": "ConnectionString", "content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8", - "value": "{\"secret_uri\": \"https://test-test.vault.azure.net/new_secrets/connectionString\"}", + "value": "{\"uri\": \"https://test-test.vault.azure.net/new_secrets/connectionString\"}", "last_modified": "2021-03-30T16:18:51.000Z", "tags": {}, "locked": false, "etag": "o90RpwBMVBl2swER9FgYfVKcygT"}' headers: @@ -367,7 +367,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"ecPNJlEhWQ2IPgocOxQwQuOVG2q","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"ecPNJlEhWQ2IPgocOxQwQuOVG2q","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/new_secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:52+00:00"}' headers: access-control-allow-credentials: @@ -425,7 +425,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"ecPNJlEhWQ2IPgocOxQwQuOVG2q","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"ecPNJlEhWQ2IPgocOxQwQuOVG2q","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/new_secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:52+00:00"}' headers: access-control-allow-credentials: diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_async.test_config_setting_secret_reference.yaml b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_async.test_config_setting_secret_reference.yaml index 8503fe410b1d..a9a2231db87b 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_async.test_config_setting_secret_reference.yaml +++ b/sdk/appconfiguration/azure-appconfiguration/tests/recordings/test_azure_configuration_client_async.test_config_setting_secret_reference.yaml @@ -279,7 +279,7 @@ interactions: message: OK - request: body: '{"key": "ConnectionString", "content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8", - "value": "{\"secret_uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", + "value": "{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}", "tags": {}}' headers: Accept: @@ -304,7 +304,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"uKrULBFGUzednnilA3kn8SXEDAM","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"uKrULBFGUzednnilA3kn8SXEDAM","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:54+00:00"}' headers: access-control-allow-credentials: @@ -341,7 +341,7 @@ interactions: message: OK - request: body: '{"key": "ConnectionString", "content_type": "application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8", - "value": "{\"secret_uri\": \"https://test-test.vault.azure.net/new_secrets/connectionString\"}", + "value": "{\"uri\": \"https://test-test.vault.azure.net/new_secrets/connectionString\"}", "last_modified": "2021-03-30T16:18:54.000Z", "tags": {}, "locked": false, "etag": "uKrULBFGUzednnilA3kn8SXEDAM"}' headers: @@ -367,7 +367,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"d65cJir9UhQg8zEZBJgIQMOQ7sj","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"d65cJir9UhQg8zEZBJgIQMOQ7sj","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/new_secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:54+00:00"}' headers: access-control-allow-credentials: @@ -425,7 +425,7 @@ interactions: uri: https://fake_app_config.azconfig-test.io/kv/ConnectionString?api-version=1.0 response: body: - string: '{"etag":"d65cJir9UhQg8zEZBJgIQMOQ7sj","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"secret_uri\": + string: '{"etag":"d65cJir9UhQg8zEZBJgIQMOQ7sj","key":"ConnectionString","label":null,"content_type":"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8","value":"{\"uri\": \"https://test-test.vault.azure.net/new_secrets/connectionString\"}","tags":{},"locked":false,"last_modified":"2021-03-30T16:18:54+00:00"}' headers: access-control-allow-credentials: diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client.py b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client.py index d2956512d072..890b04195f6d 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client.py +++ b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client.py @@ -559,9 +559,9 @@ def test_config_setting_secret_reference(self, client): new_uri2 = "https://aka.ms/azsdk/python" updated_flag.secret_id = new_uri temp = json.loads(updated_flag.value) - assert temp['secret_uri'] == new_uri + assert temp['uri'] == new_uri - updated_flag.value = json.dumps({'secret_uri': new_uri2}) + updated_flag.value = json.dumps({'uri': new_uri2}) assert updated_flag.secret_id == new_uri2 set_flag.value = "bad_value" diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_aad.py b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_aad.py index 49e3bd0e9138..bb5d8bbd3725 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_aad.py +++ b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_aad.py @@ -548,9 +548,9 @@ def test_config_setting_secret_reference(self, client): new_uri2 = "https://aka.ms/azsdk/python" updated_flag.secret_id = new_uri temp = json.loads(updated_flag.value) - assert temp['secret_uri'] == new_uri + assert temp['uri'] == new_uri - updated_flag.value = json.dumps({'secret_uri': new_uri2}) + updated_flag.value = json.dumps({'uri': new_uri2}) assert updated_flag.secret_id == new_uri2 set_flag.value = "bad_value" diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_aad_async.py b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_aad_async.py index f4ecad553be9..3b48fcd214a3 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_aad_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_aad_async.py @@ -553,9 +553,9 @@ def test_config_setting_secret_reference(self, client): new_uri2 = "https://aka.ms/azsdk/python" updated_flag.secret_id = new_uri temp = json.loads(updated_flag.value) - assert temp['secret_uri'] == new_uri + assert temp['uri'] == new_uri - updated_flag.value = json.dumps({'secret_uri': new_uri2}) + updated_flag.value = json.dumps({'uri': new_uri2}) assert updated_flag.secret_id == new_uri2 set_flag.value = "bad_value" diff --git a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_async.py b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_async.py index 2d63ece79821..4a3793c3f097 100644 --- a/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_async.py +++ b/sdk/appconfiguration/azure-appconfiguration/tests/test_azure_configuration_client_async.py @@ -583,9 +583,9 @@ def test_config_setting_secret_reference(self, client): new_uri2 = "https://aka.ms/azsdk/python" updated_flag.secret_id = new_uri temp = json.loads(updated_flag.value) - assert temp['secret_uri'] == new_uri + assert temp['uri'] == new_uri - updated_flag.value = json.dumps({'secret_uri': new_uri2}) + updated_flag.value = json.dumps({'uri': new_uri2}) assert updated_flag.secret_id == new_uri2 set_flag.value = "bad_value" diff --git a/sdk/appconfiguration/ci.yml b/sdk/appconfiguration/ci.yml index 8954574d8e3f..0243a961ba45 100644 --- a/sdk/appconfiguration/ci.yml +++ b/sdk/appconfiguration/ci.yml @@ -29,7 +29,7 @@ extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: appconfiguration - VerifyAutorest: true + VerifyAutorest: false ValidateFormatting: false Artifacts: - name: azure-appconfiguration diff --git a/sdk/appconfiguration/tests.yml b/sdk/appconfiguration/tests.yml index 6a8df5bcd2ef..5f441f17be61 100644 --- a/sdk/appconfiguration/tests.yml +++ b/sdk/appconfiguration/tests.yml @@ -4,8 +4,6 @@ stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: appconfiguration - AllocateResourceGroup: false - DeployArmTemplate: true SupportedClouds: 'Public,UsGov,China' MatrixReplace: - TestSamples=.*/true diff --git a/sdk/attestation/test-resources.json b/sdk/attestation/test-resources.json index 0aa1a36f4e99..60deba56406b 100644 --- a/sdk/attestation/test-resources.json +++ b/sdk/attestation/test-resources.json @@ -16,6 +16,13 @@ "description": "The location of the resource. By default, this is the same as the resource group." } }, + "storageEndpointSuffix": { + "type": "string", + "defaultValue": "core.windows.net", + "metadata": { + "description": "The url suffix to use when accessing the storage data plane." + } + }, "isolatedSigningCertificate": { "type": "string", "defaultValue": "" @@ -47,7 +54,7 @@ "type": "Microsoft.Attestation/attestationProviders", "apiVersion": "2020-10-01", "name": "[variables('aadTenantName')]", - "location": "[parameters('location')]", + "location": "[parameters('location')]" }, { "type": "Microsoft.Attestation/attestationProviders", @@ -58,6 +65,10 @@ } ], "outputs": { + "ATTESTATION_STORAGE_ENDPOINT_SUFFIX": { + "type": "string", + "value": "[parameters('storageEndpointSuffix')]" + }, "ATTESTATION_ISOLATED_URL": { "type": "string", "value": "[variables('isolatedUri')]" diff --git a/sdk/attestation/tests.yml b/sdk/attestation/tests.yml index 6b47367f42a8..675be9ecb7af 100644 --- a/sdk/attestation/tests.yml +++ b/sdk/attestation/tests.yml @@ -3,10 +3,8 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: attestation Location: westus - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true diff --git a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/_version.py b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/_version.py index 66fc3a3c5701..48944bf3938a 100644 --- a/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/_version.py +++ b/sdk/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" \ No newline at end of file +VERSION = "2.0.0" diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/CHANGELOG.md b/sdk/azurearcdata/azure-mgmt-azurearcdata/CHANGELOG.md index f24747b3b8cc..5942ba064577 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/CHANGELOG.md +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 1.0.0 (2021-10-26) + +**Features** + + - Model DataControllerProperties has a new parameter logs_dashboard_credential + - Model DataControllerProperties has a new parameter metrics_dashboard_credential + ## 1.0.0b1 (2021-09-15) * Initial Release diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/_meta.json b/sdk/azurearcdata/azure-mgmt-azurearcdata/_meta.json index 39f2055663a1..c5753df7c959 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/_meta.json +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "e23a590abc2f98437bafac9da5ccd608b2981a45", + "commit": "b28a542b3eb4f2f4f384b14b635d0a835df818cd", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/azurearcdata/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/azurearcdata/resource-manager/readme.md" diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_configuration.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_configuration.py index 06e0bd8f8958..2f6a409cc15c 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_configuration.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-08-01" + self.api_version = "2021-11-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-azurearcdata/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_metadata.json b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_metadata.json index cf806c606565..686e24565896 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_metadata.json +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-08-01", - "total_api_version_list": ["2021-08-01"], + "chosen_version": "2021-11-01", + "total_api_version_list": ["2021-11-01"], "client": { "name": "AzureArcDataManagementClient", "filename": "_azure_arc_data_management_client", diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_version.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_version.py index e5754a47ce68..c47f66669f1b 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_version.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0" diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/_configuration.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/_configuration.py index dbff5e916631..d7a60ffd7405 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/_configuration.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-08-01" + self.api_version = "2021-11-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-azurearcdata/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_data_controllers_operations.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_data_controllers_operations.py index a2358f6cad23..16ca096eeb50 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_data_controllers_operations.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_data_controllers_operations.py @@ -61,7 +61,7 @@ def list_in_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,7 @@ def list_in_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -197,7 +197,7 @@ async def _put_data_controller_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -325,7 +325,7 @@ async def _delete_data_controller_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -445,7 +445,7 @@ async def get_data_controller( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -507,7 +507,7 @@ async def patch_data_controller( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_operations.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_operations.py index 90194487b71b..07e2596f4dd3 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_operations.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_sql_managed_instances_operations.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_sql_managed_instances_operations.py index ba47da5e7381..419fe5dd5d3a 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_sql_managed_instances_operations.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_sql_managed_instances_operations.py @@ -61,7 +61,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -207,7 +207,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -256,7 +256,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -384,7 +384,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -507,7 +507,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_sql_server_instances_operations.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_sql_server_instances_operations.py index 31bb1b0649ba..2a1087dd5af8 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_sql_server_instances_operations.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/aio/operations/_sql_server_instances_operations.py @@ -61,7 +61,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -207,7 +207,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -256,7 +256,7 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -384,7 +384,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -507,7 +507,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_models.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_models.py index 1cfa963b8a04..d14de2db3bb4 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_models.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_models.py @@ -96,12 +96,21 @@ class DataControllerProperties(msrest.serialization.Model): :param last_uploaded_date: Last uploaded date from Kubernetes cluster. Defaults to current date time. :type last_uploaded_date: ~datetime.datetime - :param basic_login_information: Username and password for basic login authentication. + :param basic_login_information: Deprecated. Azure Arc Data Services data controller no longer + expose any endpoint. All traffic are exposed through Kubernetes native API. :type basic_login_information: ~azure_arc_data_management_client.models.BasicLoginInformation + :param metrics_dashboard_credential: Login credential for metrics dashboard on the Kubernetes + cluster. + :type metrics_dashboard_credential: + ~azure_arc_data_management_client.models.BasicLoginInformation + :param logs_dashboard_credential: Login credential for logs dashboard on the Kubernetes + cluster. + :type logs_dashboard_credential: ~azure_arc_data_management_client.models.BasicLoginInformation :param log_analytics_workspace_config: Log analytics workspace id and primary key. :type log_analytics_workspace_config: ~azure_arc_data_management_client.models.LogAnalyticsWorkspaceConfig - :param upload_service_principal: Service principal for uploading billing, metrics and logs. + :param upload_service_principal: Deprecated. Service principal is deprecated in favor of Arc + Kubernetes service extension managed identity. :type upload_service_principal: ~azure_arc_data_management_client.models.UploadServicePrincipal :ivar provisioning_state: :vartype provisioning_state: str @@ -124,6 +133,8 @@ class DataControllerProperties(msrest.serialization.Model): 'upload_watermark': {'key': 'uploadWatermark', 'type': 'UploadWatermark'}, 'last_uploaded_date': {'key': 'lastUploadedDate', 'type': 'iso-8601'}, 'basic_login_information': {'key': 'basicLoginInformation', 'type': 'BasicLoginInformation'}, + 'metrics_dashboard_credential': {'key': 'metricsDashboardCredential', 'type': 'BasicLoginInformation'}, + 'logs_dashboard_credential': {'key': 'logsDashboardCredential', 'type': 'BasicLoginInformation'}, 'log_analytics_workspace_config': {'key': 'logAnalyticsWorkspaceConfig', 'type': 'LogAnalyticsWorkspaceConfig'}, 'upload_service_principal': {'key': 'uploadServicePrincipal', 'type': 'UploadServicePrincipal'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, @@ -142,6 +153,8 @@ def __init__( self.upload_watermark = kwargs.get('upload_watermark', None) self.last_uploaded_date = kwargs.get('last_uploaded_date', None) self.basic_login_information = kwargs.get('basic_login_information', None) + self.metrics_dashboard_credential = kwargs.get('metrics_dashboard_credential', None) + self.logs_dashboard_credential = kwargs.get('logs_dashboard_credential', None) self.log_analytics_workspace_config = kwargs.get('log_analytics_workspace_config', None) self.upload_service_principal = kwargs.get('upload_service_principal', None) self.provisioning_state = None diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_models_py3.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_models_py3.py index 822cf32d7820..4ee4c9eab886 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_models_py3.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/models/_models_py3.py @@ -110,12 +110,21 @@ class DataControllerProperties(msrest.serialization.Model): :param last_uploaded_date: Last uploaded date from Kubernetes cluster. Defaults to current date time. :type last_uploaded_date: ~datetime.datetime - :param basic_login_information: Username and password for basic login authentication. + :param basic_login_information: Deprecated. Azure Arc Data Services data controller no longer + expose any endpoint. All traffic are exposed through Kubernetes native API. :type basic_login_information: ~azure_arc_data_management_client.models.BasicLoginInformation + :param metrics_dashboard_credential: Login credential for metrics dashboard on the Kubernetes + cluster. + :type metrics_dashboard_credential: + ~azure_arc_data_management_client.models.BasicLoginInformation + :param logs_dashboard_credential: Login credential for logs dashboard on the Kubernetes + cluster. + :type logs_dashboard_credential: ~azure_arc_data_management_client.models.BasicLoginInformation :param log_analytics_workspace_config: Log analytics workspace id and primary key. :type log_analytics_workspace_config: ~azure_arc_data_management_client.models.LogAnalyticsWorkspaceConfig - :param upload_service_principal: Service principal for uploading billing, metrics and logs. + :param upload_service_principal: Deprecated. Service principal is deprecated in favor of Arc + Kubernetes service extension managed identity. :type upload_service_principal: ~azure_arc_data_management_client.models.UploadServicePrincipal :ivar provisioning_state: :vartype provisioning_state: str @@ -138,6 +147,8 @@ class DataControllerProperties(msrest.serialization.Model): 'upload_watermark': {'key': 'uploadWatermark', 'type': 'UploadWatermark'}, 'last_uploaded_date': {'key': 'lastUploadedDate', 'type': 'iso-8601'}, 'basic_login_information': {'key': 'basicLoginInformation', 'type': 'BasicLoginInformation'}, + 'metrics_dashboard_credential': {'key': 'metricsDashboardCredential', 'type': 'BasicLoginInformation'}, + 'logs_dashboard_credential': {'key': 'logsDashboardCredential', 'type': 'BasicLoginInformation'}, 'log_analytics_workspace_config': {'key': 'logAnalyticsWorkspaceConfig', 'type': 'LogAnalyticsWorkspaceConfig'}, 'upload_service_principal': {'key': 'uploadServicePrincipal', 'type': 'UploadServicePrincipal'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, @@ -154,6 +165,8 @@ def __init__( upload_watermark: Optional["UploadWatermark"] = None, last_uploaded_date: Optional[datetime.datetime] = None, basic_login_information: Optional["BasicLoginInformation"] = None, + metrics_dashboard_credential: Optional["BasicLoginInformation"] = None, + logs_dashboard_credential: Optional["BasicLoginInformation"] = None, log_analytics_workspace_config: Optional["LogAnalyticsWorkspaceConfig"] = None, upload_service_principal: Optional["UploadServicePrincipal"] = None, cluster_id: Optional[str] = None, @@ -167,6 +180,8 @@ def __init__( self.upload_watermark = upload_watermark self.last_uploaded_date = last_uploaded_date self.basic_login_information = basic_login_information + self.metrics_dashboard_credential = metrics_dashboard_credential + self.logs_dashboard_credential = logs_dashboard_credential self.log_analytics_workspace_config = log_analytics_workspace_config self.upload_service_principal = upload_service_principal self.provisioning_state = None diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_data_controllers_operations.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_data_controllers_operations.py index c0afcbc34fac..301f241c855a 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_data_controllers_operations.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_data_controllers_operations.py @@ -66,7 +66,7 @@ def list_in_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -139,7 +139,7 @@ def list_in_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -204,7 +204,7 @@ def _put_data_controller_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -334,7 +334,7 @@ def _delete_data_controller_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -456,7 +456,7 @@ def get_data_controller( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -519,7 +519,7 @@ def patch_data_controller( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_operations.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_operations.py index 94732fb29a25..5383f5f48288 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_operations.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_sql_managed_instances_operations.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_sql_managed_instances_operations.py index 9c06d6b09103..cde261e6d94f 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_sql_managed_instances_operations.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_sql_managed_instances_operations.py @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -139,7 +139,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -214,7 +214,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -264,7 +264,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -394,7 +394,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -519,7 +519,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_sql_server_instances_operations.py b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_sql_server_instances_operations.py index 768ad1eaf582..a350c5729774 100644 --- a/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_sql_server_instances_operations.py +++ b/sdk/azurearcdata/azure-mgmt-azurearcdata/azure/mgmt/azurearcdata/operations/_sql_server_instances_operations.py @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -139,7 +139,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -214,7 +214,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -264,7 +264,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -394,7 +394,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" accept = "application/json" # Construct URL @@ -519,7 +519,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-08-01" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/CHANGELOG.md b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/CHANGELOG.md index 92d78e3d29fb..c7ec7bd37337 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/CHANGELOG.md +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/CHANGELOG.md @@ -1,5 +1,21 @@ # Release History +## 1.0.0 (2021-10-14) + +**Features** + + - Model AzureBareMetalInstance has a new parameter system_data + - Added operation AzureBareMetalInstancesOperations.list_by_resource_group + +**Breaking changes** + + - Model Display no longer has parameter origin + - Removed operation AzureBareMetalInstancesOperations.list + - Removed operation AzureBareMetalInstancesOperations.begin_shutdown + - Removed operation AzureBareMetalInstancesOperations.begin_start + - Removed operation AzureBareMetalInstancesOperations.begin_restart + - Removed operation AzureBareMetalInstancesOperations.begin_delete + ## 1.0.0b2 (2021-06-28) * Fix dependencies diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/MANIFEST.in b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/MANIFEST.in +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/_meta.json b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/_meta.json new file mode 100644 index 000000000000..3203ca0cd0af --- /dev/null +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "1e42e81660d1bc0be000477a4659b29a7ce7d67b", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/baremetalinfrastructure/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/baremetalinfrastructure/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_bare_metal_infrastructure_client.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_bare_metal_infrastructure_client.py index 3e1ef057e5e6..f54a50e7b5c7 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_bare_metal_infrastructure_client.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_bare_metal_infrastructure_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import BareMetalInfrastructureClientConfiguration from .operations import AzureBareMetalInstancesOperations @@ -35,7 +36,6 @@ class BareMetalInfrastructureClient(object): :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( @@ -53,6 +53,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.azure_bare_metal_instances = AzureBareMetalInstancesOperations( @@ -60,6 +61,24 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_configuration.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_configuration.py index 1ca579463723..d5c6592d6f3c 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_configuration.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-08-06-preview" + self.api_version = "2021-08-09" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-baremetalinfrastructure/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_metadata.json b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_metadata.json index a77de8215e81..130f161d94ed 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_metadata.json +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2020-08-06-preview", - "total_api_version_list": ["2020-08-06-preview"], + "chosen_version": "2021-08-09", + "total_api_version_list": ["2021-08-09"], "client": { "name": "BareMetalInfrastructureClient", "filename": "_bare_metal_infrastructure_client", @@ -8,32 +8,35 @@ "base_url": "\u0027https://management.azure.com\u0027", "custom_base_url": null, "azure_arm": true, - "has_lro_operations": true + "has_lro_operations": false, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"BareMetalInfrastructureClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"BareMetalInfrastructureClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { - "sync_method": { + "sync": { "credential": { - "method_signature": "credential, # type: \"TokenCredential\"", + "signature": "credential, # type: \"TokenCredential\"", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials.TokenCredential", "required": true }, "subscription_id": { - "method_signature": "subscription_id, # type: str", + "signature": "subscription_id, # type: str", "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, - "async_method": { + "async": { "credential": { - "method_signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "method_signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The ID of the target subscription.", "docstring_type": "str", "required": true @@ -41,21 +44,61 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "azure_bare_metal_instances": "AzureBareMetalInstancesOperations", "operations": "Operations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_version.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_version.py index dfa6ee022f15..c47f66669f1b 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_version.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0" diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_bare_metal_infrastructure_client.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_bare_metal_infrastructure_client.py index 63045eda9bd1..10c7370cdf49 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_bare_metal_infrastructure_client.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_bare_metal_infrastructure_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -33,7 +34,6 @@ class BareMetalInfrastructureClient(object): :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( @@ -50,6 +50,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.azure_bare_metal_instances = AzureBareMetalInstancesOperations( @@ -57,6 +58,23 @@ def __init__( self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_configuration.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_configuration.py index 8f735a3bf01a..0809070280c1 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_configuration.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-08-06-preview" + self.api_version = "2021-08-09" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-baremetalinfrastructure/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_azure_bare_metal_instances_operations.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_azure_bare_metal_instances_operations.py index 0f9eb8c28406..9eac689264e9 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_azure_bare_metal_instances_operations.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_azure_bare_metal_instances_operations.py @@ -5,18 +5,16 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -35,7 +33,7 @@ class AzureBareMetalInstancesOperations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -43,319 +41,10 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _start_initial( - self, - resource_group_name: str, - azure_bare_metal_instance_name: str, - **kwargs - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" - accept = "application/json" - - # Construct URL - url = self._start_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/start'} # type: ignore - - async def begin_start( - self, - resource_group_name: str, - azure_bare_metal_instance_name: str, - **kwargs - ) -> AsyncLROPoller[None]: - """The operation to start an AzureBareMetal instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param azure_bare_metal_instance_name: Name of the Azure BareMetal on Azure instance. - :type azure_bare_metal_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._start_initial( - resource_group_name=resource_group_name, - azure_bare_metal_instance_name=azure_bare_metal_instance_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/start'} # type: ignore - - async def _restart_initial( - self, - resource_group_name: str, - azure_bare_metal_instance_name: str, - **kwargs - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" - accept = "application/json" - - # Construct URL - url = self._restart_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _restart_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/restart'} # type: ignore - - async def begin_restart( - self, - resource_group_name: str, - azure_bare_metal_instance_name: str, - **kwargs - ) -> AsyncLROPoller[None]: - """The operation to restart an AzureBareMetal instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param azure_bare_metal_instance_name: Name of the Azure BareMetal on Azure instance. - :type azure_bare_metal_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._restart_initial( - resource_group_name=resource_group_name, - azure_bare_metal_instance_name=azure_bare_metal_instance_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/restart'} # type: ignore - - async def _shutdown_initial( - self, - resource_group_name: str, - azure_bare_metal_instance_name: str, - **kwargs - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" - accept = "application/json" - - # Construct URL - url = self._shutdown_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _shutdown_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/shutdown'} # type: ignore - - async def begin_shutdown( - self, - resource_group_name: str, - azure_bare_metal_instance_name: str, - **kwargs - ) -> AsyncLROPoller[None]: - """The operation to shutdown an AzureBareMetal instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param azure_bare_metal_instance_name: Name of the Azure BareMetal on Azure instance. - :type azure_bare_metal_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._shutdown_initial( - resource_group_name=resource_group_name, - azure_bare_metal_instance_name=azure_bare_metal_instance_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_shutdown.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/shutdown'} # type: ignore - def list_by_subscription( self, - **kwargs - ) -> AsyncIterable["models.AzureBareMetalInstancesListResult"]: + **kwargs: Any + ) -> AsyncIterable["_models.AzureBareMetalInstancesListResult"]: """Gets a list of Azure BareMetal instances in the specified subscription. Gets a list of AzureBareMetal instances in the specified subscription. The operations returns @@ -366,12 +55,12 @@ def list_by_subscription( :rtype: ~azure.core.async_paging.AsyncItemPaged[~bare_metal_infrastructure_client.models.AzureBareMetalInstancesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBareMetalInstancesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBareMetalInstancesListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" accept = "application/json" def prepare_request(next_link=None): @@ -411,7 +100,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -422,12 +111,15 @@ async def get_next(next_link=None): ) list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances'} # type: ignore - def list( + def list_by_resource_group( self, resource_group_name: str, - **kwargs - ) -> AsyncIterable["models.AzureBareMetalInstancesListResult"]: - """Gets a list of AzureBareMetal instances in the specified subscription and resource group. + **kwargs: Any + ) -> AsyncIterable["_models.AzureBareMetalInstancesListResult"]: + """Gets a list of Azure BareMetal instances in the specified subscription and resource group. + + Gets a list of AzureBareMetal instances in the specified subscription and resource group. The + operations returns various properties of each Azure BareMetal instance. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -436,12 +128,12 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~bare_metal_infrastructure_client.models.AzureBareMetalInstancesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBareMetalInstancesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBareMetalInstancesListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" accept = "application/json" def prepare_request(next_link=None): @@ -451,10 +143,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -482,7 +174,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -491,14 +183,14 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances'} # type: ignore async def get( self, resource_group_name: str, azure_bare_metal_instance_name: str, - **kwargs - ) -> "models.AzureBareMetalInstance": + **kwargs: Any + ) -> "_models.AzureBareMetalInstance": """Gets an Azure BareMetal instance. Gets an Azure BareMetal instance for the specified subscription, resource group, and instance @@ -513,19 +205,19 @@ async def get( :rtype: ~bare_metal_infrastructure_client.models.AzureBareMetalInstance :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBareMetalInstance"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBareMetalInstance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -544,7 +236,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureBareMetalInstance', pipeline_response) @@ -555,119 +247,13 @@ async def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}'} # type: ignore - async def _delete_initial( - self, - resource_group_name: str, - azure_bare_metal_instance_name: str, - **kwargs - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - azure_bare_metal_instance_name: str, - **kwargs - ) -> AsyncLROPoller[None]: - """Deletes a Azure BareMetal instance. - - Deletes a Azure BareMetal instance with the specified subscription, resource group, and - instance name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param azure_bare_metal_instance_name: Name of the Azure BareMetal on Azure instance. - :type azure_bare_metal_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - azure_bare_metal_instance_name=azure_bare_metal_instance_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}'} # type: ignore - async def update( self, resource_group_name: str, azure_bare_metal_instance_name: str, - tags_parameter: "models.Tags", - **kwargs - ) -> "models.AzureBareMetalInstance": + tags_parameter: "_models.Tags", + **kwargs: Any + ) -> "_models.AzureBareMetalInstance": """Patches the Tags field of a Azure BareMetal instance. Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource @@ -684,12 +270,12 @@ async def update( :rtype: ~bare_metal_infrastructure_client.models.AzureBareMetalInstance :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBareMetalInstance"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBareMetalInstance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -697,7 +283,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -720,7 +306,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureBareMetalInstance', pipeline_response) diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_operations.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_operations.py index 1659b51930c7..c287db466cd0 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_operations.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/aio/operations/_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core.exceptions import ARMErrorFormat -from ... import models +from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -33,7 +33,7 @@ class Operations: :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer) -> None: self._client = client @@ -43,8 +43,8 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs - ) -> AsyncIterable["models.OperationList"]: + **kwargs: Any + ) -> AsyncIterable["_models.OperationList"]: """Gets a list of AzureBareMetal management operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -52,12 +52,12 @@ def list( :rtype: ~azure.core.async_paging.AsyncItemPaged[~bare_metal_infrastructure_client.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" accept = "application/json" def prepare_request(next_link=None): @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/__init__.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/__init__.py index 90b46e69b1bc..226e9d9b036f 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/__init__.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/__init__.py @@ -22,6 +22,7 @@ from ._models_py3 import Resource from ._models_py3 import Result from ._models_py3 import StorageProfile + from ._models_py3 import SystemData from ._models_py3 import Tags from ._models_py3 import TrackedResource except (SyntaxError, ImportError): @@ -40,6 +41,7 @@ from ._models import Resource # type: ignore from ._models import Result # type: ignore from ._models import StorageProfile # type: ignore + from ._models import SystemData # type: ignore from ._models import Tags # type: ignore from ._models import TrackedResource # type: ignore @@ -48,6 +50,7 @@ AzureBareMetalInstancePowerStateEnum, AzureBareMetalInstanceSizeNamesEnum, AzureBareMetalProvisioningStatesEnum, + CreatedByType, ) __all__ = [ @@ -66,10 +69,12 @@ 'Resource', 'Result', 'StorageProfile', + 'SystemData', 'Tags', 'TrackedResource', 'AzureBareMetalHardwareTypeNamesEnum', 'AzureBareMetalInstancePowerStateEnum', 'AzureBareMetalInstanceSizeNamesEnum', 'AzureBareMetalProvisioningStatesEnum', + 'CreatedByType', ] diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_bare_metal_infrastructure_client_enums.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_bare_metal_infrastructure_client_enums.py index 1a32e768d4ed..99ecca39cb99 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_bare_metal_infrastructure_client_enums.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_bare_metal_infrastructure_client_enums.py @@ -103,3 +103,12 @@ class AzureBareMetalProvisioningStatesEnum(with_metaclass(_CaseInsensitiveEnumMe SUCCEEDED = "Succeeded" DELETING = "Deleting" MIGRATING = "Migrating" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_models.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_models.py index bfcff3575554..939d0c638486 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_models.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_models.py @@ -11,17 +11,17 @@ class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -48,19 +48,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. 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. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -99,18 +99,20 @@ class AzureBareMetalInstance(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str + :ivar system_data: The system metadata relating to this resource. + :vartype system_data: ~bare_metal_infrastructure_client.models.SystemData :param hardware_profile: Specifies the hardware settings for the AzureBareMetal instance. :type hardware_profile: ~bare_metal_infrastructure_client.models.HardwareProfile :param storage_profile: Specifies the storage settings for the AzureBareMetal instance disks. @@ -143,6 +145,7 @@ class AzureBareMetalInstance(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'system_data': {'readonly': True}, 'azure_bare_metal_instance_id': {'readonly': True}, 'power_state': {'readonly': True}, 'proximity_placement_group': {'readonly': True}, @@ -156,6 +159,7 @@ class AzureBareMetalInstance(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, @@ -173,6 +177,7 @@ def __init__( **kwargs ): super(AzureBareMetalInstance, self).__init__(**kwargs) + self.system_data = None self.hardware_profile = kwargs.get('hardware_profile', None) self.storage_profile = kwargs.get('storage_profile', None) self.os_profile = kwargs.get('os_profile', None) @@ -247,25 +252,15 @@ class Display(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The localized friendly form of the resource provider name. This form is also - expected to include the publisher/company responsible. Use Title Casing. Begin with "Microsoft" - for 1st party services. + :ivar provider: The localized friendly form of the resource provider name. :vartype provider: str :ivar resource: The localized friendly form of the resource type related to this - action/operation. This form should match the public documentation for the resource provider. - Use Title Casing. For examples, refer to the “name” section. + action/operation. :vartype resource: str - :ivar operation: The localized friendly name for the operation as shown to the user. This name - should be concise (to fit in drop downs), but clear (self-documenting). Use Title Casing and - include the entity/resource to which it applies. + :ivar operation: The localized friendly name for the operation as shown to the user. :vartype operation: str :ivar description: The localized friendly description for the operation as shown to the user. - This description should be thorough, yet concise. It will be used in tool-tips and detailed - views. :vartype description: str - :ivar origin: The intended executor of the operation; governs the display of the operation in - the RBAC UX and the audit logs UX. Default value is 'user,system'. - :vartype origin: str """ _validation = { @@ -273,7 +268,6 @@ class Display(msrest.serialization.Model): 'resource': {'readonly': True}, 'operation': {'readonly': True}, 'description': {'readonly': True}, - 'origin': {'readonly': True}, } _attribute_map = { @@ -281,7 +275,6 @@ class Display(msrest.serialization.Model): 'resource': {'key': 'resource', 'type': 'str'}, 'operation': {'key': 'operation', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, } def __init__( @@ -293,7 +286,6 @@ def __init__( self.resource = None self.operation = None self.description = None - self.origin = None class ErrorDefinition(msrest.serialization.Model): @@ -446,12 +438,13 @@ class Operation(msrest.serialization.Model): :vartype name: str :param display: Displayed AzureBareMetal operation information. :type display: ~bare_metal_infrastructure_client.models.Display - :param is_data_action: indicates whether an operation is a data action or not. - :type is_data_action: bool + :ivar is_data_action: indicates whether an operation is a data action or not. + :vartype is_data_action: bool """ _validation = { 'name': {'readonly': True}, + 'is_data_action': {'readonly': True}, } _attribute_map = { @@ -467,7 +460,7 @@ def __init__( super(Operation, self).__init__(**kwargs) self.name = None self.display = kwargs.get('display', None) - self.is_data_action = kwargs.get('is_data_action', None) + self.is_data_action = None class OperationList(msrest.serialization.Model): @@ -576,6 +569,47 @@ def __init__( self.os_disks = kwargs.get('os_disks', None) +class SystemData(msrest.serialization.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 ~bare_metal_infrastructure_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~bare_metal_infrastructure_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 Tags(msrest.serialization.Model): """Tags field of the AzureBareMetal instance. diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_models_py3.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_models_py3.py index a151c265071f..2a059b47c3da 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_models_py3.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/models/_models_py3.py @@ -6,24 +6,27 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional +import datetime +from typing import Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization +from ._bare_metal_infrastructure_client_enums import * + class Resource(msrest.serialization.Model): - """Resource. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -50,19 +53,19 @@ def __init__( class TrackedResource(Resource): - """The resource model definition for a ARM tracked top level resource. + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. 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. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] @@ -104,18 +107,20 @@ class AzureBareMetalInstance(TrackedResource): All required parameters must be populated in order to send to Azure. - :ivar id: Fully qualified resource Id for the resource. Ex - + :ivar id: Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str :ivar name: The name of the resource. :vartype name: str - :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or - Microsoft.Storage/storageAccounts. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str + :ivar system_data: The system metadata relating to this resource. + :vartype system_data: ~bare_metal_infrastructure_client.models.SystemData :param hardware_profile: Specifies the hardware settings for the AzureBareMetal instance. :type hardware_profile: ~bare_metal_infrastructure_client.models.HardwareProfile :param storage_profile: Specifies the storage settings for the AzureBareMetal instance disks. @@ -148,6 +153,7 @@ class AzureBareMetalInstance(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'system_data': {'readonly': True}, 'azure_bare_metal_instance_id': {'readonly': True}, 'power_state': {'readonly': True}, 'proximity_placement_group': {'readonly': True}, @@ -161,6 +167,7 @@ class AzureBareMetalInstance(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'hardware_profile': {'key': 'properties.hardwareProfile', 'type': 'HardwareProfile'}, 'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'}, 'os_profile': {'key': 'properties.osProfile', 'type': 'OSProfile'}, @@ -186,6 +193,7 @@ def __init__( **kwargs ): super(AzureBareMetalInstance, self).__init__(tags=tags, location=location, **kwargs) + self.system_data = None self.hardware_profile = hardware_profile self.storage_profile = storage_profile self.os_profile = os_profile @@ -266,25 +274,15 @@ class Display(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar provider: The localized friendly form of the resource provider name. This form is also - expected to include the publisher/company responsible. Use Title Casing. Begin with "Microsoft" - for 1st party services. + :ivar provider: The localized friendly form of the resource provider name. :vartype provider: str :ivar resource: The localized friendly form of the resource type related to this - action/operation. This form should match the public documentation for the resource provider. - Use Title Casing. For examples, refer to the “name” section. + action/operation. :vartype resource: str - :ivar operation: The localized friendly name for the operation as shown to the user. This name - should be concise (to fit in drop downs), but clear (self-documenting). Use Title Casing and - include the entity/resource to which it applies. + :ivar operation: The localized friendly name for the operation as shown to the user. :vartype operation: str :ivar description: The localized friendly description for the operation as shown to the user. - This description should be thorough, yet concise. It will be used in tool-tips and detailed - views. :vartype description: str - :ivar origin: The intended executor of the operation; governs the display of the operation in - the RBAC UX and the audit logs UX. Default value is 'user,system'. - :vartype origin: str """ _validation = { @@ -292,7 +290,6 @@ class Display(msrest.serialization.Model): 'resource': {'readonly': True}, 'operation': {'readonly': True}, 'description': {'readonly': True}, - 'origin': {'readonly': True}, } _attribute_map = { @@ -300,7 +297,6 @@ class Display(msrest.serialization.Model): 'resource': {'key': 'resource', 'type': 'str'}, 'operation': {'key': 'operation', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, } def __init__( @@ -312,7 +308,6 @@ def __init__( self.resource = None self.operation = None self.description = None - self.origin = None class ErrorDefinition(msrest.serialization.Model): @@ -471,12 +466,13 @@ class Operation(msrest.serialization.Model): :vartype name: str :param display: Displayed AzureBareMetal operation information. :type display: ~bare_metal_infrastructure_client.models.Display - :param is_data_action: indicates whether an operation is a data action or not. - :type is_data_action: bool + :ivar is_data_action: indicates whether an operation is a data action or not. + :vartype is_data_action: bool """ _validation = { 'name': {'readonly': True}, + 'is_data_action': {'readonly': True}, } _attribute_map = { @@ -489,13 +485,12 @@ def __init__( self, *, display: Optional["Display"] = None, - is_data_action: Optional[bool] = None, **kwargs ): super(Operation, self).__init__(**kwargs) self.name = None self.display = display - self.is_data_action = is_data_action + self.is_data_action = None class OperationList(msrest.serialization.Model): @@ -613,6 +608,54 @@ def __init__( self.os_disks = os_disks +class SystemData(msrest.serialization.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 ~bare_metal_infrastructure_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~bare_metal_infrastructure_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 Tags(msrest.serialization.Model): """Tags field of the AzureBareMetal instance. diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_azure_bare_metal_instances_operations.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_azure_bare_metal_instances_operations.py index 92554b3f5f0a..36c469569177 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_azure_bare_metal_instances_operations.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_azure_bare_metal_instances_operations.py @@ -12,15 +12,13 @@ from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -39,7 +37,7 @@ class AzureBareMetalInstancesOperations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -47,326 +45,11 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _start_initial( - self, - resource_group_name, # type: str - azure_bare_metal_instance_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" - accept = "application/json" - - # Construct URL - url = self._start_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/start'} # type: ignore - - def begin_start( - self, - resource_group_name, # type: str - azure_bare_metal_instance_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """The operation to start an AzureBareMetal instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param azure_bare_metal_instance_name: Name of the Azure BareMetal on Azure instance. - :type azure_bare_metal_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._start_initial( - resource_group_name=resource_group_name, - azure_bare_metal_instance_name=azure_bare_metal_instance_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/start'} # type: ignore - - def _restart_initial( - self, - resource_group_name, # type: str - azure_bare_metal_instance_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" - accept = "application/json" - - # Construct URL - url = self._restart_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _restart_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/restart'} # type: ignore - - def begin_restart( - self, - resource_group_name, # type: str - azure_bare_metal_instance_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """The operation to restart an AzureBareMetal instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param azure_bare_metal_instance_name: Name of the Azure BareMetal on Azure instance. - :type azure_bare_metal_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - azure_bare_metal_instance_name=azure_bare_metal_instance_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/restart'} # type: ignore - - def _shutdown_initial( - self, - resource_group_name, # type: str - azure_bare_metal_instance_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" - accept = "application/json" - - # Construct URL - url = self._shutdown_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _shutdown_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/shutdown'} # type: ignore - - def begin_shutdown( - self, - resource_group_name, # type: str - azure_bare_metal_instance_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """The operation to shutdown an AzureBareMetal instance. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param azure_bare_metal_instance_name: Name of the Azure BareMetal on Azure instance. - :type azure_bare_metal_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._shutdown_initial( - resource_group_name=resource_group_name, - azure_bare_metal_instance_name=azure_bare_metal_instance_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_shutdown.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}/shutdown'} # type: ignore - def list_by_subscription( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.AzureBareMetalInstancesListResult"] + # type: (...) -> Iterable["_models.AzureBareMetalInstancesListResult"] """Gets a list of Azure BareMetal instances in the specified subscription. Gets a list of AzureBareMetal instances in the specified subscription. The operations returns @@ -377,12 +60,12 @@ def list_by_subscription( :rtype: ~azure.core.paging.ItemPaged[~bare_metal_infrastructure_client.models.AzureBareMetalInstancesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBareMetalInstancesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBareMetalInstancesListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" accept = "application/json" def prepare_request(next_link=None): @@ -422,7 +105,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -433,13 +116,16 @@ def get_next(next_link=None): ) list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances'} # type: ignore - def list( + def list_by_resource_group( self, resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["models.AzureBareMetalInstancesListResult"] - """Gets a list of AzureBareMetal instances in the specified subscription and resource group. + # type: (...) -> Iterable["_models.AzureBareMetalInstancesListResult"] + """Gets a list of Azure BareMetal instances in the specified subscription and resource group. + + Gets a list of AzureBareMetal instances in the specified subscription and resource group. The + operations returns various properties of each Azure BareMetal instance. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -448,12 +134,12 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~bare_metal_infrastructure_client.models.AzureBareMetalInstancesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBareMetalInstancesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBareMetalInstancesListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" accept = "application/json" def prepare_request(next_link=None): @@ -463,10 +149,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -494,7 +180,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -503,7 +189,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances'} # type: ignore def get( self, @@ -511,7 +197,7 @@ def get( azure_bare_metal_instance_name, # type: str **kwargs # type: Any ): - # type: (...) -> "models.AzureBareMetalInstance" + # type: (...) -> "_models.AzureBareMetalInstance" """Gets an Azure BareMetal instance. Gets an Azure BareMetal instance for the specified subscription, resource group, and instance @@ -526,19 +212,19 @@ def get( :rtype: ~bare_metal_infrastructure_client.models.AzureBareMetalInstance :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBareMetalInstance"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBareMetalInstance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -557,7 +243,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureBareMetalInstance', pipeline_response) @@ -568,122 +254,14 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}'} # type: ignore - def _delete_initial( - self, - resource_group_name, # type: str - azure_bare_metal_instance_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" - accept = "application/json" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - azure_bare_metal_instance_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes a Azure BareMetal instance. - - Deletes a Azure BareMetal instance with the specified subscription, resource group, and - instance name. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param azure_bare_metal_instance_name: Name of the Azure BareMetal on Azure instance. - :type azure_bare_metal_instance_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - azure_bare_metal_instance_name=azure_bare_metal_instance_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - if polling is True: polling_method = ARMPolling(lro_delay, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.BareMetalInfrastructure/bareMetalInstances/{azureBareMetalInstanceName}'} # type: ignore - def update( self, resource_group_name, # type: str azure_bare_metal_instance_name, # type: str - tags_parameter, # type: "models.Tags" + tags_parameter, # type: "_models.Tags" **kwargs # type: Any ): - # type: (...) -> "models.AzureBareMetalInstance" + # type: (...) -> "_models.AzureBareMetalInstance" """Patches the Tags field of a Azure BareMetal instance. Patches the Tags field of a Azure BareMetal instance for the specified subscription, resource @@ -700,12 +278,12 @@ def update( :rtype: ~bare_metal_infrastructure_client.models.AzureBareMetalInstance :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.AzureBareMetalInstance"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBareMetalInstance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -713,7 +291,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'azureBareMetalInstanceName': self._serialize.url("azure_bare_metal_instance_name", azure_bare_metal_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -736,7 +314,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AzureBareMetalInstance', pipeline_response) diff --git a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_operations.py b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_operations.py index b22b6af4d7fc..473bc60feab6 100644 --- a/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_operations.py +++ b/sdk/baremetalinfrastructure/azure-mgmt-baremetalinfrastructure/azure/mgmt/baremetalinfrastructure/operations/_operations.py @@ -14,7 +14,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat -from .. import models +from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -37,7 +37,7 @@ class Operations(object): :param deserializer: An object model deserializer. """ - models = models + models = _models def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,7 +49,7 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["models.OperationList"] + # type: (...) -> Iterable["_models.OperationList"] """Gets a list of AzureBareMetal management operations. :keyword callable cls: A custom type or function that will be passed the direct response @@ -57,12 +57,12 @@ def list( :rtype: ~azure.core.paging.ItemPaged[~bare_metal_infrastructure_client.models.OperationList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["models.OperationList"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-08-06-preview" + api_version = "2021-08-09" accept = "application/json" def prepare_request(next_link=None): @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/batch/azure-batch/CHANGELOG.md b/sdk/batch/azure-batch/CHANGELOG.md index a8180f20be10..bc7b160790d9 100644 --- a/sdk/batch/azure-batch/CHANGELOG.md +++ b/sdk/batch/azure-batch/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 11.0.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 11.0.0 (2021-07-30) ### Features diff --git a/sdk/batch/azure-batch/azure/batch/_version.py b/sdk/batch/azure-batch/azure/batch/_version.py index abe669393bdf..1c3c7fba409c 100644 --- a/sdk/batch/azure-batch/azure/batch/_version.py +++ b/sdk/batch/azure-batch/azure/batch/_version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "11.0.0" +VERSION = "11.0.1" diff --git a/sdk/chaos/azure-mgmt-chaos/CHANGELOG.md b/sdk/chaos/azure-mgmt-chaos/CHANGELOG.md new file mode 100644 index 000000000000..28ff808de1ea --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/CHANGELOG.md @@ -0,0 +1,11 @@ +# Release History + +## 1.0.0b2 (2021-10-25) + +**Features** + + - Modified client name + +## 1.0.0b1 (2021-10-21) + +* Initial Release diff --git a/sdk/chaos/azure-mgmt-chaos/LICENSE.txt b/sdk/chaos/azure-mgmt-chaos/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/chaos/azure-mgmt-chaos/MANIFEST.in b/sdk/chaos/azure-mgmt-chaos/MANIFEST.in new file mode 100644 index 000000000000..ef61eb0e3527 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/MANIFEST.in @@ -0,0 +1,6 @@ +include _meta.json +recursive-include tests *.py *.yaml +include *.md +include azure/__init__.py +include azure/mgmt/__init__.py +include LICENSE.txt diff --git a/sdk/chaos/azure-mgmt-chaos/README.md b/sdk/chaos/azure-mgmt-chaos/README.md new file mode 100644 index 000000000000..a4b87416a301 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/README.md @@ -0,0 +1,27 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Chaos Management Client Library. +This package has been tested with Python 2.7, 3.6+. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). + + +# Usage + + +To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) + + + +For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/) +Code samples for this package can be found at [Chaos Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. +Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) + + +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) +section of the project. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-chaos%2FREADME.png) diff --git a/sdk/chaos/azure-mgmt-chaos/_meta.json b/sdk/chaos/azure-mgmt-chaos/_meta.json new file mode 100644 index 000000000000..fa16ba4a6c48 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "1e00e8d52c5da01410e898db01c4954c7bd29ba5", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/chaos/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/chaos/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/chaos/azure-mgmt-chaos/azure/__init__.py b/sdk/chaos/azure-mgmt-chaos/azure/__init__.py new file mode 100644 index 000000000000..8db66d3d0f0f --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/__init__.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/__init__.py new file mode 100644 index 000000000000..8db66d3d0f0f --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/__init__.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/__init__.py similarity index 85% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/__init__.py rename to sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/__init__.py index cbe2d6051b9f..fa94e40fc783 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/__init__.py +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._network_management_client import NetworkManagementClient +from ._chaos_management_client import ChaosManagementClient from ._version import VERSION __version__ = VERSION -__all__ = ['NetworkManagementClient'] +__all__ = ['ChaosManagementClient'] try: from ._patch import patch_sdk # type: ignore diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_chaos_management_client.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_chaos_management_client.py new file mode 100644 index 000000000000..c99e87311295 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_chaos_management_client.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import ChaosManagementClientConfiguration +from .operations import CapabilitiesOperations +from .operations import ExperimentsOperations +from .operations import Operations +from .operations import TargetsOperations +from .operations import TargetTypesOperations +from .operations import CapabilityTypesOperations +from . import models + + +class ChaosManagementClient(object): + """Chaos Management Client. + + :ivar capabilities: CapabilitiesOperations operations + :vartype capabilities: chaos_management_client.operations.CapabilitiesOperations + :ivar experiments: ExperimentsOperations operations + :vartype experiments: chaos_management_client.operations.ExperimentsOperations + :ivar operations: Operations operations + :vartype operations: chaos_management_client.operations.Operations + :ivar targets: TargetsOperations operations + :vartype targets: chaos_management_client.operations.TargetsOperations + :ivar target_types: TargetTypesOperations operations + :vartype target_types: chaos_management_client.operations.TargetTypesOperations + :ivar capability_types: CapabilityTypesOperations operations + :vartype capability_types: chaos_management_client.operations.CapabilityTypesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: GUID that represents an Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ChaosManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.capabilities = CapabilitiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.experiments = ExperimentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.targets = TargetsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.target_types = TargetTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.capability_types = CapabilityTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ChaosManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_configuration.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_configuration.py new file mode 100644 index 000000000000..3532b84344c0 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class ChaosManagementClientConfiguration(Configuration): + """Configuration for ChaosManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: GUID that represents an Azure subscription ID. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ChaosManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-15-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-chaos/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_metadata.json b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_metadata.json new file mode 100644 index 000000000000..65cab6b6eb30 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_metadata.json @@ -0,0 +1,108 @@ +{ + "chosen_version": "2021-09-15-preview", + "total_api_version_list": ["2021-09-15-preview"], + "client": { + "name": "ChaosManagementClient", + "filename": "_chaos_management_client", + "description": "Chaos Management Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ChaosManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ChaosManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "GUID that represents an Azure subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "GUID that represents an Azure subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "capabilities": "CapabilitiesOperations", + "experiments": "ExperimentsOperations", + "operations": "Operations", + "targets": "TargetsOperations", + "target_types": "TargetTypesOperations", + "capability_types": "CapabilityTypesOperations" + } +} \ No newline at end of file diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_version.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_version.py new file mode 100644 index 000000000000..dfa6ee022f15 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b2" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/__init__.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/__init__.py similarity index 82% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/__init__.py rename to sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/__init__.py index 1c78defcf225..c08df3c5b2e1 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/__init__.py +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._network_management_client import NetworkManagementClient -__all__ = ['NetworkManagementClient'] +from ._chaos_management_client import ChaosManagementClient +__all__ = ['ChaosManagementClient'] diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_chaos_management_client.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_chaos_management_client.py new file mode 100644 index 000000000000..d57076521db6 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_chaos_management_client.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ChaosManagementClientConfiguration +from .operations import CapabilitiesOperations +from .operations import ExperimentsOperations +from .operations import Operations +from .operations import TargetsOperations +from .operations import TargetTypesOperations +from .operations import CapabilityTypesOperations +from .. import models + + +class ChaosManagementClient(object): + """Chaos Management Client. + + :ivar capabilities: CapabilitiesOperations operations + :vartype capabilities: chaos_management_client.aio.operations.CapabilitiesOperations + :ivar experiments: ExperimentsOperations operations + :vartype experiments: chaos_management_client.aio.operations.ExperimentsOperations + :ivar operations: Operations operations + :vartype operations: chaos_management_client.aio.operations.Operations + :ivar targets: TargetsOperations operations + :vartype targets: chaos_management_client.aio.operations.TargetsOperations + :ivar target_types: TargetTypesOperations operations + :vartype target_types: chaos_management_client.aio.operations.TargetTypesOperations + :ivar capability_types: CapabilityTypesOperations operations + :vartype capability_types: chaos_management_client.aio.operations.CapabilityTypesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: GUID that represents an Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ChaosManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.capabilities = CapabilitiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.experiments = ExperimentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.targets = TargetsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.target_types = TargetTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.capability_types = CapabilityTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ChaosManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_configuration.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_configuration.py new file mode 100644 index 000000000000..9f1f9f8c197a --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class ChaosManagementClientConfiguration(Configuration): + """Configuration for ChaosManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: GUID that represents an Azure subscription ID. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ChaosManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-15-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-chaos/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/__init__.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/__init__.py new file mode 100644 index 000000000000..14351e04a4bc --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._capabilities_operations import CapabilitiesOperations +from ._experiments_operations import ExperimentsOperations +from ._operations import Operations +from ._targets_operations import TargetsOperations +from ._target_types_operations import TargetTypesOperations +from ._capability_types_operations import CapabilityTypesOperations + +__all__ = [ + 'CapabilitiesOperations', + 'ExperimentsOperations', + 'Operations', + 'TargetsOperations', + 'TargetTypesOperations', + 'CapabilityTypesOperations', +] diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_capabilities_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_capabilities_operations.py new file mode 100644 index 000000000000..971f6533087b --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_capabilities_operations.py @@ -0,0 +1,364 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CapabilitiesOperations: + """CapabilitiesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~chaos_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + parent_provider_namespace: str, + parent_resource_type: str, + parent_resource_name: str, + target_name: str, + continuation_token_parameter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.CapabilityListResult"]: + """Get a list of Capability resources that extend a Target resource.. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CapabilityListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.CapabilityListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilityListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CapabilityListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities'} # type: ignore + + async def get( + self, + resource_group_name: str, + parent_provider_namespace: str, + parent_resource_type: str, + parent_resource_name: str, + target_name: str, + capability_name: str, + **kwargs: Any + ) -> "_models.Capability": + """Get a Capability resource that extends a Target resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param capability_name: String that represents a Capability resource name. + :type capability_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Capability, or the result of cls(response) + :rtype: ~chaos_management_client.models.Capability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Capability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'capabilityName': self._serialize.url("capability_name", capability_name, 'str', pattern=r'^[a-zA-Z0-9\-\.]+-\d\.\d$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Capability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + parent_provider_namespace: str, + parent_resource_type: str, + parent_resource_name: str, + target_name: str, + capability_name: str, + **kwargs: Any + ) -> None: + """Delete a Capability that extends a Target resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param capability_name: String that represents a Capability resource name. + :type capability_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'capabilityName': self._serialize.url("capability_name", capability_name, 'str', pattern=r'^[a-zA-Z0-9\-\.]+-\d\.\d$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + parent_provider_namespace: str, + parent_resource_type: str, + parent_resource_name: str, + target_name: str, + capability_name: str, + capability: "_models.Capability", + **kwargs: Any + ) -> "_models.Capability": + """Create or update a Capability resource that extends a Target resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param capability_name: String that represents a Capability resource name. + :type capability_name: str + :param capability: Capability resource to be created or updated. + :type capability: ~chaos_management_client.models.Capability + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Capability, or the result of cls(response) + :rtype: ~chaos_management_client.models.Capability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Capability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'capabilityName': self._serialize.url("capability_name", capability_name, 'str', pattern=r'^[a-zA-Z0-9\-\.]+-\d\.\d$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(capability, 'Capability') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Capability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_backend_address_pools_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_capability_types_operations.py similarity index 58% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_backend_address_pools_operations.py rename to sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_capability_types_operations.py index 39124720825c..cb46f619b5b7 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_backend_address_pools_operations.py +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_capability_types_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerBackendAddressPoolsOperations: - """LoadBalancerBackendAddressPoolsOperations async operations. +class CapabilityTypesOperations: + """CapabilityTypesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~chaos_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,28 +43,31 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - resource_group_name: str, - load_balancer_name: str, + location_name: str, + target_type_name: str, + continuation_token_parameter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerBackendAddressPoolListResult"]: - """Gets all the load balancer backed address pools. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + ) -> AsyncIterable["_models.CapabilityTypeListResult"]: + """Get a list of Capability Type resources for given Target Type and location. + + :param location_name: String that represents a Location resource name. + :type location_name: str + :param target_type_name: String that represents a Target Type resource name. + :type target_type_name: str + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerBackendAddressPoolListResult] + :return: An iterator like instance of either CapabilityTypeListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.CapabilityTypeListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilityTypeListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-15-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -75,14 +78,16 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'locationName': self._serialize.url("location_name", location_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetTypeName': self._serialize.url("target_type_name", target_type_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') request = self._client.get(url, query_parameters, header_parameters) else: @@ -92,7 +97,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerBackendAddressPoolListResult', pipeline_response) + deserialized = self._deserialize('CapabilityTypeListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -105,51 +110,52 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes'} # type: ignore async def get( self, - resource_group_name: str, - load_balancer_name: str, - backend_address_pool_name: str, + location_name: str, + target_type_name: str, + capability_type_name: str, **kwargs: Any - ) -> "_models.BackendAddressPool": - """Gets load balancer backend address pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. - :type backend_address_pool_name: str + ) -> "_models.CapabilityType": + """Get a Capability Type resource for given Target Type and location. + + :param location_name: String that represents a Location resource name. + :type location_name: str + :param target_type_name: String that represents a Target Type resource name. + :type target_type_name: str + :param capability_type_name: String that represents a Capability Type resource name. + :type capability_type_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackendAddressPool, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.BackendAddressPool + :return: CapabilityType, or the result of cls(response) + :rtype: ~chaos_management_client.models.CapabilityType :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilityType"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-15-preview" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'locationName': self._serialize.url("location_name", location_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetTypeName': self._serialize.url("target_type_name", target_type_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'capabilityTypeName': self._serialize.url("capability_type_name", capability_type_name, 'str', pattern=r'^[a-zA-Z0-9\-\.]+-\d\.\d$'), } url = self._client.format_url(url, **path_format_arguments) @@ -167,12 +173,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackendAddressPool', pipeline_response) + deserialized = self._deserialize('CapabilityType', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes/{capabilityTypeName}'} # type: ignore diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_experiments_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_experiments_operations.py new file mode 100644 index 000000000000..90612e3f41f0 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_experiments_operations.py @@ -0,0 +1,894 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExperimentsOperations: + """ExperimentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~chaos_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_all( + self, + running: Optional[bool] = None, + continuation_token_parameter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ExperimentListResult"]: + """Get a list of Experiment resources in a subscription. + + :param running: Optional value that indicates whether to filter results based on if the + Experiment is currently running. If null, then the results will not be filtered. + :type running: bool + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.ExperimentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if running is not None: + query_parameters['running'] = self._serialize.query("running", running, 'bool') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/experiments'} # type: ignore + + def list( + self, + resource_group_name: str, + running: Optional[bool] = None, + continuation_token_parameter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ExperimentListResult"]: + """Get a list of Experiment resources in a resource group. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param running: Optional value that indicates whether to filter results based on if the + Experiment is currently running. If null, then the results will not be filtered. + :type running: bool + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.ExperimentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if running is not None: + query_parameters['running'] = self._serialize.query("running", running, 'bool') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments'} # type: ignore + + async def delete( + self, + resource_group_name: str, + experiment_name: str, + **kwargs: Any + ) -> None: + """Delete a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + experiment_name: str, + **kwargs: Any + ) -> "_models.Experiment": + """Get a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Experiment, or the result of cls(response) + :rtype: ~chaos_management_client.models.Experiment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + experiment_name: str, + experiment: "_models.Experiment", + **kwargs: Any + ) -> "_models.Experiment": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(experiment, 'Experiment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + experiment_name: str, + experiment: "_models.Experiment", + **kwargs: Any + ) -> AsyncLROPoller["_models.Experiment"]: + """Create or update a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :param experiment: Experiment resource to be created or updated. + :type experiment: ~chaos_management_client.models.Experiment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Experiment or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~chaos_management_client.models.Experiment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + experiment_name=experiment_name, + experiment=experiment, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'original-uri'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}'} # type: ignore + + async def _cancel_initial( + self, + resource_group_name: str, + experiment_name: str, + **kwargs: Any + ) -> "_models.ExperimentCancelOperationResult": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentCancelOperationResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self._cancel_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExperimentCancelOperationResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel'} # type: ignore + + async def begin_cancel( + self, + resource_group_name: str, + experiment_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.ExperimentCancelOperationResult"]: + """Cancel a running Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExperimentCancelOperationResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~chaos_management_client.models.ExperimentCancelOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentCancelOperationResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._cancel_initial( + resource_group_name=resource_group_name, + experiment_name=experiment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExperimentCancelOperationResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'original-uri'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel'} # type: ignore + + async def start( + self, + resource_group_name: str, + experiment_name: str, + **kwargs: Any + ) -> "_models.ExperimentStartOperationResult": + """Start a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentStartOperationResult, or the result of cls(response) + :rtype: ~chaos_management_client.models.ExperimentStartOperationResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentStartOperationResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.start.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExperimentStartOperationResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start'} # type: ignore + + def list_all_statuses( + self, + resource_group_name: str, + experiment_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExperimentStatusListResult"]: + """Get a list of statuses of a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentStatusListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.ExperimentStatusListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentStatusListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all_statuses.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentStatusListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_all_statuses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/statuses'} # type: ignore + + async def get_status( + self, + resource_group_name: str, + experiment_name: str, + status_id: str, + **kwargs: Any + ) -> "_models.ExperimentStatus": + """Get a status of a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :param status_id: GUID that represents a Experiment status. + :type status_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentStatus, or the result of cls(response) + :rtype: ~chaos_management_client.models.ExperimentStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get_status.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'statusId': self._serialize.url("status_id", status_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExperimentStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/statuses/{statusId}'} # type: ignore + + def list_execution_details( + self, + resource_group_name: str, + experiment_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExperimentExecutionDetailsListResult"]: + """Get a list of execution details of a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentExecutionDetailsListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.ExperimentExecutionDetailsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentExecutionDetailsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_execution_details.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentExecutionDetailsListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_execution_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executionDetails'} # type: ignore + + async def get_execution_details( + self, + resource_group_name: str, + experiment_name: str, + execution_details_id: str, + **kwargs: Any + ) -> "_models.ExperimentExecutionDetails": + """Get an execution detail of a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :param execution_details_id: GUID that represents a Experiment execution detail. + :type execution_details_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentExecutionDetails, or the result of cls(response) + :rtype: ~chaos_management_client.models.ExperimentExecutionDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentExecutionDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get_execution_details.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'executionDetailsId': self._serialize.url("execution_details_id", execution_details_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExperimentExecutionDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_execution_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executionDetails/{executionDetailsId}'} # type: ignore diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_operations.py new file mode 100644 index 000000000000..7ba98d047556 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~chaos_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Get a list all available Operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/providers/Microsoft.Chaos/operations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_backend_address_pools_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_target_types_operations.py similarity index 63% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_backend_address_pools_operations.py rename to sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_target_types_operations.py index 43308a4d641e..dfec4596a7d6 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_backend_address_pools_operations.py +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_target_types_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerBackendAddressPoolsOperations: - """LoadBalancerBackendAddressPoolsOperations async operations. +class TargetTypesOperations: + """TargetTypesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~chaos_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,28 +43,28 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - resource_group_name: str, - load_balancer_name: str, + location_name: str, + continuation_token_parameter: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerBackendAddressPoolListResult"]: - """Gets all the load balancer backed address pools. + ) -> AsyncIterable["_models.TargetTypeListResult"]: + """Get a list of Target Type resources for given location. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param location_name: String that represents a Location resource name. + :type location_name: str + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerBackendAddressPoolListResult] + :return: An iterator like instance of either TargetTypeListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.TargetTypeListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TargetTypeListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-09-15-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -75,14 +75,15 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'locationName': self._serialize.url("location_name", location_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') request = self._client.get(url, query_parameters, header_parameters) else: @@ -92,7 +93,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerBackendAddressPoolListResult', pipeline_response) + deserialized = self._deserialize('TargetTypeListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -105,51 +106,48 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes'} # type: ignore async def get( self, - resource_group_name: str, - load_balancer_name: str, - backend_address_pool_name: str, + location_name: str, + target_type_name: str, **kwargs: Any - ) -> "_models.BackendAddressPool": - """Gets load balancer backend address pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. - :type backend_address_pool_name: str + ) -> "_models.TargetType": + """Get a Target Type resources for given location. + + :param location_name: String that represents a Location resource name. + :type location_name: str + :param target_type_name: String that represents a Target Type resource name. + :type target_type_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackendAddressPool, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.BackendAddressPool + :return: TargetType, or the result of cls(response) + :rtype: ~chaos_management_client.models.TargetType :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TargetType"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-09-15-preview" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'locationName': self._serialize.url("location_name", location_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetTypeName': self._serialize.url("target_type_name", target_type_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), } url = self._client.format_url(url, **path_format_arguments) @@ -167,12 +165,13 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackendAddressPool', pipeline_response) + deserialized = self._deserialize('TargetType', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}'} # type: ignore diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_targets_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_targets_operations.py new file mode 100644 index 000000000000..e1c62155cff8 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/aio/operations/_targets_operations.py @@ -0,0 +1,348 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class TargetsOperations: + """TargetsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~chaos_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + parent_provider_namespace: str, + parent_resource_type: str, + parent_resource_name: str, + continuation_token_parameter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.TargetListResult"]: + """Get a list of Target resources that extend a tracked regional resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TargetListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~chaos_management_client.models.TargetListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TargetListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('TargetListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets'} # type: ignore + + async def get( + self, + resource_group_name: str, + parent_provider_namespace: str, + parent_resource_type: str, + parent_resource_name: str, + target_name: str, + **kwargs: Any + ) -> "_models.Target": + """Get a Target resource that extends a tracked regional resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Target, or the result of cls(response) + :rtype: ~chaos_management_client.models.Target + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Target"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Target', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + parent_provider_namespace: str, + parent_resource_type: str, + parent_resource_name: str, + target_name: str, + **kwargs: Any + ) -> None: + """Delete a Target resource that extends a tracked regional resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + parent_provider_namespace: str, + parent_resource_type: str, + parent_resource_name: str, + target_name: str, + target: "_models.Target", + **kwargs: Any + ) -> "_models.Target": + """Create or update a Target resource that extends a tracked regional resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param target: Target resource to be created or updated. + :type target: ~chaos_management_client.models.Target + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Target, or the result of cls(response) + :rtype: ~chaos_management_client.models.Target + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Target"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(target, 'Target') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Target', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}'} # type: ignore diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/__init__.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/__init__.py new file mode 100644 index 000000000000..d348640005ea --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/__init__.py @@ -0,0 +1,149 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Action + from ._models_py3 import ActionStatus + from ._models_py3 import Branch + from ._models_py3 import BranchStatus + from ._models_py3 import Capability + from ._models_py3 import CapabilityListResult + from ._models_py3 import CapabilityType + from ._models_py3 import CapabilityTypeListResult + from ._models_py3 import ContinuousAction + from ._models_py3 import DelayAction + from ._models_py3 import DiscreteAction + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorResponse + from ._models_py3 import Experiment + from ._models_py3 import ExperimentCancelOperationResult + from ._models_py3 import ExperimentExecutionActionTargetDetailsError + from ._models_py3 import ExperimentExecutionActionTargetDetailsProperties + from ._models_py3 import ExperimentExecutionDetails + from ._models_py3 import ExperimentExecutionDetailsListResult + from ._models_py3 import ExperimentExecutionDetailsPropertiesRunInformation + from ._models_py3 import ExperimentListResult + from ._models_py3 import ExperimentStartOperationResult + from ._models_py3 import ExperimentStatus + from ._models_py3 import ExperimentStatusListResult + from ._models_py3 import KeyValuePair + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult + from ._models_py3 import Resource + from ._models_py3 import ResourceIdentity + from ._models_py3 import Selector + from ._models_py3 import Step + from ._models_py3 import StepStatus + from ._models_py3 import SystemData + from ._models_py3 import Target + from ._models_py3 import TargetListResult + from ._models_py3 import TargetReference + from ._models_py3 import TargetType + from ._models_py3 import TargetTypeListResult + from ._models_py3 import TrackedResource +except (SyntaxError, ImportError): + from ._models import Action # type: ignore + from ._models import ActionStatus # type: ignore + from ._models import Branch # type: ignore + from ._models import BranchStatus # type: ignore + from ._models import Capability # type: ignore + from ._models import CapabilityListResult # type: ignore + from ._models import CapabilityType # type: ignore + from ._models import CapabilityTypeListResult # type: ignore + from ._models import ContinuousAction # type: ignore + from ._models import DelayAction # type: ignore + from ._models import DiscreteAction # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import Experiment # type: ignore + from ._models import ExperimentCancelOperationResult # type: ignore + from ._models import ExperimentExecutionActionTargetDetailsError # type: ignore + from ._models import ExperimentExecutionActionTargetDetailsProperties # type: ignore + from ._models import ExperimentExecutionDetails # type: ignore + from ._models import ExperimentExecutionDetailsListResult # type: ignore + from ._models import ExperimentExecutionDetailsPropertiesRunInformation # type: ignore + from ._models import ExperimentListResult # type: ignore + from ._models import ExperimentStartOperationResult # type: ignore + from ._models import ExperimentStatus # type: ignore + from ._models import ExperimentStatusListResult # type: ignore + from ._models import KeyValuePair # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceIdentity # type: ignore + from ._models import Selector # type: ignore + from ._models import Step # type: ignore + from ._models import StepStatus # type: ignore + from ._models import SystemData # type: ignore + from ._models import Target # type: ignore + from ._models import TargetListResult # type: ignore + from ._models import TargetReference # type: ignore + from ._models import TargetType # type: ignore + from ._models import TargetTypeListResult # type: ignore + from ._models import TrackedResource # type: ignore + +from ._chaos_management_client_enums import ( + ActionType, + CreatedByType, + Origin, + ResourceIdentityType, + SelectorType, +) + +__all__ = [ + 'Action', + 'ActionStatus', + 'Branch', + 'BranchStatus', + 'Capability', + 'CapabilityListResult', + 'CapabilityType', + 'CapabilityTypeListResult', + 'ContinuousAction', + 'DelayAction', + 'DiscreteAction', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorResponse', + 'Experiment', + 'ExperimentCancelOperationResult', + 'ExperimentExecutionActionTargetDetailsError', + 'ExperimentExecutionActionTargetDetailsProperties', + 'ExperimentExecutionDetails', + 'ExperimentExecutionDetailsListResult', + 'ExperimentExecutionDetailsPropertiesRunInformation', + 'ExperimentListResult', + 'ExperimentStartOperationResult', + 'ExperimentStatus', + 'ExperimentStatusListResult', + 'KeyValuePair', + 'Operation', + 'OperationDisplay', + 'OperationListResult', + 'Resource', + 'ResourceIdentity', + 'Selector', + 'Step', + 'StepStatus', + 'SystemData', + 'Target', + 'TargetListResult', + 'TargetReference', + 'TargetType', + 'TargetTypeListResult', + 'TrackedResource', + 'ActionType', + 'CreatedByType', + 'Origin', + 'ResourceIdentityType', + 'SelectorType', +] diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_chaos_management_client_enums.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_chaos_management_client_enums.py new file mode 100644 index 000000000000..49b325c52be4 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_chaos_management_client_enums.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class ActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + """ + + INTERNAL = "Internal" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit + logs UX. Default value is "user,system" + """ + + USER = "user" + SYSTEM = "system" + USER_SYSTEM = "user,system" + +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """String of the resource identity type. + """ + + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + +class SelectorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enum of the selector type. + """ + + PERCENT = "Percent" + RANDOM = "Random" + TAG = "Tag" + LIST = "List" diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models.py new file mode 100644 index 000000000000..fae34f530c2e --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models.py @@ -0,0 +1,1635 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class Action(msrest.serialization.Model): + """Model that represents the base action model. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ContinuousAction, DelayAction, DiscreteAction. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum that discriminates between action models.Constant filled by server. + :type type: str + :param name: Required. String that represents a Capability URN. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'continuous': 'ContinuousAction', 'delay': 'DelayAction', 'discrete': 'DiscreteAction'} + } + + def __init__( + self, + **kwargs + ): + super(Action, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = kwargs['name'] + + +class ActionStatus(msrest.serialization.Model): + """Model that represents the an action and its status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the action status. + :vartype name: str + :ivar id: The id of the action status. + :vartype id: str + :ivar status: The status of the action. + :vartype status: str + :ivar targets: The array of targets. + :vartype targets: + list[~chaos_management_client.models.ExperimentExecutionActionTargetDetailsProperties] + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'status': {'readonly': True}, + 'targets': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'targets': {'key': 'targets', 'type': '[ExperimentExecutionActionTargetDetailsProperties]'}, + } + + def __init__( + self, + **kwargs + ): + super(ActionStatus, self).__init__(**kwargs) + self.name = None + self.id = None + self.status = None + self.targets = None + + +class Branch(msrest.serialization.Model): + """Model that represents a branch in the step. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. String of the branch name. + :type name: str + :param actions: Required. List of actions. + :type actions: list[~chaos_management_client.models.Action] + """ + + _validation = { + 'name': {'required': True, 'min_length': 1}, + 'actions': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'actions': {'key': 'actions', 'type': '[Action]'}, + } + + def __init__( + self, + **kwargs + ): + super(Branch, self).__init__(**kwargs) + self.name = kwargs['name'] + self.actions = kwargs['actions'] + + +class BranchStatus(msrest.serialization.Model): + """Model that represents the a list of actions and action statuses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the branch status. + :vartype name: str + :ivar id: The id of the branch status. + :vartype id: str + :ivar status: The status of the branch. + :vartype status: str + :ivar actions: The array of actions. + :vartype actions: list[~chaos_management_client.models.ActionStatus] + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'status': {'readonly': True}, + 'actions': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'actions': {'key': 'actions', 'type': '[ActionStatus]'}, + } + + def __init__( + self, + **kwargs + ): + super(BranchStatus, self).__init__(**kwargs) + self.name = None + self.id = None + self.status = None + self.actions = None + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Capability(Resource): + """Model that represents a Capability resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The standard system metadata of a resource type. + :vartype system_data: ~chaos_management_client.models.SystemData + :ivar publisher: String of the Publisher that this Capability extends. + :vartype publisher: str + :ivar target_type: String of the Target Type that this Capability extends. + :vartype target_type: str + :ivar description: Localized string of the description. + :vartype description: str + :ivar parameters_schema: URL to retrieve JSON schema of the Capability parameters. + :vartype parameters_schema: str + :ivar urn: String of the URN for this Capability Type. + :vartype urn: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'publisher': {'readonly': True}, + 'target_type': {'readonly': True}, + 'description': {'readonly': True}, + 'parameters_schema': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + 'urn': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'target_type': {'key': 'properties.targetType', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'str'}, + 'urn': {'key': 'properties.urn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Capability, self).__init__(**kwargs) + self.system_data = None + self.publisher = None + self.target_type = None + self.description = None + self.parameters_schema = None + self.urn = None + + +class CapabilityListResult(msrest.serialization.Model): + """Model that represents a list of Capability resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Capability resources. + :vartype value: list[~chaos_management_client.models.Capability] + :ivar next_link: URL to retrieve the next page of Capability resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Capability]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CapabilityListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class CapabilityType(Resource): + """Model that represents a Capability Type resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata properties of the capability type resource. + :vartype system_data: ~chaos_management_client.models.SystemData + :param location: Location of the Capability Type resource. + :type location: str + :ivar publisher: String of the Publisher that this Capability Type extends. + :vartype publisher: str + :ivar target_type: String of the Target Type that this Capability Type extends. + :vartype target_type: str + :ivar display_name: Localized string of the display name. + :vartype display_name: str + :ivar description: Localized string of the description. + :vartype description: str + :ivar parameters_schema: URL to retrieve JSON schema of the Capability Type parameters. + :vartype parameters_schema: str + :ivar urn: String of the URN for this Capability Type. + :vartype urn: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'publisher': {'readonly': True}, + 'target_type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'parameters_schema': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + 'urn': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'target_type': {'key': 'properties.targetType', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'str'}, + 'urn': {'key': 'properties.urn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CapabilityType, self).__init__(**kwargs) + self.system_data = None + self.location = kwargs.get('location', None) + self.publisher = None + self.target_type = None + self.display_name = None + self.description = None + self.parameters_schema = None + self.urn = None + + +class CapabilityTypeListResult(msrest.serialization.Model): + """Model that represents a list of Capability Type resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Capability Type resources. + :vartype value: list[~chaos_management_client.models.CapabilityType] + :ivar next_link: URL to retrieve the next page of Capability Type resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CapabilityType]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CapabilityTypeListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ContinuousAction(Action): + """Model that represents a continuous action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum that discriminates between action models.Constant filled by server. + :type type: str + :param name: Required. String that represents a Capability URN. + :type name: str + :param duration: Required. ISO8601 formatted string that represents a duration. + :type duration: str + :param parameters: Required. List of key value pairs. + :type parameters: list[~chaos_management_client.models.KeyValuePair] + :param selector_id: Required. String that represents a selector. + :type selector_id: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True, 'max_length': 2048, 'min_length': 0}, + 'duration': {'required': True, 'pattern': r'^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$'}, + 'parameters': {'required': True}, + 'selector_id': {'required': True, 'min_length': 1}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[KeyValuePair]'}, + 'selector_id': {'key': 'selectorId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContinuousAction, self).__init__(**kwargs) + self.type = 'continuous' # type: str + self.duration = kwargs['duration'] + self.parameters = kwargs['parameters'] + self.selector_id = kwargs['selector_id'] + + +class DelayAction(Action): + """Model that represents a delay action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum that discriminates between action models.Constant filled by server. + :type type: str + :param name: Required. String that represents a Capability URN. + :type name: str + :param duration: Required. ISO8601 formatted string that represents a duration. + :type duration: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True, 'max_length': 2048, 'min_length': 0}, + 'duration': {'required': True, 'pattern': r'^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DelayAction, self).__init__(**kwargs) + self.type = 'delay' # type: str + self.duration = kwargs['duration'] + + +class DiscreteAction(Action): + """Model that represents a discrete action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum that discriminates between action models.Constant filled by server. + :type type: str + :param name: Required. String that represents a Capability URN. + :type name: str + :param parameters: Required. List of key value pairs. + :type parameters: list[~chaos_management_client.models.KeyValuePair] + :param selector_id: Required. String that represents a selector. + :type selector_id: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True, 'max_length': 2048, 'min_length': 0}, + 'parameters': {'required': True}, + 'selector_id': {'required': True, 'min_length': 1}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[KeyValuePair]'}, + 'selector_id': {'key': 'selectorId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiscreteAction, self).__init__(**kwargs) + self.type = 'discrete' # type: str + self.parameters = kwargs['parameters'] + self.selector_id = kwargs['selector_id'] + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~chaos_management_client.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~chaos_management_client.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~chaos_management_client.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + + 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. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs['location'] + + +class Experiment(TrackedResource): + """Model that represents a Experiment resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + :ivar system_data: The system metadata of the experiment resource. + :vartype system_data: ~chaos_management_client.models.SystemData + :param identity: The identity of the experiment resource. + :type identity: ~chaos_management_client.models.ResourceIdentity + :param steps: Required. List of steps. + :type steps: list[~chaos_management_client.models.Step] + :param selectors: Required. List of selectors. + :type selectors: list[~chaos_management_client.models.Selector] + :param start_on_creation: A boolean value that indicates if experiment should be started on + creation or not. + :type start_on_creation: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'steps': {'required': True, 'min_items': 1}, + 'selectors': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'steps': {'key': 'properties.steps', 'type': '[Step]'}, + 'selectors': {'key': 'properties.selectors', 'type': '[Selector]'}, + 'start_on_creation': {'key': 'properties.startOnCreation', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Experiment, self).__init__(**kwargs) + self.system_data = None + self.identity = kwargs.get('identity', None) + self.steps = kwargs['steps'] + self.selectors = kwargs['selectors'] + self.start_on_creation = kwargs.get('start_on_creation', None) + + +class ExperimentCancelOperationResult(msrest.serialization.Model): + """Model that represents the result of a cancel Experiment operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: String of the Experiment name. + :vartype name: str + :ivar status_url: URL to retrieve the Experiment status. + :vartype status_url: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status_url': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status_url': {'key': 'statusUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentCancelOperationResult, self).__init__(**kwargs) + self.name = None + self.status_url = None + + +class ExperimentExecutionActionTargetDetailsError(msrest.serialization.Model): + """Model that represents the Experiment action target details error model. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionActionTargetDetailsError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ExperimentExecutionActionTargetDetailsProperties(msrest.serialization.Model): + """Model that represents the Experiment action target details properties model. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The status of the execution. + :vartype status: str + :ivar target: The target for the action. + :vartype target: str + :ivar failed_date_utc: String that represents the failed date time. + :vartype failed_date_utc: ~datetime.datetime + :ivar completed_date_utc: String that represents the completed date time. + :vartype completed_date_utc: ~datetime.datetime + :ivar error: The error of the action. + :vartype error: ~chaos_management_client.models.ExperimentExecutionActionTargetDetailsError + """ + + _validation = { + 'status': {'readonly': True}, + 'target': {'readonly': True}, + 'failed_date_utc': {'readonly': True}, + 'completed_date_utc': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'failed_date_utc': {'key': 'failedDateUtc', 'type': 'iso-8601'}, + 'completed_date_utc': {'key': 'completedDateUtc', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ExperimentExecutionActionTargetDetailsError'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionActionTargetDetailsProperties, self).__init__(**kwargs) + self.status = None + self.target = None + self.failed_date_utc = None + self.completed_date_utc = None + self.error = None + + +class ExperimentExecutionDetails(msrest.serialization.Model): + """Model that represents the execution details of a Experiment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: String of the resource type. + :vartype type: str + :ivar id: String of the fully qualified resource ID. + :vartype id: str + :ivar name: String of the resource name. + :vartype name: str + :ivar experiment_id: The id of the experiment. + :vartype experiment_id: str + :ivar status: The value of the status of the experiment execution. + :vartype status: str + :ivar failure_reason: The reason why the execution failed. + :vartype failure_reason: str + :ivar created_date_utc: String that represents the created date time. + :vartype created_date_utc: ~datetime.datetime + :ivar last_action_date_utc: String that represents the last action date time. + :vartype last_action_date_utc: ~datetime.datetime + :ivar start_date_utc: String that represents the start date time. + :vartype start_date_utc: ~datetime.datetime + :ivar stop_date_utc: String that represents the stop date time. + :vartype stop_date_utc: ~datetime.datetime + :ivar run_information: The information of the experiment run. + :vartype run_information: + ~chaos_management_client.models.ExperimentExecutionDetailsPropertiesRunInformation + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'experiment_id': {'readonly': True}, + 'status': {'readonly': True}, + 'failure_reason': {'readonly': True}, + 'created_date_utc': {'readonly': True}, + 'last_action_date_utc': {'readonly': True}, + 'start_date_utc': {'readonly': True}, + 'stop_date_utc': {'readonly': True}, + 'run_information': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'experiment_id': {'key': 'properties.experimentId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, + 'created_date_utc': {'key': 'properties.createdDateUtc', 'type': 'iso-8601'}, + 'last_action_date_utc': {'key': 'properties.lastActionDateUtc', 'type': 'iso-8601'}, + 'start_date_utc': {'key': 'properties.startDateUtc', 'type': 'iso-8601'}, + 'stop_date_utc': {'key': 'properties.stopDateUtc', 'type': 'iso-8601'}, + 'run_information': {'key': 'properties.runInformation', 'type': 'ExperimentExecutionDetailsPropertiesRunInformation'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionDetails, self).__init__(**kwargs) + self.type = None + self.id = None + self.name = None + self.experiment_id = None + self.status = None + self.failure_reason = None + self.created_date_utc = None + self.last_action_date_utc = None + self.start_date_utc = None + self.stop_date_utc = None + self.run_information = None + + +class ExperimentExecutionDetailsListResult(msrest.serialization.Model): + """Model that represents a list of Experiment execution details and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Experiment execution details. + :vartype value: list[~chaos_management_client.models.ExperimentExecutionDetails] + :ivar next_link: URL to retrieve the next page of Experiment execution details. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExperimentExecutionDetails]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionDetailsListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ExperimentExecutionDetailsPropertiesRunInformation(msrest.serialization.Model): + """The information of the experiment run. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar steps: The steps of the experiment run. + :vartype steps: list[~chaos_management_client.models.StepStatus] + """ + + _validation = { + 'steps': {'readonly': True}, + } + + _attribute_map = { + 'steps': {'key': 'steps', 'type': '[StepStatus]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionDetailsPropertiesRunInformation, self).__init__(**kwargs) + self.steps = None + + +class ExperimentListResult(msrest.serialization.Model): + """Model that represents a list of Experiment resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Experiment resources. + :vartype value: list[~chaos_management_client.models.Experiment] + :ivar next_link: URL to retrieve the next page of Experiment resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Experiment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ExperimentStartOperationResult(msrest.serialization.Model): + """Model that represents the result of a start Experiment operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: String of the Experiment name. + :vartype name: str + :ivar status_url: URL to retrieve the Experiment status. + :vartype status_url: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status_url': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status_url': {'key': 'statusUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentStartOperationResult, self).__init__(**kwargs) + self.name = None + self.status_url = None + + +class ExperimentStatus(msrest.serialization.Model): + """Model that represents the status of a Experiment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: String of the resource type. + :vartype type: str + :ivar id: String of the fully qualified resource ID. + :vartype id: str + :ivar name: String of the resource name. + :vartype name: str + :ivar status: String that represents the status of a Experiment. + :vartype status: str + :ivar created_date_utc: String that represents the created date time of a Experiment. + :vartype created_date_utc: ~datetime.datetime + :ivar end_date_utc: String that represents the end date time of a Experiment. + :vartype end_date_utc: ~datetime.datetime + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'created_date_utc': {'readonly': True}, + 'end_date_utc': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date_utc': {'key': 'properties.createdDateUtc', 'type': 'iso-8601'}, + 'end_date_utc': {'key': 'properties.endDateUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentStatus, self).__init__(**kwargs) + self.type = None + self.id = None + self.name = None + self.status = None + self.created_date_utc = None + self.end_date_utc = None + + +class ExperimentStatusListResult(msrest.serialization.Model): + """Model that represents a list of Experiment statuses and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Experiment statuses. + :vartype value: list[~chaos_management_client.models.ExperimentStatus] + :ivar next_link: URL to retrieve the next page of Experiment statuses. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExperimentStatus]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentStatusListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class KeyValuePair(msrest.serialization.Model): + """A map to describe the settings of an action. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The name of the setting for the action. + :type key: str + :param value: Required. The value of the setting for the action. + :type value: str + """ + + _validation = { + 'key': {'required': True, 'min_length': 1}, + 'value': {'required': True, 'min_length': 1}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyValuePair, self).__init__(**kwargs) + self.key = kwargs['key'] + self.value = kwargs['value'] + + +class Operation(msrest.serialization.Model): + """Details of a REST API operation, returned from the Resource Provider Operations API. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + :vartype name: str + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for + data-plane operations and "false" for ARM/control-plane operations. + :vartype is_data_action: bool + :param display: Localized display information for this particular operation. + :type display: ~chaos_management_client.models.OperationDisplay + :ivar origin: The intended executor of the operation; as in Resource Based Access Control + (RBAC) and audit logs UX. Default value is "user,system". Possible values include: "user", + "system", "user,system". + :vartype origin: str or ~chaos_management_client.models.Origin + :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for + internal only APIs. Possible values include: "Internal". + :vartype action_type: str or ~chaos_management_client.models.ActionType + """ + + _validation = { + 'name': {'readonly': True}, + 'is_data_action': {'readonly': True}, + 'origin': {'readonly': True}, + 'action_type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.is_data_action = None + self.display = kwargs.get('display', None) + self.origin = None + self.action_type = None + + +class OperationDisplay(msrest.serialization.Model): + """Localized display information for this particular operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft + Monitoring Insights" or "Microsoft Compute". + :vartype provider: str + :ivar resource: The localized friendly name of the resource type related to this operation. + E.g. "Virtual Machines" or "Job Schedule Collections". + :vartype resource: str + :ivar operation: The concise, localized friendly name for the operation; suitable for + dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + :vartype operation: str + :ivar description: The short, localized friendly description of the operation; suitable for + tool tips and detailed views. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationListResult(msrest.serialization.Model): + """A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations supported by the resource provider. + :vartype value: list[~chaos_management_client.models.Operation] + :ivar next_link: URL to get the next set of operation list results (if there are any). + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ResourceIdentity(msrest.serialization.Model): + """The managed identity of a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. String of the resource identity type. Possible values include: "None", + "SystemAssigned". + :type type: str or ~chaos_management_client.models.ResourceIdentityType + :ivar principal_id: GUID that represents the principal ID of this resource identity. + :vartype principal_id: str + :ivar tenant_id: GUID that represents the tenant ID of this resource identity. + :vartype tenant_id: str + """ + + _validation = { + 'type': {'required': True}, + 'principal_id': {'readonly': True, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, + 'tenant_id': {'readonly': True, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = kwargs['type'] + self.principal_id = None + self.tenant_id = None + + +class Selector(msrest.serialization.Model): + """Model that represents a selector in the Experiment resource. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum of the selector type. Possible values include: "Percent", "Random", + "Tag", "List". + :type type: str or ~chaos_management_client.models.SelectorType + :param id: Required. String of the selector ID. + :type id: str + :param targets: Required. List of Target references. + :type targets: list[~chaos_management_client.models.TargetReference] + """ + + _validation = { + 'type': {'required': True}, + 'id': {'required': True, 'min_length': 1}, + 'targets': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'targets': {'key': 'targets', 'type': '[TargetReference]'}, + } + + def __init__( + self, + **kwargs + ): + super(Selector, self).__init__(**kwargs) + self.type = kwargs['type'] + self.id = kwargs['id'] + self.targets = kwargs['targets'] + + +class Step(msrest.serialization.Model): + """Model that represents a step in the Experiment resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. String of the step name. + :type name: str + :param branches: Required. List of branches. + :type branches: list[~chaos_management_client.models.Branch] + """ + + _validation = { + 'name': {'required': True, 'min_length': 1}, + 'branches': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'branches': {'key': 'branches', 'type': '[Branch]'}, + } + + def __init__( + self, + **kwargs + ): + super(Step, self).__init__(**kwargs) + self.name = kwargs['name'] + self.branches = kwargs['branches'] + + +class StepStatus(msrest.serialization.Model): + """Model that represents the a list of branches and branch statuses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the step. + :vartype name: str + :ivar id: The id of the step. + :vartype id: str + :ivar status: The value of the status of the step. + :vartype status: str + :ivar branches: The array of branches. + :vartype branches: list[~chaos_management_client.models.BranchStatus] + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'status': {'readonly': True}, + 'branches': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'branches': {'key': 'branches', 'type': '[BranchStatus]'}, + } + + def __init__( + self, + **kwargs + ): + super(StepStatus, self).__init__(**kwargs) + self.name = None + self.id = None + self.status = None + self.branches = None + + +class SystemData(msrest.serialization.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 ~chaos_management_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~chaos_management_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 Target(Resource): + """Model that represents a Target resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata of the target resource. + :vartype system_data: ~chaos_management_client.models.SystemData + :param location: Location of the target resource. + :type location: str + :param properties: Required. The properties of the target resource. + :type properties: dict[str, any] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__( + self, + **kwargs + ): + super(Target, self).__init__(**kwargs) + self.system_data = None + self.location = kwargs.get('location', None) + self.properties = kwargs['properties'] + + +class TargetListResult(msrest.serialization.Model): + """Model that represents a list of Target resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Target resources. + :vartype value: list[~chaos_management_client.models.Target] + :ivar next_link: URL to retrieve the next page of Target resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Target]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class TargetReference(msrest.serialization.Model): + """Model that represents a reference to a Target in the selector. + + 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. + + :ivar type: Enum of the Target reference type. Has constant value: "ChaosTarget". + :vartype type: str + :param id: Required. String of the resource ID of a Target resource. + :type id: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'id': {'required': True, 'pattern': r'^\/[Ss][Uu][Bb][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn][Ss]\/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\/[Rr][Ee][Ss][Oo][Uu][Rr][Cc][Ee][Gg][Rr][Oo][Uu][Pp][Ss]\/[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+\/[a-zA-Z0-9_\-\.]+\/[a-zA-Z0-9_\-\.]+\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[Mm][Ii][Cc][Rr][Oo][Ss][Oo][Ff][Tt]\.[Cc][Hh][Aa][Oo][Ss]\/[Tt][Aa][Rr][Gg][Ee][Tt][Ss]\/[a-zA-Z0-9_\-\.]+$'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + type = "ChaosTarget" + + def __init__( + self, + **kwargs + ): + super(TargetReference, self).__init__(**kwargs) + self.id = kwargs['id'] + + +class TargetType(Resource): + """Model that represents a Target Type resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata properties of the target type resource. + :vartype system_data: ~chaos_management_client.models.SystemData + :param location: Location of the Target Type resource. + :type location: str + :ivar display_name: Localized string of the display name. + :vartype display_name: str + :ivar description: Localized string of the description. + :vartype description: str + :ivar properties_schema: URL to retrieve JSON schema of the Target Type properties. + :vartype properties_schema: str + :ivar resource_types: List of resource types this Target Type can extend. + :vartype resource_types: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'properties_schema': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + 'resource_types': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'properties_schema': {'key': 'properties.propertiesSchema', 'type': 'str'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetType, self).__init__(**kwargs) + self.system_data = None + self.location = kwargs.get('location', None) + self.display_name = None + self.description = None + self.properties_schema = None + self.resource_types = None + + +class TargetTypeListResult(msrest.serialization.Model): + """Model that represents a list of Target Type resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Target Type resources. + :vartype value: list[~chaos_management_client.models.TargetType] + :ivar next_link: URL to retrieve the next page of Target Type resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TargetType]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetTypeListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models_py3.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models_py3.py new file mode 100644 index 000000000000..efe187cc1b39 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/models/_models_py3.py @@ -0,0 +1,1699 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Any, Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._chaos_management_client_enums import * + + +class Action(msrest.serialization.Model): + """Model that represents the base action model. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ContinuousAction, DelayAction, DiscreteAction. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum that discriminates between action models.Constant filled by server. + :type type: str + :param name: Required. String that represents a Capability URN. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'continuous': 'ContinuousAction', 'delay': 'DelayAction', 'discrete': 'DiscreteAction'} + } + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(Action, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = name + + +class ActionStatus(msrest.serialization.Model): + """Model that represents the an action and its status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the action status. + :vartype name: str + :ivar id: The id of the action status. + :vartype id: str + :ivar status: The status of the action. + :vartype status: str + :ivar targets: The array of targets. + :vartype targets: + list[~chaos_management_client.models.ExperimentExecutionActionTargetDetailsProperties] + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'status': {'readonly': True}, + 'targets': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'targets': {'key': 'targets', 'type': '[ExperimentExecutionActionTargetDetailsProperties]'}, + } + + def __init__( + self, + **kwargs + ): + super(ActionStatus, self).__init__(**kwargs) + self.name = None + self.id = None + self.status = None + self.targets = None + + +class Branch(msrest.serialization.Model): + """Model that represents a branch in the step. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. String of the branch name. + :type name: str + :param actions: Required. List of actions. + :type actions: list[~chaos_management_client.models.Action] + """ + + _validation = { + 'name': {'required': True, 'min_length': 1}, + 'actions': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'actions': {'key': 'actions', 'type': '[Action]'}, + } + + def __init__( + self, + *, + name: str, + actions: List["Action"], + **kwargs + ): + super(Branch, self).__init__(**kwargs) + self.name = name + self.actions = actions + + +class BranchStatus(msrest.serialization.Model): + """Model that represents the a list of actions and action statuses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the branch status. + :vartype name: str + :ivar id: The id of the branch status. + :vartype id: str + :ivar status: The status of the branch. + :vartype status: str + :ivar actions: The array of actions. + :vartype actions: list[~chaos_management_client.models.ActionStatus] + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'status': {'readonly': True}, + 'actions': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'actions': {'key': 'actions', 'type': '[ActionStatus]'}, + } + + def __init__( + self, + **kwargs + ): + super(BranchStatus, self).__init__(**kwargs) + self.name = None + self.id = None + self.status = None + self.actions = None + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Capability(Resource): + """Model that represents a Capability resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The standard system metadata of a resource type. + :vartype system_data: ~chaos_management_client.models.SystemData + :ivar publisher: String of the Publisher that this Capability extends. + :vartype publisher: str + :ivar target_type: String of the Target Type that this Capability extends. + :vartype target_type: str + :ivar description: Localized string of the description. + :vartype description: str + :ivar parameters_schema: URL to retrieve JSON schema of the Capability parameters. + :vartype parameters_schema: str + :ivar urn: String of the URN for this Capability Type. + :vartype urn: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'publisher': {'readonly': True}, + 'target_type': {'readonly': True}, + 'description': {'readonly': True}, + 'parameters_schema': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + 'urn': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'target_type': {'key': 'properties.targetType', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'str'}, + 'urn': {'key': 'properties.urn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Capability, self).__init__(**kwargs) + self.system_data = None + self.publisher = None + self.target_type = None + self.description = None + self.parameters_schema = None + self.urn = None + + +class CapabilityListResult(msrest.serialization.Model): + """Model that represents a list of Capability resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Capability resources. + :vartype value: list[~chaos_management_client.models.Capability] + :ivar next_link: URL to retrieve the next page of Capability resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Capability]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CapabilityListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class CapabilityType(Resource): + """Model that represents a Capability Type resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata properties of the capability type resource. + :vartype system_data: ~chaos_management_client.models.SystemData + :param location: Location of the Capability Type resource. + :type location: str + :ivar publisher: String of the Publisher that this Capability Type extends. + :vartype publisher: str + :ivar target_type: String of the Target Type that this Capability Type extends. + :vartype target_type: str + :ivar display_name: Localized string of the display name. + :vartype display_name: str + :ivar description: Localized string of the description. + :vartype description: str + :ivar parameters_schema: URL to retrieve JSON schema of the Capability Type parameters. + :vartype parameters_schema: str + :ivar urn: String of the URN for this Capability Type. + :vartype urn: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'publisher': {'readonly': True}, + 'target_type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'parameters_schema': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + 'urn': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'publisher': {'key': 'properties.publisher', 'type': 'str'}, + 'target_type': {'key': 'properties.targetType', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'parameters_schema': {'key': 'properties.parametersSchema', 'type': 'str'}, + 'urn': {'key': 'properties.urn', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + **kwargs + ): + super(CapabilityType, self).__init__(**kwargs) + self.system_data = None + self.location = location + self.publisher = None + self.target_type = None + self.display_name = None + self.description = None + self.parameters_schema = None + self.urn = None + + +class CapabilityTypeListResult(msrest.serialization.Model): + """Model that represents a list of Capability Type resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Capability Type resources. + :vartype value: list[~chaos_management_client.models.CapabilityType] + :ivar next_link: URL to retrieve the next page of Capability Type resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CapabilityType]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CapabilityTypeListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ContinuousAction(Action): + """Model that represents a continuous action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum that discriminates between action models.Constant filled by server. + :type type: str + :param name: Required. String that represents a Capability URN. + :type name: str + :param duration: Required. ISO8601 formatted string that represents a duration. + :type duration: str + :param parameters: Required. List of key value pairs. + :type parameters: list[~chaos_management_client.models.KeyValuePair] + :param selector_id: Required. String that represents a selector. + :type selector_id: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True, 'max_length': 2048, 'min_length': 0}, + 'duration': {'required': True, 'pattern': r'^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$'}, + 'parameters': {'required': True}, + 'selector_id': {'required': True, 'min_length': 1}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[KeyValuePair]'}, + 'selector_id': {'key': 'selectorId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + duration: str, + parameters: List["KeyValuePair"], + selector_id: str, + **kwargs + ): + super(ContinuousAction, self).__init__(name=name, **kwargs) + self.type = 'continuous' # type: str + self.duration = duration + self.parameters = parameters + self.selector_id = selector_id + + +class DelayAction(Action): + """Model that represents a delay action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum that discriminates between action models.Constant filled by server. + :type type: str + :param name: Required. String that represents a Capability URN. + :type name: str + :param duration: Required. ISO8601 formatted string that represents a duration. + :type duration: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True, 'max_length': 2048, 'min_length': 0}, + 'duration': {'required': True, 'pattern': r'^P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d+)?S)?)?$'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + duration: str, + **kwargs + ): + super(DelayAction, self).__init__(name=name, **kwargs) + self.type = 'delay' # type: str + self.duration = duration + + +class DiscreteAction(Action): + """Model that represents a discrete action. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum that discriminates between action models.Constant filled by server. + :type type: str + :param name: Required. String that represents a Capability URN. + :type name: str + :param parameters: Required. List of key value pairs. + :type parameters: list[~chaos_management_client.models.KeyValuePair] + :param selector_id: Required. String that represents a selector. + :type selector_id: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True, 'max_length': 2048, 'min_length': 0}, + 'parameters': {'required': True}, + 'selector_id': {'required': True, 'min_length': 1}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '[KeyValuePair]'}, + 'selector_id': {'key': 'selectorId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + parameters: List["KeyValuePair"], + selector_id: str, + **kwargs + ): + super(DiscreteAction, self).__init__(name=name, **kwargs) + self.type = 'discrete' # type: str + self.parameters = parameters + self.selector_id = selector_id + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~chaos_management_client.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~chaos_management_client.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~chaos_management_client.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + + 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. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class Experiment(TrackedResource): + """Model that represents a Experiment resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + :ivar system_data: The system metadata of the experiment resource. + :vartype system_data: ~chaos_management_client.models.SystemData + :param identity: The identity of the experiment resource. + :type identity: ~chaos_management_client.models.ResourceIdentity + :param steps: Required. List of steps. + :type steps: list[~chaos_management_client.models.Step] + :param selectors: Required. List of selectors. + :type selectors: list[~chaos_management_client.models.Selector] + :param start_on_creation: A boolean value that indicates if experiment should be started on + creation or not. + :type start_on_creation: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'steps': {'required': True, 'min_items': 1}, + 'selectors': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'steps': {'key': 'properties.steps', 'type': '[Step]'}, + 'selectors': {'key': 'properties.selectors', 'type': '[Selector]'}, + 'start_on_creation': {'key': 'properties.startOnCreation', 'type': 'bool'}, + } + + def __init__( + self, + *, + location: str, + steps: List["Step"], + selectors: List["Selector"], + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceIdentity"] = None, + start_on_creation: Optional[bool] = None, + **kwargs + ): + super(Experiment, self).__init__(tags=tags, location=location, **kwargs) + self.system_data = None + self.identity = identity + self.steps = steps + self.selectors = selectors + self.start_on_creation = start_on_creation + + +class ExperimentCancelOperationResult(msrest.serialization.Model): + """Model that represents the result of a cancel Experiment operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: String of the Experiment name. + :vartype name: str + :ivar status_url: URL to retrieve the Experiment status. + :vartype status_url: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status_url': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status_url': {'key': 'statusUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentCancelOperationResult, self).__init__(**kwargs) + self.name = None + self.status_url = None + + +class ExperimentExecutionActionTargetDetailsError(msrest.serialization.Model): + """Model that represents the Experiment action target details error model. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionActionTargetDetailsError, self).__init__(**kwargs) + self.code = None + self.message = None + + +class ExperimentExecutionActionTargetDetailsProperties(msrest.serialization.Model): + """Model that represents the Experiment action target details properties model. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The status of the execution. + :vartype status: str + :ivar target: The target for the action. + :vartype target: str + :ivar failed_date_utc: String that represents the failed date time. + :vartype failed_date_utc: ~datetime.datetime + :ivar completed_date_utc: String that represents the completed date time. + :vartype completed_date_utc: ~datetime.datetime + :ivar error: The error of the action. + :vartype error: ~chaos_management_client.models.ExperimentExecutionActionTargetDetailsError + """ + + _validation = { + 'status': {'readonly': True}, + 'target': {'readonly': True}, + 'failed_date_utc': {'readonly': True}, + 'completed_date_utc': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'failed_date_utc': {'key': 'failedDateUtc', 'type': 'iso-8601'}, + 'completed_date_utc': {'key': 'completedDateUtc', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'ExperimentExecutionActionTargetDetailsError'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionActionTargetDetailsProperties, self).__init__(**kwargs) + self.status = None + self.target = None + self.failed_date_utc = None + self.completed_date_utc = None + self.error = None + + +class ExperimentExecutionDetails(msrest.serialization.Model): + """Model that represents the execution details of a Experiment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: String of the resource type. + :vartype type: str + :ivar id: String of the fully qualified resource ID. + :vartype id: str + :ivar name: String of the resource name. + :vartype name: str + :ivar experiment_id: The id of the experiment. + :vartype experiment_id: str + :ivar status: The value of the status of the experiment execution. + :vartype status: str + :ivar failure_reason: The reason why the execution failed. + :vartype failure_reason: str + :ivar created_date_utc: String that represents the created date time. + :vartype created_date_utc: ~datetime.datetime + :ivar last_action_date_utc: String that represents the last action date time. + :vartype last_action_date_utc: ~datetime.datetime + :ivar start_date_utc: String that represents the start date time. + :vartype start_date_utc: ~datetime.datetime + :ivar stop_date_utc: String that represents the stop date time. + :vartype stop_date_utc: ~datetime.datetime + :ivar run_information: The information of the experiment run. + :vartype run_information: + ~chaos_management_client.models.ExperimentExecutionDetailsPropertiesRunInformation + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'experiment_id': {'readonly': True}, + 'status': {'readonly': True}, + 'failure_reason': {'readonly': True}, + 'created_date_utc': {'readonly': True}, + 'last_action_date_utc': {'readonly': True}, + 'start_date_utc': {'readonly': True}, + 'stop_date_utc': {'readonly': True}, + 'run_information': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'experiment_id': {'key': 'properties.experimentId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'failure_reason': {'key': 'properties.failureReason', 'type': 'str'}, + 'created_date_utc': {'key': 'properties.createdDateUtc', 'type': 'iso-8601'}, + 'last_action_date_utc': {'key': 'properties.lastActionDateUtc', 'type': 'iso-8601'}, + 'start_date_utc': {'key': 'properties.startDateUtc', 'type': 'iso-8601'}, + 'stop_date_utc': {'key': 'properties.stopDateUtc', 'type': 'iso-8601'}, + 'run_information': {'key': 'properties.runInformation', 'type': 'ExperimentExecutionDetailsPropertiesRunInformation'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionDetails, self).__init__(**kwargs) + self.type = None + self.id = None + self.name = None + self.experiment_id = None + self.status = None + self.failure_reason = None + self.created_date_utc = None + self.last_action_date_utc = None + self.start_date_utc = None + self.stop_date_utc = None + self.run_information = None + + +class ExperimentExecutionDetailsListResult(msrest.serialization.Model): + """Model that represents a list of Experiment execution details and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Experiment execution details. + :vartype value: list[~chaos_management_client.models.ExperimentExecutionDetails] + :ivar next_link: URL to retrieve the next page of Experiment execution details. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExperimentExecutionDetails]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionDetailsListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ExperimentExecutionDetailsPropertiesRunInformation(msrest.serialization.Model): + """The information of the experiment run. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar steps: The steps of the experiment run. + :vartype steps: list[~chaos_management_client.models.StepStatus] + """ + + _validation = { + 'steps': {'readonly': True}, + } + + _attribute_map = { + 'steps': {'key': 'steps', 'type': '[StepStatus]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentExecutionDetailsPropertiesRunInformation, self).__init__(**kwargs) + self.steps = None + + +class ExperimentListResult(msrest.serialization.Model): + """Model that represents a list of Experiment resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Experiment resources. + :vartype value: list[~chaos_management_client.models.Experiment] + :ivar next_link: URL to retrieve the next page of Experiment resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Experiment]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ExperimentStartOperationResult(msrest.serialization.Model): + """Model that represents the result of a start Experiment operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: String of the Experiment name. + :vartype name: str + :ivar status_url: URL to retrieve the Experiment status. + :vartype status_url: str + """ + + _validation = { + 'name': {'readonly': True}, + 'status_url': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status_url': {'key': 'statusUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentStartOperationResult, self).__init__(**kwargs) + self.name = None + self.status_url = None + + +class ExperimentStatus(msrest.serialization.Model): + """Model that represents the status of a Experiment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: String of the resource type. + :vartype type: str + :ivar id: String of the fully qualified resource ID. + :vartype id: str + :ivar name: String of the resource name. + :vartype name: str + :ivar status: String that represents the status of a Experiment. + :vartype status: str + :ivar created_date_utc: String that represents the created date time of a Experiment. + :vartype created_date_utc: ~datetime.datetime + :ivar end_date_utc: String that represents the end date time of a Experiment. + :vartype end_date_utc: ~datetime.datetime + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'created_date_utc': {'readonly': True}, + 'end_date_utc': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_date_utc': {'key': 'properties.createdDateUtc', 'type': 'iso-8601'}, + 'end_date_utc': {'key': 'properties.endDateUtc', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentStatus, self).__init__(**kwargs) + self.type = None + self.id = None + self.name = None + self.status = None + self.created_date_utc = None + self.end_date_utc = None + + +class ExperimentStatusListResult(msrest.serialization.Model): + """Model that represents a list of Experiment statuses and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Experiment statuses. + :vartype value: list[~chaos_management_client.models.ExperimentStatus] + :ivar next_link: URL to retrieve the next page of Experiment statuses. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExperimentStatus]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExperimentStatusListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class KeyValuePair(msrest.serialization.Model): + """A map to describe the settings of an action. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The name of the setting for the action. + :type key: str + :param value: Required. The value of the setting for the action. + :type value: str + """ + + _validation = { + 'key': {'required': True, 'min_length': 1}, + 'value': {'required': True, 'min_length': 1}, + } + + _attribute_map = { + 'key': {'key': 'key', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + key: str, + value: str, + **kwargs + ): + super(KeyValuePair, self).__init__(**kwargs) + self.key = key + self.value = value + + +class Operation(msrest.serialization.Model): + """Details of a REST API operation, returned from the Resource Provider Operations API. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: + "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". + :vartype name: str + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for + data-plane operations and "false" for ARM/control-plane operations. + :vartype is_data_action: bool + :param display: Localized display information for this particular operation. + :type display: ~chaos_management_client.models.OperationDisplay + :ivar origin: The intended executor of the operation; as in Resource Based Access Control + (RBAC) and audit logs UX. Default value is "user,system". Possible values include: "user", + "system", "user,system". + :vartype origin: str or ~chaos_management_client.models.Origin + :ivar action_type: Enum. Indicates the action type. "Internal" refers to actions that are for + internal only APIs. Possible values include: "Internal". + :vartype action_type: str or ~chaos_management_client.models.ActionType + """ + + _validation = { + 'name': {'readonly': True}, + 'is_data_action': {'readonly': True}, + 'origin': {'readonly': True}, + 'action_type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + def __init__( + self, + *, + display: Optional["OperationDisplay"] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.is_data_action = None + self.display = display + self.origin = None + self.action_type = None + + +class OperationDisplay(msrest.serialization.Model): + """Localized display information for this particular operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: The localized friendly form of the resource provider name, e.g. "Microsoft + Monitoring Insights" or "Microsoft Compute". + :vartype provider: str + :ivar resource: The localized friendly name of the resource type related to this operation. + E.g. "Virtual Machines" or "Job Schedule Collections". + :vartype resource: str + :ivar operation: The concise, localized friendly name for the operation; suitable for + dropdowns. E.g. "Create or Update Virtual Machine", "Restart Virtual Machine". + :vartype operation: str + :ivar description: The short, localized friendly description of the operation; suitable for + tool tips and detailed views. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationListResult(msrest.serialization.Model): + """A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of operations supported by the resource provider. + :vartype value: list[~chaos_management_client.models.Operation] + :ivar next_link: URL to get the next set of operation list results (if there are any). + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class ResourceIdentity(msrest.serialization.Model): + """The managed identity of a resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. String of the resource identity type. Possible values include: "None", + "SystemAssigned". + :type type: str or ~chaos_management_client.models.ResourceIdentityType + :ivar principal_id: GUID that represents the principal ID of this resource identity. + :vartype principal_id: str + :ivar tenant_id: GUID that represents the tenant ID of this resource identity. + :vartype tenant_id: str + """ + + _validation = { + 'type': {'required': True}, + 'principal_id': {'readonly': True, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, + 'tenant_id': {'readonly': True, 'pattern': r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Union[str, "ResourceIdentityType"], + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + + +class Selector(msrest.serialization.Model): + """Model that represents a selector in the Experiment resource. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Enum of the selector type. Possible values include: "Percent", "Random", + "Tag", "List". + :type type: str or ~chaos_management_client.models.SelectorType + :param id: Required. String of the selector ID. + :type id: str + :param targets: Required. List of Target references. + :type targets: list[~chaos_management_client.models.TargetReference] + """ + + _validation = { + 'type': {'required': True}, + 'id': {'required': True, 'min_length': 1}, + 'targets': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'targets': {'key': 'targets', 'type': '[TargetReference]'}, + } + + def __init__( + self, + *, + type: Union[str, "SelectorType"], + id: str, + targets: List["TargetReference"], + **kwargs + ): + super(Selector, self).__init__(**kwargs) + self.type = type + self.id = id + self.targets = targets + + +class Step(msrest.serialization.Model): + """Model that represents a step in the Experiment resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. String of the step name. + :type name: str + :param branches: Required. List of branches. + :type branches: list[~chaos_management_client.models.Branch] + """ + + _validation = { + 'name': {'required': True, 'min_length': 1}, + 'branches': {'required': True, 'min_items': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'branches': {'key': 'branches', 'type': '[Branch]'}, + } + + def __init__( + self, + *, + name: str, + branches: List["Branch"], + **kwargs + ): + super(Step, self).__init__(**kwargs) + self.name = name + self.branches = branches + + +class StepStatus(msrest.serialization.Model): + """Model that represents the a list of branches and branch statuses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the step. + :vartype name: str + :ivar id: The id of the step. + :vartype id: str + :ivar status: The value of the status of the step. + :vartype status: str + :ivar branches: The array of branches. + :vartype branches: list[~chaos_management_client.models.BranchStatus] + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'status': {'readonly': True}, + 'branches': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'branches': {'key': 'branches', 'type': '[BranchStatus]'}, + } + + def __init__( + self, + **kwargs + ): + super(StepStatus, self).__init__(**kwargs) + self.name = None + self.id = None + self.status = None + self.branches = None + + +class SystemData(msrest.serialization.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 ~chaos_management_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~chaos_management_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 Target(Resource): + """Model that represents a Target resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata of the target resource. + :vartype system_data: ~chaos_management_client.models.SystemData + :param location: Location of the target resource. + :type location: str + :param properties: Required. The properties of the target resource. + :type properties: dict[str, any] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{object}'}, + } + + def __init__( + self, + *, + properties: Dict[str, Any], + location: Optional[str] = None, + **kwargs + ): + super(Target, self).__init__(**kwargs) + self.system_data = None + self.location = location + self.properties = properties + + +class TargetListResult(msrest.serialization.Model): + """Model that represents a list of Target resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Target resources. + :vartype value: list[~chaos_management_client.models.Target] + :ivar next_link: URL to retrieve the next page of Target resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Target]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class TargetReference(msrest.serialization.Model): + """Model that represents a reference to a Target in the selector. + + 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. + + :ivar type: Enum of the Target reference type. Has constant value: "ChaosTarget". + :vartype type: str + :param id: Required. String of the resource ID of a Target resource. + :type id: str + """ + + _validation = { + 'type': {'required': True, 'constant': True}, + 'id': {'required': True, 'pattern': r'^\/[Ss][Uu][Bb][Ss][Cc][Rr][Ii][Pp][Tt][Ii][Oo][Nn][Ss]\/[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}\/[Rr][Ee][Ss][Oo][Uu][Rr][Cc][Ee][Gg][Rr][Oo][Uu][Pp][Ss]\/[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+\/[a-zA-Z0-9_\-\.]+\/[a-zA-Z0-9_\-\.]+\/[Pp][Rr][Oo][Vv][Ii][Dd][Ee][Rr][Ss]\/[Mm][Ii][Cc][Rr][Oo][Ss][Oo][Ff][Tt]\.[Cc][Hh][Aa][Oo][Ss]\/[Tt][Aa][Rr][Gg][Ee][Tt][Ss]\/[a-zA-Z0-9_\-\.]+$'}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + type = "ChaosTarget" + + def __init__( + self, + *, + id: str, + **kwargs + ): + super(TargetReference, self).__init__(**kwargs) + self.id = id + + +class TargetType(Resource): + """Model that represents a Target Type resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata properties of the target type resource. + :vartype system_data: ~chaos_management_client.models.SystemData + :param location: Location of the Target Type resource. + :type location: str + :ivar display_name: Localized string of the display name. + :vartype display_name: str + :ivar description: Localized string of the description. + :vartype description: str + :ivar properties_schema: URL to retrieve JSON schema of the Target Type properties. + :vartype properties_schema: str + :ivar resource_types: List of resource types this Target Type can extend. + :vartype resource_types: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'properties_schema': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + 'resource_types': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'properties_schema': {'key': 'properties.propertiesSchema', 'type': 'str'}, + 'resource_types': {'key': 'properties.resourceTypes', 'type': '[str]'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + **kwargs + ): + super(TargetType, self).__init__(**kwargs) + self.system_data = None + self.location = location + self.display_name = None + self.description = None + self.properties_schema = None + self.resource_types = None + + +class TargetTypeListResult(msrest.serialization.Model): + """Model that represents a list of Target Type resources and a link for pagination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Target Type resources. + :vartype value: list[~chaos_management_client.models.TargetType] + :ivar next_link: URL to retrieve the next page of Target Type resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True, 'max_length': 2048, 'min_length': 0}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[TargetType]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetTypeListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/__init__.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/__init__.py new file mode 100644 index 000000000000..14351e04a4bc --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._capabilities_operations import CapabilitiesOperations +from ._experiments_operations import ExperimentsOperations +from ._operations import Operations +from ._targets_operations import TargetsOperations +from ._target_types_operations import TargetTypesOperations +from ._capability_types_operations import CapabilityTypesOperations + +__all__ = [ + 'CapabilitiesOperations', + 'ExperimentsOperations', + 'Operations', + 'TargetsOperations', + 'TargetTypesOperations', + 'CapabilityTypesOperations', +] diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_capabilities_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_capabilities_operations.py new file mode 100644 index 000000000000..b7e8c3655f70 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_capabilities_operations.py @@ -0,0 +1,372 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CapabilitiesOperations(object): + """CapabilitiesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~chaos_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + parent_provider_namespace, # type: str + parent_resource_type, # type: str + parent_resource_name, # type: str + target_name, # type: str + continuation_token_parameter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CapabilityListResult"] + """Get a list of Capability resources that extend a Target resource.. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CapabilityListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~chaos_management_client.models.CapabilityListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilityListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CapabilityListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities'} # type: ignore + + def get( + self, + resource_group_name, # type: str + parent_provider_namespace, # type: str + parent_resource_type, # type: str + parent_resource_name, # type: str + target_name, # type: str + capability_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Capability" + """Get a Capability resource that extends a Target resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param capability_name: String that represents a Capability resource name. + :type capability_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Capability, or the result of cls(response) + :rtype: ~chaos_management_client.models.Capability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Capability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'capabilityName': self._serialize.url("capability_name", capability_name, 'str', pattern=r'^[a-zA-Z0-9\-\.]+-\d\.\d$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Capability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + parent_provider_namespace, # type: str + parent_resource_type, # type: str + parent_resource_name, # type: str + target_name, # type: str + capability_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a Capability that extends a Target resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param capability_name: String that represents a Capability resource name. + :type capability_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'capabilityName': self._serialize.url("capability_name", capability_name, 'str', pattern=r'^[a-zA-Z0-9\-\.]+-\d\.\d$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + parent_provider_namespace, # type: str + parent_resource_type, # type: str + parent_resource_name, # type: str + target_name, # type: str + capability_name, # type: str + capability, # type: "_models.Capability" + **kwargs # type: Any + ): + # type: (...) -> "_models.Capability" + """Create or update a Capability resource that extends a Target resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param capability_name: String that represents a Capability resource name. + :type capability_name: str + :param capability: Capability resource to be created or updated. + :type capability: ~chaos_management_client.models.Capability + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Capability, or the result of cls(response) + :rtype: ~chaos_management_client.models.Capability + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Capability"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'capabilityName': self._serialize.url("capability_name", capability_name, 'str', pattern=r'^[a-zA-Z0-9\-\.]+-\d\.\d$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(capability, 'Capability') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Capability', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}/capabilities/{capabilityName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_backend_address_pools_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_capability_types_operations.py similarity index 58% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_backend_address_pools_operations.py rename to sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_capability_types_operations.py index 3c4afb27e8bc..844c13f7de4c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_backend_address_pools_operations.py +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_capability_types_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerBackendAddressPoolsOperations(object): - """LoadBalancerBackendAddressPoolsOperations operations. +class CapabilityTypesOperations(object): + """CapabilityTypesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~chaos_management_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,29 +47,32 @@ def __init__(self, client, config, serializer, deserializer): def list( self, - resource_group_name, # type: str - load_balancer_name, # type: str + location_name, # type: str + target_type_name, # type: str + continuation_token_parameter=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerBackendAddressPoolListResult"] - """Gets all the load balancer backed address pools. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + # type: (...) -> Iterable["_models.CapabilityTypeListResult"] + """Get a list of Capability Type resources for given Target Type and location. + + :param location_name: String that represents a Location resource name. + :type location_name: str + :param target_type_name: String that represents a Target Type resource name. + :type target_type_name: str + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerBackendAddressPoolListResult] + :return: An iterator like instance of either CapabilityTypeListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~chaos_management_client.models.CapabilityTypeListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilityTypeListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-15-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -80,14 +83,16 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'locationName': self._serialize.url("location_name", location_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetTypeName': self._serialize.url("target_type_name", target_type_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') request = self._client.get(url, query_parameters, header_parameters) else: @@ -97,7 +102,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerBackendAddressPoolListResult', pipeline_response) + deserialized = self._deserialize('CapabilityTypeListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,52 +115,53 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes'} # type: ignore def get( self, - resource_group_name, # type: str - load_balancer_name, # type: str - backend_address_pool_name, # type: str + location_name, # type: str + target_type_name, # type: str + capability_type_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.BackendAddressPool" - """Gets load balancer backend address pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. - :type backend_address_pool_name: str + # type: (...) -> "_models.CapabilityType" + """Get a Capability Type resource for given Target Type and location. + + :param location_name: String that represents a Location resource name. + :type location_name: str + :param target_type_name: String that represents a Target Type resource name. + :type target_type_name: str + :param capability_type_name: String that represents a Capability Type resource name. + :type capability_type_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackendAddressPool, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.BackendAddressPool + :return: CapabilityType, or the result of cls(response) + :rtype: ~chaos_management_client.models.CapabilityType :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CapabilityType"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-15-preview" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'locationName': self._serialize.url("location_name", location_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetTypeName': self._serialize.url("target_type_name", target_type_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'capabilityTypeName': self._serialize.url("capability_type_name", capability_type_name, 'str', pattern=r'^[a-zA-Z0-9\-\.]+-\d\.\d$'), } url = self._client.format_url(url, **path_format_arguments) @@ -173,12 +179,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackendAddressPool', pipeline_response) + deserialized = self._deserialize('CapabilityType', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}/capabilityTypes/{capabilityTypeName}'} # type: ignore diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_experiments_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_experiments_operations.py new file mode 100644 index 000000000000..ed9410549e6b --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_experiments_operations.py @@ -0,0 +1,911 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExperimentsOperations(object): + """ExperimentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~chaos_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_all( + self, + running=None, # type: Optional[bool] + continuation_token_parameter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExperimentListResult"] + """Get a list of Experiment resources in a subscription. + + :param running: Optional value that indicates whether to filter results based on if the + Experiment is currently running. If null, then the results will not be filtered. + :type running: bool + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~chaos_management_client.models.ExperimentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if running is not None: + query_parameters['running'] = self._serialize.query("running", running, 'bool') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/experiments'} # type: ignore + + def list( + self, + resource_group_name, # type: str + running=None, # type: Optional[bool] + continuation_token_parameter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExperimentListResult"] + """Get a list of Experiment resources in a resource group. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param running: Optional value that indicates whether to filter results based on if the + Experiment is currently running. If null, then the results will not be filtered. + :type running: bool + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~chaos_management_client.models.ExperimentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if running is not None: + query_parameters['running'] = self._serialize.query("running", running, 'bool') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Experiment" + """Get a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Experiment, or the result of cls(response) + :rtype: ~chaos_management_client.models.Experiment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + experiment_name, # type: str + experiment, # type: "_models.Experiment" + **kwargs # type: Any + ): + # type: (...) -> "_models.Experiment" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(experiment, 'Experiment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + experiment_name, # type: str + experiment, # type: "_models.Experiment" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Experiment"] + """Create or update a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :param experiment: Experiment resource to be created or updated. + :type experiment: ~chaos_management_client.models.Experiment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Experiment or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~chaos_management_client.models.Experiment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Experiment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + experiment_name=experiment_name, + experiment=experiment, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Experiment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'original-uri'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}'} # type: ignore + + def _cancel_initial( + self, + resource_group_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExperimentCancelOperationResult" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentCancelOperationResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self._cancel_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExperimentCancelOperationResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel'} # type: ignore + + def begin_cancel( + self, + resource_group_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ExperimentCancelOperationResult"] + """Cancel a running Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ExperimentCancelOperationResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~chaos_management_client.models.ExperimentCancelOperationResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentCancelOperationResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + experiment_name=experiment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExperimentCancelOperationResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'original-uri'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/cancel'} # type: ignore + + def start( + self, + resource_group_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExperimentStartOperationResult" + """Start a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentStartOperationResult, or the result of cls(response) + :rtype: ~chaos_management_client.models.ExperimentStartOperationResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentStartOperationResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.start.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExperimentStartOperationResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/start'} # type: ignore + + def list_all_statuses( + self, + resource_group_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExperimentStatusListResult"] + """Get a list of statuses of a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentStatusListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~chaos_management_client.models.ExperimentStatusListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentStatusListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all_statuses.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentStatusListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_all_statuses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/statuses'} # type: ignore + + def get_status( + self, + resource_group_name, # type: str + experiment_name, # type: str + status_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExperimentStatus" + """Get a status of a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :param status_id: GUID that represents a Experiment status. + :type status_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentStatus, or the result of cls(response) + :rtype: ~chaos_management_client.models.ExperimentStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get_status.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'statusId': self._serialize.url("status_id", status_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExperimentStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/statuses/{statusId}'} # type: ignore + + def list_execution_details( + self, + resource_group_name, # type: str + experiment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExperimentExecutionDetailsListResult"] + """Get a list of execution details of a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExperimentExecutionDetailsListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~chaos_management_client.models.ExperimentExecutionDetailsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentExecutionDetailsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_execution_details.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExperimentExecutionDetailsListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_execution_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executionDetails'} # type: ignore + + def get_execution_details( + self, + resource_group_name, # type: str + experiment_name, # type: str + execution_details_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExperimentExecutionDetails" + """Get an execution detail of a Experiment resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param experiment_name: String that represents a Experiment resource name. + :type experiment_name: str + :param execution_details_id: GUID that represents a Experiment execution detail. + :type execution_details_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExperimentExecutionDetails, or the result of cls(response) + :rtype: ~chaos_management_client.models.ExperimentExecutionDetails + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExperimentExecutionDetails"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get_execution_details.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'experimentName': self._serialize.url("experiment_name", experiment_name, 'str', min_length=1, pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'executionDetailsId': self._serialize.url("execution_details_id", execution_details_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExperimentExecutionDetails', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_execution_details.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Chaos/experiments/{experimentName}/executionDetails/{executionDetailsId}'} # type: ignore diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_operations.py new file mode 100644 index 000000000000..f9c85feec236 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~chaos_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_all( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] + """Get a list all available Operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~chaos_management_client.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/providers/Microsoft.Chaos/operations'} # type: ignore diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_target_types_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_target_types_operations.py new file mode 100644 index 000000000000..31127b8e1ae6 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_target_types_operations.py @@ -0,0 +1,183 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class TargetTypesOperations(object): + """TargetTypesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~chaos_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location_name, # type: str + continuation_token_parameter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.TargetTypeListResult"] + """Get a list of Target Type resources for given location. + + :param location_name: String that represents a Location resource name. + :type location_name: str + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TargetTypeListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~chaos_management_client.models.TargetTypeListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TargetTypeListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'locationName': self._serialize.url("location_name", location_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TargetTypeListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes'} # type: ignore + + def get( + self, + location_name, # type: str + target_type_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.TargetType" + """Get a Target Type resources for given location. + + :param location_name: String that represents a Location resource name. + :type location_name: str + :param target_type_name: String that represents a Target Type resource name. + :type target_type_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TargetType, or the result of cls(response) + :rtype: ~chaos_management_client.models.TargetType + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TargetType"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'locationName': self._serialize.url("location_name", location_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetTypeName': self._serialize.url("target_type_name", target_type_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TargetType', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Chaos/locations/{locationName}/targetTypes/{targetTypeName}'} # type: ignore diff --git a/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_targets_operations.py b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_targets_operations.py new file mode 100644 index 000000000000..d7a993a2ddf2 --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/operations/_targets_operations.py @@ -0,0 +1,356 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class TargetsOperations(object): + """TargetsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~chaos_management_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + parent_provider_namespace, # type: str + parent_resource_type, # type: str + parent_resource_name, # type: str + continuation_token_parameter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.TargetListResult"] + """Get a list of Target resources that extend a tracked regional resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param continuation_token_parameter: String that sets the continuation token. + :type continuation_token_parameter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TargetListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~chaos_management_client.models.TargetListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TargetListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token_parameter is not None: + query_parameters['continuationToken'] = self._serialize.query("continuation_token_parameter", continuation_token_parameter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('TargetListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets'} # type: ignore + + def get( + self, + resource_group_name, # type: str + parent_provider_namespace, # type: str + parent_resource_type, # type: str + parent_resource_name, # type: str + target_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Target" + """Get a Target resource that extends a tracked regional resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Target, or the result of cls(response) + :rtype: ~chaos_management_client.models.Target + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Target"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Target', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + parent_provider_namespace, # type: str + parent_resource_type, # type: str + parent_resource_name, # type: str + target_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete a Target resource that extends a tracked regional resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + parent_provider_namespace, # type: str + parent_resource_type, # type: str + parent_resource_name, # type: str + target_name, # type: str + target, # type: "_models.Target" + **kwargs # type: Any + ): + # type: (...) -> "_models.Target" + """Create or update a Target resource that extends a tracked regional resource. + + :param resource_group_name: String that represents an Azure resource group. + :type resource_group_name: str + :param parent_provider_namespace: String that represents a resource provider namespace. + :type parent_provider_namespace: str + :param parent_resource_type: String that represents a resource type. + :type parent_resource_type: str + :param parent_resource_name: String that represents a resource name. + :type parent_resource_name: str + :param target_name: String that represents a Target resource name. + :type target_name: str + :param target: Target resource to be created or updated. + :type target: ~chaos_management_client.models.Target + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Target, or the result of cls(response) + :rtype: ~chaos_management_client.models.Target + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Target"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-15-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', pattern=r'^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.\(\)]*[a-zA-Z0-9_\-\(\)]$'), + 'parentProviderNamespace': self._serialize.url("parent_provider_namespace", parent_provider_namespace, 'str', pattern=r'^[a-zA-Z0-9]+\.[a-zA-Z0-9]+$'), + 'parentResourceType': self._serialize.url("parent_resource_type", parent_resource_type, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'parentResourceName': self._serialize.url("parent_resource_name", parent_resource_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + 'targetName': self._serialize.url("target_name", target_name, 'str', pattern=r'^[a-zA-Z0-9_\-\.]+$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(target, 'Target') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Target', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{parentProviderNamespace}/{parentResourceType}/{parentResourceName}/providers/Microsoft.Chaos/targets/{targetName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/py.typed b/sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/py.typed similarity index 100% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/py.typed rename to sdk/chaos/azure-mgmt-chaos/azure/mgmt/chaos/py.typed diff --git a/sdk/chaos/azure-mgmt-chaos/sdk_packaging.toml b/sdk/chaos/azure-mgmt-chaos/sdk_packaging.toml new file mode 100644 index 000000000000..7b46eafb8d3a --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/sdk_packaging.toml @@ -0,0 +1,9 @@ +[packaging] +package_name = "azure-mgmt-chaos" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Chaos Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true diff --git a/sdk/chaos/azure-mgmt-chaos/setup.cfg b/sdk/chaos/azure-mgmt-chaos/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/chaos/azure-mgmt-chaos/setup.py b/sdk/chaos/azure-mgmt-chaos/setup.py new file mode 100644 index 000000000000..19ab65be205d --- /dev/null +++ b/sdk/chaos/azure-mgmt-chaos/setup.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-chaos" +PACKAGE_PPRINT_NAME = "Chaos Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.6.21', + 'azure-common~=1.1', + 'azure-mgmt-core>=1.2.0,<2.0.0', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +) diff --git a/sdk/chaos/ci.yml b/sdk/chaos/ci.yml new file mode 100644 index 000000000000..fa30d2a9d064 --- /dev/null +++ b/sdk/chaos/ci.yml @@ -0,0 +1,33 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/chaos/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/chaos/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: chaos + Artifacts: + - name: azure-mgmt-chaos + safeName: azuremgmtchaos diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/CHANGELOG.md b/sdk/cognitivelanguage/azure-ai-language-conversations/CHANGELOG.md index f0d9f184e050..190fa5691ccd 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/CHANGELOG.md +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/CHANGELOG.md @@ -1,6 +1,16 @@ # Release History -## 1.0.0b1 (unreleased) +## 1.0.0b2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0b1 (2021-11-03) ### Features Added * Initial release diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/README.md b/sdk/cognitivelanguage/azure-ai-language-conversations/README.md index 14106ed8a3fd..11d5de2c2ba7 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/README.md +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/README.md @@ -2,11 +2,11 @@ # Azure Conversational Language Understanding client library for Python Conversational Language Understanding, aka **CLU** for short, is a cloud-based conversational AI service which is mainly used in bots to extract useful information from user utterance (natural language processing). -The CLU **analyze api** encompasses two projects; deepstack, and workflow projects. -You can use the "deepstack" project if you want to extract intents (intention behind a user utterance] and custom entities. -You can also use the "workflow" project which orchestrates multiple language apps to get the best response (language apps like Question Answering, Luis, and Deepstack). +The CLU **analyze api** encompasses two projects; conversation, and orchestration projects. +You can use the "conversation" project if you want to extract intents (intention behind a user utterance) and custom entities. +You can also use the "orchestration" project which orchestrates multiple language apps to get the best response (language apps like Question Answering, Luis, and Conversation). -[Source code][conversationallanguage_client_src] | [Package (PyPI)][conversationallanguage_pypi_package] | [API reference documentation][conversationallanguage_refdocs] | [Product documentation][conversationallanguage_docs] | [Samples][conversationallanguage_samples] +[Source code][conversationallanguage_client_src] | [Package (PyPI)][conversationallanguage_pypi_package] | [API reference documentation][api_reference_documentation] | [Product documentation][conversationallanguage_docs] | [Samples][conversationallanguage_samples] ## _Disclaimer_ @@ -67,8 +67,8 @@ The `azure-ai-language-conversation` client library provides both synchronous an The following examples show common scenarios using the `client` [created above](#create-conversationanalysisclient). -### Analyze a conversation with a Deepstack App -If you would like to extract custom intents and entities from a user utterance, you can call the `client.analyze_conversations()` method with your deepstack's project name as follows: +### Analyze a conversation with a Conversation App +If you would like to extract custom intents and entities from a user utterance, you can call the `client.analyze_conversations()` method with your conversation's project name as follows: ```python # import libraries @@ -76,7 +76,7 @@ import os from azure.core.credentials import AzureKeyCredential from azure.ai.language.conversations import ConversationAnalysisClient -from azure.ai.language.conversations.models import AnalyzeConversationOptions +from azure.ai.language.conversations.models import ConversationAnalysisOptions # get secrets conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] @@ -85,7 +85,7 @@ conv_project = os.environ["AZURE_CONVERSATIONS_PROJECT"] # prepare data query = "One california maki please." -input = AnalyzeConversationOptions( +input = ConversationAnalysisOptions( query=query ) @@ -103,7 +103,7 @@ print("query: {}".format(result.query)) print("project kind: {}\n".format(result.prediction.project_kind)) print("view top intent:") -print("top intent: {}".format(result.prediction.top_intent)) +print("\ttop intent: {}".format(result.prediction.top_intent)) print("\tcategory: {}".format(result.prediction.intents[0].category)) print("\tconfidence score: {}\n".format(result.prediction.intents[0].confidence_score)) @@ -114,9 +114,9 @@ for entity in result.prediction.entities: print("\tconfidence score: {}".format(entity.confidence_score)) ``` -### Analyze conversation with a Workflow App +### Analyze conversation with a Orchestration App -If you would like to pass the user utterance to your orchestrator (worflow) app, you can call the `client.analyze_conversations()` method with your workflow's project name. The orchestrator project simply orchestrates the submitted user utterance between your language apps (Luis, Deepstack, and Question Answering) to get the best response according to the user intent. See the next example: +If you would like to pass the user utterance to your orchestrator (worflow) app, you can call the `client.analyze_conversations()` method with your orchestration's project name. The orchestrator project simply orchestrates the submitted user utterance between your language apps (Luis, Conversation, and Question Answering) to get the best response according to the user intent. See the next example: ```python # import libraries @@ -124,16 +124,16 @@ import os from azure.core.credentials import AzureKeyCredential from azure.ai.language.conversations import ConversationAnalysisClient -from azure.ai.language.conversations.models import AnalyzeConversationOptions +from azure.ai.language.conversations.models import ConversationAnalysisOptions # get secrets conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] -workflow_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT") +orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT") # prepare data query = "How do you make sushi rice?", -input = AnalyzeConversationOptions( +input = ConversationAnalysisOptions( query=query ) @@ -142,7 +142,7 @@ client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) with client: result = client.analyze_conversations( input, - project_name=workflow_project, + project_name=orchestration_project, deployment_name='production', ) @@ -151,7 +151,7 @@ print("query: {}".format(result.query)) print("project kind: {}\n".format(result.prediction.project_kind)) print("view top intent:") -print("top intent: {}".format(result.prediction.top_intent)) +print("\ttop intent: {}".format(result.prediction.top_intent)) print("\tcategory: {}".format(result.prediction.intents[0].category)) print("\tconfidence score: {}\n".format(result.prediction.intents[0].confidence_score)) @@ -159,9 +159,9 @@ print("view Question Answering result:") print("\tresult: {}\n".format(result.prediction.intents[0].result)) ``` -### Analyze conversation with a Workflow (Direct) App +### Analyze conversation with a Orchestration (Direct) App -If you would like to use an orchestrator (workflow) app, and you want to call a specific one of your language apps directly, you can call the `client.analyze_conversations()` method with your workflow's project name and the diirect target name which corresponds to your one of you language apps as follows: +If you would like to use an orchestrator (orchestration) app, and you want to call a specific one of your language apps directly, you can call the `client.analyze_conversations()` method with your orchestration's project name and the diirect target name which corresponds to your one of you language apps as follows: ```python # import libraries @@ -169,17 +169,17 @@ import os from azure.core.credentials import AzureKeyCredential from azure.ai.language.conversations import ConversationAnalysisClient -from azure.ai.language.conversations.models import AnalyzeConversationOptions +from azure.ai.language.conversations.models import ConversationAnalysisOptions # get secrets conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] -workflow_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT") +orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT") # prepare data query = "How do you make sushi rice?", target_intent = "SushiMaking" -input = AnalyzeConversationOptions( +input = ConversationAnalysisOptions( query=query, direct_target=target_intent, parameters={ @@ -198,7 +198,7 @@ client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) with client: result = client.analyze_conversations( input, - project_name=workflow_project, + project_name=orchestration_project, deployment_name='production', ) @@ -207,7 +207,7 @@ print("query: {}".format(result.query)) print("project kind: {}\n".format(result.prediction.project_kind)) print("view top intent:") -print("top intent: {}".format(result.prediction.top_intent)) +print("\ttop intent: {}".format(result.prediction.top_intent)) print("\tcategory: {}".format(result.prediction.intents[0].category)) print("\tconfidence score: {}\n".format(result.prediction.intents[0].confidence_score)) @@ -295,9 +295,10 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [azure_core_readme]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md [pip_link]:https://pypi.org/project/pip/ [conversationallanguage_client_src]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations -[conversationallanguage_pypi_package]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations +[conversationallanguage_pypi_package]: https://pypi.org/project/azure-ai-language-conversations/ +[api_reference_documentation]:https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-conversations/latest/azure.ai.language.conversations.html [conversationallanguage_refdocs]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations -[conversationallanguage_docs]: https://azure.microsoft.com/services/cognitive-services/language-understanding-intelligent-service/ +[conversationallanguage_docs]: https://docs.microsoft.com/azure/cognitive-services/language-service/conversational-language-understanding/overview [conversationallanguage_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/README.md [conversationanalysis_client_class]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_conversation_analysis_client.py [azure_core_exceptions]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_configuration.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_configuration.py index 12a99c2f6eed..ff94c8b5d93b 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_configuration.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_configuration.py @@ -47,7 +47,7 @@ def __init__( self.endpoint = endpoint self.credential = credential - self.api_version = "2021-07-15-preview" + self.api_version = "2021-11-01-preview" kwargs.setdefault('sdk_moniker', 'ai-language-conversations/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_version.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_version.py index e5754a47ce68..dfa6ee022f15 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_version.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0b2" diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_configuration.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_configuration.py index 7dc15b360c92..c478d8965c08 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_configuration.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/_configuration.py @@ -41,7 +41,7 @@ def __init__( self.endpoint = endpoint self.credential = credential - self.api_version = "2021-07-15-preview" + self.api_version = "2021-11-01-preview" kwargs.setdefault('sdk_moniker', 'ai-language-conversations/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/operations/_operations.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/operations/_operations.py index d279fae87db2..1531d91022df 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/aio/operations/_operations.py @@ -26,7 +26,7 @@ class ConversationAnalysisClientOperationsMixin: @distributed_trace_async async def analyze_conversations( self, - analyze_conversation_options: "_models.AnalyzeConversationOptions", + conversation_analysis_options: "_models.ConversationAnalysisOptions", *, project_name: str, deployment_name: str, @@ -34,9 +34,9 @@ async def analyze_conversations( ) -> "_models.AnalyzeConversationResult": """Analyzes the input conversation utterance. - :param analyze_conversation_options: Post body of the request. - :type analyze_conversation_options: - ~azure.ai.language.conversations.models.AnalyzeConversationOptions + :param conversation_analysis_options: Post body of the request. + :type conversation_analysis_options: + ~azure.ai.language.conversations.models.ConversationAnalysisOptions :keyword project_name: The name of the project to use. :paramtype project_name: str :keyword deployment_name: The name of the specific deployment of the project to use. @@ -53,7 +53,7 @@ async def analyze_conversations( content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - json = self._serialize.body(analyze_conversation_options, 'AnalyzeConversationOptions') + json = self._serialize.body(conversation_analysis_options, 'ConversationAnalysisOptions') request = build_analyze_conversations_request( content_type=content_type, diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/__init__.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/__init__.py index 69d031432af2..04df4af52f87 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/__init__.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/__init__.py @@ -7,89 +7,99 @@ # -------------------------------------------------------------------------- try: - from ._models_py3 import AnalyzeConversationOptions + from ._models_py3 import AnalysisParameters from ._models_py3 import AnalyzeConversationResult - from ._models_py3 import AnalyzeParameters + from ._models_py3 import AnswerSpan from ._models_py3 import BasePrediction - from ._models_py3 import DSTargetIntentResult - from ._models_py3 import DeepStackEntityResolution - from ._models_py3 import DeepstackCallingOptions - from ._models_py3 import DeepstackEntity - from ._models_py3 import DeepstackIntent - from ._models_py3 import DeepstackParameters - from ._models_py3 import DeepstackPrediction - from ._models_py3 import DeepstackResult - from ._models_py3 import DictionaryNormalizedValueResolution + from ._models_py3 import ConversationAnalysisOptions + from ._models_py3 import ConversationCallingOptions + from ._models_py3 import ConversationEntity + from ._models_py3 import ConversationIntent + from ._models_py3 import ConversationParameters + from ._models_py3 import ConversationPrediction + from ._models_py3 import ConversationResult + from ._models_py3 import ConversationTargetIntentResult from ._models_py3 import Error from ._models_py3 import ErrorResponse from ._models_py3 import InnerErrorModel + from ._models_py3 import KnowledgeBaseAnswer + from ._models_py3 import KnowledgeBaseAnswerDialog + from ._models_py3 import KnowledgeBaseAnswerPrompt + from ._models_py3 import KnowledgeBaseAnswers from ._models_py3 import LUISCallingOptions from ._models_py3 import LUISParameters from ._models_py3 import LUISTargetIntentResult + from ._models_py3 import NoneLinkedTargetIntentResult + from ._models_py3 import OrchestratorPrediction from ._models_py3 import QuestionAnsweringParameters from ._models_py3 import QuestionAnsweringTargetIntentResult from ._models_py3 import TargetIntentResult - from ._models_py3 import WorkflowPrediction except (SyntaxError, ImportError): - from ._models import AnalyzeConversationOptions # type: ignore + from ._models import AnalysisParameters # type: ignore from ._models import AnalyzeConversationResult # type: ignore - from ._models import AnalyzeParameters # type: ignore + from ._models import AnswerSpan # type: ignore from ._models import BasePrediction # type: ignore - from ._models import DSTargetIntentResult # type: ignore - from ._models import DeepStackEntityResolution # type: ignore - from ._models import DeepstackCallingOptions # type: ignore - from ._models import DeepstackEntity # type: ignore - from ._models import DeepstackIntent # type: ignore - from ._models import DeepstackParameters # type: ignore - from ._models import DeepstackPrediction # type: ignore - from ._models import DeepstackResult # type: ignore - from ._models import DictionaryNormalizedValueResolution # type: ignore + from ._models import ConversationAnalysisOptions # type: ignore + from ._models import ConversationCallingOptions # type: ignore + from ._models import ConversationEntity # type: ignore + from ._models import ConversationIntent # type: ignore + from ._models import ConversationParameters # type: ignore + from ._models import ConversationPrediction # type: ignore + from ._models import ConversationResult # type: ignore + from ._models import ConversationTargetIntentResult # type: ignore from ._models import Error # type: ignore from ._models import ErrorResponse # type: ignore from ._models import InnerErrorModel # type: ignore + from ._models import KnowledgeBaseAnswer # type: ignore + from ._models import KnowledgeBaseAnswerDialog # type: ignore + from ._models import KnowledgeBaseAnswerPrompt # type: ignore + from ._models import KnowledgeBaseAnswers # type: ignore from ._models import LUISCallingOptions # type: ignore from ._models import LUISParameters # type: ignore from ._models import LUISTargetIntentResult # type: ignore + from ._models import NoneLinkedTargetIntentResult # type: ignore + from ._models import OrchestratorPrediction # type: ignore from ._models import QuestionAnsweringParameters # type: ignore from ._models import QuestionAnsweringTargetIntentResult # type: ignore from ._models import TargetIntentResult # type: ignore - from ._models import WorkflowPrediction # type: ignore from ._conversation_analysis_client_enums import ( ErrorCode, InnerErrorCode, ProjectKind, - ResolutionKind, TargetKind, ) __all__ = [ - 'AnalyzeConversationOptions', + 'AnalysisParameters', 'AnalyzeConversationResult', - 'AnalyzeParameters', + 'AnswerSpan', 'BasePrediction', - 'DSTargetIntentResult', - 'DeepStackEntityResolution', - 'DeepstackCallingOptions', - 'DeepstackEntity', - 'DeepstackIntent', - 'DeepstackParameters', - 'DeepstackPrediction', - 'DeepstackResult', - 'DictionaryNormalizedValueResolution', + 'ConversationAnalysisOptions', + 'ConversationCallingOptions', + 'ConversationEntity', + 'ConversationIntent', + 'ConversationParameters', + 'ConversationPrediction', + 'ConversationResult', + 'ConversationTargetIntentResult', 'Error', 'ErrorResponse', 'InnerErrorModel', + 'KnowledgeBaseAnswer', + 'KnowledgeBaseAnswerDialog', + 'KnowledgeBaseAnswerPrompt', + 'KnowledgeBaseAnswers', 'LUISCallingOptions', 'LUISParameters', 'LUISTargetIntentResult', + 'NoneLinkedTargetIntentResult', + 'OrchestratorPrediction', 'QuestionAnsweringParameters', 'QuestionAnsweringTargetIntentResult', 'TargetIntentResult', - 'WorkflowPrediction', 'ErrorCode', 'InnerErrorCode', 'ProjectKind', - 'ResolutionKind', 'TargetKind', ] diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_conversation_analysis_client_enums.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_conversation_analysis_client_enums.py index cdc67ea5d6e5..7446025efa04 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_conversation_analysis_client_enums.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_conversation_analysis_client_enums.py @@ -20,7 +20,13 @@ class ErrorCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): UNAUTHORIZED = "Unauthorized" FORBIDDEN = "Forbidden" NOT_FOUND = "NotFound" + PROJECT_NOT_FOUND = "ProjectNotFound" + OPERATION_NOT_FOUND = "OperationNotFound" + AZURE_COGNITIVE_SEARCH_NOT_FOUND = "AzureCognitiveSearchNotFound" + AZURE_COGNITIVE_SEARCH_INDEX_NOT_FOUND = "AzureCognitiveSearchIndexNotFound" TOO_MANY_REQUESTS = "TooManyRequests" + AZURE_COGNITIVE_SEARCH_THROTTLING = "AzureCognitiveSearchThrottling" + AZURE_COGNITIVE_SEARCH_INDEX_LIMIT_REACHED = "AzureCognitiveSearchIndexLimitReached" INTERNAL_SERVER_ERROR = "InternalServerError" SERVICE_UNAVAILABLE = "ServiceUnavailable" @@ -42,17 +48,11 @@ class ProjectKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): CONVERSATION = "conversation" WORKFLOW = "workflow" -class ResolutionKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """The type of an entity resolution. - """ - - #: Dictionary normalized entities. - DICTIONARY_NORMALIZED_VALUE = "DictionaryNormalizedValue" - class TargetKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The type of a target service. """ LUIS = "luis" - LUIS_DEEPSTACK = "luis_deepstack" + CONVERSATION = "conversation" QUESTION_ANSWERING = "question_answering" + NON_LINKED = "non_linked" diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_models.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_models.py index fd2c107aae65..aa651cbf3338 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_models.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_models.py @@ -10,38 +10,32 @@ import msrest.serialization -class AnalyzeConversationOptions(msrest.serialization.Model): - """The request body. +class AnalysisParameters(msrest.serialization.Model): + """This is the parameter set of either the Orchestration project itself or one of the target services. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ConversationParameters, LUISParameters, QuestionAnsweringParameters. All required parameters must be populated in order to send to Azure. - :ivar query: Required. The conversation utterance to be analyzed. - :vartype query: str - :ivar direct_target: The name of the target project this request is sending to directly. - :vartype direct_target: str - :ivar language: The language to use in this request. This will be the language setting when - communicating with all other target projects. - :vartype language: str - :ivar verbose: If true, the service will return more detailed information in the response. - :vartype verbose: bool - :ivar is_logging_enabled: If true, the query will be kept by the service for customers to - further review, to improve the model quality. - :vartype is_logging_enabled: bool - :ivar parameters: A dictionary representing the input for each target project. - :vartype parameters: dict[str, ~azure.ai.language.conversations.models.AnalyzeParameters] + :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible + values include: "luis", "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind + :ivar api_version: The API version to use when call a specific target service. + :vartype api_version: str """ _validation = { - 'query': {'required': True}, + 'target_kind': {'required': True}, } _attribute_map = { - 'query': {'key': 'query', 'type': 'str'}, - 'direct_target': {'key': 'directTarget', 'type': 'str'}, - 'language': {'key': 'language', 'type': 'str'}, - 'verbose': {'key': 'verbose', 'type': 'bool'}, - 'is_logging_enabled': {'key': 'isLoggingEnabled', 'type': 'bool'}, - 'parameters': {'key': 'parameters', 'type': '{AnalyzeParameters}'}, + 'target_kind': {'key': 'targetKind', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + } + + _subtype_map = { + 'target_kind': {'conversation': 'ConversationParameters', 'luis': 'LUISParameters', 'question_answering': 'QuestionAnsweringParameters'} } def __init__( @@ -49,28 +43,12 @@ def __init__( **kwargs ): """ - :keyword query: Required. The conversation utterance to be analyzed. - :paramtype query: str - :keyword direct_target: The name of the target project this request is sending to directly. - :paramtype direct_target: str - :keyword language: The language to use in this request. This will be the language setting when - communicating with all other target projects. - :paramtype language: str - :keyword verbose: If true, the service will return more detailed information in the response. - :paramtype verbose: bool - :keyword is_logging_enabled: If true, the query will be kept by the service for customers to - further review, to improve the model quality. - :paramtype is_logging_enabled: bool - :keyword parameters: A dictionary representing the input for each target project. - :paramtype parameters: dict[str, ~azure.ai.language.conversations.models.AnalyzeParameters] + :keyword api_version: The API version to use when call a specific target service. + :paramtype api_version: str """ - super(AnalyzeConversationOptions, self).__init__(**kwargs) - self.query = kwargs['query'] - self.direct_target = kwargs.get('direct_target', None) - self.language = kwargs.get('language', None) - self.verbose = kwargs.get('verbose', None) - self.is_logging_enabled = kwargs.get('is_logging_enabled', None) - self.parameters = kwargs.get('parameters', None) + super(AnalysisParameters, self).__init__(**kwargs) + self.target_kind = None # type: Optional[str] + self.api_version = kwargs.get('api_version', None) class AnalyzeConversationResult(msrest.serialization.Model): @@ -115,32 +93,28 @@ def __init__( self.prediction = kwargs['prediction'] -class AnalyzeParameters(msrest.serialization.Model): - """This is the parameter set of either the conversation application itself or one of the target services. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LUISParameters, DeepstackParameters, QuestionAnsweringParameters. +class AnswerSpan(msrest.serialization.Model): + """Answer span object of QnA. - All required parameters must be populated in order to send to Azure. - - :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible - values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind - :ivar api_version: The API version to use when call a specific target service. - :vartype api_version: str + :ivar text: Predicted text of answer span. + :vartype text: str + :ivar confidence_score: Predicted score of answer span, value ranges from 0 to 1. + :vartype confidence_score: float + :ivar offset: The answer span offset from the start of answer. + :vartype offset: int + :ivar length: The length of the answer span. + :vartype length: int """ _validation = { - 'target_kind': {'required': True}, + 'confidence_score': {'maximum': 1, 'minimum': 0}, } _attribute_map = { - 'target_kind': {'key': 'targetKind', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - } - - _subtype_map = { - 'target_kind': {'luis': 'LUISParameters', 'luis_deepstack': 'DeepstackParameters', 'question_answering': 'QuestionAnsweringParameters'} + 'text': {'key': 'text', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, } def __init__( @@ -148,27 +122,35 @@ def __init__( **kwargs ): """ - :keyword api_version: The API version to use when call a specific target service. - :paramtype api_version: str + :keyword text: Predicted text of answer span. + :paramtype text: str + :keyword confidence_score: Predicted score of answer span, value ranges from 0 to 1. + :paramtype confidence_score: float + :keyword offset: The answer span offset from the start of answer. + :paramtype offset: int + :keyword length: The length of the answer span. + :paramtype length: int """ - super(AnalyzeParameters, self).__init__(**kwargs) - self.target_kind = None # type: Optional[str] - self.api_version = kwargs.get('api_version', None) + super(AnswerSpan, self).__init__(**kwargs) + self.text = kwargs.get('text', None) + self.confidence_score = kwargs.get('confidence_score', None) + self.offset = kwargs.get('offset', None) + self.length = kwargs.get('length', None) class BasePrediction(msrest.serialization.Model): """This is the base class of prediction. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeepstackPrediction, WorkflowPrediction. + sub-classes are: ConversationPrediction, OrchestratorPrediction. All required parameters must be populated in order to send to Azure. - :ivar top_intent: The intent with the highest score. - :vartype top_intent: str :ivar project_kind: Required. The type of the project.Constant filled by server. Possible values include: "conversation", "workflow". :vartype project_kind: str or ~azure.ai.language.conversations.models.ProjectKind + :ivar top_intent: The intent with the highest score. + :vartype top_intent: str """ _validation = { @@ -176,12 +158,12 @@ class BasePrediction(msrest.serialization.Model): } _attribute_map = { + 'project_kind': {'key': 'projectKind', 'type': 'str'}, 'top_intent': {'key': 'topIntent', 'type': 'str'}, - 'project_kind': {'key': 'projectType', 'type': 'str'}, } _subtype_map = { - 'project_kind': {'conversation': 'DeepstackPrediction', 'workflow': 'WorkflowPrediction'} + 'project_kind': {'conversation': 'ConversationPrediction', 'workflow': 'OrchestratorPrediction'} } def __init__( @@ -193,12 +175,75 @@ def __init__( :paramtype top_intent: str """ super(BasePrediction, self).__init__(**kwargs) - self.top_intent = kwargs.get('top_intent', None) self.project_kind = None # type: Optional[str] + self.top_intent = kwargs.get('top_intent', None) + + +class ConversationAnalysisOptions(msrest.serialization.Model): + """The request body. + + All required parameters must be populated in order to send to Azure. + + :ivar query: Required. The conversation utterance to be analyzed. + :vartype query: str + :ivar direct_target: The name of the target project this request is sending to directly. + :vartype direct_target: str + :ivar language: The language to use in this request. This will be the language setting when + communicating with all other target projects. + :vartype language: str + :ivar verbose: If true, the service will return more detailed information in the response. + :vartype verbose: bool + :ivar is_logging_enabled: If true, the query will be kept by the service for customers to + further review, to improve the model quality. + :vartype is_logging_enabled: bool + :ivar parameters: A dictionary representing the input for each target project. + :vartype parameters: dict[str, ~azure.ai.language.conversations.models.AnalysisParameters] + """ + _validation = { + 'query': {'required': True}, + } -class DeepstackCallingOptions(msrest.serialization.Model): - """The option to set to call a LUIS Deepstack project. + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'direct_target': {'key': 'directTarget', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'verbose': {'key': 'verbose', 'type': 'bool'}, + 'is_logging_enabled': {'key': 'isLoggingEnabled', 'type': 'bool'}, + 'parameters': {'key': 'parameters', 'type': '{AnalysisParameters}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword query: Required. The conversation utterance to be analyzed. + :paramtype query: str + :keyword direct_target: The name of the target project this request is sending to directly. + :paramtype direct_target: str + :keyword language: The language to use in this request. This will be the language setting when + communicating with all other target projects. + :paramtype language: str + :keyword verbose: If true, the service will return more detailed information in the response. + :paramtype verbose: bool + :keyword is_logging_enabled: If true, the query will be kept by the service for customers to + further review, to improve the model quality. + :paramtype is_logging_enabled: bool + :keyword parameters: A dictionary representing the input for each target project. + :paramtype parameters: dict[str, ~azure.ai.language.conversations.models.AnalysisParameters] + """ + super(ConversationAnalysisOptions, self).__init__(**kwargs) + self.query = kwargs['query'] + self.direct_target = kwargs.get('direct_target', None) + self.language = kwargs.get('language', None) + self.verbose = kwargs.get('verbose', None) + self.is_logging_enabled = kwargs.get('is_logging_enabled', None) + self.parameters = kwargs.get('parameters', None) + + +class ConversationCallingOptions(msrest.serialization.Model): + """The option to set to call a Conversation project. :ivar language: The language of the query. :vartype language: str @@ -228,14 +273,14 @@ def __init__( in authoring, to improve the model quality. :paramtype is_logging_enabled: bool """ - super(DeepstackCallingOptions, self).__init__(**kwargs) + super(ConversationCallingOptions, self).__init__(**kwargs) self.language = kwargs.get('language', None) self.verbose = kwargs.get('verbose', None) self.is_logging_enabled = kwargs.get('is_logging_enabled', None) -class DeepstackEntity(msrest.serialization.Model): - """The entity extraction result of a LUIS Deepstack project. +class ConversationEntity(msrest.serialization.Model): + """The entity extraction result of a Conversation project. All required parameters must be populated in order to send to Azure. @@ -249,8 +294,8 @@ class DeepstackEntity(msrest.serialization.Model): :vartype length: int :ivar confidence_score: Required. The entity confidence score. :vartype confidence_score: float - :ivar resolution: A array with extra information about the entity. - :vartype resolution: list[~azure.ai.language.conversations.models.DeepStackEntityResolution] + :ivar list_keys: List of keys. + :vartype list_keys: list[str] """ _validation = { @@ -267,7 +312,7 @@ class DeepstackEntity(msrest.serialization.Model): 'offset': {'key': 'offset', 'type': 'int'}, 'length': {'key': 'length', 'type': 'int'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'resolution': {'key': 'resolution', 'type': '[DeepStackEntityResolution]'}, + 'list_keys': {'key': 'listKeys', 'type': '[str]'}, } def __init__( @@ -285,59 +330,20 @@ def __init__( :paramtype length: int :keyword confidence_score: Required. The entity confidence score. :paramtype confidence_score: float - :keyword resolution: A array with extra information about the entity. - :paramtype resolution: list[~azure.ai.language.conversations.models.DeepStackEntityResolution] + :keyword list_keys: List of keys. + :paramtype list_keys: list[str] """ - super(DeepstackEntity, self).__init__(**kwargs) + super(ConversationEntity, self).__init__(**kwargs) self.category = kwargs['category'] self.text = kwargs['text'] self.offset = kwargs['offset'] self.length = kwargs['length'] self.confidence_score = kwargs['confidence_score'] - self.resolution = kwargs.get('resolution', None) - - -class DeepStackEntityResolution(msrest.serialization.Model): - """This is the base class of all kinds of entity resolutions. - - All required parameters must be populated in order to send to Azure. - - :ivar additional_properties: Unmatched properties from the message are deserialized to this - collection. - :vartype additional_properties: dict[str, any] - :ivar resolution_kind: Required. The type of an entity resolution. Possible values include: - "DictionaryNormalizedValue". - :vartype resolution_kind: str or ~azure.ai.language.conversations.models.ResolutionKind - """ + self.list_keys = kwargs.get('list_keys', None) - _validation = { - 'resolution_kind': {'required': True}, - } - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'resolution_kind': {'key': 'resolutionKind', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - :keyword resolution_kind: Required. The type of an entity resolution. Possible values include: - "DictionaryNormalizedValue". - :paramtype resolution_kind: str or ~azure.ai.language.conversations.models.ResolutionKind - """ - super(DeepStackEntityResolution, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.resolution_kind = kwargs['resolution_kind'] - - -class DeepstackIntent(msrest.serialization.Model): - """The intent classification result of a LUIS Deepstack project. +class ConversationIntent(msrest.serialization.Model): + """The intent classification result of a Conversation project. All required parameters must be populated in order to send to Azure. @@ -367,23 +373,23 @@ def __init__( :keyword confidence_score: Required. The confidence score of the class from 0.0 to 1.0. :paramtype confidence_score: float """ - super(DeepstackIntent, self).__init__(**kwargs) + super(ConversationIntent, self).__init__(**kwargs) self.category = kwargs['category'] self.confidence_score = kwargs['confidence_score'] -class DeepstackParameters(AnalyzeParameters): - """This is a set of request parameters for LUIS Deepstack projects. +class ConversationParameters(AnalysisParameters): + """This is a set of request parameters for Customized Conversation projects. All required parameters must be populated in order to send to Azure. :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible - values include: "luis", "luis_deepstack", "question_answering". + values include: "luis", "conversation", "question_answering", "non_linked". :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version to use when call a specific target service. :vartype api_version: str - :ivar calling_options: The option to set to call a LUIS Deepstack project. - :vartype calling_options: ~azure.ai.language.conversations.models.DeepstackCallingOptions + :ivar calling_options: The option to set to call a Conversation project. + :vartype calling_options: ~azure.ai.language.conversations.models.ConversationCallingOptions """ _validation = { @@ -393,7 +399,7 @@ class DeepstackParameters(AnalyzeParameters): _attribute_map = { 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'calling_options': {'key': 'callingOptions', 'type': 'DeepstackCallingOptions'}, + 'calling_options': {'key': 'callingOptions', 'type': 'ConversationCallingOptions'}, } def __init__( @@ -403,28 +409,28 @@ def __init__( """ :keyword api_version: The API version to use when call a specific target service. :paramtype api_version: str - :keyword calling_options: The option to set to call a LUIS Deepstack project. - :paramtype calling_options: ~azure.ai.language.conversations.models.DeepstackCallingOptions + :keyword calling_options: The option to set to call a Conversation project. + :paramtype calling_options: ~azure.ai.language.conversations.models.ConversationCallingOptions """ - super(DeepstackParameters, self).__init__(**kwargs) - self.target_kind = 'luis_deepstack' # type: str + super(ConversationParameters, self).__init__(**kwargs) + self.target_kind = 'conversation' # type: str self.calling_options = kwargs.get('calling_options', None) -class DeepstackPrediction(BasePrediction): - """Represents the prediction section of a LUIS Deepstack project. +class ConversationPrediction(BasePrediction): + """Represents the prediction section of a Conversation project. All required parameters must be populated in order to send to Azure. - :ivar top_intent: The intent with the highest score. - :vartype top_intent: str :ivar project_kind: Required. The type of the project.Constant filled by server. Possible values include: "conversation", "workflow". :vartype project_kind: str or ~azure.ai.language.conversations.models.ProjectKind + :ivar top_intent: The intent with the highest score. + :vartype top_intent: str :ivar intents: Required. The intent classification results. - :vartype intents: list[~azure.ai.language.conversations.models.DeepstackIntent] + :vartype intents: list[~azure.ai.language.conversations.models.ConversationIntent] :ivar entities: Required. The entity extraction results. - :vartype entities: list[~azure.ai.language.conversations.models.DeepstackEntity] + :vartype entities: list[~azure.ai.language.conversations.models.ConversationEntity] """ _validation = { @@ -434,10 +440,10 @@ class DeepstackPrediction(BasePrediction): } _attribute_map = { + 'project_kind': {'key': 'projectKind', 'type': 'str'}, 'top_intent': {'key': 'topIntent', 'type': 'str'}, - 'project_kind': {'key': 'projectType', 'type': 'str'}, - 'intents': {'key': 'intents', 'type': '[DeepstackIntent]'}, - 'entities': {'key': 'entities', 'type': '[DeepstackEntity]'}, + 'intents': {'key': 'intents', 'type': '[ConversationIntent]'}, + 'entities': {'key': 'entities', 'type': '[ConversationEntity]'}, } def __init__( @@ -448,18 +454,18 @@ def __init__( :keyword top_intent: The intent with the highest score. :paramtype top_intent: str :keyword intents: Required. The intent classification results. - :paramtype intents: list[~azure.ai.language.conversations.models.DeepstackIntent] + :paramtype intents: list[~azure.ai.language.conversations.models.ConversationIntent] :keyword entities: Required. The entity extraction results. - :paramtype entities: list[~azure.ai.language.conversations.models.DeepstackEntity] + :paramtype entities: list[~azure.ai.language.conversations.models.ConversationEntity] """ - super(DeepstackPrediction, self).__init__(**kwargs) + super(ConversationPrediction, self).__init__(**kwargs) self.project_kind = 'conversation' # type: str self.intents = kwargs['intents'] self.entities = kwargs['entities'] -class DeepstackResult(msrest.serialization.Model): - """The response returned by a LUIS Deepstack project. +class ConversationResult(msrest.serialization.Model): + """The response returned by a Conversation project. All required parameters must be populated in order to send to Azure. @@ -468,7 +474,7 @@ class DeepstackResult(msrest.serialization.Model): :ivar detected_language: The detected language from the query. :vartype detected_language: str :ivar prediction: Required. The predicted result for the query. - :vartype prediction: ~azure.ai.language.conversations.models.DeepstackPrediction + :vartype prediction: ~azure.ai.language.conversations.models.ConversationPrediction """ _validation = { @@ -479,7 +485,7 @@ class DeepstackResult(msrest.serialization.Model): _attribute_map = { 'query': {'key': 'query', 'type': 'str'}, 'detected_language': {'key': 'detectedLanguage', 'type': 'str'}, - 'prediction': {'key': 'prediction', 'type': 'DeepstackPrediction'}, + 'prediction': {'key': 'prediction', 'type': 'ConversationPrediction'}, } def __init__( @@ -492,89 +498,45 @@ def __init__( :keyword detected_language: The detected language from the query. :paramtype detected_language: str :keyword prediction: Required. The predicted result for the query. - :paramtype prediction: ~azure.ai.language.conversations.models.DeepstackPrediction + :paramtype prediction: ~azure.ai.language.conversations.models.ConversationPrediction """ - super(DeepstackResult, self).__init__(**kwargs) + super(ConversationResult, self).__init__(**kwargs) self.query = kwargs['query'] self.detected_language = kwargs.get('detected_language', None) self.prediction = kwargs['prediction'] -class DictionaryNormalizedValueResolution(DeepStackEntityResolution): - """The DictionaryNormalizedValue resolution indicates entity values are extracted from a predefined dictionary. For example, Coca could be a normalized name for Coca-Cola. - - All required parameters must be populated in order to send to Azure. - - :ivar additional_properties: Unmatched properties from the message are deserialized to this - collection. - :vartype additional_properties: dict[str, any] - :ivar resolution_kind: Required. The type of an entity resolution. Possible values include: - "DictionaryNormalizedValue". - :vartype resolution_kind: str or ~azure.ai.language.conversations.models.ResolutionKind - :ivar values: A list of normalized entities. - :vartype values: list[str] - """ - - _validation = { - 'resolution_kind': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'resolution_kind': {'key': 'resolutionKind', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - :keyword resolution_kind: Required. The type of an entity resolution. Possible values include: - "DictionaryNormalizedValue". - :paramtype resolution_kind: str or ~azure.ai.language.conversations.models.ResolutionKind - :keyword values: A list of normalized entities. - :paramtype values: list[str] - """ - super(DictionaryNormalizedValueResolution, self).__init__(**kwargs) - self.values = kwargs.get('values', None) - - class TargetIntentResult(msrest.serialization.Model): """This is the base class of an intent prediction. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LUISTargetIntentResult, DSTargetIntentResult, QuestionAnsweringTargetIntentResult. + sub-classes are: ConversationTargetIntentResult, LUISTargetIntentResult, NoneLinkedTargetIntentResult, QuestionAnsweringTargetIntentResult. All required parameters must be populated in order to send to Azure. + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version used to call a target service. :vartype api_version: str - :ivar confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :vartype confidence_score: float - :ivar target_kind: Required. This discriminator property specifies the type of the target - project that returns the response. 'luis' means the type is LUIS Generally Available. - 'luis_deepstack' means LUIS vNext. 'question_answering' means Question Answering.Constant - filled by server. Possible values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind """ _validation = { - 'confidence_score': {'maximum': 1, 'minimum': 0}, 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, } _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'target_kind': {'key': 'targetType', 'type': 'str'}, } _subtype_map = { - 'target_kind': {'luis': 'LUISTargetIntentResult', 'luis_deepstack': 'DSTargetIntentResult', 'question_answering': 'QuestionAnsweringTargetIntentResult'} + 'target_kind': {'conversation': 'ConversationTargetIntentResult', 'luis': 'LUISTargetIntentResult', 'non_linked': 'NoneLinkedTargetIntentResult', 'question_answering': 'QuestionAnsweringTargetIntentResult'} } def __init__( @@ -584,43 +546,42 @@ def __init__( """ :keyword api_version: The API version used to call a target service. :paramtype api_version: str - :keyword confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :paramtype confidence_score: float """ super(TargetIntentResult, self).__init__(**kwargs) - self.api_version = kwargs.get('api_version', None) - self.confidence_score = kwargs.get('confidence_score', None) self.target_kind = None # type: Optional[str] + self.api_version = kwargs.get('api_version', None) + self.confidence_score = kwargs['confidence_score'] -class DSTargetIntentResult(TargetIntentResult): - """A wrap up of LUIS Deepstack response. +class ConversationTargetIntentResult(TargetIntentResult): + """A wrap up of Conversation project response. All required parameters must be populated in order to send to Azure. + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version used to call a target service. :vartype api_version: str - :ivar confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :vartype confidence_score: float - :ivar target_kind: Required. This discriminator property specifies the type of the target - project that returns the response. 'luis' means the type is LUIS Generally Available. - 'luis_deepstack' means LUIS vNext. 'question_answering' means Question Answering.Constant - filled by server. Possible values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind - :ivar result: The actual response from a LUIS Deepstack application. - :vartype result: ~azure.ai.language.conversations.models.DeepstackResult + :ivar result: The actual response from a Conversation project. + :vartype result: ~azure.ai.language.conversations.models.ConversationResult """ _validation = { - 'confidence_score': {'maximum': 1, 'minimum': 0}, 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, } _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'target_kind': {'key': 'targetType', 'type': 'str'}, - 'result': {'key': 'result', 'type': 'DeepstackResult'}, + 'result': {'key': 'result', 'type': 'ConversationResult'}, } def __init__( @@ -630,13 +591,13 @@ def __init__( """ :keyword api_version: The API version used to call a target service. :paramtype api_version: str - :keyword confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :paramtype confidence_score: float - :keyword result: The actual response from a LUIS Deepstack application. - :paramtype result: ~azure.ai.language.conversations.models.DeepstackResult + :keyword result: The actual response from a Conversation project. + :paramtype result: ~azure.ai.language.conversations.models.ConversationResult """ - super(DSTargetIntentResult, self).__init__(**kwargs) - self.target_kind = 'luis_deepstack' # type: str + super(ConversationTargetIntentResult, self).__init__(**kwargs) + self.target_kind = 'conversation' # type: str self.result = kwargs.get('result', None) @@ -647,7 +608,9 @@ class Error(msrest.serialization.Model): :ivar code: Required. One of a server-defined set of error codes. Possible values include: "InvalidRequest", "InvalidArgument", "Unauthorized", "Forbidden", "NotFound", - "TooManyRequests", "InternalServerError", "ServiceUnavailable". + "ProjectNotFound", "OperationNotFound", "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", "TooManyRequests", "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", "InternalServerError", "ServiceUnavailable". :vartype code: str or ~azure.ai.language.conversations.models.ErrorCode :ivar message: Required. A human-readable representation of the error. :vartype message: str @@ -680,7 +643,9 @@ def __init__( """ :keyword code: Required. One of a server-defined set of error codes. Possible values include: "InvalidRequest", "InvalidArgument", "Unauthorized", "Forbidden", "NotFound", - "TooManyRequests", "InternalServerError", "ServiceUnavailable". + "ProjectNotFound", "OperationNotFound", "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", "TooManyRequests", "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", "InternalServerError", "ServiceUnavailable". :paramtype code: str or ~azure.ai.language.conversations.models.ErrorCode :keyword message: Required. A human-readable representation of the error. :paramtype message: str @@ -783,6 +748,176 @@ def __init__( self.innererror = kwargs.get('innererror', None) +class KnowledgeBaseAnswer(msrest.serialization.Model): + """Represents knowledge base answer. + + :ivar questions: List of questions associated with the answer. + :vartype questions: list[str] + :ivar answer: Answer text. + :vartype answer: str + :ivar confidence_score: Answer confidence score, value ranges from 0 to 1. + :vartype confidence_score: float + :ivar id: ID of the QnA result. + :vartype id: int + :ivar source: Source of QnA result. + :vartype source: str + :ivar metadata: Metadata associated with the answer, useful to categorize or filter question + answers. + :vartype metadata: dict[str, str] + :ivar dialog: Dialog associated with Answer. + :vartype dialog: ~azure.ai.language.conversations.models.KnowledgeBaseAnswerDialog + :ivar answer_span: Answer span object of QnA with respect to user's question. + :vartype answer_span: ~azure.ai.language.conversations.models.AnswerSpan + """ + + _validation = { + 'confidence_score': {'maximum': 1, 'minimum': 0}, + } + + _attribute_map = { + 'questions': {'key': 'questions', 'type': '[str]'}, + 'answer': {'key': 'answer', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'id': {'key': 'id', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': '{str}'}, + 'dialog': {'key': 'dialog', 'type': 'KnowledgeBaseAnswerDialog'}, + 'answer_span': {'key': 'answerSpan', 'type': 'AnswerSpan'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword questions: List of questions associated with the answer. + :paramtype questions: list[str] + :keyword answer: Answer text. + :paramtype answer: str + :keyword confidence_score: Answer confidence score, value ranges from 0 to 1. + :paramtype confidence_score: float + :keyword id: ID of the QnA result. + :paramtype id: int + :keyword source: Source of QnA result. + :paramtype source: str + :keyword metadata: Metadata associated with the answer, useful to categorize or filter question + answers. + :paramtype metadata: dict[str, str] + :keyword dialog: Dialog associated with Answer. + :paramtype dialog: ~azure.ai.language.conversations.models.KnowledgeBaseAnswerDialog + :keyword answer_span: Answer span object of QnA with respect to user's question. + :paramtype answer_span: ~azure.ai.language.conversations.models.AnswerSpan + """ + super(KnowledgeBaseAnswer, self).__init__(**kwargs) + self.questions = kwargs.get('questions', None) + self.answer = kwargs.get('answer', None) + self.confidence_score = kwargs.get('confidence_score', None) + self.id = kwargs.get('id', None) + self.source = kwargs.get('source', None) + self.metadata = kwargs.get('metadata', None) + self.dialog = kwargs.get('dialog', None) + self.answer_span = kwargs.get('answer_span', None) + + +class KnowledgeBaseAnswerDialog(msrest.serialization.Model): + """Dialog associated with Answer. + + :ivar is_context_only: To mark if a prompt is relevant only with a previous question or not. If + true, do not include this QnA as search result for queries without context; otherwise, if + false, ignores context and includes this QnA in search result. + :vartype is_context_only: bool + :ivar prompts: List of prompts associated with the answer. + :vartype prompts: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswerPrompt] + """ + + _validation = { + 'prompts': {'max_items': 20, 'min_items': 0}, + } + + _attribute_map = { + 'is_context_only': {'key': 'isContextOnly', 'type': 'bool'}, + 'prompts': {'key': 'prompts', 'type': '[KnowledgeBaseAnswerPrompt]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword is_context_only: To mark if a prompt is relevant only with a previous question or not. + If true, do not include this QnA as search result for queries without context; otherwise, if + false, ignores context and includes this QnA in search result. + :paramtype is_context_only: bool + :keyword prompts: List of prompts associated with the answer. + :paramtype prompts: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswerPrompt] + """ + super(KnowledgeBaseAnswerDialog, self).__init__(**kwargs) + self.is_context_only = kwargs.get('is_context_only', None) + self.prompts = kwargs.get('prompts', None) + + +class KnowledgeBaseAnswerPrompt(msrest.serialization.Model): + """Prompt for an answer. + + :ivar display_order: Index of the prompt - used in ordering of the prompts. + :vartype display_order: int + :ivar qna_id: QnA ID corresponding to the prompt. + :vartype qna_id: int + :ivar display_text: Text displayed to represent a follow up question prompt. + :vartype display_text: str + """ + + _validation = { + 'display_text': {'max_length': 200, 'min_length': 0}, + } + + _attribute_map = { + 'display_order': {'key': 'displayOrder', 'type': 'int'}, + 'qna_id': {'key': 'qnaId', 'type': 'int'}, + 'display_text': {'key': 'displayText', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword display_order: Index of the prompt - used in ordering of the prompts. + :paramtype display_order: int + :keyword qna_id: QnA ID corresponding to the prompt. + :paramtype qna_id: int + :keyword display_text: Text displayed to represent a follow up question prompt. + :paramtype display_text: str + """ + super(KnowledgeBaseAnswerPrompt, self).__init__(**kwargs) + self.display_order = kwargs.get('display_order', None) + self.qna_id = kwargs.get('qna_id', None) + self.display_text = kwargs.get('display_text', None) + + +class KnowledgeBaseAnswers(msrest.serialization.Model): + """Represents List of Question Answers. + + :ivar answers: Represents Answer Result list. + :vartype answers: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswer] + """ + + _attribute_map = { + 'answers': {'key': 'answers', 'type': '[KnowledgeBaseAnswer]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword answers: Represents Answer Result list. + :paramtype answers: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswer] + """ + super(KnowledgeBaseAnswers, self).__init__(**kwargs) + self.answers = kwargs.get('answers', None) + + class LUISCallingOptions(msrest.serialization.Model): """This customizes how the service calls LUIS Generally Available projects. @@ -838,13 +973,13 @@ def __init__( self.bing_spell_check_subscription_key = kwargs.get('bing_spell_check_subscription_key', None) -class LUISParameters(AnalyzeParameters): +class LUISParameters(AnalysisParameters): """This is a set of request parameters for LUIS Generally Available projects. All required parameters must be populated in order to send to Azure. :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible - values include: "luis", "luis_deepstack", "question_answering". + values include: "luis", "conversation", "question_answering", "non_linked". :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version to use when call a specific target service. :vartype api_version: str @@ -898,28 +1033,27 @@ class LUISTargetIntentResult(TargetIntentResult): All required parameters must be populated in order to send to Azure. + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version used to call a target service. :vartype api_version: str - :ivar confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :vartype confidence_score: float - :ivar target_kind: Required. This discriminator property specifies the type of the target - project that returns the response. 'luis' means the type is LUIS Generally Available. - 'luis_deepstack' means LUIS vNext. 'question_answering' means Question Answering.Constant - filled by server. Possible values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar result: The actual response from a LUIS Generally Available application. :vartype result: any """ _validation = { - 'confidence_score': {'maximum': 1, 'minimum': 0}, 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, } _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'target_kind': {'key': 'targetType', 'type': 'str'}, 'result': {'key': 'result', 'type': 'object'}, } @@ -930,7 +1064,7 @@ def __init__( """ :keyword api_version: The API version used to call a target service. :paramtype api_version: str - :keyword confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :paramtype confidence_score: float :keyword result: The actual response from a LUIS Generally Available application. :paramtype result: any @@ -940,13 +1074,103 @@ def __init__( self.result = kwargs.get('result', None) -class QuestionAnsweringParameters(AnalyzeParameters): +class NoneLinkedTargetIntentResult(TargetIntentResult): + """A wrap up of non-linked intent response. + + All required parameters must be populated in order to send to Azure. + + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind + :ivar api_version: The API version used to call a target service. + :vartype api_version: str + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. + :vartype confidence_score: float + :ivar result: The actual response from a Conversation project. + :vartype result: ~azure.ai.language.conversations.models.ConversationResult + """ + + _validation = { + 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, + } + + _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'result': {'key': 'result', 'type': 'ConversationResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword api_version: The API version used to call a target service. + :paramtype api_version: str + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. + :paramtype confidence_score: float + :keyword result: The actual response from a Conversation project. + :paramtype result: ~azure.ai.language.conversations.models.ConversationResult + """ + super(NoneLinkedTargetIntentResult, self).__init__(**kwargs) + self.target_kind = 'non_linked' # type: str + self.result = kwargs.get('result', None) + + +class OrchestratorPrediction(BasePrediction): + """This represents the prediction result of an Orchestrator project. + + All required parameters must be populated in order to send to Azure. + + :ivar project_kind: Required. The type of the project.Constant filled by server. Possible + values include: "conversation", "workflow". + :vartype project_kind: str or ~azure.ai.language.conversations.models.ProjectKind + :ivar top_intent: The intent with the highest score. + :vartype top_intent: str + :ivar intents: Required. A dictionary that contains all intents. A key is an intent name and a + value is its confidence score and target type. The top intent's value also contains the actual + response from the target project. + :vartype intents: dict[str, ~azure.ai.language.conversations.models.TargetIntentResult] + """ + + _validation = { + 'project_kind': {'required': True}, + 'intents': {'required': True}, + } + + _attribute_map = { + 'project_kind': {'key': 'projectKind', 'type': 'str'}, + 'top_intent': {'key': 'topIntent', 'type': 'str'}, + 'intents': {'key': 'intents', 'type': '{TargetIntentResult}'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword top_intent: The intent with the highest score. + :paramtype top_intent: str + :keyword intents: Required. A dictionary that contains all intents. A key is an intent name and + a value is its confidence score and target type. The top intent's value also contains the + actual response from the target project. + :paramtype intents: dict[str, ~azure.ai.language.conversations.models.TargetIntentResult] + """ + super(OrchestratorPrediction, self).__init__(**kwargs) + self.project_kind = 'workflow' # type: str + self.intents = kwargs['intents'] + + +class QuestionAnsweringParameters(AnalysisParameters): """This is a set of request parameters for Question Answering knowledge bases. All required parameters must be populated in order to send to Azure. :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible - values include: "luis", "luis_deepstack", "question_answering". + values include: "luis", "conversation", "question_answering", "non_linked". :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version to use when call a specific target service. :vartype api_version: str @@ -984,29 +1208,28 @@ class QuestionAnsweringTargetIntentResult(TargetIntentResult): All required parameters must be populated in order to send to Azure. + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version used to call a target service. :vartype api_version: str - :ivar confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :vartype confidence_score: float - :ivar target_kind: Required. This discriminator property specifies the type of the target - project that returns the response. 'luis' means the type is LUIS Generally Available. - 'luis_deepstack' means LUIS vNext. 'question_answering' means Question Answering.Constant - filled by server. Possible values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar result: The generated answer by a Question Answering KB. - :vartype result: any + :vartype result: ~azure.ai.language.conversations.models.KnowledgeBaseAnswers """ _validation = { - 'confidence_score': {'maximum': 1, 'minimum': 0}, 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, } _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'target_kind': {'key': 'targetType', 'type': 'str'}, - 'result': {'key': 'result', 'type': 'object'}, + 'result': {'key': 'result', 'type': 'KnowledgeBaseAnswers'}, } def __init__( @@ -1016,55 +1239,11 @@ def __init__( """ :keyword api_version: The API version used to call a target service. :paramtype api_version: str - :keyword confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :paramtype confidence_score: float :keyword result: The generated answer by a Question Answering KB. - :paramtype result: any + :paramtype result: ~azure.ai.language.conversations.models.KnowledgeBaseAnswers """ super(QuestionAnsweringTargetIntentResult, self).__init__(**kwargs) self.target_kind = 'question_answering' # type: str self.result = kwargs.get('result', None) - - -class WorkflowPrediction(BasePrediction): - """This represents the prediction result of an Workflow project. - - All required parameters must be populated in order to send to Azure. - - :ivar top_intent: The intent with the highest score. - :vartype top_intent: str - :ivar project_kind: Required. The type of the project.Constant filled by server. Possible - values include: "conversation", "workflow". - :vartype project_kind: str or ~azure.ai.language.conversations.models.ProjectKind - :ivar intents: Required. A dictionary that contains all intents. A key is an intent name and a - value is its confidence score and target type. The top intent's value also contains the actual - response from the target project. - :vartype intents: dict[str, ~azure.ai.language.conversations.models.TargetIntentResult] - """ - - _validation = { - 'project_kind': {'required': True}, - 'intents': {'required': True}, - } - - _attribute_map = { - 'top_intent': {'key': 'topIntent', 'type': 'str'}, - 'project_kind': {'key': 'projectType', 'type': 'str'}, - 'intents': {'key': 'intents', 'type': '{TargetIntentResult}'}, - } - - def __init__( - self, - **kwargs - ): - """ - :keyword top_intent: The intent with the highest score. - :paramtype top_intent: str - :keyword intents: Required. A dictionary that contains all intents. A key is an intent name and - a value is its confidence score and target type. The top intent's value also contains the - actual response from the target project. - :paramtype intents: dict[str, ~azure.ai.language.conversations.models.TargetIntentResult] - """ - super(WorkflowPrediction, self).__init__(**kwargs) - self.project_kind = 'workflow' # type: str - self.intents = kwargs['intents'] diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_models_py3.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_models_py3.py index 7faf499e3998..d0f471721332 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_models_py3.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/models/_models_py3.py @@ -14,74 +14,47 @@ from ._conversation_analysis_client_enums import * -class AnalyzeConversationOptions(msrest.serialization.Model): - """The request body. +class AnalysisParameters(msrest.serialization.Model): + """This is the parameter set of either the Orchestration project itself or one of the target services. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ConversationParameters, LUISParameters, QuestionAnsweringParameters. All required parameters must be populated in order to send to Azure. - :ivar query: Required. The conversation utterance to be analyzed. - :vartype query: str - :ivar direct_target: The name of the target project this request is sending to directly. - :vartype direct_target: str - :ivar language: The language to use in this request. This will be the language setting when - communicating with all other target projects. - :vartype language: str - :ivar verbose: If true, the service will return more detailed information in the response. - :vartype verbose: bool - :ivar is_logging_enabled: If true, the query will be kept by the service for customers to - further review, to improve the model quality. - :vartype is_logging_enabled: bool - :ivar parameters: A dictionary representing the input for each target project. - :vartype parameters: dict[str, ~azure.ai.language.conversations.models.AnalyzeParameters] + :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible + values include: "luis", "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind + :ivar api_version: The API version to use when call a specific target service. + :vartype api_version: str """ _validation = { - 'query': {'required': True}, + 'target_kind': {'required': True}, } _attribute_map = { - 'query': {'key': 'query', 'type': 'str'}, - 'direct_target': {'key': 'directTarget', 'type': 'str'}, - 'language': {'key': 'language', 'type': 'str'}, - 'verbose': {'key': 'verbose', 'type': 'bool'}, - 'is_logging_enabled': {'key': 'isLoggingEnabled', 'type': 'bool'}, - 'parameters': {'key': 'parameters', 'type': '{AnalyzeParameters}'}, + 'target_kind': {'key': 'targetKind', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + } + + _subtype_map = { + 'target_kind': {'conversation': 'ConversationParameters', 'luis': 'LUISParameters', 'question_answering': 'QuestionAnsweringParameters'} } def __init__( self, *, - query: str, - direct_target: Optional[str] = None, - language: Optional[str] = None, - verbose: Optional[bool] = None, - is_logging_enabled: Optional[bool] = None, - parameters: Optional[Dict[str, "AnalyzeParameters"]] = None, + api_version: Optional[str] = None, **kwargs ): """ - :keyword query: Required. The conversation utterance to be analyzed. - :paramtype query: str - :keyword direct_target: The name of the target project this request is sending to directly. - :paramtype direct_target: str - :keyword language: The language to use in this request. This will be the language setting when - communicating with all other target projects. - :paramtype language: str - :keyword verbose: If true, the service will return more detailed information in the response. - :paramtype verbose: bool - :keyword is_logging_enabled: If true, the query will be kept by the service for customers to - further review, to improve the model quality. - :paramtype is_logging_enabled: bool - :keyword parameters: A dictionary representing the input for each target project. - :paramtype parameters: dict[str, ~azure.ai.language.conversations.models.AnalyzeParameters] + :keyword api_version: The API version to use when call a specific target service. + :paramtype api_version: str """ - super(AnalyzeConversationOptions, self).__init__(**kwargs) - self.query = query - self.direct_target = direct_target - self.language = language - self.verbose = verbose - self.is_logging_enabled = is_logging_enabled - self.parameters = parameters + super(AnalysisParameters, self).__init__(**kwargs) + self.target_kind = None # type: Optional[str] + self.api_version = api_version class AnalyzeConversationResult(msrest.serialization.Model): @@ -130,62 +103,69 @@ def __init__( self.prediction = prediction -class AnalyzeParameters(msrest.serialization.Model): - """This is the parameter set of either the conversation application itself or one of the target services. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LUISParameters, DeepstackParameters, QuestionAnsweringParameters. - - All required parameters must be populated in order to send to Azure. +class AnswerSpan(msrest.serialization.Model): + """Answer span object of QnA. - :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible - values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind - :ivar api_version: The API version to use when call a specific target service. - :vartype api_version: str + :ivar text: Predicted text of answer span. + :vartype text: str + :ivar confidence_score: Predicted score of answer span, value ranges from 0 to 1. + :vartype confidence_score: float + :ivar offset: The answer span offset from the start of answer. + :vartype offset: int + :ivar length: The length of the answer span. + :vartype length: int """ _validation = { - 'target_kind': {'required': True}, + 'confidence_score': {'maximum': 1, 'minimum': 0}, } _attribute_map = { - 'target_kind': {'key': 'targetKind', 'type': 'str'}, - 'api_version': {'key': 'apiVersion', 'type': 'str'}, - } - - _subtype_map = { - 'target_kind': {'luis': 'LUISParameters', 'luis_deepstack': 'DeepstackParameters', 'question_answering': 'QuestionAnsweringParameters'} + 'text': {'key': 'text', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, } def __init__( self, *, - api_version: Optional[str] = None, + text: Optional[str] = None, + confidence_score: Optional[float] = None, + offset: Optional[int] = None, + length: Optional[int] = None, **kwargs ): """ - :keyword api_version: The API version to use when call a specific target service. - :paramtype api_version: str + :keyword text: Predicted text of answer span. + :paramtype text: str + :keyword confidence_score: Predicted score of answer span, value ranges from 0 to 1. + :paramtype confidence_score: float + :keyword offset: The answer span offset from the start of answer. + :paramtype offset: int + :keyword length: The length of the answer span. + :paramtype length: int """ - super(AnalyzeParameters, self).__init__(**kwargs) - self.target_kind = None # type: Optional[str] - self.api_version = api_version + super(AnswerSpan, self).__init__(**kwargs) + self.text = text + self.confidence_score = confidence_score + self.offset = offset + self.length = length class BasePrediction(msrest.serialization.Model): """This is the base class of prediction. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DeepstackPrediction, WorkflowPrediction. + sub-classes are: ConversationPrediction, OrchestratorPrediction. All required parameters must be populated in order to send to Azure. - :ivar top_intent: The intent with the highest score. - :vartype top_intent: str :ivar project_kind: Required. The type of the project.Constant filled by server. Possible values include: "conversation", "workflow". :vartype project_kind: str or ~azure.ai.language.conversations.models.ProjectKind + :ivar top_intent: The intent with the highest score. + :vartype top_intent: str """ _validation = { @@ -193,12 +173,12 @@ class BasePrediction(msrest.serialization.Model): } _attribute_map = { + 'project_kind': {'key': 'projectKind', 'type': 'str'}, 'top_intent': {'key': 'topIntent', 'type': 'str'}, - 'project_kind': {'key': 'projectType', 'type': 'str'}, } _subtype_map = { - 'project_kind': {'conversation': 'DeepstackPrediction', 'workflow': 'WorkflowPrediction'} + 'project_kind': {'conversation': 'ConversationPrediction', 'workflow': 'OrchestratorPrediction'} } def __init__( @@ -212,12 +192,82 @@ def __init__( :paramtype top_intent: str """ super(BasePrediction, self).__init__(**kwargs) - self.top_intent = top_intent self.project_kind = None # type: Optional[str] + self.top_intent = top_intent + +class ConversationAnalysisOptions(msrest.serialization.Model): + """The request body. -class DeepstackCallingOptions(msrest.serialization.Model): - """The option to set to call a LUIS Deepstack project. + All required parameters must be populated in order to send to Azure. + + :ivar query: Required. The conversation utterance to be analyzed. + :vartype query: str + :ivar direct_target: The name of the target project this request is sending to directly. + :vartype direct_target: str + :ivar language: The language to use in this request. This will be the language setting when + communicating with all other target projects. + :vartype language: str + :ivar verbose: If true, the service will return more detailed information in the response. + :vartype verbose: bool + :ivar is_logging_enabled: If true, the query will be kept by the service for customers to + further review, to improve the model quality. + :vartype is_logging_enabled: bool + :ivar parameters: A dictionary representing the input for each target project. + :vartype parameters: dict[str, ~azure.ai.language.conversations.models.AnalysisParameters] + """ + + _validation = { + 'query': {'required': True}, + } + + _attribute_map = { + 'query': {'key': 'query', 'type': 'str'}, + 'direct_target': {'key': 'directTarget', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + 'verbose': {'key': 'verbose', 'type': 'bool'}, + 'is_logging_enabled': {'key': 'isLoggingEnabled', 'type': 'bool'}, + 'parameters': {'key': 'parameters', 'type': '{AnalysisParameters}'}, + } + + def __init__( + self, + *, + query: str, + direct_target: Optional[str] = None, + language: Optional[str] = None, + verbose: Optional[bool] = None, + is_logging_enabled: Optional[bool] = None, + parameters: Optional[Dict[str, "AnalysisParameters"]] = None, + **kwargs + ): + """ + :keyword query: Required. The conversation utterance to be analyzed. + :paramtype query: str + :keyword direct_target: The name of the target project this request is sending to directly. + :paramtype direct_target: str + :keyword language: The language to use in this request. This will be the language setting when + communicating with all other target projects. + :paramtype language: str + :keyword verbose: If true, the service will return more detailed information in the response. + :paramtype verbose: bool + :keyword is_logging_enabled: If true, the query will be kept by the service for customers to + further review, to improve the model quality. + :paramtype is_logging_enabled: bool + :keyword parameters: A dictionary representing the input for each target project. + :paramtype parameters: dict[str, ~azure.ai.language.conversations.models.AnalysisParameters] + """ + super(ConversationAnalysisOptions, self).__init__(**kwargs) + self.query = query + self.direct_target = direct_target + self.language = language + self.verbose = verbose + self.is_logging_enabled = is_logging_enabled + self.parameters = parameters + + +class ConversationCallingOptions(msrest.serialization.Model): + """The option to set to call a Conversation project. :ivar language: The language of the query. :vartype language: str @@ -251,14 +301,14 @@ def __init__( in authoring, to improve the model quality. :paramtype is_logging_enabled: bool """ - super(DeepstackCallingOptions, self).__init__(**kwargs) + super(ConversationCallingOptions, self).__init__(**kwargs) self.language = language self.verbose = verbose self.is_logging_enabled = is_logging_enabled -class DeepstackEntity(msrest.serialization.Model): - """The entity extraction result of a LUIS Deepstack project. +class ConversationEntity(msrest.serialization.Model): + """The entity extraction result of a Conversation project. All required parameters must be populated in order to send to Azure. @@ -272,8 +322,8 @@ class DeepstackEntity(msrest.serialization.Model): :vartype length: int :ivar confidence_score: Required. The entity confidence score. :vartype confidence_score: float - :ivar resolution: A array with extra information about the entity. - :vartype resolution: list[~azure.ai.language.conversations.models.DeepStackEntityResolution] + :ivar list_keys: List of keys. + :vartype list_keys: list[str] """ _validation = { @@ -290,7 +340,7 @@ class DeepstackEntity(msrest.serialization.Model): 'offset': {'key': 'offset', 'type': 'int'}, 'length': {'key': 'length', 'type': 'int'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'resolution': {'key': 'resolution', 'type': '[DeepStackEntityResolution]'}, + 'list_keys': {'key': 'listKeys', 'type': '[str]'}, } def __init__( @@ -301,7 +351,7 @@ def __init__( offset: int, length: int, confidence_score: float, - resolution: Optional[List["DeepStackEntityResolution"]] = None, + list_keys: Optional[List[str]] = None, **kwargs ): """ @@ -315,62 +365,20 @@ def __init__( :paramtype length: int :keyword confidence_score: Required. The entity confidence score. :paramtype confidence_score: float - :keyword resolution: A array with extra information about the entity. - :paramtype resolution: list[~azure.ai.language.conversations.models.DeepStackEntityResolution] + :keyword list_keys: List of keys. + :paramtype list_keys: list[str] """ - super(DeepstackEntity, self).__init__(**kwargs) + super(ConversationEntity, self).__init__(**kwargs) self.category = category self.text = text self.offset = offset self.length = length self.confidence_score = confidence_score - self.resolution = resolution - - -class DeepStackEntityResolution(msrest.serialization.Model): - """This is the base class of all kinds of entity resolutions. - - All required parameters must be populated in order to send to Azure. - - :ivar additional_properties: Unmatched properties from the message are deserialized to this - collection. - :vartype additional_properties: dict[str, any] - :ivar resolution_kind: Required. The type of an entity resolution. Possible values include: - "DictionaryNormalizedValue". - :vartype resolution_kind: str or ~azure.ai.language.conversations.models.ResolutionKind - """ + self.list_keys = list_keys - _validation = { - 'resolution_kind': {'required': True}, - } - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'resolution_kind': {'key': 'resolutionKind', 'type': 'str'}, - } - - def __init__( - self, - *, - resolution_kind: Union[str, "ResolutionKind"], - additional_properties: Optional[Dict[str, Any]] = None, - **kwargs - ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - :keyword resolution_kind: Required. The type of an entity resolution. Possible values include: - "DictionaryNormalizedValue". - :paramtype resolution_kind: str or ~azure.ai.language.conversations.models.ResolutionKind - """ - super(DeepStackEntityResolution, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.resolution_kind = resolution_kind - - -class DeepstackIntent(msrest.serialization.Model): - """The intent classification result of a LUIS Deepstack project. +class ConversationIntent(msrest.serialization.Model): + """The intent classification result of a Conversation project. All required parameters must be populated in order to send to Azure. @@ -403,23 +411,23 @@ def __init__( :keyword confidence_score: Required. The confidence score of the class from 0.0 to 1.0. :paramtype confidence_score: float """ - super(DeepstackIntent, self).__init__(**kwargs) + super(ConversationIntent, self).__init__(**kwargs) self.category = category self.confidence_score = confidence_score -class DeepstackParameters(AnalyzeParameters): - """This is a set of request parameters for LUIS Deepstack projects. +class ConversationParameters(AnalysisParameters): + """This is a set of request parameters for Customized Conversation projects. All required parameters must be populated in order to send to Azure. :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible - values include: "luis", "luis_deepstack", "question_answering". + values include: "luis", "conversation", "question_answering", "non_linked". :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version to use when call a specific target service. :vartype api_version: str - :ivar calling_options: The option to set to call a LUIS Deepstack project. - :vartype calling_options: ~azure.ai.language.conversations.models.DeepstackCallingOptions + :ivar calling_options: The option to set to call a Conversation project. + :vartype calling_options: ~azure.ai.language.conversations.models.ConversationCallingOptions """ _validation = { @@ -429,41 +437,41 @@ class DeepstackParameters(AnalyzeParameters): _attribute_map = { 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, - 'calling_options': {'key': 'callingOptions', 'type': 'DeepstackCallingOptions'}, + 'calling_options': {'key': 'callingOptions', 'type': 'ConversationCallingOptions'}, } def __init__( self, *, api_version: Optional[str] = None, - calling_options: Optional["DeepstackCallingOptions"] = None, + calling_options: Optional["ConversationCallingOptions"] = None, **kwargs ): """ :keyword api_version: The API version to use when call a specific target service. :paramtype api_version: str - :keyword calling_options: The option to set to call a LUIS Deepstack project. - :paramtype calling_options: ~azure.ai.language.conversations.models.DeepstackCallingOptions + :keyword calling_options: The option to set to call a Conversation project. + :paramtype calling_options: ~azure.ai.language.conversations.models.ConversationCallingOptions """ - super(DeepstackParameters, self).__init__(api_version=api_version, **kwargs) - self.target_kind = 'luis_deepstack' # type: str + super(ConversationParameters, self).__init__(api_version=api_version, **kwargs) + self.target_kind = 'conversation' # type: str self.calling_options = calling_options -class DeepstackPrediction(BasePrediction): - """Represents the prediction section of a LUIS Deepstack project. +class ConversationPrediction(BasePrediction): + """Represents the prediction section of a Conversation project. All required parameters must be populated in order to send to Azure. - :ivar top_intent: The intent with the highest score. - :vartype top_intent: str :ivar project_kind: Required. The type of the project.Constant filled by server. Possible values include: "conversation", "workflow". :vartype project_kind: str or ~azure.ai.language.conversations.models.ProjectKind + :ivar top_intent: The intent with the highest score. + :vartype top_intent: str :ivar intents: Required. The intent classification results. - :vartype intents: list[~azure.ai.language.conversations.models.DeepstackIntent] + :vartype intents: list[~azure.ai.language.conversations.models.ConversationIntent] :ivar entities: Required. The entity extraction results. - :vartype entities: list[~azure.ai.language.conversations.models.DeepstackEntity] + :vartype entities: list[~azure.ai.language.conversations.models.ConversationEntity] """ _validation = { @@ -473,17 +481,17 @@ class DeepstackPrediction(BasePrediction): } _attribute_map = { + 'project_kind': {'key': 'projectKind', 'type': 'str'}, 'top_intent': {'key': 'topIntent', 'type': 'str'}, - 'project_kind': {'key': 'projectType', 'type': 'str'}, - 'intents': {'key': 'intents', 'type': '[DeepstackIntent]'}, - 'entities': {'key': 'entities', 'type': '[DeepstackEntity]'}, + 'intents': {'key': 'intents', 'type': '[ConversationIntent]'}, + 'entities': {'key': 'entities', 'type': '[ConversationEntity]'}, } def __init__( self, *, - intents: List["DeepstackIntent"], - entities: List["DeepstackEntity"], + intents: List["ConversationIntent"], + entities: List["ConversationEntity"], top_intent: Optional[str] = None, **kwargs ): @@ -491,18 +499,18 @@ def __init__( :keyword top_intent: The intent with the highest score. :paramtype top_intent: str :keyword intents: Required. The intent classification results. - :paramtype intents: list[~azure.ai.language.conversations.models.DeepstackIntent] + :paramtype intents: list[~azure.ai.language.conversations.models.ConversationIntent] :keyword entities: Required. The entity extraction results. - :paramtype entities: list[~azure.ai.language.conversations.models.DeepstackEntity] + :paramtype entities: list[~azure.ai.language.conversations.models.ConversationEntity] """ - super(DeepstackPrediction, self).__init__(top_intent=top_intent, **kwargs) + super(ConversationPrediction, self).__init__(top_intent=top_intent, **kwargs) self.project_kind = 'conversation' # type: str self.intents = intents self.entities = entities -class DeepstackResult(msrest.serialization.Model): - """The response returned by a LUIS Deepstack project. +class ConversationResult(msrest.serialization.Model): + """The response returned by a Conversation project. All required parameters must be populated in order to send to Azure. @@ -511,7 +519,7 @@ class DeepstackResult(msrest.serialization.Model): :ivar detected_language: The detected language from the query. :vartype detected_language: str :ivar prediction: Required. The predicted result for the query. - :vartype prediction: ~azure.ai.language.conversations.models.DeepstackPrediction + :vartype prediction: ~azure.ai.language.conversations.models.ConversationPrediction """ _validation = { @@ -522,14 +530,14 @@ class DeepstackResult(msrest.serialization.Model): _attribute_map = { 'query': {'key': 'query', 'type': 'str'}, 'detected_language': {'key': 'detectedLanguage', 'type': 'str'}, - 'prediction': {'key': 'prediction', 'type': 'DeepstackPrediction'}, + 'prediction': {'key': 'prediction', 'type': 'ConversationPrediction'}, } def __init__( self, *, query: str, - prediction: "DeepstackPrediction", + prediction: "ConversationPrediction", detected_language: Optional[str] = None, **kwargs ): @@ -539,162 +547,113 @@ def __init__( :keyword detected_language: The detected language from the query. :paramtype detected_language: str :keyword prediction: Required. The predicted result for the query. - :paramtype prediction: ~azure.ai.language.conversations.models.DeepstackPrediction + :paramtype prediction: ~azure.ai.language.conversations.models.ConversationPrediction """ - super(DeepstackResult, self).__init__(**kwargs) + super(ConversationResult, self).__init__(**kwargs) self.query = query self.detected_language = detected_language self.prediction = prediction -class DictionaryNormalizedValueResolution(DeepStackEntityResolution): - """The DictionaryNormalizedValue resolution indicates entity values are extracted from a predefined dictionary. For example, Coca could be a normalized name for Coca-Cola. - - All required parameters must be populated in order to send to Azure. - - :ivar additional_properties: Unmatched properties from the message are deserialized to this - collection. - :vartype additional_properties: dict[str, any] - :ivar resolution_kind: Required. The type of an entity resolution. Possible values include: - "DictionaryNormalizedValue". - :vartype resolution_kind: str or ~azure.ai.language.conversations.models.ResolutionKind - :ivar values: A list of normalized entities. - :vartype values: list[str] - """ - - _validation = { - 'resolution_kind': {'required': True}, - } - - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'resolution_kind': {'key': 'resolutionKind', 'type': 'str'}, - 'values': {'key': 'values', 'type': '[str]'}, - } - - def __init__( - self, - *, - resolution_kind: Union[str, "ResolutionKind"], - additional_properties: Optional[Dict[str, Any]] = None, - values: Optional[List[str]] = None, - **kwargs - ): - """ - :keyword additional_properties: Unmatched properties from the message are deserialized to this - collection. - :paramtype additional_properties: dict[str, any] - :keyword resolution_kind: Required. The type of an entity resolution. Possible values include: - "DictionaryNormalizedValue". - :paramtype resolution_kind: str or ~azure.ai.language.conversations.models.ResolutionKind - :keyword values: A list of normalized entities. - :paramtype values: list[str] - """ - super(DictionaryNormalizedValueResolution, self).__init__(additional_properties=additional_properties, resolution_kind=resolution_kind, **kwargs) - self.values = values - - class TargetIntentResult(msrest.serialization.Model): """This is the base class of an intent prediction. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LUISTargetIntentResult, DSTargetIntentResult, QuestionAnsweringTargetIntentResult. + sub-classes are: ConversationTargetIntentResult, LUISTargetIntentResult, NoneLinkedTargetIntentResult, QuestionAnsweringTargetIntentResult. All required parameters must be populated in order to send to Azure. + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version used to call a target service. :vartype api_version: str - :ivar confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :vartype confidence_score: float - :ivar target_kind: Required. This discriminator property specifies the type of the target - project that returns the response. 'luis' means the type is LUIS Generally Available. - 'luis_deepstack' means LUIS vNext. 'question_answering' means Question Answering.Constant - filled by server. Possible values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind """ _validation = { - 'confidence_score': {'maximum': 1, 'minimum': 0}, 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, } _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'target_kind': {'key': 'targetType', 'type': 'str'}, } _subtype_map = { - 'target_kind': {'luis': 'LUISTargetIntentResult', 'luis_deepstack': 'DSTargetIntentResult', 'question_answering': 'QuestionAnsweringTargetIntentResult'} + 'target_kind': {'conversation': 'ConversationTargetIntentResult', 'luis': 'LUISTargetIntentResult', 'non_linked': 'NoneLinkedTargetIntentResult', 'question_answering': 'QuestionAnsweringTargetIntentResult'} } def __init__( self, *, + confidence_score: float, api_version: Optional[str] = None, - confidence_score: Optional[float] = None, **kwargs ): """ :keyword api_version: The API version used to call a target service. :paramtype api_version: str - :keyword confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :paramtype confidence_score: float """ super(TargetIntentResult, self).__init__(**kwargs) + self.target_kind = None # type: Optional[str] self.api_version = api_version self.confidence_score = confidence_score - self.target_kind = None # type: Optional[str] -class DSTargetIntentResult(TargetIntentResult): - """A wrap up of LUIS Deepstack response. +class ConversationTargetIntentResult(TargetIntentResult): + """A wrap up of Conversation project response. All required parameters must be populated in order to send to Azure. + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version used to call a target service. :vartype api_version: str - :ivar confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :vartype confidence_score: float - :ivar target_kind: Required. This discriminator property specifies the type of the target - project that returns the response. 'luis' means the type is LUIS Generally Available. - 'luis_deepstack' means LUIS vNext. 'question_answering' means Question Answering.Constant - filled by server. Possible values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind - :ivar result: The actual response from a LUIS Deepstack application. - :vartype result: ~azure.ai.language.conversations.models.DeepstackResult + :ivar result: The actual response from a Conversation project. + :vartype result: ~azure.ai.language.conversations.models.ConversationResult """ _validation = { - 'confidence_score': {'maximum': 1, 'minimum': 0}, 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, } _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'target_kind': {'key': 'targetType', 'type': 'str'}, - 'result': {'key': 'result', 'type': 'DeepstackResult'}, + 'result': {'key': 'result', 'type': 'ConversationResult'}, } def __init__( self, *, + confidence_score: float, api_version: Optional[str] = None, - confidence_score: Optional[float] = None, - result: Optional["DeepstackResult"] = None, + result: Optional["ConversationResult"] = None, **kwargs ): """ :keyword api_version: The API version used to call a target service. :paramtype api_version: str - :keyword confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :paramtype confidence_score: float - :keyword result: The actual response from a LUIS Deepstack application. - :paramtype result: ~azure.ai.language.conversations.models.DeepstackResult + :keyword result: The actual response from a Conversation project. + :paramtype result: ~azure.ai.language.conversations.models.ConversationResult """ - super(DSTargetIntentResult, self).__init__(api_version=api_version, confidence_score=confidence_score, **kwargs) - self.target_kind = 'luis_deepstack' # type: str + super(ConversationTargetIntentResult, self).__init__(api_version=api_version, confidence_score=confidence_score, **kwargs) + self.target_kind = 'conversation' # type: str self.result = result @@ -705,7 +664,9 @@ class Error(msrest.serialization.Model): :ivar code: Required. One of a server-defined set of error codes. Possible values include: "InvalidRequest", "InvalidArgument", "Unauthorized", "Forbidden", "NotFound", - "TooManyRequests", "InternalServerError", "ServiceUnavailable". + "ProjectNotFound", "OperationNotFound", "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", "TooManyRequests", "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", "InternalServerError", "ServiceUnavailable". :vartype code: str or ~azure.ai.language.conversations.models.ErrorCode :ivar message: Required. A human-readable representation of the error. :vartype message: str @@ -744,7 +705,9 @@ def __init__( """ :keyword code: Required. One of a server-defined set of error codes. Possible values include: "InvalidRequest", "InvalidArgument", "Unauthorized", "Forbidden", "NotFound", - "TooManyRequests", "InternalServerError", "ServiceUnavailable". + "ProjectNotFound", "OperationNotFound", "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", "TooManyRequests", "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", "InternalServerError", "ServiceUnavailable". :paramtype code: str or ~azure.ai.language.conversations.models.ErrorCode :keyword message: Required. A human-readable representation of the error. :paramtype message: str @@ -855,6 +818,194 @@ def __init__( self.innererror = innererror +class KnowledgeBaseAnswer(msrest.serialization.Model): + """Represents knowledge base answer. + + :ivar questions: List of questions associated with the answer. + :vartype questions: list[str] + :ivar answer: Answer text. + :vartype answer: str + :ivar confidence_score: Answer confidence score, value ranges from 0 to 1. + :vartype confidence_score: float + :ivar id: ID of the QnA result. + :vartype id: int + :ivar source: Source of QnA result. + :vartype source: str + :ivar metadata: Metadata associated with the answer, useful to categorize or filter question + answers. + :vartype metadata: dict[str, str] + :ivar dialog: Dialog associated with Answer. + :vartype dialog: ~azure.ai.language.conversations.models.KnowledgeBaseAnswerDialog + :ivar answer_span: Answer span object of QnA with respect to user's question. + :vartype answer_span: ~azure.ai.language.conversations.models.AnswerSpan + """ + + _validation = { + 'confidence_score': {'maximum': 1, 'minimum': 0}, + } + + _attribute_map = { + 'questions': {'key': 'questions', 'type': '[str]'}, + 'answer': {'key': 'answer', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'id': {'key': 'id', 'type': 'int'}, + 'source': {'key': 'source', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': '{str}'}, + 'dialog': {'key': 'dialog', 'type': 'KnowledgeBaseAnswerDialog'}, + 'answer_span': {'key': 'answerSpan', 'type': 'AnswerSpan'}, + } + + def __init__( + self, + *, + questions: Optional[List[str]] = None, + answer: Optional[str] = None, + confidence_score: Optional[float] = None, + id: Optional[int] = None, + source: Optional[str] = None, + metadata: Optional[Dict[str, str]] = None, + dialog: Optional["KnowledgeBaseAnswerDialog"] = None, + answer_span: Optional["AnswerSpan"] = None, + **kwargs + ): + """ + :keyword questions: List of questions associated with the answer. + :paramtype questions: list[str] + :keyword answer: Answer text. + :paramtype answer: str + :keyword confidence_score: Answer confidence score, value ranges from 0 to 1. + :paramtype confidence_score: float + :keyword id: ID of the QnA result. + :paramtype id: int + :keyword source: Source of QnA result. + :paramtype source: str + :keyword metadata: Metadata associated with the answer, useful to categorize or filter question + answers. + :paramtype metadata: dict[str, str] + :keyword dialog: Dialog associated with Answer. + :paramtype dialog: ~azure.ai.language.conversations.models.KnowledgeBaseAnswerDialog + :keyword answer_span: Answer span object of QnA with respect to user's question. + :paramtype answer_span: ~azure.ai.language.conversations.models.AnswerSpan + """ + super(KnowledgeBaseAnswer, self).__init__(**kwargs) + self.questions = questions + self.answer = answer + self.confidence_score = confidence_score + self.id = id + self.source = source + self.metadata = metadata + self.dialog = dialog + self.answer_span = answer_span + + +class KnowledgeBaseAnswerDialog(msrest.serialization.Model): + """Dialog associated with Answer. + + :ivar is_context_only: To mark if a prompt is relevant only with a previous question or not. If + true, do not include this QnA as search result for queries without context; otherwise, if + false, ignores context and includes this QnA in search result. + :vartype is_context_only: bool + :ivar prompts: List of prompts associated with the answer. + :vartype prompts: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswerPrompt] + """ + + _validation = { + 'prompts': {'max_items': 20, 'min_items': 0}, + } + + _attribute_map = { + 'is_context_only': {'key': 'isContextOnly', 'type': 'bool'}, + 'prompts': {'key': 'prompts', 'type': '[KnowledgeBaseAnswerPrompt]'}, + } + + def __init__( + self, + *, + is_context_only: Optional[bool] = None, + prompts: Optional[List["KnowledgeBaseAnswerPrompt"]] = None, + **kwargs + ): + """ + :keyword is_context_only: To mark if a prompt is relevant only with a previous question or not. + If true, do not include this QnA as search result for queries without context; otherwise, if + false, ignores context and includes this QnA in search result. + :paramtype is_context_only: bool + :keyword prompts: List of prompts associated with the answer. + :paramtype prompts: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswerPrompt] + """ + super(KnowledgeBaseAnswerDialog, self).__init__(**kwargs) + self.is_context_only = is_context_only + self.prompts = prompts + + +class KnowledgeBaseAnswerPrompt(msrest.serialization.Model): + """Prompt for an answer. + + :ivar display_order: Index of the prompt - used in ordering of the prompts. + :vartype display_order: int + :ivar qna_id: QnA ID corresponding to the prompt. + :vartype qna_id: int + :ivar display_text: Text displayed to represent a follow up question prompt. + :vartype display_text: str + """ + + _validation = { + 'display_text': {'max_length': 200, 'min_length': 0}, + } + + _attribute_map = { + 'display_order': {'key': 'displayOrder', 'type': 'int'}, + 'qna_id': {'key': 'qnaId', 'type': 'int'}, + 'display_text': {'key': 'displayText', 'type': 'str'}, + } + + def __init__( + self, + *, + display_order: Optional[int] = None, + qna_id: Optional[int] = None, + display_text: Optional[str] = None, + **kwargs + ): + """ + :keyword display_order: Index of the prompt - used in ordering of the prompts. + :paramtype display_order: int + :keyword qna_id: QnA ID corresponding to the prompt. + :paramtype qna_id: int + :keyword display_text: Text displayed to represent a follow up question prompt. + :paramtype display_text: str + """ + super(KnowledgeBaseAnswerPrompt, self).__init__(**kwargs) + self.display_order = display_order + self.qna_id = qna_id + self.display_text = display_text + + +class KnowledgeBaseAnswers(msrest.serialization.Model): + """Represents List of Question Answers. + + :ivar answers: Represents Answer Result list. + :vartype answers: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswer] + """ + + _attribute_map = { + 'answers': {'key': 'answers', 'type': '[KnowledgeBaseAnswer]'}, + } + + def __init__( + self, + *, + answers: Optional[List["KnowledgeBaseAnswer"]] = None, + **kwargs + ): + """ + :keyword answers: Represents Answer Result list. + :paramtype answers: list[~azure.ai.language.conversations.models.KnowledgeBaseAnswer] + """ + super(KnowledgeBaseAnswers, self).__init__(**kwargs) + self.answers = answers + + class LUISCallingOptions(msrest.serialization.Model): """This customizes how the service calls LUIS Generally Available projects. @@ -917,13 +1068,13 @@ def __init__( self.bing_spell_check_subscription_key = bing_spell_check_subscription_key -class LUISParameters(AnalyzeParameters): +class LUISParameters(AnalysisParameters): """This is a set of request parameters for LUIS Generally Available projects. All required parameters must be populated in order to send to Azure. :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible - values include: "luis", "luis_deepstack", "question_answering". + values include: "luis", "conversation", "question_answering", "non_linked". :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version to use when call a specific target service. :vartype api_version: str @@ -982,43 +1133,42 @@ class LUISTargetIntentResult(TargetIntentResult): All required parameters must be populated in order to send to Azure. + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version used to call a target service. :vartype api_version: str - :ivar confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :vartype confidence_score: float - :ivar target_kind: Required. This discriminator property specifies the type of the target - project that returns the response. 'luis' means the type is LUIS Generally Available. - 'luis_deepstack' means LUIS vNext. 'question_answering' means Question Answering.Constant - filled by server. Possible values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar result: The actual response from a LUIS Generally Available application. :vartype result: any """ _validation = { - 'confidence_score': {'maximum': 1, 'minimum': 0}, 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, } _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'target_kind': {'key': 'targetType', 'type': 'str'}, 'result': {'key': 'result', 'type': 'object'}, } def __init__( self, *, + confidence_score: float, api_version: Optional[str] = None, - confidence_score: Optional[float] = None, result: Optional[Any] = None, **kwargs ): """ :keyword api_version: The API version used to call a target service. :paramtype api_version: str - :keyword confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :paramtype confidence_score: float :keyword result: The actual response from a LUIS Generally Available application. :paramtype result: any @@ -1028,13 +1178,110 @@ def __init__( self.result = result -class QuestionAnsweringParameters(AnalyzeParameters): +class NoneLinkedTargetIntentResult(TargetIntentResult): + """A wrap up of non-linked intent response. + + All required parameters must be populated in order to send to Azure. + + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind + :ivar api_version: The API version used to call a target service. + :vartype api_version: str + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. + :vartype confidence_score: float + :ivar result: The actual response from a Conversation project. + :vartype result: ~azure.ai.language.conversations.models.ConversationResult + """ + + _validation = { + 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, + } + + _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'result': {'key': 'result', 'type': 'ConversationResult'}, + } + + def __init__( + self, + *, + confidence_score: float, + api_version: Optional[str] = None, + result: Optional["ConversationResult"] = None, + **kwargs + ): + """ + :keyword api_version: The API version used to call a target service. + :paramtype api_version: str + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. + :paramtype confidence_score: float + :keyword result: The actual response from a Conversation project. + :paramtype result: ~azure.ai.language.conversations.models.ConversationResult + """ + super(NoneLinkedTargetIntentResult, self).__init__(api_version=api_version, confidence_score=confidence_score, **kwargs) + self.target_kind = 'non_linked' # type: str + self.result = result + + +class OrchestratorPrediction(BasePrediction): + """This represents the prediction result of an Orchestrator project. + + All required parameters must be populated in order to send to Azure. + + :ivar project_kind: Required. The type of the project.Constant filled by server. Possible + values include: "conversation", "workflow". + :vartype project_kind: str or ~azure.ai.language.conversations.models.ProjectKind + :ivar top_intent: The intent with the highest score. + :vartype top_intent: str + :ivar intents: Required. A dictionary that contains all intents. A key is an intent name and a + value is its confidence score and target type. The top intent's value also contains the actual + response from the target project. + :vartype intents: dict[str, ~azure.ai.language.conversations.models.TargetIntentResult] + """ + + _validation = { + 'project_kind': {'required': True}, + 'intents': {'required': True}, + } + + _attribute_map = { + 'project_kind': {'key': 'projectKind', 'type': 'str'}, + 'top_intent': {'key': 'topIntent', 'type': 'str'}, + 'intents': {'key': 'intents', 'type': '{TargetIntentResult}'}, + } + + def __init__( + self, + *, + intents: Dict[str, "TargetIntentResult"], + top_intent: Optional[str] = None, + **kwargs + ): + """ + :keyword top_intent: The intent with the highest score. + :paramtype top_intent: str + :keyword intents: Required. A dictionary that contains all intents. A key is an intent name and + a value is its confidence score and target type. The top intent's value also contains the + actual response from the target project. + :paramtype intents: dict[str, ~azure.ai.language.conversations.models.TargetIntentResult] + """ + super(OrchestratorPrediction, self).__init__(top_intent=top_intent, **kwargs) + self.project_kind = 'workflow' # type: str + self.intents = intents + + +class QuestionAnsweringParameters(AnalysisParameters): """This is a set of request parameters for Question Answering knowledge bases. All required parameters must be populated in order to send to Azure. :ivar target_kind: Required. The type of a target service.Constant filled by server. Possible - values include: "luis", "luis_deepstack", "question_answering". + values include: "luis", "conversation", "question_answering", "non_linked". :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version to use when call a specific target service. :vartype api_version: str @@ -1075,94 +1322,46 @@ class QuestionAnsweringTargetIntentResult(TargetIntentResult): All required parameters must be populated in order to send to Azure. + :ivar target_kind: Required. This discriminator property specifies the type of the target + project that returns the response.Constant filled by server. Possible values include: "luis", + "conversation", "question_answering", "non_linked". + :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar api_version: The API version used to call a target service. :vartype api_version: str - :ivar confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :ivar confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :vartype confidence_score: float - :ivar target_kind: Required. This discriminator property specifies the type of the target - project that returns the response. 'luis' means the type is LUIS Generally Available. - 'luis_deepstack' means LUIS vNext. 'question_answering' means Question Answering.Constant - filled by server. Possible values include: "luis", "luis_deepstack", "question_answering". - :vartype target_kind: str or ~azure.ai.language.conversations.models.TargetKind :ivar result: The generated answer by a Question Answering KB. - :vartype result: any + :vartype result: ~azure.ai.language.conversations.models.KnowledgeBaseAnswers """ _validation = { - 'confidence_score': {'maximum': 1, 'minimum': 0}, 'target_kind': {'required': True}, + 'confidence_score': {'required': True, 'maximum': 1, 'minimum': 0}, } _attribute_map = { + 'target_kind': {'key': 'targetKind', 'type': 'str'}, 'api_version': {'key': 'apiVersion', 'type': 'str'}, 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'target_kind': {'key': 'targetType', 'type': 'str'}, - 'result': {'key': 'result', 'type': 'object'}, + 'result': {'key': 'result', 'type': 'KnowledgeBaseAnswers'}, } def __init__( self, *, + confidence_score: float, api_version: Optional[str] = None, - confidence_score: Optional[float] = None, - result: Optional[Any] = None, + result: Optional["KnowledgeBaseAnswers"] = None, **kwargs ): """ :keyword api_version: The API version used to call a target service. :paramtype api_version: str - :keyword confidence_score: The prediction score and it ranges from 0.0 to 1.0. + :keyword confidence_score: Required. The prediction score and it ranges from 0.0 to 1.0. :paramtype confidence_score: float :keyword result: The generated answer by a Question Answering KB. - :paramtype result: any + :paramtype result: ~azure.ai.language.conversations.models.KnowledgeBaseAnswers """ super(QuestionAnsweringTargetIntentResult, self).__init__(api_version=api_version, confidence_score=confidence_score, **kwargs) self.target_kind = 'question_answering' # type: str self.result = result - - -class WorkflowPrediction(BasePrediction): - """This represents the prediction result of an Workflow project. - - All required parameters must be populated in order to send to Azure. - - :ivar top_intent: The intent with the highest score. - :vartype top_intent: str - :ivar project_kind: Required. The type of the project.Constant filled by server. Possible - values include: "conversation", "workflow". - :vartype project_kind: str or ~azure.ai.language.conversations.models.ProjectKind - :ivar intents: Required. A dictionary that contains all intents. A key is an intent name and a - value is its confidence score and target type. The top intent's value also contains the actual - response from the target project. - :vartype intents: dict[str, ~azure.ai.language.conversations.models.TargetIntentResult] - """ - - _validation = { - 'project_kind': {'required': True}, - 'intents': {'required': True}, - } - - _attribute_map = { - 'top_intent': {'key': 'topIntent', 'type': 'str'}, - 'project_kind': {'key': 'projectType', 'type': 'str'}, - 'intents': {'key': 'intents', 'type': '{TargetIntentResult}'}, - } - - def __init__( - self, - *, - intents: Dict[str, "TargetIntentResult"], - top_intent: Optional[str] = None, - **kwargs - ): - """ - :keyword top_intent: The intent with the highest score. - :paramtype top_intent: str - :keyword intents: Required. A dictionary that contains all intents. A key is an intent name and - a value is its confidence score and target type. The top intent's value also contains the - actual response from the target project. - :paramtype intents: dict[str, ~azure.ai.language.conversations.models.TargetIntentResult] - """ - super(WorkflowPrediction, self).__init__(top_intent=top_intent, **kwargs) - self.project_kind = 'workflow' # type: str - self.intents = intents diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/operations/_operations.py b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/operations/_operations.py index 769c2b77e1d8..f8450ab9a9d0 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/operations/_operations.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/azure/ai/language/conversations/operations/_operations.py @@ -36,7 +36,7 @@ def build_analyze_conversations_request( project_name = kwargs.pop('project_name') # type: str deployment_name = kwargs.pop('deployment_name') # type: str - api_version = "2021-07-15-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/:analyze-conversations') @@ -67,15 +67,15 @@ class ConversationAnalysisClientOperationsMixin(object): @distributed_trace def analyze_conversations( self, - analyze_conversation_options, # type: "_models.AnalyzeConversationOptions" + conversation_analysis_options, # type: "_models.ConversationAnalysisOptions" **kwargs # type: Any ): # type: (...) -> "_models.AnalyzeConversationResult" """Analyzes the input conversation utterance. - :param analyze_conversation_options: Post body of the request. - :type analyze_conversation_options: - ~azure.ai.language.conversations.models.AnalyzeConversationOptions + :param conversation_analysis_options: Post body of the request. + :type conversation_analysis_options: + ~azure.ai.language.conversations.models.ConversationAnalysisOptions :keyword project_name: The name of the project to use. :paramtype project_name: str :keyword deployment_name: The name of the specific deployment of the project to use. @@ -94,7 +94,7 @@ def analyze_conversations( project_name = kwargs.pop('project_name') # type: str deployment_name = kwargs.pop('deployment_name') # type: str - json = self._serialize.body(analyze_conversation_options, 'AnalyzeConversationOptions') + json = self._serialize.body(conversation_analysis_options, 'ConversationAnalysisOptions') request = build_analyze_conversations_request( content_type=content_type, diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/README.md b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/README.md index 326aef0c67ea..864a7e5e2a14 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/README.md +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/README.md @@ -20,11 +20,10 @@ You can authenticate your client with a Conversational Language Understanding AP These sample programs show common scenarios for the Conversational Language Understanding client's offerings. -| **File Name** | **Description** | +| **File Name**| **Description**| | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [sample_analyze_conversation_app.py][sample_analyze_conversation_app] and [sample_analyze_conversation_app_async.py][sample_analyze_conversation_app_async] | Analyze intents and entities in your utterance using a deepstack (conversation) project | -| [sample_analyze_workflow_app.py][sample_analyze_workflow_app] and [sample_analyze_workflow_app_async.py][sample_analyze_workflow_app_async] | Analyze user utterance using an orchestrator (workflow) project, which uses the best candidate from one of your different apps to analyze user query (ex: Qna, DeepStack, and Luis) | - +| [sample_analyze_conversation_app.py][sample_analyze_conversation_app] and [sample_analyze_conversation_app_async.py][sample_analyze_conversation_app_async] | Analyze intents and entities in your utterance using a conversation (conversation) project | +| [sample_analyze_orchestration_app.py][sample_analyze_orchestration_app] and [sample_analyze_orchestration_app_async.py][sample_analyze_orchestration_app_async] | Analyze user utterance using an orchestrator (orchestration) project, which uses the best candidate from one of your different apps to analyze user query (ex: Qna, Conversation, and Luis) | ## Prerequisites - Python 2.7, or 3.6 or later is required to use this package (3.6 or later if using asyncio) @@ -50,14 +49,22 @@ For more information about how the versioning of the SDK corresponds to the vers 2. Set the environment variables specified in the sample file you wish to run. 3. Follow the usage described in the file, e.g. `python sample_analyze_conversation_app.py` -## Next steps +## Advanced Samples +The following samples showcase some advanced concepts in CLU + +| **Advanced Sample File Name** | **Description** | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | +| [sample_analyze_conversation_app_language_parm.py][sample_analyze_conversation_app_language_parm] and [sample_analyze_conversation_app_language_parm_async.py][sample_analyze_conversation_app_language_parm_async] | Same as conversations sample, but with the ability to specify query language | +| [sample_analyze_orchestration_app_with_params.py][sample_analyze_orchestration_app_with_params] and [sample_analyze_orchestration_app_with_params_async.py][sample_analyze_orchestration_app_with_params_async] | Same as orchestration sample, but with ability to customize call with parameters | +| [sample_analyze_orchestration_app_qna_response.py][sample_analyze_orchestration_app_qna_response] and [sample_analyze_orchestration_app_qna_response_async.py][sample_analyze_orchestration_app_qna_response_async] | Same as orchestration sample, but in this case the best response will be a Qna project | +| [sample_analyze_orchestration_app_conversation_response.py][sample_analyze_orchestration_app_conversation_response] and [sample_analyze_orchestration_app_conversation_reponse_async.py][sample_analyze_orchestration_app_conversation_response_async] | Same as orchestration sample, but in this case the best response will be a Conversation project | +| [sample_analyze_orchestration_app_luis_response.py][sample_analyze_orchestration_app_luis_response] and [sample_analyze_orchestration_app_luis_response_async.py][sample_analyze_orchestration_app_luis_response_async] | Same as orchestration sample, but in this case the best response will be a LUIS project | + +## Next Steps Check out the [API reference documentation][api_reference_documentation] to learn more about what you can do with the Azure Conversational Language Understanding client library. -| **Advanced Sample File Name** | **Description** | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -| [sample_analyze_workflow_app_with_params.py][sample_analyze_workflow_app_with_params] and [sample_analyze_workflow_app_with_params_async.py][sample_analyze_workflow_app_with_params_async] | Same as workflow sample, but with ability to customize call with parameters | [azure_subscription]: https://azure.microsoft.com/free/ [azure_clu_account]: https://language.azure.com/clu/projects @@ -66,9 +73,17 @@ what you can do with the Azure Conversational Language Understanding client libr [sample_authentication_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_authentication_async.py [sample_analyze_conversation_app]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app.py [sample_analyze_conversation_app_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_async.py -[sample_analyze_workflow_app]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_workflow_app.py -[sample_analyze_workflow_app_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_workflow_app_async.py -[sample_analyze_workflow_app_with_params]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_workflow_app_with_params.py -[sample_analyze_workflow_app_with_params_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_workflow_app_with_params_async.py -[api_reference_documentation]: https://language.azure.com/clu/projects +[sample_analyze_conversation_app_language_parm]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app_language_parm.py +[sample_analyze_conversation_app_language_parm_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_language_parm_async.py +[sample_analyze_orchestration_app]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app.py +[sample_analyze_orchestration_app_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_async.py +[sample_analyze_orchestration_app_qna_response]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_qna_response.py +[sample_analyze_orchestration_app_qna_response_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_qna_response_async.py +[sample_analyze_orchestration_app_conversation_response]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_conversation_response.py +[sample_analyze_orchestration_app_conversation_response_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_conversation_response_async.py +[sample_analyze_orchestration_app_luis_response]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_luis_response.py +[sample_analyze_orchestration_app_luis_response_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_luis_response_async.py +[sample_analyze_orchestration_app_with_params]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_with_params.py +[sample_analyze_orchestration_app_with_params_async]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_with_params_async.py +[api_reference_documentation]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-conversations/latest/azure.ai.language.conversations.html [versioning_story_readme]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-conversations#install-the-package diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_async.py index e500223bc143..3382199b2679 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_async.py @@ -8,9 +8,9 @@ FILE: sample_analyze_conversation_app_async.py DESCRIPTION: - This sample demonstrates how to analyze user query for intents and entities using a deepstack project. + This sample demonstrates how to analyze user query for intents and entities using a conversation project. - For more info about how to setup a CLU deepstack project, see the README. + For more info about how to setup a CLU conversation project, see the README. USAGE: python sample_analyze_conversation_app_async.py @@ -30,7 +30,7 @@ async def sample_analyze_conversation_app_async(): from azure.core.credentials import AzureKeyCredential from azure.ai.language.conversations.aio import ConversationAnalysisClient - from azure.ai.language.conversations.models import AnalyzeConversationOptions + from azure.ai.language.conversations.models import ConversationAnalysisOptions # get secrets conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] @@ -39,7 +39,7 @@ async def sample_analyze_conversation_app_async(): # prepare data query = "One california maki please." - input = AnalyzeConversationOptions( + input = ConversationAnalysisOptions( query=query ) @@ -57,7 +57,7 @@ async def sample_analyze_conversation_app_async(): print("project kind: {}\n".format(result.prediction.project_kind)) print("view top intent:") - print("top intent: {}".format(result.prediction.top_intent)) + print("\ttop intent: {}".format(result.prediction.top_intent)) print("\tcategory: {}".format(result.prediction.intents[0].category)) print("\tconfidence score: {}\n".format(result.prediction.intents[0].confidence_score)) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_language_parm_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_language_parm_async.py new file mode 100644 index 000000000000..835035df43f3 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_conversation_app_language_parm_async.py @@ -0,0 +1,78 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_conversation_app_language_parm_async.py + +DESCRIPTION: + This sample demonstrates how to analyze user query for intents and entities using + a conversation project with a language parameter. + + For more info about how to setup a CLU conversation project, see the README. + +USAGE: + python sample_analyze_conversation_app_language_parm_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_PROJECT - the name of your CLU conversations project. +""" + +import asyncio + +async def sample_analyze_conversation_app_language_parm_async(): + # [START analyze_conversation_app_language_parm_async] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations.aio import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + conv_project = os.environ["AZURE_CONVERSATIONS_PROJECT"] + + # prepare data + query = "One california maki please." + input = ConversationAnalysisOptions( + query=query, + language="en" + ) + + # analyze quey + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=conv_project, + deployment_name='production' + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + print("\ttop intent: {}".format(result.prediction.top_intent)) + print("\tcategory: {}".format(result.prediction.intents[0].category)) + print("\tconfidence score: {}\n".format(result.prediction.intents[0].confidence_score)) + + print("view entities:") + for entity in result.prediction.entities: + print("\tcategory: {}".format(entity.category)) + print("\ttext: {}".format(entity.text)) + print("\tconfidence score: {}".format(entity.confidence_score)) + # [END analyze_conversation_app_language_parm_async] + +async def main(): + await sample_analyze_conversation_app_language_parm_async() + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_async.py new file mode 100644 index 000000000000..d21a4e39eb0f --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_async.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app_async.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + In this sample, orchestration project's top intent will map to a Question Answering project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +import asyncio + +async def sample_analyze_orchestration_app_async(): + # [START analyze_orchestration_app] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations.aio import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "How do you make sushi rice?", + input = ConversationAnalysisOptions( + query=query + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view Question Answering result:") + print("\tresult: {}\n".format(top_intent_object.result)) + # [END analyze_orchestration_app] + +async def main(): + await sample_analyze_orchestration_app_async() + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_conversation_response_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_conversation_response_async.py new file mode 100644 index 000000000000..dd34d5352c02 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_conversation_response_async.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app_conversation_response_async.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + In this sample, orchestration project's top intent will map to a conversation project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app_conversation_response_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +import asyncio + +async def sample_analyze_orchestration_app_conversation_response_async(): + # [START analyze_orchestration_app_conversation_response_async] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations.aio import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "Sushi", + input = ConversationAnalysisOptions( + query=query + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view conversation result:\n") + + # print("view intents:") + # for intent in top_intent_object.result.prediction.intents: + # print("\tcategory: {}".format(intent.category)) + # print("\tconfidence score: {}".format(intent.confidence_score)) + + # print("view entities:") + # for entity in top_intent_object.result.prediction.entities: + # print("\tcategory: {}".format(entity.category)) + # print("\ttext: {}".format(entity.text)) + # print("\tconfidence score: {}".format(entity.confidence_score)) + # [END analyze_orchestration_app_conversation_response_async] + +async def main(): + await sample_analyze_orchestration_app_conversation_response_async() + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_luis_response_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_luis_response_async.py new file mode 100644 index 000000000000..428c32769edd --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_luis_response_async.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app_luis_response_async.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + In this sample, orchestration project's top intent will map to a LUIS project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app_luis_response_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +import asyncio + +async def sample_analyze_orchestration_app_luis_response_async(): + # [START analyze_orchestration_app_luis_response_async] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations.aio import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "book me a flight ticket to Bali", + input = ConversationAnalysisOptions( + query=query + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view luis response:") + luis_response = result.prediction.intents[top_intent].result + print("\tluis response: {}\n".format(luis_response)) + # [END analyze_orchestration_app_luis_response_async] + +async def main(): + await sample_analyze_orchestration_app_luis_response_async() + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_qna_response_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_qna_response_async.py new file mode 100644 index 000000000000..017a63b3d9fb --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_qna_response_async.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app_qna_response_async.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + In this sample, orchestration project's top intent will map to a Qna project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app_qna_response_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +import asyncio + +async def sample_analyze_orchestration_app_qna_response_async(): + # [START analyze_orchestration_app_qna_response_async] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations.aio import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "How do you make sushi rice?", + input = ConversationAnalysisOptions( + query=query + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view qna result:") + qna_result = result.prediction.intents[top_intent].result + for answer in qna_result.answers: + print("\tanswer: {}\n".format(answer.answer)) + # [END analyze_orchestration_app_qna_response_async] + + +async def main(): + await sample_analyze_orchestration_app_qna_response_async() + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_with_params_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_with_params_async.py new file mode 100644 index 000000000000..85d85eea14c8 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/async/sample_analyze_orchestration_app_with_params_async.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app_with_params_async.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + In this sample, worflow project's top intent will map to a Question Answering project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app_with_params_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +import asyncio + +async def sample_analyze_orchestration_app_with_params_async(): + # [START analyze_orchestration_app_with_params] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations.aio import ConversationAnalysisClient + from azure.ai.language.conversations.models import ( + ConversationAnalysisOptions, + QuestionAnsweringParameters, + ConversationParameters, + ) + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "How do you make sushi rice?", + input = ConversationAnalysisOptions( + query=query, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + calling_options={ + "question": query, + "top": 1, + "confidenceScoreThreshold": 0.1 + } + ), + "SushiOrder": ConversationParameters( + calling_options={ + "verbose": True + } + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view Question Answering result:") + print("\tresult: {}\n".format(top_intent_object.result)) + # [END analyze_orchestration_app_with_params] + + +async def main(): + await sample_analyze_orchestration_app_with_params_async() + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app.py index f7994db10de0..1c8f0c5eed0f 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app.py @@ -8,9 +8,9 @@ FILE: sample_analyze_conversation_app.py DESCRIPTION: - This sample demonstrates how to analyze user query for intents and entities using a deepstack project. + This sample demonstrates how to analyze user query for intents and entities using a conversation project. - For more info about how to setup a CLU deepstack project, see the README. + For more info about how to setup a CLU conversation project, see the README. USAGE: python sample_analyze_conversation_app.py @@ -28,7 +28,7 @@ def sample_analyze_conversation_app(): from azure.core.credentials import AzureKeyCredential from azure.ai.language.conversations import ConversationAnalysisClient - from azure.ai.language.conversations.models import AnalyzeConversationOptions + from azure.ai.language.conversations.models import ConversationAnalysisOptions # get secrets conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] @@ -37,7 +37,7 @@ def sample_analyze_conversation_app(): # prepare data query = "One california maki please." - input = AnalyzeConversationOptions( + input = ConversationAnalysisOptions( query=query ) @@ -55,7 +55,7 @@ def sample_analyze_conversation_app(): print("project kind: {}\n".format(result.prediction.project_kind)) print("view top intent:") - print("top intent: {}".format(result.prediction.top_intent)) + print("\ttop intent: {}".format(result.prediction.top_intent)) print("\tcategory: {}".format(result.prediction.intents[0].category)) print("\tconfidence score: {}\n".format(result.prediction.intents[0].confidence_score)) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app_language_parm.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app_language_parm.py new file mode 100644 index 000000000000..69486b088d46 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app_language_parm.py @@ -0,0 +1,73 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_conversation_app_language_parm.py + +DESCRIPTION: + This sample demonstrates how to analyze user query for intents and entities using + a conversation project with a language parameter. + + For more info about how to setup a CLU conversation project, see the README. + +USAGE: + python sample_analyze_conversation_app_language_parm.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_PROJECT - the name of your CLU conversations project. +""" + +def sample_analyze_conversation_app_language_parm(): + # [START analyze_conversation_app_language_parm] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + conv_project = os.environ["AZURE_CONVERSATIONS_PROJECT"] + + # prepare data + query = "One california maki please." + input = ConversationAnalysisOptions( + query=query, + language="en" + ) + + # analyze quey + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=conv_project, + deployment_name='production' + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + print("\ttop intent: {}".format(result.prediction.top_intent)) + print("\tcategory: {}".format(result.prediction.intents[0].category)) + print("\tconfidence score: {}\n".format(result.prediction.intents[0].confidence_score)) + + print("view entities:") + for entity in result.prediction.entities: + print("\tcategory: {}".format(entity.category)) + print("\ttext: {}".format(entity.text)) + print("\tconfidence score: {}".format(entity.confidence_score)) + # [END analyze_conversation_app_language_parm] + + +if __name__ == '__main__': + sample_analyze_conversation_app_language_parm() diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app.py new file mode 100644 index 000000000000..9de90369506b --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +def sample_analyze_orchestration_app(): + # [START analyze_orchestration_app] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "How do you make sushi rice?", + input = ConversationAnalysisOptions( + query=query + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view result:") + print("\tresult: {}\n".format(top_intent_object.result)) + # [END analyze_orchestration_app] + +if __name__ == '__main__': + sample_analyze_orchestration_app() \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_conversation_response.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_conversation_response.py new file mode 100644 index 000000000000..bd1ab80b6e31 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_conversation_response.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app_conversation_response.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + In this sample, orchestration project's top intent will map to a conversation project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app_conversation_response.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +def sample_analyze_orchestration_app_conversation_response(): + # [START analyze_orchestration_app_conversation_response] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "One california maki please.", + input = ConversationAnalysisOptions( + query=query + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view conversation result:\n") + + # print("view intents:") + # for intent in top_intent_object.result.prediction.intents: + # print("\tcategory: {}".format(intent.category)) + # print("\tconfidence score: {}".format(intent.confidence_score)) + + # print("view entities:") + # for entity in top_intent_object.result.prediction.entities: + # print("\tcategory: {}".format(entity.category)) + # print("\ttext: {}".format(entity.text)) + # print("\tconfidence score: {}".format(entity.confidence_score)) + # [END analyze_orchestration_app_conversation_response] + +if __name__ == '__main__': + sample_analyze_orchestration_app_conversation_response() \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_luis_response.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_luis_response.py new file mode 100644 index 000000000000..4e85c382ceab --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_luis_response.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app_luis_response.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + In this sample, orchestration project's top intent will map to a LUIS project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app_luis_response.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +def sample_analyze_orchestration_app_luis_response(): + # [START analyze_orchestration_app_luis_response] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "book me a flight ticket to Bali", + input = ConversationAnalysisOptions( + query=query + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view luis response:") + luis_response = result.prediction.intents[top_intent].result + print("\tluis response: {}\n".format(luis_response)) + # [END analyze_orchestration_app_luis_response] + +if __name__ == '__main__': + sample_analyze_orchestration_app_luis_response() \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_qna_response.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_qna_response.py new file mode 100644 index 000000000000..400f99786bca --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_qna_response.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app_qna_response.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + In this sample, orchestration project's top intent will map to a Qna project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app_qna_response.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +def sample_analyze_orchestration_app_qna_response(): + # [START analyze_orchestration_app_qna_response] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations import ConversationAnalysisClient + from azure.ai.language.conversations.models import ConversationAnalysisOptions + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "How do you make sushi rice?", + input = ConversationAnalysisOptions( + query=query + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view qna result:") + qna_result = result.prediction.intents[top_intent].result + for answer in qna_result.answers: + print("\tanswer: {}\n".format(answer.answer)) + # [END analyze_orchestration_app_qna_response] + +if __name__ == '__main__': + sample_analyze_orchestration_app_qna_response() \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_with_params.py b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_with_params.py new file mode 100644 index 000000000000..ce6e2c2d55fb --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_orchestration_app_with_params.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +""" +FILE: sample_analyze_orchestration_app_with_params.py + +DESCRIPTION: + This sample demonstrates how to analyze user query using an orchestration project. + In this sample, worflow project's top intent will map to a Qna project. + + For more info about how to setup a CLU orchestration project, see the README. + +USAGE: + python sample_analyze_orchestration_app_with_params.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_CONVERSATIONS_ENDPOINT - the endpoint to your CLU resource. + 2) AZURE_CONVERSATIONS_KEY - your CLU API key. + 3) AZURE_CONVERSATIONS_WORKFLOW_PROJECT - the name of your CLU orchestration project. +""" + +def sample_analyze_orchestration_app_with_params(): + # [START analyze_orchestration_app_with_params] + # import libraries + import os + from azure.core.credentials import AzureKeyCredential + + from azure.ai.language.conversations import ConversationAnalysisClient + from azure.ai.language.conversations.models import ( + ConversationAnalysisOptions, + QuestionAnsweringParameters, + ConversationParameters, + ) + + # get secrets + conv_endpoint = os.environ["AZURE_CONVERSATIONS_ENDPOINT"] + conv_key = os.environ["AZURE_CONVERSATIONS_KEY"] + orchestration_project = os.environ["AZURE_CONVERSATIONS_WORKFLOW_PROJECT"] + + # prepare data + query = "How do you make sushi rice?", + input = ConversationAnalysisOptions( + query=query, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + calling_options={ + "question": query, + "top": 1, + "confidenceScoreThreshold": 0.1 + } + ), + "SushiOrder": ConversationParameters( + calling_options={ + "verbose": True + } + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_endpoint, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # view result + print("query: {}".format(result.query)) + print("project kind: {}\n".format(result.prediction.project_kind)) + + print("view top intent:") + top_intent = result.prediction.top_intent + print("\ttop intent: {}".format(top_intent)) + top_intent_object = result.prediction.intents[top_intent] + print("\tconfidence score: {}\n".format(top_intent_object.confidence_score)) + + print("view result:") + print("\tresult: {}\n".format(top_intent_object.result)) + # [END analyze_orchestration_app_with_params] + + +if __name__ == '__main__': + sample_analyze_orchestration_app_with_params() \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_conversation_app_async.test_conversation_app.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_conversation_app_async.test_conversation_app.yaml new file mode 100644 index 000000000000..b190027baa9b --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_conversation_app_async.test_conversation_app.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"query": "One california maki please."}' + headers: + Accept: + - application/json + Content-Length: + - '40' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-project&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: '{"query":"One california maki please.","prediction":{"topIntent":"Order","projectKind":"conversation","intents":[{"category":"Order","confidenceScore":1}],"entities":[{"category":"OrderItem","text":"california + maki","offset":4,"length":15,"confidenceScore":1}]}}' + headers: + apim-request-id: 87b3b6ef-b1e5-4ff8-a378-d34b7d0fe040 + cache-control: no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: application/json; charset=utf-8 + date: Thu, 28 Oct 2021 15:00:10 GMT + pragma: no-cache + request-id: 87b3b6ef-b1e5-4ff8-a378-d34b7d0fe040 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '42' + status: + code: 200 + message: OK + url: https://antischsdktest.cognitiveservices.azure.com/language/:analyze-conversations?projectName=antischOne&deploymentName=production&api-version=2021-11-01-preview +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_conversation_app_async.test_conversation_app_with_dictparams.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_conversation_app_async.test_conversation_app_with_dictparams.yaml new file mode 100644 index 000000000000..4de936033832 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_conversation_app_async.test_conversation_app_with_dictparams.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"query": "One california maki please."}' + headers: + Accept: + - application/json + Content-Length: + - '40' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-project&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: '{"query":"One california maki please.","prediction":{"topIntent":"Order","projectKind":"conversation","intents":[{"category":"Order","confidenceScore":1}],"entities":[{"category":"OrderItem","text":"california + maki","offset":4,"length":15,"confidenceScore":1}]}}' + headers: + apim-request-id: 67a9790b-8430-470e-8284-fae857c7adae + cache-control: no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: application/json; charset=utf-8 + date: Thu, 28 Oct 2021 15:00:11 GMT + pragma: no-cache + request-id: 67a9790b-8430-470e-8284-fae857c7adae + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '40' + status: + code: 200 + message: OK + url: https://antischsdktest.cognitiveservices.azure.com/language/:analyze-conversations?projectName=antischOne&deploymentName=production&api-version=2021-11-01-preview +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app.yaml new file mode 100644 index 000000000000..201bb68e8ed6 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app.yaml @@ -0,0 +1,76 @@ +interactions: +- request: + body: '{"query": "How do you make sushi rice?"}' + headers: + Accept: + - application/json + Content-Length: + - '40' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-workflow&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: "{\"query\":\"How do you make sushi rice?\",\"prediction\":{\"topIntent\":\"SushiMaking\",\"projectKind\":\"workflow\",\"intents\":{\"SushiMaking\":{\"confidenceScore\":0.77994794,\"targetKind\":\"question_answering\",\"result\":{\"answers\":[{\"questions\":[],\"answer\":\"#### + Sushi Rice (Shari) adapted from Sushi Made Easy by K. Wong\\n\\nIngredients: + 2 cups sushi rice or short-grain rice 2 \xBD cups cold water (or amount of + water suggested on rice package if different for 2 cups of rice)\\n\\nVinegar + Mixture 4 tbsp. rice vinegar 2 tbsp. sugar 1/2 tsp. salt\\n\\nDirections:\\n\\nWash + the rice until water runs clear (do not skip this step, it is essential in + achieving the correct consistency to work with your rice).\\n\\n2. Place the + rice in a pot with a tight fitting lid and add the water.\",\"confidenceScore\":0.6334000000000001,\"id\":0,\"source\":\"sushi(1).pdf\",\"metadata\":{},\"answerSpan\":{\"text\":\"2 + cups\",\"confidenceScore\":0.25120000000000003,\"offset\":77,\"length\":7}}]}},\"SushiOrder\":{\"confidenceScore\":0.7317708,\"targetKind\":\"conversation\"},\"None\":{\"confidenceScore\":0,\"targetKind\":\"non_linked\"}}}}" + headers: + apim-request-id: 6ca10ed1-20de-4560-9bc8-4c5beb0c6652 + cache-control: no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: application/json; charset=utf-8 + date: Thu, 28 Oct 2021 15:00:12 GMT + pragma: no-cache + request-id: 6ca10ed1-20de-4560-9bc8-4c5beb0c6652 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '615' + status: + code: 200 + message: OK + url: https://antischsdktest.cognitiveservices.azure.com/language/:analyze-conversations?projectName=antischTwo&deploymentName=production&api-version=2021-11-01-preview +- request: + body: '{"query": "I will have sashimi"}' + headers: + Accept: + - application/json + Content-Length: + - '32' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-workflow&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: '{"query":"I will have sashimi","prediction":{"topIntent":"SushiMaking","projectKind":"workflow","intents":{"SushiMaking":{"confidenceScore":0.79296875,"targetKind":"question_answering","result":{"answers":[{"questions":[],"answer":"Put + the dark brown sugar, oil, vinegar and garlic in a zip lock plastic bag and + shake to mix well. Put the flank steak in the bag, close, and toss to coat + the steak evenly with the marinade. Let sit to rest at least 30 minutes.","confidenceScore":0.19149999999999998,"id":0,"source":"SushiQuikCompleteRecipeBook.pdf","metadata":{},"answerSpan":{"text":"flank + steak","confidenceScore":0.527,"offset":106,"length":12}}]}},"SushiOrder":{"confidenceScore":0.78515625,"targetKind":"conversation"},"None":{"confidenceScore":0,"targetKind":"non_linked"}}}}' + headers: + apim-request-id: 7fe89c7a-5d95-4d4b-a8e9-7f0b26f94099 + cache-control: no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: application/json; charset=utf-8 + date: Thu, 28 Oct 2021 15:00:13 GMT + pragma: no-cache + request-id: 7fe89c7a-5d95-4d4b-a8e9-7f0b26f94099 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '540' + status: + code: 200 + message: OK + url: https://antischsdktest.cognitiveservices.azure.com/language/:analyze-conversations?projectName=antischTwo&deploymentName=production&api-version=2021-11-01-preview +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app_with_model.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app_with_model.yaml new file mode 100644 index 000000000000..65318a865bd8 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app_with_model.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"query": "How do you make sushi rice?", "parameters": {"SushiMaking": + {"targetKind": "question_answering", "callingOptions": {"question": "How do + you make sushi rice?", "top": 1, "confidence_score_threshold": 0.1}}, "SushiOrder": + {"targetKind": "conversation", "callingOptions": {"verbose": true}}}}' + headers: + Accept: + - application/json + Content-Length: + - '300' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-workflow&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: "{\"query\":\"How do you make sushi rice?\",\"prediction\":{\"topIntent\":\"SushiMaking\",\"projectKind\":\"workflow\",\"intents\":{\"SushiMaking\":{\"confidenceScore\":0.77994794,\"targetKind\":\"question_answering\",\"result\":{\"answers\":[{\"questions\":[],\"answer\":\"#### + Sushi Rice (Shari) adapted from Sushi Made Easy by K. Wong\\n\\nIngredients: + 2 cups sushi rice or short-grain rice 2 \xBD cups cold water (or amount of + water suggested on rice package if different for 2 cups of rice)\\n\\nVinegar + Mixture 4 tbsp. rice vinegar 2 tbsp. sugar 1/2 tsp. salt\\n\\nDirections:\\n\\nWash + the rice until water runs clear (do not skip this step, it is essential in + achieving the correct consistency to work with your rice).\\n\\n2. Place the + rice in a pot with a tight fitting lid and add the water.\",\"confidenceScore\":0.6334000000000001,\"id\":0,\"source\":\"sushi(1).pdf\",\"metadata\":{},\"answerSpan\":{\"text\":\"2 + cups\",\"confidenceScore\":0.25120000000000003,\"offset\":77,\"length\":7}}]}},\"SushiOrder\":{\"confidenceScore\":0.7317708,\"targetKind\":\"conversation\"},\"None\":{\"confidenceScore\":0,\"targetKind\":\"non_linked\"}}}}" + headers: + apim-request-id: ce74035e-bdcb-4e8c-968e-77990660fe23 + cache-control: no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: application/json; charset=utf-8 + date: Thu, 28 Oct 2021 15:00:15 GMT + pragma: no-cache + request-id: ce74035e-bdcb-4e8c-968e-77990660fe23 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '772' + status: + code: 200 + message: OK + url: https://antischsdktest.cognitiveservices.azure.com/language/:analyze-conversations?projectName=antischTwo&deploymentName=production&api-version=2021-11-01-preview +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app_with_parameters.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app_with_parameters.yaml new file mode 100644 index 000000000000..d521f16fe0c2 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/recordings/test_orchestration_app_async.test_orchestration_app_with_parameters.yaml @@ -0,0 +1,44 @@ +interactions: +- request: + body: '{"query": "(''How do you make sushi rice?'',)", "parameters": {"SushiMaking": + {"targetKind": "question_answering", "callingOptions": {"question": "(''How + do you make sushi rice?'',)", "top": 1, "confidenceScoreThreshold": 0.1}}, "SushiOrder": + {"targetKind": "conversation", "callingOptions": {"verbose": true}}}}' + headers: + Accept: + - application/json + Content-Length: + - '308' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-workflow&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: "{\"query\":\"('How do you make sushi rice?',)\",\"prediction\":{\"topIntent\":\"SushiMaking\",\"projectKind\":\"workflow\",\"intents\":{\"SushiMaking\":{\"confidenceScore\":0.7864583,\"targetKind\":\"question_answering\",\"result\":{\"answers\":[{\"questions\":[],\"answer\":\"#### + Sushi Rice (Shari) adapted from Sushi Made Easy by K. Wong\\n\\nIngredients: + 2 cups sushi rice or short-grain rice 2 \xBD cups cold water (or amount of + water suggested on rice package if different for 2 cups of rice)\\n\\nVinegar + Mixture 4 tbsp. rice vinegar 2 tbsp. sugar 1/2 tsp. salt\\n\\nDirections:\\n\\nWash + the rice until water runs clear (do not skip this step, it is essential in + achieving the correct consistency to work with your rice).\\n\\n2. Place the + rice in a pot with a tight fitting lid and add the water.\",\"confidenceScore\":0.5602,\"id\":0,\"source\":\"sushi(1).pdf\",\"metadata\":{},\"answerSpan\":{\"text\":\"2 + cups sushi rice or short-grain rice 2 \xBD cups cold water\",\"confidenceScore\":0.2865,\"offset\":77,\"length\":58}}]}},\"SushiOrder\":{\"confidenceScore\":0.7239583,\"targetKind\":\"conversation\"},\"None\":{\"confidenceScore\":0,\"targetKind\":\"non_linked\"}}}}" + headers: + apim-request-id: 4fcbb0ee-19bf-49ee-8ccc-71e2d77aa2c1 + cache-control: no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: application/json; charset=utf-8 + date: Thu, 28 Oct 2021 15:00:17 GMT + pragma: no-cache + request-id: 4fcbb0ee-19bf-49ee-8ccc-71e2d77aa2c1 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '634' + status: + code: 200 + message: OK + url: https://antischsdktest.cognitiveservices.azure.com/language/:analyze-conversations?projectName=antischTwo&deploymentName=production&api-version=2021-11-01-preview +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_conversation_app_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_conversation_app_async.py new file mode 100644 index 000000000000..21369aa0166a --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_conversation_app_async.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest + +from azure.core.exceptions import HttpResponseError, ClientAuthenticationError +from azure.core.credentials import AzureKeyCredential + +from testcase import GlobalConversationAccountPreparer +from asynctestcase import AsyncConversationTest + +from azure.ai.language.conversations.aio import ConversationAnalysisClient +from azure.ai.language.conversations.models import ( + ConversationAnalysisOptions, + AnalyzeConversationResult, + ConversationPrediction +) + + +class ConversationAppAsyncTests(AsyncConversationTest): + + @GlobalConversationAccountPreparer() + async def test_conversation_app(self, conv_account, conv_key, conv_project): + + # prepare data + query = "One california maki please." + input = ConversationAnalysisOptions( + query=query, + ) + + # analyze quey + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=conv_project, + deployment_name='production' + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, ConversationPrediction) + assert result.prediction.project_kind == 'conversation' + assert result.prediction.top_intent == 'Order' + assert len(result.prediction.entities) > 0 + assert len(result.prediction.intents) > 0 + assert result.prediction.intents[0].category == 'Order' + assert result.prediction.intents[0].confidence_score > 0 + assert result.prediction.entities[0].category == 'OrderItem' + assert result.prediction.entities[0].text == 'california maki' + assert result.prediction.entities[0].confidence_score > 0 + + @GlobalConversationAccountPreparer() + async def test_conversation_app_with_dictparams(self, conv_account, conv_key, conv_project): + + # prepare data + query = "One california maki please." + params = { + "query": query, + } + + # analyze quey + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + params, + project_name=conv_project, + deployment_name='production' + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, ConversationPrediction) + assert result.prediction.project_kind == 'conversation' + assert result.prediction.top_intent == 'Order' + assert len(result.prediction.entities) > 0 + assert len(result.prediction.intents) > 0 + assert result.prediction.intents[0].category == 'Order' + assert result.prediction.intents[0].confidence_score > 0 + assert result.prediction.entities[0].category == 'OrderItem' + assert result.prediction.entities[0].text == 'california maki' + assert result.prediction.entities[0].confidence_score > 0 + + \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_orchestration_app_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_orchestration_app_async.py new file mode 100644 index 000000000000..7f760a467bcf --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_orchestration_app_async.py @@ -0,0 +1,151 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest + +from azure.core.exceptions import HttpResponseError, ClientAuthenticationError +from azure.core.credentials import AzureKeyCredential + +from testcase import GlobalConversationAccountPreparer +from asynctestcase import AsyncConversationTest + +from azure.ai.language.conversations.aio import ConversationAnalysisClient +from azure.ai.language.conversations.models import ( + AnalyzeConversationResult, + AnalysisParameters, + AnalyzeConversationResult, + QuestionAnsweringParameters, + ConversationParameters, + ConversationCallingOptions, + QuestionAnsweringTargetIntentResult, + OrchestratorPrediction, + ConversationAnalysisOptions +) + +class OrchestrationAppAsyncTests(AsyncConversationTest): + + @GlobalConversationAccountPreparer() + async def test_orchestration_app(self, conv_account, conv_key, orchestration_project): + + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + async with client: + + # analyze query + query = "How do you make sushi rice?" + result = await client.analyze_conversations( + {"query": query}, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + top_intent = "SushiMaking" + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == top_intent + assert isinstance(result.prediction.intents[top_intent], QuestionAnsweringTargetIntentResult) + + # analyze query + query = "I will have sashimi" + result = await client.analyze_conversations( + {"query": query}, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + # assert result.prediction.top_intent == "SushiOrder" --> wrong top intent! + # assert isinstance(result.prediction.intents, ConversationTargetIntentResult) + + + @GlobalConversationAccountPreparer() + async def test_orchestration_app_with_parameters(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "How do you make sushi rice?", + input = ConversationAnalysisOptions( + query=query, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + calling_options={ + "question": query, + "top": 1, + "confidenceScoreThreshold": 0.1 + } + ), + "SushiOrder": ConversationParameters( + calling_options={ + "verbose": True + } + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + top_intent = "SushiMaking" + assert isinstance(result, AnalyzeConversationResult) + # assert result.query == query --> weird behavior here! + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == top_intent + assert isinstance(result.prediction.intents[top_intent], QuestionAnsweringTargetIntentResult) + + + @GlobalConversationAccountPreparer() + async def test_orchestration_app_with_model(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "How do you make sushi rice?" + input = ConversationAnalysisOptions( + query=query, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + calling_options={ + "question":query, + "top":1, + "confidence_score_threshold":0.1 + } + ), + "SushiOrder": ConversationParameters( + calling_options=ConversationCallingOptions( + verbose=True + ) + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + top_intent = "SushiMaking" + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == top_intent + assert isinstance(result.prediction.intents[top_intent], QuestionAnsweringTargetIntentResult) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_orchestration_direct_async.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_orchestration_direct_async.py new file mode 100644 index 000000000000..eee9d536f691 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/async/test_orchestration_direct_async.py @@ -0,0 +1,175 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest + +from azure.core.exceptions import HttpResponseError, ClientAuthenticationError +from azure.core.credentials import AzureKeyCredential + +from testcase import GlobalConversationAccountPreparer +from asynctestcase import AsyncConversationTest + +from azure.ai.language.conversations.aio import ConversationAnalysisClient +from azure.ai.language.conversations.models import ( + AnalysisParameters, + AnalyzeConversationResult, + QuestionAnsweringParameters, + # ConversationParameters, + # OrchestratorPrediction, + # QuestionAnsweringTargetIntentResult, + # ConversationTargetIntentResult, + # LUISTargetIntentResult +) + +class OrchestrationAppDirectAsyncTests(AsyncConversationTest): + + @pytest.mark.skip(reason="internal server error!") + @GlobalConversationAccountPreparer() + async def test_direct_kb_intent(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "How do you make sushi rice?" + target_intent = "SushiMaking" + input = AnalysisParameters( + query=query, + direct_target=target_intent, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + calling_options={ + "question": query, + "top": 1, + "confidenceScoreThreshold": 0.1 + } + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + # assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == target_intent + # assert isinstance(result.prediction.intents, QuestionAnsweringTargetIntentResult) + + @pytest.mark.skip(reason="internal server error!") + @GlobalConversationAccountPreparer() + async def test_kb_intent_with_model(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "How do you make sushi rice?" + target_intent = "SushiMaking" + input = AnalysisParameters( + query=query, + direct_target=target_intent, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + calling_options={ + "question": query, + "top": 1, + "confidenceScoreThreshold": 0.1 + } + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + # assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == target_intent + # assert isinstance(result.prediction.intents, QuestionAnsweringTargetIntentResult) + + @pytest.mark.skip(reason="internal server error!") + @GlobalConversationAccountPreparer() + async def test_conversation_intent(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "I will have the oyako donburi please." + target_intent = "SushiOrder" + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + input = AnalysisParameters( + query=query, + direct_target=target_intent, + parameters={ + # "SushiOrder": ConversationParameters( + # calling_options={ + # "verbose": True, + # } + # ) + } + ) + + # analyze query + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + # assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == target_intent + # assert isinstance(result.prediction.intents, ConversationTargetIntentResult) + + @pytest.mark.skip(reason="internal server error!") + @GlobalConversationAccountPreparer() + async def test_luis_intent(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "I will have the oyako donburi please." + target_intent = "SushiOrder" + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + input = AnalysisParameters( + query=query, + direct_target=target_intent, + parameters={ + # "SushiOrder": ConversationParameters( + # calling_options={ + # "verbose": True, + # } + # ) + } + ) + + # analyze query + async with client: + result = await client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + # assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == target_intent + # assert isinstance(result.prediction.intents, LUISTargetIntentResult) \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_conversation_app.test_conversation_app.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_conversation_app.test_conversation_app.yaml index 2c7a6cc30bcd..4ec8fbdd55e9 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_conversation_app.test_conversation_app.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_conversation_app.test_conversation_app.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: !!python/unicode '{"query": "One california maki please."}' + body: '{"query": "One california maki please."}' headers: Accept: - application/json @@ -13,31 +13,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-conversations/1.0.0b1 Python/2.7.18 (Windows-10-10.0.19041) + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?api-version=2021-07-15-preview&projectName=test-project&deploymentName=production + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-project&deploymentName=production&api-version=2021-11-01-preview response: body: - string: !!python/unicode "{\n \"query\": \"One california maki please.\",\n - \ \"prediction\": {\n \"intents\": [\n {\n \"category\": \"Order\",\n - \ \"confidenceScore\": 1\n }\n ],\n \"entities\": [\n {\n - \ \"category\": \"OrderItem\",\n \"text\": \"california maki\",\n - \ \"offset\": 4,\n \"length\": 15,\n \"confidenceScore\": - 1\n }\n ],\n \"topIntent\": \"Order\",\n \"projectType\": \"conversation\"\n - \ }\n}" + string: '{"query":"One california maki please.","prediction":{"topIntent":"Order","projectKind":"conversation","intents":[{"category":"Order","confidenceScore":1}],"entities":[{"category":"OrderItem","text":"california + maki","offset":4,"length":15,"confidenceScore":1}]}}' headers: apim-request-id: - - 02b21bc7-d52c-48f4-8ecb-5ec8b95c0822 + - a040b58d-0e08-45bd-aa45-36904e24abf6 cache-control: - no-store, proxy-revalidate, no-cache, max-age=0, private content-type: - application/json; charset=utf-8 date: - - Thu, 30 Sep 2021 17:41:07 GMT + - Thu, 28 Oct 2021 15:00:01 GMT pragma: - no-cache request-id: - - 02b21bc7-d52c-48f4-8ecb-5ec8b95c0822 + - a040b58d-0e08-45bd-aa45-36904e24abf6 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '126' + - '42' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_conversation_app.test_conversation_app_with_dictparams.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_conversation_app.test_conversation_app_with_dictparams.yaml index fb25b0bf0925..4ebac5b5090f 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_conversation_app.test_conversation_app_with_dictparams.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_conversation_app.test_conversation_app_with_dictparams.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: !!python/unicode '{"query": "One california maki please."}' + body: '{"query": "One california maki please."}' headers: Accept: - application/json @@ -13,31 +13,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-conversations/1.0.0b1 Python/2.7.18 (Windows-10-10.0.19041) + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?api-version=2021-07-15-preview&projectName=test-project&deploymentName=production + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-project&deploymentName=production&api-version=2021-11-01-preview response: body: - string: !!python/unicode "{\n \"query\": \"One california maki please.\",\n - \ \"prediction\": {\n \"intents\": [\n {\n \"category\": \"Order\",\n - \ \"confidenceScore\": 1\n }\n ],\n \"entities\": [\n {\n - \ \"category\": \"OrderItem\",\n \"text\": \"california maki\",\n - \ \"offset\": 4,\n \"length\": 15,\n \"confidenceScore\": - 1\n }\n ],\n \"topIntent\": \"Order\",\n \"projectType\": \"conversation\"\n - \ }\n}" + string: '{"query":"One california maki please.","prediction":{"topIntent":"Order","projectKind":"conversation","intents":[{"category":"Order","confidenceScore":1}],"entities":[{"category":"OrderItem","text":"california + maki","offset":4,"length":15,"confidenceScore":1}]}}' headers: apim-request-id: - - 2c325546-f02f-43fd-afb0-e9d5c2f1b418 + - 2ed02857-3030-4bd3-a976-1a7b218138e0 cache-control: - no-store, proxy-revalidate, no-cache, max-age=0, private content-type: - application/json; charset=utf-8 date: - - Thu, 30 Sep 2021 17:41:09 GMT + - Thu, 28 Oct 2021 15:00:03 GMT pragma: - no-cache request-id: - - 2c325546-f02f-43fd-afb0-e9d5c2f1b418 + - 2ed02857-3030-4bd3-a976-1a7b218138e0 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '73' + - '42' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app.yaml new file mode 100644 index 000000000000..c964a79e1b5b --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app.yaml @@ -0,0 +1,102 @@ +interactions: +- request: + body: '{"query": "How do you make sushi rice?"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '40' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-workflow&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: "{\"query\":\"How do you make sushi rice?\",\"prediction\":{\"topIntent\":\"SushiMaking\",\"projectKind\":\"workflow\",\"intents\":{\"SushiMaking\":{\"confidenceScore\":0.77994794,\"targetKind\":\"question_answering\",\"result\":{\"answers\":[{\"questions\":[],\"answer\":\"#### + Sushi Rice (Shari) adapted from Sushi Made Easy by K. Wong\\n\\nIngredients: + 2 cups sushi rice or short-grain rice 2 \xBD cups cold water (or amount of + water suggested on rice package if different for 2 cups of rice)\\n\\nVinegar + Mixture 4 tbsp. rice vinegar 2 tbsp. sugar 1/2 tsp. salt\\n\\nDirections:\\n\\nWash + the rice until water runs clear (do not skip this step, it is essential in + achieving the correct consistency to work with your rice).\\n\\n2. Place the + rice in a pot with a tight fitting lid and add the water.\",\"confidenceScore\":0.6334000000000001,\"id\":0,\"source\":\"sushi(1).pdf\",\"metadata\":{},\"answerSpan\":{\"text\":\"2 + cups\",\"confidenceScore\":0.25120000000000003,\"offset\":77,\"length\":7}}]}},\"SushiOrder\":{\"confidenceScore\":0.7317708,\"targetKind\":\"conversation\"},\"None\":{\"confidenceScore\":0,\"targetKind\":\"non_linked\"}}}}" + headers: + apim-request-id: + - a0540c2d-549e-45e2-9dbe-a6d86e47d194 + cache-control: + - no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 Oct 2021 15:00:04 GMT + pragma: + - no-cache + request-id: + - a0540c2d-549e-45e2-9dbe-a6d86e47d194 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '887' + status: + code: 200 + message: OK +- request: + body: '{"query": "I will have sashimi"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '32' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-workflow&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: '{"query":"I will have sashimi","prediction":{"topIntent":"SushiMaking","projectKind":"workflow","intents":{"SushiMaking":{"confidenceScore":0.79296875,"targetKind":"question_answering","result":{"answers":[{"questions":[],"answer":"Put + the dark brown sugar, oil, vinegar and garlic in a zip lock plastic bag and + shake to mix well. Put the flank steak in the bag, close, and toss to coat + the steak evenly with the marinade. Let sit to rest at least 30 minutes.","confidenceScore":0.19149999999999998,"id":0,"source":"SushiQuikCompleteRecipeBook.pdf","metadata":{},"answerSpan":{"text":"flank + steak","confidenceScore":0.527,"offset":106,"length":12}}]}},"SushiOrder":{"confidenceScore":0.78515625,"targetKind":"conversation"},"None":{"confidenceScore":0,"targetKind":"non_linked"}}}}' + headers: + apim-request-id: + - b8937fc2-cd3c-4d4f-a06d-6485643e2974 + cache-control: + - no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 Oct 2021 15:00:05 GMT + pragma: + - no-cache + request-id: + - b8937fc2-cd3c-4d4f-a06d-6485643e2974 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '829' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app_with_model.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app_with_model.yaml new file mode 100644 index 000000000000..101aef5fd56e --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app_with_model.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + body: '{"query": "How do you make sushi rice?", "parameters": {"SushiMaking": + {"targetKind": "question_answering", "callingOptions": {"question": "How do + you make sushi rice?", "top": 1, "confidence_score_threshold": 0.1}}, "SushiOrder": + {"targetKind": "conversation", "callingOptions": {"verbose": true}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '300' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-workflow&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: "{\"query\":\"How do you make sushi rice?\",\"prediction\":{\"topIntent\":\"SushiMaking\",\"projectKind\":\"workflow\",\"intents\":{\"SushiMaking\":{\"confidenceScore\":0.77994794,\"targetKind\":\"question_answering\",\"result\":{\"answers\":[{\"questions\":[],\"answer\":\"#### + Sushi Rice (Shari) adapted from Sushi Made Easy by K. Wong\\n\\nIngredients: + 2 cups sushi rice or short-grain rice 2 \xBD cups cold water (or amount of + water suggested on rice package if different for 2 cups of rice)\\n\\nVinegar + Mixture 4 tbsp. rice vinegar 2 tbsp. sugar 1/2 tsp. salt\\n\\nDirections:\\n\\nWash + the rice until water runs clear (do not skip this step, it is essential in + achieving the correct consistency to work with your rice).\\n\\n2. Place the + rice in a pot with a tight fitting lid and add the water.\",\"confidenceScore\":0.6334000000000001,\"id\":0,\"source\":\"sushi(1).pdf\",\"metadata\":{},\"answerSpan\":{\"text\":\"2 + cups\",\"confidenceScore\":0.25120000000000003,\"offset\":77,\"length\":7}}]}},\"SushiOrder\":{\"confidenceScore\":0.7317708,\"targetKind\":\"conversation\"},\"None\":{\"confidenceScore\":0,\"targetKind\":\"non_linked\"}}}}" + headers: + apim-request-id: + - a7ac4b5e-88d8-4654-91df-71366845c8c5 + cache-control: + - no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 Oct 2021 15:00:07 GMT + pragma: + - no-cache + request-id: + - a7ac4b5e-88d8-4654-91df-71366845c8c5 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '641' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app_with_parameters.yaml b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app_with_parameters.yaml new file mode 100644 index 000000000000..32f508a1aead --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/recordings/test_orchestration_app.test_orchestration_app_with_parameters.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + body: '{"query": "(''How do you make sushi rice?'',)", "parameters": {"SushiMaking": + {"targetKind": "question_answering", "callingOptions": {"question": "(''How + do you make sushi rice?'',)", "top": 1, "confidenceScoreThreshold": 0.1}}, "SushiOrder": + {"targetKind": "conversation", "callingOptions": {"verbose": true}}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '308' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-conversations/1.0.0b1 Python/3.9.7 (Windows-10-10.0.19043-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:analyze-conversations?projectName=test-workflow&deploymentName=production&api-version=2021-11-01-preview + response: + body: + string: "{\"query\":\"('How do you make sushi rice?',)\",\"prediction\":{\"topIntent\":\"SushiMaking\",\"projectKind\":\"workflow\",\"intents\":{\"SushiMaking\":{\"confidenceScore\":0.7864583,\"targetKind\":\"question_answering\",\"result\":{\"answers\":[{\"questions\":[],\"answer\":\"#### + Sushi Rice (Shari) adapted from Sushi Made Easy by K. Wong\\n\\nIngredients: + 2 cups sushi rice or short-grain rice 2 \xBD cups cold water (or amount of + water suggested on rice package if different for 2 cups of rice)\\n\\nVinegar + Mixture 4 tbsp. rice vinegar 2 tbsp. sugar 1/2 tsp. salt\\n\\nDirections:\\n\\nWash + the rice until water runs clear (do not skip this step, it is essential in + achieving the correct consistency to work with your rice).\\n\\n2. Place the + rice in a pot with a tight fitting lid and add the water.\",\"confidenceScore\":0.5602,\"id\":0,\"source\":\"sushi(1).pdf\",\"metadata\":{},\"answerSpan\":{\"text\":\"2 + cups sushi rice or short-grain rice 2 \xBD cups cold water\",\"confidenceScore\":0.2865,\"offset\":77,\"length\":58}}]}},\"SushiOrder\":{\"confidenceScore\":0.7239583,\"targetKind\":\"conversation\"},\"None\":{\"confidenceScore\":0,\"targetKind\":\"non_linked\"}}}}" + headers: + apim-request-id: + - 4ca6e417-47e8-45a6-b5d9-8053bdae1ddb + cache-control: + - no-store, proxy-revalidate, no-cache, max-age=0, private + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 Oct 2021 15:00:09 GMT + pragma: + - no-cache + request-id: + - 4ca6e417-47e8-45a6-b5d9-8053bdae1ddb + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '978' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_app.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_app.py index 8dd770ff9b4c..c5ed8c4a0d3e 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_app.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_conversation_app.py @@ -16,9 +16,9 @@ from azure.ai.language.conversations import ConversationAnalysisClient from azure.ai.language.conversations.models import ( - AnalyzeConversationOptions, + ConversationAnalysisOptions, AnalyzeConversationResult, - DeepstackPrediction + ConversationPrediction ) @@ -29,7 +29,7 @@ def test_conversation_app(self, conv_account, conv_key, conv_project): # prepare data query = "One california maki please." - input = AnalyzeConversationOptions( + input = ConversationAnalysisOptions( query=query, ) @@ -45,7 +45,7 @@ def test_conversation_app(self, conv_account, conv_key, conv_project): # assert assert isinstance(result, AnalyzeConversationResult) assert result.query == query - assert isinstance(result.prediction, DeepstackPrediction) + assert isinstance(result.prediction, ConversationPrediction) assert result.prediction.project_kind == 'conversation' assert result.prediction.top_intent == 'Order' assert len(result.prediction.entities) > 0 @@ -64,6 +64,7 @@ def test_conversation_app_with_dictparams(self, conv_account, conv_key, conv_pro query = "One california maki please." params = { "query": query, + "api_version": "2021-11-01-preview" } # analyze quey @@ -78,7 +79,7 @@ def test_conversation_app_with_dictparams(self, conv_account, conv_key, conv_pro # assert assert isinstance(result, AnalyzeConversationResult) assert result.query == query - assert isinstance(result.prediction, DeepstackPrediction) + assert isinstance(result.prediction, ConversationPrediction) assert result.prediction.project_kind == 'conversation' assert result.prediction.top_intent == 'Order' assert len(result.prediction.entities) > 0 diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_app.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_app.py new file mode 100644 index 000000000000..da018335055e --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_app.py @@ -0,0 +1,151 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest + +from azure.core.exceptions import HttpResponseError, ClientAuthenticationError +from azure.core.credentials import AzureKeyCredential + +from testcase import ( + ConversationTest, + GlobalConversationAccountPreparer +) + +from azure.ai.language.conversations import ConversationAnalysisClient +from azure.ai.language.conversations.models import ( + AnalyzeConversationResult, + QuestionAnsweringParameters, + ConversationParameters, + ConversationCallingOptions, + QuestionAnsweringTargetIntentResult, + OrchestratorPrediction, + ConversationAnalysisOptions +) + +class OrchestrationAppTests(ConversationTest): + + @GlobalConversationAccountPreparer() + def test_orchestration_app(self, conv_account, conv_key, orchestration_project): + + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + with client: + + # analyze query + query = "How do you make sushi rice?" + result = client.analyze_conversations( + {"query": query}, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + top_intent = "SushiMaking" + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == top_intent + assert isinstance(result.prediction.intents[top_intent], QuestionAnsweringTargetIntentResult) + + # analyze query + query = "I will have sashimi" + result = client.analyze_conversations( + {"query": query}, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + # assert result.prediction.top_intent == "SushiOrder" --> wrong top intent! + # assert isinstance(result.prediction.intents, ConversationTargetIntentResult) + + + @GlobalConversationAccountPreparer() + def test_orchestration_app_with_parameters(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "How do you make sushi rice?", + input = ConversationAnalysisOptions( + query=query, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + calling_options={ + "question": query, + "top": 1, + "confidenceScoreThreshold": 0.1 + } + ), + "SushiOrder": ConversationParameters( + calling_options={ + "verbose": True + } + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + top_intent = "SushiMaking" + assert isinstance(result, AnalyzeConversationResult) + # assert result.query == query --> weird behavior here! + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == top_intent + assert isinstance(result.prediction.intents[top_intent], QuestionAnsweringTargetIntentResult) + + + @GlobalConversationAccountPreparer() + def test_orchestration_app_with_model(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "How do you make sushi rice?" + input = ConversationAnalysisOptions( + query=query, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + calling_options={ + "question":query, + "top":1, + "confidence_score_threshold":0.1 + } + ), + "SushiOrder": ConversationParameters( + calling_options=ConversationCallingOptions( + verbose=True + ) + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + top_intent = "SushiMaking" + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == top_intent + assert isinstance(result.prediction.intents[top_intent], QuestionAnsweringTargetIntentResult) diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_direct.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_direct.py new file mode 100644 index 000000000000..84b31382d2dd --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/test_orchestration_direct.py @@ -0,0 +1,179 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import pytest + +from azure.core.exceptions import HttpResponseError, ClientAuthenticationError +from azure.core.credentials import AzureKeyCredential + +from testcase import ( + ConversationTest, + GlobalConversationAccountPreparer +) + +from azure.ai.language.conversations import ConversationAnalysisClient +from azure.ai.language.conversations.models import ( + AnalysisParameters, + AnalyzeConversationResult, + QuestionAnsweringParameters, + ConversationParameters, + OrchestratorPrediction, + QuestionAnsweringTargetIntentResult, + ConversationTargetIntentResult, + LUISTargetIntentResult +) + + +class OrchestrationAppDirectTests(ConversationTest): + + @pytest.mark.skip(reason="internal server error!") + @GlobalConversationAccountPreparer() + def test_direct_kb_intent(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "How do you make sushi rice?" + target_intent = "SushiMaking" + input = AnalysisParameters( + query=query, + direct_target=target_intent, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + calling_options={ + "question": query, + "top": 1, + "confidenceScoreThreshold": 0.1 + } + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == target_intent + assert isinstance(result.prediction.intents, QuestionAnsweringTargetIntentResult) + + @pytest.mark.skip(reason="internal server error!") + @GlobalConversationAccountPreparer() + def test_kb_intent_with_model(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "How do you make sushi rice?" + target_intent = "SushiMaking" + input = AnalysisParameters( + query=query, + direct_target=target_intent, + parameters={ + "SushiMaking": QuestionAnsweringParameters( + caling_options={ + "question":query, + "top":1, + "confidence_score_threshold":0.1 + } + ) + } + ) + + # analyze query + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == target_intent + assert isinstance(result.prediction.intents, QuestionAnsweringTargetIntentResult) + + @pytest.mark.skip(reason="internal server error!") + @GlobalConversationAccountPreparer() + def test_conversation_intent(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "I will have the oyako donburi please." + target_intent = "SushiOrder" + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + input = AnalysisParameters( + query=query, + direct_target=target_intent, + parameters={ + "SushiOrder": ConversationParameters( + calling_options={ + "verbose": True, + } + ) + } + ) + + # analyze query + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == target_intent + assert isinstance(result.prediction.intents, ConversationTargetIntentResult) + + + @pytest.mark.skip(reason="internal server error!") + @GlobalConversationAccountPreparer() + def test_luis_intent(self, conv_account, conv_key, orchestration_project): + + # prepare data + query = "I will have the oyako donburi please." + target_intent = "SushiOrder" + client = ConversationAnalysisClient(conv_account, AzureKeyCredential(conv_key)) + input = AnalysisParameters( + query=query, + direct_target=target_intent, + parameters={ + "SushiOrder": ConversationParameters( + calling_options={ + "verbose": True, + } + ) + } + ) + + # analyze query + with client: + result = client.analyze_conversations( + input, + project_name=orchestration_project, + deployment_name='production', + ) + + # assert + assert isinstance(result, AnalyzeConversationResult) + assert result.query == query + assert isinstance(result.prediction, OrchestratorPrediction) + assert result.prediction.project_kind == "workflow" + assert result.prediction.top_intent == target_intent + assert isinstance(result.prediction.intents, LUISTargetIntentResult) \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/testcase.py b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/testcase.py index 7894ef03185c..0e26485968ef 100644 --- a/sdk/cognitivelanguage/azure-ai-language-conversations/tests/testcase.py +++ b/sdk/cognitivelanguage/azure-ai-language-conversations/tests/testcase.py @@ -85,7 +85,7 @@ def create_resource(self, name, **kwargs): 'conv_account': os.environ.get("AZURE_CONVERSATIONS_ENDPOINT"), 'conv_key': os.environ.get("AZURE_CONVERSATIONS_KEY"), 'conv_project': os.environ.get("AZURE_CONVERSATIONS_PROJECT"), - 'workflow_project': os.environ.get("AZURE_CONVERSATIONS_WORKFLOW_PROJECT") + 'orchestration_project': os.environ.get("AZURE_CONVERSATIONS_WORKFLOW_PROJECT") } return { 'location': REGION, @@ -93,5 +93,5 @@ def create_resource(self, name, **kwargs): 'conv_account': TEST_ENDPOINT, 'conv_key': TEST_KEY, 'conv_project': TEST_PROJECT, - 'workflow_project': TEST_WORKFLOW + 'orchestration_project': TEST_WORKFLOW } diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/CHANGELOG.md b/sdk/cognitivelanguage/azure-ai-language-questionanswering/CHANGELOG.md index fd174f1b91e9..597044c35da0 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/CHANGELOG.md +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/CHANGELOG.md @@ -1,8 +1,52 @@ # Release History -## 1.0.0b2 (2021-10-06) +## 1.0.1 (Unreleased) -* We are now targeting service version `2021-07-15-preview` +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0 (2021-11-03) + +* We are now targeting service version `2021-10-01` + +### Breaking Changes + +* Method `QuestionAnsweringClient.query_knowledge_base` has been renamed to `get_answers` +* Method `QuestionAnsweringClient.query_text` has been renamed to `get_answers_from_text` +* Model `QueryKnowledgeBaseOptions` has been renamed to `AnswersOptions` +* Method kwarg and model property `QueryKnowledgeBaseOptions.confidence_score_threshold` has been renamed to `AnswersOptions.confidence_threshold` +* Method kwarg and model property `QueryKnowledgeBaseOptions.answer_span_request` has been renamed to `AnswersOptions.short_answer_options` +* Method kwarg and model property `QueryKnowledgeBaseOptions.ranker_type` has been renamed to `AnswersOptions.ranker_kind` +* Method kwarg and model property `QueryKnowledgeBaseOptions.context` has been renamed to `AnswersOptions.answer_context` +* Model `QueryTextOptions` has been renamed to `AnswersFromTextOptions` +* Method kwarg and model property `QueryTextOptions.records` has been renamed to `AnswersFromTextOptions.text_documents` +* Model `AnswerSpanRequest` has been renamed to `ShortAnswerOptions` +* Model property `AnswerSpanRequest.confidence_score_threshold` has been renamed to `ShortAnswerOptions.confidence_threshold` +* Model property `AnswerSpanRequest.top_answers_with_span` has been renamed to `ShortAnswerOptions.top` +* Model `KnowledgeBaseAnswerRequestContext` has been renamed to `KnowledgeBaseAnswerContext` +* Model property `KnowledgeBaseAnswerRequestContext.previous_user_query` has been renamed to `KnowledgeBaseAnswerContext.previous_question` +* Model `TextRecord` has been renamed to `TextDocument` +* Model `KnowledgeBaseAnswers` has been renamed to `AnswersResult` +* Model `TextAnswers` has been renamed to `AnswersFromTextResult` +* Model property `KnowledgeBaseAnswer.answer_span` has been renamed to `KnowledgeBaseAnswer.short_answer` +* Model property `KnowledgeBaseAnswer.id` has been renamed to `KnowledgeBaseAnswer.qna_id` +* Model property `KnowledgeBaseAnswer.confidence_score` has been renamed to `KnowledgeBaseAnswer.confidence` +* Model property `AnswerSpan.confidence_score` has been renamed to `AnswerSpan.confidence` +* Model property `TextAnswer.confidence_score` has been renamed to `TextAnswer.confidence` +* Model property `TextAnswer.answer_span` has been renamed to `TextAnswer.short_answer` +* Enums `LogicalOperationKind` and `RankerType` have been removed +* The `operations` and `aio.operations` namespaces are no longer public + +### Bugs Fixed + +* Fixed formating of `MetadataFilter.metadata` + +## 1.0.0b2 (2021-10-06) * We are now targeting service version `2021-07-15-preview` diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/README.md b/sdk/cognitivelanguage/azure-ai-language-questionanswering/README.md index 54ac12b9699e..d765e26f5fd5 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/README.md +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/README.md @@ -78,42 +78,36 @@ The following examples show common scenarios using the `client` [created above]( The only input required to ask a question using a knowledge base is just the question itself: ```python -from azure.ai.language.questionanswering import models as qna - -params = qna.QueryKnowledgeBaseOptions( - question="How long should my Surface battery last?" -) - -output = client.query_knowledge_base( - params, +output = client.get_answers( + question="How long should my Surface battery last?", project_name="FAQ", + deployment_name="test" ) for candidate in output.answers: - print("({}) {}".format(candidate.confidence_score, candidate.answer)) + print("({}) {}".format(candidate.confidence, candidate.answer)) print("Source: {}".format(candidate.source)) ``` -You can set additional properties on `QueryKnowledgeBaseOptions` to limit the number of answers, specify a minimum confidence score, and more. +You can set additional keyword options to limit the number of answers, specify a minimum confidence score, and more. ### Ask a follow-up question If your knowledge base is configured for [chit-chat][questionanswering_docs_chat], the answers from the knowledge base may include suggested [prompts for follow-up questions][questionanswering_refdocs_prompts] to initiate a conversation. You can ask a follow-up question by providing the ID of your chosen answer as the context for the continued conversation: ```python -params = qna.models.QueryKnowledgeBaseOptions( - question="How long should charging take?" - context=qna.models.KnowledgeBaseAnswerRequestContext( - previous_qna_id=previous_answer.id - ) -) +from azure.ai.language.questionanswering import models -output = client.query_knowledge_base( - params, - project_name="FAQ" +output = client.get_answers( + question="How long should charging take?", + answer_context=models.KnowledgeBaseAnswerContext( + previous_qna_id=previous_answer.qna_id + ), + project_name="FAQ", + deployment_name="live" ) for candidate in output.answers: - print("({}) {}".format(candidate.confidence_score, candidate.answer)) + print("({}) {}".format(candidate.confidence, candidate.answer)) print("Source: {}".format(candidate.source)) ``` @@ -125,17 +119,13 @@ The above examples can also be run asynchronously using the client in the `aio` ```python from azure.core.credentials import AzureKeyCredential from azure.ai.language.questionanswering.aio import QuestionAnsweringClient -from azure.ai.language.questionanswering import models as qna client = QuestionAnsweringClient(endpoint, credential) -params = qna.QueryKnowledgeBaseOptions( - question="How long should my Surface battery last?" -) - -output = await client.query_knowledge_base( - params, - project_name="FAQ" +output = await client.get_answers( + question="How long should my Surface battery last?", + project_name="FAQ", + deployment_name="production" ) ``` @@ -156,9 +146,10 @@ For example, if you submit a question to a non-existant knowledge base, a `400` from azure.core.exceptions import HttpResponseError try: - client.query_knowledge_base( - params, - project_name="invalid-knowledge-base" + client.get_answers( + question="Why?", + project_name="invalid-knowledge-base", + deployment_name="test" ) except HttpResponseError as error: print("Query failed: {}".format(error.message)) @@ -208,15 +199,15 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [azure_core_ref_docs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/latest/azure.core.html [azure_core_readme]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md [pip_link]: https://pypi.org/project/pip/ -[questionanswering_client_class]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-questionanswering/1.0.0b1/azure.ai.language.questionanswering.html#azure.ai.language.questionanswering.QuestionAnsweringClient -[questionanswering_refdocs_prompts]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-questionanswering/1.0.0b1/azure.ai.language.questionanswering.models.html#azure.ai.language.questionanswering.models.KnowledgeBaseAnswerDialog +[questionanswering_client_class]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-questionanswering/latest/azure.ai.language.questionanswering.html#azure.ai.language.questionanswering.QuestionAnsweringClient +[questionanswering_refdocs_prompts]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-questionanswering/latest/azure.ai.language.questionanswering.models.html#azure.ai.language.questionanswering.models.KnowledgeBaseAnswerDialog [questionanswering_client_src]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-questionanswering/ [questionanswering_docs]: https://azure.microsoft.com/services/cognitive-services/qna-maker/ [questionanswering_docs_chat]: https://docs.microsoft.com/azure/cognitive-services/qnamaker/how-to/chit-chat-knowledge-base [questionanswering_docs_demos]: https://azure.microsoft.com/services/cognitive-services/qna-maker/#demo [questionanswering_docs_features]: https://azure.microsoft.com/services/cognitive-services/qna-maker/#features [questionanswering_pypi_package]: https://pypi.org/project/azure-ai-language-questionanswering/ -[questionanswering_refdocs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-questionanswering/1.0.0b1/azure.ai.language.questionanswering.html +[questionanswering_refdocs]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-ai-language-questionanswering/latest/azure.ai.language.questionanswering.html [questionanswering_rest_docs]: https://docs.microsoft.com/rest/api/cognitiveservices-qnamaker/ [questionanswering_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/README.md diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_configuration.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_configuration.py index 6b3cac6d6fc9..c8394d09e40d 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_configuration.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_configuration.py @@ -47,7 +47,7 @@ def __init__( self.endpoint = endpoint self.credential = credential - self.api_version = "2021-07-15-preview" + self.api_version = "2021-10-01" kwargs.setdefault("sdk_moniker", "ai-language-questionanswering/{}".format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/operations/__init__.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/__init__.py similarity index 100% rename from sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/operations/__init__.py rename to sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/__init__.py diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/_operations.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/_operations.py new file mode 100644 index 000000000000..be0a5fa6bbd8 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_operations/_operations.py @@ -0,0 +1,301 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 functools +from typing import TYPE_CHECKING, overload +import warnings + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer + +from .. import models as _models +from .._patch import ( + _validate_text_records, + _get_positional_body, + _verify_qna_id_and_question, + _handle_metadata_filter_conversion, +) + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar("T") + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +# fmt: off + +def build_get_answers_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + project_name = kwargs.pop('project_name') # type: str + deployment_name = kwargs.pop('deployment_name') # type: str + + api_version = "2021-10-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/:query-knowledgebases') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['projectName'] = _SERIALIZER.query("project_name", project_name, 'str') + query_parameters['deploymentName'] = _SERIALIZER.query("deployment_name", deployment_name, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_answers_from_text_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-10-01" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/:query-text') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class QuestionAnsweringClientOperationsMixin(object): + @overload + def get_answers( + self, + options, # type: "_models.AnswersOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.AnswersResult" + pass + + @overload + def get_answers( + self, **kwargs # type: Any + ): + # type: (...) -> "_models.AnswersResult" + pass + + @distributed_trace + def get_answers( + self, + *args, # type: "_models.AnswersOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.AnswersResult" + """Answers the specified question using your knowledge base. + + :param options: Positional only. POST body of the request. Provide either `options`, OR + individual keyword arguments. If both are provided, only the options object will be used. + :type options: ~azure.ai.language.questionanswering.models.AnswersOptions + :keyword project_name: The name of the knowledge base project to use. + :paramtype project_name: str + :keyword deployment_name: The name of the specific deployment of the project to use. + :paramtype deployment_name: str + :keyword qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over + question. + :paramtype qna_id: int + :keyword question: User question to query against the knowledge base. + :paramtype question: str + :keyword top: Max number of answers to be returned for the question. + :paramtype top: int + :keyword user_id: Unique identifier for the user. + :paramtype user_id: str + :keyword confidence_threshold: Minimum threshold score for answers, value ranges from 0 to 1. + :paramtype confidence_threshold: float + :keyword answer_context: Context object with previous QnA's information. + :paramtype answer_context: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerContext + :keyword ranker_kind: Type of ranker to be used. Possible + values include: "Default", "QuestionOnly". + :paramtype ranker_kind: str + :keyword filters: Filter QnAs based on given metadata list and knowledge base sources. + :paramtype filters: ~azure.ai.language.questionanswering.models.QueryFilters + :keyword short_answer_options: To configure Answer span prediction feature. + :paramtype short_answer_options: ~azure.ai.language.questionanswering.models.ShortAnswerOptions + :keyword include_unstructured_sources: (Optional) Flag to enable Query over Unstructured + Sources. + :paramtype include_unstructured_sources: bool + :return: AnswersResult + :rtype: ~azure.ai.language.questionanswering.models.AnswersResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + options = _get_positional_body(*args, **kwargs) or _models.AnswersOptions( + qna_id=kwargs.pop("qna_id", None), + question=kwargs.pop("question", None), + top=kwargs.pop("top", None), + user_id=kwargs.pop("user_id", None), + confidence_threshold=kwargs.pop("confidence_threshold", None), + answer_context=kwargs.pop("answer_context", None), + ranker_kind=kwargs.pop("ranker_kind", None), + filters=kwargs.pop("filters", None), + short_answer_options=kwargs.pop("short_answer_options", None), + include_unstructured_sources=kwargs.pop("include_unstructured_sources", None), + ) + _verify_qna_id_and_question(options) + options = _handle_metadata_filter_conversion(options) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AnswersResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + project_name = kwargs.pop("project_name") # type: str + deployment_name = kwargs.pop("deployment_name") # type: str + + json = self._serialize.body(options, "AnswersOptions") + + request = build_get_answers_request( + content_type=content_type, + project_name=project_name, + deployment_name=deployment_name, + json=json, + template_url=self.get_answers.metadata["url"], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("AnswersResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_answers.metadata = {"url": "/:query-knowledgebases"} # type: ignore + + @overload + def get_answers_from_text( + self, + options, # type: "_models.AnswersFromTextOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.AnswersFromTextResult" + pass + + @overload + def get_answers_from_text( + self, **kwargs # type: Any + ): + # type: (...) -> "_models.AnswersFromTextResult" + pass + + @distributed_trace + def get_answers_from_text( + self, + *args, # type: "_models.AnswersFromTextOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.AnswersFromTextResult" + """Answers the specified question using the provided text in the body. + + :param options: Positional only. POST body of the request. Provide either `options`, OR + individual keyword arguments. If both are provided, only the options object will be used. + :type options: ~azure.ai.language.questionanswering.models.AnswersFromTextOptions + :keyword question: User question to query against the given text records. + :paramtype question: str + :keyword text_documents: Text records to be searched for given question. + :paramtype text_documents: list[str or ~azure.ai.language.questionanswering.models.TextDocument] + :keyword language: Language of the text records. This is BCP-47 representation of a language. + For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + :return: AnswersFromTextResult + :rtype: ~azure.ai.language.questionanswering.models.AnswersFromTextResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + options = _get_positional_body(*args, **kwargs) or _models.AnswersFromTextOptions( + question=kwargs.pop("question"), + text_documents=kwargs.pop("text_documents"), + language=kwargs.pop("language", self._default_language), + ) + try: + options["records"] = _validate_text_records(options["records"]) + except TypeError: + options.text_documents = _validate_text_records(options.text_documents) + + cls = kwargs.pop("cls", None) # type: ClsType["_models.AnswersFromTextResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + + json = self._serialize.body(options, "AnswersFromTextOptions") + + request = build_get_answers_from_text_request( + content_type=content_type, + json=json, + template_url=self.get_answers_from_text.metadata["url"], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("AnswersFromTextResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_answers_from_text.metadata = {"url": "/:query-text"} # type: ignore diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_patch.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_patch.py index 44a5cd3f4d5c..405303abc494 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_patch.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_patch.py @@ -5,28 +5,23 @@ # -------------------------------------------------------------------------- import six - -from .models import TextRecord +import copy +from .models import TextDocument def _validate_text_records(records): if not records: - raise ValueError("Input records can not be empty or None") + raise ValueError("Input documents can not be empty or None") if isinstance(records, six.string_types): - raise TypeError("Input records cannot be a string.") + raise TypeError("Input documents cannot be a string.") if isinstance(records, dict): - raise TypeError("Input records cannot be a dict") + raise TypeError("Input documents cannot be a dict") if not all(isinstance(x, six.string_types) for x in records): - if not all( - isinstance(x, (dict, TextRecord)) - for x in records - ): - raise TypeError( - "Mixing string and dictionary/object record input unsupported." - ) + if not all(isinstance(x, (dict, TextDocument)) for x in records): + raise TypeError("Mixing string and dictionary/object document input unsupported.") request_batch = [] for idx, doc in enumerate(records): @@ -37,17 +32,18 @@ def _validate_text_records(records): request_batch.append(doc) return request_batch + def _get_positional_body(*args, **kwargs): """Verify args and kwargs are valid, and then return the positional body, if users passed it in.""" if len(args) > 1: raise TypeError("There can only be one positional argument, which is the POST body of this request.") - if args and "options" in kwargs: + if "options" in kwargs: raise TypeError( - "You have already supplied the request body as a positional parameter, " - "you can not supply it as a keyword argument as well." + "The 'options' parameter is positional only." ) return args[0] if args else None + def _verify_qna_id_and_question(query_knowledgebase_options): """For query_knowledge_base we require either `question` or `qna_id`.""" try: @@ -57,8 +53,34 @@ def _verify_qna_id_and_question(query_knowledgebase_options): qna_id = query_knowledgebase_options.get("qna_id") or query_knowledgebase_options.get("qnaId") question = query_knowledgebase_options.get("question") if not (qna_id or question): - raise TypeError( - "You need to pass in either `qna_id` or `question`." - ) + raise TypeError("You need to pass in either `qna_id` or `question`.") if qna_id and question: raise TypeError("You can not specify both `qna_id` and `question`.") + + +def _handle_metadata_filter_conversion(options_input): + options = copy.deepcopy(options_input) + filters = options.filters if hasattr(options, "filters") else options.get("filters", {}) + try: + if filters and filters.metadata_filter and filters.metadata_filter.metadata: + metadata_input = filters.metadata_filter.metadata + else: + metadata_input = None + in_class = True + except AttributeError: + metadata_input = filters.get("metadataFilter", {}).get("metadata") + in_class = False + if not metadata_input: + return options + try: + if any(t for t in metadata_input if len(t) != 2): + raise ValueError("'metadata' must be a sequence of key-value tuples.") + except TypeError: + raise ValueError("'metadata' must be a sequence of key-value tuples.") + + metadata_modified = [{"key": m[0], "value": m[1]} for m in metadata_input] + if in_class: + filters.metadata_filter.metadata = metadata_modified + else: + filters["metadataFilter"]["metadata"] = metadata_modified + return options diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_question_answering_client.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_question_answering_client.py index 412486ec8ab7..931d0dbb099a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_question_answering_client.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_question_answering_client.py @@ -14,7 +14,7 @@ from . import models from ._configuration import QuestionAnsweringClientConfiguration -from .operations import QuestionAnsweringClientOperationsMixin +from ._operations import QuestionAnsweringClientOperationsMixin if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -25,10 +25,10 @@ class QuestionAnsweringClient(QuestionAnsweringClientOperationsMixin): - """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in :code:`https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview`. + """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview :param endpoint: Supported Cognitive Services endpoint (e.g., - :code:`https://.api.cognitiveservices.azure.com`). + https://.api.cognitiveservices.azure.com). :type endpoint: str :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.AzureKeyCredential diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_version.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_version.py index dfa6ee022f15..961c76eb77c1 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_version.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.1" diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_configuration.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_configuration.py index ee091c9c9529..1ef4b5faf1ba 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_configuration.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_configuration.py @@ -36,7 +36,7 @@ def __init__(self, endpoint: str, credential: AzureKeyCredential, **kwargs: Any) self.endpoint = endpoint self.credential = credential - self.api_version = "2021-07-15-preview" + self.api_version = "2021-10-01" kwargs.setdefault("sdk_moniker", "ai-language-questionanswering/{}".format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/operations/__init__.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/__init__.py similarity index 100% rename from sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/operations/__init__.py rename to sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/__init__.py diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/_operations.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/_operations.py new file mode 100644 index 000000000000..89249c65d413 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_operations/_operations.py @@ -0,0 +1,232 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 functools +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, overload, Union, List +import warnings + +from azure.core.exceptions import ( + ClientAuthenticationError, + HttpResponseError, + ResourceExistsError, + ResourceNotFoundError, + map_error, +) +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ... import models as _models +from ..._operations._operations import build_get_answers_from_text_request, build_get_answers_request +from ..._patch import ( + _validate_text_records, + _get_positional_body, + _verify_qna_id_and_question, + _handle_metadata_filter_conversion, +) + +T = TypeVar("T") +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + + +class QuestionAnsweringClientOperationsMixin: + @overload + async def get_answers( + self, options: "_models.AnswersOptions", *, project_name: str, deployment_name: str, **kwargs: Any + ) -> "_models.AnswersResult": + ... + + @overload + async def get_answers( + self, + *, + project_name: str, + deployment_name: str, + qna_id: Optional[int] = None, + question: Optional[str] = None, + top: Optional[int] = None, + user_id: Optional[str] = None, + confidence_threshold: Optional[float] = None, + answer_context: Optional["_models.KnowledgeBaseAnswerContext"] = None, + ranker_kind: Optional[str] = None, + filters: Optional["_models.QueryFilters"] = None, + short_answer_options: Optional["_models.ShortAnswerOptions"] = None, + include_unstructured_sources: Optional[bool] = None, + **kwargs: Any + ) -> "_models.AnswersResult": + ... + + @distributed_trace_async + async def get_answers(self, *args, **kwargs) -> "_models.AnswersResult": + """Answers the specified question using your knowledge base. + + :param options: Positional only. POST body of the request. Either provide this + value or individual keyword arguments. + :type options: ~azure.ai.language.questionanswering.models.AnswersOptions + :keyword project_name: The name of the knowledge base project to use. + :paramtype project_name: str + :keyword deployment_name: The name of the specific deployment of the project to use. + :paramtype deployment_name: str + :keyword qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over + question. + :paramtype qna_id: int + :keyword question: User question to query against the knowledge base. + :paramtype question: str + :keyword top: Max number of answers to be returned for the question. + :paramtype top: int + :keyword user_id: Unique identifier for the user. + :paramtype user_id: str + :keyword confidence_threshold: Minimum threshold score for answers, value ranges from 0 to 1. + :paramtype confidence_threshold: float + :keyword answer_context: Context object with previous QnA's information. + :paramtype answer_context: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerContext + :keyword ranker_kind: Type of ranker to be used. Possible + values include: "Default", "QuestionOnly". + :paramtype ranker_kind: str + :keyword filters: Filter QnAs based on given metadata list and knowledge base sources. + :paramtype filters: ~azure.ai.language.questionanswering.models.QueryFilters + :keyword short_answer_options: To configure Answer span prediction feature. + :paramtype short_answer_options: ~azure.ai.language.questionanswering.models.ShortAnswerOptions + :keyword include_unstructured_sources: (Optional) Flag to enable Query over Unstructured + Sources. + :paramtype include_unstructured_sources: bool + :return: AnswersResult + :rtype: ~azure.ai.language.questionanswering.models.AnswersResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + options = _get_positional_body(*args, **kwargs) or _models.AnswersOptions( + qna_id=kwargs.pop("qna_id", None), + question=kwargs.pop("question", None), + top=kwargs.pop("top", None), + user_id=kwargs.pop("user_id", None), + confidence_threshold=kwargs.pop("confidence_threshold", None), + answer_context=kwargs.pop("answer_context", None), + ranker_kind=kwargs.pop("ranker_kind", None), + filters=kwargs.pop("filters", None), + short_answer_options=kwargs.pop("short_answer_options", None), + include_unstructured_sources=kwargs.pop("include_unstructured_sources", None), + ) + _verify_qna_id_and_question(options) + options = _handle_metadata_filter_conversion(options) + cls = kwargs.pop("cls", None) # type: ClsType["_models.AnswersResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + project_name = kwargs.pop("project_name") # type: str + deployment_name = kwargs.pop("deployment_name") # type: str + + json = self._serialize.body(options, "AnswersOptions") + + request = build_get_answers_request( + content_type=content_type, + project_name=project_name, + deployment_name=deployment_name, + json=json, + template_url=self.get_answers.metadata["url"], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("AnswersResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_answers.metadata = {"url": "/:query-knowledgebases"} # type: ignore + + @overload + async def get_answers_from_text( + self, options: "_models.AnswersFromTextOptions", **kwargs: Any + ) -> "_models.AnswersFromTextResult": + ... + + @overload + async def get_answers_from_text( + self, + *, + question: str, + text_documents: List[Union[str, "_models.TextDocument"]], + language: Optional[str] = None, + **kwargs: Any + ) -> "_models.AnswersFromTextResult": + ... + + @distributed_trace_async + async def get_answers_from_text(self, *args, **kwargs) -> "_models.AnswersFromTextResult": + """Answers the specified question using the provided text in the body. + + :param options: Positional only. POST body of the request. Provide either `options`, OR + individual keyword arguments. If both are provided, only the options object will be used. + :type options: ~azure.ai.language.questionanswering.models.AnswersFromTextOptions + :keyword question: User question to query against the given text records. + :paramtype question: str + :keyword text_documents: Text records to be searched for given question. + :paramtype text_documents: list[str or ~azure.ai.language.questionanswering.models.TextDocument] + :keyword language: Language of the text records. This is BCP-47 representation of a language. + For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + :return: AnswersFromTextResult + :rtype: ~azure.ai.language.questionanswering.models.AnswersFromTextResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + options = _get_positional_body(*args, **kwargs) or _models.AnswersFromTextOptions( + question=kwargs.pop("question"), + text_documents=kwargs.pop("text_documents"), + language=kwargs.pop("language", self._default_language), + ) + try: + options["records"] = _validate_text_records(options["records"]) + except TypeError: + options.text_documents = _validate_text_records(options.text_documents) + + cls = kwargs.pop("cls", None) # type: ClsType["_models.AnswersFromTextResult"] + error_map = {401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError} + error_map.update(kwargs.pop("error_map", {})) + content_type = kwargs.pop("content_type", "application/json") # type: Optional[str] + + json = self._serialize.body(options, "AnswersFromTextOptions") + + request = build_get_answers_from_text_request( + content_type=content_type, + json=json, + template_url=self.get_answers_from_text.metadata["url"], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, "str", skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize("AnswersFromTextResult", pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_answers_from_text.metadata = {"url": "/:query-text"} # type: ignore diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_question_answering_client.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_question_answering_client.py index e3f8ab040cd5..a294ac8c68ea 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_question_answering_client.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/aio/_question_answering_client.py @@ -16,14 +16,14 @@ from .. import models from ._configuration import QuestionAnsweringClientConfiguration -from .operations import QuestionAnsweringClientOperationsMixin +from ._operations import QuestionAnsweringClientOperationsMixin class QuestionAnsweringClient(QuestionAnsweringClientOperationsMixin): - """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in :code:`https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview`. + """The language service API is a suite of natural language processing (NLP) skills built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction, language detection and question answering. Further documentation can be found in https://docs.microsoft.com/azure/cognitive-services/text-analytics/overview :param endpoint: Supported Cognitive Services endpoint (e.g., - :code:`https://.api.cognitiveservices.azure.com`). + https://.api.cognitiveservices.azure.com). :type endpoint: str :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.AzureKeyCredential diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/__init__.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/__init__.py index e7f241830c2f..86f39c6e9b59 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/__init__.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/__init__.py @@ -8,68 +8,64 @@ try: from ._models_py3 import AnswerSpan - from ._models_py3 import AnswerSpanRequest + from ._models_py3 import AnswersFromTextOptions + from ._models_py3 import AnswersFromTextResult + from ._models_py3 import AnswersOptions + from ._models_py3 import AnswersResult from ._models_py3 import Error from ._models_py3 import ErrorResponse from ._models_py3 import InnerErrorModel from ._models_py3 import KnowledgeBaseAnswer + from ._models_py3 import KnowledgeBaseAnswerContext from ._models_py3 import KnowledgeBaseAnswerDialog from ._models_py3 import KnowledgeBaseAnswerPrompt - from ._models_py3 import KnowledgeBaseAnswerRequestContext - from ._models_py3 import KnowledgeBaseAnswers from ._models_py3 import MetadataFilter from ._models_py3 import QueryFilters - from ._models_py3 import QueryKnowledgeBaseOptions - from ._models_py3 import QueryTextOptions + from ._models_py3 import ShortAnswerOptions from ._models_py3 import TextAnswer - from ._models_py3 import TextAnswers - from ._models_py3 import TextRecord + from ._models_py3 import TextDocument except (SyntaxError, ImportError): from ._models import AnswerSpan # type: ignore - from ._models import AnswerSpanRequest # type: ignore + from ._models import AnswersFromTextOptions # type: ignore + from ._models import AnswersFromTextResult # type: ignore + from ._models import AnswersOptions # type: ignore + from ._models import AnswersResult # type: ignore from ._models import Error # type: ignore from ._models import ErrorResponse # type: ignore from ._models import InnerErrorModel # type: ignore from ._models import KnowledgeBaseAnswer # type: ignore + from ._models import KnowledgeBaseAnswerContext # type: ignore from ._models import KnowledgeBaseAnswerDialog # type: ignore from ._models import KnowledgeBaseAnswerPrompt # type: ignore - from ._models import KnowledgeBaseAnswerRequestContext # type: ignore - from ._models import KnowledgeBaseAnswers # type: ignore from ._models import MetadataFilter # type: ignore from ._models import QueryFilters # type: ignore - from ._models import QueryKnowledgeBaseOptions # type: ignore - from ._models import QueryTextOptions # type: ignore + from ._models import ShortAnswerOptions # type: ignore from ._models import TextAnswer # type: ignore - from ._models import TextAnswers # type: ignore - from ._models import TextRecord # type: ignore + from ._models import TextDocument # type: ignore from ._question_answering_client_enums import ( ErrorCode, InnerErrorCode, - LogicalOperationKind, - RankerType, ) __all__ = [ "AnswerSpan", - "AnswerSpanRequest", + "AnswersFromTextOptions", + "AnswersFromTextResult", + "AnswersOptions", + "AnswersResult", "Error", "ErrorResponse", "InnerErrorModel", "KnowledgeBaseAnswer", + "KnowledgeBaseAnswerContext", "KnowledgeBaseAnswerDialog", "KnowledgeBaseAnswerPrompt", - "KnowledgeBaseAnswerRequestContext", - "KnowledgeBaseAnswers", "MetadataFilter", "QueryFilters", - "QueryKnowledgeBaseOptions", - "QueryTextOptions", + "ShortAnswerOptions", "TextAnswer", - "TextAnswers", - "TextRecord", + "TextDocument", "ErrorCode", "InnerErrorCode", - "LogicalOperationKind", - "RankerType", ] diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_models.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_models.py index 0946d3315693..5439e4e04877 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_models.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_models.py @@ -10,13 +10,161 @@ import msrest.serialization +class AnswersFromTextOptions(msrest.serialization.Model): + """The question and text record parameters to answer. + + All required parameters must be populated in order to send to Azure. + + :ivar question: Required. User question to query against the given text records. + :vartype question: str + :ivar text_documents: Required. Text records to be searched for given question. + :vartype text_documents: list[str or ~azure.ai.language.questionanswering.models.TextDocument] + :ivar language: Language of the text records. This is BCP-47 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :vartype language: str + """ + + _validation = { + "question": {"required": True}, + "text_documents": {"required": True}, + } + + _attribute_map = { + "question": {"key": "question", "type": "str"}, + "text_documents": {"key": "records", "type": "[TextDocument]"}, + "language": {"key": "language", "type": "str"}, + "string_index_type": {"key": "stringIndexType", "type": "str"}, + } + + def __init__(self, **kwargs): + """ + :keyword question: Required. User question to query against the given text records. + :paramtype question: str + :keyword text_documents: Required. Text records to be searched for given question. + :paramtype text_documents: list[str or ~azure.ai.language.questionanswering.models.TextDocument] + :keyword language: Language of the text records. This is BCP-47 representation of a language. + For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + """ + super(AnswersFromTextOptions, self).__init__(**kwargs) + self.question = kwargs["question"] + self.text_documents = kwargs["text_documents"] + self.language = kwargs.get("language", None) + self.string_index_type = "UnicodeCodePoint" + + +class AnswersFromTextResult(msrest.serialization.Model): + """Represents the answer results. + + :ivar answers: Represents the answer results. + :vartype answers: list[~azure.ai.language.questionanswering.models.TextAnswer] + """ + + _attribute_map = { + "answers": {"key": "answers", "type": "[TextAnswer]"}, + } + + def __init__(self, **kwargs): + """ + :keyword answers: Represents the answer results. + :paramtype answers: list[~azure.ai.language.questionanswering.models.TextAnswer] + """ + super(AnswersFromTextResult, self).__init__(**kwargs) + self.answers = kwargs.get("answers", None) + + +class AnswersOptions(msrest.serialization.Model): + """Parameters to query a knowledge base. + + :ivar qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over + question. + :vartype qna_id: int + :ivar question: User question to query against the knowledge base. + :vartype question: str + :ivar top: Max number of answers to be returned for the question. + :vartype top: int + :ivar user_id: Unique identifier for the user. + :vartype user_id: str + :ivar confidence_threshold: Minimum threshold score for answers, value ranges from 0 to 1. + :vartype confidence_threshold: float + :ivar answer_context: Context object with previous QnA's information. + :vartype answer_context: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerContext + :ivar ranker_kind: Type of ranker to be used. Possible + values include: "Default", "QuestionOnly". + :vartype ranker_kind: str + :ivar filters: Filter QnAs based on given metadata list and knowledge base sources. + :vartype filters: ~azure.ai.language.questionanswering.models.QueryFilters + :ivar short_answer_options: To configure Answer span prediction feature. + :vartype short_answer_options: ~azure.ai.language.questionanswering.models.ShortAnswerOptions + :ivar include_unstructured_sources: (Optional) Flag to enable Query over Unstructured Sources. + :vartype include_unstructured_sources: bool + """ + + _validation = { + "confidence_threshold": {"maximum": 1, "minimum": 0}, + } + + _attribute_map = { + "qna_id": {"key": "qnaId", "type": "int"}, + "question": {"key": "question", "type": "str"}, + "top": {"key": "top", "type": "int"}, + "user_id": {"key": "userId", "type": "str"}, + "confidence_threshold": {"key": "confidenceScoreThreshold", "type": "float"}, + "answer_context": {"key": "context", "type": "KnowledgeBaseAnswerContext"}, + "ranker_kind": {"key": "rankerType", "type": "str"}, + "filters": {"key": "filters", "type": "QueryFilters"}, + "short_answer_options": {"key": "answerSpanRequest", "type": "ShortAnswerOptions"}, + "include_unstructured_sources": {"key": "includeUnstructuredSources", "type": "bool"}, + } + + def __init__(self, **kwargs): + """ + :keyword qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over + question. + :paramtype qna_id: int + :keyword question: User question to query against the knowledge base. + :paramtype question: str + :keyword top: Max number of answers to be returned for the question. + :paramtype top: int + :keyword user_id: Unique identifier for the user. + :paramtype user_id: str + :keyword confidence_threshold: Minimum threshold score for answers, value ranges from 0 to 1. + :paramtype confidence_threshold: float + :keyword answer_context: Context object with previous QnA's information. + :paramtype answer_context: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerContext + :keyword ranker_kind: Type of ranker to be used. Possible + values include: "Default", "QuestionOnly". + :paramtype ranker_kind: str + :keyword filters: Filter QnAs based on given metadata list and knowledge base sources. + :paramtype filters: ~azure.ai.language.questionanswering.models.QueryFilters + :keyword short_answer_options: To configure Answer span prediction feature. + :paramtype short_answer_options: ~azure.ai.language.questionanswering.models.ShortAnswerOptions + :keyword include_unstructured_sources: (Optional) Flag to enable Query over Unstructured + Sources. + :paramtype include_unstructured_sources: bool + """ + super(AnswersOptions, self).__init__(**kwargs) + self.qna_id = kwargs.get("qna_id", None) + self.question = kwargs.get("question", None) + self.top = kwargs.get("top", None) + self.user_id = kwargs.get("user_id", None) + self.confidence_threshold = kwargs.get("confidence_threshold", None) + self.answer_context = kwargs.get("answer_context", None) + self.ranker_kind = kwargs.get("ranker_kind", None) + self.filters = kwargs.get("filters", None) + self.short_answer_options = kwargs.get("short_answer_options", None) + self.include_unstructured_sources = kwargs.get("include_unstructured_sources", None) + + class AnswerSpan(msrest.serialization.Model): """Answer span object of QnA. :ivar text: Predicted text of answer span. :vartype text: str - :ivar confidence_score: Predicted score of answer span, value ranges from 0 to 1. - :vartype confidence_score: float + :ivar confidence: Predicted score of answer span, value ranges from 0 to 1. + :vartype confidence: float :ivar offset: The answer span offset from the start of answer. :vartype offset: int :ivar length: The length of the answer span. @@ -24,12 +172,12 @@ class AnswerSpan(msrest.serialization.Model): """ _validation = { - "confidence_score": {"maximum": 1, "minimum": 0}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { "text": {"key": "text", "type": "str"}, - "confidence_score": {"key": "confidenceScore", "type": "float"}, + "confidence": {"key": "confidenceScore", "type": "float"}, "offset": {"key": "offset", "type": "int"}, "length": {"key": "length", "type": "int"}, } @@ -38,8 +186,8 @@ def __init__(self, **kwargs): """ :keyword text: Predicted text of answer span. :paramtype text: str - :keyword confidence_score: Predicted score of answer span, value ranges from 0 to 1. - :paramtype confidence_score: float + :keyword confidence: Predicted score of answer span, value ranges from 0 to 1. + :paramtype confidence: float :keyword offset: The answer span offset from the start of answer. :paramtype offset: int :keyword length: The length of the answer span. @@ -47,50 +195,29 @@ def __init__(self, **kwargs): """ super(AnswerSpan, self).__init__(**kwargs) self.text = kwargs.get("text", None) - self.confidence_score = kwargs.get("confidence_score", None) + self.confidence = kwargs.get("confidence", None) self.offset = kwargs.get("offset", None) self.length = kwargs.get("length", None) -class AnswerSpanRequest(msrest.serialization.Model): - """To configure Answer span prediction feature. +class AnswersResult(msrest.serialization.Model): + """Represents List of Question Answers. - :ivar enable: Enable or disable Answer Span prediction. - :vartype enable: bool - :ivar confidence_score_threshold: Minimum threshold score required to include an answer span, - value ranges from 0 to 1. - :vartype confidence_score_threshold: float - :ivar top_answers_with_span: Number of Top answers to be considered for span prediction from 1 - to 10. - :vartype top_answers_with_span: int + :ivar answers: Represents Answer Result list. + :vartype answers: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswer] """ - _validation = { - "confidence_score_threshold": {"maximum": 1, "minimum": 0}, - "top_answers_with_span": {"maximum": 10, "minimum": 1}, - } - _attribute_map = { - "enable": {"key": "enable", "type": "bool"}, - "confidence_score_threshold": {"key": "confidenceScoreThreshold", "type": "float"}, - "top_answers_with_span": {"key": "topAnswersWithSpan", "type": "int"}, + "answers": {"key": "answers", "type": "[KnowledgeBaseAnswer]"}, } def __init__(self, **kwargs): """ - :keyword enable: Enable or disable Answer Span prediction. - :paramtype enable: bool - :keyword confidence_score_threshold: Minimum threshold score required to include an answer - span, value ranges from 0 to 1. - :paramtype confidence_score_threshold: float - :keyword top_answers_with_span: Number of Top answers to be considered for span prediction from - 1 to 10. - :paramtype top_answers_with_span: int + :keyword answers: Represents Answer Result list. + :paramtype answers: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswer] """ - super(AnswerSpanRequest, self).__init__(**kwargs) - self.enable = kwargs.get("enable", None) - self.confidence_score_threshold = kwargs.get("confidence_score_threshold", None) - self.top_answers_with_span = kwargs.get("top_answers_with_span", None) + super(AnswersResult, self).__init__(**kwargs) + self.answers = kwargs.get("answers", None) class Error(msrest.serialization.Model): @@ -100,7 +227,9 @@ class Error(msrest.serialization.Model): :ivar code: Required. One of a server-defined set of error codes. Possible values include: "InvalidRequest", "InvalidArgument", "Unauthorized", "Forbidden", "NotFound", - "TooManyRequests", "InternalServerError", "ServiceUnavailable". + "ProjectNotFound", "OperationNotFound", "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", "TooManyRequests", "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", "InternalServerError", "ServiceUnavailable". :vartype code: str or ~azure.ai.language.questionanswering.models.ErrorCode :ivar message: Required. A human-readable representation of the error. :vartype message: str @@ -130,7 +259,9 @@ def __init__(self, **kwargs): """ :keyword code: Required. One of a server-defined set of error codes. Possible values include: "InvalidRequest", "InvalidArgument", "Unauthorized", "Forbidden", "NotFound", - "TooManyRequests", "InternalServerError", "ServiceUnavailable". + "ProjectNotFound", "OperationNotFound", "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", "TooManyRequests", "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", "InternalServerError", "ServiceUnavailable". :paramtype code: str or ~azure.ai.language.questionanswering.models.ErrorCode :keyword message: Required. A human-readable representation of the error. :paramtype message: str @@ -230,14 +361,14 @@ def __init__(self, **kwargs): class KnowledgeBaseAnswer(msrest.serialization.Model): """Represents knowledge base answer. - :ivar questions: List of questions. + :ivar questions: List of questions associated with the answer. :vartype questions: list[str] - :ivar answer: The Answer. + :ivar answer: Answer text. :vartype answer: str - :ivar confidence_score: Answer confidence score, value ranges from 0 to 1. - :vartype confidence_score: float - :ivar id: ID of the QnA result. - :vartype id: int + :ivar confidence: Answer confidence score, value ranges from 0 to 1. + :vartype confidence: float + :ivar qna_id: ID of the QnA result. + :vartype qna_id: int :ivar source: Source of QnA result. :vartype source: str :ivar metadata: Metadata associated with the answer, useful to categorize or filter question @@ -245,35 +376,35 @@ class KnowledgeBaseAnswer(msrest.serialization.Model): :vartype metadata: dict[str, str] :ivar dialog: Dialog associated with Answer. :vartype dialog: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerDialog - :ivar answer_span: Answer span object of QnA with respect to user's question. - :vartype answer_span: ~azure.ai.language.questionanswering.models.AnswerSpan + :ivar short_answer: Answer span object of QnA with respect to user's question. + :vartype short_answer: ~azure.ai.language.questionanswering.models.AnswerSpan """ _validation = { - "confidence_score": {"maximum": 1, "minimum": 0}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { "questions": {"key": "questions", "type": "[str]"}, "answer": {"key": "answer", "type": "str"}, - "confidence_score": {"key": "confidenceScore", "type": "float"}, - "id": {"key": "id", "type": "int"}, + "confidence": {"key": "confidenceScore", "type": "float"}, + "qna_id": {"key": "id", "type": "int"}, "source": {"key": "source", "type": "str"}, "metadata": {"key": "metadata", "type": "{str}"}, "dialog": {"key": "dialog", "type": "KnowledgeBaseAnswerDialog"}, - "answer_span": {"key": "answerSpan", "type": "AnswerSpan"}, + "short_answer": {"key": "answerSpan", "type": "AnswerSpan"}, } def __init__(self, **kwargs): """ - :keyword questions: List of questions. + :keyword questions: List of questions associated with the answer. :paramtype questions: list[str] - :keyword answer: The Answer. + :keyword answer: Answer text. :paramtype answer: str - :keyword confidence_score: Answer confidence score, value ranges from 0 to 1. - :paramtype confidence_score: float - :keyword id: ID of the QnA result. - :paramtype id: int + :keyword confidence: Answer confidence score, value ranges from 0 to 1. + :paramtype confidence: float + :keyword qna_id: ID of the QnA result. + :paramtype qna_id: int :keyword source: Source of QnA result. :paramtype source: str :keyword metadata: Metadata associated with the answer, useful to categorize or filter question @@ -281,18 +412,50 @@ def __init__(self, **kwargs): :paramtype metadata: dict[str, str] :keyword dialog: Dialog associated with Answer. :paramtype dialog: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerDialog - :keyword answer_span: Answer span object of QnA with respect to user's question. - :paramtype answer_span: ~azure.ai.language.questionanswering.models.AnswerSpan + :keyword short_answer: Answer span object of QnA with respect to user's question. + :paramtype short_answer: ~azure.ai.language.questionanswering.models.AnswerSpan """ super(KnowledgeBaseAnswer, self).__init__(**kwargs) self.questions = kwargs.get("questions", None) self.answer = kwargs.get("answer", None) - self.confidence_score = kwargs.get("confidence_score", None) - self.id = kwargs.get("id", None) + self.confidence = kwargs.get("confidence", None) + self.qna_id = kwargs.get("qna_id", None) self.source = kwargs.get("source", None) self.metadata = kwargs.get("metadata", None) self.dialog = kwargs.get("dialog", None) - self.answer_span = kwargs.get("answer_span", None) + self.short_answer = kwargs.get("short_answer", None) + + +class KnowledgeBaseAnswerContext(msrest.serialization.Model): + """Context object with previous QnA's information. + + All required parameters must be populated in order to send to Azure. + + :ivar previous_qna_id: Required. Previous turn top answer result QnA ID. + :vartype previous_qna_id: int + :ivar previous_question: Previous user query. + :vartype previous_question: str + """ + + _validation = { + "previous_qna_id": {"required": True}, + } + + _attribute_map = { + "previous_qna_id": {"key": "previousQnaId", "type": "int"}, + "previous_question": {"key": "previousUserQuery", "type": "str"}, + } + + def __init__(self, **kwargs): + """ + :keyword previous_qna_id: Required. Previous turn top answer result QnA ID. + :paramtype previous_qna_id: int + :keyword previous_question: Previous user query. + :paramtype previous_question: str + """ + super(KnowledgeBaseAnswerContext, self).__init__(**kwargs) + self.previous_qna_id = kwargs["previous_qna_id"] + self.previous_question = kwargs.get("previous_question", None) class KnowledgeBaseAnswerDialog(msrest.serialization.Model): @@ -302,7 +465,7 @@ class KnowledgeBaseAnswerDialog(msrest.serialization.Model): true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result. :vartype is_context_only: bool - :ivar prompts: List of 0 to 20 prompts associated with the answer. + :ivar prompts: List of prompts associated with the answer. :vartype prompts: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerPrompt] """ @@ -321,7 +484,7 @@ def __init__(self, **kwargs): If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result. :paramtype is_context_only: bool - :keyword prompts: List of 0 to 20 prompts associated with the answer. + :keyword prompts: List of prompts associated with the answer. :paramtype prompts: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerPrompt] """ super(KnowledgeBaseAnswerDialog, self).__init__(**kwargs) @@ -365,82 +528,28 @@ def __init__(self, **kwargs): self.display_text = kwargs.get("display_text", None) -class KnowledgeBaseAnswerRequestContext(msrest.serialization.Model): - """Context object with previous QnA's information. - - All required parameters must be populated in order to send to Azure. - - :ivar previous_qna_id: Required. Previous turn top answer result QnA ID. - :vartype previous_qna_id: int - :ivar previous_user_query: Previous user query. - :vartype previous_user_query: str - """ - - _validation = { - "previous_qna_id": {"required": True}, - } - - _attribute_map = { - "previous_qna_id": {"key": "previousQnaId", "type": "int"}, - "previous_user_query": {"key": "previousUserQuery", "type": "str"}, - } - - def __init__(self, **kwargs): - """ - :keyword previous_qna_id: Required. Previous turn top answer result QnA ID. - :paramtype previous_qna_id: int - :keyword previous_user_query: Previous user query. - :paramtype previous_user_query: str - """ - super(KnowledgeBaseAnswerRequestContext, self).__init__(**kwargs) - self.previous_qna_id = kwargs["previous_qna_id"] - self.previous_user_query = kwargs.get("previous_user_query", None) - - -class KnowledgeBaseAnswers(msrest.serialization.Model): - """Represents List of Question Answers. - - :ivar answers: Represents Answer Result list. - :vartype answers: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswer] - """ - - _attribute_map = { - "answers": {"key": "answers", "type": "[KnowledgeBaseAnswer]"}, - } - - def __init__(self, **kwargs): - """ - :keyword answers: Represents Answer Result list. - :paramtype answers: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswer] - """ - super(KnowledgeBaseAnswers, self).__init__(**kwargs) - self.answers = kwargs.get("answers", None) - - class MetadataFilter(msrest.serialization.Model): """Find QnAs that are associated with the given list of metadata. :ivar metadata: - :vartype metadata: list[tuple[str]] + :vartype metadata: list[tuple[str, str]] :ivar logical_operation: Operation used to join metadata filters. Possible values include: "AND", "OR". - :vartype logical_operation: str or - ~azure.ai.language.questionanswering.models.LogicalOperationKind + :vartype logical_operation: str """ _attribute_map = { - "metadata": {"key": "metadata", "type": "[[str]]"}, + "metadata": {"key": "metadata", "type": "[object]"}, "logical_operation": {"key": "logicalOperation", "type": "str"}, } def __init__(self, **kwargs): """ :keyword metadata: - :paramtype metadata: list[tuple[str]] + :paramtype metadata: list[tuple[str, str]] :keyword logical_operation: Operation used to join metadata filters. Possible values include: "AND", "OR". - :paramtype logical_operation: str or - ~azure.ai.language.questionanswering.models.LogicalOperationKind + :paramtype logical_operation: str """ super(MetadataFilter, self).__init__(**kwargs) self.metadata = kwargs.get("metadata", None) @@ -452,13 +561,12 @@ class QueryFilters(msrest.serialization.Model): :ivar metadata_filter: Find QnAs that are associated with the given list of metadata. :vartype metadata_filter: ~azure.ai.language.questionanswering.models.MetadataFilter - :ivar source_filter: Find QnAs that are associated with the given list of sources in knowledge - base. + :ivar source_filter: Find QnAs that are associated with any of the given list of sources in + knowledge base. :vartype source_filter: list[str] - :ivar logical_operation: Logical operation used to join metadata filters with source filters. + :ivar logical_operation: Logical operation used to join metadata filter with source filter. Possible values include: "AND", "OR". - :vartype logical_operation: str or - ~azure.ai.language.questionanswering.models.LogicalOperationKind + :vartype logical_operation: str """ _attribute_map = { @@ -471,13 +579,12 @@ def __init__(self, **kwargs): """ :keyword metadata_filter: Find QnAs that are associated with the given list of metadata. :paramtype metadata_filter: ~azure.ai.language.questionanswering.models.MetadataFilter - :keyword source_filter: Find QnAs that are associated with the given list of sources in + :keyword source_filter: Find QnAs that are associated with any of the given list of sources in knowledge base. :paramtype source_filter: list[str] - :keyword logical_operation: Logical operation used to join metadata filters with source - filters. Possible values include: "AND", "OR". - :paramtype logical_operation: str or - ~azure.ai.language.questionanswering.models.LogicalOperationKind + :keyword logical_operation: Logical operation used to join metadata filter with source filter. + Possible values include: "AND", "OR". + :paramtype logical_operation: str """ super(QueryFilters, self).__init__(**kwargs) self.metadata_filter = kwargs.get("metadata_filter", None) @@ -485,135 +592,47 @@ def __init__(self, **kwargs): self.logical_operation = kwargs.get("logical_operation", None) -class QueryKnowledgeBaseOptions(msrest.serialization.Model): - """The question parameters to answer using a knowledge base. - - :ivar qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over - question. - :vartype qna_id: int - :ivar question: User question to query against the knowledge base. - :vartype question: str - :ivar top: Max number of answers to be returned for the question. - :vartype top: int - :ivar user_id: Unique identifier for the user. - :vartype user_id: str - :ivar confidence_score_threshold: Minimum threshold score for answers, value ranges from 0 to - 1. - :vartype confidence_score_threshold: float - :ivar context: Context object with previous QnA's information. - :vartype context: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerRequestContext - :ivar ranker_type: (Optional) Set to 'QuestionOnly' for using a question only Ranker. Possible - values include: "Default", "QuestionOnly". - :vartype ranker_type: str or ~azure.ai.language.questionanswering.models.RankerType - :ivar filters: Filter QnAs based on give metadata list and knowledge base source names. - :vartype filters: ~azure.ai.language.questionanswering.models.QueryFilters - :ivar answer_span_request: To configure Answer span prediction feature. - :vartype answer_span_request: ~azure.ai.language.questionanswering.models.AnswerSpanRequest - :ivar include_unstructured_sources: (Optional) Flag to enable Query over Unstructured Sources. - :vartype include_unstructured_sources: bool - """ - - _validation = { - "confidence_score_threshold": {"maximum": 1, "minimum": 0}, - } - - _attribute_map = { - "qna_id": {"key": "qnaId", "type": "int"}, - "question": {"key": "question", "type": "str"}, - "top": {"key": "top", "type": "int"}, - "user_id": {"key": "userId", "type": "str"}, - "confidence_score_threshold": {"key": "confidenceScoreThreshold", "type": "float"}, - "context": {"key": "context", "type": "KnowledgeBaseAnswerRequestContext"}, - "ranker_type": {"key": "rankerType", "type": "str"}, - "filters": {"key": "filters", "type": "QueryFilters"}, - "answer_span_request": {"key": "answerSpanRequest", "type": "AnswerSpanRequest"}, - "include_unstructured_sources": {"key": "includeUnstructuredSources", "type": "bool"}, - } - - def __init__(self, **kwargs): - """ - :keyword qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over - question. - :paramtype qna_id: int - :keyword question: User question to query against the knowledge base. - :paramtype question: str - :keyword top: Max number of answers to be returned for the question. - :paramtype top: int - :keyword user_id: Unique identifier for the user. - :paramtype user_id: str - :keyword confidence_score_threshold: Minimum threshold score for answers, value ranges from 0 - to 1. - :paramtype confidence_score_threshold: float - :keyword context: Context object with previous QnA's information. - :paramtype context: - ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerRequestContext - :keyword ranker_type: (Optional) Set to 'QuestionOnly' for using a question only Ranker. - Possible values include: "Default", "QuestionOnly". - :paramtype ranker_type: str or ~azure.ai.language.questionanswering.models.RankerType - :keyword filters: Filter QnAs based on give metadata list and knowledge base source names. - :paramtype filters: ~azure.ai.language.questionanswering.models.QueryFilters - :keyword answer_span_request: To configure Answer span prediction feature. - :paramtype answer_span_request: ~azure.ai.language.questionanswering.models.AnswerSpanRequest - :keyword include_unstructured_sources: (Optional) Flag to enable Query over Unstructured - Sources. - :paramtype include_unstructured_sources: bool - """ - super(QueryKnowledgeBaseOptions, self).__init__(**kwargs) - self.qna_id = kwargs.get("qna_id", None) - self.question = kwargs.get("question", None) - self.top = kwargs.get("top", None) - self.user_id = kwargs.get("user_id", None) - self.confidence_score_threshold = kwargs.get("confidence_score_threshold", None) - self.context = kwargs.get("context", None) - self.ranker_type = kwargs.get("ranker_type", None) - self.filters = kwargs.get("filters", None) - self.answer_span_request = kwargs.get("answer_span_request", None) - self.include_unstructured_sources = kwargs.get("include_unstructured_sources", None) - +class ShortAnswerOptions(msrest.serialization.Model): + """To configure Answer span prediction feature. -class QueryTextOptions(msrest.serialization.Model): - """The question and text record parameters to answer. + 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. - :ivar question: Required. User question to query against the given text records. - :vartype question: str - :ivar records: Required. Text records to be searched for given question. - :vartype records: list[~azure.ai.language.questionanswering.models.TextRecord] - :ivar language: Language of the text records. This is BCP-47 representation of a language. For - example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as - default. - :vartype language: str + :ivar enable: Enable or disable Answer Span prediction. Has constant value: True. + :vartype enable: bool + :ivar confidence_threshold: Minimum threshold score required to include an answer span, value + ranges from 0 to 1. + :vartype confidence_threshold: float + :ivar top: Number of Top answers to be considered for span prediction from 1 to 10. + :vartype top: int """ _validation = { - "question": {"required": True}, - "records": {"required": True}, + "enable": {"required": True, "constant": True}, + "confidence_threshold": {"maximum": 1, "minimum": 0}, + "top": {"maximum": 10, "minimum": 1}, } _attribute_map = { - "question": {"key": "question", "type": "str"}, - "records": {"key": "records", "type": "[TextRecord]"}, - "language": {"key": "language", "type": "str"}, - "string_index_type": {"key": "stringIndexType", "type": "str"}, + "enable": {"key": "enable", "type": "bool"}, + "confidence_threshold": {"key": "confidenceScoreThreshold", "type": "float"}, + "top": {"key": "topAnswersWithSpan", "type": "int"}, } + enable = True + def __init__(self, **kwargs): """ - :keyword question: Required. User question to query against the given text records. - :paramtype question: str - :keyword records: Required. Text records to be searched for given question. - :paramtype records: list[~azure.ai.language.questionanswering.models.TextRecord] - :keyword language: Language of the text records. This is BCP-47 representation of a language. - For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as - default. - :paramtype language: str + :keyword confidence_threshold: Minimum threshold score required to include an answer span, + value ranges from 0 to 1. + :paramtype confidence_threshold: float + :keyword top: Number of Top answers to be considered for span prediction from 1 to 10. + :paramtype top: int """ - super(QueryTextOptions, self).__init__(**kwargs) - self.question = kwargs["question"] - self.records = kwargs["records"] - self.language = kwargs.get("language", None) - self.string_index_type = "UnicodeCodePoint" + super(ShortAnswerOptions, self).__init__(**kwargs) + self.confidence_threshold = kwargs.get("confidence_threshold", None) + self.top = kwargs.get("top", None) class TextAnswer(msrest.serialization.Model): @@ -621,12 +640,12 @@ class TextAnswer(msrest.serialization.Model): :ivar answer: Answer. :vartype answer: str - :ivar confidence_score: answer confidence score, value ranges from 0 to 1. - :vartype confidence_score: float + :ivar confidence: answer confidence score, value ranges from 0 to 1. + :vartype confidence: float :ivar id: record ID. :vartype id: str - :ivar answer_span: Answer span object with respect to user's question. - :vartype answer_span: ~azure.ai.language.questionanswering.models.AnswerSpan + :ivar short_answer: Answer span object with respect to user's question. + :vartype short_answer: ~azure.ai.language.questionanswering.models.AnswerSpan :ivar offset: The sentence offset from the start of the document. :vartype offset: int :ivar length: The length of the sentence. @@ -634,14 +653,14 @@ class TextAnswer(msrest.serialization.Model): """ _validation = { - "confidence_score": {"maximum": 1, "minimum": 0}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { "answer": {"key": "answer", "type": "str"}, - "confidence_score": {"key": "confidenceScore", "type": "float"}, + "confidence": {"key": "confidenceScore", "type": "float"}, "id": {"key": "id", "type": "str"}, - "answer_span": {"key": "answerSpan", "type": "AnswerSpan"}, + "short_answer": {"key": "answerSpan", "type": "AnswerSpan"}, "offset": {"key": "offset", "type": "int"}, "length": {"key": "length", "type": "int"}, } @@ -650,12 +669,12 @@ def __init__(self, **kwargs): """ :keyword answer: Answer. :paramtype answer: str - :keyword confidence_score: answer confidence score, value ranges from 0 to 1. - :paramtype confidence_score: float + :keyword confidence: answer confidence score, value ranges from 0 to 1. + :paramtype confidence: float :keyword id: record ID. :paramtype id: str - :keyword answer_span: Answer span object with respect to user's question. - :paramtype answer_span: ~azure.ai.language.questionanswering.models.AnswerSpan + :keyword short_answer: Answer span object with respect to user's question. + :paramtype short_answer: ~azure.ai.language.questionanswering.models.AnswerSpan :keyword offset: The sentence offset from the start of the document. :paramtype offset: int :keyword length: The length of the sentence. @@ -663,34 +682,14 @@ def __init__(self, **kwargs): """ super(TextAnswer, self).__init__(**kwargs) self.answer = kwargs.get("answer", None) - self.confidence_score = kwargs.get("confidence_score", None) + self.confidence = kwargs.get("confidence", None) self.id = kwargs.get("id", None) - self.answer_span = kwargs.get("answer_span", None) + self.short_answer = kwargs.get("short_answer", None) self.offset = kwargs.get("offset", None) self.length = kwargs.get("length", None) -class TextAnswers(msrest.serialization.Model): - """Represents the answer results. - - :ivar answers: Represents the answer results. - :vartype answers: list[~azure.ai.language.questionanswering.models.TextAnswer] - """ - - _attribute_map = { - "answers": {"key": "answers", "type": "[TextAnswer]"}, - } - - def __init__(self, **kwargs): - """ - :keyword answers: Represents the answer results. - :paramtype answers: list[~azure.ai.language.questionanswering.models.TextAnswer] - """ - super(TextAnswers, self).__init__(**kwargs) - self.answers = kwargs.get("answers", None) - - -class TextRecord(msrest.serialization.Model): +class TextDocument(msrest.serialization.Model): """Represent input text record to be queried. All required parameters must be populated in order to send to Azure. @@ -718,6 +717,6 @@ def __init__(self, **kwargs): :keyword text: Required. Text contents of the record. :paramtype text: str """ - super(TextRecord, self).__init__(**kwargs) + super(TextDocument, self).__init__(**kwargs) self.id = kwargs["id"] self.text = kwargs["text"] diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_models_py3.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_models_py3.py index 83829e675a0d..aacaf8658532 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_models_py3.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_models_py3.py @@ -14,13 +14,182 @@ from ._question_answering_client_enums import * +class AnswersFromTextOptions(msrest.serialization.Model): + """The question and text record parameters to answer. + + All required parameters must be populated in order to send to Azure. + + :ivar question: Required. User question to query against the given text records. + :vartype question: str + :ivar text_documents: Required. Text records to be searched for given question. + :vartype text_documents: list[str or ~azure.ai.language.questionanswering.models.TextDocument] + :ivar language: Language of the text records. This is BCP-47 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :vartype language: str + """ + + _validation = { + "question": {"required": True}, + "text_documents": {"required": True}, + } + + _attribute_map = { + "question": {"key": "question", "type": "str"}, + "text_documents": {"key": "records", "type": "[TextDocument]"}, + "language": {"key": "language", "type": "str"}, + "string_index_type": {"key": "stringIndexType", "type": "str"}, + } + + def __init__( + self, + *, + question: str, + text_documents: List[Union[str, "TextDocument"]], + language: Optional[str] = None, + **kwargs + ): + """ + :keyword question: Required. User question to query against the given text records. + :paramtype question: str + :keyword text_documents: Required. Text records to be searched for given question. + :paramtype text_documents: list[str or ~azure.ai.language.questionanswering.models.TextDocument] + :keyword language: Language of the text records. This is BCP-47 representation of a language. + For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + """ + super(AnswersFromTextOptions, self).__init__(**kwargs) + self.question = question + self.text_documents = text_documents + self.language = language + self.string_index_type = "UnicodeCodePoint" + + +class AnswersFromTextResult(msrest.serialization.Model): + """Represents the answer results. + + :ivar answers: Represents the answer results. + :vartype answers: list[~azure.ai.language.questionanswering.models.TextAnswer] + """ + + _attribute_map = { + "answers": {"key": "answers", "type": "[TextAnswer]"}, + } + + def __init__(self, *, answers: Optional[List["TextAnswer"]] = None, **kwargs): + """ + :keyword answers: Represents the answer results. + :paramtype answers: list[~azure.ai.language.questionanswering.models.TextAnswer] + """ + super(AnswersFromTextResult, self).__init__(**kwargs) + self.answers = answers + + +class AnswersOptions(msrest.serialization.Model): + """Parameters to query a knowledge base. + + :ivar qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over + question. + :vartype qna_id: int + :ivar question: User question to query against the knowledge base. + :vartype question: str + :ivar top: Max number of answers to be returned for the question. + :vartype top: int + :ivar user_id: Unique identifier for the user. + :vartype user_id: str + :ivar confidence_threshold: Minimum threshold score for answers, value ranges from 0 to 1. + :vartype confidence_threshold: float + :ivar answer_context: Context object with previous QnA's information. + :vartype answer_context: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerContext + :ivar ranker_kind: Type of ranker to be used. Possible + values include: "Default", "QuestionOnly". + :vartype ranker_kind: str + :ivar filters: Filter QnAs based on given metadata list and knowledge base sources. + :vartype filters: ~azure.ai.language.questionanswering.models.QueryFilters + :ivar short_answer_options: To configure Answer span prediction feature. + :vartype short_answer_options: ~azure.ai.language.questionanswering.models.ShortAnswerOptions + :ivar include_unstructured_sources: (Optional) Flag to enable Query over Unstructured Sources. + :vartype include_unstructured_sources: bool + """ + + _validation = { + "confidence_threshold": {"maximum": 1, "minimum": 0}, + } + + _attribute_map = { + "qna_id": {"key": "qnaId", "type": "int"}, + "question": {"key": "question", "type": "str"}, + "top": {"key": "top", "type": "int"}, + "user_id": {"key": "userId", "type": "str"}, + "confidence_threshold": {"key": "confidenceScoreThreshold", "type": "float"}, + "answer_context": {"key": "context", "type": "KnowledgeBaseAnswerContext"}, + "ranker_kind": {"key": "rankerType", "type": "str"}, + "filters": {"key": "filters", "type": "QueryFilters"}, + "short_answer_options": {"key": "answerSpanRequest", "type": "ShortAnswerOptions"}, + "include_unstructured_sources": {"key": "includeUnstructuredSources", "type": "bool"}, + } + + def __init__( + self, + *, + qna_id: Optional[int] = None, + question: Optional[str] = None, + top: Optional[int] = None, + user_id: Optional[str] = None, + confidence_threshold: Optional[float] = None, + answer_context: Optional["KnowledgeBaseAnswerContext"] = None, + ranker_kind: Optional[str] = None, + filters: Optional["QueryFilters"] = None, + short_answer_options: Optional["ShortAnswerOptions"] = None, + include_unstructured_sources: Optional[bool] = None, + **kwargs + ): + """ + :keyword qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over + question. + :paramtype qna_id: int + :keyword question: User question to query against the knowledge base. + :paramtype question: str + :keyword top: Max number of answers to be returned for the question. + :paramtype top: int + :keyword user_id: Unique identifier for the user. + :paramtype user_id: str + :keyword confidence_threshold: Minimum threshold score for answers, value ranges from 0 to 1. + :paramtype confidence_threshold: float + :keyword answer_context: Context object with previous QnA's information. + :paramtype answer_context: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerContext + :keyword ranker_kind: Type of ranker to be used. Possible + values include: "Default", "QuestionOnly". + :paramtype ranker_kind: str + :keyword filters: Filter QnAs based on given metadata list and knowledge base sources. + :paramtype filters: ~azure.ai.language.questionanswering.models.QueryFilters + :keyword short_answer_options: To configure Answer span prediction feature. + :paramtype short_answer_options: ~azure.ai.language.questionanswering.models.ShortAnswerOptions + :keyword include_unstructured_sources: (Optional) Flag to enable Query over Unstructured + Sources. + :paramtype include_unstructured_sources: bool + """ + super(AnswersOptions, self).__init__(**kwargs) + self.qna_id = qna_id + self.question = question + self.top = top + self.user_id = user_id + self.confidence_threshold = confidence_threshold + self.answer_context = answer_context + self.ranker_kind = ranker_kind + self.filters = filters + self.short_answer_options = short_answer_options + self.include_unstructured_sources = include_unstructured_sources + + class AnswerSpan(msrest.serialization.Model): """Answer span object of QnA. :ivar text: Predicted text of answer span. :vartype text: str - :ivar confidence_score: Predicted score of answer span, value ranges from 0 to 1. - :vartype confidence_score: float + :ivar confidence: Predicted score of answer span, value ranges from 0 to 1. + :vartype confidence: float :ivar offset: The answer span offset from the start of answer. :vartype offset: int :ivar length: The length of the answer span. @@ -28,12 +197,12 @@ class AnswerSpan(msrest.serialization.Model): """ _validation = { - "confidence_score": {"maximum": 1, "minimum": 0}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { "text": {"key": "text", "type": "str"}, - "confidence_score": {"key": "confidenceScore", "type": "float"}, + "confidence": {"key": "confidenceScore", "type": "float"}, "offset": {"key": "offset", "type": "int"}, "length": {"key": "length", "type": "int"}, } @@ -42,7 +211,7 @@ def __init__( self, *, text: Optional[str] = None, - confidence_score: Optional[float] = None, + confidence: Optional[float] = None, offset: Optional[int] = None, length: Optional[int] = None, **kwargs @@ -50,8 +219,8 @@ def __init__( """ :keyword text: Predicted text of answer span. :paramtype text: str - :keyword confidence_score: Predicted score of answer span, value ranges from 0 to 1. - :paramtype confidence_score: float + :keyword confidence: Predicted score of answer span, value ranges from 0 to 1. + :paramtype confidence: float :keyword offset: The answer span offset from the start of answer. :paramtype offset: int :keyword length: The length of the answer span. @@ -59,57 +228,29 @@ def __init__( """ super(AnswerSpan, self).__init__(**kwargs) self.text = text - self.confidence_score = confidence_score + self.confidence = confidence self.offset = offset self.length = length -class AnswerSpanRequest(msrest.serialization.Model): - """To configure Answer span prediction feature. +class AnswersResult(msrest.serialization.Model): + """Represents List of Question Answers. - :ivar enable: Enable or disable Answer Span prediction. - :vartype enable: bool - :ivar confidence_score_threshold: Minimum threshold score required to include an answer span, - value ranges from 0 to 1. - :vartype confidence_score_threshold: float - :ivar top_answers_with_span: Number of Top answers to be considered for span prediction from 1 - to 10. - :vartype top_answers_with_span: int + :ivar answers: Represents Answer Result list. + :vartype answers: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswer] """ - _validation = { - "confidence_score_threshold": {"maximum": 1, "minimum": 0}, - "top_answers_with_span": {"maximum": 10, "minimum": 1}, - } - _attribute_map = { - "enable": {"key": "enable", "type": "bool"}, - "confidence_score_threshold": {"key": "confidenceScoreThreshold", "type": "float"}, - "top_answers_with_span": {"key": "topAnswersWithSpan", "type": "int"}, + "answers": {"key": "answers", "type": "[KnowledgeBaseAnswer]"}, } - def __init__( - self, - *, - enable: Optional[bool] = None, - confidence_score_threshold: Optional[float] = None, - top_answers_with_span: Optional[int] = None, - **kwargs - ): + def __init__(self, *, answers: Optional[List["KnowledgeBaseAnswer"]] = None, **kwargs): """ - :keyword enable: Enable or disable Answer Span prediction. - :paramtype enable: bool - :keyword confidence_score_threshold: Minimum threshold score required to include an answer - span, value ranges from 0 to 1. - :paramtype confidence_score_threshold: float - :keyword top_answers_with_span: Number of Top answers to be considered for span prediction from - 1 to 10. - :paramtype top_answers_with_span: int + :keyword answers: Represents Answer Result list. + :paramtype answers: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswer] """ - super(AnswerSpanRequest, self).__init__(**kwargs) - self.enable = enable - self.confidence_score_threshold = confidence_score_threshold - self.top_answers_with_span = top_answers_with_span + super(AnswersResult, self).__init__(**kwargs) + self.answers = answers class Error(msrest.serialization.Model): @@ -119,7 +260,9 @@ class Error(msrest.serialization.Model): :ivar code: Required. One of a server-defined set of error codes. Possible values include: "InvalidRequest", "InvalidArgument", "Unauthorized", "Forbidden", "NotFound", - "TooManyRequests", "InternalServerError", "ServiceUnavailable". + "ProjectNotFound", "OperationNotFound", "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", "TooManyRequests", "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", "InternalServerError", "ServiceUnavailable". :vartype code: str or ~azure.ai.language.questionanswering.models.ErrorCode :ivar message: Required. A human-readable representation of the error. :vartype message: str @@ -158,7 +301,9 @@ def __init__( """ :keyword code: Required. One of a server-defined set of error codes. Possible values include: "InvalidRequest", "InvalidArgument", "Unauthorized", "Forbidden", "NotFound", - "TooManyRequests", "InternalServerError", "ServiceUnavailable". + "ProjectNotFound", "OperationNotFound", "AzureCognitiveSearchNotFound", + "AzureCognitiveSearchIndexNotFound", "TooManyRequests", "AzureCognitiveSearchThrottling", + "AzureCognitiveSearchIndexLimitReached", "InternalServerError", "ServiceUnavailable". :paramtype code: str or ~azure.ai.language.questionanswering.models.ErrorCode :keyword message: Required. A human-readable representation of the error. :paramtype message: str @@ -267,14 +412,14 @@ def __init__( class KnowledgeBaseAnswer(msrest.serialization.Model): """Represents knowledge base answer. - :ivar questions: List of questions. + :ivar questions: List of questions associated with the answer. :vartype questions: list[str] - :ivar answer: The Answer. + :ivar answer: Answer text. :vartype answer: str - :ivar confidence_score: Answer confidence score, value ranges from 0 to 1. - :vartype confidence_score: float - :ivar id: ID of the QnA result. - :vartype id: int + :ivar confidence: Answer confidence score, value ranges from 0 to 1. + :vartype confidence: float + :ivar qna_id: ID of the QnA result. + :vartype qna_id: int :ivar source: Source of QnA result. :vartype source: str :ivar metadata: Metadata associated with the answer, useful to categorize or filter question @@ -282,23 +427,23 @@ class KnowledgeBaseAnswer(msrest.serialization.Model): :vartype metadata: dict[str, str] :ivar dialog: Dialog associated with Answer. :vartype dialog: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerDialog - :ivar answer_span: Answer span object of QnA with respect to user's question. - :vartype answer_span: ~azure.ai.language.questionanswering.models.AnswerSpan + :ivar short_answer: Answer span object of QnA with respect to user's question. + :vartype short_answer: ~azure.ai.language.questionanswering.models.AnswerSpan """ _validation = { - "confidence_score": {"maximum": 1, "minimum": 0}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { "questions": {"key": "questions", "type": "[str]"}, "answer": {"key": "answer", "type": "str"}, - "confidence_score": {"key": "confidenceScore", "type": "float"}, - "id": {"key": "id", "type": "int"}, + "confidence": {"key": "confidenceScore", "type": "float"}, + "qna_id": {"key": "id", "type": "int"}, "source": {"key": "source", "type": "str"}, "metadata": {"key": "metadata", "type": "{str}"}, "dialog": {"key": "dialog", "type": "KnowledgeBaseAnswerDialog"}, - "answer_span": {"key": "answerSpan", "type": "AnswerSpan"}, + "short_answer": {"key": "answerSpan", "type": "AnswerSpan"}, } def __init__( @@ -306,23 +451,23 @@ def __init__( *, questions: Optional[List[str]] = None, answer: Optional[str] = None, - confidence_score: Optional[float] = None, - id: Optional[int] = None, + confidence: Optional[float] = None, + qna_id: Optional[int] = None, source: Optional[str] = None, metadata: Optional[Dict[str, str]] = None, dialog: Optional["KnowledgeBaseAnswerDialog"] = None, - answer_span: Optional["AnswerSpan"] = None, + short_answer: Optional["AnswerSpan"] = None, **kwargs ): """ - :keyword questions: List of questions. + :keyword questions: List of questions associated with the answer. :paramtype questions: list[str] - :keyword answer: The Answer. + :keyword answer: Answer text. :paramtype answer: str - :keyword confidence_score: Answer confidence score, value ranges from 0 to 1. - :paramtype confidence_score: float - :keyword id: ID of the QnA result. - :paramtype id: int + :keyword confidence: Answer confidence score, value ranges from 0 to 1. + :paramtype confidence: float + :keyword qna_id: ID of the QnA result. + :paramtype qna_id: int :keyword source: Source of QnA result. :paramtype source: str :keyword metadata: Metadata associated with the answer, useful to categorize or filter question @@ -330,18 +475,50 @@ def __init__( :paramtype metadata: dict[str, str] :keyword dialog: Dialog associated with Answer. :paramtype dialog: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerDialog - :keyword answer_span: Answer span object of QnA with respect to user's question. - :paramtype answer_span: ~azure.ai.language.questionanswering.models.AnswerSpan + :keyword short_answer: Answer span object of QnA with respect to user's question. + :paramtype short_answer: ~azure.ai.language.questionanswering.models.AnswerSpan """ super(KnowledgeBaseAnswer, self).__init__(**kwargs) self.questions = questions self.answer = answer - self.confidence_score = confidence_score - self.id = id + self.confidence = confidence + self.qna_id = qna_id self.source = source self.metadata = metadata self.dialog = dialog - self.answer_span = answer_span + self.short_answer = short_answer + + +class KnowledgeBaseAnswerContext(msrest.serialization.Model): + """Context object with previous QnA's information. + + All required parameters must be populated in order to send to Azure. + + :ivar previous_qna_id: Required. Previous turn top answer result QnA ID. + :vartype previous_qna_id: int + :ivar previous_question: Previous user query. + :vartype previous_question: str + """ + + _validation = { + "previous_qna_id": {"required": True}, + } + + _attribute_map = { + "previous_qna_id": {"key": "previousQnaId", "type": "int"}, + "previous_question": {"key": "previousUserQuery", "type": "str"}, + } + + def __init__(self, *, previous_qna_id: int, previous_question: Optional[str] = None, **kwargs): + """ + :keyword previous_qna_id: Required. Previous turn top answer result QnA ID. + :paramtype previous_qna_id: int + :keyword previous_question: Previous user query. + :paramtype previous_question: str + """ + super(KnowledgeBaseAnswerContext, self).__init__(**kwargs) + self.previous_qna_id = previous_qna_id + self.previous_question = previous_question class KnowledgeBaseAnswerDialog(msrest.serialization.Model): @@ -351,7 +528,7 @@ class KnowledgeBaseAnswerDialog(msrest.serialization.Model): true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result. :vartype is_context_only: bool - :ivar prompts: List of 0 to 20 prompts associated with the answer. + :ivar prompts: List of prompts associated with the answer. :vartype prompts: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerPrompt] """ @@ -376,7 +553,7 @@ def __init__( If true, do not include this QnA as search result for queries without context; otherwise, if false, ignores context and includes this QnA in search result. :paramtype is_context_only: bool - :keyword prompts: List of 0 to 20 prompts associated with the answer. + :keyword prompts: List of prompts associated with the answer. :paramtype prompts: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerPrompt] """ super(KnowledgeBaseAnswerDialog, self).__init__(**kwargs) @@ -427,88 +604,30 @@ def __init__( self.display_text = display_text -class KnowledgeBaseAnswerRequestContext(msrest.serialization.Model): - """Context object with previous QnA's information. - - All required parameters must be populated in order to send to Azure. - - :ivar previous_qna_id: Required. Previous turn top answer result QnA ID. - :vartype previous_qna_id: int - :ivar previous_user_query: Previous user query. - :vartype previous_user_query: str - """ - - _validation = { - "previous_qna_id": {"required": True}, - } - - _attribute_map = { - "previous_qna_id": {"key": "previousQnaId", "type": "int"}, - "previous_user_query": {"key": "previousUserQuery", "type": "str"}, - } - - def __init__(self, *, previous_qna_id: int, previous_user_query: Optional[str] = None, **kwargs): - """ - :keyword previous_qna_id: Required. Previous turn top answer result QnA ID. - :paramtype previous_qna_id: int - :keyword previous_user_query: Previous user query. - :paramtype previous_user_query: str - """ - super(KnowledgeBaseAnswerRequestContext, self).__init__(**kwargs) - self.previous_qna_id = previous_qna_id - self.previous_user_query = previous_user_query - - -class KnowledgeBaseAnswers(msrest.serialization.Model): - """Represents List of Question Answers. - - :ivar answers: Represents Answer Result list. - :vartype answers: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswer] - """ - - _attribute_map = { - "answers": {"key": "answers", "type": "[KnowledgeBaseAnswer]"}, - } - - def __init__(self, *, answers: Optional[List["KnowledgeBaseAnswer"]] = None, **kwargs): - """ - :keyword answers: Represents Answer Result list. - :paramtype answers: list[~azure.ai.language.questionanswering.models.KnowledgeBaseAnswer] - """ - super(KnowledgeBaseAnswers, self).__init__(**kwargs) - self.answers = answers - - class MetadataFilter(msrest.serialization.Model): """Find QnAs that are associated with the given list of metadata. :ivar metadata: - :vartype metadata: list[tuple[str]] + :vartype metadata: list[tuple[str, str]] :ivar logical_operation: Operation used to join metadata filters. Possible values include: "AND", "OR". - :vartype logical_operation: str or - ~azure.ai.language.questionanswering.models.LogicalOperationKind + :vartype logical_operation: str """ _attribute_map = { - "metadata": {"key": "metadata", "type": "[[str]]"}, + "metadata": {"key": "metadata", "type": "[object]"}, "logical_operation": {"key": "logicalOperation", "type": "str"}, } def __init__( - self, - *, - metadata: Optional[List[Tuple[str]]] = None, - logical_operation: Optional[Union[str, "LogicalOperationKind"]] = None, - **kwargs + self, *, metadata: Optional[List[Tuple[str, str]]] = None, logical_operation: Optional[str] = None, **kwargs ): """ :keyword metadata: - :paramtype metadata: list[tuple[str]] + :paramtype metadata: list[tuple[str, str]] :keyword logical_operation: Operation used to join metadata filters. Possible values include: "AND", "OR". - :paramtype logical_operation: str or - ~azure.ai.language.questionanswering.models.LogicalOperationKind + :paramtype logical_operation: str """ super(MetadataFilter, self).__init__(**kwargs) self.metadata = metadata @@ -520,13 +639,12 @@ class QueryFilters(msrest.serialization.Model): :ivar metadata_filter: Find QnAs that are associated with the given list of metadata. :vartype metadata_filter: ~azure.ai.language.questionanswering.models.MetadataFilter - :ivar source_filter: Find QnAs that are associated with the given list of sources in knowledge - base. + :ivar source_filter: Find QnAs that are associated with any of the given list of sources in + knowledge base. :vartype source_filter: list[str] - :ivar logical_operation: Logical operation used to join metadata filters with source filters. + :ivar logical_operation: Logical operation used to join metadata filter with source filter. Possible values include: "AND", "OR". - :vartype logical_operation: str or - ~azure.ai.language.questionanswering.models.LogicalOperationKind + :vartype logical_operation: str """ _attribute_map = { @@ -540,19 +658,18 @@ def __init__( *, metadata_filter: Optional["MetadataFilter"] = None, source_filter: Optional[List[str]] = None, - logical_operation: Optional[Union[str, "LogicalOperationKind"]] = None, + logical_operation: Optional[str] = None, **kwargs ): """ :keyword metadata_filter: Find QnAs that are associated with the given list of metadata. :paramtype metadata_filter: ~azure.ai.language.questionanswering.models.MetadataFilter - :keyword source_filter: Find QnAs that are associated with the given list of sources in + :keyword source_filter: Find QnAs that are associated with any of the given list of sources in knowledge base. :paramtype source_filter: list[str] - :keyword logical_operation: Logical operation used to join metadata filters with source - filters. Possible values include: "AND", "OR". - :paramtype logical_operation: str or - ~azure.ai.language.questionanswering.models.LogicalOperationKind + :keyword logical_operation: Logical operation used to join metadata filter with source filter. + Possible values include: "AND", "OR". + :paramtype logical_operation: str """ super(QueryFilters, self).__init__(**kwargs) self.metadata_filter = metadata_filter @@ -560,149 +677,47 @@ def __init__( self.logical_operation = logical_operation -class QueryKnowledgeBaseOptions(msrest.serialization.Model): - """The question parameters to answer using a knowledge base. - - :ivar qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over - question. - :vartype qna_id: int - :ivar question: User question to query against the knowledge base. - :vartype question: str - :ivar top: Max number of answers to be returned for the question. - :vartype top: int - :ivar user_id: Unique identifier for the user. - :vartype user_id: str - :ivar confidence_score_threshold: Minimum threshold score for answers, value ranges from 0 to - 1. - :vartype confidence_score_threshold: float - :ivar context: Context object with previous QnA's information. - :vartype context: ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerRequestContext - :ivar ranker_type: (Optional) Set to 'QuestionOnly' for using a question only Ranker. Possible - values include: "Default", "QuestionOnly". - :vartype ranker_type: str or ~azure.ai.language.questionanswering.models.RankerType - :ivar filters: Filter QnAs based on give metadata list and knowledge base source names. - :vartype filters: ~azure.ai.language.questionanswering.models.QueryFilters - :ivar answer_span_request: To configure Answer span prediction feature. - :vartype answer_span_request: ~azure.ai.language.questionanswering.models.AnswerSpanRequest - :ivar include_unstructured_sources: (Optional) Flag to enable Query over Unstructured Sources. - :vartype include_unstructured_sources: bool - """ - - _validation = { - "confidence_score_threshold": {"maximum": 1, "minimum": 0}, - } - - _attribute_map = { - "qna_id": {"key": "qnaId", "type": "int"}, - "question": {"key": "question", "type": "str"}, - "top": {"key": "top", "type": "int"}, - "user_id": {"key": "userId", "type": "str"}, - "confidence_score_threshold": {"key": "confidenceScoreThreshold", "type": "float"}, - "context": {"key": "context", "type": "KnowledgeBaseAnswerRequestContext"}, - "ranker_type": {"key": "rankerType", "type": "str"}, - "filters": {"key": "filters", "type": "QueryFilters"}, - "answer_span_request": {"key": "answerSpanRequest", "type": "AnswerSpanRequest"}, - "include_unstructured_sources": {"key": "includeUnstructuredSources", "type": "bool"}, - } - - def __init__( - self, - *, - qna_id: Optional[int] = None, - question: Optional[str] = None, - top: Optional[int] = None, - user_id: Optional[str] = None, - confidence_score_threshold: Optional[float] = None, - context: Optional["KnowledgeBaseAnswerRequestContext"] = None, - ranker_type: Optional[Union[str, "RankerType"]] = None, - filters: Optional["QueryFilters"] = None, - answer_span_request: Optional["AnswerSpanRequest"] = None, - include_unstructured_sources: Optional[bool] = None, - **kwargs - ): - """ - :keyword qna_id: Exact QnA ID to fetch from the knowledge base, this field takes priority over - question. - :paramtype qna_id: int - :keyword question: User question to query against the knowledge base. - :paramtype question: str - :keyword top: Max number of answers to be returned for the question. - :paramtype top: int - :keyword user_id: Unique identifier for the user. - :paramtype user_id: str - :keyword confidence_score_threshold: Minimum threshold score for answers, value ranges from 0 - to 1. - :paramtype confidence_score_threshold: float - :keyword context: Context object with previous QnA's information. - :paramtype context: - ~azure.ai.language.questionanswering.models.KnowledgeBaseAnswerRequestContext - :keyword ranker_type: (Optional) Set to 'QuestionOnly' for using a question only Ranker. - Possible values include: "Default", "QuestionOnly". - :paramtype ranker_type: str or ~azure.ai.language.questionanswering.models.RankerType - :keyword filters: Filter QnAs based on give metadata list and knowledge base source names. - :paramtype filters: ~azure.ai.language.questionanswering.models.QueryFilters - :keyword answer_span_request: To configure Answer span prediction feature. - :paramtype answer_span_request: ~azure.ai.language.questionanswering.models.AnswerSpanRequest - :keyword include_unstructured_sources: (Optional) Flag to enable Query over Unstructured - Sources. - :paramtype include_unstructured_sources: bool - """ - super(QueryKnowledgeBaseOptions, self).__init__(**kwargs) - self.qna_id = qna_id - self.question = question - self.top = top - self.user_id = user_id - self.confidence_score_threshold = confidence_score_threshold - self.context = context - self.ranker_type = ranker_type - self.filters = filters - self.answer_span_request = answer_span_request - self.include_unstructured_sources = include_unstructured_sources - +class ShortAnswerOptions(msrest.serialization.Model): + """To configure Answer span prediction feature. -class QueryTextOptions(msrest.serialization.Model): - """The question and text record parameters to answer. + 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. - :ivar question: Required. User question to query against the given text records. - :vartype question: str - :ivar records: Required. Text records to be searched for given question. - :vartype records: list[~azure.ai.language.questionanswering.models.TextRecord] - :ivar language: Language of the text records. This is BCP-47 representation of a language. For - example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as - default. - :vartype language: str + :ivar enable: Enable or disable Answer Span prediction. Has constant value: True. + :vartype enable: bool + :ivar confidence_threshold: Minimum threshold score required to include an answer span, value + ranges from 0 to 1. + :vartype confidence_threshold: float + :ivar top: Number of Top answers to be considered for span prediction from 1 to 10. + :vartype top: int """ _validation = { - "question": {"required": True}, - "records": {"required": True}, + "enable": {"required": True, "constant": True}, + "confidence_threshold": {"maximum": 1, "minimum": 0}, + "top": {"maximum": 10, "minimum": 1}, } _attribute_map = { - "question": {"key": "question", "type": "str"}, - "records": {"key": "records", "type": "[TextRecord]"}, - "language": {"key": "language", "type": "str"}, - "string_index_type": {"key": "stringIndexType", "type": "str"}, + "enable": {"key": "enable", "type": "bool"}, + "confidence_threshold": {"key": "confidenceScoreThreshold", "type": "float"}, + "top": {"key": "topAnswersWithSpan", "type": "int"}, } - def __init__(self, *, question: str, records: List["TextRecord"], language: Optional[str] = None, **kwargs): + enable = True + + def __init__(self, *, confidence_threshold: Optional[float] = None, top: Optional[int] = None, **kwargs): """ - :keyword question: Required. User question to query against the given text records. - :paramtype question: str - :keyword records: Required. Text records to be searched for given question. - :paramtype records: list[~azure.ai.language.questionanswering.models.TextRecord] - :keyword language: Language of the text records. This is BCP-47 representation of a language. - For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as - default. - :paramtype language: str + :keyword confidence_threshold: Minimum threshold score required to include an answer span, + value ranges from 0 to 1. + :paramtype confidence_threshold: float + :keyword top: Number of Top answers to be considered for span prediction from 1 to 10. + :paramtype top: int """ - super(QueryTextOptions, self).__init__(**kwargs) - self.question = question - self.records = records - self.language = language - self.string_index_type = "UnicodeCodePoint" + super(ShortAnswerOptions, self).__init__(**kwargs) + self.confidence_threshold = confidence_threshold + self.top = top class TextAnswer(msrest.serialization.Model): @@ -710,12 +725,12 @@ class TextAnswer(msrest.serialization.Model): :ivar answer: Answer. :vartype answer: str - :ivar confidence_score: answer confidence score, value ranges from 0 to 1. - :vartype confidence_score: float + :ivar confidence: answer confidence score, value ranges from 0 to 1. + :vartype confidence: float :ivar id: record ID. :vartype id: str - :ivar answer_span: Answer span object with respect to user's question. - :vartype answer_span: ~azure.ai.language.questionanswering.models.AnswerSpan + :ivar short_answer: Answer span object with respect to user's question. + :vartype short_answer: ~azure.ai.language.questionanswering.models.AnswerSpan :ivar offset: The sentence offset from the start of the document. :vartype offset: int :ivar length: The length of the sentence. @@ -723,14 +738,14 @@ class TextAnswer(msrest.serialization.Model): """ _validation = { - "confidence_score": {"maximum": 1, "minimum": 0}, + "confidence": {"maximum": 1, "minimum": 0}, } _attribute_map = { "answer": {"key": "answer", "type": "str"}, - "confidence_score": {"key": "confidenceScore", "type": "float"}, + "confidence": {"key": "confidenceScore", "type": "float"}, "id": {"key": "id", "type": "str"}, - "answer_span": {"key": "answerSpan", "type": "AnswerSpan"}, + "short_answer": {"key": "answerSpan", "type": "AnswerSpan"}, "offset": {"key": "offset", "type": "int"}, "length": {"key": "length", "type": "int"}, } @@ -739,9 +754,9 @@ def __init__( self, *, answer: Optional[str] = None, - confidence_score: Optional[float] = None, + confidence: Optional[float] = None, id: Optional[str] = None, - answer_span: Optional["AnswerSpan"] = None, + short_answer: Optional["AnswerSpan"] = None, offset: Optional[int] = None, length: Optional[int] = None, **kwargs @@ -749,12 +764,12 @@ def __init__( """ :keyword answer: Answer. :paramtype answer: str - :keyword confidence_score: answer confidence score, value ranges from 0 to 1. - :paramtype confidence_score: float + :keyword confidence: answer confidence score, value ranges from 0 to 1. + :paramtype confidence: float :keyword id: record ID. :paramtype id: str - :keyword answer_span: Answer span object with respect to user's question. - :paramtype answer_span: ~azure.ai.language.questionanswering.models.AnswerSpan + :keyword short_answer: Answer span object with respect to user's question. + :paramtype short_answer: ~azure.ai.language.questionanswering.models.AnswerSpan :keyword offset: The sentence offset from the start of the document. :paramtype offset: int :keyword length: The length of the sentence. @@ -762,34 +777,14 @@ def __init__( """ super(TextAnswer, self).__init__(**kwargs) self.answer = answer - self.confidence_score = confidence_score + self.confidence = confidence self.id = id - self.answer_span = answer_span + self.short_answer = short_answer self.offset = offset self.length = length -class TextAnswers(msrest.serialization.Model): - """Represents the answer results. - - :ivar answers: Represents the answer results. - :vartype answers: list[~azure.ai.language.questionanswering.models.TextAnswer] - """ - - _attribute_map = { - "answers": {"key": "answers", "type": "[TextAnswer]"}, - } - - def __init__(self, *, answers: Optional[List["TextAnswer"]] = None, **kwargs): - """ - :keyword answers: Represents the answer results. - :paramtype answers: list[~azure.ai.language.questionanswering.models.TextAnswer] - """ - super(TextAnswers, self).__init__(**kwargs) - self.answers = answers - - -class TextRecord(msrest.serialization.Model): +class TextDocument(msrest.serialization.Model): """Represent input text record to be queried. All required parameters must be populated in order to send to Azure. @@ -817,6 +812,6 @@ def __init__(self, *, id: str, text: str, **kwargs): :keyword text: Required. Text contents of the record. :paramtype text: str """ - super(TextRecord, self).__init__(**kwargs) + super(TextDocument, self).__init__(**kwargs) self.id = id self.text = text diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_question_answering_client_enums.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_question_answering_client_enums.py index d6c78563d2b6..3440ca287045 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_question_answering_client_enums.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/azure/ai/language/questionanswering/models/_question_answering_client_enums.py @@ -19,7 +19,13 @@ class ErrorCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): UNAUTHORIZED = "Unauthorized" FORBIDDEN = "Forbidden" NOT_FOUND = "NotFound" + PROJECT_NOT_FOUND = "ProjectNotFound" + OPERATION_NOT_FOUND = "OperationNotFound" + AZURE_COGNITIVE_SEARCH_NOT_FOUND = "AzureCognitiveSearchNotFound" + AZURE_COGNITIVE_SEARCH_INDEX_NOT_FOUND = "AzureCognitiveSearchIndexNotFound" TOO_MANY_REQUESTS = "TooManyRequests" + AZURE_COGNITIVE_SEARCH_THROTTLING = "AzureCognitiveSearchThrottling" + AZURE_COGNITIVE_SEARCH_INDEX_LIMIT_REACHED = "AzureCognitiveSearchIndexLimitReached" INTERNAL_SERVER_ERROR = "InternalServerError" SERVICE_UNAVAILABLE = "ServiceUnavailable" @@ -33,17 +39,3 @@ class InnerErrorCode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): AZURE_COGNITIVE_SEARCH_NOT_FOUND = "AzureCognitiveSearchNotFound" AZURE_COGNITIVE_SEARCH_THROTTLING = "AzureCognitiveSearchThrottling" EXTRACTION_FAILURE = "ExtractionFailure" - - -class LogicalOperationKind(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """Set to 'OR' or 'AND' for using corresponding logical operation.""" - - AND_ENUM = "AND" - OR_ENUM = "OR" - - -class RankerType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): - """(Optional) Set to 'QuestionOnly' for using a question only Ranker.""" - - DEFAULT = "Default" - QUESTION_ONLY = "QuestionOnly" diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_chat_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_chat_async.py index fa80fc5e0c3c..021bc79d3ca0 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_chat_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_chat_async.py @@ -35,49 +35,42 @@ async def sample_chit_chat(): client = QuestionAnsweringClient(endpoint, AzureKeyCredential(key)) async with client: - first_question = qna.QueryKnowledgeBaseOptions( - question="How long should my Surface battery last?", + first_question="How long should my Surface battery last?" + output = await client.get_answers( + question=first_question, top=3, - confidence_score_threshold=0.2, + confidence_threshold=0.2, include_unstructured_sources=True, - answer_span_request=qna.AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + short_answer_options=qna.ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), - ) - - output = await client.query_knowledge_base( - first_question, project_name=knowledge_base_project, deployment_name="test" ) - best_candidate = [a for a in output.answers if a.confidence_score > 0.9][0] - print("Q: {}".format(first_question.question)) + best_candidate = [a for a in output.answers if a.confidence > 0.9][0] + print("Q: {}".format(first_question)) print("A: {}".format(best_candidate.answer)) - followup_question = qna.QueryKnowledgeBaseOptions( - question="How long it takes to charge Surface?", + followup_question = "How long it takes to charge Surface?" + + output = await client.get_answers( + question=followup_question, top=3, - confidence_score_threshold=0.2, - context=qna.KnowledgeBaseAnswerRequestContext( - previous_user_query="How long should my Surface battery last?", - previous_qna_id=best_candidate.id + confidence_threshold=0.2, + answer_context=qna.KnowledgeBaseAnswerContext( + previous_question=first_question, + previous_qna_id=best_candidate.qna_id ), - answer_span_request=qna.AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + short_answer_options=qna.ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), - include_unstructured_sources=True - ) - - output = await client.query_knowledge_base( - followup_question, + include_unstructured_sources=True, project_name=knowledge_base_project, deployment_name="test" ) - print("Q: {}".format(followup_question.question)) + print("Q: {}".format(followup_question)) print("A: {}".format(output.answers[0].answer)) # [END chit_chat_async] diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_query_knowledgebase_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_query_knowledgebase_async.py index 93a4b946f7ef..126ff39aeea5 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_query_knowledgebase_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_query_knowledgebase_async.py @@ -35,25 +35,21 @@ async def sample_query_knowledgebase(): client = QuestionAnsweringClient(endpoint, AzureKeyCredential(key)) async with client: - input = qna.QueryKnowledgeBaseOptions( - question="How long should my Surface battery last?", + question="How long should my Surface battery last?" + output = await client.get_answers( + question=question, top=3, - confidence_score_threshold=0.2, + confidence_threshold=0.2, include_unstructured_sources=True, - answer_span_request=qna.AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + short_answer_options=qna.ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), - ) - - output = await client.query_knowledge_base( - input, project_name=knowledge_base_project, deployment_name="test" ) - best_candidate = [a for a in output.answers if a.confidence_score > 0.9][0] - print("Q: {}".format(input.question)) + best_candidate = [a for a in output.answers if a.confidence > 0.9][0] + print("Q: {}".format(question)) print("A: {}".format(best_candidate.answer)) # [END query_knowledgebase_async] diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_query_text_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_query_text_async.py index 8b7df0051fd0..bbc1c0fea7b9 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_query_text_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/async_samples/sample_query_text_async.py @@ -32,25 +32,19 @@ async def sample_query_text(): client = QuestionAnsweringClient(endpoint, AzureKeyCredential(key)) async with client: - input = qna.QueryTextOptions( + input = qna.AnswersFromTextOptions( question="How long it takes to charge surface?", - records=[ - qna.TextRecord( - text="Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. " + - "It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.", - id="doc1" - ), - qna.TextRecord( - text="You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. " + - "The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface.", - id="doc2" - ) + text_documents=[ + "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. " + + "It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.", + "You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. " + + "The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface.", ] ) - output = await client.query_text(input) + output = await client.get_answers_from_text(input) - best_answer = [a for a in output.answers if a.confidence_score > 0.9][0] + best_answer = [a for a in output.answers if a.confidence > 0.9][0] print("Q: {}".format(input.question)) print("A: {}".format(best_answer.answer)) diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_chat.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_chat.py index 033c59be5529..74dbd531d002 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_chat.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_chat.py @@ -33,49 +33,43 @@ def sample_chit_chat(): client = QuestionAnsweringClient(endpoint, AzureKeyCredential(key)) with client: - first_question = qna.QueryKnowledgeBaseOptions( - question="How long should my Surface battery last?", + first_question="How long should my Surface battery last?" + + output = client.get_answers( + question=first_question, top=3, - confidence_score_threshold=0.2, + confidence_threshold=0.2, include_unstructured_sources=True, - answer_span_request=qna.AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + short_answer_options=qna.ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), - ) - - output = client.query_knowledge_base( - first_question, project_name=knowledge_base_project, deployment_name="test" ) - best_candidate = [a for a in output.answers if a.confidence_score > 0.9][0] - print(u"Q: {}".format(first_question.question)) + best_candidate = [a for a in output.answers if a.confidence > 0.9][0] + print(u"Q: {}".format(first_question)) print(u"A: {}".format(best_candidate.answer)) - followup_question = qna.QueryKnowledgeBaseOptions( - question="How long it takes to charge Surface?", + followup_question = "How long it takes to charge Surface?" + + output = client.get_answers( + question=followup_question, top=3, - confidence_score_threshold=0.2, - context=qna.KnowledgeBaseAnswerRequestContext( - previous_user_query="How long should my Surface battery last?", - previous_qna_id=best_candidate.id + confidence_threshold=0.2, + answer_context=qna.KnowledgeBaseAnswerContext( + previous_question=first_question, + previous_qna_id=best_candidate.qna_id ), - answer_span_request=qna.AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + short_answer_options=qna.ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), - include_unstructured_sources=True - ) - - output = client.query_knowledge_base( - followup_question, + include_unstructured_sources=True, project_name=knowledge_base_project, deployment_name="test" ) - print(u"Q: {}".format(followup_question.question)) + print(u"Q: {}".format(followup_question)) print(u"A: {}".format(output.answers[0].answer)) # [END chit_chat] diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_query_knowledgebase.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_query_knowledgebase.py index 6bfb59022c0b..d73cbdd807c8 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_query_knowledgebase.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_query_knowledgebase.py @@ -33,25 +33,21 @@ def sample_query_knowledgebase(): client = QuestionAnsweringClient(endpoint, AzureKeyCredential(key)) with client: - input = qna.QueryKnowledgeBaseOptions( - question="How long should my Surface battery last?", + question="How long should my Surface battery last?" + output = client.get_answers( + question=question, top=3, - confidence_score_threshold=0.2, + confidence_threshold=0.2, include_unstructured_sources=True, - answer_span_request=qna.AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + short_answer_options=qna.ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), - ) - - output = client.query_knowledge_base( - input, project_name=knowledge_base_project, deployment_name="test" ) - best_candidate = [a for a in output.answers if a.confidence_score > 0.9][0] - print("Q: {}".format(input.question)) + best_candidate = [a for a in output.answers if a.confidence > 0.9][0] + print("Q: {}".format(question)) print("A: {}".format(best_candidate.answer)) # [END query_knowledgebase] diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_query_text.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_query_text.py index 47582b2d106a..f00c1e412a93 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_query_text.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/samples/sample_query_text.py @@ -31,26 +31,21 @@ def sample_query_text(): client = QuestionAnsweringClient(endpoint, AzureKeyCredential(key)) with client: - input = qna.QueryTextOptions( - question="How long it takes to charge surface?", - records=[ - qna.TextRecord( - text="Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. " + - "It can take longer if you're using your Surface for power-intensive activities like gaming or video streaming while you're charging it.", - id="doc1" - ), - qna.TextRecord( - text="You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. " + - "The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface.", - id="doc2" - ) + question="How long it takes to charge surface?" + input = qna.AnswersFromTextOptions( + question=question, + text_documents=[ + "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. " + + "It can take longer if you're using your Surface for power-intensive activities like gaming or video streaming while you're charging it.", + "You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. " + + "The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface.", ] ) - output = client.query_text(input) + output = client.get_answers_from_text(input) - best_answer = [a for a in output.answers if a.confidence_score > 0.9][0] - print(u"Q: {}".format(input.question)) + best_answer = [a for a in output.answers if a.confidence > 0.9][0] + print(u"Q: {}".format(question)) print(u"A: {}".format(best_answer.answer)) # [END query_text] diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/setup.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/setup.py index 43de47ef0e69..35fff0b16aa7 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/setup.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/setup.py @@ -43,7 +43,7 @@ license='MIT License', # ensure that the development status reflects the status of your package classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", 'Programming Language :: Python', 'Programming Language :: Python :: 2', @@ -67,7 +67,7 @@ 'azure.ai.language', ]), install_requires=[ - 'azure-core<2.0.0,>=1.19.0', + 'azure-core<2.0.0,>=1.19.1', 'msrest>=0.6.21', ], extras_require={ diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/swagger/README.md b/sdk/cognitivelanguage/azure-ai-language-questionanswering/swagger/README.md index 8bc5962ab4d5..2d6142edc499 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/swagger/README.md +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/swagger/README.md @@ -20,7 +20,7 @@ autorest ### Settings ```yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/68e7988aba481206f08019d3efb585683d5bc577/specification/cognitiveservices/data-plane/Language/preview/2021-07-15-preview/questionanswering.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/34a2c0723155d134311419fd997925ce96b85bec/specification/cognitiveservices/data-plane/Language/stable/2021-10-01/questionanswering.json output-folder: ../azure/ai/language/questionanswering namespace: azure.ai.language.questionanswering package-name: azure-ai-language-questionanswering @@ -31,31 +31,31 @@ python: true title: QuestionAnsweringClient version-tolerant: true models-mode: msrest -package-version: 1.0.0b2 +package-version: 1.0.0 add-credential: true credential-default-policy-type: AzureKeyCredentialPolicy credential-key-header-name: Ocp-Apim-Subscription-Key black: true ``` -### Rename "QuestionAnsweringKnowledgeBase_Query" -> "QueryKnowledgeBase" +### Rename "QuestionAnsweringKnowledgeBase_Query" -> "GetAnswers" ```yaml directive: - from: swagger-document where: $["paths"]["/:query-knowledgebases"]["post"] transform: > - $["operationId"] = "queryKnowledgeBase"; + $["operationId"] = "getAnswers"; ``` -### Rename "QuestionAnsweringText_Query" -> "QueryText" +### Rename "QuestionAnsweringText_Query" -> "GetAnswersFromText" ```yaml directive: - from: swagger-document where: $["paths"]["/:query-text"]["post"] transform: > - $["operationId"] = "queryText"; + $["operationId"] = "getAnswersFromText"; ``` ### Rename `KnowledgeBasedQueryOptions` -> `Options` @@ -63,7 +63,7 @@ directive: ```yaml directive: - from: swagger-document - where: $["parameters"]["KnowledgeBaseQueryOptions"] + where: $["parameters"]["AnswersOptions"] transform: > $["x-ms-client-name"] = "Options"; ``` @@ -73,39 +73,32 @@ directive: ```yaml directive: - from: swagger-document - where: $["parameters"]["TextQueryOptions"] + where: $["parameters"]["AnswersFromTextOptions"] transform: > $["x-ms-client-name"] = "Options"; ``` -### Rename `KnowledgeBaseQueryOptions` -> `QueryKnowledgeBaseOptions` - -```yaml -directive: - - from: swagger-document - where: $["definitions"]["KnowledgeBaseQueryOptions"] - transform: > - $["x-ms-client-name"] = "QueryKnowledgeBaseOptions"; -``` - -### Rename `TextQueryOptions` -> `QueryTextOptions` +### Delete `StringIndexType` ```yaml directive: - from: swagger-document - where: $["definitions"]["TextQueryOptions"] + where: $["definitions"]["AnswersFromTextOptions"] transform: > - $["x-ms-client-name"] = "QueryTextOptions"; + delete $.properties["stringIndexType"] ``` -### Delete `StringIndexType` +### Delete `RankerKind` and `LogicalOperationKind` enums ```yaml directive: - from: swagger-document - where: $["definitions"]["TextQueryOptions"] + where: $["definitions"] transform: > - delete $.properties["stringIndexType"] + delete $["AnswersOptions"]["properties"]["rankerType"]["x-ms-enum"]; + delete $["AnswersOptions"]["properties"]["rankerType"]["enum"]; + delete $["LogicalOperationKind"]["x-ms-enum"]; + delete $["LogicalOperationKind"]["enum"]; ``` ### Make `MetadataFilter`'s `metadata` property a list of string @@ -116,7 +109,6 @@ directive: where: $["definitions"] transform: > delete $["MetadataFilter"]["properties"]["metadata"]["items"]["$ref"]; - $["MetadataFilter"]["properties"]["metadata"]["items"]["type"] = "array"; - $["MetadataFilter"]["properties"]["metadata"]["items"]["items"] = {"type": "string"}; + $["MetadataFilter"]["properties"]["metadata"]["items"]["type"] = "object"; delete $["MetadataRecord"]; -``` +``` \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase.yaml index 5ff8fa75e4ae..754023846058 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Ports @@ -67,29 +67,29 @@ interactions: on Surface.com. |\\n| Sensors | Six sensors\u2014 accelerometer, magnetometer, gyro, ambient light sensor, Hall effect, Wi-Fi SAR\u2014let apps do things like track motion and determine location. |\",\n \"confidenceScore\": - 1.0,\n \"id\": 5,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 1.0,\n \"id\": 114,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": [\n {\n \"displayOrder\": 0,\n \"qnaId\": - 6,\n \"displayText\": \"Software\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 7,\n \"displayText\": + 115,\n \"displayText\": \"Software\"\n },\n {\n + \ \"displayOrder\": 1,\n \"qnaId\": 116,\n \"displayText\": \"Processor\"\n },\n {\n \"displayOrder\": 2,\n - \ \"qnaId\": 8,\n \"displayText\": \"Memory and storage\"\n + \ \"qnaId\": 117,\n \"displayText\": \"Memory and storage\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 9,\n \"displayText\": \"Sensors\"\n }\n ]\n }\n + 118,\n \"displayText\": \"Sensors\"\n }\n ]\n }\n \ },\n {\n \"questions\": [\n \"Connect monitors, accessories, and other devices\"\n ],\n \"answer\": \"**Connect monitors, accessories, and other devices**\\n\\nYou can connect monitors, accessories, and other devices directly to your Surface Pro 4 using the USB port, Mini DisplayPort, or Bluetooth. Or, connect everything to a Surface Dock (sold separately). With Surface Dock, you can switch between fully connected and fully mobile - with a single connector.\",\n \"confidenceScore\": 0.4067,\n \"id\": - 64,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + with a single connector.\",\n \"confidenceScore\": 0.5997,\n \"id\": + 173,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"connect monitors, accessories, and other devices\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": [\n {\n \"displayOrder\": - 0,\n \"qnaId\": 65,\n \"displayText\": \"Set up your + 0,\n \"qnaId\": 174,\n \"displayText\": \"Set up your workspace with Surface Dock\"\n },\n {\n \"displayOrder\": - 1,\n \"qnaId\": 66,\n \"displayText\": \"Connect or + 1,\n \"qnaId\": 175,\n \"displayText\": \"Connect or project to a monitor, screen, or other display\"\n }\n ]\n \ }\n },\n {\n \"questions\": [\n \"Projector or monitor.\"\n \ ],\n \"answer\": \"If your monitor has a DisplayPort, you can connect @@ -99,27 +99,27 @@ interactions: is for video only. Audio will play from your Surface speakers unless you\u2019ve connected external speakers. For more info about this, see [Surface sound,](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) [volume, and audio accessories](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) - on Surface.com.\",\n \"confidenceScore\": 0.3392,\n \"id\": 68,\n + on Surface.com.\",\n \"confidenceScore\": 0.4511,\n \"id\": 177,\n \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n ]\n}" headers: apim-request-id: - - d0dc208c-60f1-4669-bddb-4522e3949ecf + - 3c370c26-52a7-44e4-a59e-5e9567dd9f2a content-length: - - '7136' + - '7137' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:34 GMT + - Thu, 28 Oct 2021 03:30:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1273' + - '421' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_filter.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_filter.yaml index 29691ffe60eb..33f49df89196 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_filter.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_filter.yaml @@ -1,8 +1,9 @@ interactions: - request: body: '{"question": "Battery life", "top": 3, "filters": {"metadataFilter": {"metadata": - [["explicitlytaggedheading", "check the battery level"], ["explicitlytaggedheading", - "make your battery last"]]}, "logicalOperation": "OR"}}' + [{"key": "explicitlytaggedheading", "value": "check the battery level"}, {"key": + "explicitlytaggedheading", "value": "make your battery last"}], "logicalOperation": + "OR"}}}' headers: Accept: - application/json @@ -11,19 +12,19 @@ interactions: Connection: - keep-alive Content-Length: - - '222' + - '254' Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Check the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": - 0.6905,\n \"id\": 24,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.6544,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": []\n }\n },\n {\n \"questions\": [\n @@ -31,35 +32,28 @@ interactions: battery last**\\n\\nFor info on how to care for your battery and power supply, conserve power, and make your Surface battery last longer, see [Surface battery and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) - on Surface.com.\",\n \"confidenceScore\": 0.5818,\n \"id\": 27,\n - \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + on Surface.com.\",\n \"confidenceScore\": 0.42950000000000005,\n \"id\": + 136,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - []\n }\n },\n {\n \"questions\": [\n \"Desktop taskbar.\"\n - \ ],\n \"answer\": \"**Desktop taskbar.**\\n\\nBattery status appears - at the right side of the taskbar. Select the battery icon for info about the - charging and battery status, including the percent remaining. \u272A\",\n - \ \"confidenceScore\": 0.36340000000000006,\n \"id\": 26,\n \"source\": - \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": - {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n - \ ]\n}" + []\n }\n }\n ]\n}" headers: apim-request-id: - - 7884df53-4df8-488a-b78c-692ac7f4f783 + - 5aeeb4c7-152c-4b8d-bfd4-acbf6c1c2d90 content-length: - - '1622' + - '1143' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:33 GMT + - Thu, 28 Oct 2021 03:30:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '700' + - '187' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_filter_dict_params.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_filter_dict_params.yaml new file mode 100644 index 000000000000..6c9119ef0254 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_filter_dict_params.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + body: '{"question": "Battery life", "top": 3, "filters": {"metadataFilter": {"metadata": + [{"key": "explicitlytaggedheading", "value": "check the battery level"}, {"key": + "explicitlytaggedheading", "value": "make your battery last"}], "logicalOperation": + "or"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '254' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 + response: + body: + string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Check + the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou + can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": + 0.6544,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery + level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n + \ \"prompts\": []\n }\n },\n {\n \"questions\": [\n + \ \"Make your battery last\"\n ],\n \"answer\": \"**Make your + battery last**\\n\\nFor info on how to care for your battery and power supply, + conserve power, and make your Surface battery last longer, see [Surface battery + and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) + on Surface.com.\",\n \"confidenceScore\": 0.42950000000000005,\n \"id\": + 136,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n + \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": + []\n }\n }\n ]\n}" + headers: + apim-request-id: + - 8f7d7edb-0b56-4b37-9009-7199bc538d62 + content-length: + - '1143' + content-type: + - application/json; charset=utf-8 + csp-billing-usage: + - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 + date: + - Thu, 28 Oct 2021 03:30:13 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '953' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_llc.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_llc.yaml index d728a05b2eab..d5cd6dc40fc2 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_llc.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_llc.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Ports @@ -67,29 +67,29 @@ interactions: on Surface.com. |\\n| Sensors | Six sensors\u2014 accelerometer, magnetometer, gyro, ambient light sensor, Hall effect, Wi-Fi SAR\u2014let apps do things like track motion and determine location. |\",\n \"confidenceScore\": - 1.0,\n \"id\": 5,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 1.0,\n \"id\": 114,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": [\n {\n \"displayOrder\": 0,\n \"qnaId\": - 6,\n \"displayText\": \"Software\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 7,\n \"displayText\": + 115,\n \"displayText\": \"Software\"\n },\n {\n + \ \"displayOrder\": 1,\n \"qnaId\": 116,\n \"displayText\": \"Processor\"\n },\n {\n \"displayOrder\": 2,\n - \ \"qnaId\": 8,\n \"displayText\": \"Memory and storage\"\n + \ \"qnaId\": 117,\n \"displayText\": \"Memory and storage\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 9,\n \"displayText\": \"Sensors\"\n }\n ]\n }\n + 118,\n \"displayText\": \"Sensors\"\n }\n ]\n }\n \ },\n {\n \"questions\": [\n \"Connect monitors, accessories, and other devices\"\n ],\n \"answer\": \"**Connect monitors, accessories, and other devices**\\n\\nYou can connect monitors, accessories, and other devices directly to your Surface Pro 4 using the USB port, Mini DisplayPort, or Bluetooth. Or, connect everything to a Surface Dock (sold separately). With Surface Dock, you can switch between fully connected and fully mobile - with a single connector.\",\n \"confidenceScore\": 0.4067,\n \"id\": - 64,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + with a single connector.\",\n \"confidenceScore\": 0.5997,\n \"id\": + 173,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"connect monitors, accessories, and other devices\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": [\n {\n \"displayOrder\": - 0,\n \"qnaId\": 65,\n \"displayText\": \"Set up your + 0,\n \"qnaId\": 174,\n \"displayText\": \"Set up your workspace with Surface Dock\"\n },\n {\n \"displayOrder\": - 1,\n \"qnaId\": 66,\n \"displayText\": \"Connect or + 1,\n \"qnaId\": 175,\n \"displayText\": \"Connect or project to a monitor, screen, or other display\"\n }\n ]\n \ }\n },\n {\n \"questions\": [\n \"Projector or monitor.\"\n \ ],\n \"answer\": \"If your monitor has a DisplayPort, you can connect @@ -99,27 +99,27 @@ interactions: is for video only. Audio will play from your Surface speakers unless you\u2019ve connected external speakers. For more info about this, see [Surface sound,](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) [volume, and audio accessories](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) - on Surface.com.\",\n \"confidenceScore\": 0.3392,\n \"id\": 68,\n + on Surface.com.\",\n \"confidenceScore\": 0.4511,\n \"id\": 177,\n \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n ]\n}" headers: apim-request-id: - - 020d4cd9-b1fe-49ce-8ce1-e1f95aefbbf3 + - dbf61866-0780-4e75-a44b-a5b5bb6d074f content-length: - - '7136' + - '7137' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:34 GMT + - Thu, 28 Oct 2021 03:30:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1590' + - '331' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_llc_with_answerspan.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_llc_with_answerspan.yaml index 525c23f2acd1..e06029864867 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_llc_with_answerspan.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_llc_with_answerspan.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Ports @@ -68,15 +68,15 @@ interactions: on Surface.com. |\\n| Sensors | Six sensors\u2014 accelerometer, magnetometer, gyro, ambient light sensor, Hall effect, Wi-Fi SAR\u2014let apps do things like track motion and determine location. |\",\n \"confidenceScore\": - 1.0,\n \"id\": 5,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 1.0,\n \"id\": 114,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": [\n {\n \"displayOrder\": 0,\n \"qnaId\": - 6,\n \"displayText\": \"Software\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 7,\n \"displayText\": + 115,\n \"displayText\": \"Software\"\n },\n {\n + \ \"displayOrder\": 1,\n \"qnaId\": 116,\n \"displayText\": \"Processor\"\n },\n {\n \"displayOrder\": 2,\n - \ \"qnaId\": 8,\n \"displayText\": \"Memory and storage\"\n + \ \"qnaId\": 117,\n \"displayText\": \"Memory and storage\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 9,\n \"displayText\": \"Sensors\"\n }\n ]\n },\n + 118,\n \"displayText\": \"Sensors\"\n }\n ]\n },\n \ \"answerSpan\": {\n \"text\": \"\\nSurface Pro 4 has the ports you expect in a full-feature laptop.\\n\\nFull-size USB 3.0 port Connect a USB accessory like a mouse, printer, Ethernet adapter, USB drive, or smartphone\",\n @@ -87,14 +87,14 @@ interactions: accessories, and other devices directly to your Surface Pro 4 using the USB port, Mini DisplayPort, or Bluetooth. Or, connect everything to a Surface Dock (sold separately). With Surface Dock, you can switch between fully connected - and fully mobile with a single connector.\",\n \"confidenceScore\": 0.4067,\n - \ \"id\": 64,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + and fully mobile with a single connector.\",\n \"confidenceScore\": 0.5997,\n + \ \"id\": 173,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"connect monitors, accessories, and other devices\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": [\n {\n \"displayOrder\": - 0,\n \"qnaId\": 65,\n \"displayText\": \"Set up your + 0,\n \"qnaId\": 174,\n \"displayText\": \"Set up your workspace with Surface Dock\"\n },\n {\n \"displayOrder\": - 1,\n \"qnaId\": 66,\n \"displayText\": \"Connect or + 1,\n \"qnaId\": 175,\n \"displayText\": \"Connect or project to a monitor, screen, or other display\"\n }\n ]\n \ }\n },\n {\n \"questions\": [\n \"Projector or monitor.\"\n \ ],\n \"answer\": \"If your monitor has a DisplayPort, you can connect @@ -104,27 +104,27 @@ interactions: is for video only. Audio will play from your Surface speakers unless you\u2019ve connected external speakers. For more info about this, see [Surface sound,](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) [volume, and audio accessories](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) - on Surface.com.\",\n \"confidenceScore\": 0.3392,\n \"id\": 68,\n + on Surface.com.\",\n \"confidenceScore\": 0.4511,\n \"id\": 177,\n \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n ]\n}" headers: apim-request-id: - - 8ab8a1da-8fd6-4091-80e3-470885a6b2b7 + - 34ced98e-2ff2-427e-9042-22a726e98c7d content-length: - - '7435' + - '7449' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:35 GMT + - Thu, 28 Oct 2021 03:30:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2624' + - '565' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_only_id.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_only_id.yaml index e6932c6c456c..cf64b563e7be 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_only_id.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_only_id.yaml @@ -13,37 +13,31 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: - string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Charge - your Surface Pro 4\"\n ],\n \"answer\": \"**Charge your Surface - Pro 4**\\n\\n1. Connect the two parts of the power cord.\\n\\n2. Connect - the power cord securely to the charging port.\\n\\n3. Plug the power supply - into an electrical outlet.\",\n \"confidenceScore\": 1.0,\n \"id\": - 19,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": - {\n \"explicitlytaggedheading\": \"charge your surface pro 4\"\n },\n - \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - []\n }\n }\n ]\n}" + string: "{\n \"answers\": [\n {\n \"questions\": [],\n \"answer\": + \"No good match found in KB\",\n \"confidenceScore\": 0.0,\n \"id\": + -1,\n \"metadata\": {}\n }\n ]\n}" headers: apim-request-id: - - 4f01bfd0-6d10-4fbd-a02c-81160bc374d2 + - b9ca5848-776e-41d5-9a19-d6b3c6205e2e content-length: - - '583' + - '169' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:34 GMT + - Thu, 28 Oct 2021 03:30:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1071' + - '199' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_overload.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_overload.yaml index e3d3aacec340..bb8f6ebe2cba 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_overload.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_overload.yaml @@ -16,43 +16,43 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Make your battery last\"\n ],\n \"answer\": \"**Make your battery last**\\n\\nFor info on how to care for your battery and power supply, conserve power, and make your Surface battery last longer, see [Surface battery and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) - on Surface.com.\",\n \"confidenceScore\": 0.9201999999999999,\n \"id\": - 27,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + on Surface.com.\",\n \"confidenceScore\": 0.9079,\n \"id\": 136,\n + \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n },\n {\n \"questions\": [\n \"Check the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": - 0.4412,\n \"id\": 24,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.48469999999999996,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": []\n }\n }\n ]\n}" headers: apim-request-id: - - f02239ca-4edc-4348-b5d6-b3023765bddb + - 43e45935-1381-4971-8151-874b0066111d content-length: - - '1140' + - '1143' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:34 GMT + - Thu, 28 Oct 2021 03:30:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '916' + - '456' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_python_dict.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_python_dict.yaml index 041d14502a21..ed28340abf28 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_python_dict.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_python_dict.yaml @@ -13,37 +13,31 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: - string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Charge - your Surface Pro 4\"\n ],\n \"answer\": \"**Charge your Surface - Pro 4**\\n\\n1. Connect the two parts of the power cord.\\n\\n2. Connect - the power cord securely to the charging port.\\n\\n3. Plug the power supply - into an electrical outlet.\",\n \"confidenceScore\": 1.0,\n \"id\": - 19,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": - {\n \"explicitlytaggedheading\": \"charge your surface pro 4\"\n },\n - \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - []\n }\n }\n ]\n}" + string: "{\n \"answers\": [\n {\n \"questions\": [],\n \"answer\": + \"No good match found in KB\",\n \"confidenceScore\": 0.0,\n \"id\": + -1,\n \"metadata\": {}\n }\n ]\n}" headers: apim-request-id: - - 845c4b78-915e-484c-af56-56ae05539a6e + - 9eadec26-fe1a-4b5e-a130-b94cd5f22527 content-length: - - '583' + - '169' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:34 GMT + - Thu, 28 Oct 2021 03:30:17 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1099' + - '128' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_answerspan.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_answerspan.yaml index f90bbb484e56..7dab19144c02 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_answerspan.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_answerspan.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Ports @@ -68,15 +68,15 @@ interactions: on Surface.com. |\\n| Sensors | Six sensors\u2014 accelerometer, magnetometer, gyro, ambient light sensor, Hall effect, Wi-Fi SAR\u2014let apps do things like track motion and determine location. |\",\n \"confidenceScore\": - 1.0,\n \"id\": 5,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 1.0,\n \"id\": 114,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": [\n {\n \"displayOrder\": 0,\n \"qnaId\": - 6,\n \"displayText\": \"Software\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 7,\n \"displayText\": + 115,\n \"displayText\": \"Software\"\n },\n {\n + \ \"displayOrder\": 1,\n \"qnaId\": 116,\n \"displayText\": \"Processor\"\n },\n {\n \"displayOrder\": 2,\n - \ \"qnaId\": 8,\n \"displayText\": \"Memory and storage\"\n + \ \"qnaId\": 117,\n \"displayText\": \"Memory and storage\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 9,\n \"displayText\": \"Sensors\"\n }\n ]\n },\n + 118,\n \"displayText\": \"Sensors\"\n }\n ]\n },\n \ \"answerSpan\": {\n \"text\": \"\\nSurface Pro 4 has the ports you expect in a full-feature laptop.\\n\\nFull-size USB 3.0 port Connect a USB accessory like a mouse, printer, Ethernet adapter, USB drive, or smartphone\",\n @@ -87,19 +87,15 @@ interactions: accessories, and other devices directly to your Surface Pro 4 using the USB port, Mini DisplayPort, or Bluetooth. Or, connect everything to a Surface Dock (sold separately). With Surface Dock, you can switch between fully connected - and fully mobile with a single connector.\",\n \"confidenceScore\": 0.4067,\n - \ \"id\": 64,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + and fully mobile with a single connector.\",\n \"confidenceScore\": 0.5997,\n + \ \"id\": 173,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"connect monitors, accessories, and other devices\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": [\n {\n \"displayOrder\": - 0,\n \"qnaId\": 65,\n \"displayText\": \"Set up your + 0,\n \"qnaId\": 174,\n \"displayText\": \"Set up your workspace with Surface Dock\"\n },\n {\n \"displayOrder\": - 1,\n \"qnaId\": 66,\n \"displayText\": \"Connect or + 1,\n \"qnaId\": 175,\n \"displayText\": \"Connect or project to a monitor, screen, or other display\"\n }\n ]\n - \ },\n \"answerSpan\": {\n \"text\": \"\\nYou can connect - monitors, accessories, and other devices directly to your Surface Pro 4 using - the USB port, Mini DisplayPort, or Bluetooth\",\n \"confidenceScore\": - 0.051399999999999994,\n \"offset\": 53,\n \"length\": 140\n \ }\n },\n {\n \"questions\": [\n \"Projector or monitor.\"\n \ ],\n \"answer\": \"If your monitor has a DisplayPort, you can connect it to your Surface using a DisplayPort to Mini DisplayPort cable (sold separately). @@ -108,27 +104,27 @@ interactions: is for video only. Audio will play from your Surface speakers unless you\u2019ve connected external speakers. For more info about this, see [Surface sound,](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) [volume, and audio accessories](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) - on Surface.com.\",\n \"confidenceScore\": 0.3392,\n \"id\": 68,\n + on Surface.com.\",\n \"confidenceScore\": 0.4511,\n \"id\": 177,\n \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n ]\n}" headers: apim-request-id: - - 33feb3cb-5959-4ca7-97de-8c95847f517e + - 4860b0b2-b82c-4bd5-beec-165667a1ed00 content-length: - - '7719' + - '7449' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:34 GMT + - Thu, 28 Oct 2021 03:30:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1270' + - '782' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_dictparams.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_dictparams.yaml index 459558c35245..6fa8aa0f68b3 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_dictparams.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_dictparams.yaml @@ -16,43 +16,43 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Make your battery last\"\n ],\n \"answer\": \"**Make your battery last**\\n\\nFor info on how to care for your battery and power supply, conserve power, and make your Surface battery last longer, see [Surface battery and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) - on Surface.com.\",\n \"confidenceScore\": 0.9201999999999999,\n \"id\": - 27,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + on Surface.com.\",\n \"confidenceScore\": 0.9079,\n \"id\": 136,\n + \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n },\n {\n \"questions\": [\n \"Check the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": - 0.4412,\n \"id\": 24,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.48469999999999996,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": []\n }\n }\n ]\n}" headers: apim-request-id: - - 1f863859-4839-430b-9e06-3461d04f010e + - 4f358c9a-2895-487e-8f8a-d947c9b90c7c content-length: - - '1140' + - '1143' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:35 GMT + - Thu, 28 Oct 2021 03:30:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2626' + - '513' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_followup.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_followup.yaml index 96d3a557c24b..7d066c15fa85 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_followup.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase.test_query_knowledgebase_with_followup.yaml @@ -16,49 +16,49 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Make your battery last\"\n ],\n \"answer\": \"**Make your battery last**\\n\\nFor info on how to care for your battery and power supply, conserve power, and make your Surface battery last longer, see [Surface battery and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) - on Surface.com.\",\n \"confidenceScore\": 0.9201999999999999,\n \"id\": - 27,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + on Surface.com.\",\n \"confidenceScore\": 0.9079,\n \"id\": 136,\n + \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n },\n {\n \"questions\": [\n \"Check the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": - 0.4412,\n \"id\": 24,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.48469999999999996,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": []\n }\n }\n ]\n}" headers: apim-request-id: - - 227983f1-c75e-4ee2-910d-589011a7a251 + - 9dda58f9-b755-4ddd-8a59-13a99672d664 content-length: - - '1140' + - '1143' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:35 GMT + - Thu, 28 Oct 2021 03:30:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2660' + - '557' status: code: 200 message: OK - request: body: '{"question": "How long it takes to charge Surface?", "top": 3, "userId": - "sd53lsY=", "confidenceScoreThreshold": 0.2, "context": {"previousQnaId": 27, + "sd53lsY=", "confidenceScoreThreshold": 0.2, "context": {"previousQnaId": 136, "previousUserQuery": "How long should my Surface battery last?"}, "answerSpanRequest": {"enable": true, "confidenceScoreThreshold": 0.2, "topAnswersWithSpan": 1}, "includeUnstructuredSources": true}' @@ -70,13 +70,13 @@ interactions: Connection: - keep-alive Content-Length: - - '349' + - '350' Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Power @@ -88,44 +88,36 @@ interactions: like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface.\",\n \"confidenceScore\": - 0.5296,\n \"id\": 23,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.6015,\n \"id\": 132,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"power and charging\"\n \ },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - [\n {\n \"displayOrder\": 0,\n \"qnaId\": 24,\n + [\n {\n \"displayOrder\": 0,\n \"qnaId\": 133,\n \ \"displayText\": \"Check the battery level\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 25,\n \"displayText\": + \ \"displayOrder\": 1,\n \"qnaId\": 134,\n \"displayText\": \"Lock screen.\"\n },\n {\n \"displayOrder\": - 2,\n \"qnaId\": 26,\n \"displayText\": \"Desktop taskbar.\"\n + 2,\n \"qnaId\": 135,\n \"displayText\": \"Desktop taskbar.\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 27,\n \"displayText\": \"Make your battery last\"\n }\n + 136,\n \"displayText\": \"Make your battery last\"\n }\n \ ]\n },\n \"answerSpan\": {\n \"text\": \" two to four hours\",\n \"confidenceScore\": 0.3795,\n \"offset\": 32,\n - \ \"length\": 19\n }\n },\n {\n \"questions\": [\n \"Charge - your Surface Pro 4\"\n ],\n \"answer\": \"**Charge your Surface - Pro 4**\\n\\n1. Connect the two parts of the power cord.\\n\\n2. Connect - the power cord securely to the charging port.\\n\\n3. Plug the power supply - into an electrical outlet.\",\n \"confidenceScore\": 0.2707,\n \"id\": - 19,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": - {\n \"explicitlytaggedheading\": \"charge your surface pro 4\"\n },\n - \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - []\n }\n }\n ]\n}" + \ \"length\": 19\n }\n }\n ]\n}" headers: apim-request-id: - - f95352a5-4e6d-4ec1-8809-d164a774dfe6 + - 9f3f573f-142d-4250-ad13-ac11e6061447 content-length: - - '2154' + - '1594' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 date: - - Thu, 30 Sep 2021 15:52:35 GMT + - Thu, 28 Oct 2021 03:30:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '509' + - '562' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase.yaml index e522576f82a0..059b82def211 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase.yaml @@ -1,18 +1,18 @@ interactions: - request: body: '{"question": "Ports and connectors", "top": 3, "context": {"previousQnaId": - 4, "previousUserQuery": "Meet Surface Pro 4"}}' + 4}}' headers: Accept: - application/json Content-Length: - - '122' + - '79' Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Ports @@ -63,29 +63,29 @@ interactions: on Surface.com. |\\n| Sensors | Six sensors\u2014 accelerometer, magnetometer, gyro, ambient light sensor, Hall effect, Wi-Fi SAR\u2014let apps do things like track motion and determine location. |\",\n \"confidenceScore\": - 1.0,\n \"id\": 5,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 1.0,\n \"id\": 114,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": [\n {\n \"displayOrder\": 0,\n \"qnaId\": - 6,\n \"displayText\": \"Software\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 7,\n \"displayText\": + 115,\n \"displayText\": \"Software\"\n },\n {\n + \ \"displayOrder\": 1,\n \"qnaId\": 116,\n \"displayText\": \"Processor\"\n },\n {\n \"displayOrder\": 2,\n - \ \"qnaId\": 8,\n \"displayText\": \"Memory and storage\"\n + \ \"qnaId\": 117,\n \"displayText\": \"Memory and storage\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 9,\n \"displayText\": \"Sensors\"\n }\n ]\n }\n + 118,\n \"displayText\": \"Sensors\"\n }\n ]\n }\n \ },\n {\n \"questions\": [\n \"Connect monitors, accessories, and other devices\"\n ],\n \"answer\": \"**Connect monitors, accessories, and other devices**\\n\\nYou can connect monitors, accessories, and other devices directly to your Surface Pro 4 using the USB port, Mini DisplayPort, or Bluetooth. Or, connect everything to a Surface Dock (sold separately). With Surface Dock, you can switch between fully connected and fully mobile - with a single connector.\",\n \"confidenceScore\": 0.4067,\n \"id\": - 64,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + with a single connector.\",\n \"confidenceScore\": 0.5997,\n \"id\": + 173,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"connect monitors, accessories, and other devices\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": [\n {\n \"displayOrder\": - 0,\n \"qnaId\": 65,\n \"displayText\": \"Set up your + 0,\n \"qnaId\": 174,\n \"displayText\": \"Set up your workspace with Surface Dock\"\n },\n {\n \"displayOrder\": - 1,\n \"qnaId\": 66,\n \"displayText\": \"Connect or + 1,\n \"qnaId\": 175,\n \"displayText\": \"Connect or project to a monitor, screen, or other display\"\n }\n ]\n \ }\n },\n {\n \"questions\": [\n \"Projector or monitor.\"\n \ ],\n \"answer\": \"If your monitor has a DisplayPort, you can connect @@ -95,21 +95,21 @@ interactions: is for video only. Audio will play from your Surface speakers unless you\u2019ve connected external speakers. For more info about this, see [Surface sound,](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) [volume, and audio accessories](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) - on Surface.com.\",\n \"confidenceScore\": 0.3392,\n \"id\": 68,\n + on Surface.com.\",\n \"confidenceScore\": 0.4511,\n \"id\": 177,\n \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n ]\n}" headers: - apim-request-id: 5971ea57-2aa9-4179-bda9-aba6b937380f - content-length: '7123' + apim-request-id: 6ae5add4-a9d5-4511-8151-bc476de2b9f8 + content-length: '7137' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:36 GMT + date: Thu, 28 Oct 2021 03:30:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '1153' + x-envoy-upstream-service-time: '315' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_filter.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_filter.yaml index abb85ac4c446..7568f8303ac6 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_filter.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_filter.yaml @@ -1,25 +1,26 @@ interactions: - request: body: '{"question": "Battery life", "top": 3, "filters": {"metadataFilter": {"metadata": - [["explicitlytaggedheading", "check the battery level"], ["explicitlytaggedheading", - "make your battery last"]]}, "logicalOperation": "OR"}}' + [{"key": "explicitlytaggedheading", "value": "check the battery level"}, {"key": + "explicitlytaggedheading", "value": "make your battery last"}], "logicalOperation": + "OR"}}}' headers: Accept: - application/json Content-Length: - - '222' + - '254' Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Check the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": - 0.6905,\n \"id\": 24,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.6544,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": []\n }\n },\n {\n \"questions\": [\n @@ -27,29 +28,22 @@ interactions: battery last**\\n\\nFor info on how to care for your battery and power supply, conserve power, and make your Surface battery last longer, see [Surface battery and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) - on Surface.com.\",\n \"confidenceScore\": 0.5818,\n \"id\": 27,\n - \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + on Surface.com.\",\n \"confidenceScore\": 0.42950000000000005,\n \"id\": + 136,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - []\n }\n },\n {\n \"questions\": [\n \"Desktop taskbar.\"\n - \ ],\n \"answer\": \"**Desktop taskbar.**\\n\\nBattery status appears - at the right side of the taskbar. Select the battery icon for info about the - charging and battery status, including the percent remaining. \u272A\",\n - \ \"confidenceScore\": 0.36340000000000006,\n \"id\": 26,\n \"source\": - \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": - {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n - \ ]\n}" + []\n }\n }\n ]\n}" headers: - apim-request-id: e958c124-6d15-41c7-93a5-0a242f6b01b1 - content-length: '1622' + apim-request-id: 9fd77651-b899-4814-92b9-cec69b7ba85d + content-length: '1143' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:35 GMT + date: Thu, 28 Oct 2021 03:30:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '1503' + x-envoy-upstream-service-time: '169' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_filter_dict_params.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_filter_dict_params.yaml new file mode 100644 index 000000000000..bef82d757032 --- /dev/null +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_filter_dict_params.yaml @@ -0,0 +1,49 @@ +interactions: +- request: + body: '{"question": "Battery life", "top": 3, "filters": {"metadataFilter": {"metadata": + [{"key": "explicitlytaggedheading", "value": "check the battery level"}, {"key": + "explicitlytaggedheading", "value": "make your battery last"}], "logicalOperation": + "or"}}}' + headers: + Accept: + - application/json + Content-Length: + - '254' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 + response: + body: + string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Check + the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou + can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": + 0.6544,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery + level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n + \ \"prompts\": []\n }\n },\n {\n \"questions\": [\n + \ \"Make your battery last\"\n ],\n \"answer\": \"**Make your + battery last**\\n\\nFor info on how to care for your battery and power supply, + conserve power, and make your Surface battery last longer, see [Surface battery + and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) + on Surface.com.\",\n \"confidenceScore\": 0.42950000000000005,\n \"id\": + 136,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n + \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": + []\n }\n }\n ]\n}" + headers: + apim-request-id: f6ed3790-9b25-4674-891f-0359d37633f1 + content-length: '1143' + content-type: application/json; charset=utf-8 + csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 + date: Thu, 28 Oct 2021 03:30:23 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '189' + status: + code: 200 + message: OK + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 +version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_llc.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_llc.yaml index f5d1f2db923a..369bdaa14495 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_llc.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_llc.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Ports @@ -63,29 +63,29 @@ interactions: on Surface.com. |\\n| Sensors | Six sensors\u2014 accelerometer, magnetometer, gyro, ambient light sensor, Hall effect, Wi-Fi SAR\u2014let apps do things like track motion and determine location. |\",\n \"confidenceScore\": - 1.0,\n \"id\": 5,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 1.0,\n \"id\": 114,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": [\n {\n \"displayOrder\": 0,\n \"qnaId\": - 6,\n \"displayText\": \"Software\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 7,\n \"displayText\": + 115,\n \"displayText\": \"Software\"\n },\n {\n + \ \"displayOrder\": 1,\n \"qnaId\": 116,\n \"displayText\": \"Processor\"\n },\n {\n \"displayOrder\": 2,\n - \ \"qnaId\": 8,\n \"displayText\": \"Memory and storage\"\n + \ \"qnaId\": 117,\n \"displayText\": \"Memory and storage\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 9,\n \"displayText\": \"Sensors\"\n }\n ]\n }\n + 118,\n \"displayText\": \"Sensors\"\n }\n ]\n }\n \ },\n {\n \"questions\": [\n \"Connect monitors, accessories, and other devices\"\n ],\n \"answer\": \"**Connect monitors, accessories, and other devices**\\n\\nYou can connect monitors, accessories, and other devices directly to your Surface Pro 4 using the USB port, Mini DisplayPort, or Bluetooth. Or, connect everything to a Surface Dock (sold separately). With Surface Dock, you can switch between fully connected and fully mobile - with a single connector.\",\n \"confidenceScore\": 0.4067,\n \"id\": - 64,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + with a single connector.\",\n \"confidenceScore\": 0.5997,\n \"id\": + 173,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"connect monitors, accessories, and other devices\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": [\n {\n \"displayOrder\": - 0,\n \"qnaId\": 65,\n \"displayText\": \"Set up your + 0,\n \"qnaId\": 174,\n \"displayText\": \"Set up your workspace with Surface Dock\"\n },\n {\n \"displayOrder\": - 1,\n \"qnaId\": 66,\n \"displayText\": \"Connect or + 1,\n \"qnaId\": 175,\n \"displayText\": \"Connect or project to a monitor, screen, or other display\"\n }\n ]\n \ }\n },\n {\n \"questions\": [\n \"Projector or monitor.\"\n \ ],\n \"answer\": \"If your monitor has a DisplayPort, you can connect @@ -95,21 +95,21 @@ interactions: is for video only. Audio will play from your Surface speakers unless you\u2019ve connected external speakers. For more info about this, see [Surface sound,](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) [volume, and audio accessories](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) - on Surface.com.\",\n \"confidenceScore\": 0.3392,\n \"id\": 68,\n + on Surface.com.\",\n \"confidenceScore\": 0.4511,\n \"id\": 177,\n \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n ]\n}" headers: - apim-request-id: f2cf1974-868f-42c6-b183-ff7f5df0ebe4 - content-length: '7123' + apim-request-id: fcbbefc3-2e1b-478b-a82d-c9661b218841 + content-length: '7137' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:35 GMT + date: Thu, 28 Oct 2021 03:30:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '519' + x-envoy-upstream-service-time: '327' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_llc_with_answerspan.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_llc_with_answerspan.yaml index 862b6d6d3678..30d9397cabef 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_llc_with_answerspan.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_llc_with_answerspan.yaml @@ -11,9 +11,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Ports @@ -64,15 +64,15 @@ interactions: on Surface.com. |\\n| Sensors | Six sensors\u2014 accelerometer, magnetometer, gyro, ambient light sensor, Hall effect, Wi-Fi SAR\u2014let apps do things like track motion and determine location. |\",\n \"confidenceScore\": - 1.0,\n \"id\": 5,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 1.0,\n \"id\": 114,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": [\n {\n \"displayOrder\": 0,\n \"qnaId\": - 6,\n \"displayText\": \"Software\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 7,\n \"displayText\": + 115,\n \"displayText\": \"Software\"\n },\n {\n + \ \"displayOrder\": 1,\n \"qnaId\": 116,\n \"displayText\": \"Processor\"\n },\n {\n \"displayOrder\": 2,\n - \ \"qnaId\": 8,\n \"displayText\": \"Memory and storage\"\n + \ \"qnaId\": 117,\n \"displayText\": \"Memory and storage\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 9,\n \"displayText\": \"Sensors\"\n }\n ]\n },\n + 118,\n \"displayText\": \"Sensors\"\n }\n ]\n },\n \ \"answerSpan\": {\n \"text\": \"\\nSurface Pro 4 has the ports you expect in a full-feature laptop.\\n\\nFull-size USB 3.0 port Connect a USB accessory like a mouse, printer, Ethernet adapter, USB drive, or smartphone\",\n @@ -83,19 +83,15 @@ interactions: accessories, and other devices directly to your Surface Pro 4 using the USB port, Mini DisplayPort, or Bluetooth. Or, connect everything to a Surface Dock (sold separately). With Surface Dock, you can switch between fully connected - and fully mobile with a single connector.\",\n \"confidenceScore\": 0.4067,\n - \ \"id\": 64,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + and fully mobile with a single connector.\",\n \"confidenceScore\": 0.5997,\n + \ \"id\": 173,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"connect monitors, accessories, and other devices\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": [\n {\n \"displayOrder\": - 0,\n \"qnaId\": 65,\n \"displayText\": \"Set up your + 0,\n \"qnaId\": 174,\n \"displayText\": \"Set up your workspace with Surface Dock\"\n },\n {\n \"displayOrder\": - 1,\n \"qnaId\": 66,\n \"displayText\": \"Connect or + 1,\n \"qnaId\": 175,\n \"displayText\": \"Connect or project to a monitor, screen, or other display\"\n }\n ]\n - \ },\n \"answerSpan\": {\n \"text\": \"\\nYou can connect - monitors, accessories, and other devices directly to your Surface Pro 4 using - the USB port, Mini DisplayPort, or Bluetooth\",\n \"confidenceScore\": - 0.051399999999999994,\n \"offset\": 53,\n \"length\": 140\n \ }\n },\n {\n \"questions\": [\n \"Projector or monitor.\"\n \ ],\n \"answer\": \"If your monitor has a DisplayPort, you can connect it to your Surface using a DisplayPort to Mini DisplayPort cable (sold separately). @@ -104,21 +100,21 @@ interactions: is for video only. Audio will play from your Surface speakers unless you\u2019ve connected external speakers. For more info about this, see [Surface sound,](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) [volume, and audio accessories](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) - on Surface.com.\",\n \"confidenceScore\": 0.3392,\n \"id\": 68,\n + on Surface.com.\",\n \"confidenceScore\": 0.4511,\n \"id\": 177,\n \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n ]\n}" headers: - apim-request-id: ec633ba0-764f-4865-8e8b-69ffbc1f74f5 - content-length: '7719' + apim-request-id: ecacf877-02ba-469f-94e4-7b004bcba242 + content-length: '7449' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:37 GMT + date: Thu, 28 Oct 2021 03:30:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '663' + x-envoy-upstream-service-time: '783' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_only_id.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_only_id.yaml index c46b8b79716e..8ac7179c529f 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_only_id.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_only_id.yaml @@ -9,31 +9,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: - string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Charge - your Surface Pro 4\"\n ],\n \"answer\": \"**Charge your Surface - Pro 4**\\n\\n1. Connect the two parts of the power cord.\\n\\n2. Connect - the power cord securely to the charging port.\\n\\n3. Plug the power supply - into an electrical outlet.\",\n \"confidenceScore\": 1.0,\n \"id\": - 19,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": - {\n \"explicitlytaggedheading\": \"charge your surface pro 4\"\n },\n - \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - []\n }\n }\n ]\n}" + string: "{\n \"answers\": [\n {\n \"questions\": [],\n \"answer\": + \"No good match found in KB\",\n \"confidenceScore\": 0.0,\n \"id\": + -1,\n \"metadata\": {}\n }\n ]\n}" headers: - apim-request-id: 824a47b2-1f4a-4056-8c26-ddba66a21497 - content-length: '583' + apim-request-id: a9b84106-3ca9-434d-8295-4256bafc7d95 + content-length: '169' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:35 GMT + date: Thu, 28 Oct 2021 03:30:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '879' + x-envoy-upstream-service-time: '129' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_overload.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_overload.yaml index c4cf69673348..c7e4cece2657 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_overload.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_overload.yaml @@ -12,37 +12,37 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Make your battery last\"\n ],\n \"answer\": \"**Make your battery last**\\n\\nFor info on how to care for your battery and power supply, conserve power, and make your Surface battery last longer, see [Surface battery and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) - on Surface.com.\",\n \"confidenceScore\": 0.9201999999999999,\n \"id\": - 27,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + on Surface.com.\",\n \"confidenceScore\": 0.9079,\n \"id\": 136,\n + \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n },\n {\n \"questions\": [\n \"Check the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": - 0.4412,\n \"id\": 24,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.48469999999999996,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": []\n }\n }\n ]\n}" headers: - apim-request-id: cd3dad50-3644-4273-afc0-442c50d22419 - content-length: '1140' + apim-request-id: 8b20dc3d-50ea-490c-8cee-4e8efee290fe + content-length: '1143' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:35 GMT + date: Thu, 28 Oct 2021 03:30:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '1047' + x-envoy-upstream-service-time: '714' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_python_dict.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_python_dict.yaml index 2b3cc394ee2c..5c7983a6fa6b 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_python_dict.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_python_dict.yaml @@ -9,31 +9,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: - string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Charge - your Surface Pro 4\"\n ],\n \"answer\": \"**Charge your Surface - Pro 4**\\n\\n1. Connect the two parts of the power cord.\\n\\n2. Connect - the power cord securely to the charging port.\\n\\n3. Plug the power supply - into an electrical outlet.\",\n \"confidenceScore\": 1.0,\n \"id\": - 19,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": - {\n \"explicitlytaggedheading\": \"charge your surface pro 4\"\n },\n - \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - []\n }\n }\n ]\n}" + string: "{\n \"answers\": [\n {\n \"questions\": [],\n \"answer\": + \"No good match found in KB\",\n \"confidenceScore\": 0.0,\n \"id\": + -1,\n \"metadata\": {}\n }\n ]\n}" headers: - apim-request-id: 9980db27-58c1-485e-995a-933a4e41e08c - content-length: '583' + apim-request-id: 2ce68ffe-7056-4574-a8ad-4bbd66c66719 + content-length: '169' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:34 GMT + date: Thu, 28 Oct 2021 03:30:27 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '135' + x-envoy-upstream-service-time: '121' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_answerspan.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_answerspan.yaml index 8e6127f52048..20c08f5f5826 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_answerspan.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_answerspan.yaml @@ -1,19 +1,19 @@ interactions: - request: body: '{"question": "Ports and connectors", "top": 3, "context": {"previousQnaId": - 4, "previousUserQuery": "Meet Surface Pro 4"}, "answerSpanRequest": {"enable": - true, "confidenceScoreThreshold": 0.1, "topAnswersWithSpan": 2}}' + 4}, "answerSpanRequest": {"enable": true, "confidenceScoreThreshold": 0.1, "topAnswersWithSpan": + 2}}' headers: Accept: - application/json Content-Length: - - '219' + - '176' Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Ports @@ -64,15 +64,15 @@ interactions: on Surface.com. |\\n| Sensors | Six sensors\u2014 accelerometer, magnetometer, gyro, ambient light sensor, Hall effect, Wi-Fi SAR\u2014let apps do things like track motion and determine location. |\",\n \"confidenceScore\": - 1.0,\n \"id\": 5,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 1.0,\n \"id\": 114,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": [\n {\n \"displayOrder\": 0,\n \"qnaId\": - 6,\n \"displayText\": \"Software\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 7,\n \"displayText\": + 115,\n \"displayText\": \"Software\"\n },\n {\n + \ \"displayOrder\": 1,\n \"qnaId\": 116,\n \"displayText\": \"Processor\"\n },\n {\n \"displayOrder\": 2,\n - \ \"qnaId\": 8,\n \"displayText\": \"Memory and storage\"\n + \ \"qnaId\": 117,\n \"displayText\": \"Memory and storage\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 9,\n \"displayText\": \"Sensors\"\n }\n ]\n },\n + 118,\n \"displayText\": \"Sensors\"\n }\n ]\n },\n \ \"answerSpan\": {\n \"text\": \"\\nSurface Pro 4 has the ports you expect in a full-feature laptop.\\n\\nFull-size USB 3.0 port Connect a USB accessory like a mouse, printer, Ethernet adapter, USB drive, or smartphone\",\n @@ -83,19 +83,15 @@ interactions: accessories, and other devices directly to your Surface Pro 4 using the USB port, Mini DisplayPort, or Bluetooth. Or, connect everything to a Surface Dock (sold separately). With Surface Dock, you can switch between fully connected - and fully mobile with a single connector.\",\n \"confidenceScore\": 0.4067,\n - \ \"id\": 64,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + and fully mobile with a single connector.\",\n \"confidenceScore\": 0.5997,\n + \ \"id\": 173,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"connect monitors, accessories, and other devices\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": [\n {\n \"displayOrder\": - 0,\n \"qnaId\": 65,\n \"displayText\": \"Set up your + 0,\n \"qnaId\": 174,\n \"displayText\": \"Set up your workspace with Surface Dock\"\n },\n {\n \"displayOrder\": - 1,\n \"qnaId\": 66,\n \"displayText\": \"Connect or + 1,\n \"qnaId\": 175,\n \"displayText\": \"Connect or project to a monitor, screen, or other display\"\n }\n ]\n - \ },\n \"answerSpan\": {\n \"text\": \"\\nYou can connect - monitors, accessories, and other devices directly to your Surface Pro 4 using - the USB port, Mini DisplayPort, or Bluetooth\",\n \"confidenceScore\": - 0.051399999999999994,\n \"offset\": 53,\n \"length\": 140\n \ }\n },\n {\n \"questions\": [\n \"Projector or monitor.\"\n \ ],\n \"answer\": \"If your monitor has a DisplayPort, you can connect it to your Surface using a DisplayPort to Mini DisplayPort cable (sold separately). @@ -104,21 +100,21 @@ interactions: is for video only. Audio will play from your Surface speakers unless you\u2019ve connected external speakers. For more info about this, see [Surface sound,](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) [volume, and audio accessories](http://www.microsoft.com/surface/support/hardware-and-drivers/sound-volume-and-speakers) - on Surface.com.\",\n \"confidenceScore\": 0.3392,\n \"id\": 68,\n + on Surface.com.\",\n \"confidenceScore\": 0.4511,\n \"id\": 177,\n \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {},\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n }\n ]\n}" headers: - apim-request-id: db614ffe-6d30-40e1-96a9-f90e41d9dd0d - content-length: '7719' + apim-request-id: cee0eb97-588b-4fd4-9296-9017b117d5c2 + content-length: '7449' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:35 GMT + date: Thu, 28 Oct 2021 03:30:27 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '633' + x-envoy-upstream-service-time: '715' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_dictparams.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_dictparams.yaml index 513de2a22841..8e73471a5382 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_dictparams.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_dictparams.yaml @@ -12,37 +12,37 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Make your battery last\"\n ],\n \"answer\": \"**Make your battery last**\\n\\nFor info on how to care for your battery and power supply, conserve power, and make your Surface battery last longer, see [Surface battery and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) - on Surface.com.\",\n \"confidenceScore\": 0.9201999999999999,\n \"id\": - 27,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + on Surface.com.\",\n \"confidenceScore\": 0.9079,\n \"id\": 136,\n + \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n },\n {\n \"questions\": [\n \"Check the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": - 0.4412,\n \"id\": 24,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.48469999999999996,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": []\n }\n }\n ]\n}" headers: - apim-request-id: e780b038-2930-45fc-99b3-35255fff74ec - content-length: '1140' + apim-request-id: 301d9bbc-0b73-4bf8-99e0-1f2a269478d4 + content-length: '1143' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:36 GMT + date: Thu, 28 Oct 2021 03:30:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '578' + x-envoy-upstream-service-time: '498' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_followup.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_followup.yaml index fa6114118971..a0d367a03a0a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_followup.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_knowledgebase_async.test_query_knowledgebase_with_followup.yaml @@ -12,42 +12,42 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Make your battery last\"\n ],\n \"answer\": \"**Make your battery last**\\n\\nFor info on how to care for your battery and power supply, conserve power, and make your Surface battery last longer, see [Surface battery and power](http://www.microsoft.com/surface/support/hardware-and-drivers/battery-and-power) - on Surface.com.\",\n \"confidenceScore\": 0.9201999999999999,\n \"id\": - 27,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": + on Surface.com.\",\n \"confidenceScore\": 0.9079,\n \"id\": 136,\n + \ \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": {\n \"explicitlytaggedheading\": \"make your battery last\"\n },\n \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": []\n }\n },\n {\n \"questions\": [\n \"Check the battery level\"\n ],\n \"answer\": \"**Check the battery level**\\n\\nYou can check the battery level from the lock screen or the desktop:\",\n \"confidenceScore\": - 0.4412,\n \"id\": 24,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.48469999999999996,\n \"id\": 133,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"check the battery level\"\n },\n \"dialog\": {\n \"isContextOnly\": false,\n \ \"prompts\": []\n }\n }\n ]\n}" headers: - apim-request-id: 4e07975b-1254-451c-8173-9fc8603cadca - content-length: '1140' + apim-request-id: 363ebd94-3a69-4c77-8850-6dccbe406498 + content-length: '1143' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:36 GMT + date: Thu, 28 Oct 2021 03:30:29 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '368' + x-envoy-upstream-service-time: '544' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 - request: body: '{"question": "How long it takes to charge Surface?", "top": 3, "userId": - "sd53lsY=", "confidenceScoreThreshold": 0.2, "context": {"previousQnaId": 27, + "sd53lsY=", "confidenceScoreThreshold": 0.2, "context": {"previousQnaId": 136, "previousUserQuery": "How long should my Surface battery last?"}, "answerSpanRequest": {"enable": true, "confidenceScoreThreshold": 0.2, "topAnswersWithSpan": 1}, "includeUnstructuredSources": true}' @@ -55,13 +55,13 @@ interactions: Accept: - application/json Content-Length: - - '349' + - '350' Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=test-project&deploymentName=test&api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"questions\": [\n \"Power @@ -73,38 +73,30 @@ interactions: like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface.\",\n \"confidenceScore\": - 0.5296,\n \"id\": 23,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n + 0.6015,\n \"id\": 132,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \ \"metadata\": {\n \"explicitlytaggedheading\": \"power and charging\"\n \ },\n \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - [\n {\n \"displayOrder\": 0,\n \"qnaId\": 24,\n + [\n {\n \"displayOrder\": 0,\n \"qnaId\": 133,\n \ \"displayText\": \"Check the battery level\"\n },\n {\n - \ \"displayOrder\": 1,\n \"qnaId\": 25,\n \"displayText\": + \ \"displayOrder\": 1,\n \"qnaId\": 134,\n \"displayText\": \"Lock screen.\"\n },\n {\n \"displayOrder\": - 2,\n \"qnaId\": 26,\n \"displayText\": \"Desktop taskbar.\"\n + 2,\n \"qnaId\": 135,\n \"displayText\": \"Desktop taskbar.\"\n \ },\n {\n \"displayOrder\": 3,\n \"qnaId\": - 27,\n \"displayText\": \"Make your battery last\"\n }\n + 136,\n \"displayText\": \"Make your battery last\"\n }\n \ ]\n },\n \"answerSpan\": {\n \"text\": \" two to four hours\",\n \"confidenceScore\": 0.3795,\n \"offset\": 32,\n - \ \"length\": 19\n }\n },\n {\n \"questions\": [\n \"Charge - your Surface Pro 4\"\n ],\n \"answer\": \"**Charge your Surface - Pro 4**\\n\\n1. Connect the two parts of the power cord.\\n\\n2. Connect - the power cord securely to the charging port.\\n\\n3. Plug the power supply - into an electrical outlet.\",\n \"confidenceScore\": 0.2707,\n \"id\": - 19,\n \"source\": \"surface-pro-4-user-guide-EN.pdf\",\n \"metadata\": - {\n \"explicitlytaggedheading\": \"charge your surface pro 4\"\n },\n - \ \"dialog\": {\n \"isContextOnly\": false,\n \"prompts\": - []\n }\n }\n ]\n}" + \ \"length\": 19\n }\n }\n ]\n}" headers: - apim-request-id: 7b827f35-7711-46af-8757-f33d0a2ff551 - content-length: '2154' + apim-request-id: 535319e1-aef0-4d6a-9487-459f65599282 + content-length: '1594' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=1 - date: Thu, 30 Sep 2021 15:52:38 GMT + date: Thu, 28 Oct 2021 03:30:29 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '571' + x-envoy-upstream-service-time: '605' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-knowledgebases?projectName=190a9e13-8ede-4e4b-a8fd-c4d7f2aeab6c&deploymentName=test&api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text.yaml index 22d31acee00e..7e8149cfd14a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text.yaml @@ -106,9 +106,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Battery Life Get an @@ -142,7 +142,7 @@ interactions: 5391,\n \"length\": 393\n }\n ]\n}" headers: apim-request-id: - - abf593a7-19a1-45a9-b94c-e590f8f3bf5a + - cc590361-bd1a-4ace-b7bc-ce2ee426c476 content-length: - '2146' content-type: @@ -150,13 +150,13 @@ interactions: csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=9 date: - - Thu, 30 Sep 2021 15:52:33 GMT + - Thu, 28 Oct 2021 17:25:05 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '323' + - '429' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_llc.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_llc.yaml index 3a55e7c933ba..256ba1e2e261 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_llc.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_llc.yaml @@ -106,9 +106,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Battery Life Get an @@ -119,9 +119,9 @@ interactions: Battery Life - Longest Lasting Laptop Batteries Competing laptops like the ZenBook S UX391UA (7:05), Surface Laptop 2 (9:22) and Notebook 9 Pro (8:53) outstayed the 4K Envy 13 but powered down long before the 1080p version.\",\n - \ \"confidenceScore\": 0.01745828054845333,\n \"id\": \"doc3\",\n + \ \"confidenceScore\": 0.017458291724324226,\n \"id\": \"doc3\",\n \ \"answerSpan\": {\n \"text\": \"Battery Life\",\n \"confidenceScore\": - 0.26247412,\n \"offset\": 0,\n \"length\": 12\n },\n \"offset\": + 0.26247388,\n \"offset\": 0,\n \"length\": 12\n },\n \"offset\": 1779,\n \"length\": 555\n },\n {\n \"answer\": \"Along with 11-plus hours of battery life (on the FHD model), the Envy 13 has a sleek, ultraportable chassis, fast performance, and powerful speakers. Best of all, @@ -142,7 +142,7 @@ interactions: 5391,\n \"length\": 393\n }\n ]\n}" headers: apim-request-id: - - 63f09596-dbf2-44ac-a8f9-c3de2917c426 + - 465fe43a-5e13-4ca5-ad6f-1ae62cae5af3 content-length: - '2145' content-type: @@ -150,13 +150,13 @@ interactions: csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=9 date: - - Thu, 30 Sep 2021 15:52:33 GMT + - Thu, 28 Oct 2021 17:25:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '304' + - '366' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_overload.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_overload.yaml index 0722f77320a2..07523c2bc18a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_overload.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_overload.yaml @@ -8,7 +8,7 @@ interactions: your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB - port on your Surface."}], "language": "en", "stringIndexType": "UnicodeCodePoint"}' + port on your Surface."}], "stringIndexType": "UnicodeCodePoint"}' headers: Accept: - application/json @@ -17,13 +17,13 @@ interactions: Connection: - keep-alive Content-Length: - - '707' + - '689' Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Power and charging. @@ -37,18 +37,18 @@ interactions: to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you\u2019re using your Surface for power-intensive activities like gaming or video streaming while you\u2019re charging it.\",\n \"confidenceScore\": - 0.9254359602928162,\n \"id\": \"0\",\n \"answerSpan\": {\n \"text\": - \"two to four hours\",\n \"confidenceScore\": 0.98562825,\n \"offset\": + 0.9254359006881714,\n \"id\": \"0\",\n \"answerSpan\": {\n \"text\": + \"two to four hours\",\n \"confidenceScore\": 0.9856282,\n \"offset\": 8,\n \"length\": 18\n },\n \"offset\": 20,\n \"length\": 225\n },\n {\n \"answer\": \"It can take longer if you\u2019re using your Surface for power-intensive activities like gaming or video streaming - while you\u2019re charging it.\",\n \"confidenceScore\": 0.05503516271710396,\n + while you\u2019re charging it.\",\n \"confidenceScore\": 0.055035144090652466,\n \ \"id\": \"0\",\n \"answerSpan\": {\n \"text\": \"longer\",\n \ \"confidenceScore\": 0.62411773,\n \"offset\": 11,\n \"length\": 7\n },\n \"offset\": 110,\n \"length\": 135\n }\n ]\n}" headers: apim-request-id: - - f0c97e63-de33-41db-bebd-3a34cc810fad + - c88b68ad-b495-4121-a048-7b41d82ddae8 content-length: - '1481' content-type: @@ -56,13 +56,13 @@ interactions: csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=2 date: - - Thu, 30 Sep 2021 15:52:34 GMT + - Thu, 28 Oct 2021 17:25:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '255' + - '241' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_with_dictparams.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_with_dictparams.yaml index 1b18591eb433..5576bf8eaf69 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_with_dictparams.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_with_dictparams.yaml @@ -21,9 +21,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Power and charging. @@ -48,7 +48,7 @@ interactions: 7\n },\n \"offset\": 110,\n \"length\": 135\n }\n ]\n}" headers: apim-request-id: - - 00eefdf8-2d1a-4d4b-9d64-6d28ebc6b0a5 + - dd49d00b-e5e4-4a26-8744-74680c9a9382 content-length: - '1478' content-type: @@ -56,13 +56,13 @@ interactions: csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=2 date: - - Thu, 30 Sep 2021 15:52:34 GMT + - Thu, 28 Oct 2021 17:25:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '203' + - '266' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_with_str_records.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_with_str_records.yaml index 906db8907bfc..35fbbc77bf8a 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_with_str_records.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text.test_query_text_with_str_records.yaml @@ -21,9 +21,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Power and charging. @@ -37,32 +37,32 @@ interactions: to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you\u2019re using your Surface for power-intensive activities like gaming or video streaming while you\u2019re charging it.\",\n \"confidenceScore\": - 0.9254359602928162,\n \"id\": \"0\",\n \"answerSpan\": {\n \"text\": + 0.9254359006881714,\n \"id\": \"0\",\n \"answerSpan\": {\n \"text\": \"two to four hours\",\n \"confidenceScore\": 0.9856282,\n \"offset\": 8,\n \"length\": 18\n },\n \"offset\": 20,\n \"length\": 225\n },\n {\n \"answer\": \"It can take longer if you\u2019re using your Surface for power-intensive activities like gaming or video streaming - while you\u2019re charging it.\",\n \"confidenceScore\": 0.05503518134355545,\n + while you\u2019re charging it.\",\n \"confidenceScore\": 0.055035144090652466,\n \ \"id\": \"0\",\n \"answerSpan\": {\n \"text\": \"longer\",\n - \ \"confidenceScore\": 0.624118,\n \"offset\": 11,\n \"length\": + \ \"confidenceScore\": 0.62411773,\n \"offset\": 11,\n \"length\": 7\n },\n \"offset\": 110,\n \"length\": 135\n }\n ]\n}" headers: apim-request-id: - - 390cb02b-4245-4719-8556-59acc1863554 + - c037b02f-0d0e-4d9b-99a9-91ace9bdf6c9 content-length: - - '1478' + - '1481' content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=2 date: - - Thu, 30 Sep 2021 15:52:34 GMT + - Thu, 28 Oct 2021 17:25:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '243' + - '256' status: code: 200 message: OK diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text.yaml index 52deed2d53a7..0b5c8138545f 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text.yaml @@ -102,9 +102,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Battery Life Get an @@ -137,16 +137,16 @@ interactions: 0.59143245,\n \"offset\": 98,\n \"length\": 13\n },\n \"offset\": 5391,\n \"length\": 393\n }\n ]\n}" headers: - apim-request-id: 51ce1817-cad9-4c5e-a2b3-4391b42b3211 - content-length: '2146' + apim-request-id: a33278f1-4b95-4e5c-a3ec-87798e506ce0 + content-length: '2148' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=9 - date: Thu, 30 Sep 2021 15:52:35 GMT + date: Thu, 28 Oct 2021 17:25:27 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '292' + x-envoy-upstream-service-time: '355' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_llc.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_llc.yaml index 0d9cdddeb235..ecdda2821b4c 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_llc.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_llc.yaml @@ -102,9 +102,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Battery Life Get an @@ -115,7 +115,7 @@ interactions: Battery Life - Longest Lasting Laptop Batteries Competing laptops like the ZenBook S UX391UA (7:05), Surface Laptop 2 (9:22) and Notebook 9 Pro (8:53) outstayed the 4K Envy 13 but powered down long before the 1080p version.\",\n - \ \"confidenceScore\": 0.01745828241109848,\n \"id\": \"doc3\",\n + \ \"confidenceScore\": 0.017458291724324226,\n \"id\": \"doc3\",\n \ \"answerSpan\": {\n \"text\": \"Battery Life\",\n \"confidenceScore\": 0.26247388,\n \"offset\": 0,\n \"length\": 12\n },\n \"offset\": 1779,\n \"length\": 555\n },\n {\n \"answer\": \"Along with @@ -134,19 +134,19 @@ interactions: that checks all the right boxes --- as long as you buy the 1080p model.\",\n \ \"confidenceScore\": 0.007057250943034887,\n \"id\": \"doc3\",\n \ \"answerSpan\": {\n \"text\": \"battery life\",\n \"confidenceScore\": - 0.59143245,\n \"offset\": 98,\n \"length\": 13\n },\n \"offset\": + 0.5914322,\n \"offset\": 98,\n \"length\": 13\n },\n \"offset\": 5391,\n \"length\": 393\n }\n ]\n}" headers: - apim-request-id: bc9b76a5-d8f4-401f-a0d0-1e55341a56d0 - content-length: '2146' + apim-request-id: 773ef25f-ccba-4298-9a56-435e5d58025c + content-length: '2147' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=9 - date: Thu, 30 Sep 2021 15:52:36 GMT + date: Thu, 28 Oct 2021 17:25:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '186' + x-envoy-upstream-service-time: '307' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_overload.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_overload.yaml index 212fbe3dfd46..3e6815801c6c 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_overload.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_overload.yaml @@ -8,18 +8,18 @@ interactions: your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB - port on your Surface."}], "language": "en", "stringIndexType": "UnicodeCodePoint"}' + port on your Surface."}], "stringIndexType": "UnicodeCodePoint"}' headers: Accept: - application/json Content-Length: - - '707' + - '689' Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Power and charging. @@ -33,8 +33,8 @@ interactions: to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you\u2019re using your Surface for power-intensive activities like gaming or video streaming while you\u2019re charging it.\",\n \"confidenceScore\": - 0.9254360198974609,\n \"id\": \"0\",\n \"answerSpan\": {\n \"text\": - \"two to four hours\",\n \"confidenceScore\": 0.98562825,\n \"offset\": + 0.9254359006881714,\n \"id\": \"0\",\n \"answerSpan\": {\n \"text\": + \"two to four hours\",\n \"confidenceScore\": 0.9856282,\n \"offset\": 8,\n \"length\": 18\n },\n \"offset\": 20,\n \"length\": 225\n },\n {\n \"answer\": \"It can take longer if you\u2019re using your Surface for power-intensive activities like gaming or video streaming @@ -43,16 +43,16 @@ interactions: \ \"confidenceScore\": 0.62411773,\n \"offset\": 11,\n \"length\": 7\n },\n \"offset\": 110,\n \"length\": 135\n }\n ]\n}" headers: - apim-request-id: cbb90985-1d4b-4b29-a55e-e2a6bb2ff93b - content-length: '1481' + apim-request-id: 7e917c74-634f-4496-9e2d-5d3e5037332e + content-length: '1480' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=2 - date: Thu, 30 Sep 2021 15:52:35 GMT + date: Thu, 28 Oct 2021 17:25:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '175' + x-envoy-upstream-service-time: '280' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_with_dictparams.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_with_dictparams.yaml index e7e6e1704bd4..bd642c9085f7 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_with_dictparams.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_with_dictparams.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Power and charging. @@ -38,21 +38,21 @@ interactions: 8,\n \"length\": 18\n },\n \"offset\": 20,\n \"length\": 225\n },\n {\n \"answer\": \"It can take longer if you\u2019re using your Surface for power-intensive activities like gaming or video streaming - while you\u2019re charging it.\",\n \"confidenceScore\": 0.055035144090652466,\n + while you\u2019re charging it.\",\n \"confidenceScore\": 0.05503516271710396,\n \ \"id\": \"1\",\n \"answerSpan\": {\n \"text\": \"longer\",\n \ \"confidenceScore\": 0.62411773,\n \"offset\": 11,\n \"length\": 7\n },\n \"offset\": 110,\n \"length\": 135\n }\n ]\n}" headers: - apim-request-id: 5bd3db5f-1a20-4d42-8720-772e5f694ccd - content-length: '1478' + apim-request-id: 60727ee6-98a6-4af8-aaff-19de3371e467 + content-length: '1480' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=2 - date: Thu, 30 Sep 2021 15:52:36 GMT + date: Thu, 28 Oct 2021 17:25:29 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '633' + x-envoy-upstream-service-time: '309' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_with_str_records.yaml b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_with_str_records.yaml index 5279bd2b6c14..d378f7c2e96b 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_with_str_records.yaml +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/recordings/test_query_text_async.test_query_text_with_str_records.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-language-questionanswering/1.0.0b2 Python/3.9.5 (macOS-11.5.2-x86_64-i386-64bit) + - azsdk-python-ai-language-questionanswering/1.0.0 Python/3.7.4 (Windows-10-10.0.19041-SP0) method: POST - uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + uri: https://test-resource.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 response: body: string: "{\n \"answers\": [\n {\n \"answer\": \"Power and charging. @@ -33,26 +33,26 @@ interactions: to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you\u2019re using your Surface for power-intensive activities like gaming or video streaming while you\u2019re charging it.\",\n \"confidenceScore\": - 0.9254360198974609,\n \"id\": \"0\",\n \"answerSpan\": {\n \"text\": - \"two to four hours\",\n \"confidenceScore\": 0.98562825,\n \"offset\": + 0.9254359602928162,\n \"id\": \"0\",\n \"answerSpan\": {\n \"text\": + \"two to four hours\",\n \"confidenceScore\": 0.9856282,\n \"offset\": 8,\n \"length\": 18\n },\n \"offset\": 20,\n \"length\": 225\n },\n {\n \"answer\": \"It can take longer if you\u2019re using your Surface for power-intensive activities like gaming or video streaming - while you\u2019re charging it.\",\n \"confidenceScore\": 0.055035144090652466,\n + while you\u2019re charging it.\",\n \"confidenceScore\": 0.05503516271710396,\n \ \"id\": \"0\",\n \"answerSpan\": {\n \"text\": \"longer\",\n \ \"confidenceScore\": 0.62411773,\n \"offset\": 11,\n \"length\": 7\n },\n \"offset\": 110,\n \"length\": 135\n }\n ]\n}" headers: - apim-request-id: 487b1ad3-a4b7-43d6-86aa-0b04254b2eef - content-length: '1479' + apim-request-id: 47b34ca3-e2b1-4940-9a80-d06f031641ab + content-length: '1480' content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.QuestionAnsweringTextRecords=2 - date: Thu, 30 Sep 2021 15:52:35 GMT + date: Thu, 28 Oct 2021 17:25:30 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '199' + x-envoy-upstream-service-time: '259' status: code: 200 message: OK - url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-07-15-preview + url: https://wuppe.api.cognitive.microsoft.com/language/:query-text?api-version=2021-10-01 version: 1 diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase.py index 86b66635e210..e697aae4c797 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase.py @@ -14,13 +14,12 @@ ) from azure.ai.language.questionanswering import QuestionAnsweringClient -from azure.ai.language.questionanswering.operations._operations import build_query_text_request, build_query_knowledge_base_request +from azure.ai.language.questionanswering._operations._operations import build_get_answers_request from azure.ai.language.questionanswering.models import ( - QueryKnowledgeBaseOptions, - KnowledgeBaseAnswerRequestContext, - AnswerSpanRequest, + AnswersOptions, + KnowledgeBaseAnswerContext, + ShortAnswerOptions, MetadataFilter, - LogicalOperationKind, QueryFilters, ) @@ -38,7 +37,7 @@ def test_query_knowledgebase_llc(self, qna_account, qna_key, qna_project): "previousQnAId": 4 } } - request = build_query_knowledge_base_request( + request = build_get_answers_request( json=json_content, project_name=qna_project, deployment_name='test' @@ -87,7 +86,7 @@ def test_query_knowledgebase_llc_with_answerspan(self, qna_account, qna_key, qna "topAnswersWithSpan": 1 } } - request = build_query_knowledge_base_request( + request = build_get_answers_request( json=json_content, project_name=qna_project, deployment_name='test' @@ -128,17 +127,17 @@ def test_query_knowledgebase_llc_with_answerspan(self, qna_account, qna_key, qna @GlobalQuestionAnsweringAccountPreparer() def test_query_knowledgebase(self, qna_account, qna_key, qna_project): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) - query_params = QueryKnowledgeBaseOptions( + query_params = AnswersOptions( question="Ports and connectors", top=3, - context=KnowledgeBaseAnswerRequestContext( - previous_user_query="Meet Surface Pro 4", + answer_context=KnowledgeBaseAnswerContext( + previous_question="Meet Surface Pro 4", previous_qna_id=4 ) ) with client: - output = client.query_knowledge_base( + output = client.get_answers( query_params, project_name=qna_project, deployment_name='test' @@ -147,11 +146,11 @@ def test_query_knowledgebase(self, qna_account, qna_key, qna_project): assert output.answers for answer in output.answers: assert answer.answer - assert answer.confidence_score - assert answer.id + assert answer.confidence + assert answer.qna_id assert answer.source assert answer.metadata is not None - assert not answer.answer_span + assert not answer.short_answer assert answer.questions for question in answer.questions: @@ -169,22 +168,21 @@ def test_query_knowledgebase(self, qna_account, qna_key, qna_project): @GlobalQuestionAnsweringAccountPreparer() def test_query_knowledgebase_with_answerspan(self, qna_account, qna_key, qna_project): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) - query_params = QueryKnowledgeBaseOptions( + query_params = AnswersOptions( question="Ports and connectors", top=3, - context=KnowledgeBaseAnswerRequestContext( - previous_user_query="Meet Surface Pro 4", + answer_context=KnowledgeBaseAnswerContext( + previous_question="Meet Surface Pro 4", previous_qna_id=4 ), - answer_span_request=AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.1, - top_answers_with_span=2 + short_answer_options=ShortAnswerOptions( + confidence_threshold=0.1, + top=2 ) ) with client: - output = client.query_knowledge_base( + output = client.get_answers( query_params, project_name=qna_project, deployment_name='test' @@ -193,16 +191,16 @@ def test_query_knowledgebase_with_answerspan(self, qna_account, qna_key, qna_pro assert output.answers for answer in output.answers: assert answer.answer - assert answer.confidence_score - assert answer.id + assert answer.confidence + assert answer.qna_id assert answer.source assert answer.metadata is not None - if answer.answer_span: - assert answer.answer_span.text - assert answer.answer_span.confidence_score - assert answer.answer_span.offset is not None - assert answer.answer_span.length + if answer.short_answer: + assert answer.short_answer.text + assert answer.short_answer.confidence + assert answer.short_answer.offset is not None + assert answer.short_answer.length assert answer.questions for question in answer.questions: @@ -235,14 +233,14 @@ def test_query_knowledgebase_with_dictparams(self, qna_account, qna_key, qna_pro } with client: - output = client.query_knowledge_base( + output = client.get_answers( query_params, project_name=qna_project, deployment_name='test' ) assert len(output.answers) == 2 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 1 assert confident_answers[0].source == "surface-pro-4-user-guide-EN.pdf" @@ -250,23 +248,22 @@ def test_query_knowledgebase_with_dictparams(self, qna_account, qna_key, qna_pro def test_query_knowledgebase_overload(self, qna_account, qna_key, qna_project): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) with client: - output = client.query_knowledge_base( + output = client.get_answers( project_name=qna_project, deployment_name='test', question="How long should my Surface battery last?", top=3, user_id="sd53lsY=", - confidence_score_threshold=0.2, - answer_span_request=AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + confidence_threshold=0.2, + short_answer_options=ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), include_unstructured_sources=True ) assert len(output.answers) == 2 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 1 assert confident_answers[0].source == "surface-pro-4-user-guide-EN.pdf" @@ -274,65 +271,63 @@ def test_query_knowledgebase_overload(self, qna_account, qna_key, qna_project): def test_query_knowledgebase_with_followup(self, qna_account, qna_key, qna_project): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) with client: - query_params = QueryKnowledgeBaseOptions( + query_params = AnswersOptions( question="How long should my Surface battery last?", top=3, user_id="sd53lsY=", - confidence_score_threshold=0.2, - answer_span_request=AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + confidence_threshold=0.2, + short_answer_options=ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), include_unstructured_sources=True ) - output = client.query_knowledge_base( + output = client.get_answers( query_params, project_name=qna_project, deployment_name='test' ) - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 1 assert confident_answers[0].source == "surface-pro-4-user-guide-EN.pdf" - query_params = QueryKnowledgeBaseOptions( + query_params = AnswersOptions( question="How long it takes to charge Surface?", top=3, user_id="sd53lsY=", - confidence_score_threshold=0.2, - context=KnowledgeBaseAnswerRequestContext( - previous_user_query="How long should my Surface battery last?", - previous_qna_id=confident_answers[0].id + confidence_threshold=0.2, + answer_context=KnowledgeBaseAnswerContext( + previous_question="How long should my Surface battery last?", + previous_qna_id=confident_answers[0].qna_id ), - answer_span_request=AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + short_answer_options=ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), include_unstructured_sources=True ) - output = client.query_knowledge_base( + output = client.get_answers( query_params, project_name=qna_project, deployment_name='test' ) - assert len(output.answers) == 2 - confident_answers = [a for a in output.answers if a.confidence_score > 0.5] + assert output.answers + confident_answers = [a for a in output.answers if a.confidence > 0.5] assert len(confident_answers) == 1 - assert confident_answers[0].answer_span.text == " two to four hours" + assert confident_answers[0].short_answer.text == " two to four hours" @GlobalQuestionAnsweringAccountPreparer() def test_query_knowledgebase_only_id(self, qna_account, qna_key, qna_project): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) with client: - query_params = QueryKnowledgeBaseOptions( + query_params = AnswersOptions( qna_id=19 ) - output = client.query_knowledge_base( + output = client.get_answers( query_params, project_name=qna_project, deployment_name='test' @@ -346,7 +341,7 @@ def test_query_knowledgebase_python_dict(self, qna_account, qna_key, qna_project with client: query_params = {"qna_id": 19} - output = client.query_knowledge_base( + output = client.get_answers( query_params, project_name=qna_project, deployment_name='test' @@ -357,23 +352,36 @@ def test_query_knowledgebase_python_dict(self, qna_account, qna_key, qna_project def test_query_knowledgebase_overload_positional_and_kwarg(self): with QuestionAnsweringClient("http://fake.com", AzureKeyCredential("123")) as client: with pytest.raises(TypeError): - client.query_knowledge_base("positional_one", "positional_two") + client.get_answers("positional_one", "positional_two") with pytest.raises(TypeError): - client.query_knowledge_base("positional_options_bag", options="options bag by name") + client.get_answers("positional_options_bag", options="options bag by name") + with pytest.raises(TypeError): + client.get_answers( + options={'qnaId': 15}, + project_name="hello", + deployment_name='test' + ) + with pytest.raises(TypeError): + client.get_answers( + {'qnaId': 15}, + question='Why?', + project_name="hello", + deployment_name='test' + ) def test_query_knowledgebase_question_or_qna_id(self): with QuestionAnsweringClient("http://fake.com", AzureKeyCredential("123")) as client: - options = QueryKnowledgeBaseOptions() + options = AnswersOptions() with pytest.raises(TypeError): - client.query_knowledge_base( + client.get_answers( options, project_name="hello", deployment_name='test' ) with pytest.raises(TypeError): - client.query_knowledge_base( + client.get_answers( project_name="hello", deployment_name='test' ) @@ -387,18 +395,45 @@ def test_query_knowledgebase_filter(self, qna_account, qna_key, qna_project): ("explicitlytaggedheading", "check the battery level"), ("explicitlytaggedheading", "make your battery last") ], + logical_operation="OR" ), - logical_operation=LogicalOperationKind.OR_ENUM ) with QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) as client: - response = client.query_knowledge_base( + response = client.get_answers( + project_name=qna_project, + deployment_name='test', + question="Battery life", + filters=filters, + top=3, + ) + assert len(response.answers) == 2 + assert any( + [a for a in response.answers if a.metadata.get('explicitlytaggedheading') == "check the battery level"] + ) + assert any( + [a for a in response.answers if a.metadata.get('explicitlytaggedheading') == "make your battery last"] + ) + + @GlobalQuestionAnsweringAccountPreparer() + def test_query_knowledgebase_filter_dict_params(self, qna_account, qna_key, qna_project): + filters = { + "metadataFilter": { + "metadata": [ + ("explicitlytaggedheading", "check the battery level"), + ("explicitlytaggedheading", "make your battery last") + ], + "logicalOperation": "or" + }, + } + with QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) as client: + response = client.get_answers( project_name=qna_project, deployment_name='test', question="Battery life", filters=filters, top=3, ) - assert len(response.answers) == 3 + assert len(response.answers) == 2 assert any( [a for a in response.answers if a.metadata.get('explicitlytaggedheading') == "check the battery level"] ) diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase_async.py index e90f684f1be3..3879ea3e0081 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_knowledgebase_async.py @@ -16,15 +16,14 @@ from asynctestcase import AsyncQuestionAnsweringTest from azure.ai.language.questionanswering.models import ( - QueryKnowledgeBaseOptions, - KnowledgeBaseAnswerRequestContext, - AnswerSpanRequest, + AnswersOptions, + KnowledgeBaseAnswerContext, + ShortAnswerOptions, QueryFilters, MetadataFilter, - LogicalOperationKind, ) from azure.ai.language.questionanswering.aio import QuestionAnsweringClient -from azure.ai.language.questionanswering.operations._operations import build_query_knowledge_base_request, build_query_text_request +from azure.ai.language.questionanswering._operations._operations import build_get_answers_request class QnAKnowledgeBaseTestsAsync(AsyncQuestionAnsweringTest): @@ -40,7 +39,7 @@ async def test_query_knowledgebase_llc(self, qna_account, qna_key, qna_project): "previousQnAId": 4 } } - request = build_query_knowledge_base_request( + request = build_get_answers_request( json=json_content, project_name=qna_project, deployment_name='test' @@ -89,7 +88,7 @@ async def test_query_knowledgebase_llc_with_answerspan(self, qna_account, qna_ke "topAnswersWithSpan": 2 } } - request = build_query_knowledge_base_request( + request = build_get_answers_request( json=json_content, project_name=qna_project, deployment_name='test' @@ -130,17 +129,17 @@ async def test_query_knowledgebase_llc_with_answerspan(self, qna_account, qna_ke @GlobalQuestionAnsweringAccountPreparer() async def test_query_knowledgebase(self, qna_account, qna_key, qna_project): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) - query_params = QueryKnowledgeBaseOptions( + query_params = AnswersOptions( question="Ports and connectors", top=3, - context=KnowledgeBaseAnswerRequestContext( - previous_user_query="Meet Surface Pro 4", + answer_context=KnowledgeBaseAnswerContext( + previous_questiony="Meet Surface Pro 4", previous_qna_id=4 ) ) async with client: - output = await client.query_knowledge_base( + output = await client.get_answers( query_params, project_name=qna_project, deployment_name='test' @@ -149,11 +148,11 @@ async def test_query_knowledgebase(self, qna_account, qna_key, qna_project): assert output.answers for answer in output.answers: assert answer.answer - assert answer.confidence_score - assert answer.id + assert answer.confidence + assert answer.qna_id assert answer.source assert answer.metadata is not None - assert not answer.answer_span + assert not answer.short_answer assert answer.questions for question in answer.questions: @@ -171,22 +170,21 @@ async def test_query_knowledgebase(self, qna_account, qna_key, qna_project): @GlobalQuestionAnsweringAccountPreparer() async def test_query_knowledgebase_with_answerspan(self, qna_account, qna_key, qna_project): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) - query_params = QueryKnowledgeBaseOptions( + query_params = AnswersOptions( question="Ports and connectors", top=3, - context=KnowledgeBaseAnswerRequestContext( + answer_context=KnowledgeBaseAnswerContext( previous_user_query="Meet Surface Pro 4", previous_qna_id=4 ), - answer_span_request=AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.1, - top_answers_with_span=2 + short_answer_options=ShortAnswerOptions( + confidence_threshold=0.1, + top=2 ) ) async with client: - output = await client.query_knowledge_base( + output = await client.get_answers( query_params, project_name=qna_project, deployment_name='test' @@ -195,16 +193,16 @@ async def test_query_knowledgebase_with_answerspan(self, qna_account, qna_key, q assert output.answers for answer in output.answers: assert answer.answer - assert answer.confidence_score - assert answer.id + assert answer.confidence + assert answer.qna_id assert answer.source assert answer.metadata is not None - if answer.answer_span: - assert answer.answer_span.text - assert answer.answer_span.confidence_score - assert answer.answer_span.offset is not None - assert answer.answer_span.length + if answer.short_answer: + assert answer.short_answer.text + assert answer.short_answer.confidence + assert answer.short_answer.offset is not None + assert answer.short_answer.length assert answer.questions for question in answer.questions: @@ -236,14 +234,14 @@ async def test_query_knowledgebase_with_dictparams(self, qna_account, qna_key, q } async with client: - output = await client.query_knowledge_base( + output = await client.get_answers( query_params, project_name=qna_project, deployment_name='test' ) assert len(output.answers) == 2 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 1 assert confident_answers[0].source == "surface-pro-4-user-guide-EN.pdf" @@ -251,23 +249,22 @@ async def test_query_knowledgebase_with_dictparams(self, qna_account, qna_key, q async def test_query_knowledgebase_overload(self, qna_account, qna_key, qna_project): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) async with client: - output = await client.query_knowledge_base( + output = await client.get_answers( project_name=qna_project, deployment_name='test', question="How long should my Surface battery last?", top=3, user_id="sd53lsY=", - confidence_score_threshold=0.2, - answer_span_request=AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + confidence_threshold=0.2, + short_answer_options=ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), include_unstructured_sources=True ) assert len(output.answers) == 2 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 1 assert confident_answers[0].source == "surface-pro-4-user-guide-EN.pdf" @@ -275,54 +272,52 @@ async def test_query_knowledgebase_overload(self, qna_account, qna_key, qna_proj async def test_query_knowledgebase_with_followup(self, qna_account, qna_key, qna_project): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) async with client: - query_params = QueryKnowledgeBaseOptions( + query_params = AnswersOptions( question="How long should my Surface battery last?", top=3, user_id="sd53lsY=", - confidence_score_threshold=0.2, - answer_span_request=AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + confidence_threshold=0.2, + short_answer_options=ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), include_unstructured_sources=True ) - output = await client.query_knowledge_base( + output = await client.get_answers( query_params, project_name=qna_project, deployment_name='test' ) - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 1 assert confident_answers[0].source == "surface-pro-4-user-guide-EN.pdf" - query_params = QueryKnowledgeBaseOptions( + query_params = AnswersOptions( question="How long it takes to charge Surface?", top=3, user_id="sd53lsY=", - confidence_score_threshold=0.2, - context=KnowledgeBaseAnswerRequestContext( - previous_user_query="How long should my Surface battery last?", - previous_qna_id=confident_answers[0].id + confidence_threshold=0.2, + answer_context=KnowledgeBaseAnswerContext( + previous_question="How long should my Surface battery last?", + previous_qna_id=confident_answers[0].qna_id ), - answer_span_request=AnswerSpanRequest( - enable=True, - confidence_score_threshold=0.2, - top_answers_with_span=1 + short_answer_options=ShortAnswerOptions( + confidence_threshold=0.2, + top=1 ), include_unstructured_sources=True ) - output = await client.query_knowledge_base( + output = await client.get_answers( query_params, project_name=qna_project, deployment_name='test' ) - assert len(output.answers) == 2 - confident_answers = [a for a in output.answers if a.confidence_score > 0.5] + assert output.answers + confident_answers = [a for a in output.answers if a.confidence > 0.5] assert len(confident_answers) == 1 - assert confident_answers[0].answer_span.text == " two to four hours" + assert confident_answers[0].short_answer.text == " two to four hours" @GlobalQuestionAnsweringAccountPreparer() async def test_query_knowledgebase_only_id(self, qna_account, qna_key, qna_project): @@ -330,7 +325,7 @@ async def test_query_knowledgebase_only_id(self, qna_account, qna_key, qna_proje async with client: query_params = {"qnaId": 19} - output = await client.query_knowledge_base( + output = await client.get_answers( query_params, project_name=qna_project, deployment_name='test' @@ -344,7 +339,7 @@ async def test_query_knowledgebase_python_dict(self, qna_account, qna_key, qna_p async with client: query_params = {"qna_id": 19} - output = await client.query_knowledge_base( + output = await client.get_answers( query_params, project_name=qna_project, deployment_name='test' @@ -355,23 +350,23 @@ async def test_query_knowledgebase_python_dict(self, qna_account, qna_key, qna_p async def test_query_knowledgebase_overload_positional_and_kwarg(self): async with QuestionAnsweringClient("http://fake.com", AzureKeyCredential("123")) as client: with pytest.raises(TypeError): - await client.query_knowledge_base("positional_one", "positional_two") + await client.get_answers("positional_one", "positional_two") with pytest.raises(TypeError): - await client.query_knowledge_base("positional_options_bag", options="options bag by name") + await client.get_answers("positional_options_bag", options="options bag by name") async def test_query_knowledgebase_question_or_qna_id(self): async with QuestionAnsweringClient("http://fake.com", AzureKeyCredential("123")) as client: - options = QueryKnowledgeBaseOptions() + options = AnswersOptions() with pytest.raises(TypeError): - await client.query_knowledge_base( + await client.get_answers( options, project_name="hello", deployment_name='test' ) with pytest.raises(TypeError): - await client.query_knowledge_base( + await client.get_answers( project_name="hello", deployment_name='test' ) @@ -385,21 +380,50 @@ async def test_query_knowledgebase_filter(self, qna_account, qna_key, qna_projec ("explicitlytaggedheading", "check the battery level"), ("explicitlytaggedheading", "make your battery last") ], - ), - logical_operation=LogicalOperationKind.OR_ENUM + logical_operation="OR" + ) ) async with QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) as client: - response = await client.query_knowledge_base( + response = await client.get_answers( project_name=qna_project, deployment_name='test', question="Battery life", filters=filters, top=3, ) - assert len(response.answers) == 3 + assert len(response.answers) == 2 assert any( [a for a in response.answers if a.metadata.get('explicitlytaggedheading') == "check the battery level"] ) assert any( [a for a in response.answers if a.metadata.get('explicitlytaggedheading') == "make your battery last"] ) + + @GlobalQuestionAnsweringAccountPreparer() + async def test_query_knowledgebase_filter_dict_params(self, qna_account, qna_key, qna_project): + filters = { + "metadataFilter": { + "metadata": [ + ("explicitlytaggedheading", "check the battery level"), + ("explicitlytaggedheading", "make your battery last") + ], + "logicalOperation": "or" + }, + + } + async with QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) as client: + response = await client.get_answers( + project_name=qna_project, + deployment_name='test', + question="Battery life", + filters=filters, + top=3, + ) + assert len(response.answers) == 2 + assert any( + [a for a in response.answers if a.metadata.get('explicitlytaggedheading') == "check the battery level"] + ) + assert any( + [a for a in response.answers if a.metadata.get('explicitlytaggedheading') == "make your battery last"] + ) + diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text.py index 434141a88a2d..321b5444e085 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text.py @@ -15,10 +15,10 @@ ) from azure.ai.language.questionanswering import QuestionAnsweringClient -from azure.ai.language.questionanswering.operations._operations import build_query_text_request, build_query_knowledge_base_request +from azure.ai.language.questionanswering._operations._operations import build_get_answers_from_text_request from azure.ai.language.questionanswering.models import ( - QueryTextOptions, - TextRecord + AnswersFromTextOptions, + TextDocument ) class QnATests(QuestionAnsweringTest): @@ -44,7 +44,7 @@ def test_query_text_llc(self, qna_account, qna_key): ], "language": "en" } - request = build_query_text_request( + request = build_get_answers_from_text_request( json=json_content ) response = client.send_request(request) @@ -67,18 +67,18 @@ def test_query_text_llc(self, qna_account, qna_key): @GlobalQuestionAnsweringAccountPreparer() def test_query_text(self, qna_account, qna_key): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) - params = QueryTextOptions( + params = AnswersFromTextOptions( question="What is the meaning of life?", - records=[ - TextRecord( + text_documents=[ + TextDocument( text="abc Graphics Surprise, surprise -- our 4K ", id="doc1" ), - TextRecord( + TextDocument( text="e graphics card. While the Nvidia GeForce MX250 GPU isn't meant for demanding gaming, it is a step up from integrated graphics as proven by comparing it to the UHD 620 GPU in the FHD model. The MX250-equipped Envy 13 scored a 116,575 on the Ice Storm Unlimited benchmark while the base model scored a 82,270. Upgrading to the discrete graphics gives the Envy 13 better performance than the Notebook 9 Pro (61,662; UHD 620), Surface Laptop 2 (71,647; UHD 620) and the premium laptop average (86,937). While the Nvidia GeForce MX250 GPU isn't meant for demanding gaming, it is a step up from integrated graphics as proven by comparing it to the UHD 620 GPU in the FHD model. We played the racing game Dirt 3 at 92 frames per second on ", id="doc2" ), - TextRecord( + TextDocument( text="Graphics Surprise, surprise -- our 4K Envy 13 came with a discrete graphics card. While the Nvidia GeForce MX250 GPU isn't meant for demanding gaming, it is a step up from integrated graphics as proven by comparing it to the UHD 620 GPU in the FHD model. The MX250-equipped Envy 13 scored a 116,575 on the Ice Storm Unlimited benchmark while the base model scored a 82,270. Upgrading to the discrete graphics gives the Envy 13 better performance than the Notebook 9 Pro (61,662; UHD 620), Surface Laptop 2 (71,647; UHD 620) and the premium laptop average (86,937). While the Nvidia GeForce MX250 GPU isn't meant for demanding gaming, it is a step up from integrated graphics as proven by comparing it to the UHD 620 GPU in the FHD model. We played the racing game Dirt 3 at 92 frames per second on the MX250 model, which is well above our 30-fps playability, the category average (69 fps) and what the Surface Laptop 2 (82 fps) achieved. The ZenBook S UX391UA (45 fps) fell flat on this real-world test but ran better than the base model Envy 13 (31 fps). Audio I had a good ol' time groovin' to the sound of the Envy 13's crisp speakers. HP went all out with the Envy, placing dual speakers on the underside of the chassis along with a third, top-firing driver above the keyboard. Devon Gilfillian's funky jam \"Here and Now\" boomed smooth, soulful tunes throughout my small apartment. The twang of the electric guitar played nicely with the thudding percussion but never overshadowed Gilfillian or the female backup vocals. Bang & Olufsen software comes preinstalled on the Envy 13, with equalizer controls so you can adjust the bass, midrange and treble to your liking. But even out of the box, you'll enjoy great sound without having to bust out your headphones. Battery Life Get an Envy 13 with the 1080p non-touch display if battery life is important to you. The FHD model endured for 11 hours and 11 minutes whereas the 4K model lasted only 4 hours and 36 minutes on our battery test, which involves continuous web browsing over Wi-Fi at 150 nits of brightness. MORE: Laptops with Best Battery Life - Longest Lasting Laptop Batteries Competing laptops like the ZenBook S UX391UA (7:05), Surface Laptop 2 (9:22) and Notebook 9 Pro (8:53) outstayed the 4K Envy 13 but powered down long before the 1080p version. Webcam The 720p webcam on the Envy 13 is nothing to write home about. A selfie I snapped in my dimly lit room was covered in a haze of visual noise. My beard and hair were unkempt blobs, while my eyes looked like they were drawn on by a pointillist painter. If there's one positive, it's that the lens captures natural colors and even extracted the different shades of gray in my T-shirt. On the right edge of the Envy 13 is a physical kill switch that cuts the power to the webcam so you can feel reassured that nobody is snooping on you. Heat Leave the lapdesk at home - you don't have to worry about the Envy 13 overheating. After I played a 15-minute, full-HD video in full screen, the touchpad on the HP Envy 13 with a Core i7 CPU rose to only 83 degrees Fahrenheit while the keyboard (87 degrees) and underside (90 degrees) also remained well below our 95-degree comfort threshold. Even the toastiest part of the machine, the lower-left edge on the underside, topped out at 94 degrees. Software and Warranty It's a shame that a laptop with such beautiful hardware ships with such ugly software. Pre-installed on this machine are entirely too many programs that could either be packaged together or omitted altogether. HP provides an app called Audio Switch, which simply lets you switch your audio input/output between the internal speakers and headphones. As the same implies, HP's Command Center is where you can get information about your Envy 13 but also switch the thermal profiles between comfort and performance. Along with support documentation, HP also bundles in a setup program called JumpStart, a program for connecting printers and a redundant system-info app called Event Utility. Also installed on the Envy 13's Windows 10 Home OS are several Microsoft apps, including Simple Solitaire, Candy Crush Friends and Your Phone. Other third-party apps include Booking.com, Netflix and McAfee Security. HP ships the Envy 13 with a one-year warranty. See how HP did on our Tech Support Showdown and Best and Worst Brands ranking. Bottom Line The Envy 13 has cemented its standing as the ultimate laptop for college students or travelers. Along with 11-plus hours of battery life (on the FHD model), the Envy 13 has a sleek, ultraportable chassis, fast performance, and powerful speakers. Best of all, the Envy 13 starts at a reasonable $799, which is hundreds less than the competition. In many ways, the Envy 13 is what we wanted the new MacBook Air to be. The new HP Envy 13 is everything I was hoping the new MacBook Air would be: fast, attractive and affordable. Just be sure to buy the right model. We strongly recommend the 1080p version over the 4K model because it lasts several hours longer on a charge and costs less. In fact, if we were reviewing the 4K model separately, we'd only give it a 3.5 rating. You should also consider the Envy 13 with a 10th Gen CPU, although we haven't gotten the chance to review it yet. If you absolutely need a high-res display, the 4K Envy 13 is one of many good options. We also recommend the Samsung Notebook 9 Pro, which has a similarly premium design but much better battery life than the 4K Envy. The Microsoft Surface Laptop 2 is another recommended alternative, though you might want to wait a few months for the rumored Surface Laptop 3. Overall, the HP Envy 13 is a fantastic laptop that checks all the right boxes --- as long as you buy the 1080p model. Credit: Laptop Mag HP Envy 13 (2019) Specs BluetoothBluetooth 5.0 BrandHP CPUIntel Core i7-8565U Card SlotsmicroSD Company Websitehttps://www8.hp.com/us/en/home.html Display Size13.3 Graphics CardNvidia GeForce MX250 Hard Drive Size512GB Hard Drive TypePCIe NVMe M.2 Highest Available Resolution3840 x 2160 Native Resolution3840 x 2160 Operating SystemWindows 10 Home Ports (excluding USB)USB 3.1 with Type-C, USB 3.1 Always-On, USB 3.1, Headphone/Mic, microSD RAM16GB RAM Upgradable to16GB Size12.1 x 8.3 x .57 inches Touchpad Size4.3 x 2.2 inches USB Ports3 Video Memory2GB Warranty/Supportone-year warranty. Weight2.8 pounds Wi-Fi802.11ac Wi-Fi ModelIntel Wireless-AC 9560 ", id="doc3" ) @@ -86,19 +86,19 @@ def test_query_text(self, qna_account, qna_key): language="en" ) - output = client.query_text(params) + output = client.get_answers_from_text(params) assert output.answers for answer in output.answers: assert answer.answer - assert answer.confidence_score + assert answer.confidence assert answer.id assert answer.offset assert answer.length - assert answer.answer_span - assert answer.answer_span.text - assert answer.answer_span.confidence_score - assert answer.answer_span.offset is not None - assert answer.answer_span.length + assert answer.short_answer + assert answer.short_answer.text + assert answer.short_answer.confidence + assert answer.short_answer.offset is not None + assert answer.short_answer.length @GlobalQuestionAnsweringAccountPreparer() def test_query_text_with_dictparams(self, qna_account, qna_key): @@ -121,11 +121,11 @@ def test_query_text_with_dictparams(self, qna_account, qna_key): } with client: - output = client.query_text(params) + output = client.get_answers_from_text(params) assert len(output.answers) == 3 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 2 - assert confident_answers[0].answer_span.text == "two to four hours" + assert confident_answers[0].short_answer.text == "two to four hours" @GlobalQuestionAnsweringAccountPreparer() @@ -143,11 +143,11 @@ def test_query_text_with_str_records(self, qna_account, qna_key): } with client: - output = client.query_text(params) + output = client.get_answers_from_text(params) assert len(output.answers) == 3 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 2 - assert confident_answers[0].answer_span.text == "two to four hours" + assert confident_answers[0].short_answer.text == "two to four hours" @GlobalQuestionAnsweringAccountPreparer() def test_query_text_overload(self, qna_account, qna_key): @@ -155,9 +155,9 @@ def test_query_text_overload(self, qna_account, qna_key): with client: with pytest.raises(TypeError): - client.query_text( + client.get_answers_from_text( question="How long it takes to charge surface?", - records=[ + text_documents=[ "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. " + "It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.", { @@ -167,9 +167,9 @@ def test_query_text_overload(self, qna_account, qna_key): } ] ) - output = client.query_text( + output = client.get_answers_from_text( question="How long it takes to charge surface?", - records=[ + text_documents=[ "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. " + "It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.", "You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. "+ @@ -177,13 +177,39 @@ def test_query_text_overload(self, qna_account, qna_key): ] ) assert len(output.answers) == 3 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 2 - assert confident_answers[0].answer_span.text == "two to four hours" + assert confident_answers[0].short_answer.text == "two to four hours" def test_query_text_overload_positional_and_kwarg(self): with QuestionAnsweringClient("http://fake.com", AzureKeyCredential("123")) as client: with pytest.raises(TypeError): - client.query_text("positional_one", "positional_two") + client.get_answers_from_text("positional_one", "positional_two") with pytest.raises(TypeError): - client.query_text("positional_options_bag", options="options bag by name") + client.get_answers_from_text("positional_options_bag", options="options bag by name") + + params = AnswersFromTextOptions( + question="What is the meaning of life?", + text_documents=[ + TextDocument( + text="foo", + id="doc1" + ), + TextDocument( + text="bar", + id="doc2" + ) + ], + language="en" + ) + with pytest.raises(TypeError): + client.get_answers_from_text(options=params) + + with pytest.raises(TypeError): + client.get_answers_from_text( + question="why?", + text_documents=["foo", "bar"], + options=params) + + with pytest.raises(TypeError): + client.get_answers_from_text(params, question="Why?") \ No newline at end of file diff --git a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text_async.py b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text_async.py index b5d6323a64db..bd2c35fddf52 100644 --- a/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text_async.py +++ b/sdk/cognitivelanguage/azure-ai-language-questionanswering/tests/test_query_text_async.py @@ -15,10 +15,10 @@ ) from azure.ai.language.questionanswering.aio import QuestionAnsweringClient -from azure.ai.language.questionanswering.operations._operations import build_query_text_request, build_query_knowledge_base_request +from azure.ai.language.questionanswering._operations._operations import build_get_answers_from_text_request from azure.ai.language.questionanswering.models import ( - QueryTextOptions, - TextRecord + AnswersFromTextOptions, + TextDocument ) class QnATests(QuestionAnsweringTest): @@ -46,7 +46,7 @@ async def test_query_text_llc(self, qna_account, qna_key): ], "language": "en" } - request = build_query_text_request( + request = build_get_answers_from_text_request( json=json_content ) response = await client.send_request(request) @@ -69,18 +69,18 @@ async def test_query_text_llc(self, qna_account, qna_key): @GlobalQuestionAnsweringAccountPreparer() async def test_query_text(self, qna_account, qna_key): client = QuestionAnsweringClient(qna_account, AzureKeyCredential(qna_key)) - params = QueryTextOptions( + params = AnswersFromTextOptions( question="What is the meaning of life?", - records=[ - TextRecord( + text_documents=[ + TextDocument( text="abc Graphics Surprise, surprise -- our 4K ", id="doc1" ), - TextRecord( + TextDocument( text="e graphics card. While the Nvidia GeForce MX250 GPU isn't meant for demanding gaming, it is a step up from integrated graphics as proven by comparing it to the UHD 620 GPU in the FHD model. The MX250-equipped Envy 13 scored a 116,575 on the Ice Storm Unlimited benchmark while the base model scored a 82,270. Upgrading to the discrete graphics gives the Envy 13 better performance than the Notebook 9 Pro (61,662; UHD 620), Surface Laptop 2 (71,647; UHD 620) and the premium laptop average (86,937). While the Nvidia GeForce MX250 GPU isn't meant for demanding gaming, it is a step up from integrated graphics as proven by comparing it to the UHD 620 GPU in the FHD model. We played the racing game Dirt 3 at 92 frames per second on ", id="doc2" ), - TextRecord( + TextDocument( text="Graphics Surprise, surprise -- our 4K Envy 13 came with a discrete graphics card. While the Nvidia GeForce MX250 GPU isn't meant for demanding gaming, it is a step up from integrated graphics as proven by comparing it to the UHD 620 GPU in the FHD model. The MX250-equipped Envy 13 scored a 116,575 on the Ice Storm Unlimited benchmark while the base model scored a 82,270. Upgrading to the discrete graphics gives the Envy 13 better performance than the Notebook 9 Pro (61,662; UHD 620), Surface Laptop 2 (71,647; UHD 620) and the premium laptop average (86,937). While the Nvidia GeForce MX250 GPU isn't meant for demanding gaming, it is a step up from integrated graphics as proven by comparing it to the UHD 620 GPU in the FHD model. We played the racing game Dirt 3 at 92 frames per second on the MX250 model, which is well above our 30-fps playability, the category average (69 fps) and what the Surface Laptop 2 (82 fps) achieved. The ZenBook S UX391UA (45 fps) fell flat on this real-world test but ran better than the base model Envy 13 (31 fps). Audio I had a good ol' time groovin' to the sound of the Envy 13's crisp speakers. HP went all out with the Envy, placing dual speakers on the underside of the chassis along with a third, top-firing driver above the keyboard. Devon Gilfillian's funky jam \"Here and Now\" boomed smooth, soulful tunes throughout my small apartment. The twang of the electric guitar played nicely with the thudding percussion but never overshadowed Gilfillian or the female backup vocals. Bang & Olufsen software comes preinstalled on the Envy 13, with equalizer controls so you can adjust the bass, midrange and treble to your liking. But even out of the box, you'll enjoy great sound without having to bust out your headphones. Battery Life Get an Envy 13 with the 1080p non-touch display if battery life is important to you. The FHD model endured for 11 hours and 11 minutes whereas the 4K model lasted only 4 hours and 36 minutes on our battery test, which involves continuous web browsing over Wi-Fi at 150 nits of brightness. MORE: Laptops with Best Battery Life - Longest Lasting Laptop Batteries Competing laptops like the ZenBook S UX391UA (7:05), Surface Laptop 2 (9:22) and Notebook 9 Pro (8:53) outstayed the 4K Envy 13 but powered down long before the 1080p version. Webcam The 720p webcam on the Envy 13 is nothing to write home about. A selfie I snapped in my dimly lit room was covered in a haze of visual noise. My beard and hair were unkempt blobs, while my eyes looked like they were drawn on by a pointillist painter. If there's one positive, it's that the lens captures natural colors and even extracted the different shades of gray in my T-shirt. On the right edge of the Envy 13 is a physical kill switch that cuts the power to the webcam so you can feel reassured that nobody is snooping on you. Heat Leave the lapdesk at home - you don't have to worry about the Envy 13 overheating. After I played a 15-minute, full-HD video in full screen, the touchpad on the HP Envy 13 with a Core i7 CPU rose to only 83 degrees Fahrenheit while the keyboard (87 degrees) and underside (90 degrees) also remained well below our 95-degree comfort threshold. Even the toastiest part of the machine, the lower-left edge on the underside, topped out at 94 degrees. Software and Warranty It's a shame that a laptop with such beautiful hardware ships with such ugly software. Pre-installed on this machine are entirely too many programs that could either be packaged together or omitted altogether. HP provides an app called Audio Switch, which simply lets you switch your audio input/output between the internal speakers and headphones. As the same implies, HP's Command Center is where you can get information about your Envy 13 but also switch the thermal profiles between comfort and performance. Along with support documentation, HP also bundles in a setup program called JumpStart, a program for connecting printers and a redundant system-info app called Event Utility. Also installed on the Envy 13's Windows 10 Home OS are several Microsoft apps, including Simple Solitaire, Candy Crush Friends and Your Phone. Other third-party apps include Booking.com, Netflix and McAfee Security. HP ships the Envy 13 with a one-year warranty. See how HP did on our Tech Support Showdown and Best and Worst Brands ranking. Bottom Line The Envy 13 has cemented its standing as the ultimate laptop for college students or travelers. Along with 11-plus hours of battery life (on the FHD model), the Envy 13 has a sleek, ultraportable chassis, fast performance, and powerful speakers. Best of all, the Envy 13 starts at a reasonable $799, which is hundreds less than the competition. In many ways, the Envy 13 is what we wanted the new MacBook Air to be. The new HP Envy 13 is everything I was hoping the new MacBook Air would be: fast, attractive and affordable. Just be sure to buy the right model. We strongly recommend the 1080p version over the 4K model because it lasts several hours longer on a charge and costs less. In fact, if we were reviewing the 4K model separately, we'd only give it a 3.5 rating. You should also consider the Envy 13 with a 10th Gen CPU, although we haven't gotten the chance to review it yet. If you absolutely need a high-res display, the 4K Envy 13 is one of many good options. We also recommend the Samsung Notebook 9 Pro, which has a similarly premium design but much better battery life than the 4K Envy. The Microsoft Surface Laptop 2 is another recommended alternative, though you might want to wait a few months for the rumored Surface Laptop 3. Overall, the HP Envy 13 is a fantastic laptop that checks all the right boxes --- as long as you buy the 1080p model. Credit: Laptop Mag HP Envy 13 (2019) Specs BluetoothBluetooth 5.0 BrandHP CPUIntel Core i7-8565U Card SlotsmicroSD Company Websitehttps://www8.hp.com/us/en/home.html Display Size13.3 Graphics CardNvidia GeForce MX250 Hard Drive Size512GB Hard Drive TypePCIe NVMe M.2 Highest Available Resolution3840 x 2160 Native Resolution3840 x 2160 Operating SystemWindows 10 Home Ports (excluding USB)USB 3.1 with Type-C, USB 3.1 Always-On, USB 3.1, Headphone/Mic, microSD RAM16GB RAM Upgradable to16GB Size12.1 x 8.3 x .57 inches Touchpad Size4.3 x 2.2 inches USB Ports3 Video Memory2GB Warranty/Supportone-year warranty. Weight2.8 pounds Wi-Fi802.11ac Wi-Fi ModelIntel Wireless-AC 9560 ", id="doc3" ) @@ -88,19 +88,19 @@ async def test_query_text(self, qna_account, qna_key): language="en" ) - output = await client.query_text(params) + output = await client.get_answers_from_text(params) assert output.answers for answer in output.answers: assert answer.answer - assert answer.confidence_score + assert answer.confidence assert answer.id assert answer.offset assert answer.length - assert answer.answer_span - assert answer.answer_span.text - assert answer.answer_span.confidence_score - assert answer.answer_span.offset is not None - assert answer.answer_span.length + assert answer.short_answer + assert answer.short_answer.text + assert answer.short_answer.confidence + assert answer.short_answer.offset is not None + assert answer.short_answer.length @GlobalQuestionAnsweringAccountPreparer() async def test_query_text_with_dictparams(self, qna_account, qna_key): @@ -123,11 +123,11 @@ async def test_query_text_with_dictparams(self, qna_account, qna_key): } async with client: - output = await client.query_text(params) + output = await client.get_answers_from_text(params) assert len(output.answers) == 3 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 2 - assert confident_answers[0].answer_span.text == "two to four hours" + assert confident_answers[0].short_answer.text == "two to four hours" @GlobalQuestionAnsweringAccountPreparer() async def test_query_text_with_str_records(self, qna_account, qna_key): @@ -144,11 +144,11 @@ async def test_query_text_with_str_records(self, qna_account, qna_key): } async with client: - output = await client.query_text(params) + output = await client.get_answers_from_text(params) assert len(output.answers) == 3 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 2 - assert confident_answers[0].answer_span.text == "two to four hours" + assert confident_answers[0].short_answer.text == "two to four hours" @GlobalQuestionAnsweringAccountPreparer() async def test_query_text_overload(self, qna_account, qna_key): @@ -156,9 +156,9 @@ async def test_query_text_overload(self, qna_account, qna_key): async with client: with pytest.raises(TypeError): - await client.query_text( + await client.get_answers_from_text( question="How long it takes to charge surface?", - records=[ + text_documents=[ "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. " + "It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.", { @@ -168,9 +168,9 @@ async def test_query_text_overload(self, qna_account, qna_key): } ] ) - output = await client.query_text( + output = await client.get_answers_from_text( question="How long it takes to charge surface?", - records=[ + text_documents=[ "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. " + "It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it.", "You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. "+ @@ -178,13 +178,13 @@ async def test_query_text_overload(self, qna_account, qna_key): ] ) assert len(output.answers) == 3 - confident_answers = [a for a in output.answers if a.confidence_score > 0.9] + confident_answers = [a for a in output.answers if a.confidence > 0.9] assert len(confident_answers) == 2 - assert confident_answers[0].answer_span.text == "two to four hours" + assert confident_answers[0].short_answer.text == "two to four hours" async def test_query_text_overload_positional_and_kwarg(self): async with QuestionAnsweringClient("http://fake.com", AzureKeyCredential("123")) as client: with pytest.raises(TypeError): - await client.query_text("positional_one", "positional_two") + await client.get_answers_from_text("positional_one", "positional_two") with pytest.raises(TypeError): - await client.query_text("positional_options_bag", options="options bag by name") + await client.get_answers_from_text("positional_options_bag", options="options bag by name") diff --git a/sdk/cognitivelanguage/tests.yml b/sdk/cognitivelanguage/tests.yml index cbe99bfbe34a..4f5f79c4d078 100644 --- a/sdk/cognitivelanguage/tests.yml +++ b/sdk/cognitivelanguage/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false BuildTargetingString: azure* ServiceDirectory: cognitivelanguage MatrixReplace: diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/CHANGELOG.md b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/CHANGELOG.md index 44de57bc5189..6aa97e38fd03 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/CHANGELOG.md +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/CHANGELOG.md @@ -1,5 +1,19 @@ # Release History +## 13.0.0 (2021-11-15) + +**Features** + + - Model DomainAvailability has a new parameter kind + - Model CheckDomainAvailabilityParameter has a new parameter kind + - Added operation group CommitmentPlansOperations + - Added operation group CommitmentTiersOperations + - Added operation group DeploymentsOperations + +**Breaking changes** + + - Operation CognitiveServicesManagementClientOperationsMixin.check_domain_availability has a new signature + ## 12.0.0 (2021-06-03) **Features** diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/_meta.json b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/_meta.json index 0873b38bc9e2..9dd1cbc422ff 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/_meta.json +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.4.2", + "autorest": "3.4.5", "use": [ - "@autorest/python@5.8.0", + "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "d3a5ab585146ee8ee09f43eb0948c45daacd36f7", + "commit": "e0b5060d30138df66bd64bf0ca6b2010be18717f", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/cognitiveservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", + "autorest_command": "autorest specification/cognitiveservices/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/cognitiveservices/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_cognitive_services_management_client.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_cognitive_services_management_client.py index 9a68671d3a77..72eb985c6bad 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_cognitive_services_management_client.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_cognitive_services_management_client.py @@ -24,8 +24,11 @@ from .operations import ResourceSkusOperations from .operations import Operations from .operations import CognitiveServicesManagementClientOperationsMixin +from .operations import CommitmentTiersOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations +from .operations import DeploymentsOperations +from .operations import CommitmentPlansOperations from . import models @@ -40,10 +43,16 @@ class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperati :vartype resource_skus: azure.mgmt.cognitiveservices.operations.ResourceSkusOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.cognitiveservices.operations.Operations + :ivar commitment_tiers: CommitmentTiersOperations operations + :vartype commitment_tiers: azure.mgmt.cognitiveservices.operations.CommitmentTiersOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.cognitiveservices.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.cognitiveservices.operations.PrivateLinkResourcesOperations + :ivar deployments: DeploymentsOperations operations + :vartype deployments: azure.mgmt.cognitiveservices.operations.DeploymentsOperations + :ivar commitment_plans: CommitmentPlansOperations operations + :vartype commitment_plans: azure.mgmt.cognitiveservices.operations.CommitmentPlansOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. @@ -78,10 +87,16 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + self.commitment_tiers = CommitmentTiersOperations( + self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + self.deployments = DeploymentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.commitment_plans = CommitmentPlansOperations( + self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_configuration.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_configuration.py index 89d1d80d7d47..db9063efc41f 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_configuration.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-04-30" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-cognitiveservices/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_metadata.json b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_metadata.json index 7aae21649127..d1ac26bb7b0d 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_metadata.json +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-04-30", - "total_api_version_list": ["2021-04-30"], + "chosen_version": "2021-10-01", + "total_api_version_list": ["2021-10-01"], "client": { "name": "CognitiveServicesManagementClient", "filename": "_cognitive_services_management_client", @@ -102,8 +102,11 @@ "deleted_accounts": "DeletedAccountsOperations", "resource_skus": "ResourceSkusOperations", "operations": "Operations", + "commitment_tiers": "CommitmentTiersOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", - "private_link_resources": "PrivateLinkResourcesOperations" + "private_link_resources": "PrivateLinkResourcesOperations", + "deployments": "DeploymentsOperations", + "commitment_plans": "CommitmentPlansOperations" }, "operation_mixins": { "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}", @@ -123,15 +126,15 @@ }, "check_domain_availability" : { "sync": { - "signature": "def check_domain_availability(\n self,\n subdomain_name, # type: str\n type, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Check whether a domain is available.\n\n:param subdomain_name: The subdomain name to use.\n:type subdomain_name: str\n:param type: The Type of the resource.\n:type type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DomainAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.cognitiveservices.models.DomainAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def check_domain_availability(\n self,\n subdomain_name, # type: str\n type, # type: str\n kind=None, # type: Optional[str]\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check whether a domain is available.\n\n:param subdomain_name: The subdomain name to use.\n:type subdomain_name: str\n:param type: The Type of the resource.\n:type type: str\n:param kind: The Kind of the resource.\n:type kind: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DomainAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.cognitiveservices.models.DomainAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, - "signature": "async def check_domain_availability(\n self,\n subdomain_name: str,\n type: str,\n **kwargs: Any\n) -\u003e \"_models.DomainAvailability\":\n", - "doc": "\"\"\"Check whether a domain is available.\n\n:param subdomain_name: The subdomain name to use.\n:type subdomain_name: str\n:param type: The Type of the resource.\n:type type: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DomainAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.cognitiveservices.models.DomainAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "async def check_domain_availability(\n self,\n subdomain_name: str,\n type: str,\n kind: Optional[str] = None,\n **kwargs: Any\n) -\u003e \"_models.DomainAvailability\":\n", + "doc": "\"\"\"Check whether a domain is available.\n\n:param subdomain_name: The subdomain name to use.\n:type subdomain_name: str\n:param type: The Type of the resource.\n:type type: str\n:param kind: The Kind of the resource.\n:type kind: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DomainAvailability, or the result of cls(response)\n:rtype: ~azure.mgmt.cognitiveservices.models.DomainAvailability\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, - "call": "subdomain_name, type" + "call": "subdomain_name, type, kind" } } } diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_version.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_version.py index c047f879b92f..fa8e008c199f 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_version.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "12.0.0" +VERSION = "13.0.0" diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/_cognitive_services_management_client.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/_cognitive_services_management_client.py index 495505912230..b0e16cb0c4fe 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/_cognitive_services_management_client.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/_cognitive_services_management_client.py @@ -22,8 +22,11 @@ from .operations import ResourceSkusOperations from .operations import Operations from .operations import CognitiveServicesManagementClientOperationsMixin +from .operations import CommitmentTiersOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations +from .operations import DeploymentsOperations +from .operations import CommitmentPlansOperations from .. import models @@ -38,10 +41,16 @@ class CognitiveServicesManagementClient(CognitiveServicesManagementClientOperati :vartype resource_skus: azure.mgmt.cognitiveservices.aio.operations.ResourceSkusOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.cognitiveservices.aio.operations.Operations + :ivar commitment_tiers: CommitmentTiersOperations operations + :vartype commitment_tiers: azure.mgmt.cognitiveservices.aio.operations.CommitmentTiersOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.cognitiveservices.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.cognitiveservices.aio.operations.PrivateLinkResourcesOperations + :ivar deployments: DeploymentsOperations operations + :vartype deployments: azure.mgmt.cognitiveservices.aio.operations.DeploymentsOperations + :ivar commitment_plans: CommitmentPlansOperations operations + :vartype commitment_plans: azure.mgmt.cognitiveservices.aio.operations.CommitmentPlansOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. @@ -75,10 +84,16 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + self.commitment_tiers = CommitmentTiersOperations( + self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + self.deployments = DeploymentsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.commitment_plans = CommitmentPlansOperations( + self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/_configuration.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/_configuration.py index e28e3245efda..868d790b9a59 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/_configuration.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-04-30" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-cognitiveservices/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/__init__.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/__init__.py index 79bc52d9dd8f..b2de36c75c14 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/__init__.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/__init__.py @@ -11,8 +11,11 @@ from ._resource_skus_operations import ResourceSkusOperations from ._operations import Operations from ._cognitive_services_management_client_operations import CognitiveServicesManagementClientOperationsMixin +from ._commitment_tiers_operations import CommitmentTiersOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._deployments_operations import DeploymentsOperations +from ._commitment_plans_operations import CommitmentPlansOperations __all__ = [ 'AccountsOperations', @@ -20,6 +23,9 @@ 'ResourceSkusOperations', 'Operations', 'CognitiveServicesManagementClientOperationsMixin', + 'CommitmentTiersOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', + 'DeploymentsOperations', + 'CommitmentPlansOperations', ] diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_accounts_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_accounts_operations.py index 7ebc072a9db9..062574dafb7a 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_accounts_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_accounts_operations.py @@ -55,14 +55,14 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -157,7 +157,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -188,14 +188,14 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -286,7 +286,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -316,13 +316,13 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -395,7 +395,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -436,13 +436,13 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -492,7 +492,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -504,7 +504,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -560,7 +560,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -633,13 +633,13 @@ async def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list_keys.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -697,14 +697,14 @@ async def regenerate_key( error_map.update(kwargs.pop('error_map', {})) _parameters = _models.RegenerateKeyParameters(key_name=key_name) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.regenerate_key.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -761,13 +761,13 @@ async def list_skus( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list_skus.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -824,13 +824,13 @@ async def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list_usages.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_cognitive_services_management_client_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_cognitive_services_management_client_operations.py index b75a2192f278..1f3166c485a8 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_cognitive_services_management_client_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_cognitive_services_management_client_operations.py @@ -50,7 +50,7 @@ async def check_sku_availability( error_map.update(kwargs.pop('error_map', {})) _parameters = _models.CheckSkuAvailabilityParameter(skus=skus, kind=kind, type=type) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -95,6 +95,7 @@ async def check_domain_availability( self, subdomain_name: str, type: str, + kind: Optional[str] = None, **kwargs: Any ) -> "_models.DomainAvailability": """Check whether a domain is available. @@ -103,6 +104,8 @@ async def check_domain_availability( :type subdomain_name: str :param type: The Type of the resource. :type type: str + :param kind: The Kind of the resource. + :type kind: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainAvailability, or the result of cls(response) :rtype: ~azure.mgmt.cognitiveservices.models.DomainAvailability @@ -114,8 +117,8 @@ async def check_domain_availability( } error_map.update(kwargs.pop('error_map', {})) - _parameters = _models.CheckDomainAvailabilityParameter(subdomain_name=subdomain_name, type=type) - api_version = "2021-04-30" + _parameters = _models.CheckDomainAvailabilityParameter(subdomain_name=subdomain_name, type=type, kind=kind) + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_commitment_plans_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_commitment_plans_operations.py new file mode 100644 index 000000000000..7a1135bcaa92 --- /dev/null +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_commitment_plans_operations.py @@ -0,0 +1,376 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CommitmentPlansOperations: + """CommitmentPlansOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.cognitiveservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.CommitmentPlanListResult"]: + """Gets the commitmentPlans associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CommitmentPlanListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cognitiveservices.models.CommitmentPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommitmentPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('CommitmentPlanListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + commitment_plan_name: str, + **kwargs: Any + ) -> "_models.CommitmentPlan": + """Gets the specified commitmentPlans associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param commitment_plan_name: The name of the commitmentPlan associated with the Cognitive + Services Account. + :type commitment_plan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommitmentPlan, or the result of cls(response) + :rtype: ~azure.mgmt.cognitiveservices.models.CommitmentPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommitmentPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'commitmentPlanName': self._serialize.url("commitment_plan_name", commitment_plan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CommitmentPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + account_name: str, + commitment_plan_name: str, + commitment_plan: "_models.CommitmentPlan", + **kwargs: Any + ) -> "_models.CommitmentPlan": + """Update the state of specified commitmentPlans associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param commitment_plan_name: The name of the commitmentPlan associated with the Cognitive + Services Account. + :type commitment_plan_name: str + :param commitment_plan: The commitmentPlan properties. + :type commitment_plan: ~azure.mgmt.cognitiveservices.models.CommitmentPlan + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommitmentPlan, or the result of cls(response) + :rtype: ~azure.mgmt.cognitiveservices.models.CommitmentPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommitmentPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'commitmentPlanName': self._serialize.url("commitment_plan_name", commitment_plan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(commitment_plan, 'CommitmentPlan') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CommitmentPlan', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CommitmentPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + commitment_plan_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'commitmentPlanName': self._serialize.url("commitment_plan_name", commitment_plan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + account_name: str, + commitment_plan_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified commitmentPlan associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param commitment_plan_name: The name of the commitmentPlan associated with the Cognitive + Services Account. + :type commitment_plan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + commitment_plan_name=commitment_plan_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'commitmentPlanName': self._serialize.url("commitment_plan_name", commitment_plan_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_available_endpoint_services_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_commitment_tiers_operations.py similarity index 81% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_available_endpoint_services_operations.py rename to sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_commitment_tiers_operations.py index c374d1a090df..60324826dd91 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_available_endpoint_services_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_commitment_tiers_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AvailableEndpointServicesOperations: - """AvailableEndpointServicesOperations async operations. +class CommitmentTiersOperations: + """CommitmentTiersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.cognitiveservices.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,22 +45,22 @@ def list( self, location: str, **kwargs: Any - ) -> AsyncIterable["_models.EndpointServicesListResult"]: - """List what values of endpoint services are available for use. + ) -> AsyncIterable["_models.CommitmentTierListResult"]: + """List Commitment Tiers. - :param location: The location to check available endpoint services. + :param location: Resource location. :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EndpointServicesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.EndpointServicesListResult] + :return: An iterator like instance of either CommitmentTierListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cognitiveservices.models.CommitmentTierListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointServicesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommitmentTierListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -72,8 +72,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -88,7 +88,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('EndpointServicesListResult', pipeline_response) + deserialized = self._deserialize('CommitmentTierListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -101,12 +101,13 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/commitmentTiers'} # type: ignore diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_deleted_accounts_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_deleted_accounts_operations.py index 6bbfe2fb3909..cff22f7543df 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_deleted_accounts_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_deleted_accounts_operations.py @@ -68,14 +68,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -118,14 +118,14 @@ async def _purge_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._purge_initial.metadata['url'] # type: ignore path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -203,7 +203,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -238,7 +238,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_deployments_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_deployments_operations.py new file mode 100644 index 000000000000..08654d34f3ee --- /dev/null +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_deployments_operations.py @@ -0,0 +1,437 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DeploymentsOperations: + """DeploymentsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.cognitiveservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DeploymentListResult"]: + """Gets the deployments associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cognitiveservices.models.DeploymentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + deployment_name: str, + **kwargs: Any + ) -> "_models.Deployment": + """Gets the specified deployments associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param deployment_name: The name of the deployment associated with the Cognitive Services + Account. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.cognitiveservices.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + account_name: str, + deployment_name: str, + deployment: "_models.Deployment", + **kwargs: Any + ) -> "_models.Deployment": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment, 'Deployment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Deployment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + deployment_name: str, + deployment: "_models.Deployment", + **kwargs: Any + ) -> AsyncLROPoller["_models.Deployment"]: + """Update the state of specified deployments associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param deployment_name: The name of the deployment associated with the Cognitive Services + Account. + :type deployment_name: str + :param deployment: The deployment properties. + :type deployment: ~azure.mgmt.cognitiveservices.models.Deployment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Deployment or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cognitiveservices.models.Deployment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + deployment_name=deployment_name, + deployment=deployment, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + deployment_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + account_name: str, + deployment_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified deployment associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param deployment_name: The name of the deployment associated with the Cognitive Services + Account. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_operations.py index a9e6772820d9..52dd882fb983 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_private_endpoint_connections_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_private_endpoint_connections_operations.py index ce2aa844860a..1799f2b946ae 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_private_endpoint_connections_operations.py @@ -64,13 +64,13 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -127,13 +127,13 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -178,14 +178,14 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -283,7 +283,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -315,13 +315,13 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -401,7 +401,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_private_link_resources_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_private_link_resources_operations.py index dd712d390ad4..967fd1b13c1b 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_private_link_resources_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_private_link_resources_operations.py @@ -62,13 +62,13 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_resource_skus_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_resource_skus_operations.py index cc022df3d1ec..ddff419a1436 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_resource_skus_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/aio/operations/_resource_skus_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py index 15893aa225d2..88e33579c793 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/__init__.py @@ -18,6 +18,19 @@ from ._models_py3 import CallRateLimit from ._models_py3 import CheckDomainAvailabilityParameter from ._models_py3 import CheckSkuAvailabilityParameter + from ._models_py3 import CommitmentCost + from ._models_py3 import CommitmentPeriod + from ._models_py3 import CommitmentPlan + from ._models_py3 import CommitmentPlanListResult + from ._models_py3 import CommitmentPlanProperties + from ._models_py3 import CommitmentQuota + from ._models_py3 import CommitmentTier + from ._models_py3 import CommitmentTierListResult + from ._models_py3 import Deployment + from ._models_py3 import DeploymentListResult + from ._models_py3 import DeploymentModel + from ._models_py3 import DeploymentProperties + from ._models_py3 import DeploymentScaleSettings from ._models_py3 import DomainAvailability from ._models_py3 import Encryption from ._models_py3 import ErrorAdditionalInfo @@ -39,6 +52,7 @@ from ._models_py3 import PrivateLinkResourceListResult from ._models_py3 import PrivateLinkResourceProperties from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProxyResource from ._models_py3 import QuotaLimit from ._models_py3 import RegenerateKeyParameters from ._models_py3 import RequestMatchPattern @@ -71,6 +85,19 @@ from ._models import CallRateLimit # type: ignore from ._models import CheckDomainAvailabilityParameter # type: ignore from ._models import CheckSkuAvailabilityParameter # type: ignore + from ._models import CommitmentCost # type: ignore + from ._models import CommitmentPeriod # type: ignore + from ._models import CommitmentPlan # type: ignore + from ._models import CommitmentPlanListResult # type: ignore + from ._models import CommitmentPlanProperties # type: ignore + from ._models import CommitmentQuota # type: ignore + from ._models import CommitmentTier # type: ignore + from ._models import CommitmentTierListResult # type: ignore + from ._models import Deployment # type: ignore + from ._models import DeploymentListResult # type: ignore + from ._models import DeploymentModel # type: ignore + from ._models import DeploymentProperties # type: ignore + from ._models import DeploymentScaleSettings # type: ignore from ._models import DomainAvailability # type: ignore from ._models import Encryption # type: ignore from ._models import ErrorAdditionalInfo # type: ignore @@ -92,6 +119,7 @@ from ._models import PrivateLinkResourceListResult # type: ignore from ._models import PrivateLinkResourceProperties # type: ignore from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import ProxyResource # type: ignore from ._models import QuotaLimit # type: ignore from ._models import RegenerateKeyParameters # type: ignore from ._models import RequestMatchPattern # type: ignore @@ -116,6 +144,9 @@ from ._cognitive_services_management_client_enums import ( ActionType, CreatedByType, + DeploymentProvisioningState, + DeploymentScaleType, + HostingModel, KeyName, KeySource, NetworkRuleAction, @@ -144,6 +175,19 @@ 'CallRateLimit', 'CheckDomainAvailabilityParameter', 'CheckSkuAvailabilityParameter', + 'CommitmentCost', + 'CommitmentPeriod', + 'CommitmentPlan', + 'CommitmentPlanListResult', + 'CommitmentPlanProperties', + 'CommitmentQuota', + 'CommitmentTier', + 'CommitmentTierListResult', + 'Deployment', + 'DeploymentListResult', + 'DeploymentModel', + 'DeploymentProperties', + 'DeploymentScaleSettings', 'DomainAvailability', 'Encryption', 'ErrorAdditionalInfo', @@ -165,6 +209,7 @@ 'PrivateLinkResourceListResult', 'PrivateLinkResourceProperties', 'PrivateLinkServiceConnectionState', + 'ProxyResource', 'QuotaLimit', 'RegenerateKeyParameters', 'RequestMatchPattern', @@ -187,6 +232,9 @@ 'VirtualNetworkRule', 'ActionType', 'CreatedByType', + 'DeploymentProvisioningState', + 'DeploymentScaleType', + 'HostingModel', 'KeyName', 'KeySource', 'NetworkRuleAction', diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_cognitive_services_management_client_enums.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_cognitive_services_management_client_enums.py index a8370363caee..79c6d0be3be2 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_cognitive_services_management_client_enums.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_cognitive_services_management_client_enums.py @@ -41,6 +41,31 @@ class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" +class DeploymentProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets the status of the resource at the time the operation was called. + """ + + ACCEPTED = "Accepted" + CREATING = "Creating" + DELETING = "Deleting" + MOVING = "Moving" + FAILED = "Failed" + SUCCEEDED = "Succeeded" + +class DeploymentScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Deployment scale type. + """ + + MANUAL = "Manual" + +class HostingModel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Account hosting model. + """ + + WEB = "Web" + CONNECTED_CONTAINER = "ConnectedContainer" + DISCONNECTED_CONTAINER = "DisconnectedContainer" + class KeyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """key name to generate (Key1|Key2) """ diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_models.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_models.py index 82966d05638f..3add4d32205a 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_models.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_models.py @@ -483,6 +483,8 @@ class CheckDomainAvailabilityParameter(msrest.serialization.Model): :type subdomain_name: str :param type: Required. The Type of the resource. :type type: str + :param kind: The Kind of the resource. + :type kind: str """ _validation = { @@ -493,6 +495,7 @@ class CheckDomainAvailabilityParameter(msrest.serialization.Model): _attribute_map = { 'subdomain_name': {'key': 'subdomainName', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, } def __init__( @@ -502,6 +505,7 @@ def __init__( super(CheckDomainAvailabilityParameter, self).__init__(**kwargs) self.subdomain_name = kwargs['subdomain_name'] self.type = kwargs['type'] + self.kind = kwargs.get('kind', None) class CheckSkuAvailabilityParameter(msrest.serialization.Model): @@ -539,6 +543,491 @@ def __init__( self.type = kwargs['type'] +class CommitmentCost(msrest.serialization.Model): + """Cognitive Services account commitment cost. + + :param commitment_meter_id: Commitment meter Id. + :type commitment_meter_id: str + :param overage_meter_id: Overage meter Id. + :type overage_meter_id: str + """ + + _attribute_map = { + 'commitment_meter_id': {'key': 'commitmentMeterId', 'type': 'str'}, + 'overage_meter_id': {'key': 'overageMeterId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CommitmentCost, self).__init__(**kwargs) + self.commitment_meter_id = kwargs.get('commitment_meter_id', None) + self.overage_meter_id = kwargs.get('overage_meter_id', None) + + +class CommitmentPeriod(msrest.serialization.Model): + """Cognitive Services account commitment period. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tier: Commitment period commitment tier. + :type tier: str + :param count: Commitment period commitment count. + :type count: int + :ivar quota: Cognitive Services account commitment quota. + :vartype quota: ~azure.mgmt.cognitiveservices.models.CommitmentQuota + :ivar start_date: Commitment period start date. + :vartype start_date: str + :ivar end_date: Commitment period end date. + :vartype end_date: str + """ + + _validation = { + 'quota': {'readonly': True}, + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + } + + _attribute_map = { + 'tier': {'key': 'tier', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'quota': {'key': 'quota', 'type': 'CommitmentQuota'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CommitmentPeriod, self).__init__(**kwargs) + self.tier = kwargs.get('tier', None) + self.count = kwargs.get('count', None) + self.quota = None + self.start_date = None + self.end_date = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class CommitmentPlan(ProxyResource): + """Cognitive Services account commitment plan. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.cognitiveservices.models.SystemData + :ivar etag: Resource Etag. + :vartype etag: str + :param properties: Properties of Cognitive Services account commitment plan. + :type properties: ~azure.mgmt.cognitiveservices.models.CommitmentPlanProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CommitmentPlanProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(CommitmentPlan, self).__init__(**kwargs) + self.system_data = None + self.etag = None + self.properties = kwargs.get('properties', None) + + +class CommitmentPlanListResult(msrest.serialization.Model): + """The list of cognitive services accounts operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param next_link: The link used to get the next page of CommitmentPlan. + :type next_link: str + :ivar value: Gets the list of Cognitive Services accounts CommitmentPlan and their properties. + :vartype value: list[~azure.mgmt.cognitiveservices.models.CommitmentPlan] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[CommitmentPlan]'}, + } + + def __init__( + self, + **kwargs + ): + super(CommitmentPlanListResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = None + + +class CommitmentPlanProperties(msrest.serialization.Model): + """Properties of Cognitive Services account commitment plan. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param hosting_model: Account hosting model. Possible values include: "Web", + "ConnectedContainer", "DisconnectedContainer". + :type hosting_model: str or ~azure.mgmt.cognitiveservices.models.HostingModel + :param plan_type: Commitment plan type. + :type plan_type: str + :param current: Cognitive Services account commitment period. + :type current: ~azure.mgmt.cognitiveservices.models.CommitmentPeriod + :param auto_renew: AutoRenew commitment plan. + :type auto_renew: bool + :param next: Cognitive Services account commitment period. + :type next: ~azure.mgmt.cognitiveservices.models.CommitmentPeriod + :ivar last: Cognitive Services account commitment period. + :vartype last: ~azure.mgmt.cognitiveservices.models.CommitmentPeriod + """ + + _validation = { + 'last': {'readonly': True}, + } + + _attribute_map = { + 'hosting_model': {'key': 'hostingModel', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'current': {'key': 'current', 'type': 'CommitmentPeriod'}, + 'auto_renew': {'key': 'autoRenew', 'type': 'bool'}, + 'next': {'key': 'next', 'type': 'CommitmentPeriod'}, + 'last': {'key': 'last', 'type': 'CommitmentPeriod'}, + } + + def __init__( + self, + **kwargs + ): + super(CommitmentPlanProperties, self).__init__(**kwargs) + self.hosting_model = kwargs.get('hosting_model', None) + self.plan_type = kwargs.get('plan_type', None) + self.current = kwargs.get('current', None) + self.auto_renew = kwargs.get('auto_renew', None) + self.next = kwargs.get('next', None) + self.last = None + + +class CommitmentQuota(msrest.serialization.Model): + """Cognitive Services account commitment quota. + + :param quantity: Commitment quota quantity. + :type quantity: long + :param unit: Commitment quota unit. + :type unit: str + """ + + _attribute_map = { + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CommitmentQuota, self).__init__(**kwargs) + self.quantity = kwargs.get('quantity', None) + self.unit = kwargs.get('unit', None) + + +class CommitmentTier(msrest.serialization.Model): + """Cognitive Services account commitment tier. + + :param kind: The Kind of the resource. + :type kind: str + :param sku_name: The name of the SKU. Ex - P3. It is typically a letter+number code. + :type sku_name: str + :param hosting_model: Account hosting model. Possible values include: "Web", + "ConnectedContainer", "DisconnectedContainer". + :type hosting_model: str or ~azure.mgmt.cognitiveservices.models.HostingModel + :param plan_type: Commitment plan type. + :type plan_type: str + :param tier: Commitment period commitment tier. + :type tier: str + :param max_count: Commitment period commitment max count. + :type max_count: int + :param quota: Cognitive Services account commitment quota. + :type quota: ~azure.mgmt.cognitiveservices.models.CommitmentQuota + :param cost: Cognitive Services account commitment cost. + :type cost: ~azure.mgmt.cognitiveservices.models.CommitmentCost + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'hosting_model': {'key': 'hostingModel', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'quota': {'key': 'quota', 'type': 'CommitmentQuota'}, + 'cost': {'key': 'cost', 'type': 'CommitmentCost'}, + } + + def __init__( + self, + **kwargs + ): + super(CommitmentTier, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.sku_name = kwargs.get('sku_name', None) + self.hosting_model = kwargs.get('hosting_model', None) + self.plan_type = kwargs.get('plan_type', None) + self.tier = kwargs.get('tier', None) + self.max_count = kwargs.get('max_count', None) + self.quota = kwargs.get('quota', None) + self.cost = kwargs.get('cost', None) + + +class CommitmentTierListResult(msrest.serialization.Model): + """The list of cognitive services accounts operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param next_link: The link used to get the next page of CommitmentTier. + :type next_link: str + :ivar value: Gets the list of Cognitive Services accounts CommitmentTier and their properties. + :vartype value: list[~azure.mgmt.cognitiveservices.models.CommitmentTier] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[CommitmentTier]'}, + } + + def __init__( + self, + **kwargs + ): + super(CommitmentTierListResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = None + + +class Deployment(ProxyResource): + """Cognitive Services account deployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.cognitiveservices.models.SystemData + :ivar etag: Resource Etag. + :vartype etag: str + :param properties: Properties of Cognitive Services account deployment. + :type properties: ~azure.mgmt.cognitiveservices.models.DeploymentProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeploymentProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(Deployment, self).__init__(**kwargs) + self.system_data = None + self.etag = None + self.properties = kwargs.get('properties', None) + + +class DeploymentListResult(msrest.serialization.Model): + """The list of cognitive services accounts operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param next_link: The link used to get the next page of Deployment. + :type next_link: str + :ivar value: Gets the list of Cognitive Services accounts Deployment and their properties. + :vartype value: list[~azure.mgmt.cognitiveservices.models.Deployment] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Deployment]'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentListResult, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = None + + +class DeploymentModel(msrest.serialization.Model): + """Properties of Cognitive Services account deployment model. + + :param format: Deployment model format. + :type format: str + :param name: Deployment model name. + :type name: str + :param version: Deployment model version. + :type version: str + """ + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentModel, self).__init__(**kwargs) + self.format = kwargs.get('format', None) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + + +class DeploymentProperties(msrest.serialization.Model): + """Properties of Cognitive Services account deployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: Gets the status of the resource at the time the operation was called. + Possible values include: "Accepted", "Creating", "Deleting", "Moving", "Failed", "Succeeded". + :vartype provisioning_state: str or + ~azure.mgmt.cognitiveservices.models.DeploymentProvisioningState + :param model: Properties of Cognitive Services account deployment model. + :type model: ~azure.mgmt.cognitiveservices.models.DeploymentModel + :param scale_settings: Properties of Cognitive Services account deployment model. + :type scale_settings: ~azure.mgmt.cognitiveservices.models.DeploymentScaleSettings + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'model': {'key': 'model', 'type': 'DeploymentModel'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'DeploymentScaleSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.model = kwargs.get('model', None) + self.scale_settings = kwargs.get('scale_settings', None) + + +class DeploymentScaleSettings(msrest.serialization.Model): + """Properties of Cognitive Services account deployment model. + + :param scale_type: Deployment scale type. Possible values include: "Manual". + :type scale_type: str or ~azure.mgmt.cognitiveservices.models.DeploymentScaleType + :param capacity: Deployment capacity. + :type capacity: int + """ + + _attribute_map = { + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(DeploymentScaleSettings, self).__init__(**kwargs) + self.scale_type = kwargs.get('scale_type', None) + self.capacity = kwargs.get('capacity', None) + + class DomainAvailability(msrest.serialization.Model): """Domain availability. @@ -550,6 +1039,8 @@ class DomainAvailability(msrest.serialization.Model): :type subdomain_name: str :param type: The Type of the resource. :type type: str + :param kind: The Kind of the resource. + :type kind: str """ _attribute_map = { @@ -557,6 +1048,7 @@ class DomainAvailability(msrest.serialization.Model): 'reason': {'key': 'reason', 'type': 'str'}, 'subdomain_name': {'key': 'subdomainName', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, } def __init__( @@ -568,6 +1060,7 @@ def __init__( self.reason = kwargs.get('reason', None) self.subdomain_name = kwargs.get('subdomain_name', None) self.type = kwargs.get('type', None) + self.kind = kwargs.get('kind', None) class Encryption(msrest.serialization.Model): diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_models_py3.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_models_py3.py index 30f9907ba7c1..0090c012f4e5 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_models_py3.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/models/_models_py3.py @@ -533,6 +533,8 @@ class CheckDomainAvailabilityParameter(msrest.serialization.Model): :type subdomain_name: str :param type: Required. The Type of the resource. :type type: str + :param kind: The Kind of the resource. + :type kind: str """ _validation = { @@ -543,6 +545,7 @@ class CheckDomainAvailabilityParameter(msrest.serialization.Model): _attribute_map = { 'subdomain_name': {'key': 'subdomainName', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, } def __init__( @@ -550,11 +553,13 @@ def __init__( *, subdomain_name: str, type: str, + kind: Optional[str] = None, **kwargs ): super(CheckDomainAvailabilityParameter, self).__init__(**kwargs) self.subdomain_name = subdomain_name self.type = type + self.kind = kind class CheckSkuAvailabilityParameter(msrest.serialization.Model): @@ -596,6 +601,535 @@ def __init__( self.type = type +class CommitmentCost(msrest.serialization.Model): + """Cognitive Services account commitment cost. + + :param commitment_meter_id: Commitment meter Id. + :type commitment_meter_id: str + :param overage_meter_id: Overage meter Id. + :type overage_meter_id: str + """ + + _attribute_map = { + 'commitment_meter_id': {'key': 'commitmentMeterId', 'type': 'str'}, + 'overage_meter_id': {'key': 'overageMeterId', 'type': 'str'}, + } + + def __init__( + self, + *, + commitment_meter_id: Optional[str] = None, + overage_meter_id: Optional[str] = None, + **kwargs + ): + super(CommitmentCost, self).__init__(**kwargs) + self.commitment_meter_id = commitment_meter_id + self.overage_meter_id = overage_meter_id + + +class CommitmentPeriod(msrest.serialization.Model): + """Cognitive Services account commitment period. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tier: Commitment period commitment tier. + :type tier: str + :param count: Commitment period commitment count. + :type count: int + :ivar quota: Cognitive Services account commitment quota. + :vartype quota: ~azure.mgmt.cognitiveservices.models.CommitmentQuota + :ivar start_date: Commitment period start date. + :vartype start_date: str + :ivar end_date: Commitment period end date. + :vartype end_date: str + """ + + _validation = { + 'quota': {'readonly': True}, + 'start_date': {'readonly': True}, + 'end_date': {'readonly': True}, + } + + _attribute_map = { + 'tier': {'key': 'tier', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'quota': {'key': 'quota', 'type': 'CommitmentQuota'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + } + + def __init__( + self, + *, + tier: Optional[str] = None, + count: Optional[int] = None, + **kwargs + ): + super(CommitmentPeriod, self).__init__(**kwargs) + self.tier = tier + self.count = count + self.quota = None + self.start_date = None + self.end_date = None + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class CommitmentPlan(ProxyResource): + """Cognitive Services account commitment plan. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.cognitiveservices.models.SystemData + :ivar etag: Resource Etag. + :vartype etag: str + :param properties: Properties of Cognitive Services account commitment plan. + :type properties: ~azure.mgmt.cognitiveservices.models.CommitmentPlanProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CommitmentPlanProperties'}, + } + + def __init__( + self, + *, + properties: Optional["CommitmentPlanProperties"] = None, + **kwargs + ): + super(CommitmentPlan, self).__init__(**kwargs) + self.system_data = None + self.etag = None + self.properties = properties + + +class CommitmentPlanListResult(msrest.serialization.Model): + """The list of cognitive services accounts operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param next_link: The link used to get the next page of CommitmentPlan. + :type next_link: str + :ivar value: Gets the list of Cognitive Services accounts CommitmentPlan and their properties. + :vartype value: list[~azure.mgmt.cognitiveservices.models.CommitmentPlan] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[CommitmentPlan]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(CommitmentPlanListResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = None + + +class CommitmentPlanProperties(msrest.serialization.Model): + """Properties of Cognitive Services account commitment plan. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param hosting_model: Account hosting model. Possible values include: "Web", + "ConnectedContainer", "DisconnectedContainer". + :type hosting_model: str or ~azure.mgmt.cognitiveservices.models.HostingModel + :param plan_type: Commitment plan type. + :type plan_type: str + :param current: Cognitive Services account commitment period. + :type current: ~azure.mgmt.cognitiveservices.models.CommitmentPeriod + :param auto_renew: AutoRenew commitment plan. + :type auto_renew: bool + :param next: Cognitive Services account commitment period. + :type next: ~azure.mgmt.cognitiveservices.models.CommitmentPeriod + :ivar last: Cognitive Services account commitment period. + :vartype last: ~azure.mgmt.cognitiveservices.models.CommitmentPeriod + """ + + _validation = { + 'last': {'readonly': True}, + } + + _attribute_map = { + 'hosting_model': {'key': 'hostingModel', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'current': {'key': 'current', 'type': 'CommitmentPeriod'}, + 'auto_renew': {'key': 'autoRenew', 'type': 'bool'}, + 'next': {'key': 'next', 'type': 'CommitmentPeriod'}, + 'last': {'key': 'last', 'type': 'CommitmentPeriod'}, + } + + def __init__( + self, + *, + hosting_model: Optional[Union[str, "HostingModel"]] = None, + plan_type: Optional[str] = None, + current: Optional["CommitmentPeriod"] = None, + auto_renew: Optional[bool] = None, + next: Optional["CommitmentPeriod"] = None, + **kwargs + ): + super(CommitmentPlanProperties, self).__init__(**kwargs) + self.hosting_model = hosting_model + self.plan_type = plan_type + self.current = current + self.auto_renew = auto_renew + self.next = next + self.last = None + + +class CommitmentQuota(msrest.serialization.Model): + """Cognitive Services account commitment quota. + + :param quantity: Commitment quota quantity. + :type quantity: long + :param unit: Commitment quota unit. + :type unit: str + """ + + _attribute_map = { + 'quantity': {'key': 'quantity', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + *, + quantity: Optional[int] = None, + unit: Optional[str] = None, + **kwargs + ): + super(CommitmentQuota, self).__init__(**kwargs) + self.quantity = quantity + self.unit = unit + + +class CommitmentTier(msrest.serialization.Model): + """Cognitive Services account commitment tier. + + :param kind: The Kind of the resource. + :type kind: str + :param sku_name: The name of the SKU. Ex - P3. It is typically a letter+number code. + :type sku_name: str + :param hosting_model: Account hosting model. Possible values include: "Web", + "ConnectedContainer", "DisconnectedContainer". + :type hosting_model: str or ~azure.mgmt.cognitiveservices.models.HostingModel + :param plan_type: Commitment plan type. + :type plan_type: str + :param tier: Commitment period commitment tier. + :type tier: str + :param max_count: Commitment period commitment max count. + :type max_count: int + :param quota: Cognitive Services account commitment quota. + :type quota: ~azure.mgmt.cognitiveservices.models.CommitmentQuota + :param cost: Cognitive Services account commitment cost. + :type cost: ~azure.mgmt.cognitiveservices.models.CommitmentCost + """ + + _attribute_map = { + 'kind': {'key': 'kind', 'type': 'str'}, + 'sku_name': {'key': 'skuName', 'type': 'str'}, + 'hosting_model': {'key': 'hostingModel', 'type': 'str'}, + 'plan_type': {'key': 'planType', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'quota': {'key': 'quota', 'type': 'CommitmentQuota'}, + 'cost': {'key': 'cost', 'type': 'CommitmentCost'}, + } + + def __init__( + self, + *, + kind: Optional[str] = None, + sku_name: Optional[str] = None, + hosting_model: Optional[Union[str, "HostingModel"]] = None, + plan_type: Optional[str] = None, + tier: Optional[str] = None, + max_count: Optional[int] = None, + quota: Optional["CommitmentQuota"] = None, + cost: Optional["CommitmentCost"] = None, + **kwargs + ): + super(CommitmentTier, self).__init__(**kwargs) + self.kind = kind + self.sku_name = sku_name + self.hosting_model = hosting_model + self.plan_type = plan_type + self.tier = tier + self.max_count = max_count + self.quota = quota + self.cost = cost + + +class CommitmentTierListResult(msrest.serialization.Model): + """The list of cognitive services accounts operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param next_link: The link used to get the next page of CommitmentTier. + :type next_link: str + :ivar value: Gets the list of Cognitive Services accounts CommitmentTier and their properties. + :vartype value: list[~azure.mgmt.cognitiveservices.models.CommitmentTier] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[CommitmentTier]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(CommitmentTierListResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = None + + +class Deployment(ProxyResource): + """Cognitive Services account deployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.cognitiveservices.models.SystemData + :ivar etag: Resource Etag. + :vartype etag: str + :param properties: Properties of Cognitive Services account deployment. + :type properties: ~azure.mgmt.cognitiveservices.models.DeploymentProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeploymentProperties'}, + } + + def __init__( + self, + *, + properties: Optional["DeploymentProperties"] = None, + **kwargs + ): + super(Deployment, self).__init__(**kwargs) + self.system_data = None + self.etag = None + self.properties = properties + + +class DeploymentListResult(msrest.serialization.Model): + """The list of cognitive services accounts operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param next_link: The link used to get the next page of Deployment. + :type next_link: str + :ivar value: Gets the list of Cognitive Services accounts Deployment and their properties. + :vartype value: list[~azure.mgmt.cognitiveservices.models.Deployment] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Deployment]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(DeploymentListResult, self).__init__(**kwargs) + self.next_link = next_link + self.value = None + + +class DeploymentModel(msrest.serialization.Model): + """Properties of Cognitive Services account deployment model. + + :param format: Deployment model format. + :type format: str + :param name: Deployment model name. + :type name: str + :param version: Deployment model version. + :type version: str + """ + + _attribute_map = { + 'format': {'key': 'format', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + format: Optional[str] = None, + name: Optional[str] = None, + version: Optional[str] = None, + **kwargs + ): + super(DeploymentModel, self).__init__(**kwargs) + self.format = format + self.name = name + self.version = version + + +class DeploymentProperties(msrest.serialization.Model): + """Properties of Cognitive Services account deployment. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: Gets the status of the resource at the time the operation was called. + Possible values include: "Accepted", "Creating", "Deleting", "Moving", "Failed", "Succeeded". + :vartype provisioning_state: str or + ~azure.mgmt.cognitiveservices.models.DeploymentProvisioningState + :param model: Properties of Cognitive Services account deployment model. + :type model: ~azure.mgmt.cognitiveservices.models.DeploymentModel + :param scale_settings: Properties of Cognitive Services account deployment model. + :type scale_settings: ~azure.mgmt.cognitiveservices.models.DeploymentScaleSettings + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'model': {'key': 'model', 'type': 'DeploymentModel'}, + 'scale_settings': {'key': 'scaleSettings', 'type': 'DeploymentScaleSettings'}, + } + + def __init__( + self, + *, + model: Optional["DeploymentModel"] = None, + scale_settings: Optional["DeploymentScaleSettings"] = None, + **kwargs + ): + super(DeploymentProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.model = model + self.scale_settings = scale_settings + + +class DeploymentScaleSettings(msrest.serialization.Model): + """Properties of Cognitive Services account deployment model. + + :param scale_type: Deployment scale type. Possible values include: "Manual". + :type scale_type: str or ~azure.mgmt.cognitiveservices.models.DeploymentScaleType + :param capacity: Deployment capacity. + :type capacity: int + """ + + _attribute_map = { + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + scale_type: Optional[Union[str, "DeploymentScaleType"]] = None, + capacity: Optional[int] = None, + **kwargs + ): + super(DeploymentScaleSettings, self).__init__(**kwargs) + self.scale_type = scale_type + self.capacity = capacity + + class DomainAvailability(msrest.serialization.Model): """Domain availability. @@ -607,6 +1141,8 @@ class DomainAvailability(msrest.serialization.Model): :type subdomain_name: str :param type: The Type of the resource. :type type: str + :param kind: The Kind of the resource. + :type kind: str """ _attribute_map = { @@ -614,6 +1150,7 @@ class DomainAvailability(msrest.serialization.Model): 'reason': {'key': 'reason', 'type': 'str'}, 'subdomain_name': {'key': 'subdomainName', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, } def __init__( @@ -623,6 +1160,7 @@ def __init__( reason: Optional[str] = None, subdomain_name: Optional[str] = None, type: Optional[str] = None, + kind: Optional[str] = None, **kwargs ): super(DomainAvailability, self).__init__(**kwargs) @@ -630,6 +1168,7 @@ def __init__( self.reason = reason self.subdomain_name = subdomain_name self.type = type + self.kind = kind class Encryption(msrest.serialization.Model): diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py index 79bc52d9dd8f..b2de36c75c14 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/__init__.py @@ -11,8 +11,11 @@ from ._resource_skus_operations import ResourceSkusOperations from ._operations import Operations from ._cognitive_services_management_client_operations import CognitiveServicesManagementClientOperationsMixin +from ._commitment_tiers_operations import CommitmentTiersOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._deployments_operations import DeploymentsOperations +from ._commitment_plans_operations import CommitmentPlansOperations __all__ = [ 'AccountsOperations', @@ -20,6 +23,9 @@ 'ResourceSkusOperations', 'Operations', 'CognitiveServicesManagementClientOperationsMixin', + 'CommitmentTiersOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', + 'DeploymentsOperations', + 'CommitmentPlansOperations', ] diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_accounts_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_accounts_operations.py index 7ce476259722..ff57f46a9642 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_accounts_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_accounts_operations.py @@ -60,14 +60,14 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -163,7 +163,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -195,14 +195,14 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -294,7 +294,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -325,13 +325,13 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -405,7 +405,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -447,13 +447,13 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -504,7 +504,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -516,7 +516,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -573,7 +573,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -647,13 +647,13 @@ def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list_keys.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -712,14 +712,14 @@ def regenerate_key( error_map.update(kwargs.pop('error_map', {})) _parameters = _models.RegenerateKeyParameters(key_name=key_name) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.regenerate_key.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -777,13 +777,13 @@ def list_skus( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list_skus.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -841,13 +841,13 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list_usages.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_cognitive_services_management_client_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_cognitive_services_management_client_operations.py index a42311dda574..ab3055670978 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_cognitive_services_management_client_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_cognitive_services_management_client_operations.py @@ -55,7 +55,7 @@ def check_sku_availability( error_map.update(kwargs.pop('error_map', {})) _parameters = _models.CheckSkuAvailabilityParameter(skus=skus, kind=kind, type=type) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -100,6 +100,7 @@ def check_domain_availability( self, subdomain_name, # type: str type, # type: str + kind=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> "_models.DomainAvailability" @@ -109,6 +110,8 @@ def check_domain_availability( :type subdomain_name: str :param type: The Type of the resource. :type type: str + :param kind: The Kind of the resource. + :type kind: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DomainAvailability, or the result of cls(response) :rtype: ~azure.mgmt.cognitiveservices.models.DomainAvailability @@ -120,8 +123,8 @@ def check_domain_availability( } error_map.update(kwargs.pop('error_map', {})) - _parameters = _models.CheckDomainAvailabilityParameter(subdomain_name=subdomain_name, type=type) - api_version = "2021-04-30" + _parameters = _models.CheckDomainAvailabilityParameter(subdomain_name=subdomain_name, type=type, kind=kind) + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_commitment_plans_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_commitment_plans_operations.py new file mode 100644 index 000000000000..ac596be7642c --- /dev/null +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_commitment_plans_operations.py @@ -0,0 +1,385 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CommitmentPlansOperations(object): + """CommitmentPlansOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.cognitiveservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.CommitmentPlanListResult"] + """Gets the commitmentPlans associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either CommitmentPlanListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cognitiveservices.models.CommitmentPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommitmentPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('CommitmentPlanListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans'} # type: ignore + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + commitment_plan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CommitmentPlan" + """Gets the specified commitmentPlans associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param commitment_plan_name: The name of the commitmentPlan associated with the Cognitive + Services Account. + :type commitment_plan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommitmentPlan, or the result of cls(response) + :rtype: ~azure.mgmt.cognitiveservices.models.CommitmentPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommitmentPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'commitmentPlanName': self._serialize.url("commitment_plan_name", commitment_plan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CommitmentPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + account_name, # type: str + commitment_plan_name, # type: str + commitment_plan, # type: "_models.CommitmentPlan" + **kwargs # type: Any + ): + # type: (...) -> "_models.CommitmentPlan" + """Update the state of specified commitmentPlans associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param commitment_plan_name: The name of the commitmentPlan associated with the Cognitive + Services Account. + :type commitment_plan_name: str + :param commitment_plan: The commitmentPlan properties. + :type commitment_plan: ~azure.mgmt.cognitiveservices.models.CommitmentPlan + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommitmentPlan, or the result of cls(response) + :rtype: ~azure.mgmt.cognitiveservices.models.CommitmentPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommitmentPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'commitmentPlanName': self._serialize.url("commitment_plan_name", commitment_plan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(commitment_plan, 'CommitmentPlan') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('CommitmentPlan', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('CommitmentPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + commitment_plan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'commitmentPlanName': self._serialize.url("commitment_plan_name", commitment_plan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + commitment_plan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified commitmentPlan associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param commitment_plan_name: The name of the commitmentPlan associated with the Cognitive + Services Account. + :type commitment_plan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + commitment_plan_name=commitment_plan_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'commitmentPlanName': self._serialize.url("commitment_plan_name", commitment_plan_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/commitmentPlans/{commitmentPlanName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_available_endpoint_services_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_commitment_tiers_operations.py similarity index 81% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_available_endpoint_services_operations.py rename to sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_commitment_tiers_operations.py index d99e2ed036f9..1113d4064c6b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_available_endpoint_services_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_commitment_tiers_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class AvailableEndpointServicesOperations(object): - """AvailableEndpointServicesOperations operations. +class CommitmentTiersOperations(object): + """CommitmentTiersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.cognitiveservices.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,22 +50,22 @@ def list( location, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.EndpointServicesListResult"] - """List what values of endpoint services are available for use. + # type: (...) -> Iterable["_models.CommitmentTierListResult"] + """List Commitment Tiers. - :param location: The location to check available endpoint services. + :param location: Resource location. :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EndpointServicesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.EndpointServicesListResult] + :return: An iterator like instance of either CommitmentTierListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cognitiveservices.models.CommitmentTierListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointServicesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommitmentTierListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -77,8 +77,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'location': self._serialize.url("location", location, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -93,7 +93,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('EndpointServicesListResult', pipeline_response) + deserialized = self._deserialize('CommitmentTierListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -106,12 +106,13 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.CognitiveServices/locations/{location}/commitmentTiers'} # type: ignore diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deleted_accounts_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deleted_accounts_operations.py index 72caa9730757..6625616fa48e 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deleted_accounts_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deleted_accounts_operations.py @@ -73,14 +73,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -124,14 +124,14 @@ def _purge_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._purge_initial.metadata['url'] # type: ignore path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -210,7 +210,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -246,7 +246,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deployments_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deployments_operations.py new file mode 100644 index 000000000000..41a60cd392ab --- /dev/null +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_deployments_operations.py @@ -0,0 +1,447 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DeploymentsOperations(object): + """DeploymentsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.cognitiveservices.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DeploymentListResult"] + """Gets the deployments associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeploymentListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cognitiveservices.models.DeploymentListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeploymentListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DeploymentListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments'} # type: ignore + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Deployment" + """Gets the specified deployments associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param deployment_name: The name of the deployment associated with the Cognitive Services + Account. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Deployment, or the result of cls(response) + :rtype: ~azure.mgmt.cognitiveservices.models.Deployment + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + account_name, # type: str + deployment_name, # type: str + deployment, # type: "_models.Deployment" + **kwargs # type: Any + ): + # type: (...) -> "_models.Deployment" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(deployment, 'Deployment') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Deployment', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + account_name, # type: str + deployment_name, # type: str + deployment, # type: "_models.Deployment" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Deployment"] + """Update the state of specified deployments associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param deployment_name: The name of the deployment associated with the Cognitive Services + Account. + :type deployment_name: str + :param deployment: The deployment properties. + :type deployment: ~azure.mgmt.cognitiveservices.models.Deployment + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Deployment or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cognitiveservices.models.Deployment] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Deployment"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + deployment_name=deployment_name, + deployment=deployment, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Deployment', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + deployment_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified deployment associated with the Cognitive Services account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The name of Cognitive Services account. + :type account_name: str + :param deployment_name: The name of the deployment associated with the Cognitive Services + Account. + :type deployment_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + deployment_name=deployment_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'deploymentName': self._serialize.url("deployment_name", deployment_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/deployments/{deploymentName}'} # type: ignore diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_operations.py index 34d6f91f6743..39286dbd94ce 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_endpoint_connections_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_endpoint_connections_operations.py index 5cf9df2709d6..a138e7b1de42 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_endpoint_connections_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_endpoint_connections_operations.py @@ -69,13 +69,13 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } @@ -133,13 +133,13 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -185,14 +185,14 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -291,7 +291,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -324,13 +324,13 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -411,7 +411,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_link_resources_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_link_resources_operations.py index 5a133ef4b58b..c485187b53fe 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_link_resources_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_private_link_resources_operations.py @@ -67,13 +67,13 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=64, min_length=2, pattern=r'^[a-zA-Z0-9][a-zA-Z0-9_.-]*$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } diff --git a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_resource_skus_operations.py b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_resource_skus_operations.py index 336783d45fd6..8cf6c81c4a05 100644 --- a/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_resource_skus_operations.py +++ b/sdk/cognitiveservices/azure-mgmt-cognitiveservices/azure/mgmt/cognitiveservices/operations/_resource_skus_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-30" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/communication/azure-communication-chat/setup.py b/sdk/communication/azure-communication-chat/setup.py index 47ef746351e6..d66cc8e14215 100644 --- a/sdk/communication/azure-communication-chat/setup.py +++ b/sdk/communication/azure-communication-chat/setup.py @@ -57,8 +57,8 @@ 'azure.communication' ]), install_requires=[ - 'azure-core<2.0.0,>=1.11.0', - 'msrest>=0.6.0', + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.19.1", 'six>=1.11.0' ], extras_require={ diff --git a/sdk/communication/azure-communication-chat/tests.yml b/sdk/communication/azure-communication-chat/tests.yml index d7accf3dcad9..75731ab2906c 100644 --- a/sdk/communication/azure-communication-chat/tests.yml +++ b/sdk/communication/azure-communication-chat/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-chat' JobName: chat ServiceDirectory: communication - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true CloudConfig: diff --git a/sdk/communication/azure-communication-identity/CHANGELOG.md b/sdk/communication/azure-communication-identity/CHANGELOG.md index 192e18b1cf58..07f170020251 100644 --- a/sdk/communication/azure-communication-identity/CHANGELOG.md +++ b/sdk/communication/azure-communication-identity/CHANGELOG.md @@ -1,5 +1,20 @@ # Release History +## 1.1.0b2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.1.0b1 (2021-11-09) +### Features Added +- Added support for Microsoft 365 Teams identities + - `CommunicationIdentityClient` added a new method `get_token_for_teams_user` that provides the ability to exchange an AAD access token of a Teams user for a Communication Identity access token + ## 1.0.1 (2021-06-08) ### Bug Fixes - Fixed async client to use async bearer token credential policy instead of sync policy. diff --git a/sdk/communication/azure-communication-identity/README.md b/sdk/communication/azure-communication-identity/README.md index 88a039fc4415..ee0e0fe025b1 100644 --- a/sdk/communication/azure-communication-identity/README.md +++ b/sdk/communication/azure-communication-identity/README.md @@ -52,6 +52,7 @@ The following section provides several code snippets covering some of the most c - [Creating a user and a token in a single request](#creating-a-user-and-a-token-in-a-single-request) - [Revoking a user's access tokens](#revoking-a-users-access-tokens) - [Deleting a user](#deleting-a-user) +- [Exchanging AAD access token of a Teams User for a Communication Identity access token](#exchanging-aad-access-token-of-a-teams-user-for-a-communication-identity-access-token) ### Creating a new user @@ -95,6 +96,13 @@ Use the `delete_user` method to delete a user. Pass in the user object as a para identity_client.delete_user(user) ``` +### Exchanging AAD access token of a Teams User for a Communication Identity access token + +Use the `get_token_for_teams_user` method to exchange an AAD access token of a Teams User for a new Communication Identity access token. +```python +identity_client.get_token_for_teams_user(add_token) +``` + # Troubleshooting The Azure Communication Service Identity client will raise exceptions defined in [Azure Core][azure_core]. diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_api_versions.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_api_versions.py new file mode 100644 index 000000000000..6619a8c26299 --- /dev/null +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_api_versions.py @@ -0,0 +1,14 @@ +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +from enum import Enum + + +class ApiVersion(str, Enum): + V2021_03_07 = "2021-03-07" + V2021_10_31_preview = "2021-10-31-preview" + + +DEFAULT_VERSION = ApiVersion.V2021_10_31_preview diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py index 114c23b3f9c2..7c10ba66718e 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_communication_identity_client.py @@ -14,6 +14,7 @@ from ._shared.utils import parse_connection_str, get_authentication_policy from ._shared.models import CommunicationUserIdentifier from ._version import SDK_MONIKER +from ._api_versions import DEFAULT_VERSION if TYPE_CHECKING: from azure.core.credentials import TokenCredential @@ -50,10 +51,11 @@ def __init__( if not credential: raise ValueError( "You need to provide account shared key to authenticate.") - self._endpoint = endpoint + self._api_version = kwargs.pop("api_version", DEFAULT_VERSION) self._identity_service_client = CommunicationIdentityClientGen( self._endpoint, + api_version=self._api_version, authentication_policy=get_authentication_policy(endpoint, credential), sdk_moniker=SDK_MONIKER, **kwargs) @@ -79,7 +81,6 @@ def from_connection_string( :caption: Creating the CommunicationIdentityClient from a connection string. """ endpoint, access_key = parse_connection_str(conn_str) - return cls(endpoint, access_key, **kwargs) @distributed_trace @@ -90,7 +91,9 @@ def create_user(self, **kwargs): :return: CommunicationUserIdentifier :rtype: ~azure.communication.identity.CommunicationUserIdentifier """ + api_version = kwargs.pop("api_version", self._api_version) return self._identity_service_client.communication_identity.create( + api_version=api_version, cls=lambda pr, u, e: CommunicationUserIdentifier(u.identity.id, raw_id=u.identity.id), **kwargs) @@ -109,10 +112,12 @@ def create_user_and_token( :rtype: tuple of (~azure.communication.identity.CommunicationUserIdentifier, ~azure.core.credentials.AccessToken) """ + api_version = kwargs.pop("api_version", self._api_version) return self._identity_service_client.communication_identity.create( cls=lambda pr, u, e: (CommunicationUserIdentifier(u.identity.id, raw_id=u.identity.id), AccessToken(u.access_token.token, u.access_token.expires_on)), create_token_with_scopes=scopes, + api_version=api_version, **kwargs) @distributed_trace @@ -129,8 +134,11 @@ def delete_user( :return: None :rtype: None """ + api_version = kwargs.pop("api_version", self._api_version) self._identity_service_client.communication_identity.delete( - user.properties['id'], **kwargs) + user.properties['id'], + api_version=api_version, + **kwargs) @distributed_trace def get_token( @@ -149,9 +157,11 @@ def get_token( :return: AccessToken :rtype: ~azure.core.credentials.AccessToken """ + api_version = kwargs.pop("api_version", self._api_version) return self._identity_service_client.communication_identity.issue_access_token( user.properties['id'], scopes, + api_version=api_version, cls=lambda pr, u, e: AccessToken(u.token, u.expires_on), **kwargs) @@ -169,6 +179,30 @@ def revoke_tokens( :return: None :rtype: None """ + api_version = kwargs.pop("api_version", self._api_version) return self._identity_service_client.communication_identity.revoke_access_tokens( user.properties['id'] if user else None, + api_version=api_version, + **kwargs) + + @distributed_trace + def get_token_for_teams_user( + self, + add_token, # type: str + **kwargs + ): + # type: (...) -> AccessToken + """Exchanges an AAD access token of a Teams User for a new Communication Identity access token. + + :param add_token: an AAD access token of a Teams User + :type add_token: str + :return: AccessToken + :rtype: ~azure.core.credentials.AccessToken + """ + api_version = kwargs.pop("api_version", self._api_version) + return self._identity_service_client.communication_identity.exchange_teams_user_access_token( + token=add_token, + api_version=api_version, + cls=lambda pr, u, e: AccessToken(u.token, u.expires_on), **kwargs) + \ No newline at end of file diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_communication_identity_client.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_communication_identity_client.py index 4367295c5935..e19cc87b863f 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_communication_identity_client.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_communication_identity_client.py @@ -6,29 +6,34 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from copy import deepcopy from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer +from . import models +from ._configuration import CommunicationIdentityClientConfiguration +from .operations import CommunicationIdentityOperations + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import CommunicationIdentityClientConfiguration -from .operations import CommunicationIdentityOperations -from . import models - + from azure.core.rest import HttpRequest, HttpResponse class CommunicationIdentityClient(object): """Azure Communication Identity Service. :ivar communication_identity: CommunicationIdentityOperations operations - :vartype communication_identity: azure.communication.identity.operations.CommunicationIdentityOperations - :param endpoint: The communication resource, for example https://my-resource.communication.azure.com. + :vartype communication_identity: + azure.communication.identity.operations.CommunicationIdentityOperations + :param endpoint: The communication resource, for example + https://my-resource.communication.azure.com. :type endpoint: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -37,35 +42,47 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}' - self._config = CommunicationIdentityClientConfiguration(endpoint, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + _base_url = '{endpoint}' + self._config = CommunicationIdentityClientConfiguration(endpoint=endpoint, **kwargs) + self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.communication_identity = CommunicationIdentityOperations(self._client, self._config, self._serialize, self._deserialize) - self.communication_identity = CommunicationIdentityOperations( - self._client, self._config, self._serialize, self._deserialize) - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.HttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_configuration.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_configuration.py index 68363ff6515f..c6396a8ad08e 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_configuration.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_configuration.py @@ -25,6 +25,8 @@ class CommunicationIdentityClientConfiguration(Configuration): :param endpoint: The communication resource, for example https://my-resource.communication.azure.com. :type endpoint: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -33,12 +35,14 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None + super(CommunicationIdentityClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") - super(CommunicationIdentityClientConfiguration, self).__init__(**kwargs) self.endpoint = endpoint - self.api_version = "2021-03-07" + self.api_version = api_version kwargs.setdefault('sdk_moniker', 'communicationidentityclient/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_vendor.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/_communication_identity_client.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/_communication_identity_client.py index f7cec3b79af5..8fefc2962c5d 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/_communication_identity_client.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/_communication_identity_client.py @@ -6,24 +6,29 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from copy import deepcopy +from typing import Any, Awaitable from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from msrest import Deserializer, Serializer +from .. import models from ._configuration import CommunicationIdentityClientConfiguration from .operations import CommunicationIdentityOperations -from .. import models - -class CommunicationIdentityClient(object): +class CommunicationIdentityClient: """Azure Communication Identity Service. :ivar communication_identity: CommunicationIdentityOperations operations - :vartype communication_identity: azure.communication.identity.aio.operations.CommunicationIdentityOperations - :param endpoint: The communication resource, for example https://my-resource.communication.azure.com. + :vartype communication_identity: + azure.communication.identity.aio.operations.CommunicationIdentityOperations + :param endpoint: The communication resource, for example + https://my-resource.communication.azure.com. :type endpoint: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -31,34 +36,46 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: - base_url = '{endpoint}' - self._config = CommunicationIdentityClientConfiguration(endpoint, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + _base_url = '{endpoint}' + self._config = CommunicationIdentityClientConfiguration(endpoint=endpoint, **kwargs) + self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.communication_identity = CommunicationIdentityOperations(self._client, self._config, self._serialize, self._deserialize) - self.communication_identity = CommunicationIdentityOperations( - self._client, self._config, self._serialize, self._deserialize) - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.AsyncHttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) async def close(self) -> None: await self._client.close() diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/_configuration.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/_configuration.py index ffd8616506db..e79d41961030 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/_configuration.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/_configuration.py @@ -21,6 +21,8 @@ class CommunicationIdentityClientConfiguration(Configuration): :param endpoint: The communication resource, for example https://my-resource.communication.azure.com. :type endpoint: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( @@ -28,12 +30,14 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: + super(CommunicationIdentityClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") - super(CommunicationIdentityClientConfiguration, self).__init__(**kwargs) self.endpoint = endpoint - self.api_version = "2021-03-07" + self.api_version = api_version kwargs.setdefault('sdk_moniker', 'communicationidentityclient/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/operations/_communication_identity_operations.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/operations/_communication_identity_operations.py index 3577e5312591..eea86c8b9695 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/operations/_communication_identity_operations.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/aio/operations/_communication_identity_operations.py @@ -5,14 +5,19 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +from ..._vendor import _convert_request +from ...operations._communication_identity_operations import build_create_request, build_delete_request, build_exchange_teams_user_access_token_request, build_issue_access_token_request, build_revoke_access_tokens_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -39,17 +44,22 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def create( self, create_token_with_scopes: Optional[List[Union[str, "_models.CommunicationTokenScope"]]] = None, **kwargs: Any ) -> "_models.CommunicationIdentityAccessTokenResult": - """Create a new identity. + """Create a new identity, and optionally, an access token. - Create a new identity. + Create a new identity, and optionally, an access token. :param create_token_with_scopes: Also create access token for the created identity. - :type create_token_with_scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] + :type create_token_with_scopes: list[str or + ~azure.communication.identity.models.CommunicationTokenScope] + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CommunicationIdentityAccessTokenResult, or the result of cls(response) :rtype: ~azure.communication.identity.models.CommunicationIdentityAccessTokenResult @@ -61,40 +71,33 @@ async def create( } error_map.update(kwargs.pop('error_map', {})) - _body = _models.CommunicationIdentityCreateRequest(create_token_with_scopes=create_token_with_scopes) - api_version = "2021-03-07" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.create.metadata['url'] # type: ignore + _body = _models.CommunicationIdentityCreateRequest(create_token_with_scopes=create_token_with_scopes) + if _body is not None: + json = self._serialize.body(_body, 'CommunicationIdentityCreateRequest') + else: + json = None + + request = build_create_request( + api_version=api_version, + content_type=content_type, + json=json, + template_url=self.create.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - if _body is not None: - body_content = self._serialize.body(_body, 'CommunicationIdentityCreateRequest') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('CommunicationIdentityAccessTokenResult', pipeline_response) @@ -103,8 +106,11 @@ async def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/identities'} # type: ignore + + @distributed_trace_async async def delete( self, id: str, @@ -116,6 +122,9 @@ async def delete( :param id: Identifier of the identity to be deleted. :type id: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -126,32 +135,27 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-07" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + + + request = build_delete_request( + id=id, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'id': self._serialize.url("id", id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -159,6 +163,8 @@ async def delete( delete.metadata = {'url': '/identities/{id}'} # type: ignore + + @distributed_trace_async async def revoke_access_tokens( self, id: str, @@ -170,6 +176,9 @@ async def revoke_access_tokens( :param id: Identifier of the identity. :type id: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -180,32 +189,27 @@ async def revoke_access_tokens( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-07" - accept = "application/json" - # Construct URL - url = self.revoke_access_tokens.metadata['url'] # type: ignore + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + + + request = build_revoke_access_tokens_request( + id=id, + api_version=api_version, + template_url=self.revoke_access_tokens.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'id': self._serialize.url("id", id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -213,6 +217,73 @@ async def revoke_access_tokens( revoke_access_tokens.metadata = {'url': '/identities/{id}/:revokeAccessTokens'} # type: ignore + + @distributed_trace_async + async def exchange_teams_user_access_token( + self, + token: str, + **kwargs: Any + ) -> "_models.CommunicationIdentityAccessToken": + """Exchange an AAD access token of a Teams user for a new Communication Identity access token with + a matching expiration time. + + Exchange an AAD access token of a Teams user for a new Communication Identity access token with + a matching expiration time. + + :param token: AAD access token of a Teams User to acquire a new Communication Identity access + token. + :type token: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommunicationIdentityAccessToken, or the result of cls(response) + :rtype: ~azure.communication.identity.models.CommunicationIdentityAccessToken + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommunicationIdentityAccessToken"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _body = _models.TeamsUserAccessTokenRequest(token=token) + json = self._serialize.body(_body, 'TeamsUserAccessTokenRequest') + + request = build_exchange_teams_user_access_token_request( + api_version=api_version, + content_type=content_type, + json=json, + template_url=self.exchange_teams_user_access_token.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('CommunicationIdentityAccessToken', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + exchange_teams_user_access_token.metadata = {'url': '/teamsUser/:exchangeAccessToken'} # type: ignore + + + @distributed_trace_async async def issue_access_token( self, id: str, @@ -227,6 +298,9 @@ async def issue_access_token( :type id: str :param scopes: List of scopes attached to the token. :type scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CommunicationIdentityAccessToken, or the result of cls(response) :rtype: ~azure.communication.identity.models.CommunicationIdentityAccessToken @@ -238,38 +312,31 @@ async def issue_access_token( } error_map.update(kwargs.pop('error_map', {})) - _body = _models.CommunicationIdentityAccessTokenRequest(scopes=scopes) - api_version = "2021-03-07" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.issue_access_token.metadata['url'] # type: ignore + _body = _models.CommunicationIdentityAccessTokenRequest(scopes=scopes) + json = self._serialize.body(_body, 'CommunicationIdentityAccessTokenRequest') + + request = build_issue_access_token_request( + id=id, + api_version=api_version, + content_type=content_type, + json=json, + template_url=self.issue_access_token.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'id': self._serialize.url("id", id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_body, 'CommunicationIdentityAccessTokenRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('CommunicationIdentityAccessToken', pipeline_response) @@ -278,4 +345,6 @@ async def issue_access_token( return cls(pipeline_response, deserialized, {}) return deserialized + issue_access_token.metadata = {'url': '/identities/{id}/:issueAccessToken'} # type: ignore + diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/__init__.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/__init__.py index c5df5a066788..1512d83d56a9 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/__init__.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/__init__.py @@ -14,6 +14,7 @@ from ._models_py3 import CommunicationIdentityAccessTokenRequest from ._models_py3 import CommunicationIdentityAccessTokenResult from ._models_py3 import CommunicationIdentityCreateRequest + from ._models_py3 import TeamsUserAccessTokenRequest except (SyntaxError, ImportError): from ._models import CommunicationError # type: ignore from ._models import CommunicationErrorResponse # type: ignore @@ -22,6 +23,7 @@ from ._models import CommunicationIdentityAccessTokenRequest # type: ignore from ._models import CommunicationIdentityAccessTokenResult # type: ignore from ._models import CommunicationIdentityCreateRequest # type: ignore + from ._models import TeamsUserAccessTokenRequest # type: ignore from ._communication_identity_client_enums import ( CommunicationTokenScope, @@ -35,5 +37,6 @@ 'CommunicationIdentityAccessTokenRequest', 'CommunicationIdentityAccessTokenResult', 'CommunicationIdentityCreateRequest', + 'TeamsUserAccessTokenRequest', 'CommunicationTokenScope', ] diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_communication_identity_client_enums.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_communication_identity_client_enums.py index fb650aac3d10..606d31068ec3 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_communication_identity_client_enums.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_communication_identity_client_enums.py @@ -6,27 +6,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class CommunicationTokenScope(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class CommunicationTokenScope(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """List of scopes for an access token. """ diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_models.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_models.py index ead5ab1c6dbe..6fff15cfb1f9 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_models.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_models.py @@ -17,10 +17,10 @@ class CommunicationError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. The error code. - :type code: str - :param message: Required. The error message. - :type message: str + :ivar code: Required. The error code. + :vartype code: str + :ivar message: Required. The error message. + :vartype message: str :ivar target: The error target. :vartype target: str :ivar details: Further details about specific errors that led to this error. @@ -49,6 +49,12 @@ def __init__( self, **kwargs ): + """ + :keyword code: Required. The error code. + :paramtype code: str + :keyword message: Required. The error message. + :paramtype message: str + """ super(CommunicationError, self).__init__(**kwargs) self.code = kwargs['code'] self.message = kwargs['message'] @@ -62,8 +68,8 @@ class CommunicationErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param error: Required. The Communication Services error. - :type error: ~azure.communication.identity.models.CommunicationError + :ivar error: Required. The Communication Services error. + :vartype error: ~azure.communication.identity.models.CommunicationError """ _validation = { @@ -78,6 +84,10 @@ def __init__( self, **kwargs ): + """ + :keyword error: Required. The Communication Services error. + :paramtype error: ~azure.communication.identity.models.CommunicationError + """ super(CommunicationErrorResponse, self).__init__(**kwargs) self.error = kwargs['error'] @@ -87,8 +97,8 @@ class CommunicationIdentity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Identifier of the identity. - :type id: str + :ivar id: Required. Identifier of the identity. + :vartype id: str """ _validation = { @@ -103,6 +113,10 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Identifier of the identity. + :paramtype id: str + """ super(CommunicationIdentity, self).__init__(**kwargs) self.id = kwargs['id'] @@ -112,10 +126,10 @@ class CommunicationIdentityAccessToken(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param token: Required. The access token issued for the identity. - :type token: str - :param expires_on: Required. The expiry time of the token. - :type expires_on: ~datetime.datetime + :ivar token: Required. The access token issued for the identity. + :vartype token: str + :ivar expires_on: Required. The expiry time of the token. + :vartype expires_on: ~datetime.datetime """ _validation = { @@ -132,6 +146,12 @@ def __init__( self, **kwargs ): + """ + :keyword token: Required. The access token issued for the identity. + :paramtype token: str + :keyword expires_on: Required. The expiry time of the token. + :paramtype expires_on: ~datetime.datetime + """ super(CommunicationIdentityAccessToken, self).__init__(**kwargs) self.token = kwargs['token'] self.expires_on = kwargs['expires_on'] @@ -142,8 +162,8 @@ class CommunicationIdentityAccessTokenRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param scopes: Required. List of scopes attached to the token. - :type scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] + :ivar scopes: Required. List of scopes attached to the token. + :vartype scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] """ _validation = { @@ -158,6 +178,10 @@ def __init__( self, **kwargs ): + """ + :keyword scopes: Required. List of scopes attached to the token. + :paramtype scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] + """ super(CommunicationIdentityAccessTokenRequest, self).__init__(**kwargs) self.scopes = kwargs['scopes'] @@ -167,10 +191,10 @@ class CommunicationIdentityAccessTokenResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param identity: Required. A communication identity. - :type identity: ~azure.communication.identity.models.CommunicationIdentity - :param access_token: An access token. - :type access_token: ~azure.communication.identity.models.CommunicationIdentityAccessToken + :ivar identity: Required. A communication identity. + :vartype identity: ~azure.communication.identity.models.CommunicationIdentity + :ivar access_token: An access token. + :vartype access_token: ~azure.communication.identity.models.CommunicationIdentityAccessToken """ _validation = { @@ -186,6 +210,12 @@ def __init__( self, **kwargs ): + """ + :keyword identity: Required. A communication identity. + :paramtype identity: ~azure.communication.identity.models.CommunicationIdentity + :keyword access_token: An access token. + :paramtype access_token: ~azure.communication.identity.models.CommunicationIdentityAccessToken + """ super(CommunicationIdentityAccessTokenResult, self).__init__(**kwargs) self.identity = kwargs['identity'] self.access_token = kwargs.get('access_token', None) @@ -194,8 +224,8 @@ def __init__( class CommunicationIdentityCreateRequest(msrest.serialization.Model): """CommunicationIdentityCreateRequest. - :param create_token_with_scopes: Also create access token for the created identity. - :type create_token_with_scopes: list[str or + :ivar create_token_with_scopes: Also create access token for the created identity. + :vartype create_token_with_scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] """ @@ -207,5 +237,41 @@ def __init__( self, **kwargs ): + """ + :keyword create_token_with_scopes: Also create access token for the created identity. + :paramtype create_token_with_scopes: list[str or + ~azure.communication.identity.models.CommunicationTokenScope] + """ super(CommunicationIdentityCreateRequest, self).__init__(**kwargs) self.create_token_with_scopes = kwargs.get('create_token_with_scopes', None) + + +class TeamsUserAccessTokenRequest(msrest.serialization.Model): + """TeamsUserAccessTokenRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar token: Required. AAD access token of a Teams User to acquire a new Communication Identity + access token. + :vartype token: str + """ + + _validation = { + 'token': {'required': True}, + } + + _attribute_map = { + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword token: Required. AAD access token of a Teams User to acquire a new Communication + Identity access token. + :paramtype token: str + """ + super(TeamsUserAccessTokenRequest, self).__init__(**kwargs) + self.token = kwargs['token'] diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_models_py3.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_models_py3.py index 088037d79eb8..449d0a07344f 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_models_py3.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/models/_models_py3.py @@ -20,10 +20,10 @@ class CommunicationError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. The error code. - :type code: str - :param message: Required. The error message. - :type message: str + :ivar code: Required. The error code. + :vartype code: str + :ivar message: Required. The error message. + :vartype message: str :ivar target: The error target. :vartype target: str :ivar details: Further details about specific errors that led to this error. @@ -55,6 +55,12 @@ def __init__( message: str, **kwargs ): + """ + :keyword code: Required. The error code. + :paramtype code: str + :keyword message: Required. The error message. + :paramtype message: str + """ super(CommunicationError, self).__init__(**kwargs) self.code = code self.message = message @@ -68,8 +74,8 @@ class CommunicationErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param error: Required. The Communication Services error. - :type error: ~azure.communication.identity.models.CommunicationError + :ivar error: Required. The Communication Services error. + :vartype error: ~azure.communication.identity.models.CommunicationError """ _validation = { @@ -86,6 +92,10 @@ def __init__( error: "CommunicationError", **kwargs ): + """ + :keyword error: Required. The Communication Services error. + :paramtype error: ~azure.communication.identity.models.CommunicationError + """ super(CommunicationErrorResponse, self).__init__(**kwargs) self.error = error @@ -95,8 +105,8 @@ class CommunicationIdentity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Identifier of the identity. - :type id: str + :ivar id: Required. Identifier of the identity. + :vartype id: str """ _validation = { @@ -113,6 +123,10 @@ def __init__( id: str, **kwargs ): + """ + :keyword id: Required. Identifier of the identity. + :paramtype id: str + """ super(CommunicationIdentity, self).__init__(**kwargs) self.id = id @@ -122,10 +136,10 @@ class CommunicationIdentityAccessToken(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param token: Required. The access token issued for the identity. - :type token: str - :param expires_on: Required. The expiry time of the token. - :type expires_on: ~datetime.datetime + :ivar token: Required. The access token issued for the identity. + :vartype token: str + :ivar expires_on: Required. The expiry time of the token. + :vartype expires_on: ~datetime.datetime """ _validation = { @@ -145,6 +159,12 @@ def __init__( expires_on: datetime.datetime, **kwargs ): + """ + :keyword token: Required. The access token issued for the identity. + :paramtype token: str + :keyword expires_on: Required. The expiry time of the token. + :paramtype expires_on: ~datetime.datetime + """ super(CommunicationIdentityAccessToken, self).__init__(**kwargs) self.token = token self.expires_on = expires_on @@ -155,8 +175,8 @@ class CommunicationIdentityAccessTokenRequest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param scopes: Required. List of scopes attached to the token. - :type scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] + :ivar scopes: Required. List of scopes attached to the token. + :vartype scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] """ _validation = { @@ -173,6 +193,10 @@ def __init__( scopes: List[Union[str, "CommunicationTokenScope"]], **kwargs ): + """ + :keyword scopes: Required. List of scopes attached to the token. + :paramtype scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] + """ super(CommunicationIdentityAccessTokenRequest, self).__init__(**kwargs) self.scopes = scopes @@ -182,10 +206,10 @@ class CommunicationIdentityAccessTokenResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param identity: Required. A communication identity. - :type identity: ~azure.communication.identity.models.CommunicationIdentity - :param access_token: An access token. - :type access_token: ~azure.communication.identity.models.CommunicationIdentityAccessToken + :ivar identity: Required. A communication identity. + :vartype identity: ~azure.communication.identity.models.CommunicationIdentity + :ivar access_token: An access token. + :vartype access_token: ~azure.communication.identity.models.CommunicationIdentityAccessToken """ _validation = { @@ -204,6 +228,12 @@ def __init__( access_token: Optional["CommunicationIdentityAccessToken"] = None, **kwargs ): + """ + :keyword identity: Required. A communication identity. + :paramtype identity: ~azure.communication.identity.models.CommunicationIdentity + :keyword access_token: An access token. + :paramtype access_token: ~azure.communication.identity.models.CommunicationIdentityAccessToken + """ super(CommunicationIdentityAccessTokenResult, self).__init__(**kwargs) self.identity = identity self.access_token = access_token @@ -212,8 +242,8 @@ def __init__( class CommunicationIdentityCreateRequest(msrest.serialization.Model): """CommunicationIdentityCreateRequest. - :param create_token_with_scopes: Also create access token for the created identity. - :type create_token_with_scopes: list[str or + :ivar create_token_with_scopes: Also create access token for the created identity. + :vartype create_token_with_scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] """ @@ -227,5 +257,43 @@ def __init__( create_token_with_scopes: Optional[List[Union[str, "CommunicationTokenScope"]]] = None, **kwargs ): + """ + :keyword create_token_with_scopes: Also create access token for the created identity. + :paramtype create_token_with_scopes: list[str or + ~azure.communication.identity.models.CommunicationTokenScope] + """ super(CommunicationIdentityCreateRequest, self).__init__(**kwargs) self.create_token_with_scopes = create_token_with_scopes + + +class TeamsUserAccessTokenRequest(msrest.serialization.Model): + """TeamsUserAccessTokenRequest. + + All required parameters must be populated in order to send to Azure. + + :ivar token: Required. AAD access token of a Teams User to acquire a new Communication Identity + access token. + :vartype token: str + """ + + _validation = { + 'token': {'required': True}, + } + + _attribute_map = { + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + *, + token: str, + **kwargs + ): + """ + :keyword token: Required. AAD access token of a Teams User to acquire a new Communication + Identity access token. + :paramtype token: str + """ + super(TeamsUserAccessTokenRequest, self).__init__(**kwargs) + self.token = token diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/operations/_communication_identity_operations.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/operations/_communication_identity_operations.py index 507b932cb689..e581615d9ebc 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/operations/_communication_identity_operations.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_generated/operations/_communication_identity_operations.py @@ -5,14 +5,19 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -21,6 +26,171 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_create_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/identities') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_delete_request( + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/identities/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_revoke_access_tokens_request( + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/identities/{id}/:revokeAccessTokens') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_exchange_teams_user_access_token_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/teamsUser/:exchangeAccessToken') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_issue_access_token_request( + id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/identities/{id}/:issueAccessToken') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class CommunicationIdentityOperations(object): """CommunicationIdentityOperations operations. @@ -43,18 +213,23 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def create( self, create_token_with_scopes=None, # type: Optional[List[Union[str, "_models.CommunicationTokenScope"]]] **kwargs # type: Any ): # type: (...) -> "_models.CommunicationIdentityAccessTokenResult" - """Create a new identity. + """Create a new identity, and optionally, an access token. - Create a new identity. + Create a new identity, and optionally, an access token. :param create_token_with_scopes: Also create access token for the created identity. - :type create_token_with_scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] + :type create_token_with_scopes: list[str or + ~azure.communication.identity.models.CommunicationTokenScope] + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CommunicationIdentityAccessTokenResult, or the result of cls(response) :rtype: ~azure.communication.identity.models.CommunicationIdentityAccessTokenResult @@ -66,40 +241,33 @@ def create( } error_map.update(kwargs.pop('error_map', {})) - _body = _models.CommunicationIdentityCreateRequest(create_token_with_scopes=create_token_with_scopes) - api_version = "2021-03-07" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.create.metadata['url'] # type: ignore + _body = _models.CommunicationIdentityCreateRequest(create_token_with_scopes=create_token_with_scopes) + if _body is not None: + json = self._serialize.body(_body, 'CommunicationIdentityCreateRequest') + else: + json = None + + request = build_create_request( + api_version=api_version, + content_type=content_type, + json=json, + template_url=self.create.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - if _body is not None: - body_content = self._serialize.body(_body, 'CommunicationIdentityCreateRequest') - else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('CommunicationIdentityAccessTokenResult', pipeline_response) @@ -108,8 +276,11 @@ def create( return cls(pipeline_response, deserialized, {}) return deserialized + create.metadata = {'url': '/identities'} # type: ignore + + @distributed_trace def delete( self, id, # type: str @@ -122,6 +293,9 @@ def delete( :param id: Identifier of the identity to be deleted. :type id: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -132,32 +306,27 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-07" - accept = "application/json" - # Construct URL - url = self.delete.metadata['url'] # type: ignore + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + + + request = build_delete_request( + id=id, + api_version=api_version, + template_url=self.delete.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'id': self._serialize.url("id", id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -165,6 +334,8 @@ def delete( delete.metadata = {'url': '/identities/{id}'} # type: ignore + + @distributed_trace def revoke_access_tokens( self, id, # type: str @@ -177,6 +348,9 @@ def revoke_access_tokens( :param id: Identifier of the identity. :type id: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -187,32 +361,27 @@ def revoke_access_tokens( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-07" - accept = "application/json" - # Construct URL - url = self.revoke_access_tokens.metadata['url'] # type: ignore + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + + + request = build_revoke_access_tokens_request( + id=id, + api_version=api_version, + template_url=self.revoke_access_tokens.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'id': self._serialize.url("id", id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -220,6 +389,74 @@ def revoke_access_tokens( revoke_access_tokens.metadata = {'url': '/identities/{id}/:revokeAccessTokens'} # type: ignore + + @distributed_trace + def exchange_teams_user_access_token( + self, + token, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CommunicationIdentityAccessToken" + """Exchange an AAD access token of a Teams user for a new Communication Identity access token with + a matching expiration time. + + Exchange an AAD access token of a Teams user for a new Communication Identity access token with + a matching expiration time. + + :param token: AAD access token of a Teams User to acquire a new Communication Identity access + token. + :type token: str + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommunicationIdentityAccessToken, or the result of cls(response) + :rtype: ~azure.communication.identity.models.CommunicationIdentityAccessToken + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommunicationIdentityAccessToken"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + _body = _models.TeamsUserAccessTokenRequest(token=token) + json = self._serialize.body(_body, 'TeamsUserAccessTokenRequest') + + request = build_exchange_teams_user_access_token_request( + api_version=api_version, + content_type=content_type, + json=json, + template_url=self.exchange_teams_user_access_token.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) + raise HttpResponseError(response=response, model=error) + + deserialized = self._deserialize('CommunicationIdentityAccessToken', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + exchange_teams_user_access_token.metadata = {'url': '/teamsUser/:exchangeAccessToken'} # type: ignore + + + @distributed_trace def issue_access_token( self, id, # type: str @@ -235,6 +472,9 @@ def issue_access_token( :type id: str :param scopes: List of scopes attached to the token. :type scopes: list[str or ~azure.communication.identity.models.CommunicationTokenScope] + :keyword api_version: Api Version. The default value is "2021-10-31-preview". Note that + overriding this default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: CommunicationIdentityAccessToken, or the result of cls(response) :rtype: ~azure.communication.identity.models.CommunicationIdentityAccessToken @@ -246,38 +486,31 @@ def issue_access_token( } error_map.update(kwargs.pop('error_map', {})) - _body = _models.CommunicationIdentityAccessTokenRequest(scopes=scopes) - api_version = "2021-03-07" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = kwargs.pop('api_version', "2021-10-31-preview") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.issue_access_token.metadata['url'] # type: ignore + _body = _models.CommunicationIdentityAccessTokenRequest(scopes=scopes) + json = self._serialize.body(_body, 'CommunicationIdentityAccessTokenRequest') + + request = build_issue_access_token_request( + id=id, + api_version=api_version, + content_type=content_type, + json=json, + template_url=self.issue_access_token.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'id': self._serialize.url("id", id, 'str'), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_body, 'CommunicationIdentityAccessTokenRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.CommunicationErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('CommunicationIdentityAccessToken', pipeline_response) @@ -286,4 +519,6 @@ def issue_access_token( return cls(pipeline_response, deserialized, {}) return deserialized + issue_access_token.metadata = {'url': '/identities/{id}/:issueAccessToken'} # type: ignore + diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_version.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_version.py index 7769c094291d..fac699b2663b 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_version.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_version.py @@ -4,6 +4,6 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "1.0.1" +VERSION = "1.1.0b2" SDK_MONIKER = "communication-identity/{}".format(VERSION) # type: str diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/aio/_communication_identity_client_async.py b/sdk/communication/azure-communication-identity/azure/communication/identity/aio/_communication_identity_client_async.py index cf43aa6d7934..eab3e188a8d4 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/aio/_communication_identity_client_async.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/aio/_communication_identity_client_async.py @@ -13,6 +13,7 @@ from .._shared.utils import parse_connection_str, get_authentication_policy from .._shared.models import CommunicationUserIdentifier from .._version import SDK_MONIKER +from .._api_versions import DEFAULT_VERSION if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential @@ -50,8 +51,10 @@ def __init__( "You need to provide account shared key to authenticate.") self._endpoint = endpoint + self._api_version = kwargs.pop("api_version", DEFAULT_VERSION) self._identity_service_client = CommunicationIdentityClientGen( self._endpoint, + api_version=self._api_version, authentication_policy=get_authentication_policy(endpoint, credential, decode_url=True, is_async=True), sdk_moniker=SDK_MONIKER, **kwargs) @@ -85,7 +88,9 @@ async def create_user(self, **kwargs) -> 'CommunicationUserIdentifier': :return: CommunicationUserIdentifier :rtype: ~azure.communication.identity.CommunicationUserIdentifier """ + api_version = kwargs.pop("api_version", self._api_version) return await self._identity_service_client.communication_identity.create( + api_version=api_version, cls=lambda pr, u, e: CommunicationUserIdentifier(u.identity.id, raw_id=u.identity.id), **kwargs) @@ -103,8 +108,10 @@ async def create_user_and_token( :rtype: tuple of (~azure.communication.identity.CommunicationUserIdentifier, ~azure.core.credentials.AccessToken) """ + api_version = kwargs.pop("api_version", self._api_version) return await self._identity_service_client.communication_identity.create( create_token_with_scopes=scopes, + api_version=api_version, cls=lambda pr, u, e: (CommunicationUserIdentifier(u.identity.id, raw_id=u.identity.id), AccessToken(u.access_token.token, u.access_token.expires_on)), **kwargs) @@ -123,8 +130,11 @@ async def delete_user( :return: None :rtype: None """ + api_version = kwargs.pop("api_version", self._api_version) await self._identity_service_client.communication_identity.delete( - user.properties['id'], **kwargs) + user.properties['id'], + api_version=api_version, + **kwargs) @distributed_trace_async async def get_token( @@ -143,9 +153,11 @@ async def get_token( :return: AccessToken :rtype: ~azure.core.credentials.AccessToken """ + api_version = kwargs.pop("api_version", self._api_version) return await self._identity_service_client.communication_identity.issue_access_token( user.properties['id'], scopes, + api_version=api_version, cls=lambda pr, u, e: AccessToken(u.token, u.expires_on), **kwargs) @@ -162,8 +174,31 @@ async def revoke_tokens( :return: None :rtype: None """ + api_version = kwargs.pop("api_version", self._api_version) return await self._identity_service_client.communication_identity.revoke_access_tokens( user.properties['id'] if user else None, + api_version=api_version, + **kwargs) + + @distributed_trace_async + async def get_token_for_teams_user( + self, + add_token, # type: str + **kwargs + ) -> AccessToken: + # type: (...) -> AccessToken + """Exchanges an AAD access token of a Teams User for a new Communication Identity access token. + + :param add_token: an AAD access token of a Teams User + :type add_token: str + :return: AccessToken + :rtype: ~azure.core.credentials.AccessToken + """ + api_version = kwargs.pop("api_version", self._api_version) + return await self._identity_service_client.communication_identity.exchange_teams_user_access_token( + token=add_token, + api_version=api_version, + cls=lambda pr, u, e: AccessToken(u.token, u.expires_on), **kwargs) async def __aenter__(self) -> "CommunicationIdentityClient": diff --git a/sdk/communication/azure-communication-identity/samples/identity_samples.py b/sdk/communication/azure-communication-identity/samples/identity_samples.py index 3d32d2a5a7c4..5a8106c663f4 100644 --- a/sdk/communication/azure-communication-identity/samples/identity_samples.py +++ b/sdk/communication/azure-communication-identity/samples/identity_samples.py @@ -14,14 +14,20 @@ USAGE: python identity_samples.py Set the environment variables with your own values before running the sample: - 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource + 1) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your Communication Services resource 2) AZURE_CLIENT_ID - the client ID of your active directory application 3) AZURE_CLIENT_SECRET - the secret of your active directory application 4) AZURE_TENANT_ID - the tenant ID of your active directory application + 5) COMMUNICATION_M365_APP_ID - the application id of M365 + 6) COMMUNICATION_M365_AAD_AUTHORITY - the AAD authority of M365 + 7) COMMUNICATION_M365_AAD_TENANT - the tenant ID of M365 application + 8) COMMUNICATION_M365_SCOPE - the scope of M365 application + 9) COMMUNICATION_MSAL_USERNAME - the username for authenticating via MSAL library + 10) COMMUNICATION_MSAL_PASSWORD - the password for authenticating via MSAL library """ import os from azure.communication.identity._shared.utils import parse_connection_str - +from msal import PublicClientApplication class CommunicationIdentityClientSamples(object): def __init__(self): @@ -29,6 +35,12 @@ def __init__(self): self.client_id = os.getenv('AZURE_CLIENT_ID') self.client_secret = os.getenv('AZURE_CLIENT_SECRET') self.tenant_id = os.getenv('AZURE_TENANT_ID') + self.m365_app_id = os.getenv('COMMUNICATION_M365_APP_ID') + self.m365_aad_authority = os.getenv('COMMUNICATION_M365_AAD_AUTHORITY') + self.m365_aad_tenant = os.getenv('COMMUNICATION_M365_AAD_TENANT') + self.m365_scope = os.getenv('COMMUNICATION_M365_SCOPE') + self.msal_username = os.getenv('COMMUNICATION_MSAL_USERNAME') + self.msal_password = os.getenv('COMMUNICATION_MSAL_PASSWORD') def get_token(self): from azure.communication.identity import ( @@ -108,10 +120,36 @@ def delete_user(self): identity_client.delete_user(user) print(user.properties.get('id') + " deleted") + def get_token_for_teams_user(self): + if (os.getenv("SKIP_INT_IDENTITY_EXCHANGE_TOKEN_TEST") == "true"): + print("Skipping the Get Access Token for Teams User sample") + return + from azure.communication.identity import CommunicationIdentityClient + + if self.client_id is not None and self.client_secret is not None and self.tenant_id is not None: + from azure.identity import DefaultAzureCredential + endpoint, _ = parse_connection_str(self.connection_string) + identity_client = CommunicationIdentityClient(endpoint, DefaultAzureCredential()) + else: + identity_client = CommunicationIdentityClient.from_connection_string(self.connection_string) + + msal_app = PublicClientApplication(client_id=self.m365_app_id, authority="{}/{}".format(self.m365_aad_authority, self.m365_aad_tenant)) + result = msal_app.acquire_token_by_username_password( + username=self.msal_username, + password=self.msal_password, + scopes=[self.m365_scope]) + add_token = result["access_token"] + print("AAD access token of a Teams User: " + add_token) + + tokenresponse = identity_client.get_token_for_teams_user(add_token) + print("Token issued with value: " + tokenresponse.token) + + if __name__ == '__main__': sample = CommunicationIdentityClientSamples() sample.create_user() sample.create_user_and_token() sample.get_token() sample.revoke_tokens() - sample.delete_user() + sample.delete_user() + sample.get_token_for_teams_user() diff --git a/sdk/communication/azure-communication-identity/samples/identity_samples_async.py b/sdk/communication/azure-communication-identity/samples/identity_samples_async.py index 6517137546be..b9769e6a33dd 100644 --- a/sdk/communication/azure-communication-identity/samples/identity_samples_async.py +++ b/sdk/communication/azure-communication-identity/samples/identity_samples_async.py @@ -15,12 +15,19 @@ python identity_samples_async.py Set the environment variables with your own values before running the sample: 1) AZURE_COMMUNICATION_SERVICE_ENDPOINT - Communication Service endpoint url - 2) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your ACS resource + 2) COMMUNICATION_SAMPLES_CONNECTION_STRING - the connection string in your Communication Services resource 3) AZURE_CLIENT_ID - the client ID of your active directory application 4) AZURE_CLIENT_SECRET - the secret of your active directory application 5) AZURE_TENANT_ID - the tenant ID of your active directory application + 6) COMMUNICATION_M365_APP_ID - the application id of M365 + 7) COMMUNICATION_M365_AAD_AUTHORITY - the AAD authority of M365 + 8) COMMUNICATION_M365_AAD_TENANT - the tenant ID of M365 application + 9) COMMUNICATION_M365_SCOPE - the scope of M365 application + 10) COMMUNICATION_MSAL_USERNAME - the username for authenticating via the MSAL library + 11) COMMUNICATION_MSAL_PASSWORD - the password for authenticating via the MSAL library """ from azure.communication.identity._shared.utils import parse_connection_str +from msal import PublicClientApplication import asyncio import os @@ -33,6 +40,12 @@ def __init__(self): self.client_id = os.getenv('AZURE_CLIENT_ID') self.client_secret = os.getenv('AZURE_CLIENT_SECRET') self.tenant_id = os.getenv('AZURE_TENANT_ID') + self.m365_app_id = os.getenv('COMMUNICATION_M365_APP_ID') + self.m365_aad_authority = os.getenv('COMMUNICATION_M365_AAD_AUTHORITY') + self.m365_aad_tenant = os.getenv('COMMUNICATION_M365_AAD_TENANT') + self.m365_scope = os.getenv('COMMUNICATION_M365_SCOPE') + self.msal_username = os.getenv('COMMUNICATION_MSAL_USERNAME') + self.msal_password = os.getenv('COMMUNICATION_MSAL_PASSWORD') async def get_token(self): from azure.communication.identity.aio import CommunicationIdentityClient @@ -112,6 +125,31 @@ async def delete_user(self): await identity_client.delete_user(user) print(user.properties.get('id') + " deleted") + async def get_token_for_teams_user(self): + if (os.getenv("SKIP_INT_IDENTITY_EXCHANGE_TOKEN_TEST") == "true"): + print("Skipping the Get Access Token for Teams User sample") + return + from azure.communication.identity.aio import CommunicationIdentityClient + if self.client_id is not None and self.client_secret is not None and self.tenant_id is not None: + from azure.identity.aio import DefaultAzureCredential + endpoint, _ = parse_connection_str(self.connection_string) + identity_client = CommunicationIdentityClient(endpoint, DefaultAzureCredential()) + else: + identity_client = CommunicationIdentityClient.from_connection_string(self.connection_string) + + async with identity_client: + msal_app = PublicClientApplication(client_id=self.m365_app_id, authority="{}/{}".format(self.m365_aad_authority, self.m365_aad_tenant)) + result = msal_app.acquire_token_by_username_password( + username=self.msal_username, + password=self.msal_password, + scopes=[self.m365_scope]) + add_token = result["access_token"] + print("AAD access token of a Teams User: " + add_token) + + print("AAD access token of a Teams User: " + add_token) + tokenresponse = await identity_client.get_token_for_teams_user(add_token) + print("Token issued with value: " + tokenresponse.token) + async def main(): sample = CommunicationIdentityClientSamples() await sample.create_user() @@ -119,6 +157,7 @@ async def main(): await sample.get_token() await sample.revoke_tokens() await sample.delete_user() + await sample.get_token_for_teams_user() if __name__ == '__main__': loop = asyncio.get_event_loop() diff --git a/sdk/communication/azure-communication-identity/setup.py b/sdk/communication/azure-communication-identity/setup.py index 1b3b7c63f38a..62ec5b6f2756 100644 --- a/sdk/communication/azure-communication-identity/setup.py +++ b/sdk/communication/azure-communication-identity/setup.py @@ -43,7 +43,7 @@ license='MIT License', # ensure that the development status reflects the status of your package classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", 'Programming Language :: Python', 'Programming Language :: Python :: 2', @@ -61,8 +61,8 @@ 'azure.communication' ]), install_requires=[ - 'msrest>=0.5.0', - 'azure-core<2.0.0,>=1.11.0' + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.19.1" ], extras_require={ ":python_version<'3.0'": ['azure-communication-nspkg'], diff --git a/sdk/communication/azure-communication-identity/swagger/SWAGGER.md b/sdk/communication/azure-communication-identity/swagger/SWAGGER.md index 1fe1434b0873..3be80a1e054a 100644 --- a/sdk/communication/azure-communication-identity/swagger/SWAGGER.md +++ b/sdk/communication/azure-communication-identity/swagger/SWAGGER.md @@ -15,8 +15,9 @@ autorest ./SWAGGER.md ### Settings ``` yaml -tag: package-2021-03-07 -require: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/896d05e37dbb00712726620b8d679cc3c3be09fb/specification/communication/data-plane/Identity/readme.md +tag: package-preview-2021-10 +require: + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/6f40b65610a4fad7a03f3fe8c57e8c0a9c3b77d0/specification/communication/data-plane/Identity/readme.md output-folder: ../azure/communication/identity/_generated/ namespace: azure.communication.identity license-header: MICROSOFT_MIT_NO_VERSION diff --git a/sdk/communication/azure-communication-identity/tests.yml b/sdk/communication/azure-communication-identity/tests.yml index 50e3afb089a3..72061d127ed8 100644 --- a/sdk/communication/azure-communication-identity/tests.yml +++ b/sdk/communication/azure-communication-identity/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-identity' JobName: identity ServiceDirectory: communication - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true CloudConfig: diff --git a/sdk/communication/azure-communication-identity/tests/_shared/testcase.py b/sdk/communication/azure-communication-identity/tests/_shared/testcase.py index bd1fbecc5750..1e200ec23015 100644 --- a/sdk/communication/azure-communication-identity/tests/_shared/testcase.py +++ b/sdk/communication/azure-communication-identity/tests/_shared/testcase.py @@ -8,7 +8,6 @@ from devtools_testutils import AzureTestCase from azure_devtools.scenario_tests import RecordingProcessor, ReplayableTest from azure_devtools.scenario_tests.utilities import is_text_payload - class ResponseReplacerProcessor(RecordingProcessor): def __init__(self, keys=None, replacement="sanitized"): self._keys = keys if keys else [] diff --git a/sdk/communication/azure-communication-identity/tests/asynctestcase.py b/sdk/communication/azure-communication-identity/tests/asynctestcase.py new file mode 100644 index 000000000000..31d2c2ab6c75 --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/asynctestcase.py @@ -0,0 +1,27 @@ + +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import functools +import asyncio +from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function +from testcase import CommunicationIdentityTestCase + +class AsyncCommunicationIdentityTestCase(CommunicationIdentityTestCase): + + @staticmethod + def await_prepared_test(test_fn): + """Synchronous wrapper for async test methods. Used to avoid making changes + upstream to AbstractPreparer (which doesn't await the functions it wraps) + """ + + @functools.wraps(test_fn) + def run(test_class_instance, *args, **kwargs): + trim_kwargs_from_test_function(test_fn, kwargs) + loop = asyncio.get_event_loop() + return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) + + return run diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user.yaml index 301b0204bd09..26e1893c3f2b 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user.yaml @@ -13,35 +13,36 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:41 GMT + - Tue, 02 Nov 2021 10:40:27 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:41 GMT + - Tue, 02 Nov 2021 10:40:28 GMT ms-cv: - - lHDY2orXNUaVroMvaXTo5Q.0 + - H/PLKiLB7kmyJ3XlaJ1NZw.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 67ms + - 89ms status: code: 201 message: Created diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_and_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_and_token.yaml index 774bc7a8bfd9..07e5dd7883de 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_and_token.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_and_token.yaml @@ -13,36 +13,37 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:41 GMT + - Tue, 02 Nov 2021 10:40:28 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", - "expiresOn": "2021-06-23T18:58:41.0416959+00:00"}}' + "expiresOn": "2021-11-03T10:40:29.6452865+00:00"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '920' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:41 GMT + - Tue, 02 Nov 2021 10:40:29 GMT ms-cv: - - l/CSdhjlCkqUxwXbhm0A0A.0 + - HfG5sjPWekiQ7NTyhtCjsg.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 44ms + - 174ms status: code: 201 message: Created diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_and_token_with_no_scopes.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_and_token_with_no_scopes.yaml index 41dce2b2b65a..735a9a67109f 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_and_token_with_no_scopes.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_and_token_with_no_scopes.yaml @@ -13,35 +13,36 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:42 GMT + - Tue, 02 Nov 2021 10:40:29 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:41 GMT + - Tue, 02 Nov 2021 10:40:29 GMT ms-cv: - - xw+PCHfIQk+b5c4uCZpjWQ.0 + - whpT+EGFS0OWxOMZZ59swg.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 66ms + - 86ms status: code: 201 message: Created diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_from_managed_identity.yaml index cdd55f49254c..b796961fffd6 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_create_user_from_managed_identity.yaml @@ -13,31 +13,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:43 GMT + - Tue, 02 Nov 2021 10:40:32 GMT ms-cv: - - rpnmbbC2M0Kyzkz98A1JdQ.0 + - B7oypuM0MEea/CGxJpmzCA.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 134ms + - 368ms status: code: 201 message: Created diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user.yaml index e68e914c5ed9..767feb04ba55 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user.yaml @@ -13,35 +13,36 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:44 GMT + - Tue, 02 Nov 2021 10:40:32 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:43 GMT + - Tue, 02 Nov 2021 10:40:32 GMT ms-cv: - - 9IzqC9YNm0uDNYm6RxtIYg.0 + - 6owWhOsmSU2DP0R8IYenGg.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 49ms + - 89ms status: code: 201 message: Created @@ -57,23 +58,24 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:44 GMT + - Tue, 02 Nov 2021 10:40:32 GMT x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-10-31-preview response: body: string: '' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview date: - - Tue, 22 Jun 2021 18:58:44 GMT + - Tue, 02 Nov 2021 10:40:33 GMT ms-cv: - - JTY7rdzhkUqYBDIPRq0VQQ.0 + - 6LIxLZ1KCk26P9dl3wFRcw.0 request-context: - appId= strict-transport-security: @@ -81,7 +83,7 @@ interactions: x-cache: - CONFIG_NOCACHE x-processing-time: - - 533ms + - 262ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user_from_managed_identity.yaml index a99163075e33..7271befd6ada 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_delete_user_from_managed_identity.yaml @@ -13,31 +13,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:45 GMT + - Tue, 02 Nov 2021 10:40:35 GMT ms-cv: - - Ug7Zn5/Gz0KQgz9N4Xhucg.0 + - KytpztUX9EGowqv1kDUK7A.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 184ms + - 220ms status: code: 201 message: Created @@ -53,19 +54,20 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: DELETE - uri: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-10-31-preview response: body: string: '' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview date: - - Tue, 22 Jun 2021 18:58:46 GMT + - Tue, 02 Nov 2021 10:40:35 GMT ms-cv: - - nilo/u16T0+MwV1DVmJmKA.0 + - Pm3aNiMlhEOlIbAYAD5Iag.0 request-context: - appId= strict-transport-security: @@ -73,7 +75,7 @@ interactions: x-cache: - CONFIG_NOCACHE x-processing-time: - - 602ms + - 293ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token.yaml index a039939d2bf0..dad21bcda13f 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token.yaml @@ -13,35 +13,36 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:46 GMT + - Tue, 02 Nov 2021 10:40:35 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:46 GMT + - Tue, 02 Nov 2021 10:40:36 GMT ms-cv: - - sQSar9r5TUOqqCxbdBHTyQ.0 + - MrRPDtwghk++UfVStS+bGw.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 64ms + - 95ms status: code: 201 message: Created @@ -59,35 +60,36 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:47 GMT + - Tue, 02 Nov 2021 10:40:36 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: - string: '{"token": "sanitized", "expiresOn": "2021-06-23T18:58:46.6953294+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-11-03T10:40:37.0202978+00:00"}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '804' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:47 GMT + - Tue, 02 Nov 2021 10:40:36 GMT ms-cv: - - /4RHszheLUCYJWaFYBC0Ew.0 + - oOd88gOi3EyaP3sdJ1+wgQ.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 139ms + - 99ms status: code: 200 message: OK diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_from_managed_identity.yaml new file mode 100644 index 000000000000..a4f6e6b57421 --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_from_managed_identity.yaml @@ -0,0 +1,95 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrGREuVomrELJFdkg3dc68PzQ4Qo31YBA_3WXP0sg0f8QVILrgPWKqhA06P-EayUNOcDngfVxv-q8z5y40PO-aU7qSnrqAOcym_kje-mRpj2pMGcg5YFzpuVeqwM0v81YQuDhiQgynEymwKz_FwZc5SSxDjew-POgKhApjJohMDA4gAA; + fpc=ArzbqUUFBP9IrlS3OitBi8s; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd + User-Agent: + - python-requests/2.26.0 + method: GET + uri: https://sanitized.microsoftonline.com/common/userrealm/SDKUser@acsauthtest.onmicrosoft.com?api-version=1.0 + response: + body: + string: '{"ver": "1.0", "account_type": "Managed", "domain_name": "acsauthtest.onmicrosoft.com", + "cloud_instance_name": "microsoftonline.com", "cloud_audience_urn": "urn:federation:MicrosoftOnline"}' + headers: + cache-control: + - no-store, no-cache + content-disposition: + - inline; filename=userrealm.json + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 02 Nov 2021 10:40:37 GMT + expires: + - '-1' + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + pragma: + - no-cache + set-cookie: + - fpc=ArzbqUUFBP9IrlS3OitBi8s; expires=Thu, 02-Dec-2021 10:40:37 GMT; path=/; + secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.12171.14 - NEULR1 ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2079' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"token": "sanitized", "expiresOn": "2021-11-02T11:40:36.6069927+00:00"}' + headers: + api-supported-versions: + - 2021-03-31-preview1, 2021-10-31-preview + content-length: + - '818' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 02 Nov 2021 10:40:38 GMT + ms-cv: + - AhjhEDpRCE2X8TkqOknigA.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 414ms + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_empty_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_empty_token.yaml new file mode 100644 index 000000000000..dfd88cb121cc --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_empty_token.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '13' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + x-ms-date: + - Tue, 02 Nov 2021 10:40:38 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"error": {"code": "InvalidAccessToken", "message": "Provided access + token is not valid."}}' + headers: + content-type: + - application/json + date: + - Tue, 02 Nov 2021 10:40:38 GMT + ms-cv: + - 5iAMqEFZukK9yfibYWU0iA.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 42ms + status: + code: 401 + message: Unauthorized +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_expired_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_expired_token.yaml new file mode 100644 index 000000000000..cb281207b737 --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_expired_token.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2015' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + x-ms-date: + - Tue, 02 Nov 2021 10:40:39 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"error": {"code": "InvalidAccessToken", "message": "Provided access + token is not valid."}}' + headers: + content-type: + - application/json + date: + - Tue, 02 Nov 2021 10:40:39 GMT + ms-cv: + - 1bZf2jh/g0SLs1VZZKD9UQ.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 254ms + status: + code: 401 + message: Unauthorized +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_invalid_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_invalid_token.yaml new file mode 100644 index 000000000000..cc5664dfae09 --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_invalid_token.yaml @@ -0,0 +1,47 @@ +interactions: +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '20' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + x-ms-date: + - Tue, 02 Nov 2021 10:40:40 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"error": {"code": "InvalidAccessToken", "message": "Provided access + token is not valid."}}' + headers: + content-type: + - application/json + date: + - Tue, 02 Nov 2021 10:40:40 GMT + ms-cv: + - 4zZNEB2wj0Kae+4AmQ6u5Q.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + transfer-encoding: + - chunked + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 19ms + status: + code: 401 + message: Unauthorized +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_valid_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_valid_token.yaml new file mode 100644 index 000000000000..16633bd2699a --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_for_teams_user_with_valid_token.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrsTYhpuLPncLzgE2N3CF_fO9CWbc6cq_SRrW1NsbfPHS89Bs2mhXbay7nvhJtxRfvNt56AmnWAZle2NTaCRe97jb9lu6yUntTHrzTas_iTGFDzSCw-vvHZ64m36O3xHo32WIz_K041hjPgQqlhABsHv2VuJ2Delc0lAeL0NrkJp4gAA; + fpc=AiNv3mAB4dNFrUS7SUW3hYg; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd + User-Agent: + - python-requests/2.26.0 + method: GET + uri: https://sanitized.microsoftonline.com/common/userrealm/SDKUser@acsauthtest.onmicrosoft.com?api-version=1.0 + response: + body: + string: '{"ver": "1.0", "account_type": "Managed", "domain_name": "acsauthtest.onmicrosoft.com", + "cloud_instance_name": "microsoftonline.com", "cloud_audience_urn": "urn:federation:MicrosoftOnline"}' + headers: + cache-control: + - no-store, no-cache + content-disposition: + - inline; filename=userrealm.json + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 02 Nov 2021 10:40:39 GMT + expires: + - '-1' + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + pragma: + - no-cache + set-cookie: + - fpc=AiNv3mAB4dNFrUS7SUW3hYg; expires=Thu, 02-Dec-2021 10:40:40 GMT; path=/; + secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.12171.14 - NEULR2 ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2057' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + x-ms-date: + - Tue, 02 Nov 2021 10:40:40 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"token": "sanitized", "expiresOn": "2021-11-02T11:40:39.5722374+00:00"}' + headers: + api-supported-versions: + - 2021-03-31-preview1, 2021-10-31-preview + content-length: + - '818' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 02 Nov 2021 10:40:40 GMT + ms-cv: + - vzhIMlW19U+dH0WVYSr0tg.0 + request-context: + - appId= + strict-transport-security: + - max-age=2592000 + x-cache: + - CONFIG_NOCACHE + x-processing-time: + - 474ms + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_from_managed_identity.yaml index 593290083c18..80af080c5248 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_from_managed_identity.yaml @@ -13,31 +13,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:47 GMT + - Tue, 02 Nov 2021 10:40:42 GMT ms-cv: - - hVvyYX9XxU6zWOPqQNGexQ.0 + - J9YYFe2y/EOrWAumqWJYuQ.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 120ms + - 222ms status: code: 201 message: Created @@ -55,31 +56,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: - string: '{"token": "sanitized", "expiresOn": "2021-06-23T18:58:47.9669834+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-11-03T10:40:43.3668014+00:00"}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '804' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:48 GMT + - Tue, 02 Nov 2021 10:40:43 GMT ms-cv: - - ScBH9C6lcUKVpuK/HgdNag.0 + - HIIQElt9h02GBdaavUKLyw.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 132ms + - 94ms status: code: 200 message: OK diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_with_no_scopes.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_with_no_scopes.yaml index 9701e68cbebb..be021c18280c 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_with_no_scopes.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_get_token_with_no_scopes.yaml @@ -13,35 +13,36 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:49 GMT + - Tue, 02 Nov 2021 10:40:43 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:48 GMT + - Tue, 02 Nov 2021 10:40:43 GMT ms-cv: - - vamc7sfwiEqgDSToVw/p6w.0 + - rUJSzk6u6EqS96z3Ajiutg.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 66ms + - 83ms status: code: 201 message: Created @@ -59,13 +60,13 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:49 GMT + - Tue, 02 Nov 2021 10:40:43 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: string: '{"error": {"code": "ValidationError", "message": "Scopes: The Scopes @@ -74,9 +75,9 @@ interactions: content-type: - application/json date: - - Tue, 22 Jun 2021 18:58:48 GMT + - Tue, 02 Nov 2021 10:40:43 GMT ms-cv: - - JsKQZ1aVqEqESmmKxCb9Jw.0 + - vF7qWpcumUubWOtGTiWTrA.0 request-context: - appId= strict-transport-security: @@ -86,7 +87,7 @@ interactions: x-cache: - CONFIG_NOCACHE x-processing-time: - - 15ms + - 19ms status: code: 400 message: Bad Request diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens.yaml index 99816cd053cd..34c8ca2cfd76 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens.yaml @@ -13,35 +13,36 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:49 GMT + - Tue, 02 Nov 2021 10:40:43 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:49 GMT + - Tue, 02 Nov 2021 10:40:44 GMT ms-cv: - - FJHzH2TvD0e12lVcXgSuyA.0 + - 8jA6O7iSlUqrWOe9nDaLTQ.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 63ms + - 118ms status: code: 201 message: Created @@ -59,35 +60,36 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:50 GMT + - Tue, 02 Nov 2021 10:40:44 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: - string: '{"token": "sanitized", "expiresOn": "2021-06-23T18:58:49.3439607+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-11-03T10:40:45.2206592+00:00"}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '804' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:49 GMT + - Tue, 02 Nov 2021 10:40:45 GMT ms-cv: - - DKf8LhNaDUOZXXKAxbPF0A.0 + - JO6cXGW4t0iiNu9I1vU7jA.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 136ms + - 99ms status: code: 200 message: OK @@ -103,23 +105,24 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:50 GMT + - Tue, 02 Nov 2021 10:40:45 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview response: body: string: '' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview date: - - Tue, 22 Jun 2021 18:58:49 GMT + - Tue, 02 Nov 2021 10:40:45 GMT ms-cv: - - kE8W5L1ywUyHQ8Ti27FqDw.0 + - g3nTgikhR0KPs3uzuRcNXA.0 request-context: - appId= strict-transport-security: @@ -127,7 +130,7 @@ interactions: x-cache: - CONFIG_NOCACHE x-processing-time: - - 118ms + - 172ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens_from_managed_identity.yaml index 4bf4ec120fbd..1640feacb3ad 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client.test_revoke_tokens_from_managed_identity.yaml @@ -13,31 +13,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '101' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:51 GMT + - Tue, 02 Nov 2021 10:40:46 GMT ms-cv: - - /v3eXw+ynEmrXJx7SCxnZg.0 + - qiZXXv4wjkqLbvpZvt2Fww.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 61ms + - 213ms status: code: 201 message: Created @@ -55,31 +56,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: - string: '{"token": "sanitized", "expiresOn": "2021-06-23T18:58:50.9078351+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-11-03T10:40:47.191553+00:00"}' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview + content-length: + - '803' content-type: - application/json; charset=utf-8 date: - - Tue, 22 Jun 2021 18:58:51 GMT + - Tue, 02 Nov 2021 10:40:46 GMT ms-cv: - - BHvQo/WPQUqrZL9kU873EA.0 + - xKqNRDzKFkeudG+rjTt6+A.0 request-context: - appId= strict-transport-security: - max-age=2592000 - transfer-encoding: - - chunked x-cache: - CONFIG_NOCACHE x-processing-time: - - 136ms + - 92ms status: code: 200 message: OK @@ -95,19 +97,20 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview response: body: string: '' headers: api-supported-versions: - - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1 + - 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, 2021-03-31-preview1, + 2021-10-31-preview date: - - Tue, 22 Jun 2021 18:58:51 GMT + - Tue, 02 Nov 2021 10:40:47 GMT ms-cv: - - w2m7hOe0Z06KH0UWpOZgFw.0 + - MS0M3UzBsUevmA8xE4Cofw.0 request-context: - appId= strict-transport-security: @@ -115,7 +118,7 @@ interactions: x-cache: - CONFIG_NOCACHE x-processing-time: - - 157ms + - 153ms status: code: 204 message: No Content diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user.yaml index 5c08470130ad..2d550e535d85 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user.yaml @@ -9,29 +9,29 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:52 GMT + - Tue, 02 Nov 2021 10:40:47 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:52 GMT - ms-cv: 8b6Yfs+VdEKtQYXxtcyTrQ.0 + date: Tue, 02 Nov 2021 10:40:48 GMT + ms-cv: QqsOi8XfcEiNcjpQeyd5qg.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 61ms + x-processing-time: 105ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_and_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_and_token.yaml index 7e280b547b9b..8ed5d3e16398 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_and_token.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_and_token.yaml @@ -9,30 +9,30 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:52 GMT + - Tue, 02 Nov 2021 10:40:48 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}, "accessToken": {"token": "sanitized", - "expiresOn": "2021-06-23T18:58:52.2693039+00:00"}}' + "expiresOn": "2021-11-03T10:40:49.5297855+00:00"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '920' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:52 GMT - ms-cv: XTjYc9kgYUu7zZ6B8Rdsgg.0 + date: Tue, 02 Nov 2021 10:40:49 GMT + ms-cv: r7xO+pn36UecYwA9ibBrCA.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 220ms + x-processing-time: 166ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_and_token_with_no_scopes.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_and_token_with_no_scopes.yaml index 6f6f74d0c129..cc20979cd96d 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_and_token_with_no_scopes.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_and_token_with_no_scopes.yaml @@ -9,29 +9,29 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:53 GMT + - Tue, 02 Nov 2021 10:40:49 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:53 GMT - ms-cv: daAADl1wzkCrA1udPhvONg.0 + date: Tue, 02 Nov 2021 10:40:49 GMT + ms-cv: n/9A2+YMj0Gs8+WZYI3XNQ.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 60ms + x-processing-time: 92ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_from_managed_identity.yaml index 747ada8532a1..2bbd5d897af6 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_create_user_from_managed_identity.yaml @@ -9,25 +9,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:53 GMT - ms-cv: blzFPJXQKECRzon4Dt1t+g.0 + date: Tue, 02 Nov 2021 10:40:51 GMT + ms-cv: J7wrMsjN+kaBq7NnXn5p/Q.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 29ms + x-processing-time: 230ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user.yaml index b4ddf3559e35..e2d241b08b66 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user.yaml @@ -9,58 +9,58 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:54 GMT + - Tue, 02 Nov 2021 10:40:51 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:53 GMT - ms-cv: srpqeGImaU+bWruVBTOEgQ.0 + date: Tue, 02 Nov 2021 10:40:51 GMT + ms-cv: /rC8mQmj00GAjw3YF2UUgg.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 64ms + x-processing-time: 88ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview - request: body: '' headers: Accept: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:54 GMT + - Tue, 02 Nov 2021 10:40:52 GMT x-ms-return-client-request-id: - 'true' method: DELETE - uri: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-10-31-preview response: body: string: '' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 - date: Tue, 22 Jun 2021 18:58:54 GMT - ms-cv: Tnse04fTa0653orPnAB3SA.0 + 2021-03-31-preview1, 2021-10-31-preview + date: Tue, 02 Nov 2021 10:40:52 GMT + ms-cv: tzZfh9krDkGnVQoRnPWpPQ.0 request-context: appId= strict-transport-security: max-age=2592000 x-cache: CONFIG_NOCACHE - x-processing-time: 570ms + x-processing-time: 230ms status: code: 204 message: No Content - url: https://smstestapp.communication.azure.com/identities/sanitized?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user_from_managed_identity.yaml index 1087400e1b79..d9d27acfd1b3 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_delete_user_from_managed_identity.yaml @@ -9,50 +9,50 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:55 GMT - ms-cv: P20kvw1g/k62AibiEW0m0w.0 + date: Tue, 02 Nov 2021 10:40:53 GMT + ms-cv: jBZxVWuiI0ytr5WrXsf4zg.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 213ms + x-processing-time: 92ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: DELETE - uri: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-10-31-preview response: body: string: '' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 - date: Tue, 22 Jun 2021 18:58:56 GMT - ms-cv: PUdu1M8QkkeuAL9M7ArAGg.0 + 2021-03-31-preview1, 2021-10-31-preview + date: Tue, 02 Nov 2021 10:40:53 GMT + ms-cv: 1seexUgPJUaQFsLh+CFRGA.0 request-context: appId= strict-transport-security: max-age=2592000 x-cache: CONFIG_NOCACHE - x-processing-time: 741ms + x-processing-time: 210ms status: code: 204 message: No Content - url: https://smstestapp.communication.azure.com/identities/sanitized?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities/sanitized?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token.yaml index 9a2b042db410..829575392ef7 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token.yaml @@ -9,31 +9,31 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:57 GMT + - Tue, 02 Nov 2021 10:40:54 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:56 GMT - ms-cv: JeNejveUHE6tLkBFbxCwnA.0 + date: Tue, 02 Nov 2021 10:40:53 GMT + ms-cv: OKI1rtihAkS4xG1shAYMuA.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 32ms + x-processing-time: 92ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview - request: body: '{"scopes": ["chat"]}' headers: @@ -44,29 +44,29 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:57 GMT + - Tue, 02 Nov 2021 10:40:54 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: - string: '{"token": "sanitized", "expiresOn": "2021-06-23T18:58:56.6293051+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-11-03T10:40:54.8354555+00:00"}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '804' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:56 GMT - ms-cv: ypTGR8db/0ONDQgCgRMc7A.0 + date: Tue, 02 Nov 2021 10:40:54 GMT + ms-cv: JBdQE6ZdDEaJL64hs4cwmg.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 41ms + x-processing-time: 98ms status: code: 200 message: OK - url: https://smstestapp.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_from_managed_identity.yaml new file mode 100644 index 000000000000..1e033c58a8d9 --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_from_managed_identity.yaml @@ -0,0 +1,83 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7WevrjYbd8G8MLd29SURYj6Nn30M8xCPPUcUVXpJICHBjb3KiZfvUZtynHinoOx1WDiCimv5rnWb5aluZly3d7f5Da8sc6DMi2OEAKGsOh5t_KIIkI4p4OklARZn-1e8PavgNb3T4FrLc2A5BnGLhQSkdgP5LqDz7Pp2WfYCulECfWP8gAA; + fpc=AiKB7Lzp9jdEnWnATXCqmno; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd + User-Agent: + - python-requests/2.26.0 + method: GET + uri: https://sanitized.microsoftonline.com/common/userrealm/SDKUser@acsauthtest.onmicrosoft.com?api-version=1.0 + response: + body: + string: '{"ver": "1.0", "account_type": "Managed", "domain_name": "acsauthtest.onmicrosoft.com", + "cloud_instance_name": "microsoftonline.com", "cloud_audience_urn": "urn:federation:MicrosoftOnline"}' + headers: + cache-control: + - no-store, no-cache + content-disposition: + - inline; filename=userrealm.json + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 02 Nov 2021 10:40:54 GMT + expires: + - '-1' + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + pragma: + - no-cache + set-cookie: + - fpc=AiKB7Lzp9jdEnWnATXCqmno; expires=Thu, 02-Dec-2021 10:40:55 GMT; path=/; + secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.12171.14 - WEULR1 ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Content-Length: + - '2057' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"token": "sanitized", "expiresOn": "2021-11-02T11:40:54.5598223+00:00"}' + headers: + api-supported-versions: 2021-03-31-preview1, 2021-10-31-preview + content-length: '818' + content-type: application/json; charset=utf-8 + date: Tue, 02 Nov 2021 10:40:56 GMT + ms-cv: V2lv1AoJTkWyGY5ruQtUEg.0 + request-context: appId= + strict-transport-security: max-age=2592000 + x-cache: CONFIG_NOCACHE + x-processing-time: 392ms + status: + code: 200 + message: OK + url: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_empty_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_empty_token.yaml new file mode 100644 index 000000000000..619805086667 --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_empty_token.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Content-Length: + - '13' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + x-ms-date: + - Tue, 02 Nov 2021 10:40:56 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"error": {"code": "InvalidAccessToken", "message": "Provided access + token is not valid."}}' + headers: + content-type: application/json + date: Tue, 02 Nov 2021 10:40:57 GMT + ms-cv: uX5CAS+djk+impDeYIlHvw.0 + request-context: appId= + strict-transport-security: max-age=2592000 + transfer-encoding: chunked + x-cache: CONFIG_NOCACHE + x-processing-time: 24ms + status: + code: 401 + message: Unauthorized + url: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_expired_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_expired_token.yaml new file mode 100644 index 000000000000..aa1e9336a1a4 --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_expired_token.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Content-Length: + - '2015' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + x-ms-date: + - Tue, 02 Nov 2021 10:40:57 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"error": {"code": "InvalidAccessToken", "message": "Provided access + token is not valid."}}' + headers: + content-type: application/json + date: Tue, 02 Nov 2021 10:40:57 GMT + ms-cv: BhG7fhdGk067EPrsAZvxhQ.0 + request-context: appId= + strict-transport-security: max-age=2592000 + transfer-encoding: chunked + x-cache: CONFIG_NOCACHE + x-processing-time: 37ms + status: + code: 401 + message: Unauthorized + url: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_invalid_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_invalid_token.yaml new file mode 100644 index 000000000000..af0d880b141a --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_invalid_token.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Content-Length: + - '20' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + x-ms-date: + - Tue, 02 Nov 2021 10:40:57 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"error": {"code": "InvalidAccessToken", "message": "Provided access + token is not valid."}}' + headers: + content-type: application/json + date: Tue, 02 Nov 2021 10:40:57 GMT + ms-cv: mjFpU2FWNUG9c+wFF7SBMA.0 + request-context: appId= + strict-transport-security: max-age=2592000 + transfer-encoding: chunked + x-cache: CONFIG_NOCACHE + x-processing-time: 20ms + status: + code: 401 + message: Unauthorized + url: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_valid_token.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_valid_token.yaml new file mode 100644 index 000000000000..69026b1d365c --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_for_teams_user_with_valid_token.yaml @@ -0,0 +1,87 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Cookie: + - esctx=AQABAAAAAAD--DLA3VO7QrddgJg7Wevro3azVHuzUBPhDBY7IJUKbG_n3WhcZFI5x0nzc_p3jk7UymmYtwmd4tHrrGVk6SsCovqs70m2j5Bdfuz5UEAWs1bqgJsWGI05OubqJWEA9zYRuX0n74iJZvZnOInpyrPi391sjuUX9B8L7EVKY8RvJhjr27yHQBbCpAlRBy_y-YwgAA; + fpc=Ahbe3agMvNdCgYNXdIEs9VY; stsservicecookie=estsfd; x-ms-gateway-slice=estsfd + User-Agent: + - python-requests/2.26.0 + method: GET + uri: https://sanitized.microsoftonline.com/common/userrealm/SDKUser@acsauthtest.onmicrosoft.com?api-version=1.0 + response: + body: + string: '{"ver": "1.0", "account_type": "Managed", "domain_name": "acsauthtest.onmicrosoft.com", + "cloud_instance_name": "microsoftonline.com", "cloud_audience_urn": "urn:federation:MicrosoftOnline"}' + headers: + cache-control: + - no-store, no-cache + content-disposition: + - inline; filename=userrealm.json + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 02 Nov 2021 10:40:58 GMT + expires: + - '-1' + p3p: + - CP="DSP CUR OTPi IND OTRi ONL FIN" + pragma: + - no-cache + set-cookie: + - fpc=Ahbe3agMvNdCgYNXdIEs9VY; expires=Thu, 02-Dec-2021 10:40:58 GMT; path=/; + secure; HttpOnly; SameSite=None + - x-ms-gateway-slice=estsfd; path=/; secure; samesite=none; httponly + - stsservicecookie=estsfd; path=/; secure; samesite=none; httponly + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ests-server: + - 2.1.12171.14 - WEULR2 ProdSlices + status: + code: 200 + message: OK +- request: + body: '{"token": "sanitized"}' + headers: + Accept: + - application/json + Content-Length: + - '2057' + Content-Type: + - application/json + User-Agent: + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) + x-ms-date: + - Tue, 02 Nov 2021 10:40:58 GMT + x-ms-return-client-request-id: + - 'true' + method: POST + uri: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview + response: + body: + string: '{"token": "sanitized", "expiresOn": "2021-11-02T11:40:57.7623783+00:00"}' + headers: + api-supported-versions: 2021-03-31-preview1, 2021-10-31-preview + content-length: '818' + content-type: application/json; charset=utf-8 + date: Tue, 02 Nov 2021 10:40:59 GMT + ms-cv: JJq2c2FQM0y9oDHrhWe87g.0 + request-context: appId= + strict-transport-security: max-age=2592000 + x-cache: CONFIG_NOCACHE + x-processing-time: 814ms + status: + code: 200 + message: OK + url: https://sanitized.communication.azure.com/teamsUser/:exchangeAccessToken?api-version=2021-10-31-preview +version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_from_managed_identity.yaml index 13aee8398063..302884f3f7f7 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_from_managed_identity.yaml @@ -9,27 +9,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:58 GMT - ms-cv: 7oopmmtvjkWXfajCRFqUKQ.0 + date: Tue, 02 Nov 2021 10:41:00 GMT + ms-cv: 6I2p8BShxkeMU0D7YsrZ7A.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 156ms + x-processing-time: 101ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview - request: body: '{"scopes": ["chat"]}' headers: @@ -40,25 +40,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: - string: '{"token": "sanitized", "expiresOn": "2021-06-23T18:58:57.8544274+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-11-03T10:41:01.5146322+00:00"}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '804' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:58 GMT - ms-cv: RbLsOw6sfUauQ7hxmcs76w.0 + date: Tue, 02 Nov 2021 10:41:01 GMT + ms-cv: jo9bAJ5r/0qk55kdGkjbeg.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 155ms + x-processing-time: 105ms status: code: 200 message: OK - url: https://smstestapp.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_with_no_scopes.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_with_no_scopes.yaml index 9069d24f085a..9906a82cd45e 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_with_no_scopes.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_get_token_with_no_scopes.yaml @@ -9,31 +9,31 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:58 GMT + - Tue, 02 Nov 2021 10:41:01 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:58 GMT - ms-cv: PI32xduU1kufD7wpUg8OzQ.0 + date: Tue, 02 Nov 2021 10:41:02 GMT + ms-cv: cWq73Md+S0KeJPPfXUyFaw.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 32ms + x-processing-time: 101ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview - request: body: '{}' headers: @@ -44,28 +44,28 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:59 GMT + - Tue, 02 Nov 2021 10:41:02 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: string: '{"error": {"code": "ValidationError", "message": "Scopes: The Scopes field is required.", "target": "Scopes"}}' headers: content-type: application/json - date: Tue, 22 Jun 2021 18:58:58 GMT - ms-cv: IivNGo5Jgk+G+i/KIsh3KQ.0 + date: Tue, 02 Nov 2021 10:41:02 GMT + ms-cv: xwtS1CtvGUW/DZC29U8UtQ.0 request-context: appId= strict-transport-security: max-age=2592000 transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 38ms + x-processing-time: 16ms status: code: 400 message: Bad Request - url: https://smstestapp.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens.yaml index 0adbd6067d92..6240fa48d4fc 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens.yaml @@ -9,31 +9,31 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:59 GMT + - Tue, 02 Nov 2021 10:41:02 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:58 GMT - ms-cv: mJmgM9zu2kGn0sD7GWAPeQ.0 + date: Tue, 02 Nov 2021 10:41:02 GMT + ms-cv: /yM08I6vWkChXBVb9vO0vQ.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 59ms + x-processing-time: 92ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview - request: body: '{"scopes": ["chat"]}' headers: @@ -44,58 +44,58 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:59 GMT + - Tue, 02 Nov 2021 10:41:02 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: - string: '{"token": "sanitized", "expiresOn": "2021-06-23T18:58:58.4494428+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-11-03T10:41:03.1811216+00:00"}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '804' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:58 GMT - ms-cv: EyrkOFV4gEayIxQQzsv/Xw.0 + date: Tue, 02 Nov 2021 10:41:02 GMT + ms-cv: 9BSiTIlkn0i7JMLLHABi3g.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 35ms + x-processing-time: 101ms status: code: 200 message: OK - url: https://smstestapp.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview - request: body: '' headers: Accept: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) x-ms-date: - - Tue, 22 Jun 2021 18:58:59 GMT + - Tue, 02 Nov 2021 10:41:03 GMT x-ms-return-client-request-id: - 'true' method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview response: body: string: '' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 - date: Tue, 22 Jun 2021 18:58:58 GMT - ms-cv: TOQFHBkQpkqIRdzCAbyiNw.0 + 2021-03-31-preview1, 2021-10-31-preview + date: Tue, 02 Nov 2021 10:41:02 GMT + ms-cv: BVFAGl0soU6x5flcysdwFA.0 request-context: appId= strict-transport-security: max-age=2592000 x-cache: CONFIG_NOCACHE - x-processing-time: 97ms + x-processing-time: 160ms status: code: 204 message: No Content - url: https://smstestapp.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens_from_managed_identity.yaml b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens_from_managed_identity.yaml index 004a75ea1975..fce0672bb362 100644 --- a/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens_from_managed_identity.yaml +++ b/sdk/communication/azure-communication-identity/tests/recordings/test_communication_identity_client_async.test_revoke_tokens_from_managed_identity.yaml @@ -9,27 +9,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview response: body: string: '{"identity": {"id": "sanitized"}}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '101' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:58:59 GMT - ms-cv: xMC3NdE8+UOt9+GxzhhPdA.0 + date: Tue, 02 Nov 2021 10:41:03 GMT + ms-cv: P9Sst7ZAiEeCwkFkH5U2dw.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 63ms + x-processing-time: 82ms status: code: 201 message: Created - url: https://smstestapp.communication.azure.com/identities?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities?api-version=2021-10-31-preview - request: body: '{"scopes": ["chat"]}' headers: @@ -40,50 +40,50 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview response: body: - string: '{"token": "sanitized", "expiresOn": "2021-06-23T18:58:59.4525188+00:00"}' + string: '{"token": "sanitized", "expiresOn": "2021-11-03T10:41:04.3712655+00:00"}' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 + 2021-03-31-preview1, 2021-10-31-preview + content-length: '804' content-type: application/json; charset=utf-8 - date: Tue, 22 Jun 2021 18:59:00 GMT - ms-cv: WQwpvECVnEOtmsOqTfyibQ.0 + date: Tue, 02 Nov 2021 10:41:04 GMT + ms-cv: vMIr1SSaCkm/lJ4DRswpNQ.0 request-context: appId= strict-transport-security: max-age=2592000 - transfer-encoding: chunked x-cache: CONFIG_NOCACHE - x-processing-time: 138ms + x-processing-time: 91ms status: code: 200 message: OK - url: https://smstestapp.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities/sanitized/:issueAccessToken?api-version=2021-10-31-preview - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-communication-identity/1.0.1 Python/3.8.6rc1 (Windows-10-10.0.19041-SP0) + - azsdk-python-communication-identity/1.1.0b1 Python/3.9.7 (macOS-11.6-x86_64-i386-64bit) method: POST - uri: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 + uri: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview response: body: string: '' headers: api-supported-versions: 2020-07-20-preview2, 2021-02-22-preview1, 2021-03-07, - 2021-03-31-preview1 - date: Tue, 22 Jun 2021 18:59:00 GMT - ms-cv: J1LfEe6dv0KsmrtnfoiCJA.0 + 2021-03-31-preview1, 2021-10-31-preview + date: Tue, 02 Nov 2021 10:41:04 GMT + ms-cv: XsuDN3XNk0Crwg1Pfny4Qg.0 request-context: appId= strict-transport-security: max-age=2592000 x-cache: CONFIG_NOCACHE - x-processing-time: 129ms + x-processing-time: 153ms status: code: 204 message: No Content - url: https://smstestapp.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-03-07 + url: https://sanitized.communication.azure.com/identities/sanitized/:revokeAccessTokens?api-version=2021-10-31-preview version: 1 diff --git a/sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py b/sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py index d1df7304fbf3..a88aee6e5b35 100644 --- a/sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py +++ b/sdk/communication/azure-communication-identity/tests/test_communication_identity_client.py @@ -10,10 +10,8 @@ from azure.communication.identity import CommunicationTokenScope from azure.core.credentials import AccessToken from _shared.helper import URIIdentityReplacer -from _shared.testcase import ( - CommunicationTestCase, - BodyReplacerProcessor -) +from _shared.testcase import BodyReplacerProcessor +from testcase import CommunicationIdentityTestCase from _shared.communication_service_preparer import CommunicationPreparer from _shared.utils import get_http_logging_policy from azure.identity import DefaultAzureCredential @@ -26,7 +24,7 @@ def __init__(self): def get_token(self, *args): return self.token -class CommunicationIdentityClientTest(CommunicationTestCase): +class CommunicationIdentityClientTest(CommunicationIdentityTestCase): def setUp(self): super(CommunicationIdentityClientTest, self).setUp() self.recording_processors.extend([ @@ -218,3 +216,77 @@ def test_get_token_with_no_scopes(self, communication_livetest_dynamic_connectio with pytest.raises(Exception) as ex: token_response = identity_client.get_token(user, scopes=None) + + + @CommunicationPreparer() + def test_get_token_for_teams_user_from_managed_identity(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + endpoint, access_key = parse_connection_str(communication_livetest_dynamic_connection_string) + from devtools_testutils import is_live + if not is_live(): + credential = FakeTokenCredential() + else: + credential = DefaultAzureCredential() + identity_client = CommunicationIdentityClient( + endpoint, + credential, + http_logging_policy=get_http_logging_policy() + ) + add_token = self.generate_teams_user_aad_token() + token_response = identity_client.get_token_for_teams_user(add_token) + assert token_response.token is not None + + @CommunicationPreparer() + def test_get_token_for_teams_user_with_valid_token(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + identity_client = CommunicationIdentityClient.from_connection_string( + communication_livetest_dynamic_connection_string, + http_logging_policy=get_http_logging_policy() + ) + add_token = self.generate_teams_user_aad_token() + token_response = identity_client.get_token_for_teams_user(add_token) + assert token_response.token is not None + + @CommunicationPreparer() + def test_get_token_for_teams_user_with_empty_token(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + identity_client = CommunicationIdentityClient.from_connection_string( + communication_livetest_dynamic_connection_string, + http_logging_policy=get_http_logging_policy() + ) + + with pytest.raises(Exception) as ex: + token_response = identity_client.get_token_for_teams_user("") + assert str(ex.value.status_code) == "401" + assert ex.value.message is not None + + @CommunicationPreparer() + def test_get_token_for_teams_user_with_invalid_token(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + identity_client = CommunicationIdentityClient.from_connection_string( + communication_livetest_dynamic_connection_string, + http_logging_policy=get_http_logging_policy() + ) + + with pytest.raises(Exception) as ex: + token_response = identity_client.get_token_for_teams_user("invalid") + assert str(ex.value.status_code) == "401" + assert ex.value.message is not None + + @CommunicationPreparer() + def test_get_token_for_teams_user_with_expired_token(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + identity_client = CommunicationIdentityClient.from_connection_string( + communication_livetest_dynamic_connection_string, + http_logging_policy=get_http_logging_policy() + ) + + with pytest.raises(Exception) as ex: + token_response = identity_client.get_token_for_teams_user(self.expired_teams_token) + assert str(ex.value.status_code) == "401" + assert ex.value.message is not None diff --git a/sdk/communication/azure-communication-identity/tests/test_communication_identity_client_async.py b/sdk/communication/azure-communication-identity/tests/test_communication_identity_client_async.py index 9e461cde83e0..b4cde9c67227 100644 --- a/sdk/communication/azure-communication-identity/tests/test_communication_identity_client_async.py +++ b/sdk/communication/azure-communication-identity/tests/test_communication_identity_client_async.py @@ -13,7 +13,7 @@ from azure_devtools.scenario_tests import RecordingProcessor from devtools_testutils import ResourceGroupPreparer from _shared.helper import URIIdentityReplacer -from _shared.asynctestcase import AsyncCommunicationTestCase +from asynctestcase import AsyncCommunicationIdentityTestCase from _shared.testcase import BodyReplacerProcessor from _shared.communication_service_preparer import CommunicationPreparer from _shared.utils import get_http_logging_policy @@ -25,7 +25,7 @@ def __init__(self): async def get_token(self, *args): return self.token -class CommunicationIdentityClientTestAsync(AsyncCommunicationTestCase): +class CommunicationIdentityClientTestAsync(AsyncCommunicationIdentityTestCase): def setUp(self): super(CommunicationIdentityClientTestAsync, self).setUp() self.recording_processors.extend([ @@ -227,3 +227,84 @@ async def test_get_token_with_no_scopes(self, communication_livetest_dynamic_con with pytest.raises(Exception) as ex: user = await identity_client.create_user() token_response = await identity_client.get_token(user, scopes=None) + + @CommunicationPreparer() + async def test_get_token_for_teams_user_from_managed_identity(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + endpoint, access_key = parse_connection_str(communication_livetest_dynamic_connection_string) + from devtools_testutils import is_live + if not is_live(): + credential = FakeTokenCredential() + else: + credential = DefaultAzureCredential() + identity_client = CommunicationIdentityClient( + endpoint, + credential, + http_logging_policy=get_http_logging_policy() + ) + async with identity_client: + add_token = self.generate_teams_user_aad_token() + token_response = await identity_client.get_token_for_teams_user(add_token) + + assert token_response.token is not None + + @CommunicationPreparer() + async def test_get_token_for_teams_user_with_valid_token(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + identity_client = CommunicationIdentityClient.from_connection_string( + communication_livetest_dynamic_connection_string, + http_logging_policy=get_http_logging_policy() + ) + async with identity_client: + add_token = self.generate_teams_user_aad_token() + token_response = await identity_client.get_token_for_teams_user(add_token) + + assert token_response.token is not None + + @CommunicationPreparer() + async def test_get_token_for_teams_user_with_empty_token(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + identity_client = CommunicationIdentityClient.from_connection_string( + communication_livetest_dynamic_connection_string, + http_logging_policy=get_http_logging_policy() + ) + async with identity_client: + with pytest.raises(Exception) as ex: + token_response = await identity_client.get_token_for_teams_user("") + + assert str(ex.value.status_code) == "401" + assert ex.value.message is not None + + + @CommunicationPreparer() + async def test_get_token_for_teams_user_with_invalid_token(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + identity_client = CommunicationIdentityClient.from_connection_string( + communication_livetest_dynamic_connection_string, + http_logging_policy=get_http_logging_policy() + ) + async with identity_client: + with pytest.raises(Exception) as ex: + token_response = await identity_client.get_token_for_teams_user("invalid") + + assert str(ex.value.status_code) == "401" + assert ex.value.message is not None + + @CommunicationPreparer() + async def test_get_token_for_teams_user_with_expired_token(self, communication_livetest_dynamic_connection_string): + if(self.skip_get_token_for_teams_user_test()): + return + identity_client = CommunicationIdentityClient.from_connection_string( + communication_livetest_dynamic_connection_string, + http_logging_policy=get_http_logging_policy() + ) + async with identity_client: + with pytest.raises(Exception) as ex: + token_response = await identity_client.get_token_for_teams_user(self.expired_teams_token) + + assert str(ex.value.status_code) == "401" + assert ex.value.message is not None \ No newline at end of file diff --git a/sdk/communication/azure-communication-identity/tests/testcase.py b/sdk/communication/azure-communication-identity/tests/testcase.py new file mode 100644 index 000000000000..f61086e21bf8 --- /dev/null +++ b/sdk/communication/azure-communication-identity/tests/testcase.py @@ -0,0 +1,56 @@ + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import os + +from azure.communication.identity._shared.utils import parse_connection_str +from _shared.testcase import CommunicationTestCase +from msal import PublicClientApplication + +class CommunicationIdentityTestCase(CommunicationTestCase): + + def __init__(self, method_name, *args, **kwargs): + super(CommunicationIdentityTestCase, self).__init__(method_name, *args, **kwargs) + + def setUp(self): + super(CommunicationIdentityTestCase, self).setUp() + if self.is_playback(): + self.connection_str = "endpoint=https://sanitized/;accesskey=fake===" + self.m365_app_id = "sanitized" + self.m365_aad_authority = "sanitized" + self.m365_aad_tenant = "sanitized" + self.m365_scope = "sanitized" + self.msal_username = "sanitized" + self.msal_password = "sanitized" + self.expired_teams_token = "sanitized" + self.skip_get_token_for_teams_user_tests = "false" + else: + self.connection_str = os.getenv('COMMUNICATION_LIVETEST_DYNAMIC_CONNECTION_STRING') + self.m365_app_id = os.getenv('COMMUNICATION_M365_APP_ID') + self.m365_aad_authority = os.getenv('COMMUNICATION_M365_AAD_AUTHORITY') + self.m365_aad_tenant = os.getenv('COMMUNICATION_M365_AAD_TENANT') + self.m365_scope = os.getenv('COMMUNICATION_M365_SCOPE') + self.msal_username = os.getenv('COMMUNICATION_MSAL_USERNAME') + self.msal_password = os.getenv('COMMUNICATION_MSAL_PASSWORD') + self.expired_teams_token = os.getenv('COMMUNICATION_EXPIRED_TEAMS_TOKEN') + endpoint, _ = parse_connection_str(self.connection_str) + self._resource_name = endpoint.split(".")[0] + self.scrubber.register_name_pair(self._resource_name, "sanitized") + self.skip_get_token_for_teams_user_tests = os.getenv('SKIP_INT_IDENTITY_EXCHANGE_TOKEN_TEST') + + def generate_teams_user_aad_token(self): + if self.is_playback(): + teams_user_aad_token = "sanitized" + else: + msal_app = PublicClientApplication( + client_id=self.m365_app_id, + authority="{}/{}".format(self.m365_aad_authority, self.m365_aad_tenant)) + result = msal_app.acquire_token_by_username_password(username=self.msal_username, password=self.msal_password, scopes=[self.m365_scope]) + teams_user_aad_token = result["access_token"] + return teams_user_aad_token + + def skip_get_token_for_teams_user_test(self): + return str(self.skip_get_token_for_teams_user_tests).lower() == 'true' \ No newline at end of file diff --git a/sdk/communication/azure-communication-networktraversal/setup.py b/sdk/communication/azure-communication-networktraversal/setup.py index 54bb8f601be2..d5ce687447bc 100644 --- a/sdk/communication/azure-communication-networktraversal/setup.py +++ b/sdk/communication/azure-communication-networktraversal/setup.py @@ -62,8 +62,8 @@ 'azure.communication' ]), install_requires=[ - 'msrest>=0.5.0', - 'azure-core<2.0.0,>=1.16.0' + "msrest>=0.6.21", + "azure-core<2.0.0,>=1.19.1" ], extras_require={ ":python_version<'3.0'": ['azure-communication-nspkg'], diff --git a/sdk/communication/azure-communication-networktraversal/tests.yml b/sdk/communication/azure-communication-networktraversal/tests.yml index 32b5604a073f..122fe6170843 100644 --- a/sdk/communication/azure-communication-networktraversal/tests.yml +++ b/sdk/communication/azure-communication-networktraversal/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-networktraversal' JobName: networktraversal ServiceDirectory: communication - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true CloudConfig: diff --git a/sdk/communication/azure-communication-networktraversal/tests/test_communication_relay_client.py b/sdk/communication/azure-communication-networktraversal/tests/test_communication_relay_client.py index 70e8cad42fe8..53f5a0921257 100644 --- a/sdk/communication/azure-communication-networktraversal/tests/test_communication_relay_client.py +++ b/sdk/communication/azure-communication-networktraversal/tests/test_communication_relay_client.py @@ -6,6 +6,7 @@ # -------------------------------------------------------------------------- from azure.core.credentials import AccessToken from azure.communication.identity import CommunicationIdentityClient +from azure.communication.identity._api_versions import ApiVersion from azure.communication.networktraversal import CommunicationRelayClient from _shared.helper import URIIdentityReplacer from _shared.testcase import ( @@ -35,6 +36,7 @@ def setUp(self): def test_get_relay_configuration(self, communication_livetest_dynamic_connection_string): identity_client = CommunicationIdentityClient.from_connection_string( communication_livetest_dynamic_connection_string, + api_version=ApiVersion.V2021_03_07, http_logging_policy=get_http_logging_policy() ) user = identity_client.create_user() diff --git a/sdk/communication/azure-communication-networktraversal/tests/test_communication_relay_client_async.py b/sdk/communication/azure-communication-networktraversal/tests/test_communication_relay_client_async.py index a4e09de008fa..6e133a1cc73f 100644 --- a/sdk/communication/azure-communication-networktraversal/tests/test_communication_relay_client_async.py +++ b/sdk/communication/azure-communication-networktraversal/tests/test_communication_relay_client_async.py @@ -6,6 +6,7 @@ # -------------------------------------------------------------------------- from azure.core.credentials import AccessToken from azure.communication.identity.aio import CommunicationIdentityClient +from azure.communication.identity._api_versions import ApiVersion from azure.communication.networktraversal.aio import CommunicationRelayClient from _shared.helper import URIIdentityReplacer from _shared.testcase import ( @@ -35,6 +36,7 @@ def setUp(self): async def test_get_relay_configuration(self, communication_livetest_dynamic_connection_string): identity_client = CommunicationIdentityClient.from_connection_string( communication_livetest_dynamic_connection_string, + api_version=ApiVersion.V2021_03_07, http_logging_policy=get_http_logging_policy() ) diff --git a/sdk/communication/azure-communication-phonenumbers/tests.yml b/sdk/communication/azure-communication-phonenumbers/tests.yml index 4fea7d852743..0706786799ef 100644 --- a/sdk/communication/azure-communication-phonenumbers/tests.yml +++ b/sdk/communication/azure-communication-phonenumbers/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-phonenumbers' JobName: phonenumbers ServiceDirectory: communication - DeployArmTemplate: true CloudConfig: Public: SubscriptionConfigurations: diff --git a/sdk/communication/azure-communication-sms/tests.yml b/sdk/communication/azure-communication-sms/tests.yml index 7b3b62949451..0197c3896107 100644 --- a/sdk/communication/azure-communication-sms/tests.yml +++ b/sdk/communication/azure-communication-sms/tests.yml @@ -3,11 +3,9 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' BuildTargetingString: 'azure-communication-sms' JobName: sms ServiceDirectory: communication - DeployArmTemplate: true CloudConfig: Public: SubscriptionConfigurations: diff --git a/sdk/compute/azure-mgmt-avs/CHANGELOG.md b/sdk/compute/azure-mgmt-avs/CHANGELOG.md index 14f871d5abe8..f3341c507952 100644 --- a/sdk/compute/azure-mgmt-avs/CHANGELOG.md +++ b/sdk/compute/azure-mgmt-avs/CHANGELOG.md @@ -1,5 +1,28 @@ # Release History +## 7.0.0 (2021-11-11) + +**Features** + + - Model PrivateCloudUpdateProperties has a new parameter encryption + - Model PrivateCloudUpdateProperties has a new parameter availability + - Model PrivateCloud has a new parameter secondary_circuit + - Model PrivateCloud has a new parameter identity + - Model PrivateCloud has a new parameter encryption + - Model PrivateCloud has a new parameter availability + - Model PrivateCloudProperties has a new parameter secondary_circuit + - Model PrivateCloudProperties has a new parameter encryption + - Model PrivateCloudProperties has a new parameter availability + - Model PrivateCloudUpdate has a new parameter identity + - Model PrivateCloudUpdate has a new parameter encryption + - Model PrivateCloudUpdate has a new parameter availability + - Model GlobalReachConnection has a new parameter express_route_id + - Model ClusterUpdate has a new parameter hosts + - Model ExpressRouteAuthorization has a new parameter express_route_id + - Model Datastore has a new parameter status + - Added operation group VirtualMachinesOperations + - Added operation group PlacementPoliciesOperations + ## 7.0.0b1 (2021-07-13) This is beta preview version. diff --git a/sdk/compute/azure-mgmt-avs/_meta.json b/sdk/compute/azure-mgmt-avs/_meta.json index b325856a4a38..4fab822097da 100644 --- a/sdk/compute/azure-mgmt-avs/_meta.json +++ b/sdk/compute/azure-mgmt-avs/_meta.json @@ -1,11 +1,11 @@ { "autorest": "3.4.5", "use": [ - "@autorest/python@5.8.3", + "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "b91af17cf7e5d480dec66f50fa96b2e2f13a83f0", + "commit": "69e98508ef71f09851b2a79971d2d8e12560adc5", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/vmware/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.3 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "autorest_command": "autorest specification/vmware/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/vmware/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_avs_client.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_avs_client.py index 60ff0e7759ad..26d2b7070316 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_avs_client.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_avs_client.py @@ -30,6 +30,8 @@ from .operations import WorkloadNetworksOperations from .operations import CloudLinksOperations from .operations import AddonsOperations +from .operations import VirtualMachinesOperations +from .operations import PlacementPoliciesOperations from .operations import ScriptPackagesOperations from .operations import ScriptCmdletsOperations from .operations import ScriptExecutionsOperations @@ -61,6 +63,10 @@ class AVSClient(object): :vartype cloud_links: azure.mgmt.avs.operations.CloudLinksOperations :ivar addons: AddonsOperations operations :vartype addons: azure.mgmt.avs.operations.AddonsOperations + :ivar virtual_machines: VirtualMachinesOperations operations + :vartype virtual_machines: azure.mgmt.avs.operations.VirtualMachinesOperations + :ivar placement_policies: PlacementPoliciesOperations operations + :vartype placement_policies: azure.mgmt.avs.operations.PlacementPoliciesOperations :ivar script_packages: ScriptPackagesOperations operations :vartype script_packages: azure.mgmt.avs.operations.ScriptPackagesOperations :ivar script_cmdlets: ScriptCmdletsOperations operations @@ -115,6 +121,10 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.addons = AddonsOperations( self._client, self._config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.placement_policies = PlacementPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) self.script_packages = ScriptPackagesOperations( self._client, self._config, self._serialize, self._deserialize) self.script_cmdlets = ScriptCmdletsOperations( diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_configuration.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_configuration.py index 345b679841e1..89bb55be8f92 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_configuration.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-06-01" + self.api_version = "2021-12-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-avs/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_metadata.json b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_metadata.json index d9558b9e4d7b..06d19041cc08 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_metadata.json +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-06-01", - "total_api_version_list": ["2021-06-01"], + "chosen_version": "2021-12-01", + "total_api_version_list": ["2021-12-01"], "client": { "name": "AVSClient", "filename": "_avs_client", @@ -109,6 +109,8 @@ "workload_networks": "WorkloadNetworksOperations", "cloud_links": "CloudLinksOperations", "addons": "AddonsOperations", + "virtual_machines": "VirtualMachinesOperations", + "placement_policies": "PlacementPoliciesOperations", "script_packages": "ScriptPackagesOperations", "script_cmdlets": "ScriptCmdletsOperations", "script_executions": "ScriptExecutionsOperations" diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_version.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_version.py index efe7276fe05f..364f3c906cf9 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_version.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "7.0.0b1" +VERSION = "7.0.0" diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_avs_client.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_avs_client.py index f1bfa9858a3e..05eb5e11d5ee 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_avs_client.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_avs_client.py @@ -28,6 +28,8 @@ from .operations import WorkloadNetworksOperations from .operations import CloudLinksOperations from .operations import AddonsOperations +from .operations import VirtualMachinesOperations +from .operations import PlacementPoliciesOperations from .operations import ScriptPackagesOperations from .operations import ScriptCmdletsOperations from .operations import ScriptExecutionsOperations @@ -59,6 +61,10 @@ class AVSClient(object): :vartype cloud_links: azure.mgmt.avs.aio.operations.CloudLinksOperations :ivar addons: AddonsOperations operations :vartype addons: azure.mgmt.avs.aio.operations.AddonsOperations + :ivar virtual_machines: VirtualMachinesOperations operations + :vartype virtual_machines: azure.mgmt.avs.aio.operations.VirtualMachinesOperations + :ivar placement_policies: PlacementPoliciesOperations operations + :vartype placement_policies: azure.mgmt.avs.aio.operations.PlacementPoliciesOperations :ivar script_packages: ScriptPackagesOperations operations :vartype script_packages: azure.mgmt.avs.aio.operations.ScriptPackagesOperations :ivar script_cmdlets: ScriptCmdletsOperations operations @@ -112,6 +118,10 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.addons = AddonsOperations( self._client, self._config, self._serialize, self._deserialize) + self.virtual_machines = VirtualMachinesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.placement_policies = PlacementPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) self.script_packages = ScriptPackagesOperations( self._client, self._config, self._serialize, self._deserialize) self.script_cmdlets = ScriptCmdletsOperations( diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_configuration.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_configuration.py index 09d731cb67d0..7337376a2a03 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_configuration.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-06-01" + self.api_version = "2021-12-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-avs/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/__init__.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/__init__.py index 1e3c208eb0fd..d60908801950 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/__init__.py @@ -17,6 +17,8 @@ from ._workload_networks_operations import WorkloadNetworksOperations from ._cloud_links_operations import CloudLinksOperations from ._addons_operations import AddonsOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._placement_policies_operations import PlacementPoliciesOperations from ._script_packages_operations import ScriptPackagesOperations from ._script_cmdlets_operations import ScriptCmdletsOperations from ._script_executions_operations import ScriptExecutionsOperations @@ -33,6 +35,8 @@ 'WorkloadNetworksOperations', 'CloudLinksOperations', 'AddonsOperations', + 'VirtualMachinesOperations', + 'PlacementPoliciesOperations', 'ScriptPackagesOperations', 'ScriptCmdletsOperations', 'ScriptExecutionsOperations', diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_addons_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_addons_operations.py index b3eaa90e1d57..e28ecff2dc74 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_addons_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_addons_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_authorizations_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_authorizations_operations.py index 311015cbd555..c4a94c95e750 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_authorizations_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_authorizations_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_cloud_links_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_cloud_links_operations.py index 0d2f8e306586..42f494bd9cbe 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_cloud_links_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_cloud_links_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_clusters_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_clusters_operations.py index 0336fd404ecf..07eb94fe5269 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_clusters_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_clusters_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,7 +333,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -469,7 +469,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_datastores_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_datastores_operations.py index 1cd53a810f81..45419a8075ca 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_datastores_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_datastores_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -153,7 +153,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -205,7 +205,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -348,7 +348,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_global_reach_connections_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_global_reach_connections_operations.py index 62ce3f6e96d7..901567d59c4a 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_global_reach_connections_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_global_reach_connections_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_hcx_enterprise_sites_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_hcx_enterprise_sites_operations.py index 6f81584264cc..3b651916242e 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_hcx_enterprise_sites_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_hcx_enterprise_sites_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -144,7 +144,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -211,7 +211,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -284,7 +284,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_locations_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_locations_operations.py index 5c986b562a41..74aba316ee8e 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_locations_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_locations_operations.py @@ -59,7 +59,7 @@ async def check_trial_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -113,7 +113,7 @@ async def check_quota_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_operations.py index 145fb53b90b6..40f77ebfb3e7 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_filter_rules_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_placement_policies_operations.py similarity index 63% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_filter_rules_operations.py rename to sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_placement_policies_operations.py index 82fe87ce4062..aa54a3b239f0 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_filter_rules_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_placement_policies_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RouteFilterRulesOperations: - """RouteFilterRulesOperations async operations. +class PlacementPoliciesOperations: + """PlacementPoliciesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.avs.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,154 +43,128 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + def list( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, + private_cloud_name: str, + cluster_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> AsyncIterable["_models.PlacementPoliciesList"]: + """List placement policies in a private cloud cluster. + + List placement policies in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PlacementPoliciesList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.avs.models.PlacementPoliciesList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPoliciesList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-12-01" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + async def extract_data(pipeline_response): + deserialized = self._deserialize('PlacementPoliciesList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - async def begin_delete( - self, - resource_group_name: str, - route_filter_name: str, - rule_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified rule from a route filter. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return AsyncItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies'} # type: ignore async def get( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, + private_cloud_name: str, + cluster_name: str, + placement_policy_name: str, **kwargs: Any - ) -> "_models.RouteFilterRule": - """Gets the specified rule from a route filter. + ) -> "_models.PlacementPolicy": + """Get a placement policy by name in a private cloud cluster. - :param resource_group_name: The name of the resource group. + Get a placement policy by name in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) + placement policy. + :type placement_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilterRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.RouteFilterRule + :return: PlacementPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.avs.models.PlacementPolicy :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -210,38 +184,40 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('PlacementPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.RouteFilterRule", + private_cloud_name: str, + cluster_name: str, + placement_policy_name: str, + placement_policy: "_models.PlacementPolicy", **kwargs: Any - ) -> "_models.RouteFilterRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + ) -> "_models.PlacementPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +231,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') + body_content = self._serialize.body(placement_policy, 'PlacementPolicy') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,48 +242,53 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('PlacementPolicy', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('PlacementPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.RouteFilterRule", + private_cloud_name: str, + cluster_name: str, + placement_policy_name: str, + placement_policy: "_models.PlacementPolicy", **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilterRule"]: - """Creates or updates a route in the specified route filter. + ) -> AsyncLROPoller["_models.PlacementPolicy"]: + """Create or update a placement policy in a private cloud cluster. + + Create or update a placement policy in a private cloud cluster. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the create or update route filter - rule operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_08_01.models.RouteFilterRule + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) + placement policy. + :type placement_policy_name: str + :param placement_policy: A placement policy in the private cloud cluster. + :type placement_policy: ~azure.mgmt.avs.models.PlacementPolicy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] + :return: An instance of AsyncLROPoller that returns either PlacementPolicy or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.avs.models.PlacementPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -316,9 +297,10 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + placement_policy_name=placement_policy_name, + placement_policy=placement_policy, cls=lambda x,y,z: x, **kwargs ) @@ -327,17 +309,18 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('PlacementPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -352,32 +335,34 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore async def _update_initial( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.PatchRouteFilterRule", + private_cloud_name: str, + cluster_name: str, + placement_policy_name: str, + placement_policy_update: "_models.PlacementPolicyUpdate", **kwargs: Any - ) -> "_models.RouteFilterRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + ) -> "_models.PlacementPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -391,55 +376,64 @@ async def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'PatchRouteFilterRule') + body_content = self._serialize.body(placement_policy_update, 'PlacementPolicyUpdate') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('PlacementPolicy', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('PlacementPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore async def begin_update( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.PatchRouteFilterRule", + private_cloud_name: str, + cluster_name: str, + placement_policy_name: str, + placement_policy_update: "_models.PlacementPolicyUpdate", **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilterRule"]: - """Updates a route in the specified route filter. + ) -> AsyncLROPoller["_models.PlacementPolicy"]: + """Update a placement policy in a private cloud cluster. - :param resource_group_name: The name of the resource group. + Update a placement policy in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the update route filter rule - operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_08_01.models.PatchRouteFilterRule + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) + placement policy. + :type placement_policy_name: str + :param placement_policy_update: The placement policy properties that may be updated. + :type placement_policy_update: ~azure.mgmt.avs.models.PlacementPolicyUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] + :return: An instance of AsyncLROPoller that returns either PlacementPolicy or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.avs.models.PlacementPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -448,9 +442,10 @@ async def begin_update( if cont_token is None: raw_result = await self._update_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + placement_policy_name=placement_policy_name, + placement_policy_update=placement_policy_update, cls=lambda x,y,z: x, **kwargs ) @@ -459,17 +454,18 @@ async def begin_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('PlacementPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -484,78 +480,129 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - def list_by_route_filter( + async def _delete_initial( self, resource_group_name: str, - route_filter_name: str, + private_cloud_name: str, + cluster_name: str, + placement_policy_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RouteFilterRuleListResult"]: - """Gets all RouteFilterRules in a route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteFilterRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-12-01" accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_by_route_filter.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - async def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if cls: + return cls(pipeline_response, None, {}) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore - return pipeline_response + async def begin_delete( + self, + resource_group_name: str, + private_cloud_name: str, + cluster_name: str, + placement_policy_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete a placement policy in a private cloud cluster. - return AsyncItemPaged( - get_next, extract_data + Delete a placement policy in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) + placement policy. + :type placement_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list_by_route_filter.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + placement_policy_name=placement_policy_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_private_clouds_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_private_clouds_operations.py index bae1a2dc123c..ba1ad880549f 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_private_clouds_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_private_clouds_operations.py @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,7 @@ def list_in_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -207,7 +207,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -255,7 +255,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -385,7 +385,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -514,7 +514,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -624,7 +624,7 @@ async def _rotate_vcenter_password_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -734,7 +734,7 @@ async def _rotate_nsxt_password_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -857,7 +857,7 @@ async def list_admin_credentials( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_cmdlets_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_cmdlets_operations.py index ae5ac31e9c2e..77dd7139bf2b 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_cmdlets_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_cmdlets_operations.py @@ -48,8 +48,8 @@ def list( script_package_name: str, **kwargs: Any ) -> AsyncIterable["_models.ScriptCmdletsList"]: - """Return script cmdlet resources available for a private cloud to create a script execution - resource on their Private Cloud. + """List script cmdlet resources available for a private cloud to create a script execution + resource on a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_executions_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_executions_operations.py index d932b084aed5..1b309004b286 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_executions_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_executions_operations.py @@ -49,9 +49,9 @@ def list( private_cloud_name: str, **kwargs: Any ) -> AsyncIterable["_models.ScriptExecutionsList"]: - """Get an script execution resource by name in a private cloud. + """List script executions in a private cloud. - Get an script execution resource by name in a private cloud. + List script executions in a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -126,9 +126,9 @@ async def get( script_execution_name: str, **kwargs: Any ) -> "_models.ScriptExecution": - """Get an script execution resource by name in a private cloud. + """Get an script execution by name in a private cloud. - Get an script execution resource by name in a private cloud. + Get an script execution by name in a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -250,9 +250,9 @@ async def begin_create_or_update( script_execution: "_models.ScriptExecution", **kwargs: Any ) -> AsyncLROPoller["_models.ScriptExecution"]: - """Create or update a script execution resource in a private cloud. + """Create or update a script execution in a private cloud. - Create or update a script execution resource in a private cloud. + Create or update a script execution in a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -332,7 +332,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -466,7 +466,7 @@ async def get_execution_logs( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_packages_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_packages_operations.py index 899811dc9ab0..375eeb676519 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_packages_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_script_packages_operations.py @@ -47,7 +47,7 @@ def list( private_cloud_name: str, **kwargs: Any ) -> AsyncIterable["_models.ScriptPackagesList"]: - """Return script packages available for a private cloud to run on their Private Cloud. + """List script packages available to run on the private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -63,7 +63,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -122,7 +122,7 @@ async def get( script_package_name: str, **kwargs: Any ) -> "_models.ScriptPackage": - """Return script package available to run on an Private Cloud. + """Get a script package available to run on a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -140,7 +140,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..f61947d9bef8 --- /dev/null +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_virtual_machines_operations.py @@ -0,0 +1,327 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualMachinesOperations: + """VirtualMachinesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.avs.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + private_cloud_name: str, + cluster_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualMachinesList"]: + """List of virtual machines in a private cloud cluster. + + List of virtual machines in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualMachinesList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.avs.models.VirtualMachinesList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachinesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('VirtualMachinesList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines'} # type: ignore + + async def get( + self, + resource_group_name: str, + private_cloud_name: str, + cluster_name: str, + virtual_machine_id: str, + **kwargs: Any + ) -> "_models.VirtualMachine": + """Get a virtual machine by id in a private cloud cluster. + + Get a virtual machine by id in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param virtual_machine_id: Virtual Machine identifier. + :type virtual_machine_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualMachine, or the result of cls(response) + :rtype: ~azure.mgmt.avs.models.VirtualMachine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualMachine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}'} # type: ignore + + async def _restrict_movement_initial( + self, + resource_group_name: str, + private_cloud_name: str, + cluster_name: str, + virtual_machine_id: str, + restrict_movement: "_models.VirtualMachineRestrictMovement", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restrict_movement_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restrict_movement, 'VirtualMachineRestrictMovement') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restrict_movement_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement'} # type: ignore + + async def begin_restrict_movement( + self, + resource_group_name: str, + private_cloud_name: str, + cluster_name: str, + virtual_machine_id: str, + restrict_movement: "_models.VirtualMachineRestrictMovement", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Enable or disable DRS-driven VM movement restriction. + + Enable or disable DRS-driven VM movement restriction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param virtual_machine_id: Virtual Machine identifier. + :type virtual_machine_id: str + :param restrict_movement: Whether VM DRS-driven movement is restricted (Enabled) or not + (Disabled). + :type restrict_movement: ~azure.mgmt.avs.models.VirtualMachineRestrictMovement + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._restrict_movement_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + virtual_machine_id=virtual_machine_id, + restrict_movement=restrict_movement, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restrict_movement.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement'} # type: ignore diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_workload_networks_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_workload_networks_operations.py index 72af28577588..82b59135d38c 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_workload_networks_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/aio/operations/_workload_networks_operations.py @@ -67,7 +67,7 @@ def list_segments( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ async def get_segment( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_segments_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,7 +333,7 @@ async def _update_segments_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -467,7 +467,7 @@ async def _delete_segment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -596,7 +596,7 @@ def list_dhcp( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -675,7 +675,7 @@ async def get_dhcp( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -725,7 +725,7 @@ async def _create_dhcp_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -862,7 +862,7 @@ async def _update_dhcp_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -996,7 +996,7 @@ async def _delete_dhcp_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1125,7 +1125,7 @@ def list_gateways( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1204,7 +1204,7 @@ async def get_gateway( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1265,7 +1265,7 @@ def list_port_mirroring( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1345,7 +1345,7 @@ async def get_port_mirroring( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1395,7 +1395,7 @@ async def _create_port_mirroring_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1533,7 +1533,7 @@ async def _update_port_mirroring_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1668,7 +1668,7 @@ async def _delete_port_mirroring_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1798,7 +1798,7 @@ def list_vm_groups( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1877,7 +1877,7 @@ async def get_vm_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1927,7 +1927,7 @@ async def _create_vm_group_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2064,7 +2064,7 @@ async def _update_vm_group_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2198,7 +2198,7 @@ async def _delete_vm_group_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -2327,7 +2327,7 @@ def list_virtual_machines( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -2406,7 +2406,7 @@ async def get_virtual_machine( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -2467,7 +2467,7 @@ def list_dns_services( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -2547,7 +2547,7 @@ async def get_dns_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -2597,7 +2597,7 @@ async def _create_dns_service_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2735,7 +2735,7 @@ async def _update_dns_service_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2870,7 +2870,7 @@ async def _delete_dns_service_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -3000,7 +3000,7 @@ def list_dns_zones( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -3079,7 +3079,7 @@ async def get_dns_zone( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -3129,7 +3129,7 @@ async def _create_dns_zone_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3266,7 +3266,7 @@ async def _update_dns_zone_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3400,7 +3400,7 @@ async def _delete_dns_zone_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -3529,7 +3529,7 @@ def list_public_i_ps( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -3609,7 +3609,7 @@ async def get_public_ip( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -3659,7 +3659,7 @@ async def _create_public_ip_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3796,7 +3796,7 @@ async def _delete_public_ip_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py index 819b169fecff..7ec2a63b7e5b 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/__init__.py @@ -14,6 +14,7 @@ from ._models_py3 import AddonSrmProperties from ._models_py3 import AddonVrProperties from ._models_py3 import AdminCredentials + from ._models_py3 import AvailabilityProperties from ._models_py3 import Circuit from ._models_py3 import CloudLink from ._models_py3 import CloudLinkList @@ -25,6 +26,8 @@ from ._models_py3 import Datastore from ._models_py3 import DatastoreList from ._models_py3 import DiskPoolVolume + from ._models_py3 import Encryption + from ._models_py3 import EncryptionKeyVaultProperties from ._models_py3 import Endpoints from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorResponse @@ -45,7 +48,12 @@ from ._models_py3 import OperationList from ._models_py3 import OperationProperties from ._models_py3 import PSCredentialExecutionParameter + from ._models_py3 import PlacementPoliciesList + from ._models_py3 import PlacementPolicy + from ._models_py3 import PlacementPolicyProperties + from ._models_py3 import PlacementPolicyUpdate from ._models_py3 import PrivateCloud + from ._models_py3 import PrivateCloudIdentity from ._models_py3 import PrivateCloudList from ._models_py3 import PrivateCloudProperties from ._models_py3 import PrivateCloudUpdate @@ -67,6 +75,11 @@ from ._models_py3 import Sku from ._models_py3 import TrackedResource from ._models_py3 import Trial + from ._models_py3 import VirtualMachine + from ._models_py3 import VirtualMachineRestrictMovement + from ._models_py3 import VirtualMachinesList + from ._models_py3 import VmHostPlacementPolicyProperties + from ._models_py3 import VmPlacementPolicyProperties from ._models_py3 import WorkloadNetworkDhcp from ._models_py3 import WorkloadNetworkDhcpEntity from ._models_py3 import WorkloadNetworkDhcpList @@ -98,6 +111,7 @@ from ._models import AddonSrmProperties # type: ignore from ._models import AddonVrProperties # type: ignore from ._models import AdminCredentials # type: ignore + from ._models import AvailabilityProperties # type: ignore from ._models import Circuit # type: ignore from ._models import CloudLink # type: ignore from ._models import CloudLinkList # type: ignore @@ -109,6 +123,8 @@ from ._models import Datastore # type: ignore from ._models import DatastoreList # type: ignore from ._models import DiskPoolVolume # type: ignore + from ._models import Encryption # type: ignore + from ._models import EncryptionKeyVaultProperties # type: ignore from ._models import Endpoints # type: ignore from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorResponse # type: ignore @@ -129,7 +145,12 @@ from ._models import OperationList # type: ignore from ._models import OperationProperties # type: ignore from ._models import PSCredentialExecutionParameter # type: ignore + from ._models import PlacementPoliciesList # type: ignore + from ._models import PlacementPolicy # type: ignore + from ._models import PlacementPolicyProperties # type: ignore + from ._models import PlacementPolicyUpdate # type: ignore from ._models import PrivateCloud # type: ignore + from ._models import PrivateCloudIdentity # type: ignore from ._models import PrivateCloudList # type: ignore from ._models import PrivateCloudProperties # type: ignore from ._models import PrivateCloudUpdate # type: ignore @@ -151,6 +172,11 @@ from ._models import Sku # type: ignore from ._models import TrackedResource # type: ignore from ._models import Trial # type: ignore + from ._models import VirtualMachine # type: ignore + from ._models import VirtualMachineRestrictMovement # type: ignore + from ._models import VirtualMachinesList # type: ignore + from ._models import VmHostPlacementPolicyProperties # type: ignore + from ._models import VmPlacementPolicyProperties # type: ignore from ._models import WorkloadNetworkDhcp # type: ignore from ._models import WorkloadNetworkDhcpEntity # type: ignore from ._models import WorkloadNetworkDhcpList # type: ignore @@ -178,12 +204,18 @@ from ._avs_client_enums import ( AddonProvisioningState, AddonType, + AffinityType, + AvailabilityStrategy, CloudLinkStatus, ClusterProvisioningState, DatastoreProvisioningState, + DatastoreStatus, DhcpTypeEnum, DnsServiceLogLevelEnum, DnsServiceStatusEnum, + EncryptionKeyStatus, + EncryptionState, + EncryptionVersionType, ExpressRouteAuthorizationProvisioningState, GlobalReachConnectionProvisioningState, GlobalReachConnectionStatus, @@ -191,10 +223,14 @@ InternetEnum, MountOptionEnum, OptionalParamEnum, + PlacementPolicyProvisioningState, + PlacementPolicyState, + PlacementPolicyType, PortMirroringDirectionEnum, PortMirroringStatusEnum, PrivateCloudProvisioningState, QuotaEnabled, + ResourceIdentityType, ScriptExecutionParameterType, ScriptExecutionProvisioningState, ScriptOutputStreamType, @@ -204,6 +240,7 @@ TrialStatus, VMGroupStatusEnum, VMTypeEnum, + VirtualMachineRestrictMovementState, VisibilityParameterEnum, WorkloadNetworkDhcpProvisioningState, WorkloadNetworkDnsServiceProvisioningState, @@ -222,6 +259,7 @@ 'AddonSrmProperties', 'AddonVrProperties', 'AdminCredentials', + 'AvailabilityProperties', 'Circuit', 'CloudLink', 'CloudLinkList', @@ -233,6 +271,8 @@ 'Datastore', 'DatastoreList', 'DiskPoolVolume', + 'Encryption', + 'EncryptionKeyVaultProperties', 'Endpoints', 'ErrorAdditionalInfo', 'ErrorResponse', @@ -253,7 +293,12 @@ 'OperationList', 'OperationProperties', 'PSCredentialExecutionParameter', + 'PlacementPoliciesList', + 'PlacementPolicy', + 'PlacementPolicyProperties', + 'PlacementPolicyUpdate', 'PrivateCloud', + 'PrivateCloudIdentity', 'PrivateCloudList', 'PrivateCloudProperties', 'PrivateCloudUpdate', @@ -275,6 +320,11 @@ 'Sku', 'TrackedResource', 'Trial', + 'VirtualMachine', + 'VirtualMachineRestrictMovement', + 'VirtualMachinesList', + 'VmHostPlacementPolicyProperties', + 'VmPlacementPolicyProperties', 'WorkloadNetworkDhcp', 'WorkloadNetworkDhcpEntity', 'WorkloadNetworkDhcpList', @@ -300,12 +350,18 @@ 'WorkloadNetworkVirtualMachinesList', 'AddonProvisioningState', 'AddonType', + 'AffinityType', + 'AvailabilityStrategy', 'CloudLinkStatus', 'ClusterProvisioningState', 'DatastoreProvisioningState', + 'DatastoreStatus', 'DhcpTypeEnum', 'DnsServiceLogLevelEnum', 'DnsServiceStatusEnum', + 'EncryptionKeyStatus', + 'EncryptionState', + 'EncryptionVersionType', 'ExpressRouteAuthorizationProvisioningState', 'GlobalReachConnectionProvisioningState', 'GlobalReachConnectionStatus', @@ -313,10 +369,14 @@ 'InternetEnum', 'MountOptionEnum', 'OptionalParamEnum', + 'PlacementPolicyProvisioningState', + 'PlacementPolicyState', + 'PlacementPolicyType', 'PortMirroringDirectionEnum', 'PortMirroringStatusEnum', 'PrivateCloudProvisioningState', 'QuotaEnabled', + 'ResourceIdentityType', 'ScriptExecutionParameterType', 'ScriptExecutionProvisioningState', 'ScriptOutputStreamType', @@ -326,6 +386,7 @@ 'TrialStatus', 'VMGroupStatusEnum', 'VMTypeEnum', + 'VirtualMachineRestrictMovementState', 'VisibilityParameterEnum', 'WorkloadNetworkDhcpProvisioningState', 'WorkloadNetworkDnsServiceProvisioningState', diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py index f0a7e9e57cd3..8ce01af77eca 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_avs_client_enums.py @@ -45,6 +45,20 @@ class AddonType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): VR = "VR" HCX = "HCX" +class AffinityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Placement policy affinity type + """ + + AFFINITY = "Affinity" + ANTI_AFFINITY = "AntiAffinity" + +class AvailabilityStrategy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The availability strategy for the private cloud + """ + + SINGLE_ZONE = "SingleZone" + DUAL_ZONE = "DualZone" + class CloudLinkStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The state of the cloud link. """ @@ -77,6 +91,18 @@ class DatastoreProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, E UPDATING = "Updating" DELETING = "Deleting" +class DatastoreStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The operational status of the datastore + """ + + UNKNOWN = "Unknown" + ACCESSIBLE = "Accessible" + INACCESSIBLE = "Inaccessible" + ATTACHED = "Attached" + DETACHED = "Detached" + LOST_COMMUNICATION = "LostCommunication" + DEAD_OR_ERROR = "DeadOrError" + class DhcpTypeEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Type of DHCP: SERVER or RELAY. """ @@ -101,6 +127,27 @@ class DnsServiceStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SUCCESS = "SUCCESS" FAILURE = "FAILURE" +class EncryptionKeyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of key provided + """ + + CONNECTED = "Connected" + ACCESS_DENIED = "AccessDenied" + +class EncryptionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of customer managed encryption key + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class EncryptionVersionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Property of the key if user provided or auto detected + """ + + FIXED = "Fixed" + AUTO_DETECTED = "AutoDetected" + class ExpressRouteAuthorizationProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The state of the ExpressRoute Circuit Authorization provisioning """ @@ -155,17 +202,44 @@ class OptionalParamEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): OPTIONAL = "Optional" REQUIRED = "Required" +class PlacementPolicyProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The provisioning state + """ + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + BUILDING = "Building" + DELETING = "Deleting" + UPDATING = "Updating" + +class PlacementPolicyState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether the placement policy is enabled or disabled + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class PlacementPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """placement policy type + """ + + VM_VM = "VmVm" + VM_HOST = "VmHost" + class PortMirroringDirectionEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Direction of port mirroring profile. """ - INGRESS_EGRESS_BIDIRECTIONAL = "INGRESS, EGRESS, BIDIRECTIONAL" + INGRESS = "INGRESS" + EGRESS = "EGRESS" + BIDIRECTIONAL = "BIDIRECTIONAL" class PortMirroringStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Port Mirroring Status. """ - SUCCESS_FAILURE = "SUCCESS, FAILURE" + SUCCESS = "SUCCESS" + FAILURE = "FAILURE" class PrivateCloudProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The provisioning state @@ -186,6 +260,14 @@ class QuotaEnabled(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ENABLED = "Enabled" DISABLED = "Disabled" +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the private cloud. The type 'SystemAssigned' refers to an + implicitly created identity. The type 'None' will remove any identities from the Private Cloud. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + NONE = "None" + class ScriptExecutionParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of execution parameter """ @@ -228,7 +310,8 @@ class SegmentStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Segment status. """ - SUCCESS_FAILURE = "SUCCESS, FAILURE" + SUCCESS = "SUCCESS" + FAILURE = "FAILURE" class SslEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Protect LDAP communication using SSL certificate (LDAPS) @@ -245,6 +328,13 @@ class TrialStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): TRIAL_USED = "TrialUsed" TRIAL_DISABLED = "TrialDisabled" +class VirtualMachineRestrictMovementState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether VM DRS-driven movement is restricted (enabled) or not (disabled) + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + class VisibilityParameterEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Should this parameter be visible to arm and passed in the parameters argument when executing """ @@ -256,13 +346,16 @@ class VMGroupStatusEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """VM Group status. """ - SUCCESS_FAILURE = "SUCCESS, FAILURE" + SUCCESS = "SUCCESS" + FAILURE = "FAILURE" class VMTypeEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Virtual machine type. """ - REGULAR_EDGE_SERVICE = "REGULAR, EDGE, SERVICE" + REGULAR = "REGULAR" + EDGE = "EDGE" + SERVICE = "SERVICE" class WorkloadNetworkDhcpProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The provisioning state diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py index f3f816b35a72..d5a57dcf7e33 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models.py @@ -202,14 +202,13 @@ class AddonSrmProperties(AddonProperties): :ivar provisioning_state: The state of the addon provisioning. Possible values include: "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~azure.mgmt.avs.models.AddonProvisioningState - :param license_key: Required. The Site Recovery Manager (SRM) license. + :param license_key: The Site Recovery Manager (SRM) license. :type license_key: str """ _validation = { 'addon_type': {'required': True}, 'provisioning_state': {'readonly': True}, - 'license_key': {'required': True}, } _attribute_map = { @@ -224,7 +223,7 @@ def __init__( ): super(AddonSrmProperties, self).__init__(**kwargs) self.addon_type = 'SRM' # type: str - self.license_key = kwargs['license_key'] + self.license_key = kwargs.get('license_key', None) class AddonVrProperties(AddonProperties): @@ -305,6 +304,34 @@ def __init__( self.vcenter_password = None +class AvailabilityProperties(msrest.serialization.Model): + """The properties describing private cloud availability zone distribution. + + :param strategy: The availability strategy for the private cloud. Possible values include: + "SingleZone", "DualZone". + :type strategy: str or ~azure.mgmt.avs.models.AvailabilityStrategy + :param zone: The primary availability zone for the private cloud. + :type zone: int + :param secondary_zone: The secondary availability zone for the private cloud. + :type secondary_zone: int + """ + + _attribute_map = { + 'strategy': {'key': 'strategy', 'type': 'str'}, + 'zone': {'key': 'zone', 'type': 'int'}, + 'secondary_zone': {'key': 'secondaryZone', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailabilityProperties, self).__init__(**kwargs) + self.strategy = kwargs.get('strategy', None) + self.zone = kwargs.get('zone', None) + self.secondary_zone = kwargs.get('secondary_zone', None) + + class Circuit(msrest.serialization.Model): """An ExpressRoute Circuit. @@ -439,8 +466,8 @@ class Cluster(Resource): :vartype provisioning_state: str or ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity. :vartype cluster_id: int - :ivar hosts: The hosts. - :vartype hosts: list[str] + :param hosts: The hosts. + :type hosts: list[str] """ _validation = { @@ -450,7 +477,6 @@ class Cluster(Resource): 'sku': {'required': True}, 'provisioning_state': {'readonly': True}, 'cluster_id': {'readonly': True}, - 'hosts': {'readonly': True}, } _attribute_map = { @@ -473,7 +499,7 @@ def __init__( self.cluster_size = kwargs.get('cluster_size', None) self.provisioning_state = None self.cluster_id = None - self.hosts = None + self.hosts = kwargs.get('hosts', None) class ClusterList(msrest.serialization.Model): @@ -518,14 +544,13 @@ class CommonClusterProperties(msrest.serialization.Model): :vartype provisioning_state: str or ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity. :vartype cluster_id: int - :ivar hosts: The hosts. - :vartype hosts: list[str] + :param hosts: The hosts. + :type hosts: list[str] """ _validation = { 'provisioning_state': {'readonly': True}, 'cluster_id': {'readonly': True}, - 'hosts': {'readonly': True}, } _attribute_map = { @@ -543,7 +568,7 @@ def __init__( self.cluster_size = kwargs.get('cluster_size', None) self.provisioning_state = None self.cluster_id = None - self.hosts = None + self.hosts = kwargs.get('hosts', None) class ClusterProperties(CommonClusterProperties): @@ -558,14 +583,13 @@ class ClusterProperties(CommonClusterProperties): :vartype provisioning_state: str or ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity. :vartype cluster_id: int - :ivar hosts: The hosts. - :vartype hosts: list[str] + :param hosts: The hosts. + :type hosts: list[str] """ _validation = { 'provisioning_state': {'readonly': True}, 'cluster_id': {'readonly': True}, - 'hosts': {'readonly': True}, } _attribute_map = { @@ -587,10 +611,13 @@ class ClusterUpdate(msrest.serialization.Model): :param cluster_size: The cluster size. :type cluster_size: int + :param hosts: The hosts. + :type hosts: list[str] """ _attribute_map = { 'cluster_size': {'key': 'properties.clusterSize', 'type': 'int'}, + 'hosts': {'key': 'properties.hosts', 'type': '[str]'}, } def __init__( @@ -599,6 +626,7 @@ def __init__( ): super(ClusterUpdate, self).__init__(**kwargs) self.cluster_size = kwargs.get('cluster_size', None) + self.hosts = kwargs.get('hosts', None) class Datastore(Resource): @@ -619,6 +647,9 @@ class Datastore(Resource): :type net_app_volume: ~azure.mgmt.avs.models.NetAppVolume :param disk_pool_volume: An iSCSI volume. :type disk_pool_volume: ~azure.mgmt.avs.models.DiskPoolVolume + :ivar status: The operational status of the datastore. Possible values include: "Unknown", + "Accessible", "Inaccessible", "Attached", "Detached", "LostCommunication", "DeadOrError". + :vartype status: str or ~azure.mgmt.avs.models.DatastoreStatus """ _validation = { @@ -626,6 +657,7 @@ class Datastore(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, } _attribute_map = { @@ -635,6 +667,7 @@ class Datastore(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'net_app_volume': {'key': 'properties.netAppVolume', 'type': 'NetAppVolume'}, 'disk_pool_volume': {'key': 'properties.diskPoolVolume', 'type': 'DiskPoolVolume'}, + 'status': {'key': 'properties.status', 'type': 'str'}, } def __init__( @@ -645,6 +678,7 @@ def __init__( self.provisioning_state = None self.net_app_volume = kwargs.get('net_app_volume', None) self.disk_pool_volume = kwargs.get('disk_pool_volume', None) + self.status = None class DatastoreList(msrest.serialization.Model): @@ -719,6 +753,74 @@ def __init__( self.path = None +class Encryption(msrest.serialization.Model): + """The properties of customer managed encryption key. + + :param status: Status of customer managed encryption key. Possible values include: "Enabled", + "Disabled". + :type status: str or ~azure.mgmt.avs.models.EncryptionState + :param key_vault_properties: The key vault where the encryption key is stored. + :type key_vault_properties: ~azure.mgmt.avs.models.EncryptionKeyVaultProperties + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'EncryptionKeyVaultProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(Encryption, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + + +class EncryptionKeyVaultProperties(msrest.serialization.Model): + """An Encryption Key. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param key_name: The name of the key. + :type key_name: str + :param key_version: The version of the key. + :type key_version: str + :param key_vault_url: The URL of the vault. + :type key_vault_url: str + :ivar key_state: The state of key provided. Possible values include: "Connected", + "AccessDenied". + :vartype key_state: str or ~azure.mgmt.avs.models.EncryptionKeyStatus + :ivar version_type: Property of the key if user provided or auto detected. Possible values + include: "Fixed", "AutoDetected". + :vartype version_type: str or ~azure.mgmt.avs.models.EncryptionVersionType + """ + + _validation = { + 'key_state': {'readonly': True}, + 'version_type': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + 'key_vault_url': {'key': 'keyVaultUrl', 'type': 'str'}, + 'key_state': {'key': 'keyState', 'type': 'str'}, + 'version_type': {'key': 'versionType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionKeyVaultProperties, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.key_version = kwargs.get('key_version', None) + self.key_vault_url = kwargs.get('key_vault_url', None) + self.key_state = None + self.version_type = None + + class Endpoints(msrest.serialization.Model): """Endpoint addresses. @@ -848,6 +950,8 @@ class ExpressRouteAuthorization(Resource): :vartype express_route_authorization_id: str :ivar express_route_authorization_key: The key of the ExpressRoute Circuit Authorization. :vartype express_route_authorization_key: str + :param express_route_id: The ID of the ExpressRoute Circuit. + :type express_route_id: str """ _validation = { @@ -866,6 +970,7 @@ class ExpressRouteAuthorization(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'express_route_authorization_id': {'key': 'properties.expressRouteAuthorizationId', 'type': 'str'}, 'express_route_authorization_key': {'key': 'properties.expressRouteAuthorizationKey', 'type': 'str'}, + 'express_route_id': {'key': 'properties.expressRouteId', 'type': 'str'}, } def __init__( @@ -876,6 +981,7 @@ def __init__( self.provisioning_state = None self.express_route_authorization_id = None self.express_route_authorization_key = None + self.express_route_id = kwargs.get('express_route_id', None) class ExpressRouteAuthorizationList(msrest.serialization.Model): @@ -935,6 +1041,9 @@ class GlobalReachConnection(Resource): :param peer_express_route_circuit: Identifier of the ExpressRoute Circuit to peer with in the global reach connection. :type peer_express_route_circuit: str + :param express_route_id: The ID of the Private Cloud's ExpressRoute Circuit that is + participating in the global reach connection. + :type express_route_id: str """ _validation = { @@ -955,6 +1064,7 @@ class GlobalReachConnection(Resource): 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, 'peer_express_route_circuit': {'key': 'properties.peerExpressRouteCircuit', 'type': 'str'}, + 'express_route_id': {'key': 'properties.expressRouteId', 'type': 'str'}, } def __init__( @@ -967,6 +1077,7 @@ def __init__( self.authorization_key = kwargs.get('authorization_key', None) self.circuit_connection_status = None self.peer_express_route_circuit = kwargs.get('peer_express_route_circuit', None) + self.express_route_id = kwargs.get('express_route_id', None) class GlobalReachConnectionList(msrest.serialization.Model): @@ -1169,14 +1280,13 @@ class ManagementCluster(CommonClusterProperties): :vartype provisioning_state: str or ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity. :vartype cluster_id: int - :ivar hosts: The hosts. - :vartype hosts: list[str] + :param hosts: The hosts. + :type hosts: list[str] """ _validation = { 'provisioning_state': {'readonly': True}, 'cluster_id': {'readonly': True}, - 'hosts': {'readonly': True}, } _attribute_map = { @@ -1452,6 +1562,150 @@ def __init__( self.service_specification = kwargs.get('service_specification', None) +class PlacementPoliciesList(msrest.serialization.Model): + """Represents list of placement policies. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The items on the page. + :vartype value: list[~azure.mgmt.avs.models.PlacementPolicy] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PlacementPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PlacementPoliciesList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class PlacementPolicy(Resource): + """A vSphere Distributed Resource Scheduler (DRS) placement policy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param properties: placement policy properties. + :type properties: ~azure.mgmt.avs.models.PlacementPolicyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PlacementPolicyProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(PlacementPolicy, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class PlacementPolicyProperties(msrest.serialization.Model): + """Abstract placement policy properties. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VmHostPlacementPolicyProperties, VmPlacementPolicyProperties. + + 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 type: Required. placement policy type.Constant filled by server. Possible values + include: "VmVm", "VmHost". + :type type: str or ~azure.mgmt.avs.models.PlacementPolicyType + :param state: Whether the placement policy is enabled or disabled. Possible values include: + "Enabled", "Disabled". + :type state: str or ~azure.mgmt.avs.models.PlacementPolicyState + :param display_name: Display name of the placement policy. + :type display_name: str + :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", + "Failed", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.avs.models.PlacementPolicyProvisioningState + """ + + _validation = { + 'type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'VmHost': 'VmHostPlacementPolicyProperties', 'VmVm': 'VmPlacementPolicyProperties'} + } + + def __init__( + self, + **kwargs + ): + super(PlacementPolicyProperties, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.state = kwargs.get('state', None) + self.display_name = kwargs.get('display_name', None) + self.provisioning_state = None + + +class PlacementPolicyUpdate(msrest.serialization.Model): + """An update of a DRS placement policy resource. + + :param state: Whether the placement policy is enabled or disabled. Possible values include: + "Enabled", "Disabled". + :type state: str or ~azure.mgmt.avs.models.PlacementPolicyState + :param vm_members: Virtual machine members list. + :type vm_members: list[str] + :param host_members: Host members list. + :type host_members: list[str] + """ + + _attribute_map = { + 'state': {'key': 'properties.state', 'type': 'str'}, + 'vm_members': {'key': 'properties.vmMembers', 'type': '[str]'}, + 'host_members': {'key': 'properties.hostMembers', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PlacementPolicyUpdate, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.vm_members = kwargs.get('vm_members', None) + self.host_members = kwargs.get('host_members', None) + + class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. @@ -1511,6 +1765,8 @@ class PrivateCloud(TrackedResource): :type tags: dict[str, str] :param sku: Required. The private cloud SKU. :type sku: ~azure.mgmt.avs.models.Sku + :param identity: The identity of the private cloud, if configured. + :type identity: ~azure.mgmt.avs.models.PrivateCloudIdentity :param management_cluster: The default cluster used for management. :type management_cluster: ~azure.mgmt.avs.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: @@ -1518,6 +1774,11 @@ class PrivateCloud(TrackedResource): :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources. :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] + :param availability: Properties describing how the cloud is distributed across availability + zones. + :type availability: ~azure.mgmt.avs.models.AvailabilityProperties + :param encryption: Customer managed key encryption, can be enabled or disabled. + :type encryption: ~azure.mgmt.avs.models.Encryption :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Cancelled", "Pending", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~azure.mgmt.avs.models.PrivateCloudProvisioningState @@ -1548,6 +1809,9 @@ class PrivateCloud(TrackedResource): :vartype nsxt_certificate_thumbprint: str :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. :vartype external_cloud_links: list[str] + :param secondary_circuit: A secondary expressRoute circuit from a separate AZ. Only present in + a stretched private cloud. + :type secondary_circuit: ~azure.mgmt.avs.models.Circuit """ _validation = { @@ -1572,9 +1836,12 @@ class PrivateCloud(TrackedResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'PrivateCloudIdentity'}, 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'properties.internet', 'type': 'str'}, 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, + 'availability': {'key': 'properties.availability', 'type': 'AvailabilityProperties'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'circuit': {'key': 'properties.circuit', 'type': 'Circuit'}, 'endpoints': {'key': 'properties.endpoints', 'type': 'Endpoints'}, @@ -1587,6 +1854,7 @@ class PrivateCloud(TrackedResource): 'vcenter_certificate_thumbprint': {'key': 'properties.vcenterCertificateThumbprint', 'type': 'str'}, 'nsxt_certificate_thumbprint': {'key': 'properties.nsxtCertificateThumbprint', 'type': 'str'}, 'external_cloud_links': {'key': 'properties.externalCloudLinks', 'type': '[str]'}, + 'secondary_circuit': {'key': 'properties.secondaryCircuit', 'type': 'Circuit'}, } def __init__( @@ -1595,9 +1863,12 @@ def __init__( ): super(PrivateCloud, self).__init__(**kwargs) self.sku = kwargs['sku'] + self.identity = kwargs.get('identity', None) self.management_cluster = kwargs.get('management_cluster', None) self.internet = kwargs.get('internet', "Disabled") self.identity_sources = kwargs.get('identity_sources', None) + self.availability = kwargs.get('availability', None) + self.encryption = kwargs.get('encryption', None) self.provisioning_state = None self.circuit = kwargs.get('circuit', None) self.endpoints = None @@ -1610,6 +1881,45 @@ def __init__( self.vcenter_certificate_thumbprint = None self.nsxt_certificate_thumbprint = None self.external_cloud_links = None + self.secondary_circuit = kwargs.get('secondary_circuit', None) + + +class PrivateCloudIdentity(msrest.serialization.Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of private cloud identity. This property will only be + provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID associated with the private cloud. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the private cloud. The type 'SystemAssigned' refers + to an implicitly created identity. The type 'None' will remove any identities from the Private + Cloud. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.avs.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateCloudIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) class PrivateCloudList(msrest.serialization.Model): @@ -1652,12 +1962,19 @@ class PrivateCloudUpdateProperties(msrest.serialization.Model): :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources. :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] + :param availability: Properties describing how the cloud is distributed across availability + zones. + :type availability: ~azure.mgmt.avs.models.AvailabilityProperties + :param encryption: Customer managed key encryption, can be enabled or disabled. + :type encryption: ~azure.mgmt.avs.models.Encryption """ _attribute_map = { 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'internet', 'type': 'str'}, 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, + 'availability': {'key': 'availability', 'type': 'AvailabilityProperties'}, + 'encryption': {'key': 'encryption', 'type': 'Encryption'}, } def __init__( @@ -1668,6 +1985,8 @@ def __init__( self.management_cluster = kwargs.get('management_cluster', None) self.internet = kwargs.get('internet', "Disabled") self.identity_sources = kwargs.get('identity_sources', None) + self.availability = kwargs.get('availability', None) + self.encryption = kwargs.get('encryption', None) class PrivateCloudProperties(PrivateCloudUpdateProperties): @@ -1684,6 +2003,11 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources. :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] + :param availability: Properties describing how the cloud is distributed across availability + zones. + :type availability: ~azure.mgmt.avs.models.AvailabilityProperties + :param encryption: Customer managed key encryption, can be enabled or disabled. + :type encryption: ~azure.mgmt.avs.models.Encryption :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Cancelled", "Pending", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~azure.mgmt.avs.models.PrivateCloudProvisioningState @@ -1714,6 +2038,9 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): :vartype nsxt_certificate_thumbprint: str :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. :vartype external_cloud_links: list[str] + :param secondary_circuit: A secondary expressRoute circuit from a separate AZ. Only present in + a stretched private cloud. + :type secondary_circuit: ~azure.mgmt.avs.models.Circuit """ _validation = { @@ -1732,6 +2059,8 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'internet', 'type': 'str'}, 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, + 'availability': {'key': 'availability', 'type': 'AvailabilityProperties'}, + 'encryption': {'key': 'encryption', 'type': 'Encryption'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'circuit': {'key': 'circuit', 'type': 'Circuit'}, 'endpoints': {'key': 'endpoints', 'type': 'Endpoints'}, @@ -1744,6 +2073,7 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): 'vcenter_certificate_thumbprint': {'key': 'vcenterCertificateThumbprint', 'type': 'str'}, 'nsxt_certificate_thumbprint': {'key': 'nsxtCertificateThumbprint', 'type': 'str'}, 'external_cloud_links': {'key': 'externalCloudLinks', 'type': '[str]'}, + 'secondary_circuit': {'key': 'secondaryCircuit', 'type': 'Circuit'}, } def __init__( @@ -1763,6 +2093,7 @@ def __init__( self.vcenter_certificate_thumbprint = None self.nsxt_certificate_thumbprint = None self.external_cloud_links = None + self.secondary_circuit = kwargs.get('secondary_circuit', None) class PrivateCloudUpdate(msrest.serialization.Model): @@ -1770,6 +2101,8 @@ class PrivateCloudUpdate(msrest.serialization.Model): :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param identity: The identity of the private cloud, if configured. + :type identity: ~azure.mgmt.avs.models.PrivateCloudIdentity :param management_cluster: The default cluster used for management. :type management_cluster: ~azure.mgmt.avs.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: @@ -1777,13 +2110,21 @@ class PrivateCloudUpdate(msrest.serialization.Model): :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources. :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] + :param availability: Properties describing how the cloud is distributed across availability + zones. + :type availability: ~azure.mgmt.avs.models.AvailabilityProperties + :param encryption: Customer managed key encryption, can be enabled or disabled. + :type encryption: ~azure.mgmt.avs.models.Encryption """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'PrivateCloudIdentity'}, 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'properties.internet', 'type': 'str'}, 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, + 'availability': {'key': 'properties.availability', 'type': 'AvailabilityProperties'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, } def __init__( @@ -1792,9 +2133,12 @@ def __init__( ): super(PrivateCloudUpdate, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) self.management_cluster = kwargs.get('management_cluster', None) self.internet = kwargs.get('internet', "Disabled") self.identity_sources = kwargs.get('identity_sources', None) + self.availability = kwargs.get('availability', None) + self.encryption = kwargs.get('encryption', None) class ProxyResource(Resource): @@ -2414,6 +2758,217 @@ def __init__( self.available_hosts = None +class VirtualMachine(ProxyResource): + """Virtual Machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: Display name of the VM. + :vartype display_name: str + :ivar mo_ref_id: Virtual machine managed object reference id. + :vartype mo_ref_id: str + :ivar folder_path: Path to virtual machine's folder starting from datacenter virtual machine + folder. + :vartype folder_path: str + :ivar restrict_movement: Whether VM DRS-driven movement is restricted (enabled) or not + (disabled). Possible values include: "Enabled", "Disabled". + :vartype restrict_movement: str or ~azure.mgmt.avs.models.VirtualMachineRestrictMovementState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'mo_ref_id': {'readonly': True}, + 'folder_path': {'readonly': True}, + 'restrict_movement': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'mo_ref_id': {'key': 'properties.moRefId', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'restrict_movement': {'key': 'properties.restrictMovement', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualMachine, self).__init__(**kwargs) + self.display_name = None + self.mo_ref_id = None + self.folder_path = None + self.restrict_movement = None + + +class VirtualMachineRestrictMovement(msrest.serialization.Model): + """Set VM DRS-driven movement to restricted (enabled) or not (disabled). + + :param restrict_movement: Whether VM DRS-driven movement is restricted (enabled) or not + (disabled). Possible values include: "Enabled", "Disabled". + :type restrict_movement: str or ~azure.mgmt.avs.models.VirtualMachineRestrictMovementState + """ + + _attribute_map = { + 'restrict_movement': {'key': 'restrictMovement', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualMachineRestrictMovement, self).__init__(**kwargs) + self.restrict_movement = kwargs.get('restrict_movement', None) + + +class VirtualMachinesList(msrest.serialization.Model): + """A list of Virtual Machines. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The items to be displayed on the page. + :vartype value: list[~azure.mgmt.avs.models.VirtualMachine] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachine]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualMachinesList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class VmHostPlacementPolicyProperties(PlacementPolicyProperties): + """VM-Host placement policy properties. + + 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 type: Required. placement policy type.Constant filled by server. Possible values + include: "VmVm", "VmHost". + :type type: str or ~azure.mgmt.avs.models.PlacementPolicyType + :param state: Whether the placement policy is enabled or disabled. Possible values include: + "Enabled", "Disabled". + :type state: str or ~azure.mgmt.avs.models.PlacementPolicyState + :param display_name: Display name of the placement policy. + :type display_name: str + :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", + "Failed", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.avs.models.PlacementPolicyProvisioningState + :param vm_members: Required. Virtual machine members list. + :type vm_members: list[str] + :param host_members: Required. Host members list. + :type host_members: list[str] + :param affinity_type: Required. placement policy affinity type. Possible values include: + "Affinity", "AntiAffinity". + :type affinity_type: str or ~azure.mgmt.avs.models.AffinityType + """ + + _validation = { + 'type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'vm_members': {'required': True}, + 'host_members': {'required': True}, + 'affinity_type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'vm_members': {'key': 'vmMembers', 'type': '[str]'}, + 'host_members': {'key': 'hostMembers', 'type': '[str]'}, + 'affinity_type': {'key': 'affinityType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VmHostPlacementPolicyProperties, self).__init__(**kwargs) + self.type = 'VmHost' # type: str + self.vm_members = kwargs['vm_members'] + self.host_members = kwargs['host_members'] + self.affinity_type = kwargs['affinity_type'] + + +class VmPlacementPolicyProperties(PlacementPolicyProperties): + """VM-VM placement policy properties. + + 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 type: Required. placement policy type.Constant filled by server. Possible values + include: "VmVm", "VmHost". + :type type: str or ~azure.mgmt.avs.models.PlacementPolicyType + :param state: Whether the placement policy is enabled or disabled. Possible values include: + "Enabled", "Disabled". + :type state: str or ~azure.mgmt.avs.models.PlacementPolicyState + :param display_name: Display name of the placement policy. + :type display_name: str + :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", + "Failed", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.avs.models.PlacementPolicyProvisioningState + :param vm_members: Required. Virtual machine members list. + :type vm_members: list[str] + :param affinity_type: Required. placement policy affinity type. Possible values include: + "Affinity", "AntiAffinity". + :type affinity_type: str or ~azure.mgmt.avs.models.AffinityType + """ + + _validation = { + 'type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'vm_members': {'required': True}, + 'affinity_type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'vm_members': {'key': 'vmMembers', 'type': '[str]'}, + 'affinity_type': {'key': 'affinityType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VmPlacementPolicyProperties, self).__init__(**kwargs) + self.type = 'VmVm' # type: str + self.vm_members = kwargs['vm_members'] + self.affinity_type = kwargs['affinity_type'] + + class WorkloadNetworkDhcp(ProxyResource): """NSX DHCP. @@ -2909,14 +3464,14 @@ class WorkloadNetworkPortMirroring(ProxyResource): :vartype type: str :param display_name: Display name of the port mirroring profile. :type display_name: str - :param direction: Direction of port mirroring profile. Possible values include: "INGRESS, - EGRESS, BIDIRECTIONAL". + :param direction: Direction of port mirroring profile. Possible values include: "INGRESS", + "EGRESS", "BIDIRECTIONAL". :type direction: str or ~azure.mgmt.avs.models.PortMirroringDirectionEnum :param source: Source VM Group. :type source: str :param destination: Destination VM Group. :type destination: str - :ivar status: Port Mirroring Status. Possible values include: "SUCCESS, FAILURE". + :ivar status: Port Mirroring Status. Possible values include: "SUCCESS", "FAILURE". :vartype status: str or ~azure.mgmt.avs.models.PortMirroringStatusEnum :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Building", "Deleting", "Updating". @@ -3092,7 +3647,7 @@ class WorkloadNetworkSegment(ProxyResource): :type subnet: ~azure.mgmt.avs.models.WorkloadNetworkSegmentSubnet :ivar port_vif: Port Vif which segment is associated with. :vartype port_vif: list[~azure.mgmt.avs.models.WorkloadNetworkSegmentPortVif] - :ivar status: Segment status. Possible values include: "SUCCESS, FAILURE". + :ivar status: Segment status. Possible values include: "SUCCESS", "FAILURE". :vartype status: str or ~azure.mgmt.avs.models.SegmentStatusEnum :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Building", "Deleting", "Updating". @@ -3223,7 +3778,7 @@ class WorkloadNetworkVirtualMachine(ProxyResource): :vartype type: str :param display_name: Display name of the VM. :type display_name: str - :ivar vm_type: Virtual machine type. Possible values include: "REGULAR, EDGE, SERVICE". + :ivar vm_type: Virtual machine type. Possible values include: "REGULAR", "EDGE", "SERVICE". :vartype vm_type: str or ~azure.mgmt.avs.models.VMTypeEnum """ @@ -3296,7 +3851,7 @@ class WorkloadNetworkVMGroup(ProxyResource): :type display_name: str :param members: Virtual machine members of this group. :type members: list[str] - :ivar status: VM Group status. Possible values include: "SUCCESS, FAILURE". + :ivar status: VM Group status. Possible values include: "SUCCESS", "FAILURE". :vartype status: str or ~azure.mgmt.avs.models.VMGroupStatusEnum :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Building", "Deleting", "Updating". diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py index 68f82c05b3fe..792e14146f7f 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/models/_models_py3.py @@ -210,14 +210,13 @@ class AddonSrmProperties(AddonProperties): :ivar provisioning_state: The state of the addon provisioning. Possible values include: "Succeeded", "Failed", "Cancelled", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~azure.mgmt.avs.models.AddonProvisioningState - :param license_key: Required. The Site Recovery Manager (SRM) license. + :param license_key: The Site Recovery Manager (SRM) license. :type license_key: str """ _validation = { 'addon_type': {'required': True}, 'provisioning_state': {'readonly': True}, - 'license_key': {'required': True}, } _attribute_map = { @@ -229,7 +228,7 @@ class AddonSrmProperties(AddonProperties): def __init__( self, *, - license_key: str, + license_key: Optional[str] = None, **kwargs ): super(AddonSrmProperties, self).__init__(**kwargs) @@ -317,6 +316,38 @@ def __init__( self.vcenter_password = None +class AvailabilityProperties(msrest.serialization.Model): + """The properties describing private cloud availability zone distribution. + + :param strategy: The availability strategy for the private cloud. Possible values include: + "SingleZone", "DualZone". + :type strategy: str or ~azure.mgmt.avs.models.AvailabilityStrategy + :param zone: The primary availability zone for the private cloud. + :type zone: int + :param secondary_zone: The secondary availability zone for the private cloud. + :type secondary_zone: int + """ + + _attribute_map = { + 'strategy': {'key': 'strategy', 'type': 'str'}, + 'zone': {'key': 'zone', 'type': 'int'}, + 'secondary_zone': {'key': 'secondaryZone', 'type': 'int'}, + } + + def __init__( + self, + *, + strategy: Optional[Union[str, "AvailabilityStrategy"]] = None, + zone: Optional[int] = None, + secondary_zone: Optional[int] = None, + **kwargs + ): + super(AvailabilityProperties, self).__init__(**kwargs) + self.strategy = strategy + self.zone = zone + self.secondary_zone = secondary_zone + + class Circuit(msrest.serialization.Model): """An ExpressRoute Circuit. @@ -453,8 +484,8 @@ class Cluster(Resource): :vartype provisioning_state: str or ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity. :vartype cluster_id: int - :ivar hosts: The hosts. - :vartype hosts: list[str] + :param hosts: The hosts. + :type hosts: list[str] """ _validation = { @@ -464,7 +495,6 @@ class Cluster(Resource): 'sku': {'required': True}, 'provisioning_state': {'readonly': True}, 'cluster_id': {'readonly': True}, - 'hosts': {'readonly': True}, } _attribute_map = { @@ -483,6 +513,7 @@ def __init__( *, sku: "Sku", cluster_size: Optional[int] = None, + hosts: Optional[List[str]] = None, **kwargs ): super(Cluster, self).__init__(**kwargs) @@ -490,7 +521,7 @@ def __init__( self.cluster_size = cluster_size self.provisioning_state = None self.cluster_id = None - self.hosts = None + self.hosts = hosts class ClusterList(msrest.serialization.Model): @@ -535,14 +566,13 @@ class CommonClusterProperties(msrest.serialization.Model): :vartype provisioning_state: str or ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity. :vartype cluster_id: int - :ivar hosts: The hosts. - :vartype hosts: list[str] + :param hosts: The hosts. + :type hosts: list[str] """ _validation = { 'provisioning_state': {'readonly': True}, 'cluster_id': {'readonly': True}, - 'hosts': {'readonly': True}, } _attribute_map = { @@ -556,13 +586,14 @@ def __init__( self, *, cluster_size: Optional[int] = None, + hosts: Optional[List[str]] = None, **kwargs ): super(CommonClusterProperties, self).__init__(**kwargs) self.cluster_size = cluster_size self.provisioning_state = None self.cluster_id = None - self.hosts = None + self.hosts = hosts class ClusterProperties(CommonClusterProperties): @@ -577,14 +608,13 @@ class ClusterProperties(CommonClusterProperties): :vartype provisioning_state: str or ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity. :vartype cluster_id: int - :ivar hosts: The hosts. - :vartype hosts: list[str] + :param hosts: The hosts. + :type hosts: list[str] """ _validation = { 'provisioning_state': {'readonly': True}, 'cluster_id': {'readonly': True}, - 'hosts': {'readonly': True}, } _attribute_map = { @@ -598,9 +628,10 @@ def __init__( self, *, cluster_size: Optional[int] = None, + hosts: Optional[List[str]] = None, **kwargs ): - super(ClusterProperties, self).__init__(cluster_size=cluster_size, **kwargs) + super(ClusterProperties, self).__init__(cluster_size=cluster_size, hosts=hosts, **kwargs) class ClusterUpdate(msrest.serialization.Model): @@ -608,20 +639,25 @@ class ClusterUpdate(msrest.serialization.Model): :param cluster_size: The cluster size. :type cluster_size: int + :param hosts: The hosts. + :type hosts: list[str] """ _attribute_map = { 'cluster_size': {'key': 'properties.clusterSize', 'type': 'int'}, + 'hosts': {'key': 'properties.hosts', 'type': '[str]'}, } def __init__( self, *, cluster_size: Optional[int] = None, + hosts: Optional[List[str]] = None, **kwargs ): super(ClusterUpdate, self).__init__(**kwargs) self.cluster_size = cluster_size + self.hosts = hosts class Datastore(Resource): @@ -642,6 +678,9 @@ class Datastore(Resource): :type net_app_volume: ~azure.mgmt.avs.models.NetAppVolume :param disk_pool_volume: An iSCSI volume. :type disk_pool_volume: ~azure.mgmt.avs.models.DiskPoolVolume + :ivar status: The operational status of the datastore. Possible values include: "Unknown", + "Accessible", "Inaccessible", "Attached", "Detached", "LostCommunication", "DeadOrError". + :vartype status: str or ~azure.mgmt.avs.models.DatastoreStatus """ _validation = { @@ -649,6 +688,7 @@ class Datastore(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, } _attribute_map = { @@ -658,6 +698,7 @@ class Datastore(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'net_app_volume': {'key': 'properties.netAppVolume', 'type': 'NetAppVolume'}, 'disk_pool_volume': {'key': 'properties.diskPoolVolume', 'type': 'DiskPoolVolume'}, + 'status': {'key': 'properties.status', 'type': 'str'}, } def __init__( @@ -671,6 +712,7 @@ def __init__( self.provisioning_state = None self.net_app_volume = net_app_volume self.disk_pool_volume = disk_pool_volume + self.status = None class DatastoreList(msrest.serialization.Model): @@ -749,6 +791,81 @@ def __init__( self.path = None +class Encryption(msrest.serialization.Model): + """The properties of customer managed encryption key. + + :param status: Status of customer managed encryption key. Possible values include: "Enabled", + "Disabled". + :type status: str or ~azure.mgmt.avs.models.EncryptionState + :param key_vault_properties: The key vault where the encryption key is stored. + :type key_vault_properties: ~azure.mgmt.avs.models.EncryptionKeyVaultProperties + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'EncryptionKeyVaultProperties'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "EncryptionState"]] = None, + key_vault_properties: Optional["EncryptionKeyVaultProperties"] = None, + **kwargs + ): + super(Encryption, self).__init__(**kwargs) + self.status = status + self.key_vault_properties = key_vault_properties + + +class EncryptionKeyVaultProperties(msrest.serialization.Model): + """An Encryption Key. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param key_name: The name of the key. + :type key_name: str + :param key_version: The version of the key. + :type key_version: str + :param key_vault_url: The URL of the vault. + :type key_vault_url: str + :ivar key_state: The state of key provided. Possible values include: "Connected", + "AccessDenied". + :vartype key_state: str or ~azure.mgmt.avs.models.EncryptionKeyStatus + :ivar version_type: Property of the key if user provided or auto detected. Possible values + include: "Fixed", "AutoDetected". + :vartype version_type: str or ~azure.mgmt.avs.models.EncryptionVersionType + """ + + _validation = { + 'key_state': {'readonly': True}, + 'version_type': {'readonly': True}, + } + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + 'key_vault_url': {'key': 'keyVaultUrl', 'type': 'str'}, + 'key_state': {'key': 'keyState', 'type': 'str'}, + 'version_type': {'key': 'versionType', 'type': 'str'}, + } + + def __init__( + self, + *, + key_name: Optional[str] = None, + key_version: Optional[str] = None, + key_vault_url: Optional[str] = None, + **kwargs + ): + super(EncryptionKeyVaultProperties, self).__init__(**kwargs) + self.key_name = key_name + self.key_version = key_version + self.key_vault_url = key_vault_url + self.key_state = None + self.version_type = None + + class Endpoints(msrest.serialization.Model): """Endpoint addresses. @@ -878,6 +995,8 @@ class ExpressRouteAuthorization(Resource): :vartype express_route_authorization_id: str :ivar express_route_authorization_key: The key of the ExpressRoute Circuit Authorization. :vartype express_route_authorization_key: str + :param express_route_id: The ID of the ExpressRoute Circuit. + :type express_route_id: str """ _validation = { @@ -896,16 +1015,20 @@ class ExpressRouteAuthorization(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'express_route_authorization_id': {'key': 'properties.expressRouteAuthorizationId', 'type': 'str'}, 'express_route_authorization_key': {'key': 'properties.expressRouteAuthorizationKey', 'type': 'str'}, + 'express_route_id': {'key': 'properties.expressRouteId', 'type': 'str'}, } def __init__( self, + *, + express_route_id: Optional[str] = None, **kwargs ): super(ExpressRouteAuthorization, self).__init__(**kwargs) self.provisioning_state = None self.express_route_authorization_id = None self.express_route_authorization_key = None + self.express_route_id = express_route_id class ExpressRouteAuthorizationList(msrest.serialization.Model): @@ -965,6 +1088,9 @@ class GlobalReachConnection(Resource): :param peer_express_route_circuit: Identifier of the ExpressRoute Circuit to peer with in the global reach connection. :type peer_express_route_circuit: str + :param express_route_id: The ID of the Private Cloud's ExpressRoute Circuit that is + participating in the global reach connection. + :type express_route_id: str """ _validation = { @@ -985,6 +1111,7 @@ class GlobalReachConnection(Resource): 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, 'peer_express_route_circuit': {'key': 'properties.peerExpressRouteCircuit', 'type': 'str'}, + 'express_route_id': {'key': 'properties.expressRouteId', 'type': 'str'}, } def __init__( @@ -992,6 +1119,7 @@ def __init__( *, authorization_key: Optional[str] = None, peer_express_route_circuit: Optional[str] = None, + express_route_id: Optional[str] = None, **kwargs ): super(GlobalReachConnection, self).__init__(**kwargs) @@ -1000,6 +1128,7 @@ def __init__( self.authorization_key = authorization_key self.circuit_connection_status = None self.peer_express_route_circuit = peer_express_route_circuit + self.express_route_id = express_route_id class GlobalReachConnectionList(msrest.serialization.Model): @@ -1217,14 +1346,13 @@ class ManagementCluster(CommonClusterProperties): :vartype provisioning_state: str or ~azure.mgmt.avs.models.ClusterProvisioningState :ivar cluster_id: The identity. :vartype cluster_id: int - :ivar hosts: The hosts. - :vartype hosts: list[str] + :param hosts: The hosts. + :type hosts: list[str] """ _validation = { 'provisioning_state': {'readonly': True}, 'cluster_id': {'readonly': True}, - 'hosts': {'readonly': True}, } _attribute_map = { @@ -1238,9 +1366,10 @@ def __init__( self, *, cluster_size: Optional[int] = None, + hosts: Optional[List[str]] = None, **kwargs ): - super(ManagementCluster, self).__init__(cluster_size=cluster_size, **kwargs) + super(ManagementCluster, self).__init__(cluster_size=cluster_size, hosts=hosts, **kwargs) class MetricDimension(msrest.serialization.Model): @@ -1529,6 +1658,159 @@ def __init__( self.service_specification = service_specification +class PlacementPoliciesList(msrest.serialization.Model): + """Represents list of placement policies. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The items on the page. + :vartype value: list[~azure.mgmt.avs.models.PlacementPolicy] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PlacementPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PlacementPoliciesList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class PlacementPolicy(Resource): + """A vSphere Distributed Resource Scheduler (DRS) placement policy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param properties: placement policy properties. + :type properties: ~azure.mgmt.avs.models.PlacementPolicyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'PlacementPolicyProperties'}, + } + + def __init__( + self, + *, + properties: Optional["PlacementPolicyProperties"] = None, + **kwargs + ): + super(PlacementPolicy, self).__init__(**kwargs) + self.properties = properties + + +class PlacementPolicyProperties(msrest.serialization.Model): + """Abstract placement policy properties. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VmHostPlacementPolicyProperties, VmPlacementPolicyProperties. + + 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 type: Required. placement policy type.Constant filled by server. Possible values + include: "VmVm", "VmHost". + :type type: str or ~azure.mgmt.avs.models.PlacementPolicyType + :param state: Whether the placement policy is enabled or disabled. Possible values include: + "Enabled", "Disabled". + :type state: str or ~azure.mgmt.avs.models.PlacementPolicyState + :param display_name: Display name of the placement policy. + :type display_name: str + :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", + "Failed", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.avs.models.PlacementPolicyProvisioningState + """ + + _validation = { + 'type': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'VmHost': 'VmHostPlacementPolicyProperties', 'VmVm': 'VmPlacementPolicyProperties'} + } + + def __init__( + self, + *, + state: Optional[Union[str, "PlacementPolicyState"]] = None, + display_name: Optional[str] = None, + **kwargs + ): + super(PlacementPolicyProperties, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.state = state + self.display_name = display_name + self.provisioning_state = None + + +class PlacementPolicyUpdate(msrest.serialization.Model): + """An update of a DRS placement policy resource. + + :param state: Whether the placement policy is enabled or disabled. Possible values include: + "Enabled", "Disabled". + :type state: str or ~azure.mgmt.avs.models.PlacementPolicyState + :param vm_members: Virtual machine members list. + :type vm_members: list[str] + :param host_members: Host members list. + :type host_members: list[str] + """ + + _attribute_map = { + 'state': {'key': 'properties.state', 'type': 'str'}, + 'vm_members': {'key': 'properties.vmMembers', 'type': '[str]'}, + 'host_members': {'key': 'properties.hostMembers', 'type': '[str]'}, + } + + def __init__( + self, + *, + state: Optional[Union[str, "PlacementPolicyState"]] = None, + vm_members: Optional[List[str]] = None, + host_members: Optional[List[str]] = None, + **kwargs + ): + super(PlacementPolicyUpdate, self).__init__(**kwargs) + self.state = state + self.vm_members = vm_members + self.host_members = host_members + + class TrackedResource(Resource): """The resource model definition for a ARM tracked top level resource. @@ -1591,6 +1873,8 @@ class PrivateCloud(TrackedResource): :type tags: dict[str, str] :param sku: Required. The private cloud SKU. :type sku: ~azure.mgmt.avs.models.Sku + :param identity: The identity of the private cloud, if configured. + :type identity: ~azure.mgmt.avs.models.PrivateCloudIdentity :param management_cluster: The default cluster used for management. :type management_cluster: ~azure.mgmt.avs.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: @@ -1598,6 +1882,11 @@ class PrivateCloud(TrackedResource): :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources. :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] + :param availability: Properties describing how the cloud is distributed across availability + zones. + :type availability: ~azure.mgmt.avs.models.AvailabilityProperties + :param encryption: Customer managed key encryption, can be enabled or disabled. + :type encryption: ~azure.mgmt.avs.models.Encryption :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Cancelled", "Pending", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~azure.mgmt.avs.models.PrivateCloudProvisioningState @@ -1628,6 +1917,9 @@ class PrivateCloud(TrackedResource): :vartype nsxt_certificate_thumbprint: str :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. :vartype external_cloud_links: list[str] + :param secondary_circuit: A secondary expressRoute circuit from a separate AZ. Only present in + a stretched private cloud. + :type secondary_circuit: ~azure.mgmt.avs.models.Circuit """ _validation = { @@ -1652,9 +1944,12 @@ class PrivateCloud(TrackedResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'PrivateCloudIdentity'}, 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'properties.internet', 'type': 'str'}, 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, + 'availability': {'key': 'properties.availability', 'type': 'AvailabilityProperties'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'circuit': {'key': 'properties.circuit', 'type': 'Circuit'}, 'endpoints': {'key': 'properties.endpoints', 'type': 'Endpoints'}, @@ -1667,6 +1962,7 @@ class PrivateCloud(TrackedResource): 'vcenter_certificate_thumbprint': {'key': 'properties.vcenterCertificateThumbprint', 'type': 'str'}, 'nsxt_certificate_thumbprint': {'key': 'properties.nsxtCertificateThumbprint', 'type': 'str'}, 'external_cloud_links': {'key': 'properties.externalCloudLinks', 'type': '[str]'}, + 'secondary_circuit': {'key': 'properties.secondaryCircuit', 'type': 'Circuit'}, } def __init__( @@ -1675,20 +1971,27 @@ def __init__( sku: "Sku", location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, + identity: Optional["PrivateCloudIdentity"] = None, management_cluster: Optional["ManagementCluster"] = None, internet: Optional[Union[str, "InternetEnum"]] = "Disabled", identity_sources: Optional[List["IdentitySource"]] = None, + availability: Optional["AvailabilityProperties"] = None, + encryption: Optional["Encryption"] = None, circuit: Optional["Circuit"] = None, network_block: Optional[str] = None, vcenter_password: Optional[str] = None, nsxt_password: Optional[str] = None, + secondary_circuit: Optional["Circuit"] = None, **kwargs ): super(PrivateCloud, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku + self.identity = identity self.management_cluster = management_cluster self.internet = internet self.identity_sources = identity_sources + self.availability = availability + self.encryption = encryption self.provisioning_state = None self.circuit = circuit self.endpoints = None @@ -1701,6 +2004,47 @@ def __init__( self.vcenter_certificate_thumbprint = None self.nsxt_certificate_thumbprint = None self.external_cloud_links = None + self.secondary_circuit = secondary_circuit + + +class PrivateCloudIdentity(msrest.serialization.Model): + """Identity for the virtual machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of private cloud identity. This property will only be + provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID associated with the private cloud. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the private cloud. The type 'SystemAssigned' refers + to an implicitly created identity. The type 'None' will remove any identities from the Private + Cloud. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.avs.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + **kwargs + ): + super(PrivateCloudIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type class PrivateCloudList(msrest.serialization.Model): @@ -1743,12 +2087,19 @@ class PrivateCloudUpdateProperties(msrest.serialization.Model): :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources. :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] + :param availability: Properties describing how the cloud is distributed across availability + zones. + :type availability: ~azure.mgmt.avs.models.AvailabilityProperties + :param encryption: Customer managed key encryption, can be enabled or disabled. + :type encryption: ~azure.mgmt.avs.models.Encryption """ _attribute_map = { 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'internet', 'type': 'str'}, 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, + 'availability': {'key': 'availability', 'type': 'AvailabilityProperties'}, + 'encryption': {'key': 'encryption', 'type': 'Encryption'}, } def __init__( @@ -1757,12 +2108,16 @@ def __init__( management_cluster: Optional["ManagementCluster"] = None, internet: Optional[Union[str, "InternetEnum"]] = "Disabled", identity_sources: Optional[List["IdentitySource"]] = None, + availability: Optional["AvailabilityProperties"] = None, + encryption: Optional["Encryption"] = None, **kwargs ): super(PrivateCloudUpdateProperties, self).__init__(**kwargs) self.management_cluster = management_cluster self.internet = internet self.identity_sources = identity_sources + self.availability = availability + self.encryption = encryption class PrivateCloudProperties(PrivateCloudUpdateProperties): @@ -1779,6 +2134,11 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources. :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] + :param availability: Properties describing how the cloud is distributed across availability + zones. + :type availability: ~azure.mgmt.avs.models.AvailabilityProperties + :param encryption: Customer managed key encryption, can be enabled or disabled. + :type encryption: ~azure.mgmt.avs.models.Encryption :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Cancelled", "Pending", "Building", "Deleting", "Updating". :vartype provisioning_state: str or ~azure.mgmt.avs.models.PrivateCloudProvisioningState @@ -1809,6 +2169,9 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): :vartype nsxt_certificate_thumbprint: str :ivar external_cloud_links: Array of cloud link IDs from other clouds that connect to this one. :vartype external_cloud_links: list[str] + :param secondary_circuit: A secondary expressRoute circuit from a separate AZ. Only present in + a stretched private cloud. + :type secondary_circuit: ~azure.mgmt.avs.models.Circuit """ _validation = { @@ -1827,6 +2190,8 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): 'management_cluster': {'key': 'managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'internet', 'type': 'str'}, 'identity_sources': {'key': 'identitySources', 'type': '[IdentitySource]'}, + 'availability': {'key': 'availability', 'type': 'AvailabilityProperties'}, + 'encryption': {'key': 'encryption', 'type': 'Encryption'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, 'circuit': {'key': 'circuit', 'type': 'Circuit'}, 'endpoints': {'key': 'endpoints', 'type': 'Endpoints'}, @@ -1839,6 +2204,7 @@ class PrivateCloudProperties(PrivateCloudUpdateProperties): 'vcenter_certificate_thumbprint': {'key': 'vcenterCertificateThumbprint', 'type': 'str'}, 'nsxt_certificate_thumbprint': {'key': 'nsxtCertificateThumbprint', 'type': 'str'}, 'external_cloud_links': {'key': 'externalCloudLinks', 'type': '[str]'}, + 'secondary_circuit': {'key': 'secondaryCircuit', 'type': 'Circuit'}, } def __init__( @@ -1848,12 +2214,15 @@ def __init__( management_cluster: Optional["ManagementCluster"] = None, internet: Optional[Union[str, "InternetEnum"]] = "Disabled", identity_sources: Optional[List["IdentitySource"]] = None, + availability: Optional["AvailabilityProperties"] = None, + encryption: Optional["Encryption"] = None, circuit: Optional["Circuit"] = None, vcenter_password: Optional[str] = None, nsxt_password: Optional[str] = None, + secondary_circuit: Optional["Circuit"] = None, **kwargs ): - super(PrivateCloudProperties, self).__init__(management_cluster=management_cluster, internet=internet, identity_sources=identity_sources, **kwargs) + super(PrivateCloudProperties, self).__init__(management_cluster=management_cluster, internet=internet, identity_sources=identity_sources, availability=availability, encryption=encryption, **kwargs) self.provisioning_state = None self.circuit = circuit self.endpoints = None @@ -1866,6 +2235,7 @@ def __init__( self.vcenter_certificate_thumbprint = None self.nsxt_certificate_thumbprint = None self.external_cloud_links = None + self.secondary_circuit = secondary_circuit class PrivateCloudUpdate(msrest.serialization.Model): @@ -1873,6 +2243,8 @@ class PrivateCloudUpdate(msrest.serialization.Model): :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param identity: The identity of the private cloud, if configured. + :type identity: ~azure.mgmt.avs.models.PrivateCloudIdentity :param management_cluster: The default cluster used for management. :type management_cluster: ~azure.mgmt.avs.models.ManagementCluster :param internet: Connectivity to internet is enabled or disabled. Possible values include: @@ -1880,29 +2252,43 @@ class PrivateCloudUpdate(msrest.serialization.Model): :type internet: str or ~azure.mgmt.avs.models.InternetEnum :param identity_sources: vCenter Single Sign On Identity Sources. :type identity_sources: list[~azure.mgmt.avs.models.IdentitySource] + :param availability: Properties describing how the cloud is distributed across availability + zones. + :type availability: ~azure.mgmt.avs.models.AvailabilityProperties + :param encryption: Customer managed key encryption, can be enabled or disabled. + :type encryption: ~azure.mgmt.avs.models.Encryption """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'PrivateCloudIdentity'}, 'management_cluster': {'key': 'properties.managementCluster', 'type': 'ManagementCluster'}, 'internet': {'key': 'properties.internet', 'type': 'str'}, 'identity_sources': {'key': 'properties.identitySources', 'type': '[IdentitySource]'}, + 'availability': {'key': 'properties.availability', 'type': 'AvailabilityProperties'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, + identity: Optional["PrivateCloudIdentity"] = None, management_cluster: Optional["ManagementCluster"] = None, internet: Optional[Union[str, "InternetEnum"]] = "Disabled", identity_sources: Optional[List["IdentitySource"]] = None, + availability: Optional["AvailabilityProperties"] = None, + encryption: Optional["Encryption"] = None, **kwargs ): super(PrivateCloudUpdate, self).__init__(**kwargs) self.tags = tags + self.identity = identity self.management_cluster = management_cluster self.internet = internet self.identity_sources = identity_sources + self.availability = availability + self.encryption = encryption class ProxyResource(Resource): @@ -2550,6 +2936,230 @@ def __init__( self.available_hosts = None +class VirtualMachine(ProxyResource): + """Virtual Machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: Display name of the VM. + :vartype display_name: str + :ivar mo_ref_id: Virtual machine managed object reference id. + :vartype mo_ref_id: str + :ivar folder_path: Path to virtual machine's folder starting from datacenter virtual machine + folder. + :vartype folder_path: str + :ivar restrict_movement: Whether VM DRS-driven movement is restricted (enabled) or not + (disabled). Possible values include: "Enabled", "Disabled". + :vartype restrict_movement: str or ~azure.mgmt.avs.models.VirtualMachineRestrictMovementState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'mo_ref_id': {'readonly': True}, + 'folder_path': {'readonly': True}, + 'restrict_movement': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'mo_ref_id': {'key': 'properties.moRefId', 'type': 'str'}, + 'folder_path': {'key': 'properties.folderPath', 'type': 'str'}, + 'restrict_movement': {'key': 'properties.restrictMovement', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualMachine, self).__init__(**kwargs) + self.display_name = None + self.mo_ref_id = None + self.folder_path = None + self.restrict_movement = None + + +class VirtualMachineRestrictMovement(msrest.serialization.Model): + """Set VM DRS-driven movement to restricted (enabled) or not (disabled). + + :param restrict_movement: Whether VM DRS-driven movement is restricted (enabled) or not + (disabled). Possible values include: "Enabled", "Disabled". + :type restrict_movement: str or ~azure.mgmt.avs.models.VirtualMachineRestrictMovementState + """ + + _attribute_map = { + 'restrict_movement': {'key': 'restrictMovement', 'type': 'str'}, + } + + def __init__( + self, + *, + restrict_movement: Optional[Union[str, "VirtualMachineRestrictMovementState"]] = None, + **kwargs + ): + super(VirtualMachineRestrictMovement, self).__init__(**kwargs) + self.restrict_movement = restrict_movement + + +class VirtualMachinesList(msrest.serialization.Model): + """A list of Virtual Machines. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The items to be displayed on the page. + :vartype value: list[~azure.mgmt.avs.models.VirtualMachine] + :ivar next_link: URL to get the next page if any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualMachine]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualMachinesList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class VmHostPlacementPolicyProperties(PlacementPolicyProperties): + """VM-Host placement policy properties. + + 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 type: Required. placement policy type.Constant filled by server. Possible values + include: "VmVm", "VmHost". + :type type: str or ~azure.mgmt.avs.models.PlacementPolicyType + :param state: Whether the placement policy is enabled or disabled. Possible values include: + "Enabled", "Disabled". + :type state: str or ~azure.mgmt.avs.models.PlacementPolicyState + :param display_name: Display name of the placement policy. + :type display_name: str + :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", + "Failed", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.avs.models.PlacementPolicyProvisioningState + :param vm_members: Required. Virtual machine members list. + :type vm_members: list[str] + :param host_members: Required. Host members list. + :type host_members: list[str] + :param affinity_type: Required. placement policy affinity type. Possible values include: + "Affinity", "AntiAffinity". + :type affinity_type: str or ~azure.mgmt.avs.models.AffinityType + """ + + _validation = { + 'type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'vm_members': {'required': True}, + 'host_members': {'required': True}, + 'affinity_type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'vm_members': {'key': 'vmMembers', 'type': '[str]'}, + 'host_members': {'key': 'hostMembers', 'type': '[str]'}, + 'affinity_type': {'key': 'affinityType', 'type': 'str'}, + } + + def __init__( + self, + *, + vm_members: List[str], + host_members: List[str], + affinity_type: Union[str, "AffinityType"], + state: Optional[Union[str, "PlacementPolicyState"]] = None, + display_name: Optional[str] = None, + **kwargs + ): + super(VmHostPlacementPolicyProperties, self).__init__(state=state, display_name=display_name, **kwargs) + self.type = 'VmHost' # type: str + self.vm_members = vm_members + self.host_members = host_members + self.affinity_type = affinity_type + + +class VmPlacementPolicyProperties(PlacementPolicyProperties): + """VM-VM placement policy properties. + + 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 type: Required. placement policy type.Constant filled by server. Possible values + include: "VmVm", "VmHost". + :type type: str or ~azure.mgmt.avs.models.PlacementPolicyType + :param state: Whether the placement policy is enabled or disabled. Possible values include: + "Enabled", "Disabled". + :type state: str or ~azure.mgmt.avs.models.PlacementPolicyState + :param display_name: Display name of the placement policy. + :type display_name: str + :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", + "Failed", "Building", "Deleting", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.avs.models.PlacementPolicyProvisioningState + :param vm_members: Required. Virtual machine members list. + :type vm_members: list[str] + :param affinity_type: Required. placement policy affinity type. Possible values include: + "Affinity", "AntiAffinity". + :type affinity_type: str or ~azure.mgmt.avs.models.AffinityType + """ + + _validation = { + 'type': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'vm_members': {'required': True}, + 'affinity_type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'vm_members': {'key': 'vmMembers', 'type': '[str]'}, + 'affinity_type': {'key': 'affinityType', 'type': 'str'}, + } + + def __init__( + self, + *, + vm_members: List[str], + affinity_type: Union[str, "AffinityType"], + state: Optional[Union[str, "PlacementPolicyState"]] = None, + display_name: Optional[str] = None, + **kwargs + ): + super(VmPlacementPolicyProperties, self).__init__(state=state, display_name=display_name, **kwargs) + self.type = 'VmVm' # type: str + self.vm_members = vm_members + self.affinity_type = affinity_type + + class WorkloadNetworkDhcp(ProxyResource): """NSX DHCP. @@ -3075,14 +3685,14 @@ class WorkloadNetworkPortMirroring(ProxyResource): :vartype type: str :param display_name: Display name of the port mirroring profile. :type display_name: str - :param direction: Direction of port mirroring profile. Possible values include: "INGRESS, - EGRESS, BIDIRECTIONAL". + :param direction: Direction of port mirroring profile. Possible values include: "INGRESS", + "EGRESS", "BIDIRECTIONAL". :type direction: str or ~azure.mgmt.avs.models.PortMirroringDirectionEnum :param source: Source VM Group. :type source: str :param destination: Destination VM Group. :type destination: str - :ivar status: Port Mirroring Status. Possible values include: "SUCCESS, FAILURE". + :ivar status: Port Mirroring Status. Possible values include: "SUCCESS", "FAILURE". :vartype status: str or ~azure.mgmt.avs.models.PortMirroringStatusEnum :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Building", "Deleting", "Updating". @@ -3267,7 +3877,7 @@ class WorkloadNetworkSegment(ProxyResource): :type subnet: ~azure.mgmt.avs.models.WorkloadNetworkSegmentSubnet :ivar port_vif: Port Vif which segment is associated with. :vartype port_vif: list[~azure.mgmt.avs.models.WorkloadNetworkSegmentPortVif] - :ivar status: Segment status. Possible values include: "SUCCESS, FAILURE". + :ivar status: Segment status. Possible values include: "SUCCESS", "FAILURE". :vartype status: str or ~azure.mgmt.avs.models.SegmentStatusEnum :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Building", "Deleting", "Updating". @@ -3408,7 +4018,7 @@ class WorkloadNetworkVirtualMachine(ProxyResource): :vartype type: str :param display_name: Display name of the VM. :type display_name: str - :ivar vm_type: Virtual machine type. Possible values include: "REGULAR, EDGE, SERVICE". + :ivar vm_type: Virtual machine type. Possible values include: "REGULAR", "EDGE", "SERVICE". :vartype vm_type: str or ~azure.mgmt.avs.models.VMTypeEnum """ @@ -3483,7 +4093,7 @@ class WorkloadNetworkVMGroup(ProxyResource): :type display_name: str :param members: Virtual machine members of this group. :type members: list[str] - :ivar status: VM Group status. Possible values include: "SUCCESS, FAILURE". + :ivar status: VM Group status. Possible values include: "SUCCESS", "FAILURE". :vartype status: str or ~azure.mgmt.avs.models.VMGroupStatusEnum :ivar provisioning_state: The provisioning state. Possible values include: "Succeeded", "Failed", "Building", "Deleting", "Updating". diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/__init__.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/__init__.py index 1e3c208eb0fd..d60908801950 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/__init__.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/__init__.py @@ -17,6 +17,8 @@ from ._workload_networks_operations import WorkloadNetworksOperations from ._cloud_links_operations import CloudLinksOperations from ._addons_operations import AddonsOperations +from ._virtual_machines_operations import VirtualMachinesOperations +from ._placement_policies_operations import PlacementPoliciesOperations from ._script_packages_operations import ScriptPackagesOperations from ._script_cmdlets_operations import ScriptCmdletsOperations from ._script_executions_operations import ScriptExecutionsOperations @@ -33,6 +35,8 @@ 'WorkloadNetworksOperations', 'CloudLinksOperations', 'AddonsOperations', + 'VirtualMachinesOperations', + 'PlacementPoliciesOperations', 'ScriptPackagesOperations', 'ScriptCmdletsOperations', 'ScriptExecutionsOperations', diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_addons_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_addons_operations.py index cbf11fb1c6b1..2611dffafbf3 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_addons_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_addons_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_authorizations_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_authorizations_operations.py index ef131b290e4c..87ba55b46207 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_authorizations_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_authorizations_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_cloud_links_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_cloud_links_operations.py index 7f8d7c545008..36cb04a58572 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_cloud_links_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_cloud_links_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py index 08a4a65e126f..c8db0db6d520 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_clusters_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -342,7 +342,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -480,7 +480,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_datastores_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_datastores_operations.py index 5217ec4dc6f1..d06b71646495 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_datastores_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_datastores_operations.py @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -159,7 +159,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -212,7 +212,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -357,7 +357,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_global_reach_connections_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_global_reach_connections_operations.py index a5b6e97ce621..5174658a469d 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_global_reach_connections_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_global_reach_connections_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_hcx_enterprise_sites_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_hcx_enterprise_sites_operations.py index e4ff21f0d177..4d2296c144a8 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_hcx_enterprise_sites_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_hcx_enterprise_sites_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -150,7 +150,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -218,7 +218,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -292,7 +292,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_locations_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_locations_operations.py index b782fc85d1d5..2228c4fa769c 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_locations_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_locations_operations.py @@ -64,7 +64,7 @@ def check_trial_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -119,7 +119,7 @@ def check_quota_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_operations.py index 61ca34137e14..3eac2fb43b68 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_placement_policies_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_placement_policies_operations.py new file mode 100644 index 000000000000..29456e8a91cc --- /dev/null +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_placement_policies_operations.py @@ -0,0 +1,620 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PlacementPoliciesOperations(object): + """PlacementPoliciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.avs.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PlacementPoliciesList"] + """List placement policies in a private cloud cluster. + + List placement policies in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PlacementPoliciesList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.avs.models.PlacementPoliciesList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPoliciesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PlacementPoliciesList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies'} # type: ignore + + def get( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + placement_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PlacementPolicy" + """Get a placement policy by name in a private cloud cluster. + + Get a placement policy by name in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) + placement policy. + :type placement_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PlacementPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.avs.models.PlacementPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PlacementPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + placement_policy_name, # type: str + placement_policy, # type: "_models.PlacementPolicy" + **kwargs # type: Any + ): + # type: (...) -> "_models.PlacementPolicy" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(placement_policy, 'PlacementPolicy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PlacementPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PlacementPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + placement_policy_name, # type: str + placement_policy, # type: "_models.PlacementPolicy" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PlacementPolicy"] + """Create or update a placement policy in a private cloud cluster. + + Create or update a placement policy in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) + placement policy. + :type placement_policy_name: str + :param placement_policy: A placement policy in the private cloud cluster. + :type placement_policy: ~azure.mgmt.avs.models.PlacementPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PlacementPolicy or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.avs.models.PlacementPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + placement_policy_name=placement_policy_name, + placement_policy=placement_policy, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PlacementPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + placement_policy_name, # type: str + placement_policy_update, # type: "_models.PlacementPolicyUpdate" + **kwargs # type: Any + ): + # type: (...) -> "_models.PlacementPolicy" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(placement_policy_update, 'PlacementPolicyUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PlacementPolicy', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('PlacementPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + placement_policy_name, # type: str + placement_policy_update, # type: "_models.PlacementPolicyUpdate" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PlacementPolicy"] + """Update a placement policy in a private cloud cluster. + + Update a placement policy in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) + placement policy. + :type placement_policy_name: str + :param placement_policy_update: The placement policy properties that may be updated. + :type placement_policy_update: ~azure.mgmt.avs.models.PlacementPolicyUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PlacementPolicy or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.avs.models.PlacementPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PlacementPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + placement_policy_name=placement_policy_name, + placement_policy_update=placement_policy_update, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PlacementPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + placement_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + placement_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete a placement policy in a private cloud cluster. + + Delete a placement policy in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param placement_policy_name: Name of the VMware vSphere Distributed Resource Scheduler (DRS) + placement policy. + :type placement_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + placement_policy_name=placement_policy_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'placementPolicyName': self._serialize.url("placement_policy_name", placement_policy_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/placementPolicies/{placementPolicyName}'} # type: ignore diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_private_clouds_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_private_clouds_operations.py index 30894a5616a9..3085e8a1d2a7 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_private_clouds_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_private_clouds_operations.py @@ -69,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -139,7 +139,7 @@ def list_in_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -214,7 +214,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -263,7 +263,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -395,7 +395,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -526,7 +526,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -638,7 +638,7 @@ def _rotate_vcenter_password_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -750,7 +750,7 @@ def _rotate_nsxt_password_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -875,7 +875,7 @@ def list_admin_credentials( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_cmdlets_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_cmdlets_operations.py index aeffe771edf1..554fa942fbbd 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_cmdlets_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_cmdlets_operations.py @@ -53,8 +53,8 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.ScriptCmdletsList"] - """Return script cmdlet resources available for a private cloud to create a script execution - resource on their Private Cloud. + """List script cmdlet resources available for a private cloud to create a script execution + resource on a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -155,7 +155,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_executions_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_executions_operations.py index 89aaea947a75..25318db5a893 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_executions_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_executions_operations.py @@ -54,9 +54,9 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.ScriptExecutionsList"] - """Get an script execution resource by name in a private cloud. + """List script executions in a private cloud. - Get an script execution resource by name in a private cloud. + List script executions in a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -132,9 +132,9 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.ScriptExecution" - """Get an script execution resource by name in a private cloud. + """Get an script execution by name in a private cloud. - Get an script execution resource by name in a private cloud. + Get an script execution by name in a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -258,9 +258,9 @@ def begin_create_or_update( **kwargs # type: Any ): # type: (...) -> LROPoller["_models.ScriptExecution"] - """Create or update a script execution resource in a private cloud. + """Create or update a script execution in a private cloud. - Create or update a script execution resource in a private cloud. + Create or update a script execution in a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -341,7 +341,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -477,7 +477,7 @@ def get_execution_logs( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_packages_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_packages_operations.py index 910b857c7a36..3b6f1cc8d54b 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_packages_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_script_packages_operations.py @@ -52,7 +52,7 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.ScriptPackagesList"] - """Return script packages available for a private cloud to run on their Private Cloud. + """List script packages available to run on the private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -128,7 +128,7 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.ScriptPackage" - """Return script package available to run on an Private Cloud. + """Get a script package available to run on a private cloud. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -146,7 +146,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_virtual_machines_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_virtual_machines_operations.py new file mode 100644 index 000000000000..3ce349e773f2 --- /dev/null +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_virtual_machines_operations.py @@ -0,0 +1,335 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VirtualMachinesOperations(object): + """VirtualMachinesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.avs.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.VirtualMachinesList"] + """List of virtual machines in a private cloud cluster. + + List of virtual machines in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualMachinesList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.avs.models.VirtualMachinesList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachinesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('VirtualMachinesList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines'} # type: ignore + + def get( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + virtual_machine_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualMachine" + """Get a virtual machine by id in a private cloud cluster. + + Get a virtual machine by id in a private cloud cluster. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param virtual_machine_id: Virtual Machine identifier. + :type virtual_machine_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualMachine, or the result of cls(response) + :rtype: ~azure.mgmt.avs.models.VirtualMachine + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachine"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualMachine', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}'} # type: ignore + + def _restrict_movement_initial( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + virtual_machine_id, # type: str + restrict_movement, # type: "_models.VirtualMachineRestrictMovement" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-12-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._restrict_movement_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(restrict_movement, 'VirtualMachineRestrictMovement') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _restrict_movement_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement'} # type: ignore + + def begin_restrict_movement( + self, + resource_group_name, # type: str + private_cloud_name, # type: str + cluster_name, # type: str + virtual_machine_id, # type: str + restrict_movement, # type: "_models.VirtualMachineRestrictMovement" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Enable or disable DRS-driven VM movement restriction. + + Enable or disable DRS-driven VM movement restriction. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param private_cloud_name: Name of the private cloud. + :type private_cloud_name: str + :param cluster_name: Name of the cluster in the private cloud. + :type cluster_name: str + :param virtual_machine_id: Virtual Machine identifier. + :type virtual_machine_id: str + :param restrict_movement: Whether VM DRS-driven movement is restricted (Enabled) or not + (Disabled). + :type restrict_movement: ~azure.mgmt.avs.models.VirtualMachineRestrictMovement + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._restrict_movement_initial( + resource_group_name=resource_group_name, + private_cloud_name=private_cloud_name, + cluster_name=cluster_name, + virtual_machine_id=virtual_machine_id, + restrict_movement=restrict_movement, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'privateCloudName': self._serialize.url("private_cloud_name", private_cloud_name, 'str'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + 'virtualMachineId': self._serialize.url("virtual_machine_id", virtual_machine_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_restrict_movement.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}/virtualMachines/{virtualMachineId}/restrictMovement'} # type: ignore diff --git a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_workload_networks_operations.py b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_workload_networks_operations.py index 5ce42cfd67e4..7e21bcbc2c7f 100644 --- a/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_workload_networks_operations.py +++ b/sdk/compute/azure-mgmt-avs/azure/mgmt/avs/operations/_workload_networks_operations.py @@ -72,7 +72,7 @@ def list_segments( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -152,7 +152,7 @@ def get_segment( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_segments_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -342,7 +342,7 @@ def _update_segments_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -478,7 +478,7 @@ def _delete_segment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -609,7 +609,7 @@ def list_dhcp( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -689,7 +689,7 @@ def get_dhcp( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -740,7 +740,7 @@ def _create_dhcp_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -879,7 +879,7 @@ def _update_dhcp_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1015,7 +1015,7 @@ def _delete_dhcp_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1146,7 +1146,7 @@ def list_gateways( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1226,7 +1226,7 @@ def get_gateway( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1288,7 +1288,7 @@ def list_port_mirroring( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1369,7 +1369,7 @@ def get_port_mirroring( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1420,7 +1420,7 @@ def _create_port_mirroring_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1560,7 +1560,7 @@ def _update_port_mirroring_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1697,7 +1697,7 @@ def _delete_port_mirroring_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1829,7 +1829,7 @@ def list_vm_groups( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1909,7 +1909,7 @@ def get_vm_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -1960,7 +1960,7 @@ def _create_vm_group_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2099,7 +2099,7 @@ def _update_vm_group_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2235,7 +2235,7 @@ def _delete_vm_group_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -2366,7 +2366,7 @@ def list_virtual_machines( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -2446,7 +2446,7 @@ def get_virtual_machine( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -2508,7 +2508,7 @@ def list_dns_services( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -2589,7 +2589,7 @@ def get_dns_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -2640,7 +2640,7 @@ def _create_dns_service_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2780,7 +2780,7 @@ def _update_dns_service_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2917,7 +2917,7 @@ def _delete_dns_service_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -3049,7 +3049,7 @@ def list_dns_zones( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -3129,7 +3129,7 @@ def get_dns_zone( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -3180,7 +3180,7 @@ def _create_dns_zone_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3319,7 +3319,7 @@ def _update_dns_zone_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3455,7 +3455,7 @@ def _delete_dns_zone_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -3586,7 +3586,7 @@ def list_public_i_ps( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -3667,7 +3667,7 @@ def get_public_ip( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -3718,7 +3718,7 @@ def _create_public_ip_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3857,7 +3857,7 @@ def _delete_public_ip_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/compute/azure-mgmt-compute/CHANGELOG.md b/sdk/compute/azure-mgmt-compute/CHANGELOG.md index f9d6ddd10d72..c89915566370 100644 --- a/sdk/compute/azure-mgmt-compute/CHANGELOG.md +++ b/sdk/compute/azure-mgmt-compute/CHANGELOG.md @@ -1,5 +1,30 @@ # Release History +## 23.1.0 (2021-10-12) + +**Features** + + - Model PurchasePlanAutoGenerated has a new parameter promotion_code + - Model Disk has a new parameter public_network_access + - Model Disk has a new parameter completion_percent + - Model Disk has a new parameter supported_capabilities + - Model SnapshotUpdate has a new parameter public_network_access + - Model Snapshot has a new parameter public_network_access + - Model Snapshot has a new parameter completion_percent + - Model Snapshot has a new parameter supported_capabilities + - Model DiskRestorePoint has a new parameter network_access_policy + - Model DiskRestorePoint has a new parameter disk_access_id + - Model DiskRestorePoint has a new parameter public_network_access + - Model DiskRestorePoint has a new parameter supported_capabilities + - Model DiskRestorePoint has a new parameter completion_percent + - Model DiskAccess has a new parameter extended_location + - Model DiskEncryptionSet has a new parameter auto_key_rotation_error + - Model DiskUpdate has a new parameter public_network_access + - Model DiskUpdate has a new parameter supported_capabilities + - Added operation group CommunityGalleryImageVersionsOperations + - Added operation group CommunityGalleriesOperations + - Added operation group CommunityGalleryImagesOperations + ## 23.0.0 (2021-09-02) **Features** diff --git a/sdk/compute/azure-mgmt-compute/_meta.json b/sdk/compute/azure-mgmt-compute/_meta.json index 73259758dfb6..7f1ebd4c7888 100644 --- a/sdk/compute/azure-mgmt-compute/_meta.json +++ b/sdk/compute/azure-mgmt-compute/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "d5ad9431bbc19c34090d97209eb497167db32879", + "commit": "3eaa729b3686f20817145e771a8ab707c739dbbd", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/compute/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/compute/resource-manager/readme.md" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py index fd2951c84dfd..bee3374aac89 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_compute_management_client.py @@ -66,11 +66,11 @@ class ComputeManagementClient(MultiApiClientMixin, _SDKClient): 'cloud_service_roles': '2021-03-01', 'cloud_services': '2021-03-01', 'cloud_services_update_domain': '2021-03-01', - 'disk_accesses': '2020-12-01', - 'disk_encryption_sets': '2020-12-01', - 'disk_restore_point': '2020-12-01', - 'disks': '2020-12-01', - 'snapshots': '2020-12-01', + 'disk_accesses': '2021-04-01', + 'disk_encryption_sets': '2021-04-01', + 'disk_restore_point': '2021-04-01', + 'disks': '2021-04-01', + 'snapshots': '2021-04-01', }}, _PROFILE_TAG + " latest" ) @@ -367,6 +367,45 @@ def cloud_services_update_domain(self): raise ValueError("API version {} does not have operation group 'cloud_services_update_domain'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def community_galleries(self): + """Instance depends on the API version: + + * 2021-07-01: :class:`CommunityGalleriesOperations` + """ + api_version = self._get_api_version('community_galleries') + if api_version == '2021-07-01': + from .v2021_07_01.operations import CommunityGalleriesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'community_galleries'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def community_gallery_image_versions(self): + """Instance depends on the API version: + + * 2021-07-01: :class:`CommunityGalleryImageVersionsOperations` + """ + api_version = self._get_api_version('community_gallery_image_versions') + if api_version == '2021-07-01': + from .v2021_07_01.operations import CommunityGalleryImageVersionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'community_gallery_image_versions'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def community_gallery_images(self): + """Instance depends on the API version: + + * 2021-07-01: :class:`CommunityGalleryImagesOperations` + """ + api_version = self._get_api_version('community_gallery_images') + if api_version == '2021-07-01': + from .v2021_07_01.operations import CommunityGalleryImagesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'community_gallery_images'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def dedicated_host_groups(self): """Instance depends on the API version: @@ -443,6 +482,7 @@ def disk_accesses(self): * 2020-06-30: :class:`DiskAccessesOperations` * 2020-09-30: :class:`DiskAccessesOperations` * 2020-12-01: :class:`DiskAccessesOperations` + * 2021-04-01: :class:`DiskAccessesOperations` """ api_version = self._get_api_version('disk_accesses') if api_version == '2020-05-01': @@ -453,6 +493,8 @@ def disk_accesses(self): from .v2020_09_30.operations import DiskAccessesOperations as OperationClass elif api_version == '2020-12-01': from .v2020_12_01.operations import DiskAccessesOperations as OperationClass + elif api_version == '2021-04-01': + from .v2021_04_01.operations import DiskAccessesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disk_accesses'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -467,6 +509,7 @@ def disk_encryption_sets(self): * 2020-06-30: :class:`DiskEncryptionSetsOperations` * 2020-09-30: :class:`DiskEncryptionSetsOperations` * 2020-12-01: :class:`DiskEncryptionSetsOperations` + * 2021-04-01: :class:`DiskEncryptionSetsOperations` """ api_version = self._get_api_version('disk_encryption_sets') if api_version == '2019-07-01': @@ -481,6 +524,8 @@ def disk_encryption_sets(self): from .v2020_09_30.operations import DiskEncryptionSetsOperations as OperationClass elif api_version == '2020-12-01': from .v2020_12_01.operations import DiskEncryptionSetsOperations as OperationClass + elif api_version == '2021-04-01': + from .v2021_04_01.operations import DiskEncryptionSetsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disk_encryption_sets'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -491,12 +536,15 @@ def disk_restore_point(self): * 2020-09-30: :class:`DiskRestorePointOperations` * 2020-12-01: :class:`DiskRestorePointOperations` + * 2021-04-01: :class:`DiskRestorePointOperations` """ api_version = self._get_api_version('disk_restore_point') if api_version == '2020-09-30': from .v2020_09_30.operations import DiskRestorePointOperations as OperationClass elif api_version == '2020-12-01': from .v2020_12_01.operations import DiskRestorePointOperations as OperationClass + elif api_version == '2021-04-01': + from .v2021_04_01.operations import DiskRestorePointOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disk_restore_point'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -517,6 +565,7 @@ def disks(self): * 2020-06-30: :class:`DisksOperations` * 2020-09-30: :class:`DisksOperations` * 2020-12-01: :class:`DisksOperations` + * 2021-04-01: :class:`DisksOperations` """ api_version = self._get_api_version('disks') if api_version == '2016-04-30-preview': @@ -543,6 +592,8 @@ def disks(self): from .v2020_09_30.operations import DisksOperations as OperationClass elif api_version == '2020-12-01': from .v2020_12_01.operations import DisksOperations as OperationClass + elif api_version == '2021-04-01': + from .v2021_04_01.operations import DisksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disks'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1008,6 +1059,7 @@ def snapshots(self): * 2020-06-30: :class:`SnapshotsOperations` * 2020-09-30: :class:`SnapshotsOperations` * 2020-12-01: :class:`SnapshotsOperations` + * 2021-04-01: :class:`SnapshotsOperations` """ api_version = self._get_api_version('snapshots') if api_version == '2016-04-30-preview': @@ -1034,6 +1086,8 @@ def snapshots(self): from .v2020_09_30.operations import SnapshotsOperations as OperationClass elif api_version == '2020-12-01': from .v2020_12_01.operations import SnapshotsOperations as OperationClass + elif api_version == '2021-04-01': + from .v2021_04_01.operations import SnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'snapshots'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_version.py index d4fc54da5083..be835ed03552 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/_compute_management_client.py index 63f7966007f7..3bb0f9418c01 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/aio/_compute_management_client.py @@ -64,11 +64,11 @@ class ComputeManagementClient(MultiApiClientMixin, _SDKClient): 'cloud_service_roles': '2021-03-01', 'cloud_services': '2021-03-01', 'cloud_services_update_domain': '2021-03-01', - 'disk_accesses': '2020-12-01', - 'disk_encryption_sets': '2020-12-01', - 'disk_restore_point': '2020-12-01', - 'disks': '2020-12-01', - 'snapshots': '2020-12-01', + 'disk_accesses': '2021-04-01', + 'disk_encryption_sets': '2021-04-01', + 'disk_restore_point': '2021-04-01', + 'disks': '2021-04-01', + 'snapshots': '2021-04-01', }}, _PROFILE_TAG + " latest" ) @@ -365,6 +365,45 @@ def cloud_services_update_domain(self): raise ValueError("API version {} does not have operation group 'cloud_services_update_domain'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def community_galleries(self): + """Instance depends on the API version: + + * 2021-07-01: :class:`CommunityGalleriesOperations` + """ + api_version = self._get_api_version('community_galleries') + if api_version == '2021-07-01': + from ..v2021_07_01.aio.operations import CommunityGalleriesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'community_galleries'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def community_gallery_image_versions(self): + """Instance depends on the API version: + + * 2021-07-01: :class:`CommunityGalleryImageVersionsOperations` + """ + api_version = self._get_api_version('community_gallery_image_versions') + if api_version == '2021-07-01': + from ..v2021_07_01.aio.operations import CommunityGalleryImageVersionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'community_gallery_image_versions'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def community_gallery_images(self): + """Instance depends on the API version: + + * 2021-07-01: :class:`CommunityGalleryImagesOperations` + """ + api_version = self._get_api_version('community_gallery_images') + if api_version == '2021-07-01': + from ..v2021_07_01.aio.operations import CommunityGalleryImagesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'community_gallery_images'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def dedicated_host_groups(self): """Instance depends on the API version: @@ -441,6 +480,7 @@ def disk_accesses(self): * 2020-06-30: :class:`DiskAccessesOperations` * 2020-09-30: :class:`DiskAccessesOperations` * 2020-12-01: :class:`DiskAccessesOperations` + * 2021-04-01: :class:`DiskAccessesOperations` """ api_version = self._get_api_version('disk_accesses') if api_version == '2020-05-01': @@ -451,6 +491,8 @@ def disk_accesses(self): from ..v2020_09_30.aio.operations import DiskAccessesOperations as OperationClass elif api_version == '2020-12-01': from ..v2020_12_01.aio.operations import DiskAccessesOperations as OperationClass + elif api_version == '2021-04-01': + from ..v2021_04_01.aio.operations import DiskAccessesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disk_accesses'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -465,6 +507,7 @@ def disk_encryption_sets(self): * 2020-06-30: :class:`DiskEncryptionSetsOperations` * 2020-09-30: :class:`DiskEncryptionSetsOperations` * 2020-12-01: :class:`DiskEncryptionSetsOperations` + * 2021-04-01: :class:`DiskEncryptionSetsOperations` """ api_version = self._get_api_version('disk_encryption_sets') if api_version == '2019-07-01': @@ -479,6 +522,8 @@ def disk_encryption_sets(self): from ..v2020_09_30.aio.operations import DiskEncryptionSetsOperations as OperationClass elif api_version == '2020-12-01': from ..v2020_12_01.aio.operations import DiskEncryptionSetsOperations as OperationClass + elif api_version == '2021-04-01': + from ..v2021_04_01.aio.operations import DiskEncryptionSetsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disk_encryption_sets'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -489,12 +534,15 @@ def disk_restore_point(self): * 2020-09-30: :class:`DiskRestorePointOperations` * 2020-12-01: :class:`DiskRestorePointOperations` + * 2021-04-01: :class:`DiskRestorePointOperations` """ api_version = self._get_api_version('disk_restore_point') if api_version == '2020-09-30': from ..v2020_09_30.aio.operations import DiskRestorePointOperations as OperationClass elif api_version == '2020-12-01': from ..v2020_12_01.aio.operations import DiskRestorePointOperations as OperationClass + elif api_version == '2021-04-01': + from ..v2021_04_01.aio.operations import DiskRestorePointOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disk_restore_point'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -515,6 +563,7 @@ def disks(self): * 2020-06-30: :class:`DisksOperations` * 2020-09-30: :class:`DisksOperations` * 2020-12-01: :class:`DisksOperations` + * 2021-04-01: :class:`DisksOperations` """ api_version = self._get_api_version('disks') if api_version == '2016-04-30-preview': @@ -541,6 +590,8 @@ def disks(self): from ..v2020_09_30.aio.operations import DisksOperations as OperationClass elif api_version == '2020-12-01': from ..v2020_12_01.aio.operations import DisksOperations as OperationClass + elif api_version == '2021-04-01': + from ..v2021_04_01.aio.operations import DisksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disks'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1006,6 +1057,7 @@ def snapshots(self): * 2020-06-30: :class:`SnapshotsOperations` * 2020-09-30: :class:`SnapshotsOperations` * 2020-12-01: :class:`SnapshotsOperations` + * 2021-04-01: :class:`SnapshotsOperations` """ api_version = self._get_api_version('snapshots') if api_version == '2016-04-30-preview': @@ -1032,6 +1084,8 @@ def snapshots(self): from ..v2020_09_30.aio.operations import SnapshotsOperations as OperationClass elif api_version == '2020-12-01': from ..v2020_12_01.aio.operations import SnapshotsOperations as OperationClass + elif api_version == '2021-04-01': + from ..v2021_04_01.aio.operations import SnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'snapshots'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models.py index df5a5a23991b..5b2137263749 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/models.py @@ -4,6 +4,6 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from .v2020_12_01.models import * from .v2021_03_01.models import * +from .v2021_04_01.models import * from .v2021_07_01.models import * diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_04_30_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_09_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_10_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_compute_management_client.py index 8e6b6109f1f5..68074079617d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_compute_management_client.py @@ -45,6 +45,11 @@ from .operations import LogAnalyticsOperations from .operations import VirtualMachineRunCommandsOperations from .operations import VirtualMachineScaleSetVMRunCommandsOperations +from .operations import DisksOperations +from .operations import SnapshotsOperations +from .operations import DiskEncryptionSetsOperations +from .operations import DiskAccessesOperations +from .operations import DiskRestorePointOperations from . import models @@ -103,6 +108,16 @@ class ComputeManagementClient(object): :vartype virtual_machine_run_commands: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineRunCommandsOperations :ivar virtual_machine_scale_set_vm_run_commands: VirtualMachineScaleSetVMRunCommandsOperations operations :vartype virtual_machine_scale_set_vm_run_commands: azure.mgmt.compute.v2021_04_01.operations.VirtualMachineScaleSetVMRunCommandsOperations + :ivar disks: DisksOperations operations + :vartype disks: azure.mgmt.compute.v2021_04_01.operations.DisksOperations + :ivar snapshots: SnapshotsOperations operations + :vartype snapshots: azure.mgmt.compute.v2021_04_01.operations.SnapshotsOperations + :ivar disk_encryption_sets: DiskEncryptionSetsOperations operations + :vartype disk_encryption_sets: azure.mgmt.compute.v2021_04_01.operations.DiskEncryptionSetsOperations + :ivar disk_accesses: DiskAccessesOperations operations + :vartype disk_accesses: azure.mgmt.compute.v2021_04_01.operations.DiskAccessesOperations + :ivar disk_restore_point: DiskRestorePointOperations operations + :vartype disk_restore_point: azure.mgmt.compute.v2021_04_01.operations.DiskRestorePointOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -181,6 +196,16 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.virtual_machine_scale_set_vm_run_commands = VirtualMachineScaleSetVMRunCommandsOperations( self._client, self._config, self._serialize, self._deserialize) + self.disks = DisksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.snapshots = SnapshotsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.disk_encryption_sets = DiskEncryptionSetsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.disk_accesses = DiskAccessesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.disk_restore_point = DiskRestorePointOperations( + self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_metadata.json b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_metadata.json index 27faeb75367c..5849cb7b34fb 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_metadata.json +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_metadata.json @@ -123,6 +123,11 @@ "virtual_machine_scale_set_vms": "VirtualMachineScaleSetVMsOperations", "log_analytics": "LogAnalyticsOperations", "virtual_machine_run_commands": "VirtualMachineRunCommandsOperations", - "virtual_machine_scale_set_vm_run_commands": "VirtualMachineScaleSetVMRunCommandsOperations" + "virtual_machine_scale_set_vm_run_commands": "VirtualMachineScaleSetVMRunCommandsOperations", + "disks": "DisksOperations", + "snapshots": "SnapshotsOperations", + "disk_encryption_sets": "DiskEncryptionSetsOperations", + "disk_accesses": "DiskAccessesOperations", + "disk_restore_point": "DiskRestorePointOperations" } } \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_compute_management_client.py index 9e756685c8b3..9ec2aef66f1b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/_compute_management_client.py @@ -43,6 +43,11 @@ from .operations import LogAnalyticsOperations from .operations import VirtualMachineRunCommandsOperations from .operations import VirtualMachineScaleSetVMRunCommandsOperations +from .operations import DisksOperations +from .operations import SnapshotsOperations +from .operations import DiskEncryptionSetsOperations +from .operations import DiskAccessesOperations +from .operations import DiskRestorePointOperations from .. import models @@ -101,6 +106,16 @@ class ComputeManagementClient(object): :vartype virtual_machine_run_commands: azure.mgmt.compute.v2021_04_01.aio.operations.VirtualMachineRunCommandsOperations :ivar virtual_machine_scale_set_vm_run_commands: VirtualMachineScaleSetVMRunCommandsOperations operations :vartype virtual_machine_scale_set_vm_run_commands: azure.mgmt.compute.v2021_04_01.aio.operations.VirtualMachineScaleSetVMRunCommandsOperations + :ivar disks: DisksOperations operations + :vartype disks: azure.mgmt.compute.v2021_04_01.aio.operations.DisksOperations + :ivar snapshots: SnapshotsOperations operations + :vartype snapshots: azure.mgmt.compute.v2021_04_01.aio.operations.SnapshotsOperations + :ivar disk_encryption_sets: DiskEncryptionSetsOperations operations + :vartype disk_encryption_sets: azure.mgmt.compute.v2021_04_01.aio.operations.DiskEncryptionSetsOperations + :ivar disk_accesses: DiskAccessesOperations operations + :vartype disk_accesses: azure.mgmt.compute.v2021_04_01.aio.operations.DiskAccessesOperations + :ivar disk_restore_point: DiskRestorePointOperations operations + :vartype disk_restore_point: azure.mgmt.compute.v2021_04_01.aio.operations.DiskRestorePointOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -178,6 +193,16 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.virtual_machine_scale_set_vm_run_commands = VirtualMachineScaleSetVMRunCommandsOperations( self._client, self._config, self._serialize, self._deserialize) + self.disks = DisksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.snapshots = SnapshotsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.disk_encryption_sets = DiskEncryptionSetsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.disk_accesses = DiskAccessesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.disk_restore_point = DiskRestorePointOperations( + self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/__init__.py index 8779b7a16206..431c2df28db4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/__init__.py @@ -32,6 +32,11 @@ from ._log_analytics_operations import LogAnalyticsOperations from ._virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations from ._virtual_machine_scale_set_vm_run_commands_operations import VirtualMachineScaleSetVMRunCommandsOperations +from ._disks_operations import DisksOperations +from ._snapshots_operations import SnapshotsOperations +from ._disk_encryption_sets_operations import DiskEncryptionSetsOperations +from ._disk_accesses_operations import DiskAccessesOperations +from ._disk_restore_point_operations import DiskRestorePointOperations __all__ = [ 'Operations', @@ -60,4 +65,9 @@ 'LogAnalyticsOperations', 'VirtualMachineRunCommandsOperations', 'VirtualMachineScaleSetVMRunCommandsOperations', + 'DisksOperations', + 'SnapshotsOperations', + 'DiskEncryptionSetsOperations', + 'DiskAccessesOperations', + 'DiskRestorePointOperations', ] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_application_gateways_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_accesses_operations.py similarity index 65% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_application_gateways_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_accesses_operations.py index d7815b474347..9a2823095e15 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_application_gateways_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_accesses_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class ApplicationGatewaysOperations: - """ApplicationGatewaysOperations async operations. +class DiskAccessesOperations: + """DiskAccessesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.compute.v2021_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,25 +43,28 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def _create_or_update_initial( self, resource_group_name: str, - application_gateway_name: str, + disk_access_name: str, + disk_access: "_models.DiskAccess", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.DiskAccess": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,53 +74,71 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(disk_access, 'DiskAccess') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('DiskAccess', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DiskAccess', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, - application_gateway_name: str, + disk_access_name: str, + disk_access: "_models.DiskAccess", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified application gateway. + ) -> AsyncLROPoller["_models.DiskAccess"]: + """Creates or updates a disk access resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param disk_access: disk access object supplied in the body of the Put disk access operation. + :type disk_access: ~azure.mgmt.compute.v2021_04_01.models.DiskAccess :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either DiskAccess or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.DiskAccess] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, + disk_access_name=disk_access_name, + disk_access=disk_access, cls=lambda x,y,z: x, **kwargs ) @@ -126,13 +147,146 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DiskAccess', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + disk_access_name: str, + disk_access: "_models.DiskAccessUpdate", + **kwargs: Any + ) -> "_models.DiskAccess": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(disk_access, 'DiskAccessUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DiskAccess', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DiskAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + disk_access_name: str, + disk_access: "_models.DiskAccessUpdate", + **kwargs: Any + ) -> AsyncLROPoller["_models.DiskAccess"]: + """Updates (patches) a disk access resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param disk_access: disk access object supplied in the body of the Patch disk access operation. + :type disk_access: ~azure.mgmt.compute.v2021_04_01.models.DiskAccessUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DiskAccess or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.DiskAccess] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + disk_access_name=disk_access_name, + disk_access=disk_access, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DiskAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -147,39 +301,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore async def get( self, resource_group_name: str, - application_gateway_name: str, + disk_access_name: str, **kwargs: Any - ) -> "_models.ApplicationGateway": - """Gets the specified application gateway. + ) -> "_models.DiskAccess": + """Gets information about a disk access resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ApplicationGateway + :return: DiskAccess, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskAccess :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -199,36 +355,34 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGateway', pipeline_response) + deserialized = self._deserialize('DiskAccess', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore - async def _create_or_update_initial( + async def _delete_initial( self, resource_group_name: str, - application_gateway_name: str, - parameters: "_models.ApplicationGateway", + disk_access_name: str, **kwargs: Any - ) -> "_models.ApplicationGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") + api_version = "2021-04-01" accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -238,69 +392,56 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ApplicationGateway') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, - application_gateway_name: str, - parameters: "_models.ApplicationGateway", + disk_access_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.ApplicationGateway"]: - """Creates or updates the specified application gateway. + ) -> AsyncLROPoller[None]: + """Deletes a disk access resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param parameters: Parameters supplied to the create or update application gateway operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ApplicationGateway + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ApplicationGateway] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - parameters=parameters, + disk_access_name=disk_access_name, cls=lambda x,y,z: x, **kwargs ) @@ -309,16 +450,13 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -333,28 +471,28 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore - def list( + def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApplicationGatewayListResult"]: - """Lists all application gateways in a resource group. + ) -> AsyncIterable["_models.DiskAccessList"]: + """Lists all the disk access resources under a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayListResult] + :return: An iterator like instance of either DiskAccessList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskAccessList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccessList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -364,10 +502,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -382,7 +520,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayListResult', pipeline_response) + deserialized = self._deserialize('DiskAccessList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -403,25 +541,25 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses'} # type: ignore - def list_all( + def list( self, **kwargs: Any - ) -> AsyncIterable["_models.ApplicationGatewayListResult"]: - """Gets all the application gateways in a subscription. + ) -> AsyncIterable["_models.DiskAccessList"]: + """Lists all the disk access resources under a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayListResult] + :return: An iterator like instance of either DiskAccessList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskAccessList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccessList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -431,7 +569,7 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -448,7 +586,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayListResult', pipeline_response) + deserialized = self._deserialize('DiskAccessList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -469,133 +607,41 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses'} # type: ignore - async def _start_initial( + async def get_private_link_resources( self, resource_group_name: str, - application_gateway_name: str, + disk_access_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - - # Construct URL - url = self._start_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start'} # type: ignore - - async def begin_start( - self, - resource_group_name: str, - application_gateway_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Starts the specified application gateway. + ) -> "_models.PrivateLinkResourceListResult": + """Gets the private link resources possible under disk access resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._start_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start'} # type: ignore - - async def _stop_initial( - self, - resource_group_name: str, - application_gateway_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" + accept = "application/json" # Construct URL - url = self._stop_initial.metadata['url'] # type: ignore + url = self.get_private_link_resources.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -605,119 +651,64 @@ async def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, None, {}) - - _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop'} # type: ignore + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) - async def begin_stop( - self, - resource_group_name: str, - application_gateway_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Stops the specified application gateway in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._stop_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } + if cls: + return cls(pipeline_response, deserialized, {}) - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop'} # type: ignore + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources'} # type: ignore - async def _backend_health_initial( + async def _update_a_private_endpoint_connection_initial( self, resource_group_name: str, - application_gateway_name: str, - expand: Optional[str] = None, + disk_access_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: "_models.PrivateEndpointConnection", **kwargs: Any - ) -> Optional["_models.ApplicationGatewayBackendHealth"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealth"]] + ) -> "_models.PrivateEndpointConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._backend_health_initial.metadata['url'] # type: ignore + url = self._update_a_private_endpoint_connection_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -725,53 +716,63 @@ async def _backend_health_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _backend_health_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + _update_a_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - async def begin_backend_health( + async def begin_update_a_private_endpoint_connection( self, resource_group_name: str, - application_gateway_name: str, - expand: Optional[str] = None, + disk_access_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: "_models.PrivateEndpointConnection", **kwargs: Any - ) -> AsyncLROPoller["_models.ApplicationGatewayBackendHealth"]: - """Gets the backend health of the specified application gateway in a resource group. + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: + """Approve or reject a private endpoint connection under disk access resource, this can't be used + to create a new private endpoint connection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. - :type expand: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: private endpoint connection object supplied in the body of + the Put private endpoint connection operation. + :type private_endpoint_connection: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ApplicationGatewayBackendHealth or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealth] + :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealth"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._backend_health_initial( + raw_result = await self._update_a_private_endpoint_connection_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - expand=expand, + disk_access_name=disk_access_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, cls=lambda x,y,z: x, **kwargs ) @@ -780,16 +781,17 @@ async def begin_backend_health( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -804,31 +806,45 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_backend_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + begin_update_a_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - async def list_available_waf_rule_sets( + async def get_a_private_endpoint_connection( self, + resource_group_name: str, + disk_access_name: str, + private_endpoint_connection_name: str, **kwargs: Any - ) -> "_models.ApplicationGatewayAvailableWafRuleSetsResult": - """Lists all available web application firewall rule sets. + ) -> "_models.PrivateEndpointConnection": + """Gets information about a private endpoint connection under a disk access resource. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewayAvailableWafRuleSetsResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayAvailableWafRuleSetsResult + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableWafRuleSetsResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL - url = self.list_available_waf_rule_sets.metadata['url'] # type: ignore + url = self.get_a_private_endpoint_connection.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -848,37 +864,36 @@ async def list_available_waf_rule_sets( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGatewayAvailableWafRuleSetsResult', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_available_waf_rule_sets.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets'} # type: ignore + get_a_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - async def list_available_ssl_options( + async def _delete_a_private_endpoint_connection_initial( self, + resource_group_name: str, + disk_access_name: str, + private_endpoint_connection_name: str, **kwargs: Any - ) -> "_models.ApplicationGatewayAvailableSslOptions": - """Lists available Ssl options for configuring Ssl policy. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewayAvailableSslOptions, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayAvailableSslOptions - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslOptions"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL - url = self.list_available_ssl_options.metadata['url'] # type: ignore + url = self._delete_a_private_endpoint_connection_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -890,39 +905,115 @@ async def list_available_ssl_options( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGatewayAvailableSslOptions', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - list_available_ssl_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default'} # type: ignore + _delete_a_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete_a_private_endpoint_connection( + self, + resource_group_name: str, + disk_access_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection under a disk access resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_a_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + disk_access_name=disk_access_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } - def list_available_ssl_predefined_policies( + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_a_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def list_private_endpoint_connections( self, + resource_group_name: str, + disk_access_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApplicationGatewayAvailableSslPredefinedPolicies"]: - """Lists all SSL predefined policies for configuring Ssl policy. + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """List information about private endpoint connections under a disk access resource. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayAvailableSslPredefinedPolicies or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -932,9 +1023,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_available_ssl_predefined_policies.metadata['url'] # type: ignore + url = self.list_private_endpoint_connections.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -949,7 +1042,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayAvailableSslPredefinedPolicies', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -970,58 +1063,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_available_ssl_predefined_policies.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies'} # type: ignore - - async def get_ssl_predefined_policy( - self, - predefined_policy_name: str, - **kwargs: Any - ) -> "_models.ApplicationGatewaySslPredefinedPolicy": - """Gets Ssl predefined policy with the specified policy name. - - :param predefined_policy_name: Name of Ssl predefined policy. - :type predefined_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewaySslPredefinedPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPredefinedPolicy - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewaySslPredefinedPolicy"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json" - - # Construct URL - url = self.get_ssl_predefined_policy.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'predefinedPolicyName': self._serialize.url("predefined_policy_name", predefined_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationGatewaySslPredefinedPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_ssl_predefined_policy.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}'} # type: ignore + list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_networks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_encryption_sets_operations.py similarity index 69% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_networks_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_encryption_sets_operations.py index 7e049e28b631..f1a5e0310efa 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_networks_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_encryption_sets_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworksOperations: - """VirtualNetworksOperations async operations. +class DiskEncryptionSetsOperations: + """DiskEncryptionSetsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.compute.v2021_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,25 +43,28 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def _create_or_update_initial( self, resource_group_name: str, - virtual_network_name: str, + disk_encryption_set_name: str, + disk_encryption_set: "_models.DiskEncryptionSet", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.DiskEncryptionSet": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,53 +74,72 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(disk_encryption_set, 'DiskEncryptionSet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, - virtual_network_name: str, + disk_encryption_set_name: str, + disk_encryption_set: "_models.DiskEncryptionSet", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified virtual network. + ) -> AsyncLROPoller["_models.DiskEncryptionSet"]: + """Creates or updates a disk encryption set. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str + :param disk_encryption_set: disk encryption set object supplied in the body of the Put disk + encryption set operation. + :type disk_encryption_set: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either DiskEncryptionSet or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, + disk_encryption_set_name=disk_encryption_set_name, + disk_encryption_set=disk_encryption_set, cls=lambda x,y,z: x, **kwargs ) @@ -126,13 +148,16 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -147,93 +172,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - virtual_network_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> "_models.VirtualNetwork": - """Gets the specified virtual network by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.VirtualNetwork - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualNetwork', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore - - async def _create_or_update_initial( + async def _update_initial( self, resource_group_name: str, - virtual_network_name: str, - parameters: "_models.VirtualNetwork", + disk_encryption_set_name: str, + disk_encryption_set: "_models.DiskEncryptionSetUpdate", **kwargs: Any - ) -> "_models.VirtualNetwork": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + ) -> "_models.DiskEncryptionSet": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,65 +209,68 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetwork') + body_content = self._serialize.body(disk_encryption_set, 'DiskEncryptionSetUpdate') body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + if response.status_code == 202: + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - async def begin_create_or_update( + async def begin_update( self, resource_group_name: str, - virtual_network_name: str, - parameters: "_models.VirtualNetwork", + disk_encryption_set_name: str, + disk_encryption_set: "_models.DiskEncryptionSetUpdate", **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetwork"]: - """Creates or updates a virtual network in the specified resource group. + ) -> AsyncLROPoller["_models.DiskEncryptionSet"]: + """Updates (patches) a disk encryption set. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VirtualNetwork + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str + :param disk_encryption_set: disk encryption set object supplied in the body of the Patch disk + encryption set operation. + :type disk_encryption_set: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetwork] + :return: An instance of AsyncLROPoller that returns either DiskEncryptionSet or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - parameters=parameters, + disk_encryption_set_name=disk_encryption_set_name, + disk_encryption_set=disk_encryption_set, cls=lambda x,y,z: x, **kwargs ) @@ -314,16 +279,16 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -338,30 +303,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - async def _update_tags_initial( + async def get( self, resource_group_name: str, - virtual_network_name: str, - parameters: "_models.TagsObject", + disk_encryption_set_name: str, **kwargs: Any - ) -> "_models.VirtualNetwork": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + ) -> "_models.DiskEncryptionSet": + """Gets information about a disk encryption set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiskEncryptionSet, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -371,13 +347,9 @@ async def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -385,51 +357,93 @@ async def _update_tags_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - async def begin_update_tags( + async def _delete_initial( self, resource_group_name: str, - virtual_network_name: str, - parameters: "_models.TagsObject", + disk_encryption_set_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetwork"]: - """Updates a virtual network tags. + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + disk_encryption_set_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a disk encryption set. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param parameters: Parameters supplied to update virtual network tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetwork] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_tags_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - parameters=parameters, + disk_encryption_set_name=disk_encryption_set_name, cls=lambda x,y,z: x, **kwargs ) @@ -438,16 +452,13 @@ async def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetwork', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -462,26 +473,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - def list_all( + def list_by_resource_group( self, + resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkListResult"]: - """Gets all virtual networks in a subscription. + ) -> AsyncIterable["_models.DiskEncryptionSetList"]: + """Lists all the disk encryption sets under a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkListResult] + :return: An iterator like instance of either DiskEncryptionSetList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSetList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -490,9 +504,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -507,7 +522,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListResult', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSetList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -528,29 +543,26 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets'} # type: ignore def list( self, - resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkListResult"]: - """Gets all virtual networks in a resource group. + ) -> AsyncIterable["_models.DiskEncryptionSetList"]: + """Lists all the disk encryption sets under a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkListResult] + :return: An iterator like instance of either DiskEncryptionSetList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSetList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -561,7 +573,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -577,7 +588,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListResult', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSetList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -598,95 +609,34 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks'} # type: ignore - - async def check_ip_address_availability( - self, - resource_group_name: str, - virtual_network_name: str, - ip_address: Optional[str] = None, - **kwargs: Any - ) -> "_models.IPAddressAvailabilityResult": - """Checks whether a private IP address is available for use. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param ip_address: The private IP address to be verified. - :type ip_address: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: IPAddressAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.IPAddressAvailabilityResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.IPAddressAvailabilityResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.check_ip_address_availability.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if ip_address is not None: - query_parameters['ipAddress'] = self._serialize.query("ip_address", ip_address, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets'} # type: ignore - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('IPAddressAvailabilityResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - check_ip_address_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability'} # type: ignore - - def list_usage( + def list_associated_resources( self, resource_group_name: str, - virtual_network_name: str, + disk_encryption_set_name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkListUsageResult"]: - """Lists usage stats. + ) -> AsyncIterable["_models.ResourceUriList"]: + """Lists all resources that are encrypted with this disk encryption set. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListUsageResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkListUsageResult] + :return: An iterator like instance of either ResourceUriList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.ResourceUriList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListUsageResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceUriList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -695,11 +645,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_usage.metadata['url'] # type: ignore + url = self.list_associated_resources.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -714,7 +664,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListUsageResult', pipeline_response) + deserialized = self._deserialize('ResourceUriList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -735,4 +685,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_usage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages'} # type: ignore + list_associated_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_restore_point_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_restore_point_operations.py new file mode 100644 index 000000000000..ad795ee35ce4 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disk_restore_point_operations.py @@ -0,0 +1,459 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DiskRestorePointOperations: + """DiskRestorePointOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.compute.v2021_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + disk_restore_point_name: str, + **kwargs: Any + ) -> "_models.DiskRestorePoint": + """Get disk restorePoint resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. + :type disk_restore_point_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiskRestorePoint, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskRestorePoint + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskRestorePoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiskRestorePoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}'} # type: ignore + + def list_by_restore_point( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DiskRestorePointList"]: + """Lists diskRestorePoints under a vmRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. + :type vm_restore_point_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiskRestorePointList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskRestorePointList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskRestorePointList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_restore_point.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DiskRestorePointList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_restore_point.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints'} # type: ignore + + async def _grant_access_initial( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + disk_restore_point_name: str, + grant_access_data: "_models.GrantAccessData", + **kwargs: Any + ) -> Optional["_models.AccessUri"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AccessUri"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._grant_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _grant_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess'} # type: ignore + + async def begin_grant_access( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + disk_restore_point_name: str, + grant_access_data: "_models.GrantAccessData", + **kwargs: Any + ) -> AsyncLROPoller["_models.AccessUri"]: + """Grants access to a diskRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. + :type disk_restore_point_name: str + :param grant_access_data: Access data object supplied in the body of the get disk access + operation. + :type grant_access_data: ~azure.mgmt.compute.v2021_04_01.models.GrantAccessData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AccessUri or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.AccessUri] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessUri"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._grant_access_initial( + resource_group_name=resource_group_name, + restore_point_collection_name=restore_point_collection_name, + vm_restore_point_name=vm_restore_point_name, + disk_restore_point_name=disk_restore_point_name, + grant_access_data=grant_access_data, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess'} # type: ignore + + async def _revoke_access_initial( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + disk_restore_point_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self._revoke_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _revoke_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess'} # type: ignore + + async def begin_revoke_access( + self, + resource_group_name: str, + restore_point_collection_name: str, + vm_restore_point_name: str, + disk_restore_point_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Revokes access to a diskRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. + :type disk_restore_point_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._revoke_access_initial( + resource_group_name=resource_group_name, + restore_point_collection_name=restore_point_collection_name, + vm_restore_point_name=vm_restore_point_name, + disk_restore_point_name=disk_restore_point_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess'} # type: ignore diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_namespaces_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disks_operations.py similarity index 66% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_namespaces_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disks_operations.py index fe69a3d44bae..7a28036d418f 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_namespaces_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_disks_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PartnerNamespacesOperations: - """PartnerNamespacesOperations async operations. +class DisksOperations: + """DisksOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~azure.mgmt.compute.v2021_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,79 +43,19 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def get( - self, - resource_group_name: str, - partner_namespace_name: str, - **kwargs: Any - ) -> "_models.PartnerNamespace": - """Get a partner namespace. - - Get properties of a partner namespace. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerNamespace, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerNamespace - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartnerNamespace', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore - async def _create_or_update_initial( self, resource_group_name: str, - partner_namespace_name: str, - partner_namespace_info: "_models.PartnerNamespace", + disk_name: str, + disk: "_models.Disk", **kwargs: Any - ) -> "_models.PartnerNamespace": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] + ) -> "_models.Disk": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -124,7 +64,7 @@ async def _create_or_update_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -138,53 +78,57 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_namespace_info, 'PartnerNamespace') + body_content = self._serialize.body(disk, 'Disk') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerNamespace', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('Disk', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Disk', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - partner_namespace_name: str, - partner_namespace_info: "_models.PartnerNamespace", + disk_name: str, + disk: "_models.Disk", **kwargs: Any - ) -> AsyncLROPoller["_models.PartnerNamespace"]: - """Create a partner namespace. - - Asynchronously creates a new partner namespace with the specified parameters. + ) -> AsyncLROPoller["_models.Disk"]: + """Creates or updates a disk. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param partner_namespace_info: PartnerNamespace information. - :type partner_namespace_info: ~azure.mgmt.eventgrid.models.PartnerNamespace + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Put disk operation. + :type disk: ~azure.mgmt.compute.v2021_04_01.models.Disk :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PartnerNamespace or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.PartnerNamespace] + :return: An instance of AsyncLROPoller that returns either Disk or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.Disk] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -193,8 +137,8 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - partner_namespace_info=partner_namespace_info, + disk_name=disk_name, + disk=disk, cls=lambda x,y,z: x, **kwargs ) @@ -203,7 +147,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PartnerNamespace', pipeline_response) + deserialized = self._deserialize('Disk', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -212,7 +156,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -227,27 +171,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - async def _delete_initial( + async def _update_initial( self, resource_group_name: str, - partner_namespace_name: str, + disk_name: str, + disk: "_models.DiskUpdate", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.Disk": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -257,55 +204,71 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(disk, 'DiskUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('Disk', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Disk', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - async def begin_delete( + async def begin_update( self, resource_group_name: str, - partner_namespace_name: str, + disk_name: str, + disk: "_models.DiskUpdate", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a partner namespace. - - Delete existing partner namespace. + ) -> AsyncLROPoller["_models.Disk"]: + """Updates (patches) a disk. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Patch disk operation. + :type disk: ~azure.mgmt.compute.v2021_04_01.models.DiskUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either Disk or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.Disk] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._update_initial( resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, + disk_name=disk_name, + disk=disk, cls=lambda x,y,z: x, **kwargs ) @@ -314,13 +277,16 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Disk', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -335,30 +301,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - async def _update_initial( + async def get( self, resource_group_name: str, - partner_namespace_name: str, - partner_namespace_update_parameters: "_models.PartnerNamespaceUpdateParameters", + disk_name: str, **kwargs: Any - ) -> Optional["_models.PartnerNamespace"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PartnerNamespace"]] + ) -> "_models.Disk": + """Gets information about a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Disk, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.Disk + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - content_type = kwargs.pop("content_type", "application/json") + api_version = "2021-04-01" accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -368,47 +345,80 @@ async def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_namespace_update_parameters, 'PartnerNamespaceUpdateParameters') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('PartnerNamespace', pipeline_response) + deserialized = self._deserialize('Disk', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - async def begin_update( + async def _delete_initial( self, resource_group_name: str, - partner_namespace_name: str, - partner_namespace_update_parameters: "_models.PartnerNamespaceUpdateParameters", + disk_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.PartnerNamespace"]: - """Update a partner namespace. + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - Asynchronously updates a partner namespace with the specified parameters. + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + disk_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a disk. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param partner_namespace_update_parameters: Partner namespace update information. - :type partner_namespace_update_parameters: ~azure.mgmt.eventgrid.models.PartnerNamespaceUpdateParameters + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -420,17 +430,16 @@ async def begin_update( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - partner_namespace_update_parameters=partner_namespace_update_parameters, + disk_name=disk_name, cls=lambda x,y,z: x, **kwargs ) @@ -439,16 +448,13 @@ async def begin_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PartnerNamespace', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -463,40 +469,28 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - def list_by_subscription( + def list_by_resource_group( self, - filter: Optional[str] = None, - top: Optional[int] = None, + resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PartnerNamespacesListResult"]: - """List partner namespaces under an Azure subscription. - - List all the partner namespaces under an Azure subscription. - - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int + ) -> AsyncIterable["_models.DiskList"]: + """Lists all the disks under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerNamespacesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerNamespacesListResult] + :return: An iterator like instance of either DiskList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespacesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -506,18 +500,15 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -527,7 +518,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerNamespacesListResult', pipeline_response) + deserialized = self._deserialize('DiskList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -548,43 +539,25 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerNamespaces'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} # type: ignore - def list_by_resource_group( + def list( self, - resource_group_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.PartnerNamespacesListResult"]: - """List partner namespaces under a resource group. + ) -> AsyncIterable["_models.DiskList"]: + """Lists all the disks under a subscription. - List all the partner namespaces under a resource group. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerNamespacesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerNamespacesListResult] + :return: An iterator like instance of either DiskList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespacesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -594,19 +567,14 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -616,7 +584,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerNamespacesListResult', pipeline_response) + deserialized = self._deserialize('DiskList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -637,41 +605,30 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} # type: ignore - async def list_shared_access_keys( + async def _grant_access_initial( self, resource_group_name: str, - partner_namespace_name: str, + disk_name: str, + grant_access_data: "_models.GrantAccessData", **kwargs: Any - ) -> "_models.PartnerNamespaceSharedAccessKeys": - """List keys for a partner namespace. - - List the two keys used to publish to a partner namespace. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerNamespaceSharedAccessKeys, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerNamespaceSharedAccessKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespaceSharedAccessKeys"] + ) -> Optional["_models.AccessUri"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AccessUri"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.list_shared_access_keys.metadata['url'] # type: ignore + url = self._grant_access_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -681,61 +638,123 @@ async def list_shared_access_keys( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerNamespaceSharedAccessKeys', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_shared_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/listKeys'} # type: ignore + _grant_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} # type: ignore - async def regenerate_key( + async def begin_grant_access( self, resource_group_name: str, - partner_namespace_name: str, - regenerate_key_request: "_models.PartnerNamespaceRegenerateKeyRequest", + disk_name: str, + grant_access_data: "_models.GrantAccessData", **kwargs: Any - ) -> "_models.PartnerNamespaceSharedAccessKeys": - """Regenerate key for a partner namespace. + ) -> AsyncLROPoller["_models.AccessUri"]: + """Grants access to a disk. - Regenerate a shared access key for a partner namespace. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param regenerate_key_request: Request body to regenerate key. - :type regenerate_key_request: ~azure.mgmt.eventgrid.models.PartnerNamespaceRegenerateKeyRequest + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :param grant_access_data: Access data object supplied in the body of the get disk access + operation. + :type grant_access_data: ~azure.mgmt.compute.v2021_04_01.models.GrantAccessData :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerNamespaceSharedAccessKeys, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerNamespaceSharedAccessKeys - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either AccessUri or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.AccessUri] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespaceSharedAccessKeys"] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessUri"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._grant_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + grant_access_data=grant_access_data, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} # type: ignore + + async def _revoke_access_initial( + self, + resource_group_name: str, + disk_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = "2021-04-01" # Construct URL - url = self.regenerate_key.metadata['url'] # type: ignore + url = self._revoke_access_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -745,24 +764,82 @@ async def regenerate_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(regenerate_key_request, 'PartnerNamespaceRegenerateKeyRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerNamespaceSharedAccessKeys', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/regenerateKey'} # type: ignore + _revoke_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} # type: ignore + + async def begin_revoke_access( + self, + resource_group_name: str, + disk_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Revokes access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._revoke_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_gateway_connections_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_snapshots_operations.py similarity index 63% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_gateway_connections_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_snapshots_operations.py index f6bc725deced..34166cf00e9b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_gateway_connections_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/aio/operations/_snapshots_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkGatewayConnectionsOperations: - """VirtualNetworkGatewayConnectionsOperations async operations. +class SnapshotsOperations: + """SnapshotsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.compute.v2021_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,25 +46,25 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _create_or_update_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.VirtualNetworkGatewayConnection", + snapshot_name: str, + snapshot: "_models.Snapshot", **kwargs: Any - ) -> "_models.VirtualNetworkGatewayConnection": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + ) -> "_models.Snapshot": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,57 +78,57 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') + body_content = self._serialize.body(snapshot, 'Snapshot') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('Snapshot', pipeline_response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.VirtualNetworkGatewayConnection", + snapshot_name: str, + snapshot: "_models.Snapshot", **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGatewayConnection"]: - """Creates or updates a virtual network gateway connection in the specified resource group. + ) -> AsyncLROPoller["_models.Snapshot"]: + """Creates or updates a snapshot. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the create or update virtual network gateway - connection operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnection + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Put disk operation. + :type snapshot: ~azure.mgmt.compute.v2021_04_01.models.Snapshot :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnection] + :return: An instance of AsyncLROPoller that returns either Snapshot or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -137,8 +137,8 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + snapshot_name=snapshot_name, + snapshot=snapshot, cls=lambda x,y,z: x, **kwargs ) @@ -147,16 +147,16 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('Snapshot', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -171,40 +171,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - async def get( + async def _update_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, + snapshot_name: str, + snapshot: "_models.SnapshotUpdate", **kwargs: Any - ) -> "_models.VirtualNetworkGatewayConnection": - """Gets the specified virtual network gateway connection by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGatewayConnection, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + ) -> "_models.Snapshot": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -214,100 +204,71 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(snapshot, 'SnapshotUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - async def _delete_initial( + async def begin_update( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, + snapshot_name: str, + snapshot: "_models.SnapshotUpdate", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - virtual_network_gateway_connection_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified virtual network Gateway connection. + ) -> AsyncLROPoller["_models.Snapshot"]: + """Updates (patches) a snapshot. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Patch snapshot operation. + :type snapshot: ~azure.mgmt.compute.v2021_04_01.models.SnapshotUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either Snapshot or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + snapshot_name=snapshot_name, + snapshot=snapshot, cls=lambda x,y,z: x, **kwargs ) @@ -316,16 +277,19 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Snapshot', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -337,30 +301,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - async def _update_tags_initial( + async def get( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.TagsObject", + snapshot_name: str, **kwargs: Any - ) -> "_models.VirtualNetworkGatewayConnectionListEntity": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListEntity"] + ) -> "_models.Snapshot": + """Gets information about a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.Snapshot + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -370,13 +345,9 @@ async def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -384,108 +355,33 @@ async def _update_tags_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListEntity', pipeline_response) + deserialized = self._deserialize('Snapshot', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGatewayConnectionListEntity"]: - """Updates a virtual network gateway connection tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to update virtual network gateway connection tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayConnectionListEntity or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionListEntity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListEntity"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListEntity', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - async def _set_shared_key_initial( + async def _delete_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionSharedKey", + snapshot_name: str, **kwargs: Any - ) -> "_models.ConnectionSharedKey": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-04-01" # Construct URL - url = self._set_shared_key_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -495,72 +391,55 @@ async def _set_shared_key_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionSharedKey') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _set_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - async def begin_set_shared_key( + async def begin_delete( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionSharedKey", + snapshot_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.ConnectionSharedKey"]: - """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + ) -> AsyncLROPoller[None]: + """Deletes a snapshot. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection - Shared key operation throughNetwork resource provider. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ConnectionSharedKey + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ConnectionSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ConnectionSharedKey] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._set_shared_key_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + snapshot_name=snapshot_name, cls=lambda x,y,z: x, **kwargs ) @@ -569,16 +448,13 @@ async def begin_set_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -593,90 +469,96 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - async def get_shared_key( + def list_by_resource_group( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, **kwargs: Any - ) -> "_models.ConnectionSharedKey": - """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the - specified virtual network gateway connection shared key through Network resource provider. + ) -> AsyncIterable["_models.SnapshotList"]: + """Lists snapshots under a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection shared - key name. - :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConnectionSharedKey, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ConnectionSharedKey + :return: An iterator like instance of either SnapshotList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.SnapshotList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" - # Construct URL - url = self.get_shared_key.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + async def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def get_next(next_link=None): + request = prepare_request(next_link) - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - if cls: - return cls(pipeline_response, deserialized, {}) + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return deserialized - get_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} # type: ignore def list( self, - resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkGatewayConnectionListResult"]: - """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways - connections created. + ) -> AsyncIterable["_models.SnapshotList"]: + """Lists snapshots under a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionListResult] + :return: An iterator like instance of either SnapshotList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.compute.v2021_04_01.models.SnapshotList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -687,7 +569,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -703,7 +584,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListResult', pipeline_response) + deserialized = self._deserialize('SnapshotList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -724,30 +605,30 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} # type: ignore - async def _reset_shared_key_initial( + async def _grant_access_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionResetSharedKey", + snapshot_name: str, + grant_access_data: "_models.GrantAccessData", **kwargs: Any - ) -> Optional["_models.ConnectionResetSharedKey"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + ) -> Optional["_models.AccessUri"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AccessUri"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._reset_shared_key_initial.metadata['url'] # type: ignore + url = self._grant_access_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -761,7 +642,7 @@ async def _reset_shared_key_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionResetSharedKey') + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -773,55 +654,54 @@ async def _reset_shared_key_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + deserialized = self._deserialize('AccessUri', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _reset_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + _grant_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} # type: ignore - async def begin_reset_shared_key( + async def begin_grant_access( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionResetSharedKey", + snapshot_name: str, + grant_access_data: "_models.GrantAccessData", **kwargs: Any - ) -> AsyncLROPoller["_models.ConnectionResetSharedKey"]: - """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + ) -> AsyncLROPoller["_models.AccessUri"]: + """Grants access to a snapshot. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection reset - shared key Name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the begin reset virtual network gateway connection - shared key operation through network resource provider. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ConnectionResetSharedKey + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :param grant_access_data: Access data object supplied in the body of the get snapshot access + operation. + :type grant_access_data: ~azure.mgmt.compute.v2021_04_01.models.GrantAccessData :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ConnectionResetSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ConnectionResetSharedKey] + :return: An instance of AsyncLROPoller that returns either AccessUri or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.compute.v2021_04_01.models.AccessUri] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessUri"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._reset_shared_key_initial( + raw_result = await self._grant_access_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + snapshot_name=snapshot_name, + grant_access_data=grant_access_data, cls=lambda x,y,z: x, **kwargs ) @@ -830,16 +710,124 @@ async def begin_reset_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + deserialized = self._deserialize('AccessUri', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} # type: ignore + + async def _revoke_access_initial( + self, + resource_group_name: str, + snapshot_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + + # Construct URL + url = self._revoke_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _revoke_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} # type: ignore + + async def begin_revoke_access( + self, + resource_group_name: str, + snapshot_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Revokes access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._revoke_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -854,4 +842,4 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + begin_revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/__init__.py index e053ed5004bf..72303e98a92c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/__init__.py @@ -7,6 +7,7 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AccessUri from ._models_py3 import AdditionalCapabilities from ._models_py3 import AdditionalUnattendContent from ._models_py3 import ApiEntityReference @@ -35,6 +36,7 @@ from ._models_py3 import CapacityReservationUtilization from ._models_py3 import ComputeOperationListResult from ._models_py3 import ComputeOperationValue + from ._models_py3 import CreationData from ._models_py3 import DataDisk from ._models_py3 import DataDiskImage from ._models_py3 import DedicatedHost @@ -51,14 +53,33 @@ from ._models_py3 import DiagnosticsProfile from ._models_py3 import DiffDiskSettings from ._models_py3 import DisallowedConfiguration + from ._models_py3 import Disk + from ._models_py3 import DiskAccess + from ._models_py3 import DiskAccessList + from ._models_py3 import DiskAccessUpdate + from ._models_py3 import DiskEncryptionSet + from ._models_py3 import DiskEncryptionSetList from ._models_py3 import DiskEncryptionSetParameters + from ._models_py3 import DiskEncryptionSetUpdate from ._models_py3 import DiskEncryptionSettings from ._models_py3 import DiskInstanceView + from ._models_py3 import DiskList + from ._models_py3 import DiskRestorePoint + from ._models_py3 import DiskRestorePointList + from ._models_py3 import DiskSecurityProfile + from ._models_py3 import DiskSku + from ._models_py3 import DiskUpdate + from ._models_py3 import Encryption + from ._models_py3 import EncryptionSetIdentity + from ._models_py3 import EncryptionSettingsCollection + from ._models_py3 import EncryptionSettingsElement from ._models_py3 import ExtendedLocation + from ._models_py3 import GrantAccessData from ._models_py3 import HardwareProfile from ._models_py3 import Image from ._models_py3 import ImageDataDisk from ._models_py3 import ImageDisk + from ._models_py3 import ImageDiskReference from ._models_py3 import ImageListResult from ._models_py3 import ImageOSDisk from ._models_py3 import ImageReference @@ -66,6 +87,9 @@ from ._models_py3 import ImageUpdate from ._models_py3 import InnerError from ._models_py3 import InstanceViewStatus + from ._models_py3 import KeyForDiskEncryptionSet + from ._models_py3 import KeyVaultAndKeyReference + from ._models_py3 import KeyVaultAndSecretReference from ._models_py3 import KeyVaultKeyReference from ._models_py3 import KeyVaultSecretReference from ._models_py3 import LastPatchInstallationSummary @@ -88,15 +112,25 @@ from ._models_py3 import PatchInstallationDetail from ._models_py3 import PatchSettings from ._models_py3 import Plan + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import PropertyUpdatesInProgress from ._models_py3 import ProximityPlacementGroup from ._models_py3 import ProximityPlacementGroupListResult from ._models_py3 import ProximityPlacementGroupUpdate + from ._models_py3 import ProxyOnlyResource from ._models_py3 import ProxyResource from ._models_py3 import PublicIPAddressSku from ._models_py3 import PurchasePlan + from ._models_py3 import PurchasePlanAutoGenerated from ._models_py3 import RecoveryWalkResponse from ._models_py3 import RequestRateByIntervalInput from ._models_py3 import Resource + from ._models_py3 import ResourceUriList from ._models_py3 import RestorePoint from ._models_py3 import RestorePointCollection from ._models_py3 import RestorePointCollectionListResult @@ -123,7 +157,13 @@ from ._models_py3 import ScaleInPolicy from ._models_py3 import ScheduledEventsProfile from ._models_py3 import SecurityProfile + from ._models_py3 import ShareInfoElement from ._models_py3 import Sku + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotList + from ._models_py3 import SnapshotSku + from ._models_py3 import SnapshotUpdate + from ._models_py3 import SourceVault from ._models_py3 import SpotRestorePolicy from ._models_py3 import SshConfiguration from ._models_py3 import SshPublicKey @@ -135,6 +175,7 @@ from ._models_py3 import SubResource from ._models_py3 import SubResourceReadOnly from ._models_py3 import SubResourceWithColocationStatus + from ._models_py3 import SupportedCapabilities from ._models_py3 import TerminateNotificationProfile from ._models_py3 import ThrottledRequestsInput from ._models_py3 import UefiSettings @@ -243,6 +284,7 @@ from ._models_py3 import WindowsConfiguration from ._models_py3 import WindowsParameters except (SyntaxError, ImportError): + from ._models import AccessUri # type: ignore from ._models import AdditionalCapabilities # type: ignore from ._models import AdditionalUnattendContent # type: ignore from ._models import ApiEntityReference # type: ignore @@ -271,6 +313,7 @@ from ._models import CapacityReservationUtilization # type: ignore from ._models import ComputeOperationListResult # type: ignore from ._models import ComputeOperationValue # type: ignore + from ._models import CreationData # type: ignore from ._models import DataDisk # type: ignore from ._models import DataDiskImage # type: ignore from ._models import DedicatedHost # type: ignore @@ -287,14 +330,33 @@ from ._models import DiagnosticsProfile # type: ignore from ._models import DiffDiskSettings # type: ignore from ._models import DisallowedConfiguration # type: ignore + from ._models import Disk # type: ignore + from ._models import DiskAccess # type: ignore + from ._models import DiskAccessList # type: ignore + from ._models import DiskAccessUpdate # type: ignore + from ._models import DiskEncryptionSet # type: ignore + from ._models import DiskEncryptionSetList # type: ignore from ._models import DiskEncryptionSetParameters # type: ignore + from ._models import DiskEncryptionSetUpdate # type: ignore from ._models import DiskEncryptionSettings # type: ignore from ._models import DiskInstanceView # type: ignore + from ._models import DiskList # type: ignore + from ._models import DiskRestorePoint # type: ignore + from ._models import DiskRestorePointList # type: ignore + from ._models import DiskSecurityProfile # type: ignore + from ._models import DiskSku # type: ignore + from ._models import DiskUpdate # type: ignore + from ._models import Encryption # type: ignore + from ._models import EncryptionSetIdentity # type: ignore + from ._models import EncryptionSettingsCollection # type: ignore + from ._models import EncryptionSettingsElement # type: ignore from ._models import ExtendedLocation # type: ignore + from ._models import GrantAccessData # type: ignore from ._models import HardwareProfile # type: ignore from ._models import Image # type: ignore from ._models import ImageDataDisk # type: ignore from ._models import ImageDisk # type: ignore + from ._models import ImageDiskReference # type: ignore from ._models import ImageListResult # type: ignore from ._models import ImageOSDisk # type: ignore from ._models import ImageReference # type: ignore @@ -302,6 +364,9 @@ from ._models import ImageUpdate # type: ignore from ._models import InnerError # type: ignore from ._models import InstanceViewStatus # type: ignore + from ._models import KeyForDiskEncryptionSet # type: ignore + from ._models import KeyVaultAndKeyReference # type: ignore + from ._models import KeyVaultAndSecretReference # type: ignore from ._models import KeyVaultKeyReference # type: ignore from ._models import KeyVaultSecretReference # type: ignore from ._models import LastPatchInstallationSummary # type: ignore @@ -324,15 +389,25 @@ from ._models import PatchInstallationDetail # type: ignore from ._models import PatchSettings # type: ignore from ._models import Plan # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import PropertyUpdatesInProgress # type: ignore from ._models import ProximityPlacementGroup # type: ignore from ._models import ProximityPlacementGroupListResult # type: ignore from ._models import ProximityPlacementGroupUpdate # type: ignore + from ._models import ProxyOnlyResource # type: ignore from ._models import ProxyResource # type: ignore from ._models import PublicIPAddressSku # type: ignore from ._models import PurchasePlan # type: ignore + from ._models import PurchasePlanAutoGenerated # type: ignore from ._models import RecoveryWalkResponse # type: ignore from ._models import RequestRateByIntervalInput # type: ignore from ._models import Resource # type: ignore + from ._models import ResourceUriList # type: ignore from ._models import RestorePoint # type: ignore from ._models import RestorePointCollection # type: ignore from ._models import RestorePointCollectionListResult # type: ignore @@ -359,7 +434,13 @@ from ._models import ScaleInPolicy # type: ignore from ._models import ScheduledEventsProfile # type: ignore from ._models import SecurityProfile # type: ignore + from ._models import ShareInfoElement # type: ignore from ._models import Sku # type: ignore + from ._models import Snapshot # type: ignore + from ._models import SnapshotList # type: ignore + from ._models import SnapshotSku # type: ignore + from ._models import SnapshotUpdate # type: ignore + from ._models import SourceVault # type: ignore from ._models import SpotRestorePolicy # type: ignore from ._models import SshConfiguration # type: ignore from ._models import SshPublicKey # type: ignore @@ -371,6 +452,7 @@ from ._models import SubResource # type: ignore from ._models import SubResourceReadOnly # type: ignore from ._models import SubResourceWithColocationStatus # type: ignore + from ._models import SupportedCapabilities # type: ignore from ._models import TerminateNotificationProfile # type: ignore from ._models import ThrottledRequestsInput # type: ignore from ._models import UefiSettings # type: ignore @@ -480,6 +562,7 @@ from ._models import WindowsParameters # type: ignore from ._compute_management_client_enums import ( + AccessLevel, AvailabilitySetSkuTypes, CachingTypes, CapacityReservationGroupInstanceViewTypes, @@ -489,13 +572,21 @@ DeleteOptions, DiffDiskOptions, DiffDiskPlacement, + DiskCreateOption, DiskCreateOptionTypes, DiskDeleteOptionTypes, DiskDetachOptionTypes, + DiskEncryptionSetIdentityType, + DiskEncryptionSetType, + DiskSecurityTypes, + DiskState, + DiskStorageAccountTypes, + EncryptionType, ExecutionState, ExpandTypesForGetCapacityReservationGroups, ExpandTypesForGetVMScaleSets, ExtendedLocationTypes, + HyperVGeneration, HyperVGenerationType, HyperVGenerationTypes, IPVersion, @@ -505,6 +596,7 @@ LinuxPatchAssessmentMode, LinuxVMGuestPatchMode, MaintenanceOperationResultCodeTypes, + NetworkAccessPolicy, NetworkApiVersion, OperatingSystemStateTypes, OperatingSystemType, @@ -516,17 +608,21 @@ PatchAssessmentState, PatchInstallationState, PatchOperationStatus, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, ProtocolTypes, ProximityPlacementGroupType, PublicIPAddressSkuName, PublicIPAddressSkuTier, PublicIPAllocationMethod, + PublicNetworkAccess, ResourceIdentityType, RestorePointCollectionExpandOptions, RollingUpgradeActionType, RollingUpgradeStatusCode, SecurityTypes, SettingNames, + SnapshotStorageAccountTypes, StatusLevelTypes, StorageAccountTypes, UpgradeMode, @@ -548,6 +644,7 @@ ) __all__ = [ + 'AccessUri', 'AdditionalCapabilities', 'AdditionalUnattendContent', 'ApiEntityReference', @@ -576,6 +673,7 @@ 'CapacityReservationUtilization', 'ComputeOperationListResult', 'ComputeOperationValue', + 'CreationData', 'DataDisk', 'DataDiskImage', 'DedicatedHost', @@ -592,14 +690,33 @@ 'DiagnosticsProfile', 'DiffDiskSettings', 'DisallowedConfiguration', + 'Disk', + 'DiskAccess', + 'DiskAccessList', + 'DiskAccessUpdate', + 'DiskEncryptionSet', + 'DiskEncryptionSetList', 'DiskEncryptionSetParameters', + 'DiskEncryptionSetUpdate', 'DiskEncryptionSettings', 'DiskInstanceView', + 'DiskList', + 'DiskRestorePoint', + 'DiskRestorePointList', + 'DiskSecurityProfile', + 'DiskSku', + 'DiskUpdate', + 'Encryption', + 'EncryptionSetIdentity', + 'EncryptionSettingsCollection', + 'EncryptionSettingsElement', 'ExtendedLocation', + 'GrantAccessData', 'HardwareProfile', 'Image', 'ImageDataDisk', 'ImageDisk', + 'ImageDiskReference', 'ImageListResult', 'ImageOSDisk', 'ImageReference', @@ -607,6 +724,9 @@ 'ImageUpdate', 'InnerError', 'InstanceViewStatus', + 'KeyForDiskEncryptionSet', + 'KeyVaultAndKeyReference', + 'KeyVaultAndSecretReference', 'KeyVaultKeyReference', 'KeyVaultSecretReference', 'LastPatchInstallationSummary', @@ -629,15 +749,25 @@ 'PatchInstallationDetail', 'PatchSettings', 'Plan', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'PropertyUpdatesInProgress', 'ProximityPlacementGroup', 'ProximityPlacementGroupListResult', 'ProximityPlacementGroupUpdate', + 'ProxyOnlyResource', 'ProxyResource', 'PublicIPAddressSku', 'PurchasePlan', + 'PurchasePlanAutoGenerated', 'RecoveryWalkResponse', 'RequestRateByIntervalInput', 'Resource', + 'ResourceUriList', 'RestorePoint', 'RestorePointCollection', 'RestorePointCollectionListResult', @@ -664,7 +794,13 @@ 'ScaleInPolicy', 'ScheduledEventsProfile', 'SecurityProfile', + 'ShareInfoElement', 'Sku', + 'Snapshot', + 'SnapshotList', + 'SnapshotSku', + 'SnapshotUpdate', + 'SourceVault', 'SpotRestorePolicy', 'SshConfiguration', 'SshPublicKey', @@ -676,6 +812,7 @@ 'SubResource', 'SubResourceReadOnly', 'SubResourceWithColocationStatus', + 'SupportedCapabilities', 'TerminateNotificationProfile', 'ThrottledRequestsInput', 'UefiSettings', @@ -783,6 +920,7 @@ 'WinRMListener', 'WindowsConfiguration', 'WindowsParameters', + 'AccessLevel', 'AvailabilitySetSkuTypes', 'CachingTypes', 'CapacityReservationGroupInstanceViewTypes', @@ -792,13 +930,21 @@ 'DeleteOptions', 'DiffDiskOptions', 'DiffDiskPlacement', + 'DiskCreateOption', 'DiskCreateOptionTypes', 'DiskDeleteOptionTypes', 'DiskDetachOptionTypes', + 'DiskEncryptionSetIdentityType', + 'DiskEncryptionSetType', + 'DiskSecurityTypes', + 'DiskState', + 'DiskStorageAccountTypes', + 'EncryptionType', 'ExecutionState', 'ExpandTypesForGetCapacityReservationGroups', 'ExpandTypesForGetVMScaleSets', 'ExtendedLocationTypes', + 'HyperVGeneration', 'HyperVGenerationType', 'HyperVGenerationTypes', 'IPVersion', @@ -808,6 +954,7 @@ 'LinuxPatchAssessmentMode', 'LinuxVMGuestPatchMode', 'MaintenanceOperationResultCodeTypes', + 'NetworkAccessPolicy', 'NetworkApiVersion', 'OperatingSystemStateTypes', 'OperatingSystemType', @@ -819,17 +966,21 @@ 'PatchAssessmentState', 'PatchInstallationState', 'PatchOperationStatus', + 'PrivateEndpointConnectionProvisioningState', + 'PrivateEndpointServiceConnectionStatus', 'ProtocolTypes', 'ProximityPlacementGroupType', 'PublicIPAddressSkuName', 'PublicIPAddressSkuTier', 'PublicIPAllocationMethod', + 'PublicNetworkAccess', 'ResourceIdentityType', 'RestorePointCollectionExpandOptions', 'RollingUpgradeActionType', 'RollingUpgradeStatusCode', 'SecurityTypes', 'SettingNames', + 'SnapshotStorageAccountTypes', 'StatusLevelTypes', 'StorageAccountTypes', 'UpgradeMode', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_compute_management_client_enums.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_compute_management_client_enums.py index f8e51453ad97..d0032bc2af61 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_compute_management_client_enums.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_compute_management_client_enums.py @@ -26,6 +26,12 @@ def __getattr__(cls, name): raise AttributeError(name) +class AccessLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + NONE = "None" + READ = "Read" + WRITE = "Write" + class AvailabilitySetSkuTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies the sku of an Availability Set. Use 'Aligned' for virtual machines with managed disks and 'Classic' for virtual machines with unmanaged disks. Default value is 'Classic'. @@ -99,6 +105,32 @@ class DiffDiskPlacement(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): CACHE_DISK = "CacheDisk" RESOURCE_DISK = "ResourceDisk" +class DiskCreateOption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """This enumerates the possible sources of a disk's creation. + """ + + #: Create an empty data disk of a size given by diskSizeGB. + EMPTY = "Empty" + #: Disk will be attached to a VM. + ATTACH = "Attach" + #: Create a new disk from a platform image specified by the given imageReference or + #: galleryImageReference. + FROM_IMAGE = "FromImage" + #: Create a disk by importing from a blob specified by a sourceUri in a storage account specified + #: by storageAccountId. + IMPORT_ENUM = "Import" + #: Create a new disk or snapshot by copying from a disk or snapshot specified by the given + #: sourceResourceId. + COPY = "Copy" + #: Create a new disk by copying from a backup recovery point. + RESTORE = "Restore" + #: Create a new disk by obtaining a write token and using it to directly upload the contents of + #: the disk. + UPLOAD = "Upload" + #: Create a new disk by using a deep copy process, where the resource creation is considered + #: complete only after all data has been copied from the source. + COPY_START = "CopyStart" + class DiskCreateOptionTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies how the virtual machine should be created.:code:`
`:code:`
` Possible values are::code:`
`:code:`
` **Attach** \u2013 This value is used when you are using a @@ -137,6 +169,91 @@ class DiskDetachOptionTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) FORCE_DETACH = "ForceDetach" +class DiskEncryptionSetIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is supported + for new creations. Disk Encryption Sets can be updated with Identity type None during migration + of subscription to a new Azure Active Directory tenant; it will cause the encrypted resources + to lose access to the keys. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + NONE = "None" + +class DiskEncryptionSetType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of key used to encrypt the data of the disk. + """ + + #: Resource using diskEncryptionSet would be encrypted at rest with Customer managed key that can + #: be changed and revoked by a customer. + ENCRYPTION_AT_REST_WITH_CUSTOMER_KEY = "EncryptionAtRestWithCustomerKey" + #: Resource using diskEncryptionSet would be encrypted at rest with two layers of encryption. One + #: of the keys is Customer managed and the other key is Platform managed. + ENCRYPTION_AT_REST_WITH_PLATFORM_AND_CUSTOMER_KEYS = "EncryptionAtRestWithPlatformAndCustomerKeys" + +class DiskSecurityTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the SecurityType of the VM. Applicable for OS disks only. + """ + + #: Trusted Launch provides security features such as secure boot and virtual Trusted Platform + #: Module (vTPM). + TRUSTED_LAUNCH = "TrustedLaunch" + +class DiskState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """This enumerates the possible state of the disk. + """ + + #: The disk is not being used and can be attached to a VM. + UNATTACHED = "Unattached" + #: The disk is currently attached to a running VM. + ATTACHED = "Attached" + #: The disk is attached to a stopped-deallocated VM. + RESERVED = "Reserved" + #: The disk is attached to a VM which is in hibernated state. + FROZEN = "Frozen" + #: The disk currently has an Active SAS Uri associated with it. + ACTIVE_SAS = "ActiveSAS" + #: The disk is attached to a VM in hibernated state and has an active SAS URI associated with it. + ACTIVE_SAS_FROZEN = "ActiveSASFrozen" + #: A disk is ready to be created by upload by requesting a write token. + READY_TO_UPLOAD = "ReadyToUpload" + #: A disk is created for upload and a write token has been issued for uploading to it. + ACTIVE_UPLOAD = "ActiveUpload" + +class DiskStorageAccountTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The sku name. + """ + + #: Standard HDD locally redundant storage. Best for backup, non-critical, and infrequent access. + STANDARD_LRS = "Standard_LRS" + #: Premium SSD locally redundant storage. Best for production and performance sensitive workloads. + PREMIUM_LRS = "Premium_LRS" + #: Standard SSD locally redundant storage. Best for web servers, lightly used enterprise + #: applications and dev/test. + STANDARD_SSD_LRS = "StandardSSD_LRS" + #: Ultra SSD locally redundant storage. Best for IO-intensive workloads such as SAP HANA, top tier + #: databases (for example, SQL, Oracle), and other transaction-heavy workloads. + ULTRA_SSD_LRS = "UltraSSD_LRS" + #: Premium SSD zone redundant storage. Best for the production workloads that need storage + #: resiliency against zone failures. + PREMIUM_ZRS = "Premium_ZRS" + #: Standard SSD zone redundant storage. Best for web servers, lightly used enterprise applications + #: and dev/test that need storage resiliency against zone failures. + STANDARD_SSD_ZRS = "StandardSSD_ZRS" + +class EncryptionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of key used to encrypt the data of the disk. + """ + + #: Disk is encrypted at rest with Platform managed key. It is the default encryption type. This is + #: not a valid encryption type for disk encryption sets. + ENCRYPTION_AT_REST_WITH_PLATFORM_KEY = "EncryptionAtRestWithPlatformKey" + #: Disk is encrypted at rest with Customer managed key that can be changed and revoked by a + #: customer. + ENCRYPTION_AT_REST_WITH_CUSTOMER_KEY = "EncryptionAtRestWithCustomerKey" + #: Disk is encrypted at rest with 2 layers of encryption. One of the keys is Customer managed and + #: the other key is Platform managed. + ENCRYPTION_AT_REST_WITH_PLATFORM_AND_CUSTOMER_KEYS = "EncryptionAtRestWithPlatformAndCustomerKeys" + class ExecutionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Script execution status. """ @@ -164,6 +281,13 @@ class ExtendedLocationTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) EDGE_ZONE = "EdgeZone" +class HyperVGeneration(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The hypervisor generation of the Virtual Machine. Applicable to OS disks only. + """ + + V1 = "V1" + V2 = "V2" + class HyperVGenerationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies the HyperVGeneration Type associated with a resource """ @@ -242,6 +366,17 @@ class MaintenanceOperationResultCodeTypes(with_metaclass(_CaseInsensitiveEnumMet MAINTENANCE_ABORTED = "MaintenanceAborted" MAINTENANCE_COMPLETED = "MaintenanceCompleted" +class NetworkAccessPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Policy for accessing the disk via network. + """ + + #: The disk can be exported or uploaded to from any network. + ALLOW_ALL = "AllowAll" + #: The disk can be exported or uploaded to using a DiskAccess resource's private endpoints. + ALLOW_PRIVATE = "AllowPrivate" + #: The disk cannot be exported. + DENY_ALL = "DenyAll" + class NetworkApiVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """specifies the Microsoft.Network API version used when creating networking resources in the Network Interface Configurations @@ -331,6 +466,23 @@ class PatchOperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SUCCEEDED = "Succeeded" COMPLETED_WITH_WARNINGS = "CompletedWithWarnings" +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + +class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private endpoint connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + class ProtocolTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies the protocol of WinRM listener. :code:`
`:code:`
` Possible values are: :code:`
`\ **http** :code:`
`:code:`
` **https** @@ -369,6 +521,19 @@ class PublicIPAllocationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enu DYNAMIC = "Dynamic" STATIC = "Static" +class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Policy for controlling export on the disk. + """ + + #: You can generate a SAS URI to access the underlying data of the disk publicly on the internet + #: when NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from + #: your trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate. + ENABLED = "Enabled" + #: You cannot access the underlying data of the disk publicly on the internet even when + #: NetworkAccessPolicy is set to AllowAll. You can access the data via the SAS URI only from your + #: trusted Azure VNET when NetworkAccessPolicy is set to AllowPrivate. + DISABLED = "Disabled" + class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of identity used for the virtual machine. The type 'SystemAssigned, UserAssigned' includes both an implicitly created identity and a set of user assigned identities. The type @@ -416,6 +581,17 @@ class SettingNames(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): AUTO_LOGON = "AutoLogon" FIRST_LOGON_COMMANDS = "FirstLogonCommands" +class SnapshotStorageAccountTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The sku name. + """ + + #: Standard HDD locally redundant storage. + STANDARD_LRS = "Standard_LRS" + #: Premium SSD locally redundant storage. + PREMIUM_LRS = "Premium_LRS" + #: Standard zone redundant storage. + STANDARD_ZRS = "Standard_ZRS" + class StatusLevelTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The level code. """ diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models.py index a5df883fa67a..1ead4747378c 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models.py @@ -9,6 +9,31 @@ import msrest.serialization +class AccessUri(msrest.serialization.Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + class AdditionalCapabilities(msrest.serialization.Model): """Enables or disables a capability on the virtual machine or virtual machine scale set. @@ -1136,6 +1161,77 @@ def __init__( self.provider = None +class CreationData(msrest.serialization.Model): + """Data used when creating a disk. + + 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 create_option: Required. This enumerates the possible sources of a disk's creation. + Possible values include: "Empty", "Attach", "FromImage", "Import", "Copy", "Restore", "Upload", + "CopyStart". + :type create_option: str or ~azure.mgmt.compute.v2021_04_01.models.DiskCreateOption + :param storage_account_id: Required if createOption is Import. The Azure Resource Manager + identifier of the storage account containing the blob to import as a disk. + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: ~azure.mgmt.compute.v2021_04_01.models.ImageDiskReference + :param gallery_image_reference: Required if creating from a Gallery Image. The id of the + ImageDiskReference will be the ARM id of the shared galley image version from which to create a + disk. + :type gallery_image_reference: ~azure.mgmt.compute.v2021_04_01.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to be imported into a + managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of the source snapshot + or disk. + :type source_resource_id: str + :ivar source_unique_id: If this field is set, this is the unique id identifying the source of + this resource. + :vartype source_unique_id: str + :param upload_size_bytes: If createOption is Upload, this is the size of the contents of the + upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for + the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer). + :type upload_size_bytes: long + :param logical_sector_size: Logical sector size in bytes for Ultra disks. Supported values are + 512 ad 4096. 4096 is the default. + :type logical_sector_size: int + """ + + _validation = { + 'create_option': {'required': True}, + 'source_unique_id': {'readonly': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'gallery_image_reference': {'key': 'galleryImageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'source_unique_id': {'key': 'sourceUniqueId', 'type': 'str'}, + 'upload_size_bytes': {'key': 'uploadSizeBytes', 'type': 'long'}, + 'logical_sector_size': {'key': 'logicalSectorSize', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(CreationData, self).__init__(**kwargs) + self.create_option = kwargs['create_option'] + self.storage_account_id = kwargs.get('storage_account_id', None) + self.image_reference = kwargs.get('image_reference', None) + self.gallery_image_reference = kwargs.get('gallery_image_reference', None) + self.source_uri = kwargs.get('source_uri', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.source_unique_id = None + self.upload_size_bytes = kwargs.get('upload_size_bytes', None) + self.logical_sector_size = kwargs.get('logical_sector_size', None) + + class DataDisk(msrest.serialization.Model): """Describes a data disk. @@ -1827,6 +1923,446 @@ def __init__( self.vm_disk_type = kwargs.get('vm_disk_type', None) +class Disk(Resource): + """Disk resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the disk attached. + :vartype managed_by: str + :ivar managed_by_extended: List of relative URIs containing the IDs of the VMs that have the + disk attached. maxShares should be set to a value greater than one for disks to allow attaching + them to multiple VMs. + :vartype managed_by_extended: list[str] + :param sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, + UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS. + :type sku: ~azure.mgmt.compute.v2021_04_01.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :param extended_location: The extended location where the disk will be created. Extended + location cannot be changed. + :type extended_location: ~azure.mgmt.compute.v2021_04_01.models.ExtendedLocation + :ivar time_created: The time when the disk was created. + :vartype time_created: ~datetime.datetime + :param os_type: The Operating System type. Possible values include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS + disks only. Possible values include: "V1", "V2". + :type hyper_v_generation: str or ~azure.mgmt.compute.v2021_04_01.models.HyperVGeneration + :param purchase_plan: Purchase plan information for the the image from which the OS disk was + created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: + WindowsServer}. + :type purchase_plan: ~azure.mgmt.compute.v2021_04_01.models.PurchasePlanAutoGenerated + :param supported_capabilities: List of supported capabilities for the image from which the OS + disk was created. + :type supported_capabilities: ~azure.mgmt.compute.v2021_04_01.models.SupportedCapabilities + :param creation_data: Disk source information. CreationData information cannot be changed after + the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2021_04_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it + indicates the size of the disk to create. If this field is present for updates or creation with + other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a + running VM, and can only increase the disk's size. + :type disk_size_gb: int + :ivar disk_size_bytes: The size of the disk in bytes. This field is read only. + :vartype disk_size_bytes: long + :ivar unique_id: Unique Guid identifying the resource. + :vartype unique_id: str + :param encryption_settings_collection: Encryption settings collection used for Azure Disk + Encryption, can contain multiple encryption settings per disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsCollection + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + :param disk_iops_read_write: The number of IOPS allowed for this disk; only settable for + UltraSSD disks. One operation can transfer between 4k and 256k bytes. + :type disk_iops_read_write: long + :param disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD + disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of + 10. + :type disk_m_bps_read_write: long + :param disk_iops_read_only: The total number of IOPS that will be allowed across all VMs + mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + :type disk_iops_read_only: long + :param disk_m_bps_read_only: The total throughput (MBps) that will be allowed across all VMs + mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses + the ISO notation, of powers of 10. + :type disk_m_bps_read_only: long + :ivar disk_state: The state of the disk. Possible values include: "Unattached", "Attached", + "Reserved", "Frozen", "ActiveSAS", "ActiveSASFrozen", "ReadyToUpload", "ActiveUpload". + :vartype disk_state: str or ~azure.mgmt.compute.v2021_04_01.models.DiskState + :param encryption: Encryption property can be used to encrypt data at rest with customer + managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param max_shares: The maximum number of VMs that can attach to the disk at the same time. + Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + :type max_shares: int + :ivar share_info: Details of the list of all VMs that have the disk attached. maxShares should + be set to a value greater than one for disks to allow attaching them to multiple VMs. + :vartype share_info: list[~azure.mgmt.compute.v2021_04_01.models.ShareInfoElement] + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param tier: Performance tier of the disk (e.g, P4, S10) as described here: + https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra + disks. + :type tier: str + :param bursting_enabled: Set to true to enable bursting beyond the provisioned performance + target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + :type bursting_enabled: bool + :ivar property_updates_in_progress: Properties of the disk for which update is pending. + :vartype property_updates_in_progress: + ~azure.mgmt.compute.v2021_04_01.models.PropertyUpdatesInProgress + :param supports_hibernation: Indicates the OS on a disk supports hibernation. + :type supports_hibernation: bool + :param security_profile: Contains the security related information for the resource. + :type security_profile: ~azure.mgmt.compute.v2021_04_01.models.DiskSecurityProfile + :param completion_percent: Percentage complete for the background copy when a resource is + created via the CopyStart operation. + :type completion_percent: float + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'managed_by_extended': {'readonly': True}, + 'time_created': {'readonly': True}, + 'disk_size_bytes': {'readonly': True}, + 'unique_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'disk_state': {'readonly': True}, + 'share_info': {'readonly': True}, + 'property_updates_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'PurchasePlanAutoGenerated'}, + 'supported_capabilities': {'key': 'properties.supportedCapabilities', 'type': 'SupportedCapabilities'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'disk_size_bytes': {'key': 'properties.diskSizeBytes', 'type': 'long'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_m_bps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'long'}, + 'disk_iops_read_only': {'key': 'properties.diskIOPSReadOnly', 'type': 'long'}, + 'disk_m_bps_read_only': {'key': 'properties.diskMBpsReadOnly', 'type': 'long'}, + 'disk_state': {'key': 'properties.diskState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'max_shares': {'key': 'properties.maxShares', 'type': 'int'}, + 'share_info': {'key': 'properties.shareInfo', 'type': '[ShareInfoElement]'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'tier': {'key': 'properties.tier', 'type': 'str'}, + 'bursting_enabled': {'key': 'properties.burstingEnabled', 'type': 'bool'}, + 'property_updates_in_progress': {'key': 'properties.propertyUpdatesInProgress', 'type': 'PropertyUpdatesInProgress'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'security_profile': {'key': 'properties.securityProfile', 'type': 'DiskSecurityProfile'}, + 'completion_percent': {'key': 'properties.completionPercent', 'type': 'float'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Disk, self).__init__(**kwargs) + self.managed_by = None + self.managed_by_extended = None + self.sku = kwargs.get('sku', None) + self.zones = kwargs.get('zones', None) + self.extended_location = kwargs.get('extended_location', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.hyper_v_generation = kwargs.get('hyper_v_generation', None) + self.purchase_plan = kwargs.get('purchase_plan', None) + self.supported_capabilities = kwargs.get('supported_capabilities', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.disk_size_bytes = None + self.unique_id = None + self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) + self.provisioning_state = None + self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) + self.disk_m_bps_read_write = kwargs.get('disk_m_bps_read_write', None) + self.disk_iops_read_only = kwargs.get('disk_iops_read_only', None) + self.disk_m_bps_read_only = kwargs.get('disk_m_bps_read_only', None) + self.disk_state = None + self.encryption = kwargs.get('encryption', None) + self.max_shares = kwargs.get('max_shares', None) + self.share_info = None + self.network_access_policy = kwargs.get('network_access_policy', None) + self.disk_access_id = kwargs.get('disk_access_id', None) + self.tier = kwargs.get('tier', None) + self.bursting_enabled = kwargs.get('bursting_enabled', None) + self.property_updates_in_progress = None + self.supports_hibernation = kwargs.get('supports_hibernation', None) + self.security_profile = kwargs.get('security_profile', None) + self.completion_percent = kwargs.get('completion_percent', None) + self.public_network_access = kwargs.get('public_network_access', None) + + +class DiskAccess(Resource): + """disk access resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location where the disk access will be created. Extended + location cannot be changed. + :type extended_location: ~azure.mgmt.compute.v2021_04_01.models.ExtendedLocation + :ivar private_endpoint_connections: A readonly collection of private endpoint connections + created on the disk. Currently only one endpoint connection is supported. + :vartype private_endpoint_connections: + list[~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection] + :ivar provisioning_state: The disk access resource provisioning state. + :vartype provisioning_state: str + :ivar time_created: The time when the disk access was created. + :vartype time_created: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'time_created': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskAccess, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.private_endpoint_connections = None + self.provisioning_state = None + self.time_created = None + + +class DiskAccessList(msrest.serialization.Model): + """The List disk access operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of disk access resources. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.DiskAccess] + :param next_link: The uri to fetch the next page of disk access resources. Call ListNext() with + this to fetch the next page of disk access resources. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiskAccess]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskAccessList, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class DiskAccessUpdate(msrest.serialization.Model): + """Used for updating a disk access resource. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskAccessUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class DiskEncryptionSet(Resource): + """disk encryption set resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The managed identity for the disk encryption set. It should be given + permission on the key vault before it can be used to encrypt disks. + :type identity: ~azure.mgmt.compute.v2021_04_01.models.EncryptionSetIdentity + :param encryption_type: The type of key used to encrypt the data of the disk. Possible values + include: "EncryptionAtRestWithCustomerKey", "EncryptionAtRestWithPlatformAndCustomerKeys". + :type encryption_type: str or ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetType + :param active_key: The key vault key which is currently used by this disk encryption set. + :type active_key: ~azure.mgmt.compute.v2021_04_01.models.KeyForDiskEncryptionSet + :ivar previous_keys: A readonly collection of key vault keys previously used by this disk + encryption set while a key rotation is in progress. It will be empty if there is no ongoing key + rotation. + :vartype previous_keys: list[~azure.mgmt.compute.v2021_04_01.models.KeyForDiskEncryptionSet] + :ivar provisioning_state: The disk encryption set provisioning state. + :vartype provisioning_state: str + :param rotation_to_latest_key_version_enabled: Set this flag to true to enable auto-updating of + this disk encryption set to the latest key version. + :type rotation_to_latest_key_version_enabled: bool + :ivar last_key_rotation_timestamp: The time when the active key of this disk encryption set was + updated. + :vartype last_key_rotation_timestamp: ~datetime.datetime + :ivar auto_key_rotation_error: The error that was encountered during auto-key rotation. If an + error is present, then auto-key rotation will not be attempted until the error on this disk + encryption set is fixed. + :vartype auto_key_rotation_error: ~azure.mgmt.compute.v2021_04_01.models.ApiError + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'previous_keys': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'last_key_rotation_timestamp': {'readonly': True}, + 'auto_key_rotation_error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'EncryptionSetIdentity'}, + 'encryption_type': {'key': 'properties.encryptionType', 'type': 'str'}, + 'active_key': {'key': 'properties.activeKey', 'type': 'KeyForDiskEncryptionSet'}, + 'previous_keys': {'key': 'properties.previousKeys', 'type': '[KeyForDiskEncryptionSet]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'rotation_to_latest_key_version_enabled': {'key': 'properties.rotationToLatestKeyVersionEnabled', 'type': 'bool'}, + 'last_key_rotation_timestamp': {'key': 'properties.lastKeyRotationTimestamp', 'type': 'iso-8601'}, + 'auto_key_rotation_error': {'key': 'properties.autoKeyRotationError', 'type': 'ApiError'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskEncryptionSet, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.encryption_type = kwargs.get('encryption_type', None) + self.active_key = kwargs.get('active_key', None) + self.previous_keys = None + self.provisioning_state = None + self.rotation_to_latest_key_version_enabled = kwargs.get('rotation_to_latest_key_version_enabled', None) + self.last_key_rotation_timestamp = None + self.auto_key_rotation_error = None + + +class DiskEncryptionSetList(msrest.serialization.Model): + """The List disk encryption set operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of disk encryption sets. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet] + :param next_link: The uri to fetch the next page of disk encryption sets. Call ListNext() with + this to fetch the next page of disk encryption sets. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiskEncryptionSet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskEncryptionSetList, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + class SubResource(msrest.serialization.Model): """SubResource. @@ -1892,8 +2428,47 @@ def __init__( self.enabled = kwargs.get('enabled', None) -class DiskInstanceView(msrest.serialization.Model): - """The instance view of the disk. +class DiskEncryptionSetUpdate(msrest.serialization.Model): + """disk encryption set update resource. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The managed identity for the disk encryption set. It should be given + permission on the key vault before it can be used to encrypt disks. + :type identity: ~azure.mgmt.compute.v2021_04_01.models.EncryptionSetIdentity + :param encryption_type: The type of key used to encrypt the data of the disk. Possible values + include: "EncryptionAtRestWithCustomerKey", "EncryptionAtRestWithPlatformAndCustomerKeys". + :type encryption_type: str or ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetType + :param active_key: Key Vault Key Url to be used for server side encryption of Managed Disks and + Snapshots. + :type active_key: ~azure.mgmt.compute.v2021_04_01.models.KeyForDiskEncryptionSet + :param rotation_to_latest_key_version_enabled: Set this flag to true to enable auto-updating of + this disk encryption set to the latest key version. + :type rotation_to_latest_key_version_enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'EncryptionSetIdentity'}, + 'encryption_type': {'key': 'properties.encryptionType', 'type': 'str'}, + 'active_key': {'key': 'properties.activeKey', 'type': 'KeyForDiskEncryptionSet'}, + 'rotation_to_latest_key_version_enabled': {'key': 'properties.rotationToLatestKeyVersionEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskEncryptionSetUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.encryption_type = kwargs.get('encryption_type', None) + self.active_key = kwargs.get('active_key', None) + self.rotation_to_latest_key_version_enabled = kwargs.get('rotation_to_latest_key_version_enabled', None) + + +class DiskInstanceView(msrest.serialization.Model): + """The instance view of the disk. :param name: The disk name. :type name: str @@ -1920,6 +2495,504 @@ def __init__( self.statuses = kwargs.get('statuses', None) +class DiskList(msrest.serialization.Model): + """The List Disks operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of disks. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.Disk] + :param next_link: The uri to fetch the next page of disks. Call ListNext() with this to fetch + the next page of disks. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Disk]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskList, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class ProxyOnlyResource(msrest.serialization.Model): + """The ProxyOnly Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DiskRestorePoint(ProxyOnlyResource): + """Properties of disk restore point. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar time_created: The timestamp of restorePoint creation. + :vartype time_created: ~datetime.datetime + :ivar source_resource_id: arm id of source disk. + :vartype source_resource_id: str + :ivar os_type: The Operating System type. Possible values include: "Windows", "Linux". + :vartype os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS + disks only. Possible values include: "V1", "V2". + :type hyper_v_generation: str or ~azure.mgmt.compute.v2021_04_01.models.HyperVGeneration + :param purchase_plan: Purchase plan information for the the image from which the OS disk was + created. + :type purchase_plan: ~azure.mgmt.compute.v2021_04_01.models.PurchasePlanAutoGenerated + :param supported_capabilities: List of supported capabilities (like accelerated networking) for + the image from which the OS disk was created. + :type supported_capabilities: ~azure.mgmt.compute.v2021_04_01.models.SupportedCapabilities + :ivar family_id: id of the backing snapshot's MIS family. + :vartype family_id: str + :ivar source_unique_id: unique incarnation id of the source disk. + :vartype source_unique_id: str + :ivar encryption: Encryption property can be used to encrypt data at rest with customer managed + keys or platform managed keys. + :vartype encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param supports_hibernation: Indicates the OS on a disk supports hibernation. + :type supports_hibernation: bool + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param completion_percent: Percentage complete for the background copy when a resource is + created via the CopyStart operation. + :type completion_percent: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time_created': {'readonly': True}, + 'source_resource_id': {'readonly': True}, + 'os_type': {'readonly': True}, + 'family_id': {'readonly': True}, + 'source_unique_id': {'readonly': True}, + 'encryption': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'source_resource_id': {'key': 'properties.sourceResourceId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'PurchasePlanAutoGenerated'}, + 'supported_capabilities': {'key': 'properties.supportedCapabilities', 'type': 'SupportedCapabilities'}, + 'family_id': {'key': 'properties.familyId', 'type': 'str'}, + 'source_unique_id': {'key': 'properties.sourceUniqueId', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'completion_percent': {'key': 'properties.completionPercent', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskRestorePoint, self).__init__(**kwargs) + self.time_created = None + self.source_resource_id = None + self.os_type = None + self.hyper_v_generation = kwargs.get('hyper_v_generation', None) + self.purchase_plan = kwargs.get('purchase_plan', None) + self.supported_capabilities = kwargs.get('supported_capabilities', None) + self.family_id = None + self.source_unique_id = None + self.encryption = None + self.supports_hibernation = kwargs.get('supports_hibernation', None) + self.network_access_policy = kwargs.get('network_access_policy', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.disk_access_id = kwargs.get('disk_access_id', None) + self.completion_percent = kwargs.get('completion_percent', None) + + +class DiskRestorePointList(msrest.serialization.Model): + """The List Disk Restore Points operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of disk restore points. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.DiskRestorePoint] + :param next_link: The uri to fetch the next page of disk restore points. Call ListNext() with + this to fetch the next page of disk restore points. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiskRestorePoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskRestorePointList, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class DiskSecurityProfile(msrest.serialization.Model): + """Contains the security related information for the resource. + + :param security_type: Specifies the SecurityType of the VM. Applicable for OS disks only. + Possible values include: "TrustedLaunch". + :type security_type: str or ~azure.mgmt.compute.v2021_04_01.models.DiskSecurityTypes + """ + + _attribute_map = { + 'security_type': {'key': 'securityType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskSecurityProfile, self).__init__(**kwargs) + self.security_type = kwargs.get('security_type', None) + + +class DiskSku(msrest.serialization.Model): + """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: The sku name. Possible values include: "Standard_LRS", "Premium_LRS", + "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", "StandardSSD_ZRS". + :type name: str or ~azure.mgmt.compute.v2021_04_01.models.DiskStorageAccountTypes + :ivar tier: The sku tier. + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class DiskUpdate(msrest.serialization.Model): + """Disk update resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, + UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS. + :type sku: ~azure.mgmt.compute.v2021_04_01.models.DiskSku + :param os_type: the Operating System type. Possible values include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it + indicates the size of the disk to create. If this field is present for updates or creation with + other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a + running VM, and can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used be Azure Disk + Encryption, can contain multiple encryption settings per disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsCollection + :param disk_iops_read_write: The number of IOPS allowed for this disk; only settable for + UltraSSD disks. One operation can transfer between 4k and 256k bytes. + :type disk_iops_read_write: long + :param disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD + disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of + 10. + :type disk_m_bps_read_write: long + :param disk_iops_read_only: The total number of IOPS that will be allowed across all VMs + mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + :type disk_iops_read_only: long + :param disk_m_bps_read_only: The total throughput (MBps) that will be allowed across all VMs + mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses + the ISO notation, of powers of 10. + :type disk_m_bps_read_only: long + :param max_shares: The maximum number of VMs that can attach to the disk at the same time. + Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + :type max_shares: int + :param encryption: Encryption property can be used to encrypt data at rest with customer + managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param tier: Performance tier of the disk (e.g, P4, S10) as described here: + https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra + disks. + :type tier: str + :param bursting_enabled: Set to true to enable bursting beyond the provisioned performance + target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + :type bursting_enabled: bool + :param purchase_plan: Purchase plan information to be added on the OS disk. + :type purchase_plan: ~azure.mgmt.compute.v2021_04_01.models.PurchasePlanAutoGenerated + :param supported_capabilities: List of supported capabilities (like accelerated networking) to + be added on the OS disk. + :type supported_capabilities: ~azure.mgmt.compute.v2021_04_01.models.SupportedCapabilities + :ivar property_updates_in_progress: Properties of the disk for which update is pending. + :vartype property_updates_in_progress: + ~azure.mgmt.compute.v2021_04_01.models.PropertyUpdatesInProgress + :param supports_hibernation: Indicates the OS on a disk supports hibernation. + :type supports_hibernation: bool + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess + """ + + _validation = { + 'property_updates_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_m_bps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'long'}, + 'disk_iops_read_only': {'key': 'properties.diskIOPSReadOnly', 'type': 'long'}, + 'disk_m_bps_read_only': {'key': 'properties.diskMBpsReadOnly', 'type': 'long'}, + 'max_shares': {'key': 'properties.maxShares', 'type': 'int'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'tier': {'key': 'properties.tier', 'type': 'str'}, + 'bursting_enabled': {'key': 'properties.burstingEnabled', 'type': 'bool'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'PurchasePlanAutoGenerated'}, + 'supported_capabilities': {'key': 'properties.supportedCapabilities', 'type': 'SupportedCapabilities'}, + 'property_updates_in_progress': {'key': 'properties.propertyUpdatesInProgress', 'type': 'PropertyUpdatesInProgress'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiskUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) + self.disk_iops_read_write = kwargs.get('disk_iops_read_write', None) + self.disk_m_bps_read_write = kwargs.get('disk_m_bps_read_write', None) + self.disk_iops_read_only = kwargs.get('disk_iops_read_only', None) + self.disk_m_bps_read_only = kwargs.get('disk_m_bps_read_only', None) + self.max_shares = kwargs.get('max_shares', None) + self.encryption = kwargs.get('encryption', None) + self.network_access_policy = kwargs.get('network_access_policy', None) + self.disk_access_id = kwargs.get('disk_access_id', None) + self.tier = kwargs.get('tier', None) + self.bursting_enabled = kwargs.get('bursting_enabled', None) + self.purchase_plan = kwargs.get('purchase_plan', None) + self.supported_capabilities = kwargs.get('supported_capabilities', None) + self.property_updates_in_progress = None + self.supports_hibernation = kwargs.get('supports_hibernation', None) + self.public_network_access = kwargs.get('public_network_access', None) + + +class Encryption(msrest.serialization.Model): + """Encryption at rest settings for disk or snapshot. + + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param type: The type of key used to encrypt the data of the disk. Possible values include: + "EncryptionAtRestWithPlatformKey", "EncryptionAtRestWithCustomerKey", + "EncryptionAtRestWithPlatformAndCustomerKeys". + :type type: str or ~azure.mgmt.compute.v2021_04_01.models.EncryptionType + """ + + _attribute_map = { + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Encryption, self).__init__(**kwargs) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + self.type = kwargs.get('type', None) + + +class EncryptionSetIdentity(msrest.serialization.Model): + """The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is + supported for new creations. Disk Encryption Sets can be updated with Identity type None during + migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted + resources to lose access to the keys. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetIdentityType + :ivar principal_id: The object id of the Managed Identity Resource. This will be sent to the RP + from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a + systemAssigned(implicit) identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the Managed Identity Resource. This will be sent to the RP + from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a + systemAssigned(implicit) identity. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionSetIdentity, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.principal_id = None + self.tenant_id = None + + +class EncryptionSettingsCollection(msrest.serialization.Model): + """Encryption settings for disk or snapshot. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Set this flag to true and provide DiskEncryptionKey and optional + KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and + KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, + the existing settings remain unchanged. + :type enabled: bool + :param encryption_settings: A collection of encryption settings, one for each disk volume. + :type encryption_settings: + list[~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsElement] + :param encryption_settings_version: Describes what type of encryption is used for the disks. + Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption + with AAD app.'1.1' corresponds to Azure Disk Encryption. + :type encryption_settings_version: str + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[EncryptionSettingsElement]'}, + 'encryption_settings_version': {'key': 'encryptionSettingsVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionSettingsCollection, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.encryption_settings = kwargs.get('encryption_settings', None) + self.encryption_settings_version = kwargs.get('encryption_settings_version', None) + + +class EncryptionSettingsElement(msrest.serialization.Model): + """Encryption settings for one disk volume. + + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk encryption key. + :type disk_encryption_key: ~azure.mgmt.compute.v2021_04_01.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key encryption key. + KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key. + :type key_encryption_key: ~azure.mgmt.compute.v2021_04_01.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionSettingsElement, self).__init__(**kwargs) + self.disk_encryption_key = kwargs.get('disk_encryption_key', None) + self.key_encryption_key = kwargs.get('key_encryption_key', None) + + class ExtendedLocation(msrest.serialization.Model): """The complex type of the extended location. @@ -1938,9 +3011,39 @@ def __init__( self, **kwargs ): - super(ExtendedLocation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.type = kwargs.get('type', None) + super(ExtendedLocation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class GrantAccessData(msrest.serialization.Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: "None", "Read", "Write". + :type access: str or ~azure.mgmt.compute.v2021_04_01.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(GrantAccessData, self).__init__(**kwargs) + self.access = kwargs['access'] + self.duration_in_seconds = kwargs['duration_in_seconds'] class HardwareProfile(msrest.serialization.Model): @@ -2184,6 +3287,37 @@ def __init__( self.lun = kwargs['lun'] +class ImageDiskReference(msrest.serialization.Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image Repository or user image + reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an index that indicates + which of the data disks in the image to use. For OS disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ImageDiskReference, self).__init__(**kwargs) + self.id = kwargs['id'] + self.lun = kwargs.get('lun', None) + + class ImageListResult(msrest.serialization.Model): """The List Image operation response. @@ -2465,6 +3599,98 @@ def __init__( self.time = kwargs.get('time', None) +class KeyForDiskEncryptionSet(msrest.serialization.Model): + """Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Resource id of the KeyVault containing the key or secret. This property is + optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption + Set subscription. + :type source_vault: ~azure.mgmt.compute.v2021_04_01.models.SourceVault + :param key_url: Required. Fully versioned Key Url pointing to a key in KeyVault. Version + segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value. + :type key_url: str + """ + + _validation = { + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyForDiskEncryptionSet, self).__init__(**kwargs) + self.source_vault = kwargs.get('source_vault', None) + self.key_url = kwargs['key_url'] + + +class KeyVaultAndKeyReference(msrest.serialization.Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the key or secret. + :type source_vault: ~azure.mgmt.compute.v2021_04_01.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault. + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = kwargs['source_vault'] + self.key_url = kwargs['key_url'] + + +class KeyVaultAndSecretReference(msrest.serialization.Model): + """Key Vault Secret Url and vault id of the encryption key. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the key or secret. + :type source_vault: ~azure.mgmt.compute.v2021_04_01.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault. + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = kwargs['source_vault'] + self.secret_url = kwargs['secret_url'] + + class KeyVaultKeyReference(msrest.serialization.Model): """Describes a reference to Key Vault Key. @@ -3356,51 +4582,271 @@ class PatchSettings(msrest.serialization.Model): """ _attribute_map = { - 'patch_mode': {'key': 'patchMode', 'type': 'str'}, - 'enable_hotpatching': {'key': 'enableHotpatching', 'type': 'bool'}, - 'assessment_mode': {'key': 'assessmentMode', 'type': 'str'}, + 'patch_mode': {'key': 'patchMode', 'type': 'str'}, + 'enable_hotpatching': {'key': 'enableHotpatching', 'type': 'bool'}, + 'assessment_mode': {'key': 'assessmentMode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PatchSettings, self).__init__(**kwargs) + self.patch_mode = kwargs.get('patch_mode', None) + self.enable_hotpatching = kwargs.get('enable_hotpatching', None) + self.assessment_mode = kwargs.get('assessment_mode', None) + + +class Plan(msrest.serialization.Model): + """Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. + + :param name: The plan ID. + :type name: str + :param publisher: The publisher ID. + :type publisher: str + :param product: Specifies the product of the image from the marketplace. This is the same value + as Offer under the imageReference element. + :type product: str + :param promotion_code: The promotion code. + :type promotion_code: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Plan, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.publisher = kwargs.get('publisher', None) + self.product = kwargs.get('product', None) + self.promotion_code = kwargs.get('promotion_code', None) + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(msrest.serialization.Model): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: private endpoint connection Id. + :vartype id: str + :ivar name: private endpoint connection name. + :vartype name: str + :ivar type: private endpoint connection type. + :vartype type: str + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between DiskAccess and Virtual Network. + :type private_link_service_connection_state: + ~azure.mgmt.compute.v2021_04_01.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.private_endpoint = None + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private endpoint connections. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection] + :param next_link: The uri to fetch the next page of snapshots. Call ListNext() with this to + fetch the next page of snapshots. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PrivateLinkResource(msrest.serialization.Model): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: private link resource Id. + :vartype id: str + :ivar name: private link resource name. + :vartype name: str + :ivar type: private link resource type. + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or + ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, } def __init__( self, **kwargs ): - super(PatchSettings, self).__init__(**kwargs) - self.patch_mode = kwargs.get('patch_mode', None) - self.enable_hotpatching = kwargs.get('enable_hotpatching', None) - self.assessment_mode = kwargs.get('assessment_mode', None) + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) -class Plan(msrest.serialization.Model): - """Specifies information about the marketplace image used to create the virtual machine. This element is only used for marketplace images. Before you can use a marketplace image from an API, you must enable the image for programmatic use. In the Azure portal, find the marketplace image that you want to use and then click **Want to deploy programmatically, Get Started ->**. Enter any required information and then click **Save**. +class PropertyUpdatesInProgress(msrest.serialization.Model): + """Properties of the disk for which update is pending. - :param name: The plan ID. - :type name: str - :param publisher: The publisher ID. - :type publisher: str - :param product: Specifies the product of the image from the marketplace. This is the same value - as Offer under the imageReference element. - :type product: str - :param promotion_code: The promotion code. - :type promotion_code: str + :param target_tier: The target performance tier of the disk if a tier change operation is in + progress. + :type target_tier: str """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'publisher': {'key': 'publisher', 'type': 'str'}, - 'product': {'key': 'product', 'type': 'str'}, - 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'target_tier': {'key': 'targetTier', 'type': 'str'}, } def __init__( self, **kwargs ): - super(Plan, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.publisher = kwargs.get('publisher', None) - self.product = kwargs.get('product', None) - self.promotion_code = kwargs.get('promotion_code', None) + super(PropertyUpdatesInProgress, self).__init__(**kwargs) + self.target_tier = kwargs.get('target_tier', None) class ProximityPlacementGroup(Resource): @@ -3618,6 +5064,46 @@ def __init__( self.product = kwargs['product'] +class PurchasePlanAutoGenerated(msrest.serialization.Model): + """Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The plan ID. + :type name: str + :param publisher: Required. The publisher ID. + :type publisher: str + :param product: Required. Specifies the product of the image from the marketplace. This is the + same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The Offer Promotion Code. + :type promotion_code: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PurchasePlanAutoGenerated, self).__init__(**kwargs) + self.name = kwargs['name'] + self.publisher = kwargs['publisher'] + self.product = kwargs['product'] + self.promotion_code = kwargs.get('promotion_code', None) + + class RecoveryWalkResponse(msrest.serialization.Model): """Response after calling a manual recovery walk. @@ -3703,6 +5189,37 @@ def __init__( self.interval_length = kwargs['interval_length'] +class ResourceUriList(msrest.serialization.Model): + """The List resources which are encrypted with the disk encryption set. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of IDs or Owner IDs of resources which are encrypted with the + disk encryption set. + :type value: list[str] + :param next_link: The uri to fetch the next page of encrypted resources. Call ListNext() with + this to fetch the next page of encrypted resources. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[str]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceUriList, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + class RestorePoint(ProxyResource): """Restore Point details. @@ -4720,6 +6237,31 @@ def __init__( self.security_type = kwargs.get('security_type', None) +class ShareInfoElement(msrest.serialization.Model): + """ShareInfoElement. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vm_uri: A relative URI containing the ID of the VM that has the disk attached. + :vartype vm_uri: str + """ + + _validation = { + 'vm_uri': {'readonly': True}, + } + + _attribute_map = { + 'vm_uri': {'key': 'vmUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareInfoElement, self).__init__(**kwargs) + self.vm_uri = None + + class Sku(msrest.serialization.Model): """Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name. @@ -4749,6 +6291,303 @@ def __init__( self.capacity = kwargs.get('capacity', None) +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is + an optional parameter for incremental snapshot and the default behavior is the SKU will be set + to the same sku as the previous snapshot. + :type sku: ~azure.mgmt.compute.v2021_04_01.models.SnapshotSku + :param extended_location: The extended location where the snapshot will be created. Extended + location cannot be changed. + :type extended_location: ~azure.mgmt.compute.v2021_04_01.models.ExtendedLocation + :ivar time_created: The time when the snapshot was created. + :vartype time_created: ~datetime.datetime + :param os_type: The Operating System type. Possible values include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS + disks only. Possible values include: "V1", "V2". + :type hyper_v_generation: str or ~azure.mgmt.compute.v2021_04_01.models.HyperVGeneration + :param purchase_plan: Purchase plan information for the image from which the source disk for + the snapshot was originally created. + :type purchase_plan: ~azure.mgmt.compute.v2021_04_01.models.PurchasePlanAutoGenerated + :param supported_capabilities: List of supported capabilities (like Accelerated Networking) for + the image from which the source disk from the snapshot was originally created. + :type supported_capabilities: ~azure.mgmt.compute.v2021_04_01.models.SupportedCapabilities + :param creation_data: Disk source information. CreationData information cannot be changed after + the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2021_04_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it + indicates the size of the disk to create. If this field is present for updates or creation with + other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a + running VM, and can only increase the disk's size. + :type disk_size_gb: int + :ivar disk_size_bytes: The size of the disk in bytes. This field is read only. + :vartype disk_size_bytes: long + :ivar disk_state: The state of the snapshot. Possible values include: "Unattached", "Attached", + "Reserved", "Frozen", "ActiveSAS", "ActiveSASFrozen", "ReadyToUpload", "ActiveUpload". + :vartype disk_state: str or ~azure.mgmt.compute.v2021_04_01.models.DiskState + :ivar unique_id: Unique Guid identifying the resource. + :vartype unique_id: str + :param encryption_settings_collection: Encryption settings collection used be Azure Disk + Encryption, can contain multiple encryption settings per disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsCollection + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + :param incremental: Whether a snapshot is incremental. Incremental snapshots on the same disk + occupy less space than full snapshots and can be diffed. + :type incremental: bool + :param encryption: Encryption property can be used to encrypt data at rest with customer + managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param supports_hibernation: Indicates the OS on a snapshot supports hibernation. + :type supports_hibernation: bool + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess + :param completion_percent: Percentage complete for the background copy when a resource is + created via the CopyStart operation. + :type completion_percent: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'disk_size_bytes': {'readonly': True}, + 'disk_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'PurchasePlanAutoGenerated'}, + 'supported_capabilities': {'key': 'properties.supportedCapabilities', 'type': 'SupportedCapabilities'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'disk_size_bytes': {'key': 'properties.diskSizeBytes', 'type': 'long'}, + 'disk_state': {'key': 'properties.diskState', 'type': 'str'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'incremental': {'key': 'properties.incremental', 'type': 'bool'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'completion_percent': {'key': 'properties.completionPercent', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(Snapshot, self).__init__(**kwargs) + self.managed_by = None + self.sku = kwargs.get('sku', None) + self.extended_location = kwargs.get('extended_location', None) + self.time_created = None + self.os_type = kwargs.get('os_type', None) + self.hyper_v_generation = kwargs.get('hyper_v_generation', None) + self.purchase_plan = kwargs.get('purchase_plan', None) + self.supported_capabilities = kwargs.get('supported_capabilities', None) + self.creation_data = kwargs.get('creation_data', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.disk_size_bytes = None + self.disk_state = None + self.unique_id = None + self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) + self.provisioning_state = None + self.incremental = kwargs.get('incremental', None) + self.encryption = kwargs.get('encryption', None) + self.network_access_policy = kwargs.get('network_access_policy', None) + self.disk_access_id = kwargs.get('disk_access_id', None) + self.supports_hibernation = kwargs.get('supports_hibernation', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.completion_percent = kwargs.get('completion_percent', None) + + +class SnapshotList(msrest.serialization.Model): + """The List Snapshots operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of snapshots. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.Snapshot] + :param next_link: The uri to fetch the next page of snapshots. Call ListNext() with this to + fetch the next page of snapshots. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Snapshot]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SnapshotList, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class SnapshotSku(msrest.serialization.Model): + """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: The sku name. Possible values include: "Standard_LRS", "Premium_LRS", + "Standard_ZRS". + :type name: str or ~azure.mgmt.compute.v2021_04_01.models.SnapshotStorageAccountTypes + :ivar tier: The sku tier. + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SnapshotSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = None + + +class SnapshotUpdate(msrest.serialization.Model): + """Snapshot update resource. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is + an optional parameter for incremental snapshot and the default behavior is the SKU will be set + to the same sku as the previous snapshot. + :type sku: ~azure.mgmt.compute.v2021_04_01.models.SnapshotSku + :param os_type: the Operating System type. Possible values include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it + indicates the size of the disk to create. If this field is present for updates or creation with + other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a + running VM, and can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used be Azure Disk + Encryption, can contain multiple encryption settings per disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsCollection + :param encryption: Encryption property can be used to encrypt data at rest with customer + managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param supports_hibernation: Indicates the OS on a snapshot supports hibernation. + :type supports_hibernation: bool + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SnapshotUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.os_type = kwargs.get('os_type', None) + self.disk_size_gb = kwargs.get('disk_size_gb', None) + self.encryption_settings_collection = kwargs.get('encryption_settings_collection', None) + self.encryption = kwargs.get('encryption', None) + self.network_access_policy = kwargs.get('network_access_policy', None) + self.disk_access_id = kwargs.get('disk_access_id', None) + self.supports_hibernation = kwargs.get('supports_hibernation', None) + self.public_network_access = kwargs.get('public_network_access', None) + + +class SourceVault(msrest.serialization.Model): + """The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SourceVault, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + class SpotRestorePolicy(msrest.serialization.Model): """Specifies the Spot-Try-Restore properties for the virtual machine scale set. :code:`
`:code:`
` With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint. @@ -5047,6 +6886,26 @@ def __init__( self.colocation_status = kwargs.get('colocation_status', None) +class SupportedCapabilities(msrest.serialization.Model): + """List of supported capabilities (like accelerated networking) persisted on the disk resource for VM use. + + :param accelerated_network: True if the image from which the OS disk is created supports + accelerated networking. + :type accelerated_network: bool + """ + + _attribute_map = { + 'accelerated_network': {'key': 'acceleratedNetwork', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(SupportedCapabilities, self).__init__(**kwargs) + self.accelerated_network = kwargs.get('accelerated_network', None) + + class TerminateNotificationProfile(msrest.serialization.Model): """TerminateNotificationProfile. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py index 2f30e361a8af..33a2c7938a7e 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/models/_models_py3.py @@ -14,6 +14,31 @@ from ._compute_management_client_enums import * +class AccessUri(msrest.serialization.Model): + """A disk access SAS uri. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar access_sas: A SAS uri for accessing a disk. + :vartype access_sas: str + """ + + _validation = { + 'access_sas': {'readonly': True}, + } + + _attribute_map = { + 'access_sas': {'key': 'accessSAS', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AccessUri, self).__init__(**kwargs) + self.access_sas = None + + class AdditionalCapabilities(msrest.serialization.Model): """Enables or disables a capability on the virtual machine or virtual machine scale set. @@ -1224,6 +1249,86 @@ def __init__( self.provider = None +class CreationData(msrest.serialization.Model): + """Data used when creating a disk. + + 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 create_option: Required. This enumerates the possible sources of a disk's creation. + Possible values include: "Empty", "Attach", "FromImage", "Import", "Copy", "Restore", "Upload", + "CopyStart". + :type create_option: str or ~azure.mgmt.compute.v2021_04_01.models.DiskCreateOption + :param storage_account_id: Required if createOption is Import. The Azure Resource Manager + identifier of the storage account containing the blob to import as a disk. + :type storage_account_id: str + :param image_reference: Disk source information. + :type image_reference: ~azure.mgmt.compute.v2021_04_01.models.ImageDiskReference + :param gallery_image_reference: Required if creating from a Gallery Image. The id of the + ImageDiskReference will be the ARM id of the shared galley image version from which to create a + disk. + :type gallery_image_reference: ~azure.mgmt.compute.v2021_04_01.models.ImageDiskReference + :param source_uri: If createOption is Import, this is the URI of a blob to be imported into a + managed disk. + :type source_uri: str + :param source_resource_id: If createOption is Copy, this is the ARM id of the source snapshot + or disk. + :type source_resource_id: str + :ivar source_unique_id: If this field is set, this is the unique id identifying the source of + this resource. + :vartype source_unique_id: str + :param upload_size_bytes: If createOption is Upload, this is the size of the contents of the + upload including the VHD footer. This value should be between 20972032 (20 MiB + 512 bytes for + the VHD footer) and 35183298347520 bytes (32 TiB + 512 bytes for the VHD footer). + :type upload_size_bytes: long + :param logical_sector_size: Logical sector size in bytes for Ultra disks. Supported values are + 512 ad 4096. 4096 is the default. + :type logical_sector_size: int + """ + + _validation = { + 'create_option': {'required': True}, + 'source_unique_id': {'readonly': True}, + } + + _attribute_map = { + 'create_option': {'key': 'createOption', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'image_reference': {'key': 'imageReference', 'type': 'ImageDiskReference'}, + 'gallery_image_reference': {'key': 'galleryImageReference', 'type': 'ImageDiskReference'}, + 'source_uri': {'key': 'sourceUri', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'source_unique_id': {'key': 'sourceUniqueId', 'type': 'str'}, + 'upload_size_bytes': {'key': 'uploadSizeBytes', 'type': 'long'}, + 'logical_sector_size': {'key': 'logicalSectorSize', 'type': 'int'}, + } + + def __init__( + self, + *, + create_option: Union[str, "DiskCreateOption"], + storage_account_id: Optional[str] = None, + image_reference: Optional["ImageDiskReference"] = None, + gallery_image_reference: Optional["ImageDiskReference"] = None, + source_uri: Optional[str] = None, + source_resource_id: Optional[str] = None, + upload_size_bytes: Optional[int] = None, + logical_sector_size: Optional[int] = None, + **kwargs + ): + super(CreationData, self).__init__(**kwargs) + self.create_option = create_option + self.storage_account_id = storage_account_id + self.image_reference = image_reference + self.gallery_image_reference = gallery_image_reference + self.source_uri = source_uri + self.source_resource_id = source_resource_id + self.source_unique_id = None + self.upload_size_bytes = upload_size_bytes + self.logical_sector_size = logical_sector_size + + class DataDisk(msrest.serialization.Model): """Describes a data disk. @@ -1977,147 +2082,1260 @@ def __init__( self.vm_disk_type = vm_disk_type -class SubResource(msrest.serialization.Model): - """SubResource. +class Disk(Resource): + """Disk resource. - :param id: Resource Id. - :type id: str + 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. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar managed_by: A relative URI containing the ID of the VM that has the disk attached. + :vartype managed_by: str + :ivar managed_by_extended: List of relative URIs containing the IDs of the VMs that have the + disk attached. maxShares should be set to a value greater than one for disks to allow attaching + them to multiple VMs. + :vartype managed_by_extended: list[str] + :param sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, + UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS. + :type sku: ~azure.mgmt.compute.v2021_04_01.models.DiskSku + :param zones: The Logical zone list for Disk. + :type zones: list[str] + :param extended_location: The extended location where the disk will be created. Extended + location cannot be changed. + :type extended_location: ~azure.mgmt.compute.v2021_04_01.models.ExtendedLocation + :ivar time_created: The time when the disk was created. + :vartype time_created: ~datetime.datetime + :param os_type: The Operating System type. Possible values include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS + disks only. Possible values include: "V1", "V2". + :type hyper_v_generation: str or ~azure.mgmt.compute.v2021_04_01.models.HyperVGeneration + :param purchase_plan: Purchase plan information for the the image from which the OS disk was + created. E.g. - {name: 2019-Datacenter, publisher: MicrosoftWindowsServer, product: + WindowsServer}. + :type purchase_plan: ~azure.mgmt.compute.v2021_04_01.models.PurchasePlanAutoGenerated + :param supported_capabilities: List of supported capabilities for the image from which the OS + disk was created. + :type supported_capabilities: ~azure.mgmt.compute.v2021_04_01.models.SupportedCapabilities + :param creation_data: Disk source information. CreationData information cannot be changed after + the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2021_04_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it + indicates the size of the disk to create. If this field is present for updates or creation with + other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a + running VM, and can only increase the disk's size. + :type disk_size_gb: int + :ivar disk_size_bytes: The size of the disk in bytes. This field is read only. + :vartype disk_size_bytes: long + :ivar unique_id: Unique Guid identifying the resource. + :vartype unique_id: str + :param encryption_settings_collection: Encryption settings collection used for Azure Disk + Encryption, can contain multiple encryption settings per disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsCollection + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + :param disk_iops_read_write: The number of IOPS allowed for this disk; only settable for + UltraSSD disks. One operation can transfer between 4k and 256k bytes. + :type disk_iops_read_write: long + :param disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD + disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of + 10. + :type disk_m_bps_read_write: long + :param disk_iops_read_only: The total number of IOPS that will be allowed across all VMs + mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + :type disk_iops_read_only: long + :param disk_m_bps_read_only: The total throughput (MBps) that will be allowed across all VMs + mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses + the ISO notation, of powers of 10. + :type disk_m_bps_read_only: long + :ivar disk_state: The state of the disk. Possible values include: "Unattached", "Attached", + "Reserved", "Frozen", "ActiveSAS", "ActiveSASFrozen", "ReadyToUpload", "ActiveUpload". + :vartype disk_state: str or ~azure.mgmt.compute.v2021_04_01.models.DiskState + :param encryption: Encryption property can be used to encrypt data at rest with customer + managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param max_shares: The maximum number of VMs that can attach to the disk at the same time. + Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + :type max_shares: int + :ivar share_info: Details of the list of all VMs that have the disk attached. maxShares should + be set to a value greater than one for disks to allow attaching them to multiple VMs. + :vartype share_info: list[~azure.mgmt.compute.v2021_04_01.models.ShareInfoElement] + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param tier: Performance tier of the disk (e.g, P4, S10) as described here: + https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra + disks. + :type tier: str + :param bursting_enabled: Set to true to enable bursting beyond the provisioned performance + target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + :type bursting_enabled: bool + :ivar property_updates_in_progress: Properties of the disk for which update is pending. + :vartype property_updates_in_progress: + ~azure.mgmt.compute.v2021_04_01.models.PropertyUpdatesInProgress + :param supports_hibernation: Indicates the OS on a disk supports hibernation. + :type supports_hibernation: bool + :param security_profile: Contains the security related information for the resource. + :type security_profile: ~azure.mgmt.compute.v2021_04_01.models.DiskSecurityProfile + :param completion_percent: Percentage complete for the background copy when a resource is + created via the CopyStart operation. + :type completion_percent: float + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'managed_by_extended': {'readonly': True}, + 'time_created': {'readonly': True}, + 'disk_size_bytes': {'readonly': True}, + 'unique_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'disk_state': {'readonly': True}, + 'share_info': {'readonly': True}, + 'property_updates_in_progress': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'PurchasePlanAutoGenerated'}, + 'supported_capabilities': {'key': 'properties.supportedCapabilities', 'type': 'SupportedCapabilities'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'disk_size_bytes': {'key': 'properties.diskSizeBytes', 'type': 'long'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_m_bps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'long'}, + 'disk_iops_read_only': {'key': 'properties.diskIOPSReadOnly', 'type': 'long'}, + 'disk_m_bps_read_only': {'key': 'properties.diskMBpsReadOnly', 'type': 'long'}, + 'disk_state': {'key': 'properties.diskState', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'max_shares': {'key': 'properties.maxShares', 'type': 'int'}, + 'share_info': {'key': 'properties.shareInfo', 'type': '[ShareInfoElement]'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'tier': {'key': 'properties.tier', 'type': 'str'}, + 'bursting_enabled': {'key': 'properties.burstingEnabled', 'type': 'bool'}, + 'property_updates_in_progress': {'key': 'properties.propertyUpdatesInProgress', 'type': 'PropertyUpdatesInProgress'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'security_profile': {'key': 'properties.securityProfile', 'type': 'DiskSecurityProfile'}, + 'completion_percent': {'key': 'properties.completionPercent', 'type': 'float'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__( self, *, - id: Optional[str] = None, + location: str, + tags: Optional[Dict[str, str]] = None, + sku: Optional["DiskSku"] = None, + zones: Optional[List[str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + os_type: Optional[Union[str, "OperatingSystemTypes"]] = None, + hyper_v_generation: Optional[Union[str, "HyperVGeneration"]] = None, + purchase_plan: Optional["PurchasePlanAutoGenerated"] = None, + supported_capabilities: Optional["SupportedCapabilities"] = None, + creation_data: Optional["CreationData"] = None, + disk_size_gb: Optional[int] = None, + encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None, + disk_iops_read_write: Optional[int] = None, + disk_m_bps_read_write: Optional[int] = None, + disk_iops_read_only: Optional[int] = None, + disk_m_bps_read_only: Optional[int] = None, + encryption: Optional["Encryption"] = None, + max_shares: Optional[int] = None, + network_access_policy: Optional[Union[str, "NetworkAccessPolicy"]] = None, + disk_access_id: Optional[str] = None, + tier: Optional[str] = None, + bursting_enabled: Optional[bool] = None, + supports_hibernation: Optional[bool] = None, + security_profile: Optional["DiskSecurityProfile"] = None, + completion_percent: Optional[float] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, **kwargs ): - super(SubResource, self).__init__(**kwargs) - self.id = id + super(Disk, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.managed_by_extended = None + self.sku = sku + self.zones = zones + self.extended_location = extended_location + self.time_created = None + self.os_type = os_type + self.hyper_v_generation = hyper_v_generation + self.purchase_plan = purchase_plan + self.supported_capabilities = supported_capabilities + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.disk_size_bytes = None + self.unique_id = None + self.encryption_settings_collection = encryption_settings_collection + self.provisioning_state = None + self.disk_iops_read_write = disk_iops_read_write + self.disk_m_bps_read_write = disk_m_bps_read_write + self.disk_iops_read_only = disk_iops_read_only + self.disk_m_bps_read_only = disk_m_bps_read_only + self.disk_state = None + self.encryption = encryption + self.max_shares = max_shares + self.share_info = None + self.network_access_policy = network_access_policy + self.disk_access_id = disk_access_id + self.tier = tier + self.bursting_enabled = bursting_enabled + self.property_updates_in_progress = None + self.supports_hibernation = supports_hibernation + self.security_profile = security_profile + self.completion_percent = completion_percent + self.public_network_access = public_network_access -class DiskEncryptionSetParameters(SubResource): - """Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. :code:`
`:code:`
` NOTE: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. +class DiskAccess(Resource): + """disk access resource. - :param id: Resource Id. - :type id: str + 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. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location where the disk access will be created. Extended + location cannot be changed. + :type extended_location: ~azure.mgmt.compute.v2021_04_01.models.ExtendedLocation + :ivar private_endpoint_connections: A readonly collection of private endpoint connections + created on the disk. Currently only one endpoint connection is supported. + :vartype private_endpoint_connections: + list[~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection] + :ivar provisioning_state: The disk access resource provisioning state. + :vartype provisioning_state: str + :ivar time_created: The time when the disk access was created. + :vartype time_created: ~datetime.datetime """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'private_endpoint_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'time_created': {'readonly': True}, + } + _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, } def __init__( self, *, - id: Optional[str] = None, + location: str, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, **kwargs ): - super(DiskEncryptionSetParameters, self).__init__(id=id, **kwargs) + super(DiskAccess, self).__init__(location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.private_endpoint_connections = None + self.provisioning_state = None + self.time_created = None -class DiskEncryptionSettings(msrest.serialization.Model): - """Describes a Encryption Settings for a Disk. +class DiskAccessList(msrest.serialization.Model): + """The List disk access operation response. - :param disk_encryption_key: Specifies the location of the disk encryption key, which is a Key - Vault Secret. - :type disk_encryption_key: ~azure.mgmt.compute.v2021_04_01.models.KeyVaultSecretReference - :param key_encryption_key: Specifies the location of the key encryption key in Key Vault. - :type key_encryption_key: ~azure.mgmt.compute.v2021_04_01.models.KeyVaultKeyReference - :param enabled: Specifies whether disk encryption should be enabled on the virtual machine. - :type enabled: bool + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of disk access resources. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.DiskAccess] + :param next_link: The uri to fetch the next page of disk access resources. Call ListNext() with + this to fetch the next page of disk access resources. + :type next_link: str """ + _validation = { + 'value': {'required': True}, + } + _attribute_map = { - 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, - 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'value': {'key': 'value', 'type': '[DiskAccess]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, *, - disk_encryption_key: Optional["KeyVaultSecretReference"] = None, - key_encryption_key: Optional["KeyVaultKeyReference"] = None, - enabled: Optional[bool] = None, + value: List["DiskAccess"], + next_link: Optional[str] = None, **kwargs ): - super(DiskEncryptionSettings, self).__init__(**kwargs) - self.disk_encryption_key = disk_encryption_key - self.key_encryption_key = key_encryption_key - self.enabled = enabled + super(DiskAccessList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link -class DiskInstanceView(msrest.serialization.Model): - """The instance view of the disk. +class DiskAccessUpdate(msrest.serialization.Model): + """Used for updating a disk access resource. - :param name: The disk name. - :type name: str - :param encryption_settings: Specifies the encryption settings for the OS Disk. - :code:`
`:code:`
` Minimum api-version: 2015-06-15. - :type encryption_settings: list[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSettings] - :param statuses: The resource status information. - :type statuses: list[~azure.mgmt.compute.v2021_04_01.models.InstanceViewStatus] + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, - 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__( self, *, - name: Optional[str] = None, - encryption_settings: Optional[List["DiskEncryptionSettings"]] = None, - statuses: Optional[List["InstanceViewStatus"]] = None, + tags: Optional[Dict[str, str]] = None, **kwargs ): - super(DiskInstanceView, self).__init__(**kwargs) - self.name = name - self.encryption_settings = encryption_settings - self.statuses = statuses + super(DiskAccessUpdate, self).__init__(**kwargs) + self.tags = tags -class ExtendedLocation(msrest.serialization.Model): - """The complex type of the extended location. +class DiskEncryptionSet(Resource): + """disk encryption set resource. - :param name: The name of the extended location. - :type name: str - :param type: The type of the extended location. Possible values include: "EdgeZone". - :type type: str or ~azure.mgmt.compute.v2021_04_01.models.ExtendedLocationTypes + 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. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The managed identity for the disk encryption set. It should be given + permission on the key vault before it can be used to encrypt disks. + :type identity: ~azure.mgmt.compute.v2021_04_01.models.EncryptionSetIdentity + :param encryption_type: The type of key used to encrypt the data of the disk. Possible values + include: "EncryptionAtRestWithCustomerKey", "EncryptionAtRestWithPlatformAndCustomerKeys". + :type encryption_type: str or ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetType + :param active_key: The key vault key which is currently used by this disk encryption set. + :type active_key: ~azure.mgmt.compute.v2021_04_01.models.KeyForDiskEncryptionSet + :ivar previous_keys: A readonly collection of key vault keys previously used by this disk + encryption set while a key rotation is in progress. It will be empty if there is no ongoing key + rotation. + :vartype previous_keys: list[~azure.mgmt.compute.v2021_04_01.models.KeyForDiskEncryptionSet] + :ivar provisioning_state: The disk encryption set provisioning state. + :vartype provisioning_state: str + :param rotation_to_latest_key_version_enabled: Set this flag to true to enable auto-updating of + this disk encryption set to the latest key version. + :type rotation_to_latest_key_version_enabled: bool + :ivar last_key_rotation_timestamp: The time when the active key of this disk encryption set was + updated. + :vartype last_key_rotation_timestamp: ~datetime.datetime + :ivar auto_key_rotation_error: The error that was encountered during auto-key rotation. If an + error is present, then auto-key rotation will not be attempted until the error on this disk + encryption set is fixed. + :vartype auto_key_rotation_error: ~azure.mgmt.compute.v2021_04_01.models.ApiError """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'previous_keys': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'last_key_rotation_timestamp': {'readonly': True}, + 'auto_key_rotation_error': {'readonly': True}, + } + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'EncryptionSetIdentity'}, + 'encryption_type': {'key': 'properties.encryptionType', 'type': 'str'}, + 'active_key': {'key': 'properties.activeKey', 'type': 'KeyForDiskEncryptionSet'}, + 'previous_keys': {'key': 'properties.previousKeys', 'type': '[KeyForDiskEncryptionSet]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'rotation_to_latest_key_version_enabled': {'key': 'properties.rotationToLatestKeyVersionEnabled', 'type': 'bool'}, + 'last_key_rotation_timestamp': {'key': 'properties.lastKeyRotationTimestamp', 'type': 'iso-8601'}, + 'auto_key_rotation_error': {'key': 'properties.autoKeyRotationError', 'type': 'ApiError'}, } def __init__( self, *, - name: Optional[str] = None, - type: Optional[Union[str, "ExtendedLocationTypes"]] = None, + location: str, + tags: Optional[Dict[str, str]] = None, + identity: Optional["EncryptionSetIdentity"] = None, + encryption_type: Optional[Union[str, "DiskEncryptionSetType"]] = None, + active_key: Optional["KeyForDiskEncryptionSet"] = None, + rotation_to_latest_key_version_enabled: Optional[bool] = None, **kwargs ): - super(ExtendedLocation, self).__init__(**kwargs) - self.name = name - self.type = type + super(DiskEncryptionSet, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity + self.encryption_type = encryption_type + self.active_key = active_key + self.previous_keys = None + self.provisioning_state = None + self.rotation_to_latest_key_version_enabled = rotation_to_latest_key_version_enabled + self.last_key_rotation_timestamp = None + self.auto_key_rotation_error = None -class HardwareProfile(msrest.serialization.Model): - """Specifies the hardware settings for the virtual machine. +class DiskEncryptionSetList(msrest.serialization.Model): + """The List disk encryption set operation response. - :param vm_size: Specifies the size of the virtual machine. :code:`
`:code:`
` The enum - data type is currently deprecated and will be removed by December 23rd 2023. - :code:`
`:code:`
` Recommended way to get the list of available sizes is using these - APIs: :code:`
`:code:`
` `List all available virtual machine sizes in an availability set - `_ - :code:`
`:code:`
` `List all available virtual machine sizes in a region - `_ :code:`
`:code:`
` + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of disk encryption sets. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet] + :param next_link: The uri to fetch the next page of disk encryption sets. Call ListNext() with + this to fetch the next page of disk encryption sets. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiskEncryptionSet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DiskEncryptionSet"], + next_link: Optional[str] = None, + **kwargs + ): + super(DiskEncryptionSetList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SubResource(msrest.serialization.Model): + """SubResource. + + :param id: Resource Id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class DiskEncryptionSetParameters(SubResource): + """Describes the parameter of customer managed disk encryption set resource id that can be specified for disk. :code:`
`:code:`
` NOTE: The disk encryption set resource id can only be specified for managed disk. Please refer https://aka.ms/mdssewithcmkoverview for more details. + + :param id: Resource Id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(DiskEncryptionSetParameters, self).__init__(id=id, **kwargs) + + +class DiskEncryptionSettings(msrest.serialization.Model): + """Describes a Encryption Settings for a Disk. + + :param disk_encryption_key: Specifies the location of the disk encryption key, which is a Key + Vault Secret. + :type disk_encryption_key: ~azure.mgmt.compute.v2021_04_01.models.KeyVaultSecretReference + :param key_encryption_key: Specifies the location of the key encryption key in Key Vault. + :type key_encryption_key: ~azure.mgmt.compute.v2021_04_01.models.KeyVaultKeyReference + :param enabled: Specifies whether disk encryption should be enabled on the virtual machine. + :type enabled: bool + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultKeyReference'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + disk_encryption_key: Optional["KeyVaultSecretReference"] = None, + key_encryption_key: Optional["KeyVaultKeyReference"] = None, + enabled: Optional[bool] = None, + **kwargs + ): + super(DiskEncryptionSettings, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + self.enabled = enabled + + +class DiskEncryptionSetUpdate(msrest.serialization.Model): + """disk encryption set update resource. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The managed identity for the disk encryption set. It should be given + permission on the key vault before it can be used to encrypt disks. + :type identity: ~azure.mgmt.compute.v2021_04_01.models.EncryptionSetIdentity + :param encryption_type: The type of key used to encrypt the data of the disk. Possible values + include: "EncryptionAtRestWithCustomerKey", "EncryptionAtRestWithPlatformAndCustomerKeys". + :type encryption_type: str or ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetType + :param active_key: Key Vault Key Url to be used for server side encryption of Managed Disks and + Snapshots. + :type active_key: ~azure.mgmt.compute.v2021_04_01.models.KeyForDiskEncryptionSet + :param rotation_to_latest_key_version_enabled: Set this flag to true to enable auto-updating of + this disk encryption set to the latest key version. + :type rotation_to_latest_key_version_enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'EncryptionSetIdentity'}, + 'encryption_type': {'key': 'properties.encryptionType', 'type': 'str'}, + 'active_key': {'key': 'properties.activeKey', 'type': 'KeyForDiskEncryptionSet'}, + 'rotation_to_latest_key_version_enabled': {'key': 'properties.rotationToLatestKeyVersionEnabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + identity: Optional["EncryptionSetIdentity"] = None, + encryption_type: Optional[Union[str, "DiskEncryptionSetType"]] = None, + active_key: Optional["KeyForDiskEncryptionSet"] = None, + rotation_to_latest_key_version_enabled: Optional[bool] = None, + **kwargs + ): + super(DiskEncryptionSetUpdate, self).__init__(**kwargs) + self.tags = tags + self.identity = identity + self.encryption_type = encryption_type + self.active_key = active_key + self.rotation_to_latest_key_version_enabled = rotation_to_latest_key_version_enabled + + +class DiskInstanceView(msrest.serialization.Model): + """The instance view of the disk. + + :param name: The disk name. + :type name: str + :param encryption_settings: Specifies the encryption settings for the OS Disk. + :code:`
`:code:`
` Minimum api-version: 2015-06-15. + :type encryption_settings: list[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSettings] + :param statuses: The resource status information. + :type statuses: list[~azure.mgmt.compute.v2021_04_01.models.InstanceViewStatus] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[DiskEncryptionSettings]'}, + 'statuses': {'key': 'statuses', 'type': '[InstanceViewStatus]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + encryption_settings: Optional[List["DiskEncryptionSettings"]] = None, + statuses: Optional[List["InstanceViewStatus"]] = None, + **kwargs + ): + super(DiskInstanceView, self).__init__(**kwargs) + self.name = name + self.encryption_settings = encryption_settings + self.statuses = statuses + + +class DiskList(msrest.serialization.Model): + """The List Disks operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of disks. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.Disk] + :param next_link: The uri to fetch the next page of disks. Call ListNext() with this to fetch + the next page of disks. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Disk]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Disk"], + next_link: Optional[str] = None, + **kwargs + ): + super(DiskList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ProxyOnlyResource(msrest.serialization.Model): + """The ProxyOnly Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DiskRestorePoint(ProxyOnlyResource): + """Properties of disk restore point. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar time_created: The timestamp of restorePoint creation. + :vartype time_created: ~datetime.datetime + :ivar source_resource_id: arm id of source disk. + :vartype source_resource_id: str + :ivar os_type: The Operating System type. Possible values include: "Windows", "Linux". + :vartype os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS + disks only. Possible values include: "V1", "V2". + :type hyper_v_generation: str or ~azure.mgmt.compute.v2021_04_01.models.HyperVGeneration + :param purchase_plan: Purchase plan information for the the image from which the OS disk was + created. + :type purchase_plan: ~azure.mgmt.compute.v2021_04_01.models.PurchasePlanAutoGenerated + :param supported_capabilities: List of supported capabilities (like accelerated networking) for + the image from which the OS disk was created. + :type supported_capabilities: ~azure.mgmt.compute.v2021_04_01.models.SupportedCapabilities + :ivar family_id: id of the backing snapshot's MIS family. + :vartype family_id: str + :ivar source_unique_id: unique incarnation id of the source disk. + :vartype source_unique_id: str + :ivar encryption: Encryption property can be used to encrypt data at rest with customer managed + keys or platform managed keys. + :vartype encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param supports_hibernation: Indicates the OS on a disk supports hibernation. + :type supports_hibernation: bool + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param completion_percent: Percentage complete for the background copy when a resource is + created via the CopyStart operation. + :type completion_percent: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'time_created': {'readonly': True}, + 'source_resource_id': {'readonly': True}, + 'os_type': {'readonly': True}, + 'family_id': {'readonly': True}, + 'source_unique_id': {'readonly': True}, + 'encryption': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'source_resource_id': {'key': 'properties.sourceResourceId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'PurchasePlanAutoGenerated'}, + 'supported_capabilities': {'key': 'properties.supportedCapabilities', 'type': 'SupportedCapabilities'}, + 'family_id': {'key': 'properties.familyId', 'type': 'str'}, + 'source_unique_id': {'key': 'properties.sourceUniqueId', 'type': 'str'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'completion_percent': {'key': 'properties.completionPercent', 'type': 'float'}, + } + + def __init__( + self, + *, + hyper_v_generation: Optional[Union[str, "HyperVGeneration"]] = None, + purchase_plan: Optional["PurchasePlanAutoGenerated"] = None, + supported_capabilities: Optional["SupportedCapabilities"] = None, + supports_hibernation: Optional[bool] = None, + network_access_policy: Optional[Union[str, "NetworkAccessPolicy"]] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + disk_access_id: Optional[str] = None, + completion_percent: Optional[float] = None, + **kwargs + ): + super(DiskRestorePoint, self).__init__(**kwargs) + self.time_created = None + self.source_resource_id = None + self.os_type = None + self.hyper_v_generation = hyper_v_generation + self.purchase_plan = purchase_plan + self.supported_capabilities = supported_capabilities + self.family_id = None + self.source_unique_id = None + self.encryption = None + self.supports_hibernation = supports_hibernation + self.network_access_policy = network_access_policy + self.public_network_access = public_network_access + self.disk_access_id = disk_access_id + self.completion_percent = completion_percent + + +class DiskRestorePointList(msrest.serialization.Model): + """The List Disk Restore Points operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of disk restore points. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.DiskRestorePoint] + :param next_link: The uri to fetch the next page of disk restore points. Call ListNext() with + this to fetch the next page of disk restore points. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiskRestorePoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DiskRestorePoint"], + next_link: Optional[str] = None, + **kwargs + ): + super(DiskRestorePointList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DiskSecurityProfile(msrest.serialization.Model): + """Contains the security related information for the resource. + + :param security_type: Specifies the SecurityType of the VM. Applicable for OS disks only. + Possible values include: "TrustedLaunch". + :type security_type: str or ~azure.mgmt.compute.v2021_04_01.models.DiskSecurityTypes + """ + + _attribute_map = { + 'security_type': {'key': 'securityType', 'type': 'str'}, + } + + def __init__( + self, + *, + security_type: Optional[Union[str, "DiskSecurityTypes"]] = None, + **kwargs + ): + super(DiskSecurityProfile, self).__init__(**kwargs) + self.security_type = security_type + + +class DiskSku(msrest.serialization.Model): + """The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: The sku name. Possible values include: "Standard_LRS", "Premium_LRS", + "StandardSSD_LRS", "UltraSSD_LRS", "Premium_ZRS", "StandardSSD_ZRS". + :type name: str or ~azure.mgmt.compute.v2021_04_01.models.DiskStorageAccountTypes + :ivar tier: The sku tier. + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "DiskStorageAccountTypes"]] = None, + **kwargs + ): + super(DiskSku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class DiskUpdate(msrest.serialization.Model): + """Disk update resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The disks sku name. Can be Standard_LRS, Premium_LRS, StandardSSD_LRS, + UltraSSD_LRS, Premium_ZRS, or StandardSSD_ZRS. + :type sku: ~azure.mgmt.compute.v2021_04_01.models.DiskSku + :param os_type: the Operating System type. Possible values include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it + indicates the size of the disk to create. If this field is present for updates or creation with + other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a + running VM, and can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used be Azure Disk + Encryption, can contain multiple encryption settings per disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsCollection + :param disk_iops_read_write: The number of IOPS allowed for this disk; only settable for + UltraSSD disks. One operation can transfer between 4k and 256k bytes. + :type disk_iops_read_write: long + :param disk_m_bps_read_write: The bandwidth allowed for this disk; only settable for UltraSSD + disks. MBps means millions of bytes per second - MB here uses the ISO notation, of powers of + 10. + :type disk_m_bps_read_write: long + :param disk_iops_read_only: The total number of IOPS that will be allowed across all VMs + mounting the shared disk as ReadOnly. One operation can transfer between 4k and 256k bytes. + :type disk_iops_read_only: long + :param disk_m_bps_read_only: The total throughput (MBps) that will be allowed across all VMs + mounting the shared disk as ReadOnly. MBps means millions of bytes per second - MB here uses + the ISO notation, of powers of 10. + :type disk_m_bps_read_only: long + :param max_shares: The maximum number of VMs that can attach to the disk at the same time. + Value greater than one indicates a disk that can be mounted on multiple VMs at the same time. + :type max_shares: int + :param encryption: Encryption property can be used to encrypt data at rest with customer + managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param tier: Performance tier of the disk (e.g, P4, S10) as described here: + https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not apply to Ultra + disks. + :type tier: str + :param bursting_enabled: Set to true to enable bursting beyond the provisioned performance + target of the disk. Bursting is disabled by default. Does not apply to Ultra disks. + :type bursting_enabled: bool + :param purchase_plan: Purchase plan information to be added on the OS disk. + :type purchase_plan: ~azure.mgmt.compute.v2021_04_01.models.PurchasePlanAutoGenerated + :param supported_capabilities: List of supported capabilities (like accelerated networking) to + be added on the OS disk. + :type supported_capabilities: ~azure.mgmt.compute.v2021_04_01.models.SupportedCapabilities + :ivar property_updates_in_progress: Properties of the disk for which update is pending. + :vartype property_updates_in_progress: + ~azure.mgmt.compute.v2021_04_01.models.PropertyUpdatesInProgress + :param supports_hibernation: Indicates the OS on a disk supports hibernation. + :type supports_hibernation: bool + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess + """ + + _validation = { + 'property_updates_in_progress': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'DiskSku'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'disk_iops_read_write': {'key': 'properties.diskIOPSReadWrite', 'type': 'long'}, + 'disk_m_bps_read_write': {'key': 'properties.diskMBpsReadWrite', 'type': 'long'}, + 'disk_iops_read_only': {'key': 'properties.diskIOPSReadOnly', 'type': 'long'}, + 'disk_m_bps_read_only': {'key': 'properties.diskMBpsReadOnly', 'type': 'long'}, + 'max_shares': {'key': 'properties.maxShares', 'type': 'int'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'tier': {'key': 'properties.tier', 'type': 'str'}, + 'bursting_enabled': {'key': 'properties.burstingEnabled', 'type': 'bool'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'PurchasePlanAutoGenerated'}, + 'supported_capabilities': {'key': 'properties.supportedCapabilities', 'type': 'SupportedCapabilities'}, + 'property_updates_in_progress': {'key': 'properties.propertyUpdatesInProgress', 'type': 'PropertyUpdatesInProgress'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + sku: Optional["DiskSku"] = None, + os_type: Optional[Union[str, "OperatingSystemTypes"]] = None, + disk_size_gb: Optional[int] = None, + encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None, + disk_iops_read_write: Optional[int] = None, + disk_m_bps_read_write: Optional[int] = None, + disk_iops_read_only: Optional[int] = None, + disk_m_bps_read_only: Optional[int] = None, + max_shares: Optional[int] = None, + encryption: Optional["Encryption"] = None, + network_access_policy: Optional[Union[str, "NetworkAccessPolicy"]] = None, + disk_access_id: Optional[str] = None, + tier: Optional[str] = None, + bursting_enabled: Optional[bool] = None, + purchase_plan: Optional["PurchasePlanAutoGenerated"] = None, + supported_capabilities: Optional["SupportedCapabilities"] = None, + supports_hibernation: Optional[bool] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + **kwargs + ): + super(DiskUpdate, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings_collection = encryption_settings_collection + self.disk_iops_read_write = disk_iops_read_write + self.disk_m_bps_read_write = disk_m_bps_read_write + self.disk_iops_read_only = disk_iops_read_only + self.disk_m_bps_read_only = disk_m_bps_read_only + self.max_shares = max_shares + self.encryption = encryption + self.network_access_policy = network_access_policy + self.disk_access_id = disk_access_id + self.tier = tier + self.bursting_enabled = bursting_enabled + self.purchase_plan = purchase_plan + self.supported_capabilities = supported_capabilities + self.property_updates_in_progress = None + self.supports_hibernation = supports_hibernation + self.public_network_access = public_network_access + + +class Encryption(msrest.serialization.Model): + """Encryption at rest settings for disk or snapshot. + + :param disk_encryption_set_id: ResourceId of the disk encryption set to use for enabling + encryption at rest. + :type disk_encryption_set_id: str + :param type: The type of key used to encrypt the data of the disk. Possible values include: + "EncryptionAtRestWithPlatformKey", "EncryptionAtRestWithCustomerKey", + "EncryptionAtRestWithPlatformAndCustomerKeys". + :type type: str or ~azure.mgmt.compute.v2021_04_01.models.EncryptionType + """ + + _attribute_map = { + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + disk_encryption_set_id: Optional[str] = None, + type: Optional[Union[str, "EncryptionType"]] = None, + **kwargs + ): + super(Encryption, self).__init__(**kwargs) + self.disk_encryption_set_id = disk_encryption_set_id + self.type = type + + +class EncryptionSetIdentity(msrest.serialization.Model): + """The managed identity for the disk encryption set. It should be given permission on the key vault before it can be used to encrypt disks. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param type: The type of Managed Identity used by the DiskEncryptionSet. Only SystemAssigned is + supported for new creations. Disk Encryption Sets can be updated with Identity type None during + migration of subscription to a new Azure Active Directory tenant; it will cause the encrypted + resources to lose access to the keys. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetIdentityType + :ivar principal_id: The object id of the Managed Identity Resource. This will be sent to the RP + from ARM via the x-ms-identity-principal-id header in the PUT request if the resource has a + systemAssigned(implicit) identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the Managed Identity Resource. This will be sent to the RP + from ARM via the x-ms-client-tenant-id header in the PUT request if the resource has a + systemAssigned(implicit) identity. + :vartype tenant_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "DiskEncryptionSetIdentityType"]] = None, + **kwargs + ): + super(EncryptionSetIdentity, self).__init__(**kwargs) + self.type = type + self.principal_id = None + self.tenant_id = None + + +class EncryptionSettingsCollection(msrest.serialization.Model): + """Encryption settings for disk or snapshot. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Set this flag to true and provide DiskEncryptionKey and optional + KeyEncryptionKey to enable encryption. Set this flag to false and remove DiskEncryptionKey and + KeyEncryptionKey to disable encryption. If EncryptionSettings is null in the request object, + the existing settings remain unchanged. + :type enabled: bool + :param encryption_settings: A collection of encryption settings, one for each disk volume. + :type encryption_settings: + list[~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsElement] + :param encryption_settings_version: Describes what type of encryption is used for the disks. + Once this field is set, it cannot be overwritten. '1.0' corresponds to Azure Disk Encryption + with AAD app.'1.1' corresponds to Azure Disk Encryption. + :type encryption_settings_version: str + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encryption_settings': {'key': 'encryptionSettings', 'type': '[EncryptionSettingsElement]'}, + 'encryption_settings_version': {'key': 'encryptionSettingsVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: bool, + encryption_settings: Optional[List["EncryptionSettingsElement"]] = None, + encryption_settings_version: Optional[str] = None, + **kwargs + ): + super(EncryptionSettingsCollection, self).__init__(**kwargs) + self.enabled = enabled + self.encryption_settings = encryption_settings + self.encryption_settings_version = encryption_settings_version + + +class EncryptionSettingsElement(msrest.serialization.Model): + """Encryption settings for one disk volume. + + :param disk_encryption_key: Key Vault Secret Url and vault id of the disk encryption key. + :type disk_encryption_key: ~azure.mgmt.compute.v2021_04_01.models.KeyVaultAndSecretReference + :param key_encryption_key: Key Vault Key Url and vault id of the key encryption key. + KeyEncryptionKey is optional and when provided is used to unwrap the disk encryption key. + :type key_encryption_key: ~azure.mgmt.compute.v2021_04_01.models.KeyVaultAndKeyReference + """ + + _attribute_map = { + 'disk_encryption_key': {'key': 'diskEncryptionKey', 'type': 'KeyVaultAndSecretReference'}, + 'key_encryption_key': {'key': 'keyEncryptionKey', 'type': 'KeyVaultAndKeyReference'}, + } + + def __init__( + self, + *, + disk_encryption_key: Optional["KeyVaultAndSecretReference"] = None, + key_encryption_key: Optional["KeyVaultAndKeyReference"] = None, + **kwargs + ): + super(EncryptionSettingsElement, self).__init__(**kwargs) + self.disk_encryption_key = disk_encryption_key + self.key_encryption_key = key_encryption_key + + +class ExtendedLocation(msrest.serialization.Model): + """The complex type of the extended location. + + :param name: The name of the extended location. + :type name: str + :param type: The type of the extended location. Possible values include: "EdgeZone". + :type type: str or ~azure.mgmt.compute.v2021_04_01.models.ExtendedLocationTypes + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[Union[str, "ExtendedLocationTypes"]] = None, + **kwargs + ): + super(ExtendedLocation, self).__init__(**kwargs) + self.name = name + self.type = type + + +class GrantAccessData(msrest.serialization.Model): + """Data used for requesting a SAS. + + All required parameters must be populated in order to send to Azure. + + :param access: Required. Possible values include: "None", "Read", "Write". + :type access: str or ~azure.mgmt.compute.v2021_04_01.models.AccessLevel + :param duration_in_seconds: Required. Time duration in seconds until the SAS access expires. + :type duration_in_seconds: int + """ + + _validation = { + 'access': {'required': True}, + 'duration_in_seconds': {'required': True}, + } + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'duration_in_seconds': {'key': 'durationInSeconds', 'type': 'int'}, + } + + def __init__( + self, + *, + access: Union[str, "AccessLevel"], + duration_in_seconds: int, + **kwargs + ): + super(GrantAccessData, self).__init__(**kwargs) + self.access = access + self.duration_in_seconds = duration_in_seconds + + +class HardwareProfile(msrest.serialization.Model): + """Specifies the hardware settings for the virtual machine. + + :param vm_size: Specifies the size of the virtual machine. :code:`
`:code:`
` The enum + data type is currently deprecated and will be removed by December 23rd 2023. + :code:`
`:code:`
` Recommended way to get the list of available sizes is using these + APIs: :code:`
`:code:`
` `List all available virtual machine sizes in an availability set + `_ + :code:`
`:code:`
` `List all available virtual machine sizes in a region + `_ :code:`
`:code:`
` `List all available virtual machine sizes for resizing `_. For more information about virtual machine sizes, see `Sizes for virtual machines @@ -2375,6 +3593,40 @@ def __init__( self.lun = lun +class ImageDiskReference(msrest.serialization.Model): + """The source image used for creating the disk. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. A relative uri containing either a Platform Image Repository or user image + reference. + :type id: str + :param lun: If the disk is created from an image's data disk, this is an index that indicates + which of the data disks in the image to use. For OS disks, this field is null. + :type lun: int + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'lun': {'key': 'lun', 'type': 'int'}, + } + + def __init__( + self, + *, + id: str, + lun: Optional[int] = None, + **kwargs + ): + super(ImageDiskReference, self).__init__(**kwargs) + self.id = id + self.lun = lun + + class ImageListResult(msrest.serialization.Model): """The List Image operation response. @@ -2693,6 +3945,107 @@ def __init__( self.time = time +class KeyForDiskEncryptionSet(msrest.serialization.Model): + """Key Vault Key Url to be used for server side encryption of Managed Disks and Snapshots. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Resource id of the KeyVault containing the key or secret. This property is + optional and cannot be used if the KeyVault subscription is not the same as the Disk Encryption + Set subscription. + :type source_vault: ~azure.mgmt.compute.v2021_04_01.models.SourceVault + :param key_url: Required. Fully versioned Key Url pointing to a key in KeyVault. Version + segment of the Url is required regardless of rotationToLatestKeyVersionEnabled value. + :type key_url: str + """ + + _validation = { + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + key_url: str, + source_vault: Optional["SourceVault"] = None, + **kwargs + ): + super(KeyForDiskEncryptionSet, self).__init__(**kwargs) + self.source_vault = source_vault + self.key_url = key_url + + +class KeyVaultAndKeyReference(msrest.serialization.Model): + """Key Vault Key Url and vault id of KeK, KeK is optional and when provided is used to unwrap the encryptionKey. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the key or secret. + :type source_vault: ~azure.mgmt.compute.v2021_04_01.models.SourceVault + :param key_url: Required. Url pointing to a key or secret in KeyVault. + :type key_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'key_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'key_url': {'key': 'keyUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + source_vault: "SourceVault", + key_url: str, + **kwargs + ): + super(KeyVaultAndKeyReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.key_url = key_url + + +class KeyVaultAndSecretReference(msrest.serialization.Model): + """Key Vault Secret Url and vault id of the encryption key. + + All required parameters must be populated in order to send to Azure. + + :param source_vault: Required. Resource id of the KeyVault containing the key or secret. + :type source_vault: ~azure.mgmt.compute.v2021_04_01.models.SourceVault + :param secret_url: Required. Url pointing to a key or secret in KeyVault. + :type secret_url: str + """ + + _validation = { + 'source_vault': {'required': True}, + 'secret_url': {'required': True}, + } + + _attribute_map = { + 'source_vault': {'key': 'sourceVault', 'type': 'SourceVault'}, + 'secret_url': {'key': 'secretUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + source_vault: "SourceVault", + secret_url: str, + **kwargs + ): + super(KeyVaultAndSecretReference, self).__init__(**kwargs) + self.source_vault = source_vault + self.secret_url = secret_url + + class KeyVaultKeyReference(msrest.serialization.Model): """Describes a reference to Key Vault Key. @@ -3706,17 +5059,252 @@ class Plan(msrest.serialization.Model): def __init__( self, *, - name: Optional[str] = None, - publisher: Optional[str] = None, - product: Optional[str] = None, - promotion_code: Optional[str] = None, + name: Optional[str] = None, + publisher: Optional[str] = None, + product: Optional[str] = None, + promotion_code: Optional[str] = None, + **kwargs + ): + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(msrest.serialization.Model): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: private endpoint connection Id. + :vartype id: str + :ivar name: private endpoint connection name. + :vartype name: str + :ivar type: private endpoint connection type. + :vartype type: str + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between DiskAccess and Virtual Network. + :type private_link_service_connection_state: + ~azure.mgmt.compute.v2021_04_01.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.private_endpoint = None + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private endpoint connections. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection] + :param next_link: The uri to fetch the next page of snapshots. Call ListNext() with this to + fetch the next page of snapshots. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PrivateLinkResource(msrest.serialization.Model): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: private link resource Id. + :vartype id: str + :ivar name: private link resource name. + :vartype name: str + :ivar type: private link resource type. + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or + ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[str] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PropertyUpdatesInProgress(msrest.serialization.Model): + """Properties of the disk for which update is pending. + + :param target_tier: The target performance tier of the disk if a tier change operation is in + progress. + :type target_tier: str + """ + + _attribute_map = { + 'target_tier': {'key': 'targetTier', 'type': 'str'}, + } + + def __init__( + self, + *, + target_tier: Optional[str] = None, **kwargs ): - super(Plan, self).__init__(**kwargs) - self.name = name - self.publisher = publisher - self.product = product - self.promotion_code = promotion_code + super(PropertyUpdatesInProgress, self).__init__(**kwargs) + self.target_tier = target_tier class ProximityPlacementGroup(Resource): @@ -3951,6 +5539,51 @@ def __init__( self.product = product +class PurchasePlanAutoGenerated(msrest.serialization.Model): + """Used for establishing the purchase context of any 3rd Party artifact through MarketPlace. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The plan ID. + :type name: str + :param publisher: Required. The publisher ID. + :type publisher: str + :param product: Required. Specifies the product of the image from the marketplace. This is the + same value as Offer under the imageReference element. + :type product: str + :param promotion_code: The Offer Promotion Code. + :type promotion_code: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + publisher: str, + product: str, + promotion_code: Optional[str] = None, + **kwargs + ): + super(PurchasePlanAutoGenerated, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + + class RecoveryWalkResponse(msrest.serialization.Model): """Response after calling a manual recovery walk. @@ -4046,6 +5679,40 @@ def __init__( self.interval_length = interval_length +class ResourceUriList(msrest.serialization.Model): + """The List resources which are encrypted with the disk encryption set. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of IDs or Owner IDs of resources which are encrypted with the + disk encryption set. + :type value: list[str] + :param next_link: The uri to fetch the next page of encrypted resources. Call ListNext() with + this to fetch the next page of encrypted resources. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[str]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List[str], + next_link: Optional[str] = None, + **kwargs + ): + super(ResourceUriList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + class RestorePoint(ProxyResource): """Restore Point details. @@ -5158,6 +6825,31 @@ def __init__( self.security_type = security_type +class ShareInfoElement(msrest.serialization.Model): + """ShareInfoElement. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vm_uri: A relative URI containing the ID of the VM that has the disk attached. + :vartype vm_uri: str + """ + + _validation = { + 'vm_uri': {'readonly': True}, + } + + _attribute_map = { + 'vm_uri': {'key': 'vmUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ShareInfoElement, self).__init__(**kwargs) + self.vm_uri = None + + class Sku(msrest.serialization.Model): """Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name. @@ -5191,6 +6883,340 @@ def __init__( self.capacity = capacity +class Snapshot(Resource): + """Snapshot resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar managed_by: Unused. Always Null. + :vartype managed_by: str + :param sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is + an optional parameter for incremental snapshot and the default behavior is the SKU will be set + to the same sku as the previous snapshot. + :type sku: ~azure.mgmt.compute.v2021_04_01.models.SnapshotSku + :param extended_location: The extended location where the snapshot will be created. Extended + location cannot be changed. + :type extended_location: ~azure.mgmt.compute.v2021_04_01.models.ExtendedLocation + :ivar time_created: The time when the snapshot was created. + :vartype time_created: ~datetime.datetime + :param os_type: The Operating System type. Possible values include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS + disks only. Possible values include: "V1", "V2". + :type hyper_v_generation: str or ~azure.mgmt.compute.v2021_04_01.models.HyperVGeneration + :param purchase_plan: Purchase plan information for the image from which the source disk for + the snapshot was originally created. + :type purchase_plan: ~azure.mgmt.compute.v2021_04_01.models.PurchasePlanAutoGenerated + :param supported_capabilities: List of supported capabilities (like Accelerated Networking) for + the image from which the source disk from the snapshot was originally created. + :type supported_capabilities: ~azure.mgmt.compute.v2021_04_01.models.SupportedCapabilities + :param creation_data: Disk source information. CreationData information cannot be changed after + the disk has been created. + :type creation_data: ~azure.mgmt.compute.v2021_04_01.models.CreationData + :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it + indicates the size of the disk to create. If this field is present for updates or creation with + other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a + running VM, and can only increase the disk's size. + :type disk_size_gb: int + :ivar disk_size_bytes: The size of the disk in bytes. This field is read only. + :vartype disk_size_bytes: long + :ivar disk_state: The state of the snapshot. Possible values include: "Unattached", "Attached", + "Reserved", "Frozen", "ActiveSAS", "ActiveSASFrozen", "ReadyToUpload", "ActiveUpload". + :vartype disk_state: str or ~azure.mgmt.compute.v2021_04_01.models.DiskState + :ivar unique_id: Unique Guid identifying the resource. + :vartype unique_id: str + :param encryption_settings_collection: Encryption settings collection used be Azure Disk + Encryption, can contain multiple encryption settings per disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsCollection + :ivar provisioning_state: The disk provisioning state. + :vartype provisioning_state: str + :param incremental: Whether a snapshot is incremental. Incremental snapshots on the same disk + occupy less space than full snapshots and can be diffed. + :type incremental: bool + :param encryption: Encryption property can be used to encrypt data at rest with customer + managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param supports_hibernation: Indicates the OS on a snapshot supports hibernation. + :type supports_hibernation: bool + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess + :param completion_percent: Percentage complete for the background copy when a resource is + created via the CopyStart operation. + :type completion_percent: float + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'time_created': {'readonly': True}, + 'disk_size_bytes': {'readonly': True}, + 'disk_state': {'readonly': True}, + 'unique_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'time_created': {'key': 'properties.timeCreated', 'type': 'iso-8601'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'PurchasePlanAutoGenerated'}, + 'supported_capabilities': {'key': 'properties.supportedCapabilities', 'type': 'SupportedCapabilities'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'disk_size_bytes': {'key': 'properties.diskSizeBytes', 'type': 'long'}, + 'disk_state': {'key': 'properties.diskState', 'type': 'str'}, + 'unique_id': {'key': 'properties.uniqueId', 'type': 'str'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'incremental': {'key': 'properties.incremental', 'type': 'bool'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'completion_percent': {'key': 'properties.completionPercent', 'type': 'float'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + sku: Optional["SnapshotSku"] = None, + extended_location: Optional["ExtendedLocation"] = None, + os_type: Optional[Union[str, "OperatingSystemTypes"]] = None, + hyper_v_generation: Optional[Union[str, "HyperVGeneration"]] = None, + purchase_plan: Optional["PurchasePlanAutoGenerated"] = None, + supported_capabilities: Optional["SupportedCapabilities"] = None, + creation_data: Optional["CreationData"] = None, + disk_size_gb: Optional[int] = None, + encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None, + incremental: Optional[bool] = None, + encryption: Optional["Encryption"] = None, + network_access_policy: Optional[Union[str, "NetworkAccessPolicy"]] = None, + disk_access_id: Optional[str] = None, + supports_hibernation: Optional[bool] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + completion_percent: Optional[float] = None, + **kwargs + ): + super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) + self.managed_by = None + self.sku = sku + self.extended_location = extended_location + self.time_created = None + self.os_type = os_type + self.hyper_v_generation = hyper_v_generation + self.purchase_plan = purchase_plan + self.supported_capabilities = supported_capabilities + self.creation_data = creation_data + self.disk_size_gb = disk_size_gb + self.disk_size_bytes = None + self.disk_state = None + self.unique_id = None + self.encryption_settings_collection = encryption_settings_collection + self.provisioning_state = None + self.incremental = incremental + self.encryption = encryption + self.network_access_policy = network_access_policy + self.disk_access_id = disk_access_id + self.supports_hibernation = supports_hibernation + self.public_network_access = public_network_access + self.completion_percent = completion_percent + + +class SnapshotList(msrest.serialization.Model): + """The List Snapshots operation response. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of snapshots. + :type value: list[~azure.mgmt.compute.v2021_04_01.models.Snapshot] + :param next_link: The uri to fetch the next page of snapshots. Call ListNext() with this to + fetch the next page of snapshots. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Snapshot]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["Snapshot"], + next_link: Optional[str] = None, + **kwargs + ): + super(SnapshotList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SnapshotSku(msrest.serialization.Model): + """The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is an optional parameter for incremental snapshot and the default behavior is the SKU will be set to the same sku as the previous snapshot. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: The sku name. Possible values include: "Standard_LRS", "Premium_LRS", + "Standard_ZRS". + :type name: str or ~azure.mgmt.compute.v2021_04_01.models.SnapshotStorageAccountTypes + :ivar tier: The sku tier. + :vartype tier: str + """ + + _validation = { + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "SnapshotStorageAccountTypes"]] = None, + **kwargs + ): + super(SnapshotSku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class SnapshotUpdate(msrest.serialization.Model): + """Snapshot update resource. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The snapshots sku name. Can be Standard_LRS, Premium_LRS, or Standard_ZRS. This is + an optional parameter for incremental snapshot and the default behavior is the SKU will be set + to the same sku as the previous snapshot. + :type sku: ~azure.mgmt.compute.v2021_04_01.models.SnapshotSku + :param os_type: the Operating System type. Possible values include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_04_01.models.OperatingSystemTypes + :param disk_size_gb: If creationData.createOption is Empty, this field is mandatory and it + indicates the size of the disk to create. If this field is present for updates or creation with + other options, it indicates a resize. Resizes are only allowed if the disk is not attached to a + running VM, and can only increase the disk's size. + :type disk_size_gb: int + :param encryption_settings_collection: Encryption settings collection used be Azure Disk + Encryption, can contain multiple encryption settings per disk or snapshot. + :type encryption_settings_collection: + ~azure.mgmt.compute.v2021_04_01.models.EncryptionSettingsCollection + :param encryption: Encryption property can be used to encrypt data at rest with customer + managed keys or platform managed keys. + :type encryption: ~azure.mgmt.compute.v2021_04_01.models.Encryption + :param network_access_policy: Policy for accessing the disk via network. Possible values + include: "AllowAll", "AllowPrivate", "DenyAll". + :type network_access_policy: str or ~azure.mgmt.compute.v2021_04_01.models.NetworkAccessPolicy + :param disk_access_id: ARM id of the DiskAccess resource for using private endpoints on disks. + :type disk_access_id: str + :param supports_hibernation: Indicates the OS on a snapshot supports hibernation. + :type supports_hibernation: bool + :param public_network_access: Policy for controlling export on the disk. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.compute.v2021_04_01.models.PublicNetworkAccess + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'SnapshotSku'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'disk_size_gb': {'key': 'properties.diskSizeGB', 'type': 'int'}, + 'encryption_settings_collection': {'key': 'properties.encryptionSettingsCollection', 'type': 'EncryptionSettingsCollection'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'network_access_policy': {'key': 'properties.networkAccessPolicy', 'type': 'str'}, + 'disk_access_id': {'key': 'properties.diskAccessId', 'type': 'str'}, + 'supports_hibernation': {'key': 'properties.supportsHibernation', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + sku: Optional["SnapshotSku"] = None, + os_type: Optional[Union[str, "OperatingSystemTypes"]] = None, + disk_size_gb: Optional[int] = None, + encryption_settings_collection: Optional["EncryptionSettingsCollection"] = None, + encryption: Optional["Encryption"] = None, + network_access_policy: Optional[Union[str, "NetworkAccessPolicy"]] = None, + disk_access_id: Optional[str] = None, + supports_hibernation: Optional[bool] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + **kwargs + ): + super(SnapshotUpdate, self).__init__(**kwargs) + self.tags = tags + self.sku = sku + self.os_type = os_type + self.disk_size_gb = disk_size_gb + self.encryption_settings_collection = encryption_settings_collection + self.encryption = encryption + self.network_access_policy = network_access_policy + self.disk_access_id = disk_access_id + self.supports_hibernation = supports_hibernation + self.public_network_access = public_network_access + + +class SourceVault(msrest.serialization.Model): + """The vault id is an Azure Resource Manager Resource id in the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}. + + :param id: Resource Id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(SourceVault, self).__init__(**kwargs) + self.id = id + + class SpotRestorePolicy(msrest.serialization.Model): """Specifies the Spot-Try-Restore properties for the virtual machine scale set. :code:`
`:code:`
` With this property customer can enable or disable automatic restore of the evicted Spot VMSS VM instances opportunistically based on capacity availability and pricing constraint. @@ -5518,6 +7544,28 @@ def __init__( self.colocation_status = colocation_status +class SupportedCapabilities(msrest.serialization.Model): + """List of supported capabilities (like accelerated networking) persisted on the disk resource for VM use. + + :param accelerated_network: True if the image from which the OS disk is created supports + accelerated networking. + :type accelerated_network: bool + """ + + _attribute_map = { + 'accelerated_network': {'key': 'acceleratedNetwork', 'type': 'bool'}, + } + + def __init__( + self, + *, + accelerated_network: Optional[bool] = None, + **kwargs + ): + super(SupportedCapabilities, self).__init__(**kwargs) + self.accelerated_network = accelerated_network + + class TerminateNotificationProfile(msrest.serialization.Model): """TerminateNotificationProfile. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/__init__.py index 8779b7a16206..431c2df28db4 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/__init__.py @@ -32,6 +32,11 @@ from ._log_analytics_operations import LogAnalyticsOperations from ._virtual_machine_run_commands_operations import VirtualMachineRunCommandsOperations from ._virtual_machine_scale_set_vm_run_commands_operations import VirtualMachineScaleSetVMRunCommandsOperations +from ._disks_operations import DisksOperations +from ._snapshots_operations import SnapshotsOperations +from ._disk_encryption_sets_operations import DiskEncryptionSetsOperations +from ._disk_accesses_operations import DiskAccessesOperations +from ._disk_restore_point_operations import DiskRestorePointOperations __all__ = [ 'Operations', @@ -60,4 +65,9 @@ 'LogAnalyticsOperations', 'VirtualMachineRunCommandsOperations', 'VirtualMachineScaleSetVMRunCommandsOperations', + 'DisksOperations', + 'SnapshotsOperations', + 'DiskEncryptionSetsOperations', + 'DiskAccessesOperations', + 'DiskRestorePointOperations', ] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_application_gateways_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_accesses_operations.py similarity index 65% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_application_gateways_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_accesses_operations.py index 05c415346c5e..793b5bdce791 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_application_gateways_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_accesses_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class ApplicationGatewaysOperations(object): - """ApplicationGatewaysOperations operations. +class DiskAccessesOperations(object): + """DiskAccessesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.compute.v2021_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,26 +47,29 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def _create_or_update_initial( self, resource_group_name, # type: str - application_gateway_name, # type: str + disk_access_name, # type: str + disk_access, # type: "_models.DiskAccess" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.DiskAccess" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,54 +79,72 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(disk_access, 'DiskAccess') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('DiskAccess', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DiskAccess', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore - def begin_delete( + def begin_create_or_update( self, resource_group_name, # type: str - application_gateway_name, # type: str + disk_access_name, # type: str + disk_access, # type: "_models.DiskAccess" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified application gateway. + # type: (...) -> LROPoller["_models.DiskAccess"] + """Creates or updates a disk access resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param disk_access: disk access object supplied in the body of the Put disk access operation. + :type disk_access: ~azure.mgmt.compute.v2021_04_01.models.DiskAccess :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either DiskAccess or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.DiskAccess] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, + disk_access_name=disk_access_name, + disk_access=disk_access, cls=lambda x,y,z: x, **kwargs ) @@ -132,13 +153,148 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DiskAccess', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + disk_access_name, # type: str + disk_access, # type: "_models.DiskAccessUpdate" + **kwargs # type: Any + ): + # type: (...) -> "_models.DiskAccess" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(disk_access, 'DiskAccessUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DiskAccess', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DiskAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + disk_access_name, # type: str + disk_access, # type: "_models.DiskAccessUpdate" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DiskAccess"] + """Updates (patches) a disk access resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param disk_access: disk access object supplied in the body of the Patch disk access operation. + :type disk_access: ~azure.mgmt.compute.v2021_04_01.models.DiskAccessUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DiskAccess or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.DiskAccess] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + disk_access_name=disk_access_name, + disk_access=disk_access, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DiskAccess', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -153,40 +309,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore def get( self, resource_group_name, # type: str - application_gateway_name, # type: str + disk_access_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ApplicationGateway" - """Gets the specified application gateway. + # type: (...) -> "_models.DiskAccess" + """Gets information about a disk access resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ApplicationGateway + :return: DiskAccess, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskAccess :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccess"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -206,37 +364,35 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGateway', pipeline_response) + deserialized = self._deserialize('DiskAccess', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore - def _create_or_update_initial( + def _delete_initial( self, resource_group_name, # type: str - application_gateway_name, # type: str - parameters, # type: "_models.ApplicationGateway" + disk_access_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ApplicationGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") + api_version = "2021-04-01" accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -246,70 +402,57 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ApplicationGateway') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore - def begin_create_or_update( + def begin_delete( self, resource_group_name, # type: str - application_gateway_name, # type: str - parameters, # type: "_models.ApplicationGateway" + disk_access_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ApplicationGateway"] - """Creates or updates the specified application gateway. + # type: (...) -> LROPoller[None] + """Deletes a disk access resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param parameters: Parameters supplied to the create or update application gateway operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ApplicationGateway + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ApplicationGateway] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - parameters=parameters, + disk_access_name=disk_access_name, cls=lambda x,y,z: x, **kwargs ) @@ -318,16 +461,13 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -342,29 +482,29 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}'} # type: ignore - def list( + def list_by_resource_group( self, resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ApplicationGatewayListResult"] - """Lists all application gateways in a resource group. + # type: (...) -> Iterable["_models.DiskAccessList"] + """Lists all the disk access resources under a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayListResult] + :return: An iterator like instance of either DiskAccessList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskAccessList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccessList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -374,10 +514,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -392,7 +532,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayListResult', pipeline_response) + deserialized = self._deserialize('DiskAccessList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -413,26 +553,26 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses'} # type: ignore - def list_all( + def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ApplicationGatewayListResult"] - """Gets all the application gateways in a subscription. + # type: (...) -> Iterable["_models.DiskAccessList"] + """Lists all the disk access resources under a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayListResult] + :return: An iterator like instance of either DiskAccessList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskAccessList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskAccessList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -442,7 +582,7 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -459,7 +599,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayListResult', pipeline_response) + deserialized = self._deserialize('DiskAccessList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -480,136 +620,42 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways'} # type: ignore - - def _start_initial( - self, - resource_group_name, # type: str - application_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - - # Construct URL - url = self._start_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskAccesses'} # type: ignore - _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start'} # type: ignore - - def begin_start( + def get_private_link_resources( self, resource_group_name, # type: str - application_gateway_name, # type: str + disk_access_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Starts the specified application gateway. + # type: (...) -> "_models.PrivateLinkResourceListResult" + """Gets the private link resources possible under disk access resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._start_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start'} # type: ignore - - def _stop_initial( - self, - resource_group_name, # type: str - application_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" + accept = "application/json" # Construct URL - url = self._stop_initial.metadata['url'] # type: ignore + url = self.get_private_link_resources.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -619,121 +665,65 @@ def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if cls: - return cls(pipeline_response, None, {}) - - _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop'} # type: ignore - - def begin_stop( - self, - resource_group_name, # type: str - application_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Stops the specified application gateway in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._stop_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } + if cls: + return cls(pipeline_response, deserialized, {}) - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop'} # type: ignore + return deserialized + get_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateLinkResources'} # type: ignore - def _backend_health_initial( + def _update_a_private_endpoint_connection_initial( self, resource_group_name, # type: str - application_gateway_name, # type: str - expand=None, # type: Optional[str] + disk_access_name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_connection, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> Optional["_models.ApplicationGatewayBackendHealth"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealth"]] + # type: (...) -> "_models.PrivateEndpointConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._backend_health_initial.metadata['url'] # type: ignore + url = self._update_a_private_endpoint_connection_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -741,54 +731,64 @@ def _backend_health_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _backend_health_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + _update_a_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - def begin_backend_health( + def begin_update_a_private_endpoint_connection( self, resource_group_name, # type: str - application_gateway_name, # type: str - expand=None, # type: Optional[str] + disk_access_name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_connection, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ApplicationGatewayBackendHealth"] - """Gets the backend health of the specified application gateway in a resource group. + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + """Approve or reject a private endpoint connection under disk access resource, this can't be used + to create a new private endpoint connection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. - :type expand: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: private endpoint connection object supplied in the body of + the Put private endpoint connection operation. + :type private_endpoint_connection: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ApplicationGatewayBackendHealth or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealth] + :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealth"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._backend_health_initial( + raw_result = self._update_a_private_endpoint_connection_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - expand=expand, + disk_access_name=disk_access_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, cls=lambda x,y,z: x, **kwargs ) @@ -797,16 +797,17 @@ def begin_backend_health( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -821,32 +822,46 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_backend_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + begin_update_a_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - def list_available_waf_rule_sets( + def get_a_private_endpoint_connection( self, + resource_group_name, # type: str + disk_access_name, # type: str + private_endpoint_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ApplicationGatewayAvailableWafRuleSetsResult" - """Lists all available web application firewall rule sets. + # type: (...) -> "_models.PrivateEndpointConnection" + """Gets information about a private endpoint connection under a disk access resource. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewayAvailableWafRuleSetsResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayAvailableWafRuleSetsResult + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableWafRuleSetsResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL - url = self.list_available_waf_rule_sets.metadata['url'] # type: ignore + url = self.get_a_private_endpoint_connection.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -866,38 +881,37 @@ def list_available_waf_rule_sets( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGatewayAvailableWafRuleSetsResult', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_available_waf_rule_sets.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets'} # type: ignore + get_a_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - def list_available_ssl_options( + def _delete_a_private_endpoint_connection_initial( self, + resource_group_name, # type: str + disk_access_name, # type: str + private_endpoint_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ApplicationGatewayAvailableSslOptions" - """Lists available Ssl options for configuring Ssl policy. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewayAvailableSslOptions, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayAvailableSslOptions - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslOptions"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" # Construct URL - url = self.list_available_ssl_options.metadata['url'] # type: ignore + url = self._delete_a_private_endpoint_connection_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -909,40 +923,117 @@ def list_available_ssl_options( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGatewayAvailableSslOptions', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - list_available_ssl_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default'} # type: ignore + _delete_a_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete_a_private_endpoint_connection( + self, + resource_group_name, # type: str + disk_access_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a private endpoint connection under a disk access resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_a_private_endpoint_connection_initial( + resource_group_name=resource_group_name, + disk_access_name=disk_access_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } - def list_available_ssl_predefined_policies( + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete_a_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def list_private_endpoint_connections( self, + resource_group_name, # type: str + disk_access_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] - """Lists all SSL predefined policies for configuring Ssl policy. + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """List information about private endpoint connections under a disk access resource. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_access_name: The name of the disk access resource that is being created. The name + can't be changed after the disk encryption set is created. Supported characters for the name + are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_access_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayAvailableSslPredefinedPolicies or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -952,9 +1043,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_available_ssl_predefined_policies.metadata['url'] # type: ignore + url = self.list_private_endpoint_connections.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskAccessName': self._serialize.url("disk_access_name", disk_access_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -969,7 +1062,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayAvailableSslPredefinedPolicies', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -990,59 +1083,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_available_ssl_predefined_policies.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies'} # type: ignore - - def get_ssl_predefined_policy( - self, - predefined_policy_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationGatewaySslPredefinedPolicy" - """Gets Ssl predefined policy with the specified policy name. - - :param predefined_policy_name: Name of Ssl predefined policy. - :type predefined_policy_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewaySslPredefinedPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPredefinedPolicy - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewaySslPredefinedPolicy"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json" - - # Construct URL - url = self.get_ssl_predefined_policy.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'predefinedPolicyName': self._serialize.url("predefined_policy_name", predefined_policy_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationGatewaySslPredefinedPolicy', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_ssl_predefined_policy.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}'} # type: ignore + list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskAccesses/{diskAccessName}/privateEndpointConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_networks_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_encryption_sets_operations.py similarity index 68% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_networks_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_encryption_sets_operations.py index ff4b4a0d5983..6e79325cfacf 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_networks_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_encryption_sets_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworksOperations(object): - """VirtualNetworksOperations operations. +class DiskEncryptionSetsOperations(object): + """DiskEncryptionSetsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.compute.v2021_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,26 +47,29 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def _create_or_update_initial( self, resource_group_name, # type: str - virtual_network_name, # type: str + disk_encryption_set_name, # type: str + disk_encryption_set, # type: "_models.DiskEncryptionSet" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.DiskEncryptionSet" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,54 +79,73 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(disk_encryption_set, 'DiskEncryptionSet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - def begin_delete( + def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_name, # type: str + disk_encryption_set_name, # type: str + disk_encryption_set, # type: "_models.DiskEncryptionSet" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified virtual network. + # type: (...) -> LROPoller["_models.DiskEncryptionSet"] + """Creates or updates a disk encryption set. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str + :param disk_encryption_set: disk encryption set object supplied in the body of the Put disk + encryption set operation. + :type disk_encryption_set: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either DiskEncryptionSet or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, + disk_encryption_set_name=disk_encryption_set_name, + disk_encryption_set=disk_encryption_set, cls=lambda x,y,z: x, **kwargs ) @@ -132,13 +154,16 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -153,95 +178,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - def get( + def _update_initial( self, resource_group_name, # type: str - virtual_network_name, # type: str - expand=None, # type: Optional[str] + disk_encryption_set_name, # type: str + disk_encryption_set, # type: "_models.DiskEncryptionSetUpdate" **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetwork" - """Gets the specified virtual network by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.VirtualNetwork - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + # type: (...) -> "_models.DiskEncryptionSet" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualNetwork', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - virtual_network_name, # type: str - parameters, # type: "_models.VirtualNetwork" - **kwargs # type: Any - ): - # type: (...) -> "_models.VirtualNetwork" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,66 +216,69 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetwork') + body_content = self._serialize.body(disk_encryption_set, 'DiskEncryptionSetUpdate') body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + if response.status_code == 202: + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - def begin_create_or_update( + def begin_update( self, resource_group_name, # type: str - virtual_network_name, # type: str - parameters, # type: "_models.VirtualNetwork" + disk_encryption_set_name, # type: str + disk_encryption_set, # type: "_models.DiskEncryptionSetUpdate" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetwork"] - """Creates or updates a virtual network in the specified resource group. + # type: (...) -> LROPoller["_models.DiskEncryptionSet"] + """Updates (patches) a disk encryption set. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VirtualNetwork + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str + :param disk_encryption_set: disk encryption set object supplied in the body of the Patch disk + encryption set operation. + :type disk_encryption_set: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetwork] + :return: An instance of LROPoller that returns either DiskEncryptionSet or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - parameters=parameters, + disk_encryption_set_name=disk_encryption_set_name, + disk_encryption_set=disk_encryption_set, cls=lambda x,y,z: x, **kwargs ) @@ -323,16 +287,16 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -347,31 +311,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - def _update_tags_initial( + def get( self, resource_group_name, # type: str - virtual_network_name, # type: str - parameters, # type: "_models.TagsObject" + disk_encryption_set_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetwork" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + # type: (...) -> "_models.DiskEncryptionSet" + """Gets information about a disk encryption set. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiskEncryptionSet, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -381,13 +356,9 @@ def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -395,52 +366,95 @@ def _update_tags_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSet', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + disk_encryption_set_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - def begin_update_tags( + def begin_delete( self, resource_group_name, # type: str - virtual_network_name, # type: str - parameters, # type: "_models.TagsObject" + disk_encryption_set_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetwork"] - """Updates a virtual network tags. + # type: (...) -> LROPoller[None] + """Deletes a disk encryption set. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param parameters: Parameters supplied to update virtual network tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetwork] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._update_tags_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - parameters=parameters, + disk_encryption_set_name=disk_encryption_set_name, cls=lambda x,y,z: x, **kwargs ) @@ -449,16 +463,13 @@ def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetwork', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -473,27 +484,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}'} # type: ignore - def list_all( + def list_by_resource_group( self, + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkListResult"] - """Gets all virtual networks in a subscription. + # type: (...) -> Iterable["_models.DiskEncryptionSetList"] + """Lists all the disk encryption sets under a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkListResult] + :return: An iterator like instance of either DiskEncryptionSetList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSetList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -502,9 +516,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -519,7 +534,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListResult', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSetList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -540,30 +555,27 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets'} # type: ignore def list( self, - resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkListResult"] - """Gets all virtual networks in a resource group. + # type: (...) -> Iterable["_models.DiskEncryptionSetList"] + """Lists all the disk encryption sets under a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkListResult] + :return: An iterator like instance of either DiskEncryptionSetList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskEncryptionSetList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskEncryptionSetList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -574,7 +586,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -590,7 +601,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListResult', pipeline_response) + deserialized = self._deserialize('DiskEncryptionSetList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -611,97 +622,35 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/diskEncryptionSets'} # type: ignore - def check_ip_address_availability( + def list_associated_resources( self, resource_group_name, # type: str - virtual_network_name, # type: str - ip_address=None, # type: Optional[str] + disk_encryption_set_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.IPAddressAvailabilityResult" - """Checks whether a private IP address is available for use. + # type: (...) -> Iterable["_models.ResourceUriList"] + """Lists all resources that are encrypted with this disk encryption set. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param ip_address: The private IP address to be verified. - :type ip_address: str + :param disk_encryption_set_name: The name of the disk encryption set that is being created. The + name can't be changed after the disk encryption set is created. Supported characters for the + name are a-z, A-Z, 0-9, _ and -. The maximum name length is 80 characters. + :type disk_encryption_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: IPAddressAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.IPAddressAvailabilityResult + :return: An iterator like instance of either ResourceUriList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.ResourceUriList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.IPAddressAvailabilityResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceUriList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.check_ip_address_availability.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if ip_address is not None: - query_parameters['ipAddress'] = self._serialize.query("ip_address", ip_address, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('IPAddressAvailabilityResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - check_ip_address_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability'} # type: ignore - - def list_usage( - self, - resource_group_name, # type: str - virtual_network_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.VirtualNetworkListUsageResult"] - """Lists usage stats. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListUsageResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkListUsageResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListUsageResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -710,11 +659,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_usage.metadata['url'] # type: ignore + url = self.list_associated_resources.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskEncryptionSetName': self._serialize.url("disk_encryption_set_name", disk_encryption_set_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -729,7 +678,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListUsageResult', pipeline_response) + deserialized = self._deserialize('ResourceUriList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -750,4 +699,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_usage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages'} # type: ignore + list_associated_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{diskEncryptionSetName}/associatedResources'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_restore_point_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_restore_point_operations.py new file mode 100644 index 000000000000..d09d6e2bdf49 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disk_restore_point_operations.py @@ -0,0 +1,469 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DiskRestorePointOperations(object): + """DiskRestorePointOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.compute.v2021_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + disk_restore_point_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DiskRestorePoint" + """Get disk restorePoint resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. + :type disk_restore_point_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiskRestorePoint, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.DiskRestorePoint + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskRestorePoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiskRestorePoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}'} # type: ignore + + def list_by_restore_point( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DiskRestorePointList"] + """Lists diskRestorePoints under a vmRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. + :type vm_restore_point_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiskRestorePointList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskRestorePointList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskRestorePointList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_restore_point.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DiskRestorePointList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_restore_point.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints'} # type: ignore + + def _grant_access_initial( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + disk_restore_point_name, # type: str + grant_access_data, # type: "_models.GrantAccessData" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.AccessUri"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AccessUri"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._grant_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _grant_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess'} # type: ignore + + def begin_grant_access( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + disk_restore_point_name, # type: str + grant_access_data, # type: "_models.GrantAccessData" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AccessUri"] + """Grants access to a diskRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. + :type disk_restore_point_name: str + :param grant_access_data: Access data object supplied in the body of the get disk access + operation. + :type grant_access_data: ~azure.mgmt.compute.v2021_04_01.models.GrantAccessData + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AccessUri or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.AccessUri] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessUri"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + restore_point_collection_name=restore_point_collection_name, + vm_restore_point_name=vm_restore_point_name, + disk_restore_point_name=disk_restore_point_name, + grant_access_data=grant_access_data, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/beginGetAccess'} # type: ignore + + def _revoke_access_initial( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + disk_restore_point_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self._revoke_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _revoke_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess'} # type: ignore + + def begin_revoke_access( + self, + resource_group_name, # type: str + restore_point_collection_name, # type: str + vm_restore_point_name, # type: str + disk_restore_point_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Revokes access to a diskRestorePoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param restore_point_collection_name: The name of the restore point collection that the disk + restore point belongs. + :type restore_point_collection_name: str + :param vm_restore_point_name: The name of the vm restore point that the disk disk restore point + belongs. + :type vm_restore_point_name: str + :param disk_restore_point_name: The name of the disk restore point created. + :type disk_restore_point_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + restore_point_collection_name=restore_point_collection_name, + vm_restore_point_name=vm_restore_point_name, + disk_restore_point_name=disk_restore_point_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'restorePointCollectionName': self._serialize.url("restore_point_collection_name", restore_point_collection_name, 'str'), + 'vmRestorePointName': self._serialize.url("vm_restore_point_name", vm_restore_point_name, 'str'), + 'diskRestorePointName': self._serialize.url("disk_restore_point_name", disk_restore_point_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/restorePointCollections/{restorePointCollectionName}/restorePoints/{vmRestorePointName}/diskRestorePoints/{diskRestorePointName}/endGetAccess'} # type: ignore diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_namespaces_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disks_operations.py similarity index 65% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_namespaces_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disks_operations.py index 79b3c02113f7..a7bbba32e48f 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_namespaces_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_disks_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class PartnerNamespacesOperations(object): - """PartnerNamespacesOperations operations. +class DisksOperations(object): + """DisksOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~azure.mgmt.compute.v2021_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,81 +47,20 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def get( - self, - resource_group_name, # type: str - partner_namespace_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PartnerNamespace" - """Get a partner namespace. - - Get properties of a partner namespace. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerNamespace, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerNamespace - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartnerNamespace', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore - def _create_or_update_initial( self, resource_group_name, # type: str - partner_namespace_name, # type: str - partner_namespace_info, # type: "_models.PartnerNamespace" + disk_name, # type: str + disk, # type: "_models.Disk" **kwargs # type: Any ): - # type: (...) -> "_models.PartnerNamespace" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] + # type: (...) -> "_models.Disk" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -130,7 +69,7 @@ def _create_or_update_initial( path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -144,54 +83,58 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_namespace_info, 'PartnerNamespace') + body_content = self._serialize.body(disk, 'Disk') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerNamespace', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('Disk', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Disk', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - partner_namespace_name, # type: str - partner_namespace_info, # type: "_models.PartnerNamespace" + disk_name, # type: str + disk, # type: "_models.Disk" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.PartnerNamespace"] - """Create a partner namespace. - - Asynchronously creates a new partner namespace with the specified parameters. + # type: (...) -> LROPoller["_models.Disk"] + """Creates or updates a disk. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param partner_namespace_info: PartnerNamespace information. - :type partner_namespace_info: ~azure.mgmt.eventgrid.models.PartnerNamespace + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Put disk operation. + :type disk: ~azure.mgmt.compute.v2021_04_01.models.Disk :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PartnerNamespace or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.PartnerNamespace] + :return: An instance of LROPoller that returns either Disk or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.Disk] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -200,8 +143,8 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - partner_namespace_info=partner_namespace_info, + disk_name=disk_name, + disk=disk, cls=lambda x,y,z: x, **kwargs ) @@ -210,7 +153,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PartnerNamespace', pipeline_response) + deserialized = self._deserialize('Disk', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -219,7 +162,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -234,28 +177,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - def _delete_initial( + def _update_initial( self, resource_group_name, # type: str - partner_namespace_name, # type: str + disk_name, # type: str + disk, # type: "_models.DiskUpdate" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.Disk" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -265,56 +211,72 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(disk, 'DiskUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('Disk', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Disk', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - def begin_delete( + def begin_update( self, resource_group_name, # type: str - partner_namespace_name, # type: str + disk_name, # type: str + disk, # type: "_models.DiskUpdate" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Delete a partner namespace. - - Delete existing partner namespace. + # type: (...) -> LROPoller["_models.Disk"] + """Updates (patches) a disk. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :param disk: Disk object supplied in the body of the Patch disk operation. + :type disk: ~azure.mgmt.compute.v2021_04_01.models.DiskUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either Disk or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.Disk] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, + disk_name=disk_name, + disk=disk, cls=lambda x,y,z: x, **kwargs ) @@ -323,13 +285,16 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Disk', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -344,31 +309,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - def _update_initial( + def get( self, resource_group_name, # type: str - partner_namespace_name, # type: str - partner_namespace_update_parameters, # type: "_models.PartnerNamespaceUpdateParameters" + disk_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["_models.PartnerNamespace"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PartnerNamespace"]] + # type: (...) -> "_models.Disk" + """Gets information about a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Disk, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.Disk + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Disk"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - content_type = kwargs.pop("content_type", "application/json") + api_version = "2021-04-01" accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -378,48 +354,82 @@ def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_namespace_update_parameters, 'PartnerNamespaceUpdateParameters') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('PartnerNamespace', pipeline_response) + deserialized = self._deserialize('Disk', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - def begin_update( + def _delete_initial( self, resource_group_name, # type: str - partner_namespace_name, # type: str - partner_namespace_update_parameters, # type: "_models.PartnerNamespaceUpdateParameters" + disk_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.PartnerNamespace"] - """Update a partner namespace. + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" - Asynchronously updates a partner namespace with the specified parameters. + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + disk_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a disk. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param partner_namespace_update_parameters: Partner namespace update information. - :type partner_namespace_update_parameters: ~azure.mgmt.eventgrid.models.PartnerNamespaceUpdateParameters + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -431,17 +441,16 @@ def begin_update( :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespace"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - partner_namespace_update_parameters=partner_namespace_update_parameters, + disk_name=disk_name, cls=lambda x,y,z: x, **kwargs ) @@ -450,16 +459,13 @@ def begin_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PartnerNamespace', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -474,41 +480,29 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}'} # type: ignore - def list_by_subscription( + def list_by_resource_group( self, - filter=None, # type: Optional[str] - top=None, # type: Optional[int] + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PartnerNamespacesListResult"] - """List partner namespaces under an Azure subscription. - - List all the partner namespaces under an Azure subscription. - - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int + # type: (...) -> Iterable["_models.DiskList"] + """Lists all the disks under a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerNamespacesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerNamespacesListResult] + :return: An iterator like instance of either DiskList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespacesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -518,18 +512,15 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -539,7 +530,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerNamespacesListResult', pipeline_response) + deserialized = self._deserialize('DiskList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -560,44 +551,26 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerNamespaces'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks'} # type: ignore - def list_by_resource_group( + def list( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PartnerNamespacesListResult"] - """List partner namespaces under a resource group. - - List all the partner namespaces under a resource group. + # type: (...) -> Iterable["_models.DiskList"] + """Lists all the disks under a subscription. - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerNamespacesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerNamespacesListResult] + :return: An iterator like instance of either DiskList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.DiskList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespacesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiskList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" accept = "application/json" def prepare_request(next_link=None): @@ -607,19 +580,14 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -629,7 +597,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerNamespacesListResult', pipeline_response) + deserialized = self._deserialize('DiskList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -650,42 +618,31 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/disks'} # type: ignore - def list_shared_access_keys( + def _grant_access_initial( self, resource_group_name, # type: str - partner_namespace_name, # type: str + disk_name, # type: str + grant_access_data, # type: "_models.GrantAccessData" **kwargs # type: Any ): - # type: (...) -> "_models.PartnerNamespaceSharedAccessKeys" - """List keys for a partner namespace. - - List the two keys used to publish to a partner namespace. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerNamespaceSharedAccessKeys, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerNamespaceSharedAccessKeys - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespaceSharedAccessKeys"] + # type: (...) -> Optional["_models.AccessUri"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AccessUri"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.list_shared_access_keys.metadata['url'] # type: ignore + url = self._grant_access_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -695,62 +652,125 @@ def list_shared_access_keys( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerNamespaceSharedAccessKeys', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AccessUri', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_shared_access_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/listKeys'} # type: ignore + _grant_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} # type: ignore - def regenerate_key( + def begin_grant_access( self, resource_group_name, # type: str - partner_namespace_name, # type: str - regenerate_key_request, # type: "_models.PartnerNamespaceRegenerateKeyRequest" + disk_name, # type: str + grant_access_data, # type: "_models.GrantAccessData" **kwargs # type: Any ): - # type: (...) -> "_models.PartnerNamespaceSharedAccessKeys" - """Regenerate key for a partner namespace. - - Regenerate a shared access key for a partner namespace. + # type: (...) -> LROPoller["_models.AccessUri"] + """Grants access to a disk. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param regenerate_key_request: Request body to regenerate key. - :type regenerate_key_request: ~azure.mgmt.eventgrid.models.PartnerNamespaceRegenerateKeyRequest + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :param grant_access_data: Access data object supplied in the body of the get disk access + operation. + :type grant_access_data: ~azure.mgmt.compute.v2021_04_01.models.GrantAccessData :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerNamespaceSharedAccessKeys, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerNamespaceSharedAccessKeys - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either AccessUri or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.AccessUri] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerNamespaceSharedAccessKeys"] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessUri"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._grant_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + grant_access_data=grant_access_data, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AccessUri', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/beginGetAccess'} # type: ignore + + def _revoke_access_initial( + self, + resource_group_name, # type: str + disk_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = "2021-04-01" # Construct URL - url = self.regenerate_key.metadata['url'] # type: ignore + url = self._revoke_access_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -760,24 +780,83 @@ def regenerate_key( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(regenerate_key_request, 'PartnerNamespaceRegenerateKeyRequest') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerNamespaceSharedAccessKeys', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - regenerate_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/regenerateKey'} # type: ignore + _revoke_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} # type: ignore + + def begin_revoke_access( + self, + resource_group_name, # type: str + disk_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Revokes access to a disk. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param disk_name: The name of the managed disk that is being created. The name can't be changed + after the disk is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. The + maximum name length is 80 characters. + :type disk_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + disk_name=disk_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'diskName': self._serialize.url("disk_name", disk_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/disks/{diskName}/endGetAccess'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_gateway_connections_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_snapshots_operations.py similarity index 62% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_gateway_connections_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_snapshots_operations.py index 41efe1eae6e9..481edadb02ec 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_gateway_connections_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_04_01/operations/_snapshots_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkGatewayConnectionsOperations(object): - """VirtualNetworkGatewayConnectionsOperations operations. +class SnapshotsOperations(object): + """SnapshotsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.compute.v2021_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,26 +50,26 @@ def __init__(self, client, config, serializer, deserializer): def _create_or_update_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.VirtualNetworkGatewayConnection" + snapshot_name, # type: str + snapshot, # type: "_models.Snapshot" **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGatewayConnection" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + # type: (...) -> "_models.Snapshot" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -83,58 +83,58 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') + body_content = self._serialize.body(snapshot, 'Snapshot') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('Snapshot', pipeline_response) - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.VirtualNetworkGatewayConnection" + snapshot_name, # type: str + snapshot, # type: "_models.Snapshot" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetworkGatewayConnection"] - """Creates or updates a virtual network gateway connection in the specified resource group. + # type: (...) -> LROPoller["_models.Snapshot"] + """Creates or updates a snapshot. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the create or update virtual network gateway - connection operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnection + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Put disk operation. + :type snapshot: ~azure.mgmt.compute.v2021_04_01.models.Snapshot :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnection] + :return: An instance of LROPoller that returns either Snapshot or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -143,8 +143,8 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + snapshot_name=snapshot_name, + snapshot=snapshot, cls=lambda x,y,z: x, **kwargs ) @@ -153,16 +153,16 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('Snapshot', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -177,41 +177,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - def get( + def _update_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str + snapshot_name, # type: str + snapshot, # type: "_models.SnapshotUpdate" **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGatewayConnection" - """Gets the specified virtual network gateway connection by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGatewayConnection, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + # type: (...) -> "_models.Snapshot" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -221,102 +211,72 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(snapshot, 'SnapshotUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('Snapshot', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - def begin_delete( + def begin_update( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str + snapshot_name, # type: str + snapshot, # type: "_models.SnapshotUpdate" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified virtual network Gateway connection. + # type: (...) -> LROPoller["_models.Snapshot"] + """Updates (patches) a snapshot. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :param snapshot: Snapshot object supplied in the body of the Patch snapshot operation. + :type snapshot: ~azure.mgmt.compute.v2021_04_01.models.SnapshotUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either Snapshot or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.Snapshot] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + snapshot_name=snapshot_name, + snapshot=snapshot, cls=lambda x,y,z: x, **kwargs ) @@ -325,16 +285,19 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Snapshot', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -346,31 +309,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - def _update_tags_initial( + def get( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.TagsObject" + snapshot_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGatewayConnectionListEntity" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListEntity"] + # type: (...) -> "_models.Snapshot" + """Gets information about a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_04_01.models.Snapshot + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -380,13 +354,9 @@ def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -394,110 +364,34 @@ def _update_tags_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListEntity', pipeline_response) + deserialized = self._deserialize('Snapshot', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.VirtualNetworkGatewayConnectionListEntity"] - """Updates a virtual network gateway connection tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to update virtual network gateway connection tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGatewayConnectionListEntity or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionListEntity] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListEntity"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListEntity', pipeline_response) + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - def _set_shared_key_initial( + def _delete_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionSharedKey" + snapshot_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ConnectionSharedKey" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-04-01" # Construct URL - url = self._set_shared_key_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -507,73 +401,56 @@ def _set_shared_key_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionSharedKey') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _set_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - def begin_set_shared_key( + def begin_delete( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionSharedKey" + snapshot_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ConnectionSharedKey"] - """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + # type: (...) -> LROPoller[None] + """Deletes a snapshot. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection - Shared key operation throughNetwork resource provider. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ConnectionSharedKey + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ConnectionSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ConnectionSharedKey] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._set_shared_key_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + snapshot_name=snapshot_name, cls=lambda x,y,z: x, **kwargs ) @@ -582,16 +459,13 @@ def begin_set_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -606,92 +480,98 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}'} # type: ignore - def get_shared_key( + def list_by_resource_group( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ConnectionSharedKey" - """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the - specified virtual network gateway connection shared key through Network resource provider. + # type: (...) -> Iterable["_models.SnapshotList"] + """Lists snapshots under a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection shared - key name. - :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConnectionSharedKey, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ConnectionSharedKey + :return: An iterator like instance of either SnapshotList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.SnapshotList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" - # Construct URL - url = self.get_shared_key.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def get_next(next_link=None): + request = prepare_request(next_link) - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - if cls: - return cls(pipeline_response, deserialized, {}) + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return deserialized - get_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots'} # type: ignore def list( self, - resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkGatewayConnectionListResult"] - """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways - connections created. + # type: (...) -> Iterable["_models.SnapshotList"] + """Lists snapshots under a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionListResult] + :return: An iterator like instance of either SnapshotList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.compute.v2021_04_01.models.SnapshotList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-04-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -702,7 +582,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -718,7 +597,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListResult', pipeline_response) + deserialized = self._deserialize('SnapshotList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -739,31 +618,31 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/snapshots'} # type: ignore - def _reset_shared_key_initial( + def _grant_access_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionResetSharedKey" + snapshot_name, # type: str + grant_access_data, # type: "_models.GrantAccessData" **kwargs # type: Any ): - # type: (...) -> Optional["_models.ConnectionResetSharedKey"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + # type: (...) -> Optional["_models.AccessUri"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AccessUri"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-04-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._reset_shared_key_initial.metadata['url'] # type: ignore + url = self._grant_access_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -777,7 +656,7 @@ def _reset_shared_key_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionResetSharedKey') + body_content = self._serialize.body(grant_access_data, 'GrantAccessData') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -789,56 +668,55 @@ def _reset_shared_key_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + deserialized = self._deserialize('AccessUri', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _reset_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + _grant_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} # type: ignore - def begin_reset_shared_key( + def begin_grant_access( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionResetSharedKey" + snapshot_name, # type: str + grant_access_data, # type: "_models.GrantAccessData" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ConnectionResetSharedKey"] - """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + # type: (...) -> LROPoller["_models.AccessUri"] + """Grants access to a snapshot. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection reset - shared key Name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the begin reset virtual network gateway connection - shared key operation through network resource provider. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ConnectionResetSharedKey + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :param grant_access_data: Access data object supplied in the body of the get snapshot access + operation. + :type grant_access_data: ~azure.mgmt.compute.v2021_04_01.models.GrantAccessData :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ConnectionResetSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ConnectionResetSharedKey] + :return: An instance of LROPoller that returns either AccessUri or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.compute.v2021_04_01.models.AccessUri] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessUri"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._reset_shared_key_initial( + raw_result = self._grant_access_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + snapshot_name=snapshot_name, + grant_access_data=grant_access_data, cls=lambda x,y,z: x, **kwargs ) @@ -847,16 +725,126 @@ def begin_reset_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + deserialized = self._deserialize('AccessUri', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_grant_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/beginGetAccess'} # type: ignore + + def _revoke_access_initial( + self, + resource_group_name, # type: str + snapshot_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + + # Construct URL + url = self._revoke_access_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _revoke_access_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} # type: ignore + + def begin_revoke_access( + self, + resource_group_name, # type: str + snapshot_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Revokes access to a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param snapshot_name: The name of the snapshot that is being created. The name can't be changed + after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9, _ and -. + The max name length is 80 characters. + :type snapshot_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._revoke_access_initial( + resource_group_name=resource_group_name, + snapshot_name=snapshot_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'snapshotName': self._serialize.url("snapshot_name", snapshot_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -871,4 +859,4 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + begin_revoke_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/endGetAccess'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_compute_management_client.py index 898fdd411115..6f72e91058d9 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_compute_management_client.py @@ -55,6 +55,9 @@ from .operations import SharedGalleriesOperations from .operations import SharedGalleryImagesOperations from .operations import SharedGalleryImageVersionsOperations +from .operations import CommunityGalleriesOperations +from .operations import CommunityGalleryImagesOperations +from .operations import CommunityGalleryImageVersionsOperations from . import models @@ -133,6 +136,12 @@ class ComputeManagementClient(object): :vartype shared_gallery_images: azure.mgmt.compute.v2021_07_01.operations.SharedGalleryImagesOperations :ivar shared_gallery_image_versions: SharedGalleryImageVersionsOperations operations :vartype shared_gallery_image_versions: azure.mgmt.compute.v2021_07_01.operations.SharedGalleryImageVersionsOperations + :ivar community_galleries: CommunityGalleriesOperations operations + :vartype community_galleries: azure.mgmt.compute.v2021_07_01.operations.CommunityGalleriesOperations + :ivar community_gallery_images: CommunityGalleryImagesOperations operations + :vartype community_gallery_images: azure.mgmt.compute.v2021_07_01.operations.CommunityGalleryImagesOperations + :ivar community_gallery_image_versions: CommunityGalleryImageVersionsOperations operations + :vartype community_gallery_image_versions: azure.mgmt.compute.v2021_07_01.operations.CommunityGalleryImageVersionsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -231,6 +240,12 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.shared_gallery_image_versions = SharedGalleryImageVersionsOperations( self._client, self._config, self._serialize, self._deserialize) + self.community_galleries = CommunityGalleriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.community_gallery_images = CommunityGalleryImagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.community_gallery_image_versions = CommunityGalleryImageVersionsOperations( + self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_metadata.json b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_metadata.json index 4924069df4a9..6fc3958fc14b 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_metadata.json +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_metadata.json @@ -133,6 +133,9 @@ "gallery_sharing_profile": "GallerySharingProfileOperations", "shared_galleries": "SharedGalleriesOperations", "shared_gallery_images": "SharedGalleryImagesOperations", - "shared_gallery_image_versions": "SharedGalleryImageVersionsOperations" + "shared_gallery_image_versions": "SharedGalleryImageVersionsOperations", + "community_galleries": "CommunityGalleriesOperations", + "community_gallery_images": "CommunityGalleryImagesOperations", + "community_gallery_image_versions": "CommunityGalleryImageVersionsOperations" } } \ No newline at end of file diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py index ef35ba89b90b..2960d05ed5c3 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "23.0.0" +VERSION = "23.1.0" diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_compute_management_client.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_compute_management_client.py index dec712c9afd2..32c2c15af904 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_compute_management_client.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/_compute_management_client.py @@ -53,6 +53,9 @@ from .operations import SharedGalleriesOperations from .operations import SharedGalleryImagesOperations from .operations import SharedGalleryImageVersionsOperations +from .operations import CommunityGalleriesOperations +from .operations import CommunityGalleryImagesOperations +from .operations import CommunityGalleryImageVersionsOperations from .. import models @@ -131,6 +134,12 @@ class ComputeManagementClient(object): :vartype shared_gallery_images: azure.mgmt.compute.v2021_07_01.aio.operations.SharedGalleryImagesOperations :ivar shared_gallery_image_versions: SharedGalleryImageVersionsOperations operations :vartype shared_gallery_image_versions: azure.mgmt.compute.v2021_07_01.aio.operations.SharedGalleryImageVersionsOperations + :ivar community_galleries: CommunityGalleriesOperations operations + :vartype community_galleries: azure.mgmt.compute.v2021_07_01.aio.operations.CommunityGalleriesOperations + :ivar community_gallery_images: CommunityGalleryImagesOperations operations + :vartype community_gallery_images: azure.mgmt.compute.v2021_07_01.aio.operations.CommunityGalleryImagesOperations + :ivar community_gallery_image_versions: CommunityGalleryImageVersionsOperations operations + :vartype community_gallery_image_versions: azure.mgmt.compute.v2021_07_01.aio.operations.CommunityGalleryImageVersionsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -228,6 +237,12 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.shared_gallery_image_versions = SharedGalleryImageVersionsOperations( self._client, self._config, self._serialize, self._deserialize) + self.community_galleries = CommunityGalleriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.community_gallery_images = CommunityGalleryImagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.community_gallery_image_versions = CommunityGalleryImageVersionsOperations( + self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/__init__.py index af63734f01ef..cca9cf86cf8d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/__init__.py @@ -42,6 +42,9 @@ from ._shared_galleries_operations import SharedGalleriesOperations from ._shared_gallery_images_operations import SharedGalleryImagesOperations from ._shared_gallery_image_versions_operations import SharedGalleryImageVersionsOperations +from ._community_galleries_operations import CommunityGalleriesOperations +from ._community_gallery_images_operations import CommunityGalleryImagesOperations +from ._community_gallery_image_versions_operations import CommunityGalleryImageVersionsOperations __all__ = [ 'Operations', @@ -80,4 +83,7 @@ 'SharedGalleriesOperations', 'SharedGalleryImagesOperations', 'SharedGalleryImageVersionsOperations', + 'CommunityGalleriesOperations', + 'CommunityGalleryImagesOperations', + 'CommunityGalleryImageVersionsOperations', ] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_management_client_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_galleries_operations.py similarity index 60% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_management_client_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_galleries_operations.py index d8167eda1a79..a633b233dcad 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_management_client_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_galleries_operations.py @@ -18,45 +18,64 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NetworkManagementClientOperationsMixin: +class CommunityGalleriesOperations: + """CommunityGalleriesOperations async operations. - async def check_dns_name_availability( + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.compute.v2021_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( self, location: str, - domain_name_label: str, + public_gallery_name: str, **kwargs: Any - ) -> "_models.DnsNameAvailabilityResult": - """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + ) -> "_models.CommunityGallery": + """Get a community gallery by gallery public name. - :param location: The location of the domain name. + :param location: Resource location. :type location: str - :param domain_name_label: The domain name to be verified. It must conform to the following - regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. - :type domain_name_label: str + :param public_gallery_name: The public name of the community gallery. + :type public_gallery_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DnsNameAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.DnsNameAvailabilityResult + :return: CommunityGallery, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGallery :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommunityGallery"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL - url = self.check_dns_name_availability.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'publicGalleryName': self._serialize.url("public_gallery_name", public_gallery_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -71,10 +90,10 @@ async def check_dns_name_availability( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) + deserialized = self._deserialize('CommunityGallery', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_dns_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_gallery_image_versions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_gallery_image_versions_operations.py new file mode 100644 index 000000000000..0d0ccc304fba --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_gallery_image_versions_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CommunityGalleryImageVersionsOperations: + """CommunityGalleryImageVersionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.compute.v2021_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + location: str, + public_gallery_name: str, + gallery_image_name: str, + gallery_image_version_name: str, + **kwargs: Any + ) -> "_models.CommunityGalleryImageVersion": + """Get a community gallery image version. + + :param location: Resource location. + :type location: str + :param public_gallery_name: The public name of the community gallery. + :type public_gallery_name: str + :param gallery_image_name: The name of the community gallery image definition. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the community gallery image version. Needs to + follow semantic version name pattern: The allowed characters are digit and period. Digits must + be within the range of a 32-bit integer. Format: + :code:``.:code:``.:code:``. + :type gallery_image_version_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommunityGalleryImageVersion, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImageVersion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommunityGalleryImageVersion"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'publicGalleryName': self._serialize.url("public_gallery_name", public_gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CommunityGalleryImageVersion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_gallery_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_gallery_images_operations.py new file mode 100644 index 000000000000..ae314e8f14ff --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/aio/operations/_community_gallery_images_operations.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class CommunityGalleryImagesOperations: + """CommunityGalleryImagesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.compute.v2021_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + location: str, + public_gallery_name: str, + gallery_image_name: str, + **kwargs: Any + ) -> "_models.CommunityGalleryImage": + """Get a community gallery image. + + :param location: Resource location. + :type location: str + :param public_gallery_name: The public name of the community gallery. + :type public_gallery_name: str + :param gallery_image_name: The name of the community gallery image definition. + :type gallery_image_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommunityGalleryImage, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommunityGalleryImage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'publicGalleryName': self._serialize.url("public_gallery_name", public_gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CommunityGalleryImage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/__init__.py index 5c63a367acd9..6b70bd5eb824 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/__init__.py @@ -34,6 +34,9 @@ from ._models_py3 import CapacityReservationProfile from ._models_py3 import CapacityReservationUpdate from ._models_py3 import CapacityReservationUtilization + from ._models_py3 import CommunityGallery + from ._models_py3 import CommunityGalleryImage + from ._models_py3 import CommunityGalleryImageVersion from ._models_py3 import ComputeOperationListResult from ._models_py3 import ComputeOperationValue from ._models_py3 import DataDisk @@ -122,6 +125,7 @@ from ._models_py3 import OrchestrationServiceSummary from ._models_py3 import PatchInstallationDetail from ._models_py3 import PatchSettings + from ._models_py3 import PirCommunityGalleryResource from ._models_py3 import PirResource from ._models_py3 import PirSharedGalleryResource from ._models_py3 import Plan @@ -336,6 +340,9 @@ from ._models import CapacityReservationProfile # type: ignore from ._models import CapacityReservationUpdate # type: ignore from ._models import CapacityReservationUtilization # type: ignore + from ._models import CommunityGallery # type: ignore + from ._models import CommunityGalleryImage # type: ignore + from ._models import CommunityGalleryImageVersion # type: ignore from ._models import ComputeOperationListResult # type: ignore from ._models import ComputeOperationValue # type: ignore from ._models import DataDisk # type: ignore @@ -424,6 +431,7 @@ from ._models import OrchestrationServiceSummary # type: ignore from ._models import PatchInstallationDetail # type: ignore from ._models import PatchSettings # type: ignore + from ._models import PirCommunityGalleryResource # type: ignore from ._models import PirResource # type: ignore from ._models import PirSharedGalleryResource # type: ignore from ._models import Plan # type: ignore @@ -727,6 +735,9 @@ 'CapacityReservationProfile', 'CapacityReservationUpdate', 'CapacityReservationUtilization', + 'CommunityGallery', + 'CommunityGalleryImage', + 'CommunityGalleryImageVersion', 'ComputeOperationListResult', 'ComputeOperationValue', 'DataDisk', @@ -815,6 +826,7 @@ 'OrchestrationServiceSummary', 'PatchInstallationDetail', 'PatchSettings', + 'PirCommunityGalleryResource', 'PirResource', 'PirSharedGalleryResource', 'Plan', diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models.py index 9d5f904cd057..67b8d6119e4f 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models.py @@ -1085,6 +1085,205 @@ def __init__( self.virtual_machines_allocated = None +class PirCommunityGalleryResource(msrest.serialization.Model): + """Base information about the community gallery resource in pir. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar location: Resource location. + :vartype location: str + :ivar type: Resource type. + :vartype type: str + :param unique_id: The unique id of this community gallery. + :type unique_id: str + """ + + _validation = { + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unique_id': {'key': 'identifier.uniqueId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PirCommunityGalleryResource, self).__init__(**kwargs) + self.name = None + self.location = None + self.type = None + self.unique_id = kwargs.get('unique_id', None) + + +class CommunityGallery(PirCommunityGalleryResource): + """Specifies information about the Community Gallery that you want to create or update. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar location: Resource location. + :vartype location: str + :ivar type: Resource type. + :vartype type: str + :param unique_id: The unique id of this community gallery. + :type unique_id: str + """ + + _validation = { + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unique_id': {'key': 'identifier.uniqueId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CommunityGallery, self).__init__(**kwargs) + + +class CommunityGalleryImage(PirCommunityGalleryResource): + """Specifies information about the gallery image definition that you want to create or update. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar location: Resource location. + :vartype location: str + :ivar type: Resource type. + :vartype type: str + :param unique_id: The unique id of this community gallery. + :type unique_id: str + :param os_type: This property allows you to specify the type of the OS that is included in the + disk when creating a VM from a managed image. :code:`
`:code:`
` Possible values are: + :code:`
`:code:`
` **Windows** :code:`
`:code:`
` **Linux**. Possible values + include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_07_01.models.OperatingSystemTypes + :param os_state: This property allows the user to specify whether the virtual machines created + under this image are 'Generalized' or 'Specialized'. Possible values include: "Generalized", + "Specialized". + :type os_state: str or ~azure.mgmt.compute.v2021_07_01.models.OperatingSystemStateTypes + :param end_of_life_date: The end of life date of the gallery image definition. This property + can be used for decommissioning purposes. This property is updatable. + :type end_of_life_date: ~datetime.datetime + :param identifier: This is the gallery image definition identifier. + :type identifier: ~azure.mgmt.compute.v2021_07_01.models.GalleryImageIdentifier + :param recommended: The properties describe the recommended machine configuration for this + Image Definition. These properties are updatable. + :type recommended: ~azure.mgmt.compute.v2021_07_01.models.RecommendedMachineConfiguration + :param disallowed: Describes the disallowed disk types. + :type disallowed: ~azure.mgmt.compute.v2021_07_01.models.Disallowed + :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS + disks only. Possible values include: "V1", "V2". + :type hyper_v_generation: str or ~azure.mgmt.compute.v2021_07_01.models.HyperVGeneration + :param features: A list of gallery image features. + :type features: list[~azure.mgmt.compute.v2021_07_01.models.GalleryImageFeature] + :param purchase_plan: Describes the gallery image definition purchase plan. This is used by + marketplace images. + :type purchase_plan: ~azure.mgmt.compute.v2021_07_01.models.ImagePurchasePlan + """ + + _validation = { + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unique_id': {'key': 'identifier.uniqueId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'os_state': {'key': 'properties.osState', 'type': 'str'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, + 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, + 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, + 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'features': {'key': 'properties.features', 'type': '[GalleryImageFeature]'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, + } + + def __init__( + self, + **kwargs + ): + super(CommunityGalleryImage, self).__init__(**kwargs) + self.os_type = kwargs.get('os_type', None) + self.os_state = kwargs.get('os_state', None) + self.end_of_life_date = kwargs.get('end_of_life_date', None) + self.identifier = kwargs.get('identifier', None) + self.recommended = kwargs.get('recommended', None) + self.disallowed = kwargs.get('disallowed', None) + self.hyper_v_generation = kwargs.get('hyper_v_generation', None) + self.features = kwargs.get('features', None) + self.purchase_plan = kwargs.get('purchase_plan', None) + + +class CommunityGalleryImageVersion(PirCommunityGalleryResource): + """Specifies information about the gallery image version that you want to create or update. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar location: Resource location. + :vartype location: str + :ivar type: Resource type. + :vartype type: str + :param unique_id: The unique id of this community gallery. + :type unique_id: str + :param published_date: The published date of the gallery image version Definition. This + property can be used for decommissioning purposes. This property is updatable. + :type published_date: ~datetime.datetime + :param end_of_life_date: The end of life date of the gallery image version Definition. This + property can be used for decommissioning purposes. This property is updatable. + :type end_of_life_date: ~datetime.datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unique_id': {'key': 'identifier.uniqueId', 'type': 'str'}, + 'published_date': {'key': 'properties.publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(CommunityGalleryImageVersion, self).__init__(**kwargs) + self.published_date = kwargs.get('published_date', None) + self.end_of_life_date = kwargs.get('end_of_life_date', None) + + class ComputeOperationListResult(msrest.serialization.Model): """The List Compute Operation operation response. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py index e550e2f6f69c..9a9e58ab2298 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/models/_models_py3.py @@ -1176,6 +1176,224 @@ def __init__( self.virtual_machines_allocated = None +class PirCommunityGalleryResource(msrest.serialization.Model): + """Base information about the community gallery resource in pir. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar location: Resource location. + :vartype location: str + :ivar type: Resource type. + :vartype type: str + :param unique_id: The unique id of this community gallery. + :type unique_id: str + """ + + _validation = { + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unique_id': {'key': 'identifier.uniqueId', 'type': 'str'}, + } + + def __init__( + self, + *, + unique_id: Optional[str] = None, + **kwargs + ): + super(PirCommunityGalleryResource, self).__init__(**kwargs) + self.name = None + self.location = None + self.type = None + self.unique_id = unique_id + + +class CommunityGallery(PirCommunityGalleryResource): + """Specifies information about the Community Gallery that you want to create or update. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar location: Resource location. + :vartype location: str + :ivar type: Resource type. + :vartype type: str + :param unique_id: The unique id of this community gallery. + :type unique_id: str + """ + + _validation = { + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unique_id': {'key': 'identifier.uniqueId', 'type': 'str'}, + } + + def __init__( + self, + *, + unique_id: Optional[str] = None, + **kwargs + ): + super(CommunityGallery, self).__init__(unique_id=unique_id, **kwargs) + + +class CommunityGalleryImage(PirCommunityGalleryResource): + """Specifies information about the gallery image definition that you want to create or update. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar location: Resource location. + :vartype location: str + :ivar type: Resource type. + :vartype type: str + :param unique_id: The unique id of this community gallery. + :type unique_id: str + :param os_type: This property allows you to specify the type of the OS that is included in the + disk when creating a VM from a managed image. :code:`
`:code:`
` Possible values are: + :code:`
`:code:`
` **Windows** :code:`
`:code:`
` **Linux**. Possible values + include: "Windows", "Linux". + :type os_type: str or ~azure.mgmt.compute.v2021_07_01.models.OperatingSystemTypes + :param os_state: This property allows the user to specify whether the virtual machines created + under this image are 'Generalized' or 'Specialized'. Possible values include: "Generalized", + "Specialized". + :type os_state: str or ~azure.mgmt.compute.v2021_07_01.models.OperatingSystemStateTypes + :param end_of_life_date: The end of life date of the gallery image definition. This property + can be used for decommissioning purposes. This property is updatable. + :type end_of_life_date: ~datetime.datetime + :param identifier: This is the gallery image definition identifier. + :type identifier: ~azure.mgmt.compute.v2021_07_01.models.GalleryImageIdentifier + :param recommended: The properties describe the recommended machine configuration for this + Image Definition. These properties are updatable. + :type recommended: ~azure.mgmt.compute.v2021_07_01.models.RecommendedMachineConfiguration + :param disallowed: Describes the disallowed disk types. + :type disallowed: ~azure.mgmt.compute.v2021_07_01.models.Disallowed + :param hyper_v_generation: The hypervisor generation of the Virtual Machine. Applicable to OS + disks only. Possible values include: "V1", "V2". + :type hyper_v_generation: str or ~azure.mgmt.compute.v2021_07_01.models.HyperVGeneration + :param features: A list of gallery image features. + :type features: list[~azure.mgmt.compute.v2021_07_01.models.GalleryImageFeature] + :param purchase_plan: Describes the gallery image definition purchase plan. This is used by + marketplace images. + :type purchase_plan: ~azure.mgmt.compute.v2021_07_01.models.ImagePurchasePlan + """ + + _validation = { + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unique_id': {'key': 'identifier.uniqueId', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'os_state': {'key': 'properties.osState', 'type': 'str'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + 'identifier': {'key': 'properties.identifier', 'type': 'GalleryImageIdentifier'}, + 'recommended': {'key': 'properties.recommended', 'type': 'RecommendedMachineConfiguration'}, + 'disallowed': {'key': 'properties.disallowed', 'type': 'Disallowed'}, + 'hyper_v_generation': {'key': 'properties.hyperVGeneration', 'type': 'str'}, + 'features': {'key': 'properties.features', 'type': '[GalleryImageFeature]'}, + 'purchase_plan': {'key': 'properties.purchasePlan', 'type': 'ImagePurchasePlan'}, + } + + def __init__( + self, + *, + unique_id: Optional[str] = None, + os_type: Optional[Union[str, "OperatingSystemTypes"]] = None, + os_state: Optional[Union[str, "OperatingSystemStateTypes"]] = None, + end_of_life_date: Optional[datetime.datetime] = None, + identifier: Optional["GalleryImageIdentifier"] = None, + recommended: Optional["RecommendedMachineConfiguration"] = None, + disallowed: Optional["Disallowed"] = None, + hyper_v_generation: Optional[Union[str, "HyperVGeneration"]] = None, + features: Optional[List["GalleryImageFeature"]] = None, + purchase_plan: Optional["ImagePurchasePlan"] = None, + **kwargs + ): + super(CommunityGalleryImage, self).__init__(unique_id=unique_id, **kwargs) + self.os_type = os_type + self.os_state = os_state + self.end_of_life_date = end_of_life_date + self.identifier = identifier + self.recommended = recommended + self.disallowed = disallowed + self.hyper_v_generation = hyper_v_generation + self.features = features + self.purchase_plan = purchase_plan + + +class CommunityGalleryImageVersion(PirCommunityGalleryResource): + """Specifies information about the gallery image version that you want to create or update. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Resource name. + :vartype name: str + :ivar location: Resource location. + :vartype location: str + :ivar type: Resource type. + :vartype type: str + :param unique_id: The unique id of this community gallery. + :type unique_id: str + :param published_date: The published date of the gallery image version Definition. This + property can be used for decommissioning purposes. This property is updatable. + :type published_date: ~datetime.datetime + :param end_of_life_date: The end of life date of the gallery image version Definition. This + property can be used for decommissioning purposes. This property is updatable. + :type end_of_life_date: ~datetime.datetime + """ + + _validation = { + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'unique_id': {'key': 'identifier.uniqueId', 'type': 'str'}, + 'published_date': {'key': 'properties.publishedDate', 'type': 'iso-8601'}, + 'end_of_life_date': {'key': 'properties.endOfLifeDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + unique_id: Optional[str] = None, + published_date: Optional[datetime.datetime] = None, + end_of_life_date: Optional[datetime.datetime] = None, + **kwargs + ): + super(CommunityGalleryImageVersion, self).__init__(unique_id=unique_id, **kwargs) + self.published_date = published_date + self.end_of_life_date = end_of_life_date + + class ComputeOperationListResult(msrest.serialization.Model): """The List Compute Operation operation response. diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/__init__.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/__init__.py index af63734f01ef..cca9cf86cf8d 100644 --- a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/__init__.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/__init__.py @@ -42,6 +42,9 @@ from ._shared_galleries_operations import SharedGalleriesOperations from ._shared_gallery_images_operations import SharedGalleryImagesOperations from ._shared_gallery_image_versions_operations import SharedGalleryImageVersionsOperations +from ._community_galleries_operations import CommunityGalleriesOperations +from ._community_gallery_images_operations import CommunityGalleryImagesOperations +from ._community_gallery_image_versions_operations import CommunityGalleryImageVersionsOperations __all__ = [ 'Operations', @@ -80,4 +83,7 @@ 'SharedGalleriesOperations', 'SharedGalleryImagesOperations', 'SharedGalleryImageVersionsOperations', + 'CommunityGalleriesOperations', + 'CommunityGalleryImagesOperations', + 'CommunityGalleryImageVersionsOperations', ] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_management_client_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_galleries_operations.py similarity index 61% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_management_client_operations.py rename to sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_galleries_operations.py index b493357a9e0b..16a13033a942 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_management_client_operations.py +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_galleries_operations.py @@ -22,46 +22,65 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class NetworkManagementClientOperationsMixin(object): +class CommunityGalleriesOperations(object): + """CommunityGalleriesOperations operations. - def check_dns_name_availability( + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.compute.v2021_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( self, location, # type: str - domain_name_label, # type: str + public_gallery_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.DnsNameAvailabilityResult" - """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + # type: (...) -> "_models.CommunityGallery" + """Get a community gallery by gallery public name. - :param location: The location of the domain name. + :param location: Resource location. :type location: str - :param domain_name_label: The domain name to be verified. It must conform to the following - regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. - :type domain_name_label: str + :param public_gallery_name: The public name of the community gallery. + :type public_gallery_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DnsNameAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.DnsNameAvailabilityResult + :return: CommunityGallery, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGallery :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommunityGallery"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL - url = self.check_dns_name_availability.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'publicGalleryName': self._serialize.url("public_gallery_name", public_gallery_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -76,10 +95,10 @@ def check_dns_name_availability( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) + deserialized = self._deserialize('CommunityGallery', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_dns_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_gallery_image_versions_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_gallery_image_versions_operations.py new file mode 100644 index 000000000000..8a076425e5a3 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_gallery_image_versions_operations.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CommunityGalleryImageVersionsOperations(object): + """CommunityGalleryImageVersionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.compute.v2021_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + location, # type: str + public_gallery_name, # type: str + gallery_image_name, # type: str + gallery_image_version_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CommunityGalleryImageVersion" + """Get a community gallery image version. + + :param location: Resource location. + :type location: str + :param public_gallery_name: The public name of the community gallery. + :type public_gallery_name: str + :param gallery_image_name: The name of the community gallery image definition. + :type gallery_image_name: str + :param gallery_image_version_name: The name of the community gallery image version. Needs to + follow semantic version name pattern: The allowed characters are digit and period. Digits must + be within the range of a 32-bit integer. Format: + :code:``.:code:``.:code:``. + :type gallery_image_version_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommunityGalleryImageVersion, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImageVersion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommunityGalleryImageVersion"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'publicGalleryName': self._serialize.url("public_gallery_name", public_gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + 'galleryImageVersionName': self._serialize.url("gallery_image_version_name", gallery_image_version_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CommunityGalleryImageVersion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}/versions/{galleryImageVersionName}'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_gallery_images_operations.py b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_gallery_images_operations.py new file mode 100644 index 000000000000..653ad9145742 --- /dev/null +++ b/sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_07_01/operations/_community_gallery_images_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class CommunityGalleryImagesOperations(object): + """CommunityGalleryImagesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.compute.v2021_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + location, # type: str + public_gallery_name, # type: str + gallery_image_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CommunityGalleryImage" + """Get a community gallery image. + + :param location: Resource location. + :type location: str + :param public_gallery_name: The public name of the community gallery. + :type public_gallery_name: str + :param gallery_image_name: The name of the community gallery image definition. + :type gallery_image_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CommunityGalleryImage, or the result of cls(response) + :rtype: ~azure.mgmt.compute.v2021_07_01.models.CommunityGalleryImage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommunityGalleryImage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'publicGalleryName': self._serialize.url("public_gallery_name", public_gallery_name, 'str'), + 'galleryImageName': self._serialize.url("gallery_image_name", gallery_image_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CommunityGalleryImage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/communityGalleries/{publicGalleryName}/images/{galleryImageName}'} # type: ignore diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_availability_sets.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_availability_sets.yaml index c848b822b824..aa361afc777b 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_availability_sets.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_availability_sets.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/availabilitySets/availabilitysetse7f013f3?api-version=2021-07-01 @@ -32,7 +32,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:19:03 GMT + - Tue, 12 Oct 2021 06:23:52 GMT expires: - '-1' pragma: @@ -49,7 +49,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/PutVM3Min;745,Microsoft.Compute/PutVM30Min;3729 + - Microsoft.Compute/PutVM3Min;693,Microsoft.Compute/PutVM30Min;3441 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -65,7 +65,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/availabilitySets/availabilitysetse7f013f3?api-version=2021-07-01 @@ -84,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:19:03 GMT + - Tue, 12 Oct 2021 06:23:52 GMT expires: - '-1' pragma: @@ -101,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3998,Microsoft.Compute/LowCostGet30Min;31998 + - Microsoft.Compute/LowCostGet3Min;3751,Microsoft.Compute/LowCostGet30Min;31618 status: code: 200 message: OK @@ -120,7 +120,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/availabilitySets/availabilitysetse7f013f3?api-version=2021-07-01 @@ -138,7 +138,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:19:03 GMT + - Tue, 12 Oct 2021 06:23:52 GMT expires: - '-1' pragma: @@ -155,7 +155,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/PutVM3Min;744,Microsoft.Compute/PutVM30Min;3728 + - Microsoft.Compute/PutVM3Min;692,Microsoft.Compute/PutVM30Min;3440 x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -173,7 +173,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/availabilitySets/availabilitysetse7f013f3?api-version=2021-07-01 @@ -186,7 +186,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:19:04 GMT + - Tue, 12 Oct 2021 06:23:55 GMT expires: - '-1' pragma: @@ -199,7 +199,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteVM3Min;239,Microsoft.Compute/DeleteVM30Min;1199 + - Microsoft.Compute/DeleteVM3Min;235,Microsoft.Compute/DeleteVM30Min;1195 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_log_analytics.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_log_analytics.yaml index 3b5ce2c3fd11..ee9f170736ed 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_log_analytics.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_log_analytics.yaml @@ -16,10 +16,10 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-storage/19.0.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/accountxyz9b271243?api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/accountxyz9b271243?api-version=2021-06-01 response: body: string: '' @@ -31,11 +31,11 @@ interactions: content-type: - text/plain; charset=utf-8 date: - - Thu, 02 Sep 2021 03:19:09 GMT + - Tue, 12 Oct 2021 06:24:03 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/4c7eaaf8-d0ee-4640-ae9c-ad88ba26966b?monitor=true&api-version=2021-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/17f37b1f-13cd-4340-b2de-d232f224195a?monitor=true&api-version=2021-06-01 pragma: - no-cache server: @@ -59,22 +59,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-storage/19.0.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/4c7eaaf8-d0ee-4640-ae9c-ad88ba26966b?monitor=true&api-version=2021-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/17f37b1f-13cd-4340-b2de-d232f224195a?monitor=true&api-version=2021-06-01 response: body: - string: '{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/accountxyz9b271243","name":"accountxyz9b271243","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{"key1":"value1","key2":"value2"},"properties":{"keyCreationTime":{"key1":"2021-09-02T03:19:07.8537115Z","key2":"2021-09-02T03:19:07.8537115Z"},"privateEndpointConnections":[],"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2021-09-02T03:19:07.8537115Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2021-09-02T03:19:07.8537115Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2021-09-02T03:19:07.7443354Z","primaryEndpoints":{"dfs":"https://accountxyz9b271243.dfs.core.windows.net/","web":"https://accountxyz9b271243.z13.web.core.windows.net/","blob":"https://accountxyz9b271243.blob.core.windows.net/","queue":"https://accountxyz9b271243.queue.core.windows.net/","table":"https://accountxyz9b271243.table.core.windows.net/","file":"https://accountxyz9b271243.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available"}}' + string: '{"sku":{"name":"Standard_GRS","tier":"Standard"},"kind":"StorageV2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/accountxyz9b271243","name":"accountxyz9b271243","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{"key1":"value1","key2":"value2"},"properties":{"keyCreationTime":{"key1":"2021-10-12T06:24:01.9817837Z","key2":"2021-10-12T06:24:01.9817837Z"},"privateEndpointConnections":[],"minimumTlsVersion":"TLS1_0","allowBlobPublicAccess":true,"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"keyType":"Account","enabled":true,"lastEnabledTime":"2021-10-12T06:24:01.9817837Z"},"blob":{"keyType":"Account","enabled":true,"lastEnabledTime":"2021-10-12T06:24:01.9817837Z"}},"keySource":"Microsoft.Storage"},"accessTier":"Hot","provisioningState":"Succeeded","creationTime":"2021-10-12T06:24:01.6849029Z","primaryEndpoints":{"dfs":"https://accountxyz9b271243.dfs.core.windows.net/","web":"https://accountxyz9b271243.z13.web.core.windows.net/","blob":"https://accountxyz9b271243.blob.core.windows.net/","queue":"https://accountxyz9b271243.queue.core.windows.net/","table":"https://accountxyz9b271243.table.core.windows.net/","file":"https://accountxyz9b271243.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available","secondaryLocation":"westus","statusOfSecondary":"available"}}' headers: cache-control: - no-cache content-length: - - '1536' + - '1594' content-type: - application/json date: - - Thu, 02 Sep 2021 03:19:25 GMT + - Tue, 12 Oct 2021 06:24:20 GMT expires: - '-1' pragma: @@ -104,13 +104,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-storage/18.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-storage/19.0.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/accountxyz9b271243/listKeys?api-version=2021-04-01&$expand=kerb + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/accountxyz9b271243/listKeys?api-version=2021-06-01&$expand=kerb response: body: - string: '{"keys":[{"creationTime":"2021-09-02T03:19:07.8537115Z","keyName":"key1","value":"FakeValue","permissions":"FULL"},{"creationTime":"2021-09-02T03:19:07.8537115Z","keyName":"key2","value":"FakeValue","permissions":"FULL"}]}' + string: '{"keys":[{"creationTime":"2021-10-12T06:24:01.9817837Z","keyName":"key1","value":"FakeValue","permissions":"FULL"},{"creationTime":"2021-10-12T06:24:01.9817837Z","keyName":"key2","value":"FakeValue","permissions":"FULL"}]}' headers: cache-control: - no-cache @@ -119,7 +119,7 @@ interactions: content-type: - application/json date: - - Thu, 02 Sep 2021 03:19:26 GMT + - Tue, 12 Oct 2021 06:24:20 GMT expires: - '-1' pragma: @@ -140,8 +140,8 @@ interactions: code: 200 message: OK - request: - body: '{"blobContainerSasUri": "fakeuri", "fromTime": "2021-08-31T03:19:26.299953Z", - "toTime": "2021-09-02T03:19:26.299958Z", "groupByResourceName": true, "intervalLength": + body: '{"blobContainerSasUri": "fakeuri", "fromTime": "2021-10-10T06:24:21.688456Z", + "toTime": "2021-10-12T06:24:21.688461Z", "groupByResourceName": true, "intervalLength": "SixtyMins"}' headers: Accept: @@ -155,7 +155,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/logAnalytics/apiAccess/getRequestRateByInterval?api-version=2021-07-01 @@ -164,17 +164,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/d4a25eb1-6cfc-4330-a8ab-29f113b0ea33?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b128023f-7dc3-4aaf-bf46-fa84cdf1298d?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:19:26 GMT + - Tue, 12 Oct 2021 06:24:21 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/d4a25eb1-6cfc-4330-a8ab-29f113b0ea33?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b128023f-7dc3-4aaf-bf46-fa84cdf1298d?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -201,17 +201,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/d4a25eb1-6cfc-4330-a8ab-29f113b0ea33?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b128023f-7dc3-4aaf-bf46-fa84cdf1298d?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:19:26.7566842+00:00\",\r\n \"endTime\": - \"2021-09-02T03:19:28.0535437+00:00\",\r\n \"status\": \"Failed\",\r\n \"error\": + string: "{\r\n \"startTime\": \"2021-10-12T06:24:22.3402304+00:00\",\r\n \"endTime\": + \"2021-10-12T06:24:26.6683967+00:00\",\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Could not write log analytics to the given SAS URI due to The remote server returned an error: - (403) Forbidden..\"\r\n },\r\n \"name\": \"d4a25eb1-6cfc-4330-a8ab-29f113b0ea33\"\r\n}" + (403) Forbidden..\"\r\n },\r\n \"name\": \"b128023f-7dc3-4aaf-bf46-fa84cdf1298d\"\r\n}" headers: cache-control: - no-cache @@ -220,7 +220,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:19:56 GMT + - Tue, 12 Oct 2021 06:24:52 GMT expires: - '-1' pragma: @@ -237,13 +237,13 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29998 + - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29873 status: code: 200 message: OK - request: - body: '{"blobContainerSasUri": "fakeuri", "fromTime": "2021-08-31T03:19:56.953692Z", - "toTime": "2021-09-02T03:19:56.953704Z", "groupByOperationName": true, "groupByResourceName": + body: '{"blobContainerSasUri": "fakeuri", "fromTime": "2021-10-10T06:24:52.667871Z", + "toTime": "2021-10-12T06:24:52.66788Z", "groupByOperationName": true, "groupByResourceName": false}' headers: Accept: @@ -253,11 +253,11 @@ interactions: Connection: - keep-alive Content-Length: - - '361' + - '360' Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/logAnalytics/apiAccess/getThrottledRequests?api-version=2021-07-01 @@ -266,17 +266,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/934c611f-3de7-42c2-bb1e-ed4d54923e63?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/751fb06d-ef28-4964-9f4b-2e9b91f56321?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:19:56 GMT + - Tue, 12 Oct 2021 06:24:52 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/934c611f-3de7-42c2-bb1e-ed4d54923e63?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/751fb06d-ef28-4964-9f4b-2e9b91f56321?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -303,26 +303,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/934c611f-3de7-42c2-bb1e-ed4d54923e63?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/751fb06d-ef28-4964-9f4b-2e9b91f56321?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:19:56.9912681+00:00\",\r\n \"endTime\": - \"2021-09-02T03:19:57.3506316+00:00\",\r\n \"status\": \"Failed\",\r\n \"error\": + string: "{\r\n \"startTime\": \"2021-10-12T06:24:52.777901+00:00\",\r\n \"endTime\": + \"2021-10-12T06:24:53.2623224+00:00\",\r\n \"status\": \"Failed\",\r\n \"error\": {\r\n \"code\": \"BadRequest\",\r\n \"message\": \"Could not write log analytics to the given SAS URI due to The remote server returned an error: - (403) Forbidden..\"\r\n },\r\n \"name\": \"934c611f-3de7-42c2-bb1e-ed4d54923e63\"\r\n}" + (403) Forbidden..\"\r\n },\r\n \"name\": \"751fb06d-ef28-4964-9f4b-2e9b91f56321\"\r\n}" headers: cache-control: - no-cache content-length: - - '359' + - '358' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:26 GMT + - Tue, 12 Oct 2021 06:25:22 GMT expires: - '-1' pragma: @@ -339,7 +339,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29996 + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29870 status: code: 200 message: OK diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_proximity_placement_groups.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_proximity_placement_groups.yaml index a2ed00613619..6638da84a133 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_proximity_placement_groups.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute.test_compute_proximity_placement_groups.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/proximityPlacementGroups/proximiityplacementgroupsb24517e6?api-version=2021-07-01 @@ -32,7 +32,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:28 GMT + - Tue, 12 Oct 2021 06:25:26 GMT expires: - '-1' pragma: @@ -61,7 +61,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/proximityPlacementGroups/proximiityplacementgroupsb24517e6?api-version=2021-07-01 @@ -81,7 +81,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:28 GMT + - Tue, 12 Oct 2021 06:25:26 GMT expires: - '-1' pragma: @@ -116,7 +116,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/proximityPlacementGroups/proximiityplacementgroupsb24517e6?api-version=2021-07-01 @@ -135,7 +135,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:28 GMT + - Tue, 12 Oct 2021 06:25:26 GMT expires: - '-1' pragma: @@ -170,7 +170,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/proximityPlacementGroups/proximiityplacementgroupsb24517e6?api-version=2021-07-01 @@ -183,7 +183,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:20:29 GMT + - Tue, 12 Oct 2021 06:25:29 GMT expires: - '-1' pragma: diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_disks.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_disks.yaml index e73ae79400ea..2a677e668a7f 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_disks.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_disks.yaml @@ -14,10 +14,10 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"disknamex77f61175\",\r\n \"location\": \"eastus\",\r\n @@ -26,7 +26,7 @@ interactions: \"Updating\",\r\n \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/40f1ee56-9532-4d7b-9ed9-90c5dda6f335?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/0144e615-7956-4a63-88f9-900e48690e95?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: @@ -34,11 +34,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:08 GMT + - Tue, 12 Oct 2021 06:27:14 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/40f1ee56-9532-4d7b-9ed9-90c5dda6f335?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/0144e615-7956-4a63-88f9-900e48690e95?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -65,14 +65,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/40f1ee56-9532-4d7b-9ed9-90c5dda6f335?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/0144e615-7956-4a63-88f9-900e48690e95?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:22:08.3927821+00:00\",\r\n \"endTime\": - \"2021-09-02T03:22:08.5021368+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:27:15.6373292+00:00\",\r\n \"endTime\": + \"2021-10-12T06:27:15.715421+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"disknamex77f61175\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175\",\r\n \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"eastus\",\r\n @@ -80,20 +80,21 @@ interactions: \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"encryption\": {\r\n \"type\": - \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"timeCreated\": \"2021-09-02T03:22:08.3927821+00:00\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"2c9365b5-317b-4c46-9520-219378126c7d\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}\r\n },\r\n \"name\": - \"40f1ee56-9532-4d7b-9ed9-90c5dda6f335\"\r\n}" + \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"networkAccessPolicy\": + \"AllowAll\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": + \"2021-10-12T06:27:15.6373292+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": 214748364800,\r\n + \ \"uniqueId\": \"7017fb16-747b-44fc-af6c-a50f6a0fe24e\"\r\n }\r\n}\r\n + \ },\r\n \"name\": \"0144e615-7956-4a63-88f9-900e48690e95\"\r\n}" headers: cache-control: - no-cache content-length: - - '1116' + - '1154' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:10 GMT + - Tue, 12 Oct 2021 06:27:17 GMT expires: - '-1' pragma: @@ -110,7 +111,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49988,Microsoft.Compute/GetOperation30Min;399988 + - Microsoft.Compute/GetOperation3Min;49985,Microsoft.Compute/GetOperation30Min;399976 status: code: 200 message: OK @@ -124,10 +125,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"disknamex77f61175\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175\",\r\n @@ -136,19 +137,20 @@ interactions: \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"encryption\": {\r\n \"type\": - \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"timeCreated\": \"2021-09-02T03:22:08.3927821+00:00\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"2c9365b5-317b-4c46-9520-219378126c7d\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}" + \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"networkAccessPolicy\": + \"AllowAll\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": + \"2021-10-12T06:27:15.6373292+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": 214748364800,\r\n + \ \"uniqueId\": \"7017fb16-747b-44fc-af6c-a50f6a0fe24e\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '891' + - '930' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:10 GMT + - Tue, 12 Oct 2021 06:27:17 GMT expires: - '-1' pragma: @@ -165,7 +167,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14991,Microsoft.Compute/LowCostGet30Min;119991 + - Microsoft.Compute/LowCostGet3Min;14990,Microsoft.Compute/LowCostGet30Min;119926 status: code: 200 message: OK @@ -179,10 +181,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"disknamex77f61175\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175\",\r\n @@ -191,19 +193,20 @@ interactions: \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"encryption\": {\r\n \"type\": - \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"timeCreated\": \"2021-09-02T03:22:08.3927821+00:00\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"2c9365b5-317b-4c46-9520-219378126c7d\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}" + \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"networkAccessPolicy\": + \"AllowAll\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": + \"2021-10-12T06:27:15.6373292+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": 214748364800,\r\n + \ \"uniqueId\": \"7017fb16-747b-44fc-af6c-a50f6a0fe24e\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '891' + - '930' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:10 GMT + - Tue, 12 Oct 2021 06:27:18 GMT expires: - '-1' pragma: @@ -220,7 +223,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14990,Microsoft.Compute/LowCostGet30Min;119990 + - Microsoft.Compute/LowCostGet3Min;14989,Microsoft.Compute/LowCostGet30Min;119925 status: code: 200 message: OK @@ -238,10 +241,10 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"disknamex77f61175\",\r\n \"location\": \"eastus\",\r\n @@ -251,7 +254,7 @@ interactions: \"Updating\",\r\n \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/2158dd42-c4c3-4152-aaeb-695dfd0d8be0?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/da3016f2-f263-436f-a9bb-c68181fbfe6f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: @@ -259,11 +262,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:10 GMT + - Tue, 12 Oct 2021 06:27:18 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/2158dd42-c4c3-4152-aaeb-695dfd0d8be0?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/da3016f2-f263-436f-a9bb-c68181fbfe6f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -290,14 +293,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/2158dd42-c4c3-4152-aaeb-695dfd0d8be0?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/da3016f2-f263-436f-a9bb-c68181fbfe6f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:22:10.5959151+00:00\",\r\n \"endTime\": - \"2021-09-02T03:22:10.7208977+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:27:18.1842093+00:00\",\r\n \"endTime\": + \"2021-10-12T06:27:18.2779385+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"disknamex77f61175\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175\",\r\n \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"eastus\",\r\n @@ -305,20 +308,21 @@ interactions: \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"encryption\": {\r\n \"type\": - \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"timeCreated\": \"2021-09-02T03:22:08.3927821+00:00\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"2c9365b5-317b-4c46-9520-219378126c7d\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}\r\n },\r\n \"name\": - \"2158dd42-c4c3-4152-aaeb-695dfd0d8be0\"\r\n}" + \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"networkAccessPolicy\": + \"AllowAll\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": + \"2021-10-12T06:27:15.6373292+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": 214748364800,\r\n + \ \"uniqueId\": \"7017fb16-747b-44fc-af6c-a50f6a0fe24e\"\r\n }\r\n}\r\n + \ },\r\n \"name\": \"da3016f2-f263-436f-a9bb-c68181fbfe6f\"\r\n}" headers: cache-control: - no-cache content-length: - - '1116' + - '1155' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:12 GMT + - Tue, 12 Oct 2021 06:27:20 GMT expires: - '-1' pragma: @@ -335,7 +339,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49987,Microsoft.Compute/GetOperation30Min;399987 + - Microsoft.Compute/GetOperation3Min;49984,Microsoft.Compute/GetOperation30Min;399975 status: code: 200 message: OK @@ -349,10 +353,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"disknamex77f61175\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175\",\r\n @@ -361,19 +365,20 @@ interactions: \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"encryption\": {\r\n \"type\": - \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"timeCreated\": \"2021-09-02T03:22:08.3927821+00:00\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"2c9365b5-317b-4c46-9520-219378126c7d\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}" + \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"networkAccessPolicy\": + \"AllowAll\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": + \"2021-10-12T06:27:15.6373292+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": 214748364800,\r\n + \ \"uniqueId\": \"7017fb16-747b-44fc-af6c-a50f6a0fe24e\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '891' + - '930' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:12 GMT + - Tue, 12 Oct 2021 06:27:20 GMT expires: - '-1' pragma: @@ -390,7 +395,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14988,Microsoft.Compute/LowCostGet30Min;119988 + - Microsoft.Compute/LowCostGet3Min;14987,Microsoft.Compute/LowCostGet30Min;119923 status: code: 200 message: OK @@ -408,26 +413,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175/beginGetAccess?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175/beginGetAccess?api-version=2021-04-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/e7323014-5a63-4967-833d-eeae5b61b4fc?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/556b6058-a21a-4b3c-9c3d-9641aa6ac3be?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:22:12 GMT + - Tue, 12 Oct 2021 06:27:20 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/e7323014-5a63-4967-833d-eeae5b61b4fc?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/556b6058-a21a-4b3c-9c3d-9641aa6ac3be?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -454,25 +459,25 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/e7323014-5a63-4967-833d-eeae5b61b4fc?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/556b6058-a21a-4b3c-9c3d-9641aa6ac3be?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:22:12.7834023+00:00\",\r\n \"endTime\": - \"2021-09-02T03:22:13.0021825+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:27:20.6529784+00:00\",\r\n \"endTime\": + \"2021-10-12T06:27:20.9498506+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"accessSAS\": \"FakeUrl\"\r\n}\r\n - \ },\r\n \"name\": \"e7323014-5a63-4967-833d-eeae5b61b4fc\"\r\n}" + \ },\r\n \"name\": \"556b6058-a21a-4b3c-9c3d-9641aa6ac3be\"\r\n}" headers: cache-control: - no-cache content-length: - - '428' + - '432' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:42 GMT + - Tue, 12 Oct 2021 06:27:50 GMT expires: - '-1' pragma: @@ -489,7 +494,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49984,Microsoft.Compute/GetOperation30Min;399984 + - Microsoft.Compute/GetOperation3Min;49982,Microsoft.Compute/GetOperation30Min;399972 status: code: 200 message: OK @@ -503,10 +508,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/e7323014-5a63-4967-833d-eeae5b61b4fc?monitor=true&api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/556b6058-a21a-4b3c-9c3d-9641aa6ac3be?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 response: body: string: "{\r\n \"accessSAS\": \"FakeUrl\"\r\n}" @@ -514,11 +519,11 @@ interactions: cache-control: - no-cache content-length: - - '203' + - '207' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:42 GMT + - Tue, 12 Oct 2021 06:27:50 GMT expires: - '-1' pragma: @@ -535,7 +540,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49983,Microsoft.Compute/GetOperation30Min;399983 + - Microsoft.Compute/GetOperation3Min;49981,Microsoft.Compute/GetOperation30Min;399971 status: code: 200 message: OK @@ -551,26 +556,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175/endGetAccess?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175/endGetAccess?api-version=2021-04-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4cc576a4-f1b8-4705-8b7e-53c873bcde9b?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/cfec0a0f-879b-45b5-a167-89e59941daac?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:22:42 GMT + - Tue, 12 Oct 2021 06:27:50 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4cc576a4-f1b8-4705-8b7e-53c873bcde9b?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/cfec0a0f-879b-45b5-a167-89e59941daac?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -597,15 +602,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4cc576a4-f1b8-4705-8b7e-53c873bcde9b?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/cfec0a0f-879b-45b5-a167-89e59941daac?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:22:43.0335609+00:00\",\r\n \"endTime\": - \"2021-09-02T03:22:43.1897874+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"4cc576a4-f1b8-4705-8b7e-53c873bcde9b\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:27:51.1690379+00:00\",\r\n \"endTime\": + \"2021-10-12T06:27:51.2784114+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"cfec0a0f-879b-45b5-a167-89e59941daac\"\r\n}" headers: cache-control: - no-cache @@ -614,7 +619,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:23:12 GMT + - Tue, 12 Oct 2021 06:28:20 GMT expires: - '-1' pragma: @@ -631,7 +636,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49981,Microsoft.Compute/GetOperation30Min;399981 + - Microsoft.Compute/GetOperation3Min;49981,Microsoft.Compute/GetOperation30Min;399969 status: code: 200 message: OK @@ -645,10 +650,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4cc576a4-f1b8-4705-8b7e-53c873bcde9b?monitor=true&api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/cfec0a0f-879b-45b5-a167-89e59941daac?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 response: body: string: '' @@ -658,7 +663,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:23:12 GMT + - Tue, 12 Oct 2021 06:28:20 GMT expires: - '-1' pragma: @@ -671,7 +676,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49980,Microsoft.Compute/GetOperation30Min;399980 + - Microsoft.Compute/GetOperation3Min;49980,Microsoft.Compute/GetOperation30Min;399968 status: code: 200 message: OK @@ -687,26 +692,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex77f61175?api-version=2021-04-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/d8bc9513-4031-4699-ba00-787a28f0a70c?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/06c9134d-0a5b-461f-9e22-8ba8af29677f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:23:12 GMT + - Tue, 12 Oct 2021 06:28:21 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/d8bc9513-4031-4699-ba00-787a28f0a70c?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/06c9134d-0a5b-461f-9e22-8ba8af29677f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -717,7 +722,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteDisks3Min;2998,Microsoft.Compute/DeleteDisks30Min;23998 + - Microsoft.Compute/DeleteDisks3Min;2998,Microsoft.Compute/DeleteDisks30Min;23994 x-ms-ratelimit-remaining-subscription-deletes: - '14997' status: @@ -733,24 +738,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/d8bc9513-4031-4699-ba00-787a28f0a70c?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/06c9134d-0a5b-461f-9e22-8ba8af29677f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:23:13.2837026+00:00\",\r\n \"endTime\": - \"2021-09-02T03:23:15.002409+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"d8bc9513-4031-4699-ba00-787a28f0a70c\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:28:21.7784176+00:00\",\r\n \"endTime\": + \"2021-10-12T06:28:21.9971559+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"06c9134d-0a5b-461f-9e22-8ba8af29677f\"\r\n}" headers: cache-control: - no-cache content-length: - - '183' + - '184' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:23:42 GMT + - Tue, 12 Oct 2021 06:28:51 GMT expires: - '-1' pragma: @@ -767,7 +772,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49982,Microsoft.Compute/GetOperation30Min;399978 + - Microsoft.Compute/GetOperation3Min;49982,Microsoft.Compute/GetOperation30Min;399966 status: code: 200 message: OK diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_disks_multi.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_disks_multi.yaml index ac51702e4774..b5ff41dee093 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_disks_multi.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_disks_multi.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff?api-version=2019-03-01 @@ -26,7 +26,7 @@ interactions: \"Updating\",\r\n \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/9745363b-1a25-49cb-b412-24a9f9c13f21?api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/09f86008-27e6-4464-977d-4ca9d809910c?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 cache-control: - no-cache content-length: @@ -34,11 +34,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:31 GMT + - Tue, 12 Oct 2021 06:25:34 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/9745363b-1a25-49cb-b412-24a9f9c13f21?monitor=true&api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/09f86008-27e6-4464-977d-4ca9d809910c?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2019-03-01 pragma: - no-cache server: @@ -65,33 +65,33 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/9745363b-1a25-49cb-b412-24a9f9c13f21?api-version=2019-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/09f86008-27e6-4464-977d-4ca9d809910c?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:20:31.8601471+00:00\",\r\n \"endTime\": - \"2021-09-02T03:20:32.0320102+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:25:35.4332759+00:00\",\r\n \"endTime\": + \"2021-10-12T06:25:35.511365+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"disknamexe97813ff\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff\",\r\n \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"eastus\",\r\n \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": - 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-09-02T03:20:31.8757611+00:00\",\r\n + 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-10-12T06:25:35.4332759+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"3c982d32-0a66-4987-8d3e-31238cb72a99\"\r\n - \ }\r\n}\r\n },\r\n \"name\": \"9745363b-1a25-49cb-b412-24a9f9c13f21\"\r\n}" + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"62852463-1861-486f-9243-2e0d4e89cec7\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"09f86008-27e6-4464-977d-4ca9d809910c\"\r\n}" headers: cache-control: - no-cache content-length: - - '998' + - '997' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:33 GMT + - Tue, 12 Oct 2021 06:25:37 GMT expires: - '-1' pragma: @@ -108,7 +108,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49999,Microsoft.Compute/GetOperation30Min;399999 + - Microsoft.Compute/GetOperation3Min;49990,Microsoft.Compute/GetOperation30Min;399987 status: code: 200 message: OK @@ -122,7 +122,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff?api-version=2019-03-01 @@ -133,9 +133,9 @@ interactions: \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": - 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-09-02T03:20:31.8757611+00:00\",\r\n + 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-10-12T06:25:35.4332759+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"3c982d32-0a66-4987-8d3e-31238cb72a99\"\r\n + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"62852463-1861-486f-9243-2e0d4e89cec7\"\r\n \ }\r\n}" headers: cache-control: @@ -145,7 +145,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:33 GMT + - Tue, 12 Oct 2021 06:25:37 GMT expires: - '-1' pragma: @@ -162,7 +162,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14999,Microsoft.Compute/LowCostGet30Min;119999 + - Microsoft.Compute/LowCostGet3Min;14996,Microsoft.Compute/LowCostGet30Min;119934 status: code: 200 message: OK @@ -176,7 +176,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff?api-version=2019-03-01 @@ -187,9 +187,9 @@ interactions: \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": - 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-09-02T03:20:31.8757611+00:00\",\r\n + 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-10-12T06:25:35.4332759+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"3c982d32-0a66-4987-8d3e-31238cb72a99\"\r\n + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"62852463-1861-486f-9243-2e0d4e89cec7\"\r\n \ }\r\n}" headers: cache-control: @@ -199,7 +199,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:33 GMT + - Tue, 12 Oct 2021 06:25:37 GMT expires: - '-1' pragma: @@ -216,7 +216,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14998,Microsoft.Compute/LowCostGet30Min;119998 + - Microsoft.Compute/LowCostGet3Min;14995,Microsoft.Compute/LowCostGet30Min;119933 status: code: 200 message: OK @@ -234,7 +234,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff?api-version=2019-03-01 @@ -247,7 +247,7 @@ interactions: \"Updating\",\r\n \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/899a778d-3e2e-4558-bb89-3119bc7717d9?api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/327c07f7-5a8b-43c0-adb2-2f650df7289f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 cache-control: - no-cache content-length: @@ -255,11 +255,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:33 GMT + - Tue, 12 Oct 2021 06:25:37 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/899a778d-3e2e-4558-bb89-3119bc7717d9?monitor=true&api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/327c07f7-5a8b-43c0-adb2-2f650df7289f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2019-03-01 pragma: - no-cache server: @@ -286,24 +286,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/899a778d-3e2e-4558-bb89-3119bc7717d9?api-version=2019-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/327c07f7-5a8b-43c0-adb2-2f650df7289f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:20:34.1570253+00:00\",\r\n \"endTime\": - \"2021-09-02T03:20:34.2820027+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:25:37.9801466+00:00\",\r\n \"endTime\": + \"2021-10-12T06:25:38.1051139+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"disknamexe97813ff\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff\",\r\n \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"eastus\",\r\n \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": - 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-09-02T03:20:31.8757611+00:00\",\r\n + 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-10-12T06:25:35.4332759+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"3c982d32-0a66-4987-8d3e-31238cb72a99\"\r\n - \ }\r\n}\r\n },\r\n \"name\": \"899a778d-3e2e-4558-bb89-3119bc7717d9\"\r\n}" + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"62852463-1861-486f-9243-2e0d4e89cec7\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"327c07f7-5a8b-43c0-adb2-2f650df7289f\"\r\n}" headers: cache-control: - no-cache @@ -312,7 +312,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:35 GMT + - Tue, 12 Oct 2021 06:25:39 GMT expires: - '-1' pragma: @@ -329,7 +329,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49998,Microsoft.Compute/GetOperation30Min;399998 + - Microsoft.Compute/GetOperation3Min;49989,Microsoft.Compute/GetOperation30Min;399986 status: code: 200 message: OK @@ -343,7 +343,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff?api-version=2019-03-01 @@ -354,9 +354,9 @@ interactions: \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": - 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-09-02T03:20:31.8757611+00:00\",\r\n + 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"timeCreated\": \"2021-10-12T06:25:35.4332759+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"3c982d32-0a66-4987-8d3e-31238cb72a99\"\r\n + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"62852463-1861-486f-9243-2e0d4e89cec7\"\r\n \ }\r\n}" headers: cache-control: @@ -366,7 +366,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:20:35 GMT + - Tue, 12 Oct 2021 06:25:39 GMT expires: - '-1' pragma: @@ -383,7 +383,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14996,Microsoft.Compute/LowCostGet30Min;119996 + - Microsoft.Compute/LowCostGet3Min;14993,Microsoft.Compute/LowCostGet30Min;119931 status: code: 200 message: OK @@ -401,7 +401,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff/beginGetAccess?api-version=2019-03-01 @@ -410,17 +410,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/894284ec-d093-4a4c-a2c8-11dfe7784b33?api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/b9f203cf-295e-426c-b4a3-460aab14c852?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:20:35 GMT + - Tue, 12 Oct 2021 06:25:39 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/894284ec-d093-4a4c-a2c8-11dfe7784b33?monitor=true&api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/b9f203cf-295e-426c-b4a3-460aab14c852?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2019-03-01 pragma: - no-cache server: @@ -447,16 +447,16 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/894284ec-d093-4a4c-a2c8-11dfe7784b33?api-version=2019-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/b9f203cf-295e-426c-b4a3-460aab14c852?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:20:36.3289144+00:00\",\r\n \"endTime\": - \"2021-09-02T03:20:36.6882601+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:25:40.4019968+00:00\",\r\n \"endTime\": + \"2021-10-12T06:25:40.7301408+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"accessSAS\": \"FakeUrl\"\r\n}\r\n - \ },\r\n \"name\": \"894284ec-d093-4a4c-a2c8-11dfe7784b33\"\r\n}" + \ },\r\n \"name\": \"b9f203cf-295e-426c-b4a3-460aab14c852\"\r\n}" headers: cache-control: - no-cache @@ -465,7 +465,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:21:05 GMT + - Tue, 12 Oct 2021 06:26:09 GMT expires: - '-1' pragma: @@ -482,7 +482,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49995,Microsoft.Compute/GetOperation30Min;399995 + - Microsoft.Compute/GetOperation3Min;49989,Microsoft.Compute/GetOperation30Min;399983 status: code: 200 message: OK @@ -496,10 +496,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/894284ec-d093-4a4c-a2c8-11dfe7784b33?monitor=true&api-version=2019-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/b9f203cf-295e-426c-b4a3-460aab14c852?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2019-03-01 response: body: string: "{\r\n \"accessSAS\": \"FakeUrl\"\r\n}" @@ -511,7 +511,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:21:05 GMT + - Tue, 12 Oct 2021 06:26:09 GMT expires: - '-1' pragma: @@ -528,7 +528,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49994,Microsoft.Compute/GetOperation30Min;399994 + - Microsoft.Compute/GetOperation3Min;49988,Microsoft.Compute/GetOperation30Min;399982 status: code: 200 message: OK @@ -544,7 +544,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff/endGetAccess?api-version=2019-03-01 @@ -553,17 +553,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4e1280f4-2d10-4a8b-8b1b-82ccc164e640?api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/a4834cd9-886b-4dc0-a5b3-d9e5a58cc456?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:21:05 GMT + - Tue, 12 Oct 2021 06:26:10 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4e1280f4-2d10-4a8b-8b1b-82ccc164e640?monitor=true&api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/a4834cd9-886b-4dc0-a5b3-d9e5a58cc456?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2019-03-01 pragma: - no-cache server: @@ -590,24 +590,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4e1280f4-2d10-4a8b-8b1b-82ccc164e640?api-version=2019-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/a4834cd9-886b-4dc0-a5b3-d9e5a58cc456?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:21:06.5793656+00:00\",\r\n \"endTime\": - \"2021-09-02T03:21:06.7199951+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"4e1280f4-2d10-4a8b-8b1b-82ccc164e640\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:26:10.8552559+00:00\",\r\n \"endTime\": + \"2021-10-12T06:26:10.949024+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"a4834cd9-886b-4dc0-a5b3-d9e5a58cc456\"\r\n}" headers: cache-control: - no-cache content-length: - - '184' + - '183' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:21:35 GMT + - Tue, 12 Oct 2021 06:26:40 GMT expires: - '-1' pragma: @@ -624,7 +624,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49992,Microsoft.Compute/GetOperation30Min;399992 + - Microsoft.Compute/GetOperation3Min;49988,Microsoft.Compute/GetOperation30Min;399980 status: code: 200 message: OK @@ -638,10 +638,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4e1280f4-2d10-4a8b-8b1b-82ccc164e640?monitor=true&api-version=2019-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/a4834cd9-886b-4dc0-a5b3-d9e5a58cc456?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2019-03-01 response: body: string: '' @@ -651,7 +651,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:21:35 GMT + - Tue, 12 Oct 2021 06:26:41 GMT expires: - '-1' pragma: @@ -664,7 +664,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49991,Microsoft.Compute/GetOperation30Min;399991 + - Microsoft.Compute/GetOperation3Min;49987,Microsoft.Compute/GetOperation30Min;399979 status: code: 200 message: OK @@ -680,7 +680,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamexe97813ff?api-version=2019-03-01 @@ -689,17 +689,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/6bfacc57-ab48-4f31-8c8c-0c299b0e6ea5?api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/30fff933-f063-48f4-9707-e172b7619e45?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:21:35 GMT + - Tue, 12 Oct 2021 06:26:41 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/6bfacc57-ab48-4f31-8c8c-0c299b0e6ea5?monitor=true&api-version=2019-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/30fff933-f063-48f4-9707-e172b7619e45?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2019-03-01 pragma: - no-cache server: @@ -710,7 +710,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteDisks3Min;2999,Microsoft.Compute/DeleteDisks30Min;23999 + - Microsoft.Compute/DeleteDisks3Min;2998,Microsoft.Compute/DeleteDisks30Min;23995 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -726,24 +726,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/6bfacc57-ab48-4f31-8c8c-0c299b0e6ea5?api-version=2019-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/30fff933-f063-48f4-9707-e172b7619e45?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2019-03-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:21:36.7832469+00:00\",\r\n \"endTime\": - \"2021-09-02T03:21:37.470822+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"6bfacc57-ab48-4f31-8c8c-0c299b0e6ea5\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:26:41.4990321+00:00\",\r\n \"endTime\": + \"2021-10-12T06:26:41.7153055+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"30fff933-f063-48f4-9707-e172b7619e45\"\r\n}" headers: cache-control: - no-cache content-length: - - '183' + - '184' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:22:06 GMT + - Tue, 12 Oct 2021 06:27:11 GMT expires: - '-1' pragma: @@ -760,7 +760,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49989,Microsoft.Compute/GetOperation30Min;399989 + - Microsoft.Compute/GetOperation3Min;49986,Microsoft.Compute/GetOperation30Min;399977 status: code: 200 message: OK diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_shot.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_shot.yaml index 6b2632e4882c..c5a1774c1fa7 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_shot.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_disks.test_compute_shot.yaml @@ -14,10 +14,10 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"disknamex66bb1115\",\r\n \"location\": \"eastus\",\r\n @@ -26,7 +26,7 @@ interactions: \"Updating\",\r\n \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/f02954f9-2c0b-42a6-a4f6-e9fbe9d1d81b?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/e2cc3f0f-ce8d-4833-bed1-8367e410a3ac?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: @@ -34,11 +34,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:23:44 GMT + - Tue, 12 Oct 2021 06:28:55 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/f02954f9-2c0b-42a6-a4f6-e9fbe9d1d81b?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/e2cc3f0f-ce8d-4833-bed1-8367e410a3ac?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -65,14 +65,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/f02954f9-2c0b-42a6-a4f6-e9fbe9d1d81b?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/e2cc3f0f-ce8d-4833-bed1-8367e410a3ac?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:23:44.877505+00:00\",\r\n \"endTime\": - \"2021-09-02T03:23:44.9712745+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:28:56.0319987+00:00\",\r\n \"endTime\": + \"2021-10-12T06:28:56.1258342+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"disknamex66bb1115\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115\",\r\n \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"eastus\",\r\n @@ -80,20 +80,21 @@ interactions: \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"encryption\": {\r\n \"type\": - \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"timeCreated\": \"2021-09-02T03:23:44.893143+00:00\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"6a70f49f-01f5-4d00-ac83-19e368b1f7a9\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}\r\n },\r\n \"name\": - \"f02954f9-2c0b-42a6-a4f6-e9fbe9d1d81b\"\r\n}" + \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"networkAccessPolicy\": + \"AllowAll\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": + \"2021-10-12T06:28:56.0319987+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": 214748364800,\r\n + \ \"uniqueId\": \"e639ece0-5979-41d7-90b5-408a51650b53\"\r\n }\r\n}\r\n + \ },\r\n \"name\": \"e2cc3f0f-ce8d-4833-bed1-8367e410a3ac\"\r\n}" headers: cache-control: - no-cache content-length: - - '1114' + - '1155' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:23:46 GMT + - Tue, 12 Oct 2021 06:28:57 GMT expires: - '-1' pragma: @@ -110,7 +111,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49981,Microsoft.Compute/GetOperation30Min;399977 + - Microsoft.Compute/GetOperation3Min;49981,Microsoft.Compute/GetOperation30Min;399965 status: code: 200 message: OK @@ -124,10 +125,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"disknamex66bb1115\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115\",\r\n @@ -136,19 +137,20 @@ interactions: \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"encryption\": {\r\n \"type\": - \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"timeCreated\": \"2021-09-02T03:23:44.893143+00:00\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"6a70f49f-01f5-4d00-ac83-19e368b1f7a9\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}" + \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"networkAccessPolicy\": + \"AllowAll\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": + \"2021-10-12T06:28:56.0319987+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": 214748364800,\r\n + \ \"uniqueId\": \"e639ece0-5979-41d7-90b5-408a51650b53\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '890' + - '930' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:23:46 GMT + - Tue, 12 Oct 2021 06:28:57 GMT expires: - '-1' pragma: @@ -165,7 +167,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14989,Microsoft.Compute/LowCostGet30Min;119983 + - Microsoft.Compute/LowCostGet3Min;14977,Microsoft.Compute/LowCostGet30Min;119906 status: code: 200 message: OK @@ -184,32 +186,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2021-04-01 response: body: string: "{\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceUri\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115\",\r\n - \ \"sourceUniqueId\": \"6a70f49f-01f5-4d00-ac83-19e368b1f7a9\"\r\n },\r\n - \ \"provisioningState\": \"Updating\",\r\n \"isArmResource\": true\r\n - \ }\r\n}" + \ \"sourceUniqueId\": \"e639ece0-5979-41d7-90b5-408a51650b53\"\r\n },\r\n + \ \"publicNetworkAccess\": \"Enabled\",\r\n \"provisioningState\": \"Updating\",\r\n + \ \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/c0a9ef50-0768-49c3-8dbb-6aba7d536ccd?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/04940bb1-ee6f-4b0b-94b1-242307cf7aa0?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - - '467' + - '506' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:23:47 GMT + - Tue, 12 Oct 2021 06:28:58 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/c0a9ef50-0768-49c3-8dbb-6aba7d536ccd?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/04940bb1-ee6f-4b0b-94b1-242307cf7aa0?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -236,36 +238,36 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/c0a9ef50-0768-49c3-8dbb-6aba7d536ccd?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/04940bb1-ee6f-4b0b-94b1-242307cf7aa0?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:23:47.2213146+00:00\",\r\n \"endTime\": - \"2021-09-02T03:23:48.424404+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:28:58.9382731+00:00\",\r\n \"endTime\": + \"2021-10-12T06:28:59.969499+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"snapshotx66bb1115\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115\",\r\n \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"eastus\",\r\n \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115\",\r\n - \ \"sourceUniqueId\": \"6a70f49f-01f5-4d00-ac83-19e368b1f7a9\"\r\n },\r\n + \ \"sourceUniqueId\": \"e639ece0-5979-41d7-90b5-408a51650b53\"\r\n },\r\n \ \"diskSizeGB\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n - \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2021-09-02T03:23:47.2213146+00:00\",\r\n + \ },\r\n \"incremental\": false,\r\n \"networkAccessPolicy\": \"AllowAll\",\r\n + \ \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": \"2021-10-12T06:28:58.9539014+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"e056c0da-b820-46bd-a567-b1703be1f3b5\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}\r\n },\r\n \"name\": - \"c0a9ef50-0768-49c3-8dbb-6aba7d536ccd\"\r\n}" + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"1a140676-f62d-44a1-a27c-de52ae646246\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"04940bb1-ee6f-4b0b-94b1-242307cf7aa0\"\r\n}" headers: cache-control: - no-cache content-length: - - '1383' + - '1422' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:23:49 GMT + - Tue, 12 Oct 2021 06:29:00 GMT expires: - '-1' pragma: @@ -282,7 +284,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49980,Microsoft.Compute/GetOperation30Min;399976 + - Microsoft.Compute/GetOperation3Min;49983,Microsoft.Compute/GetOperation30Min;399964 status: code: 200 message: OK @@ -296,10 +298,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"snapshotx66bb1115\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115\",\r\n @@ -307,21 +309,22 @@ interactions: \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115\",\r\n - \ \"sourceUniqueId\": \"6a70f49f-01f5-4d00-ac83-19e368b1f7a9\"\r\n },\r\n + \ \"sourceUniqueId\": \"e639ece0-5979-41d7-90b5-408a51650b53\"\r\n },\r\n \ \"diskSizeGB\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n - \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2021-09-02T03:23:47.2213146+00:00\",\r\n + \ },\r\n \"incremental\": false,\r\n \"networkAccessPolicy\": \"AllowAll\",\r\n + \ \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": \"2021-10-12T06:28:58.9539014+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"e056c0da-b820-46bd-a567-b1703be1f3b5\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}" + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"1a140676-f62d-44a1-a27c-de52ae646246\"\r\n + \ }\r\n}" headers: cache-control: - no-cache content-length: - - '1159' + - '1198' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:23:49 GMT + - Tue, 12 Oct 2021 06:29:00 GMT expires: - '-1' pragma: @@ -338,7 +341,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14988,Microsoft.Compute/LowCostGet30Min;119982 + - Microsoft.Compute/LowCostGet3Min;14976,Microsoft.Compute/LowCostGet30Min;119905 status: code: 200 message: OK @@ -359,7 +362,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/images/imagex66bb1115?api-version=2021-07-01 @@ -378,7 +381,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c6d0d7a7-16d8-479c-a608-b1368e89cf1a?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/93105f52-326a-41e2-a946-f32f12a6d356?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: @@ -386,7 +389,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:23:49 GMT + - Tue, 12 Oct 2021 06:29:02 GMT expires: - '-1' pragma: @@ -415,15 +418,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c6d0d7a7-16d8-479c-a608-b1368e89cf1a?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/93105f52-326a-41e2-a946-f32f12a6d356?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:23:49.5242572+00:00\",\r\n \"endTime\": - \"2021-09-02T03:23:54.6649042+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"c6d0d7a7-16d8-479c-a608-b1368e89cf1a\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:29:02.0288875+00:00\",\r\n \"endTime\": + \"2021-10-12T06:29:07.0914116+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"93105f52-326a-41e2-a946-f32f12a6d356\"\r\n}" headers: cache-control: - no-cache @@ -432,7 +435,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:19 GMT + - Tue, 12 Oct 2021 06:29:31 GMT expires: - '-1' pragma: @@ -449,7 +452,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29994 + - Microsoft.Compute/GetOperation3Min;14970,Microsoft.Compute/GetOperation30Min;29837 status: code: 200 message: OK @@ -463,7 +466,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/images/imagex66bb1115?api-version=2021-07-01 @@ -487,7 +490,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:19 GMT + - Tue, 12 Oct 2021 06:29:32 GMT expires: - '-1' pragma: @@ -518,10 +521,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"snapshotx66bb1115\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115\",\r\n @@ -529,21 +532,22 @@ interactions: \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115\",\r\n - \ \"sourceUniqueId\": \"6a70f49f-01f5-4d00-ac83-19e368b1f7a9\"\r\n },\r\n + \ \"sourceUniqueId\": \"e639ece0-5979-41d7-90b5-408a51650b53\"\r\n },\r\n \ \"diskSizeGB\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n - \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2021-09-02T03:23:47.2213146+00:00\",\r\n + \ },\r\n \"incremental\": false,\r\n \"networkAccessPolicy\": \"AllowAll\",\r\n + \ \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": \"2021-10-12T06:28:58.9539014+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"e056c0da-b820-46bd-a567-b1703be1f3b5\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}" + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"1a140676-f62d-44a1-a27c-de52ae646246\"\r\n + \ }\r\n}" headers: cache-control: - no-cache content-length: - - '1159' + - '1198' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:19 GMT + - Tue, 12 Oct 2021 06:29:32 GMT expires: - '-1' pragma: @@ -560,7 +564,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14982,Microsoft.Compute/LowCostGet30Min;119976 + - Microsoft.Compute/LowCostGet3Min;14962,Microsoft.Compute/LowCostGet30Min;119889 status: code: 200 message: OK @@ -574,7 +578,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/images/imagex66bb1115?api-version=2021-07-01 @@ -598,7 +602,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:19 GMT + - Tue, 12 Oct 2021 06:29:32 GMT expires: - '-1' pragma: @@ -633,7 +637,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/images/imagex66bb1115?api-version=2021-07-01 @@ -653,7 +657,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e2603c57-edd0-4a9a-8adc-390fb361d6d1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/7d84c970-0e58-4c1c-ac41-cc2e4801b740?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: @@ -661,7 +665,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:20 GMT + - Tue, 12 Oct 2021 06:29:33 GMT expires: - '-1' pragma: @@ -694,15 +698,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e2603c57-edd0-4a9a-8adc-390fb361d6d1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/7d84c970-0e58-4c1c-ac41-cc2e4801b740?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:24:20.0244422+00:00\",\r\n \"endTime\": - \"2021-09-02T03:24:25.0869757+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"e2603c57-edd0-4a9a-8adc-390fb361d6d1\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:29:33.2321996+00:00\",\r\n \"endTime\": + \"2021-10-12T06:29:38.5603556+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"7d84c970-0e58-4c1c-ac41-cc2e4801b740\"\r\n}" headers: cache-control: - no-cache @@ -711,7 +715,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:49 GMT + - Tue, 12 Oct 2021 06:30:03 GMT expires: - '-1' pragma: @@ -728,7 +732,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29992 + - Microsoft.Compute/GetOperation3Min;14961,Microsoft.Compute/GetOperation30Min;29824 status: code: 200 message: OK @@ -742,7 +746,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/images/imagex66bb1115?api-version=2021-07-01 @@ -766,7 +770,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:49 GMT + - Tue, 12 Oct 2021 06:30:03 GMT expires: - '-1' pragma: @@ -801,21 +805,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2021-04-01 response: body: string: "{\r\n \"location\": \"eastus\",\r\n \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \ \"tier\": \"Standard\"\r\n },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115\",\r\n - \ \"sourceUniqueId\": \"6a70f49f-01f5-4d00-ac83-19e368b1f7a9\"\r\n },\r\n + \ \"sourceUniqueId\": \"e639ece0-5979-41d7-90b5-408a51650b53\"\r\n },\r\n \ \"diskSizeGB\": 200,\r\n \"provisioningState\": \"Updating\",\r\n \"isArmResource\": true,\r\n \"faultDomain\": 0\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/44b8a299-2bdf-4848-85b9-fc7dda117530?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/8fcdf6c8-f447-4707-a81d-9f51a6b9a03a?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: @@ -823,11 +827,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:50 GMT + - Tue, 12 Oct 2021 06:30:03 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/44b8a299-2bdf-4848-85b9-fc7dda117530?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/8fcdf6c8-f447-4707-a81d-9f51a6b9a03a?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -838,7 +842,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/CreateUpdateDisks3Min;996,Microsoft.Compute/CreateUpdateDisks30Min;7994 + - Microsoft.Compute/CreateUpdateDisks3Min;998,Microsoft.Compute/CreateUpdateDisks30Min;7994 x-ms-ratelimit-remaining-subscription-writes: - '1194' status: @@ -854,36 +858,36 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/44b8a299-2bdf-4848-85b9-fc7dda117530?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/8fcdf6c8-f447-4707-a81d-9f51a6b9a03a?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:24:50.3631109+00:00\",\r\n \"endTime\": - \"2021-09-02T03:24:50.4724644+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:30:04.4250525+00:00\",\r\n \"endTime\": + \"2021-10-12T06:30:04.5187804+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"snapshotx66bb1115\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115\",\r\n \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"eastus\",\r\n \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115\",\r\n - \ \"sourceUniqueId\": \"6a70f49f-01f5-4d00-ac83-19e368b1f7a9\"\r\n },\r\n + \ \"sourceUniqueId\": \"e639ece0-5979-41d7-90b5-408a51650b53\"\r\n },\r\n \ \"diskSizeGB\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n - \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2021-09-02T03:23:47.2213146+00:00\",\r\n + \ },\r\n \"incremental\": false,\r\n \"networkAccessPolicy\": \"AllowAll\",\r\n + \ \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": \"2021-10-12T06:28:58.9539014+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"e056c0da-b820-46bd-a567-b1703be1f3b5\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}\r\n },\r\n \"name\": - \"44b8a299-2bdf-4848-85b9-fc7dda117530\"\r\n}" + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"1a140676-f62d-44a1-a27c-de52ae646246\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"8fcdf6c8-f447-4707-a81d-9f51a6b9a03a\"\r\n}" headers: cache-control: - no-cache content-length: - - '1384' + - '1423' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:52 GMT + - Tue, 12 Oct 2021 06:30:06 GMT expires: - '-1' pragma: @@ -900,7 +904,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49979,Microsoft.Compute/GetOperation30Min;399969 + - Microsoft.Compute/GetOperation3Min;49971,Microsoft.Compute/GetOperation30Min;399945 status: code: 200 message: OK @@ -914,10 +918,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"snapshotx66bb1115\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115\",\r\n @@ -925,21 +929,22 @@ interactions: \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/disknamex66bb1115\",\r\n - \ \"sourceUniqueId\": \"6a70f49f-01f5-4d00-ac83-19e368b1f7a9\"\r\n },\r\n + \ \"sourceUniqueId\": \"e639ece0-5979-41d7-90b5-408a51650b53\"\r\n },\r\n \ \"diskSizeGB\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n - \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2021-09-02T03:23:47.2213146+00:00\",\r\n + \ },\r\n \"incremental\": false,\r\n \"networkAccessPolicy\": \"AllowAll\",\r\n + \ \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": \"2021-10-12T06:28:58.9539014+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"e056c0da-b820-46bd-a567-b1703be1f3b5\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}" + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"1a140676-f62d-44a1-a27c-de52ae646246\"\r\n + \ }\r\n}" headers: cache-control: - no-cache content-length: - - '1159' + - '1198' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:24:52 GMT + - Tue, 12 Oct 2021 06:30:06 GMT expires: - '-1' pragma: @@ -956,7 +961,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14982,Microsoft.Compute/LowCostGet30Min;119974 + - Microsoft.Compute/LowCostGet3Min;14960,Microsoft.Compute/LowCostGet30Min;119881 status: code: 200 message: OK @@ -974,26 +979,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115/beginGetAccess?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115/beginGetAccess?api-version=2021-04-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/5a939299-ed7f-4155-9f65-7a8463ab3c26?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4ff19380-c6f4-468d-86f7-9872f942bc08?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:24:52 GMT + - Tue, 12 Oct 2021 06:30:06 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/5a939299-ed7f-4155-9f65-7a8463ab3c26?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4ff19380-c6f4-468d-86f7-9872f942bc08?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -1020,16 +1025,16 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/5a939299-ed7f-4155-9f65-7a8463ab3c26?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4ff19380-c6f4-468d-86f7-9872f942bc08?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:24:52.5506314+00:00\",\r\n \"endTime\": - \"2021-09-02T03:24:52.6756216+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:30:06.8502514+00:00\",\r\n \"endTime\": + \"2021-10-12T06:30:06.9752399+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"accessSAS\": \"FakeUrl\"\r\n}\r\n - \ },\r\n \"name\": \"5a939299-ed7f-4155-9f65-7a8463ab3c26\"\r\n}" + \ },\r\n \"name\": \"4ff19380-c6f4-468d-86f7-9872f942bc08\"\r\n}" headers: cache-control: - no-cache @@ -1038,7 +1043,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:25:22 GMT + - Tue, 12 Oct 2021 06:30:36 GMT expires: - '-1' pragma: @@ -1055,7 +1060,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49982,Microsoft.Compute/GetOperation30Min;399967 + - Microsoft.Compute/GetOperation3Min;49966,Microsoft.Compute/GetOperation30Min;399937 status: code: 200 message: OK @@ -1069,10 +1074,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/5a939299-ed7f-4155-9f65-7a8463ab3c26?monitor=true&api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4ff19380-c6f4-468d-86f7-9872f942bc08?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 response: body: string: "{\r\n \"accessSAS\": \"FakeUrl\"\r\n}" @@ -1084,7 +1089,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:25:22 GMT + - Tue, 12 Oct 2021 06:30:36 GMT expires: - '-1' pragma: @@ -1101,7 +1106,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49981,Microsoft.Compute/GetOperation30Min;399966 + - Microsoft.Compute/GetOperation3Min;49965,Microsoft.Compute/GetOperation30Min;399936 status: code: 200 message: OK @@ -1117,26 +1122,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115/endGetAccess?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115/endGetAccess?api-version=2021-04-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/a90ee979-b9d8-421d-92b3-5d5ee2e717e7?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/26063ba6-7933-4afb-807a-2bda5efffdf1?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:25:22 GMT + - Tue, 12 Oct 2021 06:30:37 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/a90ee979-b9d8-421d-92b3-5d5ee2e717e7?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/26063ba6-7933-4afb-807a-2bda5efffdf1?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -1163,15 +1168,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/a90ee979-b9d8-421d-92b3-5d5ee2e717e7?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/26063ba6-7933-4afb-807a-2bda5efffdf1?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:25:22.8632843+00:00\",\r\n \"endTime\": - \"2021-09-02T03:25:22.9726213+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"a90ee979-b9d8-421d-92b3-5d5ee2e717e7\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:30:37.3502887+00:00\",\r\n \"endTime\": + \"2021-10-12T06:30:37.4752915+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"26063ba6-7933-4afb-807a-2bda5efffdf1\"\r\n}" headers: cache-control: - no-cache @@ -1180,7 +1185,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:25:52 GMT + - Tue, 12 Oct 2021 06:31:06 GMT expires: - '-1' pragma: @@ -1197,7 +1202,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49982,Microsoft.Compute/GetOperation30Min;399964 + - Microsoft.Compute/GetOperation3Min;49960,Microsoft.Compute/GetOperation30Min;399928 status: code: 200 message: OK @@ -1211,10 +1216,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/a90ee979-b9d8-421d-92b3-5d5ee2e717e7?monitor=true&api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/26063ba6-7933-4afb-807a-2bda5efffdf1?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 response: body: string: '' @@ -1224,7 +1229,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:25:52 GMT + - Tue, 12 Oct 2021 06:31:06 GMT expires: - '-1' pragma: @@ -1237,7 +1242,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49981,Microsoft.Compute/GetOperation30Min;399963 + - Microsoft.Compute/GetOperation3Min;49959,Microsoft.Compute/GetOperation30Min;399927 status: code: 200 message: OK @@ -1253,7 +1258,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/images/imagex66bb1115?api-version=2021-07-01 @@ -1264,17 +1269,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/579b9da3-8773-4eff-9c7e-ea6bc9157dd8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0a1da581-0e16-4f69-bbd6-8cd85fab23ab?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:25:52 GMT + - Tue, 12 Oct 2021 06:31:07 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/579b9da3-8773-4eff-9c7e-ea6bc9157dd8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0a1da581-0e16-4f69-bbd6-8cd85fab23ab?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1287,7 +1292,7 @@ interactions: x-ms-ratelimit-remaining-resource: - Microsoft.Compute/DeleteImages3Min;119,Microsoft.Compute/DeleteImages30Min;599 x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14999' status: code: 202 message: Accepted @@ -1301,15 +1306,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/579b9da3-8773-4eff-9c7e-ea6bc9157dd8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0a1da581-0e16-4f69-bbd6-8cd85fab23ab?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:25:53.1188887+00:00\",\r\n \"endTime\": - \"2021-09-02T03:25:58.1970878+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"579b9da3-8773-4eff-9c7e-ea6bc9157dd8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:31:07.9828872+00:00\",\r\n \"endTime\": + \"2021-10-12T06:31:13.0765927+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"0a1da581-0e16-4f69-bbd6-8cd85fab23ab\"\r\n}" headers: cache-control: - no-cache @@ -1318,7 +1323,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:26:22 GMT + - Tue, 12 Oct 2021 06:31:37 GMT expires: - '-1' pragma: @@ -1335,7 +1340,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29990 + - Microsoft.Compute/GetOperation3Min;14980,Microsoft.Compute/GetOperation30Min;29822 status: code: 200 message: OK @@ -1351,26 +1356,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotx66bb1115?api-version=2021-04-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/651384be-ee28-4c62-ae38-bbabea0cc793?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/b950d54b-a218-4e8e-9291-3268655aae22?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:26:22 GMT + - Tue, 12 Oct 2021 06:31:38 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/651384be-ee28-4c62-ae38-bbabea0cc793?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/b950d54b-a218-4e8e-9291-3268655aae22?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -1381,9 +1386,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteDisks3Min;2999,Microsoft.Compute/DeleteDisks30Min;23997 + - Microsoft.Compute/DeleteDisks3Min;2987,Microsoft.Compute/DeleteDisks30Min;23981 x-ms-ratelimit-remaining-subscription-deletes: - - '14997' + - '14998' status: code: 202 message: Accepted @@ -1397,15 +1402,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/651384be-ee28-4c62-ae38-bbabea0cc793?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/b950d54b-a218-4e8e-9291-3268655aae22?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:26:23.3635786+00:00\",\r\n \"endTime\": - \"2021-09-02T03:26:24.9573445+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"651384be-ee28-4c62-ae38-bbabea0cc793\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:31:38.4133069+00:00\",\r\n \"endTime\": + \"2021-10-12T06:31:38.5695509+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"b950d54b-a218-4e8e-9291-3268655aae22\"\r\n}" headers: cache-control: - no-cache @@ -1414,7 +1419,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:26:53 GMT + - Tue, 12 Oct 2021 06:32:08 GMT expires: - '-1' pragma: @@ -1431,7 +1436,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49987,Microsoft.Compute/GetOperation30Min;399959 + - Microsoft.Compute/GetOperation3Min;49969,Microsoft.Compute/GetOperation30Min;399923 status: code: 200 message: OK diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_galleries.test_compute_galleries.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_galleries.test_compute_galleries.yaml index 0b67616944bb..3589c3624cc9 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_galleries.test_compute_galleries.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_galleries.test_compute_galleries.yaml @@ -14,10 +14,10 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/diskname10bb14a9?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/diskname10bb14a9?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"diskname10bb14a9\",\r\n \"location\": \"eastus\",\r\n @@ -26,7 +26,7 @@ interactions: \"Updating\",\r\n \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4c07791d-deb2-4639-b60a-2bb8174002e8?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/37495199-65e0-481e-a1bf-797be790a449?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: @@ -34,11 +34,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:26:55 GMT + - Tue, 12 Oct 2021 06:32:11 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4c07791d-deb2-4639-b60a-2bb8174002e8?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/37495199-65e0-481e-a1bf-797be790a449?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -65,14 +65,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4c07791d-deb2-4639-b60a-2bb8174002e8?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/37495199-65e0-481e-a1bf-797be790a449?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:26:55.2699636+00:00\",\r\n \"endTime\": - \"2021-09-02T03:26:55.3637136+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:32:12.1945591+00:00\",\r\n \"endTime\": + \"2021-10-12T06:32:12.2727019+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"diskname10bb14a9\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/diskname10bb14a9\",\r\n \ \"type\": \"Microsoft.Compute/disks\",\r\n \"location\": \"eastus\",\r\n @@ -80,20 +80,21 @@ interactions: \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"encryption\": {\r\n \"type\": - \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"timeCreated\": \"2021-09-02T03:26:55.2855691+00:00\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"7a0a2f9c-27e5-4c8e-ac3f-1c7cbf14fc03\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}\r\n },\r\n \"name\": - \"4c07791d-deb2-4639-b60a-2bb8174002e8\"\r\n}" + \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"networkAccessPolicy\": + \"AllowAll\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": + \"2021-10-12T06:32:12.1945591+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": 214748364800,\r\n + \ \"uniqueId\": \"82bd28cf-c906-4777-b1cf-26eb47bc8d9e\"\r\n }\r\n}\r\n + \ },\r\n \"name\": \"37495199-65e0-481e-a1bf-797be790a449\"\r\n}" headers: cache-control: - no-cache content-length: - - '1114' + - '1153' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:26:57 GMT + - Tue, 12 Oct 2021 06:32:13 GMT expires: - '-1' pragma: @@ -110,7 +111,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49986,Microsoft.Compute/GetOperation30Min;399958 + - Microsoft.Compute/GetOperation3Min;49968,Microsoft.Compute/GetOperation30Min;399922 status: code: 200 message: OK @@ -124,10 +125,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/diskname10bb14a9?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/diskname10bb14a9?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"diskname10bb14a9\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/diskname10bb14a9\",\r\n @@ -136,19 +137,20 @@ interactions: \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Empty\"\r\n },\r\n \"diskSizeGB\": 200,\r\n \"diskIOPSReadWrite\": 500,\r\n \"diskMBpsReadWrite\": 60,\r\n \"encryption\": {\r\n \"type\": - \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"timeCreated\": \"2021-09-02T03:26:55.2855691+00:00\",\r\n - \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"7a0a2f9c-27e5-4c8e-ac3f-1c7cbf14fc03\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}" + \"EncryptionAtRestWithPlatformKey\"\r\n },\r\n \"networkAccessPolicy\": + \"AllowAll\",\r\n \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": + \"2021-10-12T06:32:12.1945591+00:00\",\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"diskState\": \"Unattached\",\r\n \"diskSizeBytes\": 214748364800,\r\n + \ \"uniqueId\": \"82bd28cf-c906-4777-b1cf-26eb47bc8d9e\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '889' + - '928' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:26:57 GMT + - Tue, 12 Oct 2021 06:32:14 GMT expires: - '-1' pragma: @@ -165,7 +167,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14992,Microsoft.Compute/LowCostGet30Min;119969 + - Microsoft.Compute/LowCostGet3Min;14976,Microsoft.Compute/LowCostGet30Min;119866 status: code: 200 message: OK @@ -184,32 +186,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9?api-version=2021-04-01 response: body: string: "{\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceUri\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/diskname10bb14a9\",\r\n - \ \"sourceUniqueId\": \"7a0a2f9c-27e5-4c8e-ac3f-1c7cbf14fc03\"\r\n },\r\n - \ \"provisioningState\": \"Updating\",\r\n \"isArmResource\": true\r\n - \ }\r\n}" + \ \"sourceUniqueId\": \"82bd28cf-c906-4777-b1cf-26eb47bc8d9e\"\r\n },\r\n + \ \"publicNetworkAccess\": \"Enabled\",\r\n \"provisioningState\": \"Updating\",\r\n + \ \"isArmResource\": true\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/666dacfe-8955-4407-8de8-2a257a28f30c?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/ccd23289-98f4-4e2b-9a58-6adce0b9674f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - - '466' + - '505' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:26:57 GMT + - Tue, 12 Oct 2021 06:32:14 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/666dacfe-8955-4407-8de8-2a257a28f30c?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/ccd23289-98f4-4e2b-9a58-6adce0b9674f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -236,36 +238,36 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/666dacfe-8955-4407-8de8-2a257a28f30c?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/ccd23289-98f4-4e2b-9a58-6adce0b9674f?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:26:57.5668356+00:00\",\r\n \"endTime\": - \"2021-09-02T03:26:58.3949726+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:32:15.2258251+00:00\",\r\n \"endTime\": + \"2021-10-12T06:32:15.9914256+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\r\n \"name\": \"snapshotname10bb14a9\",\r\n \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9\",\r\n \ \"type\": \"Microsoft.Compute/snapshots\",\r\n \"location\": \"eastus\",\r\n \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/diskname10bb14a9\",\r\n - \ \"sourceUniqueId\": \"7a0a2f9c-27e5-4c8e-ac3f-1c7cbf14fc03\"\r\n },\r\n + \ \"sourceUniqueId\": \"82bd28cf-c906-4777-b1cf-26eb47bc8d9e\"\r\n },\r\n \ \"diskSizeGB\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n - \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2021-09-02T03:26:57.5668356+00:00\",\r\n + \ },\r\n \"incremental\": false,\r\n \"networkAccessPolicy\": \"AllowAll\",\r\n + \ \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": \"2021-10-12T06:32:15.2414272+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"fce3e0f5-b6d7-453c-89bc-3a2edbae5230\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}\r\n },\r\n \"name\": - \"666dacfe-8955-4407-8de8-2a257a28f30c\"\r\n}" + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"511e7134-808f-4a32-a250-40413ccda128\"\r\n + \ }\r\n}\r\n },\r\n \"name\": \"ccd23289-98f4-4e2b-9a58-6adce0b9674f\"\r\n}" headers: cache-control: - no-cache content-length: - - '1389' + - '1428' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:26:59 GMT + - Tue, 12 Oct 2021 06:32:16 GMT expires: - '-1' pragma: @@ -282,7 +284,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49985,Microsoft.Compute/GetOperation30Min;399957 + - Microsoft.Compute/GetOperation3Min;49967,Microsoft.Compute/GetOperation30Min;399921 status: code: 200 message: OK @@ -296,10 +298,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9?api-version=2021-04-01 response: body: string: "{\r\n \"name\": \"snapshotname10bb14a9\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9\",\r\n @@ -307,21 +309,22 @@ interactions: \ \"sku\": {\r\n \"name\": \"Standard_LRS\",\r\n \"tier\": \"Standard\"\r\n \ },\r\n \"properties\": {\r\n \"creationData\": {\r\n \"createOption\": \"Copy\",\r\n \"sourceResourceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/diskname10bb14a9\",\r\n - \ \"sourceUniqueId\": \"7a0a2f9c-27e5-4c8e-ac3f-1c7cbf14fc03\"\r\n },\r\n + \ \"sourceUniqueId\": \"82bd28cf-c906-4777-b1cf-26eb47bc8d9e\"\r\n },\r\n \ \"diskSizeGB\": 200,\r\n \"encryption\": {\r\n \"type\": \"EncryptionAtRestWithPlatformKey\"\r\n - \ },\r\n \"incremental\": false,\r\n \"timeCreated\": \"2021-09-02T03:26:57.5668356+00:00\",\r\n + \ },\r\n \"incremental\": false,\r\n \"networkAccessPolicy\": \"AllowAll\",\r\n + \ \"publicNetworkAccess\": \"Enabled\",\r\n \"timeCreated\": \"2021-10-12T06:32:15.2414272+00:00\",\r\n \ \"provisioningState\": \"Succeeded\",\r\n \"diskState\": \"Unattached\",\r\n - \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"fce3e0f5-b6d7-453c-89bc-3a2edbae5230\",\r\n - \ \"networkAccessPolicy\": \"AllowAll\"\r\n }\r\n}" + \ \"diskSizeBytes\": 214748364800,\r\n \"uniqueId\": \"511e7134-808f-4a32-a250-40413ccda128\"\r\n + \ }\r\n}" headers: cache-control: - no-cache content-length: - - '1164' + - '1203' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:26:59 GMT + - Tue, 12 Oct 2021 06:32:17 GMT expires: - '-1' pragma: @@ -338,7 +341,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;14991,Microsoft.Compute/LowCostGet30Min;119968 + - Microsoft.Compute/LowCostGet3Min;14975,Microsoft.Compute/LowCostGet30Min;119865 status: code: 200 message: OK @@ -357,7 +360,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9?api-version=2021-07-01 @@ -371,7 +374,7 @@ interactions: {\r\n \"isSoftDeleteEnabled\": false\r\n }\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/c28aae9e-a0e0-433e-b89a-c22e6195d56b?api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/bba0ddef-20cc-4e14-a598-7a43e4f61b77?api-version=2021-07-01 cache-control: - no-cache content-length: @@ -379,7 +382,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:26:59 GMT + - Tue, 12 Oct 2021 06:32:18 GMT expires: - '-1' pragma: @@ -408,15 +411,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/c28aae9e-a0e0-433e-b89a-c22e6195d56b?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/bba0ddef-20cc-4e14-a598-7a43e4f61b77?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:26:59.9287698+00:00\",\r\n \"endTime\": - \"2021-09-02T03:27:00.3037645+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"c28aae9e-a0e0-433e-b89a-c22e6195d56b\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:32:18.4276358+00:00\",\r\n \"endTime\": + \"2021-10-12T06:32:19.0213799+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"bba0ddef-20cc-4e14-a598-7a43e4f61b77\"\r\n}" headers: cache-control: - no-cache @@ -425,7 +428,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:27:29 GMT + - Tue, 12 Oct 2021 06:32:48 GMT expires: - '-1' pragma: @@ -456,7 +459,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9?api-version=2021-07-01 @@ -476,7 +479,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:27:29 GMT + - Tue, 12 Oct 2021 06:32:48 GMT expires: - '-1' pragma: @@ -513,7 +516,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/applications/applicationname10bb14a9?api-version=2021-07-01 @@ -532,7 +535,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:27:30 GMT + - Tue, 12 Oct 2021 06:32:48 GMT expires: - '-1' pragma: @@ -561,7 +564,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/applications/applicationname10bb14a9?api-version=2021-07-01 @@ -580,7 +583,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:27:59 GMT + - Tue, 12 Oct 2021 06:33:19 GMT expires: - '-1' pragma: @@ -617,7 +620,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9?api-version=2021-07-01 @@ -632,7 +635,7 @@ interactions: \"Creating\"\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/7923e2fa-b1f6-4fe1-a4c9-ba6a3acca821?api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ef6ebab7-3f9b-489e-8508-0ff9dda7687f?api-version=2021-07-01 cache-control: - no-cache content-length: @@ -640,7 +643,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:28:00 GMT + - Tue, 12 Oct 2021 06:33:20 GMT expires: - '-1' pragma: @@ -669,15 +672,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/7923e2fa-b1f6-4fe1-a4c9-ba6a3acca821?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ef6ebab7-3f9b-489e-8508-0ff9dda7687f?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:00.6319139+00:00\",\r\n \"endTime\": - \"2021-09-02T03:28:00.7725317+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"7923e2fa-b1f6-4fe1-a4c9-ba6a3acca821\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:20.6135361+00:00\",\r\n \"endTime\": + \"2021-10-12T06:33:20.7697645+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"ef6ebab7-3f9b-489e-8508-0ff9dda7687f\"\r\n}" headers: cache-control: - no-cache @@ -686,7 +689,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:28:30 GMT + - Tue, 12 Oct 2021 06:33:50 GMT expires: - '-1' pragma: @@ -717,7 +720,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9?api-version=2021-07-01 @@ -738,7 +741,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:28:30 GMT + - Tue, 12 Oct 2021 06:33:50 GMT expires: - '-1' pragma: @@ -776,7 +779,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9/versions/1.0.0?api-version=2021-07-01 @@ -788,7 +791,7 @@ interactions: [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 2,\r\n \"storageAccountType\": \"Standard_ZRS\"\r\n }\r\n \ ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n - \ \"publishedDate\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"storageAccountType\": + \ \"publishedDate\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": {\r\n \"osDiskImage\": {\r\n \"hostCaching\": \"ReadOnly\",\r\n \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9\"\r\n @@ -796,7 +799,7 @@ interactions: \ }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 cache-control: - no-cache content-length: @@ -804,7 +807,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:28:30 GMT + - Tue, 12 Oct 2021 06:33:51 GMT expires: - '-1' pragma: @@ -833,14 +836,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -849,7 +852,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:29:31 GMT + - Tue, 12 Oct 2021 06:34:52 GMT expires: - '-1' pragma: @@ -866,7 +869,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1194,Microsoft.Compute/GetOperationStatus30Min;4194 + - Microsoft.Compute/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4195 status: code: 200 message: OK @@ -880,14 +883,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -896,7 +899,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:30:31 GMT + - Tue, 12 Oct 2021 06:35:52 GMT expires: - '-1' pragma: @@ -927,14 +930,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -943,7 +946,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:31:30 GMT + - Tue, 12 Oct 2021 06:36:53 GMT expires: - '-1' pragma: @@ -974,14 +977,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -990,7 +993,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:32:31 GMT + - Tue, 12 Oct 2021 06:37:53 GMT expires: - '-1' pragma: @@ -1021,14 +1024,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -1037,7 +1040,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:33:31 GMT + - Tue, 12 Oct 2021 06:38:53 GMT expires: - '-1' pragma: @@ -1068,14 +1071,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -1084,7 +1087,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:34:31 GMT + - Tue, 12 Oct 2021 06:39:54 GMT expires: - '-1' pragma: @@ -1115,14 +1118,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -1131,7 +1134,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:35:31 GMT + - Tue, 12 Oct 2021 06:40:54 GMT expires: - '-1' pragma: @@ -1162,14 +1165,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -1178,7 +1181,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:36:31 GMT + - Tue, 12 Oct 2021 06:41:54 GMT expires: - '-1' pragma: @@ -1209,14 +1212,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -1225,7 +1228,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:37:31 GMT + - Tue, 12 Oct 2021 06:42:54 GMT expires: - '-1' pragma: @@ -1256,14 +1259,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -1272,7 +1275,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:38:32 GMT + - Tue, 12 Oct 2021 06:43:55 GMT expires: - '-1' pragma: @@ -1303,14 +1306,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -1319,7 +1322,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:39:31 GMT + - Tue, 12 Oct 2021 06:44:55 GMT expires: - '-1' pragma: @@ -1336,7 +1339,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4175 + - Microsoft.Compute/GetOperationStatus3Min;1194,Microsoft.Compute/GetOperationStatus30Min;4175 status: code: 200 message: OK @@ -1350,15 +1353,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9c59a3c6-9871-4bbe-b6d1-110bd86d83a8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/ceff4640-315e-4b03-87b1-e8934847cd0e?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"endTime\": - \"2021-09-02T03:39:47.1350907+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"9c59a3c6-9871-4bbe-b6d1-110bd86d83a8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"endTime\": + \"2021-10-12T06:45:08.0860685+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"ceff4640-315e-4b03-87b1-e8934847cd0e\"\r\n}" headers: cache-control: - no-cache @@ -1367,7 +1370,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:40:32 GMT + - Tue, 12 Oct 2021 06:45:56 GMT expires: - '-1' pragma: @@ -1384,7 +1387,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4173 + - Microsoft.Compute/GetOperationStatus3Min;1194,Microsoft.Compute/GetOperationStatus30Min;4173 status: code: 200 message: OK @@ -1398,7 +1401,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9/versions/1.0.0?api-version=2021-07-01 @@ -1410,7 +1413,7 @@ interactions: [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 2,\r\n \"storageAccountType\": \"Standard_ZRS\"\r\n }\r\n \ ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n - \ \"publishedDate\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"storageAccountType\": + \ \"publishedDate\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": {\r\n \"osDiskImage\": {\r\n \"sizeInGB\": 200,\r\n \"hostCaching\": \"ReadOnly\",\r\n \ \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9\"\r\n @@ -1424,7 +1427,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:40:32 GMT + - Tue, 12 Oct 2021 06:45:56 GMT expires: - '-1' pragma: @@ -1441,7 +1444,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetGalleryImageVersion3Min;1997,Microsoft.Compute/GetGalleryImageVersion30Min;9995 + - Microsoft.Compute/GetGalleryImageVersion3Min;1999,Microsoft.Compute/GetGalleryImageVersion30Min;9997 status: code: 200 message: OK @@ -1455,7 +1458,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9/versions/1.0.0?api-version=2021-07-01 @@ -1467,7 +1470,7 @@ interactions: [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 2,\r\n \"storageAccountType\": \"Standard_ZRS\"\r\n }\r\n \ ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n - \ \"publishedDate\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"storageAccountType\": + \ \"publishedDate\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": {\r\n \"osDiskImage\": {\r\n \"sizeInGB\": 200,\r\n \"hostCaching\": \"ReadOnly\",\r\n \ \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9\"\r\n @@ -1481,7 +1484,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:40:32 GMT + - Tue, 12 Oct 2021 06:45:56 GMT expires: - '-1' pragma: @@ -1498,7 +1501,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetGalleryImageVersion3Min;1996,Microsoft.Compute/GetGalleryImageVersion30Min;9994 + - Microsoft.Compute/GetGalleryImageVersion3Min;1998,Microsoft.Compute/GetGalleryImageVersion30Min;9996 status: code: 200 message: OK @@ -1512,7 +1515,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9?api-version=2021-07-01 @@ -1533,7 +1536,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:40:32 GMT + - Tue, 12 Oct 2021 06:45:56 GMT expires: - '-1' pragma: @@ -1550,7 +1553,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetGalleryImage3Min;595,Microsoft.Compute/GetGalleryImage30Min;2989 + - Microsoft.Compute/GetGalleryImage3Min;594,Microsoft.Compute/GetGalleryImage30Min;2989 status: code: 200 message: OK @@ -1564,7 +1567,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/applications/applicationname10bb14a9?api-version=2021-07-01 @@ -1583,7 +1586,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:40:32 GMT + - Tue, 12 Oct 2021 06:45:56 GMT expires: - '-1' pragma: @@ -1614,7 +1617,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9?api-version=2021-07-01 @@ -1634,7 +1637,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:40:32 GMT + - Tue, 12 Oct 2021 06:45:56 GMT expires: - '-1' pragma: @@ -1671,7 +1674,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9/versions/1.0.0?api-version=2021-07-01 @@ -1683,7 +1686,7 @@ interactions: [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 2,\r\n \"storageAccountType\": \"Standard_ZRS\"\r\n }\r\n \ ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n - \ \"publishedDate\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"storageAccountType\": + \ \"publishedDate\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": {\r\n \"osDiskImage\": {\r\n \"sizeInGB\": 200,\r\n \"hostCaching\": \"ReadOnly\",\r\n \ \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9\"\r\n @@ -1691,7 +1694,7 @@ interactions: \ }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9d9d49e3-c7af-4c26-a050-f798c633b529?api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/6abf3942-8b28-4118-86cb-7aa08b8e5c60?api-version=2021-07-01 cache-control: - no-cache content-length: @@ -1699,7 +1702,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:40:33 GMT + - Tue, 12 Oct 2021 06:45:57 GMT expires: - '-1' pragma: @@ -1732,14 +1735,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9d9d49e3-c7af-4c26-a050-f798c633b529?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/6abf3942-8b28-4118-86cb-7aa08b8e5c60?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:40:33.1196828+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9d9d49e3-c7af-4c26-a050-f798c633b529\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:45:57.3362933+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"6abf3942-8b28-4118-86cb-7aa08b8e5c60\"\r\n}" headers: cache-control: - no-cache @@ -1748,7 +1751,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:41:32 GMT + - Tue, 12 Oct 2021 06:46:57 GMT expires: - '-1' pragma: @@ -1765,7 +1768,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4172 + - Microsoft.Compute/GetOperationStatus3Min;1194,Microsoft.Compute/GetOperationStatus30Min;4171 status: code: 200 message: OK @@ -1779,14 +1782,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9d9d49e3-c7af-4c26-a050-f798c633b529?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/6abf3942-8b28-4118-86cb-7aa08b8e5c60?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:40:33.1196828+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"9d9d49e3-c7af-4c26-a050-f798c633b529\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:45:57.3362933+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"6abf3942-8b28-4118-86cb-7aa08b8e5c60\"\r\n}" headers: cache-control: - no-cache @@ -1795,7 +1798,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:42:32 GMT + - Tue, 12 Oct 2021 06:47:58 GMT expires: - '-1' pragma: @@ -1812,7 +1815,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1197,Microsoft.Compute/GetOperationStatus30Min;4171 + - Microsoft.Compute/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4170 status: code: 200 message: OK @@ -1826,15 +1829,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/9d9d49e3-c7af-4c26-a050-f798c633b529?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/6abf3942-8b28-4118-86cb-7aa08b8e5c60?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:40:33.1196828+00:00\",\r\n \"endTime\": - \"2021-09-02T03:43:03.3386688+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"9d9d49e3-c7af-4c26-a050-f798c633b529\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:45:57.3362933+00:00\",\r\n \"endTime\": + \"2021-10-12T06:48:27.5088794+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"6abf3942-8b28-4118-86cb-7aa08b8e5c60\"\r\n}" headers: cache-control: - no-cache @@ -1843,7 +1846,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:43:33 GMT + - Tue, 12 Oct 2021 06:48:58 GMT expires: - '-1' pragma: @@ -1860,7 +1863,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1197,Microsoft.Compute/GetOperationStatus30Min;4170 + - Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4169 status: code: 200 message: OK @@ -1874,7 +1877,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9/versions/1.0.0?api-version=2021-07-01 @@ -1886,7 +1889,7 @@ interactions: [\r\n {\r\n \"name\": \"East US\",\r\n \"regionalReplicaCount\": 2,\r\n \"storageAccountType\": \"Standard_ZRS\"\r\n }\r\n \ ],\r\n \"replicaCount\": 1,\r\n \"excludeFromLatest\": false,\r\n - \ \"publishedDate\": \"2021-09-02T03:28:31.0693976+00:00\",\r\n \"storageAccountType\": + \ \"publishedDate\": \"2021-10-12T06:33:52.0352727+00:00\",\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \"storageProfile\": {\r\n \"osDiskImage\": {\r\n \"sizeInGB\": 200,\r\n \"hostCaching\": \"ReadOnly\",\r\n \ \"source\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9\"\r\n @@ -1900,7 +1903,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:43:33 GMT + - Tue, 12 Oct 2021 06:48:58 GMT expires: - '-1' pragma: @@ -1917,7 +1920,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetGalleryImageVersion3Min;1999,Microsoft.Compute/GetGalleryImageVersion30Min;9992 + - Microsoft.Compute/GetGalleryImageVersion3Min;1997,Microsoft.Compute/GetGalleryImageVersion30Min;9992 status: code: 200 message: OK @@ -1936,7 +1939,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9?api-version=2021-07-01 @@ -1951,7 +1954,7 @@ interactions: \"Updating\"\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/cd29d405-134e-4d92-b01e-da37c8f296f8?api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/99db2786-6918-4bd7-b3c8-7e4168725b4c?api-version=2021-07-01 cache-control: - no-cache content-length: @@ -1959,7 +1962,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:43:33 GMT + - Tue, 12 Oct 2021 06:48:58 GMT expires: - '-1' pragma: @@ -1992,15 +1995,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/cd29d405-134e-4d92-b01e-da37c8f296f8?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/99db2786-6918-4bd7-b3c8-7e4168725b4c?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:43:33.7136382+00:00\",\r\n \"endTime\": - \"2021-09-02T03:43:33.7605399+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"cd29d405-134e-4d92-b01e-da37c8f296f8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:48:58.8215537+00:00\",\r\n \"endTime\": + \"2021-10-12T06:48:58.8527786+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"99db2786-6918-4bd7-b3c8-7e4168725b4c\"\r\n}" headers: cache-control: - no-cache @@ -2009,7 +2012,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:44:03 GMT + - Tue, 12 Oct 2021 06:49:28 GMT expires: - '-1' pragma: @@ -2026,7 +2029,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4169 + - Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4168 status: code: 200 message: OK @@ -2040,7 +2043,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9?api-version=2021-07-01 @@ -2061,7 +2064,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:44:03 GMT + - Tue, 12 Oct 2021 06:49:28 GMT expires: - '-1' pragma: @@ -2098,7 +2101,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/applications/applicationname10bb14a9?api-version=2021-07-01 @@ -2118,7 +2121,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:44:03 GMT + - Tue, 12 Oct 2021 06:49:28 GMT expires: - '-1' pragma: @@ -2155,7 +2158,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9?api-version=2021-07-01 @@ -2169,7 +2172,7 @@ interactions: {\r\n \"isSoftDeleteEnabled\": false\r\n }\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/2d3bf706-75f1-4c3d-9973-c0923411c8d9?api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/e52296d4-b0e9-40fa-8845-c7093481d5c7?api-version=2021-07-01 cache-control: - no-cache content-length: @@ -2177,7 +2180,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:44:03 GMT + - Tue, 12 Oct 2021 06:49:28 GMT expires: - '-1' pragma: @@ -2210,15 +2213,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/2d3bf706-75f1-4c3d-9973-c0923411c8d9?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/e52296d4-b0e9-40fa-8845-c7093481d5c7?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:44:03.9792782+00:00\",\r\n \"endTime\": - \"2021-09-02T03:44:04.0261384+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"2d3bf706-75f1-4c3d-9973-c0923411c8d9\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:49:29.4778095+00:00\",\r\n \"endTime\": + \"2021-10-12T06:49:29.5246889+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"e52296d4-b0e9-40fa-8845-c7093481d5c7\"\r\n}" headers: cache-control: - no-cache @@ -2227,7 +2230,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:44:33 GMT + - Tue, 12 Oct 2021 06:49:59 GMT expires: - '-1' pragma: @@ -2244,7 +2247,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4168 + - Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4167 status: code: 200 message: OK @@ -2258,7 +2261,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9?api-version=2021-07-01 @@ -2278,7 +2281,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:44:33 GMT + - Tue, 12 Oct 2021 06:49:59 GMT expires: - '-1' pragma: @@ -2311,7 +2314,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9/versions/1.0.0?api-version=2021-07-01 @@ -2320,17 +2323,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/5940334a-f574-483b-bb4d-c951359ef3ae?api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/2ceb39ec-7d8f-42d8-a2b8-9e2e415127e2?api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:44:33 GMT + - Tue, 12 Oct 2021 06:50:00 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/5940334a-f574-483b-bb4d-c951359ef3ae?monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/2ceb39ec-7d8f-42d8-a2b8-9e2e415127e2?monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2357,14 +2360,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/5940334a-f574-483b-bb4d-c951359ef3ae?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/2ceb39ec-7d8f-42d8-a2b8-9e2e415127e2?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:44:34.2292809+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5940334a-f574-483b-bb4d-c951359ef3ae\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:50:00.3684688+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"2ceb39ec-7d8f-42d8-a2b8-9e2e415127e2\"\r\n}" headers: cache-control: - no-cache @@ -2373,7 +2376,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:45:33 GMT + - Tue, 12 Oct 2021 06:51:00 GMT expires: - '-1' pragma: @@ -2390,7 +2393,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4166 + - Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4166 status: code: 200 message: OK @@ -2404,15 +2407,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/5940334a-f574-483b-bb4d-c951359ef3ae?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/2ceb39ec-7d8f-42d8-a2b8-9e2e415127e2?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:44:34.2292809+00:00\",\r\n \"endTime\": - \"2021-09-02T03:46:04.4011651+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"5940334a-f574-483b-bb4d-c951359ef3ae\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:50:00.3684688+00:00\",\r\n \"endTime\": + \"2021-10-12T06:51:30.5404286+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"2ceb39ec-7d8f-42d8-a2b8-9e2e415127e2\"\r\n}" headers: cache-control: - no-cache @@ -2421,7 +2424,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:46:34 GMT + - Tue, 12 Oct 2021 06:52:00 GMT expires: - '-1' pragma: @@ -2438,7 +2441,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1195,Microsoft.Compute/GetOperationStatus30Min;4165 + - Microsoft.Compute/GetOperationStatus3Min;1196,Microsoft.Compute/GetOperationStatus30Min;4164 status: code: 200 message: OK @@ -2454,7 +2457,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/applications/applicationname10bb14a9?api-version=2021-07-01 @@ -2467,7 +2470,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:46:34 GMT + - Tue, 12 Oct 2021 06:52:00 GMT expires: - '-1' pragma: @@ -2498,26 +2501,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9/endGetAccess?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9/endGetAccess?api-version=2021-04-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/78fbf63f-30e9-45eb-b3fb-bca397ab28fb?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4f74889f-14a4-43ae-8139-25cdd02fc9bd?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:46:34 GMT + - Tue, 12 Oct 2021 06:52:00 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/78fbf63f-30e9-45eb-b3fb-bca397ab28fb?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4f74889f-14a4-43ae-8139-25cdd02fc9bd?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -2544,15 +2547,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/78fbf63f-30e9-45eb-b3fb-bca397ab28fb?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4f74889f-14a4-43ae-8139-25cdd02fc9bd?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:46:34.6977901+00:00\",\r\n \"endTime\": - \"2021-09-02T03:46:34.8384163+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"78fbf63f-30e9-45eb-b3fb-bca397ab28fb\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:52:01.5005537+00:00\",\r\n \"endTime\": + \"2021-10-12T06:52:01.6411621+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"4f74889f-14a4-43ae-8139-25cdd02fc9bd\"\r\n}" headers: cache-control: - no-cache @@ -2561,7 +2564,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:47:04 GMT + - Tue, 12 Oct 2021 06:52:31 GMT expires: - '-1' pragma: @@ -2578,7 +2581,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49996,Microsoft.Compute/GetOperation30Min;399924 + - Microsoft.Compute/GetOperation3Min;49996,Microsoft.Compute/GetOperation30Min;399871 status: code: 200 message: OK @@ -2592,10 +2595,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/78fbf63f-30e9-45eb-b3fb-bca397ab28fb?monitor=true&api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4f74889f-14a4-43ae-8139-25cdd02fc9bd?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 response: body: string: '' @@ -2605,7 +2608,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:47:04 GMT + - Tue, 12 Oct 2021 06:52:31 GMT expires: - '-1' pragma: @@ -2618,7 +2621,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49995,Microsoft.Compute/GetOperation30Min;399923 + - Microsoft.Compute/GetOperation3Min;49995,Microsoft.Compute/GetOperation30Min;399870 status: code: 200 message: OK @@ -2634,26 +2637,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/snapshots/snapshotname10bb14a9?api-version=2021-04-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/be6ac034-435a-499b-be94-96c2a0f7ae00?api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4ba0ce19-ddae-4e40-bd09-9e1308d71373?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:47:04 GMT + - Tue, 12 Oct 2021 06:52:31 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/be6ac034-435a-499b-be94-96c2a0f7ae00?monitor=true&api-version=2020-12-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4ba0ce19-ddae-4e40-bd09-9e1308d71373?p=36ee1309-094c-4cec-b989-37cf5e794c1b&monitor=true&api-version=2021-04-01 pragma: - no-cache server: @@ -2664,7 +2667,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteDisks3Min;2996,Microsoft.Compute/DeleteDisks30Min;23989 + - Microsoft.Compute/DeleteDisks3Min;2996,Microsoft.Compute/DeleteDisks30Min;23964 x-ms-ratelimit-remaining-subscription-deletes: - '14994' status: @@ -2680,15 +2683,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/be6ac034-435a-499b-be94-96c2a0f7ae00?api-version=2020-12-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/DiskOperations/4ba0ce19-ddae-4e40-bd09-9e1308d71373?p=36ee1309-094c-4cec-b989-37cf5e794c1b&api-version=2021-04-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:47:04.9797795+00:00\",\r\n \"endTime\": - \"2021-09-02T03:47:05.5891143+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"be6ac034-435a-499b-be94-96c2a0f7ae00\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:52:32.1100623+00:00\",\r\n \"endTime\": + \"2021-10-12T06:52:32.3288017+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"4ba0ce19-ddae-4e40-bd09-9e1308d71373\"\r\n}" headers: cache-control: - no-cache @@ -2697,7 +2700,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:47:34 GMT + - Tue, 12 Oct 2021 06:53:01 GMT expires: - '-1' pragma: @@ -2714,7 +2717,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;49993,Microsoft.Compute/GetOperation30Min;399921 + - Microsoft.Compute/GetOperation3Min;49993,Microsoft.Compute/GetOperation30Min;399868 status: code: 200 message: OK @@ -2730,7 +2733,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9/images/imagex10bb14a9?api-version=2021-07-01 @@ -2739,17 +2742,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/22c75135-6078-4176-8e08-05b764cf8151?api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/01a4a2f4-7ad0-401c-a0cb-de1fbfddd984?api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:47:34 GMT + - Tue, 12 Oct 2021 06:53:02 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/22c75135-6078-4176-8e08-05b764cf8151?monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/01a4a2f4-7ad0-401c-a0cb-de1fbfddd984?monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2776,24 +2779,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/22c75135-6078-4176-8e08-05b764cf8151?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/01a4a2f4-7ad0-401c-a0cb-de1fbfddd984?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:47:35.2296362+00:00\",\r\n \"endTime\": - \"2021-09-02T03:47:35.479609+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"22c75135-6078-4176-8e08-05b764cf8151\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:53:03.0873238+00:00\",\r\n \"endTime\": + \"2021-10-12T06:53:03.3841996+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"01a4a2f4-7ad0-401c-a0cb-de1fbfddd984\"\r\n}" headers: cache-control: - no-cache content-length: - - '183' + - '184' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:48:04 GMT + - Tue, 12 Oct 2021 06:53:33 GMT expires: - '-1' pragma: @@ -2810,7 +2813,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1194,Microsoft.Compute/GetOperationStatus30Min;4162 + - Microsoft.Compute/GetOperationStatus3Min;1194,Microsoft.Compute/GetOperationStatus30Min;4161 status: code: 200 message: OK @@ -2826,7 +2829,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/galleries/galleryname10bb14a9?api-version=2021-07-01 @@ -2835,17 +2838,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/2f773e18-cf0f-4a08-b610-3d59f07e812f?api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/c9659b6e-1b23-4805-8291-a85b90a3c976?api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:48:05 GMT + - Tue, 12 Oct 2021 06:53:34 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/2f773e18-cf0f-4a08-b610-3d59f07e812f?monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/c9659b6e-1b23-4805-8291-a85b90a3c976?monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2872,15 +2875,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/2f773e18-cf0f-4a08-b610-3d59f07e812f?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/capsOperations/c9659b6e-1b23-4805-8291-a85b90a3c976?api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:48:05.4328844+00:00\",\r\n \"endTime\": - \"2021-09-02T03:48:05.5579269+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"2f773e18-cf0f-4a08-b610-3d59f07e812f\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:53:33.9779607+00:00\",\r\n \"endTime\": + \"2021-10-12T06:53:34.0873131+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"c9659b6e-1b23-4805-8291-a85b90a3c976\"\r\n}" headers: cache-control: - no-cache @@ -2889,7 +2892,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:48:35 GMT + - Tue, 12 Oct 2021 06:54:03 GMT expires: - '-1' pragma: @@ -2906,7 +2909,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperationStatus3Min;1194,Microsoft.Compute/GetOperationStatus30Min;4160 + - Microsoft.Compute/GetOperationStatus3Min;1194,Microsoft.Compute/GetOperationStatus30Min;4159 status: code: 200 message: OK diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm.yaml index 85e57a7d1bb4..d30c346c6d51 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm.yaml @@ -14,17 +14,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"networknamex15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff\",\r\n - \ \"etag\": \"W/\\\"68e5421e-7698-4533-94eb-98b21e7f8851\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"0dda6935-e3cf-4611-9930-009deab7881a\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": - \"99b6723a-044f-42ed-9dd7-618ee54de009\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"21f5ec39-5eed-4b7e-89d7-d24261f3ea14\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n \ }\r\n}" @@ -32,7 +32,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/06699a79-86ba-433e-9785-264f3414870d?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c73808f0-da06-47b5-9e0b-ea41a7334c12?api-version=2021-03-01 cache-control: - no-cache content-length: @@ -40,7 +40,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:48:38 GMT + - Tue, 12 Oct 2021 06:54:11 GMT expires: - '-1' pragma: @@ -53,7 +53,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 56e5e866-b25d-48be-8bf4-3a7bda54d491 + - a7c687ad-171f-4563-a02b-031c0c299968 x-ms-ratelimit-remaining-subscription-writes: - '1193' status: @@ -69,10 +69,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/06699a79-86ba-433e-9785-264f3414870d?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c73808f0-da06-47b5-9e0b-ea41a7334c12?api-version=2021-03-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -84,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:48:41 GMT + - Tue, 12 Oct 2021 06:54:14 GMT expires: - '-1' pragma: @@ -101,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a93cf494-5fd8-4b4d-8cab-7ca487a6c32b + - bd858fab-9f64-45f4-9e9f-12976b0060ea status: code: 200 message: OK @@ -115,17 +115,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"networknamex15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff\",\r\n - \ \"etag\": \"W/\\\"2a0608a5-319f-40e7-8394-eb681d9d432c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"a8a3cd2b-1a48-4263-911b-687216d655f1\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": - \"99b6723a-044f-42ed-9dd7-618ee54de009\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"21f5ec39-5eed-4b7e-89d7-d24261f3ea14\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n \ }\r\n}" @@ -137,9 +137,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:48:41 GMT + - Tue, 12 Oct 2021 06:54:14 GMT etag: - - W/"2a0608a5-319f-40e7-8394-eb681d9d432c" + - W/"a8a3cd2b-1a48-4263-911b-687216d655f1" expires: - '-1' pragma: @@ -156,7 +156,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e095b2bf-5ef6-4e31-a2cb-a2f1141cab87 + - e4fc58ca-6dd4-4ff4-b1eb-213566fc951a status: code: 200 message: OK @@ -174,21 +174,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff/subnets/subnetx15cf0eff?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff/subnets/subnetx15cf0eff?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"subnetx15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff/subnets/subnetx15cf0eff\",\r\n - \ \"etag\": \"W/\\\"f29f4fce-4547-49a0-b94f-c89211951b8e\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"1ebafd42-d663-4ea9-a53d-56314955be2e\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2af310a7-4346-4443-a4dc-b1226afbf166?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/10ffea68-e980-4914-91e7-9754309298e0?api-version=2021-03-01 cache-control: - no-cache content-length: @@ -196,7 +196,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:48:41 GMT + - Tue, 12 Oct 2021 06:54:14 GMT expires: - '-1' pragma: @@ -209,7 +209,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b097eb1c-c9d5-41d9-89ed-90f4cc1b3bef + - 6b303fff-ad0c-4176-8b6f-3d02adf4744a x-ms-ratelimit-remaining-subscription-writes: - '1192' status: @@ -225,10 +225,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2af310a7-4346-4443-a4dc-b1226afbf166?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/10ffea68-e980-4914-91e7-9754309298e0?api-version=2021-03-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -240,7 +240,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:48:44 GMT + - Tue, 12 Oct 2021 06:54:18 GMT expires: - '-1' pragma: @@ -257,7 +257,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e6144538-587e-42d7-bd0e-4311b01b45ac + - eecea12f-9c8b-4820-95d4-5318277d8695 status: code: 200 message: OK @@ -271,14 +271,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff/subnets/subnetx15cf0eff?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff/subnets/subnetx15cf0eff?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"subnetx15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex15cf0eff/subnets/subnetx15cf0eff\",\r\n - \ \"etag\": \"W/\\\"adeaf429-7d8c-464a-9c67-f7e5581eade7\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"cdabdfdf-cca9-4c61-899b-662fad7147c6\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": @@ -291,9 +291,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:48:44 GMT + - Tue, 12 Oct 2021 06:54:18 GMT etag: - - W/"adeaf429-7d8c-464a-9c67-f7e5581eade7" + - W/"cdabdfdf-cca9-4c61-899b-662fad7147c6" expires: - '-1' pragma: @@ -310,7 +310,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a6287d74-a469-4b39-88ab-b6991199ac5b + - 131bc981-d6b5-4749-83ae-c7aadb8061f1 status: code: 200 message: OK @@ -329,18 +329,18 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacex15cf0eff?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacex15cf0eff?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"interfacex15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacex15cf0eff\",\r\n - \ \"etag\": \"W/\\\"0625039f-9bec-403a-b912-1d5a6897d5c4\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"b446471a-54dd-468d-a300-8361f78185f4\\\"\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"8785a24e-d00c-400d-ac83-343367b85a94\",\r\n \"ipConfigurations\": + \ \"resourceGuid\": \"22e36c6d-bf6d-4cbe-9b19-29aceb4bc9ef\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacex15cf0eff/ipConfigurations/MyIpConfig\",\r\n - \ \"etag\": \"W/\\\"0625039f-9bec-403a-b912-1d5a6897d5c4\\\"\",\r\n + \ \"etag\": \"W/\\\"b446471a-54dd-468d-a300-8361f78185f4\\\"\",\r\n \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": @@ -348,7 +348,7 @@ interactions: \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": - \"hjzlngkpatwufhoxmghoktpabb.bx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": + \"hhwpkipnlz5excox0jbgd25kce.bx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"vnetEncryptionSupported\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \ \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" @@ -356,7 +356,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/1653f402-087e-4383-99b8-a2346fa21109?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c883c5cc-bef2-4727-8393-0d2c06b5f9eb?api-version=2021-03-01 cache-control: - no-cache content-length: @@ -364,7 +364,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:48:44 GMT + - Tue, 12 Oct 2021 06:54:19 GMT expires: - '-1' pragma: @@ -377,7 +377,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 02262c11-586b-468f-9944-07b4ea7ccd03 + - a7985fae-9cae-4012-97f6-8f4ad2ee3d03 x-ms-ratelimit-remaining-subscription-writes: - '1191' status: @@ -393,10 +393,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/1653f402-087e-4383-99b8-a2346fa21109?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c883c5cc-bef2-4727-8393-0d2c06b5f9eb?api-version=2021-03-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -408,7 +408,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:49:14 GMT + - Tue, 12 Oct 2021 06:54:49 GMT expires: - '-1' pragma: @@ -425,7 +425,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3374b255-90a4-4808-81f9-abac1d31e43b + - 26c05351-90af-4354-ac5e-11f405a567a6 status: code: 200 message: OK @@ -439,18 +439,18 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacex15cf0eff?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacex15cf0eff?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"interfacex15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacex15cf0eff\",\r\n - \ \"etag\": \"W/\\\"0625039f-9bec-403a-b912-1d5a6897d5c4\\\"\",\r\n \"location\": + \ \"etag\": \"W/\\\"b446471a-54dd-468d-a300-8361f78185f4\\\"\",\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"8785a24e-d00c-400d-ac83-343367b85a94\",\r\n \"ipConfigurations\": + \ \"resourceGuid\": \"22e36c6d-bf6d-4cbe-9b19-29aceb4bc9ef\",\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacex15cf0eff/ipConfigurations/MyIpConfig\",\r\n - \ \"etag\": \"W/\\\"0625039f-9bec-403a-b912-1d5a6897d5c4\\\"\",\r\n + \ \"etag\": \"W/\\\"b446471a-54dd-468d-a300-8361f78185f4\\\"\",\r\n \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": @@ -458,7 +458,7 @@ interactions: \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": - \"hjzlngkpatwufhoxmghoktpabb.bx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": + \"hhwpkipnlz5excox0jbgd25kce.bx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"vnetEncryptionSupported\": false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n \ \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" @@ -470,9 +470,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:49:14 GMT + - Tue, 12 Oct 2021 06:54:49 GMT etag: - - W/"0625039f-9bec-403a-b912-1d5a6897d5c4" + - W/"b446471a-54dd-468d-a300-8361f78185f4" expires: - '-1' pragma: @@ -489,7 +489,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0874925f-87bf-48c1-aebe-536b2339715d + - 96f3eb0c-3a9f-4763-89f5-b7ea7c335c0e status: code: 200 message: OK @@ -516,7 +516,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff?api-version=2021-07-01 @@ -524,12 +524,12 @@ interactions: body: string: "{\r\n \"name\": \"virtualmachinex15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n - \ \"properties\": {\r\n \"vmId\": \"bc737ab2-dd03-4ec7-87f5-38e7675d78af\",\r\n + \ \"properties\": {\r\n \"vmId\": \"cb618dc1-c323-4478-acda-f534a5b3d94d\",\r\n \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n },\r\n \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"14393.4583.2108010852\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"14393.4651.2109130103\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"myVMosdisk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n @@ -555,7 +555,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5c1649f6-16e9-4412-8276-0f7866c61d80?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/00e74246-17a8-442b-85ad-d240923f799b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: @@ -563,7 +563,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:49:18 GMT + - Tue, 12 Oct 2021 06:54:55 GMT expires: - '-1' pragma: @@ -576,7 +576,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/PutVM3Min;745,Microsoft.Compute/PutVM30Min;3729 + - Microsoft.Compute/PutVM3Min;684,Microsoft.Compute/PutVM30Min;3417 x-ms-ratelimit-remaining-subscription-writes: - '1196' status: @@ -592,14 +592,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5c1649f6-16e9-4412-8276-0f7866c61d80?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/00e74246-17a8-442b-85ad-d240923f799b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:49:16.9448846+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5c1649f6-16e9-4412-8276-0f7866c61d80\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:54:52.3815033+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"00e74246-17a8-442b-85ad-d240923f799b\"\r\n}" headers: cache-control: - no-cache @@ -608,7 +608,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:49:29 GMT + - Tue, 12 Oct 2021 06:55:05 GMT expires: - '-1' pragma: @@ -625,7 +625,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29991 + - Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29912 status: code: 200 message: OK @@ -639,14 +639,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5c1649f6-16e9-4412-8276-0f7866c61d80?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/00e74246-17a8-442b-85ad-d240923f799b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:49:16.9448846+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5c1649f6-16e9-4412-8276-0f7866c61d80\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:54:52.3815033+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"00e74246-17a8-442b-85ad-d240923f799b\"\r\n}" headers: cache-control: - no-cache @@ -655,7 +655,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:50:18 GMT + - Tue, 12 Oct 2021 06:55:55 GMT expires: - '-1' pragma: @@ -672,7 +672,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29996 + - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29911 status: code: 200 message: OK @@ -686,15 +686,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5c1649f6-16e9-4412-8276-0f7866c61d80?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/00e74246-17a8-442b-85ad-d240923f799b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:49:16.9448846+00:00\",\r\n \"endTime\": - \"2021-09-02T03:50:29.1485723+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"5c1649f6-16e9-4412-8276-0f7866c61d80\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:54:52.3815033+00:00\",\r\n \"endTime\": + \"2021-10-12T06:56:06.9600706+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"00e74246-17a8-442b-85ad-d240923f799b\"\r\n}" headers: cache-control: - no-cache @@ -703,7 +703,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:50:48 GMT + - Tue, 12 Oct 2021 06:56:26 GMT expires: - '-1' pragma: @@ -720,7 +720,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29994 + - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29909 status: code: 200 message: OK @@ -734,7 +734,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff?api-version=2021-07-01 @@ -742,28 +742,28 @@ interactions: body: string: "{\r\n \"name\": \"virtualmachinex15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n - \ \"properties\": {\r\n \"vmId\": \"bc737ab2-dd03-4ec7-87f5-38e7675d78af\",\r\n + \ \"properties\": {\r\n \"vmId\": \"cb618dc1-c323-4478-acda-f534a5b3d94d\",\r\n \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n },\r\n \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"14393.4583.2108010852\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"14393.4651.2109130103\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"myVMosdisk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/myVMosdisk\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": - 0,\r\n \"name\": \"virtualmachinex15cf0eff_disk2_1c88fce1508d45f4b29540d6613f8826\",\r\n + 0,\r\n \"name\": \"virtualmachinex15cf0eff_disk2_4d06b30d95434874803da0dece4144b9\",\r\n \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk2_1c88fce1508d45f4b29540d6613f8826\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk2_4d06b30d95434874803da0dece4144b9\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n },\r\n {\r\n - \ \"lun\": 1,\r\n \"name\": \"virtualmachinex15cf0eff_disk3_c9ba933572224d51aaeaa2958592f548\",\r\n + \ \"lun\": 1,\r\n \"name\": \"virtualmachinex15cf0eff_disk3_54f5bbb287db4c28a1a9cd9576d12333\",\r\n \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk3_c9ba933572224d51aaeaa2958592f548\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk3_54f5bbb287db4c28a1a9cd9576d12333\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n }\r\n ]\r\n },\r\n \ \"osProfile\": {\r\n \"computerName\": \"myVM\",\r\n \"adminUsername\": @@ -782,7 +782,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:50:48 GMT + - Tue, 12 Oct 2021 06:56:26 GMT expires: - '-1' pragma: @@ -799,7 +799,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3998,Microsoft.Compute/LowCostGet30Min;31995 + - Microsoft.Compute/LowCostGet3Min;3989,Microsoft.Compute/LowCostGet30Min;31589 status: code: 200 message: OK @@ -819,7 +819,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/extensions/virtualmachineextensionx15cf0eff?api-version=2021-07-01 @@ -836,7 +836,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/84780d34-e639-466a-ae9a-c88606cbdeec?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/da14420e-db07-49ae-9851-3a47c9d96044?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: @@ -844,7 +844,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:50:49 GMT + - Tue, 12 Oct 2021 06:56:27 GMT expires: - '-1' pragma: @@ -873,14 +873,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/84780d34-e639-466a-ae9a-c88606cbdeec?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/da14420e-db07-49ae-9851-3a47c9d96044?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:50:49.6487227+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"84780d34-e639-466a-ae9a-c88606cbdeec\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:56:27.2102184+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"da14420e-db07-49ae-9851-3a47c9d96044\"\r\n}" headers: cache-control: - no-cache @@ -889,7 +889,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:51:19 GMT + - Tue, 12 Oct 2021 06:56:57 GMT expires: - '-1' pragma: @@ -906,7 +906,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29993 + - Microsoft.Compute/GetOperation3Min;14992,Microsoft.Compute/GetOperation30Min;29905 status: code: 200 message: OK @@ -920,14 +920,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/84780d34-e639-466a-ae9a-c88606cbdeec?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/da14420e-db07-49ae-9851-3a47c9d96044?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:50:49.6487227+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"84780d34-e639-466a-ae9a-c88606cbdeec\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:56:27.2102184+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"da14420e-db07-49ae-9851-3a47c9d96044\"\r\n}" headers: cache-control: - no-cache @@ -936,7 +936,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:51:49 GMT + - Tue, 12 Oct 2021 06:57:28 GMT expires: - '-1' pragma: @@ -953,7 +953,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29992 + - Microsoft.Compute/GetOperation3Min;14991,Microsoft.Compute/GetOperation30Min;29904 status: code: 200 message: OK @@ -967,14 +967,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/84780d34-e639-466a-ae9a-c88606cbdeec?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/da14420e-db07-49ae-9851-3a47c9d96044?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:50:49.6487227+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"84780d34-e639-466a-ae9a-c88606cbdeec\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:56:27.2102184+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"da14420e-db07-49ae-9851-3a47c9d96044\"\r\n}" headers: cache-control: - no-cache @@ -983,7 +983,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:52:19 GMT + - Tue, 12 Oct 2021 06:57:57 GMT expires: - '-1' pragma: @@ -1000,7 +1000,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29991 + - Microsoft.Compute/GetOperation3Min;14990,Microsoft.Compute/GetOperation30Min;29903 status: code: 200 message: OK @@ -1014,24 +1014,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/84780d34-e639-466a-ae9a-c88606cbdeec?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/da14420e-db07-49ae-9851-3a47c9d96044?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:50:49.6487227+00:00\",\r\n \"endTime\": - \"2021-09-02T03:52:34.571438+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"84780d34-e639-466a-ae9a-c88606cbdeec\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:56:27.2102184+00:00\",\r\n \"endTime\": + \"2021-10-12T06:58:11.4295817+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"da14420e-db07-49ae-9851-3a47c9d96044\"\r\n}" headers: cache-control: - no-cache content-length: - - '183' + - '184' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:52:49 GMT + - Tue, 12 Oct 2021 06:58:28 GMT expires: - '-1' pragma: @@ -1048,7 +1048,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14992,Microsoft.Compute/GetOperation30Min;29989 + - Microsoft.Compute/GetOperation3Min;14987,Microsoft.Compute/GetOperation30Min;29899 status: code: 200 message: OK @@ -1062,7 +1062,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/extensions/virtualmachineextensionx15cf0eff?api-version=2021-07-01 @@ -1083,7 +1083,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:52:49 GMT + - Tue, 12 Oct 2021 06:58:28 GMT expires: - '-1' pragma: @@ -1100,7 +1100,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3995,Microsoft.Compute/LowCostGet30Min;31993 + - Microsoft.Compute/LowCostGet3Min;3922,Microsoft.Compute/LowCostGet30Min;31518 status: code: 200 message: OK @@ -1114,19 +1114,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/instanceView?api-version=2021-07-01 response: body: string: "{\r\n \"computerName\": \"myVM\",\r\n \"osName\": \"Windows Server - 2016 Datacenter\",\r\n \"osVersion\": \"Windows:Windows Server 2016 Datacenter-10.0.14393.4583\",\r\n + 2016 Datacenter\",\r\n \"osVersion\": \"Windows:Windows Server 2016 Datacenter-10.0.14393.4651\",\r\n \ \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.7.41491.1024\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\",\r\n \"message\": \"GuestAgent is running and processing the extensions.\",\r\n \"time\": - \"2021-09-02T03:52:28+00:00\"\r\n }\r\n ],\r\n \"extensionHandlers\": + \"2021-10-12T06:58:07+00:00\"\r\n }\r\n ],\r\n \"extensionHandlers\": [\r\n {\r\n \"type\": \"Microsoft.Azure.NetworkWatcher.NetworkWatcherAgentWindows\",\r\n \ \"typeHandlerVersion\": \"1.4.1974.1\",\r\n \"status\": {\r\n \ \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": @@ -1136,15 +1136,15 @@ interactions: \ },\r\n \"disks\": [\r\n {\r\n \"name\": \"myVMosdisk\",\r\n \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2021-09-02T03:49:20.8043126+00:00\"\r\n - \ }\r\n ]\r\n },\r\n {\r\n \"name\": \"virtualmachinex15cf0eff_disk2_1c88fce1508d45f4b29540d6613f8826\",\r\n + succeeded\",\r\n \"time\": \"2021-10-12T06:54:56.6315006+00:00\"\r\n + \ }\r\n ]\r\n },\r\n {\r\n \"name\": \"virtualmachinex15cf0eff_disk2_4d06b30d95434874803da0dece4144b9\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2021-09-02T03:49:20.8043126+00:00\"\r\n - \ }\r\n ]\r\n },\r\n {\r\n \"name\": \"virtualmachinex15cf0eff_disk3_c9ba933572224d51aaeaa2958592f548\",\r\n + succeeded\",\r\n \"time\": \"2021-10-12T06:54:56.6315006+00:00\"\r\n + \ }\r\n ]\r\n },\r\n {\r\n \"name\": \"virtualmachinex15cf0eff_disk3_54f5bbb287db4c28a1a9cd9576d12333\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2021-09-02T03:49:20.8199495+00:00\"\r\n + succeeded\",\r\n \"time\": \"2021-10-12T06:54:56.6315006+00:00\"\r\n \ }\r\n ]\r\n }\r\n ],\r\n \"extensions\": [\r\n {\r\n \ \"name\": \"virtualmachineextensionx15cf0eff\",\r\n \"type\": \"Microsoft.Azure.NetworkWatcher.NetworkWatcherAgentWindows\",\r\n \ \"typeHandlerVersion\": \"1.4.1974.1\",\r\n \"statuses\": [\r\n @@ -1154,7 +1154,7 @@ interactions: extension name: , version: 1.4.1974.1).\"\r\n }\r\n ]\r\n }\r\n \ ],\r\n \"hyperVGeneration\": \"V1\",\r\n \"statuses\": [\r\n {\r\n \ \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\n - \ \"displayStatus\": \"Provisioning succeeded\",\r\n \"time\": \"2021-09-02T03:52:34.5558172+00:00\"\r\n + \ \"displayStatus\": \"Provisioning succeeded\",\r\n \"time\": \"2021-10-12T06:58:11.4295817+00:00\"\r\n \ },\r\n {\r\n \"code\": \"PowerState/running\",\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"VM running\"\r\n }\r\n ]\r\n}" headers: @@ -1165,7 +1165,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:52:49 GMT + - Tue, 12 Oct 2021 06:58:28 GMT expires: - '-1' pragma: @@ -1182,7 +1182,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3994,Microsoft.Compute/LowCostGet30Min;31992 + - Microsoft.Compute/LowCostGet3Min;3921,Microsoft.Compute/LowCostGet30Min;31517 status: code: 200 message: OK @@ -1196,7 +1196,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/extensions/virtualmachineextensionx15cf0eff?api-version=2021-07-01 @@ -1217,7 +1217,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:52:49 GMT + - Tue, 12 Oct 2021 06:58:28 GMT expires: - '-1' pragma: @@ -1234,7 +1234,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3993,Microsoft.Compute/LowCostGet30Min;31991 + - Microsoft.Compute/LowCostGet3Min;3920,Microsoft.Compute/LowCostGet30Min;31516 status: code: 200 message: OK @@ -1248,7 +1248,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/runCommands/RunPowerShellScript?api-version=2021-07-01 @@ -1302,23 +1302,23 @@ interactions: cosVVdCKCXc6zhBrapOG/fY5bmrhSMVsGGe04uvInKlItOltcAc1xx/z3yl3e4L7\\r\\n# d1esSaFrr+e95j4YwkCuQ8cUiAMWi9817841qYi36oIwVgsE29/d2b7+l5S2eEDy\\r\\n# 0Umdiz2jWVXfSA6CePldzhOk5ySI5ShcBpn2b132gIs5lWlj3r1OD/lkOgOjQhSN\\r\\n# khCltIJso0c+f+LP822OJeHCSc1S6aKMH54rsrLZlSr9oYIS5TCCEuEGCisGAQQB\\r\\n# gjcDAwExghLRMIISzQYJKoZIhvcNAQcCoIISvjCCEroCAQMxDzANBglghkgBZQME\\r\\n# AgEFADCCAVEGCyqGSIb3DQEJEAEEoIIBQASCATwwggE4AgEBBgorBgEEAYRZCgMB\\r\\n# - MDEwDQYJYIZIAWUDBAIBBQAEICye+7PcMlsaxZQZ4xS/CJz3pTAcisYNJPqQgd+y\\r\\n# OPl2AgZhHqeWrnsYEzIwMjEwODI4MDExODA1LjU4N1owBIACAfSggdCkgc0wgcox\\r\\n# + MDEwDQYJYIZIAWUDBAIBBQAEICye+7PcMlsaxZQZ4xS/CJz3pTAcisYNJPqQgd+y\\r\\n# OPl2AgZhRLoOD20YEzIwMjEwOTE5MjIwNTI4LjAxOVowBIACAfSggdCkgc0wgcox\\r\\n# CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt\\r\\n# b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJTAjBgNVBAsTHE1p\\r\\n# - Y3Jvc29mdCBBbWVyaWNhIE9wZXJhdGlvbnMxJjAkBgNVBAsTHVRoYWxlcyBUU1Mg\\r\\n# RVNOOkQ2QkQtRTNFNy0xNjg1MSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFt\\r\\n# - cCBTZXJ2aWNloIIOPDCCBPEwggPZoAMCAQICEzMAAAFQWKLUp5sLMOsAAAAAAVAw\\r\\n# DQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0\\r\\n# + Y3Jvc29mdCBBbWVyaWNhIE9wZXJhdGlvbnMxJjAkBgNVBAsTHVRoYWxlcyBUU1Mg\\r\\n# RVNOOkFFMkMtRTMyQi0xQUZDMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFt\\r\\n# + cCBTZXJ2aWNloIIOPDCCBPEwggPZoAMCAQICEzMAAAFIoohFVrwvgL8AAAAAAUgw\\r\\n# DQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0\\r\\n# b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3Jh\\r\\n# dGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcN\\r\\n# - MjAxMTEyMTgyNjAzWhcNMjIwMjExMTgyNjAzWjCByjELMAkGA1UEBhMCVVMxEzAR\\r\\n# BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p\\r\\n# - Y3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2Eg\\r\\n# T3BlcmF0aW9uczEmMCQGA1UECxMdVGhhbGVzIFRTUyBFU046RDZCRC1FM0U3LTE2\\r\\n# - ODUxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2UwggEiMA0G\\r\\n# CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDnen+UeypZwycbVpoN8zNSAqnZl40+\\r\\n# - RjRTx17gsPvVYNxvPe6PzruS/J5X2mON6BRt+XaJATJJvkCgHvViJqrU7Q39T0qT\\r\\n# f02fOTTzkBR1zhB2ihL3XSaEpRE/L2wSa7vgL8jhPFi0dZ8nnqcj96bVLaRvPs7A\\r\\n# - NXeDF3xpZNgUSKL2EegBcmRUse+92uWk/NYsj8Y3ECv2qPnSCNESqdQ97JS4K3R5\\r\\n# PzHSCG2xYvRRLp+b90FVI2JCQr1IAj92UNke2wKHbQs5VdyJE+/vgg6tyZdaxW7A\\r\\n# - VojIq5KcfM3+QahNKpsdOHm37IwYmD1LfTsb0tVhXLjbh7o4T6cCKiWbAgMBAAGj\\r\\n# ggEbMIIBFzAdBgNVHQ4EFgQUglUZHxlF261kL0PBAEM7t+ufRX4wHwYDVR0jBBgw\\r\\n# + MjAxMTEyMTgyNTU2WhcNMjIwMjExMTgyNTU2WjCByjELMAkGA1UEBhMCVVMxEzAR\\r\\n# BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1p\\r\\n# + Y3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2Eg\\r\\n# T3BlcmF0aW9uczEmMCQGA1UECxMdVGhhbGVzIFRTUyBFU046QUUyQy1FMzJCLTFB\\r\\n# + RkMxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2UwggEiMA0G\\r\\n# CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQD3/3ivFYSK0dGtcXaZ8pNLEARbraJe\\r\\n# + wryi/JgbaKlq7hhFIU1EkY0HMiFRm2/Wsukt62k25zvDxW16fphg5876+l1wYnCl\\r\\n# ge/rFlrR2Uu1WwtFmc1xGpy4+uxobCEMeIFDGhL5DNTbbOisLrBUYbyXr7fPzxbV\\r\\n# + kEwJDP5FG2n0ro1qOjegIkLIjXU6qahduQxTfsPOEp8jgqMKn++fpH6fvXKlewWz\\r\\n# dsfvhiZ4H4Iq1CTOn+fkxqcDwTHYkYZYgqm+1X1x7458rp69qjFeVP3GbAvJbY3b\\r\\n# + Flq5uyxriPcZxDZrB6f1wALXrO2/IdfVEdwTWqJIDZBJjTycQhhxS3i1AgMBAAGj\\r\\n# ggEbMIIBFzAdBgNVHQ4EFgQUhzLwaZ8OBLRJH0s9E63pIcWJokcwHwYDVR0jBBgw\\r\\n# FoAU1WM6XIoxkPNDe3xGG8UzaFqFbVUwVgYDVR0fBE8wTTBLoEmgR4ZFaHR0cDov\\r\\n# L2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwvcHJvZHVjdHMvTWljVGltU3RhUENB\\r\\n# XzIwMTAtMDctMDEuY3JsMFoGCCsGAQUFBwEBBE4wTDBKBggrBgEFBQcwAoY+aHR0\\r\\n# cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNUaW1TdGFQQ0FfMjAx\\r\\n# - MC0wNy0wMS5jcnQwDAYDVR0TAQH/BAIwADATBgNVHSUEDDAKBggrBgEFBQcDCDAN\\r\\n# BgkqhkiG9w0BAQsFAAOCAQEAUT9odHKO/uPj08AeL5P2HixMOqHK3oPk9JAdmlgf\\r\\n# - 2Xt8xF7Y9BHiFQNWYMKd/HI2ryYOu3SAAs3txZaRpalvY0R16WWIQzC9G9oqSD7Q\\r\\n# NN0RMxsiiCMM65/nq9xSPIrmYh6aTXFgIMuh4GLNk7gMQFybUbg2ZlLZsn9r5Rzx\\r\\n# - X/x8aK17ggEWKmiij1lgb/6AE+bAPUuEyy50ua6U9Zs0+bi8/HvnZs6PiMwGhtXz\\r\\n# /sRrZaAYjbLvaCXOk+DbRvHBoYHQQm35QrPUIfiNcw30giIMRy7xYHjiml/IxakM\\r\\n# - FUJ56mLE3SvnbSGxaKwppPlkIsw5HhemdSGHs5SlrQTbXjCCBnEwggRZoAMCAQIC\\r\\n# CmEJgSoAAAAAAAIwDQYJKoZIhvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYD\\r\\n# + MC0wNy0wMS5jcnQwDAYDVR0TAQH/BAIwADATBgNVHSUEDDAKBggrBgEFBQcDCDAN\\r\\n# BgkqhkiG9w0BAQsFAAOCAQEAZhKWwbMnC9Qywcrlgs0qX9bhxiZGve+8JED27hOi\\r\\n# + yGa8R9nqzHg4+q6NKfYXfS62uMUJp2u+J7tINUTf/1ugL+K4RwsPVehDasSJJj+7\\r\\n# boIxZP8AU/xQdVY7qgmQGmd4F+c5hkJJtl6NReYE908Q698qj1mDpr0Mx+4LhP/t\\r\\n# + TqL6HpZEURlhFOddnyLStVCFdfNI1yGHP9n0yN1KfhGEV3s7MBzpFJXwOflwgyE9\\r\\n# cwQ8jjOTVpNRdCqL/P5ViCAo2dciHjd1u1i1Q4QZ6xb0+B1HdZFRELOiFwf0sh3Z\\r\\n# + 1xOeSFcHg0rLE+rseHz4QhvoEj7h9bD8VN7/HnCDwWpBJTCCBnEwggRZoAMCAQIC\\r\\n# CmEJgSoAAAAAAAIwDQYJKoZIhvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYD\\r\\n# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy\\r\\n# b3NvZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRp\\r\\n# ZmljYXRlIEF1dGhvcml0eSAyMDEwMB4XDTEwMDcwMTIxMzY1NVoXDTI1MDcwMTIx\\r\\n# NDY1NVowfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNV\\r\\n# BAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQG\\r\\n# A1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwggEiMA0GCSqGSIb3\\r\\n# @@ -1337,21 +1337,21 @@ interactions: gPsbiSpUObJb2sgNVZl6h3M7COaYLeqN4DMuEin1wC9UJyH3yKxO2ii4sanblrKn\\r\\n# QqLJzxlBTeCG+SqaoxFmMNO7dDJL32N79ZmKLxvHIa9Zta7cRDyXUHHXodLFVeNp\\r\\n# 3lfB0d4wwP3M5k37Db9dT+mdHhk4L7zPWAUu7w2gUDXa7wknHNWzfjUeCLraNtvT\\r\\n# X4/edIhJEqGCAs4wggI3AgEBMIH4oYHQpIHNMIHKMQswCQYDVQQGEwJVUzETMBEG\\r\\n# A1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWlj\\r\\n# cm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBP\\r\\n# - cGVyYXRpb25zMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjpENkJELUUzRTctMTY4\\r\\n# NTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZaIjCgEBMAcG\\r\\n# - BSsOAwIaAxUAIw17n3LxNWtGEZtallmkMZYeoBKggYMwgYCkfjB8MQswCQYDVQQG\\r\\n# EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG\\r\\n# - A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQg\\r\\n# VGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIFAOTTsfAwIhgPMjAy\\r\\n# - MTA4MjgwMjQ4MTZaGA8yMDIxMDgyOTAyNDgxNlowdzA9BgorBgEEAYRZCgQBMS8w\\r\\n# LTAKAgUA5NOx8AIBADAKAgEAAgIKaAIB/zAHAgEAAgIRVTAKAgUA5NUDcAIBADA2\\r\\n# - BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIBAAIDB6EgoQowCAIB\\r\\n# AAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBAJHZ2FIBGntJQBL1nw6XmcSgH6icLCFj\\r\\n# - IqhYKTQ4xV8AQhwMe1k3I87cU4vOBTUI7tYOQDLgJRUqEKufdQt7Gi9vwLW8rRWS\\r\\n# DSHGmydQEhqdfxxA7mB4obh9EM741+GpEp2VmgoIgEz+vbNrGpbQnpIuZCLdZPfu\\r\\n# - J3p5ReZSVOKVMYIDDTCCAwkCAQEwgZMwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgT\\r\\n# Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m\\r\\n# - dCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENB\\r\\n# IDIwMTACEzMAAAFQWKLUp5sLMOsAAAAAAVAwDQYJYIZIAWUDBAIBBQCgggFKMBoG\\r\\n# - CSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0BCQQxIgQgco9so3th\\r\\n# yUUgdI3WZ1BAl4ZVxzZWEBNfpdJTRO95fm0wgfoGCyqGSIb3DQEJEAIvMYHqMIHn\\r\\n# - MIHkMIG9BCBs9D6fL5rCThgXJmGIhdXS6IY1Zg6op47dkKJ8L/Kj9jCBmDCBgKR+\\r\\n# MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS\\r\\n# - ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT\\r\\n# HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAABUFii1KebCzDrAAAA\\r\\n# - AAFQMCIEIAt91UnrKowgSD32DDE/GX7AJA29JxN3cpvjMar4l4JtMA0GCSqGSIb3\\r\\n# DQEBCwUABIIBAG8bBcZI5pkQUtSmKCP6EWhC7JBhUMvUF8BzAEc/+uZxG1e93XaF\\r\\n# - GvzbTncwgFe1hnUbzWHtUAcIEHRb43LIbtmIWb8GCPhbkOJrjgNsFH+jhE29Ussh\\r\\n# 5CWiHsatMDtqY7a0yav8+HXveYYsk6gUjOS8GJNJRPdLYU52DEzmc5zpcnrAYv4g\\r\\n# - qSR3bRSD+A+uHtPzUvTOz2XMqPyKEixrLVSbKZpbIHKcikHAkTTL5GeFKk7/PHWw\\r\\n# 63ikvZC9psDhPutaq7HOJOjJB54WkrMe4pJWBhYiP9coOerDrfu1K2C22gfVC3kt\\r\\n# - r2DMiAaeHR3R2HwM19Lbl68fMR+lJCMbw/w=\\r\\n# SIG # End signature block\\r\\n\"\r\n + cGVyYXRpb25zMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjpBRTJDLUUzMkItMUFG\\r\\n# QzElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZaIjCgEBMAcG\\r\\n# + BSsOAwIaAxUAhyuClrocWf4SIcRafAEX1Rhs6zmggYMwgYCkfjB8MQswCQYDVQQG\\r\\n# EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG\\r\\n# + A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQg\\r\\n# VGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIFAOTx24swIhgPMjAy\\r\\n# + MTA5MTkyMzUzNDdaGA8yMDIxMDkyMDIzNTM0N1owdzA9BgorBgEEAYRZCgQBMS8w\\r\\n# LTAKAgUA5PHbiwIBADAKAgEAAgIX7AIB/zAHAgEAAgIRMTAKAgUA5PMtCwIBADA2\\r\\n# + BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIBAAIDB6EgoQowCAIB\\r\\n# AAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBAF1XJOJLsiZijjuY3sZcT9hIVTtEVjtS\\r\\n# + j6GmleBTx98Lur8qeixLMtG3SHHxCZGLXrsUaiz4kxzO/iP0cjulvKIEwM41jGwe\\r\\n# 99hOLcKDgq5/s9SmIvw2awf4VYfRT2LQ1cVQppU2rF1g9j/W8ywkUX45tJmjZeN1\\r\\n# + l2qIvy4CcKM3MYIDDTCCAwkCAQEwgZMwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgT\\r\\n# Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m\\r\\n# + dCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENB\\r\\n# IDIwMTACEzMAAAFIoohFVrwvgL8AAAAAAUgwDQYJYIZIAWUDBAIBBQCgggFKMBoG\\r\\n# + CSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0BCQQxIgQg8dZ+j8h1\\r\\n# 7FazynXKCRpoU+c5GNhRSUfKCOpLwp7JHPswgfoGCyqGSIb3DQEJEAIvMYHqMIHn\\r\\n# + MIHkMIG9BCCpkBrqjHmhvyYf5tTcTvD5Y4a+V79TwVV6T1aAwdto2DCBmDCBgKR+\\r\\n# MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdS\\r\\n# + ZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMT\\r\\n# HU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAABSKKIRVa8L4C/AAAA\\r\\n# + AAFIMCIEIOihzzNb1N7twQwiiV9BQAUWE8VTPiiKj16NIuF65747MA0GCSqGSIb3\\r\\n# DQEBCwUABIIBAKJ8iZlnyCU3i04w4cHfJ2cQcokOFnlvQthfoMw1fp4RJWLNZ+Pf\\r\\n# + /X0M2pW8gfEAyUB1zPHm39zB+seFT3DKCq/nJyjmF91bFEmcxRjumAt/WGw2+Ie1\\r\\n# qf/4xL3caDtr1SQ7qNiWFOsArVPetAMU4bkx3QX+f1Eee4bM5bpRfMiQvgxEBtW9\\r\\n# + nTbuwlENXit+s6IkHrwCyTWf0oGwkz8RvD8aIP24eU5ff2Wc6aKlNo10xS3Bh2Pn\\r\\n# VdHqApH8YYUr42cjw0RT1x7/pCn6wtqWVd6+yVChz84XqdHoJ5JtFsjc79DJ+Ubo\\r\\n# + wVczJpODlc+jSx90Pbu/awO8LF3WHxoNHME=\\r\\n# SIG # End signature block\\r\\n\"\r\n \ ],\r\n \"parameters\": [\r\n {\r\n \"name\": \"arg1\",\r\n \"type\": \"string\",\r\n \"required\": false\r\n },\r\n {\r\n \"name\": \"arg2\",\r\n \"type\": \"string\",\r\n \"required\": false\r\n @@ -1368,7 +1368,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:52:49 GMT + - Tue, 12 Oct 2021 06:58:29 GMT expires: - '-1' pragma: @@ -1399,7 +1399,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/extensions?api-version=2021-07-01 @@ -1420,7 +1420,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:52:49 GMT + - Tue, 12 Oct 2021 06:58:29 GMT expires: - '-1' pragma: @@ -1437,7 +1437,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3992,Microsoft.Compute/LowCostGet30Min;31990 + - Microsoft.Compute/LowCostGet3Min;3919,Microsoft.Compute/LowCostGet30Min;31515 status: code: 200 message: OK @@ -1451,7 +1451,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff?api-version=2021-07-01 @@ -1459,28 +1459,28 @@ interactions: body: string: "{\r\n \"name\": \"virtualmachinex15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n - \ \"properties\": {\r\n \"vmId\": \"bc737ab2-dd03-4ec7-87f5-38e7675d78af\",\r\n + \ \"properties\": {\r\n \"vmId\": \"cb618dc1-c323-4478-acda-f534a5b3d94d\",\r\n \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n },\r\n \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"14393.4583.2108010852\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"14393.4651.2109130103\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"myVMosdisk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/myVMosdisk\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": - 0,\r\n \"name\": \"virtualmachinex15cf0eff_disk2_1c88fce1508d45f4b29540d6613f8826\",\r\n + 0,\r\n \"name\": \"virtualmachinex15cf0eff_disk2_4d06b30d95434874803da0dece4144b9\",\r\n \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk2_1c88fce1508d45f4b29540d6613f8826\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk2_4d06b30d95434874803da0dece4144b9\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n },\r\n {\r\n - \ \"lun\": 1,\r\n \"name\": \"virtualmachinex15cf0eff_disk3_c9ba933572224d51aaeaa2958592f548\",\r\n + \ \"lun\": 1,\r\n \"name\": \"virtualmachinex15cf0eff_disk3_54f5bbb287db4c28a1a9cd9576d12333\",\r\n \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk3_c9ba933572224d51aaeaa2958592f548\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk3_54f5bbb287db4c28a1a9cd9576d12333\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n }\r\n ]\r\n },\r\n \ \"osProfile\": {\r\n \"computerName\": \"myVM\",\r\n \"adminUsername\": @@ -1506,7 +1506,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:52:49 GMT + - Tue, 12 Oct 2021 06:58:29 GMT expires: - '-1' pragma: @@ -1523,7 +1523,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3991,Microsoft.Compute/LowCostGet30Min;31989 + - Microsoft.Compute/LowCostGet3Min;3918,Microsoft.Compute/LowCostGet30Min;31514 status: code: 200 message: OK @@ -1541,7 +1541,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/runCommand?api-version=2021-07-01 @@ -1550,17 +1550,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e039acd3-6965-4aa3-a233-f7fffbab4eb0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/81b33448-9684-4858-9cb9-aca96048f7b9?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:52:50 GMT + - Tue, 12 Oct 2021 06:58:29 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e039acd3-6965-4aa3-a233-f7fffbab4eb0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/81b33448-9684-4858-9cb9-aca96048f7b9?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1587,23 +1587,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e039acd3-6965-4aa3-a233-f7fffbab4eb0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/81b33448-9684-4858-9cb9-aca96048f7b9?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:52:50.446548+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"e039acd3-6965-4aa3-a233-f7fffbab4eb0\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:58:29.5859685+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"81b33448-9684-4858-9cb9-aca96048f7b9\"\r\n}" headers: cache-control: - no-cache content-length: - - '133' + - '134' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:53:19 GMT + - Tue, 12 Oct 2021 06:58:59 GMT expires: - '-1' pragma: @@ -1620,7 +1620,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14992,Microsoft.Compute/GetOperation30Min;29987 + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29896 status: code: 200 message: OK @@ -1634,26 +1634,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e039acd3-6965-4aa3-a233-f7fffbab4eb0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/81b33448-9684-4858-9cb9-aca96048f7b9?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:52:50.446548+00:00\",\r\n \"endTime\": - \"2021-09-02T03:53:20.7905069+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T06:58:29.5859685+00:00\",\r\n \"endTime\": + \"2021-10-12T06:58:59.9454725+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\"value\":[{\"code\":\"ComponentStatus/StdOut/succeeded\",\"level\":\"Info\",\"displayStatus\":\"Provisioning succeeded\",\"message\":\"This is a sample script with parameters \"},{\"code\":\"ComponentStatus/StdErr/succeeded\",\"level\":\"Info\",\"displayStatus\":\"Provisioning - succeeded\",\"message\":\"\"}]}\r\n },\r\n \"name\": \"e039acd3-6965-4aa3-a233-f7fffbab4eb0\"\r\n}" + succeeded\",\"message\":\"\"}]}\r\n },\r\n \"name\": \"81b33448-9684-4858-9cb9-aca96048f7b9\"\r\n}" headers: cache-control: - no-cache content-length: - - '502' + - '503' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:53:49 GMT + - Tue, 12 Oct 2021 06:59:29 GMT expires: - '-1' pragma: @@ -1670,7 +1670,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14991,Microsoft.Compute/GetOperation30Min;29985 + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29894 status: code: 200 message: OK @@ -1684,10 +1684,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e039acd3-6965-4aa3-a233-f7fffbab4eb0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/81b33448-9684-4858-9cb9-aca96048f7b9?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '{"value":[{"code":"ComponentStatus/StdOut/succeeded","level":"Info","displayStatus":"Provisioning @@ -1701,7 +1701,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:53:49 GMT + - Tue, 12 Oct 2021 06:59:29 GMT expires: - '-1' pragma: @@ -1718,7 +1718,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14990,Microsoft.Compute/GetOperation30Min;29984 + - Microsoft.Compute/GetOperation3Min;14988,Microsoft.Compute/GetOperation30Min;29893 status: code: 200 message: OK @@ -1734,7 +1734,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/restart?api-version=2021-07-01 @@ -1743,17 +1743,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0f905da1-a4b8-4f81-a6da-6b9cfe662d27?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/ecbd4849-4e64-42fb-86cc-0e072b1f4e74?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:53:49 GMT + - Tue, 12 Oct 2021 06:59:29 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0f905da1-a4b8-4f81-a6da-6b9cfe662d27?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/ecbd4849-4e64-42fb-86cc-0e072b1f4e74?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1780,24 +1780,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0f905da1-a4b8-4f81-a6da-6b9cfe662d27?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/ecbd4849-4e64-42fb-86cc-0e072b1f4e74?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:53:50.7751385+00:00\",\r\n \"endTime\": - \"2021-09-02T03:53:51.1032442+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"0f905da1-a4b8-4f81-a6da-6b9cfe662d27\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T06:59:30.2894158+00:00\",\r\n \"endTime\": + \"2021-10-12T06:59:30.633146+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"ecbd4849-4e64-42fb-86cc-0e072b1f4e74\"\r\n}" headers: cache-control: - no-cache content-length: - - '184' + - '183' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:54:20 GMT + - Tue, 12 Oct 2021 07:00:00 GMT expires: - '-1' pragma: @@ -1814,7 +1814,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14989,Microsoft.Compute/GetOperation30Min;29982 + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29910 status: code: 200 message: OK @@ -1828,10 +1828,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0f905da1-a4b8-4f81-a6da-6b9cfe662d27?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/ecbd4849-4e64-42fb-86cc-0e072b1f4e74?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1841,7 +1841,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:54:20 GMT + - Tue, 12 Oct 2021 07:00:00 GMT expires: - '-1' pragma: @@ -1854,7 +1854,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14988,Microsoft.Compute/GetOperation30Min;29981 + - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29909 status: code: 200 message: OK @@ -1870,7 +1870,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/powerOff?skipShutdown=false&api-version=2021-07-01 @@ -1879,17 +1879,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e1dbbc7f-301e-4e11-84ee-89ce4f877b05?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/728e0298-1263-40f4-b54a-02ebaf6902d6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:54:20 GMT + - Tue, 12 Oct 2021 07:00:00 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e1dbbc7f-301e-4e11-84ee-89ce4f877b05?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/728e0298-1263-40f4-b54a-02ebaf6902d6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1916,15 +1916,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e1dbbc7f-301e-4e11-84ee-89ce4f877b05?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/728e0298-1263-40f4-b54a-02ebaf6902d6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:54:21.0097296+00:00\",\r\n \"endTime\": - \"2021-09-02T03:54:24.5097801+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"e1dbbc7f-301e-4e11-84ee-89ce4f877b05\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:00:00.9144018+00:00\",\r\n \"endTime\": + \"2021-10-12T07:00:13.3983981+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"728e0298-1263-40f4-b54a-02ebaf6902d6\"\r\n}" headers: cache-control: - no-cache @@ -1933,7 +1933,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:54:50 GMT + - Tue, 12 Oct 2021 07:00:30 GMT expires: - '-1' pragma: @@ -1950,7 +1950,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14987,Microsoft.Compute/GetOperation30Min;29979 + - Microsoft.Compute/GetOperation3Min;14979,Microsoft.Compute/GetOperation30Min;29903 status: code: 200 message: OK @@ -1964,10 +1964,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e1dbbc7f-301e-4e11-84ee-89ce4f877b05?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/728e0298-1263-40f4-b54a-02ebaf6902d6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1977,7 +1977,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:54:50 GMT + - Tue, 12 Oct 2021 07:00:30 GMT expires: - '-1' pragma: @@ -1990,7 +1990,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29978 + - Microsoft.Compute/GetOperation3Min;14978,Microsoft.Compute/GetOperation30Min;29902 status: code: 200 message: OK @@ -2006,7 +2006,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/start?api-version=2021-07-01 @@ -2015,17 +2015,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/00ea8d97-a85c-4017-aea0-854aa50df0a0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8cd35c8c-27e1-4687-96ec-e368626c2027?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:54:51 GMT + - Tue, 12 Oct 2021 07:00:30 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/00ea8d97-a85c-4017-aea0-854aa50df0a0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8cd35c8c-27e1-4687-96ec-e368626c2027?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2052,24 +2052,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/00ea8d97-a85c-4017-aea0-854aa50df0a0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8cd35c8c-27e1-4687-96ec-e368626c2027?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:54:51.2443633+00:00\",\r\n \"endTime\": - \"2021-09-02T03:54:54.916239+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"00ea8d97-a85c-4017-aea0-854aa50df0a0\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:00:31.4767483+00:00\",\r\n \"endTime\": + \"2021-10-12T07:00:39.6800283+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"8cd35c8c-27e1-4687-96ec-e368626c2027\"\r\n}" headers: cache-control: - no-cache content-length: - - '183' + - '184' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:55:01 GMT + - Tue, 12 Oct 2021 07:00:40 GMT expires: - '-1' pragma: @@ -2086,7 +2086,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29979 + - Microsoft.Compute/GetOperation3Min;14977,Microsoft.Compute/GetOperation30Min;29901 status: code: 200 message: OK @@ -2100,10 +2100,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/00ea8d97-a85c-4017-aea0-854aa50df0a0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8cd35c8c-27e1-4687-96ec-e368626c2027?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -2113,7 +2113,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:55:01 GMT + - Tue, 12 Oct 2021 07:00:40 GMT expires: - '-1' pragma: @@ -2126,7 +2126,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29978 + - Microsoft.Compute/GetOperation3Min;14976,Microsoft.Compute/GetOperation30Min;29900 status: code: 200 message: OK @@ -2144,7 +2144,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/extensions/virtualmachineextensionx15cf0eff?api-version=2021-07-01 @@ -2161,7 +2161,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c92d657c-2f51-49e3-b203-9ae7d945dc66?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e917dfaa-455f-4a2c-a5a8-86fdafa820f0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: @@ -2169,7 +2169,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:55:01 GMT + - Tue, 12 Oct 2021 07:00:41 GMT expires: - '-1' pragma: @@ -2202,15 +2202,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c92d657c-2f51-49e3-b203-9ae7d945dc66?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e917dfaa-455f-4a2c-a5a8-86fdafa820f0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:55:01.4631456+00:00\",\r\n \"endTime\": - \"2021-09-02T03:55:01.7912728+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"c92d657c-2f51-49e3-b203-9ae7d945dc66\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:00:42.0238121+00:00\",\r\n \"endTime\": + \"2021-10-12T07:00:42.3363612+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"e917dfaa-455f-4a2c-a5a8-86fdafa820f0\"\r\n}" headers: cache-control: - no-cache @@ -2219,7 +2219,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:55:31 GMT + - Tue, 12 Oct 2021 07:01:12 GMT expires: - '-1' pragma: @@ -2236,7 +2236,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29976 + - Microsoft.Compute/GetOperation3Min;14975,Microsoft.Compute/GetOperation30Min;29895 status: code: 200 message: OK @@ -2250,7 +2250,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/extensions/virtualmachineextensionx15cf0eff?api-version=2021-07-01 @@ -2271,7 +2271,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:55:31 GMT + - Tue, 12 Oct 2021 07:01:12 GMT expires: - '-1' pragma: @@ -2288,7 +2288,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3997,Microsoft.Compute/LowCostGet30Min;31987 + - Microsoft.Compute/LowCostGet3Min;3915,Microsoft.Compute/LowCostGet30Min;31538 status: code: 200 message: OK @@ -2304,7 +2304,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/extensions/virtualmachineextensionx15cf0eff?api-version=2021-07-01 @@ -2315,17 +2315,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/27f1e174-d54b-4f05-845f-bc919d004c54?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/591ae64f-17c9-479c-8749-f4c2c50b6991?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:55:31 GMT + - Tue, 12 Oct 2021 07:01:12 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/27f1e174-d54b-4f05-845f-bc919d004c54?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/591ae64f-17c9-479c-8749-f4c2c50b6991?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2352,14 +2352,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/27f1e174-d54b-4f05-845f-bc919d004c54?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/591ae64f-17c9-479c-8749-f4c2c50b6991?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:55:31.7759019+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"27f1e174-d54b-4f05-845f-bc919d004c54\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:01:12.7271473+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"591ae64f-17c9-479c-8749-f4c2c50b6991\"\r\n}" headers: cache-control: - no-cache @@ -2368,7 +2368,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:56:01 GMT + - Tue, 12 Oct 2021 07:01:42 GMT expires: - '-1' pragma: @@ -2385,7 +2385,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14987,Microsoft.Compute/GetOperation30Min;29975 + - Microsoft.Compute/GetOperation3Min;14973,Microsoft.Compute/GetOperation30Min;29890 status: code: 200 message: OK @@ -2399,15 +2399,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/27f1e174-d54b-4f05-845f-bc919d004c54?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/591ae64f-17c9-479c-8749-f4c2c50b6991?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:55:31.7759019+00:00\",\r\n \"endTime\": - \"2021-09-02T03:56:02.0729857+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"27f1e174-d54b-4f05-845f-bc919d004c54\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:01:12.7271473+00:00\",\r\n \"endTime\": + \"2021-10-12T07:01:53.0084064+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"591ae64f-17c9-479c-8749-f4c2c50b6991\"\r\n}" headers: cache-control: - no-cache @@ -2416,7 +2416,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:56:30 GMT + - Tue, 12 Oct 2021 07:02:12 GMT expires: - '-1' pragma: @@ -2433,7 +2433,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14987,Microsoft.Compute/GetOperation30Min;29973 + - Microsoft.Compute/GetOperation3Min;14969,Microsoft.Compute/GetOperation30Min;29884 status: code: 200 message: OK @@ -2449,7 +2449,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/powerOff?skipShutdown=false&api-version=2021-07-01 @@ -2458,17 +2458,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/73bd84d4-2f34-4d91-8153-a0833742c1b6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/284ee46a-95fc-4b79-b91f-b087e52b4761?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:56:31 GMT + - Tue, 12 Oct 2021 07:02:12 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/73bd84d4-2f34-4d91-8153-a0833742c1b6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/284ee46a-95fc-4b79-b91f-b087e52b4761?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2479,7 +2479,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/UpdateVM3Min;235,Microsoft.Compute/UpdateVM30Min;1192 + - Microsoft.Compute/UpdateVM3Min;234,Microsoft.Compute/UpdateVM30Min;1192 x-ms-ratelimit-remaining-subscription-writes: - '1195' status: @@ -2495,15 +2495,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/73bd84d4-2f34-4d91-8153-a0833742c1b6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/284ee46a-95fc-4b79-b91f-b087e52b4761?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:56:32.0107341+00:00\",\r\n \"endTime\": - \"2021-09-02T03:56:42.5576747+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"73bd84d4-2f34-4d91-8153-a0833742c1b6\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:02:13.1959528+00:00\",\r\n \"endTime\": + \"2021-10-12T07:02:29.2273076+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"284ee46a-95fc-4b79-b91f-b087e52b4761\"\r\n}" headers: cache-control: - no-cache @@ -2512,7 +2512,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:57:02 GMT + - Tue, 12 Oct 2021 07:02:43 GMT expires: - '-1' pragma: @@ -2529,7 +2529,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14988,Microsoft.Compute/GetOperation30Min;29971 + - Microsoft.Compute/GetOperation3Min;14968,Microsoft.Compute/GetOperation30Min;29879 status: code: 200 message: OK @@ -2543,10 +2543,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/73bd84d4-2f34-4d91-8153-a0833742c1b6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/284ee46a-95fc-4b79-b91f-b087e52b4761?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -2556,7 +2556,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:57:02 GMT + - Tue, 12 Oct 2021 07:02:43 GMT expires: - '-1' pragma: @@ -2569,7 +2569,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14987,Microsoft.Compute/GetOperation30Min;29970 + - Microsoft.Compute/GetOperation3Min;14967,Microsoft.Compute/GetOperation30Min;29878 status: code: 200 message: OK @@ -2585,7 +2585,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/reapply?api-version=2021-07-01 @@ -2594,17 +2594,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c9eb7be2-3a3a-40d0-a407-898061505564?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/69281ca1-24da-4364-ac98-c59485d2a643?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:57:02 GMT + - Tue, 12 Oct 2021 07:02:43 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c9eb7be2-3a3a-40d0-a407-898061505564?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/69281ca1-24da-4364-ac98-c59485d2a643?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2615,7 +2615,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/UpdateVM3Min;235,Microsoft.Compute/UpdateVM30Min;1191 + - Microsoft.Compute/UpdateVM3Min;234,Microsoft.Compute/UpdateVM30Min;1191 x-ms-ratelimit-remaining-subscription-writes: - '1194' status: @@ -2631,24 +2631,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c9eb7be2-3a3a-40d0-a407-898061505564?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/69281ca1-24da-4364-ac98-c59485d2a643?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:57:02.2297299+00:00\",\r\n \"endTime\": - \"2021-09-02T03:57:03.776581+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"c9eb7be2-3a3a-40d0-a407-898061505564\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:02:43.63361+00:00\",\r\n \"endTime\": + \"2021-10-12T07:02:45.2273619+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"69281ca1-24da-4364-ac98-c59485d2a643\"\r\n}" headers: cache-control: - no-cache content-length: - - '183' + - '182' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:57:32 GMT + - Tue, 12 Oct 2021 07:03:13 GMT expires: - '-1' pragma: @@ -2665,7 +2665,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14988,Microsoft.Compute/GetOperation30Min;29968 + - Microsoft.Compute/GetOperation3Min;14968,Microsoft.Compute/GetOperation30Min;29872 status: code: 200 message: OK @@ -2679,10 +2679,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c9eb7be2-3a3a-40d0-a407-898061505564?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/69281ca1-24da-4364-ac98-c59485d2a643?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -2692,7 +2692,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:57:32 GMT + - Tue, 12 Oct 2021 07:03:13 GMT expires: - '-1' pragma: @@ -2705,7 +2705,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14987,Microsoft.Compute/GetOperation30Min;29967 + - Microsoft.Compute/GetOperation3Min;14967,Microsoft.Compute/GetOperation30Min;29871 status: code: 200 message: OK @@ -2721,7 +2721,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/redeploy?api-version=2021-07-01 @@ -2730,17 +2730,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/bda2ab68-dc63-461b-a068-510004f5a9ad?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/cbcf31aa-97d4-4678-960c-0da5c7838a00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 03:57:32 GMT + - Tue, 12 Oct 2021 07:03:13 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/bda2ab68-dc63-461b-a068-510004f5a9ad?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/cbcf31aa-97d4-4678-960c-0da5c7838a00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2751,7 +2751,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/UpdateVM3Min;235,Microsoft.Compute/UpdateVM30Min;1190 + - Microsoft.Compute/UpdateVM3Min;234,Microsoft.Compute/UpdateVM30Min;1190 x-ms-ratelimit-remaining-subscription-writes: - '1193' status: @@ -2767,14 +2767,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/bda2ab68-dc63-461b-a068-510004f5a9ad?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/cbcf31aa-97d4-4678-960c-0da5c7838a00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:57:32.4955556+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"bda2ab68-dc63-461b-a068-510004f5a9ad\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:03:14.1025568+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"cbcf31aa-97d4-4678-960c-0da5c7838a00\"\r\n}" headers: cache-control: - no-cache @@ -2783,7 +2783,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:58:02 GMT + - Tue, 12 Oct 2021 07:03:43 GMT expires: - '-1' pragma: @@ -2800,7 +2800,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14988,Microsoft.Compute/GetOperation30Min;29965 + - Microsoft.Compute/GetOperation3Min;14972,Microsoft.Compute/GetOperation30Min;29869 status: code: 200 message: OK @@ -2814,14 +2814,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/bda2ab68-dc63-461b-a068-510004f5a9ad?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/cbcf31aa-97d4-4678-960c-0da5c7838a00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:57:32.4955556+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"bda2ab68-dc63-461b-a068-510004f5a9ad\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:03:14.1025568+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"cbcf31aa-97d4-4678-960c-0da5c7838a00\"\r\n}" headers: cache-control: - no-cache @@ -2830,7 +2830,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:58:31 GMT + - Tue, 12 Oct 2021 07:04:13 GMT expires: - '-1' pragma: @@ -2847,7 +2847,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29962 + - Microsoft.Compute/GetOperation3Min;14972,Microsoft.Compute/GetOperation30Min;29866 status: code: 200 message: OK @@ -2861,14 +2861,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/bda2ab68-dc63-461b-a068-510004f5a9ad?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/cbcf31aa-97d4-4678-960c-0da5c7838a00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:57:32.4955556+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"bda2ab68-dc63-461b-a068-510004f5a9ad\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:03:14.1025568+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"cbcf31aa-97d4-4678-960c-0da5c7838a00\"\r\n}" headers: cache-control: - no-cache @@ -2877,7 +2877,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:59:02 GMT + - Tue, 12 Oct 2021 07:04:45 GMT expires: - '-1' pragma: @@ -2894,7 +2894,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29959 + - Microsoft.Compute/GetOperation3Min;14978,Microsoft.Compute/GetOperation30Min;29863 status: code: 200 message: OK @@ -2908,15 +2908,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/bda2ab68-dc63-461b-a068-510004f5a9ad?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/cbcf31aa-97d4-4678-960c-0da5c7838a00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T03:57:32.4955556+00:00\",\r\n \"endTime\": - \"2021-09-02T03:59:17.8557406+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"bda2ab68-dc63-461b-a068-510004f5a9ad\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:03:14.1025568+00:00\",\r\n \"endTime\": + \"2021-10-12T07:04:59.5563137+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"cbcf31aa-97d4-4678-960c-0da5c7838a00\"\r\n}" headers: cache-control: - no-cache @@ -2925,7 +2925,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:59:32 GMT + - Tue, 12 Oct 2021 07:05:14 GMT expires: - '-1' pragma: @@ -2942,7 +2942,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29956 + - Microsoft.Compute/GetOperation3Min;14979,Microsoft.Compute/GetOperation30Min;29896 status: code: 200 message: OK @@ -2956,10 +2956,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/bda2ab68-dc63-461b-a068-510004f5a9ad?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/cbcf31aa-97d4-4678-960c-0da5c7838a00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -2969,7 +2969,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 03:59:32 GMT + - Tue, 12 Oct 2021 07:05:15 GMT expires: - '-1' pragma: @@ -2982,7 +2982,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29955 + - Microsoft.Compute/GetOperation3Min;14978,Microsoft.Compute/GetOperation30Min;29895 status: code: 200 message: OK @@ -3001,7 +3001,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff?api-version=2021-07-01 @@ -3009,28 +3009,28 @@ interactions: body: string: "{\r\n \"name\": \"virtualmachinex15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n - \ \"properties\": {\r\n \"vmId\": \"bc737ab2-dd03-4ec7-87f5-38e7675d78af\",\r\n + \ \"properties\": {\r\n \"vmId\": \"cb618dc1-c323-4478-acda-f534a5b3d94d\",\r\n \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n },\r\n \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"14393.4583.2108010852\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"14393.4651.2109130103\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"myVMosdisk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/myVMosdisk\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": - 0,\r\n \"name\": \"virtualmachinex15cf0eff_disk2_1c88fce1508d45f4b29540d6613f8826\",\r\n + 0,\r\n \"name\": \"virtualmachinex15cf0eff_disk2_4d06b30d95434874803da0dece4144b9\",\r\n \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk2_1c88fce1508d45f4b29540d6613f8826\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk2_4d06b30d95434874803da0dece4144b9\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n },\r\n {\r\n - \ \"lun\": 1,\r\n \"name\": \"virtualmachinex15cf0eff_disk3_c9ba933572224d51aaeaa2958592f548\",\r\n + \ \"lun\": 1,\r\n \"name\": \"virtualmachinex15cf0eff_disk3_54f5bbb287db4c28a1a9cd9576d12333\",\r\n \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk3_c9ba933572224d51aaeaa2958592f548\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk3_54f5bbb287db4c28a1a9cd9576d12333\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n }\r\n ]\r\n },\r\n \ \"osProfile\": {\r\n \"computerName\": \"myVM\",\r\n \"adminUsername\": @@ -3049,7 +3049,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 03:59:32 GMT + - Tue, 12 Oct 2021 07:05:16 GMT expires: - '-1' pragma: @@ -3066,7 +3066,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/PutVM3Min;744,Microsoft.Compute/PutVM30Min;3727 + - Microsoft.Compute/PutVM3Min;744,Microsoft.Compute/PutVM30Min;3714 x-ms-ratelimit-remaining-subscription-writes: - '1193' status: @@ -3082,7 +3082,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff?api-version=2021-07-01 @@ -3090,28 +3090,28 @@ interactions: body: string: "{\r\n \"name\": \"virtualmachinex15cf0eff\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\": \"eastus\",\r\n - \ \"properties\": {\r\n \"vmId\": \"bc737ab2-dd03-4ec7-87f5-38e7675d78af\",\r\n + \ \"properties\": {\r\n \"vmId\": \"cb618dc1-c323-4478-acda-f534a5b3d94d\",\r\n \ \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n },\r\n \ \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"14393.4583.2108010852\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"14393.4651.2109130103\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"name\": \"myVMosdisk\",\r\n \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/myVMosdisk\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\": [\r\n {\r\n \"lun\": - 0,\r\n \"name\": \"virtualmachinex15cf0eff_disk2_1c88fce1508d45f4b29540d6613f8826\",\r\n + 0,\r\n \"name\": \"virtualmachinex15cf0eff_disk2_4d06b30d95434874803da0dece4144b9\",\r\n \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk2_1c88fce1508d45f4b29540d6613f8826\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk2_4d06b30d95434874803da0dece4144b9\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n },\r\n {\r\n - \ \"lun\": 1,\r\n \"name\": \"virtualmachinex15cf0eff_disk3_c9ba933572224d51aaeaa2958592f548\",\r\n + \ \"lun\": 1,\r\n \"name\": \"virtualmachinex15cf0eff_disk3_54f5bbb287db4c28a1a9cd9576d12333\",\r\n \ \"createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk3_c9ba933572224d51aaeaa2958592f548\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinex15cf0eff_disk3_54f5bbb287db4c28a1a9cd9576d12333\"\r\n \ },\r\n \"deleteOption\": \"Detach\",\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n }\r\n ]\r\n },\r\n \ \"osProfile\": {\r\n \"computerName\": \"myVM\",\r\n \"adminUsername\": @@ -3130,7 +3130,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:00:02 GMT + - Tue, 12 Oct 2021 07:05:47 GMT expires: - '-1' pragma: @@ -3147,7 +3147,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3996,Microsoft.Compute/LowCostGet30Min;31983 + - Microsoft.Compute/LowCostGet3Min;3976,Microsoft.Compute/LowCostGet30Min;31533 status: code: 200 message: OK @@ -3163,7 +3163,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/generalize?api-version=2021-07-01 @@ -3176,7 +3176,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:00:02 GMT + - Tue, 12 Oct 2021 07:05:47 GMT expires: - '-1' pragma: @@ -3207,7 +3207,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff/deallocate?api-version=2021-07-01 @@ -3216,17 +3216,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/48867fb2-1581-4445-a599-10385a0b36d7?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c13f043a-33da-4e25-ad02-0102099949a4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:00:02 GMT + - Tue, 12 Oct 2021 07:05:47 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/48867fb2-1581-4445-a599-10385a0b36d7?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c13f043a-33da-4e25-ad02-0102099949a4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -3237,7 +3237,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteVM3Min;239,Microsoft.Compute/DeleteVM30Min;1199 + - Microsoft.Compute/DeleteVM3Min;239,Microsoft.Compute/DeleteVM30Min;1191 x-ms-ratelimit-remaining-subscription-writes: - '1191' status: @@ -3253,14 +3253,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/48867fb2-1581-4445-a599-10385a0b36d7?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c13f043a-33da-4e25-ad02-0102099949a4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:00:03.6060751+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"48867fb2-1581-4445-a599-10385a0b36d7\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:05:47.8847402+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"c13f043a-33da-4e25-ad02-0102099949a4\"\r\n}" headers: cache-control: - no-cache @@ -3269,7 +3269,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:00:12 GMT + - Tue, 12 Oct 2021 07:05:57 GMT expires: - '-1' pragma: @@ -3286,7 +3286,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29954 + - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29894 status: code: 200 message: OK @@ -3300,15 +3300,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/48867fb2-1581-4445-a599-10385a0b36d7?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c13f043a-33da-4e25-ad02-0102099949a4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:00:03.6060751+00:00\",\r\n \"endTime\": - \"2021-09-02T04:00:30.8094113+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"48867fb2-1581-4445-a599-10385a0b36d7\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:05:47.8847402+00:00\",\r\n \"endTime\": + \"2021-10-12T07:06:18.8380038+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"c13f043a-33da-4e25-ad02-0102099949a4\"\r\n}" headers: cache-control: - no-cache @@ -3317,7 +3317,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:00:49 GMT + - Tue, 12 Oct 2021 07:06:33 GMT expires: - '-1' pragma: @@ -3334,7 +3334,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29950 + - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29890 status: code: 200 message: OK @@ -3348,10 +3348,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/48867fb2-1581-4445-a599-10385a0b36d7?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/c13f043a-33da-4e25-ad02-0102099949a4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -3361,7 +3361,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:00:49 GMT + - Tue, 12 Oct 2021 07:06:34 GMT expires: - '-1' pragma: @@ -3374,7 +3374,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29949 + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29889 status: code: 200 message: OK @@ -3390,7 +3390,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/virtualmachinex15cf0eff?api-version=2021-07-01 @@ -3401,17 +3401,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/9380c091-09d8-4c9c-bd12-55123295b6d2?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/be30cade-7efc-4730-b912-99de846b4ef5?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:00:49 GMT + - Tue, 12 Oct 2021 07:06:34 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/9380c091-09d8-4c9c-bd12-55123295b6d2?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/be30cade-7efc-4730-b912-99de846b4ef5?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -3422,7 +3422,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteVM3Min;238,Microsoft.Compute/DeleteVM30Min;1198 + - Microsoft.Compute/DeleteVM3Min;238,Microsoft.Compute/DeleteVM30Min;1190 x-ms-ratelimit-remaining-subscription-deletes: - '14993' status: @@ -3438,15 +3438,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/9380c091-09d8-4c9c-bd12-55123295b6d2?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/be30cade-7efc-4730-b912-99de846b4ef5?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:00:49.9502014+00:00\",\r\n \"endTime\": - \"2021-09-02T04:00:50.4502085+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"9380c091-09d8-4c9c-bd12-55123295b6d2\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:06:34.7131005+00:00\",\r\n \"endTime\": + \"2021-10-12T07:06:35.1349767+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"be30cade-7efc-4730-b912-99de846b4ef5\"\r\n}" headers: cache-control: - no-cache @@ -3455,7 +3455,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:00:59 GMT + - Tue, 12 Oct 2021 07:06:44 GMT expires: - '-1' pragma: @@ -3472,7 +3472,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29947 + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29887 status: code: 200 message: OK diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm_extension_image.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm_extension_image.yaml index 96124889e678..1feaf97f4206 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm_extension_image.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm_extension_image.yaml @@ -9,7 +9,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions/1.0.2?api-version=2021-07-01 @@ -17,18 +17,18 @@ interactions: body: string: "{\r\n \"properties\": {\r\n \"operatingSystem\": \"Windows\",\r\n \ \"computeRole\": \"IaaS\",\r\n \"vmScaleSetEnabled\": false,\r\n \"supportsMultipleExtensions\": - false,\r\n \"rollbackSupported\": false,\r\n \"isJsonExtension\": false\r\n - \ },\r\n \"location\": \"eastus\",\r\n \"name\": \"1.0.2\",\r\n \"id\": - \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/1.0.2\"\r\n}" + false,\r\n \"rollbackSupported\": false,\r\n \"isInternalExtension\": + false,\r\n \"isJsonExtension\": false\r\n },\r\n \"location\": \"eastus\",\r\n + \ \"name\": \"1.0.2\",\r\n \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Compute/ArtifactTypes/VMExtension/Types/VMAccessAgent/Versions/1.0.2\"\r\n}" headers: cache-control: - no-cache content-length: - - '473' + - '508' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:01:01 GMT + - Tue, 12 Oct 2021 07:06:48 GMT expires: - '-1' pragma: @@ -59,7 +59,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers/Microsoft.Compute/artifacttypes/vmextension/types?api-version=2021-07-01 @@ -82,7 +82,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:01:01 GMT + - Tue, 12 Oct 2021 07:06:48 GMT expires: - '-1' pragma: @@ -113,7 +113,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers/Microsoft.Compute/artifacttypes/vmextension/types/VMAccessAgent/versions?api-version=2021-07-01 @@ -158,7 +158,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:01:01 GMT + - Tue, 12 Oct 2021 07:06:48 GMT expires: - '-1' pragma: diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm_image.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm_image.yaml index 0ffaff5bbe2d..88d6b38a5d37 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm_image.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vm.test_compute_vm_image.yaml @@ -9,7 +9,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2019-Datacenter/versions/2019.0.20190115?api-version=2021-07-01 @@ -31,7 +31,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:01:02 GMT + - Tue, 12 Oct 2021 07:06:52 GMT expires: - '-1' pragma: @@ -62,15 +62,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus/2019-Datacenter/versions?api-version=2021-07-01 response: body: - string: "[\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"17763.1457.2009030514\",\r\n - \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2019-Datacenter/Versions/17763.1457.2009030514\"\r\n - \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"17763.1518.2010132039\",\r\n + string: "[\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"17763.1518.2010132039\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2019-Datacenter/Versions/17763.1518.2010132039\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"17763.1577.2011031610\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2019-Datacenter/Versions/17763.1577.2011031610\"\r\n @@ -96,6 +94,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2019-Datacenter/Versions/17763.2061.2107070810\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"17763.2114.2108051826\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2019-Datacenter/Versions/17763.2114.2108051826\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"17763.2183.2109130127\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2019-Datacenter/Versions/17763.2183.2109130127\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"2019.0.20181107\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2019-Datacenter/Versions/2019.0.20181107\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"2019.0.20181122\",\r\n @@ -119,7 +119,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:01:02 GMT + - Tue, 12 Oct 2021 07:06:53 GMT expires: - '-1' pragma: @@ -150,7 +150,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers?api-version=2021-07-01 @@ -186,6 +186,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/windows-8-0-vhd-server-prod-stage\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"windows-8-1-vhd-server-prod-stage\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/windows-8-1-vhd-server-prod-stage\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"windows-cvm\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/windows-cvm\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"windows-server-2012-vhd-server-prod-stage\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/windows-server-2012-vhd-server-prod-stage\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"WindowsServer\",\r\n @@ -203,11 +205,11 @@ interactions: cache-control: - no-cache content-length: - - '6130' + - '6381' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:01:03 GMT + - Tue, 12 Oct 2021 07:06:53 GMT expires: - '-1' pragma: @@ -238,7 +240,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers?api-version=2021-07-01 @@ -558,6 +560,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Bitnami\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"bizagi\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/bizagi\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"bizaptyltd1626489237351\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/bizaptyltd1626489237351\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"biztalk360\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/biztalk360\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"black-duck-software\",\r\n @@ -694,6 +698,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/cloud-cruiser\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"cloud-infrastructure-services\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/cloud-infrastructure-services\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"cloudaccelinc1628754426775\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/cloudaccelinc1628754426775\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"cloudbees\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/cloudbees\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"cloudbees-enterprise-jenkins\",\r\n @@ -814,6 +820,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/cristiesoftwareltd1599488127561\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"crunchyard\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/crunchyard\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"crunchyardltd1623835391104\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/crunchyardltd1623835391104\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"cryptocom1585727786636\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/cryptocom1585727786636\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"cryptosense1605170011574\",\r\n @@ -890,6 +898,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/dell_software\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"delphix\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/delphix\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"deltapathlimited1592886319362\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/deltapathlimited1592886319362\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"denodo\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/denodo\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"derdack\",\r\n @@ -1412,8 +1422,12 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/kepion\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"KevlarExtensions.M365SecurityHostIDS\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/KevlarExtensions.M365SecurityHostIDS\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"KevlarExtensions.M365SecurityInventory\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/KevlarExtensions.M365SecurityInventory\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"KevlarExtensions.M365SecurityInventory.NameChangeTest\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/KevlarExtensions.M365SecurityInventory.NameChangeTest\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"KevlarExtensions.M365SecurityODL\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/KevlarExtensions.M365SecurityODL\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"kinetica\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/kinetica\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"kinvolk\",\r\n @@ -1438,6 +1452,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/kyligence\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"kyvos-insights-inc\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/kyvos-insights-inc\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"lab3solutions\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/lab3solutions\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"lancom-systems\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/lancom-systems\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"lansa\",\r\n @@ -1584,6 +1600,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.ActiveDirectory.LinuxSSH\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.Azure.Applications\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Applications\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.Azure.Automation.HybridWorker\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Automation.HybridWorker\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.Azure.Automation.HybridWorker.Test\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Azure.Automation.HybridWorker.Test\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.Azure.AzureDefenderForServers\",\r\n @@ -2230,6 +2248,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.HpcPack\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.Interceptor\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Interceptor\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.M365\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.M365\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.M365SecurityConfiguration.Kevlar.Test\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.M365SecurityConfiguration.Kevlar.Test\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.ManagedIdentity\",\r\n @@ -2272,6 +2292,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.SystemCenter\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.SystemCenter.Test\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.SystemCenter.Test\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.Test.Azure.Workloads\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.Test.Azure.Workloads\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.TestSqlServer.Edp\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/Microsoft.TestSqlServer.Edp\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"Microsoft.VisualStudio.Azure.ETWTraceListenerService\",\r\n @@ -2320,6 +2342,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftCBLMariner\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"microsoftcmotest\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/microsoftcmotest\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"microsoftcorporation1620407702632\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/microsoftcorporation1620407702632\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"MicrosoftDynamicsAX\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftDynamicsAX\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"MicrosoftDynamicsGP\",\r\n @@ -2842,6 +2866,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/saltsecurity1583264669848\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"saltstack\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/saltstack\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"samsungelectronics1632860607983\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/samsungelectronics1632860607983\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"samsungsds-cello\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/samsungsds-cello\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"samsungsds_sdbe\",\r\n @@ -2868,10 +2894,14 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/sciencelogicinc1622565452194\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"scientiamobile\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/scientiamobile\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"scontainug1595751515785\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/scontainug1595751515785\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"seaqserviciossas1579029207572\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/seaqserviciossas1579029207572\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"secureworks\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/secureworks\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"securityonionsolutions\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/securityonionsolutions\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"securityonionsolutionsllc1624649205155\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/securityonionsolutionsllc1624649205155\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"securosis\",\r\n @@ -2890,6 +2920,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/SentinelOne.WindowsExtension\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"SentinelOne.WindowsExtension.Test\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/SentinelOne.WindowsExtension.Test\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"SentinelOne.WindowsExtension.Test2\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/SentinelOne.WindowsExtension.Test2\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"sentriumsl\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/sentriumsl\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"sentryone\",\r\n @@ -3232,6 +3264,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/timextender\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"tmaxsoft\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/tmaxsoft\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"tmaxsoft1608612658335\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/tmaxsoft1608612658335\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"tomsawyersoftwarecorp1613579206342\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/tomsawyersoftwarecorp1613579206342\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"topicus\",\r\n @@ -3356,6 +3390,8 @@ interactions: \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/virtamovecorp1615909247913\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"virtualpulsesro1607008728942\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/virtualpulsesro1607008728942\"\r\n + \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"virtuozzointernationalgmbh1626704951469\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/virtuozzointernationalgmbh1626704951469\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"visualsoft-center\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/visualsoft-center\"\r\n \ },\r\n {\r\n \"location\": \"eastus\",\r\n \"name\": \"vizixiotplatformretail001\",\r\n @@ -3489,11 +3525,11 @@ interactions: cache-control: - no-cache content-length: - - '368399' + - '372354' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:01:03 GMT + - Tue, 12 Oct 2021 07:06:53 GMT expires: - '-1' pragma: @@ -3522,7 +3558,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/publishers/MicrosoftWindowsServer/artifacttypes/vmimage/offers/WindowsServer/skus?api-version=2021-07-01 @@ -3730,6 +3766,10 @@ interactions: \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter\"\r\n \ },\r\n {\r\n \"properties\": {\r\n \"automaticOSUpgradeProperties\": {\r\n \"automaticOSUpgradeSupported\": false\r\n }\r\n },\r\n + \ \"location\": \"eastus\",\r\n \"name\": \"2022-datacenter-azure-edition-smalldisk\",\r\n + \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-azure-edition-smalldisk\"\r\n + \ },\r\n {\r\n \"properties\": {\r\n \"automaticOSUpgradeProperties\": + {\r\n \"automaticOSUpgradeSupported\": false\r\n }\r\n },\r\n \ \"location\": \"eastus\",\r\n \"name\": \"2022-datacenter-core\",\r\n \ \"id\": \"/Subscriptions/00000000-0000-0000-0000-000000000000/Providers/Microsoft.Compute/Locations/eastus/Publishers/MicrosoftWindowsServer/ArtifactTypes/VMImage/Offers/WindowsServer/Skus/2022-datacenter-core\"\r\n \ },\r\n {\r\n \"properties\": {\r\n \"automaticOSUpgradeProperties\": @@ -3809,11 +3849,11 @@ interactions: cache-control: - no-cache content-length: - - '29947' + - '30398' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:01:03 GMT + - Tue, 12 Oct 2021 07:06:54 GMT expires: - '-1' pragma: diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_base_2.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_base_2.yaml deleted file mode 100644 index 09b6534f1064..000000000000 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_base_2.yaml +++ /dev/null @@ -1,2663 +0,0 @@ -interactions: -- request: - body: '{"location": "eastus", "properties": {"addressSpace": {"addressPrefixes": - ["10.0.0.0/16"]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '92' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"networknamexd7d31356\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356\",\r\n - \ \"etag\": \"W/\\\"4186975d-91a7-474f-bde2-6357d1fc1c0e\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": - \"20e23dd9-6cee-4bb1-bc47-869680593f2e\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": - [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n - \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n - \ }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e93df9cf-9164-43d8-9556-d7de8e7f9d25?api-version=2021-02-01 - cache-control: - - no-cache - content-length: - - '698' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 9a5aa273-b46e-4775-8fce-298fd7a6366c - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e93df9cf-9164-43d8-9556-d7de8e7f9d25?api-version=2021-02-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e379d9fa-03ea-4c73-a8fc-639e387235bb - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"networknamexd7d31356\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356\",\r\n - \ \"etag\": \"W/\\\"6cbd9ef4-3868-4d3d-bff7-7840848dbdae\\\"\",\r\n \"type\": - \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": - \"20e23dd9-6cee-4bb1-bc47-869680593f2e\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": - [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n - \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n - \ }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '699' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:09 GMT - etag: - - W/"6cbd9ef4-3868-4d3d-bff7-7840848dbdae" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0b73affb-80ef-478e-87d7-8f0d3cdae108 - status: - code: 200 - message: OK -- request: - body: '{"properties": {"addressPrefix": "10.0.0.0/24"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '48' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356/subnets/subnetnamexd7d31356?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"subnetnamexd7d31356\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356/subnets/subnetnamexd7d31356\",\r\n - \ \"etag\": \"W/\\\"97471de8-793c-433f-a376-3e0975724e0e\\\"\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n - \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n - \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": - \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e6da860b-987d-40e0-aba3-fbaea9ebf28e?api-version=2021-02-01 - cache-control: - - no-cache - content-length: - - '629' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - cb08f71b-058e-4150-83f9-0030be644eae - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e6da860b-987d-40e0-aba3-fbaea9ebf28e?api-version=2021-02-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - ce1496b9-8031-4ccb-9044-4b555499178b - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356/subnets/subnetnamexd7d31356?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"subnetnamexd7d31356\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356/subnets/subnetnamexd7d31356\",\r\n - \ \"etag\": \"W/\\\"16c956eb-be15-4377-91d6-a03a73619391\\\"\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n - \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n - \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": - \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '630' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:12 GMT - etag: - - W/"16c956eb-be15-4377-91d6-a03a73619391" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 99947209-3a99-4ee3-a65d-b3dbfb147e75 - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "sku": {"name": "Standard"}, "properties": {"publicIPAllocationMethod": - "Static", "publicIPAddressVersion": "IPv4", "idleTimeoutInMinutes": 10}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '167' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"public_ip_address_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\",\r\n - \ \"etag\": \"W/\\\"69fad78e-6ce7-4bc0-a4bd-68ae7eec2e27\\\"\",\r\n \"location\": - \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n - \ \"resourceGuid\": \"505188d1-9560-40ec-bef9-0b7cda797462\",\r\n \"publicIPAddressVersion\": - \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": - 10,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n - \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n - \ }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0e0fdbb1-899c-4a61-8824-ea9e50ef5ae3?api-version=2021-02-01 - cache-control: - - no-cache - content-length: - - '725' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d4be61b7-f632-45ee-992f-1ab50dd0a84d - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0e0fdbb1-899c-4a61-8824-ea9e50ef5ae3?api-version=2021-02-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a3f73480-1035-4eda-9774-df16c487f067 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"public_ip_address_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\",\r\n - \ \"etag\": \"W/\\\"27d76994-d85c-4e75-b96c-49f0e6c5b50f\\\"\",\r\n \"location\": - \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"resourceGuid\": \"505188d1-9560-40ec-bef9-0b7cda797462\",\r\n \"ipAddress\": - \"52.170.197.77\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": - \"Static\",\r\n \"idleTimeoutInMinutes\": 10,\r\n \"ipTags\": []\r\n - \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": - {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '761' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:14 GMT - etag: - - W/"27d76994-d85c-4e75-b96c-49f0e6c5b50f" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - a3c7ac5d-24d0-447b-9d9c-0f51cd581404 - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "sku": {"name": "Standard"}, "properties": {"frontendIPConfigurations": - [{"name": "myFrontendIpconfiguration", "properties": {"publicIPAddress": {"id": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name"}}}], - "backendAddressPools": [{"name": "myBackendAddressPool"}], "loadBalancingRules": - [{"name": "myLoadBalancingRule", "properties": {"frontendIPConfiguration": {"id": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration"}, - "backendAddressPool": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool"}, - "probe": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe"}, - "protocol": "Tcp", "loadDistribution": "Default", "frontendPort": 80, "backendPort": - 80, "idleTimeoutInMinutes": 15, "enableFloatingIP": true, "disableOutboundSnat": - true}}], "probes": [{"name": "myProbe", "properties": {"protocol": "Http", "port": - 80, "intervalInSeconds": 15, "numberOfProbes": 2, "requestPath": "healthcheck.aspx"}}], - "outboundRules": [{"name": "myOutboundRule", "properties": {"frontendIPConfigurations": - [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration"}], - "backendAddressPool": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool"}, - "protocol": "All"}}]}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '2336' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n \"type\": - \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"3ac3d624-848d-4fef-a219-0457bcc08fd8\",\r\n - \ \"frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\r\n - \ },\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n - \ }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n - \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": - [\r\n {\r\n \"name\": \"myBackendAddressPool\",\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\": - [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n - \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n - \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n - \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \"name\": - \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n - \ },\r\n \"frontendPort\": 80,\r\n \"backendPort\": - 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": - 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": - false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": - false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\": - true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n - \ },\r\n \"backendAddressPools\": [\r\n {\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n - \ }\r\n ],\r\n \"probe\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n {\r\n - \ \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \"requestPath\": - \"healthcheck.aspx\",\r\n \"intervalInSeconds\": 15,\r\n \"numberOfProbes\": - 2,\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n - \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\r\n - \ }\r\n ],\r\n \"inboundNatRules\": [],\r\n \"outboundRules\": - [\r\n {\r\n \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"allocatedOutboundPorts\": - 1024,\r\n \"protocol\": \"All\",\r\n \"enableTcpReset\": - false,\r\n \"idleTimeoutInMinutes\": 4,\r\n \"backendAddressPool\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n - \ },\r\n \"frontendIPConfigurations\": [\r\n {\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n - \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"inboundNatPools\": - []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": - \"Regional\"\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/cdc10473-91f5-49e3-9d9f-76414488b61d?api-version=2021-02-01 - cache-control: - - no-cache - content-length: - - '8164' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 7828d64e-81d2-469d-b112-e9cda54fbf12 - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/cdc10473-91f5-49e3-9d9f-76414488b61d?api-version=2021-02-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 1392f302-7f8c-494e-9329-2e50630290c8 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-02-01 - response: - body: - string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n \"type\": - \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"3ac3d624-848d-4fef-a219-0457bcc08fd8\",\r\n - \ \"frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\r\n - \ },\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n - \ }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n - \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": - [\r\n {\r\n \"name\": \"myBackendAddressPool\",\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\": - [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n - \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n - \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n - \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \"name\": - \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n - \ },\r\n \"frontendPort\": 80,\r\n \"backendPort\": - 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": - 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": - false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": - false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\": - true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n - \ },\r\n \"backendAddressPools\": [\r\n {\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n - \ }\r\n ],\r\n \"probe\": {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\r\n - \ }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n {\r\n - \ \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n - \ \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \"requestPath\": - \"healthcheck.aspx\",\r\n \"intervalInSeconds\": 15,\r\n \"numberOfProbes\": - 2,\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n - \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\r\n - \ }\r\n ],\r\n \"inboundNatRules\": [],\r\n \"outboundRules\": - [\r\n {\r\n \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\",\r\n - \ \"etag\": \"W/\\\"c543e980-634e-470d-a377-d8e5965da2d3\\\"\",\r\n - \ \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\n \"properties\": - {\r\n \"provisioningState\": \"Succeeded\",\r\n \"allocatedOutboundPorts\": - 1024,\r\n \"protocol\": \"All\",\r\n \"enableTcpReset\": - false,\r\n \"idleTimeoutInMinutes\": 4,\r\n \"backendAddressPool\": - {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n - \ },\r\n \"frontendIPConfigurations\": [\r\n {\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n - \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"inboundNatPools\": - []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": - \"Regional\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '8164' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:44 GMT - etag: - - W/"c543e980-634e-470d-a377-d8e5965da2d3" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 91319a8c-a37f-4f3a-8b96-411b80200d13 - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "sku": {"name": "Standard_D1_v2", "tier": "Standard", - "capacity": 2}, "properties": {"upgradePolicy": {"mode": "Manual"}, "automaticRepairsPolicy": - {"enabled": true, "gracePeriod": "PT30M"}, "virtualMachineProfile": {"osProfile": - {"computerNamePrefix": "testPC", "adminUsername": "testuser", "adminPassword": - "Aa!1()-xyz"}, "storageProfile": {"imageReference": {"publisher": "MicrosoftWindowsServer", - "offer": "WindowsServer", "sku": "2016-Datacenter", "version": "latest"}, "osDisk": - {"caching": "ReadWrite", "createOption": "FromImage", "diskSizeGB": 512, "managedDisk": - {"storageAccountType": "Standard_LRS"}}}, "networkProfile": {"healthProbe": - {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe"}, - "networkInterfaceConfigurations": [{"name": "testPC", "properties": {"primary": - true, "ipConfigurations": [{"name": "testPC", "properties": {"subnet": {"id": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356/subnets/subnetnamexd7d31356"}, - "loadBalancerBackendAddressPools": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool"}]}}]}}]}, - "extensionProfile": {}}, "overprovision": true}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1655' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetd7d31356?api-version=2021-07-01 - response: - body: - string: "{\r\n \"name\": \"virtualmachinescalesetd7d31356\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetd7d31356\",\r\n - \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": - \"eastus\",\r\n \"sku\": {\r\n \"name\": \"Standard_D1_v2\",\r\n \"tier\": - \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": - true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Manual\"\r\n },\r\n - \ \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": - \"testPC\",\r\n \"adminUsername\": \"testuser\",\r\n \"windowsConfiguration\": - {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\": - true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": - true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": - {\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"createOption\": - \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": - {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n - \ \"diskSizeGB\": 512\r\n },\r\n \"imageReference\": - {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": - \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": - \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"healthProbe\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"},\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356/subnets/subnetnamexd7d31356\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"}]}}]}}]},\r\n - \ \"extensionProfile\": {\r\n \"extensions\": []\r\n }\r\n - \ },\r\n \"provisioningState\": \"Creating\",\r\n \"overprovision\": - true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": - \"1c4eb9d7-bc83-41d2-9568-97f8af4504e3\",\r\n \"automaticRepairsPolicy\": - {\r\n \"enabled\": true,\r\n \"gracePeriod\": \"PT30M\"\r\n }\r\n - \ }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/7198f1a3-6bd7-4d7b-bee1-9817da9bacac?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - cache-control: - - no-cache - content-length: - - '2884' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:48 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/CreateVMScaleSet3Min;185,Microsoft.Compute/CreateVMScaleSet30Min;931,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3725,Microsoft.Compute/VmssQueuedVMOperations;0 - x-ms-ratelimit-remaining-subscription-writes: - - '1195' - x-ms-request-charge: - - '4' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/7198f1a3-6bd7-4d7b-bee1-9817da9bacac?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:01:46.420366+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"7198f1a3-6bd7-4d7b-bee1-9817da9bacac\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:01:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29946 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/7198f1a3-6bd7-4d7b-bee1-9817da9bacac?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:01:46.420366+00:00\",\r\n \"endTime\": - \"2021-09-02T04:03:32.3903244+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"7198f1a3-6bd7-4d7b-bee1-9817da9bacac\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '183' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:03:34 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29944 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetd7d31356?api-version=2021-07-01 - response: - body: - string: "{\r\n \"name\": \"virtualmachinescalesetd7d31356\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetd7d31356\",\r\n - \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\": - \"eastus\",\r\n \"sku\": {\r\n \"name\": \"Standard_D1_v2\",\r\n \"tier\": - \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\": {\r\n \"singlePlacementGroup\": - true,\r\n \"upgradePolicy\": {\r\n \"mode\": \"Manual\"\r\n },\r\n - \ \"virtualMachineProfile\": {\r\n \"osProfile\": {\r\n \"computerNamePrefix\": - \"testPC\",\r\n \"adminUsername\": \"testuser\",\r\n \"windowsConfiguration\": - {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\": - true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": - true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"storageProfile\": - {\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \"createOption\": - \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": - {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n - \ \"diskSizeGB\": 512\r\n },\r\n \"imageReference\": - {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": - \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": - \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"healthProbe\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"},\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexd7d31356/subnets/subnetnamexd7d31356\"},\"privateIPAddressVersion\":\"IPv4\",\"loadBalancerBackendAddressPools\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"}]}}]}}]},\r\n - \ \"extensionProfile\": {\r\n \"extensions\": []\r\n }\r\n - \ },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": - true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": - \"1c4eb9d7-bc83-41d2-9568-97f8af4504e3\",\r\n \"automaticRepairsPolicy\": - {\r\n \"enabled\": true,\r\n \"gracePeriod\": \"PT30M\"\r\n }\r\n - \ }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '2885' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:03:34 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSet3Min;398,Microsoft.Compute/GetVMScaleSet30Min;2598 - status: - code: 200 - message: OK -- request: - body: '{"serviceName": "AutomaticRepairs", "action": "Suspend"}' - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '56' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetd7d31356/setOrchestrationServiceState?api-version=2021-07-01 - response: - body: - string: '' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 02 Sep 2021 04:03:34 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;239,Microsoft.Compute/VMScaleSetActions30Min;1199,Microsoft.Compute/VmssQueuedVMOperations;0 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - x-ms-request-charge: - - '0' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetd7d31356/reimage?api-version=2021-07-01 - response: - body: - string: '' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 02 Sep 2021 04:03:35 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1198,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3723,Microsoft.Compute/VmssQueuedVMOperations;0 - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - x-ms-request-charge: - - '2' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:04:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29941 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:04:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29940 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:04:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14989,Microsoft.Compute/GetOperation30Min;29935 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:04:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14988,Microsoft.Compute/GetOperation30Min;29934 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:05:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29929 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:05:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29928 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:05:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14977,Microsoft.Compute/GetOperation30Min;29923 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:05:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14976,Microsoft.Compute/GetOperation30Min;29922 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:06:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14971,Microsoft.Compute/GetOperation30Min;29917 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:06:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14970,Microsoft.Compute/GetOperation30Min;29916 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:06:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14969,Microsoft.Compute/GetOperation30Min;29911 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:06:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14968,Microsoft.Compute/GetOperation30Min;29910 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:07:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14969,Microsoft.Compute/GetOperation30Min;29905 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:07:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14968,Microsoft.Compute/GetOperation30Min;29904 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:07:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14969,Microsoft.Compute/GetOperation30Min;29899 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:07:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14968,Microsoft.Compute/GetOperation30Min;29898 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '133' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:08:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14969,Microsoft.Compute/GetOperation30Min;29893 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:08:05 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14968,Microsoft.Compute/GetOperation30Min;29892 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.546574+00:00\",\r\n \"endTime\": - \"2021-09-02T04:08:08.1424063+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"5692ff19-c4df-457f-a57d-45273ae13bef\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '183' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:08:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14971,Microsoft.Compute/GetOperation30Min;29889 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/5692ff19-c4df-457f-a57d-45273ae13bef?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 02 Sep 2021 04:08:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14970,Microsoft.Compute/GetOperation30Min;29888 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:03:35.6872142+00:00\",\r\n \"endTime\": - \"2021-09-02T04:08:08.1424063+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:08:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14969,Microsoft.Compute/GetOperation30Min;29887 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/707c2805-3a4a-4bec-91eb-8c6c1f1d5c4b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 02 Sep 2021 04:08:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14968,Microsoft.Compute/GetOperation30Min;29886 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetd7d31356/reimageall?api-version=2021-07-01 - response: - body: - string: '' - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/1bee8dda-12dc-4272-953b-8f81314d470e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 02 Sep 2021 04:08:36 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/1bee8dda-12dc-4272-953b-8f81314d470e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;237,Microsoft.Compute/VMScaleSetActions30Min;1193,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3727,Microsoft.Compute/VmssQueuedVMOperations;0 - x-ms-ratelimit-remaining-subscription-writes: - - '1195' - x-ms-request-charge: - - '2' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/1bee8dda-12dc-4272-953b-8f81314d470e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:08:36.5957563+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"1bee8dda-12dc-4272-953b-8f81314d470e\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:09:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14972,Microsoft.Compute/GetOperation30Min;29884 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/1bee8dda-12dc-4272-953b-8f81314d470e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:08:36.5957563+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"1bee8dda-12dc-4272-953b-8f81314d470e\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:09:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14975,Microsoft.Compute/GetOperation30Min;29881 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/1bee8dda-12dc-4272-953b-8f81314d470e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:08:36.5957563+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"1bee8dda-12dc-4272-953b-8f81314d470e\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:10:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14978,Microsoft.Compute/GetOperation30Min;29878 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/1bee8dda-12dc-4272-953b-8f81314d470e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:08:36.5957563+00:00\",\r\n \"endTime\": - \"2021-09-02T04:10:23.3934632+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"1bee8dda-12dc-4272-953b-8f81314d470e\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:10:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14981,Microsoft.Compute/GetOperation30Min;29875 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/1bee8dda-12dc-4272-953b-8f81314d470e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 02 Sep 2021 04:10:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14980,Microsoft.Compute/GetOperation30Min;29874 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetd7d31356?api-version=2021-07-01 - response: - body: - string: '' - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/16316a9f-d2eb-41b7-8221-5d9e22aba2ee?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - cache-control: - - no-cache - content-length: - - '0' - date: - - Thu, 02 Sep 2021 04:10:36 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/16316a9f-d2eb-41b7-8221-5d9e22aba2ee?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteVMScaleSet3Min;79,Microsoft.Compute/DeleteVMScaleSet30Min;399,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3725,Microsoft.Compute/VmssQueuedVMOperations;0 - x-ms-ratelimit-remaining-subscription-deletes: - - '14997' - x-ms-request-charge: - - '2' - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/16316a9f-d2eb-41b7-8221-5d9e22aba2ee?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:10:37.1435503+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"16316a9f-d2eb-41b7-8221-5d9e22aba2ee\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:10:47 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14979,Microsoft.Compute/GetOperation30Min;29873 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/16316a9f-d2eb-41b7-8221-5d9e22aba2ee?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:10:37.1435503+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"16316a9f-d2eb-41b7-8221-5d9e22aba2ee\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:10:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14978,Microsoft.Compute/GetOperation30Min;29872 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/16316a9f-d2eb-41b7-8221-5d9e22aba2ee?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:10:37.1435503+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"16316a9f-d2eb-41b7-8221-5d9e22aba2ee\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:11:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14981,Microsoft.Compute/GetOperation30Min;29871 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/16316a9f-d2eb-41b7-8221-5d9e22aba2ee?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:10:37.1435503+00:00\",\r\n \"endTime\": - \"2021-09-02T04:11:34.3627744+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"16316a9f-d2eb-41b7-8221-5d9e22aba2ee\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:11:58 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29869 - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_perform_maintenance.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_perform_maintenance.yaml index f677915f9a7f..2ad4a53a5e6a 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_perform_maintenance.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_perform_maintenance.yaml @@ -14,17 +14,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"networknamexfe411907\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907\",\r\n - \ \"etag\": \"W/\\\"32386bbe-70c6-4fee-b347-f348664355ca\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"f8e8c2a8-1668-48c2-8435-cf1919acf1e4\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": - \"25bab451-b857-489f-a333-73daa262060c\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"f7444c7d-90d4-45f6-942f-e972e4f6959f\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n \ }\r\n}" @@ -32,7 +32,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c7c52a4d-18b1-4ece-aadc-86ed38e8f593?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c1b49d02-9807-4cd2-a8d9-288556f9be03?api-version=2021-03-01 cache-control: - no-cache content-length: @@ -40,7 +40,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:12:03 GMT + - Tue, 12 Oct 2021 07:07:00 GMT expires: - '-1' pragma: @@ -53,9 +53,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f1a3c730-87e5-4b25-a6f6-ba84377409d9 + - 4735566f-871b-4505-a08f-3742ba13ea6a x-ms-ratelimit-remaining-subscription-writes: - - '1190' + - '1199' status: code: 201 message: Created @@ -69,10 +69,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c7c52a4d-18b1-4ece-aadc-86ed38e8f593?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c1b49d02-9807-4cd2-a8d9-288556f9be03?api-version=2021-03-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -84,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:12:06 GMT + - Tue, 12 Oct 2021 07:07:03 GMT expires: - '-1' pragma: @@ -101,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e3b2f773-1002-4da8-9253-92ee68c56a5d + - 252d505d-6714-4865-b2f3-55644acd57c4 status: code: 200 message: OK @@ -115,17 +115,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"networknamexfe411907\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907\",\r\n - \ \"etag\": \"W/\\\"c5c0cb07-2475-4396-9c34-f2df68764f1a\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"dc5f9358-a958-4646-a1df-c1e26595ff87\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": - \"25bab451-b857-489f-a333-73daa262060c\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"f7444c7d-90d4-45f6-942f-e972e4f6959f\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n \ }\r\n}" @@ -137,9 +137,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:12:06 GMT + - Tue, 12 Oct 2021 07:07:03 GMT etag: - - W/"c5c0cb07-2475-4396-9c34-f2df68764f1a" + - W/"dc5f9358-a958-4646-a1df-c1e26595ff87" expires: - '-1' pragma: @@ -156,7 +156,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 54f20442-229b-463c-9c01-516ac7e743e2 + - 17ebaf97-4dd4-4e24-87c5-2dd62802a61d status: code: 200 message: OK @@ -174,21 +174,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907/subnets/subnetnamexfe411907?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907/subnets/subnetnamexfe411907?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"subnetnamexfe411907\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907/subnets/subnetnamexfe411907\",\r\n - \ \"etag\": \"W/\\\"cfe5072e-917e-46fd-8579-0de2f0562a1a\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"454ab5ee-1039-4b5d-88cf-55b0e29e3036\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/4d71d3ea-b255-43fd-8f06-bee2509f7ec7?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/d12edf3c-2d0c-4226-89d0-f63215413399?api-version=2021-03-01 cache-control: - no-cache content-length: @@ -196,7 +196,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:12:07 GMT + - Tue, 12 Oct 2021 07:07:04 GMT expires: - '-1' pragma: @@ -209,9 +209,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 312133f0-c00e-4b31-a972-ecb418be089f + - a3071a87-c215-463c-883c-865398a2801b x-ms-ratelimit-remaining-subscription-writes: - - '1189' + - '1198' status: code: 201 message: Created @@ -225,10 +225,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/4d71d3ea-b255-43fd-8f06-bee2509f7ec7?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/d12edf3c-2d0c-4226-89d0-f63215413399?api-version=2021-03-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -240,7 +240,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:12:10 GMT + - Tue, 12 Oct 2021 07:07:07 GMT expires: - '-1' pragma: @@ -257,7 +257,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0bfdd306-8af1-4af3-a9ea-ec4646e3d3e1 + - aed9ccd6-e72e-41ff-a464-f41b86899fb1 status: code: 200 message: OK @@ -271,14 +271,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907/subnets/subnetnamexfe411907?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907/subnets/subnetnamexfe411907?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"subnetnamexfe411907\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907/subnets/subnetnamexfe411907\",\r\n - \ \"etag\": \"W/\\\"6786da2f-25ac-40a7-bd74-d75a319b6e33\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"dd873fd0-abcd-4349-a1ac-636180cbf701\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": @@ -291,9 +291,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:12:10 GMT + - Tue, 12 Oct 2021 07:07:07 GMT etag: - - W/"6786da2f-25ac-40a7-bd74-d75a319b6e33" + - W/"dd873fd0-abcd-4349-a1ac-636180cbf701" expires: - '-1' pragma: @@ -310,7 +310,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 734ac235-c7fe-4915-a632-776d4ad01969 + - ab951eb9-0d35-4fb2-9d3b-8cb18da8ee0c status: code: 200 message: OK @@ -338,7 +338,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetfe411907?api-version=2021-07-01 @@ -363,12 +363,12 @@ interactions: \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907/subnets/subnetnamexfe411907\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]}\r\n \ },\r\n \"provisioningState\": \"Creating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": - \"6f2381d0-a3f6-4d07-9481-0916dec213e2\"\r\n }\r\n}" + \"ca5869f6-e5a3-4ffb-8d31-e9b48230bad9\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/addd5b19-0b97-4057-9962-96e90e533853?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b6b464ee-2be3-4e26-ba97-eb6eb539b061?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: @@ -376,7 +376,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:12:12 GMT + - Tue, 12 Oct 2021 07:07:11 GMT expires: - '-1' pragma: @@ -389,9 +389,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/CreateVMScaleSet3Min;185,Microsoft.Compute/CreateVMScaleSet30Min;930,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3723,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/CreateVMScaleSet3Min;185,Microsoft.Compute/CreateVMScaleSet30Min;930,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3724,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1190' x-ms-request-charge: - '2' status: @@ -407,14 +407,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/addd5b19-0b97-4057-9962-96e90e533853?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b6b464ee-2be3-4e26-ba97-eb6eb539b061?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:12:11.6287125+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"addd5b19-0b97-4057-9962-96e90e533853\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:07:10.2914647+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"b6b464ee-2be3-4e26-ba97-eb6eb539b061\"\r\n}" headers: cache-control: - no-cache @@ -423,7 +423,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:12:22 GMT + - Tue, 12 Oct 2021 07:07:21 GMT expires: - '-1' pragma: @@ -440,7 +440,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29868 + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29886 status: code: 200 message: OK @@ -454,15 +454,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/addd5b19-0b97-4057-9962-96e90e533853?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b6b464ee-2be3-4e26-ba97-eb6eb539b061?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:12:11.6287125+00:00\",\r\n \"endTime\": - \"2021-09-02T04:13:40.3637995+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"addd5b19-0b97-4057-9962-96e90e533853\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:07:10.2914647+00:00\",\r\n \"endTime\": + \"2021-10-12T07:08:17.8231063+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"b6b464ee-2be3-4e26-ba97-eb6eb539b061\"\r\n}" headers: cache-control: - no-cache @@ -471,7 +471,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:13:59 GMT + - Tue, 12 Oct 2021 07:08:59 GMT expires: - '-1' pragma: @@ -488,7 +488,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29866 + - Microsoft.Compute/GetOperation3Min;14991,Microsoft.Compute/GetOperation30Min;29884 status: code: 200 message: OK @@ -502,7 +502,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetfe411907?api-version=2021-07-01 @@ -527,7 +527,7 @@ interactions: \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexfe411907/subnets/subnetnamexfe411907\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]}\r\n \ },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": - \"6f2381d0-a3f6-4d07-9481-0916dec213e2\"\r\n }\r\n}" + \"ca5869f6-e5a3-4ffb-8d31-e9b48230bad9\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -536,7 +536,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:13:59 GMT + - Tue, 12 Oct 2021 07:08:59 GMT expires: - '-1' pragma: @@ -553,7 +553,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSet3Min;396,Microsoft.Compute/GetVMScaleSet30Min;2593 + - Microsoft.Compute/GetVMScaleSet3Min;398,Microsoft.Compute/GetVMScaleSet30Min;2597 status: code: 200 message: OK @@ -567,85 +567,40 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetfe411907/virtualmachines/0/instanceView?api-version=2021-07-01 response: body: - string: "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": - \"The entity was not found in this Azure location.\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '115' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:17:00 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSetVM3Min;999,Microsoft.Compute/GetVMScaleSetVM30Min;4999,Microsoft.Compute/VMScaleSetVMViews3Min;4999 - x-ms-request-charge: - - '1' - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetfe411907/virtualmachines/1/instanceView?api-version=2021-07-01 - response: - body: - string: "{\r\n \"placementGroupId\": \"38005476-ed00-47e7-af09-31952882452e\",\r\n - \ \"platformUpdateDomain\": 1,\r\n \"platformFaultDomain\": 1,\r\n \"computerName\": - \"testPC000001\",\r\n \"osName\": \"Windows Server 2016 Datacenter\",\r\n - \ \"osVersion\": \"Microsoft Windows NT 10.0.14393.0\",\r\n \"vmAgent\": - {\r\n \"vmAgentVersion\": \"2.7.41491.1010\",\r\n \"statuses\": [\r\n - \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": + string: "{\r\n \"placementGroupId\": \"7093d997-e6d3-4a38-a347-07eb63601d9c\",\r\n + \ \"platformUpdateDomain\": 0,\r\n \"platformFaultDomain\": 0,\r\n \"computerName\": + \"testPC000000\",\r\n \"osName\": \"Windows Server 2016 Datacenter\",\r\n + \ \"osVersion\": \"Windows:Windows Server 2016 Datacenter-10.0.14393.4651\",\r\n + \ \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.7.41491.1024\",\r\n \"statuses\": + [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\",\r\n \"message\": \"GuestAgent is running and processing the extensions.\",\r\n \"time\": - \"2021-09-02T04:16:51+00:00\"\r\n }\r\n ]\r\n },\r\n \"disks\": - [\r\n {\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_7f7865e6c778436e90b6e382dda83932\",\r\n + \"2021-10-12T07:11:12+00:00\"\r\n }\r\n ]\r\n },\r\n \"disks\": + [\r\n {\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_e34a823dc6b9443bbac8218b8cfc2122\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2021-09-02T04:12:16.691229+00:00\"\r\n + succeeded\",\r\n \"time\": \"2021-10-12T07:08:18.4481068+00:00\"\r\n \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": \"V1\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\",\r\n - \ \"time\": \"2021-09-02T04:13:40.3168583+00:00\"\r\n },\r\n {\r\n + \ \"time\": \"2021-10-12T07:09:07.6828006+00:00\"\r\n },\r\n {\r\n \ \"code\": \"PowerState/running\",\r\n \"level\": \"Info\",\r\n \ \"displayStatus\": \"VM running\"\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '1317' + - '1339' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:00 GMT + - Tue, 12 Oct 2021 07:11:59 GMT expires: - '-1' pragma: @@ -662,7 +617,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSetVM3Min;998,Microsoft.Compute/GetVMScaleSetVM30Min;4998,Microsoft.Compute/VMScaleSetVMViews3Min;4998 + - Microsoft.Compute/GetVMScaleSetVM3Min;999,Microsoft.Compute/GetVMScaleSetVM30Min;4999,Microsoft.Compute/VMScaleSetVMViews3Min;4999 x-ms-request-charge: - '1' status: @@ -682,14 +637,14 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetfe411907/performMaintenance?api-version=2021-07-01 response: body: string: "{\r\n \"error\": {\r\n \"code\": \"OperationNotAllowed\",\r\n \"message\": - \"Operation 'performMaintenance' is not allowed on VM 'virtualmachinescalesetfe411907_1' + \"Operation 'performMaintenance' is not allowed on VM 'virtualmachinescalesetfe411907_0' since the Subscription of this VM is not eligible.\"\r\n }\r\n}" headers: cache-control: @@ -699,7 +654,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:00 GMT + - Tue, 12 Oct 2021 07:12:00 GMT expires: - '-1' pragma: @@ -712,7 +667,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;239,Microsoft.Compute/VMScaleSetActions30Min;1189 + - Microsoft.Compute/VMScaleSetActions3Min;239,Microsoft.Compute/VMScaleSetActions30Min;1199 x-ms-ratelimit-remaining-subscription-writes: - '1190' status: @@ -730,14 +685,14 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetfe411907/virtualmachines/1/performMaintenance?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetfe411907/virtualmachines/0/performMaintenance?api-version=2021-07-01 response: body: string: "{\r\n \"error\": {\r\n \"code\": \"OperationNotAllowed\",\r\n \"message\": - \"Operation 'performMaintenance' is not allowed on VM 'virtualmachinescalesetfe411907_1' + \"Operation 'performMaintenance' is not allowed on VM 'virtualmachinescalesetfe411907_0' since the Subscription of this VM is not eligible.\"\r\n }\r\n}" headers: cache-control: @@ -747,7 +702,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:00 GMT + - Tue, 12 Oct 2021 07:12:00 GMT expires: - '-1' pragma: @@ -760,7 +715,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1188 + - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1198 x-ms-ratelimit-remaining-subscription-writes: - '1189' status: @@ -778,7 +733,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetfe411907?api-version=2021-07-01 @@ -789,17 +744,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/994552d5-b2c2-4d2c-b228-f9a5a82ee815?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3b8246dc-e9a6-48bb-8fd5-494d6993f792?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:17:00 GMT + - Tue, 12 Oct 2021 07:12:00 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/994552d5-b2c2-4d2c-b228-f9a5a82ee815?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3b8246dc-e9a6-48bb-8fd5-494d6993f792?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -810,9 +765,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteVMScaleSet3Min;79,Microsoft.Compute/DeleteVMScaleSet30Min;398,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3728,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/DeleteVMScaleSet3Min;79,Microsoft.Compute/DeleteVMScaleSet30Min;399,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3725,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-deletes: - - '14991' + - '14992' x-ms-request-charge: - '1' status: @@ -828,23 +783,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/994552d5-b2c2-4d2c-b228-f9a5a82ee815?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3b8246dc-e9a6-48bb-8fd5-494d6993f792?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:17:01.3183771+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"994552d5-b2c2-4d2c-b228-f9a5a82ee815\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:12:00.840083+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"3b8246dc-e9a6-48bb-8fd5-494d6993f792\"\r\n}" headers: cache-control: - no-cache content-length: - - '134' + - '133' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:10 GMT + - Tue, 12 Oct 2021 07:12:10 GMT expires: - '-1' pragma: @@ -861,7 +816,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29866 + - Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29893 status: code: 200 message: OK @@ -875,23 +830,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/994552d5-b2c2-4d2c-b228-f9a5a82ee815?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3b8246dc-e9a6-48bb-8fd5-494d6993f792?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:17:01.3183771+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"994552d5-b2c2-4d2c-b228-f9a5a82ee815\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:12:00.840083+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"3b8246dc-e9a6-48bb-8fd5-494d6993f792\"\r\n}" headers: cache-control: - no-cache content-length: - - '134' + - '133' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:21 GMT + - Tue, 12 Oct 2021 07:12:21 GMT expires: - '-1' pragma: @@ -908,7 +863,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29865 + - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29892 status: code: 200 message: OK @@ -922,24 +877,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/994552d5-b2c2-4d2c-b228-f9a5a82ee815?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3b8246dc-e9a6-48bb-8fd5-494d6993f792?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:17:01.3183771+00:00\",\r\n \"endTime\": - \"2021-09-02T04:17:51.3187723+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"994552d5-b2c2-4d2c-b228-f9a5a82ee815\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:12:00.840083+00:00\",\r\n \"endTime\": + \"2021-10-12T07:12:41.4184367+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"3b8246dc-e9a6-48bb-8fd5-494d6993f792\"\r\n}" headers: cache-control: - no-cache content-length: - - '184' + - '183' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:51 GMT + - Tue, 12 Oct 2021 07:12:52 GMT expires: - '-1' pragma: @@ -956,7 +911,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29863 + - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29890 status: code: 200 message: OK diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_vm.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_vm.yaml index 252daf7649d9..2c5ff257297c 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_vm.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_vm.yaml @@ -14,17 +14,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"networknamex8c68120d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d\",\r\n - \ \"etag\": \"W/\\\"254038ad-ab43-4219-a81b-92f85dfbf41c\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"e7b46ff0-2e4c-49f1-9aed-2d53c9fdf274\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": - \"12e6562e-9226-40c7-b588-96f0bc0a6b33\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"2d070d85-bb49-4fb8-a973-8c14cb778686\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n \ }\r\n}" @@ -32,7 +32,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3756dfe7-cda4-40d9-9283-12f99038a667?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/136f341d-b58e-4a12-ab28-a3c92b748e9a?api-version=2021-03-01 cache-control: - no-cache content-length: @@ -40,7 +40,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:54 GMT + - Tue, 12 Oct 2021 07:12:56 GMT expires: - '-1' pragma: @@ -53,9 +53,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 020d7580-b440-4636-9c6c-f24cbf450d2c + - 18236eb5-d5c8-459a-af7e-b65a199d1a95 x-ms-ratelimit-remaining-subscription-writes: - - '1188' + - '1189' status: code: 201 message: Created @@ -69,10 +69,56 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3756dfe7-cda4-40d9-9283-12f99038a667?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/136f341d-b58e-4a12-ab28-a3c92b748e9a?api-version=2021-03-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 12 Oct 2021 07:12:59 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 028abbd2-4906-4c58-8b8b-90adf18ab268 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/136f341d-b58e-4a12-ab28-a3c92b748e9a?api-version=2021-03-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -84,7 +130,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:57 GMT + - Tue, 12 Oct 2021 07:13:09 GMT expires: - '-1' pragma: @@ -101,7 +147,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - bb68a01e-5221-4753-9e3b-262208f35294 + - 73585858-9623-4136-93e6-00a46e3d29b9 status: code: 200 message: OK @@ -115,17 +161,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"networknamex8c68120d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d\",\r\n - \ \"etag\": \"W/\\\"d7f60b9b-d70d-4886-8741-d2594343b438\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"75769609-74ac-49dd-95a7-f655ad1415f3\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": - \"12e6562e-9226-40c7-b588-96f0bc0a6b33\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"2d070d85-bb49-4fb8-a973-8c14cb778686\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n \ }\r\n}" @@ -137,9 +183,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:57 GMT + - Tue, 12 Oct 2021 07:13:09 GMT etag: - - W/"d7f60b9b-d70d-4886-8741-d2594343b438" + - W/"75769609-74ac-49dd-95a7-f655ad1415f3" expires: - '-1' pragma: @@ -156,7 +202,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 571f01f9-c158-4bfc-b316-32e21caab911 + - d8874803-7d85-4655-9356-179a517e3946 status: code: 200 message: OK @@ -174,21 +220,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"subnetnamex8c68120d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d\",\r\n - \ \"etag\": \"W/\\\"dfb9dbb3-f85c-4993-b191-f024fda43b8b\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"269b8d05-24be-4ee5-8714-1559bb089a47\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/55a8b2cb-7c76-4437-9d71-27fed6cfeac1?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/f0349818-1f9d-40b8-9051-c672bc84a2a6?api-version=2021-03-01 cache-control: - no-cache content-length: @@ -196,7 +242,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:17:57 GMT + - Tue, 12 Oct 2021 07:13:10 GMT expires: - '-1' pragma: @@ -209,9 +255,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 50b50a9e-12ff-4d6e-abf9-35cf5ff9fc75 + - 7fa2d406-d396-4425-b57b-02f81608ec37 x-ms-ratelimit-remaining-subscription-writes: - - '1187' + - '1188' status: code: 201 message: Created @@ -225,10 +271,56 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/f0349818-1f9d-40b8-9051-c672bc84a2a6?api-version=2021-03-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 12 Oct 2021 07:13:13 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 2e88f0f5-166d-41a8-8bf6-a03fe1ab9cb7 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/55a8b2cb-7c76-4437-9d71-27fed6cfeac1?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/f0349818-1f9d-40b8-9051-c672bc84a2a6?api-version=2021-03-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -240,7 +332,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:18:00 GMT + - Tue, 12 Oct 2021 07:13:23 GMT expires: - '-1' pragma: @@ -257,7 +349,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - dcdb8521-2014-4097-940f-9cbec556f75c + - 77af5fb3-33a8-4e63-9711-fcd1c8c55262 status: code: 200 message: OK @@ -271,14 +363,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"subnetnamex8c68120d\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d\",\r\n - \ \"etag\": \"W/\\\"6b08a197-5a32-4dc9-8857-2e3a2ecff696\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"069e49ad-acd3-43fd-b9fe-8b054559d5bc\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": @@ -291,9 +383,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:18:00 GMT + - Tue, 12 Oct 2021 07:13:23 GMT etag: - - W/"6b08a197-5a32-4dc9-8857-2e3a2ecff696" + - W/"069e49ad-acd3-43fd-b9fe-8b054559d5bc" expires: - '-1' pragma: @@ -310,7 +402,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2022e9a8-118f-4d60-8cdd-487360cb852d + - 76bcf3ca-ce01-439e-a4c5-2fb02dce766f status: code: 200 message: OK @@ -338,7 +430,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d?api-version=2021-07-01 @@ -363,12 +455,12 @@ interactions: \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]}\r\n \ },\r\n \"provisioningState\": \"Creating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": - \"e6167767-ffdd-47ba-bc91-df084faec608\"\r\n }\r\n}" + \"5f6963fe-c2c0-4f24-a9a0-7f522d9568c0\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b313e56b-016d-4b98-b7c6-e167beedb138?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/93b9b7b7-f34f-4c8f-9a38-51d170495867?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: @@ -376,7 +468,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:18:03 GMT + - Tue, 12 Oct 2021 07:13:28 GMT expires: - '-1' pragma: @@ -389,9 +481,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/CreateVMScaleSet3Min;185,Microsoft.Compute/CreateVMScaleSet30Min;929,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3726,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/CreateVMScaleSet3Min;185,Microsoft.Compute/CreateVMScaleSet30Min;929,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3723,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1195' x-ms-request-charge: - '2' status: @@ -407,14 +499,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b313e56b-016d-4b98-b7c6-e167beedb138?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/93b9b7b7-f34f-4c8f-9a38-51d170495867?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:18:01.7251077+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"b313e56b-016d-4b98-b7c6-e167beedb138\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:13:26.7312149+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"93b9b7b7-f34f-4c8f-9a38-51d170495867\"\r\n}" headers: cache-control: - no-cache @@ -423,7 +515,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:18:12 GMT + - Tue, 12 Oct 2021 07:13:38 GMT expires: - '-1' pragma: @@ -440,7 +532,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29862 + - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29889 status: code: 200 message: OK @@ -454,15 +546,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b313e56b-016d-4b98-b7c6-e167beedb138?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/93b9b7b7-f34f-4c8f-9a38-51d170495867?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:18:01.7251077+00:00\",\r\n \"endTime\": - \"2021-09-02T04:19:50.1019932+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"b313e56b-016d-4b98-b7c6-e167beedb138\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:13:26.7312149+00:00\",\r\n \"endTime\": + \"2021-10-12T07:14:44.4660863+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"93b9b7b7-f34f-4c8f-9a38-51d170495867\"\r\n}" headers: cache-control: - no-cache @@ -471,7 +563,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:19:50 GMT + - Tue, 12 Oct 2021 07:15:15 GMT expires: - '-1' pragma: @@ -488,7 +580,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29861 + - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29895 status: code: 200 message: OK @@ -502,7 +594,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d?api-version=2021-07-01 @@ -527,7 +619,7 @@ interactions: \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]}\r\n \ },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": - \"e6167767-ffdd-47ba-bc91-df084faec608\"\r\n }\r\n}" + \"5f6963fe-c2c0-4f24-a9a0-7f522d9568c0\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -536,7 +628,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:19:50 GMT + - Tue, 12 Oct 2021 07:15:15 GMT expires: - '-1' pragma: @@ -553,7 +645,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSet3Min;397,Microsoft.Compute/GetVMScaleSet30Min;2589 + - Microsoft.Compute/GetVMScaleSet3Min;395,Microsoft.Compute/GetVMScaleSet30Min;2591 status: code: 200 message: OK @@ -567,40 +659,85 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0/instanceView?api-version=2021-07-01 response: body: - string: "{\r\n \"placementGroupId\": \"35b46b0d-7127-4f6a-8e62-125c4dd517bd\",\r\n - \ \"platformUpdateDomain\": 0,\r\n \"platformFaultDomain\": 0,\r\n \"computerName\": - \"testPC000000\",\r\n \"osName\": \"Windows Server 2016 Datacenter\",\r\n - \ \"osVersion\": \"Microsoft Windows NT 10.0.14393.0\",\r\n \"vmAgent\": - {\r\n \"vmAgentVersion\": \"2.7.41491.1010\",\r\n \"statuses\": [\r\n - \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": + string: "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": + \"The entity was not found in this Azure location.\"\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '115' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 12 Oct 2021 07:18:16 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-ratelimit-remaining-resource: + - Microsoft.Compute/GetVMScaleSetVM3Min;999,Microsoft.Compute/GetVMScaleSetVM30Min;4998,Microsoft.Compute/VMScaleSetVMViews3Min;4999 + x-ms-request-charge: + - '1' + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1/instanceView?api-version=2021-07-01 + response: + body: + string: "{\r\n \"placementGroupId\": \"9f3653dd-70b2-4933-a0d5-ea8c6656031a\",\r\n + \ \"platformUpdateDomain\": 1,\r\n \"platformFaultDomain\": 1,\r\n \"computerName\": + \"testPC000001\",\r\n \"osName\": \"Windows Server 2016 Datacenter\",\r\n + \ \"osVersion\": \"Windows:Windows Server 2016 Datacenter-10.0.14393.4651\",\r\n + \ \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.7.41491.1024\",\r\n \"statuses\": + [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\",\r\n \"message\": \"GuestAgent is running and processing the extensions.\",\r\n \"time\": - \"2021-09-02T04:22:37+00:00\"\r\n }\r\n ]\r\n },\r\n \"disks\": - [\r\n {\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_78f0d7d835f740a79c068d3a92c0b7cc\",\r\n + \"2021-10-12T07:17:47+00:00\"\r\n }\r\n ]\r\n },\r\n \"disks\": + [\r\n {\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_889c6e8a34cf4935b8b8af7a599b5d4b\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2021-09-02T04:19:50.6332441+00:00\"\r\n + succeeded\",\r\n \"time\": \"2021-10-12T07:13:31.5437378+00:00\"\r\n \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": \"V1\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\",\r\n - \ \"time\": \"2021-09-02T04:20:27.7739531+00:00\"\r\n },\r\n {\r\n + \ \"time\": \"2021-10-12T07:14:44.3879295+00:00\"\r\n },\r\n {\r\n \ \"code\": \"PowerState/running\",\r\n \"level\": \"Info\",\r\n \ \"displayStatus\": \"VM running\"\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '1318' + - '1339' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:22:50 GMT + - Tue, 12 Oct 2021 07:18:16 GMT expires: - '-1' pragma: @@ -617,7 +754,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSetVM3Min;999,Microsoft.Compute/GetVMScaleSetVM30Min;4997,Microsoft.Compute/VMScaleSetVMViews3Min;4999 + - Microsoft.Compute/GetVMScaleSetVM3Min;998,Microsoft.Compute/GetVMScaleSetVM30Min;4997,Microsoft.Compute/VMScaleSetVMViews3Min;4998 x-ms-request-charge: - '1' status: @@ -633,35 +770,35 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1?api-version=2021-07-01 response: body: - string: "{\r\n \"name\": \"virtualmachinescaleset8c68120d_0\",\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/0\",\r\n + string: "{\r\n \"name\": \"virtualmachinescaleset8c68120d_1\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/1\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets/virtualMachines\",\r\n - \ \"location\": \"eastus\",\r\n \"instanceId\": \"0\",\r\n \"sku\": {\r\n + \ \"location\": \"eastus\",\r\n \"instanceId\": \"1\",\r\n \"sku\": {\r\n \ \"name\": \"Standard_D1_v2\",\r\n \"tier\": \"Standard\"\r\n },\r\n \ \"properties\": {\r\n \"latestModelApplied\": true,\r\n \"modelDefinitionApplied\": \"VirtualMachineScaleSet\",\r\n \"networkProfileConfiguration\": {\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n - \ \"vmId\": \"87fd7ff9-ebe6-427f-ac65-87fd66c60d6c\",\r\n \"hardwareProfile\": + \ \"vmId\": \"66b7eecb-159b-497a-aad6-5b2ceae62e36\",\r\n \"hardwareProfile\": {},\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"14393.4583.2108010852\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": - \"Windows\",\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_78f0d7d835f740a79c068d3a92c0b7cc\",\r\n + \"14393.4651.2109130103\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"Windows\",\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_889c6e8a34cf4935b8b8af7a599b5d4b\",\r\n \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinescalesvirtualmachinescaleseOS__1_78f0d7d835f740a79c068d3a92c0b7cc\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinescalesvirtualmachinescaleseOS__1_889c6e8a34cf4935b8b8af7a599b5d4b\"\r\n \ },\r\n \"diskSizeGB\": 512\r\n },\r\n \"dataDisks\": - []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"testPC000000\",\r\n + []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"testPC000001\",\r\n \ \"adminUsername\": \"testuser\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": - {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/0/networkInterfaces/testPC\"}]},\r\n + {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/1/networkInterfaces/testPC\"}]},\r\n \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" headers: cache-control: @@ -671,7 +808,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:22:50 GMT + - Tue, 12 Oct 2021 07:18:16 GMT expires: - '-1' pragma: @@ -688,7 +825,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSetVM3Min;998,Microsoft.Compute/GetVMScaleSetVM30Min;4996,Microsoft.Compute/VMScaleSetVMViews3Min;4998 + - Microsoft.Compute/GetVMScaleSetVM3Min;997,Microsoft.Compute/GetVMScaleSetVM30Min;4996,Microsoft.Compute/VMScaleSetVMViews3Min;4997 x-ms-request-charge: - '1' status: @@ -708,39 +845,39 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1?api-version=2021-07-01 response: body: - string: "{\r\n \"name\": \"virtualmachinescaleset8c68120d_0\",\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/0\",\r\n + string: "{\r\n \"name\": \"virtualmachinescaleset8c68120d_1\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/1\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets/virtualMachines\",\r\n - \ \"location\": \"eastus\",\r\n \"instanceId\": \"0\",\r\n \"sku\": {\r\n + \ \"location\": \"eastus\",\r\n \"instanceId\": \"1\",\r\n \"sku\": {\r\n \ \"name\": \"Standard_D1_v2\",\r\n \"tier\": \"Standard\"\r\n },\r\n \ \"properties\": {\r\n \"latestModelApplied\": true,\r\n \"modelDefinitionApplied\": \"VirtualMachineScaleSet\",\r\n \"networkProfileConfiguration\": {\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n - \ \"vmId\": \"87fd7ff9-ebe6-427f-ac65-87fd66c60d6c\",\r\n \"hardwareProfile\": + \ \"vmId\": \"66b7eecb-159b-497a-aad6-5b2ceae62e36\",\r\n \"hardwareProfile\": {},\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"14393.4583.2108010852\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": - \"Windows\",\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_78f0d7d835f740a79c068d3a92c0b7cc\",\r\n + \"14393.4651.2109130103\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"Windows\",\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_889c6e8a34cf4935b8b8af7a599b5d4b\",\r\n \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinescalesvirtualmachinescaleseOS__1_78f0d7d835f740a79c068d3a92c0b7cc\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinescalesvirtualmachinescaleseOS__1_889c6e8a34cf4935b8b8af7a599b5d4b\"\r\n \ },\r\n \"diskSizeGB\": 512\r\n },\r\n \"dataDisks\": - []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"testPC000000\",\r\n + []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"testPC000001\",\r\n \ \"adminUsername\": \"testuser\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": - {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/0/networkInterfaces/testPC\"}]},\r\n + {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/1/networkInterfaces/testPC\"}]},\r\n \ \"provisioningState\": \"Updating\"\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e2c7ed3c-e2cb-46fd-ad07-ecf95a6fde7c?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/dac9f666-64b9-4efc-9096-6f71754717fb?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: @@ -748,7 +885,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:22:51 GMT + - Tue, 12 Oct 2021 07:18:17 GMT expires: - '-1' pragma: @@ -765,9 +902,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;239,Microsoft.Compute/VMScaleSetActions30Min;1187,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/VMScaleSetActions3Min;239,Microsoft.Compute/VMScaleSetActions30Min;1197,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - - '1193' + - '1192' x-ms-request-charge: - '0' status: @@ -783,15 +920,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e2c7ed3c-e2cb-46fd-ad07-ecf95a6fde7c?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/dac9f666-64b9-4efc-9096-6f71754717fb?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:22:51.1500262+00:00\",\r\n \"endTime\": - \"2021-09-02T04:22:51.2593814+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"e2c7ed3c-e2cb-46fd-ad07-ecf95a6fde7c\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:18:17.1075455+00:00\",\r\n \"endTime\": + \"2021-10-12T07:18:17.2481443+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"dac9f666-64b9-4efc-9096-6f71754717fb\"\r\n}" headers: cache-control: - no-cache @@ -800,7 +937,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:23:22 GMT + - Tue, 12 Oct 2021 07:18:47 GMT expires: - '-1' pragma: @@ -817,7 +954,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29878 + - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29893 status: code: 200 message: OK @@ -831,35 +968,35 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1?api-version=2021-07-01 response: body: - string: "{\r\n \"name\": \"virtualmachinescaleset8c68120d_0\",\r\n \"id\": - \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/0\",\r\n + string: "{\r\n \"name\": \"virtualmachinescaleset8c68120d_1\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/1\",\r\n \ \"type\": \"Microsoft.Compute/virtualMachineScaleSets/virtualMachines\",\r\n - \ \"location\": \"eastus\",\r\n \"instanceId\": \"0\",\r\n \"sku\": {\r\n + \ \"location\": \"eastus\",\r\n \"instanceId\": \"1\",\r\n \"sku\": {\r\n \ \"name\": \"Standard_D1_v2\",\r\n \"tier\": \"Standard\"\r\n },\r\n \ \"properties\": {\r\n \"latestModelApplied\": true,\r\n \"modelDefinitionApplied\": \"VirtualMachineScaleSet\",\r\n \"networkProfileConfiguration\": {\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamex8c68120d/subnets/subnetnamex8c68120d\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]},\r\n - \ \"vmId\": \"87fd7ff9-ebe6-427f-ac65-87fd66c60d6c\",\r\n \"hardwareProfile\": + \ \"vmId\": \"66b7eecb-159b-497a-aad6-5b2ceae62e36\",\r\n \"hardwareProfile\": {},\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\": \"latest\",\r\n \"exactVersion\": - \"14393.4583.2108010852\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": - \"Windows\",\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_78f0d7d835f740a79c068d3a92c0b7cc\",\r\n + \"14393.4651.2109130103\"\r\n },\r\n \"osDisk\": {\r\n \"osType\": + \"Windows\",\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_889c6e8a34cf4935b8b8af7a599b5d4b\",\r\n \ \"createOption\": \"FromImage\",\r\n \"caching\": \"ReadWrite\",\r\n \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\",\r\n - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinescalesvirtualmachinescaleseOS__1_78f0d7d835f740a79c068d3a92c0b7cc\"\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/disks/virtualmachinescalesvirtualmachinescaleseOS__1_889c6e8a34cf4935b8b8af7a599b5d4b\"\r\n \ },\r\n \"diskSizeGB\": 512\r\n },\r\n \"dataDisks\": - []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"testPC000000\",\r\n + []\r\n },\r\n \"osProfile\": {\r\n \"computerName\": \"testPC000001\",\r\n \ \"adminUsername\": \"testuser\",\r\n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\": true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"networkProfile\": - {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/0/networkInterfaces/testPC\"}]},\r\n + {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualMachines/1/networkInterfaces/testPC\"}]},\r\n \ \"provisioningState\": \"Succeeded\"\r\n }\r\n}" headers: cache-control: @@ -869,7 +1006,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:23:22 GMT + - Tue, 12 Oct 2021 07:18:47 GMT expires: - '-1' pragma: @@ -886,7 +1023,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSetVM3Min;997,Microsoft.Compute/GetVMScaleSetVM30Min;4995,Microsoft.Compute/VMScaleSetVMViews3Min;4997 + - Microsoft.Compute/GetVMScaleSetVM3Min;996,Microsoft.Compute/GetVMScaleSetVM30Min;4995,Microsoft.Compute/VMScaleSetVMViews3Min;4996 x-ms-request-charge: - '1' status: @@ -904,26 +1041,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0/restart?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1/restart?api-version=2021-07-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e7102e4c-c427-46a5-8f0e-d8f8492564b8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/24b70ab8-609c-411d-957d-782e0400eaaf?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:23:22 GMT + - Tue, 12 Oct 2021 07:18:47 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e7102e4c-c427-46a5-8f0e-d8f8492564b8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/24b70ab8-609c-411d-957d-782e0400eaaf?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -934,7 +1071,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1186,Microsoft.Compute/VMScaleSetVMActions3Min;199,Microsoft.Compute/VMScaleSetVMActions30Min;999,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3728,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1196,Microsoft.Compute/VMScaleSetVMActions3Min;199,Microsoft.Compute/VMScaleSetVMActions30Min;999,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3725,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1188' x-ms-request-charge: @@ -952,15 +1089,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e7102e4c-c427-46a5-8f0e-d8f8492564b8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/24b70ab8-609c-411d-957d-782e0400eaaf?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:23:22.1190283+00:00\",\r\n \"endTime\": - \"2021-09-02T04:23:23.4940159+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"e7102e4c-c427-46a5-8f0e-d8f8492564b8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:18:48.4044947+00:00\",\r\n \"endTime\": + \"2021-10-12T07:18:49.7482743+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"24b70ab8-609c-411d-957d-782e0400eaaf\"\r\n}" headers: cache-control: - no-cache @@ -969,7 +1106,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:23:52 GMT + - Tue, 12 Oct 2021 07:19:18 GMT expires: - '-1' pragma: @@ -986,7 +1123,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29876 + - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29889 status: code: 200 message: OK @@ -1000,10 +1137,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e7102e4c-c427-46a5-8f0e-d8f8492564b8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/24b70ab8-609c-411d-957d-782e0400eaaf?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1013,7 +1150,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:23:52 GMT + - Tue, 12 Oct 2021 07:19:18 GMT expires: - '-1' pragma: @@ -1026,7 +1163,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29875 + - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29888 status: code: 200 message: OK @@ -1042,26 +1179,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0/poweroff?skipShutdown=false&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1/poweroff?skipShutdown=false&api-version=2021-07-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b287c469-8fba-4e2b-a7ba-782cb7dd5ac8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/eab46c7d-4275-4d39-a75a-ab5be2d17ee8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:23:52 GMT + - Tue, 12 Oct 2021 07:19:19 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b287c469-8fba-4e2b-a7ba-782cb7dd5ac8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/eab46c7d-4275-4d39-a75a-ab5be2d17ee8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1072,7 +1209,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteVMScaleSetVM3Min;239,Microsoft.Compute/DeleteVMScaleSetVM30Min;1199,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3727,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/DeleteVMScaleSetVM3Min;239,Microsoft.Compute/DeleteVMScaleSetVM30Min;1199,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3724,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1187' x-ms-request-charge: @@ -1090,15 +1227,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b287c469-8fba-4e2b-a7ba-782cb7dd5ac8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/eab46c7d-4275-4d39-a75a-ab5be2d17ee8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:23:52.4317259+00:00\",\r\n \"endTime\": - \"2021-09-02T04:24:03.8068482+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"b287c469-8fba-4e2b-a7ba-782cb7dd5ac8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:19:19.1390366+00:00\",\r\n \"endTime\": + \"2021-10-12T07:19:39.5297456+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"eab46c7d-4275-4d39-a75a-ab5be2d17ee8\"\r\n}" headers: cache-control: - no-cache @@ -1107,7 +1244,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:24:22 GMT + - Tue, 12 Oct 2021 07:19:49 GMT expires: - '-1' pragma: @@ -1124,7 +1261,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29873 + - Microsoft.Compute/GetOperation3Min;14988,Microsoft.Compute/GetOperation30Min;29883 status: code: 200 message: OK @@ -1138,10 +1275,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/b287c469-8fba-4e2b-a7ba-782cb7dd5ac8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/eab46c7d-4275-4d39-a75a-ab5be2d17ee8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1151,7 +1288,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:24:22 GMT + - Tue, 12 Oct 2021 07:19:49 GMT expires: - '-1' pragma: @@ -1164,7 +1301,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29872 + - Microsoft.Compute/GetOperation3Min;14987,Microsoft.Compute/GetOperation30Min;29882 status: code: 200 message: OK @@ -1180,26 +1317,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0/start?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1/start?api-version=2021-07-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e73aaf0b-1bdc-4988-9da6-7aea56bde6c8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/60aa2498-873e-4ad9-9827-a7455ee7e38b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:24:22 GMT + - Tue, 12 Oct 2021 07:19:49 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e73aaf0b-1bdc-4988-9da6-7aea56bde6c8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/60aa2498-873e-4ad9-9827-a7455ee7e38b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1210,7 +1347,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;237,Microsoft.Compute/VMScaleSetActions30Min;1185,Microsoft.Compute/VMScaleSetVMActions3Min;198,Microsoft.Compute/VMScaleSetVMActions30Min;998,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3726,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/VMScaleSetActions3Min;237,Microsoft.Compute/VMScaleSetActions30Min;1195,Microsoft.Compute/VMScaleSetVMActions3Min;198,Microsoft.Compute/VMScaleSetVMActions30Min;998,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3724,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1186' x-ms-request-charge: @@ -1228,24 +1365,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e73aaf0b-1bdc-4988-9da6-7aea56bde6c8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/60aa2498-873e-4ad9-9827-a7455ee7e38b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:24:22.697618+00:00\",\r\n \"endTime\": - \"2021-09-02T04:24:27.7288976+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"e73aaf0b-1bdc-4988-9da6-7aea56bde6c8\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:19:49.6548068+00:00\",\r\n \"endTime\": + \"2021-10-12T07:19:59.0142505+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"60aa2498-873e-4ad9-9827-a7455ee7e38b\"\r\n}" headers: cache-control: - no-cache content-length: - - '183' + - '184' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:24:52 GMT + - Tue, 12 Oct 2021 07:20:19 GMT expires: - '-1' pragma: @@ -1262,7 +1399,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14991,Microsoft.Compute/GetOperation30Min;29870 + - Microsoft.Compute/GetOperation3Min;14980,Microsoft.Compute/GetOperation30Min;29887 status: code: 200 message: OK @@ -1276,10 +1413,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/e73aaf0b-1bdc-4988-9da6-7aea56bde6c8?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/60aa2498-873e-4ad9-9827-a7455ee7e38b?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1289,7 +1426,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:24:52 GMT + - Tue, 12 Oct 2021 07:20:19 GMT expires: - '-1' pragma: @@ -1302,7 +1439,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14990,Microsoft.Compute/GetOperation30Min;29869 + - Microsoft.Compute/GetOperation3Min;14979,Microsoft.Compute/GetOperation30Min;29886 status: code: 200 message: OK @@ -1320,26 +1457,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0/runCommand?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1/runCommand?api-version=2021-07-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6a5a665b-509b-40e0-a298-c52e9b5e9f00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/519ef805-56e2-4649-844d-49f1fbfd9fa4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:24:52 GMT + - Tue, 12 Oct 2021 07:20:19 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6a5a665b-509b-40e0-a298-c52e9b5e9f00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/519ef805-56e2-4649-844d-49f1fbfd9fa4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1350,7 +1487,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;236,Microsoft.Compute/VMScaleSetActions30Min;1184,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3725,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/VMScaleSetActions3Min;236,Microsoft.Compute/VMScaleSetActions30Min;1194,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3725,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1185' x-ms-request-charge: @@ -1368,14 +1505,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6a5a665b-509b-40e0-a298-c52e9b5e9f00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/519ef805-56e2-4649-844d-49f1fbfd9fa4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:24:52.9790869+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"6a5a665b-509b-40e0-a298-c52e9b5e9f00\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:20:20.1237743+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"519ef805-56e2-4649-844d-49f1fbfd9fa4\"\r\n}" headers: cache-control: - no-cache @@ -1384,7 +1521,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:25:22 GMT + - Tue, 12 Oct 2021 07:20:49 GMT expires: - '-1' pragma: @@ -1401,7 +1538,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14988,Microsoft.Compute/GetOperation30Min;29892 + - Microsoft.Compute/GetOperation3Min;14975,Microsoft.Compute/GetOperation30Min;29882 status: code: 200 message: OK @@ -1415,14 +1552,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6a5a665b-509b-40e0-a298-c52e9b5e9f00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/519ef805-56e2-4649-844d-49f1fbfd9fa4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:24:52.9790869+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"6a5a665b-509b-40e0-a298-c52e9b5e9f00\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:20:20.1237743+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"519ef805-56e2-4649-844d-49f1fbfd9fa4\"\r\n}" headers: cache-control: - no-cache @@ -1431,7 +1568,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:25:53 GMT + - Tue, 12 Oct 2021 07:21:20 GMT expires: - '-1' pragma: @@ -1448,7 +1585,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29889 + - Microsoft.Compute/GetOperation3Min;14969,Microsoft.Compute/GetOperation30Min;29876 status: code: 200 message: OK @@ -1462,17 +1599,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6a5a665b-509b-40e0-a298-c52e9b5e9f00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/519ef805-56e2-4649-844d-49f1fbfd9fa4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:24:52.9790869+00:00\",\r\n \"endTime\": - \"2021-09-02T04:26:03.4327399+00:00\",\r\n \"status\": \"Succeeded\",\r\n + string: "{\r\n \"startTime\": \"2021-10-12T07:20:20.1237743+00:00\",\r\n \"endTime\": + \"2021-10-12T07:21:30.7635767+00:00\",\r\n \"status\": \"Succeeded\",\r\n \ \"properties\": {\r\n \"output\": {\"value\":[{\"code\":\"ComponentStatus/StdOut/succeeded\",\"level\":\"Info\",\"displayStatus\":\"Provisioning succeeded\",\"message\":\"This is a sample script with parameters \"},{\"code\":\"ComponentStatus/StdErr/succeeded\",\"level\":\"Info\",\"displayStatus\":\"Provisioning - succeeded\",\"message\":\"\"}]}\r\n },\r\n \"name\": \"6a5a665b-509b-40e0-a298-c52e9b5e9f00\"\r\n}" + succeeded\",\"message\":\"\"}]}\r\n },\r\n \"name\": \"519ef805-56e2-4649-844d-49f1fbfd9fa4\"\r\n}" headers: cache-control: - no-cache @@ -1481,7 +1618,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:26:23 GMT + - Tue, 12 Oct 2021 07:21:50 GMT expires: - '-1' pragma: @@ -1498,7 +1635,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29886 + - Microsoft.Compute/GetOperation3Min;14967,Microsoft.Compute/GetOperation30Min;29872 status: code: 200 message: OK @@ -1512,10 +1649,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6a5a665b-509b-40e0-a298-c52e9b5e9f00?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/519ef805-56e2-4649-844d-49f1fbfd9fa4?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '{"value":[{"code":"ComponentStatus/StdOut/succeeded","level":"Info","displayStatus":"Provisioning @@ -1529,7 +1666,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:26:23 GMT + - Tue, 12 Oct 2021 07:21:50 GMT expires: - '-1' pragma: @@ -1546,12 +1683,12 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29885 + - Microsoft.Compute/GetOperation3Min;14966,Microsoft.Compute/GetOperation30Min;29871 status: code: 200 message: OK - request: - body: '{"instanceIds": ["0"]}' + body: '{"instanceIds": ["1"]}' headers: Accept: - '*/*' @@ -1564,7 +1701,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/manualupgrade?api-version=2021-07-01 @@ -1573,17 +1710,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6d61f499-0c7a-44d2-9e49-b5e48880c707?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3dbb98e4-04f9-49fc-88d2-efd4bd677303?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:26:23 GMT + - Tue, 12 Oct 2021 07:21:50 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6d61f499-0c7a-44d2-9e49-b5e48880c707?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3dbb98e4-04f9-49fc-88d2-efd4bd677303?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1594,7 +1731,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;237,Microsoft.Compute/VMScaleSetActions30Min;1183,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/VMScaleSetActions3Min;237,Microsoft.Compute/VMScaleSetActions30Min;1193,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1184' x-ms-request-charge: @@ -1612,15 +1749,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6d61f499-0c7a-44d2-9e49-b5e48880c707?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3dbb98e4-04f9-49fc-88d2-efd4bd677303?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:26:23.4953734+00:00\",\r\n \"endTime\": - \"2021-09-02T04:26:23.6985072+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"6d61f499-0c7a-44d2-9e49-b5e48880c707\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:21:51.2015887+00:00\",\r\n \"endTime\": + \"2021-10-12T07:21:51.3265661+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"3dbb98e4-04f9-49fc-88d2-efd4bd677303\"\r\n}" headers: cache-control: - no-cache @@ -1629,7 +1766,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:26:53 GMT + - Tue, 12 Oct 2021 07:22:20 GMT expires: - '-1' pragma: @@ -1646,7 +1783,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29883 + - Microsoft.Compute/GetOperation3Min;14965,Microsoft.Compute/GetOperation30Min;29865 status: code: 200 message: OK @@ -1660,10 +1797,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/6d61f499-0c7a-44d2-9e49-b5e48880c707?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/3dbb98e4-04f9-49fc-88d2-efd4bd677303?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1673,7 +1810,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:26:53 GMT + - Tue, 12 Oct 2021 07:22:20 GMT expires: - '-1' pragma: @@ -1686,7 +1823,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29882 + - Microsoft.Compute/GetOperation3Min;14964,Microsoft.Compute/GetOperation30Min;29864 status: code: 200 message: OK @@ -1702,26 +1839,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0/deallocate?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1/deallocate?api-version=2021-07-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a8c09dde-196f-46be-9e6c-73f4eae1b8c2?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/75fd5939-d87c-4dc0-8b68-bd823cef799c?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:26:53 GMT + - Tue, 12 Oct 2021 07:22:20 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a8c09dde-196f-46be-9e6c-73f4eae1b8c2?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/75fd5939-d87c-4dc0-8b68-bd823cef799c?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1732,7 +1869,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteVMScaleSetVM3Min;239,Microsoft.Compute/DeleteVMScaleSetVM30Min;1198,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3724,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/DeleteVMScaleSetVM3Min;239,Microsoft.Compute/DeleteVMScaleSetVM30Min;1198,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3721,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1183' x-ms-request-charge: @@ -1750,14 +1887,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a8c09dde-196f-46be-9e6c-73f4eae1b8c2?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/75fd5939-d87c-4dc0-8b68-bd823cef799c?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:26:53.7924845+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"a8c09dde-196f-46be-9e6c-73f4eae1b8c2\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:22:21.7025174+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"75fd5939-d87c-4dc0-8b68-bd823cef799c\"\r\n}" headers: cache-control: - no-cache @@ -1766,7 +1903,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:27:23 GMT + - Tue, 12 Oct 2021 07:22:51 GMT expires: - '-1' pragma: @@ -1783,7 +1920,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29880 + - Microsoft.Compute/GetOperation3Min;14969,Microsoft.Compute/GetOperation30Min;29862 status: code: 200 message: OK @@ -1797,24 +1934,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a8c09dde-196f-46be-9e6c-73f4eae1b8c2?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/75fd5939-d87c-4dc0-8b68-bd823cef799c?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:26:53.7924845+00:00\",\r\n \"endTime\": - \"2021-09-02T04:27:44.996015+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"a8c09dde-196f-46be-9e6c-73f4eae1b8c2\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:22:21.7025174+00:00\",\r\n \"endTime\": + \"2021-10-12T07:22:56.2809221+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"75fd5939-d87c-4dc0-8b68-bd823cef799c\"\r\n}" headers: cache-control: - no-cache content-length: - - '183' + - '184' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:27:53 GMT + - Tue, 12 Oct 2021 07:23:21 GMT expires: - '-1' pragma: @@ -1831,7 +1968,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29877 + - Microsoft.Compute/GetOperation3Min;14973,Microsoft.Compute/GetOperation30Min;29859 status: code: 200 message: OK @@ -1845,10 +1982,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a8c09dde-196f-46be-9e6c-73f4eae1b8c2?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/75fd5939-d87c-4dc0-8b68-bd823cef799c?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1858,7 +1995,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:27:53 GMT + - Tue, 12 Oct 2021 07:23:21 GMT expires: - '-1' pragma: @@ -1871,12 +2008,12 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29876 + - Microsoft.Compute/GetOperation3Min;14972,Microsoft.Compute/GetOperation30Min;29858 status: code: 200 message: OK - request: - body: '{"instanceIds": ["0"]}' + body: '{"instanceIds": ["1"]}' headers: Accept: - '*/*' @@ -1889,7 +2026,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/delete?api-version=2021-07-01 @@ -1898,17 +2035,17 @@ interactions: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0fa076a3-c853-441b-a07b-f9f9c307c5a0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/123473ef-7570-4ac2-b41a-02d3b3f01773?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:27:54 GMT + - Tue, 12 Oct 2021 07:23:21 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0fa076a3-c853-441b-a07b-f9f9c307c5a0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/123473ef-7570-4ac2-b41a-02d3b3f01773?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1919,7 +2056,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1182,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3723,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1192,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3721,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1182' x-ms-request-charge: @@ -1937,24 +2074,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0fa076a3-c853-441b-a07b-f9f9c307c5a0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/123473ef-7570-4ac2-b41a-02d3b3f01773?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:27:54.121089+00:00\",\r\n \"endTime\": - \"2021-09-02T04:27:55.8867116+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"0fa076a3-c853-441b-a07b-f9f9c307c5a0\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:23:22.3279559+00:00\",\r\n \"endTime\": + \"2021-10-12T07:23:24.0936466+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"123473ef-7570-4ac2-b41a-02d3b3f01773\"\r\n}" headers: cache-control: - no-cache content-length: - - '183' + - '184' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:28:24 GMT + - Tue, 12 Oct 2021 07:23:51 GMT expires: - '-1' pragma: @@ -1971,7 +2108,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29873 + - Microsoft.Compute/GetOperation3Min;14976,Microsoft.Compute/GetOperation30Min;29856 status: code: 200 message: OK @@ -1985,10 +2122,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/0fa076a3-c853-441b-a07b-f9f9c307c5a0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/123473ef-7570-4ac2-b41a-02d3b3f01773?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1998,7 +2135,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:28:24 GMT + - Tue, 12 Oct 2021 07:23:51 GMT expires: - '-1' pragma: @@ -2011,7 +2148,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14981,Microsoft.Compute/GetOperation30Min;29872 + - Microsoft.Compute/GetOperation3Min;14975,Microsoft.Compute/GetOperation30Min;29855 status: code: 200 message: OK @@ -2027,26 +2164,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/0?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d/virtualmachines/1?api-version=2021-07-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/86075990-e96f-4a79-9ab2-435e3e234a34?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/80537f78-4a2c-4b6c-8f1d-2867e3118b51?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:28:24 GMT + - Tue, 12 Oct 2021 07:23:52 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/86075990-e96f-4a79-9ab2-435e3e234a34?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/80537f78-4a2c-4b6c-8f1d-2867e3118b51?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2059,7 +2196,7 @@ interactions: x-ms-ratelimit-remaining-resource: - Microsoft.Compute/DeleteVMScaleSetVM3Min;238,Microsoft.Compute/DeleteVMScaleSetVM30Min;1197,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-deletes: - - '14993' + - '14991' x-ms-request-charge: - '0' status: @@ -2075,15 +2212,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/86075990-e96f-4a79-9ab2-435e3e234a34?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/80537f78-4a2c-4b6c-8f1d-2867e3118b51?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:28:24.3244025+00:00\",\r\n \"endTime\": - \"2021-09-02T04:28:24.4025273+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"86075990-e96f-4a79-9ab2-435e3e234a34\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:23:52.8594314+00:00\",\r\n \"endTime\": + \"2021-10-12T07:23:52.9376315+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"80537f78-4a2c-4b6c-8f1d-2867e3118b51\"\r\n}" headers: cache-control: - no-cache @@ -2092,7 +2229,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:28:54 GMT + - Tue, 12 Oct 2021 07:24:22 GMT expires: - '-1' pragma: @@ -2109,7 +2246,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29870 + - Microsoft.Compute/GetOperation3Min;14979,Microsoft.Compute/GetOperation30Min;29853 status: code: 200 message: OK @@ -2125,7 +2262,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescaleset8c68120d?api-version=2021-07-01 @@ -2136,17 +2273,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/87d51e70-3e22-425c-823d-abd0023cd07d?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/15298434-81e1-4689-9cc9-8c810d213d37?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:28:54 GMT + - Tue, 12 Oct 2021 07:24:23 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/87d51e70-3e22-425c-823d-abd0023cd07d?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/15298434-81e1-4689-9cc9-8c810d213d37?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -2157,9 +2294,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteVMScaleSet3Min;79,Microsoft.Compute/DeleteVMScaleSet30Min;397,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/DeleteVMScaleSet3Min;79,Microsoft.Compute/DeleteVMScaleSet30Min;398,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-deletes: - - '14992' + - '14990' x-ms-request-charge: - '0' status: @@ -2175,15 +2312,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/87d51e70-3e22-425c-823d-abd0023cd07d?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/15298434-81e1-4689-9cc9-8c810d213d37?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:28:54.5121273+00:00\",\r\n \"endTime\": - \"2021-09-02T04:28:54.6371274+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"87d51e70-3e22-425c-823d-abd0023cd07d\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:24:23.3283506+00:00\",\r\n \"endTime\": + \"2021-10-12T07:24:23.4221017+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"15298434-81e1-4689-9cc9-8c810d213d37\"\r\n}" headers: cache-control: - no-cache @@ -2192,7 +2329,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:29:04 GMT + - Tue, 12 Oct 2021 07:24:33 GMT expires: - '-1' pragma: @@ -2209,7 +2346,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29868 + - Microsoft.Compute/GetOperation3Min;14980,Microsoft.Compute/GetOperation30Min;29851 status: code: 200 message: OK diff --git a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_vm_2.yaml b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_vm_2.yaml index 9990f2e431cd..6ff0bc311adf 100644 --- a/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_vm_2.yaml +++ b/sdk/compute/azure-mgmt-compute/tests/recordings/test_mgmt_compute_vmss.test_compute_vmss_vm_2.yaml @@ -14,17 +14,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"networknamexb172129e\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e\",\r\n - \ \"etag\": \"W/\\\"703b0170-aadc-4075-bd7f-b35ea485c5eb\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"fa5f2673-e6da-4b28-8375-af7af1407ce7\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": - \"0b401b7c-7cb1-499d-9d24-85588c3c72dd\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"6af28632-636c-4071-aba3-b140b797693e\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n \ }\r\n}" @@ -32,7 +32,7 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a26bf891-8f30-4204-8644-4c2771aec615?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/44e2a769-7756-4a72-9908-fbf5c4633bc7?api-version=2021-03-01 cache-control: - no-cache content-length: @@ -40,7 +40,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:29:06 GMT + - Tue, 12 Oct 2021 07:24:37 GMT expires: - '-1' pragma: @@ -53,9 +53,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f96baca2-1b24-4cc9-95da-ad304e7f71e7 + - d7f83c22-e08f-4e74-b230-fd772d083030 x-ms-ratelimit-remaining-subscription-writes: - - '1192' + - '1187' status: code: 201 message: Created @@ -69,10 +69,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a26bf891-8f30-4204-8644-4c2771aec615?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/44e2a769-7756-4a72-9908-fbf5c4633bc7?api-version=2021-03-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -84,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:29:09 GMT + - Tue, 12 Oct 2021 07:24:40 GMT expires: - '-1' pragma: @@ -101,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a5dcbaa6-ca91-4546-a218-57a5fdd0f571 + - 4f9ef906-a1e4-40bf-aee4-c517b4518f3a status: code: 200 message: OK @@ -115,17 +115,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"networknamexb172129e\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e\",\r\n - \ \"etag\": \"W/\\\"2887cfc0-48e7-49c7-bc1d-0bd36e639461\\\"\",\r\n \"type\": + \ \"etag\": \"W/\\\"a5d3e35f-b55f-4783-b555-6d8ef717ee3d\\\"\",\r\n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": - \"0b401b7c-7cb1-499d-9d24-85588c3c72dd\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + \"6af28632-636c-4071-aba3-b140b797693e\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n \ }\r\n}" @@ -137,9 +137,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:29:09 GMT + - Tue, 12 Oct 2021 07:24:40 GMT etag: - - W/"2887cfc0-48e7-49c7-bc1d-0bd36e639461" + - W/"a5d3e35f-b55f-4783-b555-6d8ef717ee3d" expires: - '-1' pragma: @@ -156,7 +156,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2d2ecfe7-eb39-4922-8ccb-263a92037ce4 + - e0728213-4d00-4ffe-b085-7df4cd00ba0b status: code: 200 message: OK @@ -174,21 +174,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e/subnets/subnetnamexb172129e?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e/subnets/subnetnamexb172129e?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"subnetnamexb172129e\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e/subnets/subnetnamexb172129e\",\r\n - \ \"etag\": \"W/\\\"a82c55f4-f3c7-4669-b289-fbf4c15d89dd\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"4dc852c7-e55c-4812-87f4-3799344bb4b6\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c53c0624-f5bb-46ef-ad14-70e063e45006?api-version=2021-02-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/35587f53-18ec-4723-a390-25e1ecd12311?api-version=2021-03-01 cache-control: - no-cache content-length: @@ -196,7 +196,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:29:09 GMT + - Tue, 12 Oct 2021 07:24:40 GMT expires: - '-1' pragma: @@ -209,9 +209,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 71c6a28c-048c-4a4d-9782-7a8482e1d9e3 + - c67bb8a4-fff5-4a6d-8a54-d480a365f6ad x-ms-ratelimit-remaining-subscription-writes: - - '1191' + - '1186' status: code: 201 message: Created @@ -225,10 +225,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c53c0624-f5bb-46ef-ad14-70e063e45006?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/35587f53-18ec-4723-a390-25e1ecd12311?api-version=2021-03-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -240,7 +240,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:29:12 GMT + - Tue, 12 Oct 2021 07:24:44 GMT expires: - '-1' pragma: @@ -257,7 +257,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6c4d9e91-dc3f-45bb-b2fa-57857853dbac + - 6e01ebdd-9ea4-4a6c-99fa-ba2066a8db58 status: code: 200 message: OK @@ -271,14 +271,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-network/19.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e/subnets/subnetnamexb172129e?api-version=2021-02-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e/subnets/subnetnamexb172129e?api-version=2021-03-01 response: body: string: "{\r\n \"name\": \"subnetnamexb172129e\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e/subnets/subnetnamexb172129e\",\r\n - \ \"etag\": \"W/\\\"11e3f905-a94e-40f0-b895-f4a10d42cc5d\\\"\",\r\n \"properties\": + \ \"etag\": \"W/\\\"a15a277a-00b0-492a-9d74-1851a9ce4a6d\\\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": @@ -291,9 +291,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:29:12 GMT + - Tue, 12 Oct 2021 07:24:44 GMT etag: - - W/"11e3f905-a94e-40f0-b895-f4a10d42cc5d" + - W/"a15a277a-00b0-492a-9d74-1851a9ce4a6d" expires: - '-1' pragma: @@ -310,7 +310,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 64140626-2fae-4c5e-bd5e-e186ba27b4f8 + - 868eb776-c7be-4e49-9fdf-09bc91303159 status: code: 200 message: OK @@ -338,7 +338,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e?api-version=2021-07-01 @@ -363,12 +363,12 @@ interactions: \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e/subnets/subnetnamexb172129e\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]}\r\n \ },\r\n \"provisioningState\": \"Creating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": - \"bd924eab-28f8-4c18-89e9-f9bcc7f04907\"\r\n }\r\n}" + \"b4d76034-2c47-45db-8fb6-3a6fbf039d8e\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/03c6482a-660b-482d-b6fd-172f578ba6c6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8501a54a-c605-4c12-af0d-2f3b3aa84d48?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: @@ -376,7 +376,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:29:15 GMT + - Tue, 12 Oct 2021 07:24:48 GMT expires: - '-1' pragma: @@ -389,9 +389,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/CreateVMScaleSet3Min;185,Microsoft.Compute/CreateVMScaleSet30Min;928,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3725,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/CreateVMScaleSet3Min;185,Microsoft.Compute/CreateVMScaleSet30Min;928,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3721,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1194' x-ms-request-charge: - '2' status: @@ -407,14 +407,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/03c6482a-660b-482d-b6fd-172f578ba6c6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8501a54a-c605-4c12-af0d-2f3b3aa84d48?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:29:13.8092045+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"03c6482a-660b-482d-b6fd-172f578ba6c6\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:24:46.7972269+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"8501a54a-c605-4c12-af0d-2f3b3aa84d48\"\r\n}" headers: cache-control: - no-cache @@ -423,7 +423,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:29:25 GMT + - Tue, 12 Oct 2021 07:24:58 GMT expires: - '-1' pragma: @@ -440,7 +440,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29867 + - Microsoft.Compute/GetOperation3Min;14979,Microsoft.Compute/GetOperation30Min;29850 status: code: 200 message: OK @@ -454,15 +454,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/03c6482a-660b-482d-b6fd-172f578ba6c6?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8501a54a-c605-4c12-af0d-2f3b3aa84d48?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:29:13.8092045+00:00\",\r\n \"endTime\": - \"2021-09-02T04:30:58.1537196+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"03c6482a-660b-482d-b6fd-172f578ba6c6\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:24:46.7972269+00:00\",\r\n \"endTime\": + \"2021-10-12T07:26:05.7821092+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"8501a54a-c605-4c12-af0d-2f3b3aa84d48\"\r\n}" headers: cache-control: - no-cache @@ -471,7 +471,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:31:02 GMT + - Tue, 12 Oct 2021 07:26:36 GMT expires: - '-1' pragma: @@ -488,7 +488,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29890 + - Microsoft.Compute/GetOperation3Min;14993,Microsoft.Compute/GetOperation30Min;29871 status: code: 200 message: OK @@ -502,7 +502,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e?api-version=2021-07-01 @@ -527,7 +527,7 @@ interactions: \"latest\"\r\n }\r\n },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\":false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networknamexb172129e/subnets/subnetnamexb172129e\"},\"privateIPAddressVersion\":\"IPv4\"}}]}}]}\r\n \ },\r\n \"provisioningState\": \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\": false,\r\n \"uniqueId\": - \"bd924eab-28f8-4c18-89e9-f9bcc7f04907\"\r\n }\r\n}" + \"b4d76034-2c47-45db-8fb6-3a6fbf039d8e\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -536,7 +536,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:31:02 GMT + - Tue, 12 Oct 2021 07:26:36 GMT expires: - '-1' pragma: @@ -553,7 +553,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSet3Min;396,Microsoft.Compute/GetVMScaleSet30Min;2577 + - Microsoft.Compute/GetVMScaleSet3Min;396,Microsoft.Compute/GetVMScaleSet30Min;2582 status: code: 200 message: OK @@ -567,85 +567,40 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e/virtualmachines/0/instanceView?api-version=2021-07-01 response: body: - string: "{\r\n \"error\": {\r\n \"code\": \"NotFound\",\r\n \"message\": - \"The entity was not found in this Azure location.\"\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '115' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:34:02 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSetVM3Min;999,Microsoft.Compute/GetVMScaleSetVM30Min;4994,Microsoft.Compute/VMScaleSetVMViews3Min;4999 - x-ms-request-charge: - - '1' - status: - code: 404 - message: Not Found -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e/virtualmachines/1/instanceView?api-version=2021-07-01 - response: - body: - string: "{\r\n \"placementGroupId\": \"f02587ec-11e5-426a-9e0e-3e8ae54c1c3c\",\r\n - \ \"platformUpdateDomain\": 1,\r\n \"platformFaultDomain\": 1,\r\n \"computerName\": - \"testPC000001\",\r\n \"osName\": \"Windows Server 2016 Datacenter\",\r\n - \ \"osVersion\": \"Microsoft Windows NT 10.0.14393.0\",\r\n \"vmAgent\": - {\r\n \"vmAgentVersion\": \"2.7.41491.1010\",\r\n \"statuses\": [\r\n - \ {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": + string: "{\r\n \"placementGroupId\": \"1bf751cd-29b7-47d1-89fc-93fd95946ce8\",\r\n + \ \"platformUpdateDomain\": 0,\r\n \"platformFaultDomain\": 0,\r\n \"computerName\": + \"testPC000000\",\r\n \"osName\": \"Windows Server 2016 Datacenter\",\r\n + \ \"osVersion\": \"Windows:Windows Server 2016 Datacenter-10.0.14393.4651\",\r\n + \ \"vmAgent\": {\r\n \"vmAgentVersion\": \"2.7.41491.1024\",\r\n \"statuses\": + [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \"level\": \"Info\",\r\n \"displayStatus\": \"Ready\",\r\n \"message\": \"GuestAgent is running and processing the extensions.\",\r\n \"time\": - \"2021-09-02T04:33:25+00:00\"\r\n }\r\n ]\r\n },\r\n \"disks\": - [\r\n {\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_51887191af02458c9c8faa0e24457f63\",\r\n + \"2021-10-12T07:28:35+00:00\"\r\n }\r\n ]\r\n },\r\n \"disks\": + [\r\n {\r\n \"name\": \"virtualmachinescalesvirtualmachinescaleseOS__1_e65a0769271e4babbfa0a29b9666593b\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning - succeeded\",\r\n \"time\": \"2021-09-02T04:29:18.8404815+00:00\"\r\n + succeeded\",\r\n \"time\": \"2021-10-12T07:26:06.4228649+00:00\"\r\n \ }\r\n ]\r\n }\r\n ],\r\n \"hyperVGeneration\": \"V1\",\r\n \ \"statuses\": [\r\n {\r\n \"code\": \"ProvisioningState/succeeded\",\r\n \ \"level\": \"Info\",\r\n \"displayStatus\": \"Provisioning succeeded\",\r\n - \ \"time\": \"2021-09-02T04:30:58.0756177+00:00\"\r\n },\r\n {\r\n + \ \"time\": \"2021-10-12T07:26:49.7042534+00:00\"\r\n },\r\n {\r\n \ \"code\": \"PowerState/running\",\r\n \"level\": \"Info\",\r\n \ \"displayStatus\": \"VM running\"\r\n }\r\n ]\r\n}" headers: cache-control: - no-cache content-length: - - '1318' + - '1339' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:34:02 GMT + - Tue, 12 Oct 2021 07:29:36 GMT expires: - '-1' pragma: @@ -662,7 +617,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSetVM3Min;998,Microsoft.Compute/GetVMScaleSetVM30Min;4993,Microsoft.Compute/VMScaleSetVMViews3Min;4998 + - Microsoft.Compute/GetVMScaleSetVM3Min;999,Microsoft.Compute/GetVMScaleSetVM30Min;4994,Microsoft.Compute/VMScaleSetVMViews3Min;4999 x-ms-request-charge: - '1' status: @@ -680,26 +635,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e/virtualmachines/1/redeploy?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e/virtualmachines/0/redeploy?api-version=2021-07-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a7873cf8-6497-454c-ae69-d905b9a798f1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f708a7c8-b365-428b-bfc1-e1c6e5fcee73?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:34:02 GMT + - Tue, 12 Oct 2021 07:29:36 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a7873cf8-6497-454c-ae69-d905b9a798f1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f708a7c8-b365-428b-bfc1-e1c6e5fcee73?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -710,7 +665,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;239,Microsoft.Compute/VMScaleSetActions30Min;1184,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3728,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/VMScaleSetActions3Min;239,Microsoft.Compute/VMScaleSetActions30Min;1191,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3725,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1181' x-ms-request-charge: @@ -728,14 +683,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a7873cf8-6497-454c-ae69-d905b9a798f1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f708a7c8-b365-428b-bfc1-e1c6e5fcee73?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:34:03.1551023+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"a7873cf8-6497-454c-ae69-d905b9a798f1\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:29:37.1272597+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"f708a7c8-b365-428b-bfc1-e1c6e5fcee73\"\r\n}" headers: cache-control: - no-cache @@ -744,7 +699,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:34:32 GMT + - Tue, 12 Oct 2021 07:30:06 GMT expires: - '-1' pragma: @@ -761,7 +716,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29888 + - Microsoft.Compute/GetOperation3Min;14998,Microsoft.Compute/GetOperation30Min;29918 status: code: 200 message: OK @@ -775,14 +730,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a7873cf8-6497-454c-ae69-d905b9a798f1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f708a7c8-b365-428b-bfc1-e1c6e5fcee73?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:34:03.1551023+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"a7873cf8-6497-454c-ae69-d905b9a798f1\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:29:37.1272597+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"f708a7c8-b365-428b-bfc1-e1c6e5fcee73\"\r\n}" headers: cache-control: - no-cache @@ -791,7 +746,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:35:02 GMT + - Tue, 12 Oct 2021 07:30:37 GMT expires: - '-1' pragma: @@ -808,7 +763,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29936 + - Microsoft.Compute/GetOperation3Min;14995,Microsoft.Compute/GetOperation30Min;29915 status: code: 200 message: OK @@ -822,14 +777,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a7873cf8-6497-454c-ae69-d905b9a798f1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f708a7c8-b365-428b-bfc1-e1c6e5fcee73?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:34:03.1551023+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"a7873cf8-6497-454c-ae69-d905b9a798f1\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:29:37.1272597+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"f708a7c8-b365-428b-bfc1-e1c6e5fcee73\"\r\n}" headers: cache-control: - no-cache @@ -838,7 +793,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:35:33 GMT + - Tue, 12 Oct 2021 07:31:07 GMT expires: - '-1' pragma: @@ -855,7 +810,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14992,Microsoft.Compute/GetOperation30Min;29933 + - Microsoft.Compute/GetOperation3Min;14992,Microsoft.Compute/GetOperation30Min;29912 status: code: 200 message: OK @@ -869,62 +824,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a7873cf8-6497-454c-ae69-d905b9a798f1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f708a7c8-b365-428b-bfc1-e1c6e5fcee73?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:34:03.1551023+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"a7873cf8-6497-454c-ae69-d905b9a798f1\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:36:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14989,Microsoft.Compute/GetOperation30Min;29930 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a7873cf8-6497-454c-ae69-d905b9a798f1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:34:03.1551023+00:00\",\r\n \"endTime\": - \"2021-09-02T04:36:12.5321495+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"a7873cf8-6497-454c-ae69-d905b9a798f1\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:29:37.1272597+00:00\",\r\n \"endTime\": + \"2021-10-12T07:31:29.4403013+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"f708a7c8-b365-428b-bfc1-e1c6e5fcee73\"\r\n}" headers: cache-control: - no-cache @@ -933,7 +841,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:36:33 GMT + - Tue, 12 Oct 2021 07:31:37 GMT expires: - '-1' pragma: @@ -950,7 +858,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14986,Microsoft.Compute/GetOperation30Min;29927 + - Microsoft.Compute/GetOperation3Min;14989,Microsoft.Compute/GetOperation30Min;29909 status: code: 200 message: OK @@ -964,10 +872,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/a7873cf8-6497-454c-ae69-d905b9a798f1?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f708a7c8-b365-428b-bfc1-e1c6e5fcee73?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -977,7 +885,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:36:33 GMT + - Tue, 12 Oct 2021 07:31:37 GMT expires: - '-1' pragma: @@ -990,7 +898,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29926 + - Microsoft.Compute/GetOperation3Min;14988,Microsoft.Compute/GetOperation30Min;29908 status: code: 200 message: OK @@ -1008,26 +916,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e/virtualmachines/1/reimage?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e/virtualmachines/0/reimage?api-version=2021-07-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/fea2c0ea-810f-4129-982f-88cda4da046e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/646931b8-58da-4800-8be6-21a6c0b334fd?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:36:33 GMT + - Tue, 12 Oct 2021 07:31:37 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/fea2c0ea-810f-4129-982f-88cda4da046e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/646931b8-58da-4800-8be6-21a6c0b334fd?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1038,7 +946,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1188,Microsoft.Compute/VMScaleSetVMActions3Min;199,Microsoft.Compute/VMScaleSetVMActions30Min;997,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3727,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1190,Microsoft.Compute/VMScaleSetVMActions3Min;199,Microsoft.Compute/VMScaleSetVMActions30Min;997,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3724,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1180' x-ms-request-charge: @@ -1056,23 +964,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/fea2c0ea-810f-4129-982f-88cda4da046e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/646931b8-58da-4800-8be6-21a6c0b334fd?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:36:33.8136157+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"fea2c0ea-810f-4129-982f-88cda4da046e\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:31:38.01847+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"646931b8-58da-4800-8be6-21a6c0b334fd\"\r\n}" headers: cache-control: - no-cache content-length: - - '134' + - '132' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:37:03 GMT + - Tue, 12 Oct 2021 07:32:08 GMT expires: - '-1' pragma: @@ -1089,7 +997,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29924 + - Microsoft.Compute/GetOperation3Min;14985,Microsoft.Compute/GetOperation30Min;29905 status: code: 200 message: OK @@ -1103,23 +1011,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/fea2c0ea-810f-4129-982f-88cda4da046e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/646931b8-58da-4800-8be6-21a6c0b334fd?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:36:33.8136157+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"fea2c0ea-810f-4129-982f-88cda4da046e\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:31:38.01847+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"646931b8-58da-4800-8be6-21a6c0b334fd\"\r\n}" headers: cache-control: - no-cache content-length: - - '134' + - '132' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:37:33 GMT + - Tue, 12 Oct 2021 07:32:38 GMT expires: - '-1' pragma: @@ -1136,7 +1044,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29921 + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29902 status: code: 200 message: OK @@ -1150,23 +1058,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/fea2c0ea-810f-4129-982f-88cda4da046e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/646931b8-58da-4800-8be6-21a6c0b334fd?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:36:33.8136157+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"fea2c0ea-810f-4129-982f-88cda4da046e\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:31:38.01847+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"646931b8-58da-4800-8be6-21a6c0b334fd\"\r\n}" headers: cache-control: - no-cache content-length: - - '134' + - '132' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:38:03 GMT + - Tue, 12 Oct 2021 07:33:07 GMT expires: - '-1' pragma: @@ -1183,7 +1091,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29918 + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29899 status: code: 200 message: OK @@ -1197,23 +1105,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/fea2c0ea-810f-4129-982f-88cda4da046e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/646931b8-58da-4800-8be6-21a6c0b334fd?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:36:33.8136157+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"fea2c0ea-810f-4129-982f-88cda4da046e\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:31:38.01847+00:00\",\r\n \"endTime\": + \"2021-10-12T07:33:26.6753245+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"646931b8-58da-4800-8be6-21a6c0b334fd\"\r\n}" headers: cache-control: - no-cache content-length: - - '134' + - '182' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:38:33 GMT + - Tue, 12 Oct 2021 07:33:37 GMT expires: - '-1' pragma: @@ -1230,7 +1139,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29915 + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29896 status: code: 200 message: OK @@ -1244,58 +1153,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/fea2c0ea-810f-4129-982f-88cda4da046e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:36:33.8136157+00:00\",\r\n \"endTime\": - \"2021-09-02T04:38:44.1583737+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"fea2c0ea-810f-4129-982f-88cda4da046e\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:39:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29912 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/fea2c0ea-810f-4129-982f-88cda4da046e?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/646931b8-58da-4800-8be6-21a6c0b334fd?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1305,7 +1166,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:39:03 GMT + - Tue, 12 Oct 2021 07:33:37 GMT expires: - '-1' pragma: @@ -1318,7 +1179,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29911 + - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29895 status: code: 200 message: OK @@ -1334,26 +1195,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e/virtualmachines/1/reimageall?api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e/virtualmachines/0/reimageall?api-version=2021-07-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8d975cc2-92a4-4860-9159-2e475e0ca408?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/03bf3af0-ac02-429d-a326-677e60ef6fe0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:39:03 GMT + - Tue, 12 Oct 2021 07:33:38 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8d975cc2-92a4-4860-9159-2e475e0ca408?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/03bf3af0-ac02-429d-a326-677e60ef6fe0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1364,7 +1225,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1187,Microsoft.Compute/VMScaleSetVMActions3Min;198,Microsoft.Compute/VMScaleSetVMActions30Min;996,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3727,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/VMScaleSetActions3Min;238,Microsoft.Compute/VMScaleSetActions30Min;1189,Microsoft.Compute/VMScaleSetVMActions3Min;198,Microsoft.Compute/VMScaleSetVMActions30Min;996,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3723,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-writes: - '1179' x-ms-request-charge: @@ -1382,117 +1243,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8d975cc2-92a4-4860-9159-2e475e0ca408?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:39:04.3147747+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8d975cc2-92a4-4860-9159-2e475e0ca408\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:39:33 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29909 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8d975cc2-92a4-4860-9159-2e475e0ca408?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2021-09-02T04:39:04.3147747+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8d975cc2-92a4-4860-9159-2e475e0ca408\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Thu, 02 Sep 2021 04:40:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29919 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8d975cc2-92a4-4860-9159-2e475e0ca408?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/03bf3af0-ac02-429d-a326-677e60ef6fe0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:39:04.3147747+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8d975cc2-92a4-4860-9159-2e475e0ca408\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:33:38.894173+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"03bf3af0-ac02-429d-a326-677e60ef6fe0\"\r\n}" headers: cache-control: - no-cache content-length: - - '134' + - '133' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:40:34 GMT + - Tue, 12 Oct 2021 07:34:08 GMT expires: - '-1' pragma: @@ -1509,7 +1276,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29916 + - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29892 status: code: 200 message: OK @@ -1523,23 +1290,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8d975cc2-92a4-4860-9159-2e475e0ca408?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/03bf3af0-ac02-429d-a326-677e60ef6fe0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:39:04.3147747+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"8d975cc2-92a4-4860-9159-2e475e0ca408\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:33:38.894173+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"03bf3af0-ac02-429d-a326-677e60ef6fe0\"\r\n}" headers: cache-control: - no-cache content-length: - - '134' + - '133' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:41:04 GMT + - Tue, 12 Oct 2021 07:34:38 GMT expires: - '-1' pragma: @@ -1556,7 +1323,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29913 + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29889 status: code: 200 message: OK @@ -1570,24 +1337,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8d975cc2-92a4-4860-9159-2e475e0ca408?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/03bf3af0-ac02-429d-a326-677e60ef6fe0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:39:04.3147747+00:00\",\r\n \"endTime\": - \"2021-09-02T04:41:11.4563689+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"8d975cc2-92a4-4860-9159-2e475e0ca408\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:33:38.894173+00:00\",\r\n \"endTime\": + \"2021-10-12T07:35:08.1443738+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"03bf3af0-ac02-429d-a326-677e60ef6fe0\"\r\n}" headers: cache-control: - no-cache content-length: - - '184' + - '183' content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:41:34 GMT + - Tue, 12 Oct 2021 07:35:08 GMT expires: - '-1' pragma: @@ -1604,7 +1371,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14984,Microsoft.Compute/GetOperation30Min;29910 + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29900 status: code: 200 message: OK @@ -1618,10 +1385,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/8d975cc2-92a4-4860-9159-2e475e0ca408?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/03bf3af0-ac02-429d-a326-677e60ef6fe0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 response: body: string: '' @@ -1631,7 +1398,7 @@ interactions: content-length: - '0' date: - - Thu, 02 Sep 2021 04:41:34 GMT + - Tue, 12 Oct 2021 07:35:08 GMT expires: - '-1' pragma: @@ -1644,7 +1411,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29909 + - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29899 status: code: 200 message: OK @@ -1660,7 +1427,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/virtualmachinescalesetb172129e?api-version=2021-07-01 @@ -1671,17 +1438,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f8f19fc8-2868-4a24-aca0-370186edaa69?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/2546b4a9-d861-4438-b62e-0bbe3c171cc0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 cache-control: - no-cache content-length: - '0' date: - - Thu, 02 Sep 2021 04:41:34 GMT + - Tue, 12 Oct 2021 07:35:09 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f8f19fc8-2868-4a24-aca0-370186edaa69?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/2546b4a9-d861-4438-b62e-0bbe3c171cc0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&monitor=true&api-version=2021-07-01 pragma: - no-cache server: @@ -1692,9 +1459,9 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/DeleteVMScaleSet3Min;79,Microsoft.Compute/DeleteVMScaleSet30Min;397,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3727,Microsoft.Compute/VmssQueuedVMOperations;0 + - Microsoft.Compute/DeleteVMScaleSet3Min;79,Microsoft.Compute/DeleteVMScaleSet30Min;397,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;3723,Microsoft.Compute/VmssQueuedVMOperations;0 x-ms-ratelimit-remaining-subscription-deletes: - - '14992' + - '14993' x-ms-request-charge: - '1' status: @@ -1710,14 +1477,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f8f19fc8-2868-4a24-aca0-370186edaa69?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/2546b4a9-d861-4438-b62e-0bbe3c171cc0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:41:35.1440482+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"f8f19fc8-2868-4a24-aca0-370186edaa69\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:35:09.9881199+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"2546b4a9-d861-4438-b62e-0bbe3c171cc0\"\r\n}" headers: cache-control: - no-cache @@ -1726,7 +1493,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:41:44 GMT + - Tue, 12 Oct 2021 07:35:20 GMT expires: - '-1' pragma: @@ -1743,7 +1510,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29908 + - Microsoft.Compute/GetOperation3Min;14980,Microsoft.Compute/GetOperation30Min;29897 status: code: 200 message: OK @@ -1757,14 +1524,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f8f19fc8-2868-4a24-aca0-370186edaa69?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/2546b4a9-d861-4438-b62e-0bbe3c171cc0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:41:35.1440482+00:00\",\r\n \"status\": - \"InProgress\",\r\n \"name\": \"f8f19fc8-2868-4a24-aca0-370186edaa69\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:35:09.9881199+00:00\",\r\n \"status\": + \"InProgress\",\r\n \"name\": \"2546b4a9-d861-4438-b62e-0bbe3c171cc0\"\r\n}" headers: cache-control: - no-cache @@ -1773,7 +1540,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:41:55 GMT + - Tue, 12 Oct 2021 07:35:31 GMT expires: - '-1' pragma: @@ -1790,7 +1557,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14981,Microsoft.Compute/GetOperation30Min;29907 + - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29896 status: code: 200 message: OK @@ -1804,15 +1571,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-compute/23.0.0 Python/3.8.11 (Linux-5.8.0-1040-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-compute/23.1.0 Python/3.8.12 (Linux-5.8.0-1042-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/f8f19fc8-2868-4a24-aca0-370186edaa69?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/2546b4a9-d861-4438-b62e-0bbe3c171cc0?p=54253b73-cb53-496f-ab42-5e5ee19426f8&api-version=2021-07-01 response: body: - string: "{\r\n \"startTime\": \"2021-09-02T04:41:35.1440482+00:00\",\r\n \"endTime\": - \"2021-09-02T04:42:14.0662266+00:00\",\r\n \"status\": \"Succeeded\",\r\n - \ \"name\": \"f8f19fc8-2868-4a24-aca0-370186edaa69\"\r\n}" + string: "{\r\n \"startTime\": \"2021-10-12T07:35:09.9881199+00:00\",\r\n \"endTime\": + \"2021-10-12T07:35:54.2225675+00:00\",\r\n \"status\": \"Succeeded\",\r\n + \ \"name\": \"2546b4a9-d861-4438-b62e-0bbe3c171cc0\"\r\n}" headers: cache-control: - no-cache @@ -1821,7 +1588,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 02 Sep 2021 04:42:25 GMT + - Tue, 12 Oct 2021 07:36:00 GMT expires: - '-1' pragma: @@ -1838,7 +1605,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14982,Microsoft.Compute/GetOperation30Min;29905 + - Microsoft.Compute/GetOperation3Min;14983,Microsoft.Compute/GetOperation30Min;29894 status: code: 200 message: OK diff --git a/sdk/compute/azure-mgmt-compute/tests/test_mgmt_compute_vm.py b/sdk/compute/azure-mgmt-compute/tests/test_mgmt_compute_vm.py index 5f7762b2662b..54dcc0325664 100644 --- a/sdk/compute/azure-mgmt-compute/tests/test_mgmt_compute_vm.py +++ b/sdk/compute/azure-mgmt-compute/tests/test_mgmt_compute_vm.py @@ -363,14 +363,14 @@ def test_compute_vm_2(self, resource_group): result = self.mgmt_client.virtual_machines.begin_perform_maintenance(resource_group.name, VIRTUAL_MACHINE_NAME) result = result.result() except ResourceExistsError as e: - self.assertEquals(str(e), "(OperationNotAllowed) Operation 'performMaintenance' is not allowed on VM '%s' since the Subscription of this VM is not eligible." % (VIRTUAL_MACHINE_NAME)) + self.assertEqual(str(e), "(OperationNotAllowed) Operation 'performMaintenance' is not allowed on VM '%s' since the Subscription of this VM is not eligible." % (VIRTUAL_MACHINE_NAME)) # VirtualMachine convert to managed disks (TODO: need swagger file) try: result = self.mgmt_client.virtual_machines.begin_convert_to_managed_disks(resource_group.name, VIRTUAL_MACHINE_NAME) result = result.result() except ResourceExistsError as e: - self.assertEquals(str(e), "(OperationNotAllowed) VM '%s' is already using managed disks." % (VIRTUAL_MACHINE_NAME)) + self.assertEqual(str(e), "(OperationNotAllowed) VM '%s' is already using managed disks." % (VIRTUAL_MACHINE_NAME)) # TODO: Message: The Reimage and OSUpgrade Virtual Machine actions require that the virtual machine has Automatic OS Upgrades enabled. # Reimage a Virtual Machine.[post] @@ -381,7 +381,7 @@ def test_compute_vm_2(self, resource_group): result = self.mgmt_client.virtual_machines.begin_reimage(resource_group.name, VIRTUAL_MACHINE_NAME) result = result.result() except ResourceExistsError as e: - self.assertEquals(str(e), "(OperationNotAllowed) The Reimage and OSUpgrade Virtual Machine actions require that the virtual machine has Automatic OS Upgrades enabled.") + self.assertEqual(str(e), "(OperationNotAllowed) The Reimage and OSUpgrade Virtual Machine actions require that the virtual machine has Automatic OS Upgrades enabled.") # Delete virtual machine (TODO: need swagger file) result = self.mgmt_client.virtual_machines.begin_delete(resource_group.name, VIRTUAL_MACHINE_NAME) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/CHANGELOG.md b/sdk/containerinstance/azure-mgmt-containerinstance/CHANGELOG.md index 25260ed5793d..d6a422d0dc12 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/CHANGELOG.md +++ b/sdk/containerinstance/azure-mgmt-containerinstance/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 9.1.0 (2021-10-13) + +**Features** + + - Model ContainerGroup has a new parameter zones + - Model Resource has a new parameter zones + ## 9.0.0 (2021-09-17) **Features** diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json b/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json index 10c77b5f687f..57fa769091f2 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json +++ b/sdk/containerinstance/azure-mgmt-containerinstance/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "6c02b97dd0d7c5fab35a83cc89dbe369bb583b0c", + "commit": "314f28163917b9cfc527f7776b5e4a1dea69d295", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/containerinstance/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/containerinstance/resource-manager/readme.md" diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py index 119f1c01be53..4b765c2e00b9 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-07-01" + self.api_version = "2021-09-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-containerinstance/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_metadata.json b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_metadata.json index 7e8dd90914de..1eb181be18a2 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_metadata.json +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-07-01", - "total_api_version_list": ["2021-07-01"], + "chosen_version": "2021-09-01", + "total_api_version_list": ["2021-09-01"], "client": { "name": "ContainerInstanceManagementClient", "filename": "_container_instance_management_client", diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py index b77ac9246082..f89ed38360ab 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "9.1.0" diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_configuration.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_configuration.py index 7bfbcf375d98..dc2e019f6f59 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_configuration.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-07-01" + self.api_version = "2021-09-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-containerinstance/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py index ba41f3486682..b9e6bf801ae2 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_container_groups_operations.py @@ -63,7 +63,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): @@ -136,7 +136,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): @@ -213,7 +213,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -261,7 +261,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -406,7 +406,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -458,7 +458,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -577,7 +577,7 @@ async def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -702,7 +702,7 @@ async def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -746,7 +746,7 @@ async def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -871,7 +871,7 @@ async def get_outbound_network_dependencies_endpoints( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py index a8bb63a815a1..94b3ca2db99d 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_containers_operations.py @@ -76,7 +76,7 @@ async def list_logs( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -148,7 +148,7 @@ async def execute_command( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -218,7 +218,7 @@ async def attach( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py index cc910a26b4ae..a723a9e9522c 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_location_operations.py @@ -60,7 +60,7 @@ def list_usage( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,7 @@ def list_cached_images( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): @@ -204,7 +204,7 @@ def list_capabilities( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py index 6d3da620a489..f1833cbf3b08 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models.py index 3d7bbab29430..4cbd203bf8c9 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models.py @@ -467,6 +467,8 @@ class Resource(msrest.serialization.Model): :type location: str :param tags: A set of tags. The resource tags. :type tags: dict[str, str] + :param zones: The zones for the container group. + :type zones: list[str] """ _validation = { @@ -481,6 +483,7 @@ class Resource(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'zones': {'key': 'zones', 'type': '[str]'}, } def __init__( @@ -493,6 +496,7 @@ def __init__( self.type = None self.location = kwargs.get('location', None) self.tags = kwargs.get('tags', None) + self.zones = kwargs.get('zones', None) class ContainerGroup(Resource): @@ -512,6 +516,8 @@ class ContainerGroup(Resource): :type location: str :param tags: A set of tags. The resource tags. :type tags: dict[str, str] + :param zones: The zones for the container group. + :type zones: list[str] :param identity: The identity of the container group, if configured. :type identity: ~azure.mgmt.containerinstance.models.ContainerGroupIdentity :ivar provisioning_state: The provisioning state of the container group. This only appears in @@ -570,6 +576,7 @@ class ContainerGroup(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'identity': {'key': 'identity', 'type': 'ContainerGroupIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'containers': {'key': 'properties.containers', 'type': '[Container]'}, diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py index 50b966093726..3b8719a4d3c6 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/models/_models_py3.py @@ -514,6 +514,8 @@ class Resource(msrest.serialization.Model): :type location: str :param tags: A set of tags. The resource tags. :type tags: dict[str, str] + :param zones: The zones for the container group. + :type zones: list[str] """ _validation = { @@ -528,6 +530,7 @@ class Resource(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'zones': {'key': 'zones', 'type': '[str]'}, } def __init__( @@ -535,6 +538,7 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, + zones: Optional[List[str]] = None, **kwargs ): super(Resource, self).__init__(**kwargs) @@ -543,6 +547,7 @@ def __init__( self.type = None self.location = location self.tags = tags + self.zones = zones class ContainerGroup(Resource): @@ -562,6 +567,8 @@ class ContainerGroup(Resource): :type location: str :param tags: A set of tags. The resource tags. :type tags: dict[str, str] + :param zones: The zones for the container group. + :type zones: list[str] :param identity: The identity of the container group, if configured. :type identity: ~azure.mgmt.containerinstance.models.ContainerGroupIdentity :ivar provisioning_state: The provisioning state of the container group. This only appears in @@ -620,6 +627,7 @@ class ContainerGroup(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'zones': {'key': 'zones', 'type': '[str]'}, 'identity': {'key': 'identity', 'type': 'ContainerGroupIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'containers': {'key': 'properties.containers', 'type': '[Container]'}, @@ -644,6 +652,7 @@ def __init__( os_type: Union[str, "OperatingSystemTypes"], location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, + zones: Optional[List[str]] = None, identity: Optional["ContainerGroupIdentity"] = None, image_registry_credentials: Optional[List["ImageRegistryCredential"]] = None, restart_policy: Optional[Union[str, "ContainerGroupRestartPolicy"]] = None, @@ -657,7 +666,7 @@ def __init__( init_containers: Optional[List["InitContainerDefinition"]] = None, **kwargs ): - super(ContainerGroup, self).__init__(location=location, tags=tags, **kwargs) + super(ContainerGroup, self).__init__(location=location, tags=tags, zones=zones, **kwargs) self.identity = identity self.provisioning_state = None self.containers = containers diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py index 23746b18d8bd..6fa601fa064b 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_container_groups_operations.py @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): @@ -220,7 +220,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -269,7 +269,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -416,7 +416,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -469,7 +469,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -590,7 +590,7 @@ def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -717,7 +717,7 @@ def stop( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -762,7 +762,7 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -889,7 +889,7 @@ def get_outbound_network_dependencies_endpoints( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py index 50219a9502dc..9f1d183aa00e 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_containers_operations.py @@ -81,7 +81,7 @@ def list_logs( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL @@ -154,7 +154,7 @@ def execute_command( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -225,7 +225,7 @@ def attach( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" # Construct URL diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py index ad7927695246..f57eeae93ba0 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_location_operations.py @@ -65,7 +65,7 @@ def list_usage( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): @@ -138,7 +138,7 @@ def list_cached_images( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): @@ -211,7 +211,7 @@ def list_capabilities( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py index a6956a93125c..0b507d151a2e 100644 --- a/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py +++ b/sdk/containerinstance/azure-mgmt-containerinstance/azure/mgmt/containerinstance/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01" + api_version = "2021-09-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py index ae7cced8dfac..7afc77e1ef3a 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_container_registry_client.py @@ -736,7 +736,7 @@ def update_repository_properties(self, *args, **kwargs): properties.teleport_enabled = kwargs.pop("teleport_enabled", None) return RepositoryProperties._from_generated( # pylint: disable=protected-access - self._client.container_registry.set_properties( + self._client.container_registry.update_properties( repository, properties._to_generated(), **kwargs # pylint: disable=protected-access ) ) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/__init__.py index 1cb3683f2658..c3178d3c5c3e 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_configuration.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_configuration.py index bbd88a6d6271..1f76a037073c 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_configuration.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_configuration.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -31,9 +31,9 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None + super(ContainerRegistryConfiguration, self).__init__(**kwargs) if url is None: raise ValueError("Parameter 'url' must not be None.") - super(ContainerRegistryConfiguration, self).__init__(**kwargs) self.url = url kwargs.setdefault('sdk_moniker', 'containerregistry/{}'.format(VERSION)) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py index 59862f293a9c..29b1fb274514 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_container_registry.py @@ -1,26 +1,24 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from copy import deepcopy from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer +from . import models +from ._configuration import ContainerRegistryConfiguration +from .operations import AuthenticationOperations, ContainerRegistryBlobOperations, ContainerRegistryOperations + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import ContainerRegistryConfiguration -from .operations import ContainerRegistryOperations -from .operations import ContainerRegistryBlobOperations -from .operations import AuthenticationOperations -from . import models - + from azure.core.rest import HttpRequest, HttpResponse class ContainerRegistry(object): """Metadata API definition for the Azure Container Registry runtime. @@ -41,39 +39,49 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{url}' - self._config = ContainerRegistryConfiguration(url, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + _base_url = '{url}' + self._config = ContainerRegistryConfiguration(url=url, **kwargs) + self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.container_registry = ContainerRegistryOperations(self._client, self._config, self._serialize, self._deserialize) + self.container_registry_blob = ContainerRegistryBlobOperations(self._client, self._config, self._serialize, self._deserialize) + self.authentication = AuthenticationOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_registry = ContainerRegistryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.container_registry_blob = ContainerRegistryBlobOperations( - self._client, self._config, self._serialize, self._deserialize) - self.authentication = AuthenticationOperations( - self._client, self._config, self._serialize, self._deserialize) - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.HttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_vendor.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_vendor.py new file mode 100644 index 000000000000..efc99b1df25a --- /dev/null +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/_vendor.py @@ -0,0 +1,25 @@ +# -------------------------------------------------------------------------- +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/__init__.py index d43fcb6511b0..c3178d3c5c3e 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/__init__.py @@ -1,8 +1,14 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- from ._container_registry import ContainerRegistry __all__ = ['ContainerRegistry'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_configuration.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_configuration.py index b078bd330a4e..c33b497b7eed 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_configuration.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_configuration.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -26,9 +26,9 @@ def __init__( url: str, **kwargs: Any ) -> None: + super(ContainerRegistryConfiguration, self).__init__(**kwargs) if url is None: raise ValueError("Parameter 'url' must not be None.") - super(ContainerRegistryConfiguration, self).__init__(**kwargs) self.url = url kwargs.setdefault('sdk_moniker', 'containerregistry/{}'.format(VERSION)) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_container_registry.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_container_registry.py index 89b1a2bb4a45..41bfa85b2bd7 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_container_registry.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/_container_registry.py @@ -1,29 +1,28 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any +from copy import deepcopy +from typing import Any, Awaitable from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from msrest import Deserializer, Serializer -from ._configuration import ContainerRegistryConfiguration -from .operations import ContainerRegistryOperations -from .operations import ContainerRegistryBlobOperations -from .operations import AuthenticationOperations from .. import models +from ._configuration import ContainerRegistryConfiguration +from .operations import AuthenticationOperations, ContainerRegistryBlobOperations, ContainerRegistryOperations - -class ContainerRegistry(object): +class ContainerRegistry: """Metadata API definition for the Azure Container Registry runtime. :ivar container_registry: ContainerRegistryOperations operations :vartype container_registry: container_registry.aio.operations.ContainerRegistryOperations :ivar container_registry_blob: ContainerRegistryBlobOperations operations - :vartype container_registry_blob: container_registry.aio.operations.ContainerRegistryBlobOperations + :vartype container_registry_blob: + container_registry.aio.operations.ContainerRegistryBlobOperations :ivar authentication: AuthenticationOperations operations :vartype authentication: container_registry.aio.operations.AuthenticationOperations :param url: Registry login URL. @@ -35,38 +34,48 @@ def __init__( url: str, **kwargs: Any ) -> None: - base_url = '{url}' - self._config = ContainerRegistryConfiguration(url, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + _base_url = '{url}' + self._config = ContainerRegistryConfiguration(url=url, **kwargs) + self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.container_registry = ContainerRegistryOperations(self._client, self._config, self._serialize, self._deserialize) + self.container_registry_blob = ContainerRegistryBlobOperations(self._client, self._config, self._serialize, self._deserialize) + self.authentication = AuthenticationOperations(self._client, self._config, self._serialize, self._deserialize) - self.container_registry = ContainerRegistryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.container_registry_blob = ContainerRegistryBlobOperations( - self._client, self._config, self._serialize, self._deserialize) - self.authentication = AuthenticationOperations( - self._client, self._config, self._serialize, self._deserialize) - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.AsyncHttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) async def close(self) -> None: await self._client.close() diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/__init__.py index ff082246f74f..3d88b0bfc006 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_authentication_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_authentication_operations.py index cc3e59045972..d4264013b723 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_authentication_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_authentication_operations.py @@ -1,17 +1,21 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._authentication_operations import build_exchange_aad_access_token_for_acr_refresh_token_request, build_exchange_acr_refresh_token_for_acr_access_token_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -37,11 +41,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def exchange_aad_access_token_for_acr_refresh_token( self, service: str, access_token: str, - **kwargs + **kwargs: Any ) -> "_models.AcrRefreshToken": """Exchange AAD tokens for an ACR refresh Token. @@ -50,6 +55,9 @@ async def exchange_aad_access_token_for_acr_refresh_token( :param access_token: AAD access token, mandatory when grant_type is access_token_refresh_token or access_token. :type access_token: str + :keyword grant_type: Can take a value of access_token. The default value is "access_token". + Note that overriding this default value may result in unsupported behavior. + :paramtype grant_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AcrRefreshToken, or the result of cls(response) :rtype: ~container_registry.models.AcrRefreshToken @@ -60,38 +68,34 @@ async def exchange_aad_access_token_for_acr_refresh_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/x-www-form-urlencoded") - grant_type = "access_token" - accept = "application/json" - - # Construct URL - url = self.exchange_aad_access_token_for_acr_refresh_token.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/x-www-form-urlencoded") # type: Optional[str] + grant_type = kwargs.pop('grant_type', "access_token") # type: str # Construct form data - _form_content = { - 'grant_type': grant_type, - 'service': service, - 'access_token': access_token, + data = { + "grant_type": grant_type, + "service": service, + "access_token": access_token, } - request = self._client.post(url, query_parameters, header_parameters, form_content=_form_content) + + request = build_exchange_aad_access_token_for_acr_refresh_token_request( + content_type=content_type, + data=data, + template_url=self.exchange_aad_access_token_for_acr_refresh_token.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AcrRefreshToken', pipeline_response) @@ -100,15 +104,18 @@ async def exchange_aad_access_token_for_acr_refresh_token( return cls(pipeline_response, deserialized, {}) return deserialized + exchange_aad_access_token_for_acr_refresh_token.metadata = {'url': '/oauth2/exchange'} # type: ignore + + @distributed_trace_async async def exchange_acr_refresh_token_for_acr_access_token( self, service: str, scope: str, refresh_token: str, grant_type: Union[str, "_models.TokenGrantType"] = "refresh_token", - **kwargs + **kwargs: Any ) -> "_models.AcrAccessToken": """Exchange ACR Refresh token for an ACR Access Token. @@ -132,38 +139,34 @@ async def exchange_acr_refresh_token_for_acr_access_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/x-www-form-urlencoded") - accept = "application/json" - # Construct URL - url = self.exchange_acr_refresh_token_for_acr_access_token.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/x-www-form-urlencoded") # type: Optional[str] # Construct form data - _form_content = { - 'service': service, - 'scope': scope, - 'refresh_token': refresh_token, - 'grant_type': grant_type, + data = { + "service": service, + "scope": scope, + "refresh_token": refresh_token, + "grant_type": grant_type, + } + + request = build_exchange_acr_refresh_token_for_acr_access_token_request( + content_type=content_type, + data=data, + template_url=self.exchange_acr_refresh_token_for_acr_access_token.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - request = self._client.post(url, query_parameters, header_parameters, form_content=_form_content) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AcrAccessToken', pipeline_response) @@ -172,4 +175,6 @@ async def exchange_acr_refresh_token_for_acr_access_token( return cls(pipeline_response, deserialized, {}) return deserialized + exchange_acr_refresh_token_for_acr_access_token.metadata = {'url': '/oauth2/token'} # type: ignore + diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_blob_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_blob_operations.py index 0650751c2819..a7959fad2042 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_blob_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_blob_operations.py @@ -1,17 +1,21 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, Callable, Dict, Generic, IO, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._container_registry_blob_operations import build_cancel_upload_request, build_check_blob_exists_request, build_check_chunk_exists_request, build_complete_upload_request, build_delete_blob_request, build_get_blob_request, build_get_chunk_request, build_get_upload_status_request, build_mount_blob_request, build_start_upload_request, build_upload_chunk_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -37,11 +41,12 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def get_blob( self, name: str, digest: str, - **kwargs + **kwargs: Any ) -> Optional[IO]: """Retrieve the blob from the registry identified by digest. @@ -59,25 +64,19 @@ async def get_blob( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/octet-stream" - # Construct URL - url = self.get_blob.metadata['url'] # type: ignore + + request = build_get_blob_request( + name=name, + digest=digest, + template_url=self.get_blob.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) response = pipeline_response.http_response @@ -85,27 +84,32 @@ async def get_blob( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + deserialized = response.stream_download(self._client._pipeline) if response.status_code == 307: response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + get_blob.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + + @distributed_trace_async async def check_blob_exists( self, name: str, digest: str, - **kwargs + **kwargs: Any ) -> None: """Same as GET, except only the headers are returned. @@ -123,51 +127,49 @@ async def check_blob_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.check_blob_exists.metadata['url'] # type: ignore + + request = build_check_blob_exists_request( + name=name, + digest=digest, + template_url=self.check_blob_exists.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.head(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} if response.status_code == 200: response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + if response.status_code == 307: response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + if cls: return cls(pipeline_response, None, response_headers) check_blob_exists.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + + @distributed_trace_async async def delete_blob( self, name: str, digest: str, - **kwargs + **kwargs: Any ) -> IO: """Removes an already uploaded blob. @@ -185,25 +187,19 @@ async def delete_blob( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/octet-stream" - # Construct URL - url = self.delete_blob.metadata['url'] # type: ignore + + request = build_delete_blob_request( + name=name, + digest=digest, + template_url=self.delete_blob.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) response = pipeline_response.http_response @@ -213,20 +209,24 @@ async def delete_blob( response_headers = {} response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + deserialized = response.stream_download(self._client._pipeline) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + delete_blob.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + + @distributed_trace_async async def mount_blob( self, name: str, from_parameter: str, mount: str, - **kwargs + **kwargs: Any ) -> None: """Mount a blob identified by the ``mount`` parameter from another repository. @@ -246,32 +246,26 @@ async def mount_blob( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.mount_blob.metadata['url'] # type: ignore + + request = build_mount_blob_request( + name=name, + from_parameter=from_parameter, + mount=mount, + template_url=self.mount_blob.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'str') - query_parameters['mount'] = self._serialize.query("mount", mount, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -279,15 +273,18 @@ async def mount_blob( response_headers['Docker-Upload-UUID']=self._deserialize('str', response.headers.get('Docker-Upload-UUID')) response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + if cls: return cls(pipeline_response, None, response_headers) mount_blob.metadata = {'url': '/v2/{name}/blobs/uploads/'} # type: ignore + + @distributed_trace_async async def get_upload_status( self, location: str, - **kwargs + **kwargs: Any ) -> None: """Retrieve status of upload identified by uuid. The primary purpose of this endpoint is to resolve the current status of a resumable upload. @@ -305,46 +302,43 @@ async def get_upload_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_upload_status.metadata['url'] # type: ignore + + request = build_get_upload_status_request( + location=location, + template_url=self.get_upload_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'nextBlobUuidLink': self._serialize.url("location", location, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} response_headers['Range']=self._deserialize('str', response.headers.get('Range')) response_headers['Docker-Upload-UUID']=self._deserialize('str', response.headers.get('Docker-Upload-UUID')) + if cls: return cls(pipeline_response, None, response_headers) get_upload_status.metadata = {'url': '/{nextBlobUuidLink}'} # type: ignore + + @distributed_trace_async async def upload_chunk( self, location: str, value: IO, - **kwargs + **kwargs: Any ) -> None: """Upload a stream of data without completing the upload. @@ -363,34 +357,29 @@ async def upload_chunk( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/octet-stream") - accept = "application/json" - # Construct URL - url = self.upload_chunk.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'nextBlobUuidLink': self._serialize.url("location", location, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) + content_type = kwargs.pop('content_type', "application/octet-stream") # type: Optional[str] - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + content = value - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_upload_chunk_request( + location=location, + content_type=content_type, + content=content, + template_url=self.upload_chunk.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) - body_content_kwargs = {} # type: Dict[str, Any] - body_content_kwargs['stream_content'] = value - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -398,17 +387,20 @@ async def upload_chunk( response_headers['Range']=self._deserialize('str', response.headers.get('Range')) response_headers['Docker-Upload-UUID']=self._deserialize('str', response.headers.get('Docker-Upload-UUID')) + if cls: return cls(pipeline_response, None, response_headers) upload_chunk.metadata = {'url': '/{nextBlobUuidLink}'} # type: ignore + + @distributed_trace_async async def complete_upload( self, digest: str, location: str, value: Optional[IO] = None, - **kwargs + **kwargs: Any ) -> None: """Complete the upload, providing all the data in the body, if necessary. A request without a body will just complete the upload with previously uploaded content. @@ -430,35 +422,30 @@ async def complete_upload( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/octet-stream") - accept = "application/json" - # Construct URL - url = self.complete_upload.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'nextBlobUuidLink': self._serialize.url("location", location, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) + content_type = kwargs.pop('content_type', "application/octet-stream") # type: Optional[str] - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['digest'] = self._serialize.query("digest", digest, 'str') + content = value - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_complete_upload_request( + location=location, + content_type=content_type, + digest=digest, + content=content, + template_url=self.complete_upload.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) - body_content_kwargs = {} # type: Dict[str, Any] - body_content_kwargs['stream_content'] = value - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -466,15 +453,18 @@ async def complete_upload( response_headers['Range']=self._deserialize('str', response.headers.get('Range')) response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + if cls: return cls(pipeline_response, None, response_headers) complete_upload.metadata = {'url': '/{nextBlobUuidLink}'} # type: ignore + + @distributed_trace_async async def cancel_upload( self, location: str, - **kwargs + **kwargs: Any ) -> None: """Cancel outstanding upload processes, releasing associated resources. If this is not called, the unfinished uploads will eventually timeout. @@ -492,30 +482,24 @@ async def cancel_upload( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.cancel_upload.metadata['url'] # type: ignore + + request = build_cancel_upload_request( + location=location, + template_url=self.cancel_upload.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'nextBlobUuidLink': self._serialize.url("location", location, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -523,10 +507,12 @@ async def cancel_upload( cancel_upload.metadata = {'url': '/{nextBlobUuidLink}'} # type: ignore + + @distributed_trace_async async def start_upload( self, name: str, - **kwargs + **kwargs: Any ) -> None: """Initiate a resumable blob upload with an empty request body. @@ -542,30 +528,24 @@ async def start_upload( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.start_upload.metadata['url'] # type: ignore + + request = build_start_upload_request( + name=name, + template_url=self.start_upload.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -573,17 +553,20 @@ async def start_upload( response_headers['Range']=self._deserialize('str', response.headers.get('Range')) response_headers['Docker-Upload-UUID']=self._deserialize('str', response.headers.get('Docker-Upload-UUID')) + if cls: return cls(pipeline_response, None, response_headers) start_upload.metadata = {'url': '/v2/{name}/blobs/uploads/'} # type: ignore + + @distributed_trace_async async def get_chunk( self, name: str, digest: str, range: str, - **kwargs + **kwargs: Any ) -> IO: """Retrieve the blob from the registry identified by ``digest``. This endpoint may also support RFC7233 compliant range requests. Support can be detected by issuing a HEAD request. If the @@ -607,26 +590,20 @@ async def get_chunk( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/octet-stream" - # Construct URL - url = self.get_chunk.metadata['url'] # type: ignore + + request = build_get_chunk_request( + name=name, + digest=digest, + range=range, + template_url=self.get_chunk.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Range'] = self._serialize.header("range", range, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=True, **kwargs) response = pipeline_response.http_response @@ -637,20 +614,24 @@ async def get_chunk( response_headers = {} response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) response_headers['Content-Range']=self._deserialize('str', response.headers.get('Content-Range')) + deserialized = response.stream_download(self._client._pipeline) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + get_chunk.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + + @distributed_trace_async async def check_chunk_exists( self, name: str, digest: str, range: str, - **kwargs + **kwargs: Any ) -> None: """Same as GET, except only the headers are returned. @@ -671,39 +652,35 @@ async def check_chunk_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.check_chunk_exists.metadata['url'] # type: ignore + + request = build_check_chunk_exists_request( + name=name, + digest=digest, + range=range, + template_url=self.check_chunk_exists.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Range'] = self._serialize.header("range", range, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.head(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) response_headers['Content-Range']=self._deserialize('str', response.headers.get('Content-Range')) + if cls: return cls(pipeline_response, None, response_headers) check_chunk_exists.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_operations.py index 9c98004dc3d9..2da4344c484d 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/aio/operations/_container_registry_operations.py @@ -1,18 +1,23 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models - +from ..._vendor import _convert_request +from ...operations._container_registry_operations import build_check_docker_v2_support_request, build_create_manifest_request, build_delete_manifest_request, build_delete_repository_request, build_delete_tag_request, build_get_manifest_properties_request, build_get_manifest_request, build_get_manifests_request, build_get_properties_request, build_get_repositories_request, build_get_tag_properties_request, build_get_tags_request, build_update_manifest_properties_request, build_update_properties_request, build_update_tag_attributes_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -38,9 +43,10 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + @distributed_trace_async async def check_docker_v2_support( self, - **kwargs + **kwargs: Any ) -> None: """Tells whether this Docker Registry instance supports Docker Registry HTTP API v2. @@ -54,29 +60,23 @@ async def check_docker_v2_support( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.check_docker_v2_support.metadata['url'] # type: ignore + + request = build_check_docker_v2_support_request( + template_url=self.check_docker_v2_support.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -84,12 +84,14 @@ async def check_docker_v2_support( check_docker_v2_support.metadata = {'url': '/v2/'} # type: ignore + + @distributed_trace_async async def get_manifest( self, name: str, reference: str, accept: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Manifest": """Get the manifest identified by ``name`` and ``reference`` where ``reference`` can be a tag or digest. @@ -111,33 +113,26 @@ async def get_manifest( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_manifest.metadata['url'] # type: ignore + + request = build_get_manifest_request( + name=name, + reference=reference, + accept=accept, + template_url=self.get_manifest.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if accept is not None: - header_parameters['accept'] = self._serialize.header("accept", accept, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('Manifest', pipeline_response) @@ -146,15 +141,18 @@ async def get_manifest( return cls(pipeline_response, deserialized, {}) return deserialized + get_manifest.metadata = {'url': '/v2/{name}/manifests/{reference}'} # type: ignore + + @distributed_trace_async async def create_manifest( self, name: str, reference: str, payload: "_models.Manifest", - **kwargs - ) -> object: + **kwargs: Any + ) -> Any: """Put the manifest identified by ``name`` and ``reference`` where ``reference`` can be a tag or digest. @@ -165,64 +163,62 @@ async def create_manifest( :param payload: Manifest body, can take v1 or v2 values depending on accept header. :type payload: ~container_registry.models.Manifest :keyword callable cls: A custom type or function that will be passed the direct response - :return: object, or the result of cls(response) - :rtype: object + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/vnd.docker.distribution.manifest.v2+json") - accept = "application/json" - # Construct URL - url = self.create_manifest.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + content_type = kwargs.pop('content_type', "application/vnd.docker.distribution.manifest.v2+json") # type: Optional[str] - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + json = self._serialize.body(payload, 'Manifest') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_create_manifest_request( + name=name, + reference=reference, + content_type=content_type, + json=json, + template_url=self.create_manifest.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(payload, 'Manifest') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) response_headers['Location']=self._deserialize('str', response.headers.get('Location')) response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) + deserialized = self._deserialize('object', pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + create_manifest.metadata = {'url': '/v2/{name}/manifests/{reference}'} # type: ignore + + @distributed_trace_async async def delete_manifest( self, name: str, reference: str, - **kwargs + **kwargs: Any ) -> None: """Delete the manifest identified by ``name`` and ``reference``. Note that a manifest can *only* be deleted by ``digest``. @@ -241,31 +237,25 @@ async def delete_manifest( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.delete_manifest.metadata['url'] # type: ignore + + request = build_delete_manifest_request( + name=name, + reference=reference, + template_url=self.delete_manifest.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -273,11 +263,13 @@ async def delete_manifest( delete_manifest.metadata = {'url': '/v2/{name}/manifests/{reference}'} # type: ignore + + @distributed_trace def get_repositories( self, last: Optional[str] = None, n: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.Repositories"]: """List repositories. @@ -296,40 +288,41 @@ def get_repositories( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.get_repositories.metadata['url'] # type: ignore + + request = build_get_repositories_request( + last=last, + n=n, + template_url=self.get_repositories.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if last is not None: - query_parameters['last'] = self._serialize.query("last", last, 'str') - if n is not None: - query_parameters['n'] = self._serialize.query("n", n, 'int') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] + + request = build_get_repositories_request( + last=last, + n=n, + template_url=next_link, + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('Repositories', pipeline_response) + deserialized = self._deserialize("Repositories", pipeline_response) list_of_elem = deserialized.repositories if cls: list_of_elem = cls(list_of_elem) @@ -342,74 +335,73 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) return pipeline_response + return AsyncItemPaged( get_next, extract_data ) get_repositories.metadata = {'url': '/acr/v1/_catalog'} # type: ignore + @distributed_trace_async async def get_properties( self, name: str, - **kwargs - ) -> "_models.RepositoryProperties": + **kwargs: Any + ) -> "_models.ContainerRepositoryProperties": """Get repository attributes. :param name: Name of the image (including the namespace). :type name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepositoryProperties, or the result of cls(response) - :rtype: ~container_registry.models.RepositoryProperties + :return: ContainerRepositoryProperties, or the result of cls(response) + :rtype: ~container_registry.models.ContainerRepositoryProperties :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepositoryProperties"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerRepositoryProperties"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_properties.metadata['url'] # type: ignore + + request = build_get_properties_request( + name=name, + template_url=self.get_properties.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RepositoryProperties', pipeline_response) + deserialized = self._deserialize('ContainerRepositoryProperties', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized + get_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore + + @distributed_trace_async async def delete_repository( self, name: str, - **kwargs + **kwargs: Any ) -> None: """Delete the repository identified by ``name``. @@ -425,30 +417,24 @@ async def delete_repository( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.delete_repository.metadata['url'] # type: ignore + + request = build_delete_repository_request( + name=name, + template_url=self.delete_repository.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -456,12 +442,14 @@ async def delete_repository( delete_repository.metadata = {'url': '/acr/v1/{name}'} # type: ignore - async def set_properties( + + @distributed_trace_async + async def update_properties( self, name: str, value: Optional["_models.RepositoryWriteableProperties"] = None, - **kwargs - ) -> "_models.RepositoryProperties": + **kwargs: Any + ) -> "_models.ContainerRepositoryProperties": """Update the attribute identified by ``name`` where ``reference`` is the name of the repository. :param name: Name of the image (including the namespace). @@ -469,57 +457,54 @@ async def set_properties( :param value: Repository attribute value. :type value: ~container_registry.models.RepositoryWriteableProperties :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepositoryProperties, or the result of cls(response) - :rtype: ~container_registry.models.RepositoryProperties + :return: ContainerRepositoryProperties, or the result of cls(response) + :rtype: ~container_registry.models.ContainerRepositoryProperties :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepositoryProperties"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerRepositoryProperties"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.set_properties.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - body_content_kwargs = {} # type: Dict[str, Any] if value is not None: - body_content = self._serialize.body(value, 'RepositoryWriteableProperties') + json = self._serialize.body(value, 'RepositoryWriteableProperties') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_update_properties_request( + name=name, + content_type=content_type, + json=json, + template_url=self.update_properties.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RepositoryProperties', pipeline_response) + deserialized = self._deserialize('ContainerRepositoryProperties', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - set_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore + update_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore + + + @distributed_trace def get_tags( self, name: str, @@ -527,7 +512,7 @@ def get_tags( n: Optional[int] = None, orderby: Optional[str] = None, digest: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagList"]: """List tags of a repository. @@ -552,46 +537,47 @@ def get_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.get_tags.metadata['url'] # type: ignore + + request = build_get_tags_request( + name=name, + last=last, + n=n, + orderby=orderby, + digest=digest, + template_url=self.get_tags.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if last is not None: - query_parameters['last'] = self._serialize.query("last", last, 'str') - if n is not None: - query_parameters['n'] = self._serialize.query("n", n, 'int') - if orderby is not None: - query_parameters['orderby'] = self._serialize.query("orderby", orderby, 'str') - if digest is not None: - query_parameters['digest'] = self._serialize.query("digest", digest, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] + + request = build_get_tags_request( + name=name, + last=last, + n=n, + orderby=orderby, + digest=digest, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('TagList', pipeline_response) + deserialized = self._deserialize("TagList", pipeline_response) list_of_elem = deserialized.tag_attribute_bases if cls: list_of_elem = cls(list_of_elem) @@ -604,22 +590,24 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) return pipeline_response + return AsyncItemPaged( get_next, extract_data ) get_tags.metadata = {'url': '/acr/v1/{name}/_tags'} # type: ignore + @distributed_trace_async async def get_tag_properties( self, name: str, reference: str, - **kwargs + **kwargs: Any ) -> "_models.ArtifactTagProperties": """Get tag attributes by tag. @@ -637,31 +625,25 @@ async def get_tag_properties( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_tag_properties.metadata['url'] # type: ignore + + request = build_get_tag_properties_request( + name=name, + reference=reference, + template_url=self.get_tag_properties.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ArtifactTagProperties', pipeline_response) @@ -670,14 +652,17 @@ async def get_tag_properties( return cls(pipeline_response, deserialized, {}) return deserialized + get_tag_properties.metadata = {'url': '/acr/v1/{name}/_tags/{reference}'} # type: ignore + + @distributed_trace_async async def update_tag_attributes( self, name: str, reference: str, value: Optional["_models.TagWriteableProperties"] = None, - **kwargs + **kwargs: Any ) -> "_models.ArtifactTagProperties": """Update tag attributes. @@ -697,39 +682,33 @@ async def update_tag_attributes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - # Construct URL - url = self.update_tag_attributes.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] if value is not None: - body_content = self._serialize.body(value, 'TagWriteableProperties') + json = self._serialize.body(value, 'TagWriteableProperties') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_update_tag_attributes_request( + name=name, + reference=reference, + content_type=content_type, + json=json, + template_url=self.update_tag_attributes.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ArtifactTagProperties', pipeline_response) @@ -738,13 +717,16 @@ async def update_tag_attributes( return cls(pipeline_response, deserialized, {}) return deserialized + update_tag_attributes.metadata = {'url': '/acr/v1/{name}/_tags/{reference}'} # type: ignore + + @distributed_trace_async async def delete_tag( self, name: str, reference: str, - **kwargs + **kwargs: Any ) -> None: """Delete tag. @@ -762,31 +744,25 @@ async def delete_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.delete_tag.metadata['url'] # type: ignore + + request = build_delete_tag_request( + name=name, + reference=reference, + template_url=self.delete_tag.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -794,13 +770,15 @@ async def delete_tag( delete_tag.metadata = {'url': '/acr/v1/{name}/_tags/{reference}'} # type: ignore + + @distributed_trace def get_manifests( self, name: str, last: Optional[str] = None, n: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AcrManifests"]: """List manifests of a repository. @@ -823,44 +801,45 @@ def get_manifests( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.get_manifests.metadata['url'] # type: ignore + + request = build_get_manifests_request( + name=name, + last=last, + n=n, + orderby=orderby, + template_url=self.get_manifests.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if last is not None: - query_parameters['last'] = self._serialize.query("last", last, 'str') - if n is not None: - query_parameters['n'] = self._serialize.query("n", n, 'int') - if orderby is not None: - query_parameters['orderby'] = self._serialize.query("orderby", orderby, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] + + request = build_get_manifests_request( + name=name, + last=last, + n=n, + orderby=orderby, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) + request.method = "GET" return request async def extract_data(pipeline_response): - deserialized = self._deserialize('AcrManifests', pipeline_response) + deserialized = self._deserialize("AcrManifests", pipeline_response) list_of_elem = deserialized.manifests if cls: list_of_elem = cls(list_of_elem) @@ -873,22 +852,24 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) return pipeline_response + return AsyncItemPaged( get_next, extract_data ) get_manifests.metadata = {'url': '/acr/v1/{name}/_manifests'} # type: ignore + @distributed_trace_async async def get_manifest_properties( self, name: str, digest: str, - **kwargs + **kwargs: Any ) -> "_models.ArtifactManifestProperties": """Get manifest attributes. @@ -906,31 +887,25 @@ async def get_manifest_properties( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_manifest_properties.metadata['url'] # type: ignore + + request = build_get_manifest_properties_request( + name=name, + digest=digest, + template_url=self.get_manifest_properties.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ArtifactManifestProperties', pipeline_response) @@ -939,14 +914,17 @@ async def get_manifest_properties( return cls(pipeline_response, deserialized, {}) return deserialized + get_manifest_properties.metadata = {'url': '/acr/v1/{name}/_manifests/{digest}'} # type: ignore + + @distributed_trace_async async def update_manifest_properties( self, name: str, digest: str, value: Optional["_models.ManifestWriteableProperties"] = None, - **kwargs + **kwargs: Any ) -> "_models.ArtifactManifestProperties": """Update properties of a manifest. @@ -966,39 +944,33 @@ async def update_manifest_properties( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update_manifest_properties.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - body_content_kwargs = {} # type: Dict[str, Any] if value is not None: - body_content = self._serialize.body(value, 'ManifestWriteableProperties') + json = self._serialize.body(value, 'ManifestWriteableProperties') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_update_manifest_properties_request( + name=name, + digest=digest, + content_type=content_type, + json=json, + template_url=self.update_manifest_properties.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ArtifactManifestProperties', pipeline_response) @@ -1007,4 +979,6 @@ async def update_manifest_properties( return cls(pipeline_response, deserialized, {}) return deserialized + update_manifest_properties.metadata = {'url': '/acr/v1/{name}/_manifests/{digest}'} # type: ignore + diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/__init__.py index d2b15bea9a01..fa0ccd4239ed 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -11,9 +11,10 @@ from ._models_py3 import AcrManifests from ._models_py3 import AcrRefreshToken from ._models_py3 import Annotations + from ._models_py3 import ArtifactManifestPlatform from ._models_py3 import ArtifactManifestProperties - from ._models_py3 import ArtifactManifestReference from ._models_py3 import ArtifactTagProperties + from ._models_py3 import ContainerRepositoryProperties from ._models_py3 import DeleteRepositoryResult from ._models_py3 import Descriptor from ._models_py3 import FsLayer @@ -34,7 +35,6 @@ from ._models_py3 import PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema from ._models_py3 import Platform from ._models_py3 import Repositories - from ._models_py3 import RepositoryProperties from ._models_py3 import RepositoryTags from ._models_py3 import RepositoryWriteableProperties from ._models_py3 import TagAttributesBase @@ -50,9 +50,10 @@ from ._models import AcrManifests # type: ignore from ._models import AcrRefreshToken # type: ignore from ._models import Annotations # type: ignore + from ._models import ArtifactManifestPlatform # type: ignore from ._models import ArtifactManifestProperties # type: ignore - from ._models import ArtifactManifestReference # type: ignore from ._models import ArtifactTagProperties # type: ignore + from ._models import ContainerRepositoryProperties # type: ignore from ._models import DeleteRepositoryResult # type: ignore from ._models import Descriptor # type: ignore from ._models import FsLayer # type: ignore @@ -73,7 +74,6 @@ from ._models import PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema # type: ignore from ._models import Platform # type: ignore from ._models import Repositories # type: ignore - from ._models import RepositoryProperties # type: ignore from ._models import RepositoryTags # type: ignore from ._models import RepositoryWriteableProperties # type: ignore from ._models import TagAttributesBase # type: ignore @@ -85,9 +85,9 @@ from ._container_registry_enums import ( ArtifactArchitecture, + ArtifactManifestOrderBy, ArtifactOperatingSystem, - ManifestOrderBy, - TagOrderBy, + ArtifactTagOrderBy, TokenGrantType, ) @@ -98,9 +98,10 @@ 'AcrManifests', 'AcrRefreshToken', 'Annotations', + 'ArtifactManifestPlatform', 'ArtifactManifestProperties', - 'ArtifactManifestReference', 'ArtifactTagProperties', + 'ContainerRepositoryProperties', 'DeleteRepositoryResult', 'Descriptor', 'FsLayer', @@ -121,7 +122,6 @@ 'PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema', 'Platform', 'Repositories', - 'RepositoryProperties', 'RepositoryTags', 'RepositoryWriteableProperties', 'TagAttributesBase', @@ -131,8 +131,8 @@ 'V1Manifest', 'V2Manifest', 'ArtifactArchitecture', + 'ArtifactManifestOrderBy', 'ArtifactOperatingSystem', - 'ManifestOrderBy', - 'TagOrderBy', + 'ArtifactTagOrderBy', 'TokenGrantType', ] diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_container_registry_enums.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_container_registry_enums.py index 7da71393e629..3086792b8baa 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_container_registry_enums.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_container_registry_enums.py @@ -1,30 +1,15 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class ArtifactArchitecture(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ArtifactArchitecture(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): I386 = "386" AMD64 = "amd64" @@ -40,7 +25,18 @@ class ArtifactArchitecture(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): S390_X = "s390x" WASM = "wasm" -class ArtifactOperatingSystem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ArtifactManifestOrderBy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """Sort options for ordering manifests in a collection. + """ + + #: Do not provide an orderby value in the request. + NONE = "none" + #: Order manifests by LastUpdatedOn field, from most recently updated to least recently updated. + LAST_UPDATED_ON_DESCENDING = "timedesc" + #: Order manifest by LastUpdatedOn field, from least recently updated to most recently updated. + LAST_UPDATED_ON_ASCENDING = "timeasc" + +class ArtifactOperatingSystem(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): AIX = "aix" ANDROID = "android" @@ -57,18 +53,7 @@ class ArtifactOperatingSystem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum SOLARIS = "solaris" WINDOWS = "windows" -class ManifestOrderBy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Sort options for ordering manifests in a collection. - """ - - #: Do not provide an orderby value in the request. - NONE = "none" - #: Order manifests by LastUpdatedOn field, from most recently updated to least recently updated. - LAST_UPDATED_ON_DESCENDING = "timedesc" - #: Order manifest by LastUpdatedOn field, from least recently updated to most recently updated. - LAST_UPDATED_ON_ASCENDING = "timeasc" - -class TagOrderBy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ArtifactTagOrderBy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Do not provide an orderby value in the request. NONE = "none" @@ -77,7 +62,7 @@ class TagOrderBy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Order tags by LastUpdatedOn field, from least recently updated to most recently updated. LAST_UPDATED_ON_ASCENDING = "timeasc" -class TokenGrantType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TokenGrantType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Grant type is expected to be refresh_token """ diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models.py index 200fd219fa56..d9723b9ebdee 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- @@ -11,8 +11,8 @@ class AcrAccessToken(msrest.serialization.Model): """AcrAccessToken. - :param access_token: The access token for performing authenticated requests. - :type access_token: str + :ivar access_token: The access token for performing authenticated requests. + :vartype access_token: str """ _attribute_map = { @@ -23,6 +23,10 @@ def __init__( self, **kwargs ): + """ + :keyword access_token: The access token for performing authenticated requests. + :paramtype access_token: str + """ super(AcrAccessToken, self).__init__(**kwargs) self.access_token = kwargs.get('access_token', None) @@ -30,24 +34,32 @@ def __init__( class AcrErrorInfo(msrest.serialization.Model): """Error information. - :param code: Error code. - :type code: str - :param message: Error message. - :type message: str - :param detail: Error details. - :type detail: str + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + :ivar detail: Error details. + :vartype detail: any """ _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, - 'detail': {'key': 'detail', 'type': 'str'}, + 'detail': {'key': 'detail', 'type': 'object'}, } def __init__( self, **kwargs ): + """ + :keyword code: Error code. + :paramtype code: str + :keyword message: Error message. + :paramtype message: str + :keyword detail: Error details. + :paramtype detail: any + """ super(AcrErrorInfo, self).__init__(**kwargs) self.code = kwargs.get('code', None) self.message = kwargs.get('message', None) @@ -57,8 +69,8 @@ def __init__( class AcrErrors(msrest.serialization.Model): """Acr error response describing why the operation failed. - :param errors: Array of detailed error. - :type errors: list[~container_registry.models.AcrErrorInfo] + :ivar errors: Array of detailed error. + :vartype errors: list[~container_registry.models.AcrErrorInfo] """ _attribute_map = { @@ -69,6 +81,10 @@ def __init__( self, **kwargs ): + """ + :keyword errors: Array of detailed error. + :paramtype errors: list[~container_registry.models.AcrErrorInfo] + """ super(AcrErrors, self).__init__(**kwargs) self.errors = kwargs.get('errors', None) @@ -76,15 +92,14 @@ def __init__( class AcrManifests(msrest.serialization.Model): """Manifest attributes. - :param registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. - :type registry_login_server: str - :param repository: Image name. - :type repository: str - :param manifests: List of manifests. - :type manifests: list[~container_registry.models.ManifestAttributesBase] - :param link: - :type link: str + :ivar registry_login_server: Registry login server. + :vartype registry_login_server: str + :ivar repository: Image name. + :vartype repository: str + :ivar manifests: List of manifests. + :vartype manifests: list[~container_registry.models.ManifestAttributesBase] + :ivar link: + :vartype link: str """ _attribute_map = { @@ -98,6 +113,16 @@ def __init__( self, **kwargs ): + """ + :keyword registry_login_server: Registry login server. + :paramtype registry_login_server: str + :keyword repository: Image name. + :paramtype repository: str + :keyword manifests: List of manifests. + :paramtype manifests: list[~container_registry.models.ManifestAttributesBase] + :keyword link: + :paramtype link: str + """ super(AcrManifests, self).__init__(**kwargs) self.registry_login_server = kwargs.get('registry_login_server', None) self.repository = kwargs.get('repository', None) @@ -108,8 +133,8 @@ def __init__( class AcrRefreshToken(msrest.serialization.Model): """AcrRefreshToken. - :param refresh_token: The refresh token to be used for generating access tokens. - :type refresh_token: str + :ivar refresh_token: The refresh token to be used for generating access tokens. + :vartype refresh_token: str """ _attribute_map = { @@ -120,6 +145,10 @@ def __init__( self, **kwargs ): + """ + :keyword refresh_token: The refresh token to be used for generating access tokens. + :paramtype refresh_token: str + """ super(AcrRefreshToken, self).__init__(**kwargs) self.refresh_token = kwargs.get('refresh_token', None) @@ -127,40 +156,40 @@ def __init__( class Annotations(msrest.serialization.Model): """Additional information provided through arbitrary metadata. - :param additional_properties: Unmatched properties from the message are deserialized to this + :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, str] - :param created: Date and time on which the image was built (string, date-time as defined by + :vartype additional_properties: dict[str, any] + :ivar created: Date and time on which the image was built (string, date-time as defined by https://tools.ietf.org/html/rfc3339#section-5.6). - :type created: ~datetime.datetime - :param authors: Contact details of the people or organization responsible for the image. - :type authors: str - :param url: URL to find more information on the image. - :type url: str - :param documentation: URL to get documentation on the image. - :type documentation: str - :param source: URL to get source code for building the image. - :type source: str - :param version: Version of the packaged software. The version MAY match a label or tag in the + :vartype created: ~datetime.datetime + :ivar authors: Contact details of the people or organization responsible for the image. + :vartype authors: str + :ivar url: URL to find more information on the image. + :vartype url: str + :ivar documentation: URL to get documentation on the image. + :vartype documentation: str + :ivar source: URL to get source code for building the image. + :vartype source: str + :ivar version: Version of the packaged software. The version MAY match a label or tag in the source code repository, may also be Semantic versioning-compatible. - :type version: str - :param revision: Source control revision identifier for the packaged software. - :type revision: str - :param vendor: Name of the distributing entity, organization or individual. - :type vendor: str - :param licenses: License(s) under which contained software is distributed as an SPDX License + :vartype version: str + :ivar revision: Source control revision identifier for the packaged software. + :vartype revision: str + :ivar vendor: Name of the distributing entity, organization or individual. + :vartype vendor: str + :ivar licenses: License(s) under which contained software is distributed as an SPDX License Expression. - :type licenses: str - :param name: Name of the reference for a target. - :type name: str - :param title: Human-readable title of the image. - :type title: str - :param description: Human-readable description of the software packaged in the image. - :type description: str + :vartype licenses: str + :ivar name: Name of the reference for a target. + :vartype name: str + :ivar title: Human-readable title of the image. + :vartype title: str + :ivar description: Human-readable description of the software packaged in the image. + :vartype description: str """ _attribute_map = { - 'additional_properties': {'key': '', 'type': '{str}'}, + 'additional_properties': {'key': '', 'type': '{object}'}, 'created': {'key': 'org\\.opencontainers\\.image\\.created', 'type': 'iso-8601'}, 'authors': {'key': 'org\\.opencontainers\\.image\\.authors', 'type': 'str'}, 'url': {'key': 'org\\.opencontainers\\.image\\.url', 'type': 'str'}, @@ -179,6 +208,38 @@ def __init__( self, **kwargs ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword created: Date and time on which the image was built (string, date-time as defined by + https://tools.ietf.org/html/rfc3339#section-5.6). + :paramtype created: ~datetime.datetime + :keyword authors: Contact details of the people or organization responsible for the image. + :paramtype authors: str + :keyword url: URL to find more information on the image. + :paramtype url: str + :keyword documentation: URL to get documentation on the image. + :paramtype documentation: str + :keyword source: URL to get source code for building the image. + :paramtype source: str + :keyword version: Version of the packaged software. The version MAY match a label or tag in the + source code repository, may also be Semantic versioning-compatible. + :paramtype version: str + :keyword revision: Source control revision identifier for the packaged software. + :paramtype revision: str + :keyword vendor: Name of the distributing entity, organization or individual. + :paramtype vendor: str + :keyword licenses: License(s) under which contained software is distributed as an SPDX License + Expression. + :paramtype licenses: str + :keyword name: Name of the reference for a target. + :paramtype name: str + :keyword title: Human-readable title of the image. + :paramtype title: str + :keyword description: Human-readable description of the software packaged in the image. + :paramtype description: str + """ super(Annotations, self).__init__(**kwargs) self.additional_properties = kwargs.get('additional_properties', None) self.created = kwargs.get('created', None) @@ -195,61 +256,104 @@ def __init__( self.description = kwargs.get('description', None) +class ArtifactManifestPlatform(msrest.serialization.Model): + """Manifest attributes details. + + 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. + + :ivar digest: Required. Manifest digest. + :vartype digest: str + :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". + :vartype architecture: str or ~container_registry.models.ArtifactArchitecture + :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", + "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", + "solaris", "windows". + :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem + """ + + _validation = { + 'digest': {'required': True, 'readonly': True}, + 'architecture': {'readonly': True}, + 'operating_system': {'readonly': True}, + } + + _attribute_map = { + 'digest': {'key': 'digest', 'type': 'str'}, + 'architecture': {'key': 'architecture', 'type': 'str'}, + 'operating_system': {'key': 'os', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ArtifactManifestPlatform, self).__init__(**kwargs) + self.digest = None + self.architecture = None + self.operating_system = None + + class ArtifactManifestProperties(msrest.serialization.Model): """Manifest attributes details. Variables are only populated by the server, and will be ignored when sending a request. - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Registry login server. :vartype registry_login_server: str :ivar repository_name: Repository name. :vartype repository_name: str - :ivar digest: Manifest. + :ivar digest: Required. Manifest. :vartype digest: str :ivar size: Image size. :vartype size: long - :ivar created_on: Created time. + :ivar created_on: Required. Created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Last update time. + :ivar last_updated_on: Required. Last update time. :vartype last_updated_on: ~datetime.datetime :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". :vartype architecture: str or ~container_registry.models.ArtifactArchitecture :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", "solaris", "windows". :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem - :ivar manifest_references: List of manifests referenced by this manifest list. List will be - empty if this manifest is not a manifest list. - :vartype manifest_references: list[~container_registry.models.ArtifactManifestReference] + :ivar related_artifacts: List of artifacts that are referenced by this manifest list, with + information about the platform each supports. This list will be empty if this is a leaf + manifest and not a manifest list. + :vartype related_artifacts: list[~container_registry.models.ArtifactManifestPlatform] :ivar tags: A set of tags. List of tags. :vartype tags: list[str] - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param quarantine_state: Quarantine state. - :type quarantine_state: str - :param quarantine_details: Quarantine details. - :type quarantine_details: str + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar quarantine_state: Quarantine state. + :vartype quarantine_state: str + :ivar quarantine_details: Quarantine details. + :vartype quarantine_details: str """ _validation = { 'registry_login_server': {'readonly': True}, 'repository_name': {'readonly': True}, - 'digest': {'readonly': True}, + 'digest': {'required': True, 'readonly': True}, 'size': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, 'architecture': {'readonly': True}, 'operating_system': {'readonly': True}, - 'manifest_references': {'readonly': True}, + 'related_artifacts': {'readonly': True}, 'tags': {'readonly': True}, } @@ -262,7 +366,7 @@ class ArtifactManifestProperties(msrest.serialization.Model): 'last_updated_on': {'key': 'manifest.lastUpdateTime', 'type': 'iso-8601'}, 'architecture': {'key': 'manifest.architecture', 'type': 'str'}, 'operating_system': {'key': 'manifest.os', 'type': 'str'}, - 'manifest_references': {'key': 'manifest.references', 'type': '[ArtifactManifestReference]'}, + 'related_artifacts': {'key': 'manifest.references', 'type': '[ArtifactManifestPlatform]'}, 'tags': {'key': 'manifest.tags', 'type': '[str]'}, 'can_delete': {'key': 'manifest.changeableAttributes.deleteEnabled', 'type': 'bool'}, 'can_write': {'key': 'manifest.changeableAttributes.writeEnabled', 'type': 'bool'}, @@ -276,6 +380,20 @@ def __init__( self, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword quarantine_state: Quarantine state. + :paramtype quarantine_state: str + :keyword quarantine_details: Quarantine details. + :paramtype quarantine_details: str + """ super(ArtifactManifestProperties, self).__init__(**kwargs) self.registry_login_server = None self.repository_name = None @@ -285,7 +403,7 @@ def __init__( self.last_updated_on = None self.architecture = None self.operating_system = None - self.manifest_references = None + self.related_artifacts = None self.tags = None self.can_delete = kwargs.get('can_delete', None) self.can_write = kwargs.get('can_write', None) @@ -295,110 +413,168 @@ def __init__( self.quarantine_details = kwargs.get('quarantine_details', None) -class ArtifactManifestReference(msrest.serialization.Model): - """Manifest attributes details. +class ArtifactTagProperties(msrest.serialization.Model): + """Tag attributes. Variables are only populated by the server, and will be ignored when sending a request. - :ivar digest: Manifest digest. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. + :vartype registry_login_server: str + :ivar repository_name: Required. Image name. + :vartype repository_name: str + :ivar name: Required. Tag name. + :vartype name: str + :ivar digest: Required. Tag digest. :vartype digest: str - :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". - :vartype architecture: str or ~container_registry.models.ArtifactArchitecture - :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", - "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", - "solaris", "windows". - :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem + :ivar created_on: Required. Tag created time. + :vartype created_on: ~datetime.datetime + :ivar last_updated_on: Required. Tag last update time. + :vartype last_updated_on: ~datetime.datetime + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool """ _validation = { - 'digest': {'readonly': True}, - 'architecture': {'readonly': True}, - 'operating_system': {'readonly': True}, + 'registry_login_server': {'required': True, 'readonly': True}, + 'repository_name': {'required': True, 'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'digest': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, } _attribute_map = { - 'digest': {'key': 'digest', 'type': 'str'}, - 'architecture': {'key': 'architecture', 'type': 'str'}, - 'operating_system': {'key': 'os', 'type': 'str'}, + 'registry_login_server': {'key': 'registry', 'type': 'str'}, + 'repository_name': {'key': 'imageName', 'type': 'str'}, + 'name': {'key': 'tag.name', 'type': 'str'}, + 'digest': {'key': 'tag.digest', 'type': 'str'}, + 'created_on': {'key': 'tag.createdTime', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'tag.lastUpdateTime', 'type': 'iso-8601'}, + 'can_delete': {'key': 'tag.changeableAttributes.deleteEnabled', 'type': 'bool'}, + 'can_write': {'key': 'tag.changeableAttributes.writeEnabled', 'type': 'bool'}, + 'can_list': {'key': 'tag.changeableAttributes.listEnabled', 'type': 'bool'}, + 'can_read': {'key': 'tag.changeableAttributes.readEnabled', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(ArtifactManifestReference, self).__init__(**kwargs) + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + """ + super(ArtifactTagProperties, self).__init__(**kwargs) + self.registry_login_server = None + self.repository_name = None + self.name = None self.digest = None - self.architecture = None - self.operating_system = None + self.created_on = None + self.last_updated_on = None + self.can_delete = kwargs.get('can_delete', None) + self.can_write = kwargs.get('can_write', None) + self.can_list = kwargs.get('can_list', None) + self.can_read = kwargs.get('can_read', None) -class ArtifactTagProperties(msrest.serialization.Model): - """Tag attributes. +class ContainerRepositoryProperties(msrest.serialization.Model): + """Properties of this repository. Variables are only populated by the server, and will be ignored when sending a request. - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. :vartype registry_login_server: str - :ivar repository_name: Image name. - :vartype repository_name: str - :ivar name: Tag name. + :ivar name: Required. Image name. :vartype name: str - :ivar digest: Tag digest. - :vartype digest: str - :ivar created_on: Tag created time. + :ivar created_on: Required. Image created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Tag last update time. + :ivar last_updated_on: Required. Image last update time. :vartype last_updated_on: ~datetime.datetime - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool + :ivar manifest_count: Required. Number of the manifests. + :vartype manifest_count: int + :ivar tag_count: Required. Number of the tags. + :vartype tag_count: int + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar teleport_enabled: Enables Teleport functionality on new images in the repository + improving Container startup performance. + :vartype teleport_enabled: bool """ _validation = { - 'registry_login_server': {'readonly': True}, - 'repository_name': {'readonly': True}, - 'name': {'readonly': True}, - 'digest': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'registry_login_server': {'required': True, 'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, + 'manifest_count': {'required': True, 'readonly': True}, + 'tag_count': {'required': True, 'readonly': True}, } _attribute_map = { 'registry_login_server': {'key': 'registry', 'type': 'str'}, - 'repository_name': {'key': 'imageName', 'type': 'str'}, - 'name': {'key': 'tag.name', 'type': 'str'}, - 'digest': {'key': 'tag.digest', 'type': 'str'}, - 'created_on': {'key': 'tag.createdTime', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'tag.lastUpdateTime', 'type': 'iso-8601'}, - 'can_delete': {'key': 'tag.changeableAttributes.deleteEnabled', 'type': 'bool'}, - 'can_write': {'key': 'tag.changeableAttributes.writeEnabled', 'type': 'bool'}, - 'can_list': {'key': 'tag.changeableAttributes.listEnabled', 'type': 'bool'}, - 'can_read': {'key': 'tag.changeableAttributes.readEnabled', 'type': 'bool'}, + 'name': {'key': 'imageName', 'type': 'str'}, + 'created_on': {'key': 'createdTime', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + 'manifest_count': {'key': 'manifestCount', 'type': 'int'}, + 'tag_count': {'key': 'tagCount', 'type': 'int'}, + 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, + 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, + 'can_list': {'key': 'changeableAttributes.listEnabled', 'type': 'bool'}, + 'can_read': {'key': 'changeableAttributes.readEnabled', 'type': 'bool'}, + 'teleport_enabled': {'key': 'changeableAttributes.teleportEnabled', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(ArtifactTagProperties, self).__init__(**kwargs) + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword teleport_enabled: Enables Teleport functionality on new images in the repository + improving Container startup performance. + :paramtype teleport_enabled: bool + """ + super(ContainerRepositoryProperties, self).__init__(**kwargs) self.registry_login_server = None - self.repository_name = None self.name = None - self.digest = None self.created_on = None self.last_updated_on = None + self.manifest_count = None + self.tag_count = None self.can_delete = kwargs.get('can_delete', None) self.can_write = kwargs.get('can_write', None) self.can_list = kwargs.get('can_list', None) self.can_read = kwargs.get('can_read', None) + self.teleport_enabled = kwargs.get('teleport_enabled', None) class DeleteRepositoryResult(msrest.serialization.Model): @@ -426,6 +602,8 @@ def __init__( self, **kwargs ): + """ + """ super(DeleteRepositoryResult, self).__init__(**kwargs) self.deleted_manifests = None self.deleted_tags = None @@ -434,16 +612,16 @@ def __init__( class Descriptor(msrest.serialization.Model): """Docker V2 image layer descriptor including config and layers. - :param media_type: Layer media type. - :type media_type: str - :param size: Layer size. - :type size: long - :param digest: Layer digest. - :type digest: str - :param urls: Specifies a list of URIs from which this object may be downloaded. - :type urls: list[str] - :param annotations: Additional information provided through arbitrary metadata. - :type annotations: ~container_registry.models.Annotations + :ivar media_type: Layer media type. + :vartype media_type: str + :ivar size: Layer size. + :vartype size: long + :ivar digest: Layer digest. + :vartype digest: str + :ivar urls: Specifies a list of URIs from which this object may be downloaded. + :vartype urls: list[str] + :ivar annotations: Additional information provided through arbitrary metadata. + :vartype annotations: ~container_registry.models.Annotations """ _attribute_map = { @@ -458,6 +636,18 @@ def __init__( self, **kwargs ): + """ + :keyword media_type: Layer media type. + :paramtype media_type: str + :keyword size: Layer size. + :paramtype size: long + :keyword digest: Layer digest. + :paramtype digest: str + :keyword urls: Specifies a list of URIs from which this object may be downloaded. + :paramtype urls: list[str] + :keyword annotations: Additional information provided through arbitrary metadata. + :paramtype annotations: ~container_registry.models.Annotations + """ super(Descriptor, self).__init__(**kwargs) self.media_type = kwargs.get('media_type', None) self.size = kwargs.get('size', None) @@ -469,8 +659,8 @@ def __init__( class FsLayer(msrest.serialization.Model): """Image layer information. - :param blob_sum: SHA of an image layer. - :type blob_sum: str + :ivar blob_sum: SHA of an image layer. + :vartype blob_sum: str """ _attribute_map = { @@ -481,6 +671,10 @@ def __init__( self, **kwargs ): + """ + :keyword blob_sum: SHA of an image layer. + :paramtype blob_sum: str + """ super(FsLayer, self).__init__(**kwargs) self.blob_sum = kwargs.get('blob_sum', None) @@ -488,8 +682,8 @@ def __init__( class History(msrest.serialization.Model): """A list of unstructured historical data for v1 compatibility. - :param v1_compatibility: The raw v1 compatibility information. - :type v1_compatibility: str + :ivar v1_compatibility: The raw v1 compatibility information. + :vartype v1_compatibility: str """ _attribute_map = { @@ -500,6 +694,10 @@ def __init__( self, **kwargs ): + """ + :keyword v1_compatibility: The raw v1 compatibility information. + :paramtype v1_compatibility: str + """ super(History, self).__init__(**kwargs) self.v1_compatibility = kwargs.get('v1_compatibility', None) @@ -507,12 +705,12 @@ def __init__( class ImageSignature(msrest.serialization.Model): """Signature of a signed manifest. - :param header: A JSON web signature. - :type header: ~container_registry.models.JWK - :param signature: A signature for the image manifest, signed by a libtrust private key. - :type signature: str - :param protected: The signed protected header. - :type protected: str + :ivar header: A JSON web signature. + :vartype header: ~container_registry.models.JWK + :ivar signature: A signature for the image manifest, signed by a libtrust private key. + :vartype signature: str + :ivar protected: The signed protected header. + :vartype protected: str """ _attribute_map = { @@ -525,6 +723,14 @@ def __init__( self, **kwargs ): + """ + :keyword header: A JSON web signature. + :paramtype header: ~container_registry.models.JWK + :keyword signature: A signature for the image manifest, signed by a libtrust private key. + :paramtype signature: str + :keyword protected: The signed protected header. + :paramtype protected: str + """ super(ImageSignature, self).__init__(**kwargs) self.header = kwargs.get('header', None) self.signature = kwargs.get('signature', None) @@ -534,10 +740,10 @@ def __init__( class JWK(msrest.serialization.Model): """A JSON web signature. - :param jwk: JSON web key parameter. - :type jwk: ~container_registry.models.JWKHeader - :param alg: The algorithm used to sign or encrypt the JWT. - :type alg: str + :ivar jwk: JSON web key parameter. + :vartype jwk: ~container_registry.models.JWKHeader + :ivar alg: The algorithm used to sign or encrypt the JWT. + :vartype alg: str """ _attribute_map = { @@ -549,6 +755,12 @@ def __init__( self, **kwargs ): + """ + :keyword jwk: JSON web key parameter. + :paramtype jwk: ~container_registry.models.JWKHeader + :keyword alg: The algorithm used to sign or encrypt the JWT. + :paramtype alg: str + """ super(JWK, self).__init__(**kwargs) self.jwk = kwargs.get('jwk', None) self.alg = kwargs.get('alg', None) @@ -557,16 +769,16 @@ def __init__( class JWKHeader(msrest.serialization.Model): """JSON web key parameter. - :param crv: crv value. - :type crv: str - :param kid: kid value. - :type kid: str - :param kty: kty value. - :type kty: str - :param x: x value. - :type x: str - :param y: y value. - :type y: str + :ivar crv: crv value. + :vartype crv: str + :ivar kid: kid value. + :vartype kid: str + :ivar kty: kty value. + :vartype kty: str + :ivar x: x value. + :vartype x: str + :ivar y: y value. + :vartype y: str """ _attribute_map = { @@ -581,6 +793,18 @@ def __init__( self, **kwargs ): + """ + :keyword crv: crv value. + :paramtype crv: str + :keyword kid: kid value. + :paramtype kid: str + :keyword kty: kty value. + :paramtype kty: str + :keyword x: x value. + :paramtype x: str + :keyword y: y value. + :paramtype y: str + """ super(JWKHeader, self).__init__(**kwargs) self.crv = kwargs.get('crv', None) self.kid = kwargs.get('kid', None) @@ -592,8 +816,8 @@ def __init__( class Manifest(msrest.serialization.Model): """Returns the requested manifest file. - :param schema_version: Schema version. - :type schema_version: int + :ivar schema_version: Schema version. + :vartype schema_version: int """ _attribute_map = { @@ -604,6 +828,10 @@ def __init__( self, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + """ super(Manifest, self).__init__(**kwargs) self.schema_version = kwargs.get('schema_version', None) @@ -613,49 +841,51 @@ class ManifestAttributesBase(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar digest: Manifest. + All required parameters must be populated in order to send to Azure. + + :ivar digest: Required. Manifest. :vartype digest: str :ivar size: Image size. :vartype size: long - :ivar created_on: Created time. + :ivar created_on: Required. Created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Last update time. + :ivar last_updated_on: Required. Last update time. :vartype last_updated_on: ~datetime.datetime :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". :vartype architecture: str or ~container_registry.models.ArtifactArchitecture :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", "solaris", "windows". :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem - :ivar manifest_references: List of manifests referenced by this manifest list. List will be - empty if this manifest is not a manifest list. - :vartype manifest_references: list[~container_registry.models.ArtifactManifestReference] + :ivar related_artifacts: List of artifacts that are referenced by this manifest list, with + information about the platform each supports. This list will be empty if this is a leaf + manifest and not a manifest list. + :vartype related_artifacts: list[~container_registry.models.ArtifactManifestPlatform] :ivar tags: A set of tags. List of tags. :vartype tags: list[str] - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param quarantine_state: Quarantine state. - :type quarantine_state: str - :param quarantine_details: Quarantine details. - :type quarantine_details: str + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar quarantine_state: Quarantine state. + :vartype quarantine_state: str + :ivar quarantine_details: Quarantine details. + :vartype quarantine_details: str """ _validation = { - 'digest': {'readonly': True}, + 'digest': {'required': True, 'readonly': True}, 'size': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, 'architecture': {'readonly': True}, 'operating_system': {'readonly': True}, - 'manifest_references': {'readonly': True}, + 'related_artifacts': {'readonly': True}, 'tags': {'readonly': True}, } @@ -666,7 +896,7 @@ class ManifestAttributesBase(msrest.serialization.Model): 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, 'architecture': {'key': 'architecture', 'type': 'str'}, 'operating_system': {'key': 'os', 'type': 'str'}, - 'manifest_references': {'key': 'references', 'type': '[ArtifactManifestReference]'}, + 'related_artifacts': {'key': 'references', 'type': '[ArtifactManifestPlatform]'}, 'tags': {'key': 'tags', 'type': '[str]'}, 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, @@ -680,6 +910,20 @@ def __init__( self, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword quarantine_state: Quarantine state. + :paramtype quarantine_state: str + :keyword quarantine_details: Quarantine details. + :paramtype quarantine_details: str + """ super(ManifestAttributesBase, self).__init__(**kwargs) self.digest = None self.size = None @@ -687,7 +931,7 @@ def __init__( self.last_updated_on = None self.architecture = None self.operating_system = None - self.manifest_references = None + self.related_artifacts = None self.tags = None self.can_delete = kwargs.get('can_delete', None) self.can_write = kwargs.get('can_write', None) @@ -700,14 +944,14 @@ def __init__( class ManifestAttributesManifest(msrest.serialization.Model): """List of manifest attributes. - :param references: List of manifest attributes details. - :type references: list[~container_registry.models.ArtifactManifestReference] - :param quarantine_tag: Quarantine tag name. - :type quarantine_tag: str + :ivar references: List of manifest attributes details. + :vartype references: list[~container_registry.models.ArtifactManifestPlatform] + :ivar quarantine_tag: Quarantine tag name. + :vartype quarantine_tag: str """ _attribute_map = { - 'references': {'key': 'references', 'type': '[ArtifactManifestReference]'}, + 'references': {'key': 'references', 'type': '[ArtifactManifestPlatform]'}, 'quarantine_tag': {'key': 'quarantineTag', 'type': 'str'}, } @@ -715,6 +959,12 @@ def __init__( self, **kwargs ): + """ + :keyword references: List of manifest attributes details. + :paramtype references: list[~container_registry.models.ArtifactManifestPlatform] + :keyword quarantine_tag: Quarantine tag name. + :paramtype quarantine_tag: str + """ super(ManifestAttributesManifest, self).__init__(**kwargs) self.references = kwargs.get('references', None) self.quarantine_tag = kwargs.get('quarantine_tag', None) @@ -723,12 +973,12 @@ def __init__( class ManifestList(Manifest): """Returns the requested Docker multi-arch-manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param media_type: Media type for this Manifest. - :type media_type: str - :param manifests: List of V2 image layer information. - :type manifests: list[~container_registry.models.ManifestListAttributes] + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar media_type: Media type for this Manifest. + :vartype media_type: str + :ivar manifests: List of V2 image layer information. + :vartype manifests: list[~container_registry.models.ManifestListAttributes] """ _attribute_map = { @@ -741,6 +991,14 @@ def __init__( self, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword media_type: Media type for this Manifest. + :paramtype media_type: str + :keyword manifests: List of V2 image layer information. + :paramtype manifests: list[~container_registry.models.ManifestListAttributes] + """ super(ManifestList, self).__init__(**kwargs) self.media_type = kwargs.get('media_type', None) self.manifests = kwargs.get('manifests', None) @@ -749,18 +1007,18 @@ def __init__( class ManifestListAttributes(msrest.serialization.Model): """ManifestListAttributes. - :param media_type: The MIME type of the referenced object. This will generally be + :ivar media_type: The MIME type of the referenced object. This will generally be application/vnd.docker.image.manifest.v2+json, but it could also be application/vnd.docker.image.manifest.v1+json. - :type media_type: str - :param size: The size in bytes of the object. - :type size: long - :param digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. - :type digest: str - :param platform: The platform object describes the platform which the image in the manifest - runs on. A full list of valid operating system and architecture values are listed in the Go - language documentation for $GOOS and $GOARCH. - :type platform: ~container_registry.models.Platform + :vartype media_type: str + :ivar size: The size in bytes of the object. + :vartype size: long + :ivar digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. + :vartype digest: str + :ivar platform: The platform object describes the platform which the image in the manifest runs + on. A full list of valid operating system and architecture values are listed in the Go language + documentation for $GOOS and $GOARCH. + :vartype platform: ~container_registry.models.Platform """ _attribute_map = { @@ -774,6 +1032,21 @@ def __init__( self, **kwargs ): + """ + :keyword media_type: The MIME type of the referenced object. This will generally be + application/vnd.docker.image.manifest.v2+json, but it could also be + application/vnd.docker.image.manifest.v1+json. + :paramtype media_type: str + :keyword size: The size in bytes of the object. + :paramtype size: long + :keyword digest: The digest of the content, as defined by the Registry V2 HTTP API + Specification. + :paramtype digest: str + :keyword platform: The platform object describes the platform which the image in the manifest + runs on. A full list of valid operating system and architecture values are listed in the Go + language documentation for $GOOS and $GOARCH. + :paramtype platform: ~container_registry.models.Platform + """ super(ManifestListAttributes, self).__init__(**kwargs) self.media_type = kwargs.get('media_type', None) self.size = kwargs.get('size', None) @@ -784,30 +1057,30 @@ def __init__( class ManifestWrapper(Manifest): """Returns the requested manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param media_type: Media type for this Manifest. - :type media_type: str - :param manifests: (ManifestList, OCIIndex) List of V2 image layer information. - :type manifests: list[~container_registry.models.ManifestListAttributes] - :param config: (V2, OCI) Image config descriptor. - :type config: ~container_registry.models.Descriptor - :param layers: (V2, OCI) List of V2 image layer information. - :type layers: list[~container_registry.models.Descriptor] - :param annotations: (OCI, OCIIndex) Additional metadata. - :type annotations: ~container_registry.models.Annotations - :param architecture: (V1) CPU architecture. - :type architecture: str - :param name: (V1) Image name. - :type name: str - :param tag: (V1) Image tag. - :type tag: str - :param fs_layers: (V1) List of layer information. - :type fs_layers: list[~container_registry.models.FsLayer] - :param history: (V1) Image history. - :type history: list[~container_registry.models.History] - :param signatures: (V1) Image signature. - :type signatures: list[~container_registry.models.ImageSignature] + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar media_type: Media type for this Manifest. + :vartype media_type: str + :ivar manifests: (ManifestList, OCIIndex) List of V2 image layer information. + :vartype manifests: list[~container_registry.models.ManifestListAttributes] + :ivar config: (V2, OCI) Image config descriptor. + :vartype config: ~container_registry.models.Descriptor + :ivar layers: (V2, OCI) List of V2 image layer information. + :vartype layers: list[~container_registry.models.Descriptor] + :ivar annotations: (OCI, OCIIndex) Additional metadata. + :vartype annotations: ~container_registry.models.Annotations + :ivar architecture: (V1) CPU architecture. + :vartype architecture: str + :ivar name: (V1) Image name. + :vartype name: str + :ivar tag: (V1) Image tag. + :vartype tag: str + :ivar fs_layers: (V1) List of layer information. + :vartype fs_layers: list[~container_registry.models.FsLayer] + :ivar history: (V1) Image history. + :vartype history: list[~container_registry.models.History] + :ivar signatures: (V1) Image signature. + :vartype signatures: list[~container_registry.models.ImageSignature] """ _attribute_map = { @@ -829,6 +1102,32 @@ def __init__( self, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword media_type: Media type for this Manifest. + :paramtype media_type: str + :keyword manifests: (ManifestList, OCIIndex) List of V2 image layer information. + :paramtype manifests: list[~container_registry.models.ManifestListAttributes] + :keyword config: (V2, OCI) Image config descriptor. + :paramtype config: ~container_registry.models.Descriptor + :keyword layers: (V2, OCI) List of V2 image layer information. + :paramtype layers: list[~container_registry.models.Descriptor] + :keyword annotations: (OCI, OCIIndex) Additional metadata. + :paramtype annotations: ~container_registry.models.Annotations + :keyword architecture: (V1) CPU architecture. + :paramtype architecture: str + :keyword name: (V1) Image name. + :paramtype name: str + :keyword tag: (V1) Image tag. + :paramtype tag: str + :keyword fs_layers: (V1) List of layer information. + :paramtype fs_layers: list[~container_registry.models.FsLayer] + :keyword history: (V1) Image history. + :paramtype history: list[~container_registry.models.History] + :keyword signatures: (V1) Image signature. + :paramtype signatures: list[~container_registry.models.ImageSignature] + """ super(ManifestWrapper, self).__init__(**kwargs) self.media_type = kwargs.get('media_type', None) self.manifests = kwargs.get('manifests', None) @@ -846,18 +1145,18 @@ def __init__( class ManifestWriteableProperties(msrest.serialization.Model): """Changeable attributes. - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param quarantine_state: Quarantine state. - :type quarantine_state: str - :param quarantine_details: Quarantine details. - :type quarantine_details: str + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar quarantine_state: Quarantine state. + :vartype quarantine_state: str + :ivar quarantine_details: Quarantine details. + :vartype quarantine_details: str """ _attribute_map = { @@ -873,6 +1172,20 @@ def __init__( self, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword quarantine_state: Quarantine state. + :paramtype quarantine_state: str + :keyword quarantine_details: Quarantine details. + :paramtype quarantine_details: str + """ super(ManifestWriteableProperties, self).__init__(**kwargs) self.can_delete = kwargs.get('can_delete', None) self.can_write = kwargs.get('can_write', None) @@ -885,12 +1198,12 @@ def __init__( class OCIIndex(Manifest): """Returns the requested OCI index file. - :param schema_version: Schema version. - :type schema_version: int - :param manifests: List of OCI image layer information. - :type manifests: list[~container_registry.models.ManifestListAttributes] - :param annotations: Additional information provided through arbitrary metadata. - :type annotations: ~container_registry.models.Annotations + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar manifests: List of OCI image layer information. + :vartype manifests: list[~container_registry.models.ManifestListAttributes] + :ivar annotations: Additional information provided through arbitrary metadata. + :vartype annotations: ~container_registry.models.Annotations """ _attribute_map = { @@ -903,6 +1216,14 @@ def __init__( self, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword manifests: List of OCI image layer information. + :paramtype manifests: list[~container_registry.models.ManifestListAttributes] + :keyword annotations: Additional information provided through arbitrary metadata. + :paramtype annotations: ~container_registry.models.Annotations + """ super(OCIIndex, self).__init__(**kwargs) self.manifests = kwargs.get('manifests', None) self.annotations = kwargs.get('annotations', None) @@ -911,14 +1232,14 @@ def __init__( class OCIManifest(Manifest): """Returns the requested OCI Manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param config: V2 image config descriptor. - :type config: ~container_registry.models.Descriptor - :param layers: List of V2 image layer information. - :type layers: list[~container_registry.models.Descriptor] - :param annotations: Additional information provided through arbitrary metadata. - :type annotations: ~container_registry.models.Annotations + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar config: V2 image config descriptor. + :vartype config: ~container_registry.models.Descriptor + :ivar layers: List of V2 image layer information. + :vartype layers: list[~container_registry.models.Descriptor] + :ivar annotations: Additional information provided through arbitrary metadata. + :vartype annotations: ~container_registry.models.Annotations """ _attribute_map = { @@ -932,6 +1253,16 @@ def __init__( self, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword config: V2 image config descriptor. + :paramtype config: ~container_registry.models.Descriptor + :keyword layers: List of V2 image layer information. + :paramtype layers: list[~container_registry.models.Descriptor] + :keyword annotations: Additional information provided through arbitrary metadata. + :paramtype annotations: ~container_registry.models.Annotations + """ super(OCIManifest, self).__init__(**kwargs) self.config = kwargs.get('config', None) self.layers = kwargs.get('layers', None) @@ -945,13 +1276,13 @@ class Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlenco All required parameters must be populated in order to send to Azure. - :ivar grant_type: Required. Can take a value of access_token. Default value: "access_token". + :ivar grant_type: Can take a value of access_token. Has constant value: "access_token". :vartype grant_type: str - :param service: Required. Indicates the name of your Azure container registry. - :type service: str - :param aad_access_token: Required. AAD access token, mandatory when grant_type is + :ivar service: Required. Indicates the name of your Azure container registry. + :vartype service: str + :ivar aad_access_token: Required. AAD access token, mandatory when grant_type is access_token_refresh_token or access_token. - :type aad_access_token: str + :vartype aad_access_token: str """ _validation = { @@ -972,6 +1303,13 @@ def __init__( self, **kwargs ): + """ + :keyword service: Required. Indicates the name of your Azure container registry. + :paramtype service: str + :keyword aad_access_token: Required. AAD access token, mandatory when grant_type is + access_token_refresh_token or access_token. + :paramtype aad_access_token: str + """ super(Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema, self).__init__(**kwargs) self.service = kwargs['service'] self.aad_access_token = kwargs['aad_access_token'] @@ -982,17 +1320,17 @@ class PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedS All required parameters must be populated in order to send to Azure. - :param service: Required. Indicates the name of your Azure container registry. - :type service: str - :param scope: Required. Which is expected to be a valid scope, and can be specified more than + :ivar service: Required. Indicates the name of your Azure container registry. + :vartype service: str + :ivar scope: Required. Which is expected to be a valid scope, and can be specified more than once for multiple scope requests. You obtained this from the Www-Authenticate response header from the challenge. - :type scope: str - :param acr_refresh_token: Required. Must be a valid ACR refresh token. - :type acr_refresh_token: str - :param grant_type: Required. Grant type is expected to be refresh_token. Possible values + :vartype scope: str + :ivar acr_refresh_token: Required. Must be a valid ACR refresh token. + :vartype acr_refresh_token: str + :ivar grant_type: Required. Grant type is expected to be refresh_token. Possible values include: "refresh_token", "password". - :type grant_type: str or ~container_registry.models.TokenGrantType + :vartype grant_type: str or ~container_registry.models.TokenGrantType """ _validation = { @@ -1013,6 +1351,19 @@ def __init__( self, **kwargs ): + """ + :keyword service: Required. Indicates the name of your Azure container registry. + :paramtype service: str + :keyword scope: Required. Which is expected to be a valid scope, and can be specified more than + once for multiple scope requests. You obtained this from the Www-Authenticate response header + from the challenge. + :paramtype scope: str + :keyword acr_refresh_token: Required. Must be a valid ACR refresh token. + :paramtype acr_refresh_token: str + :keyword grant_type: Required. Grant type is expected to be refresh_token. Possible values + include: "refresh_token", "password". + :paramtype grant_type: str or ~container_registry.models.TokenGrantType + """ super(PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema, self).__init__(**kwargs) self.service = kwargs['service'] self.scope = kwargs['scope'] @@ -1023,22 +1374,22 @@ def __init__( class Platform(msrest.serialization.Model): """The platform object describes the platform which the image in the manifest runs on. A full list of valid operating system and architecture values are listed in the Go language documentation for $GOOS and $GOARCH. - :param architecture: Specifies the CPU architecture, for example amd64 or ppc64le. - :type architecture: str - :param os: The os field specifies the operating system, for example linux or windows. - :type os: str - :param os_version: The optional os.version field specifies the operating system version, for + :ivar architecture: Specifies the CPU architecture, for example amd64 or ppc64le. + :vartype architecture: str + :ivar os: The os field specifies the operating system, for example linux or windows. + :vartype os: str + :ivar os_version: The optional os.version field specifies the operating system version, for example 10.0.10586. - :type os_version: str - :param os_features: The optional os.features field specifies an array of strings, each listing - a required OS feature (for example on Windows win32k. - :type os_features: list[str] - :param variant: The optional variant field specifies a variant of the CPU, for example armv6l - to specify a particular CPU variant of the ARM CPU. - :type variant: str - :param features: The optional features field specifies an array of strings, each listing a + :vartype os_version: str + :ivar os_features: The optional os.features field specifies an array of strings, each listing a + required OS feature (for example on Windows win32k. + :vartype os_features: list[str] + :ivar variant: The optional variant field specifies a variant of the CPU, for example armv6l to + specify a particular CPU variant of the ARM CPU. + :vartype variant: str + :ivar features: The optional features field specifies an array of strings, each listing a required CPU feature (for example sse4 or aes. - :type features: list[str] + :vartype features: list[str] """ _attribute_map = { @@ -1054,6 +1405,24 @@ def __init__( self, **kwargs ): + """ + :keyword architecture: Specifies the CPU architecture, for example amd64 or ppc64le. + :paramtype architecture: str + :keyword os: The os field specifies the operating system, for example linux or windows. + :paramtype os: str + :keyword os_version: The optional os.version field specifies the operating system version, for + example 10.0.10586. + :paramtype os_version: str + :keyword os_features: The optional os.features field specifies an array of strings, each + listing a required OS feature (for example on Windows win32k. + :paramtype os_features: list[str] + :keyword variant: The optional variant field specifies a variant of the CPU, for example armv6l + to specify a particular CPU variant of the ARM CPU. + :paramtype variant: str + :keyword features: The optional features field specifies an array of strings, each listing a + required CPU feature (for example sse4 or aes. + :paramtype features: list[str] + """ super(Platform, self).__init__(**kwargs) self.architecture = kwargs.get('architecture', None) self.os = kwargs.get('os', None) @@ -1066,10 +1435,10 @@ def __init__( class Repositories(msrest.serialization.Model): """List of repositories. - :param repositories: Repository names. - :type repositories: list[str] - :param link: - :type link: str + :ivar repositories: Repository names. + :vartype repositories: list[str] + :ivar link: + :vartype link: str """ _attribute_map = { @@ -1081,90 +1450,24 @@ def __init__( self, **kwargs ): + """ + :keyword repositories: Repository names. + :paramtype repositories: list[str] + :keyword link: + :paramtype link: str + """ super(Repositories, self).__init__(**kwargs) self.repositories = kwargs.get('repositories', None) self.link = kwargs.get('link', None) -class RepositoryProperties(msrest.serialization.Model): - """Repository attributes. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. - :vartype registry_login_server: str - :ivar name: Image name. - :vartype name: str - :ivar created_on: Image created time. - :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Image last update time. - :vartype last_updated_on: ~datetime.datetime - :ivar manifest_count: Number of the manifests. - :vartype manifest_count: int - :ivar tag_count: Number of the tags. - :vartype tag_count: int - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param teleport_enabled: Enables Teleport functionality on new images in the repository - improving Container startup performance. - :type teleport_enabled: bool - """ - - _validation = { - 'registry_login_server': {'readonly': True}, - 'name': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, - 'manifest_count': {'readonly': True}, - 'tag_count': {'readonly': True}, - } - - _attribute_map = { - 'registry_login_server': {'key': 'registry', 'type': 'str'}, - 'name': {'key': 'imageName', 'type': 'str'}, - 'created_on': {'key': 'createdTime', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - 'manifest_count': {'key': 'manifestCount', 'type': 'int'}, - 'tag_count': {'key': 'tagCount', 'type': 'int'}, - 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, - 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, - 'can_list': {'key': 'changeableAttributes.listEnabled', 'type': 'bool'}, - 'can_read': {'key': 'changeableAttributes.readEnabled', 'type': 'bool'}, - 'teleport_enabled': {'key': 'changeableAttributes.teleportEnabled', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(RepositoryProperties, self).__init__(**kwargs) - self.registry_login_server = None - self.name = None - self.created_on = None - self.last_updated_on = None - self.manifest_count = None - self.tag_count = None - self.can_delete = kwargs.get('can_delete', None) - self.can_write = kwargs.get('can_write', None) - self.can_list = kwargs.get('can_list', None) - self.can_read = kwargs.get('can_read', None) - self.teleport_enabled = kwargs.get('teleport_enabled', None) - - class RepositoryTags(msrest.serialization.Model): """Result of the request to list tags of the image. - :param name: Name of the image. - :type name: str - :param tags: A set of tags. List of tags. - :type tags: list[str] + :ivar name: Name of the image. + :vartype name: str + :ivar tags: A set of tags. List of tags. + :vartype tags: list[str] """ _attribute_map = { @@ -1176,6 +1479,12 @@ def __init__( self, **kwargs ): + """ + :keyword name: Name of the image. + :paramtype name: str + :keyword tags: A set of tags. List of tags. + :paramtype tags: list[str] + """ super(RepositoryTags, self).__init__(**kwargs) self.name = kwargs.get('name', None) self.tags = kwargs.get('tags', None) @@ -1184,17 +1493,17 @@ def __init__( class RepositoryWriteableProperties(msrest.serialization.Model): """Changeable attributes for Repository. - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param teleport_enabled: Enables Teleport functionality on new images in the repository + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar teleport_enabled: Enables Teleport functionality on new images in the repository improving Container startup performance. - :type teleport_enabled: bool + :vartype teleport_enabled: bool """ _attribute_map = { @@ -1209,6 +1518,19 @@ def __init__( self, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword teleport_enabled: Enables Teleport functionality on new images in the repository + improving Container startup performance. + :paramtype teleport_enabled: bool + """ super(RepositoryWriteableProperties, self).__init__(**kwargs) self.can_delete = kwargs.get('can_delete', None) self.can_write = kwargs.get('can_write', None) @@ -1222,29 +1544,31 @@ class TagAttributesBase(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: Tag name. + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Tag name. :vartype name: str - :ivar digest: Tag digest. + :ivar digest: Required. Tag digest. :vartype digest: str - :ivar created_on: Tag created time. + :ivar created_on: Required. Tag created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Tag last update time. + :ivar last_updated_on: Required. Tag last update time. :vartype last_updated_on: ~datetime.datetime - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool """ _validation = { - 'name': {'readonly': True}, - 'digest': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'digest': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, } _attribute_map = { @@ -1262,6 +1586,16 @@ def __init__( self, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + """ super(TagAttributesBase, self).__init__(**kwargs) self.name = None self.digest = None @@ -1276,8 +1610,8 @@ def __init__( class TagAttributesTag(msrest.serialization.Model): """Tag. - :param signature_record: SignatureRecord value. - :type signature_record: str + :ivar signature_record: SignatureRecord value. + :vartype signature_record: str """ _attribute_map = { @@ -1288,6 +1622,10 @@ def __init__( self, **kwargs ): + """ + :keyword signature_record: SignatureRecord value. + :paramtype signature_record: str + """ super(TagAttributesTag, self).__init__(**kwargs) self.signature_record = kwargs.get('signature_record', None) @@ -1295,17 +1633,24 @@ def __init__( class TagList(msrest.serialization.Model): """List of tag details. - :param registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. - :type registry_login_server: str - :param repository: Image name. - :type repository: str - :param tag_attribute_bases: List of tag attribute details. - :type tag_attribute_bases: list[~container_registry.models.TagAttributesBase] - :param link: - :type link: str + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. + :vartype registry_login_server: str + :ivar repository: Required. Image name. + :vartype repository: str + :ivar tag_attribute_bases: Required. List of tag attribute details. + :vartype tag_attribute_bases: list[~container_registry.models.TagAttributesBase] + :ivar link: + :vartype link: str """ + _validation = { + 'registry_login_server': {'required': True}, + 'repository': {'required': True}, + 'tag_attribute_bases': {'required': True}, + } + _attribute_map = { 'registry_login_server': {'key': 'registry', 'type': 'str'}, 'repository': {'key': 'imageName', 'type': 'str'}, @@ -1317,24 +1662,34 @@ def __init__( self, **kwargs ): + """ + :keyword registry_login_server: Required. Registry login server. + :paramtype registry_login_server: str + :keyword repository: Required. Image name. + :paramtype repository: str + :keyword tag_attribute_bases: Required. List of tag attribute details. + :paramtype tag_attribute_bases: list[~container_registry.models.TagAttributesBase] + :keyword link: + :paramtype link: str + """ super(TagList, self).__init__(**kwargs) - self.registry_login_server = kwargs.get('registry_login_server', None) - self.repository = kwargs.get('repository', None) - self.tag_attribute_bases = kwargs.get('tag_attribute_bases', None) + self.registry_login_server = kwargs['registry_login_server'] + self.repository = kwargs['repository'] + self.tag_attribute_bases = kwargs['tag_attribute_bases'] self.link = kwargs.get('link', None) class TagWriteableProperties(msrest.serialization.Model): """Changeable attributes. - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool """ _attribute_map = { @@ -1348,6 +1703,16 @@ def __init__( self, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + """ super(TagWriteableProperties, self).__init__(**kwargs) self.can_delete = kwargs.get('can_delete', None) self.can_write = kwargs.get('can_write', None) @@ -1358,20 +1723,20 @@ def __init__( class V1Manifest(Manifest): """Returns the requested V1 manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param architecture: CPU architecture. - :type architecture: str - :param name: Image name. - :type name: str - :param tag: Image tag. - :type tag: str - :param fs_layers: List of layer information. - :type fs_layers: list[~container_registry.models.FsLayer] - :param history: Image history. - :type history: list[~container_registry.models.History] - :param signatures: Image signature. - :type signatures: list[~container_registry.models.ImageSignature] + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar architecture: CPU architecture. + :vartype architecture: str + :ivar name: Image name. + :vartype name: str + :ivar tag: Image tag. + :vartype tag: str + :ivar fs_layers: List of layer information. + :vartype fs_layers: list[~container_registry.models.FsLayer] + :ivar history: Image history. + :vartype history: list[~container_registry.models.History] + :ivar signatures: Image signature. + :vartype signatures: list[~container_registry.models.ImageSignature] """ _attribute_map = { @@ -1388,6 +1753,22 @@ def __init__( self, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword architecture: CPU architecture. + :paramtype architecture: str + :keyword name: Image name. + :paramtype name: str + :keyword tag: Image tag. + :paramtype tag: str + :keyword fs_layers: List of layer information. + :paramtype fs_layers: list[~container_registry.models.FsLayer] + :keyword history: Image history. + :paramtype history: list[~container_registry.models.History] + :keyword signatures: Image signature. + :paramtype signatures: list[~container_registry.models.ImageSignature] + """ super(V1Manifest, self).__init__(**kwargs) self.architecture = kwargs.get('architecture', None) self.name = kwargs.get('name', None) @@ -1400,14 +1781,14 @@ def __init__( class V2Manifest(Manifest): """Returns the requested Docker V2 Manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param media_type: Media type for this Manifest. - :type media_type: str - :param config: V2 image config descriptor. - :type config: ~container_registry.models.Descriptor - :param layers: List of V2 image layer information. - :type layers: list[~container_registry.models.Descriptor] + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar media_type: Media type for this Manifest. + :vartype media_type: str + :ivar config: V2 image config descriptor. + :vartype config: ~container_registry.models.Descriptor + :ivar layers: List of V2 image layer information. + :vartype layers: list[~container_registry.models.Descriptor] """ _attribute_map = { @@ -1421,6 +1802,16 @@ def __init__( self, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword media_type: Media type for this Manifest. + :paramtype media_type: str + :keyword config: V2 image config descriptor. + :paramtype config: ~container_registry.models.Descriptor + :keyword layers: List of V2 image layer information. + :paramtype layers: list[~container_registry.models.Descriptor] + """ super(V2Manifest, self).__init__(**kwargs) self.media_type = kwargs.get('media_type', None) self.config = kwargs.get('config', None) diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models_py3.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models_py3.py index 6e4bc1674d9a..f94b833cbe07 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models_py3.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/models/_models_py3.py @@ -1,11 +1,11 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -16,8 +16,8 @@ class AcrAccessToken(msrest.serialization.Model): """AcrAccessToken. - :param access_token: The access token for performing authenticated requests. - :type access_token: str + :ivar access_token: The access token for performing authenticated requests. + :vartype access_token: str """ _attribute_map = { @@ -30,6 +30,10 @@ def __init__( access_token: Optional[str] = None, **kwargs ): + """ + :keyword access_token: The access token for performing authenticated requests. + :paramtype access_token: str + """ super(AcrAccessToken, self).__init__(**kwargs) self.access_token = access_token @@ -37,18 +41,18 @@ def __init__( class AcrErrorInfo(msrest.serialization.Model): """Error information. - :param code: Error code. - :type code: str - :param message: Error message. - :type message: str - :param detail: Error details. - :type detail: str + :ivar code: Error code. + :vartype code: str + :ivar message: Error message. + :vartype message: str + :ivar detail: Error details. + :vartype detail: any """ _attribute_map = { 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, - 'detail': {'key': 'detail', 'type': 'str'}, + 'detail': {'key': 'detail', 'type': 'object'}, } def __init__( @@ -56,9 +60,17 @@ def __init__( *, code: Optional[str] = None, message: Optional[str] = None, - detail: Optional[str] = None, + detail: Optional[Any] = None, **kwargs ): + """ + :keyword code: Error code. + :paramtype code: str + :keyword message: Error message. + :paramtype message: str + :keyword detail: Error details. + :paramtype detail: any + """ super(AcrErrorInfo, self).__init__(**kwargs) self.code = code self.message = message @@ -68,8 +80,8 @@ def __init__( class AcrErrors(msrest.serialization.Model): """Acr error response describing why the operation failed. - :param errors: Array of detailed error. - :type errors: list[~container_registry.models.AcrErrorInfo] + :ivar errors: Array of detailed error. + :vartype errors: list[~container_registry.models.AcrErrorInfo] """ _attribute_map = { @@ -82,6 +94,10 @@ def __init__( errors: Optional[List["AcrErrorInfo"]] = None, **kwargs ): + """ + :keyword errors: Array of detailed error. + :paramtype errors: list[~container_registry.models.AcrErrorInfo] + """ super(AcrErrors, self).__init__(**kwargs) self.errors = errors @@ -89,15 +105,14 @@ def __init__( class AcrManifests(msrest.serialization.Model): """Manifest attributes. - :param registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. - :type registry_login_server: str - :param repository: Image name. - :type repository: str - :param manifests: List of manifests. - :type manifests: list[~container_registry.models.ManifestAttributesBase] - :param link: - :type link: str + :ivar registry_login_server: Registry login server. + :vartype registry_login_server: str + :ivar repository: Image name. + :vartype repository: str + :ivar manifests: List of manifests. + :vartype manifests: list[~container_registry.models.ManifestAttributesBase] + :ivar link: + :vartype link: str """ _attribute_map = { @@ -116,6 +131,16 @@ def __init__( link: Optional[str] = None, **kwargs ): + """ + :keyword registry_login_server: Registry login server. + :paramtype registry_login_server: str + :keyword repository: Image name. + :paramtype repository: str + :keyword manifests: List of manifests. + :paramtype manifests: list[~container_registry.models.ManifestAttributesBase] + :keyword link: + :paramtype link: str + """ super(AcrManifests, self).__init__(**kwargs) self.registry_login_server = registry_login_server self.repository = repository @@ -126,8 +151,8 @@ def __init__( class AcrRefreshToken(msrest.serialization.Model): """AcrRefreshToken. - :param refresh_token: The refresh token to be used for generating access tokens. - :type refresh_token: str + :ivar refresh_token: The refresh token to be used for generating access tokens. + :vartype refresh_token: str """ _attribute_map = { @@ -140,6 +165,10 @@ def __init__( refresh_token: Optional[str] = None, **kwargs ): + """ + :keyword refresh_token: The refresh token to be used for generating access tokens. + :paramtype refresh_token: str + """ super(AcrRefreshToken, self).__init__(**kwargs) self.refresh_token = refresh_token @@ -147,40 +176,40 @@ def __init__( class Annotations(msrest.serialization.Model): """Additional information provided through arbitrary metadata. - :param additional_properties: Unmatched properties from the message are deserialized to this + :ivar additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, str] - :param created: Date and time on which the image was built (string, date-time as defined by + :vartype additional_properties: dict[str, any] + :ivar created: Date and time on which the image was built (string, date-time as defined by https://tools.ietf.org/html/rfc3339#section-5.6). - :type created: ~datetime.datetime - :param authors: Contact details of the people or organization responsible for the image. - :type authors: str - :param url: URL to find more information on the image. - :type url: str - :param documentation: URL to get documentation on the image. - :type documentation: str - :param source: URL to get source code for building the image. - :type source: str - :param version: Version of the packaged software. The version MAY match a label or tag in the + :vartype created: ~datetime.datetime + :ivar authors: Contact details of the people or organization responsible for the image. + :vartype authors: str + :ivar url: URL to find more information on the image. + :vartype url: str + :ivar documentation: URL to get documentation on the image. + :vartype documentation: str + :ivar source: URL to get source code for building the image. + :vartype source: str + :ivar version: Version of the packaged software. The version MAY match a label or tag in the source code repository, may also be Semantic versioning-compatible. - :type version: str - :param revision: Source control revision identifier for the packaged software. - :type revision: str - :param vendor: Name of the distributing entity, organization or individual. - :type vendor: str - :param licenses: License(s) under which contained software is distributed as an SPDX License + :vartype version: str + :ivar revision: Source control revision identifier for the packaged software. + :vartype revision: str + :ivar vendor: Name of the distributing entity, organization or individual. + :vartype vendor: str + :ivar licenses: License(s) under which contained software is distributed as an SPDX License Expression. - :type licenses: str - :param name: Name of the reference for a target. - :type name: str - :param title: Human-readable title of the image. - :type title: str - :param description: Human-readable description of the software packaged in the image. - :type description: str + :vartype licenses: str + :ivar name: Name of the reference for a target. + :vartype name: str + :ivar title: Human-readable title of the image. + :vartype title: str + :ivar description: Human-readable description of the software packaged in the image. + :vartype description: str """ _attribute_map = { - 'additional_properties': {'key': '', 'type': '{str}'}, + 'additional_properties': {'key': '', 'type': '{object}'}, 'created': {'key': 'org\\.opencontainers\\.image\\.created', 'type': 'iso-8601'}, 'authors': {'key': 'org\\.opencontainers\\.image\\.authors', 'type': 'str'}, 'url': {'key': 'org\\.opencontainers\\.image\\.url', 'type': 'str'}, @@ -198,7 +227,7 @@ class Annotations(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, str]] = None, + additional_properties: Optional[Dict[str, Any]] = None, created: Optional[datetime.datetime] = None, authors: Optional[str] = None, url: Optional[str] = None, @@ -213,6 +242,38 @@ def __init__( description: Optional[str] = None, **kwargs ): + """ + :keyword additional_properties: Unmatched properties from the message are deserialized to this + collection. + :paramtype additional_properties: dict[str, any] + :keyword created: Date and time on which the image was built (string, date-time as defined by + https://tools.ietf.org/html/rfc3339#section-5.6). + :paramtype created: ~datetime.datetime + :keyword authors: Contact details of the people or organization responsible for the image. + :paramtype authors: str + :keyword url: URL to find more information on the image. + :paramtype url: str + :keyword documentation: URL to get documentation on the image. + :paramtype documentation: str + :keyword source: URL to get source code for building the image. + :paramtype source: str + :keyword version: Version of the packaged software. The version MAY match a label or tag in the + source code repository, may also be Semantic versioning-compatible. + :paramtype version: str + :keyword revision: Source control revision identifier for the packaged software. + :paramtype revision: str + :keyword vendor: Name of the distributing entity, organization or individual. + :paramtype vendor: str + :keyword licenses: License(s) under which contained software is distributed as an SPDX License + Expression. + :paramtype licenses: str + :keyword name: Name of the reference for a target. + :paramtype name: str + :keyword title: Human-readable title of the image. + :paramtype title: str + :keyword description: Human-readable description of the software packaged in the image. + :paramtype description: str + """ super(Annotations, self).__init__(**kwargs) self.additional_properties = additional_properties self.created = created @@ -229,61 +290,104 @@ def __init__( self.description = description +class ArtifactManifestPlatform(msrest.serialization.Model): + """Manifest attributes details. + + 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. + + :ivar digest: Required. Manifest digest. + :vartype digest: str + :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". + :vartype architecture: str or ~container_registry.models.ArtifactArchitecture + :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", + "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", + "solaris", "windows". + :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem + """ + + _validation = { + 'digest': {'required': True, 'readonly': True}, + 'architecture': {'readonly': True}, + 'operating_system': {'readonly': True}, + } + + _attribute_map = { + 'digest': {'key': 'digest', 'type': 'str'}, + 'architecture': {'key': 'architecture', 'type': 'str'}, + 'operating_system': {'key': 'os', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + """ + super(ArtifactManifestPlatform, self).__init__(**kwargs) + self.digest = None + self.architecture = None + self.operating_system = None + + class ArtifactManifestProperties(msrest.serialization.Model): """Manifest attributes details. Variables are only populated by the server, and will be ignored when sending a request. - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Registry login server. :vartype registry_login_server: str :ivar repository_name: Repository name. :vartype repository_name: str - :ivar digest: Manifest. + :ivar digest: Required. Manifest. :vartype digest: str :ivar size: Image size. :vartype size: long - :ivar created_on: Created time. + :ivar created_on: Required. Created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Last update time. + :ivar last_updated_on: Required. Last update time. :vartype last_updated_on: ~datetime.datetime :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". :vartype architecture: str or ~container_registry.models.ArtifactArchitecture :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", "solaris", "windows". :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem - :ivar manifest_references: List of manifests referenced by this manifest list. List will be - empty if this manifest is not a manifest list. - :vartype manifest_references: list[~container_registry.models.ArtifactManifestReference] + :ivar related_artifacts: List of artifacts that are referenced by this manifest list, with + information about the platform each supports. This list will be empty if this is a leaf + manifest and not a manifest list. + :vartype related_artifacts: list[~container_registry.models.ArtifactManifestPlatform] :ivar tags: A set of tags. List of tags. :vartype tags: list[str] - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param quarantine_state: Quarantine state. - :type quarantine_state: str - :param quarantine_details: Quarantine details. - :type quarantine_details: str + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar quarantine_state: Quarantine state. + :vartype quarantine_state: str + :ivar quarantine_details: Quarantine details. + :vartype quarantine_details: str """ _validation = { 'registry_login_server': {'readonly': True}, 'repository_name': {'readonly': True}, - 'digest': {'readonly': True}, + 'digest': {'required': True, 'readonly': True}, 'size': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, 'architecture': {'readonly': True}, 'operating_system': {'readonly': True}, - 'manifest_references': {'readonly': True}, + 'related_artifacts': {'readonly': True}, 'tags': {'readonly': True}, } @@ -296,7 +400,7 @@ class ArtifactManifestProperties(msrest.serialization.Model): 'last_updated_on': {'key': 'manifest.lastUpdateTime', 'type': 'iso-8601'}, 'architecture': {'key': 'manifest.architecture', 'type': 'str'}, 'operating_system': {'key': 'manifest.os', 'type': 'str'}, - 'manifest_references': {'key': 'manifest.references', 'type': '[ArtifactManifestReference]'}, + 'related_artifacts': {'key': 'manifest.references', 'type': '[ArtifactManifestPlatform]'}, 'tags': {'key': 'manifest.tags', 'type': '[str]'}, 'can_delete': {'key': 'manifest.changeableAttributes.deleteEnabled', 'type': 'bool'}, 'can_write': {'key': 'manifest.changeableAttributes.writeEnabled', 'type': 'bool'}, @@ -317,6 +421,20 @@ def __init__( quarantine_details: Optional[str] = None, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword quarantine_state: Quarantine state. + :paramtype quarantine_state: str + :keyword quarantine_details: Quarantine details. + :paramtype quarantine_details: str + """ super(ArtifactManifestProperties, self).__init__(**kwargs) self.registry_login_server = None self.repository_name = None @@ -326,7 +444,7 @@ def __init__( self.last_updated_on = None self.architecture = None self.operating_system = None - self.manifest_references = None + self.related_artifacts = None self.tags = None self.can_delete = can_delete self.can_write = can_write @@ -336,93 +454,142 @@ def __init__( self.quarantine_details = quarantine_details -class ArtifactManifestReference(msrest.serialization.Model): - """Manifest attributes details. +class ArtifactTagProperties(msrest.serialization.Model): + """Tag attributes. Variables are only populated by the server, and will be ignored when sending a request. - :ivar digest: Manifest digest. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. + :vartype registry_login_server: str + :ivar repository_name: Required. Image name. + :vartype repository_name: str + :ivar name: Required. Tag name. + :vartype name: str + :ivar digest: Required. Tag digest. :vartype digest: str - :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". - :vartype architecture: str or ~container_registry.models.ArtifactArchitecture - :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", - "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", - "solaris", "windows". - :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem + :ivar created_on: Required. Tag created time. + :vartype created_on: ~datetime.datetime + :ivar last_updated_on: Required. Tag last update time. + :vartype last_updated_on: ~datetime.datetime + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool """ _validation = { - 'digest': {'readonly': True}, - 'architecture': {'readonly': True}, - 'operating_system': {'readonly': True}, + 'registry_login_server': {'required': True, 'readonly': True}, + 'repository_name': {'required': True, 'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'digest': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, } _attribute_map = { - 'digest': {'key': 'digest', 'type': 'str'}, - 'architecture': {'key': 'architecture', 'type': 'str'}, - 'operating_system': {'key': 'os', 'type': 'str'}, + 'registry_login_server': {'key': 'registry', 'type': 'str'}, + 'repository_name': {'key': 'imageName', 'type': 'str'}, + 'name': {'key': 'tag.name', 'type': 'str'}, + 'digest': {'key': 'tag.digest', 'type': 'str'}, + 'created_on': {'key': 'tag.createdTime', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'tag.lastUpdateTime', 'type': 'iso-8601'}, + 'can_delete': {'key': 'tag.changeableAttributes.deleteEnabled', 'type': 'bool'}, + 'can_write': {'key': 'tag.changeableAttributes.writeEnabled', 'type': 'bool'}, + 'can_list': {'key': 'tag.changeableAttributes.listEnabled', 'type': 'bool'}, + 'can_read': {'key': 'tag.changeableAttributes.readEnabled', 'type': 'bool'}, } def __init__( self, + *, + can_delete: Optional[bool] = None, + can_write: Optional[bool] = None, + can_list: Optional[bool] = None, + can_read: Optional[bool] = None, **kwargs ): - super(ArtifactManifestReference, self).__init__(**kwargs) + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + """ + super(ArtifactTagProperties, self).__init__(**kwargs) + self.registry_login_server = None + self.repository_name = None + self.name = None self.digest = None - self.architecture = None - self.operating_system = None + self.created_on = None + self.last_updated_on = None + self.can_delete = can_delete + self.can_write = can_write + self.can_list = can_list + self.can_read = can_read -class ArtifactTagProperties(msrest.serialization.Model): - """Tag attributes. +class ContainerRepositoryProperties(msrest.serialization.Model): + """Properties of this repository. Variables are only populated by the server, and will be ignored when sending a request. - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. :vartype registry_login_server: str - :ivar repository_name: Image name. - :vartype repository_name: str - :ivar name: Tag name. + :ivar name: Required. Image name. :vartype name: str - :ivar digest: Tag digest. - :vartype digest: str - :ivar created_on: Tag created time. + :ivar created_on: Required. Image created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Tag last update time. + :ivar last_updated_on: Required. Image last update time. :vartype last_updated_on: ~datetime.datetime - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool + :ivar manifest_count: Required. Number of the manifests. + :vartype manifest_count: int + :ivar tag_count: Required. Number of the tags. + :vartype tag_count: int + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar teleport_enabled: Enables Teleport functionality on new images in the repository + improving Container startup performance. + :vartype teleport_enabled: bool """ _validation = { - 'registry_login_server': {'readonly': True}, - 'repository_name': {'readonly': True}, - 'name': {'readonly': True}, - 'digest': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'registry_login_server': {'required': True, 'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, + 'manifest_count': {'required': True, 'readonly': True}, + 'tag_count': {'required': True, 'readonly': True}, } _attribute_map = { 'registry_login_server': {'key': 'registry', 'type': 'str'}, - 'repository_name': {'key': 'imageName', 'type': 'str'}, - 'name': {'key': 'tag.name', 'type': 'str'}, - 'digest': {'key': 'tag.digest', 'type': 'str'}, - 'created_on': {'key': 'tag.createdTime', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'tag.lastUpdateTime', 'type': 'iso-8601'}, - 'can_delete': {'key': 'tag.changeableAttributes.deleteEnabled', 'type': 'bool'}, - 'can_write': {'key': 'tag.changeableAttributes.writeEnabled', 'type': 'bool'}, - 'can_list': {'key': 'tag.changeableAttributes.listEnabled', 'type': 'bool'}, - 'can_read': {'key': 'tag.changeableAttributes.readEnabled', 'type': 'bool'}, + 'name': {'key': 'imageName', 'type': 'str'}, + 'created_on': {'key': 'createdTime', 'type': 'iso-8601'}, + 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, + 'manifest_count': {'key': 'manifestCount', 'type': 'int'}, + 'tag_count': {'key': 'tagCount', 'type': 'int'}, + 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, + 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, + 'can_list': {'key': 'changeableAttributes.listEnabled', 'type': 'bool'}, + 'can_read': {'key': 'changeableAttributes.readEnabled', 'type': 'bool'}, + 'teleport_enabled': {'key': 'changeableAttributes.teleportEnabled', 'type': 'bool'}, } def __init__( @@ -432,19 +599,34 @@ def __init__( can_write: Optional[bool] = None, can_list: Optional[bool] = None, can_read: Optional[bool] = None, + teleport_enabled: Optional[bool] = None, **kwargs ): - super(ArtifactTagProperties, self).__init__(**kwargs) + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword teleport_enabled: Enables Teleport functionality on new images in the repository + improving Container startup performance. + :paramtype teleport_enabled: bool + """ + super(ContainerRepositoryProperties, self).__init__(**kwargs) self.registry_login_server = None - self.repository_name = None self.name = None - self.digest = None self.created_on = None self.last_updated_on = None + self.manifest_count = None + self.tag_count = None self.can_delete = can_delete self.can_write = can_write self.can_list = can_list self.can_read = can_read + self.teleport_enabled = teleport_enabled class DeleteRepositoryResult(msrest.serialization.Model): @@ -472,6 +654,8 @@ def __init__( self, **kwargs ): + """ + """ super(DeleteRepositoryResult, self).__init__(**kwargs) self.deleted_manifests = None self.deleted_tags = None @@ -480,16 +664,16 @@ def __init__( class Descriptor(msrest.serialization.Model): """Docker V2 image layer descriptor including config and layers. - :param media_type: Layer media type. - :type media_type: str - :param size: Layer size. - :type size: long - :param digest: Layer digest. - :type digest: str - :param urls: Specifies a list of URIs from which this object may be downloaded. - :type urls: list[str] - :param annotations: Additional information provided through arbitrary metadata. - :type annotations: ~container_registry.models.Annotations + :ivar media_type: Layer media type. + :vartype media_type: str + :ivar size: Layer size. + :vartype size: long + :ivar digest: Layer digest. + :vartype digest: str + :ivar urls: Specifies a list of URIs from which this object may be downloaded. + :vartype urls: list[str] + :ivar annotations: Additional information provided through arbitrary metadata. + :vartype annotations: ~container_registry.models.Annotations """ _attribute_map = { @@ -510,6 +694,18 @@ def __init__( annotations: Optional["Annotations"] = None, **kwargs ): + """ + :keyword media_type: Layer media type. + :paramtype media_type: str + :keyword size: Layer size. + :paramtype size: long + :keyword digest: Layer digest. + :paramtype digest: str + :keyword urls: Specifies a list of URIs from which this object may be downloaded. + :paramtype urls: list[str] + :keyword annotations: Additional information provided through arbitrary metadata. + :paramtype annotations: ~container_registry.models.Annotations + """ super(Descriptor, self).__init__(**kwargs) self.media_type = media_type self.size = size @@ -521,8 +717,8 @@ def __init__( class FsLayer(msrest.serialization.Model): """Image layer information. - :param blob_sum: SHA of an image layer. - :type blob_sum: str + :ivar blob_sum: SHA of an image layer. + :vartype blob_sum: str """ _attribute_map = { @@ -535,6 +731,10 @@ def __init__( blob_sum: Optional[str] = None, **kwargs ): + """ + :keyword blob_sum: SHA of an image layer. + :paramtype blob_sum: str + """ super(FsLayer, self).__init__(**kwargs) self.blob_sum = blob_sum @@ -542,8 +742,8 @@ def __init__( class History(msrest.serialization.Model): """A list of unstructured historical data for v1 compatibility. - :param v1_compatibility: The raw v1 compatibility information. - :type v1_compatibility: str + :ivar v1_compatibility: The raw v1 compatibility information. + :vartype v1_compatibility: str """ _attribute_map = { @@ -556,6 +756,10 @@ def __init__( v1_compatibility: Optional[str] = None, **kwargs ): + """ + :keyword v1_compatibility: The raw v1 compatibility information. + :paramtype v1_compatibility: str + """ super(History, self).__init__(**kwargs) self.v1_compatibility = v1_compatibility @@ -563,12 +767,12 @@ def __init__( class ImageSignature(msrest.serialization.Model): """Signature of a signed manifest. - :param header: A JSON web signature. - :type header: ~container_registry.models.JWK - :param signature: A signature for the image manifest, signed by a libtrust private key. - :type signature: str - :param protected: The signed protected header. - :type protected: str + :ivar header: A JSON web signature. + :vartype header: ~container_registry.models.JWK + :ivar signature: A signature for the image manifest, signed by a libtrust private key. + :vartype signature: str + :ivar protected: The signed protected header. + :vartype protected: str """ _attribute_map = { @@ -585,6 +789,14 @@ def __init__( protected: Optional[str] = None, **kwargs ): + """ + :keyword header: A JSON web signature. + :paramtype header: ~container_registry.models.JWK + :keyword signature: A signature for the image manifest, signed by a libtrust private key. + :paramtype signature: str + :keyword protected: The signed protected header. + :paramtype protected: str + """ super(ImageSignature, self).__init__(**kwargs) self.header = header self.signature = signature @@ -594,10 +806,10 @@ def __init__( class JWK(msrest.serialization.Model): """A JSON web signature. - :param jwk: JSON web key parameter. - :type jwk: ~container_registry.models.JWKHeader - :param alg: The algorithm used to sign or encrypt the JWT. - :type alg: str + :ivar jwk: JSON web key parameter. + :vartype jwk: ~container_registry.models.JWKHeader + :ivar alg: The algorithm used to sign or encrypt the JWT. + :vartype alg: str """ _attribute_map = { @@ -612,6 +824,12 @@ def __init__( alg: Optional[str] = None, **kwargs ): + """ + :keyword jwk: JSON web key parameter. + :paramtype jwk: ~container_registry.models.JWKHeader + :keyword alg: The algorithm used to sign or encrypt the JWT. + :paramtype alg: str + """ super(JWK, self).__init__(**kwargs) self.jwk = jwk self.alg = alg @@ -620,16 +838,16 @@ def __init__( class JWKHeader(msrest.serialization.Model): """JSON web key parameter. - :param crv: crv value. - :type crv: str - :param kid: kid value. - :type kid: str - :param kty: kty value. - :type kty: str - :param x: x value. - :type x: str - :param y: y value. - :type y: str + :ivar crv: crv value. + :vartype crv: str + :ivar kid: kid value. + :vartype kid: str + :ivar kty: kty value. + :vartype kty: str + :ivar x: x value. + :vartype x: str + :ivar y: y value. + :vartype y: str """ _attribute_map = { @@ -650,6 +868,18 @@ def __init__( y: Optional[str] = None, **kwargs ): + """ + :keyword crv: crv value. + :paramtype crv: str + :keyword kid: kid value. + :paramtype kid: str + :keyword kty: kty value. + :paramtype kty: str + :keyword x: x value. + :paramtype x: str + :keyword y: y value. + :paramtype y: str + """ super(JWKHeader, self).__init__(**kwargs) self.crv = crv self.kid = kid @@ -661,8 +891,8 @@ def __init__( class Manifest(msrest.serialization.Model): """Returns the requested manifest file. - :param schema_version: Schema version. - :type schema_version: int + :ivar schema_version: Schema version. + :vartype schema_version: int """ _attribute_map = { @@ -675,6 +905,10 @@ def __init__( schema_version: Optional[int] = None, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + """ super(Manifest, self).__init__(**kwargs) self.schema_version = schema_version @@ -684,49 +918,51 @@ class ManifestAttributesBase(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar digest: Manifest. + All required parameters must be populated in order to send to Azure. + + :ivar digest: Required. Manifest. :vartype digest: str :ivar size: Image size. :vartype size: long - :ivar created_on: Created time. + :ivar created_on: Required. Created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Last update time. + :ivar last_updated_on: Required. Last update time. :vartype last_updated_on: ~datetime.datetime :ivar architecture: CPU architecture. Possible values include: "386", "amd64", "arm", "arm64", - "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". Default - value: "none". + "mips", "mipsle", "mips64", "mips64le", "ppc64", "ppc64le", "riscv64", "s390x", "wasm". :vartype architecture: str or ~container_registry.models.ArtifactArchitecture :ivar operating_system: Operating system. Possible values include: "aix", "android", "darwin", "dragonfly", "freebsd", "illumos", "ios", "js", "linux", "netbsd", "openbsd", "plan9", "solaris", "windows". :vartype operating_system: str or ~container_registry.models.ArtifactOperatingSystem - :ivar manifest_references: List of manifests referenced by this manifest list. List will be - empty if this manifest is not a manifest list. - :vartype manifest_references: list[~container_registry.models.ArtifactManifestReference] + :ivar related_artifacts: List of artifacts that are referenced by this manifest list, with + information about the platform each supports. This list will be empty if this is a leaf + manifest and not a manifest list. + :vartype related_artifacts: list[~container_registry.models.ArtifactManifestPlatform] :ivar tags: A set of tags. List of tags. :vartype tags: list[str] - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param quarantine_state: Quarantine state. - :type quarantine_state: str - :param quarantine_details: Quarantine details. - :type quarantine_details: str + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar quarantine_state: Quarantine state. + :vartype quarantine_state: str + :ivar quarantine_details: Quarantine details. + :vartype quarantine_details: str """ _validation = { - 'digest': {'readonly': True}, + 'digest': {'required': True, 'readonly': True}, 'size': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, 'architecture': {'readonly': True}, 'operating_system': {'readonly': True}, - 'manifest_references': {'readonly': True}, + 'related_artifacts': {'readonly': True}, 'tags': {'readonly': True}, } @@ -737,7 +973,7 @@ class ManifestAttributesBase(msrest.serialization.Model): 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, 'architecture': {'key': 'architecture', 'type': 'str'}, 'operating_system': {'key': 'os', 'type': 'str'}, - 'manifest_references': {'key': 'references', 'type': '[ArtifactManifestReference]'}, + 'related_artifacts': {'key': 'references', 'type': '[ArtifactManifestPlatform]'}, 'tags': {'key': 'tags', 'type': '[str]'}, 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, @@ -758,6 +994,20 @@ def __init__( quarantine_details: Optional[str] = None, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword quarantine_state: Quarantine state. + :paramtype quarantine_state: str + :keyword quarantine_details: Quarantine details. + :paramtype quarantine_details: str + """ super(ManifestAttributesBase, self).__init__(**kwargs) self.digest = None self.size = None @@ -765,7 +1015,7 @@ def __init__( self.last_updated_on = None self.architecture = None self.operating_system = None - self.manifest_references = None + self.related_artifacts = None self.tags = None self.can_delete = can_delete self.can_write = can_write @@ -778,24 +1028,30 @@ def __init__( class ManifestAttributesManifest(msrest.serialization.Model): """List of manifest attributes. - :param references: List of manifest attributes details. - :type references: list[~container_registry.models.ArtifactManifestReference] - :param quarantine_tag: Quarantine tag name. - :type quarantine_tag: str + :ivar references: List of manifest attributes details. + :vartype references: list[~container_registry.models.ArtifactManifestPlatform] + :ivar quarantine_tag: Quarantine tag name. + :vartype quarantine_tag: str """ _attribute_map = { - 'references': {'key': 'references', 'type': '[ArtifactManifestReference]'}, + 'references': {'key': 'references', 'type': '[ArtifactManifestPlatform]'}, 'quarantine_tag': {'key': 'quarantineTag', 'type': 'str'}, } def __init__( self, *, - references: Optional[List["ArtifactManifestReference"]] = None, + references: Optional[List["ArtifactManifestPlatform"]] = None, quarantine_tag: Optional[str] = None, **kwargs ): + """ + :keyword references: List of manifest attributes details. + :paramtype references: list[~container_registry.models.ArtifactManifestPlatform] + :keyword quarantine_tag: Quarantine tag name. + :paramtype quarantine_tag: str + """ super(ManifestAttributesManifest, self).__init__(**kwargs) self.references = references self.quarantine_tag = quarantine_tag @@ -804,12 +1060,12 @@ def __init__( class ManifestList(Manifest): """Returns the requested Docker multi-arch-manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param media_type: Media type for this Manifest. - :type media_type: str - :param manifests: List of V2 image layer information. - :type manifests: list[~container_registry.models.ManifestListAttributes] + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar media_type: Media type for this Manifest. + :vartype media_type: str + :ivar manifests: List of V2 image layer information. + :vartype manifests: list[~container_registry.models.ManifestListAttributes] """ _attribute_map = { @@ -826,6 +1082,14 @@ def __init__( manifests: Optional[List["ManifestListAttributes"]] = None, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword media_type: Media type for this Manifest. + :paramtype media_type: str + :keyword manifests: List of V2 image layer information. + :paramtype manifests: list[~container_registry.models.ManifestListAttributes] + """ super(ManifestList, self).__init__(schema_version=schema_version, **kwargs) self.media_type = media_type self.manifests = manifests @@ -834,18 +1098,18 @@ def __init__( class ManifestListAttributes(msrest.serialization.Model): """ManifestListAttributes. - :param media_type: The MIME type of the referenced object. This will generally be + :ivar media_type: The MIME type of the referenced object. This will generally be application/vnd.docker.image.manifest.v2+json, but it could also be application/vnd.docker.image.manifest.v1+json. - :type media_type: str - :param size: The size in bytes of the object. - :type size: long - :param digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. - :type digest: str - :param platform: The platform object describes the platform which the image in the manifest - runs on. A full list of valid operating system and architecture values are listed in the Go - language documentation for $GOOS and $GOARCH. - :type platform: ~container_registry.models.Platform + :vartype media_type: str + :ivar size: The size in bytes of the object. + :vartype size: long + :ivar digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. + :vartype digest: str + :ivar platform: The platform object describes the platform which the image in the manifest runs + on. A full list of valid operating system and architecture values are listed in the Go language + documentation for $GOOS and $GOARCH. + :vartype platform: ~container_registry.models.Platform """ _attribute_map = { @@ -864,6 +1128,21 @@ def __init__( platform: Optional["Platform"] = None, **kwargs ): + """ + :keyword media_type: The MIME type of the referenced object. This will generally be + application/vnd.docker.image.manifest.v2+json, but it could also be + application/vnd.docker.image.manifest.v1+json. + :paramtype media_type: str + :keyword size: The size in bytes of the object. + :paramtype size: long + :keyword digest: The digest of the content, as defined by the Registry V2 HTTP API + Specification. + :paramtype digest: str + :keyword platform: The platform object describes the platform which the image in the manifest + runs on. A full list of valid operating system and architecture values are listed in the Go + language documentation for $GOOS and $GOARCH. + :paramtype platform: ~container_registry.models.Platform + """ super(ManifestListAttributes, self).__init__(**kwargs) self.media_type = media_type self.size = size @@ -874,30 +1153,30 @@ def __init__( class ManifestWrapper(Manifest): """Returns the requested manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param media_type: Media type for this Manifest. - :type media_type: str - :param manifests: (ManifestList, OCIIndex) List of V2 image layer information. - :type manifests: list[~container_registry.models.ManifestListAttributes] - :param config: (V2, OCI) Image config descriptor. - :type config: ~container_registry.models.Descriptor - :param layers: (V2, OCI) List of V2 image layer information. - :type layers: list[~container_registry.models.Descriptor] - :param annotations: (OCI, OCIIndex) Additional metadata. - :type annotations: ~container_registry.models.Annotations - :param architecture: (V1) CPU architecture. - :type architecture: str - :param name: (V1) Image name. - :type name: str - :param tag: (V1) Image tag. - :type tag: str - :param fs_layers: (V1) List of layer information. - :type fs_layers: list[~container_registry.models.FsLayer] - :param history: (V1) Image history. - :type history: list[~container_registry.models.History] - :param signatures: (V1) Image signature. - :type signatures: list[~container_registry.models.ImageSignature] + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar media_type: Media type for this Manifest. + :vartype media_type: str + :ivar manifests: (ManifestList, OCIIndex) List of V2 image layer information. + :vartype manifests: list[~container_registry.models.ManifestListAttributes] + :ivar config: (V2, OCI) Image config descriptor. + :vartype config: ~container_registry.models.Descriptor + :ivar layers: (V2, OCI) List of V2 image layer information. + :vartype layers: list[~container_registry.models.Descriptor] + :ivar annotations: (OCI, OCIIndex) Additional metadata. + :vartype annotations: ~container_registry.models.Annotations + :ivar architecture: (V1) CPU architecture. + :vartype architecture: str + :ivar name: (V1) Image name. + :vartype name: str + :ivar tag: (V1) Image tag. + :vartype tag: str + :ivar fs_layers: (V1) List of layer information. + :vartype fs_layers: list[~container_registry.models.FsLayer] + :ivar history: (V1) Image history. + :vartype history: list[~container_registry.models.History] + :ivar signatures: (V1) Image signature. + :vartype signatures: list[~container_registry.models.ImageSignature] """ _attribute_map = { @@ -932,6 +1211,32 @@ def __init__( signatures: Optional[List["ImageSignature"]] = None, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword media_type: Media type for this Manifest. + :paramtype media_type: str + :keyword manifests: (ManifestList, OCIIndex) List of V2 image layer information. + :paramtype manifests: list[~container_registry.models.ManifestListAttributes] + :keyword config: (V2, OCI) Image config descriptor. + :paramtype config: ~container_registry.models.Descriptor + :keyword layers: (V2, OCI) List of V2 image layer information. + :paramtype layers: list[~container_registry.models.Descriptor] + :keyword annotations: (OCI, OCIIndex) Additional metadata. + :paramtype annotations: ~container_registry.models.Annotations + :keyword architecture: (V1) CPU architecture. + :paramtype architecture: str + :keyword name: (V1) Image name. + :paramtype name: str + :keyword tag: (V1) Image tag. + :paramtype tag: str + :keyword fs_layers: (V1) List of layer information. + :paramtype fs_layers: list[~container_registry.models.FsLayer] + :keyword history: (V1) Image history. + :paramtype history: list[~container_registry.models.History] + :keyword signatures: (V1) Image signature. + :paramtype signatures: list[~container_registry.models.ImageSignature] + """ super(ManifestWrapper, self).__init__(schema_version=schema_version, **kwargs) self.media_type = media_type self.manifests = manifests @@ -949,18 +1254,18 @@ def __init__( class ManifestWriteableProperties(msrest.serialization.Model): """Changeable attributes. - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param quarantine_state: Quarantine state. - :type quarantine_state: str - :param quarantine_details: Quarantine details. - :type quarantine_details: str + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar quarantine_state: Quarantine state. + :vartype quarantine_state: str + :ivar quarantine_details: Quarantine details. + :vartype quarantine_details: str """ _attribute_map = { @@ -983,6 +1288,20 @@ def __init__( quarantine_details: Optional[str] = None, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword quarantine_state: Quarantine state. + :paramtype quarantine_state: str + :keyword quarantine_details: Quarantine details. + :paramtype quarantine_details: str + """ super(ManifestWriteableProperties, self).__init__(**kwargs) self.can_delete = can_delete self.can_write = can_write @@ -995,12 +1314,12 @@ def __init__( class OCIIndex(Manifest): """Returns the requested OCI index file. - :param schema_version: Schema version. - :type schema_version: int - :param manifests: List of OCI image layer information. - :type manifests: list[~container_registry.models.ManifestListAttributes] - :param annotations: Additional information provided through arbitrary metadata. - :type annotations: ~container_registry.models.Annotations + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar manifests: List of OCI image layer information. + :vartype manifests: list[~container_registry.models.ManifestListAttributes] + :ivar annotations: Additional information provided through arbitrary metadata. + :vartype annotations: ~container_registry.models.Annotations """ _attribute_map = { @@ -1017,6 +1336,14 @@ def __init__( annotations: Optional["Annotations"] = None, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword manifests: List of OCI image layer information. + :paramtype manifests: list[~container_registry.models.ManifestListAttributes] + :keyword annotations: Additional information provided through arbitrary metadata. + :paramtype annotations: ~container_registry.models.Annotations + """ super(OCIIndex, self).__init__(schema_version=schema_version, **kwargs) self.manifests = manifests self.annotations = annotations @@ -1025,14 +1352,14 @@ def __init__( class OCIManifest(Manifest): """Returns the requested OCI Manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param config: V2 image config descriptor. - :type config: ~container_registry.models.Descriptor - :param layers: List of V2 image layer information. - :type layers: list[~container_registry.models.Descriptor] - :param annotations: Additional information provided through arbitrary metadata. - :type annotations: ~container_registry.models.Annotations + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar config: V2 image config descriptor. + :vartype config: ~container_registry.models.Descriptor + :ivar layers: List of V2 image layer information. + :vartype layers: list[~container_registry.models.Descriptor] + :ivar annotations: Additional information provided through arbitrary metadata. + :vartype annotations: ~container_registry.models.Annotations """ _attribute_map = { @@ -1051,6 +1378,16 @@ def __init__( annotations: Optional["Annotations"] = None, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword config: V2 image config descriptor. + :paramtype config: ~container_registry.models.Descriptor + :keyword layers: List of V2 image layer information. + :paramtype layers: list[~container_registry.models.Descriptor] + :keyword annotations: Additional information provided through arbitrary metadata. + :paramtype annotations: ~container_registry.models.Annotations + """ super(OCIManifest, self).__init__(schema_version=schema_version, **kwargs) self.config = config self.layers = layers @@ -1064,13 +1401,13 @@ class Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlenco All required parameters must be populated in order to send to Azure. - :ivar grant_type: Required. Can take a value of access_token. Default value: "access_token". + :ivar grant_type: Can take a value of access_token. Has constant value: "access_token". :vartype grant_type: str - :param service: Required. Indicates the name of your Azure container registry. - :type service: str - :param aad_access_token: Required. AAD access token, mandatory when grant_type is + :ivar service: Required. Indicates the name of your Azure container registry. + :vartype service: str + :ivar aad_access_token: Required. AAD access token, mandatory when grant_type is access_token_refresh_token or access_token. - :type aad_access_token: str + :vartype aad_access_token: str """ _validation = { @@ -1094,6 +1431,13 @@ def __init__( aad_access_token: str, **kwargs ): + """ + :keyword service: Required. Indicates the name of your Azure container registry. + :paramtype service: str + :keyword aad_access_token: Required. AAD access token, mandatory when grant_type is + access_token_refresh_token or access_token. + :paramtype aad_access_token: str + """ super(Paths108HwamOauth2ExchangePostRequestbodyContentApplicationXWwwFormUrlencodedSchema, self).__init__(**kwargs) self.service = service self.aad_access_token = aad_access_token @@ -1104,17 +1448,17 @@ class PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedS All required parameters must be populated in order to send to Azure. - :param service: Required. Indicates the name of your Azure container registry. - :type service: str - :param scope: Required. Which is expected to be a valid scope, and can be specified more than + :ivar service: Required. Indicates the name of your Azure container registry. + :vartype service: str + :ivar scope: Required. Which is expected to be a valid scope, and can be specified more than once for multiple scope requests. You obtained this from the Www-Authenticate response header from the challenge. - :type scope: str - :param acr_refresh_token: Required. Must be a valid ACR refresh token. - :type acr_refresh_token: str - :param grant_type: Required. Grant type is expected to be refresh_token. Possible values + :vartype scope: str + :ivar acr_refresh_token: Required. Must be a valid ACR refresh token. + :vartype acr_refresh_token: str + :ivar grant_type: Required. Grant type is expected to be refresh_token. Possible values include: "refresh_token", "password". - :type grant_type: str or ~container_registry.models.TokenGrantType + :vartype grant_type: str or ~container_registry.models.TokenGrantType """ _validation = { @@ -1140,6 +1484,19 @@ def __init__( grant_type: Union[str, "TokenGrantType"] = "refresh_token", **kwargs ): + """ + :keyword service: Required. Indicates the name of your Azure container registry. + :paramtype service: str + :keyword scope: Required. Which is expected to be a valid scope, and can be specified more than + once for multiple scope requests. You obtained this from the Www-Authenticate response header + from the challenge. + :paramtype scope: str + :keyword acr_refresh_token: Required. Must be a valid ACR refresh token. + :paramtype acr_refresh_token: str + :keyword grant_type: Required. Grant type is expected to be refresh_token. Possible values + include: "refresh_token", "password". + :paramtype grant_type: str or ~container_registry.models.TokenGrantType + """ super(PathsV3R3RxOauth2TokenPostRequestbodyContentApplicationXWwwFormUrlencodedSchema, self).__init__(**kwargs) self.service = service self.scope = scope @@ -1150,22 +1507,22 @@ def __init__( class Platform(msrest.serialization.Model): """The platform object describes the platform which the image in the manifest runs on. A full list of valid operating system and architecture values are listed in the Go language documentation for $GOOS and $GOARCH. - :param architecture: Specifies the CPU architecture, for example amd64 or ppc64le. - :type architecture: str - :param os: The os field specifies the operating system, for example linux or windows. - :type os: str - :param os_version: The optional os.version field specifies the operating system version, for + :ivar architecture: Specifies the CPU architecture, for example amd64 or ppc64le. + :vartype architecture: str + :ivar os: The os field specifies the operating system, for example linux or windows. + :vartype os: str + :ivar os_version: The optional os.version field specifies the operating system version, for example 10.0.10586. - :type os_version: str - :param os_features: The optional os.features field specifies an array of strings, each listing - a required OS feature (for example on Windows win32k. - :type os_features: list[str] - :param variant: The optional variant field specifies a variant of the CPU, for example armv6l - to specify a particular CPU variant of the ARM CPU. - :type variant: str - :param features: The optional features field specifies an array of strings, each listing a + :vartype os_version: str + :ivar os_features: The optional os.features field specifies an array of strings, each listing a + required OS feature (for example on Windows win32k. + :vartype os_features: list[str] + :ivar variant: The optional variant field specifies a variant of the CPU, for example armv6l to + specify a particular CPU variant of the ARM CPU. + :vartype variant: str + :ivar features: The optional features field specifies an array of strings, each listing a required CPU feature (for example sse4 or aes. - :type features: list[str] + :vartype features: list[str] """ _attribute_map = { @@ -1188,6 +1545,24 @@ def __init__( features: Optional[List[str]] = None, **kwargs ): + """ + :keyword architecture: Specifies the CPU architecture, for example amd64 or ppc64le. + :paramtype architecture: str + :keyword os: The os field specifies the operating system, for example linux or windows. + :paramtype os: str + :keyword os_version: The optional os.version field specifies the operating system version, for + example 10.0.10586. + :paramtype os_version: str + :keyword os_features: The optional os.features field specifies an array of strings, each + listing a required OS feature (for example on Windows win32k. + :paramtype os_features: list[str] + :keyword variant: The optional variant field specifies a variant of the CPU, for example armv6l + to specify a particular CPU variant of the ARM CPU. + :paramtype variant: str + :keyword features: The optional features field specifies an array of strings, each listing a + required CPU feature (for example sse4 or aes. + :paramtype features: list[str] + """ super(Platform, self).__init__(**kwargs) self.architecture = architecture self.os = os @@ -1200,10 +1575,10 @@ def __init__( class Repositories(msrest.serialization.Model): """List of repositories. - :param repositories: Repository names. - :type repositories: list[str] - :param link: - :type link: str + :ivar repositories: Repository names. + :vartype repositories: list[str] + :ivar link: + :vartype link: str """ _attribute_map = { @@ -1218,96 +1593,24 @@ def __init__( link: Optional[str] = None, **kwargs ): + """ + :keyword repositories: Repository names. + :paramtype repositories: list[str] + :keyword link: + :paramtype link: str + """ super(Repositories, self).__init__(**kwargs) self.repositories = repositories self.link = link -class RepositoryProperties(msrest.serialization.Model): - """Repository attributes. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. - :vartype registry_login_server: str - :ivar name: Image name. - :vartype name: str - :ivar created_on: Image created time. - :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Image last update time. - :vartype last_updated_on: ~datetime.datetime - :ivar manifest_count: Number of the manifests. - :vartype manifest_count: int - :ivar tag_count: Number of the tags. - :vartype tag_count: int - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param teleport_enabled: Enables Teleport functionality on new images in the repository - improving Container startup performance. - :type teleport_enabled: bool - """ - - _validation = { - 'registry_login_server': {'readonly': True}, - 'name': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, - 'manifest_count': {'readonly': True}, - 'tag_count': {'readonly': True}, - } - - _attribute_map = { - 'registry_login_server': {'key': 'registry', 'type': 'str'}, - 'name': {'key': 'imageName', 'type': 'str'}, - 'created_on': {'key': 'createdTime', 'type': 'iso-8601'}, - 'last_updated_on': {'key': 'lastUpdateTime', 'type': 'iso-8601'}, - 'manifest_count': {'key': 'manifestCount', 'type': 'int'}, - 'tag_count': {'key': 'tagCount', 'type': 'int'}, - 'can_delete': {'key': 'changeableAttributes.deleteEnabled', 'type': 'bool'}, - 'can_write': {'key': 'changeableAttributes.writeEnabled', 'type': 'bool'}, - 'can_list': {'key': 'changeableAttributes.listEnabled', 'type': 'bool'}, - 'can_read': {'key': 'changeableAttributes.readEnabled', 'type': 'bool'}, - 'teleport_enabled': {'key': 'changeableAttributes.teleportEnabled', 'type': 'bool'}, - } - - def __init__( - self, - *, - can_delete: Optional[bool] = None, - can_write: Optional[bool] = None, - can_list: Optional[bool] = None, - can_read: Optional[bool] = None, - teleport_enabled: Optional[bool] = None, - **kwargs - ): - super(RepositoryProperties, self).__init__(**kwargs) - self.registry_login_server = None - self.name = None - self.created_on = None - self.last_updated_on = None - self.manifest_count = None - self.tag_count = None - self.can_delete = can_delete - self.can_write = can_write - self.can_list = can_list - self.can_read = can_read - self.teleport_enabled = teleport_enabled - - class RepositoryTags(msrest.serialization.Model): """Result of the request to list tags of the image. - :param name: Name of the image. - :type name: str - :param tags: A set of tags. List of tags. - :type tags: list[str] + :ivar name: Name of the image. + :vartype name: str + :ivar tags: A set of tags. List of tags. + :vartype tags: list[str] """ _attribute_map = { @@ -1322,6 +1625,12 @@ def __init__( tags: Optional[List[str]] = None, **kwargs ): + """ + :keyword name: Name of the image. + :paramtype name: str + :keyword tags: A set of tags. List of tags. + :paramtype tags: list[str] + """ super(RepositoryTags, self).__init__(**kwargs) self.name = name self.tags = tags @@ -1330,17 +1639,17 @@ def __init__( class RepositoryWriteableProperties(msrest.serialization.Model): """Changeable attributes for Repository. - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool - :param teleport_enabled: Enables Teleport functionality on new images in the repository + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool + :ivar teleport_enabled: Enables Teleport functionality on new images in the repository improving Container startup performance. - :type teleport_enabled: bool + :vartype teleport_enabled: bool """ _attribute_map = { @@ -1361,6 +1670,19 @@ def __init__( teleport_enabled: Optional[bool] = None, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + :keyword teleport_enabled: Enables Teleport functionality on new images in the repository + improving Container startup performance. + :paramtype teleport_enabled: bool + """ super(RepositoryWriteableProperties, self).__init__(**kwargs) self.can_delete = can_delete self.can_write = can_write @@ -1374,29 +1696,31 @@ class TagAttributesBase(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: Tag name. + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Tag name. :vartype name: str - :ivar digest: Tag digest. + :ivar digest: Required. Tag digest. :vartype digest: str - :ivar created_on: Tag created time. + :ivar created_on: Required. Tag created time. :vartype created_on: ~datetime.datetime - :ivar last_updated_on: Tag last update time. + :ivar last_updated_on: Required. Tag last update time. :vartype last_updated_on: ~datetime.datetime - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool """ _validation = { - 'name': {'readonly': True}, - 'digest': {'readonly': True}, - 'created_on': {'readonly': True}, - 'last_updated_on': {'readonly': True}, + 'name': {'required': True, 'readonly': True}, + 'digest': {'required': True, 'readonly': True}, + 'created_on': {'required': True, 'readonly': True}, + 'last_updated_on': {'required': True, 'readonly': True}, } _attribute_map = { @@ -1419,6 +1743,16 @@ def __init__( can_read: Optional[bool] = None, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + """ super(TagAttributesBase, self).__init__(**kwargs) self.name = None self.digest = None @@ -1433,8 +1767,8 @@ def __init__( class TagAttributesTag(msrest.serialization.Model): """Tag. - :param signature_record: SignatureRecord value. - :type signature_record: str + :ivar signature_record: SignatureRecord value. + :vartype signature_record: str """ _attribute_map = { @@ -1447,6 +1781,10 @@ def __init__( signature_record: Optional[str] = None, **kwargs ): + """ + :keyword signature_record: SignatureRecord value. + :paramtype signature_record: str + """ super(TagAttributesTag, self).__init__(**kwargs) self.signature_record = signature_record @@ -1454,17 +1792,24 @@ def __init__( class TagList(msrest.serialization.Model): """List of tag details. - :param registry_login_server: Registry login server name. This is likely to be similar to - {registry-name}.azurecr.io. - :type registry_login_server: str - :param repository: Image name. - :type repository: str - :param tag_attribute_bases: List of tag attribute details. - :type tag_attribute_bases: list[~container_registry.models.TagAttributesBase] - :param link: - :type link: str + All required parameters must be populated in order to send to Azure. + + :ivar registry_login_server: Required. Registry login server. + :vartype registry_login_server: str + :ivar repository: Required. Image name. + :vartype repository: str + :ivar tag_attribute_bases: Required. List of tag attribute details. + :vartype tag_attribute_bases: list[~container_registry.models.TagAttributesBase] + :ivar link: + :vartype link: str """ + _validation = { + 'registry_login_server': {'required': True}, + 'repository': {'required': True}, + 'tag_attribute_bases': {'required': True}, + } + _attribute_map = { 'registry_login_server': {'key': 'registry', 'type': 'str'}, 'repository': {'key': 'imageName', 'type': 'str'}, @@ -1475,12 +1820,22 @@ class TagList(msrest.serialization.Model): def __init__( self, *, - registry_login_server: Optional[str] = None, - repository: Optional[str] = None, - tag_attribute_bases: Optional[List["TagAttributesBase"]] = None, + registry_login_server: str, + repository: str, + tag_attribute_bases: List["TagAttributesBase"], link: Optional[str] = None, **kwargs ): + """ + :keyword registry_login_server: Required. Registry login server. + :paramtype registry_login_server: str + :keyword repository: Required. Image name. + :paramtype repository: str + :keyword tag_attribute_bases: Required. List of tag attribute details. + :paramtype tag_attribute_bases: list[~container_registry.models.TagAttributesBase] + :keyword link: + :paramtype link: str + """ super(TagList, self).__init__(**kwargs) self.registry_login_server = registry_login_server self.repository = repository @@ -1491,14 +1846,14 @@ def __init__( class TagWriteableProperties(msrest.serialization.Model): """Changeable attributes. - :param can_delete: Delete enabled. - :type can_delete: bool - :param can_write: Write enabled. - :type can_write: bool - :param can_list: List enabled. - :type can_list: bool - :param can_read: Read enabled. - :type can_read: bool + :ivar can_delete: Delete enabled. + :vartype can_delete: bool + :ivar can_write: Write enabled. + :vartype can_write: bool + :ivar can_list: List enabled. + :vartype can_list: bool + :ivar can_read: Read enabled. + :vartype can_read: bool """ _attribute_map = { @@ -1517,6 +1872,16 @@ def __init__( can_read: Optional[bool] = None, **kwargs ): + """ + :keyword can_delete: Delete enabled. + :paramtype can_delete: bool + :keyword can_write: Write enabled. + :paramtype can_write: bool + :keyword can_list: List enabled. + :paramtype can_list: bool + :keyword can_read: Read enabled. + :paramtype can_read: bool + """ super(TagWriteableProperties, self).__init__(**kwargs) self.can_delete = can_delete self.can_write = can_write @@ -1527,20 +1892,20 @@ def __init__( class V1Manifest(Manifest): """Returns the requested V1 manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param architecture: CPU architecture. - :type architecture: str - :param name: Image name. - :type name: str - :param tag: Image tag. - :type tag: str - :param fs_layers: List of layer information. - :type fs_layers: list[~container_registry.models.FsLayer] - :param history: Image history. - :type history: list[~container_registry.models.History] - :param signatures: Image signature. - :type signatures: list[~container_registry.models.ImageSignature] + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar architecture: CPU architecture. + :vartype architecture: str + :ivar name: Image name. + :vartype name: str + :ivar tag: Image tag. + :vartype tag: str + :ivar fs_layers: List of layer information. + :vartype fs_layers: list[~container_registry.models.FsLayer] + :ivar history: Image history. + :vartype history: list[~container_registry.models.History] + :ivar signatures: Image signature. + :vartype signatures: list[~container_registry.models.ImageSignature] """ _attribute_map = { @@ -1565,6 +1930,22 @@ def __init__( signatures: Optional[List["ImageSignature"]] = None, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword architecture: CPU architecture. + :paramtype architecture: str + :keyword name: Image name. + :paramtype name: str + :keyword tag: Image tag. + :paramtype tag: str + :keyword fs_layers: List of layer information. + :paramtype fs_layers: list[~container_registry.models.FsLayer] + :keyword history: Image history. + :paramtype history: list[~container_registry.models.History] + :keyword signatures: Image signature. + :paramtype signatures: list[~container_registry.models.ImageSignature] + """ super(V1Manifest, self).__init__(schema_version=schema_version, **kwargs) self.architecture = architecture self.name = name @@ -1577,14 +1958,14 @@ def __init__( class V2Manifest(Manifest): """Returns the requested Docker V2 Manifest file. - :param schema_version: Schema version. - :type schema_version: int - :param media_type: Media type for this Manifest. - :type media_type: str - :param config: V2 image config descriptor. - :type config: ~container_registry.models.Descriptor - :param layers: List of V2 image layer information. - :type layers: list[~container_registry.models.Descriptor] + :ivar schema_version: Schema version. + :vartype schema_version: int + :ivar media_type: Media type for this Manifest. + :vartype media_type: str + :ivar config: V2 image config descriptor. + :vartype config: ~container_registry.models.Descriptor + :ivar layers: List of V2 image layer information. + :vartype layers: list[~container_registry.models.Descriptor] """ _attribute_map = { @@ -1603,6 +1984,16 @@ def __init__( layers: Optional[List["Descriptor"]] = None, **kwargs ): + """ + :keyword schema_version: Schema version. + :paramtype schema_version: int + :keyword media_type: Media type for this Manifest. + :paramtype media_type: str + :keyword config: V2 image config descriptor. + :paramtype config: ~container_registry.models.Descriptor + :keyword layers: List of V2 image layer information. + :paramtype layers: list[~container_registry.models.Descriptor] + """ super(V2Manifest, self).__init__(schema_version=schema_version, **kwargs) self.media_type = media_type self.config = config diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/__init__.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/__init__.py index ff082246f74f..3d88b0bfc006 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/__init__.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/__init__.py @@ -1,6 +1,6 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_authentication_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_authentication_operations.py index 8f44a01093f2..57a36e853e18 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_authentication_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_authentication_operations.py @@ -1,24 +1,79 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_exchange_aad_access_token_for_acr_refresh_token_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/oauth2/exchange') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_exchange_acr_refresh_token_for_acr_access_token_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/oauth2/token') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + +# fmt: on class AuthenticationOperations(object): """AuthenticationOperations operations. @@ -41,6 +96,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def exchange_aad_access_token_for_acr_refresh_token( self, service, # type: str @@ -55,6 +111,9 @@ def exchange_aad_access_token_for_acr_refresh_token( :param access_token: AAD access token, mandatory when grant_type is access_token_refresh_token or access_token. :type access_token: str + :keyword grant_type: Can take a value of access_token. The default value is "access_token". + Note that overriding this default value may result in unsupported behavior. + :paramtype grant_type: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AcrRefreshToken, or the result of cls(response) :rtype: ~container_registry.models.AcrRefreshToken @@ -65,38 +124,34 @@ def exchange_aad_access_token_for_acr_refresh_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/x-www-form-urlencoded") - grant_type = "access_token" - accept = "application/json" - - # Construct URL - url = self.exchange_aad_access_token_for_acr_refresh_token.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/x-www-form-urlencoded") # type: Optional[str] + grant_type = kwargs.pop('grant_type', "access_token") # type: str # Construct form data - _form_content = { - 'grant_type': grant_type, - 'service': service, - 'access_token': access_token, + data = { + "grant_type": grant_type, + "service": service, + "access_token": access_token, } - request = self._client.post(url, query_parameters, header_parameters, form_content=_form_content) + + request = build_exchange_aad_access_token_for_acr_refresh_token_request( + content_type=content_type, + data=data, + template_url=self.exchange_aad_access_token_for_acr_refresh_token.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AcrRefreshToken', pipeline_response) @@ -105,8 +160,11 @@ def exchange_aad_access_token_for_acr_refresh_token( return cls(pipeline_response, deserialized, {}) return deserialized + exchange_aad_access_token_for_acr_refresh_token.metadata = {'url': '/oauth2/exchange'} # type: ignore + + @distributed_trace def exchange_acr_refresh_token_for_acr_access_token( self, service, # type: str @@ -138,38 +196,34 @@ def exchange_acr_refresh_token_for_acr_access_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/x-www-form-urlencoded") - accept = "application/json" - # Construct URL - url = self.exchange_acr_refresh_token_for_acr_access_token.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/x-www-form-urlencoded") # type: Optional[str] # Construct form data - _form_content = { - 'service': service, - 'scope': scope, - 'refresh_token': refresh_token, - 'grant_type': grant_type, + data = { + "service": service, + "scope": scope, + "refresh_token": refresh_token, + "grant_type": grant_type, + } + + request = build_exchange_acr_refresh_token_for_acr_access_token_request( + content_type=content_type, + data=data, + template_url=self.exchange_acr_refresh_token_for_acr_access_token.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - request = self._client.post(url, query_parameters, header_parameters, form_content=_form_content) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AcrAccessToken', pipeline_response) @@ -178,4 +232,6 @@ def exchange_acr_refresh_token_for_acr_access_token( return cls(pipeline_response, deserialized, {}) return deserialized + exchange_acr_refresh_token_for_acr_access_token.metadata = {'url': '/oauth2/token'} # type: ignore + diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_blob_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_blob_operations.py index be2649d9042a..6c3579beddad 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_blob_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_blob_operations.py @@ -1,24 +1,356 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, IO, Optional, TypeVar - T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_get_blob_request( + name, # type: str + digest, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/octet-stream" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/blobs/{digest}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "digest": _SERIALIZER.url("digest", digest, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_check_blob_exists_request( + name, # type: str + digest, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/blobs/{digest}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "digest": _SERIALIZER.url("digest", digest, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="HEAD", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_delete_blob_request( + name, # type: str + digest, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/octet-stream" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/blobs/{digest}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "digest": _SERIALIZER.url("digest", digest, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_mount_blob_request( + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + from_parameter = kwargs.pop('from_parameter') # type: str + mount = kwargs.pop('mount') # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/blobs/uploads/') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['from'] = _SERIALIZER.query("from_parameter", from_parameter, 'str') + query_parameters['mount'] = _SERIALIZER.query("mount", mount, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_upload_status_request( + location, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/{nextBlobUuidLink}') + path_format_arguments = { + "nextBlobUuidLink": _SERIALIZER.url("location", location, 'str', skip_quote=True), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_upload_chunk_request( + location, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/{nextBlobUuidLink}') + path_format_arguments = { + "nextBlobUuidLink": _SERIALIZER.url("location", location, 'str', skip_quote=True), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_complete_upload_request( + location, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + digest = kwargs.pop('digest') # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/{nextBlobUuidLink}') + path_format_arguments = { + "nextBlobUuidLink": _SERIALIZER.url("location", location, 'str', skip_quote=True), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['digest'] = _SERIALIZER.query("digest", digest, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_cancel_upload_request( + location, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/{nextBlobUuidLink}') + path_format_arguments = { + "nextBlobUuidLink": _SERIALIZER.url("location", location, 'str', skip_quote=True), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_start_upload_request( + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/blobs/uploads/') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_get_chunk_request( + name, # type: str + digest, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + range = kwargs.pop('range') # type: str + + accept = "application/octet-stream" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/blobs/{digest}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "digest": _SERIALIZER.url("digest", digest, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Range'] = _SERIALIZER.header("range", range, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_check_chunk_exists_request( + name, # type: str + digest, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + range = kwargs.pop('range') # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/blobs/{digest}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "digest": _SERIALIZER.url("digest", digest, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Range'] = _SERIALIZER.header("range", range, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="HEAD", + url=url, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ContainerRegistryBlobOperations(object): """ContainerRegistryBlobOperations operations. @@ -41,6 +373,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def get_blob( self, name, # type: str @@ -64,25 +397,19 @@ def get_blob( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/octet-stream" - # Construct URL - url = self.get_blob.metadata['url'] # type: ignore + + request = build_get_blob_request( + name=name, + digest=digest, + template_url=self.get_blob.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) response = pipeline_response.http_response @@ -90,22 +417,27 @@ def get_blob( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + deserialized = response.stream_download(self._client._pipeline) if response.status_code == 307: response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + get_blob.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + + @distributed_trace def check_blob_exists( self, name, # type: str @@ -129,46 +461,44 @@ def check_blob_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.check_blob_exists.metadata['url'] # type: ignore + + request = build_check_blob_exists_request( + name=name, + digest=digest, + template_url=self.check_blob_exists.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.head(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 307]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} if response.status_code == 200: response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + if response.status_code == 307: response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + if cls: return cls(pipeline_response, None, response_headers) check_blob_exists.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + + @distributed_trace def delete_blob( self, name, # type: str @@ -192,25 +522,19 @@ def delete_blob( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/octet-stream" - # Construct URL - url = self.delete_blob.metadata['url'] # type: ignore + + request = build_delete_blob_request( + name=name, + digest=digest, + template_url=self.delete_blob.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) response = pipeline_response.http_response @@ -220,14 +544,18 @@ def delete_blob( response_headers = {} response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + deserialized = response.stream_download(self._client._pipeline) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + delete_blob.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + + @distributed_trace def mount_blob( self, name, # type: str @@ -254,32 +582,26 @@ def mount_blob( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.mount_blob.metadata['url'] # type: ignore + + request = build_mount_blob_request( + name=name, + from_parameter=from_parameter, + mount=mount, + template_url=self.mount_blob.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['from'] = self._serialize.query("from_parameter", from_parameter, 'str') - query_parameters['mount'] = self._serialize.query("mount", mount, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -287,11 +609,14 @@ def mount_blob( response_headers['Docker-Upload-UUID']=self._deserialize('str', response.headers.get('Docker-Upload-UUID')) response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + if cls: return cls(pipeline_response, None, response_headers) mount_blob.metadata = {'url': '/v2/{name}/blobs/uploads/'} # type: ignore + + @distributed_trace def get_upload_status( self, location, # type: str @@ -314,41 +639,38 @@ def get_upload_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_upload_status.metadata['url'] # type: ignore + + request = build_get_upload_status_request( + location=location, + template_url=self.get_upload_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'nextBlobUuidLink': self._serialize.url("location", location, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} response_headers['Range']=self._deserialize('str', response.headers.get('Range')) response_headers['Docker-Upload-UUID']=self._deserialize('str', response.headers.get('Docker-Upload-UUID')) + if cls: return cls(pipeline_response, None, response_headers) get_upload_status.metadata = {'url': '/{nextBlobUuidLink}'} # type: ignore + + @distributed_trace def upload_chunk( self, location, # type: str @@ -373,34 +695,29 @@ def upload_chunk( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/octet-stream") - accept = "application/json" - # Construct URL - url = self.upload_chunk.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'nextBlobUuidLink': self._serialize.url("location", location, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) + content_type = kwargs.pop('content_type', "application/octet-stream") # type: Optional[str] - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + content = value - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_upload_chunk_request( + location=location, + content_type=content_type, + content=content, + template_url=self.upload_chunk.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) - body_content_kwargs = {} # type: Dict[str, Any] - body_content_kwargs['stream_content'] = value - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -408,11 +725,14 @@ def upload_chunk( response_headers['Range']=self._deserialize('str', response.headers.get('Range')) response_headers['Docker-Upload-UUID']=self._deserialize('str', response.headers.get('Docker-Upload-UUID')) + if cls: return cls(pipeline_response, None, response_headers) upload_chunk.metadata = {'url': '/{nextBlobUuidLink}'} # type: ignore + + @distributed_trace def complete_upload( self, digest, # type: str @@ -441,35 +761,30 @@ def complete_upload( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/octet-stream") - accept = "application/json" - # Construct URL - url = self.complete_upload.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'nextBlobUuidLink': self._serialize.url("location", location, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) + content_type = kwargs.pop('content_type', "application/octet-stream") # type: Optional[str] - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['digest'] = self._serialize.query("digest", digest, 'str') + content = value - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_complete_upload_request( + location=location, + content_type=content_type, + digest=digest, + content=content, + template_url=self.complete_upload.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) - body_content_kwargs = {} # type: Dict[str, Any] - body_content_kwargs['stream_content'] = value - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -477,11 +792,14 @@ def complete_upload( response_headers['Range']=self._deserialize('str', response.headers.get('Range')) response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) + if cls: return cls(pipeline_response, None, response_headers) complete_upload.metadata = {'url': '/{nextBlobUuidLink}'} # type: ignore + + @distributed_trace def cancel_upload( self, location, # type: str @@ -504,30 +822,24 @@ def cancel_upload( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.cancel_upload.metadata['url'] # type: ignore + + request = build_cancel_upload_request( + location=location, + template_url=self.cancel_upload.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'nextBlobUuidLink': self._serialize.url("location", location, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -535,6 +847,8 @@ def cancel_upload( cancel_upload.metadata = {'url': '/{nextBlobUuidLink}'} # type: ignore + + @distributed_trace def start_upload( self, name, # type: str @@ -555,30 +869,24 @@ def start_upload( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.start_upload.metadata['url'] # type: ignore + + request = build_start_upload_request( + name=name, + template_url=self.start_upload.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} @@ -586,11 +894,14 @@ def start_upload( response_headers['Range']=self._deserialize('str', response.headers.get('Range')) response_headers['Docker-Upload-UUID']=self._deserialize('str', response.headers.get('Docker-Upload-UUID')) + if cls: return cls(pipeline_response, None, response_headers) start_upload.metadata = {'url': '/v2/{name}/blobs/uploads/'} # type: ignore + + @distributed_trace def get_chunk( self, name, # type: str @@ -621,26 +932,20 @@ def get_chunk( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/octet-stream" - # Construct URL - url = self.get_chunk.metadata['url'] # type: ignore + + request = build_get_chunk_request( + name=name, + digest=digest, + range=range, + template_url=self.get_chunk.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Range'] = self._serialize.header("range", range, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=True, **kwargs) response = pipeline_response.http_response @@ -651,14 +956,18 @@ def get_chunk( response_headers = {} response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) response_headers['Content-Range']=self._deserialize('str', response.headers.get('Content-Range')) + deserialized = response.stream_download(self._client._pipeline) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + get_chunk.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + + @distributed_trace def check_chunk_exists( self, name, # type: str @@ -686,39 +995,35 @@ def check_chunk_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.check_chunk_exists.metadata['url'] # type: ignore + + request = build_check_chunk_exists_request( + name=name, + digest=digest, + range=range, + template_url=self.check_chunk_exists.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Range'] = self._serialize.header("range", range, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.head(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) response_headers['Content-Range']=self._deserialize('str', response.headers.get('Content-Range')) + if cls: return cls(pipeline_response, None, response_headers) check_chunk_exists.metadata = {'url': '/v2/{name}/blobs/{digest}'} # type: ignore + diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py index 3d7619073535..86b9a7f706f8 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_generated/operations/_container_registry_operations.py @@ -1,25 +1,486 @@ # coding=utf-8 # -------------------------------------------------------------------------- -# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.4.3, generator: @autorest/python@5.6.4) +# Code generated by Microsoft (R) AutoRest Code Generator (autorest: 3.6.6, generator: @autorest/python@5.11.0) # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_check_docker_v2_support_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/v2/') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_get_manifest_request( + name, # type: str + reference, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = kwargs.pop('accept', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/manifests/{reference}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "reference": _SERIALIZER.url("reference", reference, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_create_manifest_request( + name, # type: str + reference, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/manifests/{reference}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "reference": _SERIALIZER.url("reference", reference, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_delete_manifest_request( + name, # type: str + reference, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/v2/{name}/manifests/{reference}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "reference": _SERIALIZER.url("reference", reference, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_get_repositories_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + last = kwargs.pop('last', None) # type: Optional[str] + n = kwargs.pop('n', None) # type: Optional[int] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/_catalog') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if last is not None: + query_parameters['last'] = _SERIALIZER.query("last", last, 'str') + if n is not None: + query_parameters['n'] = _SERIALIZER.query("n", n, 'int') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_properties_request( + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_delete_repository_request( + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_update_properties_request( + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_get_tags_request( + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + last = kwargs.pop('last', None) # type: Optional[str] + n = kwargs.pop('n', None) # type: Optional[int] + orderby = kwargs.pop('orderby', None) # type: Optional[str] + digest = kwargs.pop('digest', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}/_tags') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if last is not None: + query_parameters['last'] = _SERIALIZER.query("last", last, 'str') + if n is not None: + query_parameters['n'] = _SERIALIZER.query("n", n, 'int') + if orderby is not None: + query_parameters['orderby'] = _SERIALIZER.query("orderby", orderby, 'str') + if digest is not None: + query_parameters['digest'] = _SERIALIZER.query("digest", digest, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_tag_properties_request( + name, # type: str + reference, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}/_tags/{reference}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "reference": _SERIALIZER.url("reference", reference, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_update_tag_attributes_request( + name, # type: str + reference, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}/_tags/{reference}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "reference": _SERIALIZER.url("reference", reference, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_delete_tag_request( + name, # type: str + reference, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}/_tags/{reference}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "reference": _SERIALIZER.url("reference", reference, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_get_manifests_request( + name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + last = kwargs.pop('last', None) # type: Optional[str] + n = kwargs.pop('n', None) # type: Optional[int] + orderby = kwargs.pop('orderby', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}/_manifests') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if last is not None: + query_parameters['last'] = _SERIALIZER.query("last", last, 'str') + if n is not None: + query_parameters['n'] = _SERIALIZER.query("n", n, 'int') + if orderby is not None: + query_parameters['orderby'] = _SERIALIZER.query("orderby", orderby, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_manifest_properties_request( + name, # type: str + digest, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}/_manifests/{digest}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "digest": _SERIALIZER.url("digest", digest, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_update_manifest_properties_request( + name, # type: str + digest, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/acr/v1/{name}/_manifests/{digest}') + path_format_arguments = { + "name": _SERIALIZER.url("name", name, 'str'), + "digest": _SERIALIZER.url("digest", digest, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + headers=header_parameters, + **kwargs + ) + +# fmt: on class ContainerRegistryOperations(object): """ContainerRegistryOperations operations. @@ -42,6 +503,7 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + @distributed_trace def check_docker_v2_support( self, **kwargs # type: Any @@ -59,29 +521,23 @@ def check_docker_v2_support( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.check_docker_v2_support.metadata['url'] # type: ignore + + request = build_check_docker_v2_support_request( + template_url=self.check_docker_v2_support.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -89,6 +545,8 @@ def check_docker_v2_support( check_docker_v2_support.metadata = {'url': '/v2/'} # type: ignore + + @distributed_trace def get_manifest( self, name, # type: str @@ -117,33 +575,26 @@ def get_manifest( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_manifest.metadata['url'] # type: ignore + + request = build_get_manifest_request( + name=name, + reference=reference, + accept=accept, + template_url=self.get_manifest.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if accept is not None: - header_parameters['accept'] = self._serialize.header("accept", accept, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('Manifest', pipeline_response) @@ -152,8 +603,11 @@ def get_manifest( return cls(pipeline_response, deserialized, {}) return deserialized + get_manifest.metadata = {'url': '/v2/{name}/manifests/{reference}'} # type: ignore + + @distributed_trace def create_manifest( self, name, # type: str @@ -161,7 +615,7 @@ def create_manifest( payload, # type: "_models.Manifest" **kwargs # type: Any ): - # type: (...) -> object + # type: (...) -> Any """Put the manifest identified by ``name`` and ``reference`` where ``reference`` can be a tag or digest. @@ -172,59 +626,57 @@ def create_manifest( :param payload: Manifest body, can take v1 or v2 values depending on accept header. :type payload: ~container_registry.models.Manifest :keyword callable cls: A custom type or function that will be passed the direct response - :return: object, or the result of cls(response) - :rtype: object + :return: any, or the result of cls(response) + :rtype: any :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[object] + cls = kwargs.pop('cls', None) # type: ClsType[Any] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/vnd.docker.distribution.manifest.v2+json") - accept = "application/json" - # Construct URL - url = self.create_manifest.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + content_type = kwargs.pop('content_type', "application/vnd.docker.distribution.manifest.v2+json") # type: Optional[str] - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + json = self._serialize.body(payload, 'Manifest') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = build_create_manifest_request( + name=name, + reference=reference, + content_type=content_type, + json=json, + template_url=self.create_manifest.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(payload, 'Manifest') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) response_headers = {} response_headers['Docker-Content-Digest']=self._deserialize('str', response.headers.get('Docker-Content-Digest')) response_headers['Location']=self._deserialize('str', response.headers.get('Location')) response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) + deserialized = self._deserialize('object', pipeline_response) if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + create_manifest.metadata = {'url': '/v2/{name}/manifests/{reference}'} # type: ignore + + @distributed_trace def delete_manifest( self, name, # type: str @@ -249,31 +701,25 @@ def delete_manifest( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.delete_manifest.metadata['url'] # type: ignore + + request = build_delete_manifest_request( + name=name, + reference=reference, + template_url=self.delete_manifest.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -281,6 +727,8 @@ def delete_manifest( delete_manifest.metadata = {'url': '/v2/{name}/manifests/{reference}'} # type: ignore + + @distributed_trace def get_repositories( self, last=None, # type: Optional[str] @@ -305,40 +753,41 @@ def get_repositories( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.get_repositories.metadata['url'] # type: ignore + + request = build_get_repositories_request( + last=last, + n=n, + template_url=self.get_repositories.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if last is not None: - query_parameters['last'] = self._serialize.query("last", last, 'str') - if n is not None: - query_parameters['n'] = self._serialize.query("n", n, 'int') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] + + request = build_get_repositories_request( + last=last, + n=n, + template_url=next_link, + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('Repositories', pipeline_response) + deserialized = self._deserialize("Repositories", pipeline_response) list_of_elem = deserialized.repositories if cls: list_of_elem = cls(list_of_elem) @@ -351,71 +800,70 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) return pipeline_response + return ItemPaged( get_next, extract_data ) get_repositories.metadata = {'url': '/acr/v1/_catalog'} # type: ignore + @distributed_trace def get_properties( self, name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.RepositoryProperties" + # type: (...) -> "_models.ContainerRepositoryProperties" """Get repository attributes. :param name: Name of the image (including the namespace). :type name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepositoryProperties, or the result of cls(response) - :rtype: ~container_registry.models.RepositoryProperties + :return: ContainerRepositoryProperties, or the result of cls(response) + :rtype: ~container_registry.models.ContainerRepositoryProperties :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepositoryProperties"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerRepositoryProperties"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_properties.metadata['url'] # type: ignore + + request = build_get_properties_request( + name=name, + template_url=self.get_properties.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RepositoryProperties', pipeline_response) + deserialized = self._deserialize('ContainerRepositoryProperties', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized + get_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore + + @distributed_trace def delete_repository( self, name, # type: str @@ -436,30 +884,24 @@ def delete_repository( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.delete_repository.metadata['url'] # type: ignore + + request = build_delete_repository_request( + name=name, + template_url=self.delete_repository.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -467,13 +909,15 @@ def delete_repository( delete_repository.metadata = {'url': '/acr/v1/{name}'} # type: ignore - def set_properties( + + @distributed_trace + def update_properties( self, name, # type: str value=None, # type: Optional["_models.RepositoryWriteableProperties"] **kwargs # type: Any ): - # type: (...) -> "_models.RepositoryProperties" + # type: (...) -> "_models.ContainerRepositoryProperties" """Update the attribute identified by ``name`` where ``reference`` is the name of the repository. :param name: Name of the image (including the namespace). @@ -481,57 +925,54 @@ def set_properties( :param value: Repository attribute value. :type value: ~container_registry.models.RepositoryWriteableProperties :keyword callable cls: A custom type or function that will be passed the direct response - :return: RepositoryProperties, or the result of cls(response) - :rtype: ~container_registry.models.RepositoryProperties + :return: ContainerRepositoryProperties, or the result of cls(response) + :rtype: ~container_registry.models.ContainerRepositoryProperties :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RepositoryProperties"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ContainerRepositoryProperties"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.set_properties.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - body_content_kwargs = {} # type: Dict[str, Any] if value is not None: - body_content = self._serialize.body(value, 'RepositoryWriteableProperties') + json = self._serialize.body(value, 'RepositoryWriteableProperties') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_update_properties_request( + name=name, + content_type=content_type, + json=json, + template_url=self.update_properties.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) - deserialized = self._deserialize('RepositoryProperties', pipeline_response) + deserialized = self._deserialize('ContainerRepositoryProperties', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - set_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore + update_properties.metadata = {'url': '/acr/v1/{name}'} # type: ignore + + + @distributed_trace def get_tags( self, name, # type: str @@ -565,46 +1006,47 @@ def get_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.get_tags.metadata['url'] # type: ignore + + request = build_get_tags_request( + name=name, + last=last, + n=n, + orderby=orderby, + digest=digest, + template_url=self.get_tags.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if last is not None: - query_parameters['last'] = self._serialize.query("last", last, 'str') - if n is not None: - query_parameters['n'] = self._serialize.query("n", n, 'int') - if orderby is not None: - query_parameters['orderby'] = self._serialize.query("orderby", orderby, 'str') - if digest is not None: - query_parameters['digest'] = self._serialize.query("digest", digest, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] + + request = build_get_tags_request( + name=name, + last=last, + n=n, + orderby=orderby, + digest=digest, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('TagList', pipeline_response) + deserialized = self._deserialize("TagList", pipeline_response) list_of_elem = deserialized.tag_attribute_bases if cls: list_of_elem = cls(list_of_elem) @@ -617,17 +1059,19 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) return pipeline_response + return ItemPaged( get_next, extract_data ) get_tags.metadata = {'url': '/acr/v1/{name}/_tags'} # type: ignore + @distributed_trace def get_tag_properties( self, name, # type: str @@ -651,31 +1095,25 @@ def get_tag_properties( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_tag_properties.metadata['url'] # type: ignore + + request = build_get_tag_properties_request( + name=name, + reference=reference, + template_url=self.get_tag_properties.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ArtifactTagProperties', pipeline_response) @@ -684,8 +1122,11 @@ def get_tag_properties( return cls(pipeline_response, deserialized, {}) return deserialized + get_tag_properties.metadata = {'url': '/acr/v1/{name}/_tags/{reference}'} # type: ignore + + @distributed_trace def update_tag_attributes( self, name, # type: str @@ -712,39 +1153,33 @@ def update_tag_attributes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - # Construct URL - url = self.update_tag_attributes.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] if value is not None: - body_content = self._serialize.body(value, 'TagWriteableProperties') + json = self._serialize.body(value, 'TagWriteableProperties') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_update_tag_attributes_request( + name=name, + reference=reference, + content_type=content_type, + json=json, + template_url=self.update_tag_attributes.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ArtifactTagProperties', pipeline_response) @@ -753,8 +1188,11 @@ def update_tag_attributes( return cls(pipeline_response, deserialized, {}) return deserialized + update_tag_attributes.metadata = {'url': '/acr/v1/{name}/_tags/{reference}'} # type: ignore + + @distributed_trace def delete_tag( self, name, # type: str @@ -778,31 +1216,25 @@ def delete_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.delete_tag.metadata['url'] # type: ignore + + request = build_delete_tag_request( + name=name, + reference=reference, + template_url=self.delete_tag.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'reference': self._serialize.url("reference", reference, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) if cls: @@ -810,6 +1242,8 @@ def delete_tag( delete_tag.metadata = {'url': '/acr/v1/{name}/_tags/{reference}'} # type: ignore + + @distributed_trace def get_manifests( self, name, # type: str @@ -840,44 +1274,45 @@ def get_manifests( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - if not next_link: - # Construct URL - url = self.get_manifests.metadata['url'] # type: ignore + + request = build_get_manifests_request( + name=name, + last=last, + n=n, + orderby=orderby, + template_url=self.get_manifests.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if last is not None: - query_parameters['last'] = self._serialize.query("last", last, 'str') - if n is not None: - query_parameters['n'] = self._serialize.query("n", n, 'int') - if orderby is not None: - query_parameters['orderby'] = self._serialize.query("orderby", orderby, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + else: - url = next_link - query_parameters = {} # type: Dict[str, Any] + + request = build_get_manifests_request( + name=name, + last=last, + n=n, + orderby=orderby, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) + request.method = "GET" return request def extract_data(pipeline_response): - deserialized = self._deserialize('AcrManifests', pipeline_response) + deserialized = self._deserialize("AcrManifests", pipeline_response) list_of_elem = deserialized.manifests if cls: list_of_elem = cls(list_of_elem) @@ -890,17 +1325,19 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) return pipeline_response + return ItemPaged( get_next, extract_data ) get_manifests.metadata = {'url': '/acr/v1/{name}/_manifests'} # type: ignore + @distributed_trace def get_manifest_properties( self, name, # type: str @@ -924,31 +1361,25 @@ def get_manifest_properties( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json" - # Construct URL - url = self.get_manifest_properties.metadata['url'] # type: ignore + + request = build_get_manifest_properties_request( + name=name, + digest=digest, + template_url=self.get_manifest_properties.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request.url = self._client.format_url(request.url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ArtifactManifestProperties', pipeline_response) @@ -957,8 +1388,11 @@ def get_manifest_properties( return cls(pipeline_response, deserialized, {}) return deserialized + get_manifest_properties.metadata = {'url': '/acr/v1/{name}/_manifests/{digest}'} # type: ignore + + @distributed_trace def update_manifest_properties( self, name, # type: str @@ -985,39 +1419,33 @@ def update_manifest_properties( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self.update_manifest_properties.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - 'name': self._serialize.url("name", name, 'str'), - 'digest': self._serialize.url("digest", digest, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - body_content_kwargs = {} # type: Dict[str, Any] if value is not None: - body_content = self._serialize.body(value, 'ManifestWriteableProperties') + json = self._serialize.body(value, 'ManifestWriteableProperties') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_update_manifest_properties_request( + name=name, + digest=digest, + content_type=content_type, + json=json, + template_url=self.update_manifest_properties.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "url": self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.AcrErrors, response) + error = self._deserialize.failsafe_deserialize(_models.AcrErrors, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('ArtifactManifestProperties', pipeline_response) @@ -1026,4 +1454,6 @@ def update_manifest_properties( return cls(pipeline_response, deserialized, {}) return deserialized + update_manifest_properties.metadata = {'url': '/acr/v1/{name}/_manifests/{digest}'} # type: ignore + diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py index 8bfe5a4394bd..ca1847b6180b 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/_models.py @@ -9,7 +9,7 @@ from ._generated.models import ( ArtifactTagProperties as GeneratedArtifactTagProperties, - RepositoryProperties as GeneratedRepositoryProperties, + ContainerRepositoryProperties as GeneratedRepositoryProperties, RepositoryWriteableProperties, TagWriteableProperties, ManifestWriteableProperties, diff --git a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py index 9b73a1e8838d..2d1a55340a70 100644 --- a/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py +++ b/sdk/containerregistry/azure-containerregistry/azure/containerregistry/aio/_async_container_registry_client.py @@ -597,7 +597,7 @@ async def update_repository_properties( properties.teleport_enabled = kwargs.pop("teleport_enabled", None) return RepositoryProperties._from_generated( # pylint: disable=protected-access - await self._client.container_registry.set_properties( + await self._client.container_registry.update_properties( repository, properties._to_generated(), **kwargs # pylint: disable=protected-access ) ) diff --git a/sdk/containerregistry/azure-containerregistry/setup.py b/sdk/containerregistry/azure-containerregistry/setup.py index 9f52c683e889..f502a49c0e47 100644 --- a/sdk/containerregistry/azure-containerregistry/setup.py +++ b/sdk/containerregistry/azure-containerregistry/setup.py @@ -60,7 +60,7 @@ ] ), install_requires=[ - "azure-core>=1.4.0,<2.0.0", + "azure-core>=1.20.0,<2.0.0", "msrest>=0.6.21", ], extras_require={ diff --git a/sdk/containerregistry/azure-containerregistry/swagger/README.md b/sdk/containerregistry/azure-containerregistry/swagger/README.md index c66159d73785..296f0c9019ec 100644 --- a/sdk/containerregistry/azure-containerregistry/swagger/README.md +++ b/sdk/containerregistry/azure-containerregistry/swagger/README.md @@ -2,7 +2,8 @@ ### Settings ``` yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/f7df590c111a56f04794d229ef7f7a598b294fdf/specification/containerregistry/data-plane/Azure.ContainerRegistry/preview/2019-08-15-preview/containerregistry.json +title: Container Registry +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/c8d9a26a2857828e095903efa72512cf3a76c15d/specification/containerregistry/data-plane/Azure.ContainerRegistry/preview/2019-08-15-preview/containerregistry.json output-folder: "../azure/containerregistry/_generated" no-namespace-folders: true python: true diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-mgmt-containerregistry/CHANGELOG.md index a0c8a7aaa574..93e999d34ae5 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/CHANGELOG.md +++ b/sdk/containerregistry/azure-mgmt-containerregistry/CHANGELOG.md @@ -1,5 +1,12 @@ # Release History +## 8.2.0 (2021-10-26) + +**Features** + + - Model ConnectedRegistryUpdateParameters has a new parameter notifications_list + - Model ConnectedRegistry has a new parameter notifications_list + ## 8.1.0 (2021-07-22) **Features** diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/_meta.json b/sdk/containerregistry/azure-mgmt-containerregistry/_meta.json index da25164467f1..f708abaf844f 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/_meta.json +++ b/sdk/containerregistry/azure-mgmt-containerregistry/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "2a8442856438f3c78b7150f4a32270c03fc99d43", + "commit": "99d3931e458882c3402aad2f971e46e961a1e78c", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/containerregistry/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/containerregistry/resource-manager/readme.md" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_container_registry_management_client.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_container_registry_management_client.py index 15c2325759d7..756fc3e017ad 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_container_registry_management_client.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_container_registry_management_client.py @@ -107,6 +107,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-12-01-preview: :mod:`v2019_12_01_preview.models` * 2020-11-01-preview: :mod:`v2020_11_01_preview.models` * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` + * 2021-08-01-preview: :mod:`v2021_08_01_preview.models` """ if api_version == '2017-03-01': from .v2017_03_01 import models @@ -141,6 +142,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-06-01-preview': from .v2021_06_01_preview import models return models + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -201,12 +205,15 @@ def connected_registries(self): * 2020-11-01-preview: :class:`ConnectedRegistriesOperations` * 2021-06-01-preview: :class:`ConnectedRegistriesOperations` + * 2021-08-01-preview: :class:`ConnectedRegistriesOperations` """ api_version = self._get_api_version('connected_registries') if api_version == '2020-11-01-preview': from .v2020_11_01_preview.operations import ConnectedRegistriesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ConnectedRegistriesOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import ConnectedRegistriesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'connected_registries'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -218,6 +225,7 @@ def export_pipelines(self): * 2019-12-01-preview: :class:`ExportPipelinesOperations` * 2020-11-01-preview: :class:`ExportPipelinesOperations` * 2021-06-01-preview: :class:`ExportPipelinesOperations` + * 2021-08-01-preview: :class:`ExportPipelinesOperations` """ api_version = self._get_api_version('export_pipelines') if api_version == '2019-12-01-preview': @@ -226,6 +234,8 @@ def export_pipelines(self): from .v2020_11_01_preview.operations import ExportPipelinesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ExportPipelinesOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import ExportPipelinesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'export_pipelines'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -237,6 +247,7 @@ def import_pipelines(self): * 2019-12-01-preview: :class:`ImportPipelinesOperations` * 2020-11-01-preview: :class:`ImportPipelinesOperations` * 2021-06-01-preview: :class:`ImportPipelinesOperations` + * 2021-08-01-preview: :class:`ImportPipelinesOperations` """ api_version = self._get_api_version('import_pipelines') if api_version == '2019-12-01-preview': @@ -245,6 +256,8 @@ def import_pipelines(self): from .v2020_11_01_preview.operations import ImportPipelinesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ImportPipelinesOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import ImportPipelinesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'import_pipelines'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -259,6 +272,7 @@ def operations(self): * 2019-12-01-preview: :class:`Operations` * 2020-11-01-preview: :class:`Operations` * 2021-06-01-preview: :class:`Operations` + * 2021-08-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2017-03-01': @@ -273,6 +287,8 @@ def operations(self): from .v2020_11_01_preview.operations import Operations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import Operations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -284,6 +300,7 @@ def pipeline_runs(self): * 2019-12-01-preview: :class:`PipelineRunsOperations` * 2020-11-01-preview: :class:`PipelineRunsOperations` * 2021-06-01-preview: :class:`PipelineRunsOperations` + * 2021-08-01-preview: :class:`PipelineRunsOperations` """ api_version = self._get_api_version('pipeline_runs') if api_version == '2019-12-01-preview': @@ -292,6 +309,8 @@ def pipeline_runs(self): from .v2020_11_01_preview.operations import PipelineRunsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import PipelineRunsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import PipelineRunsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'pipeline_runs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -303,6 +322,7 @@ def private_endpoint_connections(self): * 2019-12-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2020-11-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations` + * 2021-08-01-preview: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2019-12-01-preview': @@ -311,6 +331,8 @@ def private_endpoint_connections(self): from .v2020_11_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -330,6 +352,7 @@ def registries(self): * 2019-12-01-preview: :class:`RegistriesOperations` * 2020-11-01-preview: :class:`RegistriesOperations` * 2021-06-01-preview: :class:`RegistriesOperations` + * 2021-08-01-preview: :class:`RegistriesOperations` """ api_version = self._get_api_version('registries') if api_version == '2017-03-01': @@ -354,6 +377,8 @@ def registries(self): from .v2020_11_01_preview.operations import RegistriesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import RegistriesOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import RegistriesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'registries'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -367,6 +392,7 @@ def replications(self): * 2019-12-01-preview: :class:`ReplicationsOperations` * 2020-11-01-preview: :class:`ReplicationsOperations` * 2021-06-01-preview: :class:`ReplicationsOperations` + * 2021-08-01-preview: :class:`ReplicationsOperations` """ api_version = self._get_api_version('replications') if api_version == '2017-10-01': @@ -379,6 +405,8 @@ def replications(self): from .v2020_11_01_preview.operations import ReplicationsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ReplicationsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import ReplicationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'replications'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -409,6 +437,7 @@ def scope_maps(self): * 2019-05-01-preview: :class:`ScopeMapsOperations` * 2020-11-01-preview: :class:`ScopeMapsOperations` * 2021-06-01-preview: :class:`ScopeMapsOperations` + * 2021-08-01-preview: :class:`ScopeMapsOperations` """ api_version = self._get_api_version('scope_maps') if api_version == '2019-05-01-preview': @@ -417,6 +446,8 @@ def scope_maps(self): from .v2020_11_01_preview.operations import ScopeMapsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ScopeMapsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import ScopeMapsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'scope_maps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -460,6 +491,7 @@ def tokens(self): * 2019-05-01-preview: :class:`TokensOperations` * 2020-11-01-preview: :class:`TokensOperations` * 2021-06-01-preview: :class:`TokensOperations` + * 2021-08-01-preview: :class:`TokensOperations` """ api_version = self._get_api_version('tokens') if api_version == '2019-05-01-preview': @@ -468,6 +500,8 @@ def tokens(self): from .v2020_11_01_preview.operations import TokensOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import TokensOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import TokensOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'tokens'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -481,6 +515,7 @@ def webhooks(self): * 2019-12-01-preview: :class:`WebhooksOperations` * 2020-11-01-preview: :class:`WebhooksOperations` * 2021-06-01-preview: :class:`WebhooksOperations` + * 2021-08-01-preview: :class:`WebhooksOperations` """ api_version = self._get_api_version('webhooks') if api_version == '2017-10-01': @@ -493,6 +528,8 @@ def webhooks(self): from .v2020_11_01_preview.operations import WebhooksOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import WebhooksOperations as OperationClass + elif api_version == '2021-08-01-preview': + from .v2021_08_01_preview.operations import WebhooksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'webhooks'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_version.py index b0190510d0e4..07458023d91d 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/_version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_container_registry_management_client.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_container_registry_management_client.py index fce2298add78..790fe3f87eec 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_container_registry_management_client.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/aio/_container_registry_management_client.py @@ -105,6 +105,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-12-01-preview: :mod:`v2019_12_01_preview.models` * 2020-11-01-preview: :mod:`v2020_11_01_preview.models` * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` + * 2021-08-01-preview: :mod:`v2021_08_01_preview.models` """ if api_version == '2017-03-01': from ..v2017_03_01 import models @@ -139,6 +140,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview import models return models + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -199,12 +203,15 @@ def connected_registries(self): * 2020-11-01-preview: :class:`ConnectedRegistriesOperations` * 2021-06-01-preview: :class:`ConnectedRegistriesOperations` + * 2021-08-01-preview: :class:`ConnectedRegistriesOperations` """ api_version = self._get_api_version('connected_registries') if api_version == '2020-11-01-preview': from ..v2020_11_01_preview.aio.operations import ConnectedRegistriesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ConnectedRegistriesOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import ConnectedRegistriesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'connected_registries'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -216,6 +223,7 @@ def export_pipelines(self): * 2019-12-01-preview: :class:`ExportPipelinesOperations` * 2020-11-01-preview: :class:`ExportPipelinesOperations` * 2021-06-01-preview: :class:`ExportPipelinesOperations` + * 2021-08-01-preview: :class:`ExportPipelinesOperations` """ api_version = self._get_api_version('export_pipelines') if api_version == '2019-12-01-preview': @@ -224,6 +232,8 @@ def export_pipelines(self): from ..v2020_11_01_preview.aio.operations import ExportPipelinesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ExportPipelinesOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import ExportPipelinesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'export_pipelines'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -235,6 +245,7 @@ def import_pipelines(self): * 2019-12-01-preview: :class:`ImportPipelinesOperations` * 2020-11-01-preview: :class:`ImportPipelinesOperations` * 2021-06-01-preview: :class:`ImportPipelinesOperations` + * 2021-08-01-preview: :class:`ImportPipelinesOperations` """ api_version = self._get_api_version('import_pipelines') if api_version == '2019-12-01-preview': @@ -243,6 +254,8 @@ def import_pipelines(self): from ..v2020_11_01_preview.aio.operations import ImportPipelinesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ImportPipelinesOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import ImportPipelinesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'import_pipelines'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -257,6 +270,7 @@ def operations(self): * 2019-12-01-preview: :class:`Operations` * 2020-11-01-preview: :class:`Operations` * 2021-06-01-preview: :class:`Operations` + * 2021-08-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2017-03-01': @@ -271,6 +285,8 @@ def operations(self): from ..v2020_11_01_preview.aio.operations import Operations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import Operations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -282,6 +298,7 @@ def pipeline_runs(self): * 2019-12-01-preview: :class:`PipelineRunsOperations` * 2020-11-01-preview: :class:`PipelineRunsOperations` * 2021-06-01-preview: :class:`PipelineRunsOperations` + * 2021-08-01-preview: :class:`PipelineRunsOperations` """ api_version = self._get_api_version('pipeline_runs') if api_version == '2019-12-01-preview': @@ -290,6 +307,8 @@ def pipeline_runs(self): from ..v2020_11_01_preview.aio.operations import PipelineRunsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import PipelineRunsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import PipelineRunsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'pipeline_runs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -301,6 +320,7 @@ def private_endpoint_connections(self): * 2019-12-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2020-11-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations` + * 2021-08-01-preview: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2019-12-01-preview': @@ -309,6 +329,8 @@ def private_endpoint_connections(self): from ..v2020_11_01_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -328,6 +350,7 @@ def registries(self): * 2019-12-01-preview: :class:`RegistriesOperations` * 2020-11-01-preview: :class:`RegistriesOperations` * 2021-06-01-preview: :class:`RegistriesOperations` + * 2021-08-01-preview: :class:`RegistriesOperations` """ api_version = self._get_api_version('registries') if api_version == '2017-03-01': @@ -352,6 +375,8 @@ def registries(self): from ..v2020_11_01_preview.aio.operations import RegistriesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import RegistriesOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import RegistriesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'registries'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -365,6 +390,7 @@ def replications(self): * 2019-12-01-preview: :class:`ReplicationsOperations` * 2020-11-01-preview: :class:`ReplicationsOperations` * 2021-06-01-preview: :class:`ReplicationsOperations` + * 2021-08-01-preview: :class:`ReplicationsOperations` """ api_version = self._get_api_version('replications') if api_version == '2017-10-01': @@ -377,6 +403,8 @@ def replications(self): from ..v2020_11_01_preview.aio.operations import ReplicationsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ReplicationsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import ReplicationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'replications'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -407,6 +435,7 @@ def scope_maps(self): * 2019-05-01-preview: :class:`ScopeMapsOperations` * 2020-11-01-preview: :class:`ScopeMapsOperations` * 2021-06-01-preview: :class:`ScopeMapsOperations` + * 2021-08-01-preview: :class:`ScopeMapsOperations` """ api_version = self._get_api_version('scope_maps') if api_version == '2019-05-01-preview': @@ -415,6 +444,8 @@ def scope_maps(self): from ..v2020_11_01_preview.aio.operations import ScopeMapsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ScopeMapsOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import ScopeMapsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'scope_maps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -458,6 +489,7 @@ def tokens(self): * 2019-05-01-preview: :class:`TokensOperations` * 2020-11-01-preview: :class:`TokensOperations` * 2021-06-01-preview: :class:`TokensOperations` + * 2021-08-01-preview: :class:`TokensOperations` """ api_version = self._get_api_version('tokens') if api_version == '2019-05-01-preview': @@ -466,6 +498,8 @@ def tokens(self): from ..v2020_11_01_preview.aio.operations import TokensOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import TokensOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import TokensOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'tokens'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -479,6 +513,7 @@ def webhooks(self): * 2019-12-01-preview: :class:`WebhooksOperations` * 2020-11-01-preview: :class:`WebhooksOperations` * 2021-06-01-preview: :class:`WebhooksOperations` + * 2021-08-01-preview: :class:`WebhooksOperations` """ api_version = self._get_api_version('webhooks') if api_version == '2017-10-01': @@ -491,6 +526,8 @@ def webhooks(self): from ..v2020_11_01_preview.aio.operations import WebhooksOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import WebhooksOperations as OperationClass + elif api_version == '2021-08-01-preview': + from ..v2021_08_01_preview.aio.operations import WebhooksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'webhooks'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2017_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_06_01_preview/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_06_01_preview/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_06_01_preview/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_12_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_06_01_preview/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_06_01_preview/_version.py index 920456322fa1..d5f3055d6eb4 100644 --- a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_06_01_preview/_version.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "8.1.0" +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/__init__.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/__init__.py new file mode 100644 index 000000000000..0c85bb0c5d60 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_registry_management_client import ContainerRegistryManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['ContainerRegistryManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_configuration.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_configuration.py new file mode 100644 index 000000000000..80d627e4095a --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class ContainerRegistryManagementClientConfiguration(Configuration): + """Configuration for ContainerRegistryManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Microsoft Azure subscription ID. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerRegistryManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-08-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerregistry/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_container_registry_management_client.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_container_registry_management_client.py new file mode 100644 index 000000000000..cb777b9d0dfb --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_container_registry_management_client.py @@ -0,0 +1,139 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import ContainerRegistryManagementClientConfiguration +from .operations import ConnectedRegistriesOperations +from .operations import ExportPipelinesOperations +from .operations import RegistriesOperations +from .operations import ImportPipelinesOperations +from .operations import Operations +from .operations import PipelineRunsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import ReplicationsOperations +from .operations import ScopeMapsOperations +from .operations import TokensOperations +from .operations import WebhooksOperations +from . import models + + +class ContainerRegistryManagementClient(object): + """ContainerRegistryManagementClient. + + :ivar connected_registries: ConnectedRegistriesOperations operations + :vartype connected_registries: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ConnectedRegistriesOperations + :ivar export_pipelines: ExportPipelinesOperations operations + :vartype export_pipelines: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ExportPipelinesOperations + :ivar registries: RegistriesOperations operations + :vartype registries: azure.mgmt.containerregistry.v2021_08_01_preview.operations.RegistriesOperations + :ivar import_pipelines: ImportPipelinesOperations operations + :vartype import_pipelines: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ImportPipelinesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerregistry.v2021_08_01_preview.operations.Operations + :ivar pipeline_runs: PipelineRunsOperations operations + :vartype pipeline_runs: azure.mgmt.containerregistry.v2021_08_01_preview.operations.PipelineRunsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerregistry.v2021_08_01_preview.operations.PrivateEndpointConnectionsOperations + :ivar replications: ReplicationsOperations operations + :vartype replications: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ReplicationsOperations + :ivar scope_maps: ScopeMapsOperations operations + :vartype scope_maps: azure.mgmt.containerregistry.v2021_08_01_preview.operations.ScopeMapsOperations + :ivar tokens: TokensOperations operations + :vartype tokens: azure.mgmt.containerregistry.v2021_08_01_preview.operations.TokensOperations + :ivar webhooks: WebhooksOperations operations + :vartype webhooks: azure.mgmt.containerregistry.v2021_08_01_preview.operations.WebhooksOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The Microsoft Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerRegistryManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.connected_registries = ConnectedRegistriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_pipelines = ExportPipelinesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.registries = RegistriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.import_pipelines = ImportPipelinesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.pipeline_runs = PipelineRunsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.replications = ReplicationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.scope_maps = ScopeMapsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.tokens = TokensOperations( + self._client, self._config, self._serialize, self._deserialize) + self.webhooks = WebhooksOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerRegistryManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_metadata.json b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_metadata.json new file mode 100644 index 000000000000..41688a71872b --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_metadata.json @@ -0,0 +1,113 @@ +{ + "chosen_version": "2021-08-01-preview", + "total_api_version_list": ["2021-08-01-preview"], + "client": { + "name": "ContainerRegistryManagementClient", + "filename": "_container_registry_management_client", + "description": "ContainerRegistryManagementClient.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ContainerRegistryManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ContainerRegistryManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The Microsoft Azure subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The Microsoft Azure subscription ID.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "connected_registries": "ConnectedRegistriesOperations", + "export_pipelines": "ExportPipelinesOperations", + "registries": "RegistriesOperations", + "import_pipelines": "ImportPipelinesOperations", + "operations": "Operations", + "pipeline_runs": "PipelineRunsOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "replications": "ReplicationsOperations", + "scope_maps": "ScopeMapsOperations", + "tokens": "TokensOperations", + "webhooks": "WebhooksOperations" + } +} \ No newline at end of file diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_version.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_version.py new file mode 100644 index 000000000000..d5f3055d6eb4 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "8.2.0" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/__init__.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/__init__.py new file mode 100644 index 000000000000..3f69d67ba538 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_registry_management_client import ContainerRegistryManagementClient +__all__ = ['ContainerRegistryManagementClient'] diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/_configuration.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/_configuration.py new file mode 100644 index 000000000000..0b1de208cc56 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class ContainerRegistryManagementClientConfiguration(Configuration): + """Configuration for ContainerRegistryManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Microsoft Azure subscription ID. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerRegistryManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-08-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerregistry/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/_container_registry_management_client.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/_container_registry_management_client.py new file mode 100644 index 000000000000..68218f01c1a0 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/_container_registry_management_client.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerRegistryManagementClientConfiguration +from .operations import ConnectedRegistriesOperations +from .operations import ExportPipelinesOperations +from .operations import RegistriesOperations +from .operations import ImportPipelinesOperations +from .operations import Operations +from .operations import PipelineRunsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import ReplicationsOperations +from .operations import ScopeMapsOperations +from .operations import TokensOperations +from .operations import WebhooksOperations +from .. import models + + +class ContainerRegistryManagementClient(object): + """ContainerRegistryManagementClient. + + :ivar connected_registries: ConnectedRegistriesOperations operations + :vartype connected_registries: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.ConnectedRegistriesOperations + :ivar export_pipelines: ExportPipelinesOperations operations + :vartype export_pipelines: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.ExportPipelinesOperations + :ivar registries: RegistriesOperations operations + :vartype registries: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.RegistriesOperations + :ivar import_pipelines: ImportPipelinesOperations operations + :vartype import_pipelines: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.ImportPipelinesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.Operations + :ivar pipeline_runs: PipelineRunsOperations operations + :vartype pipeline_runs: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.PipelineRunsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.PrivateEndpointConnectionsOperations + :ivar replications: ReplicationsOperations operations + :vartype replications: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.ReplicationsOperations + :ivar scope_maps: ScopeMapsOperations operations + :vartype scope_maps: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.ScopeMapsOperations + :ivar tokens: TokensOperations operations + :vartype tokens: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.TokensOperations + :ivar webhooks: WebhooksOperations operations + :vartype webhooks: azure.mgmt.containerregistry.v2021_08_01_preview.aio.operations.WebhooksOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The Microsoft Azure subscription ID. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerRegistryManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.connected_registries = ConnectedRegistriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_pipelines = ExportPipelinesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.registries = RegistriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.import_pipelines = ImportPipelinesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.pipeline_runs = PipelineRunsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.replications = ReplicationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.scope_maps = ScopeMapsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.tokens = TokensOperations( + self._client, self._config, self._serialize, self._deserialize) + self.webhooks = WebhooksOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerRegistryManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/__init__.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/__init__.py new file mode 100644 index 000000000000..532500a8b984 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/__init__.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._connected_registries_operations import ConnectedRegistriesOperations +from ._export_pipelines_operations import ExportPipelinesOperations +from ._registries_operations import RegistriesOperations +from ._import_pipelines_operations import ImportPipelinesOperations +from ._operations import Operations +from ._pipeline_runs_operations import PipelineRunsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._replications_operations import ReplicationsOperations +from ._scope_maps_operations import ScopeMapsOperations +from ._tokens_operations import TokensOperations +from ._webhooks_operations import WebhooksOperations + +__all__ = [ + 'ConnectedRegistriesOperations', + 'ExportPipelinesOperations', + 'RegistriesOperations', + 'ImportPipelinesOperations', + 'Operations', + 'PipelineRunsOperations', + 'PrivateEndpointConnectionsOperations', + 'ReplicationsOperations', + 'ScopeMapsOperations', + 'TokensOperations', + 'WebhooksOperations', +] diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_connected_registries_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_connected_registries_operations.py new file mode 100644 index 000000000000..82d8ec70eaa7 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_connected_registries_operations.py @@ -0,0 +1,699 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ConnectedRegistriesOperations: + """ConnectedRegistriesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + registry_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ConnectedRegistryListResult"]: + """Lists all connected registries for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param filter: An OData filter expression that describes a subset of connectedRegistries to + return. The parameters that can be filtered are parent.id (the resource id of the + connectedRegistry parent), mode, and connectionState. The supported operator is eq. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConnectedRegistryListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ConnectedRegistryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries'} # type: ignore + + async def get( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + **kwargs: Any + ) -> "_models.ConnectedRegistry": + """Gets the properties of the connected registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectedRegistry, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: "_models.ConnectedRegistry", + **kwargs: Any + ) -> "_models.ConnectedRegistry": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connected_registry_create_parameters, 'ConnectedRegistry') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_create_parameters: "_models.ConnectedRegistry", + **kwargs: Any + ) -> AsyncLROPoller["_models.ConnectedRegistry"]: + """Creates a connected registry for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. + :type connected_registry_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConnectedRegistry or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + connected_registry_create_parameters=connected_registry_create_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a connected registry from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: "_models.ConnectedRegistryUpdateParameters", + **kwargs: Any + ) -> "_models.ConnectedRegistry": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connected_registry_update_parameters, 'ConnectedRegistryUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + connected_registry_update_parameters: "_models.ConnectedRegistryUpdateParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.ConnectedRegistry"]: + """Updates a connected registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. + :type connected_registry_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistryUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ConnectedRegistry or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + connected_registry_update_parameters=connected_registry_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + async def _deactivate_initial( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self._deactivate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _deactivate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate'} # type: ignore + + async def begin_deactivate( + self, + resource_group_name: str, + registry_name: str, + connected_registry_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deactivates the connected registry instance. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._deactivate_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_deactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_inbound_nat_rules_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_export_pipelines_operations.py similarity index 68% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_inbound_nat_rules_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_export_pipelines_operations.py index af2ed81ff44f..2d1e5225a514 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_inbound_nat_rules_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_export_pipelines_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class InboundNatRulesOperations: - """InboundNatRulesOperations async operations. +class ExportPipelinesOperations: + """ExportPipelinesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,27 +46,28 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, resource_group_name: str, - load_balancer_name: str, + registry_name: str, **kwargs: Any - ) -> AsyncIterable["_models.InboundNatRuleListResult"]: - """Gets all the inbound nat rules in a load balancer. + ) -> AsyncIterable["_models.ExportPipelineListResult"]: + """Lists all export pipelines for the specified container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either InboundNatRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.InboundNatRuleListResult] + :return: An iterator like instance of either ExportPipelineListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipelineListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExportPipelineListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-08-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -77,9 +78,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -94,7 +95,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('InboundNatRuleListResult', pipeline_response) + deserialized = self._deserialize('ExportPipelineListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,29 +116,44 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines'} # type: ignore - async def _delete_initial( + async def get( self, resource_group_name: str, - load_balancer_name: str, - inbound_nat_rule_name: str, + registry_name: str, + export_pipeline_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.ExportPipeline": + """Gets the properties of the export pipeline. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. + :type export_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExportPipeline, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExportPipeline"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-08-01-preview" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -147,57 +163,125 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('ExportPipeline', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore - async def begin_delete( + async def _create_initial( self, resource_group_name: str, - load_balancer_name: str, - inbound_nat_rule_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: "_models.ExportPipeline", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified load balancer inbound nat rule. + ) -> "_models.ExportPipeline": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExportPipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - :param resource_group_name: The name of the resource group. + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(export_pipeline_create_parameters, 'ExportPipeline') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExportPipeline', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExportPipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + export_pipeline_name: str, + export_pipeline_create_parameters: "_models.ExportPipeline", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExportPipeline"]: + """Creates an export pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. + :type export_pipeline_name: str + :param export_pipeline_create_parameters: The parameters for creating an export pipeline. + :type export_pipeline_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipeline :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either ExportPipeline or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipeline] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExportPipeline"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + export_pipeline_create_parameters=export_pipeline_create_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -206,14 +290,17 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExportPipeline', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -228,99 +315,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore - async def get( - self, - resource_group_name: str, - load_balancer_name: str, - inbound_nat_rule_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> "_models.InboundNatRule": - """Gets the specified load balancer inbound nat rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: InboundNatRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.InboundNatRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('InboundNatRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore - - async def _create_or_update_initial( + async def _delete_initial( self, resource_group_name: str, - load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: "_models.InboundNatRule", + registry_name: str, + export_pipeline_name: str, **kwargs: Any - ) -> "_models.InboundNatRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-08-01-preview" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -330,74 +347,58 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(inbound_nat_rule_parameters, 'InboundNatRule') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('InboundNatRule', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('InboundNatRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, - load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: "_models.InboundNatRule", + registry_name: str, + export_pipeline_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.InboundNatRule"]: - """Creates or updates a load balancer inbound nat rule. + ) -> AsyncLROPoller[None]: + """Deletes an export pipeline from a container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound nat - rule operation. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2017_08_01.models.InboundNatRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. + :type export_pipeline_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.InboundNatRule] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, - inbound_nat_rule_parameters=inbound_nat_rule_parameters, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, cls=lambda x,y,z: x, **kwargs ) @@ -406,17 +407,14 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('InboundNatRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -431,4 +429,4 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_import_pipelines_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_import_pipelines_operations.py new file mode 100644 index 000000000000..28c80bac38ab --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_import_pipelines_operations.py @@ -0,0 +1,432 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ImportPipelinesOperations: + """ImportPipelinesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + registry_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ImportPipelineListResult"]: + """Lists all import pipelines for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ImportPipelineListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipelineListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImportPipelineListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ImportPipelineListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines'} # type: ignore + + async def get( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + **kwargs: Any + ) -> "_models.ImportPipeline": + """Gets the properties of the import pipeline. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. + :type import_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ImportPipeline, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImportPipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ImportPipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: "_models.ImportPipeline", + **kwargs: Any + ) -> "_models.ImportPipeline": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImportPipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(import_pipeline_create_parameters, 'ImportPipeline') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ImportPipeline', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ImportPipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + import_pipeline_create_parameters: "_models.ImportPipeline", + **kwargs: Any + ) -> AsyncLROPoller["_models.ImportPipeline"]: + """Creates an import pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. + :type import_pipeline_name: str + :param import_pipeline_create_parameters: The parameters for creating an import pipeline. + :type import_pipeline_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipeline + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ImportPipeline or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImportPipeline"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + import_pipeline_create_parameters=import_pipeline_create_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ImportPipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + registry_name: str, + import_pipeline_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an import pipeline from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. + :type import_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_bgp_service_communities_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_operations.py similarity index 80% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_bgp_service_communities_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_operations.py index 9b0d420dae6d..1a2b6e75e09c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_bgp_service_communities_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class BgpServiceCommunitiesOperations: - """BgpServiceCommunitiesOperations async operations. +class Operations: + """Operations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,20 +44,20 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, **kwargs: Any - ) -> AsyncIterable["_models.BgpServiceCommunityListResult"]: - """Gets all the available bgp service communities. + ) -> AsyncIterable["_models.OperationListResult"]: + """Lists all of the available Azure Container Registry REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BgpServiceCommunityListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.BgpServiceCommunityListResult] + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpServiceCommunityListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-08-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -68,10 +68,6 @@ def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') @@ -84,7 +80,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('BgpServiceCommunityListResult', pipeline_response) + deserialized = self._deserialize('OperationListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -105,4 +101,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.ContainerRegistry/operations'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_pipeline_runs_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_pipeline_runs_operations.py new file mode 100644 index 000000000000..d6c4c5fa591f --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_pipeline_runs_operations.py @@ -0,0 +1,432 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PipelineRunsOperations: + """PipelineRunsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + registry_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PipelineRunListResult"]: + """Lists all the pipeline runs for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PipelineRunListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineRunListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PipelineRunListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns'} # type: ignore + + async def get( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + **kwargs: Any + ) -> "_models.PipelineRun": + """Gets the detailed information for a given pipeline run. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. + :type pipeline_run_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineRun, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRun + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineRun"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: "_models.PipelineRun", + **kwargs: Any + ) -> "_models.PipelineRun": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineRun"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(pipeline_run_create_parameters, 'PipelineRun') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PipelineRun', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PipelineRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + pipeline_run_create_parameters: "_models.PipelineRun", + **kwargs: Any + ) -> AsyncLROPoller["_models.PipelineRun"]: + """Creates a pipeline run for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. + :type pipeline_run_name: str + :param pipeline_run_create_parameters: The parameters for creating a pipeline run. + :type pipeline_run_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRun + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PipelineRun or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineRun"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + pipeline_run_create_parameters=pipeline_run_create_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PipelineRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + registry_name: str, + pipeline_run_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a pipeline run from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. + :type pipeline_run_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..ef2dcf76ea2b --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,433 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + registry_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """List all private endpoint connections in a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Get the specified private endpoint connection associated with the container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: + """Update the state of specified private endpoint connection associated with the container + registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + :type private_endpoint_connection: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + registry_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private endpoint connection associated with the container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_application_gateways_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_registries_operations.py similarity index 65% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_application_gateways_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_registries_operations.py index 4290115b0852..e6733eeab4dd 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_application_gateways_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_registries_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class ApplicationGatewaysOperations: - """ApplicationGatewaysOperations async operations. +class RegistriesOperations: + """RegistriesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,10 +43,11 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def _import_image_initial( self, resource_group_name: str, - application_gateway_name: str, + registry_name: str, + parameters: "_models.ImportImageParameters", **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,14 +55,15 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._import_image_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,32 +73,41 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ImportImageParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + _import_image_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage'} # type: ignore - async def begin_delete( + async def begin_import_image( self, resource_group_name: str, - application_gateway_name: str, + registry_name: str, + parameters: "_models.ImportImageParameters", **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified application gateway. + """Copies an image to this container registry from the specified container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param parameters: The parameters specifying the image to copy and the source container + registry. + :type parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportImageParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -115,9 +126,10 @@ async def begin_delete( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._import_image_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, + registry_name=registry_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -130,9 +142,9 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -147,87 +159,36 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + begin_import_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage'} # type: ignore - async def get( + async def check_name_availability( self, - resource_group_name: str, - application_gateway_name: str, + registry_name_check_request: "_models.RegistryNameCheckRequest", **kwargs: Any - ) -> "_models.ApplicationGateway": - """Gets the specified application gateway. + ) -> "_models.RegistryNameStatus": + """Checks whether the container registry name is available for use. The name must contain only + alphanumeric characters, be globally unique, and between 5 and 50 characters in length. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param registry_name_check_request: The object containing information for the availability + request. + :type registry_name_check_request: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryNameCheckRequest :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationGateway + :return: RegistryNameStatus, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryNameStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryNameStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - application_gateway_name: str, - parameters: "_models.ApplicationGateway", - **kwargs: Any - ) -> "_models.ApplicationGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self.check_name_availability.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -242,137 +203,9 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ApplicationGateway') + body_content = self._serialize.body(registry_name_check_request, 'RegistryNameCheckRequest') body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - application_gateway_name: str, - parameters: "_models.ApplicationGateway", - **kwargs: Any - ) -> AsyncLROPoller["_models.ApplicationGateway"]: - """Creates or updates the specified application gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param parameters: Parameters supplied to the create or update application gateway operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ApplicationGateway - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ApplicationGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - async def _update_tags_initial( - self, - resource_group_name: str, - application_gateway_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> "_models.ApplicationGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -380,105 +213,31 @@ async def _update_tags_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGateway', pipeline_response) + deserialized = self._deserialize('RegistryNameStatus', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - application_gateway_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.ApplicationGateway"]: - """Updates the specified application gateway tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param parameters: Parameters supplied to update application gateway tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ApplicationGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability'} # type: ignore def list( self, - resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApplicationGatewayListResult"]: - """Lists all application gateways in a resource group. + ) -> AsyncIterable["_models.RegistryListResult"]: + """Lists all the container registries under the specified subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayListResult] + :return: An iterator like instance of either RegistryListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -490,7 +249,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -506,7 +264,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayListResult', pipeline_response) + deserialized = self._deserialize('RegistryListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -527,25 +285,29 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries'} # type: ignore - def list_all( + def list_by_resource_group( self, + resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApplicationGatewayListResult"]: - """Gets all the application gateways in a subscription. + ) -> AsyncIterable["_models.RegistryListResult"]: + """Lists all the container registries under the specified resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayListResult] + :return: An iterator like instance of either RegistryListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -555,9 +317,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -572,7 +335,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayListResult', pipeline_response) + deserialized = self._deserialize('RegistryListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -593,27 +356,40 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries'} # type: ignore - async def _start_initial( + async def get( self, resource_group_name: str, - application_gateway_name: str, + registry_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.Registry": + """Gets the properties of the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Registry, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" + accept = "application/json" # Construct URL - url = self._start_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -623,53 +399,119 @@ async def _start_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('Registry', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - async def begin_start( + async def _create_initial( self, resource_group_name: str, - application_gateway_name: str, + registry_name: str, + registry: "_models.Registry", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Starts the specified application gateway. + ) -> "_models.Registry": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(registry, 'Registry') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - :param resource_group_name: The name of the resource group. + if response.status_code == 200: + deserialized = self._deserialize('Registry', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Registry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + registry: "_models.Registry", + **kwargs: Any + ) -> AsyncLROPoller["_models.Registry"]: + """Creates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param registry: The parameters for creating a container registry. + :type registry: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either Registry or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._start_initial( + raw_result = await self._create_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, + registry_name=registry_name, + registry=registry, cls=lambda x,y,z: x, **kwargs ) @@ -678,13 +520,16 @@ async def begin_start( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Registry', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -699,12 +544,12 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start'} # type: ignore + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - async def _stop_initial( + async def _delete_initial( self, resource_group_name: str, - application_gateway_name: str, + registry_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -712,14 +557,14 @@ async def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" # Construct URL - url = self._stop_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -730,31 +575,32 @@ async def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - async def begin_stop( + async def begin_delete( self, resource_group_name: str, - application_gateway_name: str, + registry_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Stops the specified application gateway in a resource group. + """Deletes a container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -773,9 +619,9 @@ async def begin_stop( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._stop_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, + registry_name=registry_name, cls=lambda x,y,z: x, **kwargs ) @@ -788,9 +634,9 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -805,97 +651,103 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - async def _backend_health_initial( + async def _update_initial( self, resource_group_name: str, - application_gateway_name: str, - expand: Optional[str] = None, + registry_name: str, + registry_update_parameters: "_models.RegistryUpdateParameters", **kwargs: Any - ) -> Optional["_models.ApplicationGatewayBackendHealth"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealth"]] + ) -> "_models.Registry": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._backend_health_initial.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(registry_update_parameters, 'RegistryUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + deserialized = self._deserialize('Registry', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Registry', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _backend_health_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - async def begin_backend_health( + async def begin_update( self, resource_group_name: str, - application_gateway_name: str, - expand: Optional[str] = None, + registry_name: str, + registry_update_parameters: "_models.RegistryUpdateParameters", **kwargs: Any - ) -> AsyncLROPoller["_models.ApplicationGatewayBackendHealth"]: - """Gets the backend health of the specified application gateway in a resource group. + ) -> AsyncLROPoller["_models.Registry"]: + """Updates a container registry with the specified parameters. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. - :type expand: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param registry_update_parameters: The parameters for updating a container registry. + :type registry_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ApplicationGatewayBackendHealth or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealth] + :return: An instance of AsyncLROPoller that returns either Registry or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealth"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._backend_health_initial( + raw_result = await self._update_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - expand=expand, + registry_name=registry_name, + registry_update_parameters=registry_update_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -904,16 +756,16 @@ async def begin_backend_health( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + deserialized = self._deserialize('Registry', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -928,81 +780,40 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_backend_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - async def list_available_waf_rule_sets( - self, - **kwargs: Any - ) -> "_models.ApplicationGatewayAvailableWafRuleSetsResult": - """Lists all available web application firewall rule sets. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewayAvailableWafRuleSetsResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayAvailableWafRuleSetsResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableWafRuleSetsResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json" - - # Construct URL - url = self.list_available_waf_rule_sets.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationGatewayAvailableWafRuleSetsResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_available_waf_rule_sets.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets'} # type: ignore - - async def list_available_ssl_options( + async def list_usages( self, + resource_group_name: str, + registry_name: str, **kwargs: Any - ) -> "_models.ApplicationGatewayAvailableSslOptions": - """Lists available Ssl options for configuring Ssl policy. + ) -> "_models.RegistryUsageListResult": + """Gets the quota usages for the specified container registry. + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewayAvailableSslOptions, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayAvailableSslOptions + :return: RegistryUsageListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryUsageListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslOptions"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryUsageListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" accept = "application/json" # Construct URL - url = self.list_available_ssl_options.metadata['url'] # type: ignore + url = self.list_usages.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1022,31 +833,38 @@ async def list_available_ssl_options( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGatewayAvailableSslOptions', pipeline_response) + deserialized = self._deserialize('RegistryUsageListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_available_ssl_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default'} # type: ignore + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages'} # type: ignore - def list_available_ssl_predefined_policies( + def list_private_link_resources( self, + resource_group_name: str, + registry_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApplicationGatewayAvailableSslPredefinedPolicies"]: - """Lists all SSL predefined policies for configuring Ssl policy. + ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: + """Lists the private link resources for a container registry. + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayAvailableSslPredefinedPolicies or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -1056,9 +874,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_available_ssl_predefined_policies.metadata['url'] # type: ignore + url = self.list_private_link_resources.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -1073,7 +893,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayAvailableSslPredefinedPolicies', pipeline_response) + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1094,35 +914,40 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_available_ssl_predefined_policies.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies'} # type: ignore + list_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources'} # type: ignore - async def get_ssl_predefined_policy( + async def list_credentials( self, - predefined_policy_name: str, + resource_group_name: str, + registry_name: str, **kwargs: Any - ) -> "_models.ApplicationGatewaySslPredefinedPolicy": - """Gets Ssl predefined policy with the specified policy name. + ) -> "_models.RegistryListCredentialsResult": + """Lists the login credentials for the specified container registry. - :param predefined_policy_name: Name of Ssl predefined policy. - :type predefined_policy_name: str + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewaySslPredefinedPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPredefinedPolicy + :return: RegistryListCredentialsResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryListCredentialsResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewaySslPredefinedPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryListCredentialsResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" accept = "application/json" # Construct URL - url = self.get_ssl_predefined_policy.metadata['url'] # type: ignore + url = self.list_credentials.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'predefinedPolicyName': self._serialize.url("predefined_policy_name", predefined_policy_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1134,7 +959,7 @@ async def get_ssl_predefined_policy( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1142,10 +967,205 @@ async def get_ssl_predefined_policy( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGatewaySslPredefinedPolicy', pipeline_response) + deserialized = self._deserialize('RegistryListCredentialsResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_ssl_predefined_policy.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}'} # type: ignore + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials'} # type: ignore + + async def regenerate_credential( + self, + resource_group_name: str, + registry_name: str, + regenerate_credential_parameters: "_models.RegenerateCredentialParameters", + **kwargs: Any + ) -> "_models.RegistryListCredentialsResult": + """Regenerates one of the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param regenerate_credential_parameters: Specifies name of the password which should be + regenerated -- password or password2. + :type regenerate_credential_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegenerateCredentialParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegistryListCredentialsResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryListCredentialsResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryListCredentialsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_credential.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(regenerate_credential_parameters, 'RegenerateCredentialParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegistryListCredentialsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential'} # type: ignore + + async def _generate_credentials_initial( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: "_models.GenerateCredentialsParameters", + **kwargs: Any + ) -> Optional["_models.GenerateCredentialsResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GenerateCredentialsResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._generate_credentials_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(generate_credentials_parameters, 'GenerateCredentialsParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GenerateCredentialsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _generate_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials'} # type: ignore + + async def begin_generate_credentials( + self, + resource_group_name: str, + registry_name: str, + generate_credentials_parameters: "_models.GenerateCredentialsParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.GenerateCredentialsResult"]: + """Generate keys for a token of a specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param generate_credentials_parameters: The parameters for generating credentials. + :type generate_credentials_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.GenerateCredentialsParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either GenerateCredentialsResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.GenerateCredentialsResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.GenerateCredentialsResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._generate_credentials_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + generate_credentials_parameters=generate_credentials_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('GenerateCredentialsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_generate_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_replications_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_replications_operations.py new file mode 100644 index 000000000000..ef758da6fa86 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_replications_operations.py @@ -0,0 +1,568 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ReplicationsOperations: + """ReplicationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + registry_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ReplicationListResult"]: + """Lists all the replications for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReplicationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ReplicationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ReplicationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications'} # type: ignore + + async def get( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + **kwargs: Any + ) -> "_models.Replication": + """Gets the properties of the specified replication. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Replication, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: "_models.Replication", + **kwargs: Any + ) -> "_models.Replication": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(replication, 'Replication') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Replication', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication: "_models.Replication", + **kwargs: Any + ) -> AsyncLROPoller["_models.Replication"]: + """Creates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :param replication: The parameters for creating a replication. + :type replication: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Replication or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + replication=replication, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a replication from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: "_models.ReplicationUpdateParameters", + **kwargs: Any + ) -> "_models.Replication": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(replication_update_parameters, 'ReplicationUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Replication', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + replication_name: str, + replication_update_parameters: "_models.ReplicationUpdateParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.Replication"]: + """Updates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :param replication_update_parameters: The parameters for updating a replication. + :type replication_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ReplicationUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Replication or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + replication_update_parameters=replication_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_filter_rules_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_scope_maps_operations.py similarity index 68% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_filter_rules_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_scope_maps_operations.py index 2787174ec8e5..ae5fa8325447 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_filter_rules_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_scope_maps_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RouteFilterRulesOperations: - """RouteFilterRulesOperations async operations. +class ScopeMapsOperations: + """ScopeMapsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,154 +43,117 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + def list( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, + registry_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> AsyncIterable["_models.ScopeMapListResult"]: + """Lists all the scope maps for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScopeMapListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMapListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMapListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + async def extract_data(pipeline_response): + deserialized = self._deserialize('ScopeMapListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - async def begin_delete( - self, - resource_group_name: str, - route_filter_name: str, - rule_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified rule from a route filter. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return AsyncItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps'} # type: ignore async def get( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, + registry_name: str, + scope_map_name: str, **kwargs: Any - ) -> "_models.RouteFilterRule": - """Gets the specified rule from a route filter. + ) -> "_models.ScopeMap": + """Gets the properties of the specified scope map. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param scope_map_name: The name of the scope map. + :type scope_map_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilterRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.RouteFilterRule + :return: ScopeMap, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -210,38 +173,38 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('ScopeMap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - async def _create_or_update_initial( + async def _create_initial( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.RouteFilterRule", + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: "_models.ScopeMap", **kwargs: Any - ) -> "_models.RouteFilterRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + ) -> "_models.ScopeMap": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +218,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') + body_content = self._serialize.body(scope_map_create_parameters, 'ScopeMap') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,59 +229,59 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('ScopeMap', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('ScopeMap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.RouteFilterRule", + registry_name: str, + scope_map_name: str, + scope_map_create_parameters: "_models.ScopeMap", **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilterRule"]: - """Creates or updates a route in the specified route filter. + ) -> AsyncLROPoller["_models.ScopeMap"]: + """Creates a scope map for a container registry with the specified parameters. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the create or update route filter - rule operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_11_01.models.RouteFilterRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param scope_map_name: The name of the scope map. + :type scope_map_name: str + :param scope_map_create_parameters: The parameters for creating a scope map. + :type scope_map_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] + :return: An instance of AsyncLROPoller that returns either ScopeMap or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._create_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + registry_name=registry_name, + scope_map_name=scope_map_name, + scope_map_create_parameters=scope_map_create_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -327,17 +290,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('ScopeMap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -352,32 +315,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - async def _update_initial( + async def _delete_initial( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.PatchRouteFilterRule", + registry_name: str, + scope_map_name: str, **kwargs: Any - ) -> "_models.RouteFilterRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = "2021-08-01-preview" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -387,70 +347,58 @@ async def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'PatchRouteFilterRule') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - async def begin_update( + async def begin_delete( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.PatchRouteFilterRule", + registry_name: str, + scope_map_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilterRule"]: - """Updates a route in the specified route filter. + ) -> AsyncLROPoller[None]: + """Deletes a scope map from a container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the update route filter rule - operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_11_01.models.PatchRouteFilterRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param scope_map_name: The name of the scope map. + :type scope_map_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + registry_name=registry_name, + scope_map_name=scope_map_name, cls=lambda x,y,z: x, **kwargs ) @@ -459,17 +407,14 @@ async def begin_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -484,78 +429,140 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - def list_by_route_filter( + async def _update_initial( self, resource_group_name: str, - route_filter_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: "_models.ScopeMapUpdateParameters", **kwargs: Any - ) -> AsyncIterable["_models.RouteFilterRuleListResult"]: - """Gets all RouteFilterRules in a route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteFilterRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] + ) -> "_models.ScopeMap": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_by_route_filter.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(scope_map_update_parameters, 'ScopeMapUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - async def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code == 200: + deserialized = self._deserialize('ScopeMap', pipeline_response) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 201: + deserialized = self._deserialize('ScopeMap', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return AsyncItemPaged( - get_next, extract_data + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + scope_map_name: str, + scope_map_update_parameters: "_models.ScopeMapUpdateParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.ScopeMap"]: + """Updates a scope map with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param scope_map_name: The name of the scope map. + :type scope_map_name: str + :param scope_map_update_parameters: The parameters for updating a scope map. + :type scope_map_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMapUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ScopeMap or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list_by_route_filter.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + scope_map_update_parameters=scope_map_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ScopeMap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_filter_rules_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_tokens_operations.py similarity index 69% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_filter_rules_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_tokens_operations.py index ab08b60fe988..fc2b272cafb9 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_filter_rules_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_tokens_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RouteFilterRulesOperations: - """RouteFilterRulesOperations async operations. +class TokensOperations: + """TokensOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,154 +43,117 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + def list( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, + registry_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> AsyncIterable["_models.TokenListResult"]: + """Lists all the tokens for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TokenListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TokenListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + async def extract_data(pipeline_response): + deserialized = self._deserialize('TokenListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - async def begin_delete( - self, - resource_group_name: str, - route_filter_name: str, - rule_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified rule from a route filter. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return AsyncItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens'} # type: ignore async def get( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, + registry_name: str, + token_name: str, **kwargs: Any - ) -> "_models.RouteFilterRule": - """Gets the specified rule from a route filter. + ) -> "_models.Token": + """Gets the properties of the specified token. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param token_name: The name of the token. + :type token_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilterRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.RouteFilterRule + :return: Token, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -210,38 +173,38 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('Token', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - async def _create_or_update_initial( + async def _create_initial( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.RouteFilterRule", + registry_name: str, + token_name: str, + token_create_parameters: "_models.Token", **kwargs: Any - ) -> "_models.RouteFilterRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + ) -> "_models.Token": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +218,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') + body_content = self._serialize.body(token_create_parameters, 'Token') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,59 +229,59 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('Token', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('Token', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - async def begin_create_or_update( + async def begin_create( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.RouteFilterRule", + registry_name: str, + token_name: str, + token_create_parameters: "_models.Token", **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilterRule"]: - """Creates or updates a route in the specified route filter. + ) -> AsyncLROPoller["_models.Token"]: + """Creates a token for a container registry with the specified parameters. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the create or update route filter - rule operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_09_01.models.RouteFilterRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param token_name: The name of the token. + :type token_name: str + :param token_create_parameters: The parameters for creating a token. + :type token_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] + :return: An instance of AsyncLROPoller that returns either Token or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._create_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + registry_name=registry_name, + token_name=token_name, + token_create_parameters=token_create_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -327,17 +290,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('Token', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -352,32 +315,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - async def _update_initial( + async def _delete_initial( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.PatchRouteFilterRule", + registry_name: str, + token_name: str, **kwargs: Any - ) -> "_models.RouteFilterRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = "2021-08-01-preview" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -387,70 +347,58 @@ async def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'PatchRouteFilterRule') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - async def begin_update( + async def begin_delete( self, resource_group_name: str, - route_filter_name: str, - rule_name: str, - route_filter_rule_parameters: "_models.PatchRouteFilterRule", + registry_name: str, + token_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilterRule"]: - """Updates a route in the specified route filter. + ) -> AsyncLROPoller[None]: + """Deletes a token from a container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the update route filter rule - operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_09_01.models.PatchRouteFilterRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param token_name: The name of the token. + :type token_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + registry_name=registry_name, + token_name=token_name, cls=lambda x,y,z: x, **kwargs ) @@ -459,17 +407,14 @@ async def begin_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -484,78 +429,140 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - def list_by_route_filter( + async def _update_initial( self, resource_group_name: str, - route_filter_name: str, + registry_name: str, + token_name: str, + token_update_parameters: "_models.TokenUpdateParameters", **kwargs: Any - ) -> AsyncIterable["_models.RouteFilterRuleListResult"]: - """Gets all RouteFilterRules in a route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteFilterRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] + ) -> "_models.Token": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_by_route_filter.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(token_update_parameters, 'TokenUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - async def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code == 200: + deserialized = self._deserialize('Token', pipeline_response) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 201: + deserialized = self._deserialize('Token', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return AsyncItemPaged( - get_next, extract_data + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + token_name: str, + token_update_parameters: "_models.TokenUpdateParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.Token"]: + """Updates a token with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param token_name: The name of the token. + :type token_name: str + :param token_update_parameters: The parameters for updating a token. + :type token_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Token or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list_by_route_filter.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + token_update_parameters=token_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Token', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_webhooks_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_webhooks_operations.py new file mode 100644 index 000000000000..ea65a3c707f8 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/aio/operations/_webhooks_operations.py @@ -0,0 +1,773 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WebhooksOperations: + """WebhooksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + registry_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.WebhookListResult"]: + """Lists all the webhooks for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebhookListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebhookListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebhookListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks'} # type: ignore + + async def get( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + **kwargs: Any + ) -> "_models.Webhook": + """Gets the properties of the specified webhook. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Webhook, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Webhook + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + async def _create_initial( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: "_models.WebhookCreateParameters", + **kwargs: Any + ) -> "_models.Webhook": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(webhook_create_parameters, 'WebhookCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + async def begin_create( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_create_parameters: "_models.WebhookCreateParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.Webhook"]: + """Creates a webhook for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param webhook_create_parameters: The parameters for creating a webhook. + :type webhook_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Webhook or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_create_parameters=webhook_create_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a webhook from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: "_models.WebhookUpdateParameters", + **kwargs: Any + ) -> "_models.Webhook": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(webhook_update_parameters, 'WebhookUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + webhook_update_parameters: "_models.WebhookUpdateParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.Webhook"]: + """Updates a webhook with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param webhook_update_parameters: The parameters for updating a webhook. + :type webhook_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Webhook or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_update_parameters=webhook_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + async def ping( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + **kwargs: Any + ) -> "_models.EventInfo": + """Triggers a ping event to be sent to the webhook. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EventInfo, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EventInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.ping.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EventInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + ping.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping'} # type: ignore + + def list_events( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.EventListResult"]: + """Lists recent events for the specified webhook. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EventListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EventListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_events.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('EventListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_events.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents'} # type: ignore + + async def get_callback_config( + self, + resource_group_name: str, + registry_name: str, + webhook_name: str, + **kwargs: Any + ) -> "_models.CallbackConfig": + """Gets the configuration of service URI and custom headers for the webhook. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CallbackConfig, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.CallbackConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CallbackConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_callback_config.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CallbackConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_callback_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/__init__.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/__init__.py new file mode 100644 index 000000000000..1a70164b9beb --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/__init__.py @@ -0,0 +1,402 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ActivationProperties + from ._models_py3 import ActiveDirectoryObject + from ._models_py3 import Actor + from ._models_py3 import CallbackConfig + from ._models_py3 import ConnectedRegistry + from ._models_py3 import ConnectedRegistryListResult + from ._models_py3 import ConnectedRegistryUpdateParameters + from ._models_py3 import EncryptionProperty + from ._models_py3 import ErrorResponse + from ._models_py3 import ErrorResponseBody + from ._models_py3 import Event + from ._models_py3 import EventContent + from ._models_py3 import EventInfo + from ._models_py3 import EventListResult + from ._models_py3 import EventRequestMessage + from ._models_py3 import EventResponseMessage + from ._models_py3 import ExportPipeline + from ._models_py3 import ExportPipelineListResult + from ._models_py3 import ExportPipelineTargetProperties + from ._models_py3 import ExportPolicy + from ._models_py3 import GenerateCredentialsParameters + from ._models_py3 import GenerateCredentialsResult + from ._models_py3 import IPRule + from ._models_py3 import IdentityProperties + from ._models_py3 import ImportImageParameters + from ._models_py3 import ImportPipeline + from ._models_py3 import ImportPipelineListResult + from ._models_py3 import ImportPipelineSourceProperties + from ._models_py3 import ImportSource + from ._models_py3 import ImportSourceCredentials + from ._models_py3 import InnerErrorDescription + from ._models_py3 import KeyVaultProperties + from ._models_py3 import LoggingProperties + from ._models_py3 import LoginServerProperties + from ._models_py3 import NetworkRuleSet + from ._models_py3 import OperationDefinition + from ._models_py3 import OperationDisplayDefinition + from ._models_py3 import OperationListResult + from ._models_py3 import OperationLogSpecificationDefinition + from ._models_py3 import OperationMetricSpecificationDefinition + from ._models_py3 import OperationServiceSpecificationDefinition + from ._models_py3 import ParentProperties + from ._models_py3 import PipelineRun + from ._models_py3 import PipelineRunListResult + from ._models_py3 import PipelineRunRequest + from ._models_py3 import PipelineRunResponse + from ._models_py3 import PipelineRunSourceProperties + from ._models_py3 import PipelineRunTargetProperties + from ._models_py3 import PipelineSourceTriggerDescriptor + from ._models_py3 import PipelineSourceTriggerProperties + from ._models_py3 import PipelineTriggerDescriptor + from ._models_py3 import PipelineTriggerProperties + from ._models_py3 import Policies + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProgressProperties + from ._models_py3 import ProxyResource + from ._models_py3 import QuarantinePolicy + from ._models_py3 import RegenerateCredentialParameters + from ._models_py3 import Registry + from ._models_py3 import RegistryListCredentialsResult + from ._models_py3 import RegistryListResult + from ._models_py3 import RegistryNameCheckRequest + from ._models_py3 import RegistryNameStatus + from ._models_py3 import RegistryPassword + from ._models_py3 import RegistryUpdateParameters + from ._models_py3 import RegistryUsage + from ._models_py3 import RegistryUsageListResult + from ._models_py3 import Replication + from ._models_py3 import ReplicationListResult + from ._models_py3 import ReplicationUpdateParameters + from ._models_py3 import Request + from ._models_py3 import Resource + from ._models_py3 import RetentionPolicy + from ._models_py3 import ScopeMap + from ._models_py3 import ScopeMapListResult + from ._models_py3 import ScopeMapUpdateParameters + from ._models_py3 import Sku + from ._models_py3 import Source + from ._models_py3 import Status + from ._models_py3 import StatusDetailProperties + from ._models_py3 import SyncProperties + from ._models_py3 import SyncUpdateProperties + from ._models_py3 import SystemData + from ._models_py3 import Target + from ._models_py3 import TlsCertificateProperties + from ._models_py3 import TlsProperties + from ._models_py3 import Token + from ._models_py3 import TokenCertificate + from ._models_py3 import TokenCredentialsProperties + from ._models_py3 import TokenListResult + from ._models_py3 import TokenPassword + from ._models_py3 import TokenUpdateParameters + from ._models_py3 import TrustPolicy + from ._models_py3 import UserIdentityProperties + from ._models_py3 import VirtualNetworkRule + from ._models_py3 import Webhook + from ._models_py3 import WebhookCreateParameters + from ._models_py3 import WebhookListResult + from ._models_py3 import WebhookUpdateParameters +except (SyntaxError, ImportError): + from ._models import ActivationProperties # type: ignore + from ._models import ActiveDirectoryObject # type: ignore + from ._models import Actor # type: ignore + from ._models import CallbackConfig # type: ignore + from ._models import ConnectedRegistry # type: ignore + from ._models import ConnectedRegistryListResult # type: ignore + from ._models import ConnectedRegistryUpdateParameters # type: ignore + from ._models import EncryptionProperty # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import ErrorResponseBody # type: ignore + from ._models import Event # type: ignore + from ._models import EventContent # type: ignore + from ._models import EventInfo # type: ignore + from ._models import EventListResult # type: ignore + from ._models import EventRequestMessage # type: ignore + from ._models import EventResponseMessage # type: ignore + from ._models import ExportPipeline # type: ignore + from ._models import ExportPipelineListResult # type: ignore + from ._models import ExportPipelineTargetProperties # type: ignore + from ._models import ExportPolicy # type: ignore + from ._models import GenerateCredentialsParameters # type: ignore + from ._models import GenerateCredentialsResult # type: ignore + from ._models import IPRule # type: ignore + from ._models import IdentityProperties # type: ignore + from ._models import ImportImageParameters # type: ignore + from ._models import ImportPipeline # type: ignore + from ._models import ImportPipelineListResult # type: ignore + from ._models import ImportPipelineSourceProperties # type: ignore + from ._models import ImportSource # type: ignore + from ._models import ImportSourceCredentials # type: ignore + from ._models import InnerErrorDescription # type: ignore + from ._models import KeyVaultProperties # type: ignore + from ._models import LoggingProperties # type: ignore + from ._models import LoginServerProperties # type: ignore + from ._models import NetworkRuleSet # type: ignore + from ._models import OperationDefinition # type: ignore + from ._models import OperationDisplayDefinition # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationLogSpecificationDefinition # type: ignore + from ._models import OperationMetricSpecificationDefinition # type: ignore + from ._models import OperationServiceSpecificationDefinition # type: ignore + from ._models import ParentProperties # type: ignore + from ._models import PipelineRun # type: ignore + from ._models import PipelineRunListResult # type: ignore + from ._models import PipelineRunRequest # type: ignore + from ._models import PipelineRunResponse # type: ignore + from ._models import PipelineRunSourceProperties # type: ignore + from ._models import PipelineRunTargetProperties # type: ignore + from ._models import PipelineSourceTriggerDescriptor # type: ignore + from ._models import PipelineSourceTriggerProperties # type: ignore + from ._models import PipelineTriggerDescriptor # type: ignore + from ._models import PipelineTriggerProperties # type: ignore + from ._models import Policies # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import ProgressProperties # type: ignore + from ._models import ProxyResource # type: ignore + from ._models import QuarantinePolicy # type: ignore + from ._models import RegenerateCredentialParameters # type: ignore + from ._models import Registry # type: ignore + from ._models import RegistryListCredentialsResult # type: ignore + from ._models import RegistryListResult # type: ignore + from ._models import RegistryNameCheckRequest # type: ignore + from ._models import RegistryNameStatus # type: ignore + from ._models import RegistryPassword # type: ignore + from ._models import RegistryUpdateParameters # type: ignore + from ._models import RegistryUsage # type: ignore + from ._models import RegistryUsageListResult # type: ignore + from ._models import Replication # type: ignore + from ._models import ReplicationListResult # type: ignore + from ._models import ReplicationUpdateParameters # type: ignore + from ._models import Request # type: ignore + from ._models import Resource # type: ignore + from ._models import RetentionPolicy # type: ignore + from ._models import ScopeMap # type: ignore + from ._models import ScopeMapListResult # type: ignore + from ._models import ScopeMapUpdateParameters # type: ignore + from ._models import Sku # type: ignore + from ._models import Source # type: ignore + from ._models import Status # type: ignore + from ._models import StatusDetailProperties # type: ignore + from ._models import SyncProperties # type: ignore + from ._models import SyncUpdateProperties # type: ignore + from ._models import SystemData # type: ignore + from ._models import Target # type: ignore + from ._models import TlsCertificateProperties # type: ignore + from ._models import TlsProperties # type: ignore + from ._models import Token # type: ignore + from ._models import TokenCertificate # type: ignore + from ._models import TokenCredentialsProperties # type: ignore + from ._models import TokenListResult # type: ignore + from ._models import TokenPassword # type: ignore + from ._models import TokenUpdateParameters # type: ignore + from ._models import TrustPolicy # type: ignore + from ._models import UserIdentityProperties # type: ignore + from ._models import VirtualNetworkRule # type: ignore + from ._models import Webhook # type: ignore + from ._models import WebhookCreateParameters # type: ignore + from ._models import WebhookListResult # type: ignore + from ._models import WebhookUpdateParameters # type: ignore + +from ._container_registry_management_client_enums import ( + Action, + ActionsRequired, + ActivationStatus, + AuditLogStatus, + CertificateType, + ConnectedRegistryMode, + ConnectionState, + ConnectionStatus, + CreatedByType, + DefaultAction, + EncryptionStatus, + ExportPolicyStatus, + ImportMode, + LastModifiedByType, + LogLevel, + NetworkRuleBypassOptions, + PasswordName, + PipelineOptions, + PipelineRunSourceType, + PipelineRunTargetType, + PipelineSourceType, + PolicyStatus, + ProvisioningState, + PublicNetworkAccess, + RegistryUsageUnit, + ResourceIdentityType, + SkuName, + SkuTier, + TlsStatus, + TokenCertificateName, + TokenPasswordName, + TokenStatus, + TriggerStatus, + TrustPolicyType, + WebhookAction, + WebhookStatus, + ZoneRedundancy, +) + +__all__ = [ + 'ActivationProperties', + 'ActiveDirectoryObject', + 'Actor', + 'CallbackConfig', + 'ConnectedRegistry', + 'ConnectedRegistryListResult', + 'ConnectedRegistryUpdateParameters', + 'EncryptionProperty', + 'ErrorResponse', + 'ErrorResponseBody', + 'Event', + 'EventContent', + 'EventInfo', + 'EventListResult', + 'EventRequestMessage', + 'EventResponseMessage', + 'ExportPipeline', + 'ExportPipelineListResult', + 'ExportPipelineTargetProperties', + 'ExportPolicy', + 'GenerateCredentialsParameters', + 'GenerateCredentialsResult', + 'IPRule', + 'IdentityProperties', + 'ImportImageParameters', + 'ImportPipeline', + 'ImportPipelineListResult', + 'ImportPipelineSourceProperties', + 'ImportSource', + 'ImportSourceCredentials', + 'InnerErrorDescription', + 'KeyVaultProperties', + 'LoggingProperties', + 'LoginServerProperties', + 'NetworkRuleSet', + 'OperationDefinition', + 'OperationDisplayDefinition', + 'OperationListResult', + 'OperationLogSpecificationDefinition', + 'OperationMetricSpecificationDefinition', + 'OperationServiceSpecificationDefinition', + 'ParentProperties', + 'PipelineRun', + 'PipelineRunListResult', + 'PipelineRunRequest', + 'PipelineRunResponse', + 'PipelineRunSourceProperties', + 'PipelineRunTargetProperties', + 'PipelineSourceTriggerDescriptor', + 'PipelineSourceTriggerProperties', + 'PipelineTriggerDescriptor', + 'PipelineTriggerProperties', + 'Policies', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'ProgressProperties', + 'ProxyResource', + 'QuarantinePolicy', + 'RegenerateCredentialParameters', + 'Registry', + 'RegistryListCredentialsResult', + 'RegistryListResult', + 'RegistryNameCheckRequest', + 'RegistryNameStatus', + 'RegistryPassword', + 'RegistryUpdateParameters', + 'RegistryUsage', + 'RegistryUsageListResult', + 'Replication', + 'ReplicationListResult', + 'ReplicationUpdateParameters', + 'Request', + 'Resource', + 'RetentionPolicy', + 'ScopeMap', + 'ScopeMapListResult', + 'ScopeMapUpdateParameters', + 'Sku', + 'Source', + 'Status', + 'StatusDetailProperties', + 'SyncProperties', + 'SyncUpdateProperties', + 'SystemData', + 'Target', + 'TlsCertificateProperties', + 'TlsProperties', + 'Token', + 'TokenCertificate', + 'TokenCredentialsProperties', + 'TokenListResult', + 'TokenPassword', + 'TokenUpdateParameters', + 'TrustPolicy', + 'UserIdentityProperties', + 'VirtualNetworkRule', + 'Webhook', + 'WebhookCreateParameters', + 'WebhookListResult', + 'WebhookUpdateParameters', + 'Action', + 'ActionsRequired', + 'ActivationStatus', + 'AuditLogStatus', + 'CertificateType', + 'ConnectedRegistryMode', + 'ConnectionState', + 'ConnectionStatus', + 'CreatedByType', + 'DefaultAction', + 'EncryptionStatus', + 'ExportPolicyStatus', + 'ImportMode', + 'LastModifiedByType', + 'LogLevel', + 'NetworkRuleBypassOptions', + 'PasswordName', + 'PipelineOptions', + 'PipelineRunSourceType', + 'PipelineRunTargetType', + 'PipelineSourceType', + 'PolicyStatus', + 'ProvisioningState', + 'PublicNetworkAccess', + 'RegistryUsageUnit', + 'ResourceIdentityType', + 'SkuName', + 'SkuTier', + 'TlsStatus', + 'TokenCertificateName', + 'TokenPasswordName', + 'TokenStatus', + 'TriggerStatus', + 'TrustPolicyType', + 'WebhookAction', + 'WebhookStatus', + 'ZoneRedundancy', +] diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_container_registry_management_client_enums.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_container_registry_management_client_enums.py new file mode 100644 index 000000000000..a6116417eb16 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_container_registry_management_client_enums.py @@ -0,0 +1,303 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class Action(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The action of virtual network rule. + """ + + ALLOW = "Allow" + +class ActionsRequired(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """A message indicating if changes on the service provider require any updates on the consumer. + """ + + NONE = "None" + RECREATE = "Recreate" + +class ActivationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The activation status of the connected registry. + """ + + ACTIVE = "Active" + INACTIVE = "Inactive" + +class AuditLogStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates whether audit logs are enabled on the connected registry. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class CertificateType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of certificate location. + """ + + LOCAL_DIRECTORY = "LocalDirectory" + +class ConnectedRegistryMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The mode of the connected registry resource that indicates the permissions of the registry. + """ + + READ_WRITE = "ReadWrite" + READ_ONLY = "ReadOnly" + REGISTRY = "Registry" + MIRROR = "Mirror" + +class ConnectionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current connection state of the connected registry. + """ + + ONLINE = "Online" + OFFLINE = "Offline" + SYNCING = "Syncing" + UNHEALTHY = "Unhealthy" + +class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private link service connection status. + """ + + APPROVED = "Approved" + PENDING = "Pending" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class DefaultAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The default action of allow or deny when no other rules match. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class EncryptionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates whether or not the encryption is enabled for container registry. + """ + + ENABLED = "enabled" + DISABLED = "disabled" + +class ExportPolicyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The value that indicates whether the policy is enabled or not. + """ + + ENABLED = "enabled" + DISABLED = "disabled" + +class ImportMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """When Force, any existing target tags will be overwritten. When NoForce, any existing target + tags will fail the operation before any copying begins. + """ + + NO_FORCE = "NoForce" + FORCE = "Force" + +class LastModifiedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that last modified the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class LogLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The verbosity of logs persisted on the connected registry. + """ + + DEBUG = "Debug" + INFORMATION = "Information" + WARNING = "Warning" + ERROR = "Error" + NONE = "None" + +class NetworkRuleBypassOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether to allow trusted Azure services to access a network restricted registry. + """ + + AZURE_SERVICES = "AzureServices" + NONE = "None" + +class PasswordName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The password name. + """ + + PASSWORD = "password" + PASSWORD2 = "password2" + +class PipelineOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + OVERWRITE_TAGS = "OverwriteTags" + OVERWRITE_BLOBS = "OverwriteBlobs" + DELETE_SOURCE_BLOB_ON_SUCCESS = "DeleteSourceBlobOnSuccess" + CONTINUE_ON_ERRORS = "ContinueOnErrors" + +class PipelineRunSourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the source. + """ + + AZURE_STORAGE_BLOB = "AzureStorageBlob" + +class PipelineRunTargetType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the target. + """ + + AZURE_STORAGE_BLOB = "AzureStorageBlob" + +class PipelineSourceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of source for the import pipeline. + """ + + AZURE_STORAGE_BLOB_CONTAINER = "AzureStorageBlobContainer" + +class PolicyStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The value that indicates whether the policy is enabled or not. + """ + + ENABLED = "enabled" + DISABLED = "disabled" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the resource. + """ + + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + +class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether or not public network access is allowed for the container registry. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class RegistryUsageUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The unit of measurement. + """ + + COUNT = "Count" + BYTES = "Bytes" + +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The identity type. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + NONE = "None" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The SKU name of the container registry. Required for registry creation. + """ + + CLASSIC = "Classic" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + +class SkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The SKU tier based on the SKU name. + """ + + CLASSIC = "Classic" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + +class TlsStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates whether HTTPS is enabled for the login server. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class TokenCertificateName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + CERTIFICATE1 = "certificate1" + CERTIFICATE2 = "certificate2" + +class TokenPasswordName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The password name "password1" or "password2" + """ + + PASSWORD1 = "password1" + PASSWORD2 = "password2" + +class TokenStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of the token example enabled or disabled. + """ + + ENABLED = "enabled" + DISABLED = "disabled" + +class TriggerStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current status of the source trigger. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class TrustPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of trust policy. + """ + + NOTARY = "Notary" + +class WebhookAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + PUSH = "push" + DELETE = "delete" + QUARANTINE = "quarantine" + CHART_PUSH = "chart_push" + CHART_DELETE = "chart_delete" + +class WebhookStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of the webhook at the time the operation was called. + """ + + ENABLED = "enabled" + DISABLED = "disabled" + +class ZoneRedundancy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether or not zone redundancy is enabled for this container registry + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_models.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_models.py new file mode 100644 index 000000000000..be602492fa7e --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_models.py @@ -0,0 +1,3676 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class ActivationProperties(msrest.serialization.Model): + """The activation properties of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The activation status of the connected registry. Possible values include: + "Active", "Inactive". + :vartype status: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ActivationStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActivationProperties, self).__init__(**kwargs) + self.status = None + + +class ActiveDirectoryObject(msrest.serialization.Model): + """The Active Directory Object that will be used for authenticating the token of a container registry. + + :param object_id: The user/group/application object ID for Active Directory Object that will be + used for authenticating the token of a container registry. + :type object_id: str + :param tenant_id: The tenant ID of user/group/application object Active Directory Object that + will be used for authenticating the token of a container registry. + :type tenant_id: str + """ + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveDirectoryObject, self).__init__(**kwargs) + self.object_id = kwargs.get('object_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class Actor(msrest.serialization.Model): + """The agent that initiated the event. For most situations, this could be from the authorization context of the request. + + :param name: The subject or username associated with the request context that generated the + event. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Actor, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class CallbackConfig(msrest.serialization.Model): + """The configuration of service URI and custom headers for the webhook. + + All required parameters must be populated in order to send to Azure. + + :param service_uri: Required. The service URI for the webhook to post notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook notifications. + :type custom_headers: dict[str, str] + """ + + _validation = { + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'customHeaders', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(CallbackConfig, self).__init__(**kwargs) + self.service_uri = kwargs['service_uri'] + self.custom_headers = kwargs.get('custom_headers', None) + + +class ProxyResource(msrest.serialization.Model): + """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class ConnectedRegistry(ProxyResource): + """An object that represents a connected registry for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :ivar provisioning_state: Provisioning state of the resource. Possible values include: + "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :param mode: The mode of the connected registry resource that indicates the permissions of the + registry. Possible values include: "ReadWrite", "ReadOnly", "Registry", "Mirror". + :type mode: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistryMode + :ivar version: The current version of ACR runtime on the connected registry. + :vartype version: str + :ivar connection_state: The current connection state of the connected registry. Possible values + include: "Online", "Offline", "Syncing", "Unhealthy". + :vartype connection_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectionState + :ivar last_activity_time: The last activity time of the connected registry. + :vartype last_activity_time: ~datetime.datetime + :ivar activation: The activation properties of the connected registry. + :vartype activation: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ActivationProperties + :param parent: The parent of the connected registry. + :type parent: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ParentProperties + :param client_token_ids: The list of the ACR token resource IDs used to authenticate clients to + the connected registry. + :type client_token_ids: list[str] + :param login_server: The login server properties of the connected registry. + :type login_server: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.LoginServerProperties + :param logging: The logging properties of the connected registry. + :type logging: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.LoggingProperties + :ivar status_details: The list of current statuses of the connected registry. + :vartype status_details: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.StatusDetailProperties] + :param notifications_list: The list of notifications subscription information for the connected + registry. + :type notifications_list: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'version': {'readonly': True}, + 'connection_state': {'readonly': True}, + 'last_activity_time': {'readonly': True}, + 'activation': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'connection_state': {'key': 'properties.connectionState', 'type': 'str'}, + 'last_activity_time': {'key': 'properties.lastActivityTime', 'type': 'iso-8601'}, + 'activation': {'key': 'properties.activation', 'type': 'ActivationProperties'}, + 'parent': {'key': 'properties.parent', 'type': 'ParentProperties'}, + 'client_token_ids': {'key': 'properties.clientTokenIds', 'type': '[str]'}, + 'login_server': {'key': 'properties.loginServer', 'type': 'LoginServerProperties'}, + 'logging': {'key': 'properties.logging', 'type': 'LoggingProperties'}, + 'status_details': {'key': 'properties.statusDetails', 'type': '[StatusDetailProperties]'}, + 'notifications_list': {'key': 'properties.notificationsList', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectedRegistry, self).__init__(**kwargs) + self.provisioning_state = None + self.mode = kwargs.get('mode', None) + self.version = None + self.connection_state = None + self.last_activity_time = None + self.activation = None + self.parent = kwargs.get('parent', None) + self.client_token_ids = kwargs.get('client_token_ids', None) + self.login_server = kwargs.get('login_server', None) + self.logging = kwargs.get('logging', None) + self.status_details = None + self.notifications_list = kwargs.get('notifications_list', None) + + +class ConnectedRegistryListResult(msrest.serialization.Model): + """The result of a request to list connected registries for a container registry. + + :param value: The list of connected registries. Since this list may be incomplete, the nextLink + field should be used to request the next list of connected registries. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry] + :param next_link: The URI that can be used to request the next list of connected registries. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectedRegistry]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectedRegistryListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ConnectedRegistryUpdateParameters(msrest.serialization.Model): + """The parameters for updating a connected registry. + + :param sync_properties: The sync properties of the connected registry with its parent. + :type sync_properties: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SyncUpdateProperties + :param logging: The logging properties of the connected registry. + :type logging: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.LoggingProperties + :param client_token_ids: The list of the ACR token resource IDs used to authenticate clients to + the connected registry. + :type client_token_ids: list[str] + :param notifications_list: The list of notifications subscription information for the connected + registry. + :type notifications_list: list[str] + """ + + _attribute_map = { + 'sync_properties': {'key': 'properties.syncProperties', 'type': 'SyncUpdateProperties'}, + 'logging': {'key': 'properties.logging', 'type': 'LoggingProperties'}, + 'client_token_ids': {'key': 'properties.clientTokenIds', 'type': '[str]'}, + 'notifications_list': {'key': 'properties.notificationsList', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectedRegistryUpdateParameters, self).__init__(**kwargs) + self.sync_properties = kwargs.get('sync_properties', None) + self.logging = kwargs.get('logging', None) + self.client_token_ids = kwargs.get('client_token_ids', None) + self.notifications_list = kwargs.get('notifications_list', None) + + +class EncryptionProperty(msrest.serialization.Model): + """EncryptionProperty. + + :param status: Indicates whether or not the encryption is enabled for container registry. + Possible values include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EncryptionStatus + :param key_vault_properties: Key vault properties. + :type key_vault_properties: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.KeyVaultProperties + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(EncryptionProperty, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + + +class ErrorResponse(msrest.serialization.Model): + """An error response from the Azure Container Registry service. + + :param error: Azure container registry build API error body. + :type error: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ErrorResponseBody(msrest.serialization.Model): + """An error response from the Azure Container Registry service. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code. + :type code: str + :param message: Required. error message. + :type message: str + :param target: target of the particular error. + :type target: str + :param details: an array of additional nested error response info objects, as described by this + contract. + :type details: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.InnerErrorDescription + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'InnerErrorDescription'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class EventInfo(msrest.serialization.Model): + """The basic information of an event. + + :param id: The event ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EventInfo, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class Event(EventInfo): + """The event for a webhook. + + :param id: The event ID. + :type id: str + :param event_request_message: The event request message sent to the service URI. + :type event_request_message: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventRequestMessage + :param event_response_message: The event response message received from the service URI. + :type event_response_message: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventResponseMessage + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'event_request_message': {'key': 'eventRequestMessage', 'type': 'EventRequestMessage'}, + 'event_response_message': {'key': 'eventResponseMessage', 'type': 'EventResponseMessage'}, + } + + def __init__( + self, + **kwargs + ): + super(Event, self).__init__(**kwargs) + self.event_request_message = kwargs.get('event_request_message', None) + self.event_response_message = kwargs.get('event_response_message', None) + + +class EventContent(msrest.serialization.Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Target + :param request: The request that generated the event. + :type request: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Request + :param actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :type actor: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Actor + :param source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :type source: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Source + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'Target'}, + 'request': {'key': 'request', 'type': 'Request'}, + 'actor': {'key': 'actor', 'type': 'Actor'}, + 'source': {'key': 'source', 'type': 'Source'}, + } + + def __init__( + self, + **kwargs + ): + super(EventContent, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.timestamp = kwargs.get('timestamp', None) + self.action = kwargs.get('action', None) + self.target = kwargs.get('target', None) + self.request = kwargs.get('request', None) + self.actor = kwargs.get('actor', None) + self.source = kwargs.get('source', None) + + +class EventListResult(msrest.serialization.Model): + """The result of a request to list events for a webhook. + + :param value: The list of events. Since this list may be incomplete, the nextLink field should + be used to request the next list of events. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Event] + :param next_link: The URI that can be used to request the next list of events. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Event]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EventListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class EventRequestMessage(msrest.serialization.Model): + """The event request message sent to the service URI. + + :param content: The content of the event request message. + :type content: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventContent + :param headers: The headers of the event request message. + :type headers: dict[str, str] + :param method: The HTTP method used to send the event request message. + :type method: str + :param request_uri: The URI used to send the event request message. + :type request_uri: str + :param version: The HTTP message version. + :type version: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'EventContent'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + 'method': {'key': 'method', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EventRequestMessage, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + self.headers = kwargs.get('headers', None) + self.method = kwargs.get('method', None) + self.request_uri = kwargs.get('request_uri', None) + self.version = kwargs.get('version', None) + + +class EventResponseMessage(msrest.serialization.Model): + """The event response message received from the service URI. + + :param content: The content of the event response message. + :type content: str + :param headers: The headers of the event response message. + :type headers: dict[str, str] + :param reason_phrase: The reason phrase of the event response message. + :type reason_phrase: str + :param status_code: The status code of the event response message. + :type status_code: str + :param version: The HTTP message version. + :type version: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + 'reason_phrase': {'key': 'reasonPhrase', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EventResponseMessage, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + self.headers = kwargs.get('headers', None) + self.reason_phrase = kwargs.get('reason_phrase', None) + self.status_code = kwargs.get('status_code', None) + self.version = kwargs.get('version', None) + + +class ExportPipeline(ProxyResource): + """An object that represents an export pipeline for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param location: The location of the export pipeline. + :type location: str + :param identity: The identity of the export pipeline. + :type identity: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.IdentityProperties + :param target: The target properties of the export pipeline. + :type target: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipelineTargetProperties + :param options: The list of all options configured for the pipeline. + :type options: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineOptions] + :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was + called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", + "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + 'target': {'key': 'properties.target', 'type': 'ExportPipelineTargetProperties'}, + 'options': {'key': 'properties.options', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportPipeline, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.identity = kwargs.get('identity', None) + self.target = kwargs.get('target', None) + self.options = kwargs.get('options', None) + self.provisioning_state = None + + +class ExportPipelineListResult(msrest.serialization.Model): + """The result of a request to list export pipelines for a container registry. + + :param value: The list of export pipelines. Since this list may be incomplete, the nextLink + field should be used to request the next list of export pipelines. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipeline] + :param next_link: The URI that can be used to request the next list of pipeline runs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExportPipeline]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportPipelineListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExportPipelineTargetProperties(msrest.serialization.Model): + """The properties of the export pipeline target. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of target for the export pipeline. + :type type: str + :param uri: The target uri of the export pipeline. + When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + :type uri: str + :param key_vault_uri: Required. They key vault secret uri to obtain the target storage SAS + token. + :type key_vault_uri: str + """ + + _validation = { + 'key_vault_uri': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportPipelineTargetProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.uri = kwargs.get('uri', None) + self.key_vault_uri = kwargs['key_vault_uri'] + + +class ExportPolicy(msrest.serialization.Model): + """The export policy for a container registry. + + :param status: The value that indicates whether the policy is enabled or not. Possible values + include: "enabled", "disabled". Default value: "enabled". + :type status: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPolicyStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportPolicy, self).__init__(**kwargs) + self.status = kwargs.get('status', "enabled") + + +class GenerateCredentialsParameters(msrest.serialization.Model): + """The parameters used to generate credentials for a specified token or user of a container registry. + + :param token_id: The resource ID of the token for which credentials have to be generated. + :type token_id: str + :param expiry: The expiry date of the generated credentials after which the credentials become + invalid. + :type expiry: ~datetime.datetime + :param name: Specifies name of the password which should be regenerated if any -- password1 or + password2. Possible values include: "password1", "password2". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenPasswordName + """ + + _attribute_map = { + 'token_id': {'key': 'tokenId', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GenerateCredentialsParameters, self).__init__(**kwargs) + self.token_id = kwargs.get('token_id', None) + self.expiry = kwargs.get('expiry', None) + self.name = kwargs.get('name', None) + + +class GenerateCredentialsResult(msrest.serialization.Model): + """The response from the GenerateCredentials operation. + + :param username: The username for a container registry. + :type username: str + :param passwords: The list of passwords for a container registry. + :type passwords: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenPassword] + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[TokenPassword]'}, + } + + def __init__( + self, + **kwargs + ): + super(GenerateCredentialsResult, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.passwords = kwargs.get('passwords', None) + + +class IdentityProperties(msrest.serialization.Model): + """Managed identity for the resource. + + :param principal_id: The principal ID of resource identity. + :type principal_id: str + :param tenant_id: The tenant ID of resource. + :type tenant_id: str + :param type: The identity type. Possible values include: "SystemAssigned", "UserAssigned", + "SystemAssigned, UserAssigned", "None". + :type type: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated with the resource. The + user identity + dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.UserIdentityProperties] + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentityProperties}'}, + } + + def __init__( + self, + **kwargs + ): + super(IdentityProperties, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.tenant_id = kwargs.get('tenant_id', None) + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class ImportImageParameters(msrest.serialization.Model): + """ImportImageParameters. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The source of the image. + :type source: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportSource + :param target_tags: List of strings of the form repo[:tag]. When tag is omitted the source will + be used (or 'latest' if source tag is also omitted). + :type target_tags: list[str] + :param untagged_target_repositories: List of strings of repository names to do a manifest only + copy. No tag will be created. + :type untagged_target_repositories: list[str] + :param mode: When Force, any existing target tags will be overwritten. When NoForce, any + existing target tags will fail the operation before any copying begins. Possible values + include: "NoForce", "Force". Default value: "NoForce". + :type mode: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportMode + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ImportSource'}, + 'target_tags': {'key': 'targetTags', 'type': '[str]'}, + 'untagged_target_repositories': {'key': 'untaggedTargetRepositories', 'type': '[str]'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImportImageParameters, self).__init__(**kwargs) + self.source = kwargs['source'] + self.target_tags = kwargs.get('target_tags', None) + self.untagged_target_repositories = kwargs.get('untagged_target_repositories', None) + self.mode = kwargs.get('mode', "NoForce") + + +class ImportPipeline(ProxyResource): + """An object that represents an import pipeline for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param location: The location of the import pipeline. + :type location: str + :param identity: The identity of the import pipeline. + :type identity: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.IdentityProperties + :param source: The source properties of the import pipeline. + :type source: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipelineSourceProperties + :param trigger: The properties that describe the trigger of the import pipeline. + :type trigger: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineTriggerProperties + :param options: The list of all options configured for the pipeline. + :type options: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineOptions] + :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was + called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", + "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + 'source': {'key': 'properties.source', 'type': 'ImportPipelineSourceProperties'}, + 'trigger': {'key': 'properties.trigger', 'type': 'PipelineTriggerProperties'}, + 'options': {'key': 'properties.options', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImportPipeline, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.identity = kwargs.get('identity', None) + self.source = kwargs.get('source', None) + self.trigger = kwargs.get('trigger', None) + self.options = kwargs.get('options', None) + self.provisioning_state = None + + +class ImportPipelineListResult(msrest.serialization.Model): + """The result of a request to list import pipelines for a container registry. + + :param value: The list of import pipelines. Since this list may be incomplete, the nextLink + field should be used to request the next list of import pipelines. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipeline] + :param next_link: The URI that can be used to request the next list of pipeline runs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ImportPipeline]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImportPipelineListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ImportPipelineSourceProperties(msrest.serialization.Model): + """The properties of the import pipeline source. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of source for the import pipeline. Possible values include: + "AzureStorageBlobContainer". Default value: "AzureStorageBlobContainer". + :type type: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineSourceType + :param uri: The source uri of the import pipeline. + When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + :type uri: str + :param key_vault_uri: Required. They key vault secret uri to obtain the source storage SAS + token. + :type key_vault_uri: str + """ + + _validation = { + 'key_vault_uri': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImportPipelineSourceProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', "AzureStorageBlobContainer") + self.uri = kwargs.get('uri', None) + self.key_vault_uri = kwargs['key_vault_uri'] + + +class ImportSource(msrest.serialization.Model): + """ImportSource. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: The resource identifier of the source Azure Container Registry. + :type resource_id: str + :param registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com'). + :type registry_uri: str + :param credentials: Credentials used when importing from a registry uri. + :type credentials: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportSourceCredentials + :param source_image: Required. Repository name of the source image. + Specify an image by repository ('hello-world'). This will use the 'latest' tag. + Specify an image by tag ('hello-world:latest'). + Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + :type source_image: str + """ + + _validation = { + 'source_image': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'registry_uri': {'key': 'registryUri', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'ImportSourceCredentials'}, + 'source_image': {'key': 'sourceImage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImportSource, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.registry_uri = kwargs.get('registry_uri', None) + self.credentials = kwargs.get('credentials', None) + self.source_image = kwargs['source_image'] + + +class ImportSourceCredentials(msrest.serialization.Model): + """ImportSourceCredentials. + + All required parameters must be populated in order to send to Azure. + + :param username: The username to authenticate with the source registry. + :type username: str + :param password: Required. The password used to authenticate with the source registry. + :type password: str + """ + + _validation = { + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImportSourceCredentials, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs['password'] + + +class InnerErrorDescription(msrest.serialization.Model): + """inner error. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code. + :type code: str + :param message: Required. error message. + :type message: str + :param target: target of the particular error. + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(InnerErrorDescription, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.target = kwargs.get('target', None) + + +class IPRule(msrest.serialization.Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of IP ACL rule. Possible values include: "Allow". + :type action: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Action + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR format. Only IPV4 + address is allowed. + :type ip_address_or_range: str + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IPRule, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.ip_address_or_range = kwargs['ip_address_or_range'] + + +class KeyVaultProperties(msrest.serialization.Model): + """KeyVaultProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param key_identifier: Key vault uri to access the encryption key. + :type key_identifier: str + :ivar versioned_key_identifier: The fully qualified key identifier that includes the version of + the key that is actually used for encryption. + :vartype versioned_key_identifier: str + :param identity: The client id of the identity which will be used to access key vault. + :type identity: str + :ivar key_rotation_enabled: Auto key rotation status for a CMK enabled registry. + :vartype key_rotation_enabled: bool + :ivar last_key_rotation_timestamp: Timestamp of the last successful key rotation. + :vartype last_key_rotation_timestamp: ~datetime.datetime + """ + + _validation = { + 'versioned_key_identifier': {'readonly': True}, + 'key_rotation_enabled': {'readonly': True}, + 'last_key_rotation_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + 'versioned_key_identifier': {'key': 'versionedKeyIdentifier', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'key_rotation_enabled': {'key': 'keyRotationEnabled', 'type': 'bool'}, + 'last_key_rotation_timestamp': {'key': 'lastKeyRotationTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_identifier = kwargs.get('key_identifier', None) + self.versioned_key_identifier = None + self.identity = kwargs.get('identity', None) + self.key_rotation_enabled = None + self.last_key_rotation_timestamp = None + + +class LoggingProperties(msrest.serialization.Model): + """The logging properties of the connected registry. + + :param log_level: The verbosity of logs persisted on the connected registry. Possible values + include: "Debug", "Information", "Warning", "Error", "None". Default value: "Information". + :type log_level: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.LogLevel + :param audit_log_status: Indicates whether audit logs are enabled on the connected registry. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type audit_log_status: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.AuditLogStatus + """ + + _attribute_map = { + 'log_level': {'key': 'logLevel', 'type': 'str'}, + 'audit_log_status': {'key': 'auditLogStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoggingProperties, self).__init__(**kwargs) + self.log_level = kwargs.get('log_level', "Information") + self.audit_log_status = kwargs.get('audit_log_status', "Disabled") + + +class LoginServerProperties(msrest.serialization.Model): + """The login server properties of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar host: The host of the connected registry. Can be FQDN or IP. + :vartype host: str + :ivar tls: The TLS properties of the connected registry login server. + :vartype tls: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TlsProperties + """ + + _validation = { + 'host': {'readonly': True}, + 'tls': {'readonly': True}, + } + + _attribute_map = { + 'host': {'key': 'host', 'type': 'str'}, + 'tls': {'key': 'tls', 'type': 'TlsProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(LoginServerProperties, self).__init__(**kwargs) + self.host = None + self.tls = None + + +class NetworkRuleSet(msrest.serialization.Model): + """The network rule set for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param default_action: Required. The default action of allow or deny when no other rules match. + Possible values include: "Allow", "Deny". Default value: "Allow". + :type default_action: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.DefaultAction + :param virtual_network_rules: The virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.VirtualNetworkRule] + :param ip_rules: The IP ACL rules. + :type ip_rules: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.IPRule] + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = kwargs.get('default_action', "Allow") + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.ip_rules = kwargs.get('ip_rules', None) + + +class OperationDefinition(msrest.serialization.Model): + """The definition of a container registry operation. + + :param origin: The origin information of the container registry operation. + :type origin: str + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The display information for the container registry operation. + :type display: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationDisplayDefinition + :param is_data_action: This property indicates if the operation is an action or a data action + ref: + https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. + :type is_data_action: bool + :param service_specification: The definition of Azure Monitoring service. + :type service_specification: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationServiceSpecificationDefinition + """ + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayDefinition'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecificationDefinition'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDefinition, self).__init__(**kwargs) + self.origin = kwargs.get('origin', None) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplayDefinition(msrest.serialization.Model): + """The display information for a container registry operation. + + :param provider: The resource provider name: Microsoft.ContainerRegistry. + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation that users can perform. + :type operation: str + :param description: The description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplayDefinition, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationListResult(msrest.serialization.Model): + """The result of a request to list container registry operations. + + :param value: The list of container registry operations. Since this list may be incomplete, the + nextLink field should be used to request the next list of operations. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationDefinition] + :param next_link: The URI that can be used to request the next list of container registry + operations. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class OperationLogSpecificationDefinition(msrest.serialization.Model): + """The definition of Azure Monitoring log. + + :param name: Log name. + :type name: str + :param display_name: Log display name. + :type display_name: str + :param blob_duration: Log blob duration. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationLogSpecificationDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class OperationMetricSpecificationDefinition(msrest.serialization.Model): + """The definition of Azure Monitoring metric. + + :param name: Metric name. + :type name: str + :param display_name: Metric display name. + :type display_name: str + :param display_description: Metric description. + :type display_description: str + :param unit: Metric unit. + :type unit: str + :param aggregation_type: Metric aggregation type. + :type aggregation_type: str + :param internal_metric_name: Internal metric name. + :type internal_metric_name: str + """ + + _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'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationMetricSpecificationDefinition, 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.internal_metric_name = kwargs.get('internal_metric_name', None) + + +class OperationServiceSpecificationDefinition(msrest.serialization.Model): + """The definition of Azure Monitoring list. + + :param metric_specifications: A list of Azure Monitoring metrics definition. + :type metric_specifications: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationMetricSpecificationDefinition] + :param log_specifications: A list of Azure Monitoring log definitions. + :type log_specifications: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationLogSpecificationDefinition] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationServiceSpecificationDefinition, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + self.log_specifications = kwargs.get('log_specifications', None) + + +class ParentProperties(msrest.serialization.Model): + """The properties of the connected registry parent. + + All required parameters must be populated in order to send to Azure. + + :param id: The resource ID of the parent to which the connected registry will be associated. + :type id: str + :param sync_properties: Required. The sync properties of the connected registry with its + parent. + :type sync_properties: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SyncProperties + """ + + _validation = { + 'sync_properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'sync_properties': {'key': 'syncProperties', 'type': 'SyncProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(ParentProperties, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.sync_properties = kwargs['sync_properties'] + + +class PipelineRun(ProxyResource): + """An object that represents a pipeline run for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :ivar provisioning_state: The provisioning state of a pipeline run. Possible values include: + "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :param request: The request parameters for a pipeline run. + :type request: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunRequest + :ivar response: The response of a pipeline run. + :vartype response: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunResponse + :param force_update_tag: How the pipeline run should be forced to recreate even if the pipeline + run configuration has not changed. + :type force_update_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'response': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'request': {'key': 'properties.request', 'type': 'PipelineRunRequest'}, + 'response': {'key': 'properties.response', 'type': 'PipelineRunResponse'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineRun, self).__init__(**kwargs) + self.provisioning_state = None + self.request = kwargs.get('request', None) + self.response = None + self.force_update_tag = kwargs.get('force_update_tag', None) + + +class PipelineRunListResult(msrest.serialization.Model): + """The result of a request to list pipeline runs for a container registry. + + :param value: The list of pipeline runs. Since this list may be incomplete, the nextLink field + should be used to request the next list of pipeline runs. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRun] + :param next_link: The URI that can be used to request the next list of pipeline runs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PipelineRun]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineRunListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PipelineRunRequest(msrest.serialization.Model): + """The request properties provided for a pipeline run. + + :param pipeline_resource_id: The resource ID of the pipeline to run. + :type pipeline_resource_id: str + :param artifacts: List of source artifacts to be transferred by the pipeline. + Specify an image by repository ('hello-world'). This will use the 'latest' tag. + Specify an image by tag ('hello-world:latest'). + Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + :type artifacts: list[str] + :param source: The source properties of the pipeline run. + :type source: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunSourceProperties + :param target: The target properties of the pipeline run. + :type target: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunTargetProperties + :param catalog_digest: The digest of the tar used to transfer the artifacts. + :type catalog_digest: str + """ + + _attribute_map = { + 'pipeline_resource_id': {'key': 'pipelineResourceId', 'type': 'str'}, + 'artifacts': {'key': 'artifacts', 'type': '[str]'}, + 'source': {'key': 'source', 'type': 'PipelineRunSourceProperties'}, + 'target': {'key': 'target', 'type': 'PipelineRunTargetProperties'}, + 'catalog_digest': {'key': 'catalogDigest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineRunRequest, self).__init__(**kwargs) + self.pipeline_resource_id = kwargs.get('pipeline_resource_id', None) + self.artifacts = kwargs.get('artifacts', None) + self.source = kwargs.get('source', None) + self.target = kwargs.get('target', None) + self.catalog_digest = kwargs.get('catalog_digest', None) + + +class PipelineRunResponse(msrest.serialization.Model): + """The response properties returned for a pipeline run. + + :param status: The current status of the pipeline run. + :type status: str + :param imported_artifacts: The artifacts imported in the pipeline run. + :type imported_artifacts: list[str] + :param progress: The current progress of the copy operation. + :type progress: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProgressProperties + :param start_time: The time the pipeline run started. + :type start_time: ~datetime.datetime + :param finish_time: The time the pipeline run finished. + :type finish_time: ~datetime.datetime + :param source: The source of the pipeline run. + :type source: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipelineSourceProperties + :param target: The target of the pipeline run. + :type target: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipelineTargetProperties + :param catalog_digest: The digest of the tar used to transfer the artifacts. + :type catalog_digest: str + :param trigger: The trigger that caused the pipeline run. + :type trigger: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineTriggerDescriptor + :param pipeline_run_error_message: The detailed error message for the pipeline run in the case + of failure. + :type pipeline_run_error_message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'imported_artifacts': {'key': 'importedArtifacts', 'type': '[str]'}, + 'progress': {'key': 'progress', 'type': 'ProgressProperties'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'source': {'key': 'source', 'type': 'ImportPipelineSourceProperties'}, + 'target': {'key': 'target', 'type': 'ExportPipelineTargetProperties'}, + 'catalog_digest': {'key': 'catalogDigest', 'type': 'str'}, + 'trigger': {'key': 'trigger', 'type': 'PipelineTriggerDescriptor'}, + 'pipeline_run_error_message': {'key': 'pipelineRunErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineRunResponse, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.imported_artifacts = kwargs.get('imported_artifacts', None) + self.progress = kwargs.get('progress', None) + self.start_time = kwargs.get('start_time', None) + self.finish_time = kwargs.get('finish_time', None) + self.source = kwargs.get('source', None) + self.target = kwargs.get('target', None) + self.catalog_digest = kwargs.get('catalog_digest', None) + self.trigger = kwargs.get('trigger', None) + self.pipeline_run_error_message = kwargs.get('pipeline_run_error_message', None) + + +class PipelineRunSourceProperties(msrest.serialization.Model): + """PipelineRunSourceProperties. + + :param type: The type of the source. Possible values include: "AzureStorageBlob". Default + value: "AzureStorageBlob". + :type type: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunSourceType + :param name: The name of the source. + :type name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineRunSourceProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', "AzureStorageBlob") + self.name = kwargs.get('name', None) + + +class PipelineRunTargetProperties(msrest.serialization.Model): + """PipelineRunTargetProperties. + + :param type: The type of the target. Possible values include: "AzureStorageBlob". Default + value: "AzureStorageBlob". + :type type: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunTargetType + :param name: The name of the target. + :type name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineRunTargetProperties, self).__init__(**kwargs) + self.type = kwargs.get('type', "AzureStorageBlob") + self.name = kwargs.get('name', None) + + +class PipelineSourceTriggerDescriptor(msrest.serialization.Model): + """PipelineSourceTriggerDescriptor. + + :param timestamp: The timestamp when the source update happened. + :type timestamp: ~datetime.datetime + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineSourceTriggerDescriptor, self).__init__(**kwargs) + self.timestamp = kwargs.get('timestamp', None) + + +class PipelineSourceTriggerProperties(msrest.serialization.Model): + """PipelineSourceTriggerProperties. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. The current status of the source trigger. Possible values include: + "Enabled", "Disabled". Default value: "Enabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TriggerStatus + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineSourceTriggerProperties, self).__init__(**kwargs) + self.status = kwargs.get('status', "Enabled") + + +class PipelineTriggerDescriptor(msrest.serialization.Model): + """PipelineTriggerDescriptor. + + :param source_trigger: The source trigger that caused the pipeline run. + :type source_trigger: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineSourceTriggerDescriptor + """ + + _attribute_map = { + 'source_trigger': {'key': 'sourceTrigger', 'type': 'PipelineSourceTriggerDescriptor'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineTriggerDescriptor, self).__init__(**kwargs) + self.source_trigger = kwargs.get('source_trigger', None) + + +class PipelineTriggerProperties(msrest.serialization.Model): + """PipelineTriggerProperties. + + :param source_trigger: The source trigger properties of the pipeline. + :type source_trigger: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineSourceTriggerProperties + """ + + _attribute_map = { + 'source_trigger': {'key': 'sourceTrigger', 'type': 'PipelineSourceTriggerProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineTriggerProperties, self).__init__(**kwargs) + self.source_trigger = kwargs.get('source_trigger', None) + + +class Policies(msrest.serialization.Model): + """The policies for a container registry. + + :param quarantine_policy: The quarantine policy for a container registry. + :type quarantine_policy: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.QuarantinePolicy + :param trust_policy: The content trust policy for a container registry. + :type trust_policy: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TrustPolicy + :param retention_policy: The retention policy for a container registry. + :type retention_policy: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RetentionPolicy + :param export_policy: The export policy for a container registry. + :type export_policy: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPolicy + """ + + _attribute_map = { + 'quarantine_policy': {'key': 'quarantinePolicy', 'type': 'QuarantinePolicy'}, + 'trust_policy': {'key': 'trustPolicy', 'type': 'TrustPolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'export_policy': {'key': 'exportPolicy', 'type': 'ExportPolicy'}, + } + + def __init__( + self, + **kwargs + ): + super(Policies, self).__init__(**kwargs) + self.quarantine_policy = kwargs.get('quarantine_policy', None) + self.trust_policy = kwargs.get('trust_policy', None) + self.retention_policy = kwargs.get('retention_policy', None) + self.export_policy = kwargs.get('export_policy', None) + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + :param id: This is private endpoint resource created with Microsoft.Network resource provider. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateEndpointConnection(ProxyResource): + """An object that represents a private endpoint connection for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param private_endpoint: The resource of private endpoint. + :type private_endpoint: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of private endpoint connection resource. + Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """The result of a request to list private endpoint connections for a container registry. + + :param value: The list of private endpoint connections. Since this list may be incomplete, the + nextLink field should be used to request the next list of private endpoint connections. + :type value: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection] + :param next_link: The URI that can be used to request the next list of private endpoint + connections. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PrivateLinkResource(msrest.serialization.Model): + """A resource that supports private link capabilities. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The resource type is private link resource. + :vartype type: str + :param id: The resource ID. + :type id: str + :param name: The name of the resource. + :type name: str + :param group_id: The private link resource group id. + :type group_id: str + :param required_members: The private link resource required member names. + :type required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.type = None + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.group_id = kwargs.get('group_id', None) + self.required_members = kwargs.get('required_members', None) + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """The result of a request to list private link resources for a container registry. + + :param value: The list of private link resources. Since this list may be incomplete, the + nextLink field should be used to request the next list of private link resources. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateLinkResource] + :param next_link: The URI that can be used to request the next list of private link resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """The state of a private link service connection. + + :param status: The private link service connection status. Possible values include: "Approved", + "Pending", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectionStatus + :param description: The description for connection status. For example if connection is + rejected it can indicate reason for rejection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. Possible values include: "None", "Recreate". + :type actions_required: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ActionsRequired + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class ProgressProperties(msrest.serialization.Model): + """ProgressProperties. + + :param percentage: The percentage complete of the copy operation. + :type percentage: str + """ + + _attribute_map = { + 'percentage': {'key': 'percentage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProgressProperties, self).__init__(**kwargs) + self.percentage = kwargs.get('percentage', None) + + +class QuarantinePolicy(msrest.serialization.Model): + """The quarantine policy for a container registry. + + :param status: The value that indicates whether the policy is enabled or not. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PolicyStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QuarantinePolicy, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + + +class RegenerateCredentialParameters(msrest.serialization.Model): + """The parameters used to regenerate the login credential. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Specifies name of the password which should be regenerated -- password + or password2. Possible values include: "password", "password2". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PasswordName + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegenerateCredentialParameters, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class Resource(msrest.serialization.Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be changed after the + resource is created. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.system_data = None + + +class Registry(Resource): + """An object that represents a container registry. + + 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. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be changed after the + resource is created. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param sku: Required. The SKU of the container registry. + :type sku: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Sku + :param identity: The identity of the container registry. + :type identity: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.IdentityProperties + :ivar login_server: The URL that can be used to log into the container registry. + :vartype login_server: str + :ivar creation_date: The creation date of the container registry in ISO8601 format. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: The provisioning state of the container registry at the time the + operation was called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", + "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :ivar status: The status of the container registry at the time the operation was called. + :vartype status: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Status + :param admin_user_enabled: The value that indicates whether the admin user is enabled. + :type admin_user_enabled: bool + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.NetworkRuleSet + :param policies: The policies for a container registry. + :type policies: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Policies + :param encryption: The encryption settings of container registry. + :type encryption: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EncryptionProperty + :param data_endpoint_enabled: Enable a single data endpoint per region for serving data. + :type data_endpoint_enabled: bool + :ivar data_endpoint_host_names: List of host names that will serve data when + dataEndpointEnabled is true. + :vartype data_endpoint_host_names: list[str] + :ivar private_endpoint_connections: List of private endpoint connections for a container + registry. + :vartype private_endpoint_connections: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection] + :param public_network_access: Whether or not public network access is allowed for the container + registry. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PublicNetworkAccess + :param network_rule_bypass_options: Whether to allow trusted Azure services to access a network + restricted registry. Possible values include: "AzureServices", "None". + :type network_rule_bypass_options: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.NetworkRuleBypassOptions + :param zone_redundancy: Whether or not zone redundancy is enabled for this container registry. + Possible values include: "Enabled", "Disabled". + :type zone_redundancy: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ZoneRedundancy + :param anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. + :type anonymous_pull_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'sku': {'required': True}, + 'login_server': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'data_endpoint_host_names': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + 'login_server': {'key': 'properties.loginServer', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'policies': {'key': 'properties.policies', 'type': 'Policies'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'}, + 'data_endpoint_host_names': {'key': 'properties.dataEndpointHostNames', 'type': '[str]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, + 'zone_redundancy': {'key': 'properties.zoneRedundancy', 'type': 'str'}, + 'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Registry, self).__init__(**kwargs) + self.sku = kwargs['sku'] + self.identity = kwargs.get('identity', None) + self.login_server = None + self.creation_date = None + self.provisioning_state = None + self.status = None + self.admin_user_enabled = kwargs.get('admin_user_enabled', False) + self.network_rule_set = kwargs.get('network_rule_set', None) + self.policies = kwargs.get('policies', None) + self.encryption = kwargs.get('encryption', None) + self.data_endpoint_enabled = kwargs.get('data_endpoint_enabled', None) + self.data_endpoint_host_names = None + self.private_endpoint_connections = None + self.public_network_access = kwargs.get('public_network_access', None) + self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', None) + self.zone_redundancy = kwargs.get('zone_redundancy', None) + self.anonymous_pull_enabled = kwargs.get('anonymous_pull_enabled', False) + + +class RegistryListCredentialsResult(msrest.serialization.Model): + """The response from the ListCredentials operation. + + :param username: The username for a container registry. + :type username: str + :param passwords: The list of passwords for a container registry. + :type passwords: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryPassword] + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[RegistryPassword]'}, + } + + def __init__( + self, + **kwargs + ): + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.passwords = kwargs.get('passwords', None) + + +class RegistryListResult(msrest.serialization.Model): + """The result of a request to list container registries. + + :param value: The list of container registries. Since this list may be incomplete, the nextLink + field should be used to request the next list of container registries. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry] + :param next_link: The URI that can be used to request the next list of container registries. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Registry]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegistryListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RegistryNameCheckRequest(msrest.serialization.Model): + """A request to check whether a container registry name is available. + + 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 name: Required. The name of the container registry. + :type name: str + :ivar type: The resource type of the container registry. This field must be set to + 'Microsoft.ContainerRegistry/registries'. Has constant value: + "Microsoft.ContainerRegistry/registries". + :vartype type: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': r'^[a-zA-Z0-9]*$'}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.ContainerRegistry/registries" + + def __init__( + self, + **kwargs + ): + super(RegistryNameCheckRequest, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class RegistryNameStatus(msrest.serialization.Model): + """The result of a request to check the availability of a container registry name. + + :param name_available: The value that indicates whether the name is available. + :type name_available: bool + :param reason: If any, the reason that the name is not available. + :type reason: str + :param message: If any, the error message that provides more detail for the reason that the + name is not available. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegistryNameStatus, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class RegistryPassword(msrest.serialization.Model): + """The login password for the container registry. + + :param name: The password name. Possible values include: "password", "password2". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PasswordName + :param value: The password value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegistryPassword, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class RegistryUpdateParameters(msrest.serialization.Model): + """The parameters for updating a container registry. + + :param identity: The identity of the container registry. + :type identity: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.IdentityProperties + :param tags: A set of tags. The tags for the container registry. + :type tags: dict[str, str] + :param sku: The SKU of the container registry. + :type sku: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Sku + :param admin_user_enabled: The value that indicates whether the admin user is enabled. + :type admin_user_enabled: bool + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.NetworkRuleSet + :param policies: The policies for a container registry. + :type policies: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Policies + :param encryption: The encryption settings of container registry. + :type encryption: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EncryptionProperty + :param data_endpoint_enabled: Enable a single data endpoint per region for serving data. + :type data_endpoint_enabled: bool + :param public_network_access: Whether or not public network access is allowed for the container + registry. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PublicNetworkAccess + :param network_rule_bypass_options: Whether to allow trusted Azure services to access a network + restricted registry. Possible values include: "AzureServices", "None". + :type network_rule_bypass_options: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.NetworkRuleBypassOptions + :param anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. + :type anonymous_pull_enabled: bool + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'policies': {'key': 'properties.policies', 'type': 'Policies'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, + 'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(RegistryUpdateParameters, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.tags = kwargs.get('tags', None) + self.sku = kwargs.get('sku', None) + self.admin_user_enabled = kwargs.get('admin_user_enabled', None) + self.network_rule_set = kwargs.get('network_rule_set', None) + self.policies = kwargs.get('policies', None) + self.encryption = kwargs.get('encryption', None) + self.data_endpoint_enabled = kwargs.get('data_endpoint_enabled', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.network_rule_bypass_options = kwargs.get('network_rule_bypass_options', None) + self.anonymous_pull_enabled = kwargs.get('anonymous_pull_enabled', None) + + +class RegistryUsage(msrest.serialization.Model): + """The quota usage for a container registry. + + :param name: The name of the usage. + :type name: str + :param limit: The limit of the usage. + :type limit: long + :param current_value: The current value of the usage. + :type current_value: long + :param unit: The unit of measurement. Possible values include: "Count", "Bytes". + :type unit: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryUsageUnit + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegistryUsage, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.limit = kwargs.get('limit', None) + self.current_value = kwargs.get('current_value', None) + self.unit = kwargs.get('unit', None) + + +class RegistryUsageListResult(msrest.serialization.Model): + """The result of a request to get container registry quota usages. + + :param value: The list of container registry quota usages. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryUsage] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RegistryUsage]'}, + } + + def __init__( + self, + **kwargs + ): + super(RegistryUsageListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class Replication(Resource): + """An object that represents a replication for a container registry. + + 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. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be changed after the + resource is created. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :ivar provisioning_state: The provisioning state of the replication at the time the operation + was called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", + "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :ivar status: The status of the replication at the time the operation was called. + :vartype status: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Status + :param region_endpoint_enabled: Specifies whether the replication's regional endpoint is + enabled. Requests will not be routed to a replication whose regional endpoint is disabled, + however its data will continue to be synced with other replications. + :type region_endpoint_enabled: bool + :param zone_redundancy: Whether or not zone redundancy is enabled for this container registry + replication. Possible values include: "Enabled", "Disabled". + :type zone_redundancy: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ZoneRedundancy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + 'region_endpoint_enabled': {'key': 'properties.regionEndpointEnabled', 'type': 'bool'}, + 'zone_redundancy': {'key': 'properties.zoneRedundancy', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Replication, self).__init__(**kwargs) + self.provisioning_state = None + self.status = None + self.region_endpoint_enabled = kwargs.get('region_endpoint_enabled', True) + self.zone_redundancy = kwargs.get('zone_redundancy', None) + + +class ReplicationListResult(msrest.serialization.Model): + """The result of a request to list replications for a container registry. + + :param value: The list of replications. Since this list may be incomplete, the nextLink field + should be used to request the next list of replications. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication] + :param next_link: The URI that can be used to request the next list of replications. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Replication]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ReplicationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ReplicationUpdateParameters(msrest.serialization.Model): + """The parameters for updating a replication. + + :param tags: A set of tags. The tags for the replication. + :type tags: dict[str, str] + :param region_endpoint_enabled: Specifies whether the replication's regional endpoint is + enabled. Requests will not be routed to a replication whose regional endpoint is disabled, + however its data will continue to be synced with other replications. + :type region_endpoint_enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'region_endpoint_enabled': {'key': 'properties.regionEndpointEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ReplicationUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.region_endpoint_enabled = kwargs.get('region_endpoint_enabled', None) + + +class Request(msrest.serialization.Model): + """The request that generated the event. + + :param id: The ID of the request that initiated the event. + :type id: str + :param addr: The IP or hostname and possibly port of the client connection that initiated the + event. This is the RemoteAddr from the standard http request. + :type addr: str + :param host: The externally accessible hostname of the registry instance, as specified by the + http host header on incoming requests. + :type host: str + :param method: The request method that generated the event. + :type method: str + :param useragent: The user agent header of the request. + :type useragent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'addr': {'key': 'addr', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'useragent': {'key': 'useragent', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Request, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.addr = kwargs.get('addr', None) + self.host = kwargs.get('host', None) + self.method = kwargs.get('method', None) + self.useragent = kwargs.get('useragent', None) + + +class RetentionPolicy(msrest.serialization.Model): + """The retention policy for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param days: The number of days to retain an untagged manifest after which it gets purged. + :type days: int + :ivar last_updated_time: The timestamp when the policy was last updated. + :vartype last_updated_time: ~datetime.datetime + :param status: The value that indicates whether the policy is enabled or not. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PolicyStatus + """ + + _validation = { + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'days': {'key': 'days', 'type': 'int'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RetentionPolicy, self).__init__(**kwargs) + self.days = kwargs.get('days', 7) + self.last_updated_time = None + self.status = kwargs.get('status', None) + + +class ScopeMap(ProxyResource): + """An object that represents a scope map for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param description: The user friendly description of the scope map. + :type description: str + :ivar type_properties_type: The type of the scope map. E.g. BuildIn scope map. + :vartype type_properties_type: str + :ivar creation_date: The creation date of scope map. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the resource. Possible values include: + "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :param actions: The list of scoped permissions for registry artifacts. + E.g. repositories/repository-name/content/read, + repositories/repository-name/metadata/write. + :type actions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'type_properties_type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScopeMap, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.type_properties_type = None + self.creation_date = None + self.provisioning_state = None + self.actions = kwargs.get('actions', None) + + +class ScopeMapListResult(msrest.serialization.Model): + """The result of a request to list scope maps for a container registry. + + :param value: The list of scope maps. Since this list may be incomplete, the nextLink field + should be used to request the next list of scope maps. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap] + :param next_link: The URI that can be used to request the next list of scope maps. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScopeMap]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScopeMapListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ScopeMapUpdateParameters(msrest.serialization.Model): + """The properties for updating the scope map. + + :param description: The user friendly description of the scope map. + :type description: str + :param actions: The list of scope permissions for registry artifacts. + E.g. repositories/repository-name/pull, + repositories/repository-name/delete. + :type actions: list[str] + """ + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScopeMapUpdateParameters, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.actions = kwargs.get('actions', None) + + +class Sku(msrest.serialization.Model): + """The SKU of a container registry. + + 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 name: Required. The SKU name of the container registry. Required for registry creation. + Possible values include: "Classic", "Basic", "Standard", "Premium". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SkuName + :ivar tier: The SKU tier based on the SKU name. Possible values include: "Classic", "Basic", + "Standard", "Premium". + :vartype tier: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.tier = None + + +class Source(msrest.serialization.Model): + """The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. + + :param addr: The IP or hostname and the port of the registry node that generated the event. + Generally, this will be resolved by os.Hostname() along with the running port. + :type addr: str + :param instance_id: The running instance of an application. Changes after each restart. + :type instance_id: str + """ + + _attribute_map = { + 'addr': {'key': 'addr', 'type': 'str'}, + 'instance_id': {'key': 'instanceID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Source, self).__init__(**kwargs) + self.addr = kwargs.get('addr', None) + self.instance_id = kwargs.get('instance_id', None) + + +class Status(msrest.serialization.Model): + """The status of an Azure resource at the time the operation was called. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_status: The short label for the status. + :vartype display_status: str + :ivar message: The detailed message for the status, including alerts and error messages. + :vartype message: str + :ivar timestamp: The timestamp when the status was changed to the current value. + :vartype timestamp: ~datetime.datetime + """ + + _validation = { + 'display_status': {'readonly': True}, + 'message': {'readonly': True}, + 'timestamp': {'readonly': True}, + } + + _attribute_map = { + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(Status, self).__init__(**kwargs) + self.display_status = None + self.message = None + self.timestamp = None + + +class StatusDetailProperties(msrest.serialization.Model): + """The status detail properties of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The component of the connected registry corresponding to the status. + :vartype type: str + :ivar code: The code of the status. + :vartype code: str + :ivar description: The description of the status. + :vartype description: str + :ivar timestamp: The timestamp of the status. + :vartype timestamp: ~datetime.datetime + :ivar correlation_id: The correlation ID of the status. + :vartype correlation_id: str + """ + + _validation = { + 'type': {'readonly': True}, + 'code': {'readonly': True}, + 'description': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'correlation_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StatusDetailProperties, self).__init__(**kwargs) + self.type = None + self.code = None + self.description = None + self.timestamp = None + self.correlation_id = None + + +class SyncProperties(msrest.serialization.Model): + """The sync properties of the connected registry with its parent. + + 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 token_id: Required. The resource ID of the ACR token used to authenticate the connected + registry to its parent during sync. + :type token_id: str + :param schedule: The cron expression indicating the schedule that the connected registry will + sync with its parent. + :type schedule: str + :param sync_window: The time window during which sync is enabled for each schedule occurrence. + Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :type sync_window: ~datetime.timedelta + :param message_ttl: Required. The period of time for which a message is available to sync + before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per + ISO8601. + :type message_ttl: ~datetime.timedelta + :ivar last_sync_time: The last time a sync occurred between the connected registry and its + parent. + :vartype last_sync_time: ~datetime.datetime + :ivar gateway_endpoint: The gateway endpoint used by the connected registry to communicate with + its parent. + :vartype gateway_endpoint: str + """ + + _validation = { + 'token_id': {'required': True}, + 'message_ttl': {'required': True}, + 'last_sync_time': {'readonly': True}, + 'gateway_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'token_id': {'key': 'tokenId', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'sync_window': {'key': 'syncWindow', 'type': 'duration'}, + 'message_ttl': {'key': 'messageTtl', 'type': 'duration'}, + 'last_sync_time': {'key': 'lastSyncTime', 'type': 'iso-8601'}, + 'gateway_endpoint': {'key': 'gatewayEndpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SyncProperties, self).__init__(**kwargs) + self.token_id = kwargs['token_id'] + self.schedule = kwargs.get('schedule', None) + self.sync_window = kwargs.get('sync_window', None) + self.message_ttl = kwargs['message_ttl'] + self.last_sync_time = None + self.gateway_endpoint = None + + +class SyncUpdateProperties(msrest.serialization.Model): + """The parameters for updating the sync properties of the connected registry with its parent. + + :param schedule: The cron expression indicating the schedule that the connected registry will + sync with its parent. + :type schedule: str + :param sync_window: The time window during which sync is enabled for each schedule occurrence. + Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :type sync_window: ~datetime.timedelta + :param message_ttl: The period of time for which a message is available to sync before it is + expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :type message_ttl: ~datetime.timedelta + """ + + _attribute_map = { + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'sync_window': {'key': 'syncWindow', 'type': 'duration'}, + 'message_ttl': {'key': 'messageTtl', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + super(SyncUpdateProperties, self).__init__(**kwargs) + self.schedule = kwargs.get('schedule', None) + self.sync_window = kwargs.get('sync_window', None) + self.message_ttl = kwargs.get('message_ttl', None) + + +class SystemData(msrest.serialization.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.containerregistry.v2021_08_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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.containerregistry.v2021_08_01_preview.models.LastModifiedByType + :param last_modified_at: The timestamp of resource modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 Target(msrest.serialization.Model): + """The target of the event. + + :param media_type: The MIME type of the referenced object. + :type media_type: str + :param size: The number of bytes of the content. Same as Length field. + :type size: long + :param digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. + :type digest: str + :param length: The number of bytes of the content. Same as Size field. + :type length: long + :param repository: The repository name. + :type repository: str + :param url: The direct URL to the content. + :type url: str + :param tag: The tag name. + :type tag: str + :param name: The name of the artifact. + :type name: str + :param version: The version of the artifact. + :type version: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'length': {'key': 'length', 'type': 'long'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Target, self).__init__(**kwargs) + self.media_type = kwargs.get('media_type', None) + self.size = kwargs.get('size', None) + self.digest = kwargs.get('digest', None) + self.length = kwargs.get('length', None) + self.repository = kwargs.get('repository', None) + self.url = kwargs.get('url', None) + self.tag = kwargs.get('tag', None) + self.name = kwargs.get('name', None) + self.version = kwargs.get('version', None) + + +class TlsCertificateProperties(msrest.serialization.Model): + """The TLS certificate properties of the connected registry login server. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of certificate location. Possible values include: "LocalDirectory". + :vartype type: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.CertificateType + :ivar location: Indicates the location of the certificates. + :vartype location: str + """ + + _validation = { + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TlsCertificateProperties, self).__init__(**kwargs) + self.type = None + self.location = None + + +class TlsProperties(msrest.serialization.Model): + """The TLS properties of the connected registry login server. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Indicates whether HTTPS is enabled for the login server. Possible values include: + "Enabled", "Disabled". + :vartype status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TlsStatus + :ivar certificate: The certificate used to configure HTTPS for the login server. + :vartype certificate: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TlsCertificateProperties + """ + + _validation = { + 'status': {'readonly': True}, + 'certificate': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'TlsCertificateProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(TlsProperties, self).__init__(**kwargs) + self.status = None + self.certificate = None + + +class Token(ProxyResource): + """An object that represents a token for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :ivar creation_date: The creation date of scope map. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the resource. Possible values include: + "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :param scope_map_id: The resource ID of the scope map to which the token will be associated + with. + :type scope_map_id: str + :param credentials: The credentials that can be used for authenticating the token. + :type credentials: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenCredentialsProperties + :param status: The status of the token example enabled or disabled. Possible values include: + "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'scope_map_id': {'key': 'properties.scopeMapId', 'type': 'str'}, + 'credentials': {'key': 'properties.credentials', 'type': 'TokenCredentialsProperties'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Token, self).__init__(**kwargs) + self.creation_date = None + self.provisioning_state = None + self.scope_map_id = kwargs.get('scope_map_id', None) + self.credentials = kwargs.get('credentials', None) + self.status = kwargs.get('status', None) + + +class TokenCertificate(msrest.serialization.Model): + """The properties of a certificate used for authenticating a token. + + :param name: Possible values include: "certificate1", "certificate2". + :type name: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenCertificateName + :param expiry: The expiry datetime of the certificate. + :type expiry: ~datetime.datetime + :param thumbprint: The thumbprint of the certificate. + :type thumbprint: str + :param encoded_pem_certificate: Base 64 encoded string of the public certificate1 in PEM format + that will be used for authenticating the token. + :type encoded_pem_certificate: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'encoded_pem_certificate': {'key': 'encodedPemCertificate', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TokenCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.expiry = kwargs.get('expiry', None) + self.thumbprint = kwargs.get('thumbprint', None) + self.encoded_pem_certificate = kwargs.get('encoded_pem_certificate', None) + + +class TokenCredentialsProperties(msrest.serialization.Model): + """The properties of the credentials that can be used for authenticating the token. + + :param certificates: + :type certificates: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenCertificate] + :param passwords: + :type passwords: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenPassword] + """ + + _attribute_map = { + 'certificates': {'key': 'certificates', 'type': '[TokenCertificate]'}, + 'passwords': {'key': 'passwords', 'type': '[TokenPassword]'}, + } + + def __init__( + self, + **kwargs + ): + super(TokenCredentialsProperties, self).__init__(**kwargs) + self.certificates = kwargs.get('certificates', None) + self.passwords = kwargs.get('passwords', None) + + +class TokenListResult(msrest.serialization.Model): + """The result of a request to list tokens for a container registry. + + :param value: The list of tokens. Since this list may be incomplete, the nextLink field should + be used to request the next list of tokens. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token] + :param next_link: The URI that can be used to request the next list of tokens. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Token]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TokenListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class TokenPassword(msrest.serialization.Model): + """The password that will be used for authenticating the token of a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param creation_time: The creation datetime of the password. + :type creation_time: ~datetime.datetime + :param expiry: The expiry datetime of the password. + :type expiry: ~datetime.datetime + :param name: The password name "password1" or "password2". Possible values include: + "password1", "password2". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenPasswordName + :ivar value: The password value. + :vartype value: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TokenPassword, self).__init__(**kwargs) + self.creation_time = kwargs.get('creation_time', None) + self.expiry = kwargs.get('expiry', None) + self.name = kwargs.get('name', None) + self.value = None + + +class TokenUpdateParameters(msrest.serialization.Model): + """The parameters for updating a token. + + :param scope_map_id: The resource ID of the scope map to which the token will be associated + with. + :type scope_map_id: str + :param status: The status of the token example enabled or disabled. Possible values include: + "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenStatus + :param credentials: The credentials that can be used for authenticating the token. + :type credentials: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenCredentialsProperties + """ + + _attribute_map = { + 'scope_map_id': {'key': 'properties.scopeMapId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'credentials': {'key': 'properties.credentials', 'type': 'TokenCredentialsProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(TokenUpdateParameters, self).__init__(**kwargs) + self.scope_map_id = kwargs.get('scope_map_id', None) + self.status = kwargs.get('status', None) + self.credentials = kwargs.get('credentials', None) + + +class TrustPolicy(msrest.serialization.Model): + """The content trust policy for a container registry. + + :param type: The type of trust policy. Possible values include: "Notary". Default value: + "Notary". + :type type: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TrustPolicyType + :param status: The value that indicates whether the policy is enabled or not. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PolicyStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TrustPolicy, self).__init__(**kwargs) + self.type = kwargs.get('type', "Notary") + self.status = kwargs.get('status', None) + + +class UserIdentityProperties(msrest.serialization.Model): + """UserIdentityProperties. + + :param principal_id: The principal id of user assigned identity. + :type principal_id: str + :param client_id: The client id of user assigned identity. + :type client_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserIdentityProperties, self).__init__(**kwargs) + self.principal_id = kwargs.get('principal_id', None) + self.client_id = kwargs.get('client_id', None) + + +class VirtualNetworkRule(msrest.serialization.Model): + """Virtual network rule. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of virtual network rule. Possible values include: "Allow". + :type action: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Action + :param virtual_network_resource_id: Required. Resource ID of a subnet, for example: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type virtual_network_resource_id: str + """ + + _validation = { + 'virtual_network_resource_id': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.action = kwargs.get('action', None) + self.virtual_network_resource_id = kwargs['virtual_network_resource_id'] + + +class Webhook(Resource): + """An object that represents a webhook for a container registry. + + 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. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be changed after the + resource is created. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param status: The status of the webhook at the time the operation was called. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*' + means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + 'foo' is equivalent to 'foo:latest'. Empty means all events. + :type scope: str + :param actions: The list of actions that trigger the webhook to post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookAction] + :ivar provisioning_state: The provisioning state of the webhook at the time the operation was + called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", + "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Webhook, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.scope = kwargs.get('scope', None) + self.actions = kwargs.get('actions', None) + self.provisioning_state = None + + +class WebhookCreateParameters(msrest.serialization.Model): + """The parameters for creating a webhook. + + All required parameters must be populated in order to send to Azure. + + :param tags: A set of tags. The tags for the webhook. + :type tags: dict[str, str] + :param location: Required. The location of the webhook. This cannot be changed after the + resource is created. + :type location: str + :param service_uri: The service URI for the webhook to post notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook notifications. + :type custom_headers: dict[str, str] + :param status: The status of the webhook at the time the operation was called. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*' + means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + 'foo' is equivalent to 'foo:latest'. Empty means all events. + :type scope: str + :param actions: The list of actions that trigger the webhook to post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookAction] + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'service_uri': {'key': 'properties.serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(WebhookCreateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs['location'] + self.service_uri = kwargs.get('service_uri', None) + self.custom_headers = kwargs.get('custom_headers', None) + self.status = kwargs.get('status', None) + self.scope = kwargs.get('scope', None) + self.actions = kwargs.get('actions', None) + + +class WebhookListResult(msrest.serialization.Model): + """The result of a request to list webhooks for a container registry. + + :param value: The list of webhooks. Since this list may be incomplete, the nextLink field + should be used to request the next list of webhooks. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Webhook] + :param next_link: The URI that can be used to request the next list of webhooks. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Webhook]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebhookListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class WebhookUpdateParameters(msrest.serialization.Model): + """The parameters for updating a webhook. + + :param tags: A set of tags. The tags for the webhook. + :type tags: dict[str, str] + :param service_uri: The service URI for the webhook to post notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook notifications. + :type custom_headers: dict[str, str] + :param status: The status of the webhook at the time the operation was called. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*' + means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + 'foo' is equivalent to 'foo:latest'. Empty means all events. + :type scope: str + :param actions: The list of actions that trigger the webhook to post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookAction] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'service_uri': {'key': 'properties.serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(WebhookUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.service_uri = kwargs.get('service_uri', None) + self.custom_headers = kwargs.get('custom_headers', None) + self.status = kwargs.get('status', None) + self.scope = kwargs.get('scope', None) + self.actions = kwargs.get('actions', None) diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_models_py3.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_models_py3.py new file mode 100644 index 000000000000..aaf5403b0e41 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/models/_models_py3.py @@ -0,0 +1,4079 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._container_registry_management_client_enums import * + + +class ActivationProperties(msrest.serialization.Model): + """The activation properties of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: The activation status of the connected registry. Possible values include: + "Active", "Inactive". + :vartype status: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ActivationStatus + """ + + _validation = { + 'status': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActivationProperties, self).__init__(**kwargs) + self.status = None + + +class ActiveDirectoryObject(msrest.serialization.Model): + """The Active Directory Object that will be used for authenticating the token of a container registry. + + :param object_id: The user/group/application object ID for Active Directory Object that will be + used for authenticating the token of a container registry. + :type object_id: str + :param tenant_id: The tenant ID of user/group/application object Active Directory Object that + will be used for authenticating the token of a container registry. + :type tenant_id: str + """ + + _attribute_map = { + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + object_id: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): + super(ActiveDirectoryObject, self).__init__(**kwargs) + self.object_id = object_id + self.tenant_id = tenant_id + + +class Actor(msrest.serialization.Model): + """The agent that initiated the event. For most situations, this could be from the authorization context of the request. + + :param name: The subject or username associated with the request context that generated the + event. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(Actor, self).__init__(**kwargs) + self.name = name + + +class CallbackConfig(msrest.serialization.Model): + """The configuration of service URI and custom headers for the webhook. + + All required parameters must be populated in order to send to Azure. + + :param service_uri: Required. The service URI for the webhook to post notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook notifications. + :type custom_headers: dict[str, str] + """ + + _validation = { + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'customHeaders', 'type': '{str}'}, + } + + def __init__( + self, + *, + service_uri: str, + custom_headers: Optional[Dict[str, str]] = None, + **kwargs + ): + super(CallbackConfig, self).__init__(**kwargs) + self.service_uri = service_uri + self.custom_headers = custom_headers + + +class ProxyResource(msrest.serialization.Model): + """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class ConnectedRegistry(ProxyResource): + """An object that represents a connected registry for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :ivar provisioning_state: Provisioning state of the resource. Possible values include: + "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :param mode: The mode of the connected registry resource that indicates the permissions of the + registry. Possible values include: "ReadWrite", "ReadOnly", "Registry", "Mirror". + :type mode: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistryMode + :ivar version: The current version of ACR runtime on the connected registry. + :vartype version: str + :ivar connection_state: The current connection state of the connected registry. Possible values + include: "Online", "Offline", "Syncing", "Unhealthy". + :vartype connection_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectionState + :ivar last_activity_time: The last activity time of the connected registry. + :vartype last_activity_time: ~datetime.datetime + :ivar activation: The activation properties of the connected registry. + :vartype activation: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ActivationProperties + :param parent: The parent of the connected registry. + :type parent: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ParentProperties + :param client_token_ids: The list of the ACR token resource IDs used to authenticate clients to + the connected registry. + :type client_token_ids: list[str] + :param login_server: The login server properties of the connected registry. + :type login_server: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.LoginServerProperties + :param logging: The logging properties of the connected registry. + :type logging: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.LoggingProperties + :ivar status_details: The list of current statuses of the connected registry. + :vartype status_details: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.StatusDetailProperties] + :param notifications_list: The list of notifications subscription information for the connected + registry. + :type notifications_list: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'version': {'readonly': True}, + 'connection_state': {'readonly': True}, + 'last_activity_time': {'readonly': True}, + 'activation': {'readonly': True}, + 'status_details': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'connection_state': {'key': 'properties.connectionState', 'type': 'str'}, + 'last_activity_time': {'key': 'properties.lastActivityTime', 'type': 'iso-8601'}, + 'activation': {'key': 'properties.activation', 'type': 'ActivationProperties'}, + 'parent': {'key': 'properties.parent', 'type': 'ParentProperties'}, + 'client_token_ids': {'key': 'properties.clientTokenIds', 'type': '[str]'}, + 'login_server': {'key': 'properties.loginServer', 'type': 'LoginServerProperties'}, + 'logging': {'key': 'properties.logging', 'type': 'LoggingProperties'}, + 'status_details': {'key': 'properties.statusDetails', 'type': '[StatusDetailProperties]'}, + 'notifications_list': {'key': 'properties.notificationsList', 'type': '[str]'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "ConnectedRegistryMode"]] = None, + parent: Optional["ParentProperties"] = None, + client_token_ids: Optional[List[str]] = None, + login_server: Optional["LoginServerProperties"] = None, + logging: Optional["LoggingProperties"] = None, + notifications_list: Optional[List[str]] = None, + **kwargs + ): + super(ConnectedRegistry, self).__init__(**kwargs) + self.provisioning_state = None + self.mode = mode + self.version = None + self.connection_state = None + self.last_activity_time = None + self.activation = None + self.parent = parent + self.client_token_ids = client_token_ids + self.login_server = login_server + self.logging = logging + self.status_details = None + self.notifications_list = notifications_list + + +class ConnectedRegistryListResult(msrest.serialization.Model): + """The result of a request to list connected registries for a container registry. + + :param value: The list of connected registries. Since this list may be incomplete, the nextLink + field should be used to request the next list of connected registries. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry] + :param next_link: The URI that can be used to request the next list of connected registries. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectedRegistry]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ConnectedRegistry"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ConnectedRegistryListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ConnectedRegistryUpdateParameters(msrest.serialization.Model): + """The parameters for updating a connected registry. + + :param sync_properties: The sync properties of the connected registry with its parent. + :type sync_properties: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SyncUpdateProperties + :param logging: The logging properties of the connected registry. + :type logging: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.LoggingProperties + :param client_token_ids: The list of the ACR token resource IDs used to authenticate clients to + the connected registry. + :type client_token_ids: list[str] + :param notifications_list: The list of notifications subscription information for the connected + registry. + :type notifications_list: list[str] + """ + + _attribute_map = { + 'sync_properties': {'key': 'properties.syncProperties', 'type': 'SyncUpdateProperties'}, + 'logging': {'key': 'properties.logging', 'type': 'LoggingProperties'}, + 'client_token_ids': {'key': 'properties.clientTokenIds', 'type': '[str]'}, + 'notifications_list': {'key': 'properties.notificationsList', 'type': '[str]'}, + } + + def __init__( + self, + *, + sync_properties: Optional["SyncUpdateProperties"] = None, + logging: Optional["LoggingProperties"] = None, + client_token_ids: Optional[List[str]] = None, + notifications_list: Optional[List[str]] = None, + **kwargs + ): + super(ConnectedRegistryUpdateParameters, self).__init__(**kwargs) + self.sync_properties = sync_properties + self.logging = logging + self.client_token_ids = client_token_ids + self.notifications_list = notifications_list + + +class EncryptionProperty(msrest.serialization.Model): + """EncryptionProperty. + + :param status: Indicates whether or not the encryption is enabled for container registry. + Possible values include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EncryptionStatus + :param key_vault_properties: Key vault properties. + :type key_vault_properties: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.KeyVaultProperties + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': 'KeyVaultProperties'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "EncryptionStatus"]] = None, + key_vault_properties: Optional["KeyVaultProperties"] = None, + **kwargs + ): + super(EncryptionProperty, self).__init__(**kwargs) + self.status = status + self.key_vault_properties = key_vault_properties + + +class ErrorResponse(msrest.serialization.Model): + """An error response from the Azure Container Registry service. + + :param error: Azure container registry build API error body. + :type error: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ErrorResponseBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, + } + + def __init__( + self, + *, + error: Optional["ErrorResponseBody"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ErrorResponseBody(msrest.serialization.Model): + """An error response from the Azure Container Registry service. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code. + :type code: str + :param message: Required. error message. + :type message: str + :param target: target of the particular error. + :type target: str + :param details: an array of additional nested error response info objects, as described by this + contract. + :type details: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.InnerErrorDescription + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'InnerErrorDescription'}, + } + + def __init__( + self, + *, + code: str, + message: str, + target: Optional[str] = None, + details: Optional["InnerErrorDescription"] = None, + **kwargs + ): + super(ErrorResponseBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class EventInfo(msrest.serialization.Model): + """The basic information of an event. + + :param id: The event ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(EventInfo, self).__init__(**kwargs) + self.id = id + + +class Event(EventInfo): + """The event for a webhook. + + :param id: The event ID. + :type id: str + :param event_request_message: The event request message sent to the service URI. + :type event_request_message: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventRequestMessage + :param event_response_message: The event response message received from the service URI. + :type event_response_message: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventResponseMessage + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'event_request_message': {'key': 'eventRequestMessage', 'type': 'EventRequestMessage'}, + 'event_response_message': {'key': 'eventResponseMessage', 'type': 'EventResponseMessage'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + event_request_message: Optional["EventRequestMessage"] = None, + event_response_message: Optional["EventResponseMessage"] = None, + **kwargs + ): + super(Event, self).__init__(id=id, **kwargs) + self.event_request_message = event_request_message + self.event_response_message = event_response_message + + +class EventContent(msrest.serialization.Model): + """The content of the event request message. + + :param id: The event ID. + :type id: str + :param timestamp: The time at which the event occurred. + :type timestamp: ~datetime.datetime + :param action: The action that encompasses the provided event. + :type action: str + :param target: The target of the event. + :type target: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Target + :param request: The request that generated the event. + :type request: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Request + :param actor: The agent that initiated the event. For most situations, this could be from the + authorization context of the request. + :type actor: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Actor + :param source: The registry node that generated the event. Put differently, while the actor + initiates the event, the source generates it. + :type source: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Source + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'action': {'key': 'action', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'Target'}, + 'request': {'key': 'request', 'type': 'Request'}, + 'actor': {'key': 'actor', 'type': 'Actor'}, + 'source': {'key': 'source', 'type': 'Source'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + timestamp: Optional[datetime.datetime] = None, + action: Optional[str] = None, + target: Optional["Target"] = None, + request: Optional["Request"] = None, + actor: Optional["Actor"] = None, + source: Optional["Source"] = None, + **kwargs + ): + super(EventContent, self).__init__(**kwargs) + self.id = id + self.timestamp = timestamp + self.action = action + self.target = target + self.request = request + self.actor = actor + self.source = source + + +class EventListResult(msrest.serialization.Model): + """The result of a request to list events for a webhook. + + :param value: The list of events. Since this list may be incomplete, the nextLink field should + be used to request the next list of events. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Event] + :param next_link: The URI that can be used to request the next list of events. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Event]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Event"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(EventListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class EventRequestMessage(msrest.serialization.Model): + """The event request message sent to the service URI. + + :param content: The content of the event request message. + :type content: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventContent + :param headers: The headers of the event request message. + :type headers: dict[str, str] + :param method: The HTTP method used to send the event request message. + :type method: str + :param request_uri: The URI used to send the event request message. + :type request_uri: str + :param version: The HTTP message version. + :type version: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'EventContent'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + 'method': {'key': 'method', 'type': 'str'}, + 'request_uri': {'key': 'requestUri', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + content: Optional["EventContent"] = None, + headers: Optional[Dict[str, str]] = None, + method: Optional[str] = None, + request_uri: Optional[str] = None, + version: Optional[str] = None, + **kwargs + ): + super(EventRequestMessage, self).__init__(**kwargs) + self.content = content + self.headers = headers + self.method = method + self.request_uri = request_uri + self.version = version + + +class EventResponseMessage(msrest.serialization.Model): + """The event response message received from the service URI. + + :param content: The content of the event response message. + :type content: str + :param headers: The headers of the event response message. + :type headers: dict[str, str] + :param reason_phrase: The reason phrase of the event response message. + :type reason_phrase: str + :param status_code: The status code of the event response message. + :type status_code: str + :param version: The HTTP message version. + :type version: str + """ + + _attribute_map = { + 'content': {'key': 'content', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{str}'}, + 'reason_phrase': {'key': 'reasonPhrase', 'type': 'str'}, + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + content: Optional[str] = None, + headers: Optional[Dict[str, str]] = None, + reason_phrase: Optional[str] = None, + status_code: Optional[str] = None, + version: Optional[str] = None, + **kwargs + ): + super(EventResponseMessage, self).__init__(**kwargs) + self.content = content + self.headers = headers + self.reason_phrase = reason_phrase + self.status_code = status_code + self.version = version + + +class ExportPipeline(ProxyResource): + """An object that represents an export pipeline for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param location: The location of the export pipeline. + :type location: str + :param identity: The identity of the export pipeline. + :type identity: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.IdentityProperties + :param target: The target properties of the export pipeline. + :type target: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipelineTargetProperties + :param options: The list of all options configured for the pipeline. + :type options: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineOptions] + :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was + called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", + "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + 'target': {'key': 'properties.target', 'type': 'ExportPipelineTargetProperties'}, + 'options': {'key': 'properties.options', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + identity: Optional["IdentityProperties"] = None, + target: Optional["ExportPipelineTargetProperties"] = None, + options: Optional[List[Union[str, "PipelineOptions"]]] = None, + **kwargs + ): + super(ExportPipeline, self).__init__(**kwargs) + self.location = location + self.identity = identity + self.target = target + self.options = options + self.provisioning_state = None + + +class ExportPipelineListResult(msrest.serialization.Model): + """The result of a request to list export pipelines for a container registry. + + :param value: The list of export pipelines. Since this list may be incomplete, the nextLink + field should be used to request the next list of export pipelines. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipeline] + :param next_link: The URI that can be used to request the next list of pipeline runs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExportPipeline]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExportPipeline"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExportPipelineListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExportPipelineTargetProperties(msrest.serialization.Model): + """The properties of the export pipeline target. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of target for the export pipeline. + :type type: str + :param uri: The target uri of the export pipeline. + When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + :type uri: str + :param key_vault_uri: Required. They key vault secret uri to obtain the target storage SAS + token. + :type key_vault_uri: str + """ + + _validation = { + 'key_vault_uri': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + } + + def __init__( + self, + *, + key_vault_uri: str, + type: Optional[str] = None, + uri: Optional[str] = None, + **kwargs + ): + super(ExportPipelineTargetProperties, self).__init__(**kwargs) + self.type = type + self.uri = uri + self.key_vault_uri = key_vault_uri + + +class ExportPolicy(msrest.serialization.Model): + """The export policy for a container registry. + + :param status: The value that indicates whether the policy is enabled or not. Possible values + include: "enabled", "disabled". Default value: "enabled". + :type status: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPolicyStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "ExportPolicyStatus"]] = "enabled", + **kwargs + ): + super(ExportPolicy, self).__init__(**kwargs) + self.status = status + + +class GenerateCredentialsParameters(msrest.serialization.Model): + """The parameters used to generate credentials for a specified token or user of a container registry. + + :param token_id: The resource ID of the token for which credentials have to be generated. + :type token_id: str + :param expiry: The expiry date of the generated credentials after which the credentials become + invalid. + :type expiry: ~datetime.datetime + :param name: Specifies name of the password which should be regenerated if any -- password1 or + password2. Possible values include: "password1", "password2". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenPasswordName + """ + + _attribute_map = { + 'token_id': {'key': 'tokenId', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + token_id: Optional[str] = None, + expiry: Optional[datetime.datetime] = None, + name: Optional[Union[str, "TokenPasswordName"]] = None, + **kwargs + ): + super(GenerateCredentialsParameters, self).__init__(**kwargs) + self.token_id = token_id + self.expiry = expiry + self.name = name + + +class GenerateCredentialsResult(msrest.serialization.Model): + """The response from the GenerateCredentials operation. + + :param username: The username for a container registry. + :type username: str + :param passwords: The list of passwords for a container registry. + :type passwords: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenPassword] + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[TokenPassword]'}, + } + + def __init__( + self, + *, + username: Optional[str] = None, + passwords: Optional[List["TokenPassword"]] = None, + **kwargs + ): + super(GenerateCredentialsResult, self).__init__(**kwargs) + self.username = username + self.passwords = passwords + + +class IdentityProperties(msrest.serialization.Model): + """Managed identity for the resource. + + :param principal_id: The principal ID of resource identity. + :type principal_id: str + :param tenant_id: The tenant ID of resource. + :type tenant_id: str + :param type: The identity type. Possible values include: "SystemAssigned", "UserAssigned", + "SystemAssigned, UserAssigned", "None". + :type type: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated with the resource. The + user identity + dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ + providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.UserIdentityProperties] + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserIdentityProperties}'}, + } + + def __init__( + self, + *, + principal_id: Optional[str] = None, + tenant_id: Optional[str] = None, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "UserIdentityProperties"]] = None, + **kwargs + ): + super(IdentityProperties, self).__init__(**kwargs) + self.principal_id = principal_id + self.tenant_id = tenant_id + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class ImportImageParameters(msrest.serialization.Model): + """ImportImageParameters. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The source of the image. + :type source: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportSource + :param target_tags: List of strings of the form repo[:tag]. When tag is omitted the source will + be used (or 'latest' if source tag is also omitted). + :type target_tags: list[str] + :param untagged_target_repositories: List of strings of repository names to do a manifest only + copy. No tag will be created. + :type untagged_target_repositories: list[str] + :param mode: When Force, any existing target tags will be overwritten. When NoForce, any + existing target tags will fail the operation before any copying begins. Possible values + include: "NoForce", "Force". Default value: "NoForce". + :type mode: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportMode + """ + + _validation = { + 'source': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ImportSource'}, + 'target_tags': {'key': 'targetTags', 'type': '[str]'}, + 'untagged_target_repositories': {'key': 'untaggedTargetRepositories', 'type': '[str]'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + *, + source: "ImportSource", + target_tags: Optional[List[str]] = None, + untagged_target_repositories: Optional[List[str]] = None, + mode: Optional[Union[str, "ImportMode"]] = "NoForce", + **kwargs + ): + super(ImportImageParameters, self).__init__(**kwargs) + self.source = source + self.target_tags = target_tags + self.untagged_target_repositories = untagged_target_repositories + self.mode = mode + + +class ImportPipeline(ProxyResource): + """An object that represents an import pipeline for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param location: The location of the import pipeline. + :type location: str + :param identity: The identity of the import pipeline. + :type identity: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.IdentityProperties + :param source: The source properties of the import pipeline. + :type source: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipelineSourceProperties + :param trigger: The properties that describe the trigger of the import pipeline. + :type trigger: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineTriggerProperties + :param options: The list of all options configured for the pipeline. + :type options: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineOptions] + :ivar provisioning_state: The provisioning state of the pipeline at the time the operation was + called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", + "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + 'source': {'key': 'properties.source', 'type': 'ImportPipelineSourceProperties'}, + 'trigger': {'key': 'properties.trigger', 'type': 'PipelineTriggerProperties'}, + 'options': {'key': 'properties.options', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + identity: Optional["IdentityProperties"] = None, + source: Optional["ImportPipelineSourceProperties"] = None, + trigger: Optional["PipelineTriggerProperties"] = None, + options: Optional[List[Union[str, "PipelineOptions"]]] = None, + **kwargs + ): + super(ImportPipeline, self).__init__(**kwargs) + self.location = location + self.identity = identity + self.source = source + self.trigger = trigger + self.options = options + self.provisioning_state = None + + +class ImportPipelineListResult(msrest.serialization.Model): + """The result of a request to list import pipelines for a container registry. + + :param value: The list of import pipelines. Since this list may be incomplete, the nextLink + field should be used to request the next list of import pipelines. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipeline] + :param next_link: The URI that can be used to request the next list of pipeline runs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ImportPipeline]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ImportPipeline"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ImportPipelineListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ImportPipelineSourceProperties(msrest.serialization.Model): + """The properties of the import pipeline source. + + All required parameters must be populated in order to send to Azure. + + :param type: The type of source for the import pipeline. Possible values include: + "AzureStorageBlobContainer". Default value: "AzureStorageBlobContainer". + :type type: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineSourceType + :param uri: The source uri of the import pipeline. + When 'AzureStorageBlob': "https://accountName.blob.core.windows.net/containerName/blobName" + When 'AzureStorageBlobContainer': "https://accountName.blob.core.windows.net/containerName". + :type uri: str + :param key_vault_uri: Required. They key vault secret uri to obtain the source storage SAS + token. + :type key_vault_uri: str + """ + + _validation = { + 'key_vault_uri': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + } + + def __init__( + self, + *, + key_vault_uri: str, + type: Optional[Union[str, "PipelineSourceType"]] = "AzureStorageBlobContainer", + uri: Optional[str] = None, + **kwargs + ): + super(ImportPipelineSourceProperties, self).__init__(**kwargs) + self.type = type + self.uri = uri + self.key_vault_uri = key_vault_uri + + +class ImportSource(msrest.serialization.Model): + """ImportSource. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: The resource identifier of the source Azure Container Registry. + :type resource_id: str + :param registry_uri: The address of the source registry (e.g. 'mcr.microsoft.com'). + :type registry_uri: str + :param credentials: Credentials used when importing from a registry uri. + :type credentials: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportSourceCredentials + :param source_image: Required. Repository name of the source image. + Specify an image by repository ('hello-world'). This will use the 'latest' tag. + Specify an image by tag ('hello-world:latest'). + Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + :type source_image: str + """ + + _validation = { + 'source_image': {'required': True}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'registry_uri': {'key': 'registryUri', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'ImportSourceCredentials'}, + 'source_image': {'key': 'sourceImage', 'type': 'str'}, + } + + def __init__( + self, + *, + source_image: str, + resource_id: Optional[str] = None, + registry_uri: Optional[str] = None, + credentials: Optional["ImportSourceCredentials"] = None, + **kwargs + ): + super(ImportSource, self).__init__(**kwargs) + self.resource_id = resource_id + self.registry_uri = registry_uri + self.credentials = credentials + self.source_image = source_image + + +class ImportSourceCredentials(msrest.serialization.Model): + """ImportSourceCredentials. + + All required parameters must be populated in order to send to Azure. + + :param username: The username to authenticate with the source registry. + :type username: str + :param password: Required. The password used to authenticate with the source registry. + :type password: str + """ + + _validation = { + 'password': {'required': True}, + } + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + *, + password: str, + username: Optional[str] = None, + **kwargs + ): + super(ImportSourceCredentials, self).__init__(**kwargs) + self.username = username + self.password = password + + +class InnerErrorDescription(msrest.serialization.Model): + """inner error. + + All required parameters must be populated in order to send to Azure. + + :param code: Required. error code. + :type code: str + :param message: Required. error message. + :type message: str + :param target: target of the particular error. + :type target: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + *, + code: str, + message: str, + target: Optional[str] = None, + **kwargs + ): + super(InnerErrorDescription, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + + +class IPRule(msrest.serialization.Model): + """IP rule with specific IP or IP range in CIDR format. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of IP ACL rule. Possible values include: "Allow". + :type action: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Action + :param ip_address_or_range: Required. Specifies the IP or IP range in CIDR format. Only IPV4 + address is allowed. + :type ip_address_or_range: str + """ + + _validation = { + 'ip_address_or_range': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'ip_address_or_range': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_address_or_range: str, + action: Optional[Union[str, "Action"]] = None, + **kwargs + ): + super(IPRule, self).__init__(**kwargs) + self.action = action + self.ip_address_or_range = ip_address_or_range + + +class KeyVaultProperties(msrest.serialization.Model): + """KeyVaultProperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param key_identifier: Key vault uri to access the encryption key. + :type key_identifier: str + :ivar versioned_key_identifier: The fully qualified key identifier that includes the version of + the key that is actually used for encryption. + :vartype versioned_key_identifier: str + :param identity: The client id of the identity which will be used to access key vault. + :type identity: str + :ivar key_rotation_enabled: Auto key rotation status for a CMK enabled registry. + :vartype key_rotation_enabled: bool + :ivar last_key_rotation_timestamp: Timestamp of the last successful key rotation. + :vartype last_key_rotation_timestamp: ~datetime.datetime + """ + + _validation = { + 'versioned_key_identifier': {'readonly': True}, + 'key_rotation_enabled': {'readonly': True}, + 'last_key_rotation_timestamp': {'readonly': True}, + } + + _attribute_map = { + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + 'versioned_key_identifier': {'key': 'versionedKeyIdentifier', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'key_rotation_enabled': {'key': 'keyRotationEnabled', 'type': 'bool'}, + 'last_key_rotation_timestamp': {'key': 'lastKeyRotationTimestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + key_identifier: Optional[str] = None, + identity: Optional[str] = None, + **kwargs + ): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_identifier = key_identifier + self.versioned_key_identifier = None + self.identity = identity + self.key_rotation_enabled = None + self.last_key_rotation_timestamp = None + + +class LoggingProperties(msrest.serialization.Model): + """The logging properties of the connected registry. + + :param log_level: The verbosity of logs persisted on the connected registry. Possible values + include: "Debug", "Information", "Warning", "Error", "None". Default value: "Information". + :type log_level: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.LogLevel + :param audit_log_status: Indicates whether audit logs are enabled on the connected registry. + Possible values include: "Enabled", "Disabled". Default value: "Disabled". + :type audit_log_status: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.AuditLogStatus + """ + + _attribute_map = { + 'log_level': {'key': 'logLevel', 'type': 'str'}, + 'audit_log_status': {'key': 'auditLogStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + log_level: Optional[Union[str, "LogLevel"]] = "Information", + audit_log_status: Optional[Union[str, "AuditLogStatus"]] = "Disabled", + **kwargs + ): + super(LoggingProperties, self).__init__(**kwargs) + self.log_level = log_level + self.audit_log_status = audit_log_status + + +class LoginServerProperties(msrest.serialization.Model): + """The login server properties of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar host: The host of the connected registry. Can be FQDN or IP. + :vartype host: str + :ivar tls: The TLS properties of the connected registry login server. + :vartype tls: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TlsProperties + """ + + _validation = { + 'host': {'readonly': True}, + 'tls': {'readonly': True}, + } + + _attribute_map = { + 'host': {'key': 'host', 'type': 'str'}, + 'tls': {'key': 'tls', 'type': 'TlsProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(LoginServerProperties, self).__init__(**kwargs) + self.host = None + self.tls = None + + +class NetworkRuleSet(msrest.serialization.Model): + """The network rule set for a container registry. + + All required parameters must be populated in order to send to Azure. + + :param default_action: Required. The default action of allow or deny when no other rules match. + Possible values include: "Allow", "Deny". Default value: "Allow". + :type default_action: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.DefaultAction + :param virtual_network_rules: The virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.VirtualNetworkRule] + :param ip_rules: The IP ACL rules. + :type ip_rules: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.IPRule] + """ + + _validation = { + 'default_action': {'required': True}, + } + + _attribute_map = { + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + } + + def __init__( + self, + *, + default_action: Union[str, "DefaultAction"] = "Allow", + virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, + ip_rules: Optional[List["IPRule"]] = None, + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.default_action = default_action + self.virtual_network_rules = virtual_network_rules + self.ip_rules = ip_rules + + +class OperationDefinition(msrest.serialization.Model): + """The definition of a container registry operation. + + :param origin: The origin information of the container registry operation. + :type origin: str + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: The display information for the container registry operation. + :type display: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationDisplayDefinition + :param is_data_action: This property indicates if the operation is an action or a data action + ref: + https://docs.microsoft.com/en-us/azure/role-based-access-control/role-definitions#management-and-data-operations. + :type is_data_action: bool + :param service_specification: The definition of Azure Monitoring service. + :type service_specification: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationServiceSpecificationDefinition + """ + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplayDefinition'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationServiceSpecificationDefinition'}, + } + + def __init__( + self, + *, + origin: Optional[str] = None, + name: Optional[str] = None, + display: Optional["OperationDisplayDefinition"] = None, + is_data_action: Optional[bool] = None, + service_specification: Optional["OperationServiceSpecificationDefinition"] = None, + **kwargs + ): + super(OperationDefinition, self).__init__(**kwargs) + self.origin = origin + self.name = name + self.display = display + self.is_data_action = is_data_action + self.service_specification = service_specification + + +class OperationDisplayDefinition(msrest.serialization.Model): + """The display information for a container registry operation. + + :param provider: The resource provider name: Microsoft.ContainerRegistry. + :type provider: str + :param resource: The resource on which the operation is performed. + :type resource: str + :param operation: The operation that users can perform. + :type operation: str + :param description: The description for the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationDisplayDefinition, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationListResult(msrest.serialization.Model): + """The result of a request to list container registry operations. + + :param value: The list of container registry operations. Since this list may be incomplete, the + nextLink field should be used to request the next list of operations. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationDefinition] + :param next_link: The URI that can be used to request the next list of container registry + operations. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["OperationDefinition"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class OperationLogSpecificationDefinition(msrest.serialization.Model): + """The definition of Azure Monitoring log. + + :param name: Log name. + :type name: str + :param display_name: Log display name. + :type display_name: str + :param blob_duration: Log blob duration. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + super(OperationLogSpecificationDefinition, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class OperationMetricSpecificationDefinition(msrest.serialization.Model): + """The definition of Azure Monitoring metric. + + :param name: Metric name. + :type name: str + :param display_name: Metric display name. + :type display_name: str + :param display_description: Metric description. + :type display_description: str + :param unit: Metric unit. + :type unit: str + :param aggregation_type: Metric aggregation type. + :type aggregation_type: str + :param internal_metric_name: Internal metric name. + :type internal_metric_name: str + """ + + _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'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + aggregation_type: Optional[str] = None, + internal_metric_name: Optional[str] = None, + **kwargs + ): + super(OperationMetricSpecificationDefinition, 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.internal_metric_name = internal_metric_name + + +class OperationServiceSpecificationDefinition(msrest.serialization.Model): + """The definition of Azure Monitoring list. + + :param metric_specifications: A list of Azure Monitoring metrics definition. + :type metric_specifications: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationMetricSpecificationDefinition] + :param log_specifications: A list of Azure Monitoring log definitions. + :type log_specifications: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationLogSpecificationDefinition] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[OperationMetricSpecificationDefinition]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[OperationLogSpecificationDefinition]'}, + } + + def __init__( + self, + *, + metric_specifications: Optional[List["OperationMetricSpecificationDefinition"]] = None, + log_specifications: Optional[List["OperationLogSpecificationDefinition"]] = None, + **kwargs + ): + super(OperationServiceSpecificationDefinition, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + self.log_specifications = log_specifications + + +class ParentProperties(msrest.serialization.Model): + """The properties of the connected registry parent. + + All required parameters must be populated in order to send to Azure. + + :param id: The resource ID of the parent to which the connected registry will be associated. + :type id: str + :param sync_properties: Required. The sync properties of the connected registry with its + parent. + :type sync_properties: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SyncProperties + """ + + _validation = { + 'sync_properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'sync_properties': {'key': 'syncProperties', 'type': 'SyncProperties'}, + } + + def __init__( + self, + *, + sync_properties: "SyncProperties", + id: Optional[str] = None, + **kwargs + ): + super(ParentProperties, self).__init__(**kwargs) + self.id = id + self.sync_properties = sync_properties + + +class PipelineRun(ProxyResource): + """An object that represents a pipeline run for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :ivar provisioning_state: The provisioning state of a pipeline run. Possible values include: + "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :param request: The request parameters for a pipeline run. + :type request: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunRequest + :ivar response: The response of a pipeline run. + :vartype response: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunResponse + :param force_update_tag: How the pipeline run should be forced to recreate even if the pipeline + run configuration has not changed. + :type force_update_tag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'response': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'request': {'key': 'properties.request', 'type': 'PipelineRunRequest'}, + 'response': {'key': 'properties.response', 'type': 'PipelineRunResponse'}, + 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, + } + + def __init__( + self, + *, + request: Optional["PipelineRunRequest"] = None, + force_update_tag: Optional[str] = None, + **kwargs + ): + super(PipelineRun, self).__init__(**kwargs) + self.provisioning_state = None + self.request = request + self.response = None + self.force_update_tag = force_update_tag + + +class PipelineRunListResult(msrest.serialization.Model): + """The result of a request to list pipeline runs for a container registry. + + :param value: The list of pipeline runs. Since this list may be incomplete, the nextLink field + should be used to request the next list of pipeline runs. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRun] + :param next_link: The URI that can be used to request the next list of pipeline runs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PipelineRun]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PipelineRun"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PipelineRunListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PipelineRunRequest(msrest.serialization.Model): + """The request properties provided for a pipeline run. + + :param pipeline_resource_id: The resource ID of the pipeline to run. + :type pipeline_resource_id: str + :param artifacts: List of source artifacts to be transferred by the pipeline. + Specify an image by repository ('hello-world'). This will use the 'latest' tag. + Specify an image by tag ('hello-world:latest'). + Specify an image by sha256-based manifest digest ('hello-world@sha256:abc123'). + :type artifacts: list[str] + :param source: The source properties of the pipeline run. + :type source: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunSourceProperties + :param target: The target properties of the pipeline run. + :type target: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunTargetProperties + :param catalog_digest: The digest of the tar used to transfer the artifacts. + :type catalog_digest: str + """ + + _attribute_map = { + 'pipeline_resource_id': {'key': 'pipelineResourceId', 'type': 'str'}, + 'artifacts': {'key': 'artifacts', 'type': '[str]'}, + 'source': {'key': 'source', 'type': 'PipelineRunSourceProperties'}, + 'target': {'key': 'target', 'type': 'PipelineRunTargetProperties'}, + 'catalog_digest': {'key': 'catalogDigest', 'type': 'str'}, + } + + def __init__( + self, + *, + pipeline_resource_id: Optional[str] = None, + artifacts: Optional[List[str]] = None, + source: Optional["PipelineRunSourceProperties"] = None, + target: Optional["PipelineRunTargetProperties"] = None, + catalog_digest: Optional[str] = None, + **kwargs + ): + super(PipelineRunRequest, self).__init__(**kwargs) + self.pipeline_resource_id = pipeline_resource_id + self.artifacts = artifacts + self.source = source + self.target = target + self.catalog_digest = catalog_digest + + +class PipelineRunResponse(msrest.serialization.Model): + """The response properties returned for a pipeline run. + + :param status: The current status of the pipeline run. + :type status: str + :param imported_artifacts: The artifacts imported in the pipeline run. + :type imported_artifacts: list[str] + :param progress: The current progress of the copy operation. + :type progress: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProgressProperties + :param start_time: The time the pipeline run started. + :type start_time: ~datetime.datetime + :param finish_time: The time the pipeline run finished. + :type finish_time: ~datetime.datetime + :param source: The source of the pipeline run. + :type source: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipelineSourceProperties + :param target: The target of the pipeline run. + :type target: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipelineTargetProperties + :param catalog_digest: The digest of the tar used to transfer the artifacts. + :type catalog_digest: str + :param trigger: The trigger that caused the pipeline run. + :type trigger: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineTriggerDescriptor + :param pipeline_run_error_message: The detailed error message for the pipeline run in the case + of failure. + :type pipeline_run_error_message: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'imported_artifacts': {'key': 'importedArtifacts', 'type': '[str]'}, + 'progress': {'key': 'progress', 'type': 'ProgressProperties'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'finish_time': {'key': 'finishTime', 'type': 'iso-8601'}, + 'source': {'key': 'source', 'type': 'ImportPipelineSourceProperties'}, + 'target': {'key': 'target', 'type': 'ExportPipelineTargetProperties'}, + 'catalog_digest': {'key': 'catalogDigest', 'type': 'str'}, + 'trigger': {'key': 'trigger', 'type': 'PipelineTriggerDescriptor'}, + 'pipeline_run_error_message': {'key': 'pipelineRunErrorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + imported_artifacts: Optional[List[str]] = None, + progress: Optional["ProgressProperties"] = None, + start_time: Optional[datetime.datetime] = None, + finish_time: Optional[datetime.datetime] = None, + source: Optional["ImportPipelineSourceProperties"] = None, + target: Optional["ExportPipelineTargetProperties"] = None, + catalog_digest: Optional[str] = None, + trigger: Optional["PipelineTriggerDescriptor"] = None, + pipeline_run_error_message: Optional[str] = None, + **kwargs + ): + super(PipelineRunResponse, self).__init__(**kwargs) + self.status = status + self.imported_artifacts = imported_artifacts + self.progress = progress + self.start_time = start_time + self.finish_time = finish_time + self.source = source + self.target = target + self.catalog_digest = catalog_digest + self.trigger = trigger + self.pipeline_run_error_message = pipeline_run_error_message + + +class PipelineRunSourceProperties(msrest.serialization.Model): + """PipelineRunSourceProperties. + + :param type: The type of the source. Possible values include: "AzureStorageBlob". Default + value: "AzureStorageBlob". + :type type: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunSourceType + :param name: The name of the source. + :type name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "PipelineRunSourceType"]] = "AzureStorageBlob", + name: Optional[str] = None, + **kwargs + ): + super(PipelineRunSourceProperties, self).__init__(**kwargs) + self.type = type + self.name = name + + +class PipelineRunTargetProperties(msrest.serialization.Model): + """PipelineRunTargetProperties. + + :param type: The type of the target. Possible values include: "AzureStorageBlob". Default + value: "AzureStorageBlob". + :type type: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunTargetType + :param name: The name of the target. + :type name: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "PipelineRunTargetType"]] = "AzureStorageBlob", + name: Optional[str] = None, + **kwargs + ): + super(PipelineRunTargetProperties, self).__init__(**kwargs) + self.type = type + self.name = name + + +class PipelineSourceTriggerDescriptor(msrest.serialization.Model): + """PipelineSourceTriggerDescriptor. + + :param timestamp: The timestamp when the source update happened. + :type timestamp: ~datetime.datetime + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + timestamp: Optional[datetime.datetime] = None, + **kwargs + ): + super(PipelineSourceTriggerDescriptor, self).__init__(**kwargs) + self.timestamp = timestamp + + +class PipelineSourceTriggerProperties(msrest.serialization.Model): + """PipelineSourceTriggerProperties. + + All required parameters must be populated in order to send to Azure. + + :param status: Required. The current status of the source trigger. Possible values include: + "Enabled", "Disabled". Default value: "Enabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TriggerStatus + """ + + _validation = { + 'status': {'required': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Union[str, "TriggerStatus"] = "Enabled", + **kwargs + ): + super(PipelineSourceTriggerProperties, self).__init__(**kwargs) + self.status = status + + +class PipelineTriggerDescriptor(msrest.serialization.Model): + """PipelineTriggerDescriptor. + + :param source_trigger: The source trigger that caused the pipeline run. + :type source_trigger: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineSourceTriggerDescriptor + """ + + _attribute_map = { + 'source_trigger': {'key': 'sourceTrigger', 'type': 'PipelineSourceTriggerDescriptor'}, + } + + def __init__( + self, + *, + source_trigger: Optional["PipelineSourceTriggerDescriptor"] = None, + **kwargs + ): + super(PipelineTriggerDescriptor, self).__init__(**kwargs) + self.source_trigger = source_trigger + + +class PipelineTriggerProperties(msrest.serialization.Model): + """PipelineTriggerProperties. + + :param source_trigger: The source trigger properties of the pipeline. + :type source_trigger: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineSourceTriggerProperties + """ + + _attribute_map = { + 'source_trigger': {'key': 'sourceTrigger', 'type': 'PipelineSourceTriggerProperties'}, + } + + def __init__( + self, + *, + source_trigger: Optional["PipelineSourceTriggerProperties"] = None, + **kwargs + ): + super(PipelineTriggerProperties, self).__init__(**kwargs) + self.source_trigger = source_trigger + + +class Policies(msrest.serialization.Model): + """The policies for a container registry. + + :param quarantine_policy: The quarantine policy for a container registry. + :type quarantine_policy: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.QuarantinePolicy + :param trust_policy: The content trust policy for a container registry. + :type trust_policy: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TrustPolicy + :param retention_policy: The retention policy for a container registry. + :type retention_policy: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RetentionPolicy + :param export_policy: The export policy for a container registry. + :type export_policy: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPolicy + """ + + _attribute_map = { + 'quarantine_policy': {'key': 'quarantinePolicy', 'type': 'QuarantinePolicy'}, + 'trust_policy': {'key': 'trustPolicy', 'type': 'TrustPolicy'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'export_policy': {'key': 'exportPolicy', 'type': 'ExportPolicy'}, + } + + def __init__( + self, + *, + quarantine_policy: Optional["QuarantinePolicy"] = None, + trust_policy: Optional["TrustPolicy"] = None, + retention_policy: Optional["RetentionPolicy"] = None, + export_policy: Optional["ExportPolicy"] = None, + **kwargs + ): + super(Policies, self).__init__(**kwargs) + self.quarantine_policy = quarantine_policy + self.trust_policy = trust_policy + self.retention_policy = retention_policy + self.export_policy = export_policy + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + :param id: This is private endpoint resource created with Microsoft.Network resource provider. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnection(ProxyResource): + """An object that represents a private endpoint connection for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param private_endpoint: The resource of private endpoint. + :type private_endpoint: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of private endpoint connection resource. + Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """The result of a request to list private endpoint connections for a container registry. + + :param value: The list of private endpoint connections. Since this list may be incomplete, the + nextLink field should be used to request the next list of private endpoint connections. + :type value: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection] + :param next_link: The URI that can be used to request the next list of private endpoint + connections. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PrivateLinkResource(msrest.serialization.Model): + """A resource that supports private link capabilities. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The resource type is private link resource. + :vartype type: str + :param id: The resource ID. + :type id: str + :param name: The name of the resource. + :type name: str + :param group_id: The private link resource group id. + :type group_id: str + :param required_members: The private link resource required member names. + :type required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.type = None + self.id = id + self.name = name + self.group_id = group_id + self.required_members = required_members + self.required_zone_names = required_zone_names + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """The result of a request to list private link resources for a container registry. + + :param value: The list of private link resources. Since this list may be incomplete, the + nextLink field should be used to request the next list of private link resources. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateLinkResource] + :param next_link: The URI that can be used to request the next list of private link resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """The state of a private link service connection. + + :param status: The private link service connection status. Possible values include: "Approved", + "Pending", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectionStatus + :param description: The description for connection status. For example if connection is + rejected it can indicate reason for rejection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. Possible values include: "None", "Recreate". + :type actions_required: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ActionsRequired + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "ConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[Union[str, "ActionsRequired"]] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class ProgressProperties(msrest.serialization.Model): + """ProgressProperties. + + :param percentage: The percentage complete of the copy operation. + :type percentage: str + """ + + _attribute_map = { + 'percentage': {'key': 'percentage', 'type': 'str'}, + } + + def __init__( + self, + *, + percentage: Optional[str] = None, + **kwargs + ): + super(ProgressProperties, self).__init__(**kwargs) + self.percentage = percentage + + +class QuarantinePolicy(msrest.serialization.Model): + """The quarantine policy for a container registry. + + :param status: The value that indicates whether the policy is enabled or not. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PolicyStatus + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PolicyStatus"]] = None, + **kwargs + ): + super(QuarantinePolicy, self).__init__(**kwargs) + self.status = status + + +class RegenerateCredentialParameters(msrest.serialization.Model): + """The parameters used to regenerate the login credential. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Specifies name of the password which should be regenerated -- password + or password2. Possible values include: "password", "password2". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PasswordName + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Union[str, "PasswordName"], + **kwargs + ): + super(RegenerateCredentialParameters, self).__init__(**kwargs) + self.name = name + + +class Resource(msrest.serialization.Model): + """An Azure resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be changed after the + resource is created. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.system_data = None + + +class Registry(Resource): + """An object that represents a container registry. + + 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. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be changed after the + resource is created. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param sku: Required. The SKU of the container registry. + :type sku: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Sku + :param identity: The identity of the container registry. + :type identity: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.IdentityProperties + :ivar login_server: The URL that can be used to log into the container registry. + :vartype login_server: str + :ivar creation_date: The creation date of the container registry in ISO8601 format. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: The provisioning state of the container registry at the time the + operation was called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", + "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :ivar status: The status of the container registry at the time the operation was called. + :vartype status: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Status + :param admin_user_enabled: The value that indicates whether the admin user is enabled. + :type admin_user_enabled: bool + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.NetworkRuleSet + :param policies: The policies for a container registry. + :type policies: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Policies + :param encryption: The encryption settings of container registry. + :type encryption: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EncryptionProperty + :param data_endpoint_enabled: Enable a single data endpoint per region for serving data. + :type data_endpoint_enabled: bool + :ivar data_endpoint_host_names: List of host names that will serve data when + dataEndpointEnabled is true. + :vartype data_endpoint_host_names: list[str] + :ivar private_endpoint_connections: List of private endpoint connections for a container + registry. + :vartype private_endpoint_connections: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection] + :param public_network_access: Whether or not public network access is allowed for the container + registry. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PublicNetworkAccess + :param network_rule_bypass_options: Whether to allow trusted Azure services to access a network + restricted registry. Possible values include: "AzureServices", "None". + :type network_rule_bypass_options: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.NetworkRuleBypassOptions + :param zone_redundancy: Whether or not zone redundancy is enabled for this container registry. + Possible values include: "Enabled", "Disabled". + :type zone_redundancy: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ZoneRedundancy + :param anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. + :type anonymous_pull_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'sku': {'required': True}, + 'login_server': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'data_endpoint_host_names': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + 'login_server': {'key': 'properties.loginServer', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'policies': {'key': 'properties.policies', 'type': 'Policies'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'}, + 'data_endpoint_host_names': {'key': 'properties.dataEndpointHostNames', 'type': '[str]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, + 'zone_redundancy': {'key': 'properties.zoneRedundancy', 'type': 'str'}, + 'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + location: str, + sku: "Sku", + tags: Optional[Dict[str, str]] = None, + identity: Optional["IdentityProperties"] = None, + admin_user_enabled: Optional[bool] = False, + network_rule_set: Optional["NetworkRuleSet"] = None, + policies: Optional["Policies"] = None, + encryption: Optional["EncryptionProperty"] = None, + data_endpoint_enabled: Optional[bool] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + network_rule_bypass_options: Optional[Union[str, "NetworkRuleBypassOptions"]] = None, + zone_redundancy: Optional[Union[str, "ZoneRedundancy"]] = None, + anonymous_pull_enabled: Optional[bool] = False, + **kwargs + ): + super(Registry, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.identity = identity + self.login_server = None + self.creation_date = None + self.provisioning_state = None + self.status = None + self.admin_user_enabled = admin_user_enabled + self.network_rule_set = network_rule_set + self.policies = policies + self.encryption = encryption + self.data_endpoint_enabled = data_endpoint_enabled + self.data_endpoint_host_names = None + self.private_endpoint_connections = None + self.public_network_access = public_network_access + self.network_rule_bypass_options = network_rule_bypass_options + self.zone_redundancy = zone_redundancy + self.anonymous_pull_enabled = anonymous_pull_enabled + + +class RegistryListCredentialsResult(msrest.serialization.Model): + """The response from the ListCredentials operation. + + :param username: The username for a container registry. + :type username: str + :param passwords: The list of passwords for a container registry. + :type passwords: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryPassword] + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'passwords': {'key': 'passwords', 'type': '[RegistryPassword]'}, + } + + def __init__( + self, + *, + username: Optional[str] = None, + passwords: Optional[List["RegistryPassword"]] = None, + **kwargs + ): + super(RegistryListCredentialsResult, self).__init__(**kwargs) + self.username = username + self.passwords = passwords + + +class RegistryListResult(msrest.serialization.Model): + """The result of a request to list container registries. + + :param value: The list of container registries. Since this list may be incomplete, the nextLink + field should be used to request the next list of container registries. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry] + :param next_link: The URI that can be used to request the next list of container registries. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Registry]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Registry"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RegistryListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RegistryNameCheckRequest(msrest.serialization.Model): + """A request to check whether a container registry name is available. + + 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 name: Required. The name of the container registry. + :type name: str + :ivar type: The resource type of the container registry. This field must be set to + 'Microsoft.ContainerRegistry/registries'. Has constant value: + "Microsoft.ContainerRegistry/registries". + :vartype type: str + """ + + _validation = { + 'name': {'required': True, 'max_length': 50, 'min_length': 5, 'pattern': r'^[a-zA-Z0-9]*$'}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.ContainerRegistry/registries" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(RegistryNameCheckRequest, self).__init__(**kwargs) + self.name = name + + +class RegistryNameStatus(msrest.serialization.Model): + """The result of a request to check the availability of a container registry name. + + :param name_available: The value that indicates whether the name is available. + :type name_available: bool + :param reason: If any, the reason that the name is not available. + :type reason: str + :param message: If any, the error message that provides more detail for the reason that the + name is not available. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(RegistryNameStatus, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class RegistryPassword(msrest.serialization.Model): + """The login password for the container registry. + + :param name: The password name. Possible values include: "password", "password2". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PasswordName + :param value: The password value. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "PasswordName"]] = None, + value: Optional[str] = None, + **kwargs + ): + super(RegistryPassword, self).__init__(**kwargs) + self.name = name + self.value = value + + +class RegistryUpdateParameters(msrest.serialization.Model): + """The parameters for updating a container registry. + + :param identity: The identity of the container registry. + :type identity: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.IdentityProperties + :param tags: A set of tags. The tags for the container registry. + :type tags: dict[str, str] + :param sku: The SKU of the container registry. + :type sku: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Sku + :param admin_user_enabled: The value that indicates whether the admin user is enabled. + :type admin_user_enabled: bool + :param network_rule_set: The network rule set for a container registry. + :type network_rule_set: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.NetworkRuleSet + :param policies: The policies for a container registry. + :type policies: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Policies + :param encryption: The encryption settings of container registry. + :type encryption: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EncryptionProperty + :param data_endpoint_enabled: Enable a single data endpoint per region for serving data. + :type data_endpoint_enabled: bool + :param public_network_access: Whether or not public network access is allowed for the container + registry. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PublicNetworkAccess + :param network_rule_bypass_options: Whether to allow trusted Azure services to access a network + restricted registry. Possible values include: "AzureServices", "None". + :type network_rule_bypass_options: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.NetworkRuleBypassOptions + :param anonymous_pull_enabled: Enables registry-wide pull from unauthenticated clients. + :type anonymous_pull_enabled: bool + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'IdentityProperties'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'admin_user_enabled': {'key': 'properties.adminUserEnabled', 'type': 'bool'}, + 'network_rule_set': {'key': 'properties.networkRuleSet', 'type': 'NetworkRuleSet'}, + 'policies': {'key': 'properties.policies', 'type': 'Policies'}, + 'encryption': {'key': 'properties.encryption', 'type': 'EncryptionProperty'}, + 'data_endpoint_enabled': {'key': 'properties.dataEndpointEnabled', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_rule_bypass_options': {'key': 'properties.networkRuleBypassOptions', 'type': 'str'}, + 'anonymous_pull_enabled': {'key': 'properties.anonymousPullEnabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + identity: Optional["IdentityProperties"] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["Sku"] = None, + admin_user_enabled: Optional[bool] = None, + network_rule_set: Optional["NetworkRuleSet"] = None, + policies: Optional["Policies"] = None, + encryption: Optional["EncryptionProperty"] = None, + data_endpoint_enabled: Optional[bool] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + network_rule_bypass_options: Optional[Union[str, "NetworkRuleBypassOptions"]] = None, + anonymous_pull_enabled: Optional[bool] = None, + **kwargs + ): + super(RegistryUpdateParameters, self).__init__(**kwargs) + self.identity = identity + self.tags = tags + self.sku = sku + self.admin_user_enabled = admin_user_enabled + self.network_rule_set = network_rule_set + self.policies = policies + self.encryption = encryption + self.data_endpoint_enabled = data_endpoint_enabled + self.public_network_access = public_network_access + self.network_rule_bypass_options = network_rule_bypass_options + self.anonymous_pull_enabled = anonymous_pull_enabled + + +class RegistryUsage(msrest.serialization.Model): + """The quota usage for a container registry. + + :param name: The name of the usage. + :type name: str + :param limit: The limit of the usage. + :type limit: long + :param current_value: The current value of the usage. + :type current_value: long + :param unit: The unit of measurement. Possible values include: "Count", "Bytes". + :type unit: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryUsageUnit + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + limit: Optional[int] = None, + current_value: Optional[int] = None, + unit: Optional[Union[str, "RegistryUsageUnit"]] = None, + **kwargs + ): + super(RegistryUsage, self).__init__(**kwargs) + self.name = name + self.limit = limit + self.current_value = current_value + self.unit = unit + + +class RegistryUsageListResult(msrest.serialization.Model): + """The result of a request to get container registry quota usages. + + :param value: The list of container registry quota usages. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryUsage] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RegistryUsage]'}, + } + + def __init__( + self, + *, + value: Optional[List["RegistryUsage"]] = None, + **kwargs + ): + super(RegistryUsageListResult, self).__init__(**kwargs) + self.value = value + + +class Replication(Resource): + """An object that represents a replication for a container registry. + + 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. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be changed after the + resource is created. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :ivar provisioning_state: The provisioning state of the replication at the time the operation + was called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", + "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :ivar status: The status of the replication at the time the operation was called. + :vartype status: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Status + :param region_endpoint_enabled: Specifies whether the replication's regional endpoint is + enabled. Requests will not be routed to a replication whose regional endpoint is disabled, + however its data will continue to be synced with other replications. + :type region_endpoint_enabled: bool + :param zone_redundancy: Whether or not zone redundancy is enabled for this container registry + replication. Possible values include: "Enabled", "Disabled". + :type zone_redundancy: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ZoneRedundancy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'Status'}, + 'region_endpoint_enabled': {'key': 'properties.regionEndpointEnabled', 'type': 'bool'}, + 'zone_redundancy': {'key': 'properties.zoneRedundancy', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + region_endpoint_enabled: Optional[bool] = True, + zone_redundancy: Optional[Union[str, "ZoneRedundancy"]] = None, + **kwargs + ): + super(Replication, self).__init__(location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.status = None + self.region_endpoint_enabled = region_endpoint_enabled + self.zone_redundancy = zone_redundancy + + +class ReplicationListResult(msrest.serialization.Model): + """The result of a request to list replications for a container registry. + + :param value: The list of replications. Since this list may be incomplete, the nextLink field + should be used to request the next list of replications. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication] + :param next_link: The URI that can be used to request the next list of replications. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Replication]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Replication"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ReplicationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ReplicationUpdateParameters(msrest.serialization.Model): + """The parameters for updating a replication. + + :param tags: A set of tags. The tags for the replication. + :type tags: dict[str, str] + :param region_endpoint_enabled: Specifies whether the replication's regional endpoint is + enabled. Requests will not be routed to a replication whose regional endpoint is disabled, + however its data will continue to be synced with other replications. + :type region_endpoint_enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'region_endpoint_enabled': {'key': 'properties.regionEndpointEnabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + region_endpoint_enabled: Optional[bool] = None, + **kwargs + ): + super(ReplicationUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.region_endpoint_enabled = region_endpoint_enabled + + +class Request(msrest.serialization.Model): + """The request that generated the event. + + :param id: The ID of the request that initiated the event. + :type id: str + :param addr: The IP or hostname and possibly port of the client connection that initiated the + event. This is the RemoteAddr from the standard http request. + :type addr: str + :param host: The externally accessible hostname of the registry instance, as specified by the + http host header on incoming requests. + :type host: str + :param method: The request method that generated the event. + :type method: str + :param useragent: The user agent header of the request. + :type useragent: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'addr': {'key': 'addr', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'method': {'key': 'method', 'type': 'str'}, + 'useragent': {'key': 'useragent', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + addr: Optional[str] = None, + host: Optional[str] = None, + method: Optional[str] = None, + useragent: Optional[str] = None, + **kwargs + ): + super(Request, self).__init__(**kwargs) + self.id = id + self.addr = addr + self.host = host + self.method = method + self.useragent = useragent + + +class RetentionPolicy(msrest.serialization.Model): + """The retention policy for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param days: The number of days to retain an untagged manifest after which it gets purged. + :type days: int + :ivar last_updated_time: The timestamp when the policy was last updated. + :vartype last_updated_time: ~datetime.datetime + :param status: The value that indicates whether the policy is enabled or not. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PolicyStatus + """ + + _validation = { + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'days': {'key': 'days', 'type': 'int'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + days: Optional[int] = 7, + status: Optional[Union[str, "PolicyStatus"]] = None, + **kwargs + ): + super(RetentionPolicy, self).__init__(**kwargs) + self.days = days + self.last_updated_time = None + self.status = status + + +class ScopeMap(ProxyResource): + """An object that represents a scope map for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param description: The user friendly description of the scope map. + :type description: str + :ivar type_properties_type: The type of the scope map. E.g. BuildIn scope map. + :vartype type_properties_type: str + :ivar creation_date: The creation date of scope map. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the resource. Possible values include: + "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :param actions: The list of scoped permissions for registry artifacts. + E.g. repositories/repository-name/content/read, + repositories/repository-name/metadata/write. + :type actions: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'type_properties_type': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + actions: Optional[List[str]] = None, + **kwargs + ): + super(ScopeMap, self).__init__(**kwargs) + self.description = description + self.type_properties_type = None + self.creation_date = None + self.provisioning_state = None + self.actions = actions + + +class ScopeMapListResult(msrest.serialization.Model): + """The result of a request to list scope maps for a container registry. + + :param value: The list of scope maps. Since this list may be incomplete, the nextLink field + should be used to request the next list of scope maps. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap] + :param next_link: The URI that can be used to request the next list of scope maps. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScopeMap]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ScopeMap"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ScopeMapListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ScopeMapUpdateParameters(msrest.serialization.Model): + """The properties for updating the scope map. + + :param description: The user friendly description of the scope map. + :type description: str + :param actions: The list of scope permissions for registry artifacts. + E.g. repositories/repository-name/pull, + repositories/repository-name/delete. + :type actions: list[str] + """ + + _attribute_map = { + 'description': {'key': 'properties.description', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + actions: Optional[List[str]] = None, + **kwargs + ): + super(ScopeMapUpdateParameters, self).__init__(**kwargs) + self.description = description + self.actions = actions + + +class Sku(msrest.serialization.Model): + """The SKU of a container registry. + + 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 name: Required. The SKU name of the container registry. Required for registry creation. + Possible values include: "Classic", "Basic", "Standard", "Premium". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SkuName + :ivar tier: The SKU tier based on the SKU name. Possible values include: "Classic", "Basic", + "Standard", "Premium". + :vartype tier: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Union[str, "SkuName"], + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None + + +class Source(msrest.serialization.Model): + """The registry node that generated the event. Put differently, while the actor initiates the event, the source generates it. + + :param addr: The IP or hostname and the port of the registry node that generated the event. + Generally, this will be resolved by os.Hostname() along with the running port. + :type addr: str + :param instance_id: The running instance of an application. Changes after each restart. + :type instance_id: str + """ + + _attribute_map = { + 'addr': {'key': 'addr', 'type': 'str'}, + 'instance_id': {'key': 'instanceID', 'type': 'str'}, + } + + def __init__( + self, + *, + addr: Optional[str] = None, + instance_id: Optional[str] = None, + **kwargs + ): + super(Source, self).__init__(**kwargs) + self.addr = addr + self.instance_id = instance_id + + +class Status(msrest.serialization.Model): + """The status of an Azure resource at the time the operation was called. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar display_status: The short label for the status. + :vartype display_status: str + :ivar message: The detailed message for the status, including alerts and error messages. + :vartype message: str + :ivar timestamp: The timestamp when the status was changed to the current value. + :vartype timestamp: ~datetime.datetime + """ + + _validation = { + 'display_status': {'readonly': True}, + 'message': {'readonly': True}, + 'timestamp': {'readonly': True}, + } + + _attribute_map = { + 'display_status': {'key': 'displayStatus', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(Status, self).__init__(**kwargs) + self.display_status = None + self.message = None + self.timestamp = None + + +class StatusDetailProperties(msrest.serialization.Model): + """The status detail properties of the connected registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The component of the connected registry corresponding to the status. + :vartype type: str + :ivar code: The code of the status. + :vartype code: str + :ivar description: The description of the status. + :vartype description: str + :ivar timestamp: The timestamp of the status. + :vartype timestamp: ~datetime.datetime + :ivar correlation_id: The correlation ID of the status. + :vartype correlation_id: str + """ + + _validation = { + 'type': {'readonly': True}, + 'code': {'readonly': True}, + 'description': {'readonly': True}, + 'timestamp': {'readonly': True}, + 'correlation_id': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'code': {'key': 'code', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StatusDetailProperties, self).__init__(**kwargs) + self.type = None + self.code = None + self.description = None + self.timestamp = None + self.correlation_id = None + + +class SyncProperties(msrest.serialization.Model): + """The sync properties of the connected registry with its parent. + + 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 token_id: Required. The resource ID of the ACR token used to authenticate the connected + registry to its parent during sync. + :type token_id: str + :param schedule: The cron expression indicating the schedule that the connected registry will + sync with its parent. + :type schedule: str + :param sync_window: The time window during which sync is enabled for each schedule occurrence. + Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :type sync_window: ~datetime.timedelta + :param message_ttl: Required. The period of time for which a message is available to sync + before it is expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per + ISO8601. + :type message_ttl: ~datetime.timedelta + :ivar last_sync_time: The last time a sync occurred between the connected registry and its + parent. + :vartype last_sync_time: ~datetime.datetime + :ivar gateway_endpoint: The gateway endpoint used by the connected registry to communicate with + its parent. + :vartype gateway_endpoint: str + """ + + _validation = { + 'token_id': {'required': True}, + 'message_ttl': {'required': True}, + 'last_sync_time': {'readonly': True}, + 'gateway_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'token_id': {'key': 'tokenId', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'sync_window': {'key': 'syncWindow', 'type': 'duration'}, + 'message_ttl': {'key': 'messageTtl', 'type': 'duration'}, + 'last_sync_time': {'key': 'lastSyncTime', 'type': 'iso-8601'}, + 'gateway_endpoint': {'key': 'gatewayEndpoint', 'type': 'str'}, + } + + def __init__( + self, + *, + token_id: str, + message_ttl: datetime.timedelta, + schedule: Optional[str] = None, + sync_window: Optional[datetime.timedelta] = None, + **kwargs + ): + super(SyncProperties, self).__init__(**kwargs) + self.token_id = token_id + self.schedule = schedule + self.sync_window = sync_window + self.message_ttl = message_ttl + self.last_sync_time = None + self.gateway_endpoint = None + + +class SyncUpdateProperties(msrest.serialization.Model): + """The parameters for updating the sync properties of the connected registry with its parent. + + :param schedule: The cron expression indicating the schedule that the connected registry will + sync with its parent. + :type schedule: str + :param sync_window: The time window during which sync is enabled for each schedule occurrence. + Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :type sync_window: ~datetime.timedelta + :param message_ttl: The period of time for which a message is available to sync before it is + expired. Specify the duration using the format P[n]Y[n]M[n]DT[n]H[n]M[n]S as per ISO8601. + :type message_ttl: ~datetime.timedelta + """ + + _attribute_map = { + 'schedule': {'key': 'schedule', 'type': 'str'}, + 'sync_window': {'key': 'syncWindow', 'type': 'duration'}, + 'message_ttl': {'key': 'messageTtl', 'type': 'duration'}, + } + + def __init__( + self, + *, + schedule: Optional[str] = None, + sync_window: Optional[datetime.timedelta] = None, + message_ttl: Optional[datetime.timedelta] = None, + **kwargs + ): + super(SyncUpdateProperties, self).__init__(**kwargs) + self.schedule = schedule + self.sync_window = sync_window + self.message_ttl = message_ttl + + +class SystemData(msrest.serialization.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.containerregistry.v2021_08_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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.containerregistry.v2021_08_01_preview.models.LastModifiedByType + :param last_modified_at: The timestamp of resource modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "LastModifiedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 Target(msrest.serialization.Model): + """The target of the event. + + :param media_type: The MIME type of the referenced object. + :type media_type: str + :param size: The number of bytes of the content. Same as Length field. + :type size: long + :param digest: The digest of the content, as defined by the Registry V2 HTTP API Specification. + :type digest: str + :param length: The number of bytes of the content. Same as Size field. + :type length: long + :param repository: The repository name. + :type repository: str + :param url: The direct URL to the content. + :type url: str + :param tag: The tag name. + :type tag: str + :param name: The name of the artifact. + :type name: str + :param version: The version of the artifact. + :type version: str + """ + + _attribute_map = { + 'media_type': {'key': 'mediaType', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'long'}, + 'digest': {'key': 'digest', 'type': 'str'}, + 'length': {'key': 'length', 'type': 'long'}, + 'repository': {'key': 'repository', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + media_type: Optional[str] = None, + size: Optional[int] = None, + digest: Optional[str] = None, + length: Optional[int] = None, + repository: Optional[str] = None, + url: Optional[str] = None, + tag: Optional[str] = None, + name: Optional[str] = None, + version: Optional[str] = None, + **kwargs + ): + super(Target, self).__init__(**kwargs) + self.media_type = media_type + self.size = size + self.digest = digest + self.length = length + self.repository = repository + self.url = url + self.tag = tag + self.name = name + self.version = version + + +class TlsCertificateProperties(msrest.serialization.Model): + """The TLS certificate properties of the connected registry login server. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of certificate location. Possible values include: "LocalDirectory". + :vartype type: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.CertificateType + :ivar location: Indicates the location of the certificates. + :vartype location: str + """ + + _validation = { + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TlsCertificateProperties, self).__init__(**kwargs) + self.type = None + self.location = None + + +class TlsProperties(msrest.serialization.Model): + """The TLS properties of the connected registry login server. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar status: Indicates whether HTTPS is enabled for the login server. Possible values include: + "Enabled", "Disabled". + :vartype status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TlsStatus + :ivar certificate: The certificate used to configure HTTPS for the login server. + :vartype certificate: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TlsCertificateProperties + """ + + _validation = { + 'status': {'readonly': True}, + 'certificate': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'certificate': {'key': 'certificate', 'type': 'TlsCertificateProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(TlsProperties, self).__init__(**kwargs) + self.status = None + self.certificate = None + + +class Token(ProxyResource): + """An object that represents a token for a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :ivar creation_date: The creation date of scope map. + :vartype creation_date: ~datetime.datetime + :ivar provisioning_state: Provisioning state of the resource. Possible values include: + "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + :param scope_map_id: The resource ID of the scope map to which the token will be associated + with. + :type scope_map_id: str + :param credentials: The credentials that can be used for authenticating the token. + :type credentials: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenCredentialsProperties + :param status: The status of the token example enabled or disabled. Possible values include: + "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenStatus + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'creation_date': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'creation_date': {'key': 'properties.creationDate', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'scope_map_id': {'key': 'properties.scopeMapId', 'type': 'str'}, + 'credentials': {'key': 'properties.credentials', 'type': 'TokenCredentialsProperties'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__( + self, + *, + scope_map_id: Optional[str] = None, + credentials: Optional["TokenCredentialsProperties"] = None, + status: Optional[Union[str, "TokenStatus"]] = None, + **kwargs + ): + super(Token, self).__init__(**kwargs) + self.creation_date = None + self.provisioning_state = None + self.scope_map_id = scope_map_id + self.credentials = credentials + self.status = status + + +class TokenCertificate(msrest.serialization.Model): + """The properties of a certificate used for authenticating a token. + + :param name: Possible values include: "certificate1", "certificate2". + :type name: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenCertificateName + :param expiry: The expiry datetime of the certificate. + :type expiry: ~datetime.datetime + :param thumbprint: The thumbprint of the certificate. + :type thumbprint: str + :param encoded_pem_certificate: Base 64 encoded string of the public certificate1 in PEM format + that will be used for authenticating the token. + :type encoded_pem_certificate: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + 'encoded_pem_certificate': {'key': 'encodedPemCertificate', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "TokenCertificateName"]] = None, + expiry: Optional[datetime.datetime] = None, + thumbprint: Optional[str] = None, + encoded_pem_certificate: Optional[str] = None, + **kwargs + ): + super(TokenCertificate, self).__init__(**kwargs) + self.name = name + self.expiry = expiry + self.thumbprint = thumbprint + self.encoded_pem_certificate = encoded_pem_certificate + + +class TokenCredentialsProperties(msrest.serialization.Model): + """The properties of the credentials that can be used for authenticating the token. + + :param certificates: + :type certificates: + list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenCertificate] + :param passwords: + :type passwords: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenPassword] + """ + + _attribute_map = { + 'certificates': {'key': 'certificates', 'type': '[TokenCertificate]'}, + 'passwords': {'key': 'passwords', 'type': '[TokenPassword]'}, + } + + def __init__( + self, + *, + certificates: Optional[List["TokenCertificate"]] = None, + passwords: Optional[List["TokenPassword"]] = None, + **kwargs + ): + super(TokenCredentialsProperties, self).__init__(**kwargs) + self.certificates = certificates + self.passwords = passwords + + +class TokenListResult(msrest.serialization.Model): + """The result of a request to list tokens for a container registry. + + :param value: The list of tokens. Since this list may be incomplete, the nextLink field should + be used to request the next list of tokens. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token] + :param next_link: The URI that can be used to request the next list of tokens. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Token]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Token"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(TokenListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class TokenPassword(msrest.serialization.Model): + """The password that will be used for authenticating the token of a container registry. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param creation_time: The creation datetime of the password. + :type creation_time: ~datetime.datetime + :param expiry: The expiry datetime of the password. + :type expiry: ~datetime.datetime + :param name: The password name "password1" or "password2". Possible values include: + "password1", "password2". + :type name: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenPasswordName + :ivar value: The password value. + :vartype value: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'expiry': {'key': 'expiry', 'type': 'iso-8601'}, + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + creation_time: Optional[datetime.datetime] = None, + expiry: Optional[datetime.datetime] = None, + name: Optional[Union[str, "TokenPasswordName"]] = None, + **kwargs + ): + super(TokenPassword, self).__init__(**kwargs) + self.creation_time = creation_time + self.expiry = expiry + self.name = name + self.value = None + + +class TokenUpdateParameters(msrest.serialization.Model): + """The parameters for updating a token. + + :param scope_map_id: The resource ID of the scope map to which the token will be associated + with. + :type scope_map_id: str + :param status: The status of the token example enabled or disabled. Possible values include: + "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenStatus + :param credentials: The credentials that can be used for authenticating the token. + :type credentials: + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenCredentialsProperties + """ + + _attribute_map = { + 'scope_map_id': {'key': 'properties.scopeMapId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'credentials': {'key': 'properties.credentials', 'type': 'TokenCredentialsProperties'}, + } + + def __init__( + self, + *, + scope_map_id: Optional[str] = None, + status: Optional[Union[str, "TokenStatus"]] = None, + credentials: Optional["TokenCredentialsProperties"] = None, + **kwargs + ): + super(TokenUpdateParameters, self).__init__(**kwargs) + self.scope_map_id = scope_map_id + self.status = status + self.credentials = credentials + + +class TrustPolicy(msrest.serialization.Model): + """The content trust policy for a container registry. + + :param type: The type of trust policy. Possible values include: "Notary". Default value: + "Notary". + :type type: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TrustPolicyType + :param status: The value that indicates whether the policy is enabled or not. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PolicyStatus + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "TrustPolicyType"]] = "Notary", + status: Optional[Union[str, "PolicyStatus"]] = None, + **kwargs + ): + super(TrustPolicy, self).__init__(**kwargs) + self.type = type + self.status = status + + +class UserIdentityProperties(msrest.serialization.Model): + """UserIdentityProperties. + + :param principal_id: The principal id of user assigned identity. + :type principal_id: str + :param client_id: The client id of user assigned identity. + :type client_id: str + """ + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + *, + principal_id: Optional[str] = None, + client_id: Optional[str] = None, + **kwargs + ): + super(UserIdentityProperties, self).__init__(**kwargs) + self.principal_id = principal_id + self.client_id = client_id + + +class VirtualNetworkRule(msrest.serialization.Model): + """Virtual network rule. + + All required parameters must be populated in order to send to Azure. + + :param action: The action of virtual network rule. Possible values include: "Allow". + :type action: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Action + :param virtual_network_resource_id: Required. Resource ID of a subnet, for example: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}. + :type virtual_network_resource_id: str + """ + + _validation = { + 'virtual_network_resource_id': {'required': True}, + } + + _attribute_map = { + 'action': {'key': 'action', 'type': 'str'}, + 'virtual_network_resource_id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + virtual_network_resource_id: str, + action: Optional[Union[str, "Action"]] = None, + **kwargs + ): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.action = action + self.virtual_network_resource_id = virtual_network_resource_id + + +class Webhook(Resource): + """An object that represents a webhook for a container registry. + + 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. + + :ivar id: The resource ID. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: Required. The location of the resource. This cannot be changed after the + resource is created. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.SystemData + :param status: The status of the webhook at the time the operation was called. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*' + means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + 'foo' is equivalent to 'foo:latest'. Empty means all events. + :type scope: str + :param actions: The list of actions that trigger the webhook to post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookAction] + :ivar provisioning_state: The provisioning state of the webhook at the time the operation was + called. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", + "Canceled". + :vartype provisioning_state: str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + status: Optional[Union[str, "WebhookStatus"]] = None, + scope: Optional[str] = None, + actions: Optional[List[Union[str, "WebhookAction"]]] = None, + **kwargs + ): + super(Webhook, self).__init__(location=location, tags=tags, **kwargs) + self.status = status + self.scope = scope + self.actions = actions + self.provisioning_state = None + + +class WebhookCreateParameters(msrest.serialization.Model): + """The parameters for creating a webhook. + + All required parameters must be populated in order to send to Azure. + + :param tags: A set of tags. The tags for the webhook. + :type tags: dict[str, str] + :param location: Required. The location of the webhook. This cannot be changed after the + resource is created. + :type location: str + :param service_uri: The service URI for the webhook to post notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook notifications. + :type custom_headers: dict[str, str] + :param status: The status of the webhook at the time the operation was called. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*' + means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + 'foo' is equivalent to 'foo:latest'. Empty means all events. + :type scope: str + :param actions: The list of actions that trigger the webhook to post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookAction] + """ + + _validation = { + 'location': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'service_uri': {'key': 'properties.serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + service_uri: Optional[str] = None, + custom_headers: Optional[Dict[str, str]] = None, + status: Optional[Union[str, "WebhookStatus"]] = None, + scope: Optional[str] = None, + actions: Optional[List[Union[str, "WebhookAction"]]] = None, + **kwargs + ): + super(WebhookCreateParameters, self).__init__(**kwargs) + self.tags = tags + self.location = location + self.service_uri = service_uri + self.custom_headers = custom_headers + self.status = status + self.scope = scope + self.actions = actions + + +class WebhookListResult(msrest.serialization.Model): + """The result of a request to list webhooks for a container registry. + + :param value: The list of webhooks. Since this list may be incomplete, the nextLink field + should be used to request the next list of webhooks. + :type value: list[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Webhook] + :param next_link: The URI that can be used to request the next list of webhooks. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Webhook]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Webhook"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(WebhookListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class WebhookUpdateParameters(msrest.serialization.Model): + """The parameters for updating a webhook. + + :param tags: A set of tags. The tags for the webhook. + :type tags: dict[str, str] + :param service_uri: The service URI for the webhook to post notifications. + :type service_uri: str + :param custom_headers: Custom headers that will be added to the webhook notifications. + :type custom_headers: dict[str, str] + :param status: The status of the webhook at the time the operation was called. Possible values + include: "enabled", "disabled". + :type status: str or ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookStatus + :param scope: The scope of repositories where the event can be triggered. For example, 'foo:*' + means events for all tags under repository 'foo'. 'foo:bar' means events for 'foo:bar' only. + 'foo' is equivalent to 'foo:latest'. Empty means all events. + :type scope: str + :param actions: The list of actions that trigger the webhook to post notifications. + :type actions: list[str or + ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookAction] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'service_uri': {'key': 'properties.serviceUri', 'type': 'str'}, + 'custom_headers': {'key': 'properties.customHeaders', 'type': '{str}'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'scope': {'key': 'properties.scope', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + service_uri: Optional[str] = None, + custom_headers: Optional[Dict[str, str]] = None, + status: Optional[Union[str, "WebhookStatus"]] = None, + scope: Optional[str] = None, + actions: Optional[List[Union[str, "WebhookAction"]]] = None, + **kwargs + ): + super(WebhookUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.service_uri = service_uri + self.custom_headers = custom_headers + self.status = status + self.scope = scope + self.actions = actions diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/__init__.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/__init__.py new file mode 100644 index 000000000000..532500a8b984 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/__init__.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._connected_registries_operations import ConnectedRegistriesOperations +from ._export_pipelines_operations import ExportPipelinesOperations +from ._registries_operations import RegistriesOperations +from ._import_pipelines_operations import ImportPipelinesOperations +from ._operations import Operations +from ._pipeline_runs_operations import PipelineRunsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._replications_operations import ReplicationsOperations +from ._scope_maps_operations import ScopeMapsOperations +from ._tokens_operations import TokensOperations +from ._webhooks_operations import WebhooksOperations + +__all__ = [ + 'ConnectedRegistriesOperations', + 'ExportPipelinesOperations', + 'RegistriesOperations', + 'ImportPipelinesOperations', + 'Operations', + 'PipelineRunsOperations', + 'PrivateEndpointConnectionsOperations', + 'ReplicationsOperations', + 'ScopeMapsOperations', + 'TokensOperations', + 'WebhooksOperations', +] diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_connected_registries_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_connected_registries_operations.py new file mode 100644 index 000000000000..ef51d3997d05 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_connected_registries_operations.py @@ -0,0 +1,713 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ConnectedRegistriesOperations(object): + """ConnectedRegistriesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + registry_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ConnectedRegistryListResult"] + """Lists all connected registries for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param filter: An OData filter expression that describes a subset of connectedRegistries to + return. The parameters that can be filtered are parent.id (the resource id of the + connectedRegistry parent), mode, and connectionState. The supported operator is eq. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConnectedRegistryListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ConnectedRegistryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries'} # type: ignore + + def get( + self, + resource_group_name, # type: str + registry_name, # type: str + connected_registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectedRegistry" + """Gets the properties of the connected registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectedRegistry, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + connected_registry_name, # type: str + connected_registry_create_parameters, # type: "_models.ConnectedRegistry" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectedRegistry" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connected_registry_create_parameters, 'ConnectedRegistry') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + registry_name, # type: str + connected_registry_name, # type: str + connected_registry_create_parameters, # type: "_models.ConnectedRegistry" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ConnectedRegistry"] + """Creates a connected registry for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :param connected_registry_create_parameters: The parameters for creating a connectedRegistry. + :type connected_registry_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ConnectedRegistry or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + connected_registry_create_parameters=connected_registry_create_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + connected_registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + registry_name, # type: str + connected_registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a connected registry from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + connected_registry_name, # type: str + connected_registry_update_parameters, # type: "_models.ConnectedRegistryUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectedRegistry" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connected_registry_update_parameters, 'ConnectedRegistryUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + registry_name, # type: str + connected_registry_name, # type: str + connected_registry_update_parameters, # type: "_models.ConnectedRegistryUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ConnectedRegistry"] + """Updates a connected registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :param connected_registry_update_parameters: The parameters for updating a connectedRegistry. + :type connected_registry_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistryUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ConnectedRegistry or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ConnectedRegistry] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedRegistry"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + connected_registry_update_parameters=connected_registry_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ConnectedRegistry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}'} # type: ignore + + def _deactivate_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + connected_registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self._deactivate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _deactivate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate'} # type: ignore + + def begin_deactivate( + self, + resource_group_name, # type: str + registry_name, # type: str + connected_registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deactivates the connected registry instance. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param connected_registry_name: The name of the connected registry. + :type connected_registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._deactivate_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + connected_registry_name=connected_registry_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'connectedRegistryName': self._serialize.url("connected_registry_name", connected_registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_deactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/connectedRegistries/{connectedRegistryName}/deactivate'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_inbound_nat_rules_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_export_pipelines_operations.py similarity index 68% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_inbound_nat_rules_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_export_pipelines_operations.py index c0b2590d4624..1ac738c9f037 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_inbound_nat_rules_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_export_pipelines_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class InboundNatRulesOperations(object): - """InboundNatRulesOperations operations. +class ExportPipelinesOperations(object): + """ExportPipelinesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,28 +50,29 @@ def __init__(self, client, config, serializer, deserializer): def list( self, resource_group_name, # type: str - load_balancer_name, # type: str + registry_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.InboundNatRuleListResult"] - """Gets all the inbound nat rules in a load balancer. + # type: (...) -> Iterable["_models.ExportPipelineListResult"] + """Lists all export pipelines for the specified container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either InboundNatRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.InboundNatRuleListResult] + :return: An iterator like instance of either ExportPipelineListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipelineListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExportPipelineListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-08-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -82,9 +83,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -99,7 +100,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('InboundNatRuleListResult', pipeline_response) + deserialized = self._deserialize('ExportPipelineListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,30 +121,45 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines'} # type: ignore - def _delete_initial( + def get( self, resource_group_name, # type: str - load_balancer_name, # type: str - inbound_nat_rule_name, # type: str + registry_name, # type: str + export_pipeline_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.ExportPipeline" + """Gets the properties of the export pipeline. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. + :type export_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExportPipeline, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExportPipeline"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -153,58 +169,127 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('ExportPipeline', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore - def begin_delete( + def _create_initial( self, resource_group_name, # type: str - load_balancer_name, # type: str - inbound_nat_rule_name, # type: str + registry_name, # type: str + export_pipeline_name, # type: str + export_pipeline_create_parameters, # type: "_models.ExportPipeline" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified load balancer inbound nat rule. + # type: (...) -> "_models.ExportPipeline" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExportPipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - :param resource_group_name: The name of the resource group. + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(export_pipeline_create_parameters, 'ExportPipeline') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExportPipeline', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExportPipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + registry_name, # type: str + export_pipeline_name, # type: str + export_pipeline_create_parameters, # type: "_models.ExportPipeline" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ExportPipeline"] + """Creates an export pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. + :type export_pipeline_name: str + :param export_pipeline_create_parameters: The parameters for creating an export pipeline. + :type export_pipeline_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipeline :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either ExportPipeline or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ExportPipeline] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExportPipeline"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, + export_pipeline_create_parameters=export_pipeline_create_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -213,14 +298,17 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExportPipeline', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -235,101 +323,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore - def get( - self, - resource_group_name, # type: str - load_balancer_name, # type: str - inbound_nat_rule_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.InboundNatRule" - """Gets the specified load balancer inbound nat rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: InboundNatRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.InboundNatRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('InboundNatRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore - - def _create_or_update_initial( + def _delete_initial( self, resource_group_name, # type: str - load_balancer_name, # type: str - inbound_nat_rule_name, # type: str - inbound_nat_rule_parameters, # type: "_models.InboundNatRule" + registry_name, # type: str + export_pipeline_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.InboundNatRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-08-01-preview" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -339,75 +356,59 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(inbound_nat_rule_parameters, 'InboundNatRule') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('InboundNatRule', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('InboundNatRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore - def begin_create_or_update( + def begin_delete( self, resource_group_name, # type: str - load_balancer_name, # type: str - inbound_nat_rule_name, # type: str - inbound_nat_rule_parameters, # type: "_models.InboundNatRule" + registry_name, # type: str + export_pipeline_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.InboundNatRule"] - """Creates or updates a load balancer inbound nat rule. + # type: (...) -> LROPoller[None] + """Deletes an export pipeline from a container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound nat - rule operation. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2017_09_01.models.InboundNatRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param export_pipeline_name: The name of the export pipeline. + :type export_pipeline_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.InboundNatRule] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, - inbound_nat_rule_parameters=inbound_nat_rule_parameters, + registry_name=registry_name, + export_pipeline_name=export_pipeline_name, cls=lambda x,y,z: x, **kwargs ) @@ -416,17 +417,14 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('InboundNatRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'exportPipelineName': self._serialize.url("export_pipeline_name", export_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -441,4 +439,4 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/exportPipelines/{exportPipelineName}'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_import_pipelines_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_import_pipelines_operations.py new file mode 100644 index 000000000000..daf44d9539c0 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_import_pipelines_operations.py @@ -0,0 +1,442 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ImportPipelinesOperations(object): + """ImportPipelinesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ImportPipelineListResult"] + """Lists all import pipelines for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ImportPipelineListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipelineListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImportPipelineListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ImportPipelineListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines'} # type: ignore + + def get( + self, + resource_group_name, # type: str + registry_name, # type: str + import_pipeline_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ImportPipeline" + """Gets the properties of the import pipeline. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. + :type import_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ImportPipeline, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImportPipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ImportPipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + import_pipeline_name, # type: str + import_pipeline_create_parameters, # type: "_models.ImportPipeline" + **kwargs # type: Any + ): + # type: (...) -> "_models.ImportPipeline" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImportPipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(import_pipeline_create_parameters, 'ImportPipeline') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ImportPipeline', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ImportPipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + registry_name, # type: str + import_pipeline_name, # type: str + import_pipeline_create_parameters, # type: "_models.ImportPipeline" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ImportPipeline"] + """Creates an import pipeline for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. + :type import_pipeline_name: str + :param import_pipeline_create_parameters: The parameters for creating an import pipeline. + :type import_pipeline_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipeline + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ImportPipeline or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportPipeline] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ImportPipeline"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + import_pipeline_create_parameters=import_pipeline_create_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ImportPipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + import_pipeline_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + registry_name, # type: str + import_pipeline_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes an import pipeline from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param import_pipeline_name: The name of the import pipeline. + :type import_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + import_pipeline_name=import_pipeline_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'importPipelineName': self._serialize.url("import_pipeline_name", import_pipeline_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importPipelines/{importPipelineName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_bgp_service_communities_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_bgp_service_communities_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_operations.py index a8c648324ca8..a85d150bbc2f 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_bgp_service_communities_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class BgpServiceCommunitiesOperations(object): - """BgpServiceCommunitiesOperations operations. +class Operations(object): + """Operations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,20 +49,20 @@ def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["_models.BgpServiceCommunityListResult"] - """Gets all the available bgp service communities. + # type: (...) -> Iterable["_models.OperationListResult"] + """Lists all of the available Azure Container Registry REST API operations. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BgpServiceCommunityListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.BgpServiceCommunityListResult] + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpServiceCommunityListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-08-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -73,10 +73,6 @@ def prepare_request(next_link=None): if not next_link: # Construct URL url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') @@ -89,7 +85,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('BgpServiceCommunityListResult', pipeline_response) + deserialized = self._deserialize('OperationListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,4 +106,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.ContainerRegistry/operations'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_pipeline_runs_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_pipeline_runs_operations.py new file mode 100644 index 000000000000..38e4153c9fc9 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_pipeline_runs_operations.py @@ -0,0 +1,442 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PipelineRunsOperations(object): + """PipelineRunsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PipelineRunListResult"] + """Lists all the pipeline runs for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PipelineRunListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRunListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineRunListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PipelineRunListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns'} # type: ignore + + def get( + self, + resource_group_name, # type: str + registry_name, # type: str + pipeline_run_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PipelineRun" + """Gets the detailed information for a given pipeline run. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. + :type pipeline_run_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineRun, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRun + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineRun"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + pipeline_run_name, # type: str + pipeline_run_create_parameters, # type: "_models.PipelineRun" + **kwargs # type: Any + ): + # type: (...) -> "_models.PipelineRun" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineRun"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(pipeline_run_create_parameters, 'PipelineRun') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PipelineRun', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PipelineRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + registry_name, # type: str + pipeline_run_name, # type: str + pipeline_run_create_parameters, # type: "_models.PipelineRun" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PipelineRun"] + """Creates a pipeline run for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. + :type pipeline_run_name: str + :param pipeline_run_create_parameters: The parameters for creating a pipeline run. + :type pipeline_run_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRun + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PipelineRun or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PipelineRun] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineRun"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + pipeline_run_create_parameters=pipeline_run_create_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PipelineRun', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + pipeline_run_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + registry_name, # type: str + pipeline_run_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a pipeline run from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param pipeline_run_name: The name of the pipeline run. + :type pipeline_run_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + pipeline_run_name=pipeline_run_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'pipelineRunName': self._serialize.url("pipeline_run_name", pipeline_run_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/pipelineRuns/{pipelineRunName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_peerings_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_private_endpoint_connections_operations.py similarity index 67% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_peerings_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_private_endpoint_connections_operations.py index 1bf372df425b..95a0c6e0476a 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_peerings_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_private_endpoint_connections_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkPeeringsOperations(object): - """VirtualNetworkPeeringsOperations operations. +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,157 +47,119 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def list( self, resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str + registry_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """List all private endpoint connections in a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-08-01-preview" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - def begin_delete( - self, - resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified virtual network peering. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the virtual network peering. - :type virtual_network_peering_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return ItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - virtual_network_peering_name=virtual_network_peering_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections'} # type: ignore def get( self, resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str + registry_name, # type: str + private_endpoint_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkPeering" - """Gets the specified virtual network peering. + # type: (...) -> "_models.PrivateEndpointConnection" + """Get the specified private endpoint connection associated with the container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the virtual network peering. - :type virtual_network_peering_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-08-01-preview" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -217,39 +179,39 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str - virtual_network_peering_parameters, # type: "_models.VirtualNetworkPeering" + registry_name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_connection, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkPeering" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + # type: (...) -> "_models.PrivateEndpointConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-08-01-preview" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -263,7 +225,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(virtual_network_peering_parameters, 'VirtualNetworkPeering') + body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -274,49 +236,50 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str - virtual_network_peering_parameters, # type: "_models.VirtualNetworkPeering" + registry_name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_connection, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetworkPeering"] - """Creates or updates a peering in the specified virtual network. + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + """Update the state of specified private endpoint connection associated with the container + registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the peering. - :type virtual_network_peering_name: str - :param virtual_network_peering_parameters: Parameters supplied to the create or update virtual - network peering operation. - :type virtual_network_peering_parameters: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering + :param registry_name: The name of the container registry. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + :type private_endpoint_connection: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkPeering or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering] + :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateEndpointConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -325,9 +288,9 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - virtual_network_peering_name=virtual_network_peering_name, - virtual_network_peering_parameters=virtual_network_peering_parameters, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, cls=lambda x,y,z: x, **kwargs ) @@ -336,17 +299,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -361,79 +324,120 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - def list( + def _delete_initial( self, resource_group_name, # type: str - virtual_network_name, # type: str + registry_name, # type: str + private_endpoint_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkPeeringListResult"] - """Gets all virtual network peerings in a virtual network. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkPeeringListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeeringListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeeringListResult"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-08-01-preview" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] - def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkPeeringListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if cls: + return cls(pipeline_response, None, {}) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - return pipeline_response + def begin_delete( + self, + resource_group_name, # type: str + registry_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified private endpoint connection associated with the container registry. - return ItemPaged( - get_next, extract_data + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_application_gateways_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_registries_operations.py similarity index 64% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_application_gateways_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_registries_operations.py index d0b31eec3015..26d9434a752d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_application_gateways_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_registries_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class ApplicationGatewaysOperations(object): - """ApplicationGatewaysOperations operations. +class RegistriesOperations(object): + """RegistriesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,10 +47,11 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def _import_image_initial( self, resource_group_name, # type: str - application_gateway_name, # type: str + registry_name, # type: str + parameters, # type: "_models.ImportImageParameters" **kwargs # type: Any ): # type: (...) -> None @@ -59,14 +60,15 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._import_image_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,33 +78,42 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ImportImageParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + _import_image_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage'} # type: ignore - def begin_delete( + def begin_import_image( self, resource_group_name, # type: str - application_gateway_name, # type: str + registry_name, # type: str + parameters, # type: "_models.ImportImageParameters" **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified application gateway. + """Copies an image to this container registry from the specified container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param parameters: The parameters specifying the image to copy and the source container + registry. + :type parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ImportImageParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -121,9 +132,10 @@ def begin_delete( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._import_image_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, + registry_name=registry_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -136,9 +148,9 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -153,219 +165,37 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + begin_import_image.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/importImage'} # type: ignore - def get( + def check_name_availability( self, - resource_group_name, # type: str - application_gateway_name, # type: str + registry_name_check_request, # type: "_models.RegistryNameCheckRequest" **kwargs # type: Any ): - # type: (...) -> "_models.ApplicationGateway" - """Gets the specified application gateway. + # type: (...) -> "_models.RegistryNameStatus" + """Checks whether the container registry name is available for use. The name must contain only + alphanumeric characters, be globally unique, and between 5 and 50 characters in length. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param registry_name_check_request: The object containing information for the availability + request. + :type registry_name_check_request: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryNameCheckRequest :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationGateway + :return: RegistryNameStatus, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryNameStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - application_gateway_name, # type: str - parameters, # type: "_models.ApplicationGateway" - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ApplicationGateway') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - application_gateway_name, # type: str - parameters, # type: "_models.ApplicationGateway" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ApplicationGateway"] - """Creates or updates the specified application gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param parameters: Parameters supplied to the create or update application gateway operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ApplicationGateway - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ApplicationGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - def _update_tags_initial( - self, - resource_group_name, # type: str - application_gateway_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryNameStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.check_name_availability.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -380,9 +210,9 @@ def _update_tags_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') + body_content = self._serialize.body(registry_name_check_request, 'RegistryNameCheckRequest') body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -390,107 +220,32 @@ def _update_tags_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGateway', pipeline_response) + deserialized = self._deserialize('RegistryNameStatus', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - application_gateway_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ApplicationGateway"] - """Updates the specified application gateway tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param parameters: Parameters supplied to update application gateway tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ApplicationGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/checkNameAvailability'} # type: ignore def list( self, - resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ApplicationGatewayListResult"] - """Lists all application gateways in a resource group. + # type: (...) -> Iterable["_models.RegistryListResult"] + """Lists all the container registries under the specified subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayListResult] + :return: An iterator like instance of either RegistryListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -502,7 +257,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -518,7 +272,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayListResult', pipeline_response) + deserialized = self._deserialize('RegistryListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -539,26 +293,30 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerRegistry/registries'} # type: ignore - def list_all( + def list_by_resource_group( self, + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ApplicationGatewayListResult"] - """Gets all the application gateways in a subscription. + # type: (...) -> Iterable["_models.RegistryListResult"] + """Lists all the container registries under the specified resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayListResult] + :return: An iterator like instance of either RegistryListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -568,9 +326,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -585,7 +344,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayListResult', pipeline_response) + deserialized = self._deserialize('RegistryListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -606,28 +365,41 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGateways'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries'} # type: ignore - def _start_initial( + def get( self, resource_group_name, # type: str - application_gateway_name, # type: str + registry_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.Registry" + """Gets the properties of the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Registry, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" + accept = "application/json" # Construct URL - url = self._start_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -637,54 +409,121 @@ def _start_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('Registry', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - def begin_start( + def _create_initial( self, resource_group_name, # type: str - application_gateway_name, # type: str + registry_name, # type: str + registry, # type: "_models.Registry" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Starts the specified application gateway. + # type: (...) -> "_models.Registry" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - :param resource_group_name: The name of the resource group. + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(registry, 'Registry') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Registry', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Registry', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + registry_name, # type: str + registry, # type: "_models.Registry" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Registry"] + """Creates a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param registry: The parameters for creating a container registry. + :type registry: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either Registry or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._start_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, + registry_name=registry_name, + registry=registry, cls=lambda x,y,z: x, **kwargs ) @@ -693,13 +532,16 @@ def begin_start( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Registry', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -714,12 +556,12 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/start'} # type: ignore + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - def _stop_initial( + def _delete_initial( self, resource_group_name, # type: str - application_gateway_name, # type: str + registry_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -728,14 +570,14 @@ def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" # Construct URL - url = self._stop_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -746,32 +588,33 @@ def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - def begin_stop( + def begin_delete( self, resource_group_name, # type: str - application_gateway_name, # type: str + registry_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Stops the specified application gateway in a resource group. + """Deletes a container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -790,9 +633,9 @@ def begin_stop( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._stop_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, + registry_name=registry_name, cls=lambda x,y,z: x, **kwargs ) @@ -805,9 +648,9 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -822,99 +665,105 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/stop'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - def _backend_health_initial( + def _update_initial( self, resource_group_name, # type: str - application_gateway_name, # type: str - expand=None, # type: Optional[str] + registry_name, # type: str + registry_update_parameters, # type: "_models.RegistryUpdateParameters" **kwargs # type: Any ): - # type: (...) -> Optional["_models.ApplicationGatewayBackendHealth"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealth"]] + # type: (...) -> "_models.Registry" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._backend_health_initial.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(registry_update_parameters, 'RegistryUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + deserialized = self._deserialize('Registry', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Registry', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _backend_health_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - def begin_backend_health( + def begin_update( self, resource_group_name, # type: str - application_gateway_name, # type: str - expand=None, # type: Optional[str] + registry_name, # type: str + registry_update_parameters, # type: "_models.RegistryUpdateParameters" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ApplicationGatewayBackendHealth"] - """Gets the backend health of the specified application gateway in a resource group. + # type: (...) -> LROPoller["_models.Registry"] + """Updates a container registry with the specified parameters. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. - :type expand: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param registry_update_parameters: The parameters for updating a container registry. + :type registry_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ApplicationGatewayBackendHealth or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealth] + :return: An instance of LROPoller that returns either Registry or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Registry] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealth"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Registry"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._backend_health_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - expand=expand, + registry_name=registry_name, + registry_update_parameters=registry_update_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -923,16 +772,16 @@ def begin_backend_health( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayBackendHealth', pipeline_response) + deserialized = self._deserialize('Registry', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -947,83 +796,41 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_backend_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}'} # type: ignore - def list_available_waf_rule_sets( - self, - **kwargs # type: Any - ): - # type: (...) -> "_models.ApplicationGatewayAvailableWafRuleSetsResult" - """Lists all available web application firewall rule sets. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewayAvailableWafRuleSetsResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayAvailableWafRuleSetsResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableWafRuleSetsResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json" - - # Construct URL - url = self.list_available_waf_rule_sets.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ApplicationGatewayAvailableWafRuleSetsResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - list_available_waf_rule_sets.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableWafRuleSets'} # type: ignore - - def list_available_ssl_options( + def list_usages( self, + resource_group_name, # type: str + registry_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ApplicationGatewayAvailableSslOptions" - """Lists available Ssl options for configuring Ssl policy. + # type: (...) -> "_models.RegistryUsageListResult" + """Gets the quota usages for the specified container registry. + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewayAvailableSslOptions, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayAvailableSslOptions + :return: RegistryUsageListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryUsageListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslOptions"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryUsageListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" accept = "application/json" # Construct URL - url = self.list_available_ssl_options.metadata['url'] # type: ignore + url = self.list_usages.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1043,32 +850,39 @@ def list_available_ssl_options( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGatewayAvailableSslOptions', pipeline_response) + deserialized = self._deserialize('RegistryUsageListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_available_ssl_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default'} # type: ignore + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listUsages'} # type: ignore - def list_available_ssl_predefined_policies( + def list_private_link_resources( self, + resource_group_name, # type: str + registry_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] - """Lists all SSL predefined policies for configuring Ssl policy. + # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] + """Lists the private link resources for a container registry. + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationGatewayAvailableSslPredefinedPolicies or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.PrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -1078,9 +892,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_available_ssl_predefined_policies.metadata['url'] # type: ignore + url = self.list_private_link_resources.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -1095,7 +911,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationGatewayAvailableSslPredefinedPolicies', pipeline_response) + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1116,36 +932,41 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_available_ssl_predefined_policies.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies'} # type: ignore + list_private_link_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/privateLinkResources'} # type: ignore - def get_ssl_predefined_policy( + def list_credentials( self, - predefined_policy_name, # type: str + resource_group_name, # type: str + registry_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ApplicationGatewaySslPredefinedPolicy" - """Gets Ssl predefined policy with the specified policy name. + # type: (...) -> "_models.RegistryListCredentialsResult" + """Lists the login credentials for the specified container registry. - :param predefined_policy_name: Name of Ssl predefined policy. - :type predefined_policy_name: str + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationGatewaySslPredefinedPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPredefinedPolicy + :return: RegistryListCredentialsResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryListCredentialsResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewaySslPredefinedPolicy"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryListCredentialsResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" accept = "application/json" # Construct URL - url = self.get_ssl_predefined_policy.metadata['url'] # type: ignore + url = self.list_credentials.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'predefinedPolicyName': self._serialize.url("predefined_policy_name", predefined_policy_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1157,7 +978,7 @@ def get_ssl_predefined_policy( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1165,10 +986,208 @@ def get_ssl_predefined_policy( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationGatewaySslPredefinedPolicy', pipeline_response) + deserialized = self._deserialize('RegistryListCredentialsResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_ssl_predefined_policy.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableSslOptions/default/predefinedPolicies/{predefinedPolicyName}'} # type: ignore + list_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/listCredentials'} # type: ignore + + def regenerate_credential( + self, + resource_group_name, # type: str + registry_name, # type: str + regenerate_credential_parameters, # type: "_models.RegenerateCredentialParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.RegistryListCredentialsResult" + """Regenerates one of the login credentials for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param regenerate_credential_parameters: Specifies name of the password which should be + regenerated -- password or password2. + :type regenerate_credential_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegenerateCredentialParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RegistryListCredentialsResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.RegistryListCredentialsResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistryListCredentialsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_credential.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(regenerate_credential_parameters, 'RegenerateCredentialParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RegistryListCredentialsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/regenerateCredential'} # type: ignore + + def _generate_credentials_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + generate_credentials_parameters, # type: "_models.GenerateCredentialsParameters" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.GenerateCredentialsResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GenerateCredentialsResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._generate_credentials_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(generate_credentials_parameters, 'GenerateCredentialsParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('GenerateCredentialsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _generate_credentials_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials'} # type: ignore + + def begin_generate_credentials( + self, + resource_group_name, # type: str + registry_name, # type: str + generate_credentials_parameters, # type: "_models.GenerateCredentialsParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.GenerateCredentialsResult"] + """Generate keys for a token of a specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param generate_credentials_parameters: The parameters for generating credentials. + :type generate_credentials_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.GenerateCredentialsParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either GenerateCredentialsResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.GenerateCredentialsResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.GenerateCredentialsResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._generate_credentials_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + generate_credentials_parameters=generate_credentials_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('GenerateCredentialsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_generate_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/generateCredentials'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_replications_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_replications_operations.py new file mode 100644 index 000000000000..ad17cc2bc03e --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_replications_operations.py @@ -0,0 +1,580 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ReplicationsOperations(object): + """ReplicationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ReplicationListResult"] + """Lists all the replications for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ReplicationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ReplicationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ReplicationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ReplicationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications'} # type: ignore + + def get( + self, + resource_group_name, # type: str + registry_name, # type: str + replication_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Replication" + """Gets the properties of the specified replication. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Replication, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + replication_name, # type: str + replication, # type: "_models.Replication" + **kwargs # type: Any + ): + # type: (...) -> "_models.Replication" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(replication, 'Replication') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Replication', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + registry_name, # type: str + replication_name, # type: str + replication, # type: "_models.Replication" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Replication"] + """Creates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :param replication: The parameters for creating a replication. + :type replication: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Replication or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + replication=replication, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + replication_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + registry_name, # type: str + replication_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a replication from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + replication_name, # type: str + replication_update_parameters, # type: "_models.ReplicationUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.Replication" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(replication_update_parameters, 'ReplicationUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Replication', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + registry_name, # type: str + replication_name, # type: str + replication_update_parameters, # type: "_models.ReplicationUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Replication"] + """Updates a replication for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param replication_name: The name of the replication. + :type replication_name: str + :param replication_update_parameters: The parameters for updating a replication. + :type replication_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ReplicationUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Replication or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Replication] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Replication"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + replication_name=replication_name, + replication_update_parameters=replication_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Replication', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'replicationName': self._serialize.url("replication_name", replication_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/replications/{replicationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_filter_rules_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_scope_maps_operations.py similarity index 67% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_filter_rules_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_scope_maps_operations.py index b7bc0ffae281..05ff6c919131 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_filter_rules_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_scope_maps_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class RouteFilterRulesOperations(object): - """RouteFilterRulesOperations operations. +class ScopeMapsOperations(object): + """ScopeMapsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,157 +47,119 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def list( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str + registry_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Iterable["_models.ScopeMapListResult"] + """Lists all the scope maps for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ScopeMapListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMapListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMapListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = self._deserialize('ScopeMapListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - def begin_delete( - self, - resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified rule from a route filter. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return ItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps'} # type: ignore def get( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str + registry_name, # type: str + scope_map_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilterRule" - """Gets the specified rule from a route filter. + # type: (...) -> "_models.ScopeMap" + """Gets the properties of the specified scope map. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param scope_map_name: The name of the scope map. + :type scope_map_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilterRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.RouteFilterRule + :return: ScopeMap, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -217,39 +179,39 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('ScopeMap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - def _create_or_update_initial( + def _create_initial( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.RouteFilterRule" + registry_name, # type: str + scope_map_name, # type: str + scope_map_create_parameters, # type: "_models.ScopeMap" **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilterRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + # type: (...) -> "_models.ScopeMap" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -263,7 +225,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') + body_content = self._serialize.body(scope_map_create_parameters, 'ScopeMap') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -274,60 +236,60 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('ScopeMap', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('ScopeMap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - def begin_create_or_update( + def begin_create( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.RouteFilterRule" + registry_name, # type: str + scope_map_name, # type: str + scope_map_create_parameters, # type: "_models.ScopeMap" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.RouteFilterRule"] - """Creates or updates a route in the specified route filter. + # type: (...) -> LROPoller["_models.ScopeMap"] + """Creates a scope map for a container registry with the specified parameters. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the create or update route filter - rule operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_09_01.models.RouteFilterRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param scope_map_name: The name of the scope map. + :type scope_map_name: str + :param scope_map_create_parameters: The parameters for creating a scope map. + :type scope_map_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] + :return: An instance of LROPoller that returns either ScopeMap or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + registry_name=registry_name, + scope_map_name=scope_map_name, + scope_map_create_parameters=scope_map_create_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -336,17 +298,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('ScopeMap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -361,33 +323,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - def _update_initial( + def _delete_initial( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.PatchRouteFilterRule" + registry_name, # type: str + scope_map_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilterRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = "2021-08-01-preview" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -397,71 +356,59 @@ def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'PatchRouteFilterRule') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - def begin_update( + def begin_delete( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.PatchRouteFilterRule" + registry_name, # type: str + scope_map_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.RouteFilterRule"] - """Updates a route in the specified route filter. + # type: (...) -> LROPoller[None] + """Deletes a scope map from a container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the update route filter rule - operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_09_01.models.PatchRouteFilterRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param scope_map_name: The name of the scope map. + :type scope_map_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + registry_name=registry_name, + scope_map_name=scope_map_name, cls=lambda x,y,z: x, **kwargs ) @@ -470,17 +417,14 @@ def begin_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -495,79 +439,142 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore - def list_by_route_filter( + def _update_initial( self, resource_group_name, # type: str - route_filter_name, # type: str + registry_name, # type: str + scope_map_name, # type: str + scope_map_update_parameters, # type: "_models.ScopeMapUpdateParameters" **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteFilterRuleListResult"] - """Gets all RouteFilterRules in a route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteFilterRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] + # type: (...) -> "_models.ScopeMap" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_by_route_filter.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(scope_map_update_parameters, 'ScopeMapUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code == 200: + deserialized = self._deserialize('ScopeMap', pipeline_response) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 201: + deserialized = self._deserialize('ScopeMap', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return ItemPaged( - get_next, extract_data + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + registry_name, # type: str + scope_map_name, # type: str + scope_map_update_parameters, # type: "_models.ScopeMapUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ScopeMap"] + """Updates a scope map with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param scope_map_name: The name of the scope map. + :type scope_map_name: str + :param scope_map_update_parameters: The parameters for updating a scope map. + :type scope_map_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMapUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ScopeMap or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.ScopeMap] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScopeMap"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list_by_route_filter.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + scope_map_name=scope_map_name, + scope_map_update_parameters=scope_map_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ScopeMap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'scopeMapName': self._serialize.url("scope_map_name", scope_map_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-_]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/scopeMaps/{scopeMapName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_filter_rules_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_tokens_operations.py similarity index 68% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_filter_rules_operations.py rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_tokens_operations.py index b61b2214c67f..da8339f8925b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_filter_rules_operations.py +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_tokens_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class RouteFilterRulesOperations(object): - """RouteFilterRulesOperations operations. +class TokensOperations(object): + """TokensOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,157 +47,119 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def list( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str + registry_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Iterable["_models.TokenListResult"] + """Lists all the tokens for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either TokenListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TokenListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = self._deserialize('TokenListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - def begin_delete( - self, - resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified rule from a route filter. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return ItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens'} # type: ignore def get( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str + registry_name, # type: str + token_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilterRule" - """Gets the specified rule from a route filter. + # type: (...) -> "_models.Token" + """Gets the properties of the specified token. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param token_name: The name of the token. + :type token_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilterRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.RouteFilterRule + :return: Token, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -217,39 +179,39 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('Token', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - def _create_or_update_initial( + def _create_initial( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.RouteFilterRule" + registry_name, # type: str + token_name, # type: str + token_create_parameters, # type: "_models.Token" **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilterRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + # type: (...) -> "_models.Token" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -263,7 +225,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') + body_content = self._serialize.body(token_create_parameters, 'Token') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -274,60 +236,60 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('Token', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('Token', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - def begin_create_or_update( + def begin_create( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.RouteFilterRule" + registry_name, # type: str + token_name, # type: str + token_create_parameters, # type: "_models.Token" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.RouteFilterRule"] - """Creates or updates a route in the specified route filter. + # type: (...) -> LROPoller["_models.Token"] + """Creates a token for a container registry with the specified parameters. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the create or update route filter - rule operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_11_01.models.RouteFilterRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param token_name: The name of the token. + :type token_name: str + :param token_create_parameters: The parameters for creating a token. + :type token_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] + :return: An instance of LROPoller that returns either Token or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + registry_name=registry_name, + token_name=token_name, + token_create_parameters=token_create_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -336,17 +298,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) + deserialized = self._deserialize('Token', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -361,33 +323,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - def _update_initial( + def _delete_initial( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.PatchRouteFilterRule" + registry_name, # type: str + token_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilterRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + api_version = "2021-08-01-preview" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -397,71 +356,59 @@ def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'PatchRouteFilterRule') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - def begin_update( + def begin_delete( self, resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.PatchRouteFilterRule" + registry_name, # type: str + token_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.RouteFilterRule"] - """Updates a route in the specified route filter. + # type: (...) -> LROPoller[None] + """Deletes a token from a container registry. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group to which the container registry + belongs. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the update route filter rule - operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_11_01.models.PatchRouteFilterRule + :param registry_name: The name of the container registry. + :type registry_name: str + :param token_name: The name of the token. + :type token_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, + registry_name=registry_name, + token_name=token_name, cls=lambda x,y,z: x, **kwargs ) @@ -470,17 +417,14 @@ def begin_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -495,79 +439,142 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore - def list_by_route_filter( + def _update_initial( self, resource_group_name, # type: str - route_filter_name, # type: str + registry_name, # type: str + token_name, # type: str + token_update_parameters, # type: "_models.TokenUpdateParameters" **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteFilterRuleListResult"] - """Gets all RouteFilterRules in a route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteFilterRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] + # type: (...) -> "_models.Token" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_by_route_filter.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(token_update_parameters, 'TokenUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code == 200: + deserialized = self._deserialize('Token', pipeline_response) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 201: + deserialized = self._deserialize('Token', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return ItemPaged( - get_next, extract_data + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + registry_name, # type: str + token_name, # type: str + token_update_parameters, # type: "_models.TokenUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Token"] + """Updates a token with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param token_name: The name of the token. + :type token_name: str + :param token_update_parameters: The parameters for updating a token. + :type token_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.TokenUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Token or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Token] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Token"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list_by_route_filter.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + token_name=token_name, + token_update_parameters=token_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Token', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'tokenName': self._serialize.url("token_name", token_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9-]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tokens/{tokenName}'} # type: ignore diff --git a/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_webhooks_operations.py b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_webhooks_operations.py new file mode 100644 index 000000000000..b3a2953f6c12 --- /dev/null +++ b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/operations/_webhooks_operations.py @@ -0,0 +1,788 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WebhooksOperations(object): + """WebhooksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerregistry.v2021_08_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + registry_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebhookListResult"] + """Lists all the webhooks for the specified container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebhookListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebhookListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebhookListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks'} # type: ignore + + def get( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Webhook" + """Gets the properties of the specified webhook. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Webhook, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.Webhook + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + def _create_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + webhook_create_parameters, # type: "_models.WebhookCreateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.Webhook" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(webhook_create_parameters, 'WebhookCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + def begin_create( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + webhook_create_parameters, # type: "_models.WebhookCreateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Webhook"] + """Creates a webhook for a container registry with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param webhook_create_parameters: The parameters for creating a webhook. + :type webhook_create_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Webhook or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_create_parameters=webhook_create_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a webhook from a container registry. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + webhook_update_parameters, # type: "_models.WebhookUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.Webhook" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(webhook_update_parameters, 'WebhookUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Webhook', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + webhook_update_parameters, # type: "_models.WebhookUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Webhook"] + """Updates a webhook with the specified parameters. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :param webhook_update_parameters: The parameters for updating a webhook. + :type webhook_update_parameters: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.WebhookUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Webhook or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerregistry.v2021_08_01_preview.models.Webhook] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Webhook"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + registry_name=registry_name, + webhook_name=webhook_name, + webhook_update_parameters=webhook_update_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Webhook', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}'} # type: ignore + + def ping( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.EventInfo" + """Triggers a ping event to be sent to the webhook. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EventInfo, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventInfo + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EventInfo"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.ping.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EventInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + ping.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/ping'} # type: ignore + + def list_events( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.EventListResult"] + """Lists recent events for the specified webhook. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EventListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerregistry.v2021_08_01_preview.models.EventListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EventListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_events.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('EventListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_events.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/listEvents'} # type: ignore + + def get_callback_config( + self, + resource_group_name, # type: str + registry_name, # type: str + webhook_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.CallbackConfig" + """Gets the configuration of service URI and custom headers for the webhook. + + :param resource_group_name: The name of the resource group to which the container registry + belongs. + :type resource_group_name: str + :param registry_name: The name of the container registry. + :type registry_name: str + :param webhook_name: The name of the webhook. + :type webhook_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CallbackConfig, or the result of cls(response) + :rtype: ~azure.mgmt.containerregistry.v2021_08_01_preview.models.CallbackConfig + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CallbackConfig"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_callback_config.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'registryName': self._serialize.url("registry_name", registry_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + 'webhookName': self._serialize.url("webhook_name", webhook_name, 'str', max_length=50, min_length=5, pattern=r'^[a-zA-Z0-9]*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CallbackConfig', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_callback_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/webhooks/{webhookName}/getCallbackConfig'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/py.typed b/sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/py.typed similarity index 100% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/py.typed rename to sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2021_08_01_preview/py.typed diff --git a/sdk/containerregistry/tests.yml b/sdk/containerregistry/tests.yml index e109e59cac85..de14189c0332 100644 --- a/sdk/containerregistry/tests.yml +++ b/sdk/containerregistry/tests.yml @@ -3,10 +3,8 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false BuildTargetingString: azure-containerregistry ServiceDirectory: containerregistry - DeployArmTemplate: true SupportedClouds: 'Public,UsGov,China' EnvVars: AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) diff --git a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md index 852f055f5628..559a8bf1778d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md +++ b/sdk/containerservice/azure-mgmt-containerservice/CHANGELOG.md @@ -1,5 +1,17 @@ # Release History +## 16.3.0 (2021-10-18) + +**Features** + + - Model ManagedClusterWindowsProfile has a new parameter gmsa_profile + - Model Snapshot has a new parameter vm_size + - Model Snapshot has a new parameter os_type + - Model Snapshot has a new parameter os_sku + - Model Snapshot has a new parameter kubernetes_version + - Model Snapshot has a new parameter node_image_version + - Model Snapshot has a new parameter enable_fips + ## 16.2.0 (2021-09-09) **Features** diff --git a/sdk/containerservice/azure-mgmt-containerservice/_meta.json b/sdk/containerservice/azure-mgmt-containerservice/_meta.json index b3b1f583ddc1..c6221d5bbe6d 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/_meta.json +++ b/sdk/containerservice/azure-mgmt-containerservice/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "c800afa8bcc12ee1c3df0ec26fb012d48b93ce0c", + "commit": "287a3b54c9167c810455b7ed4afa295e162a0f18", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/containerservice/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/containerservice/resource-manager/readme.md" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py index 0ff066541854..6d65ad325f8c 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_container_service_client.py @@ -56,7 +56,7 @@ class ContainerServiceClient(MultiApiClientMixin, _SDKClient): :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2021-08-01' + DEFAULT_API_VERSION = '2021-09-01' _PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -120,6 +120,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2021-05-01: :mod:`v2021_05_01.models` * 2021-07-01: :mod:`v2021_07_01.models` * 2021-08-01: :mod:`v2021_08_01.models` + * 2021-09-01: :mod:`v2021_09_01.models` """ if api_version == '2017-07-01': from .v2017_07_01 import models @@ -202,6 +203,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-08-01': from .v2021_08_01 import models return models + elif api_version == '2021-09-01': + from .v2021_09_01 import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -228,6 +232,7 @@ def agent_pools(self): * 2021-05-01: :class:`AgentPoolsOperations` * 2021-07-01: :class:`AgentPoolsOperations` * 2021-08-01: :class:`AgentPoolsOperations` + * 2021-09-01: :class:`AgentPoolsOperations` """ api_version = self._get_api_version('agent_pools') if api_version == '2019-02-01': @@ -270,6 +275,8 @@ def agent_pools(self): from .v2021_07_01.operations import AgentPoolsOperations as OperationClass elif api_version == '2021-08-01': from .v2021_08_01.operations import AgentPoolsOperations as OperationClass + elif api_version == '2021-09-01': + from .v2021_09_01.operations import AgentPoolsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'agent_pools'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -297,6 +304,7 @@ def maintenance_configurations(self): * 2021-05-01: :class:`MaintenanceConfigurationsOperations` * 2021-07-01: :class:`MaintenanceConfigurationsOperations` * 2021-08-01: :class:`MaintenanceConfigurationsOperations` + * 2021-09-01: :class:`MaintenanceConfigurationsOperations` """ api_version = self._get_api_version('maintenance_configurations') if api_version == '2020-12-01': @@ -311,6 +319,8 @@ def maintenance_configurations(self): from .v2021_07_01.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2021-08-01': from .v2021_08_01.operations import MaintenanceConfigurationsOperations as OperationClass + elif api_version == '2021-09-01': + from .v2021_09_01.operations import MaintenanceConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'maintenance_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -341,6 +351,7 @@ def managed_clusters(self): * 2021-05-01: :class:`ManagedClustersOperations` * 2021-07-01: :class:`ManagedClustersOperations` * 2021-08-01: :class:`ManagedClustersOperations` + * 2021-09-01: :class:`ManagedClustersOperations` """ api_version = self._get_api_version('managed_clusters') if api_version == '2018-03-31': @@ -387,6 +398,8 @@ def managed_clusters(self): from .v2021_07_01.operations import ManagedClustersOperations as OperationClass elif api_version == '2021-08-01': from .v2021_08_01.operations import ManagedClustersOperations as OperationClass + elif api_version == '2021-09-01': + from .v2021_09_01.operations import ManagedClustersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_clusters'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -439,6 +452,7 @@ def operations(self): * 2021-05-01: :class:`Operations` * 2021-07-01: :class:`Operations` * 2021-08-01: :class:`Operations` + * 2021-09-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2018-03-31': @@ -485,6 +499,8 @@ def operations(self): from .v2021_07_01.operations import Operations as OperationClass elif api_version == '2021-08-01': from .v2021_08_01.operations import Operations as OperationClass + elif api_version == '2021-09-01': + from .v2021_09_01.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -503,6 +519,7 @@ def private_endpoint_connections(self): * 2021-05-01: :class:`PrivateEndpointConnectionsOperations` * 2021-07-01: :class:`PrivateEndpointConnectionsOperations` * 2021-08-01: :class:`PrivateEndpointConnectionsOperations` + * 2021-09-01: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2020-06-01': @@ -525,6 +542,8 @@ def private_endpoint_connections(self): from .v2021_07_01.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-08-01': from .v2021_08_01.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-09-01': + from .v2021_09_01.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -541,6 +560,7 @@ def private_link_resources(self): * 2021-05-01: :class:`PrivateLinkResourcesOperations` * 2021-07-01: :class:`PrivateLinkResourcesOperations` * 2021-08-01: :class:`PrivateLinkResourcesOperations` + * 2021-09-01: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2020-09-01': @@ -559,6 +579,8 @@ def private_link_resources(self): from .v2021_07_01.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2021-08-01': from .v2021_08_01.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-09-01': + from .v2021_09_01.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -575,6 +597,7 @@ def resolve_private_link_service_id(self): * 2021-05-01: :class:`ResolvePrivateLinkServiceIdOperations` * 2021-07-01: :class:`ResolvePrivateLinkServiceIdOperations` * 2021-08-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2021-09-01: :class:`ResolvePrivateLinkServiceIdOperations` """ api_version = self._get_api_version('resolve_private_link_service_id') if api_version == '2020-09-01': @@ -593,6 +616,8 @@ def resolve_private_link_service_id(self): from .v2021_07_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass elif api_version == '2021-08-01': from .v2021_08_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2021-09-01': + from .v2021_09_01.operations import ResolvePrivateLinkServiceIdOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'resolve_private_link_service_id'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -602,10 +627,13 @@ def snapshots(self): """Instance depends on the API version: * 2021-08-01: :class:`SnapshotsOperations` + * 2021-09-01: :class:`SnapshotsOperations` """ api_version = self._get_api_version('snapshots') if api_version == '2021-08-01': from .v2021_08_01.operations import SnapshotsOperations as OperationClass + elif api_version == '2021-09-01': + from .v2021_09_01.operations import SnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'snapshots'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py index b3440cace716..9ed13cd5fe52 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/_version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "16.2.0" +VERSION = "16.3.0" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py index ff3a561414fb..d64666991dc6 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/aio/_container_service_client.py @@ -54,7 +54,7 @@ class ContainerServiceClient(MultiApiClientMixin, _SDKClient): :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2021-08-01' + DEFAULT_API_VERSION = '2021-09-01' _PROFILE_TAG = "azure.mgmt.containerservice.ContainerServiceClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -118,6 +118,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2021-05-01: :mod:`v2021_05_01.models` * 2021-07-01: :mod:`v2021_07_01.models` * 2021-08-01: :mod:`v2021_08_01.models` + * 2021-09-01: :mod:`v2021_09_01.models` """ if api_version == '2017-07-01': from ..v2017_07_01 import models @@ -200,6 +201,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-08-01': from ..v2021_08_01 import models return models + elif api_version == '2021-09-01': + from ..v2021_09_01 import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -226,6 +230,7 @@ def agent_pools(self): * 2021-05-01: :class:`AgentPoolsOperations` * 2021-07-01: :class:`AgentPoolsOperations` * 2021-08-01: :class:`AgentPoolsOperations` + * 2021-09-01: :class:`AgentPoolsOperations` """ api_version = self._get_api_version('agent_pools') if api_version == '2019-02-01': @@ -268,6 +273,8 @@ def agent_pools(self): from ..v2021_07_01.aio.operations import AgentPoolsOperations as OperationClass elif api_version == '2021-08-01': from ..v2021_08_01.aio.operations import AgentPoolsOperations as OperationClass + elif api_version == '2021-09-01': + from ..v2021_09_01.aio.operations import AgentPoolsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'agent_pools'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -295,6 +302,7 @@ def maintenance_configurations(self): * 2021-05-01: :class:`MaintenanceConfigurationsOperations` * 2021-07-01: :class:`MaintenanceConfigurationsOperations` * 2021-08-01: :class:`MaintenanceConfigurationsOperations` + * 2021-09-01: :class:`MaintenanceConfigurationsOperations` """ api_version = self._get_api_version('maintenance_configurations') if api_version == '2020-12-01': @@ -309,6 +317,8 @@ def maintenance_configurations(self): from ..v2021_07_01.aio.operations import MaintenanceConfigurationsOperations as OperationClass elif api_version == '2021-08-01': from ..v2021_08_01.aio.operations import MaintenanceConfigurationsOperations as OperationClass + elif api_version == '2021-09-01': + from ..v2021_09_01.aio.operations import MaintenanceConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'maintenance_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -339,6 +349,7 @@ def managed_clusters(self): * 2021-05-01: :class:`ManagedClustersOperations` * 2021-07-01: :class:`ManagedClustersOperations` * 2021-08-01: :class:`ManagedClustersOperations` + * 2021-09-01: :class:`ManagedClustersOperations` """ api_version = self._get_api_version('managed_clusters') if api_version == '2018-03-31': @@ -385,6 +396,8 @@ def managed_clusters(self): from ..v2021_07_01.aio.operations import ManagedClustersOperations as OperationClass elif api_version == '2021-08-01': from ..v2021_08_01.aio.operations import ManagedClustersOperations as OperationClass + elif api_version == '2021-09-01': + from ..v2021_09_01.aio.operations import ManagedClustersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_clusters'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -437,6 +450,7 @@ def operations(self): * 2021-05-01: :class:`Operations` * 2021-07-01: :class:`Operations` * 2021-08-01: :class:`Operations` + * 2021-09-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2018-03-31': @@ -483,6 +497,8 @@ def operations(self): from ..v2021_07_01.aio.operations import Operations as OperationClass elif api_version == '2021-08-01': from ..v2021_08_01.aio.operations import Operations as OperationClass + elif api_version == '2021-09-01': + from ..v2021_09_01.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -501,6 +517,7 @@ def private_endpoint_connections(self): * 2021-05-01: :class:`PrivateEndpointConnectionsOperations` * 2021-07-01: :class:`PrivateEndpointConnectionsOperations` * 2021-08-01: :class:`PrivateEndpointConnectionsOperations` + * 2021-09-01: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2020-06-01': @@ -523,6 +540,8 @@ def private_endpoint_connections(self): from ..v2021_07_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-08-01': from ..v2021_08_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-09-01': + from ..v2021_09_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -539,6 +558,7 @@ def private_link_resources(self): * 2021-05-01: :class:`PrivateLinkResourcesOperations` * 2021-07-01: :class:`PrivateLinkResourcesOperations` * 2021-08-01: :class:`PrivateLinkResourcesOperations` + * 2021-09-01: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2020-09-01': @@ -557,6 +577,8 @@ def private_link_resources(self): from ..v2021_07_01.aio.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2021-08-01': from ..v2021_08_01.aio.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-09-01': + from ..v2021_09_01.aio.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -573,6 +595,7 @@ def resolve_private_link_service_id(self): * 2021-05-01: :class:`ResolvePrivateLinkServiceIdOperations` * 2021-07-01: :class:`ResolvePrivateLinkServiceIdOperations` * 2021-08-01: :class:`ResolvePrivateLinkServiceIdOperations` + * 2021-09-01: :class:`ResolvePrivateLinkServiceIdOperations` """ api_version = self._get_api_version('resolve_private_link_service_id') if api_version == '2020-09-01': @@ -591,6 +614,8 @@ def resolve_private_link_service_id(self): from ..v2021_07_01.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass elif api_version == '2021-08-01': from ..v2021_08_01.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass + elif api_version == '2021-09-01': + from ..v2021_09_01.aio.operations import ResolvePrivateLinkServiceIdOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'resolve_private_link_service_id'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -600,10 +625,13 @@ def snapshots(self): """Instance depends on the API version: * 2021-08-01: :class:`SnapshotsOperations` + * 2021-09-01: :class:`SnapshotsOperations` """ api_version = self._get_api_version('snapshots') if api_version == '2021-08-01': from ..v2021_08_01.aio.operations import SnapshotsOperations as OperationClass + elif api_version == '2021-09-01': + from ..v2021_09_01.aio.operations import SnapshotsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'snapshots'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py index 127a073e5bf5..38d4604dcf0f 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/models.py @@ -6,4 +6,4 @@ # -------------------------------------------------------------------------- from .v2017_07_01.models import * from .v2019_04_30.models import * -from .v2021_08_01.models import * +from .v2021_09_01.models import * diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models.py index 5e46c3f29cab..dcc69103dd79 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models.py @@ -57,9 +57,9 @@ class AgentPool(SubResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the - range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for - system pools. The default value is 1. + :param count: Desired Number of agents (VMs) specified to host docker containers. Allowed + values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to + 1000 (inclusive) for system pools. The default value is 1. :type count: int :param vm_size: VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted @@ -1627,9 +1627,9 @@ class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the - range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for - system pools. The default value is 1. + :param count: Desired Number of agents (VMs) specified to host docker containers. Allowed + values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to + 1000 (inclusive) for system pools. The default value is 1. :type count: int :param vm_size: VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted @@ -1862,9 +1862,9 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the - range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for - system pools. The default value is 1. + :param count: Desired Number of agents (VMs) specified to host docker containers. Allowed + values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to + 1000 (inclusive) for system pools. The default value is 1. :type count: int :param vm_size: VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models_py3.py index 0086dd7d2680..5b4b05b460ca 100644 --- a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models_py3.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_08_01/models/_models_py3.py @@ -62,9 +62,9 @@ class AgentPool(SubResource): :vartype name: str :ivar type: Resource type. :vartype type: str - :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the - range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for - system pools. The default value is 1. + :param count: Desired Number of agents (VMs) specified to host docker containers. Allowed + values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to + 1000 (inclusive) for system pools. The default value is 1. :type count: int :param vm_size: VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted @@ -1814,9 +1814,9 @@ class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the - range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for - system pools. The default value is 1. + :param count: Desired Number of agents (VMs) specified to host docker containers. Allowed + values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to + 1000 (inclusive) for system pools. The default value is 1. :type count: int :param vm_size: VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted @@ -2086,9 +2086,9 @@ class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): All required parameters must be populated in order to send to Azure. - :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the - range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for - system pools. The default value is 1. + :param count: Desired Number of agents (VMs) specified to host docker containers. Allowed + values must be in the range of 0 to 1000 (inclusive) for user pools and in the range of 1 to + 1000 (inclusive) for system pools. The default value is 1. :type count: int :param vm_size: VM size availability varies by region. If a node contains insufficient compute resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/__init__.py new file mode 100644 index 000000000000..eb3d7ba7a265 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_configuration.py new file mode 100644 index 000000000000..94fa86d82cb7 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_container_service_client.py new file mode 100644 index 000000000000..96f3c54e0be5 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_container_service_client.py @@ -0,0 +1,124 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import MaintenanceConfigurationsOperations +from .operations import AgentPoolsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ResolvePrivateLinkServiceIdOperations +from .operations import SnapshotsOperations +from . import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2021_09_01.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2021_09_01.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_09_01.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2021_09_01.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_09_01.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.containerservice.v2021_09_01.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_09_01.operations.ResolvePrivateLinkServiceIdOperations + :ivar snapshots: SnapshotsOperations operations + :vartype snapshots: azure.mgmt.containerservice.v2021_09_01.operations.SnapshotsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize) + self.snapshots = SnapshotsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> ContainerServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_metadata.json b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_metadata.json new file mode 100644 index 000000000000..812cf59222cf --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/_metadata.json @@ -0,0 +1,110 @@ +{ + "chosen_version": "2021-09-01", + "total_api_version_list": ["2021-09-01"], + "client": { + "name": "ContainerServiceClient", + "filename": "_container_service_client", + "description": "The Container Service Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ContainerServiceClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "operations": "Operations", + "managed_clusters": "ManagedClustersOperations", + "maintenance_configurations": "MaintenanceConfigurationsOperations", + "agent_pools": "AgentPoolsOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations", + "resolve_private_link_service_id": "ResolvePrivateLinkServiceIdOperations", + "snapshots": "SnapshotsOperations" + } +} \ No newline at end of file diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/__init__.py new file mode 100644 index 000000000000..4ad2bb20096a --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._container_service_client import ContainerServiceClient +__all__ = ['ContainerServiceClient'] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_configuration.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_configuration.py new file mode 100644 index 000000000000..40270e51dd83 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +VERSION = "unknown" + +class ContainerServiceClientConfiguration(Configuration): + """Configuration for ContainerServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(ContainerServiceClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-containerservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_container_service_client.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_container_service_client.py new file mode 100644 index 000000000000..43a61934ffbc --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/_container_service_client.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import ContainerServiceClientConfiguration +from .operations import Operations +from .operations import ManagedClustersOperations +from .operations import MaintenanceConfigurationsOperations +from .operations import AgentPoolsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ResolvePrivateLinkServiceIdOperations +from .operations import SnapshotsOperations +from .. import models + + +class ContainerServiceClient(object): + """The Container Service Client. + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.containerservice.v2021_09_01.aio.operations.Operations + :ivar managed_clusters: ManagedClustersOperations operations + :vartype managed_clusters: azure.mgmt.containerservice.v2021_09_01.aio.operations.ManagedClustersOperations + :ivar maintenance_configurations: MaintenanceConfigurationsOperations operations + :vartype maintenance_configurations: azure.mgmt.containerservice.v2021_09_01.aio.operations.MaintenanceConfigurationsOperations + :ivar agent_pools: AgentPoolsOperations operations + :vartype agent_pools: azure.mgmt.containerservice.v2021_09_01.aio.operations.AgentPoolsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.containerservice.v2021_09_01.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.containerservice.v2021_09_01.aio.operations.PrivateLinkResourcesOperations + :ivar resolve_private_link_service_id: ResolvePrivateLinkServiceIdOperations operations + :vartype resolve_private_link_service_id: azure.mgmt.containerservice.v2021_09_01.aio.operations.ResolvePrivateLinkServiceIdOperations + :ivar snapshots: SnapshotsOperations operations + :vartype snapshots: azure.mgmt.containerservice.v2021_09_01.aio.operations.SnapshotsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = ContainerServiceClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_clusters = ManagedClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.maintenance_configurations = MaintenanceConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.agent_pools = AgentPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resolve_private_link_service_id = ResolvePrivateLinkServiceIdOperations( + self._client, self._config, self._serialize, self._deserialize) + self.snapshots = SnapshotsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "ContainerServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/__init__.py new file mode 100644 index 000000000000..5e1e5e72fa59 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/__init__.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations +from ._agent_pools_operations import AgentPoolsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations +from ._snapshots_operations import SnapshotsOperations + +__all__ = [ + 'Operations', + 'ManagedClustersOperations', + 'MaintenanceConfigurationsOperations', + 'AgentPoolsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'ResolvePrivateLinkServiceIdOperations', + 'SnapshotsOperations', +] diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topic_event_subscriptions_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_agent_pools_operations.py similarity index 61% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topic_event_subscriptions_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_agent_pools_operations.py index 5a36e223330b..e28d9038a7c7 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topic_event_subscriptions_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_agent_pools_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PartnerTopicEventSubscriptionsOperations: - """PartnerTopicEventSubscriptionsOperations async operations. +class AgentPoolsOperations: + """AgentPoolsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~azure.mgmt.containerservice.v2021_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,44 +43,119 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AgentPoolListResult"]: + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + async def get( self, resource_group_name: str, - partner_topic_name: str, - event_subscription_name: str, + resource_name: str, + agent_pool_name: str, **kwargs: Any - ) -> "_models.EventSubscription": - """Get an event subscription of a partner topic. + ) -> "_models.AgentPool": + """Gets the specified managed cluster agent pool. - Get an event subscription of a partner topic. + Gets the specified managed cluster agent pool. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be found. Event subscription - names must be between 3 and 100 characters in length and use alphanumeric letters only. - :type event_subscription_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventSubscription, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventSubscription + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPool :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -100,28 +175,28 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('EventSubscription', pipeline_response) + deserialized = self._deserialize('AgentPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - partner_topic_name: str, - event_subscription_name: str, - event_subscription_info: "_models.EventSubscription", + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", **kwargs: Any - ) -> "_models.EventSubscription": - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] + ) -> "_models.AgentPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -129,9 +204,9 @@ async def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -145,60 +220,60 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(event_subscription_info, 'EventSubscription') + body_content = self._serialize.body(parameters, 'AgentPool') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('EventSubscription', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - partner_topic_name: str, - event_subscription_name: str, - event_subscription_info: "_models.EventSubscription", + resource_name: str, + agent_pool_name: str, + parameters: "_models.AgentPool", **kwargs: Any - ) -> AsyncLROPoller["_models.EventSubscription"]: - """Create or update an event subscription of a partner topic. + ) -> AsyncLROPoller["_models.AgentPool"]: + """Creates or updates an agent pool in the specified managed cluster. - Asynchronously creates or updates an event subscription of a partner topic with the specified - parameters. Existing event subscriptions will be updated with this API. + Creates or updates an agent pool in the specified managed cluster. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str - :param event_subscription_info: Event subscription properties containing the destination and - filter information. - :type event_subscription_info: ~azure.mgmt.eventgrid.models.EventSubscription + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either EventSubscription or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] + :return: An instance of AsyncLROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_09_01.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -207,9 +282,9 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - partner_topic_name=partner_topic_name, - event_subscription_name=event_subscription_name, - event_subscription_info=event_subscription_info, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -218,7 +293,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EventSubscription', pipeline_response) + deserialized = self._deserialize('AgentPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -226,9 +301,9 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -243,13 +318,13 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore async def _delete_initial( self, resource_group_name: str, - partner_topic_name: str, - event_subscription_name: str, + resource_name: str, + agent_pool_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -257,15 +332,16 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -275,39 +351,38 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - partner_topic_name: str, - event_subscription_name: str, + resource_name: str, + agent_pool_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Delete an event subscription of a partner topic. + """Deletes an agent pool in the specified managed cluster. - Delete an event subscription of a partner topic. + Deletes an agent pool in the specified managed cluster. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -328,8 +403,8 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - partner_topic_name=partner_topic_name, - event_subscription_name=event_subscription_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, cls=lambda x,y,z: x, **kwargs ) @@ -343,9 +418,9 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -360,32 +435,45 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore - async def _update_initial( + async def get_upgrade_profile( self, resource_group_name: str, - partner_topic_name: str, - event_subscription_name: str, - event_subscription_update_parameters: "_models.EventSubscriptionUpdateParameters", + resource_name: str, + agent_pool_name: str, **kwargs: Any - ) -> "_models.EventSubscription": - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] + ) -> "_models.AgentPoolUpgradeProfile": + """Gets the upgrade profile for an agent pool. + + Gets the upgrade profile for an agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - content_type = kwargs.pop("content_type", "application/json") + api_version = "2021-09-01" accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -395,147 +483,59 @@ async def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('EventSubscription', pipeline_response) + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore - - async def begin_update( - self, - resource_group_name: str, - partner_topic_name: str, - event_subscription_name: str, - event_subscription_update_parameters: "_models.EventSubscriptionUpdateParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.EventSubscription"]: - """Update event subscription of a partner topic. - - Update event subscription of a partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str - :param event_subscription_update_parameters: Updated event subscription information. - :type event_subscription_update_parameters: ~azure.mgmt.eventgrid.models.EventSubscriptionUpdateParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either EventSubscription or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventgrid.models.EventSubscription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - partner_topic_name=partner_topic_name, - event_subscription_name=event_subscription_name, - event_subscription_update_parameters=event_subscription_update_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EventSubscription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore - async def get_full_url( + async def get_available_agent_pool_versions( self, resource_group_name: str, - partner_topic_name: str, - event_subscription_name: str, + resource_name: str, **kwargs: Any - ) -> "_models.EventSubscriptionFullUrl": - """Get full URL of an event subscription of a partner topic. + ) -> "_models.AgentPoolAvailableVersions": + """Gets a list of supported Kubernetes versions for the specified agent pool. - Get the full endpoint URL for an event subscription of a partner topic. + See `supported Kubernetes versions + `_ for more details about + the version lifecycle. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventSubscriptionFullUrl, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventSubscriptionFullUrl + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolAvailableVersions :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionFullUrl"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" accept = "application/json" # Construct URL - url = self.get_full_url.metadata['url'] # type: ignore + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -547,7 +547,7 @@ async def get_full_url( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -555,146 +555,36 @@ async def get_full_url( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('EventSubscriptionFullUrl', pipeline_response) + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_full_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl'} # type: ignore - - def list_by_partner_topic( - self, - resource_group_name: str, - partner_topic_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, - **kwargs: Any - ) -> AsyncIterable["_models.EventSubscriptionsListResult"]: - """List event subscriptions of a partner topic. - - List event subscriptions that belong to a specific partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EventSubscriptionsListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_partner_topic.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('EventSubscriptionsListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_by_partner_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions'} # type: ignore + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore - async def get_delivery_attributes( + async def _upgrade_node_image_version_initial( self, resource_group_name: str, - partner_topic_name: str, - event_subscription_name: str, + resource_name: str, + agent_pool_name: str, **kwargs: Any - ) -> "_models.DeliveryAttributeListResult": - """Get delivery attributes for an event subscription of a partner topic. - - Get all delivery attributes for an event subscription of a partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeliveryAttributeListResult, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] + ) -> Optional["_models.AgentPool"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" accept = "application/json" # Construct URL - url = self.get_delivery_attributes.metadata['url'] # type: ignore + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -710,14 +600,92 @@ async def get_delivery_attributes( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('AgentPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_delivery_attributes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes'} # type: ignore + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + async def begin_upgrade_node_image_version( + self, + resource_group_name: str, + resource_name: str, + agent_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.AgentPool"]: + """Upgrades the node image version of an agent pool to the latest. + + Upgrading the node image version of an agent pool applies the newest OS and runtime updates to + the nodes. AKS provides one new image per week with the latest updates. For more details on + node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_maintenance_configurations_operations.py new file mode 100644 index 000000000000..ff6253b9be3b --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_maintenance_configurations_operations.py @@ -0,0 +1,315 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MaintenanceConfigurationsOperations: + """MaintenanceConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_managed_cluster( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.MaintenanceConfigurationListResult"]: + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_managed_cluster.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Gets the specified maintenance configuration of a managed cluster. + + Gets the specified maintenance configuration of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + parameters: "_models.MaintenanceConfiguration", + **kwargs: Any + ) -> "_models.MaintenanceConfiguration": + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: The maintenance configuration to create or update. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_name: str, + config_name: str, + **kwargs: Any + ) -> None: + """Deletes a maintenance configuration. + + Deletes a maintenance configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_watchers_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_managed_clusters_operations.py similarity index 58% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_watchers_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_managed_clusters_operations.py index aaea7c6a8453..2fb988a55e38 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_watchers_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_managed_clusters_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NetworkWatchersOperations: - """NetworkWatchersOperations async operations. +class ManagedClustersOperations: + """ManagedClustersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.containerservice.v2021_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,107 +43,240 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def create_or_update( + async def get_os_options( self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.NetworkWatcher", + location: str, + resource_type: Optional[str] = None, **kwargs: Any - ) -> "_models.NetworkWatcher": - """Creates or updates a network watcher in the specified resource group. + ) -> "_models.OSOptionProfile": + """Gets supported OS options in the specified subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the network watcher resource. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.NetworkWatcher + Gets supported OS options in the specified subscription. + + :param location: The name of a supported Azure region. + :type location: str + :param resource_type: The resource type for which the OS options needs to be returned. + :type resource_type: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkWatcher + :return: OSOptionProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.OSOptionProfile :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OSOptionProfile"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.get_os_options.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if resource_type is not None: + query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkWatcher') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('NetworkWatcher', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('NetworkWatcher', pipeline_response) + deserialized = self._deserialize('OSOptionProfile', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore + get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} # type: ignore - async def get( + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedClusterListResult"]: + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + async def get_upgrade_profile( self, resource_group_name: str, - network_watcher_name: str, + resource_name: str, **kwargs: Any - ) -> "_models.NetworkWatcher": - """Gets the specified network watcher by resource group. + ) -> "_models.ManagedClusterUpgradeProfile": + """Gets the upgrade profile of a managed cluster. + + Gets the upgrade profile of a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkWatcher + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterUpgradeProfile :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -163,33 +296,54 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkWatcher', pipeline_response) + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore - async def _delete_initial( + async def get_access_profile( self, resource_group_name: str, - network_watcher_name: str, + resource_name: str, + role_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.ManagedClusterAccessProfile": + """Gets an access profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Instead use `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get_access_profile.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -199,135 +353,74 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore - async def begin_delete( + async def list_cluster_admin_credentials( self, resource_group_name: str, - network_watcher_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified network watcher resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + ) -> "_models.CredentialResults": + """Lists the admin credentials of a managed cluster. - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - async def update_tags( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> "_models.NetworkWatcher": - """Updates a network watcher tags. + Lists the admin credentials of a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters supplied to update network watcher tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkWatcher + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.CredentialResults :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self.update_tags.metadata['url'] # type: ignore + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -335,185 +428,177 @@ async def update_tags( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkWatcher', pipeline_response) + deserialized = self._deserialize('CredentialResults', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore - def list( + async def list_cluster_user_credentials( self, resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.NetworkWatcherListResult"]: - """Gets all network watchers by resource group. + ) -> "_models.CredentialResults": + """Lists the user credentials of a managed cluster. + + Lists the user credentials of a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkWatcherListResult] + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.CredentialResults :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkWatcherListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('CredentialResults', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers'} # type: ignore + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore - def list_all( + async def list_cluster_monitoring_user_credentials( self, + resource_group_name: str, + resource_name: str, + server_fqdn: Optional[str] = None, **kwargs: Any - ) -> AsyncIterable["_models.NetworkWatcherListResult"]: - """Gets all network watchers by subscription. + ) -> "_models.CredentialResults": + """Lists the cluster monitoring user credentials of a managed cluster. + Lists the cluster monitoring user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkWatcherListResult] + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.CredentialResults :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkWatcherListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('CredentialResults', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers'} # type: ignore + return deserialized + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore - async def get_topology( + async def get( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.TopologyParameters", + resource_name: str, **kwargs: Any - ) -> "_models.Topology": - """Gets the current network topology by resource group. + ) -> "_models.ManagedCluster": + """Gets a managed cluster. + + Gets a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the representation of topology. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TopologyParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Topology, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.Topology + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Topology"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self.get_topology.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -523,13 +608,9 @@ async def get_topology( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TopologyParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -537,36 +618,36 @@ async def get_topology( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Topology', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_topology.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - async def _verify_ip_flow_initial( + async def _create_or_update_initial( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.VerificationIPFlowParameters", + resource_name: str, + parameters: "_models.ManagedCluster", **kwargs: Any - ) -> "_models.VerificationIPFlowResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._verify_ip_flow_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -580,64 +661,66 @@ async def _verify_ip_flow_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VerificationIPFlowParameters') + body_content = self._serialize.body(parameters, 'ManagedCluster') body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if response.status_code == 202: - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _verify_ip_flow_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - async def begin_verify_ip_flow( + async def begin_create_or_update( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.VerificationIPFlowParameters", + resource_name: str, + parameters: "_models.ManagedCluster", **kwargs: Any - ) -> AsyncLROPoller["_models.VerificationIPFlowResult"]: - """Verify IP flow from the specified VM to a location given the currently configured NSG rules. + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the IP flow to be verified. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VerificationIPFlowParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: The managed cluster to create or update. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VerificationIPFlowResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.VerificationIPFlowResult] + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._verify_ip_flow_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -647,16 +730,16 @@ async def begin_verify_ip_flow( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -671,30 +754,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_verify_ip_flow.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - async def _get_next_hop_initial( + async def _update_tags_initial( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.NextHopParameters", + resource_name: str, + parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.NextHopResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] + ) -> "_models.ManagedCluster": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._get_next_hop_initial.metadata['url'] # type: ignore + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -708,64 +791,62 @@ async def _get_next_hop_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NextHopParameters') + body_content = self._serialize.body(parameters, 'TagsObject') body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('NextHopResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('NextHopResult', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_next_hop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - async def begin_get_next_hop( + async def begin_update_tags( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.NextHopParameters", + resource_name: str, + parameters: "_models.TagsObject", **kwargs: Any - ) -> AsyncLROPoller["_models.NextHopResult"]: - """Gets the next hop from the specified VM. + ) -> AsyncLROPoller["_models.ManagedCluster"]: + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the source and destination endpoint. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.NextHopParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NextHopResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.NextHopResult] + :return: An instance of AsyncLROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_next_hop_initial( + raw_result = await self._update_tags_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -775,16 +856,16 @@ async def begin_get_next_hop( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NextHopResult', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -799,30 +880,28 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_next_hop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop'} # type: ignore + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - async def _get_vm_security_rules_initial( + async def _delete_initial( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.SecurityGroupViewParameters", + resource_name: str, **kwargs: Any - ) -> "_models.SecurityGroupViewResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._get_vm_security_rules_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -832,69 +911,56 @@ async def _get_vm_security_rules_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SecurityGroupViewParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_vm_security_rules_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - async def begin_get_vm_security_rules( + async def begin_delete( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.SecurityGroupViewParameters", + resource_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.SecurityGroupViewResult"]: - """Gets the configured and effective security group rules on the specified VM. + ) -> AsyncLROPoller[None]: + """Deletes a managed cluster. + + Deletes a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the VM to check security groups for. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.SecurityGroupViewParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either SecurityGroupViewResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.SecurityGroupViewResult] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_vm_security_rules_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, cls=lambda x,y,z: x, **kwargs ) @@ -903,16 +969,13 @@ async def begin_get_vm_security_rules( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -927,30 +990,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_vm_security_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - async def _get_troubleshooting_initial( + async def _reset_service_principal_profile_initial( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.TroubleshootingParameters", + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", **kwargs: Any - ) -> "_models.TroubleshootingResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._get_troubleshooting_initial.metadata['url'] # type: ignore + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -964,7 +1027,7 @@ async def _get_troubleshooting_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TroubleshootingParameters') + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -974,54 +1037,49 @@ async def _get_troubleshooting_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_troubleshooting_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot'} # type: ignore + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore - async def begin_get_troubleshooting( + async def begin_reset_service_principal_profile( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.TroubleshootingParameters", + resource_name: str, + parameters: "_models.ManagedClusterServicePrincipalProfile", **kwargs: Any - ) -> AsyncLROPoller["_models.TroubleshootingResult"]: - """Initiate troubleshooting on a specified resource. + ) -> AsyncLROPoller[None]: + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the resource to troubleshoot. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TroubleshootingParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterServicePrincipalProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.TroubleshootingResult] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_troubleshooting_initial( + raw_result = await self._reset_service_principal_profile_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -1031,16 +1089,13 @@ async def begin_get_troubleshooting( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1055,30 +1110,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_troubleshooting.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot'} # type: ignore + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore - async def _get_troubleshooting_result_initial( + async def _reset_aad_profile_initial( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.QueryTroubleshootingParameters", + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", **kwargs: Any - ) -> "_models.TroubleshootingResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._get_troubleshooting_result_initial.metadata['url'] # type: ignore + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1092,7 +1147,7 @@ async def _get_troubleshooting_result_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'QueryTroubleshootingParameters') + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1102,54 +1157,49 @@ async def _get_troubleshooting_result_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_troubleshooting_result_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult'} # type: ignore + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore - async def begin_get_troubleshooting_result( + async def begin_reset_aad_profile( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.QueryTroubleshootingParameters", + resource_name: str, + parameters: "_models.ManagedClusterAADProfile", **kwargs: Any - ) -> AsyncLROPoller["_models.TroubleshootingResult"]: - """Get the last completed troubleshooting result on a specified resource. + ) -> AsyncLROPoller[None]: + """Reset the AAD Profile of a managed cluster. + + Reset the AAD Profile of a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the resource to query the troubleshooting result. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.QueryTroubleshootingParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAADProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.TroubleshootingResult] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_troubleshooting_result_initial( + raw_result = await self._reset_aad_profile_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -1159,16 +1209,13 @@ async def begin_get_troubleshooting_result( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1183,30 +1230,28 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_troubleshooting_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult'} # type: ignore + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore - async def _set_flow_log_configuration_initial( + async def _rotate_cluster_certificates_initial( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.FlowLogInformation", + resource_name: str, **kwargs: Any - ) -> "_models.FlowLogInformation": - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._set_flow_log_configuration_initial.metadata['url'] # type: ignore + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1216,69 +1261,57 @@ async def _set_flow_log_configuration_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FlowLogInformation') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _set_flow_log_configuration_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog'} # type: ignore + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore - async def begin_set_flow_log_configuration( + async def begin_rotate_cluster_certificates( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.FlowLogInformation", + resource_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.FlowLogInformation"]: - """Configures flow log on a specified resource. + ) -> AsyncLROPoller[None]: + """Rotates the certificates of a managed cluster. - :param resource_group_name: The name of the network watcher resource group. + See `Certificate rotation `_ for + more details about rotating managed cluster certificates. + + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the configuration of flow log. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.FlowLogInformation + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.FlowLogInformation] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._set_flow_log_configuration_initial( + raw_result = await self._rotate_cluster_certificates_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, cls=lambda x,y,z: x, **kwargs ) @@ -1287,16 +1320,13 @@ async def begin_set_flow_log_configuration( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1311,30 +1341,28 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_flow_log_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog'} # type: ignore + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore - async def _get_flow_log_status_initial( + async def _stop_initial( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.FlowLogStatusParameters", + resource_name: str, **kwargs: Any - ) -> "_models.FlowLogInformation": - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._get_flow_log_status_initial.metadata['url'] # type: ignore + url = self._stop_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1344,69 +1372,60 @@ async def _get_flow_log_status_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FlowLogStatusParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_flow_log_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus'} # type: ignore + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore - async def begin_get_flow_log_status( + async def begin_stop( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.FlowLogStatusParameters", + resource_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.FlowLogInformation"]: - """Queries status of flow log on a specified resource. + ) -> AsyncLROPoller[None]: + """Stops a Managed Cluster. - :param resource_group_name: The name of the network watcher resource group. + This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a + cluster stops the control plane and agent nodes entirely, while maintaining all object and + cluster state. A cluster does not accrue charges while it is stopped. See `stopping a cluster + `_ for more details about stopping a + cluster. + + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define a resource to query flow log status. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.FlowLogStatusParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.FlowLogInformation] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_flow_log_status_initial( + raw_result = await self._stop_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, cls=lambda x,y,z: x, **kwargs ) @@ -1415,16 +1434,13 @@ async def begin_get_flow_log_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1439,30 +1455,28 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_flow_log_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus'} # type: ignore + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore - async def _check_connectivity_initial( + async def _start_initial( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.ConnectivityParameters", + resource_name: str, **kwargs: Any - ) -> "_models.ConnectivityInformation": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._check_connectivity_initial.metadata['url'] # type: ignore + url = self._start_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1472,70 +1486,57 @@ async def _check_connectivity_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectivityParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _check_connectivity_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck'} # type: ignore + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore - async def begin_check_connectivity( + async def begin_start( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.ConnectivityParameters", + resource_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.ConnectivityInformation"]: - """Verifies the possibility of establishing a direct TCP connection from a virtual machine to a - given endpoint including another VM or an arbitrary remote server. + ) -> AsyncLROPoller[None]: + """Starts a previously stopped Managed Cluster. - :param resource_group_name: The name of the network watcher resource group. + See `starting a cluster `_ for more + details about starting a cluster. + + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that determine how the connectivity check will be performed. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ConnectivityParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ConnectivityInformation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectivityInformation] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._check_connectivity_initial( + raw_result = await self._start_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, cls=lambda x,y,z: x, **kwargs ) @@ -1544,16 +1545,13 @@ async def begin_check_connectivity( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1568,30 +1566,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_check_connectivity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck'} # type: ignore + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore - async def _get_azure_reachability_report_initial( + async def _run_command_initial( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.AzureReachabilityReportParameters", + resource_name: str, + request_payload: "_models.RunCommandRequest", **kwargs: Any - ) -> "_models.AzureReachabilityReport": - cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureReachabilityReport"] + ) -> Optional["_models.RunCommandResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._get_azure_reachability_report_initial.metadata['url'] # type: ignore + url = self._run_command_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1605,7 +1603,7 @@ async def _get_azure_reachability_report_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AzureReachabilityReportParameters') + body_content = self._serialize.body(request_payload, 'RunCommandRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -1615,56 +1613,57 @@ async def _get_azure_reachability_report_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_azure_reachability_report_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport'} # type: ignore + _run_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore - async def begin_get_azure_reachability_report( + async def begin_run_command( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.AzureReachabilityReportParameters", + resource_name: str, + request_payload: "_models.RunCommandRequest", **kwargs: Any - ) -> AsyncLROPoller["_models.AzureReachabilityReport"]: - """Gets the relative latency score for internet service providers from a specified location to - Azure regions. + ) -> AsyncLROPoller["_models.RunCommandResult"]: + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. - :param resource_group_name: The name of the network watcher resource group. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that determine Azure reachability report configuration. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param request_payload: The run command request. + :type request_payload: ~azure.mgmt.containerservice.v2021_09_01.models.RunCommandRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either AzureReachabilityReport or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReport] + :return: An instance of AsyncLROPoller that returns either RunCommandResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.containerservice.v2021_09_01.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureReachabilityReport"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RunCommandResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_azure_reachability_report_initial( + raw_result = await self._run_command_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, + request_payload=request_payload, cls=lambda x,y,z: x, **kwargs ) @@ -1673,16 +1672,16 @@ async def begin_get_azure_reachability_report( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1697,30 +1696,45 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_azure_reachability_report.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport'} # type: ignore + begin_run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore - async def _list_available_providers_initial( + async def get_command_result( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.AvailableProvidersListParameters", + resource_name: str, + command_id: str, **kwargs: Any - ) -> "_models.AvailableProvidersList": - cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableProvidersList"] + ) -> Optional["_models.RunCommandResult"]: + """Gets the results of a command which has been run on the Managed Cluster. + + Gets the results of a command which has been run on the Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param command_id: Id of the command. + :type command_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.RunCommandResult or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._list_available_providers_initial.metadata['url'] # type: ignore + url = self.get_command_result.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1730,13 +1744,9 @@ async def _list_available_providers_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AvailableProvidersListParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1744,85 +1754,89 @@ async def _list_available_providers_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AvailableProvidersList', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_available_providers_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList'} # type: ignore + get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} # type: ignore - async def begin_list_available_providers( + def list_outbound_network_dependencies_endpoints( self, resource_group_name: str, - network_watcher_name: str, - parameters: "_models.AvailableProvidersListParameters", + resource_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.AvailableProvidersList"]: - """Lists all available internet service providers for a specified Azure region. + ) -> AsyncIterable["_models.OutboundEnvironmentEndpointCollection"]: + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. - :param resource_group_name: The name of the network watcher resource group. + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. + + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that scope the list of available providers. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.AvailableProvidersListParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either AvailableProvidersList or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.AvailableProvidersList] - :raises ~azure.core.exceptions.HttpResponseError: + :return: An iterator like instance of either OutboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.OutboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableProvidersList"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._list_available_providers_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + if not next_link: + # Construct URL + url = self.list_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + async def extract_data(pipeline_response): + deserialized = self._deserialize('OutboundEnvironmentEndpointCollection', pipeline_response) + list_of_elem = deserialized.value if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } + async def get_next(next_link=None): + request = prepare_request(next_link) - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_available_providers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList'} # type: ignore + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_operations.py new file mode 100644 index 000000000000..3b4ec0d14b27 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_operations.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Gets a list of operations. + + Gets a list of operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..8e3a7384394c --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,358 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionListResult": + """Gets a list of private endpoint connections in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Gets the specified private endpoint connection. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + resource_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a private endpoint connection. + + Deletes a private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..a247203e0afd --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_private_link_resources_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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourcesListResult": + """Gets a list of private link resources in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_resolve_private_link_service_id_operations.py new file mode 100644 index 000000000000..e0f019dcc159 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResolvePrivateLinkServiceIdOperations: + """ResolvePrivateLinkServiceIdOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def post( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.PrivateLinkResource", + **kwargs: Any + ) -> "_models.PrivateLinkResource": + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_snapshots_operations.py new file mode 100644 index 000000000000..506c178f49ad --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/aio/operations/_snapshots_operations.py @@ -0,0 +1,439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SnapshotsOperations: + """SnapshotsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.SnapshotListResult"]: + """Gets a list of snapshots in the specified subscription. + + Gets a list of snapshots in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.SnapshotListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.SnapshotListResult"]: + """Lists snapshots in the specified subscription and resource group. + + Lists snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.SnapshotListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.Snapshot": + """Gets a snapshot. + + Gets a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Snapshot', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.Snapshot", + **kwargs: Any + ) -> "_models.Snapshot": + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: The snapshot to create or update. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Snapshot') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Snapshot', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + resource_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.Snapshot": + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Snapshot', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + """Deletes a snapshot. + + Deletes a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/__init__.py new file mode 100644 index 000000000000..127eebcc7447 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/__init__.py @@ -0,0 +1,342 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AgentPool + from ._models_py3 import AgentPoolAvailableVersions + from ._models_py3 import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + from ._models_py3 import AgentPoolListResult + from ._models_py3 import AgentPoolUpgradeProfile + from ._models_py3 import AgentPoolUpgradeProfilePropertiesUpgradesItem + from ._models_py3 import AgentPoolUpgradeSettings + from ._models_py3 import CloudErrorBody + from ._models_py3 import ContainerServiceDiagnosticsProfile + from ._models_py3 import ContainerServiceLinuxProfile + from ._models_py3 import ContainerServiceMasterProfile + from ._models_py3 import ContainerServiceNetworkProfile + from ._models_py3 import ContainerServiceSshConfiguration + from ._models_py3 import ContainerServiceSshPublicKey + from ._models_py3 import ContainerServiceVMDiagnostics + from ._models_py3 import CreationData + from ._models_py3 import CredentialResult + from ._models_py3 import CredentialResults + from ._models_py3 import EndpointDependency + from ._models_py3 import EndpointDetail + from ._models_py3 import ExtendedLocation + from ._models_py3 import KubeletConfig + from ._models_py3 import LinuxOSConfig + from ._models_py3 import MaintenanceConfiguration + from ._models_py3 import MaintenanceConfigurationListResult + from ._models_py3 import ManagedCluster + from ._models_py3 import ManagedClusterAADProfile + from ._models_py3 import ManagedClusterAPIServerAccessProfile + from ._models_py3 import ManagedClusterAccessProfile + from ._models_py3 import ManagedClusterAddonProfile + from ._models_py3 import ManagedClusterAddonProfileIdentity + from ._models_py3 import ManagedClusterAgentPoolProfile + from ._models_py3 import ManagedClusterAgentPoolProfileProperties + from ._models_py3 import ManagedClusterAutoUpgradeProfile + from ._models_py3 import ManagedClusterHTTPProxyConfig + from ._models_py3 import ManagedClusterIdentity + from ._models_py3 import ManagedClusterListResult + from ._models_py3 import ManagedClusterLoadBalancerProfile + from ._models_py3 import ManagedClusterLoadBalancerProfileManagedOutboundIPs + from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPPrefixes + from ._models_py3 import ManagedClusterLoadBalancerProfileOutboundIPs + from ._models_py3 import ManagedClusterManagedOutboundIPProfile + from ._models_py3 import ManagedClusterNATGatewayProfile + from ._models_py3 import ManagedClusterPodIdentity + from ._models_py3 import ManagedClusterPodIdentityException + from ._models_py3 import ManagedClusterPodIdentityProfile + from ._models_py3 import ManagedClusterPodIdentityProvisioningError + from ._models_py3 import ManagedClusterPodIdentityProvisioningErrorBody + from ._models_py3 import ManagedClusterPodIdentityProvisioningInfo + from ._models_py3 import ManagedClusterPoolUpgradeProfile + from ._models_py3 import ManagedClusterPoolUpgradeProfileUpgradesItem + from ._models_py3 import ManagedClusterPropertiesAutoScalerProfile + from ._models_py3 import ManagedClusterSKU + from ._models_py3 import ManagedClusterSecurityProfile + from ._models_py3 import ManagedClusterSecurityProfileAzureDefender + from ._models_py3 import ManagedClusterServicePrincipalProfile + from ._models_py3 import ManagedClusterUpgradeProfile + from ._models_py3 import ManagedClusterWindowsProfile + from ._models_py3 import ManagedServiceIdentityUserAssignedIdentitiesValue + from ._models_py3 import OSOptionProfile + from ._models_py3 import OSOptionProperty + from ._models_py3 import OperationListResult + from ._models_py3 import OperationValue + from ._models_py3 import OutboundEnvironmentEndpoint + from ._models_py3 import OutboundEnvironmentEndpointCollection + from ._models_py3 import PowerState + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourcesListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import Resource + from ._models_py3 import ResourceReference + from ._models_py3 import RunCommandRequest + from ._models_py3 import RunCommandResult + from ._models_py3 import Snapshot + from ._models_py3 import SnapshotListResult + from ._models_py3 import SubResource + from ._models_py3 import SysctlConfig + from ._models_py3 import SystemData + from ._models_py3 import TagsObject + from ._models_py3 import TimeInWeek + from ._models_py3 import TimeSpan + from ._models_py3 import UserAssignedIdentity + from ._models_py3 import WindowsGmsaProfile +except (SyntaxError, ImportError): + from ._models import AgentPool # type: ignore + from ._models import AgentPoolAvailableVersions # type: ignore + from ._models import AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem # type: ignore + from ._models import AgentPoolListResult # type: ignore + from ._models import AgentPoolUpgradeProfile # type: ignore + from ._models import AgentPoolUpgradeProfilePropertiesUpgradesItem # type: ignore + from ._models import AgentPoolUpgradeSettings # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import ContainerServiceDiagnosticsProfile # type: ignore + from ._models import ContainerServiceLinuxProfile # type: ignore + from ._models import ContainerServiceMasterProfile # type: ignore + from ._models import ContainerServiceNetworkProfile # type: ignore + from ._models import ContainerServiceSshConfiguration # type: ignore + from ._models import ContainerServiceSshPublicKey # type: ignore + from ._models import ContainerServiceVMDiagnostics # type: ignore + from ._models import CreationData # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore + from ._models import EndpointDependency # type: ignore + from ._models import EndpointDetail # type: ignore + from ._models import ExtendedLocation # type: ignore + from ._models import KubeletConfig # type: ignore + from ._models import LinuxOSConfig # type: ignore + from ._models import MaintenanceConfiguration # type: ignore + from ._models import MaintenanceConfigurationListResult # type: ignore + from ._models import ManagedCluster # type: ignore + from ._models import ManagedClusterAADProfile # type: ignore + from ._models import ManagedClusterAPIServerAccessProfile # type: ignore + from ._models import ManagedClusterAccessProfile # type: ignore + from ._models import ManagedClusterAddonProfile # type: ignore + from ._models import ManagedClusterAddonProfileIdentity # type: ignore + from ._models import ManagedClusterAgentPoolProfile # type: ignore + from ._models import ManagedClusterAgentPoolProfileProperties # type: ignore + from ._models import ManagedClusterAutoUpgradeProfile # type: ignore + from ._models import ManagedClusterHTTPProxyConfig # type: ignore + from ._models import ManagedClusterIdentity # type: ignore + from ._models import ManagedClusterListResult # type: ignore + from ._models import ManagedClusterLoadBalancerProfile # type: ignore + from ._models import ManagedClusterLoadBalancerProfileManagedOutboundIPs # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPPrefixes # type: ignore + from ._models import ManagedClusterLoadBalancerProfileOutboundIPs # type: ignore + from ._models import ManagedClusterManagedOutboundIPProfile # type: ignore + from ._models import ManagedClusterNATGatewayProfile # type: ignore + from ._models import ManagedClusterPodIdentity # type: ignore + from ._models import ManagedClusterPodIdentityException # type: ignore + from ._models import ManagedClusterPodIdentityProfile # type: ignore + from ._models import ManagedClusterPodIdentityProvisioningError # type: ignore + from ._models import ManagedClusterPodIdentityProvisioningErrorBody # type: ignore + from ._models import ManagedClusterPodIdentityProvisioningInfo # type: ignore + from ._models import ManagedClusterPoolUpgradeProfile # type: ignore + from ._models import ManagedClusterPoolUpgradeProfileUpgradesItem # type: ignore + from ._models import ManagedClusterPropertiesAutoScalerProfile # type: ignore + from ._models import ManagedClusterSKU # type: ignore + from ._models import ManagedClusterSecurityProfile # type: ignore + from ._models import ManagedClusterSecurityProfileAzureDefender # type: ignore + from ._models import ManagedClusterServicePrincipalProfile # type: ignore + from ._models import ManagedClusterUpgradeProfile # type: ignore + from ._models import ManagedClusterWindowsProfile # type: ignore + from ._models import ManagedServiceIdentityUserAssignedIdentitiesValue # type: ignore + from ._models import OSOptionProfile # type: ignore + from ._models import OSOptionProperty # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationValue # type: ignore + from ._models import OutboundEnvironmentEndpoint # type: ignore + from ._models import OutboundEnvironmentEndpointCollection # type: ignore + from ._models import PowerState # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourcesListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceReference # type: ignore + from ._models import RunCommandRequest # type: ignore + from ._models import RunCommandResult # type: ignore + from ._models import Snapshot # type: ignore + from ._models import SnapshotListResult # type: ignore + from ._models import SubResource # type: ignore + from ._models import SysctlConfig # type: ignore + from ._models import SystemData # type: ignore + from ._models import TagsObject # type: ignore + from ._models import TimeInWeek # type: ignore + from ._models import TimeSpan # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._models import WindowsGmsaProfile # type: ignore + +from ._container_service_client_enums import ( + AgentPoolMode, + AgentPoolType, + Code, + ConnectionStatus, + ContainerServiceStorageProfileTypes, + ContainerServiceVMSizeTypes, + Count, + CreatedByType, + Expander, + ExtendedLocationTypes, + GPUInstanceProfile, + KubeletDiskType, + LicenseType, + LoadBalancerSku, + ManagedClusterPodIdentityProvisioningState, + ManagedClusterSKUName, + ManagedClusterSKUTier, + NetworkMode, + NetworkPlugin, + NetworkPolicy, + OSDiskType, + OSSKU, + OSType, + OutboundType, + PrivateEndpointConnectionProvisioningState, + PublicNetworkAccess, + ResourceIdentityType, + ScaleDownMode, + ScaleSetEvictionPolicy, + ScaleSetPriority, + SnapshotType, + UpgradeChannel, + WeekDay, + WorkloadRuntime, +) + +__all__ = [ + 'AgentPool', + 'AgentPoolAvailableVersions', + 'AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem', + 'AgentPoolListResult', + 'AgentPoolUpgradeProfile', + 'AgentPoolUpgradeProfilePropertiesUpgradesItem', + 'AgentPoolUpgradeSettings', + 'CloudErrorBody', + 'ContainerServiceDiagnosticsProfile', + 'ContainerServiceLinuxProfile', + 'ContainerServiceMasterProfile', + 'ContainerServiceNetworkProfile', + 'ContainerServiceSshConfiguration', + 'ContainerServiceSshPublicKey', + 'ContainerServiceVMDiagnostics', + 'CreationData', + 'CredentialResult', + 'CredentialResults', + 'EndpointDependency', + 'EndpointDetail', + 'ExtendedLocation', + 'KubeletConfig', + 'LinuxOSConfig', + 'MaintenanceConfiguration', + 'MaintenanceConfigurationListResult', + 'ManagedCluster', + 'ManagedClusterAADProfile', + 'ManagedClusterAPIServerAccessProfile', + 'ManagedClusterAccessProfile', + 'ManagedClusterAddonProfile', + 'ManagedClusterAddonProfileIdentity', + 'ManagedClusterAgentPoolProfile', + 'ManagedClusterAgentPoolProfileProperties', + 'ManagedClusterAutoUpgradeProfile', + 'ManagedClusterHTTPProxyConfig', + 'ManagedClusterIdentity', + 'ManagedClusterListResult', + 'ManagedClusterLoadBalancerProfile', + 'ManagedClusterLoadBalancerProfileManagedOutboundIPs', + 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes', + 'ManagedClusterLoadBalancerProfileOutboundIPs', + 'ManagedClusterManagedOutboundIPProfile', + 'ManagedClusterNATGatewayProfile', + 'ManagedClusterPodIdentity', + 'ManagedClusterPodIdentityException', + 'ManagedClusterPodIdentityProfile', + 'ManagedClusterPodIdentityProvisioningError', + 'ManagedClusterPodIdentityProvisioningErrorBody', + 'ManagedClusterPodIdentityProvisioningInfo', + 'ManagedClusterPoolUpgradeProfile', + 'ManagedClusterPoolUpgradeProfileUpgradesItem', + 'ManagedClusterPropertiesAutoScalerProfile', + 'ManagedClusterSKU', + 'ManagedClusterSecurityProfile', + 'ManagedClusterSecurityProfileAzureDefender', + 'ManagedClusterServicePrincipalProfile', + 'ManagedClusterUpgradeProfile', + 'ManagedClusterWindowsProfile', + 'ManagedServiceIdentityUserAssignedIdentitiesValue', + 'OSOptionProfile', + 'OSOptionProperty', + 'OperationListResult', + 'OperationValue', + 'OutboundEnvironmentEndpoint', + 'OutboundEnvironmentEndpointCollection', + 'PowerState', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResource', + 'PrivateLinkResourcesListResult', + 'PrivateLinkServiceConnectionState', + 'Resource', + 'ResourceReference', + 'RunCommandRequest', + 'RunCommandResult', + 'Snapshot', + 'SnapshotListResult', + 'SubResource', + 'SysctlConfig', + 'SystemData', + 'TagsObject', + 'TimeInWeek', + 'TimeSpan', + 'UserAssignedIdentity', + 'WindowsGmsaProfile', + 'AgentPoolMode', + 'AgentPoolType', + 'Code', + 'ConnectionStatus', + 'ContainerServiceStorageProfileTypes', + 'ContainerServiceVMSizeTypes', + 'Count', + 'CreatedByType', + 'Expander', + 'ExtendedLocationTypes', + 'GPUInstanceProfile', + 'KubeletDiskType', + 'LicenseType', + 'LoadBalancerSku', + 'ManagedClusterPodIdentityProvisioningState', + 'ManagedClusterSKUName', + 'ManagedClusterSKUTier', + 'NetworkMode', + 'NetworkPlugin', + 'NetworkPolicy', + 'OSDiskType', + 'OSSKU', + 'OSType', + 'OutboundType', + 'PrivateEndpointConnectionProvisioningState', + 'PublicNetworkAccess', + 'ResourceIdentityType', + 'ScaleDownMode', + 'ScaleSetEvictionPolicy', + 'ScaleSetPriority', + 'SnapshotType', + 'UpgradeChannel', + 'WeekDay', + 'WorkloadRuntime', +] diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_container_service_client_enums.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_container_service_client_enums.py new file mode 100644 index 000000000000..9eeb9d5f0677 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_container_service_client_enums.py @@ -0,0 +1,584 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AgentPoolMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """A cluster must have at least one 'System' Agent Pool at all times. For additional information + on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools + """ + + #: System agent pools are primarily for hosting critical system pods such as CoreDNS and + #: metrics-server. System agent pools osType must be Linux. System agent pools VM SKU must have at + #: least 2vCPUs and 4GB of memory. + SYSTEM = "System" + #: User agent pools are primarily for hosting your application pods. + USER = "User" + +class AgentPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of Agent Pool. + """ + + #: Create an Agent Pool backed by a Virtual Machine Scale Set. + VIRTUAL_MACHINE_SCALE_SETS = "VirtualMachineScaleSets" + #: Use of this is strongly discouraged. + AVAILABILITY_SET = "AvailabilitySet" + +class Code(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tells whether the cluster is Running or Stopped + """ + + #: The cluster is running. + RUNNING = "Running" + #: The cluster is stopped. + STOPPED = "Stopped" + +class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private link service connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +class ContainerServiceStorageProfileTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies what kind of storage to use. If omitted, the default will be chosen on your behalf + based on the choice of orchestrator. + """ + + STORAGE_ACCOUNT = "StorageAccount" + MANAGED_DISKS = "ManagedDisks" + +class ContainerServiceVMSizeTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Size of agent VMs. Note: This is no longer maintained. + """ + + STANDARD_A1 = "Standard_A1" + STANDARD_A10 = "Standard_A10" + STANDARD_A11 = "Standard_A11" + STANDARD_A1_V2 = "Standard_A1_v2" + STANDARD_A2 = "Standard_A2" + STANDARD_A2_V2 = "Standard_A2_v2" + STANDARD_A2_M_V2 = "Standard_A2m_v2" + STANDARD_A3 = "Standard_A3" + STANDARD_A4 = "Standard_A4" + STANDARD_A4_V2 = "Standard_A4_v2" + STANDARD_A4_M_V2 = "Standard_A4m_v2" + STANDARD_A5 = "Standard_A5" + STANDARD_A6 = "Standard_A6" + STANDARD_A7 = "Standard_A7" + STANDARD_A8 = "Standard_A8" + STANDARD_A8_V2 = "Standard_A8_v2" + STANDARD_A8_M_V2 = "Standard_A8m_v2" + STANDARD_A9 = "Standard_A9" + STANDARD_B2_MS = "Standard_B2ms" + STANDARD_B2_S = "Standard_B2s" + STANDARD_B4_MS = "Standard_B4ms" + STANDARD_B8_MS = "Standard_B8ms" + STANDARD_D1 = "Standard_D1" + STANDARD_D11 = "Standard_D11" + STANDARD_D11_V2 = "Standard_D11_v2" + STANDARD_D11_V2_PROMO = "Standard_D11_v2_Promo" + STANDARD_D12 = "Standard_D12" + STANDARD_D12_V2 = "Standard_D12_v2" + STANDARD_D12_V2_PROMO = "Standard_D12_v2_Promo" + STANDARD_D13 = "Standard_D13" + STANDARD_D13_V2 = "Standard_D13_v2" + STANDARD_D13_V2_PROMO = "Standard_D13_v2_Promo" + STANDARD_D14 = "Standard_D14" + STANDARD_D14_V2 = "Standard_D14_v2" + STANDARD_D14_V2_PROMO = "Standard_D14_v2_Promo" + STANDARD_D15_V2 = "Standard_D15_v2" + STANDARD_D16_V3 = "Standard_D16_v3" + STANDARD_D16_S_V3 = "Standard_D16s_v3" + STANDARD_D1_V2 = "Standard_D1_v2" + STANDARD_D2 = "Standard_D2" + STANDARD_D2_V2 = "Standard_D2_v2" + STANDARD_D2_V2_PROMO = "Standard_D2_v2_Promo" + STANDARD_D2_V3 = "Standard_D2_v3" + STANDARD_D2_S_V3 = "Standard_D2s_v3" + STANDARD_D3 = "Standard_D3" + STANDARD_D32_V3 = "Standard_D32_v3" + STANDARD_D32_S_V3 = "Standard_D32s_v3" + STANDARD_D3_V2 = "Standard_D3_v2" + STANDARD_D3_V2_PROMO = "Standard_D3_v2_Promo" + STANDARD_D4 = "Standard_D4" + STANDARD_D4_V2 = "Standard_D4_v2" + STANDARD_D4_V2_PROMO = "Standard_D4_v2_Promo" + STANDARD_D4_V3 = "Standard_D4_v3" + STANDARD_D4_S_V3 = "Standard_D4s_v3" + STANDARD_D5_V2 = "Standard_D5_v2" + STANDARD_D5_V2_PROMO = "Standard_D5_v2_Promo" + STANDARD_D64_V3 = "Standard_D64_v3" + STANDARD_D64_S_V3 = "Standard_D64s_v3" + STANDARD_D8_V3 = "Standard_D8_v3" + STANDARD_D8_S_V3 = "Standard_D8s_v3" + STANDARD_DS1 = "Standard_DS1" + STANDARD_DS11 = "Standard_DS11" + STANDARD_DS11_V2 = "Standard_DS11_v2" + STANDARD_DS11_V2_PROMO = "Standard_DS11_v2_Promo" + STANDARD_DS12 = "Standard_DS12" + STANDARD_DS12_V2 = "Standard_DS12_v2" + STANDARD_DS12_V2_PROMO = "Standard_DS12_v2_Promo" + STANDARD_DS13 = "Standard_DS13" + STANDARD_DS13_2_V2 = "Standard_DS13-2_v2" + STANDARD_DS13_4_V2 = "Standard_DS13-4_v2" + STANDARD_DS13_V2 = "Standard_DS13_v2" + STANDARD_DS13_V2_PROMO = "Standard_DS13_v2_Promo" + STANDARD_DS14 = "Standard_DS14" + STANDARD_DS14_4_V2 = "Standard_DS14-4_v2" + STANDARD_DS14_8_V2 = "Standard_DS14-8_v2" + STANDARD_DS14_V2 = "Standard_DS14_v2" + STANDARD_DS14_V2_PROMO = "Standard_DS14_v2_Promo" + STANDARD_DS15_V2 = "Standard_DS15_v2" + STANDARD_DS1_V2 = "Standard_DS1_v2" + STANDARD_DS2 = "Standard_DS2" + STANDARD_DS2_V2 = "Standard_DS2_v2" + STANDARD_DS2_V2_PROMO = "Standard_DS2_v2_Promo" + STANDARD_DS3 = "Standard_DS3" + STANDARD_DS3_V2 = "Standard_DS3_v2" + STANDARD_DS3_V2_PROMO = "Standard_DS3_v2_Promo" + STANDARD_DS4 = "Standard_DS4" + STANDARD_DS4_V2 = "Standard_DS4_v2" + STANDARD_DS4_V2_PROMO = "Standard_DS4_v2_Promo" + STANDARD_DS5_V2 = "Standard_DS5_v2" + STANDARD_DS5_V2_PROMO = "Standard_DS5_v2_Promo" + STANDARD_E16_V3 = "Standard_E16_v3" + STANDARD_E16_S_V3 = "Standard_E16s_v3" + STANDARD_E2_V3 = "Standard_E2_v3" + STANDARD_E2_S_V3 = "Standard_E2s_v3" + STANDARD_E32_16_S_V3 = "Standard_E32-16s_v3" + STANDARD_E32_8_S_V3 = "Standard_E32-8s_v3" + STANDARD_E32_V3 = "Standard_E32_v3" + STANDARD_E32_S_V3 = "Standard_E32s_v3" + STANDARD_E4_V3 = "Standard_E4_v3" + STANDARD_E4_S_V3 = "Standard_E4s_v3" + STANDARD_E64_16_S_V3 = "Standard_E64-16s_v3" + STANDARD_E64_32_S_V3 = "Standard_E64-32s_v3" + STANDARD_E64_V3 = "Standard_E64_v3" + STANDARD_E64_S_V3 = "Standard_E64s_v3" + STANDARD_E8_V3 = "Standard_E8_v3" + STANDARD_E8_S_V3 = "Standard_E8s_v3" + STANDARD_F1 = "Standard_F1" + STANDARD_F16 = "Standard_F16" + STANDARD_F16_S = "Standard_F16s" + STANDARD_F16_S_V2 = "Standard_F16s_v2" + STANDARD_F1_S = "Standard_F1s" + STANDARD_F2 = "Standard_F2" + STANDARD_F2_S = "Standard_F2s" + STANDARD_F2_S_V2 = "Standard_F2s_v2" + STANDARD_F32_S_V2 = "Standard_F32s_v2" + STANDARD_F4 = "Standard_F4" + STANDARD_F4_S = "Standard_F4s" + STANDARD_F4_S_V2 = "Standard_F4s_v2" + STANDARD_F64_S_V2 = "Standard_F64s_v2" + STANDARD_F72_S_V2 = "Standard_F72s_v2" + STANDARD_F8 = "Standard_F8" + STANDARD_F8_S = "Standard_F8s" + STANDARD_F8_S_V2 = "Standard_F8s_v2" + STANDARD_G1 = "Standard_G1" + STANDARD_G2 = "Standard_G2" + STANDARD_G3 = "Standard_G3" + STANDARD_G4 = "Standard_G4" + STANDARD_G5 = "Standard_G5" + STANDARD_GS1 = "Standard_GS1" + STANDARD_GS2 = "Standard_GS2" + STANDARD_GS3 = "Standard_GS3" + STANDARD_GS4 = "Standard_GS4" + STANDARD_GS4_4 = "Standard_GS4-4" + STANDARD_GS4_8 = "Standard_GS4-8" + STANDARD_GS5 = "Standard_GS5" + STANDARD_GS5_16 = "Standard_GS5-16" + STANDARD_GS5_8 = "Standard_GS5-8" + STANDARD_H16 = "Standard_H16" + STANDARD_H16_M = "Standard_H16m" + STANDARD_H16_MR = "Standard_H16mr" + STANDARD_H16_R = "Standard_H16r" + STANDARD_H8 = "Standard_H8" + STANDARD_H8_M = "Standard_H8m" + STANDARD_L16_S = "Standard_L16s" + STANDARD_L32_S = "Standard_L32s" + STANDARD_L4_S = "Standard_L4s" + STANDARD_L8_S = "Standard_L8s" + STANDARD_M128_32_MS = "Standard_M128-32ms" + STANDARD_M128_64_MS = "Standard_M128-64ms" + STANDARD_M128_MS = "Standard_M128ms" + STANDARD_M128_S = "Standard_M128s" + STANDARD_M64_16_MS = "Standard_M64-16ms" + STANDARD_M64_32_MS = "Standard_M64-32ms" + STANDARD_M64_MS = "Standard_M64ms" + STANDARD_M64_S = "Standard_M64s" + STANDARD_NC12 = "Standard_NC12" + STANDARD_NC12_S_V2 = "Standard_NC12s_v2" + STANDARD_NC12_S_V3 = "Standard_NC12s_v3" + STANDARD_NC24 = "Standard_NC24" + STANDARD_NC24_R = "Standard_NC24r" + STANDARD_NC24_RS_V2 = "Standard_NC24rs_v2" + STANDARD_NC24_RS_V3 = "Standard_NC24rs_v3" + STANDARD_NC24_S_V2 = "Standard_NC24s_v2" + STANDARD_NC24_S_V3 = "Standard_NC24s_v3" + STANDARD_NC6 = "Standard_NC6" + STANDARD_NC6_S_V2 = "Standard_NC6s_v2" + STANDARD_NC6_S_V3 = "Standard_NC6s_v3" + STANDARD_ND12_S = "Standard_ND12s" + STANDARD_ND24_RS = "Standard_ND24rs" + STANDARD_ND24_S = "Standard_ND24s" + STANDARD_ND6_S = "Standard_ND6s" + STANDARD_NV12 = "Standard_NV12" + STANDARD_NV24 = "Standard_NV24" + STANDARD_NV6 = "Standard_NV6" + +class Count(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The + default value is 1. + """ + + ONE = 1 + THREE = 3 + FIVE = 5 + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class Expander(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """If not specified, the default is 'random'. See `expanders + `_ + for more information. + """ + + #: Selects the node group that will have the least idle CPU (if tied, unused memory) after + #: scale-up. This is useful when you have different classes of nodes, for example, high CPU or + #: high memory nodes, and only want to expand those when there are pending pods that need a lot of + #: those resources. + LEAST_WASTE = "least-waste" + #: Selects the node group that would be able to schedule the most pods when scaling up. This is + #: useful when you are using nodeSelector to make sure certain pods land on certain nodes. Note + #: that this won't cause the autoscaler to select bigger nodes vs. smaller, as it can add multiple + #: smaller nodes at once. + MOST_PODS = "most-pods" + #: Selects the node group that has the highest priority assigned by the user. It's configuration + #: is described in more details `here + #: `_. + PRIORITY = "priority" + #: Used when you don't have a particular need for the node groups to scale differently. + RANDOM = "random" + +class ExtendedLocationTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of extendedLocation. + """ + + EDGE_ZONE = "EdgeZone" + +class GPUInstanceProfile(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + """ + + MIG1_G = "MIG1g" + MIG2_G = "MIG2g" + MIG3_G = "MIG3g" + MIG4_G = "MIG4g" + MIG7_G = "MIG7g" + +class KubeletDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Determines the placement of emptyDir volumes, container runtime data root, and Kubelet + ephemeral storage. + """ + + #: Kubelet will use the OS disk for its data. + OS = "OS" + #: Kubelet will use the temporary disk for its data. + TEMPORARY = "Temporary" + +class LicenseType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The license type to use for Windows VMs. See `Azure Hybrid User Benefits + `_ for more details. + """ + + #: No additional licensing is applied. + NONE = "None" + #: Enables Azure Hybrid User Benefits for Windows VMs. + WINDOWS_SERVER = "Windows_Server" + +class LoadBalancerSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The default is 'standard'. See `Azure Load Balancer SKUs + `_ for more information about the + differences between load balancer SKUs. + """ + + #: Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information + #: about on working with the load balancer in the managed cluster, see the `standard Load Balancer + #: `_ article. + STANDARD = "standard" + #: Use a basic Load Balancer with limited functionality. + BASIC = "basic" + +class ManagedClusterPodIdentityProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state of the pod identity. + """ + + ASSIGNED = "Assigned" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class ManagedClusterSKUName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The name of a managed cluster SKU. + """ + + BASIC = "Basic" + +class ManagedClusterSKUTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """If not specified, the default is 'Free'. See `uptime SLA + `_ for more details. + """ + + #: Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters that use + #: Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. + PAID = "Paid" + #: No guaranteed SLA, no additional charges. Free tier clusters have an SLO of 99.5%. + FREE = "Free" + +class NetworkMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """This cannot be specified if networkPlugin is anything other than 'azure'. + """ + + #: No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure + #: CNI. See `Transparent Mode `_ for + #: more information. + TRANSPARENT = "transparent" + #: This is no longer supported. + BRIDGE = "bridge" + +class NetworkPlugin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network plugin used for building the Kubernetes network. + """ + + #: Use the Azure CNI network plugin. See `Azure CNI (advanced) networking + #: `_ for + #: more information. + AZURE = "azure" + #: Use the Kubenet network plugin. See `Kubenet (basic) networking + #: `_ for more + #: information. + KUBENET = "kubenet" + +class NetworkPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network policy used for building the Kubernetes network. + """ + + #: Use Calico network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information. + CALICO = "calico" + #: Use Azure network policies. See `differences between Azure and Calico policies + #: `_ + #: for more information. + AZURE = "azure" + +class OSDiskType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The default is 'Ephemeral' if the VM supports it and has a cache disk larger than the requested + OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed after creation. For more + information see `Ephemeral OS + `_. + """ + + #: Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data + #: loss should the VM need to be relocated to another host. Since containers aren't designed to + #: have local state persisted, this behavior offers limited value while providing some drawbacks, + #: including slower node provisioning and higher read/write latency. + MANAGED = "Managed" + #: Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This + #: provides lower read/write latency, along with faster node scaling and cluster upgrades. + EPHEMERAL = "Ephemeral" + +class OSSKU(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies an OS SKU. This value must not be specified if OSType is Windows. + """ + + UBUNTU = "Ubuntu" + CBL_MARINER = "CBLMariner" + +class OSType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The operating system type. The default is Linux. + """ + + #: Use Linux. + LINUX = "Linux" + #: Use Windows. + WINDOWS = "Windows" + +class OutboundType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """This can only be set at cluster creation time and cannot be changed later. For more information + see `egress outbound type `_. + """ + + #: The load balancer is used for egress through an AKS assigned public IP. This supports + #: Kubernetes services of type 'loadBalancer'. For more information see `outbound type + #: loadbalancer + #: `_. + LOAD_BALANCER = "loadBalancer" + #: Egress paths must be defined by the user. This is an advanced scenario and requires proper + #: network configuration. For more information see `outbound type userDefinedRouting + #: `_. + USER_DEFINED_ROUTING = "userDefinedRouting" + #: The AKS-managed NAT gateway is used for egress. + MANAGED_NAT_GATEWAY = "managedNATGateway" + #: The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an + #: advanced scenario and requires proper network configuration. + USER_ASSIGNED_NAT_GATEWAY = "userAssignedNATGateway" + +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + +class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Default value is 'Enabled' (case insensitive). Could be set to 'Disabled' to enable private + cluster + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """For more information see `use managed identities in AKS + `_. + """ + + #: Use an implicitly created system assigned managed identity to manage cluster resources. Master + #: components in the control plane such as kube-controller-manager will use the system assigned + #: managed identity to manipulate Azure resources. + SYSTEM_ASSIGNED = "SystemAssigned" + #: Use a user-specified identity to manage cluster resources. Master components in the control + #: plane such as kube-controller-manager will use the specified user assigned managed identity to + #: manipulate Azure resources. + USER_ASSIGNED = "UserAssigned" + #: Do not use a managed identity for the Managed Cluster, service principal will be used instead. + NONE = "None" + +class ScaleDownMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes how VMs are added to or removed from Agent Pools. See `billing states + `_. + """ + + #: Create new instances during scale up and remove instances during scale down. + DELETE = "Delete" + #: Attempt to start deallocated instances (if they exist) during scale up and deallocate instances + #: during scale down. + DEALLOCATE = "Deallocate" + +class ScaleSetEvictionPolicy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. + For more information about eviction see `spot VMs + `_ + """ + + #: Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. + DELETE = "Delete" + #: Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state + #: upon eviction. Nodes in the stopped-deallocated state count against your compute quota and can + #: cause issues with cluster scaling or upgrading. + DEALLOCATE = "Deallocate" + +class ScaleSetPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Virtual Machine Scale Set priority. + """ + + #: Spot priority VMs will be used. There is no SLA for spot nodes. See `spot on AKS + #: `_ for more information. + SPOT = "Spot" + #: Regular VMs will be used. + REGULAR = "Regular" + +class SnapshotType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of a snapshot. The default is NodePool. + """ + + #: The snapshot is a snapshot of a node pool. + NODE_POOL = "NodePool" + +class UpgradeChannel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """For more information see `setting the AKS cluster auto-upgrade channel + `_. + """ + + #: Automatically upgrade the cluster to the latest supported patch release on the latest supported + #: minor version. In cases where the cluster is at a version of Kubernetes that is at an N-2 minor + #: version where N is the latest supported minor version, the cluster first upgrades to the latest + #: supported patch version on N-1 minor version. For example, if a cluster is running version + #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is + #: upgraded to 1.18.6, then is upgraded to 1.19.1. + RAPID = "rapid" + #: Automatically upgrade the cluster to the latest supported patch release on minor version N-1, + #: where N is the latest supported minor version. For example, if a cluster is running version + #: 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is upgraded + #: to 1.18.6. + STABLE = "stable" + #: Automatically upgrade the cluster to the latest supported patch version when it becomes + #: available while keeping the minor version the same. For example, if a cluster is running + #: version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster is + #: upgraded to 1.17.9. + PATCH = "patch" + #: Automatically upgrade the node image to the latest version available. Microsoft provides + #: patches and new images for image nodes frequently (usually weekly), but your running nodes + #: won't get the new images unless you do a node image upgrade. Turning on the node-image channel + #: will automatically update your node images whenever a new version is available. + NODE_IMAGE = "node-image" + #: Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + NONE = "none" + +class WeekDay(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The weekday enum. + """ + + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" + +class WorkloadRuntime(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Determines the type of workload a node can run. + """ + + #: Nodes will use Kubelet to run standard OCI container workloads. + OCI_CONTAINER = "OCIContainer" + #: Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + WASM_WASI = "WasmWasi" diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models.py new file mode 100644 index 000000000000..cfbd39a41628 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models.py @@ -0,0 +1,3899 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 msrest.serialization + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :type vm_size: str + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Possible values + include: "Managed", "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSDiskType + :param kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.KubeletDiskType + :param workload_runtime: Determines the type of workload a node can run. Possible values + include: "OCIContainer", "WasmWasi". + :type workload_runtime: str or ~azure.mgmt.containerservice.v2021_09_01.models.WorkloadRuntime + :param vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type vnet_subnet_id: str + :param pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type pod_subnet_id: str + :param max_pods: The maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: The operating system type. The default is Linux. Possible values include: + "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param os_sku: Specifies an OS SKU. This value must not be specified if OSType is Windows. + Possible values include: "Ubuntu", "CBLMariner". + :type os_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSSKU + :param max_count: The maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: The minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Possible values include: "Delete", "Deallocate". + :type scale_down_mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.ScaleDownMode + :param type_properties_type: The type of Agent Pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or + ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolType + :param mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolMode + :param orchestrator_version: As a best practice, you should upgrade all node pools in an AKS + cluster to the same Kubernetes version. The node pool version must have the same major version + as the control plane. The node pool minor version must be within two minor versions of the + control plane version. The node pool version cannot be greater than the control plane version. + For more information see `upgrading a node pool + `_. + :type orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :param power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :type power_state: ~azure.mgmt.containerservice.v2021_09_01.models.PowerState + :param availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :type availability_zones: list[str] + :param enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :type enable_node_public_ip: bool + :param node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :type node_public_ip_prefix_id: str + :param scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Possible values include: "Spot", "Regular". Default value: "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetPriority + :param scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetEvictionPolicy + :param spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :type spot_max_price: float + :param tags: A set of tags. The tags to be persisted on the agent pool virtual machine scale + set. + :type tags: dict[str, str] + :param node_labels: The node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: The Kubelet configuration on the agent pool nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_09_01.models.KubeletConfig + :param linux_os_config: The OS configuration of Linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_09_01.models.LinuxOSConfig + :param enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :type enable_encryption_at_host: bool + :param enable_ultra_ssd: Whether to enable UltraSSD. + :type enable_ultra_ssd: bool + :param enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :type enable_fips: bool + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Possible values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". + :type gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2021_09_01.models.GPUInstanceProfile + :param creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :type creation_data: ~azure.mgmt.containerservice.v2021_09_01.models.CreationData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, + 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, + 'workload_runtime': {'key': 'properties.workloadRuntime', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'os_sku': {'key': 'properties.osSKU', 'type': 'str'}, + 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, + 'min_count': {'key': 'properties.minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, + 'scale_down_mode': {'key': 'properties.scaleDownMode', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, + 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, + 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'properties.tags', 'type': '{str}'}, + 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, + 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, + 'enable_ultra_ssd': {'key': 'properties.enableUltraSSD', 'type': 'bool'}, + 'enable_fips': {'key': 'properties.enableFIPS', 'type': 'bool'}, + 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPool, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.vm_size = kwargs.get('vm_size', None) + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.os_disk_type = kwargs.get('os_disk_type', None) + self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) + self.workload_runtime = kwargs.get('workload_runtime', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.pod_subnet_id = kwargs.get('pod_subnet_id', None) + self.max_pods = kwargs.get('max_pods', None) + self.os_type = kwargs.get('os_type', "Linux") + self.os_sku = kwargs.get('os_sku', None) + self.max_count = kwargs.get('max_count', None) + self.min_count = kwargs.get('min_count', None) + self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) + self.scale_down_mode = kwargs.get('scale_down_mode', None) + self.type_properties_type = kwargs.get('type_properties_type', None) + self.mode = kwargs.get('mode', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) + self.node_image_version = None + self.upgrade_settings = kwargs.get('upgrade_settings', None) + self.provisioning_state = None + self.power_state = kwargs.get('power_state', None) + self.availability_zones = kwargs.get('availability_zones', None) + self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) + self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) + self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") + self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") + self.spot_max_price = kwargs.get('spot_max_price', -1) + self.tags = kwargs.get('tags', None) + self.node_labels = kwargs.get('node_labels', None) + self.node_taints = kwargs.get('node_taints', None) + self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) + self.kubelet_config = kwargs.get('kubelet_config', None) + self.linux_os_config = kwargs.get('linux_os_config', None) + self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) + self.enable_ultra_ssd = kwargs.get('enable_ultra_ssd', None) + self.enable_fips = kwargs.get('enable_fips', None) + self.gpu_instance_profile = kwargs.get('gpu_instance_profile', None) + self.creation_data = kwargs.get('creation_data', None) + + +class AgentPoolAvailableVersions(msrest.serialization.Model): + """The list of available versions for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the agent pool version list. + :vartype id: str + :ivar name: The name of the agent pool version list. + :vartype name: str + :ivar type: Type of the agent pool version list. + :vartype type: str + :param agent_pool_versions: List of versions available for agent pool. + :type agent_pool_versions: + list[~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolAvailableVersions, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.agent_pool_versions = kwargs.get('agent_pool_versions', None) + + +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): + """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + + :param default: Whether this version is the default agent pool version. + :type default: bool + :param kubernetes_version: The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'default': {'key': 'default', 'type': 'bool'}, + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) + self.default = kwargs.get('default', None) + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.is_preview = kwargs.get('is_preview', None) + + +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for an agent pool. + + 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. + + :ivar id: The ID of the agent pool upgrade profile. + :vartype id: str + :ivar name: The name of the agent pool upgrade profile. + :vartype name: str + :ivar type: The type of the agent pool upgrade profile. + :vartype type: str + :param kubernetes_version: Required. The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param os_type: Required. The operating system type. The default is Linux. Possible values + include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + :param latest_node_image_version: The latest AKS supported node image version. + :type latest_node_image_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, + 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kubernetes_version = kwargs['kubernetes_version'] + self.os_type = kwargs.get('os_type', "Linux") + self.upgrades = kwargs.get('upgrades', None) + self.latest_node_image_version = kwargs.get('latest_node_image_version', None) + + +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): + """AgentPoolUpgradeProfilePropertiesUpgradesItem. + + :param kubernetes_version: The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param is_preview: Whether the Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.is_preview = kwargs.get('is_preview', None) + + +class AgentPoolUpgradeSettings(msrest.serialization.Model): + """Settings for upgrading an agentpool. + + :param max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). + If a percentage is specified, it is the percentage of the total agent pool size at the time of + the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is + 1. For more information, including best practices, see: + https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + :type max_surge: str + """ + + _attribute_map = { + 'max_surge': {'key': 'maxSurge', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AgentPoolUpgradeSettings, self).__init__(**kwargs) + self.max_surge = kwargs.get('max_surge', None) + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the Container service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerservice.v2021_09_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = kwargs['vm_diagnostics'] + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. The SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.ssh = kwargs['ssh'] + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + 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 count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2021_09_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = kwargs.get('count', "1") + self.dns_prefix = kwargs['dns_prefix'] + self.vm_size = kwargs['vm_size'] + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.first_consecutive_static_ip = kwargs.get('first_consecutive_static_ip', "10.240.255.5") + self.storage_profile = kwargs.get('storage_profile', None) + self.fqdn = None + + +class ContainerServiceNetworkProfile(msrest.serialization.Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building the Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2021_09_01.models.NetworkPlugin + :param network_policy: Network policy used for building the Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2021_09_01.models.NetworkPolicy + :param network_mode: This cannot be specified if networkPlugin is anything other than 'azure'. + Possible values include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :type docker_bridge_cidr: str + :param outbound_type: This can only be set at cluster creation time and cannot be changed + later. For more information see `egress outbound type + `_. Possible values include: + "loadBalancer", "userDefinedRouting", "managedNATGateway", "userAssignedNATGateway". Default + value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OutboundType + :param load_balancer_sku: The default is 'standard'. See `Azure Load Balancer SKUs + `_ for more information about the + differences between load balancer SKUs. Possible values include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.LoadBalancerSku + :param load_balancer_profile: Profile of the cluster load balancer. + :type load_balancer_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterLoadBalancerProfile + :param nat_gateway_profile: Profile of the cluster NAT gateway. + :type nat_gateway_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterNATGatewayProfile + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'network_mode': {'key': 'networkMode', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + 'outbound_type': {'key': 'outboundType', 'type': 'str'}, + 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, + 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, + 'nat_gateway_profile': {'key': 'natGatewayProfile', 'type': 'ManagedClusterNATGatewayProfile'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = kwargs.get('network_plugin', "kubenet") + self.network_policy = kwargs.get('network_policy', None) + self.network_mode = kwargs.get('network_mode', None) + self.pod_cidr = kwargs.get('pod_cidr', "10.244.0.0/16") + self.service_cidr = kwargs.get('service_cidr', "10.0.0.0/16") + self.dns_service_ip = kwargs.get('dns_service_ip', "10.0.0.10") + self.docker_bridge_cidr = kwargs.get('docker_bridge_cidr', "172.17.0.1/16") + self.outbound_type = kwargs.get('outbound_type', "loadBalancer") + self.load_balancer_sku = kwargs.get('load_balancer_sku', None) + self.load_balancer_profile = kwargs.get('load_balancer_profile', None) + self.nat_gateway_profile = kwargs.get('nat_gateway_profile', None) + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. A maximum of 1 key may be specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = kwargs['public_keys'] + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = kwargs['key_data'] + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + 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 enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.storage_uri = None + + +class CreationData(msrest.serialization.Model): + """Data used when creating a target resource from a source resource. + + :param source_resource_id: This is the ARM ID of the source object to be used to create the + target object. + :type source_resource_id: str + """ + + _attribute_map = { + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreationData, self).__init__(**kwargs) + self.source_resource_id = kwargs.get('source_resource_id', None) + + +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2021_09_01.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.kubeconfigs = None + + +class EndpointDependency(msrest.serialization.Model): + """A domain name that AKS agent nodes are reaching at. + + :param domain_name: The domain name of the dependency. + :type domain_name: str + :param endpoint_details: The Ports and Protocols used when connecting to domainName. + :type endpoint_details: list[~azure.mgmt.containerservice.v2021_09_01.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.endpoint_details = kwargs.get('endpoint_details', None) + + +class EndpointDetail(msrest.serialization.Model): + """connect information from the AKS agent nodes to a single endpoint. + + :param ip_address: An IP Address that Domain Name currently resolves to. + :type ip_address: str + :param port: The port an endpoint is connected to. + :type port: int + :param protocol: The protocol used for connection. + :type protocol: str + :param description: Description of the detail. + :type description: str + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointDetail, self).__init__(**kwargs) + self.ip_address = kwargs.get('ip_address', None) + self.port = kwargs.get('port', None) + self.protocol = kwargs.get('protocol', None) + self.description = kwargs.get('description', None) + + +class ExtendedLocation(msrest.serialization.Model): + """The complex type of the extended location. + + :param name: The name of the extended location. + :type name: str + :param type: The type of the extended location. Possible values include: "EdgeZone". + :type type: str or ~azure.mgmt.containerservice.v2021_09_01.models.ExtendedLocationTypes + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExtendedLocation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class KubeletConfig(msrest.serialization.Model): + """See `AKS custom node configuration `_ for more details. + + :param cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies + `_ + for more information. Allowed values are 'none' and 'static'. + :type cpu_manager_policy: str + :param cpu_cfs_quota: The default is true. + :type cpu_cfs_quota: bool + :param cpu_cfs_quota_period: The default is '100ms.' Valid values are a sequence of decimal + numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported + units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + :type cpu_cfs_quota_period: str + :param image_gc_high_threshold: To disable image garbage collection, set to 100. The default is + 85%. + :type image_gc_high_threshold: int + :param image_gc_low_threshold: This cannot be set higher than imageGcHighThreshold. The default + is 80%. + :type image_gc_low_threshold: int + :param topology_manager_policy: For more information see `Kubernetes Topology Manager + `_. The default is + 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + :type topology_manager_policy: str + :param allowed_unsafe_sysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending + in ``*``\ ). + :type allowed_unsafe_sysctls: list[str] + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. + :type fail_swap_on: bool + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. + :type container_log_max_size_mb: int + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. + :type container_log_max_files: int + :param pod_max_pids: The maximum number of processes per pod. + :type pod_max_pids: int + """ + + _validation = { + 'container_log_max_files': {'minimum': 2}, + } + + _attribute_map = { + 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, + 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, + 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, + 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, + 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, + 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, + 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, + 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, + 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, + 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, + 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(KubeletConfig, self).__init__(**kwargs) + self.cpu_manager_policy = kwargs.get('cpu_manager_policy', None) + self.cpu_cfs_quota = kwargs.get('cpu_cfs_quota', None) + self.cpu_cfs_quota_period = kwargs.get('cpu_cfs_quota_period', None) + self.image_gc_high_threshold = kwargs.get('image_gc_high_threshold', None) + self.image_gc_low_threshold = kwargs.get('image_gc_low_threshold', None) + self.topology_manager_policy = kwargs.get('topology_manager_policy', None) + self.allowed_unsafe_sysctls = kwargs.get('allowed_unsafe_sysctls', None) + self.fail_swap_on = kwargs.get('fail_swap_on', None) + self.container_log_max_size_mb = kwargs.get('container_log_max_size_mb', None) + self.container_log_max_files = kwargs.get('container_log_max_files', None) + self.pod_max_pids = kwargs.get('pod_max_pids', None) + + +class LinuxOSConfig(msrest.serialization.Model): + """See `AKS custom node configuration `_ for more details. + + :param sysctls: Sysctl settings for Linux agent nodes. + :type sysctls: ~azure.mgmt.containerservice.v2021_09_01.models.SysctlConfig + :param transparent_huge_page_enabled: Valid values are 'always', 'madvise', and 'never'. The + default is 'always'. For more information see `Transparent Hugepages + `_. + :type transparent_huge_page_enabled: str + :param transparent_huge_page_defrag: Valid values are 'always', 'defer', 'defer+madvise', + 'madvise' and 'never'. The default is 'madvise'. For more information see `Transparent + Hugepages + `_. + :type transparent_huge_page_defrag: str + :param swap_file_size_mb: The size in MB of a swap file that will be created on each node. + :type swap_file_size_mb: int + """ + + _attribute_map = { + 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, + 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, + 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, + 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(LinuxOSConfig, self).__init__(**kwargs) + self.sysctls = kwargs.get('sysctls', None) + self.transparent_huge_page_enabled = kwargs.get('transparent_huge_page_enabled', None) + self.transparent_huge_page_defrag = kwargs.get('transparent_huge_page_defrag', None) + self.swap_file_size_mb = kwargs.get('swap_file_size_mb', None) + + +class MaintenanceConfiguration(SubResource): + """See `planned maintenance `_ for more information about planned maintenance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar system_data: The system metadata relating to this resource. + :vartype system_data: ~azure.mgmt.containerservice.v2021_09_01.models.SystemData + :param time_in_week: If two array entries specify the same day of the week, the applied + configuration is the union of times in both entries. + :type time_in_week: list[~azure.mgmt.containerservice.v2021_09_01.models.TimeInWeek] + :param not_allowed_time: Time slots on which upgrade is not allowed. + :type not_allowed_time: list[~azure.mgmt.containerservice.v2021_09_01.models.TimeSpan] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, + 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, + } + + def __init__( + self, + **kwargs + ): + super(MaintenanceConfiguration, self).__init__(**kwargs) + self.system_data = None + self.time_in_week = kwargs.get('time_in_week', None) + self.not_allowed_time = kwargs.get('not_allowed_time', None) + + +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class ManagedCluster(Resource): + """Managed cluster. + + 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. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The managed cluster SKU. + :type sku: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSKU + :param extended_location: The extended location of the Virtual Machine. + :type extended_location: ~azure.mgmt.containerservice.v2021_09_01.models.ExtendedLocation + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current provisioning state. + :vartype provisioning_state: str + :ivar power_state: The Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_09_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: When you upgrade a supported AKS cluster, Kubernetes minor versions + cannot be skipped. All upgrades must be performed sequentially by major version number. For + example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> + 1.16.x is not allowed. See `upgrading an AKS cluster + `_ for more details. + :type kubernetes_version: str + :param dns_prefix: This cannot be updated once the Managed Cluster has been created. + :type dns_prefix: str + :param fqdn_subdomain: This cannot be updated once the Managed Cluster has been created. + :type fqdn_subdomain: str + :ivar fqdn: The FQDN of the master pool. + :vartype fqdn: str + :ivar private_fqdn: The FQDN of private cluster. + :vartype private_fqdn: str + :ivar azure_portal_fqdn: The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) + headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. + This special FQDN supports CORS, allowing the Azure Portal to function properly. + :vartype azure_portal_fqdn: str + :param agent_pool_profiles: The agent pool properties. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: The profile for Linux VMs in the Managed Cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceLinuxProfile + :param windows_profile: The profile for Windows VMs in the Managed Cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: The profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: See `use AAD pod identity + `_ for more details on AAD pod + identity integration. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: The name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: The network configuration profile. + :type network_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceNetworkProfile + :param aad_profile: The Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: The auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: The access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2021_09_01.models.UserAssignedIdentity] + :param private_link_resources: Private link resources associated with the cluster. + :type private_link_resources: + list[~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource] + :param disable_local_accounts: If set to true, getting static credentials will be disabled for + this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details + see `disable local accounts + `_. + :type disable_local_accounts: bool + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. + :type http_proxy_config: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterHTTPProxyConfig + :param security_profile: Security profile for the managed cluster. + :type security_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSecurityProfile + :param public_network_access: Default value is 'Enabled' (case insensitive). Could be set to + 'Disabled' to enable private cluster. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~azure.mgmt.containerservice.v2021_09_01.models.PublicNetworkAccess + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + 'azure_portal_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{UserAssignedIdentity}'}, + 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, + 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, + 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, + 'security_profile': {'key': 'properties.securityProfile', 'type': 'ManagedClusterSecurityProfile'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedCluster, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.extended_location = kwargs.get('extended_location', None) + self.identity = kwargs.get('identity', None) + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.dns_prefix = kwargs.get('dns_prefix', None) + self.fqdn_subdomain = kwargs.get('fqdn_subdomain', None) + self.fqdn = None + self.private_fqdn = None + self.azure_portal_fqdn = None + self.agent_pool_profiles = kwargs.get('agent_pool_profiles', None) + self.linux_profile = kwargs.get('linux_profile', None) + self.windows_profile = kwargs.get('windows_profile', None) + self.service_principal_profile = kwargs.get('service_principal_profile', None) + self.addon_profiles = kwargs.get('addon_profiles', None) + self.pod_identity_profile = kwargs.get('pod_identity_profile', None) + self.node_resource_group = kwargs.get('node_resource_group', None) + self.enable_rbac = kwargs.get('enable_rbac', None) + self.enable_pod_security_policy = kwargs.get('enable_pod_security_policy', None) + self.network_profile = kwargs.get('network_profile', None) + self.aad_profile = kwargs.get('aad_profile', None) + self.auto_upgrade_profile = kwargs.get('auto_upgrade_profile', None) + self.auto_scaler_profile = kwargs.get('auto_scaler_profile', None) + self.api_server_access_profile = kwargs.get('api_server_access_profile', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + self.identity_profile = kwargs.get('identity_profile', None) + self.private_link_resources = kwargs.get('private_link_resources', None) + self.disable_local_accounts = kwargs.get('disable_local_accounts', None) + self.http_proxy_config = kwargs.get('http_proxy_config', None) + self.security_profile = kwargs.get('security_profile', None) + self.public_network_access = kwargs.get('public_network_access', None) + + +class ManagedClusterAADProfile(msrest.serialization.Model): + """For more details see `managed AAD on AKS `_. + + :param managed: Whether to enable managed AAD. + :type managed: bool + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. + :type enable_azure_rbac: bool + :param admin_group_object_i_ds: The list of AAD group object IDs that will have admin role of + the cluster. + :type admin_group_object_i_ds: list[str] + :param client_app_id: The client AAD application ID. + :type client_app_id: str + :param server_app_id: The server AAD application ID. + :type server_app_id: str + :param server_app_secret: The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :type tenant_id: str + """ + + _attribute_map = { + 'managed': {'key': 'managed', 'type': 'bool'}, + 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.managed = kwargs.get('managed', None) + self.enable_azure_rbac = kwargs.get('enable_azure_rbac', None) + self.admin_group_object_i_ds = kwargs.get('admin_group_object_i_ds', None) + self.client_app_id = kwargs.get('client_app_id', None) + self.server_app_id = kwargs.get('server_app_id', None) + self.server_app_secret = kwargs.get('server_app_secret', None) + self.tenant_id = kwargs.get('tenant_id', None) + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + 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. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAccessProfile, self).__init__(**kwargs) + self.kube_config = kwargs.get('kube_config', None) + + +class ManagedClusterAddonProfile(msrest.serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + 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 enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + :ivar identity: Information of user assigned identity used by this add-on. + :vartype identity: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAddonProfileIdentity + """ + + _validation = { + 'enabled': {'required': True}, + 'identity': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.config = kwargs.get('config', None) + self.identity = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """Details about a user assigned identity. + + :param resource_id: The resource ID of the user assigned identity. + :type resource_id: str + :param client_id: The client ID of the user assigned identity. + :type client_id: str + :param object_id: The object ID of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.client_id = kwargs.get('client_id', None) + self.object_id = kwargs.get('object_id', None) + + +class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): + """Information of user assigned identity used by this add-on. + + :param resource_id: The resource ID of the user assigned identity. + :type resource_id: str + :param client_id: The client ID of the user assigned identity. + :type client_id: str + :param object_id: The object ID of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAddonProfileIdentity, self).__init__(**kwargs) + + +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :type vm_size: str + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Possible values + include: "Managed", "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSDiskType + :param kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.KubeletDiskType + :param workload_runtime: Determines the type of workload a node can run. Possible values + include: "OCIContainer", "WasmWasi". + :type workload_runtime: str or ~azure.mgmt.containerservice.v2021_09_01.models.WorkloadRuntime + :param vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type vnet_subnet_id: str + :param pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type pod_subnet_id: str + :param max_pods: The maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: The operating system type. The default is Linux. Possible values include: + "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param os_sku: Specifies an OS SKU. This value must not be specified if OSType is Windows. + Possible values include: "Ubuntu", "CBLMariner". + :type os_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSSKU + :param max_count: The maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: The minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Possible values include: "Delete", "Deallocate". + :type scale_down_mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.ScaleDownMode + :param type: The type of Agent Pool. Possible values include: "VirtualMachineScaleSets", + "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolType + :param mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolMode + :param orchestrator_version: As a best practice, you should upgrade all node pools in an AKS + cluster to the same Kubernetes version. The node pool version must have the same major version + as the control plane. The node pool minor version must be within two minor versions of the + control plane version. The node pool version cannot be greater than the control plane version. + For more information see `upgrading a node pool + `_. + :type orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :param power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :type power_state: ~azure.mgmt.containerservice.v2021_09_01.models.PowerState + :param availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :type availability_zones: list[str] + :param enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :type enable_node_public_ip: bool + :param node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :type node_public_ip_prefix_id: str + :param scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Possible values include: "Spot", "Regular". Default value: "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetPriority + :param scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetEvictionPolicy + :param spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :type spot_max_price: float + :param tags: A set of tags. The tags to be persisted on the agent pool virtual machine scale + set. + :type tags: dict[str, str] + :param node_labels: The node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: The Kubelet configuration on the agent pool nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_09_01.models.KubeletConfig + :param linux_os_config: The OS configuration of Linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_09_01.models.LinuxOSConfig + :param enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :type enable_encryption_at_host: bool + :param enable_ultra_ssd: Whether to enable UltraSSD. + :type enable_ultra_ssd: bool + :param enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :type enable_fips: bool + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Possible values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". + :type gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2021_09_01.models.GPUInstanceProfile + :param creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :type creation_data: ~azure.mgmt.containerservice.v2021_09_01.models.CreationData + """ + + _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, + 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, + 'workload_runtime': {'key': 'workloadRuntime', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'os_sku': {'key': 'osSKU', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'scale_down_mode': {'key': 'scaleDownMode', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, + 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, + 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, + 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, + 'enable_ultra_ssd': {'key': 'enableUltraSSD', 'type': 'bool'}, + 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, + 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, + 'creation_data': {'key': 'creationData', 'type': 'CreationData'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.vm_size = kwargs.get('vm_size', None) + self.os_disk_size_gb = kwargs.get('os_disk_size_gb', None) + self.os_disk_type = kwargs.get('os_disk_type', None) + self.kubelet_disk_type = kwargs.get('kubelet_disk_type', None) + self.workload_runtime = kwargs.get('workload_runtime', None) + self.vnet_subnet_id = kwargs.get('vnet_subnet_id', None) + self.pod_subnet_id = kwargs.get('pod_subnet_id', None) + self.max_pods = kwargs.get('max_pods', None) + self.os_type = kwargs.get('os_type', "Linux") + self.os_sku = kwargs.get('os_sku', None) + self.max_count = kwargs.get('max_count', None) + self.min_count = kwargs.get('min_count', None) + self.enable_auto_scaling = kwargs.get('enable_auto_scaling', None) + self.scale_down_mode = kwargs.get('scale_down_mode', None) + self.type = kwargs.get('type', None) + self.mode = kwargs.get('mode', None) + self.orchestrator_version = kwargs.get('orchestrator_version', None) + self.node_image_version = None + self.upgrade_settings = kwargs.get('upgrade_settings', None) + self.provisioning_state = None + self.power_state = kwargs.get('power_state', None) + self.availability_zones = kwargs.get('availability_zones', None) + self.enable_node_public_ip = kwargs.get('enable_node_public_ip', None) + self.node_public_ip_prefix_id = kwargs.get('node_public_ip_prefix_id', None) + self.scale_set_priority = kwargs.get('scale_set_priority', "Regular") + self.scale_set_eviction_policy = kwargs.get('scale_set_eviction_policy', "Delete") + self.spot_max_price = kwargs.get('spot_max_price', -1) + self.tags = kwargs.get('tags', None) + self.node_labels = kwargs.get('node_labels', None) + self.node_taints = kwargs.get('node_taints', None) + self.proximity_placement_group_id = kwargs.get('proximity_placement_group_id', None) + self.kubelet_config = kwargs.get('kubelet_config', None) + self.linux_os_config = kwargs.get('linux_os_config', None) + self.enable_encryption_at_host = kwargs.get('enable_encryption_at_host', None) + self.enable_ultra_ssd = kwargs.get('enable_ultra_ssd', None) + self.enable_fips = kwargs.get('enable_fips', None) + self.gpu_instance_profile = kwargs.get('gpu_instance_profile', None) + self.creation_data = kwargs.get('creation_data', None) + + +class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): + """Profile for the container service agent pool. + + 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 count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :type vm_size: str + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Possible values + include: "Managed", "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSDiskType + :param kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.KubeletDiskType + :param workload_runtime: Determines the type of workload a node can run. Possible values + include: "OCIContainer", "WasmWasi". + :type workload_runtime: str or ~azure.mgmt.containerservice.v2021_09_01.models.WorkloadRuntime + :param vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type vnet_subnet_id: str + :param pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type pod_subnet_id: str + :param max_pods: The maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: The operating system type. The default is Linux. Possible values include: + "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param os_sku: Specifies an OS SKU. This value must not be specified if OSType is Windows. + Possible values include: "Ubuntu", "CBLMariner". + :type os_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSSKU + :param max_count: The maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: The minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Possible values include: "Delete", "Deallocate". + :type scale_down_mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.ScaleDownMode + :param type: The type of Agent Pool. Possible values include: "VirtualMachineScaleSets", + "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolType + :param mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolMode + :param orchestrator_version: As a best practice, you should upgrade all node pools in an AKS + cluster to the same Kubernetes version. The node pool version must have the same major version + as the control plane. The node pool minor version must be within two minor versions of the + control plane version. The node pool version cannot be greater than the control plane version. + For more information see `upgrading a node pool + `_. + :type orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :param power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :type power_state: ~azure.mgmt.containerservice.v2021_09_01.models.PowerState + :param availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :type availability_zones: list[str] + :param enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :type enable_node_public_ip: bool + :param node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :type node_public_ip_prefix_id: str + :param scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Possible values include: "Spot", "Regular". Default value: "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetPriority + :param scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetEvictionPolicy + :param spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :type spot_max_price: float + :param tags: A set of tags. The tags to be persisted on the agent pool virtual machine scale + set. + :type tags: dict[str, str] + :param node_labels: The node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: The Kubelet configuration on the agent pool nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_09_01.models.KubeletConfig + :param linux_os_config: The OS configuration of Linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_09_01.models.LinuxOSConfig + :param enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :type enable_encryption_at_host: bool + :param enable_ultra_ssd: Whether to enable UltraSSD. + :type enable_ultra_ssd: bool + :param enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :type enable_fips: bool + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Possible values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". + :type gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2021_09_01.models.GPUInstanceProfile + :param creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :type creation_data: ~azure.mgmt.containerservice.v2021_09_01.models.CreationData + :param name: Required. Windows agent pool names must be 6 characters or less. + :type name: str + """ + + _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, + 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, + 'workload_runtime': {'key': 'workloadRuntime', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'os_sku': {'key': 'osSKU', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'scale_down_mode': {'key': 'scaleDownMode', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, + 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, + 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, + 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, + 'enable_ultra_ssd': {'key': 'enableUltraSSD', 'type': 'bool'}, + 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, + 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, + 'creation_data': {'key': 'creationData', 'type': 'CreationData'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAgentPoolProfile, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): + """Access profile for managed cluster API server. + + :param authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + This feature is not compatible with clusters that use Public IP Per Node, or clusters that are + using a Basic Load Balancer. For more information see `API server authorized IP ranges + `_. + :type authorized_ip_ranges: list[str] + :param enable_private_cluster: For more details, see `Creating a private AKS cluster + `_. + :type enable_private_cluster: bool + :param private_dns_zone: The default is System. For more details see `configure private DNS + zone `_. + Allowed values are 'system' and 'none'. + :type private_dns_zone: str + :param enable_private_cluster_public_fqdn: Whether to create additional public FQDN for private + cluster or not. + :type enable_private_cluster_public_fqdn: bool + :param disable_run_command: Whether to disable run command for the cluster or not. + :type disable_run_command: bool + """ + + _attribute_map = { + 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, + 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, + 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, + 'enable_private_cluster_public_fqdn': {'key': 'enablePrivateClusterPublicFQDN', 'type': 'bool'}, + 'disable_run_command': {'key': 'disableRunCommand', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) + self.authorized_ip_ranges = kwargs.get('authorized_ip_ranges', None) + self.enable_private_cluster = kwargs.get('enable_private_cluster', None) + self.private_dns_zone = kwargs.get('private_dns_zone', None) + self.enable_private_cluster_public_fqdn = kwargs.get('enable_private_cluster_public_fqdn', None) + self.disable_run_command = kwargs.get('disable_run_command', None) + + +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): + """Auto upgrade profile for a managed cluster. + + :param upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel + `_. Possible + values include: "rapid", "stable", "patch", "node-image", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2021_09_01.models.UpgradeChannel + """ + + _attribute_map = { + 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) + self.upgrade_channel = kwargs.get('upgrade_channel', None) + + +class ManagedClusterHTTPProxyConfig(msrest.serialization.Model): + """Cluster HTTP proxy configuration. + + :param http_proxy: The HTTP proxy server endpoint to use. + :type http_proxy: str + :param https_proxy: The HTTPS proxy server endpoint to use. + :type https_proxy: str + :param no_proxy: The endpoints that should not go through proxy. + :type no_proxy: list[str] + :param trusted_ca: Alternative CA cert to use for connecting to proxy servers. + :type trusted_ca: str + """ + + _attribute_map = { + 'http_proxy': {'key': 'httpProxy', 'type': 'str'}, + 'https_proxy': {'key': 'httpsProxy', 'type': 'str'}, + 'no_proxy': {'key': 'noProxy', 'type': '[str]'}, + 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) + self.http_proxy = kwargs.get('http_proxy', None) + self.https_proxy = kwargs.get('https_proxy', None) + self.no_proxy = kwargs.get('no_proxy', None) + self.trusted_ca = kwargs.get('trusted_ca', None) + + +class ManagedClusterIdentity(msrest.serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :param type: For more information see `use managed identities in AKS + `_. Possible values include: + "SystemAssigned", "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2021_09_01.models.ResourceIdentityType + :param user_assigned_identities: The keys must be ARM resource IDs in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): + """Profile of the managed cluster load balancer. + + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. + :type outbound_ip_prefixes: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPs + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2021_09_01.models.ResourceReference] + :param allocated_outbound_ports: The desired number of allocated SNAT ports per VM. Allowed + values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in + Azure dynamically allocating ports. + :type allocated_outbound_ports: int + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 30 minutes. + :type idle_timeout_in_minutes: int + :param enable_multiple_standard_load_balancers: Enable multiple standard load balancers per AKS + cluster or not. + :type enable_multiple_standard_load_balancers: bool + """ + + _validation = { + 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, + 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, + } + + _attribute_map = { + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, + 'enable_multiple_standard_load_balancers': {'key': 'enableMultipleStandardLoadBalancers', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) + self.managed_outbound_i_ps = kwargs.get('managed_outbound_i_ps', None) + self.outbound_ip_prefixes = kwargs.get('outbound_ip_prefixes', None) + self.outbound_i_ps = kwargs.get('outbound_i_ps', None) + self.effective_outbound_i_ps = kwargs.get('effective_outbound_i_ps', None) + self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', 0) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 30) + self.enable_multiple_standard_load_balancers = kwargs.get('enable_multiple_standard_load_balancers', None) + + +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): + """Desired managed outbound IPs for the cluster load balancer. + + :param count: The desired number of outbound IPs created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + """ + + _validation = { + 'count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) + self.count = kwargs.get('count', 1) + + +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): + """Desired outbound IP Prefix resources for the cluster load balancer. + + :param public_ip_prefixes: A list of public IP prefix resources. + :type public_ip_prefixes: + list[~azure.mgmt.containerservice.v2021_09_01.models.ResourceReference] + """ + + _attribute_map = { + 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) + self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) + + +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): + """Desired outbound IP resources for the cluster load balancer. + + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2021_09_01.models.ResourceReference] + """ + + _attribute_map = { + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) + self.public_i_ps = kwargs.get('public_i_ps', None) + + +class ManagedClusterManagedOutboundIPProfile(msrest.serialization.Model): + """Profile of the managed outbound IP resources of the managed cluster. + + :param count: The desired number of outbound IPs created/managed by Azure. Allowed values must + be in the range of 1 to 16 (inclusive). The default value is 1. + :type count: int + """ + + _validation = { + 'count': {'maximum': 16, 'minimum': 1}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterManagedOutboundIPProfile, self).__init__(**kwargs) + self.count = kwargs.get('count', 1) + + +class ManagedClusterNATGatewayProfile(msrest.serialization.Model): + """Profile of the managed cluster NAT gateway. + + :param managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster + NAT gateway. + :type managed_outbound_ip_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterManagedOutboundIPProfile + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster NAT gateway. + :type effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2021_09_01.models.ResourceReference] + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 4 minutes. + :type idle_timeout_in_minutes: int + """ + + _validation = { + 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, + } + + _attribute_map = { + 'managed_outbound_ip_profile': {'key': 'managedOutboundIPProfile', 'type': 'ManagedClusterManagedOutboundIPProfile'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterNATGatewayProfile, self).__init__(**kwargs) + self.managed_outbound_ip_profile = kwargs.get('managed_outbound_ip_profile', None) + self.effective_outbound_i_ps = kwargs.get('effective_outbound_i_ps', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', 4) + + +class ManagedClusterPodIdentity(msrest.serialization.Model): + """Details about the pod identity assigned to the Managed Cluster. + + 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 name: Required. The name of the pod identity. + :type name: str + :param namespace: Required. The namespace of the pod identity. + :type namespace: str + :param binding_selector: The binding selector to use for the AzureIdentityBinding resource. + :type binding_selector: str + :param identity: Required. The user assigned identity details. + :type identity: ~azure.mgmt.containerservice.v2021_09_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningState + :ivar provisioning_info: + :vartype provisioning_info: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningInfo + """ + + _validation = { + 'name': {'required': True}, + 'namespace': {'required': True}, + 'identity': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_info': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'binding_selector': {'key': 'bindingSelector', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentity, self).__init__(**kwargs) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.binding_selector = kwargs.get('binding_selector', None) + self.identity = kwargs['identity'] + self.provisioning_state = None + self.provisioning_info = None + + +class ManagedClusterPodIdentityException(msrest.serialization.Model): + """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the pod identity exception. + :type name: str + :param namespace: Required. The namespace of the pod identity exception. + :type namespace: str + :param pod_labels: Required. The pod labels to match. + :type pod_labels: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'namespace': {'required': True}, + 'pod_labels': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentityException, self).__init__(**kwargs) + self.name = kwargs['name'] + self.namespace = kwargs['namespace'] + self.pod_labels = kwargs['pod_labels'] + + +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): + """See `use AAD pod identity `_ for more details on pod identity integration. + + :param enabled: Whether the pod identity addon is enabled. + :type enabled: bool + :param allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the + security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet + network plugin with AAD Pod Identity + `_ + for more information. + :type allow_network_plugin_kubenet: bool + :param user_assigned_identities: The pod identities to use in the cluster. + :type user_assigned_identities: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentity] + :param user_assigned_identity_exceptions: The pod identity exceptions to allow. + :type user_assigned_identity_exceptions: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityException] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, + 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.allow_network_plugin_kubenet = kwargs.get('allow_network_plugin_kubenet', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + self.user_assigned_identity_exceptions = kwargs.get('user_assigned_identity_exceptions', None) + + +class ManagedClusterPodIdentityProvisioningError(msrest.serialization.Model): + """An error response from the pod identity provisioning. + + :param error: Details about the error. + :type error: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ManagedClusterPodIdentityProvisioningErrorBody'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentityProvisioningError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ManagedClusterPodIdentityProvisioningErrorBody(msrest.serialization.Model): + """An error response from the pod identity provisioning. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ManagedClusterPodIdentityProvisioningErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentityProvisioningErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): + """ManagedClusterPodIdentityProvisioningInfo. + + :param error: Pod identity assignment error (if any). + :type error: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ManagedClusterPodIdentityProvisioningError'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param name: The Agent Pool name. + :type name: str + :param os_type: Required. The operating system type. The default is Linux. Possible values + include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kwargs['kubernetes_version'] + self.name = kwargs.get('name', None) + self.os_type = kwargs.get('os_type', "Linux") + self.upgrades = kwargs.get('upgrades', None) + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :param kubernetes_version: The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param is_preview: Whether the Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kwargs.get('kubernetes_version', None) + self.is_preview = kwargs.get('is_preview', None) + + +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): + """Parameters to be applied to the cluster-autoscaler when enabled. + + :param balance_similar_node_groups: Valid values are 'true' and 'false'. + :type balance_similar_node_groups: str + :param expander: If not specified, the default is 'random'. See `expanders + `_ + for more information. Possible values include: "least-waste", "most-pods", "priority", + "random". + :type expander: str or ~azure.mgmt.containerservice.v2021_09_01.models.Expander + :param max_empty_bulk_delete: The default is 10. + :type max_empty_bulk_delete: str + :param max_graceful_termination_sec: The default is 600. + :type max_graceful_termination_sec: str + :param max_node_provision_time: The default is '15m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :type max_node_provision_time: str + :param max_total_unready_percentage: The default is 45. The maximum is 100 and the minimum is + 0. + :type max_total_unready_percentage: str + :param new_pod_scale_up_delay: For scenarios like burst/batch scale where you don't want CA to + act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore + unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer + followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + :type new_pod_scale_up_delay: str + :param ok_total_unready_count: This must be an integer. The default is 3. + :type ok_total_unready_count: str + :param scan_interval: The default is '10'. Values must be an integer number of seconds. + :type scan_interval: str + :param scale_down_delay_after_add: The default is '10m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_delay_after_add: str + :param scale_down_delay_after_delete: The default is the scan-interval. Values must be an + integer followed by an 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_delay_after_delete: str + :param scale_down_delay_after_failure: The default is '3m'. Values must be an integer followed + by an 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_delay_after_failure: str + :param scale_down_unneeded_time: The default is '10m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_unneeded_time: str + :param scale_down_unready_time: The default is '20m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_unready_time: str + :param scale_down_utilization_threshold: The default is '0.5'. + :type scale_down_utilization_threshold: str + :param skip_nodes_with_local_storage: The default is true. + :type skip_nodes_with_local_storage: str + :param skip_nodes_with_system_pods: The default is true. + :type skip_nodes_with_system_pods: str + """ + + _attribute_map = { + 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, + 'expander': {'key': 'expander', 'type': 'str'}, + 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, + 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, + 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, + 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, + 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, + 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, + 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, + 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, + 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, + 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, + 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, + 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, + 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, + 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, + 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) + self.balance_similar_node_groups = kwargs.get('balance_similar_node_groups', None) + self.expander = kwargs.get('expander', None) + self.max_empty_bulk_delete = kwargs.get('max_empty_bulk_delete', None) + self.max_graceful_termination_sec = kwargs.get('max_graceful_termination_sec', None) + self.max_node_provision_time = kwargs.get('max_node_provision_time', None) + self.max_total_unready_percentage = kwargs.get('max_total_unready_percentage', None) + self.new_pod_scale_up_delay = kwargs.get('new_pod_scale_up_delay', None) + self.ok_total_unready_count = kwargs.get('ok_total_unready_count', None) + self.scan_interval = kwargs.get('scan_interval', None) + self.scale_down_delay_after_add = kwargs.get('scale_down_delay_after_add', None) + self.scale_down_delay_after_delete = kwargs.get('scale_down_delay_after_delete', None) + self.scale_down_delay_after_failure = kwargs.get('scale_down_delay_after_failure', None) + self.scale_down_unneeded_time = kwargs.get('scale_down_unneeded_time', None) + self.scale_down_unready_time = kwargs.get('scale_down_unready_time', None) + self.scale_down_utilization_threshold = kwargs.get('scale_down_utilization_threshold', None) + self.skip_nodes_with_local_storage = kwargs.get('skip_nodes_with_local_storage', None) + self.skip_nodes_with_system_pods = kwargs.get('skip_nodes_with_system_pods', None) + + +class ManagedClusterSecurityProfile(msrest.serialization.Model): + """Security profile for the container service cluster. + + :param azure_defender: Azure Defender settings for the security profile. + :type azure_defender: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSecurityProfileAzureDefender + """ + + _attribute_map = { + 'azure_defender': {'key': 'azureDefender', 'type': 'ManagedClusterSecurityProfileAzureDefender'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterSecurityProfile, self).__init__(**kwargs) + self.azure_defender = kwargs.get('azure_defender', None) + + +class ManagedClusterSecurityProfileAzureDefender(msrest.serialization.Model): + """Azure Defender settings for the security profile. + + :param enabled: Whether to enable Azure Defender. + :type enabled: bool + :param log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be + associated with Azure Defender. When Azure Defender is enabled, this field is required and + must be a valid workspace resource ID. When Azure Defender is disabled, leave the field empty. + :type log_analytics_workspace_resource_id: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'log_analytics_workspace_resource_id': {'key': 'logAnalyticsWorkspaceResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterSecurityProfileAzureDefender, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.log_analytics_workspace_resource_id = kwargs.get('log_analytics_workspace_resource_id', None) + + +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = kwargs['client_id'] + self.secret = kwargs.get('secret', None) + + +class ManagedClusterSKU(msrest.serialization.Model): + """The SKU of a Managed Cluster. + + :param name: The name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSKUName + :param tier: If not specified, the default is 'Free'. See `uptime SLA + `_ for more details. Possible values include: + "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSKUTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterSKU, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class ManagedClusterUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for compute pools. + + 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. + + :ivar id: The ID of the upgrade profile. + :vartype id: str + :ivar name: The name of the upgrade profile. + :vartype name: str + :ivar type: The type of the upgrade profile. + :vartype type: str + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. + :type control_plane_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPoolUpgradeProfile + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'control_plane_profile': {'required': True}, + 'agent_pool_profiles': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = kwargs['control_plane_profile'] + self.agent_pool_profiles = kwargs['agent_pool_profiles'] + + +class ManagedClusterWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the managed cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. + :type admin_username: str + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :type admin_password: str + :param license_type: The license type to use for Windows VMs. See `Azure Hybrid User Benefits + `_ for more details. Possible values + include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.LicenseType + :param enable_csi_proxy: For more details on CSI proxy, see the `CSI proxy GitHub repo + `_. + :type enable_csi_proxy: bool + :param gmsa_profile: The Windows gMSA Profile in the Managed Cluster. + :type gmsa_profile: ~azure.mgmt.containerservice.v2021_09_01.models.WindowsGmsaProfile + """ + + _validation = { + 'admin_username': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, + 'gmsa_profile': {'key': 'gmsaProfile', 'type': 'WindowsGmsaProfile'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedClusterWindowsProfile, self).__init__(**kwargs) + self.admin_username = kwargs['admin_username'] + self.admin_password = kwargs.get('admin_password', None) + self.license_type = kwargs.get('license_type', None) + self.enable_csi_proxy = kwargs.get('enable_csi_proxy', None) + self.gmsa_profile = kwargs.get('gmsa_profile', None) + + +class ManagedServiceIdentityUserAssignedIdentitiesValue(msrest.serialization.Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class OperationListResult(msrest.serialization.Model): + """The List Operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of operations. + :vartype value: list[~azure.mgmt.containerservice.v2021_09_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the operation. + :vartype origin: str + :ivar name: The name of the operation. + :vartype name: str + :ivar operation: The display name of the operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class OSOptionProfile(msrest.serialization.Model): + """The OS option profile. + + 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. + + :ivar id: The ID of the OS option resource. + :vartype id: str + :ivar name: The name of the OS option resource. + :vartype name: str + :ivar type: The type of the OS option resource. + :vartype type: str + :param os_option_property_list: Required. The list of OS options. + :type os_option_property_list: + list[~azure.mgmt.containerservice.v2021_09_01.models.OSOptionProperty] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'os_option_property_list': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, + } + + def __init__( + self, + **kwargs + ): + super(OSOptionProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.os_option_property_list = kwargs['os_option_property_list'] + + +class OSOptionProperty(msrest.serialization.Model): + """OS option property. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The OS type. + :type os_type: str + :param enable_fips_image: Required. Whether the image is FIPS-enabled. + :type enable_fips_image: bool + """ + + _validation = { + 'os_type': {'required': True}, + 'enable_fips_image': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'os-type', 'type': 'str'}, + 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(OSOptionProperty, self).__init__(**kwargs) + self.os_type = kwargs['os_type'] + self.enable_fips_image = kwargs['enable_fips_image'] + + +class OutboundEnvironmentEndpoint(msrest.serialization.Model): + """Egress endpoints which AKS agent nodes connect to for common purpose. + + :param category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. + :type category: str + :param endpoints: The endpoints that AKS agent nodes connect to. + :type endpoints: list[~azure.mgmt.containerservice.v2021_09_01.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.endpoints = kwargs.get('endpoints', None) + + +class OutboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of OutboundEnvironmentEndpoint. + + 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 value: Required. Collection of resources. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + +class PowerState(msrest.serialization.Model): + """Describes the Power State of the cluster. + + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". + :type code: str or ~azure.mgmt.containerservice.v2021_09_01.models.Code + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PowerState, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + + +class PrivateEndpoint(msrest.serialization.Model): + """Private endpoint which a connection belongs to. + + :param id: The resource ID of the private endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateEndpointConnection(msrest.serialization.Model): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the private endpoint connection. + :vartype id: str + :ivar name: The name of the private endpoint connection. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnectionProvisioningState + :param private_endpoint: The resource of private endpoint. + :type private_endpoint: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.provisioning_state = None + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + :param value: The collection value. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkResource(msrest.serialization.Model): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: The ID of the private link resource. + :type id: str + :param name: The name of the private link resource. + :type name: str + :param type: The resource type. + :type type: str + :param group_id: The group ID of the resource. + :type group_id: str + :param required_members: The RequiredMembers of the resource. + :type required_members: list[str] + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. + :vartype private_link_service_id: str + """ + + _validation = { + 'private_link_service_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.group_id = kwargs.get('group_id', None) + self.required_members = kwargs.get('required_members', None) + self.private_link_service_id = None + + +class PrivateLinkResourcesListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: The collection value. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourcesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """The state of a private link service connection. + + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2021_09_01.models.ConnectionStatus + :param description: The private link service connection description. + :type description: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + + +class ResourceReference(msrest.serialization.Model): + """A reference to an Azure resource. + + :param id: The fully qualified Azure resource id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class RunCommandRequest(msrest.serialization.Model): + """A run command request. + + All required parameters must be populated in order to send to Azure. + + :param command: Required. The command to run. + :type command: str + :param context: A base64 encoded zip file containing the files required by the command. + :type context: str + :param cluster_token: AuthToken issued for AKS AAD Server App. + :type cluster_token: str + """ + + _validation = { + 'command': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + 'context': {'key': 'context', 'type': 'str'}, + 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RunCommandRequest, self).__init__(**kwargs) + self.command = kwargs['command'] + self.context = kwargs.get('context', None) + self.cluster_token = kwargs.get('cluster_token', None) + + +class RunCommandResult(msrest.serialization.Model): + """run command result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The command id. + :vartype id: str + :ivar provisioning_state: provisioning State. + :vartype provisioning_state: str + :ivar exit_code: The exit code of the command. + :vartype exit_code: int + :ivar started_at: The time when the command started. + :vartype started_at: ~datetime.datetime + :ivar finished_at: The time when the command finished. + :vartype finished_at: ~datetime.datetime + :ivar logs: The command output. + :vartype logs: str + :ivar reason: An explanation of why provisioningState is set to failed (if so). + :vartype reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'exit_code': {'readonly': True}, + 'started_at': {'readonly': True}, + 'finished_at': {'readonly': True}, + 'logs': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, + 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, + 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, + 'logs': {'key': 'properties.logs', 'type': 'str'}, + 'reason': {'key': 'properties.reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RunCommandResult, self).__init__(**kwargs) + self.id = None + self.provisioning_state = None + self.exit_code = None + self.started_at = None + self.finished_at = None + self.logs = None + self.reason = None + + +class Snapshot(Resource): + """A node pool snapshot resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: The system metadata relating to this snapshot. + :vartype system_data: ~azure.mgmt.containerservice.v2021_09_01.models.SystemData + :param creation_data: CreationData to be used to specify the source agent pool resource ID to + create this snapshot. + :type creation_data: ~azure.mgmt.containerservice.v2021_09_01.models.CreationData + :param snapshot_type: The type of a snapshot. The default is NodePool. Possible values include: + "NodePool". Default value: "NodePool". + :type snapshot_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.SnapshotType + :ivar kubernetes_version: The version of Kubernetes. + :vartype kubernetes_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar os_type: The operating system type. The default is Linux. Possible values include: + "Linux", "Windows". Default value: "Linux". + :vartype os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :ivar os_sku: Specifies an OS SKU. This value must not be specified if OSType is Windows. + Possible values include: "Ubuntu", "CBLMariner". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSSKU + :ivar vm_size: The size of the VM. + :vartype vm_size: str + :ivar enable_fips: Whether to use a FIPS-enabled OS. + :vartype enable_fips: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'kubernetes_version': {'readonly': True}, + 'node_image_version': {'readonly': True}, + 'os_type': {'readonly': True}, + 'os_sku': {'readonly': True}, + 'vm_size': {'readonly': True}, + 'enable_fips': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'snapshot_type': {'key': 'properties.snapshotType', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'os_sku': {'key': 'properties.osSku', 'type': 'str'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'enable_fips': {'key': 'properties.enableFIPS', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Snapshot, self).__init__(**kwargs) + self.system_data = None + self.creation_data = kwargs.get('creation_data', None) + self.snapshot_type = kwargs.get('snapshot_type', "NodePool") + self.kubernetes_version = None + self.node_image_version = None + self.os_type = None + self.os_sku = None + self.vm_size = None + self.enable_fips = None + + +class SnapshotListResult(msrest.serialization.Model): + """The response from the List Snapshots operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of snapshots. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.Snapshot] + :ivar next_link: The URL to get the next set of snapshot results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Snapshot]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SnapshotListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class SysctlConfig(msrest.serialization.Model): + """Sysctl settings for Linux agent nodes. + + :param net_core_somaxconn: Sysctl setting net.core.somaxconn. + :type net_core_somaxconn: int + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. + :type net_core_netdev_max_backlog: int + :param net_core_rmem_default: Sysctl setting net.core.rmem_default. + :type net_core_rmem_default: int + :param net_core_rmem_max: Sysctl setting net.core.rmem_max. + :type net_core_rmem_max: int + :param net_core_wmem_default: Sysctl setting net.core.wmem_default. + :type net_core_wmem_default: int + :param net_core_wmem_max: Sysctl setting net.core.wmem_max. + :type net_core_wmem_max: int + :param net_core_optmem_max: Sysctl setting net.core.optmem_max. + :type net_core_optmem_max: int + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. + :type net_ipv4_tcp_max_syn_backlog: int + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. + :type net_ipv4_tcp_max_tw_buckets: int + :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. + :type net_ipv4_tcp_fin_timeout: int + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. + :type net_ipv4_tcp_keepalive_time: int + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. + :type net_ipv4_tcp_keepalive_probes: int + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. + :type net_ipv4_tcpkeepalive_intvl: int + :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. + :type net_ipv4_tcp_tw_reuse: bool + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. + :type net_ipv4_ip_local_port_range: str + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + :type net_ipv4_neigh_default_gc_thresh1: int + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + :type net_ipv4_neigh_default_gc_thresh2: int + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + :type net_ipv4_neigh_default_gc_thresh3: int + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. + :type net_netfilter_nf_conntrack_max: int + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. + :type net_netfilter_nf_conntrack_buckets: int + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. + :type fs_inotify_max_user_watches: int + :param fs_file_max: Sysctl setting fs.file-max. + :type fs_file_max: int + :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. + :type fs_aio_max_nr: int + :param fs_nr_open: Sysctl setting fs.nr_open. + :type fs_nr_open: int + :param kernel_threads_max: Sysctl setting kernel.threads-max. + :type kernel_threads_max: int + :param vm_max_map_count: Sysctl setting vm.max_map_count. + :type vm_max_map_count: int + :param vm_swappiness: Sysctl setting vm.swappiness. + :type vm_swappiness: int + :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. + :type vm_vfs_cache_pressure: int + """ + + _attribute_map = { + 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, + 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, + 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, + 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, + 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, + 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, + 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, + 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, + 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, + 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, + 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, + 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, + 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, + 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, + 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, + 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, + 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, + 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, + 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, + 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, + 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, + 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, + 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, + 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, + 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, + 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, + 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, + 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(SysctlConfig, self).__init__(**kwargs) + self.net_core_somaxconn = kwargs.get('net_core_somaxconn', None) + self.net_core_netdev_max_backlog = kwargs.get('net_core_netdev_max_backlog', None) + self.net_core_rmem_default = kwargs.get('net_core_rmem_default', None) + self.net_core_rmem_max = kwargs.get('net_core_rmem_max', None) + self.net_core_wmem_default = kwargs.get('net_core_wmem_default', None) + self.net_core_wmem_max = kwargs.get('net_core_wmem_max', None) + self.net_core_optmem_max = kwargs.get('net_core_optmem_max', None) + self.net_ipv4_tcp_max_syn_backlog = kwargs.get('net_ipv4_tcp_max_syn_backlog', None) + self.net_ipv4_tcp_max_tw_buckets = kwargs.get('net_ipv4_tcp_max_tw_buckets', None) + self.net_ipv4_tcp_fin_timeout = kwargs.get('net_ipv4_tcp_fin_timeout', None) + self.net_ipv4_tcp_keepalive_time = kwargs.get('net_ipv4_tcp_keepalive_time', None) + self.net_ipv4_tcp_keepalive_probes = kwargs.get('net_ipv4_tcp_keepalive_probes', None) + self.net_ipv4_tcpkeepalive_intvl = kwargs.get('net_ipv4_tcpkeepalive_intvl', None) + self.net_ipv4_tcp_tw_reuse = kwargs.get('net_ipv4_tcp_tw_reuse', None) + self.net_ipv4_ip_local_port_range = kwargs.get('net_ipv4_ip_local_port_range', None) + self.net_ipv4_neigh_default_gc_thresh1 = kwargs.get('net_ipv4_neigh_default_gc_thresh1', None) + self.net_ipv4_neigh_default_gc_thresh2 = kwargs.get('net_ipv4_neigh_default_gc_thresh2', None) + self.net_ipv4_neigh_default_gc_thresh3 = kwargs.get('net_ipv4_neigh_default_gc_thresh3', None) + self.net_netfilter_nf_conntrack_max = kwargs.get('net_netfilter_nf_conntrack_max', None) + self.net_netfilter_nf_conntrack_buckets = kwargs.get('net_netfilter_nf_conntrack_buckets', None) + self.fs_inotify_max_user_watches = kwargs.get('fs_inotify_max_user_watches', None) + self.fs_file_max = kwargs.get('fs_file_max', None) + self.fs_aio_max_nr = kwargs.get('fs_aio_max_nr', None) + self.fs_nr_open = kwargs.get('fs_nr_open', None) + self.kernel_threads_max = kwargs.get('kernel_threads_max', None) + self.vm_max_map_count = kwargs.get('vm_max_map_count', None) + self.vm_swappiness = kwargs.get('vm_swappiness', None) + self.vm_vfs_cache_pressure = kwargs.get('vm_vfs_cache_pressure', None) + + +class SystemData(msrest.serialization.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.containerservice.v2021_09_01.models.CreatedByType + :param created_at: The UTC timestamp of resource creation. + :type created_at: ~datetime.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.containerservice.v2021_09_01.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class TimeInWeek(msrest.serialization.Model): + """Time in a week. + + :param day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". + :type day: str or ~azure.mgmt.containerservice.v2021_09_01.models.WeekDay + :param hour_slots: Each integer hour represents a time range beginning at 0m after the hour + ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 + UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + :type hour_slots: list[int] + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'str'}, + 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, + } + + def __init__( + self, + **kwargs + ): + super(TimeInWeek, self).__init__(**kwargs) + self.day = kwargs.get('day', None) + self.hour_slots = kwargs.get('hour_slots', None) + + +class TimeSpan(msrest.serialization.Model): + """For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime + """ + + _attribute_map = { + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(TimeSpan, self).__init__(**kwargs) + self.start = kwargs.get('start', None) + self.end = kwargs.get('end', None) + + +class WindowsGmsaProfile(msrest.serialization.Model): + """Windows gMSA Profile in the managed cluster. + + :param enabled: Specifies whether to enable Windows gMSA in the managed cluster. + :type enabled: bool + :param dns_server: Specifies the DNS server for Windows gMSA. :code:`
`:code:`
` Set it + to empty if you have configured the DNS server in the vnet which is used to create the managed + cluster. + :type dns_server: str + :param root_domain_name: Specifies the root domain name for Windows gMSA. + :code:`
`:code:`
` Set it to empty if you have configured the DNS server in the vnet + which is used to create the managed cluster. + :type root_domain_name: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'dns_server': {'key': 'dnsServer', 'type': 'str'}, + 'root_domain_name': {'key': 'rootDomainName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WindowsGmsaProfile, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.dns_server = kwargs.get('dns_server', None) + self.root_domain_name = kwargs.get('root_domain_name', None) diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models_py3.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models_py3.py new file mode 100644 index 000000000000..c8b6b978c971 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/models/_models_py3.py @@ -0,0 +1,4362 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._container_service_client_enums import * + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class AgentPool(SubResource): + """Agent Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :type vm_size: str + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Possible values + include: "Managed", "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSDiskType + :param kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.KubeletDiskType + :param workload_runtime: Determines the type of workload a node can run. Possible values + include: "OCIContainer", "WasmWasi". + :type workload_runtime: str or ~azure.mgmt.containerservice.v2021_09_01.models.WorkloadRuntime + :param vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type vnet_subnet_id: str + :param pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type pod_subnet_id: str + :param max_pods: The maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: The operating system type. The default is Linux. Possible values include: + "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param os_sku: Specifies an OS SKU. This value must not be specified if OSType is Windows. + Possible values include: "Ubuntu", "CBLMariner". + :type os_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSSKU + :param max_count: The maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: The minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Possible values include: "Delete", "Deallocate". + :type scale_down_mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.ScaleDownMode + :param type_properties_type: The type of Agent Pool. Possible values include: + "VirtualMachineScaleSets", "AvailabilitySet". + :type type_properties_type: str or + ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolType + :param mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolMode + :param orchestrator_version: As a best practice, you should upgrade all node pools in an AKS + cluster to the same Kubernetes version. The node pool version must have the same major version + as the control plane. The node pool minor version must be within two minor versions of the + control plane version. The node pool version cannot be greater than the control plane version. + For more information see `upgrading a node pool + `_. + :type orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :param power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :type power_state: ~azure.mgmt.containerservice.v2021_09_01.models.PowerState + :param availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :type availability_zones: list[str] + :param enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :type enable_node_public_ip: bool + :param node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :type node_public_ip_prefix_id: str + :param scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Possible values include: "Spot", "Regular". Default value: "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetPriority + :param scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetEvictionPolicy + :param spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :type spot_max_price: float + :param tags: A set of tags. The tags to be persisted on the agent pool virtual machine scale + set. + :type tags: dict[str, str] + :param node_labels: The node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: The Kubelet configuration on the agent pool nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_09_01.models.KubeletConfig + :param linux_os_config: The OS configuration of Linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_09_01.models.LinuxOSConfig + :param enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :type enable_encryption_at_host: bool + :param enable_ultra_ssd: Whether to enable UltraSSD. + :type enable_ultra_ssd: bool + :param enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :type enable_fips: bool + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Possible values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". + :type gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2021_09_01.models.GPUInstanceProfile + :param creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :type creation_data: ~azure.mgmt.containerservice.v2021_09_01.models.CreationData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'count': {'key': 'properties.count', 'type': 'int'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'properties.osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'properties.osDiskType', 'type': 'str'}, + 'kubelet_disk_type': {'key': 'properties.kubeletDiskType', 'type': 'str'}, + 'workload_runtime': {'key': 'properties.workloadRuntime', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'properties.vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'properties.podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'properties.maxPods', 'type': 'int'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'os_sku': {'key': 'properties.osSKU', 'type': 'str'}, + 'max_count': {'key': 'properties.maxCount', 'type': 'int'}, + 'min_count': {'key': 'properties.minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'properties.enableAutoScaling', 'type': 'bool'}, + 'scale_down_mode': {'key': 'properties.scaleDownMode', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'properties.orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'properties.upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'properties.enableNodePublicIP', 'type': 'bool'}, + 'node_public_ip_prefix_id': {'key': 'properties.nodePublicIPPrefixID', 'type': 'str'}, + 'scale_set_priority': {'key': 'properties.scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'properties.scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'properties.spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'properties.tags', 'type': '{str}'}, + 'node_labels': {'key': 'properties.nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'properties.nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'properties.proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'properties.kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'properties.linuxOSConfig', 'type': 'LinuxOSConfig'}, + 'enable_encryption_at_host': {'key': 'properties.enableEncryptionAtHost', 'type': 'bool'}, + 'enable_ultra_ssd': {'key': 'properties.enableUltraSSD', 'type': 'bool'}, + 'enable_fips': {'key': 'properties.enableFIPS', 'type': 'bool'}, + 'gpu_instance_profile': {'key': 'properties.gpuInstanceProfile', 'type': 'str'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + } + + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + workload_runtime: Optional[Union[str, "WorkloadRuntime"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + os_sku: Optional[Union[str, "OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + scale_down_mode: Optional[Union[str, "ScaleDownMode"]] = None, + type_properties_type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + power_state: Optional["PowerState"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "GPUInstanceProfile"]] = None, + creation_data: Optional["CreationData"] = None, + **kwargs + ): + super(AgentPool, self).__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.os_disk_type = os_disk_type + self.kubelet_disk_type = kubelet_disk_type + self.workload_runtime = workload_runtime + self.vnet_subnet_id = vnet_subnet_id + self.pod_subnet_id = pod_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.os_sku = os_sku + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.scale_down_mode = scale_down_mode + self.type_properties_type = type_properties_type + self.mode = mode + self.orchestrator_version = orchestrator_version + self.node_image_version = None + self.upgrade_settings = upgrade_settings + self.provisioning_state = None + self.power_state = power_state + self.availability_zones = availability_zones + self.enable_node_public_ip = enable_node_public_ip + self.node_public_ip_prefix_id = node_public_ip_prefix_id + self.scale_set_priority = scale_set_priority + self.scale_set_eviction_policy = scale_set_eviction_policy + self.spot_max_price = spot_max_price + self.tags = tags + self.node_labels = node_labels + self.node_taints = node_taints + self.proximity_placement_group_id = proximity_placement_group_id + self.kubelet_config = kubelet_config + self.linux_os_config = linux_os_config + self.enable_encryption_at_host = enable_encryption_at_host + self.enable_ultra_ssd = enable_ultra_ssd + self.enable_fips = enable_fips + self.gpu_instance_profile = gpu_instance_profile + self.creation_data = creation_data + + +class AgentPoolAvailableVersions(msrest.serialization.Model): + """The list of available versions for an agent pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the agent pool version list. + :vartype id: str + :ivar name: The name of the agent pool version list. + :vartype name: str + :ivar type: Type of the agent pool version list. + :vartype type: str + :param agent_pool_versions: List of versions available for agent pool. + :type agent_pool_versions: + list[~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'agent_pool_versions': {'key': 'properties.agentPoolVersions', 'type': '[AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem]'}, + } + + def __init__( + self, + *, + agent_pool_versions: Optional[List["AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem"]] = None, + **kwargs + ): + super(AgentPoolAvailableVersions, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.agent_pool_versions = agent_pool_versions + + +class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(msrest.serialization.Model): + """AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + + :param default: Whether this version is the default agent pool version. + :type default: bool + :param kubernetes_version: The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param is_preview: Whether Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'default': {'key': 'default', 'type': 'bool'}, + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + default: Optional[bool] = None, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, self).__init__(**kwargs) + self.default = default + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class AgentPoolListResult(msrest.serialization.Model): + """The response from the List Agent Pools operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of agent pools. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.AgentPool] + :ivar next_link: The URL to get the next set of agent pool results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AgentPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AgentPool"]] = None, + **kwargs + ): + super(AgentPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AgentPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for an agent pool. + + 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. + + :ivar id: The ID of the agent pool upgrade profile. + :vartype id: str + :ivar name: The name of the agent pool upgrade profile. + :vartype name: str + :ivar type: The type of the agent pool upgrade profile. + :vartype type: str + :param kubernetes_version: Required. The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param os_type: Required. The operating system type. The default is Linux. Possible values + include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeProfilePropertiesUpgradesItem] + :param latest_node_image_version: The latest AKS supported node image version. + :type latest_node_image_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'upgrades': {'key': 'properties.upgrades', 'type': '[AgentPoolUpgradeProfilePropertiesUpgradesItem]'}, + 'latest_node_image_version': {'key': 'properties.latestNodeImageVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + upgrades: Optional[List["AgentPoolUpgradeProfilePropertiesUpgradesItem"]] = None, + latest_node_image_version: Optional[str] = None, + **kwargs + ): + super(AgentPoolUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kubernetes_version = kubernetes_version + self.os_type = os_type + self.upgrades = upgrades + self.latest_node_image_version = latest_node_image_version + + +class AgentPoolUpgradeProfilePropertiesUpgradesItem(msrest.serialization.Model): + """AgentPoolUpgradeProfilePropertiesUpgradesItem. + + :param kubernetes_version: The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param is_preview: Whether the Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(AgentPoolUpgradeProfilePropertiesUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class AgentPoolUpgradeSettings(msrest.serialization.Model): + """Settings for upgrading an agentpool. + + :param max_surge: This can either be set to an integer (e.g. '5') or a percentage (e.g. '50%'). + If a percentage is specified, it is the percentage of the total agent pool size at the time of + the upgrade. For percentages, fractional nodes are rounded up. If not specified, the default is + 1. For more information, including best practices, see: + https://docs.microsoft.com/azure/aks/upgrade-cluster#customize-node-surge-upgrade. + :type max_surge: str + """ + + _attribute_map = { + 'max_surge': {'key': 'maxSurge', 'type': 'str'}, + } + + def __init__( + self, + *, + max_surge: Optional[str] = None, + **kwargs + ): + super(AgentPoolUpgradeSettings, self).__init__(**kwargs) + self.max_surge = max_surge + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the Container service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.containerservice.v2021_09_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ContainerServiceDiagnosticsProfile(msrest.serialization.Model): + """Profile for diagnostics on the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param vm_diagnostics: Required. Profile for diagnostics on the container service VMs. + :type vm_diagnostics: + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceVMDiagnostics + """ + + _validation = { + 'vm_diagnostics': {'required': True}, + } + + _attribute_map = { + 'vm_diagnostics': {'key': 'vmDiagnostics', 'type': 'ContainerServiceVMDiagnostics'}, + } + + def __init__( + self, + *, + vm_diagnostics: "ContainerServiceVMDiagnostics", + **kwargs + ): + super(ContainerServiceDiagnosticsProfile, self).__init__(**kwargs) + self.vm_diagnostics = vm_diagnostics + + +class ContainerServiceLinuxProfile(msrest.serialization.Model): + """Profile for Linux VMs in the container service cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. The administrator username to use for Linux VMs. + :type admin_username: str + :param ssh: Required. The SSH configuration for Linux-based VMs running on Azure. + :type ssh: ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceSshConfiguration + """ + + _validation = { + 'admin_username': {'required': True, 'pattern': r'^[A-Za-z][-A-Za-z0-9_]*$'}, + 'ssh': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'ssh': {'key': 'ssh', 'type': 'ContainerServiceSshConfiguration'}, + } + + def __init__( + self, + *, + admin_username: str, + ssh: "ContainerServiceSshConfiguration", + **kwargs + ): + super(ContainerServiceLinuxProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.ssh = ssh + + +class ContainerServiceMasterProfile(msrest.serialization.Model): + """Profile for the container service master. + + 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 count: Number of masters (VMs) in the container service cluster. Allowed values are 1, + 3, and 5. The default value is 1. Possible values include: 1, 3, 5. Default value: "1". + :type count: str or ~azure.mgmt.containerservice.v2021_09_01.models.Count + :param dns_prefix: Required. DNS prefix to be used to create the FQDN for the master pool. + :type dns_prefix: str + :param vm_size: Required. Size of agent VMs. Possible values include: "Standard_A1", + "Standard_A10", "Standard_A11", "Standard_A1_v2", "Standard_A2", "Standard_A2_v2", + "Standard_A2m_v2", "Standard_A3", "Standard_A4", "Standard_A4_v2", "Standard_A4m_v2", + "Standard_A5", "Standard_A6", "Standard_A7", "Standard_A8", "Standard_A8_v2", + "Standard_A8m_v2", "Standard_A9", "Standard_B2ms", "Standard_B2s", "Standard_B4ms", + "Standard_B8ms", "Standard_D1", "Standard_D11", "Standard_D11_v2", "Standard_D11_v2_Promo", + "Standard_D12", "Standard_D12_v2", "Standard_D12_v2_Promo", "Standard_D13", "Standard_D13_v2", + "Standard_D13_v2_Promo", "Standard_D14", "Standard_D14_v2", "Standard_D14_v2_Promo", + "Standard_D15_v2", "Standard_D16_v3", "Standard_D16s_v3", "Standard_D1_v2", "Standard_D2", + "Standard_D2_v2", "Standard_D2_v2_Promo", "Standard_D2_v3", "Standard_D2s_v3", "Standard_D3", + "Standard_D32_v3", "Standard_D32s_v3", "Standard_D3_v2", "Standard_D3_v2_Promo", "Standard_D4", + "Standard_D4_v2", "Standard_D4_v2_Promo", "Standard_D4_v3", "Standard_D4s_v3", + "Standard_D5_v2", "Standard_D5_v2_Promo", "Standard_D64_v3", "Standard_D64s_v3", + "Standard_D8_v3", "Standard_D8s_v3", "Standard_DS1", "Standard_DS11", "Standard_DS11_v2", + "Standard_DS11_v2_Promo", "Standard_DS12", "Standard_DS12_v2", "Standard_DS12_v2_Promo", + "Standard_DS13", "Standard_DS13-2_v2", "Standard_DS13-4_v2", "Standard_DS13_v2", + "Standard_DS13_v2_Promo", "Standard_DS14", "Standard_DS14-4_v2", "Standard_DS14-8_v2", + "Standard_DS14_v2", "Standard_DS14_v2_Promo", "Standard_DS15_v2", "Standard_DS1_v2", + "Standard_DS2", "Standard_DS2_v2", "Standard_DS2_v2_Promo", "Standard_DS3", "Standard_DS3_v2", + "Standard_DS3_v2_Promo", "Standard_DS4", "Standard_DS4_v2", "Standard_DS4_v2_Promo", + "Standard_DS5_v2", "Standard_DS5_v2_Promo", "Standard_E16_v3", "Standard_E16s_v3", + "Standard_E2_v3", "Standard_E2s_v3", "Standard_E32-16s_v3", "Standard_E32-8s_v3", + "Standard_E32_v3", "Standard_E32s_v3", "Standard_E4_v3", "Standard_E4s_v3", + "Standard_E64-16s_v3", "Standard_E64-32s_v3", "Standard_E64_v3", "Standard_E64s_v3", + "Standard_E8_v3", "Standard_E8s_v3", "Standard_F1", "Standard_F16", "Standard_F16s", + "Standard_F16s_v2", "Standard_F1s", "Standard_F2", "Standard_F2s", "Standard_F2s_v2", + "Standard_F32s_v2", "Standard_F4", "Standard_F4s", "Standard_F4s_v2", "Standard_F64s_v2", + "Standard_F72s_v2", "Standard_F8", "Standard_F8s", "Standard_F8s_v2", "Standard_G1", + "Standard_G2", "Standard_G3", "Standard_G4", "Standard_G5", "Standard_GS1", "Standard_GS2", + "Standard_GS3", "Standard_GS4", "Standard_GS4-4", "Standard_GS4-8", "Standard_GS5", + "Standard_GS5-16", "Standard_GS5-8", "Standard_H16", "Standard_H16m", "Standard_H16mr", + "Standard_H16r", "Standard_H8", "Standard_H8m", "Standard_L16s", "Standard_L32s", + "Standard_L4s", "Standard_L8s", "Standard_M128-32ms", "Standard_M128-64ms", "Standard_M128ms", + "Standard_M128s", "Standard_M64-16ms", "Standard_M64-32ms", "Standard_M64ms", "Standard_M64s", + "Standard_NC12", "Standard_NC12s_v2", "Standard_NC12s_v3", "Standard_NC24", "Standard_NC24r", + "Standard_NC24rs_v2", "Standard_NC24rs_v3", "Standard_NC24s_v2", "Standard_NC24s_v3", + "Standard_NC6", "Standard_NC6s_v2", "Standard_NC6s_v3", "Standard_ND12s", "Standard_ND24rs", + "Standard_ND24s", "Standard_ND6s", "Standard_NV12", "Standard_NV24", "Standard_NV6". + :type vm_size: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceVMSizeTypes + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in this master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param vnet_subnet_id: VNet SubnetID specifies the VNet's subnet identifier. + :type vnet_subnet_id: str + :param first_consecutive_static_ip: FirstConsecutiveStaticIP used to specify the first static + ip of masters. + :type first_consecutive_static_ip: str + :param storage_profile: Storage profile specifies what kind of storage used. Choose from + StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the + orchestrator choice. Possible values include: "StorageAccount", "ManagedDisks". + :type storage_profile: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceStorageProfileTypes + :ivar fqdn: FQDN for the master pool. + :vartype fqdn: str + """ + + _validation = { + 'dns_prefix': {'required': True}, + 'vm_size': {'required': True}, + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, + 'fqdn': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'dns_prefix': {'key': 'dnsPrefix', 'type': 'str'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'first_consecutive_static_ip': {'key': 'firstConsecutiveStaticIP', 'type': 'str'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + dns_prefix: str, + vm_size: Union[str, "ContainerServiceVMSizeTypes"], + count: Optional[Union[int, "Count"]] = "1", + os_disk_size_gb: Optional[int] = None, + vnet_subnet_id: Optional[str] = None, + first_consecutive_static_ip: Optional[str] = "10.240.255.5", + storage_profile: Optional[Union[str, "ContainerServiceStorageProfileTypes"]] = None, + **kwargs + ): + super(ContainerServiceMasterProfile, self).__init__(**kwargs) + self.count = count + self.dns_prefix = dns_prefix + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.vnet_subnet_id = vnet_subnet_id + self.first_consecutive_static_ip = first_consecutive_static_ip + self.storage_profile = storage_profile + self.fqdn = None + + +class ContainerServiceNetworkProfile(msrest.serialization.Model): + """Profile of network configuration. + + :param network_plugin: Network plugin used for building the Kubernetes network. Possible values + include: "azure", "kubenet". Default value: "kubenet". + :type network_plugin: str or ~azure.mgmt.containerservice.v2021_09_01.models.NetworkPlugin + :param network_policy: Network policy used for building the Kubernetes network. Possible values + include: "calico", "azure". + :type network_policy: str or ~azure.mgmt.containerservice.v2021_09_01.models.NetworkPolicy + :param network_mode: This cannot be specified if networkPlugin is anything other than 'azure'. + Possible values include: "transparent", "bridge". + :type network_mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.NetworkMode + :param pod_cidr: A CIDR notation IP range from which to assign pod IPs when kubenet is used. + :type pod_cidr: str + :param service_cidr: A CIDR notation IP range from which to assign service cluster IPs. It must + not overlap with any Subnet IP ranges. + :type service_cidr: str + :param dns_service_ip: An IP address assigned to the Kubernetes DNS service. It must be within + the Kubernetes service address range specified in serviceCidr. + :type dns_service_ip: str + :param docker_bridge_cidr: A CIDR notation IP range assigned to the Docker bridge network. It + must not overlap with any Subnet IP ranges or the Kubernetes service address range. + :type docker_bridge_cidr: str + :param outbound_type: This can only be set at cluster creation time and cannot be changed + later. For more information see `egress outbound type + `_. Possible values include: + "loadBalancer", "userDefinedRouting", "managedNATGateway", "userAssignedNATGateway". Default + value: "loadBalancer". + :type outbound_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OutboundType + :param load_balancer_sku: The default is 'standard'. See `Azure Load Balancer SKUs + `_ for more information about the + differences between load balancer SKUs. Possible values include: "standard", "basic". + :type load_balancer_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.LoadBalancerSku + :param load_balancer_profile: Profile of the cluster load balancer. + :type load_balancer_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterLoadBalancerProfile + :param nat_gateway_profile: Profile of the cluster NAT gateway. + :type nat_gateway_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterNATGatewayProfile + """ + + _validation = { + 'pod_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'service_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + 'dns_service_ip': {'pattern': r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'}, + 'docker_bridge_cidr': {'pattern': r'^([0-9]{1,3}\.){3}[0-9]{1,3}(\/([0-9]|[1-2][0-9]|3[0-2]))?$'}, + } + + _attribute_map = { + 'network_plugin': {'key': 'networkPlugin', 'type': 'str'}, + 'network_policy': {'key': 'networkPolicy', 'type': 'str'}, + 'network_mode': {'key': 'networkMode', 'type': 'str'}, + 'pod_cidr': {'key': 'podCidr', 'type': 'str'}, + 'service_cidr': {'key': 'serviceCidr', 'type': 'str'}, + 'dns_service_ip': {'key': 'dnsServiceIP', 'type': 'str'}, + 'docker_bridge_cidr': {'key': 'dockerBridgeCidr', 'type': 'str'}, + 'outbound_type': {'key': 'outboundType', 'type': 'str'}, + 'load_balancer_sku': {'key': 'loadBalancerSku', 'type': 'str'}, + 'load_balancer_profile': {'key': 'loadBalancerProfile', 'type': 'ManagedClusterLoadBalancerProfile'}, + 'nat_gateway_profile': {'key': 'natGatewayProfile', 'type': 'ManagedClusterNATGatewayProfile'}, + } + + def __init__( + self, + *, + network_plugin: Optional[Union[str, "NetworkPlugin"]] = "kubenet", + network_policy: Optional[Union[str, "NetworkPolicy"]] = None, + network_mode: Optional[Union[str, "NetworkMode"]] = None, + pod_cidr: Optional[str] = "10.244.0.0/16", + service_cidr: Optional[str] = "10.0.0.0/16", + dns_service_ip: Optional[str] = "10.0.0.10", + docker_bridge_cidr: Optional[str] = "172.17.0.1/16", + outbound_type: Optional[Union[str, "OutboundType"]] = "loadBalancer", + load_balancer_sku: Optional[Union[str, "LoadBalancerSku"]] = None, + load_balancer_profile: Optional["ManagedClusterLoadBalancerProfile"] = None, + nat_gateway_profile: Optional["ManagedClusterNATGatewayProfile"] = None, + **kwargs + ): + super(ContainerServiceNetworkProfile, self).__init__(**kwargs) + self.network_plugin = network_plugin + self.network_policy = network_policy + self.network_mode = network_mode + self.pod_cidr = pod_cidr + self.service_cidr = service_cidr + self.dns_service_ip = dns_service_ip + self.docker_bridge_cidr = docker_bridge_cidr + self.outbound_type = outbound_type + self.load_balancer_sku = load_balancer_sku + self.load_balancer_profile = load_balancer_profile + self.nat_gateway_profile = nat_gateway_profile + + +class ContainerServiceSshConfiguration(msrest.serialization.Model): + """SSH configuration for Linux-based VMs running on Azure. + + All required parameters must be populated in order to send to Azure. + + :param public_keys: Required. The list of SSH public keys used to authenticate with Linux-based + VMs. A maximum of 1 key may be specified. + :type public_keys: + list[~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceSshPublicKey] + """ + + _validation = { + 'public_keys': {'required': True}, + } + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[ContainerServiceSshPublicKey]'}, + } + + def __init__( + self, + *, + public_keys: List["ContainerServiceSshPublicKey"], + **kwargs + ): + super(ContainerServiceSshConfiguration, self).__init__(**kwargs) + self.public_keys = public_keys + + +class ContainerServiceSshPublicKey(msrest.serialization.Model): + """Contains information about SSH certificate public key data. + + All required parameters must be populated in order to send to Azure. + + :param key_data: Required. Certificate public key used to authenticate with VMs through SSH. + The certificate must be in PEM format with or without headers. + :type key_data: str + """ + + _validation = { + 'key_data': {'required': True}, + } + + _attribute_map = { + 'key_data': {'key': 'keyData', 'type': 'str'}, + } + + def __init__( + self, + *, + key_data: str, + **kwargs + ): + super(ContainerServiceSshPublicKey, self).__init__(**kwargs) + self.key_data = key_data + + +class ContainerServiceVMDiagnostics(msrest.serialization.Model): + """Profile for diagnostics on the container service VMs. + + 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 enabled: Required. Whether the VM diagnostic agent is provisioned on the VM. + :type enabled: bool + :ivar storage_uri: The URI of the storage account where diagnostics are stored. + :vartype storage_uri: str + """ + + _validation = { + 'enabled': {'required': True}, + 'storage_uri': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'storage_uri': {'key': 'storageUri', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: bool, + **kwargs + ): + super(ContainerServiceVMDiagnostics, self).__init__(**kwargs) + self.enabled = enabled + self.storage_uri = None + + +class CreationData(msrest.serialization.Model): + """Data used when creating a target resource from a source resource. + + :param source_resource_id: This is the ARM ID of the source object to be used to create the + target object. + :type source_resource_id: str + """ + + _attribute_map = { + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + source_resource_id: Optional[str] = None, + **kwargs + ): + super(CreationData, self).__init__(**kwargs) + self.source_resource_id = source_resource_id + + +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~azure.mgmt.containerservice.v2021_09_01.models.CredentialResult] + """ + + _validation = { + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.kubeconfigs = None + + +class EndpointDependency(msrest.serialization.Model): + """A domain name that AKS agent nodes are reaching at. + + :param domain_name: The domain name of the dependency. + :type domain_name: str + :param endpoint_details: The Ports and Protocols used when connecting to domainName. + :type endpoint_details: list[~azure.mgmt.containerservice.v2021_09_01.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[List["EndpointDetail"]] = None, + **kwargs + ): + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(msrest.serialization.Model): + """connect information from the AKS agent nodes to a single endpoint. + + :param ip_address: An IP Address that Domain Name currently resolves to. + :type ip_address: str + :param port: The port an endpoint is connected to. + :type port: int + :param protocol: The protocol used for connection. + :type protocol: str + :param description: Description of the detail. + :type description: str + """ + + _attribute_map = { + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_address: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(EndpointDetail, self).__init__(**kwargs) + self.ip_address = ip_address + self.port = port + self.protocol = protocol + self.description = description + + +class ExtendedLocation(msrest.serialization.Model): + """The complex type of the extended location. + + :param name: The name of the extended location. + :type name: str + :param type: The type of the extended location. Possible values include: "EdgeZone". + :type type: str or ~azure.mgmt.containerservice.v2021_09_01.models.ExtendedLocationTypes + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[Union[str, "ExtendedLocationTypes"]] = None, + **kwargs + ): + super(ExtendedLocation, self).__init__(**kwargs) + self.name = name + self.type = type + + +class KubeletConfig(msrest.serialization.Model): + """See `AKS custom node configuration `_ for more details. + + :param cpu_manager_policy: The default is 'none'. See `Kubernetes CPU management policies + `_ + for more information. Allowed values are 'none' and 'static'. + :type cpu_manager_policy: str + :param cpu_cfs_quota: The default is true. + :type cpu_cfs_quota: bool + :param cpu_cfs_quota_period: The default is '100ms.' Valid values are a sequence of decimal + numbers with an optional fraction and a unit suffix. For example: '300ms', '2h45m'. Supported + units are 'ns', 'us', 'ms', 's', 'm', and 'h'. + :type cpu_cfs_quota_period: str + :param image_gc_high_threshold: To disable image garbage collection, set to 100. The default is + 85%. + :type image_gc_high_threshold: int + :param image_gc_low_threshold: This cannot be set higher than imageGcHighThreshold. The default + is 80%. + :type image_gc_low_threshold: int + :param topology_manager_policy: For more information see `Kubernetes Topology Manager + `_. The default is + 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + :type topology_manager_policy: str + :param allowed_unsafe_sysctls: Allowed list of unsafe sysctls or unsafe sysctl patterns (ending + in ``*``\ ). + :type allowed_unsafe_sysctls: list[str] + :param fail_swap_on: If set to true it will make the Kubelet fail to start if swap is enabled + on the node. + :type fail_swap_on: bool + :param container_log_max_size_mb: The maximum size (e.g. 10Mi) of container log file before it + is rotated. + :type container_log_max_size_mb: int + :param container_log_max_files: The maximum number of container log files that can be present + for a container. The number must be ≥ 2. + :type container_log_max_files: int + :param pod_max_pids: The maximum number of processes per pod. + :type pod_max_pids: int + """ + + _validation = { + 'container_log_max_files': {'minimum': 2}, + } + + _attribute_map = { + 'cpu_manager_policy': {'key': 'cpuManagerPolicy', 'type': 'str'}, + 'cpu_cfs_quota': {'key': 'cpuCfsQuota', 'type': 'bool'}, + 'cpu_cfs_quota_period': {'key': 'cpuCfsQuotaPeriod', 'type': 'str'}, + 'image_gc_high_threshold': {'key': 'imageGcHighThreshold', 'type': 'int'}, + 'image_gc_low_threshold': {'key': 'imageGcLowThreshold', 'type': 'int'}, + 'topology_manager_policy': {'key': 'topologyManagerPolicy', 'type': 'str'}, + 'allowed_unsafe_sysctls': {'key': 'allowedUnsafeSysctls', 'type': '[str]'}, + 'fail_swap_on': {'key': 'failSwapOn', 'type': 'bool'}, + 'container_log_max_size_mb': {'key': 'containerLogMaxSizeMB', 'type': 'int'}, + 'container_log_max_files': {'key': 'containerLogMaxFiles', 'type': 'int'}, + 'pod_max_pids': {'key': 'podMaxPids', 'type': 'int'}, + } + + def __init__( + self, + *, + cpu_manager_policy: Optional[str] = None, + cpu_cfs_quota: Optional[bool] = None, + cpu_cfs_quota_period: Optional[str] = None, + image_gc_high_threshold: Optional[int] = None, + image_gc_low_threshold: Optional[int] = None, + topology_manager_policy: Optional[str] = None, + allowed_unsafe_sysctls: Optional[List[str]] = None, + fail_swap_on: Optional[bool] = None, + container_log_max_size_mb: Optional[int] = None, + container_log_max_files: Optional[int] = None, + pod_max_pids: Optional[int] = None, + **kwargs + ): + super(KubeletConfig, self).__init__(**kwargs) + self.cpu_manager_policy = cpu_manager_policy + self.cpu_cfs_quota = cpu_cfs_quota + self.cpu_cfs_quota_period = cpu_cfs_quota_period + self.image_gc_high_threshold = image_gc_high_threshold + self.image_gc_low_threshold = image_gc_low_threshold + self.topology_manager_policy = topology_manager_policy + self.allowed_unsafe_sysctls = allowed_unsafe_sysctls + self.fail_swap_on = fail_swap_on + self.container_log_max_size_mb = container_log_max_size_mb + self.container_log_max_files = container_log_max_files + self.pod_max_pids = pod_max_pids + + +class LinuxOSConfig(msrest.serialization.Model): + """See `AKS custom node configuration `_ for more details. + + :param sysctls: Sysctl settings for Linux agent nodes. + :type sysctls: ~azure.mgmt.containerservice.v2021_09_01.models.SysctlConfig + :param transparent_huge_page_enabled: Valid values are 'always', 'madvise', and 'never'. The + default is 'always'. For more information see `Transparent Hugepages + `_. + :type transparent_huge_page_enabled: str + :param transparent_huge_page_defrag: Valid values are 'always', 'defer', 'defer+madvise', + 'madvise' and 'never'. The default is 'madvise'. For more information see `Transparent + Hugepages + `_. + :type transparent_huge_page_defrag: str + :param swap_file_size_mb: The size in MB of a swap file that will be created on each node. + :type swap_file_size_mb: int + """ + + _attribute_map = { + 'sysctls': {'key': 'sysctls', 'type': 'SysctlConfig'}, + 'transparent_huge_page_enabled': {'key': 'transparentHugePageEnabled', 'type': 'str'}, + 'transparent_huge_page_defrag': {'key': 'transparentHugePageDefrag', 'type': 'str'}, + 'swap_file_size_mb': {'key': 'swapFileSizeMB', 'type': 'int'}, + } + + def __init__( + self, + *, + sysctls: Optional["SysctlConfig"] = None, + transparent_huge_page_enabled: Optional[str] = None, + transparent_huge_page_defrag: Optional[str] = None, + swap_file_size_mb: Optional[int] = None, + **kwargs + ): + super(LinuxOSConfig, self).__init__(**kwargs) + self.sysctls = sysctls + self.transparent_huge_page_enabled = transparent_huge_page_enabled + self.transparent_huge_page_defrag = transparent_huge_page_defrag + self.swap_file_size_mb = swap_file_size_mb + + +class MaintenanceConfiguration(SubResource): + """See `planned maintenance `_ for more information about planned maintenance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar system_data: The system metadata relating to this resource. + :vartype system_data: ~azure.mgmt.containerservice.v2021_09_01.models.SystemData + :param time_in_week: If two array entries specify the same day of the week, the applied + configuration is the union of times in both entries. + :type time_in_week: list[~azure.mgmt.containerservice.v2021_09_01.models.TimeInWeek] + :param not_allowed_time: Time slots on which upgrade is not allowed. + :type not_allowed_time: list[~azure.mgmt.containerservice.v2021_09_01.models.TimeSpan] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'time_in_week': {'key': 'properties.timeInWeek', 'type': '[TimeInWeek]'}, + 'not_allowed_time': {'key': 'properties.notAllowedTime', 'type': '[TimeSpan]'}, + } + + def __init__( + self, + *, + time_in_week: Optional[List["TimeInWeek"]] = None, + not_allowed_time: Optional[List["TimeSpan"]] = None, + **kwargs + ): + super(MaintenanceConfiguration, self).__init__(**kwargs) + self.system_data = None + self.time_in_week = time_in_week + self.not_allowed_time = not_allowed_time + + +class MaintenanceConfigurationListResult(msrest.serialization.Model): + """The response from the List maintenance configurations operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of maintenance configurations. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration] + :ivar next_link: The URL to get the next set of maintenance configuration results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MaintenanceConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MaintenanceConfiguration"]] = None, + **kwargs + ): + super(MaintenanceConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Resource(msrest.serialization.Model): + """The Resource model definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ManagedCluster(Resource): + """Managed cluster. + + 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. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The managed cluster SKU. + :type sku: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSKU + :param extended_location: The extended location of the Virtual Machine. + :type extended_location: ~azure.mgmt.containerservice.v2021_09_01.models.ExtendedLocation + :param identity: The identity of the managed cluster, if configured. + :type identity: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterIdentity + :ivar provisioning_state: The current provisioning state. + :vartype provisioning_state: str + :ivar power_state: The Power State of the cluster. + :vartype power_state: ~azure.mgmt.containerservice.v2021_09_01.models.PowerState + :ivar max_agent_pools: The max number of agent pools for the managed cluster. + :vartype max_agent_pools: int + :param kubernetes_version: When you upgrade a supported AKS cluster, Kubernetes minor versions + cannot be skipped. All upgrades must be performed sequentially by major version number. For + example, upgrades between 1.14.x -> 1.15.x or 1.15.x -> 1.16.x are allowed, however 1.14.x -> + 1.16.x is not allowed. See `upgrading an AKS cluster + `_ for more details. + :type kubernetes_version: str + :param dns_prefix: This cannot be updated once the Managed Cluster has been created. + :type dns_prefix: str + :param fqdn_subdomain: This cannot be updated once the Managed Cluster has been created. + :type fqdn_subdomain: str + :ivar fqdn: The FQDN of the master pool. + :vartype fqdn: str + :ivar private_fqdn: The FQDN of private cluster. + :vartype private_fqdn: str + :ivar azure_portal_fqdn: The Azure Portal requires certain Cross-Origin Resource Sharing (CORS) + headers to be sent in some responses, which Kubernetes APIServer doesn't handle by default. + This special FQDN supports CORS, allowing the Azure Portal to function properly. + :vartype azure_portal_fqdn: str + :param agent_pool_profiles: The agent pool properties. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAgentPoolProfile] + :param linux_profile: The profile for Linux VMs in the Managed Cluster. + :type linux_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceLinuxProfile + :param windows_profile: The profile for Windows VMs in the Managed Cluster. + :type windows_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterWindowsProfile + :param service_principal_profile: Information about a service principal identity for the + cluster to use for manipulating Azure APIs. + :type service_principal_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterServicePrincipalProfile + :param addon_profiles: The profile of managed cluster add-on. + :type addon_profiles: dict[str, + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAddonProfile] + :param pod_identity_profile: See `use AAD pod identity + `_ for more details on AAD pod + identity integration. + :type pod_identity_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProfile + :param node_resource_group: The name of the resource group containing agent pool nodes. + :type node_resource_group: str + :param enable_rbac: Whether to enable Kubernetes Role-Based Access Control. + :type enable_rbac: bool + :param enable_pod_security_policy: (DEPRECATING) Whether to enable Kubernetes pod security + policy (preview). This feature is set for removal on October 15th, 2020. Learn more at + aka.ms/aks/azpodpolicy. + :type enable_pod_security_policy: bool + :param network_profile: The network configuration profile. + :type network_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ContainerServiceNetworkProfile + :param aad_profile: The Azure Active Directory configuration. + :type aad_profile: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAADProfile + :param auto_upgrade_profile: The auto upgrade configuration. + :type auto_upgrade_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAutoUpgradeProfile + :param auto_scaler_profile: Parameters to be applied to the cluster-autoscaler when enabled. + :type auto_scaler_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPropertiesAutoScalerProfile + :param api_server_access_profile: The access profile for managed cluster API server. + :type api_server_access_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAPIServerAccessProfile + :param disk_encryption_set_id: This is of the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}'. + :type disk_encryption_set_id: str + :param identity_profile: Identities associated with the cluster. + :type identity_profile: dict[str, + ~azure.mgmt.containerservice.v2021_09_01.models.UserAssignedIdentity] + :param private_link_resources: Private link resources associated with the cluster. + :type private_link_resources: + list[~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource] + :param disable_local_accounts: If set to true, getting static credentials will be disabled for + this cluster. This must only be used on Managed Clusters that are AAD enabled. For more details + see `disable local accounts + `_. + :type disable_local_accounts: bool + :param http_proxy_config: Configurations for provisioning the cluster with HTTP proxy servers. + :type http_proxy_config: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterHTTPProxyConfig + :param security_profile: Security profile for the managed cluster. + :type security_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSecurityProfile + :param public_network_access: Default value is 'Enabled' (case insensitive). Could be set to + 'Disabled' to enable private cluster. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~azure.mgmt.containerservice.v2021_09_01.models.PublicNetworkAccess + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'power_state': {'readonly': True}, + 'max_agent_pools': {'readonly': True}, + 'fqdn': {'readonly': True}, + 'private_fqdn': {'readonly': True}, + 'azure_portal_fqdn': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ManagedClusterSKU'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterIdentity'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'power_state': {'key': 'properties.powerState', 'type': 'PowerState'}, + 'max_agent_pools': {'key': 'properties.maxAgentPools', 'type': 'int'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'dns_prefix': {'key': 'properties.dnsPrefix', 'type': 'str'}, + 'fqdn_subdomain': {'key': 'properties.fqdnSubdomain', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'private_fqdn': {'key': 'properties.privateFQDN', 'type': 'str'}, + 'azure_portal_fqdn': {'key': 'properties.azurePortalFQDN', 'type': 'str'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterAgentPoolProfile]'}, + 'linux_profile': {'key': 'properties.linuxProfile', 'type': 'ContainerServiceLinuxProfile'}, + 'windows_profile': {'key': 'properties.windowsProfile', 'type': 'ManagedClusterWindowsProfile'}, + 'service_principal_profile': {'key': 'properties.servicePrincipalProfile', 'type': 'ManagedClusterServicePrincipalProfile'}, + 'addon_profiles': {'key': 'properties.addonProfiles', 'type': '{ManagedClusterAddonProfile}'}, + 'pod_identity_profile': {'key': 'properties.podIdentityProfile', 'type': 'ManagedClusterPodIdentityProfile'}, + 'node_resource_group': {'key': 'properties.nodeResourceGroup', 'type': 'str'}, + 'enable_rbac': {'key': 'properties.enableRBAC', 'type': 'bool'}, + 'enable_pod_security_policy': {'key': 'properties.enablePodSecurityPolicy', 'type': 'bool'}, + 'network_profile': {'key': 'properties.networkProfile', 'type': 'ContainerServiceNetworkProfile'}, + 'aad_profile': {'key': 'properties.aadProfile', 'type': 'ManagedClusterAADProfile'}, + 'auto_upgrade_profile': {'key': 'properties.autoUpgradeProfile', 'type': 'ManagedClusterAutoUpgradeProfile'}, + 'auto_scaler_profile': {'key': 'properties.autoScalerProfile', 'type': 'ManagedClusterPropertiesAutoScalerProfile'}, + 'api_server_access_profile': {'key': 'properties.apiServerAccessProfile', 'type': 'ManagedClusterAPIServerAccessProfile'}, + 'disk_encryption_set_id': {'key': 'properties.diskEncryptionSetID', 'type': 'str'}, + 'identity_profile': {'key': 'properties.identityProfile', 'type': '{UserAssignedIdentity}'}, + 'private_link_resources': {'key': 'properties.privateLinkResources', 'type': '[PrivateLinkResource]'}, + 'disable_local_accounts': {'key': 'properties.disableLocalAccounts', 'type': 'bool'}, + 'http_proxy_config': {'key': 'properties.httpProxyConfig', 'type': 'ManagedClusterHTTPProxyConfig'}, + 'security_profile': {'key': 'properties.securityProfile', 'type': 'ManagedClusterSecurityProfile'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + sku: Optional["ManagedClusterSKU"] = None, + extended_location: Optional["ExtendedLocation"] = None, + identity: Optional["ManagedClusterIdentity"] = None, + kubernetes_version: Optional[str] = None, + dns_prefix: Optional[str] = None, + fqdn_subdomain: Optional[str] = None, + agent_pool_profiles: Optional[List["ManagedClusterAgentPoolProfile"]] = None, + linux_profile: Optional["ContainerServiceLinuxProfile"] = None, + windows_profile: Optional["ManagedClusterWindowsProfile"] = None, + service_principal_profile: Optional["ManagedClusterServicePrincipalProfile"] = None, + addon_profiles: Optional[Dict[str, "ManagedClusterAddonProfile"]] = None, + pod_identity_profile: Optional["ManagedClusterPodIdentityProfile"] = None, + node_resource_group: Optional[str] = None, + enable_rbac: Optional[bool] = None, + enable_pod_security_policy: Optional[bool] = None, + network_profile: Optional["ContainerServiceNetworkProfile"] = None, + aad_profile: Optional["ManagedClusterAADProfile"] = None, + auto_upgrade_profile: Optional["ManagedClusterAutoUpgradeProfile"] = None, + auto_scaler_profile: Optional["ManagedClusterPropertiesAutoScalerProfile"] = None, + api_server_access_profile: Optional["ManagedClusterAPIServerAccessProfile"] = None, + disk_encryption_set_id: Optional[str] = None, + identity_profile: Optional[Dict[str, "UserAssignedIdentity"]] = None, + private_link_resources: Optional[List["PrivateLinkResource"]] = None, + disable_local_accounts: Optional[bool] = None, + http_proxy_config: Optional["ManagedClusterHTTPProxyConfig"] = None, + security_profile: Optional["ManagedClusterSecurityProfile"] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + **kwargs + ): + super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.extended_location = extended_location + self.identity = identity + self.provisioning_state = None + self.power_state = None + self.max_agent_pools = None + self.kubernetes_version = kubernetes_version + self.dns_prefix = dns_prefix + self.fqdn_subdomain = fqdn_subdomain + self.fqdn = None + self.private_fqdn = None + self.azure_portal_fqdn = None + self.agent_pool_profiles = agent_pool_profiles + self.linux_profile = linux_profile + self.windows_profile = windows_profile + self.service_principal_profile = service_principal_profile + self.addon_profiles = addon_profiles + self.pod_identity_profile = pod_identity_profile + self.node_resource_group = node_resource_group + self.enable_rbac = enable_rbac + self.enable_pod_security_policy = enable_pod_security_policy + self.network_profile = network_profile + self.aad_profile = aad_profile + self.auto_upgrade_profile = auto_upgrade_profile + self.auto_scaler_profile = auto_scaler_profile + self.api_server_access_profile = api_server_access_profile + self.disk_encryption_set_id = disk_encryption_set_id + self.identity_profile = identity_profile + self.private_link_resources = private_link_resources + self.disable_local_accounts = disable_local_accounts + self.http_proxy_config = http_proxy_config + self.security_profile = security_profile + self.public_network_access = public_network_access + + +class ManagedClusterAADProfile(msrest.serialization.Model): + """For more details see `managed AAD on AKS `_. + + :param managed: Whether to enable managed AAD. + :type managed: bool + :param enable_azure_rbac: Whether to enable Azure RBAC for Kubernetes authorization. + :type enable_azure_rbac: bool + :param admin_group_object_i_ds: The list of AAD group object IDs that will have admin role of + the cluster. + :type admin_group_object_i_ds: list[str] + :param client_app_id: The client AAD application ID. + :type client_app_id: str + :param server_app_id: The server AAD application ID. + :type server_app_id: str + :param server_app_secret: The server AAD application secret. + :type server_app_secret: str + :param tenant_id: The AAD tenant ID to use for authentication. If not specified, will use the + tenant of the deployment subscription. + :type tenant_id: str + """ + + _attribute_map = { + 'managed': {'key': 'managed', 'type': 'bool'}, + 'enable_azure_rbac': {'key': 'enableAzureRBAC', 'type': 'bool'}, + 'admin_group_object_i_ds': {'key': 'adminGroupObjectIDs', 'type': '[str]'}, + 'client_app_id': {'key': 'clientAppID', 'type': 'str'}, + 'server_app_id': {'key': 'serverAppID', 'type': 'str'}, + 'server_app_secret': {'key': 'serverAppSecret', 'type': 'str'}, + 'tenant_id': {'key': 'tenantID', 'type': 'str'}, + } + + def __init__( + self, + *, + managed: Optional[bool] = None, + enable_azure_rbac: Optional[bool] = None, + admin_group_object_i_ds: Optional[List[str]] = None, + client_app_id: Optional[str] = None, + server_app_id: Optional[str] = None, + server_app_secret: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): + super(ManagedClusterAADProfile, self).__init__(**kwargs) + self.managed = managed + self.enable_azure_rbac = enable_azure_rbac + self.admin_group_object_i_ds = admin_group_object_i_ds + self.client_app_id = client_app_id + self.server_app_id = server_app_id + self.server_app_secret = server_app_secret + self.tenant_id = tenant_id + + +class ManagedClusterAccessProfile(Resource): + """Managed cluster Access Profile. + + 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. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kube_config: Base64-encoded Kubernetes configuration file. + :type kube_config: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kube_config': {'key': 'properties.kubeConfig', 'type': 'bytearray'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kube_config: Optional[bytearray] = None, + **kwargs + ): + super(ManagedClusterAccessProfile, self).__init__(location=location, tags=tags, **kwargs) + self.kube_config = kube_config + + +class ManagedClusterAddonProfile(msrest.serialization.Model): + """A Kubernetes add-on profile for a managed cluster. + + 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 enabled: Required. Whether the add-on is enabled or not. + :type enabled: bool + :param config: Key-value pairs for configuring an add-on. + :type config: dict[str, str] + :ivar identity: Information of user assigned identity used by this add-on. + :vartype identity: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAddonProfileIdentity + """ + + _validation = { + 'enabled': {'required': True}, + 'identity': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'config': {'key': 'config', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedClusterAddonProfileIdentity'}, + } + + def __init__( + self, + *, + enabled: bool, + config: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ManagedClusterAddonProfile, self).__init__(**kwargs) + self.enabled = enabled + self.config = config + self.identity = None + + +class UserAssignedIdentity(msrest.serialization.Model): + """Details about a user assigned identity. + + :param resource_id: The resource ID of the user assigned identity. + :type resource_id: str + :param client_id: The client ID of the user assigned identity. + :type client_id: str + :param object_id: The object ID of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.resource_id = resource_id + self.client_id = client_id + self.object_id = object_id + + +class ManagedClusterAddonProfileIdentity(UserAssignedIdentity): + """Information of user assigned identity used by this add-on. + + :param resource_id: The resource ID of the user assigned identity. + :type resource_id: str + :param client_id: The client ID of the user assigned identity. + :type client_id: str + :param object_id: The object ID of the user assigned identity. + :type object_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + client_id: Optional[str] = None, + object_id: Optional[str] = None, + **kwargs + ): + super(ManagedClusterAddonProfileIdentity, self).__init__(resource_id=resource_id, client_id=client_id, object_id=object_id, **kwargs) + + +class ManagedClusterAgentPoolProfileProperties(msrest.serialization.Model): + """Properties for the container service agent pool profile. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :type vm_size: str + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Possible values + include: "Managed", "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSDiskType + :param kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.KubeletDiskType + :param workload_runtime: Determines the type of workload a node can run. Possible values + include: "OCIContainer", "WasmWasi". + :type workload_runtime: str or ~azure.mgmt.containerservice.v2021_09_01.models.WorkloadRuntime + :param vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type vnet_subnet_id: str + :param pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type pod_subnet_id: str + :param max_pods: The maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: The operating system type. The default is Linux. Possible values include: + "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param os_sku: Specifies an OS SKU. This value must not be specified if OSType is Windows. + Possible values include: "Ubuntu", "CBLMariner". + :type os_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSSKU + :param max_count: The maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: The minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Possible values include: "Delete", "Deallocate". + :type scale_down_mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.ScaleDownMode + :param type: The type of Agent Pool. Possible values include: "VirtualMachineScaleSets", + "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolType + :param mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolMode + :param orchestrator_version: As a best practice, you should upgrade all node pools in an AKS + cluster to the same Kubernetes version. The node pool version must have the same major version + as the control plane. The node pool minor version must be within two minor versions of the + control plane version. The node pool version cannot be greater than the control plane version. + For more information see `upgrading a node pool + `_. + :type orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :param power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :type power_state: ~azure.mgmt.containerservice.v2021_09_01.models.PowerState + :param availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :type availability_zones: list[str] + :param enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :type enable_node_public_ip: bool + :param node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :type node_public_ip_prefix_id: str + :param scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Possible values include: "Spot", "Regular". Default value: "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetPriority + :param scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetEvictionPolicy + :param spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :type spot_max_price: float + :param tags: A set of tags. The tags to be persisted on the agent pool virtual machine scale + set. + :type tags: dict[str, str] + :param node_labels: The node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: The Kubelet configuration on the agent pool nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_09_01.models.KubeletConfig + :param linux_os_config: The OS configuration of Linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_09_01.models.LinuxOSConfig + :param enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :type enable_encryption_at_host: bool + :param enable_ultra_ssd: Whether to enable UltraSSD. + :type enable_ultra_ssd: bool + :param enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :type enable_fips: bool + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Possible values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". + :type gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2021_09_01.models.GPUInstanceProfile + :param creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :type creation_data: ~azure.mgmt.containerservice.v2021_09_01.models.CreationData + """ + + _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, + 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, + 'workload_runtime': {'key': 'workloadRuntime', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'os_sku': {'key': 'osSKU', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'scale_down_mode': {'key': 'scaleDownMode', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, + 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, + 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, + 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, + 'enable_ultra_ssd': {'key': 'enableUltraSSD', 'type': 'bool'}, + 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, + 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, + 'creation_data': {'key': 'creationData', 'type': 'CreationData'}, + } + + def __init__( + self, + *, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + workload_runtime: Optional[Union[str, "WorkloadRuntime"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + os_sku: Optional[Union[str, "OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + scale_down_mode: Optional[Union[str, "ScaleDownMode"]] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + power_state: Optional["PowerState"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "GPUInstanceProfile"]] = None, + creation_data: Optional["CreationData"] = None, + **kwargs + ): + super(ManagedClusterAgentPoolProfileProperties, self).__init__(**kwargs) + self.count = count + self.vm_size = vm_size + self.os_disk_size_gb = os_disk_size_gb + self.os_disk_type = os_disk_type + self.kubelet_disk_type = kubelet_disk_type + self.workload_runtime = workload_runtime + self.vnet_subnet_id = vnet_subnet_id + self.pod_subnet_id = pod_subnet_id + self.max_pods = max_pods + self.os_type = os_type + self.os_sku = os_sku + self.max_count = max_count + self.min_count = min_count + self.enable_auto_scaling = enable_auto_scaling + self.scale_down_mode = scale_down_mode + self.type = type + self.mode = mode + self.orchestrator_version = orchestrator_version + self.node_image_version = None + self.upgrade_settings = upgrade_settings + self.provisioning_state = None + self.power_state = power_state + self.availability_zones = availability_zones + self.enable_node_public_ip = enable_node_public_ip + self.node_public_ip_prefix_id = node_public_ip_prefix_id + self.scale_set_priority = scale_set_priority + self.scale_set_eviction_policy = scale_set_eviction_policy + self.spot_max_price = spot_max_price + self.tags = tags + self.node_labels = node_labels + self.node_taints = node_taints + self.proximity_placement_group_id = proximity_placement_group_id + self.kubelet_config = kubelet_config + self.linux_os_config = linux_os_config + self.enable_encryption_at_host = enable_encryption_at_host + self.enable_ultra_ssd = enable_ultra_ssd + self.enable_fips = enable_fips + self.gpu_instance_profile = gpu_instance_profile + self.creation_data = creation_data + + +class ManagedClusterAgentPoolProfile(ManagedClusterAgentPoolProfileProperties): + """Profile for the container service agent pool. + + 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 count: Number of agents (VMs) to host docker containers. Allowed values must be in the + range of 0 to 1000 (inclusive) for user pools and in the range of 1 to 1000 (inclusive) for + system pools. The default value is 1. + :type count: int + :param vm_size: VM size availability varies by region. If a node contains insufficient compute + resources (memory, cpu, etc) pods might fail to run correctly. For more details on restricted + VM sizes, see: https://docs.microsoft.com/azure/aks/quotas-skus-regions. + :type vm_size: str + :param os_disk_size_gb: OS Disk Size in GB to be used to specify the disk size for every + machine in the master/agent pool. If you specify 0, it will apply the default osDisk size + according to the vmSize specified. + :type os_disk_size_gb: int + :param os_disk_type: The default is 'Ephemeral' if the VM supports it and has a cache disk + larger than the requested OSDiskSizeGB. Otherwise, defaults to 'Managed'. May not be changed + after creation. For more information see `Ephemeral OS + `_. Possible values + include: "Managed", "Ephemeral". + :type os_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSDiskType + :param kubelet_disk_type: Determines the placement of emptyDir volumes, container runtime data + root, and Kubelet ephemeral storage. Possible values include: "OS", "Temporary". + :type kubelet_disk_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.KubeletDiskType + :param workload_runtime: Determines the type of workload a node can run. Possible values + include: "OCIContainer", "WasmWasi". + :type workload_runtime: str or ~azure.mgmt.containerservice.v2021_09_01.models.WorkloadRuntime + :param vnet_subnet_id: If this is not specified, a VNET and subnet will be generated and used. + If no podSubnetID is specified, this applies to nodes and pods, otherwise it applies to just + nodes. This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type vnet_subnet_id: str + :param pod_subnet_id: If omitted, pod IPs are statically assigned on the node subnet (see + vnetSubnetID for more details). This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}. + :type pod_subnet_id: str + :param max_pods: The maximum number of pods that can run on a node. + :type max_pods: int + :param os_type: The operating system type. The default is Linux. Possible values include: + "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param os_sku: Specifies an OS SKU. This value must not be specified if OSType is Windows. + Possible values include: "Ubuntu", "CBLMariner". + :type os_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSSKU + :param max_count: The maximum number of nodes for auto-scaling. + :type max_count: int + :param min_count: The minimum number of nodes for auto-scaling. + :type min_count: int + :param enable_auto_scaling: Whether to enable auto-scaler. + :type enable_auto_scaling: bool + :param scale_down_mode: This also effects the cluster autoscaler behavior. If not specified, it + defaults to Delete. Possible values include: "Delete", "Deallocate". + :type scale_down_mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.ScaleDownMode + :param type: The type of Agent Pool. Possible values include: "VirtualMachineScaleSets", + "AvailabilitySet". + :type type: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolType + :param mode: A cluster must have at least one 'System' Agent Pool at all times. For additional + information on agent pool restrictions and best practices, see: + https://docs.microsoft.com/azure/aks/use-system-pools. Possible values include: "System", + "User". + :type mode: str or ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolMode + :param orchestrator_version: As a best practice, you should upgrade all node pools in an AKS + cluster to the same Kubernetes version. The node pool version must have the same major version + as the control plane. The node pool minor version must be within two minor versions of the + control plane version. The node pool version cannot be greater than the control plane version. + For more information see `upgrading a node pool + `_. + :type orchestrator_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :param upgrade_settings: Settings for upgrading the agentpool. + :type upgrade_settings: + ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeSettings + :ivar provisioning_state: The current deployment or provisioning state. + :vartype provisioning_state: str + :param power_state: When an Agent Pool is first created it is initially Running. The Agent Pool + can be stopped by setting this field to Stopped. A stopped Agent Pool stops all of its VMs and + does not accrue billing charges. An Agent Pool can only be stopped if it is Running and + provisioning state is Succeeded. + :type power_state: ~azure.mgmt.containerservice.v2021_09_01.models.PowerState + :param availability_zones: The list of Availability zones to use for nodes. This can only be + specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + :type availability_zones: list[str] + :param enable_node_public_ip: Some scenarios may require nodes in a node pool to receive their + own dedicated public IP addresses. A common scenario is for gaming workloads, where a console + needs to make a direct connection to a cloud virtual machine to minimize hops. For more + information see `assigning a public IP per node + `_. + The default is false. + :type enable_node_public_ip: bool + :param node_public_ip_prefix_id: This is of the form: + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}. + :type node_public_ip_prefix_id: str + :param scale_set_priority: The Virtual Machine Scale Set priority. If not specified, the + default is 'Regular'. Possible values include: "Spot", "Regular". Default value: "Regular". + :type scale_set_priority: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetPriority + :param scale_set_eviction_policy: This cannot be specified unless the scaleSetPriority is + 'Spot'. If not specified, the default is 'Delete'. Possible values include: "Delete", + "Deallocate". Default value: "Delete". + :type scale_set_eviction_policy: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ScaleSetEvictionPolicy + :param spot_max_price: Possible values are any decimal value greater than zero or -1 which + indicates the willingness to pay any on-demand price. For more details on spot pricing, see + `spot VMs pricing `_. + :type spot_max_price: float + :param tags: A set of tags. The tags to be persisted on the agent pool virtual machine scale + set. + :type tags: dict[str, str] + :param node_labels: The node labels to be persisted across all nodes in agent pool. + :type node_labels: dict[str, str] + :param node_taints: The taints added to new nodes during node pool create and scale. For + example, key=value:NoSchedule. + :type node_taints: list[str] + :param proximity_placement_group_id: The ID for Proximity Placement Group. + :type proximity_placement_group_id: str + :param kubelet_config: The Kubelet configuration on the agent pool nodes. + :type kubelet_config: ~azure.mgmt.containerservice.v2021_09_01.models.KubeletConfig + :param linux_os_config: The OS configuration of Linux agent nodes. + :type linux_os_config: ~azure.mgmt.containerservice.v2021_09_01.models.LinuxOSConfig + :param enable_encryption_at_host: This is only supported on certain VM sizes and in certain + Azure regions. For more information, see: + https://docs.microsoft.com/azure/aks/enable-host-encryption. + :type enable_encryption_at_host: bool + :param enable_ultra_ssd: Whether to enable UltraSSD. + :type enable_ultra_ssd: bool + :param enable_fips: See `Add a FIPS-enabled node pool + `_ + for more details. + :type enable_fips: bool + :param gpu_instance_profile: GPUInstanceProfile to be used to specify GPU MIG instance profile + for supported GPU VM SKU. Possible values include: "MIG1g", "MIG2g", "MIG3g", "MIG4g", "MIG7g". + :type gpu_instance_profile: str or + ~azure.mgmt.containerservice.v2021_09_01.models.GPUInstanceProfile + :param creation_data: CreationData to be used to specify the source Snapshot ID if the node + pool will be created/upgraded using a snapshot. + :type creation_data: ~azure.mgmt.containerservice.v2021_09_01.models.CreationData + :param name: Required. Windows agent pool names must be 6 characters or less. + :type name: str + """ + + _validation = { + 'os_disk_size_gb': {'maximum': 2048, 'minimum': 0}, + 'node_image_version': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'name': {'required': True, 'pattern': r'^[a-z][a-z0-9]{0,11}$'}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + 'os_disk_size_gb': {'key': 'osDiskSizeGB', 'type': 'int'}, + 'os_disk_type': {'key': 'osDiskType', 'type': 'str'}, + 'kubelet_disk_type': {'key': 'kubeletDiskType', 'type': 'str'}, + 'workload_runtime': {'key': 'workloadRuntime', 'type': 'str'}, + 'vnet_subnet_id': {'key': 'vnetSubnetID', 'type': 'str'}, + 'pod_subnet_id': {'key': 'podSubnetID', 'type': 'str'}, + 'max_pods': {'key': 'maxPods', 'type': 'int'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'os_sku': {'key': 'osSKU', 'type': 'str'}, + 'max_count': {'key': 'maxCount', 'type': 'int'}, + 'min_count': {'key': 'minCount', 'type': 'int'}, + 'enable_auto_scaling': {'key': 'enableAutoScaling', 'type': 'bool'}, + 'scale_down_mode': {'key': 'scaleDownMode', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'orchestrator_version': {'key': 'orchestratorVersion', 'type': 'str'}, + 'node_image_version': {'key': 'nodeImageVersion', 'type': 'str'}, + 'upgrade_settings': {'key': 'upgradeSettings', 'type': 'AgentPoolUpgradeSettings'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'power_state': {'key': 'powerState', 'type': 'PowerState'}, + 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, + 'enable_node_public_ip': {'key': 'enableNodePublicIP', 'type': 'bool'}, + 'node_public_ip_prefix_id': {'key': 'nodePublicIPPrefixID', 'type': 'str'}, + 'scale_set_priority': {'key': 'scaleSetPriority', 'type': 'str'}, + 'scale_set_eviction_policy': {'key': 'scaleSetEvictionPolicy', 'type': 'str'}, + 'spot_max_price': {'key': 'spotMaxPrice', 'type': 'float'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'node_labels': {'key': 'nodeLabels', 'type': '{str}'}, + 'node_taints': {'key': 'nodeTaints', 'type': '[str]'}, + 'proximity_placement_group_id': {'key': 'proximityPlacementGroupID', 'type': 'str'}, + 'kubelet_config': {'key': 'kubeletConfig', 'type': 'KubeletConfig'}, + 'linux_os_config': {'key': 'linuxOSConfig', 'type': 'LinuxOSConfig'}, + 'enable_encryption_at_host': {'key': 'enableEncryptionAtHost', 'type': 'bool'}, + 'enable_ultra_ssd': {'key': 'enableUltraSSD', 'type': 'bool'}, + 'enable_fips': {'key': 'enableFIPS', 'type': 'bool'}, + 'gpu_instance_profile': {'key': 'gpuInstanceProfile', 'type': 'str'}, + 'creation_data': {'key': 'creationData', 'type': 'CreationData'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + count: Optional[int] = None, + vm_size: Optional[str] = None, + os_disk_size_gb: Optional[int] = None, + os_disk_type: Optional[Union[str, "OSDiskType"]] = None, + kubelet_disk_type: Optional[Union[str, "KubeletDiskType"]] = None, + workload_runtime: Optional[Union[str, "WorkloadRuntime"]] = None, + vnet_subnet_id: Optional[str] = None, + pod_subnet_id: Optional[str] = None, + max_pods: Optional[int] = None, + os_type: Optional[Union[str, "OSType"]] = "Linux", + os_sku: Optional[Union[str, "OSSKU"]] = None, + max_count: Optional[int] = None, + min_count: Optional[int] = None, + enable_auto_scaling: Optional[bool] = None, + scale_down_mode: Optional[Union[str, "ScaleDownMode"]] = None, + type: Optional[Union[str, "AgentPoolType"]] = None, + mode: Optional[Union[str, "AgentPoolMode"]] = None, + orchestrator_version: Optional[str] = None, + upgrade_settings: Optional["AgentPoolUpgradeSettings"] = None, + power_state: Optional["PowerState"] = None, + availability_zones: Optional[List[str]] = None, + enable_node_public_ip: Optional[bool] = None, + node_public_ip_prefix_id: Optional[str] = None, + scale_set_priority: Optional[Union[str, "ScaleSetPriority"]] = "Regular", + scale_set_eviction_policy: Optional[Union[str, "ScaleSetEvictionPolicy"]] = "Delete", + spot_max_price: Optional[float] = -1, + tags: Optional[Dict[str, str]] = None, + node_labels: Optional[Dict[str, str]] = None, + node_taints: Optional[List[str]] = None, + proximity_placement_group_id: Optional[str] = None, + kubelet_config: Optional["KubeletConfig"] = None, + linux_os_config: Optional["LinuxOSConfig"] = None, + enable_encryption_at_host: Optional[bool] = None, + enable_ultra_ssd: Optional[bool] = None, + enable_fips: Optional[bool] = None, + gpu_instance_profile: Optional[Union[str, "GPUInstanceProfile"]] = None, + creation_data: Optional["CreationData"] = None, + **kwargs + ): + super(ManagedClusterAgentPoolProfile, self).__init__(count=count, vm_size=vm_size, os_disk_size_gb=os_disk_size_gb, os_disk_type=os_disk_type, kubelet_disk_type=kubelet_disk_type, workload_runtime=workload_runtime, vnet_subnet_id=vnet_subnet_id, pod_subnet_id=pod_subnet_id, max_pods=max_pods, os_type=os_type, os_sku=os_sku, max_count=max_count, min_count=min_count, enable_auto_scaling=enable_auto_scaling, scale_down_mode=scale_down_mode, type=type, mode=mode, orchestrator_version=orchestrator_version, upgrade_settings=upgrade_settings, power_state=power_state, availability_zones=availability_zones, enable_node_public_ip=enable_node_public_ip, node_public_ip_prefix_id=node_public_ip_prefix_id, scale_set_priority=scale_set_priority, scale_set_eviction_policy=scale_set_eviction_policy, spot_max_price=spot_max_price, tags=tags, node_labels=node_labels, node_taints=node_taints, proximity_placement_group_id=proximity_placement_group_id, kubelet_config=kubelet_config, linux_os_config=linux_os_config, enable_encryption_at_host=enable_encryption_at_host, enable_ultra_ssd=enable_ultra_ssd, enable_fips=enable_fips, gpu_instance_profile=gpu_instance_profile, creation_data=creation_data, **kwargs) + self.name = name + + +class ManagedClusterAPIServerAccessProfile(msrest.serialization.Model): + """Access profile for managed cluster API server. + + :param authorized_ip_ranges: IP ranges are specified in CIDR format, e.g. 137.117.106.88/29. + This feature is not compatible with clusters that use Public IP Per Node, or clusters that are + using a Basic Load Balancer. For more information see `API server authorized IP ranges + `_. + :type authorized_ip_ranges: list[str] + :param enable_private_cluster: For more details, see `Creating a private AKS cluster + `_. + :type enable_private_cluster: bool + :param private_dns_zone: The default is System. For more details see `configure private DNS + zone `_. + Allowed values are 'system' and 'none'. + :type private_dns_zone: str + :param enable_private_cluster_public_fqdn: Whether to create additional public FQDN for private + cluster or not. + :type enable_private_cluster_public_fqdn: bool + :param disable_run_command: Whether to disable run command for the cluster or not. + :type disable_run_command: bool + """ + + _attribute_map = { + 'authorized_ip_ranges': {'key': 'authorizedIPRanges', 'type': '[str]'}, + 'enable_private_cluster': {'key': 'enablePrivateCluster', 'type': 'bool'}, + 'private_dns_zone': {'key': 'privateDNSZone', 'type': 'str'}, + 'enable_private_cluster_public_fqdn': {'key': 'enablePrivateClusterPublicFQDN', 'type': 'bool'}, + 'disable_run_command': {'key': 'disableRunCommand', 'type': 'bool'}, + } + + def __init__( + self, + *, + authorized_ip_ranges: Optional[List[str]] = None, + enable_private_cluster: Optional[bool] = None, + private_dns_zone: Optional[str] = None, + enable_private_cluster_public_fqdn: Optional[bool] = None, + disable_run_command: Optional[bool] = None, + **kwargs + ): + super(ManagedClusterAPIServerAccessProfile, self).__init__(**kwargs) + self.authorized_ip_ranges = authorized_ip_ranges + self.enable_private_cluster = enable_private_cluster + self.private_dns_zone = private_dns_zone + self.enable_private_cluster_public_fqdn = enable_private_cluster_public_fqdn + self.disable_run_command = disable_run_command + + +class ManagedClusterAutoUpgradeProfile(msrest.serialization.Model): + """Auto upgrade profile for a managed cluster. + + :param upgrade_channel: For more information see `setting the AKS cluster auto-upgrade channel + `_. Possible + values include: "rapid", "stable", "patch", "node-image", "none". + :type upgrade_channel: str or ~azure.mgmt.containerservice.v2021_09_01.models.UpgradeChannel + """ + + _attribute_map = { + 'upgrade_channel': {'key': 'upgradeChannel', 'type': 'str'}, + } + + def __init__( + self, + *, + upgrade_channel: Optional[Union[str, "UpgradeChannel"]] = None, + **kwargs + ): + super(ManagedClusterAutoUpgradeProfile, self).__init__(**kwargs) + self.upgrade_channel = upgrade_channel + + +class ManagedClusterHTTPProxyConfig(msrest.serialization.Model): + """Cluster HTTP proxy configuration. + + :param http_proxy: The HTTP proxy server endpoint to use. + :type http_proxy: str + :param https_proxy: The HTTPS proxy server endpoint to use. + :type https_proxy: str + :param no_proxy: The endpoints that should not go through proxy. + :type no_proxy: list[str] + :param trusted_ca: Alternative CA cert to use for connecting to proxy servers. + :type trusted_ca: str + """ + + _attribute_map = { + 'http_proxy': {'key': 'httpProxy', 'type': 'str'}, + 'https_proxy': {'key': 'httpsProxy', 'type': 'str'}, + 'no_proxy': {'key': 'noProxy', 'type': '[str]'}, + 'trusted_ca': {'key': 'trustedCa', 'type': 'str'}, + } + + def __init__( + self, + *, + http_proxy: Optional[str] = None, + https_proxy: Optional[str] = None, + no_proxy: Optional[List[str]] = None, + trusted_ca: Optional[str] = None, + **kwargs + ): + super(ManagedClusterHTTPProxyConfig, self).__init__(**kwargs) + self.http_proxy = http_proxy + self.https_proxy = https_proxy + self.no_proxy = no_proxy + self.trusted_ca = trusted_ca + + +class ManagedClusterIdentity(msrest.serialization.Model): + """Identity for the managed cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity which is used by master + components. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity which is used by master + components. + :vartype tenant_id: str + :param type: For more information see `use managed identities in AKS + `_. Possible values include: + "SystemAssigned", "UserAssigned", "None". + :type type: str or ~azure.mgmt.containerservice.v2021_09_01.models.ResourceIdentityType + :param user_assigned_identities: The keys must be ARM resource IDs in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedServiceIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ManagedServiceIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "ManagedServiceIdentityUserAssignedIdentitiesValue"]] = None, + **kwargs + ): + super(ManagedClusterIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class ManagedClusterListResult(msrest.serialization.Model): + """The response from the List Managed Clusters operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of managed clusters. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster] + :ivar next_link: The URL to get the next set of managed cluster results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedCluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ManagedCluster"]] = None, + **kwargs + ): + super(ManagedClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ManagedClusterLoadBalancerProfile(msrest.serialization.Model): + """Profile of the managed cluster load balancer. + + :param managed_outbound_i_ps: Desired managed outbound IPs for the cluster load balancer. + :type managed_outbound_i_ps: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterLoadBalancerProfileManagedOutboundIPs + :param outbound_ip_prefixes: Desired outbound IP Prefix resources for the cluster load + balancer. + :type outbound_ip_prefixes: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPPrefixes + :param outbound_i_ps: Desired outbound IP resources for the cluster load balancer. + :type outbound_i_ps: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterLoadBalancerProfileOutboundIPs + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster load + balancer. + :type effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2021_09_01.models.ResourceReference] + :param allocated_outbound_ports: The desired number of allocated SNAT ports per VM. Allowed + values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in + Azure dynamically allocating ports. + :type allocated_outbound_ports: int + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 30 minutes. + :type idle_timeout_in_minutes: int + :param enable_multiple_standard_load_balancers: Enable multiple standard load balancers per AKS + cluster or not. + :type enable_multiple_standard_load_balancers: bool + """ + + _validation = { + 'allocated_outbound_ports': {'maximum': 64000, 'minimum': 0}, + 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, + } + + _attribute_map = { + 'managed_outbound_i_ps': {'key': 'managedOutboundIPs', 'type': 'ManagedClusterLoadBalancerProfileManagedOutboundIPs'}, + 'outbound_ip_prefixes': {'key': 'outboundIPPrefixes', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPPrefixes'}, + 'outbound_i_ps': {'key': 'outboundIPs', 'type': 'ManagedClusterLoadBalancerProfileOutboundIPs'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'allocated_outbound_ports': {'key': 'allocatedOutboundPorts', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, + 'enable_multiple_standard_load_balancers': {'key': 'enableMultipleStandardLoadBalancers', 'type': 'bool'}, + } + + def __init__( + self, + *, + managed_outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileManagedOutboundIPs"] = None, + outbound_ip_prefixes: Optional["ManagedClusterLoadBalancerProfileOutboundIPPrefixes"] = None, + outbound_i_ps: Optional["ManagedClusterLoadBalancerProfileOutboundIPs"] = None, + effective_outbound_i_ps: Optional[List["ResourceReference"]] = None, + allocated_outbound_ports: Optional[int] = 0, + idle_timeout_in_minutes: Optional[int] = 30, + enable_multiple_standard_load_balancers: Optional[bool] = None, + **kwargs + ): + super(ManagedClusterLoadBalancerProfile, self).__init__(**kwargs) + self.managed_outbound_i_ps = managed_outbound_i_ps + self.outbound_ip_prefixes = outbound_ip_prefixes + self.outbound_i_ps = outbound_i_ps + self.effective_outbound_i_ps = effective_outbound_i_ps + self.allocated_outbound_ports = allocated_outbound_ports + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_multiple_standard_load_balancers = enable_multiple_standard_load_balancers + + +class ManagedClusterLoadBalancerProfileManagedOutboundIPs(msrest.serialization.Model): + """Desired managed outbound IPs for the cluster load balancer. + + :param count: The desired number of outbound IPs created/managed by Azure for the cluster load + balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. + :type count: int + """ + + _validation = { + 'count': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__( + self, + *, + count: Optional[int] = 1, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileManagedOutboundIPs, self).__init__(**kwargs) + self.count = count + + +class ManagedClusterLoadBalancerProfileOutboundIPPrefixes(msrest.serialization.Model): + """Desired outbound IP Prefix resources for the cluster load balancer. + + :param public_ip_prefixes: A list of public IP prefix resources. + :type public_ip_prefixes: + list[~azure.mgmt.containerservice.v2021_09_01.models.ResourceReference] + """ + + _attribute_map = { + 'public_ip_prefixes': {'key': 'publicIPPrefixes', 'type': '[ResourceReference]'}, + } + + def __init__( + self, + *, + public_ip_prefixes: Optional[List["ResourceReference"]] = None, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileOutboundIPPrefixes, self).__init__(**kwargs) + self.public_ip_prefixes = public_ip_prefixes + + +class ManagedClusterLoadBalancerProfileOutboundIPs(msrest.serialization.Model): + """Desired outbound IP resources for the cluster load balancer. + + :param public_i_ps: A list of public IP resources. + :type public_i_ps: list[~azure.mgmt.containerservice.v2021_09_01.models.ResourceReference] + """ + + _attribute_map = { + 'public_i_ps': {'key': 'publicIPs', 'type': '[ResourceReference]'}, + } + + def __init__( + self, + *, + public_i_ps: Optional[List["ResourceReference"]] = None, + **kwargs + ): + super(ManagedClusterLoadBalancerProfileOutboundIPs, self).__init__(**kwargs) + self.public_i_ps = public_i_ps + + +class ManagedClusterManagedOutboundIPProfile(msrest.serialization.Model): + """Profile of the managed outbound IP resources of the managed cluster. + + :param count: The desired number of outbound IPs created/managed by Azure. Allowed values must + be in the range of 1 to 16 (inclusive). The default value is 1. + :type count: int + """ + + _validation = { + 'count': {'maximum': 16, 'minimum': 1}, + } + + _attribute_map = { + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__( + self, + *, + count: Optional[int] = 1, + **kwargs + ): + super(ManagedClusterManagedOutboundIPProfile, self).__init__(**kwargs) + self.count = count + + +class ManagedClusterNATGatewayProfile(msrest.serialization.Model): + """Profile of the managed cluster NAT gateway. + + :param managed_outbound_ip_profile: Profile of the managed outbound IP resources of the cluster + NAT gateway. + :type managed_outbound_ip_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterManagedOutboundIPProfile + :param effective_outbound_i_ps: The effective outbound IP resources of the cluster NAT gateway. + :type effective_outbound_i_ps: + list[~azure.mgmt.containerservice.v2021_09_01.models.ResourceReference] + :param idle_timeout_in_minutes: Desired outbound flow idle timeout in minutes. Allowed values + are in the range of 4 to 120 (inclusive). The default value is 4 minutes. + :type idle_timeout_in_minutes: int + """ + + _validation = { + 'idle_timeout_in_minutes': {'maximum': 120, 'minimum': 4}, + } + + _attribute_map = { + 'managed_outbound_ip_profile': {'key': 'managedOutboundIPProfile', 'type': 'ManagedClusterManagedOutboundIPProfile'}, + 'effective_outbound_i_ps': {'key': 'effectiveOutboundIPs', 'type': '[ResourceReference]'}, + 'idle_timeout_in_minutes': {'key': 'idleTimeoutInMinutes', 'type': 'int'}, + } + + def __init__( + self, + *, + managed_outbound_ip_profile: Optional["ManagedClusterManagedOutboundIPProfile"] = None, + effective_outbound_i_ps: Optional[List["ResourceReference"]] = None, + idle_timeout_in_minutes: Optional[int] = 4, + **kwargs + ): + super(ManagedClusterNATGatewayProfile, self).__init__(**kwargs) + self.managed_outbound_ip_profile = managed_outbound_ip_profile + self.effective_outbound_i_ps = effective_outbound_i_ps + self.idle_timeout_in_minutes = idle_timeout_in_minutes + + +class ManagedClusterPodIdentity(msrest.serialization.Model): + """Details about the pod identity assigned to the Managed Cluster. + + 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 name: Required. The name of the pod identity. + :type name: str + :param namespace: Required. The namespace of the pod identity. + :type namespace: str + :param binding_selector: The binding selector to use for the AzureIdentityBinding resource. + :type binding_selector: str + :param identity: Required. The user assigned identity details. + :type identity: ~azure.mgmt.containerservice.v2021_09_01.models.UserAssignedIdentity + :ivar provisioning_state: The current provisioning state of the pod identity. Possible values + include: "Assigned", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningState + :ivar provisioning_info: + :vartype provisioning_info: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningInfo + """ + + _validation = { + 'name': {'required': True}, + 'namespace': {'required': True}, + 'identity': {'required': True}, + 'provisioning_state': {'readonly': True}, + 'provisioning_info': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'binding_selector': {'key': 'bindingSelector', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'UserAssignedIdentity'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'provisioning_info': {'key': 'provisioningInfo', 'type': 'ManagedClusterPodIdentityProvisioningInfo'}, + } + + def __init__( + self, + *, + name: str, + namespace: str, + identity: "UserAssignedIdentity", + binding_selector: Optional[str] = None, + **kwargs + ): + super(ManagedClusterPodIdentity, self).__init__(**kwargs) + self.name = name + self.namespace = namespace + self.binding_selector = binding_selector + self.identity = identity + self.provisioning_state = None + self.provisioning_info = None + + +class ManagedClusterPodIdentityException(msrest.serialization.Model): + """See `disable AAD Pod Identity for a specific Pod/Application `_ for more details. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the pod identity exception. + :type name: str + :param namespace: Required. The namespace of the pod identity exception. + :type namespace: str + :param pod_labels: Required. The pod labels to match. + :type pod_labels: dict[str, str] + """ + + _validation = { + 'name': {'required': True}, + 'namespace': {'required': True}, + 'pod_labels': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'namespace': {'key': 'namespace', 'type': 'str'}, + 'pod_labels': {'key': 'podLabels', 'type': '{str}'}, + } + + def __init__( + self, + *, + name: str, + namespace: str, + pod_labels: Dict[str, str], + **kwargs + ): + super(ManagedClusterPodIdentityException, self).__init__(**kwargs) + self.name = name + self.namespace = namespace + self.pod_labels = pod_labels + + +class ManagedClusterPodIdentityProfile(msrest.serialization.Model): + """See `use AAD pod identity `_ for more details on pod identity integration. + + :param enabled: Whether the pod identity addon is enabled. + :type enabled: bool + :param allow_network_plugin_kubenet: Running in Kubenet is disabled by default due to the + security related nature of AAD Pod Identity and the risks of IP spoofing. See `using Kubenet + network plugin with AAD Pod Identity + `_ + for more information. + :type allow_network_plugin_kubenet: bool + :param user_assigned_identities: The pod identities to use in the cluster. + :type user_assigned_identities: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentity] + :param user_assigned_identity_exceptions: The pod identity exceptions to allow. + :type user_assigned_identity_exceptions: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityException] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'allow_network_plugin_kubenet': {'key': 'allowNetworkPluginKubenet', 'type': 'bool'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '[ManagedClusterPodIdentity]'}, + 'user_assigned_identity_exceptions': {'key': 'userAssignedIdentityExceptions', 'type': '[ManagedClusterPodIdentityException]'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + allow_network_plugin_kubenet: Optional[bool] = None, + user_assigned_identities: Optional[List["ManagedClusterPodIdentity"]] = None, + user_assigned_identity_exceptions: Optional[List["ManagedClusterPodIdentityException"]] = None, + **kwargs + ): + super(ManagedClusterPodIdentityProfile, self).__init__(**kwargs) + self.enabled = enabled + self.allow_network_plugin_kubenet = allow_network_plugin_kubenet + self.user_assigned_identities = user_assigned_identities + self.user_assigned_identity_exceptions = user_assigned_identity_exceptions + + +class ManagedClusterPodIdentityProvisioningError(msrest.serialization.Model): + """An error response from the pod identity provisioning. + + :param error: Details about the error. + :type error: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningErrorBody + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ManagedClusterPodIdentityProvisioningErrorBody'}, + } + + def __init__( + self, + *, + error: Optional["ManagedClusterPodIdentityProvisioningErrorBody"] = None, + **kwargs + ): + super(ManagedClusterPodIdentityProvisioningError, self).__init__(**kwargs) + self.error = error + + +class ManagedClusterPodIdentityProvisioningErrorBody(msrest.serialization.Model): + """An error response from the pod identity provisioning. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ManagedClusterPodIdentityProvisioningErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["ManagedClusterPodIdentityProvisioningErrorBody"]] = None, + **kwargs + ): + super(ManagedClusterPodIdentityProvisioningErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ManagedClusterPodIdentityProvisioningInfo(msrest.serialization.Model): + """ManagedClusterPodIdentityProvisioningInfo. + + :param error: Pod identity assignment error (if any). + :type error: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPodIdentityProvisioningError + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ManagedClusterPodIdentityProvisioningError'}, + } + + def __init__( + self, + *, + error: Optional["ManagedClusterPodIdentityProvisioningError"] = None, + **kwargs + ): + super(ManagedClusterPodIdentityProvisioningInfo, self).__init__(**kwargs) + self.error = error + + +class ManagedClusterPoolUpgradeProfile(msrest.serialization.Model): + """The list of available upgrade versions. + + All required parameters must be populated in order to send to Azure. + + :param kubernetes_version: Required. The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param name: The Agent Pool name. + :type name: str + :param os_type: Required. The operating system type. The default is Linux. Possible values + include: "Linux", "Windows". Default value: "Linux". + :type os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :param upgrades: List of orchestrator types and versions available for upgrade. + :type upgrades: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPoolUpgradeProfileUpgradesItem] + """ + + _validation = { + 'kubernetes_version': {'required': True}, + 'os_type': {'required': True}, + } + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'str'}, + 'upgrades': {'key': 'upgrades', 'type': '[ManagedClusterPoolUpgradeProfileUpgradesItem]'}, + } + + def __init__( + self, + *, + kubernetes_version: str, + os_type: Union[str, "OSType"] = "Linux", + name: Optional[str] = None, + upgrades: Optional[List["ManagedClusterPoolUpgradeProfileUpgradesItem"]] = None, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfile, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.name = name + self.os_type = os_type + self.upgrades = upgrades + + +class ManagedClusterPoolUpgradeProfileUpgradesItem(msrest.serialization.Model): + """ManagedClusterPoolUpgradeProfileUpgradesItem. + + :param kubernetes_version: The Kubernetes version (major.minor.patch). + :type kubernetes_version: str + :param is_preview: Whether the Kubernetes version is currently in preview. + :type is_preview: bool + """ + + _attribute_map = { + 'kubernetes_version': {'key': 'kubernetesVersion', 'type': 'str'}, + 'is_preview': {'key': 'isPreview', 'type': 'bool'}, + } + + def __init__( + self, + *, + kubernetes_version: Optional[str] = None, + is_preview: Optional[bool] = None, + **kwargs + ): + super(ManagedClusterPoolUpgradeProfileUpgradesItem, self).__init__(**kwargs) + self.kubernetes_version = kubernetes_version + self.is_preview = is_preview + + +class ManagedClusterPropertiesAutoScalerProfile(msrest.serialization.Model): + """Parameters to be applied to the cluster-autoscaler when enabled. + + :param balance_similar_node_groups: Valid values are 'true' and 'false'. + :type balance_similar_node_groups: str + :param expander: If not specified, the default is 'random'. See `expanders + `_ + for more information. Possible values include: "least-waste", "most-pods", "priority", + "random". + :type expander: str or ~azure.mgmt.containerservice.v2021_09_01.models.Expander + :param max_empty_bulk_delete: The default is 10. + :type max_empty_bulk_delete: str + :param max_graceful_termination_sec: The default is 600. + :type max_graceful_termination_sec: str + :param max_node_provision_time: The default is '15m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :type max_node_provision_time: str + :param max_total_unready_percentage: The default is 45. The maximum is 100 and the minimum is + 0. + :type max_total_unready_percentage: str + :param new_pod_scale_up_delay: For scenarios like burst/batch scale where you don't want CA to + act before the kubernetes scheduler could schedule all the pods, you can tell CA to ignore + unscheduled pods before they're a certain age. The default is '0s'. Values must be an integer + followed by a unit ('s' for seconds, 'm' for minutes, 'h' for hours, etc). + :type new_pod_scale_up_delay: str + :param ok_total_unready_count: This must be an integer. The default is 3. + :type ok_total_unready_count: str + :param scan_interval: The default is '10'. Values must be an integer number of seconds. + :type scan_interval: str + :param scale_down_delay_after_add: The default is '10m'. Values must be an integer followed by + an 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_delay_after_add: str + :param scale_down_delay_after_delete: The default is the scan-interval. Values must be an + integer followed by an 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_delay_after_delete: str + :param scale_down_delay_after_failure: The default is '3m'. Values must be an integer followed + by an 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_delay_after_failure: str + :param scale_down_unneeded_time: The default is '10m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_unneeded_time: str + :param scale_down_unready_time: The default is '20m'. Values must be an integer followed by an + 'm'. No unit of time other than minutes (m) is supported. + :type scale_down_unready_time: str + :param scale_down_utilization_threshold: The default is '0.5'. + :type scale_down_utilization_threshold: str + :param skip_nodes_with_local_storage: The default is true. + :type skip_nodes_with_local_storage: str + :param skip_nodes_with_system_pods: The default is true. + :type skip_nodes_with_system_pods: str + """ + + _attribute_map = { + 'balance_similar_node_groups': {'key': 'balance-similar-node-groups', 'type': 'str'}, + 'expander': {'key': 'expander', 'type': 'str'}, + 'max_empty_bulk_delete': {'key': 'max-empty-bulk-delete', 'type': 'str'}, + 'max_graceful_termination_sec': {'key': 'max-graceful-termination-sec', 'type': 'str'}, + 'max_node_provision_time': {'key': 'max-node-provision-time', 'type': 'str'}, + 'max_total_unready_percentage': {'key': 'max-total-unready-percentage', 'type': 'str'}, + 'new_pod_scale_up_delay': {'key': 'new-pod-scale-up-delay', 'type': 'str'}, + 'ok_total_unready_count': {'key': 'ok-total-unready-count', 'type': 'str'}, + 'scan_interval': {'key': 'scan-interval', 'type': 'str'}, + 'scale_down_delay_after_add': {'key': 'scale-down-delay-after-add', 'type': 'str'}, + 'scale_down_delay_after_delete': {'key': 'scale-down-delay-after-delete', 'type': 'str'}, + 'scale_down_delay_after_failure': {'key': 'scale-down-delay-after-failure', 'type': 'str'}, + 'scale_down_unneeded_time': {'key': 'scale-down-unneeded-time', 'type': 'str'}, + 'scale_down_unready_time': {'key': 'scale-down-unready-time', 'type': 'str'}, + 'scale_down_utilization_threshold': {'key': 'scale-down-utilization-threshold', 'type': 'str'}, + 'skip_nodes_with_local_storage': {'key': 'skip-nodes-with-local-storage', 'type': 'str'}, + 'skip_nodes_with_system_pods': {'key': 'skip-nodes-with-system-pods', 'type': 'str'}, + } + + def __init__( + self, + *, + balance_similar_node_groups: Optional[str] = None, + expander: Optional[Union[str, "Expander"]] = None, + max_empty_bulk_delete: Optional[str] = None, + max_graceful_termination_sec: Optional[str] = None, + max_node_provision_time: Optional[str] = None, + max_total_unready_percentage: Optional[str] = None, + new_pod_scale_up_delay: Optional[str] = None, + ok_total_unready_count: Optional[str] = None, + scan_interval: Optional[str] = None, + scale_down_delay_after_add: Optional[str] = None, + scale_down_delay_after_delete: Optional[str] = None, + scale_down_delay_after_failure: Optional[str] = None, + scale_down_unneeded_time: Optional[str] = None, + scale_down_unready_time: Optional[str] = None, + scale_down_utilization_threshold: Optional[str] = None, + skip_nodes_with_local_storage: Optional[str] = None, + skip_nodes_with_system_pods: Optional[str] = None, + **kwargs + ): + super(ManagedClusterPropertiesAutoScalerProfile, self).__init__(**kwargs) + self.balance_similar_node_groups = balance_similar_node_groups + self.expander = expander + self.max_empty_bulk_delete = max_empty_bulk_delete + self.max_graceful_termination_sec = max_graceful_termination_sec + self.max_node_provision_time = max_node_provision_time + self.max_total_unready_percentage = max_total_unready_percentage + self.new_pod_scale_up_delay = new_pod_scale_up_delay + self.ok_total_unready_count = ok_total_unready_count + self.scan_interval = scan_interval + self.scale_down_delay_after_add = scale_down_delay_after_add + self.scale_down_delay_after_delete = scale_down_delay_after_delete + self.scale_down_delay_after_failure = scale_down_delay_after_failure + self.scale_down_unneeded_time = scale_down_unneeded_time + self.scale_down_unready_time = scale_down_unready_time + self.scale_down_utilization_threshold = scale_down_utilization_threshold + self.skip_nodes_with_local_storage = skip_nodes_with_local_storage + self.skip_nodes_with_system_pods = skip_nodes_with_system_pods + + +class ManagedClusterSecurityProfile(msrest.serialization.Model): + """Security profile for the container service cluster. + + :param azure_defender: Azure Defender settings for the security profile. + :type azure_defender: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSecurityProfileAzureDefender + """ + + _attribute_map = { + 'azure_defender': {'key': 'azureDefender', 'type': 'ManagedClusterSecurityProfileAzureDefender'}, + } + + def __init__( + self, + *, + azure_defender: Optional["ManagedClusterSecurityProfileAzureDefender"] = None, + **kwargs + ): + super(ManagedClusterSecurityProfile, self).__init__(**kwargs) + self.azure_defender = azure_defender + + +class ManagedClusterSecurityProfileAzureDefender(msrest.serialization.Model): + """Azure Defender settings for the security profile. + + :param enabled: Whether to enable Azure Defender. + :type enabled: bool + :param log_analytics_workspace_resource_id: Resource ID of the Log Analytics workspace to be + associated with Azure Defender. When Azure Defender is enabled, this field is required and + must be a valid workspace resource ID. When Azure Defender is disabled, leave the field empty. + :type log_analytics_workspace_resource_id: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'log_analytics_workspace_resource_id': {'key': 'logAnalyticsWorkspaceResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + log_analytics_workspace_resource_id: Optional[str] = None, + **kwargs + ): + super(ManagedClusterSecurityProfileAzureDefender, self).__init__(**kwargs) + self.enabled = enabled + self.log_analytics_workspace_resource_id = log_analytics_workspace_resource_id + + +class ManagedClusterServicePrincipalProfile(msrest.serialization.Model): + """Information about a service principal identity for the cluster to use for manipulating Azure APIs. + + All required parameters must be populated in order to send to Azure. + + :param client_id: Required. The ID for the service principal. + :type client_id: str + :param secret: The secret password associated with the service principal in plain text. + :type secret: str + """ + + _validation = { + 'client_id': {'required': True}, + } + + _attribute_map = { + 'client_id': {'key': 'clientId', 'type': 'str'}, + 'secret': {'key': 'secret', 'type': 'str'}, + } + + def __init__( + self, + *, + client_id: str, + secret: Optional[str] = None, + **kwargs + ): + super(ManagedClusterServicePrincipalProfile, self).__init__(**kwargs) + self.client_id = client_id + self.secret = secret + + +class ManagedClusterSKU(msrest.serialization.Model): + """The SKU of a Managed Cluster. + + :param name: The name of a managed cluster SKU. Possible values include: "Basic". + :type name: str or ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSKUName + :param tier: If not specified, the default is 'Free'. See `uptime SLA + `_ for more details. Possible values include: + "Paid", "Free". + :type tier: str or ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterSKUTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "ManagedClusterSKUName"]] = None, + tier: Optional[Union[str, "ManagedClusterSKUTier"]] = None, + **kwargs + ): + super(ManagedClusterSKU, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class ManagedClusterUpgradeProfile(msrest.serialization.Model): + """The list of available upgrades for compute pools. + + 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. + + :ivar id: The ID of the upgrade profile. + :vartype id: str + :ivar name: The name of the upgrade profile. + :vartype name: str + :ivar type: The type of the upgrade profile. + :vartype type: str + :param control_plane_profile: Required. The list of available upgrade versions for the control + plane. + :type control_plane_profile: + ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPoolUpgradeProfile + :param agent_pool_profiles: Required. The list of available upgrade versions for agent pools. + :type agent_pool_profiles: + list[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterPoolUpgradeProfile] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'control_plane_profile': {'required': True}, + 'agent_pool_profiles': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'control_plane_profile': {'key': 'properties.controlPlaneProfile', 'type': 'ManagedClusterPoolUpgradeProfile'}, + 'agent_pool_profiles': {'key': 'properties.agentPoolProfiles', 'type': '[ManagedClusterPoolUpgradeProfile]'}, + } + + def __init__( + self, + *, + control_plane_profile: "ManagedClusterPoolUpgradeProfile", + agent_pool_profiles: List["ManagedClusterPoolUpgradeProfile"], + **kwargs + ): + super(ManagedClusterUpgradeProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.control_plane_profile = control_plane_profile + self.agent_pool_profiles = agent_pool_profiles + + +class ManagedClusterWindowsProfile(msrest.serialization.Model): + """Profile for Windows VMs in the managed cluster. + + All required parameters must be populated in order to send to Azure. + + :param admin_username: Required. Specifies the name of the administrator account. + :code:`
`:code:`
` **Restriction:** Cannot end in "." :code:`
`:code:`
` + **Disallowed values:** "administrator", "admin", "user", "user1", "test", "user2", "test1", + "user3", "admin1", "1", "123", "a", "actuser", "adm", "admin2", "aspnet", "backup", "console", + "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + "sys", "test2", "test3", "user4", "user5". :code:`
`:code:`
` **Minimum-length:** 1 + character :code:`
`:code:`
` **Max-length:** 20 characters. + :type admin_username: str + :param admin_password: Specifies the password of the administrator account. + :code:`
`:code:`
` **Minimum-length:** 8 characters :code:`
`:code:`
` + **Max-length:** 123 characters :code:`
`:code:`
` **Complexity requirements:** 3 out of 4 + conditions below need to be fulfilled :code:`
` Has lower characters :code:`
`Has upper + characters :code:`
` Has a digit :code:`
` Has a special character (Regex match [\W_]) + :code:`
`:code:`
` **Disallowed values:** "abc@123", "P@$$w0rd", "P@ssw0rd", + "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!". + :type admin_password: str + :param license_type: The license type to use for Windows VMs. See `Azure Hybrid User Benefits + `_ for more details. Possible values + include: "None", "Windows_Server". + :type license_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.LicenseType + :param enable_csi_proxy: For more details on CSI proxy, see the `CSI proxy GitHub repo + `_. + :type enable_csi_proxy: bool + :param gmsa_profile: The Windows gMSA Profile in the Managed Cluster. + :type gmsa_profile: ~azure.mgmt.containerservice.v2021_09_01.models.WindowsGmsaProfile + """ + + _validation = { + 'admin_username': {'required': True}, + } + + _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, + 'admin_password': {'key': 'adminPassword', 'type': 'str'}, + 'license_type': {'key': 'licenseType', 'type': 'str'}, + 'enable_csi_proxy': {'key': 'enableCSIProxy', 'type': 'bool'}, + 'gmsa_profile': {'key': 'gmsaProfile', 'type': 'WindowsGmsaProfile'}, + } + + def __init__( + self, + *, + admin_username: str, + admin_password: Optional[str] = None, + license_type: Optional[Union[str, "LicenseType"]] = None, + enable_csi_proxy: Optional[bool] = None, + gmsa_profile: Optional["WindowsGmsaProfile"] = None, + **kwargs + ): + super(ManagedClusterWindowsProfile, self).__init__(**kwargs) + self.admin_username = admin_username + self.admin_password = admin_password + self.license_type = license_type + self.enable_csi_proxy = enable_csi_proxy + self.gmsa_profile = gmsa_profile + + +class ManagedServiceIdentityUserAssignedIdentitiesValue(msrest.serialization.Model): + """ManagedServiceIdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedServiceIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class OperationListResult(msrest.serialization.Model): + """The List Operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of operations. + :vartype value: list[~azure.mgmt.containerservice.v2021_09_01.models.OperationValue] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OperationValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + + +class OperationValue(msrest.serialization.Model): + """Describes the properties of a Operation value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the operation. + :vartype origin: str + :ivar name: The name of the operation. + :vartype name: str + :ivar operation: The display name of the operation. + :vartype operation: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + :ivar description: The description of the operation. + :vartype description: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + """ + + _validation = { + 'origin': {'readonly': True}, + 'name': {'readonly': True}, + 'operation': {'readonly': True}, + 'resource': {'readonly': True}, + 'description': {'readonly': True}, + 'provider': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationValue, self).__init__(**kwargs) + self.origin = None + self.name = None + self.operation = None + self.resource = None + self.description = None + self.provider = None + + +class OSOptionProfile(msrest.serialization.Model): + """The OS option profile. + + 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. + + :ivar id: The ID of the OS option resource. + :vartype id: str + :ivar name: The name of the OS option resource. + :vartype name: str + :ivar type: The type of the OS option resource. + :vartype type: str + :param os_option_property_list: Required. The list of OS options. + :type os_option_property_list: + list[~azure.mgmt.containerservice.v2021_09_01.models.OSOptionProperty] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'os_option_property_list': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'os_option_property_list': {'key': 'properties.osOptionPropertyList', 'type': '[OSOptionProperty]'}, + } + + def __init__( + self, + *, + os_option_property_list: List["OSOptionProperty"], + **kwargs + ): + super(OSOptionProfile, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.os_option_property_list = os_option_property_list + + +class OSOptionProperty(msrest.serialization.Model): + """OS option property. + + All required parameters must be populated in order to send to Azure. + + :param os_type: Required. The OS type. + :type os_type: str + :param enable_fips_image: Required. Whether the image is FIPS-enabled. + :type enable_fips_image: bool + """ + + _validation = { + 'os_type': {'required': True}, + 'enable_fips_image': {'required': True}, + } + + _attribute_map = { + 'os_type': {'key': 'os-type', 'type': 'str'}, + 'enable_fips_image': {'key': 'enable-fips-image', 'type': 'bool'}, + } + + def __init__( + self, + *, + os_type: str, + enable_fips_image: bool, + **kwargs + ): + super(OSOptionProperty, self).__init__(**kwargs) + self.os_type = os_type + self.enable_fips_image = enable_fips_image + + +class OutboundEnvironmentEndpoint(msrest.serialization.Model): + """Egress endpoints which AKS agent nodes connect to for common purpose. + + :param category: The category of endpoints accessed by the AKS agent node, e.g. + azure-resource-management, apiserver, etc. + :type category: str + :param endpoints: The endpoints that AKS agent nodes connect to. + :type endpoints: list[~azure.mgmt.containerservice.v2021_09_01.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[List["EndpointDependency"]] = None, + **kwargs + ): + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class OutboundEnvironmentEndpointCollection(msrest.serialization.Model): + """Collection of OutboundEnvironmentEndpoint. + + 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 value: Required. Collection of resources. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["OutboundEnvironmentEndpoint"], + **kwargs + ): + super(OutboundEnvironmentEndpointCollection, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PowerState(msrest.serialization.Model): + """Describes the Power State of the cluster. + + :param code: Tells whether the cluster is Running or Stopped. Possible values include: + "Running", "Stopped". + :type code: str or ~azure.mgmt.containerservice.v2021_09_01.models.Code + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[Union[str, "Code"]] = None, + **kwargs + ): + super(PowerState, self).__init__(**kwargs) + self.code = code + + +class PrivateEndpoint(msrest.serialization.Model): + """Private endpoint which a connection belongs to. + + :param id: The resource ID of the private endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnection(msrest.serialization.Model): + """A private endpoint connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the private endpoint connection. + :vartype id: str + :ivar name: The name of the private endpoint connection. + :vartype name: str + :ivar type: The resource type. + :vartype type: str + :ivar provisioning_state: The current provisioning state. Possible values include: "Succeeded", + "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnectionProvisioningState + :param private_endpoint: The resource of private endpoint. + :type private_endpoint: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.provisioning_state = None + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """A list of private endpoint connections. + + :param value: The collection value. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkResource(msrest.serialization.Model): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: The ID of the private link resource. + :type id: str + :param name: The name of the private link resource. + :type name: str + :param type: The resource type. + :type type: str + :param group_id: The group ID of the resource. + :type group_id: str + :param required_members: The RequiredMembers of the resource. + :type required_members: list[str] + :ivar private_link_service_id: The private link service ID of the resource, this field is + exposed only to NRP internally. + :vartype private_link_service_id: str + """ + + _validation = { + 'private_link_service_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'private_link_service_id': {'key': 'privateLinkServiceID', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.group_id = group_id + self.required_members = required_members + self.private_link_service_id = None + + +class PrivateLinkResourcesListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: The collection value. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): + super(PrivateLinkResourcesListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """The state of a private link service connection. + + :param status: The private link service connection status. Possible values include: "Pending", + "Approved", "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.containerservice.v2021_09_01.models.ConnectionStatus + :param description: The private link service connection description. + :type description: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "ConnectionStatus"]] = None, + description: Optional[str] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + + +class ResourceReference(msrest.serialization.Model): + """A reference to an Azure resource. + + :param id: The fully qualified Azure resource id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(ResourceReference, self).__init__(**kwargs) + self.id = id + + +class RunCommandRequest(msrest.serialization.Model): + """A run command request. + + All required parameters must be populated in order to send to Azure. + + :param command: Required. The command to run. + :type command: str + :param context: A base64 encoded zip file containing the files required by the command. + :type context: str + :param cluster_token: AuthToken issued for AKS AAD Server App. + :type cluster_token: str + """ + + _validation = { + 'command': {'required': True}, + } + + _attribute_map = { + 'command': {'key': 'command', 'type': 'str'}, + 'context': {'key': 'context', 'type': 'str'}, + 'cluster_token': {'key': 'clusterToken', 'type': 'str'}, + } + + def __init__( + self, + *, + command: str, + context: Optional[str] = None, + cluster_token: Optional[str] = None, + **kwargs + ): + super(RunCommandRequest, self).__init__(**kwargs) + self.command = command + self.context = context + self.cluster_token = cluster_token + + +class RunCommandResult(msrest.serialization.Model): + """run command result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The command id. + :vartype id: str + :ivar provisioning_state: provisioning State. + :vartype provisioning_state: str + :ivar exit_code: The exit code of the command. + :vartype exit_code: int + :ivar started_at: The time when the command started. + :vartype started_at: ~datetime.datetime + :ivar finished_at: The time when the command finished. + :vartype finished_at: ~datetime.datetime + :ivar logs: The command output. + :vartype logs: str + :ivar reason: An explanation of why provisioningState is set to failed (if so). + :vartype reason: str + """ + + _validation = { + 'id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'exit_code': {'readonly': True}, + 'started_at': {'readonly': True}, + 'finished_at': {'readonly': True}, + 'logs': {'readonly': True}, + 'reason': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'exit_code': {'key': 'properties.exitCode', 'type': 'int'}, + 'started_at': {'key': 'properties.startedAt', 'type': 'iso-8601'}, + 'finished_at': {'key': 'properties.finishedAt', 'type': 'iso-8601'}, + 'logs': {'key': 'properties.logs', 'type': 'str'}, + 'reason': {'key': 'properties.reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RunCommandResult, self).__init__(**kwargs) + self.id = None + self.provisioning_state = None + self.exit_code = None + self.started_at = None + self.finished_at = None + self.logs = None + self.reason = None + + +class Snapshot(Resource): + """A node pool snapshot resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: The system metadata relating to this snapshot. + :vartype system_data: ~azure.mgmt.containerservice.v2021_09_01.models.SystemData + :param creation_data: CreationData to be used to specify the source agent pool resource ID to + create this snapshot. + :type creation_data: ~azure.mgmt.containerservice.v2021_09_01.models.CreationData + :param snapshot_type: The type of a snapshot. The default is NodePool. Possible values include: + "NodePool". Default value: "NodePool". + :type snapshot_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.SnapshotType + :ivar kubernetes_version: The version of Kubernetes. + :vartype kubernetes_version: str + :ivar node_image_version: The version of node image. + :vartype node_image_version: str + :ivar os_type: The operating system type. The default is Linux. Possible values include: + "Linux", "Windows". Default value: "Linux". + :vartype os_type: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSType + :ivar os_sku: Specifies an OS SKU. This value must not be specified if OSType is Windows. + Possible values include: "Ubuntu", "CBLMariner". + :vartype os_sku: str or ~azure.mgmt.containerservice.v2021_09_01.models.OSSKU + :ivar vm_size: The size of the VM. + :vartype vm_size: str + :ivar enable_fips: Whether to use a FIPS-enabled OS. + :vartype enable_fips: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'kubernetes_version': {'readonly': True}, + 'node_image_version': {'readonly': True}, + 'os_type': {'readonly': True}, + 'os_sku': {'readonly': True}, + 'vm_size': {'readonly': True}, + 'enable_fips': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'creation_data': {'key': 'properties.creationData', 'type': 'CreationData'}, + 'snapshot_type': {'key': 'properties.snapshotType', 'type': 'str'}, + 'kubernetes_version': {'key': 'properties.kubernetesVersion', 'type': 'str'}, + 'node_image_version': {'key': 'properties.nodeImageVersion', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, + 'os_sku': {'key': 'properties.osSku', 'type': 'str'}, + 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, + 'enable_fips': {'key': 'properties.enableFIPS', 'type': 'bool'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + creation_data: Optional["CreationData"] = None, + snapshot_type: Optional[Union[str, "SnapshotType"]] = "NodePool", + **kwargs + ): + super(Snapshot, self).__init__(location=location, tags=tags, **kwargs) + self.system_data = None + self.creation_data = creation_data + self.snapshot_type = snapshot_type + self.kubernetes_version = None + self.node_image_version = None + self.os_type = None + self.os_sku = None + self.vm_size = None + self.enable_fips = None + + +class SnapshotListResult(msrest.serialization.Model): + """The response from the List Snapshots operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of snapshots. + :type value: list[~azure.mgmt.containerservice.v2021_09_01.models.Snapshot] + :ivar next_link: The URL to get the next set of snapshot results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Snapshot]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Snapshot"]] = None, + **kwargs + ): + super(SnapshotListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SysctlConfig(msrest.serialization.Model): + """Sysctl settings for Linux agent nodes. + + :param net_core_somaxconn: Sysctl setting net.core.somaxconn. + :type net_core_somaxconn: int + :param net_core_netdev_max_backlog: Sysctl setting net.core.netdev_max_backlog. + :type net_core_netdev_max_backlog: int + :param net_core_rmem_default: Sysctl setting net.core.rmem_default. + :type net_core_rmem_default: int + :param net_core_rmem_max: Sysctl setting net.core.rmem_max. + :type net_core_rmem_max: int + :param net_core_wmem_default: Sysctl setting net.core.wmem_default. + :type net_core_wmem_default: int + :param net_core_wmem_max: Sysctl setting net.core.wmem_max. + :type net_core_wmem_max: int + :param net_core_optmem_max: Sysctl setting net.core.optmem_max. + :type net_core_optmem_max: int + :param net_ipv4_tcp_max_syn_backlog: Sysctl setting net.ipv4.tcp_max_syn_backlog. + :type net_ipv4_tcp_max_syn_backlog: int + :param net_ipv4_tcp_max_tw_buckets: Sysctl setting net.ipv4.tcp_max_tw_buckets. + :type net_ipv4_tcp_max_tw_buckets: int + :param net_ipv4_tcp_fin_timeout: Sysctl setting net.ipv4.tcp_fin_timeout. + :type net_ipv4_tcp_fin_timeout: int + :param net_ipv4_tcp_keepalive_time: Sysctl setting net.ipv4.tcp_keepalive_time. + :type net_ipv4_tcp_keepalive_time: int + :param net_ipv4_tcp_keepalive_probes: Sysctl setting net.ipv4.tcp_keepalive_probes. + :type net_ipv4_tcp_keepalive_probes: int + :param net_ipv4_tcpkeepalive_intvl: Sysctl setting net.ipv4.tcp_keepalive_intvl. + :type net_ipv4_tcpkeepalive_intvl: int + :param net_ipv4_tcp_tw_reuse: Sysctl setting net.ipv4.tcp_tw_reuse. + :type net_ipv4_tcp_tw_reuse: bool + :param net_ipv4_ip_local_port_range: Sysctl setting net.ipv4.ip_local_port_range. + :type net_ipv4_ip_local_port_range: str + :param net_ipv4_neigh_default_gc_thresh1: Sysctl setting net.ipv4.neigh.default.gc_thresh1. + :type net_ipv4_neigh_default_gc_thresh1: int + :param net_ipv4_neigh_default_gc_thresh2: Sysctl setting net.ipv4.neigh.default.gc_thresh2. + :type net_ipv4_neigh_default_gc_thresh2: int + :param net_ipv4_neigh_default_gc_thresh3: Sysctl setting net.ipv4.neigh.default.gc_thresh3. + :type net_ipv4_neigh_default_gc_thresh3: int + :param net_netfilter_nf_conntrack_max: Sysctl setting net.netfilter.nf_conntrack_max. + :type net_netfilter_nf_conntrack_max: int + :param net_netfilter_nf_conntrack_buckets: Sysctl setting net.netfilter.nf_conntrack_buckets. + :type net_netfilter_nf_conntrack_buckets: int + :param fs_inotify_max_user_watches: Sysctl setting fs.inotify.max_user_watches. + :type fs_inotify_max_user_watches: int + :param fs_file_max: Sysctl setting fs.file-max. + :type fs_file_max: int + :param fs_aio_max_nr: Sysctl setting fs.aio-max-nr. + :type fs_aio_max_nr: int + :param fs_nr_open: Sysctl setting fs.nr_open. + :type fs_nr_open: int + :param kernel_threads_max: Sysctl setting kernel.threads-max. + :type kernel_threads_max: int + :param vm_max_map_count: Sysctl setting vm.max_map_count. + :type vm_max_map_count: int + :param vm_swappiness: Sysctl setting vm.swappiness. + :type vm_swappiness: int + :param vm_vfs_cache_pressure: Sysctl setting vm.vfs_cache_pressure. + :type vm_vfs_cache_pressure: int + """ + + _attribute_map = { + 'net_core_somaxconn': {'key': 'netCoreSomaxconn', 'type': 'int'}, + 'net_core_netdev_max_backlog': {'key': 'netCoreNetdevMaxBacklog', 'type': 'int'}, + 'net_core_rmem_default': {'key': 'netCoreRmemDefault', 'type': 'int'}, + 'net_core_rmem_max': {'key': 'netCoreRmemMax', 'type': 'int'}, + 'net_core_wmem_default': {'key': 'netCoreWmemDefault', 'type': 'int'}, + 'net_core_wmem_max': {'key': 'netCoreWmemMax', 'type': 'int'}, + 'net_core_optmem_max': {'key': 'netCoreOptmemMax', 'type': 'int'}, + 'net_ipv4_tcp_max_syn_backlog': {'key': 'netIpv4TcpMaxSynBacklog', 'type': 'int'}, + 'net_ipv4_tcp_max_tw_buckets': {'key': 'netIpv4TcpMaxTwBuckets', 'type': 'int'}, + 'net_ipv4_tcp_fin_timeout': {'key': 'netIpv4TcpFinTimeout', 'type': 'int'}, + 'net_ipv4_tcp_keepalive_time': {'key': 'netIpv4TcpKeepaliveTime', 'type': 'int'}, + 'net_ipv4_tcp_keepalive_probes': {'key': 'netIpv4TcpKeepaliveProbes', 'type': 'int'}, + 'net_ipv4_tcpkeepalive_intvl': {'key': 'netIpv4TcpkeepaliveIntvl', 'type': 'int'}, + 'net_ipv4_tcp_tw_reuse': {'key': 'netIpv4TcpTwReuse', 'type': 'bool'}, + 'net_ipv4_ip_local_port_range': {'key': 'netIpv4IpLocalPortRange', 'type': 'str'}, + 'net_ipv4_neigh_default_gc_thresh1': {'key': 'netIpv4NeighDefaultGcThresh1', 'type': 'int'}, + 'net_ipv4_neigh_default_gc_thresh2': {'key': 'netIpv4NeighDefaultGcThresh2', 'type': 'int'}, + 'net_ipv4_neigh_default_gc_thresh3': {'key': 'netIpv4NeighDefaultGcThresh3', 'type': 'int'}, + 'net_netfilter_nf_conntrack_max': {'key': 'netNetfilterNfConntrackMax', 'type': 'int'}, + 'net_netfilter_nf_conntrack_buckets': {'key': 'netNetfilterNfConntrackBuckets', 'type': 'int'}, + 'fs_inotify_max_user_watches': {'key': 'fsInotifyMaxUserWatches', 'type': 'int'}, + 'fs_file_max': {'key': 'fsFileMax', 'type': 'int'}, + 'fs_aio_max_nr': {'key': 'fsAioMaxNr', 'type': 'int'}, + 'fs_nr_open': {'key': 'fsNrOpen', 'type': 'int'}, + 'kernel_threads_max': {'key': 'kernelThreadsMax', 'type': 'int'}, + 'vm_max_map_count': {'key': 'vmMaxMapCount', 'type': 'int'}, + 'vm_swappiness': {'key': 'vmSwappiness', 'type': 'int'}, + 'vm_vfs_cache_pressure': {'key': 'vmVfsCachePressure', 'type': 'int'}, + } + + def __init__( + self, + *, + net_core_somaxconn: Optional[int] = None, + net_core_netdev_max_backlog: Optional[int] = None, + net_core_rmem_default: Optional[int] = None, + net_core_rmem_max: Optional[int] = None, + net_core_wmem_default: Optional[int] = None, + net_core_wmem_max: Optional[int] = None, + net_core_optmem_max: Optional[int] = None, + net_ipv4_tcp_max_syn_backlog: Optional[int] = None, + net_ipv4_tcp_max_tw_buckets: Optional[int] = None, + net_ipv4_tcp_fin_timeout: Optional[int] = None, + net_ipv4_tcp_keepalive_time: Optional[int] = None, + net_ipv4_tcp_keepalive_probes: Optional[int] = None, + net_ipv4_tcpkeepalive_intvl: Optional[int] = None, + net_ipv4_tcp_tw_reuse: Optional[bool] = None, + net_ipv4_ip_local_port_range: Optional[str] = None, + net_ipv4_neigh_default_gc_thresh1: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh2: Optional[int] = None, + net_ipv4_neigh_default_gc_thresh3: Optional[int] = None, + net_netfilter_nf_conntrack_max: Optional[int] = None, + net_netfilter_nf_conntrack_buckets: Optional[int] = None, + fs_inotify_max_user_watches: Optional[int] = None, + fs_file_max: Optional[int] = None, + fs_aio_max_nr: Optional[int] = None, + fs_nr_open: Optional[int] = None, + kernel_threads_max: Optional[int] = None, + vm_max_map_count: Optional[int] = None, + vm_swappiness: Optional[int] = None, + vm_vfs_cache_pressure: Optional[int] = None, + **kwargs + ): + super(SysctlConfig, self).__init__(**kwargs) + self.net_core_somaxconn = net_core_somaxconn + self.net_core_netdev_max_backlog = net_core_netdev_max_backlog + self.net_core_rmem_default = net_core_rmem_default + self.net_core_rmem_max = net_core_rmem_max + self.net_core_wmem_default = net_core_wmem_default + self.net_core_wmem_max = net_core_wmem_max + self.net_core_optmem_max = net_core_optmem_max + self.net_ipv4_tcp_max_syn_backlog = net_ipv4_tcp_max_syn_backlog + self.net_ipv4_tcp_max_tw_buckets = net_ipv4_tcp_max_tw_buckets + self.net_ipv4_tcp_fin_timeout = net_ipv4_tcp_fin_timeout + self.net_ipv4_tcp_keepalive_time = net_ipv4_tcp_keepalive_time + self.net_ipv4_tcp_keepalive_probes = net_ipv4_tcp_keepalive_probes + self.net_ipv4_tcpkeepalive_intvl = net_ipv4_tcpkeepalive_intvl + self.net_ipv4_tcp_tw_reuse = net_ipv4_tcp_tw_reuse + self.net_ipv4_ip_local_port_range = net_ipv4_ip_local_port_range + self.net_ipv4_neigh_default_gc_thresh1 = net_ipv4_neigh_default_gc_thresh1 + self.net_ipv4_neigh_default_gc_thresh2 = net_ipv4_neigh_default_gc_thresh2 + self.net_ipv4_neigh_default_gc_thresh3 = net_ipv4_neigh_default_gc_thresh3 + self.net_netfilter_nf_conntrack_max = net_netfilter_nf_conntrack_max + self.net_netfilter_nf_conntrack_buckets = net_netfilter_nf_conntrack_buckets + self.fs_inotify_max_user_watches = fs_inotify_max_user_watches + self.fs_file_max = fs_file_max + self.fs_aio_max_nr = fs_aio_max_nr + self.fs_nr_open = fs_nr_open + self.kernel_threads_max = kernel_threads_max + self.vm_max_map_count = vm_max_map_count + self.vm_swappiness = vm_swappiness + self.vm_vfs_cache_pressure = vm_vfs_cache_pressure + + +class SystemData(msrest.serialization.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.containerservice.v2021_09_01.models.CreatedByType + :param created_at: The UTC timestamp of resource creation. + :type created_at: ~datetime.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.containerservice.v2021_09_01.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = tags + + +class TimeInWeek(msrest.serialization.Model): + """Time in a week. + + :param day: The day of the week. Possible values include: "Sunday", "Monday", "Tuesday", + "Wednesday", "Thursday", "Friday", "Saturday". + :type day: str or ~azure.mgmt.containerservice.v2021_09_01.models.WeekDay + :param hour_slots: Each integer hour represents a time range beginning at 0m after the hour + ending at the next hour (non-inclusive). 0 corresponds to 00:00 UTC, 23 corresponds to 23:00 + UTC. Specifying [0, 1] means the 00:00 - 02:00 UTC time range. + :type hour_slots: list[int] + """ + + _attribute_map = { + 'day': {'key': 'day', 'type': 'str'}, + 'hour_slots': {'key': 'hourSlots', 'type': '[int]'}, + } + + def __init__( + self, + *, + day: Optional[Union[str, "WeekDay"]] = None, + hour_slots: Optional[List[int]] = None, + **kwargs + ): + super(TimeInWeek, self).__init__(**kwargs) + self.day = day + self.hour_slots = hour_slots + + +class TimeSpan(msrest.serialization.Model): + """For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + + :param start: The start of a time span. + :type start: ~datetime.datetime + :param end: The end of a time span. + :type end: ~datetime.datetime + """ + + _attribute_map = { + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + start: Optional[datetime.datetime] = None, + end: Optional[datetime.datetime] = None, + **kwargs + ): + super(TimeSpan, self).__init__(**kwargs) + self.start = start + self.end = end + + +class WindowsGmsaProfile(msrest.serialization.Model): + """Windows gMSA Profile in the managed cluster. + + :param enabled: Specifies whether to enable Windows gMSA in the managed cluster. + :type enabled: bool + :param dns_server: Specifies the DNS server for Windows gMSA. :code:`
`:code:`
` Set it + to empty if you have configured the DNS server in the vnet which is used to create the managed + cluster. + :type dns_server: str + :param root_domain_name: Specifies the root domain name for Windows gMSA. + :code:`
`:code:`
` Set it to empty if you have configured the DNS server in the vnet + which is used to create the managed cluster. + :type root_domain_name: str + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'dns_server': {'key': 'dnsServer', 'type': 'str'}, + 'root_domain_name': {'key': 'rootDomainName', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + dns_server: Optional[str] = None, + root_domain_name: Optional[str] = None, + **kwargs + ): + super(WindowsGmsaProfile, self).__init__(**kwargs) + self.enabled = enabled + self.dns_server = dns_server + self.root_domain_name = root_domain_name diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/__init__.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/__init__.py new file mode 100644 index 000000000000..5e1e5e72fa59 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/__init__.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._managed_clusters_operations import ManagedClustersOperations +from ._maintenance_configurations_operations import MaintenanceConfigurationsOperations +from ._agent_pools_operations import AgentPoolsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._resolve_private_link_service_id_operations import ResolvePrivateLinkServiceIdOperations +from ._snapshots_operations import SnapshotsOperations + +__all__ = [ + 'Operations', + 'ManagedClustersOperations', + 'MaintenanceConfigurationsOperations', + 'AgentPoolsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'ResolvePrivateLinkServiceIdOperations', + 'SnapshotsOperations', +] diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topic_event_subscriptions_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_agent_pools_operations.py similarity index 60% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topic_event_subscriptions_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_agent_pools_operations.py index 1f95fc78da58..8cc145aede38 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topic_event_subscriptions_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_agent_pools_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class PartnerTopicEventSubscriptionsOperations(object): - """PartnerTopicEventSubscriptionsOperations operations. +class AgentPoolsOperations(object): + """AgentPoolsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~azure.mgmt.containerservice.v2021_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,45 +47,121 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def list( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AgentPoolListResult"] + """Gets a list of agent pools in the specified managed cluster. + + Gets a list of agent pools in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AgentPoolListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AgentPoolListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools'} # type: ignore + def get( self, resource_group_name, # type: str - partner_topic_name, # type: str - event_subscription_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.EventSubscription" - """Get an event subscription of a partner topic. + # type: (...) -> "_models.AgentPool" + """Gets the specified managed cluster agent pool. - Get an event subscription of a partner topic. + Gets the specified managed cluster agent pool. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be found. Event subscription - names must be between 3 and 100 characters in length and use alphanumeric letters only. - :type event_subscription_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventSubscription, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventSubscription + :return: AgentPool, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPool :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -105,29 +181,29 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('EventSubscription', pipeline_response) + deserialized = self._deserialize('AgentPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - partner_topic_name, # type: str - event_subscription_name, # type: str - event_subscription_info, # type: "_models.EventSubscription" + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" **kwargs # type: Any ): - # type: (...) -> "_models.EventSubscription" - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] + # type: (...) -> "_models.AgentPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -135,9 +211,9 @@ def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -151,61 +227,61 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(event_subscription_info, 'EventSubscription') + body_content = self._serialize.body(parameters, 'AgentPool') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('EventSubscription', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('AgentPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AgentPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - partner_topic_name, # type: str - event_subscription_name, # type: str - event_subscription_info, # type: "_models.EventSubscription" + resource_name, # type: str + agent_pool_name, # type: str + parameters, # type: "_models.AgentPool" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.EventSubscription"] - """Create or update an event subscription of a partner topic. + # type: (...) -> LROPoller["_models.AgentPool"] + """Creates or updates an agent pool in the specified managed cluster. - Asynchronously creates or updates an event subscription of a partner topic with the specified - parameters. Existing event subscriptions will be updated with this API. + Creates or updates an agent pool in the specified managed cluster. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str - :param event_subscription_info: Event subscription properties containing the destination and - filter information. - :type event_subscription_info: ~azure.mgmt.eventgrid.models.EventSubscription + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :param parameters: The agent pool to create or update. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either EventSubscription or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] + :return: An instance of LROPoller that returns either AgentPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_09_01.models.AgentPool] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -214,9 +290,9 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - partner_topic_name=partner_topic_name, - event_subscription_name=event_subscription_name, - event_subscription_info=event_subscription_info, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -225,7 +301,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EventSubscription', pipeline_response) + deserialized = self._deserialize('AgentPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -233,9 +309,9 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -250,13 +326,13 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def _delete_initial( self, resource_group_name, # type: str - partner_topic_name, # type: str - event_subscription_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -265,15 +341,16 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -283,40 +360,39 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - partner_topic_name, # type: str - event_subscription_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Delete an event subscription of a partner topic. + """Deletes an agent pool in the specified managed cluster. - Delete an event subscription of a partner topic. + Deletes an agent pool in the specified managed cluster. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -337,8 +413,8 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - partner_topic_name=partner_topic_name, - event_subscription_name=event_subscription_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, cls=lambda x,y,z: x, **kwargs ) @@ -352,9 +428,9 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -369,33 +445,46 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}'} # type: ignore - def _update_initial( + def get_upgrade_profile( self, resource_group_name, # type: str - partner_topic_name, # type: str - event_subscription_name, # type: str - event_subscription_update_parameters, # type: "_models.EventSubscriptionUpdateParameters" + resource_name, # type: str + agent_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.EventSubscription" - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] + # type: (...) -> "_models.AgentPoolUpgradeProfile" + """Gets the upgrade profile for an agent pool. + + Gets the upgrade profile for an agent pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AgentPoolUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolUpgradeProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolUpgradeProfile"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - content_type = kwargs.pop("content_type", "application/json") + api_version = "2021-09-01" accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -405,149 +494,60 @@ def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(event_subscription_update_parameters, 'EventSubscriptionUpdateParameters') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('EventSubscription', pipeline_response) + deserialized = self._deserialize('AgentPoolUpgradeProfile', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore - - def begin_update( - self, - resource_group_name, # type: str - partner_topic_name, # type: str - event_subscription_name, # type: str - event_subscription_update_parameters, # type: "_models.EventSubscriptionUpdateParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.EventSubscription"] - """Update event subscription of a partner topic. - - Update event subscription of a partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str - :param event_subscription_update_parameters: Updated event subscription information. - :type event_subscription_update_parameters: ~azure.mgmt.eventgrid.models.EventSubscriptionUpdateParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either EventSubscription or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventgrid.models.EventSubscription] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscription"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - partner_topic_name=partner_topic_name, - event_subscription_name=event_subscription_name, - event_subscription_update_parameters=event_subscription_update_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EventSubscription', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}'} # type: ignore + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default'} # type: ignore - def get_full_url( + def get_available_agent_pool_versions( self, resource_group_name, # type: str - partner_topic_name, # type: str - event_subscription_name, # type: str + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.EventSubscriptionFullUrl" - """Get full URL of an event subscription of a partner topic. + # type: (...) -> "_models.AgentPoolAvailableVersions" + """Gets a list of supported Kubernetes versions for the specified agent pool. - Get the full endpoint URL for an event subscription of a partner topic. + See `supported Kubernetes versions + `_ for more details about + the version lifecycle. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventSubscriptionFullUrl, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventSubscriptionFullUrl + :return: AgentPoolAvailableVersions, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.AgentPoolAvailableVersions :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionFullUrl"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPoolAvailableVersions"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" accept = "application/json" # Construct URL - url = self.get_full_url.metadata['url'] # type: ignore + url = self.get_available_agent_pool_versions.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -559,7 +559,7 @@ def get_full_url( header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -567,148 +567,37 @@ def get_full_url( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('EventSubscriptionFullUrl', pipeline_response) + deserialized = self._deserialize('AgentPoolAvailableVersions', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_full_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getFullUrl'} # type: ignore - - def list_by_partner_topic( - self, - resource_group_name, # type: str - partner_topic_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.EventSubscriptionsListResult"] - """List event subscriptions of a partner topic. - - List event subscriptions that belong to a specific partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EventSubscriptionsListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventSubscriptionsListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventSubscriptionsListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_partner_topic.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('EventSubscriptionsListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_partner_topic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions'} # type: ignore + get_available_agent_pool_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/availableAgentPoolVersions'} # type: ignore - def get_delivery_attributes( + def _upgrade_node_image_version_initial( self, resource_group_name, # type: str - partner_topic_name, # type: str - event_subscription_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.DeliveryAttributeListResult" - """Get delivery attributes for an event subscription of a partner topic. - - Get all delivery attributes for an event subscription of a partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param event_subscription_name: Name of the event subscription to be created. Event - subscription names must be between 3 and 100 characters in length and use alphanumeric letters - only. - :type event_subscription_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: DeliveryAttributeListResult, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.DeliveryAttributeListResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DeliveryAttributeListResult"] + # type: (...) -> Optional["_models.AgentPool"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AgentPool"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-01" accept = "application/json" # Construct URL - url = self.get_delivery_attributes.metadata['url'] # type: ignore + url = self._upgrade_node_image_version_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - 'eventSubscriptionName': self._serialize.url("event_subscription_name", event_subscription_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -724,14 +613,93 @@ def get_delivery_attributes( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DeliveryAttributeListResult', pipeline_response) + deserialized = None + if response.status_code == 202: + deserialized = self._deserialize('AgentPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_delivery_attributes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/eventSubscriptions/{eventSubscriptionName}/getDeliveryAttributes'} # type: ignore + _upgrade_node_image_version_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore + + def begin_upgrade_node_image_version( + self, + resource_group_name, # type: str + resource_name, # type: str + agent_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.AgentPool"] + """Upgrades the node image version of an agent pool to the latest. + + Upgrading the node image version of an agent pool applies the newest OS and runtime updates to + the nodes. AKS provides one new image per week with the latest updates. For more details on + node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param agent_pool_name: The name of the agent pool. + :type agent_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AgentPool"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_node_image_version_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + agent_pool_name=agent_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('AgentPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'agentPoolName': self._serialize.url("agent_pool_name", agent_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade_node_image_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeNodeImageVersion'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_maintenance_configurations_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_maintenance_configurations_operations.py new file mode 100644 index 000000000000..f62449aaffeb --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_maintenance_configurations_operations.py @@ -0,0 +1,323 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class MaintenanceConfigurationsOperations(object): + """MaintenanceConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_managed_cluster( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MaintenanceConfigurationListResult"] + """Gets a list of maintenance configurations in the specified managed cluster. + + Gets a list of maintenance configurations in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MaintenanceConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_managed_cluster.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('MaintenanceConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_managed_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" + """Gets the specified maintenance configuration of a managed cluster. + + Gets the specified maintenance configuration of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + parameters, # type: "_models.MaintenanceConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.MaintenanceConfiguration" + """Creates or updates a maintenance configuration in the specified managed cluster. + + Creates or updates a maintenance configuration in the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :param parameters: The maintenance configuration to create or update. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MaintenanceConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.MaintenanceConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MaintenanceConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'MaintenanceConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MaintenanceConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + resource_name, # type: str + config_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a maintenance configuration. + + Deletes a maintenance configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param config_name: The name of the maintenance configuration. + :type config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'configName': self._serialize.url("config_name", config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_watchers_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_managed_clusters_operations.py similarity index 57% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_watchers_operations.py rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_managed_clusters_operations.py index 99b1b37a541d..34574646e0e9 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_watchers_operations.py +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_managed_clusters_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class NetworkWatchersOperations(object): - """NetworkWatchersOperations operations. +class ManagedClustersOperations(object): + """ManagedClustersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.containerservice.v2021_09_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,109 +47,244 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def create_or_update( + def get_os_options( self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.NetworkWatcher" + location, # type: str + resource_type=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "_models.NetworkWatcher" - """Creates or updates a network watcher in the specified resource group. + # type: (...) -> "_models.OSOptionProfile" + """Gets supported OS options in the specified subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the network watcher resource. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.NetworkWatcher + Gets supported OS options in the specified subscription. + + :param location: The name of a supported Azure region. + :type location: str + :param resource_type: The resource type for which the OS options needs to be returned. + :type resource_type: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkWatcher + :return: OSOptionProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.OSOptionProfile :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OSOptionProfile"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.get_os_options.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if resource_type is not None: + query_parameters['resource-type'] = self._serialize.query("resource_type", resource_type, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkWatcher') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('NetworkWatcher', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('NetworkWatcher', pipeline_response) + deserialized = self._deserialize('OSOptionProfile', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore + get_os_options.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default'} # type: ignore - def get( + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Gets a list of managed clusters in the specified subscription. + + Gets a list of managed clusters in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedClusterListResult"] + """Lists managed clusters in the specified subscription and resource group. + + Lists managed clusters in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters'} # type: ignore + + def get_upgrade_profile( self, resource_group_name, # type: str - network_watcher_name, # type: str + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.NetworkWatcher" - """Gets the specified network watcher by resource group. + # type: (...) -> "_models.ManagedClusterUpgradeProfile" + """Gets the upgrade profile of a managed cluster. + + Gets the upgrade profile of a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkWatcher + :return: ManagedClusterUpgradeProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterUpgradeProfile :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterUpgradeProfile"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get_upgrade_profile.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -169,34 +304,55 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkWatcher', pipeline_response) + deserialized = self._deserialize('ManagedClusterUpgradeProfile', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore + get_upgrade_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default'} # type: ignore - def _delete_initial( + def get_access_profile( self, resource_group_name, # type: str - network_watcher_name, # type: str + resource_name, # type: str + role_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.ManagedClusterAccessProfile" + """Gets an access profile of a managed cluster. + + **WARNING**\ : This API will be deprecated. Instead use `ListClusterUserCredentials + `_ or + `ListClusterAdminCredentials + `_ . + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param role_name: The name of the role for managed cluster accessProfile resource. + :type role_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedClusterAccessProfile, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAccessProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedClusterAccessProfile"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get_access_profile.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'roleName': self._serialize.url("role_name", role_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -206,137 +362,75 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('ManagedClusterAccessProfile', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore + return deserialized + get_access_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/accessProfiles/{roleName}/listCredential'} # type: ignore - def begin_delete( + def list_cluster_admin_credentials( self, resource_group_name, # type: str - network_watcher_name, # type: str + resource_name, # type: str + server_fqdn=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified network watcher resource. + # type: (...) -> "_models.CredentialResults" + """Lists the admin credentials of a managed cluster. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - def update_tags( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkWatcher" - """Updates a network watcher tags. + Lists the admin credentials of a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters supplied to update network watcher tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkWatcher + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.CredentialResults :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self.update_tags.metadata['url'] # type: ignore + url = self.list_cluster_admin_credentials.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -344,188 +438,180 @@ def update_tags( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkWatcher', pipeline_response) + deserialized = self._deserialize('CredentialResults', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore + list_cluster_admin_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterAdminCredential'} # type: ignore - def list( + def list_cluster_user_credentials( self, resource_group_name, # type: str + resource_name, # type: str + server_fqdn=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkWatcherListResult"] - """Gets all network watchers by resource group. + # type: (...) -> "_models.CredentialResults" + """Lists the user credentials of a managed cluster. + + Lists the user credentials of a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkWatcherListResult] + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.CredentialResults :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.list_cluster_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkWatcherListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('CredentialResults', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers'} # type: ignore + return deserialized + list_cluster_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterUserCredential'} # type: ignore - def list_all( + def list_cluster_monitoring_user_credentials( self, + resource_group_name, # type: str + resource_name, # type: str + server_fqdn=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkWatcherListResult"] - """Gets all network watchers by subscription. + # type: (...) -> "_models.CredentialResults" + """Lists the cluster monitoring user credentials of a managed cluster. + Lists the cluster monitoring user credentials of a managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param server_fqdn: server fqdn type for credentials to be returned. + :type server_fqdn: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkWatcherListResult] + :return: CredentialResults, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.CredentialResults :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.list_cluster_monitoring_user_credentials.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if server_fqdn is not None: + query_parameters['server-fqdn'] = self._serialize.query("server_fqdn", server_fqdn, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkWatcherListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('CredentialResults', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers'} # type: ignore + return deserialized + list_cluster_monitoring_user_credentials.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/listClusterMonitoringUserCredential'} # type: ignore - def get_topology( + def get( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.TopologyParameters" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.Topology" - """Gets the current network topology by resource group. + # type: (...) -> "_models.ManagedCluster" + """Gets a managed cluster. + + Gets a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the representation of topology. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TopologyParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Topology, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.Topology + :return: ManagedCluster, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Topology"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self.get_topology.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -535,13 +621,9 @@ def get_topology( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TopologyParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -549,37 +631,37 @@ def get_topology( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Topology', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_topology.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def _verify_ip_flow_initial( + def _create_or_update_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.VerificationIPFlowParameters" + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" **kwargs # type: Any ): - # type: (...) -> "_models.VerificationIPFlowResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._verify_ip_flow_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -593,65 +675,67 @@ def _verify_ip_flow_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VerificationIPFlowParameters') + body_content = self._serialize.body(parameters, 'ManagedCluster') body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) - if response.status_code == 202: - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + if response.status_code == 201: + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _verify_ip_flow_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def begin_verify_ip_flow( + def begin_create_or_update( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.VerificationIPFlowParameters" + resource_name, # type: str + parameters, # type: "_models.ManagedCluster" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VerificationIPFlowResult"] - """Verify IP flow from the specified VM to a location given the currently configured NSG rules. + # type: (...) -> LROPoller["_models.ManagedCluster"] + """Creates or updates a managed cluster. + + Creates or updates a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the IP flow to be verified. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VerificationIPFlowParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: The managed cluster to create or update. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VerificationIPFlowResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.VerificationIPFlowResult] + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._verify_ip_flow_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -661,16 +745,16 @@ def begin_verify_ip_flow( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -685,31 +769,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_verify_ip_flow.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def _get_next_hop_initial( + def _update_tags_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.NextHopParameters" + resource_name, # type: str + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.NextHopResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] + # type: (...) -> "_models.ManagedCluster" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._get_next_hop_initial.metadata['url'] # type: ignore + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -723,65 +807,63 @@ def _get_next_hop_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NextHopParameters') + body_content = self._serialize.body(parameters, 'TagsObject') body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('NextHopResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('NextHopResult', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_next_hop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def begin_get_next_hop( + def begin_update_tags( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.NextHopParameters" + resource_name, # type: str + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.NextHopResult"] - """Gets the next hop from the specified VM. + # type: (...) -> LROPoller["_models.ManagedCluster"] + """Updates tags on a managed cluster. + + Updates tags on a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the source and destination endpoint. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.NextHopParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update Managed Cluster Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NextHopResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.NextHopResult] + :return: An instance of LROPoller that returns either ManagedCluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_09_01.models.ManagedCluster] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedCluster"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_next_hop_initial( + raw_result = self._update_tags_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -791,16 +873,16 @@ def begin_get_next_hop( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NextHopResult', pipeline_response) + deserialized = self._deserialize('ManagedCluster', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -815,31 +897,29 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_next_hop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop'} # type: ignore + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def _get_vm_security_rules_initial( + def _delete_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.SecurityGroupViewParameters" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.SecurityGroupViewResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._get_vm_security_rules_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -849,70 +929,57 @@ def _get_vm_security_rules_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SecurityGroupViewParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_vm_security_rules_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def begin_get_vm_security_rules( + def begin_delete( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.SecurityGroupViewParameters" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.SecurityGroupViewResult"] - """Gets the configured and effective security group rules on the specified VM. + # type: (...) -> LROPoller[None] + """Deletes a managed cluster. + + Deletes a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the VM to check security groups for. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.SecurityGroupViewParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either SecurityGroupViewResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.SecurityGroupViewResult] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_vm_security_rules_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, cls=lambda x,y,z: x, **kwargs ) @@ -921,16 +988,13 @@ def begin_get_vm_security_rules( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -945,31 +1009,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_vm_security_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}'} # type: ignore - def _get_troubleshooting_initial( + def _reset_service_principal_profile_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.TroubleshootingParameters" + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" **kwargs # type: Any ): - # type: (...) -> "_models.TroubleshootingResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._get_troubleshooting_initial.metadata['url'] # type: ignore + url = self._reset_service_principal_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -983,7 +1047,7 @@ def _get_troubleshooting_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TroubleshootingParameters') + body_content = self._serialize.body(parameters, 'ManagedClusterServicePrincipalProfile') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -993,55 +1057,50 @@ def _get_troubleshooting_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_troubleshooting_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot'} # type: ignore + _reset_service_principal_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore - def begin_get_troubleshooting( + def begin_reset_service_principal_profile( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.TroubleshootingParameters" + resource_name, # type: str + parameters, # type: "_models.ManagedClusterServicePrincipalProfile" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.TroubleshootingResult"] - """Initiate troubleshooting on a specified resource. + # type: (...) -> LROPoller[None] + """Reset the Service Principal Profile of a managed cluster. + + This action cannot be performed on a cluster that is not using a service principal. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the resource to troubleshoot. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TroubleshootingParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: The service principal profile to set on the managed cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterServicePrincipalProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.TroubleshootingResult] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_troubleshooting_initial( + raw_result = self._reset_service_principal_profile_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -1051,16 +1110,13 @@ def begin_get_troubleshooting( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1075,31 +1131,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_troubleshooting.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot'} # type: ignore + begin_reset_service_principal_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetServicePrincipalProfile'} # type: ignore - def _get_troubleshooting_result_initial( + def _reset_aad_profile_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.QueryTroubleshootingParameters" + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" **kwargs # type: Any ): - # type: (...) -> "_models.TroubleshootingResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._get_troubleshooting_result_initial.metadata['url'] # type: ignore + url = self._reset_aad_profile_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1113,7 +1169,7 @@ def _get_troubleshooting_result_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'QueryTroubleshootingParameters') + body_content = self._serialize.body(parameters, 'ManagedClusterAADProfile') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1123,55 +1179,50 @@ def _get_troubleshooting_result_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_troubleshooting_result_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult'} # type: ignore + _reset_aad_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore - def begin_get_troubleshooting_result( + def begin_reset_aad_profile( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.QueryTroubleshootingParameters" + resource_name, # type: str + parameters, # type: "_models.ManagedClusterAADProfile" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.TroubleshootingResult"] - """Get the last completed troubleshooting result on a specified resource. + # type: (...) -> LROPoller[None] + """Reset the AAD Profile of a managed cluster. + + Reset the AAD Profile of a managed cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the resource to query the troubleshooting result. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.QueryTroubleshootingParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: The AAD profile to set on the Managed Cluster. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.ManagedClusterAADProfile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.TroubleshootingResult] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_troubleshooting_result_initial( + raw_result = self._reset_aad_profile_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -1181,16 +1232,13 @@ def begin_get_troubleshooting_result( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1205,31 +1253,29 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_troubleshooting_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult'} # type: ignore + begin_reset_aad_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resetAADProfile'} # type: ignore - def _set_flow_log_configuration_initial( + def _rotate_cluster_certificates_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.FlowLogInformation" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.FlowLogInformation" - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._set_flow_log_configuration_initial.metadata['url'] # type: ignore + url = self._rotate_cluster_certificates_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1239,70 +1285,58 @@ def _set_flow_log_configuration_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FlowLogInformation') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _set_flow_log_configuration_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog'} # type: ignore + _rotate_cluster_certificates_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore - def begin_set_flow_log_configuration( + def begin_rotate_cluster_certificates( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.FlowLogInformation" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.FlowLogInformation"] - """Configures flow log on a specified resource. + # type: (...) -> LROPoller[None] + """Rotates the certificates of a managed cluster. - :param resource_group_name: The name of the network watcher resource group. + See `Certificate rotation `_ for + more details about rotating managed cluster certificates. + + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the configuration of flow log. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.FlowLogInformation + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.FlowLogInformation] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._set_flow_log_configuration_initial( + raw_result = self._rotate_cluster_certificates_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, cls=lambda x,y,z: x, **kwargs ) @@ -1311,16 +1345,13 @@ def begin_set_flow_log_configuration( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1335,31 +1366,29 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_flow_log_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog'} # type: ignore + begin_rotate_cluster_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'} # type: ignore - def _get_flow_log_status_initial( + def _stop_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.FlowLogStatusParameters" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.FlowLogInformation" - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._get_flow_log_status_initial.metadata['url'] # type: ignore + url = self._stop_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1369,70 +1398,61 @@ def _get_flow_log_status_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FlowLogStatusParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_flow_log_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus'} # type: ignore + _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore - def begin_get_flow_log_status( + def begin_stop( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.FlowLogStatusParameters" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.FlowLogInformation"] - """Queries status of flow log on a specified resource. + # type: (...) -> LROPoller[None] + """Stops a Managed Cluster. - :param resource_group_name: The name of the network watcher resource group. + This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a + cluster stops the control plane and agent nodes entirely, while maintaining all object and + cluster state. A cluster does not accrue charges while it is stopped. See `stopping a cluster + `_ for more details about stopping a + cluster. + + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define a resource to query flow log status. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.FlowLogStatusParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.FlowLogInformation] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_flow_log_status_initial( + raw_result = self._stop_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, cls=lambda x,y,z: x, **kwargs ) @@ -1441,16 +1461,13 @@ def begin_get_flow_log_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1465,31 +1482,29 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_flow_log_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus'} # type: ignore + begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'} # type: ignore - def _check_connectivity_initial( + def _start_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.ConnectivityParameters" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ConnectivityInformation" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._check_connectivity_initial.metadata['url'] # type: ignore + url = self._start_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1499,71 +1514,58 @@ def _check_connectivity_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectivityParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _check_connectivity_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck'} # type: ignore + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore - def begin_check_connectivity( + def begin_start( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.ConnectivityParameters" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ConnectivityInformation"] - """Verifies the possibility of establishing a direct TCP connection from a virtual machine to a - given endpoint including another VM or an arbitrary remote server. + # type: (...) -> LROPoller[None] + """Starts a previously stopped Managed Cluster. - :param resource_group_name: The name of the network watcher resource group. + See `starting a cluster `_ for more + details about starting a cluster. + + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that determine how the connectivity check will be performed. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ConnectivityParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ConnectivityInformation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectivityInformation] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._check_connectivity_initial( + raw_result = self._start_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, cls=lambda x,y,z: x, **kwargs ) @@ -1572,16 +1574,13 @@ def begin_check_connectivity( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1596,31 +1595,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_check_connectivity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck'} # type: ignore + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'} # type: ignore - def _get_azure_reachability_report_initial( + def _run_command_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.AzureReachabilityReportParameters" + resource_name, # type: str + request_payload, # type: "_models.RunCommandRequest" **kwargs # type: Any ): - # type: (...) -> "_models.AzureReachabilityReport" - cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureReachabilityReport"] + # type: (...) -> Optional["_models.RunCommandResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-09-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._get_azure_reachability_report_initial.metadata['url'] # type: ignore + url = self._run_command_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -1634,7 +1633,7 @@ def _get_azure_reachability_report_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AzureReachabilityReportParameters') + body_content = self._serialize.body(request_payload, 'RunCommandRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -1644,57 +1643,58 @@ def _get_azure_reachability_report_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_azure_reachability_report_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport'} # type: ignore + _run_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore - def begin_get_azure_reachability_report( + def begin_run_command( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.AzureReachabilityReportParameters" + resource_name, # type: str + request_payload, # type: "_models.RunCommandRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.AzureReachabilityReport"] - """Gets the relative latency score for internet service providers from a specified location to - Azure regions. + # type: (...) -> LROPoller["_models.RunCommandResult"] + """Submits a command to run against the Managed Cluster. + + AKS will create a pod to run the command. This is primarily useful for private clusters. For + more information see `AKS Run Command + `_. - :param resource_group_name: The name of the network watcher resource group. + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that determine Azure reachability report configuration. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param request_payload: The run command request. + :type request_payload: ~azure.mgmt.containerservice.v2021_09_01.models.RunCommandRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either AzureReachabilityReport or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReport] + :return: An instance of LROPoller that returns either RunCommandResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.containerservice.v2021_09_01.models.RunCommandResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureReachabilityReport"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RunCommandResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_azure_reachability_report_initial( + raw_result = self._run_command_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, + resource_name=resource_name, + request_payload=request_payload, cls=lambda x,y,z: x, **kwargs ) @@ -1703,16 +1703,16 @@ def begin_get_azure_reachability_report( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -1727,31 +1727,46 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_azure_reachability_report.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/azureReachabilityReport'} # type: ignore + begin_run_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'} # type: ignore - def _list_available_providers_initial( + def get_command_result( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.AvailableProvidersListParameters" + resource_name, # type: str + command_id, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.AvailableProvidersList" - cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableProvidersList"] + # type: (...) -> Optional["_models.RunCommandResult"] + """Gets the results of a command which has been run on the Managed Cluster. + + Gets the results of a command which has been run on the Managed Cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param command_id: Id of the command. + :type command_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RunCommandResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.RunCommandResult or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.RunCommandResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-09-01" + accept = "application/json" # Construct URL - url = self._list_available_providers_initial.metadata['url'] # type: ignore + url = self.get_command_result.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'commandId': self._serialize.url("command_id", command_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1761,13 +1776,9 @@ def _list_available_providers_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'AvailableProvidersListParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -1775,86 +1786,90 @@ def _list_available_providers_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None if response.status_code == 200: - deserialized = self._deserialize('AvailableProvidersList', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + deserialized = self._deserialize('RunCommandResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_available_providers_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList'} # type: ignore + get_command_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}'} # type: ignore - def begin_list_available_providers( + def list_outbound_network_dependencies_endpoints( self, resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.AvailableProvidersListParameters" + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.AvailableProvidersList"] - """Lists all available internet service providers for a specified Azure region. + # type: (...) -> Iterable["_models.OutboundEnvironmentEndpointCollection"] + """Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster. - :param resource_group_name: The name of the network watcher resource group. + Gets a list of egress endpoints (network endpoints of all outbound dependencies) in the + specified managed cluster. The operation returns properties of each egress endpoint. + + :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that scope the list of available providers. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.AvailableProvidersListParameters + :param resource_name: The name of the managed cluster resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either AvailableProvidersList or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.AvailableProvidersList] - :raises ~azure.core.exceptions.HttpResponseError: + :return: An iterator like instance of either OutboundEnvironmentEndpointCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.OutboundEnvironmentEndpointCollection] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableProvidersList"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._list_available_providers_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('AvailableProvidersList', pipeline_response) + if not next_link: + # Construct URL + url = self.list_outbound_network_dependencies_endpoints.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + def extract_data(pipeline_response): + deserialized = self._deserialize('OutboundEnvironmentEndpointCollection', pipeline_response) + list_of_elem = deserialized.value if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } + def get_next(next_link=None): + request = prepare_request(next_link) - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_available_providers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList'} # type: ignore + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_outbound_network_dependencies_endpoints.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_operations.py new file mode 100644 index 000000000000..f481df36ed74 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] + """Gets a list of operations. + + Gets a list of operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.ContainerService/operations'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_endpoint_connections_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..95e3d4391c38 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,367 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionListResult" + """Gets a list of private endpoint connections in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Gets the specified private endpoint connection. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Updates a private endpoint connection. + + Updates a private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :param parameters: The updated private endpoint connection. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + resource_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a private endpoint connection. + + Deletes a private endpoint connection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_link_resources_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..ec68817b4032 --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_private_link_resources_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesListResult" + """Gets a list of private link resources in the specified managed cluster. + + To learn more about private clusters, see: + https://docs.microsoft.com/azure/aks/private-clusters. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/privateLinkResources'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_resolve_private_link_service_id_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_resolve_private_link_service_id_operations.py new file mode 100644 index 000000000000..fb9cb7ac655f --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_resolve_private_link_service_id_operations.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ResolvePrivateLinkServiceIdOperations(object): + """ResolvePrivateLinkServiceIdOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def post( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.PrivateLinkResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResource" + """Gets the private link service ID for the specified managed cluster. + + Gets the private link service ID for the specified managed cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters required in order to resolve a private link service ID. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateLinkResource') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/resolvePrivateLinkServiceId'} # type: ignore diff --git a/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_snapshots_operations.py b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_snapshots_operations.py new file mode 100644 index 000000000000..a3a75a2347db --- /dev/null +++ b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/operations/_snapshots_operations.py @@ -0,0 +1,449 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SnapshotsOperations(object): + """SnapshotsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.containerservice.v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SnapshotListResult"] + """Gets a list of snapshots in the specified subscription. + + Gets a list of snapshots in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.SnapshotListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SnapshotListResult"] + """Lists snapshots in the specified subscription and resource group. + + Lists snapshots in the specified subscription and resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SnapshotListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.containerservice.v2021_09_01.models.SnapshotListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SnapshotListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SnapshotListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Snapshot" + """Gets a snapshot. + + Gets a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Snapshot', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.Snapshot" + **kwargs # type: Any + ): + # type: (...) -> "_models.Snapshot" + """Creates or updates a snapshot. + + Creates or updates a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: The snapshot to create or update. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Snapshot') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Snapshot', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Snapshot', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + resource_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.Snapshot" + """Updates tags on a snapshot. + + Updates tags on a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :param parameters: Parameters supplied to the Update snapshot Tags operation. + :type parameters: ~azure.mgmt.containerservice.v2021_09_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Snapshot, or the result of cls(response) + :rtype: ~azure.mgmt.containerservice.v2021_09_01.models.Snapshot + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Snapshot"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Snapshot', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a snapshot. + + Deletes a snapshot. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param resource_name: The name of the managed cluster resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/py.typed b/sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/py.typed similarity index 100% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/py.typed rename to sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2021_09_01/py.typed diff --git a/sdk/core/azure-core-tracing-opentelemetry/tests/conftest.py b/sdk/core/azure-core-tracing-opentelemetry/tests/conftest.py index 96ca61134995..663a5f2c9222 100644 --- a/sdk/core/azure-core-tracing-opentelemetry/tests/conftest.py +++ b/sdk/core/azure-core-tracing-opentelemetry/tests/conftest.py @@ -4,6 +4,7 @@ # ------------------------------------ from opentelemetry import trace from opentelemetry.sdk.trace import TracerProvider +import sys import pytest diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md index 2191df88d68a..3af33718ba50 100644 --- a/sdk/core/azure-core/CHANGELOG.md +++ b/sdk/core/azure-core/CHANGELOG.md @@ -1,19 +1,61 @@ # Release History -## 1.19.1 (Unreleased) +## 1.20.2 (Unreleased) ### Features Added ### Breaking Changes -- HttpLoggingPolicy integrates logs into one record #19925 +- Sync stream downloading now raises `azure.core.exceptions.DecodeError` rather than `requests.exceptions.ContentDecodingError` + +### Bugs Fixed + +### Other Changes + +## 1.20.1 (2021-11-08) + +### Bugs Fixed + +- Correctly set response's content to decompressed body when users are using aiohttp transport with decompression headers #21620 + +## 1.20.0 (2021-11-04) + +### Features Added + +- GA `send_request` onto the `azure.core.PipelineClient` and `azure.core.AsyncPipelineClient`. This method takes in +requests and sends them through our pipelines. +- GA `azure.core.rest`. `azure.core.rest` is our new public simple HTTP library in `azure.core` that users will use to create requests, and consume responses. +- GA errors `StreamConsumedError`, `StreamClosedError`, and `ResponseNotReadError` to `azure.core.exceptions`. These errors +are thrown if you mishandle streamed responses from the `azure.core.rest` module +- add kwargs to the methods for `iter_raw` and `iter_bytes` #21529 +- no longer raise JSON errors if users pass in file descriptors of JSON to the `json` kwarg in `HttpRequest` #21504 +- Added new error type `IncompleteReadError` which is raised if peer closes the connection before we have received the complete message body. + +### Breaking Changes + +- SansIOHTTPPolicy.on_exception returns None instead of bool. + +### Bugs Fixed + +- The `Content-Length` header in a http response is strictly checked against the actual number of bytes in the body, + rather than silently truncating data in case the underlying tcp connection is closed prematurely. + (thanks to @jochen-ott-by for the contribution) #20412 +- UnboundLocalError when SansIOHTTPPolicy handles an exception #15222 +- Add default content type header of `text/plain` and content length header for users who pass unicode strings to the `content` kwarg of `HttpRequest` in 2.7 #21550 + +## 1.19.1 (2021-11-01) ### Bugs Fixed - respect text encoding specified in argument (thanks to @ryohji for the contribution) #20796 +- Fix "coroutine x.read() was never awaited" warning from `ContentDecodePolicy` #21318 +- fix type check for `data` input to `azure.core.rest` for python 2.7 users #21341 +- use `charset_normalizer` if `chardet` is not installed to migrate aiohttp 3.8.0 changes. ### Other Changes +- Refactor AzureJSONEncoder (thanks to @Codejune for the contribution) #21028 + ## 1.19.0 (2021-09-30) ### Breaking Changes in the Provisional `azure.core.rest` package diff --git a/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md b/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md index ce1918a708fd..393c344f332f 100644 --- a/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md +++ b/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md @@ -14,7 +14,8 @@ When constructing an SDK, a developer may consume the pipeline like so: ```python from azure.core.pipeline import Pipeline -from azure.core.transport import RequestsTransport, HttpRequest +from azure.core.rest import HttpRequest +from azure.core.transport import RequestsTransport from azure.core.pipeline.policies import ( UserAgentPolicy, HeadersPolicy, @@ -193,106 +194,126 @@ proxy_policy.proxies = {'https': 'http://user:password@10.10.1.10:1180/'} ### HttpRequest and HttpResponse -The HttpRequest and HttpResponse objects represent a generic concept of HTTP request and response constructs and are in no way tied to a particular transport or HTTP library. +The `HttpRequest` and `HttpResponse` objects represent a generic concept of HTTP request and response constructs and are in no way tied to a particular transport or HTTP library. -The HttpRequest has the following API. It does not vary between transports: +The `HttpRequest` has the following API. It does not vary between transports: ```python -class HttpRequest(object): - - def __init__(self, method, url, headers=None, files=None, data=None): - self.method = method +class HttpRequest: + + def __init__( + self, + method: str, + url: str, + *, + params: Optional[ParamsType] = None, + headers: Optional[MutableMapping[str, str]] = None, + json: Any = None, + content: Optional[ContentType] = None, + data: Optional[dict] = None, + files: Optional[FilesType] = None, + **kwargs + ): self.url = url - self.headers = CaseInsensitiveDict(headers) - self.files = files - self.data = data + self.method = method + self.headers = CaseInsensitiveDict(default_headers) @property - def body(self): - return self.data - - @body.setter - def body(self, value): - self.data = value - - def format_parameters(self, params): - """Format parameters into a valid query string. - It's assumed all parameters have already been quoted as - valid URL strings.""" - - def set_xml_body(self, data): - """Set an XML element tree as the body of the request.""" - - def set_json_body(self, data): - """Set a JSON-friendly object as the body of the request.""" - - def set_multipart_body(self, data=None): - """Set form-encoded data as the body of the request. - Supported content-types are: - - application/x-www-form-urlencoded - - multipart/form-data - """ - - def set_bytes_body(self, data): - """Set generic bytes as the body of the request.""" - - def set_multipart_mixed(self, *requests, **kwargs): - """Set requests for a multipart/mixed body. - Optionally apply "policies" in kwargs to each request. - """ + def content(self) -> Any: + """Get's the request's content""" ``` -The HttpResponse object on the other hand will generally have a transport-specific derivative. -This is to accomodate how the data is extracted for the object returned by the HTTP library. -There is also an async flavor: AsyncHttpResponse. This is to allow for the asynchronous streaming of -data from the response. -For example: +`HttpResponse` on the other hand is an abstract base class that will have to be implemented +for a transport-specific derivative to accommodate how data is extracted from the object +returned by the HTTP library. + +The API for each of these response types is identical, so the consumer of the `HttpResponse` need not know about these +particular types. + +The `HttpResponse` has the following API. It does not vary between transports, and has the following surface area: ```python -from azure.core.pipeline.transport import ( - RequestsTransportResponse, # HttpResponse - AioHttpTransportResponse, # AsyncHttpResponse - TrioRequestsTransportResponse, # AsyncHttpResponse - AsyncioRequestsTransportResponse, # AsyncHttpResponse -) -``` +class HttpResponse: -The API for each of these response types is identical, so the consumer of the Response need not know about these -particular types. + @property + def request(self) -> HttpRequest: + """The request that resulted in this response.""" -The HttpResponse has the following API. It does not vary between transports: + @property + def status_code(self) -> int: + """The status code of this response.""" + + @property + def headers(self) -> MutableMapping[str, str]: + """The response headers. Must be case-insensitive.""" + + @property + def reason(self) -> str: + """The reason phrase for this response.""" + + @property + def content_type(self) -> Optional[str]: + """The content type of the response.""" + + @property + def is_closed(self) -> bool: + """Whether the network connection has been closed yet.""" + + @property + def is_stream_consumed(self) -> bool: + """Whether the stream has been consumed.""" + + @property + def encoding(self) -> Optional[str]: + """Returns the response encoding.""" + + @encoding.setter + def encoding(self, value: Optional[str]) -> None: + """Sets the response encoding.""" + + @property + def url(self) -> str: + """The URL that resulted in this response.""" + + @property + def content(self) -> bytes: + """Return the response's content in bytes.""" + + def text(self, encoding: Optional[str] = None) -> str: + """Returns the response body as a string.""" + + def json(self) -> Any: + """Returns the whole body as a json object.""" + + def raise_for_status(self) -> None: + """Raises an HttpResponseError if the response has an error status code.""" + + def read(self) -> bytes: + """Read the response's bytes.""" + + def iter_raw(self, **kwargs: Any) -> Iterator[bytes]: + """Iterates over the response's bytes. Will not decompress in the process.""" + + def iter_bytes(self, **kwargs: Any) -> Iterator[bytes]: + """Iterates over the response's bytes. Will decompress in the process.""" + +``` + +Async calls to networks will return an `AsyncHttpResponse` instead. It shares most of its properties with an `HttpResponse` with the following exceptions: ```python -class HttpResponse(object): - - def __init__(self, request, internal_response): - self.request = request - self.internal_response = internal_response # The object returned by the HTTP library - self.status_code = None - self.headers = CaseInsensitiveDict() - self.reason = None - self.content_type = None - - def body(self): - """Return the whole body as bytes in memory.""" - - def text(self, encoding=None): - """Return the whole body as a string.""" - - def stream_download(self, pipeline, **kwargs): - """Generator for streaming request body data. - Should be implemented by sub-classes if streaming download - is supported. - For the AsyncHttpResponse object this function will return - and asynchronous generator. - """ - - def parts(self): - """An iterator of parts if content-type is multipart/mixed. - For the AsyncHttpResponse object this function will return - and asynchronous iterator. - """ +class AsyncHttpResponse: + ... + + async def read(self) -> bytes: + """Read the response's bytes into memory.""" + + async def iter_raw(self, **kwargs: Any) -> AsyncIterator[bytes]: + """Asynchronously iterates over the response's bytes. Will not decompress in the process.""" + + async def iter_bytes(self, **kwargs: Any) -> AsyncIterator[bytes]: + """Asynchronously iterates over the response's bytes. Will decompress in the process.""" ``` ### PipelineRequest and PipelineResponse @@ -347,11 +368,7 @@ def on_response(self, request, response): """Is executed after the request comes back from the policy.""" def on_exception(self, request): - """Is executed if an exception is raised while executing this policy. - - Return True if the exception has been handled and should not - be forwarded to the caller. - """ + """Is executed if an exception is raised while executing this policy.""" ``` SansIOHTTPPolicy methods can be declared as coroutines, but then they can only be used with a AsyncPipeline. @@ -471,7 +488,7 @@ A pipeline can either be synchronous or asynchronous. The pipeline does not expose the policy chain, so individual policies cannot/should not be further configured once the pipeline has been instantiated. -The pipeline has a single exposed operation: `run(request)` which will send a new HttpRequest object down +The pipeline has a single exposed operation: `run(request)` which will send a new `HttpRequest` object down the pipeline. This operation returns a `PipelineResponse` object. ```python diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md index c050a432671b..ed329db48c84 100644 --- a/sdk/core/azure-core/README.md +++ b/sdk/core/azure-core/README.md @@ -116,19 +116,16 @@ class TooManyRedirectsError(HttpResponseError): *kwargs* are keyword arguments to include with the exception. -#### **Provisional** StreamConsumedError -A **provisional** error thrown if you try to access the stream of the **provisional** -responses `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once +#### StreamConsumedError +An error thrown if you try to access the stream of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once the response stream has been consumed. -#### **Provisional** StreamClosedError -A **provisional** error thrown if you try to access the stream of the **provisional** -responses `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once +#### StreamClosedError +An error thrown if you try to access the stream of the `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` once the response stream has been closed. -#### **Provisional** ResponseNotReadError -A **provisional** error thrown if you try to access the `content` of the **provisional** -responses `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before +#### ResponseNotReadError +An error thrown if you try to access the `content` of `azure.core.rest.HttpResponse` or `azure.core.rest.AsyncHttpResponse` before reading in the response's bytes first. ### Configurations diff --git a/sdk/core/azure-core/azure/core/_pipeline_client.py b/sdk/core/azure-core/azure/core/_pipeline_client.py index 727c206ccb75..632ae8cc0a6c 100644 --- a/sdk/core/azure-core/azure/core/_pipeline_client.py +++ b/sdk/core/azure-core/azure/core/_pipeline_client.py @@ -176,9 +176,7 @@ def _build_pipeline(self, config, **kwargs): # pylint: disable=no-self-use def send_request(self, request, **kwargs): # type: (HTTPRequestType, Any) -> HTTPResponseType - """**Provisional** method that runs the network request through the client's chained policies. - - This method is marked as **provisional**, meaning it may be changed in a future release. + """Method that runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest('GET', 'http://www.example.com') diff --git a/sdk/core/azure-core/azure/core/_pipeline_client_async.py b/sdk/core/azure-core/azure/core/_pipeline_client_async.py index 423d0efa45de..6876fb4553f5 100644 --- a/sdk/core/azure-core/azure/core/_pipeline_client_async.py +++ b/sdk/core/azure-core/azure/core/_pipeline_client_async.py @@ -208,9 +208,7 @@ def send_request( stream: bool = False, **kwargs: Any ) -> Awaitable[AsyncHTTPResponseType]: - """**Provisional** method that runs the network request through the client's chained policies. - - This method is marked as **provisional**, meaning it may be changed in a future release. + """Method that runs the network request through the client's chained policies. >>> from azure.core.rest import HttpRequest >>> request = HttpRequest('GET', 'http://www.example.com') diff --git a/sdk/core/azure-core/azure/core/_version.py b/sdk/core/azure-core/azure/core/_version.py index 91bcd81c2857..2046b585e32f 100644 --- a/sdk/core/azure-core/azure/core/_version.py +++ b/sdk/core/azure-core/azure/core/_version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "1.19.1" +VERSION = "1.20.2" diff --git a/sdk/core/azure-core/azure/core/exceptions.py b/sdk/core/azure-core/azure/core/exceptions.py index 59d2f4c1ff61..1c77f6693497 100644 --- a/sdk/core/azure-core/azure/core/exceptions.py +++ b/sdk/core/azure-core/azure/core/exceptions.py @@ -338,6 +338,10 @@ class DecodeError(HttpResponseError): """Error raised during response deserialization.""" +class IncompleteReadError(DecodeError): + """Error raised if peer closes the connection before we have received the complete message body.""" + + class ResourceExistsError(HttpResponseError): """An error response with status code 4xx. This will not be raised directly by the Azure core pipeline.""" @@ -438,10 +442,9 @@ def __str__(self): return super(ODataV4Error, self).__str__() class StreamConsumedError(AzureError): - """**Provisional** error thrown if you try to access the stream of a response once consumed. + """Error thrown if you try to access the stream of a response once consumed. - This error is marked as **provisional**, meaning it may be changed in a future release. It is - thrown if you try to read / stream an ~azure.core.rest.HttpResponse or + It is thrown if you try to read / stream an ~azure.core.rest.HttpResponse or ~azure.core.rest.AsyncHttpResponse once the response's stream has been consumed. """ def __init__(self, response): @@ -454,10 +457,9 @@ def __init__(self, response): super(StreamConsumedError, self).__init__(message) class StreamClosedError(AzureError): - """**Provisional** error thrown if you try to access the stream of a response once closed. + """Error thrown if you try to access the stream of a response once closed. - This error is marked as **provisional**, meaning it may be changed in a future release. It is - thrown if you try to read / stream an ~azure.core.rest.HttpResponse or + It is thrown if you try to read / stream an ~azure.core.rest.HttpResponse or ~azure.core.rest.AsyncHttpResponse once the response's stream has been closed. """ def __init__(self, response): @@ -468,10 +470,9 @@ def __init__(self, response): super(StreamClosedError, self).__init__(message) class ResponseNotReadError(AzureError): - """**Provisional** error thrown if you try to access a response's content without reading first. + """Error thrown if you try to access a response's content without reading first. - This error is marked as **provisional**, meaning it may be changed in a future release. It is - thrown if you try to access an ~azure.core.rest.HttpResponse or + It is thrown if you try to access an ~azure.core.rest.HttpResponse or ~azure.core.rest.AsyncHttpResponse's content without first reading the response's bytes in first. """ diff --git a/sdk/core/azure-core/azure/core/pipeline/_base.py b/sdk/core/azure-core/azure/core/pipeline/_base.py index b67721dec26f..91e95cedde07 100644 --- a/sdk/core/azure-core/azure/core/pipeline/_base.py +++ b/sdk/core/azure-core/azure/core/pipeline/_base.py @@ -70,8 +70,8 @@ def send(self, request): try: response = self.next.send(request) except Exception: # pylint: disable=broad-except - if not _await_result(self._policy.on_exception, request): - raise + _await_result(self._policy.on_exception, request) + raise else: _await_result(self._policy.on_response, request, response) return response diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py b/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py index 228e3fd20f58..07dd229de96d 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_authentication.py @@ -119,9 +119,8 @@ def send(self, request): response = self.next.send(request) self.on_response(request, response) except Exception: # pylint:disable=broad-except - handled = self.on_exception(request) - if not handled: - raise + self.on_exception(request) + raise else: if response.http_response.status_code == 401: self._token = None # any cached token is invalid @@ -132,9 +131,8 @@ def send(self, request): response = self.next.send(request) self.on_response(request, response) except Exception: # pylint:disable=broad-except - handled = self.on_exception(request) - if not handled: - raise + self.on_exception(request) + raise return response @@ -162,18 +160,16 @@ def on_response(self, request, response): """ def on_exception(self, request): - # type: (PipelineRequest) -> bool + # type: (PipelineRequest) -> None """Executed when an exception is raised while executing the next policy. This method is executed inside the exception handler. :param request: The Pipeline request object :type request: ~azure.core.pipeline.PipelineRequest - :return: False by default, override with True to stop the exception. - :rtype: bool """ # pylint: disable=no-self-use,unused-argument - return False + return class AzureKeyCredentialPolicy(SansIOHTTPPolicy): diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_authentication_async.py b/sdk/core/azure-core/azure/core/pipeline/policies/_authentication_async.py index 76564320b742..d6f5250d9b80 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_authentication_async.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_authentication_async.py @@ -115,18 +115,16 @@ def on_response(self, request: "PipelineRequest", response: "PipelineResponse") :type response: ~azure.core.pipeline.PipelineResponse """ - def on_exception(self, request: "PipelineRequest") -> "Union[bool, Awaitable[bool]]": + def on_exception(self, request: "PipelineRequest") -> None: """Executed when an exception is raised while executing the next policy. This method is executed inside the exception handler. :param request: The Pipeline request object :type request: ~azure.core.pipeline.PipelineRequest - :return: False by default, override with True to stop the exception. - :rtype: bool """ # pylint: disable=no-self-use,unused-argument - return False + return def _need_new_token(self) -> bool: return not self._token or self._token.expires_on - time.time() < 300 diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_base.py b/sdk/core/azure-core/azure/core/pipeline/policies/_base.py index 9dc24ad16fa0..abc63894f5ea 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_base.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_base.py @@ -109,18 +109,13 @@ def on_response(self, request, response): # pylint: disable=no-self-use def on_exception(self, request): # pylint: disable=unused-argument - # type: (PipelineRequest) -> Union[bool, Awaitable[bool]] + # type: (PipelineRequest) -> None """Is executed if an exception is raised while executing the next policy. - Developer can optionally implement this method to return True - if the exception has been handled and should not be forwarded to the caller. - This method is executed inside the exception handler. :param request: The Pipeline request object :type request: ~azure.core.pipeline.PipelineRequest - :return: False by default, override with True to stop the exception. - :rtype: bool .. admonition:: Example: @@ -130,7 +125,7 @@ def on_exception(self, request): # pylint: disable=unused-argument :language: python :dedent: 4 """ - return False + return class RequestHistory(object): diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_distributed_tracing.py b/sdk/core/azure-core/azure/core/pipeline/policies/_distributed_tracing.py index c1885be92fbc..46d9a07ba448 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_distributed_tracing.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_distributed_tracing.py @@ -127,7 +127,6 @@ def on_response(self, request, response): # type: (PipelineRequest, PipelineResponse) -> None self.end_span(request, response=response.http_response) - def on_exception(self, request): # pylint: disable=unused-argument - # type: (PipelineRequest) -> bool + def on_exception(self, request): + # type: (PipelineRequest) -> None self.end_span(request, exc_info=sys.exc_info()) - return False diff --git a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py index 178db95a7dd7..f329dc9914f2 100644 --- a/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py +++ b/sdk/core/azure-core/azure/core/pipeline/policies/_universal.py @@ -28,6 +28,7 @@ """ from __future__ import absolute_import # we have a "requests" module that conflicts with "requests" on Py2.7 import json +import inspect import logging import os import platform @@ -618,10 +619,17 @@ def deserialize_from_http_generics( # Rely on transport implementation to give me "text()" decoded correctly if hasattr(response, "read"): - # since users can call deserialize_from_http_generics by themselves - # we want to make sure our new responses are read before we try to - # deserialize - response.read() + try: + # since users can call deserialize_from_http_generics by themselves + # we want to make sure our new responses are read before we try to + # deserialize. Only read sync responses since we're in a sync function + if not inspect.iscoroutinefunction(response.read): + response.read() + except AttributeError: + # raises an AttributeError in 2.7 bc inspect.iscoroutinefunction was added in 3.5 + # Entering here means it's 2.7 and that the response has a read method, so we read + # bc it will be sync. + response.read() return cls.deserialize_from_text(response.text(encoding), mime_type, response=response) def on_request(self, request): diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py b/sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py index d8365a9a7680..c25e3d06736a 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py @@ -28,10 +28,6 @@ Any, Optional, AsyncIterator as AsyncIteratorType, TYPE_CHECKING, overload ) from collections.abc import AsyncIterator -try: - import cchardet as chardet -except ImportError: # pragma: no cover - import chardet # type: ignore import logging import asyncio @@ -40,7 +36,7 @@ from multidict import CIMultiDict from azure.core.configuration import ConnectionConfiguration -from azure.core.exceptions import ServiceRequestError, ServiceResponseError +from azure.core.exceptions import ServiceRequestError, ServiceResponseError, IncompleteReadError from azure.core.pipeline import Pipeline from ._base import HttpRequest @@ -304,6 +300,12 @@ async def __anext__(self): except _ResponseStopIteration: internal_response.close() raise StopAsyncIteration() + except aiohttp.client_exceptions.ClientPayloadError as err: + # This is the case that server closes connection before we finish the reading. aiohttp library + # raises ClientPayloadError. + _LOGGER.warning("Incomplete download: %s", err) + internal_response.close() + raise IncompleteReadError(err, error=err) except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) internal_response.close() @@ -331,7 +333,7 @@ def __init__(self, request: HttpRequest, self.reason = aiohttp_response.reason self.content_type = aiohttp_response.headers.get('content-type') self._content = None - self._decompressed_content = None + self._decompressed_content = False self._decompress = decompress def body(self) -> bytes: @@ -373,6 +375,13 @@ def text(self, encoding: Optional[str] = None) -> str: "Cannot guess the encoding of a not yet read body" ) else: + try: + import cchardet as chardet + except ImportError: # pragma: no cover + try: + import chardet # type: ignore + except ImportError: # pragma: no cover + import charset_normalizer as chardet # type: ignore[no-redef] encoding = chardet.detect(body)["encoding"] if encoding == "utf-8" or encoding is None: encoding = "utf-8-sig" @@ -381,7 +390,12 @@ def text(self, encoding: Optional[str] = None) -> str: async def load_body(self) -> None: """Load in memory the body, so it could be accessible from sync methods.""" - self._content = await self.internal_response.read() + try: + self._content = await self.internal_response.read() + except aiohttp.client_exceptions.ClientPayloadError as err: + # This is the case that server closes connection before we finish the reading. aiohttp library + # raises ClientPayloadError. + raise IncompleteReadError(err, error=err) def stream_download(self, pipeline, **kwargs) -> AsyncIteratorType[bytes]: """Generator for streaming response body data. diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_asyncio.py b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_asyncio.py index b5d61aeff474..d0adf93efca0 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_asyncio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_asyncio.py @@ -28,7 +28,7 @@ import functools import logging from typing import ( - Any, Union, Optional, AsyncIterator as AsyncIteratorType, TYPE_CHECKING, overload + Any, Optional, AsyncIterator as AsyncIteratorType, TYPE_CHECKING, overload ) import urllib3 # type: ignore @@ -36,7 +36,9 @@ from azure.core.exceptions import ( ServiceRequestError, - ServiceResponseError + ServiceResponseError, + IncompleteReadError, + HttpResponseError, ) from azure.core.pipeline import Pipeline from ._base import HttpRequest @@ -44,7 +46,7 @@ AsyncHttpResponse, _ResponseStopIteration, _iterate_response_content) -from ._requests_basic import RequestsTransportResponse, _read_raw_stream +from ._requests_basic import RequestsTransportResponse, _read_raw_stream, AzureErrorUnion from ._base_requests_async import RequestsAsyncTransportBase from .._tools import is_rest as _is_rest from .._tools_async import handle_no_stream_rest_response as _handle_no_stream_rest_response @@ -134,7 +136,7 @@ async def send(self, request, **kwargs): # pylint:disable=invalid-overridden-me self.open() loop = kwargs.get("loop", _get_running_loop()) response = None - error = None # type: Optional[Union[ServiceRequestError, ServiceResponseError]] + error = None # type: Optional[AzureErrorUnion] data_to_send = await self._retrieve_request_data(request) try: response = await loop.run_in_executor( @@ -151,6 +153,7 @@ async def send(self, request, **kwargs): # pylint:disable=invalid-overridden-me cert=kwargs.pop('connection_cert', self.connection_config.cert), allow_redirects=False, **kwargs)) + response.raw.enforce_content_length = True except urllib3.exceptions.NewConnectionError as err: error = ServiceRequestError(err, error=err) @@ -161,6 +164,14 @@ async def send(self, request, **kwargs): # pylint:disable=invalid-overridden-me error = ServiceResponseError(err, error=err) else: error = ServiceRequestError(err, error=err) + except requests.exceptions.ChunkedEncodingError as err: + msg = err.__str__() + if 'IncompleteRead' in msg: + _LOGGER.warning("Incomplete download: %s", err) + error = IncompleteReadError(err, error=err) + else: + _LOGGER.warning("Unable to stream download: %s", err) + error = HttpResponseError(err, error=err) except requests.RequestException as err: error = ServiceRequestError(err, error=err) @@ -223,6 +234,15 @@ async def __anext__(self): raise StopAsyncIteration() except requests.exceptions.StreamConsumedError: raise + except requests.exceptions.ChunkedEncodingError as err: + msg = err.__str__() + if 'IncompleteRead' in msg: + _LOGGER.warning("Incomplete download: %s", err) + internal_response.close() + raise IncompleteReadError(err, error=err) + _LOGGER.warning("Unable to stream download: %s", err) + internal_response.close() + raise HttpResponseError(err, error=err) except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) internal_response.close() diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_basic.py b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_basic.py index 728ae0ad8566..3896ad825d02 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_basic.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_basic.py @@ -29,14 +29,17 @@ import urllib3 # type: ignore from urllib3.util.retry import Retry # type: ignore from urllib3.exceptions import ( - DecodeError, ReadTimeoutError, ProtocolError + DecodeError as CoreDecodeError, ReadTimeoutError, ProtocolError ) import requests from azure.core.configuration import ConnectionConfiguration from azure.core.exceptions import ( ServiceRequestError, - ServiceResponseError + ServiceResponseError, + IncompleteReadError, + HttpResponseError, + DecodeError ) from . import HttpRequest # pylint: disable=unused-import @@ -51,6 +54,13 @@ if TYPE_CHECKING: from ...rest import HttpRequest as RestHttpRequest, HttpResponse as RestHttpResponse +AzureErrorUnion = Union[ + ServiceRequestError, + ServiceResponseError, + IncompleteReadError, + HttpResponseError, +] + PipelineType = TypeVar("PipelineType") _LOGGER = logging.getLogger(__name__) @@ -62,11 +72,11 @@ def _read_raw_stream(response, chunk_size=1): for chunk in response.raw.stream(chunk_size, decode_content=False): yield chunk except ProtocolError as e: - raise requests.exceptions.ChunkedEncodingError(e) - except DecodeError as e: - raise requests.exceptions.ContentDecodingError(e) + raise ServiceResponseError(e, error=e) + except CoreDecodeError as e: + raise DecodeError(e, error=e) except ReadTimeoutError as e: - raise requests.exceptions.ConnectionError(e) + raise ServiceRequestError(e, error=e) else: # Standard file-like object. while True: @@ -79,6 +89,7 @@ def _read_raw_stream(response, chunk_size=1): # https://github.com/psf/requests/blob/master/requests/models.py#L774 response._content_consumed = True # pylint: disable=protected-access + class _RequestsTransportResponseBase(_HttpResponseBase): """Base class for accessing response data. @@ -164,6 +175,17 @@ def __next__(self): raise StopIteration() except requests.exceptions.StreamConsumedError: raise + except requests.exceptions.ContentDecodingError as err: + raise DecodeError(err, error=err) + except requests.exceptions.ChunkedEncodingError as err: + msg = err.__str__() + if 'IncompleteRead' in msg: + _LOGGER.warning("Incomplete download: %s", err) + internal_response.close() + raise IncompleteReadError(err, error=err) + _LOGGER.warning("Unable to stream download: %s", err) + internal_response.close() + raise HttpResponseError(err, error=err) except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) internal_response.close() @@ -289,7 +311,7 @@ def send(self, request, **kwargs): # type: ignore """ self.open() response = None - error = None # type: Optional[Union[ServiceRequestError, ServiceResponseError]] + error = None # type: Optional[AzureErrorUnion] try: connection_timeout = kwargs.pop('connection_timeout', self.connection_config.timeout) @@ -313,6 +335,7 @@ def send(self, request, **kwargs): # type: ignore cert=kwargs.pop('connection_cert', self.connection_config.cert), allow_redirects=False, **kwargs) + response.raw.enforce_content_length = True except (urllib3.exceptions.NewConnectionError, urllib3.exceptions.ConnectTimeoutError) as err: error = ServiceRequestError(err, error=err) @@ -323,6 +346,14 @@ def send(self, request, **kwargs): # type: ignore error = ServiceResponseError(err, error=err) else: error = ServiceRequestError(err, error=err) + except requests.exceptions.ChunkedEncodingError as err: + msg = err.__str__() + if 'IncompleteRead' in msg: + _LOGGER.warning("Incomplete download: %s", err) + error = IncompleteReadError(err, error=err) + else: + _LOGGER.warning("Unable to stream download: %s", err) + error = HttpResponseError(err, error=err) except requests.RequestException as err: error = ServiceRequestError(err, error=err) diff --git a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_trio.py b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_trio.py index 5d2b4dfa6285..1fce4048318f 100644 --- a/sdk/core/azure-core/azure/core/pipeline/transport/_requests_trio.py +++ b/sdk/core/azure-core/azure/core/pipeline/transport/_requests_trio.py @@ -27,7 +27,7 @@ import functools import logging from typing import ( - Any, Callable, Union, Optional, AsyncIterator as AsyncIteratorType, TYPE_CHECKING, overload + Any, Optional, AsyncIterator as AsyncIteratorType, TYPE_CHECKING, overload ) import trio import urllib3 @@ -36,7 +36,9 @@ from azure.core.exceptions import ( ServiceRequestError, - ServiceResponseError + ServiceResponseError, + IncompleteReadError, + HttpResponseError, ) from azure.core.pipeline import Pipeline from ._base import HttpRequest @@ -44,7 +46,7 @@ AsyncHttpResponse, _ResponseStopIteration, _iterate_response_content) -from ._requests_basic import RequestsTransportResponse, _read_raw_stream +from ._requests_basic import RequestsTransportResponse, _read_raw_stream, AzureErrorUnion from ._base_requests_async import RequestsAsyncTransportBase from .._tools import is_rest as _is_rest from .._tools_async import handle_no_stream_rest_response as _handle_no_stream_rest_response @@ -105,6 +107,15 @@ async def __anext__(self): raise StopAsyncIteration() except requests.exceptions.StreamConsumedError: raise + except requests.exceptions.ChunkedEncodingError as err: + msg = err.__str__() + if 'IncompleteRead' in msg: + _LOGGER.warning("Incomplete download: %s", err) + internal_response.close() + raise IncompleteReadError(err, error=err) + _LOGGER.warning("Unable to stream download: %s", err) + internal_response.close() + raise HttpResponseError(err, error=err) except Exception as err: _LOGGER.warning("Unable to stream download: %s", err) internal_response.close() @@ -184,7 +195,7 @@ async def send(self, request, **kwargs: Any): # pylint:disable=invalid-overridd self.open() trio_limiter = kwargs.get("trio_limiter", None) response = None - error = None # type: Optional[Union[ServiceRequestError, ServiceResponseError]] + error = None # type: Optional[AzureErrorUnion] data_to_send = await self._retrieve_request_data(request) try: try: @@ -217,6 +228,7 @@ async def send(self, request, **kwargs: Any): # pylint:disable=invalid-overridd allow_redirects=False, **kwargs), limiter=trio_limiter) + response.raw.enforce_content_length = True except urllib3.exceptions.NewConnectionError as err: error = ServiceRequestError(err, error=err) @@ -227,6 +239,14 @@ async def send(self, request, **kwargs: Any): # pylint:disable=invalid-overridd error = ServiceResponseError(err, error=err) else: error = ServiceRequestError(err, error=err) + except requests.exceptions.ChunkedEncodingError as err: + msg = err.__str__() + if 'IncompleteRead' in msg: + _LOGGER.warning("Incomplete download: %s", err) + error = IncompleteReadError(err, error=err) + else: + _LOGGER.warning("Unable to stream download: %s", err) + error = HttpResponseError(err, error=err) except requests.RequestException as err: error = ServiceRequestError(err, error=err) diff --git a/sdk/core/azure-core/azure/core/polling/async_base_polling.py b/sdk/core/azure-core/azure/core/polling/async_base_polling.py index f8c64cd00735..eacc1b3e37aa 100644 --- a/sdk/core/azure-core/azure/core/polling/async_base_polling.py +++ b/sdk/core/azure-core/azure/core/polling/async_base_polling.py @@ -131,7 +131,6 @@ async def request_status(self, status_link): # pylint:disable=invalid-overridde # if I am a azure.core.pipeline.transport.HttpResponse request = self._client.get(status_link) - # can't use send_request in this case, because send_request is still provisional return await self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **self._operation_config ) diff --git a/sdk/core/azure-core/azure/core/polling/base_polling.py b/sdk/core/azure-core/azure/core/polling/base_polling.py index 23f3a56b196c..6b6fd4ff7c93 100644 --- a/sdk/core/azure-core/azure/core/polling/base_polling.py +++ b/sdk/core/azure-core/azure/core/polling/base_polling.py @@ -588,8 +588,6 @@ def request_status(self, status_link): ) # if I am a azure.core.pipeline.transport.HttpResponse request = self._client.get(status_link) - - # can't use send_request in this case, because send_request is still provisional return self._client._pipeline.run( # pylint: disable=protected-access request, stream=False, **self._operation_config ) diff --git a/sdk/core/azure-core/azure/core/rest/_aiohttp.py b/sdk/core/azure-core/azure/core/rest/_aiohttp.py index 363489dd11f8..dd1f034d633a 100644 --- a/sdk/core/azure-core/azure/core/rest/_aiohttp.py +++ b/sdk/core/azure-core/azure/core/rest/_aiohttp.py @@ -31,6 +31,7 @@ from ._http_response_impl_async import AsyncHttpResponseImpl, AsyncHttpResponseBackcompatMixin from ..pipeline.transport._aiohttp import AioHttpStreamDownloadGenerator from ..utils._pipeline_transport_rest_shared import _pad_attr_name, _aiohttp_body_helper +from ..exceptions import ResponseNotReadError class _ItemsView(collections.abc.ItemsView): def __init__(self, ref): @@ -162,7 +163,7 @@ def __init__( **kwargs ) self._decompress = decompress - self._decompressed_content = None + self._decompressed_content = False def __getstate__(self): state = self.__dict__.copy() @@ -171,6 +172,14 @@ def __getstate__(self): state['headers'] = CIMultiDict(self.headers) # MultiDictProxy is not pickable return state + @property + def content(self): + # type: (...) -> bytes + """Return the response's content in bytes.""" + if self._content is None: + raise ResponseNotReadError(self) + return _aiohttp_body_helper(self) + async def read(self) -> bytes: """Read the response's bytes into memory. diff --git a/sdk/core/azure-core/azure/core/rest/_helpers.py b/sdk/core/azure-core/azure/core/rest/_helpers.py index 58b544cc4f15..805a84d69617 100644 --- a/sdk/core/azure-core/azure/core/rest/_helpers.py +++ b/sdk/core/azure-core/azure/core/rest/_helpers.py @@ -82,13 +82,13 @@ ########################### HELPER SECTION ################################# def _verify_data_object(name, value): - if not isinstance(name, str): + if not isinstance(name, six.string_types): raise TypeError( "Invalid type for data name. Expected str, got {}: {}".format( type(name), name ) ) - if value is not None and not isinstance(value, (str, bytes, int, float)): + if value is not None and not isinstance(value, (six.string_types, bytes, int, float)): raise TypeError( "Invalid type for data value. Expected primitive type, got {}: {}".format( type(name), name @@ -134,7 +134,7 @@ def _shared_set_content_body(content): if isinstance(content, ET.Element): # XML body return set_xml_body(content) - if isinstance(content, (str, bytes)): + if isinstance(content, (six.string_types, bytes)): headers = {} body = content if isinstance(content, six.string_types): @@ -157,11 +157,14 @@ def set_content_body(content): def set_json_body(json): # type: (Any) -> Tuple[Dict[str, str], Any] - body = dumps(json, cls=AzureJSONEncoder) - return { - "Content-Type": "application/json", - "Content-Length": str(len(body)) - }, body + headers = {"Content-Type": "application/json"} + if hasattr(json, "read"): + content_headers, body = set_content_body(json) + headers.update(content_headers) + else: + body = dumps(json, cls=AzureJSONEncoder) + headers.update({"Content-Length": str(len(body))}) + return headers, body def lookup_encoding(encoding): # type: (str) -> bool diff --git a/sdk/core/azure-core/azure/core/rest/_http_response_impl.py b/sdk/core/azure-core/azure/core/rest/_http_response_impl.py index 44badd1eb9d6..378677b25c9b 100644 --- a/sdk/core/azure-core/azure/core/rest/_http_response_impl.py +++ b/sdk/core/azure-core/azure/core/rest/_http_response_impl.py @@ -392,8 +392,8 @@ def read(self): self._set_read_checks() return self.content - def iter_bytes(self): - # type: () -> Iterator[bytes] + def iter_bytes(self, **kwargs): + # type: (Any) -> Iterator[bytes] """Iterates over the response's bytes. Will decompress in the process. :return: An iterator of bytes from the response @@ -413,8 +413,8 @@ def iter_bytes(self): yield part self.close() - def iter_raw(self): - # type: () -> Iterator[bytes] + def iter_raw(self, **kwargs): + # type: (Any) -> Iterator[bytes] """Iterates over the response's bytes. Will not decompress in the process. :return: An iterator of bytes from the response @@ -453,10 +453,10 @@ class RestHttpClientTransportResponse(_RestHttpClientTransportResponseBase, Http """Create a Rest HTTPResponse from an http.client response. """ - def iter_bytes(self): + def iter_bytes(self, **kwargs): raise TypeError("We do not support iter_bytes for this transport response") - def iter_raw(self): + def iter_raw(self, **kwargs): raise TypeError("We do not support iter_raw for this transport response") def read(self): diff --git a/sdk/core/azure-core/azure/core/rest/_http_response_impl_async.py b/sdk/core/azure-core/azure/core/rest/_http_response_impl_async.py index 6bc93ea0b2e0..2674ba1de450 100644 --- a/sdk/core/azure-core/azure/core/rest/_http_response_impl_async.py +++ b/sdk/core/azure-core/azure/core/rest/_http_response_impl_async.py @@ -23,7 +23,7 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -from typing import AsyncIterator +from typing import Any, AsyncIterator from ._rest_py3 import AsyncHttpResponse as _AsyncHttpResponse from ._http_response_impl import ( _HttpResponseBaseImpl, _HttpResponseBackcompatMixinBase, _RestHttpClientTransportResponseBase @@ -90,7 +90,7 @@ async def read(self) -> bytes: await self._set_read_checks() return self._content - async def iter_raw(self) -> AsyncIterator[bytes]: + async def iter_raw(self, **kwargs: Any) -> AsyncIterator[bytes]: """Asynchronously iterates over the response's bytes. Will not decompress in the process :return: An async iterator of bytes from the response :rtype: AsyncIterator[bytes] @@ -102,7 +102,7 @@ async def iter_raw(self) -> AsyncIterator[bytes]: yield part await self.close() - async def iter_bytes(self) -> AsyncIterator[bytes]: + async def iter_bytes(self, **kwargs: Any) -> AsyncIterator[bytes]: """Asynchronously iterates over the response's bytes. Will decompress in the process :return: An async iterator of bytes from the response :rtype: AsyncIterator[bytes] @@ -145,10 +145,10 @@ class RestAsyncHttpClientTransportResponse(_RestHttpClientTransportResponseBase, """Create a Rest HTTPResponse from an http.client response. """ - async def iter_bytes(self): + async def iter_bytes(self, **kwargs): raise TypeError("We do not support iter_bytes for this transport response") - async def iter_raw(self): + async def iter_raw(self, **kwargs): raise TypeError("We do not support iter_raw for this transport response") async def read(self): diff --git a/sdk/core/azure-core/azure/core/rest/_requests_basic.py b/sdk/core/azure-core/azure/core/rest/_requests_basic.py index d62fc9d552c8..c9ed80f4631c 100644 --- a/sdk/core/azure-core/azure/core/rest/_requests_basic.py +++ b/sdk/core/azure-core/azure/core/rest/_requests_basic.py @@ -68,7 +68,8 @@ def _body(self): # be able to access the body directly without loading it first (like we have to do # in aiohttp). So here, we set self._content to self._internal_response.content, # which is similar to read, without the async call. - self._content = self._internal_response.content + if self._content is None: + self._content = self._internal_response.content return self._content class _RestRequestsTransportResponseBase(_HttpResponseBaseImpl, _RestRequestsTransportResponseBaseMixin): diff --git a/sdk/core/azure-core/azure/core/rest/_rest.py b/sdk/core/azure-core/azure/core/rest/_rest.py index 437e0823bac6..643697e01c1e 100644 --- a/sdk/core/azure-core/azure/core/rest/_rest.py +++ b/sdk/core/azure-core/azure/core/rest/_rest.py @@ -60,9 +60,7 @@ ################################## CLASSES ###################################### class HttpRequest(HttpRequestBackcompatMixin): - """Provisional object that represents an HTTP request. - - **This object is provisional**, meaning it may be changed in a future release. + """HTTP request. It should be passed to your client's `send_request` method. @@ -83,7 +81,7 @@ class HttpRequest(HttpRequestBackcompatMixin): :keyword content: Content you want in your request body. Think of it as the kwarg you should input if your data doesn't fit into `json`, `data`, or `files`. Accepts a bytes type, or a generator that yields bytes. - :paramtype content: str or bytes or iterable[bytes] or asynciterable[bytes] + :paramtype content: str or bytes or iterable[bytes] :keyword dict data: Form data you want in your request body. Use for form-encoded data, i.e. HTML forms. :keyword mapping files: Files you want to in your request body. Use for uploading files with @@ -321,9 +319,8 @@ def content(self): class HttpResponse(_HttpResponseBase): - """**Provisional** abstract base class for HTTP responses. + """Abstract base class for HTTP responses. - **This object is provisional**, meaning it may be changed in a future release. Use this abstract base class to create your own transport responses. Responses implementing this ABC are returned from your client's `send_request` method @@ -361,8 +358,8 @@ def read(self): """ @abc.abstractmethod - def iter_raw(self): - # type: () -> Iterator[bytes] + def iter_raw(self, **kwargs): + # type: (Any) -> Iterator[bytes] """Iterates over the response's bytes. Will not decompress in the process. :return: An iterator of bytes from the response @@ -370,8 +367,8 @@ def iter_raw(self): """ @abc.abstractmethod - def iter_bytes(self): - # type: () -> Iterator[bytes] + def iter_bytes(self, **kwargs): + # type: (Any) -> Iterator[bytes] """Iterates over the response's bytes. Will decompress in the process. :return: An iterator of bytes from the response diff --git a/sdk/core/azure-core/azure/core/rest/_rest_py3.py b/sdk/core/azure-core/azure/core/rest/_rest_py3.py index b3fa25445f67..8054d1b4aa35 100644 --- a/sdk/core/azure-core/azure/core/rest/_rest_py3.py +++ b/sdk/core/azure-core/azure/core/rest/_rest_py3.py @@ -53,9 +53,7 @@ ################################## CLASSES ###################################### class HttpRequest(HttpRequestBackcompatMixin): - """**Provisional** object that represents an HTTP request. - - **This object is provisional**, meaning it may be changed in a future release. + """An HTTP request. It should be passed to your client's `send_request` method. @@ -315,9 +313,8 @@ def raise_for_status(self) -> None: ... class HttpResponse(_HttpResponseBase): - """**Provisional** abstract base class for HTTP responses. + """Abstract base class for HTTP responses. - **This object is provisional**, meaning it may be changed in a future release. Use this abstract base class to create your own transport responses. Responses implementing this ABC are returned from your client's `send_request` method @@ -352,7 +349,7 @@ def read(self) -> bytes: ... @abc.abstractmethod - def iter_raw(self) -> Iterator[bytes]: + def iter_raw(self, **kwargs: Any) -> Iterator[bytes]: """Iterates over the response's bytes. Will not decompress in the process. :return: An iterator of bytes from the response @@ -361,7 +358,7 @@ def iter_raw(self) -> Iterator[bytes]: ... @abc.abstractmethod - def iter_bytes(self) -> Iterator[bytes]: + def iter_bytes(self, **kwargs: Any) -> Iterator[bytes]: """Iterates over the response's bytes. Will decompress in the process. :return: An iterator of bytes from the response @@ -378,9 +375,8 @@ def __repr__(self) -> str: ) class AsyncHttpResponse(_HttpResponseBase): - """**Provisional** abstract base class for Async HTTP responses. + """Abstract base class for Async HTTP responses. - **This object is provisional**, meaning it may be changed in a future release. Use this abstract base class to create your own transport responses. Responses implementing this ABC are returned from your async client's `send_request` @@ -403,7 +399,7 @@ async def read(self) -> bytes: ... @abc.abstractmethod - async def iter_raw(self) -> AsyncIterator[bytes]: + async def iter_raw(self, **kwargs: Any) -> AsyncIterator[bytes]: """Asynchronously iterates over the response's bytes. Will not decompress in the process. :return: An async iterator of bytes from the response @@ -414,7 +410,7 @@ async def iter_raw(self) -> AsyncIterator[bytes]: yield # pylint: disable=unreachable @abc.abstractmethod - async def iter_bytes(self) -> AsyncIterator[bytes]: + async def iter_bytes(self, **kwargs: Any) -> AsyncIterator[bytes]: """Asynchronously iterates over the response's bytes. Will decompress in the process. :return: An async iterator of bytes from the response diff --git a/sdk/core/azure-core/azure/core/serialization.py b/sdk/core/azure-core/azure/core/serialization.py index ef388f14cf26..4cb06d6437dc 100644 --- a/sdk/core/azure-core/azure/core/serialization.py +++ b/sdk/core/azure-core/azure/core/serialization.py @@ -6,12 +6,10 @@ # -------------------------------------------------------------------------- import base64 from json import JSONEncoder -from typing import TYPE_CHECKING - +from typing import Union, cast +from datetime import datetime, date, time, timedelta from .utils._utils import _FixedOffset -if TYPE_CHECKING: - from datetime import timedelta __all__ = ["NULL", "AzureJSONEncoder"] @@ -32,7 +30,7 @@ def __bool__(self): """ -def _timedelta_as_isostr(value): +def _timedelta_as_isostr(td): # type: (timedelta) -> str """Converts a datetime.timedelta object into an ISO 8601 formatted string, e.g. 'P4DT12H30M05S' @@ -40,7 +38,7 @@ def _timedelta_as_isostr(value): """ # Split seconds to larger units - seconds = value.total_seconds() + seconds = td.total_seconds() minutes, seconds = divmod(seconds, 60) hours, minutes = divmod(minutes, 60) days, hours = divmod(hours, 24) @@ -49,22 +47,22 @@ def _timedelta_as_isostr(value): seconds = round(seconds, 6) # Build date - date = "" + date_str = "" if days: - date = "%sD" % days + date_str = "%sD" % days # Build time - time = "T" + time_str = "T" # Hours - bigger_exists = date or hours + bigger_exists = date_str or hours if bigger_exists: - time += "{:02}H".format(hours) + time_str += "{:02}H".format(hours) # Minutes bigger_exists = bigger_exists or minutes if bigger_exists: - time += "{:02}M".format(minutes) + time_str += "{:02}M".format(minutes) # Seconds try: @@ -78,9 +76,32 @@ def _timedelta_as_isostr(value): except AttributeError: # int.is_integer() raises seconds_string = "{:02}".format(seconds) - time += "{}S".format(seconds_string) + time_str += "{}S".format(seconds_string) + + return "P" + date_str + time_str + - return "P" + date + time +def _datetime_as_isostr(dt): + # type: (Union[datetime, date, time, timedelta]) -> str + """Converts a datetime.(datetime|date|time|timedelta) object into an ISO 8601 formatted string""" + # First try datetime.datetime + if hasattr(dt, "year") and hasattr(dt, "hour"): + dt = cast(datetime, dt) + # astimezone() fails for naive times in Python 2.7, so make make sure dt is aware (tzinfo is set) + if not dt.tzinfo: + iso_formatted = dt.replace(tzinfo=TZ_UTC).isoformat() + else: + iso_formatted = dt.astimezone(TZ_UTC).isoformat() + # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) + return iso_formatted.replace("+00:00", "Z") + # Next try datetime.date or datetime.time + try: + dt = cast(Union[date, time], dt) + return dt.isoformat() + # Last, try datetime.timedelta + except AttributeError: + dt = cast(timedelta, dt) + return _timedelta_as_isostr(dt) try: @@ -95,29 +116,10 @@ class AzureJSONEncoder(JSONEncoder): """A JSON encoder that's capable of serializing datetime objects and bytes.""" def default(self, o): # pylint: disable=too-many-return-statements + if isinstance(o, (bytes, bytearray)): + return base64.b64encode(o).decode() try: - return super(AzureJSONEncoder, self).default(o) - except TypeError: - if isinstance(o, (bytes, bytearray)): - return base64.b64encode(o).decode() - try: - # First try datetime.datetime - if hasattr(o, "year") and hasattr(o, "hour"): - # astimezone() fails for naive times in Python 2.7, so make make sure o is aware (tzinfo is set) - if not o.tzinfo: - iso_formatted = o.replace(tzinfo=TZ_UTC).isoformat() - else: - iso_formatted = o.astimezone(TZ_UTC).isoformat() - # Replace the trailing "+00:00" UTC offset with "Z" (RFC 3339: https://www.ietf.org/rfc/rfc3339.txt) - return iso_formatted.replace("+00:00", "Z") - # Next try datetime.date or datetime.time - return o.isoformat() - except AttributeError: - pass - # Last, try datetime.timedelta - try: - return _timedelta_as_isostr(o) - except AttributeError: - # This will be raised when it hits value.total_seconds in the method above - pass - return super(AzureJSONEncoder, self).default(o) + return _datetime_as_isostr(o) + except AttributeError: + pass + return super(AzureJSONEncoder, self).default(o) diff --git a/sdk/core/azure-core/azure/core/utils/_pipeline_transport_rest_shared.py b/sdk/core/azure-core/azure/core/utils/_pipeline_transport_rest_shared.py index 686bf4e95ce0..9a003e768332 100644 --- a/sdk/core/azure-core/azure/core/utils/_pipeline_transport_rest_shared.py +++ b/sdk/core/azure-core/azure/core/utils/_pipeline_transport_rest_shared.py @@ -347,16 +347,17 @@ def _aiohttp_body_helper(response): raise ValueError("Body is not available. Call async method load_body, or do your call with stream=False.") if not response._decompress: return response._content + if response._decompressed_content: + return response._content enc = response.headers.get('Content-Encoding') if not enc: return response._content enc = enc.lower() if enc in ("gzip", "deflate"): - if response._decompressed_content: - return response._decompressed_content import zlib zlib_mode = 16 + zlib.MAX_WBITS if enc == "gzip" else zlib.MAX_WBITS decompressor = zlib.decompressobj(wbits=zlib_mode) - response._decompressed_content = decompressor.decompress(response._content) - return response._decompressed_content + response._content = decompressor.decompress(response._content) + response._decompressed_content = True + return response._content return response._content diff --git a/sdk/core/azure-core/doc/azure.core.rst b/sdk/core/azure-core/doc/azure.core.rst index c6f0ed92463b..c73d8bdf8421 100644 --- a/sdk/core/azure-core/doc/azure.core.rst +++ b/sdk/core/azure-core/doc/azure.core.rst @@ -75,9 +75,6 @@ azure.core.serialization azure.core.rest ------------------- -***THIS MODULE IS PROVISIONAL*** - -This module is ***provisional***, meaning any of the objects and methods in this module may be changed. .. automodule:: azure.core.rest :members: diff --git a/sdk/core/azure-core/samples/test_example_sansio.py b/sdk/core/azure-core/samples/test_example_sansio.py index 64add90a2c35..9006aaffa8b2 100644 --- a/sdk/core/azure-core/samples/test_example_sansio.py +++ b/sdk/core/azure-core/samples/test_example_sansio.py @@ -167,17 +167,3 @@ def example_proxy_policy(): # You can also configure proxies by setting the environment variables # HTTP_PROXY and HTTPS_PROXY. # [END proxy_policy] - -def example_on_exception(): - policy = SansIOHTTPPolicy() - request = HttpRequest("GET", "https://bing.com") - # [START on_exception] - try: - response = policy.on_request(request) - except Exception: - if not policy.on_exception(request): - raise - - # or use - exc_type, exc_value, exc_traceback = sys.exc_info() - # [END on_exception] diff --git a/sdk/core/azure-core/tests/async_tests/test_basic_transport_async.py b/sdk/core/azure-core/tests/async_tests/test_basic_transport_async.py index 6f6b61744b02..f68634652040 100644 --- a/sdk/core/azure-core/tests/async_tests/test_basic_transport_async.py +++ b/sdk/core/azure-core/tests/async_tests/test_basic_transport_async.py @@ -10,6 +10,7 @@ from azure.core.exceptions import HttpResponseError from utils import HTTP_REQUESTS, request_and_responses_product import pytest +import sys # transport = mock.MagicMock(spec=AsyncHttpTransport) @@ -979,3 +980,12 @@ async def test_recursive_multipart_receive(http_request, mock_response): internal_response0 = internal_parts[0] assert internal_response0.status_code == 400 + + +@pytest.mark.skipif(sys.version_info < (3, 10), reason="Loop parameter is deprecated since Python 3.10") +def test_aiohttp_loop(): + import asyncio + from azure.core.pipeline.transport import AioHttpTransport + loop = asyncio.get_event_loop() + with pytest.raises(ValueError): + transport = AioHttpTransport(loop=loop) diff --git a/sdk/core/azure-core/tests/async_tests/test_content_length_checking_async.py b/sdk/core/azure-core/tests/async_tests/test_content_length_checking_async.py new file mode 100644 index 000000000000..726c4baf32ed --- /dev/null +++ b/sdk/core/azure-core/tests/async_tests/test_content_length_checking_async.py @@ -0,0 +1,28 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.transport import ( + HttpRequest, +) +from azure.core import AsyncPipelineClient +from azure.core.exceptions import IncompleteReadError +import pytest + + +@pytest.mark.asyncio +async def test_aio_transport_short_read_download_stream(port): + url = "http://localhost:{}/errors/short-data".format(port) + client = AsyncPipelineClient(url) + with pytest.raises(IncompleteReadError): + async with client: + request = HttpRequest("GET", url) + pipeline_response = await client._pipeline.run(request, stream=True) + response = pipeline_response.http_response + data = response.stream_download(client._pipeline) + content = b"" + async for d in data: + content += d diff --git a/sdk/core/azure-core/tests/async_tests/test_rest_asyncio_transport.py b/sdk/core/azure-core/tests/async_tests/test_rest_asyncio_transport.py index 98941fbcd8d5..145c8ce151ba 100644 --- a/sdk/core/azure-core/tests/async_tests/test_rest_asyncio_transport.py +++ b/sdk/core/azure-core/tests/async_tests/test_rest_asyncio_transport.py @@ -11,8 +11,14 @@ import pytest from utils import readonly_checks +@pytest.fixture +async def client(port): + async with AsyncioRequestsTransport() as transport: + async with AsyncTestRestClient(port, transport=transport) as client: + yield client + @pytest.mark.asyncio -async def test_async_gen_data(port): +async def test_async_gen_data(port, client): class AsyncGen: def __init__(self): self._range = iter([b"azerty"]) @@ -26,29 +32,52 @@ async def __anext__(self): except StopIteration: raise StopAsyncIteration - async with AsyncioRequestsTransport() as transport: - client = AsyncTestRestClient(port, transport=transport) - request = HttpRequest('GET', 'http://localhost:{}/basic/anything'.format(port), content=AsyncGen()) - response = await client.send_request(request) - assert response.json()['data'] == "azerty" + request = HttpRequest('GET', 'http://localhost:{}/basic/anything'.format(port), content=AsyncGen()) + response = await client.send_request(request) + assert response.json()['data'] == "azerty" @pytest.mark.asyncio -async def test_send_data(port): - async with AsyncioRequestsTransport() as transport: - client = AsyncTestRestClient(port, transport=transport) - request = HttpRequest('PUT', 'http://localhost:{}/basic/anything'.format(port), content=b"azerty") - response = await client.send_request(request) +async def test_send_data(port, client): + request = HttpRequest('PUT', 'http://localhost:{}/basic/anything'.format(port), content=b"azerty") + response = await client.send_request(request) - assert response.json()['data'] == "azerty" + assert response.json()['data'] == "azerty" @pytest.mark.asyncio -async def test_readonly(port): +async def test_readonly(client): """Make sure everything that is readonly is readonly""" - async with AsyncioRequestsTransport() as transport: - client = AsyncTestRestClient(port, transport=transport) - response = await client.send_request(HttpRequest("GET", "/health")) - response.raise_for_status() + response = await client.send_request(HttpRequest("GET", "/health")) + response.raise_for_status() assert isinstance(response, RestAsyncioRequestsTransportResponse) from azure.core.pipeline.transport import AsyncioRequestsTransportResponse readonly_checks(response, old_response_class=AsyncioRequestsTransportResponse) + +@pytest.mark.asyncio +async def test_decompress_compressed_header(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = await client.send_request(request) + content = await response.read() + assert content == b"hello world" + assert response.content == content + assert response.text() == "hello world" + +@pytest.mark.asyncio +async def test_decompress_compressed_header_stream(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = await client.send_request(request, stream=True) + content = await response.read() + assert content == b"hello world" + assert response.content == content + assert response.text() == "hello world" + +@pytest.mark.asyncio +async def test_decompress_compressed_header_stream_body_content(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = await client.send_request(request, stream=True) + await response.read() + content = response.content + assert content == response.body() diff --git a/sdk/core/azure-core/tests/async_tests/test_rest_http_response_async.py b/sdk/core/azure-core/tests/async_tests/test_rest_http_response_async.py index ebbd4079e6ea..8a2fb85d95b9 100644 --- a/sdk/core/azure-core/tests/async_tests/test_rest_http_response_async.py +++ b/sdk/core/azure-core/tests/async_tests/test_rest_http_response_async.py @@ -107,7 +107,6 @@ async def test_response_content_type_encoding(send_request): response = await send_request( request=HttpRequest("GET", "/encoding/latin-1") ) - await response.read() assert response.content_type == "text/plain; charset=latin-1" assert response.content == b'Latin 1: \xff' assert response.text() == "Latin 1: ÿ" @@ -122,7 +121,6 @@ async def test_response_autodetect_encoding(send_request): response = await send_request( request=HttpRequest("GET", "/encoding/latin-1") ) - await response.read() assert response.text() == u'Latin 1: ÿ' assert response.encoding == "latin-1" @@ -135,7 +133,6 @@ async def test_response_fallback_to_autodetect(send_request): response = await send_request( request=HttpRequest("GET", "/encoding/invalid-codec-name") ) - await response.read() assert response.headers["Content-Type"] == "text/plain; charset=invalid-codec-name" assert response.text() == "おはようございます。" assert response.encoding is None @@ -168,7 +165,6 @@ async def test_response_no_charset_with_iso_8859_1_content(send_request): response = await send_request( request=HttpRequest("GET", "/encoding/iso-8859-1"), ) - await response.read() assert response.text() == "Accented: �sterreich" assert response.encoding is None @@ -177,7 +173,6 @@ async def test_json(send_request): response = await send_request( request=HttpRequest("GET", "/basic/json"), ) - await response.read() assert response.json() == {"greeting": "hello", "recipient": "world"} assert response.encoding is None @@ -186,7 +181,6 @@ async def test_json_with_specified_encoding(send_request): response = await send_request( request=HttpRequest("GET", "/encoding/json"), ) - await response.read() assert response.json() == {"greeting": "hello", "recipient": "world"} assert response.encoding == "utf-16" @@ -195,7 +189,6 @@ async def test_emoji(send_request): response = await send_request( request=HttpRequest("GET", "/encoding/emoji"), ) - await response.read() assert response.text() == "👩" @pytest.mark.asyncio @@ -203,7 +196,6 @@ async def test_emoji_family_with_skin_tone_modifier(send_request): response = await send_request( request=HttpRequest("GET", "/encoding/emoji-family-skin-tone-modifier"), ) - await response.read() assert response.text() == "👩🏻‍👩🏽‍👧🏾‍👦🏿 SSN: 859-98-0987" @pytest.mark.asyncio @@ -211,7 +203,6 @@ async def test_korean_nfc(send_request): response = await send_request( request=HttpRequest("GET", "/encoding/korean"), ) - await response.read() assert response.text() == "아가" @pytest.mark.asyncio @@ -224,14 +215,14 @@ async def test_urlencoded_content(send_request): ), ) -@pytest.mark.asyncio -async def test_multipart_files_content(send_request): - request = HttpRequest( - "POST", - "/multipart/basic", - files={"fileContent": io.BytesIO(b"")}, - ) - await send_request(request) +# @pytest.mark.asyncio +# async def test_multipart_files_content(send_request): +# request = HttpRequest( +# "POST", +# "/multipart/basic", +# files={"fileContent": io.BytesIO(b"")}, +# ) +# await send_request(request) @pytest.mark.asyncio async def test_send_request_return_pipeline_response(client): diff --git a/sdk/core/azure-core/tests/async_tests/test_rest_stream_responses_async.py b/sdk/core/azure-core/tests/async_tests/test_rest_stream_responses_async.py index 2b8a68cb7bd1..82325d435060 100644 --- a/sdk/core/azure-core/tests/async_tests/test_rest_stream_responses_async.py +++ b/sdk/core/azure-core/tests/async_tests/test_rest_stream_responses_async.py @@ -98,7 +98,6 @@ async def test_streaming_response(client): assert not response.is_closed content = await response.read() - assert content == b"Hello, world!" assert response.content == b"Hello, world!" assert response.is_closed @@ -203,3 +202,46 @@ async def test_error_reading(client): await response.read() assert response.content == b"" await client.close() + +@pytest.mark.asyncio +async def test_pass_kwarg_to_iter_bytes(client): + request = HttpRequest("GET", "/basic/string") + response = await client.send_request(request, stream=True) + async for part in response.iter_bytes(chunk_size=5): + assert part + +@pytest.mark.asyncio +async def test_pass_kwarg_to_iter_raw(client): + request = HttpRequest("GET", "/basic/string") + response = await client.send_request(request, stream=True) + async for part in response.iter_raw(chunk_size=5): + assert part + +@pytest.mark.asyncio +async def test_decompress_compressed_header(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = await client.send_request(request) + content = await response.read() + assert content == b"hello world" + assert response.content == content + assert response.text() == "hello world" + +@pytest.mark.asyncio +async def test_decompress_compressed_header_stream(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = await client.send_request(request, stream=True) + content = await response.read() + assert content == b"hello world" + assert response.content == content + assert response.text() == "hello world" + +@pytest.mark.asyncio +async def test_decompress_compressed_header_stream_body_content(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = await client.send_request(request, stream=True) + await response.read() + content = response.content + assert content == response.body() diff --git a/sdk/core/azure-core/tests/async_tests/test_rest_trio_transport.py b/sdk/core/azure-core/tests/async_tests/test_rest_trio_transport.py index 8213a37d09ea..813864544407 100644 --- a/sdk/core/azure-core/tests/async_tests/test_rest_trio_transport.py +++ b/sdk/core/azure-core/tests/async_tests/test_rest_trio_transport.py @@ -10,9 +10,14 @@ from utils import readonly_checks import pytest +@pytest.fixture +async def client(port): + async with TrioRequestsTransport() as transport: + async with AsyncTestRestClient(port, transport=transport) as client: + yield client @pytest.mark.trio -async def test_async_gen_data(port): +async def test_async_gen_data(client, port): class AsyncGen: def __init__(self): self._range = iter([b"azerty"]) @@ -26,30 +31,51 @@ async def __anext__(self): except StopIteration: raise StopAsyncIteration - async with TrioRequestsTransport() as transport: - client = AsyncTestRestClient(port, transport=transport) - request = HttpRequest('GET', 'http://localhost:{}/basic/anything'.format(port), content=AsyncGen()) - response = await client.send_request(request) - assert response.json()['data'] == "azerty" + request = HttpRequest('GET', 'http://localhost:{}/basic/anything'.format(port), content=AsyncGen()) + response = await client.send_request(request) + assert response.json()['data'] == "azerty" @pytest.mark.trio -async def test_send_data(port): - async with TrioRequestsTransport() as transport: - request = HttpRequest('PUT', 'http://localhost:{}/basic/anything'.format(port), content=b"azerty") - client = AsyncTestRestClient(port, transport=transport) - response = await client.send_request(request) - - assert response.json()['data'] == "azerty" +async def test_send_data(port, client): + request = HttpRequest('PUT', 'http://localhost:{}/basic/anything'.format(port), content=b"azerty") + response = await client.send_request(request) + assert response.json()['data'] == "azerty" @pytest.mark.trio -async def test_readonly(port): +async def test_readonly(client): """Make sure everything that is readonly is readonly""" - async with TrioRequestsTransport() as transport: - request = HttpRequest('GET', 'http://localhost:{}/health'.format(port)) - client = AsyncTestRestClient(port, transport=transport) - response = await client.send_request(HttpRequest("GET", "/health")) - response.raise_for_status() + response = await client.send_request(HttpRequest("GET", "/health")) + response.raise_for_status() assert isinstance(response, RestTrioRequestsTransportResponse) from azure.core.pipeline.transport import TrioRequestsTransportResponse readonly_checks(response, old_response_class=TrioRequestsTransportResponse) + +@pytest.mark.trio +async def test_decompress_compressed_header(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = await client.send_request(request) + content = await response.read() + assert content == b"hello world" + assert response.content == content + assert response.text() == "hello world" + +@pytest.mark.trio +async def test_decompress_compressed_header_stream(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = await client.send_request(request, stream=True) + content = await response.read() + assert content == b"hello world" + assert response.content == content + assert response.text() == "hello world" + +@pytest.mark.trio +async def test_decompress_compressed_header_stream_body_content(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = await client.send_request(request, stream=True) + await response.read() + content = response.content + assert content == response.body() diff --git a/sdk/core/azure-core/tests/test_basic_transport.py b/sdk/core/azure-core/tests/test_basic_transport.py index 725726233d4b..50b8f5209280 100644 --- a/sdk/core/azure-core/tests/test_basic_transport.py +++ b/sdk/core/azure-core/tests/test_basic_transport.py @@ -1194,12 +1194,3 @@ def test_conflict_timeout(caplog, port, http_request): with pytest.raises(ValueError): with Pipeline(transport) as pipeline: pipeline.run(request, connection_timeout=(100, 100), read_timeout = 100) - - -@pytest.mark.skipif(sys.version_info < (3, 10), reason="Loop parameter is deprecated since Python 3.10") -def test_aiohttp_loop(): - import asyncio - from azure.core.pipeline.transport import AioHttpTransport - loop = asyncio.get_event_loop() - with pytest.raises(ValueError): - transport = AioHttpTransport(loop=loop) diff --git a/sdk/core/azure-core/tests/test_content_length_checking.py b/sdk/core/azure-core/tests/test_content_length_checking.py new file mode 100644 index 000000000000..7cdbd8f70c2a --- /dev/null +++ b/sdk/core/azure-core/tests/test_content_length_checking.py @@ -0,0 +1,27 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +from azure.core import PipelineClient +from azure.core.pipeline import Pipeline +from azure.core.pipeline.transport import ( + HttpRequest, + RequestsTransport, +) +from azure.core.exceptions import IncompleteReadError +import pytest + + +def test_sync_transport_short_read_download_stream(port): + url = "http://localhost:{}/errors/short-data".format(port) + client = PipelineClient(url) + request = HttpRequest("GET", url) + with pytest.raises(IncompleteReadError): + pipeline_response = client._pipeline.run(request, stream=True) + response = pipeline_response.http_response + data = response.stream_download(client._pipeline) + content = b"" + for d in data: + content += d diff --git a/sdk/core/azure-core/tests/test_rest_http_request.py b/sdk/core/azure-core/tests/test_rest_http_request.py index 1072b7b49e42..68cd4c470697 100644 --- a/sdk/core/azure-core/tests/test_rest_http_request.py +++ b/sdk/core/azure-core/tests/test_rest_http_request.py @@ -239,6 +239,33 @@ def test_multipart_invalid_key_binary_string(): assert "Invalid type for data name" in str(e.value) assert repr(b"abc") in str(e.value) +def test_data_str_input(): + data = { + 'scope': 'fake_scope', + u'grant_type': 'refresh_token', + 'refresh_token': u'REDACTED', + 'service': 'fake_url.azurecr.io' + } + request = HttpRequest("POST", "http://localhost:3000/", data=data) + assert len(request.content) == 4 + assert request.content["scope"] == "fake_scope" + assert request.content["grant_type"] == "refresh_token" + assert request.content["refresh_token"] == u"REDACTED" + assert request.content["service"] == "fake_url.azurecr.io" + assert len(request.headers) == 1 + assert request.headers['Content-Type'] == 'application/x-www-form-urlencoded' + +def test_content_str_input(): + requests = [ + HttpRequest("POST", "/fake", content="hello, world!"), + HttpRequest("POST", "/fake", content=u"hello, world!"), + ] + for request in requests: + assert len(request.headers) == 2 + assert request.headers["Content-Type"] == "text/plain" + assert request.headers["Content-Length"] == "13" + assert request.content == "hello, world!" + @pytest.mark.parametrize(("value"), (object(), {"key": "value"})) def test_multipart_invalid_value(value): @@ -401,6 +428,32 @@ def on_request(self, pipeline_request): # work assert "I entered the policies!" in str(ex.value) +def test_json_file_valid(): + json_bytes = bytearray('{"more": "cowbell"}', encoding='utf-8') + with io.BytesIO(json_bytes) as json_file: + request = HttpRequest("PUT", "/fake", json=json_file) + assert request.headers == {"Content-Type": "application/json"} + assert request.content == json_file + assert not request.content.closed + assert request.content.read() == b'{"more": "cowbell"}' + +def test_json_file_invalid(): + json_bytes = bytearray('{"more": "cowbell" i am not valid', encoding='utf-8') + with io.BytesIO(json_bytes) as json_file: + request = HttpRequest("PUT", "/fake", json=json_file) + assert request.headers == {"Content-Type": "application/json"} + assert request.content == json_file + assert not request.content.closed + assert request.content.read() == b'{"more": "cowbell" i am not valid' + +def test_json_file_content_type_input(): + json_bytes = bytearray('{"more": "cowbell"}', encoding='utf-8') + with io.BytesIO(json_bytes) as json_file: + request = HttpRequest("PUT", "/fake", json=json_file, headers={"Content-Type": "application/json-special"}) + assert request.headers == {"Content-Type": "application/json-special"} + assert request.content == json_file + assert not request.content.closed + assert request.content.read() == b'{"more": "cowbell"}' # NOTE: For files, we don't allow list of tuples yet, just dict. Will uncomment when we add this capability # def test_multipart_multiple_files_single_input_content(): diff --git a/sdk/core/azure-core/tests/test_rest_stream_responses.py b/sdk/core/azure-core/tests/test_rest_stream_responses.py index 841927430b83..1f81f15c3448 100644 --- a/sdk/core/azure-core/tests/test_rest_stream_responses.py +++ b/sdk/core/azure-core/tests/test_rest_stream_responses.py @@ -229,3 +229,41 @@ def test_error_reading(client): response.read() assert response.content == b"" # try giving a really slow response, see what happens + +def test_pass_kwarg_to_iter_bytes(client): + request = HttpRequest("GET", "/basic/string") + response = client.send_request(request, stream=True) + for part in response.iter_bytes(chunk_size=5): + assert part + +def test_pass_kwarg_to_iter_raw(client): + request = HttpRequest("GET", "/basic/string") + response = client.send_request(request, stream=True) + for part in response.iter_raw(chunk_size=5): + assert part + +def test_decompress_compressed_header(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = client.send_request(request) + content = response.read() + assert content == b"hello world" + assert response.content == content + assert response.text() == "hello world" + +def test_decompress_compressed_header_stream(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = client.send_request(request, stream=True) + content = response.read() + assert content == b"hello world" + assert response.content == content + assert response.text() == "hello world" + +def test_decompress_compressed_header_stream_body_content(client): + # expect plain text + request = HttpRequest("GET", "/encoding/gzip") + response = client.send_request(request, stream=True) + response.read() + content = response.content + assert content == response.body() diff --git a/sdk/core/azure-core/tests/test_streaming.py b/sdk/core/azure-core/tests/test_streaming.py index 87e51851722f..17f9d82f612e 100644 --- a/sdk/core/azure-core/tests/test_streaming.py +++ b/sdk/core/azure-core/tests/test_streaming.py @@ -97,7 +97,6 @@ def test_compress_compressed_no_header(http_request): @pytest.mark.parametrize("http_request", HTTP_REQUESTS) def test_decompress_plain_header(http_request): # expect error - import requests account_name = "coretests" account_url = "https://{}.blob.core.windows.net".format(account_name) url = "https://{}.blob.core.windows.net/tests/test_with_header.txt".format(account_name) @@ -109,7 +108,7 @@ def test_decompress_plain_header(http_request): try: content = b"".join(list(data)) assert False - except (requests.exceptions.ContentDecodingError, DecodeError): + except DecodeError: pass @pytest.mark.parametrize("http_request", HTTP_REQUESTS) diff --git a/sdk/core/azure-core/tests/testserver_tests/coretestserver/coretestserver/test_routes/encoding.py b/sdk/core/azure-core/tests/testserver_tests/coretestserver/coretestserver/test_routes/encoding.py index 104ef7608bd0..64d7477452dd 100644 --- a/sdk/core/azure-core/tests/testserver_tests/coretestserver/coretestserver/test_routes/encoding.py +++ b/sdk/core/azure-core/tests/testserver_tests/coretestserver/coretestserver/test_routes/encoding.py @@ -90,3 +90,12 @@ def no_charset(): ) r.headers["Content-Type"] = "text/plain" return r + +@encoding_api.route('/gzip', methods=['GET']) +def gzip_content_encoding(): + r = Response( + b'\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\n\xcbH\xcd\xc9\xc9W(\xcf/\xcaI\x01\x00\x85\x11J\r\x0b\x00\x00\x00', status=200 + ) + r.headers["Content-Type"] = "text/plain" + r.headers['Content-Encoding'] = "gzip" + return r diff --git a/sdk/core/azure-core/tests/testserver_tests/coretestserver/coretestserver/test_routes/errors.py b/sdk/core/azure-core/tests/testserver_tests/coretestserver/coretestserver/test_routes/errors.py index 221f598e063a..bab6ef3c4913 100644 --- a/sdk/core/azure-core/tests/testserver_tests/coretestserver/coretestserver/test_routes/errors.py +++ b/sdk/core/azure-core/tests/testserver_tests/coretestserver/coretestserver/test_routes/errors.py @@ -26,3 +26,10 @@ def __iter__(self): yield b"Hello, " yield b"world!" return Response(StreamingBody(), status=500) + +@errors_api.route('/short-data', methods=['GET']) +def get_short_data(): + response = Response(b"X" * 4, status=200) + response.automatically_set_content_length = False + response.headers["Content-Length"] = "8" + return response diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py index 7286b2b8d0b4..06b05b34404f 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/container.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/container.py @@ -160,7 +160,7 @@ def read_item( post_trigger_include=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Dict[str, str] + # type: (...) -> Dict[str, Any] """Get the item identified by `item`. :param item: The ID (name) or dict representing item to retrieve. @@ -376,7 +376,7 @@ def replace_item( post_trigger_include=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Dict[str, str] + # type: (...) -> Dict[str, Any] """Replaces the specified item if it exists in the container. If the item does not already exist in the container, an exception is raised. @@ -424,7 +424,7 @@ def upsert_item( post_trigger_include=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Dict[str, str] + # type: (...) -> Dict[str, Any] """Insert or update the specified item. If the item already exists in the container, it is replaced. If the item @@ -474,7 +474,7 @@ def create_item( indexing_directive=None, # type: Optional[Any] **kwargs # type: Any ): - # type: (...) -> Dict[str, str] + # type: (...) -> Dict[str, Any] """Create an item in the container. To update or replace an existing item, use the @@ -695,7 +695,7 @@ def query_conflicts( @distributed_trace def get_conflict(self, conflict, partition_key, **kwargs): - # type: (Union[str, Dict[str, Any]], Any, Any) -> Dict[str, str] + # type: (Union[str, Dict[str, Any]], Any, Any) -> Dict[str, Any] """Get the conflict identified by `conflict`. :param conflict: The ID (name) or dict representing the conflict to retrieve. diff --git a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py index bd0798128770..85a40106bd72 100644 --- a/sdk/cosmos/azure-cosmos/azure/cosmos/database.py +++ b/sdk/cosmos/azure-cosmos/azure/cosmos/database.py @@ -341,6 +341,7 @@ def get_container_client(self, container): :param container: The ID (name) of the container, a :class:`ContainerProxy` instance, or a dict representing the properties of the container to be retrieved. + :returns: A `ContainerProxy` instance representing the retrieved database. :rtype: ~azure.cosmos.ContainerProxy .. admonition:: Example: @@ -571,7 +572,6 @@ def get_user_client(self, user): :param user: The ID (name), dict representing the properties or :class:`UserProxy` instance of the user to be retrieved. :returns: A `UserProxy` instance representing the retrieved user. - :raises ~azure.cosmos.exceptions.CosmosHttpResponseError: If the given user couldn't be retrieved. :rtype: ~azure.cosmos.UserProxy """ if isinstance(user, UserProxy): diff --git a/sdk/cosmos/azure-cosmos/samples/document_management.py b/sdk/cosmos/azure-cosmos/samples/document_management.py index b4dd6b621f7e..20319aeed14d 100644 --- a/sdk/cosmos/azure-cosmos/samples/document_management.py +++ b/sdk/cosmos/azure-cosmos/samples/document_management.py @@ -160,19 +160,9 @@ def run_sample(): client = cosmos_client.CosmosClient(HOST, {'masterKey': MASTER_KEY} ) try: # setup database for this sample - try: - db = client.create_database(id=DATABASE_ID) - - except exceptions.CosmosResourceExistsError: - pass - + db = client.create_database_if_not_exists(id=DATABASE_ID) # setup container for this sample - try: - container = db.create_container(id=CONTAINER_ID, partition_key=PartitionKey(path='/id', kind='Hash')) - print('Container with id \'{0}\' created'.format(CONTAINER_ID)) - - except exceptions.CosmosResourceExistsError: - print('Container with id \'{0}\' was found'.format(CONTAINER_ID)) + container = db.create_container_if_not_exists(id=CONTAINER_ID, partition_key=PartitionKey(path='/id', kind='Hash')) create_items(container) read_item(container, 'SalesOrder1') diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md b/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md index c8de94f0c9bf..7a9232e8879d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md +++ b/sdk/cosmos/azure-mgmt-cosmosdb/CHANGELOG.md @@ -1,5 +1,76 @@ # Release History +## 7.0.0b2 (2021-10-26) + +**Features** + + - Model DataCenterResourceProperties has a new parameter disk_capacity + - Model DataCenterResourceProperties has a new parameter disk_sku + - Model DataCenterResourceProperties has a new parameter managed_disk_customer_key_uri + - Model DataCenterResourceProperties has a new parameter sku + - Model DataCenterResourceProperties has a new parameter availability_zone + - Model DataCenterResourceProperties has a new parameter backup_storage_customer_key_uri + - Model DatabaseAccountCreateUpdateParameters has a new parameter capacity + - Model DatabaseAccountUpdateParameters has a new parameter capacity + - Model ClusterResourceProperties has a new parameter cassandra_audit_logging_enabled + - Model ClusterResourceProperties has a new parameter deallocated + - Model DatabaseAccountGetResults has a new parameter capacity + - Added operation MongoDBResourcesOperations.begin_retrieve_continuous_backup_information + - Added operation CassandraClustersOperations.begin_invoke_command + - Added operation CassandraClustersOperations.begin_start + - Added operation CassandraClustersOperations.begin_deallocate + - Added operation CassandraClustersOperations.status + - Added operation group LocationsOperations + +**Breaking changes** + + - Model MongoDBDatabaseGetResults no longer has parameter identity + - Model MongoDBDatabaseCreateUpdateParameters no longer has parameter identity + - Model SqlContainerGetResults no longer has parameter identity + - Model SqlUserDefinedFunctionGetResults no longer has parameter identity + - Model GremlinDatabaseGetResults no longer has parameter identity + - Model SqlTriggerCreateUpdateParameters no longer has parameter identity + - Model SqlContainerCreateUpdateParameters no longer has parameter identity + - Model SqlDatabaseCreateUpdateParameters no longer has parameter identity + - Model LocationProperties no longer has parameter status + - Model DatabaseAccountCreateUpdateParameters no longer has parameter diagnostic_log_settings + - Model ThroughputSettingsGetResults no longer has parameter identity + - Model DatabaseAccountUpdateParameters no longer has parameter diagnostic_log_settings + - Model ARMResourceProperties no longer has parameter identity + - Model CassandraTableGetResults no longer has parameter identity + - Model GremlinGraphGetResults no longer has parameter identity + - Model CassandraKeyspaceCreateUpdateParameters no longer has parameter identity + - Model GremlinDatabaseCreateUpdateParameters no longer has parameter identity + - Model SqlTriggerGetResults no longer has parameter identity + - Model GremlinGraphCreateUpdateParameters no longer has parameter identity + - Model MongoDBCollectionGetResults no longer has parameter identity + - Model TableGetResults no longer has parameter identity + - Model CassandraKeyspaceGetResults no longer has parameter identity + - Model MongoDBCollectionCreateUpdateParameters no longer has parameter identity + - Model SqlStoredProcedureGetResults no longer has parameter identity + - Model SqlStoredProcedureCreateUpdateParameters no longer has parameter identity + - Model ThroughputSettingsUpdateParameters no longer has parameter identity + - Model SqlUserDefinedFunctionCreateUpdateParameters no longer has parameter identity + - Model TableCreateUpdateParameters no longer has parameter identity + - Model DatabaseAccountGetResults no longer has parameter diagnostic_log_settings + - Model SqlDatabaseGetResults no longer has parameter identity + - Model CassandraTableCreateUpdateParameters no longer has parameter identity + - Removed operation CassandraResourcesOperations.begin_create_update_cassandra_view + - Removed operation CassandraResourcesOperations.get_cassandra_view + - Removed operation CassandraResourcesOperations.list_cassandra_views + - Removed operation CassandraResourcesOperations.begin_migrate_cassandra_view_to_autoscale + - Removed operation CassandraResourcesOperations.begin_update_cassandra_view_throughput + - Removed operation CassandraResourcesOperations.get_cassandra_view_throughput + - Removed operation CassandraResourcesOperations.begin_delete_cassandra_view + - Removed operation CassandraResourcesOperations.begin_migrate_cassandra_view_to_manual_throughput + - Removed operation CassandraClustersOperations.begin_request_repair + - Removed operation CassandraClustersOperations.begin_fetch_node_status + - Removed operation CassandraClustersOperations.get_backup + - Removed operation CassandraClustersOperations.list_backups + - Removed operation group ServiceOperations + - Removed operation group CosmosDBManagementClientOperationsMixin + - Removed operation group GraphResourcesOperations + ## 7.0.0b1 (2021-09-17) **Features** diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json b/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json index 85684c2620c9..0d0bba2c035c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json +++ b/sdk/cosmos/azure-mgmt-cosmosdb/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "f7bdc95b45115dd1d5d7aec82d1b88ea17a938a7", + "commit": "a87e536b2060dfe47c4d2bbf24a7f32d67944f9c", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/cosmos-db/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/cosmos-db/resource-manager/readme.md" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py index 6ff3e742876e..0f4b69bd6638 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-07-01-preview" + self.api_version = "2021-10-15" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py index c5abb79574e1..b31c4a1680c8 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_cosmos_db_management_client.py @@ -38,7 +38,7 @@ from .operations import TableResourcesOperations from .operations import CassandraResourcesOperations from .operations import GremlinResourcesOperations -from .operations import CosmosDBManagementClientOperationsMixin +from .operations import LocationsOperations from .operations import NotebookWorkspacesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations @@ -51,7 +51,6 @@ from .operations import RestorableMongodbResourcesOperations from .operations import CassandraClustersOperations from .operations import CassandraDataCentersOperations -from .operations import ServiceOperations from . import models @@ -96,6 +95,8 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype cassandra_resources: azure.mgmt.cosmosdb.operations.CassandraResourcesOperations :ivar gremlin_resources: GremlinResourcesOperations operations :vartype gremlin_resources: azure.mgmt.cosmosdb.operations.GremlinResourcesOperations + :ivar locations: LocationsOperations operations + :vartype locations: azure.mgmt.cosmosdb.operations.LocationsOperations :ivar notebook_workspaces: NotebookWorkspacesOperations operations :vartype notebook_workspaces: azure.mgmt.cosmosdb.operations.NotebookWorkspacesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations @@ -120,8 +121,6 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype cassandra_clusters: azure.mgmt.cosmosdb.operations.CassandraClustersOperations :ivar cassandra_data_centers: CassandraDataCentersOperations operations :vartype cassandra_data_centers: azure.mgmt.cosmosdb.operations.CassandraDataCentersOperations - :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.cosmosdb.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. @@ -186,6 +185,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.gremlin_resources = GremlinResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + self.locations = LocationsOperations( + self._client, self._config, self._serialize, self._deserialize) self.notebook_workspaces = NotebookWorkspacesOperations( self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( @@ -210,8 +211,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.cassandra_data_centers = CassandraDataCentersOperations( self._client, self._config, self._serialize, self._deserialize) - self.service = ServiceOperations( - self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json index 8024166e0557..cd50f9c0e66d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-07-01-preview", - "total_api_version_list": ["2021-07-01-preview"], + "chosen_version": "2021-10-15", + "total_api_version_list": ["2021-10-15"], "client": { "name": "CosmosDBManagementClient", "filename": "_cosmos_db_management_client", @@ -117,6 +117,7 @@ "table_resources": "TableResourcesOperations", "cassandra_resources": "CassandraResourcesOperations", "gremlin_resources": "GremlinResourcesOperations", + "locations": "LocationsOperations", "notebook_workspaces": "NotebookWorkspacesOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", "private_link_resources": "PrivateLinkResourcesOperations", @@ -128,37 +129,6 @@ "restorable_mongodb_collections": "RestorableMongodbCollectionsOperations", "restorable_mongodb_resources": "RestorableMongodbResourcesOperations", "cassandra_clusters": "CassandraClustersOperations", - "cassandra_data_centers": "CassandraDataCentersOperations", - "service": "ServiceOperations" - }, - "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", - "operations": { - "location_list" : { - "sync": { - "signature": "def location_list(\n self,\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"List Cosmos DB locations and their properties.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either LocationListResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": false, - "signature": "def location_list(\n self,\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.LocationListResult\"]:\n", - "doc": "\"\"\"List Cosmos DB locations and their properties.\n\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either LocationListResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "" - }, - "location_get" : { - "sync": { - "signature": "def location_get(\n self,\n location, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get the properties of an existing Cosmos DB location.\n\n:param location: Cosmos DB region, with spaces between words and each word capitalized.\n:type location: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationGetResult, or the result of cls(response)\n:rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def location_get(\n self,\n location: str,\n **kwargs: Any\n) -\u003e \"_models.LocationGetResult\":\n", - "doc": "\"\"\"Get the properties of an existing Cosmos DB location.\n\n:param location: Cosmos DB region, with spaces between words and each word capitalized.\n:type location: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LocationGetResult, or the result of cls(response)\n:rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "location" - } - } + "cassandra_data_centers": "CassandraDataCentersOperations" } } \ No newline at end of file diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py index efe7276fe05f..b094b52a6bba 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "7.0.0b1" +VERSION = "7.0.0b2" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py index 60bb9254b97f..0ca152e43125 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-07-01-preview" + self.api_version = "2021-10-15" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-cosmosdb/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py index 4de01d4be8a7..5088c6b337d2 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/_cosmos_db_management_client.py @@ -36,7 +36,7 @@ from .operations import TableResourcesOperations from .operations import CassandraResourcesOperations from .operations import GremlinResourcesOperations -from .operations import CosmosDBManagementClientOperationsMixin +from .operations import LocationsOperations from .operations import NotebookWorkspacesOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations @@ -49,7 +49,6 @@ from .operations import RestorableMongodbResourcesOperations from .operations import CassandraClustersOperations from .operations import CassandraDataCentersOperations -from .operations import ServiceOperations from .. import models @@ -94,6 +93,8 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype cassandra_resources: azure.mgmt.cosmosdb.aio.operations.CassandraResourcesOperations :ivar gremlin_resources: GremlinResourcesOperations operations :vartype gremlin_resources: azure.mgmt.cosmosdb.aio.operations.GremlinResourcesOperations + :ivar locations: LocationsOperations operations + :vartype locations: azure.mgmt.cosmosdb.aio.operations.LocationsOperations :ivar notebook_workspaces: NotebookWorkspacesOperations operations :vartype notebook_workspaces: azure.mgmt.cosmosdb.aio.operations.NotebookWorkspacesOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations @@ -118,8 +119,6 @@ class CosmosDBManagementClient(CosmosDBManagementClientOperationsMixin): :vartype cassandra_clusters: azure.mgmt.cosmosdb.aio.operations.CassandraClustersOperations :ivar cassandra_data_centers: CassandraDataCentersOperations operations :vartype cassandra_data_centers: azure.mgmt.cosmosdb.aio.operations.CassandraDataCentersOperations - :ivar service: ServiceOperations operations - :vartype service: azure.mgmt.cosmosdb.aio.operations.ServiceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. @@ -183,6 +182,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.gremlin_resources = GremlinResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + self.locations = LocationsOperations( + self._client, self._config, self._serialize, self._deserialize) self.notebook_workspaces = NotebookWorkspacesOperations( self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( @@ -207,8 +208,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.cassandra_data_centers = CassandraDataCentersOperations( self._client, self._config, self._serialize, self._deserialize) - self.service = ServiceOperations( - self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/__init__.py index a7c7808a801a..2cee8a2f17a0 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/__init__.py @@ -25,7 +25,7 @@ from ._table_resources_operations import TableResourcesOperations from ._cassandra_resources_operations import CassandraResourcesOperations from ._gremlin_resources_operations import GremlinResourcesOperations -from ._cosmos_db_management_client_operations import CosmosDBManagementClientOperationsMixin +from ._locations_operations import LocationsOperations from ._notebook_workspaces_operations import NotebookWorkspacesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -38,7 +38,6 @@ from ._restorable_mongodb_resources_operations import RestorableMongodbResourcesOperations from ._cassandra_clusters_operations import CassandraClustersOperations from ._cassandra_data_centers_operations import CassandraDataCentersOperations -from ._service_operations import ServiceOperations __all__ = [ 'DatabaseAccountsOperations', @@ -60,7 +59,7 @@ 'TableResourcesOperations', 'CassandraResourcesOperations', 'GremlinResourcesOperations', - 'CosmosDBManagementClientOperationsMixin', + 'LocationsOperations', 'NotebookWorkspacesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', @@ -73,5 +72,4 @@ 'RestorableMongodbResourcesOperations', 'CassandraClustersOperations', 'CassandraDataCentersOperations', - 'ServiceOperations', ] diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_clusters_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_clusters_operations.py index 1d4def896931..b5d2b9f1208f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_clusters_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_clusters_operations.py @@ -59,7 +59,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -128,7 +128,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -201,7 +201,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -248,7 +248,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -357,7 +357,7 @@ async def _create_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -486,7 +486,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -602,24 +602,24 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}'} # type: ignore - async def _request_repair_initial( + async def _invoke_command_initial( self, resource_group_name: str, cluster_name: str, - body: "_models.RepairPostBody", + body: "_models.CommandPostBody", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.CommandOutput": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._request_repair_initial.metadata['url'] # type: ignore + url = self._invoke_command_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -637,55 +637,58 @@ async def _request_repair_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'RepairPostBody') + body_content = self._serialize.body(body, 'CommandPostBody') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('CommandOutput', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _request_repair_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/repair'} # type: ignore + return deserialized + _invoke_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand'} # type: ignore - async def begin_request_repair( + async def begin_invoke_command( self, resource_group_name: str, cluster_name: str, - body: "_models.RepairPostBody", + body: "_models.CommandPostBody", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Request that repair begin on this cluster as soon as possible. + ) -> AsyncLROPoller["_models.CommandOutput"]: + """Invoke a command like nodetool for cassandra maintenance. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: Managed Cassandra cluster name. :type cluster_name: str - :param body: Specification of what keyspaces and tables to run repair on. - :type body: ~azure.mgmt.cosmosdb.models.RepairPostBody + :param body: Specification which command to run where. + :type body: ~azure.mgmt.cosmosdb.models.CommandPostBody :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either CommandOutput or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._request_repair_initial( + raw_result = await self._invoke_command_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, @@ -697,8 +700,11 @@ async def begin_request_repair( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CommandOutput', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -718,24 +724,24 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_request_repair.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/repair'} # type: ignore + begin_invoke_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand'} # type: ignore - async def _fetch_node_status_initial( + async def _deallocate_initial( self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> Optional["_models.ClusterNodeStatus"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ClusterNodeStatus"]] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL - url = self._fetch_node_status_initial.metadata['url'] # type: ignore + url = self._deallocate_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -755,27 +761,24 @@ async def _fetch_node_status_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterNodeStatus', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _fetch_node_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/fetchNodeStatus'} # type: ignore + _deallocate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate'} # type: ignore - async def begin_fetch_node_status( + async def begin_deallocate( self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.ClusterNodeStatus"]: - """Request the status of all nodes in the cluster (as returned by 'nodetool status'). + ) -> AsyncLROPoller[None]: + """Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will + deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do + anything on an already deallocated cluster. Use Start to restart the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -787,19 +790,19 @@ async def begin_fetch_node_status( Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ClusterNodeStatus or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.ClusterNodeStatus] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterNodeStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._fetch_node_status_initial( + raw_result = await self._deallocate_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, cls=lambda x,y,z: x, @@ -810,11 +813,8 @@ async def begin_fetch_node_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ClusterNodeStatus', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -834,117 +834,149 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_fetch_node_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/fetchNodeStatus'} # type: ignore + begin_deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate'} # type: ignore - def list_backups( + async def _start_initial( self, resource_group_name: str, cluster_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ListBackups"]: - """List the backups of this cluster that are available to restore. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListBackups or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.ListBackups] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListBackups"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('ListBackups', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - async def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if cls: + return cls(pipeline_response, None, {}) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start'} # type: ignore - return pipeline_response + async def begin_start( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host + virtual machine of this cluster with reserved data disk. This won't do anything on an already + running cluster. Use Deallocate to deallocate the cluster. - return AsyncItemPaged( - get_next, extract_data + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start'} # type: ignore - async def get_backup( + async def status( self, resource_group_name: str, cluster_name: str, - backup_id: str, **kwargs: Any - ) -> "_models.BackupResource": - """Get the properties of an individual backup of this cluster that is available to restore. + ) -> "_models.CassandraClusterPublicStatus": + """Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: Managed Cassandra cluster name. :type cluster_name: str - :param backup_id: Id of a restorable backup of a Cassandra cluster. - :type backup_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResource, or the result of cls(response) - :rtype: ~azure.mgmt.cosmosdb.models.BackupResource + :return: CassandraClusterPublicStatus, or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraClusterPublicStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL - url = self.get_backup.metadata['url'] # type: ignore + url = self.status.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - 'backupId': self._serialize.url("backup_id", backup_id, 'str', max_length=15, min_length=1, pattern=r'^[0-9]+$'), } url = self._client.format_url(url, **path_format_arguments) @@ -964,10 +996,10 @@ async def get_backup( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupResource', pipeline_response) + deserialized = self._deserialize('CassandraClusterPublicStatus', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}'} # type: ignore + status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status'} # type: ignore diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_data_centers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_data_centers_operations.py index 0e07a7e4289c..dbf2c167b009 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_data_centers_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_data_centers_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -191,7 +191,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -307,7 +307,7 @@ async def _create_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -443,7 +443,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_resources_operations.py index 058af5373e55..27cf80f54d7c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_cassandra_resources_operations.py @@ -65,7 +65,7 @@ def list_cassandra_keyspaces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get_cassandra_keyspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def _create_update_cassandra_keyspace_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_cassandra_keyspace_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_cassandra_keyspace_initial.metadata['url'] # type: ignore @@ -453,7 +453,7 @@ async def get_cassandra_keyspace_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -503,7 +503,7 @@ async def _update_cassandra_keyspace_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -636,7 +636,7 @@ async def _migrate_cassandra_keyspace_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -759,7 +759,7 @@ async def _migrate_cassandra_keyspace_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -895,7 +895,7 @@ def list_cassandra_tables( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -976,7 +976,7 @@ async def get_cassandra_table( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1028,7 +1028,7 @@ async def _create_update_cassandra_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1168,7 +1168,7 @@ async def _delete_cassandra_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_cassandra_table_initial.metadata['url'] # type: ignore @@ -1304,7 +1304,7 @@ async def get_cassandra_table_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1356,7 +1356,7 @@ async def _update_cassandra_table_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1496,7 +1496,7 @@ async def _migrate_cassandra_table_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1626,7 +1626,7 @@ async def _migrate_cassandra_table_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_operations.py index d6e7d2667ae0..e6e996a43f9f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_operations.py @@ -75,7 +75,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -162,7 +162,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -246,7 +246,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_operations.py index c8346c18f1a4..b459e55f2ff4 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_operations.py @@ -75,7 +75,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -162,7 +162,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_region_operations.py index 8e255eec67d1..979d472ba996 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_partition_region_operations.py @@ -78,7 +78,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_region_operations.py index 3f5b718e1a36..5b3fa9f1cf96 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_collection_region_operations.py @@ -78,7 +78,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_account_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_account_region_operations.py index 16cef787b1de..3f198398c295 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_account_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_account_region_operations.py @@ -71,7 +71,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_accounts_operations.py index be33c45d9367..5b2628c7b5da 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_accounts_operations.py @@ -65,7 +65,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -113,7 +113,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -237,7 +237,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -361,7 +361,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -468,7 +468,7 @@ async def _failover_priority_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -591,7 +591,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -660,7 +660,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -733,7 +733,7 @@ async def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -791,7 +791,7 @@ async def list_connection_strings( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -839,7 +839,7 @@ async def _offline_region_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -958,7 +958,7 @@ async def _online_region_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1087,7 +1087,7 @@ async def get_read_only_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1145,7 +1145,7 @@ async def list_read_only_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1193,7 +1193,7 @@ async def _regenerate_key_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1318,7 +1318,7 @@ async def check_name_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self.check_name_exists.metadata['url'] # type: ignore @@ -1375,7 +1375,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1454,7 +1454,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1530,7 +1530,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_operations.py index d9ae67a82759..a4ac9707bc68 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_database_operations.py @@ -72,7 +72,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -155,7 +155,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -235,7 +235,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_gremlin_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_gremlin_resources_operations.py index 0b2dbd845006..0bc7fffca75f 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_gremlin_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_gremlin_resources_operations.py @@ -65,7 +65,7 @@ def list_gremlin_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get_gremlin_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def _create_update_gremlin_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_gremlin_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_gremlin_database_initial.metadata['url'] # type: ignore @@ -453,7 +453,7 @@ async def get_gremlin_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -503,7 +503,7 @@ async def _update_gremlin_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -636,7 +636,7 @@ async def _migrate_gremlin_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -759,7 +759,7 @@ async def _migrate_gremlin_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -895,7 +895,7 @@ def list_gremlin_graphs( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -976,7 +976,7 @@ async def get_gremlin_graph( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1028,7 +1028,7 @@ async def _create_update_gremlin_graph_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1168,7 +1168,7 @@ async def _delete_gremlin_graph_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_gremlin_graph_initial.metadata['url'] # type: ignore @@ -1304,7 +1304,7 @@ async def get_gremlin_graph_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1356,7 +1356,7 @@ async def _update_gremlin_graph_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1496,7 +1496,7 @@ async def _migrate_gremlin_graph_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1626,7 +1626,7 @@ async def _migrate_gremlin_graph_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_locations_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_locations_operations.py new file mode 100644 index 000000000000..bff2c5e3c574 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_locations_operations.py @@ -0,0 +1,162 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class LocationsOperations: + """LocationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.cosmosdb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.LocationListResult"]: + """List Cosmos DB locations and their properties. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LocationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('LocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations'} # type: ignore + + async def get( + self, + location: str, + **kwargs: Any + ) -> "_models.LocationGetResult": + """Get the properties of an existing Cosmos DB location. + + :param location: Cosmos DB region, with spaces between words and each word capitalized. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocationGetResult, or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationGetResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LocationGetResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}'} # type: ignore diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_mongo_db_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_mongo_db_resources_operations.py index 8e75deeb3117..f1e61dd74645 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_mongo_db_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_mongo_db_resources_operations.py @@ -65,7 +65,7 @@ def list_mongo_db_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get_mongo_db_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def _create_update_mongo_db_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_mongo_db_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_mongo_db_database_initial.metadata['url'] # type: ignore @@ -453,7 +453,7 @@ async def get_mongo_db_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -503,7 +503,7 @@ async def _update_mongo_db_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -636,7 +636,7 @@ async def _migrate_mongo_db_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -759,7 +759,7 @@ async def _migrate_mongo_db_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -895,7 +895,7 @@ def list_mongo_db_collections( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -976,7 +976,7 @@ async def get_mongo_db_collection( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1028,7 +1028,7 @@ async def _create_update_mongo_db_collection_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1168,7 +1168,7 @@ async def _delete_mongo_db_collection_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_mongo_db_collection_initial.metadata['url'] # type: ignore @@ -1304,7 +1304,7 @@ async def get_mongo_db_collection_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1356,7 +1356,7 @@ async def _update_mongo_db_collection_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1496,7 +1496,7 @@ async def _migrate_mongo_db_collection_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1626,7 +1626,7 @@ async def _migrate_mongo_db_collection_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1742,3 +1742,143 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_migrate_mongo_db_collection_to_manual_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore + + async def _retrieve_continuous_backup_information_initial( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + location: "_models.ContinuousBackupRestoreLocation", + **kwargs: Any + ) -> Optional["_models.BackupInformation"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._retrieve_continuous_backup_information_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _retrieve_continuous_backup_information_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation'} # type: ignore + + async def begin_retrieve_continuous_backup_information( + self, + resource_group_name: str, + account_name: str, + database_name: str, + collection_name: str, + location: "_models.ContinuousBackupRestoreLocation", + **kwargs: Any + ) -> AsyncLROPoller["_models.BackupInformation"]: + """Retrieves continuous backup information for a Mongodb collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str + :param location: The name of the continuous backup restore location. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupInformation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._retrieve_continuous_backup_information_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + location=location, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_retrieve_continuous_backup_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation'} # type: ignore diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_notebook_workspaces_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_notebook_workspaces_operations.py index 5488f88866d4..3b20c59ac444 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_notebook_workspaces_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_notebook_workspaces_operations.py @@ -65,7 +65,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -194,7 +194,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -455,7 +455,7 @@ async def list_connection_info( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -505,7 +505,7 @@ async def _regenerate_auth_token_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -621,7 +621,7 @@ async def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_operations.py index bfeb2f139a3d..fc014cbffbfc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_operations.py index af7028cef78f..39b9d129a2fa 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_operations.py @@ -77,7 +77,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py index 1b0d6bcfcdc6..a253dc497cab 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_partition_key_range_id_region_operations.py @@ -81,7 +81,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_operations.py index 2507cadc3b24..015102bfc675 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_operations.py @@ -69,7 +69,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_source_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_source_target_operations.py index c7befa09b341..71802da95a1a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_source_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_source_target_operations.py @@ -77,7 +77,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_target_operations.py index 58c388ca36e4..fb0855e1ac1d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_percentile_target_operations.py @@ -73,7 +73,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_endpoint_connections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_endpoint_connections_operations.py index 62954af56d4a..dfda72c8fb6c 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_endpoint_connections_operations.py @@ -65,7 +65,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -325,7 +325,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py index 816102320c23..b0234e9358cc 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_private_link_resources_operations.py @@ -63,7 +63,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -140,7 +140,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_database_accounts_operations.py index fde3489c5f50..4d5837a758fe 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_database_accounts_operations.py @@ -62,7 +62,7 @@ def list_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -130,7 +130,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -203,7 +203,7 @@ async def get_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py index 6a33eadd6b05..fbde445be87b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_collections_operations.py @@ -68,7 +68,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py index 7ae4d775bcd2..5ad38cfbb2fa 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_databases_operations.py @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py index 7d252b39ff8a..d9196855b756 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_mongodb_resources_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_containers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_containers_operations.py index 6a7094a952ef..c676cfc68a2d 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_containers_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_containers_operations.py @@ -74,7 +74,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_databases_operations.py index d38d7ac721c6..ea9954e37e2b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_databases_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_databases_operations.py @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_resources_operations.py index 437c5c96c68d..cc7e6e7665eb 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_restorable_sql_resources_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_sql_resources_operations.py index aa7430cf409e..2c260024a713 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_sql_resources_operations.py @@ -65,7 +65,7 @@ def list_sql_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,7 @@ async def get_sql_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ async def _create_update_sql_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -326,7 +326,7 @@ async def _delete_sql_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_database_initial.metadata['url'] # type: ignore @@ -453,7 +453,7 @@ async def get_sql_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -503,7 +503,7 @@ async def _update_sql_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -636,7 +636,7 @@ async def _migrate_sql_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -759,7 +759,7 @@ async def _migrate_sql_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -895,7 +895,7 @@ def list_sql_containers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -976,7 +976,7 @@ async def get_sql_container( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1028,7 +1028,7 @@ async def _create_update_sql_container_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1168,7 +1168,7 @@ async def _delete_sql_container_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_container_initial.metadata['url'] # type: ignore @@ -1304,7 +1304,7 @@ async def get_sql_container_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1356,7 +1356,7 @@ async def _update_sql_container_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1496,7 +1496,7 @@ async def _migrate_sql_container_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1626,7 +1626,7 @@ async def _migrate_sql_container_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1771,7 +1771,7 @@ def list_sql_stored_procedures( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1856,7 +1856,7 @@ async def get_sql_stored_procedure( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1910,7 +1910,7 @@ async def _create_update_sql_stored_procedure_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2057,7 +2057,7 @@ async def _delete_sql_stored_procedure_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_stored_procedure_initial.metadata['url'] # type: ignore @@ -2198,7 +2198,7 @@ def list_sql_user_defined_functions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -2283,7 +2283,7 @@ async def get_sql_user_defined_function( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -2337,7 +2337,7 @@ async def _create_update_sql_user_defined_function_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2484,7 +2484,7 @@ async def _delete_sql_user_defined_function_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_user_defined_function_initial.metadata['url'] # type: ignore @@ -2625,7 +2625,7 @@ def list_sql_triggers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -2710,7 +2710,7 @@ async def get_sql_trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -2764,7 +2764,7 @@ async def _create_update_sql_trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2911,7 +2911,7 @@ async def _delete_sql_trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_trigger_initial.metadata['url'] # type: ignore @@ -3049,7 +3049,7 @@ async def get_sql_role_definition( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3099,7 +3099,7 @@ async def _create_update_sql_role_definition_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3232,7 +3232,7 @@ async def _delete_sql_role_definition_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3357,7 +3357,7 @@ def list_sql_role_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -3434,7 +3434,7 @@ async def get_sql_role_assignment( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3484,7 +3484,7 @@ async def _create_update_sql_role_assignment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3617,7 +3617,7 @@ async def _delete_sql_role_assignment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3742,7 +3742,7 @@ def list_sql_role_assignments( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -3808,7 +3808,7 @@ async def _retrieve_continuous_backup_information_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_table_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_table_resources_operations.py index 2e1b0d56c979..eac4de5eaba1 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_table_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/aio/operations/_table_resources_operations.py @@ -65,7 +65,7 @@ def list_tables( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,7 @@ async def get_table( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ async def _create_update_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -324,7 +324,7 @@ async def _delete_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_table_initial.metadata['url'] # type: ignore @@ -451,7 +451,7 @@ async def get_table_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -501,7 +501,7 @@ async def _update_table_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -634,7 +634,7 @@ async def _migrate_table_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -757,7 +757,7 @@ async def _migrate_table_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py index d64473d6369b..67c8e555cd7b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/__init__.py @@ -20,6 +20,9 @@ from ._models_py3 import BackupResource from ._models_py3 import BackupResourceProperties from ._models_py3 import Capability + from ._models_py3 import Capacity + from ._models_py3 import CassandraClusterPublicStatus + from ._models_py3 import CassandraClusterPublicStatusDataCentersItem from ._models_py3 import CassandraKeyspaceCreateUpdateParameters from ._models_py3 import CassandraKeyspaceGetPropertiesOptions from ._models_py3 import CassandraKeyspaceGetPropertiesResource @@ -34,22 +37,18 @@ from ._models_py3 import CassandraTableGetResults from ._models_py3 import CassandraTableListResult from ._models_py3 import CassandraTableResource - from ._models_py3 import CassandraViewCreateUpdateParameters - from ._models_py3 import CassandraViewGetPropertiesOptions - from ._models_py3 import CassandraViewGetPropertiesResource - from ._models_py3 import CassandraViewGetResults - from ._models_py3 import CassandraViewListResult - from ._models_py3 import CassandraViewResource from ._models_py3 import Certificate from ._models_py3 import ClusterKey - from ._models_py3 import ClusterNodeStatus - from ._models_py3 import ClusterNodeStatusNodesItem from ._models_py3 import ClusterResource from ._models_py3 import ClusterResourceProperties from ._models_py3 import Column + from ._models_py3 import CommandOutput + from ._models_py3 import CommandPostBody from ._models_py3 import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties + from ._models_py3 import ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems from ._models_py3 import CompositePath from ._models_py3 import ConflictResolutionPolicy + from ._models_py3 import ConnectionError from ._models_py3 import ConsistencyPolicy from ._models_py3 import ContainerPartitionKey from ._models_py3 import ContinuousBackupInformation @@ -59,9 +58,6 @@ from ._models_py3 import CreateUpdateOptions from ._models_py3 import DataCenterResource from ._models_py3 import DataCenterResourceProperties - from ._models_py3 import DataTransferRegionalServiceResource - from ._models_py3 import DataTransferServiceResource - from ._models_py3 import DataTransferServiceResourceProperties from ._models_py3 import DatabaseAccountConnectionString from ._models_py3 import DatabaseAccountCreateUpdateParameters from ._models_py3 import DatabaseAccountCreateUpdateProperties @@ -105,13 +101,15 @@ from ._models_py3 import Indexes from ._models_py3 import IndexingPolicy from ._models_py3 import IpAddressOrRange - from ._models_py3 import ListBackups from ._models_py3 import ListClusters from ._models_py3 import ListDataCenters from ._models_py3 import Location from ._models_py3 import LocationGetResult from ._models_py3 import LocationListResult from ._models_py3 import LocationProperties + from ._models_py3 import ManagedCassandraARMResourceProperties + from ._models_py3 import ManagedCassandraManagedServiceIdentity + from ._models_py3 import ManagedCassandraReaperStatus from ._models_py3 import ManagedServiceIdentity from ._models_py3 import Metric from ._models_py3 import MetricAvailability @@ -185,10 +183,6 @@ from ._models_py3 import RestorableSqlResourcesListResult from ._models_py3 import RestoreParameters from ._models_py3 import SeedNode - from ._models_py3 import ServiceResource - from ._models_py3 import ServiceResourceCreateUpdateParameters - from ._models_py3 import ServiceResourceListResult - from ._models_py3 import ServiceResourceProperties from ._models_py3 import SpatialSpec from ._models_py3 import SqlContainerCreateUpdateParameters from ._models_py3 import SqlContainerGetPropertiesOptions @@ -257,6 +251,9 @@ from ._models import BackupResource # type: ignore from ._models import BackupResourceProperties # type: ignore from ._models import Capability # type: ignore + from ._models import Capacity # type: ignore + from ._models import CassandraClusterPublicStatus # type: ignore + from ._models import CassandraClusterPublicStatusDataCentersItem # type: ignore from ._models import CassandraKeyspaceCreateUpdateParameters # type: ignore from ._models import CassandraKeyspaceGetPropertiesOptions # type: ignore from ._models import CassandraKeyspaceGetPropertiesResource # type: ignore @@ -271,22 +268,18 @@ from ._models import CassandraTableGetResults # type: ignore from ._models import CassandraTableListResult # type: ignore from ._models import CassandraTableResource # type: ignore - from ._models import CassandraViewCreateUpdateParameters # type: ignore - from ._models import CassandraViewGetPropertiesOptions # type: ignore - from ._models import CassandraViewGetPropertiesResource # type: ignore - from ._models import CassandraViewGetResults # type: ignore - from ._models import CassandraViewListResult # type: ignore - from ._models import CassandraViewResource # type: ignore from ._models import Certificate # type: ignore from ._models import ClusterKey # type: ignore - from ._models import ClusterNodeStatus # type: ignore - from ._models import ClusterNodeStatusNodesItem # type: ignore from ._models import ClusterResource # type: ignore from ._models import ClusterResourceProperties # type: ignore from ._models import Column # type: ignore + from ._models import CommandOutput # type: ignore + from ._models import CommandPostBody # type: ignore from ._models import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore + from ._models import ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems # type: ignore from ._models import CompositePath # type: ignore from ._models import ConflictResolutionPolicy # type: ignore + from ._models import ConnectionError # type: ignore from ._models import ConsistencyPolicy # type: ignore from ._models import ContainerPartitionKey # type: ignore from ._models import ContinuousBackupInformation # type: ignore @@ -296,9 +289,6 @@ from ._models import CreateUpdateOptions # type: ignore from ._models import DataCenterResource # type: ignore from ._models import DataCenterResourceProperties # type: ignore - from ._models import DataTransferRegionalServiceResource # type: ignore - from ._models import DataTransferServiceResource # type: ignore - from ._models import DataTransferServiceResourceProperties # type: ignore from ._models import DatabaseAccountConnectionString # type: ignore from ._models import DatabaseAccountCreateUpdateParameters # type: ignore from ._models import DatabaseAccountCreateUpdateProperties # type: ignore @@ -342,13 +332,15 @@ from ._models import Indexes # type: ignore from ._models import IndexingPolicy # type: ignore from ._models import IpAddressOrRange # type: ignore - from ._models import ListBackups # type: ignore from ._models import ListClusters # type: ignore from ._models import ListDataCenters # type: ignore from ._models import Location # type: ignore from ._models import LocationGetResult # type: ignore from ._models import LocationListResult # type: ignore from ._models import LocationProperties # type: ignore + from ._models import ManagedCassandraARMResourceProperties # type: ignore + from ._models import ManagedCassandraManagedServiceIdentity # type: ignore + from ._models import ManagedCassandraReaperStatus # type: ignore from ._models import ManagedServiceIdentity # type: ignore from ._models import Metric # type: ignore from ._models import MetricAvailability # type: ignore @@ -422,10 +414,6 @@ from ._models import RestorableSqlResourcesListResult # type: ignore from ._models import RestoreParameters # type: ignore from ._models import SeedNode # type: ignore - from ._models import ServiceResource # type: ignore - from ._models import ServiceResourceCreateUpdateParameters # type: ignore - from ._models import ServiceResourceListResult # type: ignore - from ._models import ServiceResourceProperties # type: ignore from ._models import SpatialSpec # type: ignore from ._models import SqlContainerCreateUpdateParameters # type: ignore from ._models import SqlContainerGetPropertiesOptions # type: ignore @@ -490,6 +478,7 @@ BackupStorageRedundancy, CompositePathSortOrder, ConflictResolutionMode, + ConnectionState, ConnectorOffer, CreateMode, CreatedByType, @@ -501,6 +490,7 @@ IndexingMode, KeyKind, ManagedCassandraProvisioningState, + ManagedCassandraResourceIdentityType, NetworkAclBypass, NodeState, NodeStatus, @@ -536,6 +526,9 @@ 'BackupResource', 'BackupResourceProperties', 'Capability', + 'Capacity', + 'CassandraClusterPublicStatus', + 'CassandraClusterPublicStatusDataCentersItem', 'CassandraKeyspaceCreateUpdateParameters', 'CassandraKeyspaceGetPropertiesOptions', 'CassandraKeyspaceGetPropertiesResource', @@ -550,22 +543,18 @@ 'CassandraTableGetResults', 'CassandraTableListResult', 'CassandraTableResource', - 'CassandraViewCreateUpdateParameters', - 'CassandraViewGetPropertiesOptions', - 'CassandraViewGetPropertiesResource', - 'CassandraViewGetResults', - 'CassandraViewListResult', - 'CassandraViewResource', 'Certificate', 'ClusterKey', - 'ClusterNodeStatus', - 'ClusterNodeStatusNodesItem', 'ClusterResource', 'ClusterResourceProperties', 'Column', + 'CommandOutput', + 'CommandPostBody', 'Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems', 'CompositePath', 'ConflictResolutionPolicy', + 'ConnectionError', 'ConsistencyPolicy', 'ContainerPartitionKey', 'ContinuousBackupInformation', @@ -575,9 +564,6 @@ 'CreateUpdateOptions', 'DataCenterResource', 'DataCenterResourceProperties', - 'DataTransferRegionalServiceResource', - 'DataTransferServiceResource', - 'DataTransferServiceResourceProperties', 'DatabaseAccountConnectionString', 'DatabaseAccountCreateUpdateParameters', 'DatabaseAccountCreateUpdateProperties', @@ -621,13 +607,15 @@ 'Indexes', 'IndexingPolicy', 'IpAddressOrRange', - 'ListBackups', 'ListClusters', 'ListDataCenters', 'Location', 'LocationGetResult', 'LocationListResult', 'LocationProperties', + 'ManagedCassandraARMResourceProperties', + 'ManagedCassandraManagedServiceIdentity', + 'ManagedCassandraReaperStatus', 'ManagedServiceIdentity', 'Metric', 'MetricAvailability', @@ -701,10 +689,6 @@ 'RestorableSqlResourcesListResult', 'RestoreParameters', 'SeedNode', - 'ServiceResource', - 'ServiceResourceCreateUpdateParameters', - 'ServiceResourceListResult', - 'ServiceResourceProperties', 'SpatialSpec', 'SqlContainerCreateUpdateParameters', 'SqlContainerGetPropertiesOptions', @@ -767,6 +751,7 @@ 'BackupStorageRedundancy', 'CompositePathSortOrder', 'ConflictResolutionMode', + 'ConnectionState', 'ConnectorOffer', 'CreateMode', 'CreatedByType', @@ -778,6 +763,7 @@ 'IndexingMode', 'KeyKind', 'ManagedCassandraProvisioningState', + 'ManagedCassandraResourceIdentityType', 'NetworkAclBypass', 'NodeState', 'NodeStatus', diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py index ec0159dc473f..4ae00acf8afe 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_cosmos_db_management_client_enums.py @@ -91,6 +91,17 @@ class ConflictResolutionMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) LAST_WRITER_WINS = "LastWriterWins" CUSTOM = "Custom" +class ConnectionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The kind of connection error that occurred. + """ + + UNKNOWN = "Unknown" + OK = "OK" + OPERATOR_TO_DATA_CENTER_NETWORK_ERROR = "OperatorToDataCenterNetworkError" + DATACENTER_TO_DATACENTER_NETWORK_ERROR = "DatacenterToDatacenterNetworkError" + INTERNAL_OPERATOR_TO_DATA_CENTER_CERTIFICATE_ERROR = "InternalOperatorToDataCenterCertificateError" + INTERNAL_ERROR = "InternalError" + class ConnectorOffer(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The cassandra connector offer type for the Cosmos DB C* database account. """ @@ -186,6 +197,13 @@ class ManagedCassandraProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, FAILED = "Failed" CANCELED = "Canceled" +class ManagedCassandraResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the resource. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + NONE = "None" + class NetworkAclBypass(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates what services are allowed to bypass firewall checks. """ @@ -194,7 +212,7 @@ class NetworkAclBypass(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): AZURE_SERVICES = "AzureServices" class NodeState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of the node in relation to the cluster. + """The state of the node in Cassandra ring. """ NORMAL = "Normal" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py index 375a62305b6c..4ba2282eec61 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models.py @@ -380,6 +380,93 @@ def __init__( self.name = kwargs.get('name', None) +class Capacity(msrest.serialization.Model): + """The object that represents all properties related to capacity enforcement on an account. + + :param total_throughput_limit: The total throughput limit imposed on the account. A + totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned + on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of + throughput. + :type total_throughput_limit: int + """ + + _validation = { + 'total_throughput_limit': {'minimum': -1}, + } + + _attribute_map = { + 'total_throughput_limit': {'key': 'totalThroughputLimit', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(Capacity, self).__init__(**kwargs) + self.total_throughput_limit = kwargs.get('total_throughput_limit', None) + + +class CassandraClusterPublicStatus(msrest.serialization.Model): + """Properties of a managed Cassandra cluster public status. + + :param e_tag: + :type e_tag: str + :param reaper_status: + :type reaper_status: ~azure.mgmt.cosmosdb.models.ManagedCassandraReaperStatus + :param connection_errors: List relevant information about any connection errors to the + Datacenters. + :type connection_errors: list[~azure.mgmt.cosmosdb.models.ConnectionError] + :param data_centers: List of the status of each datacenter in this cluster. + :type data_centers: + list[~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatusDataCentersItem] + """ + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'reaper_status': {'key': 'reaperStatus', 'type': 'ManagedCassandraReaperStatus'}, + 'connection_errors': {'key': 'connectionErrors', 'type': '[ConnectionError]'}, + 'data_centers': {'key': 'dataCenters', 'type': '[CassandraClusterPublicStatusDataCentersItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(CassandraClusterPublicStatus, self).__init__(**kwargs) + self.e_tag = kwargs.get('e_tag', None) + self.reaper_status = kwargs.get('reaper_status', None) + self.connection_errors = kwargs.get('connection_errors', None) + self.data_centers = kwargs.get('data_centers', None) + + +class CassandraClusterPublicStatusDataCentersItem(msrest.serialization.Model): + """CassandraClusterPublicStatusDataCentersItem. + + :param name: The name of this Datacenter. + :type name: str + :param seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged. + :type seed_nodes: list[str] + :param nodes: + :type nodes: + list[~azure.mgmt.cosmosdb.models.ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[str]'}, + 'nodes': {'key': 'nodes', 'type': '[ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems]'}, + } + + def __init__( + self, + **kwargs + ): + super(CassandraClusterPublicStatusDataCentersItem, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.seed_nodes = kwargs.get('seed_nodes', None) + self.nodes = kwargs.get('nodes', None) + + class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB Cassandra keyspace. @@ -964,8 +1051,27 @@ def __init__( self.value = None -class CassandraViewCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB Cassandra view. +class Certificate(msrest.serialization.Model): + """Certificate. + + :param pem: PEM formatted public key. + :type pem: str + """ + + _attribute_map = { + 'pem': {'key': 'pem', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Certificate, self).__init__(**kwargs) + self.pem = kwargs.get('pem', None) + + +class ClusterKey(msrest.serialization.Model): + """Cosmos DB Cassandra table cluster key. Variables are only populated by the server, and will be ignored when sending a request. @@ -1022,108 +1128,60 @@ def __init__( self.options = kwargs.get('options', None) -class CassandraViewGetPropertiesOptions(OptionsResource): - """CassandraViewGetPropertiesOptions. - - :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the - ThroughputSetting resource when retrieving offer details. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings - """ - - _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, - } - - def __init__( - self, - **kwargs - ): - super(CassandraViewGetPropertiesOptions, self).__init__(**kwargs) - - -class CassandraViewResource(msrest.serialization.Model): - """Cosmos DB Cassandra view resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Cassandra view. - :type id: str - :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. - :type view_definition: str - """ - - _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(CassandraViewResource, self).__init__(**kwargs) - self.id = kwargs['id'] - self.view_definition = kwargs['view_definition'] - - -class CassandraViewGetPropertiesResource(ExtendedResourceProperties, CassandraViewResource): - """CassandraViewGetPropertiesResource. +class ManagedCassandraARMResourceProperties(msrest.serialization.Model): + """The core properties of ARM resources. 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 id: Required. Name of the Cosmos DB Cassandra view. - :type id: str - :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. - :type view_definition: str - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity """ _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, } def __init__( self, **kwargs ): - super(CassandraViewGetPropertiesResource, self).__init__(**kwargs) - self.id = kwargs['id'] - self.view_definition = kwargs['view_definition'] - self.rid = None - self.ts = None - self.etag = None + super(ManagedCassandraARMResourceProperties, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) -class CassandraViewGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra view. +class ClusterResource(ManagedCassandraARMResourceProperties): + """Representation of a managed Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. @@ -1143,11 +1201,9 @@ class CassandraViewGetResults(ARMResourceProperties): also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: - :type resource: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesResource - :param options: - :type options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions + :type identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity + :param properties: Properties of a managed Cassandra cluster. + :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties """ _validation = { @@ -1162,168 +1218,385 @@ class CassandraViewGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'CassandraViewGetPropertiesOptions'}, + 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, } def __init__( self, **kwargs ): - super(CassandraViewGetResults, self).__init__(**kwargs) - self.resource = kwargs.get('resource', None) - self.options = kwargs.get('options', None) + super(ClusterResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) -class CassandraViewListResult(msrest.serialization.Model): - """The List operation response, that contains the Cassandra views and their properties. +class ClusterResourceProperties(msrest.serialization.Model): + """Properties of a managed Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: List of Cassandra views and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + :param provisioning_state: The status of the resource at the time the operation was called. + Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState + :param restore_from_backup_id: To create an empty cluster, omit this field or set it to null. + To restore a backup into a new cluster, set this field to the resource id of the backup. + :type restore_from_backup_id: str + :param delegated_management_subnet_id: Resource id of a subnet that this cluster's management + service should have its network interface attached to. The subnet must be routable to all + subnets that will be delegated to data centers. The resource id must be of the form + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. + :type delegated_management_subnet_id: str + :param cassandra_version: Which version of Cassandra should this cluster converge to running + (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version. + :type cassandra_version: str + :param cluster_name_override: If you need to set the clusterName property in cassandra.yaml to + something besides the resource name of the cluster, set the value to use on this property. + :type cluster_name_override: str + :param authentication_method: Which authentication method Cassandra should use to authenticate + clients. 'None' turns off authentication, so should not be used except in emergencies. + 'Cassandra' is the default password based authentication. The default is 'Cassandra'. Possible + values include: "None", "Cassandra". + :type authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod + :param initial_cassandra_admin_password: Initial password for clients connecting as admin to + the cluster. Should be changed after cluster creation. Returns null on GET. This field only + applies when the authenticationMethod field is 'Cassandra'. + :type initial_cassandra_admin_password: str + :param prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing + data about the managed Cassandra nodes can be reached. + :type prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode + :param repair_enabled: Should automatic repairs run on this cluster? If omitted, this is true, + and should stay true unless you are running a hybrid cluster where you are already doing your + own repairs. + :type repair_enabled: bool + :param client_certificates: List of TLS certificates used to authorize clients connecting to + the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if + clientCertificates is set, the managed Cassandra cluster will reject all connections not + bearing a TLS client certificate that can be validated from one or more of the public + certificates in this property. + :type client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] + :param external_gossip_certificates: List of TLS certificates used to authorize gossip from + unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be + verifiable using one of the certificates provided in this property. + :type external_gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] + :ivar gossip_certificates: List of TLS certificates that unmanaged nodes must trust for gossip + with managed nodes. All managed nodes will present TLS client certificates that are verifiable + using one of the certificates provided in this property. + :vartype gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] + :param external_seed_nodes: List of IP addresses of seed nodes in unmanaged data centers. These + will be added to the seed node lists of all managed nodes. + :type external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :ivar seed_nodes: List of IP addresses of seed nodes in the managed data centers. These should + be added to the seed node lists of all unmanaged nodes. + :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. + To disable backups, set this property to 0. + :type hours_between_backups: int + :param deallocated: Whether the cluster and associated data centers has been deallocated. + :type deallocated: bool + :param cassandra_audit_logging_enabled: Whether Cassandra audit logging is enabled. + :type cassandra_audit_logging_enabled: bool """ _validation = { - 'value': {'readonly': True}, + 'gossip_certificates': {'readonly': True}, + 'seed_nodes': {'readonly': True}, } _attribute_map = { - 'value': {'key': 'value', 'type': '[CassandraViewGetResults]'}, - } + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'restore_from_backup_id': {'key': 'restoreFromBackupId', 'type': 'str'}, + 'delegated_management_subnet_id': {'key': 'delegatedManagementSubnetId', 'type': 'str'}, + 'cassandra_version': {'key': 'cassandraVersion', 'type': 'str'}, + 'cluster_name_override': {'key': 'clusterNameOverride', 'type': 'str'}, + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'initial_cassandra_admin_password': {'key': 'initialCassandraAdminPassword', 'type': 'str'}, + 'prometheus_endpoint': {'key': 'prometheusEndpoint', 'type': 'SeedNode'}, + 'repair_enabled': {'key': 'repairEnabled', 'type': 'bool'}, + 'client_certificates': {'key': 'clientCertificates', 'type': '[Certificate]'}, + 'external_gossip_certificates': {'key': 'externalGossipCertificates', 'type': '[Certificate]'}, + 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, + 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, + 'deallocated': {'key': 'deallocated', 'type': 'bool'}, + 'cassandra_audit_logging_enabled': {'key': 'cassandraAuditLoggingEnabled', 'type': 'bool'}, + } def __init__( self, **kwargs ): - super(CassandraViewListResult, self).__init__(**kwargs) - self.value = None + super(ClusterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.restore_from_backup_id = kwargs.get('restore_from_backup_id', None) + self.delegated_management_subnet_id = kwargs.get('delegated_management_subnet_id', None) + self.cassandra_version = kwargs.get('cassandra_version', None) + self.cluster_name_override = kwargs.get('cluster_name_override', None) + self.authentication_method = kwargs.get('authentication_method', None) + self.initial_cassandra_admin_password = kwargs.get('initial_cassandra_admin_password', None) + self.prometheus_endpoint = kwargs.get('prometheus_endpoint', None) + self.repair_enabled = kwargs.get('repair_enabled', None) + self.client_certificates = kwargs.get('client_certificates', None) + self.external_gossip_certificates = kwargs.get('external_gossip_certificates', None) + self.gossip_certificates = None + self.external_seed_nodes = kwargs.get('external_seed_nodes', None) + self.seed_nodes = None + self.hours_between_backups = kwargs.get('hours_between_backups', None) + self.deallocated = kwargs.get('deallocated', None) + self.cassandra_audit_logging_enabled = kwargs.get('cassandra_audit_logging_enabled', None) -class Certificate(msrest.serialization.Model): - """Certificate. +class Column(msrest.serialization.Model): + """Cosmos DB Cassandra table column. - :param pem: PEM formatted public key. - :type pem: str + :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + :param autoscale_settings: Specifies the Autoscale settings. + :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ _attribute_map = { - 'pem': {'key': 'pem', 'type': 'str'}, + 'throughput': {'key': 'throughput', 'type': 'int'}, + 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, } def __init__( self, **kwargs ): - super(Certificate, self).__init__(**kwargs) - self.pem = kwargs.get('pem', None) + super(CassandraViewGetPropertiesOptions, self).__init__(**kwargs) -class ClusterKey(msrest.serialization.Model): - """Cosmos DB Cassandra table cluster key. +class CommandOutput(msrest.serialization.Model): + """Response of /command api. - :param name: Name of the Cosmos DB Cassandra table cluster key. - :type name: str - :param order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and - "Desc". - :type order_by: str + :param command_output: Output of the command. + :type command_output: str """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order_by': {'key': 'orderBy', 'type': 'str'}, + 'command_output': {'key': 'commandOutput', 'type': 'str'}, } def __init__( self, **kwargs ): - super(ClusterKey, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.order_by = kwargs.get('order_by', None) + super(CommandOutput, self).__init__(**kwargs) + self.command_output = kwargs.get('command_output', None) -class ClusterNodeStatus(msrest.serialization.Model): - """The status of all nodes in the cluster (as returned by 'nodetool status'). +class CommandPostBody(msrest.serialization.Model): + """Specification of which command to run where. - :param nodes: Information about nodes in the cluster (corresponds to what is returned from - nodetool info). - :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] + All required parameters must be populated in order to send to Azure. + + :param command: Required. The command which should be run. + :type command: str + :param arguments: The arguments for the command to be run. + :type arguments: dict[str, str] + :param host: Required. IP address of the cassandra host to run the command on. + :type host: str + :param cassandra_stop_start: If true, stops cassandra before executing the command and then + start it again. + :type cassandra_stop_start: bool + :param readwrite: If true, allows the command to *write* to the cassandra directory, otherwise + read-only. + :type readwrite: bool """ + _validation = { + 'command': {'required': True}, + 'host': {'required': True}, + } + _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, + 'command': {'key': 'command', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '{str}'}, + 'host': {'key': 'host', 'type': 'str'}, + 'cassandra_stop_start': {'key': 'cassandra-stop-start', 'type': 'bool'}, + 'readwrite': {'key': 'readwrite', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(ClusterNodeStatus, self).__init__(**kwargs) - self.nodes = kwargs.get('nodes', None) + super(CommandPostBody, self).__init__(**kwargs) + self.command = kwargs['command'] + self.arguments = kwargs.get('arguments', None) + self.host = kwargs['host'] + self.cassandra_stop_start = kwargs.get('cassandra_stop_start', None) + self.readwrite = kwargs.get('readwrite', None) -class ClusterNodeStatusNodesItem(msrest.serialization.Model): - """ClusterNodeStatusNodesItem. +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. - :param datacenter: The Cassandra data center this node resides in. - :type datacenter: str - :param status: Indicates whether the node is functioning or not. Possible values include: "Up", - "Down". - :type status: str or ~azure.mgmt.cosmosdb.models.NodeStatus - :param state: The state of the node in relation to the cluster. Possible values include: - "Normal", "Leaving", "Joining", "Moving", "Stopped". - :type state: str or ~azure.mgmt.cosmosdb.models.NodeState - :param address: The node's URL. + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Cassandra view. + :type id: str + :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. + :type view_definition: str + """ + + _validation = { + 'id': {'required': True}, + 'view_definition': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CassandraViewResource, self).__init__(**kwargs) + self.id = kwargs['id'] + self.view_definition = kwargs['view_definition'] + + +class ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems(msrest.serialization.Model): + """ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems. + + :param address: The node's IP address. :type address: str - :param load: The amount of file system data in the data directory (e.g., 47.66 KB), excluding + :param state: The state of the node in Cassandra ring. Possible values include: "Normal", + "Leaving", "Joining", "Moving", "Stopped". + :type state: str or ~azure.mgmt.cosmosdb.models.NodeState + :param status: + :type status: str + :param load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding all content in the snapshots subdirectories. Because all SSTable data files are included, any - data that is not cleaned up (such as TTL-expired cell or tombstoned data) is counted. + data that is not cleaned up (such as TTL-expired cells or tombstones) is counted. :type load: str - :param tokens: List of tokens. + :param tokens: List of tokens this node covers. :type tokens: list[str] - :param owns: The percentage of the data owned by the node per datacenter times the replication - factor (e.g., 33.3, or null if the data is not available). For example, a node can own 33% of - the ring, but shows 100% if the replication factor is 3. For non-system keyspaces, the endpoint - percentage ownership information is shown. - :type owns: float + :param size: + :type size: int :param host_id: The network ID of the node. :type host_id: str :param rack: The rack this node is part of. :type rack: str + :param timestamp: The timestamp when these statistics were captured. + :type timestamp: str + :param disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra. + :type disk_used_kb: long + :param disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra. + :type disk_free_kb: long + :param memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB. + :type memory_used_kb: long + :param memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo) + and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB. + :type memory_buffers_and_cached_kb: long + :param memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. + :type memory_free_kb: long + :param memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in + kB. + :type memory_total_kb: long + :param cpu_usage: A float representing the current system-wide CPU utilization as a percentage. + :type cpu_usage: float """ _attribute_map = { - 'datacenter': {'key': 'datacenter', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, 'address': {'key': 'address', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, 'load': {'key': 'load', 'type': 'str'}, 'tokens': {'key': 'tokens', 'type': '[str]'}, - 'owns': {'key': 'owns', 'type': 'float'}, - 'host_id': {'key': 'hostId', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'int'}, + 'host_id': {'key': 'hostID', 'type': 'str'}, 'rack': {'key': 'rack', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'disk_used_kb': {'key': 'diskUsedKB', 'type': 'long'}, + 'disk_free_kb': {'key': 'diskFreeKB', 'type': 'long'}, + 'memory_used_kb': {'key': 'memoryUsedKB', 'type': 'long'}, + 'memory_buffers_and_cached_kb': {'key': 'memoryBuffersAndCachedKB', 'type': 'long'}, + 'memory_free_kb': {'key': 'memoryFreeKB', 'type': 'long'}, + 'memory_total_kb': {'key': 'memoryTotalKB', 'type': 'long'}, + 'cpu_usage': {'key': 'cpuUsage', 'type': 'float'}, } def __init__( self, **kwargs ): - super(ClusterNodeStatusNodesItem, self).__init__(**kwargs) - self.datacenter = kwargs.get('datacenter', None) - self.status = kwargs.get('status', None) - self.state = kwargs.get('state', None) + super(ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems, self).__init__(**kwargs) self.address = kwargs.get('address', None) + self.state = kwargs.get('state', None) + self.status = kwargs.get('status', None) self.load = kwargs.get('load', None) self.tokens = kwargs.get('tokens', None) - self.owns = kwargs.get('owns', None) + self.size = kwargs.get('size', None) self.host_id = kwargs.get('host_id', None) self.rack = kwargs.get('rack', None) + self.timestamp = kwargs.get('timestamp', None) + self.disk_used_kb = kwargs.get('disk_used_kb', None) + self.disk_free_kb = kwargs.get('disk_free_kb', None) + self.memory_used_kb = kwargs.get('memory_used_kb', None) + self.memory_buffers_and_cached_kb = kwargs.get('memory_buffers_and_cached_kb', None) + self.memory_free_kb = kwargs.get('memory_free_kb', None) + self.memory_total_kb = kwargs.get('memory_total_kb', None) + self.cpu_usage = kwargs.get('cpu_usage', None) -class ClusterResource(ARMResourceProperties): - """Representation of a managed Cassandra cluster. +class CompositePath(msrest.serialization.Model): + """CompositePath. + + 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 id: Required. Name of the Cosmos DB Cassandra view. + :type id: str + :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. + :type view_definition: str + :ivar rid: A system generated property. A unique identifier. + :vartype rid: str + :ivar ts: A system generated property that denotes the last updated timestamp of the resource. + :vartype ts: float + :ivar etag: A system generated property representing the resource etag required for optimistic + concurrency control. + :vartype etag: str + """ + + _validation = { + 'id': {'required': True}, + 'view_definition': {'required': True}, + 'rid': {'readonly': True}, + 'ts': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, + 'rid': {'key': '_rid', 'type': 'str'}, + 'ts': {'key': '_ts', 'type': 'float'}, + 'etag': {'key': '_etag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CassandraViewGetPropertiesResource, self).__init__(**kwargs) + self.id = kwargs['id'] + self.view_definition = kwargs['view_definition'] + self.rid = None + self.ts = None + self.etag = None + + +class CassandraViewGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra view. Variables are only populated by the server, and will be ignored when sending a request. @@ -1344,8 +1617,10 @@ class ClusterResource(ARMResourceProperties): :type tags: dict[str, str] :param identity: Identity for the resource. :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param properties: Properties of a managed Cassandra cluster. - :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties + :param resource: + :type resource: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesResource + :param options: + :type options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions """ _validation = { @@ -1361,54 +1636,289 @@ class ClusterResource(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraViewGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'CassandraViewGetPropertiesOptions'}, } def __init__( self, **kwargs ): - super(ClusterResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) + super(CassandraViewGetResults, self).__init__(**kwargs) + self.resource = kwargs.get('resource', None) + self.options = kwargs.get('options', None) -class ClusterResourceProperties(msrest.serialization.Model): - """Properties of a managed Cassandra cluster. +class ConnectionError(msrest.serialization.Model): + """ConnectionError. + + :param connection_state: The kind of connection error that occurred. Possible values include: + "Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError", + "InternalOperatorToDataCenterCertificateError", "InternalError". + :type connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState + :param i_p_from: The IP of host that originated the failed connection. + :type i_p_from: str + :param i_p_to: The IP that the connection attempted to reach. + :type i_p_to: str + :param port: The TCP port the connection was attempted on. + :type port: int + :param exception: Detailed error message about the failed connection. + :type exception: str + """ + + _attribute_map = { + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'i_p_from': {'key': 'iPFrom', 'type': 'str'}, + 'i_p_to': {'key': 'iPTo', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'exception': {'key': 'exception', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionError, self).__init__(**kwargs) + self.connection_state = kwargs.get('connection_state', None) + self.i_p_from = kwargs.get('i_p_from', None) + self.i_p_to = kwargs.get('i_p_to', None) + self.port = kwargs.get('port', None) + self.exception = kwargs.get('exception', None) + + +class ConsistencyPolicy(msrest.serialization.Model): + """The consistency policy for the Cosmos DB database account. Variables are only populated by the server, and will be ignored when sending a request. - :param provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". - :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :param restore_from_backup_id: To create an empty cluster, omit this field or set it to null. - To restore a backup into a new cluster, set this field to the resource id of the backup. - :type restore_from_backup_id: str - :param delegated_management_subnet_id: Resource id of a subnet that this cluster's management - service should have its network interface attached to. The subnet must be routable to all - subnets that will be delegated to data centers. The resource id must be of the form - '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. - :type delegated_management_subnet_id: str - :param cassandra_version: Which version of Cassandra should this cluster converge to running - (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version. - :type cassandra_version: str - :param cluster_name_override: If you need to set the clusterName property in cassandra.yaml to - something besides the resource name of the cluster, set the value to use on this property. - :type cluster_name_override: str - :param authentication_method: Which authentication method Cassandra should use to authenticate - clients. 'None' turns off authentication, so should not be used except in emergencies. - 'Cassandra' is the default password based authentication. The default is 'Cassandra'. Possible - values include: "None", "Cassandra". - :type authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod - :param initial_cassandra_admin_password: Initial password for clients connecting as admin to - the cluster. Should be changed after cluster creation. Returns null on GET. This field only - applies when the authenticationMethod field is 'Cassandra'. - :type initial_cassandra_admin_password: str - :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. - To disable backups, set this property to 0. - :type hours_between_backups: int - :param prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing + :ivar value: List of Cassandra views and their properties. + :vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CassandraViewGetResults]'}, + } + + def __init__( + self, + **kwargs + ): + super(CassandraViewListResult, self).__init__(**kwargs) + self.value = None + + +class Certificate(msrest.serialization.Model): + """Certificate. + + :param pem: PEM formatted public key. + :type pem: str + """ + + _attribute_map = { + 'pem': {'key': 'pem', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Certificate, self).__init__(**kwargs) + self.pem = kwargs.get('pem', None) + + +class ClusterKey(msrest.serialization.Model): + """Cosmos DB Cassandra table cluster key. + + :param name: Name of the Cosmos DB Cassandra table cluster key. + :type name: str + :param order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and + "Desc". + :type order_by: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterKey, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.order_by = kwargs.get('order_by', None) + + +class ClusterNodeStatus(msrest.serialization.Model): + """The status of all nodes in the cluster (as returned by 'nodetool status'). + + :param nodes: Information about nodes in the cluster (corresponds to what is returned from + nodetool info). + :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] + """ + + _attribute_map = { + 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterNodeStatus, self).__init__(**kwargs) + self.nodes = kwargs.get('nodes', None) + + +class ClusterNodeStatusNodesItem(msrest.serialization.Model): + """ClusterNodeStatusNodesItem. + + :param datacenter: The Cassandra data center this node resides in. + :type datacenter: str + :param status: Indicates whether the node is functioning or not. Possible values include: "Up", + "Down". + :type status: str or ~azure.mgmt.cosmosdb.models.NodeStatus + :param state: The state of the node in relation to the cluster. Possible values include: + "Normal", "Leaving", "Joining", "Moving", "Stopped". + :type state: str or ~azure.mgmt.cosmosdb.models.NodeState + :param address: The node's URL. + :type address: str + :param load: The amount of file system data in the data directory (e.g., 47.66 KB), excluding + all content in the snapshots subdirectories. Because all SSTable data files are included, any + data that is not cleaned up (such as TTL-expired cell or tombstoned data) is counted. + :type load: str + :param tokens: List of tokens. + :type tokens: list[str] + :param owns: The percentage of the data owned by the node per datacenter times the replication + factor (e.g., 33.3, or null if the data is not available). For example, a node can own 33% of + the ring, but shows 100% if the replication factor is 3. For non-system keyspaces, the endpoint + percentage ownership information is shown. + :type owns: float + :param host_id: The network ID of the node. + :type host_id: str + :param rack: The rack this node is part of. + :type rack: str + """ + + _attribute_map = { + 'datacenter': {'key': 'datacenter', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'load': {'key': 'load', 'type': 'str'}, + 'tokens': {'key': 'tokens', 'type': '[str]'}, + 'owns': {'key': 'owns', 'type': 'float'}, + 'host_id': {'key': 'hostId', 'type': 'str'}, + 'rack': {'key': 'rack', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterNodeStatusNodesItem, self).__init__(**kwargs) + self.datacenter = kwargs.get('datacenter', None) + self.status = kwargs.get('status', None) + self.state = kwargs.get('state', None) + self.address = kwargs.get('address', None) + self.load = kwargs.get('load', None) + self.tokens = kwargs.get('tokens', None) + self.owns = kwargs.get('owns', None) + self.host_id = kwargs.get('host_id', None) + self.rack = kwargs.get('rack', None) + + +class ClusterResource(ARMResourceProperties): + """Representation of a managed Cassandra cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity + :param properties: Properties of a managed Cassandra cluster. + :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ClusterResourceProperties(msrest.serialization.Model): + """Properties of a managed Cassandra cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param provisioning_state: The status of the resource at the time the operation was called. + Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState + :param restore_from_backup_id: To create an empty cluster, omit this field or set it to null. + To restore a backup into a new cluster, set this field to the resource id of the backup. + :type restore_from_backup_id: str + :param delegated_management_subnet_id: Resource id of a subnet that this cluster's management + service should have its network interface attached to. The subnet must be routable to all + subnets that will be delegated to data centers. The resource id must be of the form + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. + :type delegated_management_subnet_id: str + :param cassandra_version: Which version of Cassandra should this cluster converge to running + (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version. + :type cassandra_version: str + :param cluster_name_override: If you need to set the clusterName property in cassandra.yaml to + something besides the resource name of the cluster, set the value to use on this property. + :type cluster_name_override: str + :param authentication_method: Which authentication method Cassandra should use to authenticate + clients. 'None' turns off authentication, so should not be used except in emergencies. + 'Cassandra' is the default password based authentication. The default is 'Cassandra'. Possible + values include: "None", "Cassandra". + :type authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod + :param initial_cassandra_admin_password: Initial password for clients connecting as admin to + the cluster. Should be changed after cluster creation. Returns null on GET. This field only + applies when the authenticationMethod field is 'Cassandra'. + :type initial_cassandra_admin_password: str + :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. + To disable backups, set this property to 0. + :type hours_between_backups: int + :param prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached. :type prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode :param repair_enabled: Should automatic repairs run on this cluster? If omitted, this is true, @@ -1551,301 +2061,6 @@ class CompositePath(msrest.serialization.Model): 'order': {'key': 'order', 'type': 'str'}, } - def __init__( - self, - **kwargs - ): - super(CompositePath, self).__init__(**kwargs) - self.path = kwargs.get('path', None) - self.order = kwargs.get('order', None) - - -class ConflictResolutionPolicy(msrest.serialization.Model): - """The conflict resolution policy for the container. - - :param mode: Indicates the conflict resolution mode. Possible values include: "LastWriterWins", - "Custom". Default value: "LastWriterWins". - :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode - :param conflict_resolution_path: The conflict resolution path in the case of LastWriterWins - mode. - :type conflict_resolution_path: str - :param conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom - mode. - :type conflict_resolution_procedure: str - """ - - _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, - 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ConflictResolutionPolicy, self).__init__(**kwargs) - self.mode = kwargs.get('mode', "LastWriterWins") - self.conflict_resolution_path = kwargs.get('conflict_resolution_path', None) - self.conflict_resolution_procedure = kwargs.get('conflict_resolution_procedure', None) - - -class ConsistencyPolicy(msrest.serialization.Model): - """The consistency policy for the Cosmos DB database account. - - All required parameters must be populated in order to send to Azure. - - :param default_consistency_level: Required. The default consistency level and configuration - settings of the Cosmos DB account. Possible values include: "Eventual", "Session", - "BoundedStaleness", "Strong", "ConsistentPrefix". - :type default_consistency_level: str or ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel - :param max_staleness_prefix: When used with the Bounded Staleness consistency level, this value - represents the number of stale requests tolerated. Accepted range for this value is 1 – - 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness consistency level, this - value represents the time amount of staleness (in seconds) tolerated. Accepted range for this - value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int - """ - - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, - } - - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'str'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConsistencyPolicy, self).__init__(**kwargs) - self.default_consistency_level = kwargs['default_consistency_level'] - self.max_staleness_prefix = kwargs.get('max_staleness_prefix', None) - self.max_interval_in_seconds = kwargs.get('max_interval_in_seconds', None) - - -class ContainerPartitionKey(msrest.serialization.Model): - """The configuration of the partition key to be used for partitioning data into multiple partitions. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param paths: List of paths using which data within the container can be partitioned. - :type paths: list[str] - :param kind: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple - partition keys (upto three maximum) are supported for container create. Possible values - include: "Hash", "Range", "MultiHash". Default value: "Hash". - :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind - :param version: Indicates the version of the partition key definition. - :type version: int - :ivar system_key: Indicates if the container is using a system generated partition key. - :vartype system_key: bool - """ - - _validation = { - 'version': {'maximum': 2, 'minimum': 1}, - 'system_key': {'readonly': True}, - } - - _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'int'}, - 'system_key': {'key': 'systemKey', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(ContainerPartitionKey, self).__init__(**kwargs) - self.paths = kwargs.get('paths', None) - self.kind = kwargs.get('kind', "Hash") - self.version = kwargs.get('version', None) - self.system_key = None - - -class ContinuousBackupInformation(msrest.serialization.Model): - """Information about the status of continuous backups. - - :param latest_restorable_timestamp: The latest restorable timestamp for a resource. - :type latest_restorable_timestamp: str - """ - - _attribute_map = { - 'latest_restorable_timestamp': {'key': 'latestRestorableTimestamp', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ContinuousBackupInformation, self).__init__(**kwargs) - self.latest_restorable_timestamp = kwargs.get('latest_restorable_timestamp', None) - - -class ContinuousBackupRestoreLocation(msrest.serialization.Model): - """Properties of the regional restorable account. - - :param location: The name of the continuous backup restore location. - :type location: str - """ - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ContinuousBackupRestoreLocation, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - - -class ContinuousModeBackupPolicy(BackupPolicy): - """The object representing continuous mode backup policy. - - All required parameters must be populated in order to send to Azure. - - :param type: Required. Describes the mode of backups.Constant filled by server. Possible - values include: "Periodic", "Continuous". - :type type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType - :param migration_state: The object representing the state of the migration between the backup - policies. - :type migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState - """ - - _validation = { - 'type': {'required': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, - } - - def __init__( - self, - **kwargs - ): - super(ContinuousModeBackupPolicy, self).__init__(**kwargs) - self.type = 'Continuous' # type: str - - -class CorsPolicy(msrest.serialization.Model): - """The CORS policy for the Cosmos DB database account. - - All required parameters must be populated in order to send to Azure. - - :param allowed_origins: Required. The origin domains that are permitted to make a request - against the service via CORS. - :type allowed_origins: str - :param allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a - CORS request. - :type allowed_methods: str - :param allowed_headers: The request headers that the origin domain may specify on the CORS - request. - :type allowed_headers: str - :param exposed_headers: The response headers that may be sent in the response to the CORS - request and exposed by the browser to the request issuer. - :type exposed_headers: str - :param max_age_in_seconds: The maximum amount time that a browser should cache the preflight - OPTIONS request. - :type max_age_in_seconds: long - """ - - _validation = { - 'allowed_origins': {'required': True}, - 'max_age_in_seconds': {'maximum': 2147483647, 'minimum': 1}, - } - - _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': 'str'}, - 'allowed_methods': {'key': 'allowedMethods', 'type': 'str'}, - 'allowed_headers': {'key': 'allowedHeaders', 'type': 'str'}, - 'exposed_headers': {'key': 'exposedHeaders', 'type': 'str'}, - 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(CorsPolicy, self).__init__(**kwargs) - self.allowed_origins = kwargs['allowed_origins'] - self.allowed_methods = kwargs.get('allowed_methods', None) - self.allowed_headers = kwargs.get('allowed_headers', None) - self.exposed_headers = kwargs.get('exposed_headers', None) - self.max_age_in_seconds = kwargs.get('max_age_in_seconds', None) - - -class CreateUpdateOptions(msrest.serialization.Model): - """CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". - - :param throughput: Request Units per second. For example, "throughput": 10000. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings - """ - - _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, - } - - def __init__( - self, - **kwargs - ): - super(CreateUpdateOptions, self).__init__(**kwargs) - self.throughput = kwargs.get('throughput', None) - self.autoscale_settings = kwargs.get('autoscale_settings', None) - - -class DatabaseAccountConnectionString(msrest.serialization.Model): - """Connection string for the Cosmos DB account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar connection_string: Value of the connection string. - :vartype connection_string: str - :ivar description: Description of the connection string. - :vartype description: str - """ - - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, - } - - _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountConnectionString, self).__init__(**kwargs) - self.connection_string = None - self.description = None - - -class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB database accounts. - - 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. - :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -1861,11 +2076,11 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity :param consistency_policy: The consistency policy for the Cosmos DB account. :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param locations: Required. An array that contains the georeplication locations enabled for the @@ -1917,1116 +2132,160 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :param analytical_storage_configuration: Analytical storage specific properties. :type analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, - } - - database_account_offer_type = "Standard" - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountCreateUpdateParameters, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.consistency_policy = kwargs.get('consistency_policy', None) - self.locations = kwargs['locations'] - self.ip_rules = kwargs.get('ip_rules', None) - self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) - self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) - self.capabilities = kwargs.get('capabilities', None) - self.virtual_network_rules = kwargs.get('virtual_network_rules', None) - self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) - self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) - self.connector_offer = kwargs.get('connector_offer', None) - self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) - self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) - self.default_identity = kwargs.get('default_identity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.enable_free_tier = kwargs.get('enable_free_tier', None) - self.api_properties = kwargs.get('api_properties', None) - self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) - self.analytical_storage_configuration = kwargs.get('analytical_storage_configuration', None) - self.create_mode = None # type: Optional[str] - self.backup_policy = kwargs.get('backup_policy', None) - self.cors = kwargs.get('cors', None) - self.network_acl_bypass = kwargs.get('network_acl_bypass', None) - self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.diagnostic_log_settings = kwargs.get('diagnostic_log_settings', None) - self.disable_local_auth = kwargs.get('disable_local_auth', None) - self.restore_parameters = kwargs.get('restore_parameters', None) - - -class DatabaseAccountCreateUpdateProperties(msrest.serialization.Model): - """Properties to create and update Azure Cosmos DB database accounts. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultRequestDatabaseAccountCreateUpdateProperties. - - 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 consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: - "Standard". - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual - Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: Enables automatic failover of the write region in the rare - event that the region is unavailable due to an outage. Automatic failover will result in a new - write region for the account and is chosen based on the failover priorities configured for the - account. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB - account. - :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :param enable_multiple_write_locations: Enables the account to write in multiple locations. - :type enable_multiple_write_locations: bool - :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. - :type enable_cassandra_connector: bool - :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". - :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer - :param disable_key_based_metadata_write_access: Disable write operations on metadata resources - (databases, containers, throughput) via account keys. - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault. - :type key_vault_key_uri: str - :param default_identity: The default identity for accessing key vault used in features like - customer managed keys. The default identity needs to be explicitly set by the users. It can be - "FirstPartyIdentity", "SystemAssignedIdentity" and more. - :type default_identity: str - :param public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. - :type enable_analytical_storage: bool - :param analytical_storage_configuration: Analytical storage specific properties. - :type analytical_storage_configuration: - ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - """ - - _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'DefaultRequestDatabaseAccountCreateUpdateProperties'} - } - - database_account_offer_type = "Standard" - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) - self.consistency_policy = kwargs.get('consistency_policy', None) - self.locations = kwargs['locations'] - self.ip_rules = kwargs.get('ip_rules', None) - self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) - self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) - self.capabilities = kwargs.get('capabilities', None) - self.virtual_network_rules = kwargs.get('virtual_network_rules', None) - self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) - self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) - self.connector_offer = kwargs.get('connector_offer', None) - self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) - self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) - self.default_identity = kwargs.get('default_identity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.enable_free_tier = kwargs.get('enable_free_tier', None) - self.api_properties = kwargs.get('api_properties', None) - self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) - self.analytical_storage_configuration = kwargs.get('analytical_storage_configuration', None) - self.create_mode = None # type: Optional[str] - self.backup_policy = kwargs.get('backup_policy', None) - self.cors = kwargs.get('cors', None) - self.network_acl_bypass = kwargs.get('network_acl_bypass', None) - self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.diagnostic_log_settings = kwargs.get('diagnostic_log_settings', None) - self.disable_local_auth = kwargs.get('disable_local_auth', None) - self.restore_parameters = kwargs.get('restore_parameters', None) - - -class DatabaseAccountGetResults(ARMResourceProperties): - """An Azure Cosmos DB database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param kind: Indicates the type of database account. This can only be set at database account - creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". - :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData - :ivar provisioning_state: The status of the Cosmos DB account at the time the operation was - called. The status can be one of following. 'Creating' – the Cosmos DB account is being - created. When an account is in Creating state, only properties that are specified as input for - the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is - active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB - account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – - the Cosmos DB account deletion failed. - :vartype provisioning_state: str - :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default - value: Standard. The only acceptable values to pass in are None and "Standard". The default - value is None. - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual - Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: Enables automatic failover of the write region in the rare - event that the region is unavailable due to an outage. Automatic failover will result in a new - write region for the account and is chosen based on the failover priorities configured for the - account. - :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the Cosmos DB database account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :ivar write_locations: An array that contains the write location for the Cosmos DB account. - :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar read_locations: An array that contains of the read locations enabled for the Cosmos DB - account. - :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar locations: An array that contains all of the locations enabled for the Cosmos DB account. - :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar failover_policies: An array that contains the regions ordered by their failover - priorities. - :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] - :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB - account. - :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the - Cosmos DB account. - :vartype private_endpoint_connections: - list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] - :param enable_multiple_write_locations: Enables the account to write in multiple locations. - :type enable_multiple_write_locations: bool - :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. - :type enable_cassandra_connector: bool - :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". - :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer - :param disable_key_based_metadata_write_access: Disable write operations on metadata resources - (databases, containers, throughput) via account keys. - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault. - :type key_vault_key_uri: str - :param default_identity: The default identity for accessing key vault used in features like - customer managed keys. The default identity needs to be explicitly set by the users. It can be - "FirstPartyIdentity", "SystemAssignedIdentity" and more. - :type default_identity: str - :param public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. - :type enable_analytical_storage: bool - :param analytical_storage_configuration: Analytical storage specific properties. - :type analytical_storage_configuration: - ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :ivar instance_id: A unique identifier assigned to the database account. - :vartype instance_id: str - :param create_mode: Enum to indicate the mode of account creation. Possible values include: - "Default", "Restore". Default value: "Default". - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters - :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'instance_id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountGetResults, self).__init__(**kwargs) - self.kind = kwargs.get('kind', None) - self.system_data = None - self.provisioning_state = None - self.document_endpoint = None - self.database_account_offer_type = None - self.ip_rules = kwargs.get('ip_rules', None) - self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) - self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) - self.consistency_policy = kwargs.get('consistency_policy', None) - self.capabilities = kwargs.get('capabilities', None) - self.write_locations = None - self.read_locations = None - self.locations = None - self.failover_policies = None - self.virtual_network_rules = kwargs.get('virtual_network_rules', None) - self.private_endpoint_connections = None - self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) - self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) - self.connector_offer = kwargs.get('connector_offer', None) - self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) - self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) - self.default_identity = kwargs.get('default_identity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.enable_free_tier = kwargs.get('enable_free_tier', None) - self.api_properties = kwargs.get('api_properties', None) - self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) - self.analytical_storage_configuration = kwargs.get('analytical_storage_configuration', None) - self.instance_id = None - self.create_mode = kwargs.get('create_mode', "Default") - self.restore_parameters = kwargs.get('restore_parameters', None) - self.backup_policy = kwargs.get('backup_policy', None) - self.cors = kwargs.get('cors', None) - self.network_acl_bypass = kwargs.get('network_acl_bypass', None) - self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.diagnostic_log_settings = kwargs.get('diagnostic_log_settings', None) - self.disable_local_auth = kwargs.get('disable_local_auth', None) - - -class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings for the Cosmos DB - account. - :type connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) - self.connection_strings = kwargs.get('connection_strings', None) - - -class DatabaseAccountListReadOnlyKeysResult(msrest.serialization.Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None - - -class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): - """The access keys for the given database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. - :vartype secondary_readonly_master_key: str - :ivar primary_master_key: Base 64 encoded value of the primary read-write key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary read-write key. - :vartype secondary_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListKeysResult, self).__init__(**kwargs) - self.primary_master_key = None - self.secondary_master_key = None - - -class DatabaseAccountRegenerateKeyParameters(msrest.serialization.Model): - """Parameters to regenerate the keys within the database account. - - All required parameters must be populated in order to send to Azure. - - :param key_kind: Required. The access key to regenerate. Possible values include: "primary", - "secondary", "primaryReadonly", "secondaryReadonly". - :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind - """ - - _validation = { - 'key_kind': {'required': True}, - } - - _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) - self.key_kind = kwargs['key_kind'] - - -class DatabaseAccountsListResult(msrest.serialization.Model): - """The List operation response, that contains the database accounts and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of database account and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[DatabaseAccountGetResults]'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountsListResult, self).__init__(**kwargs) - self.value = None - - -class DatabaseAccountUpdateParameters(msrest.serialization.Model): - """Parameters for patching Azure Cosmos DB database account properties. - - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: An array that contains the georeplication locations enabled for the Cosmos DB - account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual - Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: Enables automatic failover of the write region in the rare - event that the region is unavailable due to an outage. Automatic failover will result in a new - write region for the account and is chosen based on the failover priorities configured for the - account. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB - account. - :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :param enable_multiple_write_locations: Enables the account to write in multiple locations. - :type enable_multiple_write_locations: bool - :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. - :type enable_cassandra_connector: bool - :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". - :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer - :param disable_key_based_metadata_write_access: Disable write operations on metadata resources - (databases, containers, throughput) via account keys. - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault. - :type key_vault_key_uri: str - :param default_identity: The default identity for accessing key vault used in features like - customer managed keys. The default identity needs to be explicitly set by the users. It can be - "FirstPartyIdentity", "SystemAssignedIdentity" and more. - :type default_identity: str - :param public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. - :type enable_analytical_storage: bool - :param analytical_storage_configuration: Analytical storage specific properties. - :type analytical_storage_configuration: - ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.location = kwargs.get('location', None) - self.identity = kwargs.get('identity', None) - self.consistency_policy = kwargs.get('consistency_policy', None) - self.locations = kwargs.get('locations', None) - self.ip_rules = kwargs.get('ip_rules', None) - self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) - self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) - self.capabilities = kwargs.get('capabilities', None) - self.virtual_network_rules = kwargs.get('virtual_network_rules', None) - self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) - self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) - self.connector_offer = kwargs.get('connector_offer', None) - self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) - self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) - self.default_identity = kwargs.get('default_identity', None) - self.public_network_access = kwargs.get('public_network_access', None) - self.enable_free_tier = kwargs.get('enable_free_tier', None) - self.api_properties = kwargs.get('api_properties', None) - self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) - self.analytical_storage_configuration = kwargs.get('analytical_storage_configuration', None) - self.backup_policy = kwargs.get('backup_policy', None) - self.cors = kwargs.get('cors', None) - self.network_acl_bypass = kwargs.get('network_acl_bypass', None) - self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) - self.diagnostic_log_settings = kwargs.get('diagnostic_log_settings', None) - self.disable_local_auth = kwargs.get('disable_local_auth', None) - - -class DatabaseRestoreResource(msrest.serialization.Model): - """Specific Databases to restore. - - :param database_name: The name of the database available for restore. - :type database_name: str - :param collection_names: The names of the collections available for restore. - :type collection_names: list[str] - """ - - _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseRestoreResource, self).__init__(**kwargs) - self.database_name = kwargs.get('database_name', None) - self.collection_names = kwargs.get('collection_names', None) - - -class DataCenterResource(ARMProxyResource): - """A managed Cassandra data center. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param properties: Properties of a managed Cassandra data center. - :type properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DataCenterResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(DataCenterResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class DataCenterResourceProperties(msrest.serialization.Model): - """Properties of a managed Cassandra data center. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". - :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :param data_center_location: The region this data center should be created in. - :type data_center_location: str - :param delegated_subnet_id: Resource id of a subnet the nodes in this data center should have - their network interfaces connected to. The subnet must be in the same region specified in - 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's - 'delegatedManagementSubnetId' property. This resource id will be of the form - '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. - :type delegated_subnet_id: str - :param node_count: The number of nodes the data center should have. This is the desired number. - After it is set, it may take some time for the data center to be scaled to match. To monitor - the number of nodes and their status, use the fetchNodeStatus method on the cluster. - :type node_count: int - :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. - Generally you will want to use the seedNodes property on the cluster, which aggregates the seed - nodes from all data centers in the cluster. - :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :param base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration - file to be included in the cassandra.yaml for all nodes in this data center. The fragment - should be Base64 encoded, and only a subset of keys are allowed. - :type base64_encoded_cassandra_yaml_fragment: str - """ - - _validation = { - 'seed_nodes': {'readonly': True}, - } - - _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, - 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DataCenterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.data_center_location = kwargs.get('data_center_location', None) - self.delegated_subnet_id = kwargs.get('delegated_subnet_id', None) - self.node_count = kwargs.get('node_count', None) - self.seed_nodes = None - self.base64_encoded_cassandra_yaml_fragment = kwargs.get('base64_encoded_cassandra_yaml_fragment', None) - - -class RegionalServiceResource(msrest.serialization.Model): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RegionalServiceResource, self).__init__(**kwargs) - self.name = None - self.location = None - self.status = None - - -class DataTransferRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - """ - - _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DataTransferRegionalServiceResource, self).__init__(**kwargs) - - -class DataTransferServiceResource(msrest.serialization.Model): - """Describes the service response property. - - :param properties: Properties for DataTransferServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.DataTransferServiceResourceProperties - """ - - _attribute_map = { - 'properties': {'key': 'properties', 'type': 'DataTransferServiceResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(DataTransferServiceResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class ServiceResourceProperties(msrest.serialization.Model): - """Services response resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataTransferServiceResourceProperties, GraphAPIComputeServiceResourceProperties, SqlDedicatedGatewayServiceResourceProperties. - - 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 additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus + :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy + :param cors: The CORS policy for the Cosmos DB database account. + :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] + :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. + Possible values include: "None", "AzureServices". + :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass + :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl + Bypass for the Cosmos DB account. + :type network_acl_bypass_resource_ids: list[str] + :param diagnostic_log_settings: The Object representing the different Diagnostic log settings + for the Cosmos DB Account. + :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings + :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be + used exclusively for authentication. + :type disable_local_auth: bool + :param restore_parameters: Parameters to indicate the information about the restore. + :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - } - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - _subtype_map = { - 'service_type': {'DataTransfer': 'DataTransferServiceResourceProperties', 'GraphAPICompute': 'GraphAPIComputeServiceResourceProperties', 'SqlDedicatedGateway': 'SqlDedicatedGatewayServiceResourceProperties'} + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } def __init__( self, **kwargs ): - super(ServiceResourceProperties, self).__init__(**kwargs) - self.additional_properties = kwargs.get('additional_properties', None) - self.creation_time = None - self.instance_size = kwargs.get('instance_size', None) - self.instance_count = kwargs.get('instance_count', None) - self.service_type = 'ServiceResourceProperties' # type: str - self.status = None - - -class DataTransferServiceResourceProperties(ServiceResourceProperties): - """Properties for DataTransferServiceResource. + super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.identity = kwargs.get('identity', None) + self.consistency_policy = kwargs.get('consistency_policy', None) + self.locations = kwargs.get('locations', None) + self.ip_rules = kwargs.get('ip_rules', None) + self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) + self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) + self.capabilities = kwargs.get('capabilities', None) + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) + self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) + self.connector_offer = kwargs.get('connector_offer', None) + self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) + self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + self.default_identity = kwargs.get('default_identity', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.enable_free_tier = kwargs.get('enable_free_tier', None) + self.api_properties = kwargs.get('api_properties', None) + self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) + self.analytical_storage_configuration = kwargs.get('analytical_storage_configuration', None) + self.backup_policy = kwargs.get('backup_policy', None) + self.cors = kwargs.get('cors', None) + self.network_acl_bypass = kwargs.get('network_acl_bypass', None) + self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) + self.diagnostic_log_settings = kwargs.get('diagnostic_log_settings', None) + self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.restore_parameters = kwargs.get('restore_parameters', None) + self.capacity = kwargs.get('capacity', None) - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. +class DatabaseRestoreResource(msrest.serialization.Model): + """Specific Databases to restore. - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :ivar locations: An array that contains all of the locations for the service. - :vartype locations: list[~azure.mgmt.cosmosdb.models.DataTransferRegionalServiceResource] + :param database_name: The name of the database available for restore. + :type database_name: str + :param collection_names: The names of the collections available for restore. + :type collection_names: list[str] """ - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, - } - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[DataTransferRegionalServiceResource]'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, } def __init__( self, **kwargs ): - super(DataTransferServiceResourceProperties, self).__init__(**kwargs) - self.service_type = 'DataTransfer' # type: str - self.locations = None + super(DatabaseRestoreResource, self).__init__(**kwargs) + self.database_name = kwargs.get('database_name', None) + self.collection_names = kwargs.get('collection_names', None) -class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateUpdateProperties): - """Properties for non-restore Azure Cosmos DB database account requests. +class DataCenterResource(ARMProxyResource): + """A managed Cassandra data center. 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 consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: - "Standard". + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param kind: Indicates the type of database account. This can only be set at database account + creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". + :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData + :ivar provisioning_state: The status of the Cosmos DB account at the time the operation was + called. The status can be one of following. 'Creating' – the Cosmos DB account is being + created. When an account is in Creating state, only properties that are specified as input for + the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is + active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB + account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – + the Cosmos DB account deletion failed. + :vartype provisioning_state: str + :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default + value: Standard. The only acceptable values to pass in are None and "Standard". The default + value is None. :vartype database_account_offer_type: str :param ip_rules: List of IpRules. :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] @@ -3090,44 +2349,25 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, - } - - _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'instance_id': {'readonly': True}, } database_account_offer_type = "Standard" @@ -3149,38 +2389,92 @@ class DiagnosticLogSettings(msrest.serialization.Model): """ _attribute_map = { - 'enable_full_text_query': {'key': 'enableFullTextQuery', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DiagnosticLogSettings, self).__init__(**kwargs) - self.enable_full_text_query = kwargs.get('enable_full_text_query', None) - - -class ErrorResponse(msrest.serialization.Model): - """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'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } def __init__( self, **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) + super(DatabaseAccountGetResults, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.identity = kwargs.get('identity', None) + self.system_data = None + self.provisioning_state = None + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_rules = kwargs.get('ip_rules', None) + self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) + self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) + self.consistency_policy = kwargs.get('consistency_policy', None) + self.capabilities = kwargs.get('capabilities', None) + self.write_locations = None + self.read_locations = None + self.locations = None + self.failover_policies = None + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.private_endpoint_connections = None + self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) + self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) + self.connector_offer = kwargs.get('connector_offer', None) + self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) + self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + self.default_identity = kwargs.get('default_identity', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.enable_free_tier = kwargs.get('enable_free_tier', None) + self.api_properties = kwargs.get('api_properties', None) + self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) + self.analytical_storage_configuration = kwargs.get('analytical_storage_configuration', None) + self.instance_id = None + self.create_mode = kwargs.get('create_mode', "Default") + self.restore_parameters = kwargs.get('restore_parameters', None) + self.backup_policy = kwargs.get('backup_policy', None) + self.cors = kwargs.get('cors', None) + self.network_acl_bypass = kwargs.get('network_acl_bypass', None) + self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) + self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.capacity = kwargs.get('capacity', None) class ExcludedPath(msrest.serialization.Model): @@ -3430,42 +2724,289 @@ class GraphResourceCreateUpdateParameters(ARMResourceProperties): :type tags: dict[str, str] :param identity: Identity for the resource. :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: Required. The standard JSON format of a Graph resource. - :type resource: ~azure.mgmt.cosmosdb.models.GraphResource - :param options: A key-value pair of options to be applied for the request. This corresponds to - the headers sent with the request. - :type options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions + :param consistency_policy: The consistency policy for the Cosmos DB account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: An array that contains the georeplication locations enabled for the Cosmos DB + account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :param ip_rules: List of IpRules. + :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] + :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual + Network ACL rules. + :type is_virtual_network_filter_enabled: bool + :param enable_automatic_failover: Enables automatic failover of the write region in the rare + event that the region is unavailable due to an outage. Automatic failover will result in a new + write region for the account and is chosen based on the failover priorities configured for the + account. + :type enable_automatic_failover: bool + :param capabilities: List of Cosmos DB capabilities for the account. + :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB + account. + :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] + :param enable_multiple_write_locations: Enables the account to write in multiple locations. + :type enable_multiple_write_locations: bool + :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. + :type enable_cassandra_connector: bool + :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* + account. Possible values include: "Small". + :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer + :param disable_key_based_metadata_write_access: Disable write operations on metadata resources + (databases, containers, throughput) via account keys. + :type disable_key_based_metadata_write_access: bool + :param key_vault_key_uri: The URI of the key vault. + :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used in features like + customer managed keys. The default identity needs to be explicitly set by the users. It can be + "FirstPartyIdentity", "SystemAssignedIdentity" and more. + :type default_identity: str + :param public_network_access: Whether requests from Public Network are allowed. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess + :param enable_free_tier: Flag to indicate whether Free Tier is enabled. + :type enable_free_tier: bool + :param api_properties: API specific properties. Currently, supported only for MongoDB API. + :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties + :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. + :type enable_analytical_storage: bool + :param analytical_storage_configuration: Analytical storage specific properties. + :type analytical_storage_configuration: + ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration + :param backup_policy: The object representing the policy for taking backups on an account. + :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy + :param cors: The CORS policy for the Cosmos DB database account. + :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] + :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. + Possible values include: "None", "AzureServices". + :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass + :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl + Bypass for the Cosmos DB account. + :type network_acl_bypass_resource_ids: list[str] + :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be + used exclusively for authentication. + :type disable_local_auth: bool + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, + } + + def __init__( + self, + **kwargs + ): + super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs.get('location', None) + self.identity = kwargs.get('identity', None) + self.consistency_policy = kwargs.get('consistency_policy', None) + self.locations = kwargs.get('locations', None) + self.ip_rules = kwargs.get('ip_rules', None) + self.is_virtual_network_filter_enabled = kwargs.get('is_virtual_network_filter_enabled', None) + self.enable_automatic_failover = kwargs.get('enable_automatic_failover', None) + self.capabilities = kwargs.get('capabilities', None) + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.enable_multiple_write_locations = kwargs.get('enable_multiple_write_locations', None) + self.enable_cassandra_connector = kwargs.get('enable_cassandra_connector', None) + self.connector_offer = kwargs.get('connector_offer', None) + self.disable_key_based_metadata_write_access = kwargs.get('disable_key_based_metadata_write_access', None) + self.key_vault_key_uri = kwargs.get('key_vault_key_uri', None) + self.default_identity = kwargs.get('default_identity', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.enable_free_tier = kwargs.get('enable_free_tier', None) + self.api_properties = kwargs.get('api_properties', None) + self.enable_analytical_storage = kwargs.get('enable_analytical_storage', None) + self.analytical_storage_configuration = kwargs.get('analytical_storage_configuration', None) + self.backup_policy = kwargs.get('backup_policy', None) + self.cors = kwargs.get('cors', None) + self.network_acl_bypass = kwargs.get('network_acl_bypass', None) + self.network_acl_bypass_resource_ids = kwargs.get('network_acl_bypass_resource_ids', None) + self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.capacity = kwargs.get('capacity', None) + + +class DatabaseRestoreResource(msrest.serialization.Model): + """Specific Databases to restore. + + :param database_name: The name of the database available for restore. + :type database_name: str + :param collection_names: The names of the collections available for restore. + :type collection_names: list[str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'resource': {'key': 'properties.resource', 'type': 'GraphResource'}, + 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + } + + def __init__( + self, + **kwargs + ): + super(GraphResourceCreateUpdateParameters, self).__init__(**kwargs) + self.resource = kwargs['resource'] + self.options = kwargs.get('options', None) + + +class DataCenterResource(ARMProxyResource): + """A managed Cassandra data center. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param properties: Properties of a managed Cassandra data center. + :type properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'resource': {'required': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DataCenterResourceProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCenterResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class DataCenterResourceProperties(msrest.serialization.Model): + """Properties of a managed Cassandra data center. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param provisioning_state: The status of the resource at the time the operation was called. + Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState + :param data_center_location: The region this data center should be created in. + :type data_center_location: str + :param delegated_subnet_id: Resource id of a subnet the nodes in this data center should have + their network interfaces connected to. The subnet must be in the same region specified in + 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's + 'delegatedManagementSubnetId' property. This resource id will be of the form + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. + :type delegated_subnet_id: str + :param node_count: The number of nodes the data center should have. This is the desired number. + After it is set, it may take some time for the data center to be scaled to match. To monitor + the number of nodes and their status, use the fetchNodeStatus method on the cluster. + :type node_count: int + :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. + Generally you will want to use the seedNodes property on the cluster, which aggregates the seed + nodes from all data centers in the cluster. + :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :param base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration + file to be included in the cassandra.yaml for all nodes in this data center. The fragment + should be Base64 encoded, and only a subset of keys are allowed. + :type base64_encoded_cassandra_yaml_fragment: str + :param managed_disk_customer_key_uri: Key uri to use for encryption of managed disks. Ensure + the system assigned identity of the cluster has been assigned appropriate permissions(key + get/wrap/unwrap permissions) on the key. + :type managed_disk_customer_key_uri: str + :param backup_storage_customer_key_uri: Indicates the Key Uri of the customer key to use for + encryption of the backup storage account. + :type backup_storage_customer_key_uri: str + :param sku: Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2. + :type sku: str + :param disk_sku: Disk SKU used for data centers. Default value is P30. + :type disk_sku: str + :param disk_capacity: Number of disk used for data centers. Default value is 4. + :type disk_capacity: int + :param availability_zone: If the azure data center has Availability Zone support, apply it to + the Virtual Machine ScaleSet that host the cassandra data center virtual machines. + :type availability_zone: bool + """ + + _validation = { + 'seed_nodes': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, + 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, + 'managed_disk_customer_key_uri': {'key': 'managedDiskCustomerKeyUri', 'type': 'str'}, + 'backup_storage_customer_key_uri': {'key': 'backupStorageCustomerKeyUri', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'disk_sku': {'key': 'diskSku', 'type': 'str'}, + 'disk_capacity': {'key': 'diskCapacity', 'type': 'int'}, + 'availability_zone': {'key': 'availabilityZone', 'type': 'bool'}, } def __init__( self, **kwargs ): - super(GraphResourceCreateUpdateParameters, self).__init__(**kwargs) - self.resource = kwargs['resource'] - self.options = kwargs.get('options', None) + super(DataCenterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.data_center_location = kwargs.get('data_center_location', None) + self.delegated_subnet_id = kwargs.get('delegated_subnet_id', None) + self.node_count = kwargs.get('node_count', None) + self.seed_nodes = None + self.base64_encoded_cassandra_yaml_fragment = kwargs.get('base64_encoded_cassandra_yaml_fragment', None) + self.managed_disk_customer_key_uri = kwargs.get('managed_disk_customer_key_uri', None) + self.backup_storage_customer_key_uri = kwargs.get('backup_storage_customer_key_uri', None) + self.sku = kwargs.get('sku', None) + self.disk_sku = kwargs.get('disk_sku', None) + self.disk_capacity = kwargs.get('disk_capacity', None) + self.availability_zone = kwargs.get('availability_zone', None) -class GraphResourceGetPropertiesOptions(OptionsResource): - """GraphResourceGetPropertiesOptions. +class ErrorResponse(msrest.serialization.Model): + """Error Response. :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the ThroughputSetting resource when retrieving offer details. @@ -4225,31 +3766,6 @@ def __init__( self.ip_address_or_range = kwargs.get('ip_address_or_range', None) -class ListBackups(msrest.serialization.Model): - """List of restorable backups for a Cassandra cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Container for array of backups. - :vartype value: list[~azure.mgmt.cosmosdb.models.BackupResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackupResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ListBackups, self).__init__(**kwargs) - self.value = None - - class ListClusters(msrest.serialization.Model): """List of managed Cassandra clusters. @@ -4457,6 +3973,165 @@ def __init__( self.backup_storage_redundancies = None +class LocationGetResult(ARMProxyResource): + """Cosmos DB location get result. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param properties: Cosmos DB location metadata. + :type properties: ~azure.mgmt.cosmosdb.models.LocationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'LocationProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(LocationGetResult, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class LocationListResult(msrest.serialization.Model): + """The List operation response, that contains Cosmos DB locations and their properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Cosmos DB locations and their properties. + :vartype value: list[~azure.mgmt.cosmosdb.models.LocationGetResult] + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LocationGetResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(LocationListResult, self).__init__(**kwargs) + self.value = None + + +class LocationProperties(msrest.serialization.Model): + """Cosmos DB location metadata. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar supports_availability_zone: Flag indicating whether the location supports availability + zones or not. + :vartype supports_availability_zone: bool + :ivar is_residency_restricted: Flag indicating whether the location is residency sensitive. + :vartype is_residency_restricted: bool + :ivar backup_storage_redundancies: The properties of available backup storage redundancies. + :vartype backup_storage_redundancies: list[str or + ~azure.mgmt.cosmosdb.models.BackupStorageRedundancy] + """ + + _validation = { + 'supports_availability_zone': {'readonly': True}, + 'is_residency_restricted': {'readonly': True}, + 'backup_storage_redundancies': {'readonly': True}, + } + + _attribute_map = { + 'supports_availability_zone': {'key': 'supportsAvailabilityZone', 'type': 'bool'}, + 'is_residency_restricted': {'key': 'isResidencyRestricted', 'type': 'bool'}, + 'backup_storage_redundancies': {'key': 'backupStorageRedundancies', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(LocationProperties, self).__init__(**kwargs) + self.supports_availability_zone = None + self.is_residency_restricted = None + self.backup_storage_redundancies = None + + +class ManagedCassandraManagedServiceIdentity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The object id of the identity resource. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the resource. + :vartype tenant_id: str + :param type: The type of the resource. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedCassandraManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class ManagedCassandraReaperStatus(msrest.serialization.Model): + """ManagedCassandraReaperStatus. + + :param healthy: + :type healthy: bool + :param repair_run_ids: Dictionary of :code:``. + :type repair_run_ids: dict[str, str] + :param repair_schedules: Dictionary of :code:``. + :type repair_schedules: dict[str, str] + """ + + _attribute_map = { + 'healthy': {'key': 'healthy', 'type': 'bool'}, + 'repair_run_ids': {'key': 'repairRunIds', 'type': '{str}'}, + 'repair_schedules': {'key': 'repairSchedules', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedCassandraReaperStatus, self).__init__(**kwargs) + self.healthy = kwargs.get('healthy', None) + self.repair_run_ids = kwargs.get('repair_run_ids', None) + self.repair_schedules = kwargs.get('repair_schedules', None) + + class ManagedServiceIdentity(msrest.serialization.Model): """Identity for the resource. @@ -7174,100 +6849,6 @@ def __init__( self.ip_address = kwargs.get('ip_address', None) -class ServiceResource(ARMProxyResource): - """Properties for the database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param properties: Services response resource. - :type properties: ~azure.mgmt.cosmosdb.models.ServiceResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServiceResourceProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceResource, self).__init__(**kwargs) - self.properties = kwargs.get('properties', None) - - -class ServiceResourceCreateUpdateParameters(msrest.serialization.Model): - """Parameters for Create or Update Request for ServiceResource. - - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: ServiceType for the service. Possible values include: - "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - """ - - _validation = { - 'instance_count': {'minimum': 0}, - } - - _attribute_map = { - 'instance_size': {'key': 'properties.instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'properties.instanceCount', 'type': 'int'}, - 'service_type': {'key': 'properties.serviceType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceResourceCreateUpdateParameters, self).__init__(**kwargs) - self.instance_size = kwargs.get('instance_size', None) - self.instance_count = kwargs.get('instance_count', None) - self.service_type = kwargs.get('service_type', None) - - -class ServiceResourceListResult(msrest.serialization.Model): - """The List operation response, that contains the Service Resource and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Service Resource and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.ServiceResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ServiceResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceResourceListResult, self).__init__(**kwargs) - self.value = None - - class SpatialSpec(msrest.serialization.Model): """SpatialSpec. diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py index 393472f2bc03..3ce35686eaf6 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/models/_models_py3.py @@ -412,6 +412,104 @@ def __init__( self.name = name +class Capacity(msrest.serialization.Model): + """The object that represents all properties related to capacity enforcement on an account. + + :param total_throughput_limit: The total throughput limit imposed on the account. A + totalThroughputLimit of 2000 imposes a strict limit of max throughput that can be provisioned + on that account to be 2000. A totalThroughputLimit of -1 indicates no limits on provisioning of + throughput. + :type total_throughput_limit: int + """ + + _validation = { + 'total_throughput_limit': {'minimum': -1}, + } + + _attribute_map = { + 'total_throughput_limit': {'key': 'totalThroughputLimit', 'type': 'int'}, + } + + def __init__( + self, + *, + total_throughput_limit: Optional[int] = None, + **kwargs + ): + super(Capacity, self).__init__(**kwargs) + self.total_throughput_limit = total_throughput_limit + + +class CassandraClusterPublicStatus(msrest.serialization.Model): + """Properties of a managed Cassandra cluster public status. + + :param e_tag: + :type e_tag: str + :param reaper_status: + :type reaper_status: ~azure.mgmt.cosmosdb.models.ManagedCassandraReaperStatus + :param connection_errors: List relevant information about any connection errors to the + Datacenters. + :type connection_errors: list[~azure.mgmt.cosmosdb.models.ConnectionError] + :param data_centers: List of the status of each datacenter in this cluster. + :type data_centers: + list[~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatusDataCentersItem] + """ + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'reaper_status': {'key': 'reaperStatus', 'type': 'ManagedCassandraReaperStatus'}, + 'connection_errors': {'key': 'connectionErrors', 'type': '[ConnectionError]'}, + 'data_centers': {'key': 'dataCenters', 'type': '[CassandraClusterPublicStatusDataCentersItem]'}, + } + + def __init__( + self, + *, + e_tag: Optional[str] = None, + reaper_status: Optional["ManagedCassandraReaperStatus"] = None, + connection_errors: Optional[List["ConnectionError"]] = None, + data_centers: Optional[List["CassandraClusterPublicStatusDataCentersItem"]] = None, + **kwargs + ): + super(CassandraClusterPublicStatus, self).__init__(**kwargs) + self.e_tag = e_tag + self.reaper_status = reaper_status + self.connection_errors = connection_errors + self.data_centers = data_centers + + +class CassandraClusterPublicStatusDataCentersItem(msrest.serialization.Model): + """CassandraClusterPublicStatusDataCentersItem. + + :param name: The name of this Datacenter. + :type name: str + :param seed_nodes: A list of all seed nodes in the cluster, managed and unmanaged. + :type seed_nodes: list[str] + :param nodes: + :type nodes: + list[~azure.mgmt.cosmosdb.models.ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[str]'}, + 'nodes': {'key': 'nodes', 'type': '[ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + seed_nodes: Optional[List[str]] = None, + nodes: Optional[List["ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems"]] = None, + **kwargs + ): + super(CassandraClusterPublicStatusDataCentersItem, self).__init__(**kwargs) + self.name = name + self.seed_nodes = seed_nodes + self.nodes = nodes + + class CassandraKeyspaceCreateUpdateParameters(ARMResourceProperties): """Parameters to create and update Cosmos DB Cassandra keyspace. @@ -1049,8 +1147,29 @@ def __init__( self.value = None -class CassandraViewCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB Cassandra view. +class Certificate(msrest.serialization.Model): + """Certificate. + + :param pem: PEM formatted public key. + :type pem: str + """ + + _attribute_map = { + 'pem': {'key': 'pem', 'type': 'str'}, + } + + def __init__( + self, + *, + pem: Optional[str] = None, + **kwargs + ): + super(Certificate, self).__init__(**kwargs) + self.pem = pem + + +class ClusterKey(msrest.serialization.Model): + """Cosmos DB Cassandra table cluster key. Variables are only populated by the server, and will be ignored when sending a request. @@ -1113,117 +1232,64 @@ def __init__( self.options = options -class CassandraViewGetPropertiesOptions(OptionsResource): - """CassandraViewGetPropertiesOptions. - - :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the - ThroughputSetting resource when retrieving offer details. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings - """ - - _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, - } - - def __init__( - self, - *, - throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, - **kwargs - ): - super(CassandraViewGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) - - -class CassandraViewResource(msrest.serialization.Model): - """Cosmos DB Cassandra view resource object. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Name of the Cosmos DB Cassandra view. - :type id: str - :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. - :type view_definition: str - """ - - _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, - } - - def __init__( - self, - *, - id: str, - view_definition: str, - **kwargs - ): - super(CassandraViewResource, self).__init__(**kwargs) - self.id = id - self.view_definition = view_definition - - -class CassandraViewGetPropertiesResource(ExtendedResourceProperties, CassandraViewResource): - """CassandraViewGetPropertiesResource. +class ManagedCassandraARMResourceProperties(msrest.serialization.Model): + """The core properties of ARM resources. 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 id: Required. Name of the Cosmos DB Cassandra view. - :type id: str - :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. - :type view_definition: str - :ivar rid: A system generated property. A unique identifier. - :vartype rid: str - :ivar ts: A system generated property that denotes the last updated timestamp of the resource. - :vartype ts: float - :ivar etag: A system generated property representing the resource etag required for optimistic - concurrency control. - :vartype etag: str + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity """ _validation = { - 'id': {'required': True}, - 'view_definition': {'required': True}, - 'rid': {'readonly': True}, - 'ts': {'readonly': True}, - 'etag': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, - 'rid': {'key': '_rid', 'type': 'str'}, - 'ts': {'key': '_ts', 'type': 'float'}, - 'etag': {'key': '_etag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, } def __init__( self, *, - id: str, - view_definition: str, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedCassandraManagedServiceIdentity"] = None, **kwargs ): - super(CassandraViewGetPropertiesResource, self).__init__(id=id, view_definition=view_definition, **kwargs) - self.id = id - self.view_definition = view_definition - self.rid = None - self.ts = None - self.etag = None + super(ManagedCassandraARMResourceProperties, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.identity = identity -class CassandraViewGetResults(ARMResourceProperties): - """An Azure Cosmos DB Cassandra view. +class ClusterResource(ManagedCassandraARMResourceProperties): + """Representation of a managed Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. @@ -1243,11 +1309,9 @@ class CassandraViewGetResults(ARMResourceProperties): also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: - :type resource: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesResource - :param options: - :type options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions + :type identity: ~azure.mgmt.cosmosdb.models.ManagedCassandraManagedServiceIdentity + :param properties: Properties of a managed Cassandra cluster. + :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties """ _validation = { @@ -1262,9 +1326,8 @@ class CassandraViewGetResults(ARMResourceProperties): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'CassandraViewGetPropertiesResource'}, - 'options': {'key': 'properties.options', 'type': 'CassandraViewGetPropertiesOptions'}, + 'identity': {'key': 'identity', 'type': 'ManagedCassandraManagedServiceIdentity'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, } def __init__( @@ -1272,236 +1335,16 @@ def __init__( *, location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - resource: Optional["CassandraViewGetPropertiesResource"] = None, - options: Optional["CassandraViewGetPropertiesOptions"] = None, + identity: Optional["ManagedCassandraManagedServiceIdentity"] = None, + properties: Optional["ClusterResourceProperties"] = None, **kwargs ): - super(CassandraViewGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.resource = resource - self.options = options + super(ClusterResource, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + self.properties = properties -class CassandraViewListResult(msrest.serialization.Model): - """The List operation response, that contains the Cassandra views and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Cassandra views and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[CassandraViewGetResults]'}, - } - - def __init__( - self, - **kwargs - ): - super(CassandraViewListResult, self).__init__(**kwargs) - self.value = None - - -class Certificate(msrest.serialization.Model): - """Certificate. - - :param pem: PEM formatted public key. - :type pem: str - """ - - _attribute_map = { - 'pem': {'key': 'pem', 'type': 'str'}, - } - - def __init__( - self, - *, - pem: Optional[str] = None, - **kwargs - ): - super(Certificate, self).__init__(**kwargs) - self.pem = pem - - -class ClusterKey(msrest.serialization.Model): - """Cosmos DB Cassandra table cluster key. - - :param name: Name of the Cosmos DB Cassandra table cluster key. - :type name: str - :param order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and - "Desc". - :type order_by: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'order_by': {'key': 'orderBy', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - order_by: Optional[str] = None, - **kwargs - ): - super(ClusterKey, self).__init__(**kwargs) - self.name = name - self.order_by = order_by - - -class ClusterNodeStatus(msrest.serialization.Model): - """The status of all nodes in the cluster (as returned by 'nodetool status'). - - :param nodes: Information about nodes in the cluster (corresponds to what is returned from - nodetool info). - :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] - """ - - _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, - } - - def __init__( - self, - *, - nodes: Optional[List["ClusterNodeStatusNodesItem"]] = None, - **kwargs - ): - super(ClusterNodeStatus, self).__init__(**kwargs) - self.nodes = nodes - - -class ClusterNodeStatusNodesItem(msrest.serialization.Model): - """ClusterNodeStatusNodesItem. - - :param datacenter: The Cassandra data center this node resides in. - :type datacenter: str - :param status: Indicates whether the node is functioning or not. Possible values include: "Up", - "Down". - :type status: str or ~azure.mgmt.cosmosdb.models.NodeStatus - :param state: The state of the node in relation to the cluster. Possible values include: - "Normal", "Leaving", "Joining", "Moving", "Stopped". - :type state: str or ~azure.mgmt.cosmosdb.models.NodeState - :param address: The node's URL. - :type address: str - :param load: The amount of file system data in the data directory (e.g., 47.66 KB), excluding - all content in the snapshots subdirectories. Because all SSTable data files are included, any - data that is not cleaned up (such as TTL-expired cell or tombstoned data) is counted. - :type load: str - :param tokens: List of tokens. - :type tokens: list[str] - :param owns: The percentage of the data owned by the node per datacenter times the replication - factor (e.g., 33.3, or null if the data is not available). For example, a node can own 33% of - the ring, but shows 100% if the replication factor is 3. For non-system keyspaces, the endpoint - percentage ownership information is shown. - :type owns: float - :param host_id: The network ID of the node. - :type host_id: str - :param rack: The rack this node is part of. - :type rack: str - """ - - _attribute_map = { - 'datacenter': {'key': 'datacenter', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'load': {'key': 'load', 'type': 'str'}, - 'tokens': {'key': 'tokens', 'type': '[str]'}, - 'owns': {'key': 'owns', 'type': 'float'}, - 'host_id': {'key': 'hostId', 'type': 'str'}, - 'rack': {'key': 'rack', 'type': 'str'}, - } - - def __init__( - self, - *, - datacenter: Optional[str] = None, - status: Optional[Union[str, "NodeStatus"]] = None, - state: Optional[Union[str, "NodeState"]] = None, - address: Optional[str] = None, - load: Optional[str] = None, - tokens: Optional[List[str]] = None, - owns: Optional[float] = None, - host_id: Optional[str] = None, - rack: Optional[str] = None, - **kwargs - ): - super(ClusterNodeStatusNodesItem, self).__init__(**kwargs) - self.datacenter = datacenter - self.status = status - self.state = state - self.address = address - self.load = load - self.tokens = tokens - self.owns = owns - self.host_id = host_id - self.rack = rack - - -class ClusterResource(ARMResourceProperties): - """Representation of a managed Cassandra cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param properties: Properties of a managed Cassandra cluster. - :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, - } - - def __init__( - self, - *, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - properties: Optional["ClusterResourceProperties"] = None, - **kwargs - ): - super(ClusterResource, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.properties = properties - - -class ClusterResourceProperties(msrest.serialization.Model): - """Properties of a managed Cassandra cluster. +class ClusterResourceProperties(msrest.serialization.Model): + """Properties of a managed Cassandra cluster. Variables are only populated by the server, and will be ignored when sending a request. @@ -1533,9 +1376,6 @@ class ClusterResourceProperties(msrest.serialization.Model): the cluster. Should be changed after cluster creation. Returns null on GET. This field only applies when the authenticationMethod field is 'Cassandra'. :type initial_cassandra_admin_password: str - :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. - To disable backups, set this property to 0. - :type hours_between_backups: int :param prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing data about the managed Cassandra nodes can be reached. :type prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode @@ -1563,6 +1403,13 @@ class ClusterResourceProperties(msrest.serialization.Model): :ivar seed_nodes: List of IP addresses of seed nodes in the managed data centers. These should be added to the seed node lists of all unmanaged nodes. :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. + To disable backups, set this property to 0. + :type hours_between_backups: int + :param deallocated: Whether the cluster and associated data centers has been deallocated. + :type deallocated: bool + :param cassandra_audit_logging_enabled: Whether Cassandra audit logging is enabled. + :type cassandra_audit_logging_enabled: bool """ _validation = { @@ -1578,7 +1425,6 @@ class ClusterResourceProperties(msrest.serialization.Model): 'cluster_name_override': {'key': 'clusterNameOverride', 'type': 'str'}, 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, 'initial_cassandra_admin_password': {'key': 'initialCassandraAdminPassword', 'type': 'str'}, - 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, 'prometheus_endpoint': {'key': 'prometheusEndpoint', 'type': 'SeedNode'}, 'repair_enabled': {'key': 'repairEnabled', 'type': 'bool'}, 'client_certificates': {'key': 'clientCertificates', 'type': '[Certificate]'}, @@ -1586,6 +1432,9 @@ class ClusterResourceProperties(msrest.serialization.Model): 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, + 'deallocated': {'key': 'deallocated', 'type': 'bool'}, + 'cassandra_audit_logging_enabled': {'key': 'cassandraAuditLoggingEnabled', 'type': 'bool'}, } def __init__( @@ -1598,12 +1447,14 @@ def __init__( cluster_name_override: Optional[str] = None, authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, initial_cassandra_admin_password: Optional[str] = None, - hours_between_backups: Optional[int] = None, prometheus_endpoint: Optional["SeedNode"] = None, repair_enabled: Optional[bool] = None, client_certificates: Optional[List["Certificate"]] = None, external_gossip_certificates: Optional[List["Certificate"]] = None, external_seed_nodes: Optional[List["SeedNode"]] = None, + hours_between_backups: Optional[int] = None, + deallocated: Optional[bool] = None, + cassandra_audit_logging_enabled: Optional[bool] = None, **kwargs ): super(ClusterResourceProperties, self).__init__(**kwargs) @@ -1614,7 +1465,6 @@ def __init__( self.cluster_name_override = cluster_name_override self.authentication_method = authentication_method self.initial_cassandra_admin_password = initial_cassandra_admin_password - self.hours_between_backups = hours_between_backups self.prometheus_endpoint = prometheus_endpoint self.repair_enabled = repair_enabled self.client_certificates = client_certificates @@ -1622,405 +1472,563 @@ def __init__( self.gossip_certificates = None self.external_seed_nodes = external_seed_nodes self.seed_nodes = None + self.hours_between_backups = hours_between_backups + self.deallocated = deallocated + self.cassandra_audit_logging_enabled = cassandra_audit_logging_enabled class Column(msrest.serialization.Model): """Cosmos DB Cassandra table column. - :param name: Name of the Cosmos DB Cassandra table column. - :type name: str - :param type: Type of the Cosmos DB Cassandra table column. - :type type: str + :param throughput: Value of the Cosmos DB resource throughput or autoscaleSettings. Use the + ThroughputSetting resource when retrieving offer details. + :type throughput: int + :param autoscale_settings: Specifies the Autoscale settings. + :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings """ _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + 'throughput': {'key': 'throughput', 'type': 'int'}, + 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, } def __init__( self, *, - name: Optional[str] = None, - type: Optional[str] = None, + throughput: Optional[int] = None, + autoscale_settings: Optional["AutoscaleSettings"] = None, **kwargs ): - super(Column, self).__init__(**kwargs) - self.name = name - self.type = type - + super(CassandraViewGetPropertiesOptions, self).__init__(throughput=throughput, autoscale_settings=autoscale_settings, **kwargs) -class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): - """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. - Variables are only populated by the server, and will be ignored when sending a request. +class CommandOutput(msrest.serialization.Model): + """Response of /command api. - :ivar principal_id: The principal id of user assigned identity. - :vartype principal_id: str - :ivar client_id: The client id of user assigned identity. - :vartype client_id: str + :param command_output: Output of the command. + :type command_output: str """ - _validation = { - 'principal_id': {'readonly': True}, - 'client_id': {'readonly': True}, - } - _attribute_map = { - 'principal_id': {'key': 'principalId', 'type': 'str'}, - 'client_id': {'key': 'clientId', 'type': 'str'}, + 'command_output': {'key': 'commandOutput', 'type': 'str'}, } def __init__( self, + *, + command_output: Optional[str] = None, **kwargs ): - super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None + super(CommandOutput, self).__init__(**kwargs) + self.command_output = command_output -class CompositePath(msrest.serialization.Model): - """CompositePath. +class CommandPostBody(msrest.serialization.Model): + """Specification of which command to run where. - :param path: The path for which the indexing behavior applies to. Index paths typically start - with root and end with wildcard (/path/*). - :type path: str - :param order: Sort order for composite paths. Possible values include: "ascending", - "descending". - :type order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder + All required parameters must be populated in order to send to Azure. + + :param command: Required. The command which should be run. + :type command: str + :param arguments: The arguments for the command to be run. + :type arguments: dict[str, str] + :param host: Required. IP address of the cassandra host to run the command on. + :type host: str + :param cassandra_stop_start: If true, stops cassandra before executing the command and then + start it again. + :type cassandra_stop_start: bool + :param readwrite: If true, allows the command to *write* to the cassandra directory, otherwise + read-only. + :type readwrite: bool """ + _validation = { + 'command': {'required': True}, + 'host': {'required': True}, + } + _attribute_map = { - 'path': {'key': 'path', 'type': 'str'}, - 'order': {'key': 'order', 'type': 'str'}, + 'command': {'key': 'command', 'type': 'str'}, + 'arguments': {'key': 'arguments', 'type': '{str}'}, + 'host': {'key': 'host', 'type': 'str'}, + 'cassandra_stop_start': {'key': 'cassandra-stop-start', 'type': 'bool'}, + 'readwrite': {'key': 'readwrite', 'type': 'bool'}, } def __init__( self, *, - path: Optional[str] = None, - order: Optional[Union[str, "CompositePathSortOrder"]] = None, + command: str, + host: str, + arguments: Optional[Dict[str, str]] = None, + cassandra_stop_start: Optional[bool] = None, + readwrite: Optional[bool] = None, **kwargs ): - super(CompositePath, self).__init__(**kwargs) - self.path = path - self.order = order + super(CommandPostBody, self).__init__(**kwargs) + self.command = command + self.arguments = arguments + self.host = host + self.cassandra_stop_start = cassandra_stop_start + self.readwrite = readwrite -class ConflictResolutionPolicy(msrest.serialization.Model): - """The conflict resolution policy for the container. +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. - :param mode: Indicates the conflict resolution mode. Possible values include: "LastWriterWins", - "Custom". Default value: "LastWriterWins". - :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode - :param conflict_resolution_path: The conflict resolution path in the case of LastWriterWins - mode. - :type conflict_resolution_path: str - :param conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom - mode. - :type conflict_resolution_procedure: str + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Cassandra view. + :type id: str + :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. + :type view_definition: str """ + _validation = { + 'id': {'required': True}, + 'view_definition': {'required': True}, + } + _attribute_map = { - 'mode': {'key': 'mode', 'type': 'str'}, - 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, - 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, } def __init__( self, *, - mode: Optional[Union[str, "ConflictResolutionMode"]] = "LastWriterWins", - conflict_resolution_path: Optional[str] = None, - conflict_resolution_procedure: Optional[str] = None, + id: str, + view_definition: str, **kwargs ): - super(ConflictResolutionPolicy, self).__init__(**kwargs) - self.mode = mode - self.conflict_resolution_path = conflict_resolution_path - self.conflict_resolution_procedure = conflict_resolution_procedure - + super(CassandraViewResource, self).__init__(**kwargs) + self.id = id + self.view_definition = view_definition -class ConsistencyPolicy(msrest.serialization.Model): - """The consistency policy for the Cosmos DB database account. - All required parameters must be populated in order to send to Azure. +class ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems(msrest.serialization.Model): + """ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems. - :param default_consistency_level: Required. The default consistency level and configuration - settings of the Cosmos DB account. Possible values include: "Eventual", "Session", - "BoundedStaleness", "Strong", "ConsistentPrefix". - :type default_consistency_level: str or ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel - :param max_staleness_prefix: When used with the Bounded Staleness consistency level, this value - represents the number of stale requests tolerated. Accepted range for this value is 1 – - 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_staleness_prefix: long - :param max_interval_in_seconds: When used with the Bounded Staleness consistency level, this - value represents the time amount of staleness (in seconds) tolerated. Accepted range for this - value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. - :type max_interval_in_seconds: int + :param address: The node's IP address. + :type address: str + :param state: The state of the node in Cassandra ring. Possible values include: "Normal", + "Leaving", "Joining", "Moving", "Stopped". + :type state: str or ~azure.mgmt.cosmosdb.models.NodeState + :param status: + :type status: str + :param load: The amount of file system data in the data directory (e.g., 47.66 kB), excluding + all content in the snapshots subdirectories. Because all SSTable data files are included, any + data that is not cleaned up (such as TTL-expired cells or tombstones) is counted. + :type load: str + :param tokens: List of tokens this node covers. + :type tokens: list[str] + :param size: + :type size: int + :param host_id: The network ID of the node. + :type host_id: str + :param rack: The rack this node is part of. + :type rack: str + :param timestamp: The timestamp when these statistics were captured. + :type timestamp: str + :param disk_used_kb: The amount of disk used, in kB, of the directory /var/lib/cassandra. + :type disk_used_kb: long + :param disk_free_kb: The amount of disk free, in kB, of the directory /var/lib/cassandra. + :type disk_free_kb: long + :param memory_used_kb: Used memory (calculated as total - free - buffers - cache), in kB. + :type memory_used_kb: long + :param memory_buffers_and_cached_kb: Memory used by kernel buffers (Buffers in /proc/meminfo) + and page cache and slabs (Cached and SReclaimable in /proc/meminfo), in kB. + :type memory_buffers_and_cached_kb: long + :param memory_free_kb: Unused memory (MemFree and SwapFree in /proc/meminfo), in kB. + :type memory_free_kb: long + :param memory_total_kb: Total installed memory (MemTotal and SwapTotal in /proc/meminfo), in + kB. + :type memory_total_kb: long + :param cpu_usage: A float representing the current system-wide CPU utilization as a percentage. + :type cpu_usage: float """ - _validation = { - 'default_consistency_level': {'required': True}, - 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, - 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, - } - _attribute_map = { - 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'str'}, - 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, - 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + 'address': {'key': 'address', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'load': {'key': 'load', 'type': 'str'}, + 'tokens': {'key': 'tokens', 'type': '[str]'}, + 'size': {'key': 'size', 'type': 'int'}, + 'host_id': {'key': 'hostID', 'type': 'str'}, + 'rack': {'key': 'rack', 'type': 'str'}, + 'timestamp': {'key': 'timestamp', 'type': 'str'}, + 'disk_used_kb': {'key': 'diskUsedKB', 'type': 'long'}, + 'disk_free_kb': {'key': 'diskFreeKB', 'type': 'long'}, + 'memory_used_kb': {'key': 'memoryUsedKB', 'type': 'long'}, + 'memory_buffers_and_cached_kb': {'key': 'memoryBuffersAndCachedKB', 'type': 'long'}, + 'memory_free_kb': {'key': 'memoryFreeKB', 'type': 'long'}, + 'memory_total_kb': {'key': 'memoryTotalKB', 'type': 'long'}, + 'cpu_usage': {'key': 'cpuUsage', 'type': 'float'}, } def __init__( self, *, - default_consistency_level: Union[str, "DefaultConsistencyLevel"], - max_staleness_prefix: Optional[int] = None, - max_interval_in_seconds: Optional[int] = None, + address: Optional[str] = None, + state: Optional[Union[str, "NodeState"]] = None, + status: Optional[str] = None, + load: Optional[str] = None, + tokens: Optional[List[str]] = None, + size: Optional[int] = None, + host_id: Optional[str] = None, + rack: Optional[str] = None, + timestamp: Optional[str] = None, + disk_used_kb: Optional[int] = None, + disk_free_kb: Optional[int] = None, + memory_used_kb: Optional[int] = None, + memory_buffers_and_cached_kb: Optional[int] = None, + memory_free_kb: Optional[int] = None, + memory_total_kb: Optional[int] = None, + cpu_usage: Optional[float] = None, **kwargs ): - super(ConsistencyPolicy, self).__init__(**kwargs) - self.default_consistency_level = default_consistency_level - self.max_staleness_prefix = max_staleness_prefix - self.max_interval_in_seconds = max_interval_in_seconds + super(ComponentsM9L909SchemasCassandraclusterpublicstatusPropertiesDatacentersItemsPropertiesNodesItems, self).__init__(**kwargs) + self.address = address + self.state = state + self.status = status + self.load = load + self.tokens = tokens + self.size = size + self.host_id = host_id + self.rack = rack + self.timestamp = timestamp + self.disk_used_kb = disk_used_kb + self.disk_free_kb = disk_free_kb + self.memory_used_kb = memory_used_kb + self.memory_buffers_and_cached_kb = memory_buffers_and_cached_kb + self.memory_free_kb = memory_free_kb + self.memory_total_kb = memory_total_kb + self.cpu_usage = cpu_usage -class ContainerPartitionKey(msrest.serialization.Model): - """The configuration of the partition key to be used for partitioning data into multiple partitions. +class CompositePath(msrest.serialization.Model): + """CompositePath. Variables are only populated by the server, and will be ignored when sending a request. - :param paths: List of paths using which data within the container can be partitioned. - :type paths: list[str] - :param kind: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple - partition keys (upto three maximum) are supported for container create. Possible values - include: "Hash", "Range", "MultiHash". Default value: "Hash". - :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind - :param version: Indicates the version of the partition key definition. - :type version: int - :ivar system_key: Indicates if the container is using a system generated partition key. - :vartype system_key: bool + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Cassandra view. + :type id: str + :param view_definition: Required. View Definition of the Cosmos DB Cassandra view. + :type view_definition: str + :ivar rid: A system generated property. A unique identifier. + :vartype rid: str + :ivar ts: A system generated property that denotes the last updated timestamp of the resource. + :vartype ts: float + :ivar etag: A system generated property representing the resource etag required for optimistic + concurrency control. + :vartype etag: str """ _validation = { - 'version': {'maximum': 2, 'minimum': 1}, - 'system_key': {'readonly': True}, + 'id': {'required': True}, + 'view_definition': {'required': True}, + 'rid': {'readonly': True}, + 'ts': {'readonly': True}, + 'etag': {'readonly': True}, } _attribute_map = { - 'paths': {'key': 'paths', 'type': '[str]'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'version': {'key': 'version', 'type': 'int'}, - 'system_key': {'key': 'systemKey', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, + 'view_definition': {'key': 'viewDefinition', 'type': 'str'}, + 'rid': {'key': '_rid', 'type': 'str'}, + 'ts': {'key': '_ts', 'type': 'float'}, + 'etag': {'key': '_etag', 'type': 'str'}, } def __init__( self, *, - paths: Optional[List[str]] = None, - kind: Optional[Union[str, "PartitionKind"]] = "Hash", - version: Optional[int] = None, + id: str, + view_definition: str, **kwargs ): - super(ContainerPartitionKey, self).__init__(**kwargs) - self.paths = paths - self.kind = kind - self.version = version - self.system_key = None + super(CassandraViewGetPropertiesResource, self).__init__(id=id, view_definition=view_definition, **kwargs) + self.id = id + self.view_definition = view_definition + self.rid = None + self.ts = None + self.etag = None -class ContinuousBackupInformation(msrest.serialization.Model): - """Information about the status of continuous backups. +class CassandraViewGetResults(ARMResourceProperties): + """An Azure Cosmos DB Cassandra view. - :param latest_restorable_timestamp: The latest restorable timestamp for a resource. - :type latest_restorable_timestamp: str + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity + :param resource: + :type resource: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesResource + :param options: + :type options: ~azure.mgmt.cosmosdb.models.CassandraViewGetPropertiesOptions """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + _attribute_map = { - 'latest_restorable_timestamp': {'key': 'latestRestorableTimestamp', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'resource': {'key': 'properties.resource', 'type': 'CassandraViewGetPropertiesResource'}, + 'options': {'key': 'properties.options', 'type': 'CassandraViewGetPropertiesOptions'}, } def __init__( self, *, - latest_restorable_timestamp: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + resource: Optional["CassandraViewGetPropertiesResource"] = None, + options: Optional["CassandraViewGetPropertiesOptions"] = None, **kwargs ): - super(ContinuousBackupInformation, self).__init__(**kwargs) - self.latest_restorable_timestamp = latest_restorable_timestamp + super(CassandraViewGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + self.resource = resource + self.options = options -class ContinuousBackupRestoreLocation(msrest.serialization.Model): - """Properties of the regional restorable account. +class ConnectionError(msrest.serialization.Model): + """ConnectionError. - :param location: The name of the continuous backup restore location. - :type location: str + :param connection_state: The kind of connection error that occurred. Possible values include: + "Unknown", "OK", "OperatorToDataCenterNetworkError", "DatacenterToDatacenterNetworkError", + "InternalOperatorToDataCenterCertificateError", "InternalError". + :type connection_state: str or ~azure.mgmt.cosmosdb.models.ConnectionState + :param i_p_from: The IP of host that originated the failed connection. + :type i_p_from: str + :param i_p_to: The IP that the connection attempted to reach. + :type i_p_to: str + :param port: The TCP port the connection was attempted on. + :type port: int + :param exception: Detailed error message about the failed connection. + :type exception: str """ _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'i_p_from': {'key': 'iPFrom', 'type': 'str'}, + 'i_p_to': {'key': 'iPTo', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + 'exception': {'key': 'exception', 'type': 'str'}, } def __init__( self, *, - location: Optional[str] = None, + connection_state: Optional[Union[str, "ConnectionState"]] = None, + i_p_from: Optional[str] = None, + i_p_to: Optional[str] = None, + port: Optional[int] = None, + exception: Optional[str] = None, **kwargs ): - super(ContinuousBackupRestoreLocation, self).__init__(**kwargs) - self.location = location + super(ConnectionError, self).__init__(**kwargs) + self.connection_state = connection_state + self.i_p_from = i_p_from + self.i_p_to = i_p_to + self.port = port + self.exception = exception -class ContinuousModeBackupPolicy(BackupPolicy): - """The object representing continuous mode backup policy. +class ConsistencyPolicy(msrest.serialization.Model): + """The consistency policy for the Cosmos DB database account. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param type: Required. Describes the mode of backups.Constant filled by server. Possible - values include: "Periodic", "Continuous". - :type type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType - :param migration_state: The object representing the state of the migration between the backup - policies. - :type migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState + :ivar value: List of Cassandra views and their properties. + :vartype value: list[~azure.mgmt.cosmosdb.models.CassandraViewGetResults] """ _validation = { - 'type': {'required': True}, + 'value': {'readonly': True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, + 'value': {'key': 'value', 'type': '[CassandraViewGetResults]'}, } def __init__( self, - *, - migration_state: Optional["BackupPolicyMigrationState"] = None, **kwargs ): - super(ContinuousModeBackupPolicy, self).__init__(migration_state=migration_state, **kwargs) - self.type = 'Continuous' # type: str + super(CassandraViewListResult, self).__init__(**kwargs) + self.value = None -class CorsPolicy(msrest.serialization.Model): - """The CORS policy for the Cosmos DB database account. +class Certificate(msrest.serialization.Model): + """Certificate. - All required parameters must be populated in order to send to Azure. - - :param allowed_origins: Required. The origin domains that are permitted to make a request - against the service via CORS. - :type allowed_origins: str - :param allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a - CORS request. - :type allowed_methods: str - :param allowed_headers: The request headers that the origin domain may specify on the CORS - request. - :type allowed_headers: str - :param exposed_headers: The response headers that may be sent in the response to the CORS - request and exposed by the browser to the request issuer. - :type exposed_headers: str - :param max_age_in_seconds: The maximum amount time that a browser should cache the preflight - OPTIONS request. - :type max_age_in_seconds: long - """ - - _validation = { - 'allowed_origins': {'required': True}, - 'max_age_in_seconds': {'maximum': 2147483647, 'minimum': 1}, - } + :param pem: PEM formatted public key. + :type pem: str + """ _attribute_map = { - 'allowed_origins': {'key': 'allowedOrigins', 'type': 'str'}, - 'allowed_methods': {'key': 'allowedMethods', 'type': 'str'}, - 'allowed_headers': {'key': 'allowedHeaders', 'type': 'str'}, - 'exposed_headers': {'key': 'exposedHeaders', 'type': 'str'}, - 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, + 'pem': {'key': 'pem', 'type': 'str'}, } def __init__( self, *, - allowed_origins: str, - allowed_methods: Optional[str] = None, - allowed_headers: Optional[str] = None, - exposed_headers: Optional[str] = None, - max_age_in_seconds: Optional[int] = None, + pem: Optional[str] = None, **kwargs ): - super(CorsPolicy, self).__init__(**kwargs) - self.allowed_origins = allowed_origins - self.allowed_methods = allowed_methods - self.allowed_headers = allowed_headers - self.exposed_headers = exposed_headers - self.max_age_in_seconds = max_age_in_seconds + super(Certificate, self).__init__(**kwargs) + self.pem = pem -class CreateUpdateOptions(msrest.serialization.Model): - """CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". +class ClusterKey(msrest.serialization.Model): + """Cosmos DB Cassandra table cluster key. - :param throughput: Request Units per second. For example, "throughput": 10000. - :type throughput: int - :param autoscale_settings: Specifies the Autoscale settings. - :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings + :param name: Name of the Cosmos DB Cassandra table cluster key. + :type name: str + :param order_by: Order of the Cosmos DB Cassandra table cluster key, only support "Asc" and + "Desc". + :type order_by: str """ _attribute_map = { - 'throughput': {'key': 'throughput', 'type': 'int'}, - 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + 'name': {'key': 'name', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'str'}, } def __init__( self, *, - throughput: Optional[int] = None, - autoscale_settings: Optional["AutoscaleSettings"] = None, + name: Optional[str] = None, + order_by: Optional[str] = None, **kwargs ): - super(CreateUpdateOptions, self).__init__(**kwargs) - self.throughput = throughput - self.autoscale_settings = autoscale_settings - + super(ClusterKey, self).__init__(**kwargs) + self.name = name + self.order_by = order_by -class DatabaseAccountConnectionString(msrest.serialization.Model): - """Connection string for the Cosmos DB account. - Variables are only populated by the server, and will be ignored when sending a request. +class ClusterNodeStatus(msrest.serialization.Model): + """The status of all nodes in the cluster (as returned by 'nodetool status'). - :ivar connection_string: Value of the connection string. - :vartype connection_string: str - :ivar description: Description of the connection string. - :vartype description: str + :param nodes: Information about nodes in the cluster (corresponds to what is returned from + nodetool info). + :type nodes: list[~azure.mgmt.cosmosdb.models.ClusterNodeStatusNodesItem] """ - _validation = { - 'connection_string': {'readonly': True}, - 'description': {'readonly': True}, + _attribute_map = { + 'nodes': {'key': 'nodes', 'type': '[ClusterNodeStatusNodesItem]'}, } + def __init__( + self, + *, + nodes: Optional[List["ClusterNodeStatusNodesItem"]] = None, + **kwargs + ): + super(ClusterNodeStatus, self).__init__(**kwargs) + self.nodes = nodes + + +class ClusterNodeStatusNodesItem(msrest.serialization.Model): + """ClusterNodeStatusNodesItem. + + :param datacenter: The Cassandra data center this node resides in. + :type datacenter: str + :param status: Indicates whether the node is functioning or not. Possible values include: "Up", + "Down". + :type status: str or ~azure.mgmt.cosmosdb.models.NodeStatus + :param state: The state of the node in relation to the cluster. Possible values include: + "Normal", "Leaving", "Joining", "Moving", "Stopped". + :type state: str or ~azure.mgmt.cosmosdb.models.NodeState + :param address: The node's URL. + :type address: str + :param load: The amount of file system data in the data directory (e.g., 47.66 KB), excluding + all content in the snapshots subdirectories. Because all SSTable data files are included, any + data that is not cleaned up (such as TTL-expired cell or tombstoned data) is counted. + :type load: str + :param tokens: List of tokens. + :type tokens: list[str] + :param owns: The percentage of the data owned by the node per datacenter times the replication + factor (e.g., 33.3, or null if the data is not available). For example, a node can own 33% of + the ring, but shows 100% if the replication factor is 3. For non-system keyspaces, the endpoint + percentage ownership information is shown. + :type owns: float + :param host_id: The network ID of the node. + :type host_id: str + :param rack: The rack this node is part of. + :type rack: str + """ + _attribute_map = { - 'connection_string': {'key': 'connectionString', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + 'datacenter': {'key': 'datacenter', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'load': {'key': 'load', 'type': 'str'}, + 'tokens': {'key': 'tokens', 'type': '[str]'}, + 'owns': {'key': 'owns', 'type': 'float'}, + 'host_id': {'key': 'hostId', 'type': 'str'}, + 'rack': {'key': 'rack', 'type': 'str'}, } def __init__( self, + *, + datacenter: Optional[str] = None, + status: Optional[Union[str, "NodeStatus"]] = None, + state: Optional[Union[str, "NodeState"]] = None, + address: Optional[str] = None, + load: Optional[str] = None, + tokens: Optional[List[str]] = None, + owns: Optional[float] = None, + host_id: Optional[str] = None, + rack: Optional[str] = None, **kwargs ): - super(DatabaseAccountConnectionString, self).__init__(**kwargs) - self.connection_string = None - self.description = None + super(ClusterNodeStatusNodesItem, self).__init__(**kwargs) + self.datacenter = datacenter + self.status = status + self.state = state + self.address = address + self.load = load + self.tokens = tokens + self.owns = owns + self.host_id = host_id + self.rack = rack -class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB database accounts. +class ClusterResource(ARMResourceProperties): + """Representation of a managed Cassandra cluster. 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. - :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -2038,90 +2046,14 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): :type tags: dict[str, str] :param identity: Identity for the resource. :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param kind: Indicates the type of database account. This can only be set at database account - creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". - :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :param consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: - "Standard". - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual - Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: Enables automatic failover of the write region in the rare - event that the region is unavailable due to an outage. Automatic failover will result in a new - write region for the account and is chosen based on the failover priorities configured for the - account. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB - account. - :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :param enable_multiple_write_locations: Enables the account to write in multiple locations. - :type enable_multiple_write_locations: bool - :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. - :type enable_cassandra_connector: bool - :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". - :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer - :param disable_key_based_metadata_write_access: Disable write operations on metadata resources - (databases, containers, throughput) via account keys. - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault. - :type key_vault_key_uri: str - :param default_identity: The default identity for accessing key vault used in features like - customer managed keys. The default identity needs to be explicitly set by the users. It can be - "FirstPartyIdentity", "SystemAssignedIdentity" and more. - :type default_identity: str - :param public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. - :type enable_analytical_storage: bool - :param analytical_storage_configuration: Analytical storage specific properties. - :type analytical_storage_configuration: - ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters + :param properties: Properties of a managed Cassandra cluster. + :type properties: ~azure.mgmt.cosmosdb.models.ClusterResourceProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, } _attribute_map = { @@ -2131,292 +2063,543 @@ class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'kind': {'key': 'kind', 'type': 'str'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, + 'properties': {'key': 'properties', 'type': 'ClusterResourceProperties'}, } - database_account_offer_type = "Standard" + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + properties: Optional["ClusterResourceProperties"] = None, + **kwargs + ): + super(ClusterResource, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + self.properties = properties + + +class ClusterResourceProperties(msrest.serialization.Model): + """Properties of a managed Cassandra cluster. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param provisioning_state: The status of the resource at the time the operation was called. + Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState + :param restore_from_backup_id: To create an empty cluster, omit this field or set it to null. + To restore a backup into a new cluster, set this field to the resource id of the backup. + :type restore_from_backup_id: str + :param delegated_management_subnet_id: Resource id of a subnet that this cluster's management + service should have its network interface attached to. The subnet must be routable to all + subnets that will be delegated to data centers. The resource id must be of the form + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. + :type delegated_management_subnet_id: str + :param cassandra_version: Which version of Cassandra should this cluster converge to running + (e.g., 3.11). When updated, the cluster may take some time to migrate to the new version. + :type cassandra_version: str + :param cluster_name_override: If you need to set the clusterName property in cassandra.yaml to + something besides the resource name of the cluster, set the value to use on this property. + :type cluster_name_override: str + :param authentication_method: Which authentication method Cassandra should use to authenticate + clients. 'None' turns off authentication, so should not be used except in emergencies. + 'Cassandra' is the default password based authentication. The default is 'Cassandra'. Possible + values include: "None", "Cassandra". + :type authentication_method: str or ~azure.mgmt.cosmosdb.models.AuthenticationMethod + :param initial_cassandra_admin_password: Initial password for clients connecting as admin to + the cluster. Should be changed after cluster creation. Returns null on GET. This field only + applies when the authenticationMethod field is 'Cassandra'. + :type initial_cassandra_admin_password: str + :param hours_between_backups: Number of hours to wait between taking a backup of the cluster. + To disable backups, set this property to 0. + :type hours_between_backups: int + :param prometheus_endpoint: Hostname or IP address where the Prometheus endpoint containing + data about the managed Cassandra nodes can be reached. + :type prometheus_endpoint: ~azure.mgmt.cosmosdb.models.SeedNode + :param repair_enabled: Should automatic repairs run on this cluster? If omitted, this is true, + and should stay true unless you are running a hybrid cluster where you are already doing your + own repairs. + :type repair_enabled: bool + :param client_certificates: List of TLS certificates used to authorize clients connecting to + the cluster. All connections are TLS encrypted whether clientCertificates is set or not, but if + clientCertificates is set, the managed Cassandra cluster will reject all connections not + bearing a TLS client certificate that can be validated from one or more of the public + certificates in this property. + :type client_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] + :param external_gossip_certificates: List of TLS certificates used to authorize gossip from + unmanaged data centers. The TLS certificates of all nodes in unmanaged data centers must be + verifiable using one of the certificates provided in this property. + :type external_gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] + :ivar gossip_certificates: List of TLS certificates that unmanaged nodes must trust for gossip + with managed nodes. All managed nodes will present TLS client certificates that are verifiable + using one of the certificates provided in this property. + :vartype gossip_certificates: list[~azure.mgmt.cosmosdb.models.Certificate] + :param external_seed_nodes: List of IP addresses of seed nodes in unmanaged data centers. These + will be added to the seed node lists of all managed nodes. + :type external_seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :ivar seed_nodes: List of IP addresses of seed nodes in the managed data centers. These should + be added to the seed node lists of all unmanaged nodes. + :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + """ + + _validation = { + 'gossip_certificates': {'readonly': True}, + 'seed_nodes': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'restore_from_backup_id': {'key': 'restoreFromBackupId', 'type': 'str'}, + 'delegated_management_subnet_id': {'key': 'delegatedManagementSubnetId', 'type': 'str'}, + 'cassandra_version': {'key': 'cassandraVersion', 'type': 'str'}, + 'cluster_name_override': {'key': 'clusterNameOverride', 'type': 'str'}, + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'initial_cassandra_admin_password': {'key': 'initialCassandraAdminPassword', 'type': 'str'}, + 'hours_between_backups': {'key': 'hoursBetweenBackups', 'type': 'int'}, + 'prometheus_endpoint': {'key': 'prometheusEndpoint', 'type': 'SeedNode'}, + 'repair_enabled': {'key': 'repairEnabled', 'type': 'bool'}, + 'client_certificates': {'key': 'clientCertificates', 'type': '[Certificate]'}, + 'external_gossip_certificates': {'key': 'externalGossipCertificates', 'type': '[Certificate]'}, + 'gossip_certificates': {'key': 'gossipCertificates', 'type': '[Certificate]'}, + 'external_seed_nodes': {'key': 'externalSeedNodes', 'type': '[SeedNode]'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + } + + def __init__( + self, + *, + provisioning_state: Optional[Union[str, "ManagedCassandraProvisioningState"]] = None, + restore_from_backup_id: Optional[str] = None, + delegated_management_subnet_id: Optional[str] = None, + cassandra_version: Optional[str] = None, + cluster_name_override: Optional[str] = None, + authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, + initial_cassandra_admin_password: Optional[str] = None, + hours_between_backups: Optional[int] = None, + prometheus_endpoint: Optional["SeedNode"] = None, + repair_enabled: Optional[bool] = None, + client_certificates: Optional[List["Certificate"]] = None, + external_gossip_certificates: Optional[List["Certificate"]] = None, + external_seed_nodes: Optional[List["SeedNode"]] = None, + **kwargs + ): + super(ClusterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = provisioning_state + self.restore_from_backup_id = restore_from_backup_id + self.delegated_management_subnet_id = delegated_management_subnet_id + self.cassandra_version = cassandra_version + self.cluster_name_override = cluster_name_override + self.authentication_method = authentication_method + self.initial_cassandra_admin_password = initial_cassandra_admin_password + self.hours_between_backups = hours_between_backups + self.prometheus_endpoint = prometheus_endpoint + self.repair_enabled = repair_enabled + self.client_certificates = client_certificates + self.external_gossip_certificates = external_gossip_certificates + self.gossip_certificates = None + self.external_seed_nodes = external_seed_nodes + self.seed_nodes = None + + +class Column(msrest.serialization.Model): + """Cosmos DB Cassandra table column. + + :param name: Name of the Cosmos DB Cassandra table column. + :type name: str + :param type: Type of the Cosmos DB Cassandra table column. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + super(Column, self).__init__(**kwargs) + self.name = name + self.type = type + + +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class CompositePath(msrest.serialization.Model): + """CompositePath. + + :param path: The path for which the indexing behavior applies to. Index paths typically start + with root and end with wildcard (/path/*). + :type path: str + :param order: Sort order for composite paths. Possible values include: "ascending", + "descending". + :type order: str or ~azure.mgmt.cosmosdb.models.CompositePathSortOrder + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__( + self, + *, + path: Optional[str] = None, + order: Optional[Union[str, "CompositePathSortOrder"]] = None, + **kwargs + ): + super(CompositePath, self).__init__(**kwargs) + self.path = path + self.order = order + + +class ConflictResolutionPolicy(msrest.serialization.Model): + """The conflict resolution policy for the container. + + :param mode: Indicates the conflict resolution mode. Possible values include: "LastWriterWins", + "Custom". Default value: "LastWriterWins". + :type mode: str or ~azure.mgmt.cosmosdb.models.ConflictResolutionMode + :param conflict_resolution_path: The conflict resolution path in the case of LastWriterWins + mode. + :type conflict_resolution_path: str + :param conflict_resolution_procedure: The procedure to resolve conflicts in the case of custom + mode. + :type conflict_resolution_procedure: str + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'conflict_resolution_path': {'key': 'conflictResolutionPath', 'type': 'str'}, + 'conflict_resolution_procedure': {'key': 'conflictResolutionProcedure', 'type': 'str'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "ConflictResolutionMode"]] = "LastWriterWins", + conflict_resolution_path: Optional[str] = None, + conflict_resolution_procedure: Optional[str] = None, + **kwargs + ): + super(ConflictResolutionPolicy, self).__init__(**kwargs) + self.mode = mode + self.conflict_resolution_path = conflict_resolution_path + self.conflict_resolution_procedure = conflict_resolution_procedure + + +class ConsistencyPolicy(msrest.serialization.Model): + """The consistency policy for the Cosmos DB database account. + + All required parameters must be populated in order to send to Azure. + + :param default_consistency_level: Required. The default consistency level and configuration + settings of the Cosmos DB account. Possible values include: "Eventual", "Session", + "BoundedStaleness", "Strong", "ConsistentPrefix". + :type default_consistency_level: str or ~azure.mgmt.cosmosdb.models.DefaultConsistencyLevel + :param max_staleness_prefix: When used with the Bounded Staleness consistency level, this value + represents the number of stale requests tolerated. Accepted range for this value is 1 – + 2,147,483,647. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_staleness_prefix: long + :param max_interval_in_seconds: When used with the Bounded Staleness consistency level, this + value represents the time amount of staleness (in seconds) tolerated. Accepted range for this + value is 5 - 86400. Required when defaultConsistencyPolicy is set to 'BoundedStaleness'. + :type max_interval_in_seconds: int + """ + + _validation = { + 'default_consistency_level': {'required': True}, + 'max_staleness_prefix': {'maximum': 2147483647, 'minimum': 1}, + 'max_interval_in_seconds': {'maximum': 86400, 'minimum': 5}, + } + + _attribute_map = { + 'default_consistency_level': {'key': 'defaultConsistencyLevel', 'type': 'str'}, + 'max_staleness_prefix': {'key': 'maxStalenessPrefix', 'type': 'long'}, + 'max_interval_in_seconds': {'key': 'maxIntervalInSeconds', 'type': 'int'}, + } + + def __init__( + self, + *, + default_consistency_level: Union[str, "DefaultConsistencyLevel"], + max_staleness_prefix: Optional[int] = None, + max_interval_in_seconds: Optional[int] = None, + **kwargs + ): + super(ConsistencyPolicy, self).__init__(**kwargs) + self.default_consistency_level = default_consistency_level + self.max_staleness_prefix = max_staleness_prefix + self.max_interval_in_seconds = max_interval_in_seconds + + +class ContainerPartitionKey(msrest.serialization.Model): + """The configuration of the partition key to be used for partitioning data into multiple partitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param paths: List of paths using which data within the container can be partitioned. + :type paths: list[str] + :param kind: Indicates the kind of algorithm used for partitioning. For MultiHash, multiple + partition keys (upto three maximum) are supported for container create. Possible values + include: "Hash", "Range", "MultiHash". Default value: "Hash". + :type kind: str or ~azure.mgmt.cosmosdb.models.PartitionKind + :param version: Indicates the version of the partition key definition. + :type version: int + :ivar system_key: Indicates if the container is using a system generated partition key. + :vartype system_key: bool + """ + + _validation = { + 'version': {'maximum': 2, 'minimum': 1}, + 'system_key': {'readonly': True}, + } + + _attribute_map = { + 'paths': {'key': 'paths', 'type': '[str]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + 'system_key': {'key': 'systemKey', 'type': 'bool'}, + } + + def __init__( + self, + *, + paths: Optional[List[str]] = None, + kind: Optional[Union[str, "PartitionKind"]] = "Hash", + version: Optional[int] = None, + **kwargs + ): + super(ContainerPartitionKey, self).__init__(**kwargs) + self.paths = paths + self.kind = kind + self.version = version + self.system_key = None + + +class ContinuousBackupInformation(msrest.serialization.Model): + """Information about the status of continuous backups. + + :param latest_restorable_timestamp: The latest restorable timestamp for a resource. + :type latest_restorable_timestamp: str + """ + + _attribute_map = { + 'latest_restorable_timestamp': {'key': 'latestRestorableTimestamp', 'type': 'str'}, + } + + def __init__( + self, + *, + latest_restorable_timestamp: Optional[str] = None, + **kwargs + ): + super(ContinuousBackupInformation, self).__init__(**kwargs) + self.latest_restorable_timestamp = latest_restorable_timestamp + + +class ContinuousBackupRestoreLocation(msrest.serialization.Model): + """Properties of the regional restorable account. + + :param location: The name of the continuous backup restore location. + :type location: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + **kwargs + ): + super(ContinuousBackupRestoreLocation, self).__init__(**kwargs) + self.location = location + + +class ContinuousModeBackupPolicy(BackupPolicy): + """The object representing continuous mode backup policy. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Describes the mode of backups.Constant filled by server. Possible + values include: "Periodic", "Continuous". + :type type: str or ~azure.mgmt.cosmosdb.models.BackupPolicyType + :param migration_state: The object representing the state of the migration between the backup + policies. + :type migration_state: ~azure.mgmt.cosmosdb.models.BackupPolicyMigrationState + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'migration_state': {'key': 'migrationState', 'type': 'BackupPolicyMigrationState'}, + } + + def __init__( + self, + *, + migration_state: Optional["BackupPolicyMigrationState"] = None, + **kwargs + ): + super(ContinuousModeBackupPolicy, self).__init__(migration_state=migration_state, **kwargs) + self.type = 'Continuous' # type: str + + +class CorsPolicy(msrest.serialization.Model): + """The CORS policy for the Cosmos DB database account. + + All required parameters must be populated in order to send to Azure. + + :param allowed_origins: Required. The origin domains that are permitted to make a request + against the service via CORS. + :type allowed_origins: str + :param allowed_methods: The methods (HTTP request verbs) that the origin domain may use for a + CORS request. + :type allowed_methods: str + :param allowed_headers: The request headers that the origin domain may specify on the CORS + request. + :type allowed_headers: str + :param exposed_headers: The response headers that may be sent in the response to the CORS + request and exposed by the browser to the request issuer. + :type exposed_headers: str + :param max_age_in_seconds: The maximum amount time that a browser should cache the preflight + OPTIONS request. + :type max_age_in_seconds: long + """ + + _validation = { + 'allowed_origins': {'required': True}, + 'max_age_in_seconds': {'maximum': 2147483647, 'minimum': 1}, + } + + _attribute_map = { + 'allowed_origins': {'key': 'allowedOrigins', 'type': 'str'}, + 'allowed_methods': {'key': 'allowedMethods', 'type': 'str'}, + 'allowed_headers': {'key': 'allowedHeaders', 'type': 'str'}, + 'exposed_headers': {'key': 'exposedHeaders', 'type': 'str'}, + 'max_age_in_seconds': {'key': 'maxAgeInSeconds', 'type': 'long'}, + } + + def __init__( + self, + *, + allowed_origins: str, + allowed_methods: Optional[str] = None, + allowed_headers: Optional[str] = None, + exposed_headers: Optional[str] = None, + max_age_in_seconds: Optional[int] = None, + **kwargs + ): + super(CorsPolicy, self).__init__(**kwargs) + self.allowed_origins = allowed_origins + self.allowed_methods = allowed_methods + self.allowed_headers = allowed_headers + self.exposed_headers = exposed_headers + self.max_age_in_seconds = max_age_in_seconds + + +class CreateUpdateOptions(msrest.serialization.Model): + """CreateUpdateOptions are a list of key-value pairs that describe the resource. Supported keys are "If-Match", "If-None-Match", "Session-Token" and "Throughput". + + :param throughput: Request Units per second. For example, "throughput": 10000. + :type throughput: int + :param autoscale_settings: Specifies the Autoscale settings. + :type autoscale_settings: ~azure.mgmt.cosmosdb.models.AutoscaleSettings + """ + + _attribute_map = { + 'throughput': {'key': 'throughput', 'type': 'int'}, + 'autoscale_settings': {'key': 'autoscaleSettings', 'type': 'AutoscaleSettings'}, + } def __init__( self, *, - locations: List["Location"], - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - kind: Optional[Union[str, "DatabaseAccountKind"]] = None, - consistency_policy: Optional["ConsistencyPolicy"] = None, - ip_rules: Optional[List["IpAddressOrRange"]] = None, - is_virtual_network_filter_enabled: Optional[bool] = None, - enable_automatic_failover: Optional[bool] = None, - capabilities: Optional[List["Capability"]] = None, - virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, - enable_multiple_write_locations: Optional[bool] = None, - enable_cassandra_connector: Optional[bool] = None, - connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, - disable_key_based_metadata_write_access: Optional[bool] = None, - key_vault_key_uri: Optional[str] = None, - default_identity: Optional[str] = None, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, - enable_free_tier: Optional[bool] = None, - api_properties: Optional["ApiProperties"] = None, - enable_analytical_storage: Optional[bool] = None, - analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, - backup_policy: Optional["BackupPolicy"] = None, - cors: Optional[List["CorsPolicy"]] = None, - network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, - network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, - disable_local_auth: Optional[bool] = None, - restore_parameters: Optional["RestoreParameters"] = None, + throughput: Optional[int] = None, + autoscale_settings: Optional["AutoscaleSettings"] = None, **kwargs ): - super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) - self.kind = kind - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_rules = ip_rules - self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled - self.enable_automatic_failover = enable_automatic_failover - self.capabilities = capabilities - self.virtual_network_rules = virtual_network_rules - self.enable_multiple_write_locations = enable_multiple_write_locations - self.enable_cassandra_connector = enable_cassandra_connector - self.connector_offer = connector_offer - self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access - self.key_vault_key_uri = key_vault_key_uri - self.default_identity = default_identity - self.public_network_access = public_network_access - self.enable_free_tier = enable_free_tier - self.api_properties = api_properties - self.enable_analytical_storage = enable_analytical_storage - self.analytical_storage_configuration = analytical_storage_configuration - self.create_mode = None # type: Optional[str] - self.backup_policy = backup_policy - self.cors = cors - self.network_acl_bypass = network_acl_bypass - self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids - self.diagnostic_log_settings = diagnostic_log_settings - self.disable_local_auth = disable_local_auth - self.restore_parameters = restore_parameters - + super(CreateUpdateOptions, self).__init__(**kwargs) + self.throughput = throughput + self.autoscale_settings = autoscale_settings -class DatabaseAccountCreateUpdateProperties(msrest.serialization.Model): - """Properties to create and update Azure Cosmos DB database accounts. - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DefaultRequestDatabaseAccountCreateUpdateProperties. +class DatabaseAccountConnectionString(msrest.serialization.Model): + """Connection string for the Cosmos DB account. 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 consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: - "Standard". - :vartype database_account_offer_type: str - :param ip_rules: List of IpRules. - :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] - :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual - Network ACL rules. - :type is_virtual_network_filter_enabled: bool - :param enable_automatic_failover: Enables automatic failover of the write region in the rare - event that the region is unavailable due to an outage. Automatic failover will result in a new - write region for the account and is chosen based on the failover priorities configured for the - account. - :type enable_automatic_failover: bool - :param capabilities: List of Cosmos DB capabilities for the account. - :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB - account. - :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :param enable_multiple_write_locations: Enables the account to write in multiple locations. - :type enable_multiple_write_locations: bool - :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. - :type enable_cassandra_connector: bool - :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* - account. Possible values include: "Small". - :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer - :param disable_key_based_metadata_write_access: Disable write operations on metadata resources - (databases, containers, throughput) via account keys. - :type disable_key_based_metadata_write_access: bool - :param key_vault_key_uri: The URI of the key vault. - :type key_vault_key_uri: str - :param default_identity: The default identity for accessing key vault used in features like - customer managed keys. The default identity needs to be explicitly set by the users. It can be - "FirstPartyIdentity", "SystemAssignedIdentity" and more. - :type default_identity: str - :param public_network_access: Whether requests from Public Network are allowed. Possible values - include: "Enabled", "Disabled". - :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess - :param enable_free_tier: Flag to indicate whether Free Tier is enabled. - :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. - :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties - :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. - :type enable_analytical_storage: bool - :param analytical_storage_configuration: Analytical storage specific properties. - :type analytical_storage_configuration: - ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". - :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param backup_policy: The object representing the policy for taking backups on an account. - :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy - :param cors: The CORS policy for the Cosmos DB database account. - :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] - :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. - Possible values include: "None", "AzureServices". - :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass - :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl - Bypass for the Cosmos DB account. - :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings - :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be - used exclusively for authentication. - :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters + :ivar connection_string: Value of the connection string. + :vartype connection_string: str + :ivar description: Description of the connection string. + :vartype description: str """ _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, + 'connection_string': {'readonly': True}, + 'description': {'readonly': True}, } _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, - } - - _subtype_map = { - 'create_mode': {'Default': 'DefaultRequestDatabaseAccountCreateUpdateProperties'} + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } - database_account_offer_type = "Standard" - def __init__( self, - *, - locations: List["Location"], - consistency_policy: Optional["ConsistencyPolicy"] = None, - ip_rules: Optional[List["IpAddressOrRange"]] = None, - is_virtual_network_filter_enabled: Optional[bool] = None, - enable_automatic_failover: Optional[bool] = None, - capabilities: Optional[List["Capability"]] = None, - virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, - enable_multiple_write_locations: Optional[bool] = None, - enable_cassandra_connector: Optional[bool] = None, - connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, - disable_key_based_metadata_write_access: Optional[bool] = None, - key_vault_key_uri: Optional[str] = None, - default_identity: Optional[str] = None, - public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, - enable_free_tier: Optional[bool] = None, - api_properties: Optional["ApiProperties"] = None, - enable_analytical_storage: Optional[bool] = None, - analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, - backup_policy: Optional["BackupPolicy"] = None, - cors: Optional[List["CorsPolicy"]] = None, - network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, - network_acl_bypass_resource_ids: Optional[List[str]] = None, - diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, - disable_local_auth: Optional[bool] = None, - restore_parameters: Optional["RestoreParameters"] = None, **kwargs ): - super(DatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) - self.consistency_policy = consistency_policy - self.locations = locations - self.ip_rules = ip_rules - self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled - self.enable_automatic_failover = enable_automatic_failover - self.capabilities = capabilities - self.virtual_network_rules = virtual_network_rules - self.enable_multiple_write_locations = enable_multiple_write_locations - self.enable_cassandra_connector = enable_cassandra_connector - self.connector_offer = connector_offer - self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access - self.key_vault_key_uri = key_vault_key_uri - self.default_identity = default_identity - self.public_network_access = public_network_access - self.enable_free_tier = enable_free_tier - self.api_properties = api_properties - self.enable_analytical_storage = enable_analytical_storage - self.analytical_storage_configuration = analytical_storage_configuration - self.create_mode = None # type: Optional[str] - self.backup_policy = backup_policy - self.cors = cors - self.network_acl_bypass = network_acl_bypass - self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids - self.diagnostic_log_settings = diagnostic_log_settings - self.disable_local_auth = disable_local_auth - self.restore_parameters = restore_parameters + super(DatabaseAccountConnectionString, self).__init__(**kwargs) + self.connection_string = None + self.description = None -class DatabaseAccountGetResults(ARMResourceProperties): - """An Azure Cosmos DB database account. +class DatabaseAccountCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB database accounts. 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. + :ivar id: The unique resource identifier of the ARM resource. :vartype id: str :ivar name: The name of the ARM resource. @@ -2437,21 +2620,13 @@ class DatabaseAccountGetResults(ARMResourceProperties): :param kind: Indicates the type of database account. This can only be set at database account creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind - :ivar system_data: The system meta data relating to this resource. - :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData - :ivar provisioning_state: The status of the Cosmos DB account at the time the operation was - called. The status can be one of following. 'Creating' – the Cosmos DB account is being - created. When an account is in Creating state, only properties that are specified as input for - the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is - active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB - account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – - the Cosmos DB account deletion failed. - :vartype provisioning_state: str - :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. - :vartype document_endpoint: str - :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default - value: Standard. The only acceptable values to pass in are None and "Standard". The default - value is None. + :param consistency_policy: The consistency policy for the Cosmos DB account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: Required. An array that contains the georeplication locations enabled for the + Cosmos DB account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar database_account_offer_type: The offer type for the database. Has constant value: + "Standard". :vartype database_account_offer_type: str :param ip_rules: List of IpRules. :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] @@ -2463,27 +2638,11 @@ class DatabaseAccountGetResults(ARMResourceProperties): write region for the account and is chosen based on the failover priorities configured for the account. :type enable_automatic_failover: bool - :param consistency_policy: The consistency policy for the Cosmos DB database account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param capabilities: List of Cosmos DB capabilities for the account. :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] - :ivar write_locations: An array that contains the write location for the Cosmos DB account. - :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar read_locations: An array that contains of the read locations enabled for the Cosmos DB - account. - :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar locations: An array that contains all of the locations enabled for the Cosmos DB account. - :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar failover_policies: An array that contains the regions ordered by their failover - priorities. - :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] - :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the - Cosmos DB account. - :vartype private_endpoint_connections: - list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] :param enable_multiple_write_locations: Enables the account to write in multiple locations. :type enable_multiple_write_locations: bool :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. @@ -2505,20 +2664,16 @@ class DatabaseAccountGetResults(ARMResourceProperties): :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :param enable_free_tier: Flag to indicate whether Free Tier is enabled. :type enable_free_tier: bool - :param api_properties: API specific properties. + :param api_properties: API specific properties. Currently, supported only for MongoDB API. :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. :type enable_analytical_storage: bool :param analytical_storage_configuration: Analytical storage specific properties. :type analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :ivar instance_id: A unique identifier assigned to the database account. - :vartype instance_id: str - :param create_mode: Enum to indicate the mode of account creation. Possible values include: - "Default", "Restore". Default value: "Default". + :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by + server. Possible values include: "Default", "Restore". Default value: "Default". :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :param backup_policy: The object representing the policy for taking backups on an account. :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :param cors: The CORS policy for the Cosmos DB database account. @@ -2535,22 +2690,17 @@ class DatabaseAccountGetResults(ARMResourceProperties): :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :type disable_local_auth: bool + :param restore_parameters: Parameters to indicate the information about the restore. + :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'system_data': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - 'document_endpoint': {'readonly': True}, - 'database_account_offer_type': {'readonly': True}, - 'write_locations': {'readonly': True}, - 'read_locations': {'readonly': True}, - 'locations': {'readonly': True}, - 'failover_policies': {'readonly': True}, - 'private_endpoint_connections': {'readonly': True}, - 'instance_id': {'readonly': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + 'create_mode': {'required': True}, } _attribute_map = { @@ -2561,21 +2711,14 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, - 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, - 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, - 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, @@ -2587,28 +2730,30 @@ class DatabaseAccountGetResults(ARMResourceProperties): 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, - 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, } + database_account_offer_type = "Standard" + def __init__( self, *, + locations: List["Location"], location: Optional[str] = None, tags: Optional[Dict[str, str]] = None, identity: Optional["ManagedServiceIdentity"] = None, kind: Optional[Union[str, "DatabaseAccountKind"]] = None, + consistency_policy: Optional["ConsistencyPolicy"] = None, ip_rules: Optional[List["IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, - consistency_policy: Optional["ConsistencyPolicy"] = None, capabilities: Optional[List["Capability"]] = None, virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, @@ -2622,33 +2767,24 @@ def __init__( api_properties: Optional["ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, - create_mode: Optional[Union[str, "CreateMode"]] = "Default", - restore_parameters: Optional["RestoreParameters"] = None, backup_policy: Optional["BackupPolicy"] = None, cors: Optional[List["CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, network_acl_bypass_resource_ids: Optional[List[str]] = None, diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, + restore_parameters: Optional["RestoreParameters"] = None, **kwargs ): - super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) self.kind = kind - self.system_data = None - self.provisioning_state = None - self.document_endpoint = None - self.database_account_offer_type = None + self.consistency_policy = consistency_policy + self.locations = locations self.ip_rules = ip_rules self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled self.enable_automatic_failover = enable_automatic_failover - self.consistency_policy = consistency_policy self.capabilities = capabilities - self.write_locations = None - self.read_locations = None - self.locations = None - self.failover_policies = None self.virtual_network_rules = virtual_network_rules - self.private_endpoint_connections = None self.enable_multiple_write_locations = enable_multiple_write_locations self.enable_cassandra_connector = enable_cassandra_connector self.connector_offer = connector_offer @@ -2660,163 +2796,214 @@ def __init__( self.api_properties = api_properties self.enable_analytical_storage = enable_analytical_storage self.analytical_storage_configuration = analytical_storage_configuration - self.instance_id = None - self.create_mode = create_mode - self.restore_parameters = restore_parameters + self.create_mode = None # type: Optional[str] self.backup_policy = backup_policy self.cors = cors self.network_acl_bypass = network_acl_bypass self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids self.diagnostic_log_settings = diagnostic_log_settings self.disable_local_auth = disable_local_auth + self.restore_parameters = restore_parameters -class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): - """The connection strings for the given database account. - - :param connection_strings: An array that contains the connection strings for the Cosmos DB - account. - :type connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] - """ - - _attribute_map = { - 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, - } - - def __init__( - self, - *, - connection_strings: Optional[List["DatabaseAccountConnectionString"]] = None, - **kwargs - ): - super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) - self.connection_strings = connection_strings - - -class DatabaseAccountListReadOnlyKeysResult(msrest.serialization.Model): - """The read-only access keys for the given database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. - :vartype secondary_readonly_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) - self.primary_readonly_master_key = None - self.secondary_readonly_master_key = None - +class DatabaseAccountCreateUpdateProperties(msrest.serialization.Model): + """Properties to create and update Azure Cosmos DB database accounts. -class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): - """The access keys for the given database account. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: DefaultRequestDatabaseAccountCreateUpdateProperties. Variables are only populated by the server, and will be ignored when sending a request. - :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. - :vartype primary_readonly_master_key: str - :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. - :vartype secondary_readonly_master_key: str - :ivar primary_master_key: Base 64 encoded value of the primary read-write key. - :vartype primary_master_key: str - :ivar secondary_master_key: Base 64 encoded value of the secondary read-write key. - :vartype secondary_master_key: str - """ - - _validation = { - 'primary_readonly_master_key': {'readonly': True}, - 'secondary_readonly_master_key': {'readonly': True}, - 'primary_master_key': {'readonly': True}, - 'secondary_master_key': {'readonly': True}, - } - - _attribute_map = { - 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, - 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, - 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, - 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(DatabaseAccountListKeysResult, self).__init__(**kwargs) - self.primary_master_key = None - self.secondary_master_key = None - - -class DatabaseAccountRegenerateKeyParameters(msrest.serialization.Model): - """Parameters to regenerate the keys within the database account. - All required parameters must be populated in order to send to Azure. - :param key_kind: Required. The access key to regenerate. Possible values include: "primary", - "secondary", "primaryReadonly", "secondaryReadonly". - :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind + :param consistency_policy: The consistency policy for the Cosmos DB account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: Required. An array that contains the georeplication locations enabled for the + Cosmos DB account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar database_account_offer_type: The offer type for the database. Has constant value: + "Standard". + :vartype database_account_offer_type: str + :param ip_rules: List of IpRules. + :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] + :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual + Network ACL rules. + :type is_virtual_network_filter_enabled: bool + :param enable_automatic_failover: Enables automatic failover of the write region in the rare + event that the region is unavailable due to an outage. Automatic failover will result in a new + write region for the account and is chosen based on the failover priorities configured for the + account. + :type enable_automatic_failover: bool + :param capabilities: List of Cosmos DB capabilities for the account. + :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB + account. + :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] + :param enable_multiple_write_locations: Enables the account to write in multiple locations. + :type enable_multiple_write_locations: bool + :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. + :type enable_cassandra_connector: bool + :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* + account. Possible values include: "Small". + :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer + :param disable_key_based_metadata_write_access: Disable write operations on metadata resources + (databases, containers, throughput) via account keys. + :type disable_key_based_metadata_write_access: bool + :param key_vault_key_uri: The URI of the key vault. + :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used in features like + customer managed keys. The default identity needs to be explicitly set by the users. It can be + "FirstPartyIdentity", "SystemAssignedIdentity" and more. + :type default_identity: str + :param public_network_access: Whether requests from Public Network are allowed. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess + :param enable_free_tier: Flag to indicate whether Free Tier is enabled. + :type enable_free_tier: bool + :param api_properties: API specific properties. Currently, supported only for MongoDB API. + :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties + :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. + :type enable_analytical_storage: bool + :param analytical_storage_configuration: Analytical storage specific properties. + :type analytical_storage_configuration: + ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration + :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by + server. Possible values include: "Default", "Restore". Default value: "Default". + :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode + :param backup_policy: The object representing the policy for taking backups on an account. + :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy + :param cors: The CORS policy for the Cosmos DB database account. + :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] + :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. + Possible values include: "None", "AzureServices". + :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass + :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl + Bypass for the Cosmos DB account. + :type network_acl_bypass_resource_ids: list[str] + :param diagnostic_log_settings: The Object representing the different Diagnostic log settings + for the Cosmos DB Account. + :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings + :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be + used exclusively for authentication. + :type disable_local_auth: bool + :param restore_parameters: Parameters to indicate the information about the restore. + :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters """ _validation = { - 'key_kind': {'required': True}, + 'locations': {'required': True}, + 'database_account_offer_type': {'required': True, 'constant': True}, + 'create_mode': {'required': True}, } _attribute_map = { - 'key_kind': {'key': 'keyKind', 'type': 'str'}, + 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, + 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, + 'diagnostic_log_settings': {'key': 'diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, + 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, + 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, } - def __init__( - self, - *, - key_kind: Union[str, "KeyKind"], - **kwargs - ): - super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) - self.key_kind = key_kind - - -class DatabaseAccountsListResult(msrest.serialization.Model): - """The List operation response, that contains the database accounts and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of database account and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] - """ - - _validation = { - 'value': {'readonly': True}, + _subtype_map = { + 'create_mode': {'Default': 'DefaultRequestDatabaseAccountCreateUpdateProperties'} } - _attribute_map = { - 'value': {'key': 'value', 'type': '[DatabaseAccountGetResults]'}, - } + database_account_offer_type = "Standard" def __init__( self, + *, + locations: List["Location"], + consistency_policy: Optional["ConsistencyPolicy"] = None, + ip_rules: Optional[List["IpAddressOrRange"]] = None, + is_virtual_network_filter_enabled: Optional[bool] = None, + enable_automatic_failover: Optional[bool] = None, + capabilities: Optional[List["Capability"]] = None, + virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, + enable_multiple_write_locations: Optional[bool] = None, + enable_cassandra_connector: Optional[bool] = None, + connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, + disable_key_based_metadata_write_access: Optional[bool] = None, + key_vault_key_uri: Optional[str] = None, + default_identity: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + enable_free_tier: Optional[bool] = None, + api_properties: Optional["ApiProperties"] = None, + enable_analytical_storage: Optional[bool] = None, + analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, + backup_policy: Optional["BackupPolicy"] = None, + cors: Optional[List["CorsPolicy"]] = None, + network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, + network_acl_bypass_resource_ids: Optional[List[str]] = None, + diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, + disable_local_auth: Optional[bool] = None, + restore_parameters: Optional["RestoreParameters"] = None, **kwargs ): - super(DatabaseAccountsListResult, self).__init__(**kwargs) - self.value = None + super(DatabaseAccountCreateUpdateProperties, self).__init__(**kwargs) + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_rules = ip_rules + self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled + self.enable_automatic_failover = enable_automatic_failover + self.capabilities = capabilities + self.virtual_network_rules = virtual_network_rules + self.enable_multiple_write_locations = enable_multiple_write_locations + self.enable_cassandra_connector = enable_cassandra_connector + self.connector_offer = connector_offer + self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access + self.key_vault_key_uri = key_vault_key_uri + self.default_identity = default_identity + self.public_network_access = public_network_access + self.enable_free_tier = enable_free_tier + self.api_properties = api_properties + self.enable_analytical_storage = enable_analytical_storage + self.analytical_storage_configuration = analytical_storage_configuration + self.create_mode = None # type: Optional[str] + self.backup_policy = backup_policy + self.cors = cors + self.network_acl_bypass = network_acl_bypass + self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids + self.diagnostic_log_settings = diagnostic_log_settings + self.disable_local_auth = disable_local_auth + self.restore_parameters = restore_parameters -class DatabaseAccountUpdateParameters(msrest.serialization.Model): - """Parameters for patching Azure Cosmos DB database account properties. +class DatabaseAccountGetResults(ARMResourceProperties): + """An Azure Cosmos DB database account. + + Variables are only populated by the server, and will be ignored when sending a request. + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 @@ -2824,15 +3011,27 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB". :type tags: dict[str, str] - :param location: The location of the resource group to which the resource belongs. - :type location: str :param identity: Identity for the resource. :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: An array that contains the georeplication locations enabled for the Cosmos DB - account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :param kind: Indicates the type of database account. This can only be set at database account + creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". + :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData + :ivar provisioning_state: The status of the Cosmos DB account at the time the operation was + called. The status can be one of following. 'Creating' – the Cosmos DB account is being + created. When an account is in Creating state, only properties that are specified as input for + the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is + active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB + account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – + the Cosmos DB account deletion failed. + :vartype provisioning_state: str + :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default + value: Standard. The only acceptable values to pass in are None and "Standard". The default + value is None. + :vartype database_account_offer_type: str :param ip_rules: List of IpRules. :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual @@ -2843,11 +3042,27 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): write region for the account and is chosen based on the failover priorities configured for the account. :type enable_automatic_failover: bool + :param consistency_policy: The consistency policy for the Cosmos DB database account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy :param capabilities: List of Cosmos DB capabilities for the account. :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :ivar write_locations: An array that contains the write location for the Cosmos DB account. + :vartype write_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar read_locations: An array that contains of the read locations enabled for the Cosmos DB + account. + :vartype read_locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar locations: An array that contains all of the locations enabled for the Cosmos DB account. + :vartype locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar failover_policies: An array that contains the regions ordered by their failover + priorities. + :vartype failover_policies: list[~azure.mgmt.cosmosdb.models.FailoverPolicy] :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB account. :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] + :ivar private_endpoint_connections: List of Private Endpoint Connections configured for the + Cosmos DB account. + :vartype private_endpoint_connections: + list[~azure.mgmt.cosmosdb.models.PrivateEndpointConnection] :param enable_multiple_write_locations: Enables the account to write in multiple locations. :type enable_multiple_write_locations: bool :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. @@ -2869,13 +3084,20 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :param enable_free_tier: Flag to indicate whether Free Tier is enabled. :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. + :param api_properties: API specific properties. :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. :type enable_analytical_storage: bool :param analytical_storage_configuration: Analytical storage specific properties. :type analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration + :ivar instance_id: A unique identifier assigned to the database account. + :vartype instance_id: str + :param create_mode: Enum to indicate the mode of account creation. Possible values include: + "Default", "Restore". Default value: "Default". + :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode + :param restore_parameters: Parameters to indicate the information about the restore. + :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :param backup_policy: The object representing the policy for taking backups on an account. :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :param cors: The CORS policy for the Cosmos DB database account. @@ -2894,17 +3116,45 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): :type disable_local_auth: bool """ + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'instance_id': {'readonly': True}, + } + _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, @@ -2916,6 +3166,9 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, @@ -2927,14 +3180,14 @@ class DatabaseAccountUpdateParameters(msrest.serialization.Model): def __init__( self, *, - tags: Optional[Dict[str, str]] = None, location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, identity: Optional["ManagedServiceIdentity"] = None, - consistency_policy: Optional["ConsistencyPolicy"] = None, - locations: Optional[List["Location"]] = None, + kind: Optional[Union[str, "DatabaseAccountKind"]] = None, ip_rules: Optional[List["IpAddressOrRange"]] = None, is_virtual_network_filter_enabled: Optional[bool] = None, enable_automatic_failover: Optional[bool] = None, + consistency_policy: Optional["ConsistencyPolicy"] = None, capabilities: Optional[List["Capability"]] = None, virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, enable_multiple_write_locations: Optional[bool] = None, @@ -2948,6 +3201,8 @@ def __init__( api_properties: Optional["ApiProperties"] = None, enable_analytical_storage: Optional[bool] = None, analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, + create_mode: Optional[Union[str, "CreateMode"]] = "Default", + restore_parameters: Optional["RestoreParameters"] = None, backup_policy: Optional["BackupPolicy"] = None, cors: Optional[List["CorsPolicy"]] = None, network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, @@ -2956,17 +3211,23 @@ def __init__( disable_local_auth: Optional[bool] = None, **kwargs ): - super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.location = location - self.identity = identity - self.consistency_policy = consistency_policy - self.locations = locations + super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, identity=identity, **kwargs) + self.kind = kind + self.system_data = None + self.provisioning_state = None + self.document_endpoint = None + self.database_account_offer_type = None self.ip_rules = ip_rules self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy self.capabilities = capabilities + self.write_locations = None + self.read_locations = None + self.locations = None + self.failover_policies = None self.virtual_network_rules = virtual_network_rules + self.private_endpoint_connections = None self.enable_multiple_write_locations = enable_multiple_write_locations self.enable_cassandra_connector = enable_cassandra_connector self.connector_offer = connector_offer @@ -2978,6 +3239,9 @@ def __init__( self.api_properties = api_properties self.enable_analytical_storage = enable_analytical_storage self.analytical_storage_configuration = analytical_storage_configuration + self.instance_id = None + self.create_mode = create_mode + self.restore_parameters = restore_parameters self.backup_policy = backup_policy self.cors = cors self.network_acl_bypass = network_acl_bypass @@ -2986,345 +3250,553 @@ def __init__( self.disable_local_auth = disable_local_auth -class DatabaseRestoreResource(msrest.serialization.Model): - """Specific Databases to restore. +class DatabaseAccountListConnectionStringsResult(msrest.serialization.Model): + """The connection strings for the given database account. - :param database_name: The name of the database available for restore. - :type database_name: str - :param collection_names: The names of the collections available for restore. - :type collection_names: list[str] + :param connection_strings: An array that contains the connection strings for the Cosmos DB + account. + :type connection_strings: list[~azure.mgmt.cosmosdb.models.DatabaseAccountConnectionString] """ _attribute_map = { - 'database_name': {'key': 'databaseName', 'type': 'str'}, - 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, + 'connection_strings': {'key': 'connectionStrings', 'type': '[DatabaseAccountConnectionString]'}, } def __init__( self, *, - database_name: Optional[str] = None, - collection_names: Optional[List[str]] = None, + connection_strings: Optional[List["DatabaseAccountConnectionString"]] = None, **kwargs ): - super(DatabaseRestoreResource, self).__init__(**kwargs) - self.database_name = database_name - self.collection_names = collection_names + super(DatabaseAccountListConnectionStringsResult, self).__init__(**kwargs) + self.connection_strings = connection_strings -class DataCenterResource(ARMProxyResource): - """A managed Cassandra data center. +class DatabaseAccountListReadOnlyKeysResult(msrest.serialization.Model): + """The read-only access keys for the given database account. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param properties: Properties of a managed Cassandra data center. - :type properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties + :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. + :vartype secondary_readonly_master_key: str """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'DataCenterResourceProperties'}, + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, } def __init__( self, - *, - properties: Optional["DataCenterResourceProperties"] = None, **kwargs ): - super(DataCenterResource, self).__init__(**kwargs) - self.properties = properties + super(DatabaseAccountListReadOnlyKeysResult, self).__init__(**kwargs) + self.primary_readonly_master_key = None + self.secondary_readonly_master_key = None -class DataCenterResourceProperties(msrest.serialization.Model): - """Properties of a managed Cassandra data center. +class DatabaseAccountListKeysResult(DatabaseAccountListReadOnlyKeysResult): + """The access keys for the given database account. Variables are only populated by the server, and will be ignored when sending a request. - :param provisioning_state: The status of the resource at the time the operation was called. - Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". - :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState - :param data_center_location: The region this data center should be created in. - :type data_center_location: str - :param delegated_subnet_id: Resource id of a subnet the nodes in this data center should have - their network interfaces connected to. The subnet must be in the same region specified in - 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's - 'delegatedManagementSubnetId' property. This resource id will be of the form - '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. - :type delegated_subnet_id: str - :param node_count: The number of nodes the data center should have. This is the desired number. - After it is set, it may take some time for the data center to be scaled to match. To monitor - the number of nodes and their status, use the fetchNodeStatus method on the cluster. - :type node_count: int - :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. - Generally you will want to use the seedNodes property on the cluster, which aggregates the seed - nodes from all data centers in the cluster. - :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] - :param base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration - file to be included in the cassandra.yaml for all nodes in this data center. The fragment - should be Base64 encoded, and only a subset of keys are allowed. - :type base64_encoded_cassandra_yaml_fragment: str + :ivar primary_readonly_master_key: Base 64 encoded value of the primary read-only key. + :vartype primary_readonly_master_key: str + :ivar secondary_readonly_master_key: Base 64 encoded value of the secondary read-only key. + :vartype secondary_readonly_master_key: str + :ivar primary_master_key: Base 64 encoded value of the primary read-write key. + :vartype primary_master_key: str + :ivar secondary_master_key: Base 64 encoded value of the secondary read-write key. + :vartype secondary_master_key: str """ _validation = { - 'seed_nodes': {'readonly': True}, + 'primary_readonly_master_key': {'readonly': True}, + 'secondary_readonly_master_key': {'readonly': True}, + 'primary_master_key': {'readonly': True}, + 'secondary_master_key': {'readonly': True}, } _attribute_map = { - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, - 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, - 'node_count': {'key': 'nodeCount', 'type': 'int'}, - 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, - 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, + 'primary_readonly_master_key': {'key': 'primaryReadonlyMasterKey', 'type': 'str'}, + 'secondary_readonly_master_key': {'key': 'secondaryReadonlyMasterKey', 'type': 'str'}, + 'primary_master_key': {'key': 'primaryMasterKey', 'type': 'str'}, + 'secondary_master_key': {'key': 'secondaryMasterKey', 'type': 'str'}, } def __init__( self, - *, - provisioning_state: Optional[Union[str, "ManagedCassandraProvisioningState"]] = None, - data_center_location: Optional[str] = None, - delegated_subnet_id: Optional[str] = None, - node_count: Optional[int] = None, - base64_encoded_cassandra_yaml_fragment: Optional[str] = None, **kwargs ): - super(DataCenterResourceProperties, self).__init__(**kwargs) - self.provisioning_state = provisioning_state - self.data_center_location = data_center_location - self.delegated_subnet_id = delegated_subnet_id - self.node_count = node_count - self.seed_nodes = None - self.base64_encoded_cassandra_yaml_fragment = base64_encoded_cassandra_yaml_fragment + super(DatabaseAccountListKeysResult, self).__init__(**kwargs) + self.primary_master_key = None + self.secondary_master_key = None -class RegionalServiceResource(msrest.serialization.Model): - """Resource for a regional service location. +class DatabaseAccountRegenerateKeyParameters(msrest.serialization.Model): + """Parameters to regenerate the keys within the database account. - 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. - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus + :param key_kind: Required. The access key to regenerate. Possible values include: "primary", + "secondary", "primaryReadonly", "secondaryReadonly". + :type key_kind: str or ~azure.mgmt.cosmosdb.models.KeyKind """ _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, + 'key_kind': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + 'key_kind': {'key': 'keyKind', 'type': 'str'}, } def __init__( self, + *, + key_kind: Union[str, "KeyKind"], **kwargs ): - super(RegionalServiceResource, self).__init__(**kwargs) - self.name = None - self.location = None - self.status = None + super(DatabaseAccountRegenerateKeyParameters, self).__init__(**kwargs) + self.key_kind = key_kind -class DataTransferRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. +class DatabaseAccountsListResult(msrest.serialization.Model): + """The List operation response, that contains the database accounts and their properties. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus + :ivar value: List of database account and their properties. + :vartype value: list[~azure.mgmt.cosmosdb.models.DatabaseAccountGetResults] """ _validation = { - 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, + 'value': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[DatabaseAccountGetResults]'}, } def __init__( self, **kwargs ): - super(DataTransferRegionalServiceResource, self).__init__(**kwargs) + super(DatabaseAccountsListResult, self).__init__(**kwargs) + self.value = None -class DataTransferServiceResource(msrest.serialization.Model): - """Describes the service response property. +class DatabaseAccountUpdateParameters(msrest.serialization.Model): + """Parameters for patching Azure Cosmos DB database account properties. - :param properties: Properties for DataTransferServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.DataTransferServiceResourceProperties + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity + :param consistency_policy: The consistency policy for the Cosmos DB account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: An array that contains the georeplication locations enabled for the Cosmos DB + account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :param ip_rules: List of IpRules. + :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] + :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual + Network ACL rules. + :type is_virtual_network_filter_enabled: bool + :param enable_automatic_failover: Enables automatic failover of the write region in the rare + event that the region is unavailable due to an outage. Automatic failover will result in a new + write region for the account and is chosen based on the failover priorities configured for the + account. + :type enable_automatic_failover: bool + :param capabilities: List of Cosmos DB capabilities for the account. + :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB + account. + :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] + :param enable_multiple_write_locations: Enables the account to write in multiple locations. + :type enable_multiple_write_locations: bool + :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. + :type enable_cassandra_connector: bool + :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* + account. Possible values include: "Small". + :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer + :param disable_key_based_metadata_write_access: Disable write operations on metadata resources + (databases, containers, throughput) via account keys. + :type disable_key_based_metadata_write_access: bool + :param key_vault_key_uri: The URI of the key vault. + :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used in features like + customer managed keys. The default identity needs to be explicitly set by the users. It can be + "FirstPartyIdentity", "SystemAssignedIdentity" and more. + :type default_identity: str + :param public_network_access: Whether requests from Public Network are allowed. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess + :param enable_free_tier: Flag to indicate whether Free Tier is enabled. + :type enable_free_tier: bool + :param api_properties: API specific properties. Currently, supported only for MongoDB API. + :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties + :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. + :type enable_analytical_storage: bool + :param analytical_storage_configuration: Analytical storage specific properties. + :type analytical_storage_configuration: + ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration + :param backup_policy: The object representing the policy for taking backups on an account. + :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy + :param cors: The CORS policy for the Cosmos DB database account. + :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] + :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. + Possible values include: "None", "AzureServices". + :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass + :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl + Bypass for the Cosmos DB account. + :type network_acl_bypass_resource_ids: list[str] + :param diagnostic_log_settings: The Object representing the different Diagnostic log settings + for the Cosmos DB Account. + :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings + :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be + used exclusively for authentication. + :type disable_local_auth: bool """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'DataTransferServiceResourceProperties'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'diagnostic_log_settings': {'key': 'properties.diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, } def __init__( self, *, - properties: Optional["DataTransferServiceResourceProperties"] = None, + tags: Optional[Dict[str, str]] = None, + location: Optional[str] = None, + identity: Optional["ManagedServiceIdentity"] = None, + consistency_policy: Optional["ConsistencyPolicy"] = None, + locations: Optional[List["Location"]] = None, + ip_rules: Optional[List["IpAddressOrRange"]] = None, + is_virtual_network_filter_enabled: Optional[bool] = None, + enable_automatic_failover: Optional[bool] = None, + capabilities: Optional[List["Capability"]] = None, + virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, + enable_multiple_write_locations: Optional[bool] = None, + enable_cassandra_connector: Optional[bool] = None, + connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, + disable_key_based_metadata_write_access: Optional[bool] = None, + key_vault_key_uri: Optional[str] = None, + default_identity: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + enable_free_tier: Optional[bool] = None, + api_properties: Optional["ApiProperties"] = None, + enable_analytical_storage: Optional[bool] = None, + analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, + backup_policy: Optional["BackupPolicy"] = None, + cors: Optional[List["CorsPolicy"]] = None, + network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, + network_acl_bypass_resource_ids: Optional[List[str]] = None, + diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, + disable_local_auth: Optional[bool] = None, **kwargs ): - super(DataTransferServiceResource, self).__init__(**kwargs) - self.properties = properties - - -class ServiceResourceProperties(msrest.serialization.Model): - """Services response resource. - - You probably want to use the sub-classes and not this class directly. Known - sub-classes are: DataTransferServiceResourceProperties, GraphAPIComputeServiceResourceProperties, SqlDedicatedGatewayServiceResourceProperties. + super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.location = location + self.identity = identity + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_rules = ip_rules + self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled + self.enable_automatic_failover = enable_automatic_failover + self.capabilities = capabilities + self.virtual_network_rules = virtual_network_rules + self.enable_multiple_write_locations = enable_multiple_write_locations + self.enable_cassandra_connector = enable_cassandra_connector + self.connector_offer = connector_offer + self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access + self.key_vault_key_uri = key_vault_key_uri + self.default_identity = default_identity + self.public_network_access = public_network_access + self.enable_free_tier = enable_free_tier + self.api_properties = api_properties + self.enable_analytical_storage = enable_analytical_storage + self.analytical_storage_configuration = analytical_storage_configuration + self.backup_policy = backup_policy + self.cors = cors + self.network_acl_bypass = network_acl_bypass + self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids + self.diagnostic_log_settings = diagnostic_log_settings + self.disable_local_auth = disable_local_auth - 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. +class DatabaseRestoreResource(msrest.serialization.Model): + """Specific Databases to restore. - :param additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus + :param database_name: The name of the database available for restore. + :type database_name: str + :param collection_names: The names of the collections available for restore. + :type collection_names: list[str] """ - _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - } - _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - _subtype_map = { - 'service_type': {'DataTransfer': 'DataTransferServiceResourceProperties', 'GraphAPICompute': 'GraphAPIComputeServiceResourceProperties', 'SqlDedicatedGateway': 'SqlDedicatedGatewayServiceResourceProperties'} + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, } def __init__( self, *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, + database_name: Optional[str] = None, + collection_names: Optional[List[str]] = None, **kwargs ): - super(ServiceResourceProperties, self).__init__(**kwargs) - self.additional_properties = additional_properties - self.creation_time = None - self.instance_size = instance_size - self.instance_count = instance_count - self.service_type = 'ServiceResourceProperties' # type: str - self.status = None + super(DatabaseRestoreResource, self).__init__(**kwargs) + self.database_name = database_name + self.collection_names = collection_names -class DataTransferServiceResourceProperties(ServiceResourceProperties): - """Properties for DataTransferServiceResource. +class DataCenterResource(ARMProxyResource): + """A managed Cassandra data center. 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 additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :ivar locations: An array that contains all of the locations for the service. - :vartype locations: list[~azure.mgmt.cosmosdb.models.DataTransferRegionalServiceResource] + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param kind: Indicates the type of database account. This can only be set at database account + creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". + :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity + :param consistency_policy: The consistency policy for the Cosmos DB account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: Required. An array that contains the georeplication locations enabled for the + Cosmos DB account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :ivar database_account_offer_type: The offer type for the database. Has constant value: + "Standard". + :vartype database_account_offer_type: str + :param ip_rules: List of IpRules. + :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] + :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual + Network ACL rules. + :type is_virtual_network_filter_enabled: bool + :param enable_automatic_failover: Enables automatic failover of the write region in the rare + event that the region is unavailable due to an outage. Automatic failover will result in a new + write region for the account and is chosen based on the failover priorities configured for the + account. + :type enable_automatic_failover: bool + :param capabilities: List of Cosmos DB capabilities for the account. + :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB + account. + :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] + :param enable_multiple_write_locations: Enables the account to write in multiple locations. + :type enable_multiple_write_locations: bool + :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. + :type enable_cassandra_connector: bool + :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* + account. Possible values include: "Small". + :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer + :param disable_key_based_metadata_write_access: Disable write operations on metadata resources + (databases, containers, throughput) via account keys. + :type disable_key_based_metadata_write_access: bool + :param key_vault_key_uri: The URI of the key vault. + :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used in features like + customer managed keys. The default identity needs to be explicitly set by the users. It can be + "FirstPartyIdentity", "SystemAssignedIdentity" and more. + :type default_identity: str + :param public_network_access: Whether requests from Public Network are allowed. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess + :param enable_free_tier: Flag to indicate whether Free Tier is enabled. + :type enable_free_tier: bool + :param api_properties: API specific properties. Currently, supported only for MongoDB API. + :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties + :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. + :type enable_analytical_storage: bool + :param analytical_storage_configuration: Analytical storage specific properties. + :type analytical_storage_configuration: + ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration + :param create_mode: Enum to indicate the mode of account creation. Possible values include: + "Default", "Restore". Default value: "Default". + :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode + :param backup_policy: The object representing the policy for taking backups on an account. + :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy + :param cors: The CORS policy for the Cosmos DB database account. + :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] + :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. + Possible values include: "None", "AzureServices". + :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass + :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl + Bypass for the Cosmos DB account. + :type network_acl_bypass_resource_ids: list[str] + :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be + used exclusively for authentication. + :type disable_local_auth: bool + :param restore_parameters: Parameters to indicate the information about the restore. + :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[DataTransferRegionalServiceResource]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } def __init__( self, *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, + locations: List["Location"], + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + kind: Optional[Union[str, "DatabaseAccountKind"]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + consistency_policy: Optional["ConsistencyPolicy"] = None, + ip_rules: Optional[List["IpAddressOrRange"]] = None, + is_virtual_network_filter_enabled: Optional[bool] = None, + enable_automatic_failover: Optional[bool] = None, + capabilities: Optional[List["Capability"]] = None, + virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, + enable_multiple_write_locations: Optional[bool] = None, + enable_cassandra_connector: Optional[bool] = None, + connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, + disable_key_based_metadata_write_access: Optional[bool] = None, + key_vault_key_uri: Optional[str] = None, + default_identity: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + enable_free_tier: Optional[bool] = None, + api_properties: Optional["ApiProperties"] = None, + enable_analytical_storage: Optional[bool] = None, + analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, + create_mode: Optional[Union[str, "CreateMode"]] = "Default", + backup_policy: Optional["BackupPolicy"] = None, + cors: Optional[List["CorsPolicy"]] = None, + network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, + network_acl_bypass_resource_ids: Optional[List[str]] = None, + disable_local_auth: Optional[bool] = None, + restore_parameters: Optional["RestoreParameters"] = None, + capacity: Optional["Capacity"] = None, **kwargs ): - super(DataTransferServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) - self.service_type = 'DataTransfer' # type: str - self.locations = None + super(DatabaseAccountCreateUpdateParameters, self).__init__(location=location, tags=tags, **kwargs) + self.kind = kind + self.identity = identity + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_rules = ip_rules + self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled + self.enable_automatic_failover = enable_automatic_failover + self.capabilities = capabilities + self.virtual_network_rules = virtual_network_rules + self.enable_multiple_write_locations = enable_multiple_write_locations + self.enable_cassandra_connector = enable_cassandra_connector + self.connector_offer = connector_offer + self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access + self.key_vault_key_uri = key_vault_key_uri + self.default_identity = default_identity + self.public_network_access = public_network_access + self.enable_free_tier = enable_free_tier + self.api_properties = api_properties + self.enable_analytical_storage = enable_analytical_storage + self.analytical_storage_configuration = analytical_storage_configuration + self.create_mode = create_mode + self.backup_policy = backup_policy + self.cors = cors + self.network_acl_bypass = network_acl_bypass + self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids + self.disable_local_auth = disable_local_auth + self.restore_parameters = restore_parameters + self.capacity = capacity class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateUpdateProperties): @@ -3332,15 +3804,41 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU 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 consistency_policy: The consistency policy for the Cosmos DB account. - :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy - :param locations: Required. An array that contains the georeplication locations enabled for the - Cosmos DB account. - :type locations: list[~azure.mgmt.cosmosdb.models.Location] - :ivar database_account_offer_type: The offer type for the database. Has constant value: - "Standard". + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param kind: Indicates the type of database account. This can only be set at database account + creation. Possible values include: "GlobalDocumentDB", "MongoDB", "Parse". + :type kind: str or ~azure.mgmt.cosmosdb.models.DatabaseAccountKind + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.cosmosdb.models.SystemData + :ivar provisioning_state: The status of the Cosmos DB account at the time the operation was + called. The status can be one of following. 'Creating' – the Cosmos DB account is being + created. When an account is in Creating state, only properties that are specified as input for + the Create Cosmos DB account operation are returned. 'Succeeded' – the Cosmos DB account is + active for use. 'Updating' – the Cosmos DB account is being updated. 'Deleting' – the Cosmos DB + account is being deleted. 'Failed' – the Cosmos DB account failed creation. 'DeletionFailed' – + the Cosmos DB account deletion failed. + :vartype provisioning_state: str + :ivar document_endpoint: The connection endpoint for the Cosmos DB database account. + :vartype document_endpoint: str + :ivar database_account_offer_type: The offer type for the Cosmos DB database account. Default + value: Standard. The only acceptable values to pass in are None and "Standard". The default + value is None. :vartype database_account_offer_type: str :param ip_rules: List of IpRules. :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] @@ -3378,16 +3876,20 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess :param enable_free_tier: Flag to indicate whether Free Tier is enabled. :type enable_free_tier: bool - :param api_properties: API specific properties. Currently, supported only for MongoDB API. + :param api_properties: API specific properties. :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. :type enable_analytical_storage: bool :param analytical_storage_configuration: Analytical storage specific properties. :type analytical_storage_configuration: ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration - :param create_mode: Required. Enum to indicate the mode of account creation.Constant filled by - server. Possible values include: "Default", "Restore". Default value: "Default". + :ivar instance_id: A unique identifier assigned to the database account. + :vartype instance_id: str + :param create_mode: Enum to indicate the mode of account creation. Possible values include: + "Default", "Restore". Default value: "Default". :type create_mode: str or ~azure.mgmt.cosmosdb.models.CreateMode + :param restore_parameters: Parameters to indicate the information about the restore. + :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters :param backup_policy: The object representing the policy for taking backups on an account. :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy :param cors: The CORS policy for the Cosmos DB database account. @@ -3398,54 +3900,75 @@ class DefaultRequestDatabaseAccountCreateUpdateProperties(DatabaseAccountCreateU :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl Bypass for the Cosmos DB account. :type network_acl_bypass_resource_ids: list[str] - :param diagnostic_log_settings: The Object representing the different Diagnostic log settings - for the Cosmos DB Account. - :type diagnostic_log_settings: ~azure.mgmt.cosmosdb.models.DiagnosticLogSettings :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be used exclusively for authentication. :type disable_local_auth: bool - :param restore_parameters: Parameters to indicate the information about the restore. - :type restore_parameters: ~azure.mgmt.cosmosdb.models.RestoreParameters + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity """ _validation = { - 'locations': {'required': True}, - 'database_account_offer_type': {'required': True, 'constant': True}, - 'create_mode': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'document_endpoint': {'readonly': True}, + 'database_account_offer_type': {'readonly': True}, + 'write_locations': {'readonly': True}, + 'read_locations': {'readonly': True}, + 'locations': {'readonly': True}, + 'failover_policies': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'instance_id': {'readonly': True}, } _attribute_map = { - 'consistency_policy': {'key': 'consistencyPolicy', 'type': 'ConsistencyPolicy'}, - 'locations': {'key': 'locations', 'type': '[Location]'}, - 'database_account_offer_type': {'key': 'databaseAccountOfferType', 'type': 'str'}, - 'ip_rules': {'key': 'ipRules', 'type': '[IpAddressOrRange]'}, - 'is_virtual_network_filter_enabled': {'key': 'isVirtualNetworkFilterEnabled', 'type': 'bool'}, - 'enable_automatic_failover': {'key': 'enableAutomaticFailover', 'type': 'bool'}, - 'capabilities': {'key': 'capabilities', 'type': '[Capability]'}, - 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, - 'enable_multiple_write_locations': {'key': 'enableMultipleWriteLocations', 'type': 'bool'}, - 'enable_cassandra_connector': {'key': 'enableCassandraConnector', 'type': 'bool'}, - 'connector_offer': {'key': 'connectorOffer', 'type': 'str'}, - 'disable_key_based_metadata_write_access': {'key': 'disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, - 'key_vault_key_uri': {'key': 'keyVaultKeyUri', 'type': 'str'}, - 'default_identity': {'key': 'defaultIdentity', 'type': 'str'}, - 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, - 'enable_free_tier': {'key': 'enableFreeTier', 'type': 'bool'}, - 'api_properties': {'key': 'apiProperties', 'type': 'ApiProperties'}, - 'enable_analytical_storage': {'key': 'enableAnalyticalStorage', 'type': 'bool'}, - 'analytical_storage_configuration': {'key': 'analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, - 'create_mode': {'key': 'createMode', 'type': 'str'}, - 'backup_policy': {'key': 'backupPolicy', 'type': 'BackupPolicy'}, - 'cors': {'key': 'cors', 'type': '[CorsPolicy]'}, - 'network_acl_bypass': {'key': 'networkAclBypass', 'type': 'str'}, - 'network_acl_bypass_resource_ids': {'key': 'networkAclBypassResourceIds', 'type': '[str]'}, - 'diagnostic_log_settings': {'key': 'diagnosticLogSettings', 'type': 'DiagnosticLogSettings'}, - 'disable_local_auth': {'key': 'disableLocalAuth', 'type': 'bool'}, - 'restore_parameters': {'key': 'restoreParameters', 'type': 'RestoreParameters'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'document_endpoint': {'key': 'properties.documentEndpoint', 'type': 'str'}, + 'database_account_offer_type': {'key': 'properties.databaseAccountOfferType', 'type': 'str'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'write_locations': {'key': 'properties.writeLocations', 'type': '[Location]'}, + 'read_locations': {'key': 'properties.readLocations', 'type': '[Location]'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'failover_policies': {'key': 'properties.failoverPolicies', 'type': '[FailoverPolicy]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'instance_id': {'key': 'properties.instanceId', 'type': 'str'}, + 'create_mode': {'key': 'properties.createMode', 'type': 'str'}, + 'restore_parameters': {'key': 'properties.restoreParameters', 'type': 'RestoreParameters'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } - database_account_offer_type = "Standard" - def __init__( self, *, @@ -3473,11 +3996,47 @@ def __init__( network_acl_bypass_resource_ids: Optional[List[str]] = None, diagnostic_log_settings: Optional["DiagnosticLogSettings"] = None, disable_local_auth: Optional[bool] = None, - restore_parameters: Optional["RestoreParameters"] = None, + capacity: Optional["Capacity"] = None, **kwargs ): - super(DefaultRequestDatabaseAccountCreateUpdateProperties, self).__init__(consistency_policy=consistency_policy, locations=locations, ip_rules=ip_rules, is_virtual_network_filter_enabled=is_virtual_network_filter_enabled, enable_automatic_failover=enable_automatic_failover, capabilities=capabilities, virtual_network_rules=virtual_network_rules, enable_multiple_write_locations=enable_multiple_write_locations, enable_cassandra_connector=enable_cassandra_connector, connector_offer=connector_offer, disable_key_based_metadata_write_access=disable_key_based_metadata_write_access, key_vault_key_uri=key_vault_key_uri, default_identity=default_identity, public_network_access=public_network_access, enable_free_tier=enable_free_tier, api_properties=api_properties, enable_analytical_storage=enable_analytical_storage, analytical_storage_configuration=analytical_storage_configuration, backup_policy=backup_policy, cors=cors, network_acl_bypass=network_acl_bypass, network_acl_bypass_resource_ids=network_acl_bypass_resource_ids, diagnostic_log_settings=diagnostic_log_settings, disable_local_auth=disable_local_auth, restore_parameters=restore_parameters, **kwargs) - self.create_mode = 'Default' # type: str + super(DatabaseAccountGetResults, self).__init__(location=location, tags=tags, **kwargs) + self.kind = kind + self.identity = identity + self.system_data = None + self.provisioning_state = None + self.document_endpoint = None + self.database_account_offer_type = None + self.ip_rules = ip_rules + self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled + self.enable_automatic_failover = enable_automatic_failover + self.consistency_policy = consistency_policy + self.capabilities = capabilities + self.write_locations = None + self.read_locations = None + self.locations = None + self.failover_policies = None + self.virtual_network_rules = virtual_network_rules + self.private_endpoint_connections = None + self.enable_multiple_write_locations = enable_multiple_write_locations + self.enable_cassandra_connector = enable_cassandra_connector + self.connector_offer = connector_offer + self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access + self.key_vault_key_uri = key_vault_key_uri + self.default_identity = default_identity + self.public_network_access = public_network_access + self.enable_free_tier = enable_free_tier + self.api_properties = api_properties + self.enable_analytical_storage = enable_analytical_storage + self.analytical_storage_configuration = analytical_storage_configuration + self.instance_id = None + self.create_mode = create_mode + self.restore_parameters = restore_parameters + self.backup_policy = backup_policy + self.cors = cors + self.network_acl_bypass = network_acl_bypass + self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids + self.disable_local_auth = disable_local_auth + self.capacity = capacity class DiagnosticLogSettings(msrest.serialization.Model): @@ -3596,234 +4155,551 @@ class FailoverPolicy(msrest.serialization.Model): _validation = { 'id': {'readonly': True}, - 'failover_priority': {'minimum': 0}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'location_name': {'key': 'locationName', 'type': 'str'}, - 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, - } - - def __init__( - self, - *, - location_name: Optional[str] = None, - failover_priority: Optional[int] = None, - **kwargs - ): - super(FailoverPolicy, self).__init__(**kwargs) - self.id = None - self.location_name = location_name - self.failover_priority = failover_priority - - -class GraphAPIComputeRegionalServiceResource(RegionalServiceResource): - """Resource for a regional service location. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: The regional service name. - :vartype name: str - :ivar location: The location name. - :vartype location: str - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :ivar graph_api_compute_endpoint: The regional endpoint for GraphAPICompute. - :vartype graph_api_compute_endpoint: str - """ - - _validation = { + 'failover_priority': {'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location_name': {'key': 'locationName', 'type': 'str'}, + 'failover_priority': {'key': 'failoverPriority', 'type': 'int'}, + } + + def __init__( + self, + *, + location_name: Optional[str] = None, + failover_priority: Optional[int] = None, + **kwargs + ): + super(FailoverPolicy, self).__init__(**kwargs) + self.id = None + self.location_name = location_name + self.failover_priority = failover_priority + + +class GraphAPIComputeRegionalServiceResource(RegionalServiceResource): + """Resource for a regional service location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The regional service name. + :vartype name: str + :ivar location: The location name. + :vartype location: str + :ivar status: Describes the status of a service. Possible values include: "Creating", + "Running", "Updating", "Deleting", "Error", "Stopped". + :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus + :ivar graph_api_compute_endpoint: The regional endpoint for GraphAPICompute. + :vartype graph_api_compute_endpoint: str + """ + + _validation = { + 'name': {'readonly': True}, + 'location': {'readonly': True}, + 'status': {'readonly': True}, + 'graph_api_compute_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GraphAPIComputeRegionalServiceResource, self).__init__(**kwargs) + self.graph_api_compute_endpoint = None + + +class GraphAPIComputeServiceResource(msrest.serialization.Model): + """Describes the service response property for GraphAPICompute. + + :param properties: Properties for GraphAPIComputeServiceResource. + :type properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties + """ + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'GraphAPIComputeServiceResourceProperties'}, + } + + def __init__( + self, + *, + properties: Optional["GraphAPIComputeServiceResourceProperties"] = None, + **kwargs + ): + super(GraphAPIComputeServiceResource, self).__init__(**kwargs) + self.properties = properties + + +class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties): + """Properties for GraphAPIComputeServiceResource. + + 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 additional_properties: Unmatched properties from the message are deserialized to this + collection. + :type additional_properties: dict[str, any] + :ivar creation_time: Time of the last state change (ISO-8601 format). + :vartype creation_time: ~datetime.datetime + :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", + "Cosmos.D8s", "Cosmos.D16s". + :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize + :param instance_count: Instance count for the service. + :type instance_count: int + :param service_type: Required. ServiceType for the service.Constant filled by server. Possible + values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". + :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType + :ivar status: Describes the status of a service. Possible values include: "Creating", + "Running", "Updating", "Deleting", "Error", "Stopped". + :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus + :param graph_api_compute_endpoint: GraphAPICompute endpoint for the service. + :type graph_api_compute_endpoint: str + :ivar locations: An array that contains all of the locations for the service. + :vartype locations: list[~azure.mgmt.cosmosdb.models.GraphAPIComputeRegionalServiceResource] + """ + + _validation = { + 'creation_time': {'readonly': True}, + 'instance_count': {'minimum': 0}, + 'service_type': {'required': True}, + 'status': {'readonly': True}, + 'locations': {'readonly': True}, + } + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{object}'}, + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'instance_size': {'key': 'instanceSize', 'type': 'str'}, + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + 'service_type': {'key': 'serviceType', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[GraphAPIComputeRegionalServiceResource]'}, + } + + def __init__( + self, + *, + additional_properties: Optional[Dict[str, Any]] = None, + instance_size: Optional[Union[str, "ServiceSize"]] = None, + instance_count: Optional[int] = None, + graph_api_compute_endpoint: Optional[str] = None, + **kwargs + ): + super(GraphAPIComputeServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) + self.service_type = 'GraphAPICompute' # type: str + self.graph_api_compute_endpoint = graph_api_compute_endpoint + self.locations = None + + +class GraphResource(msrest.serialization.Model): + """Cosmos DB Graph resource object. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Name of the Cosmos DB Graph. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + **kwargs + ): + super(GraphResource, self).__init__(**kwargs) + self.id = id + + +class GraphResourceCreateUpdateParameters(ARMResourceProperties): + """Parameters to create and update Cosmos DB Graph resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: The unique resource identifier of the ARM resource. + :vartype id: str + :ivar name: The name of the ARM resource. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param location: The location of the resource group to which the resource belongs. + :type location: str + :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 + characters and value no greater than 256 characters. For example, the default experience for a + template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values + also include "Table", "Graph", "DocumentDB", and "MongoDB". + :type tags: dict[str, str] + :param identity: Identity for the resource. + :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity + :param consistency_policy: The consistency policy for the Cosmos DB account. + :type consistency_policy: ~azure.mgmt.cosmosdb.models.ConsistencyPolicy + :param locations: An array that contains the georeplication locations enabled for the Cosmos DB + account. + :type locations: list[~azure.mgmt.cosmosdb.models.Location] + :param ip_rules: List of IpRules. + :type ip_rules: list[~azure.mgmt.cosmosdb.models.IpAddressOrRange] + :param is_virtual_network_filter_enabled: Flag to indicate whether to enable/disable Virtual + Network ACL rules. + :type is_virtual_network_filter_enabled: bool + :param enable_automatic_failover: Enables automatic failover of the write region in the rare + event that the region is unavailable due to an outage. Automatic failover will result in a new + write region for the account and is chosen based on the failover priorities configured for the + account. + :type enable_automatic_failover: bool + :param capabilities: List of Cosmos DB capabilities for the account. + :type capabilities: list[~azure.mgmt.cosmosdb.models.Capability] + :param virtual_network_rules: List of Virtual Network ACL rules configured for the Cosmos DB + account. + :type virtual_network_rules: list[~azure.mgmt.cosmosdb.models.VirtualNetworkRule] + :param enable_multiple_write_locations: Enables the account to write in multiple locations. + :type enable_multiple_write_locations: bool + :param enable_cassandra_connector: Enables the cassandra connector on the Cosmos DB C* account. + :type enable_cassandra_connector: bool + :param connector_offer: The cassandra connector offer type for the Cosmos DB database C* + account. Possible values include: "Small". + :type connector_offer: str or ~azure.mgmt.cosmosdb.models.ConnectorOffer + :param disable_key_based_metadata_write_access: Disable write operations on metadata resources + (databases, containers, throughput) via account keys. + :type disable_key_based_metadata_write_access: bool + :param key_vault_key_uri: The URI of the key vault. + :type key_vault_key_uri: str + :param default_identity: The default identity for accessing key vault used in features like + customer managed keys. The default identity needs to be explicitly set by the users. It can be + "FirstPartyIdentity", "SystemAssignedIdentity" and more. + :type default_identity: str + :param public_network_access: Whether requests from Public Network are allowed. Possible values + include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.cosmosdb.models.PublicNetworkAccess + :param enable_free_tier: Flag to indicate whether Free Tier is enabled. + :type enable_free_tier: bool + :param api_properties: API specific properties. Currently, supported only for MongoDB API. + :type api_properties: ~azure.mgmt.cosmosdb.models.ApiProperties + :param enable_analytical_storage: Flag to indicate whether to enable storage analytics. + :type enable_analytical_storage: bool + :param analytical_storage_configuration: Analytical storage specific properties. + :type analytical_storage_configuration: + ~azure.mgmt.cosmosdb.models.AnalyticalStorageConfiguration + :param backup_policy: The object representing the policy for taking backups on an account. + :type backup_policy: ~azure.mgmt.cosmosdb.models.BackupPolicy + :param cors: The CORS policy for the Cosmos DB database account. + :type cors: list[~azure.mgmt.cosmosdb.models.CorsPolicy] + :param network_acl_bypass: Indicates what services are allowed to bypass firewall checks. + Possible values include: "None", "AzureServices". + :type network_acl_bypass: str or ~azure.mgmt.cosmosdb.models.NetworkAclBypass + :param network_acl_bypass_resource_ids: An array that contains the Resource Ids for Network Acl + Bypass for the Cosmos DB account. + :type network_acl_bypass_resource_ids: list[str] + :param disable_local_auth: Opt-out of local authentication and ensure only MSI and AAD can be + used exclusively for authentication. + :type disable_local_auth: bool + :param capacity: The object that represents all properties related to capacity enforcement on + an account. + :type capacity: ~azure.mgmt.cosmosdb.models.Capacity + """ + + _validation = { + 'id': {'readonly': True}, 'name': {'readonly': True}, - 'location': {'readonly': True}, - 'status': {'readonly': True}, - 'graph_api_compute_endpoint': {'readonly': True}, + 'type': {'readonly': True}, + 'resource': {'required': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'consistency_policy': {'key': 'properties.consistencyPolicy', 'type': 'ConsistencyPolicy'}, + 'locations': {'key': 'properties.locations', 'type': '[Location]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[IpAddressOrRange]'}, + 'is_virtual_network_filter_enabled': {'key': 'properties.isVirtualNetworkFilterEnabled', 'type': 'bool'}, + 'enable_automatic_failover': {'key': 'properties.enableAutomaticFailover', 'type': 'bool'}, + 'capabilities': {'key': 'properties.capabilities', 'type': '[Capability]'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + 'enable_multiple_write_locations': {'key': 'properties.enableMultipleWriteLocations', 'type': 'bool'}, + 'enable_cassandra_connector': {'key': 'properties.enableCassandraConnector', 'type': 'bool'}, + 'connector_offer': {'key': 'properties.connectorOffer', 'type': 'str'}, + 'disable_key_based_metadata_write_access': {'key': 'properties.disableKeyBasedMetadataWriteAccess', 'type': 'bool'}, + 'key_vault_key_uri': {'key': 'properties.keyVaultKeyUri', 'type': 'str'}, + 'default_identity': {'key': 'properties.defaultIdentity', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'enable_free_tier': {'key': 'properties.enableFreeTier', 'type': 'bool'}, + 'api_properties': {'key': 'properties.apiProperties', 'type': 'ApiProperties'}, + 'enable_analytical_storage': {'key': 'properties.enableAnalyticalStorage', 'type': 'bool'}, + 'analytical_storage_configuration': {'key': 'properties.analyticalStorageConfiguration', 'type': 'AnalyticalStorageConfiguration'}, + 'backup_policy': {'key': 'properties.backupPolicy', 'type': 'BackupPolicy'}, + 'cors': {'key': 'properties.cors', 'type': '[CorsPolicy]'}, + 'network_acl_bypass': {'key': 'properties.networkAclBypass', 'type': 'str'}, + 'network_acl_bypass_resource_ids': {'key': 'properties.networkAclBypassResourceIds', 'type': '[str]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'capacity': {'key': 'properties.capacity', 'type': 'Capacity'}, } def __init__( self, + *, + resource: "GraphResource", + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + consistency_policy: Optional["ConsistencyPolicy"] = None, + locations: Optional[List["Location"]] = None, + ip_rules: Optional[List["IpAddressOrRange"]] = None, + is_virtual_network_filter_enabled: Optional[bool] = None, + enable_automatic_failover: Optional[bool] = None, + capabilities: Optional[List["Capability"]] = None, + virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, + enable_multiple_write_locations: Optional[bool] = None, + enable_cassandra_connector: Optional[bool] = None, + connector_offer: Optional[Union[str, "ConnectorOffer"]] = None, + disable_key_based_metadata_write_access: Optional[bool] = None, + key_vault_key_uri: Optional[str] = None, + default_identity: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + enable_free_tier: Optional[bool] = None, + api_properties: Optional["ApiProperties"] = None, + enable_analytical_storage: Optional[bool] = None, + analytical_storage_configuration: Optional["AnalyticalStorageConfiguration"] = None, + backup_policy: Optional["BackupPolicy"] = None, + cors: Optional[List["CorsPolicy"]] = None, + network_acl_bypass: Optional[Union[str, "NetworkAclBypass"]] = None, + network_acl_bypass_resource_ids: Optional[List[str]] = None, + disable_local_auth: Optional[bool] = None, + capacity: Optional["Capacity"] = None, **kwargs ): - super(GraphAPIComputeRegionalServiceResource, self).__init__(**kwargs) - self.graph_api_compute_endpoint = None + super(DatabaseAccountUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.location = location + self.identity = identity + self.consistency_policy = consistency_policy + self.locations = locations + self.ip_rules = ip_rules + self.is_virtual_network_filter_enabled = is_virtual_network_filter_enabled + self.enable_automatic_failover = enable_automatic_failover + self.capabilities = capabilities + self.virtual_network_rules = virtual_network_rules + self.enable_multiple_write_locations = enable_multiple_write_locations + self.enable_cassandra_connector = enable_cassandra_connector + self.connector_offer = connector_offer + self.disable_key_based_metadata_write_access = disable_key_based_metadata_write_access + self.key_vault_key_uri = key_vault_key_uri + self.default_identity = default_identity + self.public_network_access = public_network_access + self.enable_free_tier = enable_free_tier + self.api_properties = api_properties + self.enable_analytical_storage = enable_analytical_storage + self.analytical_storage_configuration = analytical_storage_configuration + self.backup_policy = backup_policy + self.cors = cors + self.network_acl_bypass = network_acl_bypass + self.network_acl_bypass_resource_ids = network_acl_bypass_resource_ids + self.disable_local_auth = disable_local_auth + self.capacity = capacity -class GraphAPIComputeServiceResource(msrest.serialization.Model): - """Describes the service response property for GraphAPICompute. +class DatabaseRestoreResource(msrest.serialization.Model): + """Specific Databases to restore. - :param properties: Properties for GraphAPIComputeServiceResource. - :type properties: ~azure.mgmt.cosmosdb.models.GraphAPIComputeServiceResourceProperties + :param database_name: The name of the database available for restore. + :type database_name: str + :param collection_names: The names of the collections available for restore. + :type collection_names: list[str] """ _attribute_map = { - 'properties': {'key': 'properties', 'type': 'GraphAPIComputeServiceResourceProperties'}, + 'database_name': {'key': 'databaseName', 'type': 'str'}, + 'collection_names': {'key': 'collectionNames', 'type': '[str]'}, } def __init__( self, *, - properties: Optional["GraphAPIComputeServiceResourceProperties"] = None, + database_name: Optional[str] = None, + collection_names: Optional[List[str]] = None, **kwargs ): - super(GraphAPIComputeServiceResource, self).__init__(**kwargs) - self.properties = properties + super(DatabaseRestoreResource, self).__init__(**kwargs) + self.database_name = database_name + self.collection_names = collection_names -class GraphAPIComputeServiceResourceProperties(ServiceResourceProperties): - """Properties for GraphAPIComputeServiceResource. +class DataCenterResource(ARMProxyResource): + """A managed Cassandra data center. 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 additional_properties: Unmatched properties from the message are deserialized to this - collection. - :type additional_properties: dict[str, any] - :ivar creation_time: Time of the last state change (ISO-8601 format). - :vartype creation_time: ~datetime.datetime - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: Required. ServiceType for the service.Constant filled by server. Possible - values include: "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - :ivar status: Describes the status of a service. Possible values include: "Creating", - "Running", "Updating", "Deleting", "Error", "Stopped". - :vartype status: str or ~azure.mgmt.cosmosdb.models.ServiceStatus - :param graph_api_compute_endpoint: GraphAPICompute endpoint for the service. - :type graph_api_compute_endpoint: str - :ivar locations: An array that contains all of the locations for the service. - :vartype locations: list[~azure.mgmt.cosmosdb.models.GraphAPIComputeRegionalServiceResource] + :ivar id: The unique resource identifier of the database account. + :vartype id: str + :ivar name: The name of the database account. + :vartype name: str + :ivar type: The type of Azure resource. + :vartype type: str + :param properties: Properties of a managed Cassandra data center. + :type properties: ~azure.mgmt.cosmosdb.models.DataCenterResourceProperties """ _validation = { - 'creation_time': {'readonly': True}, - 'instance_count': {'minimum': 0}, - 'service_type': {'required': True}, - 'status': {'readonly': True}, - 'locations': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { - 'additional_properties': {'key': '', 'type': '{object}'}, - 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, - 'instance_size': {'key': 'instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'instanceCount', 'type': 'int'}, - 'service_type': {'key': 'serviceType', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'graph_api_compute_endpoint': {'key': 'graphApiComputeEndpoint', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[GraphAPIComputeRegionalServiceResource]'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DataCenterResourceProperties'}, } def __init__( self, *, - additional_properties: Optional[Dict[str, Any]] = None, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, - graph_api_compute_endpoint: Optional[str] = None, - **kwargs - ): - super(GraphAPIComputeServiceResourceProperties, self).__init__(additional_properties=additional_properties, instance_size=instance_size, instance_count=instance_count, **kwargs) - self.service_type = 'GraphAPICompute' # type: str - self.graph_api_compute_endpoint = graph_api_compute_endpoint - self.locations = None + properties: Optional["DataCenterResourceProperties"] = None, + **kwargs + ): + super(DataCenterResource, self).__init__(**kwargs) + self.properties = properties -class GraphResource(msrest.serialization.Model): - """Cosmos DB Graph resource object. +class DataCenterResourceProperties(msrest.serialization.Model): + """Properties of a managed Cassandra data center. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param id: Required. Name of the Cosmos DB Graph. - :type id: str + :param provisioning_state: The status of the resource at the time the operation was called. + Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed", "Canceled". + :type provisioning_state: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraProvisioningState + :param data_center_location: The region this data center should be created in. + :type data_center_location: str + :param delegated_subnet_id: Resource id of a subnet the nodes in this data center should have + their network interfaces connected to. The subnet must be in the same region specified in + 'dataCenterLocation' and must be able to route to the subnet specified in the cluster's + 'delegatedManagementSubnetId' property. This resource id will be of the form + '/subscriptions/:code:``/resourceGroups/:code:``/providers/Microsoft.Network/virtualNetworks/:code:``/subnets/:code:``'. + :type delegated_subnet_id: str + :param node_count: The number of nodes the data center should have. This is the desired number. + After it is set, it may take some time for the data center to be scaled to match. To monitor + the number of nodes and their status, use the fetchNodeStatus method on the cluster. + :type node_count: int + :ivar seed_nodes: IP addresses for seed nodes in this data center. This is for reference. + Generally you will want to use the seedNodes property on the cluster, which aggregates the seed + nodes from all data centers in the cluster. + :vartype seed_nodes: list[~azure.mgmt.cosmosdb.models.SeedNode] + :param base64_encoded_cassandra_yaml_fragment: A fragment of a cassandra.yaml configuration + file to be included in the cassandra.yaml for all nodes in this data center. The fragment + should be Base64 encoded, and only a subset of keys are allowed. + :type base64_encoded_cassandra_yaml_fragment: str + :param managed_disk_customer_key_uri: Key uri to use for encryption of managed disks. Ensure + the system assigned identity of the cluster has been assigned appropriate permissions(key + get/wrap/unwrap permissions) on the key. + :type managed_disk_customer_key_uri: str + :param backup_storage_customer_key_uri: Indicates the Key Uri of the customer key to use for + encryption of the backup storage account. + :type backup_storage_customer_key_uri: str + :param sku: Virtual Machine SKU used for data centers. Default value is Standard_DS14_v2. + :type sku: str + :param disk_sku: Disk SKU used for data centers. Default value is P30. + :type disk_sku: str + :param disk_capacity: Number of disk used for data centers. Default value is 4. + :type disk_capacity: int + :param availability_zone: If the azure data center has Availability Zone support, apply it to + the Virtual Machine ScaleSet that host the cassandra data center virtual machines. + :type availability_zone: bool """ _validation = { - 'id': {'required': True}, + 'seed_nodes': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'data_center_location': {'key': 'dataCenterLocation', 'type': 'str'}, + 'delegated_subnet_id': {'key': 'delegatedSubnetId', 'type': 'str'}, + 'node_count': {'key': 'nodeCount', 'type': 'int'}, + 'seed_nodes': {'key': 'seedNodes', 'type': '[SeedNode]'}, + 'base64_encoded_cassandra_yaml_fragment': {'key': 'base64EncodedCassandraYamlFragment', 'type': 'str'}, + 'managed_disk_customer_key_uri': {'key': 'managedDiskCustomerKeyUri', 'type': 'str'}, + 'backup_storage_customer_key_uri': {'key': 'backupStorageCustomerKeyUri', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'str'}, + 'disk_sku': {'key': 'diskSku', 'type': 'str'}, + 'disk_capacity': {'key': 'diskCapacity', 'type': 'int'}, + 'availability_zone': {'key': 'availabilityZone', 'type': 'bool'}, } def __init__( self, *, - id: str, + provisioning_state: Optional[Union[str, "ManagedCassandraProvisioningState"]] = None, + data_center_location: Optional[str] = None, + delegated_subnet_id: Optional[str] = None, + node_count: Optional[int] = None, + base64_encoded_cassandra_yaml_fragment: Optional[str] = None, + managed_disk_customer_key_uri: Optional[str] = None, + backup_storage_customer_key_uri: Optional[str] = None, + sku: Optional[str] = None, + disk_sku: Optional[str] = None, + disk_capacity: Optional[int] = None, + availability_zone: Optional[bool] = None, **kwargs ): - super(GraphResource, self).__init__(**kwargs) - self.id = id - - -class GraphResourceCreateUpdateParameters(ARMResourceProperties): - """Parameters to create and update Cosmos DB Graph resource. + super(DataCenterResourceProperties, self).__init__(**kwargs) + self.provisioning_state = provisioning_state + self.data_center_location = data_center_location + self.delegated_subnet_id = delegated_subnet_id + self.node_count = node_count + self.seed_nodes = None + self.base64_encoded_cassandra_yaml_fragment = base64_encoded_cassandra_yaml_fragment + self.managed_disk_customer_key_uri = managed_disk_customer_key_uri + self.backup_storage_customer_key_uri = backup_storage_customer_key_uri + self.sku = sku + self.disk_sku = disk_sku + self.disk_capacity = disk_capacity + self.availability_zone = availability_zone - 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. +class ErrorResponse(msrest.serialization.Model): + """Error Response. - :ivar id: The unique resource identifier of the ARM resource. - :vartype id: str - :ivar name: The name of the ARM resource. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param location: The location of the resource group to which the resource belongs. - :type location: str - :param tags: A set of tags. Tags are a list of key-value pairs that describe the resource. - These tags can be used in viewing and grouping this resource (across resource groups). A - maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 - characters and value no greater than 256 characters. For example, the default experience for a - template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values - also include "Table", "Graph", "DocumentDB", and "MongoDB". - :type tags: dict[str, str] - :param identity: Identity for the resource. - :type identity: ~azure.mgmt.cosmosdb.models.ManagedServiceIdentity - :param resource: Required. The standard JSON format of a Graph resource. - :type resource: ~azure.mgmt.cosmosdb.models.GraphResource - :param options: A key-value pair of options to be applied for the request. This corresponds to - the headers sent with the request. - :type options: ~azure.mgmt.cosmosdb.models.CreateUpdateOptions + :param code: Error code. + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'resource': {'required': True}, - } - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, - 'resource': {'key': 'properties.resource', 'type': 'GraphResource'}, - 'options': {'key': 'properties.options', 'type': 'CreateUpdateOptions'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, } def __init__( self, *, - resource: "GraphResource", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - identity: Optional["ManagedServiceIdentity"] = None, - options: Optional["CreateUpdateOptions"] = None, + code: Optional[str] = None, + message: Optional[str] = None, **kwargs ): super(GraphResourceCreateUpdateParameters, self).__init__(location=location, tags=tags, identity=identity, **kwargs) @@ -4667,31 +5543,6 @@ def __init__( self.ip_address_or_range = ip_address_or_range -class ListBackups(msrest.serialization.Model): - """List of restorable backups for a Cassandra cluster. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: Container for array of backups. - :vartype value: list[~azure.mgmt.cosmosdb.models.BackupResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackupResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ListBackups, self).__init__(**kwargs) - self.value = None - - class ListClusters(msrest.serialization.Model): """List of managed Cassandra clusters. @@ -4870,8 +5721,6 @@ class LocationProperties(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar status: The current status of location in Azure. - :vartype status: str :ivar supports_availability_zone: Flag indicating whether the location supports availability zones or not. :vartype supports_availability_zone: bool @@ -4883,14 +5732,12 @@ class LocationProperties(msrest.serialization.Model): """ _validation = { - 'status': {'readonly': True}, 'supports_availability_zone': {'readonly': True}, 'is_residency_restricted': {'readonly': True}, 'backup_storage_redundancies': {'readonly': True}, } _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, 'supports_availability_zone': {'key': 'supportsAvailabilityZone', 'type': 'bool'}, 'is_residency_restricted': {'key': 'isResidencyRestricted', 'type': 'bool'}, 'backup_storage_redundancies': {'key': 'backupStorageRedundancies', 'type': '[str]'}, @@ -4901,12 +5748,78 @@ def __init__( **kwargs ): super(LocationProperties, self).__init__(**kwargs) - self.status = None self.supports_availability_zone = None self.is_residency_restricted = None self.backup_storage_redundancies = None +class ManagedCassandraManagedServiceIdentity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The object id of the identity resource. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the resource. + :vartype tenant_id: str + :param type: The type of the resource. Possible values include: "SystemAssigned", "None". + :type type: str or ~azure.mgmt.cosmosdb.models.ManagedCassandraResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ManagedCassandraResourceIdentityType"]] = None, + **kwargs + ): + super(ManagedCassandraManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class ManagedCassandraReaperStatus(msrest.serialization.Model): + """ManagedCassandraReaperStatus. + + :param healthy: + :type healthy: bool + :param repair_run_ids: Dictionary of :code:``. + :type repair_run_ids: dict[str, str] + :param repair_schedules: Dictionary of :code:``. + :type repair_schedules: dict[str, str] + """ + + _attribute_map = { + 'healthy': {'key': 'healthy', 'type': 'bool'}, + 'repair_run_ids': {'key': 'repairRunIds', 'type': '{str}'}, + 'repair_schedules': {'key': 'repairSchedules', 'type': '{str}'}, + } + + def __init__( + self, + *, + healthy: Optional[bool] = None, + repair_run_ids: Optional[Dict[str, str]] = None, + repair_schedules: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ManagedCassandraReaperStatus, self).__init__(**kwargs) + self.healthy = healthy + self.repair_run_ids = repair_run_ids + self.repair_schedules = repair_schedules + + class ManagedServiceIdentity(msrest.serialization.Model): """Identity for the resource. @@ -7765,106 +8678,6 @@ def __init__( self.ip_address = ip_address -class ServiceResource(ARMProxyResource): - """Properties for the database account. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: The unique resource identifier of the database account. - :vartype id: str - :ivar name: The name of the database account. - :vartype name: str - :ivar type: The type of Azure resource. - :vartype type: str - :param properties: Services response resource. - :type properties: ~azure.mgmt.cosmosdb.models.ServiceResourceProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'ServiceResourceProperties'}, - } - - def __init__( - self, - *, - properties: Optional["ServiceResourceProperties"] = None, - **kwargs - ): - super(ServiceResource, self).__init__(**kwargs) - self.properties = properties - - -class ServiceResourceCreateUpdateParameters(msrest.serialization.Model): - """Parameters for Create or Update Request for ServiceResource. - - :param instance_size: Instance type for the service. Possible values include: "Cosmos.D4s", - "Cosmos.D8s", "Cosmos.D16s". - :type instance_size: str or ~azure.mgmt.cosmosdb.models.ServiceSize - :param instance_count: Instance count for the service. - :type instance_count: int - :param service_type: ServiceType for the service. Possible values include: - "SqlDedicatedGateway", "DataTransfer", "GraphAPICompute". - :type service_type: str or ~azure.mgmt.cosmosdb.models.ServiceType - """ - - _validation = { - 'instance_count': {'minimum': 0}, - } - - _attribute_map = { - 'instance_size': {'key': 'properties.instanceSize', 'type': 'str'}, - 'instance_count': {'key': 'properties.instanceCount', 'type': 'int'}, - 'service_type': {'key': 'properties.serviceType', 'type': 'str'}, - } - - def __init__( - self, - *, - instance_size: Optional[Union[str, "ServiceSize"]] = None, - instance_count: Optional[int] = None, - service_type: Optional[Union[str, "ServiceType"]] = None, - **kwargs - ): - super(ServiceResourceCreateUpdateParameters, self).__init__(**kwargs) - self.instance_size = instance_size - self.instance_count = instance_count - self.service_type = service_type - - -class ServiceResourceListResult(msrest.serialization.Model): - """The List operation response, that contains the Service Resource and their properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: List of Service Resource and their properties. - :vartype value: list[~azure.mgmt.cosmosdb.models.ServiceResource] - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ServiceResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceResourceListResult, self).__init__(**kwargs) - self.value = None - - class SpatialSpec(msrest.serialization.Model): """SpatialSpec. diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py index a7c7808a801a..2cee8a2f17a0 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/__init__.py @@ -25,7 +25,7 @@ from ._table_resources_operations import TableResourcesOperations from ._cassandra_resources_operations import CassandraResourcesOperations from ._gremlin_resources_operations import GremlinResourcesOperations -from ._cosmos_db_management_client_operations import CosmosDBManagementClientOperationsMixin +from ._locations_operations import LocationsOperations from ._notebook_workspaces_operations import NotebookWorkspacesOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -38,7 +38,6 @@ from ._restorable_mongodb_resources_operations import RestorableMongodbResourcesOperations from ._cassandra_clusters_operations import CassandraClustersOperations from ._cassandra_data_centers_operations import CassandraDataCentersOperations -from ._service_operations import ServiceOperations __all__ = [ 'DatabaseAccountsOperations', @@ -60,7 +59,7 @@ 'TableResourcesOperations', 'CassandraResourcesOperations', 'GremlinResourcesOperations', - 'CosmosDBManagementClientOperationsMixin', + 'LocationsOperations', 'NotebookWorkspacesOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', @@ -73,5 +72,4 @@ 'RestorableMongodbResourcesOperations', 'CassandraClustersOperations', 'CassandraDataCentersOperations', - 'ServiceOperations', ] diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py index a0e0f51b58da..00c77a7874ff 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_clusters_operations.py @@ -64,7 +64,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -134,7 +134,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -208,7 +208,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -256,7 +256,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -367,7 +367,7 @@ def _create_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -498,7 +498,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -615,25 +615,25 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}'} # type: ignore - def _request_repair_initial( + def _invoke_command_initial( self, resource_group_name, # type: str cluster_name, # type: str - body, # type: "_models.RepairPostBody" + body, # type: "_models.CommandPostBody" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.CommandOutput" + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._request_repair_initial.metadata['url'] # type: ignore + url = self._invoke_command_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -651,56 +651,59 @@ def _request_repair_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(body, 'RepairPostBody') + body_content = self._serialize.body(body, 'CommandPostBody') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('CommandOutput', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _request_repair_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/repair'} # type: ignore + return deserialized + _invoke_command_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand'} # type: ignore - def begin_request_repair( + def begin_invoke_command( self, resource_group_name, # type: str cluster_name, # type: str - body, # type: "_models.RepairPostBody" + body, # type: "_models.CommandPostBody" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Request that repair begin on this cluster as soon as possible. + # type: (...) -> LROPoller["_models.CommandOutput"] + """Invoke a command like nodetool for cassandra maintenance. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: Managed Cassandra cluster name. :type cluster_name: str - :param body: Specification of what keyspaces and tables to run repair on. - :type body: ~azure.mgmt.cosmosdb.models.RepairPostBody + :param body: Specification which command to run where. + :type body: ~azure.mgmt.cosmosdb.models.CommandPostBody :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either CommandOutput or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.CommandOutput] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CommandOutput"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._request_repair_initial( + raw_result = self._invoke_command_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, body=body, @@ -712,8 +715,11 @@ def begin_request_repair( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CommandOutput', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -733,25 +739,25 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_request_repair.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/repair'} # type: ignore + begin_invoke_command.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/invokeCommand'} # type: ignore - def _fetch_node_status_initial( + def _deallocate_initial( self, resource_group_name, # type: str cluster_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["_models.ClusterNodeStatus"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ClusterNodeStatus"]] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL - url = self._fetch_node_status_initial.metadata['url'] # type: ignore + url = self._deallocate_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), @@ -771,28 +777,25 @@ def _fetch_node_status_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ClusterNodeStatus', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _fetch_node_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/fetchNodeStatus'} # type: ignore + _deallocate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate'} # type: ignore - def begin_fetch_node_status( + def begin_deallocate( self, resource_group_name, # type: str cluster_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ClusterNodeStatus"] - """Request the status of all nodes in the cluster (as returned by 'nodetool status'). + # type: (...) -> LROPoller[None] + """Deallocate the Managed Cassandra Cluster and Associated Data Centers. Deallocation will + deallocate the host virtual machine of this cluster, and reserved the data disk. This won't do + anything on an already deallocated cluster. Use Start to restart the cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -804,19 +807,19 @@ def begin_fetch_node_status( Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ClusterNodeStatus or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.ClusterNodeStatus] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterNodeStatus"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._fetch_node_status_initial( + raw_result = self._deallocate_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, cls=lambda x,y,z: x, @@ -827,11 +830,8 @@ def begin_fetch_node_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ClusterNodeStatus', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), @@ -851,119 +851,152 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_fetch_node_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/fetchNodeStatus'} # type: ignore + begin_deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/deallocate'} # type: ignore - def list_backups( + def _start_initial( self, resource_group_name, # type: str cluster_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ListBackups"] - """List the backups of this cluster that are available to restore. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param cluster_name: Managed Cassandra cluster name. - :type cluster_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ListBackups or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.ListBackups] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ListBackups"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._start_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_backups.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('ListBackups', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if cls: + return cls(pipeline_response, None, {}) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _start_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start'} # type: ignore - return pipeline_response + def begin_start( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Start the Managed Cassandra Cluster and Associated Data Centers. Start will start the host + virtual machine of this cluster with reserved data disk. This won't do anything on an already + running cluster. Use Deallocate to deallocate the cluster. - return ItemPaged( - get_next, extract_data + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: Managed Cassandra cluster name. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/start'} # type: ignore - def get_backup( + def status( self, resource_group_name, # type: str cluster_name, # type: str - backup_id, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.BackupResource" - """Get the properties of an individual backup of this cluster that is available to restore. + # type: (...) -> "_models.CassandraClusterPublicStatus" + """Gets the CPU, memory, and disk usage statistics for each Cassandra node in a cluster. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param cluster_name: Managed Cassandra cluster name. :type cluster_name: str - :param backup_id: Id of a restorable backup of a Cassandra cluster. - :type backup_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackupResource, or the result of cls(response) - :rtype: ~azure.mgmt.cosmosdb.models.BackupResource + :return: CassandraClusterPublicStatus, or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.CassandraClusterPublicStatus :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResource"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CassandraClusterPublicStatus"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL - url = self.get_backup.metadata['url'] # type: ignore + url = self.status.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=100, min_length=1, pattern=r'^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*$'), - 'backupId': self._serialize.url("backup_id", backup_id, 'str', max_length=15, min_length=1, pattern=r'^[0-9]+$'), } url = self._client.format_url(url, **path_format_arguments) @@ -983,10 +1016,10 @@ def get_backup( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackupResource', pipeline_response) + deserialized = self._deserialize('CassandraClusterPublicStatus', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/backups/{backupId}'} # type: ignore + status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}/status'} # type: ignore diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py index 2de44375e68a..d0a037bb5c71 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_data_centers_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +148,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -198,7 +198,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -316,7 +316,7 @@ def _create_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -454,7 +454,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py index 55ec864e163a..9031421d983a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_cassandra_resources_operations.py @@ -70,7 +70,7 @@ def list_cassandra_keyspaces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get_cassandra_keyspace( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def _create_update_cassandra_keyspace_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_cassandra_keyspace_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_cassandra_keyspace_initial.metadata['url'] # type: ignore @@ -464,7 +464,7 @@ def get_cassandra_keyspace_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -515,7 +515,7 @@ def _update_cassandra_keyspace_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -650,7 +650,7 @@ def _migrate_cassandra_keyspace_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -775,7 +775,7 @@ def _migrate_cassandra_keyspace_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -913,7 +913,7 @@ def list_cassandra_tables( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -995,7 +995,7 @@ def get_cassandra_table( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1048,7 +1048,7 @@ def _create_update_cassandra_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1190,7 +1190,7 @@ def _delete_cassandra_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_cassandra_table_initial.metadata['url'] # type: ignore @@ -1328,7 +1328,7 @@ def get_cassandra_table_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1381,7 +1381,7 @@ def _update_cassandra_table_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1523,7 +1523,7 @@ def _migrate_cassandra_table_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1655,7 +1655,7 @@ def _migrate_cassandra_table_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py index 5ae1c3224216..c9075d618b17 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_operations.py @@ -80,7 +80,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -168,7 +168,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -253,7 +253,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py index c63a2588d1dd..282d8bd6afd0 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_operations.py @@ -80,7 +80,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -168,7 +168,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py index 33d2f61a1c3d..a58acf2f517a 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_partition_region_operations.py @@ -83,7 +83,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py index a9adf327fecd..0c6fb24445b8 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_collection_region_operations.py @@ -83,7 +83,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py index 5a70940cff00..15ca6424a2ff 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_account_region_operations.py @@ -76,7 +76,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py index 1d5e50ab25e6..6b928c81a0a4 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_accounts_operations.py @@ -70,7 +70,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -119,7 +119,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -245,7 +245,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -371,7 +371,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -480,7 +480,7 @@ def _failover_priority_change_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -605,7 +605,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -675,7 +675,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -749,7 +749,7 @@ def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -808,7 +808,7 @@ def list_connection_strings( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -857,7 +857,7 @@ def _offline_region_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -978,7 +978,7 @@ def _online_region_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1109,7 +1109,7 @@ def get_read_only_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1168,7 +1168,7 @@ def list_read_only_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1217,7 +1217,7 @@ def _regenerate_key_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") # Construct URL @@ -1344,7 +1344,7 @@ def check_name_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self.check_name_exists.metadata['url'] # type: ignore @@ -1402,7 +1402,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1482,7 +1482,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1559,7 +1559,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py index 6551e716d1c1..82421f7d6ffa 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_database_operations.py @@ -77,7 +77,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -161,7 +161,7 @@ def list_usages( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -242,7 +242,7 @@ def list_metric_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py index b125f94738bd..79a90859cc76 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_gremlin_resources_operations.py @@ -70,7 +70,7 @@ def list_gremlin_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get_gremlin_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def _create_update_gremlin_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_gremlin_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_gremlin_database_initial.metadata['url'] # type: ignore @@ -464,7 +464,7 @@ def get_gremlin_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -515,7 +515,7 @@ def _update_gremlin_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -650,7 +650,7 @@ def _migrate_gremlin_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -775,7 +775,7 @@ def _migrate_gremlin_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -913,7 +913,7 @@ def list_gremlin_graphs( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -995,7 +995,7 @@ def get_gremlin_graph( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1048,7 +1048,7 @@ def _create_update_gremlin_graph_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1190,7 +1190,7 @@ def _delete_gremlin_graph_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_gremlin_graph_initial.metadata['url'] # type: ignore @@ -1328,7 +1328,7 @@ def get_gremlin_graph_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1381,7 +1381,7 @@ def _update_gremlin_graph_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1523,7 +1523,7 @@ def _migrate_gremlin_graph_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1655,7 +1655,7 @@ def _migrate_gremlin_graph_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_locations_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_locations_operations.py new file mode 100644 index 000000000000..84b98dd18aa0 --- /dev/null +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_locations_operations.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class LocationsOperations(object): + """LocationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.cosmosdb.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.LocationListResult"] + """List Cosmos DB locations and their properties. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LocationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.cosmosdb.models.LocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('LocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations'} # type: ignore + + def get( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.LocationGetResult" + """Get the properties of an existing Cosmos DB location. + + :param location: Cosmos DB region, with spaces between words and each word capitalized. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocationGetResult, or the result of cls(response) + :rtype: ~azure.mgmt.cosmosdb.models.LocationGetResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LocationGetResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LocationGetResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}'} # type: ignore diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py index a465650c737b..f5b1d7b592ce 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_mongo_db_resources_operations.py @@ -70,7 +70,7 @@ def list_mongo_db_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get_mongo_db_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def _create_update_mongo_db_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_mongo_db_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_mongo_db_database_initial.metadata['url'] # type: ignore @@ -464,7 +464,7 @@ def get_mongo_db_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -515,7 +515,7 @@ def _update_mongo_db_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -650,7 +650,7 @@ def _migrate_mongo_db_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -775,7 +775,7 @@ def _migrate_mongo_db_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -913,7 +913,7 @@ def list_mongo_db_collections( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -995,7 +995,7 @@ def get_mongo_db_collection( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1048,7 +1048,7 @@ def _create_update_mongo_db_collection_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1190,7 +1190,7 @@ def _delete_mongo_db_collection_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_mongo_db_collection_initial.metadata['url'] # type: ignore @@ -1328,7 +1328,7 @@ def get_mongo_db_collection_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1381,7 +1381,7 @@ def _update_mongo_db_collection_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1523,7 +1523,7 @@ def _migrate_mongo_db_collection_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1655,7 +1655,7 @@ def _migrate_mongo_db_collection_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1772,3 +1772,145 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_migrate_mongo_db_collection_to_manual_throughput.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/throughputSettings/default/migrateToManualThroughput'} # type: ignore + + def _retrieve_continuous_backup_information_initial( + self, + resource_group_name, # type: str + account_name, # type: str + database_name, # type: str + collection_name, # type: str + location, # type: "_models.ContinuousBackupRestoreLocation" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.BackupInformation"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupInformation"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-15" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._retrieve_continuous_backup_information_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(location, 'ContinuousBackupRestoreLocation') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _retrieve_continuous_backup_information_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation'} # type: ignore + + def begin_retrieve_continuous_backup_information( + self, + resource_group_name, # type: str + account_name, # type: str + database_name, # type: str + collection_name, # type: str + location, # type: "_models.ContinuousBackupRestoreLocation" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BackupInformation"] + """Retrieves continuous backup information for a Mongodb collection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: Cosmos DB database account name. + :type account_name: str + :param database_name: Cosmos DB database name. + :type database_name: str + :param collection_name: Cosmos DB collection name. + :type collection_name: str + :param location: The name of the continuous backup restore location. + :type location: ~azure.mgmt.cosmosdb.models.ContinuousBackupRestoreLocation + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either BackupInformation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.cosmosdb.models.BackupInformation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInformation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._retrieve_continuous_backup_information_initial( + resource_group_name=resource_group_name, + account_name=account_name, + database_name=database_name, + collection_name=collection_name, + location=location, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=50, min_length=3, pattern=r'^[a-z0-9]+(-[a-z0-9]+)*'), + 'databaseName': self._serialize.url("database_name", database_name, 'str'), + 'collectionName': self._serialize.url("collection_name", collection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_retrieve_continuous_backup_information.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/databaseAccounts/{accountName}/mongodbDatabases/{databaseName}/collections/{collectionName}/retrieveContinuousBackupInformation'} # type: ignore diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py index bfb8a73234ec..00d9e6fc86d8 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_notebook_workspaces_operations.py @@ -70,7 +70,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -466,7 +466,7 @@ def list_connection_info( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -517,7 +517,7 @@ def _regenerate_auth_token_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -635,7 +635,7 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py index 78de171309d0..4bf061fe7826 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py index 549d6e3e572b..bc4ae138ce9e 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_operations.py @@ -82,7 +82,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py index 8e68bea8329d..c1f20d6e41c2 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_partition_key_range_id_region_operations.py @@ -86,7 +86,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py index 263110f8bf1a..6215b57d4ff6 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_operations.py @@ -74,7 +74,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py index 8ab15c2a94dd..2405f0b9dcc7 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_source_target_operations.py @@ -82,7 +82,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py index c45180203875..d76ec885a2db 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_percentile_target_operations.py @@ -78,7 +78,7 @@ def list_metrics( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py index c63412113ba5..7731f58e7ac9 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_endpoint_connections_operations.py @@ -70,7 +70,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +148,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -334,7 +334,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py index 1fae2104d1dd..33fd3080fce7 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_private_link_resources_operations.py @@ -68,7 +68,7 @@ def list_by_database_account( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -146,7 +146,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py index b6183ae2e725..af1db7fc59a3 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_database_accounts_operations.py @@ -67,7 +67,7 @@ def list_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -136,7 +136,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -210,7 +210,7 @@ def get_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py index cd45b4c6d995..5fb6d81270a8 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_collections_operations.py @@ -73,7 +73,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py index d3d5ff7c8318..a9504b5b5186 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_databases_operations.py @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py index 5ffec558d4b4..13660359931b 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_mongodb_resources_operations.py @@ -77,7 +77,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py index 3ea7156988ec..1a8fa9ac2af6 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_containers_operations.py @@ -79,7 +79,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py index 3985c7192cdd..37a2dd18d2e5 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_databases_operations.py @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py index c2ba469ba3e9..ed78d7481cee 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_restorable_sql_resources_operations.py @@ -77,7 +77,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py index b8bd592dbeba..fda077e0ccdf 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_sql_resources_operations.py @@ -70,7 +70,7 @@ def list_sql_databases( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -149,7 +149,7 @@ def get_sql_database( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def _create_update_sql_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -335,7 +335,7 @@ def _delete_sql_database_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_database_initial.metadata['url'] # type: ignore @@ -464,7 +464,7 @@ def get_sql_database_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -515,7 +515,7 @@ def _update_sql_database_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -650,7 +650,7 @@ def _migrate_sql_database_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -775,7 +775,7 @@ def _migrate_sql_database_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -913,7 +913,7 @@ def list_sql_containers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -995,7 +995,7 @@ def get_sql_container( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1048,7 +1048,7 @@ def _create_update_sql_container_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1190,7 +1190,7 @@ def _delete_sql_container_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_container_initial.metadata['url'] # type: ignore @@ -1328,7 +1328,7 @@ def get_sql_container_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1381,7 +1381,7 @@ def _update_sql_container_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1523,7 +1523,7 @@ def _migrate_sql_container_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1655,7 +1655,7 @@ def _migrate_sql_container_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1802,7 +1802,7 @@ def list_sql_stored_procedures( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -1888,7 +1888,7 @@ def get_sql_stored_procedure( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -1943,7 +1943,7 @@ def _create_update_sql_stored_procedure_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2092,7 +2092,7 @@ def _delete_sql_stored_procedure_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_stored_procedure_initial.metadata['url'] # type: ignore @@ -2235,7 +2235,7 @@ def list_sql_user_defined_functions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -2321,7 +2321,7 @@ def get_sql_user_defined_function( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -2376,7 +2376,7 @@ def _create_update_sql_user_defined_function_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2525,7 +2525,7 @@ def _delete_sql_user_defined_function_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_user_defined_function_initial.metadata['url'] # type: ignore @@ -2668,7 +2668,7 @@ def list_sql_triggers( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -2754,7 +2754,7 @@ def get_sql_trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -2809,7 +2809,7 @@ def _create_update_sql_trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -2958,7 +2958,7 @@ def _delete_sql_trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_sql_trigger_initial.metadata['url'] # type: ignore @@ -3098,7 +3098,7 @@ def get_sql_role_definition( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3149,7 +3149,7 @@ def _create_update_sql_role_definition_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3284,7 +3284,7 @@ def _delete_sql_role_definition_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3411,7 +3411,7 @@ def list_sql_role_definitions( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -3489,7 +3489,7 @@ def get_sql_role_assignment( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3540,7 +3540,7 @@ def _create_update_sql_role_assignment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -3675,7 +3675,7 @@ def _delete_sql_role_assignment_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -3802,7 +3802,7 @@ def list_sql_role_assignments( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -3869,7 +3869,7 @@ def _retrieve_continuous_backup_information_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py index 062611e12a0e..22cf3ea1b70e 100644 --- a/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py +++ b/sdk/cosmos/azure-mgmt-cosmosdb/azure/mgmt/cosmosdb/operations/_table_resources_operations.py @@ -70,7 +70,7 @@ def list_tables( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" def prepare_request(next_link=None): @@ -148,7 +148,7 @@ def get_table( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -199,7 +199,7 @@ def _create_update_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,7 +333,7 @@ def _delete_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" # Construct URL url = self._delete_table_initial.metadata['url'] # type: ignore @@ -462,7 +462,7 @@ def get_table_throughput( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -513,7 +513,7 @@ def _update_table_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -648,7 +648,7 @@ def _migrate_table_to_autoscale_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL @@ -773,7 +773,7 @@ def _migrate_table_to_manual_throughput_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-07-01-preview" + api_version = "2021-10-15" accept = "application/json" # Construct URL diff --git a/sdk/cosmos/tests.yml b/sdk/cosmos/tests.yml index 62b2ed7f5170..55a530ce2394 100644 --- a/sdk/cosmos/tests.yml +++ b/sdk/cosmos/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' MaxParallel: 1 ServiceDirectory: cosmos TestMarkArgument: not globaldb diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/CHANGELOG.md b/sdk/dataprotection/azure-mgmt-dataprotection/CHANGELOG.md new file mode 100644 index 000000000000..125823bc7cfe --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (2021-10-19) + +* Initial Release diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/LICENSE.txt b/sdk/dataprotection/azure-mgmt-dataprotection/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/MANIFEST.in b/sdk/dataprotection/azure-mgmt-dataprotection/MANIFEST.in new file mode 100644 index 000000000000..ef61eb0e3527 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/MANIFEST.in @@ -0,0 +1,6 @@ +include _meta.json +recursive-include tests *.py *.yaml +include *.md +include azure/__init__.py +include azure/mgmt/__init__.py +include LICENSE.txt diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/README.md b/sdk/dataprotection/azure-mgmt-dataprotection/README.md new file mode 100644 index 000000000000..a186cc4321e1 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/README.md @@ -0,0 +1,27 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Dataprotection Management Client Library. +This package has been tested with Python 2.7, 3.6+. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). + + +# Usage + + +To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) + + + +For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/) +Code samples for this package can be found at [Dataprotection Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. +Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) + + +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) +section of the project. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-dataprotection%2FREADME.png) diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/_meta.json b/sdk/dataprotection/azure-mgmt-dataprotection/_meta.json new file mode 100644 index 000000000000..ec7cc250ecc3 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "8d0a1bce1741e7b181746bcce6ad25dad31a3b11", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/dataprotection/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/dataprotection/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/__init__.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/__init__.py new file mode 100644 index 000000000000..8db66d3d0f0f --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/__init__.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/__init__.py new file mode 100644 index 000000000000..8db66d3d0f0f --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/__init__.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/__init__.py new file mode 100644 index 000000000000..9dfda54e0346 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_protection_client import DataProtectionClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['DataProtectionClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_configuration.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_configuration.py new file mode 100644 index 000000000000..d38b045a587e --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class DataProtectionClientConfiguration(Configuration): + """Configuration for DataProtectionClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataProtectionClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-07-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-dataprotection/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_data_protection_client.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_data_protection_client.py new file mode 100644 index 000000000000..85019b92c77f --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_data_protection_client.py @@ -0,0 +1,154 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import DataProtectionClientConfiguration +from .operations import BackupVaultsOperations +from .operations import OperationResultOperations +from .operations import OperationStatusOperations +from .operations import BackupVaultOperationResultsOperations +from .operations import DataProtectionOperations +from .operations import DataProtectionOperationsOperations +from .operations import BackupPoliciesOperations +from .operations import BackupInstancesOperations +from .operations import RecoveryPointsOperations +from .operations import JobsOperations +from .operations import RestorableTimeRangesOperations +from .operations import ExportJobsOperations +from .operations import ExportJobsOperationResultOperations +from .operations import ResourceGuardsOperations +from . import models + + +class DataProtectionClient(object): + """Open API 2.0 Specs for Azure Data Protection service. + + :ivar backup_vaults: BackupVaultsOperations operations + :vartype backup_vaults: azure.mgmt.dataprotection.operations.BackupVaultsOperations + :ivar operation_result: OperationResultOperations operations + :vartype operation_result: azure.mgmt.dataprotection.operations.OperationResultOperations + :ivar operation_status: OperationStatusOperations operations + :vartype operation_status: azure.mgmt.dataprotection.operations.OperationStatusOperations + :ivar backup_vault_operation_results: BackupVaultOperationResultsOperations operations + :vartype backup_vault_operation_results: azure.mgmt.dataprotection.operations.BackupVaultOperationResultsOperations + :ivar data_protection: DataProtectionOperations operations + :vartype data_protection: azure.mgmt.dataprotection.operations.DataProtectionOperations + :ivar data_protection_operations: DataProtectionOperationsOperations operations + :vartype data_protection_operations: azure.mgmt.dataprotection.operations.DataProtectionOperationsOperations + :ivar backup_policies: BackupPoliciesOperations operations + :vartype backup_policies: azure.mgmt.dataprotection.operations.BackupPoliciesOperations + :ivar backup_instances: BackupInstancesOperations operations + :vartype backup_instances: azure.mgmt.dataprotection.operations.BackupInstancesOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: azure.mgmt.dataprotection.operations.RecoveryPointsOperations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.dataprotection.operations.JobsOperations + :ivar restorable_time_ranges: RestorableTimeRangesOperations operations + :vartype restorable_time_ranges: azure.mgmt.dataprotection.operations.RestorableTimeRangesOperations + :ivar export_jobs: ExportJobsOperations operations + :vartype export_jobs: azure.mgmt.dataprotection.operations.ExportJobsOperations + :ivar export_jobs_operation_result: ExportJobsOperationResultOperations operations + :vartype export_jobs_operation_result: azure.mgmt.dataprotection.operations.ExportJobsOperationResultOperations + :ivar resource_guards: ResourceGuardsOperations operations + :vartype resource_guards: azure.mgmt.dataprotection.operations.ResourceGuardsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataProtectionClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.backup_vaults = BackupVaultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_result = OperationResultOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_status = OperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_vault_operation_results = BackupVaultOperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_protection = DataProtectionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_protection_operations = DataProtectionOperationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_policies = BackupPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_instances = BackupInstancesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recovery_points = RecoveryPointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.restorable_time_ranges = RestorableTimeRangesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_jobs = ExportJobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_jobs_operation_result = ExportJobsOperationResultOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_guards = ResourceGuardsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DataProtectionClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_metadata.json b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_metadata.json new file mode 100644 index 000000000000..8360a7bf7cd9 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_metadata.json @@ -0,0 +1,116 @@ +{ + "chosen_version": "2021-07-01", + "total_api_version_list": ["2021-07-01"], + "client": { + "name": "DataProtectionClient", + "filename": "_data_protection_client", + "description": "Open API 2.0 Specs for Azure Data Protection service.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataProtectionClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataProtectionClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The subscription Id.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "backup_vaults": "BackupVaultsOperations", + "operation_result": "OperationResultOperations", + "operation_status": "OperationStatusOperations", + "backup_vault_operation_results": "BackupVaultOperationResultsOperations", + "data_protection": "DataProtectionOperations", + "data_protection_operations": "DataProtectionOperationsOperations", + "backup_policies": "BackupPoliciesOperations", + "backup_instances": "BackupInstancesOperations", + "recovery_points": "RecoveryPointsOperations", + "jobs": "JobsOperations", + "restorable_time_ranges": "RestorableTimeRangesOperations", + "export_jobs": "ExportJobsOperations", + "export_jobs_operation_result": "ExportJobsOperationResultOperations", + "resource_guards": "ResourceGuardsOperations" + } +} \ No newline at end of file diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_version.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/__init__.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/__init__.py new file mode 100644 index 000000000000..d1235b93a84d --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_protection_client import DataProtectionClient +__all__ = ['DataProtectionClient'] diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_configuration.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_configuration.py new file mode 100644 index 000000000000..9fcfed8d9fab --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DataProtectionClientConfiguration(Configuration): + """Configuration for DataProtectionClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DataProtectionClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-07-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-dataprotection/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_data_protection_client.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_data_protection_client.py new file mode 100644 index 000000000000..f4ae7f1b520c --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/_data_protection_client.py @@ -0,0 +1,147 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import DataProtectionClientConfiguration +from .operations import BackupVaultsOperations +from .operations import OperationResultOperations +from .operations import OperationStatusOperations +from .operations import BackupVaultOperationResultsOperations +from .operations import DataProtectionOperations +from .operations import DataProtectionOperationsOperations +from .operations import BackupPoliciesOperations +from .operations import BackupInstancesOperations +from .operations import RecoveryPointsOperations +from .operations import JobsOperations +from .operations import RestorableTimeRangesOperations +from .operations import ExportJobsOperations +from .operations import ExportJobsOperationResultOperations +from .operations import ResourceGuardsOperations +from .. import models + + +class DataProtectionClient(object): + """Open API 2.0 Specs for Azure Data Protection service. + + :ivar backup_vaults: BackupVaultsOperations operations + :vartype backup_vaults: azure.mgmt.dataprotection.aio.operations.BackupVaultsOperations + :ivar operation_result: OperationResultOperations operations + :vartype operation_result: azure.mgmt.dataprotection.aio.operations.OperationResultOperations + :ivar operation_status: OperationStatusOperations operations + :vartype operation_status: azure.mgmt.dataprotection.aio.operations.OperationStatusOperations + :ivar backup_vault_operation_results: BackupVaultOperationResultsOperations operations + :vartype backup_vault_operation_results: azure.mgmt.dataprotection.aio.operations.BackupVaultOperationResultsOperations + :ivar data_protection: DataProtectionOperations operations + :vartype data_protection: azure.mgmt.dataprotection.aio.operations.DataProtectionOperations + :ivar data_protection_operations: DataProtectionOperationsOperations operations + :vartype data_protection_operations: azure.mgmt.dataprotection.aio.operations.DataProtectionOperationsOperations + :ivar backup_policies: BackupPoliciesOperations operations + :vartype backup_policies: azure.mgmt.dataprotection.aio.operations.BackupPoliciesOperations + :ivar backup_instances: BackupInstancesOperations operations + :vartype backup_instances: azure.mgmt.dataprotection.aio.operations.BackupInstancesOperations + :ivar recovery_points: RecoveryPointsOperations operations + :vartype recovery_points: azure.mgmt.dataprotection.aio.operations.RecoveryPointsOperations + :ivar jobs: JobsOperations operations + :vartype jobs: azure.mgmt.dataprotection.aio.operations.JobsOperations + :ivar restorable_time_ranges: RestorableTimeRangesOperations operations + :vartype restorable_time_ranges: azure.mgmt.dataprotection.aio.operations.RestorableTimeRangesOperations + :ivar export_jobs: ExportJobsOperations operations + :vartype export_jobs: azure.mgmt.dataprotection.aio.operations.ExportJobsOperations + :ivar export_jobs_operation_result: ExportJobsOperationResultOperations operations + :vartype export_jobs_operation_result: azure.mgmt.dataprotection.aio.operations.ExportJobsOperationResultOperations + :ivar resource_guards: ResourceGuardsOperations operations + :vartype resource_guards: azure.mgmt.dataprotection.aio.operations.ResourceGuardsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription Id. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DataProtectionClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.backup_vaults = BackupVaultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_result = OperationResultOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_status = OperationStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_vault_operation_results = BackupVaultOperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_protection = DataProtectionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_protection_operations = DataProtectionOperationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_policies = BackupPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.backup_instances = BackupInstancesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.recovery_points = RecoveryPointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.jobs = JobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.restorable_time_ranges = RestorableTimeRangesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_jobs = ExportJobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.export_jobs_operation_result = ExportJobsOperationResultOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_guards = ResourceGuardsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DataProtectionClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/__init__.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/__init__.py new file mode 100644 index 000000000000..f9c765bb82a0 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/__init__.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._backup_vaults_operations import BackupVaultsOperations +from ._operation_result_operations import OperationResultOperations +from ._operation_status_operations import OperationStatusOperations +from ._backup_vault_operation_results_operations import BackupVaultOperationResultsOperations +from ._data_protection_operations import DataProtectionOperations +from ._data_protection_operations_operations import DataProtectionOperationsOperations +from ._backup_policies_operations import BackupPoliciesOperations +from ._backup_instances_operations import BackupInstancesOperations +from ._recovery_points_operations import RecoveryPointsOperations +from ._jobs_operations import JobsOperations +from ._restorable_time_ranges_operations import RestorableTimeRangesOperations +from ._export_jobs_operations import ExportJobsOperations +from ._export_jobs_operation_result_operations import ExportJobsOperationResultOperations +from ._resource_guards_operations import ResourceGuardsOperations + +__all__ = [ + 'BackupVaultsOperations', + 'OperationResultOperations', + 'OperationStatusOperations', + 'BackupVaultOperationResultsOperations', + 'DataProtectionOperations', + 'DataProtectionOperationsOperations', + 'BackupPoliciesOperations', + 'BackupInstancesOperations', + 'RecoveryPointsOperations', + 'JobsOperations', + 'RestorableTimeRangesOperations', + 'ExportJobsOperations', + 'ExportJobsOperationResultOperations', + 'ResourceGuardsOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuits_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_instances_operations.py similarity index 59% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuits_operations.py rename to sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_instances_operations.py index 78704f55311e..ff56d2bc2e8d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuits_operations.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_instances_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitsOperations: - """ExpressRouteCircuitsOperations async operations. +class BackupInstancesOperations: + """BackupInstancesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.dataprotection.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,143 +43,115 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + def list( self, + vault_name: str, resource_group_name: str, - circuit_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> AsyncIterable["_models.BackupInstanceResourceList"]: + """Gets a backup instances belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupInstanceResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.BackupInstanceResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInstanceResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-07-01" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupInstanceResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - async def begin_delete( - self, - resource_group_name: str, - circuit_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified express route circuit. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return AsyncItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances'} # type: ignore async def get( self, + vault_name: str, resource_group_name: str, - circuit_name: str, + backup_instance_name: str, **kwargs: Any - ) -> "_models.ExpressRouteCircuit": - """Gets information about the specified express route circuit. + ) -> "_models.BackupInstanceResource": + """Gets a backup instance with name in a backup vault. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of express route circuit. - :type circuit_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuit, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit + :return: BackupInstanceResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BackupInstanceResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInstanceResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -199,36 +171,38 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore async def _create_or_update_initial( self, + vault_name: str, resource_group_name: str, - circuit_name: str, - parameters: "_models.ExpressRouteCircuit", + backup_instance_name: str, + parameters: "_models.BackupInstanceResource", **kwargs: Any - ) -> "_models.ExpressRouteCircuit": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + ) -> "_models.BackupInstanceResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInstanceResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-07-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -242,7 +216,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ExpressRouteCircuit') + body_content = self._serialize.body(parameters, 'BackupInstanceResource') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -253,44 +227,47 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore async def begin_create_or_update( self, + vault_name: str, resource_group_name: str, - circuit_name: str, - parameters: "_models.ExpressRouteCircuit", + backup_instance_name: str, + parameters: "_models.BackupInstanceResource", **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuit"]: - """Creates or updates an express route circuit. + ) -> AsyncLROPoller["_models.BackupInstanceResource"]: + """Create or update a backup instance in a backup vault. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :param parameters: Parameters supplied to the create or update express route circuit operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.BackupInstanceResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit] + :return: An instance of AsyncLROPoller that returns either BackupInstanceResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.dataprotection.models.BackupInstanceResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInstanceResource"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -298,8 +275,9 @@ async def begin_create_or_update( cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: raw_result = await self._create_or_update_initial( + vault_name=vault_name, resource_group_name=resource_group_name, - circuit_name=circuit_name, + backup_instance_name=backup_instance_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -309,16 +287,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -333,30 +312,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore - async def _update_tags_initial( + async def _delete_initial( self, + vault_name: str, resource_group_name: str, - circuit_name: str, - parameters: "_models.TagsObject", + backup_instance_name: str, **kwargs: Any - ) -> "_models.ExpressRouteCircuit": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -366,65 +345,64 @@ async def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, response_headers) - return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore - async def begin_update_tags( + async def begin_delete( self, + vault_name: str, resource_group_name: str, - circuit_name: str, - parameters: "_models.TagsObject", + backup_instance_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuit"]: - """Updates an express route circuit tags. + ) -> AsyncLROPoller[None]: + """Delete a backup instance in a backup vault. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :param parameters: Parameters supplied to update express route circuit tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_tags_initial( + raw_result = await self._delete_initial( + vault_name=vault_name, resource_group_name=resource_group_name, - circuit_name=circuit_name, - parameters=parameters, + backup_instance_name=backup_instance_name, cls=lambda x,y,z: x, **kwargs ) @@ -433,16 +411,14 @@ async def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -457,32 +433,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore - async def _list_arp_table_initial( + async def _adhoc_backup_initial( self, + vault_name: str, resource_group_name: str, - circuit_name: str, - peering_name: str, - device_path: str, + backup_instance_name: str, + parameters: "_models.TriggerBackupRequest", **kwargs: Any - ) -> Optional["_models.ExpressRouteCircuitsArpTableListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsArpTableListResult"]] + ) -> Optional["_models.OperationJobExtendedInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._list_arp_table_initial.metadata['url'] # type: ignore + url = self._adhoc_backup_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -492,9 +468,13 @@ async def _list_arp_table_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TriggerBackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -502,58 +482,63 @@ async def _list_arp_table_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + response_headers = {} deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - _list_arp_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore + _adhoc_backup_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup'} # type: ignore - async def begin_list_arp_table( + async def begin_adhoc_backup( self, + vault_name: str, resource_group_name: str, - circuit_name: str, - peering_name: str, - device_path: str, + backup_instance_name: str, + parameters: "_models.TriggerBackupRequest", **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuitsArpTableListResult"]: - """Gets the currently advertised ARP table associated with the express route circuit in a resource - group. + ) -> AsyncLROPoller["_models.OperationJobExtendedInfo"]: + """Trigger adhoc backup. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str - :param device_path: The path of the device. - :type device_path: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.TriggerBackupRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsArpTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitsArpTableListResult] + :return: An instance of AsyncLROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.dataprotection.models.OperationJobExtendedInfo] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsArpTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationJobExtendedInfo"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._list_arp_table_initial( + raw_result = await self._adhoc_backup_initial( + vault_name=vault_name, resource_group_name=resource_group_name, - circuit_name=circuit_name, - peering_name=peering_name, - device_path=device_path, + backup_instance_name=backup_instance_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -562,18 +547,17 @@ async def begin_list_arp_table( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -588,31 +572,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_arp_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore + begin_adhoc_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup'} # type: ignore - async def _list_routes_table_initial( + async def _validate_for_backup_initial( self, + vault_name: str, resource_group_name: str, - circuit_name: str, - peering_name: str, - device_path: str, + parameters: "_models.ValidateForBackupRequest", **kwargs: Any - ) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] + ) -> Optional["_models.OperationJobExtendedInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._list_routes_table_initial.metadata['url'] # type: ignore + url = self._validate_for_backup_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -623,9 +605,13 @@ async def _list_routes_table_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ValidateForBackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -633,58 +619,59 @@ async def _list_routes_table_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + response_headers = {} deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - _list_routes_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore + _validate_for_backup_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup'} # type: ignore - async def begin_list_routes_table( + async def begin_validate_for_backup( self, + vault_name: str, resource_group_name: str, - circuit_name: str, - peering_name: str, - device_path: str, + parameters: "_models.ValidateForBackupRequest", **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"]: - """Gets the currently advertised routes table associated with the express route circuit in a - resource group. + ) -> AsyncLROPoller["_models.OperationJobExtendedInfo"]: + """Validate whether adhoc backup will be successful or not. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str - :param device_path: The path of the device. - :type device_path: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.ValidateForBackupRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitsRoutesTableListResult] + :return: An instance of AsyncLROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.dataprotection.models.OperationJobExtendedInfo] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationJobExtendedInfo"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._list_routes_table_initial( + raw_result = await self._validate_for_backup_initial( + vault_name=vault_name, resource_group_name=resource_group_name, - circuit_name=circuit_name, - peering_name=peering_name, - device_path=device_path, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -693,17 +680,15 @@ async def begin_list_routes_table( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -719,32 +704,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_routes_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore + begin_validate_for_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup'} # type: ignore - async def _list_routes_table_summary_initial( + async def _trigger_rehydrate_initial( self, resource_group_name: str, - circuit_name: str, - peering_name: str, - device_path: str, + vault_name: str, + backup_instance_name: str, + parameters: "_models.AzureBackupRehydrationRequest", **kwargs: Any - ) -> Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._list_routes_table_summary_initial.metadata['url'] # type: ignore + url = self._trigger_rehydrate_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -754,68 +739,72 @@ async def _list_routes_table_summary_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupRehydrationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, response_headers) - return deserialized - _list_routes_table_summary_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore + _trigger_rehydrate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate'} # type: ignore - async def begin_list_routes_table_summary( + async def begin_trigger_rehydrate( self, resource_group_name: str, - circuit_name: str, - peering_name: str, - device_path: str, + vault_name: str, + backup_instance_name: str, + parameters: "_models.AzureBackupRehydrationRequest", **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]: - """Gets the currently advertised routes table summary associated with the express route circuit in - a resource group. + ) -> AsyncLROPoller[None]: + """rehydrate recovery point for restore for a BackupInstance. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str - :param device_path: The path of the device. - :type device_path: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param backup_instance_name: + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.AzureBackupRehydrationRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsRoutesTableSummaryListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._list_routes_table_summary_initial( + raw_result = await self._trigger_rehydrate_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, - peering_name=peering_name, - device_path=device_path, + vault_name=vault_name, + backup_instance_name=backup_instance_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -824,18 +813,14 @@ async def begin_list_routes_table_summary( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -850,39 +835,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_routes_table_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore + begin_trigger_rehydrate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate'} # type: ignore - async def get_stats( + async def _trigger_restore_initial( self, + vault_name: str, resource_group_name: str, - circuit_name: str, + backup_instance_name: str, + parameters: "_models.AzureBackupRestoreRequest", **kwargs: Any - ) -> "_models.ExpressRouteCircuitStats": - """Gets all the stats from an express route circuit in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitStats - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] + ) -> Optional["_models.OperationJobExtendedInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_stats.metadata['url'] # type: ignore + url = self._trigger_restore_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -892,59 +870,136 @@ async def get_stats( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - get_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats'} # type: ignore + _trigger_restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore'} # type: ignore - async def get_peering_stats( + async def begin_trigger_restore( self, + vault_name: str, resource_group_name: str, - circuit_name: str, - peering_name: str, + backup_instance_name: str, + parameters: "_models.AzureBackupRestoreRequest", **kwargs: Any - ) -> "_models.ExpressRouteCircuitStats": - """Gets all stats from an express route circuit in a resource group. + ) -> AsyncLROPoller["_models.OperationJobExtendedInfo"]: + """Triggers restore for a BackupInstance. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.AzureBackupRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitStats - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.dataprotection.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._trigger_restore_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore'} # type: ignore + + async def _validate_for_restore_initial( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "_models.ValidateRestoreRequestObject", + **kwargs: Any + ) -> Optional["_models.OperationJobExtendedInfo"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_peering_stats.metadata['url'] # type: ignore + url = self._validate_for_restore_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -954,156 +1009,108 @@ async def get_peering_stats( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ValidateRestoreRequestObject') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - get_peering_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats'} # type: ignore + _validate_for_restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore'} # type: ignore - def list( + async def begin_validate_for_restore( self, + vault_name: str, resource_group_name: str, + backup_instance_name: str, + parameters: "_models.ValidateRestoreRequestObject", **kwargs: Any - ) -> AsyncIterable["_models.ExpressRouteCircuitListResult"]: - """Gets all the express route circuits in a resource group. + ) -> AsyncLROPoller["_models.OperationJobExtendedInfo"]: + """Validates if Restore can be triggered for a DataSource. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.ValidateRestoreRequestObject :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.dataprotection.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits'} # type: ignore - - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable["_models.ExpressRouteCircuitListResult"]: - """Gets all the express route circuits in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._validate_for_restore_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitListResult', pipeline_response) - list_of_elem = deserialized.value if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + return cls(pipeline_response, deserialized, {}) + return deserialized - return pipeline_response + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits'} # type: ignore + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate_for_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_policies_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_policies_operations.py new file mode 100644 index 000000000000..3b220c4d6253 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_policies_operations.py @@ -0,0 +1,313 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupPoliciesOperations: + """BackupPoliciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.BaseBackupPolicyResourceList"]: + """Returns list of backup policies belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BaseBackupPolicyResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.BaseBackupPolicyResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseBackupPolicyResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BaseBackupPolicyResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies'} # type: ignore + + async def get( + self, + vault_name: str, + resource_group_name: str, + backup_policy_name: str, + **kwargs: Any + ) -> "_models.BaseBackupPolicyResource": + """Gets a backup policy belonging to a backup vault. + + Gets a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: + :type backup_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseBackupPolicyResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BaseBackupPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseBackupPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseBackupPolicyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore + + async def create_or_update( + self, + vault_name: str, + resource_group_name: str, + backup_policy_name: str, + parameters: "_models.BaseBackupPolicyResource", + **kwargs: Any + ) -> "_models.BaseBackupPolicyResource": + """Creates or Updates a backup policy belonging to a backup vault. + + Creates or Updates a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: Name of the policy. + :type backup_policy_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.BaseBackupPolicyResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseBackupPolicyResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BaseBackupPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseBackupPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BaseBackupPolicyResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseBackupPolicyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore + + async def delete( + self, + vault_name: str, + resource_group_name: str, + backup_policy_name: str, + **kwargs: Any + ) -> None: + """Deletes a backup policy belonging to a backup vault. + + Deletes a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: + :type backup_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_vault_operation_results_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_vault_operation_results_operations.py new file mode 100644 index 000000000000..22c61b0cc12b --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_vault_operation_results_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupVaultOperationResultsOperations: + """BackupVaultOperationResultsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + vault_name: str, + resource_group_name: str, + operation_id: str, + **kwargs: Any + ) -> Optional["_models.BackupVaultResource"]: + """get. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupVaultResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BackupVaultResource or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupVaultResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_vaults_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_vaults_operations.py new file mode 100644 index 000000000000..d0bc61275c7b --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_backup_vaults_operations.py @@ -0,0 +1,616 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupVaultsOperations: + """BackupVaultsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_in_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.BackupVaultResourceList"]: + """Returns resource collection belonging to a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupVaultResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.BackupVaultResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_in_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupVaultResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_in_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults'} # type: ignore + + def get_in_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.BackupVaultResourceList"]: + """Returns resource collection belonging to a resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupVaultResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.BackupVaultResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_in_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BackupVaultResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_in_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults'} # type: ignore + + async def get( + self, + vault_name: str, + resource_group_name: str, + **kwargs: Any + ) -> "_models.BackupVaultResource": + """Returns a resource belonging to a resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupVaultResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BackupVaultResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def _create_or_update_initial( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.BackupVaultResource", + **kwargs: Any + ) -> "_models.BackupVaultResource": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupVaultResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def begin_create_or_update( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.BackupVaultResource", + **kwargs: Any + ) -> AsyncLROPoller["_models.BackupVaultResource"]: + """Creates or updates a BackupVault resource belonging to a resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.BackupVaultResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupVaultResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.dataprotection.models.BackupVaultResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def delete( + self, + vault_name: str, + resource_group_name: str, + **kwargs: Any + ) -> None: + """Deletes a BackupVault resource from the resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def _update_initial( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.PatchResourceRequestInput", + **kwargs: Any + ) -> Optional["_models.BackupVaultResource"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupVaultResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PatchResourceRequestInput') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def begin_update( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.PatchResourceRequestInput", + **kwargs: Any + ) -> AsyncLROPoller["_models.BackupVaultResource"]: + """Updates a BackupVault resource belonging to a resource group. For example, updating tags for a + resource. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.PatchResourceRequestInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BackupVaultResource or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.dataprotection.models.BackupVaultResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + async def check_name_availability( + self, + resource_group_name: str, + location: str, + parameters: "_models.CheckNameAvailabilityRequest", + **kwargs: Any + ) -> "_models.CheckNameAvailabilityResult": + """API to check for resource name availability. + + API to check for resource name availability. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param location: The location in which uniqueness will be verified. + :type location: str + :param parameters: Check name availability request. + :type parameters: ~azure.mgmt.dataprotection.models.CheckNameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.CheckNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + 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'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_data_protection_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_data_protection_operations.py new file mode 100644 index 000000000000..4f4c02a41fbf --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_data_protection_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataProtectionOperations: + """DataProtectionOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def check_feature_support( + self, + location: str, + parameters: "_models.FeatureValidationRequestBase", + **kwargs: Any + ) -> "_models.FeatureValidationResponseBase": + """Validates if a feature is supported. + + Validates if a feature is supported. + + :param location: + :type location: str + :param parameters: Feature support request object. + :type parameters: ~azure.mgmt.dataprotection.models.FeatureValidationRequestBase + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FeatureValidationResponseBase, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.FeatureValidationResponseBase + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FeatureValidationResponseBase"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_feature_support.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'FeatureValidationRequestBase') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FeatureValidationResponseBase', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_feature_support.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_data_protection_operations_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_data_protection_operations_operations.py new file mode 100644 index 000000000000..c214a878307e --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_data_protection_operations_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataProtectionOperationsOperations: + """DataProtectionOperationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ClientDiscoveryResponse"]: + """Returns the list of available operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ClientDiscoveryResponse or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.ClientDiscoveryResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientDiscoveryResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ClientDiscoveryResponse', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataProtection/operations'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_export_jobs_operation_result_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_export_jobs_operation_result_operations.py new file mode 100644 index 000000000000..5229fa069641 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_export_jobs_operation_result_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExportJobsOperationResultOperations: + """ExportJobsOperationResultOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + vault_name: str, + operation_id: str, + **kwargs: Any + ) -> Optional["_models.ExportJobsResult"]: + """Gets the operation result of operation triggered by Export Jobs API. If the operation is + successful, then it also contains URL of a Blob and a SAS key to access the same. The blob + contains exported jobs in JSON serialized format. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param operation_id: OperationID which represents the export job. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExportJobsResult, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.ExportJobsResult or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExportJobsResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExportJobsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_export_jobs_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_export_jobs_operations.py new file mode 100644 index 000000000000..9e54054ad0ea --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_export_jobs_operations.py @@ -0,0 +1,156 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExportJobsOperations: + """ExportJobsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _trigger_initial( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self._trigger_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, None, response_headers) + + _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs'} # type: ignore + + async def begin_trigger( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Triggers export of jobs and returns an OperationID to track. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._trigger_initial( + resource_group_name=resource_group_name, + vault_name=vault_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_probes_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_jobs_operations.py similarity index 77% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_probes_operations.py rename to sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_jobs_operations.py index 2b57c4e86719..8cce9e55bcfc 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_probes_operations.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_jobs_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerProbesOperations: - """LoadBalancerProbesOperations async operations. +class JobsOperations: + """JobsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.dataprotection.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,27 +44,27 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, resource_group_name: str, - load_balancer_name: str, + vault_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerProbeListResult"]: - """Gets all the load balancer probes. + ) -> AsyncIterable["_models.AzureBackupJobResourceList"]: + """Returns list of jobs belonging to a backup vault. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerProbeListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerProbeListResult] + :return: An iterator like instance of either AzureBackupJobResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.AzureBackupJobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerProbeListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupJobResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -75,9 +75,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -92,7 +92,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerProbeListResult', pipeline_response) + deserialized = self._deserialize('AzureBackupJobResourceList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,43 +113,44 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs'} # type: ignore async def get( self, resource_group_name: str, - load_balancer_name: str, - probe_name: str, + vault_name: str, + job_id: str, **kwargs: Any - ) -> "_models.Probe": - """Gets load balancer probe. + ) -> "_models.AzureBackupJobResource": + """Gets a job with id in a backup vault. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param probe_name: The name of the probe. - :type probe_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param job_id: The Job ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). + :type job_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Probe, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.Probe + :return: AzureBackupJobResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.AzureBackupJobResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Probe"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupJobResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'probeName': self._serialize.url("probe_name", probe_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'jobId': self._serialize.url("job_id", job_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -169,10 +170,10 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Probe', pipeline_response) + deserialized = self._deserialize('AzureBackupJobResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_operation_result_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_operation_result_operations.py new file mode 100644 index 000000000000..4793f47b4c57 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_operation_result_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationResultOperations: + """OperationResultOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + operation_id: str, + location: str, + **kwargs: Any + ) -> Optional["_models.OperationJobExtendedInfo"]: + """Gets the operation status for a resource. + + Gets the operation result for a resource. + + :param operation_id: + :type operation_id: str + :param location: + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationJobExtendedInfo, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.OperationJobExtendedInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_management_client_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_operation_status_operations.py similarity index 61% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_management_client_operations.py rename to sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_operation_status_operations.py index 3c5f538cb00e..cd20c682149d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_management_client_operations.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_operation_status_operations.py @@ -18,45 +18,66 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NetworkManagementClientOperationsMixin: +class OperationStatusOperations: + """OperationStatusOperations async operations. - async def check_dns_name_availability( + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( self, location: str, - domain_name_label: str, + operation_id: str, **kwargs: Any - ) -> "_models.DnsNameAvailabilityResult": - """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + ) -> "_models.OperationResource": + """Gets the operation status for a resource. - :param location: The location of the domain name. + Gets the operation status for a resource. + + :param location: :type location: str - :param domain_name_label: The domain name to be verified. It must conform to the following - regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. - :type domain_name_label: str + :param operation_id: + :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DnsNameAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.DnsNameAvailabilityResult + :return: OperationResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.OperationResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL - url = self.check_dns_name_availability.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), '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 = {} # type: Dict[str, Any] - query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -71,10 +92,10 @@ async def check_dns_name_availability( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) + deserialized = self._deserialize('OperationResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_dns_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_recovery_points_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_recovery_points_operations.py new file mode 100644 index 000000000000..efb6fbeb9455 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_recovery_points_operations.py @@ -0,0 +1,196 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RecoveryPointsOperations: + """RecoveryPointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + filter: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.AzureBackupRecoveryPointResourceList"]: + """Returns a list of Recovery Points for a DataSource in a vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureBackupRecoveryPointResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.AzureBackupRecoveryPointResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupRecoveryPointResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AzureBackupRecoveryPointResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints'} # type: ignore + + async def get( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + recovery_point_id: str, + **kwargs: Any + ) -> "_models.AzureBackupRecoveryPointResource": + """Gets a Recovery Point using recoveryPointId for a Datasource. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param recovery_point_id: + :type recovery_point_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureBackupRecoveryPointResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.AzureBackupRecoveryPointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupRecoveryPointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + 'recoveryPointId': self._serialize.url("recovery_point_id", recovery_point_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureBackupRecoveryPointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_resource_guards_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_resource_guards_operations.py new file mode 100644 index 000000000000..0f9b1f08b6b6 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_resource_guards_operations.py @@ -0,0 +1,1288 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResourceGuardsOperations: + """ResourceGuardsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_resources_in_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ResourceGuardResourceList"]: + """Returns ResourceGuards collection belonging to a subscription. + + Returns ResourceGuards collection belonging to a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceGuardResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.ResourceGuardResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_resources_in_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceGuardResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_resources_in_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/resourceGuards'} # type: ignore + + def get_resources_in_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ResourceGuardResourceList"]: + """Returns ResourceGuards collection belonging to a ResourceGroup. + + Returns ResourceGuards collection belonging to a ResourceGroup. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceGuardResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.ResourceGuardResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_resources_in_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceGuardResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_resources_in_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards'} # type: ignore + + async def put( + self, + resource_group_name: str, + resource_guards_name: str, + parameters: "_models.ResourceGuardResource", + **kwargs: Any + ) -> "_models.ResourceGuardResource": + """Creates or updates a ResourceGuard resource belonging to a resource group. + + Creates or updates a ResourceGuard resource belonging to a resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: The name of ResourceGuard. + :type resource_guards_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.ResourceGuardResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.ResourceGuardResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ResourceGuardResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + resource_guards_name: str, + **kwargs: Any + ) -> "_models.ResourceGuardResource": + """Returns a ResourceGuard belonging to a resource group. + + Returns a ResourceGuard belonging to a resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: The name of ResourceGuard. + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.ResourceGuardResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + resource_guards_name: str, + **kwargs: Any + ) -> None: + """Deletes a ResourceGuard resource from the resource group. + + Deletes a ResourceGuard resource from the resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: The name of ResourceGuard. + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}'} # type: ignore + + async def patch( + self, + resource_group_name: str, + resource_guards_name: str, + parameters: "_models.PatchResourceRequestInput", + **kwargs: Any + ) -> "_models.ResourceGuardResource": + """Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. + + Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for + a resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: The name of ResourceGuard. + :type resource_guards_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.PatchResourceRequestInput + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.ResourceGuardResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PatchResourceRequestInput') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}'} # type: ignore + + def get_disable_soft_delete_requests_objects( + self, + resource_group_name: str, + resource_guards_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DppBaseResourceList"]: + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_disable_soft_delete_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_disable_soft_delete_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests'} # type: ignore + + def get_delete_resource_guard_proxy_requests_objects( + self, + resource_group_name: str, + resource_guards_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DppBaseResourceList"]: + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_delete_resource_guard_proxy_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_delete_resource_guard_proxy_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests'} # type: ignore + + def get_backup_security_pin_requests_objects( + self, + resource_group_name: str, + resource_guards_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DppBaseResourceList"]: + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_backup_security_pin_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_backup_security_pin_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests'} # type: ignore + + def get_delete_protected_item_requests_objects( + self, + resource_group_name: str, + resource_guards_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DppBaseResourceList"]: + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_delete_protected_item_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_delete_protected_item_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests'} # type: ignore + + def get_update_protection_policy_requests_objects( + self, + resource_group_name: str, + resource_guards_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DppBaseResourceList"]: + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_update_protection_policy_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_update_protection_policy_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests'} # type: ignore + + def get_update_protected_item_requests_objects( + self, + resource_group_name: str, + resource_guards_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DppBaseResourceList"]: + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_update_protected_item_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + get_update_protected_item_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests'} # type: ignore + + async def get_default_disable_soft_delete_requests_object( + self, + resource_group_name: str, + resource_guards_name: str, + request_name: str, + **kwargs: Any + ) -> "_models.DppBaseResource": + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_disable_soft_delete_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_disable_soft_delete_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}'} # type: ignore + + async def get_default_delete_resource_guard_proxy_requests_object( + self, + resource_group_name: str, + resource_guards_name: str, + request_name: str, + **kwargs: Any + ) -> "_models.DppBaseResource": + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_delete_resource_guard_proxy_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_delete_resource_guard_proxy_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}'} # type: ignore + + async def get_default_backup_security_pin_requests_object( + self, + resource_group_name: str, + resource_guards_name: str, + request_name: str, + **kwargs: Any + ) -> "_models.DppBaseResource": + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_backup_security_pin_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_backup_security_pin_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}'} # type: ignore + + async def get_default_delete_protected_item_requests_object( + self, + resource_group_name: str, + resource_guards_name: str, + request_name: str, + **kwargs: Any + ) -> "_models.DppBaseResource": + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_delete_protected_item_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_delete_protected_item_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}'} # type: ignore + + async def get_default_update_protection_policy_requests_object( + self, + resource_group_name: str, + resource_guards_name: str, + request_name: str, + **kwargs: Any + ) -> "_models.DppBaseResource": + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_update_protection_policy_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_update_protection_policy_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}'} # type: ignore + + async def get_default_update_protected_item_requests_object( + self, + resource_group_name: str, + resource_guards_name: str, + request_name: str, + **kwargs: Any + ) -> "_models.DppBaseResource": + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_update_protected_item_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_update_protected_item_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_restorable_time_ranges_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_restorable_time_ranges_operations.py new file mode 100644 index 000000000000..73ec6d0bed24 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/aio/operations/_restorable_time_ranges_operations.py @@ -0,0 +1,111 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RestorableTimeRangesOperations: + """RestorableTimeRangesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def find( + self, + vault_name: str, + resource_group_name: str, + backup_instance_name: str, + parameters: "_models.AzureBackupFindRestorableTimeRangesRequest", + **kwargs: Any + ) -> "_models.AzureBackupFindRestorableTimeRangesResponseResource": + """find. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureBackupFindRestorableTimeRangesResponseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.AzureBackupFindRestorableTimeRangesResponseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupFindRestorableTimeRangesResponseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.find.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupFindRestorableTimeRangesRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureBackupFindRestorableTimeRangesResponseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + find.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/__init__.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/__init__.py new file mode 100644 index 000000000000..1d823e9b0535 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/__init__.py @@ -0,0 +1,403 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AbsoluteDeleteOption + from ._models_py3 import AdHocBackupRuleOptions + from ._models_py3 import AdhocBackupTriggerOption + from ._models_py3 import AdhocBasedTaggingCriteria + from ._models_py3 import AdhocBasedTriggerContext + from ._models_py3 import AuthCredentials + from ._models_py3 import AzureBackupDiscreteRecoveryPoint + from ._models_py3 import AzureBackupFindRestorableTimeRangesRequest + from ._models_py3 import AzureBackupFindRestorableTimeRangesRequestResource + from ._models_py3 import AzureBackupFindRestorableTimeRangesResponse + from ._models_py3 import AzureBackupFindRestorableTimeRangesResponseResource + from ._models_py3 import AzureBackupJob + from ._models_py3 import AzureBackupJobResource + from ._models_py3 import AzureBackupJobResourceList + from ._models_py3 import AzureBackupParams + from ._models_py3 import AzureBackupRecoveryPoint + from ._models_py3 import AzureBackupRecoveryPointBasedRestoreRequest + from ._models_py3 import AzureBackupRecoveryPointResource + from ._models_py3 import AzureBackupRecoveryPointResourceList + from ._models_py3 import AzureBackupRecoveryTimeBasedRestoreRequest + from ._models_py3 import AzureBackupRehydrationRequest + from ._models_py3 import AzureBackupRestoreRequest + from ._models_py3 import AzureBackupRestoreWithRehydrationRequest + from ._models_py3 import AzureBackupRule + from ._models_py3 import AzureOperationalStoreParameters + from ._models_py3 import AzureRetentionRule + from ._models_py3 import BackupCriteria + from ._models_py3 import BackupInstance + from ._models_py3 import BackupInstanceResource + from ._models_py3 import BackupInstanceResourceList + from ._models_py3 import BackupParameters + from ._models_py3 import BackupPolicy + from ._models_py3 import BackupSchedule + from ._models_py3 import BackupVault + from ._models_py3 import BackupVaultResource + from ._models_py3 import BackupVaultResourceList + from ._models_py3 import BaseBackupPolicy + from ._models_py3 import BaseBackupPolicyResource + from ._models_py3 import BaseBackupPolicyResourceList + from ._models_py3 import BasePolicyRule + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import ClientDiscoveryDisplay + from ._models_py3 import ClientDiscoveryForLogSpecification + from ._models_py3 import ClientDiscoveryForProperties + from ._models_py3 import ClientDiscoveryForServiceSpecification + from ._models_py3 import ClientDiscoveryResponse + from ._models_py3 import ClientDiscoveryValueForSingleApi + from ._models_py3 import CopyOnExpiryOption + from ._models_py3 import CopyOption + from ._models_py3 import CustomCopyOption + from ._models_py3 import DataStoreInfoBase + from ._models_py3 import DataStoreParameters + from ._models_py3 import Datasource + from ._models_py3 import DatasourceSet + from ._models_py3 import Day + from ._models_py3 import DeleteOption + from ._models_py3 import DppBaseResource + from ._models_py3 import DppBaseResourceList + from ._models_py3 import DppIdentityDetails + from ._models_py3 import DppResource + from ._models_py3 import DppResourceList + from ._models_py3 import DppTrackedResource + from ._models_py3 import DppTrackedResourceList + from ._models_py3 import DppWorkerRequest + from ._models_py3 import Error + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ExportJobsResult + from ._models_py3 import FeatureValidationRequest + from ._models_py3 import FeatureValidationRequestBase + from ._models_py3 import FeatureValidationResponse + from ._models_py3 import FeatureValidationResponseBase + from ._models_py3 import ImmediateCopyOption + from ._models_py3 import InnerError + from ._models_py3 import ItemLevelRestoreCriteria + from ._models_py3 import ItemLevelRestoreTargetInfo + from ._models_py3 import JobExtendedInfo + from ._models_py3 import JobSubTask + from ._models_py3 import OperationExtendedInfo + from ._models_py3 import OperationJobExtendedInfo + from ._models_py3 import OperationResource + from ._models_py3 import PatchResourceRequestInput + from ._models_py3 import PolicyInfo + from ._models_py3 import PolicyParameters + from ._models_py3 import ProtectionStatusDetails + from ._models_py3 import RangeBasedItemLevelRestoreCriteria + from ._models_py3 import RecoveryPointDataStoreDetails + from ._models_py3 import RecoveryPointsFilters + from ._models_py3 import ResourceGuard + from ._models_py3 import ResourceGuardOperation + from ._models_py3 import ResourceGuardResource + from ._models_py3 import ResourceGuardResourceList + from ._models_py3 import ResourceMoveDetails + from ._models_py3 import RestorableTimeRange + from ._models_py3 import RestoreFilesTargetInfo + from ._models_py3 import RestoreJobRecoveryPointDetails + from ._models_py3 import RestoreTargetInfo + from ._models_py3 import RestoreTargetInfoBase + from ._models_py3 import RetentionTag + from ._models_py3 import ScheduleBasedBackupCriteria + from ._models_py3 import ScheduleBasedTriggerContext + from ._models_py3 import SecretStoreBasedAuthCredentials + from ._models_py3 import SecretStoreResource + from ._models_py3 import SourceLifeCycle + from ._models_py3 import StorageSetting + from ._models_py3 import SupportedFeature + from ._models_py3 import SystemData + from ._models_py3 import TaggingCriteria + from ._models_py3 import TargetCopySetting + from ._models_py3 import TargetDetails + from ._models_py3 import TriggerBackupRequest + from ._models_py3 import TriggerContext + from ._models_py3 import UserFacingError + from ._models_py3 import ValidateForBackupRequest + from ._models_py3 import ValidateRestoreRequestObject +except (SyntaxError, ImportError): + from ._models import AbsoluteDeleteOption # type: ignore + from ._models import AdHocBackupRuleOptions # type: ignore + from ._models import AdhocBackupTriggerOption # type: ignore + from ._models import AdhocBasedTaggingCriteria # type: ignore + from ._models import AdhocBasedTriggerContext # type: ignore + from ._models import AuthCredentials # type: ignore + from ._models import AzureBackupDiscreteRecoveryPoint # type: ignore + from ._models import AzureBackupFindRestorableTimeRangesRequest # type: ignore + from ._models import AzureBackupFindRestorableTimeRangesRequestResource # type: ignore + from ._models import AzureBackupFindRestorableTimeRangesResponse # type: ignore + from ._models import AzureBackupFindRestorableTimeRangesResponseResource # type: ignore + from ._models import AzureBackupJob # type: ignore + from ._models import AzureBackupJobResource # type: ignore + from ._models import AzureBackupJobResourceList # type: ignore + from ._models import AzureBackupParams # type: ignore + from ._models import AzureBackupRecoveryPoint # type: ignore + from ._models import AzureBackupRecoveryPointBasedRestoreRequest # type: ignore + from ._models import AzureBackupRecoveryPointResource # type: ignore + from ._models import AzureBackupRecoveryPointResourceList # type: ignore + from ._models import AzureBackupRecoveryTimeBasedRestoreRequest # type: ignore + from ._models import AzureBackupRehydrationRequest # type: ignore + from ._models import AzureBackupRestoreRequest # type: ignore + from ._models import AzureBackupRestoreWithRehydrationRequest # type: ignore + from ._models import AzureBackupRule # type: ignore + from ._models import AzureOperationalStoreParameters # type: ignore + from ._models import AzureRetentionRule # type: ignore + from ._models import BackupCriteria # type: ignore + from ._models import BackupInstance # type: ignore + from ._models import BackupInstanceResource # type: ignore + from ._models import BackupInstanceResourceList # type: ignore + from ._models import BackupParameters # type: ignore + from ._models import BackupPolicy # type: ignore + from ._models import BackupSchedule # type: ignore + from ._models import BackupVault # type: ignore + from ._models import BackupVaultResource # type: ignore + from ._models import BackupVaultResourceList # type: ignore + from ._models import BaseBackupPolicy # type: ignore + from ._models import BaseBackupPolicyResource # type: ignore + from ._models import BaseBackupPolicyResourceList # type: ignore + from ._models import BasePolicyRule # type: ignore + from ._models import CheckNameAvailabilityRequest # type: ignore + from ._models import CheckNameAvailabilityResult # type: ignore + from ._models import ClientDiscoveryDisplay # type: ignore + from ._models import ClientDiscoveryForLogSpecification # type: ignore + from ._models import ClientDiscoveryForProperties # type: ignore + from ._models import ClientDiscoveryForServiceSpecification # type: ignore + from ._models import ClientDiscoveryResponse # type: ignore + from ._models import ClientDiscoveryValueForSingleApi # type: ignore + from ._models import CopyOnExpiryOption # type: ignore + from ._models import CopyOption # type: ignore + from ._models import CustomCopyOption # type: ignore + from ._models import DataStoreInfoBase # type: ignore + from ._models import DataStoreParameters # type: ignore + from ._models import Datasource # type: ignore + from ._models import DatasourceSet # type: ignore + from ._models import Day # type: ignore + from ._models import DeleteOption # type: ignore + from ._models import DppBaseResource # type: ignore + from ._models import DppBaseResourceList # type: ignore + from ._models import DppIdentityDetails # type: ignore + from ._models import DppResource # type: ignore + from ._models import DppResourceList # type: ignore + from ._models import DppTrackedResource # type: ignore + from ._models import DppTrackedResourceList # type: ignore + from ._models import DppWorkerRequest # type: ignore + from ._models import Error # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ExportJobsResult # type: ignore + from ._models import FeatureValidationRequest # type: ignore + from ._models import FeatureValidationRequestBase # type: ignore + from ._models import FeatureValidationResponse # type: ignore + from ._models import FeatureValidationResponseBase # type: ignore + from ._models import ImmediateCopyOption # type: ignore + from ._models import InnerError # type: ignore + from ._models import ItemLevelRestoreCriteria # type: ignore + from ._models import ItemLevelRestoreTargetInfo # type: ignore + from ._models import JobExtendedInfo # type: ignore + from ._models import JobSubTask # type: ignore + from ._models import OperationExtendedInfo # type: ignore + from ._models import OperationJobExtendedInfo # type: ignore + from ._models import OperationResource # type: ignore + from ._models import PatchResourceRequestInput # type: ignore + from ._models import PolicyInfo # type: ignore + from ._models import PolicyParameters # type: ignore + from ._models import ProtectionStatusDetails # type: ignore + from ._models import RangeBasedItemLevelRestoreCriteria # type: ignore + from ._models import RecoveryPointDataStoreDetails # type: ignore + from ._models import RecoveryPointsFilters # type: ignore + from ._models import ResourceGuard # type: ignore + from ._models import ResourceGuardOperation # type: ignore + from ._models import ResourceGuardResource # type: ignore + from ._models import ResourceGuardResourceList # type: ignore + from ._models import ResourceMoveDetails # type: ignore + from ._models import RestorableTimeRange # type: ignore + from ._models import RestoreFilesTargetInfo # type: ignore + from ._models import RestoreJobRecoveryPointDetails # type: ignore + from ._models import RestoreTargetInfo # type: ignore + from ._models import RestoreTargetInfoBase # type: ignore + from ._models import RetentionTag # type: ignore + from ._models import ScheduleBasedBackupCriteria # type: ignore + from ._models import ScheduleBasedTriggerContext # type: ignore + from ._models import SecretStoreBasedAuthCredentials # type: ignore + from ._models import SecretStoreResource # type: ignore + from ._models import SourceLifeCycle # type: ignore + from ._models import StorageSetting # type: ignore + from ._models import SupportedFeature # type: ignore + from ._models import SystemData # type: ignore + from ._models import TaggingCriteria # type: ignore + from ._models import TargetCopySetting # type: ignore + from ._models import TargetDetails # type: ignore + from ._models import TriggerBackupRequest # type: ignore + from ._models import TriggerContext # type: ignore + from ._models import UserFacingError # type: ignore + from ._models import ValidateForBackupRequest # type: ignore + from ._models import ValidateRestoreRequestObject # type: ignore + +from ._data_protection_client_enums import ( + AbsoluteMarker, + CreatedByType, + CurrentProtectionState, + DataStoreTypes, + DayOfWeek, + FeatureSupportStatus, + FeatureType, + Month, + ProvisioningState, + RecoveryOption, + RehydrationPriority, + RehydrationStatus, + ResourceMoveState, + RestoreSourceDataStoreType, + RestoreTargetLocationType, + SecretStoreType, + SourceDataStoreType, + Status, + StorageSettingStoreTypes, + StorageSettingTypes, + WeekNumber, +) + +__all__ = [ + 'AbsoluteDeleteOption', + 'AdHocBackupRuleOptions', + 'AdhocBackupTriggerOption', + 'AdhocBasedTaggingCriteria', + 'AdhocBasedTriggerContext', + 'AuthCredentials', + 'AzureBackupDiscreteRecoveryPoint', + 'AzureBackupFindRestorableTimeRangesRequest', + 'AzureBackupFindRestorableTimeRangesRequestResource', + 'AzureBackupFindRestorableTimeRangesResponse', + 'AzureBackupFindRestorableTimeRangesResponseResource', + 'AzureBackupJob', + 'AzureBackupJobResource', + 'AzureBackupJobResourceList', + 'AzureBackupParams', + 'AzureBackupRecoveryPoint', + 'AzureBackupRecoveryPointBasedRestoreRequest', + 'AzureBackupRecoveryPointResource', + 'AzureBackupRecoveryPointResourceList', + 'AzureBackupRecoveryTimeBasedRestoreRequest', + 'AzureBackupRehydrationRequest', + 'AzureBackupRestoreRequest', + 'AzureBackupRestoreWithRehydrationRequest', + 'AzureBackupRule', + 'AzureOperationalStoreParameters', + 'AzureRetentionRule', + 'BackupCriteria', + 'BackupInstance', + 'BackupInstanceResource', + 'BackupInstanceResourceList', + 'BackupParameters', + 'BackupPolicy', + 'BackupSchedule', + 'BackupVault', + 'BackupVaultResource', + 'BackupVaultResourceList', + 'BaseBackupPolicy', + 'BaseBackupPolicyResource', + 'BaseBackupPolicyResourceList', + 'BasePolicyRule', + 'CheckNameAvailabilityRequest', + 'CheckNameAvailabilityResult', + 'ClientDiscoveryDisplay', + 'ClientDiscoveryForLogSpecification', + 'ClientDiscoveryForProperties', + 'ClientDiscoveryForServiceSpecification', + 'ClientDiscoveryResponse', + 'ClientDiscoveryValueForSingleApi', + 'CopyOnExpiryOption', + 'CopyOption', + 'CustomCopyOption', + 'DataStoreInfoBase', + 'DataStoreParameters', + 'Datasource', + 'DatasourceSet', + 'Day', + 'DeleteOption', + 'DppBaseResource', + 'DppBaseResourceList', + 'DppIdentityDetails', + 'DppResource', + 'DppResourceList', + 'DppTrackedResource', + 'DppTrackedResourceList', + 'DppWorkerRequest', + 'Error', + 'ErrorAdditionalInfo', + 'ExportJobsResult', + 'FeatureValidationRequest', + 'FeatureValidationRequestBase', + 'FeatureValidationResponse', + 'FeatureValidationResponseBase', + 'ImmediateCopyOption', + 'InnerError', + 'ItemLevelRestoreCriteria', + 'ItemLevelRestoreTargetInfo', + 'JobExtendedInfo', + 'JobSubTask', + 'OperationExtendedInfo', + 'OperationJobExtendedInfo', + 'OperationResource', + 'PatchResourceRequestInput', + 'PolicyInfo', + 'PolicyParameters', + 'ProtectionStatusDetails', + 'RangeBasedItemLevelRestoreCriteria', + 'RecoveryPointDataStoreDetails', + 'RecoveryPointsFilters', + 'ResourceGuard', + 'ResourceGuardOperation', + 'ResourceGuardResource', + 'ResourceGuardResourceList', + 'ResourceMoveDetails', + 'RestorableTimeRange', + 'RestoreFilesTargetInfo', + 'RestoreJobRecoveryPointDetails', + 'RestoreTargetInfo', + 'RestoreTargetInfoBase', + 'RetentionTag', + 'ScheduleBasedBackupCriteria', + 'ScheduleBasedTriggerContext', + 'SecretStoreBasedAuthCredentials', + 'SecretStoreResource', + 'SourceLifeCycle', + 'StorageSetting', + 'SupportedFeature', + 'SystemData', + 'TaggingCriteria', + 'TargetCopySetting', + 'TargetDetails', + 'TriggerBackupRequest', + 'TriggerContext', + 'UserFacingError', + 'ValidateForBackupRequest', + 'ValidateRestoreRequestObject', + 'AbsoluteMarker', + 'CreatedByType', + 'CurrentProtectionState', + 'DataStoreTypes', + 'DayOfWeek', + 'FeatureSupportStatus', + 'FeatureType', + 'Month', + 'ProvisioningState', + 'RecoveryOption', + 'RehydrationPriority', + 'RehydrationStatus', + 'ResourceMoveState', + 'RestoreSourceDataStoreType', + 'RestoreTargetLocationType', + 'SecretStoreType', + 'SourceDataStoreType', + 'Status', + 'StorageSettingStoreTypes', + 'StorageSettingTypes', + 'WeekNumber', +] diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_data_protection_client_enums.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_data_protection_client_enums.py new file mode 100644 index 000000000000..926803c67b2c --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_data_protection_client_enums.py @@ -0,0 +1,226 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AbsoluteMarker(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ALL_BACKUP = "AllBackup" + FIRST_OF_DAY = "FirstOfDay" + FIRST_OF_MONTH = "FirstOfMonth" + FIRST_OF_WEEK = "FirstOfWeek" + FIRST_OF_YEAR = "FirstOfYear" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class CurrentProtectionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the current protection state of the resource + """ + + INVALID = "Invalid" + NOT_PROTECTED = "NotProtected" + CONFIGURING_PROTECTION = "ConfiguringProtection" + PROTECTION_CONFIGURED = "ProtectionConfigured" + BACKUP_SCHEDULES_SUSPENDED = "BackupSchedulesSuspended" + RETENTION_SCHEDULES_SUSPENDED = "RetentionSchedulesSuspended" + PROTECTION_STOPPED = "ProtectionStopped" + PROTECTION_ERROR = "ProtectionError" + CONFIGURING_PROTECTION_FAILED = "ConfiguringProtectionFailed" + SOFT_DELETING = "SoftDeleting" + SOFT_DELETED = "SoftDeleted" + UPDATING_PROTECTION = "UpdatingProtection" + +class DataStoreTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """type of datastore; Operational/Vault/Archive + """ + + OPERATIONAL_STORE = "OperationalStore" + VAULT_STORE = "VaultStore" + ARCHIVE_STORE = "ArchiveStore" + +class DayOfWeek(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + FRIDAY = "Friday" + MONDAY = "Monday" + SATURDAY = "Saturday" + SUNDAY = "Sunday" + THURSDAY = "Thursday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + +class FeatureSupportStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """feature support status + """ + + INVALID = "Invalid" + NOT_SUPPORTED = "NotSupported" + ALPHA_PREVIEW = "AlphaPreview" + PRIVATE_PREVIEW = "PrivatePreview" + PUBLIC_PREVIEW = "PublicPreview" + GENERALLY_AVAILABLE = "GenerallyAvailable" + +class FeatureType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """backup support feature type. + """ + + INVALID = "Invalid" + DATA_SOURCE_TYPE = "DataSourceType" + +class Month(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + APRIL = "April" + AUGUST = "August" + DECEMBER = "December" + FEBRUARY = "February" + JANUARY = "January" + JULY = "July" + JUNE = "June" + MARCH = "March" + MAY = "May" + NOVEMBER = "November" + OCTOBER = "October" + SEPTEMBER = "September" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the BackupVault resource + """ + + FAILED = "Failed" + PROVISIONING = "Provisioning" + SUCCEEDED = "Succeeded" + UNKNOWN = "Unknown" + UPDATING = "Updating" + +class RecoveryOption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Recovery Option + """ + + FAIL_IF_EXISTS = "FailIfExists" + +class RehydrationPriority(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Priority to be used for rehydration. Values High or Standard + """ + + INVALID = "Invalid" + HIGH = "High" + STANDARD = "Standard" + +class RehydrationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + CREATE_IN_PROGRESS = "CREATE_IN_PROGRESS" + COMPLETED = "COMPLETED" + DELETE_IN_PROGRESS = "DELETE_IN_PROGRESS" + DELETED = "DELETED" + FAILED = "FAILED" + +class ResourceMoveState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Resource move state for backup vault + """ + + UNKNOWN = "Unknown" + IN_PROGRESS = "InProgress" + PREPARE_FAILED = "PrepareFailed" + COMMIT_FAILED = "CommitFailed" + FAILED = "Failed" + PREPARE_TIMEDOUT = "PrepareTimedout" + COMMIT_TIMEDOUT = "CommitTimedout" + CRITICAL_FAILURE = "CriticalFailure" + PARTIAL_SUCCESS = "PartialSuccess" + MOVE_SUCCEEDED = "MoveSucceeded" + +class RestoreSourceDataStoreType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type of the source data store. + """ + + OPERATIONAL_STORE = "OperationalStore" + VAULT_STORE = "VaultStore" + ARCHIVE_STORE = "ArchiveStore" + +class RestoreTargetLocationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Denotes the target location where the data will be restored, + string value for the enum + {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType} + """ + + INVALID = "Invalid" + AZURE_BLOBS = "AzureBlobs" + AZURE_FILES = "AzureFiles" + +class SecretStoreType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type of secret store + """ + + INVALID = "Invalid" + AZURE_KEY_VAULT = "AzureKeyVault" + +class SourceDataStoreType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type of the source data store. + """ + + ARCHIVE_STORE = "ArchiveStore" + SNAPSHOT_STORE = "SnapshotStore" + VAULT_STORE = "VaultStore" + +class Status(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the protection status of the resource + """ + + CONFIGURING_PROTECTION = "ConfiguringProtection" + CONFIGURING_PROTECTION_FAILED = "ConfiguringProtectionFailed" + PROTECTION_CONFIGURED = "ProtectionConfigured" + PROTECTION_STOPPED = "ProtectionStopped" + SOFT_DELETED = "SoftDeleted" + SOFT_DELETING = "SoftDeleting" + +class StorageSettingStoreTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type of the datastore. + """ + + ARCHIVE_STORE = "ArchiveStore" + SNAPSHOT_STORE = "SnapshotStore" + VAULT_STORE = "VaultStore" + +class StorageSettingTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gets or sets the type. + """ + + GEO_REDUNDANT = "GeoRedundant" + LOCALLY_REDUNDANT = "LocallyRedundant" + +class WeekNumber(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + FIRST = "First" + FOURTH = "Fourth" + LAST = "Last" + SECOND = "Second" + THIRD = "Third" diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_models.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_models.py new file mode 100644 index 000000000000..459c310a482e --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_models.py @@ -0,0 +1,4205 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 msrest.serialization + + +class DeleteOption(msrest.serialization.Model): + """Delete Option. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AbsoluteDeleteOption. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. Duration of deletion after given timespan. + :type duration: str + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'duration': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AbsoluteDeleteOption': 'AbsoluteDeleteOption'} + } + + def __init__( + self, + **kwargs + ): + super(DeleteOption, self).__init__(**kwargs) + self.duration = kwargs['duration'] + self.object_type = None # type: Optional[str] + + +class AbsoluteDeleteOption(DeleteOption): + """Delete option with duration. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. Duration of deletion after given timespan. + :type duration: str + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'duration': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AbsoluteDeleteOption, self).__init__(**kwargs) + self.object_type = 'AbsoluteDeleteOption' # type: str + + +class AdHocBackupRuleOptions(msrest.serialization.Model): + """Adhoc backup rules. + + All required parameters must be populated in order to send to Azure. + + :param rule_name: Required. + :type rule_name: str + :param trigger_option: Required. Adhoc backup trigger option. + :type trigger_option: ~azure.mgmt.dataprotection.models.AdhocBackupTriggerOption + """ + + _validation = { + 'rule_name': {'required': True}, + 'trigger_option': {'required': True}, + } + + _attribute_map = { + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + 'trigger_option': {'key': 'triggerOption', 'type': 'AdhocBackupTriggerOption'}, + } + + def __init__( + self, + **kwargs + ): + super(AdHocBackupRuleOptions, self).__init__(**kwargs) + self.rule_name = kwargs['rule_name'] + self.trigger_option = kwargs['trigger_option'] + + +class AdhocBackupTriggerOption(msrest.serialization.Model): + """Adhoc backup trigger option. + + :param retention_tag_override: + :type retention_tag_override: str + """ + + _attribute_map = { + 'retention_tag_override': {'key': 'retentionTagOverride', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdhocBackupTriggerOption, self).__init__(**kwargs) + self.retention_tag_override = kwargs.get('retention_tag_override', None) + + +class AdhocBasedTaggingCriteria(msrest.serialization.Model): + """Adhoc backup tagging criteria. + + :param tag_info: Retention tag information. + :type tag_info: ~azure.mgmt.dataprotection.models.RetentionTag + """ + + _attribute_map = { + 'tag_info': {'key': 'tagInfo', 'type': 'RetentionTag'}, + } + + def __init__( + self, + **kwargs + ): + super(AdhocBasedTaggingCriteria, self).__init__(**kwargs) + self.tag_info = kwargs.get('tag_info', None) + + +class TriggerContext(msrest.serialization.Model): + """Trigger context. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdhocBasedTriggerContext, ScheduleBasedTriggerContext. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AdhocBasedTriggerContext': 'AdhocBasedTriggerContext', 'ScheduleBasedTriggerContext': 'ScheduleBasedTriggerContext'} + } + + def __init__( + self, + **kwargs + ): + super(TriggerContext, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AdhocBasedTriggerContext(TriggerContext): + """Adhoc trigger context. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param tagging_criteria: Required. Tagging Criteria containing retention tag for adhoc backup. + :type tagging_criteria: ~azure.mgmt.dataprotection.models.AdhocBasedTaggingCriteria + """ + + _validation = { + 'object_type': {'required': True}, + 'tagging_criteria': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'tagging_criteria': {'key': 'taggingCriteria', 'type': 'AdhocBasedTaggingCriteria'}, + } + + def __init__( + self, + **kwargs + ): + super(AdhocBasedTriggerContext, self).__init__(**kwargs) + self.object_type = 'AdhocBasedTriggerContext' # type: str + self.tagging_criteria = kwargs['tagging_criteria'] + + +class AuthCredentials(msrest.serialization.Model): + """Base class for different types of authentication credentials. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecretStoreBasedAuthCredentials. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'SecretStoreBasedAuthCredentials': 'SecretStoreBasedAuthCredentials'} + } + + def __init__( + self, + **kwargs + ): + super(AuthCredentials, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupRecoveryPoint(msrest.serialization.Model): + """Azure backup recoveryPoint. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupDiscreteRecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupDiscreteRecoveryPoint': 'AzureBackupDiscreteRecoveryPoint'} + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPoint, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupDiscreteRecoveryPoint(AzureBackupRecoveryPoint): + """Azure backup discrete RecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param friendly_name: + :type friendly_name: str + :param recovery_point_data_stores_details: + :type recovery_point_data_stores_details: + list[~azure.mgmt.dataprotection.models.RecoveryPointDataStoreDetails] + :param recovery_point_time: Required. + :type recovery_point_time: ~datetime.datetime + :param policy_name: + :type policy_name: str + :param policy_version: + :type policy_version: str + :param recovery_point_id: + :type recovery_point_id: str + :param recovery_point_type: + :type recovery_point_type: str + :param retention_tag_name: + :type retention_tag_name: str + :param retention_tag_version: + :type retention_tag_version: str + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_point_time': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'recovery_point_data_stores_details': {'key': 'recoveryPointDataStoresDetails', 'type': '[RecoveryPointDataStoreDetails]'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'policy_version': {'key': 'policyVersion', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'retention_tag_name': {'key': 'retentionTagName', 'type': 'str'}, + 'retention_tag_version': {'key': 'retentionTagVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupDiscreteRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'AzureBackupDiscreteRecoveryPoint' # type: str + self.friendly_name = kwargs.get('friendly_name', None) + self.recovery_point_data_stores_details = kwargs.get('recovery_point_data_stores_details', None) + self.recovery_point_time = kwargs['recovery_point_time'] + self.policy_name = kwargs.get('policy_name', None) + self.policy_version = kwargs.get('policy_version', None) + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.recovery_point_type = kwargs.get('recovery_point_type', None) + self.retention_tag_name = kwargs.get('retention_tag_name', None) + self.retention_tag_version = kwargs.get('retention_tag_version', None) + + +class AzureBackupFindRestorableTimeRangesRequest(msrest.serialization.Model): + """List Restore Ranges Request. + + All required parameters must be populated in order to send to Azure. + + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "OperationalStore", "VaultStore", "ArchiveStore". + :type source_data_store_type: str or + ~azure.mgmt.dataprotection.models.RestoreSourceDataStoreType + :param start_time: Start time for the List Restore Ranges request. ISO 8601 format. + :type start_time: str + :param end_time: End time for the List Restore Ranges request. ISO 8601 format. + :type end_time: str + """ + + _validation = { + 'source_data_store_type': {'required': True}, + } + + _attribute_map = { + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesRequest, self).__init__(**kwargs) + self.source_data_store_type = kwargs['source_data_store_type'] + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + + +class DppWorkerRequest(msrest.serialization.Model): + """DppWorkerRequest. + + :param subscription_id: + :type subscription_id: str + :param uri: + :type uri: str + :param headers: Dictionary of + . + :type headers: dict[str, list[str]] + :param supported_group_versions: + :type supported_group_versions: list[str] + :param culture_info: + :type culture_info: str + :param parameters: Dictionary of :code:``. + :type parameters: dict[str, str] + :param http_method: + :type http_method: str + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'supported_group_versions': {'key': 'supportedGroupVersions', 'type': '[str]'}, + 'culture_info': {'key': 'cultureInfo', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppWorkerRequest, self).__init__(**kwargs) + self.subscription_id = kwargs.get('subscription_id', None) + self.uri = kwargs.get('uri', None) + self.headers = kwargs.get('headers', None) + self.supported_group_versions = kwargs.get('supported_group_versions', None) + self.culture_info = kwargs.get('culture_info', None) + self.parameters = kwargs.get('parameters', None) + self.http_method = kwargs.get('http_method', None) + + +class AzureBackupFindRestorableTimeRangesRequestResource(DppWorkerRequest): + """List Restore Ranges Request. + + :param subscription_id: + :type subscription_id: str + :param uri: + :type uri: str + :param headers: Dictionary of + . + :type headers: dict[str, list[str]] + :param supported_group_versions: + :type supported_group_versions: list[str] + :param culture_info: + :type culture_info: str + :param parameters: Dictionary of :code:``. + :type parameters: dict[str, str] + :param http_method: + :type http_method: str + :param content: AzureBackupFindRestorableTimeRangesRequestResource content. + :type content: ~azure.mgmt.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'supported_group_versions': {'key': 'supportedGroupVersions', 'type': '[str]'}, + 'culture_info': {'key': 'cultureInfo', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'AzureBackupFindRestorableTimeRangesRequest'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesRequestResource, self).__init__(**kwargs) + self.content = kwargs.get('content', None) + + +class AzureBackupFindRestorableTimeRangesResponse(msrest.serialization.Model): + """List Restore Ranges Response. + + :param restorable_time_ranges: Returns the Restore Ranges available on the Backup Instance. + :type restorable_time_ranges: list[~azure.mgmt.dataprotection.models.RestorableTimeRange] + :param object_type: + :type object_type: str + """ + + _attribute_map = { + 'restorable_time_ranges': {'key': 'restorableTimeRanges', 'type': '[RestorableTimeRange]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesResponse, self).__init__(**kwargs) + self.restorable_time_ranges = kwargs.get('restorable_time_ranges', None) + self.object_type = kwargs.get('object_type', None) + + +class DppResource(msrest.serialization.Model): + """Resource class. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(DppResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class AzureBackupFindRestorableTimeRangesResponseResource(DppResource): + """List Restore Ranges Response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: AzureBackupFindRestorableTimeRangesResponseResource properties. + :type properties: ~azure.mgmt.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupFindRestorableTimeRangesResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesResponseResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AzureBackupJob(msrest.serialization.Model): + """AzureBackup Job Class. + + 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 activity_id: Required. Job Activity Id. + :type activity_id: str + :param backup_instance_friendly_name: Required. Name of the Backup Instance. + :type backup_instance_friendly_name: str + :ivar backup_instance_id: ARM ID of the Backup Instance. + :vartype backup_instance_id: str + :param data_source_id: Required. ARM ID of the DataSource. + :type data_source_id: str + :param data_source_location: Required. Location of the DataSource. + :type data_source_location: str + :param data_source_name: Required. User Friendly Name of the DataSource. + :type data_source_name: str + :param data_source_set_name: Data Source Set Name of the DataSource. + :type data_source_set_name: str + :param data_source_type: Required. Type of DataSource. + :type data_source_type: str + :param duration: Total run time of the job. ISO 8601 format. + :type duration: str + :ivar end_time: EndTime of the job(in UTC). + :vartype end_time: ~datetime.datetime + :ivar error_details: A List, detailing the errors related to the job. + :vartype error_details: list[~azure.mgmt.dataprotection.models.UserFacingError] + :ivar extended_info: Extended Information about the job. + :vartype extended_info: ~azure.mgmt.dataprotection.models.JobExtendedInfo + :param is_user_triggered: Required. Indicated that whether the job is adhoc(true) or + scheduled(false). + :type is_user_triggered: bool + :param operation: Required. It indicates the type of Job i.e. Backup:full/log/diff + ;Restore:ALR/OLR; Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure. + :type operation: str + :param operation_category: Required. It indicates the type of Job i.e. + Backup/Restore/Tiering/Management. + :type operation_category: str + :ivar policy_id: ARM ID of the policy. + :vartype policy_id: str + :ivar policy_name: Name of the policy. + :vartype policy_name: str + :param progress_enabled: Required. Indicated whether progress is enabled for the job. + :type progress_enabled: bool + :ivar progress_url: Url which contains job's progress. + :vartype progress_url: str + :ivar restore_type: It indicates the sub type of operation i.e. in case of Restore it can be + ALR/OLR. + :vartype restore_type: str + :param source_resource_group: Required. Resource Group Name of the Datasource. + :type source_resource_group: str + :param source_subscription_id: Required. SubscriptionId corresponding to the DataSource. + :type source_subscription_id: str + :param start_time: Required. StartTime of the job(in UTC). + :type start_time: ~datetime.datetime + :param status: Required. Status of the job like + InProgress/Success/Failed/Cancelled/SuccessWithWarning. + :type status: str + :param subscription_id: Required. Subscription Id of the corresponding backup vault. + :type subscription_id: str + :param supported_actions: Required. List of supported actions. + :type supported_actions: list[str] + :param vault_name: Required. Name of the vault. + :type vault_name: str + :param etag: + :type etag: str + :param source_data_store_name: + :type source_data_store_name: str + :param destination_data_store_name: + :type destination_data_store_name: str + """ + + _validation = { + 'activity_id': {'required': True}, + 'backup_instance_friendly_name': {'required': True}, + 'backup_instance_id': {'readonly': True}, + 'data_source_id': {'required': True}, + 'data_source_location': {'required': True}, + 'data_source_name': {'required': True}, + 'data_source_type': {'required': True}, + 'end_time': {'readonly': True}, + 'error_details': {'readonly': True}, + 'extended_info': {'readonly': True}, + 'is_user_triggered': {'required': True}, + 'operation': {'required': True}, + 'operation_category': {'required': True}, + 'policy_id': {'readonly': True}, + 'policy_name': {'readonly': True}, + 'progress_enabled': {'required': True}, + 'progress_url': {'readonly': True}, + 'restore_type': {'readonly': True}, + 'source_resource_group': {'required': True}, + 'source_subscription_id': {'required': True}, + 'start_time': {'required': True}, + 'status': {'required': True}, + 'subscription_id': {'required': True}, + 'supported_actions': {'required': True}, + 'vault_name': {'required': True}, + } + + _attribute_map = { + 'activity_id': {'key': 'activityID', 'type': 'str'}, + 'backup_instance_friendly_name': {'key': 'backupInstanceFriendlyName', 'type': 'str'}, + 'backup_instance_id': {'key': 'backupInstanceId', 'type': 'str'}, + 'data_source_id': {'key': 'dataSourceId', 'type': 'str'}, + 'data_source_location': {'key': 'dataSourceLocation', 'type': 'str'}, + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'data_source_set_name': {'key': 'dataSourceSetName', 'type': 'str'}, + 'data_source_type': {'key': 'dataSourceType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error_details': {'key': 'errorDetails', 'type': '[UserFacingError]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'JobExtendedInfo'}, + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'operation_category': {'key': 'operationCategory', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'progress_enabled': {'key': 'progressEnabled', 'type': 'bool'}, + 'progress_url': {'key': 'progressUrl', 'type': 'str'}, + 'restore_type': {'key': 'restoreType', 'type': 'str'}, + 'source_resource_group': {'key': 'sourceResourceGroup', 'type': 'str'}, + 'source_subscription_id': {'key': 'sourceSubscriptionID', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'supported_actions': {'key': 'supportedActions', 'type': '[str]'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'source_data_store_name': {'key': 'sourceDataStoreName', 'type': 'str'}, + 'destination_data_store_name': {'key': 'destinationDataStoreName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupJob, self).__init__(**kwargs) + self.activity_id = kwargs['activity_id'] + self.backup_instance_friendly_name = kwargs['backup_instance_friendly_name'] + self.backup_instance_id = None + self.data_source_id = kwargs['data_source_id'] + self.data_source_location = kwargs['data_source_location'] + self.data_source_name = kwargs['data_source_name'] + self.data_source_set_name = kwargs.get('data_source_set_name', None) + self.data_source_type = kwargs['data_source_type'] + self.duration = kwargs.get('duration', None) + self.end_time = None + self.error_details = None + self.extended_info = None + self.is_user_triggered = kwargs['is_user_triggered'] + self.operation = kwargs['operation'] + self.operation_category = kwargs['operation_category'] + self.policy_id = None + self.policy_name = None + self.progress_enabled = kwargs['progress_enabled'] + self.progress_url = None + self.restore_type = None + self.source_resource_group = kwargs['source_resource_group'] + self.source_subscription_id = kwargs['source_subscription_id'] + self.start_time = kwargs['start_time'] + self.status = kwargs['status'] + self.subscription_id = kwargs['subscription_id'] + self.supported_actions = kwargs['supported_actions'] + self.vault_name = kwargs['vault_name'] + self.etag = kwargs.get('etag', None) + self.source_data_store_name = kwargs.get('source_data_store_name', None) + self.destination_data_store_name = kwargs.get('destination_data_store_name', None) + + +class AzureBackupJobResource(DppResource): + """AzureBackup Job Resource Class. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: AzureBackupJobResource properties. + :type properties: ~azure.mgmt.dataprotection.models.AzureBackupJob + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupJob'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupJobResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class DppResourceList(msrest.serialization.Model): + """ListResource. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppResourceList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + + +class AzureBackupJobResourceList(DppResourceList): + """List of AzureBackup Job resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.AzureBackupJobResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureBackupJobResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupJobResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BackupParameters(msrest.serialization.Model): + """BackupParameters base. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupParams. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupParams': 'AzureBackupParams'} + } + + def __init__( + self, + **kwargs + ): + super(BackupParameters, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupParams(BackupParameters): + """Azure backup parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param backup_type: Required. BackupType ; Full/Incremental etc. + :type backup_type: str + """ + + _validation = { + 'object_type': {'required': True}, + 'backup_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupParams, self).__init__(**kwargs) + self.object_type = 'AzureBackupParams' # type: str + self.backup_type = kwargs['backup_type'] + + +class AzureBackupRestoreRequest(msrest.serialization.Model): + """Azure backup restore request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRecoveryPointBasedRestoreRequest, AzureBackupRecoveryTimeBasedRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~azure.mgmt.dataprotection.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~azure.mgmt.dataprotection.models.SourceDataStoreType + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRecoveryPointBasedRestoreRequest': 'AzureBackupRecoveryPointBasedRestoreRequest', 'AzureBackupRecoveryTimeBasedRestoreRequest': 'AzureBackupRecoveryTimeBasedRestoreRequest'} + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRestoreRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.restore_target_info = kwargs['restore_target_info'] + self.source_data_store_type = kwargs['source_data_store_type'] + + +class AzureBackupRecoveryPointBasedRestoreRequest(AzureBackupRestoreRequest): + """Azure backup recoveryPoint based restore request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRestoreWithRehydrationRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~azure.mgmt.dataprotection.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~azure.mgmt.dataprotection.models.SourceDataStoreType + :param recovery_point_id: Required. + :type recovery_point_id: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_id': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRestoreWithRehydrationRequest': 'AzureBackupRestoreWithRehydrationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPointBasedRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureBackupRecoveryPointBasedRestoreRequest' # type: str + self.recovery_point_id = kwargs['recovery_point_id'] + + +class AzureBackupRecoveryPointResource(DppResource): + """Azure backup recoveryPoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: AzureBackupRecoveryPointResource properties. + :type properties: ~azure.mgmt.dataprotection.models.AzureBackupRecoveryPoint + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupRecoveryPoint'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPointResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class AzureBackupRecoveryPointResourceList(DppResourceList): + """Azure backup recoveryPoint resource list. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.AzureBackupRecoveryPointResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureBackupRecoveryPointResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPointResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class AzureBackupRecoveryTimeBasedRestoreRequest(AzureBackupRestoreRequest): + """AzureBackup RecoveryPointTime Based Restore Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~azure.mgmt.dataprotection.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~azure.mgmt.dataprotection.models.SourceDataStoreType + :param recovery_point_time: Required. The recovery time in ISO 8601 format example - + 2020-08-14T17:30:00.0000000Z. + :type recovery_point_time: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_time': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryTimeBasedRestoreRequest, self).__init__(**kwargs) + self.object_type = 'AzureBackupRecoveryTimeBasedRestoreRequest' # type: str + self.recovery_point_time = kwargs['recovery_point_time'] + + +class AzureBackupRehydrationRequest(msrest.serialization.Model): + """Azure Backup Rehydrate Request. + + All required parameters must be populated in order to send to Azure. + + :param recovery_point_id: Required. Id of the recovery point to be recovered. + :type recovery_point_id: str + :param rehydration_priority: Priority to be used for rehydration. Values High or Standard. + Possible values include: "Invalid", "High", "Standard". + :type rehydration_priority: str or ~azure.mgmt.dataprotection.models.RehydrationPriority + :param rehydration_retention_duration: Required. Retention duration in ISO 8601 format i.e P10D + . + :type rehydration_retention_duration: str + """ + + _validation = { + 'recovery_point_id': {'required': True}, + 'rehydration_retention_duration': {'required': True}, + } + + _attribute_map = { + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRehydrationRequest, self).__init__(**kwargs) + self.recovery_point_id = kwargs['recovery_point_id'] + self.rehydration_priority = kwargs.get('rehydration_priority', None) + self.rehydration_retention_duration = kwargs['rehydration_retention_duration'] + + +class AzureBackupRestoreWithRehydrationRequest(AzureBackupRecoveryPointBasedRestoreRequest): + """AzureBackup Restore with Rehydration Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~azure.mgmt.dataprotection.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~azure.mgmt.dataprotection.models.SourceDataStoreType + :param recovery_point_id: Required. + :type recovery_point_id: str + :param rehydration_priority: Required. Priority to be used for rehydration. Values High or + Standard. Possible values include: "Invalid", "High", "Standard". + :type rehydration_priority: str or ~azure.mgmt.dataprotection.models.RehydrationPriority + :param rehydration_retention_duration: Required. Retention duration in ISO 8601 format i.e P10D + . + :type rehydration_retention_duration: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_id': {'required': True}, + 'rehydration_priority': {'required': True}, + 'rehydration_retention_duration': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRestoreWithRehydrationRequest, self).__init__(**kwargs) + self.object_type = 'AzureBackupRestoreWithRehydrationRequest' # type: str + self.rehydration_priority = kwargs['rehydration_priority'] + self.rehydration_retention_duration = kwargs['rehydration_retention_duration'] + + +class BasePolicyRule(msrest.serialization.Model): + """BasePolicy Rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRule, AzureRetentionRule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRule': 'AzureBackupRule', 'AzureRetentionRule': 'AzureRetentionRule'} + } + + def __init__( + self, + **kwargs + ): + super(BasePolicyRule, self).__init__(**kwargs) + self.name = kwargs['name'] + self.object_type = None # type: Optional[str] + + +class AzureBackupRule(BasePolicyRule): + """Azure backup rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + :param backup_parameters: BackupParameters base. + :type backup_parameters: ~azure.mgmt.dataprotection.models.BackupParameters + :param data_store: Required. DataStoreInfo base. + :type data_store: ~azure.mgmt.dataprotection.models.DataStoreInfoBase + :param trigger: Required. Trigger context. + :type trigger: ~azure.mgmt.dataprotection.models.TriggerContext + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + 'data_store': {'required': True}, + 'trigger': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_parameters': {'key': 'backupParameters', 'type': 'BackupParameters'}, + 'data_store': {'key': 'dataStore', 'type': 'DataStoreInfoBase'}, + 'trigger': {'key': 'trigger', 'type': 'TriggerContext'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRule, self).__init__(**kwargs) + self.object_type = 'AzureBackupRule' # type: str + self.backup_parameters = kwargs.get('backup_parameters', None) + self.data_store = kwargs['data_store'] + self.trigger = kwargs['trigger'] + + +class DataStoreParameters(msrest.serialization.Model): + """Parameters for DataStore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureOperationalStoreParameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~azure.mgmt.dataprotection.models.DataStoreTypes + """ + + _validation = { + 'object_type': {'required': True}, + 'data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureOperationalStoreParameters': 'AzureOperationalStoreParameters'} + } + + def __init__( + self, + **kwargs + ): + super(DataStoreParameters, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.data_store_type = kwargs['data_store_type'] + + +class AzureOperationalStoreParameters(DataStoreParameters): + """Parameters for Operational-Tier DataStore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~azure.mgmt.dataprotection.models.DataStoreTypes + :param resource_group_id: Gets or sets the Snapshot Resource Group Uri. + :type resource_group_id: str + """ + + _validation = { + 'object_type': {'required': True}, + 'data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureOperationalStoreParameters, self).__init__(**kwargs) + self.object_type = 'AzureOperationalStoreParameters' # type: str + self.resource_group_id = kwargs.get('resource_group_id', None) + + +class AzureRetentionRule(BasePolicyRule): + """Azure retention rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + :param is_default: + :type is_default: bool + :param lifecycles: Required. + :type lifecycles: list[~azure.mgmt.dataprotection.models.SourceLifeCycle] + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + 'lifecycles': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'lifecycles': {'key': 'lifecycles', 'type': '[SourceLifeCycle]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureRetentionRule, self).__init__(**kwargs) + self.object_type = 'AzureRetentionRule' # type: str + self.is_default = kwargs.get('is_default', None) + self.lifecycles = kwargs['lifecycles'] + + +class BackupCriteria(msrest.serialization.Model): + """BackupCriteria base class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduleBasedBackupCriteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ScheduleBasedBackupCriteria': 'ScheduleBasedBackupCriteria'} + } + + def __init__( + self, + **kwargs + ): + super(BackupCriteria, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class BackupInstance(msrest.serialization.Model): + """Backup Instance. + + 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 friendly_name: Gets or sets the Backup Instance friendly name. + :type friendly_name: str + :param data_source_info: Required. Gets or sets the data source information. + :type data_source_info: ~azure.mgmt.dataprotection.models.Datasource + :param data_source_set_info: Gets or sets the data source set information. + :type data_source_set_info: ~azure.mgmt.dataprotection.models.DatasourceSet + :param policy_info: Required. Gets or sets the policy information. + :type policy_info: ~azure.mgmt.dataprotection.models.PolicyInfo + :ivar protection_status: Specifies the protection status of the resource. + :vartype protection_status: ~azure.mgmt.dataprotection.models.ProtectionStatusDetails + :ivar current_protection_state: Specifies the current protection state of the resource. + Possible values include: "Invalid", "NotProtected", "ConfiguringProtection", + "ProtectionConfigured", "BackupSchedulesSuspended", "RetentionSchedulesSuspended", + "ProtectionStopped", "ProtectionError", "ConfiguringProtectionFailed", "SoftDeleting", + "SoftDeleted", "UpdatingProtection". + :vartype current_protection_state: str or + ~azure.mgmt.dataprotection.models.CurrentProtectionState + :ivar protection_error_details: Specifies the protection error of the resource. + :vartype protection_error_details: ~azure.mgmt.dataprotection.models.UserFacingError + :ivar provisioning_state: Specifies the provisioning state of the resource i.e. + provisioning/updating/Succeeded/Failed. + :vartype provisioning_state: str + :param datasource_auth_credentials: Credentials to use to authenticate with data source + provider. + :type datasource_auth_credentials: ~azure.mgmt.dataprotection.models.AuthCredentials + :param object_type: Required. + :type object_type: str + """ + + _validation = { + 'data_source_info': {'required': True}, + 'policy_info': {'required': True}, + 'protection_status': {'readonly': True}, + 'current_protection_state': {'readonly': True}, + 'protection_error_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'data_source_info': {'key': 'dataSourceInfo', 'type': 'Datasource'}, + 'data_source_set_info': {'key': 'dataSourceSetInfo', 'type': 'DatasourceSet'}, + 'policy_info': {'key': 'policyInfo', 'type': 'PolicyInfo'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'ProtectionStatusDetails'}, + 'current_protection_state': {'key': 'currentProtectionState', 'type': 'str'}, + 'protection_error_details': {'key': 'protectionErrorDetails', 'type': 'UserFacingError'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'datasource_auth_credentials': {'key': 'datasourceAuthCredentials', 'type': 'AuthCredentials'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupInstance, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.data_source_info = kwargs['data_source_info'] + self.data_source_set_info = kwargs.get('data_source_set_info', None) + self.policy_info = kwargs['policy_info'] + self.protection_status = None + self.current_protection_state = None + self.protection_error_details = None + self.provisioning_state = None + self.datasource_auth_credentials = kwargs.get('datasource_auth_credentials', None) + self.object_type = kwargs['object_type'] + + +class BackupInstanceResource(DppResource): + """BackupInstance Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: BackupInstanceResource properties. + :type properties: ~azure.mgmt.dataprotection.models.BackupInstance + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BackupInstance'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupInstanceResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BackupInstanceResourceList(DppResourceList): + """BackupInstance Resource list response. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.BackupInstanceResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupInstanceResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupInstanceResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BaseBackupPolicy(msrest.serialization.Model): + """BackupPolicy base. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BackupPolicy. + + All required parameters must be populated in order to send to Azure. + + :param datasource_types: Required. Type of datasource for the backup management. + :type datasource_types: list[str] + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'datasource_types': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'datasource_types': {'key': 'datasourceTypes', 'type': '[str]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'BackupPolicy': 'BackupPolicy'} + } + + def __init__( + self, + **kwargs + ): + super(BaseBackupPolicy, self).__init__(**kwargs) + self.datasource_types = kwargs['datasource_types'] + self.object_type = None # type: Optional[str] + + +class BackupPolicy(BaseBackupPolicy): + """Rule based backup policy. + + All required parameters must be populated in order to send to Azure. + + :param datasource_types: Required. Type of datasource for the backup management. + :type datasource_types: list[str] + :param object_type: Required. Constant filled by server. + :type object_type: str + :param policy_rules: Required. Policy rule dictionary that contains rules for each backuptype + i.e Full/Incremental/Logs etc. + :type policy_rules: list[~azure.mgmt.dataprotection.models.BasePolicyRule] + """ + + _validation = { + 'datasource_types': {'required': True}, + 'object_type': {'required': True}, + 'policy_rules': {'required': True}, + } + + _attribute_map = { + 'datasource_types': {'key': 'datasourceTypes', 'type': '[str]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'policy_rules': {'key': 'policyRules', 'type': '[BasePolicyRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupPolicy, self).__init__(**kwargs) + self.object_type = 'BackupPolicy' # type: str + self.policy_rules = kwargs['policy_rules'] + + +class BackupSchedule(msrest.serialization.Model): + """Schedule for backup. + + All required parameters must be populated in order to send to Azure. + + :param repeating_time_intervals: Required. ISO 8601 repeating time interval format. + :type repeating_time_intervals: list[str] + :param time_zone: Time zone for a schedule. Example: Pacific Standard Time. + :type time_zone: str + """ + + _validation = { + 'repeating_time_intervals': {'required': True}, + } + + _attribute_map = { + 'repeating_time_intervals': {'key': 'repeatingTimeIntervals', 'type': '[str]'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupSchedule, self).__init__(**kwargs) + self.repeating_time_intervals = kwargs['repeating_time_intervals'] + self.time_zone = kwargs.get('time_zone', None) + + +class BackupVault(msrest.serialization.Model): + """Backup Vault. + + 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. + + :ivar provisioning_state: Provisioning state of the BackupVault resource. Possible values + include: "Failed", "Provisioning", "Succeeded", "Unknown", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.dataprotection.models.ProvisioningState + :ivar resource_move_state: Resource move state for backup vault. Possible values include: + "Unknown", "InProgress", "PrepareFailed", "CommitFailed", "Failed", "PrepareTimedout", + "CommitTimedout", "CriticalFailure", "PartialSuccess", "MoveSucceeded". + :vartype resource_move_state: str or ~azure.mgmt.dataprotection.models.ResourceMoveState + :ivar resource_move_details: Resource move details for backup vault. + :vartype resource_move_details: ~azure.mgmt.dataprotection.models.ResourceMoveDetails + :param storage_settings: Required. Storage Settings. + :type storage_settings: list[~azure.mgmt.dataprotection.models.StorageSetting] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'resource_move_state': {'readonly': True}, + 'resource_move_details': {'readonly': True}, + 'storage_settings': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'resource_move_state': {'key': 'resourceMoveState', 'type': 'str'}, + 'resource_move_details': {'key': 'resourceMoveDetails', 'type': 'ResourceMoveDetails'}, + 'storage_settings': {'key': 'storageSettings', 'type': '[StorageSetting]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupVault, self).__init__(**kwargs) + self.provisioning_state = None + self.resource_move_state = None + self.resource_move_details = None + self.storage_settings = kwargs['storage_settings'] + + +class DppTrackedResource(msrest.serialization.Model): + """DppTrackedResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~azure.mgmt.dataprotection.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(DppTrackedResource, self).__init__(**kwargs) + self.e_tag = kwargs.get('e_tag', None) + self.id = None + self.identity = kwargs.get('identity', None) + self.location = kwargs.get('location', None) + self.name = None + self.tags = kwargs.get('tags', None) + self.type = None + self.system_data = None + + +class BackupVaultResource(DppTrackedResource): + """Backup Vault Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~azure.mgmt.dataprotection.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: Required. BackupVaultResource properties. + :type properties: ~azure.mgmt.dataprotection.models.BackupVault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BackupVault'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupVaultResource, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class BackupVaultResourceList(DppResourceList): + """List of BackupVault resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.BackupVaultResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupVaultResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackupVaultResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BaseBackupPolicyResource(DppResource): + """BaseBackupPolicy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: BaseBackupPolicyResource properties. + :type properties: ~azure.mgmt.dataprotection.models.BaseBackupPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BaseBackupPolicy'}, + } + + def __init__( + self, + **kwargs + ): + super(BaseBackupPolicyResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class BaseBackupPolicyResourceList(DppResourceList): + """List of BaseBackupPolicy resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.BaseBackupPolicyResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BaseBackupPolicyResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(BaseBackupPolicyResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class CheckNameAvailabilityRequest(msrest.serialization.Model): + """CheckNameAvailability Request. + + :param name: Resource name for which availability needs to be checked. + :type name: str + :param type: Describes the Resource type: Microsoft.DataProtection/BackupVaults. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class CheckNameAvailabilityResult(msrest.serialization.Model): + """CheckNameAvailability Result. + + :param message: Gets or sets the message. + :type message: str + :param name_available: Gets or sets a value indicating whether [name available]. + :type name_available: bool + :param reason: Gets or sets the reason. + :type reason: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = kwargs.get('message', None) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + + +class ClientDiscoveryDisplay(msrest.serialization.Model): + """Localized display information of an operation. + + :param description: Description of the operation having details of what operation is about. + :type description: str + :param operation: Operations Name itself. + :type operation: str + :param provider: Name of the provider for display purposes. + :type provider: str + :param resource: ResourceType for which this Operation can be performed. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.operation = kwargs.get('operation', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + + +class ClientDiscoveryForLogSpecification(msrest.serialization.Model): + """Class to represent shoebox log specification in json client discovery. + + :param blob_duration: blob duration of shoebox log specification. + :type blob_duration: str + :param display_name: Localized display name. + :type display_name: str + :param name: Name for shoebox log specification. + :type name: str + """ + + _attribute_map = { + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.blob_duration = kwargs.get('blob_duration', None) + self.display_name = kwargs.get('display_name', None) + self.name = kwargs.get('name', None) + + +class ClientDiscoveryForProperties(msrest.serialization.Model): + """Class to represent shoebox properties in json client discovery. + + :param service_specification: Operation properties. + :type service_specification: + ~azure.mgmt.dataprotection.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class ClientDiscoveryForServiceSpecification(msrest.serialization.Model): + """Class to represent shoebox service specification in json client discovery. + + :param log_specifications: List of log specifications of this operation. + :type log_specifications: + list[~azure.mgmt.dataprotection.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + + +class ClientDiscoveryResponse(msrest.serialization.Model): + """Operations List response which contains list of available APIs. + + :param next_link: Link to the next chunk of Response. + :type next_link: str + :param value: List of available operations. + :type value: list[~azure.mgmt.dataprotection.models.ClientDiscoveryValueForSingleApi] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryResponse, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs.get('value', None) + + +class ClientDiscoveryValueForSingleApi(msrest.serialization.Model): + """Available operation details. + + :param display: Contains the localized display information for this particular operation. + :type display: ~azure.mgmt.dataprotection.models.ClientDiscoveryDisplay + :param name: Name of the Operation. + :type name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :param origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :type origin: str + :param properties: Properties for the given operation. + :type properties: ~azure.mgmt.dataprotection.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.display = kwargs.get('display', None) + self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class CopyOption(msrest.serialization.Model): + """Options to copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CopyOnExpiryOption, CustomCopyOption, ImmediateCopyOption. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'CopyOnExpiryOption': 'CopyOnExpiryOption', 'CustomCopyOption': 'CustomCopyOption', 'ImmediateCopyOption': 'ImmediateCopyOption'} + } + + def __init__( + self, + **kwargs + ): + super(CopyOption, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class CopyOnExpiryOption(CopyOption): + """Copy on Expiry Option. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyOnExpiryOption, self).__init__(**kwargs) + self.object_type = 'CopyOnExpiryOption' # type: str + + +class CustomCopyOption(CopyOption): + """Duration based custom options to copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param duration: Data copied after given timespan. + :type duration: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomCopyOption, self).__init__(**kwargs) + self.object_type = 'CustomCopyOption' # type: str + self.duration = kwargs.get('duration', None) + + +class Datasource(msrest.serialization.Model): + """Datasource to be backed up. + + All required parameters must be populated in order to send to Azure. + + :param datasource_type: DatasourceType of the resource. + :type datasource_type: str + :param object_type: Type of Datasource object, used to initialize the right inherited type. + :type object_type: str + :param resource_id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. + For non azure resources, this will be the ID created by backup service via Fabric/Vault. + :type resource_id: str + :param resource_location: Location of datasource. + :type resource_location: str + :param resource_name: Unique identifier of the resource in the context of parent. + :type resource_name: str + :param resource_type: Resource Type of Datasource. + :type resource_type: str + :param resource_uri: Uri of the resource. + :type resource_uri: str + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'resource_id': {'key': 'resourceID', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Datasource, self).__init__(**kwargs) + self.datasource_type = kwargs.get('datasource_type', None) + self.object_type = kwargs.get('object_type', None) + self.resource_id = kwargs['resource_id'] + self.resource_location = kwargs.get('resource_location', None) + self.resource_name = kwargs.get('resource_name', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_uri = kwargs.get('resource_uri', None) + + +class DatasourceSet(msrest.serialization.Model): + """DatasourceSet details of datasource to be backed up. + + All required parameters must be populated in order to send to Azure. + + :param datasource_type: DatasourceType of the resource. + :type datasource_type: str + :param object_type: Type of Datasource object, used to initialize the right inherited type. + :type object_type: str + :param resource_id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. + For non azure resources, this will be the ID created by backup service via Fabric/Vault. + :type resource_id: str + :param resource_location: Location of datasource. + :type resource_location: str + :param resource_name: Unique identifier of the resource in the context of parent. + :type resource_name: str + :param resource_type: Resource Type of Datasource. + :type resource_type: str + :param resource_uri: Uri of the resource. + :type resource_uri: str + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'resource_id': {'key': 'resourceID', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DatasourceSet, self).__init__(**kwargs) + self.datasource_type = kwargs.get('datasource_type', None) + self.object_type = kwargs.get('object_type', None) + self.resource_id = kwargs['resource_id'] + self.resource_location = kwargs.get('resource_location', None) + self.resource_name = kwargs.get('resource_name', None) + self.resource_type = kwargs.get('resource_type', None) + self.resource_uri = kwargs.get('resource_uri', None) + + +class DataStoreInfoBase(msrest.serialization.Model): + """DataStoreInfo base. + + All required parameters must be populated in order to send to Azure. + + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~azure.mgmt.dataprotection.models.DataStoreTypes + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type. + :type object_type: str + """ + + _validation = { + 'data_store_type': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataStoreInfoBase, self).__init__(**kwargs) + self.data_store_type = kwargs['data_store_type'] + self.object_type = kwargs['object_type'] + + +class Day(msrest.serialization.Model): + """Day of the week. + + :param date: Date of the month. + :type date: int + :param is_last: Whether Date is last date of month. + :type is_last: bool + """ + + _attribute_map = { + 'date': {'key': 'date', 'type': 'int'}, + 'is_last': {'key': 'isLast', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Day, self).__init__(**kwargs) + self.date = kwargs.get('date', None) + self.is_last = kwargs.get('is_last', None) + + +class DppBaseResource(msrest.serialization.Model): + """Base resource under Microsoft.DataProtection provider namespace. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppBaseResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DppBaseResourceList(msrest.serialization.Model): + """Base for all lists of V2 resources. + + :param value: List of Dpp resources. + :type value: list[~azure.mgmt.dataprotection.models.DppBaseResource] + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DppBaseResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppBaseResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class DppIdentityDetails(msrest.serialization.Model): + """Identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The object ID of the service principal object for the managed identity that + is used to grant role-based access to an Azure resource. + :vartype principal_id: str + :ivar tenant_id: A Globally Unique Identifier (GUID) that represents the Azure AD tenant where + the resource is now a member. + :vartype tenant_id: str + :param type: The identityType which can be either SystemAssigned or None. + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppIdentityDetails, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class DppTrackedResourceList(msrest.serialization.Model): + """DppTrackedResourceList. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppTrackedResourceList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + + +class Error(msrest.serialization.Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.dataprotection.models.ErrorAdditionalInfo] + :ivar code: The error code. + :vartype code: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.dataprotection.models.Error] + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + """ + + _validation = { + 'additional_info': {'readonly': True}, + 'code': {'readonly': True}, + 'details': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Error]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.additional_info = None + self.code = None + self.details = None + self.message = None + self.target = None + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar info: The additional info. + :vartype info: any + :ivar type: The additional info type. + :vartype type: str + """ + + _validation = { + 'info': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'info': {'key': 'info', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.info = None + self.type = None + + +class ExportJobsResult(msrest.serialization.Model): + """The result for export jobs containing blob details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar blob_url: URL of the blob into which the serialized string of list of jobs is exported. + :vartype blob_url: str + :ivar blob_sas_key: SAS key to access the blob. + :vartype blob_sas_key: str + :ivar excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. + :vartype excel_file_blob_url: str + :ivar excel_file_blob_sas_key: SAS key to access the ExcelFile blob. + :vartype excel_file_blob_sas_key: str + """ + + _validation = { + 'blob_url': {'readonly': True}, + 'blob_sas_key': {'readonly': True}, + 'excel_file_blob_url': {'readonly': True}, + 'excel_file_blob_sas_key': {'readonly': True}, + } + + _attribute_map = { + 'blob_url': {'key': 'blobUrl', 'type': 'str'}, + 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, + 'excel_file_blob_url': {'key': 'excelFileBlobUrl', 'type': 'str'}, + 'excel_file_blob_sas_key': {'key': 'excelFileBlobSasKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportJobsResult, self).__init__(**kwargs) + self.blob_url = None + self.blob_sas_key = None + self.excel_file_blob_url = None + self.excel_file_blob_sas_key = None + + +class FeatureValidationRequestBase(msrest.serialization.Model): + """Base class for Backup Feature support. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FeatureValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'FeatureValidationRequest': 'FeatureValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationRequestBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class FeatureValidationRequest(FeatureValidationRequestBase): + """Base class for feature object. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param feature_type: backup support feature type. Possible values include: "Invalid", + "DataSourceType". + :type feature_type: str or ~azure.mgmt.dataprotection.models.FeatureType + :param feature_name: backup support feature name. + :type feature_name: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'feature_name': {'key': 'featureName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationRequest, self).__init__(**kwargs) + self.object_type = 'FeatureValidationRequest' # type: str + self.feature_type = kwargs.get('feature_type', None) + self.feature_name = kwargs.get('feature_name', None) + + +class FeatureValidationResponseBase(msrest.serialization.Model): + """Base class for Backup Feature support. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FeatureValidationResponse. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'FeatureValidationResponse': 'FeatureValidationResponse'} + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationResponseBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class FeatureValidationResponse(FeatureValidationResponseBase): + """Feature Validation Response. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param feature_type: backup support feature type. Possible values include: "Invalid", + "DataSourceType". + :type feature_type: str or ~azure.mgmt.dataprotection.models.FeatureType + :param features: Response features. + :type features: list[~azure.mgmt.dataprotection.models.SupportedFeature] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'features': {'key': 'features', 'type': '[SupportedFeature]'}, + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationResponse, self).__init__(**kwargs) + self.object_type = 'FeatureValidationResponse' # type: str + self.feature_type = kwargs.get('feature_type', None) + self.features = kwargs.get('features', None) + + +class ImmediateCopyOption(CopyOption): + """Immediate copy Option. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImmediateCopyOption, self).__init__(**kwargs) + self.object_type = 'ImmediateCopyOption' # type: str + + +class InnerError(msrest.serialization.Model): + """Inner Error. + + :param additional_info: Any Key value pairs that can be provided to the client for additional + verbose information. + :type additional_info: dict[str, str] + :param code: Unique code for this error. + :type code: str + :param embedded_inner_error: Child Inner Error, to allow Nesting. + :type embedded_inner_error: ~azure.mgmt.dataprotection.models.InnerError + """ + + _attribute_map = { + 'additional_info': {'key': 'additionalInfo', 'type': '{str}'}, + 'code': {'key': 'code', 'type': 'str'}, + 'embedded_inner_error': {'key': 'embeddedInnerError', 'type': 'InnerError'}, + } + + def __init__( + self, + **kwargs + ): + super(InnerError, self).__init__(**kwargs) + self.additional_info = kwargs.get('additional_info', None) + self.code = kwargs.get('code', None) + self.embedded_inner_error = kwargs.get('embedded_inner_error', None) + + +class ItemLevelRestoreCriteria(msrest.serialization.Model): + """Class to contain criteria for item level restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RangeBasedItemLevelRestoreCriteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'RangeBasedItemLevelRestoreCriteria': 'RangeBasedItemLevelRestoreCriteria'} + } + + def __init__( + self, + **kwargs + ): + super(ItemLevelRestoreCriteria, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class RestoreTargetInfoBase(msrest.serialization.Model): + """Base class common to RestoreTargetInfo and RestoreFilesTargetInfo. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ItemLevelRestoreTargetInfo, RestoreFilesTargetInfo, RestoreTargetInfo. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~azure.mgmt.dataprotection.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ItemLevelRestoreTargetInfo': 'ItemLevelRestoreTargetInfo', 'RestoreFilesTargetInfo': 'RestoreFilesTargetInfo', 'RestoreTargetInfo': 'RestoreTargetInfo'} + } + + def __init__( + self, + **kwargs + ): + super(RestoreTargetInfoBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.recovery_option = kwargs['recovery_option'] + self.restore_location = kwargs.get('restore_location', None) + + +class ItemLevelRestoreTargetInfo(RestoreTargetInfoBase): + """Restore target info for Item level restore operation. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~azure.mgmt.dataprotection.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param restore_criteria: Required. Restore Criteria. + :type restore_criteria: list[~azure.mgmt.dataprotection.models.ItemLevelRestoreCriteria] + :param datasource_info: Required. Information of target DS. + :type datasource_info: ~azure.mgmt.dataprotection.models.Datasource + :param datasource_set_info: Information of target DS Set. + :type datasource_set_info: ~azure.mgmt.dataprotection.models.DatasourceSet + :param datasource_auth_credentials: Credentials to use to authenticate with data source + provider. + :type datasource_auth_credentials: ~azure.mgmt.dataprotection.models.AuthCredentials + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'restore_criteria': {'required': True}, + 'datasource_info': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'restore_criteria': {'key': 'restoreCriteria', 'type': '[ItemLevelRestoreCriteria]'}, + 'datasource_info': {'key': 'datasourceInfo', 'type': 'Datasource'}, + 'datasource_set_info': {'key': 'datasourceSetInfo', 'type': 'DatasourceSet'}, + 'datasource_auth_credentials': {'key': 'datasourceAuthCredentials', 'type': 'AuthCredentials'}, + } + + def __init__( + self, + **kwargs + ): + super(ItemLevelRestoreTargetInfo, self).__init__(**kwargs) + self.object_type = 'ItemLevelRestoreTargetInfo' # type: str + self.restore_criteria = kwargs['restore_criteria'] + self.datasource_info = kwargs['datasource_info'] + self.datasource_set_info = kwargs.get('datasource_set_info', None) + self.datasource_auth_credentials = kwargs.get('datasource_auth_credentials', None) + + +class JobExtendedInfo(msrest.serialization.Model): + """Extended Information about the job. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param additional_details: Job's Additional Details. + :type additional_details: dict[str, str] + :ivar backup_instance_state: State of the Backup Instance. + :vartype backup_instance_state: str + :ivar data_transferred_in_bytes: Number of bytes transferred. + :vartype data_transferred_in_bytes: float + :ivar recovery_destination: Destination where restore is done. + :vartype recovery_destination: str + :ivar source_recover_point: Details of the Source Recovery Point. + :vartype source_recover_point: ~azure.mgmt.dataprotection.models.RestoreJobRecoveryPointDetails + :ivar sub_tasks: List of Sub Tasks of the job. + :vartype sub_tasks: list[~azure.mgmt.dataprotection.models.JobSubTask] + :ivar target_recover_point: Details of the Target Recovery Point. + :vartype target_recover_point: ~azure.mgmt.dataprotection.models.RestoreJobRecoveryPointDetails + """ + + _validation = { + 'backup_instance_state': {'readonly': True}, + 'data_transferred_in_bytes': {'readonly': True}, + 'recovery_destination': {'readonly': True}, + 'source_recover_point': {'readonly': True}, + 'sub_tasks': {'readonly': True}, + 'target_recover_point': {'readonly': True}, + } + + _attribute_map = { + 'additional_details': {'key': 'additionalDetails', 'type': '{str}'}, + 'backup_instance_state': {'key': 'backupInstanceState', 'type': 'str'}, + 'data_transferred_in_bytes': {'key': 'dataTransferredInBytes', 'type': 'float'}, + 'recovery_destination': {'key': 'recoveryDestination', 'type': 'str'}, + 'source_recover_point': {'key': 'sourceRecoverPoint', 'type': 'RestoreJobRecoveryPointDetails'}, + 'sub_tasks': {'key': 'subTasks', 'type': '[JobSubTask]'}, + 'target_recover_point': {'key': 'targetRecoverPoint', 'type': 'RestoreJobRecoveryPointDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(JobExtendedInfo, self).__init__(**kwargs) + self.additional_details = kwargs.get('additional_details', None) + self.backup_instance_state = None + self.data_transferred_in_bytes = None + self.recovery_destination = None + self.source_recover_point = None + self.sub_tasks = None + self.target_recover_point = None + + +class JobSubTask(msrest.serialization.Model): + """Details of Job's Sub Task. + + 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 additional_details: Additional details of Sub Tasks. + :type additional_details: dict[str, str] + :param task_id: Required. Task Id of the Sub Task. + :type task_id: int + :param task_name: Required. Name of the Sub Task. + :type task_name: str + :ivar task_progress: Progress of the Sub Task. + :vartype task_progress: str + :param task_status: Required. Status of the Sub Task. + :type task_status: str + """ + + _validation = { + 'task_id': {'required': True}, + 'task_name': {'required': True}, + 'task_progress': {'readonly': True}, + 'task_status': {'required': True}, + } + + _attribute_map = { + 'additional_details': {'key': 'additionalDetails', 'type': '{str}'}, + 'task_id': {'key': 'taskId', 'type': 'int'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'task_progress': {'key': 'taskProgress', 'type': 'str'}, + 'task_status': {'key': 'taskStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(JobSubTask, self).__init__(**kwargs) + self.additional_details = kwargs.get('additional_details', None) + self.task_id = kwargs['task_id'] + self.task_name = kwargs['task_name'] + self.task_progress = None + self.task_status = kwargs['task_status'] + + +class OperationExtendedInfo(msrest.serialization.Model): + """Operation Extended Info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OperationJobExtendedInfo. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. This property will be used as the discriminator for deciding the + specific types in the polymorphic chain of types.Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'OperationJobExtendedInfo': 'OperationJobExtendedInfo'} + } + + def __init__( + self, + **kwargs + ): + super(OperationExtendedInfo, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class OperationJobExtendedInfo(OperationExtendedInfo): + """Operation Job Extended Info. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. This property will be used as the discriminator for deciding the + specific types in the polymorphic chain of types.Constant filled by server. + :type object_type: str + :param job_id: Arm Id of the job created for this operation. + :type job_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationJobExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationJobExtendedInfo' # type: str + self.job_id = kwargs.get('job_id', None) + + +class OperationResource(msrest.serialization.Model): + """Operation Resource. + + :param end_time: End time of the operation. + :type end_time: ~datetime.datetime + :param error: Required if status == failed or status == canceled. This is the OData v4 error + format, used by the RPC and will go into the v2.2 Azure REST API guidelines. + The full set of optional properties (e.g. inner errors / details) can be found in the "Error + Response" section. + :type error: ~azure.mgmt.dataprotection.models.Error + :param id: It should match what is used to GET the operation result. + :type id: str + :param name: It must match the last segment of the "id" field, and will typically be a GUID / + system generated value. + :type name: str + :param properties: End time of the operation. + :type properties: ~azure.mgmt.dataprotection.models.OperationExtendedInfo + :param start_time: Start time of the operation. + :type start_time: ~datetime.datetime + :param status: + :type status: str + """ + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationExtendedInfo'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationResource, self).__init__(**kwargs) + self.end_time = kwargs.get('end_time', None) + self.error = kwargs.get('error', None) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.properties = kwargs.get('properties', None) + self.start_time = kwargs.get('start_time', None) + self.status = kwargs.get('status', None) + + +class PatchResourceRequestInput(msrest.serialization.Model): + """Patch Request content for Microsoft.DataProtection resources. + + :param identity: Input Managed Identity Details. + :type identity: ~azure.mgmt.dataprotection.models.DppIdentityDetails + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(PatchResourceRequestInput, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.tags = kwargs.get('tags', None) + + +class PolicyInfo(msrest.serialization.Model): + """Policy Info in backupInstance. + + 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 policy_id: Required. + :type policy_id: str + :ivar policy_version: + :vartype policy_version: str + :param policy_parameters: Policy parameters for the backup instance. + :type policy_parameters: ~azure.mgmt.dataprotection.models.PolicyParameters + """ + + _validation = { + 'policy_id': {'required': True}, + 'policy_version': {'readonly': True}, + } + + _attribute_map = { + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'policy_version': {'key': 'policyVersion', 'type': 'str'}, + 'policy_parameters': {'key': 'policyParameters', 'type': 'PolicyParameters'}, + } + + def __init__( + self, + **kwargs + ): + super(PolicyInfo, self).__init__(**kwargs) + self.policy_id = kwargs['policy_id'] + self.policy_version = None + self.policy_parameters = kwargs.get('policy_parameters', None) + + +class PolicyParameters(msrest.serialization.Model): + """Parameters in Policy. + + :param data_store_parameters_list: Gets or sets the DataStore Parameters. + :type data_store_parameters_list: list[~azure.mgmt.dataprotection.models.DataStoreParameters] + """ + + _attribute_map = { + 'data_store_parameters_list': {'key': 'dataStoreParametersList', 'type': '[DataStoreParameters]'}, + } + + def __init__( + self, + **kwargs + ): + super(PolicyParameters, self).__init__(**kwargs) + self.data_store_parameters_list = kwargs.get('data_store_parameters_list', None) + + +class ProtectionStatusDetails(msrest.serialization.Model): + """Protection status details. + + :param error_details: Specifies the protection status error of the resource. + :type error_details: ~azure.mgmt.dataprotection.models.UserFacingError + :param status: Specifies the protection status of the resource. Possible values include: + "ConfiguringProtection", "ConfiguringProtectionFailed", "ProtectionConfigured", + "ProtectionStopped", "SoftDeleted", "SoftDeleting". + :type status: str or ~azure.mgmt.dataprotection.models.Status + """ + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': 'UserFacingError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProtectionStatusDetails, self).__init__(**kwargs) + self.error_details = kwargs.get('error_details', None) + self.status = kwargs.get('status', None) + + +class RangeBasedItemLevelRestoreCriteria(ItemLevelRestoreCriteria): + """Item Level target info for restore operation. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param min_matching_value: minimum value for range prefix match. + :type min_matching_value: str + :param max_matching_value: maximum value for range prefix match. + :type max_matching_value: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'min_matching_value': {'key': 'minMatchingValue', 'type': 'str'}, + 'max_matching_value': {'key': 'maxMatchingValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RangeBasedItemLevelRestoreCriteria, self).__init__(**kwargs) + self.object_type = 'RangeBasedItemLevelRestoreCriteria' # type: str + self.min_matching_value = kwargs.get('min_matching_value', None) + self.max_matching_value = kwargs.get('max_matching_value', None) + + +class RecoveryPointDataStoreDetails(msrest.serialization.Model): + """RecoveryPoint datastore details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param creation_time: + :type creation_time: ~datetime.datetime + :param expiry_time: + :type expiry_time: ~datetime.datetime + :param id: + :type id: str + :param meta_data: + :type meta_data: str + :param state: + :type state: str + :param type: + :type type: str + :param visible: + :type visible: bool + :ivar rehydration_expiry_time: + :vartype rehydration_expiry_time: ~datetime.datetime + :ivar rehydration_status: Possible values include: "CREATE_IN_PROGRESS", "COMPLETED", + "DELETE_IN_PROGRESS", "DELETED", "FAILED". + :vartype rehydration_status: str or ~azure.mgmt.dataprotection.models.RehydrationStatus + """ + + _validation = { + 'rehydration_expiry_time': {'readonly': True}, + 'rehydration_status': {'readonly': True}, + } + + _attribute_map = { + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'meta_data': {'key': 'metaData', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'visible': {'key': 'visible', 'type': 'bool'}, + 'rehydration_expiry_time': {'key': 'rehydrationExpiryTime', 'type': 'iso-8601'}, + 'rehydration_status': {'key': 'rehydrationStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoveryPointDataStoreDetails, self).__init__(**kwargs) + self.creation_time = kwargs.get('creation_time', None) + self.expiry_time = kwargs.get('expiry_time', None) + self.id = kwargs.get('id', None) + self.meta_data = kwargs.get('meta_data', None) + self.state = kwargs.get('state', None) + self.type = kwargs.get('type', None) + self.visible = kwargs.get('visible', None) + self.rehydration_expiry_time = None + self.rehydration_status = None + + +class RecoveryPointsFilters(msrest.serialization.Model): + """RecoveryPointsFilters. + + :param restore_point_data_store_id: + :type restore_point_data_store_id: str + :param is_visible: + :type is_visible: bool + :param start_date: + :type start_date: str + :param end_date: + :type end_date: str + :param extended_info: + :type extended_info: bool + :param restore_point_state: + :type restore_point_state: str + """ + + _attribute_map = { + 'restore_point_data_store_id': {'key': 'restorePointDataStoreId', 'type': 'str'}, + 'is_visible': {'key': 'isVisible', 'type': 'bool'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + 'restore_point_state': {'key': 'restorePointState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RecoveryPointsFilters, self).__init__(**kwargs) + self.restore_point_data_store_id = kwargs.get('restore_point_data_store_id', None) + self.is_visible = kwargs.get('is_visible', None) + self.start_date = kwargs.get('start_date', None) + self.end_date = kwargs.get('end_date', None) + self.extended_info = kwargs.get('extended_info', None) + self.restore_point_state = kwargs.get('restore_point_state', None) + + +class ResourceGuard(msrest.serialization.Model): + """ResourceGuard. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: Provisioning state of the BackupVault resource. Possible values + include: "Failed", "Provisioning", "Succeeded", "Unknown", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.dataprotection.models.ProvisioningState + :ivar allow_auto_approvals: This flag indicates whether auto approval is allowed or not. + :vartype allow_auto_approvals: bool + :ivar resource_guard_operations: {readonly} List of operation details those are protected by + the ResourceGuard resource. + :vartype resource_guard_operations: + list[~azure.mgmt.dataprotection.models.ResourceGuardOperation] + :ivar vault_critical_operation_exclusion_list: List of critical operations which are not + protected by this resourceGuard. + :vartype vault_critical_operation_exclusion_list: list[str] + :ivar description: Description about the pre-req steps to perform all the critical operations. + :vartype description: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'allow_auto_approvals': {'readonly': True}, + 'resource_guard_operations': {'readonly': True}, + 'vault_critical_operation_exclusion_list': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'allow_auto_approvals': {'key': 'allowAutoApprovals', 'type': 'bool'}, + 'resource_guard_operations': {'key': 'resourceGuardOperations', 'type': '[ResourceGuardOperation]'}, + 'vault_critical_operation_exclusion_list': {'key': 'vaultCriticalOperationExclusionList', 'type': '[str]'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuard, self).__init__(**kwargs) + self.provisioning_state = None + self.allow_auto_approvals = None + self.resource_guard_operations = None + self.vault_critical_operation_exclusion_list = None + self.description = None + + +class ResourceGuardOperation(msrest.serialization.Model): + """This class contains all the details about a critical operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vault_critical_operation: Name of the critical operation. + :vartype vault_critical_operation: str + :ivar request_resource_type: Type of resource request. + :vartype request_resource_type: str + """ + + _validation = { + 'vault_critical_operation': {'readonly': True}, + 'request_resource_type': {'readonly': True}, + } + + _attribute_map = { + 'vault_critical_operation': {'key': 'vaultCriticalOperation', 'type': 'str'}, + 'request_resource_type': {'key': 'requestResourceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuardOperation, self).__init__(**kwargs) + self.vault_critical_operation = None + self.request_resource_type = None + + +class ResourceGuardResource(DppTrackedResource): + """ResourceGuardResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~azure.mgmt.dataprotection.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: ResourceGuardResource properties. + :type properties: ~azure.mgmt.dataprotection.models.ResourceGuard + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ResourceGuard'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuardResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ResourceGuardResourceList(DppTrackedResourceList): + """List of ResourceGuard resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.ResourceGuardResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ResourceGuardResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuardResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ResourceMoveDetails(msrest.serialization.Model): + """ResourceMoveDetails will be returned in response to GetResource call from ARM. + + :param operation_id: CorrelationId of latest ResourceMove operation attempted. + :type operation_id: str + :param start_time_utc: Start time in UTC of latest ResourceMove operation attempted. ISO 8601 + format. + :type start_time_utc: str + :param completion_time_utc: Completion time in UTC of latest ResourceMove operation attempted. + ISO 8601 format. + :type completion_time_utc: str + :param source_resource_path: ARM resource path of source resource. + :type source_resource_path: str + :param target_resource_path: ARM resource path of target resource used in latest ResourceMove + operation. + :type target_resource_path: str + """ + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'str'}, + 'completion_time_utc': {'key': 'completionTimeUtc', 'type': 'str'}, + 'source_resource_path': {'key': 'sourceResourcePath', 'type': 'str'}, + 'target_resource_path': {'key': 'targetResourcePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceMoveDetails, self).__init__(**kwargs) + self.operation_id = kwargs.get('operation_id', None) + self.start_time_utc = kwargs.get('start_time_utc', None) + self.completion_time_utc = kwargs.get('completion_time_utc', None) + self.source_resource_path = kwargs.get('source_resource_path', None) + self.target_resource_path = kwargs.get('target_resource_path', None) + + +class RestorableTimeRange(msrest.serialization.Model): + """RestorableTimeRange. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Start time for the available restore range. + :type start_time: str + :param end_time: Required. End time for the available restore range. + :type end_time: str + :param object_type: + :type object_type: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RestorableTimeRange, self).__init__(**kwargs) + self.start_time = kwargs['start_time'] + self.end_time = kwargs['end_time'] + self.object_type = kwargs.get('object_type', None) + + +class RestoreFilesTargetInfo(RestoreTargetInfoBase): + """Class encapsulating restore as files target parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~azure.mgmt.dataprotection.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param target_details: Required. Destination of RestoreAsFiles operation, when destination is + not a datasource. + :type target_details: ~azure.mgmt.dataprotection.models.TargetDetails + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'target_details': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreFilesTargetInfo, self).__init__(**kwargs) + self.object_type = 'RestoreFilesTargetInfo' # type: str + self.target_details = kwargs['target_details'] + + +class RestoreJobRecoveryPointDetails(msrest.serialization.Model): + """RestoreJobRecoveryPointDetails. + + :param recovery_point_id: + :type recovery_point_id: str + :param recovery_point_time: + :type recovery_point_time: ~datetime.datetime + """ + + _attribute_map = { + 'recovery_point_id': {'key': 'recoveryPointID', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreJobRecoveryPointDetails, self).__init__(**kwargs) + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.recovery_point_time = kwargs.get('recovery_point_time', None) + + +class RestoreTargetInfo(RestoreTargetInfoBase): + """Class encapsulating restore target parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~azure.mgmt.dataprotection.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param datasource_info: Required. Information of target DS. + :type datasource_info: ~azure.mgmt.dataprotection.models.Datasource + :param datasource_set_info: Information of target DS Set. + :type datasource_set_info: ~azure.mgmt.dataprotection.models.DatasourceSet + :param datasource_auth_credentials: Credentials to use to authenticate with data source + provider. + :type datasource_auth_credentials: ~azure.mgmt.dataprotection.models.AuthCredentials + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'datasource_info': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'datasource_info': {'key': 'datasourceInfo', 'type': 'Datasource'}, + 'datasource_set_info': {'key': 'datasourceSetInfo', 'type': 'DatasourceSet'}, + 'datasource_auth_credentials': {'key': 'datasourceAuthCredentials', 'type': 'AuthCredentials'}, + } + + def __init__( + self, + **kwargs + ): + super(RestoreTargetInfo, self).__init__(**kwargs) + self.object_type = 'RestoreTargetInfo' # type: str + self.datasource_info = kwargs['datasource_info'] + self.datasource_set_info = kwargs.get('datasource_set_info', None) + self.datasource_auth_credentials = kwargs.get('datasource_auth_credentials', None) + + +class RetentionTag(msrest.serialization.Model): + """Retention tag. + + 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. + + :ivar e_tag: Retention Tag version. + :vartype e_tag: str + :ivar id: Retention Tag version. + :vartype id: str + :param tag_name: Required. Retention Tag Name to relate it to retention rule. + :type tag_name: str + """ + + _validation = { + 'e_tag': {'readonly': True}, + 'id': {'readonly': True}, + 'tag_name': {'required': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'tag_name': {'key': 'tagName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RetentionTag, self).__init__(**kwargs) + self.e_tag = None + self.id = None + self.tag_name = kwargs['tag_name'] + + +class ScheduleBasedBackupCriteria(BackupCriteria): + """Schedule based backup criteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param absolute_criteria: it contains absolute values like "AllBackup" / "FirstOfDay" / + "FirstOfWeek" / "FirstOfMonth" + and should be part of AbsoluteMarker enum. + :type absolute_criteria: list[str or ~azure.mgmt.dataprotection.models.AbsoluteMarker] + :param days_of_month: This is day of the month from 1 to 28 other wise last of month. + :type days_of_month: list[~azure.mgmt.dataprotection.models.Day] + :param days_of_the_week: It should be Sunday/Monday/T..../Saturday. + :type days_of_the_week: list[str or ~azure.mgmt.dataprotection.models.DayOfWeek] + :param months_of_year: It should be January/February/....../December. + :type months_of_year: list[str or ~azure.mgmt.dataprotection.models.Month] + :param schedule_times: List of schedule times for backup. + :type schedule_times: list[~datetime.datetime] + :param weeks_of_the_month: It should be First/Second/Third/Fourth/Last. + :type weeks_of_the_month: list[str or ~azure.mgmt.dataprotection.models.WeekNumber] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'absolute_criteria': {'key': 'absoluteCriteria', 'type': '[str]'}, + 'days_of_month': {'key': 'daysOfMonth', 'type': '[Day]'}, + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, + 'months_of_year': {'key': 'monthsOfYear', 'type': '[str]'}, + 'schedule_times': {'key': 'scheduleTimes', 'type': '[iso-8601]'}, + 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleBasedBackupCriteria, self).__init__(**kwargs) + self.object_type = 'ScheduleBasedBackupCriteria' # type: str + self.absolute_criteria = kwargs.get('absolute_criteria', None) + self.days_of_month = kwargs.get('days_of_month', None) + self.days_of_the_week = kwargs.get('days_of_the_week', None) + self.months_of_year = kwargs.get('months_of_year', None) + self.schedule_times = kwargs.get('schedule_times', None) + self.weeks_of_the_month = kwargs.get('weeks_of_the_month', None) + + +class ScheduleBasedTriggerContext(TriggerContext): + """Schedule based trigger context. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param schedule: Required. Schedule for this backup. + :type schedule: ~azure.mgmt.dataprotection.models.BackupSchedule + :param tagging_criteria: Required. List of tags that can be applicable for given schedule. + :type tagging_criteria: list[~azure.mgmt.dataprotection.models.TaggingCriteria] + """ + + _validation = { + 'object_type': {'required': True}, + 'schedule': {'required': True}, + 'tagging_criteria': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'BackupSchedule'}, + 'tagging_criteria': {'key': 'taggingCriteria', 'type': '[TaggingCriteria]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScheduleBasedTriggerContext, self).__init__(**kwargs) + self.object_type = 'ScheduleBasedTriggerContext' # type: str + self.schedule = kwargs['schedule'] + self.tagging_criteria = kwargs['tagging_criteria'] + + +class SecretStoreBasedAuthCredentials(AuthCredentials): + """Secret store based authentication credentials. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param secret_store_resource: Secret store resource. + :type secret_store_resource: ~azure.mgmt.dataprotection.models.SecretStoreResource + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'secret_store_resource': {'key': 'secretStoreResource', 'type': 'SecretStoreResource'}, + } + + def __init__( + self, + **kwargs + ): + super(SecretStoreBasedAuthCredentials, self).__init__(**kwargs) + self.object_type = 'SecretStoreBasedAuthCredentials' # type: str + self.secret_store_resource = kwargs.get('secret_store_resource', None) + + +class SecretStoreResource(msrest.serialization.Model): + """Class representing a secret store resource. + + All required parameters must be populated in order to send to Azure. + + :param uri: Uri to get to the resource. + :type uri: str + :param secret_store_type: Required. Gets or sets the type of secret store. Possible values + include: "Invalid", "AzureKeyVault". + :type secret_store_type: str or ~azure.mgmt.dataprotection.models.SecretStoreType + """ + + _validation = { + 'secret_store_type': {'required': True}, + } + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'secret_store_type': {'key': 'secretStoreType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecretStoreResource, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + self.secret_store_type = kwargs['secret_store_type'] + + +class SourceLifeCycle(msrest.serialization.Model): + """Source LifeCycle. + + All required parameters must be populated in order to send to Azure. + + :param delete_after: Required. Delete Option. + :type delete_after: ~azure.mgmt.dataprotection.models.DeleteOption + :param source_data_store: Required. DataStoreInfo base. + :type source_data_store: ~azure.mgmt.dataprotection.models.DataStoreInfoBase + :param target_data_store_copy_settings: + :type target_data_store_copy_settings: + list[~azure.mgmt.dataprotection.models.TargetCopySetting] + """ + + _validation = { + 'delete_after': {'required': True}, + 'source_data_store': {'required': True}, + } + + _attribute_map = { + 'delete_after': {'key': 'deleteAfter', 'type': 'DeleteOption'}, + 'source_data_store': {'key': 'sourceDataStore', 'type': 'DataStoreInfoBase'}, + 'target_data_store_copy_settings': {'key': 'targetDataStoreCopySettings', 'type': '[TargetCopySetting]'}, + } + + def __init__( + self, + **kwargs + ): + super(SourceLifeCycle, self).__init__(**kwargs) + self.delete_after = kwargs['delete_after'] + self.source_data_store = kwargs['source_data_store'] + self.target_data_store_copy_settings = kwargs.get('target_data_store_copy_settings', None) + + +class StorageSetting(msrest.serialization.Model): + """Storage setting. + + :param datastore_type: Gets or sets the type of the datastore. Possible values include: + "ArchiveStore", "SnapshotStore", "VaultStore". + :type datastore_type: str or ~azure.mgmt.dataprotection.models.StorageSettingStoreTypes + :param type: Gets or sets the type. Possible values include: "GeoRedundant", + "LocallyRedundant". + :type type: str or ~azure.mgmt.dataprotection.models.StorageSettingTypes + """ + + _attribute_map = { + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StorageSetting, self).__init__(**kwargs) + self.datastore_type = kwargs.get('datastore_type', None) + self.type = kwargs.get('type', None) + + +class SupportedFeature(msrest.serialization.Model): + """Elements class for feature request. + + :param feature_name: support feature type. + :type feature_name: str + :param support_status: feature support status. Possible values include: "Invalid", + "NotSupported", "AlphaPreview", "PrivatePreview", "PublicPreview", "GenerallyAvailable". + :type support_status: str or ~azure.mgmt.dataprotection.models.FeatureSupportStatus + :param exposure_controlled_features: support feature type. + :type exposure_controlled_features: list[str] + """ + + _attribute_map = { + 'feature_name': {'key': 'featureName', 'type': 'str'}, + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + 'exposure_controlled_features': {'key': 'exposureControlledFeatures', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SupportedFeature, self).__init__(**kwargs) + self.feature_name = kwargs.get('feature_name', None) + self.support_status = kwargs.get('support_status', None) + self.exposure_controlled_features = kwargs.get('exposure_controlled_features', None) + + +class SystemData(msrest.serialization.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.dataprotection.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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.dataprotection.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 TaggingCriteria(msrest.serialization.Model): + """Tagging criteria. + + All required parameters must be populated in order to send to Azure. + + :param criteria: Criteria which decides whether the tag can be applied to a triggered backup. + :type criteria: list[~azure.mgmt.dataprotection.models.BackupCriteria] + :param is_default: Required. Specifies if tag is default. + :type is_default: bool + :param tagging_priority: Required. Retention Tag priority. + :type tagging_priority: long + :param tag_info: Required. Retention tag information. + :type tag_info: ~azure.mgmt.dataprotection.models.RetentionTag + """ + + _validation = { + 'is_default': {'required': True}, + 'tagging_priority': {'required': True}, + 'tag_info': {'required': True}, + } + + _attribute_map = { + 'criteria': {'key': 'criteria', 'type': '[BackupCriteria]'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'tagging_priority': {'key': 'taggingPriority', 'type': 'long'}, + 'tag_info': {'key': 'tagInfo', 'type': 'RetentionTag'}, + } + + def __init__( + self, + **kwargs + ): + super(TaggingCriteria, self).__init__(**kwargs) + self.criteria = kwargs.get('criteria', None) + self.is_default = kwargs['is_default'] + self.tagging_priority = kwargs['tagging_priority'] + self.tag_info = kwargs['tag_info'] + + +class TargetCopySetting(msrest.serialization.Model): + """Target copy settings. + + All required parameters must be populated in order to send to Azure. + + :param copy_after: Required. It can be CustomCopyOption or ImmediateCopyOption. + :type copy_after: ~azure.mgmt.dataprotection.models.CopyOption + :param data_store: Required. Info of target datastore. + :type data_store: ~azure.mgmt.dataprotection.models.DataStoreInfoBase + """ + + _validation = { + 'copy_after': {'required': True}, + 'data_store': {'required': True}, + } + + _attribute_map = { + 'copy_after': {'key': 'copyAfter', 'type': 'CopyOption'}, + 'data_store': {'key': 'dataStore', 'type': 'DataStoreInfoBase'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetCopySetting, self).__init__(**kwargs) + self.copy_after = kwargs['copy_after'] + self.data_store = kwargs['data_store'] + + +class TargetDetails(msrest.serialization.Model): + """Class encapsulating target details, used where the destination is not a datasource. + + All required parameters must be populated in order to send to Azure. + + :param file_prefix: Required. Restore operation may create multiple files inside location + pointed by Url + Below will be the common prefix for all of them. + :type file_prefix: str + :param restore_target_location_type: Required. Denotes the target location where the data will + be restored, + string value for the enum + {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. + Possible values include: "Invalid", "AzureBlobs", "AzureFiles". + :type restore_target_location_type: str or + ~azure.mgmt.dataprotection.models.RestoreTargetLocationType + :param url: Required. Url denoting the restore destination. It can point to container / file + share etc. + :type url: str + """ + + _validation = { + 'file_prefix': {'required': True}, + 'restore_target_location_type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'file_prefix': {'key': 'filePrefix', 'type': 'str'}, + 'restore_target_location_type': {'key': 'restoreTargetLocationType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TargetDetails, self).__init__(**kwargs) + self.file_prefix = kwargs['file_prefix'] + self.restore_target_location_type = kwargs['restore_target_location_type'] + self.url = kwargs['url'] + + +class TriggerBackupRequest(msrest.serialization.Model): + """Trigger backup request. + + All required parameters must be populated in order to send to Azure. + + :param backup_rule_options: Required. Name for the Rule of the Policy which needs to be applied + for this backup. + :type backup_rule_options: ~azure.mgmt.dataprotection.models.AdHocBackupRuleOptions + """ + + _validation = { + 'backup_rule_options': {'required': True}, + } + + _attribute_map = { + 'backup_rule_options': {'key': 'backupRuleOptions', 'type': 'AdHocBackupRuleOptions'}, + } + + def __init__( + self, + **kwargs + ): + super(TriggerBackupRequest, self).__init__(**kwargs) + self.backup_rule_options = kwargs['backup_rule_options'] + + +class UserFacingError(msrest.serialization.Model): + """Error object used by layers that have access to localized content, and propagate that to user. + + :param code: Unique code for this error. + :type code: str + :param details: Additional related Errors. + :type details: list[~azure.mgmt.dataprotection.models.UserFacingError] + :param inner_error: Inner Error. + :type inner_error: ~azure.mgmt.dataprotection.models.InnerError + :param is_retryable: Whether the operation will be retryable or not. + :type is_retryable: bool + :param is_user_error: Whether the operation is due to a user error or service error. + :type is_user_error: bool + :param properties: Any key value pairs that can be injected inside error object. + :type properties: dict[str, str] + :param message: + :type message: str + :param recommended_action: RecommendedAction � localized. + :type recommended_action: list[str] + :param target: Target of the error. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[UserFacingError]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerError'}, + 'is_retryable': {'key': 'isRetryable', 'type': 'bool'}, + 'is_user_error': {'key': 'isUserError', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommended_action': {'key': 'recommendedAction', 'type': '[str]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserFacingError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.details = kwargs.get('details', None) + self.inner_error = kwargs.get('inner_error', None) + self.is_retryable = kwargs.get('is_retryable', None) + self.is_user_error = kwargs.get('is_user_error', None) + self.properties = kwargs.get('properties', None) + self.message = kwargs.get('message', None) + self.recommended_action = kwargs.get('recommended_action', None) + self.target = kwargs.get('target', None) + + +class ValidateForBackupRequest(msrest.serialization.Model): + """Validate for backup request. + + All required parameters must be populated in order to send to Azure. + + :param backup_instance: Required. Backup Instance. + :type backup_instance: ~azure.mgmt.dataprotection.models.BackupInstance + """ + + _validation = { + 'backup_instance': {'required': True}, + } + + _attribute_map = { + 'backup_instance': {'key': 'backupInstance', 'type': 'BackupInstance'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateForBackupRequest, self).__init__(**kwargs) + self.backup_instance = kwargs['backup_instance'] + + +class ValidateRestoreRequestObject(msrest.serialization.Model): + """Validate restore request object. + + All required parameters must be populated in order to send to Azure. + + :param restore_request_object: Required. Gets or sets the restore request object. + :type restore_request_object: ~azure.mgmt.dataprotection.models.AzureBackupRestoreRequest + """ + + _validation = { + 'restore_request_object': {'required': True}, + } + + _attribute_map = { + 'restore_request_object': {'key': 'restoreRequestObject', 'type': 'AzureBackupRestoreRequest'}, + } + + def __init__( + self, + **kwargs + ): + super(ValidateRestoreRequestObject, self).__init__(**kwargs) + self.restore_request_object = kwargs['restore_request_object'] diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_models_py3.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_models_py3.py new file mode 100644 index 000000000000..27867c12c61d --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/models/_models_py3.py @@ -0,0 +1,4595 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._data_protection_client_enums import * + + +class DeleteOption(msrest.serialization.Model): + """Delete Option. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AbsoluteDeleteOption. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. Duration of deletion after given timespan. + :type duration: str + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'duration': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AbsoluteDeleteOption': 'AbsoluteDeleteOption'} + } + + def __init__( + self, + *, + duration: str, + **kwargs + ): + super(DeleteOption, self).__init__(**kwargs) + self.duration = duration + self.object_type = None # type: Optional[str] + + +class AbsoluteDeleteOption(DeleteOption): + """Delete option with duration. + + All required parameters must be populated in order to send to Azure. + + :param duration: Required. Duration of deletion after given timespan. + :type duration: str + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'duration': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'duration': {'key': 'duration', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + duration: str, + **kwargs + ): + super(AbsoluteDeleteOption, self).__init__(duration=duration, **kwargs) + self.object_type = 'AbsoluteDeleteOption' # type: str + + +class AdHocBackupRuleOptions(msrest.serialization.Model): + """Adhoc backup rules. + + All required parameters must be populated in order to send to Azure. + + :param rule_name: Required. + :type rule_name: str + :param trigger_option: Required. Adhoc backup trigger option. + :type trigger_option: ~azure.mgmt.dataprotection.models.AdhocBackupTriggerOption + """ + + _validation = { + 'rule_name': {'required': True}, + 'trigger_option': {'required': True}, + } + + _attribute_map = { + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + 'trigger_option': {'key': 'triggerOption', 'type': 'AdhocBackupTriggerOption'}, + } + + def __init__( + self, + *, + rule_name: str, + trigger_option: "AdhocBackupTriggerOption", + **kwargs + ): + super(AdHocBackupRuleOptions, self).__init__(**kwargs) + self.rule_name = rule_name + self.trigger_option = trigger_option + + +class AdhocBackupTriggerOption(msrest.serialization.Model): + """Adhoc backup trigger option. + + :param retention_tag_override: + :type retention_tag_override: str + """ + + _attribute_map = { + 'retention_tag_override': {'key': 'retentionTagOverride', 'type': 'str'}, + } + + def __init__( + self, + *, + retention_tag_override: Optional[str] = None, + **kwargs + ): + super(AdhocBackupTriggerOption, self).__init__(**kwargs) + self.retention_tag_override = retention_tag_override + + +class AdhocBasedTaggingCriteria(msrest.serialization.Model): + """Adhoc backup tagging criteria. + + :param tag_info: Retention tag information. + :type tag_info: ~azure.mgmt.dataprotection.models.RetentionTag + """ + + _attribute_map = { + 'tag_info': {'key': 'tagInfo', 'type': 'RetentionTag'}, + } + + def __init__( + self, + *, + tag_info: Optional["RetentionTag"] = None, + **kwargs + ): + super(AdhocBasedTaggingCriteria, self).__init__(**kwargs) + self.tag_info = tag_info + + +class TriggerContext(msrest.serialization.Model): + """Trigger context. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdhocBasedTriggerContext, ScheduleBasedTriggerContext. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AdhocBasedTriggerContext': 'AdhocBasedTriggerContext', 'ScheduleBasedTriggerContext': 'ScheduleBasedTriggerContext'} + } + + def __init__( + self, + **kwargs + ): + super(TriggerContext, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AdhocBasedTriggerContext(TriggerContext): + """Adhoc trigger context. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param tagging_criteria: Required. Tagging Criteria containing retention tag for adhoc backup. + :type tagging_criteria: ~azure.mgmt.dataprotection.models.AdhocBasedTaggingCriteria + """ + + _validation = { + 'object_type': {'required': True}, + 'tagging_criteria': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'tagging_criteria': {'key': 'taggingCriteria', 'type': 'AdhocBasedTaggingCriteria'}, + } + + def __init__( + self, + *, + tagging_criteria: "AdhocBasedTaggingCriteria", + **kwargs + ): + super(AdhocBasedTriggerContext, self).__init__(**kwargs) + self.object_type = 'AdhocBasedTriggerContext' # type: str + self.tagging_criteria = tagging_criteria + + +class AuthCredentials(msrest.serialization.Model): + """Base class for different types of authentication credentials. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecretStoreBasedAuthCredentials. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'SecretStoreBasedAuthCredentials': 'SecretStoreBasedAuthCredentials'} + } + + def __init__( + self, + **kwargs + ): + super(AuthCredentials, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupRecoveryPoint(msrest.serialization.Model): + """Azure backup recoveryPoint. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupDiscreteRecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupDiscreteRecoveryPoint': 'AzureBackupDiscreteRecoveryPoint'} + } + + def __init__( + self, + **kwargs + ): + super(AzureBackupRecoveryPoint, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupDiscreteRecoveryPoint(AzureBackupRecoveryPoint): + """Azure backup discrete RecoveryPoint. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param friendly_name: + :type friendly_name: str + :param recovery_point_data_stores_details: + :type recovery_point_data_stores_details: + list[~azure.mgmt.dataprotection.models.RecoveryPointDataStoreDetails] + :param recovery_point_time: Required. + :type recovery_point_time: ~datetime.datetime + :param policy_name: + :type policy_name: str + :param policy_version: + :type policy_version: str + :param recovery_point_id: + :type recovery_point_id: str + :param recovery_point_type: + :type recovery_point_type: str + :param retention_tag_name: + :type retention_tag_name: str + :param retention_tag_version: + :type retention_tag_version: str + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_point_time': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'recovery_point_data_stores_details': {'key': 'recoveryPointDataStoresDetails', 'type': '[RecoveryPointDataStoreDetails]'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'policy_version': {'key': 'policyVersion', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_point_type': {'key': 'recoveryPointType', 'type': 'str'}, + 'retention_tag_name': {'key': 'retentionTagName', 'type': 'str'}, + 'retention_tag_version': {'key': 'retentionTagVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + recovery_point_time: datetime.datetime, + friendly_name: Optional[str] = None, + recovery_point_data_stores_details: Optional[List["RecoveryPointDataStoreDetails"]] = None, + policy_name: Optional[str] = None, + policy_version: Optional[str] = None, + recovery_point_id: Optional[str] = None, + recovery_point_type: Optional[str] = None, + retention_tag_name: Optional[str] = None, + retention_tag_version: Optional[str] = None, + **kwargs + ): + super(AzureBackupDiscreteRecoveryPoint, self).__init__(**kwargs) + self.object_type = 'AzureBackupDiscreteRecoveryPoint' # type: str + self.friendly_name = friendly_name + self.recovery_point_data_stores_details = recovery_point_data_stores_details + self.recovery_point_time = recovery_point_time + self.policy_name = policy_name + self.policy_version = policy_version + self.recovery_point_id = recovery_point_id + self.recovery_point_type = recovery_point_type + self.retention_tag_name = retention_tag_name + self.retention_tag_version = retention_tag_version + + +class AzureBackupFindRestorableTimeRangesRequest(msrest.serialization.Model): + """List Restore Ranges Request. + + All required parameters must be populated in order to send to Azure. + + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "OperationalStore", "VaultStore", "ArchiveStore". + :type source_data_store_type: str or + ~azure.mgmt.dataprotection.models.RestoreSourceDataStoreType + :param start_time: Start time for the List Restore Ranges request. ISO 8601 format. + :type start_time: str + :param end_time: End time for the List Restore Ranges request. ISO 8601 format. + :type end_time: str + """ + + _validation = { + 'source_data_store_type': {'required': True}, + } + + _attribute_map = { + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + } + + def __init__( + self, + *, + source_data_store_type: Union[str, "RestoreSourceDataStoreType"], + start_time: Optional[str] = None, + end_time: Optional[str] = None, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesRequest, self).__init__(**kwargs) + self.source_data_store_type = source_data_store_type + self.start_time = start_time + self.end_time = end_time + + +class DppWorkerRequest(msrest.serialization.Model): + """DppWorkerRequest. + + :param subscription_id: + :type subscription_id: str + :param uri: + :type uri: str + :param headers: Dictionary of + . + :type headers: dict[str, list[str]] + :param supported_group_versions: + :type supported_group_versions: list[str] + :param culture_info: + :type culture_info: str + :param parameters: Dictionary of :code:``. + :type parameters: dict[str, str] + :param http_method: + :type http_method: str + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'supported_group_versions': {'key': 'supportedGroupVersions', 'type': '[str]'}, + 'culture_info': {'key': 'cultureInfo', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + subscription_id: Optional[str] = None, + uri: Optional[str] = None, + headers: Optional[Dict[str, List[str]]] = None, + supported_group_versions: Optional[List[str]] = None, + culture_info: Optional[str] = None, + parameters: Optional[Dict[str, str]] = None, + http_method: Optional[str] = None, + **kwargs + ): + super(DppWorkerRequest, self).__init__(**kwargs) + self.subscription_id = subscription_id + self.uri = uri + self.headers = headers + self.supported_group_versions = supported_group_versions + self.culture_info = culture_info + self.parameters = parameters + self.http_method = http_method + + +class AzureBackupFindRestorableTimeRangesRequestResource(DppWorkerRequest): + """List Restore Ranges Request. + + :param subscription_id: + :type subscription_id: str + :param uri: + :type uri: str + :param headers: Dictionary of + . + :type headers: dict[str, list[str]] + :param supported_group_versions: + :type supported_group_versions: list[str] + :param culture_info: + :type culture_info: str + :param parameters: Dictionary of :code:``. + :type parameters: dict[str, str] + :param http_method: + :type http_method: str + :param content: AzureBackupFindRestorableTimeRangesRequestResource content. + :type content: ~azure.mgmt.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest + """ + + _attribute_map = { + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '{[str]}'}, + 'supported_group_versions': {'key': 'supportedGroupVersions', 'type': '[str]'}, + 'culture_info': {'key': 'cultureInfo', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': '{str}'}, + 'http_method': {'key': 'httpMethod', 'type': 'str'}, + 'content': {'key': 'content', 'type': 'AzureBackupFindRestorableTimeRangesRequest'}, + } + + def __init__( + self, + *, + subscription_id: Optional[str] = None, + uri: Optional[str] = None, + headers: Optional[Dict[str, List[str]]] = None, + supported_group_versions: Optional[List[str]] = None, + culture_info: Optional[str] = None, + parameters: Optional[Dict[str, str]] = None, + http_method: Optional[str] = None, + content: Optional["AzureBackupFindRestorableTimeRangesRequest"] = None, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesRequestResource, self).__init__(subscription_id=subscription_id, uri=uri, headers=headers, supported_group_versions=supported_group_versions, culture_info=culture_info, parameters=parameters, http_method=http_method, **kwargs) + self.content = content + + +class AzureBackupFindRestorableTimeRangesResponse(msrest.serialization.Model): + """List Restore Ranges Response. + + :param restorable_time_ranges: Returns the Restore Ranges available on the Backup Instance. + :type restorable_time_ranges: list[~azure.mgmt.dataprotection.models.RestorableTimeRange] + :param object_type: + :type object_type: str + """ + + _attribute_map = { + 'restorable_time_ranges': {'key': 'restorableTimeRanges', 'type': '[RestorableTimeRange]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + restorable_time_ranges: Optional[List["RestorableTimeRange"]] = None, + object_type: Optional[str] = None, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesResponse, self).__init__(**kwargs) + self.restorable_time_ranges = restorable_time_ranges + self.object_type = object_type + + +class DppResource(msrest.serialization.Model): + """Resource class. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(DppResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.system_data = None + + +class AzureBackupFindRestorableTimeRangesResponseResource(DppResource): + """List Restore Ranges Response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: AzureBackupFindRestorableTimeRangesResponseResource properties. + :type properties: ~azure.mgmt.dataprotection.models.AzureBackupFindRestorableTimeRangesResponse + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupFindRestorableTimeRangesResponse'}, + } + + def __init__( + self, + *, + properties: Optional["AzureBackupFindRestorableTimeRangesResponse"] = None, + **kwargs + ): + super(AzureBackupFindRestorableTimeRangesResponseResource, self).__init__(**kwargs) + self.properties = properties + + +class AzureBackupJob(msrest.serialization.Model): + """AzureBackup Job Class. + + 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 activity_id: Required. Job Activity Id. + :type activity_id: str + :param backup_instance_friendly_name: Required. Name of the Backup Instance. + :type backup_instance_friendly_name: str + :ivar backup_instance_id: ARM ID of the Backup Instance. + :vartype backup_instance_id: str + :param data_source_id: Required. ARM ID of the DataSource. + :type data_source_id: str + :param data_source_location: Required. Location of the DataSource. + :type data_source_location: str + :param data_source_name: Required. User Friendly Name of the DataSource. + :type data_source_name: str + :param data_source_set_name: Data Source Set Name of the DataSource. + :type data_source_set_name: str + :param data_source_type: Required. Type of DataSource. + :type data_source_type: str + :param duration: Total run time of the job. ISO 8601 format. + :type duration: str + :ivar end_time: EndTime of the job(in UTC). + :vartype end_time: ~datetime.datetime + :ivar error_details: A List, detailing the errors related to the job. + :vartype error_details: list[~azure.mgmt.dataprotection.models.UserFacingError] + :ivar extended_info: Extended Information about the job. + :vartype extended_info: ~azure.mgmt.dataprotection.models.JobExtendedInfo + :param is_user_triggered: Required. Indicated that whether the job is adhoc(true) or + scheduled(false). + :type is_user_triggered: bool + :param operation: Required. It indicates the type of Job i.e. Backup:full/log/diff + ;Restore:ALR/OLR; Tiering:Backup/Archive ; Management:ConfigureProtection/UnConfigure. + :type operation: str + :param operation_category: Required. It indicates the type of Job i.e. + Backup/Restore/Tiering/Management. + :type operation_category: str + :ivar policy_id: ARM ID of the policy. + :vartype policy_id: str + :ivar policy_name: Name of the policy. + :vartype policy_name: str + :param progress_enabled: Required. Indicated whether progress is enabled for the job. + :type progress_enabled: bool + :ivar progress_url: Url which contains job's progress. + :vartype progress_url: str + :ivar restore_type: It indicates the sub type of operation i.e. in case of Restore it can be + ALR/OLR. + :vartype restore_type: str + :param source_resource_group: Required. Resource Group Name of the Datasource. + :type source_resource_group: str + :param source_subscription_id: Required. SubscriptionId corresponding to the DataSource. + :type source_subscription_id: str + :param start_time: Required. StartTime of the job(in UTC). + :type start_time: ~datetime.datetime + :param status: Required. Status of the job like + InProgress/Success/Failed/Cancelled/SuccessWithWarning. + :type status: str + :param subscription_id: Required. Subscription Id of the corresponding backup vault. + :type subscription_id: str + :param supported_actions: Required. List of supported actions. + :type supported_actions: list[str] + :param vault_name: Required. Name of the vault. + :type vault_name: str + :param etag: + :type etag: str + :param source_data_store_name: + :type source_data_store_name: str + :param destination_data_store_name: + :type destination_data_store_name: str + """ + + _validation = { + 'activity_id': {'required': True}, + 'backup_instance_friendly_name': {'required': True}, + 'backup_instance_id': {'readonly': True}, + 'data_source_id': {'required': True}, + 'data_source_location': {'required': True}, + 'data_source_name': {'required': True}, + 'data_source_type': {'required': True}, + 'end_time': {'readonly': True}, + 'error_details': {'readonly': True}, + 'extended_info': {'readonly': True}, + 'is_user_triggered': {'required': True}, + 'operation': {'required': True}, + 'operation_category': {'required': True}, + 'policy_id': {'readonly': True}, + 'policy_name': {'readonly': True}, + 'progress_enabled': {'required': True}, + 'progress_url': {'readonly': True}, + 'restore_type': {'readonly': True}, + 'source_resource_group': {'required': True}, + 'source_subscription_id': {'required': True}, + 'start_time': {'required': True}, + 'status': {'required': True}, + 'subscription_id': {'required': True}, + 'supported_actions': {'required': True}, + 'vault_name': {'required': True}, + } + + _attribute_map = { + 'activity_id': {'key': 'activityID', 'type': 'str'}, + 'backup_instance_friendly_name': {'key': 'backupInstanceFriendlyName', 'type': 'str'}, + 'backup_instance_id': {'key': 'backupInstanceId', 'type': 'str'}, + 'data_source_id': {'key': 'dataSourceId', 'type': 'str'}, + 'data_source_location': {'key': 'dataSourceLocation', 'type': 'str'}, + 'data_source_name': {'key': 'dataSourceName', 'type': 'str'}, + 'data_source_set_name': {'key': 'dataSourceSetName', 'type': 'str'}, + 'data_source_type': {'key': 'dataSourceType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error_details': {'key': 'errorDetails', 'type': '[UserFacingError]'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'JobExtendedInfo'}, + 'is_user_triggered': {'key': 'isUserTriggered', 'type': 'bool'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'operation_category': {'key': 'operationCategory', 'type': 'str'}, + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'progress_enabled': {'key': 'progressEnabled', 'type': 'bool'}, + 'progress_url': {'key': 'progressUrl', 'type': 'str'}, + 'restore_type': {'key': 'restoreType', 'type': 'str'}, + 'source_resource_group': {'key': 'sourceResourceGroup', 'type': 'str'}, + 'source_subscription_id': {'key': 'sourceSubscriptionID', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'supported_actions': {'key': 'supportedActions', 'type': '[str]'}, + 'vault_name': {'key': 'vaultName', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'source_data_store_name': {'key': 'sourceDataStoreName', 'type': 'str'}, + 'destination_data_store_name': {'key': 'destinationDataStoreName', 'type': 'str'}, + } + + def __init__( + self, + *, + activity_id: str, + backup_instance_friendly_name: str, + data_source_id: str, + data_source_location: str, + data_source_name: str, + data_source_type: str, + is_user_triggered: bool, + operation: str, + operation_category: str, + progress_enabled: bool, + source_resource_group: str, + source_subscription_id: str, + start_time: datetime.datetime, + status: str, + subscription_id: str, + supported_actions: List[str], + vault_name: str, + data_source_set_name: Optional[str] = None, + duration: Optional[str] = None, + etag: Optional[str] = None, + source_data_store_name: Optional[str] = None, + destination_data_store_name: Optional[str] = None, + **kwargs + ): + super(AzureBackupJob, self).__init__(**kwargs) + self.activity_id = activity_id + self.backup_instance_friendly_name = backup_instance_friendly_name + self.backup_instance_id = None + self.data_source_id = data_source_id + self.data_source_location = data_source_location + self.data_source_name = data_source_name + self.data_source_set_name = data_source_set_name + self.data_source_type = data_source_type + self.duration = duration + self.end_time = None + self.error_details = None + self.extended_info = None + self.is_user_triggered = is_user_triggered + self.operation = operation + self.operation_category = operation_category + self.policy_id = None + self.policy_name = None + self.progress_enabled = progress_enabled + self.progress_url = None + self.restore_type = None + self.source_resource_group = source_resource_group + self.source_subscription_id = source_subscription_id + self.start_time = start_time + self.status = status + self.subscription_id = subscription_id + self.supported_actions = supported_actions + self.vault_name = vault_name + self.etag = etag + self.source_data_store_name = source_data_store_name + self.destination_data_store_name = destination_data_store_name + + +class AzureBackupJobResource(DppResource): + """AzureBackup Job Resource Class. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: AzureBackupJobResource properties. + :type properties: ~azure.mgmt.dataprotection.models.AzureBackupJob + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupJob'}, + } + + def __init__( + self, + *, + properties: Optional["AzureBackupJob"] = None, + **kwargs + ): + super(AzureBackupJobResource, self).__init__(**kwargs) + self.properties = properties + + +class DppResourceList(msrest.serialization.Model): + """ListResource. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(DppResourceList, self).__init__(**kwargs) + self.next_link = next_link + + +class AzureBackupJobResourceList(DppResourceList): + """List of AzureBackup Job resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.AzureBackupJobResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureBackupJobResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["AzureBackupJobResource"]] = None, + **kwargs + ): + super(AzureBackupJobResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class BackupParameters(msrest.serialization.Model): + """BackupParameters base. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupParams. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupParams': 'AzureBackupParams'} + } + + def __init__( + self, + **kwargs + ): + super(BackupParameters, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class AzureBackupParams(BackupParameters): + """Azure backup parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param backup_type: Required. BackupType ; Full/Incremental etc. + :type backup_type: str + """ + + _validation = { + 'object_type': {'required': True}, + 'backup_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_type': {'key': 'backupType', 'type': 'str'}, + } + + def __init__( + self, + *, + backup_type: str, + **kwargs + ): + super(AzureBackupParams, self).__init__(**kwargs) + self.object_type = 'AzureBackupParams' # type: str + self.backup_type = backup_type + + +class AzureBackupRestoreRequest(msrest.serialization.Model): + """Azure backup restore request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRecoveryPointBasedRestoreRequest, AzureBackupRecoveryTimeBasedRestoreRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~azure.mgmt.dataprotection.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~azure.mgmt.dataprotection.models.SourceDataStoreType + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRecoveryPointBasedRestoreRequest': 'AzureBackupRecoveryPointBasedRestoreRequest', 'AzureBackupRecoveryTimeBasedRestoreRequest': 'AzureBackupRecoveryTimeBasedRestoreRequest'} + } + + def __init__( + self, + *, + restore_target_info: "RestoreTargetInfoBase", + source_data_store_type: Union[str, "SourceDataStoreType"], + **kwargs + ): + super(AzureBackupRestoreRequest, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.restore_target_info = restore_target_info + self.source_data_store_type = source_data_store_type + + +class AzureBackupRecoveryPointBasedRestoreRequest(AzureBackupRestoreRequest): + """Azure backup recoveryPoint based restore request. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRestoreWithRehydrationRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~azure.mgmt.dataprotection.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~azure.mgmt.dataprotection.models.SourceDataStoreType + :param recovery_point_id: Required. + :type recovery_point_id: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_id': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRestoreWithRehydrationRequest': 'AzureBackupRestoreWithRehydrationRequest'} + } + + def __init__( + self, + *, + restore_target_info: "RestoreTargetInfoBase", + source_data_store_type: Union[str, "SourceDataStoreType"], + recovery_point_id: str, + **kwargs + ): + super(AzureBackupRecoveryPointBasedRestoreRequest, self).__init__(restore_target_info=restore_target_info, source_data_store_type=source_data_store_type, **kwargs) + self.object_type = 'AzureBackupRecoveryPointBasedRestoreRequest' # type: str + self.recovery_point_id = recovery_point_id + + +class AzureBackupRecoveryPointResource(DppResource): + """Azure backup recoveryPoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: AzureBackupRecoveryPointResource properties. + :type properties: ~azure.mgmt.dataprotection.models.AzureBackupRecoveryPoint + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'AzureBackupRecoveryPoint'}, + } + + def __init__( + self, + *, + properties: Optional["AzureBackupRecoveryPoint"] = None, + **kwargs + ): + super(AzureBackupRecoveryPointResource, self).__init__(**kwargs) + self.properties = properties + + +class AzureBackupRecoveryPointResourceList(DppResourceList): + """Azure backup recoveryPoint resource list. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.AzureBackupRecoveryPointResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[AzureBackupRecoveryPointResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["AzureBackupRecoveryPointResource"]] = None, + **kwargs + ): + super(AzureBackupRecoveryPointResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class AzureBackupRecoveryTimeBasedRestoreRequest(AzureBackupRestoreRequest): + """AzureBackup RecoveryPointTime Based Restore Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~azure.mgmt.dataprotection.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~azure.mgmt.dataprotection.models.SourceDataStoreType + :param recovery_point_time: Required. The recovery time in ISO 8601 format example - + 2020-08-14T17:30:00.0000000Z. + :type recovery_point_time: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_time': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'str'}, + } + + def __init__( + self, + *, + restore_target_info: "RestoreTargetInfoBase", + source_data_store_type: Union[str, "SourceDataStoreType"], + recovery_point_time: str, + **kwargs + ): + super(AzureBackupRecoveryTimeBasedRestoreRequest, self).__init__(restore_target_info=restore_target_info, source_data_store_type=source_data_store_type, **kwargs) + self.object_type = 'AzureBackupRecoveryTimeBasedRestoreRequest' # type: str + self.recovery_point_time = recovery_point_time + + +class AzureBackupRehydrationRequest(msrest.serialization.Model): + """Azure Backup Rehydrate Request. + + All required parameters must be populated in order to send to Azure. + + :param recovery_point_id: Required. Id of the recovery point to be recovered. + :type recovery_point_id: str + :param rehydration_priority: Priority to be used for rehydration. Values High or Standard. + Possible values include: "Invalid", "High", "Standard". + :type rehydration_priority: str or ~azure.mgmt.dataprotection.models.RehydrationPriority + :param rehydration_retention_duration: Required. Retention duration in ISO 8601 format i.e P10D + . + :type rehydration_retention_duration: str + """ + + _validation = { + 'recovery_point_id': {'required': True}, + 'rehydration_retention_duration': {'required': True}, + } + + _attribute_map = { + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + recovery_point_id: str, + rehydration_retention_duration: str, + rehydration_priority: Optional[Union[str, "RehydrationPriority"]] = None, + **kwargs + ): + super(AzureBackupRehydrationRequest, self).__init__(**kwargs) + self.recovery_point_id = recovery_point_id + self.rehydration_priority = rehydration_priority + self.rehydration_retention_duration = rehydration_retention_duration + + +class AzureBackupRestoreWithRehydrationRequest(AzureBackupRecoveryPointBasedRestoreRequest): + """AzureBackup Restore with Rehydration Request. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Constant filled by server. + :type object_type: str + :param restore_target_info: Required. Gets or sets the restore target information. + :type restore_target_info: ~azure.mgmt.dataprotection.models.RestoreTargetInfoBase + :param source_data_store_type: Required. Gets or sets the type of the source data store. + Possible values include: "ArchiveStore", "SnapshotStore", "VaultStore". + :type source_data_store_type: str or ~azure.mgmt.dataprotection.models.SourceDataStoreType + :param recovery_point_id: Required. + :type recovery_point_id: str + :param rehydration_priority: Required. Priority to be used for rehydration. Values High or + Standard. Possible values include: "Invalid", "High", "Standard". + :type rehydration_priority: str or ~azure.mgmt.dataprotection.models.RehydrationPriority + :param rehydration_retention_duration: Required. Retention duration in ISO 8601 format i.e P10D + . + :type rehydration_retention_duration: str + """ + + _validation = { + 'object_type': {'required': True}, + 'restore_target_info': {'required': True}, + 'source_data_store_type': {'required': True}, + 'recovery_point_id': {'required': True}, + 'rehydration_priority': {'required': True}, + 'rehydration_retention_duration': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'restore_target_info': {'key': 'restoreTargetInfo', 'type': 'RestoreTargetInfoBase'}, + 'source_data_store_type': {'key': 'sourceDataStoreType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'rehydration_priority': {'key': 'rehydrationPriority', 'type': 'str'}, + 'rehydration_retention_duration': {'key': 'rehydrationRetentionDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + restore_target_info: "RestoreTargetInfoBase", + source_data_store_type: Union[str, "SourceDataStoreType"], + recovery_point_id: str, + rehydration_priority: Union[str, "RehydrationPriority"], + rehydration_retention_duration: str, + **kwargs + ): + super(AzureBackupRestoreWithRehydrationRequest, self).__init__(restore_target_info=restore_target_info, source_data_store_type=source_data_store_type, recovery_point_id=recovery_point_id, **kwargs) + self.object_type = 'AzureBackupRestoreWithRehydrationRequest' # type: str + self.rehydration_priority = rehydration_priority + self.rehydration_retention_duration = rehydration_retention_duration + + +class BasePolicyRule(msrest.serialization.Model): + """BasePolicy Rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureBackupRule, AzureRetentionRule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureBackupRule': 'AzureBackupRule', 'AzureRetentionRule': 'AzureRetentionRule'} + } + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(BasePolicyRule, self).__init__(**kwargs) + self.name = name + self.object_type = None # type: Optional[str] + + +class AzureBackupRule(BasePolicyRule): + """Azure backup rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + :param backup_parameters: BackupParameters base. + :type backup_parameters: ~azure.mgmt.dataprotection.models.BackupParameters + :param data_store: Required. DataStoreInfo base. + :type data_store: ~azure.mgmt.dataprotection.models.DataStoreInfoBase + :param trigger: Required. Trigger context. + :type trigger: ~azure.mgmt.dataprotection.models.TriggerContext + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + 'data_store': {'required': True}, + 'trigger': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'backup_parameters': {'key': 'backupParameters', 'type': 'BackupParameters'}, + 'data_store': {'key': 'dataStore', 'type': 'DataStoreInfoBase'}, + 'trigger': {'key': 'trigger', 'type': 'TriggerContext'}, + } + + def __init__( + self, + *, + name: str, + data_store: "DataStoreInfoBase", + trigger: "TriggerContext", + backup_parameters: Optional["BackupParameters"] = None, + **kwargs + ): + super(AzureBackupRule, self).__init__(name=name, **kwargs) + self.object_type = 'AzureBackupRule' # type: str + self.backup_parameters = backup_parameters + self.data_store = data_store + self.trigger = trigger + + +class DataStoreParameters(msrest.serialization.Model): + """Parameters for DataStore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AzureOperationalStoreParameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~azure.mgmt.dataprotection.models.DataStoreTypes + """ + + _validation = { + 'object_type': {'required': True}, + 'data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'AzureOperationalStoreParameters': 'AzureOperationalStoreParameters'} + } + + def __init__( + self, + *, + data_store_type: Union[str, "DataStoreTypes"], + **kwargs + ): + super(DataStoreParameters, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.data_store_type = data_store_type + + +class AzureOperationalStoreParameters(DataStoreParameters): + """Parameters for Operational-Tier DataStore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~azure.mgmt.dataprotection.models.DataStoreTypes + :param resource_group_id: Gets or sets the Snapshot Resource Group Uri. + :type resource_group_id: str + """ + + _validation = { + 'object_type': {'required': True}, + 'data_store_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + 'resource_group_id': {'key': 'resourceGroupId', 'type': 'str'}, + } + + def __init__( + self, + *, + data_store_type: Union[str, "DataStoreTypes"], + resource_group_id: Optional[str] = None, + **kwargs + ): + super(AzureOperationalStoreParameters, self).__init__(data_store_type=data_store_type, **kwargs) + self.object_type = 'AzureOperationalStoreParameters' # type: str + self.resource_group_id = resource_group_id + + +class AzureRetentionRule(BasePolicyRule): + """Azure retention rule. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. + :type name: str + :param object_type: Required. Constant filled by server. + :type object_type: str + :param is_default: + :type is_default: bool + :param lifecycles: Required. + :type lifecycles: list[~azure.mgmt.dataprotection.models.SourceLifeCycle] + """ + + _validation = { + 'name': {'required': True}, + 'object_type': {'required': True}, + 'lifecycles': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'lifecycles': {'key': 'lifecycles', 'type': '[SourceLifeCycle]'}, + } + + def __init__( + self, + *, + name: str, + lifecycles: List["SourceLifeCycle"], + is_default: Optional[bool] = None, + **kwargs + ): + super(AzureRetentionRule, self).__init__(name=name, **kwargs) + self.object_type = 'AzureRetentionRule' # type: str + self.is_default = is_default + self.lifecycles = lifecycles + + +class BackupCriteria(msrest.serialization.Model): + """BackupCriteria base class. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ScheduleBasedBackupCriteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ScheduleBasedBackupCriteria': 'ScheduleBasedBackupCriteria'} + } + + def __init__( + self, + **kwargs + ): + super(BackupCriteria, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class BackupInstance(msrest.serialization.Model): + """Backup Instance. + + 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 friendly_name: Gets or sets the Backup Instance friendly name. + :type friendly_name: str + :param data_source_info: Required. Gets or sets the data source information. + :type data_source_info: ~azure.mgmt.dataprotection.models.Datasource + :param data_source_set_info: Gets or sets the data source set information. + :type data_source_set_info: ~azure.mgmt.dataprotection.models.DatasourceSet + :param policy_info: Required. Gets or sets the policy information. + :type policy_info: ~azure.mgmt.dataprotection.models.PolicyInfo + :ivar protection_status: Specifies the protection status of the resource. + :vartype protection_status: ~azure.mgmt.dataprotection.models.ProtectionStatusDetails + :ivar current_protection_state: Specifies the current protection state of the resource. + Possible values include: "Invalid", "NotProtected", "ConfiguringProtection", + "ProtectionConfigured", "BackupSchedulesSuspended", "RetentionSchedulesSuspended", + "ProtectionStopped", "ProtectionError", "ConfiguringProtectionFailed", "SoftDeleting", + "SoftDeleted", "UpdatingProtection". + :vartype current_protection_state: str or + ~azure.mgmt.dataprotection.models.CurrentProtectionState + :ivar protection_error_details: Specifies the protection error of the resource. + :vartype protection_error_details: ~azure.mgmt.dataprotection.models.UserFacingError + :ivar provisioning_state: Specifies the provisioning state of the resource i.e. + provisioning/updating/Succeeded/Failed. + :vartype provisioning_state: str + :param datasource_auth_credentials: Credentials to use to authenticate with data source + provider. + :type datasource_auth_credentials: ~azure.mgmt.dataprotection.models.AuthCredentials + :param object_type: Required. + :type object_type: str + """ + + _validation = { + 'data_source_info': {'required': True}, + 'policy_info': {'required': True}, + 'protection_status': {'readonly': True}, + 'current_protection_state': {'readonly': True}, + 'protection_error_details': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'data_source_info': {'key': 'dataSourceInfo', 'type': 'Datasource'}, + 'data_source_set_info': {'key': 'dataSourceSetInfo', 'type': 'DatasourceSet'}, + 'policy_info': {'key': 'policyInfo', 'type': 'PolicyInfo'}, + 'protection_status': {'key': 'protectionStatus', 'type': 'ProtectionStatusDetails'}, + 'current_protection_state': {'key': 'currentProtectionState', 'type': 'str'}, + 'protection_error_details': {'key': 'protectionErrorDetails', 'type': 'UserFacingError'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'datasource_auth_credentials': {'key': 'datasourceAuthCredentials', 'type': 'AuthCredentials'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + data_source_info: "Datasource", + policy_info: "PolicyInfo", + object_type: str, + friendly_name: Optional[str] = None, + data_source_set_info: Optional["DatasourceSet"] = None, + datasource_auth_credentials: Optional["AuthCredentials"] = None, + **kwargs + ): + super(BackupInstance, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.data_source_info = data_source_info + self.data_source_set_info = data_source_set_info + self.policy_info = policy_info + self.protection_status = None + self.current_protection_state = None + self.protection_error_details = None + self.provisioning_state = None + self.datasource_auth_credentials = datasource_auth_credentials + self.object_type = object_type + + +class BackupInstanceResource(DppResource): + """BackupInstance Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: BackupInstanceResource properties. + :type properties: ~azure.mgmt.dataprotection.models.BackupInstance + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BackupInstance'}, + } + + def __init__( + self, + *, + properties: Optional["BackupInstance"] = None, + **kwargs + ): + super(BackupInstanceResource, self).__init__(**kwargs) + self.properties = properties + + +class BackupInstanceResourceList(DppResourceList): + """BackupInstance Resource list response. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.BackupInstanceResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupInstanceResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["BackupInstanceResource"]] = None, + **kwargs + ): + super(BackupInstanceResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class BaseBackupPolicy(msrest.serialization.Model): + """BackupPolicy base. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: BackupPolicy. + + All required parameters must be populated in order to send to Azure. + + :param datasource_types: Required. Type of datasource for the backup management. + :type datasource_types: list[str] + :param object_type: Required. Constant filled by server. + :type object_type: str + """ + + _validation = { + 'datasource_types': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'datasource_types': {'key': 'datasourceTypes', 'type': '[str]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'BackupPolicy': 'BackupPolicy'} + } + + def __init__( + self, + *, + datasource_types: List[str], + **kwargs + ): + super(BaseBackupPolicy, self).__init__(**kwargs) + self.datasource_types = datasource_types + self.object_type = None # type: Optional[str] + + +class BackupPolicy(BaseBackupPolicy): + """Rule based backup policy. + + All required parameters must be populated in order to send to Azure. + + :param datasource_types: Required. Type of datasource for the backup management. + :type datasource_types: list[str] + :param object_type: Required. Constant filled by server. + :type object_type: str + :param policy_rules: Required. Policy rule dictionary that contains rules for each backuptype + i.e Full/Incremental/Logs etc. + :type policy_rules: list[~azure.mgmt.dataprotection.models.BasePolicyRule] + """ + + _validation = { + 'datasource_types': {'required': True}, + 'object_type': {'required': True}, + 'policy_rules': {'required': True}, + } + + _attribute_map = { + 'datasource_types': {'key': 'datasourceTypes', 'type': '[str]'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'policy_rules': {'key': 'policyRules', 'type': '[BasePolicyRule]'}, + } + + def __init__( + self, + *, + datasource_types: List[str], + policy_rules: List["BasePolicyRule"], + **kwargs + ): + super(BackupPolicy, self).__init__(datasource_types=datasource_types, **kwargs) + self.object_type = 'BackupPolicy' # type: str + self.policy_rules = policy_rules + + +class BackupSchedule(msrest.serialization.Model): + """Schedule for backup. + + All required parameters must be populated in order to send to Azure. + + :param repeating_time_intervals: Required. ISO 8601 repeating time interval format. + :type repeating_time_intervals: list[str] + :param time_zone: Time zone for a schedule. Example: Pacific Standard Time. + :type time_zone: str + """ + + _validation = { + 'repeating_time_intervals': {'required': True}, + } + + _attribute_map = { + 'repeating_time_intervals': {'key': 'repeatingTimeIntervals', 'type': '[str]'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__( + self, + *, + repeating_time_intervals: List[str], + time_zone: Optional[str] = None, + **kwargs + ): + super(BackupSchedule, self).__init__(**kwargs) + self.repeating_time_intervals = repeating_time_intervals + self.time_zone = time_zone + + +class BackupVault(msrest.serialization.Model): + """Backup Vault. + + 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. + + :ivar provisioning_state: Provisioning state of the BackupVault resource. Possible values + include: "Failed", "Provisioning", "Succeeded", "Unknown", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.dataprotection.models.ProvisioningState + :ivar resource_move_state: Resource move state for backup vault. Possible values include: + "Unknown", "InProgress", "PrepareFailed", "CommitFailed", "Failed", "PrepareTimedout", + "CommitTimedout", "CriticalFailure", "PartialSuccess", "MoveSucceeded". + :vartype resource_move_state: str or ~azure.mgmt.dataprotection.models.ResourceMoveState + :ivar resource_move_details: Resource move details for backup vault. + :vartype resource_move_details: ~azure.mgmt.dataprotection.models.ResourceMoveDetails + :param storage_settings: Required. Storage Settings. + :type storage_settings: list[~azure.mgmt.dataprotection.models.StorageSetting] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'resource_move_state': {'readonly': True}, + 'resource_move_details': {'readonly': True}, + 'storage_settings': {'required': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'resource_move_state': {'key': 'resourceMoveState', 'type': 'str'}, + 'resource_move_details': {'key': 'resourceMoveDetails', 'type': 'ResourceMoveDetails'}, + 'storage_settings': {'key': 'storageSettings', 'type': '[StorageSetting]'}, + } + + def __init__( + self, + *, + storage_settings: List["StorageSetting"], + **kwargs + ): + super(BackupVault, self).__init__(**kwargs) + self.provisioning_state = None + self.resource_move_state = None + self.resource_move_details = None + self.storage_settings = storage_settings + + +class DppTrackedResource(msrest.serialization.Model): + """DppTrackedResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~azure.mgmt.dataprotection.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + e_tag: Optional[str] = None, + identity: Optional["DppIdentityDetails"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(DppTrackedResource, self).__init__(**kwargs) + self.e_tag = e_tag + self.id = None + self.identity = identity + self.location = location + self.name = None + self.tags = tags + self.type = None + self.system_data = None + + +class BackupVaultResource(DppTrackedResource): + """Backup Vault Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~azure.mgmt.dataprotection.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: Required. BackupVaultResource properties. + :type properties: ~azure.mgmt.dataprotection.models.BackupVault + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BackupVault'}, + } + + def __init__( + self, + *, + properties: "BackupVault", + e_tag: Optional[str] = None, + identity: Optional["DppIdentityDetails"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(BackupVaultResource, self).__init__(e_tag=e_tag, identity=identity, location=location, tags=tags, **kwargs) + self.properties = properties + + +class BackupVaultResourceList(DppResourceList): + """List of BackupVault resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.BackupVaultResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BackupVaultResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["BackupVaultResource"]] = None, + **kwargs + ): + super(BackupVaultResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class BaseBackupPolicyResource(DppResource): + """BaseBackupPolicy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: BaseBackupPolicyResource properties. + :type properties: ~azure.mgmt.dataprotection.models.BaseBackupPolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'BaseBackupPolicy'}, + } + + def __init__( + self, + *, + properties: Optional["BaseBackupPolicy"] = None, + **kwargs + ): + super(BaseBackupPolicyResource, self).__init__(**kwargs) + self.properties = properties + + +class BaseBackupPolicyResourceList(DppResourceList): + """List of BaseBackupPolicy resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.BaseBackupPolicyResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[BaseBackupPolicyResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["BaseBackupPolicyResource"]] = None, + **kwargs + ): + super(BaseBackupPolicyResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class CheckNameAvailabilityRequest(msrest.serialization.Model): + """CheckNameAvailability Request. + + :param name: Resource name for which availability needs to be checked. + :type name: str + :param type: Describes the Resource type: Microsoft.DataProtection/BackupVaults. + :type type: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + + +class CheckNameAvailabilityResult(msrest.serialization.Model): + """CheckNameAvailability Result. + + :param message: Gets or sets the message. + :type message: str + :param name_available: Gets or sets a value indicating whether [name available]. + :type name_available: bool + :param reason: Gets or sets the reason. + :type reason: str + """ + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + *, + message: Optional[str] = None, + name_available: Optional[bool] = None, + reason: Optional[str] = None, + **kwargs + ): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = message + self.name_available = name_available + self.reason = reason + + +class ClientDiscoveryDisplay(msrest.serialization.Model): + """Localized display information of an operation. + + :param description: Description of the operation having details of what operation is about. + :type description: str + :param operation: Operations Name itself. + :type operation: str + :param provider: Name of the provider for display purposes. + :type provider: str + :param resource: ResourceType for which this Operation can be performed. + :type resource: str + """ + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + operation: Optional[str] = None, + provider: Optional[str] = None, + resource: Optional[str] = None, + **kwargs + ): + super(ClientDiscoveryDisplay, self).__init__(**kwargs) + self.description = description + self.operation = operation + self.provider = provider + self.resource = resource + + +class ClientDiscoveryForLogSpecification(msrest.serialization.Model): + """Class to represent shoebox log specification in json client discovery. + + :param blob_duration: blob duration of shoebox log specification. + :type blob_duration: str + :param display_name: Localized display name. + :type display_name: str + :param name: Name for shoebox log specification. + :type name: str + """ + + _attribute_map = { + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + blob_duration: Optional[str] = None, + display_name: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + super(ClientDiscoveryForLogSpecification, self).__init__(**kwargs) + self.blob_duration = blob_duration + self.display_name = display_name + self.name = name + + +class ClientDiscoveryForProperties(msrest.serialization.Model): + """Class to represent shoebox properties in json client discovery. + + :param service_specification: Operation properties. + :type service_specification: + ~azure.mgmt.dataprotection.models.ClientDiscoveryForServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ClientDiscoveryForServiceSpecification'}, + } + + def __init__( + self, + *, + service_specification: Optional["ClientDiscoveryForServiceSpecification"] = None, + **kwargs + ): + super(ClientDiscoveryForProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class ClientDiscoveryForServiceSpecification(msrest.serialization.Model): + """Class to represent shoebox service specification in json client discovery. + + :param log_specifications: List of log specifications of this operation. + :type log_specifications: + list[~azure.mgmt.dataprotection.models.ClientDiscoveryForLogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[ClientDiscoveryForLogSpecification]'}, + } + + def __init__( + self, + *, + log_specifications: Optional[List["ClientDiscoveryForLogSpecification"]] = None, + **kwargs + ): + super(ClientDiscoveryForServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + + +class ClientDiscoveryResponse(msrest.serialization.Model): + """Operations List response which contains list of available APIs. + + :param next_link: Link to the next chunk of Response. + :type next_link: str + :param value: List of available operations. + :type value: list[~azure.mgmt.dataprotection.models.ClientDiscoveryValueForSingleApi] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ClientDiscoveryValueForSingleApi]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["ClientDiscoveryValueForSingleApi"]] = None, + **kwargs + ): + super(ClientDiscoveryResponse, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class ClientDiscoveryValueForSingleApi(msrest.serialization.Model): + """Available operation details. + + :param display: Contains the localized display information for this particular operation. + :type display: ~azure.mgmt.dataprotection.models.ClientDiscoveryDisplay + :param name: Name of the Operation. + :type name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :param origin: The intended executor of the operation;governs the display of the operation in + the RBAC UX and the audit logs UX. + :type origin: str + :param properties: Properties for the given operation. + :type properties: ~azure.mgmt.dataprotection.models.ClientDiscoveryForProperties + """ + + _attribute_map = { + 'display': {'key': 'display', 'type': 'ClientDiscoveryDisplay'}, + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClientDiscoveryForProperties'}, + } + + def __init__( + self, + *, + display: Optional["ClientDiscoveryDisplay"] = None, + name: Optional[str] = None, + is_data_action: Optional[bool] = None, + origin: Optional[str] = None, + properties: Optional["ClientDiscoveryForProperties"] = None, + **kwargs + ): + super(ClientDiscoveryValueForSingleApi, self).__init__(**kwargs) + self.display = display + self.name = name + self.is_data_action = is_data_action + self.origin = origin + self.properties = properties + + +class CopyOption(msrest.serialization.Model): + """Options to copy. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: CopyOnExpiryOption, CustomCopyOption, ImmediateCopyOption. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'CopyOnExpiryOption': 'CopyOnExpiryOption', 'CustomCopyOption': 'CustomCopyOption', 'ImmediateCopyOption': 'ImmediateCopyOption'} + } + + def __init__( + self, + **kwargs + ): + super(CopyOption, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class CopyOnExpiryOption(CopyOption): + """Copy on Expiry Option. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CopyOnExpiryOption, self).__init__(**kwargs) + self.object_type = 'CopyOnExpiryOption' # type: str + + +class CustomCopyOption(CopyOption): + """Duration based custom options to copy. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param duration: Data copied after given timespan. + :type duration: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'duration': {'key': 'duration', 'type': 'str'}, + } + + def __init__( + self, + *, + duration: Optional[str] = None, + **kwargs + ): + super(CustomCopyOption, self).__init__(**kwargs) + self.object_type = 'CustomCopyOption' # type: str + self.duration = duration + + +class Datasource(msrest.serialization.Model): + """Datasource to be backed up. + + All required parameters must be populated in order to send to Azure. + + :param datasource_type: DatasourceType of the resource. + :type datasource_type: str + :param object_type: Type of Datasource object, used to initialize the right inherited type. + :type object_type: str + :param resource_id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. + For non azure resources, this will be the ID created by backup service via Fabric/Vault. + :type resource_id: str + :param resource_location: Location of datasource. + :type resource_location: str + :param resource_name: Unique identifier of the resource in the context of parent. + :type resource_name: str + :param resource_type: Resource Type of Datasource. + :type resource_type: str + :param resource_uri: Uri of the resource. + :type resource_uri: str + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'resource_id': {'key': 'resourceID', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: str, + datasource_type: Optional[str] = None, + object_type: Optional[str] = None, + resource_location: Optional[str] = None, + resource_name: Optional[str] = None, + resource_type: Optional[str] = None, + resource_uri: Optional[str] = None, + **kwargs + ): + super(Datasource, self).__init__(**kwargs) + self.datasource_type = datasource_type + self.object_type = object_type + self.resource_id = resource_id + self.resource_location = resource_location + self.resource_name = resource_name + self.resource_type = resource_type + self.resource_uri = resource_uri + + +class DatasourceSet(msrest.serialization.Model): + """DatasourceSet details of datasource to be backed up. + + All required parameters must be populated in order to send to Azure. + + :param datasource_type: DatasourceType of the resource. + :type datasource_type: str + :param object_type: Type of Datasource object, used to initialize the right inherited type. + :type object_type: str + :param resource_id: Required. Full ARM ID of the resource. For azure resources, this is ARM ID. + For non azure resources, this will be the ID created by backup service via Fabric/Vault. + :type resource_id: str + :param resource_location: Location of datasource. + :type resource_location: str + :param resource_name: Unique identifier of the resource in the context of parent. + :type resource_name: str + :param resource_type: Resource Type of Datasource. + :type resource_type: str + :param resource_uri: Uri of the resource. + :type resource_uri: str + """ + + _validation = { + 'resource_id': {'required': True}, + } + + _attribute_map = { + 'datasource_type': {'key': 'datasourceType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'resource_id': {'key': 'resourceID', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: str, + datasource_type: Optional[str] = None, + object_type: Optional[str] = None, + resource_location: Optional[str] = None, + resource_name: Optional[str] = None, + resource_type: Optional[str] = None, + resource_uri: Optional[str] = None, + **kwargs + ): + super(DatasourceSet, self).__init__(**kwargs) + self.datasource_type = datasource_type + self.object_type = object_type + self.resource_id = resource_id + self.resource_location = resource_location + self.resource_name = resource_name + self.resource_type = resource_type + self.resource_uri = resource_uri + + +class DataStoreInfoBase(msrest.serialization.Model): + """DataStoreInfo base. + + All required parameters must be populated in order to send to Azure. + + :param data_store_type: Required. type of datastore; Operational/Vault/Archive. Possible values + include: "OperationalStore", "VaultStore", "ArchiveStore". + :type data_store_type: str or ~azure.mgmt.dataprotection.models.DataStoreTypes + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type. + :type object_type: str + """ + + _validation = { + 'data_store_type': {'required': True}, + 'object_type': {'required': True}, + } + + _attribute_map = { + 'data_store_type': {'key': 'dataStoreType', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + data_store_type: Union[str, "DataStoreTypes"], + object_type: str, + **kwargs + ): + super(DataStoreInfoBase, self).__init__(**kwargs) + self.data_store_type = data_store_type + self.object_type = object_type + + +class Day(msrest.serialization.Model): + """Day of the week. + + :param date: Date of the month. + :type date: int + :param is_last: Whether Date is last date of month. + :type is_last: bool + """ + + _attribute_map = { + 'date': {'key': 'date', 'type': 'int'}, + 'is_last': {'key': 'isLast', 'type': 'bool'}, + } + + def __init__( + self, + *, + date: Optional[int] = None, + is_last: Optional[bool] = None, + **kwargs + ): + super(Day, self).__init__(**kwargs) + self.date = date + self.is_last = is_last + + +class DppBaseResource(msrest.serialization.Model): + """Base resource under Microsoft.DataProtection provider namespace. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DppBaseResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DppBaseResourceList(msrest.serialization.Model): + """Base for all lists of V2 resources. + + :param value: List of Dpp resources. + :type value: list[~azure.mgmt.dataprotection.models.DppBaseResource] + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DppBaseResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["DppBaseResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(DppBaseResourceList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DppIdentityDetails(msrest.serialization.Model): + """Identity details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The object ID of the service principal object for the managed identity that + is used to grant role-based access to an Azure resource. + :vartype principal_id: str + :ivar tenant_id: A Globally Unique Identifier (GUID) that represents the Azure AD tenant where + the resource is now a member. + :vartype tenant_id: str + :param type: The identityType which can be either SystemAssigned or None. + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + **kwargs + ): + super(DppIdentityDetails, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class DppTrackedResourceList(msrest.serialization.Model): + """DppTrackedResourceList. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(DppTrackedResourceList, self).__init__(**kwargs) + self.next_link = next_link + + +class Error(msrest.serialization.Model): + """The resource management error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.dataprotection.models.ErrorAdditionalInfo] + :ivar code: The error code. + :vartype code: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.dataprotection.models.Error] + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + """ + + _validation = { + 'additional_info': {'readonly': True}, + 'code': {'readonly': True}, + 'details': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + } + + _attribute_map = { + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[Error]'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.additional_info = None + self.code = None + self.details = None + self.message = None + self.target = None + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar info: The additional info. + :vartype info: any + :ivar type: The additional info type. + :vartype type: str + """ + + _validation = { + 'info': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'info': {'key': 'info', 'type': 'object'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.info = None + self.type = None + + +class ExportJobsResult(msrest.serialization.Model): + """The result for export jobs containing blob details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar blob_url: URL of the blob into which the serialized string of list of jobs is exported. + :vartype blob_url: str + :ivar blob_sas_key: SAS key to access the blob. + :vartype blob_sas_key: str + :ivar excel_file_blob_url: URL of the blob into which the ExcelFile is uploaded. + :vartype excel_file_blob_url: str + :ivar excel_file_blob_sas_key: SAS key to access the ExcelFile blob. + :vartype excel_file_blob_sas_key: str + """ + + _validation = { + 'blob_url': {'readonly': True}, + 'blob_sas_key': {'readonly': True}, + 'excel_file_blob_url': {'readonly': True}, + 'excel_file_blob_sas_key': {'readonly': True}, + } + + _attribute_map = { + 'blob_url': {'key': 'blobUrl', 'type': 'str'}, + 'blob_sas_key': {'key': 'blobSasKey', 'type': 'str'}, + 'excel_file_blob_url': {'key': 'excelFileBlobUrl', 'type': 'str'}, + 'excel_file_blob_sas_key': {'key': 'excelFileBlobSasKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExportJobsResult, self).__init__(**kwargs) + self.blob_url = None + self.blob_sas_key = None + self.excel_file_blob_url = None + self.excel_file_blob_sas_key = None + + +class FeatureValidationRequestBase(msrest.serialization.Model): + """Base class for Backup Feature support. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FeatureValidationRequest. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'FeatureValidationRequest': 'FeatureValidationRequest'} + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationRequestBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class FeatureValidationRequest(FeatureValidationRequestBase): + """Base class for feature object. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param feature_type: backup support feature type. Possible values include: "Invalid", + "DataSourceType". + :type feature_type: str or ~azure.mgmt.dataprotection.models.FeatureType + :param feature_name: backup support feature name. + :type feature_name: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'feature_name': {'key': 'featureName', 'type': 'str'}, + } + + def __init__( + self, + *, + feature_type: Optional[Union[str, "FeatureType"]] = None, + feature_name: Optional[str] = None, + **kwargs + ): + super(FeatureValidationRequest, self).__init__(**kwargs) + self.object_type = 'FeatureValidationRequest' # type: str + self.feature_type = feature_type + self.feature_name = feature_name + + +class FeatureValidationResponseBase(msrest.serialization.Model): + """Base class for Backup Feature support. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FeatureValidationResponse. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'FeatureValidationResponse': 'FeatureValidationResponse'} + } + + def __init__( + self, + **kwargs + ): + super(FeatureValidationResponseBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class FeatureValidationResponse(FeatureValidationResponseBase): + """Feature Validation Response. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param feature_type: backup support feature type. Possible values include: "Invalid", + "DataSourceType". + :type feature_type: str or ~azure.mgmt.dataprotection.models.FeatureType + :param features: Response features. + :type features: list[~azure.mgmt.dataprotection.models.SupportedFeature] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'feature_type': {'key': 'featureType', 'type': 'str'}, + 'features': {'key': 'features', 'type': '[SupportedFeature]'}, + } + + def __init__( + self, + *, + feature_type: Optional[Union[str, "FeatureType"]] = None, + features: Optional[List["SupportedFeature"]] = None, + **kwargs + ): + super(FeatureValidationResponse, self).__init__(**kwargs) + self.object_type = 'FeatureValidationResponse' # type: str + self.feature_type = feature_type + self.features = features + + +class ImmediateCopyOption(CopyOption): + """Immediate copy Option. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ImmediateCopyOption, self).__init__(**kwargs) + self.object_type = 'ImmediateCopyOption' # type: str + + +class InnerError(msrest.serialization.Model): + """Inner Error. + + :param additional_info: Any Key value pairs that can be provided to the client for additional + verbose information. + :type additional_info: dict[str, str] + :param code: Unique code for this error. + :type code: str + :param embedded_inner_error: Child Inner Error, to allow Nesting. + :type embedded_inner_error: ~azure.mgmt.dataprotection.models.InnerError + """ + + _attribute_map = { + 'additional_info': {'key': 'additionalInfo', 'type': '{str}'}, + 'code': {'key': 'code', 'type': 'str'}, + 'embedded_inner_error': {'key': 'embeddedInnerError', 'type': 'InnerError'}, + } + + def __init__( + self, + *, + additional_info: Optional[Dict[str, str]] = None, + code: Optional[str] = None, + embedded_inner_error: Optional["InnerError"] = None, + **kwargs + ): + super(InnerError, self).__init__(**kwargs) + self.additional_info = additional_info + self.code = code + self.embedded_inner_error = embedded_inner_error + + +class ItemLevelRestoreCriteria(msrest.serialization.Model): + """Class to contain criteria for item level restore. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RangeBasedItemLevelRestoreCriteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'RangeBasedItemLevelRestoreCriteria': 'RangeBasedItemLevelRestoreCriteria'} + } + + def __init__( + self, + **kwargs + ): + super(ItemLevelRestoreCriteria, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class RestoreTargetInfoBase(msrest.serialization.Model): + """Base class common to RestoreTargetInfo and RestoreFilesTargetInfo. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ItemLevelRestoreTargetInfo, RestoreFilesTargetInfo, RestoreTargetInfo. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~azure.mgmt.dataprotection.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'ItemLevelRestoreTargetInfo': 'ItemLevelRestoreTargetInfo', 'RestoreFilesTargetInfo': 'RestoreFilesTargetInfo', 'RestoreTargetInfo': 'RestoreTargetInfo'} + } + + def __init__( + self, + *, + recovery_option: Union[str, "RecoveryOption"], + restore_location: Optional[str] = None, + **kwargs + ): + super(RestoreTargetInfoBase, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + self.recovery_option = recovery_option + self.restore_location = restore_location + + +class ItemLevelRestoreTargetInfo(RestoreTargetInfoBase): + """Restore target info for Item level restore operation. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~azure.mgmt.dataprotection.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param restore_criteria: Required. Restore Criteria. + :type restore_criteria: list[~azure.mgmt.dataprotection.models.ItemLevelRestoreCriteria] + :param datasource_info: Required. Information of target DS. + :type datasource_info: ~azure.mgmt.dataprotection.models.Datasource + :param datasource_set_info: Information of target DS Set. + :type datasource_set_info: ~azure.mgmt.dataprotection.models.DatasourceSet + :param datasource_auth_credentials: Credentials to use to authenticate with data source + provider. + :type datasource_auth_credentials: ~azure.mgmt.dataprotection.models.AuthCredentials + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'restore_criteria': {'required': True}, + 'datasource_info': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'restore_criteria': {'key': 'restoreCriteria', 'type': '[ItemLevelRestoreCriteria]'}, + 'datasource_info': {'key': 'datasourceInfo', 'type': 'Datasource'}, + 'datasource_set_info': {'key': 'datasourceSetInfo', 'type': 'DatasourceSet'}, + 'datasource_auth_credentials': {'key': 'datasourceAuthCredentials', 'type': 'AuthCredentials'}, + } + + def __init__( + self, + *, + recovery_option: Union[str, "RecoveryOption"], + restore_criteria: List["ItemLevelRestoreCriteria"], + datasource_info: "Datasource", + restore_location: Optional[str] = None, + datasource_set_info: Optional["DatasourceSet"] = None, + datasource_auth_credentials: Optional["AuthCredentials"] = None, + **kwargs + ): + super(ItemLevelRestoreTargetInfo, self).__init__(recovery_option=recovery_option, restore_location=restore_location, **kwargs) + self.object_type = 'ItemLevelRestoreTargetInfo' # type: str + self.restore_criteria = restore_criteria + self.datasource_info = datasource_info + self.datasource_set_info = datasource_set_info + self.datasource_auth_credentials = datasource_auth_credentials + + +class JobExtendedInfo(msrest.serialization.Model): + """Extended Information about the job. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param additional_details: Job's Additional Details. + :type additional_details: dict[str, str] + :ivar backup_instance_state: State of the Backup Instance. + :vartype backup_instance_state: str + :ivar data_transferred_in_bytes: Number of bytes transferred. + :vartype data_transferred_in_bytes: float + :ivar recovery_destination: Destination where restore is done. + :vartype recovery_destination: str + :ivar source_recover_point: Details of the Source Recovery Point. + :vartype source_recover_point: ~azure.mgmt.dataprotection.models.RestoreJobRecoveryPointDetails + :ivar sub_tasks: List of Sub Tasks of the job. + :vartype sub_tasks: list[~azure.mgmt.dataprotection.models.JobSubTask] + :ivar target_recover_point: Details of the Target Recovery Point. + :vartype target_recover_point: ~azure.mgmt.dataprotection.models.RestoreJobRecoveryPointDetails + """ + + _validation = { + 'backup_instance_state': {'readonly': True}, + 'data_transferred_in_bytes': {'readonly': True}, + 'recovery_destination': {'readonly': True}, + 'source_recover_point': {'readonly': True}, + 'sub_tasks': {'readonly': True}, + 'target_recover_point': {'readonly': True}, + } + + _attribute_map = { + 'additional_details': {'key': 'additionalDetails', 'type': '{str}'}, + 'backup_instance_state': {'key': 'backupInstanceState', 'type': 'str'}, + 'data_transferred_in_bytes': {'key': 'dataTransferredInBytes', 'type': 'float'}, + 'recovery_destination': {'key': 'recoveryDestination', 'type': 'str'}, + 'source_recover_point': {'key': 'sourceRecoverPoint', 'type': 'RestoreJobRecoveryPointDetails'}, + 'sub_tasks': {'key': 'subTasks', 'type': '[JobSubTask]'}, + 'target_recover_point': {'key': 'targetRecoverPoint', 'type': 'RestoreJobRecoveryPointDetails'}, + } + + def __init__( + self, + *, + additional_details: Optional[Dict[str, str]] = None, + **kwargs + ): + super(JobExtendedInfo, self).__init__(**kwargs) + self.additional_details = additional_details + self.backup_instance_state = None + self.data_transferred_in_bytes = None + self.recovery_destination = None + self.source_recover_point = None + self.sub_tasks = None + self.target_recover_point = None + + +class JobSubTask(msrest.serialization.Model): + """Details of Job's Sub Task. + + 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 additional_details: Additional details of Sub Tasks. + :type additional_details: dict[str, str] + :param task_id: Required. Task Id of the Sub Task. + :type task_id: int + :param task_name: Required. Name of the Sub Task. + :type task_name: str + :ivar task_progress: Progress of the Sub Task. + :vartype task_progress: str + :param task_status: Required. Status of the Sub Task. + :type task_status: str + """ + + _validation = { + 'task_id': {'required': True}, + 'task_name': {'required': True}, + 'task_progress': {'readonly': True}, + 'task_status': {'required': True}, + } + + _attribute_map = { + 'additional_details': {'key': 'additionalDetails', 'type': '{str}'}, + 'task_id': {'key': 'taskId', 'type': 'int'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'task_progress': {'key': 'taskProgress', 'type': 'str'}, + 'task_status': {'key': 'taskStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + task_id: int, + task_name: str, + task_status: str, + additional_details: Optional[Dict[str, str]] = None, + **kwargs + ): + super(JobSubTask, self).__init__(**kwargs) + self.additional_details = additional_details + self.task_id = task_id + self.task_name = task_name + self.task_progress = None + self.task_status = task_status + + +class OperationExtendedInfo(msrest.serialization.Model): + """Operation Extended Info. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: OperationJobExtendedInfo. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. This property will be used as the discriminator for deciding the + specific types in the polymorphic chain of types.Constant filled by server. + :type object_type: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + _subtype_map = { + 'object_type': {'OperationJobExtendedInfo': 'OperationJobExtendedInfo'} + } + + def __init__( + self, + **kwargs + ): + super(OperationExtendedInfo, self).__init__(**kwargs) + self.object_type = None # type: Optional[str] + + +class OperationJobExtendedInfo(OperationExtendedInfo): + """Operation Job Extended Info. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. This property will be used as the discriminator for deciding the + specific types in the polymorphic chain of types.Constant filled by server. + :type object_type: str + :param job_id: Arm Id of the job created for this operation. + :type job_id: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + } + + def __init__( + self, + *, + job_id: Optional[str] = None, + **kwargs + ): + super(OperationJobExtendedInfo, self).__init__(**kwargs) + self.object_type = 'OperationJobExtendedInfo' # type: str + self.job_id = job_id + + +class OperationResource(msrest.serialization.Model): + """Operation Resource. + + :param end_time: End time of the operation. + :type end_time: ~datetime.datetime + :param error: Required if status == failed or status == canceled. This is the OData v4 error + format, used by the RPC and will go into the v2.2 Azure REST API guidelines. + The full set of optional properties (e.g. inner errors / details) can be found in the "Error + Response" section. + :type error: ~azure.mgmt.dataprotection.models.Error + :param id: It should match what is used to GET the operation result. + :type id: str + :param name: It must match the last segment of the "id" field, and will typically be a GUID / + system generated value. + :type name: str + :param properties: End time of the operation. + :type properties: ~azure.mgmt.dataprotection.models.OperationExtendedInfo + :param start_time: Start time of the operation. + :type start_time: ~datetime.datetime + :param status: + :type status: str + """ + + _attribute_map = { + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'error': {'key': 'error', 'type': 'Error'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'OperationExtendedInfo'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + end_time: Optional[datetime.datetime] = None, + error: Optional["Error"] = None, + id: Optional[str] = None, + name: Optional[str] = None, + properties: Optional["OperationExtendedInfo"] = None, + start_time: Optional[datetime.datetime] = None, + status: Optional[str] = None, + **kwargs + ): + super(OperationResource, self).__init__(**kwargs) + self.end_time = end_time + self.error = error + self.id = id + self.name = name + self.properties = properties + self.start_time = start_time + self.status = status + + +class PatchResourceRequestInput(msrest.serialization.Model): + """Patch Request content for Microsoft.DataProtection resources. + + :param identity: Input Managed Identity Details. + :type identity: ~azure.mgmt.dataprotection.models.DppIdentityDetails + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + identity: Optional["DppIdentityDetails"] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(PatchResourceRequestInput, self).__init__(**kwargs) + self.identity = identity + self.tags = tags + + +class PolicyInfo(msrest.serialization.Model): + """Policy Info in backupInstance. + + 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 policy_id: Required. + :type policy_id: str + :ivar policy_version: + :vartype policy_version: str + :param policy_parameters: Policy parameters for the backup instance. + :type policy_parameters: ~azure.mgmt.dataprotection.models.PolicyParameters + """ + + _validation = { + 'policy_id': {'required': True}, + 'policy_version': {'readonly': True}, + } + + _attribute_map = { + 'policy_id': {'key': 'policyId', 'type': 'str'}, + 'policy_version': {'key': 'policyVersion', 'type': 'str'}, + 'policy_parameters': {'key': 'policyParameters', 'type': 'PolicyParameters'}, + } + + def __init__( + self, + *, + policy_id: str, + policy_parameters: Optional["PolicyParameters"] = None, + **kwargs + ): + super(PolicyInfo, self).__init__(**kwargs) + self.policy_id = policy_id + self.policy_version = None + self.policy_parameters = policy_parameters + + +class PolicyParameters(msrest.serialization.Model): + """Parameters in Policy. + + :param data_store_parameters_list: Gets or sets the DataStore Parameters. + :type data_store_parameters_list: list[~azure.mgmt.dataprotection.models.DataStoreParameters] + """ + + _attribute_map = { + 'data_store_parameters_list': {'key': 'dataStoreParametersList', 'type': '[DataStoreParameters]'}, + } + + def __init__( + self, + *, + data_store_parameters_list: Optional[List["DataStoreParameters"]] = None, + **kwargs + ): + super(PolicyParameters, self).__init__(**kwargs) + self.data_store_parameters_list = data_store_parameters_list + + +class ProtectionStatusDetails(msrest.serialization.Model): + """Protection status details. + + :param error_details: Specifies the protection status error of the resource. + :type error_details: ~azure.mgmt.dataprotection.models.UserFacingError + :param status: Specifies the protection status of the resource. Possible values include: + "ConfiguringProtection", "ConfiguringProtectionFailed", "ProtectionConfigured", + "ProtectionStopped", "SoftDeleted", "SoftDeleting". + :type status: str or ~azure.mgmt.dataprotection.models.Status + """ + + _attribute_map = { + 'error_details': {'key': 'errorDetails', 'type': 'UserFacingError'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + error_details: Optional["UserFacingError"] = None, + status: Optional[Union[str, "Status"]] = None, + **kwargs + ): + super(ProtectionStatusDetails, self).__init__(**kwargs) + self.error_details = error_details + self.status = status + + +class RangeBasedItemLevelRestoreCriteria(ItemLevelRestoreCriteria): + """Item Level target info for restore operation. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param min_matching_value: minimum value for range prefix match. + :type min_matching_value: str + :param max_matching_value: maximum value for range prefix match. + :type max_matching_value: str + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'min_matching_value': {'key': 'minMatchingValue', 'type': 'str'}, + 'max_matching_value': {'key': 'maxMatchingValue', 'type': 'str'}, + } + + def __init__( + self, + *, + min_matching_value: Optional[str] = None, + max_matching_value: Optional[str] = None, + **kwargs + ): + super(RangeBasedItemLevelRestoreCriteria, self).__init__(**kwargs) + self.object_type = 'RangeBasedItemLevelRestoreCriteria' # type: str + self.min_matching_value = min_matching_value + self.max_matching_value = max_matching_value + + +class RecoveryPointDataStoreDetails(msrest.serialization.Model): + """RecoveryPoint datastore details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param creation_time: + :type creation_time: ~datetime.datetime + :param expiry_time: + :type expiry_time: ~datetime.datetime + :param id: + :type id: str + :param meta_data: + :type meta_data: str + :param state: + :type state: str + :param type: + :type type: str + :param visible: + :type visible: bool + :ivar rehydration_expiry_time: + :vartype rehydration_expiry_time: ~datetime.datetime + :ivar rehydration_status: Possible values include: "CREATE_IN_PROGRESS", "COMPLETED", + "DELETE_IN_PROGRESS", "DELETED", "FAILED". + :vartype rehydration_status: str or ~azure.mgmt.dataprotection.models.RehydrationStatus + """ + + _validation = { + 'rehydration_expiry_time': {'readonly': True}, + 'rehydration_status': {'readonly': True}, + } + + _attribute_map = { + 'creation_time': {'key': 'creationTime', 'type': 'iso-8601'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'iso-8601'}, + 'id': {'key': 'id', 'type': 'str'}, + 'meta_data': {'key': 'metaData', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'visible': {'key': 'visible', 'type': 'bool'}, + 'rehydration_expiry_time': {'key': 'rehydrationExpiryTime', 'type': 'iso-8601'}, + 'rehydration_status': {'key': 'rehydrationStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + creation_time: Optional[datetime.datetime] = None, + expiry_time: Optional[datetime.datetime] = None, + id: Optional[str] = None, + meta_data: Optional[str] = None, + state: Optional[str] = None, + type: Optional[str] = None, + visible: Optional[bool] = None, + **kwargs + ): + super(RecoveryPointDataStoreDetails, self).__init__(**kwargs) + self.creation_time = creation_time + self.expiry_time = expiry_time + self.id = id + self.meta_data = meta_data + self.state = state + self.type = type + self.visible = visible + self.rehydration_expiry_time = None + self.rehydration_status = None + + +class RecoveryPointsFilters(msrest.serialization.Model): + """RecoveryPointsFilters. + + :param restore_point_data_store_id: + :type restore_point_data_store_id: str + :param is_visible: + :type is_visible: bool + :param start_date: + :type start_date: str + :param end_date: + :type end_date: str + :param extended_info: + :type extended_info: bool + :param restore_point_state: + :type restore_point_state: str + """ + + _attribute_map = { + 'restore_point_data_store_id': {'key': 'restorePointDataStoreId', 'type': 'str'}, + 'is_visible': {'key': 'isVisible', 'type': 'bool'}, + 'start_date': {'key': 'startDate', 'type': 'str'}, + 'end_date': {'key': 'endDate', 'type': 'str'}, + 'extended_info': {'key': 'extendedInfo', 'type': 'bool'}, + 'restore_point_state': {'key': 'restorePointState', 'type': 'str'}, + } + + def __init__( + self, + *, + restore_point_data_store_id: Optional[str] = None, + is_visible: Optional[bool] = None, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + extended_info: Optional[bool] = None, + restore_point_state: Optional[str] = None, + **kwargs + ): + super(RecoveryPointsFilters, self).__init__(**kwargs) + self.restore_point_data_store_id = restore_point_data_store_id + self.is_visible = is_visible + self.start_date = start_date + self.end_date = end_date + self.extended_info = extended_info + self.restore_point_state = restore_point_state + + +class ResourceGuard(msrest.serialization.Model): + """ResourceGuard. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provisioning_state: Provisioning state of the BackupVault resource. Possible values + include: "Failed", "Provisioning", "Succeeded", "Unknown", "Updating". + :vartype provisioning_state: str or ~azure.mgmt.dataprotection.models.ProvisioningState + :ivar allow_auto_approvals: This flag indicates whether auto approval is allowed or not. + :vartype allow_auto_approvals: bool + :ivar resource_guard_operations: {readonly} List of operation details those are protected by + the ResourceGuard resource. + :vartype resource_guard_operations: + list[~azure.mgmt.dataprotection.models.ResourceGuardOperation] + :ivar vault_critical_operation_exclusion_list: List of critical operations which are not + protected by this resourceGuard. + :vartype vault_critical_operation_exclusion_list: list[str] + :ivar description: Description about the pre-req steps to perform all the critical operations. + :vartype description: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'allow_auto_approvals': {'readonly': True}, + 'resource_guard_operations': {'readonly': True}, + 'vault_critical_operation_exclusion_list': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'allow_auto_approvals': {'key': 'allowAutoApprovals', 'type': 'bool'}, + 'resource_guard_operations': {'key': 'resourceGuardOperations', 'type': '[ResourceGuardOperation]'}, + 'vault_critical_operation_exclusion_list': {'key': 'vaultCriticalOperationExclusionList', 'type': '[str]'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuard, self).__init__(**kwargs) + self.provisioning_state = None + self.allow_auto_approvals = None + self.resource_guard_operations = None + self.vault_critical_operation_exclusion_list = None + self.description = None + + +class ResourceGuardOperation(msrest.serialization.Model): + """This class contains all the details about a critical operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vault_critical_operation: Name of the critical operation. + :vartype vault_critical_operation: str + :ivar request_resource_type: Type of resource request. + :vartype request_resource_type: str + """ + + _validation = { + 'vault_critical_operation': {'readonly': True}, + 'request_resource_type': {'readonly': True}, + } + + _attribute_map = { + 'vault_critical_operation': {'key': 'vaultCriticalOperation', 'type': 'str'}, + 'request_resource_type': {'key': 'requestResourceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuardOperation, self).__init__(**kwargs) + self.vault_critical_operation = None + self.request_resource_type = None + + +class ResourceGuardResource(DppTrackedResource): + """ResourceGuardResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param e_tag: Optional ETag. + :type e_tag: str + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :param identity: Input Managed Identity Details. + :type identity: ~azure.mgmt.dataprotection.models.DppIdentityDetails + :param location: Resource location. + :type location: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.dataprotection.models.SystemData + :param properties: ResourceGuardResource properties. + :type properties: ~azure.mgmt.dataprotection.models.ResourceGuard + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'DppIdentityDetails'}, + 'location': {'key': 'location', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ResourceGuard'}, + } + + def __init__( + self, + *, + e_tag: Optional[str] = None, + identity: Optional["DppIdentityDetails"] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + properties: Optional["ResourceGuard"] = None, + **kwargs + ): + super(ResourceGuardResource, self).__init__(e_tag=e_tag, identity=identity, location=location, tags=tags, **kwargs) + self.properties = properties + + +class ResourceGuardResourceList(DppTrackedResourceList): + """List of ResourceGuard resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.dataprotection.models.ResourceGuardResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ResourceGuardResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["ResourceGuardResource"]] = None, + **kwargs + ): + super(ResourceGuardResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + +class ResourceMoveDetails(msrest.serialization.Model): + """ResourceMoveDetails will be returned in response to GetResource call from ARM. + + :param operation_id: CorrelationId of latest ResourceMove operation attempted. + :type operation_id: str + :param start_time_utc: Start time in UTC of latest ResourceMove operation attempted. ISO 8601 + format. + :type start_time_utc: str + :param completion_time_utc: Completion time in UTC of latest ResourceMove operation attempted. + ISO 8601 format. + :type completion_time_utc: str + :param source_resource_path: ARM resource path of source resource. + :type source_resource_path: str + :param target_resource_path: ARM resource path of target resource used in latest ResourceMove + operation. + :type target_resource_path: str + """ + + _attribute_map = { + 'operation_id': {'key': 'operationId', 'type': 'str'}, + 'start_time_utc': {'key': 'startTimeUtc', 'type': 'str'}, + 'completion_time_utc': {'key': 'completionTimeUtc', 'type': 'str'}, + 'source_resource_path': {'key': 'sourceResourcePath', 'type': 'str'}, + 'target_resource_path': {'key': 'targetResourcePath', 'type': 'str'}, + } + + def __init__( + self, + *, + operation_id: Optional[str] = None, + start_time_utc: Optional[str] = None, + completion_time_utc: Optional[str] = None, + source_resource_path: Optional[str] = None, + target_resource_path: Optional[str] = None, + **kwargs + ): + super(ResourceMoveDetails, self).__init__(**kwargs) + self.operation_id = operation_id + self.start_time_utc = start_time_utc + self.completion_time_utc = completion_time_utc + self.source_resource_path = source_resource_path + self.target_resource_path = target_resource_path + + +class RestorableTimeRange(msrest.serialization.Model): + """RestorableTimeRange. + + All required parameters must be populated in order to send to Azure. + + :param start_time: Required. Start time for the available restore range. + :type start_time: str + :param end_time: Required. End time for the available restore range. + :type end_time: str + :param object_type: + :type object_type: str + """ + + _validation = { + 'start_time': {'required': True}, + 'end_time': {'required': True}, + } + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'object_type': {'key': 'objectType', 'type': 'str'}, + } + + def __init__( + self, + *, + start_time: str, + end_time: str, + object_type: Optional[str] = None, + **kwargs + ): + super(RestorableTimeRange, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.object_type = object_type + + +class RestoreFilesTargetInfo(RestoreTargetInfoBase): + """Class encapsulating restore as files target parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~azure.mgmt.dataprotection.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param target_details: Required. Destination of RestoreAsFiles operation, when destination is + not a datasource. + :type target_details: ~azure.mgmt.dataprotection.models.TargetDetails + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'target_details': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'target_details': {'key': 'targetDetails', 'type': 'TargetDetails'}, + } + + def __init__( + self, + *, + recovery_option: Union[str, "RecoveryOption"], + target_details: "TargetDetails", + restore_location: Optional[str] = None, + **kwargs + ): + super(RestoreFilesTargetInfo, self).__init__(recovery_option=recovery_option, restore_location=restore_location, **kwargs) + self.object_type = 'RestoreFilesTargetInfo' # type: str + self.target_details = target_details + + +class RestoreJobRecoveryPointDetails(msrest.serialization.Model): + """RestoreJobRecoveryPointDetails. + + :param recovery_point_id: + :type recovery_point_id: str + :param recovery_point_time: + :type recovery_point_time: ~datetime.datetime + """ + + _attribute_map = { + 'recovery_point_id': {'key': 'recoveryPointID', 'type': 'str'}, + 'recovery_point_time': {'key': 'recoveryPointTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + recovery_point_id: Optional[str] = None, + recovery_point_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(RestoreJobRecoveryPointDetails, self).__init__(**kwargs) + self.recovery_point_id = recovery_point_id + self.recovery_point_time = recovery_point_time + + +class RestoreTargetInfo(RestoreTargetInfoBase): + """Class encapsulating restore target parameters. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of Datasource object, used to initialize the right inherited + type.Constant filled by server. + :type object_type: str + :param recovery_option: Required. Recovery Option. Possible values include: "FailIfExists". + :type recovery_option: str or ~azure.mgmt.dataprotection.models.RecoveryOption + :param restore_location: Target Restore region. + :type restore_location: str + :param datasource_info: Required. Information of target DS. + :type datasource_info: ~azure.mgmt.dataprotection.models.Datasource + :param datasource_set_info: Information of target DS Set. + :type datasource_set_info: ~azure.mgmt.dataprotection.models.DatasourceSet + :param datasource_auth_credentials: Credentials to use to authenticate with data source + provider. + :type datasource_auth_credentials: ~azure.mgmt.dataprotection.models.AuthCredentials + """ + + _validation = { + 'object_type': {'required': True}, + 'recovery_option': {'required': True}, + 'datasource_info': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_option': {'key': 'recoveryOption', 'type': 'str'}, + 'restore_location': {'key': 'restoreLocation', 'type': 'str'}, + 'datasource_info': {'key': 'datasourceInfo', 'type': 'Datasource'}, + 'datasource_set_info': {'key': 'datasourceSetInfo', 'type': 'DatasourceSet'}, + 'datasource_auth_credentials': {'key': 'datasourceAuthCredentials', 'type': 'AuthCredentials'}, + } + + def __init__( + self, + *, + recovery_option: Union[str, "RecoveryOption"], + datasource_info: "Datasource", + restore_location: Optional[str] = None, + datasource_set_info: Optional["DatasourceSet"] = None, + datasource_auth_credentials: Optional["AuthCredentials"] = None, + **kwargs + ): + super(RestoreTargetInfo, self).__init__(recovery_option=recovery_option, restore_location=restore_location, **kwargs) + self.object_type = 'RestoreTargetInfo' # type: str + self.datasource_info = datasource_info + self.datasource_set_info = datasource_set_info + self.datasource_auth_credentials = datasource_auth_credentials + + +class RetentionTag(msrest.serialization.Model): + """Retention tag. + + 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. + + :ivar e_tag: Retention Tag version. + :vartype e_tag: str + :ivar id: Retention Tag version. + :vartype id: str + :param tag_name: Required. Retention Tag Name to relate it to retention rule. + :type tag_name: str + """ + + _validation = { + 'e_tag': {'readonly': True}, + 'id': {'readonly': True}, + 'tag_name': {'required': True}, + } + + _attribute_map = { + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'tag_name': {'key': 'tagName', 'type': 'str'}, + } + + def __init__( + self, + *, + tag_name: str, + **kwargs + ): + super(RetentionTag, self).__init__(**kwargs) + self.e_tag = None + self.id = None + self.tag_name = tag_name + + +class ScheduleBasedBackupCriteria(BackupCriteria): + """Schedule based backup criteria. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param absolute_criteria: it contains absolute values like "AllBackup" / "FirstOfDay" / + "FirstOfWeek" / "FirstOfMonth" + and should be part of AbsoluteMarker enum. + :type absolute_criteria: list[str or ~azure.mgmt.dataprotection.models.AbsoluteMarker] + :param days_of_month: This is day of the month from 1 to 28 other wise last of month. + :type days_of_month: list[~azure.mgmt.dataprotection.models.Day] + :param days_of_the_week: It should be Sunday/Monday/T..../Saturday. + :type days_of_the_week: list[str or ~azure.mgmt.dataprotection.models.DayOfWeek] + :param months_of_year: It should be January/February/....../December. + :type months_of_year: list[str or ~azure.mgmt.dataprotection.models.Month] + :param schedule_times: List of schedule times for backup. + :type schedule_times: list[~datetime.datetime] + :param weeks_of_the_month: It should be First/Second/Third/Fourth/Last. + :type weeks_of_the_month: list[str or ~azure.mgmt.dataprotection.models.WeekNumber] + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'absolute_criteria': {'key': 'absoluteCriteria', 'type': '[str]'}, + 'days_of_month': {'key': 'daysOfMonth', 'type': '[Day]'}, + 'days_of_the_week': {'key': 'daysOfTheWeek', 'type': '[str]'}, + 'months_of_year': {'key': 'monthsOfYear', 'type': '[str]'}, + 'schedule_times': {'key': 'scheduleTimes', 'type': '[iso-8601]'}, + 'weeks_of_the_month': {'key': 'weeksOfTheMonth', 'type': '[str]'}, + } + + def __init__( + self, + *, + absolute_criteria: Optional[List[Union[str, "AbsoluteMarker"]]] = None, + days_of_month: Optional[List["Day"]] = None, + days_of_the_week: Optional[List[Union[str, "DayOfWeek"]]] = None, + months_of_year: Optional[List[Union[str, "Month"]]] = None, + schedule_times: Optional[List[datetime.datetime]] = None, + weeks_of_the_month: Optional[List[Union[str, "WeekNumber"]]] = None, + **kwargs + ): + super(ScheduleBasedBackupCriteria, self).__init__(**kwargs) + self.object_type = 'ScheduleBasedBackupCriteria' # type: str + self.absolute_criteria = absolute_criteria + self.days_of_month = days_of_month + self.days_of_the_week = days_of_the_week + self.months_of_year = months_of_year + self.schedule_times = schedule_times + self.weeks_of_the_month = weeks_of_the_month + + +class ScheduleBasedTriggerContext(TriggerContext): + """Schedule based trigger context. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param schedule: Required. Schedule for this backup. + :type schedule: ~azure.mgmt.dataprotection.models.BackupSchedule + :param tagging_criteria: Required. List of tags that can be applicable for given schedule. + :type tagging_criteria: list[~azure.mgmt.dataprotection.models.TaggingCriteria] + """ + + _validation = { + 'object_type': {'required': True}, + 'schedule': {'required': True}, + 'tagging_criteria': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'BackupSchedule'}, + 'tagging_criteria': {'key': 'taggingCriteria', 'type': '[TaggingCriteria]'}, + } + + def __init__( + self, + *, + schedule: "BackupSchedule", + tagging_criteria: List["TaggingCriteria"], + **kwargs + ): + super(ScheduleBasedTriggerContext, self).__init__(**kwargs) + self.object_type = 'ScheduleBasedTriggerContext' # type: str + self.schedule = schedule + self.tagging_criteria = tagging_criteria + + +class SecretStoreBasedAuthCredentials(AuthCredentials): + """Secret store based authentication credentials. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. Type of the specific object - used for deserializing.Constant + filled by server. + :type object_type: str + :param secret_store_resource: Secret store resource. + :type secret_store_resource: ~azure.mgmt.dataprotection.models.SecretStoreResource + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'secret_store_resource': {'key': 'secretStoreResource', 'type': 'SecretStoreResource'}, + } + + def __init__( + self, + *, + secret_store_resource: Optional["SecretStoreResource"] = None, + **kwargs + ): + super(SecretStoreBasedAuthCredentials, self).__init__(**kwargs) + self.object_type = 'SecretStoreBasedAuthCredentials' # type: str + self.secret_store_resource = secret_store_resource + + +class SecretStoreResource(msrest.serialization.Model): + """Class representing a secret store resource. + + All required parameters must be populated in order to send to Azure. + + :param uri: Uri to get to the resource. + :type uri: str + :param secret_store_type: Required. Gets or sets the type of secret store. Possible values + include: "Invalid", "AzureKeyVault". + :type secret_store_type: str or ~azure.mgmt.dataprotection.models.SecretStoreType + """ + + _validation = { + 'secret_store_type': {'required': True}, + } + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + 'secret_store_type': {'key': 'secretStoreType', 'type': 'str'}, + } + + def __init__( + self, + *, + secret_store_type: Union[str, "SecretStoreType"], + uri: Optional[str] = None, + **kwargs + ): + super(SecretStoreResource, self).__init__(**kwargs) + self.uri = uri + self.secret_store_type = secret_store_type + + +class SourceLifeCycle(msrest.serialization.Model): + """Source LifeCycle. + + All required parameters must be populated in order to send to Azure. + + :param delete_after: Required. Delete Option. + :type delete_after: ~azure.mgmt.dataprotection.models.DeleteOption + :param source_data_store: Required. DataStoreInfo base. + :type source_data_store: ~azure.mgmt.dataprotection.models.DataStoreInfoBase + :param target_data_store_copy_settings: + :type target_data_store_copy_settings: + list[~azure.mgmt.dataprotection.models.TargetCopySetting] + """ + + _validation = { + 'delete_after': {'required': True}, + 'source_data_store': {'required': True}, + } + + _attribute_map = { + 'delete_after': {'key': 'deleteAfter', 'type': 'DeleteOption'}, + 'source_data_store': {'key': 'sourceDataStore', 'type': 'DataStoreInfoBase'}, + 'target_data_store_copy_settings': {'key': 'targetDataStoreCopySettings', 'type': '[TargetCopySetting]'}, + } + + def __init__( + self, + *, + delete_after: "DeleteOption", + source_data_store: "DataStoreInfoBase", + target_data_store_copy_settings: Optional[List["TargetCopySetting"]] = None, + **kwargs + ): + super(SourceLifeCycle, self).__init__(**kwargs) + self.delete_after = delete_after + self.source_data_store = source_data_store + self.target_data_store_copy_settings = target_data_store_copy_settings + + +class StorageSetting(msrest.serialization.Model): + """Storage setting. + + :param datastore_type: Gets or sets the type of the datastore. Possible values include: + "ArchiveStore", "SnapshotStore", "VaultStore". + :type datastore_type: str or ~azure.mgmt.dataprotection.models.StorageSettingStoreTypes + :param type: Gets or sets the type. Possible values include: "GeoRedundant", + "LocallyRedundant". + :type type: str or ~azure.mgmt.dataprotection.models.StorageSettingTypes + """ + + _attribute_map = { + 'datastore_type': {'key': 'datastoreType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + datastore_type: Optional[Union[str, "StorageSettingStoreTypes"]] = None, + type: Optional[Union[str, "StorageSettingTypes"]] = None, + **kwargs + ): + super(StorageSetting, self).__init__(**kwargs) + self.datastore_type = datastore_type + self.type = type + + +class SupportedFeature(msrest.serialization.Model): + """Elements class for feature request. + + :param feature_name: support feature type. + :type feature_name: str + :param support_status: feature support status. Possible values include: "Invalid", + "NotSupported", "AlphaPreview", "PrivatePreview", "PublicPreview", "GenerallyAvailable". + :type support_status: str or ~azure.mgmt.dataprotection.models.FeatureSupportStatus + :param exposure_controlled_features: support feature type. + :type exposure_controlled_features: list[str] + """ + + _attribute_map = { + 'feature_name': {'key': 'featureName', 'type': 'str'}, + 'support_status': {'key': 'supportStatus', 'type': 'str'}, + 'exposure_controlled_features': {'key': 'exposureControlledFeatures', 'type': '[str]'}, + } + + def __init__( + self, + *, + feature_name: Optional[str] = None, + support_status: Optional[Union[str, "FeatureSupportStatus"]] = None, + exposure_controlled_features: Optional[List[str]] = None, + **kwargs + ): + super(SupportedFeature, self).__init__(**kwargs) + self.feature_name = feature_name + self.support_status = support_status + self.exposure_controlled_features = exposure_controlled_features + + +class SystemData(msrest.serialization.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.dataprotection.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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.dataprotection.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 TaggingCriteria(msrest.serialization.Model): + """Tagging criteria. + + All required parameters must be populated in order to send to Azure. + + :param criteria: Criteria which decides whether the tag can be applied to a triggered backup. + :type criteria: list[~azure.mgmt.dataprotection.models.BackupCriteria] + :param is_default: Required. Specifies if tag is default. + :type is_default: bool + :param tagging_priority: Required. Retention Tag priority. + :type tagging_priority: long + :param tag_info: Required. Retention tag information. + :type tag_info: ~azure.mgmt.dataprotection.models.RetentionTag + """ + + _validation = { + 'is_default': {'required': True}, + 'tagging_priority': {'required': True}, + 'tag_info': {'required': True}, + } + + _attribute_map = { + 'criteria': {'key': 'criteria', 'type': '[BackupCriteria]'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'tagging_priority': {'key': 'taggingPriority', 'type': 'long'}, + 'tag_info': {'key': 'tagInfo', 'type': 'RetentionTag'}, + } + + def __init__( + self, + *, + is_default: bool, + tagging_priority: int, + tag_info: "RetentionTag", + criteria: Optional[List["BackupCriteria"]] = None, + **kwargs + ): + super(TaggingCriteria, self).__init__(**kwargs) + self.criteria = criteria + self.is_default = is_default + self.tagging_priority = tagging_priority + self.tag_info = tag_info + + +class TargetCopySetting(msrest.serialization.Model): + """Target copy settings. + + All required parameters must be populated in order to send to Azure. + + :param copy_after: Required. It can be CustomCopyOption or ImmediateCopyOption. + :type copy_after: ~azure.mgmt.dataprotection.models.CopyOption + :param data_store: Required. Info of target datastore. + :type data_store: ~azure.mgmt.dataprotection.models.DataStoreInfoBase + """ + + _validation = { + 'copy_after': {'required': True}, + 'data_store': {'required': True}, + } + + _attribute_map = { + 'copy_after': {'key': 'copyAfter', 'type': 'CopyOption'}, + 'data_store': {'key': 'dataStore', 'type': 'DataStoreInfoBase'}, + } + + def __init__( + self, + *, + copy_after: "CopyOption", + data_store: "DataStoreInfoBase", + **kwargs + ): + super(TargetCopySetting, self).__init__(**kwargs) + self.copy_after = copy_after + self.data_store = data_store + + +class TargetDetails(msrest.serialization.Model): + """Class encapsulating target details, used where the destination is not a datasource. + + All required parameters must be populated in order to send to Azure. + + :param file_prefix: Required. Restore operation may create multiple files inside location + pointed by Url + Below will be the common prefix for all of them. + :type file_prefix: str + :param restore_target_location_type: Required. Denotes the target location where the data will + be restored, + string value for the enum + {Microsoft.Internal.AzureBackup.DataProtection.Common.Interface.RestoreTargetLocationType}. + Possible values include: "Invalid", "AzureBlobs", "AzureFiles". + :type restore_target_location_type: str or + ~azure.mgmt.dataprotection.models.RestoreTargetLocationType + :param url: Required. Url denoting the restore destination. It can point to container / file + share etc. + :type url: str + """ + + _validation = { + 'file_prefix': {'required': True}, + 'restore_target_location_type': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'file_prefix': {'key': 'filePrefix', 'type': 'str'}, + 'restore_target_location_type': {'key': 'restoreTargetLocationType', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + *, + file_prefix: str, + restore_target_location_type: Union[str, "RestoreTargetLocationType"], + url: str, + **kwargs + ): + super(TargetDetails, self).__init__(**kwargs) + self.file_prefix = file_prefix + self.restore_target_location_type = restore_target_location_type + self.url = url + + +class TriggerBackupRequest(msrest.serialization.Model): + """Trigger backup request. + + All required parameters must be populated in order to send to Azure. + + :param backup_rule_options: Required. Name for the Rule of the Policy which needs to be applied + for this backup. + :type backup_rule_options: ~azure.mgmt.dataprotection.models.AdHocBackupRuleOptions + """ + + _validation = { + 'backup_rule_options': {'required': True}, + } + + _attribute_map = { + 'backup_rule_options': {'key': 'backupRuleOptions', 'type': 'AdHocBackupRuleOptions'}, + } + + def __init__( + self, + *, + backup_rule_options: "AdHocBackupRuleOptions", + **kwargs + ): + super(TriggerBackupRequest, self).__init__(**kwargs) + self.backup_rule_options = backup_rule_options + + +class UserFacingError(msrest.serialization.Model): + """Error object used by layers that have access to localized content, and propagate that to user. + + :param code: Unique code for this error. + :type code: str + :param details: Additional related Errors. + :type details: list[~azure.mgmt.dataprotection.models.UserFacingError] + :param inner_error: Inner Error. + :type inner_error: ~azure.mgmt.dataprotection.models.InnerError + :param is_retryable: Whether the operation will be retryable or not. + :type is_retryable: bool + :param is_user_error: Whether the operation is due to a user error or service error. + :type is_user_error: bool + :param properties: Any key value pairs that can be injected inside error object. + :type properties: dict[str, str] + :param message: + :type message: str + :param recommended_action: RecommendedAction � localized. + :type recommended_action: list[str] + :param target: Target of the error. + :type target: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[UserFacingError]'}, + 'inner_error': {'key': 'innerError', 'type': 'InnerError'}, + 'is_retryable': {'key': 'isRetryable', 'type': 'bool'}, + 'is_user_error': {'key': 'isUserError', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + 'message': {'key': 'message', 'type': 'str'}, + 'recommended_action': {'key': 'recommendedAction', 'type': '[str]'}, + 'target': {'key': 'target', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + details: Optional[List["UserFacingError"]] = None, + inner_error: Optional["InnerError"] = None, + is_retryable: Optional[bool] = None, + is_user_error: Optional[bool] = None, + properties: Optional[Dict[str, str]] = None, + message: Optional[str] = None, + recommended_action: Optional[List[str]] = None, + target: Optional[str] = None, + **kwargs + ): + super(UserFacingError, self).__init__(**kwargs) + self.code = code + self.details = details + self.inner_error = inner_error + self.is_retryable = is_retryable + self.is_user_error = is_user_error + self.properties = properties + self.message = message + self.recommended_action = recommended_action + self.target = target + + +class ValidateForBackupRequest(msrest.serialization.Model): + """Validate for backup request. + + All required parameters must be populated in order to send to Azure. + + :param backup_instance: Required. Backup Instance. + :type backup_instance: ~azure.mgmt.dataprotection.models.BackupInstance + """ + + _validation = { + 'backup_instance': {'required': True}, + } + + _attribute_map = { + 'backup_instance': {'key': 'backupInstance', 'type': 'BackupInstance'}, + } + + def __init__( + self, + *, + backup_instance: "BackupInstance", + **kwargs + ): + super(ValidateForBackupRequest, self).__init__(**kwargs) + self.backup_instance = backup_instance + + +class ValidateRestoreRequestObject(msrest.serialization.Model): + """Validate restore request object. + + All required parameters must be populated in order to send to Azure. + + :param restore_request_object: Required. Gets or sets the restore request object. + :type restore_request_object: ~azure.mgmt.dataprotection.models.AzureBackupRestoreRequest + """ + + _validation = { + 'restore_request_object': {'required': True}, + } + + _attribute_map = { + 'restore_request_object': {'key': 'restoreRequestObject', 'type': 'AzureBackupRestoreRequest'}, + } + + def __init__( + self, + *, + restore_request_object: "AzureBackupRestoreRequest", + **kwargs + ): + super(ValidateRestoreRequestObject, self).__init__(**kwargs) + self.restore_request_object = restore_request_object diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/__init__.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/__init__.py new file mode 100644 index 000000000000..f9c765bb82a0 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/__init__.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._backup_vaults_operations import BackupVaultsOperations +from ._operation_result_operations import OperationResultOperations +from ._operation_status_operations import OperationStatusOperations +from ._backup_vault_operation_results_operations import BackupVaultOperationResultsOperations +from ._data_protection_operations import DataProtectionOperations +from ._data_protection_operations_operations import DataProtectionOperationsOperations +from ._backup_policies_operations import BackupPoliciesOperations +from ._backup_instances_operations import BackupInstancesOperations +from ._recovery_points_operations import RecoveryPointsOperations +from ._jobs_operations import JobsOperations +from ._restorable_time_ranges_operations import RestorableTimeRangesOperations +from ._export_jobs_operations import ExportJobsOperations +from ._export_jobs_operation_result_operations import ExportJobsOperationResultOperations +from ._resource_guards_operations import ResourceGuardsOperations + +__all__ = [ + 'BackupVaultsOperations', + 'OperationResultOperations', + 'OperationStatusOperations', + 'BackupVaultOperationResultsOperations', + 'DataProtectionOperations', + 'DataProtectionOperationsOperations', + 'BackupPoliciesOperations', + 'BackupInstancesOperations', + 'RecoveryPointsOperations', + 'JobsOperations', + 'RestorableTimeRangesOperations', + 'ExportJobsOperations', + 'ExportJobsOperationResultOperations', + 'ResourceGuardsOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuits_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_instances_operations.py similarity index 58% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuits_operations.py rename to sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_instances_operations.py index a1ee90a2590e..68829a4eb021 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuits_operations.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_instances_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitsOperations(object): - """ExpressRouteCircuitsOperations operations. +class BackupInstancesOperations(object): + """BackupInstancesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.dataprotection.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,146 +47,117 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def list( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Iterable["_models.BackupInstanceResourceList"] + """Gets a backup instances belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupInstanceResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.BackupInstanceResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInstanceResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-07-01" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupInstanceResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - def begin_delete( - self, - resource_group_name, # type: str - circuit_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified express route circuit. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return ItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances'} # type: ignore def get( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str + backup_instance_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuit" - """Gets information about the specified express route circuit. + # type: (...) -> "_models.BackupInstanceResource" + """Gets a backup instance with name in a backup vault. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of express route circuit. - :type circuit_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuit, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit + :return: BackupInstanceResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BackupInstanceResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInstanceResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -206,37 +177,39 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore def _create_or_update_initial( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str - parameters, # type: "_models.ExpressRouteCircuit" + backup_instance_name, # type: str + parameters, # type: "_models.BackupInstanceResource" **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuit" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + # type: (...) -> "_models.BackupInstanceResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInstanceResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-07-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -250,7 +223,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ExpressRouteCircuit') + body_content = self._serialize.body(parameters, 'BackupInstanceResource') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -261,45 +234,48 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore def begin_create_or_update( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str - parameters, # type: "_models.ExpressRouteCircuit" + backup_instance_name, # type: str + parameters, # type: "_models.BackupInstanceResource" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuit"] - """Creates or updates an express route circuit. + # type: (...) -> LROPoller["_models.BackupInstanceResource"] + """Create or update a backup instance in a backup vault. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :param parameters: Parameters supplied to the create or update express route circuit operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.BackupInstanceResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit] + :return: An instance of LROPoller that returns either BackupInstanceResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.dataprotection.models.BackupInstanceResource] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupInstanceResource"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -307,8 +283,9 @@ def begin_create_or_update( cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: raw_result = self._create_or_update_initial( + vault_name=vault_name, resource_group_name=resource_group_name, - circuit_name=circuit_name, + backup_instance_name=backup_instance_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -318,16 +295,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('BackupInstanceResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -342,31 +320,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore - def _update_tags_initial( + def _delete_initial( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str - parameters, # type: "_models.TagsObject" + backup_instance_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuit" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -376,66 +354,65 @@ def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, response_headers) - return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore - def begin_update_tags( + def begin_delete( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str - parameters, # type: "_models.TagsObject" + backup_instance_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuit"] - """Updates an express route circuit tags. + # type: (...) -> LROPoller[None] + """Delete a backup instance in a backup vault. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :param parameters: Parameters supplied to update express route circuit tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._update_tags_initial( + raw_result = self._delete_initial( + vault_name=vault_name, resource_group_name=resource_group_name, - circuit_name=circuit_name, - parameters=parameters, + backup_instance_name=backup_instance_name, cls=lambda x,y,z: x, **kwargs ) @@ -444,16 +421,14 @@ def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -468,33 +443,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}'} # type: ignore - def _list_arp_table_initial( + def _adhoc_backup_initial( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str - peering_name, # type: str - device_path, # type: str + backup_instance_name, # type: str + parameters, # type: "_models.TriggerBackupRequest" **kwargs # type: Any ): - # type: (...) -> Optional["_models.ExpressRouteCircuitsArpTableListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsArpTableListResult"]] + # type: (...) -> Optional["_models.OperationJobExtendedInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._list_arp_table_initial.metadata['url'] # type: ignore + url = self._adhoc_backup_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -504,9 +479,13 @@ def _list_arp_table_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TriggerBackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -514,59 +493,64 @@ def _list_arp_table_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + response_headers = {} deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - _list_arp_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore + _adhoc_backup_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup'} # type: ignore - def begin_list_arp_table( + def begin_adhoc_backup( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str - peering_name, # type: str - device_path, # type: str + backup_instance_name, # type: str + parameters, # type: "_models.TriggerBackupRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuitsArpTableListResult"] - """Gets the currently advertised ARP table associated with the express route circuit in a resource - group. + # type: (...) -> LROPoller["_models.OperationJobExtendedInfo"] + """Trigger adhoc backup. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str - :param device_path: The path of the device. - :type device_path: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.TriggerBackupRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuitsArpTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitsArpTableListResult] + :return: An instance of LROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.dataprotection.models.OperationJobExtendedInfo] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsArpTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationJobExtendedInfo"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._list_arp_table_initial( + raw_result = self._adhoc_backup_initial( + vault_name=vault_name, resource_group_name=resource_group_name, - circuit_name=circuit_name, - peering_name=peering_name, - device_path=device_path, + backup_instance_name=backup_instance_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -575,18 +559,17 @@ def begin_list_arp_table( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsArpTableListResult', pipeline_response) + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -601,32 +584,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_arp_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore + begin_adhoc_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/backup'} # type: ignore - def _list_routes_table_initial( + def _validate_for_backup_initial( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str - peering_name, # type: str - device_path, # type: str + parameters, # type: "_models.ValidateForBackupRequest" **kwargs # type: Any ): - # type: (...) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] + # type: (...) -> Optional["_models.OperationJobExtendedInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._list_routes_table_initial.metadata['url'] # type: ignore + url = self._validate_for_backup_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -637,9 +618,13 @@ def _list_routes_table_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ValidateForBackupRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -647,59 +632,60 @@ def _list_routes_table_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + response_headers = {} deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - _list_routes_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore + _validate_for_backup_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup'} # type: ignore - def begin_list_routes_table( + def begin_validate_for_backup( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str - peering_name, # type: str - device_path, # type: str + parameters, # type: "_models.ValidateForBackupRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"] - """Gets the currently advertised routes table associated with the express route circuit in a - resource group. + # type: (...) -> LROPoller["_models.OperationJobExtendedInfo"] + """Validate whether adhoc backup will be successful or not. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str - :param device_path: The path of the device. - :type device_path: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.ValidateForBackupRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitsRoutesTableListResult] + :return: An instance of LROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.dataprotection.models.OperationJobExtendedInfo] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationJobExtendedInfo"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._list_routes_table_initial( + raw_result = self._validate_for_backup_initial( + vault_name=vault_name, resource_group_name=resource_group_name, - circuit_name=circuit_name, - peering_name=peering_name, - device_path=device_path, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -708,17 +694,15 @@ def begin_list_routes_table( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -734,33 +718,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_routes_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore + begin_validate_for_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/validateForBackup'} # type: ignore - def _list_routes_table_summary_initial( + def _trigger_rehydrate_initial( self, resource_group_name, # type: str - circuit_name, # type: str - peering_name, # type: str - device_path, # type: str + vault_name, # type: str + backup_instance_name, # type: str + parameters, # type: "_models.AzureBackupRehydrationRequest" **kwargs # type: Any ): - # type: (...) -> Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._list_routes_table_summary_initial.metadata['url'] # type: ignore + url = self._trigger_rehydrate_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -770,69 +754,73 @@ def _list_routes_table_summary_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupRehydrationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, response_headers) - return deserialized - _list_routes_table_summary_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore + _trigger_rehydrate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate'} # type: ignore - def begin_list_routes_table_summary( + def begin_trigger_rehydrate( self, resource_group_name, # type: str - circuit_name, # type: str - peering_name, # type: str - device_path, # type: str + vault_name, # type: str + backup_instance_name, # type: str + parameters, # type: "_models.AzureBackupRehydrationRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] - """Gets the currently advertised routes table summary associated with the express route circuit in - a resource group. + # type: (...) -> LROPoller[None] + """rehydrate recovery point for restore for a BackupInstance. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str - :param device_path: The path of the device. - :type device_path: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param backup_instance_name: + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.AzureBackupRehydrationRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuitsRoutesTableSummaryListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._list_routes_table_summary_initial( + raw_result = self._trigger_rehydrate_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, - peering_name=peering_name, - device_path=device_path, + vault_name=vault_name, + backup_instance_name=backup_instance_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -841,18 +829,14 @@ def begin_list_routes_table_summary( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -867,40 +851,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_routes_table_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore + begin_trigger_rehydrate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/rehydrate'} # type: ignore - def get_stats( + def _trigger_restore_initial( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str + backup_instance_name, # type: str + parameters, # type: "_models.AzureBackupRestoreRequest" **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuitStats" - """Gets all the stats from an express route circuit in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitStats - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] + # type: (...) -> Optional["_models.OperationJobExtendedInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_stats.metadata['url'] # type: ignore + url = self._trigger_restore_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -910,60 +887,138 @@ def get_stats( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupRestoreRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - get_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats'} # type: ignore + _trigger_restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore'} # type: ignore - def get_peering_stats( + def begin_trigger_restore( self, + vault_name, # type: str resource_group_name, # type: str - circuit_name, # type: str - peering_name, # type: str + backup_instance_name, # type: str + parameters, # type: "_models.AzureBackupRestoreRequest" **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuitStats" - """Gets all stats from an express route circuit in a resource group. + # type: (...) -> LROPoller["_models.OperationJobExtendedInfo"] + """Triggers restore for a BackupInstance. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.AzureBackupRestoreRequest :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitStats - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.dataprotection.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._trigger_restore_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/restore'} # type: ignore + + def _validate_for_restore_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "_models.ValidateRestoreRequestObject" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.OperationJobExtendedInfo"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_peering_stats.metadata['url'] # type: ignore + url = self._validate_for_restore_initial.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -973,158 +1028,109 @@ def get_peering_stats( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ValidateRestoreRequestObject') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - get_peering_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats'} # type: ignore + _validate_for_restore_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore'} # type: ignore - def list( + def begin_validate_for_restore( self, + vault_name, # type: str resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "_models.ValidateRestoreRequestObject" **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ExpressRouteCircuitListResult"] - """Gets all the express route circuits in a resource group. + # type: (...) -> LROPoller["_models.OperationJobExtendedInfo"] + """Validates if Restore can be triggered for a DataSource. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.ValidateRestoreRequestObject :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either OperationJobExtendedInfo or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.dataprotection.models.OperationJobExtendedInfo] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationJobExtendedInfo"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits'} # type: ignore - - def list_all( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ExpressRouteCircuitListResult"] - """Gets all the express route circuits in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._validate_for_restore_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + backup_instance_name=backup_instance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitListResult', pipeline_response) - list_of_elem = deserialized.value if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + return cls(pipeline_response, deserialized, {}) + return deserialized - return pipeline_response + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits'} # type: ignore + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_validate_for_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/validateRestore'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_policies_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_policies_operations.py new file mode 100644 index 000000000000..66ec3395e92e --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_policies_operations.py @@ -0,0 +1,321 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class BackupPoliciesOperations(object): + """BackupPoliciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + vault_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BaseBackupPolicyResourceList"] + """Returns list of backup policies belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BaseBackupPolicyResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.BaseBackupPolicyResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseBackupPolicyResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BaseBackupPolicyResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies'} # type: ignore + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseBackupPolicyResource" + """Gets a backup policy belonging to a backup vault. + + Gets a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: + :type backup_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseBackupPolicyResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BaseBackupPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseBackupPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseBackupPolicyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore + + def create_or_update( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_policy_name, # type: str + parameters, # type: "_models.BaseBackupPolicyResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseBackupPolicyResource" + """Creates or Updates a backup policy belonging to a backup vault. + + Creates or Updates a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: Name of the policy. + :type backup_policy_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.BaseBackupPolicyResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseBackupPolicyResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BaseBackupPolicyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseBackupPolicyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BaseBackupPolicyResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseBackupPolicyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore + + def delete( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a backup policy belonging to a backup vault. + + Deletes a backup policy belonging to a backup vault. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_policy_name: + :type backup_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupPolicyName': self._serialize.url("backup_policy_name", backup_policy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_vault_operation_results_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_vault_operation_results_operations.py new file mode 100644 index 000000000000..a04e8c5e27a8 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_vault_operation_results_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class BackupVaultOperationResultsOperations(object): + """BackupVaultOperationResultsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.BackupVaultResource"] + """get. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param operation_id: + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupVaultResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BackupVaultResource or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupVaultResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/operationResults/{operationId}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_vaults_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_vaults_operations.py new file mode 100644 index 000000000000..d7894a30a873 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_backup_vaults_operations.py @@ -0,0 +1,629 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class BackupVaultsOperations(object): + """BackupVaultsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_in_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BackupVaultResourceList"] + """Returns resource collection belonging to a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupVaultResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.BackupVaultResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_in_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupVaultResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_in_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/backupVaults'} # type: ignore + + def get_in_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.BackupVaultResourceList"] + """Returns resource collection belonging to a resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either BackupVaultResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.BackupVaultResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_in_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BackupVaultResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_in_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults'} # type: ignore + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupVaultResource" + """Returns a resource belonging to a resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupVaultResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.BackupVaultResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def _create_or_update_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.BackupVaultResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupVaultResource" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupVaultResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def begin_create_or_update( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.BackupVaultResource" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BackupVaultResource"] + """Creates or updates a BackupVault resource belonging to a resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.BackupVaultResource + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either BackupVaultResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.dataprotection.models.BackupVaultResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def delete( + self, + vault_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a BackupVault resource from the resource group. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def _update_initial( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.PatchResourceRequestInput" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.BackupVaultResource"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BackupVaultResource"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PatchResourceRequestInput') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def begin_update( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.PatchResourceRequestInput" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BackupVaultResource"] + """Updates a BackupVault resource belonging to a resource group. For example, updating tags for a + resource. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.PatchResourceRequestInput + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either BackupVaultResource or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.dataprotection.models.BackupVaultResource] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupVaultResource"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + vault_name=vault_name, + resource_group_name=resource_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackupVaultResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}'} # type: ignore + + def check_name_availability( + self, + resource_group_name, # type: str + location, # type: str + parameters, # type: "_models.CheckNameAvailabilityRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameAvailabilityResult" + """API to check for resource name availability. + + API to check for resource name availability. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param location: The location in which uniqueness will be verified. + :type location: str + :param parameters: Check name availability request. + :type parameters: ~azure.mgmt.dataprotection.models.CheckNameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.CheckNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + 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'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/locations/{location}/checkNameAvailability'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_data_protection_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_data_protection_operations.py new file mode 100644 index 000000000000..47420332c4c3 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_data_protection_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataProtectionOperations(object): + """DataProtectionOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def check_feature_support( + self, + location, # type: str + parameters, # type: "_models.FeatureValidationRequestBase" + **kwargs # type: Any + ): + # type: (...) -> "_models.FeatureValidationResponseBase" + """Validates if a feature is supported. + + Validates if a feature is supported. + + :param location: + :type location: str + :param parameters: Feature support request object. + :type parameters: ~azure.mgmt.dataprotection.models.FeatureValidationRequestBase + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FeatureValidationResponseBase, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.FeatureValidationResponseBase + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FeatureValidationResponseBase"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_feature_support.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'FeatureValidationRequestBase') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FeatureValidationResponseBase', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_feature_support.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/checkFeatureSupport'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_data_protection_operations_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_data_protection_operations_operations.py new file mode 100644 index 000000000000..aa0b0343c117 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_data_protection_operations_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataProtectionOperationsOperations(object): + """DataProtectionOperationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ClientDiscoveryResponse"] + """Returns the list of available operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ClientDiscoveryResponse or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.ClientDiscoveryResponse] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClientDiscoveryResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ClientDiscoveryResponse', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DataProtection/operations'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_export_jobs_operation_result_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_export_jobs_operation_result_operations.py new file mode 100644 index 000000000000..a22827dafd75 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_export_jobs_operation_result_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExportJobsOperationResultOperations(object): + """ExportJobsOperationResultOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + vault_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ExportJobsResult"] + """Gets the operation result of operation triggered by Export Jobs API. If the operation is + successful, then it also contains URL of a Blob and a SAS key to access the same. The blob + contains exported jobs in JSON serialized format. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param operation_id: OperationID which represents the export job. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExportJobsResult, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.ExportJobsResult or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExportJobsResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExportJobsResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/operations/{operationId}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_export_jobs_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_export_jobs_operations.py new file mode 100644 index 000000000000..9fd4f08a874e --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_export_jobs_operations.py @@ -0,0 +1,162 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExportJobsOperations(object): + """ExportJobsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _trigger_initial( + self, + resource_group_name, # type: str + vault_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self._trigger_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, None, response_headers) + + _trigger_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs'} # type: ignore + + def begin_trigger( + self, + resource_group_name, # type: str + vault_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Triggers export of jobs and returns an OperationID to track. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._trigger_initial( + resource_group_name=resource_group_name, + vault_name=vault_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_trigger.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/exportBackupJobs'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_probes_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_jobs_operations.py similarity index 76% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_probes_operations.py rename to sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_jobs_operations.py index e0de95ddeea9..1e7e0d74d189 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_probes_operations.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_jobs_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerProbesOperations(object): - """LoadBalancerProbesOperations operations. +class JobsOperations(object): + """JobsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.dataprotection.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,28 +48,28 @@ def __init__(self, client, config, serializer, deserializer): def list( self, resource_group_name, # type: str - load_balancer_name, # type: str + vault_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerProbeListResult"] - """Gets all the load balancer probes. + # type: (...) -> Iterable["_models.AzureBackupJobResourceList"] + """Returns list of jobs belonging to a backup vault. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerProbeListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerProbeListResult] + :return: An iterator like instance of either AzureBackupJobResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.AzureBackupJobResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerProbeListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupJobResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -80,9 +80,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -97,7 +97,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerProbeListResult', pipeline_response) + deserialized = self._deserialize('AzureBackupJobResourceList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,44 +118,45 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs'} # type: ignore def get( self, resource_group_name, # type: str - load_balancer_name, # type: str - probe_name, # type: str + vault_name, # type: str + job_id, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.Probe" - """Gets load balancer probe. + # type: (...) -> "_models.AzureBackupJobResource" + """Gets a job with id in a backup vault. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param probe_name: The name of the probe. - :type probe_name: str + :param vault_name: The name of the backup vault. + :type vault_name: str + :param job_id: The Job ID. This is a GUID-formatted string (e.g. + 00000000-0000-0000-0000-000000000000). + :type job_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Probe, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.Probe + :return: AzureBackupJobResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.AzureBackupJobResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Probe"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupJobResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'probeName': self._serialize.url("probe_name", probe_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'jobId': self._serialize.url("job_id", job_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -175,10 +176,10 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Probe', pipeline_response) + deserialized = self._deserialize('AzureBackupJobResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupJobs/{jobId}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_operation_result_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_operation_result_operations.py new file mode 100644 index 000000000000..cd2604a8468c --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_operation_result_operations.py @@ -0,0 +1,114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationResultOperations(object): + """OperationResultOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + operation_id, # type: str + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.OperationJobExtendedInfo"] + """Gets the operation status for a resource. + + Gets the operation result for a resource. + + :param operation_id: + :type operation_id: str + :param location: + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationJobExtendedInfo, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.OperationJobExtendedInfo or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationJobExtendedInfo"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('OperationJobExtendedInfo', pipeline_response) + + if response.status_code == 202: + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationResults/{operationId}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_management_client_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_operation_status_operations.py similarity index 62% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_management_client_operations.py rename to sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_operation_status_operations.py index d71fa2f0438f..0bc8bf9eacab 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_management_client_operations.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_operation_status_operations.py @@ -22,46 +22,67 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class NetworkManagementClientOperationsMixin(object): +class OperationStatusOperations(object): + """OperationStatusOperations operations. - def check_dns_name_availability( + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( self, location, # type: str - domain_name_label, # type: str + operation_id, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.DnsNameAvailabilityResult" - """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + # type: (...) -> "_models.OperationResource" + """Gets the operation status for a resource. - :param location: The location of the domain name. + Gets the operation status for a resource. + + :param location: :type location: str - :param domain_name_label: The domain name to be verified. It must conform to the following - regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. - :type domain_name_label: str + :param operation_id: + :type operation_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DnsNameAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.DnsNameAvailabilityResult + :return: OperationResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.OperationResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL - url = self.check_dns_name_availability.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), '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 = {} # type: Dict[str, Any] - query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -76,10 +97,10 @@ def check_dns_name_availability( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) + deserialized = self._deserialize('OperationResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_dns_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/locations/{location}/operationStatus/{operationId}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_frontend_ip_configurations_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_recovery_points_operations.py similarity index 66% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_frontend_ip_configurations_operations.py rename to sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_recovery_points_operations.py index 55d3975a5c31..935b39fd586f 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_frontend_ip_configurations_operations.py +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_recovery_points_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerFrontendIPConfigurationsOperations(object): - """LoadBalancerFrontendIPConfigurationsOperations operations. +class RecoveryPointsOperations(object): + """RecoveryPointsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.dataprotection.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,29 +47,38 @@ def __init__(self, client, config, serializer, deserializer): def list( self, + vault_name, # type: str resource_group_name, # type: str - load_balancer_name, # type: str + backup_instance_name, # type: str + filter=None, # type: Optional[str] + skip_token=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerFrontendIPConfigurationListResult"] - """Gets all the load balancer frontend IP configurations. + # type: (...) -> Iterable["_models.AzureBackupRecoveryPointResourceList"] + """Returns a list of Recovery Points for a DataSource in a vault. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param filter: OData filter options. + :type filter: str + :param skip_token: skipToken Filter. + :type skip_token: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerFrontendIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerFrontendIPConfigurationListResult] + :return: An iterator like instance of either AzureBackupRecoveryPointResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.AzureBackupRecoveryPointResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerFrontendIPConfigurationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupRecoveryPointResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -80,14 +89,19 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') request = self._client.get(url, query_parameters, header_parameters) else: @@ -97,7 +111,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerFrontendIPConfigurationListResult', pipeline_response) + deserialized = self._deserialize('AzureBackupRecoveryPointResourceList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,44 +132,48 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints'} # type: ignore def get( self, + vault_name, # type: str resource_group_name, # type: str - load_balancer_name, # type: str - frontend_ip_configuration_name, # type: str + backup_instance_name, # type: str + recovery_point_id, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.FrontendIPConfiguration" - """Gets load balancer frontend IP configuration. + # type: (...) -> "_models.AzureBackupRecoveryPointResource" + """Gets a Recovery Point using recoveryPointId for a Datasource. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param frontend_ip_configuration_name: The name of the frontend IP configuration. - :type frontend_ip_configuration_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param recovery_point_id: + :type recovery_point_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: FrontendIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.FrontendIPConfiguration + :return: AzureBackupRecoveryPointResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.AzureBackupRecoveryPointResource :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendIPConfiguration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupRecoveryPointResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-07-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'frontendIPConfigurationName': self._serialize.url("frontend_ip_configuration_name", frontend_ip_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + 'recoveryPointId': self._serialize.url("recovery_point_id", recovery_point_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -175,10 +193,10 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('FrontendIPConfiguration', pipeline_response) + deserialized = self._deserialize('AzureBackupRecoveryPointResource', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/recoveryPoints/{recoveryPointId}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_resource_guards_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_resource_guards_operations.py new file mode 100644 index 000000000000..a6502b9277ab --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_resource_guards_operations.py @@ -0,0 +1,1310 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ResourceGuardsOperations(object): + """ResourceGuardsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get_resources_in_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceGuardResourceList"] + """Returns ResourceGuards collection belonging to a subscription. + + Returns ResourceGuards collection belonging to a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceGuardResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.ResourceGuardResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_resources_in_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceGuardResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_resources_in_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DataProtection/resourceGuards'} # type: ignore + + def get_resources_in_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceGuardResourceList"] + """Returns ResourceGuards collection belonging to a ResourceGroup. + + Returns ResourceGuards collection belonging to a ResourceGroup. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceGuardResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.ResourceGuardResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_resources_in_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceGuardResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_resources_in_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards'} # type: ignore + + def put( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + parameters, # type: "_models.ResourceGuardResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceGuardResource" + """Creates or updates a ResourceGuard resource belonging to a resource group. + + Creates or updates a ResourceGuard resource belonging to a resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: The name of ResourceGuard. + :type resource_guards_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.ResourceGuardResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.ResourceGuardResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ResourceGuardResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceGuardResource" + """Returns a ResourceGuard belonging to a resource group. + + Returns a ResourceGuard belonging to a resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: The name of ResourceGuard. + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.ResourceGuardResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a ResourceGuard resource from the resource group. + + Deletes a ResourceGuard resource from the resource group. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: The name of ResourceGuard. + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}'} # type: ignore + + def patch( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + parameters, # type: "_models.PatchResourceRequestInput" + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceGuardResource" + """Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for a resource. + + Updates a ResourceGuard resource belonging to a resource group. For example, updating tags for + a resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: The name of ResourceGuard. + :type resource_guards_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.PatchResourceRequestInput + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.ResourceGuardResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PatchResourceRequestInput') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}'} # type: ignore + + def get_disable_soft_delete_requests_objects( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DppBaseResourceList"] + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_disable_soft_delete_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_disable_soft_delete_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests'} # type: ignore + + def get_delete_resource_guard_proxy_requests_objects( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DppBaseResourceList"] + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_delete_resource_guard_proxy_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_delete_resource_guard_proxy_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests'} # type: ignore + + def get_backup_security_pin_requests_objects( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DppBaseResourceList"] + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_backup_security_pin_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_backup_security_pin_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests'} # type: ignore + + def get_delete_protected_item_requests_objects( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DppBaseResourceList"] + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_delete_protected_item_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_delete_protected_item_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests'} # type: ignore + + def get_update_protection_policy_requests_objects( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DppBaseResourceList"] + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_update_protection_policy_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_update_protection_policy_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests'} # type: ignore + + def get_update_protected_item_requests_objects( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DppBaseResourceList"] + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DppBaseResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.dataprotection.models.DppBaseResourceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResourceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.get_update_protected_item_requests_objects.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DppBaseResourceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + get_update_protected_item_requests_objects.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests'} # type: ignore + + def get_default_disable_soft_delete_requests_object( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + request_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DppBaseResource" + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_disable_soft_delete_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_disable_soft_delete_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/disableSoftDeleteRequests/{requestName}'} # type: ignore + + def get_default_delete_resource_guard_proxy_requests_object( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + request_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DppBaseResource" + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_delete_resource_guard_proxy_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_delete_resource_guard_proxy_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteResourceGuardProxyRequests/{requestName}'} # type: ignore + + def get_default_backup_security_pin_requests_object( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + request_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DppBaseResource" + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_backup_security_pin_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_backup_security_pin_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/getBackupSecurityPINRequests/{requestName}'} # type: ignore + + def get_default_delete_protected_item_requests_object( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + request_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DppBaseResource" + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_delete_protected_item_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_delete_protected_item_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/deleteProtectedItemRequests/{requestName}'} # type: ignore + + def get_default_update_protection_policy_requests_object( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + request_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DppBaseResource" + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_update_protection_policy_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_update_protection_policy_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectionPolicyRequests/{requestName}'} # type: ignore + + def get_default_update_protected_item_requests_object( + self, + resource_group_name, # type: str + resource_guards_name, # type: str + request_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DppBaseResource" + """Returns collection of operation request objects for a critical operation protected by the given ResourceGuard resource. + + Returns collection of operation request objects for a critical operation protected by the given + ResourceGuard resource. + + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param resource_guards_name: + :type resource_guards_name: str + :param request_name: + :type request_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DppBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.DppBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DppBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + accept = "application/json" + + # Construct URL + url = self.get_default_update_protected_item_requests_object.metadata['url'] # type: ignore + 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'), + 'resourceGuardsName': self._serialize.url("resource_guards_name", resource_guards_name, 'str'), + 'requestName': self._serialize.url("request_name", request_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DppBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_default_update_protected_item_requests_object.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/resourceGuards/{resourceGuardsName}/updateProtectedItemRequests/{requestName}'} # type: ignore diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_restorable_time_ranges_operations.py b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_restorable_time_ranges_operations.py new file mode 100644 index 000000000000..c35009b32d98 --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/operations/_restorable_time_ranges_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RestorableTimeRangesOperations(object): + """RestorableTimeRangesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.dataprotection.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def find( + self, + vault_name, # type: str + resource_group_name, # type: str + backup_instance_name, # type: str + parameters, # type: "_models.AzureBackupFindRestorableTimeRangesRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.AzureBackupFindRestorableTimeRangesResponseResource" + """find. + + :param vault_name: The name of the backup vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the backup vault is present. + :type resource_group_name: str + :param backup_instance_name: The name of the backup instance. + :type backup_instance_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.dataprotection.models.AzureBackupFindRestorableTimeRangesRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureBackupFindRestorableTimeRangesResponseResource, or the result of cls(response) + :rtype: ~azure.mgmt.dataprotection.models.AzureBackupFindRestorableTimeRangesResponseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureBackupFindRestorableTimeRangesResponseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-07-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.find.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'backupInstanceName': self._serialize.url("backup_instance_name", backup_instance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AzureBackupFindRestorableTimeRangesRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureBackupFindRestorableTimeRangesResponseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + find.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupInstances/{backupInstanceName}/findRestorableTimeRanges'} # type: ignore diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/py.typed b/sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/py.typed similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/py.typed rename to sdk/dataprotection/azure-mgmt-dataprotection/azure/mgmt/dataprotection/py.typed diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/sdk_packaging.toml b/sdk/dataprotection/azure-mgmt-dataprotection/sdk_packaging.toml new file mode 100644 index 000000000000..9cbda746008a --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/sdk_packaging.toml @@ -0,0 +1,9 @@ +[packaging] +package_name = "azure-mgmt-dataprotection" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Dataprotection Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/setup.cfg b/sdk/dataprotection/azure-mgmt-dataprotection/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/dataprotection/azure-mgmt-dataprotection/setup.py b/sdk/dataprotection/azure-mgmt-dataprotection/setup.py new file mode 100644 index 000000000000..3c90514d187c --- /dev/null +++ b/sdk/dataprotection/azure-mgmt-dataprotection/setup.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-dataprotection" +PACKAGE_PPRINT_NAME = "Dataprotection Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.6.21', + 'azure-common~=1.1', + 'azure-mgmt-core>=1.2.0,<2.0.0', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +) diff --git a/sdk/dataprotection/ci.yml b/sdk/dataprotection/ci.yml new file mode 100644 index 000000000000..a4fe9ca047ad --- /dev/null +++ b/sdk/dataprotection/ci.yml @@ -0,0 +1,33 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/dataprotection/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/dataprotection/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: dataprotection + Artifacts: + - name: azure-mgmt-dataprotection + safeName: azuremgmtdataprotection diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/CHANGELOG.md b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/CHANGELOG.md new file mode 100644 index 000000000000..f7c39e38ba16 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (2021-11-11) + +* Initial Release diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/LICENSE.txt b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/MANIFEST.in b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/MANIFEST.in new file mode 100644 index 000000000000..ef61eb0e3527 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/MANIFEST.in @@ -0,0 +1,6 @@ +include _meta.json +recursive-include tests *.py *.yaml +include *.md +include azure/__init__.py +include azure/mgmt/__init__.py +include LICENSE.txt diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/README.md b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/README.md new file mode 100644 index 000000000000..ab84815ae3da --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/README.md @@ -0,0 +1,27 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Desktopvirtualization Management Client Library. +This package has been tested with Python 2.7, 3.6+. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). + + +# Usage + + +To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) + + + +For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/) +Code samples for this package can be found at [Desktopvirtualization Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. +Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) + + +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) +section of the project. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-desktopvirtualization%2FREADME.png) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/_meta.json b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/_meta.json new file mode 100644 index 000000000000..64ddb3ce1e0a --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "2b56c8a3da0e04aea6f6d80a9ac04741d1ae5904", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/desktopvirtualization/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/desktopvirtualization/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/__init__.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/__init__.py new file mode 100644 index 000000000000..8db66d3d0f0f --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/__init__.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/__init__.py new file mode 100644 index 000000000000..8db66d3d0f0f --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/__init__.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/__init__.py new file mode 100644 index 000000000000..fcebd4b56540 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._desktop_virtualization_api_client import DesktopVirtualizationAPIClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['DesktopVirtualizationAPIClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_configuration.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_configuration.py new file mode 100644 index 000000000000..ffa93f1c794f --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class DesktopVirtualizationAPIClientConfiguration(Configuration): + """Configuration for DesktopVirtualizationAPIClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DesktopVirtualizationAPIClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-03-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-desktopvirtualization/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_desktop_virtualization_api_client.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_desktop_virtualization_api_client.py new file mode 100644 index 000000000000..40177dec69db --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_desktop_virtualization_api_client.py @@ -0,0 +1,153 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import DesktopVirtualizationAPIClientConfiguration +from .operations import Operations +from .operations import WorkspacesOperations +from .operations import ScalingPlansOperations +from .operations import ApplicationGroupsOperations +from .operations import StartMenuItemsOperations +from .operations import ApplicationsOperations +from .operations import DesktopsOperations +from .operations import HostPoolsOperations +from .operations import UserSessionsOperations +from .operations import SessionHostsOperations +from .operations import MSIXPackagesOperations +from .operations import MsixImagesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from . import models + + +class DesktopVirtualizationAPIClient(object): + """DesktopVirtualizationAPIClient. + + :ivar operations: Operations operations + :vartype operations: desktop_virtualization_api_client.operations.Operations + :ivar workspaces: WorkspacesOperations operations + :vartype workspaces: desktop_virtualization_api_client.operations.WorkspacesOperations + :ivar scaling_plans: ScalingPlansOperations operations + :vartype scaling_plans: desktop_virtualization_api_client.operations.ScalingPlansOperations + :ivar application_groups: ApplicationGroupsOperations operations + :vartype application_groups: desktop_virtualization_api_client.operations.ApplicationGroupsOperations + :ivar start_menu_items: StartMenuItemsOperations operations + :vartype start_menu_items: desktop_virtualization_api_client.operations.StartMenuItemsOperations + :ivar applications: ApplicationsOperations operations + :vartype applications: desktop_virtualization_api_client.operations.ApplicationsOperations + :ivar desktops: DesktopsOperations operations + :vartype desktops: desktop_virtualization_api_client.operations.DesktopsOperations + :ivar host_pools: HostPoolsOperations operations + :vartype host_pools: desktop_virtualization_api_client.operations.HostPoolsOperations + :ivar user_sessions: UserSessionsOperations operations + :vartype user_sessions: desktop_virtualization_api_client.operations.UserSessionsOperations + :ivar session_hosts: SessionHostsOperations operations + :vartype session_hosts: desktop_virtualization_api_client.operations.SessionHostsOperations + :ivar msix_packages: MSIXPackagesOperations operations + :vartype msix_packages: desktop_virtualization_api_client.operations.MSIXPackagesOperations + :ivar msix_images: MsixImagesOperations operations + :vartype msix_images: desktop_virtualization_api_client.operations.MsixImagesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: desktop_virtualization_api_client.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: desktop_virtualization_api_client.operations.PrivateLinkResourcesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = DesktopVirtualizationAPIClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.workspaces = WorkspacesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.scaling_plans = ScalingPlansOperations( + self._client, self._config, self._serialize, self._deserialize) + self.application_groups = ApplicationGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.start_menu_items = StartMenuItemsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.applications = ApplicationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.desktops = DesktopsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.host_pools = HostPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_sessions = UserSessionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.session_hosts = SessionHostsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.msix_packages = MSIXPackagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.msix_images = MsixImagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> DesktopVirtualizationAPIClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_metadata.json b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_metadata.json new file mode 100644 index 000000000000..904a9e59c437 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_metadata.json @@ -0,0 +1,116 @@ +{ + "chosen_version": "2021-09-03-preview", + "total_api_version_list": ["2021-09-03-preview"], + "client": { + "name": "DesktopVirtualizationAPIClient", + "filename": "_desktop_virtualization_api_client", + "description": "DesktopVirtualizationAPIClient.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DesktopVirtualizationAPIClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DesktopVirtualizationAPIClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "operations": "Operations", + "workspaces": "WorkspacesOperations", + "scaling_plans": "ScalingPlansOperations", + "application_groups": "ApplicationGroupsOperations", + "start_menu_items": "StartMenuItemsOperations", + "applications": "ApplicationsOperations", + "desktops": "DesktopsOperations", + "host_pools": "HostPoolsOperations", + "user_sessions": "UserSessionsOperations", + "session_hosts": "SessionHostsOperations", + "msix_packages": "MSIXPackagesOperations", + "msix_images": "MsixImagesOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations" + } +} \ No newline at end of file diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_version.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/__init__.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/__init__.py new file mode 100644 index 000000000000..3160c7b3c306 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._desktop_virtualization_api_client import DesktopVirtualizationAPIClient +__all__ = ['DesktopVirtualizationAPIClient'] diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_configuration.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_configuration.py new file mode 100644 index 000000000000..b3c5015744c4 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class DesktopVirtualizationAPIClientConfiguration(Configuration): + """Configuration for DesktopVirtualizationAPIClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(DesktopVirtualizationAPIClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-03-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-desktopvirtualization/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_desktop_virtualization_api_client.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_desktop_virtualization_api_client.py new file mode 100644 index 000000000000..f0b1d0e9141c --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/_desktop_virtualization_api_client.py @@ -0,0 +1,146 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import DesktopVirtualizationAPIClientConfiguration +from .operations import Operations +from .operations import WorkspacesOperations +from .operations import ScalingPlansOperations +from .operations import ApplicationGroupsOperations +from .operations import StartMenuItemsOperations +from .operations import ApplicationsOperations +from .operations import DesktopsOperations +from .operations import HostPoolsOperations +from .operations import UserSessionsOperations +from .operations import SessionHostsOperations +from .operations import MSIXPackagesOperations +from .operations import MsixImagesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .. import models + + +class DesktopVirtualizationAPIClient(object): + """DesktopVirtualizationAPIClient. + + :ivar operations: Operations operations + :vartype operations: desktop_virtualization_api_client.aio.operations.Operations + :ivar workspaces: WorkspacesOperations operations + :vartype workspaces: desktop_virtualization_api_client.aio.operations.WorkspacesOperations + :ivar scaling_plans: ScalingPlansOperations operations + :vartype scaling_plans: desktop_virtualization_api_client.aio.operations.ScalingPlansOperations + :ivar application_groups: ApplicationGroupsOperations operations + :vartype application_groups: desktop_virtualization_api_client.aio.operations.ApplicationGroupsOperations + :ivar start_menu_items: StartMenuItemsOperations operations + :vartype start_menu_items: desktop_virtualization_api_client.aio.operations.StartMenuItemsOperations + :ivar applications: ApplicationsOperations operations + :vartype applications: desktop_virtualization_api_client.aio.operations.ApplicationsOperations + :ivar desktops: DesktopsOperations operations + :vartype desktops: desktop_virtualization_api_client.aio.operations.DesktopsOperations + :ivar host_pools: HostPoolsOperations operations + :vartype host_pools: desktop_virtualization_api_client.aio.operations.HostPoolsOperations + :ivar user_sessions: UserSessionsOperations operations + :vartype user_sessions: desktop_virtualization_api_client.aio.operations.UserSessionsOperations + :ivar session_hosts: SessionHostsOperations operations + :vartype session_hosts: desktop_virtualization_api_client.aio.operations.SessionHostsOperations + :ivar msix_packages: MSIXPackagesOperations operations + :vartype msix_packages: desktop_virtualization_api_client.aio.operations.MSIXPackagesOperations + :ivar msix_images: MsixImagesOperations operations + :vartype msix_images: desktop_virtualization_api_client.aio.operations.MsixImagesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: desktop_virtualization_api_client.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: desktop_virtualization_api_client.aio.operations.PrivateLinkResourcesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = DesktopVirtualizationAPIClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.workspaces = WorkspacesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.scaling_plans = ScalingPlansOperations( + self._client, self._config, self._serialize, self._deserialize) + self.application_groups = ApplicationGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.start_menu_items = StartMenuItemsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.applications = ApplicationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.desktops = DesktopsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.host_pools = HostPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_sessions = UserSessionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.session_hosts = SessionHostsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.msix_packages = MSIXPackagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.msix_images = MsixImagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "DesktopVirtualizationAPIClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/__init__.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/__init__.py new file mode 100644 index 000000000000..63576d0654da --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/__init__.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._workspaces_operations import WorkspacesOperations +from ._scaling_plans_operations import ScalingPlansOperations +from ._application_groups_operations import ApplicationGroupsOperations +from ._start_menu_items_operations import StartMenuItemsOperations +from ._applications_operations import ApplicationsOperations +from ._desktops_operations import DesktopsOperations +from ._host_pools_operations import HostPoolsOperations +from ._user_sessions_operations import UserSessionsOperations +from ._session_hosts_operations import SessionHostsOperations +from ._msix_packages_operations import MSIXPackagesOperations +from ._msix_images_operations import MsixImagesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations + +__all__ = [ + 'Operations', + 'WorkspacesOperations', + 'ScalingPlansOperations', + 'ApplicationGroupsOperations', + 'StartMenuItemsOperations', + 'ApplicationsOperations', + 'DesktopsOperations', + 'HostPoolsOperations', + 'UserSessionsOperations', + 'SessionHostsOperations', + 'MSIXPackagesOperations', + 'MsixImagesOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', +] diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_application_groups_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_application_groups_operations.py new file mode 100644 index 000000000000..46ebddcc524f --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_application_groups_operations.py @@ -0,0 +1,442 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ApplicationGroupsOperations: + """ApplicationGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + application_group_name: str, + **kwargs: Any + ) -> "_models.ApplicationGroup": + """Get an application group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGroup, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ApplicationGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + application_group_name: str, + application_group: "_models.ApplicationGroup", + **kwargs: Any + ) -> "_models.ApplicationGroup": + """Create or update an applicationGroup. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_group: Object containing ApplicationGroup definitions. + :type application_group: ~desktop_virtualization_api_client.models.ApplicationGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGroup, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ApplicationGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(application_group, 'ApplicationGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ApplicationGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + application_group_name: str, + **kwargs: Any + ) -> None: + """Remove an applicationGroup. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + application_group_name: str, + application_group: Optional["_models.ApplicationGroupPatch"] = None, + **kwargs: Any + ) -> "_models.ApplicationGroup": + """Update an applicationGroup. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_group: Object containing ApplicationGroup definitions. + :type application_group: ~desktop_virtualization_api_client.models.ApplicationGroupPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGroup, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ApplicationGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if application_group is not None: + body_content = self._serialize.body(application_group, 'ApplicationGroupPatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationGroupList"]: + """List applicationGroups. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param filter: OData filter expression. Valid properties for filtering are + applicationGroupType. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGroupList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ApplicationGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationGroupList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups'} # type: ignore + + def list_by_subscription( + self, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationGroupList"]: + """List applicationGroups in subscription. + + :param filter: OData filter expression. Valid properties for filtering are + applicationGroupType. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGroupList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ApplicationGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationGroupList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/applicationGroups'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_applications_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_applications_operations.py new file mode 100644 index 000000000000..e3ae135cc559 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_applications_operations.py @@ -0,0 +1,384 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ApplicationsOperations: + """ApplicationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + application_group_name: str, + application_name: str, + **kwargs: Any + ) -> "_models.Application": + """Get an application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_name: The name of the application within the specified application group. + :type application_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Application, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Application + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Application"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Application', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + application_group_name: str, + application_name: str, + application: "_models.Application", + **kwargs: Any + ) -> "_models.Application": + """Create or update an application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_name: The name of the application within the specified application group. + :type application_name: str + :param application: Object containing Application definitions. + :type application: ~desktop_virtualization_api_client.models.Application + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Application, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Application + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Application"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(application, 'Application') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Application', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Application', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + application_group_name: str, + application_name: str, + **kwargs: Any + ) -> None: + """Remove an application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_name: The name of the application within the specified application group. + :type application_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + application_group_name: str, + application_name: str, + application: Optional["_models.ApplicationPatch"] = None, + **kwargs: Any + ) -> "_models.Application": + """Update an application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_name: The name of the application within the specified application group. + :type application_name: str + :param application: Object containing Application definitions. + :type application: ~desktop_virtualization_api_client.models.ApplicationPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Application, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Application + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Application"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if application is not None: + body_content = self._serialize.body(application, 'ApplicationPatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Application', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore + + def list( + self, + resource_group_name: str, + application_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationList"]: + """List applications. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ApplicationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_desktops_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_desktops_operations.py new file mode 100644 index 000000000000..8fe2d9073f00 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_desktops_operations.py @@ -0,0 +1,251 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DesktopsOperations: + """DesktopsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + application_group_name: str, + desktop_name: str, + **kwargs: Any + ) -> "_models.Desktop": + """Get a desktop. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param desktop_name: The name of the desktop within the specified desktop group. + :type desktop_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Desktop, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Desktop + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Desktop"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'desktopName': self._serialize.url("desktop_name", desktop_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Desktop', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + application_group_name: str, + desktop_name: str, + desktop: Optional["_models.DesktopPatch"] = None, + **kwargs: Any + ) -> "_models.Desktop": + """Update a desktop. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param desktop_name: The name of the desktop within the specified desktop group. + :type desktop_name: str + :param desktop: Object containing Desktop definitions. + :type desktop: ~desktop_virtualization_api_client.models.DesktopPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Desktop, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Desktop + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Desktop"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'desktopName': self._serialize.url("desktop_name", desktop_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if desktop is not None: + body_content = self._serialize.body(desktop, 'DesktopPatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Desktop', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}'} # type: ignore + + def list( + self, + resource_group_name: str, + application_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DesktopList"]: + """List desktops. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DesktopList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.DesktopList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DesktopList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DesktopList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops'} # type: ignore diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topics_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_host_pools_operations.py similarity index 56% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topics_operations.py rename to sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_host_pools_operations.py index 0c15466862df..1af3c03a2e92 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_topics_operations.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_host_pools_operations.py @@ -12,23 +12,21 @@ from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PartnerTopicsOperations: - """PartnerTopicsOperations async operations. +class HostPoolsOperations: + """HostPoolsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~desktop_virtualization_api_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,36 +44,34 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def get( self, resource_group_name: str, - partner_topic_name: str, + host_pool_name: str, **kwargs: Any - ) -> "_models.PartnerTopic": - """Get a partner topic. + ) -> "_models.HostPool": + """Get a host pool. - Get properties of a partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerTopic, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic + :return: HostPool, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.HostPool :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopic"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -95,33 +91,49 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerTopic', pipeline_response) + deserialized = self._deserialize('HostPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore - async def _delete_initial( + async def create_or_update( self, resource_group_name: str, - partner_topic_name: str, + host_pool_name: str, + host_pool: "_models.HostPool", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.HostPool": + """Create or update a host pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param host_pool: Object containing HostPool definitions. + :type host_pool: ~desktop_virtualization_api_client.models.HostPool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostPool, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.HostPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -131,123 +143,127 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(host_pool, 'HostPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('HostPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HostPool', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'} # type: ignore + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore - async def begin_delete( + async def delete( self, resource_group_name: str, - partner_topic_name: str, + host_pool_name: str, + force: Optional[bool] = None, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Delete a partner topic. - - Delete existing partner topic. + ) -> None: + """Remove a host pool. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param force: Force flag to delete sessionHost. + :type force: bool :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - partner_topic_name=partner_topic_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } + url = self._client.format_url(url, **path_format_arguments) - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'} # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore async def update( self, resource_group_name: str, - partner_topic_name: str, - partner_topic_update_parameters: "_models.PartnerTopicUpdateParameters", + host_pool_name: str, + host_pool: Optional["_models.HostPoolPatch"] = None, **kwargs: Any - ) -> Optional["_models.PartnerTopic"]: - """Update a partner topic. + ) -> "_models.HostPool": + """Update a host pool. - Asynchronously updates a partner topic with the specified parameters. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param partner_topic_update_parameters: PartnerTopic update information. - :type partner_topic_update_parameters: ~azure.mgmt.eventgrid.models.PartnerTopicUpdateParameters + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param host_pool: Object containing HostPool definitions. + :type host_pool: ~desktop_virtualization_api_client.models.HostPoolPatch :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerTopic, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic or None + :return: HostPool, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.HostPool :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PartnerTopic"]] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -261,58 +277,47 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_topic_update_parameters, 'PartnerTopicUpdateParameters') + if host_pool is not None: + body_content = self._serialize.body(host_pool, 'HostPoolPatch') + else: + body_content = None body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('PartnerTopic', pipeline_response) + deserialized = self._deserialize('HostPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore - def list_by_subscription( + def list_by_resource_group( self, - filter: Optional[str] = None, - top: Optional[int] = None, + resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PartnerTopicsListResult"]: - """List partner topics under an Azure subscription. - - List all the partner topics under an Azure subscription. - - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int + ) -> AsyncIterable["_models.HostPoolList"]: + """List hostPools. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerTopicsListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerTopicsListResult] + :return: An iterator like instance of either HostPoolList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.HostPoolList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopicsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPoolList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -322,18 +327,15 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -343,7 +345,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerTopicsListResult', pipeline_response) + deserialized = self._deserialize('HostPoolList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -364,43 +366,25 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerTopics'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools'} # type: ignore - def list_by_resource_group( + def list( self, - resource_group_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.PartnerTopicsListResult"]: - """List partner topics under a resource group. + ) -> AsyncIterable["_models.HostPoolList"]: + """List hostPools in subscription. - List all the partner topics under a resource group. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerTopicsListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerTopicsListResult] + :return: An iterator like instance of either HostPoolList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.HostPoolList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopicsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPoolList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -410,19 +394,14 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -432,7 +411,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerTopicsListResult', pipeline_response) + deserialized = self._deserialize('HostPoolList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -453,101 +432,39 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/hostPools'} # type: ignore - async def activate( + async def retrieve_registration_token( self, resource_group_name: str, - partner_topic_name: str, + host_pool_name: str, **kwargs: Any - ) -> "_models.PartnerTopic": - """Activate a partner topic. - - Activate a newly created partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerTopic, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopic"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - accept = "application/json" - - # Construct URL - url = self.activate.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartnerTopic', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - activate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/activate'} # type: ignore - - async def deactivate( - self, - resource_group_name: str, - partner_topic_name: str, - **kwargs: Any - ) -> "_models.PartnerTopic": - """Deactivate a partner topic. - - Deactivate specific partner topic. + ) -> "_models.RegistrationInfo": + """Registration token of the host pool. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerTopic, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic + :return: RegistrationInfo, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.RegistrationInfo :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopic"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistrationInfo"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" # Construct URL - url = self.deactivate.metadata['url'] # type: ignore + url = self.retrieve_registration_token.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -567,10 +484,10 @@ async def deactivate( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerTopic', pipeline_response) + deserialized = self._deserialize('RegistrationInfo', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - deactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/deactivate'} # type: ignore + retrieve_registration_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/retrieveRegistrationToken'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_msix_images_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_msix_images_operations.py new file mode 100644 index 000000000000..ca996fc5e294 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_msix_images_operations.py @@ -0,0 +1,127 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MsixImagesOperations: + """MsixImagesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def expand( + self, + resource_group_name: str, + host_pool_name: str, + msix_image_uri: "_models.MSIXImageURI", + **kwargs: Any + ) -> AsyncIterable["_models.ExpandMsixImageList"]: + """Expands and Lists MSIX packages in an Image, given the Image Path. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_image_uri: Object containing URI to MSIX Image. + :type msix_image_uri: ~desktop_virtualization_api_client.models.MSIXImageURI + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpandMsixImageList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ExpandMsixImageList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpandMsixImageList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.expand.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(msix_image_uri, 'MSIXImageURI') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(msix_image_uri, 'MSIXImageURI') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExpandMsixImageList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + expand.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_msix_packages_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_msix_packages_operations.py new file mode 100644 index 000000000000..cc3e816f638c --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_msix_packages_operations.py @@ -0,0 +1,388 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MSIXPackagesOperations: + """MSIXPackagesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + host_pool_name: str, + msix_package_full_name: str, + **kwargs: Any + ) -> "_models.MSIXPackage": + """Get a msixpackage. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_package_full_name: The version specific package full name of the MSIX package + within specified hostpool. + :type msix_package_full_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSIXPackage, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.MSIXPackage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSIXPackage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSIXPackage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + host_pool_name: str, + msix_package_full_name: str, + msix_package: "_models.MSIXPackage", + **kwargs: Any + ) -> "_models.MSIXPackage": + """Create or update a MSIX package. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_package_full_name: The version specific package full name of the MSIX package + within specified hostpool. + :type msix_package_full_name: str + :param msix_package: Object containing MSIX Package definitions. + :type msix_package: ~desktop_virtualization_api_client.models.MSIXPackage + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSIXPackage, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.MSIXPackage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSIXPackage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(msix_package, 'MSIXPackage') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('MSIXPackage', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('MSIXPackage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + host_pool_name: str, + msix_package_full_name: str, + **kwargs: Any + ) -> None: + """Remove an MSIX Package. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_package_full_name: The version specific package full name of the MSIX package + within specified hostpool. + :type msix_package_full_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + host_pool_name: str, + msix_package_full_name: str, + msix_package: Optional["_models.MSIXPackagePatch"] = None, + **kwargs: Any + ) -> "_models.MSIXPackage": + """Update an MSIX Package. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_package_full_name: The version specific package full name of the MSIX package + within specified hostpool. + :type msix_package_full_name: str + :param msix_package: Object containing MSIX Package definitions. + :type msix_package: ~desktop_virtualization_api_client.models.MSIXPackagePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSIXPackage, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.MSIXPackage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSIXPackage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if msix_package is not None: + body_content = self._serialize.body(msix_package, 'MSIXPackagePatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSIXPackage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore + + def list( + self, + resource_group_name: str, + host_pool_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.MSIXPackageList"]: + """List MSIX packages in hostpool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MSIXPackageList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.MSIXPackageList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSIXPackageList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MSIXPackageList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_operations.py new file mode 100644 index 000000000000..09238b5f3413 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ResourceProviderOperationList"]: + """List all of the available operations the Desktop Virtualization resource provider supports. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceProviderOperationList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ResourceProviderOperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceProviderOperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceProviderOperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DesktopVirtualization/operations'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_private_endpoint_connections_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..b88375bb62b7 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,578 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_host_pool( + self, + resource_group_name: str, + host_pool_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResultWithSystemData"]: + """List private endpoint connections associated with hostpool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResultWithSystemData or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.PrivateEndpointConnectionListResultWithSystemData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResultWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResultWithSystemData', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections'} # type: ignore + + async def get_by_host_pool( + self, + resource_group_name: str, + host_pool_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionWithSystemData": + """Get a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionWithSystemData, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionWithSystemData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def delete_by_host_pool( + self, + resource_group_name: str, + host_pool_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + """Remove a connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def update_by_host_pool( + self, + resource_group_name: str, + host_pool_name: str, + private_endpoint_connection_name: str, + connection: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionWithSystemData": + """Approve or reject a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :param connection: Object containing the updated connection. + :type connection: ~desktop_virtualization_api_client.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionWithSystemData, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionWithSystemData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def list_by_workspace( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResultWithSystemData"]: + """List private endpoint connections. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResultWithSystemData or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.PrivateEndpointConnectionListResultWithSystemData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResultWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResultWithSystemData', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections'} # type: ignore + + async def get_by_workspace( + self, + resource_group_name: str, + workspace_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionWithSystemData": + """Get a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionWithSystemData, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionWithSystemData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def delete_by_workspace( + self, + resource_group_name: str, + workspace_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + """Remove a connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def update_by_workspace( + self, + resource_group_name: str, + workspace_name: str, + private_endpoint_connection_name: str, + connection: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionWithSystemData": + """Approve or reject a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :param connection: Object containing the updated connection. + :type connection: ~desktop_virtualization_api_client.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionWithSystemData, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionWithSystemData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_private_link_resources_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..da58a5f3d051 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,190 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_host_pool( + self, + resource_group_name: str, + host_pool_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: + """List the private link resources available for this hostpool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources'} # type: ignore + + def list_by_workspace( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: + """List the private link resources available for this workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources'} # type: ignore diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_registrations_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_scaling_plans_operations.py similarity index 63% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_registrations_operations.py rename to sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_scaling_plans_operations.py index 1919be658e9c..2efe4941d547 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_partner_registrations_operations.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_scaling_plans_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PartnerRegistrationsOperations: - """PartnerRegistrationsOperations async operations. +class ScalingPlansOperations: + """ScalingPlansOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~desktop_virtualization_api_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,36 +44,34 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def get( self, resource_group_name: str, - partner_registration_name: str, + scaling_plan_name: str, **kwargs: Any - ) -> "_models.PartnerRegistration": - """Get a partner registration. + ) -> "_models.ScalingPlan": + """Get a scaling plan. - Gets a partner registration with the specified parameters. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_registration_name: Name of the partner registration. - :type partner_registration_name: str + :param scaling_plan_name: The name of the scaling plan. + :type scaling_plan_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerRegistration, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerRegistration + :return: ScalingPlan, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ScalingPlan :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlan"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -93,51 +91,49 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerRegistration', pipeline_response) + deserialized = self._deserialize('ScalingPlan', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore - async def create_or_update( + async def create( self, resource_group_name: str, - partner_registration_name: str, - partner_registration_info: "_models.PartnerRegistration", + scaling_plan_name: str, + scaling_plan: "_models.ScalingPlan", **kwargs: Any - ) -> "_models.PartnerRegistration": - """Create a partner registration. - - Creates a new partner registration with the specified parameters. + ) -> "_models.ScalingPlan": + """Create or update a scaling plan. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_registration_name: Name of the partner registration. - :type partner_registration_name: str - :param partner_registration_info: PartnerRegistration information. - :type partner_registration_info: ~azure.mgmt.eventgrid.models.PartnerRegistration + :param scaling_plan_name: The name of the scaling plan. + :type scaling_plan_name: str + :param scaling_plan: Object containing scaling plan definitions. + :type scaling_plan: ~desktop_virtualization_api_client.models.ScalingPlan :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerRegistration, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerRegistration + :return: ScalingPlan, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ScalingPlan :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlan"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -151,42 +147,40 @@ async def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_registration_info, 'PartnerRegistration') + body_content = self._serialize.body(scaling_plan, 'ScalingPlan') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('PartnerRegistration', pipeline_response) + deserialized = self._deserialize('ScalingPlan', pipeline_response) - if response.status_code == 202: - deserialized = self._deserialize('PartnerRegistration', pipeline_response) + if response.status_code == 201: + deserialized = self._deserialize('ScalingPlan', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'} # type: ignore + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore async def delete( self, resource_group_name: str, - partner_registration_name: str, + scaling_plan_name: str, **kwargs: Any ) -> None: - """Delete a partner registration. + """Remove a scaling plan. - Deletes a partner registration with the specified parameters. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_registration_name: Name of the partner registration. - :type partner_registration_name: str + :param scaling_plan_name: The name of the scaling plan. + :type scaling_plan_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -197,14 +191,15 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" + accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -214,57 +209,56 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore async def update( self, resource_group_name: str, - partner_registration_name: str, - partner_registration_update_parameters: "_models.PartnerRegistrationUpdateParameters", + scaling_plan_name: str, + scaling_plan: Optional["_models.ScalingPlanPatch"] = None, **kwargs: Any - ) -> Optional["_models.PartnerRegistration"]: - """Update a partner registration. - - Updates a partner registration with the specified parameters. + ) -> "_models.ScalingPlan": + """Update a scaling plan. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_registration_name: Name of the partner registration. - :type partner_registration_name: str - :param partner_registration_update_parameters: Partner registration update information. - :type partner_registration_update_parameters: ~azure.mgmt.eventgrid.models.PartnerRegistrationUpdateParameters + :param scaling_plan_name: The name of the scaling plan. + :type scaling_plan_name: str + :param scaling_plan: Object containing scaling plan definitions. + :type scaling_plan: ~desktop_virtualization_api_client.models.ScalingPlanPatch :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerRegistration, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerRegistration or None + :return: ScalingPlan, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ScalingPlan :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PartnerRegistration"]] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlan"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -278,58 +272,47 @@ async def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_registration_update_parameters, 'PartnerRegistrationUpdateParameters') + if scaling_plan is not None: + body_content = self._serialize.body(scaling_plan, 'ScalingPlanPatch') + else: + body_content = None body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('PartnerRegistration', pipeline_response) + deserialized = self._deserialize('ScalingPlan', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore - def list_by_subscription( + def list_by_resource_group( self, - filter: Optional[str] = None, - top: Optional[int] = None, + resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PartnerRegistrationsListResult"]: - """List partner registrations under an Azure subscription. - - List all the partner registrations under an Azure subscription. - - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int + ) -> AsyncIterable["_models.ScalingPlanList"]: + """List scaling plans. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerRegistrationsListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] + :return: An iterator like instance of either ScalingPlanList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlanList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -339,18 +322,15 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -360,7 +340,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerRegistrationsListResult', pipeline_response) + deserialized = self._deserialize('ScalingPlanList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -381,43 +361,25 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerRegistrations'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans'} # type: ignore - def list_by_resource_group( + def list_by_subscription( self, - resource_group_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.PartnerRegistrationsListResult"]: - """List partner registrations under a resource group. - - List all the partner registrations under a resource group. + ) -> AsyncIterable["_models.ScalingPlanList"]: + """List scaling plans in subscription. - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerRegistrationsListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] + :return: An iterator like instance of either ScalingPlanList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlanList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -427,19 +389,14 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore + url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -449,7 +406,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerRegistrationsListResult', pipeline_response) + deserialized = self._deserialize('ScalingPlanList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -470,27 +427,31 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/scalingPlans'} # type: ignore - def list( + def list_by_host_pool( self, + resource_group_name: str, + host_pool_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PartnerRegistrationsListResult"]: - """List all available partners registrations. - - List all partners registrations. + ) -> AsyncIterable["_models.ScalingPlanList"]: + """List scaling plan associated with hostpool. + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerRegistrationsListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] + :return: An iterator like instance of either ScalingPlanList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlanList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -500,7 +461,13 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') @@ -513,11 +480,11 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerRegistrationsListResult', pipeline_response) + deserialized = self._deserialize('ScalingPlanList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): request = prepare_request(next_link) @@ -534,4 +501,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.EventGrid/partnerRegistrations'} # type: ignore + list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/scalingPlans'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_session_hosts_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_session_hosts_operations.py new file mode 100644 index 000000000000..ad2bccd104f7 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_session_hosts_operations.py @@ -0,0 +1,320 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SessionHostsOperations: + """SessionHostsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + host_pool_name: str, + session_host_name: str, + **kwargs: Any + ) -> "_models.SessionHost": + """Get a session host. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SessionHost, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.SessionHost + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SessionHost"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SessionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + host_pool_name: str, + session_host_name: str, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Remove a SessionHost. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param force: Force flag to force sessionHost deletion even when userSession exists. + :type force: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + host_pool_name: str, + session_host_name: str, + force: Optional[bool] = None, + session_host: Optional["_models.SessionHostPatch"] = None, + **kwargs: Any + ) -> "_models.SessionHost": + """Update a session host. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param force: Force flag to update assign, unassign or reassign personal desktop. + :type force: bool + :param session_host: Object containing SessionHost definitions. + :type session_host: ~desktop_virtualization_api_client.models.SessionHostPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SessionHost, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.SessionHost + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SessionHost"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if session_host is not None: + body_content = self._serialize.body(session_host, 'SessionHostPatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SessionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}'} # type: ignore + + def list( + self, + resource_group_name: str, + host_pool_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.SessionHostList"]: + """List sessionHosts. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SessionHostList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.SessionHostList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SessionHostList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SessionHostList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_start_menu_items_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_start_menu_items_operations.py new file mode 100644 index 000000000000..2307bae8b8c2 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_start_menu_items_operations.py @@ -0,0 +1,116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class StartMenuItemsOperations: + """StartMenuItemsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + application_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.StartMenuItemList"]: + """List start menu items in the given application group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either StartMenuItemList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.StartMenuItemList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.StartMenuItemList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('StartMenuItemList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/startMenuItems'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_user_sessions_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_user_sessions_operations.py new file mode 100644 index 000000000000..c8ede54eb807 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_user_sessions_operations.py @@ -0,0 +1,471 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class UserSessionsOperations: + """UserSessionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_host_pool( + self, + resource_group_name: str, + host_pool_name: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.UserSessionList"]: + """List userSessions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param filter: OData filter expression. Valid properties for filtering are userprincipalname + and sessionstate. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UserSessionList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.UserSessionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserSessionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UserSessionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/userSessions'} # type: ignore + + async def get( + self, + resource_group_name: str, + host_pool_name: str, + session_host_name: str, + user_session_id: str, + **kwargs: Any + ) -> "_models.UserSession": + """Get a userSession. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param user_session_id: The name of the user session within the specified session host. + :type user_session_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UserSession, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.UserSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UserSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + host_pool_name: str, + session_host_name: str, + user_session_id: str, + force: Optional[bool] = None, + **kwargs: Any + ) -> None: + """Remove a userSession. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param user_session_id: The name of the user session within the specified session host. + :type user_session_id: str + :param force: Force flag to login off userSession. + :type force: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}'} # type: ignore + + def list( + self, + resource_group_name: str, + host_pool_name: str, + session_host_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.UserSessionList"]: + """List userSessions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UserSessionList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.UserSessionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserSessionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UserSessionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions'} # type: ignore + + async def disconnect( + self, + resource_group_name: str, + host_pool_name: str, + session_host_name: str, + user_session_id: str, + **kwargs: Any + ) -> None: + """Disconnect a userSession. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param user_session_id: The name of the user session within the specified session host. + :type user_session_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.disconnect.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disconnect.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect'} # type: ignore + + async def send_message( + self, + resource_group_name: str, + host_pool_name: str, + session_host_name: str, + user_session_id: str, + send_message: Optional["_models.SendMessage"] = None, + **kwargs: Any + ) -> None: + """Send a message to a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param user_session_id: The name of the user session within the specified session host. + :type user_session_id: str + :param send_message: Object containing message includes title and message body. + :type send_message: ~desktop_virtualization_api_client.models.SendMessage + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.send_message.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if send_message is not None: + body_content = self._serialize.body(send_message, 'SendMessage') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + send_message.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/sendMessage'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_workspaces_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_workspaces_operations.py new file mode 100644 index 000000000000..5898aa71c78f --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/aio/operations/_workspaces_operations.py @@ -0,0 +1,430 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WorkspacesOperations: + """WorkspacesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> "_models.Workspace": + """Get a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workspace, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Workspace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + workspace_name: str, + workspace: "_models.Workspace", + **kwargs: Any + ) -> "_models.Workspace": + """Create or update a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param workspace: Object containing Workspace definitions. + :type workspace: ~desktop_virtualization_api_client.models.Workspace + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workspace, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Workspace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(workspace, 'Workspace') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Workspace', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + workspace_name: str, + **kwargs: Any + ) -> None: + """Remove a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + workspace_name: str, + workspace: Optional["_models.WorkspacePatch"] = None, + **kwargs: Any + ) -> "_models.Workspace": + """Update a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param workspace: Object containing Workspace definitions. + :type workspace: ~desktop_virtualization_api_client.models.WorkspacePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workspace, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Workspace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if workspace is not None: + body_content = self._serialize.body(workspace, 'WorkspacePatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.WorkspaceList"]: + """List workspaces. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkspaceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.WorkspaceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkspaceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.WorkspaceList"]: + """List workspaces in subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkspaceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~desktop_virtualization_api_client.models.WorkspaceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WorkspaceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/workspaces'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/__init__.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/__init__.py new file mode 100644 index 000000000000..cf41bbdc9aa6 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/__init__.py @@ -0,0 +1,261 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Application + from ._models_py3 import ApplicationGroup + from ._models_py3 import ApplicationGroupList + from ._models_py3 import ApplicationGroupPatch + from ._models_py3 import ApplicationList + from ._models_py3 import ApplicationPatch + from ._models_py3 import CloudErrorProperties + from ._models_py3 import Desktop + from ._models_py3 import DesktopList + from ._models_py3 import DesktopPatch + from ._models_py3 import ExpandMsixImage + from ._models_py3 import ExpandMsixImageList + from ._models_py3 import HostPool + from ._models_py3 import HostPoolList + from ._models_py3 import HostPoolPatch + from ._models_py3 import Identity + from ._models_py3 import LogSpecification + from ._models_py3 import MSIXImageURI + from ._models_py3 import MSIXPackage + from ._models_py3 import MSIXPackageList + from ._models_py3 import MSIXPackagePatch + from ._models_py3 import MigrationRequestProperties + from ._models_py3 import MsixPackageApplications + from ._models_py3 import MsixPackageDependencies + from ._models_py3 import OperationProperties + from ._models_py3 import Plan + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResultWithSystemData + from ._models_py3 import PrivateEndpointConnectionWithSystemData + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import RegistrationInfo + from ._models_py3 import RegistrationInfoPatch + from ._models_py3 import Resource + from ._models_py3 import ResourceModelWithAllowedPropertySet + from ._models_py3 import ResourceModelWithAllowedPropertySetIdentity + from ._models_py3 import ResourceModelWithAllowedPropertySetPlan + from ._models_py3 import ResourceModelWithAllowedPropertySetSku + from ._models_py3 import ResourceProviderOperation + from ._models_py3 import ResourceProviderOperationDisplay + from ._models_py3 import ResourceProviderOperationList + from ._models_py3 import ScalingHostPoolReference + from ._models_py3 import ScalingPlan + from ._models_py3 import ScalingPlanList + from ._models_py3 import ScalingPlanPatch + from ._models_py3 import ScalingSchedule + from ._models_py3 import SendMessage + from ._models_py3 import ServiceSpecification + from ._models_py3 import SessionHost + from ._models_py3 import SessionHostHealthCheckFailureDetails + from ._models_py3 import SessionHostHealthCheckReport + from ._models_py3 import SessionHostList + from ._models_py3 import SessionHostPatch + from ._models_py3 import Sku + from ._models_py3 import StartMenuItem + from ._models_py3 import StartMenuItemList + from ._models_py3 import SystemData + from ._models_py3 import Time + from ._models_py3 import UserSession + from ._models_py3 import UserSessionList + from ._models_py3 import Workspace + from ._models_py3 import WorkspaceList + from ._models_py3 import WorkspacePatch +except (SyntaxError, ImportError): + from ._models import Application # type: ignore + from ._models import ApplicationGroup # type: ignore + from ._models import ApplicationGroupList # type: ignore + from ._models import ApplicationGroupPatch # type: ignore + from ._models import ApplicationList # type: ignore + from ._models import ApplicationPatch # type: ignore + from ._models import CloudErrorProperties # type: ignore + from ._models import Desktop # type: ignore + from ._models import DesktopList # type: ignore + from ._models import DesktopPatch # type: ignore + from ._models import ExpandMsixImage # type: ignore + from ._models import ExpandMsixImageList # type: ignore + from ._models import HostPool # type: ignore + from ._models import HostPoolList # type: ignore + from ._models import HostPoolPatch # type: ignore + from ._models import Identity # type: ignore + from ._models import LogSpecification # type: ignore + from ._models import MSIXImageURI # type: ignore + from ._models import MSIXPackage # type: ignore + from ._models import MSIXPackageList # type: ignore + from ._models import MSIXPackagePatch # type: ignore + from ._models import MigrationRequestProperties # type: ignore + from ._models import MsixPackageApplications # type: ignore + from ._models import MsixPackageDependencies # type: ignore + from ._models import OperationProperties # type: ignore + from ._models import Plan # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResultWithSystemData # type: ignore + from ._models import PrivateEndpointConnectionWithSystemData # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import RegistrationInfo # type: ignore + from ._models import RegistrationInfoPatch # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceModelWithAllowedPropertySet # type: ignore + from ._models import ResourceModelWithAllowedPropertySetIdentity # type: ignore + from ._models import ResourceModelWithAllowedPropertySetPlan # type: ignore + from ._models import ResourceModelWithAllowedPropertySetSku # type: ignore + from ._models import ResourceProviderOperation # type: ignore + from ._models import ResourceProviderOperationDisplay # type: ignore + from ._models import ResourceProviderOperationList # type: ignore + from ._models import ScalingHostPoolReference # type: ignore + from ._models import ScalingPlan # type: ignore + from ._models import ScalingPlanList # type: ignore + from ._models import ScalingPlanPatch # type: ignore + from ._models import ScalingSchedule # type: ignore + from ._models import SendMessage # type: ignore + from ._models import ServiceSpecification # type: ignore + from ._models import SessionHost # type: ignore + from ._models import SessionHostHealthCheckFailureDetails # type: ignore + from ._models import SessionHostHealthCheckReport # type: ignore + from ._models import SessionHostList # type: ignore + from ._models import SessionHostPatch # type: ignore + from ._models import Sku # type: ignore + from ._models import StartMenuItem # type: ignore + from ._models import StartMenuItemList # type: ignore + from ._models import SystemData # type: ignore + from ._models import Time # type: ignore + from ._models import UserSession # type: ignore + from ._models import UserSessionList # type: ignore + from ._models import Workspace # type: ignore + from ._models import WorkspaceList # type: ignore + from ._models import WorkspacePatch # type: ignore + +from ._desktop_virtualization_api_client_enums import ( + ApplicationGroupType, + ApplicationType, + CommandLineSetting, + CreatedByType, + HealthCheckName, + HealthCheckResult, + HostPoolType, + LoadBalancerType, + Operation, + PersonalDesktopAssignmentType, + PreferredAppGroupType, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + PublicNetworkAccess, + RegistrationTokenOperation, + RemoteApplicationType, + SSOSecretType, + ScalingHostPoolType, + ScalingScheduleDaysOfWeekItem, + SessionHostLoadBalancingAlgorithm, + SessionState, + SkuTier, + Status, + StopHostsWhen, + UpdateState, +) + +__all__ = [ + 'Application', + 'ApplicationGroup', + 'ApplicationGroupList', + 'ApplicationGroupPatch', + 'ApplicationList', + 'ApplicationPatch', + 'CloudErrorProperties', + 'Desktop', + 'DesktopList', + 'DesktopPatch', + 'ExpandMsixImage', + 'ExpandMsixImageList', + 'HostPool', + 'HostPoolList', + 'HostPoolPatch', + 'Identity', + 'LogSpecification', + 'MSIXImageURI', + 'MSIXPackage', + 'MSIXPackageList', + 'MSIXPackagePatch', + 'MigrationRequestProperties', + 'MsixPackageApplications', + 'MsixPackageDependencies', + 'OperationProperties', + 'Plan', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResultWithSystemData', + 'PrivateEndpointConnectionWithSystemData', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'RegistrationInfo', + 'RegistrationInfoPatch', + 'Resource', + 'ResourceModelWithAllowedPropertySet', + 'ResourceModelWithAllowedPropertySetIdentity', + 'ResourceModelWithAllowedPropertySetPlan', + 'ResourceModelWithAllowedPropertySetSku', + 'ResourceProviderOperation', + 'ResourceProviderOperationDisplay', + 'ResourceProviderOperationList', + 'ScalingHostPoolReference', + 'ScalingPlan', + 'ScalingPlanList', + 'ScalingPlanPatch', + 'ScalingSchedule', + 'SendMessage', + 'ServiceSpecification', + 'SessionHost', + 'SessionHostHealthCheckFailureDetails', + 'SessionHostHealthCheckReport', + 'SessionHostList', + 'SessionHostPatch', + 'Sku', + 'StartMenuItem', + 'StartMenuItemList', + 'SystemData', + 'Time', + 'UserSession', + 'UserSessionList', + 'Workspace', + 'WorkspaceList', + 'WorkspacePatch', + 'ApplicationGroupType', + 'ApplicationType', + 'CommandLineSetting', + 'CreatedByType', + 'HealthCheckName', + 'HealthCheckResult', + 'HostPoolType', + 'LoadBalancerType', + 'Operation', + 'PersonalDesktopAssignmentType', + 'PreferredAppGroupType', + 'PrivateEndpointConnectionProvisioningState', + 'PrivateEndpointServiceConnectionStatus', + 'PublicNetworkAccess', + 'RegistrationTokenOperation', + 'RemoteApplicationType', + 'SSOSecretType', + 'ScalingHostPoolType', + 'ScalingScheduleDaysOfWeekItem', + 'SessionHostLoadBalancingAlgorithm', + 'SessionState', + 'SkuTier', + 'Status', + 'StopHostsWhen', + 'UpdateState', +] diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_desktop_virtualization_api_client_enums.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_desktop_virtualization_api_client_enums.py new file mode 100644 index 000000000000..493339676783 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_desktop_virtualization_api_client_enums.py @@ -0,0 +1,327 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class ApplicationGroupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Resource Type of ApplicationGroup. + """ + + REMOTE_APP = "RemoteApp" + DESKTOP = "Desktop" + +class ApplicationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Application type of application. + """ + + REMOTE_APP = "RemoteApp" + DESKTOP = "Desktop" + +class CommandLineSetting(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies whether this published application can be launched with command line arguments + provided by the client, command line arguments specified at publish time, or no command line + arguments at all. + """ + + DO_NOT_ALLOW = "DoNotAllow" + ALLOW = "Allow" + REQUIRE = "Require" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class HealthCheckName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Represents the name of the health check operation performed. + """ + + #: Verifies the SessionHost is joined to a domain. If this check fails is classified as fatal as + #: no connection can succeed if the SessionHost is not joined to the domain. + DOMAIN_JOINED_CHECK = "DomainJoinedCheck" + #: Verifies the SessionHost is not experiencing domain trust issues that will prevent + #: authentication on SessionHost at connection time when session is created. If this check fails + #: is classified as fatal as no connection can succeed if we cannot reach the domain for + #: authentication on the SessionHost. + DOMAIN_TRUST_CHECK = "DomainTrustCheck" + #: Verifies the FSLogix service is up and running to make sure users' profiles are loaded in the + #: session. If this check fails is classified as fatal as even if the connection can succeed, user + #: experience is bad as the user profile cannot be loaded and user will get a temporary profile in + #: the session. + FS_LOGIX_HEALTH_CHECK = "FSLogixHealthCheck" + #: Verifies that the SxS stack is up and running so connections can succeed. If this check fails + #: is classified as fatal as no connection can succeed if the SxS stack is not ready. + SX_S_STACK_LISTENER_CHECK = "SxSStackListenerCheck" + #: Verifies that the required WVD service and Geneva URLs are reachable from the SessionHost. + #: These URLs are: RdTokenUri, RdBrokerURI, RdDiagnosticsUri and storage blob URLs for agent + #: monitoring (geneva). If this check fails, it is non fatal and the machine still can service + #: connections, main issue may be that monitoring agent is unable to store warm path data (logs, + #: operations ...). + URLS_ACCESSIBLE_CHECK = "UrlsAccessibleCheck" + #: Verifies that the required Geneva agent is running. If this check fails, it is non fatal and + #: the machine still can service connections, main issue may be that monitoring agent is missing + #: or running (possibly) older version. + MONITORING_AGENT_CHECK = "MonitoringAgentCheck" + #: Verifies the domain the SessionHost is joined to is still reachable. If this check fails is + #: classified as fatal as no connection can succeed if the domain the SessionHost is joined is not + #: reachable at the time of connection. + DOMAIN_REACHABLE = "DomainReachable" + #: Verifies whether the WebRTCRedirector component is healthy. The WebRTCRedirector component is + #: used to optimize video and audio performance in Microsoft Teams. This checks whether the + #: component is still running, and whether there is a higher version available. If this check + #: fails, it is non fatal and the machine still can service connections, main issue may be the + #: WebRTCRedirector component has to be restarted or updated. + WEB_RTC_REDIRECTOR_CHECK = "WebRTCRedirectorCheck" + #: Verifies the value of SecurityLayer registration key. If the value is 0 (SecurityLayer.RDP) + #: this check fails with Error code = NativeMethodErrorCode.E_FAIL and is fatal. If the value is 1 + #: (SecurityLayer.Negotiate) this check fails with Error code = + #: NativeMethodErrorCode.ERROR_SUCCESS and is non fatal. + SUPPORTED_ENCRYPTION_CHECK = "SupportedEncryptionCheck" + #: Verifies the metadata service is accessible and return compute properties. + META_DATA_SERVICE_CHECK = "MetaDataServiceCheck" + #: Verifies that the AppAttachService is healthy (there were no issues during package staging). + #: The AppAttachService is used to enable the staging/registration (and eventual + #: deregistration/destaging) of MSIX apps that have been set up by the tenant admin. This checks + #: whether the component had any failures during package staging. Failures in staging will prevent + #: some MSIX apps from working properly for the end user. If this check fails, it is non fatal and + #: the machine still can service connections, main issue may be certain apps will not work for + #: end-users. + APP_ATTACH_HEALTH_CHECK = "AppAttachHealthCheck" + +class HealthCheckResult(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Represents the Health state of the health check we performed. + """ + + #: Health check result is not currently known. + UNKNOWN = "Unknown" + #: Health check passed. + HEALTH_CHECK_SUCCEEDED = "HealthCheckSucceeded" + #: Health check failed. + HEALTH_CHECK_FAILED = "HealthCheckFailed" + #: We received a Shutdown notification. + SESSION_HOST_SHUTDOWN = "SessionHostShutdown" + +class HostPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """HostPool type for desktop. + """ + + #: Users will be assigned a SessionHost either by administrators (PersonalDesktopAssignmentType = + #: Direct) or upon connecting to the pool (PersonalDesktopAssignmentType = Automatic). They will + #: always be redirected to their assigned SessionHost. + PERSONAL = "Personal" + #: Users get a new (random) SessionHost every time it connects to the HostPool. + POOLED = "Pooled" + #: Users assign their own machines, load balancing logic remains the same as Personal. + #: PersonalDesktopAssignmentType must be Direct. + BYO_DESKTOP = "BYODesktop" + +class LoadBalancerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the load balancer. + """ + + BREADTH_FIRST = "BreadthFirst" + DEPTH_FIRST = "DepthFirst" + PERSISTENT = "Persistent" + +class Operation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of operation for migration. + """ + + #: Start the migration. + START = "Start" + #: Revoke the migration. + REVOKE = "Revoke" + #: Complete the migration. + COMPLETE = "Complete" + #: Hide the hostpool. + HIDE = "Hide" + #: Unhide the hostpool. + UNHIDE = "Unhide" + +class PersonalDesktopAssignmentType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """PersonalDesktopAssignment type for HostPool. + """ + + AUTOMATIC = "Automatic" + DIRECT = "Direct" + +class PreferredAppGroupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of preferred application group type, default to Desktop Application Group + """ + + NONE = "None" + DESKTOP = "Desktop" + RAIL_APPLICATIONS = "RailApplications" + +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + +class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private endpoint connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + +class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enabled allows this resource to be accessed from both public and private networks, Disabled + allows this resource to only be accessed via private endpoints + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class RegistrationTokenOperation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of resetting the token. + """ + + DELETE = "Delete" + NONE = "None" + UPDATE = "Update" + +class RemoteApplicationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Resource Type of Application. + """ + + IN_BUILT = "InBuilt" + MSIX_APPLICATION = "MsixApplication" + +class ScalingHostPoolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """HostPool type for desktop. + """ + + #: Users get a new (random) SessionHost every time it connects to the HostPool. + POOLED = "Pooled" + +class ScalingScheduleDaysOfWeekItem(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + SUNDAY = "Sunday" + MONDAY = "Monday" + TUESDAY = "Tuesday" + WEDNESDAY = "Wednesday" + THURSDAY = "Thursday" + FRIDAY = "Friday" + SATURDAY = "Saturday" + +class SessionHostLoadBalancingAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Load balancing algorithm for ramp up period. + """ + + BREADTH_FIRST = "BreadthFirst" + DEPTH_FIRST = "DepthFirst" + +class SessionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """State of user session. + """ + + UNKNOWN = "Unknown" + ACTIVE = "Active" + DISCONNECTED = "Disconnected" + PENDING = "Pending" + LOG_OFF = "LogOff" + USER_PROFILE_DISK_MOUNTED = "UserProfileDiskMounted" + +class SkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """This field is required to be implemented by the Resource Provider if the service has more than + one tier, but is not required on a PUT. + """ + + FREE = "Free" + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + +class SSOSecretType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of single sign on Secret Type. + """ + + SHARED_KEY = "SharedKey" + CERTIFICATE = "Certificate" + SHARED_KEY_IN_KEY_VAULT = "SharedKeyInKeyVault" + CERTIFICATE_IN_KEY_VAULT = "CertificateInKeyVault" + +class Status(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status for a SessionHost. + """ + + #: Session Host has passed all the health checks and is available to handle connections. + AVAILABLE = "Available" + #: Session Host is either turned off or has failed critical health checks which is causing service + #: not to be able to route connections to this session host. Note this replaces previous + #: 'NoHeartBeat' status. + UNAVAILABLE = "Unavailable" + #: Session Host is shutdown - RD Agent reported session host to be stopped or deallocated. + SHUTDOWN = "Shutdown" + #: The Session Host is unavailable because it is currently disconnected. + DISCONNECTED = "Disconnected" + #: Session Host is unavailable because currently an upgrade of RDAgent/side-by-side stack is in + #: progress. Note: this state will be removed once the upgrade completes and the host is able to + #: accept connections. + UPGRADING = "Upgrading" + #: Session Host is unavailable because the critical component upgrade (agent, side-by-side stack, + #: etc.) failed. + UPGRADE_FAILED = "UpgradeFailed" + #: The Session Host is not heart beating. + NO_HEARTBEAT = "NoHeartbeat" + #: SessionHost is not joined to domain. + NOT_JOINED_TO_DOMAIN = "NotJoinedToDomain" + #: SessionHost's domain trust relationship lost. + DOMAIN_TRUST_RELATIONSHIP_LOST = "DomainTrustRelationshipLost" + #: SxS stack installed on the SessionHost is not ready to receive connections. + SX_S_STACK_LISTENER_NOT_READY = "SxSStackListenerNotReady" + #: FSLogix is in an unhealthy state on the session host. + FS_LOGIX_NOT_HEALTHY = "FSLogixNotHealthy" + #: New status to inform admins that the health on their endpoint needs to be fixed. The + #: connections might not fail, as these issues are not fatal. + NEEDS_ASSISTANCE = "NeedsAssistance" + +class StopHostsWhen(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies when to stop hosts during ramp down period. + """ + + ZERO_SESSIONS = "ZeroSessions" + ZERO_ACTIVE_SESSIONS = "ZeroActiveSessions" + +class UpdateState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Update state of a SessionHost. + """ + + INITIAL = "Initial" + PENDING = "Pending" + STARTED = "Started" + SUCCEEDED = "Succeeded" + FAILED = "Failed" diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_models.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_models.py new file mode 100644 index 000000000000..ddf752c9348e --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_models.py @@ -0,0 +1,3114 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 msrest.serialization + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Application(Resource): + """Schema for Application properties. + + 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. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of Application. (internal use). + :vartype object_id: str + :param description: Description of Application. + :type description: str + :param friendly_name: Friendly name of Application. + :type friendly_name: str + :param file_path: Specifies a path for the executable file for the application. + :type file_path: str + :param msix_package_family_name: Specifies the package family name for MSIX applications. + :type msix_package_family_name: str + :param msix_package_application_id: Specifies the package application Id for MSIX applications. + :type msix_package_application_id: str + :param application_type: Resource Type of Application. Possible values include: "InBuilt", + "MsixApplication". + :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType + :param command_line_setting: Required. Specifies whether this published application can be + launched with command line arguments provided by the client, command line arguments specified + at publish time, or no command line arguments at all. Possible values include: "DoNotAllow", + "Allow", "Require". + :type command_line_setting: str or ~desktop_virtualization_api_client.models.CommandLineSetting + :param command_line_arguments: Command Line Arguments for Application. + :type command_line_arguments: str + :param show_in_portal: Specifies whether to show the RemoteApp program in the RD Web Access + server. + :type show_in_portal: bool + :param icon_path: Path to icon. + :type icon_path: str + :param icon_index: Index of the icon. + :type icon_index: int + :ivar icon_hash: Hash of the icon. + :vartype icon_hash: str + :ivar icon_content: the icon a 64 bit string as a byte array. + :vartype icon_content: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'command_line_setting': {'required': True}, + 'icon_hash': {'readonly': True}, + 'icon_content': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'msix_package_family_name': {'key': 'properties.msixPackageFamilyName', 'type': 'str'}, + 'msix_package_application_id': {'key': 'properties.msixPackageApplicationId', 'type': 'str'}, + 'application_type': {'key': 'properties.applicationType', 'type': 'str'}, + 'command_line_setting': {'key': 'properties.commandLineSetting', 'type': 'str'}, + 'command_line_arguments': {'key': 'properties.commandLineArguments', 'type': 'str'}, + 'show_in_portal': {'key': 'properties.showInPortal', 'type': 'bool'}, + 'icon_path': {'key': 'properties.iconPath', 'type': 'str'}, + 'icon_index': {'key': 'properties.iconIndex', 'type': 'int'}, + 'icon_hash': {'key': 'properties.iconHash', 'type': 'str'}, + 'icon_content': {'key': 'properties.iconContent', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(Application, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.file_path = kwargs.get('file_path', None) + self.msix_package_family_name = kwargs.get('msix_package_family_name', None) + self.msix_package_application_id = kwargs.get('msix_package_application_id', None) + self.application_type = kwargs.get('application_type', None) + self.command_line_setting = kwargs['command_line_setting'] + self.command_line_arguments = kwargs.get('command_line_arguments', None) + self.show_in_portal = kwargs.get('show_in_portal', None) + self.icon_path = kwargs.get('icon_path', None) + self.icon_index = kwargs.get('icon_index', None) + self.icon_hash = None + self.icon_content = None + + +class ResourceModelWithAllowedPropertySet(msrest.serialization.Model): + """The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceModelWithAllowedPropertySet, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.managed_by = kwargs.get('managed_by', None) + self.kind = kwargs.get('kind', None) + self.etag = None + self.tags = kwargs.get('tags', None) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.plan = kwargs.get('plan', None) + + +class ApplicationGroup(ResourceModelWithAllowedPropertySet): + """Represents a ApplicationGroup definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of ApplicationGroup. (internal use). + :vartype object_id: str + :param description: Description of ApplicationGroup. + :type description: str + :param friendly_name: Friendly name of ApplicationGroup. + :type friendly_name: str + :param host_pool_arm_path: Required. HostPool arm path of ApplicationGroup. + :type host_pool_arm_path: str + :ivar workspace_arm_path: Workspace arm path of ApplicationGroup. + :vartype workspace_arm_path: str + :param application_group_type: Required. Resource Type of ApplicationGroup. Possible values + include: "RemoteApp", "Desktop". + :type application_group_type: str or + ~desktop_virtualization_api_client.models.ApplicationGroupType + :param migration_request: The registration info of HostPool. + :type migration_request: ~desktop_virtualization_api_client.models.MigrationRequestProperties + :ivar cloud_pc_resource: Is cloud pc resource. + :vartype cloud_pc_resource: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'host_pool_arm_path': {'required': True}, + 'workspace_arm_path': {'readonly': True}, + 'application_group_type': {'required': True}, + 'cloud_pc_resource': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'host_pool_arm_path': {'key': 'properties.hostPoolArmPath', 'type': 'str'}, + 'workspace_arm_path': {'key': 'properties.workspaceArmPath', 'type': 'str'}, + 'application_group_type': {'key': 'properties.applicationGroupType', 'type': 'str'}, + 'migration_request': {'key': 'properties.migrationRequest', 'type': 'MigrationRequestProperties'}, + 'cloud_pc_resource': {'key': 'properties.cloudPcResource', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGroup, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.host_pool_arm_path = kwargs['host_pool_arm_path'] + self.workspace_arm_path = None + self.application_group_type = kwargs['application_group_type'] + self.migration_request = kwargs.get('migration_request', None) + self.cloud_pc_resource = None + + +class ApplicationGroupList(msrest.serialization.Model): + """List of ApplicationGroup definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of ApplicationGroup definitions. + :type value: list[~desktop_virtualization_api_client.models.ApplicationGroup] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGroupList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ApplicationGroupPatch(Resource): + """ApplicationGroup properties that can be patched. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of ApplicationGroup. + :type description: str + :param friendly_name: Friendly name of ApplicationGroup. + :type friendly_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGroupPatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + + +class ApplicationList(msrest.serialization.Model): + """List of Application definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of Application definitions. + :type value: list[~desktop_virtualization_api_client.models.Application] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Application]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ApplicationPatch(msrest.serialization.Model): + """Application properties that can be patched. + + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of Application. + :type description: str + :param friendly_name: Friendly name of Application. + :type friendly_name: str + :param file_path: Specifies a path for the executable file for the application. + :type file_path: str + :param command_line_setting: Specifies whether this published application can be launched with + command line arguments provided by the client, command line arguments specified at publish + time, or no command line arguments at all. Possible values include: "DoNotAllow", "Allow", + "Require". + :type command_line_setting: str or ~desktop_virtualization_api_client.models.CommandLineSetting + :param command_line_arguments: Command Line Arguments for Application. + :type command_line_arguments: str + :param show_in_portal: Specifies whether to show the RemoteApp program in the RD Web Access + server. + :type show_in_portal: bool + :param icon_path: Path to icon. + :type icon_path: str + :param icon_index: Index of the icon. + :type icon_index: int + :param msix_package_family_name: Specifies the package family name for MSIX applications. + :type msix_package_family_name: str + :param msix_package_application_id: Specifies the package application Id for MSIX applications. + :type msix_package_application_id: str + :param application_type: Resource Type of Application. Possible values include: "InBuilt", + "MsixApplication". + :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'command_line_setting': {'key': 'properties.commandLineSetting', 'type': 'str'}, + 'command_line_arguments': {'key': 'properties.commandLineArguments', 'type': 'str'}, + 'show_in_portal': {'key': 'properties.showInPortal', 'type': 'bool'}, + 'icon_path': {'key': 'properties.iconPath', 'type': 'str'}, + 'icon_index': {'key': 'properties.iconIndex', 'type': 'int'}, + 'msix_package_family_name': {'key': 'properties.msixPackageFamilyName', 'type': 'str'}, + 'msix_package_application_id': {'key': 'properties.msixPackageApplicationId', 'type': 'str'}, + 'application_type': {'key': 'properties.applicationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationPatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.file_path = kwargs.get('file_path', None) + self.command_line_setting = kwargs.get('command_line_setting', None) + self.command_line_arguments = kwargs.get('command_line_arguments', None) + self.show_in_portal = kwargs.get('show_in_portal', None) + self.icon_path = kwargs.get('icon_path', None) + self.icon_index = kwargs.get('icon_index', None) + self.msix_package_family_name = kwargs.get('msix_package_family_name', None) + self.msix_package_application_id = kwargs.get('msix_package_application_id', None) + self.application_type = kwargs.get('application_type', None) + + +class CloudErrorProperties(msrest.serialization.Model): + """Cloud error object properties. + + :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(CloudErrorProperties, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class Desktop(Resource): + """Schema for Desktop properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of Desktop. (internal use). + :vartype object_id: str + :param description: Description of Desktop. + :type description: str + :param friendly_name: Friendly name of Desktop. + :type friendly_name: str + :ivar icon_hash: Hash of the icon. + :vartype icon_hash: str + :ivar icon_content: The icon a 64 bit string as a byte array. + :vartype icon_content: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'icon_hash': {'readonly': True}, + 'icon_content': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'icon_hash': {'key': 'properties.iconHash', 'type': 'str'}, + 'icon_content': {'key': 'properties.iconContent', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(Desktop, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.icon_hash = None + self.icon_content = None + + +class DesktopList(msrest.serialization.Model): + """List of Desktop definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of Desktop definitions. + :type value: list[~desktop_virtualization_api_client.models.Desktop] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Desktop]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DesktopList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class DesktopPatch(msrest.serialization.Model): + """Desktop properties that can be patched. + + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of Desktop. + :type description: str + :param friendly_name: Friendly name of Desktop. + :type friendly_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DesktopPatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + + +class ExpandMsixImage(Resource): + """Represents the definition of contents retrieved after expanding the MSIX Image. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param package_alias: Alias of MSIX Package. + :type package_alias: str + :param image_path: VHD/CIM image path on Network Share. + :type image_path: str + :param package_name: Package Name from appxmanifest.xml. + :type package_name: str + :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name + and Publisher name. + :type package_family_name: str + :param package_full_name: Package Full Name from appxmanifest.xml. + :type package_full_name: str + :param display_name: User friendly Name to be displayed in the portal. + :type display_name: str + :param package_relative_path: Relative Path to the package inside the image. + :type package_relative_path: str + :param is_regular_registration: Specifies how to register Package in feed. + :type is_regular_registration: bool + :param is_active: Make this version of the package the active one across the hostpool. + :type is_active: bool + :param package_dependencies: List of package dependencies. + :type package_dependencies: + list[~desktop_virtualization_api_client.models.MsixPackageDependencies] + :param version: Package Version found in the appxmanifest.xml. + :type version: str + :param last_updated: Date Package was last updated, found in the appxmanifest.xml. + :type last_updated: ~datetime.datetime + :param package_applications: List of package applications. + :type package_applications: + list[~desktop_virtualization_api_client.models.MsixPackageApplications] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'package_alias': {'key': 'properties.packageAlias', 'type': 'str'}, + 'image_path': {'key': 'properties.imagePath', 'type': 'str'}, + 'package_name': {'key': 'properties.packageName', 'type': 'str'}, + 'package_family_name': {'key': 'properties.packageFamilyName', 'type': 'str'}, + 'package_full_name': {'key': 'properties.packageFullName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'package_relative_path': {'key': 'properties.packageRelativePath', 'type': 'str'}, + 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'}, + 'is_active': {'key': 'properties.isActive', 'type': 'bool'}, + 'package_dependencies': {'key': 'properties.packageDependencies', 'type': '[MsixPackageDependencies]'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'}, + 'package_applications': {'key': 'properties.packageApplications', 'type': '[MsixPackageApplications]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpandMsixImage, self).__init__(**kwargs) + self.package_alias = kwargs.get('package_alias', None) + self.image_path = kwargs.get('image_path', None) + self.package_name = kwargs.get('package_name', None) + self.package_family_name = kwargs.get('package_family_name', None) + self.package_full_name = kwargs.get('package_full_name', None) + self.display_name = kwargs.get('display_name', None) + self.package_relative_path = kwargs.get('package_relative_path', None) + self.is_regular_registration = kwargs.get('is_regular_registration', None) + self.is_active = kwargs.get('is_active', None) + self.package_dependencies = kwargs.get('package_dependencies', None) + self.version = kwargs.get('version', None) + self.last_updated = kwargs.get('last_updated', None) + self.package_applications = kwargs.get('package_applications', None) + + +class ExpandMsixImageList(msrest.serialization.Model): + """List of MSIX package properties retrieved from MSIX Image expansion. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of MSIX package properties from give MSIX Image. + :type value: list[~desktop_virtualization_api_client.models.ExpandMsixImage] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpandMsixImage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpandMsixImageList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class HostPool(ResourceModelWithAllowedPropertySet): + """Represents a HostPool definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of HostPool. (internal use). + :vartype object_id: str + :param friendly_name: Friendly name of HostPool. + :type friendly_name: str + :param description: Description of HostPool. + :type description: str + :param host_pool_type: Required. HostPool type for desktop. Possible values include: + "Personal", "Pooled", "BYODesktop". + :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType + :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool. Possible + values include: "Automatic", "Direct". + :type personal_desktop_assignment_type: str or + ~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType + :param custom_rdp_property: Custom rdp property of HostPool. + :type custom_rdp_property: str + :param max_session_limit: The max session limit of HostPool. + :type max_session_limit: int + :param load_balancer_type: Required. The type of the load balancer. Possible values include: + "BreadthFirst", "DepthFirst", "Persistent". + :type load_balancer_type: str or ~desktop_virtualization_api_client.models.LoadBalancerType + :param ring: The ring number of HostPool. + :type ring: int + :param validation_environment: Is validation environment. + :type validation_environment: bool + :param registration_info: The registration info of HostPool. + :type registration_info: ~desktop_virtualization_api_client.models.RegistrationInfo + :param vm_template: VM template for sessionhosts configuration within hostpool. + :type vm_template: str + :ivar application_group_references: List of applicationGroup links. + :vartype application_group_references: list[str] + :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates. + :type ssoadfs_authority: str + :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO + certificates. + :type sso_client_id: str + :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for + communication to ADFS. + :type sso_client_secret_key_vault_path: str + :param sso_secret_type: The type of single sign on Secret Type. Possible values include: + "SharedKey", "Certificate", "SharedKeyInKeyVault", "CertificateInKeyVault". + :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SSOSecretType + :param preferred_app_group_type: Required. The type of preferred application group type, + default to Desktop Application Group. Possible values include: "None", "Desktop", + "RailApplications". + :type preferred_app_group_type: str or + ~desktop_virtualization_api_client.models.PreferredAppGroupType + :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature. + :type start_vm_on_connect: bool + :param migration_request: The registration info of HostPool. + :type migration_request: ~desktop_virtualization_api_client.models.MigrationRequestProperties + :ivar cloud_pc_resource: Is cloud pc resource. + :vartype cloud_pc_resource: bool + :param public_network_access: Enabled allows this resource to be accessed from both public and + private networks, Disabled allows this resource to only be accessed via private endpoints. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~desktop_virtualization_api_client.models.PublicNetworkAccess + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'host_pool_type': {'required': True}, + 'load_balancer_type': {'required': True}, + 'application_group_references': {'readonly': True}, + 'preferred_app_group_type': {'required': True}, + 'cloud_pc_resource': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'host_pool_type': {'key': 'properties.hostPoolType', 'type': 'str'}, + 'personal_desktop_assignment_type': {'key': 'properties.personalDesktopAssignmentType', 'type': 'str'}, + 'custom_rdp_property': {'key': 'properties.customRdpProperty', 'type': 'str'}, + 'max_session_limit': {'key': 'properties.maxSessionLimit', 'type': 'int'}, + 'load_balancer_type': {'key': 'properties.loadBalancerType', 'type': 'str'}, + 'ring': {'key': 'properties.ring', 'type': 'int'}, + 'validation_environment': {'key': 'properties.validationEnvironment', 'type': 'bool'}, + 'registration_info': {'key': 'properties.registrationInfo', 'type': 'RegistrationInfo'}, + 'vm_template': {'key': 'properties.vmTemplate', 'type': 'str'}, + 'application_group_references': {'key': 'properties.applicationGroupReferences', 'type': '[str]'}, + 'ssoadfs_authority': {'key': 'properties.ssoadfsAuthority', 'type': 'str'}, + 'sso_client_id': {'key': 'properties.ssoClientId', 'type': 'str'}, + 'sso_client_secret_key_vault_path': {'key': 'properties.ssoClientSecretKeyVaultPath', 'type': 'str'}, + 'sso_secret_type': {'key': 'properties.ssoSecretType', 'type': 'str'}, + 'preferred_app_group_type': {'key': 'properties.preferredAppGroupType', 'type': 'str'}, + 'start_vm_on_connect': {'key': 'properties.startVMOnConnect', 'type': 'bool'}, + 'migration_request': {'key': 'properties.migrationRequest', 'type': 'MigrationRequestProperties'}, + 'cloud_pc_resource': {'key': 'properties.cloudPcResource', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostPool, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.friendly_name = kwargs.get('friendly_name', None) + self.description = kwargs.get('description', None) + self.host_pool_type = kwargs['host_pool_type'] + self.personal_desktop_assignment_type = kwargs.get('personal_desktop_assignment_type', None) + self.custom_rdp_property = kwargs.get('custom_rdp_property', None) + self.max_session_limit = kwargs.get('max_session_limit', None) + self.load_balancer_type = kwargs['load_balancer_type'] + self.ring = kwargs.get('ring', None) + self.validation_environment = kwargs.get('validation_environment', None) + self.registration_info = kwargs.get('registration_info', None) + self.vm_template = kwargs.get('vm_template', None) + self.application_group_references = None + self.ssoadfs_authority = kwargs.get('ssoadfs_authority', None) + self.sso_client_id = kwargs.get('sso_client_id', None) + self.sso_client_secret_key_vault_path = kwargs.get('sso_client_secret_key_vault_path', None) + self.sso_secret_type = kwargs.get('sso_secret_type', None) + self.preferred_app_group_type = kwargs['preferred_app_group_type'] + self.start_vm_on_connect = kwargs.get('start_vm_on_connect', None) + self.migration_request = kwargs.get('migration_request', None) + self.cloud_pc_resource = None + self.public_network_access = kwargs.get('public_network_access', None) + + +class HostPoolList(msrest.serialization.Model): + """List of HostPool definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of HostPool definitions. + :type value: list[~desktop_virtualization_api_client.models.HostPool] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HostPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostPoolList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class HostPoolPatch(Resource): + """HostPool properties that can be patched. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param friendly_name: Friendly name of HostPool. + :type friendly_name: str + :param description: Description of HostPool. + :type description: str + :param custom_rdp_property: Custom rdp property of HostPool. + :type custom_rdp_property: str + :param max_session_limit: The max session limit of HostPool. + :type max_session_limit: int + :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool. Possible + values include: "Automatic", "Direct". + :type personal_desktop_assignment_type: str or + ~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType + :param load_balancer_type: The type of the load balancer. Possible values include: + "BreadthFirst", "DepthFirst", "Persistent". + :type load_balancer_type: str or ~desktop_virtualization_api_client.models.LoadBalancerType + :param ring: The ring number of HostPool. + :type ring: int + :param validation_environment: Is validation environment. + :type validation_environment: bool + :param registration_info: The registration info of HostPool. + :type registration_info: ~desktop_virtualization_api_client.models.RegistrationInfoPatch + :param vm_template: VM template for sessionhosts configuration within hostpool. + :type vm_template: str + :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates. + :type ssoadfs_authority: str + :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO + certificates. + :type sso_client_id: str + :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for + communication to ADFS. + :type sso_client_secret_key_vault_path: str + :param sso_secret_type: The type of single sign on Secret Type. Possible values include: + "SharedKey", "Certificate", "SharedKeyInKeyVault", "CertificateInKeyVault". + :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SSOSecretType + :param preferred_app_group_type: The type of preferred application group type, default to + Desktop Application Group. Possible values include: "None", "Desktop", "RailApplications". + :type preferred_app_group_type: str or + ~desktop_virtualization_api_client.models.PreferredAppGroupType + :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature. + :type start_vm_on_connect: bool + :param public_network_access: Enabled to allow this resource to be access from the public + network. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~desktop_virtualization_api_client.models.PublicNetworkAccess + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'custom_rdp_property': {'key': 'properties.customRdpProperty', 'type': 'str'}, + 'max_session_limit': {'key': 'properties.maxSessionLimit', 'type': 'int'}, + 'personal_desktop_assignment_type': {'key': 'properties.personalDesktopAssignmentType', 'type': 'str'}, + 'load_balancer_type': {'key': 'properties.loadBalancerType', 'type': 'str'}, + 'ring': {'key': 'properties.ring', 'type': 'int'}, + 'validation_environment': {'key': 'properties.validationEnvironment', 'type': 'bool'}, + 'registration_info': {'key': 'properties.registrationInfo', 'type': 'RegistrationInfoPatch'}, + 'vm_template': {'key': 'properties.vmTemplate', 'type': 'str'}, + 'ssoadfs_authority': {'key': 'properties.ssoadfsAuthority', 'type': 'str'}, + 'sso_client_id': {'key': 'properties.ssoClientId', 'type': 'str'}, + 'sso_client_secret_key_vault_path': {'key': 'properties.ssoClientSecretKeyVaultPath', 'type': 'str'}, + 'sso_secret_type': {'key': 'properties.ssoSecretType', 'type': 'str'}, + 'preferred_app_group_type': {'key': 'properties.preferredAppGroupType', 'type': 'str'}, + 'start_vm_on_connect': {'key': 'properties.startVMOnConnect', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HostPoolPatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.description = kwargs.get('description', None) + self.custom_rdp_property = kwargs.get('custom_rdp_property', None) + self.max_session_limit = kwargs.get('max_session_limit', None) + self.personal_desktop_assignment_type = kwargs.get('personal_desktop_assignment_type', None) + self.load_balancer_type = kwargs.get('load_balancer_type', None) + self.ring = kwargs.get('ring', None) + self.validation_environment = kwargs.get('validation_environment', None) + self.registration_info = kwargs.get('registration_info', None) + self.vm_template = kwargs.get('vm_template', None) + self.ssoadfs_authority = kwargs.get('ssoadfs_authority', None) + self.sso_client_id = kwargs.get('sso_client_id', None) + self.sso_client_secret_key_vault_path = kwargs.get('sso_client_secret_key_vault_path', None) + self.sso_secret_type = kwargs.get('sso_secret_type', None) + self.preferred_app_group_type = kwargs.get('preferred_app_group_type', None) + self.start_vm_on_connect = kwargs.get('start_vm_on_connect', None) + self.public_network_access = kwargs.get('public_network_access', None) + + +class Identity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class LogSpecification(msrest.serialization.Model): + """Specifications of the Log for Azure Monitoring. + + :param name: Name of the log. + :type name: str + :param display_name: Localized friendly display name of the log. + :type display_name: str + :param blob_duration: Blob duration of the log. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class MigrationRequestProperties(msrest.serialization.Model): + """Properties for arm migration. + + :param operation: The type of operation for migration. Possible values include: "Start", + "Revoke", "Complete", "Hide", "Unhide". + :type operation: str or ~desktop_virtualization_api_client.models.Operation + :param migration_path: The path to the legacy object to migrate. + :type migration_path: str + """ + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'str'}, + 'migration_path': {'key': 'migrationPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MigrationRequestProperties, self).__init__(**kwargs) + self.operation = kwargs.get('operation', None) + self.migration_path = kwargs.get('migration_path', None) + + +class MSIXImageURI(msrest.serialization.Model): + """Represents URI referring to MSIX Image. + + :param uri: URI to Image. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MSIXImageURI, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + +class MSIXPackage(Resource): + """Schema for MSIX Package properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :param image_path: VHD/CIM image path on Network Share. + :type image_path: str + :param package_name: Package Name from appxmanifest.xml. + :type package_name: str + :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name + and Publisher name. + :type package_family_name: str + :param display_name: User friendly Name to be displayed in the portal. + :type display_name: str + :param package_relative_path: Relative Path to the package inside the image. + :type package_relative_path: str + :param is_regular_registration: Specifies how to register Package in feed. + :type is_regular_registration: bool + :param is_active: Make this version of the package the active one across the hostpool. + :type is_active: bool + :param package_dependencies: List of package dependencies. + :type package_dependencies: + list[~desktop_virtualization_api_client.models.MsixPackageDependencies] + :param version: Package Version found in the appxmanifest.xml. + :type version: str + :param last_updated: Date Package was last updated, found in the appxmanifest.xml. + :type last_updated: ~datetime.datetime + :param package_applications: List of package applications. + :type package_applications: + list[~desktop_virtualization_api_client.models.MsixPackageApplications] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'image_path': {'key': 'properties.imagePath', 'type': 'str'}, + 'package_name': {'key': 'properties.packageName', 'type': 'str'}, + 'package_family_name': {'key': 'properties.packageFamilyName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'package_relative_path': {'key': 'properties.packageRelativePath', 'type': 'str'}, + 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'}, + 'is_active': {'key': 'properties.isActive', 'type': 'bool'}, + 'package_dependencies': {'key': 'properties.packageDependencies', 'type': '[MsixPackageDependencies]'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'}, + 'package_applications': {'key': 'properties.packageApplications', 'type': '[MsixPackageApplications]'}, + } + + def __init__( + self, + **kwargs + ): + super(MSIXPackage, self).__init__(**kwargs) + self.system_data = None + self.image_path = kwargs.get('image_path', None) + self.package_name = kwargs.get('package_name', None) + self.package_family_name = kwargs.get('package_family_name', None) + self.display_name = kwargs.get('display_name', None) + self.package_relative_path = kwargs.get('package_relative_path', None) + self.is_regular_registration = kwargs.get('is_regular_registration', None) + self.is_active = kwargs.get('is_active', None) + self.package_dependencies = kwargs.get('package_dependencies', None) + self.version = kwargs.get('version', None) + self.last_updated = kwargs.get('last_updated', None) + self.package_applications = kwargs.get('package_applications', None) + + +class MsixPackageApplications(msrest.serialization.Model): + """Schema for MSIX Package Application properties. + + :param app_id: Package Application Id, found in appxmanifest.xml. + :type app_id: str + :param description: Description of Package Application. + :type description: str + :param app_user_model_id: Used to activate Package Application. Consists of Package Name and + ApplicationID. Found in appxmanifest.xml. + :type app_user_model_id: str + :param friendly_name: User friendly name. + :type friendly_name: str + :param icon_image_name: User friendly name. + :type icon_image_name: str + :param raw_icon: the icon a 64 bit string as a byte array. + :type raw_icon: bytearray + :param raw_png: the icon a 64 bit string as a byte array. + :type raw_png: bytearray + """ + + _attribute_map = { + 'app_id': {'key': 'appId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'app_user_model_id': {'key': 'appUserModelID', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'icon_image_name': {'key': 'iconImageName', 'type': 'str'}, + 'raw_icon': {'key': 'rawIcon', 'type': 'bytearray'}, + 'raw_png': {'key': 'rawPng', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(MsixPackageApplications, self).__init__(**kwargs) + self.app_id = kwargs.get('app_id', None) + self.description = kwargs.get('description', None) + self.app_user_model_id = kwargs.get('app_user_model_id', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.icon_image_name = kwargs.get('icon_image_name', None) + self.raw_icon = kwargs.get('raw_icon', None) + self.raw_png = kwargs.get('raw_png', None) + + +class MsixPackageDependencies(msrest.serialization.Model): + """Schema for MSIX Package Dependencies properties. + + :param dependency_name: Name of package dependency. + :type dependency_name: str + :param publisher: Name of dependency publisher. + :type publisher: str + :param min_version: Dependency version required. + :type min_version: str + """ + + _attribute_map = { + 'dependency_name': {'key': 'dependencyName', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'min_version': {'key': 'minVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MsixPackageDependencies, self).__init__(**kwargs) + self.dependency_name = kwargs.get('dependency_name', None) + self.publisher = kwargs.get('publisher', None) + self.min_version = kwargs.get('min_version', None) + + +class MSIXPackageList(msrest.serialization.Model): + """List of MSIX Package definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of MSIX Package definitions. + :type value: list[~desktop_virtualization_api_client.models.MSIXPackage] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MSIXPackage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MSIXPackageList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class MSIXPackagePatch(Resource): + """MSIX Package properties that can be patched. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param is_active: Set a version of the package to be active across hostpool. + :type is_active: bool + :param is_regular_registration: Set Registration mode. Regular or Delayed. + :type is_regular_registration: bool + :param display_name: Display name for MSIX Package. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_active': {'key': 'properties.isActive', 'type': 'bool'}, + 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MSIXPackagePatch, self).__init__(**kwargs) + self.is_active = kwargs.get('is_active', None) + self.is_regular_registration = kwargs.get('is_regular_registration', None) + self.display_name = kwargs.get('display_name', None) + + +class OperationProperties(msrest.serialization.Model): + """Properties of the operation. + + :param service_specification: Service specification payload. + :type service_specification: ~desktop_virtualization_api_client.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = kwargs.get('service_specification', None) + + +class Plan(msrest.serialization.Model): + """Plan for the resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A user defined name of the 3rd Party Artifact that is being procured. + :type name: str + :param publisher: Required. The publisher of the 3rd Party Artifact that is being bought. E.g. + NewRelic. + :type publisher: str + :param product: Required. The 3rd Party artifact that is being procured. E.g. NewRelic. Product + maps to the OfferID specified for the artifact at the time of Data Market onboarding. + :type product: str + :param promotion_code: A publisher provided promotion code as provisioned in Data Market for + the said product/artifact. + :type promotion_code: str + :param version: The version of the desired product/artifact. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Plan, self).__init__(**kwargs) + self.name = kwargs['name'] + self.publisher = kwargs['publisher'] + self.product = kwargs['product'] + self.promotion_code = kwargs.get('promotion_code', None) + self.version = kwargs.get('version', None) + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~desktop_virtualization_api_client.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~desktop_virtualization_api_client.models.PrivateLinkServiceConnectionState + :param provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :type provisioning_state: str or + ~desktop_virtualization_api_client.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class PrivateEndpointConnectionListResultWithSystemData(msrest.serialization.Model): + """List of private endpoint connection associated with the specified storage account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: Array of private endpoint connections. + :type value: + list[~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnectionWithSystemData]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResultWithSystemData, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class PrivateEndpointConnectionWithSystemData(PrivateEndpointConnection): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~desktop_virtualization_api_client.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~desktop_virtualization_api_client.models.PrivateLinkServiceConnectionState + :param provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :type provisioning_state: str or + ~desktop_virtualization_api_client.models.PrivateEndpointConnectionProvisioningState + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionWithSystemData, self).__init__(**kwargs) + self.system_data = None + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: Array of private link resources. + :type value: list[~desktop_virtualization_api_client.models.PrivateLinkResource] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or + ~desktop_virtualization_api_client.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class RegistrationInfo(msrest.serialization.Model): + """Represents a RegistrationInfo definition. + + :param expiration_time: Expiration time of registration token. + :type expiration_time: ~datetime.datetime + :param token: The registration token base64 encoded string. + :type token: str + :param registration_token_operation: The type of resetting the token. Possible values include: + "Delete", "None", "Update". + :type registration_token_operation: str or + ~desktop_virtualization_api_client.models.RegistrationTokenOperation + """ + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'iso-8601'}, + 'token': {'key': 'token', 'type': 'str'}, + 'registration_token_operation': {'key': 'registrationTokenOperation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegistrationInfo, self).__init__(**kwargs) + self.expiration_time = kwargs.get('expiration_time', None) + self.token = kwargs.get('token', None) + self.registration_token_operation = kwargs.get('registration_token_operation', None) + + +class RegistrationInfoPatch(msrest.serialization.Model): + """Represents a RegistrationInfo definition. + + :param expiration_time: Expiration time of registration token. + :type expiration_time: ~datetime.datetime + :param registration_token_operation: The type of resetting the token. Possible values include: + "Delete", "None", "Update". + :type registration_token_operation: str or + ~desktop_virtualization_api_client.models.RegistrationTokenOperation + """ + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'iso-8601'}, + 'registration_token_operation': {'key': 'registrationTokenOperation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegistrationInfoPatch, self).__init__(**kwargs) + self.expiration_time = kwargs.get('expiration_time', None) + self.registration_token_operation = kwargs.get('registration_token_operation', None) + + +class ResourceModelWithAllowedPropertySetIdentity(Identity): + """ResourceModelWithAllowedPropertySetIdentity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceModelWithAllowedPropertySetIdentity, self).__init__(**kwargs) + + +class ResourceModelWithAllowedPropertySetPlan(Plan): + """ResourceModelWithAllowedPropertySetPlan. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A user defined name of the 3rd Party Artifact that is being procured. + :type name: str + :param publisher: Required. The publisher of the 3rd Party Artifact that is being bought. E.g. + NewRelic. + :type publisher: str + :param product: Required. The 3rd Party artifact that is being procured. E.g. NewRelic. Product + maps to the OfferID specified for the artifact at the time of Data Market onboarding. + :type product: str + :param promotion_code: A publisher provided promotion code as provisioned in Data Market for + the said product/artifact. + :type promotion_code: str + :param version: The version of the desired product/artifact. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceModelWithAllowedPropertySetPlan, self).__init__(**kwargs) + + +class Sku(msrest.serialization.Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. + :type name: str + :param tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :type tier: str or ~desktop_virtualization_api_client.models.SkuTier + :param size: The SKU size. When the name field is the combination of tier and some other value, + this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for the same SKU, then + that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity integer should be included. + If scale out/in is not possible for the resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.tier = kwargs.get('tier', None) + self.size = kwargs.get('size', None) + self.family = kwargs.get('family', None) + self.capacity = kwargs.get('capacity', None) + + +class ResourceModelWithAllowedPropertySetSku(Sku): + """ResourceModelWithAllowedPropertySetSku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. + :type name: str + :param tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :type tier: str or ~desktop_virtualization_api_client.models.SkuTier + :param size: The SKU size. When the name field is the combination of tier and some other value, + this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for the same SKU, then + that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity integer should be included. + If scale out/in is not possible for the resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceModelWithAllowedPropertySetSku, self).__init__(**kwargs) + + +class ResourceProviderOperation(msrest.serialization.Model): + """Supported operation of this resource provider. + + :param name: Operation name, in format of {provider}/{resource}/{operation}. + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~desktop_virtualization_api_client.models.ResourceProviderOperationDisplay + :param is_data_action: Is a data action. + :type is_data_action: bool + :param properties: Properties of the operation. + :type properties: ~desktop_virtualization_api_client.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceProviderOperation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.properties = kwargs.get('properties', None) + + +class ResourceProviderOperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :param provider: Resource provider: Microsoft Desktop Virtualization. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of this operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceProviderOperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class ResourceProviderOperationList(msrest.serialization.Model): + """Result of the request to list operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of operations supported by this resource provider. + :type value: list[~desktop_virtualization_api_client.models.ResourceProviderOperation] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceProviderOperation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceProviderOperationList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ScalingHostPoolReference(msrest.serialization.Model): + """Scaling plan reference to hostpool. + + :param host_pool_arm_path: Arm path of referenced hostpool. + :type host_pool_arm_path: str + :param scaling_plan_enabled: Is the scaling plan enabled for this hostpool. + :type scaling_plan_enabled: bool + """ + + _attribute_map = { + 'host_pool_arm_path': {'key': 'hostPoolArmPath', 'type': 'str'}, + 'scaling_plan_enabled': {'key': 'scalingPlanEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ScalingHostPoolReference, self).__init__(**kwargs) + self.host_pool_arm_path = kwargs.get('host_pool_arm_path', None) + self.scaling_plan_enabled = kwargs.get('scaling_plan_enabled', None) + + +class ScalingPlan(ResourceModelWithAllowedPropertySet): + """Represents a scaling plan definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of scaling plan. (internal use). + :vartype object_id: str + :param description: Description of scaling plan. + :type description: str + :param friendly_name: User friendly name of scaling plan. + :type friendly_name: str + :param time_zone: Timezone of the scaling plan. + :type time_zone: str + :param host_pool_type: HostPool type for desktop. Possible values include: "Pooled". + :type host_pool_type: str or ~desktop_virtualization_api_client.models.ScalingHostPoolType + :param exclusion_tag: Exclusion tag for scaling plan. + :type exclusion_tag: str + :param schedules: List of ScalingSchedule definitions. + :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule] + :param host_pool_references: List of ScalingHostPoolReference definitions. + :type host_pool_references: + list[~desktop_virtualization_api_client.models.ScalingHostPoolReference] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'host_pool_type': {'key': 'properties.hostPoolType', 'type': 'str'}, + 'exclusion_tag': {'key': 'properties.exclusionTag', 'type': 'str'}, + 'schedules': {'key': 'properties.schedules', 'type': '[ScalingSchedule]'}, + 'host_pool_references': {'key': 'properties.hostPoolReferences', 'type': '[ScalingHostPoolReference]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScalingPlan, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.time_zone = kwargs.get('time_zone', None) + self.host_pool_type = kwargs.get('host_pool_type', None) + self.exclusion_tag = kwargs.get('exclusion_tag', None) + self.schedules = kwargs.get('schedules', None) + self.host_pool_references = kwargs.get('host_pool_references', None) + + +class ScalingPlanList(msrest.serialization.Model): + """List of scaling plan definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of scaling plan definitions. + :type value: list[~desktop_virtualization_api_client.models.ScalingPlan] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScalingPlan]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScalingPlanList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ScalingPlanPatch(msrest.serialization.Model): + """Scaling plan properties that can be patched. + + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of scaling plan. + :type description: str + :param friendly_name: User friendly name of scaling plan. + :type friendly_name: str + :param time_zone: Timezone of the scaling plan. + :type time_zone: str + :param exclusion_tag: Exclusion tag for scaling plan. + :type exclusion_tag: str + :param schedules: List of ScalingSchedule definitions. + :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule] + :param host_pool_references: List of ScalingHostPoolReference definitions. + :type host_pool_references: + list[~desktop_virtualization_api_client.models.ScalingHostPoolReference] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'exclusion_tag': {'key': 'properties.exclusionTag', 'type': 'str'}, + 'schedules': {'key': 'properties.schedules', 'type': '[ScalingSchedule]'}, + 'host_pool_references': {'key': 'properties.hostPoolReferences', 'type': '[ScalingHostPoolReference]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScalingPlanPatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.time_zone = kwargs.get('time_zone', None) + self.exclusion_tag = kwargs.get('exclusion_tag', None) + self.schedules = kwargs.get('schedules', None) + self.host_pool_references = kwargs.get('host_pool_references', None) + + +class ScalingSchedule(msrest.serialization.Model): + """Scaling plan schedule. + + :param name: Name of the scaling schedule. + :type name: str + :param days_of_week: Set of days of the week on which this schedule is active. + :type days_of_week: list[str or + ~desktop_virtualization_api_client.models.ScalingScheduleDaysOfWeekItem] + :param ramp_up_start_time: Starting time for ramp up period. + :type ramp_up_start_time: ~desktop_virtualization_api_client.models.Time + :param ramp_up_load_balancing_algorithm: Load balancing algorithm for ramp up period. Possible + values include: "BreadthFirst", "DepthFirst". + :type ramp_up_load_balancing_algorithm: str or + ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm + :param ramp_up_minimum_hosts_pct: Minimum host percentage for ramp up period. + :type ramp_up_minimum_hosts_pct: int + :param ramp_up_capacity_threshold_pct: Capacity threshold for ramp up period. + :type ramp_up_capacity_threshold_pct: int + :param peak_start_time: Starting time for peak period. + :type peak_start_time: ~desktop_virtualization_api_client.models.Time + :param peak_load_balancing_algorithm: Load balancing algorithm for peak period. Possible values + include: "BreadthFirst", "DepthFirst". + :type peak_load_balancing_algorithm: str or + ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm + :param ramp_down_start_time: Starting time for ramp down period. + :type ramp_down_start_time: ~desktop_virtualization_api_client.models.Time + :param ramp_down_load_balancing_algorithm: Load balancing algorithm for ramp down period. + Possible values include: "BreadthFirst", "DepthFirst". + :type ramp_down_load_balancing_algorithm: str or + ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm + :param ramp_down_minimum_hosts_pct: Minimum host percentage for ramp down period. + :type ramp_down_minimum_hosts_pct: int + :param ramp_down_capacity_threshold_pct: Capacity threshold for ramp down period. + :type ramp_down_capacity_threshold_pct: int + :param ramp_down_force_logoff_users: Should users be logged off forcefully from hosts. + :type ramp_down_force_logoff_users: bool + :param ramp_down_stop_hosts_when: Specifies when to stop hosts during ramp down period. + Possible values include: "ZeroSessions", "ZeroActiveSessions". + :type ramp_down_stop_hosts_when: str or ~desktop_virtualization_api_client.models.StopHostsWhen + :param ramp_down_wait_time_minutes: Number of minutes to wait to stop hosts during ramp down + period. + :type ramp_down_wait_time_minutes: int + :param ramp_down_notification_message: Notification message for users during ramp down period. + :type ramp_down_notification_message: str + :param off_peak_start_time: Starting time for off-peak period. + :type off_peak_start_time: ~desktop_virtualization_api_client.models.Time + :param off_peak_load_balancing_algorithm: Load balancing algorithm for off-peak period. + Possible values include: "BreadthFirst", "DepthFirst". + :type off_peak_load_balancing_algorithm: str or + ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm + """ + + _validation = { + 'ramp_up_minimum_hosts_pct': {'maximum': 100, 'minimum': 0}, + 'ramp_up_capacity_threshold_pct': {'maximum': 100, 'minimum': 1}, + 'ramp_down_minimum_hosts_pct': {'maximum': 100, 'minimum': 0}, + 'ramp_down_capacity_threshold_pct': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'days_of_week': {'key': 'daysOfWeek', 'type': '[str]'}, + 'ramp_up_start_time': {'key': 'rampUpStartTime', 'type': 'Time'}, + 'ramp_up_load_balancing_algorithm': {'key': 'rampUpLoadBalancingAlgorithm', 'type': 'str'}, + 'ramp_up_minimum_hosts_pct': {'key': 'rampUpMinimumHostsPct', 'type': 'int'}, + 'ramp_up_capacity_threshold_pct': {'key': 'rampUpCapacityThresholdPct', 'type': 'int'}, + 'peak_start_time': {'key': 'peakStartTime', 'type': 'Time'}, + 'peak_load_balancing_algorithm': {'key': 'peakLoadBalancingAlgorithm', 'type': 'str'}, + 'ramp_down_start_time': {'key': 'rampDownStartTime', 'type': 'Time'}, + 'ramp_down_load_balancing_algorithm': {'key': 'rampDownLoadBalancingAlgorithm', 'type': 'str'}, + 'ramp_down_minimum_hosts_pct': {'key': 'rampDownMinimumHostsPct', 'type': 'int'}, + 'ramp_down_capacity_threshold_pct': {'key': 'rampDownCapacityThresholdPct', 'type': 'int'}, + 'ramp_down_force_logoff_users': {'key': 'rampDownForceLogoffUsers', 'type': 'bool'}, + 'ramp_down_stop_hosts_when': {'key': 'rampDownStopHostsWhen', 'type': 'str'}, + 'ramp_down_wait_time_minutes': {'key': 'rampDownWaitTimeMinutes', 'type': 'int'}, + 'ramp_down_notification_message': {'key': 'rampDownNotificationMessage', 'type': 'str'}, + 'off_peak_start_time': {'key': 'offPeakStartTime', 'type': 'Time'}, + 'off_peak_load_balancing_algorithm': {'key': 'offPeakLoadBalancingAlgorithm', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScalingSchedule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.days_of_week = kwargs.get('days_of_week', None) + self.ramp_up_start_time = kwargs.get('ramp_up_start_time', None) + self.ramp_up_load_balancing_algorithm = kwargs.get('ramp_up_load_balancing_algorithm', None) + self.ramp_up_minimum_hosts_pct = kwargs.get('ramp_up_minimum_hosts_pct', None) + self.ramp_up_capacity_threshold_pct = kwargs.get('ramp_up_capacity_threshold_pct', None) + self.peak_start_time = kwargs.get('peak_start_time', None) + self.peak_load_balancing_algorithm = kwargs.get('peak_load_balancing_algorithm', None) + self.ramp_down_start_time = kwargs.get('ramp_down_start_time', None) + self.ramp_down_load_balancing_algorithm = kwargs.get('ramp_down_load_balancing_algorithm', None) + self.ramp_down_minimum_hosts_pct = kwargs.get('ramp_down_minimum_hosts_pct', None) + self.ramp_down_capacity_threshold_pct = kwargs.get('ramp_down_capacity_threshold_pct', None) + self.ramp_down_force_logoff_users = kwargs.get('ramp_down_force_logoff_users', None) + self.ramp_down_stop_hosts_when = kwargs.get('ramp_down_stop_hosts_when', None) + self.ramp_down_wait_time_minutes = kwargs.get('ramp_down_wait_time_minutes', None) + self.ramp_down_notification_message = kwargs.get('ramp_down_notification_message', None) + self.off_peak_start_time = kwargs.get('off_peak_start_time', None) + self.off_peak_load_balancing_algorithm = kwargs.get('off_peak_load_balancing_algorithm', None) + + +class SendMessage(msrest.serialization.Model): + """Represents message sent to a UserSession. + + :param message_title: Title of message. + :type message_title: str + :param message_body: Body of message. + :type message_body: str + """ + + _attribute_map = { + 'message_title': {'key': 'messageTitle', 'type': 'str'}, + 'message_body': {'key': 'messageBody', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SendMessage, self).__init__(**kwargs) + self.message_title = kwargs.get('message_title', None) + self.message_body = kwargs.get('message_body', None) + + +class ServiceSpecification(msrest.serialization.Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring. + :type log_specifications: list[~desktop_virtualization_api_client.models.LogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + + +class SessionHost(Resource): + """Represents a SessionHost definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of SessionHost. (internal use). + :vartype object_id: str + :param last_heart_beat: Last heart beat from SessionHost. + :type last_heart_beat: ~datetime.datetime + :param sessions: Number of sessions on SessionHost. + :type sessions: int + :param agent_version: Version of agent on SessionHost. + :type agent_version: str + :param allow_new_session: Allow a new session. + :type allow_new_session: bool + :ivar virtual_machine_id: Virtual Machine Id of SessionHost's underlying virtual machine. + :vartype virtual_machine_id: str + :ivar resource_id: Resource Id of SessionHost's underlying virtual machine. + :vartype resource_id: str + :param assigned_user: User assigned to SessionHost. + :type assigned_user: str + :param status: Status for a SessionHost. Possible values include: "Available", "Unavailable", + "Shutdown", "Disconnected", "Upgrading", "UpgradeFailed", "NoHeartbeat", "NotJoinedToDomain", + "DomainTrustRelationshipLost", "SxSStackListenerNotReady", "FSLogixNotHealthy", + "NeedsAssistance". + :type status: str or ~desktop_virtualization_api_client.models.Status + :ivar status_timestamp: The timestamp of the status. + :vartype status_timestamp: ~datetime.datetime + :param os_version: The version of the OS on the session host. + :type os_version: str + :param sx_s_stack_version: The version of the side by side stack on the session host. + :type sx_s_stack_version: str + :param update_state: Update state of a SessionHost. Possible values include: "Initial", + "Pending", "Started", "Succeeded", "Failed". + :type update_state: str or ~desktop_virtualization_api_client.models.UpdateState + :ivar last_update_time: The timestamp of the last update. + :vartype last_update_time: ~datetime.datetime + :param update_error_message: The error message. + :type update_error_message: str + :ivar session_host_health_check_results: List of SessionHostHealthCheckReports. + :vartype session_host_health_check_results: + list[~desktop_virtualization_api_client.models.SessionHostHealthCheckReport] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'virtual_machine_id': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'status_timestamp': {'readonly': True}, + 'last_update_time': {'readonly': True}, + 'session_host_health_check_results': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'iso-8601'}, + 'sessions': {'key': 'properties.sessions', 'type': 'int'}, + 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'allow_new_session': {'key': 'properties.allowNewSession', 'type': 'bool'}, + 'virtual_machine_id': {'key': 'properties.virtualMachineId', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'assigned_user': {'key': 'properties.assignedUser', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_timestamp': {'key': 'properties.statusTimestamp', 'type': 'iso-8601'}, + 'os_version': {'key': 'properties.osVersion', 'type': 'str'}, + 'sx_s_stack_version': {'key': 'properties.sxSStackVersion', 'type': 'str'}, + 'update_state': {'key': 'properties.updateState', 'type': 'str'}, + 'last_update_time': {'key': 'properties.lastUpdateTime', 'type': 'iso-8601'}, + 'update_error_message': {'key': 'properties.updateErrorMessage', 'type': 'str'}, + 'session_host_health_check_results': {'key': 'properties.sessionHostHealthCheckResults', 'type': '[SessionHostHealthCheckReport]'}, + } + + def __init__( + self, + **kwargs + ): + super(SessionHost, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.last_heart_beat = kwargs.get('last_heart_beat', None) + self.sessions = kwargs.get('sessions', None) + self.agent_version = kwargs.get('agent_version', None) + self.allow_new_session = kwargs.get('allow_new_session', None) + self.virtual_machine_id = None + self.resource_id = None + self.assigned_user = kwargs.get('assigned_user', None) + self.status = kwargs.get('status', None) + self.status_timestamp = None + self.os_version = kwargs.get('os_version', None) + self.sx_s_stack_version = kwargs.get('sx_s_stack_version', None) + self.update_state = kwargs.get('update_state', None) + self.last_update_time = None + self.update_error_message = kwargs.get('update_error_message', None) + self.session_host_health_check_results = None + + +class SessionHostHealthCheckFailureDetails(msrest.serialization.Model): + """Contains details on the failure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar message: Failure message: hints on what is wrong and how to recover. + :vartype message: str + :ivar error_code: Error code corresponding for the failure. + :vartype error_code: int + :ivar last_health_check_date_time: The timestamp of the last update. + :vartype last_health_check_date_time: ~datetime.datetime + """ + + _validation = { + 'message': {'readonly': True}, + 'error_code': {'readonly': True}, + 'last_health_check_date_time': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'last_health_check_date_time': {'key': 'lastHealthCheckDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SessionHostHealthCheckFailureDetails, self).__init__(**kwargs) + self.message = None + self.error_code = None + self.last_health_check_date_time = None + + +class SessionHostHealthCheckReport(msrest.serialization.Model): + """The report for session host information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar health_check_name: Represents the name of the health check operation performed. Possible + values include: "DomainJoinedCheck", "DomainTrustCheck", "FSLogixHealthCheck", + "SxSStackListenerCheck", "UrlsAccessibleCheck", "MonitoringAgentCheck", "DomainReachable", + "WebRTCRedirectorCheck", "SupportedEncryptionCheck", "MetaDataServiceCheck", + "AppAttachHealthCheck". + :vartype health_check_name: str or ~desktop_virtualization_api_client.models.HealthCheckName + :ivar health_check_result: Represents the Health state of the health check we performed. + Possible values include: "Unknown", "HealthCheckSucceeded", "HealthCheckFailed", + "SessionHostShutdown". + :vartype health_check_result: str or + ~desktop_virtualization_api_client.models.HealthCheckResult + :ivar additional_failure_details: Additional detailed information on the failure. + :vartype additional_failure_details: + ~desktop_virtualization_api_client.models.SessionHostHealthCheckFailureDetails + """ + + _validation = { + 'health_check_name': {'readonly': True}, + 'health_check_result': {'readonly': True}, + 'additional_failure_details': {'readonly': True}, + } + + _attribute_map = { + 'health_check_name': {'key': 'healthCheckName', 'type': 'str'}, + 'health_check_result': {'key': 'healthCheckResult', 'type': 'str'}, + 'additional_failure_details': {'key': 'additionalFailureDetails', 'type': 'SessionHostHealthCheckFailureDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(SessionHostHealthCheckReport, self).__init__(**kwargs) + self.health_check_name = None + self.health_check_result = None + self.additional_failure_details = None + + +class SessionHostList(msrest.serialization.Model): + """List of SessionHost definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of SessionHost definitions. + :type value: list[~desktop_virtualization_api_client.models.SessionHost] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SessionHost]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SessionHostList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class SessionHostPatch(Resource): + """SessionHost properties that can be patched. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param allow_new_session: Allow a new session. + :type allow_new_session: bool + :param assigned_user: User assigned to SessionHost. + :type assigned_user: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allow_new_session': {'key': 'properties.allowNewSession', 'type': 'bool'}, + 'assigned_user': {'key': 'properties.assignedUser', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SessionHostPatch, self).__init__(**kwargs) + self.allow_new_session = kwargs.get('allow_new_session', None) + self.assigned_user = kwargs.get('assigned_user', None) + + +class StartMenuItem(Resource): + """Represents a StartMenuItem definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param app_alias: Alias of StartMenuItem. + :type app_alias: str + :param file_path: Path to the file of StartMenuItem. + :type file_path: str + :param command_line_arguments: Command line arguments for StartMenuItem. + :type command_line_arguments: str + :param icon_path: Path to the icon. + :type icon_path: str + :param icon_index: Index of the icon. + :type icon_index: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'app_alias': {'key': 'properties.appAlias', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'command_line_arguments': {'key': 'properties.commandLineArguments', 'type': 'str'}, + 'icon_path': {'key': 'properties.iconPath', 'type': 'str'}, + 'icon_index': {'key': 'properties.iconIndex', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(StartMenuItem, self).__init__(**kwargs) + self.app_alias = kwargs.get('app_alias', None) + self.file_path = kwargs.get('file_path', None) + self.command_line_arguments = kwargs.get('command_line_arguments', None) + self.icon_path = kwargs.get('icon_path', None) + self.icon_index = kwargs.get('icon_index', None) + + +class StartMenuItemList(msrest.serialization.Model): + """List of StartMenuItem definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of StartMenuItem definitions. + :type value: list[~desktop_virtualization_api_client.models.StartMenuItem] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StartMenuItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StartMenuItemList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class SystemData(msrest.serialization.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 ~desktop_virtualization_api_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~desktop_virtualization_api_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 Time(msrest.serialization.Model): + """The time for a scaling action to occur. + + All required parameters must be populated in order to send to Azure. + + :param hour: Required. The hour. + :type hour: int + :param minute: Required. The minute. + :type minute: int + """ + + _validation = { + 'hour': {'required': True, 'maximum': 23, 'minimum': 0}, + 'minute': {'required': True, 'maximum': 59, 'minimum': 0}, + } + + _attribute_map = { + 'hour': {'key': 'hour', 'type': 'int'}, + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(Time, self).__init__(**kwargs) + self.hour = kwargs['hour'] + self.minute = kwargs['minute'] + + +class UserSession(Resource): + """Represents a UserSession definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of user session. (internal use). + :vartype object_id: str + :param user_principal_name: The user principal name. + :type user_principal_name: str + :param application_type: Application type of application. Possible values include: "RemoteApp", + "Desktop". + :type application_type: str or ~desktop_virtualization_api_client.models.ApplicationType + :param session_state: State of user session. Possible values include: "Unknown", "Active", + "Disconnected", "Pending", "LogOff", "UserProfileDiskMounted". + :type session_state: str or ~desktop_virtualization_api_client.models.SessionState + :param active_directory_user_name: The active directory user name. + :type active_directory_user_name: str + :param create_time: The timestamp of the user session create. + :type create_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'user_principal_name': {'key': 'properties.userPrincipalName', 'type': 'str'}, + 'application_type': {'key': 'properties.applicationType', 'type': 'str'}, + 'session_state': {'key': 'properties.sessionState', 'type': 'str'}, + 'active_directory_user_name': {'key': 'properties.activeDirectoryUserName', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(UserSession, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.user_principal_name = kwargs.get('user_principal_name', None) + self.application_type = kwargs.get('application_type', None) + self.session_state = kwargs.get('session_state', None) + self.active_directory_user_name = kwargs.get('active_directory_user_name', None) + self.create_time = kwargs.get('create_time', None) + + +class UserSessionList(msrest.serialization.Model): + """List of UserSession definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of UserSession definitions. + :type value: list[~desktop_virtualization_api_client.models.UserSession] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UserSession]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserSessionList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class Workspace(ResourceModelWithAllowedPropertySet): + """Represents a Workspace definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of Workspace. (internal use). + :vartype object_id: str + :param description: Description of Workspace. + :type description: str + :param friendly_name: Friendly name of Workspace. + :type friendly_name: str + :param application_group_references: List of applicationGroup resource Ids. + :type application_group_references: list[str] + :ivar cloud_pc_resource: Is cloud pc resource. + :vartype cloud_pc_resource: bool + :param public_network_access: Enabled allows this resource to be accessed from both public and + private networks, Disabled allows this resource to only be accessed via private endpoints. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~desktop_virtualization_api_client.models.PublicNetworkAccess + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'cloud_pc_resource': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'application_group_references': {'key': 'properties.applicationGroupReferences', 'type': '[str]'}, + 'cloud_pc_resource': {'key': 'properties.cloudPcResource', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Workspace, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.application_group_references = kwargs.get('application_group_references', None) + self.cloud_pc_resource = None + self.public_network_access = kwargs.get('public_network_access', None) + + +class WorkspaceList(msrest.serialization.Model): + """List of Workspace definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of Workspace definitions. + :type value: list[~desktop_virtualization_api_client.models.Workspace] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Workspace]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WorkspaceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class WorkspacePatch(msrest.serialization.Model): + """Workspace properties that can be patched. + + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of Workspace. + :type description: str + :param friendly_name: Friendly name of Workspace. + :type friendly_name: str + :param application_group_references: List of applicationGroup links. + :type application_group_references: list[str] + :param public_network_access: Enabled to allow this resource to be access from the public + network. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~desktop_virtualization_api_client.models.PublicNetworkAccess + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'application_group_references': {'key': 'properties.applicationGroupReferences', 'type': '[str]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WorkspacePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.description = kwargs.get('description', None) + self.friendly_name = kwargs.get('friendly_name', None) + self.application_group_references = kwargs.get('application_group_references', None) + self.public_network_access = kwargs.get('public_network_access', None) diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_models_py3.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_models_py3.py new file mode 100644 index 000000000000..9af6a672aa43 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/models/_models_py3.py @@ -0,0 +1,3469 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._desktop_virtualization_api_client_enums import * + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class Application(Resource): + """Schema for Application properties. + + 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. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of Application. (internal use). + :vartype object_id: str + :param description: Description of Application. + :type description: str + :param friendly_name: Friendly name of Application. + :type friendly_name: str + :param file_path: Specifies a path for the executable file for the application. + :type file_path: str + :param msix_package_family_name: Specifies the package family name for MSIX applications. + :type msix_package_family_name: str + :param msix_package_application_id: Specifies the package application Id for MSIX applications. + :type msix_package_application_id: str + :param application_type: Resource Type of Application. Possible values include: "InBuilt", + "MsixApplication". + :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType + :param command_line_setting: Required. Specifies whether this published application can be + launched with command line arguments provided by the client, command line arguments specified + at publish time, or no command line arguments at all. Possible values include: "DoNotAllow", + "Allow", "Require". + :type command_line_setting: str or ~desktop_virtualization_api_client.models.CommandLineSetting + :param command_line_arguments: Command Line Arguments for Application. + :type command_line_arguments: str + :param show_in_portal: Specifies whether to show the RemoteApp program in the RD Web Access + server. + :type show_in_portal: bool + :param icon_path: Path to icon. + :type icon_path: str + :param icon_index: Index of the icon. + :type icon_index: int + :ivar icon_hash: Hash of the icon. + :vartype icon_hash: str + :ivar icon_content: the icon a 64 bit string as a byte array. + :vartype icon_content: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'command_line_setting': {'required': True}, + 'icon_hash': {'readonly': True}, + 'icon_content': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'msix_package_family_name': {'key': 'properties.msixPackageFamilyName', 'type': 'str'}, + 'msix_package_application_id': {'key': 'properties.msixPackageApplicationId', 'type': 'str'}, + 'application_type': {'key': 'properties.applicationType', 'type': 'str'}, + 'command_line_setting': {'key': 'properties.commandLineSetting', 'type': 'str'}, + 'command_line_arguments': {'key': 'properties.commandLineArguments', 'type': 'str'}, + 'show_in_portal': {'key': 'properties.showInPortal', 'type': 'bool'}, + 'icon_path': {'key': 'properties.iconPath', 'type': 'str'}, + 'icon_index': {'key': 'properties.iconIndex', 'type': 'int'}, + 'icon_hash': {'key': 'properties.iconHash', 'type': 'str'}, + 'icon_content': {'key': 'properties.iconContent', 'type': 'bytearray'}, + } + + def __init__( + self, + *, + command_line_setting: Union[str, "CommandLineSetting"], + description: Optional[str] = None, + friendly_name: Optional[str] = None, + file_path: Optional[str] = None, + msix_package_family_name: Optional[str] = None, + msix_package_application_id: Optional[str] = None, + application_type: Optional[Union[str, "RemoteApplicationType"]] = None, + command_line_arguments: Optional[str] = None, + show_in_portal: Optional[bool] = None, + icon_path: Optional[str] = None, + icon_index: Optional[int] = None, + **kwargs + ): + super(Application, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.description = description + self.friendly_name = friendly_name + self.file_path = file_path + self.msix_package_family_name = msix_package_family_name + self.msix_package_application_id = msix_package_application_id + self.application_type = application_type + self.command_line_setting = command_line_setting + self.command_line_arguments = command_line_arguments + self.show_in_portal = show_in_portal + self.icon_path = icon_path + self.icon_index = icon_index + self.icon_hash = None + self.icon_content = None + + +class ResourceModelWithAllowedPropertySet(msrest.serialization.Model): + """The resource model definition containing the full set of allowed properties for a resource. Except properties bag, there cannot be a top level property outside of this set. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + managed_by: Optional[str] = None, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceModelWithAllowedPropertySetIdentity"] = None, + sku: Optional["ResourceModelWithAllowedPropertySetSku"] = None, + plan: Optional["ResourceModelWithAllowedPropertySetPlan"] = None, + **kwargs + ): + super(ResourceModelWithAllowedPropertySet, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.managed_by = managed_by + self.kind = kind + self.etag = None + self.tags = tags + self.identity = identity + self.sku = sku + self.plan = plan + + +class ApplicationGroup(ResourceModelWithAllowedPropertySet): + """Represents a ApplicationGroup definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of ApplicationGroup. (internal use). + :vartype object_id: str + :param description: Description of ApplicationGroup. + :type description: str + :param friendly_name: Friendly name of ApplicationGroup. + :type friendly_name: str + :param host_pool_arm_path: Required. HostPool arm path of ApplicationGroup. + :type host_pool_arm_path: str + :ivar workspace_arm_path: Workspace arm path of ApplicationGroup. + :vartype workspace_arm_path: str + :param application_group_type: Required. Resource Type of ApplicationGroup. Possible values + include: "RemoteApp", "Desktop". + :type application_group_type: str or + ~desktop_virtualization_api_client.models.ApplicationGroupType + :param migration_request: The registration info of HostPool. + :type migration_request: ~desktop_virtualization_api_client.models.MigrationRequestProperties + :ivar cloud_pc_resource: Is cloud pc resource. + :vartype cloud_pc_resource: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'host_pool_arm_path': {'required': True}, + 'workspace_arm_path': {'readonly': True}, + 'application_group_type': {'required': True}, + 'cloud_pc_resource': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'host_pool_arm_path': {'key': 'properties.hostPoolArmPath', 'type': 'str'}, + 'workspace_arm_path': {'key': 'properties.workspaceArmPath', 'type': 'str'}, + 'application_group_type': {'key': 'properties.applicationGroupType', 'type': 'str'}, + 'migration_request': {'key': 'properties.migrationRequest', 'type': 'MigrationRequestProperties'}, + 'cloud_pc_resource': {'key': 'properties.cloudPcResource', 'type': 'bool'}, + } + + def __init__( + self, + *, + host_pool_arm_path: str, + application_group_type: Union[str, "ApplicationGroupType"], + location: Optional[str] = None, + managed_by: Optional[str] = None, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceModelWithAllowedPropertySetIdentity"] = None, + sku: Optional["ResourceModelWithAllowedPropertySetSku"] = None, + plan: Optional["ResourceModelWithAllowedPropertySetPlan"] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + migration_request: Optional["MigrationRequestProperties"] = None, + **kwargs + ): + super(ApplicationGroup, self).__init__(location=location, managed_by=managed_by, kind=kind, tags=tags, identity=identity, sku=sku, plan=plan, **kwargs) + self.system_data = None + self.object_id = None + self.description = description + self.friendly_name = friendly_name + self.host_pool_arm_path = host_pool_arm_path + self.workspace_arm_path = None + self.application_group_type = application_group_type + self.migration_request = migration_request + self.cloud_pc_resource = None + + +class ApplicationGroupList(msrest.serialization.Model): + """List of ApplicationGroup definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of ApplicationGroup definitions. + :type value: list[~desktop_virtualization_api_client.models.ApplicationGroup] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGroup"]] = None, + **kwargs + ): + super(ApplicationGroupList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ApplicationGroupPatch(Resource): + """ApplicationGroup properties that can be patched. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of ApplicationGroup. + :type description: str + :param friendly_name: Friendly name of ApplicationGroup. + :type friendly_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + **kwargs + ): + super(ApplicationGroupPatch, self).__init__(**kwargs) + self.tags = tags + self.description = description + self.friendly_name = friendly_name + + +class ApplicationList(msrest.serialization.Model): + """List of Application definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of Application definitions. + :type value: list[~desktop_virtualization_api_client.models.Application] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Application]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Application"]] = None, + **kwargs + ): + super(ApplicationList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ApplicationPatch(msrest.serialization.Model): + """Application properties that can be patched. + + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of Application. + :type description: str + :param friendly_name: Friendly name of Application. + :type friendly_name: str + :param file_path: Specifies a path for the executable file for the application. + :type file_path: str + :param command_line_setting: Specifies whether this published application can be launched with + command line arguments provided by the client, command line arguments specified at publish + time, or no command line arguments at all. Possible values include: "DoNotAllow", "Allow", + "Require". + :type command_line_setting: str or ~desktop_virtualization_api_client.models.CommandLineSetting + :param command_line_arguments: Command Line Arguments for Application. + :type command_line_arguments: str + :param show_in_portal: Specifies whether to show the RemoteApp program in the RD Web Access + server. + :type show_in_portal: bool + :param icon_path: Path to icon. + :type icon_path: str + :param icon_index: Index of the icon. + :type icon_index: int + :param msix_package_family_name: Specifies the package family name for MSIX applications. + :type msix_package_family_name: str + :param msix_package_application_id: Specifies the package application Id for MSIX applications. + :type msix_package_application_id: str + :param application_type: Resource Type of Application. Possible values include: "InBuilt", + "MsixApplication". + :type application_type: str or ~desktop_virtualization_api_client.models.RemoteApplicationType + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'command_line_setting': {'key': 'properties.commandLineSetting', 'type': 'str'}, + 'command_line_arguments': {'key': 'properties.commandLineArguments', 'type': 'str'}, + 'show_in_portal': {'key': 'properties.showInPortal', 'type': 'bool'}, + 'icon_path': {'key': 'properties.iconPath', 'type': 'str'}, + 'icon_index': {'key': 'properties.iconIndex', 'type': 'int'}, + 'msix_package_family_name': {'key': 'properties.msixPackageFamilyName', 'type': 'str'}, + 'msix_package_application_id': {'key': 'properties.msixPackageApplicationId', 'type': 'str'}, + 'application_type': {'key': 'properties.applicationType', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + file_path: Optional[str] = None, + command_line_setting: Optional[Union[str, "CommandLineSetting"]] = None, + command_line_arguments: Optional[str] = None, + show_in_portal: Optional[bool] = None, + icon_path: Optional[str] = None, + icon_index: Optional[int] = None, + msix_package_family_name: Optional[str] = None, + msix_package_application_id: Optional[str] = None, + application_type: Optional[Union[str, "RemoteApplicationType"]] = None, + **kwargs + ): + super(ApplicationPatch, self).__init__(**kwargs) + self.tags = tags + self.description = description + self.friendly_name = friendly_name + self.file_path = file_path + self.command_line_setting = command_line_setting + self.command_line_arguments = command_line_arguments + self.show_in_portal = show_in_portal + self.icon_path = icon_path + self.icon_index = icon_index + self.msix_package_family_name = msix_package_family_name + self.msix_package_application_id = msix_package_application_id + self.application_type = application_type + + +class CloudErrorProperties(msrest.serialization.Model): + """Cloud error object properties. + + :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: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(CloudErrorProperties, self).__init__(**kwargs) + self.code = code + self.message = message + + +class Desktop(Resource): + """Schema for Desktop properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of Desktop. (internal use). + :vartype object_id: str + :param description: Description of Desktop. + :type description: str + :param friendly_name: Friendly name of Desktop. + :type friendly_name: str + :ivar icon_hash: Hash of the icon. + :vartype icon_hash: str + :ivar icon_content: The icon a 64 bit string as a byte array. + :vartype icon_content: bytearray + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'icon_hash': {'readonly': True}, + 'icon_content': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'icon_hash': {'key': 'properties.iconHash', 'type': 'str'}, + 'icon_content': {'key': 'properties.iconContent', 'type': 'bytearray'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + **kwargs + ): + super(Desktop, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.description = description + self.friendly_name = friendly_name + self.icon_hash = None + self.icon_content = None + + +class DesktopList(msrest.serialization.Model): + """List of Desktop definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of Desktop definitions. + :type value: list[~desktop_virtualization_api_client.models.Desktop] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Desktop]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Desktop"]] = None, + **kwargs + ): + super(DesktopList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DesktopPatch(msrest.serialization.Model): + """Desktop properties that can be patched. + + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of Desktop. + :type description: str + :param friendly_name: Friendly name of Desktop. + :type friendly_name: str + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + **kwargs + ): + super(DesktopPatch, self).__init__(**kwargs) + self.tags = tags + self.description = description + self.friendly_name = friendly_name + + +class ExpandMsixImage(Resource): + """Represents the definition of contents retrieved after expanding the MSIX Image. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param package_alias: Alias of MSIX Package. + :type package_alias: str + :param image_path: VHD/CIM image path on Network Share. + :type image_path: str + :param package_name: Package Name from appxmanifest.xml. + :type package_name: str + :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name + and Publisher name. + :type package_family_name: str + :param package_full_name: Package Full Name from appxmanifest.xml. + :type package_full_name: str + :param display_name: User friendly Name to be displayed in the portal. + :type display_name: str + :param package_relative_path: Relative Path to the package inside the image. + :type package_relative_path: str + :param is_regular_registration: Specifies how to register Package in feed. + :type is_regular_registration: bool + :param is_active: Make this version of the package the active one across the hostpool. + :type is_active: bool + :param package_dependencies: List of package dependencies. + :type package_dependencies: + list[~desktop_virtualization_api_client.models.MsixPackageDependencies] + :param version: Package Version found in the appxmanifest.xml. + :type version: str + :param last_updated: Date Package was last updated, found in the appxmanifest.xml. + :type last_updated: ~datetime.datetime + :param package_applications: List of package applications. + :type package_applications: + list[~desktop_virtualization_api_client.models.MsixPackageApplications] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'package_alias': {'key': 'properties.packageAlias', 'type': 'str'}, + 'image_path': {'key': 'properties.imagePath', 'type': 'str'}, + 'package_name': {'key': 'properties.packageName', 'type': 'str'}, + 'package_family_name': {'key': 'properties.packageFamilyName', 'type': 'str'}, + 'package_full_name': {'key': 'properties.packageFullName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'package_relative_path': {'key': 'properties.packageRelativePath', 'type': 'str'}, + 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'}, + 'is_active': {'key': 'properties.isActive', 'type': 'bool'}, + 'package_dependencies': {'key': 'properties.packageDependencies', 'type': '[MsixPackageDependencies]'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'}, + 'package_applications': {'key': 'properties.packageApplications', 'type': '[MsixPackageApplications]'}, + } + + def __init__( + self, + *, + package_alias: Optional[str] = None, + image_path: Optional[str] = None, + package_name: Optional[str] = None, + package_family_name: Optional[str] = None, + package_full_name: Optional[str] = None, + display_name: Optional[str] = None, + package_relative_path: Optional[str] = None, + is_regular_registration: Optional[bool] = None, + is_active: Optional[bool] = None, + package_dependencies: Optional[List["MsixPackageDependencies"]] = None, + version: Optional[str] = None, + last_updated: Optional[datetime.datetime] = None, + package_applications: Optional[List["MsixPackageApplications"]] = None, + **kwargs + ): + super(ExpandMsixImage, self).__init__(**kwargs) + self.package_alias = package_alias + self.image_path = image_path + self.package_name = package_name + self.package_family_name = package_family_name + self.package_full_name = package_full_name + self.display_name = display_name + self.package_relative_path = package_relative_path + self.is_regular_registration = is_regular_registration + self.is_active = is_active + self.package_dependencies = package_dependencies + self.version = version + self.last_updated = last_updated + self.package_applications = package_applications + + +class ExpandMsixImageList(msrest.serialization.Model): + """List of MSIX package properties retrieved from MSIX Image expansion. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of MSIX package properties from give MSIX Image. + :type value: list[~desktop_virtualization_api_client.models.ExpandMsixImage] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpandMsixImage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpandMsixImage"]] = None, + **kwargs + ): + super(ExpandMsixImageList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class HostPool(ResourceModelWithAllowedPropertySet): + """Represents a HostPool definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of HostPool. (internal use). + :vartype object_id: str + :param friendly_name: Friendly name of HostPool. + :type friendly_name: str + :param description: Description of HostPool. + :type description: str + :param host_pool_type: Required. HostPool type for desktop. Possible values include: + "Personal", "Pooled", "BYODesktop". + :type host_pool_type: str or ~desktop_virtualization_api_client.models.HostPoolType + :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool. Possible + values include: "Automatic", "Direct". + :type personal_desktop_assignment_type: str or + ~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType + :param custom_rdp_property: Custom rdp property of HostPool. + :type custom_rdp_property: str + :param max_session_limit: The max session limit of HostPool. + :type max_session_limit: int + :param load_balancer_type: Required. The type of the load balancer. Possible values include: + "BreadthFirst", "DepthFirst", "Persistent". + :type load_balancer_type: str or ~desktop_virtualization_api_client.models.LoadBalancerType + :param ring: The ring number of HostPool. + :type ring: int + :param validation_environment: Is validation environment. + :type validation_environment: bool + :param registration_info: The registration info of HostPool. + :type registration_info: ~desktop_virtualization_api_client.models.RegistrationInfo + :param vm_template: VM template for sessionhosts configuration within hostpool. + :type vm_template: str + :ivar application_group_references: List of applicationGroup links. + :vartype application_group_references: list[str] + :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates. + :type ssoadfs_authority: str + :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO + certificates. + :type sso_client_id: str + :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for + communication to ADFS. + :type sso_client_secret_key_vault_path: str + :param sso_secret_type: The type of single sign on Secret Type. Possible values include: + "SharedKey", "Certificate", "SharedKeyInKeyVault", "CertificateInKeyVault". + :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SSOSecretType + :param preferred_app_group_type: Required. The type of preferred application group type, + default to Desktop Application Group. Possible values include: "None", "Desktop", + "RailApplications". + :type preferred_app_group_type: str or + ~desktop_virtualization_api_client.models.PreferredAppGroupType + :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature. + :type start_vm_on_connect: bool + :param migration_request: The registration info of HostPool. + :type migration_request: ~desktop_virtualization_api_client.models.MigrationRequestProperties + :ivar cloud_pc_resource: Is cloud pc resource. + :vartype cloud_pc_resource: bool + :param public_network_access: Enabled allows this resource to be accessed from both public and + private networks, Disabled allows this resource to only be accessed via private endpoints. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~desktop_virtualization_api_client.models.PublicNetworkAccess + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'host_pool_type': {'required': True}, + 'load_balancer_type': {'required': True}, + 'application_group_references': {'readonly': True}, + 'preferred_app_group_type': {'required': True}, + 'cloud_pc_resource': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'host_pool_type': {'key': 'properties.hostPoolType', 'type': 'str'}, + 'personal_desktop_assignment_type': {'key': 'properties.personalDesktopAssignmentType', 'type': 'str'}, + 'custom_rdp_property': {'key': 'properties.customRdpProperty', 'type': 'str'}, + 'max_session_limit': {'key': 'properties.maxSessionLimit', 'type': 'int'}, + 'load_balancer_type': {'key': 'properties.loadBalancerType', 'type': 'str'}, + 'ring': {'key': 'properties.ring', 'type': 'int'}, + 'validation_environment': {'key': 'properties.validationEnvironment', 'type': 'bool'}, + 'registration_info': {'key': 'properties.registrationInfo', 'type': 'RegistrationInfo'}, + 'vm_template': {'key': 'properties.vmTemplate', 'type': 'str'}, + 'application_group_references': {'key': 'properties.applicationGroupReferences', 'type': '[str]'}, + 'ssoadfs_authority': {'key': 'properties.ssoadfsAuthority', 'type': 'str'}, + 'sso_client_id': {'key': 'properties.ssoClientId', 'type': 'str'}, + 'sso_client_secret_key_vault_path': {'key': 'properties.ssoClientSecretKeyVaultPath', 'type': 'str'}, + 'sso_secret_type': {'key': 'properties.ssoSecretType', 'type': 'str'}, + 'preferred_app_group_type': {'key': 'properties.preferredAppGroupType', 'type': 'str'}, + 'start_vm_on_connect': {'key': 'properties.startVMOnConnect', 'type': 'bool'}, + 'migration_request': {'key': 'properties.migrationRequest', 'type': 'MigrationRequestProperties'}, + 'cloud_pc_resource': {'key': 'properties.cloudPcResource', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + host_pool_type: Union[str, "HostPoolType"], + load_balancer_type: Union[str, "LoadBalancerType"], + preferred_app_group_type: Union[str, "PreferredAppGroupType"], + location: Optional[str] = None, + managed_by: Optional[str] = None, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceModelWithAllowedPropertySetIdentity"] = None, + sku: Optional["ResourceModelWithAllowedPropertySetSku"] = None, + plan: Optional["ResourceModelWithAllowedPropertySetPlan"] = None, + friendly_name: Optional[str] = None, + description: Optional[str] = None, + personal_desktop_assignment_type: Optional[Union[str, "PersonalDesktopAssignmentType"]] = None, + custom_rdp_property: Optional[str] = None, + max_session_limit: Optional[int] = None, + ring: Optional[int] = None, + validation_environment: Optional[bool] = None, + registration_info: Optional["RegistrationInfo"] = None, + vm_template: Optional[str] = None, + ssoadfs_authority: Optional[str] = None, + sso_client_id: Optional[str] = None, + sso_client_secret_key_vault_path: Optional[str] = None, + sso_secret_type: Optional[Union[str, "SSOSecretType"]] = None, + start_vm_on_connect: Optional[bool] = None, + migration_request: Optional["MigrationRequestProperties"] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + **kwargs + ): + super(HostPool, self).__init__(location=location, managed_by=managed_by, kind=kind, tags=tags, identity=identity, sku=sku, plan=plan, **kwargs) + self.system_data = None + self.object_id = None + self.friendly_name = friendly_name + self.description = description + self.host_pool_type = host_pool_type + self.personal_desktop_assignment_type = personal_desktop_assignment_type + self.custom_rdp_property = custom_rdp_property + self.max_session_limit = max_session_limit + self.load_balancer_type = load_balancer_type + self.ring = ring + self.validation_environment = validation_environment + self.registration_info = registration_info + self.vm_template = vm_template + self.application_group_references = None + self.ssoadfs_authority = ssoadfs_authority + self.sso_client_id = sso_client_id + self.sso_client_secret_key_vault_path = sso_client_secret_key_vault_path + self.sso_secret_type = sso_secret_type + self.preferred_app_group_type = preferred_app_group_type + self.start_vm_on_connect = start_vm_on_connect + self.migration_request = migration_request + self.cloud_pc_resource = None + self.public_network_access = public_network_access + + +class HostPoolList(msrest.serialization.Model): + """List of HostPool definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of HostPool definitions. + :type value: list[~desktop_virtualization_api_client.models.HostPool] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HostPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["HostPool"]] = None, + **kwargs + ): + super(HostPoolList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class HostPoolPatch(Resource): + """HostPool properties that can be patched. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param friendly_name: Friendly name of HostPool. + :type friendly_name: str + :param description: Description of HostPool. + :type description: str + :param custom_rdp_property: Custom rdp property of HostPool. + :type custom_rdp_property: str + :param max_session_limit: The max session limit of HostPool. + :type max_session_limit: int + :param personal_desktop_assignment_type: PersonalDesktopAssignment type for HostPool. Possible + values include: "Automatic", "Direct". + :type personal_desktop_assignment_type: str or + ~desktop_virtualization_api_client.models.PersonalDesktopAssignmentType + :param load_balancer_type: The type of the load balancer. Possible values include: + "BreadthFirst", "DepthFirst", "Persistent". + :type load_balancer_type: str or ~desktop_virtualization_api_client.models.LoadBalancerType + :param ring: The ring number of HostPool. + :type ring: int + :param validation_environment: Is validation environment. + :type validation_environment: bool + :param registration_info: The registration info of HostPool. + :type registration_info: ~desktop_virtualization_api_client.models.RegistrationInfoPatch + :param vm_template: VM template for sessionhosts configuration within hostpool. + :type vm_template: str + :param ssoadfs_authority: URL to customer ADFS server for signing WVD SSO certificates. + :type ssoadfs_authority: str + :param sso_client_id: ClientId for the registered Relying Party used to issue WVD SSO + certificates. + :type sso_client_id: str + :param sso_client_secret_key_vault_path: Path to Azure KeyVault storing the secret used for + communication to ADFS. + :type sso_client_secret_key_vault_path: str + :param sso_secret_type: The type of single sign on Secret Type. Possible values include: + "SharedKey", "Certificate", "SharedKeyInKeyVault", "CertificateInKeyVault". + :type sso_secret_type: str or ~desktop_virtualization_api_client.models.SSOSecretType + :param preferred_app_group_type: The type of preferred application group type, default to + Desktop Application Group. Possible values include: "None", "Desktop", "RailApplications". + :type preferred_app_group_type: str or + ~desktop_virtualization_api_client.models.PreferredAppGroupType + :param start_vm_on_connect: The flag to turn on/off StartVMOnConnect feature. + :type start_vm_on_connect: bool + :param public_network_access: Enabled to allow this resource to be access from the public + network. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~desktop_virtualization_api_client.models.PublicNetworkAccess + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'custom_rdp_property': {'key': 'properties.customRdpProperty', 'type': 'str'}, + 'max_session_limit': {'key': 'properties.maxSessionLimit', 'type': 'int'}, + 'personal_desktop_assignment_type': {'key': 'properties.personalDesktopAssignmentType', 'type': 'str'}, + 'load_balancer_type': {'key': 'properties.loadBalancerType', 'type': 'str'}, + 'ring': {'key': 'properties.ring', 'type': 'int'}, + 'validation_environment': {'key': 'properties.validationEnvironment', 'type': 'bool'}, + 'registration_info': {'key': 'properties.registrationInfo', 'type': 'RegistrationInfoPatch'}, + 'vm_template': {'key': 'properties.vmTemplate', 'type': 'str'}, + 'ssoadfs_authority': {'key': 'properties.ssoadfsAuthority', 'type': 'str'}, + 'sso_client_id': {'key': 'properties.ssoClientId', 'type': 'str'}, + 'sso_client_secret_key_vault_path': {'key': 'properties.ssoClientSecretKeyVaultPath', 'type': 'str'}, + 'sso_secret_type': {'key': 'properties.ssoSecretType', 'type': 'str'}, + 'preferred_app_group_type': {'key': 'properties.preferredAppGroupType', 'type': 'str'}, + 'start_vm_on_connect': {'key': 'properties.startVMOnConnect', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + friendly_name: Optional[str] = None, + description: Optional[str] = None, + custom_rdp_property: Optional[str] = None, + max_session_limit: Optional[int] = None, + personal_desktop_assignment_type: Optional[Union[str, "PersonalDesktopAssignmentType"]] = None, + load_balancer_type: Optional[Union[str, "LoadBalancerType"]] = None, + ring: Optional[int] = None, + validation_environment: Optional[bool] = None, + registration_info: Optional["RegistrationInfoPatch"] = None, + vm_template: Optional[str] = None, + ssoadfs_authority: Optional[str] = None, + sso_client_id: Optional[str] = None, + sso_client_secret_key_vault_path: Optional[str] = None, + sso_secret_type: Optional[Union[str, "SSOSecretType"]] = None, + preferred_app_group_type: Optional[Union[str, "PreferredAppGroupType"]] = None, + start_vm_on_connect: Optional[bool] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + **kwargs + ): + super(HostPoolPatch, self).__init__(**kwargs) + self.tags = tags + self.friendly_name = friendly_name + self.description = description + self.custom_rdp_property = custom_rdp_property + self.max_session_limit = max_session_limit + self.personal_desktop_assignment_type = personal_desktop_assignment_type + self.load_balancer_type = load_balancer_type + self.ring = ring + self.validation_environment = validation_environment + self.registration_info = registration_info + self.vm_template = vm_template + self.ssoadfs_authority = ssoadfs_authority + self.sso_client_id = sso_client_id + self.sso_client_secret_key_vault_path = sso_client_secret_key_vault_path + self.sso_secret_type = sso_secret_type + self.preferred_app_group_type = preferred_app_group_type + self.start_vm_on_connect = start_vm_on_connect + self.public_network_access = public_network_access + + +class Identity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class LogSpecification(msrest.serialization.Model): + """Specifications of the Log for Azure Monitoring. + + :param name: Name of the log. + :type name: str + :param display_name: Localized friendly display name of the log. + :type display_name: str + :param blob_duration: Blob duration of the log. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class MigrationRequestProperties(msrest.serialization.Model): + """Properties for arm migration. + + :param operation: The type of operation for migration. Possible values include: "Start", + "Revoke", "Complete", "Hide", "Unhide". + :type operation: str or ~desktop_virtualization_api_client.models.Operation + :param migration_path: The path to the legacy object to migrate. + :type migration_path: str + """ + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'str'}, + 'migration_path': {'key': 'migrationPath', 'type': 'str'}, + } + + def __init__( + self, + *, + operation: Optional[Union[str, "Operation"]] = None, + migration_path: Optional[str] = None, + **kwargs + ): + super(MigrationRequestProperties, self).__init__(**kwargs) + self.operation = operation + self.migration_path = migration_path + + +class MSIXImageURI(msrest.serialization.Model): + """Represents URI referring to MSIX Image. + + :param uri: URI to Image. + :type uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__( + self, + *, + uri: Optional[str] = None, + **kwargs + ): + super(MSIXImageURI, self).__init__(**kwargs) + self.uri = uri + + +class MSIXPackage(Resource): + """Schema for MSIX Package properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :param image_path: VHD/CIM image path on Network Share. + :type image_path: str + :param package_name: Package Name from appxmanifest.xml. + :type package_name: str + :param package_family_name: Package Family Name from appxmanifest.xml. Contains Package Name + and Publisher name. + :type package_family_name: str + :param display_name: User friendly Name to be displayed in the portal. + :type display_name: str + :param package_relative_path: Relative Path to the package inside the image. + :type package_relative_path: str + :param is_regular_registration: Specifies how to register Package in feed. + :type is_regular_registration: bool + :param is_active: Make this version of the package the active one across the hostpool. + :type is_active: bool + :param package_dependencies: List of package dependencies. + :type package_dependencies: + list[~desktop_virtualization_api_client.models.MsixPackageDependencies] + :param version: Package Version found in the appxmanifest.xml. + :type version: str + :param last_updated: Date Package was last updated, found in the appxmanifest.xml. + :type last_updated: ~datetime.datetime + :param package_applications: List of package applications. + :type package_applications: + list[~desktop_virtualization_api_client.models.MsixPackageApplications] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'image_path': {'key': 'properties.imagePath', 'type': 'str'}, + 'package_name': {'key': 'properties.packageName', 'type': 'str'}, + 'package_family_name': {'key': 'properties.packageFamilyName', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'package_relative_path': {'key': 'properties.packageRelativePath', 'type': 'str'}, + 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'}, + 'is_active': {'key': 'properties.isActive', 'type': 'bool'}, + 'package_dependencies': {'key': 'properties.packageDependencies', 'type': '[MsixPackageDependencies]'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + 'last_updated': {'key': 'properties.lastUpdated', 'type': 'iso-8601'}, + 'package_applications': {'key': 'properties.packageApplications', 'type': '[MsixPackageApplications]'}, + } + + def __init__( + self, + *, + image_path: Optional[str] = None, + package_name: Optional[str] = None, + package_family_name: Optional[str] = None, + display_name: Optional[str] = None, + package_relative_path: Optional[str] = None, + is_regular_registration: Optional[bool] = None, + is_active: Optional[bool] = None, + package_dependencies: Optional[List["MsixPackageDependencies"]] = None, + version: Optional[str] = None, + last_updated: Optional[datetime.datetime] = None, + package_applications: Optional[List["MsixPackageApplications"]] = None, + **kwargs + ): + super(MSIXPackage, self).__init__(**kwargs) + self.system_data = None + self.image_path = image_path + self.package_name = package_name + self.package_family_name = package_family_name + self.display_name = display_name + self.package_relative_path = package_relative_path + self.is_regular_registration = is_regular_registration + self.is_active = is_active + self.package_dependencies = package_dependencies + self.version = version + self.last_updated = last_updated + self.package_applications = package_applications + + +class MsixPackageApplications(msrest.serialization.Model): + """Schema for MSIX Package Application properties. + + :param app_id: Package Application Id, found in appxmanifest.xml. + :type app_id: str + :param description: Description of Package Application. + :type description: str + :param app_user_model_id: Used to activate Package Application. Consists of Package Name and + ApplicationID. Found in appxmanifest.xml. + :type app_user_model_id: str + :param friendly_name: User friendly name. + :type friendly_name: str + :param icon_image_name: User friendly name. + :type icon_image_name: str + :param raw_icon: the icon a 64 bit string as a byte array. + :type raw_icon: bytearray + :param raw_png: the icon a 64 bit string as a byte array. + :type raw_png: bytearray + """ + + _attribute_map = { + 'app_id': {'key': 'appId', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'app_user_model_id': {'key': 'appUserModelID', 'type': 'str'}, + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'icon_image_name': {'key': 'iconImageName', 'type': 'str'}, + 'raw_icon': {'key': 'rawIcon', 'type': 'bytearray'}, + 'raw_png': {'key': 'rawPng', 'type': 'bytearray'}, + } + + def __init__( + self, + *, + app_id: Optional[str] = None, + description: Optional[str] = None, + app_user_model_id: Optional[str] = None, + friendly_name: Optional[str] = None, + icon_image_name: Optional[str] = None, + raw_icon: Optional[bytearray] = None, + raw_png: Optional[bytearray] = None, + **kwargs + ): + super(MsixPackageApplications, self).__init__(**kwargs) + self.app_id = app_id + self.description = description + self.app_user_model_id = app_user_model_id + self.friendly_name = friendly_name + self.icon_image_name = icon_image_name + self.raw_icon = raw_icon + self.raw_png = raw_png + + +class MsixPackageDependencies(msrest.serialization.Model): + """Schema for MSIX Package Dependencies properties. + + :param dependency_name: Name of package dependency. + :type dependency_name: str + :param publisher: Name of dependency publisher. + :type publisher: str + :param min_version: Dependency version required. + :type min_version: str + """ + + _attribute_map = { + 'dependency_name': {'key': 'dependencyName', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'min_version': {'key': 'minVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + dependency_name: Optional[str] = None, + publisher: Optional[str] = None, + min_version: Optional[str] = None, + **kwargs + ): + super(MsixPackageDependencies, self).__init__(**kwargs) + self.dependency_name = dependency_name + self.publisher = publisher + self.min_version = min_version + + +class MSIXPackageList(msrest.serialization.Model): + """List of MSIX Package definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of MSIX Package definitions. + :type value: list[~desktop_virtualization_api_client.models.MSIXPackage] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MSIXPackage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MSIXPackage"]] = None, + **kwargs + ): + super(MSIXPackageList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class MSIXPackagePatch(Resource): + """MSIX Package properties that can be patched. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param is_active: Set a version of the package to be active across hostpool. + :type is_active: bool + :param is_regular_registration: Set Registration mode. Regular or Delayed. + :type is_regular_registration: bool + :param display_name: Display name for MSIX Package. + :type display_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_active': {'key': 'properties.isActive', 'type': 'bool'}, + 'is_regular_registration': {'key': 'properties.isRegularRegistration', 'type': 'bool'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + } + + def __init__( + self, + *, + is_active: Optional[bool] = None, + is_regular_registration: Optional[bool] = None, + display_name: Optional[str] = None, + **kwargs + ): + super(MSIXPackagePatch, self).__init__(**kwargs) + self.is_active = is_active + self.is_regular_registration = is_regular_registration + self.display_name = display_name + + +class OperationProperties(msrest.serialization.Model): + """Properties of the operation. + + :param service_specification: Service specification payload. + :type service_specification: ~desktop_virtualization_api_client.models.ServiceSpecification + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + *, + service_specification: Optional["ServiceSpecification"] = None, + **kwargs + ): + super(OperationProperties, self).__init__(**kwargs) + self.service_specification = service_specification + + +class Plan(msrest.serialization.Model): + """Plan for the resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A user defined name of the 3rd Party Artifact that is being procured. + :type name: str + :param publisher: Required. The publisher of the 3rd Party Artifact that is being bought. E.g. + NewRelic. + :type publisher: str + :param product: Required. The 3rd Party artifact that is being procured. E.g. NewRelic. Product + maps to the OfferID specified for the artifact at the time of Data Market onboarding. + :type product: str + :param promotion_code: A publisher provided promotion code as provisioned in Data Market for + the said product/artifact. + :type promotion_code: str + :param version: The version of the desired product/artifact. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + publisher: str, + product: str, + promotion_code: Optional[str] = None, + version: Optional[str] = None, + **kwargs + ): + super(Plan, self).__init__(**kwargs) + self.name = name + self.publisher = publisher + self.product = product + self.promotion_code = promotion_code + self.version = version + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~desktop_virtualization_api_client.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~desktop_virtualization_api_client.models.PrivateLinkServiceConnectionState + :param provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :type provisioning_state: str or + ~desktop_virtualization_api_client.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + provisioning_state: Optional[Union[str, "PrivateEndpointConnectionProvisioningState"]] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +class PrivateEndpointConnectionListResultWithSystemData(msrest.serialization.Model): + """List of private endpoint connection associated with the specified storage account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: Array of private endpoint connections. + :type value: + list[~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnectionWithSystemData]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnectionWithSystemData"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResultWithSystemData, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateEndpointConnectionWithSystemData(PrivateEndpointConnection): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~desktop_virtualization_api_client.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~desktop_virtualization_api_client.models.PrivateLinkServiceConnectionState + :param provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :type provisioning_state: str or + ~desktop_virtualization_api_client.models.PrivateEndpointConnectionProvisioningState + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + provisioning_state: Optional[Union[str, "PrivateEndpointConnectionProvisioningState"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionWithSystemData, self).__init__(private_endpoint=private_endpoint, private_link_service_connection_state=private_link_service_connection_state, provisioning_state=provisioning_state, **kwargs) + self.system_data = None + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: Array of private link resources. + :type value: list[~desktop_virtualization_api_client.models.PrivateLinkResource] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or + ~desktop_virtualization_api_client.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[str] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class RegistrationInfo(msrest.serialization.Model): + """Represents a RegistrationInfo definition. + + :param expiration_time: Expiration time of registration token. + :type expiration_time: ~datetime.datetime + :param token: The registration token base64 encoded string. + :type token: str + :param registration_token_operation: The type of resetting the token. Possible values include: + "Delete", "None", "Update". + :type registration_token_operation: str or + ~desktop_virtualization_api_client.models.RegistrationTokenOperation + """ + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'iso-8601'}, + 'token': {'key': 'token', 'type': 'str'}, + 'registration_token_operation': {'key': 'registrationTokenOperation', 'type': 'str'}, + } + + def __init__( + self, + *, + expiration_time: Optional[datetime.datetime] = None, + token: Optional[str] = None, + registration_token_operation: Optional[Union[str, "RegistrationTokenOperation"]] = None, + **kwargs + ): + super(RegistrationInfo, self).__init__(**kwargs) + self.expiration_time = expiration_time + self.token = token + self.registration_token_operation = registration_token_operation + + +class RegistrationInfoPatch(msrest.serialization.Model): + """Represents a RegistrationInfo definition. + + :param expiration_time: Expiration time of registration token. + :type expiration_time: ~datetime.datetime + :param registration_token_operation: The type of resetting the token. Possible values include: + "Delete", "None", "Update". + :type registration_token_operation: str or + ~desktop_virtualization_api_client.models.RegistrationTokenOperation + """ + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'iso-8601'}, + 'registration_token_operation': {'key': 'registrationTokenOperation', 'type': 'str'}, + } + + def __init__( + self, + *, + expiration_time: Optional[datetime.datetime] = None, + registration_token_operation: Optional[Union[str, "RegistrationTokenOperation"]] = None, + **kwargs + ): + super(RegistrationInfoPatch, self).__init__(**kwargs) + self.expiration_time = expiration_time + self.registration_token_operation = registration_token_operation + + +class ResourceModelWithAllowedPropertySetIdentity(Identity): + """ResourceModelWithAllowedPropertySetIdentity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. The only acceptable values to pass in are None and + "SystemAssigned". The default value is None. + :type type: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[str] = None, + **kwargs + ): + super(ResourceModelWithAllowedPropertySetIdentity, self).__init__(type=type, **kwargs) + + +class ResourceModelWithAllowedPropertySetPlan(Plan): + """ResourceModelWithAllowedPropertySetPlan. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. A user defined name of the 3rd Party Artifact that is being procured. + :type name: str + :param publisher: Required. The publisher of the 3rd Party Artifact that is being bought. E.g. + NewRelic. + :type publisher: str + :param product: Required. The 3rd Party artifact that is being procured. E.g. NewRelic. Product + maps to the OfferID specified for the artifact at the time of Data Market onboarding. + :type product: str + :param promotion_code: A publisher provided promotion code as provisioned in Data Market for + the said product/artifact. + :type promotion_code: str + :param version: The version of the desired product/artifact. + :type version: str + """ + + _validation = { + 'name': {'required': True}, + 'publisher': {'required': True}, + 'product': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'product': {'key': 'product', 'type': 'str'}, + 'promotion_code': {'key': 'promotionCode', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + publisher: str, + product: str, + promotion_code: Optional[str] = None, + version: Optional[str] = None, + **kwargs + ): + super(ResourceModelWithAllowedPropertySetPlan, self).__init__(name=name, publisher=publisher, product=product, promotion_code=promotion_code, version=version, **kwargs) + + +class Sku(msrest.serialization.Model): + """The resource model definition representing SKU. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. + :type name: str + :param tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :type tier: str or ~desktop_virtualization_api_client.models.SkuTier + :param size: The SKU size. When the name field is the combination of tier and some other value, + this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for the same SKU, then + that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity integer should be included. + If scale out/in is not possible for the resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: str, + tier: Optional[Union[str, "SkuTier"]] = None, + size: Optional[str] = None, + family: Optional[str] = None, + capacity: Optional[int] = None, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.size = size + self.family = family + self.capacity = capacity + + +class ResourceModelWithAllowedPropertySetSku(Sku): + """ResourceModelWithAllowedPropertySetSku. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the SKU. Ex - P3. It is typically a letter+number code. + :type name: str + :param tier: This field is required to be implemented by the Resource Provider if the service + has more than one tier, but is not required on a PUT. Possible values include: "Free", "Basic", + "Standard", "Premium". + :type tier: str or ~desktop_virtualization_api_client.models.SkuTier + :param size: The SKU size. When the name field is the combination of tier and some other value, + this would be the standalone code. + :type size: str + :param family: If the service has different generations of hardware, for the same SKU, then + that can be captured here. + :type family: str + :param capacity: If the SKU supports scale out/in then the capacity integer should be included. + If scale out/in is not possible for the resource this may be omitted. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'size': {'key': 'size', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: str, + tier: Optional[Union[str, "SkuTier"]] = None, + size: Optional[str] = None, + family: Optional[str] = None, + capacity: Optional[int] = None, + **kwargs + ): + super(ResourceModelWithAllowedPropertySetSku, self).__init__(name=name, tier=tier, size=size, family=family, capacity=capacity, **kwargs) + + +class ResourceProviderOperation(msrest.serialization.Model): + """Supported operation of this resource provider. + + :param name: Operation name, in format of {provider}/{resource}/{operation}. + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~desktop_virtualization_api_client.models.ResourceProviderOperationDisplay + :param is_data_action: Is a data action. + :type is_data_action: bool + :param properties: Properties of the operation. + :type properties: ~desktop_virtualization_api_client.models.OperationProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'ResourceProviderOperationDisplay'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'properties': {'key': 'properties', 'type': 'OperationProperties'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["ResourceProviderOperationDisplay"] = None, + is_data_action: Optional[bool] = None, + properties: Optional["OperationProperties"] = None, + **kwargs + ): + super(ResourceProviderOperation, self).__init__(**kwargs) + self.name = name + self.display = display + self.is_data_action = is_data_action + self.properties = properties + + +class ResourceProviderOperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :param provider: Resource provider: Microsoft Desktop Virtualization. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of this operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(ResourceProviderOperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class ResourceProviderOperationList(msrest.serialization.Model): + """Result of the request to list operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of operations supported by this resource provider. + :type value: list[~desktop_virtualization_api_client.models.ResourceProviderOperation] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceProviderOperation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ResourceProviderOperation"]] = None, + **kwargs + ): + super(ResourceProviderOperationList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ScalingHostPoolReference(msrest.serialization.Model): + """Scaling plan reference to hostpool. + + :param host_pool_arm_path: Arm path of referenced hostpool. + :type host_pool_arm_path: str + :param scaling_plan_enabled: Is the scaling plan enabled for this hostpool. + :type scaling_plan_enabled: bool + """ + + _attribute_map = { + 'host_pool_arm_path': {'key': 'hostPoolArmPath', 'type': 'str'}, + 'scaling_plan_enabled': {'key': 'scalingPlanEnabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + host_pool_arm_path: Optional[str] = None, + scaling_plan_enabled: Optional[bool] = None, + **kwargs + ): + super(ScalingHostPoolReference, self).__init__(**kwargs) + self.host_pool_arm_path = host_pool_arm_path + self.scaling_plan_enabled = scaling_plan_enabled + + +class ScalingPlan(ResourceModelWithAllowedPropertySet): + """Represents a scaling plan definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of scaling plan. (internal use). + :vartype object_id: str + :param description: Description of scaling plan. + :type description: str + :param friendly_name: User friendly name of scaling plan. + :type friendly_name: str + :param time_zone: Timezone of the scaling plan. + :type time_zone: str + :param host_pool_type: HostPool type for desktop. Possible values include: "Pooled". + :type host_pool_type: str or ~desktop_virtualization_api_client.models.ScalingHostPoolType + :param exclusion_tag: Exclusion tag for scaling plan. + :type exclusion_tag: str + :param schedules: List of ScalingSchedule definitions. + :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule] + :param host_pool_references: List of ScalingHostPoolReference definitions. + :type host_pool_references: + list[~desktop_virtualization_api_client.models.ScalingHostPoolReference] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'host_pool_type': {'key': 'properties.hostPoolType', 'type': 'str'}, + 'exclusion_tag': {'key': 'properties.exclusionTag', 'type': 'str'}, + 'schedules': {'key': 'properties.schedules', 'type': '[ScalingSchedule]'}, + 'host_pool_references': {'key': 'properties.hostPoolReferences', 'type': '[ScalingHostPoolReference]'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + managed_by: Optional[str] = None, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceModelWithAllowedPropertySetIdentity"] = None, + sku: Optional["ResourceModelWithAllowedPropertySetSku"] = None, + plan: Optional["ResourceModelWithAllowedPropertySetPlan"] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + time_zone: Optional[str] = None, + host_pool_type: Optional[Union[str, "ScalingHostPoolType"]] = None, + exclusion_tag: Optional[str] = None, + schedules: Optional[List["ScalingSchedule"]] = None, + host_pool_references: Optional[List["ScalingHostPoolReference"]] = None, + **kwargs + ): + super(ScalingPlan, self).__init__(location=location, managed_by=managed_by, kind=kind, tags=tags, identity=identity, sku=sku, plan=plan, **kwargs) + self.system_data = None + self.object_id = None + self.description = description + self.friendly_name = friendly_name + self.time_zone = time_zone + self.host_pool_type = host_pool_type + self.exclusion_tag = exclusion_tag + self.schedules = schedules + self.host_pool_references = host_pool_references + + +class ScalingPlanList(msrest.serialization.Model): + """List of scaling plan definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of scaling plan definitions. + :type value: list[~desktop_virtualization_api_client.models.ScalingPlan] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ScalingPlan]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ScalingPlan"]] = None, + **kwargs + ): + super(ScalingPlanList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ScalingPlanPatch(msrest.serialization.Model): + """Scaling plan properties that can be patched. + + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of scaling plan. + :type description: str + :param friendly_name: User friendly name of scaling plan. + :type friendly_name: str + :param time_zone: Timezone of the scaling plan. + :type time_zone: str + :param exclusion_tag: Exclusion tag for scaling plan. + :type exclusion_tag: str + :param schedules: List of ScalingSchedule definitions. + :type schedules: list[~desktop_virtualization_api_client.models.ScalingSchedule] + :param host_pool_references: List of ScalingHostPoolReference definitions. + :type host_pool_references: + list[~desktop_virtualization_api_client.models.ScalingHostPoolReference] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'time_zone': {'key': 'properties.timeZone', 'type': 'str'}, + 'exclusion_tag': {'key': 'properties.exclusionTag', 'type': 'str'}, + 'schedules': {'key': 'properties.schedules', 'type': '[ScalingSchedule]'}, + 'host_pool_references': {'key': 'properties.hostPoolReferences', 'type': '[ScalingHostPoolReference]'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + time_zone: Optional[str] = None, + exclusion_tag: Optional[str] = None, + schedules: Optional[List["ScalingSchedule"]] = None, + host_pool_references: Optional[List["ScalingHostPoolReference"]] = None, + **kwargs + ): + super(ScalingPlanPatch, self).__init__(**kwargs) + self.tags = tags + self.description = description + self.friendly_name = friendly_name + self.time_zone = time_zone + self.exclusion_tag = exclusion_tag + self.schedules = schedules + self.host_pool_references = host_pool_references + + +class ScalingSchedule(msrest.serialization.Model): + """Scaling plan schedule. + + :param name: Name of the scaling schedule. + :type name: str + :param days_of_week: Set of days of the week on which this schedule is active. + :type days_of_week: list[str or + ~desktop_virtualization_api_client.models.ScalingScheduleDaysOfWeekItem] + :param ramp_up_start_time: Starting time for ramp up period. + :type ramp_up_start_time: ~desktop_virtualization_api_client.models.Time + :param ramp_up_load_balancing_algorithm: Load balancing algorithm for ramp up period. Possible + values include: "BreadthFirst", "DepthFirst". + :type ramp_up_load_balancing_algorithm: str or + ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm + :param ramp_up_minimum_hosts_pct: Minimum host percentage for ramp up period. + :type ramp_up_minimum_hosts_pct: int + :param ramp_up_capacity_threshold_pct: Capacity threshold for ramp up period. + :type ramp_up_capacity_threshold_pct: int + :param peak_start_time: Starting time for peak period. + :type peak_start_time: ~desktop_virtualization_api_client.models.Time + :param peak_load_balancing_algorithm: Load balancing algorithm for peak period. Possible values + include: "BreadthFirst", "DepthFirst". + :type peak_load_balancing_algorithm: str or + ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm + :param ramp_down_start_time: Starting time for ramp down period. + :type ramp_down_start_time: ~desktop_virtualization_api_client.models.Time + :param ramp_down_load_balancing_algorithm: Load balancing algorithm for ramp down period. + Possible values include: "BreadthFirst", "DepthFirst". + :type ramp_down_load_balancing_algorithm: str or + ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm + :param ramp_down_minimum_hosts_pct: Minimum host percentage for ramp down period. + :type ramp_down_minimum_hosts_pct: int + :param ramp_down_capacity_threshold_pct: Capacity threshold for ramp down period. + :type ramp_down_capacity_threshold_pct: int + :param ramp_down_force_logoff_users: Should users be logged off forcefully from hosts. + :type ramp_down_force_logoff_users: bool + :param ramp_down_stop_hosts_when: Specifies when to stop hosts during ramp down period. + Possible values include: "ZeroSessions", "ZeroActiveSessions". + :type ramp_down_stop_hosts_when: str or ~desktop_virtualization_api_client.models.StopHostsWhen + :param ramp_down_wait_time_minutes: Number of minutes to wait to stop hosts during ramp down + period. + :type ramp_down_wait_time_minutes: int + :param ramp_down_notification_message: Notification message for users during ramp down period. + :type ramp_down_notification_message: str + :param off_peak_start_time: Starting time for off-peak period. + :type off_peak_start_time: ~desktop_virtualization_api_client.models.Time + :param off_peak_load_balancing_algorithm: Load balancing algorithm for off-peak period. + Possible values include: "BreadthFirst", "DepthFirst". + :type off_peak_load_balancing_algorithm: str or + ~desktop_virtualization_api_client.models.SessionHostLoadBalancingAlgorithm + """ + + _validation = { + 'ramp_up_minimum_hosts_pct': {'maximum': 100, 'minimum': 0}, + 'ramp_up_capacity_threshold_pct': {'maximum': 100, 'minimum': 1}, + 'ramp_down_minimum_hosts_pct': {'maximum': 100, 'minimum': 0}, + 'ramp_down_capacity_threshold_pct': {'maximum': 100, 'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'days_of_week': {'key': 'daysOfWeek', 'type': '[str]'}, + 'ramp_up_start_time': {'key': 'rampUpStartTime', 'type': 'Time'}, + 'ramp_up_load_balancing_algorithm': {'key': 'rampUpLoadBalancingAlgorithm', 'type': 'str'}, + 'ramp_up_minimum_hosts_pct': {'key': 'rampUpMinimumHostsPct', 'type': 'int'}, + 'ramp_up_capacity_threshold_pct': {'key': 'rampUpCapacityThresholdPct', 'type': 'int'}, + 'peak_start_time': {'key': 'peakStartTime', 'type': 'Time'}, + 'peak_load_balancing_algorithm': {'key': 'peakLoadBalancingAlgorithm', 'type': 'str'}, + 'ramp_down_start_time': {'key': 'rampDownStartTime', 'type': 'Time'}, + 'ramp_down_load_balancing_algorithm': {'key': 'rampDownLoadBalancingAlgorithm', 'type': 'str'}, + 'ramp_down_minimum_hosts_pct': {'key': 'rampDownMinimumHostsPct', 'type': 'int'}, + 'ramp_down_capacity_threshold_pct': {'key': 'rampDownCapacityThresholdPct', 'type': 'int'}, + 'ramp_down_force_logoff_users': {'key': 'rampDownForceLogoffUsers', 'type': 'bool'}, + 'ramp_down_stop_hosts_when': {'key': 'rampDownStopHostsWhen', 'type': 'str'}, + 'ramp_down_wait_time_minutes': {'key': 'rampDownWaitTimeMinutes', 'type': 'int'}, + 'ramp_down_notification_message': {'key': 'rampDownNotificationMessage', 'type': 'str'}, + 'off_peak_start_time': {'key': 'offPeakStartTime', 'type': 'Time'}, + 'off_peak_load_balancing_algorithm': {'key': 'offPeakLoadBalancingAlgorithm', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + days_of_week: Optional[List[Union[str, "ScalingScheduleDaysOfWeekItem"]]] = None, + ramp_up_start_time: Optional["Time"] = None, + ramp_up_load_balancing_algorithm: Optional[Union[str, "SessionHostLoadBalancingAlgorithm"]] = None, + ramp_up_minimum_hosts_pct: Optional[int] = None, + ramp_up_capacity_threshold_pct: Optional[int] = None, + peak_start_time: Optional["Time"] = None, + peak_load_balancing_algorithm: Optional[Union[str, "SessionHostLoadBalancingAlgorithm"]] = None, + ramp_down_start_time: Optional["Time"] = None, + ramp_down_load_balancing_algorithm: Optional[Union[str, "SessionHostLoadBalancingAlgorithm"]] = None, + ramp_down_minimum_hosts_pct: Optional[int] = None, + ramp_down_capacity_threshold_pct: Optional[int] = None, + ramp_down_force_logoff_users: Optional[bool] = None, + ramp_down_stop_hosts_when: Optional[Union[str, "StopHostsWhen"]] = None, + ramp_down_wait_time_minutes: Optional[int] = None, + ramp_down_notification_message: Optional[str] = None, + off_peak_start_time: Optional["Time"] = None, + off_peak_load_balancing_algorithm: Optional[Union[str, "SessionHostLoadBalancingAlgorithm"]] = None, + **kwargs + ): + super(ScalingSchedule, self).__init__(**kwargs) + self.name = name + self.days_of_week = days_of_week + self.ramp_up_start_time = ramp_up_start_time + self.ramp_up_load_balancing_algorithm = ramp_up_load_balancing_algorithm + self.ramp_up_minimum_hosts_pct = ramp_up_minimum_hosts_pct + self.ramp_up_capacity_threshold_pct = ramp_up_capacity_threshold_pct + self.peak_start_time = peak_start_time + self.peak_load_balancing_algorithm = peak_load_balancing_algorithm + self.ramp_down_start_time = ramp_down_start_time + self.ramp_down_load_balancing_algorithm = ramp_down_load_balancing_algorithm + self.ramp_down_minimum_hosts_pct = ramp_down_minimum_hosts_pct + self.ramp_down_capacity_threshold_pct = ramp_down_capacity_threshold_pct + self.ramp_down_force_logoff_users = ramp_down_force_logoff_users + self.ramp_down_stop_hosts_when = ramp_down_stop_hosts_when + self.ramp_down_wait_time_minutes = ramp_down_wait_time_minutes + self.ramp_down_notification_message = ramp_down_notification_message + self.off_peak_start_time = off_peak_start_time + self.off_peak_load_balancing_algorithm = off_peak_load_balancing_algorithm + + +class SendMessage(msrest.serialization.Model): + """Represents message sent to a UserSession. + + :param message_title: Title of message. + :type message_title: str + :param message_body: Body of message. + :type message_body: str + """ + + _attribute_map = { + 'message_title': {'key': 'messageTitle', 'type': 'str'}, + 'message_body': {'key': 'messageBody', 'type': 'str'}, + } + + def __init__( + self, + *, + message_title: Optional[str] = None, + message_body: Optional[str] = None, + **kwargs + ): + super(SendMessage, self).__init__(**kwargs) + self.message_title = message_title + self.message_body = message_body + + +class ServiceSpecification(msrest.serialization.Model): + """Service specification payload. + + :param log_specifications: Specifications of the Log for Azure Monitoring. + :type log_specifications: list[~desktop_virtualization_api_client.models.LogSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__( + self, + *, + log_specifications: Optional[List["LogSpecification"]] = None, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + + +class SessionHost(Resource): + """Represents a SessionHost definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of SessionHost. (internal use). + :vartype object_id: str + :param last_heart_beat: Last heart beat from SessionHost. + :type last_heart_beat: ~datetime.datetime + :param sessions: Number of sessions on SessionHost. + :type sessions: int + :param agent_version: Version of agent on SessionHost. + :type agent_version: str + :param allow_new_session: Allow a new session. + :type allow_new_session: bool + :ivar virtual_machine_id: Virtual Machine Id of SessionHost's underlying virtual machine. + :vartype virtual_machine_id: str + :ivar resource_id: Resource Id of SessionHost's underlying virtual machine. + :vartype resource_id: str + :param assigned_user: User assigned to SessionHost. + :type assigned_user: str + :param status: Status for a SessionHost. Possible values include: "Available", "Unavailable", + "Shutdown", "Disconnected", "Upgrading", "UpgradeFailed", "NoHeartbeat", "NotJoinedToDomain", + "DomainTrustRelationshipLost", "SxSStackListenerNotReady", "FSLogixNotHealthy", + "NeedsAssistance". + :type status: str or ~desktop_virtualization_api_client.models.Status + :ivar status_timestamp: The timestamp of the status. + :vartype status_timestamp: ~datetime.datetime + :param os_version: The version of the OS on the session host. + :type os_version: str + :param sx_s_stack_version: The version of the side by side stack on the session host. + :type sx_s_stack_version: str + :param update_state: Update state of a SessionHost. Possible values include: "Initial", + "Pending", "Started", "Succeeded", "Failed". + :type update_state: str or ~desktop_virtualization_api_client.models.UpdateState + :ivar last_update_time: The timestamp of the last update. + :vartype last_update_time: ~datetime.datetime + :param update_error_message: The error message. + :type update_error_message: str + :ivar session_host_health_check_results: List of SessionHostHealthCheckReports. + :vartype session_host_health_check_results: + list[~desktop_virtualization_api_client.models.SessionHostHealthCheckReport] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'virtual_machine_id': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'status_timestamp': {'readonly': True}, + 'last_update_time': {'readonly': True}, + 'session_host_health_check_results': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'last_heart_beat': {'key': 'properties.lastHeartBeat', 'type': 'iso-8601'}, + 'sessions': {'key': 'properties.sessions', 'type': 'int'}, + 'agent_version': {'key': 'properties.agentVersion', 'type': 'str'}, + 'allow_new_session': {'key': 'properties.allowNewSession', 'type': 'bool'}, + 'virtual_machine_id': {'key': 'properties.virtualMachineId', 'type': 'str'}, + 'resource_id': {'key': 'properties.resourceId', 'type': 'str'}, + 'assigned_user': {'key': 'properties.assignedUser', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'status_timestamp': {'key': 'properties.statusTimestamp', 'type': 'iso-8601'}, + 'os_version': {'key': 'properties.osVersion', 'type': 'str'}, + 'sx_s_stack_version': {'key': 'properties.sxSStackVersion', 'type': 'str'}, + 'update_state': {'key': 'properties.updateState', 'type': 'str'}, + 'last_update_time': {'key': 'properties.lastUpdateTime', 'type': 'iso-8601'}, + 'update_error_message': {'key': 'properties.updateErrorMessage', 'type': 'str'}, + 'session_host_health_check_results': {'key': 'properties.sessionHostHealthCheckResults', 'type': '[SessionHostHealthCheckReport]'}, + } + + def __init__( + self, + *, + last_heart_beat: Optional[datetime.datetime] = None, + sessions: Optional[int] = None, + agent_version: Optional[str] = None, + allow_new_session: Optional[bool] = None, + assigned_user: Optional[str] = None, + status: Optional[Union[str, "Status"]] = None, + os_version: Optional[str] = None, + sx_s_stack_version: Optional[str] = None, + update_state: Optional[Union[str, "UpdateState"]] = None, + update_error_message: Optional[str] = None, + **kwargs + ): + super(SessionHost, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.last_heart_beat = last_heart_beat + self.sessions = sessions + self.agent_version = agent_version + self.allow_new_session = allow_new_session + self.virtual_machine_id = None + self.resource_id = None + self.assigned_user = assigned_user + self.status = status + self.status_timestamp = None + self.os_version = os_version + self.sx_s_stack_version = sx_s_stack_version + self.update_state = update_state + self.last_update_time = None + self.update_error_message = update_error_message + self.session_host_health_check_results = None + + +class SessionHostHealthCheckFailureDetails(msrest.serialization.Model): + """Contains details on the failure. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar message: Failure message: hints on what is wrong and how to recover. + :vartype message: str + :ivar error_code: Error code corresponding for the failure. + :vartype error_code: int + :ivar last_health_check_date_time: The timestamp of the last update. + :vartype last_health_check_date_time: ~datetime.datetime + """ + + _validation = { + 'message': {'readonly': True}, + 'error_code': {'readonly': True}, + 'last_health_check_date_time': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'int'}, + 'last_health_check_date_time': {'key': 'lastHealthCheckDateTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SessionHostHealthCheckFailureDetails, self).__init__(**kwargs) + self.message = None + self.error_code = None + self.last_health_check_date_time = None + + +class SessionHostHealthCheckReport(msrest.serialization.Model): + """The report for session host information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar health_check_name: Represents the name of the health check operation performed. Possible + values include: "DomainJoinedCheck", "DomainTrustCheck", "FSLogixHealthCheck", + "SxSStackListenerCheck", "UrlsAccessibleCheck", "MonitoringAgentCheck", "DomainReachable", + "WebRTCRedirectorCheck", "SupportedEncryptionCheck", "MetaDataServiceCheck", + "AppAttachHealthCheck". + :vartype health_check_name: str or ~desktop_virtualization_api_client.models.HealthCheckName + :ivar health_check_result: Represents the Health state of the health check we performed. + Possible values include: "Unknown", "HealthCheckSucceeded", "HealthCheckFailed", + "SessionHostShutdown". + :vartype health_check_result: str or + ~desktop_virtualization_api_client.models.HealthCheckResult + :ivar additional_failure_details: Additional detailed information on the failure. + :vartype additional_failure_details: + ~desktop_virtualization_api_client.models.SessionHostHealthCheckFailureDetails + """ + + _validation = { + 'health_check_name': {'readonly': True}, + 'health_check_result': {'readonly': True}, + 'additional_failure_details': {'readonly': True}, + } + + _attribute_map = { + 'health_check_name': {'key': 'healthCheckName', 'type': 'str'}, + 'health_check_result': {'key': 'healthCheckResult', 'type': 'str'}, + 'additional_failure_details': {'key': 'additionalFailureDetails', 'type': 'SessionHostHealthCheckFailureDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(SessionHostHealthCheckReport, self).__init__(**kwargs) + self.health_check_name = None + self.health_check_result = None + self.additional_failure_details = None + + +class SessionHostList(msrest.serialization.Model): + """List of SessionHost definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of SessionHost definitions. + :type value: list[~desktop_virtualization_api_client.models.SessionHost] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SessionHost]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["SessionHost"]] = None, + **kwargs + ): + super(SessionHostList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SessionHostPatch(Resource): + """SessionHost properties that can be patched. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param allow_new_session: Allow a new session. + :type allow_new_session: bool + :param assigned_user: User assigned to SessionHost. + :type assigned_user: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allow_new_session': {'key': 'properties.allowNewSession', 'type': 'bool'}, + 'assigned_user': {'key': 'properties.assignedUser', 'type': 'str'}, + } + + def __init__( + self, + *, + allow_new_session: Optional[bool] = None, + assigned_user: Optional[str] = None, + **kwargs + ): + super(SessionHostPatch, self).__init__(**kwargs) + self.allow_new_session = allow_new_session + self.assigned_user = assigned_user + + +class StartMenuItem(Resource): + """Represents a StartMenuItem definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param app_alias: Alias of StartMenuItem. + :type app_alias: str + :param file_path: Path to the file of StartMenuItem. + :type file_path: str + :param command_line_arguments: Command line arguments for StartMenuItem. + :type command_line_arguments: str + :param icon_path: Path to the icon. + :type icon_path: str + :param icon_index: Index of the icon. + :type icon_index: int + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'app_alias': {'key': 'properties.appAlias', 'type': 'str'}, + 'file_path': {'key': 'properties.filePath', 'type': 'str'}, + 'command_line_arguments': {'key': 'properties.commandLineArguments', 'type': 'str'}, + 'icon_path': {'key': 'properties.iconPath', 'type': 'str'}, + 'icon_index': {'key': 'properties.iconIndex', 'type': 'int'}, + } + + def __init__( + self, + *, + app_alias: Optional[str] = None, + file_path: Optional[str] = None, + command_line_arguments: Optional[str] = None, + icon_path: Optional[str] = None, + icon_index: Optional[int] = None, + **kwargs + ): + super(StartMenuItem, self).__init__(**kwargs) + self.app_alias = app_alias + self.file_path = file_path + self.command_line_arguments = command_line_arguments + self.icon_path = icon_path + self.icon_index = icon_index + + +class StartMenuItemList(msrest.serialization.Model): + """List of StartMenuItem definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of StartMenuItem definitions. + :type value: list[~desktop_virtualization_api_client.models.StartMenuItem] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[StartMenuItem]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["StartMenuItem"]] = None, + **kwargs + ): + super(StartMenuItemList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class SystemData(msrest.serialization.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 ~desktop_virtualization_api_client.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~desktop_virtualization_api_client.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 Time(msrest.serialization.Model): + """The time for a scaling action to occur. + + All required parameters must be populated in order to send to Azure. + + :param hour: Required. The hour. + :type hour: int + :param minute: Required. The minute. + :type minute: int + """ + + _validation = { + 'hour': {'required': True, 'maximum': 23, 'minimum': 0}, + 'minute': {'required': True, 'maximum': 59, 'minimum': 0}, + } + + _attribute_map = { + 'hour': {'key': 'hour', 'type': 'int'}, + 'minute': {'key': 'minute', 'type': 'int'}, + } + + def __init__( + self, + *, + hour: int, + minute: int, + **kwargs + ): + super(Time, self).__init__(**kwargs) + self.hour = hour + self.minute = minute + + +class UserSession(Resource): + """Represents a UserSession definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of user session. (internal use). + :vartype object_id: str + :param user_principal_name: The user principal name. + :type user_principal_name: str + :param application_type: Application type of application. Possible values include: "RemoteApp", + "Desktop". + :type application_type: str or ~desktop_virtualization_api_client.models.ApplicationType + :param session_state: State of user session. Possible values include: "Unknown", "Active", + "Disconnected", "Pending", "LogOff", "UserProfileDiskMounted". + :type session_state: str or ~desktop_virtualization_api_client.models.SessionState + :param active_directory_user_name: The active directory user name. + :type active_directory_user_name: str + :param create_time: The timestamp of the user session create. + :type create_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'user_principal_name': {'key': 'properties.userPrincipalName', 'type': 'str'}, + 'application_type': {'key': 'properties.applicationType', 'type': 'str'}, + 'session_state': {'key': 'properties.sessionState', 'type': 'str'}, + 'active_directory_user_name': {'key': 'properties.activeDirectoryUserName', 'type': 'str'}, + 'create_time': {'key': 'properties.createTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + user_principal_name: Optional[str] = None, + application_type: Optional[Union[str, "ApplicationType"]] = None, + session_state: Optional[Union[str, "SessionState"]] = None, + active_directory_user_name: Optional[str] = None, + create_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(UserSession, self).__init__(**kwargs) + self.system_data = None + self.object_id = None + self.user_principal_name = user_principal_name + self.application_type = application_type + self.session_state = session_state + self.active_directory_user_name = active_directory_user_name + self.create_time = create_time + + +class UserSessionList(msrest.serialization.Model): + """List of UserSession definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of UserSession definitions. + :type value: list[~desktop_virtualization_api_client.models.UserSession] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[UserSession]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["UserSession"]] = None, + **kwargs + ): + super(UserSessionList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Workspace(ResourceModelWithAllowedPropertySet): + """Represents a Workspace definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: The geo-location where the resource lives. + :type location: str + :param managed_by: The fully qualified resource ID of the resource that manages this resource. + Indicates if this resource is managed by another Azure resource. If this is present, complete + mode deployment will not delete the resource if it is removed from the template since it is + managed by another resource. + :type managed_by: str + :param kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :type kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: + :type identity: + ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetIdentity + :param sku: + :type sku: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetSku + :param plan: + :type plan: ~desktop_virtualization_api_client.models.ResourceModelWithAllowedPropertySetPlan + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~desktop_virtualization_api_client.models.SystemData + :ivar object_id: ObjectId of Workspace. (internal use). + :vartype object_id: str + :param description: Description of Workspace. + :type description: str + :param friendly_name: Friendly name of Workspace. + :type friendly_name: str + :param application_group_references: List of applicationGroup resource Ids. + :type application_group_references: list[str] + :ivar cloud_pc_resource: Is cloud pc resource. + :vartype cloud_pc_resource: bool + :param public_network_access: Enabled allows this resource to be accessed from both public and + private networks, Disabled allows this resource to only be accessed via private endpoints. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~desktop_virtualization_api_client.models.PublicNetworkAccess + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'object_id': {'readonly': True}, + 'cloud_pc_resource': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ResourceModelWithAllowedPropertySetIdentity'}, + 'sku': {'key': 'sku', 'type': 'ResourceModelWithAllowedPropertySetSku'}, + 'plan': {'key': 'plan', 'type': 'ResourceModelWithAllowedPropertySetPlan'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'object_id': {'key': 'properties.objectId', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'application_group_references': {'key': 'properties.applicationGroupReferences', 'type': '[str]'}, + 'cloud_pc_resource': {'key': 'properties.cloudPcResource', 'type': 'bool'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + managed_by: Optional[str] = None, + kind: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ResourceModelWithAllowedPropertySetIdentity"] = None, + sku: Optional["ResourceModelWithAllowedPropertySetSku"] = None, + plan: Optional["ResourceModelWithAllowedPropertySetPlan"] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + application_group_references: Optional[List[str]] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + **kwargs + ): + super(Workspace, self).__init__(location=location, managed_by=managed_by, kind=kind, tags=tags, identity=identity, sku=sku, plan=plan, **kwargs) + self.system_data = None + self.object_id = None + self.description = description + self.friendly_name = friendly_name + self.application_group_references = application_group_references + self.cloud_pc_resource = None + self.public_network_access = public_network_access + + +class WorkspaceList(msrest.serialization.Model): + """List of Workspace definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of Workspace definitions. + :type value: list[~desktop_virtualization_api_client.models.Workspace] + :ivar next_link: Link to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Workspace]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Workspace"]] = None, + **kwargs + ): + super(WorkspaceList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WorkspacePatch(msrest.serialization.Model): + """Workspace properties that can be patched. + + :param tags: A set of tags. tags to be updated. + :type tags: dict[str, str] + :param description: Description of Workspace. + :type description: str + :param friendly_name: Friendly name of Workspace. + :type friendly_name: str + :param application_group_references: List of applicationGroup links. + :type application_group_references: list[str] + :param public_network_access: Enabled to allow this resource to be access from the public + network. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~desktop_virtualization_api_client.models.PublicNetworkAccess + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, + 'application_group_references': {'key': 'properties.applicationGroupReferences', 'type': '[str]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + friendly_name: Optional[str] = None, + application_group_references: Optional[List[str]] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + **kwargs + ): + super(WorkspacePatch, self).__init__(**kwargs) + self.tags = tags + self.description = description + self.friendly_name = friendly_name + self.application_group_references = application_group_references + self.public_network_access = public_network_access diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/__init__.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/__init__.py new file mode 100644 index 000000000000..63576d0654da --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/__init__.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import Operations +from ._workspaces_operations import WorkspacesOperations +from ._scaling_plans_operations import ScalingPlansOperations +from ._application_groups_operations import ApplicationGroupsOperations +from ._start_menu_items_operations import StartMenuItemsOperations +from ._applications_operations import ApplicationsOperations +from ._desktops_operations import DesktopsOperations +from ._host_pools_operations import HostPoolsOperations +from ._user_sessions_operations import UserSessionsOperations +from ._session_hosts_operations import SessionHostsOperations +from ._msix_packages_operations import MSIXPackagesOperations +from ._msix_images_operations import MsixImagesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations + +__all__ = [ + 'Operations', + 'WorkspacesOperations', + 'ScalingPlansOperations', + 'ApplicationGroupsOperations', + 'StartMenuItemsOperations', + 'ApplicationsOperations', + 'DesktopsOperations', + 'HostPoolsOperations', + 'UserSessionsOperations', + 'SessionHostsOperations', + 'MSIXPackagesOperations', + 'MsixImagesOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', +] diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_application_groups_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_application_groups_operations.py new file mode 100644 index 000000000000..35d423413cb7 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_application_groups_operations.py @@ -0,0 +1,452 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ApplicationGroupsOperations(object): + """ApplicationGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + application_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationGroup" + """Get an application group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGroup, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ApplicationGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + application_group_name, # type: str + application_group, # type: "_models.ApplicationGroup" + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationGroup" + """Create or update an applicationGroup. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_group: Object containing ApplicationGroup definitions. + :type application_group: ~desktop_virtualization_api_client.models.ApplicationGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGroup, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ApplicationGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(application_group, 'ApplicationGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ApplicationGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + application_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove an applicationGroup. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + application_group_name, # type: str + application_group=None, # type: Optional["_models.ApplicationGroupPatch"] + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationGroup" + """Update an applicationGroup. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_group: Object containing ApplicationGroup definitions. + :type application_group: ~desktop_virtualization_api_client.models.ApplicationGroupPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGroup, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ApplicationGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if application_group is not None: + body_content = self._serialize.body(application_group, 'ApplicationGroupPatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApplicationGroupList"] + """List applicationGroups. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param filter: OData filter expression. Valid properties for filtering are + applicationGroupType. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGroupList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ApplicationGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationGroupList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups'} # type: ignore + + def list_by_subscription( + self, + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApplicationGroupList"] + """List applicationGroups in subscription. + + :param filter: OData filter expression. Valid properties for filtering are + applicationGroupType. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGroupList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ApplicationGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationGroupList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/applicationGroups'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_applications_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_applications_operations.py new file mode 100644 index 000000000000..59dd6449ed15 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_applications_operations.py @@ -0,0 +1,393 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ApplicationsOperations(object): + """ApplicationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + application_group_name, # type: str + application_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Application" + """Get an application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_name: The name of the application within the specified application group. + :type application_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Application, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Application + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Application"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Application', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + application_group_name, # type: str + application_name, # type: str + application, # type: "_models.Application" + **kwargs # type: Any + ): + # type: (...) -> "_models.Application" + """Create or update an application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_name: The name of the application within the specified application group. + :type application_name: str + :param application: Object containing Application definitions. + :type application: ~desktop_virtualization_api_client.models.Application + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Application, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Application + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Application"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(application, 'Application') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Application', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Application', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + application_group_name, # type: str + application_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove an application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_name: The name of the application within the specified application group. + :type application_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + application_group_name, # type: str + application_name, # type: str + application=None, # type: Optional["_models.ApplicationPatch"] + **kwargs # type: Any + ): + # type: (...) -> "_models.Application" + """Update an application. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param application_name: The name of the application within the specified application group. + :type application_name: str + :param application: Object containing Application definitions. + :type application: ~desktop_virtualization_api_client.models.ApplicationPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Application, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Application + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Application"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'applicationName': self._serialize.url("application_name", application_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if application is not None: + body_content = self._serialize.body(application, 'ApplicationPatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Application', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications/{applicationName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + application_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApplicationList"] + """List applications. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ApplicationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/applications'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_load_balancing_rules_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_desktops_operations.py similarity index 50% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_load_balancing_rules_operations.py rename to sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_desktops_operations.py index 7305006deedf..2a315452e564 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_load_balancing_rules_operations.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_desktops_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerLoadBalancingRulesOperations(object): - """LoadBalancerLoadBalancingRulesOperations operations. +class DesktopsOperations(object): + """DesktopsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~desktop_virtualization_api_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,117 +45,109 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def list( + def get( self, resource_group_name, # type: str - load_balancer_name, # type: str + application_group_name, # type: str + desktop_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerLoadBalancingRuleListResult"] - """Gets all the load balancing rules in a load balancer. + # type: (...) -> "_models.Desktop" + """Get a desktop. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param desktop_name: The name of the desktop within the specified desktop group. + :type desktop_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerLoadBalancingRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerLoadBalancingRuleListResult] + :return: Desktop, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Desktop :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerLoadBalancingRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Desktop"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = "2021-09-03-preview" + accept = "application/json" - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'desktopName': self._serialize.url("desktop_name", desktop_name, 'str', max_length=24, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerLoadBalancingRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('Desktop', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}'} # type: ignore - def get( + def update( self, resource_group_name, # type: str - load_balancer_name, # type: str - load_balancing_rule_name, # type: str + application_group_name, # type: str + desktop_name, # type: str + desktop=None, # type: Optional["_models.DesktopPatch"] **kwargs # type: Any ): - # type: (...) -> "_models.LoadBalancingRule" - """Gets the specified load balancer load balancing rule. + # type: (...) -> "_models.Desktop" + """Update a desktop. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param load_balancing_rule_name: The name of the load balancing rule. - :type load_balancing_rule_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :param desktop_name: The name of the desktop within the specified desktop group. + :type desktop_name: str + :param desktop: Object containing Desktop definitions. + :type desktop: ~desktop_virtualization_api_client.models.DesktopPatch :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancingRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.LoadBalancingRule + :return: Desktop, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Desktop :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancingRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Desktop"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'loadBalancingRuleName': self._serialize.url("load_balancing_rule_name", load_balancing_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + 'desktopName': self._serialize.url("desktop_name", desktop_name, 'str', max_length=24, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -165,9 +157,16 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if desktop is not None: + body_content = self._serialize.body(desktop, 'DesktopPatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -175,10 +174,85 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LoadBalancingRule', pipeline_response) + deserialized = self._deserialize('Desktop', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops/{desktopName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + application_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DesktopList"] + """List desktops. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DesktopList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.DesktopList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DesktopList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DesktopList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/desktops'} # type: ignore diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topics_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_host_pools_operations.py similarity index 56% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topics_operations.py rename to sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_host_pools_operations.py index b63665b10b13..12f946b4b400 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_topics_operations.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_host_pools_operations.py @@ -12,9 +12,7 @@ from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models @@ -25,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class PartnerTopicsOperations(object): - """PartnerTopicsOperations operations. +class HostPoolsOperations(object): + """HostPoolsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~desktop_virtualization_api_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,37 +48,35 @@ def __init__(self, client, config, serializer, deserializer): def get( self, resource_group_name, # type: str - partner_topic_name, # type: str + host_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.PartnerTopic" - """Get a partner topic. + # type: (...) -> "_models.HostPool" + """Get a host pool. - Get properties of a partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerTopic, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic + :return: HostPool, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.HostPool :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopic"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -100,34 +96,50 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerTopic', pipeline_response) + deserialized = self._deserialize('HostPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore - def _delete_initial( + def create_or_update( self, resource_group_name, # type: str - partner_topic_name, # type: str + host_pool_name, # type: str + host_pool, # type: "_models.HostPool" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.HostPool" + """Create or update a host pool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param host_pool: Object containing HostPool definitions. + :type host_pool: ~desktop_virtualization_api_client.models.HostPool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HostPool, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.HostPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -137,125 +149,129 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(host_pool, 'HostPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('HostPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HostPool', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'} # type: ignore + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore - def begin_delete( + def delete( self, resource_group_name, # type: str - partner_topic_name, # type: str + host_pool_name, # type: str + force=None, # type: Optional[bool] **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Delete a partner topic. - - Delete existing partner topic. + # type: (...) -> None + """Remove a host pool. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param force: Force flag to delete sessionHost. + :type force: bool :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - partner_topic_name=partner_topic_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + # Construct URL + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } + url = self._client.format_url(url, **path_format_arguments) - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'} # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore def update( self, resource_group_name, # type: str - partner_topic_name, # type: str - partner_topic_update_parameters, # type: "_models.PartnerTopicUpdateParameters" + host_pool_name, # type: str + host_pool=None, # type: Optional["_models.HostPoolPatch"] **kwargs # type: Any ): - # type: (...) -> Optional["_models.PartnerTopic"] - """Update a partner topic. + # type: (...) -> "_models.HostPool" + """Update a host pool. - Asynchronously updates a partner topic with the specified parameters. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :param partner_topic_update_parameters: PartnerTopic update information. - :type partner_topic_update_parameters: ~azure.mgmt.eventgrid.models.PartnerTopicUpdateParameters + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param host_pool: Object containing HostPool definitions. + :type host_pool: ~desktop_virtualization_api_client.models.HostPoolPatch :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerTopic, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic or None + :return: HostPool, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.HostPool :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PartnerTopic"]] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -269,59 +285,48 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_topic_update_parameters, 'PartnerTopicUpdateParameters') + if host_pool is not None: + body_content = self._serialize.body(host_pool, 'HostPoolPatch') + else: + body_content = None body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('PartnerTopic', pipeline_response) + deserialized = self._deserialize('HostPool', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}'} # type: ignore - def list_by_subscription( + def list_by_resource_group( self, - filter=None, # type: Optional[str] - top=None, # type: Optional[int] + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PartnerTopicsListResult"] - """List partner topics under an Azure subscription. - - List all the partner topics under an Azure subscription. - - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int + # type: (...) -> Iterable["_models.HostPoolList"] + """List hostPools. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerTopicsListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerTopicsListResult] + :return: An iterator like instance of either HostPoolList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.HostPoolList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopicsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPoolList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -331,18 +336,15 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -352,7 +354,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerTopicsListResult', pipeline_response) + deserialized = self._deserialize('HostPoolList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -373,44 +375,26 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerTopics'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools'} # type: ignore - def list_by_resource_group( + def list( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PartnerTopicsListResult"] - """List partner topics under a resource group. + # type: (...) -> Iterable["_models.HostPoolList"] + """List hostPools in subscription. - List all the partner topics under a resource group. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerTopicsListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerTopicsListResult] + :return: An iterator like instance of either HostPoolList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.HostPoolList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopicsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HostPoolList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -420,19 +404,14 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -442,7 +421,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerTopicsListResult', pipeline_response) + deserialized = self._deserialize('HostPoolList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -463,103 +442,40 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics'} # type: ignore - - def activate( - self, - resource_group_name, # type: str - partner_topic_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PartnerTopic" - """Activate a partner topic. - - Activate a newly created partner topic. - - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerTopic, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopic"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" - accept = "application/json" + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/hostPools'} # type: ignore - # Construct URL - url = self.activate.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PartnerTopic', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - activate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/activate'} # type: ignore - - def deactivate( + def retrieve_registration_token( self, resource_group_name, # type: str - partner_topic_name, # type: str + host_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.PartnerTopic" - """Deactivate a partner topic. - - Deactivate specific partner topic. + # type: (...) -> "_models.RegistrationInfo" + """Registration token of the host pool. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_topic_name: Name of the partner topic. - :type partner_topic_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerTopic, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerTopic + :return: RegistrationInfo, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.RegistrationInfo :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerTopic"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RegistrationInfo"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" # Construct URL - url = self.deactivate.metadata['url'] # type: ignore + url = self.retrieve_registration_token.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerTopicName': self._serialize.url("partner_topic_name", partner_topic_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -579,10 +495,10 @@ def deactivate( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerTopic', pipeline_response) + deserialized = self._deserialize('RegistrationInfo', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - deactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerTopics/{partnerTopicName}/deactivate'} # type: ignore + retrieve_registration_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/retrieveRegistrationToken'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_msix_images_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_msix_images_operations.py new file mode 100644 index 000000000000..4b3888285aae --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_msix_images_operations.py @@ -0,0 +1,132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class MsixImagesOperations(object): + """MsixImagesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def expand( + self, + resource_group_name, # type: str + host_pool_name, # type: str + msix_image_uri, # type: "_models.MSIXImageURI" + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExpandMsixImageList"] + """Expands and Lists MSIX packages in an Image, given the Image Path. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_image_uri: Object containing URI to MSIX Image. + :type msix_image_uri: ~desktop_virtualization_api_client.models.MSIXImageURI + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpandMsixImageList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ExpandMsixImageList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpandMsixImageList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.expand.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(msix_image_uri, 'MSIXImageURI') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(msix_image_uri, 'MSIXImageURI') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExpandMsixImageList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + expand.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/expandMsixImage'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_msix_packages_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_msix_packages_operations.py new file mode 100644 index 000000000000..140e1fe0cf52 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_msix_packages_operations.py @@ -0,0 +1,397 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class MSIXPackagesOperations(object): + """MSIXPackagesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + host_pool_name, # type: str + msix_package_full_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MSIXPackage" + """Get a msixpackage. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_package_full_name: The version specific package full name of the MSIX package + within specified hostpool. + :type msix_package_full_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSIXPackage, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.MSIXPackage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSIXPackage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSIXPackage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + host_pool_name, # type: str + msix_package_full_name, # type: str + msix_package, # type: "_models.MSIXPackage" + **kwargs # type: Any + ): + # type: (...) -> "_models.MSIXPackage" + """Create or update a MSIX package. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_package_full_name: The version specific package full name of the MSIX package + within specified hostpool. + :type msix_package_full_name: str + :param msix_package: Object containing MSIX Package definitions. + :type msix_package: ~desktop_virtualization_api_client.models.MSIXPackage + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSIXPackage, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.MSIXPackage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSIXPackage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(msix_package, 'MSIXPackage') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('MSIXPackage', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('MSIXPackage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + host_pool_name, # type: str + msix_package_full_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove an MSIX Package. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_package_full_name: The version specific package full name of the MSIX package + within specified hostpool. + :type msix_package_full_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + host_pool_name, # type: str + msix_package_full_name, # type: str + msix_package=None, # type: Optional["_models.MSIXPackagePatch"] + **kwargs # type: Any + ): + # type: (...) -> "_models.MSIXPackage" + """Update an MSIX Package. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param msix_package_full_name: The version specific package full name of the MSIX package + within specified hostpool. + :type msix_package_full_name: str + :param msix_package: Object containing MSIX Package definitions. + :type msix_package: ~desktop_virtualization_api_client.models.MSIXPackagePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MSIXPackage, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.MSIXPackage + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSIXPackage"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'msixPackageFullName': self._serialize.url("msix_package_full_name", msix_package_full_name, 'str', max_length=100, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if msix_package is not None: + body_content = self._serialize.body(msix_package, 'MSIXPackagePatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MSIXPackage', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages/{msixPackageFullName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + host_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MSIXPackageList"] + """List MSIX packages in hostpool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MSIXPackageList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.MSIXPackageList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MSIXPackageList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('MSIXPackageList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/msixPackages'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_operations.py new file mode 100644 index 000000000000..0438e92acc25 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceProviderOperationList"] + """List all of the available operations the Desktop Virtualization resource provider supports. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceProviderOperationList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ResourceProviderOperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceProviderOperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceProviderOperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.DesktopVirtualization/operations'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_private_endpoint_connections_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..cdb369a42e1e --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,590 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_host_pool( + self, + resource_group_name, # type: str + host_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResultWithSystemData"] + """List private endpoint connections associated with hostpool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResultWithSystemData or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.PrivateEndpointConnectionListResultWithSystemData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResultWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResultWithSystemData', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections'} # type: ignore + + def get_by_host_pool( + self, + resource_group_name, # type: str + host_pool_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionWithSystemData" + """Get a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionWithSystemData, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionWithSystemData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def delete_by_host_pool( + self, + resource_group_name, # type: str + host_pool_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def update_by_host_pool( + self, + resource_group_name, # type: str + host_pool_name, # type: str + private_endpoint_connection_name, # type: str + connection, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionWithSystemData" + """Approve or reject a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :param connection: Object containing the updated connection. + :type connection: ~desktop_virtualization_api_client.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionWithSystemData, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionWithSystemData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def list_by_workspace( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResultWithSystemData"] + """List private endpoint connections. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResultWithSystemData or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.PrivateEndpointConnectionListResultWithSystemData] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResultWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResultWithSystemData', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections'} # type: ignore + + def get_by_workspace( + self, + resource_group_name, # type: str + workspace_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionWithSystemData" + """Get a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionWithSystemData, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionWithSystemData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def delete_by_workspace( + self, + resource_group_name, # type: str + workspace_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def update_by_workspace( + self, + resource_group_name, # type: str + workspace_name, # type: str + private_endpoint_connection_name, # type: str + connection, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionWithSystemData" + """Approve or reject a private endpoint connection. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :param connection: Object containing the updated connection. + :type connection: ~desktop_virtualization_api_client.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionWithSystemData, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.PrivateEndpointConnectionWithSystemData + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionWithSystemData"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connection, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionWithSystemData', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_private_link_resources_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..21893ee73489 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_private_link_resources_operations.py @@ -0,0 +1,196 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_host_pool( + self, + resource_group_name, # type: str + host_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] + """List the private link resources available for this hostpool. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/privateLinkResources'} # type: ignore + + def list_by_workspace( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] + """List the private link resources available for this workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_workspace.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_workspace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}/privateLinkResources'} # type: ignore diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_registrations_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_scaling_plans_operations.py similarity index 63% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_registrations_operations.py rename to sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_scaling_plans_operations.py index 550f54bcae2c..d612336eff64 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_partner_registrations_operations.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_scaling_plans_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class PartnerRegistrationsOperations(object): - """PartnerRegistrationsOperations operations. +class ScalingPlansOperations(object): + """ScalingPlansOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~desktop_virtualization_api_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,37 +48,35 @@ def __init__(self, client, config, serializer, deserializer): def get( self, resource_group_name, # type: str - partner_registration_name, # type: str + scaling_plan_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.PartnerRegistration" - """Get a partner registration. + # type: (...) -> "_models.ScalingPlan" + """Get a scaling plan. - Gets a partner registration with the specified parameters. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_registration_name: Name of the partner registration. - :type partner_registration_name: str + :param scaling_plan_name: The name of the scaling plan. + :type scaling_plan_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerRegistration, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerRegistration + :return: ScalingPlan, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ScalingPlan :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlan"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -98,52 +96,50 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PartnerRegistration', pipeline_response) + deserialized = self._deserialize('ScalingPlan', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore - def create_or_update( + def create( self, resource_group_name, # type: str - partner_registration_name, # type: str - partner_registration_info, # type: "_models.PartnerRegistration" + scaling_plan_name, # type: str + scaling_plan, # type: "_models.ScalingPlan" **kwargs # type: Any ): - # type: (...) -> "_models.PartnerRegistration" - """Create a partner registration. - - Creates a new partner registration with the specified parameters. + # type: (...) -> "_models.ScalingPlan" + """Create or update a scaling plan. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_registration_name: Name of the partner registration. - :type partner_registration_name: str - :param partner_registration_info: PartnerRegistration information. - :type partner_registration_info: ~azure.mgmt.eventgrid.models.PartnerRegistration + :param scaling_plan_name: The name of the scaling plan. + :type scaling_plan_name: str + :param scaling_plan: Object containing scaling plan definitions. + :type scaling_plan: ~desktop_virtualization_api_client.models.ScalingPlan :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerRegistration, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerRegistration + :return: ScalingPlan, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ScalingPlan :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistration"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlan"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self.create.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -157,43 +153,41 @@ def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_registration_info, 'PartnerRegistration') + body_content = self._serialize.body(scaling_plan, 'ScalingPlan') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('PartnerRegistration', pipeline_response) + deserialized = self._deserialize('ScalingPlan', pipeline_response) - if response.status_code == 202: - deserialized = self._deserialize('PartnerRegistration', pipeline_response) + if response.status_code == 201: + deserialized = self._deserialize('ScalingPlan', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'} # type: ignore + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore def delete( self, resource_group_name, # type: str - partner_registration_name, # type: str + scaling_plan_name, # type: str **kwargs # type: Any ): # type: (...) -> None - """Delete a partner registration. + """Remove a scaling plan. - Deletes a partner registration with the specified parameters. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_registration_name: Name of the partner registration. - :type partner_registration_name: str + :param scaling_plan_name: The name of the scaling plan. + :type scaling_plan_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -204,14 +198,15 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" + accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -221,58 +216,57 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore def update( self, resource_group_name, # type: str - partner_registration_name, # type: str - partner_registration_update_parameters, # type: "_models.PartnerRegistrationUpdateParameters" + scaling_plan_name, # type: str + scaling_plan=None, # type: Optional["_models.ScalingPlanPatch"] **kwargs # type: Any ): - # type: (...) -> Optional["_models.PartnerRegistration"] - """Update a partner registration. - - Updates a partner registration with the specified parameters. + # type: (...) -> "_models.ScalingPlan" + """Update a scaling plan. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param partner_registration_name: Name of the partner registration. - :type partner_registration_name: str - :param partner_registration_update_parameters: Partner registration update information. - :type partner_registration_update_parameters: ~azure.mgmt.eventgrid.models.PartnerRegistrationUpdateParameters + :param scaling_plan_name: The name of the scaling plan. + :type scaling_plan_name: str + :param scaling_plan: Object containing scaling plan definitions. + :type scaling_plan: ~desktop_virtualization_api_client.models.ScalingPlanPatch :keyword callable cls: A custom type or function that will be passed the direct response - :return: PartnerRegistration, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.PartnerRegistration or None + :return: ScalingPlan, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.ScalingPlan :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PartnerRegistration"]] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlan"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerRegistrationName': self._serialize.url("partner_registration_name", partner_registration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'scalingPlanName': self._serialize.url("scaling_plan_name", scaling_plan_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) @@ -286,59 +280,48 @@ def update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(partner_registration_update_parameters, 'PartnerRegistrationUpdateParameters') + if scaling_plan is not None: + body_content = self._serialize.body(scaling_plan, 'ScalingPlanPatch') + else: + body_content = None body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('PartnerRegistration', pipeline_response) + deserialized = self._deserialize('ScalingPlan', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations/{partnerRegistrationName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans/{scalingPlanName}'} # type: ignore - def list_by_subscription( + def list_by_resource_group( self, - filter=None, # type: Optional[str] - top=None, # type: Optional[int] + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PartnerRegistrationsListResult"] - """List partner registrations under an Azure subscription. - - List all the partner registrations under an Azure subscription. - - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int + # type: (...) -> Iterable["_models.ScalingPlanList"] + """List scaling plans. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerRegistrationsListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] + :return: An iterator like instance of either ScalingPlanList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlanList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -348,18 +331,15 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_subscription.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -369,7 +349,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerRegistrationsListResult', pipeline_response) + deserialized = self._deserialize('ScalingPlanList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -390,44 +370,26 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventGrid/partnerRegistrations'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/scalingPlans'} # type: ignore - def list_by_resource_group( + def list_by_subscription( self, - resource_group_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PartnerRegistrationsListResult"] - """List partner registrations under a resource group. - - List all the partner registrations under a resource group. + # type: (...) -> Iterable["_models.ScalingPlanList"] + """List scaling plans in subscription. - :param resource_group_name: The name of the resource group within the user's subscription. - :type resource_group_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerRegistrationsListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] + :return: An iterator like instance of either ScalingPlanList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlanList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -437,19 +399,14 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore + url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') request = self._client.get(url, query_parameters, header_parameters) else: @@ -459,7 +416,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerRegistrationsListResult', pipeline_response) + deserialized = self._deserialize('ScalingPlanList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -480,28 +437,32 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerRegistrations'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/scalingPlans'} # type: ignore - def list( + def list_by_host_pool( self, + resource_group_name, # type: str + host_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PartnerRegistrationsListResult"] - """List all available partners registrations. - - List all partners registrations. + # type: (...) -> Iterable["_models.ScalingPlanList"] + """List scaling plan associated with hostpool. + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PartnerRegistrationsListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.PartnerRegistrationsListResult] + :return: An iterator like instance of either ScalingPlanList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.ScalingPlanList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PartnerRegistrationsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ScalingPlanList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-09-03-preview" accept = "application/json" def prepare_request(next_link=None): @@ -511,7 +472,13 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') @@ -524,11 +491,11 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PartnerRegistrationsListResult', pipeline_response) + deserialized = self._deserialize('ScalingPlanList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -545,4 +512,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.EventGrid/partnerRegistrations'} # type: ignore + list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/scalingPlans'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_session_hosts_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_session_hosts_operations.py new file mode 100644 index 000000000000..2480b7d82744 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_session_hosts_operations.py @@ -0,0 +1,328 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SessionHostsOperations(object): + """SessionHostsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + host_pool_name, # type: str + session_host_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SessionHost" + """Get a session host. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SessionHost, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.SessionHost + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SessionHost"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SessionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + host_pool_name, # type: str + session_host_name, # type: str + force=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a SessionHost. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param force: Force flag to force sessionHost deletion even when userSession exists. + :type force: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + host_pool_name, # type: str + session_host_name, # type: str + force=None, # type: Optional[bool] + session_host=None, # type: Optional["_models.SessionHostPatch"] + **kwargs # type: Any + ): + # type: (...) -> "_models.SessionHost" + """Update a session host. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param force: Force flag to update assign, unassign or reassign personal desktop. + :type force: bool + :param session_host: Object containing SessionHost definitions. + :type session_host: ~desktop_virtualization_api_client.models.SessionHostPatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SessionHost, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.SessionHost + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SessionHost"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if session_host is not None: + body_content = self._serialize.body(session_host, 'SessionHostPatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SessionHost', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + host_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SessionHostList"] + """List sessionHosts. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SessionHostList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.SessionHostList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SessionHostList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SessionHostList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_load_balancers_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_start_menu_items_operations.py similarity index 77% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_load_balancers_operations.py rename to sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_start_menu_items_operations.py index 4a0bb46513fa..6252ac496e01 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_load_balancers_operations.py +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_start_menu_items_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class NetworkInterfaceLoadBalancersOperations(object): - """NetworkInterfaceLoadBalancersOperations operations. +class StartMenuItemsOperations(object): + """StartMenuItemsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~desktop_virtualization_api_client.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,28 +48,28 @@ def __init__(self, client, config, serializer, deserializer): def list( self, resource_group_name, # type: str - network_interface_name, # type: str + application_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceLoadBalancerListResult"] - """List all load balancers in a network interface. + # type: (...) -> Iterable["_models.StartMenuItemList"] + """List start menu items in the given application group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param application_group_name: The name of the application group. + :type application_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceLoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceLoadBalancerListResult] + :return: An iterator like instance of either StartMenuItemList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.StartMenuItemList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceLoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.StartMenuItemList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-09-03-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -80,9 +80,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'applicationGroupName': self._serialize.url("application_group_name", application_group_name, 'str', max_length=64, min_length=3), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -97,7 +97,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceLoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('StartMenuItemList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,4 +118,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/applicationGroups/{applicationGroupName}/startMenuItems'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_user_sessions_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_user_sessions_operations.py new file mode 100644 index 000000000000..8d2bd84f3da7 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_user_sessions_operations.py @@ -0,0 +1,481 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class UserSessionsOperations(object): + """UserSessionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_host_pool( + self, + resource_group_name, # type: str + host_pool_name, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UserSessionList"] + """List userSessions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param filter: OData filter expression. Valid properties for filtering are userprincipalname + and sessionstate. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UserSessionList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.UserSessionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserSessionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_host_pool.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UserSessionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_host_pool.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/userSessions'} # type: ignore + + def get( + self, + resource_group_name, # type: str + host_pool_name, # type: str + session_host_name, # type: str + user_session_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.UserSession" + """Get a userSession. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param user_session_id: The name of the user session within the specified session host. + :type user_session_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UserSession, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.UserSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserSession"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UserSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + host_pool_name, # type: str + session_host_name, # type: str + user_session_id, # type: str + force=None, # type: Optional[bool] + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a userSession. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param user_session_id: The name of the user session within the specified session host. + :type user_session_id: str + :param force: Force flag to login off userSession. + :type force: bool + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if force is not None: + query_parameters['force'] = self._serialize.query("force", force, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + host_pool_name, # type: str + session_host_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UserSessionList"] + """List userSessions. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UserSessionList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.UserSessionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserSessionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UserSessionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions'} # type: ignore + + def disconnect( + self, + resource_group_name, # type: str + host_pool_name, # type: str + session_host_name, # type: str + user_session_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Disconnect a userSession. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param user_session_id: The name of the user session within the specified session host. + :type user_session_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.disconnect.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + disconnect.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/disconnect'} # type: ignore + + def send_message( + self, + resource_group_name, # type: str + host_pool_name, # type: str + session_host_name, # type: str + user_session_id, # type: str + send_message=None, # type: Optional["_models.SendMessage"] + **kwargs # type: Any + ): + # type: (...) -> None + """Send a message to a user. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param host_pool_name: The name of the host pool within the specified resource group. + :type host_pool_name: str + :param session_host_name: The name of the session host within the specified host pool. + :type session_host_name: str + :param user_session_id: The name of the user session within the specified session host. + :type user_session_id: str + :param send_message: Object containing message includes title and message body. + :type send_message: ~desktop_virtualization_api_client.models.SendMessage + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.send_message.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'hostPoolName': self._serialize.url("host_pool_name", host_pool_name, 'str', max_length=64, min_length=3), + 'sessionHostName': self._serialize.url("session_host_name", session_host_name, 'str', max_length=48, min_length=3), + 'userSessionId': self._serialize.url("user_session_id", user_session_id, 'str', max_length=24, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if send_message is not None: + body_content = self._serialize.body(send_message, 'SendMessage') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + send_message.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/hostPools/{hostPoolName}/sessionHosts/{sessionHostName}/userSessions/{userSessionId}/sendMessage'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_workspaces_operations.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_workspaces_operations.py new file mode 100644 index 000000000000..909e892418f0 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/operations/_workspaces_operations.py @@ -0,0 +1,440 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WorkspacesOperations(object): + """WorkspacesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~desktop_virtualization_api_client.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Workspace" + """Get a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workspace, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Workspace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + workspace_name, # type: str + workspace, # type: "_models.Workspace" + **kwargs # type: Any + ): + # type: (...) -> "_models.Workspace" + """Create or update a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param workspace: Object containing Workspace definitions. + :type workspace: ~desktop_virtualization_api_client.models.Workspace + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workspace, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Workspace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(workspace, 'Workspace') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Workspace', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + workspace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + workspace_name, # type: str + workspace=None, # type: Optional["_models.WorkspacePatch"] + **kwargs # type: Any + ): + # type: (...) -> "_models.Workspace" + """Update a workspace. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param workspace_name: The name of the workspace. + :type workspace_name: str + :param workspace: Object containing Workspace definitions. + :type workspace: ~desktop_virtualization_api_client.models.WorkspacePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Workspace, or the result of cls(response) + :rtype: ~desktop_virtualization_api_client.models.Workspace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Workspace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'workspaceName': self._serialize.url("workspace_name", workspace_name, 'str', max_length=64, min_length=3), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if workspace is not None: + body_content = self._serialize.body(workspace, 'WorkspacePatch') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Workspace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces/{workspaceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkspaceList"] + """List workspaces. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkspaceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.WorkspaceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WorkspaceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DesktopVirtualization/workspaces'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WorkspaceList"] + """List workspaces in subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WorkspaceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~desktop_virtualization_api_client.models.WorkspaceList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WorkspaceList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-03-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WorkspaceList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DesktopVirtualization/workspaces'} # type: ignore diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/py.typed b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/azure/mgmt/desktopvirtualization/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/sdk_packaging.toml b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/sdk_packaging.toml new file mode 100644 index 000000000000..711d0ab3713c --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/sdk_packaging.toml @@ -0,0 +1,9 @@ +[packaging] +package_name = "azure-mgmt-desktopvirtualization" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Desktopvirtualization Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.cfg b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.py b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.py new file mode 100644 index 000000000000..15a2ea4cdaf5 --- /dev/null +++ b/sdk/desktopvirtualization/azure-mgmt-desktopvirtualization/setup.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-desktopvirtualization" +PACKAGE_PPRINT_NAME = "Desktopvirtualization Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.6.21', + 'azure-common~=1.1', + 'azure-mgmt-core>=1.2.0,<2.0.0', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +) diff --git a/sdk/desktopvirtualization/ci.yml b/sdk/desktopvirtualization/ci.yml new file mode 100644 index 000000000000..c5752433bbf2 --- /dev/null +++ b/sdk/desktopvirtualization/ci.yml @@ -0,0 +1,33 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/desktopvirtualization/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/desktopvirtualization/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: desktopvirtualization + Artifacts: + - name: azure-mgmt-desktopvirtualization + safeName: azuremgmtdesktopvirtualization diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/CHANGELOG.md b/sdk/deviceupdate/azure-mgmt-deviceupdate/CHANGELOG.md index ae8a3f308363..6a3a508c0ca6 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/CHANGELOG.md +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/CHANGELOG.md @@ -1,5 +1,33 @@ # Release History +## 1.0.0b3 (2021-11-04) + +**Features** + + - Model AccountUpdate has a new parameter identity + - Model Instance has a new parameter diagnostic_storage_properties + - Model Instance has a new parameter enable_diagnostics + - Model Instance has a new parameter system_data + - Model Account has a new parameter identity + - Model Account has a new parameter system_data + - Model Account has a new parameter public_network_access + - Model Resource has a new parameter system_data + - Model TrackedResource has a new parameter system_data + - Model ErrorResponse has a new parameter error + - Added operation InstancesOperations.head + - Added operation AccountsOperations.head + - Added operation group PrivateLinkResourcesOperations + - Added operation group DeviceUpdateOperationsMixin + - Added operation group PrivateEndpointConnectionsOperations + +**Breaking changes** + + - Model ErrorResponse no longer has parameter additional_info + - Model ErrorResponse no longer has parameter message + - Model ErrorResponse no longer has parameter details + - Model ErrorResponse no longer has parameter code + - Model ErrorResponse no longer has parameter target + ## 1.0.0b2 (2021-03-24) **Breaking changes** diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/MANIFEST.in b/sdk/deviceupdate/azure-mgmt-deviceupdate/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/MANIFEST.in +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/_meta.json b/sdk/deviceupdate/azure-mgmt-deviceupdate/_meta.json new file mode 100644 index 000000000000..3f36cd80b970 --- /dev/null +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "2d2fdb419b42ad00df574946ea195fd1cd5ae226", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/deviceupdate/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/deviceupdate/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_device_update.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_device_update.py index 00fa09589018..d17c61f76c08 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_device_update.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_device_update.py @@ -16,21 +16,29 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import DeviceUpdateConfiguration +from .operations import DeviceUpdateOperationsMixin from .operations import AccountsOperations from .operations import InstancesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from .operations import Operations from . import models -class DeviceUpdate(object): +class DeviceUpdate(DeviceUpdateOperationsMixin): """Microsoft Device Update resource provider. :ivar accounts: AccountsOperations operations :vartype accounts: device_update.operations.AccountsOperations :ivar instances: InstancesOperations operations :vartype instances: device_update.operations.InstancesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: device_update.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: device_update.operations.PrivateLinkResourcesOperations :ivar operations: Operations operations :vartype operations: device_update.operations.Operations :param credential: Credential needed for the client to connect to Azure. @@ -56,15 +64,38 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.accounts = AccountsOperations( self._client, self._config, self._serialize, self._deserialize) self.instances = InstancesOperations( self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_metadata.json b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_metadata.json index 65efd33736f2..cc25f1fbd315 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_metadata.json +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": true + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DeviceUpdateConfiguration\"], \"._operations_mixin\": [\"DeviceUpdateOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DeviceUpdateConfiguration\"], \"._operations_mixin\": [\"DeviceUpdateOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The Azure subscription ID.", "docstring_type": "str", "required": true @@ -42,22 +44,82 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "accounts": "AccountsOperations", "instances": "InstancesOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations", "operations": "Operations" }, "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "operations": { + "check_name_availability" : { + "sync": { + "signature": "def check_name_availability(\n self,\n request, # type: \"_models.CheckNameAvailabilityRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Checks ADU resource name availability.\n\n:param request: Check Name Availability Request.\n:type request: ~device_update.models.CheckNameAvailabilityRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityResponse, or the result of cls(response)\n:rtype: ~device_update.models.CheckNameAvailabilityResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_name_availability(\n self,\n request: \"_models.CheckNameAvailabilityRequest\",\n **kwargs: Any\n) -\u003e \"_models.CheckNameAvailabilityResponse\":\n", + "doc": "\"\"\"Checks ADU resource name availability.\n\n:param request: Check Name Availability Request.\n:type request: ~device_update.models.CheckNameAvailabilityRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityResponse, or the result of cls(response)\n:rtype: ~device_update.models.CheckNameAvailabilityResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "request" + } + } + } } \ No newline at end of file diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_version.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_version.py index dfa6ee022f15..20971492f129 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_version.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0b3" diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_device_update.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_device_update.py index 062ebe9f58d6..79594d8a10d4 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_device_update.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/_device_update.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -16,19 +17,26 @@ from azure.core.credentials_async import AsyncTokenCredential from ._configuration import DeviceUpdateConfiguration +from .operations import DeviceUpdateOperationsMixin from .operations import AccountsOperations from .operations import InstancesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations from .operations import Operations from .. import models -class DeviceUpdate(object): +class DeviceUpdate(DeviceUpdateOperationsMixin): """Microsoft Device Update resource provider. :ivar accounts: AccountsOperations operations :vartype accounts: device_update.aio.operations.AccountsOperations :ivar instances: InstancesOperations operations :vartype instances: device_update.aio.operations.InstancesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: device_update.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: device_update.aio.operations.PrivateLinkResourcesOperations :ivar operations: Operations operations :vartype operations: device_update.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. @@ -53,15 +61,37 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.accounts = AccountsOperations( self._client, self._config, self._serialize, self._deserialize) self.instances = InstancesOperations( self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/__init__.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/__init__.py index c4feca15f14e..146a4bd8cde2 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/__init__.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/__init__.py @@ -6,12 +6,18 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._device_update_operations import DeviceUpdateOperationsMixin from ._accounts_operations import AccountsOperations from ._instances_operations import InstancesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._operations import Operations __all__ = [ + 'DeviceUpdateOperationsMixin', 'AccountsOperations', 'InstancesOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', 'Operations', ] diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_accounts_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_accounts_operations.py index a714226ee632..f967191d7b39 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_accounts_operations.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_accounts_operations.py @@ -45,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AccountList"]: """Returns list of Accounts. @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -113,7 +113,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AccountList"]: """Returns list of Accounts. @@ -170,7 +170,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -185,7 +185,7 @@ async def get( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> "_models.Account": """Returns account details for the given account name. @@ -211,7 +211,7 @@ async def get( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -229,7 +229,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Account', pipeline_response) @@ -240,12 +240,69 @@ async def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}'} # type: ignore + async def head( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> bool: + """Checks whether account exists. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + # Construct URL + url = self.head.metadata['url'] # type: ignore + 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'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.head(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + return 200 <= response.status_code <= 299 + head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}'} # type: ignore + async def _create_initial( self, resource_group_name: str, account_name: str, account: "_models.Account", - **kwargs + **kwargs: Any ) -> "_models.Account": cls = kwargs.pop('cls', None) # type: ClsType["_models.Account"] error_map = { @@ -261,7 +318,7 @@ async def _create_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -283,7 +340,7 @@ async def _create_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Account', pipeline_response) @@ -299,7 +356,7 @@ async def begin_create( resource_group_name: str, account_name: str, account: "_models.Account", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Account"]: """Creates or updates Account. @@ -311,8 +368,8 @@ async def begin_create( :type account: ~device_update.models.Account :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Account or the result of cls(response) @@ -348,7 +405,7 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -369,7 +426,7 @@ async def _delete_initial( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -384,7 +441,7 @@ async def _delete_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -402,7 +459,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -414,7 +471,7 @@ async def begin_delete( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes account. @@ -424,8 +481,8 @@ async def begin_delete( :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -457,7 +514,7 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -479,7 +536,7 @@ async def _update_initial( resource_group_name: str, account_name: str, account_update_payload: "_models.AccountUpdate", - **kwargs + **kwargs: Any ) -> "_models.Account": cls = kwargs.pop('cls', None) # type: ClsType["_models.Account"] error_map = { @@ -495,7 +552,7 @@ async def _update_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -515,12 +572,16 @@ async def _update_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Account', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('Account', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Account', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -533,7 +594,7 @@ async def begin_update( resource_group_name: str, account_name: str, account_update_payload: "_models.AccountUpdate", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Account"]: """Updates account's patchable properties. @@ -545,8 +606,8 @@ async def begin_update( :type account_update_payload: ~device_update.models.AccountUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Account or the result of cls(response) @@ -582,7 +643,7 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_device_update_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_device_update_operations.py new file mode 100644 index 000000000000..c754a490349f --- /dev/null +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_device_update_operations.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DeviceUpdateOperationsMixin: + + async def check_name_availability( + self, + request: "_models.CheckNameAvailabilityRequest", + **kwargs: Any + ) -> "_models.CheckNameAvailabilityResponse": + """Checks ADU resource name availability. + + :param request: Check Name Availability Request. + :type request: ~device_update.models.CheckNameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResponse, or the result of cls(response) + :rtype: ~device_update.models.CheckNameAvailabilityResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'CheckNameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DeviceUpdate/checknameavailability'} # type: ignore diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_instances_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_instances_operations.py index 6124217fbf9f..0604ce6017d0 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_instances_operations.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_instances_operations.py @@ -47,7 +47,7 @@ def list_by_account( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.InstanceList"]: """Returns instances for the given account name. @@ -79,7 +79,7 @@ def prepare_request(next_link=None): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -123,9 +123,9 @@ async def get( resource_group_name: str, account_name: str, instance_name: str, - **kwargs + **kwargs: Any ) -> "_models.Instance": - """Returns instances for the given account and instance name. + """Returns instance details for the given instance and account name. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -151,8 +151,8 @@ async def get( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -170,7 +170,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Instance', pipeline_response) @@ -181,13 +181,74 @@ async def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}'} # type: ignore + async def head( + self, + resource_group_name: str, + account_name: str, + instance_name: str, + **kwargs: Any + ) -> bool: + """Checks whether instance exists. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :param instance_name: Instance name. + :type instance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + # Construct URL + url = self.head.metadata['url'] # type: ignore + 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'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.head(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + return 200 <= response.status_code <= 299 + head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}'} # type: ignore + async def _create_initial( self, resource_group_name: str, account_name: str, instance_name: str, instance: "_models.Instance", - **kwargs + **kwargs: Any ) -> "_models.Instance": cls = kwargs.pop('cls', None) # type: ClsType["_models.Instance"] error_map = { @@ -203,8 +264,8 @@ async def _create_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -226,7 +287,7 @@ async def _create_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Instance', pipeline_response) @@ -243,7 +304,7 @@ async def begin_create( account_name: str, instance_name: str, instance: "_models.Instance", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Instance"]: """Creates or updates instance. @@ -257,8 +318,8 @@ async def begin_create( :type instance: ~device_update.models.Instance :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Instance or the result of cls(response) @@ -295,8 +356,8 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -318,7 +379,7 @@ async def _delete_initial( resource_group_name: str, account_name: str, instance_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -333,8 +394,8 @@ async def _delete_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -352,7 +413,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -365,7 +426,7 @@ async def begin_delete( resource_group_name: str, account_name: str, instance_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes instance. @@ -377,8 +438,8 @@ async def begin_delete( :type instance_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -411,8 +472,8 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -435,7 +496,7 @@ async def update( account_name: str, instance_name: str, tag_update_payload: "_models.TagUpdate", - **kwargs + **kwargs: Any ) -> "_models.Instance": """Updates instance's tags. @@ -466,8 +527,8 @@ async def update( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -489,7 +550,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Instance', pipeline_response) diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_operations.py index ce6a85c8f52f..12a0330e5981 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_operations.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Returns list of operations for Microsoft.DeviceUpdate resource provider. @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_private_endpoint_connections_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..c2ad44c416b3 --- /dev/null +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,434 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~device_update.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_account( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """List all private endpoint connections in a device update account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~device_update.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Get the specified private endpoint connection associated with the device update account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~device_update.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + account_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + private_endpoint_connection_name: str, + private_endpoint_connection: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: + """Update the state of specified private endpoint connection associated with the device update + account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + :type private_endpoint_connection: ~device_update.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~device_update.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + account_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + account_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private endpoint connection associated with the device update account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_private_link_resources_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..cbddb230ae1c --- /dev/null +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,180 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~device_update.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_account( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: + """List all private link resources in a device update account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~device_update.models.PrivateLinkResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateLinkResources'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + group_id: str, + **kwargs: Any + ) -> "_models.GroupInformation": + """Get the specified private link resource associated with the device update account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :param group_id: The group ID of the private link resource. + :type group_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GroupInformation, or the result of cls(response) + :rtype: ~device_update.models.GroupInformation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GroupInformation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'groupId': self._serialize.url("group_id", group_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GroupInformation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateLinkResources/{groupId}'} # type: ignore diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/__init__.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/__init__.py index a8e84a81654f..ad1ef395528f 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/__init__.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/__init__.py @@ -10,58 +10,119 @@ from ._models_py3 import Account from ._models_py3 import AccountList from ._models_py3 import AccountUpdate + from ._models_py3 import CheckNameAvailabilityRequest + from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import DiagnosticStorageProperties from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorDefinition + from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse + from ._models_py3 import GroupInformation + from ._models_py3 import GroupInformationProperties from ._models_py3 import Instance from ._models_py3 import InstanceList from ._models_py3 import IotHubSettings + from ._models_py3 import ManagedServiceIdentity from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationListResult + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkResourceProperties + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProxyResource from ._models_py3 import Resource + from ._models_py3 import SystemData from ._models_py3 import TagUpdate from ._models_py3 import TrackedResource + from ._models_py3 import UserAssignedIdentity except (SyntaxError, ImportError): from ._models import Account # type: ignore from ._models import AccountList # type: ignore from ._models import AccountUpdate # type: ignore + from ._models import CheckNameAvailabilityRequest # type: ignore + from ._models import CheckNameAvailabilityResponse # type: ignore + from ._models import DiagnosticStorageProperties # type: ignore from ._models import ErrorAdditionalInfo # type: ignore - from ._models import ErrorDefinition # type: ignore + from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore + from ._models import GroupInformation # type: ignore + from ._models import GroupInformationProperties # type: ignore from ._models import Instance # type: ignore from ._models import InstanceList # type: ignore from ._models import IotHubSettings # type: ignore + from ._models import ManagedServiceIdentity # type: ignore from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationListResult # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkResourceProperties # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import ProxyResource # type: ignore from ._models import Resource # type: ignore + from ._models import SystemData # type: ignore from ._models import TagUpdate # type: ignore from ._models import TrackedResource # type: ignore + from ._models import UserAssignedIdentity # type: ignore from ._device_update_enums import ( ActionType, + AuthenticationType, + CheckNameAvailabilityReason, + CreatedByType, + GroupIdProvisioningState, + ManagedServiceIdentityType, Origin, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, ProvisioningState, + PublicNetworkAccess, ) __all__ = [ 'Account', 'AccountList', 'AccountUpdate', + 'CheckNameAvailabilityRequest', + 'CheckNameAvailabilityResponse', + 'DiagnosticStorageProperties', 'ErrorAdditionalInfo', - 'ErrorDefinition', + 'ErrorDetail', 'ErrorResponse', + 'GroupInformation', + 'GroupInformationProperties', 'Instance', 'InstanceList', 'IotHubSettings', + 'ManagedServiceIdentity', 'Operation', 'OperationDisplay', 'OperationListResult', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResourceListResult', + 'PrivateLinkResourceProperties', + 'PrivateLinkServiceConnectionState', + 'ProxyResource', 'Resource', + 'SystemData', 'TagUpdate', 'TrackedResource', + 'UserAssignedIdentity', 'ActionType', + 'AuthenticationType', + 'CheckNameAvailabilityReason', + 'CreatedByType', + 'GroupIdProvisioningState', + 'ManagedServiceIdentityType', 'Origin', + 'PrivateEndpointConnectionProvisioningState', + 'PrivateEndpointServiceConnectionStatus', 'ProvisioningState', + 'PublicNetworkAccess', ] diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_device_update_enums.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_device_update_enums.py index 45bce9e24141..3acb30f980d0 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_device_update_enums.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_device_update_enums.py @@ -32,6 +32,46 @@ class ActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INTERNAL = "Internal" +class AuthenticationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Authentication Type + """ + + KEY_BASED = "KeyBased" + +class CheckNameAvailabilityReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The reason why the given name is not available. + """ + + INVALID = "Invalid" + ALREADY_EXISTS = "AlreadyExists" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class GroupIdProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The provisioning state of private link group ID. + """ + + SUCCEEDED = "Succeeded" + FAILED = "Failed" + CANCELED = "Canceled" + +class ManagedServiceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of managed service identity (where both SystemAssigned and UserAssigned types are + allowed). + """ + + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned,UserAssigned" + class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is "user,system" @@ -41,6 +81,23 @@ class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SYSTEM = "system" USER_SYSTEM = "user,system" +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + +class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private endpoint connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Provisioning state. """ @@ -51,3 +108,10 @@ class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): CANCELED = "Canceled" ACCEPTED = "Accepted" CREATING = "Creating" + +class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether or not public network access is allowed for the container registry. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_models.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_models.py index 3023dd9a2e0c..364bb6bf76f5 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_models.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_models.py @@ -23,18 +23,23 @@ class Resource(msrest.serialization.Model): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -45,6 +50,7 @@ def __init__( self.id = None self.name = None self.type = None + self.system_data = None class TrackedResource(Resource): @@ -62,6 +68,9 @@ class TrackedResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. @@ -72,6 +81,7 @@ class TrackedResource(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, } @@ -79,6 +89,7 @@ class TrackedResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, } @@ -107,21 +118,30 @@ class Account(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str + :param identity: The type of identity used for the resource. + :type identity: ~device_update.models.ManagedServiceIdentity :ivar provisioning_state: Provisioning state. Possible values include: "Succeeded", "Deleted", "Failed", "Canceled", "Accepted", "Creating". :vartype provisioning_state: str or ~device_update.models.ProvisioningState :ivar host_name: API host name. :vartype host_name: str + :param public_network_access: Whether or not public network access is allowed for the container + registry. Possible values include: "Enabled", "Disabled". Default value: "Enabled". + :type public_network_access: str or ~device_update.models.PublicNetworkAccess """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'host_name': {'readonly': True}, @@ -131,10 +151,13 @@ class Account(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__( @@ -142,8 +165,10 @@ def __init__( **kwargs ): super(Account, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) self.provisioning_state = None self.host_name = None + self.public_network_access = kwargs.get('public_network_access', "Enabled") class AccountList(msrest.serialization.Model): @@ -195,12 +220,15 @@ class AccountUpdate(TagUpdate): :param tags: A set of tags. List of key value pairs that describe the resource. This will overwrite the existing tags. :type tags: dict[str, str] + :param identity: The type of identity used for the resource. + :type identity: ~device_update.models.ManagedServiceIdentity :param location: The geo-location where the resource lives. :type location: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'location': {'key': 'location', 'type': 'str'}, } @@ -209,66 +237,127 @@ def __init__( **kwargs ): super(AccountUpdate, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) self.location = kwargs.get('location', None) -class ErrorAdditionalInfo(msrest.serialization.Model): - """The resource management error additional info. +class CheckNameAvailabilityRequest(msrest.serialization.Model): + """The check availability request body. - Variables are only populated by the server, and will be ignored when sending a request. + :param name: The name of the resource for which availability needs to be checked. + :type name: str + :param type: The resource type. + :type type: str + """ - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class CheckNameAvailabilityResponse(msrest.serialization.Model): + """The check availability result. + + :param name_available: Indicates if the resource name is available. + :type name_available: bool + :param reason: The reason why the given name is not available. Possible values include: + "Invalid", "AlreadyExists". + :type reason: str or ~device_update.models.CheckNameAvailabilityReason + :param message: Detailed reason why the given name is available. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + self.message = kwargs.get('message', None) + + +class DiagnosticStorageProperties(msrest.serialization.Model): + """Customer-initiated diagnostic log collection storage properties. + + All required parameters must be populated in order to send to Azure. + + :param authentication_type: Required. Authentication Type. Possible values include: "KeyBased". + :type authentication_type: str or ~device_update.models.AuthenticationType + :param connection_string: ConnectionString of the diagnostic storage account. + :type connection_string: str + :param resource_id: Required. ResourceId of the diagnostic storage account. + :type resource_id: str """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + 'authentication_type': {'required': True}, + 'resource_id': {'required': True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, } def __init__( self, **kwargs ): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None + super(DiagnosticStorageProperties, self).__init__(**kwargs) + self.authentication_type = kwargs['authentication_type'] + self.connection_string = kwargs.get('connection_string', None) + self.resource_id = kwargs['resource_id'] -class ErrorDefinition(msrest.serialization.Model): - """Error response indicates that the service is not able to process the incoming request. +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. - :ivar error: Error details. - :vartype error: ~device_update.models.ErrorResponse + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any """ _validation = { - 'error': {'readonly': True}, + 'type': {'readonly': True}, + 'info': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( self, **kwargs ): - super(ErrorDefinition, self).__init__(**kwargs) - self.error = None + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). +class ErrorDetail(msrest.serialization.Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -279,7 +368,7 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~device_update.models.ErrorResponse] + :vartype details: list[~device_update.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: list[~device_update.models.ErrorAdditionalInfo] """ @@ -296,7 +385,7 @@ class ErrorResponse(msrest.serialization.Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } @@ -304,7 +393,7 @@ def __init__( self, **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -312,6 +401,194 @@ def __init__( self.additional_info = None +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~device_update.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class GroupInformation(ProxyResource): + """The group information for creating a private endpoint on an Account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + :ivar provisioning_state: The provisioning state of private link group ID. Possible values + include: "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or ~device_update.models.GroupIdProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GroupInformation, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + self.provisioning_state = None + + +class PrivateLinkResourceProperties(msrest.serialization.Model): + """Properties of a private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class GroupInformationProperties(PrivateLinkResourceProperties): + """The properties for a group information object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + :ivar provisioning_state: The provisioning state of private link group ID. Possible values + include: "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or ~device_update.models.GroupIdProvisioningState + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GroupInformationProperties, self).__init__(**kwargs) + self.provisioning_state = None + + class Instance(TrackedResource): """Device Update instance details. @@ -327,6 +604,9 @@ class Instance(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. @@ -338,12 +618,18 @@ class Instance(TrackedResource): :vartype account_name: str :param iot_hubs: List of IoT Hubs associated with the account. :type iot_hubs: list[~device_update.models.IotHubSettings] + :param enable_diagnostics: Enables or Disables the diagnostic logs collection. + :type enable_diagnostics: bool + :param diagnostic_storage_properties: Customer-initiated diagnostic log collection storage + properties. + :type diagnostic_storage_properties: ~device_update.models.DiagnosticStorageProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'account_name': {'readonly': True}, @@ -353,11 +639,14 @@ class Instance(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'account_name': {'key': 'properties.accountName', 'type': 'str'}, 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHubSettings]'}, + 'enable_diagnostics': {'key': 'properties.enableDiagnostics', 'type': 'bool'}, + 'diagnostic_storage_properties': {'key': 'properties.diagnosticStorageProperties', 'type': 'DiagnosticStorageProperties'}, } def __init__( @@ -368,6 +657,8 @@ def __init__( self.provisioning_state = None self.account_name = None self.iot_hubs = kwargs.get('iot_hubs', None) + self.enable_diagnostics = kwargs.get('enable_diagnostics', None) + self.diagnostic_storage_properties = kwargs.get('diagnostic_storage_properties', None) class InstanceList(msrest.serialization.Model): @@ -426,6 +717,54 @@ def __init__( self.event_hub_connection_string = kwargs.get('event_hub_connection_string', None) +class ManagedServiceIdentity(msrest.serialization.Model): + """Managed service identity (system assigned and/or user assigned identities). + + 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. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. Type of managed service identity (where both SystemAssigned and + UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :type type: str or ~device_update.models.ManagedServiceIdentityType + :param user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :type user_assigned_identities: dict[str, ~device_update.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs['type'] + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + class Operation(msrest.serialization.Model): """Details of a REST API operation, returned from the Resource Provider Operations API. @@ -434,8 +773,8 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". :vartype name: str - :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for data- - plane operations and "false" for ARM/control-plane operations. + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for + data-plane operations and "false" for ARM/control-plane operations. :vartype is_data_action: bool :param display: Localized display information for this particular operation. :type display: ~device_update.models.OperationDisplay @@ -547,3 +886,226 @@ def __init__( super(OperationListResult, self).__init__(**kwargs) self.value = None self.next_link = None + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~device_update.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~device_update.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~device_update.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connection associated with the specified storage account. + + :param value: Array of private endpoint connections. + :type value: list[~device_update.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """The available private link resources for an Account. + + :param value: The list of available private link resources for an Account. + :type value: list[~device_update.models.GroupInformation] + :param next_link: The URI that can be used to request the next list of private link resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[GroupInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or ~device_update.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class SystemData(msrest.serialization.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 ~device_update.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~device_update.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 UserAssignedIdentity(msrest.serialization.Model): + """User assigned identity properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_models_py3.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_models_py3.py index 91b118bdc5c2..543fb00f5e55 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_models_py3.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/models/_models_py3.py @@ -6,11 +6,14 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional +import datetime +from typing import Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization +from ._device_update_enums import * + class Resource(msrest.serialization.Model): """Common fields that are returned in the response for all Azure Resource Manager resources. @@ -25,18 +28,23 @@ class Resource(msrest.serialization.Model): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -47,6 +55,7 @@ def __init__( self.id = None self.name = None self.type = None + self.system_data = None class TrackedResource(Resource): @@ -64,6 +73,9 @@ class TrackedResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. @@ -74,6 +86,7 @@ class TrackedResource(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, } @@ -81,6 +94,7 @@ class TrackedResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, } @@ -112,21 +126,30 @@ class Account(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str + :param identity: The type of identity used for the resource. + :type identity: ~device_update.models.ManagedServiceIdentity :ivar provisioning_state: Provisioning state. Possible values include: "Succeeded", "Deleted", "Failed", "Canceled", "Accepted", "Creating". :vartype provisioning_state: str or ~device_update.models.ProvisioningState :ivar host_name: API host name. :vartype host_name: str + :param public_network_access: Whether or not public network access is allowed for the container + registry. Possible values include: "Enabled", "Disabled". Default value: "Enabled". + :type public_network_access: str or ~device_update.models.PublicNetworkAccess """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'host_name': {'readonly': True}, @@ -136,10 +159,13 @@ class Account(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, } def __init__( @@ -147,11 +173,15 @@ def __init__( *, location: str, tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = "Enabled", **kwargs ): super(Account, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity self.provisioning_state = None self.host_name = None + self.public_network_access = public_network_access class AccountList(msrest.serialization.Model): @@ -208,12 +238,15 @@ class AccountUpdate(TagUpdate): :param tags: A set of tags. List of key value pairs that describe the resource. This will overwrite the existing tags. :type tags: dict[str, str] + :param identity: The type of identity used for the resource. + :type identity: ~device_update.models.ManagedServiceIdentity :param location: The geo-location where the resource lives. :type location: str """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, 'location': {'key': 'location', 'type': 'str'}, } @@ -221,70 +254,143 @@ def __init__( self, *, tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, location: Optional[str] = None, **kwargs ): super(AccountUpdate, self).__init__(tags=tags, **kwargs) + self.identity = identity self.location = location -class ErrorAdditionalInfo(msrest.serialization.Model): - """The resource management error additional info. +class CheckNameAvailabilityRequest(msrest.serialization.Model): + """The check availability request body. - Variables are only populated by the server, and will be ignored when sending a request. + :param name: The name of the resource for which availability needs to be checked. + :type name: str + :param type: The resource type. + :type type: str + """ - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: object + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[str] = None, + **kwargs + ): + super(CheckNameAvailabilityRequest, self).__init__(**kwargs) + self.name = name + self.type = type + + +class CheckNameAvailabilityResponse(msrest.serialization.Model): + """The check availability result. + + :param name_available: Indicates if the resource name is available. + :type name_available: bool + :param reason: The reason why the given name is not available. Possible values include: + "Invalid", "AlreadyExists". + :type reason: str or ~device_update.models.CheckNameAvailabilityReason + :param message: Detailed reason why the given name is available. + :type message: str + """ + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[Union[str, "CheckNameAvailabilityReason"]] = None, + message: Optional[str] = None, + **kwargs + ): + super(CheckNameAvailabilityResponse, self).__init__(**kwargs) + self.name_available = name_available + self.reason = reason + self.message = message + + +class DiagnosticStorageProperties(msrest.serialization.Model): + """Customer-initiated diagnostic log collection storage properties. + + All required parameters must be populated in order to send to Azure. + + :param authentication_type: Required. Authentication Type. Possible values include: "KeyBased". + :type authentication_type: str or ~device_update.models.AuthenticationType + :param connection_string: ConnectionString of the diagnostic storage account. + :type connection_string: str + :param resource_id: Required. ResourceId of the diagnostic storage account. + :type resource_id: str """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + 'authentication_type': {'required': True}, + 'resource_id': {'required': True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'object'}, + 'authentication_type': {'key': 'authenticationType', 'type': 'str'}, + 'connection_string': {'key': 'connectionString', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, } def __init__( self, + *, + authentication_type: Union[str, "AuthenticationType"], + resource_id: str, + connection_string: Optional[str] = None, **kwargs ): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None + super(DiagnosticStorageProperties, self).__init__(**kwargs) + self.authentication_type = authentication_type + self.connection_string = connection_string + self.resource_id = resource_id -class ErrorDefinition(msrest.serialization.Model): - """Error response indicates that the service is not able to process the incoming request. +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. - :ivar error: Error details. - :vartype error: ~device_update.models.ErrorResponse + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any """ _validation = { - 'error': {'readonly': True}, + 'type': {'readonly': True}, + 'info': {'readonly': True}, } _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorResponse'}, + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( self, **kwargs ): - super(ErrorDefinition, self).__init__(**kwargs) - self.error = None + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). +class ErrorDetail(msrest.serialization.Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. @@ -295,7 +401,7 @@ class ErrorResponse(msrest.serialization.Model): :ivar target: The error target. :vartype target: str :ivar details: The error details. - :vartype details: list[~device_update.models.ErrorResponse] + :vartype details: list[~device_update.models.ErrorDetail] :ivar additional_info: The error additional info. :vartype additional_info: list[~device_update.models.ErrorAdditionalInfo] """ @@ -312,7 +418,7 @@ class ErrorResponse(msrest.serialization.Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorResponse]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } @@ -320,7 +426,7 @@ def __init__( self, **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -328,6 +434,202 @@ def __init__( self.additional_info = None +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~device_update.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ProxyResource(Resource): + """The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + + +class GroupInformation(ProxyResource): + """The group information for creating a private endpoint on an Account. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + :ivar provisioning_state: The provisioning state of private link group ID. Possible values + include: "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or ~device_update.models.GroupIdProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(GroupInformation, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + self.provisioning_state = None + + +class PrivateLinkResourceProperties(msrest.serialization.Model): + """Properties of a private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResourceProperties, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class GroupInformationProperties(PrivateLinkResourceProperties): + """The properties for a group information object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + :ivar provisioning_state: The provisioning state of private link group ID. Possible values + include: "Succeeded", "Failed", "Canceled". + :vartype provisioning_state: str or ~device_update.models.GroupIdProvisioningState + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_members': {'key': 'requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'requiredZoneNames', 'type': '[str]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(GroupInformationProperties, self).__init__(required_zone_names=required_zone_names, **kwargs) + self.provisioning_state = None + + class Instance(TrackedResource): """Device Update instance details. @@ -343,6 +645,9 @@ class Instance(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. @@ -354,12 +659,18 @@ class Instance(TrackedResource): :vartype account_name: str :param iot_hubs: List of IoT Hubs associated with the account. :type iot_hubs: list[~device_update.models.IotHubSettings] + :param enable_diagnostics: Enables or Disables the diagnostic logs collection. + :type enable_diagnostics: bool + :param diagnostic_storage_properties: Customer-initiated diagnostic log collection storage + properties. + :type diagnostic_storage_properties: ~device_update.models.DiagnosticStorageProperties """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, 'provisioning_state': {'readonly': True}, 'account_name': {'readonly': True}, @@ -369,11 +680,14 @@ class Instance(TrackedResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'account_name': {'key': 'properties.accountName', 'type': 'str'}, 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHubSettings]'}, + 'enable_diagnostics': {'key': 'properties.enableDiagnostics', 'type': 'bool'}, + 'diagnostic_storage_properties': {'key': 'properties.diagnosticStorageProperties', 'type': 'DiagnosticStorageProperties'}, } def __init__( @@ -382,12 +696,16 @@ def __init__( location: str, tags: Optional[Dict[str, str]] = None, iot_hubs: Optional[List["IotHubSettings"]] = None, + enable_diagnostics: Optional[bool] = None, + diagnostic_storage_properties: Optional["DiagnosticStorageProperties"] = None, **kwargs ): super(Instance, self).__init__(tags=tags, location=location, **kwargs) self.provisioning_state = None self.account_name = None self.iot_hubs = iot_hubs + self.enable_diagnostics = enable_diagnostics + self.diagnostic_storage_properties = diagnostic_storage_properties class InstanceList(msrest.serialization.Model): @@ -453,6 +771,57 @@ def __init__( self.event_hub_connection_string = event_hub_connection_string +class ManagedServiceIdentity(msrest.serialization.Model): + """Managed service identity (system assigned and/or user assigned identities). + + 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. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. Type of managed service identity (where both SystemAssigned and + UserAssigned types are allowed). Possible values include: "None", "SystemAssigned", + "UserAssigned", "SystemAssigned,UserAssigned". + :type type: str or ~device_update.models.ManagedServiceIdentityType + :param user_assigned_identities: The set of user assigned identities associated with the + resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + The dictionary values can be empty objects ({}) in requests. + :type user_assigned_identities: dict[str, ~device_update.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + *, + type: Union[str, "ManagedServiceIdentityType"], + user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, + **kwargs + ): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + class Operation(msrest.serialization.Model): """Details of a REST API operation, returned from the Resource Provider Operations API. @@ -461,8 +830,8 @@ class Operation(msrest.serialization.Model): :ivar name: The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", "Microsoft.Compute/virtualMachines/capture/action". :vartype name: str - :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for data- - plane operations and "false" for ARM/control-plane operations. + :ivar is_data_action: Whether the operation applies to data-plane. This is "true" for + data-plane operations and "false" for ARM/control-plane operations. :vartype is_data_action: bool :param display: Localized display information for this particular operation. :type display: ~device_update.models.OperationDisplay @@ -576,3 +945,245 @@ def __init__( super(OperationListResult, self).__init__(**kwargs) self.value = None self.next_link = None + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~device_update.models.SystemData + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~device_update.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~device_update.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~device_update.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connection associated with the specified storage account. + + :param value: Array of private endpoint connections. + :type value: list[~device_update.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """The available private link resources for an Account. + + :param value: The list of available private link resources for an Account. + :type value: list[~device_update.models.GroupInformation] + :param next_link: The URI that can be used to request the next list of private link resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[GroupInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["GroupInformation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or ~device_update.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[str] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class SystemData(msrest.serialization.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 ~device_update.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~device_update.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 UserAssignedIdentity(msrest.serialization.Model): + """User assigned identity properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of the assigned identity. + :vartype principal_id: str + :ivar client_id: The client ID of the assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/__init__.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/__init__.py index c4feca15f14e..146a4bd8cde2 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/__init__.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/__init__.py @@ -6,12 +6,18 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._device_update_operations import DeviceUpdateOperationsMixin from ._accounts_operations import AccountsOperations from ._instances_operations import InstancesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._operations import Operations __all__ = [ + 'DeviceUpdateOperationsMixin', 'AccountsOperations', 'InstancesOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', 'Operations', ] diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_accounts_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_accounts_operations.py index 3c46c3707b89..9dfb515b2973 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_accounts_operations.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_accounts_operations.py @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -176,7 +176,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -218,7 +218,7 @@ def get( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -236,7 +236,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Account', pipeline_response) @@ -247,6 +247,64 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}'} # type: ignore + def head( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> bool + """Checks whether account exists. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + # Construct URL + url = self.head.metadata['url'] # type: ignore + 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'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.head(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + return 200 <= response.status_code <= 299 + head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}'} # type: ignore + def _create_initial( self, resource_group_name, # type: str @@ -269,7 +327,7 @@ def _create_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -291,7 +349,7 @@ def _create_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Account', pipeline_response) @@ -320,8 +378,8 @@ def begin_create( :type account: ~device_update.models.Account :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Account or the result of cls(response) @@ -357,7 +415,7 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -394,7 +452,7 @@ def _delete_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -412,7 +470,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -435,8 +493,8 @@ def begin_delete( :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -468,7 +526,7 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -507,7 +565,7 @@ def _update_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -527,12 +585,16 @@ def _update_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Account', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('Account', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Account', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -558,8 +620,8 @@ def begin_update( :type account_update_payload: ~device_update.models.AccountUpdate :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Account or the result of cls(response) @@ -595,7 +657,7 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_device_update_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_device_update_operations.py new file mode 100644 index 000000000000..cdc65c0c72ea --- /dev/null +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_device_update_operations.py @@ -0,0 +1,85 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DeviceUpdateOperationsMixin(object): + + def check_name_availability( + self, + request, # type: "_models.CheckNameAvailabilityRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameAvailabilityResponse" + """Checks ADU resource name availability. + + :param request: Check Name Availability Request. + :type request: ~device_update.models.CheckNameAvailabilityRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResponse, or the result of cls(response) + :rtype: ~device_update.models.CheckNameAvailabilityResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'CheckNameAvailabilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.DeviceUpdate/checknameavailability'} # type: ignore diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py index 1aca3641c2cd..f759291a9b88 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_instances_operations.py @@ -84,7 +84,7 @@ def prepare_request(next_link=None): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -131,7 +131,7 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.Instance" - """Returns instances for the given account and instance name. + """Returns instance details for the given instance and account name. :param resource_group_name: The resource group name. :type resource_group_name: str @@ -157,8 +157,8 @@ def get( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -176,7 +176,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Instance', pipeline_response) @@ -187,6 +187,68 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}'} # type: ignore + def head( + self, + resource_group_name, # type: str + account_name, # type: str + instance_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> bool + """Checks whether instance exists. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :param instance_name: Instance name. + :type instance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: bool, or the result of cls(response) + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + # Construct URL + url = self.head.metadata['url'] # type: ignore + 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'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.head(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + return 200 <= response.status_code <= 299 + head.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/instances/{instanceName}'} # type: ignore + def _create_initial( self, resource_group_name, # type: str @@ -210,8 +272,8 @@ def _create_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -233,7 +295,7 @@ def _create_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Instance', pipeline_response) @@ -265,8 +327,8 @@ def begin_create( :type instance: ~device_update.models.Instance :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Instance or the result of cls(response) @@ -303,8 +365,8 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) @@ -342,8 +404,8 @@ def _delete_initial( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -361,7 +423,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -387,8 +449,8 @@ def begin_delete( :type instance_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -421,8 +483,8 @@ def get_long_running_output(pipeline_response): 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -477,8 +539,8 @@ def update( 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'), - 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), - 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z][A-Za-z0-9]+$'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'instanceName': self._serialize.url("instance_name", instance_name, 'str', max_length=36, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) @@ -500,7 +562,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Instance', pipeline_response) diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_operations.py index b7cf219d43f1..a098dc58f974 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_operations.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_operations.py @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorDefinition, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_endpoint_connections_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..f025f557f14a --- /dev/null +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,444 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~device_update.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_account( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """List all private endpoint connections in a device update account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~device_update.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_account.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Get the specified private endpoint connection associated with the device update account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~device_update.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + account_name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_connection, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(private_endpoint_connection, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + account_name, # type: str + private_endpoint_connection_name, # type: str + private_endpoint_connection, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + """Update the state of specified private endpoint connection associated with the device update + account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :param private_endpoint_connection: The parameters for creating a private endpoint connection. + :type private_endpoint_connection: ~device_update.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~device_update.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + private_endpoint_connection_name=private_endpoint_connection_name, + private_endpoint_connection=private_endpoint_connection, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + account_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-03-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + account_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified private endpoint connection associated with the device update account. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param account_name: Account name. + :type account_name: str + :param private_endpoint_connection_name: The name of the private endpoint connection associated + with the Azure resource. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + account_name=account_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_backend_address_pools_operations.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_link_resources_operations.py similarity index 67% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_backend_address_pools_operations.py rename to sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_link_resources_operations.py index 03d587099d2d..38e0ec2bb961 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_backend_address_pools_operations.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/azure/mgmt/deviceupdate/operations/_private_link_resources_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerBackendAddressPoolsOperations(object): - """LoadBalancerBackendAddressPoolsOperations operations. +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~device_update.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,31 +45,31 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def list( + def list_by_account( self, resource_group_name, # type: str - load_balancer_name, # type: str + account_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerBackendAddressPoolListResult"] - """Gets all the load balancer backed address pools. + # type: (...) -> Iterable["_models.PrivateLinkResourceListResult"] + """List all private link resources in a device update account. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param account_name: Account name. + :type account_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerBackendAddressPoolListResult] + :return: An iterator like instance of either PrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~device_update.models.PrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2020-03-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -78,11 +78,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_account.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -97,11 +97,11 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerBackendAddressPoolListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + return None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -110,52 +110,53 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools'} # type: ignore + list_by_account.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateLinkResources'} # type: ignore def get( self, resource_group_name, # type: str - load_balancer_name, # type: str - backend_address_pool_name, # type: str + account_name, # type: str + group_id, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.BackendAddressPool" - """Gets load balancer backend address pool. + # type: (...) -> "_models.GroupInformation" + """Get the specified private link resource associated with the device update account. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. - :type backend_address_pool_name: str + :param account_name: Account name. + :type account_name: str + :param group_id: The group ID of the private link resource. + :type group_id: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackendAddressPool, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.BackendAddressPool + :return: GroupInformation, or the result of cls(response) + :rtype: ~device_update.models.GroupInformation :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.GroupInformation"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2020-03-01-preview" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'accountName': self._serialize.url("account_name", account_name, 'str', max_length=24, min_length=3, pattern=r'^[A-Za-z0-9]+(-[A-Za-z0-9]+)*$'), + 'groupId': self._serialize.url("group_id", group_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -173,12 +174,13 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('BackendAddressPool', pipeline_response) + deserialized = self._deserialize('GroupInformation', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DeviceUpdate/accounts/{accountName}/privateLinkResources/{groupId}'} # type: ignore diff --git a/sdk/deviceupdate/azure-mgmt-deviceupdate/setup.py b/sdk/deviceupdate/azure-mgmt-deviceupdate/setup.py index 0490e8359b0c..0aa2377fa894 100644 --- a/sdk/deviceupdate/azure-mgmt-deviceupdate/setup.py +++ b/sdk/deviceupdate/azure-mgmt-deviceupdate/setup.py @@ -81,7 +81,7 @@ 'azure.mgmt', ]), install_requires=[ - 'msrest>=0.5.0', + 'msrest>=0.6.21', 'azure-mgmt-core>=1.2.0,<2.0.0', 'azure-common~=1.1', ], diff --git a/sdk/digitaltwins/tests.yml b/sdk/digitaltwins/tests.yml index 8832d1f01e0e..9063851bebe1 100644 --- a/sdk/digitaltwins/tests.yml +++ b/sdk/digitaltwins/tests.yml @@ -1,13 +1,12 @@ trigger: none stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml + - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' - BuildTargetingString: $(BuildTargetingString) + BuildTargetingString: azure-digitaltwins-core ServiceDirectory: digitaltwins EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + AZURE_CLIENT_ID: $(DIGITALTWINS_CLIENT_ID) + AZURE_CLIENT_SECRET: $(DIGITALTWINS_CLIENT_SECRET) + AZURE_TENANT_ID: $(DIGITALTWINS_TENANT_ID) TEST_MODE: 'RunLiveNoRecord' diff --git a/sdk/eventgrid/azure-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-eventgrid/CHANGELOG.md index b99ca3811664..6f71310deefd 100644 --- a/sdk/eventgrid/azure-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-eventgrid/CHANGELOG.md @@ -1,10 +1,10 @@ # Release History -## 4.6.1 (Unreleased) +## 4.7.0 (2021-11-09) ### Features Added -- Added new enum values to `SystemEvents`. +- Added support for publishing native CNCF cloudevents (https://pypi.org/project/cloudevents/). ## 4.6.0 (2021-10-05) diff --git a/sdk/eventgrid/azure-eventgrid/README.md b/sdk/eventgrid/azure-eventgrid/README.md index b290ce62a50d..5dc904f3df90 100644 --- a/sdk/eventgrid/azure-eventgrid/README.md +++ b/sdk/eventgrid/azure-eventgrid/README.md @@ -144,6 +144,19 @@ For complete list of recognizable system topics, visit [System Topics](https://d Event Grid on Kubernetes with Azure Arc is an offering that allows you to run Event Grid on your own Kubernetes cluster. This capability is enabled by the use of Azure Arc enabled Kubernetes. Through Azure Arc enabled Kubernetes, a supported Kubernetes cluster connects to Azure. Once connected, you are able to install Event Grid on it. Learn more about it [here](https://docs.microsoft.com/azure/event-grid/kubernetes/overview). +### Support for CNCF Cloud Events + +Starting with v4.7.0, this package also supports publishing a CNCF cloud event from https://pypi.org/project/cloudevents/. You would be able to pass a CloudEvent object from this library to the `send` API. + +```python + +from cloudevents.http import CloudEvent + +event = CloudEvent(...) + +client.send(event) +``` + ## Examples The following sections provide several code snippets covering some of the most common Event Grid tasks, including: diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_helpers.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_helpers.py index 8c51aafffafc..f7c7bd272ad7 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_helpers.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_helpers.py @@ -15,6 +15,7 @@ from urllib2 import quote # type: ignore from msrest import Serializer +from azure.core.exceptions import raise_with_traceback from azure.core.pipeline.transport import HttpRequest from azure.core.pipeline.policies import AzureKeyCredentialPolicy, BearerTokenCredentialPolicy from azure.core.credentials import AzureKeyCredential, AzureSasCredential @@ -98,7 +99,6 @@ def _is_cloud_event(event): except TypeError: return False - def _is_eventgrid_event(event): # type: (Any) -> bool required = ("subject", "eventType", "data", "dataVersion", "id", "eventTime") @@ -142,6 +142,22 @@ def _cloud_event_to_generated(cloud_event, **kwargs): **kwargs ) +def _from_cncf_events(event): + """This takes in a CNCF cloudevent and returns a dictionary. + If cloud events library is not installed, the event is returned back. + """ + try: + from cloudevents.http import to_json + return json.loads(to_json(event)) + except (AttributeError, ImportError): + # means this is not a CNCF event + return event + except Exception as err: # pylint: disable=broad-except + msg = """Failed to serialize the event. Please ensure your + CloudEvents is correctly formatted (https://pypi.org/project/cloudevents/)""" + raise_with_traceback(ValueError, msg, err) + + def _build_request(endpoint, content_type, events): serialize = Serializer() header_parameters = {} # type: Dict[str, Any] diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_publisher_client.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_publisher_client.py index 8878454999cc..2ae93b069535 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_publisher_client.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_publisher_client.py @@ -31,6 +31,7 @@ _eventgrid_data_typecheck, _build_request, _cloud_event_to_generated, + _from_cncf_events, ) from ._generated._event_grid_publisher_client import ( EventGridPublisherClient as EventGridPublisherClientImpl, @@ -192,7 +193,10 @@ def send(self, events, **kwargs): for e in events # pylint: disable=protected-access ] except AttributeError: - pass # means it's a dictionary + ## this is either a dictionary or a CNCF cloud event + events = [ + _from_cncf_events(e) for e in events + ] content_type = "application/cloudevents-batch+json; charset=utf-8" elif isinstance(events[0], EventGridEvent) or _is_eventgrid_event(events[0]): for event in events: diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py index 766cedfaf631..c9179def3a58 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/_version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "4.6.1" +VERSION = "4.7.0" diff --git a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_publisher_client_async.py b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_publisher_client_async.py index b2cb0faa33c4..59f77c03c18d 100644 --- a/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_publisher_client_async.py +++ b/sdk/eventgrid/azure-eventgrid/azure/eventgrid/aio/_publisher_client_async.py @@ -33,6 +33,7 @@ _build_request, _cloud_event_to_generated, _get_authentication_policy, + _from_cncf_events, ) from .._generated.aio import EventGridPublisherClient as EventGridPublisherClientAsync from .._version import VERSION @@ -192,7 +193,10 @@ async def send(self, events: SendType, **kwargs: Any) -> None: for e in events # pylint: disable=protected-access ] except AttributeError: - pass # means it's a dictionary + ## this is either a dictionary or a CNCF cloud event + events = [ + _from_cncf_events(e) for e in events + ] content_type = "application/cloudevents-batch+json; charset=utf-8" elif isinstance(events[0], EventGridEvent) or _is_eventgrid_event(events[0]): for event in events: diff --git a/sdk/eventgrid/azure-eventgrid/dev_requirements.txt b/sdk/eventgrid/azure-eventgrid/dev_requirements.txt index 3f90c92310b6..8d5bbfd7a2d5 100644 --- a/sdk/eventgrid/azure-eventgrid/dev_requirements.txt +++ b/sdk/eventgrid/azure-eventgrid/dev_requirements.txt @@ -4,4 +4,5 @@ -e ../../identity/azure-identity -e ../azure-mgmt-eventgrid azure-storage-queue +cloudevents<=2.0.0; python_version >= "3.6" aiohttp>=3.0; python_version >= '3.5' diff --git a/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_cncf_cloud_events_async.py b/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_cncf_cloud_events_async.py new file mode 100644 index 000000000000..24b25a3c7d65 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/async_samples/sample_publish_cncf_cloud_events_async.py @@ -0,0 +1,43 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: sample_publish_cncf_cloud_events_async.py +DESCRIPTION: + This sample demonstrates creating sending a cloud event from the CNCF library. +USAGE: + python sample_publish_cncf_cloud_events_async.py + Set the environment variables with your own values before running the sample: + 1) CLOUD_ACCESS_KEY - The access key of your eventgrid account. + 2) CLOUD_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "https://..eventgrid.azure.net/api/events". +""" +import os +import asyncio +from azure.eventgrid.aio import EventGridPublisherClient +from azure.core.credentials import AzureKeyCredential +from cloudevents.http import CloudEvent + +topic_key = os.environ["CLOUD_ACCESS_KEY"] +endpoint = os.environ["CLOUD_TOPIC_HOSTNAME"] + + +async def publish(): + + credential = AzureKeyCredential(topic_key) + client = EventGridPublisherClient(endpoint, credential) + await client.send([ + CloudEvent( + attributes={ + "type": "cloudevent", + "source": "/cncf/cloud/event/1.0", + "subject": "testingcncfevent" + }, + data=b'This is a cncf cloud event.', + ) + ]) + +if __name__ == '__main__': + asyncio.run(publish()) diff --git a/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_cncf_cloud_events.py b/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_cncf_cloud_events.py new file mode 100644 index 000000000000..bff5bee56221 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/samples/sync_samples/sample_publish_cncf_cloud_events.py @@ -0,0 +1,37 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +""" +FILE: sample_publish_cncf_cloud_events.py +DESCRIPTION: + This sample demonstrates creating sending a cloud event from the CNCF library. +USAGE: + python sample_publish_cncf_cloud_events.py + Set the environment variables with your own values before running the sample: + 1) CLOUD_ACCESS_KEY - The access key of your eventgrid account. + 2) CLOUD_TOPIC_HOSTNAME - The topic hostname. Typically it exists in the format + "https://..eventgrid.azure.net/api/events". +""" +import os +from azure.eventgrid import EventGridPublisherClient +from azure.core.credentials import AzureKeyCredential +from cloudevents.http import CloudEvent + +topic_key = os.environ["CLOUD_ACCESS_KEY"] +endpoint = os.environ["CLOUD_TOPIC_HOSTNAME"] + +credential = AzureKeyCredential(topic_key) +client = EventGridPublisherClient(endpoint, credential) + +client.send([ + CloudEvent( + attributes={ + "type": "cloudevent", + "source": "/cncf/cloud/event/1.0", + "subject": "testingcncfevent" + }, + data=b'This is a cncf cloud event.', + ) +]) diff --git a/sdk/eventgrid/azure-eventgrid/tests/conftest.py b/sdk/eventgrid/azure-eventgrid/tests/conftest.py index 2e685fe040dd..6ac5502e2b89 100644 --- a/sdk/eventgrid/azure-eventgrid/tests/conftest.py +++ b/sdk/eventgrid/azure-eventgrid/tests/conftest.py @@ -31,3 +31,4 @@ collect_ignore_glob = [] if sys.version_info < (3, 5): collect_ignore_glob.append("*_async.py") + collect_ignore_glob.append("test_cncf*") diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_as_list.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_as_list.yaml new file mode 100644 index 000000000000..f96bbe12ff13 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_as_list.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "84b41e66-8127-4f46-850e-d62e8386e87e", "time": + "2021-10-25T03:07:58.245751+00:00", "data": "hello world"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '220' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Mon, 25 Oct 2021 03:07:57 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_base64_using_data.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_base64_using_data.yaml new file mode 100644 index 000000000000..b472fd4927a4 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_base64_using_data.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "630d2dfe-6a48-455b-bd59-7c08cd070226", "time": + "2021-10-25T03:07:58.780277+00:00", "data_base64": "b''hello world''"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '230' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Mon, 25 Oct 2021 03:07:58 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_dict.yaml new file mode 100644 index 000000000000..a4a9d8fb97a9 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_dict.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "f687bede-e758-4bbd-aec9-d3f284b92238", "time": + "2021-10-25T03:07:59.100133+00:00", "data": {"message": "Hello World!"}}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '234' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Mon, 25 Oct 2021 03:07:59 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_none.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_none.yaml new file mode 100644 index 000000000000..dd845acb4e6e --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_none.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "0adea5e4-44e6-4c88-83f2-ab009c09ac43", "time": + "2021-10-25T03:07:59.496961+00:00", "data": null}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '211' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Mon, 25 Oct 2021 03:07:59 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_str.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_str.yaml new file mode 100644 index 000000000000..27c9e9babb74 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_str.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "5e41b091-7dea-4f94-a483-5d28846050b1", "time": + "2021-10-25T03:07:59.815085+00:00", "data": "hello world"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '220' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Mon, 25 Oct 2021 03:07:59 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_with_extensions.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_with_extensions.yaml new file mode 100644 index 000000000000..1277587dff0a --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events.test_send_cloud_event_data_with_extensions.yaml @@ -0,0 +1,38 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "ext1": "extension", "specversion": "1.0", "id": "c55886a8-b944-4f73-acd7-a309323f07ed", + "time": "2021-10-25T03:08:00.178627+00:00", "data": "hello world"}]' + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '241' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgrid/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2018-01-01' + content-length: + - '0' + date: + - Mon, 25 Oct 2021 03:07:59 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_as_list.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_as_list.yaml new file mode 100644 index 000000000000..50e2b52dd3f2 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_as_list.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "2048d6b4-fd6e-43c1-8b21-bf5d0fac8100", "time": + "2021-10-25T03:08:54.519646+00:00", "data": "hello world"}]' + headers: + Content-Length: + - '220' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Mon, 25 Oct 2021 03:08:55 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestpwti6z.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_base64_using_data.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_base64_using_data.yaml new file mode 100644 index 000000000000..b1bf0b301b7b --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_base64_using_data.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "d9467f83-a523-4dce-a4ef-65d8d3c03e1b", "time": + "2021-10-25T03:08:55.027961+00:00", "data_base64": "b''hello world''"}]' + headers: + Content-Length: + - '230' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Mon, 25 Oct 2021 03:08:55 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestpwti6z.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_dict.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_dict.yaml new file mode 100644 index 000000000000..1203fea626e9 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_dict.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "e281a27b-9da4-4714-a9a5-837f2684fd3a", "time": + "2021-10-25T03:08:55.227972+00:00", "data": {"message": "Hello World!"}}]' + headers: + Content-Length: + - '234' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Mon, 25 Oct 2021 03:08:55 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestpwti6z.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_none.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_none.yaml new file mode 100644 index 000000000000..3923b07a8cee --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_none.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "0b0b96a4-b764-41b4-81a9-431c894e0739", "time": + "2021-10-25T03:08:55.587395+00:00", "data": null}]' + headers: + Content-Length: + - '211' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Mon, 25 Oct 2021 03:08:55 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestpwti6z.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_str.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_str.yaml new file mode 100644 index 000000000000..d2a169aa567e --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_str.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "specversion": "1.0", "id": "26d60fa4-2290-4222-8362-7ced528cc96b", "time": + "2021-10-25T03:08:55.916341+00:00", "data": "hello world"}]' + headers: + Content-Length: + - '220' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Mon, 25 Oct 2021 03:08:56 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestpwti6z.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_with_extensions.yaml b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_with_extensions.yaml new file mode 100644 index 000000000000..276b1b08010c --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/recordings/test_cncf_events_async.test_send_cloud_event_data_with_extensions.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '[{"type": "com.example.sampletype1", "source": "https://example.com/event-producer", + "ext1": "extension", "specversion": "1.0", "id": "5aca51d6-0b0c-478b-b479-c86bfc16ff61", + "time": "2021-10-25T03:08:56.295866+00:00", "data": "hello world"}]' + headers: + Content-Length: + - '241' + Content-Type: + - application/cloudevents-batch+json; charset=utf-8 + User-Agent: + - azsdk-python-eventgridpublisherclient/4.7.0 Python/3.7.3 (Windows-10-10.0.18362-SP0) + method: POST + uri: https://cloudeventgridtestegtopic.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 + response: + body: + string: '' + headers: + api-supported-versions: '2018-01-01' + content-length: '0' + date: Mon, 25 Oct 2021 03:08:56 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://cloudeventgridtestpwti6z.westus-1.eventgrid.azure.net/api/events?api-version=2018-01-01 +version: 1 diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_cncf_events.py b/sdk/eventgrid/azure-eventgrid/tests/test_cncf_events.py new file mode 100644 index 000000000000..c02667d4318d --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/test_cncf_events.py @@ -0,0 +1,110 @@ + +import json +from devtools_testutils import AzureTestCase, CachedResourceGroupPreparer + +from azure_devtools.scenario_tests import ReplayableTest +from azure.core.credentials import AzureKeyCredential, AzureSasCredential +from azure.eventgrid import EventGridPublisherClient +from cloudevents.http import CloudEvent + +from eventgrid_preparer import ( + CachedEventGridTopicPreparer, +) + +class EventGridPublisherClientTests(AzureTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['aeg-sas-key', 'aeg-sas-token'] + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_dict(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = {"message": "Hello World!"} + cloud_event = CloudEvent(attributes, data) + def callback(request): + req = json.loads(request.http_request.body) + assert req[0].get("data") is not None + assert isinstance(req[0], dict) + assert req[0].get("type") == "com.example.sampletype1" + assert req[0].get("source") == "https://example.com/event-producer" + + client.send(cloud_event, raw_request_hook=callback) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_base64_using_data(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = b'hello world' + cloud_event = CloudEvent(attributes, data) + def callback(request): + req = json.loads(request.http_request.body) + assert req[0].get("data_base64") is not None + assert req[0].get("data") is None + + client.send(cloud_event, raw_request_hook=callback) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_none(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = None + cloud_event = CloudEvent(attributes, data) + client.send(cloud_event) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_str(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = "hello world" + def callback(request): + req = json.loads(request.http_request.body) + assert req[0].get("data_base64") is None + assert req[0].get("data") is not None + cloud_event = CloudEvent(attributes, data) + client.send(cloud_event, raw_request_hook=callback) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_as_list(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = "hello world" + cloud_event = CloudEvent(attributes, data) + client.send([cloud_event]) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + def test_send_cloud_event_data_with_extensions(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + "ext1": "extension" + } + data = "hello world" + cloud_event = CloudEvent(attributes, data) + client.send([cloud_event]) \ No newline at end of file diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_cncf_events_async.py b/sdk/eventgrid/azure-eventgrid/tests/test_cncf_events_async.py new file mode 100644 index 000000000000..156734112480 --- /dev/null +++ b/sdk/eventgrid/azure-eventgrid/tests/test_cncf_events_async.py @@ -0,0 +1,118 @@ + +import json +import pytest +from devtools_testutils import AzureTestCase, CachedResourceGroupPreparer + +from azure_devtools.scenario_tests import ReplayableTest +from azure.core.credentials import AzureKeyCredential, AzureSasCredential +from azure.eventgrid.aio import EventGridPublisherClient +from cloudevents.http import CloudEvent + +from eventgrid_preparer import ( + CachedEventGridTopicPreparer, +) + +class EventGridPublisherClientTests(AzureTestCase): + FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['aeg-sas-key', 'aeg-sas-token'] + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_dict(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = {"message": "Hello World!"} + cloud_event = CloudEvent(attributes, data) + def callback(request): + req = json.loads(request.http_request.body) + assert req[0].get("data") is not None + assert isinstance(req[0], dict) + assert req[0].get("type") == "com.example.sampletype1" + assert req[0].get("source") == "https://example.com/event-producer" + + await client.send(cloud_event, raw_request_hook=callback) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_base64_using_data(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = b'hello world' + cloud_event = CloudEvent(attributes, data) + def callback(request): + req = json.loads(request.http_request.body) + assert req[0].get("data_base64") is not None + assert req[0].get("data") is None + + await client.send(cloud_event, raw_request_hook=callback) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_none(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = None + cloud_event = CloudEvent(attributes, data) + await client.send(cloud_event) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_str(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = "hello world" + cloud_event = CloudEvent(attributes, data) + def callback(request): + req = json.loads(request.http_request.body) + assert req[0].get("data_base64") is None + assert req[0].get("data") is not None + + await client.send(cloud_event, raw_request_hook=callback) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_as_list(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + } + data = "hello world" + cloud_event = CloudEvent(attributes, data) + await client.send([cloud_event]) + + @CachedResourceGroupPreparer(name_prefix='eventgridtest') + @CachedEventGridTopicPreparer(name_prefix='cloudeventgridtest') + @pytest.mark.asyncio + async def test_send_cloud_event_data_with_extensions(self, resource_group, eventgrid_topic, eventgrid_topic_primary_key, eventgrid_topic_endpoint): + akc_credential = AzureKeyCredential(eventgrid_topic_primary_key) + client = EventGridPublisherClient(eventgrid_topic_endpoint, akc_credential) + attributes = { + "type": "com.example.sampletype1", + "source": "https://example.com/event-producer", + "ext1": "extension" + } + data = "hello world" + cloud_event = CloudEvent(attributes, data) + await client.send([cloud_event]) diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client.py b/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client.py index 3651363c2435..735d58ba74e7 100644 --- a/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client.py +++ b/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client.py @@ -19,7 +19,7 @@ except ImportError: from urlparse import urlparse -from devtools_testutils import AzureMgmtTestCase, CachedResourceGroupPreparer +from devtools_testutils import AzureTestCase, CachedResourceGroupPreparer from azure_devtools.scenario_tests import ReplayableTest from azure.core.credentials import AzureKeyCredential, AzureSasCredential @@ -32,7 +32,7 @@ CachedEventGridTopicPreparer, ) -class EventGridPublisherClientTests(AzureMgmtTestCase): +class EventGridPublisherClientTests(AzureTestCase): FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['aeg-sas-key', 'aeg-sas-token'] @CachedResourceGroupPreparer(name_prefix='eventgridtest') diff --git a/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client_async.py b/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client_async.py index b2ec715a6a65..0483fd9328b7 100644 --- a/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client_async.py +++ b/sdk/eventgrid/azure-eventgrid/tests/test_eg_publisher_client_async.py @@ -15,7 +15,7 @@ from urllib.parse import urlparse import datetime as dt -from devtools_testutils import AzureMgmtTestCase, CachedResourceGroupPreparer +from devtools_testutils import AzureTestCase, CachedResourceGroupPreparer from azure_devtools.scenario_tests import ReplayableTest from azure.core.credentials import AzureKeyCredential, AzureSasCredential @@ -30,7 +30,7 @@ ) -class EventGridPublisherClientTests(AzureMgmtTestCase): +class EventGridPublisherClientTests(AzureTestCase): FILTER_HEADERS = ReplayableTest.FILTER_HEADERS + ['aeg-sas-key', 'aeg-sas-token'] @CachedResourceGroupPreparer(name_prefix='eventgridtest') diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md index e4a575ed3418..8b3f6f391f36 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md +++ b/sdk/eventgrid/azure-mgmt-eventgrid/CHANGELOG.md @@ -1,5 +1,33 @@ # Release History +## 10.0.0 (2021-10-21) + +**Features** + + - Model Domain has a new parameter disable_local_auth + - Model Domain has a new parameter auto_delete_topic_with_last_subscription + - Model Domain has a new parameter auto_create_topic_with_first_subscription + - Model Topic has a new parameter disable_local_auth + - Model DomainUpdateParameters has a new parameter disable_local_auth + - Model DomainUpdateParameters has a new parameter auto_delete_topic_with_last_subscription + - Model DomainUpdateParameters has a new parameter auto_create_topic_with_first_subscription + - Model ExtensionTopic has a new parameter system_data + - Model TopicUpdateParameters has a new parameter disable_local_auth + +**Breaking changes** + + - Model Domain no longer has parameter sku + - Model Topic no longer has parameter sku + - Model Topic no longer has parameter extended_location + - Model Topic no longer has parameter kind + - Model DomainUpdateParameters no longer has parameter sku + - Model TopicUpdateParameters no longer has parameter sku + - Removed operation group EventChannelsOperations + - Removed operation group PartnerRegistrationsOperations + - Removed operation group PartnerTopicEventSubscriptionsOperations + - Removed operation group PartnerNamespacesOperations + - Removed operation group PartnerTopicsOperations + ## 9.0.0 (2021-05-24) **Features** diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json b/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json index 34ddba05985a..0e48c08287d4 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json +++ b/sdk/eventgrid/azure-mgmt-eventgrid/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.4.2", + "autorest": "3.4.5", "use": [ - "@autorest/python@5.8.0", - "@autorest/modelerfour@4.19.1" + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" ], - "commit": "b554b6d3497ef8a9eff147f94a5d47ba4eeb7a34", + "commit": "2f9b3758c1308560dd4ca2bebe112e9da9ac227f", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/eventgrid/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.1 --version=3.4.2", + "autorest_command": "autorest specification/eventgrid/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/eventgrid/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py index a8ee2ef07687..10ca73711dcc 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-10-15-preview" + self.api_version = "2021-12-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-eventgrid/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py index 8a09a58f9301..9033fb0bda0d 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_event_grid_management_client.py @@ -21,18 +21,13 @@ from ._configuration import EventGridManagementClientConfiguration from .operations import DomainsOperations from .operations import DomainTopicsOperations -from .operations import EventChannelsOperations from .operations import EventSubscriptionsOperations from .operations import SystemTopicEventSubscriptionsOperations -from .operations import PartnerTopicEventSubscriptionsOperations from .operations import Operations -from .operations import PartnerNamespacesOperations -from .operations import PartnerRegistrationsOperations -from .operations import PartnerTopicsOperations +from .operations import TopicsOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations from .operations import SystemTopicsOperations -from .operations import TopicsOperations from .operations import ExtensionTopicsOperations from .operations import TopicTypesOperations from . import models @@ -45,30 +40,20 @@ class EventGridManagementClient(object): :vartype domains: azure.mgmt.eventgrid.operations.DomainsOperations :ivar domain_topics: DomainTopicsOperations operations :vartype domain_topics: azure.mgmt.eventgrid.operations.DomainTopicsOperations - :ivar event_channels: EventChannelsOperations operations - :vartype event_channels: azure.mgmt.eventgrid.operations.EventChannelsOperations :ivar event_subscriptions: EventSubscriptionsOperations operations :vartype event_subscriptions: azure.mgmt.eventgrid.operations.EventSubscriptionsOperations :ivar system_topic_event_subscriptions: SystemTopicEventSubscriptionsOperations operations :vartype system_topic_event_subscriptions: azure.mgmt.eventgrid.operations.SystemTopicEventSubscriptionsOperations - :ivar partner_topic_event_subscriptions: PartnerTopicEventSubscriptionsOperations operations - :vartype partner_topic_event_subscriptions: azure.mgmt.eventgrid.operations.PartnerTopicEventSubscriptionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.eventgrid.operations.Operations - :ivar partner_namespaces: PartnerNamespacesOperations operations - :vartype partner_namespaces: azure.mgmt.eventgrid.operations.PartnerNamespacesOperations - :ivar partner_registrations: PartnerRegistrationsOperations operations - :vartype partner_registrations: azure.mgmt.eventgrid.operations.PartnerRegistrationsOperations - :ivar partner_topics: PartnerTopicsOperations operations - :vartype partner_topics: azure.mgmt.eventgrid.operations.PartnerTopicsOperations + :ivar topics: TopicsOperations operations + :vartype topics: azure.mgmt.eventgrid.operations.TopicsOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.eventgrid.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.eventgrid.operations.PrivateLinkResourcesOperations :ivar system_topics: SystemTopicsOperations operations :vartype system_topics: azure.mgmt.eventgrid.operations.SystemTopicsOperations - :ivar topics: TopicsOperations operations - :vartype topics: azure.mgmt.eventgrid.operations.TopicsOperations :ivar extension_topics: ExtensionTopicsOperations operations :vartype extension_topics: azure.mgmt.eventgrid.operations.ExtensionTopicsOperations :ivar topic_types: TopicTypesOperations operations @@ -103,21 +88,13 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.domain_topics = DomainTopicsOperations( self._client, self._config, self._serialize, self._deserialize) - self.event_channels = EventChannelsOperations( - self._client, self._config, self._serialize, self._deserialize) self.event_subscriptions = EventSubscriptionsOperations( self._client, self._config, self._serialize, self._deserialize) self.system_topic_event_subscriptions = SystemTopicEventSubscriptionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.partner_topic_event_subscriptions = PartnerTopicEventSubscriptionsOperations( - self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) - self.partner_namespaces = PartnerNamespacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.partner_registrations = PartnerRegistrationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.partner_topics = PartnerTopicsOperations( + self.topics = TopicsOperations( self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) @@ -125,8 +102,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.system_topics = SystemTopicsOperations( self._client, self._config, self._serialize, self._deserialize) - self.topics = TopicsOperations( - self._client, self._config, self._serialize, self._deserialize) self.extension_topics = ExtensionTopicsOperations( self._client, self._config, self._serialize, self._deserialize) self.topic_types = TopicTypesOperations( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_metadata.json b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_metadata.json index da8263633f46..a7b7004255af 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_metadata.json +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2020-10-15-preview", - "total_api_version_list": ["2020-10-15-preview"], + "chosen_version": "2021-12-01", + "total_api_version_list": ["2021-12-01"], "client": { "name": "EventGridManagementClient", "filename": "_event_grid_management_client", @@ -100,18 +100,13 @@ "operation_groups": { "domains": "DomainsOperations", "domain_topics": "DomainTopicsOperations", - "event_channels": "EventChannelsOperations", "event_subscriptions": "EventSubscriptionsOperations", "system_topic_event_subscriptions": "SystemTopicEventSubscriptionsOperations", - "partner_topic_event_subscriptions": "PartnerTopicEventSubscriptionsOperations", "operations": "Operations", - "partner_namespaces": "PartnerNamespacesOperations", - "partner_registrations": "PartnerRegistrationsOperations", - "partner_topics": "PartnerTopicsOperations", + "topics": "TopicsOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", "private_link_resources": "PrivateLinkResourcesOperations", "system_topics": "SystemTopicsOperations", - "topics": "TopicsOperations", "extension_topics": "ExtensionTopicsOperations", "topic_types": "TopicTypesOperations" } diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py index b77ac9246082..9f8bb24bdd99 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "10.0.0" diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_configuration.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_configuration.py index 8e522ccaf042..a83b9bd57a14 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_configuration.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-10-15-preview" + self.api_version = "2021-12-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-eventgrid/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_event_grid_management_client.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_event_grid_management_client.py index b95b73446cff..cda928965cc0 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_event_grid_management_client.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/_event_grid_management_client.py @@ -19,18 +19,13 @@ from ._configuration import EventGridManagementClientConfiguration from .operations import DomainsOperations from .operations import DomainTopicsOperations -from .operations import EventChannelsOperations from .operations import EventSubscriptionsOperations from .operations import SystemTopicEventSubscriptionsOperations -from .operations import PartnerTopicEventSubscriptionsOperations from .operations import Operations -from .operations import PartnerNamespacesOperations -from .operations import PartnerRegistrationsOperations -from .operations import PartnerTopicsOperations +from .operations import TopicsOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations from .operations import SystemTopicsOperations -from .operations import TopicsOperations from .operations import ExtensionTopicsOperations from .operations import TopicTypesOperations from .. import models @@ -43,30 +38,20 @@ class EventGridManagementClient(object): :vartype domains: azure.mgmt.eventgrid.aio.operations.DomainsOperations :ivar domain_topics: DomainTopicsOperations operations :vartype domain_topics: azure.mgmt.eventgrid.aio.operations.DomainTopicsOperations - :ivar event_channels: EventChannelsOperations operations - :vartype event_channels: azure.mgmt.eventgrid.aio.operations.EventChannelsOperations :ivar event_subscriptions: EventSubscriptionsOperations operations :vartype event_subscriptions: azure.mgmt.eventgrid.aio.operations.EventSubscriptionsOperations :ivar system_topic_event_subscriptions: SystemTopicEventSubscriptionsOperations operations :vartype system_topic_event_subscriptions: azure.mgmt.eventgrid.aio.operations.SystemTopicEventSubscriptionsOperations - :ivar partner_topic_event_subscriptions: PartnerTopicEventSubscriptionsOperations operations - :vartype partner_topic_event_subscriptions: azure.mgmt.eventgrid.aio.operations.PartnerTopicEventSubscriptionsOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.eventgrid.aio.operations.Operations - :ivar partner_namespaces: PartnerNamespacesOperations operations - :vartype partner_namespaces: azure.mgmt.eventgrid.aio.operations.PartnerNamespacesOperations - :ivar partner_registrations: PartnerRegistrationsOperations operations - :vartype partner_registrations: azure.mgmt.eventgrid.aio.operations.PartnerRegistrationsOperations - :ivar partner_topics: PartnerTopicsOperations operations - :vartype partner_topics: azure.mgmt.eventgrid.aio.operations.PartnerTopicsOperations + :ivar topics: TopicsOperations operations + :vartype topics: azure.mgmt.eventgrid.aio.operations.TopicsOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations :vartype private_endpoint_connections: azure.mgmt.eventgrid.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations :vartype private_link_resources: azure.mgmt.eventgrid.aio.operations.PrivateLinkResourcesOperations :ivar system_topics: SystemTopicsOperations operations :vartype system_topics: azure.mgmt.eventgrid.aio.operations.SystemTopicsOperations - :ivar topics: TopicsOperations operations - :vartype topics: azure.mgmt.eventgrid.aio.operations.TopicsOperations :ivar extension_topics: ExtensionTopicsOperations operations :vartype extension_topics: azure.mgmt.eventgrid.aio.operations.ExtensionTopicsOperations :ivar topic_types: TopicTypesOperations operations @@ -100,21 +85,13 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.domain_topics = DomainTopicsOperations( self._client, self._config, self._serialize, self._deserialize) - self.event_channels = EventChannelsOperations( - self._client, self._config, self._serialize, self._deserialize) self.event_subscriptions = EventSubscriptionsOperations( self._client, self._config, self._serialize, self._deserialize) self.system_topic_event_subscriptions = SystemTopicEventSubscriptionsOperations( self._client, self._config, self._serialize, self._deserialize) - self.partner_topic_event_subscriptions = PartnerTopicEventSubscriptionsOperations( - self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) - self.partner_namespaces = PartnerNamespacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.partner_registrations = PartnerRegistrationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.partner_topics = PartnerTopicsOperations( + self.topics = TopicsOperations( self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) @@ -122,8 +99,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.system_topics = SystemTopicsOperations( self._client, self._config, self._serialize, self._deserialize) - self.topics = TopicsOperations( - self._client, self._config, self._serialize, self._deserialize) self.extension_topics = ExtensionTopicsOperations( self._client, self._config, self._serialize, self._deserialize) self.topic_types = TopicTypesOperations( diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/__init__.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/__init__.py index a38c9739f444..c87a986b0809 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/__init__.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/__init__.py @@ -8,36 +8,26 @@ from ._domains_operations import DomainsOperations from ._domain_topics_operations import DomainTopicsOperations -from ._event_channels_operations import EventChannelsOperations from ._event_subscriptions_operations import EventSubscriptionsOperations from ._system_topic_event_subscriptions_operations import SystemTopicEventSubscriptionsOperations -from ._partner_topic_event_subscriptions_operations import PartnerTopicEventSubscriptionsOperations from ._operations import Operations -from ._partner_namespaces_operations import PartnerNamespacesOperations -from ._partner_registrations_operations import PartnerRegistrationsOperations -from ._partner_topics_operations import PartnerTopicsOperations +from ._topics_operations import TopicsOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations from ._system_topics_operations import SystemTopicsOperations -from ._topics_operations import TopicsOperations from ._extension_topics_operations import ExtensionTopicsOperations from ._topic_types_operations import TopicTypesOperations __all__ = [ 'DomainsOperations', 'DomainTopicsOperations', - 'EventChannelsOperations', 'EventSubscriptionsOperations', 'SystemTopicEventSubscriptionsOperations', - 'PartnerTopicEventSubscriptionsOperations', 'Operations', - 'PartnerNamespacesOperations', - 'PartnerRegistrationsOperations', - 'PartnerTopicsOperations', + 'TopicsOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', 'SystemTopicsOperations', - 'TopicsOperations', 'ExtensionTopicsOperations', 'TopicTypesOperations', ] diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topics_operations.py index 1095ba90d1fd..5f853211822b 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domain_topics_operations.py @@ -70,7 +70,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -119,7 +119,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -242,7 +242,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -382,7 +382,7 @@ def list_by_domain( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domains_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domains_operations.py index 3d1b04eeaa3f..78c06c90006a 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domains_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_domains_operations.py @@ -67,7 +67,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -115,7 +115,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -240,7 +240,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -349,7 +349,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -496,7 +496,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -584,7 +584,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -663,7 +663,7 @@ async def list_shared_access_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -726,7 +726,7 @@ async def regenerate_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_subscriptions_operations.py index 2ba5d1748e1d..17025055c46b 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_subscriptions_operations.py @@ -74,7 +74,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -121,7 +121,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -255,7 +255,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -369,7 +369,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -519,7 +519,7 @@ async def get_full_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -585,7 +585,7 @@ def list_global_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -673,7 +673,7 @@ def list_global_by_subscription_for_topic_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -762,7 +762,7 @@ def list_global_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -854,7 +854,7 @@ def list_global_by_resource_group_for_topic_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -944,7 +944,7 @@ def list_regional_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1037,7 +1037,7 @@ def list_regional_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1131,7 +1131,7 @@ def list_regional_by_subscription_for_topic_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1228,7 +1228,7 @@ def list_regional_by_resource_group_for_topic_type( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1328,7 +1328,7 @@ def list_by_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1426,7 +1426,7 @@ def list_by_domain_topic( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -1514,7 +1514,7 @@ async def get_delivery_attributes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_extension_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_extension_topics_operations.py index fd5b0a7aba7e..773131d2e61b 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_extension_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_extension_topics_operations.py @@ -66,7 +66,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_operations.py index c8522866e1d4..440f520d14d6 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_operations.py @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_endpoint_connections_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_endpoint_connections_operations.py index 097a222b53ab..9c5bbac5b620 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_endpoint_connections_operations.py @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def get( self, resource_group_name: str, - parent_type: Union[str, "_models.Enum25"], + parent_type: Union[str, "_models.Enum18"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any @@ -59,7 +59,7 @@ async def get( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\' or \'domains\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.Enum25 + :type parent_type: str or ~azure.mgmt.eventgrid.models.Enum18 :param parent_name: The name of the parent resource (namely, either, the topic name or domain name). :type parent_name: str @@ -76,7 +76,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -117,7 +117,7 @@ async def get( async def _update_initial( self, resource_group_name: str, - parent_type: Union[str, "_models.Enum26"], + parent_type: Union[str, "_models.Enum19"], parent_name: str, private_endpoint_connection_name: str, private_endpoint_connection: "_models.PrivateEndpointConnection", @@ -128,7 +128,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -178,7 +178,7 @@ async def _update_initial( async def begin_update( self, resource_group_name: str, - parent_type: Union[str, "_models.Enum26"], + parent_type: Union[str, "_models.Enum19"], parent_name: str, private_endpoint_connection_name: str, private_endpoint_connection: "_models.PrivateEndpointConnection", @@ -192,7 +192,7 @@ async def begin_update( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\' or \'domains\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.Enum26 + :type parent_type: str or ~azure.mgmt.eventgrid.models.Enum19 :param parent_name: The name of the parent resource (namely, either, the topic name or domain name). :type parent_name: str @@ -264,7 +264,7 @@ def get_long_running_output(pipeline_response): async def _delete_initial( self, resource_group_name: str, - parent_type: Union[str, "_models.Enum27"], + parent_type: Union[str, "_models.Enum20"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any @@ -274,7 +274,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -310,7 +310,7 @@ async def _delete_initial( async def begin_delete( self, resource_group_name: str, - parent_type: Union[str, "_models.Enum27"], + parent_type: Union[str, "_models.Enum20"], parent_name: str, private_endpoint_connection_name: str, **kwargs: Any @@ -323,7 +323,7 @@ async def begin_delete( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\' or \'domains\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.Enum27 + :type parent_type: str or ~azure.mgmt.eventgrid.models.Enum20 :param parent_name: The name of the parent resource (namely, either, the topic name or domain name). :type parent_name: str @@ -389,7 +389,7 @@ def get_long_running_output(pipeline_response): def list_by_resource( self, resource_group_name: str, - parent_type: Union[str, "_models.Enum28"], + parent_type: Union[str, "_models.Enum21"], parent_name: str, filter: Optional[str] = None, top: Optional[int] = None, @@ -403,7 +403,7 @@ def list_by_resource( :type resource_group_name: str :param parent_type: The type of the parent resource. This can be either \'topics\' or \'domains\'. - :type parent_type: str or ~azure.mgmt.eventgrid.models.Enum28 + :type parent_type: str or ~azure.mgmt.eventgrid.models.Enum21 :param parent_name: The name of the parent resource (namely, either, the topic name or domain name). :type parent_name: str @@ -428,7 +428,7 @@ def list_by_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_link_resources_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_link_resources_operations.py index 97971a7eb395..a39080af4b5a 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_link_resources_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_private_link_resources_operations.py @@ -73,7 +73,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -153,7 +153,7 @@ def list_by_resource( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py index 224a825df52f..29ea52dd2a4f 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topic_event_subscriptions_operations.py @@ -72,7 +72,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -122,7 +122,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -258,7 +258,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -376,7 +376,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -527,7 +527,7 @@ async def get_full_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -601,7 +601,7 @@ def list_by_system_topic( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -686,7 +686,7 @@ async def get_delivery_attributes( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topics_operations.py index 4146b4bd1738..01b34ef2d498 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_system_topics_operations.py @@ -67,7 +67,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -115,7 +115,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -244,7 +244,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -353,7 +353,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -502,7 +502,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -590,7 +590,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_types_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_types_operations.py index 84e27b8e4204..a7b44aebdc51 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_types_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topic_types_operations.py @@ -59,7 +59,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -126,7 +126,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -181,7 +181,7 @@ def list_event_types( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topics_operations.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topics_operations.py index 512f85bdb74d..f3750a5bda98 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topics_operations.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_topics_operations.py @@ -67,7 +67,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -115,7 +115,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -240,7 +240,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -349,7 +349,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -496,7 +496,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -584,7 +584,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): @@ -663,7 +663,7 @@ async def list_shared_access_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" # Construct URL @@ -705,13 +705,13 @@ async def _regenerate_key_initial( topic_name: str, regenerate_key_request: "_models.TopicRegenerateKeyRequest", **kwargs: Any - ) -> Optional["_models.TopicSharedAccessKeys"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TopicSharedAccessKeys"]] + ) -> "_models.TopicSharedAccessKeys": + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicSharedAccessKeys"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -740,13 +740,11 @@ async def _regenerate_key_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TopicSharedAccessKeys', pipeline_response) + deserialized = self._deserialize('TopicSharedAccessKeys', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -857,7 +855,7 @@ def list_event_types( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py index 3172c7e49224..132a81b28d47 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/__init__.py @@ -24,11 +24,6 @@ from ._models_py3 import DomainUpdateParameters from ._models_py3 import DomainsListResult from ._models_py3 import DynamicDeliveryAttributeMapping - from ._models_py3 import EventChannel - from ._models_py3 import EventChannelDestination - from ._models_py3 import EventChannelFilter - from ._models_py3 import EventChannelSource - from ._models_py3 import EventChannelsListResult from ._models_py3 import EventHubEventSubscriptionDestination from ._models_py3 import EventSubscription from ._models_py3 import EventSubscriptionDestination @@ -39,49 +34,29 @@ from ._models_py3 import EventSubscriptionsListResult from ._models_py3 import EventType from ._models_py3 import EventTypesListResult - from ._models_py3 import ExtendedLocation from ._models_py3 import ExtensionTopic from ._models_py3 import HybridConnectionEventSubscriptionDestination from ._models_py3 import IdentityInfo from ._models_py3 import InboundIpRule from ._models_py3 import InputSchemaMapping - from ._models_py3 import IsNotNullAdvancedFilter - from ._models_py3 import IsNullOrUndefinedAdvancedFilter from ._models_py3 import JsonField from ._models_py3 import JsonFieldWithDefault from ._models_py3 import JsonInputSchemaMapping from ._models_py3 import NumberGreaterThanAdvancedFilter from ._models_py3 import NumberGreaterThanOrEqualsAdvancedFilter from ._models_py3 import NumberInAdvancedFilter - from ._models_py3 import NumberInRangeAdvancedFilter from ._models_py3 import NumberLessThanAdvancedFilter from ._models_py3 import NumberLessThanOrEqualsAdvancedFilter from ._models_py3 import NumberNotInAdvancedFilter - from ._models_py3 import NumberNotInRangeAdvancedFilter from ._models_py3 import Operation from ._models_py3 import OperationInfo from ._models_py3 import OperationsListResult - from ._models_py3 import PartnerNamespace - from ._models_py3 import PartnerNamespaceRegenerateKeyRequest - from ._models_py3 import PartnerNamespaceSharedAccessKeys - from ._models_py3 import PartnerNamespaceUpdateParameters - from ._models_py3 import PartnerNamespacesListResult - from ._models_py3 import PartnerRegistration - from ._models_py3 import PartnerRegistrationEventTypesListResult - from ._models_py3 import PartnerRegistrationUpdateParameters - from ._models_py3 import PartnerRegistrationsListResult - from ._models_py3 import PartnerTopic - from ._models_py3 import PartnerTopicType - from ._models_py3 import PartnerTopicTypesListResult - from ._models_py3 import PartnerTopicUpdateParameters - from ._models_py3 import PartnerTopicsListResult from ._models_py3 import PrivateEndpoint from ._models_py3 import PrivateEndpointConnection from ._models_py3 import PrivateEndpointConnectionListResult from ._models_py3 import PrivateLinkResource from ._models_py3 import PrivateLinkResourcesListResult from ._models_py3 import Resource - from ._models_py3 import ResourceSku from ._models_py3 import RetryPolicy from ._models_py3 import ServiceBusQueueEventSubscriptionDestination from ._models_py3 import ServiceBusTopicEventSubscriptionDestination @@ -92,9 +67,6 @@ from ._models_py3 import StringContainsAdvancedFilter from ._models_py3 import StringEndsWithAdvancedFilter from ._models_py3 import StringInAdvancedFilter - from ._models_py3 import StringNotBeginsWithAdvancedFilter - from ._models_py3 import StringNotContainsAdvancedFilter - from ._models_py3 import StringNotEndsWithAdvancedFilter from ._models_py3 import StringNotInAdvancedFilter from ._models_py3 import SystemData from ._models_py3 import SystemTopic @@ -128,11 +100,6 @@ from ._models import DomainUpdateParameters # type: ignore from ._models import DomainsListResult # type: ignore from ._models import DynamicDeliveryAttributeMapping # type: ignore - from ._models import EventChannel # type: ignore - from ._models import EventChannelDestination # type: ignore - from ._models import EventChannelFilter # type: ignore - from ._models import EventChannelSource # type: ignore - from ._models import EventChannelsListResult # type: ignore from ._models import EventHubEventSubscriptionDestination # type: ignore from ._models import EventSubscription # type: ignore from ._models import EventSubscriptionDestination # type: ignore @@ -143,49 +110,29 @@ from ._models import EventSubscriptionsListResult # type: ignore from ._models import EventType # type: ignore from ._models import EventTypesListResult # type: ignore - from ._models import ExtendedLocation # type: ignore from ._models import ExtensionTopic # type: ignore from ._models import HybridConnectionEventSubscriptionDestination # type: ignore from ._models import IdentityInfo # type: ignore from ._models import InboundIpRule # type: ignore from ._models import InputSchemaMapping # type: ignore - from ._models import IsNotNullAdvancedFilter # type: ignore - from ._models import IsNullOrUndefinedAdvancedFilter # type: ignore from ._models import JsonField # type: ignore from ._models import JsonFieldWithDefault # type: ignore from ._models import JsonInputSchemaMapping # type: ignore from ._models import NumberGreaterThanAdvancedFilter # type: ignore from ._models import NumberGreaterThanOrEqualsAdvancedFilter # type: ignore from ._models import NumberInAdvancedFilter # type: ignore - from ._models import NumberInRangeAdvancedFilter # type: ignore from ._models import NumberLessThanAdvancedFilter # type: ignore from ._models import NumberLessThanOrEqualsAdvancedFilter # type: ignore from ._models import NumberNotInAdvancedFilter # type: ignore - from ._models import NumberNotInRangeAdvancedFilter # type: ignore from ._models import Operation # type: ignore from ._models import OperationInfo # type: ignore from ._models import OperationsListResult # type: ignore - from ._models import PartnerNamespace # type: ignore - from ._models import PartnerNamespaceRegenerateKeyRequest # type: ignore - from ._models import PartnerNamespaceSharedAccessKeys # type: ignore - from ._models import PartnerNamespaceUpdateParameters # type: ignore - from ._models import PartnerNamespacesListResult # type: ignore - from ._models import PartnerRegistration # type: ignore - from ._models import PartnerRegistrationEventTypesListResult # type: ignore - from ._models import PartnerRegistrationUpdateParameters # type: ignore - from ._models import PartnerRegistrationsListResult # type: ignore - from ._models import PartnerTopic # type: ignore - from ._models import PartnerTopicType # type: ignore - from ._models import PartnerTopicTypesListResult # type: ignore - from ._models import PartnerTopicUpdateParameters # type: ignore - from ._models import PartnerTopicsListResult # type: ignore from ._models import PrivateEndpoint # type: ignore from ._models import PrivateEndpointConnection # type: ignore from ._models import PrivateEndpointConnectionListResult # type: ignore from ._models import PrivateLinkResource # type: ignore from ._models import PrivateLinkResourcesListResult # type: ignore from ._models import Resource # type: ignore - from ._models import ResourceSku # type: ignore from ._models import RetryPolicy # type: ignore from ._models import ServiceBusQueueEventSubscriptionDestination # type: ignore from ._models import ServiceBusTopicEventSubscriptionDestination # type: ignore @@ -196,9 +143,6 @@ from ._models import StringContainsAdvancedFilter # type: ignore from ._models import StringEndsWithAdvancedFilter # type: ignore from ._models import StringInAdvancedFilter # type: ignore - from ._models import StringNotBeginsWithAdvancedFilter # type: ignore - from ._models import StringNotContainsAdvancedFilter # type: ignore - from ._models import StringNotEndsWithAdvancedFilter # type: ignore from ._models import StringNotInAdvancedFilter # type: ignore from ._models import SystemData # type: ignore from ._models import SystemTopic # type: ignore @@ -223,11 +167,10 @@ DomainProvisioningState, DomainTopicProvisioningState, EndpointType, - Enum25, - Enum26, - Enum27, - Enum28, - EventChannelProvisioningState, + Enum18, + Enum19, + Enum20, + Enum21, EventDeliverySchema, EventSubscriptionIdentityType, EventSubscriptionProvisioningState, @@ -235,19 +178,10 @@ InputSchema, InputSchemaMappingType, IpActionType, - PartnerNamespaceProvisioningState, - PartnerRegistrationProvisioningState, - PartnerRegistrationVisibilityState, - PartnerTopicActivationState, - PartnerTopicProvisioningState, - PartnerTopicReadinessState, - PartnerTopicTypeAuthorizationState, PersistedConnectionStatus, PublicNetworkAccess, - ResourceKind, ResourceProvisioningState, ResourceRegionType, - Sku, TopicProvisioningState, TopicTypePropertiesSupportedScopesForSourceItem, TopicTypeProvisioningState, @@ -271,11 +205,6 @@ 'DomainUpdateParameters', 'DomainsListResult', 'DynamicDeliveryAttributeMapping', - 'EventChannel', - 'EventChannelDestination', - 'EventChannelFilter', - 'EventChannelSource', - 'EventChannelsListResult', 'EventHubEventSubscriptionDestination', 'EventSubscription', 'EventSubscriptionDestination', @@ -286,49 +215,29 @@ 'EventSubscriptionsListResult', 'EventType', 'EventTypesListResult', - 'ExtendedLocation', 'ExtensionTopic', 'HybridConnectionEventSubscriptionDestination', 'IdentityInfo', 'InboundIpRule', 'InputSchemaMapping', - 'IsNotNullAdvancedFilter', - 'IsNullOrUndefinedAdvancedFilter', 'JsonField', 'JsonFieldWithDefault', 'JsonInputSchemaMapping', 'NumberGreaterThanAdvancedFilter', 'NumberGreaterThanOrEqualsAdvancedFilter', 'NumberInAdvancedFilter', - 'NumberInRangeAdvancedFilter', 'NumberLessThanAdvancedFilter', 'NumberLessThanOrEqualsAdvancedFilter', 'NumberNotInAdvancedFilter', - 'NumberNotInRangeAdvancedFilter', 'Operation', 'OperationInfo', 'OperationsListResult', - 'PartnerNamespace', - 'PartnerNamespaceRegenerateKeyRequest', - 'PartnerNamespaceSharedAccessKeys', - 'PartnerNamespaceUpdateParameters', - 'PartnerNamespacesListResult', - 'PartnerRegistration', - 'PartnerRegistrationEventTypesListResult', - 'PartnerRegistrationUpdateParameters', - 'PartnerRegistrationsListResult', - 'PartnerTopic', - 'PartnerTopicType', - 'PartnerTopicTypesListResult', - 'PartnerTopicUpdateParameters', - 'PartnerTopicsListResult', 'PrivateEndpoint', 'PrivateEndpointConnection', 'PrivateEndpointConnectionListResult', 'PrivateLinkResource', 'PrivateLinkResourcesListResult', 'Resource', - 'ResourceSku', 'RetryPolicy', 'ServiceBusQueueEventSubscriptionDestination', 'ServiceBusTopicEventSubscriptionDestination', @@ -339,9 +248,6 @@ 'StringContainsAdvancedFilter', 'StringEndsWithAdvancedFilter', 'StringInAdvancedFilter', - 'StringNotBeginsWithAdvancedFilter', - 'StringNotContainsAdvancedFilter', - 'StringNotEndsWithAdvancedFilter', 'StringNotInAdvancedFilter', 'SystemData', 'SystemTopic', @@ -364,11 +270,10 @@ 'DomainProvisioningState', 'DomainTopicProvisioningState', 'EndpointType', - 'Enum25', - 'Enum26', - 'Enum27', - 'Enum28', - 'EventChannelProvisioningState', + 'Enum18', + 'Enum19', + 'Enum20', + 'Enum21', 'EventDeliverySchema', 'EventSubscriptionIdentityType', 'EventSubscriptionProvisioningState', @@ -376,19 +281,10 @@ 'InputSchema', 'InputSchemaMappingType', 'IpActionType', - 'PartnerNamespaceProvisioningState', - 'PartnerRegistrationProvisioningState', - 'PartnerRegistrationVisibilityState', - 'PartnerTopicActivationState', - 'PartnerTopicProvisioningState', - 'PartnerTopicReadinessState', - 'PartnerTopicTypeAuthorizationState', 'PersistedConnectionStatus', 'PublicNetworkAccess', - 'ResourceKind', 'ResourceProvisioningState', 'ResourceRegionType', - 'Sku', 'TopicProvisioningState', 'TopicTypePropertiesSupportedScopesForSourceItem', 'TopicTypeProvisioningState', diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_event_grid_management_client_enums.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_event_grid_management_client_enums.py index fe023301fd3f..5ab2e4a26964 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_event_grid_management_client_enums.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_event_grid_management_client_enums.py @@ -42,13 +42,6 @@ class AdvancedFilterOperatorType(with_metaclass(_CaseInsensitiveEnumMeta, str, E STRING_BEGINS_WITH = "StringBeginsWith" STRING_ENDS_WITH = "StringEndsWith" STRING_CONTAINS = "StringContains" - NUMBER_IN_RANGE = "NumberInRange" - NUMBER_NOT_IN_RANGE = "NumberNotInRange" - STRING_NOT_BEGINS_WITH = "StringNotBeginsWith" - STRING_NOT_ENDS_WITH = "StringNotEndsWith" - STRING_NOT_CONTAINS = "StringNotContains" - IS_NULL_OR_UNDEFINED = "IsNullOrUndefined" - IS_NOT_NULL = "IsNotNull" class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of identity that created the resource. @@ -73,7 +66,7 @@ class DeliveryAttributeMappingType(with_metaclass(_CaseInsensitiveEnumMeta, str, DYNAMIC = "Dynamic" class DomainProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Provisioning state of the domain. + """Provisioning state of the Event Grid Domain Resource. """ CREATING = "Creating" @@ -106,37 +99,26 @@ class EndpointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SERVICE_BUS_TOPIC = "ServiceBusTopic" AZURE_FUNCTION = "AzureFunction" -class Enum25(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Enum18(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): TOPICS = "topics" DOMAINS = "domains" -class Enum26(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Enum19(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): TOPICS = "topics" DOMAINS = "domains" -class Enum27(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Enum20(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): TOPICS = "topics" DOMAINS = "domains" -class Enum28(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Enum21(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): TOPICS = "topics" DOMAINS = "domains" -class EventChannelProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Provisioning state of the event channel. - """ - - CREATING = "Creating" - UPDATING = "Updating" - DELETING = "Deleting" - SUCCEEDED = "Succeeded" - CANCELED = "Canceled" - FAILED = "Failed" - class EventDeliverySchema(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The event delivery schema for the event subscription. """ @@ -198,73 +180,6 @@ class IpActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ALLOW = "Allow" -class PartnerNamespaceProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Provisioning state of the partner namespace. - """ - - CREATING = "Creating" - UPDATING = "Updating" - DELETING = "Deleting" - SUCCEEDED = "Succeeded" - CANCELED = "Canceled" - FAILED = "Failed" - -class PartnerRegistrationProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Provisioning state of the partner registration. - """ - - CREATING = "Creating" - UPDATING = "Updating" - DELETING = "Deleting" - SUCCEEDED = "Succeeded" - CANCELED = "Canceled" - FAILED = "Failed" - -class PartnerRegistrationVisibilityState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Visibility state of the partner registration. - """ - - HIDDEN = "Hidden" - PUBLIC_PREVIEW = "PublicPreview" - GENERALLY_AVAILABLE = "GenerallyAvailable" - -class PartnerTopicActivationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Activation state of the partner topic. - """ - - NEVER_ACTIVATED = "NeverActivated" - ACTIVATED = "Activated" - DEACTIVATED = "Deactivated" - -class PartnerTopicProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Provisioning state of the partner topic. - """ - - CREATING = "Creating" - UPDATING = "Updating" - DELETING = "Deleting" - SUCCEEDED = "Succeeded" - CANCELED = "Canceled" - FAILED = "Failed" - -class PartnerTopicReadinessState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The readiness state of the corresponding partner topic. - """ - - NOT_ACTIVATED_BY_USER_YET = "NotActivatedByUserYet" - ACTIVATED_BY_USER = "ActivatedByUser" - DEACTIVATED_BY_USER = "DeactivatedByUser" - DELETED_BY_USER = "DeletedByUser" - -class PartnerTopicTypeAuthorizationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Status of whether the customer has authorized a partner to create partner topics - in the customer's subscription. - """ - - NOT_APPLICABLE = "NotApplicable" - NOT_AUTHORIZED = "NotAuthorized" - AUTHORIZED = "Authorized" - class PersistedConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of the connection. """ @@ -284,13 +199,6 @@ class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ENABLED = "Enabled" DISABLED = "Disabled" -class ResourceKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Kind of the resource. - """ - - AZURE = "Azure" - AZURE_ARC = "AzureArc" - class ResourceProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Provisioning state of the Private Endpoint Connection. """ @@ -309,13 +217,6 @@ class ResourceRegionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): REGIONAL_RESOURCE = "RegionalResource" GLOBAL_RESOURCE = "GlobalResource" -class Sku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The Sku name of the resource. The possible values are: Basic or Premium. - """ - - BASIC = "Basic" - PREMIUM = "Premium" - class TopicProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Provisioning state of the topic. """ diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py index 35c688deec45..d597030cda7d 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/models/_models.py @@ -13,7 +13,7 @@ class AdvancedFilter(msrest.serialization.Model): """This is the base type that represents an advanced filter. To configure an advanced filter, do not directly instantiate an object of this class. Instead, instantiate an object of a derived class such as BoolEqualsAdvancedFilter, NumberInAdvancedFilter, StringEqualsAdvancedFilter etc. depending on the type of the key based on which you want to filter. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: BoolEqualsAdvancedFilter, IsNotNullAdvancedFilter, IsNullOrUndefinedAdvancedFilter, NumberGreaterThanAdvancedFilter, NumberGreaterThanOrEqualsAdvancedFilter, NumberInAdvancedFilter, NumberInRangeAdvancedFilter, NumberLessThanAdvancedFilter, NumberLessThanOrEqualsAdvancedFilter, NumberNotInAdvancedFilter, NumberNotInRangeAdvancedFilter, StringBeginsWithAdvancedFilter, StringContainsAdvancedFilter, StringEndsWithAdvancedFilter, StringInAdvancedFilter, StringNotBeginsWithAdvancedFilter, StringNotContainsAdvancedFilter, StringNotEndsWithAdvancedFilter, StringNotInAdvancedFilter. + sub-classes are: BoolEqualsAdvancedFilter, NumberGreaterThanAdvancedFilter, NumberGreaterThanOrEqualsAdvancedFilter, NumberInAdvancedFilter, NumberLessThanAdvancedFilter, NumberLessThanOrEqualsAdvancedFilter, NumberNotInAdvancedFilter, StringBeginsWithAdvancedFilter, StringContainsAdvancedFilter, StringEndsWithAdvancedFilter, StringInAdvancedFilter, StringNotInAdvancedFilter. All required parameters must be populated in order to send to Azure. @@ -21,8 +21,7 @@ class AdvancedFilter(msrest.serialization.Model): StringContains, BoolEquals and others.Constant filled by server. Possible values include: "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". + "StringEndsWith", "StringContains". :type operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType :param key: The field/property in the event based on which you want to filter. :type key: str @@ -38,7 +37,7 @@ class AdvancedFilter(msrest.serialization.Model): } _subtype_map = { - 'operator_type': {'BoolEquals': 'BoolEqualsAdvancedFilter', 'IsNotNull': 'IsNotNullAdvancedFilter', 'IsNullOrUndefined': 'IsNullOrUndefinedAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'NumberIn': 'NumberInAdvancedFilter', 'NumberInRange': 'NumberInRangeAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'NumberNotInRange': 'NumberNotInRangeAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotBeginsWith': 'StringNotBeginsWithAdvancedFilter', 'StringNotContains': 'StringNotContainsAdvancedFilter', 'StringNotEndsWith': 'StringNotEndsWithAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter'} + 'operator_type': {'BoolEquals': 'BoolEqualsAdvancedFilter', 'NumberGreaterThan': 'NumberGreaterThanAdvancedFilter', 'NumberGreaterThanOrEquals': 'NumberGreaterThanOrEqualsAdvancedFilter', 'NumberIn': 'NumberInAdvancedFilter', 'NumberLessThan': 'NumberLessThanAdvancedFilter', 'NumberLessThanOrEquals': 'NumberLessThanOrEqualsAdvancedFilter', 'NumberNotIn': 'NumberNotInAdvancedFilter', 'StringBeginsWith': 'StringBeginsWithAdvancedFilter', 'StringContains': 'StringContainsAdvancedFilter', 'StringEndsWith': 'StringEndsWithAdvancedFilter', 'StringIn': 'StringInAdvancedFilter', 'StringNotIn': 'StringNotInAdvancedFilter'} } def __init__( @@ -137,8 +136,7 @@ class BoolEqualsAdvancedFilter(AdvancedFilter): StringContains, BoolEquals and others.Constant filled by server. Possible values include: "NumberIn", "NumberNotIn", "NumberLessThan", "NumberGreaterThan", "NumberLessThanOrEquals", "NumberGreaterThanOrEquals", "BoolEquals", "StringIn", "StringNotIn", "StringBeginsWith", - "StringEndsWith", "StringContains", "NumberInRange", "NumberNotInRange", "StringNotBeginsWith", - "StringNotEndsWith", "StringNotContains", "IsNullOrUndefined", "IsNotNull". + "StringEndsWith", "StringContains". :type operator_type: str or ~azure.mgmt.eventgrid.models.AdvancedFilterOperatorType :param key: The field/property in the event based on which you want to filter. :type key: str @@ -429,17 +427,15 @@ class Domain(TrackedResource): :type location: str :param tags: A set of tags. Tags of the resource. :type tags: dict[str, str] - :param sku: The Sku pricing tier for the domain. - :type sku: ~azure.mgmt.eventgrid.models.ResourceSku - :param identity: Identity information for the resource. - :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo :ivar system_data: The system metadata relating to Domain resource. :vartype system_data: ~azure.mgmt.eventgrid.models.SystemData + :param identity: Identity information for the Event Grid Domain resource. + :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo :ivar private_endpoint_connections: List of private endpoint connections. :vartype private_endpoint_connections: list[~azure.mgmt.eventgrid.models.PrivateEndpointConnection] - :ivar provisioning_state: Provisioning state of the domain. Possible values include: - "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". + :ivar provisioning_state: Provisioning state of the Event Grid Domain Resource. Possible values + include: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". :vartype provisioning_state: str or ~azure.mgmt.eventgrid.models.DomainProvisioningState :ivar endpoint: Endpoint for the domain. :vartype endpoint: str @@ -461,6 +457,40 @@ class Domain(TrackedResource): :param inbound_ip_rules: This can be used to restrict traffic from specific IPs instead of all IPs. Note: These are considered only if PublicNetworkAccess is enabled. :type inbound_ip_rules: list[~azure.mgmt.eventgrid.models.InboundIpRule] + :param disable_local_auth: This boolean is used to enable or disable local auth. Default value + is false. When the property is set to true, only AAD token will be used to authenticate if user + is allowed to publish to the domain. + :type disable_local_auth: bool + :param auto_create_topic_with_first_subscription: This Boolean is used to specify the creation + mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain + resource. + In this context, creation of domain topic can be auto-managed (when true) or self-managed + (when false). The default value for this property is true. + When this property is null or set to true, Event Grid is responsible of automatically creating + the domain topic when the first event subscription is + created at the scope of the domain topic. If this property is set to false, then creating the + first event subscription will require creating a domain topic + by the user. The self-management mode can be used if the user wants full control of when the + domain topic is created, while auto-managed mode provides the + flexibility to perform less operations and manage fewer resources by the user. Also, note that + in auto-managed creation mode, user is allowed to create the + domain topic on demand if needed. + :type auto_create_topic_with_first_subscription: bool + :param auto_delete_topic_with_last_subscription: This Boolean is used to specify the deletion + mechanism for 'all' the Event Grid Domain Topics associated with this Event Grid Domain + resource. + In this context, deletion of domain topic can be auto-managed (when true) or self-managed + (when false). The default value for this property is true. + When this property is set to true, Event Grid is responsible of automatically deleting the + domain topic when the last event subscription at the scope + of the domain topic is deleted. If this property is set to false, then the user needs to + manually delete the domain topic when it is no longer needed + (e.g., when last event subscription is deleted and the resource needs to be cleaned up). The + self-management mode can be used if the user wants full + control of when the domain topic needs to be deleted, while auto-managed mode provides the + flexibility to perform less operations and manage fewer + resources by the user. + :type auto_delete_topic_with_last_subscription: bool """ _validation = { @@ -481,9 +511,8 @@ class Domain(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ResourceSku'}, - 'identity': {'key': 'identity', 'type': 'IdentityInfo'}, 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'identity': {'key': 'identity', 'type': 'IdentityInfo'}, 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'endpoint': {'key': 'properties.endpoint', 'type': 'str'}, @@ -492,6 +521,9 @@ class Domain(TrackedResource): 'metric_resource_id': {'key': 'properties.metricResourceId', 'type': 'str'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'inbound_ip_rules': {'key': 'properties.inboundIpRules', 'type': '[InboundIpRule]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'auto_create_topic_with_first_subscription': {'key': 'properties.autoCreateTopicWithFirstSubscription', 'type': 'bool'}, + 'auto_delete_topic_with_last_subscription': {'key': 'properties.autoDeleteTopicWithLastSubscription', 'type': 'bool'}, } def __init__( @@ -499,9 +531,8 @@ def __init__( **kwargs ): super(Domain, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.identity = kwargs.get('identity', None) self.system_data = None + self.identity = kwargs.get('identity', None) self.private_endpoint_connections = None self.provisioning_state = None self.endpoint = None @@ -510,6 +541,9 @@ def __init__( self.metric_resource_id = None self.public_network_access = kwargs.get('public_network_access', None) self.inbound_ip_rules = kwargs.get('inbound_ip_rules', None) + self.disable_local_auth = kwargs.get('disable_local_auth', False) + self.auto_create_topic_with_first_subscription = kwargs.get('auto_create_topic_with_first_subscription', True) + self.auto_delete_topic_with_last_subscription = kwargs.get('auto_delete_topic_with_last_subscription', True) class DomainRegenerateKeyRequest(msrest.serialization.Model): @@ -656,8 +690,6 @@ class DomainUpdateParameters(msrest.serialization.Model): :type tags: dict[str, str] :param identity: Identity information for the resource. :type identity: ~azure.mgmt.eventgrid.models.IdentityInfo - :param sku: The Sku pricing tier for the domain. - :type sku: ~azure.mgmt.eventgrid.models.ResourceSku :param public_network_access: This determines if traffic is allowed over public network. By default it is enabled. You can further restrict to specific IPs by configuring :code:` Optional["_models.TopicSharedAccessKeys"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.TopicSharedAccessKeys"]] + # type: (...) -> "_models.TopicSharedAccessKeys" + cls = kwargs.pop('cls', None) # type: ClsType["_models.TopicSharedAccessKeys"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -755,13 +755,11 @@ def _regenerate_key_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('TopicSharedAccessKeys', pipeline_response) + deserialized = self._deserialize('TopicSharedAccessKeys', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -874,7 +872,7 @@ def list_event_types( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-12-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.test_domain.yaml b/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.test_domain.yaml index 5f0b57299aed..ee035fbb94ef 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.test_domain.yaml +++ b/sdk/eventgrid/azure-mgmt-eventgrid/tests/recordings/test_domain.test_domain.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"location": "westus"}' + body: '{"location": "eastus2euap"}' headers: Accept: - application/json @@ -9,28 +9,27 @@ interactions: Connection: - keep-alive Content-Length: - - '22' + - '27' Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-eventgrid/9.0.0 Python/3.8.10 (Linux-5.4.0-1047-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 + - azsdk-python-mgmt-eventgrid/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2020-10-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2021-12-01 response: body: - string: '{"properties":{"provisioningState":"Creating","endpoint":null},"systemData":null,"location":"westus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' + string: '{"properties":{"provisioningState":"Creating","endpoint":null},"location":"eastus2euap","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' headers: azure-asyncoperation: - - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationsStatus/24594E47-8207-4964-8122-2D7A9332BE45?api-version=2020-10-15-preview + - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/E1494F88-F72F-4C15-BB6D-851719C75927?api-version=2021-12-01 cache-control: - no-cache content-length: - - '338' + - '369' content-type: - application/json; charset=utf-8 date: - - Mon, 24 May 2021 06:40:40 GMT + - Fri, 05 Nov 2021 06:33:46 GMT expires: - '-1' pragma: @@ -42,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1198' status: code: 201 message: Created @@ -56,22 +55,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-eventgrid/9.0.0 Python/3.8.10 (Linux-5.4.0-1047-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 + - azsdk-python-mgmt-eventgrid/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationsStatus/24594E47-8207-4964-8122-2D7A9332BE45?api-version=2020-10-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/E1494F88-F72F-4C15-BB6D-851719C75927?api-version=2021-12-01 response: body: - string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationsStatus/24594E47-8207-4964-8122-2D7A9332BE45?api-version=2020-10-15-preview","name":"24594e47-8207-4964-8122-2d7a9332be45","status":"Succeeded"}' + string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/E1494F88-F72F-4C15-BB6D-851719C75927?api-version=2021-12-01","name":"e1494f88-f72f-4c15-bb6d-851719c75927","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '287' + - '284' content-type: - application/json; charset=utf-8 date: - - Mon, 24 May 2021 06:40:51 GMT + - Fri, 05 Nov 2021 06:33:57 GMT expires: - '-1' pragma: @@ -99,22 +97,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-eventgrid/9.0.0 Python/3.8.10 (Linux-5.4.0-1047-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 + - azsdk-python-mgmt-eventgrid/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2020-10-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2021-12-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","endpoint":"https://domain70eb095d.westus-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema","metricResourceId":"f9a9f07a-0f80-4980-8b8b-fac9e67ca89a","publicNetworkAccess":"Enabled"},"sku":{"name":"Basic"},"systemData":null,"location":"westus","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' + string: '{"properties":{"provisioningState":"Succeeded","endpoint":"https://domain70eb095d.eastus2euap-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema","metricResourceId":"7cd50d1d-c7d6-4061-b6a5-594fed35abb7","publicNetworkAccess":"Enabled"},"location":"eastus2euap","tags":null,"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' headers: cache-control: - no-cache content-length: - - '544' + - '557' content-type: - application/json; charset=utf-8 date: - - Mon, 24 May 2021 06:40:51 GMT + - Fri, 05 Nov 2021 06:33:57 GMT expires: - '-1' pragma: @@ -146,24 +143,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-mgmt-eventgrid/9.0.0 Python/3.8.10 (Linux-5.4.0-1047-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 + - azsdk-python-mgmt-eventgrid/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2020-10-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2021-12-01 response: body: - string: '{"properties":{"provisioningState":"Updating","endpoint":"https://domain70eb095d.westus-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema","metricResourceId":"f9a9f07a-0f80-4980-8b8b-fac9e67ca89a","publicNetworkAccess":"Enabled"},"sku":{"name":"Basic"},"systemData":null,"location":"westus","tags":{"tag1":"value1","tag2":"value2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' + string: '{"properties":{"provisioningState":"Updating","endpoint":"https://domain70eb095d.eastus2euap-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema","metricResourceId":"7cd50d1d-c7d6-4061-b6a5-594fed35abb7","publicNetworkAccess":"Enabled"},"location":"eastus2euap","tags":{"tag1":"value1","tag2":"value2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' headers: azure-asyncoperation: - - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationsStatus/874FEC44-25EB-4C80-B37F-6E986B8B8221?api-version=2020-10-15-preview + - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/67211BD5-E97D-457F-A548-D3FCA3E877DB?api-version=2021-12-01 cache-control: - no-cache content-length: - - '572' + - '585' content-type: - application/json; charset=utf-8 date: - - Mon, 24 May 2021 06:40:53 GMT + - Fri, 05 Nov 2021 06:34:01 GMT expires: - '-1' pragma: @@ -175,7 +171,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' status: code: 201 message: Created @@ -189,22 +185,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-eventgrid/9.0.0 Python/3.8.10 (Linux-5.4.0-1047-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 + - azsdk-python-mgmt-eventgrid/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationsStatus/874FEC44-25EB-4C80-B37F-6E986B8B8221?api-version=2020-10-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/67211BD5-E97D-457F-A548-D3FCA3E877DB?api-version=2021-12-01 response: body: - string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationsStatus/874FEC44-25EB-4C80-B37F-6E986B8B8221?api-version=2020-10-15-preview","name":"874fec44-25eb-4c80-b37f-6e986b8b8221","status":"Succeeded"}' + string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/67211BD5-E97D-457F-A548-D3FCA3E877DB?api-version=2021-12-01","name":"67211bd5-e97d-457f-a548-d3fca3e877db","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '287' + - '284' content-type: - application/json; charset=utf-8 date: - - Mon, 24 May 2021 06:41:03 GMT + - Fri, 05 Nov 2021 06:34:11 GMT expires: - '-1' pragma: @@ -232,22 +227,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-eventgrid/9.0.0 Python/3.8.10 (Linux-5.4.0-1047-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 + - azsdk-python-mgmt-eventgrid/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2020-10-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2021-12-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","endpoint":"https://domain70eb095d.westus-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema","metricResourceId":"f9a9f07a-0f80-4980-8b8b-fac9e67ca89a","publicNetworkAccess":"Enabled"},"sku":{"name":"Basic"},"systemData":null,"location":"westus","tags":{"tag1":"value1","tag2":"value2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' + string: '{"properties":{"provisioningState":"Succeeded","endpoint":"https://domain70eb095d.eastus2euap-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema","metricResourceId":"7cd50d1d-c7d6-4061-b6a5-594fed35abb7","publicNetworkAccess":"Enabled"},"location":"eastus2euap","tags":{"tag1":"value1","tag2":"value2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' headers: cache-control: - no-cache content-length: - - '573' + - '586' content-type: - application/json; charset=utf-8 date: - - Mon, 24 May 2021 06:41:03 GMT + - Fri, 05 Nov 2021 06:34:12 GMT expires: - '-1' pragma: @@ -275,22 +269,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-eventgrid/9.0.0 Python/3.8.10 (Linux-5.4.0-1047-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 + - azsdk-python-mgmt-eventgrid/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2020-10-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2021-12-01 response: body: - string: '{"properties":{"provisioningState":"Succeeded","endpoint":"https://domain70eb095d.westus-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema","metricResourceId":"f9a9f07a-0f80-4980-8b8b-fac9e67ca89a","publicNetworkAccess":"Enabled"},"sku":{"name":"Basic"},"systemData":null,"location":"westus","tags":{"tag1":"value1","tag2":"value2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' + string: '{"properties":{"provisioningState":"Succeeded","endpoint":"https://domain70eb095d.eastus2euap-1.eventgrid.azure.net/api/events","inputSchema":"EventGridSchema","metricResourceId":"7cd50d1d-c7d6-4061-b6a5-594fed35abb7","publicNetworkAccess":"Enabled"},"location":"eastus2euap","tags":{"tag1":"value1","tag2":"value2"},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d","name":"domain70eb095d","type":"Microsoft.EventGrid/domains"}' headers: cache-control: - no-cache content-length: - - '573' + - '586' content-type: - application/json; charset=utf-8 date: - - Mon, 24 May 2021 06:41:03 GMT + - Fri, 05 Nov 2021 06:34:12 GMT expires: - '-1' pragma: @@ -320,26 +313,25 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-mgmt-eventgrid/9.0.0 Python/3.8.10 (Linux-5.4.0-1047-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 + - azsdk-python-mgmt-eventgrid/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_domain_test_domain70eb095d/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2020-10-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventGrid/domains/domain70eb095d?api-version=2021-12-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationsStatus/DB0A7498-3E71-4835-9466-54E7CE5AEC4B?api-version=2020-10-15-preview + - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/2A715E2F-13FA-42C5-8671-EE162FE2DBB1?api-version=2021-12-01 cache-control: - no-cache content-length: - '0' date: - - Mon, 24 May 2021 06:41:03 GMT + - Fri, 05 Nov 2021 06:34:13 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationResults/DB0A7498-3E71-4835-9466-54E7CE5AEC4B?api-version=2020-10-15-preview + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationResults/2A715E2F-13FA-42C5-8671-EE162FE2DBB1?api-version=2021-12-01 pragma: - no-cache server: @@ -363,22 +355,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-mgmt-eventgrid/9.0.0 Python/3.8.10 (Linux-5.4.0-1047-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2384_0 + - azsdk-python-mgmt-eventgrid/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationsStatus/DB0A7498-3E71-4835-9466-54E7CE5AEC4B?api-version=2020-10-15-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/2A715E2F-13FA-42C5-8671-EE162FE2DBB1?api-version=2021-12-01 response: body: - string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/westus/operationsStatus/DB0A7498-3E71-4835-9466-54E7CE5AEC4B?api-version=2020-10-15-preview","name":"db0a7498-3e71-4835-9466-54e7ce5aec4b","status":"Succeeded"}' + string: '{"id":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.EventGrid/locations/eastus2euap/operationsStatus/2A715E2F-13FA-42C5-8671-EE162FE2DBB1?api-version=2021-12-01","name":"2a715e2f-13fa-42c5-8671-ee162fe2dbb1","status":"Succeeded"}' headers: cache-control: - no-cache content-length: - - '287' + - '284' content-type: - application/json; charset=utf-8 date: - - Mon, 24 May 2021 06:41:13 GMT + - Fri, 05 Nov 2021 06:34:24 GMT expires: - '-1' pragma: diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/tests/test_domain.py b/sdk/eventgrid/azure-mgmt-eventgrid/tests/test_domain.py index 53313b084298..8fdb390bafe6 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/tests/test_domain.py +++ b/sdk/eventgrid/azure-mgmt-eventgrid/tests/test_domain.py @@ -9,7 +9,7 @@ from azure.mgmt.eventgrid import EventGridManagementClient -from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer +from devtools_testutils import AzureMgmtTestCase, RandomNameResourceGroupPreparer class MgmtEventGridTest(AzureMgmtTestCase): @@ -18,7 +18,7 @@ def setUp(self): super(MgmtEventGridTest, self).setUp() self.eventgrid_client = self.create_mgmt_client(EventGridManagementClient) - @ResourceGroupPreparer() + @RandomNameResourceGroupPreparer(location="eastus2euap") def test_domain(self, resource_group, location): # create DOMAIN_NAME = self.get_resource_name('domain') diff --git a/sdk/eventgrid/tests.yml b/sdk/eventgrid/tests.yml index 1d4b879f5355..99b94c808f21 100644 --- a/sdk/eventgrid/tests.yml +++ b/sdk/eventgrid/tests.yml @@ -4,7 +4,6 @@ stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: ServiceDirectory: eventgrid - DeployArmTemplate: true BuildTargetingString: azure-eventgrid* MatrixReplace: - TestSamples=.*/true diff --git a/sdk/eventhub/azure-eventhub/CHANGELOG.md b/sdk/eventhub/azure-eventhub/CHANGELOG.md index 01ef2a3ed21b..a7d4e0fb075e 100644 --- a/sdk/eventhub/azure-eventhub/CHANGELOG.md +++ b/sdk/eventhub/azure-eventhub/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 5.6.2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 5.6.1 (2021-10-06) ### Bugs Fixed diff --git a/sdk/eventhub/azure-eventhub/azure/eventhub/_version.py b/sdk/eventhub/azure-eventhub/azure/eventhub/_version.py index 90afe8d03220..87024b3843d4 100644 --- a/sdk/eventhub/azure-eventhub/azure/eventhub/_version.py +++ b/sdk/eventhub/azure-eventhub/azure/eventhub/_version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "5.6.1" +VERSION = "5.6.2" diff --git a/sdk/eventhub/azure-mgmt-eventhub/CHANGELOG.md b/sdk/eventhub/azure-mgmt-eventhub/CHANGELOG.md index dceaea924cd1..3d139806cc83 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/CHANGELOG.md +++ b/sdk/eventhub/azure-mgmt-eventhub/CHANGELOG.md @@ -1,5 +1,32 @@ # Release History +## 10.0.0 (2021-11-01) + +**Features** + + - Model ErrorResponse has a new parameter error + - Model NetworkRuleSet has a new parameter location + - Model Eventhub has a new parameter location + - Model ConsumerGroup has a new parameter location + - Model ArmDisasterRecovery has a new parameter location + - Model Operation has a new parameter is_data_action + - Model Operation has a new parameter origin + - Model Operation has a new parameter properties + - Model PrivateEndpointConnection has a new parameter location + - Model Destination has a new parameter data_lake_account_name + - Model Destination has a new parameter data_lake_subscription_id + - Model Destination has a new parameter data_lake_folder_path + - Model EHNamespace has a new parameter alternate_name + - Model OperationDisplay has a new parameter description + - Model AuthorizationRule has a new parameter location + - Added operation NamespacesOperations.list_network_rule_set + - Added operation group SchemaRegistryOperations + +**Breaking changes** + + - Model ErrorResponse no longer has parameter message + - Model ErrorResponse no longer has parameter code + ## 9.1.0 (2021-09-17) **Features** @@ -291,4 +318,4 @@ This wheel package is built with the azure wheel extension ## 0.1.0 (2016-10-27) - - Initial Release \ No newline at end of file + - Initial Release diff --git a/sdk/eventhub/azure-mgmt-eventhub/_meta.json b/sdk/eventhub/azure-mgmt-eventhub/_meta.json index 76188907d20b..c843bcabf201 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/_meta.json +++ b/sdk/eventhub/azure-mgmt-eventhub/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "c9992af7235a6550087d4fed8f081ed35019f605", + "commit": "ea69fef496210478b8a9e2c3f8804f3acfb35891", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/eventhub/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/eventhub/resource-manager/readme.md" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_event_hub_management_client.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_event_hub_management_client.py index 54186c7530a8..26fb95dce989 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_event_hub_management_client.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_event_hub_management_client.py @@ -33,7 +33,7 @@ def __init__(self, *args, **kwargs): pass class EventHubManagementClient(MultiApiClientMixin, _SDKClient): - """Azure Event Hubs client. + """Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. This ready contains multiple API versions, to help you deal with all of the Azure clouds (Azure Stack, Azure Government, Azure China, etc.). @@ -56,11 +56,12 @@ class EventHubManagementClient(MultiApiClientMixin, _SDKClient): :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2017-04-01' + DEFAULT_API_VERSION = '2021-11-01' _PROFILE_TAG = "azure.mgmt.eventhub.EventHubManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, + 'regions': '2017-04-01', }}, _PROFILE_TAG + " latest" ) @@ -96,6 +97,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2018-01-01-preview: :mod:`v2018_01_01_preview.models` * 2021-01-01-preview: :mod:`v2021_01_01_preview.models` * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` + * 2021-11-01: :mod:`v2021_11_01.models` """ if api_version == '2015-08-01': from .v2015_08_01 import models @@ -112,6 +114,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-06-01-preview': from .v2021_06_01_preview import models return models + elif api_version == '2021-11-01': + from .v2021_11_01 import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -120,12 +125,15 @@ def clusters(self): * 2018-01-01-preview: :class:`ClustersOperations` * 2021-06-01-preview: :class:`ClustersOperations` + * 2021-11-01: :class:`ClustersOperations` """ api_version = self._get_api_version('clusters') if api_version == '2018-01-01-preview': from .v2018_01_01_preview.operations import ClustersOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ClustersOperations as OperationClass + elif api_version == '2021-11-01': + from .v2021_11_01.operations import ClustersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'clusters'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -136,12 +144,15 @@ def configuration(self): * 2018-01-01-preview: :class:`ConfigurationOperations` * 2021-06-01-preview: :class:`ConfigurationOperations` + * 2021-11-01: :class:`ConfigurationOperations` """ api_version = self._get_api_version('configuration') if api_version == '2018-01-01-preview': from .v2018_01_01_preview.operations import ConfigurationOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ConfigurationOperations as OperationClass + elif api_version == '2021-11-01': + from .v2021_11_01.operations import ConfigurationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'configuration'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -155,6 +166,7 @@ def consumer_groups(self): * 2018-01-01-preview: :class:`ConsumerGroupsOperations` * 2021-01-01-preview: :class:`ConsumerGroupsOperations` * 2021-06-01-preview: :class:`ConsumerGroupsOperations` + * 2021-11-01: :class:`ConsumerGroupsOperations` """ api_version = self._get_api_version('consumer_groups') if api_version == '2015-08-01': @@ -167,6 +179,8 @@ def consumer_groups(self): from .v2021_01_01_preview.operations import ConsumerGroupsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import ConsumerGroupsOperations as OperationClass + elif api_version == '2021-11-01': + from .v2021_11_01.operations import ConsumerGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'consumer_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -179,6 +193,7 @@ def disaster_recovery_configs(self): * 2018-01-01-preview: :class:`DisasterRecoveryConfigsOperations` * 2021-01-01-preview: :class:`DisasterRecoveryConfigsOperations` * 2021-06-01-preview: :class:`DisasterRecoveryConfigsOperations` + * 2021-11-01: :class:`DisasterRecoveryConfigsOperations` """ api_version = self._get_api_version('disaster_recovery_configs') if api_version == '2017-04-01': @@ -189,6 +204,8 @@ def disaster_recovery_configs(self): from .v2021_01_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import DisasterRecoveryConfigsOperations as OperationClass + elif api_version == '2021-11-01': + from .v2021_11_01.operations import DisasterRecoveryConfigsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disaster_recovery_configs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -202,6 +219,7 @@ def event_hubs(self): * 2018-01-01-preview: :class:`EventHubsOperations` * 2021-01-01-preview: :class:`EventHubsOperations` * 2021-06-01-preview: :class:`EventHubsOperations` + * 2021-11-01: :class:`EventHubsOperations` """ api_version = self._get_api_version('event_hubs') if api_version == '2015-08-01': @@ -214,6 +232,8 @@ def event_hubs(self): from .v2021_01_01_preview.operations import EventHubsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import EventHubsOperations as OperationClass + elif api_version == '2021-11-01': + from .v2021_11_01.operations import EventHubsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'event_hubs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -227,6 +247,7 @@ def namespaces(self): * 2018-01-01-preview: :class:`NamespacesOperations` * 2021-01-01-preview: :class:`NamespacesOperations` * 2021-06-01-preview: :class:`NamespacesOperations` + * 2021-11-01: :class:`NamespacesOperations` """ api_version = self._get_api_version('namespaces') if api_version == '2015-08-01': @@ -239,6 +260,8 @@ def namespaces(self): from .v2021_01_01_preview.operations import NamespacesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import NamespacesOperations as OperationClass + elif api_version == '2021-11-01': + from .v2021_11_01.operations import NamespacesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'namespaces'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -252,6 +275,7 @@ def operations(self): * 2018-01-01-preview: :class:`Operations` * 2021-01-01-preview: :class:`Operations` * 2021-06-01-preview: :class:`Operations` + * 2021-11-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2015-08-01': @@ -264,6 +288,8 @@ def operations(self): from .v2021_01_01_preview.operations import Operations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import Operations as OperationClass + elif api_version == '2021-11-01': + from .v2021_11_01.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -275,6 +301,7 @@ def private_endpoint_connections(self): * 2018-01-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2021-01-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations` + * 2021-11-01: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2018-01-01-preview': @@ -283,6 +310,8 @@ def private_endpoint_connections(self): from .v2021_01_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-11-01': + from .v2021_11_01.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -294,6 +323,7 @@ def private_link_resources(self): * 2018-01-01-preview: :class:`PrivateLinkResourcesOperations` * 2021-01-01-preview: :class:`PrivateLinkResourcesOperations` * 2021-06-01-preview: :class:`PrivateLinkResourcesOperations` + * 2021-11-01: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2018-01-01-preview': @@ -302,6 +332,8 @@ def private_link_resources(self): from .v2021_01_01_preview.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2021-06-01-preview': from .v2021_06_01_preview.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-11-01': + from .v2021_11_01.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -322,6 +354,19 @@ def regions(self): raise ValueError("API version {} does not have operation group 'regions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def schema_registry(self): + """Instance depends on the API version: + + * 2021-11-01: :class:`SchemaRegistryOperations` + """ + api_version = self._get_api_version('schema_registry') + if api_version == '2021-11-01': + from .v2021_11_01.operations import SchemaRegistryOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'schema_registry'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + def close(self): self._client.close() def __enter__(self): diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_version.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_version.py index 2bcd3a3e386b..ec4bcf3637ab 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_version.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "10.0.0" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/aio/_event_hub_management_client.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/aio/_event_hub_management_client.py index d9c6cc69154b..38f76459a789 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/aio/_event_hub_management_client.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/aio/_event_hub_management_client.py @@ -31,7 +31,7 @@ def __init__(self, *args, **kwargs): pass class EventHubManagementClient(MultiApiClientMixin, _SDKClient): - """Azure Event Hubs client. + """Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. This ready contains multiple API versions, to help you deal with all of the Azure clouds (Azure Stack, Azure Government, Azure China, etc.). @@ -54,11 +54,12 @@ class EventHubManagementClient(MultiApiClientMixin, _SDKClient): :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2017-04-01' + DEFAULT_API_VERSION = '2021-11-01' _PROFILE_TAG = "azure.mgmt.eventhub.EventHubManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, + 'regions': '2017-04-01', }}, _PROFILE_TAG + " latest" ) @@ -94,6 +95,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2018-01-01-preview: :mod:`v2018_01_01_preview.models` * 2021-01-01-preview: :mod:`v2021_01_01_preview.models` * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` + * 2021-11-01: :mod:`v2021_11_01.models` """ if api_version == '2015-08-01': from ..v2015_08_01 import models @@ -110,6 +112,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview import models return models + elif api_version == '2021-11-01': + from ..v2021_11_01 import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -118,12 +123,15 @@ def clusters(self): * 2018-01-01-preview: :class:`ClustersOperations` * 2021-06-01-preview: :class:`ClustersOperations` + * 2021-11-01: :class:`ClustersOperations` """ api_version = self._get_api_version('clusters') if api_version == '2018-01-01-preview': from ..v2018_01_01_preview.aio.operations import ClustersOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ClustersOperations as OperationClass + elif api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import ClustersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'clusters'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -134,12 +142,15 @@ def configuration(self): * 2018-01-01-preview: :class:`ConfigurationOperations` * 2021-06-01-preview: :class:`ConfigurationOperations` + * 2021-11-01: :class:`ConfigurationOperations` """ api_version = self._get_api_version('configuration') if api_version == '2018-01-01-preview': from ..v2018_01_01_preview.aio.operations import ConfigurationOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ConfigurationOperations as OperationClass + elif api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import ConfigurationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'configuration'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -153,6 +164,7 @@ def consumer_groups(self): * 2018-01-01-preview: :class:`ConsumerGroupsOperations` * 2021-01-01-preview: :class:`ConsumerGroupsOperations` * 2021-06-01-preview: :class:`ConsumerGroupsOperations` + * 2021-11-01: :class:`ConsumerGroupsOperations` """ api_version = self._get_api_version('consumer_groups') if api_version == '2015-08-01': @@ -165,6 +177,8 @@ def consumer_groups(self): from ..v2021_01_01_preview.aio.operations import ConsumerGroupsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import ConsumerGroupsOperations as OperationClass + elif api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import ConsumerGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'consumer_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -177,6 +191,7 @@ def disaster_recovery_configs(self): * 2018-01-01-preview: :class:`DisasterRecoveryConfigsOperations` * 2021-01-01-preview: :class:`DisasterRecoveryConfigsOperations` * 2021-06-01-preview: :class:`DisasterRecoveryConfigsOperations` + * 2021-11-01: :class:`DisasterRecoveryConfigsOperations` """ api_version = self._get_api_version('disaster_recovery_configs') if api_version == '2017-04-01': @@ -187,6 +202,8 @@ def disaster_recovery_configs(self): from ..v2021_01_01_preview.aio.operations import DisasterRecoveryConfigsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import DisasterRecoveryConfigsOperations as OperationClass + elif api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import DisasterRecoveryConfigsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'disaster_recovery_configs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -200,6 +217,7 @@ def event_hubs(self): * 2018-01-01-preview: :class:`EventHubsOperations` * 2021-01-01-preview: :class:`EventHubsOperations` * 2021-06-01-preview: :class:`EventHubsOperations` + * 2021-11-01: :class:`EventHubsOperations` """ api_version = self._get_api_version('event_hubs') if api_version == '2015-08-01': @@ -212,6 +230,8 @@ def event_hubs(self): from ..v2021_01_01_preview.aio.operations import EventHubsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import EventHubsOperations as OperationClass + elif api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import EventHubsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'event_hubs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -225,6 +245,7 @@ def namespaces(self): * 2018-01-01-preview: :class:`NamespacesOperations` * 2021-01-01-preview: :class:`NamespacesOperations` * 2021-06-01-preview: :class:`NamespacesOperations` + * 2021-11-01: :class:`NamespacesOperations` """ api_version = self._get_api_version('namespaces') if api_version == '2015-08-01': @@ -237,6 +258,8 @@ def namespaces(self): from ..v2021_01_01_preview.aio.operations import NamespacesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import NamespacesOperations as OperationClass + elif api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import NamespacesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'namespaces'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -250,6 +273,7 @@ def operations(self): * 2018-01-01-preview: :class:`Operations` * 2021-01-01-preview: :class:`Operations` * 2021-06-01-preview: :class:`Operations` + * 2021-11-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2015-08-01': @@ -262,6 +286,8 @@ def operations(self): from ..v2021_01_01_preview.aio.operations import Operations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import Operations as OperationClass + elif api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -273,6 +299,7 @@ def private_endpoint_connections(self): * 2018-01-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2021-01-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations` + * 2021-11-01: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2018-01-01-preview': @@ -281,6 +308,8 @@ def private_endpoint_connections(self): from ..v2021_01_01_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -292,6 +321,7 @@ def private_link_resources(self): * 2018-01-01-preview: :class:`PrivateLinkResourcesOperations` * 2021-01-01-preview: :class:`PrivateLinkResourcesOperations` * 2021-06-01-preview: :class:`PrivateLinkResourcesOperations` + * 2021-11-01: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2018-01-01-preview': @@ -300,6 +330,8 @@ def private_link_resources(self): from ..v2021_01_01_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2021-06-01-preview': from ..v2021_06_01_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -320,6 +352,19 @@ def regions(self): raise ValueError("API version {} does not have operation group 'regions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def schema_registry(self): + """Instance depends on the API version: + + * 2021-11-01: :class:`SchemaRegistryOperations` + """ + api_version = self._get_api_version('schema_registry') + if api_version == '2021-11-01': + from ..v2021_11_01.aio.operations import SchemaRegistryOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'schema_registry'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + async def close(self): await self._client.close() async def __aenter__(self): diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/models.py index 5572430ae05d..013276f989e6 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/models.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/models.py @@ -5,3 +5,4 @@ # license information. # -------------------------------------------------------------------------- from .v2017_04_01.models import * +from .v2021_11_01.models import * diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/_version.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/_version.py index f89ed38360ab..9f8bb24bdd99 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/_version.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2015_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "10.0.0" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/_version.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/_version.py index f89ed38360ab..9f8bb24bdd99 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/_version.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "10.0.0" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_models.py index c5ed65e0e26c..c3ba8c22a80e 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_models.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_models.py @@ -72,15 +72,17 @@ def __init__( class Resource(msrest.serialization.Model): - """The resource definition. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -111,11 +113,13 @@ class ArmDisasterRecovery(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar provisioning_state: Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: "Accepted", @@ -200,11 +204,13 @@ class AuthorizationRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param rights: The rights associated with the rule. :type rights: list[str or ~azure.mgmt.eventhub.v2017_04_01.models.AccessRights] @@ -370,11 +376,13 @@ class ConsumerGroup(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar created_at: Exact time the message was created. :vartype created_at: ~datetime.datetime @@ -476,11 +484,13 @@ class TrackedResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -516,11 +526,13 @@ class EHNamespace(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -645,11 +657,13 @@ class Eventhub(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar partition_ids: Current number of shards on the Event Hub. :vartype partition_ids: list[str] @@ -738,11 +752,13 @@ class MessagingPlan(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -796,11 +812,13 @@ class MessagingRegions(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -898,11 +916,13 @@ class NetworkRuleSet(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param default_action: Default Action for Network Rule Set. Possible values include: "Allow", "Deny". diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_models_py3.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_models_py3.py index 186f9641af2d..5610404f632d 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_models_py3.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2017_04_01/models/_models_py3.py @@ -76,15 +76,17 @@ def __init__( class Resource(msrest.serialization.Model): - """The resource definition. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -115,11 +117,13 @@ class ArmDisasterRecovery(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar provisioning_state: Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: "Accepted", @@ -209,11 +213,13 @@ class AuthorizationRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param rights: The rights associated with the rule. :type rights: list[str or ~azure.mgmt.eventhub.v2017_04_01.models.AccessRights] @@ -396,11 +402,13 @@ class ConsumerGroup(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar created_at: Exact time the message was created. :vartype created_at: ~datetime.datetime @@ -512,11 +520,13 @@ class TrackedResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -555,11 +565,13 @@ class EHNamespace(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -697,11 +709,13 @@ class Eventhub(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar partition_ids: Current number of shards on the Event Hub. :vartype partition_ids: list[str] @@ -798,11 +812,13 @@ class MessagingPlan(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -859,11 +875,13 @@ class MessagingRegions(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -967,11 +985,13 @@ class NetworkRuleSet(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param default_action: Default Action for Network Rule Set. Possible values include: "Allow", "Deny". diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_version.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_version.py index f89ed38360ab..9f8bb24bdd99 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_version.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "10.0.0" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py index 195086f8199a..dc45b5d93897 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models.py @@ -72,15 +72,17 @@ def __init__( class Resource(msrest.serialization.Model): - """The resource definition. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -111,11 +113,13 @@ class ArmDisasterRecovery(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar provisioning_state: Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: "Accepted", @@ -201,11 +205,13 @@ class AuthorizationRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param rights: The rights associated with the rule. :type rights: list[str or ~azure.mgmt.eventhub.v2018_01_01_preview.models.AccessRights] @@ -411,11 +417,13 @@ class TrackedResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -451,11 +459,13 @@ class Cluster(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -613,11 +623,13 @@ class ConsumerGroup(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar created_at: Exact time the message was created. :vartype created_at: ~datetime.datetime @@ -719,11 +731,13 @@ class EHNamespace(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -934,11 +948,13 @@ class Eventhub(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar partition_ids: Current number of shards on the Event Hub. :vartype partition_ids: list[str] @@ -1056,11 +1072,13 @@ class IpFilterRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param ip_mask: IP Mask. :type ip_mask: str @@ -1151,11 +1169,13 @@ class MessagingRegions(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -1253,11 +1273,13 @@ class NetworkRuleSet(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param trusted_service_access_enabled: Value that indicates whether Trusted Service Access is Enabled or not. @@ -1465,11 +1487,13 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param private_endpoint: The Private Endpoint resource for this Connection. :type private_endpoint: ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateEndpoint @@ -1682,11 +1706,13 @@ class VirtualNetworkRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param virtual_network_subnet_id: ARM ID of Virtual Network Subnet. :type virtual_network_subnet_id: str diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py index b77e8ceb7310..dcef990361ec 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2018_01_01_preview/models/_models_py3.py @@ -76,15 +76,17 @@ def __init__( class Resource(msrest.serialization.Model): - """The resource definition. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -115,11 +117,13 @@ class ArmDisasterRecovery(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar provisioning_state: Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: "Accepted", @@ -210,11 +214,13 @@ class AuthorizationRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param rights: The rights associated with the rule. :type rights: list[str or ~azure.mgmt.eventhub.v2018_01_01_preview.models.AccessRights] @@ -441,11 +447,13 @@ class TrackedResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -484,11 +492,13 @@ class Cluster(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -661,11 +671,13 @@ class ConsumerGroup(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar created_at: Exact time the message was created. :vartype created_at: ~datetime.datetime @@ -777,11 +789,13 @@ class EHNamespace(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -1016,11 +1030,13 @@ class Eventhub(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar partition_ids: Current number of shards on the Event Hub. :vartype partition_ids: list[str] @@ -1150,11 +1166,13 @@ class IpFilterRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param ip_mask: IP Mask. :type ip_mask: str @@ -1256,11 +1274,13 @@ class MessagingRegions(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -1364,11 +1384,13 @@ class NetworkRuleSet(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param trusted_service_access_enabled: Value that indicates whether Trusted Service Access is Enabled or not. @@ -1591,11 +1613,13 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param private_endpoint: The Private Endpoint resource for this Connection. :type private_endpoint: ~azure.mgmt.eventhub.v2018_01_01_preview.models.PrivateEndpoint @@ -1834,11 +1858,13 @@ class VirtualNetworkRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param virtual_network_subnet_id: ARM ID of Virtual Network Subnet. :type virtual_network_subnet_id: str diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/_version.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/_version.py index f89ed38360ab..9f8bb24bdd99 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/_version.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "10.0.0" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/models/_models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/models/_models.py index f1080cbf888e..37cbb6b1b5d3 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/models/_models.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/models/_models.py @@ -72,15 +72,17 @@ def __init__( class Resource(msrest.serialization.Model): - """The resource definition. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -111,11 +113,13 @@ class ArmDisasterRecovery(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -206,11 +210,13 @@ class AuthorizationRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -437,11 +443,13 @@ class ConsumerGroup(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -548,11 +556,13 @@ class TrackedResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -588,11 +598,13 @@ class EHNamespace(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -779,11 +791,13 @@ class Eventhub(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -948,11 +962,13 @@ class NetworkRuleSet(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -1165,11 +1181,13 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/models/_models_py3.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/models/_models_py3.py index 0bfac6b984e8..be38218e4afb 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/models/_models_py3.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_01_01_preview/models/_models_py3.py @@ -77,15 +77,17 @@ def __init__( class Resource(msrest.serialization.Model): - """The resource definition. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -116,11 +118,13 @@ class ArmDisasterRecovery(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -216,11 +220,13 @@ class AuthorizationRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -467,11 +473,13 @@ class ConsumerGroup(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -588,11 +596,13 @@ class TrackedResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -631,11 +641,13 @@ class EHNamespace(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -844,11 +856,13 @@ class Eventhub(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -1029,11 +1043,13 @@ class NetworkRuleSet(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData @@ -1261,11 +1277,13 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_01_01_preview.models.SystemData diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/_version.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/_version.py index f89ed38360ab..9f8bb24bdd99 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/_version.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "10.0.0" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models.py index 098183c8cdbb..06a26cac19ec 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models.py @@ -72,15 +72,17 @@ def __init__( class Resource(msrest.serialization.Model): - """The resource definition. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -111,11 +113,13 @@ class ArmDisasterRecovery(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -206,11 +210,13 @@ class AuthorizationRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -416,11 +422,13 @@ class TrackedResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -456,11 +464,13 @@ class Cluster(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -623,11 +633,13 @@ class ConsumerGroup(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -734,11 +746,13 @@ class EHNamespace(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -967,11 +981,13 @@ class Eventhub(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -1136,11 +1152,13 @@ class NetworkRuleSet(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -1360,11 +1378,13 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models_py3.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models_py3.py index d43fd908426a..1a9c1964abb8 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models_py3.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_06_01_preview/models/_models_py3.py @@ -77,15 +77,17 @@ def __init__( class Resource(msrest.serialization.Model): - """The resource definition. + """Common fields that are returned in the response for all Azure Resource Manager resources. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str """ @@ -116,11 +118,13 @@ class ArmDisasterRecovery(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -216,11 +220,13 @@ class AuthorizationRule(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -447,11 +453,13 @@ class TrackedResource(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -490,11 +498,13 @@ class Cluster(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -672,11 +682,13 @@ class ConsumerGroup(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -793,11 +805,13 @@ class EHNamespace(TrackedResource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :param location: Resource location. :type location: str @@ -1053,11 +1067,13 @@ class Eventhub(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -1238,11 +1254,13 @@ class NetworkRuleSet(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData @@ -1478,11 +1496,13 @@ class PrivateEndpointConnection(Resource): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource ID. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. :vartype id: str - :ivar name: Resource name. + :ivar name: The name of the resource. :vartype name: str - :ivar type: Resource type. + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". :vartype type: str :ivar system_data: The system meta data relating to this resource. :vartype system_data: ~azure.mgmt.eventhub.v2021_06_01_preview.models.SystemData diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/__init__.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/__init__.py new file mode 100644 index 000000000000..b65464aa7533 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._event_hub_management_client import EventHubManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['EventHubManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_configuration.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_configuration.py new file mode 100644 index 000000000000..f1a299fb1334 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class EventHubManagementClientConfiguration(Configuration): + """Configuration for EventHubManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(EventHubManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-11-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-eventhub/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_event_hub_management_client.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_event_hub_management_client.py new file mode 100644 index 000000000000..e840aaea7660 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_event_hub_management_client.py @@ -0,0 +1,134 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import EventHubManagementClientConfiguration +from .operations import ClustersOperations +from .operations import ConfigurationOperations +from .operations import NamespacesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import Operations +from .operations import EventHubsOperations +from .operations import DisasterRecoveryConfigsOperations +from .operations import ConsumerGroupsOperations +from .operations import SchemaRegistryOperations +from . import models + + +class EventHubManagementClient(object): + """Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. + + :ivar clusters: ClustersOperations operations + :vartype clusters: azure.mgmt.eventhub.v2021_11_01.operations.ClustersOperations + :ivar configuration: ConfigurationOperations operations + :vartype configuration: azure.mgmt.eventhub.v2021_11_01.operations.ConfigurationOperations + :ivar namespaces: NamespacesOperations operations + :vartype namespaces: azure.mgmt.eventhub.v2021_11_01.operations.NamespacesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.eventhub.v2021_11_01.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.eventhub.v2021_11_01.operations.PrivateLinkResourcesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.eventhub.v2021_11_01.operations.Operations + :ivar event_hubs: EventHubsOperations operations + :vartype event_hubs: azure.mgmt.eventhub.v2021_11_01.operations.EventHubsOperations + :ivar disaster_recovery_configs: DisasterRecoveryConfigsOperations operations + :vartype disaster_recovery_configs: azure.mgmt.eventhub.v2021_11_01.operations.DisasterRecoveryConfigsOperations + :ivar consumer_groups: ConsumerGroupsOperations operations + :vartype consumer_groups: azure.mgmt.eventhub.v2021_11_01.operations.ConsumerGroupsOperations + :ivar schema_registry: SchemaRegistryOperations operations + :vartype schema_registry: azure.mgmt.eventhub.v2021_11_01.operations.SchemaRegistryOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = EventHubManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.clusters = ClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.configuration = ConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.namespaces = NamespacesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.event_hubs = EventHubsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.disaster_recovery_configs = DisasterRecoveryConfigsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.consumer_groups = ConsumerGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.schema_registry = SchemaRegistryOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> EventHubManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_metadata.json b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_metadata.json new file mode 100644 index 000000000000..9f119f332f0e --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_metadata.json @@ -0,0 +1,112 @@ +{ + "chosen_version": "2021-11-01", + "total_api_version_list": ["2021-11-01"], + "client": { + "name": "EventHubManagementClient", + "filename": "_event_hub_management_client", + "description": "Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"EventHubManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"EventHubManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "clusters": "ClustersOperations", + "configuration": "ConfigurationOperations", + "namespaces": "NamespacesOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations", + "operations": "Operations", + "event_hubs": "EventHubsOperations", + "disaster_recovery_configs": "DisasterRecoveryConfigsOperations", + "consumer_groups": "ConsumerGroupsOperations", + "schema_registry": "SchemaRegistryOperations" + } +} \ No newline at end of file diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_version.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_version.py new file mode 100644 index 000000000000..9f8bb24bdd99 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "10.0.0" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/__init__.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/__init__.py new file mode 100644 index 000000000000..7cb0ca65be40 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._event_hub_management_client import EventHubManagementClient +__all__ = ['EventHubManagementClient'] diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/_configuration.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/_configuration.py new file mode 100644 index 000000000000..cfe268371392 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class EventHubManagementClientConfiguration(Configuration): + """Configuration for EventHubManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(EventHubManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-11-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-eventhub/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/_event_hub_management_client.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/_event_hub_management_client.py new file mode 100644 index 000000000000..7fad9c62661f --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/_event_hub_management_client.py @@ -0,0 +1,127 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import EventHubManagementClientConfiguration +from .operations import ClustersOperations +from .operations import ConfigurationOperations +from .operations import NamespacesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import Operations +from .operations import EventHubsOperations +from .operations import DisasterRecoveryConfigsOperations +from .operations import ConsumerGroupsOperations +from .operations import SchemaRegistryOperations +from .. import models + + +class EventHubManagementClient(object): + """Azure Event Hubs client for managing Event Hubs Cluster, IPFilter Rules and VirtualNetworkRules resources. + + :ivar clusters: ClustersOperations operations + :vartype clusters: azure.mgmt.eventhub.v2021_11_01.aio.operations.ClustersOperations + :ivar configuration: ConfigurationOperations operations + :vartype configuration: azure.mgmt.eventhub.v2021_11_01.aio.operations.ConfigurationOperations + :ivar namespaces: NamespacesOperations operations + :vartype namespaces: azure.mgmt.eventhub.v2021_11_01.aio.operations.NamespacesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.eventhub.v2021_11_01.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.eventhub.v2021_11_01.aio.operations.PrivateLinkResourcesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.eventhub.v2021_11_01.aio.operations.Operations + :ivar event_hubs: EventHubsOperations operations + :vartype event_hubs: azure.mgmt.eventhub.v2021_11_01.aio.operations.EventHubsOperations + :ivar disaster_recovery_configs: DisasterRecoveryConfigsOperations operations + :vartype disaster_recovery_configs: azure.mgmt.eventhub.v2021_11_01.aio.operations.DisasterRecoveryConfigsOperations + :ivar consumer_groups: ConsumerGroupsOperations operations + :vartype consumer_groups: azure.mgmt.eventhub.v2021_11_01.aio.operations.ConsumerGroupsOperations + :ivar schema_registry: SchemaRegistryOperations operations + :vartype schema_registry: azure.mgmt.eventhub.v2021_11_01.aio.operations.SchemaRegistryOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = EventHubManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.clusters = ClustersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.configuration = ConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.namespaces = NamespacesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.event_hubs = EventHubsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.disaster_recovery_configs = DisasterRecoveryConfigsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.consumer_groups = ConsumerGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.schema_registry = SchemaRegistryOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "EventHubManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/__init__.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/__init__.py new file mode 100644 index 000000000000..84e125803ca8 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/__init__.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._clusters_operations import ClustersOperations +from ._configuration_operations import ConfigurationOperations +from ._namespaces_operations import NamespacesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._operations import Operations +from ._event_hubs_operations import EventHubsOperations +from ._disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations +from ._consumer_groups_operations import ConsumerGroupsOperations +from ._schema_registry_operations import SchemaRegistryOperations + +__all__ = [ + 'ClustersOperations', + 'ConfigurationOperations', + 'NamespacesOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'Operations', + 'EventHubsOperations', + 'DisasterRecoveryConfigsOperations', + 'ConsumerGroupsOperations', + 'SchemaRegistryOperations', +] diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_clusters_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_clusters_operations.py new file mode 100644 index 000000000000..baf55004d239 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_clusters_operations.py @@ -0,0 +1,720 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ClustersOperations: + """ClustersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_available_cluster_region( + self, + **kwargs: Any + ) -> "_models.AvailableClustersList": + """List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AvailableClustersList, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AvailableClustersList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableClustersList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_available_cluster_region.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AvailableClustersList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_available_cluster_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ClusterListResult"]: + """Lists the available Event Hubs Clusters within an ARM resource group. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.ClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ClusterListResult"]: + """Lists the available Event Hubs Clusters within an ARM resource group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ClusterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.ClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters'} # type: ignore + + async def get( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> "_models.Cluster": + """Gets the resource description of the specified Event Hubs Cluster. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Cluster, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.Cluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + cluster_name: str, + parameters: "_models.Cluster", + **kwargs: Any + ) -> Optional["_models.Cluster"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Cluster"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Cluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Cluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: "_models.Cluster", + **kwargs: Any + ) -> AsyncLROPoller["_models.Cluster"]: + """Creates or updates an instance of an Event Hubs Cluster. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :param parameters: Parameters for creating a eventhub cluster resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.Cluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventhub.v2021_11_01.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + cluster_name: str, + parameters: "_models.Cluster", + **kwargs: Any + ) -> Optional["_models.Cluster"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Cluster"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Cluster') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Cluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + cluster_name: str, + parameters: "_models.Cluster", + **kwargs: Any + ) -> AsyncLROPoller["_models.Cluster"]: + """Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :param parameters: The properties of the Event Hubs Cluster which should be updated. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.Cluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either Cluster or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventhub.v2021_11_01.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing Event Hubs Cluster. This operation is idempotent. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + async def list_namespaces( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> "_models.EHNamespaceIdListResult": + """List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EHNamespaceIdListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespaceIdListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespaceIdListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_namespaces.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EHNamespaceIdListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_namespaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_configuration_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_configuration_operations.py new file mode 100644 index 000000000000..b0abe2109711 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_configuration_operations.py @@ -0,0 +1,174 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ConfigurationOperations: + """ConfigurationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def patch( + self, + resource_group_name: str, + cluster_name: str, + parameters: "_models.ClusterQuotaConfigurationProperties", + **kwargs: Any + ) -> Optional["_models.ClusterQuotaConfigurationProperties"]: + """Replace all specified Event Hubs Cluster settings with those contained in the request body. + Leaves the settings not specified in the request body unmodified. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :param parameters: Parameters for creating an Event Hubs Cluster resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.ClusterQuotaConfigurationProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterQuotaConfigurationProperties, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ClusterQuotaConfigurationProperties or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ClusterQuotaConfigurationProperties"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ClusterQuotaConfigurationProperties') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ClusterQuotaConfigurationProperties', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ClusterQuotaConfigurationProperties', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default'} # type: ignore + + async def get( + self, + resource_group_name: str, + cluster_name: str, + **kwargs: Any + ) -> "_models.ClusterQuotaConfigurationProperties": + """Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the + quotas and settings imposed on the cluster. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterQuotaConfigurationProperties, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ClusterQuotaConfigurationProperties + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterQuotaConfigurationProperties"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterQuotaConfigurationProperties', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_consumer_groups_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_consumer_groups_operations.py new file mode 100644 index 000000000000..6ddd90a50a91 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_consumer_groups_operations.py @@ -0,0 +1,340 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ConsumerGroupsOperations: + """ConsumerGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_or_update( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + consumer_group_name: str, + parameters: "_models.ConsumerGroup", + **kwargs: Any + ) -> "_models.ConsumerGroup": + """Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param consumer_group_name: The consumer group name. + :type consumer_group_name: str + :param parameters: Parameters supplied to create or update a consumer group resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerGroup, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConsumerGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ConsumerGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConsumerGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + consumer_group_name: str, + **kwargs: Any + ) -> None: + """Deletes a consumer group from the specified Event Hub and resource group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param consumer_group_name: The consumer group name. + :type consumer_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + consumer_group_name: str, + **kwargs: Any + ) -> "_models.ConsumerGroup": + """Gets a description for the specified consumer group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param consumer_group_name: The consumer group name. + :type consumer_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerGroup, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConsumerGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConsumerGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'} # type: ignore + + def list_by_event_hub( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + skip: Optional[int] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ConsumerGroupListResult"]: + """Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group + exists in the Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param skip: Skip is only used if a previous operation returned a partial result. If a previous + response contains a nextLink element, the value of the nextLink element will include a skip + parameter that specifies a starting point to use for subsequent calls. + :type skip: int + :param top: May be used to limit the number of results to the most recent N usageDetails. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConsumerGroupListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConsumerGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_event_hub.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', maximum=1000, minimum=0) + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ConsumerGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_event_hub.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_disaster_recovery_configs_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_disaster_recovery_configs_operations.py new file mode 100644 index 000000000000..0305ee0e8802 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_disaster_recovery_configs_operations.py @@ -0,0 +1,714 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DisasterRecoveryConfigsOperations: + """DisasterRecoveryConfigsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def check_name_availability( + self, + resource_group_name: str, + namespace_name: str, + parameters: "_models.CheckNameAvailabilityParameter", + **kwargs: Any + ) -> "_models.CheckNameAvailabilityResult": + """Check the give Namespace name availability. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param parameters: Parameters to check availability of the given Alias name. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.CheckNameAvailabilityParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.CheckNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability'} # type: ignore + + def list( + self, + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ArmDisasterRecoveryListResult"]: + """Gets all Alias(Disaster Recovery configurations). + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ArmDisasterRecoveryListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecoveryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ArmDisasterRecoveryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ArmDisasterRecoveryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + namespace_name: str, + alias: str, + parameters: "_models.ArmDisasterRecovery", + **kwargs: Any + ) -> Optional["_models.ArmDisasterRecovery"]: + """Creates or updates a new Alias(Disaster Recovery configuration). + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :param parameters: Parameters required to create an Alias(Disaster Recovery configuration). + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecovery + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ArmDisasterRecovery, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecovery or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ArmDisasterRecovery"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ArmDisasterRecovery') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ArmDisasterRecovery', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + namespace_name: str, + alias: str, + **kwargs: Any + ) -> None: + """Deletes an Alias(Disaster Recovery configuration). + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'} # type: ignore + + async def get( + self, + resource_group_name: str, + namespace_name: str, + alias: str, + **kwargs: Any + ) -> "_models.ArmDisasterRecovery": + """Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ArmDisasterRecovery, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecovery + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ArmDisasterRecovery"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ArmDisasterRecovery', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'} # type: ignore + + async def break_pairing( + self, + resource_group_name: str, + namespace_name: str, + alias: str, + **kwargs: Any + ) -> None: + """This operation disables the Disaster Recovery and stops replicating changes from primary to + secondary namespaces. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.break_pairing.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + break_pairing.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing'} # type: ignore + + async def fail_over( + self, + resource_group_name: str, + namespace_name: str, + alias: str, + **kwargs: Any + ) -> None: + """Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.fail_over.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + fail_over.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover'} # type: ignore + + def list_authorization_rules( + self, + resource_group_name: str, + namespace_name: str, + alias: str, + **kwargs: Any + ) -> AsyncIterable["_models.AuthorizationRuleListResult"]: + """Gets a list of authorization rules for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AuthorizationRuleListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_authorization_rules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AuthorizationRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules'} # type: ignore + + async def get_authorization_rule( + self, + resource_group_name: str, + namespace_name: str, + alias: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.AuthorizationRule": + """Gets an AuthorizationRule for a Namespace by rule name. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'} # type: ignore + + async def list_keys( + self, + resource_group_name: str, + namespace_name: str, + alias: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.AccessKeys": + """Gets the primary and secondary connection strings for the Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_event_hubs_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_event_hubs_operations.py new file mode 100644 index 000000000000..41633f87c474 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_event_hubs_operations.py @@ -0,0 +1,752 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EventHubsOperations: + """EventHubsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_namespace( + self, + resource_group_name: str, + namespace_name: str, + skip: Optional[int] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.EventHubListResult"]: + """Gets all the Event Hubs in a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param skip: Skip is only used if a previous operation returned a partial result. If a previous + response contains a nextLink element, the value of the nextLink element will include a skip + parameter that specifies a starting point to use for subsequent calls. + :type skip: int + :param top: May be used to limit the number of results to the most recent N usageDetails. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EventHubListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.EventHubListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EventHubListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_namespace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', maximum=1000, minimum=0) + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('EventHubListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + parameters: "_models.Eventhub", + **kwargs: Any + ) -> "_models.Eventhub": + """Creates or updates a new Event Hub as a nested resource within a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param parameters: Parameters supplied to create an Event Hub resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.Eventhub + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Eventhub, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.Eventhub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Eventhub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Eventhub') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Eventhub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + **kwargs: Any + ) -> None: + """Deletes an Event Hub from the specified Namespace and resource group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + **kwargs: Any + ) -> "_models.Eventhub": + """Gets an Event Hubs description for the specified Event Hub. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Eventhub, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.Eventhub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Eventhub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Eventhub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'} # type: ignore + + def list_authorization_rules( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AuthorizationRuleListResult"]: + """Gets the authorization rules for an Event Hub. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AuthorizationRuleListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_authorization_rules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AuthorizationRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules'} # type: ignore + + async def create_or_update_authorization_rule( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + authorization_rule_name: str, + parameters: "_models.AuthorizationRule", + **kwargs: Any + ) -> "_models.AuthorizationRule": + """Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the + AuthorizationRule will take a few seconds to take effect. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param parameters: The shared access AuthorizationRule. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AuthorizationRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + async def get_authorization_rule( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.AuthorizationRule": + """Gets an AuthorizationRule for an Event Hub by rule name. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + async def delete_authorization_rule( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> None: + """Deletes an Event Hub AuthorizationRule. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + async def list_keys( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.AccessKeys": + """Gets the ACS and SAS connection strings for the Event Hub. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys'} # type: ignore + + async def regenerate_keys( + self, + resource_group_name: str, + namespace_name: str, + event_hub_name: str, + authorization_rule_name: str, + parameters: "_models.RegenerateAccessKeyParameters", + **kwargs: Any + ) -> "_models.AccessKeys": + """Regenerates the ACS and SAS connection strings for the Event Hub. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param parameters: Parameters supplied to regenerate the AuthorizationRule Keys + (PrimaryKey/SecondaryKey). + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.RegenerateAccessKeyParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RegenerateAccessKeyParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_namespaces_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_namespaces_operations.py new file mode 100644 index 000000000000..a189f62e52db --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_namespaces_operations.py @@ -0,0 +1,1202 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NamespacesOperations: + """NamespacesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.EHNamespaceListResult"]: + """Lists all the available Namespaces within a subscription, irrespective of the resource groups. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EHNamespaceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('EHNamespaceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.EHNamespaceListResult"]: + """Lists the available Namespaces within a resource group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EHNamespaceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('EHNamespaceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + namespace_name: str, + parameters: "_models.EHNamespace", + **kwargs: Any + ) -> Optional["_models.EHNamespace"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EHNamespace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'EHNamespace') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + namespace_name: str, + parameters: "_models.EHNamespace", + **kwargs: Any + ) -> AsyncLROPoller["_models.EHNamespace"]: + """Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. + This operation is idempotent. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param parameters: Parameters for creating a namespace resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either EHNamespace or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespace"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + namespace_name=namespace_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes an existing namespace. This operation also removes all associated resources under the + namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + namespace_name=namespace_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> "_models.EHNamespace": + """Gets the description of the specified namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EHNamespace, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + namespace_name: str, + parameters: "_models.EHNamespace", + **kwargs: Any + ) -> Optional["_models.EHNamespace"]: + """Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. + This operation is idempotent. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param parameters: Parameters for updating a namespace resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EHNamespace, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EHNamespace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'EHNamespace') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + async def create_or_update_network_rule_set( + self, + resource_group_name: str, + namespace_name: str, + parameters: "_models.NetworkRuleSet", + **kwargs: Any + ) -> "_models.NetworkRuleSet": + """Create or update NetworkRuleSet for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param parameters: The Namespace IpFilterRule. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSet + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkRuleSet, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkRuleSet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_network_rule_set.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkRuleSet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkRuleSet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'} # type: ignore + + async def get_network_rule_set( + self, + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> "_models.NetworkRuleSet": + """Gets NetworkRuleSet for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkRuleSet, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkRuleSet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get_network_rule_set.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkRuleSet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'} # type: ignore + + async def list_network_rule_set( + self, + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> "_models.NetworkRuleSetListResult": + """Gets NetworkRuleSet for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkRuleSetListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSetListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkRuleSetListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_network_rule_set.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkRuleSetListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets'} # type: ignore + + def list_authorization_rules( + self, + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AuthorizationRuleListResult"]: + """Gets a list of authorization rules for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AuthorizationRuleListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_authorization_rules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AuthorizationRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules'} # type: ignore + + async def create_or_update_authorization_rule( + self, + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + parameters: "_models.AuthorizationRule", + **kwargs: Any + ) -> "_models.AuthorizationRule": + """Creates or updates an AuthorizationRule for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param parameters: The shared access AuthorizationRule. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AuthorizationRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + async def delete_authorization_rule( + self, + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> None: + """Deletes an AuthorizationRule for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + async def get_authorization_rule( + self, + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.AuthorizationRule": + """Gets an AuthorizationRule for a Namespace by rule name. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + async def list_keys( + self, + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + **kwargs: Any + ) -> "_models.AccessKeys": + """Gets the primary and secondary connection strings for the Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys'} # type: ignore + + async def regenerate_keys( + self, + resource_group_name: str, + namespace_name: str, + authorization_rule_name: str, + parameters: "_models.RegenerateAccessKeyParameters", + **kwargs: Any + ) -> "_models.AccessKeys": + """Regenerates the primary or secondary connection strings for the specified Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param parameters: Parameters required to regenerate the connection string. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.RegenerateAccessKeyParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RegenerateAccessKeyParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys'} # type: ignore + + async def check_name_availability( + self, + parameters: "_models.CheckNameAvailabilityParameter", + **kwargs: Any + ) -> "_models.CheckNameAvailabilityResult": + """Check the give Namespace name availability. + + :param parameters: Parameters to check availability of the given Namespace name. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.CheckNameAvailabilityParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.CheckNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_operations.py new file mode 100644 index 000000000000..23698290f5d5 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationListResult"]: + """Lists all of the available Event Hub REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.EventHub/operations'} # type: ignore diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_channels_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_private_endpoint_connections_operations.py similarity index 64% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_channels_operations.py rename to sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_private_endpoint_connections_operations.py index 24f25ffd0dd1..3223f068073a 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/aio/operations/_event_channels_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_private_endpoint_connections_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class EventChannelsOperations: - """EventChannelsOperations async operations. +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~azure.mgmt.eventhub.v2021_11_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,101 +43,111 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def get( + def list( self, resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, + namespace_name: str, **kwargs: Any - ) -> "_models.EventChannel": - """Get an event channel. - - Get properties of an event channel. + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """Gets the available PrivateEndpointConnections within a namespace. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: Name of the resource group within the azure subscription. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param event_channel_name: Name of the event channel. - :type event_channel_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventChannel, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventChannel + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannel"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-11-01" accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def get_next(next_link=None): + request = prepare_request(next_link) - deserialized = self._deserialize('EventChannel', pipeline_response) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - if cls: - return cls(pipeline_response, deserialized, {}) + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'} # type: ignore + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections'} # type: ignore async def create_or_update( self, resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, - event_channel_info: "_models.EventChannel", + namespace_name: str, + private_endpoint_connection_name: str, + parameters: "_models.PrivateEndpointConnection", **kwargs: Any - ) -> "_models.EventChannel": - """Create an event channel. + ) -> "_models.PrivateEndpointConnection": + """Creates or updates PrivateEndpointConnections of service namespace. - Asynchronously creates a new event channel with the specified parameters. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: Name of the resource group within the azure subscription. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param event_channel_name: Name of the event channel. - :type event_channel_name: str - :param event_channel_info: EventChannel information. - :type event_channel_info: ~azure.mgmt.eventgrid.models.EventChannel + :param namespace_name: The Namespace name. + :type namespace_name: str + :param private_endpoint_connection_name: The PrivateEndpointConnection name. + :type private_endpoint_connection_name: str + :param parameters: Parameters supplied to update Status of PrivateEndPoint Connection to + namespace resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventChannel, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventChannel + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannel"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -145,9 +155,9 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -161,29 +171,34 @@ async def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(event_channel_info, 'EventChannel') + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - deserialized = self._deserialize('EventChannel', pipeline_response) + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore async def _delete_initial( self, resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, + namespace_name: str, + private_endpoint_connection_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -191,15 +206,16 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-11-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -209,6 +225,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -216,30 +233,30 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - partner_namespace_name: str, - event_channel_name: str, + namespace_name: str, + private_endpoint_connection_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Delete an event channel. + """Deletes an existing namespace. This operation also removes all associated resources under the + namespace. - Delete existing event channel. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: Name of the resource group within the azure subscription. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param event_channel_name: Name of the event channel. - :type event_channel_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param private_endpoint_connection_name: The PrivateEndpointConnection name. + :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -260,8 +277,8 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, + namespace_name=namespace_name, + private_endpoint_connection_name=private_endpoint_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -274,10 +291,10 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -292,97 +309,67 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - def list_by_partner_namespace( + async def get( self, resource_group_name: str, - partner_namespace_name: str, - filter: Optional[str] = None, - top: Optional[int] = None, + namespace_name: str, + private_endpoint_connection_name: str, **kwargs: Any - ) -> AsyncIterable["_models.EventChannelsListResult"]: - """List event channels. + ) -> "_models.PrivateEndpointConnection": + """Gets a description for the specified Private Endpoint Connection name. - List all the event channels in a partner namespace. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: Name of the resource group within the azure subscription. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int + :param namespace_name: The Namespace name. + :type namespace_name: str + :param private_endpoint_connection_name: The PrivateEndpointConnection name. + :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EventChannelsListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventgrid.models.EventChannelsListResult] + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannelsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-11-01" accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_partner_namespace.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('EventChannelsListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return AsyncItemPaged( - get_next, extract_data - ) - list_by_partner_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_private_link_resources_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..30de42df8521 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + namespace_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourcesListResult": + """Gets lists of resources that supports Privatelinks. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_schema_registry_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_schema_registry_operations.py new file mode 100644 index 000000000000..b2058bf3926a --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/aio/operations/_schema_registry_operations.py @@ -0,0 +1,323 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SchemaRegistryOperations: + """SchemaRegistryOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_namespace( + self, + resource_group_name: str, + namespace_name: str, + skip: Optional[int] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.SchemaGroupListResult"]: + """Gets all the Schema Groups in a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param skip: Skip is only used if a previous operation returned a partial result. If a previous + response contains a nextLink element, the value of the nextLink element will include a skip + parameter that specifies a starting point to use for subsequent calls. + :type skip: int + :param top: May be used to limit the number of results to the most recent N usageDetails. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SchemaGroupListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SchemaGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_namespace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', maximum=1000, minimum=0) + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SchemaGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + namespace_name: str, + schema_group_name: str, + parameters: "_models.SchemaGroup", + **kwargs: Any + ) -> "_models.SchemaGroup": + """create_or_update. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param schema_group_name: The Schema Group name. + :type schema_group_name: str + :param parameters: Parameters supplied to create an Event Hub resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SchemaGroup, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SchemaGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'schemaGroupName': self._serialize.url("schema_group_name", schema_group_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SchemaGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SchemaGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + namespace_name: str, + schema_group_name: str, + **kwargs: Any + ) -> None: + """delete. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param schema_group_name: The Schema Group name. + :type schema_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'schemaGroupName': self._serialize.url("schema_group_name", schema_group_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + namespace_name: str, + schema_group_name: str, + **kwargs: Any + ) -> "_models.SchemaGroup": + """get. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param schema_group_name: The Schema Group name. + :type schema_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SchemaGroup, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SchemaGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'schemaGroupName': self._serialize.url("schema_group_name", schema_group_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SchemaGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/__init__.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/__init__.py new file mode 100644 index 000000000000..8e811e9ce424 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/__init__.py @@ -0,0 +1,213 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AccessKeys + from ._models_py3 import ArmDisasterRecovery + from ._models_py3 import ArmDisasterRecoveryListResult + from ._models_py3 import AuthorizationRule + from ._models_py3 import AuthorizationRuleListResult + from ._models_py3 import AvailableCluster + from ._models_py3 import AvailableClustersList + from ._models_py3 import CaptureDescription + from ._models_py3 import CheckNameAvailabilityParameter + from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import Cluster + from ._models_py3 import ClusterListResult + from ._models_py3 import ClusterQuotaConfigurationProperties + from ._models_py3 import ClusterSku + from ._models_py3 import ConnectionState + from ._models_py3 import ConsumerGroup + from ._models_py3 import ConsumerGroupListResult + from ._models_py3 import Destination + from ._models_py3 import EHNamespace + from ._models_py3 import EHNamespaceIdContainer + from ._models_py3 import EHNamespaceIdListResult + from ._models_py3 import EHNamespaceListResult + from ._models_py3 import Encryption + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorResponse + from ._models_py3 import EventHubListResult + from ._models_py3 import Eventhub + from ._models_py3 import Identity + from ._models_py3 import KeyVaultProperties + from ._models_py3 import NWRuleSetIpRules + from ._models_py3 import NWRuleSetVirtualNetworkRules + from ._models_py3 import NetworkRuleSet + from ._models_py3 import NetworkRuleSetListResult + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourcesListResult + from ._models_py3 import ProxyResource + from ._models_py3 import RegenerateAccessKeyParameters + from ._models_py3 import Resource + from ._models_py3 import SchemaGroup + from ._models_py3 import SchemaGroupListResult + from ._models_py3 import Sku + from ._models_py3 import Subnet + from ._models_py3 import SystemData + from ._models_py3 import TrackedResource + from ._models_py3 import UserAssignedIdentity + from ._models_py3 import UserAssignedIdentityProperties +except (SyntaxError, ImportError): + from ._models import AccessKeys # type: ignore + from ._models import ArmDisasterRecovery # type: ignore + from ._models import ArmDisasterRecoveryListResult # type: ignore + from ._models import AuthorizationRule # type: ignore + from ._models import AuthorizationRuleListResult # type: ignore + from ._models import AvailableCluster # type: ignore + from ._models import AvailableClustersList # type: ignore + from ._models import CaptureDescription # type: ignore + from ._models import CheckNameAvailabilityParameter # type: ignore + from ._models import CheckNameAvailabilityResult # type: ignore + from ._models import Cluster # type: ignore + from ._models import ClusterListResult # type: ignore + from ._models import ClusterQuotaConfigurationProperties # type: ignore + from ._models import ClusterSku # type: ignore + from ._models import ConnectionState # type: ignore + from ._models import ConsumerGroup # type: ignore + from ._models import ConsumerGroupListResult # type: ignore + from ._models import Destination # type: ignore + from ._models import EHNamespace # type: ignore + from ._models import EHNamespaceIdContainer # type: ignore + from ._models import EHNamespaceIdListResult # type: ignore + from ._models import EHNamespaceListResult # type: ignore + from ._models import Encryption # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import EventHubListResult # type: ignore + from ._models import Eventhub # type: ignore + from ._models import Identity # type: ignore + from ._models import KeyVaultProperties # type: ignore + from ._models import NWRuleSetIpRules # type: ignore + from ._models import NWRuleSetVirtualNetworkRules # type: ignore + from ._models import NetworkRuleSet # type: ignore + from ._models import NetworkRuleSetListResult # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourcesListResult # type: ignore + from ._models import ProxyResource # type: ignore + from ._models import RegenerateAccessKeyParameters # type: ignore + from ._models import Resource # type: ignore + from ._models import SchemaGroup # type: ignore + from ._models import SchemaGroupListResult # type: ignore + from ._models import Sku # type: ignore + from ._models import Subnet # type: ignore + from ._models import SystemData # type: ignore + from ._models import TrackedResource # type: ignore + from ._models import UserAssignedIdentity # type: ignore + from ._models import UserAssignedIdentityProperties # type: ignore + +from ._event_hub_management_client_enums import ( + AccessRights, + ClusterSkuName, + CreatedByType, + DefaultAction, + EncodingCaptureDescription, + EndPointProvisioningState, + EntityStatus, + KeyType, + ManagedServiceIdentityType, + NetworkRuleIPAction, + PrivateLinkConnectionStatus, + ProvisioningStateDR, + PublicNetworkAccessFlag, + RoleDisasterRecovery, + SchemaCompatibility, + SchemaType, + SkuName, + SkuTier, + UnavailableReason, +) + +__all__ = [ + 'AccessKeys', + 'ArmDisasterRecovery', + 'ArmDisasterRecoveryListResult', + 'AuthorizationRule', + 'AuthorizationRuleListResult', + 'AvailableCluster', + 'AvailableClustersList', + 'CaptureDescription', + 'CheckNameAvailabilityParameter', + 'CheckNameAvailabilityResult', + 'Cluster', + 'ClusterListResult', + 'ClusterQuotaConfigurationProperties', + 'ClusterSku', + 'ConnectionState', + 'ConsumerGroup', + 'ConsumerGroupListResult', + 'Destination', + 'EHNamespace', + 'EHNamespaceIdContainer', + 'EHNamespaceIdListResult', + 'EHNamespaceListResult', + 'Encryption', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorResponse', + 'EventHubListResult', + 'Eventhub', + 'Identity', + 'KeyVaultProperties', + 'NWRuleSetIpRules', + 'NWRuleSetVirtualNetworkRules', + 'NetworkRuleSet', + 'NetworkRuleSetListResult', + 'Operation', + 'OperationDisplay', + 'OperationListResult', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResource', + 'PrivateLinkResourcesListResult', + 'ProxyResource', + 'RegenerateAccessKeyParameters', + 'Resource', + 'SchemaGroup', + 'SchemaGroupListResult', + 'Sku', + 'Subnet', + 'SystemData', + 'TrackedResource', + 'UserAssignedIdentity', + 'UserAssignedIdentityProperties', + 'AccessRights', + 'ClusterSkuName', + 'CreatedByType', + 'DefaultAction', + 'EncodingCaptureDescription', + 'EndPointProvisioningState', + 'EntityStatus', + 'KeyType', + 'ManagedServiceIdentityType', + 'NetworkRuleIPAction', + 'PrivateLinkConnectionStatus', + 'ProvisioningStateDR', + 'PublicNetworkAccessFlag', + 'RoleDisasterRecovery', + 'SchemaCompatibility', + 'SchemaType', + 'SkuName', + 'SkuTier', + 'UnavailableReason', +] diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_event_hub_management_client_enums.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_event_hub_management_client_enums.py new file mode 100644 index 000000000000..0d17716db7ea --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_event_hub_management_client_enums.py @@ -0,0 +1,182 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessRights(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + MANAGE = "Manage" + SEND = "Send" + LISTEN = "Listen" + +class ClusterSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of this SKU. + """ + + DEDICATED = "Dedicated" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class DefaultAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Default Action for Network Rule Set + """ + + ALLOW = "Allow" + DENY = "Deny" + +class EncodingCaptureDescription(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the possible values for the encoding format of capture description. Note: + 'AvroDeflate' will be deprecated in New API Version + """ + + AVRO = "Avro" + AVRO_DEFLATE = "AvroDeflate" + +class EndPointProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the Private Endpoint Connection. + """ + + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + CANCELED = "Canceled" + FAILED = "Failed" + +class EntityStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enumerates the possible values for the status of the Event Hub. + """ + + ACTIVE = "Active" + DISABLED = "Disabled" + RESTORING = "Restoring" + SEND_DISABLED = "SendDisabled" + RECEIVE_DISABLED = "ReceiveDisabled" + CREATING = "Creating" + DELETING = "Deleting" + RENAMING = "Renaming" + UNKNOWN = "Unknown" + +class KeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The access key to regenerate. + """ + + PRIMARY_KEY = "PrimaryKey" + SECONDARY_KEY = "SecondaryKey" + +class ManagedServiceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of managed service identity. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + NONE = "None" + +class NetworkRuleIPAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The IP Filter Action + """ + + ALLOW = "Allow" + +class PrivateLinkConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of the connection. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +class ProvisioningStateDR(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the Alias(Disaster Recovery configuration) - possible values 'Accepted' + or 'Succeeded' or 'Failed' + """ + + ACCEPTED = "Accepted" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class PublicNetworkAccessFlag(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """This determines if traffic is allowed over public network. By default it is enabled. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class RoleDisasterRecovery(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' or + 'Secondary' + """ + + PRIMARY = "Primary" + PRIMARY_NOT_REPLICATING = "PrimaryNotReplicating" + SECONDARY = "Secondary" + +class SchemaCompatibility(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + NONE = "None" + BACKWARD = "Backward" + FORWARD = "Forward" + +class SchemaType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + UNKNOWN = "Unknown" + AVRO = "Avro" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of this SKU. + """ + + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + +class SkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The billing tier of this particular SKU. + """ + + BASIC = "Basic" + STANDARD = "Standard" + PREMIUM = "Premium" + +class UnavailableReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specifies the reason for the unavailability of the service. + """ + + NONE = "None" + INVALID_NAME = "InvalidName" + SUBSCRIPTION_IS_DISABLED = "SubscriptionIsDisabled" + NAME_IN_USE = "NameInUse" + NAME_IN_LOCKDOWN = "NameInLockdown" + TOO_MANY_NAMESPACE_IN_CURRENT_SUBSCRIPTION = "TooManyNamespaceInCurrentSubscription" diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_models.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_models.py new file mode 100644 index 000000000000..7e691919b41c --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_models.py @@ -0,0 +1,1974 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AccessKeys(msrest.serialization.Model): + """Namespace/EventHub Connection String. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar primary_connection_string: Primary connection string of the created namespace + AuthorizationRule. + :vartype primary_connection_string: str + :ivar secondary_connection_string: Secondary connection string of the created namespace + AuthorizationRule. + :vartype secondary_connection_string: str + :ivar alias_primary_connection_string: Primary connection string of the alias if GEO DR is + enabled. + :vartype alias_primary_connection_string: str + :ivar alias_secondary_connection_string: Secondary connection string of the alias if GEO DR is + enabled. + :vartype alias_secondary_connection_string: str + :ivar primary_key: A base64-encoded 256-bit primary key for signing and validating the SAS + token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and validating the SAS + token. + :vartype secondary_key: str + :ivar key_name: A string that describes the AuthorizationRule. + :vartype key_name: str + """ + + _validation = { + 'primary_connection_string': {'readonly': True}, + 'secondary_connection_string': {'readonly': True}, + 'alias_primary_connection_string': {'readonly': True}, + 'alias_secondary_connection_string': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + } + + _attribute_map = { + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'alias_primary_connection_string': {'key': 'aliasPrimaryConnectionString', 'type': 'str'}, + 'alias_secondary_connection_string': {'key': 'aliasSecondaryConnectionString', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AccessKeys, self).__init__(**kwargs) + self.primary_connection_string = None + self.secondary_connection_string = None + self.alias_primary_connection_string = None + self.alias_secondary_connection_string = None + self.primary_key = None + self.secondary_key = None + self.key_name = None + + +class ProxyResource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + + +class ArmDisasterRecovery(ProxyResource): + """Single item in List or Get Alias(Disaster Recovery configuration) operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar provisioning_state: Provisioning state of the Alias(Disaster Recovery configuration) - + possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: "Accepted", + "Succeeded", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.eventhub.v2021_11_01.models.ProvisioningStateDR + :param partner_namespace: ARM Id of the Primary/Secondary eventhub namespace name, which is + part of GEO DR pairing. + :type partner_namespace: str + :param alternate_name: Alternate name specified when alias and namespace names are same. + :type alternate_name: str + :ivar role: role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' + or 'Secondary'. Possible values include: "Primary", "PrimaryNotReplicating", "Secondary". + :vartype role: str or ~azure.mgmt.eventhub.v2021_11_01.models.RoleDisasterRecovery + :ivar pending_replication_operations_count: Number of entities pending to be replicated. + :vartype pending_replication_operations_count: long + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'role': {'readonly': True}, + 'pending_replication_operations_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, + 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'str'}, + 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmDisasterRecovery, self).__init__(**kwargs) + self.system_data = None + self.provisioning_state = None + self.partner_namespace = kwargs.get('partner_namespace', None) + self.alternate_name = kwargs.get('alternate_name', None) + self.role = None + self.pending_replication_operations_count = None + + +class ArmDisasterRecoveryListResult(msrest.serialization.Model): + """The result of the List Alias(Disaster Recovery configuration) operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of Alias(Disaster Recovery configurations). + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecovery] + :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list + of Alias(Disaster Recovery configuration). + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ArmDisasterRecovery]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmDisasterRecoveryListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AuthorizationRule(ProxyResource): + """Single item in a List or Get AuthorizationRule operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :param rights: The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.eventhub.v2021_11_01.models.AccessRights] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'rights': {'key': 'properties.rights', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AuthorizationRule, self).__init__(**kwargs) + self.system_data = None + self.rights = kwargs.get('rights', None) + + +class AuthorizationRuleListResult(msrest.serialization.Model): + """The response from the List namespace operation. + + :param value: Result of the List Authorization Rules operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule] + :param next_link: Link to the next set of results. Not empty if Value contains an incomplete + list of Authorization Rules. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AuthorizationRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AuthorizationRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AvailableCluster(msrest.serialization.Model): + """Pre-provisioned and readily available Event Hubs Cluster count per region. + + :param location: Location fo the Available Cluster. + :type location: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableCluster, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + + +class AvailableClustersList(msrest.serialization.Model): + """The response of the List Available Clusters operation. + + :param value: The count of readily available and pre-provisioned Event Hubs Clusters per + region. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.AvailableCluster] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableCluster]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableClustersList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class CaptureDescription(msrest.serialization.Model): + """Properties to configure capture description for eventhub. + + :param enabled: A value that indicates whether capture description is enabled. + :type enabled: bool + :param encoding: Enumerates the possible values for the encoding format of capture description. + Note: 'AvroDeflate' will be deprecated in New API Version. Possible values include: "Avro", + "AvroDeflate". + :type encoding: str or ~azure.mgmt.eventhub.v2021_11_01.models.EncodingCaptureDescription + :param interval_in_seconds: The time window allows you to set the frequency with which the + capture to Azure Blobs will happen, value should between 60 to 900 seconds. + :type interval_in_seconds: int + :param size_limit_in_bytes: The size window defines the amount of data built up in your Event + Hub before an capture operation, value should be between 10485760 to 524288000 bytes. + :type size_limit_in_bytes: int + :param destination: Properties of Destination where capture will be stored. (Storage Account, + Blob Names). + :type destination: ~azure.mgmt.eventhub.v2021_11_01.models.Destination + :param skip_empty_archives: A value that indicates whether to Skip Empty Archives. + :type skip_empty_archives: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encoding': {'key': 'encoding', 'type': 'str'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + 'size_limit_in_bytes': {'key': 'sizeLimitInBytes', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'Destination'}, + 'skip_empty_archives': {'key': 'skipEmptyArchives', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(CaptureDescription, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.encoding = kwargs.get('encoding', None) + self.interval_in_seconds = kwargs.get('interval_in_seconds', None) + self.size_limit_in_bytes = kwargs.get('size_limit_in_bytes', None) + self.destination = kwargs.get('destination', None) + self.skip_empty_archives = kwargs.get('skip_empty_archives', None) + + +class CheckNameAvailabilityParameter(msrest.serialization.Model): + """Parameter supplied to check Namespace name availability operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name to check the namespace name availability. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityParameter, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class CheckNameAvailabilityResult(msrest.serialization.Model): + """The Result of the CheckNameAvailability operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar message: The detailed info regarding the reason associated with the Namespace. + :vartype message: str + :param name_available: Value indicating Namespace is availability, true if the Namespace is + available; otherwise, false. + :type name_available: bool + :param reason: The reason for unavailability of a Namespace. Possible values include: "None", + "InvalidName", "SubscriptionIsDisabled", "NameInUse", "NameInLockdown", + "TooManyNamespaceInCurrentSubscription". + :type reason: str or ~azure.mgmt.eventhub.v2021_11_01.models.UnavailableReason + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = None + self.name_available = kwargs.get('name_available', None) + self.reason = kwargs.get('reason', None) + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class TrackedResource(Resource): + """Definition of resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class Cluster(TrackedResource): + """Single Event Hubs Cluster resource in List or Get operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Properties of the cluster SKU. + :type sku: ~azure.mgmt.eventhub.v2021_11_01.models.ClusterSku + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar created_at: The UTC time when the Event Hubs Cluster was created. + :vartype created_at: str + :ivar updated_at: The UTC time when the Event Hubs Cluster was last updated. + :vartype updated_at: str + :ivar metric_id: The metric ID of the cluster resource. Provided by the service and not + modifiable by the user. + :vartype metric_id: str + :ivar status: Status of the Cluster resource. + :vartype status: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'metric_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ClusterSku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'str'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Cluster, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.system_data = None + self.created_at = None + self.updated_at = None + self.metric_id = None + self.status = None + + +class ClusterListResult(msrest.serialization.Model): + """The response of the List Event Hubs Clusters operation. + + :param value: The Event Hubs Clusters present in the List Event Hubs operation results. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.Cluster] + :param next_link: Link to the next set of results. Empty unless the value parameter contains an + incomplete list of Event Hubs Clusters. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Cluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ClusterQuotaConfigurationProperties(msrest.serialization.Model): + """Contains all settings for the cluster. + + :param settings: All possible Cluster settings - a collection of key/value paired settings + which apply to quotas and configurations imposed on the cluster. + :type settings: dict[str, str] + """ + + _attribute_map = { + 'settings': {'key': 'settings', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterQuotaConfigurationProperties, self).__init__(**kwargs) + self.settings = kwargs.get('settings', None) + + +class ClusterSku(msrest.serialization.Model): + """SKU parameters particular to a cluster instance. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of this SKU. Possible values include: "Dedicated". + :type name: str or ~azure.mgmt.eventhub.v2021_11_01.models.ClusterSkuName + :param capacity: The quantity of Event Hubs Cluster Capacity Units contained in this cluster. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + 'capacity': {'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ClusterSku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.capacity = kwargs.get('capacity', None) + + +class ConnectionState(msrest.serialization.Model): + """ConnectionState information. + + :param status: Status of the connection. Possible values include: "Pending", "Approved", + "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.eventhub.v2021_11_01.models.PrivateLinkConnectionStatus + :param description: Description of the connection state. + :type description: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + + +class ConsumerGroup(ProxyResource): + """Single item in List or Get Consumer group operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar created_at: Exact time the message was created. + :vartype created_at: ~datetime.datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: ~datetime.datetime + :param user_metadata: User Metadata is a placeholder to store user-defined string data with + maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and + their contact information also user-defined configuration settings can be stored. + :type user_metadata: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConsumerGroup, self).__init__(**kwargs) + self.system_data = None + self.created_at = None + self.updated_at = None + self.user_metadata = kwargs.get('user_metadata', None) + + +class ConsumerGroupListResult(msrest.serialization.Model): + """The result to the List Consumer Group operation. + + :param value: Result of the List Consumer Group operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroup] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of Consumer Group. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConsumerGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConsumerGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class Destination(msrest.serialization.Model): + """Capture storage details for capture description. + + :param name: Name for capture destination. + :type name: str + :param storage_account_resource_id: Resource id of the storage account to be used to create the + blobs. + :type storage_account_resource_id: str + :param blob_container: Blob container Name. + :type blob_container: str + :param archive_name_format: Blob naming convention for archive, e.g. + {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all + the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order. + :type archive_name_format: str + :param data_lake_subscription_id: Subscription Id of Azure Data Lake Store. + :type data_lake_subscription_id: str + :param data_lake_account_name: The Azure Data Lake Store name for the captured events. + :type data_lake_account_name: str + :param data_lake_folder_path: The destination folder path for the captured events. + :type data_lake_folder_path: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'blob_container': {'key': 'properties.blobContainer', 'type': 'str'}, + 'archive_name_format': {'key': 'properties.archiveNameFormat', 'type': 'str'}, + 'data_lake_subscription_id': {'key': 'properties.dataLakeSubscriptionId', 'type': 'str'}, + 'data_lake_account_name': {'key': 'properties.dataLakeAccountName', 'type': 'str'}, + 'data_lake_folder_path': {'key': 'properties.dataLakeFolderPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Destination, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.storage_account_resource_id = kwargs.get('storage_account_resource_id', None) + self.blob_container = kwargs.get('blob_container', None) + self.archive_name_format = kwargs.get('archive_name_format', None) + self.data_lake_subscription_id = kwargs.get('data_lake_subscription_id', None) + self.data_lake_account_name = kwargs.get('data_lake_account_name', None) + self.data_lake_folder_path = kwargs.get('data_lake_folder_path', None) + + +class EHNamespace(TrackedResource): + """Single Namespace item in List or Get Operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Properties of sku resource. + :type sku: ~azure.mgmt.eventhub.v2021_11_01.models.Sku + :param identity: Properties of BYOK Identity description. + :type identity: ~azure.mgmt.eventhub.v2021_11_01.models.Identity + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar provisioning_state: Provisioning state of the Namespace. + :vartype provisioning_state: str + :ivar status: Status of the Namespace. + :vartype status: str + :ivar created_at: The time the Namespace was created. + :vartype created_at: ~datetime.datetime + :ivar updated_at: The time the Namespace was updated. + :vartype updated_at: ~datetime.datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus operations. + :vartype service_bus_endpoint: str + :param cluster_arm_id: Cluster ARM ID of the Namespace. + :type cluster_arm_id: str + :ivar metric_id: Identifier for Azure Insights metrics. + :vartype metric_id: str + :param is_auto_inflate_enabled: Value that indicates whether AutoInflate is enabled for + eventhub namespace. + :type is_auto_inflate_enabled: bool + :param maximum_throughput_units: Upper limit of throughput units when AutoInflate is enabled, + value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true). + :type maximum_throughput_units: int + :param kafka_enabled: Value that indicates whether Kafka is enabled for eventhub namespace. + :type kafka_enabled: bool + :param zone_redundant: Enabling this property creates a Standard Event Hubs Namespace in + regions supported availability zones. + :type zone_redundant: bool + :param encryption: Properties of BYOK Encryption description. + :type encryption: ~azure.mgmt.eventhub.v2021_11_01.models.Encryption + :param private_endpoint_connections: List of private endpoint connections. + :type private_endpoint_connections: + list[~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection] + :param disable_local_auth: This property disables SAS authentication for the Event Hubs + namespace. + :type disable_local_auth: bool + :param alternate_name: Alternate name specified when alias and namespace names are same. + :type alternate_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'cluster_arm_id': {'key': 'properties.clusterArmId', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + 'is_auto_inflate_enabled': {'key': 'properties.isAutoInflateEnabled', 'type': 'bool'}, + 'maximum_throughput_units': {'key': 'properties.maximumThroughputUnits', 'type': 'int'}, + 'kafka_enabled': {'key': 'properties.kafkaEnabled', 'type': 'bool'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EHNamespace, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) + self.system_data = None + self.provisioning_state = None + self.status = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.cluster_arm_id = kwargs.get('cluster_arm_id', None) + self.metric_id = None + self.is_auto_inflate_enabled = kwargs.get('is_auto_inflate_enabled', None) + self.maximum_throughput_units = kwargs.get('maximum_throughput_units', None) + self.kafka_enabled = kwargs.get('kafka_enabled', None) + self.zone_redundant = kwargs.get('zone_redundant', None) + self.encryption = kwargs.get('encryption', None) + self.private_endpoint_connections = kwargs.get('private_endpoint_connections', None) + self.disable_local_auth = kwargs.get('disable_local_auth', None) + self.alternate_name = kwargs.get('alternate_name', None) + + +class EHNamespaceIdContainer(msrest.serialization.Model): + """The full ARM ID of an Event Hubs Namespace. + + :param id: id parameter. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EHNamespaceIdContainer, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class EHNamespaceIdListResult(msrest.serialization.Model): + """The response of the List Namespace IDs operation. + + :param value: Result of the List Namespace IDs operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespaceIdContainer] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EHNamespaceIdContainer]'}, + } + + def __init__( + self, + **kwargs + ): + super(EHNamespaceIdListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class EHNamespaceListResult(msrest.serialization.Model): + """The response of the List Namespace operation. + + :param value: Result of the List Namespace operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of namespaces. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EHNamespace]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EHNamespaceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class Encryption(msrest.serialization.Model): + """Properties to configure Encryption. + + :param key_vault_properties: Properties of KeyVault. + :type key_vault_properties: list[~azure.mgmt.eventhub.v2021_11_01.models.KeyVaultProperties] + :param key_source: Enumerates the possible value of keySource for Encryption. The only + acceptable values to pass in are None and "Microsoft.KeyVault". The default value is + "Microsoft.KeyVault". + :type key_source: str + :param require_infrastructure_encryption: Enable Infrastructure Encryption (Double Encryption). + :type require_infrastructure_encryption: bool + """ + + _attribute_map = { + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': '[KeyVaultProperties]'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'require_infrastructure_encryption': {'key': 'requireInfrastructureEncryption', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Encryption, self).__init__(**kwargs) + self.key_vault_properties = kwargs.get('key_vault_properties', None) + self.key_source = kwargs.get('key_source', "Microsoft.KeyVault") + self.require_infrastructure_encryption = kwargs.get('require_infrastructure_encryption', None) + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.eventhub.v2021_11_01.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.eventhub.v2021_11_01.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message. + + :param error: The error object. + :type error: ~azure.mgmt.eventhub.v2021_11_01.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class Eventhub(ProxyResource): + """Single item in List or Get Event Hub operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar partition_ids: Current number of shards on the Event Hub. + :vartype partition_ids: list[str] + :ivar created_at: Exact time the Event Hub was created. + :vartype created_at: ~datetime.datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: ~datetime.datetime + :param message_retention_in_days: Number of days to retain the events for this Event Hub, value + should be 1 to 7 days. + :type message_retention_in_days: long + :param partition_count: Number of partitions created for the Event Hub, allowed values are from + 1 to 32 partitions. + :type partition_count: long + :param status: Enumerates the possible values for the status of the Event Hub. Possible values + include: "Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", + "Deleting", "Renaming", "Unknown". + :type status: str or ~azure.mgmt.eventhub.v2021_11_01.models.EntityStatus + :param capture_description: Properties of capture description. + :type capture_description: ~azure.mgmt.eventhub.v2021_11_01.models.CaptureDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + 'partition_ids': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'message_retention_in_days': {'minimum': 1}, + 'partition_count': {'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'partition_ids': {'key': 'properties.partitionIds', 'type': '[str]'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'message_retention_in_days': {'key': 'properties.messageRetentionInDays', 'type': 'long'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'long'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'capture_description': {'key': 'properties.captureDescription', 'type': 'CaptureDescription'}, + } + + def __init__( + self, + **kwargs + ): + super(Eventhub, self).__init__(**kwargs) + self.system_data = None + self.partition_ids = None + self.created_at = None + self.updated_at = None + self.message_retention_in_days = kwargs.get('message_retention_in_days', None) + self.partition_count = kwargs.get('partition_count', None) + self.status = kwargs.get('status', None) + self.capture_description = kwargs.get('capture_description', None) + + +class EventHubListResult(msrest.serialization.Model): + """The result of the List EventHubs operation. + + :param value: Result of the List EventHubs operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.Eventhub] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of EventHubs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Eventhub]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EventHubListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class Identity(msrest.serialization.Model): + """Properties to configure Identity for Bring your Own Keys. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: ObjectId from the KeyVault. + :vartype principal_id: str + :ivar tenant_id: TenantId from the KeyVault. + :vartype tenant_id: str + :param type: Type of managed service identity. Possible values include: "SystemAssigned", + "UserAssigned", "SystemAssigned, UserAssigned", "None". + :type type: str or ~azure.mgmt.eventhub.v2021_11_01.models.ManagedServiceIdentityType + :param user_assigned_identities: Properties for User Assigned Identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.eventhub.v2021_11_01.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class KeyVaultProperties(msrest.serialization.Model): + """Properties to configure keyVault Properties. + + :param key_name: Name of the Key from KeyVault. + :type key_name: str + :param key_vault_uri: Uri of KeyVault. + :type key_vault_uri: str + :param key_version: Key Version. + :type key_version: str + :param identity: + :type identity: ~azure.mgmt.eventhub.v2021_11_01.models.UserAssignedIdentityProperties + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'UserAssignedIdentityProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = kwargs.get('key_name', None) + self.key_vault_uri = kwargs.get('key_vault_uri', None) + self.key_version = kwargs.get('key_version', None) + self.identity = kwargs.get('identity', None) + + +class NetworkRuleSet(ProxyResource): + """Description of topic resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :param trusted_service_access_enabled: Value that indicates whether Trusted Service Access is + Enabled or not. + :type trusted_service_access_enabled: bool + :param default_action: Default Action for Network Rule Set. Possible values include: "Allow", + "Deny". + :type default_action: str or ~azure.mgmt.eventhub.v2021_11_01.models.DefaultAction + :param virtual_network_rules: List VirtualNetwork Rules. + :type virtual_network_rules: + list[~azure.mgmt.eventhub.v2021_11_01.models.NWRuleSetVirtualNetworkRules] + :param ip_rules: List of IpRules. + :type ip_rules: list[~azure.mgmt.eventhub.v2021_11_01.models.NWRuleSetIpRules] + :param public_network_access: This determines if traffic is allowed over public network. By + default it is enabled. Possible values include: "Enabled", "Disabled". Default value: + "Enabled". + :type public_network_access: str or + ~azure.mgmt.eventhub.v2021_11_01.models.PublicNetworkAccessFlag + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'trusted_service_access_enabled': {'key': 'properties.trustedServiceAccessEnabled', 'type': 'bool'}, + 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.system_data = None + self.trusted_service_access_enabled = kwargs.get('trusted_service_access_enabled', None) + self.default_action = kwargs.get('default_action', None) + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + self.ip_rules = kwargs.get('ip_rules', None) + self.public_network_access = kwargs.get('public_network_access', "Enabled") + + +class NetworkRuleSetListResult(msrest.serialization.Model): + """The response of the List NetworkRuleSet operation. + + :param value: Result of the List NetworkRuleSet operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSet] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of NetworkRuleSet. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkRuleSet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkRuleSetListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NWRuleSetIpRules(msrest.serialization.Model): + """The response from the List namespace operation. + + :param ip_mask: IP Mask. + :type ip_mask: str + :param action: The IP Filter Action. Possible values include: "Allow". + :type action: str or ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleIPAction + """ + + _attribute_map = { + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NWRuleSetIpRules, self).__init__(**kwargs) + self.ip_mask = kwargs.get('ip_mask', None) + self.action = kwargs.get('action', None) + + +class NWRuleSetVirtualNetworkRules(msrest.serialization.Model): + """The response from the List namespace operation. + + :param subnet: Subnet properties. + :type subnet: ~azure.mgmt.eventhub.v2021_11_01.models.Subnet + :param ignore_missing_vnet_service_endpoint: Value that indicates whether to ignore missing + Vnet Service Endpoint. + :type ignore_missing_vnet_service_endpoint: bool + """ + + _attribute_map = { + 'subnet': {'key': 'subnet', 'type': 'Subnet'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs) + self.subnet = kwargs.get('subnet', None) + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) + + +class Operation(msrest.serialization.Model): + """A Event Hub REST API operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :param display: Display of the operation. + :type display: ~azure.mgmt.eventhub.v2021_11_01.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param properties: Properties of the operation. + :type properties: any + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.is_data_action = kwargs.get('is_data_action', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + + +class OperationDisplay(msrest.serialization.Model): + """Operation display payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: Resource provider of the operation. + :vartype provider: str + :ivar resource: Resource of the operation. + :vartype resource: str + :ivar operation: Localized friendly name for the operation. + :vartype operation: str + :ivar description: Localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list Event Hub operations. It contains a list of operations and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Event Hub operations supported by the Microsoft.EventHub resource + provider. + :vartype value: list[~azure.mgmt.eventhub.v2021_11_01.models.Operation] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class PrivateEndpoint(msrest.serialization.Model): + """PrivateEndpoint information. + + :param id: The ARM identifier for Private Endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class PrivateEndpointConnection(ProxyResource): + """Properties of the PrivateEndpointConnection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :param private_endpoint: The Private Endpoint resource for this Connection. + :type private_endpoint: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpoint + :param private_link_service_connection_state: Details about the state of the connection. + :type private_link_service_connection_state: + ~azure.mgmt.eventhub.v2021_11_01.models.ConnectionState + :param provisioning_state: Provisioning state of the Private Endpoint Connection. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". + :type provisioning_state: str or + ~azure.mgmt.eventhub.v2021_11_01.models.EndPointProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'ConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.system_data = None + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """Result of the list of all private endpoint connections operation. + + :param value: A collection of private endpoint connection resources. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection] + :param next_link: A link for the next page of private endpoint connection resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PrivateLinkResource(msrest.serialization.Model): + """Information of the private link resource. + + :param id: Fully qualified identifier of the resource. + :type id: str + :param name: Name of the resource. + :type name: str + :param type: Type of the resource. + :type type: str + :param group_id: The private link resource group id. + :type group_id: str + :param required_members: The private link resource required member names. + :type required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + self.group_id = kwargs.get('group_id', None) + self.required_members = kwargs.get('required_members', None) + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourcesListResult(msrest.serialization.Model): + """Result of the List private link resources operation. + + :param value: A collection of private link resources. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.PrivateLinkResource] + :param next_link: A link for the next page of private link resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourcesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RegenerateAccessKeyParameters(msrest.serialization.Model): + """Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The access key to regenerate. Possible values include: "PrimaryKey", + "SecondaryKey". + :type key_type: str or ~azure.mgmt.eventhub.v2021_11_01.models.KeyType + :param key: Optional, if the key value provided, is set for KeyType or autogenerated Key value + set for keyType. + :type key: str + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RegenerateAccessKeyParameters, self).__init__(**kwargs) + self.key_type = kwargs['key_type'] + self.key = kwargs.get('key', None) + + +class SchemaGroup(ProxyResource): + """Single item in List or Get Schema Group operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar updated_at_utc: Exact time the Schema Group was updated. + :vartype updated_at_utc: ~datetime.datetime + :ivar created_at_utc: Exact time the Schema Group was created. + :vartype created_at_utc: ~datetime.datetime + :ivar e_tag: The ETag value. + :vartype e_tag: str + :param group_properties: dictionary object for SchemaGroup group properties. + :type group_properties: dict[str, str] + :param schema_compatibility: Possible values include: "None", "Backward", "Forward". + :type schema_compatibility: str or ~azure.mgmt.eventhub.v2021_11_01.models.SchemaCompatibility + :param schema_type: Possible values include: "Unknown", "Avro". + :type schema_type: str or ~azure.mgmt.eventhub.v2021_11_01.models.SchemaType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + 'updated_at_utc': {'readonly': True}, + 'created_at_utc': {'readonly': True}, + 'e_tag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'updated_at_utc': {'key': 'properties.updatedAtUtc', 'type': 'iso-8601'}, + 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, + 'e_tag': {'key': 'properties.eTag', 'type': 'str'}, + 'group_properties': {'key': 'properties.groupProperties', 'type': '{str}'}, + 'schema_compatibility': {'key': 'properties.schemaCompatibility', 'type': 'str'}, + 'schema_type': {'key': 'properties.schemaType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SchemaGroup, self).__init__(**kwargs) + self.system_data = None + self.updated_at_utc = None + self.created_at_utc = None + self.e_tag = None + self.group_properties = kwargs.get('group_properties', None) + self.schema_compatibility = kwargs.get('schema_compatibility', None) + self.schema_type = kwargs.get('schema_type', None) + + +class SchemaGroupListResult(msrest.serialization.Model): + """The result of the List SchemaGroup operation. + + :param value: Result of the List SchemaGroups operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroup] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of Schema Groups. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SchemaGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SchemaGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class Sku(msrest.serialization.Model): + """SKU parameters supplied to the create namespace operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of this SKU. Possible values include: "Basic", "Standard", + "Premium". + :type name: str or ~azure.mgmt.eventhub.v2021_11_01.models.SkuName + :param tier: The billing tier of this particular SKU. Possible values include: "Basic", + "Standard", "Premium". + :type tier: str or ~azure.mgmt.eventhub.v2021_11_01.models.SkuTier + :param capacity: The Event Hubs throughput units for Basic or Standard tiers, where value + should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value + should be 0 to 10 premium units. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + 'capacity': {'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class Subnet(msrest.serialization.Model): + """Properties supplied for Subnet. + + :param id: Resource ID of Virtual Network Subnet. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Subnet, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class SystemData(msrest.serialization.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.eventhub.v2021_11_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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.eventhub.v2021_11_01.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 UserAssignedIdentity(msrest.serialization.Model): + """Recognized Dictionary value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: Principal Id of user assigned identity. + :vartype principal_id: str + :ivar client_id: Client Id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentityProperties(msrest.serialization.Model): + """UserAssignedIdentityProperties. + + :param user_assigned_identity: ARM ID of user Identity selected for encryption. + :type user_assigned_identity: str + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentityProperties, self).__init__(**kwargs) + self.user_assigned_identity = kwargs.get('user_assigned_identity', None) diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_models_py3.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_models_py3.py new file mode 100644 index 000000000000..582f81410405 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/models/_models_py3.py @@ -0,0 +1,2143 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Any, Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._event_hub_management_client_enums import * + + +class AccessKeys(msrest.serialization.Model): + """Namespace/EventHub Connection String. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar primary_connection_string: Primary connection string of the created namespace + AuthorizationRule. + :vartype primary_connection_string: str + :ivar secondary_connection_string: Secondary connection string of the created namespace + AuthorizationRule. + :vartype secondary_connection_string: str + :ivar alias_primary_connection_string: Primary connection string of the alias if GEO DR is + enabled. + :vartype alias_primary_connection_string: str + :ivar alias_secondary_connection_string: Secondary connection string of the alias if GEO DR is + enabled. + :vartype alias_secondary_connection_string: str + :ivar primary_key: A base64-encoded 256-bit primary key for signing and validating the SAS + token. + :vartype primary_key: str + :ivar secondary_key: A base64-encoded 256-bit primary key for signing and validating the SAS + token. + :vartype secondary_key: str + :ivar key_name: A string that describes the AuthorizationRule. + :vartype key_name: str + """ + + _validation = { + 'primary_connection_string': {'readonly': True}, + 'secondary_connection_string': {'readonly': True}, + 'alias_primary_connection_string': {'readonly': True}, + 'alias_secondary_connection_string': {'readonly': True}, + 'primary_key': {'readonly': True}, + 'secondary_key': {'readonly': True}, + 'key_name': {'readonly': True}, + } + + _attribute_map = { + 'primary_connection_string': {'key': 'primaryConnectionString', 'type': 'str'}, + 'secondary_connection_string': {'key': 'secondaryConnectionString', 'type': 'str'}, + 'alias_primary_connection_string': {'key': 'aliasPrimaryConnectionString', 'type': 'str'}, + 'alias_secondary_connection_string': {'key': 'aliasSecondaryConnectionString', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + 'secondary_key': {'key': 'secondaryKey', 'type': 'str'}, + 'key_name': {'key': 'keyName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AccessKeys, self).__init__(**kwargs) + self.primary_connection_string = None + self.secondary_connection_string = None + self.alias_primary_connection_string = None + self.alias_secondary_connection_string = None + self.primary_key = None + self.secondary_key = None + self.key_name = None + + +class ProxyResource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + + +class ArmDisasterRecovery(ProxyResource): + """Single item in List or Get Alias(Disaster Recovery configuration) operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar provisioning_state: Provisioning state of the Alias(Disaster Recovery configuration) - + possible values 'Accepted' or 'Succeeded' or 'Failed'. Possible values include: "Accepted", + "Succeeded", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.eventhub.v2021_11_01.models.ProvisioningStateDR + :param partner_namespace: ARM Id of the Primary/Secondary eventhub namespace name, which is + part of GEO DR pairing. + :type partner_namespace: str + :param alternate_name: Alternate name specified when alias and namespace names are same. + :type alternate_name: str + :ivar role: role of namespace in GEO DR - possible values 'Primary' or 'PrimaryNotReplicating' + or 'Secondary'. Possible values include: "Primary", "PrimaryNotReplicating", "Secondary". + :vartype role: str or ~azure.mgmt.eventhub.v2021_11_01.models.RoleDisasterRecovery + :ivar pending_replication_operations_count: Number of entities pending to be replicated. + :vartype pending_replication_operations_count: long + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'role': {'readonly': True}, + 'pending_replication_operations_count': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'partner_namespace': {'key': 'properties.partnerNamespace', 'type': 'str'}, + 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, + 'role': {'key': 'properties.role', 'type': 'str'}, + 'pending_replication_operations_count': {'key': 'properties.pendingReplicationOperationsCount', 'type': 'long'}, + } + + def __init__( + self, + *, + partner_namespace: Optional[str] = None, + alternate_name: Optional[str] = None, + **kwargs + ): + super(ArmDisasterRecovery, self).__init__(**kwargs) + self.system_data = None + self.provisioning_state = None + self.partner_namespace = partner_namespace + self.alternate_name = alternate_name + self.role = None + self.pending_replication_operations_count = None + + +class ArmDisasterRecoveryListResult(msrest.serialization.Model): + """The result of the List Alias(Disaster Recovery configuration) operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of Alias(Disaster Recovery configurations). + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecovery] + :ivar next_link: Link to the next set of results. Not empty if Value contains incomplete list + of Alias(Disaster Recovery configuration). + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ArmDisasterRecovery]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ArmDisasterRecovery"]] = None, + **kwargs + ): + super(ArmDisasterRecoveryListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AuthorizationRule(ProxyResource): + """Single item in a List or Get AuthorizationRule operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :param rights: The rights associated with the rule. + :type rights: list[str or ~azure.mgmt.eventhub.v2021_11_01.models.AccessRights] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'rights': {'key': 'properties.rights', 'type': '[str]'}, + } + + def __init__( + self, + *, + rights: Optional[List[Union[str, "AccessRights"]]] = None, + **kwargs + ): + super(AuthorizationRule, self).__init__(**kwargs) + self.system_data = None + self.rights = rights + + +class AuthorizationRuleListResult(msrest.serialization.Model): + """The response from the List namespace operation. + + :param value: Result of the List Authorization Rules operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule] + :param next_link: Link to the next set of results. Not empty if Value contains an incomplete + list of Authorization Rules. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AuthorizationRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AuthorizationRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AuthorizationRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AvailableCluster(msrest.serialization.Model): + """Pre-provisioned and readily available Event Hubs Cluster count per region. + + :param location: Location fo the Available Cluster. + :type location: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + **kwargs + ): + super(AvailableCluster, self).__init__(**kwargs) + self.location = location + + +class AvailableClustersList(msrest.serialization.Model): + """The response of the List Available Clusters operation. + + :param value: The count of readily available and pre-provisioned Event Hubs Clusters per + region. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.AvailableCluster] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableCluster]'}, + } + + def __init__( + self, + *, + value: Optional[List["AvailableCluster"]] = None, + **kwargs + ): + super(AvailableClustersList, self).__init__(**kwargs) + self.value = value + + +class CaptureDescription(msrest.serialization.Model): + """Properties to configure capture description for eventhub. + + :param enabled: A value that indicates whether capture description is enabled. + :type enabled: bool + :param encoding: Enumerates the possible values for the encoding format of capture description. + Note: 'AvroDeflate' will be deprecated in New API Version. Possible values include: "Avro", + "AvroDeflate". + :type encoding: str or ~azure.mgmt.eventhub.v2021_11_01.models.EncodingCaptureDescription + :param interval_in_seconds: The time window allows you to set the frequency with which the + capture to Azure Blobs will happen, value should between 60 to 900 seconds. + :type interval_in_seconds: int + :param size_limit_in_bytes: The size window defines the amount of data built up in your Event + Hub before an capture operation, value should be between 10485760 to 524288000 bytes. + :type size_limit_in_bytes: int + :param destination: Properties of Destination where capture will be stored. (Storage Account, + Blob Names). + :type destination: ~azure.mgmt.eventhub.v2021_11_01.models.Destination + :param skip_empty_archives: A value that indicates whether to Skip Empty Archives. + :type skip_empty_archives: bool + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'encoding': {'key': 'encoding', 'type': 'str'}, + 'interval_in_seconds': {'key': 'intervalInSeconds', 'type': 'int'}, + 'size_limit_in_bytes': {'key': 'sizeLimitInBytes', 'type': 'int'}, + 'destination': {'key': 'destination', 'type': 'Destination'}, + 'skip_empty_archives': {'key': 'skipEmptyArchives', 'type': 'bool'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + encoding: Optional[Union[str, "EncodingCaptureDescription"]] = None, + interval_in_seconds: Optional[int] = None, + size_limit_in_bytes: Optional[int] = None, + destination: Optional["Destination"] = None, + skip_empty_archives: Optional[bool] = None, + **kwargs + ): + super(CaptureDescription, self).__init__(**kwargs) + self.enabled = enabled + self.encoding = encoding + self.interval_in_seconds = interval_in_seconds + self.size_limit_in_bytes = size_limit_in_bytes + self.destination = destination + self.skip_empty_archives = skip_empty_archives + + +class CheckNameAvailabilityParameter(msrest.serialization.Model): + """Parameter supplied to check Namespace name availability operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name to check the namespace name availability. + :type name: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(CheckNameAvailabilityParameter, self).__init__(**kwargs) + self.name = name + + +class CheckNameAvailabilityResult(msrest.serialization.Model): + """The Result of the CheckNameAvailability operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar message: The detailed info regarding the reason associated with the Namespace. + :vartype message: str + :param name_available: Value indicating Namespace is availability, true if the Namespace is + available; otherwise, false. + :type name_available: bool + :param reason: The reason for unavailability of a Namespace. Possible values include: "None", + "InvalidName", "SubscriptionIsDisabled", "NameInUse", "NameInLockdown", + "TooManyNamespaceInCurrentSubscription". + :type reason: str or ~azure.mgmt.eventhub.v2021_11_01.models.UnavailableReason + """ + + _validation = { + 'message': {'readonly': True}, + } + + _attribute_map = { + 'message': {'key': 'message', 'type': 'str'}, + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + } + + def __init__( + self, + *, + name_available: Optional[bool] = None, + reason: Optional[Union[str, "UnavailableReason"]] = None, + **kwargs + ): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.message = None + self.name_available = name_available + self.reason = reason + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class TrackedResource(Resource): + """Definition of resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + + +class Cluster(TrackedResource): + """Single Event Hubs Cluster resource in List or Get operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Properties of the cluster SKU. + :type sku: ~azure.mgmt.eventhub.v2021_11_01.models.ClusterSku + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar created_at: The UTC time when the Event Hubs Cluster was created. + :vartype created_at: str + :ivar updated_at: The UTC time when the Event Hubs Cluster was last updated. + :vartype updated_at: str + :ivar metric_id: The metric ID of the cluster resource. Provided by the service and not + modifiable by the user. + :vartype metric_id: str + :ivar status: Status of the Cluster resource. + :vartype status: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'metric_id': {'readonly': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ClusterSku'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'str'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["ClusterSku"] = None, + **kwargs + ): + super(Cluster, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.system_data = None + self.created_at = None + self.updated_at = None + self.metric_id = None + self.status = None + + +class ClusterListResult(msrest.serialization.Model): + """The response of the List Event Hubs Clusters operation. + + :param value: The Event Hubs Clusters present in the List Event Hubs operation results. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.Cluster] + :param next_link: Link to the next set of results. Empty unless the value parameter contains an + incomplete list of Event Hubs Clusters. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Cluster]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Cluster"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ClusterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ClusterQuotaConfigurationProperties(msrest.serialization.Model): + """Contains all settings for the cluster. + + :param settings: All possible Cluster settings - a collection of key/value paired settings + which apply to quotas and configurations imposed on the cluster. + :type settings: dict[str, str] + """ + + _attribute_map = { + 'settings': {'key': 'settings', 'type': '{str}'}, + } + + def __init__( + self, + *, + settings: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ClusterQuotaConfigurationProperties, self).__init__(**kwargs) + self.settings = settings + + +class ClusterSku(msrest.serialization.Model): + """SKU parameters particular to a cluster instance. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of this SKU. Possible values include: "Dedicated". + :type name: str or ~azure.mgmt.eventhub.v2021_11_01.models.ClusterSkuName + :param capacity: The quantity of Event Hubs Cluster Capacity Units contained in this cluster. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + 'capacity': {'minimum': 1}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: Union[str, "ClusterSkuName"], + capacity: Optional[int] = None, + **kwargs + ): + super(ClusterSku, self).__init__(**kwargs) + self.name = name + self.capacity = capacity + + +class ConnectionState(msrest.serialization.Model): + """ConnectionState information. + + :param status: Status of the connection. Possible values include: "Pending", "Approved", + "Rejected", "Disconnected". + :type status: str or ~azure.mgmt.eventhub.v2021_11_01.models.PrivateLinkConnectionStatus + :param description: Description of the connection state. + :type description: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PrivateLinkConnectionStatus"]] = None, + description: Optional[str] = None, + **kwargs + ): + super(ConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + + +class ConsumerGroup(ProxyResource): + """Single item in List or Get Consumer group operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar created_at: Exact time the message was created. + :vartype created_at: ~datetime.datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: ~datetime.datetime + :param user_metadata: User Metadata is a placeholder to store user-defined string data with + maximum length 1024. e.g. it can be used to store descriptive data, such as list of teams and + their contact information also user-defined configuration settings can be stored. + :type user_metadata: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'user_metadata': {'key': 'properties.userMetadata', 'type': 'str'}, + } + + def __init__( + self, + *, + user_metadata: Optional[str] = None, + **kwargs + ): + super(ConsumerGroup, self).__init__(**kwargs) + self.system_data = None + self.created_at = None + self.updated_at = None + self.user_metadata = user_metadata + + +class ConsumerGroupListResult(msrest.serialization.Model): + """The result to the List Consumer Group operation. + + :param value: Result of the List Consumer Group operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroup] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of Consumer Group. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConsumerGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ConsumerGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ConsumerGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class Destination(msrest.serialization.Model): + """Capture storage details for capture description. + + :param name: Name for capture destination. + :type name: str + :param storage_account_resource_id: Resource id of the storage account to be used to create the + blobs. + :type storage_account_resource_id: str + :param blob_container: Blob container Name. + :type blob_container: str + :param archive_name_format: Blob naming convention for archive, e.g. + {Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}. Here all + the parameters (Namespace,EventHub .. etc) are mandatory irrespective of order. + :type archive_name_format: str + :param data_lake_subscription_id: Subscription Id of Azure Data Lake Store. + :type data_lake_subscription_id: str + :param data_lake_account_name: The Azure Data Lake Store name for the captured events. + :type data_lake_account_name: str + :param data_lake_folder_path: The destination folder path for the captured events. + :type data_lake_folder_path: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'storage_account_resource_id': {'key': 'properties.storageAccountResourceId', 'type': 'str'}, + 'blob_container': {'key': 'properties.blobContainer', 'type': 'str'}, + 'archive_name_format': {'key': 'properties.archiveNameFormat', 'type': 'str'}, + 'data_lake_subscription_id': {'key': 'properties.dataLakeSubscriptionId', 'type': 'str'}, + 'data_lake_account_name': {'key': 'properties.dataLakeAccountName', 'type': 'str'}, + 'data_lake_folder_path': {'key': 'properties.dataLakeFolderPath', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + storage_account_resource_id: Optional[str] = None, + blob_container: Optional[str] = None, + archive_name_format: Optional[str] = None, + data_lake_subscription_id: Optional[str] = None, + data_lake_account_name: Optional[str] = None, + data_lake_folder_path: Optional[str] = None, + **kwargs + ): + super(Destination, self).__init__(**kwargs) + self.name = name + self.storage_account_resource_id = storage_account_resource_id + self.blob_container = blob_container + self.archive_name_format = archive_name_format + self.data_lake_subscription_id = data_lake_subscription_id + self.data_lake_account_name = data_lake_account_name + self.data_lake_folder_path = data_lake_folder_path + + +class EHNamespace(TrackedResource): + """Single Namespace item in List or Get Operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: Properties of sku resource. + :type sku: ~azure.mgmt.eventhub.v2021_11_01.models.Sku + :param identity: Properties of BYOK Identity description. + :type identity: ~azure.mgmt.eventhub.v2021_11_01.models.Identity + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar provisioning_state: Provisioning state of the Namespace. + :vartype provisioning_state: str + :ivar status: Status of the Namespace. + :vartype status: str + :ivar created_at: The time the Namespace was created. + :vartype created_at: ~datetime.datetime + :ivar updated_at: The time the Namespace was updated. + :vartype updated_at: ~datetime.datetime + :ivar service_bus_endpoint: Endpoint you can use to perform Service Bus operations. + :vartype service_bus_endpoint: str + :param cluster_arm_id: Cluster ARM ID of the Namespace. + :type cluster_arm_id: str + :ivar metric_id: Identifier for Azure Insights metrics. + :vartype metric_id: str + :param is_auto_inflate_enabled: Value that indicates whether AutoInflate is enabled for + eventhub namespace. + :type is_auto_inflate_enabled: bool + :param maximum_throughput_units: Upper limit of throughput units when AutoInflate is enabled, + value should be within 0 to 20 throughput units. ( '0' if AutoInflateEnabled = true). + :type maximum_throughput_units: int + :param kafka_enabled: Value that indicates whether Kafka is enabled for eventhub namespace. + :type kafka_enabled: bool + :param zone_redundant: Enabling this property creates a Standard Event Hubs Namespace in + regions supported availability zones. + :type zone_redundant: bool + :param encryption: Properties of BYOK Encryption description. + :type encryption: ~azure.mgmt.eventhub.v2021_11_01.models.Encryption + :param private_endpoint_connections: List of private endpoint connections. + :type private_endpoint_connections: + list[~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection] + :param disable_local_auth: This property disables SAS authentication for the Event Hubs + namespace. + :type disable_local_auth: bool + :param alternate_name: Alternate name specified when alias and namespace names are same. + :type alternate_name: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'service_bus_endpoint': {'readonly': True}, + 'metric_id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'service_bus_endpoint': {'key': 'properties.serviceBusEndpoint', 'type': 'str'}, + 'cluster_arm_id': {'key': 'properties.clusterArmId', 'type': 'str'}, + 'metric_id': {'key': 'properties.metricId', 'type': 'str'}, + 'is_auto_inflate_enabled': {'key': 'properties.isAutoInflateEnabled', 'type': 'bool'}, + 'maximum_throughput_units': {'key': 'properties.maximumThroughputUnits', 'type': 'int'}, + 'kafka_enabled': {'key': 'properties.kafkaEnabled', 'type': 'bool'}, + 'zone_redundant': {'key': 'properties.zoneRedundant', 'type': 'bool'}, + 'encryption': {'key': 'properties.encryption', 'type': 'Encryption'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'alternate_name': {'key': 'properties.alternateName', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["Sku"] = None, + identity: Optional["Identity"] = None, + cluster_arm_id: Optional[str] = None, + is_auto_inflate_enabled: Optional[bool] = None, + maximum_throughput_units: Optional[int] = None, + kafka_enabled: Optional[bool] = None, + zone_redundant: Optional[bool] = None, + encryption: Optional["Encryption"] = None, + private_endpoint_connections: Optional[List["PrivateEndpointConnection"]] = None, + disable_local_auth: Optional[bool] = None, + alternate_name: Optional[str] = None, + **kwargs + ): + super(EHNamespace, self).__init__(location=location, tags=tags, **kwargs) + self.sku = sku + self.identity = identity + self.system_data = None + self.provisioning_state = None + self.status = None + self.created_at = None + self.updated_at = None + self.service_bus_endpoint = None + self.cluster_arm_id = cluster_arm_id + self.metric_id = None + self.is_auto_inflate_enabled = is_auto_inflate_enabled + self.maximum_throughput_units = maximum_throughput_units + self.kafka_enabled = kafka_enabled + self.zone_redundant = zone_redundant + self.encryption = encryption + self.private_endpoint_connections = private_endpoint_connections + self.disable_local_auth = disable_local_auth + self.alternate_name = alternate_name + + +class EHNamespaceIdContainer(msrest.serialization.Model): + """The full ARM ID of an Event Hubs Namespace. + + :param id: id parameter. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(EHNamespaceIdContainer, self).__init__(**kwargs) + self.id = id + + +class EHNamespaceIdListResult(msrest.serialization.Model): + """The response of the List Namespace IDs operation. + + :param value: Result of the List Namespace IDs operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespaceIdContainer] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EHNamespaceIdContainer]'}, + } + + def __init__( + self, + *, + value: Optional[List["EHNamespaceIdContainer"]] = None, + **kwargs + ): + super(EHNamespaceIdListResult, self).__init__(**kwargs) + self.value = value + + +class EHNamespaceListResult(msrest.serialization.Model): + """The response of the List Namespace operation. + + :param value: Result of the List Namespace operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of namespaces. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EHNamespace]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EHNamespace"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(EHNamespaceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class Encryption(msrest.serialization.Model): + """Properties to configure Encryption. + + :param key_vault_properties: Properties of KeyVault. + :type key_vault_properties: list[~azure.mgmt.eventhub.v2021_11_01.models.KeyVaultProperties] + :param key_source: Enumerates the possible value of keySource for Encryption. The only + acceptable values to pass in are None and "Microsoft.KeyVault". The default value is + "Microsoft.KeyVault". + :type key_source: str + :param require_infrastructure_encryption: Enable Infrastructure Encryption (Double Encryption). + :type require_infrastructure_encryption: bool + """ + + _attribute_map = { + 'key_vault_properties': {'key': 'keyVaultProperties', 'type': '[KeyVaultProperties]'}, + 'key_source': {'key': 'keySource', 'type': 'str'}, + 'require_infrastructure_encryption': {'key': 'requireInfrastructureEncryption', 'type': 'bool'}, + } + + def __init__( + self, + *, + key_vault_properties: Optional[List["KeyVaultProperties"]] = None, + key_source: Optional[str] = "Microsoft.KeyVault", + require_infrastructure_encryption: Optional[bool] = None, + **kwargs + ): + super(Encryption, self).__init__(**kwargs) + self.key_vault_properties = key_vault_properties + self.key_source = key_source + self.require_infrastructure_encryption = require_infrastructure_encryption + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~azure.mgmt.eventhub.v2021_11_01.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~azure.mgmt.eventhub.v2021_11_01.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Error response indicates Event Hub service is not able to process the incoming request. The reason is provided in the error message. + + :param error: The error object. + :type error: ~azure.mgmt.eventhub.v2021_11_01.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class Eventhub(ProxyResource): + """Single item in List or Get Event Hub operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar partition_ids: Current number of shards on the Event Hub. + :vartype partition_ids: list[str] + :ivar created_at: Exact time the Event Hub was created. + :vartype created_at: ~datetime.datetime + :ivar updated_at: The exact time the message was updated. + :vartype updated_at: ~datetime.datetime + :param message_retention_in_days: Number of days to retain the events for this Event Hub, value + should be 1 to 7 days. + :type message_retention_in_days: long + :param partition_count: Number of partitions created for the Event Hub, allowed values are from + 1 to 32 partitions. + :type partition_count: long + :param status: Enumerates the possible values for the status of the Event Hub. Possible values + include: "Active", "Disabled", "Restoring", "SendDisabled", "ReceiveDisabled", "Creating", + "Deleting", "Renaming", "Unknown". + :type status: str or ~azure.mgmt.eventhub.v2021_11_01.models.EntityStatus + :param capture_description: Properties of capture description. + :type capture_description: ~azure.mgmt.eventhub.v2021_11_01.models.CaptureDescription + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + 'partition_ids': {'readonly': True}, + 'created_at': {'readonly': True}, + 'updated_at': {'readonly': True}, + 'message_retention_in_days': {'minimum': 1}, + 'partition_count': {'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'partition_ids': {'key': 'properties.partitionIds', 'type': '[str]'}, + 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, + 'updated_at': {'key': 'properties.updatedAt', 'type': 'iso-8601'}, + 'message_retention_in_days': {'key': 'properties.messageRetentionInDays', 'type': 'long'}, + 'partition_count': {'key': 'properties.partitionCount', 'type': 'long'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'capture_description': {'key': 'properties.captureDescription', 'type': 'CaptureDescription'}, + } + + def __init__( + self, + *, + message_retention_in_days: Optional[int] = None, + partition_count: Optional[int] = None, + status: Optional[Union[str, "EntityStatus"]] = None, + capture_description: Optional["CaptureDescription"] = None, + **kwargs + ): + super(Eventhub, self).__init__(**kwargs) + self.system_data = None + self.partition_ids = None + self.created_at = None + self.updated_at = None + self.message_retention_in_days = message_retention_in_days + self.partition_count = partition_count + self.status = status + self.capture_description = capture_description + + +class EventHubListResult(msrest.serialization.Model): + """The result of the List EventHubs operation. + + :param value: Result of the List EventHubs operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.Eventhub] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of EventHubs. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Eventhub]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Eventhub"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(EventHubListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class Identity(msrest.serialization.Model): + """Properties to configure Identity for Bring your Own Keys. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: ObjectId from the KeyVault. + :vartype principal_id: str + :ivar tenant_id: TenantId from the KeyVault. + :vartype tenant_id: str + :param type: Type of managed service identity. Possible values include: "SystemAssigned", + "UserAssigned", "SystemAssigned, UserAssigned", "None". + :type type: str or ~azure.mgmt.eventhub.v2021_11_01.models.ManagedServiceIdentityType + :param user_assigned_identities: Properties for User Assigned Identities. + :type user_assigned_identities: dict[str, + ~azure.mgmt.eventhub.v2021_11_01.models.UserAssignedIdentity] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ManagedServiceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "UserAssignedIdentity"]] = None, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class KeyVaultProperties(msrest.serialization.Model): + """Properties to configure keyVault Properties. + + :param key_name: Name of the Key from KeyVault. + :type key_name: str + :param key_vault_uri: Uri of KeyVault. + :type key_vault_uri: str + :param key_version: Key Version. + :type key_version: str + :param identity: + :type identity: ~azure.mgmt.eventhub.v2021_11_01.models.UserAssignedIdentityProperties + """ + + _attribute_map = { + 'key_name': {'key': 'keyName', 'type': 'str'}, + 'key_vault_uri': {'key': 'keyVaultUri', 'type': 'str'}, + 'key_version': {'key': 'keyVersion', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'UserAssignedIdentityProperties'}, + } + + def __init__( + self, + *, + key_name: Optional[str] = None, + key_vault_uri: Optional[str] = None, + key_version: Optional[str] = None, + identity: Optional["UserAssignedIdentityProperties"] = None, + **kwargs + ): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_name = key_name + self.key_vault_uri = key_vault_uri + self.key_version = key_version + self.identity = identity + + +class NetworkRuleSet(ProxyResource): + """Description of topic resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :param trusted_service_access_enabled: Value that indicates whether Trusted Service Access is + Enabled or not. + :type trusted_service_access_enabled: bool + :param default_action: Default Action for Network Rule Set. Possible values include: "Allow", + "Deny". + :type default_action: str or ~azure.mgmt.eventhub.v2021_11_01.models.DefaultAction + :param virtual_network_rules: List VirtualNetwork Rules. + :type virtual_network_rules: + list[~azure.mgmt.eventhub.v2021_11_01.models.NWRuleSetVirtualNetworkRules] + :param ip_rules: List of IpRules. + :type ip_rules: list[~azure.mgmt.eventhub.v2021_11_01.models.NWRuleSetIpRules] + :param public_network_access: This determines if traffic is allowed over public network. By + default it is enabled. Possible values include: "Enabled", "Disabled". Default value: + "Enabled". + :type public_network_access: str or + ~azure.mgmt.eventhub.v2021_11_01.models.PublicNetworkAccessFlag + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'trusted_service_access_enabled': {'key': 'properties.trustedServiceAccessEnabled', 'type': 'bool'}, + 'default_action': {'key': 'properties.defaultAction', 'type': 'str'}, + 'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'}, + 'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + trusted_service_access_enabled: Optional[bool] = None, + default_action: Optional[Union[str, "DefaultAction"]] = None, + virtual_network_rules: Optional[List["NWRuleSetVirtualNetworkRules"]] = None, + ip_rules: Optional[List["NWRuleSetIpRules"]] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccessFlag"]] = "Enabled", + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.system_data = None + self.trusted_service_access_enabled = trusted_service_access_enabled + self.default_action = default_action + self.virtual_network_rules = virtual_network_rules + self.ip_rules = ip_rules + self.public_network_access = public_network_access + + +class NetworkRuleSetListResult(msrest.serialization.Model): + """The response of the List NetworkRuleSet operation. + + :param value: Result of the List NetworkRuleSet operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSet] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of NetworkRuleSet. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkRuleSet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkRuleSet"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkRuleSetListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NWRuleSetIpRules(msrest.serialization.Model): + """The response from the List namespace operation. + + :param ip_mask: IP Mask. + :type ip_mask: str + :param action: The IP Filter Action. Possible values include: "Allow". + :type action: str or ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleIPAction + """ + + _attribute_map = { + 'ip_mask': {'key': 'ipMask', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_mask: Optional[str] = None, + action: Optional[Union[str, "NetworkRuleIPAction"]] = None, + **kwargs + ): + super(NWRuleSetIpRules, self).__init__(**kwargs) + self.ip_mask = ip_mask + self.action = action + + +class NWRuleSetVirtualNetworkRules(msrest.serialization.Model): + """The response from the List namespace operation. + + :param subnet: Subnet properties. + :type subnet: ~azure.mgmt.eventhub.v2021_11_01.models.Subnet + :param ignore_missing_vnet_service_endpoint: Value that indicates whether to ignore missing + Vnet Service Endpoint. + :type ignore_missing_vnet_service_endpoint: bool + """ + + _attribute_map = { + 'subnet': {'key': 'subnet', 'type': 'Subnet'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + } + + def __init__( + self, + *, + subnet: Optional["Subnet"] = None, + ignore_missing_vnet_service_endpoint: Optional[bool] = None, + **kwargs + ): + super(NWRuleSetVirtualNetworkRules, self).__init__(**kwargs) + self.subnet = subnet + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint + + +class Operation(msrest.serialization.Model): + """A Event Hub REST API operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Operation name: {provider}/{resource}/{operation}. + :vartype name: str + :param is_data_action: Indicates whether the operation is a data action. + :type is_data_action: bool + :param display: Display of the operation. + :type display: ~azure.mgmt.eventhub.v2021_11_01.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param properties: Properties of the operation. + :type properties: any + """ + + _validation = { + 'name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, + } + + def __init__( + self, + *, + is_data_action: Optional[bool] = None, + display: Optional["OperationDisplay"] = None, + origin: Optional[str] = None, + properties: Optional[Any] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = None + self.is_data_action = is_data_action + self.display = display + self.origin = origin + self.properties = properties + + +class OperationDisplay(msrest.serialization.Model): + """Operation display payload. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar provider: Resource provider of the operation. + :vartype provider: str + :ivar resource: Resource of the operation. + :vartype resource: str + :ivar operation: Localized friendly name for the operation. + :vartype operation: str + :ivar description: Localized friendly description for the operation. + :vartype description: str + """ + + _validation = { + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + 'operation': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = None + self.resource = None + self.operation = None + self.description = None + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list Event Hub operations. It contains a list of operations and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of Event Hub operations supported by the Microsoft.EventHub resource + provider. + :vartype value: list[~azure.mgmt.eventhub.v2021_11_01.models.Operation] + :ivar next_link: URL to get the next set of operation list results if there are any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None + + +class PrivateEndpoint(msrest.serialization.Model): + """PrivateEndpoint information. + + :param id: The ARM identifier for Private Endpoint. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = id + + +class PrivateEndpointConnection(ProxyResource): + """Properties of the PrivateEndpointConnection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :param private_endpoint: The Private Endpoint resource for this Connection. + :type private_endpoint: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpoint + :param private_link_service_connection_state: Details about the state of the connection. + :type private_link_service_connection_state: + ~azure.mgmt.eventhub.v2021_11_01.models.ConnectionState + :param provisioning_state: Provisioning state of the Private Endpoint Connection. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Canceled", "Failed". + :type provisioning_state: str or + ~azure.mgmt.eventhub.v2021_11_01.models.EndPointProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'ConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["ConnectionState"] = None, + provisioning_state: Optional[Union[str, "EndPointProvisioningState"]] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.system_data = None + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """Result of the list of all private endpoint connections operation. + + :param value: A collection of private endpoint connection resources. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection] + :param next_link: A link for the next page of private endpoint connection resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PrivateLinkResource(msrest.serialization.Model): + """Information of the private link resource. + + :param id: Fully qualified identifier of the resource. + :type id: str + :param name: Name of the resource. + :type name: str + :param type: Type of the resource. + :type type: str + :param group_id: The private link resource group id. + :type group_id: str + :param required_members: The private link resource required member names. + :type required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + group_id: Optional[str] = None, + required_members: Optional[List[str]] = None, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.id = id + self.name = name + self.type = type + self.group_id = group_id + self.required_members = required_members + self.required_zone_names = required_zone_names + + +class PrivateLinkResourcesListResult(msrest.serialization.Model): + """Result of the List private link resources operation. + + :param value: A collection of private link resources. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.PrivateLinkResource] + :param next_link: A link for the next page of private link resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PrivateLinkResourcesListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RegenerateAccessKeyParameters(msrest.serialization.Model): + """Parameters supplied to the Regenerate Authorization Rule operation, specifies which key needs to be reset. + + All required parameters must be populated in order to send to Azure. + + :param key_type: Required. The access key to regenerate. Possible values include: "PrimaryKey", + "SecondaryKey". + :type key_type: str or ~azure.mgmt.eventhub.v2021_11_01.models.KeyType + :param key: Optional, if the key value provided, is set for KeyType or autogenerated Key value + set for keyType. + :type key: str + """ + + _validation = { + 'key_type': {'required': True}, + } + + _attribute_map = { + 'key_type': {'key': 'keyType', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__( + self, + *, + key_type: Union[str, "KeyType"], + key: Optional[str] = None, + **kwargs + ): + super(RegenerateAccessKeyParameters, self).__init__(**kwargs) + self.key_type = key_type + self.key = key + + +class SchemaGroup(ProxyResource): + """Single item in List or Get Schema Group operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.EventHub/Namespaces" or + "Microsoft.EventHub/Namespaces/EventHubs". + :vartype type: str + :ivar location: The geo-location where the resource lives. + :vartype location: str + :ivar system_data: The system meta data relating to this resource. + :vartype system_data: ~azure.mgmt.eventhub.v2021_11_01.models.SystemData + :ivar updated_at_utc: Exact time the Schema Group was updated. + :vartype updated_at_utc: ~datetime.datetime + :ivar created_at_utc: Exact time the Schema Group was created. + :vartype created_at_utc: ~datetime.datetime + :ivar e_tag: The ETag value. + :vartype e_tag: str + :param group_properties: dictionary object for SchemaGroup group properties. + :type group_properties: dict[str, str] + :param schema_compatibility: Possible values include: "None", "Backward", "Forward". + :type schema_compatibility: str or ~azure.mgmt.eventhub.v2021_11_01.models.SchemaCompatibility + :param schema_type: Possible values include: "Unknown", "Avro". + :type schema_type: str or ~azure.mgmt.eventhub.v2021_11_01.models.SchemaType + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'system_data': {'readonly': True}, + 'updated_at_utc': {'readonly': True}, + 'created_at_utc': {'readonly': True}, + 'e_tag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'updated_at_utc': {'key': 'properties.updatedAtUtc', 'type': 'iso-8601'}, + 'created_at_utc': {'key': 'properties.createdAtUtc', 'type': 'iso-8601'}, + 'e_tag': {'key': 'properties.eTag', 'type': 'str'}, + 'group_properties': {'key': 'properties.groupProperties', 'type': '{str}'}, + 'schema_compatibility': {'key': 'properties.schemaCompatibility', 'type': 'str'}, + 'schema_type': {'key': 'properties.schemaType', 'type': 'str'}, + } + + def __init__( + self, + *, + group_properties: Optional[Dict[str, str]] = None, + schema_compatibility: Optional[Union[str, "SchemaCompatibility"]] = None, + schema_type: Optional[Union[str, "SchemaType"]] = None, + **kwargs + ): + super(SchemaGroup, self).__init__(**kwargs) + self.system_data = None + self.updated_at_utc = None + self.created_at_utc = None + self.e_tag = None + self.group_properties = group_properties + self.schema_compatibility = schema_compatibility + self.schema_type = schema_type + + +class SchemaGroupListResult(msrest.serialization.Model): + """The result of the List SchemaGroup operation. + + :param value: Result of the List SchemaGroups operation. + :type value: list[~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroup] + :param next_link: Link to the next set of results. Not empty if Value contains incomplete list + of Schema Groups. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SchemaGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["SchemaGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(SchemaGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class Sku(msrest.serialization.Model): + """SKU parameters supplied to the create namespace operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of this SKU. Possible values include: "Basic", "Standard", + "Premium". + :type name: str or ~azure.mgmt.eventhub.v2021_11_01.models.SkuName + :param tier: The billing tier of this particular SKU. Possible values include: "Basic", + "Standard", "Premium". + :type tier: str or ~azure.mgmt.eventhub.v2021_11_01.models.SkuTier + :param capacity: The Event Hubs throughput units for Basic or Standard tiers, where value + should be 0 to 20 throughput units. The Event Hubs premium units for Premium tier, where value + should be 0 to 10 premium units. + :type capacity: int + """ + + _validation = { + 'name': {'required': True}, + 'capacity': {'minimum': 0}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: Union[str, "SkuName"], + tier: Optional[Union[str, "SkuTier"]] = None, + capacity: Optional[int] = None, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class Subnet(msrest.serialization.Model): + """Properties supplied for Subnet. + + :param id: Resource ID of Virtual Network Subnet. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(Subnet, self).__init__(**kwargs) + self.id = id + + +class SystemData(msrest.serialization.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.eventhub.v2021_11_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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.eventhub.v2021_11_01.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 UserAssignedIdentity(msrest.serialization.Model): + """Recognized Dictionary value. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: Principal Id of user assigned identity. + :vartype principal_id: str + :ivar client_id: Client Id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class UserAssignedIdentityProperties(msrest.serialization.Model): + """UserAssignedIdentityProperties. + + :param user_assigned_identity: ARM ID of user Identity selected for encryption. + :type user_assigned_identity: str + """ + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + } + + def __init__( + self, + *, + user_assigned_identity: Optional[str] = None, + **kwargs + ): + super(UserAssignedIdentityProperties, self).__init__(**kwargs) + self.user_assigned_identity = user_assigned_identity diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/__init__.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/__init__.py new file mode 100644 index 000000000000..84e125803ca8 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/__init__.py @@ -0,0 +1,31 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._clusters_operations import ClustersOperations +from ._configuration_operations import ConfigurationOperations +from ._namespaces_operations import NamespacesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._operations import Operations +from ._event_hubs_operations import EventHubsOperations +from ._disaster_recovery_configs_operations import DisasterRecoveryConfigsOperations +from ._consumer_groups_operations import ConsumerGroupsOperations +from ._schema_registry_operations import SchemaRegistryOperations + +__all__ = [ + 'ClustersOperations', + 'ConfigurationOperations', + 'NamespacesOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'Operations', + 'EventHubsOperations', + 'DisasterRecoveryConfigsOperations', + 'ConsumerGroupsOperations', + 'SchemaRegistryOperations', +] diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_clusters_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_clusters_operations.py new file mode 100644 index 000000000000..aaea31fbd1aa --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_clusters_operations.py @@ -0,0 +1,735 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ClustersOperations(object): + """ClustersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_available_cluster_region( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.AvailableClustersList" + """List the quantity of available pre-provisioned Event Hubs Clusters, indexed by Azure region. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AvailableClustersList, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AvailableClustersList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableClustersList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_available_cluster_region.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AvailableClustersList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_available_cluster_region.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/availableClusterRegions'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ClusterListResult"] + """Lists the available Event Hubs Clusters within an ARM resource group. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.ClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/clusters'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ClusterListResult"] + """Lists the available Event Hubs Clusters within an ARM resource group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ClusterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.ClusterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ClusterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters'} # type: ignore + + def get( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Cluster" + """Gets the resource description of the specified Event Hubs Cluster. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Cluster, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.Cluster + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + parameters, # type: "_models.Cluster" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.Cluster"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Cluster"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Cluster') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Cluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + cluster_name, # type: str + parameters, # type: "_models.Cluster" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Cluster"] + """Creates or updates an instance of an Event Hubs Cluster. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :param parameters: Parameters for creating a eventhub cluster resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.Cluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Cluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventhub.v2021_11_01.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + parameters, # type: "_models.Cluster" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.Cluster"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Cluster"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Cluster') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('Cluster', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + cluster_name, # type: str + parameters, # type: "_models.Cluster" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.Cluster"] + """Modifies mutable properties on the Event Hubs Cluster. This operation is idempotent. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :param parameters: The properties of the Event Hubs Cluster which should be updated. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.Cluster + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either Cluster or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventhub.v2021_11_01.models.Cluster] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Cluster"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Cluster', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes an existing Event Hubs Cluster. This operation is idempotent. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}'} # type: ignore + + def list_namespaces( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.EHNamespaceIdListResult" + """List all Event Hubs Namespace IDs in an Event Hubs Dedicated Cluster. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EHNamespaceIdListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespaceIdListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespaceIdListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_namespaces.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EHNamespaceIdListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_namespaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/namespaces'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_configuration_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_configuration_operations.py new file mode 100644 index 000000000000..fa8d014a0201 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_configuration_operations.py @@ -0,0 +1,180 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ConfigurationOperations(object): + """ConfigurationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def patch( + self, + resource_group_name, # type: str + cluster_name, # type: str + parameters, # type: "_models.ClusterQuotaConfigurationProperties" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ClusterQuotaConfigurationProperties"] + """Replace all specified Event Hubs Cluster settings with those contained in the request body. + Leaves the settings not specified in the request body unmodified. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :param parameters: Parameters for creating an Event Hubs Cluster resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.ClusterQuotaConfigurationProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterQuotaConfigurationProperties, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ClusterQuotaConfigurationProperties or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ClusterQuotaConfigurationProperties"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ClusterQuotaConfigurationProperties') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ClusterQuotaConfigurationProperties', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ClusterQuotaConfigurationProperties', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default'} # type: ignore + + def get( + self, + resource_group_name, # type: str + cluster_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ClusterQuotaConfigurationProperties" + """Get all Event Hubs Cluster settings - a collection of key/value pairs which represent the + quotas and settings imposed on the cluster. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param cluster_name: The name of the Event Hubs Cluster. + :type cluster_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ClusterQuotaConfigurationProperties, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ClusterQuotaConfigurationProperties + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ClusterQuotaConfigurationProperties"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ClusterQuotaConfigurationProperties', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/clusters/{clusterName}/quotaConfiguration/default'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_consumer_groups_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_consumer_groups_operations.py new file mode 100644 index 000000000000..a69040bbbc1e --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_consumer_groups_operations.py @@ -0,0 +1,348 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ConsumerGroupsOperations(object): + """ConsumerGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_or_update( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + consumer_group_name, # type: str + parameters, # type: "_models.ConsumerGroup" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConsumerGroup" + """Creates or updates an Event Hubs consumer group as a nested resource within a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param consumer_group_name: The consumer group name. + :type consumer_group_name: str + :param parameters: Parameters supplied to create or update a consumer group resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerGroup, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConsumerGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ConsumerGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConsumerGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + consumer_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a consumer group from the specified Event Hub and resource group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param consumer_group_name: The consumer group name. + :type consumer_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + consumer_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ConsumerGroup" + """Gets a description for the specified consumer group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param consumer_group_name: The consumer group name. + :type consumer_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConsumerGroup, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConsumerGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'consumerGroupName': self._serialize.url("consumer_group_name", consumer_group_name, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConsumerGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups/{consumerGroupName}'} # type: ignore + + def list_by_event_hub( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + skip=None, # type: Optional[int] + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ConsumerGroupListResult"] + """Gets all the consumer groups in a Namespace. An empty feed is returned if no consumer group + exists in the Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param skip: Skip is only used if a previous operation returned a partial result. If a previous + response contains a nextLink element, the value of the nextLink element will include a skip + parameter that specifies a starting point to use for subsequent calls. + :type skip: int + :param top: May be used to limit the number of results to the most recent N usageDetails. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConsumerGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.ConsumerGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConsumerGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_event_hub.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', maximum=1000, minimum=0) + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ConsumerGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_event_hub.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/consumergroups'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_disaster_recovery_configs_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_disaster_recovery_configs_operations.py new file mode 100644 index 000000000000..91f5a2f30018 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_disaster_recovery_configs_operations.py @@ -0,0 +1,728 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DisasterRecoveryConfigsOperations(object): + """DisasterRecoveryConfigsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def check_name_availability( + self, + resource_group_name, # type: str + namespace_name, # type: str + parameters, # type: "_models.CheckNameAvailabilityParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameAvailabilityResult" + """Check the give Namespace name availability. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param parameters: Parameters to check availability of the given Alias name. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.CheckNameAvailabilityParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.CheckNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/checkNameAvailability'} # type: ignore + + def list( + self, + resource_group_name, # type: str + namespace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ArmDisasterRecoveryListResult"] + """Gets all Alias(Disaster Recovery configurations). + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ArmDisasterRecoveryListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecoveryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ArmDisasterRecoveryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ArmDisasterRecoveryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + namespace_name, # type: str + alias, # type: str + parameters, # type: "_models.ArmDisasterRecovery" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ArmDisasterRecovery"] + """Creates or updates a new Alias(Disaster Recovery configuration). + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :param parameters: Parameters required to create an Alias(Disaster Recovery configuration). + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecovery + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ArmDisasterRecovery, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecovery or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ArmDisasterRecovery"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ArmDisasterRecovery') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ArmDisasterRecovery', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + namespace_name, # type: str + alias, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an Alias(Disaster Recovery configuration). + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + namespace_name, # type: str + alias, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ArmDisasterRecovery" + """Retrieves Alias(Disaster Recovery configuration) for primary or secondary namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ArmDisasterRecovery, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.ArmDisasterRecovery + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ArmDisasterRecovery"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ArmDisasterRecovery', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}'} # type: ignore + + def break_pairing( + self, + resource_group_name, # type: str + namespace_name, # type: str + alias, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """This operation disables the Disaster Recovery and stops replicating changes from primary to + secondary namespaces. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.break_pairing.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + break_pairing.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/breakPairing'} # type: ignore + + def fail_over( + self, + resource_group_name, # type: str + namespace_name, # type: str + alias, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Invokes GEO DR failover and reconfigure the alias to point to the secondary namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.fail_over.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + fail_over.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/failover'} # type: ignore + + def list_authorization_rules( + self, + resource_group_name, # type: str + namespace_name, # type: str + alias, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AuthorizationRuleListResult"] + """Gets a list of authorization rules for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AuthorizationRuleListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_authorization_rules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AuthorizationRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules'} # type: ignore + + def get_authorization_rule( + self, + resource_group_name, # type: str + namespace_name, # type: str + alias, # type: str + authorization_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AuthorizationRule" + """Gets an AuthorizationRule for a Namespace by rule name. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}'} # type: ignore + + def list_keys( + self, + resource_group_name, # type: str + namespace_name, # type: str + alias, # type: str + authorization_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AccessKeys" + """Gets the primary and secondary connection strings for the Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param alias: The Disaster Recovery configuration name. + :type alias: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'alias': self._serialize.url("alias", alias, 'str', max_length=50, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/disasterRecoveryConfigs/{alias}/authorizationRules/{authorizationRuleName}/listKeys'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_event_hubs_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_event_hubs_operations.py new file mode 100644 index 000000000000..0bff2938d1f9 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_event_hubs_operations.py @@ -0,0 +1,766 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class EventHubsOperations(object): + """EventHubsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_namespace( + self, + resource_group_name, # type: str + namespace_name, # type: str + skip=None, # type: Optional[int] + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.EventHubListResult"] + """Gets all the Event Hubs in a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param skip: Skip is only used if a previous operation returned a partial result. If a previous + response contains a nextLink element, the value of the nextLink element will include a skip + parameter that specifies a starting point to use for subsequent calls. + :type skip: int + :param top: May be used to limit the number of results to the most recent N usageDetails. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EventHubListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.EventHubListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EventHubListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_namespace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', maximum=1000, minimum=0) + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('EventHubListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + parameters, # type: "_models.Eventhub" + **kwargs # type: Any + ): + # type: (...) -> "_models.Eventhub" + """Creates or updates a new Event Hub as a nested resource within a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param parameters: Parameters supplied to create an Event Hub resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.Eventhub + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Eventhub, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.Eventhub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Eventhub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'Eventhub') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Eventhub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an Event Hub from the specified Namespace and resource group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Eventhub" + """Gets an Event Hubs description for the specified Event Hub. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Eventhub, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.Eventhub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Eventhub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Eventhub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}'} # type: ignore + + def list_authorization_rules( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AuthorizationRuleListResult"] + """Gets the authorization rules for an Event Hub. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AuthorizationRuleListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_authorization_rules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AuthorizationRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules'} # type: ignore + + def create_or_update_authorization_rule( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + authorization_rule_name, # type: str + parameters, # type: "_models.AuthorizationRule" + **kwargs # type: Any + ): + # type: (...) -> "_models.AuthorizationRule" + """Creates or updates an AuthorizationRule for the specified Event Hub. Creation/update of the + AuthorizationRule will take a few seconds to take effect. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param parameters: The shared access AuthorizationRule. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AuthorizationRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + def get_authorization_rule( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + authorization_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AuthorizationRule" + """Gets an AuthorizationRule for an Event Hub by rule name. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + def delete_authorization_rule( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + authorization_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an Event Hub AuthorizationRule. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + def list_keys( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + authorization_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AccessKeys" + """Gets the ACS and SAS connection strings for the Event Hub. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/listKeys'} # type: ignore + + def regenerate_keys( + self, + resource_group_name, # type: str + namespace_name, # type: str + event_hub_name, # type: str + authorization_rule_name, # type: str + parameters, # type: "_models.RegenerateAccessKeyParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.AccessKeys" + """Regenerates the ACS and SAS connection strings for the Event Hub. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param event_hub_name: The Event Hub name. + :type event_hub_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param parameters: Parameters supplied to regenerate the AuthorizationRule Keys + (PrimaryKey/SecondaryKey). + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.RegenerateAccessKeyParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'eventHubName': self._serialize.url("event_hub_name", event_hub_name, 'str', max_length=256, min_length=1), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RegenerateAccessKeyParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/eventhubs/{eventHubName}/authorizationRules/{authorizationRuleName}/regenerateKeys'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_namespaces_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_namespaces_operations.py new file mode 100644 index 000000000000..02a3dec4495e --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_namespaces_operations.py @@ -0,0 +1,1224 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NamespacesOperations(object): + """NamespacesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.EHNamespaceListResult"] + """Lists all the available Namespaces within a subscription, irrespective of the resource groups. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EHNamespaceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('EHNamespaceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/namespaces'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.EHNamespaceListResult"] + """Lists the available Namespaces within a resource group. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either EHNamespaceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('EHNamespaceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + namespace_name, # type: str + parameters, # type: "_models.EHNamespace" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.EHNamespace"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EHNamespace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'EHNamespace') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + namespace_name, # type: str + parameters, # type: "_models.EHNamespace" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.EHNamespace"] + """Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. + This operation is idempotent. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param parameters: Parameters for creating a namespace resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either EHNamespace or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespace"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + namespace_name=namespace_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + namespace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + namespace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes an existing namespace. This operation also removes all associated resources under the + namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + namespace_name=namespace_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + namespace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.EHNamespace" + """Gets the description of the specified namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EHNamespace, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EHNamespace"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + namespace_name, # type: str + parameters, # type: "_models.EHNamespace" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.EHNamespace"] + """Creates or updates a namespace. Once created, this namespace's resource manifest is immutable. + This operation is idempotent. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param parameters: Parameters for updating a namespace resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EHNamespace, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.EHNamespace or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EHNamespace"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'EHNamespace') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('EHNamespace', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}'} # type: ignore + + def create_or_update_network_rule_set( + self, + resource_group_name, # type: str + namespace_name, # type: str + parameters, # type: "_models.NetworkRuleSet" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkRuleSet" + """Create or update NetworkRuleSet for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param parameters: The Namespace IpFilterRule. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSet + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkRuleSet, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkRuleSet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_network_rule_set.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkRuleSet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkRuleSet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'} # type: ignore + + def get_network_rule_set( + self, + resource_group_name, # type: str + namespace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkRuleSet" + """Gets NetworkRuleSet for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkRuleSet, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSet + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkRuleSet"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get_network_rule_set.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkRuleSet', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets/default'} # type: ignore + + def list_network_rule_set( + self, + resource_group_name, # type: str + namespace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkRuleSetListResult" + """Gets NetworkRuleSet for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkRuleSetListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.NetworkRuleSetListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkRuleSetListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_network_rule_set.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkRuleSetListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_network_rule_set.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSets'} # type: ignore + + def list_authorization_rules( + self, + resource_group_name, # type: str + namespace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AuthorizationRuleListResult"] + """Gets a list of authorization rules for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AuthorizationRuleListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_authorization_rules.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AuthorizationRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_authorization_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules'} # type: ignore + + def create_or_update_authorization_rule( + self, + resource_group_name, # type: str + namespace_name, # type: str + authorization_rule_name, # type: str + parameters, # type: "_models.AuthorizationRule" + **kwargs # type: Any + ): + # type: (...) -> "_models.AuthorizationRule" + """Creates or updates an AuthorizationRule for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param parameters: The shared access AuthorizationRule. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AuthorizationRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + def delete_authorization_rule( + self, + resource_group_name, # type: str + namespace_name, # type: str + authorization_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an AuthorizationRule for a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + def get_authorization_rule( + self, + resource_group_name, # type: str + namespace_name, # type: str + authorization_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AuthorizationRule" + """Gets an AuthorizationRule for a Namespace by rule name. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AuthorizationRule, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AuthorizationRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get_authorization_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AuthorizationRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_authorization_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}'} # type: ignore + + def list_keys( + self, + resource_group_name, # type: str + namespace_name, # type: str + authorization_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AccessKeys" + """Gets the primary and secondary connection strings for the Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.list_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/listKeys'} # type: ignore + + def regenerate_keys( + self, + resource_group_name, # type: str + namespace_name, # type: str + authorization_rule_name, # type: str + parameters, # type: "_models.RegenerateAccessKeyParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.AccessKeys" + """Regenerates the primary or secondary connection strings for the specified Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param authorization_rule_name: The authorization rule name. + :type authorization_rule_name: str + :param parameters: Parameters required to regenerate the connection string. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.RegenerateAccessKeyParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AccessKeys, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.AccessKeys + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AccessKeys"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.regenerate_keys.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'authorizationRuleName': self._serialize.url("authorization_rule_name", authorization_rule_name, 'str', min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'RegenerateAccessKeyParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AccessKeys', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + regenerate_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/authorizationRules/{authorizationRuleName}/regenerateKeys'} # type: ignore + + def check_name_availability( + self, + parameters, # type: "_models.CheckNameAvailabilityParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.CheckNameAvailabilityResult" + """Check the give Namespace name availability. + + :param parameters: Parameters to check availability of the given Namespace name. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.CheckNameAvailabilityParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.CheckNameAvailabilityResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.check_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.EventHub/checkNameAvailability'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_operations.py new file mode 100644 index 000000000000..e6ecae76870d --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationListResult"] + """Lists all of the available Event Hub REST API operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.OperationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.EventHub/operations'} # type: ignore diff --git a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_channels_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_private_endpoint_connections_operations.py similarity index 64% rename from sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_channels_operations.py rename to sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_private_endpoint_connections_operations.py index 549a274f01e7..1fe0c81706e4 100644 --- a/sdk/eventgrid/azure-mgmt-eventgrid/azure/mgmt/eventgrid/operations/_event_channels_operations.py +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_private_endpoint_connections_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class EventChannelsOperations(object): - """EventChannelsOperations operations. +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.eventgrid.models + :type models: ~azure.mgmt.eventhub.v2021_11_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,103 +47,113 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def get( + def list( self, resource_group_name, # type: str - partner_namespace_name, # type: str - event_channel_name, # type: str + namespace_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.EventChannel" - """Get an event channel. - - Get properties of an event channel. + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """Gets the available PrivateEndpointConnections within a namespace. - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: Name of the resource group within the azure subscription. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param event_channel_name: Name of the event channel. - :type event_channel_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventChannel, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventChannel + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannel"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-11-01" accept = "application/json" - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def get_next(next_link=None): + request = prepare_request(next_link) - deserialized = self._deserialize('EventChannel', pipeline_response) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - if cls: - return cls(pipeline_response, deserialized, {}) + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'} # type: ignore + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections'} # type: ignore def create_or_update( self, resource_group_name, # type: str - partner_namespace_name, # type: str - event_channel_name, # type: str - event_channel_info, # type: "_models.EventChannel" + namespace_name, # type: str + private_endpoint_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> "_models.EventChannel" - """Create an event channel. + # type: (...) -> "_models.PrivateEndpointConnection" + """Creates or updates PrivateEndpointConnections of service namespace. - Asynchronously creates a new event channel with the specified parameters. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: Name of the resource group within the azure subscription. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param event_channel_name: Name of the event channel. - :type event_channel_name: str - :param event_channel_info: EventChannel information. - :type event_channel_info: ~azure.mgmt.eventgrid.models.EventChannel + :param namespace_name: The Namespace name. + :type namespace_name: str + :param private_endpoint_connection_name: The PrivateEndpointConnection name. + :type private_endpoint_connection_name: str + :param parameters: Parameters supplied to update Status of PrivateEndPoint Connection to + namespace resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response - :return: EventChannel, or the result of cls(response) - :rtype: ~azure.mgmt.eventgrid.models.EventChannel + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannel"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-11-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -151,9 +161,9 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -167,29 +177,34 @@ def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(event_channel_info, 'EventChannel') + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - deserialized = self._deserialize('EventChannel', pipeline_response) + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def _delete_initial( self, resource_group_name, # type: str - partner_namespace_name, # type: str - event_channel_name, # type: str + namespace_name, # type: str + private_endpoint_connection_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -198,15 +213,16 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-11-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -216,6 +232,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -223,31 +240,31 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - partner_namespace_name, # type: str - event_channel_name, # type: str + namespace_name, # type: str + private_endpoint_connection_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Delete an event channel. + """Deletes an existing namespace. This operation also removes all associated resources under the + namespace. - Delete existing event channel. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: Name of the resource group within the azure subscription. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param event_channel_name: Name of the event channel. - :type event_channel_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param private_endpoint_connection_name: The PrivateEndpointConnection name. + :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -268,8 +285,8 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - partner_namespace_name=partner_namespace_name, - event_channel_name=event_channel_name, + namespace_name=namespace_name, + private_endpoint_connection_name=private_endpoint_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -282,10 +299,10 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - 'eventChannelName': self._serialize.url("event_channel_name", event_channel_name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -300,98 +317,68 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels/{eventChannelName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore - def list_by_partner_namespace( + def get( self, resource_group_name, # type: str - partner_namespace_name, # type: str - filter=None, # type: Optional[str] - top=None, # type: Optional[int] + namespace_name, # type: str + private_endpoint_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.EventChannelsListResult"] - """List event channels. + # type: (...) -> "_models.PrivateEndpointConnection" + """Gets a description for the specified Private Endpoint Connection name. - List all the event channels in a partner namespace. - - :param resource_group_name: The name of the resource group within the user's subscription. + :param resource_group_name: Name of the resource group within the azure subscription. :type resource_group_name: str - :param partner_namespace_name: Name of the partner namespace. - :type partner_namespace_name: str - :param filter: The query used to filter the search results using OData syntax. Filtering is - permitted on the 'name' property only and with limited number of OData operations. These - operations are: the 'contains' function as well as the following logical operations: not, and, - or, eq (for equal), and ne (for not equal). No arithmetic operations are supported. The - following is a valid filter example: $filter=contains(namE, 'PATTERN') and name ne 'PATTERN-1'. - The following is not a valid filter example: $filter=location eq 'westus'. - :type filter: str - :param top: The number of results to return per page for the list operation. Valid range for - top parameter is 1 to 100. If not specified, the default number of results to be returned is 20 - items per page. - :type top: int + :param namespace_name: The Namespace name. + :type namespace_name: str + :param private_endpoint_connection_name: The PrivateEndpointConnection name. + :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EventChannelsListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventgrid.models.EventChannelsListResult] + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateEndpointConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EventChannelsListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-10-15-preview" + api_version = "2021-11-01" accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_partner_namespace.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'partnerNamespaceName': self._serialize.url("partner_namespace_name", partner_namespace_name, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('EventChannelsListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return ItemPaged( - get_next, extract_data - ) - list_by_partner_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventGrid/partnerNamespaces/{partnerNamespaceName}/eventChannels'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_private_link_resources_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..e3015e7f2a25 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_private_link_resources_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + namespace_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourcesListResult" + """Gets lists of resources that supports Privatelinks. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.PrivateLinkResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/privateLinkResources'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_schema_registry_operations.py b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_schema_registry_operations.py new file mode 100644 index 000000000000..72376ca4a098 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/operations/_schema_registry_operations.py @@ -0,0 +1,331 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SchemaRegistryOperations(object): + """SchemaRegistryOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.eventhub.v2021_11_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_namespace( + self, + resource_group_name, # type: str + namespace_name, # type: str + skip=None, # type: Optional[int] + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SchemaGroupListResult"] + """Gets all the Schema Groups in a Namespace. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param skip: Skip is only used if a previous operation returned a partial result. If a previous + response contains a nextLink element, the value of the nextLink element will include a skip + parameter that specifies a starting point to use for subsequent calls. + :type skip: int + :param top: May be used to limit the number of results to the most recent N usageDetails. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SchemaGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SchemaGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_namespace.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if skip is not None: + query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', maximum=1000, minimum=0) + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=1000, minimum=1) + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SchemaGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_namespace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + namespace_name, # type: str + schema_group_name, # type: str + parameters, # type: "_models.SchemaGroup" + **kwargs # type: Any + ): + # type: (...) -> "_models.SchemaGroup" + """create_or_update. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param schema_group_name: The Schema Group name. + :type schema_group_name: str + :param parameters: Parameters supplied to create an Event Hub resource. + :type parameters: ~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SchemaGroup, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SchemaGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'schemaGroupName': self._serialize.url("schema_group_name", schema_group_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SchemaGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SchemaGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + namespace_name, # type: str + schema_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """delete. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param schema_group_name: The Schema Group name. + :type schema_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'schemaGroupName': self._serialize.url("schema_group_name", schema_group_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + namespace_name, # type: str + schema_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SchemaGroup" + """get. + + :param resource_group_name: Name of the resource group within the azure subscription. + :type resource_group_name: str + :param namespace_name: The Namespace name. + :type namespace_name: str + :param schema_group_name: The Schema Group name. + :type schema_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SchemaGroup, or the result of cls(response) + :rtype: ~azure.mgmt.eventhub.v2021_11_01.models.SchemaGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SchemaGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str', max_length=50, min_length=6), + 'schemaGroupName': self._serialize.url("schema_group_name", schema_group_name, 'str', max_length=256, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SchemaGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/schemagroups/{schemaGroupName}'} # type: ignore diff --git a/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/py.typed b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/eventhub/azure-mgmt-eventhub/azure/mgmt/eventhub/v2021_11_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/eventhub/azure-mgmt-eventhub/tests.yml b/sdk/eventhub/azure-mgmt-eventhub/tests.yml index 6a6f58e66ee2..3de54faefc1d 100644 --- a/sdk/eventhub/azure-mgmt-eventhub/tests.yml +++ b/sdk/eventhub/azure-mgmt-eventhub/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: eventhub BuildTargetingString: azure-mgmt-eventhub EnvVars: diff --git a/sdk/eventhub/tests.yml b/sdk/eventhub/tests.yml index 024fa153ea3d..90381cb9ce64 100644 --- a/sdk/eventhub/tests.yml +++ b/sdk/eventhub/tests.yml @@ -3,10 +3,8 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: eventhub BuildTargetingString: azure-eventhub* - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true MatrixFilters: diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md index 1a703635d9b0..c8dabf9aa927 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md @@ -1,8 +1,22 @@ # Release History -## 3.2.0b2 (Unreleased) +## 3.2.0b3 (Unreleased) -This version of the SDK defaults to the latest supported API version, which currently is v2021-09-30-preview. +### Features Added +- Added new `DocumentAnalysisClient` with `begin_analyze_document` and `begin_analyze_document_from_url` methods. Use these methods with the latest Form Recognizer +API version to analyze documents, with prebuilt and custom models. +- Added new models to use with the new `DocumentAnalysisClient`: `AnalyzeResult`, `AnalyzedDocument`, `BoundingRegion`, `DocumentElement`, `DocumentEntity`, `DocumentField`, `DocumentKeyValuePair`, `DocumentKeyValueElement`, `DocumentLine`, `DocumentPage`, `DocumentSelectionMark`, `DocumentSpan`, `DocumentStyle`, `DocumentTable`, `DocumentTableCell`, `DocumentWord`. +- Added new `DocumentModelAdministrationClient` with methods: `begin_build_model`, `begin_create_composed_model`, `begin_copy_model`, `get_copy_authorization`, `get_model`, `delete_model`, `list_models`, `get_operation`, `list_operations`, `get_account_info`, `get_document_analysis_client`. +- Added new models to use with the new `DocumentModelAdministrationClient`: `DocumentModel`, `DocumentModelInfo`, `DocTypeInfo`, `ModelOperation`, `ModelOperationInfo`, `AccountInfo`, `DocumentAnalysisError`, `DocumentAnalysisInnerError`. +- Added samples using the `DocumentAnalysisClient` and `DocumentModelAdministrationClient` under `/samples/v3.2-beta`. +- Added `DocumentAnalysisApiVersion` to be used with `DocumentAnalysisClient` and `DocumentModelAdministrationClient`. + +### Other Changes +- Python 3.5 is no longer supported in this release. + +## 3.2.0b1 (2021-10-07) + +This version of the SDK defaults to the latest supported API version, which is currently 2021-09-30-preview. > Note: Starting with version 2021-09-30-preview, a new set of clients were introduced to leverage the newest features of the Form Recognizer service. Please see the [Migration Guide](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/formrecognizer/azure-ai-formrecognizer/MIGRATION_GUIDE.md) for detailed instructions on how to update application code from client library version 3.1.X or lower to the latest version. Also, please refer to the [README](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/formrecognizer/azure-ai-formrecognizer/README.md) for more information about the library. @@ -18,6 +32,15 @@ API version to analyze documents, with prebuilt and custom models. ### Other Changes - Python 3.5 is no longer supported in this release. +## 3.2.0b2 (2021-11-09) + +### Features Added +- Added `get_words()` on `DocumentLine`. +- Added samples showing how to use `get_words()` on a `DocumentLine` under `/samples/v3.2-beta`: `sample_get_words_on_document_line.py` and `sample_get_words_on_document_line_async.py`. + +### Breaking Changes +- Renamed `DocumentElement` to `DocumentContentElement`. + ## 3.2.0b1 (2021-10-07) This version of the SDK defaults to the latest supported API version, which is currently 2021-09-30-preview. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/MIGRATION_GUIDE.md b/sdk/formrecognizer/azure-ai-formrecognizer/MIGRATION_GUIDE.md index 700a4d7fae6d..e4d9ac213c38 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/MIGRATION_GUIDE.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/MIGRATION_GUIDE.md @@ -595,7 +595,7 @@ print("-----------------------------------") ### Training a custom model Differences between the versions: -- Files for building a new model for version `3.2.x` can be created using the labeling tool found [here][fr_labeling_tool]. +- Files for building a new model for version `3.2.x` can be created using [Form Recognizer Studio][fr_labeling_tool]. - In version `3.1.x` the `use_training_labels` keyword argument was used to indicate whether to use labeled data when creating the custom model. - In version `3.2.x` the `use_training_labels` keyword argument is not supported since training must be carried out with labeled training documents. Additionally train without labels is now replaced with the prebuilt model `prebuilt-document` which extracts entities, key-value pairs, and layout from a document. @@ -666,4 +666,4 @@ For additional samples please take a look at the [Form Recognizer Samples][sampl [readme]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/README.md [samples_readme]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md -[fr_labeling_tool]: https://aka.ms/azsdk/formrecognizer/labelingtool \ No newline at end of file +[fr_labeling_tool]: https://aka.ms/azsdk/formrecognizer/formrecognizerstudio \ No newline at end of file diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/README.md b/sdk/formrecognizer/azure-ai-formrecognizer/README.md index e91cd0b7622a..5217f4920aa2 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/README.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/README.md @@ -33,7 +33,7 @@ This table shows the relationship between SDK versions and supported API version |SDK version|Supported API version of service |-|- -|3.2.0b1 - Latest beta release | 2.0, 2.1, 2021-09-30-preview +|3.2.0b2 - Latest beta release | 2.0, 2.1, 2021-09-30-preview |3.1.X - Latest GA release| 2.0, 2.1 (default) |3.0.0| 2.0 @@ -181,7 +181,7 @@ More information about analyzing documents, including supported features, locale - Listing document model operations or getting a specific model operation created within the last 24 hours. - Copying a custom model from one Form Recognizer resource to another. -Please note that models can also be built using a graphical user interface such as the [Form Recognizer Labeling Tool][labeling-tool]. +Please note that models can also be built using a graphical user interface such as [Form Recognizer Studio][fr-studio]. Sample code snippets are provided to illustrate using a DocumentModelAdministrationClient [here](#examples "Examples"). @@ -348,8 +348,32 @@ for style in result.styles: print("Document contains handwritten content: ") print(",".join([result.content[span.offset:span.offset + span.length] for span in style.spans])) -print("----Selection marks found in document----") for page in result.pages: + print("----Analyzing document from page #{}----".format(page.page_number)) + print( + "Page has width: {} and height: {}, measured with unit: {}".format( + page.width, page.height, page.unit + ) + ) + + for line_idx, line in enumerate(page.lines): + words = line.get_words() + print( + "...Line # {} has {} words and text '{}' within bounding box '{}'".format( + line_idx, + len(words), + line.content, + format_bounding_box(line.bounding_box), + ) + ) + + for word in words: + print( + "......Word '{}' has a confidence of {}".format( + word.content, word.confidence + ) + ) + for selection_mark in page.selection_marks: print( "...Selection mark is '{}' within bounding box '{}' and has a confidence of {}".format( @@ -360,6 +384,8 @@ for page in result.pages: ) ``` +- Read more about the features provided by the `prebuilt-document` model [here][service_prebuilt_document]. + ### Using Prebuilt Models Extract fields from select document types such as receipts, invoices, business cards, and identity documents using prebuilt models provided by the Form Recognizer service. @@ -600,6 +626,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [cognitive_resource_cli]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows [azure-key-credential]: https://aka.ms/azsdk/python/core/azurekeycredential [labeling-tool]: https://aka.ms/azsdk/formrecognizer/labelingtool +[fr-studio]: https://aka.ms/azsdk/formrecognizer/formrecognizerstudio [fr-build-model]: https://aka.ms/azsdk/formrecognizer/buildmodel [fr-build-training-set]: https://aka.ms/azsdk/formrecognizer/buildtrainingset [fr-models]: https://aka.ms/azsdk/formrecognizer/models @@ -620,6 +647,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [service_recognize_business_cards]: https://aka.ms/azsdk/formrecognizer/businesscardfieldschema [service_recognize_invoice]: https://aka.ms/azsdk/formrecognizer/invoicefieldschema [service_recognize_identity_documents]: https://aka.ms/azsdk/formrecognizer/iddocumentfieldschema +[service_prebuilt_document]: https://docs.microsoft.com/azure/applied-ai-services/form-recognizer/concept-general-document#general-document-features [sdk_logging_docs]: https://docs.microsoft.com/azure/developer/python/azure-sdk-logging [sample_readme]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/formrecognizer/azure-ai-formrecognizer/samples [changelog]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/__init__.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/__init__.py index c20ead661b69..5fafc1650083 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/__init__.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/__init__.py @@ -40,7 +40,7 @@ AnalyzeResult, AnalyzedDocument, BoundingRegion, - DocumentElement, + DocumentContentElement, DocumentEntity, DocumentField, DocumentKeyValuePair, @@ -100,7 +100,7 @@ "AnalyzeResult", "AnalyzedDocument", "BoundingRegion", - "DocumentElement", + "DocumentContentElement", "DocumentEntity", "DocumentField", "DocumentKeyValueElement", diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py index 655d1b447f7d..42ac9ad67d0c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_document_analysis_client.py @@ -144,8 +144,9 @@ def begin_analyze_document_from_url(self, model, document_url, **kwargs): :param str model: A unique model identifier can be passed in as a string. Use this to specify the custom model ID or prebuilt model ID. Prebuilt model IDs supported can be found here: https://aka.ms/azsdk/formrecognizer/models - :param str document_url: The URL of the document to analyze. The input must be a valid, encoded, and - publicly accessible URL of one of the supported formats: JPEG, PNG, PDF, TIFF, or BMP. + :param str document_url: The URL of the document to analyze. The input must be a valid, properly + encoded (i.e. encode special characters, such as empty spaces), and publicly accessible URL + of one of the supported formats: JPEG, PNG, PDF, TIFF, or BMP. :keyword str pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers and/or ranges of pages you want to get in the result. For a range of pages, use a hyphen, like `pages="1-3, 5-6"`. Separate each page number or range with a comma. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py index fc54473ef8b4..be14a10eed9c 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_models.py @@ -6,6 +6,7 @@ # pylint: disable=protected-access, too-many-lines +from typing import Union, Any, Iterable, List from enum import Enum from collections import namedtuple from ._generated.v2021_09_30_preview.models import ModelInfo, Error @@ -2134,13 +2135,17 @@ def from_dict(cls, data): ) -class DocumentElement(object): - """A DocumentElement. +class DocumentContentElement(object): + """A DocumentContentElement. - :ivar content: Text content of the word. + :ivar content: Text content of the document content element. :vartype content: str - :ivar bounding_box: Bounding box of the word. + :ivar bounding_box: Bounding box of the document content element. :vartype bounding_box: list[Point] + :ivar span: Location of the element in the full document content. + :vartype span: ~azure.ai.formrecognizer.DocumentSpan + :ivar confidence: Confidence of accurately extracting the document content element. + :vartype confidence: float :ivar str kind: The kind of document element. Possible kinds are "word" or "selectionMark" which correspond to a :class:`~azure.ai.formrecognizer.DocumentWord` or :class:`~azure.ai.formrecognizer.DocumentSelectionMark`, respectively. @@ -2149,16 +2154,18 @@ class DocumentElement(object): def __init__(self, **kwargs): self.content = kwargs.get("content", None) self.bounding_box = kwargs.get("bounding_box", None) + self.span = kwargs.get("span", None) + self.confidence = kwargs.get("confidence", None) self.kind = kwargs.get("kind", None) def __repr__(self): - return "DocumentElement(content={}, bounding_box={}, kind={})".format( - self.content, self.bounding_box, self.kind + return "DocumentContentElement(content={}, bounding_box={}, span={}, confidence={}, kind={})".format( + self.content, self.bounding_box, self.span, self.confidence, self.kind ) def to_dict(self): # type: () -> dict - """Returns a dict representation of DocumentElement. + """Returns a dict representation of DocumentContentElement. :return: dict :rtype: dict @@ -2168,23 +2175,27 @@ def to_dict(self): "bounding_box": [f.to_dict() for f in self.bounding_box] if self.bounding_box else [], + "span": self.span.to_dict() if self.span else None, + "confidence": self.confidence, "kind": self.kind, } @classmethod def from_dict(cls, data): - # type: (dict) -> DocumentElement - """Converts a dict in the shape of a DocumentElement to the model itself. + # type: (dict) -> DocumentContentElement + """Converts a dict in the shape of a DocumentContentElement to the model itself. - :param dict data: A dictionary in the shape of DocumentElement. - :return: DocumentElement - :rtype: DocumentElement + :param dict data: A dictionary in the shape of DocumentContentElement. + :return: DocumentContentElement + :rtype: DocumentContentElement """ return cls( content=data.get("content", None), bounding_box=[Point.from_dict(v) for v in data.get("bounding_box")] # type: ignore if len(data.get("bounding_box", [])) > 0 else [], + span=DocumentSpan.from_dict(data.get("span")) if data.get("span") else None, # type: ignore + confidence=data.get("confidence", None), kind=data.get("kind", None), ) @@ -2662,13 +2673,15 @@ class DocumentLine(object): """ def __init__(self, **kwargs): + self._parent = kwargs.get("_parent", None) self.content = kwargs.get("content", None) self.bounding_box = kwargs.get("bounding_box", None) self.spans = kwargs.get("spans", None) @classmethod - def _from_generated(cls, line): + def _from_generated(cls, line, document_page): return cls( + _parent=document_page, content=line.content, bounding_box=get_bounding_box(line), spans=prepare_document_spans(line.spans), @@ -2717,6 +2730,24 @@ def from_dict(cls, data): else [], ) + def get_words(self, **kwargs): # pylint: disable=unused-argument + # type: (Any) -> Iterable[DocumentWord] + """Get the words found in the spans of this DocumentLine. + + :return: iterable[DocumentWord] + :rtype: iterable[DocumentWord] + """ + if not self._parent: + raise ValueError( + "Cannot use get_words() on a model that has been converted from a dictionary. " + "Missing reference to parent element." + ) + result = [] + for word in self._parent.words: + if _in_span(word, self.spans): + result.append(word) + return result + class DocumentPage(object): """Content and layout elements extracted from a page of the input. @@ -2765,7 +2796,7 @@ def _from_generated(cls, page): width=page.width, height=page.height, unit=page.unit, - lines=[DocumentLine._from_generated(line) for line in page.lines] + lines=[DocumentLine._from_generated(line, page) for line in page.lines] if page.lines else [], words=[DocumentWord._from_generated(word) for word in page.words] @@ -2853,7 +2884,7 @@ def from_dict(cls, data): ) -class DocumentSelectionMark(DocumentElement): +class DocumentSelectionMark(DocumentContentElement): """A selection mark object representing check boxes, radio buttons, and other elements indicating a selection. :ivar state: State of the selection mark. Possible values include: "selected", @@ -2874,8 +2905,6 @@ class DocumentSelectionMark(DocumentElement): def __init__(self, **kwargs): super(DocumentSelectionMark, self).__init__(kind="selectionMark", **kwargs) self.state = kwargs.get("state", None) - self.span = kwargs.get("span", None) - self.confidence = kwargs.get("confidence", None) @classmethod def _from_generated(cls, mark): @@ -3129,11 +3158,11 @@ def __init__(self, **kwargs): @classmethod def _from_generated(cls, cell): return cls( - kind=cell.kind, + kind=cell.kind if cell.kind else "content", row_index=cell.row_index, column_index=cell.column_index, - row_span=cell.row_span, - column_span=cell.column_span, + row_span=cell.row_span if cell.row_span else 1, + column_span=cell.column_span if cell.column_span else 1, content=cell.content, bounding_regions=[ BoundingRegion._from_generated(region) @@ -3193,11 +3222,11 @@ def from_dict(cls, data): :rtype: DocumentTableCell """ return cls( - kind=data.get("kind", None), + kind=data.get("kind", "content"), row_index=data.get("row_index", None), column_index=data.get("column_index", None), - row_span=data.get("row_span", None), - column_span=data.get("column_span", None), + row_span=data.get("row_span", 1), + column_span=data.get("column_span", 1), content=data.get("content", None), bounding_regions=[BoundingRegion.from_dict(v) for v in data.get("bounding_regions")] # type: ignore if len(data.get("bounding_regions", [])) > 0 @@ -3417,7 +3446,7 @@ def _from_generated(cls, op, api_version): # pylint: disable=arguments-differ ) -class DocumentWord(DocumentElement): +class DocumentWord(DocumentContentElement): """A word object consisting of a contiguous sequence of characters. For non-space delimited languages, such as Chinese, Japanese, and Korean, each character is represented as its own word. @@ -3434,8 +3463,6 @@ class DocumentWord(DocumentElement): def __init__(self, **kwargs): super(DocumentWord, self).__init__(kind="word", **kwargs) - self.span = kwargs.get("span", None) - self.confidence = kwargs.get("confidence", None) @classmethod def _from_generated(cls, word): @@ -4048,3 +4075,13 @@ def from_dict(cls, data): innererror=DocumentAnalysisInnerError.from_dict(data.get("innererror")) # type: ignore if data.get("innererror") else None ) + + +def _in_span(element, spans): + # type: (DocumentWord, List[DocumentSpan]) -> bool + for span in spans: + if element.span.offset >= span.offset and ( + element.span.offset + element.span.length + ) <= (span.offset + span.length): + return True + return False diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_version.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_version.py index eb9792017c53..78189923471e 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_version.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_version.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "3.2.0b2" +VERSION = "3.2.0b3" diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py index 52db700c486e..cc5a0c50c7d7 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/aio/_document_analysis_client_async.py @@ -12,6 +12,7 @@ from .._api_versions import DocumentAnalysisApiVersion from ._form_base_client_async import FormRecognizerClientBaseAsync from .._models import AnalyzeResult + if TYPE_CHECKING: from azure.core.credentials import AzureKeyCredential from azure.core.credentials_async import AsyncTokenCredential @@ -150,8 +151,9 @@ async def begin_analyze_document_from_url( :param str model: A unique model identifier can be passed in as a string. Use this to specify the custom model ID or prebuilt model ID. Prebuilt model IDs supported can be found here: https://aka.ms/azsdk/formrecognizer/models - :param str document_url: The URL of the document to analyze. The input must be a valid, encoded, and - publicly accessible URL of one of the supported formats: JPEG, PNG, PDF, TIFF, or BMP. + :param str document_url: The URL of the document to analyze. The input must be a valid, properly + encoded (i.e. encode special characters, such as empty spaces), and publicly accessible URL + of one of the supported formats: JPEG, PNG, PDF, TIFF, or BMP. :keyword str pages: Custom page numbers for multi-page documents(PDF/TIFF). Input the page numbers and/or ranges of pages you want to get in the result. For a range of pages, use a hyphen, like `pages="1-3, 5-6"`. Separate each page number or range with a comma. diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md b/sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md index f10a6f8444ce..06a8fe3e5a45 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/README.md @@ -39,6 +39,7 @@ All of these samples need the endpoint to your Form Recognizer resource ([instru |[sample_manage_models.py][sample_manage_models] and [sample_manage_models_async.py][sample_manage_models_async]|Manage the models in your account| |[sample_get_operations.py][sample_get_operations] and [sample_get_operations_async.py][sample_get_operations_async]|Get and list the document model operations created within the past 24 hours| |[sample_copy_model.py][sample_copy] and [sample_copy_model_async.py][sample_copy_async]|Copy a custom model from one Form Recognizer resource to another| +|[sample_get_words_on_document_line.py][sample_get_words_on_document_line] and [sample_get_words_on_document_line_async.py][sample_get_words_on_document_line_async]|Get the words in a DocumentLine| ## Samples for client library versions 3.1.X @@ -135,6 +136,8 @@ what you can do with the Azure Form Recognizer client library. [sample_get_operations_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_operations_async.py [sample_copy]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_copy_model.py [sample_copy_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_copy_model_async.py +[sample_get_words_on_document_line]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_get_words_on_document_line.py +[sample_get_words_on_document_line_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_words_on_document_line_async.py [sample_authentication]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.1/sample_authentication.py diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/README.md b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/README.md new file mode 100644 index 000000000000..84d52f3e840c --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/README.md @@ -0,0 +1,26 @@ +# Advanced usage samples for Azure Form Recognizer client library for Python + +> Note: The samples included in this folder are aimed at providing additional context for processing information for the Form Recognizer library clients. These samples currently show usage with a preview version of the library and may be subject to change during later releases. + +These code samples show more advanced scenario operations with the Azure Form Recognizer client library. +The async versions of the samples require Python 3.6 or later. + +All of these samples need the endpoint to your Form Recognizer resource ([instructions on how to get endpoint][get-endpoint-instructions]), and your Form Recognizer API key ([instructions on how to get key][get-key-instructions]). + +## Advanced samples for client library versions 3.2.0b1 and later + +|**File Name**|**Description**| +|----------------|-------------| +|sample_get_elements_with_spans.py and sample_get_elements_with_spans_async.py|Get elements, such as lines, words, and/or styles, that are contained in the spans of another element| + +## Next steps + +Check out the [API reference documentation][python-fr-ref-docs] to learn more about +what you can do with the Azure Form Recognizer client library. + + +[python-fr-ref-docs]: https://aka.ms/azsdk/python/formrecognizer/docs +[get-endpoint-instructions]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/README.md#get-the-endpoint +[get-key-instructions]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/README.md#get-the-api-key + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/README.png) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/async_advanced_samples/sample_get_elements_with_spans_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/async_advanced_samples/sample_get_elements_with_spans_async.py new file mode 100644 index 000000000000..68aa20f82c58 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/async_advanced_samples/sample_get_elements_with_spans_async.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_get_elements_with_spans_async.py + +DESCRIPTION: + This sample demonstrates how to get elements that are contained in the spans of another element. + In this sample, the examples attempt to find the lines and styles that have the same spans as the + main search element. The purpose of this sample is to show how to search for document elements + that are within the same span area as other elements. + +USAGE: + python sample_get_elements_with_spans_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_FORM_RECOGNIZER_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_FORM_RECOGNIZER_KEY - your Form Recognizer API key +""" + +import os +import asyncio + +def get_styles(element_spans, styles): + result = [] + for span in element_spans: + for style in styles: + for style_span in style.spans: + if style_span.offset >= span.offset and ( + style_span.offset + style_span.length + ) <= (span.offset + span.length): + result.append(style) + return result + +def get_lines(element_spans, document_page): + result = [] + for span in element_spans: + for line in document_page.lines: + for line_span in line.spans: + if line_span.offset >= span.offset and ( + line_span.offset + line_span.length + ) <= (span.offset + span.length): + result.append(line) + return result + +def get_page(page_number, pages): + for page in pages: + if page.page_number == page_number: + return page + raise ValueError("could not find the requested page") + +async def get_elements_with_spans_async(): + path_to_sample_documents = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "..", + "..", + "./sample_forms/forms/Form_1.jpg", + ) + ) + + from azure.core.credentials import AzureKeyCredential + from azure.ai.formrecognizer.aio import DocumentAnalysisClient + + endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] + key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] + + document_analysis_client = DocumentAnalysisClient( + endpoint=endpoint, credential=AzureKeyCredential(key) + ) + async with document_analysis_client: + with open(path_to_sample_documents, "rb") as f: + poller = await document_analysis_client.begin_analyze_document( + "prebuilt-document", document=f + ) + result = await poller.result() + + # Below is a method to search for the lines of a particular element by using spans. + # This example uses DocumentTable, but other elements that also have a `spans` or `span` field + # can also be used to search for related elements, such as lines in this case. + # To see an example for searching for words which have a `span` field, see + # `sample_get_words_on_document_line.py` under the samples v3.2-beta directory. + for table_idx, table in enumerate(result.tables): + print( + "Table # {} has {} rows and {} columns".format( + table_idx, table.row_count, table.column_count + ) + ) + + lines = [] + + for region in table.bounding_regions: + print( + "Table # {} location on page: {}".format( + table_idx, + region.page_number, + ) + ) + lines.extend(get_lines(table.spans, get_page(region.page_number, result.pages))) + + print("Found # {} lines in the table".format(len(lines))) + for line in lines: + print( + "...Line '{}' is within bounding box: '{}'".format( + line.content, + line.bounding_box, + ) + ) + + # Below is a method to search for the style of a particular element by using spans. + # This example uses DocumentEntity, but other elements that also have a `spans` or `span` + # field can also be used to search for document text style. + for entity in result.entities: + styles = get_styles(entity.spans, result.styles) + print( + "Found entity '{}' of type '{}' with style:".format( + entity.content, entity.category, + ) + ) + if not styles: + print( + "...no handwritten text found" + ) + for style in styles: + if style.is_handwritten: + print( + "...handwritten with confidence {}".format(style.confidence) + ) + print("----------------------------------------") + + +async def main(): + await get_elements_with_spans_async() + + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/sample_get_elements_with_spans.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/sample_get_elements_with_spans.py new file mode 100644 index 000000000000..c896d816c7bd --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/advanced_samples/sample_get_elements_with_spans.py @@ -0,0 +1,136 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_get_elements_with_spans.py + +DESCRIPTION: + This sample demonstrates how to get elements that are contained in the spans of another element. + In this sample, the examples attempt to find the lines and styles that have the same spans as the + main search element. The purpose of this sample is to show how to search for document elements + that are within the same span area as other elements. + +USAGE: + python sample_get_elements_with_spans.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_FORM_RECOGNIZER_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_FORM_RECOGNIZER_KEY - your Form Recognizer API key +""" + +import os + +def get_styles(element_spans, styles): + result = [] + for span in element_spans: + for style in styles: + for style_span in style.spans: + if style_span.offset >= span.offset and ( + style_span.offset + style_span.length + ) <= (span.offset + span.length): + result.append(style) + return result + +def get_lines(element_spans, document_page): + result = [] + for span in element_spans: + for line in document_page.lines: + for line_span in line.spans: + if line_span.offset >= span.offset and ( + line_span.offset + line_span.length + ) <= (span.offset + span.length): + result.append(line) + return result + +def get_page(page_number, pages): + for page in pages: + if page.page_number == page_number: + return page + raise ValueError("could not find the requested page") + +def get_elements_with_spans(): + path_to_sample_documents = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "..", + "./sample_forms/forms/Form_1.jpg", + ) + ) + + from azure.core.credentials import AzureKeyCredential + from azure.ai.formrecognizer import DocumentAnalysisClient + + endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] + key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] + + document_analysis_client = DocumentAnalysisClient( + endpoint=endpoint, credential=AzureKeyCredential(key) + ) + with open(path_to_sample_documents, "rb") as f: + poller = document_analysis_client.begin_analyze_document( + "prebuilt-document", document=f + ) + result = poller.result() + + # Below is a method to search for the lines of a particular element by using spans. + # This example uses DocumentTable, but other elements that also have a `spans` or `span` field + # can also be used to search for related elements, such as lines in this case. + # To see an example for searching for words which have a `span` field, see + # `sample_get_words_on_document_line.py` under the samples v3.2-beta directory. + for table_idx, table in enumerate(result.tables): + print( + "Table # {} has {} rows and {} columns".format( + table_idx, table.row_count, table.column_count + ) + ) + + lines = [] + + for region in table.bounding_regions: + print( + "Table # {} location on page: {}".format( + table_idx, + region.page_number, + ) + ) + lines.extend(get_lines(table.spans, get_page(region.page_number, result.pages))) + + print("Found # {} lines in the table".format(len(lines))) + for line in lines: + print( + "...Line '{}' is within bounding box: '{}'".format( + line.content, + line.bounding_box, + ) + ) + + # Below is a method to search for the style of a particular element by using spans. + # This example uses DocumentEntity, but other elements that also have a `spans` or `span` + # field can also be used to search for document text style. + for entity in result.entities: + styles = get_styles(entity.spans, result.styles) + print( + "Found entity '{}' of type '{}' with style:".format( + entity.content, entity.category, + ) + ) + if not styles: + print( + "...no handwritten text found" + ) + for style in styles: + if style.is_handwritten: + print( + "...handwritten with confidence {}".format(style.confidence) + ) + print("----------------------------------------") + + +if __name__ == "__main__": + get_elements_with_spans() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_business_cards_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_business_cards_async.py index c7c10042f611..b97e6fce2388 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_business_cards_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_business_cards_async.py @@ -37,6 +37,7 @@ async def analyze_business_card_async(): "./sample_forms/business_cards/business-card-english.jpg", ) ) + from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import DocumentAnalysisClient diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_general_documents_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_general_documents_async.py index 0c0c4d81525d..a140f38a02cb 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_general_documents_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_general_documents_async.py @@ -101,20 +101,22 @@ async def analyze_general_documents(): ) for line_idx, line in enumerate(page.lines): + words = line.get_words() print( - "Line # {} has text content '{}' within bounding box '{}'".format( + "...Line # {} has {} words and text '{}' within bounding box '{}'".format( line_idx, + len(words), line.content, format_bounding_box(line.bounding_box), ) ) - for word in page.words: - print( - "...Word '{}' has a confidence of {}".format( - word.content, word.confidence + for word in words: + print( + "......Word '{}' has a confidence of {}".format( + word.content, word.confidence + ) ) - ) for selection_mark in page.selection_marks: print( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_layout_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_layout_async.py index b3ca754e707e..88832032e18b 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_layout_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_layout_async.py @@ -45,6 +45,7 @@ async def analyze_layout_async(): "./sample_forms/forms/form_selection_mark.png", ) ) + from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import DocumentAnalysisClient @@ -77,20 +78,22 @@ async def analyze_layout_async(): ) for line_idx, line in enumerate(page.lines): + words = line.get_words() print( - "Line # {} has text content '{}' within bounding box '{}'".format( + "...Line # {} has word count {} and text '{}' within bounding box '{}'".format( line_idx, + len(words), line.content, format_bounding_box(line.bounding_box), ) ) - for word in page.words: - print( - "...Word '{}' has a confidence of {}".format( - word.content, word.confidence + for word in words: + print( + "......Word '{}' has a confidence of {}".format( + word.content, word.confidence + ) ) - ) for selection_mark in page.selection_marks: print( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_receipts_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_receipts_async.py index c7dd3c6d112e..fd5a295ad0f4 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_receipts_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_analyze_receipts_async.py @@ -38,6 +38,7 @@ async def analyze_receipts_async(): "./sample_forms/receipt/contoso-allinone.jpg", ) ) + from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer.aio import DocumentAnalysisClient diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_operations_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_operations_async.py index dd90d72d643c..f007c8fabefa 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_operations_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_operations_async.py @@ -39,7 +39,6 @@ async def sample_get_operations_async(): async with document_model_admin_client: operations = document_model_admin_client.list_operations() - first_operation = await operations.__anext__() print("The following document model operations exist under my resource:") async for operation in operations: @@ -54,18 +53,23 @@ async def sample_get_operations_async(): # [START get_operation_async] # Get an operation by ID - print("\nGetting operation info by ID: {}".format(first_operation.operation_id)) - operation_info = await document_model_admin_client.get_operation(first_operation.operation_id) - if operation_info.status == "succeeded": - print("My {} operation is completed.".format(operation_info.kind)) - result = operation_info.result - print("Model ID: {}".format(result.model_id)) - elif operation_info.status == "failed": - print("My {} operation failed.".format(operation_info.kind)) - error = operation_info.error - print("{}: {}".format(error.code, error.message)) - else: - print("My operation status is {}".format(operation_info.status)) + try: + first_operation = await operations.__anext__() + + print("\nGetting operation info by ID: {}".format(first_operation.operation_id)) + operation_info = await document_model_admin_client.get_operation(first_operation.operation_id) + if operation_info.status == "succeeded": + print("My {} operation is completed.".format(operation_info.kind)) + result = operation_info.result + print("Model ID: {}".format(result.model_id)) + elif operation_info.status == "failed": + print("My {} operation failed.".format(operation_info.kind)) + error = operation_info.error + print("{}: {}".format(error.code, error.message)) + else: + print("My operation status is {}".format(operation_info.status)) + except StopAsyncIteration: + print("No operations found.") # [END get_operation_async] async def main(): diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_words_on_document_line_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_words_on_document_line_async.py new file mode 100644 index 000000000000..e4890933ee2a --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/async_samples/sample_get_words_on_document_line_async.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_get_words_on_document_line_async.py + +DESCRIPTION: + This sample demonstrates how to get the words contained in a DocumentLine. + Please note that `get_words` on DocumentLine is only available in SDK version + 3.2.0b2 and later. + +USAGE: + python sample_get_words_on_document_line_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_FORM_RECOGNIZER_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_FORM_RECOGNIZER_KEY - your Form Recognizer API key +""" + +import os +import asyncio + +def format_bounding_region(bounding_regions): + if not bounding_regions: + return "N/A" + return ", ".join("Page #{}: {}".format(region.page_number, format_bounding_box(region.bounding_box)) for region in bounding_regions) + +def format_bounding_box(bounding_box): + if not bounding_box: + return "N/A" + return ", ".join(["[{}, {}]".format(p.x, p.y) for p in bounding_box]) + + +async def get_words_on_document_line_async(): + path_to_sample_documents = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "..", + "..", + "./sample_forms/forms/Form_1.jpg", + ) + ) + + from azure.core.credentials import AzureKeyCredential + from azure.ai.formrecognizer.aio import DocumentAnalysisClient + + endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] + key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] + + document_analysis_client = DocumentAnalysisClient( + endpoint=endpoint, credential=AzureKeyCredential(key) + ) + async with document_analysis_client: + with open(path_to_sample_documents, "rb") as f: + poller = await document_analysis_client.begin_analyze_document( + "prebuilt-document", document=f + ) + result = await poller.result() + + for idx, page in enumerate(result.pages): + print("----Analyzing lines and words from page #{}----".format(idx + 1)) + print( + "Page has width: {} and height: {}, measured with unit: {}".format( + page.width, page.height, page.unit + ) + ) + + for line_idx, line in enumerate(page.lines): + words = line.get_words() + print( + "...Line # {} has word count {} and text '{}' within bounding box '{}'".format( + line_idx, + len(words), + line.content, + format_bounding_box(line.bounding_box), + ) + ) + + for word in words: + print( + "......Word '{}' has a confidence of {}".format( + word.content, word.confidence + ) + ) + + print("----------------------------------------") + + +async def main(): + await get_words_on_document_line_async() + + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_business_cards.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_business_cards.py index b5eb14fe08ee..add685e8ffcb 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_business_cards.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_business_cards.py @@ -35,6 +35,7 @@ def analyze_business_card(): "./sample_forms/business_cards/business-card-english.jpg", ) ) + from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import DocumentAnalysisClient diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_general_documents.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_general_documents.py index 016bd9eedd8d..92fcde468f5d 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_general_documents.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_general_documents.py @@ -97,20 +97,22 @@ def analyze_general_documents(): ) for line_idx, line in enumerate(page.lines): + words = line.get_words() print( - "...Line # {} has text content '{}' within bounding box '{}'".format( + "...Line # {} has {} words and text '{}' within bounding box '{}'".format( line_idx, + len(words), line.content, format_bounding_box(line.bounding_box), ) ) - for word in page.words: - print( - "...Word '{}' has a confidence of {}".format( - word.content, word.confidence + for word in words: + print( + "......Word '{}' has a confidence of {}".format( + word.content, word.confidence + ) ) - ) for selection_mark in page.selection_marks: print( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_layout.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_layout.py index 0b892b8dc16a..9a2e94a54854 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_layout.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_layout.py @@ -43,6 +43,7 @@ def analyze_layout(): "./sample_forms/forms/form_selection_mark.png", ) ) + from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import DocumentAnalysisClient @@ -74,20 +75,22 @@ def analyze_layout(): ) for line_idx, line in enumerate(page.lines): + words = line.get_words() print( - "...Line # {} has text content '{}' within bounding box '{}'".format( + "...Line # {} has word count {} and text '{}' within bounding box '{}'".format( line_idx, + len(words), line.content, format_bounding_box(line.bounding_box), ) ) - for word in page.words: - print( - "...Word '{}' has a confidence of {}".format( - word.content, word.confidence + for word in words: + print( + "......Word '{}' has a confidence of {}".format( + word.content, word.confidence + ) ) - ) for selection_mark in page.selection_marks: print( diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_receipts.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_receipts.py index c2c3fb1b98a2..fa18e4f606ef 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_receipts.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_analyze_receipts.py @@ -36,6 +36,7 @@ def analyze_receipts(): "./sample_forms/receipt/contoso-allinone.jpg", ) ) + from azure.core.credentials import AzureKeyCredential from azure.ai.formrecognizer import DocumentAnalysisClient diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_get_operations.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_get_operations.py index c13745e62dc3..9c991fe8a03f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_get_operations.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_get_operations.py @@ -51,18 +51,21 @@ def sample_get_operations(): # [START get_operation] # Get an operation by ID - print("\nGetting operation info by ID: {}".format(operations[0].operation_id)) - operation_info = document_model_admin_client.get_operation(operations[0].operation_id) - if operation_info.status == "succeeded": - print("My {} operation is completed.".format(operation_info.kind)) - result = operation_info.result - print("Model ID: {}".format(result.model_id)) - elif operation_info.status == "failed": - print("My {} operation failed.".format(operation_info.kind)) - error = operation_info.error - print("{}: {}".format(error.code, error.message)) + if operations: + print("\nGetting operation info by ID: {}".format(operations[0].operation_id)) + operation_info = document_model_admin_client.get_operation(operations[0].operation_id) + if operation_info.status == "succeeded": + print("My {} operation is completed.".format(operation_info.kind)) + result = operation_info.result + print("Model ID: {}".format(result.model_id)) + elif operation_info.status == "failed": + print("My {} operation failed.".format(operation_info.kind)) + error = operation_info.error + print("{}: {}".format(error.code, error.message)) + else: + print("My operation status is {}".format(operation_info.status)) else: - print("My operation status is {}".format(operation_info.status)) + print("No operations found.") # [END get_operation] if __name__ == '__main__': diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_get_words_on_document_line.py b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_get_words_on_document_line.py new file mode 100644 index 000000000000..4be7b0cedbf5 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/samples/v3.2-beta/sample_get_words_on_document_line.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_get_words_on_document_line.py + +DESCRIPTION: + This sample demonstrates how to get the words contained in a DocumentLine. + Please note that `get_words` on DocumentLine is only available in SDK version + 3.2.0b2 and later. + +USAGE: + python sample_get_words_on_document_line.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_FORM_RECOGNIZER_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_FORM_RECOGNIZER_KEY - your Form Recognizer API key +""" + +import os + +def format_bounding_region(bounding_regions): + if not bounding_regions: + return "N/A" + return ", ".join("Page #{}: {}".format(region.page_number, format_bounding_box(region.bounding_box)) for region in bounding_regions) + +def format_bounding_box(bounding_box): + if not bounding_box: + return "N/A" + return ", ".join(["[{}, {}]".format(p.x, p.y) for p in bounding_box]) + + +def get_words_on_document_line(): + path_to_sample_documents = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "..", + "./sample_forms/forms/Form_1.jpg", + ) + ) + + from azure.core.credentials import AzureKeyCredential + from azure.ai.formrecognizer import DocumentAnalysisClient + + endpoint = os.environ["AZURE_FORM_RECOGNIZER_ENDPOINT"] + key = os.environ["AZURE_FORM_RECOGNIZER_KEY"] + + document_analysis_client = DocumentAnalysisClient( + endpoint=endpoint, credential=AzureKeyCredential(key) + ) + with open(path_to_sample_documents, "rb") as f: + poller = document_analysis_client.begin_analyze_document( + "prebuilt-document", document=f + ) + result = poller.result() + + for idx, page in enumerate(result.pages): + print("----Analyzing lines and words from page #{}----".format(idx + 1)) + print( + "Page has width: {} and height: {}, measured with unit: {}".format( + page.width, page.height, page.unit + ) + ) + + for line_idx, line in enumerate(page.lines): + words = line.get_words() + print( + "...Line # {} has word count {} and text '{}' within bounding box '{}'".format( + line_idx, + len(words), + line.content, + format_bounding_box(line.bounding_box), + ) + ) + + for word in words: + print( + "......Word '{}' has a confidence of {}".format( + word.content, word.confidence + ) + ) + + print("----------------------------------------") + + +if __name__ == "__main__": + get_words_on_document_line() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_custom_document_signature_field.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_custom_document_signature_field.yaml new file mode 100644 index 000000000000..8345fa6538b6 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_custom_document_signature_field.yaml @@ -0,0 +1,654 @@ +interactions: +- request: + body: 'b''{"modelId": "61a962e6-78bd-4220-994f-093a17ec1e78", "azureBlobSource": + {"containerUrl": "container_sas_url"}}''' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '300' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels:build?api-version=2021-09-30-preview + response: + body: + string: '' + headers: + apim-request-id: + - b91fc2f6-5e2b-4d31-9723-f2b3e5a2ddab + content-length: + - '0' + date: + - Thu, 28 Oct 2021 22:25:19 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530908083_b91fc2f6-5e2b-4d31-9723-f2b3e5a2ddab?api-version=2021-09-30-preview + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '3125' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530908083_b91fc2f6-5e2b-4d31-9723-f2b3e5a2ddab?api-version=2021-09-30-preview + response: + body: + string: '{"operationId": "31530908083_b91fc2f6-5e2b-4d31-9723-f2b3e5a2ddab", + "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-10-28T22:25:17Z", + "lastUpdatedDateTime": "2021-10-28T22:25:23Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/61a962e6-78bd-4220-994f-093a17ec1e78?api-version=2021-09-30-preview", + "percentCompleted": 100, "result": {"docTypes": {"61a962e6-78bd-4220-994f-093a17ec1e78": + {"fieldSchema": {"Merchant": {"type": "string"}, "PhoneNumber": {"type": "string"}, + "Website": {"type": "string"}, "Email": {"type": "string"}, "PurchaseOrderNumber": + {"type": "string"}, "DatedAs": {"type": "string"}, "VendorName": {"type": + "string"}, "CompanyName": {"type": "string"}, "CompanyAddress": {"type": "string"}, + "CompanyPhoneNumber": {"type": "string"}, "Subtotal": {"type": "string"}, + "Tax": {"type": "string"}, "Total": {"type": "string"}, "Signature": {"type": + "string"}, "Quantity": {"type": "number"}, "FullSignature": {"type": "signature"}}, + "fieldConfidence": {"CompanyAddress": 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": + 0.95, "DatedAs": 0.95, "Email": 0.8, "FullSignature": 0.6, "Merchant": 0.95, + "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": 0.95, "Signature": + 0.95, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": 0.95, "Website": + 0.95}}}, "modelId": "61a962e6-78bd-4220-994f-093a17ec1e78", "createdDateTime": + "2021-10-28T22:25:22Z"}}' + headers: + apim-request-id: + - c1e1d02e-ad5a-4543-8a31-321889bbafba + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 Oct 2021 22:25:25 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '57' + status: + code: 200 + message: OK +- request: + body: '!!! The request body has been omitted from the recording because its size + 479269 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '479269' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/61a962e6-78bd-4220-994f-093a17ec1e78:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + response: + body: + string: '' + headers: + apim-request-id: + - d5f5f881-343f-4d69-8cc8-0fcd3ef2b18f + content-length: + - '0' + date: + - Thu, 28 Oct 2021 22:25:26 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/61a962e6-78bd-4220-994f-093a17ec1e78/analyzeResults/d5f5f881-343f-4d69-8cc8-0fcd3ef2b18f?api-version=2021-09-30-preview + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '835' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/61a962e6-78bd-4220-994f-093a17ec1e78/analyzeResults/d5f5f881-343f-4d69-8cc8-0fcd3ef2b18f?api-version=2021-09-30-preview + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-10-28T22:25:26Z", + "lastUpdatedDateTime": "2021-10-28T22:25:31Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "61a962e6-78bd-4220-994f-093a17ec1e78", "stringIndexType": + "unicodeCodePoint", "content": "Purchase Order\nHero Limited\nCompany Phone: + 555-348-6512\nWebsite: www.herolimited.com\nEmail:\nPurchase Order\nDated + As: 12/20/2020\nPurchase Order #: 948284\naccounts@herolimited.com\nShipped + To\nVendor Name: Hillary Swank\nCompany Name: Higgly Wiggly Books\nAddress: + 938 NE Burner Road\nBoulder City, CO 92848\nPhone: 938-294-2949\nShipped From\nName: + Bernie Sanders\nCompany Name: Jupiter Book Supply\nAddress: 383 N Kinnick + Road\nSeattle, WA 38383\nPhone: 932-299-0292\nDetails\nQuantity\nUnit Price\nTotal\nBindings\n20\n1.00\n20.00\nCovers + Small\n20\n1.00\n20.00\nFeather Bookmark\n20\n5.00\n100.00\nCopper Swirl Marker\n20\n5.00\n100.00\nBernie + Sanders\nBernie Sanders\nManager\nAdditional Notes:\nDo not Jostle Box. Unpack + carefully. Enjoy.\nSUBTOTAL\n$140.00\nTAX\n$4.00\nTOTAL\n$144.00\nJupiter + Book Supply will refund you 50% per book if returned within 60 days of reading + and\noffer you 25% off you next total purchase.", "pages": [{"pageNumber": + 1, "angle": 0, "width": 1700, "height": 2200, "unit": "pixel", "words": [{"content": + "Purchase", "boundingBox": [137, 140, 259, 139, 259, 167, 137, 167], "confidence": + 0.997, "span": {"offset": 0, "length": 8}}, {"content": "Order", "boundingBox": + [264, 139, 350, 139, 349, 167, 264, 167], "confidence": 0.995, "span": {"offset": + 9, "length": 5}}, {"content": "Hero", "boundingBox": [621, 208, 769, 206, + 769, 266, 620, 266], "confidence": 0.983, "span": {"offset": 15, "length": + 4}}, {"content": "Limited", "boundingBox": [793, 205, 1058, 204, 1057, 266, + 793, 266], "confidence": 0.997, "span": {"offset": 20, "length": 7}}, {"content": + "Company", "boundingBox": [163, 353, 270, 351, 270, 379, 164, 378], "confidence": + 0.993, "span": {"offset": 28, "length": 7}}, {"content": "Phone:", "boundingBox": + [275, 351, 358, 351, 359, 378, 276, 379], "confidence": 0.997, "span": {"offset": + 36, "length": 6}}, {"content": "555-348-6512", "boundingBox": [363, 351, 524, + 351, 524, 374, 364, 378], "confidence": 0.994, "span": {"offset": 43, "length": + 12}}, {"content": "Website:", "boundingBox": [167, 394, 265, 393, 265, 418, + 167, 417], "confidence": 0.997, "span": {"offset": 56, "length": 8}}, {"content": + "www.herolimited.com", "boundingBox": [270, 393, 522, 393, 522, 418, 270, + 418], "confidence": 0.993, "span": {"offset": 65, "length": 19}}, {"content": + "Email:", "boundingBox": [165, 435, 237, 435, 237, 460, 165, 460], "confidence": + 0.995, "span": {"offset": 85, "length": 6}}, {"content": "Purchase", "boundingBox": + [1113, 322, 1365, 321, 1364, 370, 1113, 368], "confidence": 0.997, "span": + {"offset": 92, "length": 8}}, {"content": "Order", "boundingBox": [1381, 321, + 1549, 321, 1548, 370, 1380, 370], "confidence": 0.995, "span": {"offset": + 101, "length": 5}}, {"content": "Dated", "boundingBox": [1025, 421, 1103, + 420, 1103, 448, 1025, 448], "confidence": 0.993, "span": {"offset": 107, "length": + 5}}, {"content": "As:", "boundingBox": [1110, 420, 1156, 420, 1156, 448, 1110, + 448], "confidence": 0.998, "span": {"offset": 113, "length": 3}}, {"content": + "12/20/2020", "boundingBox": [1162, 420, 1312, 421, 1312, 449, 1162, 448], + "confidence": 0.992, "span": {"offset": 117, "length": 10}}, {"content": "Purchase", + "boundingBox": [1023, 461, 1146, 461, 1147, 489, 1023, 488], "confidence": + 0.997, "span": {"offset": 128, "length": 8}}, {"content": "Order", "boundingBox": + [1152, 461, 1237, 461, 1237, 489, 1152, 489], "confidence": 0.995, "span": + {"offset": 137, "length": 5}}, {"content": "#:", "boundingBox": [1242, 461, + 1270, 461, 1270, 489, 1243, 489], "confidence": 0.997, "span": {"offset": + 143, "length": 2}}, {"content": "948284", "boundingBox": [1275, 461, 1373, + 462, 1373, 489, 1275, 489], "confidence": 0.995, "span": {"offset": 146, "length": + 6}}, {"content": "accounts@herolimited.com", "boundingBox": [164, 481, 471, + 479, 470, 503, 165, 503], "confidence": 0.959, "span": {"offset": 153, "length": + 24}}, {"content": "Shipped", "boundingBox": [167, 547, 328, 547, 327, 592, + 168, 592], "confidence": 0.997, "span": {"offset": 178, "length": 7}}, {"content": + "To", "boundingBox": [337, 547, 392, 547, 391, 591, 336, 592], "confidence": + 0.963, "span": {"offset": 186, "length": 2}}, {"content": "Vendor", "boundingBox": + [160, 611, 250, 610, 250, 638, 160, 637], "confidence": 0.997, "span": {"offset": + 189, "length": 6}}, {"content": "Name:", "boundingBox": [256, 610, 341, 609, + 340, 639, 256, 638], "confidence": 0.995, "span": {"offset": 196, "length": + 5}}, {"content": "Hillary", "boundingBox": [346, 609, 427, 609, 427, 639, + 346, 639], "confidence": 0.997, "span": {"offset": 202, "length": 7}}, {"content": + "Swank", "boundingBox": [433, 609, 518, 610, 517, 639, 433, 639], "confidence": + 0.995, "span": {"offset": 210, "length": 5}}, {"content": "Company", "boundingBox": + [160, 649, 275, 647, 276, 678, 161, 676], "confidence": 0.993, "span": {"offset": + 216, "length": 7}}, {"content": "Name:", "boundingBox": [281, 647, 366, 647, + 366, 679, 282, 678], "confidence": 0.995, "span": {"offset": 224, "length": + 5}}, {"content": "Higgly", "boundingBox": [372, 647, 449, 646, 449, 679, 372, + 679], "confidence": 0.997, "span": {"offset": 230, "length": 6}}, {"content": + "Wiggly", "boundingBox": [455, 646, 541, 646, 541, 678, 455, 679], "confidence": + 0.997, "span": {"offset": 237, "length": 6}}, {"content": "Books", "boundingBox": + [547, 646, 628, 646, 628, 676, 547, 678], "confidence": 0.995, "span": {"offset": + 244, "length": 5}}, {"content": "Address:", "boundingBox": [161, 685, 266, + 685, 265, 712, 160, 711], "confidence": 0.994, "span": {"offset": 250, "length": + 8}}, {"content": "938", "boundingBox": [271, 685, 319, 685, 318, 713, 271, + 712], "confidence": 0.993, "span": {"offset": 259, "length": 3}}, {"content": + "NE", "boundingBox": [324, 685, 360, 685, 359, 713, 323, 713], "confidence": + 0.998, "span": {"offset": 263, "length": 2}}, {"content": "Burner", "boundingBox": + [366, 685, 452, 685, 452, 713, 365, 713], "confidence": 0.997, "span": {"offset": + 266, "length": 6}}, {"content": "Road", "boundingBox": [458, 685, 521, 685, + 521, 713, 457, 713], "confidence": 0.992, "span": {"offset": 273, "length": + 4}}, {"content": "Boulder", "boundingBox": [279, 722, 369, 722, 370, 751, + 280, 750], "confidence": 0.994, "span": {"offset": 278, "length": 7}}, {"content": + "City,", "boundingBox": [375, 722, 431, 722, 432, 751, 376, 751], "confidence": + 0.995, "span": {"offset": 286, "length": 5}}, {"content": "CO", "boundingBox": + [437, 722, 473, 722, 473, 751, 437, 751], "confidence": 0.999, "span": {"offset": + 292, "length": 2}}, {"content": "92848", "boundingBox": [480, 722, 559, 722, + 559, 749, 480, 751], "confidence": 0.995, "span": {"offset": 295, "length": + 5}}, {"content": "Phone:", "boundingBox": [613, 722, 701, 722, 701, 749, 613, + 749], "confidence": 0.997, "span": {"offset": 301, "length": 6}}, {"content": + "938-294-2949", "boundingBox": [706, 722, 882, 722, 881, 748, 706, 749], "confidence": + 0.983, "span": {"offset": 308, "length": 12}}, {"content": "Shipped", "boundingBox": + [167, 784, 324, 785, 324, 830, 169, 830], "confidence": 0.997, "span": {"offset": + 321, "length": 7}}, {"content": "From", "boundingBox": [333, 785, 431, 785, + 431, 827, 333, 830], "confidence": 0.991, "span": {"offset": 329, "length": + 4}}, {"content": "Name:", "boundingBox": [166, 853, 246, 853, 245, 879, 166, + 879], "confidence": 0.994, "span": {"offset": 334, "length": 5}}, {"content": + "Bernie", "boundingBox": [251, 853, 333, 852, 332, 880, 251, 879], "confidence": + 0.997, "span": {"offset": 340, "length": 6}}, {"content": "Sanders", "boundingBox": + [338, 852, 444, 852, 444, 879, 338, 880], "confidence": 0.997, "span": {"offset": + 347, "length": 7}}, {"content": "Company", "boundingBox": [164, 890, 280, + 890, 281, 919, 165, 919], "confidence": 0.994, "span": {"offset": 355, "length": + 7}}, {"content": "Name:", "boundingBox": [285, 890, 372, 889, 372, 919, 286, + 919], "confidence": 0.995, "span": {"offset": 363, "length": 5}}, {"content": + "Jupiter", "boundingBox": [377, 889, 464, 889, 464, 919, 378, 919], "confidence": + 0.997, "span": {"offset": 369, "length": 7}}, {"content": "Book", "boundingBox": + [469, 889, 532, 889, 532, 920, 470, 919], "confidence": 0.992, "span": {"offset": + 377, "length": 4}}, {"content": "Supply", "boundingBox": [538, 889, 628, 890, + 628, 920, 538, 920], "confidence": 0.995, "span": {"offset": 382, "length": + 6}}, {"content": "Address:", "boundingBox": [166, 926, 271, 926, 271, 953, + 166, 953], "confidence": 0.994, "span": {"offset": 389, "length": 8}}, {"content": + "383", "boundingBox": [277, 925, 325, 925, 325, 953, 276, 953], "confidence": + 0.997, "span": {"offset": 398, "length": 3}}, {"content": "N", "boundingBox": + [330, 925, 346, 926, 346, 953, 330, 953], "confidence": 0.995, "span": {"offset": + 402, "length": 1}}, {"content": "Kinnick", "boundingBox": [355, 926, 444, + 926, 444, 954, 355, 953], "confidence": 0.997, "span": {"offset": 404, "length": + 7}}, {"content": "Road", "boundingBox": [450, 926, 516, 927, 515, 954, 449, + 954], "confidence": 0.983, "span": {"offset": 412, "length": 4}}, {"content": + "Seattle,", "boundingBox": [281, 965, 374, 964, 375, 991, 283, 991], "confidence": + 0.996, "span": {"offset": 417, "length": 8}}, {"content": "WA", "boundingBox": + [380, 964, 424, 964, 425, 991, 381, 991], "confidence": 0.998, "span": {"offset": + 426, "length": 2}}, {"content": "38383", "boundingBox": [432, 964, 510, 963, + 511, 990, 432, 991], "confidence": 0.995, "span": {"offset": 429, "length": + 5}}, {"content": "Phone:", "boundingBox": [760, 964, 847, 964, 846, 990, 760, + 990], "confidence": 0.997, "span": {"offset": 435, "length": 6}}, {"content": + "932-299-0292", "boundingBox": [852, 964, 1029, 963, 1028, 990, 851, 990], + "confidence": 0.987, "span": {"offset": 442, "length": 12}}, {"content": "Details", + "boundingBox": [447, 1048, 556, 1048, 555, 1078, 446, 1078], "confidence": + 0.993, "span": {"offset": 455, "length": 7}}, {"content": "Quantity", "boundingBox": + [886, 1048, 1030, 1047, 1029, 1084, 886, 1084], "confidence": 0.997, "span": + {"offset": 463, "length": 8}}, {"content": "Unit", "boundingBox": [1112, 1047, + 1175, 1047, 1175, 1078, 1111, 1078], "confidence": 0.992, "span": {"offset": + 472, "length": 4}}, {"content": "Price", "boundingBox": [1181, 1047, 1263, + 1048, 1262, 1078, 1181, 1078], "confidence": 0.995, "span": {"offset": 477, + "length": 5}}, {"content": "Total", "boundingBox": [1382, 1047, 1468, 1047, + 1468, 1077, 1382, 1077], "confidence": 0.995, "span": {"offset": 483, "length": + 5}}, {"content": "Bindings", "boundingBox": [172, 1094, 279, 1097, 279, 1123, + 173, 1122], "confidence": 0.993, "span": {"offset": 489, "length": 8}}, {"content": + "20", "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119], "confidence": + 0.997, "span": {"offset": 498, "length": 2}}, {"content": "1.00", "boundingBox": + [1240, 1095, 1290, 1094, 1291, 1117, 1240, 1118], "confidence": 0.988, "span": + {"offset": 501, "length": 4}}, {"content": "20.00", "boundingBox": [1458, + 1096, 1526, 1095, 1525, 1120, 1459, 1119], "confidence": 0.995, "span": {"offset": + 506, "length": 5}}, {"content": "Covers", "boundingBox": [170, 1136, 251, + 1136, 251, 1161, 170, 1161], "confidence": 0.995, "span": {"offset": 512, + "length": 6}}, {"content": "Small", "boundingBox": [256, 1136, 332, 1135, + 331, 1161, 256, 1161], "confidence": 0.995, "span": {"offset": 519, "length": + 5}}, {"content": "20", "boundingBox": [859, 1135, 889, 1135, 889, 1160, 859, + 1160], "confidence": 0.997, "span": {"offset": 525, "length": 2}}, {"content": + "1.00", "boundingBox": [1239, 1135, 1290, 1135, 1291, 1160, 1239, 1160], "confidence": + 0.984, "span": {"offset": 528, "length": 4}}, {"content": "20.00", "boundingBox": + [1458, 1135, 1526, 1135, 1526, 1160, 1458, 1160], "confidence": 0.995, "span": + {"offset": 533, "length": 5}}, {"content": "Feather", "boundingBox": [173, + 1180, 265, 1179, 265, 1206, 174, 1206], "confidence": 0.997, "span": {"offset": + 539, "length": 7}}, {"content": "Bookmark", "boundingBox": [270, 1179, 399, + 1178, 400, 1206, 271, 1206], "confidence": 0.997, "span": {"offset": 547, + "length": 8}}, {"content": "20", "boundingBox": [860, 1179, 888, 1179, 888, + 1204, 860, 1203], "confidence": 0.995, "span": {"offset": 556, "length": 2}}, + {"content": "5.00", "boundingBox": [1239, 1179, 1290, 1178, 1291, 1203, 1239, + 1204], "confidence": 0.994, "span": {"offset": 559, "length": 4}}, {"content": + "100.00", "boundingBox": [1443, 1181, 1525, 1180, 1525, 1204, 1443, 1205], + "confidence": 0.067, "span": {"offset": 564, "length": 6}}, {"content": "Copper", + "boundingBox": [170, 1223, 257, 1222, 257, 1253, 170, 1253], "confidence": + 0.995, "span": {"offset": 571, "length": 6}}, {"content": "Swirl", "boundingBox": + [263, 1222, 325, 1222, 325, 1251, 262, 1252], "confidence": 0.995, "span": + {"offset": 578, "length": 5}}, {"content": "Marker", "boundingBox": [331, + 1222, 429, 1223, 429, 1248, 330, 1251], "confidence": 0.997, "span": {"offset": + 584, "length": 6}}, {"content": "20", "boundingBox": [860, 1223, 887, 1223, + 887, 1247, 860, 1247], "confidence": 0.997, "span": {"offset": 591, "length": + 2}}, {"content": "5.00", "boundingBox": [1239, 1221, 1291, 1221, 1291, 1247, + 1239, 1247], "confidence": 0.988, "span": {"offset": 594, "length": 4}}, {"content": + "100.00", "boundingBox": [1444, 1224, 1525, 1223, 1524, 1247, 1444, 1248], + "confidence": 0.995, "span": {"offset": 599, "length": 6}}, {"content": "Bernie", + "boundingBox": [484, 1671, 595, 1671, 595, 1706, 484, 1706], "confidence": + 0.997, "span": {"offset": 606, "length": 6}}, {"content": "Sanders", "boundingBox": + [602, 1671, 762, 1670, 763, 1708, 602, 1706], "confidence": 0.997, "span": + {"offset": 613, "length": 7}}, {"content": "Bernie", "boundingBox": [542, + 1719, 614, 1719, 615, 1742, 544, 1742], "confidence": 0.995, "span": {"offset": + 621, "length": 6}}, {"content": "Sanders", "boundingBox": [618, 1719, 716, + 1719, 716, 1743, 619, 1742], "confidence": 0.997, "span": {"offset": 628, + "length": 7}}, {"content": "Manager", "boundingBox": [577, 1754, 681, 1756, + 680, 1778, 578, 1776], "confidence": 0.994, "span": {"offset": 636, "length": + 7}}, {"content": "Additional", "boundingBox": [173, 1796, 350, 1796, 349, + 1832, 173, 1831], "confidence": 0.993, "span": {"offset": 644, "length": 10}}, + {"content": "Notes:", "boundingBox": [357, 1796, 478, 1797, 477, 1833, 356, + 1832], "confidence": 0.997, "span": {"offset": 655, "length": 6}}, {"content": + "Do", "boundingBox": [175, 1881, 201, 1881, 202, 1907, 175, 1907], "confidence": + 0.988, "span": {"offset": 662, "length": 2}}, {"content": "not", "boundingBox": + [207, 1881, 251, 1880, 252, 1908, 208, 1907], "confidence": 0.998, "span": + {"offset": 665, "length": 3}}, {"content": "Jostle", "boundingBox": [257, + 1880, 330, 1880, 330, 1909, 257, 1908], "confidence": 0.997, "span": {"offset": + 669, "length": 6}}, {"content": "Box.", "boundingBox": [336, 1880, 397, 1880, + 397, 1909, 336, 1909], "confidence": 0.991, "span": {"offset": 676, "length": + 4}}, {"content": "Unpack", "boundingBox": [403, 1880, 497, 1880, 497, 1910, + 403, 1909], "confidence": 0.997, "span": {"offset": 681, "length": 6}}, {"content": + "carefully.", "boundingBox": [503, 1880, 620, 1880, 620, 1911, 503, 1910], + "confidence": 0.996, "span": {"offset": 688, "length": 10}}, {"content": "Enjoy.", + "boundingBox": [626, 1880, 706, 1881, 706, 1912, 626, 1911], "confidence": + 0.995, "span": {"offset": 699, "length": 6}}, {"content": "SUBTOTAL", "boundingBox": + [1147, 1575, 1293, 1575, 1293, 1600, 1147, 1600], "confidence": 0.993, "span": + {"offset": 706, "length": 8}}, {"content": "$140.00", "boundingBox": [1426, + 1572, 1526, 1572, 1525, 1597, 1427, 1599], "confidence": 0.993, "span": {"offset": + 715, "length": 7}}, {"content": "TAX", "boundingBox": [1236, 1618, 1288, 1618, + 1288, 1643, 1236, 1643], "confidence": 0.994, "span": {"offset": 723, "length": + 3}}, {"content": "$4.00", "boundingBox": [1458, 1615, 1529, 1615, 1529, 1642, + 1458, 1643], "confidence": 0.988, "span": {"offset": 727, "length": 5}}, {"content": + "TOTAL", "boundingBox": [1204, 1674, 1292, 1674, 1292, 1699, 1205, 1699], + "confidence": 0.994, "span": {"offset": 733, "length": 5}}, {"content": "$144.00", + "boundingBox": [1427, 1671, 1527, 1669, 1527, 1697, 1429, 1698], "confidence": + 0.983, "span": {"offset": 739, "length": 7}}, {"content": "Jupiter", "boundingBox": + [169, 1924, 265, 1924, 265, 1959, 169, 1959], "confidence": 0.994, "span": + {"offset": 747, "length": 7}}, {"content": "Book", "boundingBox": [272, 1924, + 350, 1924, 351, 1958, 272, 1959], "confidence": 0.992, "span": {"offset": + 755, "length": 4}}, {"content": "Supply", "boundingBox": [357, 1924, 460, + 1924, 460, 1958, 357, 1958], "confidence": 0.995, "span": {"offset": 760, + "length": 6}}, {"content": "will", "boundingBox": [467, 1924, 516, 1924, 516, + 1958, 467, 1958], "confidence": 0.991, "span": {"offset": 767, "length": 4}}, + {"content": "refund", "boundingBox": [523, 1924, 622, 1924, 621, 1958, 523, + 1958], "confidence": 0.997, "span": {"offset": 772, "length": 6}}, {"content": + "you", "boundingBox": [629, 1924, 685, 1924, 684, 1958, 628, 1958], "confidence": + 0.998, "span": {"offset": 779, "length": 3}}, {"content": "50%", "boundingBox": + [691, 1924, 761, 1924, 760, 1958, 691, 1958], "confidence": 0.988, "span": + {"offset": 783, "length": 3}}, {"content": "per", "boundingBox": [768, 1924, + 819, 1924, 819, 1958, 767, 1958], "confidence": 0.998, "span": {"offset": + 787, "length": 3}}, {"content": "book", "boundingBox": [826, 1924, 900, 1924, + 899, 1958, 825, 1958], "confidence": 0.992, "span": {"offset": 791, "length": + 4}}, {"content": "if", "boundingBox": [907, 1924, 927, 1924, 926, 1958, 906, + 1958], "confidence": 0.999, "span": {"offset": 796, "length": 2}}, {"content": + "returned", "boundingBox": [933, 1924, 1059, 1924, 1058, 1958, 933, 1958], + "confidence": 0.996, "span": {"offset": 799, "length": 8}}, {"content": "within", + "boundingBox": [1066, 1924, 1153, 1924, 1152, 1958, 1065, 1958], "confidence": + 0.997, "span": {"offset": 808, "length": 6}}, {"content": "60", "boundingBox": + [1160, 1924, 1200, 1924, 1199, 1958, 1159, 1958], "confidence": 0.999, "span": + {"offset": 815, "length": 2}}, {"content": "days", "boundingBox": [1207, 1924, + 1279, 1924, 1278, 1958, 1206, 1958], "confidence": 0.992, "span": {"offset": + 818, "length": 4}}, {"content": "of", "boundingBox": [1286, 1924, 1317, 1924, + 1316, 1958, 1284, 1958], "confidence": 0.997, "span": {"offset": 823, "length": + 2}}, {"content": "reading", "boundingBox": [1324, 1924, 1438, 1924, 1437, + 1958, 1322, 1958], "confidence": 0.997, "span": {"offset": 826, "length": + 7}}, {"content": "and", "boundingBox": [1445, 1924, 1505, 1924, 1504, 1958, + 1443, 1958], "confidence": 0.998, "span": {"offset": 834, "length": 3}}, {"content": + "offer", "boundingBox": [169, 1958, 231, 1958, 231, 1991, 169, 1991], "confidence": + 0.993, "span": {"offset": 838, "length": 5}}, {"content": "you", "boundingBox": + [237, 1958, 295, 1958, 295, 1992, 237, 1991], "confidence": 0.989, "span": + {"offset": 844, "length": 3}}, {"content": "25%", "boundingBox": [303, 1958, + 371, 1958, 372, 1992, 303, 1992], "confidence": 0.947, "span": {"offset": + 848, "length": 3}}, {"content": "off", "boundingBox": [378, 1958, 420, 1958, + 420, 1992, 378, 1992], "confidence": 0.998, "span": {"offset": 852, "length": + 3}}, {"content": "you", "boundingBox": [427, 1958, 482, 1958, 482, 1992, 427, + 1992], "confidence": 0.998, "span": {"offset": 856, "length": 3}}, {"content": + "next", "boundingBox": [488, 1958, 554, 1959, 555, 1992, 489, 1992], "confidence": + 0.992, "span": {"offset": 860, "length": 4}}, {"content": "total", "boundingBox": + [561, 1959, 627, 1959, 627, 1991, 561, 1992], "confidence": 0.994, "span": + {"offset": 865, "length": 5}}, {"content": "purchase.", "boundingBox": [633, + 1959, 786, 1961, 787, 1990, 633, 1991], "confidence": 0.996, "span": {"offset": + 871, "length": 9}}], "selectionMarks": [], "lines": [{"content": "Purchase + Order", "boundingBox": [136, 139, 351, 138, 351, 166, 136, 166], "spans": + [{"offset": 0, "length": 14}]}, {"content": "Hero Limited", "boundingBox": + [620, 205, 1074, 204, 1075, 265, 620, 266], "spans": [{"offset": 15, "length": + 12}]}, {"content": "Company Phone: 555-348-6512", "boundingBox": [163, 352, + 528, 350, 528, 376, 163, 379], "spans": [{"offset": 28, "length": 27}]}, {"content": + "Website: www.herolimited.com", "boundingBox": [166, 393, 533, 393, 533, 418, + 166, 418], "spans": [{"offset": 56, "length": 28}]}, {"content": "Email:", + "boundingBox": [165, 435, 237, 435, 237, 460, 165, 460], "spans": [{"offset": + 85, "length": 6}]}, {"content": "Purchase Order", "boundingBox": [1112, 321, + 1554, 321, 1554, 369, 1112, 369], "spans": [{"offset": 92, "length": 14}]}, + {"content": "Dated As: 12/20/2020", "boundingBox": [1024, 419, 1317, 420, + 1317, 448, 1024, 448], "spans": [{"offset": 107, "length": 20}]}, {"content": + "Purchase Order #: 948284", "boundingBox": [1023, 461, 1376, 461, 1376, 489, + 1023, 488], "spans": [{"offset": 128, "length": 24}]}, {"content": "accounts@herolimited.com", + "boundingBox": [164, 479, 482, 478, 483, 502, 164, 503], "spans": [{"offset": + 153, "length": 24}]}, {"content": "Shipped To", "boundingBox": [167, 547, + 397, 546, 397, 591, 167, 592], "spans": [{"offset": 178, "length": 10}]}, + {"content": "Vendor Name: Hillary Swank", "boundingBox": [159, 609, 520, 609, + 520, 638, 159, 638], "spans": [{"offset": 189, "length": 26}]}, {"content": + "Company Name: Higgly Wiggly Books", "boundingBox": [159, 647, 629, 646, 629, + 677, 160, 679], "spans": [{"offset": 216, "length": 33}]}, {"content": "Address: + 938 NE Burner Road", "boundingBox": [160, 684, 526, 684, 526, 712, 160, 711], + "spans": [{"offset": 250, "length": 27}]}, {"content": "Boulder City, CO 92848", + "boundingBox": [279, 722, 566, 721, 566, 750, 279, 751], "spans": [{"offset": + 278, "length": 22}]}, {"content": "Phone: 938-294-2949", "boundingBox": [612, + 721, 885, 721, 885, 747, 612, 748], "spans": [{"offset": 301, "length": 19}]}, + {"content": "Shipped From", "boundingBox": [167, 784, 453, 784, 453, 829, + 167, 830], "spans": [{"offset": 321, "length": 12}]}, {"content": "Name: Bernie + Sanders", "boundingBox": [165, 852, 445, 851, 445, 878, 165, 879], "spans": + [{"offset": 334, "length": 20}]}, {"content": "Company Name: Jupiter Book + Supply", "boundingBox": [164, 889, 629, 889, 629, 919, 164, 919], "spans": + [{"offset": 355, "length": 33}]}, {"content": "Address: 383 N Kinnick Road", + "boundingBox": [165, 925, 521, 926, 521, 953, 165, 952], "spans": [{"offset": + 389, "length": 27}]}, {"content": "Seattle, WA 38383", "boundingBox": [280, + 963, 514, 962, 514, 990, 281, 991], "spans": [{"offset": 417, "length": 17}]}, + {"content": "Phone: 932-299-0292", "boundingBox": [760, 963, 1032, 963, 1032, + 989, 760, 990], "spans": [{"offset": 435, "length": 19}]}, {"content": "Details", + "boundingBox": [446, 1047, 558, 1047, 558, 1077, 446, 1077], "spans": [{"offset": + 455, "length": 7}]}, {"content": "Quantity", "boundingBox": [885, 1047, 1034, + 1047, 1034, 1083, 886, 1083], "spans": [{"offset": 463, "length": 8}]}, {"content": + "Unit Price", "boundingBox": [1111, 1047, 1270, 1047, 1269, 1078, 1111, 1077], + "spans": [{"offset": 472, "length": 10}]}, {"content": "Total", "boundingBox": + [1382, 1047, 1468, 1047, 1467, 1077, 1382, 1077], "spans": [{"offset": 483, + "length": 5}]}, {"content": "Bindings", "boundingBox": [172, 1093, 279, 1095, + 279, 1123, 172, 1121], "spans": [{"offset": 489, "length": 8}]}, {"content": + "20", "boundingBox": [859, 1094, 893, 1094, 893, 1119, 859, 1119], "spans": + [{"offset": 498, "length": 2}]}, {"content": "1.00", "boundingBox": [1240, + 1096, 1295, 1094, 1294, 1118, 1241, 1118], "spans": [{"offset": 501, "length": + 4}]}, {"content": "20.00", "boundingBox": [1458, 1095, 1530, 1095, 1530, 1119, + 1458, 1119], "spans": [{"offset": 506, "length": 5}]}, {"content": "Covers + Small", "boundingBox": [169, 1135, 332, 1134, 333, 1160, 169, 1161], "spans": + [{"offset": 512, "length": 12}]}, {"content": "20", "boundingBox": [859, 1135, + 894, 1135, 891, 1160, 860, 1160], "spans": [{"offset": 525, "length": 2}]}, + {"content": "1.00", "boundingBox": [1239, 1135, 1295, 1135, 1294, 1159, 1239, + 1160], "spans": [{"offset": 528, "length": 4}]}, {"content": "20.00", "boundingBox": + [1458, 1135, 1530, 1135, 1530, 1159, 1459, 1160], "spans": [{"offset": 533, + "length": 5}]}, {"content": "Feather Bookmark", "boundingBox": [173, 1178, + 403, 1177, 403, 1205, 173, 1206], "spans": [{"offset": 539, "length": 16}]}, + {"content": "20", "boundingBox": [860, 1179, 892, 1179, 891, 1204, 860, 1203], + "spans": [{"offset": 556, "length": 2}]}, {"content": "5.00", "boundingBox": + [1239, 1179, 1295, 1178, 1295, 1203, 1239, 1204], "spans": [{"offset": 559, + "length": 4}]}, {"content": "100.00", "boundingBox": [1442, 1180, 1530, 1180, + 1530, 1203, 1443, 1204], "spans": [{"offset": 564, "length": 6}]}, {"content": + "Copper Swirl Marker", "boundingBox": [169, 1223, 429, 1222, 430, 1249, 169, + 1253], "spans": [{"offset": 571, "length": 19}]}, {"content": "20", "boundingBox": + [860, 1223, 893, 1223, 893, 1247, 860, 1247], "spans": [{"offset": 591, "length": + 2}]}, {"content": "5.00", "boundingBox": [1239, 1221, 1294, 1222, 1294, 1246, + 1239, 1247], "spans": [{"offset": 594, "length": 4}]}, {"content": "100.00", + "boundingBox": [1443, 1223, 1530, 1222, 1530, 1246, 1444, 1247], "spans": + [{"offset": 599, "length": 6}]}, {"content": "Bernie Sanders", "boundingBox": + [484, 1670, 764, 1670, 764, 1707, 484, 1706], "spans": [{"offset": 606, "length": + 14}]}, {"content": "Bernie Sanders", "boundingBox": [542, 1718, 718, 1719, + 718, 1742, 542, 1741], "spans": [{"offset": 621, "length": 14}]}, {"content": + "Manager", "boundingBox": [577, 1753, 681, 1755, 681, 1778, 577, 1776], "spans": + [{"offset": 636, "length": 7}]}, {"content": "Additional Notes:", "boundingBox": + [172, 1796, 478, 1796, 478, 1832, 172, 1831], "spans": [{"offset": 644, "length": + 17}]}, {"content": "Do not Jostle Box. Unpack carefully. Enjoy.", "boundingBox": + [174, 1879, 707, 1880, 707, 1911, 174, 1908], "spans": [{"offset": 662, "length": + 43}]}, {"content": "SUBTOTAL", "boundingBox": [1146, 1573, 1296, 1573, 1296, + 1600, 1146, 1600], "spans": [{"offset": 706, "length": 8}]}, {"content": "$140.00", + "boundingBox": [1426, 1571, 1530, 1571, 1530, 1597, 1426, 1598], "spans": + [{"offset": 715, "length": 7}]}, {"content": "TAX", "boundingBox": [1236, + 1618, 1296, 1618, 1295, 1643, 1236, 1643], "spans": [{"offset": 723, "length": + 3}]}, {"content": "$4.00", "boundingBox": [1458, 1615, 1529, 1615, 1528, 1641, + 1458, 1643], "spans": [{"offset": 727, "length": 5}]}, {"content": "TOTAL", + "boundingBox": [1203, 1673, 1297, 1673, 1297, 1698, 1204, 1699], "spans": + [{"offset": 733, "length": 5}]}, {"content": "$144.00", "boundingBox": [1427, + 1670, 1529, 1669, 1530, 1696, 1427, 1697], "spans": [{"offset": 739, "length": + 7}]}, {"content": "Jupiter Book Supply will refund you 50% per book if returned + within 60 days of reading and", "boundingBox": [168, 1923, 1510, 1923, 1510, + 1957, 168, 1958], "spans": [{"offset": 747, "length": 90}]}, {"content": "offer + you 25% off you next total purchase.", "boundingBox": [168, 1957, 786, 1958, + 786, 1991, 168, 1991], "spans": [{"offset": 838, "length": 42}]}], "spans": + [{"offset": 0, "length": 880}]}], "tables": [{"rowCount": 5, "columnCount": + 4, "cells": [{"kind": "columnHeader", "rowIndex": 0, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Details", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [157, 1037, 847, 1038, 847, 1086, 155, 1086]}], "spans": + [{"offset": 455, "length": 7}]}, {"kind": "columnHeader", "rowIndex": 0, "columnIndex": + 1, "rowSpan": 1, "columnSpan": 1, "content": "Quantity", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [847, 1038, 1069, 1038, 1070, 1086, 847, + 1086]}], "spans": [{"offset": 463, "length": 8}]}, {"kind": "columnHeader", + "rowIndex": 0, "columnIndex": 2, "rowSpan": 1, "columnSpan": 1, "content": + "Unit Price", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1069, + 1038, 1309, 1038, 1309, 1086, 1070, 1086]}], "spans": [{"offset": 472, "length": + 10}]}, {"kind": "columnHeader", "rowIndex": 0, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "Total", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1038, 1543, 1038, 1543, 1086, 1309, 1086]}], "spans": + [{"offset": 483, "length": 5}]}, {"rowIndex": 1, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Bindings", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [155, 1086, 847, 1086, 847, 1127, 155, 1127]}], "spans": + [{"offset": 489, "length": 8}]}, {"rowIndex": 1, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [847, 1086, 1070, 1086, 1070, 1127, 847, 1127]}], "spans": + [{"offset": 498, "length": 2}]}, {"rowIndex": 1, "columnIndex": 2, "rowSpan": + 1, "columnSpan": 1, "content": "1.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1070, 1086, 1309, 1086, 1309, 1127, 1070, 1127]}], "spans": + [{"offset": 501, "length": 4}]}, {"rowIndex": 1, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "20.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1086, 1543, 1086, 1543, 1127, 1309, 1127]}], "spans": + [{"offset": 506, "length": 5}]}, {"rowIndex": 2, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Covers Small", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [155, 1127, 847, 1127, 847, 1171, 155, 1171]}], "spans": + [{"offset": 512, "length": 12}]}, {"rowIndex": 2, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [847, 1127, 1070, 1127, 1070, 1171, 847, 1171]}], "spans": + [{"offset": 525, "length": 2}]}, {"rowIndex": 2, "columnIndex": 2, "rowSpan": + 1, "columnSpan": 1, "content": "1.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1070, 1127, 1309, 1127, 1309, 1171, 1070, 1171]}], "spans": + [{"offset": 528, "length": 4}]}, {"rowIndex": 2, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "20.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1127, 1543, 1127, 1543, 1171, 1309, 1171]}], "spans": + [{"offset": 533, "length": 5}]}, {"rowIndex": 3, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Feather Bookmark", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [155, 1171, 847, 1171, 847, 1214, 155, 1214]}], "spans": + [{"offset": 539, "length": 16}]}, {"rowIndex": 3, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [847, 1171, 1070, 1171, 1070, 1214, 847, 1214]}], "spans": + [{"offset": 556, "length": 2}]}, {"rowIndex": 3, "columnIndex": 2, "rowSpan": + 1, "columnSpan": 1, "content": "5.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1070, 1171, 1309, 1171, 1309, 1214, 1070, 1214]}], "spans": + [{"offset": 559, "length": 4}]}, {"rowIndex": 3, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "100.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1171, 1543, 1171, 1543, 1215, 1309, 1214]}], "spans": + [{"offset": 564, "length": 6}]}, {"rowIndex": 4, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Copper Swirl Marker", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [155, 1214, 847, 1214, 847, 1258, 155, 1258]}], "spans": + [{"offset": 571, "length": 19}]}, {"rowIndex": 4, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [847, 1214, 1070, 1214, 1070, 1258, 847, 1258]}], "spans": + [{"offset": 591, "length": 2}]}, {"rowIndex": 4, "columnIndex": 2, "rowSpan": + 1, "columnSpan": 1, "content": "5.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1070, 1214, 1309, 1214, 1309, 1258, 1070, 1258]}], "spans": + [{"offset": 594, "length": 4}]}, {"rowIndex": 4, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "100.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1214, 1543, 1215, 1543, 1260, 1309, 1258]}], "spans": + [{"offset": 599, "length": 6}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": + [153, 1036, 1548, 1036, 1547, 1265, 153, 1265]}], "spans": [{"offset": 455, + "length": 150}]}, {"rowCount": 4, "columnCount": 2, "cells": [{"kind": "columnHeader", + "rowIndex": 0, "columnIndex": 0, "rowSpan": 1, "columnSpan": 1, "content": + "SUBTOTAL", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1070, 1565, + 1309, 1565, 1309, 1609, 1071, 1609]}], "spans": [{"offset": 706, "length": + 8}]}, {"kind": "columnHeader", "rowIndex": 0, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "$140.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1565, 1544, 1564, 1544, 1609, 1309, 1609]}], "spans": + [{"offset": 715, "length": 7}]}, {"rowIndex": 1, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "TAX", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [1071, 1609, 1309, 1609, 1309, 1652, 1071, 1652]}], "spans": + [{"offset": 723, "length": 3}]}, {"rowIndex": 1, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "$4.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1609, 1544, 1609, 1544, 1652, 1309, 1652]}], "spans": + [{"offset": 727, "length": 5}]}, {"rowIndex": 2, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1071, 1652, 1309, 1652, 1309, 1664, 1071, 1664]}], "spans": []}, {"rowIndex": + 2, "columnIndex": 1, "rowSpan": 1, "columnSpan": 1, "content": "", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1309, 1652, 1544, 1652, 1544, 1664, 1309, + 1664]}], "spans": []}, {"rowIndex": 3, "columnIndex": 0, "rowSpan": 1, "columnSpan": + 1, "content": "TOTAL", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1071, 1664, 1309, 1664, 1309, 1707, 1071, 1706]}], "spans": [{"offset": 733, + "length": 5}]}, {"rowIndex": 3, "columnIndex": 1, "rowSpan": 1, "columnSpan": + 1, "content": "$144.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1309, 1664, 1544, 1664, 1544, 1707, 1309, 1707]}], "spans": [{"offset": 739, + "length": 7}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": [1062, + 1563, 1560, 1563, 1560, 1709, 1062, 1709]}], "spans": [{"offset": 706, "length": + 40}]}], "styles": [{"isHandwritten": true, "confidence": 0.9, "spans": [{"offset": + 606, "length": 14}]}], "documents": [{"docType": "61a962e6-78bd-4220-994f-093a17ec1e78:61a962e6-78bd-4220-994f-093a17ec1e78", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [0, 0, 1700, 0, 1700, + 2200, 0, 2200]}], "fields": {"Total": {"type": "string", "valueString": "$144.00", + "content": "$144.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": 0.95, "spans": + [{"offset": 739, "length": 7}]}, "Tax": {"type": "string", "valueString": + "$4.00", "content": "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1458, 1615, 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": + [{"offset": 727, "length": 5}]}, "CompanyName": {"type": "string", "valueString": + "Higgly Wiggly Books", "content": "Higgly Wiggly Books", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [372, 646, 628, 646, 628, 679, 372, 679]}], + "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "CompanyAddress": + {"type": "string", "valueString": "938 NE Burner Road Boulder City, CO 92848", + "content": "938 NE Burner Road Boulder City, CO 92848", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [271, 685, 559, 685, 559, 751, 271, 751]}], + "confidence": 0.698, "spans": [{"offset": 259, "length": 41}]}, "DatedAs": + {"type": "string", "valueString": "12/20/2020", "content": "12/20/2020", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, + 449]}], "confidence": 0.95, "spans": [{"offset": 117, "length": 10}]}, "FullSignature": + {"type": "signature", "valueSignature": "signed", "content": "", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [453, 1659, 807, 1659, 807, 1722, 453, 1722]}], + "confidence": 0.95}, "Website": {"type": "string", "valueString": "www.herolimited.com", + "content": "www.herolimited.com", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [270, 393, 522, 393, 522, 418, 270, 418]}], "confidence": 0.95, "spans": [{"offset": + 65, "length": 19}]}, "CompanyPhoneNumber": {"type": "string", "valueString": + "938-294-2949", "content": "938-294-2949", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [706, 722, 882, 722, 882, 749, 706, 749]}], "confidence": + 0.95, "spans": [{"offset": 308, "length": 12}]}, "PurchaseOrderNumber": {"type": + "string", "valueString": "948284", "content": "948284", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1275, 461, 1373, 461, 1373, 489, 1275, + 489]}], "confidence": 0.95, "spans": [{"offset": 146, "length": 6}]}, "Merchant": + {"type": "string", "valueString": "Hero Limited", "content": "Hero Limited", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [620, 204, 1058, 204, + 1058, 266, 620, 266]}], "confidence": 0.95, "spans": [{"offset": 15, "length": + 12}]}, "VendorName": {"type": "string", "valueString": "Hillary Swank", "content": + "Hillary Swank", "boundingRegions": [{"pageNumber": 1, "boundingBox": [346, + 609, 518, 609, 518, 639, 346, 639]}], "confidence": 0.95, "spans": [{"offset": + 202, "length": 13}]}, "Subtotal": {"type": "string", "valueString": "$140.00", + "content": "$140.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1426, 1572, 1526, 1572, 1526, 1599, 1426, 1599]}], "confidence": 0.95, "spans": + [{"offset": 715, "length": 7}]}, "Email": {"type": "string", "valueString": + "accounts@herolimited.com", "content": "accounts@herolimited.com", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, 471, 503, 164, 503]}], + "confidence": 0.95, "spans": [{"offset": 153, "length": 24}]}, "Quantity": + {"type": "number", "valueNumber": 20, "content": "20", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], + "confidence": 0.95, "spans": [{"offset": 498, "length": 2}]}, "PhoneNumber": + {"type": "string", "valueString": "555-348-6512", "content": "555-348-6512", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, + 524, 378, 363, 378]}], "confidence": 0.95, "spans": [{"offset": 43, "length": + 12}]}, "Signature": {"type": "string", "confidence": 0.919}}, "confidence": + 0.92, "spans": [{"offset": 0, "length": 880}]}]}}' + headers: + apim-request-id: + - 40804afc-ff10-4d7b-b16c-f42491fd6204 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 28 Oct 2021 22:25:31 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '422' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_custom_document_transform.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_custom_document_transform.yaml index d6f353fa4c4c..d9588d9cefff 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_custom_document_transform.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_custom_document_transform.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: 'b''{"modelId": "55a45581-2fe9-4a8a-a8c6-bc31b5cd0899", "azureBlobSource": + body: 'b''{"modelId": "192d4e35-6437-4cb2-9493-a29889387aa2", "azureBlobSource": {"containerUrl": "container_sas_url"}}''' headers: Accept: @@ -10,11 +10,11 @@ interactions: Connection: - keep-alive Content-Length: - - '291' + - '300' Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels:build?api-version=2021-09-30-preview response: @@ -22,19 +22,19 @@ interactions: string: '' headers: apim-request-id: - - f8255660-6ac3-414e-9999-4357a81af1e5 + - a35d6bd2-8d36-459a-9956-5f87a44ac658 content-length: - '0' date: - - Fri, 24 Sep 2021 06:44:34 GMT + - Thu, 28 Oct 2021 22:26:58 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533902127_f8255660-6ac3-414e-9999-4357a81af1e5?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530907984_a35d6bd2-8d36-459a-9956-5f87a44ac658?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2056' + - '2740' status: code: 202 message: Accepted @@ -48,34 +48,35 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533902127_f8255660-6ac3-414e-9999-4357a81af1e5?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530907984_a35d6bd2-8d36-459a-9956-5f87a44ac658?api-version=2021-09-30-preview response: body: - string: '{"operationId": "31533902127_f8255660-6ac3-414e-9999-4357a81af1e5", - "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-09-24T06:44:33Z", - "lastUpdatedDateTime": "2021-09-24T06:44:36Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/55a45581-2fe9-4a8a-a8c6-bc31b5cd0899?api-version=2021-09-30-preview", - "percentCompleted": 100, "result": {"docTypes": {"55a45581-2fe9-4a8a-a8c6-bc31b5cd0899": + string: '{"operationId": "31530907984_a35d6bd2-8d36-459a-9956-5f87a44ac658", + "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-10-28T22:26:55Z", + "lastUpdatedDateTime": "2021-10-28T22:27:00Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/192d4e35-6437-4cb2-9493-a29889387aa2?api-version=2021-09-30-preview", + "percentCompleted": 100, "result": {"docTypes": {"192d4e35-6437-4cb2-9493-a29889387aa2": {"fieldSchema": {"Merchant": {"type": "string"}, "PhoneNumber": {"type": "string"}, "Website": {"type": "string"}, "Email": {"type": "string"}, "PurchaseOrderNumber": {"type": "string"}, "DatedAs": {"type": "string"}, "VendorName": {"type": "string"}, "CompanyName": {"type": "string"}, "CompanyAddress": {"type": "string"}, "CompanyPhoneNumber": {"type": "string"}, "Subtotal": {"type": "string"}, "Tax": {"type": "string"}, "Total": {"type": "string"}, "Signature": {"type": - "string"}, "Quantity": {"type": "number"}}, "fieldConfidence": {"CompanyAddress": - 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": 0.95, "DatedAs": 0.95, "Email": - 0.8, "Merchant": 0.95, "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": - 0.95, "Signature": 0.8, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": - 0.95, "Website": 0.95}}}, "modelId": "55a45581-2fe9-4a8a-a8c6-bc31b5cd0899", - "createdDateTime": "2021-09-24T06:44:36Z"}}' + "string"}, "Quantity": {"type": "number"}, "FullSignature": {"type": "signature"}}, + "fieldConfidence": {"CompanyAddress": 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": + 0.95, "DatedAs": 0.95, "Email": 0.8, "FullSignature": 0.6, "Merchant": 0.95, + "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": 0.95, "Signature": + 0.95, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": 0.95, "Website": + 0.95}}}, "modelId": "192d4e35-6437-4cb2-9493-a29889387aa2", "createdDateTime": + "2021-10-28T22:27:00Z"}}' headers: apim-request-id: - - 174a1ba4-48a1-4707-aedb-f96b95c4df45 + - 820277f6-8562-479b-a988-5ae0308e33c1 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Sep 2021 06:44:40 GMT + - Thu, 28 Oct 2021 22:27:02 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -83,7 +84,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '40' + - '47' status: code: 200 message: OK @@ -102,27 +103,27 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/55a45581-2fe9-4a8a-a8c6-bc31b5cd0899:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/192d4e35-6437-4cb2-9493-a29889387aa2:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: apim-request-id: - - b5775b51-b179-4fea-8c14-91d2cc255c9d + - be2fe6a9-32ae-4b50-a383-c3394f42af77 content-length: - '0' date: - - Fri, 24 Sep 2021 06:44:41 GMT + - Thu, 28 Oct 2021 22:27:04 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/55a45581-2fe9-4a8a-a8c6-bc31b5cd0899/analyzeResults/b5775b51-b179-4fea-8c14-91d2cc255c9d?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/192d4e35-6437-4cb2-9493-a29889387aa2/analyzeResults/be2fe6a9-32ae-4b50-a383-c3394f42af77?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '691' + - '729' status: code: 202 message: Accepted @@ -136,14 +137,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/55a45581-2fe9-4a8a-a8c6-bc31b5cd0899/analyzeResults/b5775b51-b179-4fea-8c14-91d2cc255c9d?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/192d4e35-6437-4cb2-9493-a29889387aa2/analyzeResults/be2fe6a9-32ae-4b50-a383-c3394f42af77?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-24T06:44:41Z", - "lastUpdatedDateTime": "2021-09-24T06:44:45Z", "analyzeResult": {"apiVersion": - "2021-09-30-preview", "modelId": "55a45581-2fe9-4a8a-a8c6-bc31b5cd0899", "stringIndexType": + string: '{"status": "succeeded", "createdDateTime": "2021-10-28T22:27:04Z", + "lastUpdatedDateTime": "2021-10-28T22:27:08Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "192d4e35-6437-4cb2-9493-a29889387aa2", "stringIndexType": "unicodeCodePoint", "content": "Purchase Order\nHero Limited\nCompany Phone: 555-348-6512\nWebsite: www.herolimited.com\nEmail:\nPurchase Order\nDated As: 12/20/2020\nPurchase Order #: 948284\naccounts@herolimited.com\nShipped @@ -580,65 +581,65 @@ interactions: "length": 7}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": [1062, 1563, 1560, 1563, 1560, 1709, 1062, 1709]}], "spans": [{"offset": 706, "length": 40}]}], "styles": [{"isHandwritten": true, "confidence": 0.9, "spans": [{"offset": - 606, "length": 14}]}], "documents": [{"docType": "55a45581-2fe9-4a8a-a8c6-bc31b5cd0899:55a45581-2fe9-4a8a-a8c6-bc31b5cd0899", + 606, "length": 14}]}], "documents": [{"docType": "192d4e35-6437-4cb2-9493-a29889387aa2:192d4e35-6437-4cb2-9493-a29889387aa2", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0, 0, 1700, 0, 1700, - 2200, 0, 2200]}], "fields": {"Merchant": {"type": "string", "valueString": - "Hero Limited", "content": "Hero Limited", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [620, 204, 1058, 204, 1058, 266, 620, 266]}], "confidence": - 0.95, "spans": [{"offset": 15, "length": 12}]}, "Signature": {"type": "string", - "valueString": "Bernie Sanders", "content": "Bernie Sanders", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [484, 1670, 763, 1670, 763, 1708, 484, 1708]}], - "confidence": 0.433, "spans": [{"offset": 606, "length": 14}]}, "Subtotal": - {"type": "string", "valueString": "$140.00", "content": "$140.00", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [1426, 1572, 1526, 1572, 1526, 1599, 1426, - 1599]}], "confidence": 0.95, "spans": [{"offset": 715, "length": 7}]}, "Total": - {"type": "string", "valueString": "$144.00", "content": "$144.00", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [1427, 1669, 1527, 1669, 1527, 1698, 1427, - 1698]}], "confidence": 0.95, "spans": [{"offset": 739, "length": 7}]}, "Email": - {"type": "string", "valueString": "accounts@herolimited.com", "content": "accounts@herolimited.com", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, - 471, 503, 164, 503]}], "confidence": 0.95, "spans": [{"offset": 153, "length": - 24}]}, "PhoneNumber": {"type": "string", "valueString": "555-348-6512", "content": - "555-348-6512", "boundingRegions": [{"pageNumber": 1, "boundingBox": [363, - 351, 524, 351, 524, 378, 363, 378]}], "confidence": 0.95, "spans": [{"offset": - 43, "length": 12}]}, "Tax": {"type": "string", "valueString": "$4.00", "content": - "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1458, 1615, - 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": [{"offset": - 727, "length": 5}]}, "VendorName": {"type": "string", "valueString": "Hillary - Swank", "content": "Hillary Swank", "boundingRegions": [{"pageNumber": 1, - "boundingBox": [346, 609, 518, 609, 518, 639, 346, 639]}], "confidence": 0.95, - "spans": [{"offset": 202, "length": 13}]}, "CompanyPhoneNumber": {"type": - "string", "valueString": "938-294-2949", "content": "938-294-2949", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [706, 722, 882, 722, 882, 749, 706, 749]}], - "confidence": 0.95, "spans": [{"offset": 308, "length": 12}]}, "Quantity": - {"type": "number", "valueNumber": 20, "content": "20", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], - "confidence": 0.95, "spans": [{"offset": 498, "length": 2}]}, "CompanyName": - {"type": "string", "valueString": "Higgly Wiggly Books", "content": "Higgly - Wiggly Books", "boundingRegions": [{"pageNumber": 1, "boundingBox": [372, - 646, 628, 646, 628, 679, 372, 679]}], "confidence": 0.95, "spans": [{"offset": - 230, "length": 19}]}, "Website": {"type": "string", "valueString": "www.herolimited.com", + 2200, 0, 2200]}], "fields": {"Total": {"type": "string", "valueString": "$144.00", + "content": "$144.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": 0.95, "spans": + [{"offset": 739, "length": 7}]}, "Tax": {"type": "string", "valueString": + "$4.00", "content": "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1458, 1615, 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": + [{"offset": 727, "length": 5}]}, "CompanyName": {"type": "string", "valueString": + "Higgly Wiggly Books", "content": "Higgly Wiggly Books", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [372, 646, 628, 646, 628, 679, 372, 679]}], + "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "CompanyAddress": + {"type": "string", "valueString": "938 NE Burner Road Boulder City, CO 92848", + "content": "938 NE Burner Road Boulder City, CO 92848", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [271, 685, 559, 685, 559, 751, 271, 751]}], + "confidence": 0.698, "spans": [{"offset": 259, "length": 41}]}, "DatedAs": + {"type": "string", "valueString": "12/20/2020", "content": "12/20/2020", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, + 449]}], "confidence": 0.95, "spans": [{"offset": 117, "length": 10}]}, "FullSignature": + {"type": "signature", "valueSignature": "signed", "content": "", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [453, 1659, 807, 1659, 807, 1722, 453, 1722]}], + "confidence": 0.95}, "Website": {"type": "string", "valueString": "www.herolimited.com", "content": "www.herolimited.com", "boundingRegions": [{"pageNumber": 1, "boundingBox": [270, 393, 522, 393, 522, 418, 270, 418]}], "confidence": 0.95, "spans": [{"offset": - 65, "length": 19}]}, "CompanyAddress": {"type": "string", "valueString": "938 - NE Burner Road Boulder City, CO 92848", "content": "938 NE Burner Road Boulder - City, CO 92848", "boundingRegions": [{"pageNumber": 1, "boundingBox": [271, - 685, 559, 685, 559, 751, 271, 751]}], "confidence": 0.621, "spans": [{"offset": - 259, "length": 41}]}, "PurchaseOrderNumber": {"type": "string", "valueString": - "948284", "content": "948284", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [1275, 461, 1373, 461, 1373, 489, 1275, 489]}], "confidence": 0.95, "spans": - [{"offset": 146, "length": 6}]}, "DatedAs": {"type": "string", "valueString": - "12/20/2020", "content": "12/20/2020", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, 449]}], "confidence": - 0.95, "spans": [{"offset": 117, "length": 10}]}}, "confidence": 0.924, "spans": - [{"offset": 0, "length": 880}]}]}}' + 65, "length": 19}]}, "CompanyPhoneNumber": {"type": "string", "valueString": + "938-294-2949", "content": "938-294-2949", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [706, 722, 882, 722, 882, 749, 706, 749]}], "confidence": + 0.95, "spans": [{"offset": 308, "length": 12}]}, "PurchaseOrderNumber": {"type": + "string", "valueString": "948284", "content": "948284", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1275, 461, 1373, 461, 1373, 489, 1275, + 489]}], "confidence": 0.95, "spans": [{"offset": 146, "length": 6}]}, "Merchant": + {"type": "string", "valueString": "Hero Limited", "content": "Hero Limited", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [620, 204, 1058, 204, + 1058, 266, 620, 266]}], "confidence": 0.95, "spans": [{"offset": 15, "length": + 12}]}, "VendorName": {"type": "string", "valueString": "Hillary Swank", "content": + "Hillary Swank", "boundingRegions": [{"pageNumber": 1, "boundingBox": [346, + 609, 518, 609, 518, 639, 346, 639]}], "confidence": 0.95, "spans": [{"offset": + 202, "length": 13}]}, "Subtotal": {"type": "string", "valueString": "$140.00", + "content": "$140.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1426, 1572, 1526, 1572, 1526, 1599, 1426, 1599]}], "confidence": 0.95, "spans": + [{"offset": 715, "length": 7}]}, "Email": {"type": "string", "valueString": + "accounts@herolimited.com", "content": "accounts@herolimited.com", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, 471, 503, 164, 503]}], + "confidence": 0.95, "spans": [{"offset": 153, "length": 24}]}, "Quantity": + {"type": "number", "valueNumber": 20, "content": "20", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], + "confidence": 0.95, "spans": [{"offset": 498, "length": 2}]}, "PhoneNumber": + {"type": "string", "valueString": "555-348-6512", "content": "555-348-6512", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, + 524, 378, 363, 378]}], "confidence": 0.95, "spans": [{"offset": 43, "length": + 12}]}, "Signature": {"type": "string", "confidence": 0.919}}, "confidence": + 0.92, "spans": [{"offset": 0, "length": 880}]}]}}' headers: apim-request-id: - - 143d6357-a78b-44ea-a8fb-4af619e6019e + - 7de37eed-99ab-448c-9304-0d2c6c448393 content-type: - application/json; charset=utf-8 date: - - Fri, 24 Sep 2021 06:44:46 GMT + - Thu, 28 Oct 2021 22:27:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -646,7 +647,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '370' + - '505' status: code: 200 message: OK diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml index e154aa245ba0..fe883998fa70 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms.test_pages_kwarg_specified.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: 'b''{"modelId": "2312f540-050f-4794-bec0-ccf02e3fe415", "azureBlobSource": + body: 'b''{"modelId": "ec4baf96-dbdd-4b39-8482-7bbaabd5163b", "azureBlobSource": {"containerUrl": "container_sas_url"}}''' headers: Accept: @@ -10,11 +10,11 @@ interactions: Connection: - keep-alive Content-Length: - - '284' + - '300' Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels:build?api-version=2021-09-30-preview response: @@ -22,19 +22,19 @@ interactions: string: '' headers: apim-request-id: - - 0a1dd424-9d2f-486b-8c8d-c944577384f1 + - b16fce62-241e-4b8b-9dd3-1e83ffb5b880 content-length: - '0' date: - - Sat, 25 Sep 2021 02:30:38 GMT + - Thu, 28 Oct 2021 22:27:30 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830966_0a1dd424-9d2f-486b-8c8d-c944577384f1?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530907953_b16fce62-241e-4b8b-9dd3-1e83ffb5b880?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4363' + - '2810' status: code: 202 message: Accepted @@ -48,34 +48,35 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830966_0a1dd424-9d2f-486b-8c8d-c944577384f1?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530907953_b16fce62-241e-4b8b-9dd3-1e83ffb5b880?api-version=2021-09-30-preview response: body: - string: '{"operationId": "31533830966_0a1dd424-9d2f-486b-8c8d-c944577384f1", - "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-09-25T02:30:34Z", - "lastUpdatedDateTime": "2021-09-25T02:30:40Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/2312f540-050f-4794-bec0-ccf02e3fe415?api-version=2021-09-30-preview", - "percentCompleted": 100, "result": {"docTypes": {"2312f540-050f-4794-bec0-ccf02e3fe415": + string: '{"operationId": "31530907953_b16fce62-241e-4b8b-9dd3-1e83ffb5b880", + "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-10-28T22:27:27Z", + "lastUpdatedDateTime": "2021-10-28T22:27:32Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/ec4baf96-dbdd-4b39-8482-7bbaabd5163b?api-version=2021-09-30-preview", + "percentCompleted": 100, "result": {"docTypes": {"ec4baf96-dbdd-4b39-8482-7bbaabd5163b": {"fieldSchema": {"Merchant": {"type": "string"}, "PhoneNumber": {"type": "string"}, "Website": {"type": "string"}, "Email": {"type": "string"}, "PurchaseOrderNumber": {"type": "string"}, "DatedAs": {"type": "string"}, "VendorName": {"type": "string"}, "CompanyName": {"type": "string"}, "CompanyAddress": {"type": "string"}, "CompanyPhoneNumber": {"type": "string"}, "Subtotal": {"type": "string"}, "Tax": {"type": "string"}, "Total": {"type": "string"}, "Signature": {"type": - "string"}, "Quantity": {"type": "number"}}, "fieldConfidence": {"CompanyAddress": - 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": 0.95, "DatedAs": 0.95, "Email": - 0.8, "Merchant": 0.95, "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": - 0.95, "Signature": 0.6, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": - 0.95, "Website": 0.95}}}, "modelId": "2312f540-050f-4794-bec0-ccf02e3fe415", - "createdDateTime": "2021-09-25T02:30:40Z"}}' + "string"}, "Quantity": {"type": "number"}, "FullSignature": {"type": "signature"}}, + "fieldConfidence": {"CompanyAddress": 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": + 0.95, "DatedAs": 0.95, "Email": 0.8, "FullSignature": 0.6, "Merchant": 0.95, + "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": 0.95, "Signature": + 0.95, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": 0.95, "Website": + 0.95}}}, "modelId": "ec4baf96-dbdd-4b39-8482-7bbaabd5163b", "createdDateTime": + "2021-10-28T22:27:32Z"}}' headers: apim-request-id: - - 46a2e749-023a-451b-a8d9-391b8ee797a3 + - 4ad91af6-ffcd-47b1-94c1-02f9d6ba914b content-type: - application/json; charset=utf-8 date: - - Sat, 25 Sep 2021 02:30:43 GMT + - Thu, 28 Oct 2021 22:27:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -83,7 +84,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '41' + - '43' status: code: 200 message: OK @@ -102,27 +103,27 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/2312f540-050f-4794-bec0-ccf02e3fe415:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/ec4baf96-dbdd-4b39-8482-7bbaabd5163b:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: apim-request-id: - - 1bbf6e68-5384-4630-b89a-0b4546ee8f8d + - 74803331-9f1d-49f2-a014-0bde22e15bf4 content-length: - '0' date: - - Sat, 25 Sep 2021 02:30:44 GMT + - Thu, 28 Oct 2021 22:27:36 GMT operation-location: - - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/2312f540-050f-4794-bec0-ccf02e3fe415/analyzeResults/1bbf6e68-5384-4630-b89a-0b4546ee8f8d?api-version=2021-09-30-preview + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/ec4baf96-dbdd-4b39-8482-7bbaabd5163b/analyzeResults/74803331-9f1d-49f2-a014-0bde22e15bf4?api-version=2021-09-30-preview strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '869' + - '636' status: code: 202 message: Accepted @@ -136,14 +137,14 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/2312f540-050f-4794-bec0-ccf02e3fe415/analyzeResults/1bbf6e68-5384-4630-b89a-0b4546ee8f8d?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/ec4baf96-dbdd-4b39-8482-7bbaabd5163b/analyzeResults/74803331-9f1d-49f2-a014-0bde22e15bf4?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:30:44Z", - "lastUpdatedDateTime": "2021-09-25T02:30:47Z", "analyzeResult": {"apiVersion": - "2021-09-30-preview", "modelId": "2312f540-050f-4794-bec0-ccf02e3fe415", "stringIndexType": + string: '{"status": "succeeded", "createdDateTime": "2021-10-28T22:27:36Z", + "lastUpdatedDateTime": "2021-10-28T22:27:40Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "ec4baf96-dbdd-4b39-8482-7bbaabd5163b", "stringIndexType": "unicodeCodePoint", "content": "Purchase Order\nHero Limited\nCompany Phone: 555-348-6512\nWebsite: www.herolimited.com\nEmail:\nPurchase Order\nDated As: 12/20/2020\nPurchase Order #: 948284\naccounts@herolimited.com\nShipped @@ -580,65 +581,65 @@ interactions: "length": 7}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": [1062, 1563, 1560, 1563, 1560, 1709, 1062, 1709]}], "spans": [{"offset": 706, "length": 40}]}], "styles": [{"isHandwritten": true, "confidence": 0.9, "spans": [{"offset": - 606, "length": 14}]}], "documents": [{"docType": "2312f540-050f-4794-bec0-ccf02e3fe415:2312f540-050f-4794-bec0-ccf02e3fe415", + 606, "length": 14}]}], "documents": [{"docType": "ec4baf96-dbdd-4b39-8482-7bbaabd5163b:ec4baf96-dbdd-4b39-8482-7bbaabd5163b", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0, 0, 1700, 0, 1700, - 2200, 0, 2200]}], "fields": {"CompanyName": {"type": "string", "valueString": + 2200, 0, 2200]}], "fields": {"Total": {"type": "string", "valueString": "$144.00", + "content": "$144.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": 0.95, "spans": + [{"offset": 739, "length": 7}]}, "Tax": {"type": "string", "valueString": + "$4.00", "content": "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1458, 1615, 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": + [{"offset": 727, "length": 5}]}, "CompanyName": {"type": "string", "valueString": "Higgly Wiggly Books", "content": "Higgly Wiggly Books", "boundingRegions": [{"pageNumber": 1, "boundingBox": [372, 646, 628, 646, 628, 679, 372, 679]}], - "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "Subtotal": - {"type": "string", "valueString": "$140.00", "content": "$140.00", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [1426, 1572, 1526, 1572, 1526, 1599, 1426, - 1599]}], "confidence": 0.95, "spans": [{"offset": 715, "length": 7}]}, "Email": - {"type": "string", "valueString": "accounts@herolimited.com", "content": "accounts@herolimited.com", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, - 471, 503, 164, 503]}], "confidence": 0.95, "spans": [{"offset": 153, "length": - 24}]}, "Quantity": {"type": "number", "valueNumber": 20, "content": "20", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [859, 1094, 887, 1094, - 887, 1119, 859, 1119]}], "confidence": 0.95, "spans": [{"offset": 498, "length": - 2}]}, "Signature": {"type": "string", "valueString": "Bernie Sanders", "content": - "Bernie Sanders", "boundingRegions": [{"pageNumber": 1, "boundingBox": [484, - 1670, 763, 1670, 763, 1708, 484, 1708]}], "confidence": 0.241, "spans": [{"offset": - 606, "length": 14}]}, "CompanyPhoneNumber": {"type": "string", "valueString": + "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "CompanyAddress": + {"type": "string", "valueString": "938 NE Burner Road Boulder City, CO 92848", + "content": "938 NE Burner Road Boulder City, CO 92848", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [271, 685, 559, 685, 559, 751, 271, 751]}], + "confidence": 0.698, "spans": [{"offset": 259, "length": 41}]}, "DatedAs": + {"type": "string", "valueString": "12/20/2020", "content": "12/20/2020", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, + 449]}], "confidence": 0.95, "spans": [{"offset": 117, "length": 10}]}, "FullSignature": + {"type": "signature", "valueSignature": "signed", "content": "", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [453, 1659, 807, 1659, 807, 1722, 453, 1722]}], + "confidence": 0.95}, "Website": {"type": "string", "valueString": "www.herolimited.com", + "content": "www.herolimited.com", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [270, 393, 522, 393, 522, 418, 270, 418]}], "confidence": 0.95, "spans": [{"offset": + 65, "length": 19}]}, "CompanyPhoneNumber": {"type": "string", "valueString": "938-294-2949", "content": "938-294-2949", "boundingRegions": [{"pageNumber": 1, "boundingBox": [706, 722, 882, 722, 882, 749, 706, 749]}], "confidence": - 0.95, "spans": [{"offset": 308, "length": 12}]}, "CompanyAddress": {"type": - "string", "valueString": "938 NE Burner Road Boulder City, CO 92848", "content": - "938 NE Burner Road Boulder City, CO 92848", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [271, 685, 559, 685, 559, 751, 271, 751]}], "confidence": - 0.762, "spans": [{"offset": 259, "length": 41}]}, "Website": {"type": "string", - "valueString": "www.herolimited.com", "content": "www.herolimited.com", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [270, 393, 522, 393, 522, 418, 270, 418]}], - "confidence": 0.95, "spans": [{"offset": 65, "length": 19}]}, "VendorName": - {"type": "string", "valueString": "Hillary Swank", "content": "Hillary Swank", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [346, 609, 518, 609, - 518, 639, 346, 639]}], "confidence": 0.95, "spans": [{"offset": 202, "length": - 13}]}, "DatedAs": {"type": "string", "valueString": "12/20/2020", "content": - "12/20/2020", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1162, - 420, 1312, 420, 1312, 449, 1162, 449]}], "confidence": 0.95, "spans": [{"offset": - 117, "length": 10}]}, "Tax": {"type": "string", "valueString": "$4.00", "content": - "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1458, 1615, - 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": [{"offset": - 727, "length": 5}]}, "PurchaseOrderNumber": {"type": "string", "valueString": - "948284", "content": "948284", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [1275, 461, 1373, 461, 1373, 489, 1275, 489]}], "confidence": 0.95, "spans": - [{"offset": 146, "length": 6}]}, "Merchant": {"type": "string", "valueString": - "Hero Limited", "content": "Hero Limited", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [620, 204, 1058, 204, 1058, 266, 620, 266]}], "confidence": - 0.95, "spans": [{"offset": 15, "length": 12}]}, "Total": {"type": "string", - "valueString": "$144.00", "content": "$144.00", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": - 0.95, "spans": [{"offset": 739, "length": 7}]}, "PhoneNumber": {"type": "string", - "valueString": "555-348-6512", "content": "555-348-6512", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, 524, 378, 363, 378]}], - "confidence": 0.95, "spans": [{"offset": 43, "length": 12}]}}, "confidence": + 0.95, "spans": [{"offset": 308, "length": 12}]}, "PurchaseOrderNumber": {"type": + "string", "valueString": "948284", "content": "948284", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1275, 461, 1373, 461, 1373, 489, 1275, + 489]}], "confidence": 0.95, "spans": [{"offset": 146, "length": 6}]}, "Merchant": + {"type": "string", "valueString": "Hero Limited", "content": "Hero Limited", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [620, 204, 1058, 204, + 1058, 266, 620, 266]}], "confidence": 0.95, "spans": [{"offset": 15, "length": + 12}]}, "VendorName": {"type": "string", "valueString": "Hillary Swank", "content": + "Hillary Swank", "boundingRegions": [{"pageNumber": 1, "boundingBox": [346, + 609, 518, 609, 518, 639, 346, 639]}], "confidence": 0.95, "spans": [{"offset": + 202, "length": 13}]}, "Subtotal": {"type": "string", "valueString": "$140.00", + "content": "$140.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1426, 1572, 1526, 1572, 1526, 1599, 1426, 1599]}], "confidence": 0.95, "spans": + [{"offset": 715, "length": 7}]}, "Email": {"type": "string", "valueString": + "accounts@herolimited.com", "content": "accounts@herolimited.com", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, 471, 503, 164, 503]}], + "confidence": 0.95, "spans": [{"offset": 153, "length": 24}]}, "Quantity": + {"type": "number", "valueNumber": 20, "content": "20", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], + "confidence": 0.95, "spans": [{"offset": 498, "length": 2}]}, "PhoneNumber": + {"type": "string", "valueString": "555-348-6512", "content": "555-348-6512", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, + 524, 378, 363, 378]}], "confidence": 0.95, "spans": [{"offset": 43, "length": + 12}]}, "Signature": {"type": "string", "confidence": 0.919}}, "confidence": 0.92, "spans": [{"offset": 0, "length": 880}]}]}}' headers: apim-request-id: - - d9549955-15cd-4119-9b73-e9bf70513637 + - 94846871-44e3-4067-9ea0-1ff7e7a74a5e content-type: - application/json; charset=utf-8 date: - - Sat, 25 Sep 2021 02:30:49 GMT + - Thu, 28 Oct 2021 22:27:41 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -646,7 +647,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '191' + - '475' status: code: 200 message: OK diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_custom_document_signature_field.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_custom_document_signature_field.yaml new file mode 100644 index 000000000000..091c4cef2f98 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_custom_document_signature_field.yaml @@ -0,0 +1,608 @@ +interactions: +- request: + body: 'b''{"modelId": "0b7601a8-50ab-4ad7-8d00-970e9b91e5d9", "azureBlobSource": + {"containerUrl": "container_sas_url"}}''' + headers: + Accept: + - application/json + Content-Length: + - '300' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels:build?api-version=2021-09-30-preview + response: + body: + string: '' + headers: + apim-request-id: 47824a06-b253-4208-b4f3-16b56b18be7e + content-length: '0' + date: Thu, 28 Oct 2021 22:24:12 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530908151_47824a06-b253-4208-b4f3-16b56b18be7e?api-version=2021-09-30-preview + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2901' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels:build?api-version=2021-09-30-preview +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530908151_47824a06-b253-4208-b4f3-16b56b18be7e?api-version=2021-09-30-preview + response: + body: + string: '{"operationId": "31530908151_47824a06-b253-4208-b4f3-16b56b18be7e", + "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-10-28T22:24:09Z", + "lastUpdatedDateTime": "2021-10-28T22:24:14Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/0b7601a8-50ab-4ad7-8d00-970e9b91e5d9?api-version=2021-09-30-preview", + "percentCompleted": 100, "result": {"docTypes": {"0b7601a8-50ab-4ad7-8d00-970e9b91e5d9": + {"fieldSchema": {"Merchant": {"type": "string"}, "PhoneNumber": {"type": "string"}, + "Website": {"type": "string"}, "Email": {"type": "string"}, "PurchaseOrderNumber": + {"type": "string"}, "DatedAs": {"type": "string"}, "VendorName": {"type": + "string"}, "CompanyName": {"type": "string"}, "CompanyAddress": {"type": "string"}, + "CompanyPhoneNumber": {"type": "string"}, "Subtotal": {"type": "string"}, + "Tax": {"type": "string"}, "Total": {"type": "string"}, "Signature": {"type": + "string"}, "Quantity": {"type": "number"}, "FullSignature": {"type": "signature"}}, + "fieldConfidence": {"CompanyAddress": 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": + 0.95, "DatedAs": 0.95, "Email": 0.8, "FullSignature": 0.6, "Merchant": 0.95, + "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": 0.95, "Signature": + 0.95, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": 0.95, "Website": + 0.95}}}, "modelId": "0b7601a8-50ab-4ad7-8d00-970e9b91e5d9", "createdDateTime": + "2021-10-28T22:24:14Z"}}' + headers: + apim-request-id: 2893ad39-8f5d-4059-9d7a-f3f4de4daf97 + content-type: application/json; charset=utf-8 + date: Thu, 28 Oct 2021 22:24:17 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '57' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530908151_47824a06-b253-4208-b4f3-16b56b18be7e?api-version=2021-09-30-preview +- request: + body: '!!! The request body has been omitted from the recording because its size + 479269 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/0b7601a8-50ab-4ad7-8d00-970e9b91e5d9:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + response: + body: + string: '' + headers: + apim-request-id: 50190194-80a0-4d3e-96d9-bd206f02df70 + content-length: '0' + date: Thu, 28 Oct 2021 22:24:18 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/0b7601a8-50ab-4ad7-8d00-970e9b91e5d9/analyzeResults/50190194-80a0-4d3e-96d9-bd206f02df70?api-version=2021-09-30-preview + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + x-envoy-upstream-service-time: '654' + status: + code: 202 + message: Accepted + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/0b7601a8-50ab-4ad7-8d00-970e9b91e5d9:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/0b7601a8-50ab-4ad7-8d00-970e9b91e5d9/analyzeResults/50190194-80a0-4d3e-96d9-bd206f02df70?api-version=2021-09-30-preview + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-10-28T22:24:17Z", + "lastUpdatedDateTime": "2021-10-28T22:24:22Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "0b7601a8-50ab-4ad7-8d00-970e9b91e5d9", "stringIndexType": + "unicodeCodePoint", "content": "Purchase Order\nHero Limited\nCompany Phone: + 555-348-6512\nWebsite: www.herolimited.com\nEmail:\nPurchase Order\nDated + As: 12/20/2020\nPurchase Order #: 948284\naccounts@herolimited.com\nShipped + To\nVendor Name: Hillary Swank\nCompany Name: Higgly Wiggly Books\nAddress: + 938 NE Burner Road\nBoulder City, CO 92848\nPhone: 938-294-2949\nShipped From\nName: + Bernie Sanders\nCompany Name: Jupiter Book Supply\nAddress: 383 N Kinnick + Road\nSeattle, WA 38383\nPhone: 932-299-0292\nDetails\nQuantity\nUnit Price\nTotal\nBindings\n20\n1.00\n20.00\nCovers + Small\n20\n1.00\n20.00\nFeather Bookmark\n20\n5.00\n100.00\nCopper Swirl Marker\n20\n5.00\n100.00\nBernie + Sanders\nBernie Sanders\nManager\nAdditional Notes:\nDo not Jostle Box. Unpack + carefully. Enjoy.\nSUBTOTAL\n$140.00\nTAX\n$4.00\nTOTAL\n$144.00\nJupiter + Book Supply will refund you 50% per book if returned within 60 days of reading + and\noffer you 25% off you next total purchase.", "pages": [{"pageNumber": + 1, "angle": 0, "width": 1700, "height": 2200, "unit": "pixel", "words": [{"content": + "Purchase", "boundingBox": [137, 140, 259, 139, 259, 167, 137, 167], "confidence": + 0.997, "span": {"offset": 0, "length": 8}}, {"content": "Order", "boundingBox": + [264, 139, 350, 139, 349, 167, 264, 167], "confidence": 0.995, "span": {"offset": + 9, "length": 5}}, {"content": "Hero", "boundingBox": [621, 208, 769, 206, + 769, 266, 620, 266], "confidence": 0.983, "span": {"offset": 15, "length": + 4}}, {"content": "Limited", "boundingBox": [793, 205, 1058, 204, 1057, 266, + 793, 266], "confidence": 0.997, "span": {"offset": 20, "length": 7}}, {"content": + "Company", "boundingBox": [163, 353, 270, 351, 270, 379, 164, 378], "confidence": + 0.993, "span": {"offset": 28, "length": 7}}, {"content": "Phone:", "boundingBox": + [275, 351, 358, 351, 359, 378, 276, 379], "confidence": 0.997, "span": {"offset": + 36, "length": 6}}, {"content": "555-348-6512", "boundingBox": [363, 351, 524, + 351, 524, 374, 364, 378], "confidence": 0.994, "span": {"offset": 43, "length": + 12}}, {"content": "Website:", "boundingBox": [167, 394, 265, 393, 265, 418, + 167, 417], "confidence": 0.997, "span": {"offset": 56, "length": 8}}, {"content": + "www.herolimited.com", "boundingBox": [270, 393, 522, 393, 522, 418, 270, + 418], "confidence": 0.993, "span": {"offset": 65, "length": 19}}, {"content": + "Email:", "boundingBox": [165, 435, 237, 435, 237, 460, 165, 460], "confidence": + 0.995, "span": {"offset": 85, "length": 6}}, {"content": "Purchase", "boundingBox": + [1113, 322, 1365, 321, 1364, 370, 1113, 368], "confidence": 0.997, "span": + {"offset": 92, "length": 8}}, {"content": "Order", "boundingBox": [1381, 321, + 1549, 321, 1548, 370, 1380, 370], "confidence": 0.995, "span": {"offset": + 101, "length": 5}}, {"content": "Dated", "boundingBox": [1025, 421, 1103, + 420, 1103, 448, 1025, 448], "confidence": 0.993, "span": {"offset": 107, "length": + 5}}, {"content": "As:", "boundingBox": [1110, 420, 1156, 420, 1156, 448, 1110, + 448], "confidence": 0.998, "span": {"offset": 113, "length": 3}}, {"content": + "12/20/2020", "boundingBox": [1162, 420, 1312, 421, 1312, 449, 1162, 448], + "confidence": 0.992, "span": {"offset": 117, "length": 10}}, {"content": "Purchase", + "boundingBox": [1023, 461, 1146, 461, 1147, 489, 1023, 488], "confidence": + 0.997, "span": {"offset": 128, "length": 8}}, {"content": "Order", "boundingBox": + [1152, 461, 1237, 461, 1237, 489, 1152, 489], "confidence": 0.995, "span": + {"offset": 137, "length": 5}}, {"content": "#:", "boundingBox": [1242, 461, + 1270, 461, 1270, 489, 1243, 489], "confidence": 0.997, "span": {"offset": + 143, "length": 2}}, {"content": "948284", "boundingBox": [1275, 461, 1373, + 462, 1373, 489, 1275, 489], "confidence": 0.995, "span": {"offset": 146, "length": + 6}}, {"content": "accounts@herolimited.com", "boundingBox": [164, 481, 471, + 479, 470, 503, 165, 503], "confidence": 0.959, "span": {"offset": 153, "length": + 24}}, {"content": "Shipped", "boundingBox": [167, 547, 328, 547, 327, 592, + 168, 592], "confidence": 0.997, "span": {"offset": 178, "length": 7}}, {"content": + "To", "boundingBox": [337, 547, 392, 547, 391, 591, 336, 592], "confidence": + 0.963, "span": {"offset": 186, "length": 2}}, {"content": "Vendor", "boundingBox": + [160, 611, 250, 610, 250, 638, 160, 637], "confidence": 0.997, "span": {"offset": + 189, "length": 6}}, {"content": "Name:", "boundingBox": [256, 610, 341, 609, + 340, 639, 256, 638], "confidence": 0.995, "span": {"offset": 196, "length": + 5}}, {"content": "Hillary", "boundingBox": [346, 609, 427, 609, 427, 639, + 346, 639], "confidence": 0.997, "span": {"offset": 202, "length": 7}}, {"content": + "Swank", "boundingBox": [433, 609, 518, 610, 517, 639, 433, 639], "confidence": + 0.995, "span": {"offset": 210, "length": 5}}, {"content": "Company", "boundingBox": + [160, 649, 275, 647, 276, 678, 161, 676], "confidence": 0.993, "span": {"offset": + 216, "length": 7}}, {"content": "Name:", "boundingBox": [281, 647, 366, 647, + 366, 679, 282, 678], "confidence": 0.995, "span": {"offset": 224, "length": + 5}}, {"content": "Higgly", "boundingBox": [372, 647, 449, 646, 449, 679, 372, + 679], "confidence": 0.997, "span": {"offset": 230, "length": 6}}, {"content": + "Wiggly", "boundingBox": [455, 646, 541, 646, 541, 678, 455, 679], "confidence": + 0.997, "span": {"offset": 237, "length": 6}}, {"content": "Books", "boundingBox": + [547, 646, 628, 646, 628, 676, 547, 678], "confidence": 0.995, "span": {"offset": + 244, "length": 5}}, {"content": "Address:", "boundingBox": [161, 685, 266, + 685, 265, 712, 160, 711], "confidence": 0.994, "span": {"offset": 250, "length": + 8}}, {"content": "938", "boundingBox": [271, 685, 319, 685, 318, 713, 271, + 712], "confidence": 0.993, "span": {"offset": 259, "length": 3}}, {"content": + "NE", "boundingBox": [324, 685, 360, 685, 359, 713, 323, 713], "confidence": + 0.998, "span": {"offset": 263, "length": 2}}, {"content": "Burner", "boundingBox": + [366, 685, 452, 685, 452, 713, 365, 713], "confidence": 0.997, "span": {"offset": + 266, "length": 6}}, {"content": "Road", "boundingBox": [458, 685, 521, 685, + 521, 713, 457, 713], "confidence": 0.992, "span": {"offset": 273, "length": + 4}}, {"content": "Boulder", "boundingBox": [279, 722, 369, 722, 370, 751, + 280, 750], "confidence": 0.994, "span": {"offset": 278, "length": 7}}, {"content": + "City,", "boundingBox": [375, 722, 431, 722, 432, 751, 376, 751], "confidence": + 0.995, "span": {"offset": 286, "length": 5}}, {"content": "CO", "boundingBox": + [437, 722, 473, 722, 473, 751, 437, 751], "confidence": 0.999, "span": {"offset": + 292, "length": 2}}, {"content": "92848", "boundingBox": [480, 722, 559, 722, + 559, 749, 480, 751], "confidence": 0.995, "span": {"offset": 295, "length": + 5}}, {"content": "Phone:", "boundingBox": [613, 722, 701, 722, 701, 749, 613, + 749], "confidence": 0.997, "span": {"offset": 301, "length": 6}}, {"content": + "938-294-2949", "boundingBox": [706, 722, 882, 722, 881, 748, 706, 749], "confidence": + 0.983, "span": {"offset": 308, "length": 12}}, {"content": "Shipped", "boundingBox": + [167, 784, 324, 785, 324, 830, 169, 830], "confidence": 0.997, "span": {"offset": + 321, "length": 7}}, {"content": "From", "boundingBox": [333, 785, 431, 785, + 431, 827, 333, 830], "confidence": 0.991, "span": {"offset": 329, "length": + 4}}, {"content": "Name:", "boundingBox": [166, 853, 246, 853, 245, 879, 166, + 879], "confidence": 0.994, "span": {"offset": 334, "length": 5}}, {"content": + "Bernie", "boundingBox": [251, 853, 333, 852, 332, 880, 251, 879], "confidence": + 0.997, "span": {"offset": 340, "length": 6}}, {"content": "Sanders", "boundingBox": + [338, 852, 444, 852, 444, 879, 338, 880], "confidence": 0.997, "span": {"offset": + 347, "length": 7}}, {"content": "Company", "boundingBox": [164, 890, 280, + 890, 281, 919, 165, 919], "confidence": 0.994, "span": {"offset": 355, "length": + 7}}, {"content": "Name:", "boundingBox": [285, 890, 372, 889, 372, 919, 286, + 919], "confidence": 0.995, "span": {"offset": 363, "length": 5}}, {"content": + "Jupiter", "boundingBox": [377, 889, 464, 889, 464, 919, 378, 919], "confidence": + 0.997, "span": {"offset": 369, "length": 7}}, {"content": "Book", "boundingBox": + [469, 889, 532, 889, 532, 920, 470, 919], "confidence": 0.992, "span": {"offset": + 377, "length": 4}}, {"content": "Supply", "boundingBox": [538, 889, 628, 890, + 628, 920, 538, 920], "confidence": 0.995, "span": {"offset": 382, "length": + 6}}, {"content": "Address:", "boundingBox": [166, 926, 271, 926, 271, 953, + 166, 953], "confidence": 0.994, "span": {"offset": 389, "length": 8}}, {"content": + "383", "boundingBox": [277, 925, 325, 925, 325, 953, 276, 953], "confidence": + 0.997, "span": {"offset": 398, "length": 3}}, {"content": "N", "boundingBox": + [330, 925, 346, 926, 346, 953, 330, 953], "confidence": 0.995, "span": {"offset": + 402, "length": 1}}, {"content": "Kinnick", "boundingBox": [355, 926, 444, + 926, 444, 954, 355, 953], "confidence": 0.997, "span": {"offset": 404, "length": + 7}}, {"content": "Road", "boundingBox": [450, 926, 516, 927, 515, 954, 449, + 954], "confidence": 0.983, "span": {"offset": 412, "length": 4}}, {"content": + "Seattle,", "boundingBox": [281, 965, 374, 964, 375, 991, 283, 991], "confidence": + 0.996, "span": {"offset": 417, "length": 8}}, {"content": "WA", "boundingBox": + [380, 964, 424, 964, 425, 991, 381, 991], "confidence": 0.998, "span": {"offset": + 426, "length": 2}}, {"content": "38383", "boundingBox": [432, 964, 510, 963, + 511, 990, 432, 991], "confidence": 0.995, "span": {"offset": 429, "length": + 5}}, {"content": "Phone:", "boundingBox": [760, 964, 847, 964, 846, 990, 760, + 990], "confidence": 0.997, "span": {"offset": 435, "length": 6}}, {"content": + "932-299-0292", "boundingBox": [852, 964, 1029, 963, 1028, 990, 851, 990], + "confidence": 0.987, "span": {"offset": 442, "length": 12}}, {"content": "Details", + "boundingBox": [447, 1048, 556, 1048, 555, 1078, 446, 1078], "confidence": + 0.993, "span": {"offset": 455, "length": 7}}, {"content": "Quantity", "boundingBox": + [886, 1048, 1030, 1047, 1029, 1084, 886, 1084], "confidence": 0.997, "span": + {"offset": 463, "length": 8}}, {"content": "Unit", "boundingBox": [1112, 1047, + 1175, 1047, 1175, 1078, 1111, 1078], "confidence": 0.992, "span": {"offset": + 472, "length": 4}}, {"content": "Price", "boundingBox": [1181, 1047, 1263, + 1048, 1262, 1078, 1181, 1078], "confidence": 0.995, "span": {"offset": 477, + "length": 5}}, {"content": "Total", "boundingBox": [1382, 1047, 1468, 1047, + 1468, 1077, 1382, 1077], "confidence": 0.995, "span": {"offset": 483, "length": + 5}}, {"content": "Bindings", "boundingBox": [172, 1094, 279, 1097, 279, 1123, + 173, 1122], "confidence": 0.993, "span": {"offset": 489, "length": 8}}, {"content": + "20", "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119], "confidence": + 0.997, "span": {"offset": 498, "length": 2}}, {"content": "1.00", "boundingBox": + [1240, 1095, 1290, 1094, 1291, 1117, 1240, 1118], "confidence": 0.988, "span": + {"offset": 501, "length": 4}}, {"content": "20.00", "boundingBox": [1458, + 1096, 1526, 1095, 1525, 1120, 1459, 1119], "confidence": 0.995, "span": {"offset": + 506, "length": 5}}, {"content": "Covers", "boundingBox": [170, 1136, 251, + 1136, 251, 1161, 170, 1161], "confidence": 0.995, "span": {"offset": 512, + "length": 6}}, {"content": "Small", "boundingBox": [256, 1136, 332, 1135, + 331, 1161, 256, 1161], "confidence": 0.995, "span": {"offset": 519, "length": + 5}}, {"content": "20", "boundingBox": [859, 1135, 889, 1135, 889, 1160, 859, + 1160], "confidence": 0.997, "span": {"offset": 525, "length": 2}}, {"content": + "1.00", "boundingBox": [1239, 1135, 1290, 1135, 1291, 1160, 1239, 1160], "confidence": + 0.984, "span": {"offset": 528, "length": 4}}, {"content": "20.00", "boundingBox": + [1458, 1135, 1526, 1135, 1526, 1160, 1458, 1160], "confidence": 0.995, "span": + {"offset": 533, "length": 5}}, {"content": "Feather", "boundingBox": [173, + 1180, 265, 1179, 265, 1206, 174, 1206], "confidence": 0.997, "span": {"offset": + 539, "length": 7}}, {"content": "Bookmark", "boundingBox": [270, 1179, 399, + 1178, 400, 1206, 271, 1206], "confidence": 0.997, "span": {"offset": 547, + "length": 8}}, {"content": "20", "boundingBox": [860, 1179, 888, 1179, 888, + 1204, 860, 1203], "confidence": 0.995, "span": {"offset": 556, "length": 2}}, + {"content": "5.00", "boundingBox": [1239, 1179, 1290, 1178, 1291, 1203, 1239, + 1204], "confidence": 0.994, "span": {"offset": 559, "length": 4}}, {"content": + "100.00", "boundingBox": [1443, 1181, 1525, 1180, 1525, 1204, 1443, 1205], + "confidence": 0.067, "span": {"offset": 564, "length": 6}}, {"content": "Copper", + "boundingBox": [170, 1223, 257, 1222, 257, 1253, 170, 1253], "confidence": + 0.995, "span": {"offset": 571, "length": 6}}, {"content": "Swirl", "boundingBox": + [263, 1222, 325, 1222, 325, 1251, 262, 1252], "confidence": 0.995, "span": + {"offset": 578, "length": 5}}, {"content": "Marker", "boundingBox": [331, + 1222, 429, 1223, 429, 1248, 330, 1251], "confidence": 0.997, "span": {"offset": + 584, "length": 6}}, {"content": "20", "boundingBox": [860, 1223, 887, 1223, + 887, 1247, 860, 1247], "confidence": 0.997, "span": {"offset": 591, "length": + 2}}, {"content": "5.00", "boundingBox": [1239, 1221, 1291, 1221, 1291, 1247, + 1239, 1247], "confidence": 0.988, "span": {"offset": 594, "length": 4}}, {"content": + "100.00", "boundingBox": [1444, 1224, 1525, 1223, 1524, 1247, 1444, 1248], + "confidence": 0.995, "span": {"offset": 599, "length": 6}}, {"content": "Bernie", + "boundingBox": [484, 1671, 595, 1671, 595, 1706, 484, 1706], "confidence": + 0.997, "span": {"offset": 606, "length": 6}}, {"content": "Sanders", "boundingBox": + [602, 1671, 762, 1670, 763, 1708, 602, 1706], "confidence": 0.997, "span": + {"offset": 613, "length": 7}}, {"content": "Bernie", "boundingBox": [542, + 1719, 614, 1719, 615, 1742, 544, 1742], "confidence": 0.995, "span": {"offset": + 621, "length": 6}}, {"content": "Sanders", "boundingBox": [618, 1719, 716, + 1719, 716, 1743, 619, 1742], "confidence": 0.997, "span": {"offset": 628, + "length": 7}}, {"content": "Manager", "boundingBox": [577, 1754, 681, 1756, + 680, 1778, 578, 1776], "confidence": 0.994, "span": {"offset": 636, "length": + 7}}, {"content": "Additional", "boundingBox": [173, 1796, 350, 1796, 349, + 1832, 173, 1831], "confidence": 0.993, "span": {"offset": 644, "length": 10}}, + {"content": "Notes:", "boundingBox": [357, 1796, 478, 1797, 477, 1833, 356, + 1832], "confidence": 0.997, "span": {"offset": 655, "length": 6}}, {"content": + "Do", "boundingBox": [175, 1881, 201, 1881, 202, 1907, 175, 1907], "confidence": + 0.988, "span": {"offset": 662, "length": 2}}, {"content": "not", "boundingBox": + [207, 1881, 251, 1880, 252, 1908, 208, 1907], "confidence": 0.998, "span": + {"offset": 665, "length": 3}}, {"content": "Jostle", "boundingBox": [257, + 1880, 330, 1880, 330, 1909, 257, 1908], "confidence": 0.997, "span": {"offset": + 669, "length": 6}}, {"content": "Box.", "boundingBox": [336, 1880, 397, 1880, + 397, 1909, 336, 1909], "confidence": 0.991, "span": {"offset": 676, "length": + 4}}, {"content": "Unpack", "boundingBox": [403, 1880, 497, 1880, 497, 1910, + 403, 1909], "confidence": 0.997, "span": {"offset": 681, "length": 6}}, {"content": + "carefully.", "boundingBox": [503, 1880, 620, 1880, 620, 1911, 503, 1910], + "confidence": 0.996, "span": {"offset": 688, "length": 10}}, {"content": "Enjoy.", + "boundingBox": [626, 1880, 706, 1881, 706, 1912, 626, 1911], "confidence": + 0.995, "span": {"offset": 699, "length": 6}}, {"content": "SUBTOTAL", "boundingBox": + [1147, 1575, 1293, 1575, 1293, 1600, 1147, 1600], "confidence": 0.993, "span": + {"offset": 706, "length": 8}}, {"content": "$140.00", "boundingBox": [1426, + 1572, 1526, 1572, 1525, 1597, 1427, 1599], "confidence": 0.993, "span": {"offset": + 715, "length": 7}}, {"content": "TAX", "boundingBox": [1236, 1618, 1288, 1618, + 1288, 1643, 1236, 1643], "confidence": 0.994, "span": {"offset": 723, "length": + 3}}, {"content": "$4.00", "boundingBox": [1458, 1615, 1529, 1615, 1529, 1642, + 1458, 1643], "confidence": 0.988, "span": {"offset": 727, "length": 5}}, {"content": + "TOTAL", "boundingBox": [1204, 1674, 1292, 1674, 1292, 1699, 1205, 1699], + "confidence": 0.994, "span": {"offset": 733, "length": 5}}, {"content": "$144.00", + "boundingBox": [1427, 1671, 1527, 1669, 1527, 1697, 1429, 1698], "confidence": + 0.983, "span": {"offset": 739, "length": 7}}, {"content": "Jupiter", "boundingBox": + [169, 1924, 265, 1924, 265, 1959, 169, 1959], "confidence": 0.994, "span": + {"offset": 747, "length": 7}}, {"content": "Book", "boundingBox": [272, 1924, + 350, 1924, 351, 1958, 272, 1959], "confidence": 0.992, "span": {"offset": + 755, "length": 4}}, {"content": "Supply", "boundingBox": [357, 1924, 460, + 1924, 460, 1958, 357, 1958], "confidence": 0.995, "span": {"offset": 760, + "length": 6}}, {"content": "will", "boundingBox": [467, 1924, 516, 1924, 516, + 1958, 467, 1958], "confidence": 0.991, "span": {"offset": 767, "length": 4}}, + {"content": "refund", "boundingBox": [523, 1924, 622, 1924, 621, 1958, 523, + 1958], "confidence": 0.997, "span": {"offset": 772, "length": 6}}, {"content": + "you", "boundingBox": [629, 1924, 685, 1924, 684, 1958, 628, 1958], "confidence": + 0.998, "span": {"offset": 779, "length": 3}}, {"content": "50%", "boundingBox": + [691, 1924, 761, 1924, 760, 1958, 691, 1958], "confidence": 0.988, "span": + {"offset": 783, "length": 3}}, {"content": "per", "boundingBox": [768, 1924, + 819, 1924, 819, 1958, 767, 1958], "confidence": 0.998, "span": {"offset": + 787, "length": 3}}, {"content": "book", "boundingBox": [826, 1924, 900, 1924, + 899, 1958, 825, 1958], "confidence": 0.992, "span": {"offset": 791, "length": + 4}}, {"content": "if", "boundingBox": [907, 1924, 927, 1924, 926, 1958, 906, + 1958], "confidence": 0.999, "span": {"offset": 796, "length": 2}}, {"content": + "returned", "boundingBox": [933, 1924, 1059, 1924, 1058, 1958, 933, 1958], + "confidence": 0.996, "span": {"offset": 799, "length": 8}}, {"content": "within", + "boundingBox": [1066, 1924, 1153, 1924, 1152, 1958, 1065, 1958], "confidence": + 0.997, "span": {"offset": 808, "length": 6}}, {"content": "60", "boundingBox": + [1160, 1924, 1200, 1924, 1199, 1958, 1159, 1958], "confidence": 0.999, "span": + {"offset": 815, "length": 2}}, {"content": "days", "boundingBox": [1207, 1924, + 1279, 1924, 1278, 1958, 1206, 1958], "confidence": 0.992, "span": {"offset": + 818, "length": 4}}, {"content": "of", "boundingBox": [1286, 1924, 1317, 1924, + 1316, 1958, 1284, 1958], "confidence": 0.997, "span": {"offset": 823, "length": + 2}}, {"content": "reading", "boundingBox": [1324, 1924, 1438, 1924, 1437, + 1958, 1322, 1958], "confidence": 0.997, "span": {"offset": 826, "length": + 7}}, {"content": "and", "boundingBox": [1445, 1924, 1505, 1924, 1504, 1958, + 1443, 1958], "confidence": 0.998, "span": {"offset": 834, "length": 3}}, {"content": + "offer", "boundingBox": [169, 1958, 231, 1958, 231, 1991, 169, 1991], "confidence": + 0.993, "span": {"offset": 838, "length": 5}}, {"content": "you", "boundingBox": + [237, 1958, 295, 1958, 295, 1992, 237, 1991], "confidence": 0.989, "span": + {"offset": 844, "length": 3}}, {"content": "25%", "boundingBox": [303, 1958, + 371, 1958, 372, 1992, 303, 1992], "confidence": 0.947, "span": {"offset": + 848, "length": 3}}, {"content": "off", "boundingBox": [378, 1958, 420, 1958, + 420, 1992, 378, 1992], "confidence": 0.998, "span": {"offset": 852, "length": + 3}}, {"content": "you", "boundingBox": [427, 1958, 482, 1958, 482, 1992, 427, + 1992], "confidence": 0.998, "span": {"offset": 856, "length": 3}}, {"content": + "next", "boundingBox": [488, 1958, 554, 1959, 555, 1992, 489, 1992], "confidence": + 0.992, "span": {"offset": 860, "length": 4}}, {"content": "total", "boundingBox": + [561, 1959, 627, 1959, 627, 1991, 561, 1992], "confidence": 0.994, "span": + {"offset": 865, "length": 5}}, {"content": "purchase.", "boundingBox": [633, + 1959, 786, 1961, 787, 1990, 633, 1991], "confidence": 0.996, "span": {"offset": + 871, "length": 9}}], "selectionMarks": [], "lines": [{"content": "Purchase + Order", "boundingBox": [136, 139, 351, 138, 351, 166, 136, 166], "spans": + [{"offset": 0, "length": 14}]}, {"content": "Hero Limited", "boundingBox": + [620, 205, 1074, 204, 1075, 265, 620, 266], "spans": [{"offset": 15, "length": + 12}]}, {"content": "Company Phone: 555-348-6512", "boundingBox": [163, 352, + 528, 350, 528, 376, 163, 379], "spans": [{"offset": 28, "length": 27}]}, {"content": + "Website: www.herolimited.com", "boundingBox": [166, 393, 533, 393, 533, 418, + 166, 418], "spans": [{"offset": 56, "length": 28}]}, {"content": "Email:", + "boundingBox": [165, 435, 237, 435, 237, 460, 165, 460], "spans": [{"offset": + 85, "length": 6}]}, {"content": "Purchase Order", "boundingBox": [1112, 321, + 1554, 321, 1554, 369, 1112, 369], "spans": [{"offset": 92, "length": 14}]}, + {"content": "Dated As: 12/20/2020", "boundingBox": [1024, 419, 1317, 420, + 1317, 448, 1024, 448], "spans": [{"offset": 107, "length": 20}]}, {"content": + "Purchase Order #: 948284", "boundingBox": [1023, 461, 1376, 461, 1376, 489, + 1023, 488], "spans": [{"offset": 128, "length": 24}]}, {"content": "accounts@herolimited.com", + "boundingBox": [164, 479, 482, 478, 483, 502, 164, 503], "spans": [{"offset": + 153, "length": 24}]}, {"content": "Shipped To", "boundingBox": [167, 547, + 397, 546, 397, 591, 167, 592], "spans": [{"offset": 178, "length": 10}]}, + {"content": "Vendor Name: Hillary Swank", "boundingBox": [159, 609, 520, 609, + 520, 638, 159, 638], "spans": [{"offset": 189, "length": 26}]}, {"content": + "Company Name: Higgly Wiggly Books", "boundingBox": [159, 647, 629, 646, 629, + 677, 160, 679], "spans": [{"offset": 216, "length": 33}]}, {"content": "Address: + 938 NE Burner Road", "boundingBox": [160, 684, 526, 684, 526, 712, 160, 711], + "spans": [{"offset": 250, "length": 27}]}, {"content": "Boulder City, CO 92848", + "boundingBox": [279, 722, 566, 721, 566, 750, 279, 751], "spans": [{"offset": + 278, "length": 22}]}, {"content": "Phone: 938-294-2949", "boundingBox": [612, + 721, 885, 721, 885, 747, 612, 748], "spans": [{"offset": 301, "length": 19}]}, + {"content": "Shipped From", "boundingBox": [167, 784, 453, 784, 453, 829, + 167, 830], "spans": [{"offset": 321, "length": 12}]}, {"content": "Name: Bernie + Sanders", "boundingBox": [165, 852, 445, 851, 445, 878, 165, 879], "spans": + [{"offset": 334, "length": 20}]}, {"content": "Company Name: Jupiter Book + Supply", "boundingBox": [164, 889, 629, 889, 629, 919, 164, 919], "spans": + [{"offset": 355, "length": 33}]}, {"content": "Address: 383 N Kinnick Road", + "boundingBox": [165, 925, 521, 926, 521, 953, 165, 952], "spans": [{"offset": + 389, "length": 27}]}, {"content": "Seattle, WA 38383", "boundingBox": [280, + 963, 514, 962, 514, 990, 281, 991], "spans": [{"offset": 417, "length": 17}]}, + {"content": "Phone: 932-299-0292", "boundingBox": [760, 963, 1032, 963, 1032, + 989, 760, 990], "spans": [{"offset": 435, "length": 19}]}, {"content": "Details", + "boundingBox": [446, 1047, 558, 1047, 558, 1077, 446, 1077], "spans": [{"offset": + 455, "length": 7}]}, {"content": "Quantity", "boundingBox": [885, 1047, 1034, + 1047, 1034, 1083, 886, 1083], "spans": [{"offset": 463, "length": 8}]}, {"content": + "Unit Price", "boundingBox": [1111, 1047, 1270, 1047, 1269, 1078, 1111, 1077], + "spans": [{"offset": 472, "length": 10}]}, {"content": "Total", "boundingBox": + [1382, 1047, 1468, 1047, 1467, 1077, 1382, 1077], "spans": [{"offset": 483, + "length": 5}]}, {"content": "Bindings", "boundingBox": [172, 1093, 279, 1095, + 279, 1123, 172, 1121], "spans": [{"offset": 489, "length": 8}]}, {"content": + "20", "boundingBox": [859, 1094, 893, 1094, 893, 1119, 859, 1119], "spans": + [{"offset": 498, "length": 2}]}, {"content": "1.00", "boundingBox": [1240, + 1096, 1295, 1094, 1294, 1118, 1241, 1118], "spans": [{"offset": 501, "length": + 4}]}, {"content": "20.00", "boundingBox": [1458, 1095, 1530, 1095, 1530, 1119, + 1458, 1119], "spans": [{"offset": 506, "length": 5}]}, {"content": "Covers + Small", "boundingBox": [169, 1135, 332, 1134, 333, 1160, 169, 1161], "spans": + [{"offset": 512, "length": 12}]}, {"content": "20", "boundingBox": [859, 1135, + 894, 1135, 891, 1160, 860, 1160], "spans": [{"offset": 525, "length": 2}]}, + {"content": "1.00", "boundingBox": [1239, 1135, 1295, 1135, 1294, 1159, 1239, + 1160], "spans": [{"offset": 528, "length": 4}]}, {"content": "20.00", "boundingBox": + [1458, 1135, 1530, 1135, 1530, 1159, 1459, 1160], "spans": [{"offset": 533, + "length": 5}]}, {"content": "Feather Bookmark", "boundingBox": [173, 1178, + 403, 1177, 403, 1205, 173, 1206], "spans": [{"offset": 539, "length": 16}]}, + {"content": "20", "boundingBox": [860, 1179, 892, 1179, 891, 1204, 860, 1203], + "spans": [{"offset": 556, "length": 2}]}, {"content": "5.00", "boundingBox": + [1239, 1179, 1295, 1178, 1295, 1203, 1239, 1204], "spans": [{"offset": 559, + "length": 4}]}, {"content": "100.00", "boundingBox": [1442, 1180, 1530, 1180, + 1530, 1203, 1443, 1204], "spans": [{"offset": 564, "length": 6}]}, {"content": + "Copper Swirl Marker", "boundingBox": [169, 1223, 429, 1222, 430, 1249, 169, + 1253], "spans": [{"offset": 571, "length": 19}]}, {"content": "20", "boundingBox": + [860, 1223, 893, 1223, 893, 1247, 860, 1247], "spans": [{"offset": 591, "length": + 2}]}, {"content": "5.00", "boundingBox": [1239, 1221, 1294, 1222, 1294, 1246, + 1239, 1247], "spans": [{"offset": 594, "length": 4}]}, {"content": "100.00", + "boundingBox": [1443, 1223, 1530, 1222, 1530, 1246, 1444, 1247], "spans": + [{"offset": 599, "length": 6}]}, {"content": "Bernie Sanders", "boundingBox": + [484, 1670, 764, 1670, 764, 1707, 484, 1706], "spans": [{"offset": 606, "length": + 14}]}, {"content": "Bernie Sanders", "boundingBox": [542, 1718, 718, 1719, + 718, 1742, 542, 1741], "spans": [{"offset": 621, "length": 14}]}, {"content": + "Manager", "boundingBox": [577, 1753, 681, 1755, 681, 1778, 577, 1776], "spans": + [{"offset": 636, "length": 7}]}, {"content": "Additional Notes:", "boundingBox": + [172, 1796, 478, 1796, 478, 1832, 172, 1831], "spans": [{"offset": 644, "length": + 17}]}, {"content": "Do not Jostle Box. Unpack carefully. Enjoy.", "boundingBox": + [174, 1879, 707, 1880, 707, 1911, 174, 1908], "spans": [{"offset": 662, "length": + 43}]}, {"content": "SUBTOTAL", "boundingBox": [1146, 1573, 1296, 1573, 1296, + 1600, 1146, 1600], "spans": [{"offset": 706, "length": 8}]}, {"content": "$140.00", + "boundingBox": [1426, 1571, 1530, 1571, 1530, 1597, 1426, 1598], "spans": + [{"offset": 715, "length": 7}]}, {"content": "TAX", "boundingBox": [1236, + 1618, 1296, 1618, 1295, 1643, 1236, 1643], "spans": [{"offset": 723, "length": + 3}]}, {"content": "$4.00", "boundingBox": [1458, 1615, 1529, 1615, 1528, 1641, + 1458, 1643], "spans": [{"offset": 727, "length": 5}]}, {"content": "TOTAL", + "boundingBox": [1203, 1673, 1297, 1673, 1297, 1698, 1204, 1699], "spans": + [{"offset": 733, "length": 5}]}, {"content": "$144.00", "boundingBox": [1427, + 1670, 1529, 1669, 1530, 1696, 1427, 1697], "spans": [{"offset": 739, "length": + 7}]}, {"content": "Jupiter Book Supply will refund you 50% per book if returned + within 60 days of reading and", "boundingBox": [168, 1923, 1510, 1923, 1510, + 1957, 168, 1958], "spans": [{"offset": 747, "length": 90}]}, {"content": "offer + you 25% off you next total purchase.", "boundingBox": [168, 1957, 786, 1958, + 786, 1991, 168, 1991], "spans": [{"offset": 838, "length": 42}]}], "spans": + [{"offset": 0, "length": 880}]}], "tables": [{"rowCount": 5, "columnCount": + 4, "cells": [{"kind": "columnHeader", "rowIndex": 0, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Details", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [157, 1037, 847, 1038, 847, 1086, 155, 1086]}], "spans": + [{"offset": 455, "length": 7}]}, {"kind": "columnHeader", "rowIndex": 0, "columnIndex": + 1, "rowSpan": 1, "columnSpan": 1, "content": "Quantity", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [847, 1038, 1069, 1038, 1070, 1086, 847, + 1086]}], "spans": [{"offset": 463, "length": 8}]}, {"kind": "columnHeader", + "rowIndex": 0, "columnIndex": 2, "rowSpan": 1, "columnSpan": 1, "content": + "Unit Price", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1069, + 1038, 1309, 1038, 1309, 1086, 1070, 1086]}], "spans": [{"offset": 472, "length": + 10}]}, {"kind": "columnHeader", "rowIndex": 0, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "Total", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1038, 1543, 1038, 1543, 1086, 1309, 1086]}], "spans": + [{"offset": 483, "length": 5}]}, {"rowIndex": 1, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Bindings", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [155, 1086, 847, 1086, 847, 1127, 155, 1127]}], "spans": + [{"offset": 489, "length": 8}]}, {"rowIndex": 1, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [847, 1086, 1070, 1086, 1070, 1127, 847, 1127]}], "spans": + [{"offset": 498, "length": 2}]}, {"rowIndex": 1, "columnIndex": 2, "rowSpan": + 1, "columnSpan": 1, "content": "1.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1070, 1086, 1309, 1086, 1309, 1127, 1070, 1127]}], "spans": + [{"offset": 501, "length": 4}]}, {"rowIndex": 1, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "20.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1086, 1543, 1086, 1543, 1127, 1309, 1127]}], "spans": + [{"offset": 506, "length": 5}]}, {"rowIndex": 2, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Covers Small", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [155, 1127, 847, 1127, 847, 1171, 155, 1171]}], "spans": + [{"offset": 512, "length": 12}]}, {"rowIndex": 2, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [847, 1127, 1070, 1127, 1070, 1171, 847, 1171]}], "spans": + [{"offset": 525, "length": 2}]}, {"rowIndex": 2, "columnIndex": 2, "rowSpan": + 1, "columnSpan": 1, "content": "1.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1070, 1127, 1309, 1127, 1309, 1171, 1070, 1171]}], "spans": + [{"offset": 528, "length": 4}]}, {"rowIndex": 2, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "20.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1127, 1543, 1127, 1543, 1171, 1309, 1171]}], "spans": + [{"offset": 533, "length": 5}]}, {"rowIndex": 3, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Feather Bookmark", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [155, 1171, 847, 1171, 847, 1214, 155, 1214]}], "spans": + [{"offset": 539, "length": 16}]}, {"rowIndex": 3, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [847, 1171, 1070, 1171, 1070, 1214, 847, 1214]}], "spans": + [{"offset": 556, "length": 2}]}, {"rowIndex": 3, "columnIndex": 2, "rowSpan": + 1, "columnSpan": 1, "content": "5.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1070, 1171, 1309, 1171, 1309, 1214, 1070, 1214]}], "spans": + [{"offset": 559, "length": 4}]}, {"rowIndex": 3, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "100.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1171, 1543, 1171, 1543, 1215, 1309, 1214]}], "spans": + [{"offset": 564, "length": 6}]}, {"rowIndex": 4, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "Copper Swirl Marker", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [155, 1214, 847, 1214, 847, 1258, 155, 1258]}], "spans": + [{"offset": 571, "length": 19}]}, {"rowIndex": 4, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [847, 1214, 1070, 1214, 1070, 1258, 847, 1258]}], "spans": + [{"offset": 591, "length": 2}]}, {"rowIndex": 4, "columnIndex": 2, "rowSpan": + 1, "columnSpan": 1, "content": "5.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1070, 1214, 1309, 1214, 1309, 1258, 1070, 1258]}], "spans": + [{"offset": 594, "length": 4}]}, {"rowIndex": 4, "columnIndex": 3, "rowSpan": + 1, "columnSpan": 1, "content": "100.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1214, 1543, 1215, 1543, 1260, 1309, 1258]}], "spans": + [{"offset": 599, "length": 6}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": + [153, 1036, 1548, 1036, 1547, 1265, 153, 1265]}], "spans": [{"offset": 455, + "length": 150}]}, {"rowCount": 4, "columnCount": 2, "cells": [{"kind": "columnHeader", + "rowIndex": 0, "columnIndex": 0, "rowSpan": 1, "columnSpan": 1, "content": + "SUBTOTAL", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1070, 1565, + 1309, 1565, 1309, 1609, 1071, 1609]}], "spans": [{"offset": 706, "length": + 8}]}, {"kind": "columnHeader", "rowIndex": 0, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "$140.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1565, 1544, 1564, 1544, 1609, 1309, 1609]}], "spans": + [{"offset": 715, "length": 7}]}, {"rowIndex": 1, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "TAX", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [1071, 1609, 1309, 1609, 1309, 1652, 1071, 1652]}], "spans": + [{"offset": 723, "length": 3}]}, {"rowIndex": 1, "columnIndex": 1, "rowSpan": + 1, "columnSpan": 1, "content": "$4.00", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [1309, 1609, 1544, 1609, 1544, 1652, 1309, 1652]}], "spans": + [{"offset": 727, "length": 5}]}, {"rowIndex": 2, "columnIndex": 0, "rowSpan": + 1, "columnSpan": 1, "content": "", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1071, 1652, 1309, 1652, 1309, 1664, 1071, 1664]}], "spans": []}, {"rowIndex": + 2, "columnIndex": 1, "rowSpan": 1, "columnSpan": 1, "content": "", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1309, 1652, 1544, 1652, 1544, 1664, 1309, + 1664]}], "spans": []}, {"rowIndex": 3, "columnIndex": 0, "rowSpan": 1, "columnSpan": + 1, "content": "TOTAL", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1071, 1664, 1309, 1664, 1309, 1707, 1071, 1706]}], "spans": [{"offset": 733, + "length": 5}]}, {"rowIndex": 3, "columnIndex": 1, "rowSpan": 1, "columnSpan": + 1, "content": "$144.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1309, 1664, 1544, 1664, 1544, 1707, 1309, 1707]}], "spans": [{"offset": 739, + "length": 7}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": [1062, + 1563, 1560, 1563, 1560, 1709, 1062, 1709]}], "spans": [{"offset": 706, "length": + 40}]}], "styles": [{"isHandwritten": true, "confidence": 0.9, "spans": [{"offset": + 606, "length": 14}]}], "documents": [{"docType": "0b7601a8-50ab-4ad7-8d00-970e9b91e5d9:0b7601a8-50ab-4ad7-8d00-970e9b91e5d9", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [0, 0, 1700, 0, 1700, + 2200, 0, 2200]}], "fields": {"Total": {"type": "string", "valueString": "$144.00", + "content": "$144.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": 0.95, "spans": + [{"offset": 739, "length": 7}]}, "CompanyName": {"type": "string", "valueString": + "Higgly Wiggly Books", "content": "Higgly Wiggly Books", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [372, 646, 628, 646, 628, 679, 372, 679]}], + "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "DatedAs": + {"type": "string", "valueString": "12/20/2020", "content": "12/20/2020", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, + 449]}], "confidence": 0.95, "spans": [{"offset": 117, "length": 10}]}, "Subtotal": + {"type": "string", "valueString": "$140.00", "content": "$140.00", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1426, 1572, 1526, 1572, 1526, 1599, 1426, + 1599]}], "confidence": 0.95, "spans": [{"offset": 715, "length": 7}]}, "Email": + {"type": "string", "valueString": "accounts@herolimited.com", "content": "accounts@herolimited.com", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, + 471, 503, 164, 503]}], "confidence": 0.95, "spans": [{"offset": 153, "length": + 24}]}, "FullSignature": {"type": "signature", "valueSignature": "signed", + "content": "", "boundingRegions": [{"pageNumber": 1, "boundingBox": [453, + 1659, 807, 1659, 807, 1722, 453, 1722]}], "confidence": 0.95}, "PhoneNumber": + {"type": "string", "valueString": "555-348-6512", "content": "555-348-6512", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, + 524, 378, 363, 378]}], "confidence": 0.95, "spans": [{"offset": 43, "length": + 12}]}, "CompanyPhoneNumber": {"type": "string", "valueString": "938-294-2949", + "content": "938-294-2949", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [706, 722, 882, 722, 882, 749, 706, 749]}], "confidence": 0.95, "spans": [{"offset": + 308, "length": 12}]}, "Website": {"type": "string", "valueString": "www.herolimited.com", + "content": "www.herolimited.com", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [270, 393, 522, 393, 522, 418, 270, 418]}], "confidence": 0.95, "spans": [{"offset": + 65, "length": 19}]}, "PurchaseOrderNumber": {"type": "string", "valueString": + "948284", "content": "948284", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1275, 461, 1373, 461, 1373, 489, 1275, 489]}], "confidence": 0.95, "spans": + [{"offset": 146, "length": 6}]}, "Merchant": {"type": "string", "valueString": + "Hero Limited", "content": "Hero Limited", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [620, 204, 1058, 204, 1058, 266, 620, 266]}], "confidence": + 0.95, "spans": [{"offset": 15, "length": 12}]}, "Signature": {"type": "string", + "confidence": 0.919}, "Tax": {"type": "string", "valueString": "$4.00", "content": + "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1458, 1615, + 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": [{"offset": + 727, "length": 5}]}, "VendorName": {"type": "string", "valueString": "Hillary + Swank", "content": "Hillary Swank", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [346, 609, 518, 609, 518, 639, 346, 639]}], "confidence": 0.95, + "spans": [{"offset": 202, "length": 13}]}, "Quantity": {"type": "number", + "valueNumber": 20, "content": "20", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], "confidence": + 0.95, "spans": [{"offset": 498, "length": 2}]}, "CompanyAddress": {"type": + "string", "valueString": "938 NE Burner Road Boulder City, CO 92848", "content": + "938 NE Burner Road Boulder City, CO 92848", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [271, 685, 559, 685, 559, 751, 271, 751]}], "confidence": + 0.698, "spans": [{"offset": 259, "length": 41}]}}, "confidence": 0.92, "spans": + [{"offset": 0, "length": 880}]}]}}' + headers: + apim-request-id: 3f817e83-5dfa-4944-8ae0-54f3986a6488 + content-type: application/json; charset=utf-8 + date: Thu, 28 Oct 2021 22:24:23 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '429' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/0b7601a8-50ab-4ad7-8d00-970e9b91e5d9/analyzeResults/50190194-80a0-4d3e-96d9-bd206f02df70?api-version=2021-09-30-preview +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_custom_document_transform.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_custom_document_transform.yaml index 743372110f91..1e6136f63622 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_custom_document_transform.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_custom_document_transform.yaml @@ -1,29 +1,29 @@ interactions: - request: - body: 'b''{"modelId": "e30945db-5afa-41a1-a354-6697883c592a", "azureBlobSource": + body: 'b''{"modelId": "5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50", "azureBlobSource": {"containerUrl": "container_sas_url"}}''' headers: Accept: - application/json Content-Length: - - '291' + - '300' Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels:build?api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: 667e49a3-6e47-416b-8c5c-2bc236dce878 + apim-request-id: 84d8fdea-ecec-467a-99fc-31ecf1e04990 content-length: '0' - date: Fri, 24 Sep 2021 06:49:33 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533901829_667e49a3-6e47-416b-8c5c-2bc236dce878?api-version=2021-09-30-preview + date: Thu, 28 Oct 2021 22:06:58 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530909185_84d8fdea-ecec-467a-99fc-31ecf1e04990?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '2836' + x-envoy-upstream-service-time: '3873' status: code: 202 message: Accepted @@ -32,39 +32,40 @@ interactions: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533901829_667e49a3-6e47-416b-8c5c-2bc236dce878?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530909185_84d8fdea-ecec-467a-99fc-31ecf1e04990?api-version=2021-09-30-preview response: body: - string: '{"operationId": "31533901829_667e49a3-6e47-416b-8c5c-2bc236dce878", - "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-09-24T06:49:31Z", - "lastUpdatedDateTime": "2021-09-24T06:49:36Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/e30945db-5afa-41a1-a354-6697883c592a?api-version=2021-09-30-preview", - "percentCompleted": 100, "result": {"docTypes": {"e30945db-5afa-41a1-a354-6697883c592a": + string: '{"operationId": "31530909185_84d8fdea-ecec-467a-99fc-31ecf1e04990", + "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-10-28T22:06:55Z", + "lastUpdatedDateTime": "2021-10-28T22:07:03Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50?api-version=2021-09-30-preview", + "percentCompleted": 100, "result": {"docTypes": {"5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50": {"fieldSchema": {"Merchant": {"type": "string"}, "PhoneNumber": {"type": "string"}, "Website": {"type": "string"}, "Email": {"type": "string"}, "PurchaseOrderNumber": {"type": "string"}, "DatedAs": {"type": "string"}, "VendorName": {"type": "string"}, "CompanyName": {"type": "string"}, "CompanyAddress": {"type": "string"}, "CompanyPhoneNumber": {"type": "string"}, "Subtotal": {"type": "string"}, "Tax": {"type": "string"}, "Total": {"type": "string"}, "Signature": {"type": - "string"}, "Quantity": {"type": "number"}}, "fieldConfidence": {"CompanyAddress": - 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": 0.95, "DatedAs": 0.95, "Email": - 0.8, "Merchant": 0.95, "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": - 0.95, "Signature": 0.8, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": - 0.95, "Website": 0.95}}}, "modelId": "e30945db-5afa-41a1-a354-6697883c592a", - "createdDateTime": "2021-09-24T06:49:36Z"}}' + "string"}, "Quantity": {"type": "number"}, "FullSignature": {"type": "signature"}}, + "fieldConfidence": {"CompanyAddress": 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": + 0.95, "DatedAs": 0.95, "Email": 0.8, "FullSignature": 0.6, "Merchant": 0.95, + "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": 0.95, "Signature": + 0.95, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": 0.95, "Website": + 0.95}}}, "modelId": "5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50", "createdDateTime": + "2021-10-28T22:07:03Z"}}' headers: - apim-request-id: 788c4b14-8818-48a0-b6ab-da2ede652977 + apim-request-id: b8c9743b-04f1-4a21-8245-3dd233829049 content-type: application/json; charset=utf-8 - date: Fri, 24 Sep 2021 06:49:39 GMT + date: Thu, 28 Oct 2021 22:07:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '39' + x-envoy-upstream-service-time: '48' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533901829_667e49a3-6e47-416b-8c5c-2bc236dce878?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530909185_84d8fdea-ecec-467a-99fc-31ecf1e04990?api-version=2021-09-30-preview - request: body: '!!! The request body has been omitted from the recording because its size 479269 is larger than 128KB. !!!' @@ -74,36 +75,59 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/e30945db-5afa-41a1-a354-6697883c592a:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: b4a0211f-72b0-4ecf-8ce6-497e3a2a4924 + apim-request-id: 806bfec1-8610-4bb4-8f88-f92ef1ae1530 content-length: '0' - date: Fri, 24 Sep 2021 06:49:40 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/e30945db-5afa-41a1-a354-6697883c592a/analyzeResults/b4a0211f-72b0-4ecf-8ce6-497e3a2a4924?api-version=2021-09-30-preview + date: Thu, 28 Oct 2021 22:07:05 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50/analyzeResults/806bfec1-8610-4bb4-8f88-f92ef1ae1530?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '641' + x-envoy-upstream-service-time: '728' status: code: 202 message: Accepted - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/e30945db-5afa-41a1-a354-6697883c592a:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview - request: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/e30945db-5afa-41a1-a354-6697883c592a/analyzeResults/b4a0211f-72b0-4ecf-8ce6-497e3a2a4924?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50/analyzeResults/806bfec1-8610-4bb4-8f88-f92ef1ae1530?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-24T06:49:40Z", - "lastUpdatedDateTime": "2021-09-24T06:49:42Z", "analyzeResult": {"apiVersion": - "2021-09-30-preview", "modelId": "e30945db-5afa-41a1-a354-6697883c592a", "stringIndexType": + string: '{"status": "running", "createdDateTime": "2021-10-28T22:07:04Z", "lastUpdatedDateTime": + "2021-10-28T22:07:04Z"}' + headers: + apim-request-id: 1bf3a63d-a251-4298-b684-5cc706baa921 + content-type: application/json; charset=utf-8 + date: Thu, 28 Oct 2021 22:07:10 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '95' + status: + code: 200 + message: OK + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50/analyzeResults/806bfec1-8610-4bb4-8f88-f92ef1ae1530?api-version=2021-09-30-preview +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50/analyzeResults/806bfec1-8610-4bb4-8f88-f92ef1ae1530?api-version=2021-09-30-preview + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-10-28T22:07:04Z", + "lastUpdatedDateTime": "2021-10-28T22:07:10Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50", "stringIndexType": "unicodeCodePoint", "content": "Purchase Order\nHero Limited\nCompany Phone: 555-348-6512\nWebsite: www.herolimited.com\nEmail:\nPurchase Order\nDated As: 12/20/2020\nPurchase Order #: 948284\naccounts@herolimited.com\nShipped @@ -540,68 +564,68 @@ interactions: "length": 7}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": [1062, 1563, 1560, 1563, 1560, 1709, 1062, 1709]}], "spans": [{"offset": 706, "length": 40}]}], "styles": [{"isHandwritten": true, "confidence": 0.9, "spans": [{"offset": - 606, "length": 14}]}], "documents": [{"docType": "e30945db-5afa-41a1-a354-6697883c592a:e30945db-5afa-41a1-a354-6697883c592a", + 606, "length": 14}]}], "documents": [{"docType": "5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50:5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0, 0, 1700, 0, 1700, - 2200, 0, 2200]}], "fields": {"Subtotal": {"type": "string", "valueString": - "$140.00", "content": "$140.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [1426, 1572, 1526, 1572, 1526, 1599, 1426, 1599]}], "confidence": 0.95, "spans": - [{"offset": 715, "length": 7}]}, "Tax": {"type": "string", "valueString": + 2200, 0, 2200]}], "fields": {"Total": {"type": "string", "valueString": "$144.00", + "content": "$144.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": 0.95, "spans": + [{"offset": 739, "length": 7}]}, "Tax": {"type": "string", "valueString": "$4.00", "content": "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1458, 1615, 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": - [{"offset": 727, "length": 5}]}, "Merchant": {"type": "string", "valueString": - "Hero Limited", "content": "Hero Limited", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [620, 204, 1058, 204, 1058, 266, 620, 266]}], "confidence": - 0.95, "spans": [{"offset": 15, "length": 12}]}, "Website": {"type": "string", - "valueString": "www.herolimited.com", "content": "www.herolimited.com", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [270, 393, 522, 393, 522, 418, 270, 418]}], - "confidence": 0.95, "spans": [{"offset": 65, "length": 19}]}, "DatedAs": {"type": - "string", "valueString": "12/20/2020", "content": "12/20/2020", "boundingRegions": + [{"offset": 727, "length": 5}]}, "CompanyName": {"type": "string", "valueString": + "Higgly Wiggly Books", "content": "Higgly Wiggly Books", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [372, 646, 628, 646, 628, 679, 372, 679]}], + "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "CompanyAddress": + {"type": "string", "valueString": "938 NE Burner Road Boulder City, CO 92848", + "content": "938 NE Burner Road Boulder City, CO 92848", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [271, 685, 559, 685, 559, 751, 271, 751]}], + "confidence": 0.698, "spans": [{"offset": 259, "length": 41}]}, "DatedAs": + {"type": "string", "valueString": "12/20/2020", "content": "12/20/2020", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, - 449]}], "confidence": 0.95, "spans": [{"offset": 117, "length": 10}]}, "PurchaseOrderNumber": - {"type": "string", "valueString": "948284", "content": "948284", "boundingRegions": + 449]}], "confidence": 0.95, "spans": [{"offset": 117, "length": 10}]}, "FullSignature": + {"type": "signature", "valueSignature": "signed", "content": "", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [453, 1659, 807, 1659, 807, 1722, 453, 1722]}], + "confidence": 0.95}, "Website": {"type": "string", "valueString": "www.herolimited.com", + "content": "www.herolimited.com", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [270, 393, 522, 393, 522, 418, 270, 418]}], "confidence": 0.95, "spans": [{"offset": + 65, "length": 19}]}, "CompanyPhoneNumber": {"type": "string", "valueString": + "938-294-2949", "content": "938-294-2949", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [706, 722, 882, 722, 882, 749, 706, 749]}], "confidence": + 0.95, "spans": [{"offset": 308, "length": 12}]}, "PurchaseOrderNumber": {"type": + "string", "valueString": "948284", "content": "948284", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1275, 461, 1373, 461, 1373, 489, 1275, - 489]}], "confidence": 0.95, "spans": [{"offset": 146, "length": 6}]}, "CompanyPhoneNumber": - {"type": "string", "valueString": "938-294-2949", "content": "938-294-2949", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [706, 722, 882, 722, - 882, 749, 706, 749]}], "confidence": 0.95, "spans": [{"offset": 308, "length": + 489]}], "confidence": 0.95, "spans": [{"offset": 146, "length": 6}]}, "Merchant": + {"type": "string", "valueString": "Hero Limited", "content": "Hero Limited", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [620, 204, 1058, 204, + 1058, 266, 620, 266]}], "confidence": 0.95, "spans": [{"offset": 15, "length": 12}]}, "VendorName": {"type": "string", "valueString": "Hillary Swank", "content": "Hillary Swank", "boundingRegions": [{"pageNumber": 1, "boundingBox": [346, 609, 518, 609, 518, 639, 346, 639]}], "confidence": 0.95, "spans": [{"offset": - 202, "length": 13}]}, "CompanyAddress": {"type": "string", "valueString": - "938 NE Burner Road Boulder City, CO 92848", "content": "938 NE Burner Road - Boulder City, CO 92848", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [271, 685, 559, 685, 559, 751, 271, 751]}], "confidence": 0.621, "spans": - [{"offset": 259, "length": 41}]}, "Quantity": {"type": "number", "valueNumber": - 20, "content": "20", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], "confidence": 0.95, "spans": - [{"offset": 498, "length": 2}]}, "CompanyName": {"type": "string", "valueString": - "Higgly Wiggly Books", "content": "Higgly Wiggly Books", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [372, 646, 628, 646, 628, 679, 372, 679]}], - "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "Signature": - {"type": "string", "valueString": "Bernie Sanders", "content": "Bernie Sanders", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [484, 1670, 763, 1670, - 763, 1708, 484, 1708]}], "confidence": 0.433, "spans": [{"offset": 606, "length": - 14}]}, "Email": {"type": "string", "valueString": "accounts@herolimited.com", - "content": "accounts@herolimited.com", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [164, 479, 471, 479, 471, 503, 164, 503]}], "confidence": - 0.95, "spans": [{"offset": 153, "length": 24}]}, "PhoneNumber": {"type": "string", - "valueString": "555-348-6512", "content": "555-348-6512", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, 524, 378, 363, 378]}], - "confidence": 0.95, "spans": [{"offset": 43, "length": 12}]}, "Total": {"type": - "string", "valueString": "$144.00", "content": "$144.00", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [1427, 1669, 1527, 1669, 1527, 1698, 1427, - 1698]}], "confidence": 0.95, "spans": [{"offset": 739, "length": 7}]}}, "confidence": - 0.924, "spans": [{"offset": 0, "length": 880}]}]}}' + 202, "length": 13}]}, "Subtotal": {"type": "string", "valueString": "$140.00", + "content": "$140.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1426, 1572, 1526, 1572, 1526, 1599, 1426, 1599]}], "confidence": 0.95, "spans": + [{"offset": 715, "length": 7}]}, "Email": {"type": "string", "valueString": + "accounts@herolimited.com", "content": "accounts@herolimited.com", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, 471, 503, 164, 503]}], + "confidence": 0.95, "spans": [{"offset": 153, "length": 24}]}, "Quantity": + {"type": "number", "valueNumber": 20, "content": "20", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], + "confidence": 0.95, "spans": [{"offset": 498, "length": 2}]}, "PhoneNumber": + {"type": "string", "valueString": "555-348-6512", "content": "555-348-6512", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, + 524, 378, 363, 378]}], "confidence": 0.95, "spans": [{"offset": 43, "length": + 12}]}, "Signature": {"type": "string", "confidence": 0.919}}, "confidence": + 0.92, "spans": [{"offset": 0, "length": 880}]}]}}' headers: - apim-request-id: d370b878-bbce-493f-b511-e71cfdb98305 + apim-request-id: e2d3a0bc-f2e9-466c-ab35-01e5ae3fdf8c content-type: application/json; charset=utf-8 - date: Fri, 24 Sep 2021 06:49:45 GMT + date: Thu, 28 Oct 2021 22:07:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '220' + x-envoy-upstream-service-time: '247' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/e30945db-5afa-41a1-a354-6697883c592a/analyzeResults/b4a0211f-72b0-4ecf-8ce6-497e3a2a4924?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/5dd1a9b2-bfa1-4839-a9fa-818dbbdf4f50/analyzeResults/806bfec1-8610-4bb4-8f88-f92ef1ae1530?api-version=2021-09-30-preview version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml index fcde50d58403..c304f1a95f17 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_custom_forms_async.test_pages_kwarg_specified.yaml @@ -1,29 +1,29 @@ interactions: - request: - body: 'b''{"modelId": "b6d14f57-68c6-4862-bfdf-cd07cc2ac422", "azureBlobSource": + body: 'b''{"modelId": "46be75e6-a46f-43f2-bc89-9dfa93b0c1a0", "azureBlobSource": {"containerUrl": "container_sas_url"}}''' headers: Accept: - application/json Content-Length: - - '284' + - '300' Content-Type: - application/json User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: POST uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels:build?api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: 232c5ad2-7f1d-4477-8539-e4569fc2b13c + apim-request-id: 9b512669-5734-4c3f-8302-b978c2c4d155 content-length: '0' - date: Sat, 25 Sep 2021 02:31:03 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830939_232c5ad2-7f1d-4477-8539-e4569fc2b13c?api-version=2021-09-30-preview + date: Thu, 28 Oct 2021 22:09:44 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530909018_9b512669-5734-4c3f-8302-b978c2c4d155?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '3957' + x-envoy-upstream-service-time: '2952' status: code: 202 message: Accepted @@ -32,39 +32,40 @@ interactions: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830939_232c5ad2-7f1d-4477-8539-e4569fc2b13c?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530909018_9b512669-5734-4c3f-8302-b978c2c4d155?api-version=2021-09-30-preview response: body: - string: '{"operationId": "31533830939_232c5ad2-7f1d-4477-8539-e4569fc2b13c", - "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-09-25T02:31:00Z", - "lastUpdatedDateTime": "2021-09-25T02:31:05Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422?api-version=2021-09-30-preview", - "percentCompleted": 100, "result": {"docTypes": {"b6d14f57-68c6-4862-bfdf-cd07cc2ac422": + string: '{"operationId": "31530909018_9b512669-5734-4c3f-8302-b978c2c4d155", + "kind": "documentModelBuild", "status": "succeeded", "createdDateTime": "2021-10-28T22:09:41Z", + "lastUpdatedDateTime": "2021-10-28T22:09:47Z", "resourceLocation": "https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/46be75e6-a46f-43f2-bc89-9dfa93b0c1a0?api-version=2021-09-30-preview", + "percentCompleted": 100, "result": {"docTypes": {"46be75e6-a46f-43f2-bc89-9dfa93b0c1a0": {"fieldSchema": {"Merchant": {"type": "string"}, "PhoneNumber": {"type": "string"}, "Website": {"type": "string"}, "Email": {"type": "string"}, "PurchaseOrderNumber": {"type": "string"}, "DatedAs": {"type": "string"}, "VendorName": {"type": "string"}, "CompanyName": {"type": "string"}, "CompanyAddress": {"type": "string"}, "CompanyPhoneNumber": {"type": "string"}, "Subtotal": {"type": "string"}, "Tax": {"type": "string"}, "Total": {"type": "string"}, "Signature": {"type": - "string"}, "Quantity": {"type": "number"}}, "fieldConfidence": {"CompanyAddress": - 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": 0.95, "DatedAs": 0.95, "Email": - 0.8, "Merchant": 0.95, "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": - 0.95, "Signature": 0.6, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": - 0.95, "Website": 0.95}}}, "modelId": "b6d14f57-68c6-4862-bfdf-cd07cc2ac422", - "createdDateTime": "2021-09-25T02:31:05Z"}}' + "string"}, "Quantity": {"type": "number"}, "FullSignature": {"type": "signature"}}, + "fieldConfidence": {"CompanyAddress": 0.8, "CompanyName": 0.95, "CompanyPhoneNumber": + 0.95, "DatedAs": 0.95, "Email": 0.8, "FullSignature": 0.6, "Merchant": 0.95, + "PhoneNumber": 0.95, "PurchaseOrderNumber": 0.95, "Quantity": 0.95, "Signature": + 0.95, "Subtotal": 0.95, "Tax": 0.95, "Total": 0.95, "VendorName": 0.95, "Website": + 0.95}}}, "modelId": "46be75e6-a46f-43f2-bc89-9dfa93b0c1a0", "createdDateTime": + "2021-10-28T22:09:47Z"}}' headers: - apim-request-id: b9078bc1-72c1-4d43-9017-c256b59ab1db + apim-request-id: aaf8ab74-c54a-49db-8558-83712a2f423e content-type: application/json; charset=utf-8 - date: Sat, 25 Sep 2021 02:31:09 GMT + date: Thu, 28 Oct 2021 22:09:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '51' + x-envoy-upstream-service-time: '45' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31533830939_232c5ad2-7f1d-4477-8539-e4569fc2b13c?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/operations/31530909018_9b512669-5734-4c3f-8302-b978c2c4d155?api-version=2021-09-30-preview - request: body: '!!! The request body has been omitted from the recording because its size 479269 is larger than 128KB. !!!' @@ -74,36 +75,36 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: POST - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/46be75e6-a46f-43f2-bc89-9dfa93b0c1a0:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview response: body: string: '' headers: - apim-request-id: 800ebd89-ad27-4edd-bbbc-c27008f8225a + apim-request-id: 0ac9e88d-f404-4842-8332-022bd025a676 content-length: '0' - date: Sat, 25 Sep 2021 02:31:11 GMT - operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422/analyzeResults/800ebd89-ad27-4edd-bbbc-c27008f8225a?api-version=2021-09-30-preview + date: Thu, 28 Oct 2021 22:09:51 GMT + operation-location: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/46be75e6-a46f-43f2-bc89-9dfa93b0c1a0/analyzeResults/0ac9e88d-f404-4842-8332-022bd025a676?api-version=2021-09-30-preview strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff - x-envoy-upstream-service-time: '1010' + x-envoy-upstream-service-time: '1529' status: code: 202 message: Accepted - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/46be75e6-a46f-43f2-bc89-9dfa93b0c1a0:analyze?pages=1&stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview - request: body: null headers: User-Agent: - - azsdk-python-ai-formrecognizer/3.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) method: GET - uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422/analyzeResults/800ebd89-ad27-4edd-bbbc-c27008f8225a?api-version=2021-09-30-preview + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/46be75e6-a46f-43f2-bc89-9dfa93b0c1a0/analyzeResults/0ac9e88d-f404-4842-8332-022bd025a676?api-version=2021-09-30-preview response: body: - string: '{"status": "succeeded", "createdDateTime": "2021-09-25T02:31:10Z", - "lastUpdatedDateTime": "2021-09-25T02:31:13Z", "analyzeResult": {"apiVersion": - "2021-09-30-preview", "modelId": "b6d14f57-68c6-4862-bfdf-cd07cc2ac422", "stringIndexType": + string: '{"status": "succeeded", "createdDateTime": "2021-10-28T22:09:51Z", + "lastUpdatedDateTime": "2021-10-28T22:09:56Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "46be75e6-a46f-43f2-bc89-9dfa93b0c1a0", "stringIndexType": "unicodeCodePoint", "content": "Purchase Order\nHero Limited\nCompany Phone: 555-348-6512\nWebsite: www.herolimited.com\nEmail:\nPurchase Order\nDated As: 12/20/2020\nPurchase Order #: 948284\naccounts@herolimited.com\nShipped @@ -540,68 +541,68 @@ interactions: "length": 7}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": [1062, 1563, 1560, 1563, 1560, 1709, 1062, 1709]}], "spans": [{"offset": 706, "length": 40}]}], "styles": [{"isHandwritten": true, "confidence": 0.9, "spans": [{"offset": - 606, "length": 14}]}], "documents": [{"docType": "b6d14f57-68c6-4862-bfdf-cd07cc2ac422:b6d14f57-68c6-4862-bfdf-cd07cc2ac422", + 606, "length": 14}]}], "documents": [{"docType": "46be75e6-a46f-43f2-bc89-9dfa93b0c1a0:46be75e6-a46f-43f2-bc89-9dfa93b0c1a0", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0, 0, 1700, 0, 1700, - 2200, 0, 2200]}], "fields": {"CompanyPhoneNumber": {"type": "string", "valueString": - "938-294-2949", "content": "938-294-2949", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [706, 722, 882, 722, 882, 749, 706, 749]}], "confidence": - 0.95, "spans": [{"offset": 308, "length": 12}]}, "Total": {"type": "string", - "valueString": "$144.00", "content": "$144.00", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": - 0.95, "spans": [{"offset": 739, "length": 7}]}, "Email": {"type": "string", - "valueString": "accounts@herolimited.com", "content": "accounts@herolimited.com", - "boundingRegions": [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, - 471, 503, 164, 503]}], "confidence": 0.95, "spans": [{"offset": 153, "length": - 24}]}, "Merchant": {"type": "string", "valueString": "Hero Limited", "content": - "Hero Limited", "boundingRegions": [{"pageNumber": 1, "boundingBox": [620, - 204, 1058, 204, 1058, 266, 620, 266]}], "confidence": 0.95, "spans": [{"offset": - 15, "length": 12}]}, "Tax": {"type": "string", "valueString": "$4.00", "content": - "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1458, 1615, - 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": [{"offset": - 727, "length": 5}]}, "Signature": {"type": "string", "valueString": "Bernie - Sanders", "content": "Bernie Sanders", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [484, 1670, 763, 1670, 763, 1708, 484, 1708]}], "confidence": - 0.241, "spans": [{"offset": 606, "length": 14}]}, "Quantity": {"type": "number", - "valueNumber": 20, "content": "20", "boundingRegions": [{"pageNumber": 1, - "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], "confidence": - 0.95, "spans": [{"offset": 498, "length": 2}]}, "VendorName": {"type": "string", - "valueString": "Hillary Swank", "content": "Hillary Swank", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [346, 609, 518, 609, 518, 639, 346, 639]}], - "confidence": 0.95, "spans": [{"offset": 202, "length": 13}]}, "CompanyName": - {"type": "string", "valueString": "Higgly Wiggly Books", "content": "Higgly - Wiggly Books", "boundingRegions": [{"pageNumber": 1, "boundingBox": [372, - 646, 628, 646, 628, 679, 372, 679]}], "confidence": 0.95, "spans": [{"offset": - 230, "length": 19}]}, "PurchaseOrderNumber": {"type": "string", "valueString": - "948284", "content": "948284", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [1275, 461, 1373, 461, 1373, 489, 1275, 489]}], "confidence": 0.95, "spans": - [{"offset": 146, "length": 6}]}, "Subtotal": {"type": "string", "valueString": - "$140.00", "content": "$140.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": - [1426, 1572, 1526, 1572, 1526, 1599, 1426, 1599]}], "confidence": 0.95, "spans": - [{"offset": 715, "length": 7}]}, "DatedAs": {"type": "string", "valueString": - "12/20/2020", "content": "12/20/2020", "boundingRegions": [{"pageNumber": - 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, 449]}], "confidence": - 0.95, "spans": [{"offset": 117, "length": 10}]}, "Website": {"type": "string", - "valueString": "www.herolimited.com", "content": "www.herolimited.com", "boundingRegions": - [{"pageNumber": 1, "boundingBox": [270, 393, 522, 393, 522, 418, 270, 418]}], - "confidence": 0.95, "spans": [{"offset": 65, "length": 19}]}, "CompanyAddress": + 2200, 0, 2200]}], "fields": {"Total": {"type": "string", "valueString": "$144.00", + "content": "$144.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1427, 1669, 1527, 1669, 1527, 1698, 1427, 1698]}], "confidence": 0.95, "spans": + [{"offset": 739, "length": 7}]}, "Tax": {"type": "string", "valueString": + "$4.00", "content": "$4.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1458, 1615, 1529, 1615, 1529, 1643, 1458, 1643]}], "confidence": 0.95, "spans": + [{"offset": 727, "length": 5}]}, "CompanyName": {"type": "string", "valueString": + "Higgly Wiggly Books", "content": "Higgly Wiggly Books", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [372, 646, 628, 646, 628, 679, 372, 679]}], + "confidence": 0.95, "spans": [{"offset": 230, "length": 19}]}, "CompanyAddress": {"type": "string", "valueString": "938 NE Burner Road Boulder City, CO 92848", "content": "938 NE Burner Road Boulder City, CO 92848", "boundingRegions": [{"pageNumber": 1, "boundingBox": [271, 685, 559, 685, 559, 751, 271, 751]}], - "confidence": 0.762, "spans": [{"offset": 259, "length": 41}]}, "PhoneNumber": + "confidence": 0.698, "spans": [{"offset": 259, "length": 41}]}, "DatedAs": + {"type": "string", "valueString": "12/20/2020", "content": "12/20/2020", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1162, 420, 1312, 420, 1312, 449, 1162, + 449]}], "confidence": 0.95, "spans": [{"offset": 117, "length": 10}]}, "FullSignature": + {"type": "signature", "valueSignature": "signed", "content": "", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [453, 1659, 807, 1659, 807, 1722, 453, 1722]}], + "confidence": 0.95}, "Website": {"type": "string", "valueString": "www.herolimited.com", + "content": "www.herolimited.com", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [270, 393, 522, 393, 522, 418, 270, 418]}], "confidence": 0.95, "spans": [{"offset": + 65, "length": 19}]}, "CompanyPhoneNumber": {"type": "string", "valueString": + "938-294-2949", "content": "938-294-2949", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [706, 722, 882, 722, 882, 749, 706, 749]}], "confidence": + 0.95, "spans": [{"offset": 308, "length": 12}]}, "PurchaseOrderNumber": {"type": + "string", "valueString": "948284", "content": "948284", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1275, 461, 1373, 461, 1373, 489, 1275, + 489]}], "confidence": 0.95, "spans": [{"offset": 146, "length": 6}]}, "Merchant": + {"type": "string", "valueString": "Hero Limited", "content": "Hero Limited", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [620, 204, 1058, 204, + 1058, 266, 620, 266]}], "confidence": 0.95, "spans": [{"offset": 15, "length": + 12}]}, "VendorName": {"type": "string", "valueString": "Hillary Swank", "content": + "Hillary Swank", "boundingRegions": [{"pageNumber": 1, "boundingBox": [346, + 609, 518, 609, 518, 639, 346, 639]}], "confidence": 0.95, "spans": [{"offset": + 202, "length": 13}]}, "Subtotal": {"type": "string", "valueString": "$140.00", + "content": "$140.00", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1426, 1572, 1526, 1572, 1526, 1599, 1426, 1599]}], "confidence": 0.95, "spans": + [{"offset": 715, "length": 7}]}, "Email": {"type": "string", "valueString": + "accounts@herolimited.com", "content": "accounts@herolimited.com", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [164, 479, 471, 479, 471, 503, 164, 503]}], + "confidence": 0.95, "spans": [{"offset": 153, "length": 24}]}, "Quantity": + {"type": "number", "valueNumber": 20, "content": "20", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [859, 1094, 887, 1094, 887, 1119, 859, 1119]}], + "confidence": 0.95, "spans": [{"offset": 498, "length": 2}]}, "PhoneNumber": {"type": "string", "valueString": "555-348-6512", "content": "555-348-6512", "boundingRegions": [{"pageNumber": 1, "boundingBox": [363, 351, 524, 351, 524, 378, 363, 378]}], "confidence": 0.95, "spans": [{"offset": 43, "length": - 12}]}}, "confidence": 0.92, "spans": [{"offset": 0, "length": 880}]}]}}' + 12}]}, "Signature": {"type": "string", "confidence": 0.919}}, "confidence": + 0.92, "spans": [{"offset": 0, "length": 880}]}]}}' headers: - apim-request-id: c1e23f97-4446-4f21-ad48-f592ead53cc8 + apim-request-id: 326270e8-1766-40ce-a032-71508233239d content-type: application/json; charset=utf-8 - date: Sat, 25 Sep 2021 02:31:16 GMT + date: Thu, 28 Oct 2021 22:09:57 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '428' + x-envoy-upstream-service-time: '355' status: code: 200 message: OK - url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/b6d14f57-68c6-4862-bfdf-cd07cc2ac422/analyzeResults/800ebd89-ad27-4edd-bbbc-c27008f8225a?api-version=2021-09-30-preview + url: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/46be75e6-a46f-43f2-bc89-9dfa93b0c1a0/analyzeResults/0ac9e88d-f404-4842-8332-022bd025a676?api-version=2021-09-30-preview version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_get_children.test_document_line_get_words.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_get_children.test_document_line_get_words.yaml new file mode 100644 index 000000000000..098230806ecc --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_get_children.test_document_line_get_words.yaml @@ -0,0 +1,343 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 147362 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '147362' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-document:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + response: + body: + string: '' + headers: + apim-request-id: + - fd6e5a97-a81b-40bf-946e-72d5ae1f25dd + content-length: + - '0' + date: + - Fri, 29 Oct 2021 00:43:08 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-document/analyzeResults/fd6e5a97-a81b-40bf-946e-72d5ae1f25dd?api-version=2021-09-30-preview + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '389' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-document/analyzeResults/fd6e5a97-a81b-40bf-946e-72d5ae1f25dd?api-version=2021-09-30-preview + response: + body: + string: '{"status": "running", "createdDateTime": "2021-10-29T00:43:08Z", "lastUpdatedDateTime": + "2021-10-29T00:43:13Z"}' + headers: + apim-request-id: + - 236ec9a1-e7a3-4c05-9835-ea33b3de3d0d + content-type: + - application/json; charset=utf-8 + date: + - Fri, 29 Oct 2021 00:43:13 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '83' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-document/analyzeResults/fd6e5a97-a81b-40bf-946e-72d5ae1f25dd?api-version=2021-09-30-preview + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-10-29T00:43:08Z", + "lastUpdatedDateTime": "2021-10-29T00:43:13Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "prebuilt-document", "stringIndexType": "unicodeCodePoint", + "content": "Contoso\nAddress:\n1 Redmond way Suite\n6000 Redmond, WA\n99243\nInvoice + For: Microsoft\n1020 Enterprise Way\nSunnayvale, CA 87659\nInvoice Number\nInvoice + Date\nInvoice Due Date\nCharges\nVAT ID\n34278587\n6/18/2017\n6/24/2017\n$56,651.49\nPT", + "pages": [{"pageNumber": 1, "angle": 0, "width": 8.5, "height": 11, "unit": + "inch", "words": [{"content": "Contoso", "boundingBox": [0.5384, 1.1583, 1.4466, + 1.1583, 1.4466, 1.3534, 0.5384, 1.3534], "confidence": 1, "span": {"offset": + 0, "length": 7}}, {"content": "Address:", "boundingBox": [0.7994, 1.5143, + 1.3836, 1.5143, 1.3836, 1.6154, 0.7994, 1.6154], "confidence": 1, "span": + {"offset": 8, "length": 8}}, {"content": "1", "boundingBox": [0.8106, 1.708, + 0.8463, 1.708, 0.8463, 1.8053, 0.8106, 1.8053], "confidence": 1, "span": {"offset": + 17, "length": 1}}, {"content": "Redmond", "boundingBox": [0.923, 1.7047, 1.5018, + 1.7047, 1.5018, 1.8068, 0.923, 1.8068], "confidence": 1, "span": {"offset": + 19, "length": 7}}, {"content": "way", "boundingBox": [1.5506, 1.7309, 1.7949, + 1.7309, 1.7949, 1.8342, 1.5506, 1.8342], "confidence": 1, "span": {"offset": + 27, "length": 3}}, {"content": "Suite", "boundingBox": [1.8415, 1.7033, 2.1445, + 1.7033, 2.1445, 1.8078, 1.8415, 1.8078], "confidence": 1, "span": {"offset": + 31, "length": 5}}, {"content": "6000", "boundingBox": [0.8019, 1.896, 1.0991, + 1.896, 1.0991, 1.9994, 0.8019, 1.9994], "confidence": 1, "span": {"offset": + 37, "length": 4}}, {"content": "Redmond,", "boundingBox": [1.1537, 1.8964, + 1.7689, 1.8964, 1.7689, 2.0171, 1.1537, 2.0171], "confidence": 1, "span": + {"offset": 42, "length": 8}}, {"content": "WA", "boundingBox": [1.8196, 1.8976, + 2.0384, 1.8976, 2.0384, 1.9969, 1.8196, 1.9969], "confidence": 1, "span": + {"offset": 51, "length": 2}}, {"content": "99243", "boundingBox": [0.8025, + 2.0876, 1.175, 2.0876, 1.175, 2.1911, 0.8025, 2.1911], "confidence": 1, "span": + {"offset": 54, "length": 5}}, {"content": "Invoice", "boundingBox": [4.4033, + 1.5143, 4.8234, 1.5143, 4.8234, 1.6155, 4.4033, 1.6155], "confidence": 1, + "span": {"offset": 60, "length": 7}}, {"content": "For:", "boundingBox": [4.8793, + 1.5143, 5.1013, 1.5143, 5.1013, 1.6154, 4.8793, 1.6154], "confidence": 1, + "span": {"offset": 68, "length": 4}}, {"content": "Microsoft", "boundingBox": + [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, 1.6151, 5.2045, 1.6151], "confidence": + 1, "span": {"offset": 73, "length": 9}}, {"content": "1020", "boundingBox": + [5.2036, 1.716, 5.4935, 1.716, 5.4935, 1.8185, 5.2036, 1.8185], "confidence": + 1, "span": {"offset": 83, "length": 4}}, {"content": "Enterprise", "boundingBox": + [5.5488, 1.7164, 6.2178, 1.7164, 6.2178, 1.8441, 5.5488, 1.8441], "confidence": + 1, "span": {"offset": 88, "length": 10}}, {"content": "Way", "boundingBox": + [6.2618, 1.7164, 6.5436, 1.7164, 6.5436, 1.8459, 6.2618, 1.8459], "confidence": + 1, "span": {"offset": 99, "length": 3}}, {"content": "Sunnayvale,", "boundingBox": + [5.196, 1.9047, 5.9894, 1.9047, 5.9894, 2.0359, 5.196, 2.0359], "confidence": + 1, "span": {"offset": 103, "length": 11}}, {"content": "CA", "boundingBox": + [6.0427, 1.9047, 6.2354, 1.9047, 6.2354, 2.0085, 6.0427, 2.0085], "confidence": + 1, "span": {"offset": 115, "length": 2}}, {"content": "87659", "boundingBox": + [6.2801, 1.906, 6.6526, 1.906, 6.6526, 2.0086, 6.2801, 2.0086], "confidence": + 1, "span": {"offset": 118, "length": 5}}, {"content": "Invoice", "boundingBox": + [0.5439, 2.8733, 1.0098, 2.8733, 1.0098, 2.9754, 0.5439, 2.9754], "confidence": + 1, "span": {"offset": 124, "length": 7}}, {"content": "Number", "boundingBox": + [1.0611, 2.8743, 1.5729, 2.8743, 1.5729, 2.9754, 1.0611, 2.9754], "confidence": + 1, "span": {"offset": 132, "length": 6}}, {"content": "Invoice", "boundingBox": + [1.9491, 2.8733, 2.415, 2.8733, 2.415, 2.9754, 1.9491, 2.9754], "confidence": + 1, "span": {"offset": 139, "length": 7}}, {"content": "Date", "boundingBox": + [2.4673, 2.8743, 2.7527, 2.8743, 2.7527, 2.9754, 2.4673, 2.9754], "confidence": + 1, "span": {"offset": 147, "length": 4}}, {"content": "Invoice", "boundingBox": + [3.3495, 2.8733, 3.8155, 2.8733, 3.8155, 2.9754, 3.3495, 2.9754], "confidence": + 1, "span": {"offset": 152, "length": 7}}, {"content": "Due", "boundingBox": + [3.8677, 2.8743, 4.1149, 2.8743, 4.1149, 2.9754, 3.8677, 2.9754], "confidence": + 1, "span": {"offset": 160, "length": 3}}, {"content": "Date", "boundingBox": + [4.1678, 2.8743, 4.4547, 2.8743, 4.4547, 2.9754, 4.1678, 2.9754], "confidence": + 1, "span": {"offset": 164, "length": 4}}, {"content": "Charges", "boundingBox": + [4.7468, 2.8717, 5.289, 2.8717, 5.289, 3.0035, 4.7468, 3.0035], "confidence": + 1, "span": {"offset": 169, "length": 7}}, {"content": "VAT", "boundingBox": + [6.141, 2.873, 6.4147, 2.873, 6.4147, 2.9736, 6.141, 2.9736], "confidence": + 1, "span": {"offset": 177, "length": 3}}, {"content": "ID", "boundingBox": + [6.4655, 2.873, 6.5875, 2.873, 6.5875, 2.9736, 6.4655, 2.9736], "confidence": + 1, "span": {"offset": 181, "length": 2}}, {"content": "34278587", "boundingBox": + [0.5397, 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], "confidence": + 1, "span": {"offset": 184, "length": 8}}, {"content": "6/18/2017", "boundingBox": + [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, 1.9455, 3.5144], "confidence": + 1, "span": {"offset": 193, "length": 9}}, {"content": "6/24/2017", "boundingBox": + [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, 3.346, 3.5144], "confidence": + 1, "span": {"offset": 203, "length": 9}}, {"content": "$56,651.49", "boundingBox": + [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321], "confidence": + 1, "span": {"offset": 213, "length": 10}}, {"content": "PT", "boundingBox": + [6.2285, 3.4114, 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119], "confidence": + 1, "span": {"offset": 224, "length": 2}}], "selectionMarks": [], "lines": + [{"content": "Contoso", "boundingBox": [0.5384, 1.1583, 1.4466, 1.1583, 1.4466, + 1.3534, 0.5384, 1.3534], "spans": [{"offset": 0, "length": 7}]}, {"content": + "Address:", "boundingBox": [0.7994, 1.5143, 1.3836, 1.5143, 1.3836, 1.6154, + 0.7994, 1.6154], "spans": [{"offset": 8, "length": 8}]}, {"content": "1 Redmond + way Suite", "boundingBox": [0.8106, 1.7033, 2.1445, 1.7033, 2.1445, 1.8342, + 0.8106, 1.8342], "spans": [{"offset": 17, "length": 19}]}, {"content": "6000 + Redmond, WA", "boundingBox": [0.8019, 1.896, 2.0384, 1.896, 2.0384, 2.0171, + 0.8019, 2.0171], "spans": [{"offset": 37, "length": 16}]}, {"content": "99243", + "boundingBox": [0.8025, 2.0876, 1.175, 2.0876, 1.175, 2.1911, 0.8025, 2.1911], + "spans": [{"offset": 54, "length": 5}]}, {"content": "Invoice For: Microsoft", + "boundingBox": [4.4033, 1.5114, 5.8155, 1.5114, 5.8155, 1.6155, 4.4033, 1.6155], + "spans": [{"offset": 60, "length": 22}]}, {"content": "1020 Enterprise Way", + "boundingBox": [5.2036, 1.716, 6.5436, 1.716, 6.5436, 1.8459, 5.2036, 1.8459], + "spans": [{"offset": 83, "length": 19}]}, {"content": "Sunnayvale, CA 87659", + "boundingBox": [5.196, 1.9047, 6.6526, 1.9047, 6.6526, 2.0359, 5.196, 2.0359], + "spans": [{"offset": 103, "length": 20}]}, {"content": "Invoice Number", "boundingBox": + [0.5439, 2.8733, 1.5729, 2.8733, 1.5729, 2.9754, 0.5439, 2.9754], "spans": + [{"offset": 124, "length": 14}]}, {"content": "Invoice Date", "boundingBox": + [1.9491, 2.8733, 2.7527, 2.8733, 2.7527, 2.9754, 1.9491, 2.9754], "spans": + [{"offset": 139, "length": 12}]}, {"content": "Invoice Due Date", "boundingBox": + [3.3495, 2.8733, 4.4547, 2.8733, 4.4547, 2.9754, 3.3495, 2.9754], "spans": + [{"offset": 152, "length": 16}]}, {"content": "Charges", "boundingBox": [4.7468, + 2.8717, 5.289, 2.8717, 5.289, 3.0035, 4.7468, 3.0035], "spans": [{"offset": + 169, "length": 7}]}, {"content": "VAT ID", "boundingBox": [6.141, 2.873, 6.5875, + 2.873, 6.5875, 2.9736, 6.141, 2.9736], "spans": [{"offset": 177, "length": + 6}]}, {"content": "34278587", "boundingBox": [0.5397, 3.411, 1.1457, 3.411, + 1.1457, 3.5144, 0.5397, 3.5144], "spans": [{"offset": 184, "length": 8}]}, + {"content": "6/18/2017", "boundingBox": [1.9455, 3.41, 2.551, 3.41, 2.551, + 3.5144, 1.9455, 3.5144], "spans": [{"offset": 193, "length": 9}]}, {"content": + "6/24/2017", "boundingBox": [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, 3.346, + 3.5144], "spans": [{"offset": 203, "length": 9}]}, {"content": "$56,651.49", + "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321], + "spans": [{"offset": 213, "length": 10}]}, {"content": "PT", "boundingBox": + [6.2285, 3.4114, 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119], "spans": + [{"offset": 224, "length": 2}]}], "spans": [{"offset": 0, "length": 226}]}], + "tables": [{"rowCount": 3, "columnCount": 5, "cells": [{"kind": "columnHeader", + "rowIndex": 0, "columnIndex": 0, "rowSpan": 1, "columnSpan": 1, "content": + "Invoice Number", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.497, + 2.7887, 1.9036, 2.7887, 1.8965, 3.3133, 0.5041, 3.3133]}], "spans": [{"offset": + 124, "length": 14}]}, {"kind": "columnHeader", "rowIndex": 0, "columnIndex": + 1, "rowSpan": 1, "columnSpan": 1, "content": "Invoice Date", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1.9036, 2.7887, 3.296, 2.7887, 3.3031, + 3.3205, 1.8965, 3.3133]}], "spans": [{"offset": 139, "length": 12}]}, {"kind": + "columnHeader", "rowIndex": 0, "columnIndex": 2, "rowSpan": 1, "columnSpan": + 1, "content": "Invoice Due Date", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [3.296, 2.7887, 4.7026, 2.7887, 4.7026, 3.3205, 3.3031, 3.3205]}], "spans": + [{"offset": 152, "length": 16}]}, {"kind": "columnHeader", "rowIndex": 0, + "columnIndex": 3, "rowSpan": 1, "columnSpan": 1, "content": "Charges", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [4.7026, 2.7887, 6.1021, 2.7887, 6.1021, + 3.3133, 4.7026, 3.3205]}], "spans": [{"offset": 169, "length": 7}]}, {"kind": + "columnHeader", "rowIndex": 0, "columnIndex": 4, "rowSpan": 1, "columnSpan": + 1, "content": "VAT ID", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [6.1021, 2.7887, 7.4945, 2.7887, 7.4945, 3.3133, 6.1021, 3.3133]}], "spans": + [{"offset": 177, "length": 6}]}, {"rowIndex": 1, "columnIndex": 0, "rowSpan": + 2, "columnSpan": 1, "content": "34278587", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [0.5041, 3.3133, 1.8965, 3.3133, 1.8965, 3.8523, 0.5113, + 3.8523]}], "spans": [{"offset": 184, "length": 8}]}, {"rowIndex": 1, "columnIndex": + 1, "rowSpan": 2, "columnSpan": 1, "content": "6/18/2017", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1.8965, 3.3133, 3.3031, 3.3205, 3.3031, + 3.8523, 1.8965, 3.8523]}], "spans": [{"offset": 193, "length": 9}]}, {"rowIndex": + 1, "columnIndex": 2, "rowSpan": 2, "columnSpan": 1, "content": "6/24/2017", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [3.3031, 3.3205, 4.7026, + 3.3205, 4.7026, 3.8523, 3.3031, 3.8523]}], "spans": [{"offset": 203, "length": + 9}]}, {"rowIndex": 1, "columnIndex": 3, "rowSpan": 2, "columnSpan": 1, "content": + "$56,651.49", "boundingRegions": [{"pageNumber": 1, "boundingBox": [4.7026, + 3.3205, 6.1021, 3.3133, 6.1021, 3.8523, 4.7026, 3.8523]}], "spans": [{"offset": + 213, "length": 10}]}, {"rowIndex": 1, "columnIndex": 4, "rowSpan": 2, "columnSpan": + 1, "content": "PT", "boundingRegions": [{"pageNumber": 1, "boundingBox": [6.1021, + 3.3133, 7.4945, 3.3133, 7.4945, 3.8523, 6.1021, 3.8523]}], "spans": [{"offset": + 224, "length": 2}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.5052, 2.7836, 7.4995, 2.7844, 7.4985, 3.8596, 0.5038, 3.859]}], "spans": + [{"offset": 124, "length": 102}]}], "keyValuePairs": [{"key": {"content": + "Address:", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.7994, + 1.5143, 1.3836, 1.5143, 1.3836, 1.6154, 0.7994, 1.6154]}], "spans": [{"offset": + 8, "length": 8}]}, "value": {"content": "1 Redmond way Suite 6000 Redmond, + WA 99243", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.8019, 1.7033, + 2.1445, 1.7033, 2.1445, 2.1911, 0.8019, 2.1911]}], "spans": [{"offset": 17, + "length": 42}]}, "confidence": 0.959}, {"key": {"content": "Invoice For:", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [4.4033, 1.5143, 5.1013, + 1.5143, 5.1013, 1.6155, 4.4033, 1.6155]}], "spans": [{"offset": 60, "length": + 12}]}, "value": {"content": "Microsoft 1020 Enterprise Way Sunnayvale, CA + 87659", "boundingRegions": [{"pageNumber": 1, "boundingBox": [5.196, 1.5114, + 6.6526, 1.5114, 6.6526, 2.0359, 5.196, 2.0359]}], "spans": [{"offset": 73, + "length": 50}]}, "confidence": 0.761}, {"key": {"content": "Invoice Number", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.5439, 2.8733, 1.5729, + 2.8733, 1.5729, 2.9754, 0.5439, 2.9754]}], "spans": [{"offset": 124, "length": + 14}]}, "value": {"content": "34278587", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [0.5397, 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144]}], + "spans": [{"offset": 184, "length": 8}]}, "confidence": 0.972}, {"key": {"content": + "Invoice Date", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1.9491, + 2.8733, 2.7527, 2.8733, 2.7527, 2.9754, 1.9491, 2.9754]}], "spans": [{"offset": + 139, "length": 12}]}, "value": {"content": "6/18/2017", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, + 1.9455, 3.5144]}], "spans": [{"offset": 193, "length": 9}]}, "confidence": + 0.972}, {"key": {"content": "Invoice Due Date", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [3.3495, 2.8733, 4.4547, 2.8733, 4.4547, 2.9754, 3.3495, + 2.9754]}], "spans": [{"offset": 152, "length": 16}]}, "value": {"content": + "6/24/2017", "boundingRegions": [{"pageNumber": 1, "boundingBox": [3.346, + 3.41, 3.9514, 3.41, 3.9514, 3.5144, 3.346, 3.5144]}], "spans": [{"offset": + 203, "length": 9}]}, "confidence": 0.951}, {"key": {"content": "Charges", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [4.7468, 2.8717, 5.289, + 2.8717, 5.289, 3.0035, 4.7468, 3.0035]}], "spans": [{"offset": 169, "length": + 7}]}, "value": {"content": "$56,651.49", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, + 3.5321]}], "spans": [{"offset": 213, "length": 10}]}, "confidence": 0.339}, + {"key": {"content": "VAT ID", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [6.141, 2.873, 6.5875, 2.873, 6.5875, 2.9736, 6.141, 2.9736]}], "spans": [{"offset": + 177, "length": 6}]}, "value": {"content": "PT", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [6.2285, 3.4114, 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, + 3.5119]}], "spans": [{"offset": 224, "length": 2}]}, "confidence": 0.972}], + "entities": [{"category": "Quantity", "subCategory": "Number", "content": + "34278587", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.5397, + 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144]}], "confidence": 0.8, + "spans": [{"offset": 184, "length": 8}]}, {"category": "DateTime", "subCategory": + "Date", "content": "6/18/2017", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, 1.9455, 3.5144]}], "confidence": + 0.8, "spans": [{"offset": 193, "length": 9}]}, {"category": "DateTime", "subCategory": + "Date", "content": "6/24/2017", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, 3.346, 3.5144]}], "confidence": + 0.8, "spans": [{"offset": 203, "length": 9}]}, {"category": "Quantity", "subCategory": + "Currency", "content": "$56,651.49", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321]}], + "confidence": 0.8, "spans": [{"offset": 213, "length": 10}]}, {"category": + "Organization", "content": "PT", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [6.2285, 3.4114, 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119]}], "confidence": + 0.91, "spans": [{"offset": 224, "length": 2}]}, {"category": "Organization", + "content": "Contoso", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.5384, 1.1583, 1.4466, 1.1583, 1.4466, 1.3534, 0.5384, 1.3534]}], "confidence": + 0.44, "spans": [{"offset": 0, "length": 7}]}, {"category": "Address", "content": + "1 Redmond way Suite 6000 Redmond, WA 99243", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [0.8106, 1.7033, 2.1445, 1.7033, 2.1445, 1.8342, 0.8106, + 1.8342]}, {"pageNumber": 1, "boundingBox": [0.8019, 1.896, 2.0384, 1.896, + 2.0384, 2.0171, 0.8019, 2.0171]}, {"pageNumber": 1, "boundingBox": [0.8025, + 2.0876, 1.175, 2.0876, 1.175, 2.1911, 0.8025, 2.1911]}], "confidence": 0.74, + "spans": [{"offset": 17, "length": 42}]}, {"category": "Quantity", "subCategory": + "Number", "content": "1", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.8106, 1.708, 0.8463, 1.708, 0.8463, 1.8053, 0.8106, 1.8053]}], "confidence": + 0.8, "spans": [{"offset": 17, "length": 1}]}, {"category": "Quantity", "subCategory": + "Number", "content": "6000", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.8019, 1.896, 1.0991, 1.896, 1.0991, 1.9994, 0.8019, 1.9994]}], "confidence": + 0.8, "spans": [{"offset": 37, "length": 4}]}, {"category": "Quantity", "subCategory": + "Number", "content": "99243", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.8025, 2.0876, 1.175, 2.0876, 1.175, 2.1911, 0.8025, 2.1911]}], "confidence": + 0.8, "spans": [{"offset": 54, "length": 5}]}, {"category": "Organization", + "content": "Microsoft", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, 1.6151, 5.2045, 1.6151]}], "confidence": + 0.78, "spans": [{"offset": 73, "length": 9}]}, {"category": "Address", "content": + "1020 Enterprise Way Sunnayvale, CA 87659", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [5.2036, 1.716, 6.5436, 1.716, 6.5436, 1.8459, 5.2036, 1.8459]}, + {"pageNumber": 1, "boundingBox": [5.196, 1.9047, 6.6526, 1.9047, 6.6526, 2.0359, + 5.196, 2.0359]}], "confidence": 0.86, "spans": [{"offset": 83, "length": 40}]}, + {"category": "Quantity", "subCategory": "Number", "content": "1020", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [5.2036, 1.716, 5.4935, 1.716, 5.4935, 1.8185, + 5.2036, 1.8185]}], "confidence": 0.8, "spans": [{"offset": 83, "length": 4}]}, + {"category": "Quantity", "subCategory": "Number", "content": "87659", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [6.2801, 1.906, 6.6526, 1.906, 6.6526, 2.0086, + 6.2801, 2.0086]}], "confidence": 0.8, "spans": [{"offset": 118, "length": + 5}]}]}}' + headers: + apim-request-id: + - c74a0f69-42cd-4ffd-afb3-013a511988c9 + content-type: + - application/json; charset=utf-8 + date: + - Fri, 29 Oct 2021 00:43:19 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '427' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_get_children.test_document_line_get_words_error.yaml b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_get_children.test_document_line_get_words_error.yaml new file mode 100644 index 000000000000..e0738cee712b --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/recordings/test_get_children.test_document_line_get_words_error.yaml @@ -0,0 +1,343 @@ +interactions: +- request: + body: '!!! The request body has been omitted from the recording because its size + 147362 is larger than 128KB. !!!' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '147362' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-document:analyze?stringIndexType=unicodeCodePoint&api-version=2021-09-30-preview + response: + body: + string: '' + headers: + apim-request-id: + - 1c4ca5dc-855c-4ffd-923f-8b97944ab3c8 + content-length: + - '0' + date: + - Thu, 04 Nov 2021 22:39:18 GMT + operation-location: + - https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-document/analyzeResults/1c4ca5dc-855c-4ffd-923f-8b97944ab3c8?api-version=2021-09-30-preview + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '361' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-document/analyzeResults/1c4ca5dc-855c-4ffd-923f-8b97944ab3c8?api-version=2021-09-30-preview + response: + body: + string: '{"status": "running", "createdDateTime": "2021-11-04T22:39:18Z", "lastUpdatedDateTime": + "2021-11-04T22:39:18Z"}' + headers: + apim-request-id: + - 929ff3d5-8cd1-4724-a496-5d890a53ab4a + content-type: + - application/json; charset=utf-8 + date: + - Thu, 04 Nov 2021 22:39:23 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '75' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-formrecognizer/3.2.0b2 Python/3.8.5 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://region.api.cognitive.microsoft.com/formrecognizer/documentModels/prebuilt-document/analyzeResults/1c4ca5dc-855c-4ffd-923f-8b97944ab3c8?api-version=2021-09-30-preview + response: + body: + string: '{"status": "succeeded", "createdDateTime": "2021-11-04T22:39:18Z", + "lastUpdatedDateTime": "2021-11-04T22:39:26Z", "analyzeResult": {"apiVersion": + "2021-09-30-preview", "modelId": "prebuilt-document", "stringIndexType": "unicodeCodePoint", + "content": "Contoso\nAddress:\n1 Redmond way Suite\n6000 Redmond, WA\n99243\nInvoice + For: Microsoft\n1020 Enterprise Way\nSunnayvale, CA 87659\nInvoice Number\nInvoice + Date\nInvoice Due Date\nCharges\nVAT ID\n34278587\n6/18/2017\n6/24/2017\n$56,651.49\nPT", + "pages": [{"pageNumber": 1, "angle": 0, "width": 8.5, "height": 11, "unit": + "inch", "words": [{"content": "Contoso", "boundingBox": [0.5384, 1.1583, 1.4466, + 1.1583, 1.4466, 1.3534, 0.5384, 1.3534], "confidence": 1, "span": {"offset": + 0, "length": 7}}, {"content": "Address:", "boundingBox": [0.7994, 1.5143, + 1.3836, 1.5143, 1.3836, 1.6154, 0.7994, 1.6154], "confidence": 1, "span": + {"offset": 8, "length": 8}}, {"content": "1", "boundingBox": [0.8106, 1.708, + 0.8463, 1.708, 0.8463, 1.8053, 0.8106, 1.8053], "confidence": 1, "span": {"offset": + 17, "length": 1}}, {"content": "Redmond", "boundingBox": [0.923, 1.7047, 1.5018, + 1.7047, 1.5018, 1.8068, 0.923, 1.8068], "confidence": 1, "span": {"offset": + 19, "length": 7}}, {"content": "way", "boundingBox": [1.5506, 1.7309, 1.7949, + 1.7309, 1.7949, 1.8342, 1.5506, 1.8342], "confidence": 1, "span": {"offset": + 27, "length": 3}}, {"content": "Suite", "boundingBox": [1.8415, 1.7033, 2.1445, + 1.7033, 2.1445, 1.8078, 1.8415, 1.8078], "confidence": 1, "span": {"offset": + 31, "length": 5}}, {"content": "6000", "boundingBox": [0.8019, 1.896, 1.0991, + 1.896, 1.0991, 1.9994, 0.8019, 1.9994], "confidence": 1, "span": {"offset": + 37, "length": 4}}, {"content": "Redmond,", "boundingBox": [1.1537, 1.8964, + 1.7689, 1.8964, 1.7689, 2.0171, 1.1537, 2.0171], "confidence": 1, "span": + {"offset": 42, "length": 8}}, {"content": "WA", "boundingBox": [1.8196, 1.8976, + 2.0384, 1.8976, 2.0384, 1.9969, 1.8196, 1.9969], "confidence": 1, "span": + {"offset": 51, "length": 2}}, {"content": "99243", "boundingBox": [0.8025, + 2.0876, 1.175, 2.0876, 1.175, 2.1911, 0.8025, 2.1911], "confidence": 1, "span": + {"offset": 54, "length": 5}}, {"content": "Invoice", "boundingBox": [4.4033, + 1.5143, 4.8234, 1.5143, 4.8234, 1.6155, 4.4033, 1.6155], "confidence": 1, + "span": {"offset": 60, "length": 7}}, {"content": "For:", "boundingBox": [4.8793, + 1.5143, 5.1013, 1.5143, 5.1013, 1.6154, 4.8793, 1.6154], "confidence": 1, + "span": {"offset": 68, "length": 4}}, {"content": "Microsoft", "boundingBox": + [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, 1.6151, 5.2045, 1.6151], "confidence": + 1, "span": {"offset": 73, "length": 9}}, {"content": "1020", "boundingBox": + [5.2036, 1.716, 5.4935, 1.716, 5.4935, 1.8185, 5.2036, 1.8185], "confidence": + 1, "span": {"offset": 83, "length": 4}}, {"content": "Enterprise", "boundingBox": + [5.5488, 1.7164, 6.2178, 1.7164, 6.2178, 1.8441, 5.5488, 1.8441], "confidence": + 1, "span": {"offset": 88, "length": 10}}, {"content": "Way", "boundingBox": + [6.2618, 1.7164, 6.5436, 1.7164, 6.5436, 1.8459, 6.2618, 1.8459], "confidence": + 1, "span": {"offset": 99, "length": 3}}, {"content": "Sunnayvale,", "boundingBox": + [5.196, 1.9047, 5.9894, 1.9047, 5.9894, 2.0359, 5.196, 2.0359], "confidence": + 1, "span": {"offset": 103, "length": 11}}, {"content": "CA", "boundingBox": + [6.0427, 1.9047, 6.2354, 1.9047, 6.2354, 2.0085, 6.0427, 2.0085], "confidence": + 1, "span": {"offset": 115, "length": 2}}, {"content": "87659", "boundingBox": + [6.2801, 1.906, 6.6526, 1.906, 6.6526, 2.0086, 6.2801, 2.0086], "confidence": + 1, "span": {"offset": 118, "length": 5}}, {"content": "Invoice", "boundingBox": + [0.5439, 2.8733, 1.0098, 2.8733, 1.0098, 2.9754, 0.5439, 2.9754], "confidence": + 1, "span": {"offset": 124, "length": 7}}, {"content": "Number", "boundingBox": + [1.0611, 2.8743, 1.5729, 2.8743, 1.5729, 2.9754, 1.0611, 2.9754], "confidence": + 1, "span": {"offset": 132, "length": 6}}, {"content": "Invoice", "boundingBox": + [1.9491, 2.8733, 2.415, 2.8733, 2.415, 2.9754, 1.9491, 2.9754], "confidence": + 1, "span": {"offset": 139, "length": 7}}, {"content": "Date", "boundingBox": + [2.4673, 2.8743, 2.7527, 2.8743, 2.7527, 2.9754, 2.4673, 2.9754], "confidence": + 1, "span": {"offset": 147, "length": 4}}, {"content": "Invoice", "boundingBox": + [3.3495, 2.8733, 3.8155, 2.8733, 3.8155, 2.9754, 3.3495, 2.9754], "confidence": + 1, "span": {"offset": 152, "length": 7}}, {"content": "Due", "boundingBox": + [3.8677, 2.8743, 4.1149, 2.8743, 4.1149, 2.9754, 3.8677, 2.9754], "confidence": + 1, "span": {"offset": 160, "length": 3}}, {"content": "Date", "boundingBox": + [4.1678, 2.8743, 4.4547, 2.8743, 4.4547, 2.9754, 4.1678, 2.9754], "confidence": + 1, "span": {"offset": 164, "length": 4}}, {"content": "Charges", "boundingBox": + [4.7468, 2.8717, 5.289, 2.8717, 5.289, 3.0035, 4.7468, 3.0035], "confidence": + 1, "span": {"offset": 169, "length": 7}}, {"content": "VAT", "boundingBox": + [6.141, 2.873, 6.4147, 2.873, 6.4147, 2.9736, 6.141, 2.9736], "confidence": + 1, "span": {"offset": 177, "length": 3}}, {"content": "ID", "boundingBox": + [6.4655, 2.873, 6.5875, 2.873, 6.5875, 2.9736, 6.4655, 2.9736], "confidence": + 1, "span": {"offset": 181, "length": 2}}, {"content": "34278587", "boundingBox": + [0.5397, 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144], "confidence": + 1, "span": {"offset": 184, "length": 8}}, {"content": "6/18/2017", "boundingBox": + [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, 1.9455, 3.5144], "confidence": + 1, "span": {"offset": 193, "length": 9}}, {"content": "6/24/2017", "boundingBox": + [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, 3.346, 3.5144], "confidence": + 1, "span": {"offset": 203, "length": 9}}, {"content": "$56,651.49", "boundingBox": + [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321], "confidence": + 1, "span": {"offset": 213, "length": 10}}, {"content": "PT", "boundingBox": + [6.2285, 3.4114, 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119], "confidence": + 1, "span": {"offset": 224, "length": 2}}], "selectionMarks": [], "lines": + [{"content": "Contoso", "boundingBox": [0.5384, 1.1583, 1.4466, 1.1583, 1.4466, + 1.3534, 0.5384, 1.3534], "spans": [{"offset": 0, "length": 7}]}, {"content": + "Address:", "boundingBox": [0.7994, 1.5143, 1.3836, 1.5143, 1.3836, 1.6154, + 0.7994, 1.6154], "spans": [{"offset": 8, "length": 8}]}, {"content": "1 Redmond + way Suite", "boundingBox": [0.8106, 1.7033, 2.1445, 1.7033, 2.1445, 1.8342, + 0.8106, 1.8342], "spans": [{"offset": 17, "length": 19}]}, {"content": "6000 + Redmond, WA", "boundingBox": [0.8019, 1.896, 2.0384, 1.896, 2.0384, 2.0171, + 0.8019, 2.0171], "spans": [{"offset": 37, "length": 16}]}, {"content": "99243", + "boundingBox": [0.8025, 2.0876, 1.175, 2.0876, 1.175, 2.1911, 0.8025, 2.1911], + "spans": [{"offset": 54, "length": 5}]}, {"content": "Invoice For: Microsoft", + "boundingBox": [4.4033, 1.5114, 5.8155, 1.5114, 5.8155, 1.6155, 4.4033, 1.6155], + "spans": [{"offset": 60, "length": 22}]}, {"content": "1020 Enterprise Way", + "boundingBox": [5.2036, 1.716, 6.5436, 1.716, 6.5436, 1.8459, 5.2036, 1.8459], + "spans": [{"offset": 83, "length": 19}]}, {"content": "Sunnayvale, CA 87659", + "boundingBox": [5.196, 1.9047, 6.6526, 1.9047, 6.6526, 2.0359, 5.196, 2.0359], + "spans": [{"offset": 103, "length": 20}]}, {"content": "Invoice Number", "boundingBox": + [0.5439, 2.8733, 1.5729, 2.8733, 1.5729, 2.9754, 0.5439, 2.9754], "spans": + [{"offset": 124, "length": 14}]}, {"content": "Invoice Date", "boundingBox": + [1.9491, 2.8733, 2.7527, 2.8733, 2.7527, 2.9754, 1.9491, 2.9754], "spans": + [{"offset": 139, "length": 12}]}, {"content": "Invoice Due Date", "boundingBox": + [3.3495, 2.8733, 4.4547, 2.8733, 4.4547, 2.9754, 3.3495, 2.9754], "spans": + [{"offset": 152, "length": 16}]}, {"content": "Charges", "boundingBox": [4.7468, + 2.8717, 5.289, 2.8717, 5.289, 3.0035, 4.7468, 3.0035], "spans": [{"offset": + 169, "length": 7}]}, {"content": "VAT ID", "boundingBox": [6.141, 2.873, 6.5875, + 2.873, 6.5875, 2.9736, 6.141, 2.9736], "spans": [{"offset": 177, "length": + 6}]}, {"content": "34278587", "boundingBox": [0.5397, 3.411, 1.1457, 3.411, + 1.1457, 3.5144, 0.5397, 3.5144], "spans": [{"offset": 184, "length": 8}]}, + {"content": "6/18/2017", "boundingBox": [1.9455, 3.41, 2.551, 3.41, 2.551, + 3.5144, 1.9455, 3.5144], "spans": [{"offset": 193, "length": 9}]}, {"content": + "6/24/2017", "boundingBox": [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, 3.346, + 3.5144], "spans": [{"offset": 203, "length": 9}]}, {"content": "$56,651.49", + "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321], + "spans": [{"offset": 213, "length": 10}]}, {"content": "PT", "boundingBox": + [6.2285, 3.4114, 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119], "spans": + [{"offset": 224, "length": 2}]}], "spans": [{"offset": 0, "length": 226}]}], + "tables": [{"rowCount": 3, "columnCount": 5, "cells": [{"kind": "columnHeader", + "rowIndex": 0, "columnIndex": 0, "rowSpan": 1, "columnSpan": 1, "content": + "Invoice Number", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.497, + 2.7887, 1.9036, 2.7887, 1.8965, 3.3133, 0.5041, 3.3133]}], "spans": [{"offset": + 124, "length": 14}]}, {"kind": "columnHeader", "rowIndex": 0, "columnIndex": + 1, "rowSpan": 1, "columnSpan": 1, "content": "Invoice Date", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1.9036, 2.7887, 3.296, 2.7887, 3.3031, + 3.3205, 1.8965, 3.3133]}], "spans": [{"offset": 139, "length": 12}]}, {"kind": + "columnHeader", "rowIndex": 0, "columnIndex": 2, "rowSpan": 1, "columnSpan": + 1, "content": "Invoice Due Date", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [3.296, 2.7887, 4.7026, 2.7887, 4.7026, 3.3205, 3.3031, 3.3205]}], "spans": + [{"offset": 152, "length": 16}]}, {"kind": "columnHeader", "rowIndex": 0, + "columnIndex": 3, "rowSpan": 1, "columnSpan": 1, "content": "Charges", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [4.7026, 2.7887, 6.1021, 2.7887, 6.1021, + 3.3133, 4.7026, 3.3205]}], "spans": [{"offset": 169, "length": 7}]}, {"kind": + "columnHeader", "rowIndex": 0, "columnIndex": 4, "rowSpan": 1, "columnSpan": + 1, "content": "VAT ID", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [6.1021, 2.7887, 7.4945, 2.7887, 7.4945, 3.3133, 6.1021, 3.3133]}], "spans": + [{"offset": 177, "length": 6}]}, {"rowIndex": 1, "columnIndex": 0, "rowSpan": + 2, "columnSpan": 1, "content": "34278587", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [0.5041, 3.3133, 1.8965, 3.3133, 1.8965, 3.8523, 0.5113, + 3.8523]}], "spans": [{"offset": 184, "length": 8}]}, {"rowIndex": 1, "columnIndex": + 1, "rowSpan": 2, "columnSpan": 1, "content": "6/18/2017", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1.8965, 3.3133, 3.3031, 3.3205, 3.3031, + 3.8523, 1.8965, 3.8523]}], "spans": [{"offset": 193, "length": 9}]}, {"rowIndex": + 1, "columnIndex": 2, "rowSpan": 2, "columnSpan": 1, "content": "6/24/2017", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [3.3031, 3.3205, 4.7026, + 3.3205, 4.7026, 3.8523, 3.3031, 3.8523]}], "spans": [{"offset": 203, "length": + 9}]}, {"rowIndex": 1, "columnIndex": 3, "rowSpan": 2, "columnSpan": 1, "content": + "$56,651.49", "boundingRegions": [{"pageNumber": 1, "boundingBox": [4.7026, + 3.3205, 6.1021, 3.3133, 6.1021, 3.8523, 4.7026, 3.8523]}], "spans": [{"offset": + 213, "length": 10}]}, {"rowIndex": 1, "columnIndex": 4, "rowSpan": 2, "columnSpan": + 1, "content": "PT", "boundingRegions": [{"pageNumber": 1, "boundingBox": [6.1021, + 3.3133, 7.4945, 3.3133, 7.4945, 3.8523, 6.1021, 3.8523]}], "spans": [{"offset": + 224, "length": 2}]}], "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.5052, 2.7836, 7.4995, 2.7844, 7.4985, 3.8596, 0.5038, 3.859]}], "spans": + [{"offset": 124, "length": 102}]}], "keyValuePairs": [{"key": {"content": + "Address:", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.7994, + 1.5143, 1.3836, 1.5143, 1.3836, 1.6154, 0.7994, 1.6154]}], "spans": [{"offset": + 8, "length": 8}]}, "value": {"content": "1 Redmond way Suite 6000 Redmond, + WA 99243", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.8019, 1.7033, + 2.1445, 1.7033, 2.1445, 2.1911, 0.8019, 2.1911]}], "spans": [{"offset": 17, + "length": 42}]}, "confidence": 0.959}, {"key": {"content": "Invoice For:", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [4.4033, 1.5143, 5.1013, + 1.5143, 5.1013, 1.6155, 4.4033, 1.6155]}], "spans": [{"offset": 60, "length": + 12}]}, "value": {"content": "Microsoft 1020 Enterprise Way Sunnayvale, CA + 87659", "boundingRegions": [{"pageNumber": 1, "boundingBox": [5.196, 1.5114, + 6.6526, 1.5114, 6.6526, 2.0359, 5.196, 2.0359]}], "spans": [{"offset": 73, + "length": 50}]}, "confidence": 0.761}, {"key": {"content": "Invoice Number", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.5439, 2.8733, 1.5729, + 2.8733, 1.5729, 2.9754, 0.5439, 2.9754]}], "spans": [{"offset": 124, "length": + 14}]}, "value": {"content": "34278587", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [0.5397, 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144]}], + "spans": [{"offset": 184, "length": 8}]}, "confidence": 0.972}, {"key": {"content": + "Invoice Date", "boundingRegions": [{"pageNumber": 1, "boundingBox": [1.9491, + 2.8733, 2.7527, 2.8733, 2.7527, 2.9754, 1.9491, 2.9754]}], "spans": [{"offset": + 139, "length": 12}]}, "value": {"content": "6/18/2017", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, + 1.9455, 3.5144]}], "spans": [{"offset": 193, "length": 9}]}, "confidence": + 0.972}, {"key": {"content": "Invoice Due Date", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [3.3495, 2.8733, 4.4547, 2.8733, 4.4547, 2.9754, 3.3495, + 2.9754]}], "spans": [{"offset": 152, "length": 16}]}, "value": {"content": + "6/24/2017", "boundingRegions": [{"pageNumber": 1, "boundingBox": [3.346, + 3.41, 3.9514, 3.41, 3.9514, 3.5144, 3.346, 3.5144]}], "spans": [{"offset": + 203, "length": 9}]}, "confidence": 0.951}, {"key": {"content": "Charges", + "boundingRegions": [{"pageNumber": 1, "boundingBox": [4.7468, 2.8717, 5.289, + 2.8717, 5.289, 3.0035, 4.7468, 3.0035]}], "spans": [{"offset": 169, "length": + 7}]}, "value": {"content": "$56,651.49", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, + 3.5321]}], "spans": [{"offset": 213, "length": 10}]}, "confidence": 0.339}, + {"key": {"content": "VAT ID", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [6.141, 2.873, 6.5875, 2.873, 6.5875, 2.9736, 6.141, 2.9736]}], "spans": [{"offset": + 177, "length": 6}]}, "value": {"content": "PT", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [6.2285, 3.4114, 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, + 3.5119]}], "spans": [{"offset": 224, "length": 2}]}, "confidence": 0.972}], + "entities": [{"category": "Quantity", "subCategory": "Number", "content": + "34278587", "boundingRegions": [{"pageNumber": 1, "boundingBox": [0.5397, + 3.411, 1.1457, 3.411, 1.1457, 3.5144, 0.5397, 3.5144]}], "confidence": 0.8, + "spans": [{"offset": 184, "length": 8}]}, {"category": "DateTime", "subCategory": + "Date", "content": "6/18/2017", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [1.9455, 3.41, 2.551, 3.41, 2.551, 3.5144, 1.9455, 3.5144]}], "confidence": + 0.8, "spans": [{"offset": 193, "length": 9}]}, {"category": "DateTime", "subCategory": + "Date", "content": "6/24/2017", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [3.346, 3.41, 3.9514, 3.41, 3.9514, 3.5144, 3.346, 3.5144]}], "confidence": + 0.8, "spans": [{"offset": 203, "length": 9}]}, {"category": "Quantity", "subCategory": + "Currency", "content": "$56,651.49", "boundingRegions": [{"pageNumber": 1, + "boundingBox": [5.3871, 3.4047, 6.0702, 3.4047, 6.0702, 3.5321, 5.3871, 3.5321]}], + "confidence": 0.8, "spans": [{"offset": 213, "length": 10}]}, {"category": + "Organization", "content": "PT", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [6.2285, 3.4114, 6.3919, 3.4114, 6.3919, 3.5119, 6.2285, 3.5119]}], "confidence": + 0.91, "spans": [{"offset": 224, "length": 2}]}, {"category": "Organization", + "content": "Contoso", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.5384, 1.1583, 1.4466, 1.1583, 1.4466, 1.3534, 0.5384, 1.3534]}], "confidence": + 0.44, "spans": [{"offset": 0, "length": 7}]}, {"category": "Address", "content": + "1 Redmond way Suite 6000 Redmond, WA 99243", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [0.8106, 1.7033, 2.1445, 1.7033, 2.1445, 1.8342, 0.8106, + 1.8342]}, {"pageNumber": 1, "boundingBox": [0.8019, 1.896, 2.0384, 1.896, + 2.0384, 2.0171, 0.8019, 2.0171]}, {"pageNumber": 1, "boundingBox": [0.8025, + 2.0876, 1.175, 2.0876, 1.175, 2.1911, 0.8025, 2.1911]}], "confidence": 0.74, + "spans": [{"offset": 17, "length": 42}]}, {"category": "Quantity", "subCategory": + "Number", "content": "1", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.8106, 1.708, 0.8463, 1.708, 0.8463, 1.8053, 0.8106, 1.8053]}], "confidence": + 0.8, "spans": [{"offset": 17, "length": 1}]}, {"category": "Quantity", "subCategory": + "Number", "content": "6000", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.8019, 1.896, 1.0991, 1.896, 1.0991, 1.9994, 0.8019, 1.9994]}], "confidence": + 0.8, "spans": [{"offset": 37, "length": 4}]}, {"category": "Quantity", "subCategory": + "Number", "content": "99243", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [0.8025, 2.0876, 1.175, 2.0876, 1.175, 2.1911, 0.8025, 2.1911]}], "confidence": + 0.8, "spans": [{"offset": 54, "length": 5}]}, {"category": "Organization", + "content": "Microsoft", "boundingRegions": [{"pageNumber": 1, "boundingBox": + [5.2045, 1.5114, 5.8155, 1.5114, 5.8155, 1.6151, 5.2045, 1.6151]}], "confidence": + 0.78, "spans": [{"offset": 73, "length": 9}]}, {"category": "Address", "content": + "1020 Enterprise Way Sunnayvale, CA 87659", "boundingRegions": [{"pageNumber": + 1, "boundingBox": [5.2036, 1.716, 6.5436, 1.716, 6.5436, 1.8459, 5.2036, 1.8459]}, + {"pageNumber": 1, "boundingBox": [5.196, 1.9047, 6.6526, 1.9047, 6.6526, 2.0359, + 5.196, 2.0359]}], "confidence": 0.86, "spans": [{"offset": 83, "length": 40}]}, + {"category": "Quantity", "subCategory": "Number", "content": "1020", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [5.2036, 1.716, 5.4935, 1.716, 5.4935, 1.8185, + 5.2036, 1.8185]}], "confidence": 0.8, "spans": [{"offset": 83, "length": 4}]}, + {"category": "Quantity", "subCategory": "Number", "content": "87659", "boundingRegions": + [{"pageNumber": 1, "boundingBox": [6.2801, 1.906, 6.6526, 1.906, 6.6526, 2.0086, + 6.2801, 2.0086]}], "confidence": 0.8, "spans": [{"offset": 118, "length": + 5}]}]}}' + headers: + apim-request-id: + - 79f97aa6-57de-4bea-8687-41e391b98839 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 04 Nov 2021 22:39:29 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '449' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py index 8e53ad289759..807894100e66 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms.py @@ -465,3 +465,26 @@ def test_pages_kwarg_specified(self, client, formrecognizer_storage_container_sa assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = poller.result() assert result + + + @FormRecognizerPreparer() + @DocumentModelAdministrationClientPreparer() + def test_custom_document_signature_field(self, client, formrecognizer_storage_container_sas_url): + fr_client = client.get_document_analysis_client() + + with open(self.form_jpg, "rb") as fd: + myfile = fd.read() + + build_polling = client.begin_build_model(formrecognizer_storage_container_sas_url) + model = build_polling.result() + + poller = fr_client.begin_analyze_document( + model.model_id, + myfile, + ) + result = poller.result() + + assert result.documents[0].fields.get("FullSignature").value == "signed" + assert result.documents[0].fields.get("FullSignature").value_type == "signature" + # this will notify us of changes in the service, currently expecting to get a None content for signature type fields + assert result.documents[0].fields.get("FullSignature").content == None diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py index adeb0c8223b4..20aa917eca1f 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_custom_forms_async.py @@ -414,3 +414,27 @@ async def test_pages_kwarg_specified(self, client, formrecognizer_storage_contai assert '1' == poller._polling_method._initial_response.http_response.request.query['pages'] result = await poller.result() assert result + + @FormRecognizerPreparer() + @DocumentModelAdministrationClientPreparer() + async def test_custom_document_signature_field(self, client, formrecognizer_storage_container_sas_url): + fr_client = client.get_document_analysis_client() + + with open(self.form_jpg, "rb") as fd: + myfile = fd.read() + + async with client: + build_polling = await client.begin_build_model(formrecognizer_storage_container_sas_url) + model = await build_polling.result() + + async with fr_client: + poller = await fr_client.begin_analyze_document( + model.model_id, + myfile, + ) + result = await poller.result() + + assert result.documents[0].fields.get("FullSignature").value == "signed" + assert result.documents[0].fields.get("FullSignature").value_type == "signature" + # this will notify us of changes in the service, currently expecting to get a None content for signature type fields + assert result.documents[0].fields.get("FullSignature").content == None diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_get_children.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_get_children.py new file mode 100644 index 000000000000..9bae8b9ed123 --- /dev/null +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_get_children.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# ------------------------------------ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# ------------------------------------ + +import functools +from azure.ai.formrecognizer import DocumentAnalysisClient, DocumentLine, AnalyzeResult +from preparers import FormRecognizerPreparer +from testcase import FormRecognizerTest +from preparers import GlobalClientPreparer as _GlobalClientPreparer + + +DocumentAnalysisClientPreparer = functools.partial(_GlobalClientPreparer, DocumentAnalysisClient) + + +class TestGetChildren(FormRecognizerTest): + + @FormRecognizerPreparer() + @DocumentAnalysisClientPreparer() + def test_document_line_get_words(self, client): + with open(self.invoice_pdf, "rb") as fd: + document = fd.read() + + poller = client.begin_analyze_document("prebuilt-document", document) + result = poller.result() + + elements = result.pages[0].lines[0].get_words() + assert len(elements) == 1 + assert elements[0].content == "Contoso" + + @FormRecognizerPreparer() + @DocumentAnalysisClientPreparer() + def test_document_line_get_words_error(self, client): + with open(self.invoice_pdf, "rb") as fd: + document = fd.read() + + poller = client.begin_analyze_document("prebuilt-document", document) + result = poller.result() + + # check the error occurs when converting a larger element that encompasses a document line + d = result.to_dict() + analyze_result = AnalyzeResult.from_dict(d) + + with self.assertRaises(ValueError): + elements = analyze_result.pages[0].lines[0].get_words() + + # check that the error occurs when directly converting a DocumentLine from a dict + d = result.pages[0].lines[0].to_dict() + line = DocumentLine.from_dict(d) + with self.assertRaises(ValueError): + elements = line.get_words() diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py index a2e8de9d9bbd..84fd5a825534 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_repr.py @@ -147,8 +147,8 @@ def bounding_region(bounding_box): @pytest.fixture def document_element(bounding_box): - model = _models.DocumentElement(content="content", kind="word", bounding_box=bounding_box[0]) - model_repr = "DocumentElement(content=content, bounding_box={}, kind=word)".format(bounding_box[1]) + model = _models.DocumentContentElement(content="content", kind="word", bounding_box=bounding_box[0]) + model_repr = "DocumentContentElement(content=content, bounding_box={}, kind=word)".format(bounding_box[1]) assert repr(model) == model_repr return model, model_repr diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py index e465585c706f..593503d62b12 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/test_to_dict_v3.py @@ -53,8 +53,8 @@ def test_document_span_to_dict(self): } assert d == final - def test_document_element_to_dict(self): - model = _models.DocumentElement( + def test_document_content_element_to_dict(self): + model = _models.DocumentContentElement( content="sample", bounding_box=[ _models.Point(1427.0, 1669.0), @@ -62,7 +62,12 @@ def test_document_element_to_dict(self): _models.Point(1527.0, 1698.0), _models.Point(1427.0, 1698.0), ], + span=_models.DocumentSpan( + offset=5, + length=2, + ), kind="word", + confidence=0.99, ) d = model.to_dict() @@ -74,6 +79,11 @@ def test_document_element_to_dict(self): {"x": 1527.0, "y": 1698.0}, {"x": 1427.0, "y": 1698.0}, ], + "span": { + "offset": 5, + "length": 2, + }, + "confidence": 0.99, "kind": "word", } assert d == final @@ -890,6 +900,57 @@ def test_document_table_cell_to_dict(self): assert d == final + def test_document_table_cell_to_dict_use_defaults(self): + # NOTE: kind, column_span, and row_span are not included on purpose to test that the proper defaults are set. + model = _models.DocumentTableCell( + row_index=2, + column_index=3, + content="cell content", + bounding_regions=[ + _models.BoundingRegion( + bounding_box=[_models.Point(1, 2), _models.Point(3, 4)], + page_number=1, + ), + ], + spans=[ + _models.DocumentSpan( + offset=5, + length=2, + ), + ], + ) + + d = model.to_dict() + + final = { + "kind": "content", + "row_index": 2, + "column_index": 3, + "row_span": 1, + "column_span": 1, + "content": "cell content", + "bounding_regions": [ + { + "page_number": 1, + "bounding_box": [ + {"x": 1, "y": 2}, + { + "x": 3, + "y": 4, + }, + ], + }, + ], + "spans": [ + { + "offset": 5, + "length": 2, + }, + ], + } + + assert d == final + def test_model_operation_info_to_dict(self): model = _models.ModelOperationInfo( operation_id="id123", diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py index 578cc51676db..9797ebe1a3c9 100644 --- a/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py +++ b/sdk/formrecognizer/azure-ai-formrecognizer/tests/testcase.py @@ -698,11 +698,20 @@ def assertDocumentTablesTransformCorrect(self, transformed_tables, raw_tables, * self.assertBoundingRegionsTransformCorrect(table.bounding_regions, expected.bounding_regions) def assertDocumentTableCellTransformCorrect(self, transformed_cell, raw_cell, **kwargs): - assert transformed_cell.kind == raw_cell.kind + if raw_cell.kind: + assert transformed_cell.kind == raw_cell.kind + else: + assert transformed_cell.kind == "content" assert transformed_cell.row_index == raw_cell.row_index assert transformed_cell.column_index == raw_cell.column_index - assert transformed_cell.row_span == raw_cell.row_span - assert transformed_cell.column_span == raw_cell.column_span + if raw_cell.row_span: + assert transformed_cell.row_span == raw_cell.row_span + else: + assert transformed_cell.row_span == 1 + if raw_cell.column_span: + assert transformed_cell.column_span == raw_cell.column_span + else: + assert transformed_cell.column_span == 1 assert transformed_cell.content == raw_cell.content for span, expected_span in zip(transformed_cell.spans or [], raw_cell.spans or []): @@ -764,7 +773,9 @@ def assertDocumentFieldsTransformCorrect(self, document_fields, generated_fields field_type = expected.type assert adjust_value_type(field_type) == document_fields[label].value_type assert expected.confidence == document_fields[label].confidence - assert expected.content == document_fields[label].content + # In the case of content for a signature type field we get '' in expected.content + # vs. None for document_fields[label].content + assert (expected.content == document_fields[label].content) or (expected.content == '' and not document_fields[label].content) self.assertDocumentFieldValueTransformCorrect(document_fields[label], expected) for span, expected_span in zip(document_fields[label].spans or [], expected.spans or []): @@ -800,6 +811,8 @@ def assertDocumentFieldValueTransformCorrect(self, document_field, expected): assert document_field.value == expected.value_selection_mark if field_type == "countryRegion": assert document_field.value == expected.value_country_region + if field_type == "signature": + assert document_field.value == expected.value_signature if field_type == "array": for i in range(len(expected.value_array)): self.assertDocumentFieldValueTransformCorrect(document_field.value[i], expected.value_array[i]) diff --git a/sdk/formrecognizer/tests.yml b/sdk/formrecognizer/tests.yml index 1687afdc4888..ca2136b2c623 100644 --- a/sdk/formrecognizer/tests.yml +++ b/sdk/formrecognizer/tests.yml @@ -4,7 +4,6 @@ stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: BuildTargetingString: azure-ai-formrecognizer - DeployArmTemplate: true ServiceDirectory: formrecognizer TestTimeoutInMinutes: 200 MatrixReplace: diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md index 9bd56bc98d61..49f81deb9e0b 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.1.0 (2021-10-20) + +**Features** + + - Added operation ConnectedClusterOperations.list_cluster_user_credential + ## 1.0.0 (2021-05-19) **Features** diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/_meta.json b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/_meta.json index 267624bb2fb4..defc8cf9c4ab 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/_meta.json +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.3.0", - "use": "@autorest/python@5.6.6", - "commit": "e34c5f11d61ca17fdc9fd0f70446dd54b94d67f1", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "9a19506631005d0ff1e3f394c86a9ce10cf51910", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/hybridkubernetes/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "autorest_command": "autorest specification/hybridkubernetes/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/hybridkubernetes/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_configuration.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_configuration.py index 94b86be667aa..e19d63e4e4c1 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_configuration.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-hybridkubernetes/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_metadata.json b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_metadata.json index f76dc3a23ee3..3d1a7e4eebe5 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_metadata.json +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-03-01", - "total_api_version_list": ["2021-03-01"], + "chosen_version": "2021-10-01", + "total_api_version_list": ["2021-10-01"], "client": { "name": "ConnectedKubernetesClient", "filename": "_connected_kubernetes_client", diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_version.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_version.py index c47f66669f1b..59deb8c7263b 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_version.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0" +VERSION = "1.1.0" diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_configuration.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_configuration.py index f57e8e5affd3..dd7cacfd5154 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_configuration.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-03-01" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-hybridkubernetes/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_connected_cluster_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_connected_cluster_operations.py index 8918c02adb09..eb050e0b0ae1 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_connected_cluster_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_connected_cluster_operations.py @@ -48,14 +48,14 @@ async def _create_initial( resource_group_name: str, cluster_name: str, connected_cluster: "_models.ConnectedCluster", - **kwargs + **kwargs: Any ) -> "_models.ConnectedCluster": cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectedCluster"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -63,7 +63,7 @@ async def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -106,7 +106,7 @@ async def begin_create( resource_group_name: str, cluster_name: str, connected_cluster: "_models.ConnectedCluster", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ConnectedCluster"]: """Register a new Kubernetes cluster with Azure Resource Manager. @@ -121,8 +121,8 @@ async def begin_create( :type connected_cluster: ~connected_kubernetes_client.models.ConnectedCluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ConnectedCluster or the result of cls(response) @@ -157,7 +157,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -180,7 +180,7 @@ async def update( resource_group_name: str, cluster_name: str, connected_cluster_patch: "_models.ConnectedClusterPatch", - **kwargs + **kwargs: Any ) -> "_models.ConnectedCluster": """Updates a connected cluster. @@ -202,7 +202,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -210,7 +210,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -248,7 +248,7 @@ async def get( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> "_models.ConnectedCluster": """Get the properties of the specified connected cluster. @@ -269,14 +269,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -310,21 +310,21 @@ async def _delete_initial( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -355,7 +355,7 @@ async def begin_delete( self, resource_group_name: str, cluster_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete a connected cluster. @@ -367,8 +367,8 @@ async def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -399,7 +399,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -417,10 +417,80 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} # type: ignore + async def list_cluster_user_credential( + self, + resource_group_name: str, + cluster_name: str, + properties: "_models.ListClusterUserCredentialProperties", + **kwargs: Any + ) -> "_models.CredentialResults": + """Gets cluster user credentials of a connected cluster. + + Gets cluster user credentials of the connected cluster with a specified resource group and + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get is called. + :type cluster_name: str + :param properties: ListClusterUserCredential properties. + :type properties: ~connected_kubernetes_client.models.ListClusterUserCredentialProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~connected_kubernetes_client.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credential.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'ListClusterUserCredentialProperties') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential'} # type: ignore + def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ConnectedClusterList"]: """Lists all connected clusters. @@ -438,7 +508,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -451,7 +521,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -492,7 +562,7 @@ async def get_next(next_link=None): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ConnectedClusterList"]: """Lists all connected clusters. @@ -508,7 +578,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_operations.py index d9f99f389f57..e4e03897092f 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def get( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """Lists all of the available API operations for Connected Cluster resource. @@ -57,7 +57,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py index 2c3091d2c8b6..85af76a7c2fb 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/__init__.py @@ -11,9 +11,13 @@ from ._models_py3 import ConnectedClusterIdentity from ._models_py3 import ConnectedClusterList from ._models_py3 import ConnectedClusterPatch + from ._models_py3 import CredentialResult + from ._models_py3 import CredentialResults from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse + from ._models_py3 import HybridConnectionConfig + from ._models_py3 import ListClusterUserCredentialProperties from ._models_py3 import Operation from ._models_py3 import OperationDisplay from ._models_py3 import OperationList @@ -25,9 +29,13 @@ from ._models import ConnectedClusterIdentity # type: ignore from ._models import ConnectedClusterList # type: ignore from ._models import ConnectedClusterPatch # type: ignore + from ._models import CredentialResult # type: ignore + from ._models import CredentialResults # type: ignore from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore + from ._models import HybridConnectionConfig # type: ignore + from ._models import ListClusterUserCredentialProperties # type: ignore from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationList # type: ignore @@ -36,6 +44,7 @@ from ._models import TrackedResource # type: ignore from ._connected_kubernetes_client_enums import ( + AuthenticationMethod, ConnectivityStatus, CreatedByType, LastModifiedByType, @@ -48,15 +57,20 @@ 'ConnectedClusterIdentity', 'ConnectedClusterList', 'ConnectedClusterPatch', + 'CredentialResult', + 'CredentialResults', 'ErrorAdditionalInfo', 'ErrorDetail', 'ErrorResponse', + 'HybridConnectionConfig', + 'ListClusterUserCredentialProperties', 'Operation', 'OperationDisplay', 'OperationList', 'Resource', 'SystemData', 'TrackedResource', + 'AuthenticationMethod', 'ConnectivityStatus', 'CreatedByType', 'LastModifiedByType', diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py index 84f185bf193a..a58b19c6b6c1 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_connected_kubernetes_client_enums.py @@ -26,6 +26,13 @@ def __getattr__(cls, name): raise AttributeError(name) +class AuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The mode of client authentication. + """ + + TOKEN = "Token" + AAD = "AAD" + class ConnectivityStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Represents the connectivity status of the connected cluster. """ diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py index 030d3aba9563..5d3e787ba82a 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models.py @@ -281,12 +281,12 @@ class ConnectedClusterPatch(msrest.serialization.Model): :type tags: dict[str, str] :param properties: Describes the connected cluster resource properties that can be updated during PATCH operation. - :type properties: str + :type properties: any """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( @@ -298,6 +298,67 @@ def __init__( self.properties = kwargs.get('properties', None) +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Sender” access + token. + :vartype hybrid_connection_config: ~connected_kubernetes_client.models.HybridConnectionConfig + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~connected_kubernetes_client.models.CredentialResult] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + class ErrorAdditionalInfo(msrest.serialization.Model): """The resource management error additional info. @@ -306,7 +367,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: str + :vartype info: any """ _validation = { @@ -316,7 +377,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( @@ -392,6 +453,78 @@ def __init__( self.error = kwargs.get('error', None) +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class ListClusterUserCredentialProperties(msrest.serialization.Model): + """ListClusterUserCredentialProperties. + + All required parameters must be populated in order to send to Azure. + + :param authentication_method: Required. The mode of client authentication. Possible values + include: "Token", "AAD". + :type authentication_method: str or ~connected_kubernetes_client.models.AuthenticationMethod + :param client_proxy: Required. Boolean value to indicate whether the request is for client side + proxy or not. + :type client_proxy: bool + """ + + _validation = { + 'authentication_method': {'required': True}, + 'client_proxy': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'client_proxy': {'key': 'clientProxy', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ListClusterUserCredentialProperties, self).__init__(**kwargs) + self.authentication_method = kwargs['authentication_method'] + self.client_proxy = kwargs['client_proxy'] + + class Operation(msrest.serialization.Model): """The Connected cluster API operation. diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py index 90e1b0bd198d..d1208982d77a 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -302,19 +302,19 @@ class ConnectedClusterPatch(msrest.serialization.Model): :type tags: dict[str, str] :param properties: Describes the connected cluster resource properties that can be updated during PATCH operation. - :type properties: str + :type properties: any """ _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( self, *, tags: Optional[Dict[str, str]] = None, - properties: Optional[str] = None, + properties: Optional[Any] = None, **kwargs ): super(ConnectedClusterPatch, self).__init__(**kwargs) @@ -322,6 +322,67 @@ def __init__( self.properties = properties +class CredentialResult(msrest.serialization.Model): + """The credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the credential. + :vartype name: str + :ivar value: Base64-encoded Kubernetes configuration file. + :vartype value: bytearray + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'bytearray'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResult, self).__init__(**kwargs) + self.name = None + self.value = None + + +class CredentialResults(msrest.serialization.Model): + """The list of credential result response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Sender” access + token. + :vartype hybrid_connection_config: ~connected_kubernetes_client.models.HybridConnectionConfig + :ivar kubeconfigs: Base64-encoded Kubernetes configuration file. + :vartype kubeconfigs: list[~connected_kubernetes_client.models.CredentialResult] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[CredentialResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(CredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + class ErrorAdditionalInfo(msrest.serialization.Model): """The resource management error additional info. @@ -330,7 +391,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: str + :vartype info: any """ _validation = { @@ -340,7 +401,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( @@ -418,6 +479,81 @@ def __init__( self.error = error +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Sender” access token. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the relay. + :vartype relay: str + :ivar token: Sender access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class ListClusterUserCredentialProperties(msrest.serialization.Model): + """ListClusterUserCredentialProperties. + + All required parameters must be populated in order to send to Azure. + + :param authentication_method: Required. The mode of client authentication. Possible values + include: "Token", "AAD". + :type authentication_method: str or ~connected_kubernetes_client.models.AuthenticationMethod + :param client_proxy: Required. Boolean value to indicate whether the request is for client side + proxy or not. + :type client_proxy: bool + """ + + _validation = { + 'authentication_method': {'required': True}, + 'client_proxy': {'required': True}, + } + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'client_proxy': {'key': 'clientProxy', 'type': 'bool'}, + } + + def __init__( + self, + *, + authentication_method: Union[str, "AuthenticationMethod"], + client_proxy: bool, + **kwargs + ): + super(ListClusterUserCredentialProperties, self).__init__(**kwargs) + self.authentication_method = authentication_method + self.client_proxy = client_proxy + + class Operation(msrest.serialization.Model): """The Connected cluster API operation. diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py index 9efeb126fead..2d0390d45d7e 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_connected_cluster_operations.py @@ -60,7 +60,7 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -68,7 +68,7 @@ def _create_initial( url = self._create_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -127,8 +127,8 @@ def begin_create( :type connected_cluster: ~connected_kubernetes_client.models.ConnectedCluster :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ConnectedCluster or the result of cls(response) @@ -163,7 +163,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -209,7 +209,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -217,7 +217,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -277,14 +277,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -326,14 +326,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -377,8 +377,8 @@ def begin_delete( :type cluster_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -409,7 +409,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), } @@ -427,6 +427,77 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}'} # type: ignore + def list_cluster_user_credential( + self, + resource_group_name, # type: str + cluster_name, # type: str + properties, # type: "_models.ListClusterUserCredentialProperties" + **kwargs # type: Any + ): + # type: (...) -> "_models.CredentialResults" + """Gets cluster user credentials of a connected cluster. + + Gets cluster user credentials of the connected cluster with a specified resource group and + name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param cluster_name: The name of the Kubernetes cluster on which get is called. + :type cluster_name: str + :param properties: ListClusterUserCredential properties. + :type properties: ~connected_kubernetes_client.models.ListClusterUserCredentialProperties + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CredentialResults, or the result of cls(response) + :rtype: ~connected_kubernetes_client.models.CredentialResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CredentialResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_cluster_user_credential.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'ListClusterUserCredentialProperties') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('CredentialResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_cluster_user_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Kubernetes/connectedClusters/{clusterName}/listClusterUserCredential'} # type: ignore + def list_by_resource_group( self, resource_group_name, # type: str @@ -449,7 +520,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -462,7 +533,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -520,7 +591,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py index 4effb139b9c8..aa3d1b477899 100644 --- a/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py +++ b/sdk/hybridkubernetes/azure-mgmt-hybridkubernetes/azure/mgmt/hybridkubernetes/operations/_operations.py @@ -62,7 +62,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-03-01" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/identity/azure-identity/CHANGELOG.md b/sdk/identity/azure-identity/CHANGELOG.md index 0e813ebba247..efd99dfc4c26 100644 --- a/sdk/identity/azure-identity/CHANGELOG.md +++ b/sdk/identity/azure-identity/CHANGELOG.md @@ -1,6 +1,29 @@ # Release History -## 1.7.0 (2021-10-12) +## 1.7.2 (Unreleased) + +### Features Added + +### Breaking Changes +> These changes do not impact the API of stable versions such as 1.6.0. +> Only code written against a beta version such as 1.7.0b1 may be affected. + +- The `allow_multitenant_authentication` argument has been removed and the default behavior is now as if it were true. + The multitenant authentication feature can be totally disabled by setting the environment variable + `AZURE_IDENTITY_DISABLE_MULTITENANTAUTH` to `True`. +- `azure.identity.RegionalAuthority` is removed. +- `regional_authority` argument is removed for `CertificateCredential` and `ClientSecretCredential`. +- `AzureApplicationCredential` is removed. +- `client_credential` in the ctor of `OnBehalfOfCredential` is removed. Please use `client_secret` or `client_certificate` instead. +- Make `user_assertion` in the ctor of `OnBehalfOfCredential` a keyword only argument. + +## 1.7.1 (2021-11-09) + +### Bugs Fixed + +- Fix multi-tenant auth using async AadClient ([#21289](https://github.com/Azure/azure-sdk-for-python/issues/21289)) + +## 1.7.0 (2021-10-14) ### Breaking Changes > These changes do not impact the API of stable versions such as 1.6.0. diff --git a/sdk/identity/azure-identity/README.md b/sdk/identity/azure-identity/README.md index 3a07fcbafdae..583c93e6fd28 100644 --- a/sdk/identity/azure-identity/README.md +++ b/sdk/identity/azure-identity/README.md @@ -29,14 +29,14 @@ pip install azure-identity - Python 2.7 or a recent version of Python 3 (this library doesn't support end-of-life versions) -### Authenticating during local development +### Authenticate during local development When debugging and executing code locally it is typical for developers to use their own accounts for authenticating calls to Azure services. The Azure Identity library supports authenticating through developer tools to simplify local development. -#### Authenticating via Visual Studio Code +#### Authenticate via Visual Studio Code `DefaultAzureCredential` and `VisualStudioCodeCredential` can authenticate as the user signed in to Visual Studio Code's @@ -45,7 +45,7 @@ After installing the extension, sign in to Azure in Visual Studio Code by pressing `F1` to open the command palette and running the `Azure: Sign In` command. -#### Authenticating via the Azure CLI +#### Authenticate via the Azure CLI `DefaultAzureCredential` and `AzureCliCredential` can authenticate as the user signed in to the [Azure CLI][azure_cli]. To sign in to the Azure CLI, run @@ -66,7 +66,8 @@ to authenticate requests. The Azure Identity library focuses on OAuth authentication with Azure Active Directory (AAD). It offers a variety of credential classes capable of acquiring -an AAD access token. See [Credential Classes](#credential-classes "Credential Classes") below for a list of this library's credential classes. +an AAD access token. See the [Credential classes](#credential-classes "Credential classes") section below for a list of +this library's credential classes. ### DefaultAzureCredential @@ -111,11 +112,14 @@ in any hosting environment which supports managed identities, such as (this list The following examples are provided below: -- [Authenticating with DefaultAzureCredential](#authenticating-with-defaultazurecredential "Authenticating with DefaultAzureCredential") -- [Defining a custom authentication flow with ChainedTokenCredential](#defining-a-custom-authentication-flow-with-chainedtokencredential "Defining a custom authentication flow with ChainedTokenCredential") +- [Authenticate with DefaultAzureCredential](#authenticate-with-defaultazurecredential "Authenticate with DefaultAzureCredential") +- [Define a custom authentication flow with ChainedTokenCredential](#define-a-custom-authentication-flow-with-chainedtokencredential "Define a custom authentication flow with ChainedTokenCredential") - [Async credentials](#async-credentials "Async credentials") -### Authenticating with `DefaultAzureCredential` +### Authenticate with `DefaultAzureCredential` + +More details on configuring your environment to use the `DefaultAzureCredential` +can be found in the class's [reference documentation][default_cred_ref]. More details on configuring your environment to use the `DefaultAzureCredential` can be found in the class's [reference documentation][default_cred_ref]. @@ -133,7 +137,7 @@ default_credential = DefaultAzureCredential() client = BlobServiceClient(account_url, credential=default_credential) ``` -#### Enabling interactive authentication with `DefaultAzureCredential` +#### Enable interactive authentication with `DefaultAzureCredential` Interactive authentication is disabled in the `DefaultAzureCredential` by default and can be enabled with a keyword argument: @@ -146,7 +150,7 @@ When enabled, `DefaultAzureCredential` falls back to interactively authenticating via the system's default web browser when no other credential is available. -#### Specifying a user assigned managed identity for `DefaultAzureCredential` +#### Specify a user assigned managed identity for `DefaultAzureCredential` Many Azure hosts allow the assignment of a user assigned managed identity. To configure `DefaultAzureCredential` to authenticate a user assigned identity, @@ -159,7 +163,7 @@ DefaultAzureCredential(managed_identity_client_id=client_id) Alternatively, set the environment variable `AZURE_CLIENT_ID` to the identity's client ID. -### Defining a custom authentication flow with `ChainedTokenCredential` +### Define a custom authentication flow with `ChainedTokenCredential` `DefaultAzureCredential` is generally the quickest way to get started developing applications for Azure. For more advanced scenarios, @@ -221,7 +225,7 @@ default_credential = DefaultAzureCredential() client = SecretClient("https://my-vault.vault.azure.net", default_credential) ``` -## Cloud Configuration +## Cloud configuration Credentials default to authenticating to the Azure Active Directory endpoint for Azure Public Cloud. To access resources in other clouds, such as Azure Government or a private cloud, configure credentials with the `authority` argument. @@ -237,9 +241,9 @@ through a development tool, such as `AzureCliCredential`, use that tool's configuration. Similarly, `VisualStudioCodeCredential` accepts an `authority` argument but defaults to the authority matching VS Code's "Azure: Cloud" setting. -## Credential Classes +## Credential classes -### Authenticating Azure Hosted Applications +### Authenticate Azure hosted applications |credential|usage |-|- @@ -248,14 +252,14 @@ argument but defaults to the authority matching VS Code's "Azure: Cloud" setting |[EnvironmentCredential][environment_cred_ref]|authenticate a service principal or user configured by environment variables |[ManagedIdentityCredential][managed_id_cred_ref]|authenticate the managed identity of an Azure resource -### Authenticating Service Principals +### Authenticate service principals |credential|usage |-|- |[ClientSecretCredential][client_secret_cred_ref]| authenticate a service principal using a secret |[CertificateCredential][cert_cred_ref]| authenticate a service principal using a certificate -### Authenticating Users +### Authenticate users |credential|usage |-|- @@ -263,14 +267,14 @@ argument but defaults to the authority matching VS Code's "Azure: Cloud" setting |[DeviceCodeCredential][device_code_cred_ref]| interactively authenticate a user on a device with limited UI |[UsernamePasswordCredential][userpass_cred_ref]| authenticate a user with a username and password (does not support multi-factor authentication) -### Authenticating via Development Tools +### Authenticate via development tools |credential|usage |-|- |[AzureCliCredential][cli_cred_ref]|authenticate as the user signed in to the Azure CLI |[VisualStudioCodeCredential][vscode_cred_ref]|authenticate as the user signed in to the Visual Studio Code Azure Account extension -## Environment Variables +## Environment variables [DefaultAzureCredential][default_cred_ref] and [EnvironmentCredential][environment_cred_ref] can be configured with @@ -305,7 +309,7 @@ client secret and certificate are both present, the client secret will be used. See the [troubleshooting guide][troubleshooting_guide] for details on how to diagnose various failure scenarios. -### Error Handling +### Error handling Credentials raise `CredentialUnavailableError` when they're unable to attempt authentication because they lack required data or state. For example, @@ -346,11 +350,13 @@ Client and management libraries listed on the which support Azure AD authentication accept credentials from this library. You can learn more about using these libraries in their documentation, which is linked from the release page. -### B2C Support +### Known issues + +This library doesn't support [Azure AD B2C][b2c]. -This library does not support [Azure Active Directory B2C][b2c]. +For other open issues, refer to the library's [GitHub repository](https://github.com/Azure/azure-sdk-for-python/issues?q=is%3Aopen+is%3Aissue+label%3AAzure.Identity). -### Provide Feedback +### Provide feedback If you encounter bugs or have suggestions, please [open an issue](https://github.com/Azure/azure-sdk-for-python/issues). @@ -384,19 +390,19 @@ additional questions or comments. [azure_storage_blob]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/storage/azure-storage-blob [azure_storage_queue]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/storage/azure-storage-queue [b2c]: https://docs.microsoft.com/azure/active-directory-b2c/overview -[cert_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.CertificateCredential -[chain_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.ChainedTokenCredential -[cli_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.AzureCliCredential -[client_secret_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.ClientSecretCredential -[default_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.DefaultAzureCredential -[device_code_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.DeviceCodeCredential -[environment_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.EnvironmentCredential -[interactive_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.InteractiveBrowserCredential -[managed_id_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.ManagedIdentityCredential +[cert_cred_ref]: https://aka.ms/azsdk/python/identity/certificatecredential +[chain_cred_ref]: https://aka.ms/azsdk/python/identity/chainedtokencredential +[cli_cred_ref]: https://aka.ms/azsdk/python/identity/azclicredential +[client_secret_cred_ref]: https://aka.ms/azsdk/python/identity/clientsecretcredential +[default_cred_ref]: https://aka.ms/azsdk/python/identity/defaultazurecredential +[device_code_cred_ref]: https://aka.ms/azsdk/python/identity/devicecodecredential +[environment_cred_ref]: https://aka.ms/azsdk/python/identity/environmentcredential +[interactive_cred_ref]: https://aka.ms/azsdk/python/identity/interactivebrowsercredential +[managed_id_cred_ref]: https://aka.ms/azsdk/python/identity/managedidentitycredential [ref_docs]: https://aka.ms/azsdk/python/identity/docs [ref_docs_aio]: https://aka.ms/azsdk/python/identity/aio/docs [troubleshooting_guide]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/Troubleshoot.md -[userpass_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.UsernamePasswordCredential -[vscode_cred_ref]: https://aka.ms/azsdk/python/identity/docs#azure.identity.VisualStudioCodeCredential +[userpass_cred_ref]: https://aka.ms/azsdk/python/identity/usernamepasswordcredential +[vscode_cred_ref]: https://aka.ms/azsdk/python/identity/vscodecredential ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fsdk%2Fidentity%2Fazure-identity%2FREADME.png) diff --git a/sdk/identity/azure-identity/azure/identity/_version.py b/sdk/identity/azure-identity/azure/identity/_version.py index a2bfa78a7ba5..8966814e677f 100644 --- a/sdk/identity/azure-identity/azure/identity/_version.py +++ b/sdk/identity/azure-identity/azure/identity/_version.py @@ -2,4 +2,4 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -VERSION = "1.7.0" +VERSION = "1.7.2" diff --git a/sdk/identity/azure-identity/azure/identity/aio/_internal/aad_client.py b/sdk/identity/azure-identity/azure/identity/aio/_internal/aad_client.py index 18252411e069..00125ce63f04 100644 --- a/sdk/identity/azure-identity/azure/identity/aio/_internal/aad_client.py +++ b/sdk/identity/azure-identity/azure/identity/aio/_internal/aad_client.py @@ -14,6 +14,7 @@ from azure.core.credentials import AccessToken from azure.core.pipeline import AsyncPipeline from azure.core.pipeline.policies import AsyncHTTPPolicy, SansIOHTTPPolicy + from azure.core.pipeline.transport import HttpRequest from ..._internal import AadClientCertificate Policy = Union[AsyncHTTPPolicy, SansIOHTTPPolicy] @@ -44,41 +45,31 @@ async def obtain_token_by_authorization_code( request = self._get_auth_code_request( scopes=scopes, code=code, redirect_uri=redirect_uri, client_secret=client_secret, **kwargs ) - now = int(time.time()) - response = await self._pipeline.run(request, retry_on_methods=self._POST, **kwargs) - return self._process_response(response, now) + return await self._run_pipeline(request, **kwargs) async def obtain_token_by_client_certificate( self, scopes: "Iterable[str]", certificate: "AadClientCertificate", **kwargs: "Any" ) -> "AccessToken": request = self._get_client_certificate_request(scopes, certificate, **kwargs) - now = int(time.time()) - response = await self._pipeline.run(request, stream=False, retry_on_methods=self._POST, **kwargs) - return self._process_response(response, now) + return await self._run_pipeline(request, stream=False, **kwargs) async def obtain_token_by_client_secret( self, scopes: "Iterable[str]", secret: str, **kwargs: "Any" ) -> "AccessToken": request = self._get_client_secret_request(scopes, secret, **kwargs) - now = int(time.time()) - response = await self._pipeline.run(request, retry_on_methods=self._POST, **kwargs) - return self._process_response(response, now) + return await self._run_pipeline(request, **kwargs) async def obtain_token_by_jwt_assertion( self, scopes: "Iterable[str]", assertion: str, **kwargs: "Any" ) -> "AccessToken": request = self._get_jwt_assertion_request(scopes, assertion) - now = int(time.time()) - response = await self._pipeline.run(request, stream=False, retry_on_methods=self._POST, **kwargs) - return self._process_response(response, now) + return await self._run_pipeline(request, stream=False, **kwargs) async def obtain_token_by_refresh_token( self, scopes: "Iterable[str]", refresh_token: str, **kwargs: "Any" ) -> "AccessToken": request = self._get_refresh_token_request(scopes, refresh_token, **kwargs) - now = int(time.time()) - response = await self._pipeline.run(request, retry_on_methods=self._POST, **kwargs) - return self._process_response(response, now) + return await self._run_pipeline(request, **kwargs) async def obtain_token_on_behalf_of( self, @@ -90,10 +81,16 @@ async def obtain_token_on_behalf_of( request = self._get_on_behalf_of_request( scopes=scopes, client_credential=client_credential, user_assertion=user_assertion, **kwargs ) - now = int(time.time()) - response = await self._pipeline.run(request, retry_on_methods=self._POST, **kwargs) - return self._process_response(response, now) + return await self._run_pipeline(request, **kwargs) # pylint:disable=no-self-use def _build_pipeline(self, **kwargs: "Any") -> "AsyncPipeline": return build_async_pipeline(**kwargs) + + async def _run_pipeline(self, request: "HttpRequest", **kwargs: "Any") -> "AccessToken": + # remove tenant_id kwarg that could have been passed from credential's get_token method + # tenant_id is already part of `request` at this point + kwargs.pop("tenant_id", None) + now = int(time.time()) + response = await self._pipeline.run(request, retry_on_methods=self._POST, **kwargs) + return self._process_response(response, now) diff --git a/sdk/identity/azure-identity/setup.py b/sdk/identity/azure-identity/setup.py index 6ffc1683458d..3509a0780fba 100644 --- a/sdk/identity/azure-identity/setup.py +++ b/sdk/identity/azure-identity/setup.py @@ -52,7 +52,7 @@ author_email="azpysdkhelp@microsoft.com", url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity", classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", diff --git a/sdk/identity/azure-identity/tests/test_client_secret_credential.py b/sdk/identity/azure-identity/tests/test_client_secret_credential.py index 2528bf0ad191..aaf460056335 100644 --- a/sdk/identity/azure-identity/tests/test_client_secret_credential.py +++ b/sdk/identity/azure-identity/tests/test_client_secret_credential.py @@ -2,7 +2,6 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ -from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline.policies import ContentDecodePolicy, SansIOHTTPPolicy from azure.identity import ClientSecretCredential, TokenCachePersistenceOptions from azure.identity._enums import RegionalAuthority @@ -207,7 +206,9 @@ def test_multitenant_authentication(): second_tenant = "second-tenant" second_token = first_token * 2 - def send(request, **_): + def send(request, **kwargs): + assert "tenant_id" not in kwargs, "tenant_id kwarg shouldn't get passed to send method" + parsed = urlparse(request.url) tenant = parsed.path.split("/")[1] assert tenant in (first_tenant, second_tenant, "common"), 'unexpected tenant "{}"'.format(tenant) @@ -233,6 +234,18 @@ def send(request, **_): token = credential.get_token("scope") assert token.token == first_token + +def test_live_multitenant_authentication(live_service_principal): + # first create a credential with a non-existent tenant + credential = ClientSecretCredential( + "...", live_service_principal["client_id"], live_service_principal["client_secret"] + ) + # then get a valid token for an actual tenant + token = credential.get_token("https://vault.azure.net/.default", tenant_id=live_service_principal["tenant_id"]) + assert token.token + assert token.expires_on + + def test_multitenant_authentication_not_allowed(): expected_tenant = "expected-tenant" expected_token = "***" diff --git a/sdk/identity/azure-identity/tests/test_client_secret_credential_async.py b/sdk/identity/azure-identity/tests/test_client_secret_credential_async.py index 03e8d323c81d..5919bd0a789f 100644 --- a/sdk/identity/azure-identity/tests/test_client_secret_credential_async.py +++ b/sdk/identity/azure-identity/tests/test_client_secret_credential_async.py @@ -7,7 +7,6 @@ from urllib.parse import urlparse from azure.core.credentials import AccessToken -from azure.core.exceptions import ClientAuthenticationError from azure.core.pipeline.policies import ContentDecodePolicy, SansIOHTTPPolicy from azure.identity import TokenCachePersistenceOptions from azure.identity._constants import EnvironmentVariables @@ -257,10 +256,13 @@ async def test_multitenant_authentication(): second_tenant = "second-tenant" second_token = first_token * 2 - async def send(request, **_): + async def send(request, **kwargs): + assert "tenant_id" not in kwargs, "tenant_id kwarg shouldn't get passed to send method" + parsed = urlparse(request.url) tenant = parsed.path.split("/")[1] assert tenant in (first_tenant, second_tenant), 'unexpected tenant "{}"'.format(tenant) + token = first_token if tenant == first_tenant else second_token return mock_response(json_payload=build_aad_response(access_token=token)) @@ -280,6 +282,20 @@ async def send(request, **_): token = await credential.get_token("scope") assert token.token == first_token +@pytest.mark.asyncio +async def test_live_multitenant_authentication(live_service_principal): + # first create a credential with a non-existent tenant + credential = ClientSecretCredential( + "...", live_service_principal["client_id"], live_service_principal["client_secret"] + ) + # then get a valid token for an actual tenant + token = await credential.get_token( + "https://vault.azure.net/.default", tenant_id=live_service_principal["tenant_id"] + ) + assert token.token + assert token.expires_on + + @pytest.mark.asyncio async def test_multitenant_authentication_not_allowed(): expected_tenant = "expected-tenant" diff --git a/sdk/identity/tests.yml b/sdk/identity/tests.yml index a718161d366a..88e4b32f2004 100644 --- a/sdk/identity/tests.yml +++ b/sdk/identity/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' ServiceDirectory: identity EnvVars: AZURE_CLIENT_ID: $(python-identity-client-id) diff --git a/sdk/iothub/azure-mgmt-iotcentral/CHANGELOG.md b/sdk/iothub/azure-mgmt-iotcentral/CHANGELOG.md index 934a40aaa9e0..29776e9d29f1 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/CHANGELOG.md +++ b/sdk/iothub/azure-mgmt-iotcentral/CHANGELOG.md @@ -1,5 +1,14 @@ # Release History +## 9.0.0 (2021-11-11) + +**Features** + + - Model App has a new parameter state + - Model App has a new parameter identity + - Model AppPatch has a new parameter state + - Model AppPatch has a new parameter identity + ## 9.0.0b1 (2021-05-13) This is beta preview version. @@ -113,4 +122,4 @@ client per process. ## 0.1.0 (2018-07-16) - - Initial Release with support for 2017-07-01-privatepreview \ No newline at end of file + - Initial Release with support for 2017-07-01-privatepreview diff --git a/sdk/iothub/azure-mgmt-iotcentral/_meta.json b/sdk/iothub/azure-mgmt-iotcentral/_meta.json index b36b0cb959aa..5ad6a8b0a6ba 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/_meta.json +++ b/sdk/iothub/azure-mgmt-iotcentral/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.4.2", - "use": "@autorest/python@5.6.6", - "commit": "15d7abacf7b4f7317ef96f7e8300a7b51e315e7b", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "b0cf39b0fd0713e6e0c449633b23a13c99e7fea2", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/iotcentral/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.4.2", + "autorest_command": "autorest specification/iotcentral/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/iotcentral/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_configuration.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_configuration.py index cfc92edae559..dd3335b8abfc 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_configuration.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2018-09-01" + self.api_version = "2021-06-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-iotcentral/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_metadata.json b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_metadata.json index 4beed9e62cf3..8972ad1fd857 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_metadata.json +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2018-09-01", - "total_api_version_list": ["2018-09-01"], + "chosen_version": "2021-06-01", + "total_api_version_list": ["2021-06-01"], "client": { "name": "IotCentralClient", "filename": "_iot_central_client", diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_version.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_version.py index 6dddc002d43d..b77ac9246082 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_version.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0b1" +VERSION = "9.0.0" diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_configuration.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_configuration.py index 1c9e1d05b287..ee49edae2e28 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_configuration.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2018-09-01" + self.api_version = "2021-06-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-iotcentral/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_apps_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_apps_operations.py index 900072f121b1..3e2f0a5fa6ae 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_apps_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_apps_operations.py @@ -47,7 +47,7 @@ async def get( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.App": """Get the metadata of an IoT Central application. @@ -66,7 +66,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -107,14 +107,14 @@ async def _create_or_update_initial( resource_group_name: str, resource_name: str, app: "_models.App", - **kwargs + **kwargs: Any ) -> Optional["_models.App"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.App"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -165,7 +165,7 @@ async def begin_create_or_update( resource_group_name: str, resource_name: str, app: "_models.App", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.App"]: """Create or update the metadata of an IoT Central application. The usual pattern to modify a property is to retrieve the IoT Central application metadata and security metadata, and then @@ -180,8 +180,8 @@ async def begin_create_or_update( :type app: ~azure.mgmt.iotcentral.models.App :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either App or the result of cls(response) @@ -239,14 +239,14 @@ async def _update_initial( resource_group_name: str, resource_name: str, app_patch: "_models.AppPatch", - **kwargs + **kwargs: Any ) -> Optional["_models.App"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.App"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -294,7 +294,7 @@ async def begin_update( resource_group_name: str, resource_name: str, app_patch: "_models.AppPatch", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.App"]: """Update the metadata of an IoT Central application. @@ -307,8 +307,8 @@ async def begin_update( :type app_patch: ~azure.mgmt.iotcentral.models.AppPatch :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either App or the result of cls(response) @@ -365,14 +365,14 @@ async def _delete_initial( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -409,7 +409,7 @@ async def begin_delete( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete an IoT Central application. @@ -420,8 +420,8 @@ async def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -472,7 +472,7 @@ def get_long_running_output(pipeline_response): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AppListResult"]: """Get all IoT Central Applications in a subscription. @@ -486,7 +486,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -539,7 +539,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AppListResult"]: """Get all the IoT Central Applications in a resource group. @@ -556,7 +556,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -610,7 +610,7 @@ async def get_next(next_link=None): async def check_name_availability( self, operation_inputs: "_models.OperationInputs", - **kwargs + **kwargs: Any ) -> "_models.AppAvailabilityInfo": """Check if an IoT Central application name is available. @@ -627,7 +627,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -669,7 +669,7 @@ async def check_name_availability( async def check_subdomain_availability( self, operation_inputs: "_models.OperationInputs", - **kwargs + **kwargs: Any ) -> "_models.AppAvailabilityInfo": """Check if an IoT Central application subdomain is available. @@ -686,7 +686,7 @@ async def check_subdomain_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -727,7 +727,7 @@ async def check_subdomain_availability( def list_templates( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AppTemplatesResult"]: """Get all available application templates. @@ -741,7 +741,7 @@ def list_templates( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_operations.py index cb72d188d89c..aa485130a560 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/aio/operations/_operations.py @@ -43,9 +43,9 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: - """Lists all of the available IoT Central application REST API operations. + """Lists all of the available IoT Central Resource Provider operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py index 46894127691b..0d60d7db2991 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/__init__.py @@ -21,6 +21,7 @@ from ._models_py3 import OperationInputs from ._models_py3 import OperationListResult from ._models_py3 import Resource + from ._models_py3 import SystemAssignedServiceIdentity except (SyntaxError, ImportError): from ._models import App # type: ignore from ._models import AppAvailabilityInfo # type: ignore @@ -36,9 +37,12 @@ from ._models import OperationInputs # type: ignore from ._models import OperationListResult # type: ignore from ._models import Resource # type: ignore + from ._models import SystemAssignedServiceIdentity # type: ignore from ._iot_central_client_enums import ( AppSku, + AppState, + SystemAssignedServiceIdentityType, ) __all__ = [ @@ -56,5 +60,8 @@ 'OperationInputs', 'OperationListResult', 'Resource', + 'SystemAssignedServiceIdentity', 'AppSku', + 'AppState', + 'SystemAssignedServiceIdentityType', ] diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py index 6a99e3a1cbb1..52a44bdf673b 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_iot_central_client_enums.py @@ -30,8 +30,20 @@ class AppSku(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The name of the SKU. """ - F1 = "F1" - S1 = "S1" ST0 = "ST0" ST1 = "ST1" ST2 = "ST2" + +class AppState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the application. + """ + + CREATED = "created" + SUSPENDED = "suspended" + +class SystemAssignedServiceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of managed service identity (either system assigned, or none). + """ + + NONE = "None" + SYSTEM_ASSIGNED = "SystemAssigned" diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py index d1ca34ecab30..3e86ca4524fa 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models.py @@ -74,6 +74,8 @@ class App(Resource): :type tags: dict[str, str] :param sku: Required. A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo + :param identity: The managed identities for the IoT Central application. + :type identity: ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentity :ivar application_id: The ID of the application. :vartype application_id: str :param display_name: The display name of the application. @@ -84,6 +86,9 @@ class App(Resource): characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :ivar state: The current state of the application. Possible values include: "created", + "suspended". + :vartype state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { @@ -93,6 +98,7 @@ class App(Resource): 'location': {'required': True}, 'sku': {'required': True}, 'application_id': {'readonly': True}, + 'state': {'readonly': True}, } _attribute_map = { @@ -102,10 +108,12 @@ class App(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, + 'identity': {'key': 'identity', 'type': 'SystemAssignedServiceIdentity'}, 'application_id': {'key': 'properties.applicationId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } def __init__( @@ -114,10 +122,12 @@ def __init__( ): super(App, self).__init__(**kwargs) self.sku = kwargs['sku'] + self.identity = kwargs.get('identity', None) self.application_id = None self.display_name = kwargs.get('display_name', None) self.subdomain = kwargs.get('subdomain', None) self.template = kwargs.get('template', None) + self.state = None class AppAvailabilityInfo(msrest.serialization.Model): @@ -187,6 +197,8 @@ class AppPatch(msrest.serialization.Model): :type tags: dict[str, str] :param sku: A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo + :param identity: The managed identities for the IoT Central application. + :type identity: ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentity :ivar application_id: The ID of the application. :vartype application_id: str :param display_name: The display name of the application. @@ -197,19 +209,25 @@ class AppPatch(msrest.serialization.Model): characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :ivar state: The current state of the application. Possible values include: "created", + "suspended". + :vartype state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { 'application_id': {'readonly': True}, + 'state': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, + 'identity': {'key': 'identity', 'type': 'SystemAssignedServiceIdentity'}, 'application_id': {'key': 'properties.applicationId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } def __init__( @@ -219,10 +237,12 @@ def __init__( super(AppPatch, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) self.sku = kwargs.get('sku', None) + self.identity = kwargs.get('identity', None) self.application_id = None self.display_name = kwargs.get('display_name', None) self.subdomain = kwargs.get('subdomain', None) self.template = kwargs.get('template', None) + self.state = None class AppSkuInfo(msrest.serialization.Model): @@ -230,8 +250,7 @@ class AppSkuInfo(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU. Possible values include: "F1", "S1", "ST0", "ST1", - "ST2". + :param name: Required. The name of the SKU. Possible values include: "ST0", "ST1", "ST2". :type name: str or ~azure.mgmt.iotcentral.models.AppSku """ @@ -421,7 +440,7 @@ class Operation(msrest.serialization.Model): :ivar origin: The intended executor of the operation. :vartype origin: str :ivar properties: Additional descriptions for the operation. - :vartype properties: str + :vartype properties: any """ _validation = { @@ -434,7 +453,7 @@ class Operation(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( @@ -544,3 +563,43 @@ def __init__( super(OperationListResult, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) self.value = None + + +class SystemAssignedServiceIdentity(msrest.serialization.Model): + """Managed service identity (either system assigned, or none). + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. Type of managed service identity (either system assigned, or none). + Possible values include: "None", "SystemAssigned". + :type type: str or ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemAssignedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs['type'] diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py index cb80f7e3165e..ad84a466d054 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/models/_models_py3.py @@ -81,6 +81,8 @@ class App(Resource): :type tags: dict[str, str] :param sku: Required. A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo + :param identity: The managed identities for the IoT Central application. + :type identity: ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentity :ivar application_id: The ID of the application. :vartype application_id: str :param display_name: The display name of the application. @@ -91,6 +93,9 @@ class App(Resource): characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :ivar state: The current state of the application. Possible values include: "created", + "suspended". + :vartype state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { @@ -100,6 +105,7 @@ class App(Resource): 'location': {'required': True}, 'sku': {'required': True}, 'application_id': {'readonly': True}, + 'state': {'readonly': True}, } _attribute_map = { @@ -109,10 +115,12 @@ class App(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, + 'identity': {'key': 'identity', 'type': 'SystemAssignedServiceIdentity'}, 'application_id': {'key': 'properties.applicationId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } def __init__( @@ -121,6 +129,7 @@ def __init__( location: str, sku: "AppSkuInfo", tags: Optional[Dict[str, str]] = None, + identity: Optional["SystemAssignedServiceIdentity"] = None, display_name: Optional[str] = None, subdomain: Optional[str] = None, template: Optional[str] = None, @@ -128,10 +137,12 @@ def __init__( ): super(App, self).__init__(location=location, tags=tags, **kwargs) self.sku = sku + self.identity = identity self.application_id = None self.display_name = display_name self.subdomain = subdomain self.template = template + self.state = None class AppAvailabilityInfo(msrest.serialization.Model): @@ -204,6 +215,8 @@ class AppPatch(msrest.serialization.Model): :type tags: dict[str, str] :param sku: A valid instance SKU. :type sku: ~azure.mgmt.iotcentral.models.AppSkuInfo + :param identity: The managed identities for the IoT Central application. + :type identity: ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentity :ivar application_id: The ID of the application. :vartype application_id: str :param display_name: The display name of the application. @@ -214,19 +227,25 @@ class AppPatch(msrest.serialization.Model): characteristics and behaviors of an application. Optional; if not specified, defaults to a blank blueprint and allows the application to be defined from scratch. :type template: str + :ivar state: The current state of the application. Possible values include: "created", + "suspended". + :vartype state: str or ~azure.mgmt.iotcentral.models.AppState """ _validation = { 'application_id': {'readonly': True}, + 'state': {'readonly': True}, } _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'AppSkuInfo'}, + 'identity': {'key': 'identity', 'type': 'SystemAssignedServiceIdentity'}, 'application_id': {'key': 'properties.applicationId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'subdomain': {'key': 'properties.subdomain', 'type': 'str'}, 'template': {'key': 'properties.template', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, } def __init__( @@ -234,6 +253,7 @@ def __init__( *, tags: Optional[Dict[str, str]] = None, sku: Optional["AppSkuInfo"] = None, + identity: Optional["SystemAssignedServiceIdentity"] = None, display_name: Optional[str] = None, subdomain: Optional[str] = None, template: Optional[str] = None, @@ -242,10 +262,12 @@ def __init__( super(AppPatch, self).__init__(**kwargs) self.tags = tags self.sku = sku + self.identity = identity self.application_id = None self.display_name = display_name self.subdomain = subdomain self.template = template + self.state = None class AppSkuInfo(msrest.serialization.Model): @@ -253,8 +275,7 @@ class AppSkuInfo(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. The name of the SKU. Possible values include: "F1", "S1", "ST0", "ST1", - "ST2". + :param name: Required. The name of the SKU. Possible values include: "ST0", "ST1", "ST2". :type name: str or ~azure.mgmt.iotcentral.models.AppSku """ @@ -450,7 +471,7 @@ class Operation(msrest.serialization.Model): :ivar origin: The intended executor of the operation. :vartype origin: str :ivar properties: Additional descriptions for the operation. - :vartype properties: str + :vartype properties: any """ _validation = { @@ -463,7 +484,7 @@ class Operation(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, 'display': {'key': 'display', 'type': 'OperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'object'}, } def __init__( @@ -580,3 +601,45 @@ def __init__( super(OperationListResult, self).__init__(**kwargs) self.next_link = next_link self.value = None + + +class SystemAssignedServiceIdentity(msrest.serialization.Model): + """Managed service identity (either system assigned, or none). + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar principal_id: The service principal ID of the system assigned identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: Required. Type of managed service identity (either system assigned, or none). + Possible values include: "None", "SystemAssigned". + :type type: str or ~azure.mgmt.iotcentral.models.SystemAssignedServiceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Union[str, "SystemAssignedServiceIdentityType"], + **kwargs + ): + super(SystemAssignedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py index e3f18876efff..c0702db0dad1 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_apps_operations.py @@ -71,7 +71,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -120,7 +120,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -187,8 +187,8 @@ def begin_create_or_update( :type app: ~azure.mgmt.iotcentral.models.App :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either App or the result of cls(response) @@ -254,7 +254,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -316,8 +316,8 @@ def begin_update( :type app_patch: ~azure.mgmt.iotcentral.models.AppPatch :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either App or the result of cls(response) @@ -382,7 +382,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" # Construct URL @@ -431,8 +431,8 @@ def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -498,7 +498,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -569,7 +569,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): @@ -641,7 +641,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -701,7 +701,7 @@ def check_subdomain_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -757,7 +757,7 @@ def list_templates( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py index 6645b716bef2..70ce9049c4c0 100644 --- a/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py +++ b/sdk/iothub/azure-mgmt-iotcentral/azure/mgmt/iotcentral/operations/_operations.py @@ -50,7 +50,7 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.OperationListResult"] - """Lists all of the available IoT Central application REST API operations. + """Lists all of the available IoT Central Resource Provider operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2018-09-01" + api_version = "2021-06-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md b/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md index 5bbecd93b402..813384996c87 100644 --- a/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.1.0b2 (Unreleased) +## 4.1.0b3 (Unreleased) ### Features Added @@ -10,6 +10,15 @@ ### Other Changes +## 4.1.0b2 (2021-11-11) + +### Features Added +- Added support for multi-tenant authentication when using `azure-identity` 1.7.1 or newer + ([#20698](https://github.com/Azure/azure-sdk-for-python/issues/20698)) + +### Other Changes +- Updated minimum `azure-core` version to 1.15.0 + ## 4.1.0b1 (2021-09-09) ### Features Added diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py index f73bf01e0e89..905e81953480 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py @@ -6,7 +6,7 @@ from six.moves.urllib_parse import urlparse -from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase +from .challenge_auth_policy import ChallengeAuthPolicy from .client_base import KeyVaultClientBase from .http_challenge import HttpChallenge from . import http_challenge_cache as HttpChallengeCache @@ -14,7 +14,6 @@ __all__ = [ "ChallengeAuthPolicy", - "ChallengeAuthPolicyBase", "HttpChallenge", "HttpChallengeCache", "KeyVaultClientBase", diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py index 97f1d093e20f..bfe46689f5ff 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/async_challenge_auth_policy.py @@ -13,67 +13,69 @@ requirements can change. For example, a vault may move to a new tenant. In such a case the policy will attempt the protocol again. """ + +import time from typing import TYPE_CHECKING -from azure.core.pipeline.policies import AsyncHTTPPolicy +from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy -from . import HttpChallengeCache -from .challenge_auth_policy import _enforce_tls, _get_challenge_request, _update_challenge, ChallengeAuthPolicyBase +from . import http_challenge_cache as ChallengeCache +from .challenge_auth_policy import _enforce_tls, _update_challenge if TYPE_CHECKING: - from typing import Any + from typing import Any, Optional + from azure.core.credentials import AccessToken from azure.core.credentials_async import AsyncTokenCredential - from azure.core.pipeline import PipelineRequest - from azure.core.pipeline.transport import AsyncHttpResponse - from . import HttpChallenge + from azure.core.pipeline import PipelineRequest, PipelineResponse -class AsyncChallengeAuthPolicy(ChallengeAuthPolicyBase, AsyncHTTPPolicy): +class AsyncChallengeAuthPolicy(AsyncBearerTokenCredentialPolicy): """policy for handling HTTP authentication challenges""" - def __init__(self, credential: "AsyncTokenCredential", **kwargs: "Any") -> None: + def __init__(self, credential: "AsyncTokenCredential", *scopes: str, **kwargs: "Any") -> None: + super().__init__(credential, *scopes, **kwargs) self._credential = credential - super(AsyncChallengeAuthPolicy, self).__init__(**kwargs) + self._token = None # type: Optional[AccessToken] - async def send(self, request: "PipelineRequest") -> "AsyncHttpResponse": + async def on_request(self, request: "PipelineRequest") -> None: _enforce_tls(request) - - challenge = HttpChallengeCache.get_challenge_for_url(request.http_request.url) - if not challenge: - challenge_request = _get_challenge_request(request) - challenger = await self.next.send(challenge_request) - try: - challenge = _update_challenge(request, challenger) - except ValueError: - # didn't receive the expected challenge -> nothing more this policy can do - return challenger - - await self._handle_challenge(request, challenge) - response = await self.next.send(request) - - if response.http_response.status_code == 401: - # any cached token must be invalid - self._token = None - - # cached challenge could be outdated; maybe this response has a new one? - try: - challenge = _update_challenge(request, response) - except ValueError: - # 401 with no legible challenge -> nothing more this policy can do - return response - - await self._handle_challenge(request, challenge) - response = await self.next.send(request) - - return response - - async def _handle_challenge(self, request: "PipelineRequest", challenge: "HttpChallenge") -> None: - """authenticate according to challenge, add Authorization header to request""" - - if self._need_new_token: + challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) + if challenge: + # Note that if the vault has moved to a new tenant since our last request for it, this request will fail. + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = await self._credential.get_token(scope, tenant_id=challenge.tenant_id) + + # ignore mypy's warning -- although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return + + # else: discover authentication information by eliciting a challenge from Key Vault. Remove any request data, + # saving it for later. Key Vault will reject the request as unauthorized and respond with a challenge. + # on_challenge will parse that challenge, reattach any body removed here, authorize the request, and tell + # super to send it again. + if request.http_request.body: + request.context["key_vault_request_data"] = request.http_request.body + request.http_request.set_json_body(None) + request.http_request.headers["Content-Length"] = "0" + + + async def on_challenge(self, request: "PipelineRequest", response: "PipelineResponse") -> bool: + try: + challenge = _update_challenge(request, response) # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource scope = challenge.get_scope() or challenge.get_resource() + "/.default" - self._token = await self._credential.get_token(scope) + except ValueError: + return False + + body = request.context.pop("key_vault_request_data", None) + request.http_request.set_text_body(body) # no-op when text is None + await self.authorize_request(request, scope, tenant_id=challenge.tenant_id) + + return True - # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token - request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + @property + def _need_new_token(self) -> bool: + # pylint:disable=invalid-overridden-method + return not self._token or self._token.expires_on - time.time() < 300 diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/challenge_auth_policy.py index 3239032e9162..7f6f2b93f0e4 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/challenge_auth_policy.py @@ -14,13 +14,11 @@ protocol again. """ -import copy import time from azure.core.exceptions import ServiceRequestError -from azure.core.pipeline import PipelineContext, PipelineRequest -from azure.core.pipeline.policies import HTTPPolicy -from azure.core.pipeline.transport import HttpRequest +from azure.core.pipeline import PipelineRequest +from azure.core.pipeline.policies import BearerTokenCredentialPolicy from .http_challenge import HttpChallenge from . import http_challenge_cache as ChallengeCache @@ -44,22 +42,6 @@ def _enforce_tls(request): ) -def _get_challenge_request(request): - # type: (PipelineRequest) -> PipelineRequest - - # The challenge request is intended to provoke an authentication challenge from Key Vault, to learn how the - # service request should be authenticated. It should be identical to the service request but with no body. - challenge_request = HttpRequest( - request.http_request.method, request.http_request.url, headers=request.http_request.headers - ) - challenge_request.headers["Content-Length"] = "0" - - options = copy.deepcopy(request.context.options) - context = PipelineContext(request.context.transport, **options) - - return PipelineRequest(http_request=challenge_request, context=context) - - def _update_challenge(request, challenger): # type: (PipelineRequest, PipelineResponse) -> HttpChallenge """parse challenge from challenger, cache it, return it""" @@ -73,68 +55,55 @@ def _update_challenge(request, challenger): return challenge -class ChallengeAuthPolicyBase(object): - """Sans I/O base for challenge authentication policies""" - - def __init__(self, **kwargs): - self._token = None # type: Optional[AccessToken] - super(ChallengeAuthPolicyBase, self).__init__(**kwargs) - - @property - def _need_new_token(self): - # type: () -> bool - return not self._token or self._token.expires_on - time.time() < 300 - - -class ChallengeAuthPolicy(ChallengeAuthPolicyBase, HTTPPolicy): +class ChallengeAuthPolicy(BearerTokenCredentialPolicy): """policy for handling HTTP authentication challenges""" - def __init__(self, credential, **kwargs): - # type: (TokenCredential, **Any) -> None + def __init__(self, credential, *scopes, **kwargs): + # type: (TokenCredential, *str, **Any) -> None + super(ChallengeAuthPolicy, self).__init__(credential, *scopes, **kwargs) self._credential = credential - super(ChallengeAuthPolicy, self).__init__(**kwargs) + self._token = None # type: Optional[AccessToken] - def send(self, request): - # type: (PipelineRequest) -> PipelineResponse + def on_request(self, request): + # type: (PipelineRequest) -> None _enforce_tls(request) - challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) - if not challenge: - challenge_request = _get_challenge_request(request) - challenger = self.next.send(challenge_request) - try: - challenge = _update_challenge(request, challenger) - except ValueError: - # didn't receive the expected challenge -> nothing more this policy can do - return challenger - - self._handle_challenge(request, challenge) - response = self.next.send(request) - - if response.http_response.status_code == 401: - # any cached token must be invalid - self._token = None - - # cached challenge could be outdated; maybe this response has a new one? - try: - challenge = _update_challenge(request, response) - except ValueError: - # 401 with no legible challenge -> nothing more this policy can do - return response - - self._handle_challenge(request, challenge) - response = self.next.send(request) - - return response - - def _handle_challenge(self, request, challenge): - # type: (PipelineRequest, HttpChallenge) -> None - """authenticate according to challenge, add Authorization header to request""" - - if self._need_new_token: + if challenge: + # Note that if the vault has moved to a new tenant since our last request for it, this request will fail. + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = self._credential.get_token(scope, tenant_id=challenge.tenant_id) + + # ignore mypy's warning -- although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return + + # else: discover authentication information by eliciting a challenge from Key Vault. Remove any request data, + # saving it for later. Key Vault will reject the request as unauthorized and respond with a challenge. + # on_challenge will parse that challenge, reattach any body removed here, authorize the request, and tell + # super to send it again. + if request.http_request.body: + request.context["key_vault_request_data"] = request.http_request.body + request.http_request.set_json_body(None) + request.http_request.headers["Content-Length"] = "0" + + def on_challenge(self, request, response): + # type: (PipelineRequest, PipelineResponse) -> bool + try: + challenge = _update_challenge(request, response) # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource scope = challenge.get_scope() or challenge.get_resource() + "/.default" - self._token = self._credential.get_token(scope) + except ValueError: + return False + + body = request.context.pop("key_vault_request_data", None) + request.http_request.set_text_body(body) # no-op when text is None + self.authorize_request(request, scope, tenant_id=challenge.tenant_id) - # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token - request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return True + + @property + def _need_new_token(self): + # type: () -> bool + return not self._token or self._token.expires_on - time.time() < 300 diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py index c762e1ae50ef..c52c90929ad9 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/http_challenge.py @@ -40,6 +40,11 @@ def __init__(self, request_uri, challenge, response_headers=None): if "authorization" not in self._parameters and "authorization_uri" not in self._parameters: raise ValueError("Invalid challenge parameters") + authorization_uri = self.get_authorization_server() + # the authoritzation server URI should look something like https://login.windows.net/tenant-id + uri_path = parse.urlparse(authorization_uri).path.lstrip("/") + self.tenant_id = uri_path.split("/")[0] or None + # if the response headers were supplied if response_headers: # get the message signing key and message key encryption key from the headers diff --git a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py index e63ceb9d4426..34f7c0bbbaec 100644 --- a/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py +++ b/sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "4.1.0b2" +VERSION = "4.1.0b3" diff --git a/sdk/keyvault/azure-keyvault-administration/setup.py b/sdk/keyvault/azure-keyvault-administration/setup.py index 0231b074702c..9016754edd4b 100644 --- a/sdk/keyvault/azure-keyvault-administration/setup.py +++ b/sdk/keyvault/azure-keyvault-administration/setup.py @@ -81,7 +81,7 @@ "azure.keyvault", ] ), - install_requires=["azure-common~=1.1", "azure-core<2.0.0,>=1.11.0", "msrest>=0.6.21", "six>=1.11.0"], + install_requires=["azure-common~=1.1", "azure-core<2.0.0,>=1.15.0", "msrest>=0.6.21", "six>=1.11.0"], extras_require={ ":python_version<'3.0'": ["azure-keyvault-nspkg"], ":python_version<'3.4'": ["enum34>=1.0.4"], diff --git a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md index f399e57e03c3..c2b886e91b44 100644 --- a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.4.0b2 (Unreleased) +## 4.4.0b3 (Unreleased) ### Features Added @@ -10,6 +10,15 @@ ### Other Changes +## 4.4.0b2 (2021-11-11) + +### Features Added +- Added support for multi-tenant authentication when using `azure-identity` 1.7.1 or newer + ([#20698](https://github.com/Azure/azure-sdk-for-python/issues/20698)) + +### Other Changes +- Updated minimum `azure-core` version to 1.15.0 + ## 4.4.0b1 (2021-09-09) ### Features Added diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/__init__.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/__init__.py index 3329ce2df068..d8303b4b081d 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/__init__.py @@ -9,7 +9,7 @@ import urlparse as parse # type: ignore from typing import TYPE_CHECKING -from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase +from .challenge_auth_policy import ChallengeAuthPolicy from .client_base import KeyVaultClientBase from .http_challenge import HttpChallenge from . import http_challenge_cache as HttpChallengeCache @@ -21,7 +21,6 @@ __all__ = [ "ChallengeAuthPolicy", - "ChallengeAuthPolicyBase", "HttpChallenge", "HttpChallengeCache", "KeyVaultClientBase", diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_challenge_auth_policy.py index 97f1d093e20f..bfe46689f5ff 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/async_challenge_auth_policy.py @@ -13,67 +13,69 @@ requirements can change. For example, a vault may move to a new tenant. In such a case the policy will attempt the protocol again. """ + +import time from typing import TYPE_CHECKING -from azure.core.pipeline.policies import AsyncHTTPPolicy +from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy -from . import HttpChallengeCache -from .challenge_auth_policy import _enforce_tls, _get_challenge_request, _update_challenge, ChallengeAuthPolicyBase +from . import http_challenge_cache as ChallengeCache +from .challenge_auth_policy import _enforce_tls, _update_challenge if TYPE_CHECKING: - from typing import Any + from typing import Any, Optional + from azure.core.credentials import AccessToken from azure.core.credentials_async import AsyncTokenCredential - from azure.core.pipeline import PipelineRequest - from azure.core.pipeline.transport import AsyncHttpResponse - from . import HttpChallenge + from azure.core.pipeline import PipelineRequest, PipelineResponse -class AsyncChallengeAuthPolicy(ChallengeAuthPolicyBase, AsyncHTTPPolicy): +class AsyncChallengeAuthPolicy(AsyncBearerTokenCredentialPolicy): """policy for handling HTTP authentication challenges""" - def __init__(self, credential: "AsyncTokenCredential", **kwargs: "Any") -> None: + def __init__(self, credential: "AsyncTokenCredential", *scopes: str, **kwargs: "Any") -> None: + super().__init__(credential, *scopes, **kwargs) self._credential = credential - super(AsyncChallengeAuthPolicy, self).__init__(**kwargs) + self._token = None # type: Optional[AccessToken] - async def send(self, request: "PipelineRequest") -> "AsyncHttpResponse": + async def on_request(self, request: "PipelineRequest") -> None: _enforce_tls(request) - - challenge = HttpChallengeCache.get_challenge_for_url(request.http_request.url) - if not challenge: - challenge_request = _get_challenge_request(request) - challenger = await self.next.send(challenge_request) - try: - challenge = _update_challenge(request, challenger) - except ValueError: - # didn't receive the expected challenge -> nothing more this policy can do - return challenger - - await self._handle_challenge(request, challenge) - response = await self.next.send(request) - - if response.http_response.status_code == 401: - # any cached token must be invalid - self._token = None - - # cached challenge could be outdated; maybe this response has a new one? - try: - challenge = _update_challenge(request, response) - except ValueError: - # 401 with no legible challenge -> nothing more this policy can do - return response - - await self._handle_challenge(request, challenge) - response = await self.next.send(request) - - return response - - async def _handle_challenge(self, request: "PipelineRequest", challenge: "HttpChallenge") -> None: - """authenticate according to challenge, add Authorization header to request""" - - if self._need_new_token: + challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) + if challenge: + # Note that if the vault has moved to a new tenant since our last request for it, this request will fail. + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = await self._credential.get_token(scope, tenant_id=challenge.tenant_id) + + # ignore mypy's warning -- although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return + + # else: discover authentication information by eliciting a challenge from Key Vault. Remove any request data, + # saving it for later. Key Vault will reject the request as unauthorized and respond with a challenge. + # on_challenge will parse that challenge, reattach any body removed here, authorize the request, and tell + # super to send it again. + if request.http_request.body: + request.context["key_vault_request_data"] = request.http_request.body + request.http_request.set_json_body(None) + request.http_request.headers["Content-Length"] = "0" + + + async def on_challenge(self, request: "PipelineRequest", response: "PipelineResponse") -> bool: + try: + challenge = _update_challenge(request, response) # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource scope = challenge.get_scope() or challenge.get_resource() + "/.default" - self._token = await self._credential.get_token(scope) + except ValueError: + return False + + body = request.context.pop("key_vault_request_data", None) + request.http_request.set_text_body(body) # no-op when text is None + await self.authorize_request(request, scope, tenant_id=challenge.tenant_id) + + return True - # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token - request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + @property + def _need_new_token(self) -> bool: + # pylint:disable=invalid-overridden-method + return not self._token or self._token.expires_on - time.time() < 300 diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py index 3239032e9162..7f6f2b93f0e4 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/challenge_auth_policy.py @@ -14,13 +14,11 @@ protocol again. """ -import copy import time from azure.core.exceptions import ServiceRequestError -from azure.core.pipeline import PipelineContext, PipelineRequest -from azure.core.pipeline.policies import HTTPPolicy -from azure.core.pipeline.transport import HttpRequest +from azure.core.pipeline import PipelineRequest +from azure.core.pipeline.policies import BearerTokenCredentialPolicy from .http_challenge import HttpChallenge from . import http_challenge_cache as ChallengeCache @@ -44,22 +42,6 @@ def _enforce_tls(request): ) -def _get_challenge_request(request): - # type: (PipelineRequest) -> PipelineRequest - - # The challenge request is intended to provoke an authentication challenge from Key Vault, to learn how the - # service request should be authenticated. It should be identical to the service request but with no body. - challenge_request = HttpRequest( - request.http_request.method, request.http_request.url, headers=request.http_request.headers - ) - challenge_request.headers["Content-Length"] = "0" - - options = copy.deepcopy(request.context.options) - context = PipelineContext(request.context.transport, **options) - - return PipelineRequest(http_request=challenge_request, context=context) - - def _update_challenge(request, challenger): # type: (PipelineRequest, PipelineResponse) -> HttpChallenge """parse challenge from challenger, cache it, return it""" @@ -73,68 +55,55 @@ def _update_challenge(request, challenger): return challenge -class ChallengeAuthPolicyBase(object): - """Sans I/O base for challenge authentication policies""" - - def __init__(self, **kwargs): - self._token = None # type: Optional[AccessToken] - super(ChallengeAuthPolicyBase, self).__init__(**kwargs) - - @property - def _need_new_token(self): - # type: () -> bool - return not self._token or self._token.expires_on - time.time() < 300 - - -class ChallengeAuthPolicy(ChallengeAuthPolicyBase, HTTPPolicy): +class ChallengeAuthPolicy(BearerTokenCredentialPolicy): """policy for handling HTTP authentication challenges""" - def __init__(self, credential, **kwargs): - # type: (TokenCredential, **Any) -> None + def __init__(self, credential, *scopes, **kwargs): + # type: (TokenCredential, *str, **Any) -> None + super(ChallengeAuthPolicy, self).__init__(credential, *scopes, **kwargs) self._credential = credential - super(ChallengeAuthPolicy, self).__init__(**kwargs) + self._token = None # type: Optional[AccessToken] - def send(self, request): - # type: (PipelineRequest) -> PipelineResponse + def on_request(self, request): + # type: (PipelineRequest) -> None _enforce_tls(request) - challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) - if not challenge: - challenge_request = _get_challenge_request(request) - challenger = self.next.send(challenge_request) - try: - challenge = _update_challenge(request, challenger) - except ValueError: - # didn't receive the expected challenge -> nothing more this policy can do - return challenger - - self._handle_challenge(request, challenge) - response = self.next.send(request) - - if response.http_response.status_code == 401: - # any cached token must be invalid - self._token = None - - # cached challenge could be outdated; maybe this response has a new one? - try: - challenge = _update_challenge(request, response) - except ValueError: - # 401 with no legible challenge -> nothing more this policy can do - return response - - self._handle_challenge(request, challenge) - response = self.next.send(request) - - return response - - def _handle_challenge(self, request, challenge): - # type: (PipelineRequest, HttpChallenge) -> None - """authenticate according to challenge, add Authorization header to request""" - - if self._need_new_token: + if challenge: + # Note that if the vault has moved to a new tenant since our last request for it, this request will fail. + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = self._credential.get_token(scope, tenant_id=challenge.tenant_id) + + # ignore mypy's warning -- although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return + + # else: discover authentication information by eliciting a challenge from Key Vault. Remove any request data, + # saving it for later. Key Vault will reject the request as unauthorized and respond with a challenge. + # on_challenge will parse that challenge, reattach any body removed here, authorize the request, and tell + # super to send it again. + if request.http_request.body: + request.context["key_vault_request_data"] = request.http_request.body + request.http_request.set_json_body(None) + request.http_request.headers["Content-Length"] = "0" + + def on_challenge(self, request, response): + # type: (PipelineRequest, PipelineResponse) -> bool + try: + challenge = _update_challenge(request, response) # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource scope = challenge.get_scope() or challenge.get_resource() + "/.default" - self._token = self._credential.get_token(scope) + except ValueError: + return False + + body = request.context.pop("key_vault_request_data", None) + request.http_request.set_text_body(body) # no-op when text is None + self.authorize_request(request, scope, tenant_id=challenge.tenant_id) - # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token - request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return True + + @property + def _need_new_token(self): + # type: () -> bool + return not self._token or self._token.expires_on - time.time() < 300 diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/http_challenge.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/http_challenge.py index c762e1ae50ef..c52c90929ad9 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/http_challenge.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_shared/http_challenge.py @@ -40,6 +40,11 @@ def __init__(self, request_uri, challenge, response_headers=None): if "authorization" not in self._parameters and "authorization_uri" not in self._parameters: raise ValueError("Invalid challenge parameters") + authorization_uri = self.get_authorization_server() + # the authoritzation server URI should look something like https://login.windows.net/tenant-id + uri_path = parse.urlparse(authorization_uri).path.lstrip("/") + self.tenant_id = uri_path.split("/")[0] or None + # if the response headers were supplied if response_headers: # get the message signing key and message key encryption key from the headers diff --git a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_version.py b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_version.py index 56befbde59cd..ae9ef834f0f2 100644 --- a/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_version.py +++ b/sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "4.4.0b2" +VERSION = "4.4.0b3" diff --git a/sdk/keyvault/azure-keyvault-certificates/setup.py b/sdk/keyvault/azure-keyvault-certificates/setup.py index e9d54c896c34..5eeceb33b647 100644 --- a/sdk/keyvault/azure-keyvault-certificates/setup.py +++ b/sdk/keyvault/azure-keyvault-certificates/setup.py @@ -83,7 +83,7 @@ ] ), install_requires=[ - "azure-core<2.0.0,>=1.7.0", + "azure-core<2.0.0,>=1.15.0", "msrest>=0.6.21", "azure-common~=1.1", ], diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py index 07a5201ecf78..7b74697e7b94 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client.py @@ -596,16 +596,20 @@ def test_logging_enabled(self, client, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) + # the body of the request should be JSON + body = json.loads(section) if body["provider"] == "Test": + mock_handler.close() return except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON pass + mock_handler.close() assert False, "Expected request body wasn't logged" @logging_disabled() @@ -622,15 +626,21 @@ def test_logging_disabled(self, client, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) - assert body["provider"] != "Test", "Client request body was logged" + # the body of the request should be JSON + body = json.loads(section) + if body["provider"] == "Test": + mock_handler.close() + assert False, "Client request body was logged" except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON pass + mock_handler.close() + @only_2016_10_01() @client_setup def test_models(self, client, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py index beb97d41b629..15079d19663e 100644 --- a/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py +++ b/sdk/keyvault/azure-keyvault-certificates/tests/test_certificates_client_async.py @@ -602,16 +602,20 @@ async def test_logging_enabled(self, client, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) + # the body of the request should be JSON + body = json.loads(section) if body["provider"] == "Test": + mock_handler.close() return except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON pass + mock_handler.close() assert False, "Expected request body wasn't logged" @logging_disabled() @@ -628,15 +632,21 @@ async def test_logging_disabled(self, client, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) - assert body["provider"] != "Test", "Client request body was logged" + # the body of the request should be JSON + body = json.loads(section) + if body["provider"] == "Test": + mock_handler.close() + assert False, "Client request body was logged" except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON pass + mock_handler.close() + @all_api_versions() @client_setup async def test_get_certificate_version(self, client, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md b/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md index b8356e3d74a1..629eda735033 100644 --- a/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.5.0b5 (Unreleased) +## 4.5.0b6 (Unreleased) ### Features Added - Added support for automated and on-demand key rotation in Azure Key Vault @@ -14,6 +14,25 @@ ### Other Changes +## 4.5.0b5 (2021-11-11) + +### Features Added +- Added support for multi-tenant authentication when using `azure-identity` 1.7.1 or newer + ([#20698](https://github.com/Azure/azure-sdk-for-python/issues/20698)) + +### Breaking Changes +> These changes do not impact the API of stable versions such as 4.4.0. +> Only code written against a beta version such as 4.5.0b1 may be affected. +- `KeyClient.get_random_bytes` now returns bytes instead of RandomBytes. The RandomBytes class + has been removed +- Renamed the `version` keyword-only argument in `KeyClient.get_cryptography_client` to + `key_version` +- Renamed `KeyReleasePolicy.data` to `KeyReleasePolicy.encoded_policy` +- Renamed the `target` parameter in `KeyClient.release_key` to `target_attestation_token` + +### Other Changes +- Updated minimum `azure-core` version to 1.15.0 + ## 4.5.0b4 (2021-10-07) ### Features Added diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/__init__.py index ffd2301ad26a..b4c48eacf7d4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/__init__.py @@ -13,7 +13,6 @@ KeyRotationPolicy, KeyVaultKey, KeyVaultKeyIdentifier, - RandomBytes, ReleaseKeyResult, ) from ._client import KeyClient @@ -34,7 +33,6 @@ "KeyReleasePolicy", "KeyRotationLifetimeAction", "KeyRotationPolicy", - "RandomBytes", "ReleaseKeyResult", ] diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py index de92436e777e..5ae6d759bed5 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_client.py @@ -9,7 +9,7 @@ from ._shared import KeyVaultClientBase from ._shared.exceptions import error_map as _error_map from ._shared._polling import DeleteRecoverPollingMethod, KeyVaultOperationPoller -from ._models import DeletedKey, KeyVaultKey, KeyProperties, KeyRotationPolicy, RandomBytes, ReleaseKeyResult +from ._models import DeletedKey, KeyVaultKey, KeyProperties, KeyRotationPolicy, ReleaseKeyResult try: from typing import TYPE_CHECKING @@ -67,13 +67,13 @@ def get_cryptography_client(self, key_name, **kwargs): :param str key_name: The name of the key used to perform cryptographic operations. - :keyword str version: Optional version of the key used to perform cryptographic operations. + :keyword str key_version: Optional version of the key used to perform cryptographic operations. :returns: A :class:`~azure.keyvault.keys.crypto.CryptographyClient` using the same options, credentials, and HTTP client as this :class:`~azure.keyvault.keys.KeyClient`. :rtype: ~azure.keyvault.keys.crypto.CryptographyClient """ - key_id = _get_key_id(self._vault_url, key_name, kwargs.get("version")) + key_id = _get_key_id(self._vault_url, key_name, kwargs.get("key_version")) # We provide a fake credential because the generated client already has the KeyClient's real credential return CryptographyClient( @@ -130,7 +130,7 @@ def create_key(self, name, key_type, **kwargs): policy = kwargs.pop("release_policy", None) if policy is not None: - policy = self._models.KeyReleasePolicy(data=policy.data, content_type=policy.content_type) + policy = self._models.KeyReleasePolicy(data=policy.encoded_policy, content_type=policy.content_type) parameters = self._models.KeyCreateParameters( kty=key_type, key_size=kwargs.pop("size", None), @@ -559,7 +559,7 @@ def update_key_properties(self, name, version=None, **kwargs): policy = kwargs.pop("release_policy", None) if policy is not None: - policy = self._models.KeyReleasePolicy(content_type=policy.content_type, data=policy.data) + policy = self._models.KeyReleasePolicy(content_type=policy.content_type, data=policy.encoded_policy) parameters = self._models.KeyUpdateParameters( key_ops=kwargs.pop("key_operations", None), key_attributes=attributes, @@ -676,7 +676,7 @@ def import_key(self, name, key, **kwargs): policy = kwargs.pop("release_policy", None) if policy is not None: - policy = self._models.KeyReleasePolicy(content_type=policy.content_type, data=policy.data) + policy = self._models.KeyReleasePolicy(content_type=policy.content_type, data=policy.encoded_policy) parameters = self._models.KeyImportParameters( key=key._to_generated_model(), key_attributes=attributes, @@ -695,7 +695,7 @@ def import_key(self, name, key, **kwargs): return KeyVaultKey._from_key_bundle(bundle) @distributed_trace - def release_key(self, name, target, version=None, **kwargs): + def release_key(self, name, target_attestation_token, version=None, **kwargs): # type: (str, str, Optional[str], **Any) -> ReleaseKeyResult """Releases a key. @@ -703,7 +703,7 @@ def release_key(self, name, target, version=None, **kwargs): exportable. This operation requires the keys/release permission. :param str name: The name of the key to get. - :param str target: The attestation assertion for the target of the key release. + :param str target_attestation_token: The attestation assertion for the target of the key release. :param str version: (optional) A specific version of the key to release. If unspecified, the latest version is released. @@ -720,7 +720,7 @@ def release_key(self, name, target, version=None, **kwargs): key_name=name, key_version=version or "", parameters=self._models.KeyReleaseParameters( - target=target, nonce=kwargs.pop("nonce", None), enc=kwargs.pop("algorithm", None) + target=target_attestation_token, nonce=kwargs.pop("nonce", None), enc=kwargs.pop("algorithm", None) ), **kwargs ) @@ -728,13 +728,13 @@ def release_key(self, name, target, version=None, **kwargs): @distributed_trace def get_random_bytes(self, count, **kwargs): - # type: (int, **Any) -> RandomBytes + # type: (int, **Any) -> bytes """Get the requested number of random bytes from a managed HSM. :param int count: The requested number of random bytes. :return: The random bytes. - :rtype: ~azure.keyvault.keys.RandomBytes + :rtype: bytes :raises: :class:`ValueError` if less than one random byte is requested, :class:`~azure.core.exceptions.HttpResponseError` for other errors @@ -751,7 +751,7 @@ def get_random_bytes(self, count, **kwargs): raise ValueError("At least one random byte must be requested") parameters = self._models.GetRandomBytesRequest(count=count) result = self._client.get_random_bytes(vault_base_url=self._vault_url, parameters=parameters, **kwargs) - return RandomBytes(value=result.value) + return result.value @distributed_trace def get_key_rotation_policy(self, name, **kwargs): diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py index 021d16d38cc9..55243501eda6 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_models.py @@ -264,7 +264,7 @@ class KeyReleasePolicy(object): def __init__(self, data, **kwargs): # type: (bytes, **Any) -> None - self.data = data + self.encoded_policy = data self.content_type = kwargs.get("content_type", None) @@ -573,13 +573,3 @@ def scheduled_purge_date(self): :rtype: ~datetime.datetime or None """ return self._scheduled_purge_date - - -class RandomBytes(object): - """Contains random bytes returned from a managed HSM. - - :param bytes value: the random bytes - """ - - def __init__(self, value): - self.value = value diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py index 3329ce2df068..d8303b4b081d 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/__init__.py @@ -9,7 +9,7 @@ import urlparse as parse # type: ignore from typing import TYPE_CHECKING -from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase +from .challenge_auth_policy import ChallengeAuthPolicy from .client_base import KeyVaultClientBase from .http_challenge import HttpChallenge from . import http_challenge_cache as HttpChallengeCache @@ -21,7 +21,6 @@ __all__ = [ "ChallengeAuthPolicy", - "ChallengeAuthPolicyBase", "HttpChallenge", "HttpChallengeCache", "KeyVaultClientBase", diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_challenge_auth_policy.py index 97f1d093e20f..bfe46689f5ff 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/async_challenge_auth_policy.py @@ -13,67 +13,69 @@ requirements can change. For example, a vault may move to a new tenant. In such a case the policy will attempt the protocol again. """ + +import time from typing import TYPE_CHECKING -from azure.core.pipeline.policies import AsyncHTTPPolicy +from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy -from . import HttpChallengeCache -from .challenge_auth_policy import _enforce_tls, _get_challenge_request, _update_challenge, ChallengeAuthPolicyBase +from . import http_challenge_cache as ChallengeCache +from .challenge_auth_policy import _enforce_tls, _update_challenge if TYPE_CHECKING: - from typing import Any + from typing import Any, Optional + from azure.core.credentials import AccessToken from azure.core.credentials_async import AsyncTokenCredential - from azure.core.pipeline import PipelineRequest - from azure.core.pipeline.transport import AsyncHttpResponse - from . import HttpChallenge + from azure.core.pipeline import PipelineRequest, PipelineResponse -class AsyncChallengeAuthPolicy(ChallengeAuthPolicyBase, AsyncHTTPPolicy): +class AsyncChallengeAuthPolicy(AsyncBearerTokenCredentialPolicy): """policy for handling HTTP authentication challenges""" - def __init__(self, credential: "AsyncTokenCredential", **kwargs: "Any") -> None: + def __init__(self, credential: "AsyncTokenCredential", *scopes: str, **kwargs: "Any") -> None: + super().__init__(credential, *scopes, **kwargs) self._credential = credential - super(AsyncChallengeAuthPolicy, self).__init__(**kwargs) + self._token = None # type: Optional[AccessToken] - async def send(self, request: "PipelineRequest") -> "AsyncHttpResponse": + async def on_request(self, request: "PipelineRequest") -> None: _enforce_tls(request) - - challenge = HttpChallengeCache.get_challenge_for_url(request.http_request.url) - if not challenge: - challenge_request = _get_challenge_request(request) - challenger = await self.next.send(challenge_request) - try: - challenge = _update_challenge(request, challenger) - except ValueError: - # didn't receive the expected challenge -> nothing more this policy can do - return challenger - - await self._handle_challenge(request, challenge) - response = await self.next.send(request) - - if response.http_response.status_code == 401: - # any cached token must be invalid - self._token = None - - # cached challenge could be outdated; maybe this response has a new one? - try: - challenge = _update_challenge(request, response) - except ValueError: - # 401 with no legible challenge -> nothing more this policy can do - return response - - await self._handle_challenge(request, challenge) - response = await self.next.send(request) - - return response - - async def _handle_challenge(self, request: "PipelineRequest", challenge: "HttpChallenge") -> None: - """authenticate according to challenge, add Authorization header to request""" - - if self._need_new_token: + challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) + if challenge: + # Note that if the vault has moved to a new tenant since our last request for it, this request will fail. + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = await self._credential.get_token(scope, tenant_id=challenge.tenant_id) + + # ignore mypy's warning -- although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return + + # else: discover authentication information by eliciting a challenge from Key Vault. Remove any request data, + # saving it for later. Key Vault will reject the request as unauthorized and respond with a challenge. + # on_challenge will parse that challenge, reattach any body removed here, authorize the request, and tell + # super to send it again. + if request.http_request.body: + request.context["key_vault_request_data"] = request.http_request.body + request.http_request.set_json_body(None) + request.http_request.headers["Content-Length"] = "0" + + + async def on_challenge(self, request: "PipelineRequest", response: "PipelineResponse") -> bool: + try: + challenge = _update_challenge(request, response) # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource scope = challenge.get_scope() or challenge.get_resource() + "/.default" - self._token = await self._credential.get_token(scope) + except ValueError: + return False + + body = request.context.pop("key_vault_request_data", None) + request.http_request.set_text_body(body) # no-op when text is None + await self.authorize_request(request, scope, tenant_id=challenge.tenant_id) + + return True - # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token - request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + @property + def _need_new_token(self) -> bool: + # pylint:disable=invalid-overridden-method + return not self._token or self._token.expires_on - time.time() < 300 diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/challenge_auth_policy.py index 3239032e9162..7f6f2b93f0e4 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/challenge_auth_policy.py @@ -14,13 +14,11 @@ protocol again. """ -import copy import time from azure.core.exceptions import ServiceRequestError -from azure.core.pipeline import PipelineContext, PipelineRequest -from azure.core.pipeline.policies import HTTPPolicy -from azure.core.pipeline.transport import HttpRequest +from azure.core.pipeline import PipelineRequest +from azure.core.pipeline.policies import BearerTokenCredentialPolicy from .http_challenge import HttpChallenge from . import http_challenge_cache as ChallengeCache @@ -44,22 +42,6 @@ def _enforce_tls(request): ) -def _get_challenge_request(request): - # type: (PipelineRequest) -> PipelineRequest - - # The challenge request is intended to provoke an authentication challenge from Key Vault, to learn how the - # service request should be authenticated. It should be identical to the service request but with no body. - challenge_request = HttpRequest( - request.http_request.method, request.http_request.url, headers=request.http_request.headers - ) - challenge_request.headers["Content-Length"] = "0" - - options = copy.deepcopy(request.context.options) - context = PipelineContext(request.context.transport, **options) - - return PipelineRequest(http_request=challenge_request, context=context) - - def _update_challenge(request, challenger): # type: (PipelineRequest, PipelineResponse) -> HttpChallenge """parse challenge from challenger, cache it, return it""" @@ -73,68 +55,55 @@ def _update_challenge(request, challenger): return challenge -class ChallengeAuthPolicyBase(object): - """Sans I/O base for challenge authentication policies""" - - def __init__(self, **kwargs): - self._token = None # type: Optional[AccessToken] - super(ChallengeAuthPolicyBase, self).__init__(**kwargs) - - @property - def _need_new_token(self): - # type: () -> bool - return not self._token or self._token.expires_on - time.time() < 300 - - -class ChallengeAuthPolicy(ChallengeAuthPolicyBase, HTTPPolicy): +class ChallengeAuthPolicy(BearerTokenCredentialPolicy): """policy for handling HTTP authentication challenges""" - def __init__(self, credential, **kwargs): - # type: (TokenCredential, **Any) -> None + def __init__(self, credential, *scopes, **kwargs): + # type: (TokenCredential, *str, **Any) -> None + super(ChallengeAuthPolicy, self).__init__(credential, *scopes, **kwargs) self._credential = credential - super(ChallengeAuthPolicy, self).__init__(**kwargs) + self._token = None # type: Optional[AccessToken] - def send(self, request): - # type: (PipelineRequest) -> PipelineResponse + def on_request(self, request): + # type: (PipelineRequest) -> None _enforce_tls(request) - challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) - if not challenge: - challenge_request = _get_challenge_request(request) - challenger = self.next.send(challenge_request) - try: - challenge = _update_challenge(request, challenger) - except ValueError: - # didn't receive the expected challenge -> nothing more this policy can do - return challenger - - self._handle_challenge(request, challenge) - response = self.next.send(request) - - if response.http_response.status_code == 401: - # any cached token must be invalid - self._token = None - - # cached challenge could be outdated; maybe this response has a new one? - try: - challenge = _update_challenge(request, response) - except ValueError: - # 401 with no legible challenge -> nothing more this policy can do - return response - - self._handle_challenge(request, challenge) - response = self.next.send(request) - - return response - - def _handle_challenge(self, request, challenge): - # type: (PipelineRequest, HttpChallenge) -> None - """authenticate according to challenge, add Authorization header to request""" - - if self._need_new_token: + if challenge: + # Note that if the vault has moved to a new tenant since our last request for it, this request will fail. + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = self._credential.get_token(scope, tenant_id=challenge.tenant_id) + + # ignore mypy's warning -- although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return + + # else: discover authentication information by eliciting a challenge from Key Vault. Remove any request data, + # saving it for later. Key Vault will reject the request as unauthorized and respond with a challenge. + # on_challenge will parse that challenge, reattach any body removed here, authorize the request, and tell + # super to send it again. + if request.http_request.body: + request.context["key_vault_request_data"] = request.http_request.body + request.http_request.set_json_body(None) + request.http_request.headers["Content-Length"] = "0" + + def on_challenge(self, request, response): + # type: (PipelineRequest, PipelineResponse) -> bool + try: + challenge = _update_challenge(request, response) # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource scope = challenge.get_scope() or challenge.get_resource() + "/.default" - self._token = self._credential.get_token(scope) + except ValueError: + return False + + body = request.context.pop("key_vault_request_data", None) + request.http_request.set_text_body(body) # no-op when text is None + self.authorize_request(request, scope, tenant_id=challenge.tenant_id) - # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token - request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return True + + @property + def _need_new_token(self): + # type: () -> bool + return not self._token or self._token.expires_on - time.time() < 300 diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/http_challenge.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/http_challenge.py index c762e1ae50ef..c52c90929ad9 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/http_challenge.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_shared/http_challenge.py @@ -40,6 +40,11 @@ def __init__(self, request_uri, challenge, response_headers=None): if "authorization" not in self._parameters and "authorization_uri" not in self._parameters: raise ValueError("Invalid challenge parameters") + authorization_uri = self.get_authorization_server() + # the authoritzation server URI should look something like https://login.windows.net/tenant-id + uri_path = parse.urlparse(authorization_uri).path.lstrip("/") + self.tenant_id = uri_path.split("/")[0] or None + # if the response headers were supplied if response_headers: # get the message signing key and message key encryption key from the headers diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_version.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_version.py index a04d110e1ca0..165ba268a7fe 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_version.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/_version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "4.5.0b5" +VERSION = "4.5.0b6" diff --git a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py index 73a7169da3ef..1ff12598d6d8 100644 --- a/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py +++ b/sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/aio/_client.py @@ -19,7 +19,6 @@ KeyProperties, KeyRotationPolicy, KeyVaultKey, - RandomBytes, ReleaseKeyResult, ) @@ -68,13 +67,13 @@ def get_cryptography_client(self, key_name, **kwargs): :param str key_name: The name of the key used to perform cryptographic operations. - :keyword str version: Optional version of the key used to perform cryptographic operations. + :keyword str key_version: Optional version of the key used to perform cryptographic operations. :returns: A :class:`~azure.keyvault.keys.crypto.aio.CryptographyClient` using the same options, credentials, and HTTP client as this :class:`~azure.keyvault.keys.aio.KeyClient`. :rtype: ~azure.keyvault.keys.crypto.aio.CryptographyClient """ - key_id = _get_key_id(self._vault_url, key_name, kwargs.get("version")) + key_id = _get_key_id(self._vault_url, key_name, kwargs.get("key_version")) # We provide a fake credential because the generated client already has the KeyClient's real credential return CryptographyClient( @@ -130,7 +129,7 @@ async def create_key(self, name: str, key_type: "Union[str, KeyType]", **kwargs: policy = kwargs.pop("release_policy", None) if policy is not None: - policy = self._models.KeyReleasePolicy(data=policy.data, content_type=policy.content_type) + policy = self._models.KeyReleasePolicy(data=policy.encoded_policy, content_type=policy.content_type) parameters = self._models.KeyCreateParameters( kty=key_type, key_size=kwargs.pop("size", None), @@ -541,7 +540,7 @@ async def update_key_properties(self, name: str, version: "Optional[str]" = None policy = kwargs.pop("release_policy", None) if policy is not None: - policy = self._models.KeyReleasePolicy(content_type=policy.content_type, data=policy.data) + policy = self._models.KeyReleasePolicy(content_type=policy.content_type, data=policy.encoded_policy) parameters = self._models.KeyUpdateParameters( key_ops=kwargs.pop("key_operations", None), key_attributes=attributes, @@ -655,7 +654,7 @@ async def import_key(self, name: str, key: JsonWebKey, **kwargs: "Any") -> KeyVa policy = kwargs.pop("release_policy", None) if policy is not None: - policy = self._models.KeyReleasePolicy(content_type=policy.content_type, data=policy.data) + policy = self._models.KeyReleasePolicy(content_type=policy.content_type, data=policy.encoded_policy) parameters = self._models.KeyImportParameters( key=key._to_generated_model(), key_attributes=attributes, @@ -675,7 +674,7 @@ async def import_key(self, name: str, key: JsonWebKey, **kwargs: "Any") -> KeyVa @distributed_trace_async async def release_key( - self, name: str, target: str, version: "Optional[str]" = None, **kwargs: "Any" + self, name: str, target_attestation_token: str, version: "Optional[str]" = None, **kwargs: "Any" ) -> ReleaseKeyResult: """Releases a key. @@ -683,7 +682,7 @@ async def release_key( exportable. This operation requires the keys/release permission. :param str name: The name of the key to get. - :param str target: The attestation assertion for the target of the key release. + :param str target_attestation_token: The attestation assertion for the target of the key release. :param str version: (optional) A specific version of the key to release. If unspecified, the latest version is released. @@ -700,20 +699,20 @@ async def release_key( key_name=name, key_version=version or "", parameters=self._models.KeyReleaseParameters( - target=target, nonce=kwargs.pop("nonce", None), enc=kwargs.pop("algorithm", None) + target=target_attestation_token, nonce=kwargs.pop("nonce", None), enc=kwargs.pop("algorithm", None) ), **kwargs ) return ReleaseKeyResult(result.value) @distributed_trace_async - async def get_random_bytes(self, count: int, **kwargs: "Any") -> RandomBytes: + async def get_random_bytes(self, count: int, **kwargs: "Any") -> bytes: """Get the requested number of random bytes from a managed HSM. :param int count: The requested number of random bytes. :return: The random bytes. - :rtype: ~azure.keyvault.keys.RandomBytes + :rtype: bytes :raises: :class:`ValueError` if less than one random byte is requested, :class:`~azure.core.exceptions.HttpResponseError` for other errors @@ -730,7 +729,7 @@ async def get_random_bytes(self, count: int, **kwargs: "Any") -> RandomBytes: raise ValueError("At least one random byte must be requested") parameters = self._models.GetRandomBytesRequest(count=count) result = await self._client.get_random_bytes(vault_base_url=self._vault_url, parameters=parameters, **kwargs) - return RandomBytes(value=result.value) + return result.value @distributed_trace_async async def get_key_rotation_policy(self, name: str, **kwargs: "Any") -> "KeyRotationPolicy": diff --git a/sdk/keyvault/azure-keyvault-keys/setup.py b/sdk/keyvault/azure-keyvault-keys/setup.py index 3a12c3d53b5d..400544558a44 100644 --- a/sdk/keyvault/azure-keyvault-keys/setup.py +++ b/sdk/keyvault/azure-keyvault-keys/setup.py @@ -82,7 +82,7 @@ ] ), install_requires=[ - "azure-core<2.0.0,>=1.7.0", + "azure-core<2.0.0,>=1.15.0", "cryptography>=2.1.4", "msrest>=0.6.21", "azure-common~=1.1", diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth.test_multitenant_authentication_7_3_preview_mhsm.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth.test_multitenant_authentication_7_3_preview_mhsm.yaml new file mode 100644 index 000000000000..01d1a918d4e9 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth.test_multitenant_authentication_7_3_preview_mhsm.yaml @@ -0,0 +1,173 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-keybfb31bb2/create?api-version=7.3-preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + content-length: + - '0' + content-security-policy: + - default-src 'self' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains + www-authenticate: + - Bearer authorization="https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://managedhsm.azure.net" + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-ms-server-latency: + - '1' + status: + code: 401 + message: Unauthorized +- request: + body: '{"kty": "RSA"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '14' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-keybfb31bb2/create?api-version=7.3-preview + response: + body: + string: '{"attributes":{"created":1636415841,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1636415841},"key":{"e":"AQAB","key_ops":["wrapKey","sign","verify","encrypt","decrypt","unwrapKey"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-keybfb31bb2/818c3c2903cc06289eaacf1a2070d5bd","kty":"RSA-HSM","n":"ncexSVGCn8VKmtNlZJAtTYK80rexx2xO_v_WOFuqCz3VYxqy7bzU2dsL3PWp66SqdU-OEXJ3jfuvyk4JCO2uYf8QF-7kVKCeB0N93pqh-2hMi_mDVaT0iMpB-USuJA34K0tDsouDa1B86WlXDeh1OBMFM4H_tVgDwgwS-zHXfM0L2UmTjekXSj5XRG2vaUztlIxfYKRrw4lSi5sRLv7VXiS-HWZG4x1U9miyCKtPdqAWqkqZ9O5yOQZ-B0Hk5yeO8TWbfMgyUc61H8ga3p0KExiLJatSCNPaxeOzlf-Eqb2g5pEFR74Nk9d_HkvW0bWs1elcMxZPehG_aF76U3GYwQ"}}' + headers: + cache-control: + - no-cache + content-length: + - '741' + content-security-policy: + - default-src 'self' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; + x-ms-keyvault-region: + - westus + x-ms-server-latency: + - '393' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-keybfb31bb2/?api-version=7.3-preview + response: + body: + string: '{"attributes":{"created":1636415841,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1636415841},"key":{"e":"AQAB","key_ops":["unwrapKey","decrypt","encrypt","verify","sign","wrapKey"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-keybfb31bb2/818c3c2903cc06289eaacf1a2070d5bd","kty":"RSA-HSM","n":"ncexSVGCn8VKmtNlZJAtTYK80rexx2xO_v_WOFuqCz3VYxqy7bzU2dsL3PWp66SqdU-OEXJ3jfuvyk4JCO2uYf8QF-7kVKCeB0N93pqh-2hMi_mDVaT0iMpB-USuJA34K0tDsouDa1B86WlXDeh1OBMFM4H_tVgDwgwS-zHXfM0L2UmTjekXSj5XRG2vaUztlIxfYKRrw4lSi5sRLv7VXiS-HWZG4x1U9miyCKtPdqAWqkqZ9O5yOQZ-B0Hk5yeO8TWbfMgyUc61H8ga3p0KExiLJatSCNPaxeOzlf-Eqb2g5pEFR74Nk9d_HkvW0bWs1elcMxZPehG_aF76U3GYwQ"}}' + headers: + cache-control: + - no-cache + content-length: + - '741' + content-security-policy: + - default-src 'self' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-ms-build-version: + - 1.0.20210929-1-5b78c022-develop + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; + x-ms-keyvault-region: + - westus + x-ms-server-latency: + - '90' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-keybfb31bb2/?api-version=7.3-preview + response: + body: + string: '{"attributes":{"created":1636415841,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1636415841},"key":{"e":"AQAB","key_ops":["unwrapKey","decrypt","encrypt","verify","sign","wrapKey"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-keybfb31bb2/818c3c2903cc06289eaacf1a2070d5bd","kty":"RSA-HSM","n":"ncexSVGCn8VKmtNlZJAtTYK80rexx2xO_v_WOFuqCz3VYxqy7bzU2dsL3PWp66SqdU-OEXJ3jfuvyk4JCO2uYf8QF-7kVKCeB0N93pqh-2hMi_mDVaT0iMpB-USuJA34K0tDsouDa1B86WlXDeh1OBMFM4H_tVgDwgwS-zHXfM0L2UmTjekXSj5XRG2vaUztlIxfYKRrw4lSi5sRLv7VXiS-HWZG4x1U9miyCKtPdqAWqkqZ9O5yOQZ-B0Hk5yeO8TWbfMgyUc61H8ga3p0KExiLJatSCNPaxeOzlf-Eqb2g5pEFR74Nk9d_HkvW0bWs1elcMxZPehG_aF76U3GYwQ"}}' + headers: + cache-control: + - no-cache + content-length: + - '741' + content-security-policy: + - default-src 'self' + content-type: + - application/json; charset=utf-8 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-frame-options: + - SAMEORIGIN + x-ms-build-version: + - 1.0.20210929-1-5b78c022-develop + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; + x-ms-keyvault-region: + - westus + x-ms-server-latency: + - '0' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth.test_multitenant_authentication_7_3_preview_vault.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth.test_multitenant_authentication_7_3_preview_vault.yaml new file mode 100644 index 000000000000..c251debdac2a --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth.test_multitenant_authentication_7_3_preview_vault.yaml @@ -0,0 +1,190 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keydbee1c29/create?api-version=7.3-preview + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: + - no-cache + content-length: + - '97' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 08 Nov 2021 23:57:24 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + www-authenticate: + - Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.9.150.1 + x-powered-by: + - ASP.NET + status: + code: 401 + message: Unauthorized +- request: + body: '{"kty": "RSA"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '14' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keydbee1c29/create?api-version=7.3-preview + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keydbee1c29/fae15351fde54b7384e4145ab181b03f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yP2jt3YHJ3Kc46lv-pZtzI0iZZkbsXVwmO-GAe3kBlPeyzbFI6oT7KeUuwtVW0410mOdOUGCGWVk_BoXW09s49ScUPz0JPA8Hyc64y3MgW2u8frHWLq6EJsB7c4Sjz0oK2HwdNqLgRsmQ4DdzoXp5os2NQ0qt_hB39VNR1RL9J_25xevw7VUGiQfOcEYwTKYYnhLoxK_j74oRbd42-Ecck8riN76kL--Sp-3bqNX2fx3HzQVr8Vo4_wL84Stj64gAAJZ3q4J53qNeUfx7e99qJvBFBICTWiQq5b3y0wkcAxk6Bhq_2MB_WnZReaZ3pCm-XhJJU9MqwQ1Phkgb8bv8Q","e":"AQAB"},"attributes":{"enabled":true,"created":1636415845,"updated":1636415845,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}' + headers: + cache-control: + - no-cache + content-length: + - '701' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 08 Nov 2021 23:57:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.9.150.1 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keydbee1c29/?api-version=7.3-preview + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keydbee1c29/fae15351fde54b7384e4145ab181b03f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yP2jt3YHJ3Kc46lv-pZtzI0iZZkbsXVwmO-GAe3kBlPeyzbFI6oT7KeUuwtVW0410mOdOUGCGWVk_BoXW09s49ScUPz0JPA8Hyc64y3MgW2u8frHWLq6EJsB7c4Sjz0oK2HwdNqLgRsmQ4DdzoXp5os2NQ0qt_hB39VNR1RL9J_25xevw7VUGiQfOcEYwTKYYnhLoxK_j74oRbd42-Ecck8riN76kL--Sp-3bqNX2fx3HzQVr8Vo4_wL84Stj64gAAJZ3q4J53qNeUfx7e99qJvBFBICTWiQq5b3y0wkcAxk6Bhq_2MB_WnZReaZ3pCm-XhJJU9MqwQ1Phkgb8bv8Q","e":"AQAB"},"attributes":{"enabled":true,"created":1636415845,"updated":1636415845,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}' + headers: + cache-control: + - no-cache + content-length: + - '701' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 08 Nov 2021 23:57:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.9.150.1 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keydbee1c29/?api-version=7.3-preview + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keydbee1c29/fae15351fde54b7384e4145ab181b03f","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yP2jt3YHJ3Kc46lv-pZtzI0iZZkbsXVwmO-GAe3kBlPeyzbFI6oT7KeUuwtVW0410mOdOUGCGWVk_BoXW09s49ScUPz0JPA8Hyc64y3MgW2u8frHWLq6EJsB7c4Sjz0oK2HwdNqLgRsmQ4DdzoXp5os2NQ0qt_hB39VNR1RL9J_25xevw7VUGiQfOcEYwTKYYnhLoxK_j74oRbd42-Ecck8riN76kL--Sp-3bqNX2fx3HzQVr8Vo4_wL84Stj64gAAJZ3q4J53qNeUfx7e99qJvBFBICTWiQq5b3y0wkcAxk6Bhq_2MB_WnZReaZ3pCm-XhJJU9MqwQ1Phkgb8bv8Q","e":"AQAB"},"attributes":{"enabled":true,"created":1636415845,"updated":1636415845,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}' + headers: + cache-control: + - no-cache + content-length: + - '701' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 08 Nov 2021 23:57:25 GMT + expires: + - '-1' + pragma: + - no-cache + strict-transport-security: + - max-age=31536000;includeSubDomains + x-content-type-options: + - nosniff + x-ms-keyvault-network-info: + - conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: + - westus + x-ms-keyvault-service-version: + - 1.9.150.1 + x-powered-by: + - ASP.NET + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_2016_10_01_vault.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_2016_10_01_vault.yaml new file mode 100644 index 000000000000..eb3682928b17 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_2016_10_01_vault.yaml @@ -0,0 +1,71 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key62211cc5/create?api-version=2016-10-01 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: no-cache + content-length: '97' + content-type: application/json; charset=utf-8 + date: Fri, 05 Nov 2021 16:55:28 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-key62211cc5/create?api-version=2016-10-01 +- request: + body: '{"kty": "RSA"}' + headers: + Accept: + - application/json + Content-Length: + - '14' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key62211cc5/create?api-version=2016-10-01 + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key62211cc5/2fe8efc82a53428b9d5bbc5ea90dc276","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"6qDo5N0hCCRwO1IVj0XFfjFsJjno0YClIjURSlKFUOX7YIluWkw2o6RUKGyDQujcYpVj9Q8Y6NfeZn3quJUBIRHa02ir0ToghrJ9-X4c_hg8ijTt-Ag70WmkHOKvriZgVvbhu-9YwqBa_C1k65uulqz4TujXKakfcB5i4Z7RdGdxhrEdh2vRdgLu9UIv0Rn3eLb5bPjlNMpb44XiqXBP_TT_2TKSHZg2YRMx-jFNGqJAq8qb0PbM4dM8TODH76xV4_15bT49yTE_PuHA9jKYcC9H-rkPa-xhL6q9PFhKLEN4DX3oveYL0M-qBo8vkDCBkfeiHzUj7dIE_cEZ4erDgQ","e":"AQAB"},"attributes":{"enabled":true,"created":1636131329,"updated":1636131329,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '680' + content-type: application/json; charset=utf-8 + date: Fri, 05 Nov 2021 16:55:29 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-key62211cc5/create?api-version=2016-10-01 +version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_0_vault.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_0_vault.yaml new file mode 100644 index 000000000000..f441f52f0bbe --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_0_vault.yaml @@ -0,0 +1,71 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keya6b91b42/create?api-version=7.0 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: no-cache + content-length: '97' + content-type: application/json; charset=utf-8 + date: Fri, 05 Nov 2021 16:55:31 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-keya6b91b42/create?api-version=7.0 +- request: + body: '{"kty": "RSA"}' + headers: + Accept: + - application/json + Content-Length: + - '14' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keya6b91b42/create?api-version=7.0 + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keya6b91b42/940432f6b7744d0fa9122d895cb89a2c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"-fBZm71ITwyw2jgr9u422zbHE7zvY6T55146MlEwH4MFOvPxs_EdSbv25ScUGMdVP5lkn4xr64P0lQOjhI6m3nTbWvLFb81Cm5YW8Gt0YleMg_HKZgLqgdPBFDgHANLeioQCNGTkguTJ19L__8r7MhB9YuoQz0kp02-vK1ZaNNvo7lsqDMvBVcQnF-bQ0Wd-SG3oZ4Z_PRtKZMaB44WkHGbSpH8rZ2fJu8ckqSNIU6UsZokLZEy5WsDjndctrrjPFDKmMhTxePewqQ1JxL_I92F25FtW19uK9iCCsyYuBHma9_qjOCONEPNqv9GA3hDEmPqgB50jEnWbDQFzFj280Q","e":"AQAB"},"attributes":{"enabled":true,"created":1636131331,"updated":1636131331,"recoveryLevel":"Recoverable+Purgeable"}}' + headers: + cache-control: no-cache + content-length: '680' + content-type: application/json; charset=utf-8 + date: Fri, 05 Nov 2021 16:55:31 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-keya6b91b42/create?api-version=7.0 +version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_1_vault.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_1_vault.yaml new file mode 100644 index 000000000000..bae43223c033 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_1_vault.yaml @@ -0,0 +1,71 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keya6c01b43/create?api-version=7.1 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: no-cache + content-length: '97' + content-type: application/json; charset=utf-8 + date: Fri, 05 Nov 2021 16:55:34 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-keya6c01b43/create?api-version=7.1 +- request: + body: '{"kty": "RSA"}' + headers: + Accept: + - application/json + Content-Length: + - '14' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keya6c01b43/create?api-version=7.1 + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keya6c01b43/885311947edd4eccbcb7265fb430acef","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"mEKr5BmEhUKeMQ1VT185F2qTEKcyu23WCX__Puze8iviw12lnQyCZ0S-tpOeR37JMJtNY40d4Yc5yCN-DEDeziWILoCrkJRVm3-LYD4p8m_ktjh-yPlG0WL1zNLYHm9G_OipsM0cUXlplEdEIA7Gl-5tCpkVr__yYv_jdDHoVyC8pLYsFkzWMvXXhFyujTUqHKjnMRR_jiMosC0Dc12LoNbM-WcXuhg-ihmomagI2pQ6_E_F1vywbhnqc-oO8KpCPuTbIKR3JnEhffCrOMORVelj6kvEQ4VuTgoY4uuocIJiCcU7UAU86HFDHjH7zkAu_H_e0Chgxp0en4cZxn4RXQ","e":"AQAB"},"attributes":{"enabled":true,"created":1636131334,"updated":1636131334,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}' + headers: + cache-control: no-cache + content-length: '701' + content-type: application/json; charset=utf-8 + date: Fri, 05 Nov 2021 16:55:34 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-keya6c01b43/create?api-version=7.1 +version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_2_mhsm.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_2_mhsm.yaml new file mode 100644 index 000000000000..0ee86866acd2 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_2_mhsm.yaml @@ -0,0 +1,64 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key8b711acd/create?api-version=7.2 + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + content-security-policy: default-src 'self' + content-type: application/json; charset=utf-8 + strict-transport-security: max-age=31536000; includeSubDomains + www-authenticate: Bearer authorization="https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://managedhsm.azure.net" + x-content-type-options: nosniff + x-frame-options: SAMEORIGIN + x-ms-server-latency: '1' + status: + code: 401 + message: Unauthorized + url: https://mcpatinotesthsm.managedhsm.azure.net/keys/livekvtestmultitenant-key8b711acd/create?api-version=7.2 +- request: + body: '{"kty": "RSA"}' + headers: + Accept: + - application/json + Content-Length: + - '14' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key8b711acd/create?api-version=7.2 + response: + body: + string: '{"attributes":{"created":1636131337,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1636131337},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key8b711acd/fed58eedaeb804d1b59ab2bea1dfb796","kty":"RSA-HSM","n":"4UmgdeRIG5a4n9Yb0BazkZ1x4qmn0I8oX7E8lzUG1xnKTn0NkmXRgvjUvlB8pz8074rwS89FlXD3f2r2I7viPK8xqvDSlxWOTfT-5osAQcHBbFlRUd3DIgXDYkpojroOHQq9ygERVTl6yei-Dawq_D50fETMY4Hetjqbi1AhrkA8RM_T56aFzC5hL4WqVFQTZIpMsQTRXAVp598GMl1oMn8AvUKAsPhmRwgwLY8wWOoW6kN60xJPA9cR7QrZAtb6UDJOiPj6yXu4X7ceW4tKu3iVliyKNmZxSD272sCSJqaJlezZrw96Zc8VH3arIc9b-Ku8-Tw8Raxn_o9hHixD7w"}}' + headers: + cache-control: no-cache + content-length: '741' + content-security-policy: default-src 'self' + content-type: application/json; charset=utf-8 + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + x-frame-options: SAMEORIGIN + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; + x-ms-keyvault-region: westus + x-ms-server-latency: '666' + status: + code: 200 + message: OK + url: https://mcpatinotesthsm.managedhsm.azure.net/keys/livekvtestmultitenant-key8b711acd/create?api-version=7.2 +version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_2_vault.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_2_vault.yaml new file mode 100644 index 000000000000..669f41bd0af4 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_2_vault.yaml @@ -0,0 +1,71 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keya6c71b44/create?api-version=7.2 + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: no-cache + content-length: '97' + content-type: application/json; charset=utf-8 + date: Fri, 05 Nov 2021 16:55:39 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-keya6c71b44/create?api-version=7.2 +- request: + body: '{"kty": "RSA"}' + headers: + Accept: + - application/json + Content-Length: + - '14' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keya6c71b44/create?api-version=7.2 + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-keya6c71b44/7e4059bf824742cfb3fc1bfc75fac8cb","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"yY5-Q2uVQjCdv9IJZT2DsJzkV6FolvKSu_1XN4rhN-11TMfZroiVCtBOLeeHTgPEVy9rEonytZihEZcaW2hZmZ-M1FI6WvYabMX4Lqayc8iPrZ6cRcU3ALANla2Rn6UWbrDfiZKJg4yZhJF3Aacl_CsE5NsFkkQpRiabKSU3s_df7zCxHr6xKHdZmwRvsDameyVkkGFchVxj3Ol6t37Z_MZXU24AYyH1tKNKcgcv3dpRP2g-fW91lOJsAsGk6IMLM-efKZc4iGIe6iHseNNQQE_2zBdyFOQpNwqqJV1wFTIjpLuQXpzNPIVxBebWW6RA1vq1L53ie1kr4kHK2fBcZQ","e":"AQAB"},"attributes":{"enabled":true,"created":1636131340,"updated":1636131340,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}' + headers: + cache-control: no-cache + content-length: '701' + content-type: application/json; charset=utf-8 + date: Fri, 05 Nov 2021 16:55:40 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-keya6c71b44/create?api-version=7.2 +version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_3_preview_mhsm.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_3_preview_mhsm.yaml new file mode 100644 index 000000000000..356c41e3422f --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_3_preview_mhsm.yaml @@ -0,0 +1,120 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/create?api-version=7.3-preview + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + content-security-policy: default-src 'self' + content-type: application/json; charset=utf-8 + strict-transport-security: max-age=31536000; includeSubDomains + www-authenticate: Bearer authorization="https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://managedhsm.azure.net" + x-content-type-options: nosniff + x-frame-options: SAMEORIGIN + x-ms-server-latency: '1' + status: + code: 401 + message: Unauthorized + url: https://mcpatinotesthsm.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/create?api-version=7.3-preview +- request: + body: '{"kty": "RSA"}' + headers: + Accept: + - application/json + Content-Length: + - '14' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/create?api-version=7.3-preview + response: + body: + string: '{"attributes":{"created":1636416230,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1636416230},"key":{"e":"AQAB","key_ops":["wrapKey","sign","verify","encrypt","decrypt","unwrapKey"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/b9455b5cd9a34d3b2c3a637e61a550f9","kty":"RSA-HSM","n":"r5y21Ndv_xZgYFpqLHejepFyjnoBIQQ8usaUK0d4K6YyEYVRb2MbokiZqvKoOQ3jcvpOfoFlikEYi207ykpi8ukRjiY-vD_MjjkN_iJRASZZ7Z_jP5NsqGanHLIwQGA5orTH_rRxNeGBmRx6lCxnUT2CKKOOTDEorQK9H1FhaWpekKhdfJDUOVKRy-SER46fRDd7lWwqAQ5uUJ9nP0JM1vF8zeaYXlU7b7TmH4dQsTFeEY9TcRJPCGEnkadHk17l6xHK17DTg9YrVN_T6TcALQLdevVb5wefIF6yHin_1_hwjcTG6WxDorZzP-XVlHplGAXoW_KvJZ_akW-chShkXQ"}}' + headers: + cache-control: no-cache + content-length: '741' + content-security-policy: default-src 'self' + content-type: application/json; charset=utf-8 + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + x-frame-options: SAMEORIGIN + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; + x-ms-keyvault-region: westus + x-ms-server-latency: '376' + status: + code: 200 + message: OK + url: https://mcpatinotesthsm.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/create?api-version=7.3-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/?api-version=7.3-preview + response: + body: + string: '{"attributes":{"created":1636416230,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1636416230},"key":{"e":"AQAB","key_ops":["unwrapKey","decrypt","encrypt","verify","sign","wrapKey"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/b9455b5cd9a34d3b2c3a637e61a550f9","kty":"RSA-HSM","n":"r5y21Ndv_xZgYFpqLHejepFyjnoBIQQ8usaUK0d4K6YyEYVRb2MbokiZqvKoOQ3jcvpOfoFlikEYi207ykpi8ukRjiY-vD_MjjkN_iJRASZZ7Z_jP5NsqGanHLIwQGA5orTH_rRxNeGBmRx6lCxnUT2CKKOOTDEorQK9H1FhaWpekKhdfJDUOVKRy-SER46fRDd7lWwqAQ5uUJ9nP0JM1vF8zeaYXlU7b7TmH4dQsTFeEY9TcRJPCGEnkadHk17l6xHK17DTg9YrVN_T6TcALQLdevVb5wefIF6yHin_1_hwjcTG6WxDorZzP-XVlHplGAXoW_KvJZ_akW-chShkXQ"}}' + headers: + cache-control: no-cache + content-length: '741' + content-security-policy: default-src 'self' + content-type: application/json; charset=utf-8 + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + x-frame-options: SAMEORIGIN + x-ms-build-version: 1.0.20210929-1-5b78c022-develop + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; + x-ms-keyvault-region: westus + x-ms-server-latency: '92' + status: + code: 200 + message: OK + url: https://mcpatinotesthsm.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/?api-version=7.3-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/?api-version=7.3-preview + response: + body: + string: '{"attributes":{"created":1636416230,"enabled":true,"exportable":false,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1636416230},"key":{"e":"AQAB","key_ops":["unwrapKey","decrypt","encrypt","verify","sign","wrapKey"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/b9455b5cd9a34d3b2c3a637e61a550f9","kty":"RSA-HSM","n":"r5y21Ndv_xZgYFpqLHejepFyjnoBIQQ8usaUK0d4K6YyEYVRb2MbokiZqvKoOQ3jcvpOfoFlikEYi207ykpi8ukRjiY-vD_MjjkN_iJRASZZ7Z_jP5NsqGanHLIwQGA5orTH_rRxNeGBmRx6lCxnUT2CKKOOTDEorQK9H1FhaWpekKhdfJDUOVKRy-SER46fRDd7lWwqAQ5uUJ9nP0JM1vF8zeaYXlU7b7TmH4dQsTFeEY9TcRJPCGEnkadHk17l6xHK17DTg9YrVN_T6TcALQLdevVb5wefIF6yHin_1_hwjcTG6WxDorZzP-XVlHplGAXoW_KvJZ_akW-chShkXQ"}}' + headers: + cache-control: no-cache + content-length: '741' + content-security-policy: default-src 'self' + content-type: application/json; charset=utf-8 + strict-transport-security: max-age=31536000; includeSubDomains + x-content-type-options: nosniff + x-frame-options: SAMEORIGIN + x-ms-build-version: 1.0.20210929-1-5b78c022-develop + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; + x-ms-keyvault-region: westus + x-ms-server-latency: '0' + status: + code: 200 + message: OK + url: https://mcpatinotesthsm.managedhsm.azure.net/keys/livekvtestmultitenant-key713c1e2f/?api-version=7.3-preview +version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_3_preview_vault.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_3_preview_vault.yaml new file mode 100644 index 000000000000..840be1178954 --- /dev/null +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_challenge_auth_async.test_multitenant_authentication_7_3_preview_vault.yaml @@ -0,0 +1,129 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Content-Length: + - '0' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/create?api-version=7.3-preview + response: + body: + string: '{"error":{"code":"Unauthorized","message":"AKV10000: Request is missing + a Bearer or PoP token."}}' + headers: + cache-control: no-cache + content-length: '97' + content-type: application/json; charset=utf-8 + date: Tue, 09 Nov 2021 00:03:53 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + www-authenticate: Bearer authorization="https://login.windows.net/72f988bf-86f1-41af-91ab-2d7cd011db47", + resource="https://vault.azure.net" + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 401 + message: Unauthorized + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/create?api-version=7.3-preview +- request: + body: '{"kty": "RSA"}' + headers: + Accept: + - application/json + Content-Length: + - '14' + Content-Type: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/create?api-version=7.3-preview + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/f875421ae9684ee89ffa78d33c4b917c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uh7LV8qFwSDSazU05d4aArOVG7HK72oX8Qvdlq-5FJwPRbbCTU9ZX7BJcI7dnhvQHHpYnvZ54aHaNX4nrqYRJRKv9fgte_ZyGaaBqnUVd_sjf3f8US7O6ayPzhzV-F8x2ML12yeRuXbsquxG05D3_e7OtAm5aSwqHxPoIYKIjh4hI3FtpryM7ECA3op1M9QH4e-_3CGCSbLEomih0_FZ-WkebiHNryYJi2l02p-b-CNAEYlcRpRlZUm8Gt6ZtKJ-YvaT1uvPw83DSW6Q_LDjhojmswJBUYCtWszDjBbcUsi5dKD0Zo7--ANcC-66H-CnTM5cF5RRygj1N5l2DU8xyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1636416233,"updated":1636416233,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}' + headers: + cache-control: no-cache + content-length: '701' + content-type: application/json; charset=utf-8 + date: Tue, 09 Nov 2021 00:03:53 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/create?api-version=7.3-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/?api-version=7.3-preview + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/f875421ae9684ee89ffa78d33c4b917c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uh7LV8qFwSDSazU05d4aArOVG7HK72oX8Qvdlq-5FJwPRbbCTU9ZX7BJcI7dnhvQHHpYnvZ54aHaNX4nrqYRJRKv9fgte_ZyGaaBqnUVd_sjf3f8US7O6ayPzhzV-F8x2ML12yeRuXbsquxG05D3_e7OtAm5aSwqHxPoIYKIjh4hI3FtpryM7ECA3op1M9QH4e-_3CGCSbLEomih0_FZ-WkebiHNryYJi2l02p-b-CNAEYlcRpRlZUm8Gt6ZtKJ-YvaT1uvPw83DSW6Q_LDjhojmswJBUYCtWszDjBbcUsi5dKD0Zo7--ANcC-66H-CnTM5cF5RRygj1N5l2DU8xyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1636416233,"updated":1636416233,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}' + headers: + cache-control: no-cache + content-length: '701' + content-type: application/json; charset=utf-8 + date: Tue, 09 Nov 2021 00:03:54 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/?api-version=7.3-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/?api-version=7.3-preview + response: + body: + string: '{"key":{"kid":"https://vaultname.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/f875421ae9684ee89ffa78d33c4b917c","kty":"RSA","key_ops":["encrypt","decrypt","sign","verify","wrapKey","unwrapKey"],"n":"uh7LV8qFwSDSazU05d4aArOVG7HK72oX8Qvdlq-5FJwPRbbCTU9ZX7BJcI7dnhvQHHpYnvZ54aHaNX4nrqYRJRKv9fgte_ZyGaaBqnUVd_sjf3f8US7O6ayPzhzV-F8x2ML12yeRuXbsquxG05D3_e7OtAm5aSwqHxPoIYKIjh4hI3FtpryM7ECA3op1M9QH4e-_3CGCSbLEomih0_FZ-WkebiHNryYJi2l02p-b-CNAEYlcRpRlZUm8Gt6ZtKJ-YvaT1uvPw83DSW6Q_LDjhojmswJBUYCtWszDjBbcUsi5dKD0Zo7--ANcC-66H-CnTM5cF5RRygj1N5l2DU8xyQ","e":"AQAB"},"attributes":{"enabled":true,"created":1636416233,"updated":1636416233,"recoveryLevel":"Recoverable+Purgeable","recoverableDays":90}}' + headers: + cache-control: no-cache + content-length: '701' + content-type: application/json; charset=utf-8 + date: Tue, 09 Nov 2021 00:03:54 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000;includeSubDomains + x-content-type-options: nosniff + x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=InterNetwork; + x-ms-keyvault-region: westus + x-ms-keyvault-service-version: 1.9.150.1 + x-powered-by: ASP.NET + status: + code: 200 + message: OK + url: https://mcpatinotest.vault.azure.net/keys/livekvtestmultitenant-key8ff41ea6/?api-version=7.3-preview +version: 1 diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_key_release_7_3_preview_mhsm.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_key_release_7_3_preview_mhsm.yaml index aa1faaf12fe0..bb5fa2289eb5 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_key_release_7_3_preview_mhsm.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_key_client.test_key_release_7_3_preview_mhsm.yaml @@ -9,24 +9,24 @@ interactions: Connection: - keep-alive User-Agent: - - python-requests/2.24.0 + - python-requests/2.26.0 method: GET uri: https://fakeattestation.azurewebsites.net/generate-test-token response: body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImpfRUZtUTVVQm9lNHJMNUltNmw1cU1rQXN0QXluaE5JQUJ6dFZLQ0RMV1UiLCJqa3UiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0L2tleXMifQ.eyJpc3MiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0LyIsInNkay10ZXN0Ijp0cnVlLCJ4LW1zLWluaXR0aW1lIjp7fSwieC1tcy1ydW50aW1lIjp7ImtleXMiOlt7Imt0eSI6IlJTQSIsImtpZCI6ImZha2UtcmVsZWFzZS1rZXkiLCJ1c2UiOiJlbmMiLCJlIjoiQVFBQiIsIm4iOiJvUThCNWxPMTdBLXJVY0xYVXE1NTExUkNRZ0pNV3A4Y0NLcXpwdS1pY2x3cEpXamRPTzlraWJLYllmb2syQ2U2WmtaYmJ6QTdXck1NNU5Za29oUWhtR2haaENZR0tIZERxbGx2akxlc2lBTlA2N093RkVqTmx4Y29SRVRnR0MtdklxWUZ0cUUzeEtfTTcwS0NieDRvZFhpd2RSb0d5aGp5NXZ1eVdPYTZxSDBaNk1FamdDVDRXXzVGUExuUWdtdXFsZUgtc2hqbE9TamQ3bU9KYXk2YzQ2T3lKaFM2TVlFSnpNeHNOZmZkbXppTWhuLTZDeWRvRExHNzlSNmNtY1BNWXp5eWctbDJ1SnVvZzZodUVvMktwWGFxeEJQOWVEbW1PZlc1cktFRkJRZS1zNC1VQS1BcDByNmJ2YjRIZG9ZZ1JQSERyWW5sMk5PWmpZeWtMMllhT3cifV19LCJtYWEtZWhkIjoic2RrLXRlc3QiLCJpYXQiOjE2Mjc5NDA5NDEsImV4cCI6MTk0MzUxNjk0MX0.EprIoofPyj4ZX3mAr1GLjW6GfYT0nnAJ_tOZaKtC67ngf6epNn-FM3XC3QvkXFinxufFUYJGzqOAABqeApd5-BEPFugIrdGQ95nWNvaBHaxsXnxxMQSvPjh8V3lwmgAFnbtY9KwepcUqRRCBbM9b8-UP970k29SDYgW3UdqG3g5Ho-r0sjUFTKQltNLJEwJRmhH9gAH5djyKmXdCENZELgrc9PxiSZnbnWGJc1kdkV1nIJms6K1Qll3HdbDfLiT8RexiHMGv_VjD9DOENZF6HRJ-1Srs0N5flprpGX-faxbi93BD7Iqknwnyovyq82iWhOotpqtEpu4MFoSZK_euIQ"}' + string: '{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImhMbEtlLXJQRHB1ang4VmpxT2h1Q1RpMFo4NmJRQlh3aUd5bjdMaGlOcVUiLCJqa3UiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0L2tleXMifQ.eyJpc3MiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0LyIsInNkay10ZXN0Ijp0cnVlLCJ4LW1zLWluaXR0aW1lIjp7fSwieC1tcy1ydW50aW1lIjp7ImtleXMiOlt7Imt0eSI6IlJTQSIsImtpZCI6ImZha2UtcmVsZWFzZS1rZXkiLCJ1c2UiOiJlbmMiLCJlIjoiQVFBQiIsIm4iOiJ2aGNJZnQ4VUlUUm9zeHVDQzR4RHR1WDdNZ3BzMmcxZ2ktbTI4NnptVHB0V2JPVXlIRzl3MHp4bHAySk1QUHpfTHpObktsUEZWdGdvdllIaUp4aDdOQ2wxU1NRNlg5LVdza2lsSVAxX291OGI2c1ZpMUZFcGNGMEFVcHB5QXZ2UGJOcGtiWVc0UDhRdEdMQV9uOG55WldfZTNQb2Jva2h5dW52Y2g4RmY0RFVwMXR3Nmo1a0tSdVNpeDRYVDZrNVZjSFJOWXNRTnlqSWJidkFTV1RpM3l3LXdoSk12aGNnZ0VSRDkySE5tME5OdFdLMzNmVTRIb01TV0ktM3hEYzdpNWNvenpnLTh0aXZ4bS1mMFdBUnBsOF92M3FhTWNuYmstaFY5S0ZDUWtkdjRhRXY5STBRS3lSQU96SFFpTTZxQWlMejM0UWhqT1B3aUlOMEI2TzNvOHcifV19LCJtYWEtZWhkIjoic2RrLXRlc3QiLCJpYXQiOjE2MzYxNDEwMzYsImV4cCI6MTk1MTcxNzAzNn0.UVPQpHO2-uw3iWZ8eXITa_n1io6TIv96CNzN9G2gvHIASvmZNLSIf_t4mVaKZlx_VFH81OH2gn72zDX1ikUnTpZUWW0n9dov7mAoc-EukLI0yY2cx45X8ACR2m5EAuUTzDm2Aap14hHqi0i8sEsdwnXlR_rDYbYmRYGqNGrUD-2fa7tba_xUA13qruh3E4cC0hoUYje5Yq6in9YEhK1XDihyfmPwsWsBlLkM8VFpjEq6FPJIi3C_4pD_Rut7_RoFUkd56wPZGmaHjv-JkQ4VPhdI0_KL_BjV5uks98L4NXzedL9i7jJTRQemWJy206XbXksF8sRRU3e9IBFQmVvFrg"}' headers: content-length: - '1305' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:49:00 GMT + - Fri, 05 Nov 2021 19:37:16 GMT etag: - - W/"519-UqSaw2ZFMF7Crs0FXC1TS0vNO1o" + - W/"519-nUOLsMiSFsTmXNnUBmVFW7GlVRw" set-cookie: - - ARRAffinity=31a267ed7b71ec86982412cc9dc4ad2f31ca2b8f51b692363aa765c405b03b84;Path=/;HttpOnly;Secure;Domain=skrattestation.azurewebsites.net - - ARRAffinitySameSite=31a267ed7b71ec86982412cc9dc4ad2f31ca2b8f51b692363aa765c405b03b84;Path=/;HttpOnly;SameSite=None;Secure;Domain=skrattestation.azurewebsites.net + - ARRAffinity=e1388f2ccc1e3d0c72d787dffaa45dc092df8f336d038537355bbb351c2ad028;Path=/;HttpOnly;Secure;Domain=skrattestation.azurewebsites.net + - ARRAffinitySameSite=e1388f2ccc1e3d0c72d787dffaa45dc092df8f336d038537355bbb351c2ad028;Path=/;HttpOnly;SameSite=None;Secure;Domain=skrattestation.azurewebsites.net x-powered-by: - Express status: @@ -46,7 +46,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) method: POST uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef07013ba/create?api-version=7.3-preview response: @@ -71,13 +71,13 @@ interactions: x-frame-options: - SAMEORIGIN x-ms-server-latency: - - '1' + - '0' status: code: 401 message: Unauthorized - request: body: '{"kty": "RSA-HSM", "attributes": {"exportable": true}, "release_policy": - {"data": "eyJhbnlPZiI6IFt7ImFueU9mIjogW3siY2xhaW0iOiAic2RrLXRlc3QiLCAiY29uZGl0aW9uIjogImVxdWFscyIsICJ2YWx1ZSI6IHRydWV9XSwgImF1dGhvcml0eSI6ICJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0In1dLCAidmVyc2lvbiI6ICIxLjAifQ"}}' + {"data": "eyJhbnlPZiI6IFt7ImFueU9mIjogW3siY2xhaW0iOiAic2RrLXRlc3QiLCAiZXF1YWxzIjogdHJ1ZX1dLCAiYXV0aG9yaXR5IjogImh0dHBzOi8vc2tyYXR0ZXN0YXRpb24uYXp1cmV3ZWJzaXRlcy5uZXQvIn1dLCAidmVyc2lvbiI6ICIxLjAuMCJ9"}}' headers: Accept: - application/json @@ -86,16 +86,16 @@ interactions: Connection: - keep-alive Content-Length: - - '300' + - '274' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) method: POST uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef07013ba/create?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1627940944,"enabled":true,"exportable":true,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1627940944},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef07013ba/d34945b78e8f4c5a14ce9e1dca32aac9","kty":"RSA-HSM","n":"uCvjiJPSzUqDawuItYCkwCdJ_XumtwlfBn_SkuzyQi7Hhddwq6nt7fOAeELHE6VWORmahOgH7wnPAkCL2n0kb7i7vHGRtaNbUX7Im-syV3ap-0Eyv7O1GPaXNBHUrn_ENzDSZ_e66zgYCfE_qr8t4Q950E9POSoaVPEIYNbHf1ej7jsc1e4JiazvzcmMZJZk4UxLiRk7tP9zKH_jCtloUkBhfU66Vky3rurxiHgMYFc-cVdFpfUxLpo94fY7ZLGKwmYXkExvPNKmLFUj-xTtG0IOGDGGx7_EutbDexyH2Z9iDhgkTnauYCdGGQpjw-AQYFS64p0gQfe1yXElYBoThQ"},"release_policy":{"contentType":"application/json; + string: '{"attributes":{"created":1636141039,"enabled":true,"exportable":true,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1636141039},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef07013ba/01d11ce6665b082a9c8161b3668712bd","kty":"RSA-HSM","n":"iz3KfXXKGvYQLUL2CAgHb8hJ_z9xWqcZCoG3YhUGNpxmg_1Yhaz1BWJZFGXkhX3c4vqmrKbeS8Opoh7gcRwiVLJ1UoPo2JpgbzgHU9t2isMebl3Z2Yw2akGucwSrF1i0WTfoR2I5Xph7eKQhvBXBw9gF5szPPgdorNAWp4BCZhcTVLpxnRUpdcF-8QsYtEZVI26uS8sBUwtjVGUQUXUvbMlXNtFFcbKd4IlsQ2Se5axAA1UfPrCIoo8hqwCgLkjMhgp1wbgzdoLRdB7THN6ejzz3-BekQ4yVmdl6ZFGIa1WGlQIQIfskpDMOPTjT6gGldenpCXaAW7xiN4chPLCjmw"},"release_policy":{"contentType":"application/json; charset=utf-8","data":"eyJhbnlPZiI6W3siYW55T2YiOlt7ImNsYWltIjoic2RrLXRlc3QiLCJlcXVhbHMiOnRydWV9XSwiYXV0aG9yaXR5IjoiaHR0cHM6Ly9za3JhdHRlc3RhdGlvbi5henVyZXdlYnNpdGVzLm5ldC8ifV0sInZlcnNpb24iOiIxLjAuMCJ9"}}' headers: cache-control: @@ -117,12 +117,12 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '981' + - '940' status: code: 200 message: OK - request: - body: '{"target": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImpfRUZtUTVVQm9lNHJMNUltNmw1cU1rQXN0QXluaE5JQUJ6dFZLQ0RMV1UiLCJqa3UiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0L2tleXMifQ.eyJpc3MiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0LyIsInNkay10ZXN0Ijp0cnVlLCJ4LW1zLWluaXR0aW1lIjp7fSwieC1tcy1ydW50aW1lIjp7ImtleXMiOlt7Imt0eSI6IlJTQSIsImtpZCI6ImZha2UtcmVsZWFzZS1rZXkiLCJ1c2UiOiJlbmMiLCJlIjoiQVFBQiIsIm4iOiJvUThCNWxPMTdBLXJVY0xYVXE1NTExUkNRZ0pNV3A4Y0NLcXpwdS1pY2x3cEpXamRPTzlraWJLYllmb2syQ2U2WmtaYmJ6QTdXck1NNU5Za29oUWhtR2haaENZR0tIZERxbGx2akxlc2lBTlA2N093RkVqTmx4Y29SRVRnR0MtdklxWUZ0cUUzeEtfTTcwS0NieDRvZFhpd2RSb0d5aGp5NXZ1eVdPYTZxSDBaNk1FamdDVDRXXzVGUExuUWdtdXFsZUgtc2hqbE9TamQ3bU9KYXk2YzQ2T3lKaFM2TVlFSnpNeHNOZmZkbXppTWhuLTZDeWRvRExHNzlSNmNtY1BNWXp5eWctbDJ1SnVvZzZodUVvMktwWGFxeEJQOWVEbW1PZlc1cktFRkJRZS1zNC1VQS1BcDByNmJ2YjRIZG9ZZ1JQSERyWW5sMk5PWmpZeWtMMllhT3cifV19LCJtYWEtZWhkIjoic2RrLXRlc3QiLCJpYXQiOjE2Mjc5NDA5NDEsImV4cCI6MTk0MzUxNjk0MX0.EprIoofPyj4ZX3mAr1GLjW6GfYT0nnAJ_tOZaKtC67ngf6epNn-FM3XC3QvkXFinxufFUYJGzqOAABqeApd5-BEPFugIrdGQ95nWNvaBHaxsXnxxMQSvPjh8V3lwmgAFnbtY9KwepcUqRRCBbM9b8-UP970k29SDYgW3UdqG3g5Ho-r0sjUFTKQltNLJEwJRmhH9gAH5djyKmXdCENZELgrc9PxiSZnbnWGJc1kdkV1nIJms6K1Qll3HdbDfLiT8RexiHMGv_VjD9DOENZF6HRJ-1Srs0N5flprpGX-faxbi93BD7Iqknwnyovyq82iWhOotpqtEpu4MFoSZK_euIQ"}' + body: '{"target": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImhMbEtlLXJQRHB1ang4VmpxT2h1Q1RpMFo4NmJRQlh3aUd5bjdMaGlOcVUiLCJqa3UiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0L2tleXMifQ.eyJpc3MiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0LyIsInNkay10ZXN0Ijp0cnVlLCJ4LW1zLWluaXR0aW1lIjp7fSwieC1tcy1ydW50aW1lIjp7ImtleXMiOlt7Imt0eSI6IlJTQSIsImtpZCI6ImZha2UtcmVsZWFzZS1rZXkiLCJ1c2UiOiJlbmMiLCJlIjoiQVFBQiIsIm4iOiJ2aGNJZnQ4VUlUUm9zeHVDQzR4RHR1WDdNZ3BzMmcxZ2ktbTI4NnptVHB0V2JPVXlIRzl3MHp4bHAySk1QUHpfTHpObktsUEZWdGdvdllIaUp4aDdOQ2wxU1NRNlg5LVdza2lsSVAxX291OGI2c1ZpMUZFcGNGMEFVcHB5QXZ2UGJOcGtiWVc0UDhRdEdMQV9uOG55WldfZTNQb2Jva2h5dW52Y2g4RmY0RFVwMXR3Nmo1a0tSdVNpeDRYVDZrNVZjSFJOWXNRTnlqSWJidkFTV1RpM3l3LXdoSk12aGNnZ0VSRDkySE5tME5OdFdLMzNmVTRIb01TV0ktM3hEYzdpNWNvenpnLTh0aXZ4bS1mMFdBUnBsOF92M3FhTWNuYmstaFY5S0ZDUWtkdjRhRXY5STBRS3lSQU96SFFpTTZxQWlMejM0UWhqT1B3aUlOMEI2TzNvOHcifV19LCJtYWEtZWhkIjoic2RrLXRlc3QiLCJpYXQiOjE2MzYxNDEwMzYsImV4cCI6MTk1MTcxNzAzNn0.UVPQpHO2-uw3iWZ8eXITa_n1io6TIv96CNzN9G2gvHIASvmZNLSIf_t4mVaKZlx_VFH81OH2gn72zDX1ikUnTpZUWW0n9dov7mAoc-EukLI0yY2cx45X8ACR2m5EAuUTzDm2Aap14hHqi0i8sEsdwnXlR_rDYbYmRYGqNGrUD-2fa7tba_xUA13qruh3E4cC0hoUYje5Yq6in9YEhK1XDihyfmPwsWsBlLkM8VFpjEq6FPJIi3C_4pD_Rut7_RoFUkd56wPZGmaHjv-JkQ4VPhdI0_KL_BjV5uks98L4NXzedL9i7jJTRQemWJy206XbXksF8sRRU3e9IBFQmVvFrg"}' headers: Accept: - application/json @@ -135,17 +135,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) method: POST uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef07013ba/release?api-version=7.3-preview response: body: - string: '{"value":"eyJhbGciOiJSUzI1NiIsImtpZCI6InIybUJUWWl3ZnY2ai1EZGgzWUFPRWhOWXVqOVV1VzNnZ0YyN21BUlFOMTgiLCJ4NWMiOlsiTUlJSW1qQ0NCb0tnQXdJQkFnSVRNd0FYeDFSQVFhSGoyZ24yR3dBQUFCZkhWREFOQmdrcWhraUc5dzBCQVF3RkFEQlpNUXN3Q1FZRFZRUUdFd0pWVXpFZU1Cd0dBMVVFQ2hNVlRXbGpjbTl6YjJaMElFTnZjbkJ2Y21GMGFXOXVNU293S0FZRFZRUURFeUZOYVdOeWIzTnZablFnUVhwMWNtVWdWRXhUSUVsemMzVnBibWNnUTBFZ01EVXdIaGNOTWpFd09EQXlNakExTnpBMVdoY05Nakl3TnpJNE1qQTFOekExV2pCOU1Rc3dDUVlEVlFRR0V3SlZVekVMTUFrR0ExVUVDQk1DVjBFeEVEQU9CZ05WQkFjVEIxSmxaRzF2Ym1ReEhqQWNCZ05WQkFvVEZVMXBZM0p2YzI5bWRDQkRiM0p3YjNKaGRHbHZiakV2TUMwR0ExVUVBd3dtS2k1dFkzQmhkR2x1YjNSbGMzUm9jMjB1YldGdVlXZGxaR2h6YlM1aGVuVnlaUzV1WlhRd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUMvWlZ1eXdBcE1SKyt5Tm9iYW9pUkw5OFJ5Zk9mOFV2N2NrZ1k5UkxiZDd2OU4ydTdCK3lQV2kvSzk2ZVlkWHY3SHlFaFZUVGlmTWlTL1ZMQTBBL3k1MldEWDVTY2x0bzMvZUpVOUROMlF6UThnZCtTejFsQlpBdmRYVGphVVBOQmFjV2pQQm1VQTlOR0hReHJyS1dkbkxMWjUxdjFxTUtpZkNnTEV3bGtmN0s4bjdseWIyVy9XczVhdGJIaUEvNzZyaGN1cS9mQnN5UTRZby9jd3VWdFNCVzdnblM4cEpVdmJudnBYKzFoMzRCeFZhUVltcEhZVm9mMXdHTUVmQUpMYVUwVjNJU0FNMEF1TzNnUnJTYkhCd2xiQmxFaWdvcitiajkzTmtiMUJQMXhhdVNZeFpQQVF1VHAwcWJaVEgycytLb0FueTY5WFNSRFpvYm9NVThKL0FnTUJBQUdqZ2dRMU1JSUVNVENDQVg4R0Npc0dBUVFCMW5rQ0JBSUVnZ0Z2QklJQmF3RnBBSFlBN2t1OXQzWE9ZTHJoUW1rZnErR2VacU1QZmwrd2N0aURBTVI3aVhxby9jc0FBQUY3Q0xFUmZRQUFCQU1BUnpCRkFpRUFrMFF2QVBFOURoTjFUWnhFalFSY3MwZFhDYjEyZ3lGVnpJdHFnWUszK2pNQ0lEQkg1aElxakhEdzM2RU1EdGJ6K3BGWVNxVWEzVm9XZDRZSUw5aU1IbDFUQUhZQVFjaktzZDhpUmtvUXhxRTZDVUtIWGs0eGl4c0Q2K3RMeDJqd2tHS1dCdllBQUFGN0NMRVNSUUFBQkFNQVJ6QkZBaUVBcDJiQjFYRXRGQm12bDFOeklXdFh2RmdhbU82T29UYWN4Yi9pRjQwR0pXa0NJSGpaNU92SUppRFQ3dFlsdEtDYUxjTDY1ZjMvU0ZGMG41VWN3dEx1bG15R0FIY0FVYU93OWYwQmVaeFdiYmczZUk4TXBIck1HeWZMOTU2SVFwb04vdFNMQmVVQUFBRjdDTEVSWVFBQUJBTUFTREJHQWlFQStqS3BwMmRINTA1RDlvN0t2K3R2eHVDK3JRY2pqVUk1dnhubTdnNXhxaGtDSVFDUUVLUHR5ejlxTGhvZm84TDlkSEdKMURSdGttYkJBL0hZTm53RWszUVd3VEFuQmdrckJnRUVBWUkzRlFvRUdqQVlNQW9HQ0NzR0FRVUZCd01DTUFvR0NDc0dBUVVGQndNQk1Ed0dDU3NHQVFRQmdqY1ZCd1F2TUMwR0pTc0dBUVFCZ2pjVkNJZTkxeHVCNSt0R2dvR2RMbzdRRElmdzJoMWRnb1RsYVlMenB6NENBV1FDQVNNd2dhNEdDQ3NHQVFVRkJ3RUJCSUdoTUlHZU1HMEdDQ3NHQVFVRkJ6QUNobUZvZEhSd09pOHZkM2QzTG0xcFkzSnZjMjltZEM1amIyMHZjR3RwYjNCekwyTmxjblJ6TDAxcFkzSnZjMjltZENVeU1FRjZkWEpsSlRJd1ZFeFRKVEl3U1hOemRXbHVaeVV5TUVOQkpUSXdNRFVsTWpBdEpUSXdlSE5wWjI0dVkzSjBNQzBHQ0NzR0FRVUZCekFCaGlGb2RIUndPaTh2YjI1bGIyTnpjQzV0YVdOeWIzTnZablF1WTI5dEwyOWpjM0F3SFFZRFZSME9CQllFRkhHbGR4a1FFZXgwOWRCTWhDV0laN2hQaGJTY01BNEdBMVVkRHdFQi93UUVBd0lFc0RCWEJnTlZIUkVFVURCT2dpWXFMbTFqY0dGMGFXNXZkR1Z6ZEdoemJTNXRZVzVoWjJWa2FITnRMbUY2ZFhKbExtNWxkSUlrYldOd1lYUnBibTkwWlhOMGFITnRMbTFoYm1GblpXUm9jMjB1WVhwMWNtVXVibVYwTUdRR0ExVWRId1JkTUZzd1dhQlhvRldHVTJoMGRIQTZMeTkzZDNjdWJXbGpjbTl6YjJaMExtTnZiUzl3YTJsdmNITXZZM0pzTDAxcFkzSnZjMjltZENVeU1FRjZkWEpsSlRJd1ZFeFRKVEl3U1hOemRXbHVaeVV5TUVOQkpUSXdNRFV1WTNKc01HWUdBMVVkSUFSZk1GMHdVUVlNS3dZQkJBR0NOMHlEZlFFQk1FRXdQd1lJS3dZQkJRVUhBZ0VXTTJoMGRIQTZMeTkzZDNjdWJXbGpjbTl6YjJaMExtTnZiUzl3YTJsdmNITXZSRzlqY3k5U1pYQnZjMmwwYjNKNUxtaDBiVEFJQmdabmdRd0JBZ0l3SHdZRFZSMGpCQmd3Rm9BVXg3S2NmeHpqdUZydjZXZ2FxRjJVd1NaU2FtZ3dIUVlEVlIwbEJCWXdGQVlJS3dZQkJRVUhBd0lHQ0NzR0FRVUZCd01CTUEwR0NTcUdTSWIzRFFFQkRBVUFBNElDQVFBODc3K3F1UmgwNStnamtoZXdneTBEMmdLL1Ftc2IzMitOOVpUOUhkZTVHOWNweUo4UXErUTdFV0xibXNuclY5RDdNWURZa004RStoWnFveDFDREdUb0poamRXb1Z3aXo0aHhRQzVDNG9rYWsyTU9ZZTJaeTNvNjRPdWhrZzhWQnhzZTQ0S09wTHNTSG90R0doVG4xTmFpaWxJU2R1Qm9KekRnVnUzUkxodjlwdjAxUEF1MUpZS1duRExseERYK3A5dnJOek53K2lHZjUxSm5DU2xLbFd1ZjRRNWZ6QWREY3hJZDVHQXpvQ1RKZWRWb1cvRDNOUmwzS2k5b0QzTWdnYmVjR0crQ1NrWjE0TUxsb21ZOFRKQTRvS1ZzMlVWSi9EcytuQ0wzQmFNUXYvRndDUjhRcE9jWnk0WnNWcUFLRDBFcmJjMWxNNHpzMzhFbGQ5MnBSbmVTQ3FyM2szS0hXVmM4WEJLZlB0UnZDV3dzZ3RyL0tRcWdHLzFQNWI4ZEF3cFNBRTVUS0tHMTVZbWowSG1uajdSUEkzOURkd1dPLzJ4RmR2VXQvbUtJNU5jbWNvMk5EbkxvOXI0TzUzaUNOZzdLVzlLbzVpMlBYSlN1Njl6ZXQyV2VqaDFVa3FVclE1Q1BrWXlWYVhwMHdaSWRPVzUxQWN5VzhONDJNNjBualZ4ZFRGeElqQ2lGVW41SytLR0ZFWnJ4NG9EdWNPYzVsVml1QmxVbDE1NEd0dlh1Njd2MXI2Y1RTWTZBWElPMkRWUzg0K1hEbTdGZG9yUDl1ZVR2dlluRmpTd1piL1NzL0N0RDJOQVFSNDNXcS96MFRmZGp1bmlmZEIzOEZUVGxWSjBQdWZ3SlVZcUFtV1RrU3VJcG9kTm1MS09sdnMxbTBXWWtLbFUvQ3hwdXc9PSIsIk1JSUY4ekNDQk51Z0F3SUJBZ0lRRFh2dDZYMkNDWlo2VW1NYmk5MFl2VEFOQmdrcWhraUc5dzBCQVF3RkFEQmhNUXN3Q1FZRFZRUUdFd0pWVXpFVk1CTUdBMVVFQ2hNTVJHbG5hVU5sY25RZ1NXNWpNUmt3RndZRFZRUUxFeEIzZDNjdVpHbG5hV05sY25RdVkyOXRNU0F3SGdZRFZRUURFeGRFYVdkcFEyVnlkQ0JIYkc5aVlXd2dVbTl2ZENCSE1qQWVGdzB5TURBM01qa3hNak13TURCYUZ3MHlOREEyTWpjeU16VTVOVGxhTUZreEN6QUpCZ05WQkFZVEFsVlRNUjR3SEFZRFZRUUtFeFZOYVdOeWIzTnZablFnUTI5eWNHOXlZWFJwYjI0eEtqQW9CZ05WQkFNVElVMXBZM0p2YzI5bWRDQkJlblZ5WlNCVVRGTWdTWE56ZFdsdVp5QkRRU0F3TlRDQ0FpSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnSVBBRENDQWdvQ2dnSUJBS3BsRFRtUTlhZndWUFFlbER1dStOa3hOSjA4NENOS25yWjIxQUJld0UrVVU0R0tEbnd5Z1pkSzZhZ05TTXM1VW9jaFVFRHp6OUNwZFY1dGRQekwxNE8vR2VFMmdPNS9hVUZUVU1HOWM2bmV5eGs1dHExV2RLc1BraXRQd3M2VjhNV2E1ZDFML3k0UkZoWkhVc2d4eFV5U2xZbEdwTmNIaGhzeXI3RXZGZWNaR0ExTWZzaXRBV1ZwNmhpV0FOa1dLSU5mUmNkdDNaMkEyM2htTUg5TVJTR0JjY0hpUHV6d3JWc1NtTHd2dDNXbFJEZ09iSmtFNDB0Rll2SjZHWEFRaWFHSENJV1NWT2JnTzN6ajZ4a2RiRUZNbUovenIyV2V0NUtFY1VEdFVCaEE0ZFVVb2FQVno2OXU0NlY1NlZzY3kzbFh1MVlsc2s4NGo1bFVQTGRzQXh0dWx0UDRPUFFvT1Rwblk4a3hXa0g2a2dPNWdUS0UzSFJ2b1ZJalU0eEowSlE3NDZ6eS84R2RRQTM2U2FOaXo0VTN1MTB6RlpnMlJrdjJkTDFMdjU4RVhMMDJyNXE1Qi9uaFZIL00xam9UdnBSdmFlRXBBSmhrSUE5TmtwdmJHRXBTZGNBME9ydE9PZUd0cnNpT3lNQllranBCNW53MGNKWTFRSE9yM25JdkoyT25ZK09LSmJEU3JoRnFXc2s4LzFxNloxV052T056N3RlMXBBdEhlcmRQaTVwQ0hlaVhDTnB2K2ZhZHdQMGs4Y3phZjJWczE5bllzZ1duNXVJeUxRTDhFZWhkQnpDYk9LSnk5c2w4NlM0RnFlNEhHeUF0bXFHbGFXT3NxMkE2Ty9wYU1pM0JTbVdURGJnUExDUEJiUHRlL2JzdUFFRjRhamtQRUVTM0dIUDlBZ01CQUFHamdnR3RNSUlCcVRBZEJnTlZIUTRFRmdRVXg3S2NmeHpqdUZydjZXZ2FxRjJVd1NaU2FtZ3dId1lEVlIwakJCZ3dGb0FVVGlKVUlCaVY1dU51NWcvNitya1M3UVlYanprd0RnWURWUjBQQVFIL0JBUURBZ0dHTUIwR0ExVWRKUVFXTUJRR0NDc0dBUVVGQndNQkJnZ3JCZ0VGQlFjREFqQVNCZ05WSFJNQkFmOEVDREFHQVFIL0FnRUFNSFlHQ0NzR0FRVUZCd0VCQkdvd2FEQWtCZ2dyQmdFRkJRY3dBWVlZYUhSMGNEb3ZMMjlqYzNBdVpHbG5hV05sY25RdVkyOXRNRUFHQ0NzR0FRVUZCekFDaGpSb2RIUndPaTh2WTJGalpYSjBjeTVrYVdkcFkyVnlkQzVqYjIwdlJHbG5hVU5sY25SSGJHOWlZV3hTYjI5MFJ6SXVZM0owTUhzR0ExVWRId1IwTUhJd042QTFvRE9HTVdoMGRIQTZMeTlqY213ekxtUnBaMmxqWlhKMExtTnZiUzlFYVdkcFEyVnlkRWRzYjJKaGJGSnZiM1JITWk1amNtd3dONkExb0RPR01XaDBkSEE2THk5amNtdzBMbVJwWjJsalpYSjBMbU52YlM5RWFXZHBRMlZ5ZEVkc2IySmhiRkp2YjNSSE1pNWpjbXd3SFFZRFZSMGdCQll3RkRBSUJnWm5nUXdCQWdFd0NBWUdaNEVNQVFJQ01CQUdDU3NHQVFRQmdqY1ZBUVFEQWdFQU1BMEdDU3FHU0liM0RRRUJEQVVBQTRJQkFRQWUrRytHMlJGZFd0WXhMSUtNUjVIL2FWTkZqTlA3SmRldStvWmFLYUl1N1UzTmlkeWtGcjk5NGpTeE1CTVY3Njh1a0o1L2hMU0tzdWovU0xqbUFmd1JBWit3MFJHcWkva092UFlVbEJyL3NLT3dyM3RWa2c5Y2NaQmVibkJWRytETEtUcDJPeDArallCQ1B4bGE1Rk8yNTJxcGs3LzZ3dDhTWmszZGlTVTEySm03aWYvampraGtHQi9lOFVkZnJLb0x5dER2cVZlaXdQQTVGUHpxS29TcU43NWJ5TGpzSUtKRWROaTA3U1k0NWhOL1JVbnNtSW9BZjkzcWxhSFIvU0pXVlJocld0M0ptZW9CSjJSREs0OTJ6RjZUR3UxbW9oNGFFNmUwMFlrd1RQV3JldXd2YUxCMjIwdldtdGdaUHMrRFNJYjJkOWhQQmRDSmd2Y2hvMWM3IiwiTUlJRGpqQ0NBbmFnQXdJQkFnSVFBenJ4NXFjUnFhQzdLR1N4SFFuNjVUQU5CZ2txaGtpRzl3MEJBUXNGQURCaE1Rc3dDUVlEVlFRR0V3SlZVekVWTUJNR0ExVUVDaE1NUkdsbmFVTmxjblFnU1c1ak1Sa3dGd1lEVlFRTEV4QjNkM2N1WkdsbmFXTmxjblF1WTI5dE1TQXdIZ1lEVlFRREV4ZEVhV2RwUTJWeWRDQkhiRzlpWVd3Z1VtOXZkQ0JITWpBZUZ3MHhNekE0TURFeE1qQXdNREJhRncwek9EQXhNVFV4TWpBd01EQmFNR0V4Q3pBSkJnTlZCQVlUQWxWVE1SVXdFd1lEVlFRS0V3eEVhV2RwUTJWeWRDQkpibU14R1RBWEJnTlZCQXNURUhkM2R5NWthV2RwWTJWeWRDNWpiMjB4SURBZUJnTlZCQU1URjBScFoybERaWEowSUVkc2IySmhiQ0JTYjI5MElFY3lNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXV6Zk5OTng3YThteWFKQ3RTblgvUnJvaENnaU45UmxVeWZ1STIvT3U4anFKa1R4NjVxc0dHbXZQckMzb1hna2tSTHBpbW43V282aCs0RlIxSUFXc1VMZWNZeHBzTU56YUh4bXgxeDdlL2RmZ3k1U0RONjdzSDBOTzNYc3MwcjB1cFMva3FiaXRPdFNacExZbDZadHJBR0NTWVA5UElVa1k5MmVRcTJFR25JL3l1dW0wNlpJeWE3WHpWK2hkRzgyTUhhdVZCSlZKOHpVdGx1TkpiZDEzNC90SlM3U3NWUWVwajVXenRDTzdURzFGOFBhcHNwVXd0UDFNVll3blNsY1VmSUtkelhPUzB4WktCZ3lNVU5HUEhnbStGNkhtSWNyOWcrVVF2SU9sQ3NSbktQWnpGQlE5Um5iRGh4U0pJVFJOcnc5RkRLWkpvYnE3bk1XeE00TXBoUUlEQVFBQm8wSXdRREFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQTRHQTFVZER3RUIvd1FFQXdJQmhqQWRCZ05WSFE0RUZnUVVUaUpVSUJpVjV1TnU1Zy82K3JrUzdRWVhqemt3RFFZSktvWklodmNOQVFFTEJRQURnZ0VCQUdCbktKUnZEa2hqNnpIZDZtY1kxWWw5UE1XTFNuL3B2dHNyRjkrd1gzTjNLaklUT1lGblFvUWo4a1ZuTmV5SXYvaVBzR0VNTktTdUlFeUV4dHY0TmVGMjJkK21RcnZIUkFpR2Z6WjBKRnJhYkEwVVdUVzk4a25kdGgvSnN3MUhLajJaTDd0Y3U3WFVJT0daWDFOR0ZkdG9tL0R6TU5VK01lS05oSjdqaXRyYWxqNDFFNlZmOFBsd1VIQkhRUkZYR1U3QWo2NEd4SlVURnk4YkpaOTE4ckdPbWFGdkU3RkJjZjZJS3NoUEVDQlYxL01VUmVYZ1JQVHFoNVV5a3c3K1UwYjZMSjMvaXlLNVM5a0pSYVRlcExpYVdOMGJmVktmamxsRGlJR2tuaWJWYjYzZERjWTNmZTBEa2h2bGQxOTI3anlOeEYxV1c2TFpabTZ6TlRmbE1yWT0iXSwieDV0I1MyNTYiOiJyMm1CVFlpd2Z2NmotRGRoM1lBT0VoTll1ajlVdVczZ2dGMjdtQVJRTjE4In0.eyJyZXF1ZXN0Ijp7ImFwaS12ZXJzaW9uIjoiNy4zLXByZXZpZXciLCJlbmMiOiJDS01fUlNBX0FFU19LRVlfV1JBUCIsImtpZCI6Imh0dHBzOi8vbWNwYXRpbm90ZXN0aHNtLm1hbmFnZWRoc20uYXp1cmUubmV0L2tleXMvbGl2ZWt2dGVzdHJzYS1rZXktbmFtZWYwNzAxM2JhIn0sInJlc3BvbnNlIjp7ImtleSI6eyJhdHRyaWJ1dGVzIjp7ImNyZWF0ZWQiOjE2Mjc5NDA5NDQsImVuYWJsZWQiOnRydWUsImV4cG9ydGFibGUiOnRydWUsInJlY292ZXJhYmxlRGF5cyI6NywicmVjb3ZlcnlMZXZlbCI6IkN1c3RvbWl6ZWRSZWNvdmVyYWJsZStQdXJnZWFibGUiLCJ1cGRhdGVkIjoxNjI3OTQwOTQ0fSwia2V5Ijp7ImUiOiJBUUFCIiwia2V5X2hzbSI6ImV5SmphWEJvWlhKMFpYaDBJam9pU3pGdmRWWkZYMnh4Y0VWNE1XOUtRM1oyVm1oWWVrNTVaMjVqV1dkMGRVdDNXSFJwYldWNFV6TldWbUp6ZWxFdGRrWldSVkZxYjJoVVdYazRPVjlaU1RaRExUVXRTa1pHYkd4V2FHZEZiakZTVmxBNWExVnlOR1ZQZUdOdWJrdzVhM2x0WVd4RVRYQmFORXBwZFZadFptY3llVEZQTVVOUlZUaDRhWFJGWjJoWmMwb3hhRGN3TVRFNU1IZHRiRGsxZWxCeFQyZDVNV1ZPUms1T1pHOU9XRFoyVFdaUVowVlVUMlEyVGxCSFVtaHNUbVV0Y1dKc2FIVkNWV1ZpVFZad05XWlFjbGxYUmtobmRYTkhVa2R6YjBneFZuazRURFZFZFMxRVdrVm9PV3N0UWtsVE1ucGhXWHB3ZHpOaFlVNVVaVmh5VVV0WWVFRjJNalZWVm1rNGVYbFpTalk0VjJkR1EyMTZZVTlaWkhSSmMzYzVOVTVpVTIxNk5uWkNVMVZhUTJsYVpGaGxabWxWVlRWSVdXMVJOMUpLVUhRM1RFVktNV3d6Y1ZjMlJXZzVlREpTV1ZST2RuRjRiek5TTnpCQloxcHNaMkZxT1UxUFNHaHVVR3hQUW0wMWRGVkJhbGxhU1dsTlZ6WkpOazgyUTBZeGRFTlZjR2xKV0ZsVlJWWkpNRlpCZGxSc1YxUkpXbXRtUzNSSE5IWXRUemc1YmtrNFNrZFFkR05JVm1WRlpuRlpPWE5hZUUxTFowSlZMVmhuU1dKNlJIQlNkR0pEYzJaSFNuSjBUMWxTZUhaMlkxRk5aemRIV2s5WmJDMDBSV3htYTJ0TFdrbHBRbE0yYUhCS2VXbzJiM1pGUlZGaE9TMXhOMGhWZWkxME5XbE1jeTB5UzBocVVtOXZia1JYTkZabWN6UXdlbVF4TXpScWFsWnBYMmcwU1ZFNU1EZ3hjVFZPTWxsd2Qyb3laM2hQU205MVVXNVVhbVZEUVVoMlZqTXlXbEpuUVd4S2IySTVNMkpvWW1KVVZGZGtZV0pMT0VKME9IQkRjazU2WjNRdGFsa3lkVE5tTWpCWE5tYzViazlLWmxGSk16QTVUM1JhTFY5WU1FNTVkWHBMY1Y5SVIzWnhUR05oVTFwWVQyOTRVRlozVTFwb1RFeHdkRTFMVFVkMk1XaG9TRkZTVW0xVVdVdEZZVEpmWmxCWlowbERkVjlsYzJSTE16SmpWRzgwY0VadVNGRkpha056ZFVKMk4xZFFhMUJaYUhRMmRWWlJXRGh6V0RGTU9EUldhMHgwTTFoSU5uVmZOMEY1ZUZkNlUwRjFUVVowWkdOVFpEaElUVjlWVFhSdWJqVlpPV3h2T1RGaFNGWlJOSE42TVhkQ1YwdzViM2xUY2pkRVozcHdhM2hNVkdKcVlXaHFjWGhsWDJzdFdHMUJMVWsxUjA0NVozaE5XRWxrUTBwVmMwaHNRVTQzYWpKck1uTnNYMnR6UjBKU2EyUTVTakJLYm5JMU5rVkllRU5PWm1OSmFWOTBibEpDYlRFeWFXTjFjazFRYjJGTk5sUjVXbEkxYlU1cWNqaEtVelppVlhKSVh5MHlVV2hzVFZSSVVVOU9ZVGRzTFVGcVgxOUpjRXBTV0RCRFpuSktjbXhMVFRKM1UyRmFNSGRSV0dSUFNpMHdUV05CTkdaUlRVRnFVVEI0YWtoNldrRXpialUxZDBrNGFrNHhRakpaVlVWMmJHbGFiVE55YTJGUVNuRllaVWhvU0UxaE5DMDBWRE5pYmpsS2NEZFFObEJ6WmpSV1ZuQmFXRmhDVkc5WFdFdEljVEpYY0d4UVNXcDJXbFZhYUVOb1ZUTndhRk5ITVd4SVNVTnhTVGxrYTJzM2RuVlNUbUpaVGpjeVUwVmFjV3RsTUVKYWJGbE1WMjFuVWtwb1QwcFhZME54YUVWSk1VeDJUR3RIWTBZeVNERndVMHMyUjBGQmR6RXhSVlI1WmpKVk4wSktlRlI0ZUZKbGIwNDFRWEV5VkZoTFdXNVdXVlJyUVdKcVNrUm1ZbkZJUTBoaGJYaE9OMUF3WVZSbVoweHNWWHBXTWxGUWNqbHJhVGt0WkZOd1NpMVJhVzlaU1dKblFVcE9RM2hqVkdsb00xZHdTVTFaWDJ4MWNIQTBVR1ZOZG5ndFVsVm1RMDVhZGt4aWVua3dUbTVVTm5RdFNtRkJlRmhLVjNWMmRYTjVaVVJsUlRORWVub3dPRFZ0VkRjM2FuSjFSM0ZHVDFWWWVVWndNVVl6TTNScmFGUTBPVVl4YWpKamQwWkJibEUyY1dWbE9EUTVkV2hvYm5sV01sVlVkMk5NZVVOaWQwUkhOR1E1VWt4NlFqVnBjR3c1YkUxbWFVMHdWWEIxYm5wVGRtOXBTSFJqT0ZWS2FubHdTVWQwVG5kcFEyeEtiVmxrWTJweGIweHNRMUpJY2tSWFZVNVRSMlU1YUdkNlVXOHpjbkZuUWpaVlFYQkNhbVU0WVRCMGMxRkRXbVJFV21obVVGSjZVVE5IWDBoeGNHMHplRXBIVG1jM1VFTkJjMUl3YVcxMmQyMWhVbTh3VldZMVVuSm9RbFYxVkZoclIzRnhhMHBCVGxOeU5qbEhkMUpIWW1WRFJYRlNSMUJTVURKc05uQnVabG96T0Y5eFFsOTJhbXBtYUVaUVQzQlpSVGxNY1hwMU1sWnljWEZQTFdSdFdITjRXamhsT1VwVVJqSkdVMHRNTVMxRmEyVkdUME5ET0hBeE1IRllSRzVPUnpkQ2RtRkRWekEyVm5CMVgzSXlOa0oyZURjM2JtUjROMUExZGpWVVNEbG9kV3BUWVdsbVYzZGtjRkJxTmpKQ1dXRnplbkZ4VkhoM05FUnpTMjkxV0ZCT2FUZFJjRWszUjFoQlUydzBZMjVzVERkYU0wZFFNMGRLWkZjd1gyWnVhbWQ0V1RKd05qSTRia3RwTmxrNWR6UlVaRk5WUzJ4elpuZEpPRmx2YVhKa2FGZHZNbWw0TTFkMlRXWkZZbkJMWTNFellqWnFXbU5JZWxwc1JXMVFTMDlSWjNaVFpDMDJSaTFYYjIxb1lVRnBUSGxLYWpkWlJVdHZYM2RYVUZkb2VWQkpaSFY0VUhWelNXVlZWemd4Tm5sRmQwTnpZazExTjNReVZGTnlZMnRPVDFFNGEzRlJRVEExZVZsQ1VESXpSRXhXTWxGS2RHVjVZek5vZVhCR2NUSktNM0JNTFc4M05XaHplRmx2ZW1oQ2JIUnBXa2hJTW5vMFZFVTBOakJMUjBOVmNFMWtlbUZDY0ZsV1JWQlFSMGwzZUdWMWJtYzRhRlYwZDJWaFVYSnBXVXA0WmpKNFJ6UkNXV3RsTVVkTlVrdDVWMkowU1VFM04wcFVRbDlHY2xOSmRHTldWVUpHVld0UFNHTm9SM0pTYVUxU1pFbEhXbWwzTTFnd1FrVXhVMGt6TUhSd1RFUXhhSGhuWWtoV2NHWnFiVUZMWkZFdFVYRkNSVzUyZWtjelltaGhWbE54V2tnemR5SXNJbWhsWVdSbGNpSTZleUpoYkdjaU9pSmthWElpTENKbGJtTWlPaUpEUzAxZlVsTkJYMEZGVTE5TFJWbGZWMUpCVUNJc0ltdHBaQ0k2SW1aaGEyVXRjbVZzWldGelpTMXJaWGtpZlN3aWMyTm9aVzFoWDNabGNuTnBiMjRpT2lJeExqQWlmUSIsImtleV9vcHMiOlsid3JhcEtleSIsImRlY3J5cHQiLCJlbmNyeXB0IiwidW53cmFwS2V5Iiwic2lnbiIsInZlcmlmeSJdLCJraWQiOiJodHRwczovL21jcGF0aW5vdGVzdGhzbS5tYW5hZ2VkaHNtLmF6dXJlLm5ldC9rZXlzL2xpdmVrdnRlc3Ryc2Eta2V5LW5hbWVmMDcwMTNiYS9kMzQ5NDViNzhlOGY0YzVhMTRjZTllMWRjYTMyYWFjOSIsImt0eSI6IlJTQSIsIm4iOiJ1Q3ZqaUpQU3pVcURhd3VJdFlDa3dDZEpfWHVtdHdsZkJuX1NrdXp5UWk3SGhkZHdxNm50N2ZPQWVFTEhFNlZXT1JtYWhPZ0g3d25QQWtDTDJuMGtiN2k3dkhHUnRhTmJVWDdJbS1zeVYzYXAtMEV5djdPMUdQYVhOQkhVcm5fRU56RFNaX2U2NnpnWUNmRV9xcjh0NFE5NTBFOVBPU29hVlBFSVlOYkhmMWVqN2pzYzFlNEppYXp2emNtTVpKWms0VXhMaVJrN3RQOXpLSF9qQ3Rsb1VrQmhmVTY2Vmt5M3J1cnhpSGdNWUZjLWNWZEZwZlV4THBvOTRmWTdaTEdLd21ZWGtFeHZQTkttTEZVai14VHRHMElPR0RHR3g3X0V1dGJEZXh5SDJaOWlEaGdrVG5hdVlDZEdHUXBqdy1BUVlGUzY0cDBnUWZlMXlYRWxZQm9UaFEifSwicmVsZWFzZV9wb2xpY3kiOnsiY29udGVudFR5cGUiOiJhcHBsaWNhdGlvbi9qc29uOyBjaGFyc2V0PXV0Zi04IiwiZGF0YSI6ImV5SmhibmxQWmlJNlczc2lZVzU1VDJZaU9sdDdJbU5zWVdsdElqb2ljMlJyTFhSbGMzUWlMQ0psY1hWaGJITWlPblJ5ZFdWOVhTd2lZWFYwYUc5eWFYUjVJam9pYUhSMGNITTZMeTl6YTNKaGRIUmxjM1JoZEdsdmJpNWhlblZ5WlhkbFluTnBkR1Z6TG01bGRDOGlmVjBzSW5abGNuTnBiMjRpT2lJeExqQXVNQ0o5In19fX0.lS7J-9Hrg_NTARk2y1SRzHTP09MvinIpPcYxOuxCnemFJ2cNr9kIWiyhLDJTMMgOLFYu8qRkzBOQESF7yerDRiAZen13LUeccVos1unw1cdpfncZTR0lp9wdcfzKnOav-03nI_n3d_bG0pnz1X5xibdlh9fUfYo5wq9gP5egisch2rLQganh_hGNbqv4PbdI8jfkn44M6yZdrvi5IBD7j9KVAtzFgJCGTBeuMMO5oMS1nfGu8g3si3jxRpzrQBP6ht2qkZnAd-yqMdY4h_jUD68-TyBuPZLntETnToKxtNwpEOCrue14D0n69XS1jSQiLmCLAsxUOzZMTxODMThtmQ"}' + string: '{"value":"eyJhbGciOiJSUzI1NiIsImtpZCI6ImFiMDQ0YlAyWG4wQVQ1LXZ6S2twaWdJbHU1V2ZoYV9vS1RRVjRZUG5aN3MiLCJ4NWMiOlsiTUlJSkVUQ0NCdm1nQXdJQkFnSVRNd0FmcDZ5Y3RhMTdXM3JUQ0FBQUFCK25yREFOQmdrcWhraUc5dzBCQVF3RkFEQlpNUXN3Q1FZRFZRUUdFd0pWVXpFZU1Cd0dBMVVFQ2hNVlRXbGpjbTl6YjJaMElFTnZjbkJ2Y21GMGFXOXVNU293S0FZRFZRUURFeUZOYVdOeWIzTnZablFnUVhwMWNtVWdWRXhUSUVsemMzVnBibWNnUTBFZ01EWXdIaGNOTWpFeE1UQTFNVGt4TXpVeVdoY05Nakl4TURNeE1Ua3hNelV5V2pCOU1Rc3dDUVlEVlFRR0V3SlZVekVMTUFrR0ExVUVDQk1DVjBFeEVEQU9CZ05WQkFjVEIxSmxaRzF2Ym1ReEhqQWNCZ05WQkFvVEZVMXBZM0p2YzI5bWRDQkRiM0p3YjNKaGRHbHZiakV2TUMwR0ExVUVBd3dtS2k1dFkzQmhkR2x1YjNSbGMzUm9jMjB1YldGdVlXZGxaR2h6YlM1aGVuVnlaUzV1WlhRd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUN4UUMyK21XZldmelFyS21kT0NrbFJvaE1qWHlJQUpoY3FIQU9FK3cxZVBjY0FXZTh3RFByc3k0Q3o5cUJDWVJYZHdKNmpJblFSKzJGazdnSzM0OFBpME1RRXFObjZ0NUhOL2VVbzRYU0RUWXp0Uk93Mm10TmhzUzNjeCtOZ3NscmR1ckZsK1FKMTEvWlBjWVlUK0EvWUtTK1QrVDgzUFJ5UXpXMTU3a2FGOE4waUYxd1FqSkt1Y0J2dE95MW44S3pVZkt5N2JHWFdNVnNRMzVpK250ajdqT2VmQlpsbFBCcTVPQU9uY1hEcXhSNmU5UkEwV2xvNEJ1dXcyVDA4VithQ0dGOWVIQ3BaRzFtSmlUN3R3TFdyM2oraXhkZTFqYWVTYVg4cjl5VnRCVHQvejArUmM5K21Yb2R6QTIyRVZ1Yk1nOW9hWmtzcm0rMTY3Q0swZE9aN0FnTUJBQUdqZ2dTc01JSUVxRENDQWZZR0Npc0dBUVFCMW5rQ0JBSUVnZ0htQklJQjRnSGdBSGNBS1htKzhKNDVPU0h3Vm5PZlk2VjM1YjVYZlp4Z0N2ajVUVjBtWENWZHg0UUFBQUY4OFk2eXB3QUFCQU1BU0RCR0FpRUF4TnhiT1QwVGQyK3pOYW40cEpLL2Q4dGk0RC9GM2ZhZVBZekxaQkxWZllnQ0lRQ1BvZE9yZTJ2YXMzVzVvSTk4OGRtd0o1UHRUQVZ1ZVNJalJVOGplV0p3YVFCMkFFYWxWZXQxK3BFZ01MV2lpV24wODMwUkxFRjB2djFKdUlXcjh2eHcvbTFIQUFBQmZQR09zdDRBQUFRREFFY3dSUUloQU5ndzRqc0NDK2U2TVRWZUhYYTM3NzZubDgreUxhYlBtZHVRblNFNE5MckpBaUI3MzlJZkxudkNmKzFuSzc5aWtBK0JuYnMrNzdHYjJKRnVpd00rUS93UUpRQjJBRUhJeXJIZklrWktFTWFoT2dsQ2gxNU9NWXNiQSt2clM4ZG84SkJpbGdiMkFBQUJmUEdPc3RjQUFBUURBRWN3UlFJaEFQdDdFalBYczQySmJveVlOd1lSU0MrYjN3b0x3Z1ZEcVBSWkYwS2RVSVlZQWlCZ0MrR2o3QzVHc0V0ZEpveG1zN085QWdFOGNCT1grOVJwK2RXV2VabkRZd0IxQUZHanNQWDlBWG1jVm0yNE4zaVBES1I2ekJzbnkvZWVpRUthRGY3VWl3WGxBQUFCZlBHT3N3OEFBQVFEQUVZd1JBSWdCZGVpZ25EbGkwNVdqbU1FT1N5em9KNDZycFFTSnBrdzEwWFVTQ2hqTUU0Q0lFS2llc0w0WVZIM0U1MHJOaVU3aXY0cFlxcm9pSUtRN3NuV2xJYmdiRm5aTUNjR0NTc0dBUVFCZ2pjVkNnUWFNQmd3Q2dZSUt3WUJCUVVIQXdJd0NnWUlLd1lCQlFVSEF3RXdQQVlKS3dZQkJBR0NOeFVIQkM4d0xRWWxLd1lCQkFHQ054VUloNzNYRzRIbjYwYUNnWjB1anRBTWgvRGFIVjJDaE9WcGd2T25QZ0lCWkFJQkl6Q0JyZ1lJS3dZQkJRVUhBUUVFZ2FFd2daNHdiUVlJS3dZQkJRVUhNQUtHWVdoMGRIQTZMeTkzZDNjdWJXbGpjbTl6YjJaMExtTnZiUzl3YTJsdmNITXZZMlZ5ZEhNdlRXbGpjbTl6YjJaMEpUSXdRWHAxY21VbE1qQlVURk1sTWpCSmMzTjFhVzVuSlRJd1EwRWxNakF3TmlVeU1DMGxNakI0YzJsbmJpNWpjblF3TFFZSUt3WUJCUVVITUFHR0lXaDBkSEE2THk5dmJtVnZZM053TG0xcFkzSnZjMjltZEM1amIyMHZiMk56Y0RBZEJnTlZIUTRFRmdRVVZKZm5mNC9BZ2dLaksycmZHc1JPK2NFbWx5OHdEZ1lEVlIwUEFRSC9CQVFEQWdTd01GY0dBMVVkRVFSUU1FNkNKaW91YldOd1lYUnBibTkwWlhOMGFITnRMbTFoYm1GblpXUm9jMjB1WVhwMWNtVXVibVYwZ2lSdFkzQmhkR2x1YjNSbGMzUm9jMjB1YldGdVlXZGxaR2h6YlM1aGVuVnlaUzV1WlhRd1pBWURWUjBmQkYwd1d6QlpvRmVnVllaVGFIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFXOXdjeTlqY213dlRXbGpjbTl6YjJaMEpUSXdRWHAxY21VbE1qQlVURk1sTWpCSmMzTjFhVzVuSlRJd1EwRWxNakF3Tmk1amNtd3daZ1lEVlIwZ0JGOHdYVEJSQmd3ckJnRUVBWUkzVElOOUFRRXdRVEEvQmdnckJnRUZCUWNDQVJZemFIUjBjRG92TDNkM2R5NXRhV055YjNOdlpuUXVZMjl0TDNCcmFXOXdjeTlFYjJOekwxSmxjRzl6YVhSdmNua3VhSFJ0TUFnR0JtZUJEQUVDQWpBZkJnTlZIU01FR0RBV2dCVFZ3V2M2d3FPZDlIZFNXMWtTT0NubVZXaTdwVEFkQmdOVkhTVUVGakFVQmdnckJnRUZCUWNEQWdZSUt3WUJCUVVIQXdFd0RRWUpLb1pJaHZjTkFRRU1CUUFEZ2dJQkFGVkFlL1J4Y3dVUkZ0MXhSSmVybmdlZ2o1VVRUL0Z6dDVuUm8xVjE5cGd6bHlUNWxtTmk3ZXRNcWZyZkRwbHc3OHY1RHpjT3A4TzZEclRvVnQvZnN2cjVzR2xDYVNKQ3BYaXgyMTVvZ05EQWpVM21rNzhoWjNtZUd0Q0svbTd5YnFieDkwVTdETEF2SmRiTGRKNjdPVW5JU1RrelJSLytFU1hNWmQ4ZFlXMGkvMXphb05URU1NZUdlaGFvOHlJM0FxVllDZExpNEMzL1hDQzJWTjRjVjFLaUMrZHRkSmFRQm5Udm5LcUhzNE41a1Q0MnhBQVl6QWg5M3Y3RnVsdi9lWllIZW00TUZ5bzNTNm9kbkE1ejNIWk90K3R5eXhnTUZDY083bEI4UWthVXFDekJuS3krWU9NdTJISTNrT3NrRDZnUzMzWDZpZGQ0T25wZGpMQnFNWXF5Z2tSNjFoNzRIQUpPKytaSlBuN0Q2WlpNZzJyRis0WFVEb3pZOGVaMmhnUmpzNmdNTUFxbHArRDV5SnZuU0xwamMyaytpa0JPM2Q0WlJINVh1KzJRNTFxZXNwYXhLZFlUSmtEK2kyUUdEbkhSYTJFWDFyeW43ZnV5ZytzdmgxcklKTFF4K0Yva1JxdEFObWpJd1l6Q1FkWkt6SEhGbE9NR1lnWS9BVnNYemJpUk9zVUhEMlNMeGpwcjNES2FlYlJJYUd3cHJWRldZMGtTQzFUUFllYXJUakJpNFhRSEVVdGllZUllSkltamUvc1Q4eWtJcEJLamM0Vk11Z2NDNWJmSVZyWmF4YVJJdlpDeCtiWWxjTW41dGh5TW1SckxjRFdTaEkvdGtSaUY1L2hDamRoSVFFRGNmYXo0UHpXVEJjdGVwOW1oaDJTclA2U0lIelRYbTdacSIsIk1JSUY4ekNDQk51Z0F3SUJBZ0lRQXVlUmNmdUFJZWsvNHRtRGcweFF3REFOQmdrcWhraUc5dzBCQVF3RkFEQmhNUXN3Q1FZRFZRUUdFd0pWVXpFVk1CTUdBMVVFQ2hNTVJHbG5hVU5sY25RZ1NXNWpNUmt3RndZRFZRUUxFeEIzZDNjdVpHbG5hV05sY25RdVkyOXRNU0F3SGdZRFZRUURFeGRFYVdkcFEyVnlkQ0JIYkc5aVlXd2dVbTl2ZENCSE1qQWVGdzB5TURBM01qa3hNak13TURCYUZ3MHlOREEyTWpjeU16VTVOVGxhTUZreEN6QUpCZ05WQkFZVEFsVlRNUjR3SEFZRFZRUUtFeFZOYVdOeWIzTnZablFnUTI5eWNHOXlZWFJwYjI0eEtqQW9CZ05WQkFNVElVMXBZM0p2YzI5bWRDQkJlblZ5WlNCVVRGTWdTWE56ZFdsdVp5QkRRU0F3TmpDQ0FpSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnSVBBRENDQWdvQ2dnSUJBTFZHQVJsNTZieDNLQlVTR3VQYzRINXVvTkZrRkg0ZTdwdlRDeFJpNGovK3orWGJ3akV6KzVDaXBET3FqeDkvaldqc2tMNWRrN1BhUWt6SXRpZHNBQW5EQ1cxbGVaQk9JaTY4TGZmMWJqVGVaZ01ZaXdkUmQzWTM5Yi9sY0dwaXVQMmQyM1c5NVlIa01NVDhJbFdvc1lJWDBmNGtZYjYycnBoeWZuQWpZYi80T2Q5OVRobmhsQXhHdGZ2U2JYY0JWSUtDWWZaZ3FSdlYrNWxSZVVuZDFhTmpSWVZ6UE9vaWZnU3gyZlJ5eTErcE8xVXphTU1ObklPRTcxYlZZVzBBMWhyMTl3N2tPYjBLa0pYb0FMVEREajF1a1VFRHFRdUJmQnhSZUw1bVhpdTFPN1dHMHZsdGcwVlovU1p6Y3RCc2RCbHgxQmttV1lCVzI2MUtaZ0JpdnJxbDVFTFRLS2Q4cWd0SGNMUUE1Zmw2SkIwUWdzNVhEYVdlaE44NkdwczVKVzhBcmpHdGpjV0FJUCtYOENRYVdmYUNudVJtNkJrLzAzUFFXaGdkaTg0cXdBMHNzUmZGSndIVVBUTlNuRThFaUdWazJmcnQwdThQRzFwd1NRc0Z1TkpmY1lJSEV2MXZPelA3dUVPdUR5ZHNtQ2pobHh1b0sybjUvMmFWUjNCTVR1K3A0K2dsOGFsWG9CeWN5TG1qM0ovUFVncUQ4U0w1ZlRDVWVnR3NkaWEvU2E2ME4yb1Y3dlExN3dqTU4rTFhhMnJqai9iNFpsWmdYVm9qRG1BakR3SVJkRFV1alF1MFJWc0pxRkxNelNJSHBwMkNacDdtSW9McnlTYXkyWVlCdTdTaU53TDk1WDZIZTJrUzhlZWZCQkhqendXLzlGeEdxcnk1N2k3MWMyY0RBZ01CQUFHamdnR3RNSUlCcVRBZEJnTlZIUTRFRmdRVTFjRm5Pc0tqbmZSM1VsdFpFamdwNWxWb3U2VXdId1lEVlIwakJCZ3dGb0FVVGlKVUlCaVY1dU51NWcvNitya1M3UVlYanprd0RnWURWUjBQQVFIL0JBUURBZ0dHTUIwR0ExVWRKUVFXTUJRR0NDc0dBUVVGQndNQkJnZ3JCZ0VGQlFjREFqQVNCZ05WSFJNQkFmOEVDREFHQVFIL0FnRUFNSFlHQ0NzR0FRVUZCd0VCQkdvd2FEQWtCZ2dyQmdFRkJRY3dBWVlZYUhSMGNEb3ZMMjlqYzNBdVpHbG5hV05sY25RdVkyOXRNRUFHQ0NzR0FRVUZCekFDaGpSb2RIUndPaTh2WTJGalpYSjBjeTVrYVdkcFkyVnlkQzVqYjIwdlJHbG5hVU5sY25SSGJHOWlZV3hTYjI5MFJ6SXVZM0owTUhzR0ExVWRId1IwTUhJd042QTFvRE9HTVdoMGRIQTZMeTlqY213ekxtUnBaMmxqWlhKMExtTnZiUzlFYVdkcFEyVnlkRWRzYjJKaGJGSnZiM1JITWk1amNtd3dONkExb0RPR01XaDBkSEE2THk5amNtdzBMbVJwWjJsalpYSjBMbU52YlM5RWFXZHBRMlZ5ZEVkc2IySmhiRkp2YjNSSE1pNWpjbXd3SFFZRFZSMGdCQll3RkRBSUJnWm5nUXdCQWdFd0NBWUdaNEVNQVFJQ01CQUdDU3NHQVFRQmdqY1ZBUVFEQWdFQU1BMEdDU3FHU0liM0RRRUJEQVVBQTRJQkFRQjJvV2M5M2ZCOGVzY2kvOGVzaXhqKytOMjJtZWlHRGpnRityQTJMVUs1SU9RT2djVVNUR0tTcUY5bFlmQXhQanJxUGpEQ1VQSENVUnYrMjZhZDVQL0JZdFh0Ym10eEpXdStjUzVCaE1EUFBlRzNvUFp3WFJIQkpGQWtZNE80QUY3UklBQVVXNkV6RGZsVW9ESEt2ODN6T2lQZllHY3BIYzlza3hBSW5DZWRrN1FTZ1h2TUFSampPcWRha29yMjFEVG1OSVVvdHhvOGtIdjVod1JsR2hCSndwczZmRVZpMUJ0MHRycE0vM3dZeGxyNDczV1NQVUZaUGdQMWo1MTlrTHBXT0o4ejA5d3hheStCcjI5aXJQY0JZdjBHTVhsSHFUaHk4eTRtL0h5VFFlSTJJTXZNclFud3FQcFkrckxJWHl2aUkydkxvSSs0eEtFNFJuMzhaWjhtIiwiTUlJRGpqQ0NBbmFnQXdJQkFnSVFBenJ4NXFjUnFhQzdLR1N4SFFuNjVUQU5CZ2txaGtpRzl3MEJBUXNGQURCaE1Rc3dDUVlEVlFRR0V3SlZVekVWTUJNR0ExVUVDaE1NUkdsbmFVTmxjblFnU1c1ak1Sa3dGd1lEVlFRTEV4QjNkM2N1WkdsbmFXTmxjblF1WTI5dE1TQXdIZ1lEVlFRREV4ZEVhV2RwUTJWeWRDQkhiRzlpWVd3Z1VtOXZkQ0JITWpBZUZ3MHhNekE0TURFeE1qQXdNREJhRncwek9EQXhNVFV4TWpBd01EQmFNR0V4Q3pBSkJnTlZCQVlUQWxWVE1SVXdFd1lEVlFRS0V3eEVhV2RwUTJWeWRDQkpibU14R1RBWEJnTlZCQXNURUhkM2R5NWthV2RwWTJWeWRDNWpiMjB4SURBZUJnTlZCQU1URjBScFoybERaWEowSUVkc2IySmhiQ0JTYjI5MElFY3lNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXV6Zk5OTng3YThteWFKQ3RTblgvUnJvaENnaU45UmxVeWZ1STIvT3U4anFKa1R4NjVxc0dHbXZQckMzb1hna2tSTHBpbW43V282aCs0RlIxSUFXc1VMZWNZeHBzTU56YUh4bXgxeDdlL2RmZ3k1U0RONjdzSDBOTzNYc3MwcjB1cFMva3FiaXRPdFNacExZbDZadHJBR0NTWVA5UElVa1k5MmVRcTJFR25JL3l1dW0wNlpJeWE3WHpWK2hkRzgyTUhhdVZCSlZKOHpVdGx1TkpiZDEzNC90SlM3U3NWUWVwajVXenRDTzdURzFGOFBhcHNwVXd0UDFNVll3blNsY1VmSUtkelhPUzB4WktCZ3lNVU5HUEhnbStGNkhtSWNyOWcrVVF2SU9sQ3NSbktQWnpGQlE5Um5iRGh4U0pJVFJOcnc5RkRLWkpvYnE3bk1XeE00TXBoUUlEQVFBQm8wSXdRREFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQTRHQTFVZER3RUIvd1FFQXdJQmhqQWRCZ05WSFE0RUZnUVVUaUpVSUJpVjV1TnU1Zy82K3JrUzdRWVhqemt3RFFZSktvWklodmNOQVFFTEJRQURnZ0VCQUdCbktKUnZEa2hqNnpIZDZtY1kxWWw5UE1XTFNuL3B2dHNyRjkrd1gzTjNLaklUT1lGblFvUWo4a1ZuTmV5SXYvaVBzR0VNTktTdUlFeUV4dHY0TmVGMjJkK21RcnZIUkFpR2Z6WjBKRnJhYkEwVVdUVzk4a25kdGgvSnN3MUhLajJaTDd0Y3U3WFVJT0daWDFOR0ZkdG9tL0R6TU5VK01lS05oSjdqaXRyYWxqNDFFNlZmOFBsd1VIQkhRUkZYR1U3QWo2NEd4SlVURnk4YkpaOTE4ckdPbWFGdkU3RkJjZjZJS3NoUEVDQlYxL01VUmVYZ1JQVHFoNVV5a3c3K1UwYjZMSjMvaXlLNVM5a0pSYVRlcExpYVdOMGJmVktmamxsRGlJR2tuaWJWYjYzZERjWTNmZTBEa2h2bGQxOTI3anlOeEYxV1c2TFpabTZ6TlRmbE1yWT0iXSwieDV0I1MyNTYiOiJhYjA0NGJQMlhuMEFUNS12ektrcGlnSWx1NVdmaGFfb0tUUVY0WVBuWjdzIn0.eyJyZXF1ZXN0Ijp7ImFwaS12ZXJzaW9uIjoiNy4zLXByZXZpZXciLCJlbmMiOiJDS01fUlNBX0FFU19LRVlfV1JBUCIsImtpZCI6Imh0dHBzOi8vbWNwYXRpbm90ZXN0aHNtLm1hbmFnZWRoc20uYXp1cmUubmV0L2tleXMvbGl2ZWt2dGVzdHJzYS1rZXktbmFtZWYwNzAxM2JhIn0sInJlc3BvbnNlIjp7ImtleSI6eyJhdHRyaWJ1dGVzIjp7ImNyZWF0ZWQiOjE2MzYxNDEwMzksImVuYWJsZWQiOnRydWUsImV4cG9ydGFibGUiOnRydWUsInJlY292ZXJhYmxlRGF5cyI6NywicmVjb3ZlcnlMZXZlbCI6IkN1c3RvbWl6ZWRSZWNvdmVyYWJsZStQdXJnZWFibGUiLCJ1cGRhdGVkIjoxNjM2MTQxMDM5fSwia2V5Ijp7ImUiOiJBUUFCIiwia2V5X2hzbSI6ImV5SmphWEJvWlhKMFpYaDBJam9pUjB0MVlrTmpaVk5RVjFOU1pUVkpVRlZoTW5aTFRWWjRTbk0yY2pCSFpERnlOR1JOZFMxM2N6UnhZVU5yZDBFNGVraHlWM1YwVkdSbVdGVjFaak5mVTAxalFtdHpaRTB4VWpCeFYySkJibmwzWVhreVIxOXFjR3RwYTBkNmRpMWZZMTlVU1RKMmFWcG1RMG8yVDFOWVRsaERTUzAwUkc4eVh6UjZjMWx0ZEdkWWRqaFRlbkUzZEd0elMzaGhZblJRZUVoT1EyNUdlaTB4Vm0xR1gzWnFReTFTYWxGRWVuVlZabGhLYlhWTVoyWlNURUpmVkVZNGVtaGlTbVZsYkVoWE0xazBPV0pUYzIxMWVGOU1NVUZYUjBscVltazVRMkpQVFdOZmJ6SlhaV2w1YWtGelRVVTFSRzVoYVZjMU5FZDRaRFZCZUdadVltZHRiMHAyV2xvMVJYUXRTekZZVjNSYWExcHFNR1pZTWsxYVFtUlRaVFJLTWxBNFFWazNkRlpRZGs1ZlRYcElSMHQ2Y1VWRldGVjVZbE15YTJoUlFrbHFTRzFhZVVoQ2NYcFVjM2RCTkU1S05HeGhhVXh3U2tkbFkwVTRVVmR2WDJWUk9XaHVXVjk0Y0ZGMVNDMHpiMFJsYmxOTlJGVjJjVTVZYTNnNE5VWmxObTVDYjFkaVVUQnBRekZHZFVJM1FVWlFUM3AwYUdaVUxVNTVRMnRvVlV0bGJEQjNNRkI0TFRsWFZsRmlWRWxSUjBaaGIwaFphSGxKVERGVWQxSkRaREZxUW5NNU5rMVdaa2RCVWt0SmNUVjVRek15ZURBMFR6bHdVa2w2YkV4TWNXdE5VRVYyZG1OZlRqSmtkVk10V1dsVGJsTlhOems1TlhkM05sWjZWMVZJYkU1eUxWaEVkV0pyYm01bVRHZHhWa2wxT0V4dk5YaGtNVWd3TFV4MGJITTNTamxmY0RkRVUyWllYMW90UjNkV2IzTkVaMHBzYW14cWNVeEZNMDU1Uld0cmJESTBjRkpKYzNkM1dtaGFSVkJaVTFWWGJVeEhkVEYxZUZrMmVuUlBkSGhSV1V4TWIzQnBWM2hJUlZkME1tbEhORTlJWWtKeloxaENPRWt4VEZCelJIQXRkVkpVZFRSeWRGTlZNbXN0VUdWRGRUTjVVREJLUWtkQ1JUZGljazlqU1dsWlFUUklPRkYzU2t3emJVSTFUa1YxUWsxeWFFbDFWRzAyTWxSTVZIUnFiMGd4WkUxSlZtUnBSMVI0VFVaT1NYUlBkMFJhV21SVVpISnBjVU51ZEVkSGFtMHdiRU0zYlZOV2JrVTFhM2h0Y2tReGVTMHRhbVZ3UzFVMFExa3RXVmxRY205MFIzSmpOVGd0YldwclluQlNVVlpuZFc5b1VteDZjWGhZWVVSMGJFeFFhelk1YlRSeFJUVm1Oa3BzTUhOWmNXWlhXVEY2TTE5Sk5HSmpURzVTYmxsR1pXMVhWMWhMU0cxVVltMVlSRFJxY2xCcmRqazJlWFoyTmtzd2JIa3lVbFJ3ZDBkWWNUWjFZV3hKY1RsQk9GZEhlbGN6YTNZMU16ZFBjRFo2ZDBOSWFESnhWalJaY0dOWlUwOTJiR05wZDE5ME4ybE9jVzh0WnpGak1tSlBUWGd6VFdOa2NHNDVZM1I1YUd0Tk9YcDRjVWxCUTNwbU9HbzBVVGw2VWtwaGIzWjFXRmxvU25oWE1FTnJXRWRLZWtkV1VHZGZiV2xqUjFWaU4wUm1iRGRoTkRKcFZTMHplV00xUTFsQmMzTmhaRGhPWldGUVlsOHRVMVZHWjA1R01XaFlXbWN4TjA0NFZtTkZNM2w0VkUweVdrMUtkV2RNTVc5MlFWcEVVRmQwV0hGdVdWQnRZa0pOWlhGbGMwUlJRbTlxT1d4dE5YRXRNbTUyUkRsUlRIQkJUREZhTFhCd1kzRXlaVlpQVGs1UFdqQlBTMDFWYkc1Q1dDMUdUMnAyTFZORlYydFFZM0ZOWlVGTk5sbE9PSGMzUlRGQ1ZHNVBXR1JmWms1VE4zWkpRMHBOV0Voc1JXeEZZak5PVlU0MFQyaHlRM0pCWW5wTFpXczFjMnRhYkRsTldtaFdVRk5DV0VSdFV6Vnhla3RaYzB4SE9XbFNTak5SZEZCU1JGUTRWSGhSUjBWS1VpMVdNRmxqVTFCc2EyMVhSRXgxYUcxaVNGOVZSVVkzWkhKR1kxVkhiakpTTW10cFpHZHFaMVJuTFhSbWRraFNTVFV3VWtkNVpqbGZWa0V6VmtGSmQyZzNOSEJ4TWpkWU1DMXBhVmh0T0dOVFJIaHpSVzA0YldGaFduaEdPVkowVmtwVmFFRXpOMkZ1Y3podFFtUlVNV1JYYTBsSE0xSklhMXBTZEhaa2VsaFZXbWgwTUd4SWJUVXpkRlpFZEZsTFgxVlhXaTF1WmtFd1FVUkdkbUpMVWtWT2VrMTNTMmhoYld3MmNFaFBjSGc0UlRCRE4xTlJXR3RSTnpsS2RUWlpiMVYwY1RsVk5HVXpXVFpYWTNWS1IxRklSWGR0Y2xwbmVUZ3lTalpVUzFsU1NUUnFaa3hPUkVkVlVtMU5lVTgwYXpOcFgwZHdRVzFMYWxoa1VYTXpTa2swVTFGUU5XaFJaa0kzY2trMVpUQnBSM1pvWDJGV1ZqQnRUSE5CWTIwM1ZHc3dTVmRoVldzdGQxUTBiRVJEY1RSUFdIaExkMUJhZFZWMmVYTTBjRVZ6VG5kQ2RERlRVRVV5UzFKUWVFUklVblJNVUdoZmFFNU9PRTFaYjFscFZtbFJXbWR6VmxkWlRsSXlRamhJWW5VM2NHUmhTVzk0ZVVoMFZ6SnFZaTAxTTBWU1UwRkNlVGxtYW5wRlNrTXpVVXBLZFVkV2VGQlNMWEJDVTB0WFRUSmtTRWh0WDJOMFJVbGxNWFI0YTNwc1ZEUmtNREF0U1VGcFltODFWVEkxU2tWUlVESkdjRTVqTWkwMVlsbFRTRkpRYjJKb2VuTktXUzFtTUU4NFVFbEtOV3RpYmt4QlZsQmpNSGROVmxaSFdGRk5lRzVhVlVOYU9ISkpXbXR1VUU1TGIwOUhTREpoV0U5dk5WQXpSbGxtZEdoVmVHUTRka2hxWkhaQlJrcFJTR3BaUmtaUldVNVpNR04yVXpZelFrbDJkekZpTW1rMlFUQktObGRMV1VScWNIQnVaRUZxTFhaWVltNTRabmhpWjFkbU5YbHVkR1JtUjNSbVRsOVZTVjlhYjBkcWVHNDFRbTlTWlZCak5uaElhell5VG5ZeWJURndhMWxwZDBzeE9YQnpSakEyTVV0clYwUTNVME5DY0hGTVYyUnhPRVI2WW5WdWVsUjNSalIxT0Y5WWFrZGFXSEV0U1VaT1IxZDZhekZLZWpNNFVsZFFOazFsWDJVeWJFZDZlbVJmZFV3MmJGRk9NRmh5VVhWUVNqQlNibUZHTm5aUWRHc3lhbUZ0Y1hWeVZUWjZhMmhQVDBkRlZHOXlTVVpqV21oNVIwOVNjakJpZDI5SVV5SXNJbWhsWVdSbGNpSTZleUpoYkdjaU9pSmthWElpTENKbGJtTWlPaUpEUzAxZlVsTkJYMEZGVTE5TFJWbGZWMUpCVUNJc0ltdHBaQ0k2SW1aaGEyVXRjbVZzWldGelpTMXJaWGtpZlN3aWMyTm9aVzFoWDNabGNuTnBiMjRpT2lJeExqQWlmUSIsImtleV9vcHMiOlsid3JhcEtleSIsImRlY3J5cHQiLCJlbmNyeXB0IiwidW53cmFwS2V5Iiwic2lnbiIsInZlcmlmeSJdLCJraWQiOiJodHRwczovL21jcGF0aW5vdGVzdGhzbS5tYW5hZ2VkaHNtLmF6dXJlLm5ldC9rZXlzL2xpdmVrdnRlc3Ryc2Eta2V5LW5hbWVmMDcwMTNiYS8wMWQxMWNlNjY2NWIwODJhOWM4MTYxYjM2Njg3MTJiZCIsImt0eSI6IlJTQSIsIm4iOiJpejNLZlhYS0d2WVFMVUwyQ0FnSGI4aEpfejl4V3FjWkNvRzNZaFVHTnB4bWdfMVloYXoxQldKWkZHWGtoWDNjNHZxbXJLYmVTOE9wb2g3Z2NSd2lWTEoxVW9QbzJKcGdiemdIVTl0MmlzTWVibDNaMll3MmFrR3Vjd1NyRjFpMFdUZm9SMkk1WHBoN2VLUWh2QlhCdzlnRjVzelBQZ2Rvck5BV3A0QkNaaGNUVkxweG5SVXBkY0YtOFFzWXRFWlZJMjZ1UzhzQlV3dGpWR1VRVVhVdmJNbFhOdEZGY2JLZDRJbHNRMlNlNWF4QUExVWZQckNJb284aHF3Q2dMa2pNaGdwMXdiZ3pkb0xSZEI3VEhONmVqenozLUJla1E0eVZtZGw2WkZHSWExV0dsUUlRSWZza3BETU9QVGpUNmdHbGRlbnBDWGFBVzd4aU40Y2hQTENqbXcifSwicmVsZWFzZV9wb2xpY3kiOnsiY29udGVudFR5cGUiOiJhcHBsaWNhdGlvbi9qc29uOyBjaGFyc2V0PXV0Zi04IiwiZGF0YSI6ImV5SmhibmxQWmlJNlczc2lZVzU1VDJZaU9sdDdJbU5zWVdsdElqb2ljMlJyTFhSbGMzUWlMQ0psY1hWaGJITWlPblJ5ZFdWOVhTd2lZWFYwYUc5eWFYUjVJam9pYUhSMGNITTZMeTl6YTNKaGRIUmxjM1JoZEdsdmJpNWhlblZ5WlhkbFluTnBkR1Z6TG01bGRDOGlmVjBzSW5abGNuTnBiMjRpT2lJeExqQXVNQ0o5In19fX0.Id8h9ra0OAdGRSvx0g39d6mhf-SqsgOGi0Ik5sjVkWKUcVv5MswiPzS6_qxgBShCgY9Hl0D2esoIHAlFW0H4UhBC7TLP2-KynXT8Aq9OchboqJyRz8L5v_EvBE39FVvPNDgdBb8gigSVEolG-Tta91mAP0Um5dQ9Sa33ESVe-1kn9oQGttxNSPF-DPre-VSSKMThlz5oB_JX8YWogDYkcmqM5EuXJobSe1D24wQtpd9LY6oYlj_2qMMQgEjALIiPwNQZDruCLkBS49ohRnySu-bME5aVs4Lo9MRVRDemNpzymxN73ElKLaOPOE_tyzxhzoxmo31ypaUD1v90yPlwIg"}' headers: cache-control: - no-cache content-length: - - '14118' + - '14326' content-security-policy: - default-src 'self' content-type: @@ -161,7 +161,7 @@ interactions: x-ms-keyvault-region: - westus x-ms-server-latency: - - '803' + - '864' status: code: 200 message: OK diff --git a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_release_7_3_preview_mhsm.yaml b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_release_7_3_preview_mhsm.yaml index f8cd30ba1e29..fa07b5463765 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_release_7_3_preview_mhsm.yaml +++ b/sdk/keyvault/azure-keyvault-keys/tests/recordings/test_keys_async.test_key_release_7_3_preview_mhsm.yaml @@ -9,24 +9,24 @@ interactions: Connection: - keep-alive User-Agent: - - python-requests/2.24.0 + - python-requests/2.26.0 method: GET uri: https://fakeattestation.azurewebsites.net/generate-test-token response: body: - string: '{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImpfRUZtUTVVQm9lNHJMNUltNmw1cU1rQXN0QXluaE5JQUJ6dFZLQ0RMV1UiLCJqa3UiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0L2tleXMifQ.eyJpc3MiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0LyIsInNkay10ZXN0Ijp0cnVlLCJ4LW1zLWluaXR0aW1lIjp7fSwieC1tcy1ydW50aW1lIjp7ImtleXMiOlt7Imt0eSI6IlJTQSIsImtpZCI6ImZha2UtcmVsZWFzZS1rZXkiLCJ1c2UiOiJlbmMiLCJlIjoiQVFBQiIsIm4iOiJ6STBBdHhzRjV0a1BLMDB3QXV4RjNSTVhKeWhnXzZVeWpoR1ZfSnZyWjRPRFlOdjd4LWFsRFhfUU51SmxfLW9IYnRiUkZxMnNiaW1PTUNEblR1YVBFSE5ydnduY3RpbFU5X2VUMTBTU0tiQjdaWE1LNXRyaEZycVRSNXplLVNub1RteWZlM003VzVnVHc5YkF4Vmp1S1BpYUZidnR3TkxkVmRsUUoyVkJUS05QRkdWZFpIQjdPSlNOdHRIVS1Sa1N2QmYtNTljWk4xQ2IyVUtvZVJVTy15M1M5SGF6cFNWaGcya0R2NG1CaDZRYmlkUjM5aTdESTVXQTJObGpMRWgyaTdPQUk1Q3gwQjJOM0lXS0tyWW5ZQWxjY1pxT2xZX19vWU5mdlFxYWp6aTQ1cVZVUXRtb2ViQzdLeVlyZXpXVW5WeFFZbnY3NnZPYUZFbW1TS1RpY3cifV19LCJtYWEtZWhkIjoic2RrLXRlc3QiLCJpYXQiOjE2Mjc5MzkyMDUsImV4cCI6MTk0MzUxNTIwNX0.f2-sJun8WCxsOms7aiN8ImDBvJG5ULDvCHrw1qf5V7YCfGHyFsMmWZnVYJag50imx-SBd6G78sXQUqd9iwaGr1ZPT5OoC_Lm1zzK4AnNCl38O6EHPanCM_PUSGlaKVR7j4mS4HuvHfE2rwcLL-txLBfVQCMR58vQkh9Xg2ElblIj78KN280BLvjWhuURbKXKDxOF611S7F7dMupVh8Vhj0XE0NeLq_xYQjaKjoGorN5wnhLRvwgNjwxxQb0BbvJNUa4_1qtc3d5GVVa9ve9W0A1OS2GCdTEJaqF2s8-cUKLlQ04ro-89sDpJ90bZeLlP7EImysWohh-3PNSWie_KbQ"}' + string: '{"token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImhMbEtlLXJQRHB1ang4VmpxT2h1Q1RpMFo4NmJRQlh3aUd5bjdMaGlOcVUiLCJqa3UiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0L2tleXMifQ.eyJpc3MiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0LyIsInNkay10ZXN0Ijp0cnVlLCJ4LW1zLWluaXR0aW1lIjp7fSwieC1tcy1ydW50aW1lIjp7ImtleXMiOlt7Imt0eSI6IlJTQSIsImtpZCI6ImZha2UtcmVsZWFzZS1rZXkiLCJ1c2UiOiJlbmMiLCJlIjoiQVFBQiIsIm4iOiJxdnFpTzY5NFM0ZGpVbVRTRGVqNzRIdGxxamFkOXVFV0doaVIyZkFLR2o3XzZXcU4ycjF3RFdGZURlVkJLTzVPSEpHTFdqZ2tWNmpRVmdUR0xpQmNkaVBNZ29ESjBnQ1hBQWIwRXJoQ2FPQmYzUkoteEdKaDMxRTdqeGc2QllDQTR3NFZqaTljeWdydFVVSFdtNVc5ZmRya1pBMTF1S3JoTlA3a1k1OHNMTlJKYW1ucVE2ZDVVV3lpSmtwN1dLaHV6OVVoQVJxRndEWlpMcF9KajA4YnFlNlVXa01zczh4Y1hZOEdyMGdZTW1EV0JEaVdsMy1oMmhjclo4b0pTZWJjaXBJMklHYXVoSnpnTjlVdXNHU3NsZzloeXNvVjI2MzYyOXNBNEFpbG4zLURXdDJEVUN5YUdkNXA5czRVNmhiVTQ2RVdaSElvUkFuWHN2UGNaUXdyVFEifV19LCJtYWEtZWhkIjoic2RrLXRlc3QiLCJpYXQiOjE2MzYxNDEzODksImV4cCI6MTk1MTcxNzM4OX0.R-o6fFoYf3UUJhXdZVUgI4WaZ_vfMtMb5sugmc3-OmfjHX9Vq_d8hqc9POmfMHmoRZPpJnM3QEyp4G1DwdDufs9tvMCqmAszw-OxZM1H0Zr_57ZTlpI2iuFfbNyl7QJIayq4D59eb8VVTLHBoZT5LyeN0UVt8Dj7aUbXTaCu6zeJz5gyGg_bXlVDSI4YC_ig4Vmieb6m7irOKJcxM8vSb09XVYknLvGJjGhF672lABSB9X3QoGV0KyV-Dt9mjcr-9Mr0-KCS3m93Wrt8BodQKmFh4mhTLgyG5BEX1jPnFlTbuqeuGg51viNgm7NbaBdSndNLP1yx9SnUO6_WZUAc-Q"}' headers: content-length: - '1305' content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:20:04 GMT + - Fri, 05 Nov 2021 19:43:08 GMT etag: - - W/"519-H+crlljB9Yap257Q4zflV5CKgB0" + - W/"519-t7f4rz4sD24eKFJRphqSPNou58Y" set-cookie: - - ARRAffinity=31a267ed7b71ec86982412cc9dc4ad2f31ca2b8f51b692363aa765c405b03b84;Path=/;HttpOnly;Secure;Domain=skrattestation.azurewebsites.net - - ARRAffinitySameSite=31a267ed7b71ec86982412cc9dc4ad2f31ca2b8f51b692363aa765c405b03b84;Path=/;HttpOnly;SameSite=None;Secure;Domain=skrattestation.azurewebsites.net + - ARRAffinity=e1388f2ccc1e3d0c72d787dffaa45dc092df8f336d038537355bbb351c2ad028;Path=/;HttpOnly;Secure;Domain=skrattestation.azurewebsites.net + - ARRAffinitySameSite=e1388f2ccc1e3d0c72d787dffaa45dc092df8f336d038537355bbb351c2ad028;Path=/;HttpOnly;SameSite=None;Secure;Domain=skrattestation.azurewebsites.net x-powered-by: - Express status: @@ -42,7 +42,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) method: POST uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef36413cc/create?api-version=7.3-preview response: @@ -65,21 +65,21 @@ interactions: url: https://mcpatinotesthsm.managedhsm.azure.net/keys/livekvtestrsa-key-namef36413cc/create?api-version=7.3-preview - request: body: '{"kty": "RSA-HSM", "attributes": {"exportable": true}, "release_policy": - {"data": "eyJhbnlPZiI6IFt7ImFueU9mIjogW3siY2xhaW0iOiAic2RrLXRlc3QiLCAiY29uZGl0aW9uIjogImVxdWFscyIsICJ2YWx1ZSI6IHRydWV9XSwgImF1dGhvcml0eSI6ICJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0In1dLCAidmVyc2lvbiI6ICIxLjAifQ"}}' + {"data": "eyJhbnlPZiI6IFt7ImFueU9mIjogW3siY2xhaW0iOiAic2RrLXRlc3QiLCAiZXF1YWxzIjogdHJ1ZX1dLCAiYXV0aG9yaXR5IjogImh0dHBzOi8vc2tyYXR0ZXN0YXRpb24uYXp1cmV3ZWJzaXRlcy5uZXQvIn1dLCAidmVyc2lvbiI6ICIxLjAuMCJ9"}}' headers: Accept: - application/json Content-Length: - - '300' + - '274' Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) method: POST uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef36413cc/create?api-version=7.3-preview response: body: - string: '{"attributes":{"created":1627939207,"enabled":true,"exportable":true,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1627939207},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef36413cc/8dc88906b6ee41e106d828ef962a7b12","kty":"RSA-HSM","n":"hnIcDDE1KB_N0qfj7mWAk9ZodoAYFdAwnunBnjTbXpYA3vA7tEcgaJARzi4GAmNTJPgytEvds8wZ-8XDJqKxETG-LuM5xz8sg4MFAqSjDmjPOspuX4SuU7pZY3ah9yAdLsn7vW7DxCUK_OTHZhn39HMTIfrL5WL7rV3cYWdSk1bPNu1M1AahaOsbAUnDqLFKFjb7QmTLLI-whQDmDeoL8qdvLtjIgf56hJxHfiZ0azWIMhT3XeSXo3DSKdxu-eSTcsWmfpdR1JdxvlATiE5kX11zyUNASm9nRZEHSU522oOErq-LeDdU_kzTvUS9EvNzFATVYD_zBxIr8W4XbOOXWw"},"release_policy":{"contentType":"application/json; + string: '{"attributes":{"created":1636141393,"enabled":true,"exportable":true,"recoverableDays":7,"recoveryLevel":"CustomizedRecoverable+Purgeable","updated":1636141393},"key":{"e":"AQAB","key_ops":["wrapKey","decrypt","encrypt","unwrapKey","sign","verify"],"kid":"https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef36413cc/2d68d2d23b23429c84c79430f5eca9be","kty":"RSA-HSM","n":"pM339ySGYrziWgfr8t2rqbf-UrjiMvFW0hS7fg2HN7JR2fzj2LQ8Mg0VUNHtTyIbHoJHek0nA2gY6gGJJsnrrp2oYSem_WAkPt8iuOKJLhz18eAXb_urJmSH2U-nIIjMSvXtJh6gAWUcpyKYn-DepCqXaXRfe9hXlL39gzyr22kfmpY0XXg9fXQfF1U6N34v4K3sxmFIjP4N4xkm-6LyxOsk9p2DK4eTZHotYYid-8eei2artrWEivmcUeYmduNPkNVcdLZnDvBYRvQTBvWlxIaFPYZagcG7VOxLWRbem_siYs-Kr6XTWZp7UUSfj_65Sws3vAOMzFATkUvno1_F9w"},"release_policy":{"contentType":"application/json; charset=utf-8","data":"eyJhbnlPZiI6W3siYW55T2YiOlt7ImNsYWltIjoic2RrLXRlc3QiLCJlcXVhbHMiOnRydWV9XSwiYXV0aG9yaXR5IjoiaHR0cHM6Ly9za3JhdHRlc3RhdGlvbi5henVyZXdlYnNpdGVzLm5ldC8ifV0sInZlcnNpb24iOiIxLjAuMCJ9"}}' headers: cache-control: no-cache @@ -91,13 +91,13 @@ interactions: x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '963' + x-ms-server-latency: '1767' status: code: 200 message: OK url: https://mcpatinotesthsm.managedhsm.azure.net/keys/livekvtestrsa-key-namef36413cc/create?api-version=7.3-preview - request: - body: '{"target": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImpfRUZtUTVVQm9lNHJMNUltNmw1cU1rQXN0QXluaE5JQUJ6dFZLQ0RMV1UiLCJqa3UiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0L2tleXMifQ.eyJpc3MiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0LyIsInNkay10ZXN0Ijp0cnVlLCJ4LW1zLWluaXR0aW1lIjp7fSwieC1tcy1ydW50aW1lIjp7ImtleXMiOlt7Imt0eSI6IlJTQSIsImtpZCI6ImZha2UtcmVsZWFzZS1rZXkiLCJ1c2UiOiJlbmMiLCJlIjoiQVFBQiIsIm4iOiJ6STBBdHhzRjV0a1BLMDB3QXV4RjNSTVhKeWhnXzZVeWpoR1ZfSnZyWjRPRFlOdjd4LWFsRFhfUU51SmxfLW9IYnRiUkZxMnNiaW1PTUNEblR1YVBFSE5ydnduY3RpbFU5X2VUMTBTU0tiQjdaWE1LNXRyaEZycVRSNXplLVNub1RteWZlM003VzVnVHc5YkF4Vmp1S1BpYUZidnR3TkxkVmRsUUoyVkJUS05QRkdWZFpIQjdPSlNOdHRIVS1Sa1N2QmYtNTljWk4xQ2IyVUtvZVJVTy15M1M5SGF6cFNWaGcya0R2NG1CaDZRYmlkUjM5aTdESTVXQTJObGpMRWgyaTdPQUk1Q3gwQjJOM0lXS0tyWW5ZQWxjY1pxT2xZX19vWU5mdlFxYWp6aTQ1cVZVUXRtb2ViQzdLeVlyZXpXVW5WeFFZbnY3NnZPYUZFbW1TS1RpY3cifV19LCJtYWEtZWhkIjoic2RrLXRlc3QiLCJpYXQiOjE2Mjc5MzkyMDUsImV4cCI6MTk0MzUxNTIwNX0.f2-sJun8WCxsOms7aiN8ImDBvJG5ULDvCHrw1qf5V7YCfGHyFsMmWZnVYJag50imx-SBd6G78sXQUqd9iwaGr1ZPT5OoC_Lm1zzK4AnNCl38O6EHPanCM_PUSGlaKVR7j4mS4HuvHfE2rwcLL-txLBfVQCMR58vQkh9Xg2ElblIj78KN280BLvjWhuURbKXKDxOF611S7F7dMupVh8Vhj0XE0NeLq_xYQjaKjoGorN5wnhLRvwgNjwxxQb0BbvJNUa4_1qtc3d5GVVa9ve9W0A1OS2GCdTEJaqF2s8-cUKLlQ04ro-89sDpJ90bZeLlP7EImysWohh-3PNSWie_KbQ"}' + body: '{"target": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImhMbEtlLXJQRHB1ang4VmpxT2h1Q1RpMFo4NmJRQlh3aUd5bjdMaGlOcVUiLCJqa3UiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0L2tleXMifQ.eyJpc3MiOiJodHRwczovL3NrcmF0dGVzdGF0aW9uLmF6dXJld2Vic2l0ZXMubmV0LyIsInNkay10ZXN0Ijp0cnVlLCJ4LW1zLWluaXR0aW1lIjp7fSwieC1tcy1ydW50aW1lIjp7ImtleXMiOlt7Imt0eSI6IlJTQSIsImtpZCI6ImZha2UtcmVsZWFzZS1rZXkiLCJ1c2UiOiJlbmMiLCJlIjoiQVFBQiIsIm4iOiJxdnFpTzY5NFM0ZGpVbVRTRGVqNzRIdGxxamFkOXVFV0doaVIyZkFLR2o3XzZXcU4ycjF3RFdGZURlVkJLTzVPSEpHTFdqZ2tWNmpRVmdUR0xpQmNkaVBNZ29ESjBnQ1hBQWIwRXJoQ2FPQmYzUkoteEdKaDMxRTdqeGc2QllDQTR3NFZqaTljeWdydFVVSFdtNVc5ZmRya1pBMTF1S3JoTlA3a1k1OHNMTlJKYW1ucVE2ZDVVV3lpSmtwN1dLaHV6OVVoQVJxRndEWlpMcF9KajA4YnFlNlVXa01zczh4Y1hZOEdyMGdZTW1EV0JEaVdsMy1oMmhjclo4b0pTZWJjaXBJMklHYXVoSnpnTjlVdXNHU3NsZzloeXNvVjI2MzYyOXNBNEFpbG4zLURXdDJEVUN5YUdkNXA5czRVNmhiVTQ2RVdaSElvUkFuWHN2UGNaUXdyVFEifV19LCJtYWEtZWhkIjoic2RrLXRlc3QiLCJpYXQiOjE2MzYxNDEzODksImV4cCI6MTk1MTcxNzM4OX0.R-o6fFoYf3UUJhXdZVUgI4WaZ_vfMtMb5sugmc3-OmfjHX9Vq_d8hqc9POmfMHmoRZPpJnM3QEyp4G1DwdDufs9tvMCqmAszw-OxZM1H0Zr_57ZTlpI2iuFfbNyl7QJIayq4D59eb8VVTLHBoZT5LyeN0UVt8Dj7aUbXTaCu6zeJz5gyGg_bXlVDSI4YC_ig4Vmieb6m7irOKJcxM8vSb09XVYknLvGJjGhF672lABSB9X3QoGV0KyV-Dt9mjcr-9Mr0-KCS3m93Wrt8BodQKmFh4mhTLgyG5BEX1jPnFlTbuqeuGg51viNgm7NbaBdSndNLP1yx9SnUO6_WZUAc-Q"}' headers: Accept: - application/json @@ -106,15 +106,15 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-keyvault-keys/4.5.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-keyvault-keys/4.5.0b5 Python/3.10.0 (Windows-10-10.0.22000-SP0) method: POST uri: https://managedhsmname.managedhsm.azure.net/keys/livekvtestrsa-key-namef36413cc/release?api-version=7.3-preview response: body: - string: '{"value":"eyJhbGciOiJSUzI1NiIsImtpZCI6IlJWWkk4RmZPcjU0elIyM0IwSnV3Vno0TFhvaUtZUm1lTWN6UWdldUI2V1UiLCJ4NWMiOlsiTUlJSW1qQ0NCb0tnQXdJQkFnSVRNd0FYR0FhcGVQOTVkSjBnRVFBQUFCY1lCakFOQmdrcWhraUc5dzBCQVF3RkFEQlpNUXN3Q1FZRFZRUUdFd0pWVXpFZU1Cd0dBMVVFQ2hNVlRXbGpjbTl6YjJaMElFTnZjbkJ2Y21GMGFXOXVNU293S0FZRFZRUURFeUZOYVdOeWIzTnZablFnUVhwMWNtVWdWRXhUSUVsemMzVnBibWNnUTBFZ01EWXdIaGNOTWpFd09EQXlNakExTnpFM1doY05Nakl3TnpJNE1qQTFOekUzV2pCOU1Rc3dDUVlEVlFRR0V3SlZVekVMTUFrR0ExVUVDQk1DVjBFeEVEQU9CZ05WQkFjVEIxSmxaRzF2Ym1ReEhqQWNCZ05WQkFvVEZVMXBZM0p2YzI5bWRDQkRiM0p3YjNKaGRHbHZiakV2TUMwR0ExVUVBd3dtS2k1dFkzQmhkR2x1YjNSbGMzUm9jMjB1YldGdVlXZGxaR2h6YlM1aGVuVnlaUzV1WlhRd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUM4aFl2anlpdjNwUFhxVUJkSDN5dEVPamZ4TVdwZDZWUllvbFlLRTdtUU5TdHg3K0dyLzYySVF6bXlLZEdqNmIwMkpOUmovZWpTa3dmR1Z5ejJvaHJjWlVFUmlXMDZsd1ZabWxJMDZ6SVhzYVNyTVEyMlllNkVob1NmcGtaMEtKQXdoVkx2V0xLMjNjVXBna09Ud0E0UzJiaURCWDFsU1VsQ2t4d1dpc2tRSnQ5WDQyaDZMYyswTTJUN201bDViVFF6RDdIR2Q0NzE4YktCMTVQc0ZUTWtaaEFSeWp1MGtpMjMyYzErdDdMQ0tITGtLT2M1dWFvQTdIWjdTSHQvNm9QYW9hdXRoeEZLRWZKcDVDamZjSEdvK2o3QzdDTmgwZnZkd1NUNE83eHhmOTVhR3BWejMyQnlsL1pjS3o5dkNIVDVHOFR0Nnc5Ym40bHZweEpFNjExekFnTUJBQUdqZ2dRMU1JSUVNVENDQVg4R0Npc0dBUVFCMW5rQ0JBSUVnZ0Z2QklJQmF3RnBBSGNBN2t1OXQzWE9ZTHJoUW1rZnErR2VacU1QZmwrd2N0aURBTVI3aVhxby9jc0FBQUY3Q0xFOVNRQUFCQU1BU0RCR0FpRUFwKzhyOUhCWlhLZHE0REJyekNkdGpuT0FnVVNnSytzbUJEc2lDYTFZMi80Q0lRQ09NK2VHVnBXK2ZmTUJlNEdnOE9HWndDYm5ZTlg0QUVmUTZwWGxLQXJJckFCMkFFSEl5ckhmSWtaS0VNYWhPZ2xDaDE1T01Zc2JBK3ZyUzhkbzhKQmlsZ2IyQUFBQmV3aXhQRGdBQUFRREFFY3dSUUloQUo1WGpOVFFrRlFWZ3lxNUJaWWs2OTB5ZXo2aGNlN1kwb0ZoQkxzR0RJMmlBaUFjUmNsL2gvUTZwanpNTXNBT2ZuVW41bmRXSDU2TFB5WTczSzJxYW5vRFhnQjJBRkdqc1BYOUFYbWNWbTI0TjNpUERLUjZ6QnNueS9lZWlFS2FEZjdVaXdYbEFBQUJld2l4UFZRQUFBUURBRWN3UlFJaEFQS1FMUVJNbXdSNWxrS1V3blR4SVFTSFNxTUlUbWRxci9Uem5IZldTSUZxQWlBdUZ5V0pQdUhIVXBSYzI2VnF3bUd2bkhmM3ZYY2t1QVVrVElnV2FOUnllakFuQmdrckJnRUVBWUkzRlFvRUdqQVlNQW9HQ0NzR0FRVUZCd01DTUFvR0NDc0dBUVVGQndNQk1Ed0dDU3NHQVFRQmdqY1ZCd1F2TUMwR0pTc0dBUVFCZ2pjVkNJZTkxeHVCNSt0R2dvR2RMbzdRRElmdzJoMWRnb1RsYVlMenB6NENBV1FDQVNNd2dhNEdDQ3NHQVFVRkJ3RUJCSUdoTUlHZU1HMEdDQ3NHQVFVRkJ6QUNobUZvZEhSd09pOHZkM2QzTG0xcFkzSnZjMjltZEM1amIyMHZjR3RwYjNCekwyTmxjblJ6TDAxcFkzSnZjMjltZENVeU1FRjZkWEpsSlRJd1ZFeFRKVEl3U1hOemRXbHVaeVV5TUVOQkpUSXdNRFlsTWpBdEpUSXdlSE5wWjI0dVkzSjBNQzBHQ0NzR0FRVUZCekFCaGlGb2RIUndPaTh2YjI1bGIyTnpjQzV0YVdOeWIzTnZablF1WTI5dEwyOWpjM0F3SFFZRFZSME9CQllFRkJrTnRlck01ZnM1UUdyNWJGb1hIOEdTQ2lNTU1BNEdBMVVkRHdFQi93UUVBd0lFc0RCWEJnTlZIUkVFVURCT2dpWXFMbTFqY0dGMGFXNXZkR1Z6ZEdoemJTNXRZVzVoWjJWa2FITnRMbUY2ZFhKbExtNWxkSUlrYldOd1lYUnBibTkwWlhOMGFITnRMbTFoYm1GblpXUm9jMjB1WVhwMWNtVXVibVYwTUdRR0ExVWRId1JkTUZzd1dhQlhvRldHVTJoMGRIQTZMeTkzZDNjdWJXbGpjbTl6YjJaMExtTnZiUzl3YTJsdmNITXZZM0pzTDAxcFkzSnZjMjltZENVeU1FRjZkWEpsSlRJd1ZFeFRKVEl3U1hOemRXbHVaeVV5TUVOQkpUSXdNRFl1WTNKc01HWUdBMVVkSUFSZk1GMHdVUVlNS3dZQkJBR0NOMHlEZlFFQk1FRXdQd1lJS3dZQkJRVUhBZ0VXTTJoMGRIQTZMeTkzZDNjdWJXbGpjbTl6YjJaMExtTnZiUzl3YTJsdmNITXZSRzlqY3k5U1pYQnZjMmwwYjNKNUxtaDBiVEFJQmdabmdRd0JBZ0l3SHdZRFZSMGpCQmd3Rm9BVTFjRm5Pc0tqbmZSM1VsdFpFamdwNWxWb3U2VXdIUVlEVlIwbEJCWXdGQVlJS3dZQkJRVUhBd0lHQ0NzR0FRVUZCd01CTUEwR0NTcUdTSWIzRFFFQkRBVUFBNElDQVFCNjRlRDJTTFdqZ2ZxQjdqNUdndndqbWQvcVQvdE1TaVR0eW1PN0RDMWVUcE5mNUZ3b0QwdVFpTVdjdGRqTlo5YUM3RTNSa1kvOU1qaXNlUE9CZDdCK0FDem96ays5NlVvbW5pUnVBR3lJRm1zblQ4SHpsb3RkVlZRUFBScUpCZEVvd2FmYUp1bUhMZHhQMmk4WDdrd1ZxcXcxV3A5STdYK25VL1J2ZVRMdWljMTJsUDdLYU04cFBZVlZ1WHlvVyswOWRWS1ZUQlJmQ2V5VXVybHZnM3orc3YxdXBRY0w3MXVqZVR5RW9pbi9ET0hSRXJnTzBVTzE5UXoyQ1EyZDc5SXVEZnZjNWhKTFFRSmVrYUo5ZE02OGJJdlRCdmNYRVpDVWJUUC9IV2wxR3IxN0tTWndvSXVNTUhvbFlSRldpNy9oYmh6eTRCczhLL3lPUVBwdTlqZlFKMkxQWElEaU8rOFFsNnRJQTBneHdDc2R0R2pQSWtIMXBsaGQ3cVczQTlBOGtXUU9mZTJZeDBSb3JxbDVMVVNweXByR0VqdnRqQ21ZZ3hkQStPSHRIbmd0Njg0aHk5cjFzOW9DWEM5WlJGZGJ3YmNtbVh5MUo0Rm1MNXAybkF4R3lqVk5zMWxqUUF0a3VneGxCd1ZNVU0xNUdtMUl0dzJ0U3A3Rm1XMTlmcmt5SGZkRHgrcjVaOUt2eGxTK3ozOTB0UFBid2JDWXcxU3UyZFNLaWJMTnMzTnNZSE5ZSkFaZHNxL1ZEUThjQ3orRVZvWjQwR1l0eDVkRDFuaTZnQ1dyOGV2cSt4cTkzbnVJQXBOVUdhSEMxNlZsdFVyZGhsUTRBajZCSktodlVTL2NKdllHV0pOLzVXdWV5bkJqeUVMSmVQRzM1SEIwWmtmZ1RyUVlNWnByVFE9PSIsIk1JSUY4ekNDQk51Z0F3SUJBZ0lRQXVlUmNmdUFJZWsvNHRtRGcweFF3REFOQmdrcWhraUc5dzBCQVF3RkFEQmhNUXN3Q1FZRFZRUUdFd0pWVXpFVk1CTUdBMVVFQ2hNTVJHbG5hVU5sY25RZ1NXNWpNUmt3RndZRFZRUUxFeEIzZDNjdVpHbG5hV05sY25RdVkyOXRNU0F3SGdZRFZRUURFeGRFYVdkcFEyVnlkQ0JIYkc5aVlXd2dVbTl2ZENCSE1qQWVGdzB5TURBM01qa3hNak13TURCYUZ3MHlOREEyTWpjeU16VTVOVGxhTUZreEN6QUpCZ05WQkFZVEFsVlRNUjR3SEFZRFZRUUtFeFZOYVdOeWIzTnZablFnUTI5eWNHOXlZWFJwYjI0eEtqQW9CZ05WQkFNVElVMXBZM0p2YzI5bWRDQkJlblZ5WlNCVVRGTWdTWE56ZFdsdVp5QkRRU0F3TmpDQ0FpSXdEUVlKS29aSWh2Y05BUUVCQlFBRGdnSVBBRENDQWdvQ2dnSUJBTFZHQVJsNTZieDNLQlVTR3VQYzRINXVvTkZrRkg0ZTdwdlRDeFJpNGovK3orWGJ3akV6KzVDaXBET3FqeDkvaldqc2tMNWRrN1BhUWt6SXRpZHNBQW5EQ1cxbGVaQk9JaTY4TGZmMWJqVGVaZ01ZaXdkUmQzWTM5Yi9sY0dwaXVQMmQyM1c5NVlIa01NVDhJbFdvc1lJWDBmNGtZYjYycnBoeWZuQWpZYi80T2Q5OVRobmhsQXhHdGZ2U2JYY0JWSUtDWWZaZ3FSdlYrNWxSZVVuZDFhTmpSWVZ6UE9vaWZnU3gyZlJ5eTErcE8xVXphTU1ObklPRTcxYlZZVzBBMWhyMTl3N2tPYjBLa0pYb0FMVEREajF1a1VFRHFRdUJmQnhSZUw1bVhpdTFPN1dHMHZsdGcwVlovU1p6Y3RCc2RCbHgxQmttV1lCVzI2MUtaZ0JpdnJxbDVFTFRLS2Q4cWd0SGNMUUE1Zmw2SkIwUWdzNVhEYVdlaE44NkdwczVKVzhBcmpHdGpjV0FJUCtYOENRYVdmYUNudVJtNkJrLzAzUFFXaGdkaTg0cXdBMHNzUmZGSndIVVBUTlNuRThFaUdWazJmcnQwdThQRzFwd1NRc0Z1TkpmY1lJSEV2MXZPelA3dUVPdUR5ZHNtQ2pobHh1b0sybjUvMmFWUjNCTVR1K3A0K2dsOGFsWG9CeWN5TG1qM0ovUFVncUQ4U0w1ZlRDVWVnR3NkaWEvU2E2ME4yb1Y3dlExN3dqTU4rTFhhMnJqai9iNFpsWmdYVm9qRG1BakR3SVJkRFV1alF1MFJWc0pxRkxNelNJSHBwMkNacDdtSW9McnlTYXkyWVlCdTdTaU53TDk1WDZIZTJrUzhlZWZCQkhqendXLzlGeEdxcnk1N2k3MWMyY0RBZ01CQUFHamdnR3RNSUlCcVRBZEJnTlZIUTRFRmdRVTFjRm5Pc0tqbmZSM1VsdFpFamdwNWxWb3U2VXdId1lEVlIwakJCZ3dGb0FVVGlKVUlCaVY1dU51NWcvNitya1M3UVlYanprd0RnWURWUjBQQVFIL0JBUURBZ0dHTUIwR0ExVWRKUVFXTUJRR0NDc0dBUVVGQndNQkJnZ3JCZ0VGQlFjREFqQVNCZ05WSFJNQkFmOEVDREFHQVFIL0FnRUFNSFlHQ0NzR0FRVUZCd0VCQkdvd2FEQWtCZ2dyQmdFRkJRY3dBWVlZYUhSMGNEb3ZMMjlqYzNBdVpHbG5hV05sY25RdVkyOXRNRUFHQ0NzR0FRVUZCekFDaGpSb2RIUndPaTh2WTJGalpYSjBjeTVrYVdkcFkyVnlkQzVqYjIwdlJHbG5hVU5sY25SSGJHOWlZV3hTYjI5MFJ6SXVZM0owTUhzR0ExVWRId1IwTUhJd042QTFvRE9HTVdoMGRIQTZMeTlqY213ekxtUnBaMmxqWlhKMExtTnZiUzlFYVdkcFEyVnlkRWRzYjJKaGJGSnZiM1JITWk1amNtd3dONkExb0RPR01XaDBkSEE2THk5amNtdzBMbVJwWjJsalpYSjBMbU52YlM5RWFXZHBRMlZ5ZEVkc2IySmhiRkp2YjNSSE1pNWpjbXd3SFFZRFZSMGdCQll3RkRBSUJnWm5nUXdCQWdFd0NBWUdaNEVNQVFJQ01CQUdDU3NHQVFRQmdqY1ZBUVFEQWdFQU1BMEdDU3FHU0liM0RRRUJEQVVBQTRJQkFRQjJvV2M5M2ZCOGVzY2kvOGVzaXhqKytOMjJtZWlHRGpnRityQTJMVUs1SU9RT2djVVNUR0tTcUY5bFlmQXhQanJxUGpEQ1VQSENVUnYrMjZhZDVQL0JZdFh0Ym10eEpXdStjUzVCaE1EUFBlRzNvUFp3WFJIQkpGQWtZNE80QUY3UklBQVVXNkV6RGZsVW9ESEt2ODN6T2lQZllHY3BIYzlza3hBSW5DZWRrN1FTZ1h2TUFSampPcWRha29yMjFEVG1OSVVvdHhvOGtIdjVod1JsR2hCSndwczZmRVZpMUJ0MHRycE0vM3dZeGxyNDczV1NQVUZaUGdQMWo1MTlrTHBXT0o4ejA5d3hheStCcjI5aXJQY0JZdjBHTVhsSHFUaHk4eTRtL0h5VFFlSTJJTXZNclFud3FQcFkrckxJWHl2aUkydkxvSSs0eEtFNFJuMzhaWjhtIiwiTUlJRGpqQ0NBbmFnQXdJQkFnSVFBenJ4NXFjUnFhQzdLR1N4SFFuNjVUQU5CZ2txaGtpRzl3MEJBUXNGQURCaE1Rc3dDUVlEVlFRR0V3SlZVekVWTUJNR0ExVUVDaE1NUkdsbmFVTmxjblFnU1c1ak1Sa3dGd1lEVlFRTEV4QjNkM2N1WkdsbmFXTmxjblF1WTI5dE1TQXdIZ1lEVlFRREV4ZEVhV2RwUTJWeWRDQkhiRzlpWVd3Z1VtOXZkQ0JITWpBZUZ3MHhNekE0TURFeE1qQXdNREJhRncwek9EQXhNVFV4TWpBd01EQmFNR0V4Q3pBSkJnTlZCQVlUQWxWVE1SVXdFd1lEVlFRS0V3eEVhV2RwUTJWeWRDQkpibU14R1RBWEJnTlZCQXNURUhkM2R5NWthV2RwWTJWeWRDNWpiMjB4SURBZUJnTlZCQU1URjBScFoybERaWEowSUVkc2IySmhiQ0JTYjI5MElFY3lNSUlCSWpBTkJna3Foa2lHOXcwQkFRRUZBQU9DQVE4QU1JSUJDZ0tDQVFFQXV6Zk5OTng3YThteWFKQ3RTblgvUnJvaENnaU45UmxVeWZ1STIvT3U4anFKa1R4NjVxc0dHbXZQckMzb1hna2tSTHBpbW43V282aCs0RlIxSUFXc1VMZWNZeHBzTU56YUh4bXgxeDdlL2RmZ3k1U0RONjdzSDBOTzNYc3MwcjB1cFMva3FiaXRPdFNacExZbDZadHJBR0NTWVA5UElVa1k5MmVRcTJFR25JL3l1dW0wNlpJeWE3WHpWK2hkRzgyTUhhdVZCSlZKOHpVdGx1TkpiZDEzNC90SlM3U3NWUWVwajVXenRDTzdURzFGOFBhcHNwVXd0UDFNVll3blNsY1VmSUtkelhPUzB4WktCZ3lNVU5HUEhnbStGNkhtSWNyOWcrVVF2SU9sQ3NSbktQWnpGQlE5Um5iRGh4U0pJVFJOcnc5RkRLWkpvYnE3bk1XeE00TXBoUUlEQVFBQm8wSXdRREFQQmdOVkhSTUJBZjhFQlRBREFRSC9NQTRHQTFVZER3RUIvd1FFQXdJQmhqQWRCZ05WSFE0RUZnUVVUaUpVSUJpVjV1TnU1Zy82K3JrUzdRWVhqemt3RFFZSktvWklodmNOQVFFTEJRQURnZ0VCQUdCbktKUnZEa2hqNnpIZDZtY1kxWWw5UE1XTFNuL3B2dHNyRjkrd1gzTjNLaklUT1lGblFvUWo4a1ZuTmV5SXYvaVBzR0VNTktTdUlFeUV4dHY0TmVGMjJkK21RcnZIUkFpR2Z6WjBKRnJhYkEwVVdUVzk4a25kdGgvSnN3MUhLajJaTDd0Y3U3WFVJT0daWDFOR0ZkdG9tL0R6TU5VK01lS05oSjdqaXRyYWxqNDFFNlZmOFBsd1VIQkhRUkZYR1U3QWo2NEd4SlVURnk4YkpaOTE4ckdPbWFGdkU3RkJjZjZJS3NoUEVDQlYxL01VUmVYZ1JQVHFoNVV5a3c3K1UwYjZMSjMvaXlLNVM5a0pSYVRlcExpYVdOMGJmVktmamxsRGlJR2tuaWJWYjYzZERjWTNmZTBEa2h2bGQxOTI3anlOeEYxV1c2TFpabTZ6TlRmbE1yWT0iXSwieDV0I1MyNTYiOiJSVlpJOEZmT3I1NHpSMjNCMEp1d1Z6NExYb2lLWVJtZU1jelFnZXVCNldVIn0.eyJyZXF1ZXN0Ijp7ImFwaS12ZXJzaW9uIjoiNy4zLXByZXZpZXciLCJlbmMiOiJDS01fUlNBX0FFU19LRVlfV1JBUCIsImtpZCI6Imh0dHBzOi8vbWNwYXRpbm90ZXN0aHNtLm1hbmFnZWRoc20uYXp1cmUubmV0L2tleXMvbGl2ZWt2dGVzdHJzYS1rZXktbmFtZWYzNjQxM2NjIn0sInJlc3BvbnNlIjp7ImtleSI6eyJhdHRyaWJ1dGVzIjp7ImNyZWF0ZWQiOjE2Mjc5MzkyMDcsImVuYWJsZWQiOnRydWUsImV4cG9ydGFibGUiOnRydWUsInJlY292ZXJhYmxlRGF5cyI6NywicmVjb3ZlcnlMZXZlbCI6IkN1c3RvbWl6ZWRSZWNvdmVyYWJsZStQdXJnZWFibGUiLCJ1cGRhdGVkIjoxNjI3OTM5MjA3fSwia2V5Ijp7ImUiOiJBUUFCIiwia2V5X2hzbSI6ImV5SmphWEJvWlhKMFpYaDBJam9pY1dReFNrMU9jVGhuVkVWM2FsWnZiVTlSY25oMFR6Vm5RMUUxUjBSbWIyRkRaVmxRTjNOZlVtVmpjamh4YkZCdFUxQkpPWFJ1TW5Kc05GZDFYME5TTVV4RU1HMUxXWEJhUmkxZlJWbG5hVjlCZEUxbFpVeG5WRXBSVXpKWVlWZFBRblJFWjNJemFIVXhlR010Wld4dVRXUlNhRGxGYkZocFpHeDJSRzVrVEdWQ1gwNDNPSGhMYlRRek1GYzVVbkkxTUVkWVVEVkhabTl4U0U5aE9GOHliVkZNTVZsYVVYbHZUR295TW1ZM1RrOTZlRVZ5UkhOa01qbDRkV3RrY0dKaU9GWTRlRGxmYmtzd1pVRkhMVmt6WjJKRVNXdENORXd3WVZWZldsZFdhRVpTY2pBeFRIWkJNVEJxUzNWVU9WZHFkWGwwUm1seFRHVmZkVWxXZFdKa056QndXWGw0VmxGcU1sazNSMVI2ZHpack5GWlFlV1IzVEhCM05HOXpUWEpwVWpSWU9HODJSR1ZFUVdkeWFYbG5RWEZUVlVJeE1VaHhXbFIyY0ZOWFoxazRORjltVlZSVE5VbEVjVXhXVldwaE5qSm5Wa2cwVEZWMk1rMUxNbXAwUTJobU5HUlFTMUZ4TUZOa1NHbDNkamxXYnpCNE0wVlJUMU5zZW0xWmVEWjVSa0p5UmpWSFVqVjBVbkIwTnpRMVVXeElOVjk0WVhkRlJtbHdjM2hqYlVaeFozWjFWR2RwU1dVeGVqQkRTMDF3U205YU1GWTVRMWxTUVhSTU5FWkVkbWd5VFc1RVJ6ZEZiVTF5YkhSeFFsWjBaRkZTTFZkT1JHSTJlUzFsVkU5T2RUTnJhV3hmV0Rac1EwdHhabE4yWlhBelF6VnlOak5RYkdkV1VYUlJaRzlhU2pVdFFreFdhbGxwVlV0WVUyWmpkMDR4VlZVM00wZDFPWFZIVFZSbk5VOW5ZUzFvYm5SRWIzTnRWakUxWjJ0d2VuRlFaMUozVnpGSVpESkNTekpXT1U1YU1uWnNhR1ZxZURJMVQzcFViMUpYVGkxTlgxQmFTRXhqUTNCTFRIWlNRbVJYVFRscFVtZDZWSHBMVGpWclIyMTBSMlZoTVZGTWEweDJSMXBvWlVKSldtSjRSRFZ0VDJoNGQxSlhhMmg2YlZCbGRWcDVWMWxaYzI1UVpqZGxWMGx4YjFwUVVHUnNPSFJWYjFjMGEwRlFiRGhyUm1oSlVFWnRSRnBvZEY5ck0ycHJUME4wU0ZGRFkzWkZRWEU1T1U5U1lVeEJXVlY2UnpCMVh6TjFNSE5PZDFRMlFuVkNMVkpTV2tOTFNESmZOR1p6ZWs5cWVHNXJjRXBPWW5oUVZsUm5WMGxwWm1aVWIzcFVVR3d5UWtOQldXMUphVVoxVmkxZkxUZG1hWHBuYVZwUllWOVFWRFEwU1hwdFRVMXdkRWN6TkVZd1JYUnFhSFZ0UTNaUU0xbHhNek5ZZFc5NWFucFdiWEI2Y0drMFpFOUtNRU10UmpWVGEyNDVMVGhpUjJWUVVWQm1UVGhFYzB4a0xVeG9XV2cwUTBWM1dIZzVlR0ZCT0RJNU0yWjRjMWt4YmtkWmRVNVNVWFl6VFVwelptOVhPVE4zYzA0d1JucHVkWFZmYW5KNmVGbEZSa05vVkMxek5XWmtNM05qWTFSRWJVSmpUbk0yUjJKM1ExSlRlbWxrWlhwUWNETmlVbEZCWkVWRFdFWkJRMWszYTBweFJsUjJVSHAxVDBWRWIydFdTbFZ5ZUhWNFN6RkpaRVZhUVhWeFV5MXZWVW81T0ROMU1qTkdablV3WkVnd2JYSTJhME5zYkZsa1RtVXhhWFJZWm1JM04wVnZhV0pHTVRnNVZXaEZXSG8wYUdGeGVXSjBXakprTUU1eVVVaHhTM05OUVdKMWFFeFVlRUpzY2sxTGRVeG5Ua0pFWWtKM1JWVmlTR05VWTE5Q1IzUjVaVEZJZFUxc1RuWnZXbU5zTWtoWlpWQlJWMGhsWkZoME5XOXFjbk5wY1hkRmEwSnNjMVpYVW1kRFIyUlVZM051YVdrM1pXWktUaTFEZUZndFRWVlJXbmhvYlVwc1dFaHBPRXhSYWtSdlh6RkVhak0yY2sxaWR5MXNSV1kyYkU1WlprSkxiRUkwWDFGM1dVcHZZVzVPY0dGUWNFSmhjVVZUY0VKblRUbHhVMFZpYjFOVFNIbHhXa0ZvVGtGTVRtbGxaVkpYY0daMVkybGphekJFVDFjME1HdElZbkpLWWtVMVpXZHdRV0ZDVm5aTFVrUnhaMHhvTjJzME1HeElhVzFSTW1SR1JHNU5RbXh3ZUVWdmVHcGlaVXBsWW1aWFFWcDZkR3RmVURab1NVdEhkVmQzY0VWUE1IVTBWR2RTTVZacFkzUjNlR1ZaYVVGV2FFZGhiSEpCT0RkTWMweE1PRzlvU0ZWb1UxZzFNMk5MYkVOeU1rZFFSakZsVFdOT2NucFlZM3BPYWtOTmFYaFZUeTF4TXpGVmNrVnVWM2gyWTFWNmNrUmFhVVZ2UWtscFFWRlVUMHBIZURoUVlqa3pVVEpWZDFWRk0xQktUMDl3TWxWRWFWOUphalpwVlVzM1dtZFFZMlJXWTBKcFJ6Um5UbEp3VjFCcFRIZHZOMWxHVjA0dFZHMVNSRVpyVWpsWVRESnVNVW95YlRGSmVrTkxTQzF5UTJVMWJYTm1SbXcxYmpndGFtZFpka1pOVFdsV2RsaE5XVUkzWWswM1Nra3RiekUwUVZSYVFVRnBWblF0VEZZMlpWOHdYMVJyVTBWbk1GcERjMUZZU2xGTVpVNVlibXR5U0MxVk9EQkRaMjVNY2pobWNVWmtTRVJvVEhOaE1sRnZNblZ0UVRadFNGVjZaMlJTZEZGdFFUWmpjSEppVFhweWFYVjFkVTl1TkZSSmVIRXhZbVZ0Ynpoa1ZtSjFaVkZhZWtkQk0xbEhSbWg2VURCbWRVb3pOVU00VlhSNVZXNWhRV2R1VGsxb01VMURielZrY0dWMk5VZzJOSEZhWlU5WFlWSnpYMjlhY3pSdVJYZHhNa0pXWVdkeldVZzBjMUp2ZUZGTFdUZG5UV1ZUWlc1QmJWOVpaMGRzVUVSbGJqZG1SMDh6VFZaQmEySldXamhQUldrdE5WTkxjRTVtVXpZMlFYbHlRMnRRTnkxS2NTMTRTSHBtWWtkNExXcEpSekpJYzNaT2RURnZXRzFmVEhaNFdETjBSVXRuVjI4NFdtcFFiM1JETFdSRFNIUTJlbkZNYm5ac1VqUldZbTVET0dsTlNYUkpkbUZIY1ZGdlVGOVdla2RmU0ZwME1uTnRlblZvTm5GSWEzRkhUVTVZT0d4bUxUTnBTVXR3YXpONGNWUm1WWGg2WmpGTFVXMVplR013UlU5bk1HODJaRFZLV0ZKRFZsaFNkbk15WVdNNFdtWTVhM1ZQVTJGVGNIWlBNVzVCVjJ0NGFtRmhWbFV0V2t0VWRpMWZTREl5ZEZWdlYwZ3RjR1YyUnpCeVdDSXNJbWhsWVdSbGNpSTZleUpoYkdjaU9pSmthWElpTENKbGJtTWlPaUpEUzAxZlVsTkJYMEZGVTE5TFJWbGZWMUpCVUNJc0ltdHBaQ0k2SW1aaGEyVXRjbVZzWldGelpTMXJaWGtpZlN3aWMyTm9aVzFoWDNabGNuTnBiMjRpT2lJeExqQWlmUSIsImtleV9vcHMiOlsid3JhcEtleSIsImRlY3J5cHQiLCJlbmNyeXB0IiwidW53cmFwS2V5Iiwic2lnbiIsInZlcmlmeSJdLCJraWQiOiJodHRwczovL21jcGF0aW5vdGVzdGhzbS5tYW5hZ2VkaHNtLmF6dXJlLm5ldC9rZXlzL2xpdmVrdnRlc3Ryc2Eta2V5LW5hbWVmMzY0MTNjYy84ZGM4ODkwNmI2ZWU0MWUxMDZkODI4ZWY5NjJhN2IxMiIsImt0eSI6IlJTQSIsIm4iOiJobkljRERFMUtCX04wcWZqN21XQWs5Wm9kb0FZRmRBd251bkJualRiWHBZQTN2QTd0RWNnYUpBUnppNEdBbU5USlBneXRFdmRzOHdaLThYREpxS3hFVEctTHVNNXh6OHNnNE1GQXFTakRtalBPc3B1WDRTdVU3cFpZM2FoOXlBZExzbjd2VzdEeENVS19PVEhaaG4zOUhNVElmckw1V0w3clYzY1lXZFNrMWJQTnUxTTFBYWhhT3NiQVVuRHFMRktGamI3UW1UTExJLXdoUURtRGVvTDhxZHZMdGpJZ2Y1NmhKeEhmaVowYXpXSU1oVDNYZVNYbzNEU0tkeHUtZVNUY3NXbWZwZFIxSmR4dmxBVGlFNWtYMTF6eVVOQVNtOW5SWkVIU1U1MjJvT0VycS1MZURkVV9relR2VVM5RXZOekZBVFZZRF96QnhJcjhXNFhiT09YV3cifSwicmVsZWFzZV9wb2xpY3kiOnsiY29udGVudFR5cGUiOiJhcHBsaWNhdGlvbi9qc29uOyBjaGFyc2V0PXV0Zi04IiwiZGF0YSI6ImV5SmhibmxQWmlJNlczc2lZVzU1VDJZaU9sdDdJbU5zWVdsdElqb2ljMlJyTFhSbGMzUWlMQ0psY1hWaGJITWlPblJ5ZFdWOVhTd2lZWFYwYUc5eWFYUjVJam9pYUhSMGNITTZMeTl6YTNKaGRIUmxjM1JoZEdsdmJpNWhlblZ5WlhkbFluTnBkR1Z6TG01bGRDOGlmVjBzSW5abGNuTnBiMjRpT2lJeExqQXVNQ0o5In19fX0.CRvjDl4riYgAsSVxhBl76rdufjy7gG5-0lUWmPRESK0K7tuackBSwIQC0goIkmhmoVsYyAg7Yr-ys_Razc7cFJccOENWg3NE4kcrcHmcqtoACvlOq-iOBvXtTLxA-ph4yyIeSIccwhheDyqihe2nAThodMbzZE9O18N6_sOvMWVAcyED8hmsDXCIfGypB5lJom-VgElby5Jg4AhC5nRlcGxottCoRd7v_hu_eTcTzTFxpfirHvy0IdzmI6MF9DHvmjNrpRQcaBuzqk6Wt2yTUj26YRQ6hZ2qKRr_-6RrIV2FHUeX8a42G3CHzXQsC6p5Og54s0f4CFRnhVjviBRr-g"}' + string: '{"value":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjE0TmJfZ0ZqMl8wUWl4dzQ3TC03RjRnMnRpdm9pNWg0RzNoQnlZYzA5MTgiLCJ4NWMiOlsiTUlJSml6Q0NCM09nQXdJQkFnSVRNd0FmcDZzazl6QXRKbFJETHdBQUFCK25xekFOQmdrcWhraUc5dzBCQVF3RkFEQlpNUXN3Q1FZRFZRUUdFd0pWVXpFZU1Cd0dBMVVFQ2hNVlRXbGpjbTl6YjJaMElFTnZjbkJ2Y21GMGFXOXVNU293S0FZRFZRUURFeUZOYVdOeWIzTnZablFnUVhwMWNtVWdWRXhUSUVsemMzVnBibWNnUTBFZ01EWXdIaGNOTWpFeE1UQTFNVGt4TXpRd1doY05Nakl4TURNeE1Ua3hNelF3V2pCOU1Rc3dDUVlEVlFRR0V3SlZVekVMTUFrR0ExVUVDQk1DVjBFeEVEQU9CZ05WQkFjVEIxSmxaRzF2Ym1ReEhqQWNCZ05WQkFvVEZVMXBZM0p2YzI5bWRDQkRiM0p3YjNKaGRHbHZiakV2TUMwR0ExVUVBd3dtS2k1dFkzQmhkR2x1YjNSbGMzUm9jMjB1YldGdVlXZGxaR2h6YlM1aGVuVnlaUzV1WlhRd2dnRWlNQTBHQ1NxR1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUUNzL0gvY3JJZ2VoRTJoNEh6NnpwSnNuL0cyeFl3cGxJbm1EVDg1U0VMNU90aDNVY0hvaVJZamhlQnFTY2twR0pzaVoyWUxiZHlWYXpGQ3FQMFEzazVoaE54d0trelUyNW9ad3p1MFkzZHBnU2luY0ZYcnVmQ1BleVVmL2hINkVlQkxZWVlPRjhIS0FTREkwaitKVDhjR1NjZUtnTWc5NGdqdVhwNk0yL3dmYVVDSzliU0xLYzlUeTI5ZWF2YVZjMkdJOUFxcm4wVEpyajN6K2FKSGgxRFZrcXp2dzlYNEVIUW1hSHJldGxEMW96dG1rcTBuK2pUQWhtSWFmVTI2TTVMdjZZM2YyeFZxY2FMMktQbUpoWlU2MEkrVzRVVlBRcEtqQnZsbGdLeVRaalluc3Y5Z2hxd2I2ZDFQOTZVZzhkYnJIQ2IxN0k5TWVHeHMwY3htR0w5N0FnTUJBQUdqZ2dVbU1JSUZJakNDQW5BR0Npc0dBUVFCMW5rQ0JBSUVnZ0pnQklJQ1hBSmFBSFVBdTluZnZCK0tjYldUbENPWHFwSjdSemhYbFFxclV1Z2FrSlprTm80ZTBZVUFBQUY4OFk2R0l3QUFCQU1BUmpCRUFpQXpHM3ZFVTZYM0RycTMxZjVMUEsyZ0JJckkwZkNESFM4RWxkOGkzTkdoblFJZ1oveW1DQkNrWXRZbTQzMEovdE9NYnFFQllOdGd6M3licjl4SVR4dHV5U3NBZGdBcGViN3duams1SWZCV2M1OWpwWGZsdmxkOW5HQUsrUGxOWFNaY0pWM0hoQUFBQVh6eGpvVTJBQUFFQXdCSE1FVUNJQUMzN1pIZFBKVkE3dTRCNDFHTUR0cUZ2aEZUdEVsQ21UTGhzcVBOYUVmVEFpRUFtYVNWTEdpMUNXK3VXb3dXTWpBK2ZxdnFKSjZ4QWtpZzNIKzIvQ3JvUmdvQWR3RHVTNzIzZGM1Z3V1RkNhUityNFo1bW93OStYN0J5MklNQXhIdUplcWo5eXdBQUFYenhqb1lkQUFBRUF3QklNRVlDSVFEZXlERjlKb2tyMEM2M2lnak9rUUR5ZXUvcVhRc0Q3T2pYOEI2UHJTazdyd0loQU5jclA5ck9xSWZJQjI5SFNpOXdmR0FGM0dvY1QxWjFsNzFtR0l4MmpqY3RBSGNBUnFWVjYzWDZrU0F3dGFLSmFmVHpmUkVzUVhTKy9VbTRoYXZ5L0hEK2JVY0FBQUY4OFk2RmJBQUFCQU1BU0RCR0FpRUEzK0poSUxSRTZQUk1LMmgzWkhBR1poekNsRFc2Sk00dFNDdTdWRldyTG5jQ0lRQ29wcUowbDFOaEdIcnA2Yk9IdDg2bi96Yko0cUN0a0l6NnZuRndzZmhROFFCM0FGR2pzUFg5QVhtY1ZtMjROM2lQREtSNnpCc255L2VlaUVLYURmN1Vpd1hsQUFBQmZQR09oc0VBQUFRREFFZ3dSZ0loQU5oeWRxeTJPbkZkVGJJVTd1WDZwaVp0SXE1ei9LMzJrdEoySHlKOFRlczRBaUVBem1jVHh5UlV6RzVPa3RVUFV0azdzL0xkaTloQ3pueXprOHJBdEd2ZG9WWXdKd1lKS3dZQkJBR0NOeFVLQkJvd0dEQUtCZ2dyQmdFRkJRY0RBakFLQmdnckJnRUZCUWNEQVRBOEJna3JCZ0VFQVlJM0ZRY0VMekF0QmlVckJnRUVBWUkzRlFpSHZkY2JnZWZyUm9LQm5TNk8wQXlIOE5vZFhZS0U1V21DODZjK0FnRmtBZ0VqTUlHdUJnZ3JCZ0VGQlFjQkFRU0JvVENCbmpCdEJnZ3JCZ0VGQlFjd0FvWmhhSFIwY0RvdkwzZDNkeTV0YVdOeWIzTnZablF1WTI5dEwzQnJhVzl3Y3k5alpYSjBjeTlOYVdOeWIzTnZablFsTWpCQmVuVnlaU1V5TUZSTVV5VXlNRWx6YzNWcGJtY2xNakJEUVNVeU1EQTJKVEl3TFNVeU1IaHphV2R1TG1OeWREQXRCZ2dyQmdFRkJRY3dBWVloYUhSMGNEb3ZMMjl1Wlc5amMzQXViV2xqY205emIyWjBMbU52YlM5dlkzTndNQjBHQTFVZERnUVdCQlNyMlcxcWhTL1J4MHVjVmJmRncvY1p3L2ptVERBT0JnTlZIUThCQWY4RUJBTUNCTEF3VndZRFZSMFJCRkF3VG9JbUtpNXRZM0JoZEdsdWIzUmxjM1JvYzIwdWJXRnVZV2RsWkdoemJTNWhlblZ5WlM1dVpYU0NKRzFqY0dGMGFXNXZkR1Z6ZEdoemJTNXRZVzVoWjJWa2FITnRMbUY2ZFhKbExtNWxkREJrQmdOVkhSOEVYVEJiTUZtZ1Y2QlZobE5vZEhSd09pOHZkM2QzTG0xcFkzSnZjMjltZEM1amIyMHZjR3RwYjNCekwyTnliQzlOYVdOeWIzTnZablFsTWpCQmVuVnlaU1V5TUZSTVV5VXlNRWx6YzNWcGJtY2xNakJEUVNVeU1EQTJMbU55YkRCbUJnTlZIU0FFWHpCZE1GRUdEQ3NHQVFRQmdqZE1nMzBCQVRCQk1EOEdDQ3NHQVFVRkJ3SUJGak5vZEhSd09pOHZkM2QzTG0xcFkzSnZjMjltZEM1amIyMHZjR3RwYjNCekwwUnZZM012VW1Wd2IzTnBkRzl5ZVM1b2RHMHdDQVlHWjRFTUFRSUNNQjhHQTFVZEl3UVlNQmFBRk5YQlp6ckNvNTMwZDFKYldSSTRLZVpWYUx1bE1CMEdBMVVkSlFRV01CUUdDQ3NHQVFVRkJ3TUNCZ2dyQmdFRkJRY0RBVEFOQmdrcWhraUc5dzBCQVF3RkFBT0NBZ0VBZWpEUFZsV2Z0V3lERnZDcjltS1poQktHQjZWajE0ZVNsUWJjRXRKcUxEWDlYZ3ViSHF3U25Ia1dEOXNESEdpclhxZG9uS3paOW1DRnhOOHhFaWQ1bE9TVGh1N3N3U2E0MlNsUk9ESUZLSVZTa2xreGlHM1BDZlNIakJsaDBxV0xTS2xHMmhLbEovVEV5VnVvWCsyYUh2R2l3VVdiL0NUQ1BGQk9hNWFSQmI5K0FBUkI4NVdkemU2WHlUclhOWHp4TWdTcHNtUlI5eE5FRVNqOTlCNU0zcDBDVWhNcXppRmVwR1h1QXZwenkzWjVJKzZLRFIva01IUlIwd0ZOa1hXLzRiMEZNQ2NCWTVLWXBQYnBwRFZsU3BlT1QzKzduQ256MDdKQTBtblhYbWRkbW9yK0RuMk03KzU0MFNTTmpBbzR3U3JFSU1QaEVIVU5udnk0aitqMlpEVmdXM2M2WDU1M1lrZFkwRW9mSElya2xlV29mVnNGalVaajlaRE5ZckRLd0R2cC9xZGFsOGV5RUgxWW1DVy92cjVXNVQ1Sm0rUjRxUldDSEQ0cW44U3hVNzMvdVlIc2RuREJ0NVpVY3dsQ3hrNG91Q2l6ZFBncThjZVJhVks3dEUveHRrOWJDVWoxOUdkcUVxQWZuRzV1V3lkTkwzckZ5bndLOG5EZldnemZrMlJtbWo2WkRvZmZTaVJvd3VNUFp5VENYYmc2dGwwUkZpMUZ2UktCdDdDakxTa0FDN0hrN1hPQ2lEMFhMTnBlVXMwYzV2cnlCMVI2aGZtZGtDWmMrNmNxdE5vUzlsbStreWdwTDA3Zkg5UkhUSmFWWEV1NTlWWVZUeEtOM2ZVWFJBT2lGSE5HZ2lZUEZTalgvU01rWVg1MlBnUGE2WVQraWFQZkZWZVMyY2c9IiwiTUlJRjh6Q0NCTnVnQXdJQkFnSVFBdWVSY2Z1QUllay80dG1EZzB4UXdEQU5CZ2txaGtpRzl3MEJBUXdGQURCaE1Rc3dDUVlEVlFRR0V3SlZVekVWTUJNR0ExVUVDaE1NUkdsbmFVTmxjblFnU1c1ak1Sa3dGd1lEVlFRTEV4QjNkM2N1WkdsbmFXTmxjblF1WTI5dE1TQXdIZ1lEVlFRREV4ZEVhV2RwUTJWeWRDQkhiRzlpWVd3Z1VtOXZkQ0JITWpBZUZ3MHlNREEzTWpreE1qTXdNREJhRncweU5EQTJNamN5TXpVNU5UbGFNRmt4Q3pBSkJnTlZCQVlUQWxWVE1SNHdIQVlEVlFRS0V4Vk5hV055YjNOdlpuUWdRMjl5Y0c5eVlYUnBiMjR4S2pBb0JnTlZCQU1USVUxcFkzSnZjMjltZENCQmVuVnlaU0JVVEZNZ1NYTnpkV2x1WnlCRFFTQXdOakNDQWlJd0RRWUpLb1pJaHZjTkFRRUJCUUFEZ2dJUEFEQ0NBZ29DZ2dJQkFMVkdBUmw1NmJ4M0tCVVNHdVBjNEg1dW9ORmtGSDRlN3B2VEN4Umk0ai8reitYYndqRXorNUNpcERPcWp4OS9qV2pza0w1ZGs3UGFRa3pJdGlkc0FBbkRDVzFsZVpCT0lpNjhMZmYxYmpUZVpnTVlpd2RSZDNZMzliL2xjR3BpdVAyZDIzVzk1WUhrTU1UOElsV29zWUlYMGY0a1liNjJycGh5Zm5BalliLzRPZDk5VGhuaGxBeEd0ZnZTYlhjQlZJS0NZZlpncVJ2Vis1bFJlVW5kMWFOalJZVnpQT29pZmdTeDJmUnl5MStwTzFVemFNTU5uSU9FNzFiVllXMEExaHIxOXc3a09iMEtrSlhvQUxURERqMXVrVUVEcVF1QmZCeFJlTDVtWGl1MU83V0cwdmx0ZzBWWi9TWnpjdEJzZEJseDFCa21XWUJXMjYxS1pnQml2cnFsNUVMVEtLZDhxZ3RIY0xRQTVmbDZKQjBRZ3M1WERhV2VoTjg2R3BzNUpXOEFyakd0amNXQUlQK1g4Q1FhV2ZhQ251Um02QmsvMDNQUVdoZ2RpODRxd0Ewc3NSZkZKd0hVUFROU25FOEVpR1ZrMmZydDB1OFBHMXB3U1FzRnVOSmZjWUlIRXYxdk96UDd1RU91RHlkc21DamhseHVvSzJuNS8yYVZSM0JNVHUrcDQrZ2w4YWxYb0J5Y3lMbWozSi9QVWdxRDhTTDVmVENVZWdHc2RpYS9TYTYwTjJvVjd2UTE3d2pNTitMWGEycmpqL2I0WmxaZ1hWb2pEbUFqRHdJUmREVXVqUXUwUlZzSnFGTE16U0lIcHAyQ1pwN21Jb0xyeVNheTJZWUJ1N1NpTndMOTVYNkhlMmtTOGVlZkJCSGp6d1cvOUZ4R3FyeTU3aTcxYzJjREFnTUJBQUdqZ2dHdE1JSUJxVEFkQmdOVkhRNEVGZ1FVMWNGbk9zS2puZlIzVWx0WkVqZ3A1bFZvdTZVd0h3WURWUjBqQkJnd0ZvQVVUaUpVSUJpVjV1TnU1Zy82K3JrUzdRWVhqemt3RGdZRFZSMFBBUUgvQkFRREFnR0dNQjBHQTFVZEpRUVdNQlFHQ0NzR0FRVUZCd01CQmdnckJnRUZCUWNEQWpBU0JnTlZIUk1CQWY4RUNEQUdBUUgvQWdFQU1IWUdDQ3NHQVFVRkJ3RUJCR293YURBa0JnZ3JCZ0VGQlFjd0FZWVlhSFIwY0RvdkwyOWpjM0F1WkdsbmFXTmxjblF1WTI5dE1FQUdDQ3NHQVFVRkJ6QUNoalJvZEhSd09pOHZZMkZqWlhKMGN5NWthV2RwWTJWeWRDNWpiMjB2UkdsbmFVTmxjblJIYkc5aVlXeFNiMjkwUnpJdVkzSjBNSHNHQTFVZEh3UjBNSEl3TjZBMW9ET0dNV2gwZEhBNkx5OWpjbXd6TG1ScFoybGpaWEowTG1OdmJTOUVhV2RwUTJWeWRFZHNiMkpoYkZKdmIzUkhNaTVqY213d042QTFvRE9HTVdoMGRIQTZMeTlqY213MExtUnBaMmxqWlhKMExtTnZiUzlFYVdkcFEyVnlkRWRzYjJKaGJGSnZiM1JITWk1amNtd3dIUVlEVlIwZ0JCWXdGREFJQmdabmdRd0JBZ0V3Q0FZR1o0RU1BUUlDTUJBR0NTc0dBUVFCZ2pjVkFRUURBZ0VBTUEwR0NTcUdTSWIzRFFFQkRBVUFBNElCQVFCMm9XYzkzZkI4ZXNjaS84ZXNpeGorK04yMm1laUdEamdGK3JBMkxVSzVJT1FPZ2NVU1RHS1NxRjlsWWZBeFBqcnFQakRDVVBIQ1VSdisyNmFkNVAvQll0WHRibXR4Sld1K2NTNUJoTURQUGVHM29QWndYUkhCSkZBa1k0TzRBRjdSSUFBVVc2RXpEZmxVb0RIS3Y4M3pPaVBmWUdjcEhjOXNreEFJbkNlZGs3UVNnWHZNQVJqak9xZGFrb3IyMURUbU5JVW90eG84a0h2NWh3UmxHaEJKd3BzNmZFVmkxQnQwdHJwTS8zd1l4bHI0NzNXU1BVRlpQZ1AxajUxOWtMcFdPSjh6MDl3eGF5K0JyMjlpclBjQll2MEdNWGxIcVRoeTh5NG0vSHlUUWVJMklNdk1yUW53cVBwWStyTElYeXZpSTJ2TG9JKzR4S0U0Um4zOFpaOG0iLCJNSUlEampDQ0FuYWdBd0lCQWdJUUF6cng1cWNScWFDN0tHU3hIUW42NVRBTkJna3Foa2lHOXcwQkFRc0ZBREJoTVFzd0NRWURWUVFHRXdKVlV6RVZNQk1HQTFVRUNoTU1SR2xuYVVObGNuUWdTVzVqTVJrd0Z3WURWUVFMRXhCM2QzY3VaR2xuYVdObGNuUXVZMjl0TVNBd0hnWURWUVFERXhkRWFXZHBRMlZ5ZENCSGJHOWlZV3dnVW05dmRDQkhNakFlRncweE16QTRNREV4TWpBd01EQmFGdzB6T0RBeE1UVXhNakF3TURCYU1HRXhDekFKQmdOVkJBWVRBbFZUTVJVd0V3WURWUVFLRXd4RWFXZHBRMlZ5ZENCSmJtTXhHVEFYQmdOVkJBc1RFSGQzZHk1a2FXZHBZMlZ5ZEM1amIyMHhJREFlQmdOVkJBTVRGMFJwWjJsRFpYSjBJRWRzYjJKaGJDQlNiMjkwSUVjeU1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBdXpmTk5OeDdhOG15YUpDdFNuWC9Scm9oQ2dpTjlSbFV5ZnVJMi9PdThqcUprVHg2NXFzR0dtdlByQzNvWGdra1JMcGltbjdXbzZoKzRGUjFJQVdzVUxlY1l4cHNNTnphSHhteDF4N2UvZGZneTVTRE42N3NIME5PM1hzczByMHVwUy9rcWJpdE90U1pwTFlsNlp0ckFHQ1NZUDlQSVVrWTkyZVFxMkVHbkkveXV1bTA2Wkl5YTdYelYraGRHODJNSGF1VkJKVko4elV0bHVOSmJkMTM0L3RKUzdTc1ZRZXBqNVd6dENPN1RHMUY4UGFwc3BVd3RQMU1WWXduU2xjVWZJS2R6WE9TMHhaS0JneU1VTkdQSGdtK0Y2SG1JY3I5ZytVUXZJT2xDc1JuS1BaekZCUTlSbmJEaHhTSklUUk5ydzlGREtaSm9icTduTVd4TTRNcGhRSURBUUFCbzBJd1FEQVBCZ05WSFJNQkFmOEVCVEFEQVFIL01BNEdBMVVkRHdFQi93UUVBd0lCaGpBZEJnTlZIUTRFRmdRVVRpSlVJQmlWNXVOdTVnLzYrcmtTN1FZWGp6a3dEUVlKS29aSWh2Y05BUUVMQlFBRGdnRUJBR0JuS0pSdkRraGo2ekhkNm1jWTFZbDlQTVdMU24vcHZ0c3JGOSt3WDNOM0tqSVRPWUZuUW9RajhrVm5OZXlJdi9pUHNHRU1OS1N1SUV5RXh0djROZUYyMmQrbVFydkhSQWlHZnpaMEpGcmFiQTBVV1RXOThrbmR0aC9Kc3cxSEtqMlpMN3RjdTdYVUlPR1pYMU5HRmR0b20vRHpNTlUrTWVLTmhKN2ppdHJhbGo0MUU2VmY4UGx3VUhCSFFSRlhHVTdBajY0R3hKVVRGeThiSlo5MThyR09tYUZ2RTdGQmNmNklLc2hQRUNCVjEvTVVSZVhnUlBUcWg1VXlrdzcrVTBiNkxKMy9peUs1UzlrSlJhVGVwTGlhV04wYmZWS2ZqbGxEaUlHa25pYlZiNjNkRGNZM2ZlMERraHZsZDE5MjdqeU54RjFXVzZMWlptNnpOVGZsTXJZPSJdLCJ4NXQjUzI1NiI6IjE0TmJfZ0ZqMl8wUWl4dzQ3TC03RjRnMnRpdm9pNWg0RzNoQnlZYzA5MTgifQ.eyJyZXF1ZXN0Ijp7ImFwaS12ZXJzaW9uIjoiNy4zLXByZXZpZXciLCJlbmMiOiJDS01fUlNBX0FFU19LRVlfV1JBUCIsImtpZCI6Imh0dHBzOi8vbWNwYXRpbm90ZXN0aHNtLm1hbmFnZWRoc20uYXp1cmUubmV0L2tleXMvbGl2ZWt2dGVzdHJzYS1rZXktbmFtZWYzNjQxM2NjIn0sInJlc3BvbnNlIjp7ImtleSI6eyJhdHRyaWJ1dGVzIjp7ImNyZWF0ZWQiOjE2MzYxNDEzOTMsImVuYWJsZWQiOnRydWUsImV4cG9ydGFibGUiOnRydWUsInJlY292ZXJhYmxlRGF5cyI6NywicmVjb3ZlcnlMZXZlbCI6IkN1c3RvbWl6ZWRSZWNvdmVyYWJsZStQdXJnZWFibGUiLCJ1cGRhdGVkIjoxNjM2MTQxMzkzfSwia2V5Ijp7ImUiOiJBUUFCIiwia2V5X2hzbSI6ImV5SmphWEJvWlhKMFpYaDBJam9pVmtWTFowazFNRmc0T0dablR6WlVjMnh3ZVhaRGQwWXRZVGxUTVZWT1NrazVZV1ZmY1U5NFFucFRSQzF1TUcwd1dsRk5ibTlUYTFOMVdIcDFUMFYxUTJsTk5qZFFVMVZVVGtWM05XaGhaSGxUUW5kaVVsTXRUMHBVVlVSR05sTTRWVTFmWlZWdU56SjFXVk5EWVdNNGRIRk9WREZmU1hwbVJHMVdWRjgzTTBodU1tZzVkMHhFTm14VGNtczVhV0p3UWpod2RWbFVVbkpCUkhveGVGbHZPRzV2UkVzelptWjJZMmhZY0dseVdqQlNNVTFmTkdGNU4wOU5aMUI1UzNWelZ5MURhblphWVROWWFGOWtOemhuYUU5U1JWVXlkWGw2ZWxFdGNrRklRMlp0YVVKWldIWmFaV1V3YXpsS2JEaE9hRWszUzJ0TVZVWmhabW95VVZVeFNFRklValJQY0hGak5WZFlabTE2WW5GMVNtTXdVMnRMUkU1Q1IwNUZTelU1VDNoU1MwdEpjbWxYZUVsak5ESktaRXBvV0VScWVFWjNMVUZQZGxWaVYzRkZUbVpuVFVoeVpERnNOVGRIUzJwbFoxUjNla2g0UTFRemRXVmxabkpCYldkVGFsSlZkMjlpVWpGbVZtaG9ZWGxETlhKYWFUaERNM0ZvV0RkQlpEZHBPVFZHYjI1TmRYQnVhMXBPY20xVlExRkRlamQ0ZWxCb2R6SndTekpUWmpSdlpqbGxZVWRUY1RWMlh6WlBWazEyY0ZCUU5IWkpXRTlvZHpObWMzSkRSVGRUVGsxS2NuTjBiR2gxYWw5ZlNXSldlRzg1ZWw5a1JsRkRRa2R6ZHpCaFIwWkVWMlo0V2tsRE1qSTVSekpHTjI5dVdXcE1NVE5tV0RadFgzcHBRWHBGVGkxU1ZIQjBaR0pWTWtGSWNWbG1lSGhXWVRBdE4zZEpPVkJwUVc1NllscDVNMUExU1hwbGQyZ3lMVmt6ZW1saFdWVjZVVGcxU0dFeFgyUk5VbXA0WkhkTFQzWXdlbFJOWmtwaVpGZHJRVFZ5Ykc5a1lpMUhkVUYyWTJWNU5HSXRjVGxIT0hkZlUwNWxVVE5aT0VwYVNWSjBNR3g0Y21kNlVqUmFZbGRVVTJGRU1IbEdaMEpRUVVWQk1HNVVZVmxrVDNsS2RFbEVNaTEwTUd4emREZ3hMWFJZVldSdFUweHNVWE51ZEZKRmJsZFdSbkJ5V1ZsZk4yUm9PWFpzYnpOWFJHbFRia3B4VEV0Q1NFdGpSVzEwVW01UmNGQmZUVlEyWWpBelVWcDZUR1J1YlMxTU5VTnpiVWR1VmtScFVVRjNPVGx1V21GT1kwWkZWV1EzY0Y5VFFYUnZhRTVIUmpCTFFXTnFZMGswUTA0eE0zbHZjRGx4ZUZOQ1IxVjBaV2RIV2tRMlV6ZEhNREZtWW1FNVEwWnRiVTR0Ym5VNVIxRjJUekJyTlZCVFpVWjBjMWxpYzJaTGNUZDRXWFk1Y1RZd2Fra3llVkk0TVhoUE4wOTFhSFJpVmpkVVgzWTNOMGswYnpSek5YaFhORGRtVjJKdmIyNWlPV0ZTY2xOeGJtbENOMFkwU1RJMFRUbFFUa2R4U2pOaVdHeEllUzF0TkU5MWFGVXRjR2x3UmxGd1gwaHFka0Z1U2kxcmNERkRTemwzTlRFeFdpMDVTMGxQZW5sb1pHSnZjMDl5ZEhKNE5uVnJZazFJZW0xUGNEVkxibTlFYUdWTU9WcHVjVnBHYVVGSlgyZHhUV2RpT1VWRVRFZHVXa1V0TUdKM01HVnJTVXh2ZVd0aVZqQmpXRGw1VGs5dVFsaFFWVkp3TTJSbk0zSXlPRFZ6WkhKdFpsVkdXRTk0YzFGT1QwOVRXVTlPTTI5Nk5VZFlUSE5OWHpGQ1ZXaE9ZVmxMV1hGT1VpMHdkakpuWldScVJFczNTeTE2Um5wS05rTTFlVzlrWjBneFZXbEJWRjlmT0U5VFlqZEpWV3RHV1U1Q1FtaGxkM014WVVJNGFFbzBlbUkyTjNKVVFuTTFZMHBIUVhFeGVUVndlRTE2ZVdsT2RteGtZbFZ1YUZaTFEyWTVUbW8zY1V4dmRGY3hWM3BEVGpreFQxcExZblpqYkdneWNXUkZUMk0wYUdwdk4xRTBNelExVW1RMFJHUnNORmxoY0RGUU5IVk9aV1pQVkZobFJXeExkak0xY1hWa1IweGhaMFphTkdaNldXTkhWMnRUT0hwRmFtUnVVa281ZEhsVlZFNVlVMXBSV0RoNk0ybHpaekEyYXpOTFRERlJUbGxvWWtOWGQyOUtjV0Z4Tm5oR09EbE5SVzlDYmpoMlYxSjZVMlV4YVVwdlRHdzVaV1pYYnkxalltMTZXbFEwUzFCSmIyOWxiRnBtTVRWRmJqUnBXVFl5Y214cldGRjFVMFV4U0Vac2FHNVdhVXR5VlZkWU5tWm9WM3AzVGpNM1VVeEtPSE5sWjJwdmNYZHZYM05CUXpKSlltRnRVMEZwTVMxWExURjFXRGgyTjA0M2VuSjJUbEJYWVU1YVFXVXhPR0pvTUhZeU5FRm9lbGxWVGs5R2VqQkRRWFpuYTBsdU1tRmxVUzFDTm5WWVYzUkdSMUZMWVRCa1RHeHlUa2hWV25jMVFsTjBZMW90V1Vkb1VrcFhNMVZXYlZweU5rMWtSVWN0TnpCVFQxZzNUM00wWVVWSVkxbE1aVzlNUTNwbFZrVlRRMEY0Y1RsQ1ozWk1YMU5mZERkU2RFSnVXWGhEVlVGSmVpMU9WRzFFVkVWMmNUWXlOamcwUlVSSFFsVkpTR3gxZHpWTlIxUnpjV3QyVGpWT1YwNWpkVk5sY1RWMk1VcDFVMWh0YjFkSGJUZFdlRkJhU3pocWMzRkliMncwWWtKUmRtRnZWRmswZG5CbVZGQlZVRlJTWkRSSVpGZFNWMjFKVEZBM05tVjRZVVphVnpWNVRFTmFiSFV0VHpWRVUzRnNSSEJWZG5rM1YxUkxkemMxU1U0NGNtMU9WSGx3YVZWc1owSmhSa3REUjB4UWF6QTJibTR5Y1ZRdFRWWmtWV3d0UW1Oa1lqSkxkV1JxYUhsSFVubEhlRWhEU1hWbGRYWXlMVjlUTTJJd1oyWk5aalZTVmxSa1EzVTBZM054YXpoMlRUUm5aVXgwUlVKZmVHbGpTMnRyZVhoTFJXcGpkRTFMVFU5RU56bGZURFZ0V0hGTFJVOXZkbmhQY21kcGVWRldVbmRpTFhnNFRYUjZhMGR1V2pCTU1WcExhRFZ5V2taRk1WUktkbmx6Y0Uxb01GRmpOVWhsUVZaMmFXVjRRM1JPVVY5TWNrWkVTMjVJY1hsNGVuUXdkVVJKZG5jNE4wTjFSMGRWU25sSWVVeEZTbmg1V0dKR1JsUmlialV0VnpWRldrUmpaazE0WldGWmFYSmhSMHRST0VSWmVITXlXbUp5TUdOWVZsY3hObTVqVVRadFUweG1VR1JUVDNsNVJraDFjMDE1YVdGaFZIWlJZbmxhU0VsTFh5SXNJbWhsWVdSbGNpSTZleUpoYkdjaU9pSmthWElpTENKbGJtTWlPaUpEUzAxZlVsTkJYMEZGVTE5TFJWbGZWMUpCVUNJc0ltdHBaQ0k2SW1aaGEyVXRjbVZzWldGelpTMXJaWGtpZlN3aWMyTm9aVzFoWDNabGNuTnBiMjRpT2lJeExqQWlmUSIsImtleV9vcHMiOlsid3JhcEtleSIsImRlY3J5cHQiLCJlbmNyeXB0IiwidW53cmFwS2V5Iiwic2lnbiIsInZlcmlmeSJdLCJraWQiOiJodHRwczovL21jcGF0aW5vdGVzdGhzbS5tYW5hZ2VkaHNtLmF6dXJlLm5ldC9rZXlzL2xpdmVrdnRlc3Ryc2Eta2V5LW5hbWVmMzY0MTNjYy8yZDY4ZDJkMjNiMjM0MjljODRjNzk0MzBmNWVjYTliZSIsImt0eSI6IlJTQSIsIm4iOiJwTTMzOXlTR1lyemlXZ2ZyOHQycnFiZi1VcmppTXZGVzBoUzdmZzJITjdKUjJmemoyTFE4TWcwVlVOSHRUeUliSG9KSGVrMG5BMmdZNmdHSkpzbnJycDJvWVNlbV9XQWtQdDhpdU9LSkxoejE4ZUFYYl91ckptU0gyVS1uSUlqTVN2WHRKaDZnQVdVY3B5S1luLURlcENxWGFYUmZlOWhYbEwzOWd6eXIyMmtmbXBZMFhYZzlmWFFmRjFVNk4zNHY0SzNzeG1GSWpQNE40eGttLTZMeXhPc2s5cDJESzRlVFpIb3RZWWlkLThlZWkyYXJ0cldFaXZtY1VlWW1kdU5Qa05WY2RMWm5EdkJZUnZRVEJ2V2x4SWFGUFlaYWdjRzdWT3hMV1JiZW1fc2lZcy1LcjZYVFdacDdVVVNmal82NVN3czN2QU9NekZBVGtVdm5vMV9GOXcifSwicmVsZWFzZV9wb2xpY3kiOnsiY29udGVudFR5cGUiOiJhcHBsaWNhdGlvbi9qc29uOyBjaGFyc2V0PXV0Zi04IiwiZGF0YSI6ImV5SmhibmxQWmlJNlczc2lZVzU1VDJZaU9sdDdJbU5zWVdsdElqb2ljMlJyTFhSbGMzUWlMQ0psY1hWaGJITWlPblJ5ZFdWOVhTd2lZWFYwYUc5eWFYUjVJam9pYUhSMGNITTZMeTl6YTNKaGRIUmxjM1JoZEdsdmJpNWhlblZ5WlhkbFluTnBkR1Z6TG01bGRDOGlmVjBzSW5abGNuTnBiMjRpT2lJeExqQXVNQ0o5In19fX0.Yq67YvE1U49SI7EHrJ2VOHMZlftbpZEDzEr41GKN1pwFZrQtqoQgZwPiTpawUk-o5VrTLLH1jglBNkhdixH4j6V03_oxEvYnbDw20PruJaBqYYZaYNtAN4HxPLxxRgSn1R-kSVUBCMCVxiQHiX3h2eByH-p_kSdMDTy9MGCuD_LXsU1Ljyxbx-ExoOYGSKbq7VT4QcM-A5IdNpg8zK81BEFq9pQkw1iI3EcdjPDz1K32XNo1NBAJozHrfjg4HUdtLyeY8RoQRhkZO4ZaMxu_mYlt4te839hQjuKc3Xmbm8JgFRzAcjFzDXlSvaIbKtzPBRSwWp_Xy4D8RUiT6zgWhQ"}' headers: cache-control: no-cache - content-length: '14118' + content-length: '14545' content-security-policy: default-src 'self' content-type: application/json; charset=utf-8 strict-transport-security: max-age=31536000; includeSubDomains @@ -122,7 +122,7 @@ interactions: x-frame-options: SAMEORIGIN x-ms-keyvault-network-info: conn_type=Ipv4;addr=172.92.159.124;act_addr_fam=Ipv4; x-ms-keyvault-region: westus - x-ms-server-latency: '707' + x-ms-server-latency: '844' status: code: 200 message: OK diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py index d4f1eff32af8..955141d98943 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth.py @@ -7,6 +7,7 @@ the challenge cache is global to the process. """ import functools +import os import time from uuid import uuid4 @@ -20,11 +21,53 @@ from azure.core.pipeline import Pipeline from azure.core.pipeline.policies import SansIOHTTPPolicy from azure.core.pipeline.transport import HttpRequest +from azure.identity import ClientSecretCredential +from azure.keyvault.keys import KeyClient from azure.keyvault.keys._shared import ChallengeAuthPolicy, HttpChallenge, HttpChallengeCache +from azure.keyvault.keys._shared.client_base import DEFAULT_VERSION import pytest from _shared.helpers import mock_response, Request, validating_transport +from _shared.test_case import KeyVaultTestCase +from _test_case import client_setup, get_decorator, KeysTestCase + + +only_default_version = get_decorator(api_versions=[DEFAULT_VERSION]) + + +class ChallengeAuthTests(KeysTestCase, KeyVaultTestCase): + def __init__(self, *args, **kwargs): + super(ChallengeAuthTests, self).__init__(*args, match_body=False, **kwargs) + + @only_default_version() + @client_setup + def test_multitenant_authentication(self, client, is_hsm, **kwargs): + if not self.is_live: + pytest.skip("This test is incompatible with vcrpy in playback") + + client_id = os.environ.get("KEYVAULT_CLIENT_ID") + client_secret = os.environ.get("KEYVAULT_CLIENT_SECRET") + if not (client_id and client_secret): + pytest.skip("Values for KEYVAULT_CLIENT_ID and KEYVAULT_CLIENT_SECRET are required") + + # we set up a client for this method to align with the async test, but we actually want to create a new client + # this new client should use a credential with an initially fake tenant ID and still succeed with a real request + credential = ClientSecretCredential(tenant_id=str(uuid4()), client_id=client_id, client_secret=client_secret) + vault_url = self.managed_hsm_url if is_hsm else self.vault_url + client = KeyClient(vault_url=vault_url, credential=credential) + + if self.is_live: + time.sleep(2) # to avoid throttling by the service + key_name = self.get_resource_name("multitenant-key") + key = client.create_rsa_key(key_name) + assert key.id + + # try making another request with the credential's token revoked + # the challenge policy should correctly request a new token for the correct tenant when a challenge is cached + client._client._config.authentication_policy._token = None + fetched_key = client.get_key(key_name) + assert key.id == fetched_key.id def empty_challenge_cache(fn): @@ -74,7 +117,8 @@ def test_challenge_cache(): def test_challenge_parsing(): - authority = "https://login.authority.net/tenant" + tenant = "tenant" + authority = "https://login.authority.net/{}".format(tenant) resource = "https://challenge.resource" challenge = HttpChallenge( "https://request.uri", challenge="Bearer authorization={}, resource={}".format(authority, resource) @@ -82,6 +126,7 @@ def test_challenge_parsing(): assert challenge.get_authorization_server() == authority assert challenge.get_resource() == resource + assert challenge.tenant_id == tenant @empty_challenge_cache @@ -111,7 +156,7 @@ def send(request): return Mock(status_code=200) raise ValueError("unexpected request") - def get_token(*scopes): + def get_token(*scopes, **_): assert len(scopes) == 1 assert scopes[0] == expected_scope return AccessToken(expected_token, 0) @@ -143,6 +188,56 @@ def get_token(*scopes): test_with_challenge(challenge_with_scope, scope) +@empty_challenge_cache +def test_tenant(): + """The policy's token requests should pass the parsed tenant ID from the challenge""" + + expected_content = b"a duck" + + def test_with_challenge(challenge, expected_tenant): + expected_token = "expected_token" + + class Requests: + count = 0 + + def send(request): + Requests.count += 1 + if Requests.count == 1: + # first request should be unauthorized and have no content + assert not request.body + assert request.headers["Content-Length"] == "0" + return challenge + elif Requests.count == 2: + # second request should be authorized according to challenge and have the expected content + assert request.headers["Content-Length"] + assert request.body == expected_content + assert expected_token in request.headers["Authorization"] + return Mock(status_code=200) + raise ValueError("unexpected request") + + def get_token(*_, **kwargs): + assert kwargs.get("tenant_id") == expected_tenant + return AccessToken(expected_token, 0) + + credential = Mock(get_token=Mock(wraps=get_token)) + pipeline = Pipeline(policies=[ChallengeAuthPolicy(credential=credential)], transport=Mock(send=send)) + request = HttpRequest("POST", get_random_url()) + request.set_bytes_body(expected_content) + pipeline.run(request) + + assert credential.get_token.call_count == 1 + + tenant = "tenant-id" + endpoint = "https://authority.net/{}".format(tenant) + + challenge = Mock( + status_code=401, + headers={"WWW-Authenticate": 'Bearer authorization="{}", resource=https://challenge.resource'.format(endpoint)}, + ) + + test_with_challenge(challenge, tenant) + + @empty_challenge_cache def test_policy_updates_cache(): """ @@ -242,11 +337,7 @@ def get_token(*_, **__): @empty_challenge_cache def test_preserves_options_and_headers(): - """After a challenge, the original request should be sent with its options and headers preserved. - - If a policy mutates the options or headers of the challenge (unauthorized) request, the options of the service - request should be present when it is sent with authorization. - """ + """After a challenge, the policy should send the original request with its options and headers preserved""" url = get_random_url() token = "**" @@ -265,51 +356,31 @@ def get_token(*_, **__): ] + [mock_response()] * 2, ) - challenge_policy = ChallengeAuthPolicy(credential=credential) - policies = get_policies_for_request_mutation_test(challenge_policy) - pipeline = Pipeline(policies=policies, transport=transport) - - response = pipeline.run(HttpRequest("GET", url)) - - # ensure the mock sans I/O policies were called - for policy in policies: - if hasattr(policy, "on_request"): - assert policy.on_request.called, "mock policy wasn't invoked" - -def get_policies_for_request_mutation_test(challenge_policy): - # create mock policies to add, remove, and verify an option and header key = "foo" value = "bar" - do_not_handle = lambda _: False def add(request): # add the expected option and header request.context.options[key] = value request.http_request.headers[key] = value - adder = Mock(spec_set=SansIOHTTPPolicy, on_request=Mock(wraps=add), on_exception=do_not_handle) - - def remove(request): - # remove expected header and all options of unauthorized (challenge) requests - if not request.http_request.headers.get("Authorization"): - request.http_request.headers.pop(key, None) - request.context.options = {} - - remover = Mock(spec_set=SansIOHTTPPolicy, on_request=Mock(wraps=remove), on_exception=do_not_handle) + adder = Mock(spec_set=SansIOHTTPPolicy, on_request=Mock(wraps=add), on_exception=lambda _: False) def verify(request): # authorized (non-challenge) requests should have the expected option and header if request.http_request.headers.get("Authorization"): - assert request.context.options.get(key) == value, "request option not preserved across challenge" - assert request.http_request.headers.get(key) == value, "headers not preserved across challenge" + assert request.context.options.get(key) == value, "request option wasn't preserved across challenge" + assert request.http_request.headers.get(key) == value, "headers wasn't preserved across challenge" verifier = Mock(spec=SansIOHTTPPolicy, on_request=Mock(wraps=verify)) - # Mutating the challenge request shouldn't affect the authorized request. - # This is the pipeline flow: - # 1. add option and header - # 2. challenge auth - # 3. remove option, header from unauthorized request - # 4. verify option, header on authorized request - return [adder, challenge_policy, remover, verifier] + challenge_policy = ChallengeAuthPolicy(credential=credential) + policies = [adder, challenge_policy, verifier] + pipeline = Pipeline(policies=policies, transport=transport) + + pipeline.run(HttpRequest("GET", url)) + + # ensure the mock sans I/O policies were called + assert adder.on_request.called, "mock policy wasn't invoked" + assert verifier.on_request.called, "mock policy wasn't invoked" diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py index cf00e192ffa2..0ef669809548 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_challenge_auth_async.py @@ -6,23 +6,66 @@ Tests for the HTTP challenge authentication implementation. These tests aren't parallelizable, because the challenge cache is global to the process. """ +import asyncio +import os import time +from uuid import uuid4 -try: - from unittest.mock import Mock, patch -except ImportError: # python < 3.3 - from mock import Mock, patch # type: ignore +from unittest.mock import Mock, patch from azure.core.credentials import AccessToken from azure.core.exceptions import ServiceRequestError from azure.core.pipeline import AsyncPipeline +from azure.core.pipeline.policies import SansIOHTTPPolicy from azure.core.pipeline.transport import HttpRequest +from azure.identity.aio import ClientSecretCredential +from azure.keyvault.keys.aio import KeyClient from azure.keyvault.keys._shared import AsyncChallengeAuthPolicy, HttpChallenge, HttpChallengeCache +from azure.keyvault.keys._shared.client_base import DEFAULT_VERSION import pytest from _shared.helpers import mock_response, Request from _shared.helpers_async import async_validating_transport -from test_challenge_auth import empty_challenge_cache, get_policies_for_request_mutation_test, get_random_url +from _shared.test_case_async import KeyVaultTestCase +from _test_case import client_setup, get_decorator, KeysTestCase +from test_challenge_auth import empty_challenge_cache, get_random_url + + +only_default_version = get_decorator(is_async=True, api_versions=[DEFAULT_VERSION]) + + +class ChallengeAuthTests(KeysTestCase, KeyVaultTestCase): + def __init__(self, *args, **kwargs): + super().__init__(*args, match_body=False, **kwargs) + + @only_default_version() + @client_setup + async def test_multitenant_authentication(self, client, is_hsm, **kwargs): + if not self.is_live: + pytest.skip("This test is incompatible with vcrpy in playback") + + client_id = os.environ.get("KEYVAULT_CLIENT_ID") + client_secret = os.environ.get("KEYVAULT_CLIENT_SECRET") + if not (client_id and client_secret): + pytest.skip("Values for KEYVAULT_CLIENT_ID and KEYVAULT_CLIENT_SECRET are required") + + # we set up a client for this method so it gets awaited, but we actually want to create a new client + # this new client should use a credential with an initially fake tenant ID and still succeed with a real request + credential = ClientSecretCredential(tenant_id=str(uuid4()), client_id=client_id, client_secret=client_secret) + vault_url = self.managed_hsm_url if is_hsm else self.vault_url + client = KeyClient(vault_url=vault_url, credential=credential) + + if self.is_live: + await asyncio.sleep(2) # to avoid throttling by the service + key_name = self.get_resource_name("multitenant-key") + key = await client.create_rsa_key(key_name) + assert key.id + + # try making another request with the credential's token revoked + # the challenge policy should correctly request a new token for the correct tenant when a challenge is cached + client._client._config.authentication_policy._token = None + fetched_key = await client.get_key(key_name) + assert key.id == fetched_key.id @pytest.mark.asyncio @@ -65,13 +108,15 @@ async def send(request): return Mock(status_code=200) raise ValueError("unexpected request") - async def get_token(*scopes): + async def get_token(*scopes, **_): assert len(scopes) == 1 assert scopes[0] == expected_scope return AccessToken(expected_token, 0) credential = Mock(get_token=Mock(wraps=get_token)) - pipeline = AsyncPipeline(policies=[AsyncChallengeAuthPolicy(credential=credential)], transport=Mock(send=send)) + pipeline = AsyncPipeline( + policies=[AsyncChallengeAuthPolicy(credential=credential)], transport=Mock(send=send) + ) request = HttpRequest("POST", get_random_url()) request.set_bytes_body(expected_content) await pipeline.run(request) @@ -97,6 +142,59 @@ async def get_token(*scopes): await test_with_challenge(challenge_with_scope, scope) +@pytest.mark.asyncio +@empty_challenge_cache +async def test_tenant(): + """The policy's token requests should pass the parsed tenant ID from the challenge""" + + expected_content = b"a duck" + + async def test_with_challenge(challenge, expected_tenant): + expected_token = "expected_token" + + class Requests: + count = 0 + + async def send(request): + Requests.count += 1 + if Requests.count == 1: + # first request should be unauthorized and have no content + assert not request.body + assert request.headers["Content-Length"] == "0" + return challenge + elif Requests.count == 2: + # second request should be authorized according to challenge and have the expected content + assert request.headers["Content-Length"] + assert request.body == expected_content + assert expected_token in request.headers["Authorization"] + return Mock(status_code=200) + raise ValueError("unexpected request") + + async def get_token(*_, **kwargs): + assert kwargs.get("tenant_id") == expected_tenant + return AccessToken(expected_token, 0) + + credential = Mock(get_token=Mock(wraps=get_token)) + pipeline = AsyncPipeline( + policies=[AsyncChallengeAuthPolicy(credential=credential)], transport=Mock(send=send) + ) + request = HttpRequest("POST", get_random_url()) + request.set_bytes_body(expected_content) + await pipeline.run(request) + + assert credential.get_token.call_count == 1 + + tenant = "tenant-id" + endpoint = "https://authority.net/{}".format(tenant) + + challenge = Mock( + status_code=401, + headers={"WWW-Authenticate": 'Bearer authorization="{}", resource=https://challenge.resource'.format(endpoint)}, + ) + + await test_with_challenge(challenge, tenant) + + @pytest.mark.asyncio @empty_challenge_cache async def test_policy_updates_cache(): @@ -204,11 +302,7 @@ async def get_token(*_, **__): @pytest.mark.asyncio @empty_challenge_cache async def test_preserves_options_and_headers(): - """After a challenge, the original request should be sent with its options and headers preserved. - - If a policy mutates the options or headers of the challenge (unauthorized) request, the options of the service - request should be present when it is sent with authorization. - """ + """After a challenge, the policy should send the original request with its options and headers preserved""" url = get_random_url() @@ -228,13 +322,30 @@ async def get_token(*_, **__): ] + [mock_response()] * 2, ) + key = "foo" + value = "bar" + + def add(request): + # add the expected option and header + request.context.options[key] = value + request.http_request.headers[key] = value + + adder = Mock(spec_set=SansIOHTTPPolicy, on_request=Mock(wraps=add), on_exception=lambda _: False) + + def verify(request): + # authorized (non-challenge) requests should have the expected option and header + if request.http_request.headers.get("Authorization"): + assert request.context.options.get(key) == value, "request option wasn't preserved across challenge" + assert request.http_request.headers.get(key) == value, "headers wasn't preserved across challenge" + + verifier = Mock(spec=SansIOHTTPPolicy, on_request=Mock(wraps=verify)) + challenge_policy = AsyncChallengeAuthPolicy(credential=credential) - policies = get_policies_for_request_mutation_test(challenge_policy) + policies = [adder, challenge_policy, verifier] pipeline = AsyncPipeline(policies=policies, transport=transport) - response = await pipeline.run(HttpRequest("GET", url)) + await pipeline.run(HttpRequest("GET", url)) - # ensure the mock sans I/O policies were used - for policy in policies: - if hasattr(policy, "on_request"): - assert policy.on_request.called, "mock policy wasn't invoked" + # ensure the mock sans I/O policies were called + assert adder.on_request.called, "mock policy wasn't invoked" + assert verifier.on_request.called, "mock policy wasn't invoked" diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_key_client.py b/sdk/keyvault/azure-keyvault-keys/tests/test_key_client.py index 315235049869..5d34a85d71ca 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_key_client.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_key_client.py @@ -141,7 +141,7 @@ def _update_key_properties(self, client, key, release_policy=None): assert key.properties.updated_on != key_bundle.properties.updated_on assert sorted(key_ops) == sorted(key_bundle.key_operations) if release_policy: - assert key.properties.release_policy.data != key_bundle.properties.release_policy.data + assert key.properties.release_policy.encoded_policy != key_bundle.properties.release_policy.encoded_policy return key_bundle def _import_test_key(self, client, name, hardware_protected=False, **kwargs): @@ -426,17 +426,21 @@ def test_logging_enabled(self, client, is_hsm, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) + # the body of the request should be JSON + body = json.loads(section) expected_kty = "RSA-HSM" if is_hsm else "RSA" if body["kty"] == expected_kty: + mock_handler.close() return except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON or has no kty property pass + mock_handler.close() assert False, "Expected request body wasn't logged" @logging_disabled() @@ -453,16 +457,22 @@ def test_logging_disabled(self, client, is_hsm, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) + # the body of the request should be JSON + body = json.loads(section) expected_kty = "RSA-HSM" if is_hsm else "RSA" - assert body["kty"] != expected_kty, "Client request body was logged" + if body["kty"] == expected_kty: + mock_handler.close() + assert False, "Client request body was logged" except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON or has no kty property pass + mock_handler.close() + @only_hsm_7_3_preview() @client_setup def test_get_random_bytes(self, client, **kwargs): @@ -472,8 +482,7 @@ def test_get_random_bytes(self, client, **kwargs): for i in range(5): # [START get_random_bytes] # get eight random bytes from a managed HSM - result = client.get_random_bytes(count=8) - random_bytes = result.value + random_bytes = client.get_random_bytes(count=8) # [END get_random_bytes] assert len(random_bytes) == 8 assert all(random_bytes != rb for rb in generated_random_bytes) @@ -491,7 +500,7 @@ def test_key_release(self, client, **kwargs): client, rsa_key_name, hardware_protected=True, exportable=True, release_policy=release_policy ) assert key.properties.release_policy - assert key.properties.release_policy.data + assert key.properties.release_policy.encoded_policy assert key.properties.exportable release_result = client.release_key(rsa_key_name, attestation) @@ -509,7 +518,7 @@ def test_imported_key_release(self, client, **kwargs): client, imported_key_name, hardware_protected=True, exportable=True, release_policy=release_policy ) assert key.properties.release_policy - assert key.properties.release_policy.data + assert key.properties.release_policy.encoded_policy assert key.properties.exportable release_result = client.release_key(imported_key_name, attestation) @@ -524,7 +533,7 @@ def test_update_release_policy(self, client, **kwargs): key = self._create_rsa_key( client, key_name, hardware_protected=True, exportable=True, release_policy=release_policy ) - assert key.properties.release_policy.data + assert key.properties.release_policy.encoded_policy new_release_policy_json = { "anyOf": [ @@ -596,7 +605,7 @@ def test_get_cryptography_client(self, client, is_hsm, **kwargs): key = self._create_rsa_key(client, key_name, hardware_protected=is_hsm) # try specifying the key version - crypto_client = client.get_cryptography_client(key_name, version=key.properties.version) + crypto_client = client.get_cryptography_client(key_name, key_version=key.properties.version) # both clients should use the same generated client assert client._client == crypto_client._client diff --git a/sdk/keyvault/azure-keyvault-keys/tests/test_keys_async.py b/sdk/keyvault/azure-keyvault-keys/tests/test_keys_async.py index 7efd0e28f9c0..6159ba33282f 100644 --- a/sdk/keyvault/azure-keyvault-keys/tests/test_keys_async.py +++ b/sdk/keyvault/azure-keyvault-keys/tests/test_keys_async.py @@ -128,7 +128,7 @@ async def _update_key_properties(self, client, key, release_policy=None): assert key.properties.updated_on != key_bundle.properties.updated_on assert sorted(key_ops) == sorted(key_bundle.key_operations) if release_policy: - assert key.properties.release_policy.data != key_bundle.properties.release_policy.data + assert key.properties.release_policy.encoded_policy != key_bundle.properties.release_policy.encoded_policy return key_bundle async def _validate_key_list(self, keys, expected): @@ -423,17 +423,21 @@ async def test_logging_enabled(self, client, is_hsm, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) + # the body of the request should be JSON + body = json.loads(section) expected_kty = "RSA-HSM" if is_hsm else "RSA" if body["kty"] == expected_kty: + mock_handler.close() return except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON or has no kty property pass + mock_handler.close() assert False, "Expected request body wasn't logged" @logging_disabled() @@ -450,16 +454,22 @@ async def test_logging_disabled(self, client, is_hsm, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) + # the body of the request should be JSON + body = json.loads(section) expected_kty = "RSA-HSM" if is_hsm else "RSA" - assert body["kty"] != expected_kty, "Client request body was logged" + if body["kty"] == expected_kty: + mock_handler.close() + assert False, "Client request body was logged" except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON or has no kty property pass + mock_handler.close() + @only_hsm_7_3_preview() @client_setup async def test_get_random_bytes(self, client, **kwargs): @@ -469,8 +479,7 @@ async def test_get_random_bytes(self, client, **kwargs): for i in range(5): # [START get_random_bytes] # get eight random bytes from a managed HSM - result = await client.get_random_bytes(count=8) - random_bytes = result.value + random_bytes = await client.get_random_bytes(count=8) # [END get_random_bytes] assert len(random_bytes) == 8 assert all(random_bytes != rb for rb in generated_random_bytes) @@ -488,7 +497,7 @@ async def test_key_release(self, client, **kwargs): client, rsa_key_name, hardware_protected=True, exportable=True, release_policy=release_policy ) assert key.properties.release_policy - assert key.properties.release_policy.data + assert key.properties.release_policy.encoded_policy assert key.properties.exportable release_result = await client.release_key(rsa_key_name, attestation) @@ -506,7 +515,7 @@ async def test_imported_key_release(self, client, **kwargs): client, imported_key_name, hardware_protected=True, exportable=True, release_policy=release_policy ) assert key.properties.release_policy - assert key.properties.release_policy.data + assert key.properties.release_policy.encoded_policy assert key.properties.exportable release_result = await client.release_key(imported_key_name, attestation) @@ -521,7 +530,7 @@ async def test_update_release_policy(self, client, **kwargs): key = await self._create_rsa_key( client, key_name, hardware_protected=True, exportable=True, release_policy=release_policy ) - assert key.properties.release_policy.data + assert key.properties.release_policy.encoded_policy new_release_policy_json = { "anyOf": [ @@ -593,7 +602,7 @@ async def test_get_cryptography_client(self, client, is_hsm, **kwargs): key = await self._create_rsa_key(client, key_name, hardware_protected=is_hsm) # try specifying the key version - crypto_client = client.get_cryptography_client(key_name, version=key.properties.version) + crypto_client = client.get_cryptography_client(key_name, key_version=key.properties.version) # both clients should use the same generated client assert client._client == crypto_client._client diff --git a/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md b/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md index 679cdf8ae1ba..78a95e48a8d6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 4.4.0b2 (Unreleased) +## 4.4.0b3 (Unreleased) ### Features Added @@ -10,6 +10,15 @@ ### Other Changes +## 4.4.0b2 (2021-11-11) + +### Features Added +- Added support for multi-tenant authentication when using `azure-identity` 1.7.1 or newer + ([#20698](https://github.com/Azure/azure-sdk-for-python/issues/20698)) + +### Other Changes +- Updated minimum `azure-core` version to 1.15.0 + ## 4.4.0b1 (2021-09-09) ### Features Added diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py index 3329ce2df068..d8303b4b081d 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/__init__.py @@ -9,7 +9,7 @@ import urlparse as parse # type: ignore from typing import TYPE_CHECKING -from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase +from .challenge_auth_policy import ChallengeAuthPolicy from .client_base import KeyVaultClientBase from .http_challenge import HttpChallenge from . import http_challenge_cache as HttpChallengeCache @@ -21,7 +21,6 @@ __all__ = [ "ChallengeAuthPolicy", - "ChallengeAuthPolicyBase", "HttpChallenge", "HttpChallengeCache", "KeyVaultClientBase", diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_challenge_auth_policy.py index 97f1d093e20f..bfe46689f5ff 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/async_challenge_auth_policy.py @@ -13,67 +13,69 @@ requirements can change. For example, a vault may move to a new tenant. In such a case the policy will attempt the protocol again. """ + +import time from typing import TYPE_CHECKING -from azure.core.pipeline.policies import AsyncHTTPPolicy +from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy -from . import HttpChallengeCache -from .challenge_auth_policy import _enforce_tls, _get_challenge_request, _update_challenge, ChallengeAuthPolicyBase +from . import http_challenge_cache as ChallengeCache +from .challenge_auth_policy import _enforce_tls, _update_challenge if TYPE_CHECKING: - from typing import Any + from typing import Any, Optional + from azure.core.credentials import AccessToken from azure.core.credentials_async import AsyncTokenCredential - from azure.core.pipeline import PipelineRequest - from azure.core.pipeline.transport import AsyncHttpResponse - from . import HttpChallenge + from azure.core.pipeline import PipelineRequest, PipelineResponse -class AsyncChallengeAuthPolicy(ChallengeAuthPolicyBase, AsyncHTTPPolicy): +class AsyncChallengeAuthPolicy(AsyncBearerTokenCredentialPolicy): """policy for handling HTTP authentication challenges""" - def __init__(self, credential: "AsyncTokenCredential", **kwargs: "Any") -> None: + def __init__(self, credential: "AsyncTokenCredential", *scopes: str, **kwargs: "Any") -> None: + super().__init__(credential, *scopes, **kwargs) self._credential = credential - super(AsyncChallengeAuthPolicy, self).__init__(**kwargs) + self._token = None # type: Optional[AccessToken] - async def send(self, request: "PipelineRequest") -> "AsyncHttpResponse": + async def on_request(self, request: "PipelineRequest") -> None: _enforce_tls(request) - - challenge = HttpChallengeCache.get_challenge_for_url(request.http_request.url) - if not challenge: - challenge_request = _get_challenge_request(request) - challenger = await self.next.send(challenge_request) - try: - challenge = _update_challenge(request, challenger) - except ValueError: - # didn't receive the expected challenge -> nothing more this policy can do - return challenger - - await self._handle_challenge(request, challenge) - response = await self.next.send(request) - - if response.http_response.status_code == 401: - # any cached token must be invalid - self._token = None - - # cached challenge could be outdated; maybe this response has a new one? - try: - challenge = _update_challenge(request, response) - except ValueError: - # 401 with no legible challenge -> nothing more this policy can do - return response - - await self._handle_challenge(request, challenge) - response = await self.next.send(request) - - return response - - async def _handle_challenge(self, request: "PipelineRequest", challenge: "HttpChallenge") -> None: - """authenticate according to challenge, add Authorization header to request""" - - if self._need_new_token: + challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) + if challenge: + # Note that if the vault has moved to a new tenant since our last request for it, this request will fail. + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = await self._credential.get_token(scope, tenant_id=challenge.tenant_id) + + # ignore mypy's warning -- although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return + + # else: discover authentication information by eliciting a challenge from Key Vault. Remove any request data, + # saving it for later. Key Vault will reject the request as unauthorized and respond with a challenge. + # on_challenge will parse that challenge, reattach any body removed here, authorize the request, and tell + # super to send it again. + if request.http_request.body: + request.context["key_vault_request_data"] = request.http_request.body + request.http_request.set_json_body(None) + request.http_request.headers["Content-Length"] = "0" + + + async def on_challenge(self, request: "PipelineRequest", response: "PipelineResponse") -> bool: + try: + challenge = _update_challenge(request, response) # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource scope = challenge.get_scope() or challenge.get_resource() + "/.default" - self._token = await self._credential.get_token(scope) + except ValueError: + return False + + body = request.context.pop("key_vault_request_data", None) + request.http_request.set_text_body(body) # no-op when text is None + await self.authorize_request(request, scope, tenant_id=challenge.tenant_id) + + return True - # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token - request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + @property + def _need_new_token(self) -> bool: + # pylint:disable=invalid-overridden-method + return not self._token or self._token.expires_on - time.time() < 300 diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/challenge_auth_policy.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/challenge_auth_policy.py index 3239032e9162..7f6f2b93f0e4 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/challenge_auth_policy.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/challenge_auth_policy.py @@ -14,13 +14,11 @@ protocol again. """ -import copy import time from azure.core.exceptions import ServiceRequestError -from azure.core.pipeline import PipelineContext, PipelineRequest -from azure.core.pipeline.policies import HTTPPolicy -from azure.core.pipeline.transport import HttpRequest +from azure.core.pipeline import PipelineRequest +from azure.core.pipeline.policies import BearerTokenCredentialPolicy from .http_challenge import HttpChallenge from . import http_challenge_cache as ChallengeCache @@ -44,22 +42,6 @@ def _enforce_tls(request): ) -def _get_challenge_request(request): - # type: (PipelineRequest) -> PipelineRequest - - # The challenge request is intended to provoke an authentication challenge from Key Vault, to learn how the - # service request should be authenticated. It should be identical to the service request but with no body. - challenge_request = HttpRequest( - request.http_request.method, request.http_request.url, headers=request.http_request.headers - ) - challenge_request.headers["Content-Length"] = "0" - - options = copy.deepcopy(request.context.options) - context = PipelineContext(request.context.transport, **options) - - return PipelineRequest(http_request=challenge_request, context=context) - - def _update_challenge(request, challenger): # type: (PipelineRequest, PipelineResponse) -> HttpChallenge """parse challenge from challenger, cache it, return it""" @@ -73,68 +55,55 @@ def _update_challenge(request, challenger): return challenge -class ChallengeAuthPolicyBase(object): - """Sans I/O base for challenge authentication policies""" - - def __init__(self, **kwargs): - self._token = None # type: Optional[AccessToken] - super(ChallengeAuthPolicyBase, self).__init__(**kwargs) - - @property - def _need_new_token(self): - # type: () -> bool - return not self._token or self._token.expires_on - time.time() < 300 - - -class ChallengeAuthPolicy(ChallengeAuthPolicyBase, HTTPPolicy): +class ChallengeAuthPolicy(BearerTokenCredentialPolicy): """policy for handling HTTP authentication challenges""" - def __init__(self, credential, **kwargs): - # type: (TokenCredential, **Any) -> None + def __init__(self, credential, *scopes, **kwargs): + # type: (TokenCredential, *str, **Any) -> None + super(ChallengeAuthPolicy, self).__init__(credential, *scopes, **kwargs) self._credential = credential - super(ChallengeAuthPolicy, self).__init__(**kwargs) + self._token = None # type: Optional[AccessToken] - def send(self, request): - # type: (PipelineRequest) -> PipelineResponse + def on_request(self, request): + # type: (PipelineRequest) -> None _enforce_tls(request) - challenge = ChallengeCache.get_challenge_for_url(request.http_request.url) - if not challenge: - challenge_request = _get_challenge_request(request) - challenger = self.next.send(challenge_request) - try: - challenge = _update_challenge(request, challenger) - except ValueError: - # didn't receive the expected challenge -> nothing more this policy can do - return challenger - - self._handle_challenge(request, challenge) - response = self.next.send(request) - - if response.http_response.status_code == 401: - # any cached token must be invalid - self._token = None - - # cached challenge could be outdated; maybe this response has a new one? - try: - challenge = _update_challenge(request, response) - except ValueError: - # 401 with no legible challenge -> nothing more this policy can do - return response - - self._handle_challenge(request, challenge) - response = self.next.send(request) - - return response - - def _handle_challenge(self, request, challenge): - # type: (PipelineRequest, HttpChallenge) -> None - """authenticate according to challenge, add Authorization header to request""" - - if self._need_new_token: + if challenge: + # Note that if the vault has moved to a new tenant since our last request for it, this request will fail. + if self._need_new_token: + # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource + scope = challenge.get_scope() or challenge.get_resource() + "/.default" + self._token = self._credential.get_token(scope, tenant_id=challenge.tenant_id) + + # ignore mypy's warning -- although self._token is Optional, get_token raises when it fails to get a token + request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return + + # else: discover authentication information by eliciting a challenge from Key Vault. Remove any request data, + # saving it for later. Key Vault will reject the request as unauthorized and respond with a challenge. + # on_challenge will parse that challenge, reattach any body removed here, authorize the request, and tell + # super to send it again. + if request.http_request.body: + request.context["key_vault_request_data"] = request.http_request.body + request.http_request.set_json_body(None) + request.http_request.headers["Content-Length"] = "0" + + def on_challenge(self, request, response): + # type: (PipelineRequest, PipelineResponse) -> bool + try: + challenge = _update_challenge(request, response) # azure-identity credentials require an AADv2 scope but the challenge may specify an AADv1 resource scope = challenge.get_scope() or challenge.get_resource() + "/.default" - self._token = self._credential.get_token(scope) + except ValueError: + return False + + body = request.context.pop("key_vault_request_data", None) + request.http_request.set_text_body(body) # no-op when text is None + self.authorize_request(request, scope, tenant_id=challenge.tenant_id) - # ignore mypy's warning because although self._token is Optional, get_token raises when it fails to get a token - request.http_request.headers["Authorization"] = "Bearer {}".format(self._token.token) # type: ignore + return True + + @property + def _need_new_token(self): + # type: () -> bool + return not self._token or self._token.expires_on - time.time() < 300 diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge.py index c762e1ae50ef..c52c90929ad9 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_shared/http_challenge.py @@ -40,6 +40,11 @@ def __init__(self, request_uri, challenge, response_headers=None): if "authorization" not in self._parameters and "authorization_uri" not in self._parameters: raise ValueError("Invalid challenge parameters") + authorization_uri = self.get_authorization_server() + # the authoritzation server URI should look something like https://login.windows.net/tenant-id + uri_path = parse.urlparse(authorization_uri).path.lstrip("/") + self.tenant_id = uri_path.split("/")[0] or None + # if the response headers were supplied if response_headers: # get the message signing key and message key encryption key from the headers diff --git a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_version.py b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_version.py index 56befbde59cd..ae9ef834f0f2 100644 --- a/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_version.py +++ b/sdk/keyvault/azure-keyvault-secrets/azure/keyvault/secrets/_version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "4.4.0b2" +VERSION = "4.4.0b3" diff --git a/sdk/keyvault/azure-keyvault-secrets/setup.py b/sdk/keyvault/azure-keyvault-secrets/setup.py index b8e377b75496..d74810b67dbf 100644 --- a/sdk/keyvault/azure-keyvault-secrets/setup.py +++ b/sdk/keyvault/azure-keyvault-secrets/setup.py @@ -83,7 +83,7 @@ ] ), install_requires=[ - "azure-core<2.0.0,>=1.7.0", + "azure-core<2.0.0,>=1.15.0", "msrest>=0.6.21", "azure-common~=1.1", ], diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_async.py b/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_async.py index ccd5828f3f84..2cc178f214f6 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_async.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_async.py @@ -291,16 +291,20 @@ async def test_logging_enabled(self, client, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) + # the body of the request should be JSON + body = json.loads(section) if body["value"] == "secret-value": + mock_handler.close() return except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON pass + mock_handler.close() assert False, "Expected request body wasn't logged" @logging_disabled() @@ -317,15 +321,21 @@ async def test_logging_disabled(self, client, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) - assert body["value"] != "secret-value", "Client request body was logged" + # the body of the request should be JSON + body = json.loads(section) + if body["value"] == "secret-value": + mock_handler.close() + assert False, "Client request body was logged" except (ValueError, KeyError): # this means the message is not JSON or has no kty property pass + mock_handler.close() + def test_service_headers_allowed_in_logs(): service_headers = {"x-ms-keyvault-network-info", "x-ms-keyvault-region", "x-ms-keyvault-service-version"} diff --git a/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py b/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py index 893ac113e5cd..d2beca9462b8 100644 --- a/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py +++ b/sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py @@ -297,16 +297,20 @@ def test_logging_enabled(self, client, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) + # the body of the request should be JSON + body = json.loads(section) if body["value"] == "secret-value": + mock_handler.close() return except (ValueError, KeyError): - # this means the message is not JSON or has no kty property + # this means the request section is not JSON pass + mock_handler.close() assert False, "Expected request body wasn't logged" @logging_disabled() @@ -323,15 +327,21 @@ def test_logging_disabled(self, client, **kwargs): for message in mock_handler.messages: if message.levelname == "DEBUG" and message.funcName == "on_request": - messages_request = message.message.split("/n") - for m in messages_request: + # parts of the request are logged on new lines in a single message + request_sections = message.message.split("/n") + for section in request_sections: try: - body = json.loads(m) - assert body["value"] != "secret-value", "Client request body was logged" + # the body of the request should be JSON + body = json.loads(section) + if body["value"] == "secret-value": + mock_handler.close() + assert False, "Client request body was logged" except (ValueError, KeyError): # this means the message is not JSON or has no kty property pass + mock_handler.close() + def test_service_headers_allowed_in_logs(): service_headers = {"x-ms-keyvault-network-info", "x-ms-keyvault-region", "x-ms-keyvault-service-version"} diff --git a/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md b/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md index 687d15a01e18..1686c02bf192 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md +++ b/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md @@ -1,5 +1,24 @@ # Release History +## 9.3.0 (2021-11-11) + +**Features** + + - Added some enum value + + +## 9.2.0 (2021-10-15) + +**Features** + + - Model VaultProperties has a new parameter public_network_access + - Model VaultPatchProperties has a new parameter public_network_access + - Model KeyAttributes has a new parameter exportable + - Model Key has a new parameter release_policy + - Model Key has a new parameter rotation_policy + - Model KeyProperties has a new parameter release_policy + - Model KeyProperties has a new parameter rotation_policy + ## 9.1.0 (2021-08-26) **Features** diff --git a/sdk/keyvault/azure-mgmt-keyvault/_meta.json b/sdk/keyvault/azure-mgmt-keyvault/_meta.json index 1d7d6f241a1a..7d346d26cca5 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/_meta.json +++ b/sdk/keyvault/azure-mgmt-keyvault/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "277fe93bafa204e9e9a8544155ff07c33c5b54f1", + "commit": "f2aaaa76e3853dbfbee6558a29cee9b7c66798dc", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/keyvault/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/keyvault/resource-manager/readme.md" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py index da7b7fa9efbe..2cca4d6ed3cb 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py @@ -96,6 +96,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-09-01: :mod:`v2019_09_01.models` * 2020-04-01-preview: :mod:`v2020_04_01_preview.models` * 2021-04-01-preview: :mod:`v2021_04_01_preview.models` + * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` """ if api_version == '2016-10-01': from .v2016_10_01 import models @@ -112,6 +113,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-04-01-preview': from .v2021_04_01_preview import models return models + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -120,12 +124,15 @@ def keys(self): * 2019-09-01: :class:`KeysOperations` * 2020-04-01-preview: :class:`KeysOperations` + * 2021-06-01-preview: :class:`KeysOperations` """ api_version = self._get_api_version('keys') if api_version == '2019-09-01': from .v2019_09_01.operations import KeysOperations as OperationClass elif api_version == '2020-04-01-preview': from .v2020_04_01_preview.operations import KeysOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import KeysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'keys'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -136,12 +143,15 @@ def managed_hsms(self): * 2020-04-01-preview: :class:`ManagedHsmsOperations` * 2021-04-01-preview: :class:`ManagedHsmsOperations` + * 2021-06-01-preview: :class:`ManagedHsmsOperations` """ api_version = self._get_api_version('managed_hsms') if api_version == '2020-04-01-preview': from .v2020_04_01_preview.operations import ManagedHsmsOperations as OperationClass elif api_version == '2021-04-01-preview': from .v2021_04_01_preview.operations import ManagedHsmsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import ManagedHsmsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_hsms'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -151,10 +161,13 @@ def mhsm_private_endpoint_connections(self): """Instance depends on the API version: * 2021-04-01-preview: :class:`MHSMPrivateEndpointConnectionsOperations` + * 2021-06-01-preview: :class:`MHSMPrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('mhsm_private_endpoint_connections') if api_version == '2021-04-01-preview': from .v2021_04_01_preview.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'mhsm_private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -164,10 +177,13 @@ def mhsm_private_link_resources(self): """Instance depends on the API version: * 2021-04-01-preview: :class:`MHSMPrivateLinkResourcesOperations` + * 2021-06-01-preview: :class:`MHSMPrivateLinkResourcesOperations` """ api_version = self._get_api_version('mhsm_private_link_resources') if api_version == '2021-04-01-preview': from .v2021_04_01_preview.operations import MHSMPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import MHSMPrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'mhsm_private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -181,6 +197,7 @@ def operations(self): * 2019-09-01: :class:`Operations` * 2020-04-01-preview: :class:`Operations` * 2021-04-01-preview: :class:`Operations` + * 2021-06-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2016-10-01': @@ -193,6 +210,8 @@ def operations(self): from .v2020_04_01_preview.operations import Operations as OperationClass elif api_version == '2021-04-01-preview': from .v2021_04_01_preview.operations import Operations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -205,6 +224,7 @@ def private_endpoint_connections(self): * 2019-09-01: :class:`PrivateEndpointConnectionsOperations` * 2020-04-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2021-04-01-preview: :class:`PrivateEndpointConnectionsOperations` + * 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2018-02-14': @@ -215,6 +235,8 @@ def private_endpoint_connections(self): from .v2020_04_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-04-01-preview': from .v2021_04_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -227,6 +249,7 @@ def private_link_resources(self): * 2019-09-01: :class:`PrivateLinkResourcesOperations` * 2020-04-01-preview: :class:`PrivateLinkResourcesOperations` * 2021-04-01-preview: :class:`PrivateLinkResourcesOperations` + * 2021-06-01-preview: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2018-02-14': @@ -237,6 +260,8 @@ def private_link_resources(self): from .v2020_04_01_preview.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2021-04-01-preview': from .v2021_04_01_preview.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -246,10 +271,13 @@ def secrets(self): """Instance depends on the API version: * 2020-04-01-preview: :class:`SecretsOperations` + * 2021-06-01-preview: :class:`SecretsOperations` """ api_version = self._get_api_version('secrets') if api_version == '2020-04-01-preview': from .v2020_04_01_preview.operations import SecretsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import SecretsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'secrets'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -263,6 +291,7 @@ def vaults(self): * 2019-09-01: :class:`VaultsOperations` * 2020-04-01-preview: :class:`VaultsOperations` * 2021-04-01-preview: :class:`VaultsOperations` + * 2021-06-01-preview: :class:`VaultsOperations` """ api_version = self._get_api_version('vaults') if api_version == '2016-10-01': @@ -275,6 +304,8 @@ def vaults(self): from .v2020_04_01_preview.operations import VaultsOperations as OperationClass elif api_version == '2021-04-01-preview': from .v2021_04_01_preview.operations import VaultsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from .v2021_06_01_preview.operations import VaultsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vaults'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py index 2bcd3a3e386b..93ed747b9426 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "9.3.0" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py index fa7afc6810ae..0dc03b7341d6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py @@ -94,6 +94,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-09-01: :mod:`v2019_09_01.models` * 2020-04-01-preview: :mod:`v2020_04_01_preview.models` * 2021-04-01-preview: :mod:`v2021_04_01_preview.models` + * 2021-06-01-preview: :mod:`v2021_06_01_preview.models` """ if api_version == '2016-10-01': from ..v2016_10_01 import models @@ -110,6 +111,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-04-01-preview': from ..v2021_04_01_preview import models return models + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -118,12 +122,15 @@ def keys(self): * 2019-09-01: :class:`KeysOperations` * 2020-04-01-preview: :class:`KeysOperations` + * 2021-06-01-preview: :class:`KeysOperations` """ api_version = self._get_api_version('keys') if api_version == '2019-09-01': from ..v2019_09_01.aio.operations import KeysOperations as OperationClass elif api_version == '2020-04-01-preview': from ..v2020_04_01_preview.aio.operations import KeysOperations as OperationClass + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview.aio.operations import KeysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'keys'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -134,12 +141,15 @@ def managed_hsms(self): * 2020-04-01-preview: :class:`ManagedHsmsOperations` * 2021-04-01-preview: :class:`ManagedHsmsOperations` + * 2021-06-01-preview: :class:`ManagedHsmsOperations` """ api_version = self._get_api_version('managed_hsms') if api_version == '2020-04-01-preview': from ..v2020_04_01_preview.aio.operations import ManagedHsmsOperations as OperationClass elif api_version == '2021-04-01-preview': from ..v2021_04_01_preview.aio.operations import ManagedHsmsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview.aio.operations import ManagedHsmsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'managed_hsms'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -149,10 +159,13 @@ def mhsm_private_endpoint_connections(self): """Instance depends on the API version: * 2021-04-01-preview: :class:`MHSMPrivateEndpointConnectionsOperations` + * 2021-06-01-preview: :class:`MHSMPrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('mhsm_private_endpoint_connections') if api_version == '2021-04-01-preview': from ..v2021_04_01_preview.aio.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview.aio.operations import MHSMPrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'mhsm_private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -162,10 +175,13 @@ def mhsm_private_link_resources(self): """Instance depends on the API version: * 2021-04-01-preview: :class:`MHSMPrivateLinkResourcesOperations` + * 2021-06-01-preview: :class:`MHSMPrivateLinkResourcesOperations` """ api_version = self._get_api_version('mhsm_private_link_resources') if api_version == '2021-04-01-preview': from ..v2021_04_01_preview.aio.operations import MHSMPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview.aio.operations import MHSMPrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'mhsm_private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -179,6 +195,7 @@ def operations(self): * 2019-09-01: :class:`Operations` * 2020-04-01-preview: :class:`Operations` * 2021-04-01-preview: :class:`Operations` + * 2021-06-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2016-10-01': @@ -191,6 +208,8 @@ def operations(self): from ..v2020_04_01_preview.aio.operations import Operations as OperationClass elif api_version == '2021-04-01-preview': from ..v2021_04_01_preview.aio.operations import Operations as OperationClass + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -203,6 +222,7 @@ def private_endpoint_connections(self): * 2019-09-01: :class:`PrivateEndpointConnectionsOperations` * 2020-04-01-preview: :class:`PrivateEndpointConnectionsOperations` * 2021-04-01-preview: :class:`PrivateEndpointConnectionsOperations` + * 2021-06-01-preview: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2018-02-14': @@ -213,6 +233,8 @@ def private_endpoint_connections(self): from ..v2020_04_01_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-04-01-preview': from ..v2021_04_01_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -225,6 +247,7 @@ def private_link_resources(self): * 2019-09-01: :class:`PrivateLinkResourcesOperations` * 2020-04-01-preview: :class:`PrivateLinkResourcesOperations` * 2021-04-01-preview: :class:`PrivateLinkResourcesOperations` + * 2021-06-01-preview: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2018-02-14': @@ -235,6 +258,8 @@ def private_link_resources(self): from ..v2020_04_01_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2021-04-01-preview': from ..v2021_04_01_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -244,10 +269,13 @@ def secrets(self): """Instance depends on the API version: * 2020-04-01-preview: :class:`SecretsOperations` + * 2021-06-01-preview: :class:`SecretsOperations` """ api_version = self._get_api_version('secrets') if api_version == '2020-04-01-preview': from ..v2020_04_01_preview.aio.operations import SecretsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview.aio.operations import SecretsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'secrets'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -261,6 +289,7 @@ def vaults(self): * 2019-09-01: :class:`VaultsOperations` * 2020-04-01-preview: :class:`VaultsOperations` * 2021-04-01-preview: :class:`VaultsOperations` + * 2021-06-01-preview: :class:`VaultsOperations` """ api_version = self._get_api_version('vaults') if api_version == '2016-10-01': @@ -273,6 +302,8 @@ def vaults(self): from ..v2020_04_01_preview.aio.operations import VaultsOperations as OperationClass elif api_version == '2021-04-01-preview': from ..v2021_04_01_preview.aio.operations import VaultsOperations as OperationClass + elif api_version == '2021-06-01-preview': + from ..v2021_06_01_preview.aio.operations import VaultsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vaults'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_version.py index f89ed38360ab..726043aa858a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "9.3.0" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_version.py index f89ed38360ab..726043aa858a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "9.3.0" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_version.py index f89ed38360ab..726043aa858a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "9.3.0" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_version.py index f89ed38360ab..726043aa858a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "9.3.0" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_version.py index f89ed38360ab..726043aa858a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.1.0" +VERSION = "9.3.0" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/__init__.py new file mode 100644 index 000000000000..1283ff09177b --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._key_vault_management_client import KeyVaultManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['KeyVaultManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_configuration.py new file mode 100644 index 000000000000..1111dd6fa3f4 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class KeyVaultManagementClientConfiguration(Configuration): + """Configuration for KeyVaultManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(KeyVaultManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-06-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_key_vault_management_client.py new file mode 100644 index 000000000000..9dce69cc8cbc --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_key_vault_management_client.py @@ -0,0 +1,129 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import KeyVaultManagementClientConfiguration +from .operations import KeysOperations +from .operations import VaultsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ManagedHsmsOperations +from .operations import MHSMPrivateEndpointConnectionsOperations +from .operations import MHSMPrivateLinkResourcesOperations +from .operations import Operations +from .operations import SecretsOperations +from . import models + + +class KeyVaultManagementClient(object): + """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. + + :ivar keys: KeysOperations operations + :vartype keys: azure.mgmt.keyvault.v2021_06_01_preview.operations.KeysOperations + :ivar vaults: VaultsOperations operations + :vartype vaults: azure.mgmt.keyvault.v2021_06_01_preview.operations.VaultsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.keyvault.v2021_06_01_preview.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.keyvault.v2021_06_01_preview.operations.PrivateLinkResourcesOperations + :ivar managed_hsms: ManagedHsmsOperations operations + :vartype managed_hsms: azure.mgmt.keyvault.v2021_06_01_preview.operations.ManagedHsmsOperations + :ivar mhsm_private_endpoint_connections: MHSMPrivateEndpointConnectionsOperations operations + :vartype mhsm_private_endpoint_connections: azure.mgmt.keyvault.v2021_06_01_preview.operations.MHSMPrivateEndpointConnectionsOperations + :ivar mhsm_private_link_resources: MHSMPrivateLinkResourcesOperations operations + :vartype mhsm_private_link_resources: azure.mgmt.keyvault.v2021_06_01_preview.operations.MHSMPrivateLinkResourcesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.keyvault.v2021_06_01_preview.operations.Operations + :ivar secrets: SecretsOperations operations + :vartype secrets: azure.mgmt.keyvault.v2021_06_01_preview.operations.SecretsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = KeyVaultManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.keys = KeysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vaults = VaultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_hsms = ManagedHsmsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.mhsm_private_endpoint_connections = MHSMPrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.mhsm_private_link_resources = MHSMPrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.secrets = SecretsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> KeyVaultManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_metadata.json b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_metadata.json new file mode 100644 index 000000000000..9791ad668ce7 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_metadata.json @@ -0,0 +1,111 @@ +{ + "chosen_version": "2021-06-01-preview", + "total_api_version_list": ["2021-06-01-preview"], + "client": { + "name": "KeyVaultManagementClient", + "filename": "_key_vault_management_client", + "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"KeyVaultManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"KeyVaultManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "keys": "KeysOperations", + "vaults": "VaultsOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "private_link_resources": "PrivateLinkResourcesOperations", + "managed_hsms": "ManagedHsmsOperations", + "mhsm_private_endpoint_connections": "MHSMPrivateEndpointConnectionsOperations", + "mhsm_private_link_resources": "MHSMPrivateLinkResourcesOperations", + "operations": "Operations", + "secrets": "SecretsOperations" + } +} \ No newline at end of file diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_version.py new file mode 100644 index 000000000000..726043aa858a --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "9.3.0" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/__init__.py new file mode 100644 index 000000000000..f54ed88d6ad2 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._key_vault_management_client import KeyVaultManagementClient +__all__ = ['KeyVaultManagementClient'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/_configuration.py new file mode 100644 index 000000000000..da6ab06618be --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class KeyVaultManagementClientConfiguration(Configuration): + """Configuration for KeyVaultManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(KeyVaultManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-06-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/_key_vault_management_client.py new file mode 100644 index 000000000000..d104a7fe4fe0 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/_key_vault_management_client.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import KeyVaultManagementClientConfiguration +from .operations import KeysOperations +from .operations import VaultsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import ManagedHsmsOperations +from .operations import MHSMPrivateEndpointConnectionsOperations +from .operations import MHSMPrivateLinkResourcesOperations +from .operations import Operations +from .operations import SecretsOperations +from .. import models + + +class KeyVaultManagementClient(object): + """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. + + :ivar keys: KeysOperations operations + :vartype keys: azure.mgmt.keyvault.v2021_06_01_preview.aio.operations.KeysOperations + :ivar vaults: VaultsOperations operations + :vartype vaults: azure.mgmt.keyvault.v2021_06_01_preview.aio.operations.VaultsOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: azure.mgmt.keyvault.v2021_06_01_preview.aio.operations.PrivateEndpointConnectionsOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: azure.mgmt.keyvault.v2021_06_01_preview.aio.operations.PrivateLinkResourcesOperations + :ivar managed_hsms: ManagedHsmsOperations operations + :vartype managed_hsms: azure.mgmt.keyvault.v2021_06_01_preview.aio.operations.ManagedHsmsOperations + :ivar mhsm_private_endpoint_connections: MHSMPrivateEndpointConnectionsOperations operations + :vartype mhsm_private_endpoint_connections: azure.mgmt.keyvault.v2021_06_01_preview.aio.operations.MHSMPrivateEndpointConnectionsOperations + :ivar mhsm_private_link_resources: MHSMPrivateLinkResourcesOperations operations + :vartype mhsm_private_link_resources: azure.mgmt.keyvault.v2021_06_01_preview.aio.operations.MHSMPrivateLinkResourcesOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.keyvault.v2021_06_01_preview.aio.operations.Operations + :ivar secrets: SecretsOperations operations + :vartype secrets: azure.mgmt.keyvault.v2021_06_01_preview.aio.operations.SecretsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = KeyVaultManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.keys = KeysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vaults = VaultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_resources = PrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.managed_hsms = ManagedHsmsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.mhsm_private_endpoint_connections = MHSMPrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.mhsm_private_link_resources = MHSMPrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.secrets = SecretsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "KeyVaultManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/__init__.py new file mode 100644 index 000000000000..8e1d8528d945 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/__init__.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._keys_operations import KeysOperations +from ._vaults_operations import VaultsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._managed_hsms_operations import ManagedHsmsOperations +from ._mhsm_private_endpoint_connections_operations import MHSMPrivateEndpointConnectionsOperations +from ._mhsm_private_link_resources_operations import MHSMPrivateLinkResourcesOperations +from ._operations import Operations +from ._secrets_operations import SecretsOperations + +__all__ = [ + 'KeysOperations', + 'VaultsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'ManagedHsmsOperations', + 'MHSMPrivateEndpointConnectionsOperations', + 'MHSMPrivateLinkResourcesOperations', + 'Operations', + 'SecretsOperations', +] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_keys_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_keys_operations.py new file mode 100644 index 000000000000..a445eefaa21d --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_keys_operations.py @@ -0,0 +1,399 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class KeysOperations: + """KeysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_if_not_exist( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + parameters: "_models.KeyCreateParameters", + **kwargs: Any + ) -> "_models.Key": + """Creates the first version of a new key if it does not exist. If it already exists, then the + existing key is returned without any write operations being performed. This API does not create + subsequent versions, and does not update existing keys. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the key vault which contains the key to be created. + :type vault_name: str + :param key_name: The name of the key to be created. + :type key_name: str + :param parameters: The parameters used to create the specified key. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_if_not_exist.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'KeyCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_if_not_exist.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + **kwargs: Any + ) -> "_models.Key": + """Gets the current version of the specified key from the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key to be retrieved. + :type vault_name: str + :param key_name: The name of the key to be retrieved. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore + + def list( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.KeyListResult"]: + """Lists the keys in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the keys to be retrieved. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('KeyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys'} # type: ignore + + async def get_version( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + key_version: str, + **kwargs: Any + ) -> "_models.Key": + """Gets the specified version of the specified key in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key version to be retrieved. + :type vault_name: str + :param key_name: The name of the key version to be retrieved. + :type key_name: str + :param key_version: The version of the key to be retrieved. + :type key_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_version.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + 'keyVersion': self._serialize.url("key_version", key_version, 'str', pattern=r'^[a-fA-F0-9]{32}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions/{keyVersion}'} # type: ignore + + def list_versions( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.KeyListResult"]: + """Lists the versions of the specified key in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key versions to be retrieved. + :type vault_name: str + :param key_name: The name of the key versions to be retrieved. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('KeyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_managed_hsms_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_managed_hsms_operations.py new file mode 100644 index 000000000000..641a2f941560 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_managed_hsms_operations.py @@ -0,0 +1,858 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagedHsmsOperations: + """ManagedHsmsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + name: str, + parameters: "_models.ManagedHsm", + **kwargs: Any + ) -> "_models.ManagedHsm": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedHsm') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + name: str, + parameters: "_models.ManagedHsm", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedHsm"]: + """Create or update a managed HSM Pool in the specified subscription. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param parameters: Parameters to create or update the managed HSM Pool. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedHsm or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + name: str, + parameters: "_models.ManagedHsm", + **kwargs: Any + ) -> "_models.ManagedHsm": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedHsm') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + name: str, + parameters: "_models.ManagedHsm", + **kwargs: Any + ) -> AsyncLROPoller["_models.ManagedHsm"]: + """Update a managed HSM Pool in the specified subscription. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param parameters: Parameters to patch the managed HSM Pool. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ManagedHsm or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + name=name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified managed HSM Pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: The name of the managed HSM Pool to delete. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + async def get( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> Optional["_models.ManagedHsm"]: + """Gets the specified managed HSM Pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: The name of the managed HSM Pool. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedHsm, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ManagedHsm"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedHsmListResult"]: + """The List operation gets information about the managed HSM Pools associated with the + subscription and within the specified resource group. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param top: Maximum number of results to return. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedHsmListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsmListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedHsmListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs'} # type: ignore + + def list_by_subscription( + self, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ManagedHsmListResult"]: + """The List operation gets information about the managed HSM Pools associated with the + subscription. + + :param top: Maximum number of results to return. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedHsmListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsmListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedHsmListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/managedHSMs'} # type: ignore + + def list_deleted( + self, + **kwargs: Any + ) -> AsyncIterable["_models.DeletedManagedHsmListResult"]: + """The List operation gets information about the deleted managed HSMs associated with the + subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeletedManagedHsmListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedManagedHsmListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedManagedHsmListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_deleted.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DeletedManagedHsmListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedManagedHSMs'} # type: ignore + + async def get_deleted( + self, + name: str, + location: str, + **kwargs: Any + ) -> "_models.DeletedManagedHsm": + """Gets the specified deleted managed HSM. + + :param name: The name of the deleted managed HSM. + :type name: str + :param location: The location of the deleted managed HSM. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeletedManagedHsm, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedManagedHsm + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedManagedHsm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_deleted.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeletedManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}'} # type: ignore + + async def _purge_deleted_initial( + self, + name: str, + location: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._purge_deleted_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _purge_deleted_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}/purge'} # type: ignore + + async def begin_purge_deleted( + self, + name: str, + location: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Permanently deletes the specified managed HSM. + + :param name: The name of the soft-deleted managed HSM. + :type name: str + :param location: The location of the soft-deleted managed HSM. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._purge_deleted_initial( + name=name, + location=location, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_purge_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}/purge'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_mhsm_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_mhsm_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..17458b7c0a48 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_mhsm_private_endpoint_connections_operations.py @@ -0,0 +1,387 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MHSMPrivateEndpointConnectionsOperations: + """MHSMPrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> AsyncIterable["_models.MHSMPrivateEndpointConnectionsListResult"]: + """The List operation gets information about the private endpoint connections associated with the + managed HSM Pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MHSMPrivateEndpointConnectionsListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnectionsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateEndpointConnectionsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MHSMPrivateEndpointConnectionsListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> "_models.MHSMPrivateEndpointConnection": + """Gets the specified private endpoint connection associated with the managed HSM Pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the managed hsm pool. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MHSMPrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MHSMPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def put( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + properties: "_models.MHSMPrivateEndpointConnection", + **kwargs: Any + ) -> "_models.MHSMPrivateEndpointConnection": + """Updates the specified private endpoint connection associated with the managed hsm pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the managed hsm pool. + :type private_endpoint_connection_name: str + :param properties: The intended state of private endpoint connection. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MHSMPrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'MHSMPrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('MHSMPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> Optional["_models.MHSMPrivateEndpointConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MHSMPrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MHSMPrivateEndpointConnection', pipeline_response) + + if response.status_code == 202: + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.MHSMPrivateEndpointConnection"]: + """Deletes the specified private endpoint connection associated with the managed hsm pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the managed hsm pool. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either MHSMPrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MHSMPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_mhsm_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_mhsm_private_link_resources_operations.py new file mode 100644 index 000000000000..04d230f58783 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_mhsm_private_link_resources_operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MHSMPrivateLinkResourcesOperations: + """MHSMPrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_by_mhsm_resource( + self, + resource_group_name: str, + name: str, + **kwargs: Any + ) -> "_models.MHSMPrivateLinkResourceListResult": + """Gets the private link resources supported for the managed hsm pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MHSMPrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_mhsm_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MHSMPrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_mhsm_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateLinkResources'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_operations.py similarity index 93% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_operations.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_operations.py index 9905df872f1d..79cd2937801c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_operations.py @@ -26,7 +26,7 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,11 +45,11 @@ def list( self, **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: - """Lists all of the available Network Rest API operations. + """Lists all of the available Key Vault Rest API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.OperationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -101,4 +101,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.Network/operations'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.KeyVault/operations'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..c614bcaf6530 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,387 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> Optional["_models.PrivateEndpointConnection"]: + """Gets the specified private endpoint connection associated with the key vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the key vault. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def put( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + properties: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Updates the specified private endpoint connection associated with the key vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the key vault. + :type private_endpoint_connection_name: str + :param properties: The intended state of private endpoint connection. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> Optional["_models.PrivateEndpointConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if response.status_code == 202: + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + vault_name: str, + private_endpoint_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: + """Deletes the specified private endpoint connection associated with the key vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the key vault. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + vault_name=vault_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def list_by_resource( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """The List operation gets information about the private endpoint connections associated with the + vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..95d13af7f369 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_by_vault( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourceListResult": + """Gets the private link resources supported for the key vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_vault.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_vault.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateLinkResources'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_secrets_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_secrets_operations.py new file mode 100644 index 000000000000..252c5d2d17d7 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_secrets_operations.py @@ -0,0 +1,338 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SecretsOperations: + """SecretsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_or_update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: "_models.SecretCreateOrUpdateParameters", + **kwargs: Any + ) -> "_models.Secret": + """Create or update a secret in a key vault in the specified subscription. NOTE: This API is + intended for internal use in ARM deployments. Users should use the data-plane REST service for + interaction with vault secrets. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: Name of the vault. + :type vault_name: str + :param secret_name: Name of the secret. + :type secret_name: str + :param parameters: Parameters to create or update the secret. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretCreateOrUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Secret, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Secret + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Secret"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'secretName': self._serialize.url("secret_name", secret_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SecretCreateOrUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Secret', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Secret', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + parameters: "_models.SecretPatchParameters", + **kwargs: Any + ) -> "_models.Secret": + """Update a secret in the specified subscription. NOTE: This API is intended for internal use in + ARM deployments. Users should use the data-plane REST service for interaction with vault + secrets. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: Name of the vault. + :type vault_name: str + :param secret_name: Name of the secret. + :type secret_name: str + :param parameters: Parameters to patch the secret. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretPatchParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Secret, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Secret + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Secret"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'secretName': self._serialize.url("secret_name", secret_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SecretPatchParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Secret', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Secret', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + vault_name: str, + secret_name: str, + **kwargs: Any + ) -> "_models.Secret": + """Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. + Users should use the data-plane REST service for interaction with vault secrets. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: The name of the vault. + :type vault_name: str + :param secret_name: The name of the secret. + :type secret_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Secret, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Secret + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Secret"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'secretName': self._serialize.url("secret_name", secret_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Secret', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + + def list( + self, + resource_group_name: str, + vault_name: str, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.SecretListResult"]: + """The List operation gets information about the secrets in a vault. NOTE: This API is intended + for internal use in ARM deployments. Users should use the data-plane REST service for + interaction with vault secrets. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: The name of the vault. + :type vault_name: str + :param top: Maximum number of results to return. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecretListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SecretListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_public_ip_addresses_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_vaults_operations.py similarity index 58% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_public_ip_addresses_operations.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_vaults_operations.py index 9dd62b46699b..42138478bb6a 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_public_ip_addresses_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/aio/operations/_vaults_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PublicIPAddressesOperations: - """PublicIPAddressesOperations async operations. +class VaultsOperations: + """VaultsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,24 +43,27 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def _create_or_update_initial( self, resource_group_name: str, - public_ip_address_name: str, + vault_name: str, + parameters: "_models.VaultCreateOrUpdateParameters", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.Vault": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,53 +74,69 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('Vault', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Vault', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, - public_ip_address_name: str, + vault_name: str, + parameters: "_models.VaultCreateOrUpdateParameters", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified public IP address. + ) -> AsyncLROPoller["_models.Vault"]: + """Create or update a key vault in the specified subscription. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the Resource Group to which the server belongs. :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. - :type public_ip_address_name: str + :param vault_name: Name of the vault. + :type vault_name: str + :param parameters: Parameters to create or update the vault. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either Vault or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.Vault] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, + vault_name=vault_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -126,12 +145,15 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Vault', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -147,41 +169,42 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore - async def get( + async def update( self, resource_group_name: str, - public_ip_address_name: str, - expand: Optional[str] = None, + vault_name: str, + parameters: "_models.VaultPatchParameters", **kwargs: Any - ) -> "_models.PublicIPAddress": - """Gets the specified public IP address in a specified resource group. + ) -> "_models.Vault": + """Update a key vault in the specified subscription. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the Resource Group to which the server belongs. :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str + :param vault_name: Name of the vault. + :type vault_name: str + :param parameters: Parameters to patch the vault. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultPatchParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress + :return: Vault, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Vault :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -189,50 +212,65 @@ async def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VaultPatchParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PublicIPAddress', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('Vault', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Vault', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore - async def _create_or_update_initial( + async def delete( self, resource_group_name: str, - public_ip_address_name: str, - parameters: "_models.PublicIPAddress", + vault_name: str, **kwargs: Any - ) -> "_models.PublicIPAddress": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + ) -> None: + """Deletes the specified Azure key vault. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: The name of the vault to delete. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -243,124 +281,117 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PublicIPAddress') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore - async def begin_create_or_update( + async def get( self, resource_group_name: str, - public_ip_address_name: str, - parameters: "_models.PublicIPAddress", + vault_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.PublicIPAddress"]: - """Creates or updates a static or dynamic public IP address. + ) -> "_models.Vault": + """Gets the specified Azure key vault. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str - :param public_ip_address_name: The name of the public IP address. - :type public_ip_address_name: str - :param parameters: Parameters supplied to the create or update public IP address operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress + :param vault_name: The name of the vault. + :type vault_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.PublicIPAddress] - :raises ~azure.core.exceptions.HttpResponseError: + :return: Vault, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Vault + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } + url = self._client.format_url(url, **path_format_arguments) - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Vault', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) - async def _update_tags_initial( + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore + + async def update_access_policy( self, resource_group_name: str, - public_ip_address_name: str, - parameters: "_models.TagsObject", + vault_name: str, + operation_kind: Union[str, "_models.AccessPolicyUpdateKind"], + parameters: "_models.VaultAccessPolicyParameters", **kwargs: Any - ) -> "_models.PublicIPAddress": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + ) -> "_models.VaultAccessPolicyParameters": + """Update access policies in a key vault in the specified subscription. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: Name of the vault. + :type vault_name: str + :param operation_kind: Name of the operation. + :type operation_kind: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.AccessPolicyUpdateKind + :param parameters: Access policy to merge into the vault. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultAccessPolicyParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VaultAccessPolicyParameters, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultAccessPolicyParameters + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VaultAccessPolicyParameters"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_access_policy.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'operationKind': self._serialize.url("operation_kind", operation_kind, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -375,113 +406,53 @@ async def _update_tags_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') + body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PublicIPAddress', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('VaultAccessPolicyParameters', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VaultAccessPolicyParameters', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + update_access_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}'} # type: ignore - async def begin_update_tags( + def list_by_resource_group( self, resource_group_name: str, - public_ip_address_name: str, - parameters: "_models.TagsObject", + top: Optional[int] = None, **kwargs: Any - ) -> AsyncLROPoller["_models.PublicIPAddress"]: - """Updates public IP address tags. + ) -> AsyncIterable["_models.VaultListResult"]: + """The List operation gets information about the vaults associated with the subscription and + within the specified resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str - :param public_ip_address_name: The name of the public IP address. - :type public_ip_address_name: str - :param parameters: Parameters supplied to update public IP address tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.PublicIPAddress] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets all the public IP addresses in a subscription. - + :param top: Maximum number of results to return. + :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.PublicIPAddressListResult] + :return: An iterator like instance of either VaultListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VaultListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -490,13 +461,16 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) @@ -507,7 +481,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + deserialized = self._deserialize('VaultListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -528,29 +502,29 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults'} # type: ignore - def list( + def list_by_subscription( self, - resource_group_name: str, + top: Optional[int] = None, **kwargs: Any - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets all public IP addresses in a resource group. + ) -> AsyncIterable["_models.VaultListResult"]: + """The List operation gets information about the vaults associated with the subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str + :param top: Maximum number of results to return. + :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.PublicIPAddressListResult] + :return: An iterator like instance of either VaultListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VaultListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -559,14 +533,15 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_subscription.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) @@ -577,7 +552,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + deserialized = self._deserialize('VaultListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -598,32 +573,26 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/vaults'} # type: ignore - def list_virtual_machine_scale_set_public_ip_addresses( + def list_deleted( self, - resource_group_name: str, - virtual_machine_scale_set_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets information about all public IP addresses on a virtual machine scale set level. + ) -> AsyncIterable["_models.DeletedVaultListResult"]: + """Gets information about the deleted vaults in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.PublicIPAddressListResult] + :return: An iterator like instance of either DeletedVaultListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedVaultListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedVaultListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -632,10 +601,8 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_public_ip_addresses.metadata['url'] # type: ignore + url = self.list_deleted.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -651,7 +618,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + deserialized = self._deserialize('DeletedVaultListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -672,42 +639,196 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses'} # type: ignore + list_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedVaults'} # type: ignore - def list_virtual_machine_scale_set_vm_public_ip_addresses( + async def get_deleted( self, - resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, - network_interface_name: str, - ip_configuration_name: str, + vault_name: str, + location: str, **kwargs: Any - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets information about all public IP addresses in a virtual machine IP configuration in a - virtual machine scale set. + ) -> "_models.DeletedVault": + """Gets the deleted Azure key vault. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The network interface name. - :type network_interface_name: str - :param ip_configuration_name: The IP configuration name. - :type ip_configuration_name: str + :param vault_name: The name of the vault. + :type vault_name: str + :param location: The location of the deleted vault. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeletedVault, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedVault + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedVault"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_deleted.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeletedVault', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}'} # type: ignore + + async def _purge_deleted_initial( + self, + vault_name: str, + location: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._purge_deleted_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _purge_deleted_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'} # type: ignore + + async def begin_purge_deleted( + self, + vault_name: str, + location: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Permanently deletes the specified vault. aka Purges the deleted Azure key vault. + + :param vault_name: The name of the soft-deleted vault. + :type vault_name: str + :param location: The location of the soft-deleted vault. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._purge_deleted_initial( + vault_name=vault_name, + location=location, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_purge_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'} # type: ignore + + def list( + self, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ResourceListResult"]: + """The List operation gets information about the vaults associated with the subscription. + + :param top: Maximum number of results to return. + :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.PublicIPAddressListResult] + :return: An iterator like instance of either ResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.ResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + filter = "resourceType eq 'Microsoft.KeyVault/vaults'" + api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -716,18 +837,16 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_vm_public_ip_addresses.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) @@ -738,7 +857,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + deserialized = self._deserialize('ResourceListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -759,57 +878,34 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_vm_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} # type: ignore - async def get_virtual_machine_scale_set_public_ip_address( + async def check_name_availability( self, - resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, - network_interface_name: str, - ip_configuration_name: str, - public_ip_address_name: str, - expand: Optional[str] = None, + vault_name: "_models.VaultCheckNameAvailabilityParameters", **kwargs: Any - ) -> "_models.PublicIPAddress": - """Get the specified public IP address in a virtual machine scale set. + ) -> "_models.CheckNameAvailabilityResult": + """Checks that the vault name is valid and is not already in use. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the IP configuration. - :type ip_configuration_name: str - :param public_ip_address_name: The name of the public IP Address. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str + :param vault_name: The name of the vault. + :type vault_name: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultCheckNameAvailabilityParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.CheckNameAvailabilityResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_virtual_machine_scale_set_public_ip_address.metadata['url'] # type: ignore + url = self.check_name_availability.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -817,14 +913,16 @@ async def get_virtual_machine_scale_set_public_ip_address( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -832,10 +930,10 @@ async def get_virtual_machine_scale_set_public_ip_address( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PublicIPAddress', pipeline_response) + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_virtual_machine_scale_set_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/__init__.py new file mode 100644 index 000000000000..74d3e28d0abf --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/__init__.py @@ -0,0 +1,294 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AccessPolicyEntry + from ._models_py3 import Action + from ._models_py3 import Attributes + from ._models_py3 import CheckNameAvailabilityResult + from ._models_py3 import CloudErrorBody + from ._models_py3 import DeletedManagedHsm + from ._models_py3 import DeletedManagedHsmListResult + from ._models_py3 import DeletedManagedHsmProperties + from ._models_py3 import DeletedVault + from ._models_py3 import DeletedVaultListResult + from ._models_py3 import DeletedVaultProperties + from ._models_py3 import DimensionProperties + from ._models_py3 import Error + from ._models_py3 import IPRule + from ._models_py3 import Key + from ._models_py3 import KeyAttributes + from ._models_py3 import KeyCreateParameters + from ._models_py3 import KeyListResult + from ._models_py3 import KeyProperties + from ._models_py3 import KeyReleasePolicy + from ._models_py3 import KeyRotationPolicyAttributes + from ._models_py3 import LifetimeAction + from ._models_py3 import LogSpecification + from ._models_py3 import MHSMIPRule + from ._models_py3 import MHSMNetworkRuleSet + from ._models_py3 import MHSMPrivateEndpoint + from ._models_py3 import MHSMPrivateEndpointConnection + from ._models_py3 import MHSMPrivateEndpointConnectionItem + from ._models_py3 import MHSMPrivateEndpointConnectionsListResult + from ._models_py3 import MHSMPrivateLinkResource + from ._models_py3 import MHSMPrivateLinkResourceListResult + from ._models_py3 import MHSMPrivateLinkServiceConnectionState + from ._models_py3 import MHSMVirtualNetworkRule + from ._models_py3 import ManagedHsm + from ._models_py3 import ManagedHsmError + from ._models_py3 import ManagedHsmListResult + from ._models_py3 import ManagedHsmProperties + from ._models_py3 import ManagedHsmResource + from ._models_py3 import ManagedHsmSku + from ._models_py3 import MetricSpecification + from ._models_py3 import NetworkRuleSet + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult + from ._models_py3 import Permissions + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionItem + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import Resource + from ._models_py3 import ResourceListResult + from ._models_py3 import RotationPolicy + from ._models_py3 import Secret + from ._models_py3 import SecretAttributes + from ._models_py3 import SecretCreateOrUpdateParameters + from ._models_py3 import SecretListResult + from ._models_py3 import SecretPatchParameters + from ._models_py3 import SecretPatchProperties + from ._models_py3 import SecretProperties + from ._models_py3 import ServiceSpecification + from ._models_py3 import Sku + from ._models_py3 import SystemData + from ._models_py3 import Trigger + from ._models_py3 import Vault + from ._models_py3 import VaultAccessPolicyParameters + from ._models_py3 import VaultAccessPolicyProperties + from ._models_py3 import VaultCheckNameAvailabilityParameters + from ._models_py3 import VaultCreateOrUpdateParameters + from ._models_py3 import VaultListResult + from ._models_py3 import VaultPatchParameters + from ._models_py3 import VaultPatchProperties + from ._models_py3 import VaultProperties + from ._models_py3 import VirtualNetworkRule +except (SyntaxError, ImportError): + from ._models import AccessPolicyEntry # type: ignore + from ._models import Action # type: ignore + from ._models import Attributes # type: ignore + from ._models import CheckNameAvailabilityResult # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import DeletedManagedHsm # type: ignore + from ._models import DeletedManagedHsmListResult # type: ignore + from ._models import DeletedManagedHsmProperties # type: ignore + from ._models import DeletedVault # type: ignore + from ._models import DeletedVaultListResult # type: ignore + from ._models import DeletedVaultProperties # type: ignore + from ._models import DimensionProperties # type: ignore + from ._models import Error # type: ignore + from ._models import IPRule # type: ignore + from ._models import Key # type: ignore + from ._models import KeyAttributes # type: ignore + from ._models import KeyCreateParameters # type: ignore + from ._models import KeyListResult # type: ignore + from ._models import KeyProperties # type: ignore + from ._models import KeyReleasePolicy # type: ignore + from ._models import KeyRotationPolicyAttributes # type: ignore + from ._models import LifetimeAction # type: ignore + from ._models import LogSpecification # type: ignore + from ._models import MHSMIPRule # type: ignore + from ._models import MHSMNetworkRuleSet # type: ignore + from ._models import MHSMPrivateEndpoint # type: ignore + from ._models import MHSMPrivateEndpointConnection # type: ignore + from ._models import MHSMPrivateEndpointConnectionItem # type: ignore + from ._models import MHSMPrivateEndpointConnectionsListResult # type: ignore + from ._models import MHSMPrivateLinkResource # type: ignore + from ._models import MHSMPrivateLinkResourceListResult # type: ignore + from ._models import MHSMPrivateLinkServiceConnectionState # type: ignore + from ._models import MHSMVirtualNetworkRule # type: ignore + from ._models import ManagedHsm # type: ignore + from ._models import ManagedHsmError # type: ignore + from ._models import ManagedHsmListResult # type: ignore + from ._models import ManagedHsmProperties # type: ignore + from ._models import ManagedHsmResource # type: ignore + from ._models import ManagedHsmSku # type: ignore + from ._models import MetricSpecification # type: ignore + from ._models import NetworkRuleSet # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import Permissions # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionItem # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceListResult # type: ignore + from ._models import RotationPolicy # type: ignore + from ._models import Secret # type: ignore + from ._models import SecretAttributes # type: ignore + from ._models import SecretCreateOrUpdateParameters # type: ignore + from ._models import SecretListResult # type: ignore + from ._models import SecretPatchParameters # type: ignore + from ._models import SecretPatchProperties # type: ignore + from ._models import SecretProperties # type: ignore + from ._models import ServiceSpecification # type: ignore + from ._models import Sku # type: ignore + from ._models import SystemData # type: ignore + from ._models import Trigger # type: ignore + from ._models import Vault # type: ignore + from ._models import VaultAccessPolicyParameters # type: ignore + from ._models import VaultAccessPolicyProperties # type: ignore + from ._models import VaultCheckNameAvailabilityParameters # type: ignore + from ._models import VaultCreateOrUpdateParameters # type: ignore + from ._models import VaultListResult # type: ignore + from ._models import VaultPatchParameters # type: ignore + from ._models import VaultPatchProperties # type: ignore + from ._models import VaultProperties # type: ignore + from ._models import VirtualNetworkRule # type: ignore + +from ._key_vault_management_client_enums import ( + AccessPolicyUpdateKind, + ActionsRequired, + CertificatePermissions, + CreateMode, + DeletionRecoveryLevel, + IdentityType, + JsonWebKeyCurveName, + JsonWebKeyOperation, + JsonWebKeyType, + KeyPermissions, + KeyRotationPolicyActionType, + ManagedHsmSkuFamily, + ManagedHsmSkuName, + NetworkRuleAction, + NetworkRuleBypassOptions, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + ProvisioningState, + PublicNetworkAccess, + Reason, + SecretPermissions, + SkuFamily, + SkuName, + StoragePermissions, + VaultProvisioningState, +) + +__all__ = [ + 'AccessPolicyEntry', + 'Action', + 'Attributes', + 'CheckNameAvailabilityResult', + 'CloudErrorBody', + 'DeletedManagedHsm', + 'DeletedManagedHsmListResult', + 'DeletedManagedHsmProperties', + 'DeletedVault', + 'DeletedVaultListResult', + 'DeletedVaultProperties', + 'DimensionProperties', + 'Error', + 'IPRule', + 'Key', + 'KeyAttributes', + 'KeyCreateParameters', + 'KeyListResult', + 'KeyProperties', + 'KeyReleasePolicy', + 'KeyRotationPolicyAttributes', + 'LifetimeAction', + 'LogSpecification', + 'MHSMIPRule', + 'MHSMNetworkRuleSet', + 'MHSMPrivateEndpoint', + 'MHSMPrivateEndpointConnection', + 'MHSMPrivateEndpointConnectionItem', + 'MHSMPrivateEndpointConnectionsListResult', + 'MHSMPrivateLinkResource', + 'MHSMPrivateLinkResourceListResult', + 'MHSMPrivateLinkServiceConnectionState', + 'MHSMVirtualNetworkRule', + 'ManagedHsm', + 'ManagedHsmError', + 'ManagedHsmListResult', + 'ManagedHsmProperties', + 'ManagedHsmResource', + 'ManagedHsmSku', + 'MetricSpecification', + 'NetworkRuleSet', + 'Operation', + 'OperationDisplay', + 'OperationListResult', + 'Permissions', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionItem', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'Resource', + 'ResourceListResult', + 'RotationPolicy', + 'Secret', + 'SecretAttributes', + 'SecretCreateOrUpdateParameters', + 'SecretListResult', + 'SecretPatchParameters', + 'SecretPatchProperties', + 'SecretProperties', + 'ServiceSpecification', + 'Sku', + 'SystemData', + 'Trigger', + 'Vault', + 'VaultAccessPolicyParameters', + 'VaultAccessPolicyProperties', + 'VaultCheckNameAvailabilityParameters', + 'VaultCreateOrUpdateParameters', + 'VaultListResult', + 'VaultPatchParameters', + 'VaultPatchProperties', + 'VaultProperties', + 'VirtualNetworkRule', + 'AccessPolicyUpdateKind', + 'ActionsRequired', + 'CertificatePermissions', + 'CreateMode', + 'DeletionRecoveryLevel', + 'IdentityType', + 'JsonWebKeyCurveName', + 'JsonWebKeyOperation', + 'JsonWebKeyType', + 'KeyPermissions', + 'KeyRotationPolicyActionType', + 'ManagedHsmSkuFamily', + 'ManagedHsmSkuName', + 'NetworkRuleAction', + 'NetworkRuleBypassOptions', + 'PrivateEndpointConnectionProvisioningState', + 'PrivateEndpointServiceConnectionStatus', + 'ProvisioningState', + 'PublicNetworkAccess', + 'Reason', + 'SecretPermissions', + 'SkuFamily', + 'SkuName', + 'StoragePermissions', + 'VaultProvisioningState', +] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_key_vault_management_client_enums.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_key_vault_management_client_enums.py new file mode 100644 index 000000000000..afc294a5a4fe --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_key_vault_management_client_enums.py @@ -0,0 +1,285 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessPolicyUpdateKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ADD = "add" + REPLACE = "replace" + REMOVE = "remove" + +class ActionsRequired(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """A message indicating if changes on the service provider require any updates on the consumer. + """ + + NONE = "None" + +class CertificatePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ALL = "all" + GET = "get" + LIST = "list" + DELETE = "delete" + CREATE = "create" + IMPORT_ENUM = "import" + UPDATE = "update" + MANAGECONTACTS = "managecontacts" + GETISSUERS = "getissuers" + LISTISSUERS = "listissuers" + SETISSUERS = "setissuers" + DELETEISSUERS = "deleteissuers" + MANAGEISSUERS = "manageissuers" + RECOVER = "recover" + PURGE = "purge" + BACKUP = "backup" + RESTORE = "restore" + +class CreateMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The vault's create mode to indicate whether the vault need to be recovered or not. + """ + + RECOVER = "recover" + DEFAULT = "default" + +class DeletionRecoveryLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The deletion recovery level currently in effect for the object. If it contains 'Purgeable', + then the object can be permanently deleted by a privileged user; otherwise, only the system can + purge the object at the end of the retention interval. + """ + + PURGEABLE = "Purgeable" + RECOVERABLE_PURGEABLE = "Recoverable+Purgeable" + RECOVERABLE = "Recoverable" + RECOVERABLE_PROTECTED_SUBSCRIPTION = "Recoverable+ProtectedSubscription" + +class IdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class JsonWebKeyCurveName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The elliptic curve name. For valid values, see JsonWebKeyCurveName. + """ + + P256 = "P-256" + P384 = "P-384" + P521 = "P-521" + P256_K = "P-256K" + +class JsonWebKeyOperation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The permitted JSON web key operations of the key. For more information, see + JsonWebKeyOperation. + """ + + ENCRYPT = "encrypt" + DECRYPT = "decrypt" + SIGN = "sign" + VERIFY = "verify" + WRAP_KEY = "wrapKey" + UNWRAP_KEY = "unwrapKey" + IMPORT_ENUM = "import" + RELEASE = "release" + +class JsonWebKeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the key. For valid values, see JsonWebKeyType. + """ + + EC = "EC" + EC_HSM = "EC-HSM" + RSA = "RSA" + RSA_HSM = "RSA-HSM" + +class KeyPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ALL = "all" + ENCRYPT = "encrypt" + DECRYPT = "decrypt" + WRAP_KEY = "wrapKey" + UNWRAP_KEY = "unwrapKey" + SIGN = "sign" + VERIFY = "verify" + GET = "get" + LIST = "list" + CREATE = "create" + UPDATE = "update" + IMPORT_ENUM = "import" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" + ROTATE = "rotate" + GETROTATIONPOLICY = "getrotationpolicy" + SETROTATIONPOLICY = "setrotationpolicy" + RELEASE = "release" + +class KeyRotationPolicyActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of action. + """ + + ROTATE = "rotate" + NOTIFY = "notify" + +class ManagedHsmSkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU Family of the managed HSM Pool + """ + + B = "B" + +class ManagedHsmSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU of the managed HSM Pool + """ + + STANDARD_B1 = "Standard_B1" + CUSTOM_B32 = "Custom_B32" + +class NetworkRuleAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The default action when no rule from ipRules and from virtualNetworkRules match. This is only + used after the bypass property has been evaluated. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class NetworkRuleBypassOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not + specified the default is 'AzureServices'. + """ + + AZURE_SERVICES = "AzureServices" + NONE = "None" + +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + DISCONNECTED = "Disconnected" + +class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private endpoint connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state. + """ + + #: The managed HSM Pool has been full provisioned. + SUCCEEDED = "Succeeded" + #: The managed HSM Pool is currently being provisioned. + PROVISIONING = "Provisioning" + #: Provisioning of the managed HSM Pool has failed. + FAILED = "Failed" + #: The managed HSM Pool is currently being updated. + UPDATING = "Updating" + #: The managed HSM Pool is currently being deleted. + DELETING = "Deleting" + #: The managed HSM pool is ready for normal use. + ACTIVATED = "Activated" + #: The managed HSM pool is waiting for a security domain restore action. + SECURITY_DOMAIN_RESTORE = "SecurityDomainRestore" + #: The managed HSM pool is being restored from full HSM backup. + RESTORING = "Restoring" + +class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Control permission for data plane traffic coming from public networks while private endpoint is + enabled. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class Reason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The reason that a vault name could not be used. The Reason element is only returned if + NameAvailable is false. + """ + + ACCOUNT_NAME_INVALID = "AccountNameInvalid" + ALREADY_EXISTS = "AlreadyExists" + +class SecretPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ALL = "all" + GET = "get" + LIST = "list" + SET = "set" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" + +class SkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU family name + """ + + A = "A" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU name to specify whether the key vault is a standard vault or a premium vault. + """ + + STANDARD = "standard" + PREMIUM = "premium" + +class StoragePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ALL = "all" + GET = "get" + LIST = "list" + DELETE = "delete" + SET = "set" + UPDATE = "update" + REGENERATEKEY = "regeneratekey" + RECOVER = "recover" + PURGE = "purge" + BACKUP = "backup" + RESTORE = "restore" + SETSAS = "setsas" + LISTSAS = "listsas" + GETSAS = "getsas" + DELETESAS = "deletesas" + +class VaultProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the vault. + """ + + SUCCEEDED = "Succeeded" + REGISTERING_DNS = "RegisteringDns" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_models.py new file mode 100644 index 000000000000..e45a2139da24 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_models.py @@ -0,0 +1,2859 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AccessPolicyEntry(msrest.serialization.Model): + """An identity that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID. + + All required parameters must be populated in order to send to Azure. + + :param tenant_id: Required. The Azure Active Directory tenant ID that should be used for + authenticating requests to the key vault. + :type tenant_id: str + :param object_id: Required. The object ID of a user, service principal or security group in the + Azure Active Directory tenant for the vault. The object ID must be unique for the list of + access policies. + :type object_id: str + :param application_id: Application ID of the client making request on behalf of a principal. + :type application_id: str + :param permissions: Required. Permissions the identity has for keys, secrets and certificates. + :type permissions: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Permissions + """ + + _validation = { + 'tenant_id': {'required': True}, + 'object_id': {'required': True}, + 'permissions': {'required': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'Permissions'}, + } + + def __init__( + self, + **kwargs + ): + super(AccessPolicyEntry, self).__init__(**kwargs) + self.tenant_id = kwargs['tenant_id'] + self.object_id = kwargs['object_id'] + self.application_id = kwargs.get('application_id', None) + self.permissions = kwargs['permissions'] + + +class Action(msrest.serialization.Model): + """Action. + + :param type: The type of action. Possible values include: "rotate", "notify". + :type type: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyRotationPolicyActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Action, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + + +class Attributes(msrest.serialization.Model): + """The object attributes managed by the KeyVault service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether the object is enabled. + :type enabled: bool + :param not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :type not_before: ~datetime.datetime + :param expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :type expires: ~datetime.datetime + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: ~datetime.datetime + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: ~datetime.datetime + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'unix-time'}, + 'expires': {'key': 'exp', 'type': 'unix-time'}, + 'created': {'key': 'created', 'type': 'unix-time'}, + 'updated': {'key': 'updated', 'type': 'unix-time'}, + } + + def __init__( + self, + **kwargs + ): + super(Attributes, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.not_before = kwargs.get('not_before', None) + self.expires = kwargs.get('expires', None) + self.created = None + self.updated = None + + +class CheckNameAvailabilityResult(msrest.serialization.Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name_available: A boolean value that indicates whether the name is available for you to + use. If true, the name is available. If false, the name has already been taken or is invalid + and cannot be used. + :vartype name_available: bool + :ivar reason: The reason that a vault name could not be used. The Reason element is only + returned if NameAvailable is false. Possible values include: "AccountNameInvalid", + "AlreadyExists". + :vartype reason: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.Reason + :ivar message: An error message explaining the Reason value in more detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from Key Vault resource provider. + + :param code: Error code. This is a mnemonic that can be consumed programmatically. + :type code: str + :param message: User friendly error message. The message is typically localized and may vary + with service version. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class DeletedManagedHsm(msrest.serialization.Model): + """DeletedManagedHsm. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the deleted managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param properties: Properties of the deleted managed HSM. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedManagedHsmProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeletedManagedHsmProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedManagedHsm, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class DeletedManagedHsmListResult(msrest.serialization.Model): + """List of deleted managed HSM Pools. + + :param value: The list of deleted managed HSM Pools. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedManagedHsm] + :param next_link: The URL to get the next set of deleted managed HSM Pools. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedManagedHsm]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedManagedHsmListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class DeletedManagedHsmProperties(msrest.serialization.Model): + """Properties of the deleted managed HSM. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar mhsm_id: The resource id of the original managed HSM. + :vartype mhsm_id: str + :ivar location: The location of the original managed HSM. + :vartype location: str + :ivar deletion_date: The deleted date. + :vartype deletion_date: ~datetime.datetime + :ivar scheduled_purge_date: The scheduled purged date. + :vartype scheduled_purge_date: ~datetime.datetime + :ivar purge_protection_enabled: Purge protection status of the original managed HSM. + :vartype purge_protection_enabled: bool + :ivar tags: A set of tags. Tags of the original managed HSM. + :vartype tags: dict[str, str] + """ + + _validation = { + 'mhsm_id': {'readonly': True}, + 'location': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'purge_protection_enabled': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'mhsm_id': {'key': 'mhsmId', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + 'purge_protection_enabled': {'key': 'purgeProtectionEnabled', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedManagedHsmProperties, self).__init__(**kwargs) + self.mhsm_id = None + self.location = None + self.deletion_date = None + self.scheduled_purge_date = None + self.purge_protection_enabled = None + self.tags = None + + +class DeletedVault(msrest.serialization.Model): + """Deleted vault information with extended details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID for the deleted key vault. + :vartype id: str + :ivar name: The name of the key vault. + :vartype name: str + :ivar type: The resource type of the key vault. + :vartype type: str + :param properties: Properties of the vault. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedVaultProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeletedVaultProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedVault, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = kwargs.get('properties', None) + + +class DeletedVaultListResult(msrest.serialization.Model): + """List of vaults. + + :param value: The list of deleted vaults. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedVault] + :param next_link: The URL to get the next set of deleted vaults. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedVault]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedVaultListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class DeletedVaultProperties(msrest.serialization.Model): + """Properties of the deleted vault. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vault_id: The resource id of the original vault. + :vartype vault_id: str + :ivar location: The location of the original vault. + :vartype location: str + :ivar deletion_date: The deleted date. + :vartype deletion_date: ~datetime.datetime + :ivar scheduled_purge_date: The scheduled purged date. + :vartype scheduled_purge_date: ~datetime.datetime + :ivar tags: A set of tags. Tags of the original vault. + :vartype tags: dict[str, str] + :ivar purge_protection_enabled: Purge protection status of the original vault. + :vartype purge_protection_enabled: bool + """ + + _validation = { + 'vault_id': {'readonly': True}, + 'location': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'tags': {'readonly': True}, + 'purge_protection_enabled': {'readonly': True}, + } + + _attribute_map = { + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'purge_protection_enabled': {'key': 'purgeProtectionEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedVaultProperties, self).__init__(**kwargs) + self.vault_id = None + self.location = None + self.deletion_date = None + self.scheduled_purge_date = None + self.tags = None + self.purge_protection_enabled = None + + +class DimensionProperties(msrest.serialization.Model): + """Type of operation: get, read, delete, etc. + + :param name: Name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Property to specify whether the dimension should be exported + for Shoebox. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DimensionProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + +class Error(msrest.serialization.Model): + """The server error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar inner_error: The inner error, contains a more specific error code. + :vartype inner_error: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Error + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'inner_error': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'inner_error': {'key': 'innererror', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = None + self.message = None + self.inner_error = None + + +class IPRule(msrest.serialization.Model): + """A rule governing the accessibility of a vault from a specific ip address or ip range. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple + IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78). + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IPRule, self).__init__(**kwargs) + self.value = kwargs['value'] + + +class Resource(msrest.serialization.Model): + """Key Vault resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None + + +class Key(Resource): + """The key resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :param attributes: The attributes of the key. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyAttributes + :param kty: The type of the key. For valid values, see JsonWebKeyType. Possible values include: + "EC", "EC-HSM", "RSA", "RSA-HSM". + :type kty: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyType + :param key_ops: + :type key_ops: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyOperation] + :param key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. + :type key_size: int + :param curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible + values include: "P-256", "P-384", "P-521", "P-256K". + :type curve_name: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyCurveName + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + :param rotation_policy: Key rotation policy in response. It will be used for both output and + input. Omitted if empty. + :type rotation_policy: ~azure.mgmt.keyvault.v2021_06_01_preview.models.RotationPolicy + :param release_policy: Key release policy in response. It will be used for both output and + input. Omitted if empty. + :type release_policy: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyReleasePolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'key_uri': {'readonly': True}, + 'key_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'attributes': {'key': 'properties.attributes', 'type': 'KeyAttributes'}, + 'kty': {'key': 'properties.kty', 'type': 'str'}, + 'key_ops': {'key': 'properties.keyOps', 'type': '[str]'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'curve_name': {'key': 'properties.curveName', 'type': 'str'}, + 'key_uri': {'key': 'properties.keyUri', 'type': 'str'}, + 'key_uri_with_version': {'key': 'properties.keyUriWithVersion', 'type': 'str'}, + 'rotation_policy': {'key': 'properties.rotationPolicy', 'type': 'RotationPolicy'}, + 'release_policy': {'key': 'properties.release_policy', 'type': 'KeyReleasePolicy'}, + } + + def __init__( + self, + **kwargs + ): + super(Key, self).__init__(**kwargs) + self.attributes = kwargs.get('attributes', None) + self.kty = kwargs.get('kty', None) + self.key_ops = kwargs.get('key_ops', None) + self.key_size = kwargs.get('key_size', None) + self.curve_name = kwargs.get('curve_name', None) + self.key_uri = None + self.key_uri_with_version = None + self.rotation_policy = kwargs.get('rotation_policy', None) + self.release_policy = kwargs.get('release_policy', None) + + +class KeyAttributes(msrest.serialization.Model): + """The object attributes managed by the Azure Key Vault service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether or not the object is enabled. + :type enabled: bool + :param not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :type not_before: long + :param expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :type expires: long + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: long + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: long + :ivar recovery_level: The deletion recovery level currently in effect for the object. If it + contains 'Purgeable', then the object can be permanently deleted by a privileged user; + otherwise, only the system can purge the object at the end of the retention interval. Possible + values include: "Purgeable", "Recoverable+Purgeable", "Recoverable", + "Recoverable+ProtectedSubscription". + :vartype recovery_level: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletionRecoveryLevel + :param exportable: Indicates if the private key can be exported. + :type exportable: bool + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + 'recovery_level': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'long'}, + 'expires': {'key': 'exp', 'type': 'long'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + 'recovery_level': {'key': 'recoveryLevel', 'type': 'str'}, + 'exportable': {'key': 'exportable', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyAttributes, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.not_before = kwargs.get('not_before', None) + self.expires = kwargs.get('expires', None) + self.created = None + self.updated = None + self.recovery_level = None + self.exportable = kwargs.get('exportable', None) + + +class KeyCreateParameters(msrest.serialization.Model): + """The parameters used to create a key. + + All required parameters must be populated in order to send to Azure. + + :param tags: A set of tags. The tags that will be assigned to the key. + :type tags: dict[str, str] + :param properties: Required. The properties of the key to be created. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'KeyProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyCreateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.properties = kwargs['properties'] + + +class KeyListResult(msrest.serialization.Model): + """The page of keys. + + :param value: The key resources. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Key] + :param next_link: The URL to get the next page of keys. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Key]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class KeyProperties(msrest.serialization.Model): + """The properties of the key. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param attributes: The attributes of the key. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyAttributes + :param kty: The type of the key. For valid values, see JsonWebKeyType. Possible values include: + "EC", "EC-HSM", "RSA", "RSA-HSM". + :type kty: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyType + :param key_ops: + :type key_ops: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyOperation] + :param key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. + :type key_size: int + :param curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible + values include: "P-256", "P-384", "P-521", "P-256K". + :type curve_name: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyCurveName + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + :param rotation_policy: Key rotation policy in response. It will be used for both output and + input. Omitted if empty. + :type rotation_policy: ~azure.mgmt.keyvault.v2021_06_01_preview.models.RotationPolicy + :param release_policy: Key release policy in response. It will be used for both output and + input. Omitted if empty. + :type release_policy: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyReleasePolicy + """ + + _validation = { + 'key_uri': {'readonly': True}, + 'key_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'attributes': {'key': 'attributes', 'type': 'KeyAttributes'}, + 'kty': {'key': 'kty', 'type': 'str'}, + 'key_ops': {'key': 'keyOps', 'type': '[str]'}, + 'key_size': {'key': 'keySize', 'type': 'int'}, + 'curve_name': {'key': 'curveName', 'type': 'str'}, + 'key_uri': {'key': 'keyUri', 'type': 'str'}, + 'key_uri_with_version': {'key': 'keyUriWithVersion', 'type': 'str'}, + 'rotation_policy': {'key': 'rotationPolicy', 'type': 'RotationPolicy'}, + 'release_policy': {'key': 'release_policy', 'type': 'KeyReleasePolicy'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyProperties, self).__init__(**kwargs) + self.attributes = kwargs.get('attributes', None) + self.kty = kwargs.get('kty', None) + self.key_ops = kwargs.get('key_ops', None) + self.key_size = kwargs.get('key_size', None) + self.curve_name = kwargs.get('curve_name', None) + self.key_uri = None + self.key_uri_with_version = None + self.rotation_policy = kwargs.get('rotation_policy', None) + self.release_policy = kwargs.get('release_policy', None) + + +class KeyReleasePolicy(msrest.serialization.Model): + """KeyReleasePolicy. + + :param content_type: Content type and version of key release policy. + :type content_type: str + :param data: Blob encoding the policy rules under which the key can be released. + :type data: bytes + """ + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'base64'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyReleasePolicy, self).__init__(**kwargs) + self.content_type = kwargs.get('content_type', "application/json; charset=utf-8") + self.data = kwargs.get('data', None) + + +class KeyRotationPolicyAttributes(msrest.serialization.Model): + """KeyRotationPolicyAttributes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: long + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: long + :param expiry_time: The expiration time for the new key version. It should be in ISO8601 + format. Eg: 'P90D', 'P1Y'. + :type expiry_time: str + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyRotationPolicyAttributes, self).__init__(**kwargs) + self.created = None + self.updated = None + self.expiry_time = kwargs.get('expiry_time', None) + + +class LifetimeAction(msrest.serialization.Model): + """LifetimeAction. + + :param trigger: The trigger of key rotation policy lifetimeAction. + :type trigger: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Trigger + :param action: The action of key rotation policy lifetimeAction. + :type action: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Action + """ + + _attribute_map = { + 'trigger': {'key': 'trigger', 'type': 'Trigger'}, + 'action': {'key': 'action', 'type': 'Action'}, + } + + def __init__( + self, + **kwargs + ): + super(LifetimeAction, self).__init__(**kwargs) + self.trigger = kwargs.get('trigger', None) + self.action = kwargs.get('action', None) + + +class LogSpecification(msrest.serialization.Model): + """Log specification of operation. + + :param name: Name of log specification. + :type name: str + :param display_name: Display name of log specification. + :type display_name: str + :param blob_duration: Blob duration of specification. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class ManagedHsmResource(msrest.serialization.Model): + """Managed HSM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param location: The supported Azure location where the managed HSM Pool should be created. + :type location: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSku + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the key vault + resource. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ManagedHsmSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedHsmResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.sku = kwargs.get('sku', None) + self.tags = kwargs.get('tags', None) + self.system_data = None + + +class ManagedHsm(ManagedHsmResource): + """Resource information with extended details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param location: The supported Azure location where the managed HSM Pool should be created. + :type location: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSku + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the key vault + resource. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + :param properties: Properties of the managed HSM. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ManagedHsmSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ManagedHsmProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedHsm, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ManagedHsmError(msrest.serialization.Model): + """The error exception. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: The server error. + :vartype error: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Error + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedHsmError, self).__init__(**kwargs) + self.error = None + + +class ManagedHsmListResult(msrest.serialization.Model): + """List of managed HSM Pools. + + :param value: The list of managed HSM Pools. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm] + :param next_link: The URL to get the next set of managed HSM Pools. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedHsm]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedHsmListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ManagedHsmProperties(msrest.serialization.Model): + """Properties of the managed HSM Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tenant_id: The Azure Active Directory tenant ID that should be used for authenticating + requests to the managed HSM pool. + :type tenant_id: str + :param initial_admin_object_ids: Array of initial administrators object ids for this managed + hsm pool. + :type initial_admin_object_ids: list[str] + :ivar hsm_uri: The URI of the managed hsm pool for performing operations on keys. + :vartype hsm_uri: str + :param enable_soft_delete: Property to specify whether the 'soft delete' functionality is + enabled for this managed HSM pool. If it's not set to any value(true or false) when creating + new managed HSM pool, it will be set to true by default. Once set to true, it cannot be + reverted to false. + :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It accepts >=7 and <=90. + :type soft_delete_retention_in_days: int + :param enable_purge_protection: Property specifying whether protection against purge is enabled + for this managed HSM pool. Setting this property to true activates protection against purge for + this managed HSM pool and its content - only the Managed HSM service may initiate a hard, + irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling + this functionality is irreversible. + :type enable_purge_protection: bool + :param create_mode: The create mode to indicate whether the resource is being created or is + being recovered from a deleted resource. Possible values include: "recover", "default". + :type create_mode: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.CreateMode + :ivar status_message: Resource Status Message. + :vartype status_message: str + :ivar provisioning_state: Provisioning state. Possible values include: "Succeeded", + "Provisioning", "Failed", "Updating", "Deleting", "Activated", "SecurityDomainRestore", + "Restoring". + :vartype provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.ProvisioningState + :param network_acls: Rules governing the accessibility of the key vault from specific network + locations. + :type network_acls: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMNetworkRuleSet + :ivar private_endpoint_connections: List of private endpoint connections associated with the + managed hsm pool. + :vartype private_endpoint_connections: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnectionItem] + :param public_network_access: Control permission for data plane traffic coming from public + networks while private endpoint is enabled. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PublicNetworkAccess + :ivar scheduled_purge_date: The scheduled purge date in UTC. + :vartype scheduled_purge_date: ~datetime.datetime + """ + + _validation = { + 'hsm_uri': {'readonly': True}, + 'status_message': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'initial_admin_object_ids': {'key': 'initialAdminObjectIds', 'type': '[str]'}, + 'hsm_uri': {'key': 'hsmUri', 'type': 'str'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'network_acls': {'key': 'networkAcls', 'type': 'MHSMNetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[MHSMPrivateEndpointConnectionItem]'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedHsmProperties, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.initial_admin_object_ids = kwargs.get('initial_admin_object_ids', None) + self.hsm_uri = None + self.enable_soft_delete = kwargs.get('enable_soft_delete', True) + self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', 90) + self.enable_purge_protection = kwargs.get('enable_purge_protection', True) + self.create_mode = kwargs.get('create_mode', None) + self.status_message = None + self.provisioning_state = None + self.network_acls = kwargs.get('network_acls', None) + self.private_endpoint_connections = None + self.public_network_access = kwargs.get('public_network_access', None) + self.scheduled_purge_date = None + + +class ManagedHsmSku(msrest.serialization.Model): + """SKU details. + + All required parameters must be populated in order to send to Azure. + + :param family: Required. SKU Family of the managed HSM Pool. Possible values include: "B". + :type family: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSkuFamily + :param name: Required. SKU of the managed HSM Pool. Possible values include: "Standard_B1", + "Custom_B32". + :type name: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSkuName + """ + + _validation = { + 'family': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'family': {'key': 'family', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedHsmSku, self).__init__(**kwargs) + self.family = kwargs.get('family', "B") + self.name = kwargs['name'] + + +class MetricSpecification(msrest.serialization.Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + :type unit: str + :param aggregation_type: The metric aggregation type. Possible values include: 'Average', + 'Count', 'Total'. + :type aggregation_type: str + :param supported_aggregation_types: The supported aggregation types for the metrics. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: The supported time grain types for the metrics. + :type supported_time_grain_types: list[str] + :param lock_aggregation_type: The metric lock aggregation type. + :type lock_aggregation_type: str + :param dimensions: The dimensions of metric. + :type dimensions: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.DimensionProperties] + :param fill_gap_with_zero: Property to specify whether to fill gap with zero. + :type fill_gap_with_zero: bool + :param internal_metric_name: The internal metric name. + :type internal_metric_name: str + """ + + _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]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } + + 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.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.lock_aggregation_type = kwargs.get('lock_aggregation_type', None) + self.dimensions = kwargs.get('dimensions', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.internal_metric_name = kwargs.get('internal_metric_name', None) + + +class MHSMIPRule(msrest.serialization.Model): + """A rule governing the accessibility of a managed hsm pool from a specific ip address or ip range. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple + IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78). + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMIPRule, self).__init__(**kwargs) + self.value = kwargs['value'] + + +class MHSMNetworkRuleSet(msrest.serialization.Model): + """A set of rules governing the network accessibility of a managed hsm pool. + + :param bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or + 'None'. If not specified the default is 'AzureServices'. Possible values include: + "AzureServices", "None". + :type bypass: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleBypassOptions + :param default_action: The default action when no rule from ipRules and from + virtualNetworkRules match. This is only used after the bypass property has been evaluated. + Possible values include: "Allow", "Deny". + :type default_action: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleAction + :param ip_rules: The list of IP address rules. + :type ip_rules: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMIPRule] + :param virtual_network_rules: The list of virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMVirtualNetworkRule] + """ + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'ip_rules': {'key': 'ipRules', 'type': '[MHSMIPRule]'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[MHSMVirtualNetworkRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMNetworkRuleSet, self).__init__(**kwargs) + self.bypass = kwargs.get('bypass', None) + self.default_action = kwargs.get('default_action', None) + self.ip_rules = kwargs.get('ip_rules', None) + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + + +class MHSMPrivateEndpoint(msrest.serialization.Model): + """Private endpoint object properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Full identifier of the private endpoint resource. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMPrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class MHSMPrivateEndpointConnection(ManagedHsmResource): + """Private endpoint connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param location: The supported Azure location where the managed HSM Pool should be created. + :type location: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSku + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the key vault + resource. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str + :param private_endpoint: Properties of the private endpoint object. + :type private_endpoint: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpoint + :param private_link_service_connection_state: Approval state of the private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateLinkServiceConnectionState + :param provisioning_state: Provisioning state of the private endpoint connection. Possible + values include: "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Disconnected". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ManagedHsmSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'MHSMPrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'MHSMPrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMPrivateEndpointConnection, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class MHSMPrivateEndpointConnectionItem(msrest.serialization.Model): + """Private endpoint connection item. + + :param private_endpoint: Properties of the private endpoint object. + :type private_endpoint: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpoint + :param private_link_service_connection_state: Approval state of the private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateLinkServiceConnectionState + :param provisioning_state: Provisioning state of the private endpoint connection. Possible + values include: "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Disconnected". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionProvisioningState + """ + + _attribute_map = { + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'MHSMPrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'MHSMPrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMPrivateEndpointConnectionItem, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class MHSMPrivateEndpointConnectionsListResult(msrest.serialization.Model): + """List of private endpoint connections associated with a managed HSM Pools. + + :param value: The private endpoint connection associated with a managed HSM Pools. + :type value: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection] + :param next_link: The URL to get the next set of managed HSM Pools. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MHSMPrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMPrivateEndpointConnectionsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class MHSMPrivateLinkResource(ManagedHsmResource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param location: The supported Azure location where the managed HSM Pool should be created. + :type location: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSku + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the key vault + resource. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + :ivar group_id: Group identifier of private link resource. + :vartype group_id: str + :ivar required_members: Required member names of private link resource. + :vartype required_members: list[str] + :param required_zone_names: Required DNS zone names of the the private link resource. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ManagedHsmSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMPrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class MHSMPrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MHSMPrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMPrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class MHSMPrivateLinkServiceConnectionState(msrest.serialization.Model): + """An object that represents the approval state of the private link connection. + + :param status: Indicates whether the connection has been approved, rejected or removed by the + key vault owner. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". + :type status: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval or rejection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. Possible values include: "None". + :type actions_required: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.ActionsRequired + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMPrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class MHSMVirtualNetworkRule(msrest.serialization.Model): + """A rule governing the accessibility of a managed hsm pool from a specific virtual network. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Full resource id of a vnet subnet, such as + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMVirtualNetworkRule, self).__init__(**kwargs) + self.id = kwargs['id'] + + +class NetworkRuleSet(msrest.serialization.Model): + """A set of rules governing the network accessibility of a vault. + + :param bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or + 'None'. If not specified the default is 'AzureServices'. Possible values include: + "AzureServices", "None". + :type bypass: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleBypassOptions + :param default_action: The default action when no rule from ipRules and from + virtualNetworkRules match. This is only used after the bypass property has been evaluated. + Possible values include: "Allow", "Deny". + :type default_action: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleAction + :param ip_rules: The list of IP address rules. + :type ip_rules: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.IPRule] + :param virtual_network_rules: The list of virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.VirtualNetworkRule] + """ + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.bypass = kwargs.get('bypass', None) + self.default_action = kwargs.get('default_action', None) + self.ip_rules = kwargs.get('ip_rules', None) + self.virtual_network_rules = kwargs.get('virtual_network_rules', None) + + +class Operation(msrest.serialization.Model): + """Key Vault REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.keyvault.v2021_06_01_preview.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param is_data_action: Property to specify whether the action is a data action. + :type is_data_action: bool + :param service_specification: One property of operation, include metric specifications. + :type service_specification: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Key Vault. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of results. + + :param value: List of Storage operations supported by the Storage resource provider. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Operation] + :param next_link: The URL to get the next set of operations. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class Permissions(msrest.serialization.Model): + """Permissions the identity has for keys, secrets, certificates and storage. + + :param keys: Permissions to keys. + :type keys: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyPermissions] + :param secrets: Permissions to secrets. + :type secrets: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretPermissions] + :param certificates: Permissions to certificates. + :type certificates: list[str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.CertificatePermissions] + :param storage: Permissions to storage accounts. + :type storage: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.StoragePermissions] + """ + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[str]'}, + 'secrets': {'key': 'secrets', 'type': '[str]'}, + 'certificates': {'key': 'certificates', 'type': '[str]'}, + 'storage': {'key': 'storage', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(Permissions, self).__init__(**kwargs) + self.keys = kwargs.get('keys', None) + self.secrets = kwargs.get('secrets', None) + self.certificates = kwargs.get('certificates', None) + self.storage = kwargs.get('storage', None) + + +class PrivateEndpoint(msrest.serialization.Model): + """Private endpoint object properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Full identifier of the private endpoint resource. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Resource): + """Private endpoint connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str + :param private_endpoint: Properties of the private endpoint object. + :type private_endpoint: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpoint + :param private_link_service_connection_state: Approval state of the private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateLinkServiceConnectionState + :param provisioning_state: Provisioning state of the private endpoint connection. Possible + values include: "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Disconnected". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class PrivateEndpointConnectionItem(msrest.serialization.Model): + """Private endpoint connection item. + + :param id: Id of private endpoint connection. + :type id: str + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str + :param private_endpoint: Properties of the private endpoint object. + :type private_endpoint: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpoint + :param private_link_service_connection_state: Approval state of the private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateLinkServiceConnectionState + :param provisioning_state: Provisioning state of the private endpoint connection. Possible + values include: "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Disconnected". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionProvisioningState + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionItem, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.etag = kwargs.get('etag', None) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connections. + + :param value: The list of private endpoint connections. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection] + :param next_link: The URL to get the next set of private endpoint connections. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :ivar group_id: Group identifier of private link resource. + :vartype group_id: str + :ivar required_members: Required member names of private link resource. + :vartype required_members: list[str] + :param required_zone_names: Required DNS zone names of the the private link resource. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """An object that represents the approval state of the private link connection. + + :param status: Indicates whether the connection has been approved, rejected or removed by the + key vault owner. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". + :type status: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval or rejection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. Possible values include: "None". + :type actions_required: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.ActionsRequired + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class ResourceListResult(msrest.serialization.Model): + """List of vault resources. + + :param value: The list of vault resources. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Resource] + :param next_link: The URL to get the next set of vault resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Resource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RotationPolicy(msrest.serialization.Model): + """RotationPolicy. + + :param attributes: The attributes of key rotation policy. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyRotationPolicyAttributes + :param lifetime_actions: The lifetimeActions for key rotation action. + :type lifetime_actions: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.LifetimeAction] + """ + + _attribute_map = { + 'attributes': {'key': 'attributes', 'type': 'KeyRotationPolicyAttributes'}, + 'lifetime_actions': {'key': 'lifetimeActions', 'type': '[LifetimeAction]'}, + } + + def __init__( + self, + **kwargs + ): + super(RotationPolicy, self).__init__(**kwargs) + self.attributes = kwargs.get('attributes', None) + self.lifetime_actions = kwargs.get('lifetime_actions', None) + + +class Secret(Resource): + """Resource information with extended details. + + 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. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :param properties: Required. Properties of the secret. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'SecretProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(Secret, self).__init__(**kwargs) + self.properties = kwargs['properties'] + + +class SecretAttributes(Attributes): + """The secret management attributes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether the object is enabled. + :type enabled: bool + :param not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :type not_before: ~datetime.datetime + :param expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :type expires: ~datetime.datetime + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: ~datetime.datetime + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: ~datetime.datetime + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'unix-time'}, + 'expires': {'key': 'exp', 'type': 'unix-time'}, + 'created': {'key': 'created', 'type': 'unix-time'}, + 'updated': {'key': 'updated', 'type': 'unix-time'}, + } + + def __init__( + self, + **kwargs + ): + super(SecretAttributes, self).__init__(**kwargs) + + +class SecretCreateOrUpdateParameters(msrest.serialization.Model): + """Parameters for creating or updating a secret. + + All required parameters must be populated in order to send to Azure. + + :param tags: A set of tags. The tags that will be assigned to the secret. + :type tags: dict[str, str] + :param properties: Required. Properties of the secret. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'SecretProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(SecretCreateOrUpdateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.properties = kwargs['properties'] + + +class SecretListResult(msrest.serialization.Model): + """List of secrets. + + :param value: The list of secrets. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Secret] + :param next_link: The URL to get the next set of secrets. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Secret]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecretListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SecretPatchParameters(msrest.serialization.Model): + """Parameters for patching a secret. + + :param tags: A set of tags. The tags that will be assigned to the secret. + :type tags: dict[str, str] + :param properties: Properties of the secret. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretPatchProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'SecretPatchProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(SecretPatchParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + + +class SecretPatchProperties(msrest.serialization.Model): + """Properties of the secret. + + :param value: The value of the secret. + :type value: str + :param content_type: The content type of the secret. + :type content_type: str + :param attributes: The attributes of the secret. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretAttributes + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'SecretAttributes'}, + } + + def __init__( + self, + **kwargs + ): + super(SecretPatchProperties, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.content_type = kwargs.get('content_type', None) + self.attributes = kwargs.get('attributes', None) + + +class SecretProperties(msrest.serialization.Model): + """Properties of the secret. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The value of the secret. NOTE: 'value' will never be returned from the service, + as APIs using this model are is intended for internal use in ARM deployments. Users should use + the data-plane REST service for interaction with vault secrets. + :type value: str + :param content_type: The content type of the secret. + :type content_type: str + :param attributes: The attributes of the secret. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretAttributes + :ivar secret_uri: The URI to retrieve the current version of the secret. + :vartype secret_uri: str + :ivar secret_uri_with_version: The URI to retrieve the specific version of the secret. + :vartype secret_uri_with_version: str + """ + + _validation = { + 'secret_uri': {'readonly': True}, + 'secret_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'SecretAttributes'}, + 'secret_uri': {'key': 'secretUri', 'type': 'str'}, + 'secret_uri_with_version': {'key': 'secretUriWithVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecretProperties, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.content_type = kwargs.get('content_type', None) + self.attributes = kwargs.get('attributes', None) + self.secret_uri = None + self.secret_uri_with_version = None + + +class ServiceSpecification(msrest.serialization.Model): + """One property of operation, include log specifications. + + :param log_specifications: Log specifications of operation. + :type log_specifications: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.LogSpecification] + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) + + +class Sku(msrest.serialization.Model): + """SKU details. + + All required parameters must be populated in order to send to Azure. + + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.SkuFamily + :param name: Required. SKU name to specify whether the key vault is a standard vault or a + premium vault. Possible values include: "standard", "premium". + :type name: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.SkuName + """ + + _validation = { + 'family': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'family': {'key': 'family', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.family = kwargs.get('family', "A") + self.name = kwargs['name'] + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the key vault resource. + + :param created_by: The identity that created the key vault resource. + :type created_by: str + :param created_by_type: The type of identity that created the key vault resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.IdentityType + :param created_at: The timestamp of the key vault resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the key vault resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the key vault resource. + Possible values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.IdentityType + :param last_modified_at: The timestamp of the key vault resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 Trigger(msrest.serialization.Model): + """Trigger. + + :param time_after_create: The time duration after key creation to rotate the key. It only + applies to rotate. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + :type time_after_create: str + :param time_before_expiry: The time duration before key expiring to rotate or notify. It will + be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + :type time_before_expiry: str + """ + + _attribute_map = { + 'time_after_create': {'key': 'timeAfterCreate', 'type': 'str'}, + 'time_before_expiry': {'key': 'timeBeforeExpiry', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Trigger, self).__init__(**kwargs) + self.time_after_create = kwargs.get('time_after_create', None) + self.time_before_expiry = kwargs.get('time_before_expiry', None) + + +class Vault(msrest.serialization.Model): + """Resource information with extended details. + + 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. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :param location: Azure location of the key vault resource. + :type location: str + :param tags: A set of tags. Tags assigned to the key vault resource. + :type tags: dict[str, str] + :ivar system_data: System metadata for the key vault. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + :param properties: Required. Properties of the vault. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(Vault, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.system_data = None + self.properties = kwargs['properties'] + + +class VaultAccessPolicyParameters(msrest.serialization.Model): + """Parameters for updating the access policy in a vault. + + 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. + + :ivar id: The resource id of the access policy. + :vartype id: str + :ivar name: The resource name of the access policy. + :vartype name: str + :ivar type: The resource name of the access policy. + :vartype type: str + :ivar location: The resource type of the access policy. + :vartype location: str + :param properties: Required. Properties of the access policy. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultAccessPolicyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VaultAccessPolicyProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(VaultAccessPolicyParameters, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.properties = kwargs['properties'] + + +class VaultAccessPolicyProperties(msrest.serialization.Model): + """Properties of the vault access policy. + + All required parameters must be populated in order to send to Azure. + + :param access_policies: Required. An array of 0 to 16 identities that have access to the key + vault. All identities in the array must use the same tenant ID as the key vault's tenant ID. + :type access_policies: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.AccessPolicyEntry] + """ + + _validation = { + 'access_policies': {'required': True}, + } + + _attribute_map = { + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + } + + def __init__( + self, + **kwargs + ): + super(VaultAccessPolicyProperties, self).__init__(**kwargs) + self.access_policies = kwargs['access_policies'] + + +class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): + """The parameters used to check the availability of the vault name. + + 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 name: Required. The vault name. + :type name: str + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: + "Microsoft.KeyVault/vaults". + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.KeyVault/vaults" + + def __init__( + self, + **kwargs + ): + super(VaultCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = kwargs['name'] + + +class VaultCreateOrUpdateParameters(msrest.serialization.Model): + """Parameters for creating or updating a vault. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The supported Azure location where the key vault should be created. + :type location: str + :param tags: A set of tags. The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Required. Properties of the vault. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultProperties + """ + + _validation = { + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(VaultCreateOrUpdateParameters, self).__init__(**kwargs) + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.properties = kwargs['properties'] + + +class VaultListResult(msrest.serialization.Model): + """List of vaults. + + :param value: The list of vaults. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Vault] + :param next_link: The URL to get the next set of vaults. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Vault]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VaultListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class VaultPatchParameters(msrest.serialization.Model): + """Parameters for creating or updating a vault. + + :param tags: A set of tags. The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Properties of the vault. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultPatchProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultPatchProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(VaultPatchParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) + + +class VaultPatchProperties(msrest.serialization.Model): + """Properties of the vault. + + :param tenant_id: The Azure Active Directory tenant ID that should be used for authenticating + requests to the key vault. + :type tenant_id: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Sku + :param access_policies: An array of 0 to 16 identities that have access to the key vault. All + identities in the array must use the same tenant ID as the key vault's tenant ID. + :type access_policies: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.AccessPolicyEntry] + :param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted + to retrieve certificates stored as secrets from the key vault. + :type enabled_for_deployment: bool + :param enabled_for_disk_encryption: Property to specify whether Azure Disk Encryption is + permitted to retrieve secrets from the vault and unwrap keys. + :type enabled_for_disk_encryption: bool + :param enabled_for_template_deployment: Property to specify whether Azure Resource Manager is + permitted to retrieve secrets from the key vault. + :type enabled_for_template_deployment: bool + :param enable_soft_delete: Property to specify whether the 'soft delete' functionality is + enabled for this key vault. Once set to true, it cannot be reverted to false. + :type enable_soft_delete: bool + :param enable_rbac_authorization: Property that controls how data actions are authorized. When + true, the key vault will use Role Based Access Control (RBAC) for authorization of data + actions, and the access policies specified in vault properties will be ignored (warning: this + is a preview feature). When false, the key vault will use the access policies specified in + vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or + not specified, the value of this property will not change. + :type enable_rbac_authorization: bool + :param soft_delete_retention_in_days: softDelete data retention days. It accepts >=7 and <=90. + :type soft_delete_retention_in_days: int + :param create_mode: The vault's create mode to indicate whether the vault need to be recovered + or not. Possible values include: "recover", "default". + :type create_mode: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.CreateMode + :param enable_purge_protection: Property specifying whether protection against purge is enabled + for this vault. Setting this property to true activates protection against purge for this vault + and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The + setting is effective only if soft delete is also enabled. Enabling this functionality is + irreversible - that is, the property does not accept false as its value. + :type enable_purge_protection: bool + :param network_acls: A collection of rules governing the accessibility of the vault from + specific network locations. + :type network_acls: ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleSet + :param public_network_access: Property to specify whether the vault will accept traffic from + public internet. If set to 'disabled' all traffic except private endpoint traffic and that that + originates from trusted services will be blocked. This will override the set firewall rules, + meaning that even if the firewall rules are present we will not honor the rules. + :type public_network_access: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, + 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, + 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VaultPatchProperties, self).__init__(**kwargs) + self.tenant_id = kwargs.get('tenant_id', None) + self.sku = kwargs.get('sku', None) + self.access_policies = kwargs.get('access_policies', None) + self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) + self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) + self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) + self.enable_soft_delete = kwargs.get('enable_soft_delete', None) + self.enable_rbac_authorization = kwargs.get('enable_rbac_authorization', None) + self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', None) + self.create_mode = kwargs.get('create_mode', None) + self.enable_purge_protection = kwargs.get('enable_purge_protection', None) + self.network_acls = kwargs.get('network_acls', None) + self.public_network_access = kwargs.get('public_network_access', None) + + +class VaultProperties(msrest.serialization.Model): + """Properties of the vault. + + 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 tenant_id: Required. The Azure Active Directory tenant ID that should be used for + authenticating requests to the key vault. + :type tenant_id: str + :param sku: Required. SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Sku + :param access_policies: An array of 0 to 1024 identities that have access to the key vault. All + identities in the array must use the same tenant ID as the key vault's tenant ID. When + ``createMode`` is set to ``recover``\ , access policies are not required. Otherwise, access + policies are required. + :type access_policies: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.AccessPolicyEntry] + :param vault_uri: The URI of the vault for performing operations on keys and secrets. + :type vault_uri: str + :ivar hsm_pool_resource_id: The resource id of HSM Pool. + :vartype hsm_pool_resource_id: str + :param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted + to retrieve certificates stored as secrets from the key vault. + :type enabled_for_deployment: bool + :param enabled_for_disk_encryption: Property to specify whether Azure Disk Encryption is + permitted to retrieve secrets from the vault and unwrap keys. + :type enabled_for_disk_encryption: bool + :param enabled_for_template_deployment: Property to specify whether Azure Resource Manager is + permitted to retrieve secrets from the key vault. + :type enabled_for_template_deployment: bool + :param enable_soft_delete: Property to specify whether the 'soft delete' functionality is + enabled for this key vault. If it's not set to any value(true or false) when creating new key + vault, it will be set to true by default. Once set to true, it cannot be reverted to false. + :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It accepts >=7 and <=90. + :type soft_delete_retention_in_days: int + :param enable_rbac_authorization: Property that controls how data actions are authorized. When + true, the key vault will use Role Based Access Control (RBAC) for authorization of data + actions, and the access policies specified in vault properties will be ignored (warning: this + is a preview feature). When false, the key vault will use the access policies specified in + vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or + not specified, the vault is created with the default value of false. Note that management + actions are always authorized with RBAC. + :type enable_rbac_authorization: bool + :param create_mode: The vault's create mode to indicate whether the vault need to be recovered + or not. Possible values include: "recover", "default". + :type create_mode: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.CreateMode + :param enable_purge_protection: Property specifying whether protection against purge is enabled + for this vault. Setting this property to true activates protection against purge for this vault + and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The + setting is effective only if soft delete is also enabled. Enabling this functionality is + irreversible - that is, the property does not accept false as its value. + :type enable_purge_protection: bool + :param network_acls: Rules governing the accessibility of the key vault from specific network + locations. + :type network_acls: ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleSet + :param provisioning_state: Provisioning state of the vault. Possible values include: + "Succeeded", "RegisteringDns". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultProvisioningState + :ivar private_endpoint_connections: List of private endpoint connections associated with the + key vault. + :vartype private_endpoint_connections: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionItem] + :param public_network_access: Property to specify whether the vault will accept traffic from + public internet. If set to 'disabled' all traffic except private endpoint traffic and that that + originates from trusted services will be blocked. This will override the set firewall rules, + meaning that even if the firewall rules are present we will not honor the rules. + :type public_network_access: str + """ + + _validation = { + 'tenant_id': {'required': True}, + 'sku': {'required': True}, + 'hsm_pool_resource_id': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'hsm_pool_resource_id': {'key': 'hsmPoolResourceId', 'type': 'str'}, + 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, + 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, + 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnectionItem]'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VaultProperties, self).__init__(**kwargs) + self.tenant_id = kwargs['tenant_id'] + self.sku = kwargs['sku'] + self.access_policies = kwargs.get('access_policies', None) + self.vault_uri = kwargs.get('vault_uri', None) + self.hsm_pool_resource_id = None + self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) + self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) + self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) + self.enable_soft_delete = kwargs.get('enable_soft_delete', True) + self.soft_delete_retention_in_days = kwargs.get('soft_delete_retention_in_days', 90) + self.enable_rbac_authorization = kwargs.get('enable_rbac_authorization', False) + self.create_mode = kwargs.get('create_mode', None) + self.enable_purge_protection = kwargs.get('enable_purge_protection', None) + self.network_acls = kwargs.get('network_acls', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.private_endpoint_connections = None + self.public_network_access = kwargs.get('public_network_access', "enabled") + + +class VirtualNetworkRule(msrest.serialization.Model): + """A rule governing the accessibility of a vault from a specific virtual network. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Full resource id of a vnet subnet, such as + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + :type id: str + :param ignore_missing_vnet_service_endpoint: Property to specify whether NRP will ignore the + check if parent subnet has serviceEndpoints configured. + :type ignore_missing_vnet_service_endpoint: bool + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = kwargs['id'] + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_models_py3.py new file mode 100644 index 000000000000..4817f3781450 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/models/_models_py3.py @@ -0,0 +1,3148 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._key_vault_management_client_enums import * + + +class AccessPolicyEntry(msrest.serialization.Model): + """An identity that have access to the key vault. All identities in the array must use the same tenant ID as the key vault's tenant ID. + + All required parameters must be populated in order to send to Azure. + + :param tenant_id: Required. The Azure Active Directory tenant ID that should be used for + authenticating requests to the key vault. + :type tenant_id: str + :param object_id: Required. The object ID of a user, service principal or security group in the + Azure Active Directory tenant for the vault. The object ID must be unique for the list of + access policies. + :type object_id: str + :param application_id: Application ID of the client making request on behalf of a principal. + :type application_id: str + :param permissions: Required. Permissions the identity has for keys, secrets and certificates. + :type permissions: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Permissions + """ + + _validation = { + 'tenant_id': {'required': True}, + 'object_id': {'required': True}, + 'permissions': {'required': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'application_id': {'key': 'applicationId', 'type': 'str'}, + 'permissions': {'key': 'permissions', 'type': 'Permissions'}, + } + + def __init__( + self, + *, + tenant_id: str, + object_id: str, + permissions: "Permissions", + application_id: Optional[str] = None, + **kwargs + ): + super(AccessPolicyEntry, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.object_id = object_id + self.application_id = application_id + self.permissions = permissions + + +class Action(msrest.serialization.Model): + """Action. + + :param type: The type of action. Possible values include: "rotate", "notify". + :type type: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyRotationPolicyActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "KeyRotationPolicyActionType"]] = None, + **kwargs + ): + super(Action, self).__init__(**kwargs) + self.type = type + + +class Attributes(msrest.serialization.Model): + """The object attributes managed by the KeyVault service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether the object is enabled. + :type enabled: bool + :param not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :type not_before: ~datetime.datetime + :param expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :type expires: ~datetime.datetime + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: ~datetime.datetime + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: ~datetime.datetime + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'unix-time'}, + 'expires': {'key': 'exp', 'type': 'unix-time'}, + 'created': {'key': 'created', 'type': 'unix-time'}, + 'updated': {'key': 'updated', 'type': 'unix-time'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + not_before: Optional[datetime.datetime] = None, + expires: Optional[datetime.datetime] = None, + **kwargs + ): + super(Attributes, self).__init__(**kwargs) + self.enabled = enabled + self.not_before = not_before + self.expires = expires + self.created = None + self.updated = None + + +class CheckNameAvailabilityResult(msrest.serialization.Model): + """The CheckNameAvailability operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name_available: A boolean value that indicates whether the name is available for you to + use. If true, the name is available. If false, the name has already been taken or is invalid + and cannot be used. + :vartype name_available: bool + :ivar reason: The reason that a vault name could not be used. The Reason element is only + returned if NameAvailable is false. Possible values include: "AccountNameInvalid", + "AlreadyExists". + :vartype reason: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.Reason + :ivar message: An error message explaining the Reason value in more detail. + :vartype message: str + """ + + _validation = { + 'name_available': {'readonly': True}, + 'reason': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'name_available': {'key': 'nameAvailable', 'type': 'bool'}, + 'reason': {'key': 'reason', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckNameAvailabilityResult, self).__init__(**kwargs) + self.name_available = None + self.reason = None + self.message = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from Key Vault resource provider. + + :param code: Error code. This is a mnemonic that can be consumed programmatically. + :type code: str + :param message: User friendly error message. The message is typically localized and may vary + with service version. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + + +class DeletedManagedHsm(msrest.serialization.Model): + """DeletedManagedHsm. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the deleted managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param properties: Properties of the deleted managed HSM. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedManagedHsmProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeletedManagedHsmProperties'}, + } + + def __init__( + self, + *, + properties: Optional["DeletedManagedHsmProperties"] = None, + **kwargs + ): + super(DeletedManagedHsm, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class DeletedManagedHsmListResult(msrest.serialization.Model): + """List of deleted managed HSM Pools. + + :param value: The list of deleted managed HSM Pools. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedManagedHsm] + :param next_link: The URL to get the next set of deleted managed HSM Pools. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedManagedHsm]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["DeletedManagedHsm"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(DeletedManagedHsmListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DeletedManagedHsmProperties(msrest.serialization.Model): + """Properties of the deleted managed HSM. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar mhsm_id: The resource id of the original managed HSM. + :vartype mhsm_id: str + :ivar location: The location of the original managed HSM. + :vartype location: str + :ivar deletion_date: The deleted date. + :vartype deletion_date: ~datetime.datetime + :ivar scheduled_purge_date: The scheduled purged date. + :vartype scheduled_purge_date: ~datetime.datetime + :ivar purge_protection_enabled: Purge protection status of the original managed HSM. + :vartype purge_protection_enabled: bool + :ivar tags: A set of tags. Tags of the original managed HSM. + :vartype tags: dict[str, str] + """ + + _validation = { + 'mhsm_id': {'readonly': True}, + 'location': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'purge_protection_enabled': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'mhsm_id': {'key': 'mhsmId', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + 'purge_protection_enabled': {'key': 'purgeProtectionEnabled', 'type': 'bool'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedManagedHsmProperties, self).__init__(**kwargs) + self.mhsm_id = None + self.location = None + self.deletion_date = None + self.scheduled_purge_date = None + self.purge_protection_enabled = None + self.tags = None + + +class DeletedVault(msrest.serialization.Model): + """Deleted vault information with extended details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource ID for the deleted key vault. + :vartype id: str + :ivar name: The name of the key vault. + :vartype name: str + :ivar type: The resource type of the key vault. + :vartype type: str + :param properties: Properties of the vault. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedVaultProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'DeletedVaultProperties'}, + } + + def __init__( + self, + *, + properties: Optional["DeletedVaultProperties"] = None, + **kwargs + ): + super(DeletedVault, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.properties = properties + + +class DeletedVaultListResult(msrest.serialization.Model): + """List of vaults. + + :param value: The list of deleted vaults. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedVault] + :param next_link: The URL to get the next set of deleted vaults. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DeletedVault]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["DeletedVault"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(DeletedVaultListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DeletedVaultProperties(msrest.serialization.Model): + """Properties of the deleted vault. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vault_id: The resource id of the original vault. + :vartype vault_id: str + :ivar location: The location of the original vault. + :vartype location: str + :ivar deletion_date: The deleted date. + :vartype deletion_date: ~datetime.datetime + :ivar scheduled_purge_date: The scheduled purged date. + :vartype scheduled_purge_date: ~datetime.datetime + :ivar tags: A set of tags. Tags of the original vault. + :vartype tags: dict[str, str] + :ivar purge_protection_enabled: Purge protection status of the original vault. + :vartype purge_protection_enabled: bool + """ + + _validation = { + 'vault_id': {'readonly': True}, + 'location': {'readonly': True}, + 'deletion_date': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + 'tags': {'readonly': True}, + 'purge_protection_enabled': {'readonly': True}, + } + + _attribute_map = { + 'vault_id': {'key': 'vaultId', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'deletion_date': {'key': 'deletionDate', 'type': 'iso-8601'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'purge_protection_enabled': {'key': 'purgeProtectionEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DeletedVaultProperties, self).__init__(**kwargs) + self.vault_id = None + self.location = None + self.deletion_date = None + self.scheduled_purge_date = None + self.tags = None + self.purge_protection_enabled = None + + +class DimensionProperties(msrest.serialization.Model): + """Type of operation: get, read, delete, etc. + + :param name: Name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Property to specify whether the dimension should be exported + for Shoebox. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + to_be_exported_for_shoebox: Optional[bool] = None, + **kwargs + ): + super(DimensionProperties, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + +class Error(msrest.serialization.Model): + """The server error. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar inner_error: The inner error, contains a more specific error code. + :vartype inner_error: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Error + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'inner_error': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'inner_error': {'key': 'innererror', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = None + self.message = None + self.inner_error = None + + +class IPRule(msrest.serialization.Model): + """A rule governing the accessibility of a vault from a specific ip address or ip range. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple + IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78). + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: str, + **kwargs + ): + super(IPRule, self).__init__(**kwargs) + self.value = value + + +class Resource(msrest.serialization.Model): + """Key Vault resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None + + +class Key(Resource): + """The key resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :param attributes: The attributes of the key. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyAttributes + :param kty: The type of the key. For valid values, see JsonWebKeyType. Possible values include: + "EC", "EC-HSM", "RSA", "RSA-HSM". + :type kty: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyType + :param key_ops: + :type key_ops: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyOperation] + :param key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. + :type key_size: int + :param curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible + values include: "P-256", "P-384", "P-521", "P-256K". + :type curve_name: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyCurveName + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + :param rotation_policy: Key rotation policy in response. It will be used for both output and + input. Omitted if empty. + :type rotation_policy: ~azure.mgmt.keyvault.v2021_06_01_preview.models.RotationPolicy + :param release_policy: Key release policy in response. It will be used for both output and + input. Omitted if empty. + :type release_policy: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyReleasePolicy + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'key_uri': {'readonly': True}, + 'key_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'attributes': {'key': 'properties.attributes', 'type': 'KeyAttributes'}, + 'kty': {'key': 'properties.kty', 'type': 'str'}, + 'key_ops': {'key': 'properties.keyOps', 'type': '[str]'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'curve_name': {'key': 'properties.curveName', 'type': 'str'}, + 'key_uri': {'key': 'properties.keyUri', 'type': 'str'}, + 'key_uri_with_version': {'key': 'properties.keyUriWithVersion', 'type': 'str'}, + 'rotation_policy': {'key': 'properties.rotationPolicy', 'type': 'RotationPolicy'}, + 'release_policy': {'key': 'properties.release_policy', 'type': 'KeyReleasePolicy'}, + } + + def __init__( + self, + *, + attributes: Optional["KeyAttributes"] = None, + kty: Optional[Union[str, "JsonWebKeyType"]] = None, + key_ops: Optional[List[Union[str, "JsonWebKeyOperation"]]] = None, + key_size: Optional[int] = None, + curve_name: Optional[Union[str, "JsonWebKeyCurveName"]] = None, + rotation_policy: Optional["RotationPolicy"] = None, + release_policy: Optional["KeyReleasePolicy"] = None, + **kwargs + ): + super(Key, self).__init__(**kwargs) + self.attributes = attributes + self.kty = kty + self.key_ops = key_ops + self.key_size = key_size + self.curve_name = curve_name + self.key_uri = None + self.key_uri_with_version = None + self.rotation_policy = rotation_policy + self.release_policy = release_policy + + +class KeyAttributes(msrest.serialization.Model): + """The object attributes managed by the Azure Key Vault service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether or not the object is enabled. + :type enabled: bool + :param not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :type not_before: long + :param expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :type expires: long + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: long + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: long + :ivar recovery_level: The deletion recovery level currently in effect for the object. If it + contains 'Purgeable', then the object can be permanently deleted by a privileged user; + otherwise, only the system can purge the object at the end of the retention interval. Possible + values include: "Purgeable", "Recoverable+Purgeable", "Recoverable", + "Recoverable+ProtectedSubscription". + :vartype recovery_level: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletionRecoveryLevel + :param exportable: Indicates if the private key can be exported. + :type exportable: bool + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + 'recovery_level': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'long'}, + 'expires': {'key': 'exp', 'type': 'long'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + 'recovery_level': {'key': 'recoveryLevel', 'type': 'str'}, + 'exportable': {'key': 'exportable', 'type': 'bool'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + not_before: Optional[int] = None, + expires: Optional[int] = None, + exportable: Optional[bool] = None, + **kwargs + ): + super(KeyAttributes, self).__init__(**kwargs) + self.enabled = enabled + self.not_before = not_before + self.expires = expires + self.created = None + self.updated = None + self.recovery_level = None + self.exportable = exportable + + +class KeyCreateParameters(msrest.serialization.Model): + """The parameters used to create a key. + + All required parameters must be populated in order to send to Azure. + + :param tags: A set of tags. The tags that will be assigned to the key. + :type tags: dict[str, str] + :param properties: Required. The properties of the key to be created. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'KeyProperties'}, + } + + def __init__( + self, + *, + properties: "KeyProperties", + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(KeyCreateParameters, self).__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class KeyListResult(msrest.serialization.Model): + """The page of keys. + + :param value: The key resources. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Key] + :param next_link: The URL to get the next page of keys. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Key]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Key"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(KeyListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class KeyProperties(msrest.serialization.Model): + """The properties of the key. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param attributes: The attributes of the key. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyAttributes + :param kty: The type of the key. For valid values, see JsonWebKeyType. Possible values include: + "EC", "EC-HSM", "RSA", "RSA-HSM". + :type kty: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyType + :param key_ops: + :type key_ops: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyOperation] + :param key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. + :type key_size: int + :param curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible + values include: "P-256", "P-384", "P-521", "P-256K". + :type curve_name: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.JsonWebKeyCurveName + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + :param rotation_policy: Key rotation policy in response. It will be used for both output and + input. Omitted if empty. + :type rotation_policy: ~azure.mgmt.keyvault.v2021_06_01_preview.models.RotationPolicy + :param release_policy: Key release policy in response. It will be used for both output and + input. Omitted if empty. + :type release_policy: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyReleasePolicy + """ + + _validation = { + 'key_uri': {'readonly': True}, + 'key_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'attributes': {'key': 'attributes', 'type': 'KeyAttributes'}, + 'kty': {'key': 'kty', 'type': 'str'}, + 'key_ops': {'key': 'keyOps', 'type': '[str]'}, + 'key_size': {'key': 'keySize', 'type': 'int'}, + 'curve_name': {'key': 'curveName', 'type': 'str'}, + 'key_uri': {'key': 'keyUri', 'type': 'str'}, + 'key_uri_with_version': {'key': 'keyUriWithVersion', 'type': 'str'}, + 'rotation_policy': {'key': 'rotationPolicy', 'type': 'RotationPolicy'}, + 'release_policy': {'key': 'release_policy', 'type': 'KeyReleasePolicy'}, + } + + def __init__( + self, + *, + attributes: Optional["KeyAttributes"] = None, + kty: Optional[Union[str, "JsonWebKeyType"]] = None, + key_ops: Optional[List[Union[str, "JsonWebKeyOperation"]]] = None, + key_size: Optional[int] = None, + curve_name: Optional[Union[str, "JsonWebKeyCurveName"]] = None, + rotation_policy: Optional["RotationPolicy"] = None, + release_policy: Optional["KeyReleasePolicy"] = None, + **kwargs + ): + super(KeyProperties, self).__init__(**kwargs) + self.attributes = attributes + self.kty = kty + self.key_ops = key_ops + self.key_size = key_size + self.curve_name = curve_name + self.key_uri = None + self.key_uri_with_version = None + self.rotation_policy = rotation_policy + self.release_policy = release_policy + + +class KeyReleasePolicy(msrest.serialization.Model): + """KeyReleasePolicy. + + :param content_type: Content type and version of key release policy. + :type content_type: str + :param data: Blob encoding the policy rules under which the key can be released. + :type data: bytes + """ + + _attribute_map = { + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'data': {'key': 'data', 'type': 'base64'}, + } + + def __init__( + self, + *, + content_type: Optional[str] = "application/json; charset=utf-8", + data: Optional[bytes] = None, + **kwargs + ): + super(KeyReleasePolicy, self).__init__(**kwargs) + self.content_type = content_type + self.data = data + + +class KeyRotationPolicyAttributes(msrest.serialization.Model): + """KeyRotationPolicyAttributes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: long + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: long + :param expiry_time: The expiration time for the new key version. It should be in ISO8601 + format. Eg: 'P90D', 'P1Y'. + :type expiry_time: str + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + 'expiry_time': {'key': 'expiryTime', 'type': 'str'}, + } + + def __init__( + self, + *, + expiry_time: Optional[str] = None, + **kwargs + ): + super(KeyRotationPolicyAttributes, self).__init__(**kwargs) + self.created = None + self.updated = None + self.expiry_time = expiry_time + + +class LifetimeAction(msrest.serialization.Model): + """LifetimeAction. + + :param trigger: The trigger of key rotation policy lifetimeAction. + :type trigger: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Trigger + :param action: The action of key rotation policy lifetimeAction. + :type action: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Action + """ + + _attribute_map = { + 'trigger': {'key': 'trigger', 'type': 'Trigger'}, + 'action': {'key': 'action', 'type': 'Action'}, + } + + def __init__( + self, + *, + trigger: Optional["Trigger"] = None, + action: Optional["Action"] = None, + **kwargs + ): + super(LifetimeAction, self).__init__(**kwargs) + self.trigger = trigger + self.action = action + + +class LogSpecification(msrest.serialization.Model): + """Log specification of operation. + + :param name: Name of log specification. + :type name: str + :param display_name: Display name of log specification. + :type display_name: str + :param blob_duration: Blob duration of specification. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class ManagedHsmResource(msrest.serialization.Model): + """Managed HSM resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param location: The supported Azure location where the managed HSM Pool should be created. + :type location: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSku + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the key vault + resource. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ManagedHsmSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + sku: Optional["ManagedHsmSku"] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ManagedHsmResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.sku = sku + self.tags = tags + self.system_data = None + + +class ManagedHsm(ManagedHsmResource): + """Resource information with extended details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param location: The supported Azure location where the managed HSM Pool should be created. + :type location: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSku + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the key vault + resource. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + :param properties: Properties of the managed HSM. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ManagedHsmSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'ManagedHsmProperties'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + sku: Optional["ManagedHsmSku"] = None, + tags: Optional[Dict[str, str]] = None, + properties: Optional["ManagedHsmProperties"] = None, + **kwargs + ): + super(ManagedHsm, self).__init__(location=location, sku=sku, tags=tags, **kwargs) + self.properties = properties + + +class ManagedHsmError(msrest.serialization.Model): + """The error exception. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar error: The server error. + :vartype error: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Error + """ + + _validation = { + 'error': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedHsmError, self).__init__(**kwargs) + self.error = None + + +class ManagedHsmListResult(msrest.serialization.Model): + """List of managed HSM Pools. + + :param value: The list of managed HSM Pools. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm] + :param next_link: The URL to get the next set of managed HSM Pools. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagedHsm]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ManagedHsm"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ManagedHsmListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ManagedHsmProperties(msrest.serialization.Model): + """Properties of the managed HSM Pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tenant_id: The Azure Active Directory tenant ID that should be used for authenticating + requests to the managed HSM pool. + :type tenant_id: str + :param initial_admin_object_ids: Array of initial administrators object ids for this managed + hsm pool. + :type initial_admin_object_ids: list[str] + :ivar hsm_uri: The URI of the managed hsm pool for performing operations on keys. + :vartype hsm_uri: str + :param enable_soft_delete: Property to specify whether the 'soft delete' functionality is + enabled for this managed HSM pool. If it's not set to any value(true or false) when creating + new managed HSM pool, it will be set to true by default. Once set to true, it cannot be + reverted to false. + :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It accepts >=7 and <=90. + :type soft_delete_retention_in_days: int + :param enable_purge_protection: Property specifying whether protection against purge is enabled + for this managed HSM pool. Setting this property to true activates protection against purge for + this managed HSM pool and its content - only the Managed HSM service may initiate a hard, + irrecoverable deletion. The setting is effective only if soft delete is also enabled. Enabling + this functionality is irreversible. + :type enable_purge_protection: bool + :param create_mode: The create mode to indicate whether the resource is being created or is + being recovered from a deleted resource. Possible values include: "recover", "default". + :type create_mode: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.CreateMode + :ivar status_message: Resource Status Message. + :vartype status_message: str + :ivar provisioning_state: Provisioning state. Possible values include: "Succeeded", + "Provisioning", "Failed", "Updating", "Deleting", "Activated", "SecurityDomainRestore", + "Restoring". + :vartype provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.ProvisioningState + :param network_acls: Rules governing the accessibility of the key vault from specific network + locations. + :type network_acls: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMNetworkRuleSet + :ivar private_endpoint_connections: List of private endpoint connections associated with the + managed hsm pool. + :vartype private_endpoint_connections: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnectionItem] + :param public_network_access: Control permission for data plane traffic coming from public + networks while private endpoint is enabled. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PublicNetworkAccess + :ivar scheduled_purge_date: The scheduled purge date in UTC. + :vartype scheduled_purge_date: ~datetime.datetime + """ + + _validation = { + 'hsm_uri': {'readonly': True}, + 'status_message': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'scheduled_purge_date': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'initial_admin_object_ids': {'key': 'initialAdminObjectIds', 'type': '[str]'}, + 'hsm_uri': {'key': 'hsmUri', 'type': 'str'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'status_message': {'key': 'statusMessage', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'network_acls': {'key': 'networkAcls', 'type': 'MHSMNetworkRuleSet'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[MHSMPrivateEndpointConnectionItem]'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + 'scheduled_purge_date': {'key': 'scheduledPurgeDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + initial_admin_object_ids: Optional[List[str]] = None, + enable_soft_delete: Optional[bool] = True, + soft_delete_retention_in_days: Optional[int] = 90, + enable_purge_protection: Optional[bool] = True, + create_mode: Optional[Union[str, "CreateMode"]] = None, + network_acls: Optional["MHSMNetworkRuleSet"] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + **kwargs + ): + super(ManagedHsmProperties, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.initial_admin_object_ids = initial_admin_object_ids + self.hsm_uri = None + self.enable_soft_delete = enable_soft_delete + self.soft_delete_retention_in_days = soft_delete_retention_in_days + self.enable_purge_protection = enable_purge_protection + self.create_mode = create_mode + self.status_message = None + self.provisioning_state = None + self.network_acls = network_acls + self.private_endpoint_connections = None + self.public_network_access = public_network_access + self.scheduled_purge_date = None + + +class ManagedHsmSku(msrest.serialization.Model): + """SKU details. + + All required parameters must be populated in order to send to Azure. + + :param family: Required. SKU Family of the managed HSM Pool. Possible values include: "B". + :type family: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSkuFamily + :param name: Required. SKU of the managed HSM Pool. Possible values include: "Standard_B1", + "Custom_B32". + :type name: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSkuName + """ + + _validation = { + 'family': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'family': {'key': 'family', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + family: Union[str, "ManagedHsmSkuFamily"] = "B", + name: Union[str, "ManagedHsmSkuName"], + **kwargs + ): + super(ManagedHsmSku, self).__init__(**kwargs) + self.family = family + self.name = name + + +class MetricSpecification(msrest.serialization.Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + :type unit: str + :param aggregation_type: The metric aggregation type. Possible values include: 'Average', + 'Count', 'Total'. + :type aggregation_type: str + :param supported_aggregation_types: The supported aggregation types for the metrics. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: The supported time grain types for the metrics. + :type supported_time_grain_types: list[str] + :param lock_aggregation_type: The metric lock aggregation type. + :type lock_aggregation_type: str + :param dimensions: The dimensions of metric. + :type dimensions: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.DimensionProperties] + :param fill_gap_with_zero: Property to specify whether to fill gap with zero. + :type fill_gap_with_zero: bool + :param internal_metric_name: The internal metric name. + :type internal_metric_name: str + """ + + _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]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + aggregation_type: Optional[str] = None, + supported_aggregation_types: Optional[List[str]] = None, + supported_time_grain_types: Optional[List[str]] = None, + lock_aggregation_type: Optional[str] = None, + dimensions: Optional[List["DimensionProperties"]] = None, + fill_gap_with_zero: Optional[bool] = None, + internal_metric_name: Optional[str] = None, + **kwargs + ): + 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.supported_time_grain_types = supported_time_grain_types + self.lock_aggregation_type = lock_aggregation_type + self.dimensions = dimensions + self.fill_gap_with_zero = fill_gap_with_zero + self.internal_metric_name = internal_metric_name + + +class MHSMIPRule(msrest.serialization.Model): + """A rule governing the accessibility of a managed hsm pool from a specific ip address or ip range. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. An IPv4 address range in CIDR notation, such as '124.56.78.91' (simple + IP address) or '124.56.78.0/24' (all addresses that start with 124.56.78). + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: str, + **kwargs + ): + super(MHSMIPRule, self).__init__(**kwargs) + self.value = value + + +class MHSMNetworkRuleSet(msrest.serialization.Model): + """A set of rules governing the network accessibility of a managed hsm pool. + + :param bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or + 'None'. If not specified the default is 'AzureServices'. Possible values include: + "AzureServices", "None". + :type bypass: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleBypassOptions + :param default_action: The default action when no rule from ipRules and from + virtualNetworkRules match. This is only used after the bypass property has been evaluated. + Possible values include: "Allow", "Deny". + :type default_action: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleAction + :param ip_rules: The list of IP address rules. + :type ip_rules: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMIPRule] + :param virtual_network_rules: The list of virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMVirtualNetworkRule] + """ + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'ip_rules': {'key': 'ipRules', 'type': '[MHSMIPRule]'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[MHSMVirtualNetworkRule]'}, + } + + def __init__( + self, + *, + bypass: Optional[Union[str, "NetworkRuleBypassOptions"]] = None, + default_action: Optional[Union[str, "NetworkRuleAction"]] = None, + ip_rules: Optional[List["MHSMIPRule"]] = None, + virtual_network_rules: Optional[List["MHSMVirtualNetworkRule"]] = None, + **kwargs + ): + super(MHSMNetworkRuleSet, self).__init__(**kwargs) + self.bypass = bypass + self.default_action = default_action + self.ip_rules = ip_rules + self.virtual_network_rules = virtual_network_rules + + +class MHSMPrivateEndpoint(msrest.serialization.Model): + """Private endpoint object properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Full identifier of the private endpoint resource. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MHSMPrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class MHSMPrivateEndpointConnection(ManagedHsmResource): + """Private endpoint connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param location: The supported Azure location where the managed HSM Pool should be created. + :type location: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSku + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the key vault + resource. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str + :param private_endpoint: Properties of the private endpoint object. + :type private_endpoint: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpoint + :param private_link_service_connection_state: Approval state of the private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateLinkServiceConnectionState + :param provisioning_state: Provisioning state of the private endpoint connection. Possible + values include: "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Disconnected". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ManagedHsmSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'MHSMPrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'MHSMPrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + sku: Optional["ManagedHsmSku"] = None, + tags: Optional[Dict[str, str]] = None, + etag: Optional[str] = None, + private_endpoint: Optional["MHSMPrivateEndpoint"] = None, + private_link_service_connection_state: Optional["MHSMPrivateLinkServiceConnectionState"] = None, + provisioning_state: Optional[Union[str, "PrivateEndpointConnectionProvisioningState"]] = None, + **kwargs + ): + super(MHSMPrivateEndpointConnection, self).__init__(location=location, sku=sku, tags=tags, **kwargs) + self.etag = etag + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +class MHSMPrivateEndpointConnectionItem(msrest.serialization.Model): + """Private endpoint connection item. + + :param private_endpoint: Properties of the private endpoint object. + :type private_endpoint: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpoint + :param private_link_service_connection_state: Approval state of the private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateLinkServiceConnectionState + :param provisioning_state: Provisioning state of the private endpoint connection. Possible + values include: "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Disconnected". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionProvisioningState + """ + + _attribute_map = { + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'MHSMPrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'MHSMPrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + private_endpoint: Optional["MHSMPrivateEndpoint"] = None, + private_link_service_connection_state: Optional["MHSMPrivateLinkServiceConnectionState"] = None, + provisioning_state: Optional[Union[str, "PrivateEndpointConnectionProvisioningState"]] = None, + **kwargs + ): + super(MHSMPrivateEndpointConnectionItem, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +class MHSMPrivateEndpointConnectionsListResult(msrest.serialization.Model): + """List of private endpoint connections associated with a managed HSM Pools. + + :param value: The private endpoint connection associated with a managed HSM Pools. + :type value: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection] + :param next_link: The URL to get the next set of managed HSM Pools. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MHSMPrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["MHSMPrivateEndpointConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(MHSMPrivateEndpointConnectionsListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class MHSMPrivateLinkResource(ManagedHsmResource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The Azure Resource Manager resource ID for the managed HSM Pool. + :vartype id: str + :ivar name: The name of the managed HSM Pool. + :vartype name: str + :ivar type: The resource type of the managed HSM Pool. + :vartype type: str + :param location: The supported Azure location where the managed HSM Pool should be created. + :type location: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmSku + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar system_data: Metadata pertaining to creation and last modification of the key vault + resource. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + :ivar group_id: Group identifier of private link resource. + :vartype group_id: str + :ivar required_members: Required member names of private link resource. + :vartype required_members: list[str] + :param required_zone_names: Required DNS zone names of the the private link resource. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ManagedHsmSku'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + sku: Optional["ManagedHsmSku"] = None, + tags: Optional[Dict[str, str]] = None, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(MHSMPrivateLinkResource, self).__init__(location=location, sku=sku, tags=tags, **kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class MHSMPrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[MHSMPrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["MHSMPrivateLinkResource"]] = None, + **kwargs + ): + super(MHSMPrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class MHSMPrivateLinkServiceConnectionState(msrest.serialization.Model): + """An object that represents the approval state of the private link connection. + + :param status: Indicates whether the connection has been approved, rejected or removed by the + key vault owner. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". + :type status: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval or rejection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. Possible values include: "None". + :type actions_required: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.ActionsRequired + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[Union[str, "ActionsRequired"]] = None, + **kwargs + ): + super(MHSMPrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class MHSMVirtualNetworkRule(msrest.serialization.Model): + """A rule governing the accessibility of a managed hsm pool from a specific virtual network. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Full resource id of a vnet subnet, such as + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + **kwargs + ): + super(MHSMVirtualNetworkRule, self).__init__(**kwargs) + self.id = id + + +class NetworkRuleSet(msrest.serialization.Model): + """A set of rules governing the network accessibility of a vault. + + :param bypass: Tells what traffic can bypass network rules. This can be 'AzureServices' or + 'None'. If not specified the default is 'AzureServices'. Possible values include: + "AzureServices", "None". + :type bypass: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleBypassOptions + :param default_action: The default action when no rule from ipRules and from + virtualNetworkRules match. This is only used after the bypass property has been evaluated. + Possible values include: "Allow", "Deny". + :type default_action: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleAction + :param ip_rules: The list of IP address rules. + :type ip_rules: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.IPRule] + :param virtual_network_rules: The list of virtual network rules. + :type virtual_network_rules: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.VirtualNetworkRule] + """ + + _attribute_map = { + 'bypass': {'key': 'bypass', 'type': 'str'}, + 'default_action': {'key': 'defaultAction', 'type': 'str'}, + 'ip_rules': {'key': 'ipRules', 'type': '[IPRule]'}, + 'virtual_network_rules': {'key': 'virtualNetworkRules', 'type': '[VirtualNetworkRule]'}, + } + + def __init__( + self, + *, + bypass: Optional[Union[str, "NetworkRuleBypassOptions"]] = None, + default_action: Optional[Union[str, "NetworkRuleAction"]] = None, + ip_rules: Optional[List["IPRule"]] = None, + virtual_network_rules: Optional[List["VirtualNetworkRule"]] = None, + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.bypass = bypass + self.default_action = default_action + self.ip_rules = ip_rules + self.virtual_network_rules = virtual_network_rules + + +class Operation(msrest.serialization.Model): + """Key Vault REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.keyvault.v2021_06_01_preview.models.OperationDisplay + :param origin: The origin of operations. + :type origin: str + :param is_data_action: Property to specify whether the action is a data action. + :type is_data_action: bool + :param service_specification: One property of operation, include metric specifications. + :type service_specification: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.ServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["OperationDisplay"] = None, + origin: Optional[str] = None, + is_data_action: Optional[bool] = None, + service_specification: Optional["ServiceSpecification"] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.is_data_action = is_data_action + self.service_specification = service_specification + + +class OperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Key Vault. + :type provider: str + :param resource: Resource on which the operation is performed etc. + :type resource: str + :param operation: Type of operation: get, read, delete, etc. + :type operation: str + :param description: Description of operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list Storage operations. It contains a list of operations and a URL link to get the next set of results. + + :param value: List of Storage operations supported by the Storage resource provider. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Operation] + :param next_link: The URL to get the next set of operations. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Operation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class Permissions(msrest.serialization.Model): + """Permissions the identity has for keys, secrets, certificates and storage. + + :param keys: Permissions to keys. + :type keys: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyPermissions] + :param secrets: Permissions to secrets. + :type secrets: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretPermissions] + :param certificates: Permissions to certificates. + :type certificates: list[str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.CertificatePermissions] + :param storage: Permissions to storage accounts. + :type storage: list[str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.StoragePermissions] + """ + + _attribute_map = { + 'keys': {'key': 'keys', 'type': '[str]'}, + 'secrets': {'key': 'secrets', 'type': '[str]'}, + 'certificates': {'key': 'certificates', 'type': '[str]'}, + 'storage': {'key': 'storage', 'type': '[str]'}, + } + + def __init__( + self, + *, + keys: Optional[List[Union[str, "KeyPermissions"]]] = None, + secrets: Optional[List[Union[str, "SecretPermissions"]]] = None, + certificates: Optional[List[Union[str, "CertificatePermissions"]]] = None, + storage: Optional[List[Union[str, "StoragePermissions"]]] = None, + **kwargs + ): + super(Permissions, self).__init__(**kwargs) + self.keys = keys + self.secrets = secrets + self.certificates = certificates + self.storage = storage + + +class PrivateEndpoint(msrest.serialization.Model): + """Private endpoint object properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Full identifier of the private endpoint resource. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Resource): + """Private endpoint connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str + :param private_endpoint: Properties of the private endpoint object. + :type private_endpoint: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpoint + :param private_link_service_connection_state: Approval state of the private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateLinkServiceConnectionState + :param provisioning_state: Provisioning state of the private endpoint connection. Possible + values include: "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Disconnected". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + etag: Optional[str] = None, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + provisioning_state: Optional[Union[str, "PrivateEndpointConnectionProvisioningState"]] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.etag = etag + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +class PrivateEndpointConnectionItem(msrest.serialization.Model): + """Private endpoint connection item. + + :param id: Id of private endpoint connection. + :type id: str + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str + :param private_endpoint: Properties of the private endpoint object. + :type private_endpoint: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpoint + :param private_link_service_connection_state: Approval state of the private link connection. + :type private_link_service_connection_state: + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateLinkServiceConnectionState + :param provisioning_state: Provisioning state of the private endpoint connection. Possible + values include: "Succeeded", "Creating", "Updating", "Deleting", "Failed", "Disconnected". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionProvisioningState + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + etag: Optional[str] = None, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + provisioning_state: Optional[Union[str, "PrivateEndpointConnectionProvisioningState"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionItem, self).__init__(**kwargs) + self.id = id + self.etag = etag + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = provisioning_state + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connections. + + :param value: The list of private endpoint connections. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection] + :param next_link: The URL to get the next set of private endpoint connections. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :ivar group_id: Group identifier of private link resource. + :vartype group_id: str + :ivar required_members: Required member names of private link resource. + :vartype required_members: list[str] + :param required_zone_names: Required DNS zone names of the the private link resource. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkResource"]] = None, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """An object that represents the approval state of the private link connection. + + :param status: Indicates whether the connection has been approved, rejected or removed by the + key vault owner. Possible values include: "Pending", "Approved", "Rejected", "Disconnected". + :type status: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval or rejection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. Possible values include: "None". + :type actions_required: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.ActionsRequired + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, + description: Optional[str] = None, + actions_required: Optional[Union[str, "ActionsRequired"]] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class ResourceListResult(msrest.serialization.Model): + """List of vault resources. + + :param value: The list of vault resources. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Resource] + :param next_link: The URL to get the next set of vault resources. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Resource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Resource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RotationPolicy(msrest.serialization.Model): + """RotationPolicy. + + :param attributes: The attributes of key rotation policy. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyRotationPolicyAttributes + :param lifetime_actions: The lifetimeActions for key rotation action. + :type lifetime_actions: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.LifetimeAction] + """ + + _attribute_map = { + 'attributes': {'key': 'attributes', 'type': 'KeyRotationPolicyAttributes'}, + 'lifetime_actions': {'key': 'lifetimeActions', 'type': '[LifetimeAction]'}, + } + + def __init__( + self, + *, + attributes: Optional["KeyRotationPolicyAttributes"] = None, + lifetime_actions: Optional[List["LifetimeAction"]] = None, + **kwargs + ): + super(RotationPolicy, self).__init__(**kwargs) + self.attributes = attributes + self.lifetime_actions = lifetime_actions + + +class Secret(Resource): + """Resource information with extended details. + + 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. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :param properties: Required. Properties of the secret. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'SecretProperties'}, + } + + def __init__( + self, + *, + properties: "SecretProperties", + **kwargs + ): + super(Secret, self).__init__(**kwargs) + self.properties = properties + + +class SecretAttributes(Attributes): + """The secret management attributes. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether the object is enabled. + :type enabled: bool + :param not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :type not_before: ~datetime.datetime + :param expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :type expires: ~datetime.datetime + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: ~datetime.datetime + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: ~datetime.datetime + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'unix-time'}, + 'expires': {'key': 'exp', 'type': 'unix-time'}, + 'created': {'key': 'created', 'type': 'unix-time'}, + 'updated': {'key': 'updated', 'type': 'unix-time'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + not_before: Optional[datetime.datetime] = None, + expires: Optional[datetime.datetime] = None, + **kwargs + ): + super(SecretAttributes, self).__init__(enabled=enabled, not_before=not_before, expires=expires, **kwargs) + + +class SecretCreateOrUpdateParameters(msrest.serialization.Model): + """Parameters for creating or updating a secret. + + All required parameters must be populated in order to send to Azure. + + :param tags: A set of tags. The tags that will be assigned to the secret. + :type tags: dict[str, str] + :param properties: Required. Properties of the secret. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'SecretProperties'}, + } + + def __init__( + self, + *, + properties: "SecretProperties", + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(SecretCreateOrUpdateParameters, self).__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class SecretListResult(msrest.serialization.Model): + """List of secrets. + + :param value: The list of secrets. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Secret] + :param next_link: The URL to get the next set of secrets. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Secret]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Secret"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(SecretListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SecretPatchParameters(msrest.serialization.Model): + """Parameters for patching a secret. + + :param tags: A set of tags. The tags that will be assigned to the secret. + :type tags: dict[str, str] + :param properties: Properties of the secret. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretPatchProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'SecretPatchProperties'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + properties: Optional["SecretPatchProperties"] = None, + **kwargs + ): + super(SecretPatchParameters, self).__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class SecretPatchProperties(msrest.serialization.Model): + """Properties of the secret. + + :param value: The value of the secret. + :type value: str + :param content_type: The content type of the secret. + :type content_type: str + :param attributes: The attributes of the secret. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretAttributes + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'SecretAttributes'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + content_type: Optional[str] = None, + attributes: Optional["SecretAttributes"] = None, + **kwargs + ): + super(SecretPatchProperties, self).__init__(**kwargs) + self.value = value + self.content_type = content_type + self.attributes = attributes + + +class SecretProperties(msrest.serialization.Model): + """Properties of the secret. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The value of the secret. NOTE: 'value' will never be returned from the service, + as APIs using this model are is intended for internal use in ARM deployments. Users should use + the data-plane REST service for interaction with vault secrets. + :type value: str + :param content_type: The content type of the secret. + :type content_type: str + :param attributes: The attributes of the secret. + :type attributes: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretAttributes + :ivar secret_uri: The URI to retrieve the current version of the secret. + :vartype secret_uri: str + :ivar secret_uri_with_version: The URI to retrieve the specific version of the secret. + :vartype secret_uri_with_version: str + """ + + _validation = { + 'secret_uri': {'readonly': True}, + 'secret_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'content_type': {'key': 'contentType', 'type': 'str'}, + 'attributes': {'key': 'attributes', 'type': 'SecretAttributes'}, + 'secret_uri': {'key': 'secretUri', 'type': 'str'}, + 'secret_uri_with_version': {'key': 'secretUriWithVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + content_type: Optional[str] = None, + attributes: Optional["SecretAttributes"] = None, + **kwargs + ): + super(SecretProperties, self).__init__(**kwargs) + self.value = value + self.content_type = content_type + self.attributes = attributes + self.secret_uri = None + self.secret_uri_with_version = None + + +class ServiceSpecification(msrest.serialization.Model): + """One property of operation, include log specifications. + + :param log_specifications: Log specifications of operation. + :type log_specifications: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.LogSpecification] + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.MetricSpecification] + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__( + self, + *, + log_specifications: Optional[List["LogSpecification"]] = None, + metric_specifications: Optional[List["MetricSpecification"]] = None, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + self.metric_specifications = metric_specifications + + +class Sku(msrest.serialization.Model): + """SKU details. + + All required parameters must be populated in order to send to Azure. + + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.SkuFamily + :param name: Required. SKU name to specify whether the key vault is a standard vault or a + premium vault. Possible values include: "standard", "premium". + :type name: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.SkuName + """ + + _validation = { + 'family': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'family': {'key': 'family', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + family: Union[str, "SkuFamily"] = "A", + name: Union[str, "SkuName"], + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.family = family + self.name = name + + +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the key vault resource. + + :param created_by: The identity that created the key vault resource. + :type created_by: str + :param created_by_type: The type of identity that created the key vault resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.IdentityType + :param created_at: The timestamp of the key vault resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the key vault resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the key vault resource. + Possible values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.IdentityType + :param last_modified_at: The timestamp of the key vault resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "IdentityType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "IdentityType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 Trigger(msrest.serialization.Model): + """Trigger. + + :param time_after_create: The time duration after key creation to rotate the key. It only + applies to rotate. It will be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + :type time_after_create: str + :param time_before_expiry: The time duration before key expiring to rotate or notify. It will + be in ISO 8601 duration format. Eg: 'P90D', 'P1Y'. + :type time_before_expiry: str + """ + + _attribute_map = { + 'time_after_create': {'key': 'timeAfterCreate', 'type': 'str'}, + 'time_before_expiry': {'key': 'timeBeforeExpiry', 'type': 'str'}, + } + + def __init__( + self, + *, + time_after_create: Optional[str] = None, + time_before_expiry: Optional[str] = None, + **kwargs + ): + super(Trigger, self).__init__(**kwargs) + self.time_after_create = time_after_create + self.time_before_expiry = time_before_expiry + + +class Vault(msrest.serialization.Model): + """Resource information with extended details. + + 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. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :param location: Azure location of the key vault resource. + :type location: str + :param tags: A set of tags. Tags assigned to the key vault resource. + :type tags: dict[str, str] + :ivar system_data: System metadata for the key vault. + :vartype system_data: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SystemData + :param properties: Required. Properties of the vault. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + } + + def __init__( + self, + *, + properties: "VaultProperties", + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Vault, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.system_data = None + self.properties = properties + + +class VaultAccessPolicyParameters(msrest.serialization.Model): + """Parameters for updating the access policy in a vault. + + 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. + + :ivar id: The resource id of the access policy. + :vartype id: str + :ivar name: The resource name of the access policy. + :vartype name: str + :ivar type: The resource name of the access policy. + :vartype type: str + :ivar location: The resource type of the access policy. + :vartype location: str + :param properties: Required. Properties of the access policy. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultAccessPolicyProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'VaultAccessPolicyProperties'}, + } + + def __init__( + self, + *, + properties: "VaultAccessPolicyProperties", + **kwargs + ): + super(VaultAccessPolicyParameters, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.properties = properties + + +class VaultAccessPolicyProperties(msrest.serialization.Model): + """Properties of the vault access policy. + + All required parameters must be populated in order to send to Azure. + + :param access_policies: Required. An array of 0 to 16 identities that have access to the key + vault. All identities in the array must use the same tenant ID as the key vault's tenant ID. + :type access_policies: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.AccessPolicyEntry] + """ + + _validation = { + 'access_policies': {'required': True}, + } + + _attribute_map = { + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + } + + def __init__( + self, + *, + access_policies: List["AccessPolicyEntry"], + **kwargs + ): + super(VaultAccessPolicyProperties, self).__init__(**kwargs) + self.access_policies = access_policies + + +class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): + """The parameters used to check the availability of the vault name. + + 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 name: Required. The vault name. + :type name: str + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: + "Microsoft.KeyVault/vaults". + :vartype type: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + type = "Microsoft.KeyVault/vaults" + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(VaultCheckNameAvailabilityParameters, self).__init__(**kwargs) + self.name = name + + +class VaultCreateOrUpdateParameters(msrest.serialization.Model): + """Parameters for creating or updating a vault. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The supported Azure location where the key vault should be created. + :type location: str + :param tags: A set of tags. The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Required. Properties of the vault. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultProperties + """ + + _validation = { + 'location': {'required': True}, + 'properties': {'required': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultProperties'}, + } + + def __init__( + self, + *, + location: str, + properties: "VaultProperties", + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(VaultCreateOrUpdateParameters, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.properties = properties + + +class VaultListResult(msrest.serialization.Model): + """List of vaults. + + :param value: The list of vaults. + :type value: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.Vault] + :param next_link: The URL to get the next set of vaults. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Vault]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Vault"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(VaultListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VaultPatchParameters(msrest.serialization.Model): + """Parameters for creating or updating a vault. + + :param tags: A set of tags. The tags that will be assigned to the key vault. + :type tags: dict[str, str] + :param properties: Properties of the vault. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultPatchProperties + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'VaultPatchProperties'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + properties: Optional["VaultPatchProperties"] = None, + **kwargs + ): + super(VaultPatchParameters, self).__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class VaultPatchProperties(msrest.serialization.Model): + """Properties of the vault. + + :param tenant_id: The Azure Active Directory tenant ID that should be used for authenticating + requests to the key vault. + :type tenant_id: str + :param sku: SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Sku + :param access_policies: An array of 0 to 16 identities that have access to the key vault. All + identities in the array must use the same tenant ID as the key vault's tenant ID. + :type access_policies: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.AccessPolicyEntry] + :param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted + to retrieve certificates stored as secrets from the key vault. + :type enabled_for_deployment: bool + :param enabled_for_disk_encryption: Property to specify whether Azure Disk Encryption is + permitted to retrieve secrets from the vault and unwrap keys. + :type enabled_for_disk_encryption: bool + :param enabled_for_template_deployment: Property to specify whether Azure Resource Manager is + permitted to retrieve secrets from the key vault. + :type enabled_for_template_deployment: bool + :param enable_soft_delete: Property to specify whether the 'soft delete' functionality is + enabled for this key vault. Once set to true, it cannot be reverted to false. + :type enable_soft_delete: bool + :param enable_rbac_authorization: Property that controls how data actions are authorized. When + true, the key vault will use Role Based Access Control (RBAC) for authorization of data + actions, and the access policies specified in vault properties will be ignored (warning: this + is a preview feature). When false, the key vault will use the access policies specified in + vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or + not specified, the value of this property will not change. + :type enable_rbac_authorization: bool + :param soft_delete_retention_in_days: softDelete data retention days. It accepts >=7 and <=90. + :type soft_delete_retention_in_days: int + :param create_mode: The vault's create mode to indicate whether the vault need to be recovered + or not. Possible values include: "recover", "default". + :type create_mode: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.CreateMode + :param enable_purge_protection: Property specifying whether protection against purge is enabled + for this vault. Setting this property to true activates protection against purge for this vault + and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The + setting is effective only if soft delete is also enabled. Enabling this functionality is + irreversible - that is, the property does not accept false as its value. + :type enable_purge_protection: bool + :param network_acls: A collection of rules governing the accessibility of the vault from + specific network locations. + :type network_acls: ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleSet + :param public_network_access: Property to specify whether the vault will accept traffic from + public internet. If set to 'disabled' all traffic except private endpoint traffic and that that + originates from trusted services will be blocked. This will override the set firewall rules, + meaning that even if the firewall rules are present we will not honor the rules. + :type public_network_access: str + """ + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, + 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, + 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: Optional[str] = None, + sku: Optional["Sku"] = None, + access_policies: Optional[List["AccessPolicyEntry"]] = None, + enabled_for_deployment: Optional[bool] = None, + enabled_for_disk_encryption: Optional[bool] = None, + enabled_for_template_deployment: Optional[bool] = None, + enable_soft_delete: Optional[bool] = None, + enable_rbac_authorization: Optional[bool] = None, + soft_delete_retention_in_days: Optional[int] = None, + create_mode: Optional[Union[str, "CreateMode"]] = None, + enable_purge_protection: Optional[bool] = None, + network_acls: Optional["NetworkRuleSet"] = None, + public_network_access: Optional[str] = None, + **kwargs + ): + super(VaultPatchProperties, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.sku = sku + self.access_policies = access_policies + self.enabled_for_deployment = enabled_for_deployment + self.enabled_for_disk_encryption = enabled_for_disk_encryption + self.enabled_for_template_deployment = enabled_for_template_deployment + self.enable_soft_delete = enable_soft_delete + self.enable_rbac_authorization = enable_rbac_authorization + self.soft_delete_retention_in_days = soft_delete_retention_in_days + self.create_mode = create_mode + self.enable_purge_protection = enable_purge_protection + self.network_acls = network_acls + self.public_network_access = public_network_access + + +class VaultProperties(msrest.serialization.Model): + """Properties of the vault. + + 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 tenant_id: Required. The Azure Active Directory tenant ID that should be used for + authenticating requests to the key vault. + :type tenant_id: str + :param sku: Required. SKU details. + :type sku: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Sku + :param access_policies: An array of 0 to 1024 identities that have access to the key vault. All + identities in the array must use the same tenant ID as the key vault's tenant ID. When + ``createMode`` is set to ``recover``\ , access policies are not required. Otherwise, access + policies are required. + :type access_policies: list[~azure.mgmt.keyvault.v2021_06_01_preview.models.AccessPolicyEntry] + :param vault_uri: The URI of the vault for performing operations on keys and secrets. + :type vault_uri: str + :ivar hsm_pool_resource_id: The resource id of HSM Pool. + :vartype hsm_pool_resource_id: str + :param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted + to retrieve certificates stored as secrets from the key vault. + :type enabled_for_deployment: bool + :param enabled_for_disk_encryption: Property to specify whether Azure Disk Encryption is + permitted to retrieve secrets from the vault and unwrap keys. + :type enabled_for_disk_encryption: bool + :param enabled_for_template_deployment: Property to specify whether Azure Resource Manager is + permitted to retrieve secrets from the key vault. + :type enabled_for_template_deployment: bool + :param enable_soft_delete: Property to specify whether the 'soft delete' functionality is + enabled for this key vault. If it's not set to any value(true or false) when creating new key + vault, it will be set to true by default. Once set to true, it cannot be reverted to false. + :type enable_soft_delete: bool + :param soft_delete_retention_in_days: softDelete data retention days. It accepts >=7 and <=90. + :type soft_delete_retention_in_days: int + :param enable_rbac_authorization: Property that controls how data actions are authorized. When + true, the key vault will use Role Based Access Control (RBAC) for authorization of data + actions, and the access policies specified in vault properties will be ignored (warning: this + is a preview feature). When false, the key vault will use the access policies specified in + vault properties, and any policy stored on Azure Resource Manager will be ignored. If null or + not specified, the vault is created with the default value of false. Note that management + actions are always authorized with RBAC. + :type enable_rbac_authorization: bool + :param create_mode: The vault's create mode to indicate whether the vault need to be recovered + or not. Possible values include: "recover", "default". + :type create_mode: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.CreateMode + :param enable_purge_protection: Property specifying whether protection against purge is enabled + for this vault. Setting this property to true activates protection against purge for this vault + and its content - only the Key Vault service may initiate a hard, irrecoverable deletion. The + setting is effective only if soft delete is also enabled. Enabling this functionality is + irreversible - that is, the property does not accept false as its value. + :type enable_purge_protection: bool + :param network_acls: Rules governing the accessibility of the key vault from specific network + locations. + :type network_acls: ~azure.mgmt.keyvault.v2021_06_01_preview.models.NetworkRuleSet + :param provisioning_state: Provisioning state of the vault. Possible values include: + "Succeeded", "RegisteringDns". + :type provisioning_state: str or + ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultProvisioningState + :ivar private_endpoint_connections: List of private endpoint connections associated with the + key vault. + :vartype private_endpoint_connections: + list[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionItem] + :param public_network_access: Property to specify whether the vault will accept traffic from + public internet. If set to 'disabled' all traffic except private endpoint traffic and that that + originates from trusted services will be blocked. This will override the set firewall rules, + meaning that even if the firewall rules are present we will not honor the rules. + :type public_network_access: str + """ + + _validation = { + 'tenant_id': {'required': True}, + 'sku': {'required': True}, + 'hsm_pool_resource_id': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, + 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'hsm_pool_resource_id': {'key': 'hsmPoolResourceId', 'type': 'str'}, + 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, + 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, + 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, + 'enable_soft_delete': {'key': 'enableSoftDelete', 'type': 'bool'}, + 'soft_delete_retention_in_days': {'key': 'softDeleteRetentionInDays', 'type': 'int'}, + 'enable_rbac_authorization': {'key': 'enableRbacAuthorization', 'type': 'bool'}, + 'create_mode': {'key': 'createMode', 'type': 'str'}, + 'enable_purge_protection': {'key': 'enablePurgeProtection', 'type': 'bool'}, + 'network_acls': {'key': 'networkAcls', 'type': 'NetworkRuleSet'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'privateEndpointConnections', 'type': '[PrivateEndpointConnectionItem]'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + tenant_id: str, + sku: "Sku", + access_policies: Optional[List["AccessPolicyEntry"]] = None, + vault_uri: Optional[str] = None, + enabled_for_deployment: Optional[bool] = None, + enabled_for_disk_encryption: Optional[bool] = None, + enabled_for_template_deployment: Optional[bool] = None, + enable_soft_delete: Optional[bool] = True, + soft_delete_retention_in_days: Optional[int] = 90, + enable_rbac_authorization: Optional[bool] = False, + create_mode: Optional[Union[str, "CreateMode"]] = None, + enable_purge_protection: Optional[bool] = None, + network_acls: Optional["NetworkRuleSet"] = None, + provisioning_state: Optional[Union[str, "VaultProvisioningState"]] = None, + public_network_access: Optional[str] = "enabled", + **kwargs + ): + super(VaultProperties, self).__init__(**kwargs) + self.tenant_id = tenant_id + self.sku = sku + self.access_policies = access_policies + self.vault_uri = vault_uri + self.hsm_pool_resource_id = None + self.enabled_for_deployment = enabled_for_deployment + self.enabled_for_disk_encryption = enabled_for_disk_encryption + self.enabled_for_template_deployment = enabled_for_template_deployment + self.enable_soft_delete = enable_soft_delete + self.soft_delete_retention_in_days = soft_delete_retention_in_days + self.enable_rbac_authorization = enable_rbac_authorization + self.create_mode = create_mode + self.enable_purge_protection = enable_purge_protection + self.network_acls = network_acls + self.provisioning_state = provisioning_state + self.private_endpoint_connections = None + self.public_network_access = public_network_access + + +class VirtualNetworkRule(msrest.serialization.Model): + """A rule governing the accessibility of a vault from a specific virtual network. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. Full resource id of a vnet subnet, such as + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. + :type id: str + :param ignore_missing_vnet_service_endpoint: Property to specify whether NRP will ignore the + check if parent subnet has serviceEndpoints configured. + :type ignore_missing_vnet_service_endpoint: bool + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: str, + ignore_missing_vnet_service_endpoint: Optional[bool] = None, + **kwargs + ): + super(VirtualNetworkRule, self).__init__(**kwargs) + self.id = id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/__init__.py new file mode 100644 index 000000000000..8e1d8528d945 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/__init__.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._keys_operations import KeysOperations +from ._vaults_operations import VaultsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._managed_hsms_operations import ManagedHsmsOperations +from ._mhsm_private_endpoint_connections_operations import MHSMPrivateEndpointConnectionsOperations +from ._mhsm_private_link_resources_operations import MHSMPrivateLinkResourcesOperations +from ._operations import Operations +from ._secrets_operations import SecretsOperations + +__all__ = [ + 'KeysOperations', + 'VaultsOperations', + 'PrivateEndpointConnectionsOperations', + 'PrivateLinkResourcesOperations', + 'ManagedHsmsOperations', + 'MHSMPrivateEndpointConnectionsOperations', + 'MHSMPrivateLinkResourcesOperations', + 'Operations', + 'SecretsOperations', +] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_keys_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_keys_operations.py new file mode 100644 index 000000000000..51a9e0e09639 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_keys_operations.py @@ -0,0 +1,408 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class KeysOperations(object): + """KeysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_if_not_exist( + self, + resource_group_name, # type: str + vault_name, # type: str + key_name, # type: str + parameters, # type: "_models.KeyCreateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.Key" + """Creates the first version of a new key if it does not exist. If it already exists, then the + existing key is returned without any write operations being performed. This API does not create + subsequent versions, and does not update existing keys. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the key vault which contains the key to be created. + :type vault_name: str + :param key_name: The name of the key to be created. + :type key_name: str + :param parameters: The parameters used to create the specified key. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_if_not_exist.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'KeyCreateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_if_not_exist.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + vault_name, # type: str + key_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Key" + """Gets the current version of the specified key from the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key to be retrieved. + :type vault_name: str + :param key_name: The name of the key to be retrieved. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + vault_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.KeyListResult"] + """Lists the keys in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the keys to be retrieved. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('KeyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys'} # type: ignore + + def get_version( + self, + resource_group_name, # type: str + vault_name, # type: str + key_name, # type: str + key_version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Key" + """Gets the specified version of the specified key in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key version to be retrieved. + :type vault_name: str + :param key_name: The name of the key version to be retrieved. + :type key_name: str + :param key_version: The version of the key to be retrieved. + :type key_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_version.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + 'keyVersion': self._serialize.url("key_version", key_version, 'str', pattern=r'^[a-fA-F0-9]{32}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions/{keyVersion}'} # type: ignore + + def list_versions( + self, + resource_group_name, # type: str + vault_name, # type: str + key_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.KeyListResult"] + """Lists the versions of the specified key in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key versions to be retrieved. + :type vault_name: str + :param key_name: The name of the key versions to be retrieved. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.KeyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('KeyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_managed_hsms_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_managed_hsms_operations.py new file mode 100644 index 000000000000..bdaec23b9da7 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_managed_hsms_operations.py @@ -0,0 +1,875 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ManagedHsmsOperations(object): + """ManagedHsmsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name, # type: str + name, # type: str + parameters, # type: "_models.ManagedHsm" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedHsm" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedHsm') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + name, # type: str + parameters, # type: "_models.ManagedHsm" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedHsm"] + """Create or update a managed HSM Pool in the specified subscription. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param parameters: Parameters to create or update the managed HSM Pool. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedHsm or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + name, # type: str + parameters, # type: "_models.ManagedHsm" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagedHsm" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagedHsm') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + name, # type: str + parameters, # type: "_models.ManagedHsm" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ManagedHsm"] + """Update a managed HSM Pool in the specified subscription. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param parameters: Parameters to patch the managed HSM Pool. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ManagedHsm or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + name=name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified managed HSM Pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: The name of the managed HSM Pool to delete. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ManagedHsm"] + """Gets the specified managed HSM Pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: The name of the managed HSM Pool. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagedHsm, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsm or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ManagedHsm"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedHsmListResult"] + """The List operation gets information about the managed HSM Pools associated with the + subscription and within the specified resource group. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param top: Maximum number of results to return. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedHsmListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsmListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedHsmListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs'} # type: ignore + + def list_by_subscription( + self, + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagedHsmListResult"] + """The List operation gets information about the managed HSM Pools associated with the + subscription. + + :param top: Maximum number of results to return. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagedHsmListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.ManagedHsmListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsmListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagedHsmListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/managedHSMs'} # type: ignore + + def list_deleted( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DeletedManagedHsmListResult"] + """The List operation gets information about the deleted managed HSMs associated with the + subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DeletedManagedHsmListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedManagedHsmListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedManagedHsmListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_deleted.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DeletedManagedHsmListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedManagedHSMs'} # type: ignore + + def get_deleted( + self, + name, # type: str + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DeletedManagedHsm" + """Gets the specified deleted managed HSM. + + :param name: The name of the deleted managed HSM. + :type name: str + :param location: The location of the deleted managed HSM. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeletedManagedHsm, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedManagedHsm + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedManagedHsm"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_deleted.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeletedManagedHsm', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}'} # type: ignore + + def _purge_deleted_initial( + self, + name, # type: str + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._purge_deleted_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _purge_deleted_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}/purge'} # type: ignore + + def begin_purge_deleted( + self, + name, # type: str + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Permanently deletes the specified managed HSM. + + :param name: The name of the soft-deleted managed HSM. + :type name: str + :param location: The location of the soft-deleted managed HSM. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._purge_deleted_initial( + name=name, + location=location, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_purge_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedManagedHSMs/{name}/purge'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_mhsm_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_mhsm_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..80a9d4a68d28 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_mhsm_private_endpoint_connections_operations.py @@ -0,0 +1,396 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class MHSMPrivateEndpointConnectionsOperations(object): + """MHSMPrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MHSMPrivateEndpointConnectionsListResult"] + """The List operation gets information about the private endpoint connections associated with the + managed HSM Pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MHSMPrivateEndpointConnectionsListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnectionsListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateEndpointConnectionsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('MHSMPrivateEndpointConnectionsListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MHSMPrivateEndpointConnection" + """Gets the specified private endpoint connection associated with the managed HSM Pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the managed hsm pool. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MHSMPrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ManagedHsmError, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MHSMPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def put( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + properties, # type: "_models.MHSMPrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.MHSMPrivateEndpointConnection" + """Updates the specified private endpoint connection associated with the managed hsm pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the managed hsm pool. + :type private_endpoint_connection_name: str + :param properties: The intended state of private endpoint connection. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MHSMPrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'MHSMPrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('MHSMPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.MHSMPrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MHSMPrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('MHSMPrivateEndpointConnection', pipeline_response) + + if response.status_code == 202: + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.MHSMPrivateEndpointConnection"] + """Deletes the specified private endpoint connection associated with the managed hsm pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the managed hsm pool. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either MHSMPrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('MHSMPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_mhsm_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_mhsm_private_link_resources_operations.py new file mode 100644 index 000000000000..2e5ca8a99b7a --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_mhsm_private_link_resources_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class MHSMPrivateLinkResourcesOperations(object): + """MHSMPrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_mhsm_resource( + self, + resource_group_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.MHSMPrivateLinkResourceListResult" + """Gets the private link resources supported for the managed hsm pool. + + :param resource_group_name: Name of the resource group that contains the managed HSM pool. + :type resource_group_name: str + :param name: Name of the managed HSM Pool. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: MHSMPrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.MHSMPrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MHSMPrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_mhsm_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('MHSMPrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_mhsm_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/privateLinkResources'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_operations.py similarity index 92% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_operations.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_operations.py index 63568675ecbe..b04178d842b3 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_operations.py @@ -30,7 +30,7 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,11 +50,11 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.OperationListResult"] - """Lists all of the available Network Rest API operations. + """Lists all of the available Key Vault Rest API operations. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.OperationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-06-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -106,4 +106,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/Microsoft.Network/operations'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.KeyVault/operations'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..672c3bdb73ab --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,396 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + vault_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.PrivateEndpointConnection"] + """Gets the specified private endpoint connection associated with the key vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the key vault. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def put( + self, + resource_group_name, # type: str + vault_name, # type: str + private_endpoint_connection_name, # type: str + properties, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Updates the specified private endpoint connection associated with the key vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the key vault. + :type private_endpoint_connection_name: str + :param properties: The intended state of private endpoint connection. + :type properties: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(properties, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + vault_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.PrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if response.status_code == 202: + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + vault_name, # type: str + private_endpoint_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PrivateEndpointConnection"] + """Deletes the specified private endpoint connection associated with the key vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :param private_endpoint_connection_name: Name of the private endpoint connection associated + with the key vault. + :type private_endpoint_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vault_name=vault_name, + private_endpoint_connection_name=private_endpoint_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections/{privateEndpointConnectionName}'} # type: ignore + + def list_by_resource( + self, + resource_group_name, # type: str + vault_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """The List operation gets information about the private endpoint connections associated with the + vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateEndpointConnections'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..06922aaffaf9 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_private_link_resources_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_vault( + self, + resource_group_name, # type: str + vault_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourceListResult" + """Gets the private link resources supported for the key vault. + + :param resource_group_name: Name of the resource group that contains the key vault. + :type resource_group_name: str + :param vault_name: The name of the key vault. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_vault.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_vault.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/privateLinkResources'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_secrets_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_secrets_operations.py new file mode 100644 index 000000000000..8ee3a9db6128 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_secrets_operations.py @@ -0,0 +1,346 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SecretsOperations(object): + """SecretsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_or_update( + self, + resource_group_name, # type: str + vault_name, # type: str + secret_name, # type: str + parameters, # type: "_models.SecretCreateOrUpdateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.Secret" + """Create or update a secret in a key vault in the specified subscription. NOTE: This API is + intended for internal use in ARM deployments. Users should use the data-plane REST service for + interaction with vault secrets. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: Name of the vault. + :type vault_name: str + :param secret_name: Name of the secret. + :type secret_name: str + :param parameters: Parameters to create or update the secret. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretCreateOrUpdateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Secret, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Secret + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Secret"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'secretName': self._serialize.url("secret_name", secret_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SecretCreateOrUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Secret', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Secret', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + vault_name, # type: str + secret_name, # type: str + parameters, # type: "_models.SecretPatchParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.Secret" + """Update a secret in the specified subscription. NOTE: This API is intended for internal use in + ARM deployments. Users should use the data-plane REST service for interaction with vault + secrets. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: Name of the vault. + :type vault_name: str + :param secret_name: Name of the secret. + :type secret_name: str + :param parameters: Parameters to patch the secret. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretPatchParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Secret, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Secret + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Secret"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'secretName': self._serialize.url("secret_name", secret_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SecretPatchParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('Secret', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Secret', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + vault_name, # type: str + secret_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Secret" + """Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. + Users should use the data-plane REST service for interaction with vault secrets. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: The name of the vault. + :type vault_name: str + :param secret_name: The name of the secret. + :type secret_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Secret, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Secret + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Secret"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'secretName': self._serialize.url("secret_name", secret_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Secret', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + vault_name, # type: str + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SecretListResult"] + """The List operation gets information about the secrets in a vault. NOTE: This API is intended + for internal use in ARM deployments. Users should use the data-plane REST service for + interaction with vault secrets. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: The name of the vault. + :type vault_name: str + :param top: Maximum number of results to return. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecretListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.SecretListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecretListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SecretListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_public_ip_addresses_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_vaults_operations.py similarity index 57% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_public_ip_addresses_operations.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_vaults_operations.py index f2c82784c7ce..ac58e909351a 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_public_ip_addresses_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/operations/_vaults_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class PublicIPAddressesOperations(object): - """PublicIPAddressesOperations operations. +class VaultsOperations(object): + """VaultsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.keyvault.v2021_06_01_preview.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,25 +47,28 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def _create_or_update_initial( self, resource_group_name, # type: str - public_ip_address_name, # type: str + vault_name, # type: str + parameters, # type: "_models.VaultCreateOrUpdateParameters" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.Vault" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,54 +79,70 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('Vault', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Vault', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore - def begin_delete( + def begin_create_or_update( self, resource_group_name, # type: str - public_ip_address_name, # type: str + vault_name, # type: str + parameters, # type: "_models.VaultCreateOrUpdateParameters" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified public IP address. + # type: (...) -> LROPoller["_models.Vault"] + """Create or update a key vault in the specified subscription. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the Resource Group to which the server belongs. :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. - :type public_ip_address_name: str + :param vault_name: Name of the vault. + :type vault_name: str + :param parameters: Parameters to create or update the vault. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either Vault or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.keyvault.v2021_06_01_preview.models.Vault] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, + vault_name=vault_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -132,12 +151,15 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Vault', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -153,42 +175,43 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore - def get( + def update( self, resource_group_name, # type: str - public_ip_address_name, # type: str - expand=None, # type: Optional[str] + vault_name, # type: str + parameters, # type: "_models.VaultPatchParameters" **kwargs # type: Any ): - # type: (...) -> "_models.PublicIPAddress" - """Gets the specified public IP address in a specified resource group. + # type: (...) -> "_models.Vault" + """Update a key vault in the specified subscription. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the Resource Group to which the server belongs. :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str + :param vault_name: Name of the vault. + :type vault_name: str + :param parameters: Parameters to patch the vault. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultPatchParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress + :return: Vault, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Vault :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -196,51 +219,66 @@ def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VaultPatchParameters') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PublicIPAddress', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('Vault', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Vault', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore - def _create_or_update_initial( + def delete( self, resource_group_name, # type: str - public_ip_address_name, # type: str - parameters, # type: "_models.PublicIPAddress" + vault_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.PublicIPAddress" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + # type: (...) -> None + """Deletes the specified Azure key vault. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: The name of the vault to delete. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -251,126 +289,119 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PublicIPAddress') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore - def begin_create_or_update( + def get( self, resource_group_name, # type: str - public_ip_address_name, # type: str - parameters, # type: "_models.PublicIPAddress" + vault_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.PublicIPAddress"] - """Creates or updates a static or dynamic public IP address. + # type: (...) -> "_models.Vault" + """Gets the specified Azure key vault. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str - :param public_ip_address_name: The name of the public IP address. - :type public_ip_address_name: str - :param parameters: Parameters supplied to the create or update public IP address operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress + :param vault_name: The name of the vault. + :type vault_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.PublicIPAddress] - :raises ~azure.core.exceptions.HttpResponseError: + :return: Vault, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.Vault + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + # Construct URL + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } + url = self._client.format_url(url, **path_format_arguments) - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - def _update_tags_initial( + deserialized = self._deserialize('Vault', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}'} # type: ignore + + def update_access_policy( self, resource_group_name, # type: str - public_ip_address_name, # type: str - parameters, # type: "_models.TagsObject" + vault_name, # type: str + operation_kind, # type: Union[str, "_models.AccessPolicyUpdateKind"] + parameters, # type: "_models.VaultAccessPolicyParameters" **kwargs # type: Any ): - # type: (...) -> "_models.PublicIPAddress" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + # type: (...) -> "_models.VaultAccessPolicyParameters" + """Update access policies in a key vault in the specified subscription. + + :param resource_group_name: The name of the Resource Group to which the vault belongs. + :type resource_group_name: str + :param vault_name: Name of the vault. + :type vault_name: str + :param operation_kind: Name of the operation. + :type operation_kind: str or ~azure.mgmt.keyvault.v2021_06_01_preview.models.AccessPolicyUpdateKind + :param parameters: Access policy to merge into the vault. + :type parameters: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultAccessPolicyParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VaultAccessPolicyParameters, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultAccessPolicyParameters + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VaultAccessPolicyParameters"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-06-01-preview" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_access_policy.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'operationKind': self._serialize.url("operation_kind", operation_kind, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -385,115 +416,54 @@ def _update_tags_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') + body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PublicIPAddress', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('VaultAccessPolicyParameters', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VaultAccessPolicyParameters', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + update_access_policy.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/accessPolicies/{operationKind}'} # type: ignore - def begin_update_tags( + def list_by_resource_group( self, resource_group_name, # type: str - public_ip_address_name, # type: str - parameters, # type: "_models.TagsObject" + top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.PublicIPAddress"] - """Updates public IP address tags. + # type: (...) -> Iterable["_models.VaultListResult"] + """The List operation gets information about the vaults associated with the subscription and + within the specified resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str - :param public_ip_address_name: The name of the public IP address. - :type public_ip_address_name: str - :param parameters: Parameters supplied to update public IP address tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.PublicIPAddress] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - def list_all( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets all the public IP addresses in a subscription. - + :param top: Maximum number of results to return. + :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.PublicIPAddressListResult] + :return: An iterator like instance of either VaultListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VaultListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -502,13 +472,16 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) @@ -519,7 +492,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + deserialized = self._deserialize('VaultListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -540,30 +513,30 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults'} # type: ignore - def list( + def list_by_subscription( self, - resource_group_name, # type: str + top=None, # type: Optional[int] **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets all public IP addresses in a resource group. + # type: (...) -> Iterable["_models.VaultListResult"] + """The List operation gets information about the vaults associated with the subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str + :param top: Maximum number of results to return. + :type top: int :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.PublicIPAddressListResult] + :return: An iterator like instance of either VaultListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VaultListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -572,14 +545,15 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_subscription.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) @@ -590,7 +564,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + deserialized = self._deserialize('VaultListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -611,33 +585,27 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/vaults'} # type: ignore - def list_virtual_machine_scale_set_public_ip_addresses( + def list_deleted( self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets information about all public IP addresses on a virtual machine scale set level. + # type: (...) -> Iterable["_models.DeletedVaultListResult"] + """Gets information about the deleted vaults in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.PublicIPAddressListResult] + :return: An iterator like instance of either DeletedVaultListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedVaultListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedVaultListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -646,10 +614,8 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_public_ip_addresses.metadata['url'] # type: ignore + url = self.list_deleted.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -665,7 +631,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + deserialized = self._deserialize('DeletedVaultListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -686,43 +652,200 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses'} # type: ignore + list_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/deletedVaults'} # type: ignore - def list_virtual_machine_scale_set_vm_public_ip_addresses( + def get_deleted( self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str - network_interface_name, # type: str - ip_configuration_name, # type: str + vault_name, # type: str + location, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets information about all public IP addresses in a virtual machine IP configuration in a - virtual machine scale set. + # type: (...) -> "_models.DeletedVault" + """Gets the deleted Azure key vault. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The network interface name. - :type network_interface_name: str - :param ip_configuration_name: The IP configuration name. - :type ip_configuration_name: str + :param vault_name: The name of the vault. + :type vault_name: str + :param location: The location of the deleted vault. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DeletedVault, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.DeletedVault + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DeletedVault"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self.get_deleted.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DeletedVault', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}'} # type: ignore + + def _purge_deleted_initial( + self, + vault_name, # type: str + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + # Construct URL + url = self._purge_deleted_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _purge_deleted_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'} # type: ignore + + def begin_purge_deleted( + self, + vault_name, # type: str + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Permanently deletes the specified vault. aka Purges the deleted Azure key vault. + + :param vault_name: The name of the soft-deleted vault. + :type vault_name: str + :param location: The location of the soft-deleted vault. + :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.PublicIPAddressListResult] + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._purge_deleted_initial( + vault_name=vault_name, + location=location, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_purge_deleted.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/locations/{location}/deletedVaults/{vaultName}/purge'} # type: ignore + + def list( + self, + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceListResult"] + """The List operation gets information about the vaults associated with the subscription. + + :param top: Maximum number of results to return. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_06_01_preview.models.ResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + filter = "resourceType eq 'Microsoft.KeyVault/vaults'" + api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -731,18 +854,16 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_vm_public_ip_addresses.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) @@ -753,7 +874,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + deserialized = self._deserialize('ResourceListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -774,58 +895,35 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_vm_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} # type: ignore - def get_virtual_machine_scale_set_public_ip_address( + def check_name_availability( self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str - network_interface_name, # type: str - ip_configuration_name, # type: str - public_ip_address_name, # type: str - expand=None, # type: Optional[str] + vault_name, # type: "_models.VaultCheckNameAvailabilityParameters" **kwargs # type: Any ): - # type: (...) -> "_models.PublicIPAddress" - """Get the specified public IP address in a virtual machine scale set. + # type: (...) -> "_models.CheckNameAvailabilityResult" + """Checks that the vault name is valid and is not already in use. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the IP configuration. - :type ip_configuration_name: str - :param public_ip_address_name: The name of the public IP Address. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str + :param vault_name: The name of the vault. + :type vault_name: ~azure.mgmt.keyvault.v2021_06_01_preview.models.VaultCheckNameAvailabilityParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress + :return: CheckNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2021_06_01_preview.models.CheckNameAvailabilityResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CheckNameAvailabilityResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-06-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_virtual_machine_scale_set_public_ip_address.metadata['url'] # type: ignore + url = self.check_name_availability.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -833,14 +931,16 @@ def get_virtual_machine_scale_set_public_ip_address( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -848,10 +948,10 @@ def get_virtual_machine_scale_set_public_ip_address( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PublicIPAddress', pipeline_response) + deserialized = self._deserialize('CheckNameAvailabilityResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_virtual_machine_scale_set_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore + check_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/py.typed b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_06_01_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests.yml b/sdk/keyvault/azure-mgmt-keyvault/tests.yml index ab7cf24f252e..a234ac63d9fe 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests.yml +++ b/sdk/keyvault/azure-mgmt-keyvault/tests.yml @@ -5,7 +5,6 @@ stages: parameters: ServiceDirectory: keyvault BuildTargetingString: azure-mgmt-keyvault - AllocateResourceGroup: true EnvVars: AZURE_TEST_RUN_LIVE: true AZURE_SUBSCRIPTION_ID: $(azure-subscription-id) diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault.test_keyvault.yaml b/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault.test_keyvault.yaml index 74e03700d330..6dc2d0d75b8b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault.test_keyvault.yaml +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault.test_keyvault.yaml @@ -22,7 +22,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 @@ -37,7 +37,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 26 Aug 2021 05:40:00 GMT + - Thu, 11 Nov 2021 03:22:15 GMT expires: - '-1' pragma: @@ -55,7 +55,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-ms-ratelimit-remaining-subscription-writes: - '1199' x-powered-by: @@ -73,7 +73,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 @@ -88,7 +88,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 26 Aug 2021 05:40:30 GMT + - Thu, 11 Nov 2021 03:22:45 GMT expires: - '-1' pragma: @@ -106,7 +106,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-powered-by: - ASP.NET status: @@ -128,7 +128,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz/accessPolicies/add?api-version=2019-09-01 @@ -143,7 +143,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 26 Aug 2021 05:40:31 GMT + - Thu, 11 Nov 2021 03:22:45 GMT expires: - '-1' pragma: @@ -161,7 +161,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-ms-ratelimit-remaining-subscription-writes: - '1198' x-powered-by: @@ -179,7 +179,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 @@ -194,7 +194,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 26 Aug 2021 05:40:31 GMT + - Thu, 11 Nov 2021 03:22:45 GMT expires: - '-1' pragma: @@ -212,7 +212,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-powered-by: - ASP.NET status: @@ -232,7 +232,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 @@ -247,7 +247,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 26 Aug 2021 05:40:31 GMT + - Thu, 11 Nov 2021 03:22:46 GMT expires: - '-1' pragma: @@ -265,7 +265,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-ms-ratelimit-remaining-subscription-writes: - '1197' x-powered-by: @@ -287,7 +287,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/checkNameAvailability?api-version=2019-09-01 @@ -309,7 +309,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 26 Aug 2021 05:40:32 GMT + - Thu, 11 Nov 2021 03:22:47 GMT expires: - '-1' pragma: @@ -327,7 +327,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.79.0 + - 1.5.166.0 x-powered-by: - ASP.NET status: @@ -345,7 +345,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 @@ -358,7 +358,7 @@ interactions: content-length: - '0' date: - - Thu, 26 Aug 2021 05:40:35 GMT + - Thu, 11 Nov 2021 03:22:51 GMT expires: - '-1' pragma: @@ -372,7 +372,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-ms-ratelimit-remaining-subscription-deletes: - '14999' x-powered-by: @@ -390,13 +390,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxz?api-version=2019-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxz","name":"myValtZikfikxz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz","location":"eastus","tags":{},"deletionDate":"2021-08-26T05:40:32Z","scheduledPurgeDate":"2021-11-24T05:40:32Z"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxz","name":"myValtZikfikxz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz","location":"eastus","tags":{},"deletionDate":"2021-11-11T03:22:48Z","scheduledPurgeDate":"2022-02-09T03:22:48Z"}}' headers: cache-control: - no-cache @@ -405,7 +405,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 26 Aug 2021 05:40:35 GMT + - Thu, 11 Nov 2021 03:22:51 GMT expires: - '-1' pragma: @@ -423,7 +423,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-powered-by: - ASP.NET status: @@ -441,7 +441,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxz/purge?api-version=2019-09-01 @@ -454,11 +454,11 @@ interactions: content-length: - '0' date: - - Thu, 26 Aug 2021 05:40:36 GMT + - Thu, 11 Nov 2021 03:22:52 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMjM3MTExNzY5NHw4MkZERDdBODYxRDI0N0JDODMwQjlBQUJBNTQ2Q0VCNQ?api-version=2019-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3NzczNzE0MjgyMXwwMUEwMkZCMkM1QjA0MzVEOTQ5QTYwNjc1MUI3MUNBMQ?api-version=2019-09-01 pragma: - no-cache server: @@ -470,7 +470,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-ms-ratelimit-remaining-subscription-writes: - '1199' x-powered-by: @@ -488,13 +488,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMjM3MTExNzY5NHw4MkZERDdBODYxRDI0N0JDODMwQjlBQUJBNTQ2Q0VCNQ?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3NzczNzE0MjgyMXwwMUEwMkZCMkM1QjA0MzVEOTQ5QTYwNjc1MUI3MUNBMQ?api-version=2019-09-01 response: body: - string: '{"createdDateTime":"2021-08-26 05:40:36Z","status":"NotStarted"}' + string: '{"createdDateTime":"2021-11-11 03:22:52Z","status":"NotStarted"}' headers: cache-control: - no-cache @@ -503,11 +503,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 26 Aug 2021 05:40:41 GMT + - Thu, 11 Nov 2021 03:22:57 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMjM3MTExNzY5NHw4MkZERDdBODYxRDI0N0JDODMwQjlBQUJBNTQ2Q0VCNQ?api-version=2019-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3NzczNzE0MjgyMXwwMUEwMkZCMkM1QjA0MzVEOTQ5QTYwNjc1MUI3MUNBMQ?api-version=2019-09-01 pragma: - no-cache server: @@ -519,7 +519,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-powered-by: - ASP.NET status: @@ -535,14 +535,61 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMjM3MTExNzY5NHw4MkZERDdBODYxRDI0N0JDODMwQjlBQUJBNTQ2Q0VCNQ?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3NzczNzE0MjgyMXwwMUEwMkZCMkM1QjA0MzVEOTQ5QTYwNjc1MUI3MUNBMQ?api-version=2019-09-01 response: body: - string: '{"createdDateTime":"2021-08-26 05:40:36Z","lastActionDateTime":"2021-08-26 - 05:40:43Z","status":"Succeeded"}' + string: '{"createdDateTime":"2021-11-11 03:22:52Z","status":"NotStarted"}' + headers: + cache-control: + - no-cache + content-length: + - '64' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 11 Nov 2021 03:23:02 GMT + expires: + - '-1' + location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3NzczNzE0MjgyMXwwMUEwMkZCMkM1QjA0MzVEOTQ5QTYwNjc1MUI3MUNBMQ?api-version=2019-09-01 + pragma: + - no-cache + server: + - Microsoft-IIS/10.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-aspnet-version: + - 4.0.30319 + x-content-type-options: + - nosniff + x-ms-keyvault-service-version: + - 1.5.166.0 + x-powered-by: + - ASP.NET + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3NzczNzE0MjgyMXwwMUEwMkZCMkM1QjA0MzVEOTQ5QTYwNjc1MUI3MUNBMQ?api-version=2019-09-01 + response: + body: + string: '{"createdDateTime":"2021-11-11 03:22:52Z","lastActionDateTime":"2021-11-11 + 03:23:04Z","status":"Succeeded"}' headers: cache-control: - no-cache @@ -551,7 +598,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Thu, 26 Aug 2021 05:40:46 GMT + - Thu, 11 Nov 2021 03:23:07 GMT expires: - '-1' pragma: @@ -569,7 +616,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.5.99.0 + - 1.5.166.0 x-powered-by: - ASP.NET status: diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault_async.test_keyvault.yaml b/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault_async.test_keyvault.yaml index b856542783d4..0750ab4bac20 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault_async.test_keyvault.yaml +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault_async.test_keyvault.yaml @@ -18,7 +18,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 @@ -28,7 +28,7 @@ interactions: headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:40:51 GMT + date: Thu, 11 Nov 2021 03:23:52 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -37,18 +37,18 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-ms-ratelimit-remaining-subscription-writes: '1199' x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-7lyvyztmydsugni7jmvaz3a5pqb6n7qvzpc33nalbgnmsiwfg67q7fc25j4s3m4bhpz2iqlcmcm/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-oki3vdpuzsrlp2drr44bzadzf73hamdbsfuzosnrblog3xllclxo636zsuxtu2x6m74ywduzjaq/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 @@ -58,7 +58,7 @@ interactions: headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:21 GMT + date: Thu, 11 Nov 2021 03:24:22 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -67,12 +67,12 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-7lyvyztmydsugni7jmvaz3a5pqb6n7qvzpc33nalbgnmsiwfg67q7fc25j4s3m4bhpz2iqlcmcm/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-oki3vdpuzsrlp2drr44bzadzf73hamdbsfuzosnrblog3xllclxo636zsuxtu2x6m74ywduzjaq/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: '{"properties": {"accessPolicies": [{"tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", "objectId": "00000000-0000-0000-0000-000000000000", "permissions": {"keys": @@ -85,7 +85,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz/accessPolicies/add?api-version=2019-09-01 @@ -95,7 +95,7 @@ interactions: headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:22 GMT + date: Thu, 11 Nov 2021 03:24:23 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -104,20 +104,20 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-ms-ratelimit-remaining-subscription-writes: '1199' x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-7lyvyztmydsugni7jmvaz3a5pqb6n7qvzpc33nalbgnmsiwfg67q7fc25j4s3m4bhpz2iqlcmcm/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz/accessPolicies/add?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-oki3vdpuzsrlp2drr44bzadzf73hamdbsfuzosnrblog3xllclxo636zsuxtu2x6m74ywduzjaq/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz/accessPolicies/add?api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 @@ -127,7 +127,7 @@ interactions: headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:22 GMT + date: Thu, 11 Nov 2021 03:24:23 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -136,29 +136,29 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-7lyvyztmydsugni7jmvaz3a5pqb6n7qvzpc33nalbgnmsiwfg67q7fc25j4s3m4bhpz2iqlcmcm/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-oki3vdpuzsrlp2drr44bzadzf73hamdbsfuzosnrblog3xllclxo636zsuxtu2x6m74ywduzjaq/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Tm9uZSxiWGxXWVd4MFdtbHJabWxyZUhsNmVnPT0="}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,bXlWYWx0WmlrZmlreHl6eg=="}' headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:22 GMT + date: Thu, 11 Nov 2021 03:24:23 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -167,29 +167,29 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-7lyvyztmydsugni7jmvaz3a5pqb6n7qvzpc33nalbgnmsiwfg67q7fc25j4s3m4bhpz2iqlcmcm/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-oki3vdpuzsrlp2drr44bzadzf73hamdbsfuzosnrblog3xllclxo636zsuxtu2x6m74ywduzjaq/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Tm9uZSxiWGxXWVd4MFdtbHJabWxyZUhsNmVnPT0= + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,bXlWYWx0WmlrZmlreHl6eg== response: body: string: '{"value":[]}' headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:22 GMT + date: Thu, 11 Nov 2021 03:24:24 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -198,36 +198,36 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-7lyvyztmydsugni7jmvaz3a5pqb6n7qvzpc33nalbgnmsiwfg67q7fc25j4s3m4bhpz2iqlcmcm/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Tm9uZSxiWGxXWVd4MFdtbHJabWxyZUhsNmVnPT0= + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-oki3vdpuzsrlp2drr44bzadzf73hamdbsfuzosnrblog3xllclxo636zsuxtu2x6m74ywduzjaq/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,bXlWYWx0WmlrZmlreHl6eg== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv0824","name":"bez-kv0824","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv0824","location":"eastus","tags":{},"deletionDate":"2021-08-24T11:07:05Z","scheduledPurgeDate":"2021-11-22T11:07:05Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-pzrim2n","name":"cli-test-kv-mgmt-pzrim2n","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtafrmc2k5y7ybxpw7tkjlizn3dq3lneh77f3vfjhuclte3d7kkswfm/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-pzrim2n","location":"eastus","tags":{},"deletionDate":"2021-08-19T21:40:45Z","scheduledPurgeDate":"2021-11-17T21:40:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultbrffu4s","name":"cmk-test-keyvaultbrffu4s","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgecm6lfxcdkglnmvak7sf7qsrrd3jcfj42jgatpasq5rjmzxooad2qsfzwm4gipzri/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultbrffu4s","location":"eastus","tags":{},"deletionDate":"2021-08-19T19:13:13Z","scheduledPurgeDate":"2021-11-17T19:13:13Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv081802","name":"bez-kv081802","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081802","location":"eastus","tags":{},"deletionDate":"2021-08-18T11:06:07Z","scheduledPurgeDate":"2021-11-16T11:06:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv081801","name":"bez-kv081801","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081801","location":"eastus","tags":{},"deletionDate":"2021-08-18T11:06:07Z","scheduledPurgeDate":"2021-11-16T11:06:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-zpic2a7ua4pybi","name":"vault-zpic2a7ua4pybi","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgef6z24vm2qzm7ktbam5kyleenx74ydsjaioi3b3czt5ixfniyswywzh4u4yhplown/providers/Microsoft.KeyVault/vaults/vault-zpic2a7ua4pybi","location":"eastus2","tags":{},"deletionDate":"2021-08-20T03:26:25Z","scheduledPurgeDate":"2021-08-27T03:26:25Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envault4uirozg3qb53bljio","name":"envault4uirozg3qb53bljio","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgix2kwcffm7pbrnrlpsgxwxa7wncztxqmfyoz6wbzjpizlwbopnhejkz2ublpwvfft/providers/Microsoft.KeyVault/vaults/envault4uirozg3qb53bljio","location":"eastus2","tags":{},"deletionDate":"2021-08-20T01:52:29Z","scheduledPurgeDate":"2021-11-18T01:52:29Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envault2gyrypdbob2qcw5az","name":"envault2gyrypdbob2qcw5az","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgvutty2wzobujsddcjbqnisu34h7nq4rsroriz6s4muixug4t2elbq7fe333hu2dyj/providers/Microsoft.KeyVault/vaults/envault2gyrypdbob2qcw5az","location":"eastus2","tags":{},"deletionDate":"2021-08-20T01:39:23Z","scheduledPurgeDate":"2021-11-18T01:39:23Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-vkz552zpb","name":"cli-test-kv-nr-vkz552zpb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulepj46rajvz4tjixw64i33wvy3bgyqp5q3zovawd7ddcxau/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-vkz552zpb","location":"eastus2","tags":{},"deletionDate":"2021-08-19T21:46:46Z","scheduledPurgeDate":"2021-11-17T21:46:46Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ul4t5dzde","name":"cli-test-kv-nr-ul4t5dzde","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulepj46rajvz4tjixw64i33wvy3bgyqp5q3zovawd7ddcxau/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ul4t5dzde","location":"eastus2","tags":{},"deletionDate":"2021-08-19T21:46:46Z","scheduledPurgeDate":"2021-11-17T21:46:46Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitestxocttmm4ciksek67r","name":"clitestxocttmm4ciksek67r","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg2gtkradqhwkrmq2onfr7dsgogumyldvyuejpalrgxenke2bxh5vcp4obcy6jdchkk/providers/Microsoft.KeyVault/vaults/clitestxocttmm4ciksek67r","location":"centralus","tags":{},"deletionDate":"2021-08-19T19:08:31Z","scheduledPurgeDate":"2021-08-26T19:08:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitest24gjhh4szyo623vet","name":"clitest24gjhh4szyo623vet","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjwq7pklbuf45dfd3kmt34nvze3hijp3s7z2iqcuiq6jqwrlvlkkww7izf4dypugup/providers/Microsoft.KeyVault/vaults/clitest24gjhh4szyo623vet","location":"centralus","tags":{},"deletionDate":"2021-07-12T09:58:59Z","scheduledPurgeDate":"2021-10-10T09:58:59Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitest6mbmglcaclpp4ylj6","name":"clitest6mbmglcaclpp4ylj6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg7ilieoel6gd6bqvj7cw4cha6ek3baggzbky7lcr7uuu4ocwoc2cch4ukskcwqm3jk/providers/Microsoft.KeyVault/vaults/clitest6mbmglcaclpp4ylj6","location":"centralus","tags":{},"deletionDate":"2021-07-08T19:06:50Z","scheduledPurgeDate":"2021-10-06T19:06:50Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitestxfdejbvx4dlsocyth","name":"clitestxfdejbvx4dlsocyth","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgyvq7mbwc7azcl226zul7qdbgyccrfo7cgoqdt4mla7tkeadaqqy6ggh36nwdpuh74/providers/Microsoft.KeyVault/vaults/clitestxfdejbvx4dlsocyth","location":"centralus","tags":{},"deletionDate":"2021-07-01T19:06:55Z","scheduledPurgeDate":"2021-09-29T19:06:55Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitestvr4p7fgp2kxplqlem","name":"clitestvr4p7fgp2kxplqlem","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4lhii6wqsbrjqirn67risdsux33rha7y5o6r5keuspt742ugqtohslzccnnvkwng2/providers/Microsoft.KeyVault/vaults/clitestvr4p7fgp2kxplqlem","location":"centralus","tags":{},"deletionDate":"2021-06-28T06:31:24Z","scheduledPurgeDate":"2021-09-26T06:31:24Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestzap4w4r2j4zz56zzj","name":"clitestzap4w4r2j4zz56zzj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgg3fb3u5kd3g2dtsrvf3t2yicddbpvwdvq3y7sd7kggmfrvlfekbrk6bbuz5be5oyb/providers/Microsoft.KeyVault/vaults/clitestzap4w4r2j4zz56zzj","location":"southcentralus","tags":{},"deletionDate":"2021-08-20T01:53:51Z","scheduledPurgeDate":"2021-11-18T01:53:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestqliihrggwk2vqbaen","name":"clitestqliihrggwk2vqbaen","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgn7mhtp7vu24h62sza5slpmuajzmwixi7pdinfltxomdhsoss242attuo2dz3lpg7e/providers/Microsoft.KeyVault/vaults/clitestqliihrggwk2vqbaen","location":"southcentralus","tags":{},"deletionDate":"2021-08-13T00:57:37Z","scheduledPurgeDate":"2021-11-11T00:57:37Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitest4jmgvo4anapclf5ke","name":"clitest4jmgvo4anapclf5ke","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5mfi5qpv3r4mnu46cousutpghslt2m3ld63ajn3bk6tdgvdzgwbnzzfqfrerl6ro5/providers/Microsoft.KeyVault/vaults/clitest4jmgvo4anapclf5ke","location":"southcentralus","tags":{},"deletionDate":"2021-08-06T05:21:01Z","scheduledPurgeDate":"2021-11-04T05:21:01Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestqm433uzpk4fppwaxt","name":"clitestqm433uzpk4fppwaxt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg33zfduhnluo7l3q7xwoqizjjotarc5orqyxnk56ocen2om4d4ys4hbtwc7j3zyvx6/providers/Microsoft.KeyVault/vaults/clitestqm433uzpk4fppwaxt","location":"southcentralus","tags":{},"deletionDate":"2021-07-30T02:15:05Z","scheduledPurgeDate":"2021-10-28T02:15:05Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestps5qptd76cprjnqxo","name":"clitestps5qptd76cprjnqxo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg444tzd5qabgwkhbsydvb373vznywjatydi3blcoebzqabv6mtxpqnpf37udojougo/providers/Microsoft.KeyVault/vaults/clitestps5qptd76cprjnqxo","location":"southcentralus","tags":{},"deletionDate":"2021-07-23T03:02:20Z","scheduledPurgeDate":"2021-10-21T03:02:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envaultcpw75jihsqnfh3ked","name":"envaultcpw75jihsqnfh3ked","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryptionxjl2hvpge5bwqwzin7qc2jkkdbfd44esdcku65n6qdnilojb/providers/Microsoft.KeyVault/vaults/envaultcpw75jihsqnfh3ked","location":"westus","tags":{},"deletionDate":"2021-08-20T02:04:11Z","scheduledPurgeDate":"2021-08-27T02:04:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cli4fadbfmetrgx","name":"cli4fadbfmetrgx","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespaceiqtiswsh3cfxbiysr2vhhqxvj5zbcv5o4s7p7wxaebjnjxfno5roqs/providers/Microsoft.KeyVault/vaults/cli4fadbfmetrgx","location":"westus","tags":{},"deletionDate":"2021-08-19T21:22:52Z","scheduledPurgeDate":"2021-08-26T21:22:52Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitestzxvca2uo77ewnsq2o","name":"clitestzxvca2uo77ewnsq2o","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgevc25tgvm3ty4z2oj5dpribmhabll5shrbh5snr7svllf4mevdw2ipr7tuiwhqkyt/providers/Microsoft.KeyVault/vaults/clitestzxvca2uo77ewnsq2o","location":"westus","tags":{},"deletionDate":"2021-08-19T20:17:49Z","scheduledPurgeDate":"2021-08-26T20:17:49Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitestuxl53vdfznzkzeasv","name":"clitestuxl53vdfznzkzeasv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgb5amdbyzt52mthjbfjymrgmmdezrupu476azoc6ewkpvbwqm62z7zmmyzdn4vebzu/providers/Microsoft.KeyVault/vaults/clitestuxl53vdfznzkzeasv","location":"westus","tags":{},"deletionDate":"2021-08-19T19:07:08Z","scheduledPurgeDate":"2021-08-26T19:07:08Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/kv0810","name":"kv0810","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg0810/providers/Microsoft.KeyVault/vaults/kv0810","location":"westus","tags":{},"deletionDate":"2021-08-10T11:17:24Z","scheduledPurgeDate":"2021-11-08T11:17:24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testxvkyflzcr","name":"kv-ssl-testxvkyflzcr","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg7szxdhfcoqgejrmjnbvwmvv3a4zquchpzeshz2325z6k2brrcc4z646xucmiwdook/providers/Microsoft.KeyVault/vaults/kv-ssl-testxvkyflzcr","location":"japanwest","tags":{},"deletionDate":"2021-08-19T20:04:11Z","scheduledPurgeDate":"2021-11-17T20:04:11Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-tests65t3jedu","name":"kv-ssl-tests65t3jedu","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgykm4ukwtyulyinabxy7wg7s5f27mmljqcp6thqcvxna54ydqt6ifcjoqoxlnmxnpk/providers/Microsoft.KeyVault/vaults/kv-ssl-tests65t3jedu","location":"japanwest","tags":{},"deletionDate":"2021-08-12T20:04:55Z","scheduledPurgeDate":"2021-11-10T20:04:55Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southindia/deletedVaults/clibatchtestkv5xw2t2zt25","name":"clibatchtestkv5xw2t2zt25","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxij76txeohanono6y6v6tc454pc6jbk6w2dtnqmdjthwdzlhb7dafudbc4hbay6g4/providers/Microsoft.KeyVault/vaults/clibatchtestkv5xw2t2zt25","location":"southindia","tags":{},"deletionDate":"2021-08-19T20:24:51Z","scheduledPurgeDate":"2021-11-17T20:24:51Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southindia/deletedVaults/clibatchtestkv4hlnmbju3b","name":"clibatchtestkv4hlnmbju3b","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5tqv4v7dl6zbzuyf65nokzpfgtqqzus2t6gsflzw6mwridtde4zmmokxkbt7vltsm/providers/Microsoft.KeyVault/vaults/clibatchtestkv4hlnmbju3b","location":"southindia","tags":{},"deletionDate":"2021-08-12T20:21:03Z","scheduledPurgeDate":"2021-11-10T20:21:03Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-4ykqlklu3c7hk","name":"vault3-4ykqlklu3c7hk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_u5ezsx2ojdiv4xav5gadpmry4aluiv6oph/providers/Microsoft.KeyVault/vaults/vault3-4ykqlklu3c7hk","location":"westcentralus","tags":{},"deletionDate":"2021-08-20T02:36:54Z","scheduledPurgeDate":"2021-08-27T02:36:54Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-qyr3agm2zsha77","name":"vault-qyr3agm2zsha77","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_prgbmbhhwlqiagvddxt4g3bgw6w2pwcrmgnnek3gfvr3hw/providers/Microsoft.KeyVault/vaults/vault-qyr3agm2zsha77","location":"westcentralus","tags":{},"deletionDate":"2021-08-20T02:35:00Z","scheduledPurgeDate":"2021-08-27T02:35:00Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-d4dcstusrh5la","name":"vault4-d4dcstusrh5la","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_ie2r4wueglxjlh3qkzv6dtn6qz5kkeraylovl/providers/Microsoft.KeyVault/vaults/vault4-d4dcstusrh5la","location":"westcentralus","tags":{},"deletionDate":"2021-08-20T02:32:55Z","scheduledPurgeDate":"2021-08-27T02:32:55Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-g7f6ntl4m52cn","name":"vault1-g7f6ntl4m52cn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_u4mddqf53o4hruytevhgdb2oa5no6eijgnqmlzr/providers/Microsoft.KeyVault/vaults/vault1-g7f6ntl4m52cn","location":"westcentralus","tags":{},"deletionDate":"2021-08-20T02:30:35Z","scheduledPurgeDate":"2021-08-27T02:30:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-mifkawzctelvi","name":"vault2-mifkawzctelvi","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_u4mddqf53o4hruytevhgdb2oa5no6eijgnqmlzr/providers/Microsoft.KeyVault/vaults/vault2-mifkawzctelvi","location":"westcentralus","tags":{},"deletionDate":"2021-08-20T02:30:31Z","scheduledPurgeDate":"2021-08-27T02:30:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulttun5diw","name":"keyVaulttun5diw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnr4ehdfgei/providers/Microsoft.KeyVault/vaults/keyVaulttun5diw","location":"westus2","tags":{},"deletionDate":"2021-08-19T20:48:18Z","scheduledPurgeDate":"2021-11-17T20:48:18Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultz2yrtyn","name":"keyVaultz2yrtyn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4dtcg4z7mo/providers/Microsoft.KeyVault/vaults/keyVaultz2yrtyn","location":"westus2","tags":{},"deletionDate":"2021-08-19T20:47:04Z","scheduledPurgeDate":"2021-11-17T20:47:04Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultvk3fdop","name":"keyVaultvk3fdop","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgc3ywvimwdb/providers/Microsoft.KeyVault/vaults/keyVaultvk3fdop","location":"westus2","tags":{},"deletionDate":"2021-08-19T20:46:20Z","scheduledPurgeDate":"2021-11-17T20:46:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskv7hlxmbm2g67r","name":"cliakskv7hlxmbm2g67r","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestwnw54i6ski/providers/Microsoft.KeyVault/vaults/cliakskv7hlxmbm2g67r","location":"westus2","tags":{},"deletionDate":"2021-08-19T19:49:47Z","scheduledPurgeDate":"2021-11-17T19:49:47Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultunwbbjo","name":"keyVaultunwbbjo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4ntrijpauk/providers/Microsoft.KeyVault/vaults/keyVaultunwbbjo","location":"westus2","tags":{},"deletionDate":"2021-08-12T20:48:17Z","scheduledPurgeDate":"2021-11-10T20:48:17Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestqqoufb4h22yrdasho","name":"clitestqqoufb4h22yrdasho","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfbb4j2nahv4mrumlbcikpvdfbo4plc4dhsaxzmuzkrvabszvvchqzxahmwsc2sto5/providers/Microsoft.KeyVault/vaults/clitestqqoufb4h22yrdasho","location":"eastus2euap","tags":{},"deletionDate":"2021-08-20T01:59:31Z","scheduledPurgeDate":"2021-11-18T01:59:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestexoorqdzov2sniufl","name":"clitestexoorqdzov2sniufl","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgdlxydn7uh53lzbwbonmqyf5zkdfbuwpcn27msqzn7ikmogeoxjpjwdvk76hpi6tg2/providers/Microsoft.KeyVault/vaults/clitestexoorqdzov2sniufl","location":"eastus2euap","tags":{},"deletionDate":"2021-08-13T01:04:41Z","scheduledPurgeDate":"2021-11-11T01:04:41Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitesty2gic4uihywyqmetu","name":"clitesty2gic4uihywyqmetu","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgntv3yhfjonqwkvolllkynetn57voxyy7ywm7tz7qir5h3hbjdyjuiopnj4sjx7jzh/providers/Microsoft.KeyVault/vaults/clitesty2gic4uihywyqmetu","location":"eastus2euap","tags":{},"deletionDate":"2021-08-06T05:26:02Z","scheduledPurgeDate":"2021-11-04T05:26:02Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestyickha3egcd72dsrw","name":"clitestyickha3egcd72dsrw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgionoenunve4ku32w2imn2mv7jauk736xecej6pseoi6fd5mqbn4ta4tsc7ane3cvt/providers/Microsoft.KeyVault/vaults/clitestyickha3egcd72dsrw","location":"eastus2euap","tags":{},"deletionDate":"2021-07-30T02:21:24Z","scheduledPurgeDate":"2021-10-28T02:21:24Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitest6eew4ykb4sgajoukg","name":"clitest6eew4ykb4sgajoukg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxamumn7v2wxnxqzrycfd6bmop7s3rohj4tdagirsv4vpvhha4mknzcjj4n7ekl5y5/providers/Microsoft.KeyVault/vaults/clitest6eew4ykb4sgajoukg","location":"eastus2euap","tags":{},"deletionDate":"2021-07-23T03:08:29Z","scheduledPurgeDate":"2021-10-21T03:08:29Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZfRbqM4GIXfJVrt1abBTcKIStUqbe20dIDE2H8od05wJ6khoYFO0ozm3ffQViPtK0TixsKA%2fOmc8x9%2b9bb22H7fbF3Tu%2frV45NU6bR31Vu3bd1cDQaV2ZoftrLb9sKc3vb2YrWrBs3bslntN3W72W2bgbdkz%2f7oG%2buz5bPXHxWF6Ru7GvZXy%2bDy2%2bWzF4wDb1Dvdz83hd03g2iz2u%2ba3XN78WjfybyV7aCwpW1t8bFo%2fjX1pv8TO%2fHy60uPBX0PF%2fv7r8bhiztnt9eqCt7y9EiG5Zku80cSIWmXa0k5aabHyjvSUlAluTsqki%2bRx%2fx5tk6ME75a1NK6sT9XIpZ8NFJO7iM%2b3i8UJXgJU9s6j%2fSYL7K1NF4tlCPC%2blW5OLZV9K6yOpU6EEp5171%2fvoBdniGx1%2fxEMXHNcGKyHARAyJZPI%2bXJZO6NdZoVMuL1ra5qEB4Lna1jOV1PVdXGMQ94fgpBkI30ohYRZ7T4JHbLYyUn389RZWNfZ%2fVMTtuRKqUsvDE3YCin8xEYQTVgAEamKobayUfJoTJHcdQxdtLNS6HNcC1pGjG1aMOYQj7%2fZJYmWt2fMzidKohN8KNiUkYu4E%2fDOpHTA8TTAhTTnRiNl3OAFZEbw37gM10dYec4KoW%2fUOEMzzPtCPsDkp%2fgFvxc8%2bxpWCSm1EcAIasDLbP1TPIHKA8AKBSkblIo7E4TlAUlPp0ElLk6aHWTW%2b4dFiqWpmqHqqpz6wLxBSyczCZxR%2b0ME82nrIiNoyHcdhNr5qusjE25GylNYYyMX3TrKjog4V7gXoisc%2b%2bKKcIMoHCfZmUidS6QaHnBwtcvZh%2fufIjvHibnCo04%2bRCKtDzQ8w6Se%2bgiLbcCUFQcS3InxSiVEJrOSsS%2bOyHiTBd55HKJAS0A1UCI2P8xODuNnXGiMYzPOJFcv%2bPcWxQIX0JMthPby0069wK%2b5CGKCO%2fuN%2bAiFkqmpmqYJkpkGXb3U8NQSBjJCGtz%2bsNNp%2bdYOHytCBkOeyLTEUkaGZ%2fQ9McImR5GjmkQQmSt7zBkBeyKiAMxL7%2bFnV9sCYV1w1fQGBUORAP6f0XjejI7P3%2bihnWTk3OmtESQMxRXUECxRfDfYhBgkq6Tj4qhbkIUX04qTGl6vNeldPDrqxnWKML6gKJs5iwUX%2f78481z5NbVU4Q5VMZP4Cbwg6B1VkA98GfVkhXiNXWUEmnkGHV1V0hXoJodBbg1Uo8OH%2bor83uozSDgfOpy7ffv%2fwA%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-mpmmurj","name":"cli-test-kv-mgmt-mpmmurj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmthhhykjr2ui7zxb6hiipwct3l2eimmojs2sltjlgtm4z7bm4a46nxy/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-mpmmurj","location":"eastus","tags":{},"deletionDate":"2021-11-05T04:43:35Z","scheduledPurgeDate":"2022-02-03T04:43:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultpmntzv7","name":"cmk-test-keyvaultpmntzv7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtzpehujxxsv4ygavxn3u7wz6hc3lf4rcwkvrwvgniccvxo46ppl3u2rvyw3gqtiiy/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultpmntzv7","location":"eastus","tags":{},"deletionDate":"2021-11-05T02:13:06Z","scheduledPurgeDate":"2022-02-03T02:13:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-qeqoyzd","name":"cli-test-kv-mgmt-qeqoyzd","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtwdpwpmxjrs7elemhdmmvlor7xk3qy74vwuehqnpuedm7ho5uw4qfy/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-qeqoyzd","location":"eastus","tags":{},"deletionDate":"2021-11-04T17:48:35Z","scheduledPurgeDate":"2022-02-02T17:48:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaulttyekycs","name":"cmk-test-keyvaulttyekycs","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg42d2xtehra2sgrivyz2o4lbusej46zn2cc3fmumyzsihyuvlqnmrjt7llvapozbxf/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaulttyekycs","location":"eastus","tags":{},"deletionDate":"2021-11-04T15:13:28Z","scheduledPurgeDate":"2022-02-02T15:13:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-yqdea5y","name":"cli-test-kv-mgmt-yqdea5y","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmt36biuxvrp5u5kddnq3dxyhixqpw54ekumz2oc4hwgoihhchgp4opr/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-yqdea5y","location":"eastus","tags":{},"deletionDate":"2021-11-01T14:51:24Z","scheduledPurgeDate":"2022-01-30T14:51:24Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westeurope/deletedVaults/acctestkv-isetest66","name":"acctestkv-isetest66","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ise-test66/providers/Microsoft.KeyVault/vaults/acctestkv-isetest66","location":"westeurope","tags":{},"deletionDate":"2021-10-23T02:20:30Z","scheduledPurgeDate":"2022-01-21T02:20:30Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-hx2txhk5u5zxqx","name":"vault-hx2txhk5u5zxqx","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgyvqytc33jffqk3ldlvtrtcfr6npmvv4ggc7ijssezpiyu2hlanw7zhzc25zzrc25n/providers/Microsoft.KeyVault/vaults/vault-hx2txhk5u5zxqx","location":"eastus2","tags":{},"deletionDate":"2021-11-05T09:02:03Z","scheduledPurgeDate":"2021-11-12T09:02:03Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultlulxenbczzwn6skqj","name":"envaultlulxenbczzwn6skqj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmzm6o2incnrtyhoyiwjxyfgkmah3ea7wn46xdmbnqr2d2dwcqcnhfr2dvhztuwgyc/providers/Microsoft.KeyVault/vaults/envaultlulxenbczzwn6skqj","location":"eastus2","tags":{},"deletionDate":"2021-11-05T08:19:27Z","scheduledPurgeDate":"2022-02-03T08:19:27Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaulthuxpwf7to75dvi52o","name":"envaulthuxpwf7to75dvi52o","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjnree7mhvtomi6jljafypdutsvwjs74ozbmron6fcculfw3ojiyjgulygjqdkiij7/providers/Microsoft.KeyVault/vaults/envaulthuxpwf7to75dvi52o","location":"eastus2","tags":{},"deletionDate":"2021-11-05T08:10:29Z","scheduledPurgeDate":"2022-02-03T08:10:29Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/clibyy66unwjccu","name":"clibyy66unwjccu","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identityrbtwey4gbimb6ctwyxhjotqhmz3y7237u/providers/Microsoft.KeyVault/vaults/clibyy66unwjccu","location":"eastus2","tags":{},"deletionDate":"2021-11-05T04:51:42Z","scheduledPurgeDate":"2021-11-12T04:51:42Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ntrubfd42","name":"cli-test-kv-nr-ntrubfd42","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruled5srvbwupd7rtby6k5owh7npgobr3oozwxqa3xtvfhzos/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ntrubfd42","location":"eastus2","tags":{},"deletionDate":"2021-11-05T04:48:10Z","scheduledPurgeDate":"2022-02-03T04:48:10Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitestqxcxnttamxklga2je","name":"clitestqxcxnttamxklga2je","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwwrze6tsymeu3zmc2jk7oipgr74tulrdetup7qzlrmddqz4pnual46vefnp4akv66/providers/Microsoft.KeyVault/vaults/clitestqxcxnttamxklga2je","location":"centralus","tags":{},"deletionDate":"2021-11-05T02:08:18Z","scheduledPurgeDate":"2021-11-12T02:08:18Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitestefjtnmnnvaz7mahuz","name":"clitestefjtnmnnvaz7mahuz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg56mbo3siwuje3ozwpqphwbwhsjojiuu5a7eiwqygbo7v56mvkp4ri6rspvtjhgezw/providers/Microsoft.KeyVault/vaults/clitestefjtnmnnvaz7mahuz","location":"centralus","tags":{},"deletionDate":"2021-11-04T15:06:44Z","scheduledPurgeDate":"2021-11-11T15:06:44Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitesto2sg4oz4ikkamfzya","name":"clitesto2sg4oz4ikkamfzya","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rganz7dlxapjm56x5tdhekrgli2cbdnfxvtz5g5tmjre7xe77uwrpcu7pptrdxv3cvk/providers/Microsoft.KeyVault/vaults/clitesto2sg4oz4ikkamfzya","location":"southcentralus","tags":{},"deletionDate":"2021-11-05T08:22:15Z","scheduledPurgeDate":"2021-11-12T08:22:15Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestiqoyztkhr4sbfd3ea","name":"clitestiqoyztkhr4sbfd3ea","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rga572fiyjigmyvdcxzcrnk2rja6a7hkot5az2ci7nlcge2xgqnycnvkvg76gdbmv7t/providers/Microsoft.KeyVault/vaults/clitestiqoyztkhr4sbfd3ea","location":"southcentralus","tags":{},"deletionDate":"2021-11-04T21:55:40Z","scheduledPurgeDate":"2021-11-11T21:55:40Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestfdfn7zjjd6klkxhdc","name":"clitestfdfn7zjjd6klkxhdc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxuchfxjqpglbraedwk5v7gjfriej63tjfqfe3ofynfmiep3fk6sekx5t5jtadisff/providers/Microsoft.KeyVault/vaults/clitestfdfn7zjjd6klkxhdc","location":"southcentralus","tags":{},"deletionDate":"2021-09-10T02:21:27Z","scheduledPurgeDate":"2021-12-09T02:21:27Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestzql2a3o5axwupahrg","name":"clitestzql2a3o5axwupahrg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgthkv2o7tngwbofi4zfzwrrknzcin6wh3r45lucmzzraqqsredrsalmiwv24c2mbpw/providers/Microsoft.KeyVault/vaults/clitestzql2a3o5axwupahrg","location":"southcentralus","tags":{},"deletionDate":"2021-09-07T08:43:58Z","scheduledPurgeDate":"2021-12-06T08:43:58Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestigcdiwg2pouozfuhj","name":"clitestigcdiwg2pouozfuhj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg7xdr6uasc6gdgnrucqnn6gsatpa7crajdn4bg3gul3nqb7wce75bprpow6t7kdy3s/providers/Microsoft.KeyVault/vaults/clitestigcdiwg2pouozfuhj","location":"southcentralus","tags":{},"deletionDate":"2021-09-07T07:07:31Z","scheduledPurgeDate":"2021-12-06T07:07:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/saworkspkeyvaultc194892e","name":"saworkspkeyvaultc194892e","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ethan_rg/providers/Microsoft.KeyVault/vaults/saworkspkeyvaultc194892e","location":"westus","tags":{},"deletionDate":"2021-11-08T18:20:54Z","scheduledPurgeDate":"2022-02-06T18:20:54Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/necusjz3685327998","name":"necusjz3685327998","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ethan_rg/providers/Microsoft.KeyVault/vaults/necusjz3685327998","location":"westus","tags":{},"deletionDate":"2021-11-05T10:04:05Z","scheduledPurgeDate":"2022-02-03T10:04:05Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envault5g7jq5sihrljrxmj6","name":"envault5g7jq5sihrljrxmj6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryptioncsrqfjssnxwqnyhtf62mei5xkkec3o65ewms3w477l2vdnca/providers/Microsoft.KeyVault/vaults/envault5g7jq5sihrljrxmj6","location":"westus","tags":{},"deletionDate":"2021-11-05T08:35:23Z","scheduledPurgeDate":"2021-11-12T08:35:23Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clikk6jtsxone67","name":"clikk6jtsxone67","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespace4atfi4zrwl6ntie3dp3hqzn5dwnlykwbwlsz7ruidjuf3vlob23zn4/providers/Microsoft.KeyVault/vaults/clikk6jtsxone67","location":"westus","tags":{},"deletionDate":"2021-11-05T04:28:11Z","scheduledPurgeDate":"2021-11-12T04:28:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clixw6cszwadnz5","name":"clixw6cszwadnz5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespacewdns2flpxzjajq4wqoib3jr42o4rzzjg43auil7ys4nt55tywkf6ys/providers/Microsoft.KeyVault/vaults/clixw6cszwadnz5","location":"westus","tags":{},"deletionDate":"2021-11-05T04:22:31Z","scheduledPurgeDate":"2021-11-12T04:22:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testqhfohbnpe","name":"kv-ssl-testqhfohbnpe","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjjwvi4t4wlxosnkft6eiwpgoslx74vil4t73uf5odtwjklcjz2jz2mxqmzswo4to7/providers/Microsoft.KeyVault/vaults/kv-ssl-testqhfohbnpe","location":"japanwest","tags":{},"deletionDate":"2021-11-05T03:08:43Z","scheduledPurgeDate":"2022-02-03T03:08:43Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testtuap5dxif","name":"kv-ssl-testtuap5dxif","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg35c4w3mvxikfbeydzbdbjhoyklos7oytva6tr4jbjo3o5wz53qivverp2xpskvblk/providers/Microsoft.KeyVault/vaults/kv-ssl-testtuap5dxif","location":"japanwest","tags":{},"deletionDate":"2021-11-04T16:04:13Z","scheduledPurgeDate":"2022-02-02T16:04:13Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testwxq6qd7nt","name":"kv-ssl-testwxq6qd7nt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgdeiltc67l4b5fq2gqcdzj4f3w2os4wdpmwzs4c2zmaje4e7klk32zaqxz4meg6q4s/providers/Microsoft.KeyVault/vaults/kv-ssl-testwxq6qd7nt","location":"japanwest","tags":{},"deletionDate":"2021-11-01T13:07:45Z","scheduledPurgeDate":"2022-01-30T13:07:45Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-tests4wjd2w4v","name":"kv-ssl-tests4wjd2w4v","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxb4vxpo7kcjhpqxkc7h2wnmv424efsyglb4nwnptfdouahhm5bh6kdkudogrh3642/providers/Microsoft.KeyVault/vaults/kv-ssl-tests4wjd2w4v","location":"japanwest","tags":{},"deletionDate":"2021-11-01T05:15:29Z","scheduledPurgeDate":"2022-01-30T05:15:29Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testv6upjx5t5","name":"kv-ssl-testv6upjx5t5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgrc33br55flafibeytyik6clmz2eka5lgvr5qis6vxurzzuohjorg6zojlcgkw52nj/providers/Microsoft.KeyVault/vaults/kv-ssl-testv6upjx5t5","location":"japanwest","tags":{},"deletionDate":"2021-10-29T17:02:26Z","scheduledPurgeDate":"2022-01-27T17:02:26Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southindia/deletedVaults/clibatchtestkv4hxg6zv4ge","name":"clibatchtestkv4hxg6zv4ge","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnifznvf6r4zkospjbpzrixk3v24svvkvx7pft5ansyl2z6abju47jqiujpwz4sayn/providers/Microsoft.KeyVault/vaults/clibatchtestkv4hxg6zv4ge","location":"southindia","tags":{},"deletionDate":"2021-10-22T17:09:49Z","scheduledPurgeDate":"2022-01-20T17:09:49Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southindia/deletedVaults/clibatchtestkvpg75xotcf4","name":"clibatchtestkvpg75xotcf4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgiq6gvsafngxk27ky2j53z2yde4gy2dvxgxcfyp43v2tyl4d7z5uksfbvaekikdogr/providers/Microsoft.KeyVault/vaults/clibatchtestkvpg75xotcf4","location":"southindia","tags":{},"deletionDate":"2021-10-22T09:23:23Z","scheduledPurgeDate":"2022-01-20T09:23:23Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southindia/deletedVaults/clibatchtestkvik4sgbaa2h","name":"clibatchtestkvik4sgbaa2h","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgeiikr4cw767olpvkdqfl2pm7t7srsdsgprd7gc2duefcuh7nxfnatrnrlbl6u6hvi/providers/Microsoft.KeyVault/vaults/clibatchtestkvik4sgbaa2h","location":"southindia","tags":{},"deletionDate":"2021-09-09T20:29:53Z","scheduledPurgeDate":"2021-12-08T20:29:53Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southindia/deletedVaults/clibatchtestkvc5hau2kcaz","name":"clibatchtestkvc5hau2kcaz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjdgzuq3m77pyt672tela7mebwiwqynfuqh4ahgx23s3am4hgt7hiri7rowuczltqy/providers/Microsoft.KeyVault/vaults/clibatchtestkvc5hau2kcaz","location":"southindia","tags":{},"deletionDate":"2021-09-02T20:33:36Z","scheduledPurgeDate":"2021-12-01T20:33:36Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-mkwsrk5p3x4di","name":"vault3-mkwsrk5p3x4di","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_rg7oqankkjs6claesr2lgl4fmeegm7cy7b/providers/Microsoft.KeyVault/vaults/vault3-mkwsrk5p3x4di","location":"westcentralus","tags":{},"deletionDate":"2021-11-09T08:58:10Z","scheduledPurgeDate":"2021-11-16T08:58:10Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-grs6lf6qv22iz","name":"vault1-grs6lf6qv22iz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_j4j6t3rdfsgwkxdxj2cobbmzne54lvm537ys5wg/providers/Microsoft.KeyVault/vaults/vault1-grs6lf6qv22iz","location":"westcentralus","tags":{},"deletionDate":"2021-11-09T08:23:33Z","scheduledPurgeDate":"2021-11-16T08:23:33Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-c46nofcsvrop7","name":"vault2-c46nofcsvrop7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_j4j6t3rdfsgwkxdxj2cobbmzne54lvm537ys5wg/providers/Microsoft.KeyVault/vaults/vault2-c46nofcsvrop7","location":"westcentralus","tags":{},"deletionDate":"2021-11-09T08:23:17Z","scheduledPurgeDate":"2021-11-16T08:23:17Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-uuhyrg77i2qpp","name":"vault3-uuhyrg77i2qpp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_flyw3nxybywulsec4jfl4fuwm274ocwhwg/providers/Microsoft.KeyVault/vaults/vault3-uuhyrg77i2qpp","location":"westcentralus","tags":{},"deletionDate":"2021-11-05T08:45:27Z","scheduledPurgeDate":"2021-11-12T08:45:27Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-l7ewvpcx5hzub","name":"vault1-l7ewvpcx5hzub","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_j624cfsm256c2wx5ucijyvupu2kfi3sz6awxl3k/providers/Microsoft.KeyVault/vaults/vault1-l7ewvpcx5hzub","location":"westcentralus","tags":{},"deletionDate":"2021-11-05T08:44:56Z","scheduledPurgeDate":"2021-11-12T08:44:56Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultw5kdrch","name":"keyVaultw5kdrch","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgkwyusqp3ms/providers/Microsoft.KeyVault/vaults/keyVaultw5kdrch","location":"westus2","tags":{},"deletionDate":"2021-11-05T03:48:51Z","scheduledPurgeDate":"2022-02-03T03:48:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultj2z3sla","name":"keyVaultj2z3sla","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgicmfusunhn/providers/Microsoft.KeyVault/vaults/keyVaultj2z3sla","location":"westus2","tags":{},"deletionDate":"2021-11-05T03:48:39Z","scheduledPurgeDate":"2022-02-03T03:48:39Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultwoprdaf","name":"keyVaultwoprdaf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg7kludroupc/providers/Microsoft.KeyVault/vaults/keyVaultwoprdaf","location":"westus2","tags":{},"deletionDate":"2021-11-05T03:46:54Z","scheduledPurgeDate":"2022-02-03T03:46:54Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskvitvvit2vtb5a","name":"cliakskvitvvit2vtb5a","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestgn6bkx4lek/providers/Microsoft.KeyVault/vaults/cliakskvitvvit2vtb5a","location":"westus2","tags":{},"deletionDate":"2021-11-05T02:36:45Z","scheduledPurgeDate":"2022-02-03T02:36:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultfhwx3a4","name":"keyVaultfhwx3a4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwybigl3ufk/providers/Microsoft.KeyVault/vaults/keyVaultfhwx3a4","location":"westus2","tags":{},"deletionDate":"2021-11-04T16:45:40Z","scheduledPurgeDate":"2022-02-02T16:45:40Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitest3zvtcqdzwebiixawo","name":"clitest3zvtcqdzwebiixawo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgz7h2rlm6s36y4flyzgfupcfrqwdejri2osjhwc2i2qgvtlmkk3uiydfkojwb5qm4r/providers/Microsoft.KeyVault/vaults/clitest3zvtcqdzwebiixawo","location":"eastus2euap","tags":{},"deletionDate":"2021-11-05T08:22:10Z","scheduledPurgeDate":"2021-11-12T08:22:10Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv2-pna-mpu5kuk","name":"cli-test-kv2-pna-mpu5kuk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnarwil2ihj6bscnlkfzk6uqgutoc4hmt5yrkbkkk63pv6fcog3zj7wdp/providers/Microsoft.KeyVault/vaults/cli-test-kv2-pna-mpu5kuk","location":"eastus2euap","tags":{},"deletionDate":"2021-11-05T04:49:27Z","scheduledPurgeDate":"2022-02-03T04:49:27Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv3-pna-nvypxw2","name":"cli-test-kv3-pna-nvypxw2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnarwil2ihj6bscnlkfzk6uqgutoc4hmt5yrkbkkk63pv6fcog3zj7wdp/providers/Microsoft.KeyVault/vaults/cli-test-kv3-pna-nvypxw2","location":"eastus2euap","tags":{},"deletionDate":"2021-11-05T04:49:27Z","scheduledPurgeDate":"2022-02-03T04:49:27Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-2tbrwiig","name":"cli-test-kv-pna-2tbrwiig","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnarwil2ihj6bscnlkfzk6uqgutoc4hmt5yrkbkkk63pv6fcog3zj7wdp/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-2tbrwiig","location":"eastus2euap","tags":{},"deletionDate":"2021-11-05T04:49:27Z","scheduledPurgeDate":"2022-02-03T04:49:27Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestj5272grnqbb6vcmff","name":"clitestj5272grnqbb6vcmff","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgle4rknlabt2wiqjphvudoewh7tdkhqf7lysxtf4chokhmx7gryfdmcqjshqzdf4ej/providers/Microsoft.KeyVault/vaults/clitestj5272grnqbb6vcmff","location":"eastus2euap","tags":{},"deletionDate":"2021-11-04T21:55:24Z","scheduledPurgeDate":"2021-11-11T21:55:24Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centraluseuap/deletedVaults/vault1569","name":"vault1569","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.KeyVault/vaults/vault1569","location":"centraluseuap","tags":{},"deletionDate":"2021-09-07T02:33:32Z","scheduledPurgeDate":"2021-12-06T02:33:32Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZbvbupGEMXfBVX9VML6D70QKapsdkztZmazm12uyDdiHIKXQATkGnx1371jqvb2FYLk1cqWZWvOnvOb%2bd7bVqfj%2fXrrD73b7z1IHq177N32Xo%2fH98PtYPC22C5W1Vu1Pd4s2o99dVPu3gaHj%2bdDuV%2b%2fH9e77WEgnoOX3%2bMvQT94fhH9eLlc9BdVGfXL53H4JXwR4%2bFYDN73u2%2frZbU%2fDHBd7neH3cvx5q%2fqPFt8bI6DZbWpjtXycnP4Y%2fG%2b7n%2fjN%2fnjd6EIxn3BV%2fDrLwfPf9z5anvn%2fOyrmRXWOJNZmLlHN1b3buNeZB6gLUOq3RlrdyLrI6zLM9XLEYJujTVSWd9okWUEeWN8HiPAkCS0JLE1%2fmmiIL%2fr%2fdb7Co8WnFEP8OnFaFGQhVBZaNAmoZKzEbW6IblqlMwyXecRC9BQ%2fZpquwpQuhC9mRiZd8J0YvzjivDTK1HnJ2yhUbbkylxEthgR6Aida7CeR6ZmpVgJ7dgOYibZJhOyLlYOGuMuSkyArEnuryEieYg1DskmXHvOTngaYVtk5AppPMYo8Uwwj8llqXKZRIcnJeeChG5QYOeKR%2bXsn9ciSIQWWQgUSrqgi4qyHBOfn7WbR7zHWHtmRMpigMD2KTN21RhbSI7R2bj5v8y4CmeciE9aSd1Su%2bL1OtK2jJXcTKlNuGiICJ4yhHyIXrNTZlPNz4zdTI28OKNIHhLqCPr5iVFG2DITWx%2bi5GXTEdoiJZELbhyxAhcQ0ES5vKPsRFuSBtxZ2XmD8DMlOck8%2beRicEIYB9bH2ObcYVcNsRhGQsyGENQWoAXvskg144KxcjJ1yWbxnKZiSvVFjM4T10IM1gCGSvoG2%2bSsJAzR0gWhys2FqSEgy%2bEBrl16RmeWau%2bGxjE56nRCMvlJjGtorAHVmk%2faRSg5Gl1jbTMgyJiTc64eQwI4M0oYFUupbSaNnYGpfcys%2fd%2bIAS55%2bOQ5YV%2fkHTh5vOjaatJQuxnxGHG6tFFwQ%2b1yBiwIZV95%2bEp5IqWMp8%2fA%2bG46LTs1%2fsvIFejBjYPrreesxYqnceBOmo3QQ6vsJlWy5J2BKjcT3bnDZ6mpn4AETZVNGazMjR8%2f%2fgY%3d"}' headers: cache-control: no-cache - content-length: '6627' + content-length: '6826' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:39 GMT + date: Thu, 11 Nov 2021 03:24:29 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: '' + x-ms-original-request-ids: bb7b506b-3a64-4259-99ae-5c86dbb6eb92 status: code: 200 message: OK @@ -238,2611 +238,2643 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZfRbqM4GIXfJVrt1abBTcKIStUqbe20dIDE2H8od05wJ6khoYFO0ozm3ffQViPtK0TixsKA/Omc8x9%2B9bb22H7fbF3Tu/rV45NU6bR31Vu3bd1cDQaV2ZoftrLb9sKc3vb2YrWrBs3bslntN3W72W2bgbdkz/7oG%2Buz5bPXHxWF6Ru7GvZXy%2BDy2%2BWzF4wDb1Dvdz83hd03g2iz2u%2Ba3XN78WjfybyV7aCwpW1t8bFo/jX1pv8TO/Hy60uPBX0PF/v7r8bhiztnt9eqCt7y9EiG5Zku80cSIWmXa0k5aabHyjvSUlAluTsqki%2BRx/x5tk6ME75a1NK6sT9XIpZ8NFJO7iM%2B3i8UJXgJU9s6j/SYL7K1NF4tlCPC%2BlW5OLZV9K6yOpU6EEp5171/voBdniGx1/xEMXHNcGKyHARAyJZPI%2BXJZO6NdZoVMuL1ra5qEB4Lna1jOV1PVdXGMQ94fgpBkI30ohYRZ7T4JHbLYyUn389RZWNfZ/VMTtuRKqUsvDE3YCin8xEYQTVgAEamKobayUfJoTJHcdQxdtLNS6HNcC1pGjG1aMOYQj7/ZJYmWt2fMzidKohN8KNiUkYu4E/DOpHTA8TTAhTTnRiNl3OAFZEbw37gM10dYec4KoW/UOEMzzPtCPsDkp/gFvxc8%2BxpWCSm1EcAIasDLbP1TPIHKA8AKBSkblIo7E4TlAUlPp0ElLk6aHWTW%2B4dFiqWpmqHqqpz6wLxBSyczCZxR%2B0ME82nrIiNoyHcdhNr5qusjE25GylNYYyMX3TrKjog4V7gXoisc%2B%2BKKcIMoHCfZmUidS6QaHnBwtcvZh/ufIjvHibnCo04%2BRCKtDzQ8w6Se%2BgiLbcCUFQcS3InxSiVEJrOSsS%2BOyHiTBd55HKJAS0A1UCI2P8xODuNnXGiMYzPOJFcv%2BPcWxQIX0JMthPby0069wK%2B5CGKCO/uN%2BAiFkqmpmqYJkpkGXb3U8NQSBjJCGtz%2BsNNp%2BdYOHytCBkOeyLTEUkaGZ/Q9McImR5GjmkQQmSt7zBkBeyKiAMxL7%2BFnV9sCYV1w1fQGBUORAP6f0XjejI7P3%2BihnWTk3OmtESQMxRXUECxRfDfYhBgkq6Tj4qhbkIUX04qTGl6vNeldPDrqxnWKML6gKJs5iwUX/78481z5NbVU4Q5VMZP4Cbwg6B1VkA98GfVkhXiNXWUEmnkGHV1V0hXoJodBbg1Uo8OH%2Bor83uozSDgfOpy7ffv/wA%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZbvbupGEMXfBVX9VML6D70QKapsdkztZmazm12uyDdiHIKXQATkGnx1371jqvb2FYLk1cqWZWvOnvOb%2Bd7bVqfj/XrrD73b7z1IHq177N32Xo/H98PtYPC22C5W1Vu1Pd4s2o99dVPu3gaHj%2BdDuV%2B/H9e77WEgnoOX3%2BMvQT94fhH9eLlc9BdVGfXL53H4JXwR4%2BFYDN73u2/rZbU/DHBd7neH3cvx5q/qPFt8bI6DZbWpjtXycnP4Y/G%2B7n/jN/njd6EIxn3BV/DrLwfPf9z5anvn/OyrmRXWOJNZmLlHN1b3buNeZB6gLUOq3RlrdyLrI6zLM9XLEYJujTVSWd9okWUEeWN8HiPAkCS0JLE1/mmiIL/r/db7Co8WnFEP8OnFaFGQhVBZaNAmoZKzEbW6IblqlMwyXecRC9BQ/ZpquwpQuhC9mRiZd8J0YvzjivDTK1HnJ2yhUbbkylxEthgR6Aida7CeR6ZmpVgJ7dgOYibZJhOyLlYOGuMuSkyArEnuryEieYg1DskmXHvOTngaYVtk5AppPMYo8Uwwj8llqXKZRIcnJeeChG5QYOeKR%2BXsn9ciSIQWWQgUSrqgi4qyHBOfn7WbR7zHWHtmRMpigMD2KTN21RhbSI7R2bj5v8y4CmeciE9aSd1Su%2BL1OtK2jJXcTKlNuGiICJ4yhHyIXrNTZlPNz4zdTI28OKNIHhLqCPr5iVFG2DITWx%2Bi5GXTEdoiJZELbhyxAhcQ0ES5vKPsRFuSBtxZ2XmD8DMlOck8%2BeRicEIYB9bH2ObcYVcNsRhGQsyGENQWoAXvskg144KxcjJ1yWbxnKZiSvVFjM4T10IM1gCGSvoG2%2BSsJAzR0gWhys2FqSEgy%2BEBrl16RmeWau%2BGxjE56nRCMvlJjGtorAHVmk/aRSg5Gl1jbTMgyJiTc64eQwI4M0oYFUupbSaNnYGpfcys/d%2BIAS55%2BOQ5YV/kHTh5vOjaatJQuxnxGHG6tFFwQ%2B1yBiwIZV95%2BEp5IqWMp8/A%2BG46LTs1/svIFejBjYPrreesxYqnceBOmo3QQ6vsJlWy5J2BKjcT3bnDZ6mpn4AETZVNGazMjR8/gY%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv081805","name":"bez-kv081805","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081805","location":"eastus","tags":{},"deletionDate":"2021-08-18T11:06:07Z","scheduledPurgeDate":"2021-11-16T11:06:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test105","name":"acctestkv-test105","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test103/providers/Microsoft.KeyVault/vaults/acctestkv-test105","location":"eastus","tags":{},"deletionDate":"2021-08-13T12:46:45Z","scheduledPurgeDate":"2021-11-11T12:46:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/vaultys","name":"vaultys","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/vaultys","location":"eastus","tags":{},"deletionDate":"2021-08-13T11:02:09Z","scheduledPurgeDate":"2021-11-11T11:02:09Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-dsoxtzz","name":"cli-test-kv-mgmt-dsoxtzz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtedluoybb23o4nam2p32d3uxsxzog64qqjnkj5rom5zr3b2tiftylt/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-dsoxtzz","location":"eastus","tags":{},"deletionDate":"2021-08-12T21:46:28Z","scheduledPurgeDate":"2021-11-10T21:46:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultniiubro","name":"cmk-test-keyvaultniiubro","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtbypzes2mqi7esvpbgumnrjnzfzrp25i2xfeqzxwq24y7mcag5fyod43yhzj6cpsj/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultniiubro","location":"eastus","tags":{},"deletionDate":"2021-08-12T19:12:22Z","scheduledPurgeDate":"2021-11-10T19:12:22Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-2bfgj5aay","name":"cli-test-kv-nr-2bfgj5aay","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulepj46rajvz4tjixw64i33wvy3bgyqp5q3zovawd7ddcxau/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-2bfgj5aay","location":"eastus2","tags":{},"deletionDate":"2021-08-19T21:46:15Z","scheduledPurgeDate":"2021-11-17T21:46:15Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-5bhx7jhy6","name":"cli-test-kv-nr-5bhx7jhy6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulepj46rajvz4tjixw64i33wvy3bgyqp5q3zovawd7ddcxau/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-5bhx7jhy6","location":"eastus2","tags":{},"deletionDate":"2021-08-19T21:46:15Z","scheduledPurgeDate":"2021-08-26T21:46:15Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-nkrlvoziw","name":"cli-test-kv-nr-nkrlvoziw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulepj46rajvz4tjixw64i33wvy3bgyqp5q3zovawd7ddcxau/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-nkrlvoziw","location":"eastus2","tags":{},"deletionDate":"2021-08-19T21:46:15Z","scheduledPurgeDate":"2021-11-17T21:46:15Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitestv2t5fq6rulcdovaop","name":"clitestv2t5fq6rulcdovaop","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rguywqclua5qto7oaewyeruxawjghpcv52dbmcxshbcgrbhiimujcin6zsmw5kvdmif/providers/Microsoft.KeyVault/vaults/clitestv2t5fq6rulcdovaop","location":"centralus","tags":{},"deletionDate":"2021-06-24T19:07:33Z","scheduledPurgeDate":"2021-09-22T19:07:33Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitestvj3y4f5xh57mgy6pk","name":"clitestvj3y4f5xh57mgy6pk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxmpuyfis6zxhetvdor4gplilzxdb5xblszo2ms4cwzprchhuhjhnapt2ntbudc2tn/providers/Microsoft.KeyVault/vaults/clitestvj3y4f5xh57mgy6pk","location":"centralus","tags":{},"deletionDate":"2021-06-17T19:07:35Z","scheduledPurgeDate":"2021-09-15T19:07:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitest5cksmf3j5wjqfj7aa","name":"clitest5cksmf3j5wjqfj7aa","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfwtz5zyxtzbia73dvlpplspyyhndcfcprw5ye6xtciiiprscvwcho5yk3d7xkyz2v/providers/Microsoft.KeyVault/vaults/clitest5cksmf3j5wjqfj7aa","location":"centralus","tags":{},"deletionDate":"2021-06-10T19:07:02Z","scheduledPurgeDate":"2021-09-08T19:07:02Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/centralus/deletedVaults/clitestbyboj52u25bynnpde","name":"clitestbyboj52u25bynnpde","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5kybiht4havk3pefa7gjbtalqcz2dbc3d3faovyf3dub7ixfjhn2ndpnpy5qjxdru/providers/Microsoft.KeyVault/vaults/clitestbyboj52u25bynnpde","location":"centralus","tags":{},"deletionDate":"2021-06-03T19:09:42Z","scheduledPurgeDate":"2021-09-01T19:09:42Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestwcmqcc3zzihhh3hun","name":"clitestwcmqcc3zzihhh3hun","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoi6rto7on3yvdt2krummhqxhlvocaxy2eaexmqq7yg657ptf3vpbkkyqsqif6grxq/providers/Microsoft.KeyVault/vaults/clitestwcmqcc3zzihhh3hun","location":"southcentralus","tags":{},"deletionDate":"2021-07-16T10:23:28Z","scheduledPurgeDate":"2021-10-14T10:23:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestph7v5jl3hadgid427","name":"clitestph7v5jl3hadgid427","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgakrt6p774fsdua3f4s22hcvfxrrfdblenlsdeprwyo7o74hzrmkucftsep5trtld5/providers/Microsoft.KeyVault/vaults/clitestph7v5jl3hadgid427","location":"southcentralus","tags":{},"deletionDate":"2021-07-09T03:30:11Z","scheduledPurgeDate":"2021-10-07T03:30:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitesteidcpos7zr4sm3u47","name":"clitesteidcpos7zr4sm3u47","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwbmgoqvg5abj67xauz74epkbwknqnbhcphjh4hg75lfswhcipovauo4osbyvqa4yh/providers/Microsoft.KeyVault/vaults/clitesteidcpos7zr4sm3u47","location":"southcentralus","tags":{},"deletionDate":"2021-07-02T03:54:19Z","scheduledPurgeDate":"2021-09-30T03:54:19Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestqty4g45i3bljg2wbo","name":"clitestqty4g45i3bljg2wbo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgict5k5rhyqixodlwvchx74rntmezrlhgtypkv5onhxc36pcufuzowteydpfpyd6lj/providers/Microsoft.KeyVault/vaults/clitestqty4g45i3bljg2wbo","location":"southcentralus","tags":{},"deletionDate":"2021-06-28T14:06:15Z","scheduledPurgeDate":"2021-09-26T14:06:15Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitesthe5qymsvsqe6nrtgp","name":"clitesthe5qymsvsqe6nrtgp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4oyq6giolhw72fasegwecnwndieihi5qh7p6s37xctovqunzoj4owwrd3kg3pclkj/providers/Microsoft.KeyVault/vaults/clitesthe5qymsvsqe6nrtgp","location":"southcentralus","tags":{},"deletionDate":"2021-06-25T03:28:14Z","scheduledPurgeDate":"2021-09-23T03:28:14Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clinijmtqum7n3f","name":"clinijmtqum7n3f","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identitysx7liusfeq4rf64cp4jkjh33eelkm2s5e/providers/Microsoft.KeyVault/vaults/clinijmtqum7n3f","location":"westus","tags":{},"deletionDate":"2021-07-12T14:12:44Z","scheduledPurgeDate":"2021-10-10T14:12:44Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cliln45v4k4yvmn","name":"cliln45v4k4yvmn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_uribqdonluabg4zgjpzrrxoqpx6rpmi56pf2udkmj7l/providers/Microsoft.KeyVault/vaults/cliln45v4k4yvmn","location":"westus","tags":{},"deletionDate":"2021-07-12T14:11:51Z","scheduledPurgeDate":"2021-10-10T14:11:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitestgl3hp2vjhrbdmgajh","name":"clitestgl3hp2vjhrbdmgajh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgyxc3cuhca2nuxrxdxo4nzvpz2inkmfry2m4hq3yaosar3yvjqauwpad3zp5xqt6wg/providers/Microsoft.KeyVault/vaults/clitestgl3hp2vjhrbdmgajh","location":"westus","tags":{},"deletionDate":"2021-07-12T09:19:08Z","scheduledPurgeDate":"2021-10-10T09:19:08Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envaultaoe6ogopdk5iwhwmg","name":"envaultaoe6ogopdk5iwhwmg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryptionzxh23q47dh254ohiakp623auon7ex6ijtiue7n2fntijkoix/providers/Microsoft.KeyVault/vaults/envaultaoe6ogopdk5iwhwmg","location":"westus","tags":{},"deletionDate":"2021-07-09T03:40:15Z","scheduledPurgeDate":"2021-10-07T03:40:15Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clix7h3jd5q4e4q","name":"clix7h3jd5q4e4q","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_urimassgcbryh7lkdy3uhdzw3bvgghvzmvimnpzq7p6/providers/Microsoft.KeyVault/vaults/clix7h3jd5q4e4q","location":"westus","tags":{},"deletionDate":"2021-07-08T21:18:52Z","scheduledPurgeDate":"2021-10-06T21:18:52Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-mb6bateqnp56r","name":"vault3-mb6bateqnp56r","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_lkbddybmz2tnonbgrs4f32gcodqekejqff/providers/Microsoft.KeyVault/vaults/vault3-mb6bateqnp56r","location":"westcentralus","tags":{},"deletionDate":"2021-07-09T03:44:54Z","scheduledPurgeDate":"2021-10-07T03:44:54Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-jvfckhwnrg7es3","name":"vault-jvfckhwnrg7es3","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_gyosfuuhyt6mjvxilpsogdqvzubp2qpy2jwf3cah32vnfz/providers/Microsoft.KeyVault/vaults/vault-jvfckhwnrg7es3","location":"westcentralus","tags":{},"deletionDate":"2021-07-09T03:43:06Z","scheduledPurgeDate":"2021-10-07T03:43:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-qd2x2ei3vhqwa","name":"vault2-qd2x2ei3vhqwa","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_kh7jas3b7zqbrd23duqtgsmle6o7fe5vl6sxygn/providers/Microsoft.KeyVault/vaults/vault2-qd2x2ei3vhqwa","location":"westcentralus","tags":{},"deletionDate":"2021-07-09T03:38:35Z","scheduledPurgeDate":"2021-10-07T03:38:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-5vhncdveeq56d","name":"vault1-5vhncdveeq56d","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_kh7jas3b7zqbrd23duqtgsmle6o7fe5vl6sxygn/providers/Microsoft.KeyVault/vaults/vault1-5vhncdveeq56d","location":"westcentralus","tags":{},"deletionDate":"2021-07-09T03:38:35Z","scheduledPurgeDate":"2021-10-07T03:38:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-3tw77iojgit7h","name":"vault4-3tw77iojgit7h","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_dw3qkbesreqfb7icfycl37ckp5tvpvaw2o2of/providers/Microsoft.KeyVault/vaults/vault4-3tw77iojgit7h","location":"westcentralus","tags":{},"deletionDate":"2021-07-09T03:35:31Z","scheduledPurgeDate":"2021-10-07T03:35:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVault2xcsbeo","name":"keyVault2xcsbeo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnyfh7v63fa/providers/Microsoft.KeyVault/vaults/keyVault2xcsbeo","location":"westus2","tags":{},"deletionDate":"2021-08-12T20:47:44Z","scheduledPurgeDate":"2021-11-10T20:47:44Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultv5yzifz","name":"keyVaultv5yzifz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgriwxoau5i4/providers/Microsoft.KeyVault/vaults/keyVaultv5yzifz","location":"westus2","tags":{},"deletionDate":"2021-08-12T20:47:20Z","scheduledPurgeDate":"2021-11-10T20:47:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskv6xfkm24yzzsq","name":"cliakskv6xfkm24yzzsq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest3ro72hxdyi/providers/Microsoft.KeyVault/vaults/cliakskv6xfkm24yzzsq","location":"westus2","tags":{},"deletionDate":"2021-08-12T19:55:36Z","scheduledPurgeDate":"2021-11-10T19:55:36Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultwrmy4kb","name":"keyVaultwrmy4kb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgzmrv4geskh/providers/Microsoft.KeyVault/vaults/keyVaultwrmy4kb","location":"westus2","tags":{},"deletionDate":"2021-08-05T20:54:14Z","scheduledPurgeDate":"2021-11-03T20:54:14Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultdlcj4n2","name":"keyVaultdlcj4n2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjz5knc7zrn/providers/Microsoft.KeyVault/vaults/keyVaultdlcj4n2","location":"westus2","tags":{},"deletionDate":"2021-08-05T20:53:57Z","scheduledPurgeDate":"2021-11-03T20:53:57Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitest6isurcorfijkxgegx","name":"clitest6isurcorfijkxgegx","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgqevs26l3ghqbwdfmehlpca2mu5goryj7ytoq5i4m4gnwegqpassjf2kn3xarwa6w3/providers/Microsoft.KeyVault/vaults/clitest6isurcorfijkxgegx","location":"eastus2euap","tags":{},"deletionDate":"2021-07-16T10:28:46Z","scheduledPurgeDate":"2021-10-14T10:28:46Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestd2qhqzv6bexnixfhm","name":"clitestd2qhqzv6bexnixfhm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgbc5wjq5jwmo3hfes4j37qnxpjp6mjuyj77itqde2c5hqxosa4gt5lk4e44exyxfrr/providers/Microsoft.KeyVault/vaults/clitestd2qhqzv6bexnixfhm","location":"eastus2euap","tags":{},"deletionDate":"2021-07-09T03:35:22Z","scheduledPurgeDate":"2021-10-07T03:35:22Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitest33j4wnxu7zxhykget","name":"clitest33j4wnxu7zxhykget","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rglk2sr2cz27ocawlpzmzrppjmhlskp4ijrqzcssnrxufm2mtk3mnwajuzevr7vman2/providers/Microsoft.KeyVault/vaults/clitest33j4wnxu7zxhykget","location":"eastus2euap","tags":{},"deletionDate":"2021-07-02T03:59:36Z","scheduledPurgeDate":"2021-09-30T03:59:36Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitesttwm54zijuvjrxlasa","name":"clitesttwm54zijuvjrxlasa","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg6irbn72lueyydlmcfy2uvrnc2sqrqhart7sw5t7ixmswftth2kyrfo6hmuwbernbi/providers/Microsoft.KeyVault/vaults/clitesttwm54zijuvjrxlasa","location":"eastus2euap","tags":{},"deletionDate":"2021-06-28T14:11:41Z","scheduledPurgeDate":"2021-09-26T14:11:41Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestgyfzqntj3fb3jfbag","name":"clitestgyfzqntj3fb3jfbag","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxflzo4432hxybctlbhyamcy5dfsgcgimjkkmsfufrfccwvzub53t4p7wtoy2ztkrd/providers/Microsoft.KeyVault/vaults/clitestgyfzqntj3fb3jfbag","location":"eastus2euap","tags":{},"deletionDate":"2021-06-25T03:33:13Z","scheduledPurgeDate":"2021-09-23T03:33:13Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZZdb%2bI4FIb%2fC1rt1VLskmSUStWq7Np004lDHfuE5s4Qd6HOF0k6pYzmv88J7c3MT0DKzVEskB%2be8758n9T2OHzd166f3HyfsLtU6XRyM9kNQ9vfzGaVqc3%2ftrL1cGVOr5292jbVrH%2fd9Ntu3w77pu5nZEOfA%2b8LndLNM5l6RWGmxm7n0%2b0mvP5y%2fUxCPySztmu%2b7Qvb9bN4v%2b2avnkerh7sO5jXcpgVtrSDLc5D%2f7dp99NveBI%2f%2fPaa0HBK8KF%2f%2ftE7%2fMbG2fpWVeFrnh7B0Hyty%2fwBeATa5VpCDppqX5EjbDhUkrmjAvkSExrAukhgnOv2JWb%2bIVORMO4%2fTwNEsQ61dtEKWM6UWmRS%2b1yvd9JUx39VCcJyHpgTCLncMeUgF5x3UpHbyV%2bfwK4vkNghxxsDK33lpBCMBmbeClM2nqqGTOKcqYWApUQiUljmM3AiQWJcZ4OMCXk7E9fuHX8BIbTPPon9w4SSd18v0bJQg%2bLCltxDy2qh6WhTYh0yK6WRnB%2fSdSkkgKeyIZUEmSHDM7OqbSQJtVRiJbk74XkRU%2famPyxLE63uLxicHzzNC1w%2fmOPFUR7KnuY7nBtPV2366PyDOS2SmOf3ispFgeAkSgfL%2fohzbhmu77pcSU0DlbV1XHJtTuf1zNhl5pl%2fADQJOG5X3UJBQqYx34x78jCfIMYQfFRRIhkhuK3n7dROpnLZvykieVxGgKbhLEbAL7H2IfswbQR2yaIdtAIUi70jh07oEDeUY8qNPSBzFKtLHciYc18B5jzzeaoWK1ge75GrRLGCnEXYA4WnKIwc%2bWeqfYh2gT2Aq7YuhK36d1ytDptTm3mZmPIJzRk49sJBnZs0uh9Nw%2ffscTQTCSFRETsapOs2NYRQ7SCVLIT0l%2bZk%2bm51ee35EWjoyVxV7cI6X2drbM%2fq0VNacmyGg1q3K%2fyzEuD%2bPmDAsQ3LUzm2pYbIAu%2bUEgnoco7UHyRS%2f709L5BbbbExMfgTWzKK945iFqJNO8w1LAI3Br0PmHvSOOrprJWYWyw%2fCeSoxxyssXkPmGvJuUGzIcGG7c659uPHTw%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvault3pgmgho","name":"cmk-test-keyvault3pgmgho","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgaed2pjppuwun77gkmpqpwv62hckilwrnqhlhgradkiua2efvd5jkpmaptpikosp5b/providers/Microsoft.KeyVault/vaults/cmk-test-keyvault3pgmgho","location":"eastus","tags":{},"deletionDate":"2021-11-01T12:13:46Z","scheduledPurgeDate":"2022-01-30T12:13:46Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultimhhadh","name":"cmk-test-keyvaultimhhadh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfhugareznobwyi3ajcjugqfs4bdbh6o5cilvdpvwniw2jz7upmq6lfzedb6gyvbhk/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultimhhadh","location":"eastus","tags":{},"deletionDate":"2021-11-01T04:22:30Z","scheduledPurgeDate":"2022-01-30T04:22:30Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-jgpkyzl","name":"cli-test-kv-mgmt-jgpkyzl","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtaiqpur6yewgcrbslkexunej4knjhnlw322knmmygmpz3hxfkt2tkt/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-jgpkyzl","location":"eastus","tags":{},"deletionDate":"2021-10-29T18:34:16Z","scheduledPurgeDate":"2022-01-27T18:34:16Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultae5eapb","name":"cmk-test-keyvaultae5eapb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgeisg3a7kyzy7difnh4nitvxq7dgyix7p77k3cbnebtqq2bkfg4gtan3djibnlchvn/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultae5eapb","location":"eastus","tags":{},"deletionDate":"2021-10-29T16:12:21Z","scheduledPurgeDate":"2022-01-27T16:12:21Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-2zs3rni","name":"cli-test-kv-mgmt-2zs3rni","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtvioziqd7nq7vtfrcr75h23d6fcqb5vwoioxhz3tfliezek7qvwwd4/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-2zs3rni","location":"eastus","tags":{},"deletionDate":"2021-10-22T18:30:49Z","scheduledPurgeDate":"2022-01-20T18:30:49Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-hp2vhlcjm","name":"cli-test-kv-nr-hp2vhlcjm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruled5srvbwupd7rtby6k5owh7npgobr3oozwxqa3xtvfhzos/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-hp2vhlcjm","location":"eastus2","tags":{},"deletionDate":"2021-11-05T04:48:10Z","scheduledPurgeDate":"2022-02-03T04:48:10Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-t3ee6oxdv","name":"cli-test-kv-nr-t3ee6oxdv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruled5srvbwupd7rtby6k5owh7npgobr3oozwxqa3xtvfhzos/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-t3ee6oxdv","location":"eastus2","tags":{},"deletionDate":"2021-11-05T04:48:10Z","scheduledPurgeDate":"2022-02-03T04:48:10Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-4x3anyvh4","name":"cli-test-kv-nr-4x3anyvh4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruled5srvbwupd7rtby6k5owh7npgobr3oozwxqa3xtvfhzos/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-4x3anyvh4","location":"eastus2","tags":{},"deletionDate":"2021-11-05T04:48:10Z","scheduledPurgeDate":"2022-02-03T04:48:10Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitest7gkuhlxmkalyu7gw7","name":"clitest7gkuhlxmkalyu7gw7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxlwe4vqvxpx6fedwzgbumhslhwvw3l63x6q5ah3cyu3tcfgmsbtvhiakgbpb77qwv/providers/Microsoft.KeyVault/vaults/clitest7gkuhlxmkalyu7gw7","location":"southcentralus","tags":{},"deletionDate":"2021-09-07T06:59:35Z","scheduledPurgeDate":"2021-12-06T06:59:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/azps-test-kv4","name":"azps-test-kv4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azps-test-group/providers/Microsoft.KeyVault/vaults/azps-test-kv4","location":"southcentralus","tags":{},"deletionDate":"2021-09-07T02:03:49Z","scheduledPurgeDate":"2021-12-06T02:03:49Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitest2rm5s2vd2v24sxog2","name":"clitest2rm5s2vd2v24sxog2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjh26ma2zhps65yopk6ha7jcfqoa4imky5cuum6laiauf5jnt3fyn3szrjfxzo7gab/providers/Microsoft.KeyVault/vaults/clitest2rm5s2vd2v24sxog2","location":"southcentralus","tags":{},"deletionDate":"2021-09-03T02:43:17Z","scheduledPurgeDate":"2021-12-02T02:43:17Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestcuiu7y4lbc2cdbdbd","name":"clitestcuiu7y4lbc2cdbdbd","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg463nnrylovzgyh3uyvjtterclt37c5i53u4npjbn7toezvbirs42kqi4v2zwbxzrg/providers/Microsoft.KeyVault/vaults/clitestcuiu7y4lbc2cdbdbd","location":"southcentralus","tags":{},"deletionDate":"2021-08-27T01:51:20Z","scheduledPurgeDate":"2021-11-25T01:51:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestzap4w4r2j4zz56zzj","name":"clitestzap4w4r2j4zz56zzj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgg3fb3u5kd3g2dtsrvf3t2yicddbpvwdvq3y7sd7kggmfrvlfekbrk6bbuz5be5oyb/providers/Microsoft.KeyVault/vaults/clitestzap4w4r2j4zz56zzj","location":"southcentralus","tags":{},"deletionDate":"2021-08-20T01:53:51Z","scheduledPurgeDate":"2021-11-18T01:53:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitestw6m27ysebiekhob2m","name":"clitestw6m27ysebiekhob2m","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgatta2yqwxyu2gqytkfjhuy5gi2utpokg43nofxsr5nbfly4zrepjpn3vskeufrvb5/providers/Microsoft.KeyVault/vaults/clitestw6m27ysebiekhob2m","location":"westus","tags":{},"deletionDate":"2021-11-05T03:17:38Z","scheduledPurgeDate":"2021-11-12T03:17:38Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitestsawcwxk55uu4paivc","name":"clitestsawcwxk55uu4paivc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgkcqeknq7dnt5so7ss555nmxbgudaoxgg2bqyyorsvikapjs3wwlf7p3hneq7iifpo/providers/Microsoft.KeyVault/vaults/clitestsawcwxk55uu4paivc","location":"westus","tags":{},"deletionDate":"2021-11-05T02:07:42Z","scheduledPurgeDate":"2021-11-12T02:07:42Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envaultoqlqibioxoixzwnlo","name":"envaultoqlqibioxoixzwnlo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryptionktvfr3dytxxhsbqxa2gs3py5xtgoamb2gxrznczmlxtuqomt/providers/Microsoft.KeyVault/vaults/envaultoqlqibioxoixzwnlo","location":"westus","tags":{},"deletionDate":"2021-11-04T22:06:34Z","scheduledPurgeDate":"2021-11-11T22:06:34Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clixefi5zd2fvsc","name":"clixefi5zd2fvsc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespacey7jig7ngoehqlplah2fyferp535x5jxlaaklzoucyesyw35xwioegz/providers/Microsoft.KeyVault/vaults/clixefi5zd2fvsc","location":"westus","tags":{},"deletionDate":"2021-11-04T17:33:35Z","scheduledPurgeDate":"2021-11-11T17:33:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cli56knacyarw6u","name":"cli56knacyarw6u","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_eh_namespacexlfciiw5fkzqolckziiznzxoapvpvxqzlk3ene36zwye27x4i6svgt/providers/Microsoft.KeyVault/vaults/cli56knacyarw6u","location":"westus","tags":{},"deletionDate":"2021-11-04T17:25:12Z","scheduledPurgeDate":"2021-11-11T17:25:12Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testevb4utm66","name":"kv-ssl-testevb4utm66","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgkmyxchr5rpafbk7pj2bewt33t3zkxorkcpk3hojl2kyf6i5hu5xoddgag4w3aj7pu/providers/Microsoft.KeyVault/vaults/kv-ssl-testevb4utm66","location":"japanwest","tags":{},"deletionDate":"2021-10-22T17:01:07Z","scheduledPurgeDate":"2022-01-20T17:01:07Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testjkldj34v7","name":"kv-ssl-testjkldj34v7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfzlhpzknx7ig6s5bc7wher6q4wmdgo336s44xuao2szetrqfco6jqlcukkbxk3c27/providers/Microsoft.KeyVault/vaults/kv-ssl-testjkldj34v7","location":"japanwest","tags":{},"deletionDate":"2021-10-22T09:08:30Z","scheduledPurgeDate":"2022-01-20T09:08:30Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testsyq33ewju","name":"kv-ssl-testsyq33ewju","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgcbbetfojqkejuczj3y464lzvpa6ianzzoo7cjawhoftduw2ez4om54ebylyxggehg/providers/Microsoft.KeyVault/vaults/kv-ssl-testsyq33ewju","location":"japanwest","tags":{},"deletionDate":"2021-10-18T08:40:10Z","scheduledPurgeDate":"2022-01-16T08:40:10Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testhkhvjnw7c","name":"kv-ssl-testhkhvjnw7c","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgbg7y4lyjoti5epjab5fcnbzhosx5jjbev6urbxwg5tfauzj3ny6uoeqibm6tmnvde/providers/Microsoft.KeyVault/vaults/kv-ssl-testhkhvjnw7c","location":"japanwest","tags":{},"deletionDate":"2021-10-18T07:51:18Z","scheduledPurgeDate":"2022-01-16T07:51:18Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testr6qtlwhxe","name":"kv-ssl-testr6qtlwhxe","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5ryokdbfnfq5s4w32kvbqohvaumiz5xqi57pxrfxovgre45n62m6t4kc36xhx6tra/providers/Microsoft.KeyVault/vaults/kv-ssl-testr6qtlwhxe","location":"japanwest","tags":{},"deletionDate":"2021-10-15T05:53:13Z","scheduledPurgeDate":"2022-01-13T05:53:13Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-g5aogdcko3jbz","name":"vault2-g5aogdcko3jbz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_j624cfsm256c2wx5ucijyvupu2kfi3sz6awxl3k/providers/Microsoft.KeyVault/vaults/vault2-g5aogdcko3jbz","location":"westcentralus","tags":{},"deletionDate":"2021-11-05T08:44:53Z","scheduledPurgeDate":"2021-11-12T08:44:53Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-xqgwjsnl3tlhel","name":"vault-xqgwjsnl3tlhel","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_aza7ipsast2yi6455rpfvex4d2na2k3w7s6nrpvtan5owf/providers/Microsoft.KeyVault/vaults/vault-xqgwjsnl3tlhel","location":"westcentralus","tags":{},"deletionDate":"2021-11-05T08:43:28Z","scheduledPurgeDate":"2021-11-12T08:43:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-swcbahtsvtg65","name":"vault4-swcbahtsvtg65","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_jdgm2ayk4ng672oksf7gpszedd53ygijo5bnu/providers/Microsoft.KeyVault/vaults/vault4-swcbahtsvtg65","location":"westcentralus","tags":{},"deletionDate":"2021-11-05T08:41:56Z","scheduledPurgeDate":"2021-11-12T08:41:56Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-d2ewcjwifdnaq","name":"vault1-d2ewcjwifdnaq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_jiqcr53qirjniomtzf36sfu4lpynflmj2ha4xcv/providers/Microsoft.KeyVault/vaults/vault1-d2ewcjwifdnaq","location":"westcentralus","tags":{},"deletionDate":"2021-11-04T22:34:11Z","scheduledPurgeDate":"2021-11-11T22:34:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-kk5zpdifl3kdp","name":"vault2-kk5zpdifl3kdp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_jiqcr53qirjniomtzf36sfu4lpynflmj2ha4xcv/providers/Microsoft.KeyVault/vaults/vault2-kk5zpdifl3kdp","location":"westcentralus","tags":{},"deletionDate":"2021-11-04T22:34:05Z","scheduledPurgeDate":"2021-11-11T22:34:05Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultkccqmcc","name":"keyVaultkccqmcc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoumo342yri/providers/Microsoft.KeyVault/vaults/keyVaultkccqmcc","location":"westus2","tags":{},"deletionDate":"2021-11-04T16:45:07Z","scheduledPurgeDate":"2022-02-02T16:45:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulthmx45jm","name":"keyVaulthmx45jm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgycb2udzn4b/providers/Microsoft.KeyVault/vaults/keyVaulthmx45jm","location":"westus2","tags":{},"deletionDate":"2021-11-04T16:43:53Z","scheduledPurgeDate":"2022-02-02T16:43:53Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskvjooau23vkwgv","name":"cliakskvjooau23vkwgv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestq7wdha6zo5/providers/Microsoft.KeyVault/vaults/cliakskvjooau23vkwgv","location":"westus2","tags":{},"deletionDate":"2021-11-04T15:35:03Z","scheduledPurgeDate":"2022-02-02T15:35:03Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulty6puvd5","name":"keyVaulty6puvd5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgegfyprrumq/providers/Microsoft.KeyVault/vaults/keyVaulty6puvd5","location":"westus2","tags":{},"deletionDate":"2021-11-01T13:43:42Z","scheduledPurgeDate":"2022-01-30T13:43:42Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultnnulj7u","name":"keyVaultnnulj7u","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg32b7ylit3s/providers/Microsoft.KeyVault/vaults/keyVaultnnulj7u","location":"westus2","tags":{},"deletionDate":"2021-11-01T13:43:18Z","scheduledPurgeDate":"2022-01-30T13:43:18Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv3-pna-jbmdqim","name":"cli-test-kv3-pna-jbmdqim","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaijltz5ljwee4fqcqc23aujqeu5hgq74apw5w7ikmkmebujz2zizfl2/providers/Microsoft.KeyVault/vaults/cli-test-kv3-pna-jbmdqim","location":"eastus2euap","tags":{},"deletionDate":"2021-11-04T17:49:25Z","scheduledPurgeDate":"2022-02-02T17:49:25Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv2-pna-bsrnqwb","name":"cli-test-kv2-pna-bsrnqwb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaijltz5ljwee4fqcqc23aujqeu5hgq74apw5w7ikmkmebujz2zizfl2/providers/Microsoft.KeyVault/vaults/cli-test-kv2-pna-bsrnqwb","location":"eastus2euap","tags":{},"deletionDate":"2021-11-04T17:49:25Z","scheduledPurgeDate":"2022-02-02T17:49:25Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-gkeqvkp5","name":"cli-test-kv-pna-gkeqvkp5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaijltz5ljwee4fqcqc23aujqeu5hgq74apw5w7ikmkmebujz2zizfl2/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-gkeqvkp5","location":"eastus2euap","tags":{},"deletionDate":"2021-11-04T17:49:25Z","scheduledPurgeDate":"2022-02-02T17:49:25Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv2-pna-yuwdlzu","name":"cli-test-kv2-pna-yuwdlzu","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnagbtt6ejtemqayupud2jenznya4kxiyqvtjcq5uenrfz4g27lpfkier/providers/Microsoft.KeyVault/vaults/cli-test-kv2-pna-yuwdlzu","location":"eastus2euap","tags":{},"deletionDate":"2021-11-01T14:53:55Z","scheduledPurgeDate":"2022-01-30T14:53:55Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-ymzabgdx","name":"cli-test-kv-pna-ymzabgdx","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnagbtt6ejtemqayupud2jenznya4kxiyqvtjcq5uenrfz4g27lpfkier/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-ymzabgdx","location":"eastus2euap","tags":{},"deletionDate":"2021-11-01T14:53:55Z","scheduledPurgeDate":"2022-01-30T14:53:55Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZXvbtowFMXfBU37NIqTwAaVqolih4X13tTGpgrf%2bBMCNoWK0EJc9d130617ByrFSqLYiXJ8fue8Nnb5%2bXi32bmycf3aEP2xNuPGdWN9PD6V163W42w3K%2fLHfHe8mvnnQ3612D%2b2yud5uThsno6b%2fa5ssXmw%2bt7%2bETSD%2bYo128vlrDnLF1FzMe%2bFP8IV63V6rPV02L9slvmhbMFmcdiX%2b9Xx6ndeTWbP22NrmW%2fzY758vyl%2fzp42zReaSS%2b%2fCVnQazI6gq9fSkdf3Lt8d2Pc5EFNRloZFWsxMWPTS%2b%2fM1qx4EoBehOghAg8B8KJK9cKjjrvKyrP0pp3q7KQ4BCigUnwdK1tEyKexckkHOA6Bu5vGt39ChBevhE3O4AUDnlU06LzuSmMYMNOWfitQb2PkWYguFtJMB2iXw9TICLSo0IlaiXFq9K8BzVT9u4u3RgT1dlsIU25ou2ubbLtKkBnYlJNdOuBHnATx6NccvbpVuvDoZKjqZ1rWgjyIT8GITQLk%2fTZ6F6CGNlrsgk0qybJIcROmehmjkF5xV4EwNARdZ4zWhMjehRj17%2ftYq3HplKS8X4HPTmiLE3BxSjV2U%2b082DoPRECmGCI3Xjpxkh46YJJIOtNWOovQFx%2bm%2bCyQhGgTykxD%2fnAMdUJ5Ou2iGd2mJqYckB5ZXENyIjgY2HiAPAnBrrkkaChfP%2fQw40%2bQn6ZCm52gVoG7CPi0poRJnXkgRcCKukmoQbYxOKDMNCdSLJI%2b6SB%2fp%2bRvpYbC9O8vnRO0lAMUnvXeEx9n1Osu6umt9II8MSVGBP11PwBHrWMoS7wjX2AMXA2oe2tf%2fGfk8vUoqFEXZ%2fSyUzuCMuSMdtSljDyjMZW0cJZWEkNFlBpBDBVeWkFOySJwOERHnLy9%2fQE%3d"}' headers: cache-control: no-cache - content-length: '5496' + content-length: '5243' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:39 GMT + date: Thu, 11 Nov 2021 03:24:29 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 60cd3d9f-cd3a-4a19-be57-b1c888cb84de + x-ms-original-request-ids: b483ec30-e9c8-4506-8e1a-6d8b33fb9eb8 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZfRbqM4GIXfJVrt1abBTcKIStUqbe20dIDE2H8od05wJ6khoYFO0ozm3ffQViPtK0TixsKA/Omc8x9%2B9bb22H7fbF3Tu/rV45NU6bR31Vu3bd1cDQaV2ZoftrLb9sKc3vb2YrWrBs3bslntN3W72W2bgbdkz/7oG%2Buz5bPXHxWF6Ru7GvZXy%2BDy2%2BWzF4wDb1Dvdz83hd03g2iz2u%2Ba3XN78WjfybyV7aCwpW1t8bFo/jX1pv8TO/Hy60uPBX0PF/v7r8bhiztnt9eqCt7y9EiG5Zku80cSIWmXa0k5aabHyjvSUlAluTsqki%2BRx/x5tk6ME75a1NK6sT9XIpZ8NFJO7iM%2B3i8UJXgJU9s6j/SYL7K1NF4tlCPC%2BlW5OLZV9K6yOpU6EEp5171/voBdniGx1/xEMXHNcGKyHARAyJZPI%2BXJZO6NdZoVMuL1ra5qEB4Lna1jOV1PVdXGMQ94fgpBkI30ohYRZ7T4JHbLYyUn389RZWNfZ/VMTtuRKqUsvDE3YCin8xEYQTVgAEamKobayUfJoTJHcdQxdtLNS6HNcC1pGjG1aMOYQj7/ZJYmWt2fMzidKohN8KNiUkYu4E/DOpHTA8TTAhTTnRiNl3OAFZEbw37gM10dYec4KoW/UOEMzzPtCPsDkp/gFvxc8%2BxpWCSm1EcAIasDLbP1TPIHKA8AKBSkblIo7E4TlAUlPp0ElLk6aHWTW%2B4dFiqWpmqHqqpz6wLxBSyczCZxR%2B0ME82nrIiNoyHcdhNr5qusjE25GylNYYyMX3TrKjog4V7gXoisc%2B%2BKKcIMoHCfZmUidS6QaHnBwtcvZh/ufIjvHibnCo04%2BRCKtDzQ8w6Se%2BgiLbcCUFQcS3InxSiVEJrOSsS%2BOyHiTBd55HKJAS0A1UCI2P8xODuNnXGiMYzPOJFcv%2BPcWxQIX0JMthPby0069wK%2B5CGKCO/uN%2BAiFkqmpmqYJkpkGXb3U8NQSBjJCGtz%2BsNNp%2BdYOHytCBkOeyLTEUkaGZ/Q9McImR5GjmkQQmSt7zBkBeyKiAMxL7%2BFnV9sCYV1w1fQGBUORAP6f0XjejI7P3%2BihnWTk3OmtESQMxRXUECxRfDfYhBgkq6Tj4qhbkIUX04qTGl6vNeldPDrqxnWKML6gKJs5iwUX/78481z5NbVU4Q5VMZP4Cbwg6B1VkA98GfVkhXiNXWUEmnkGHV1V0hXoJodBbg1Uo8OH%2Bor83uozSDgfOpy7ffv/wA%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZbvbupGEMXfBVX9VML6D70QKapsdkztZmazm12uyDdiHIKXQATkGnx1371jqvb2FYLk1cqWZWvOnvOb%2Bd7bVqfj/XrrD73b7z1IHq177N32Xo/H98PtYPC22C5W1Vu1Pd4s2o99dVPu3gaHj%2BdDuV%2B/H9e77WEgnoOX3%2BMvQT94fhH9eLlc9BdVGfXL53H4JXwR4%2BFYDN73u2/rZbU/DHBd7neH3cvx5q/qPFt8bI6DZbWpjtXycnP4Y/G%2B7n/jN/njd6EIxn3BV/DrLwfPf9z5anvn/OyrmRXWOJNZmLlHN1b3buNeZB6gLUOq3RlrdyLrI6zLM9XLEYJujTVSWd9okWUEeWN8HiPAkCS0JLE1/mmiIL/r/db7Co8WnFEP8OnFaFGQhVBZaNAmoZKzEbW6IblqlMwyXecRC9BQ/ZpquwpQuhC9mRiZd8J0YvzjivDTK1HnJ2yhUbbkylxEthgR6Aida7CeR6ZmpVgJ7dgOYibZJhOyLlYOGuMuSkyArEnuryEieYg1DskmXHvOTngaYVtk5AppPMYo8Uwwj8llqXKZRIcnJeeChG5QYOeKR%2BXsn9ciSIQWWQgUSrqgi4qyHBOfn7WbR7zHWHtmRMpigMD2KTN21RhbSI7R2bj5v8y4CmeciE9aSd1Su%2BL1OtK2jJXcTKlNuGiICJ4yhHyIXrNTZlPNz4zdTI28OKNIHhLqCPr5iVFG2DITWx%2Bi5GXTEdoiJZELbhyxAhcQ0ES5vKPsRFuSBtxZ2XmD8DMlOck8%2BeRicEIYB9bH2ObcYVcNsRhGQsyGENQWoAXvskg144KxcjJ1yWbxnKZiSvVFjM4T10IM1gCGSvoG2%2BSsJAzR0gWhys2FqSEgy%2BEBrl16RmeWau%2BGxjE56nRCMvlJjGtorAHVmk/aRSg5Gl1jbTMgyJiTc64eQwI4M0oYFUupbSaNnYGpfcys/d%2BIAS55%2BOQ5YV/kHTh5vOjaatJQuxnxGHG6tFFwQ%2B1yBiwIZV95%2BEp5IqWMp8/A%2BG46LTs1/svIFejBjYPrreesxYqnceBOmo3QQ6vsJlWy5J2BKjcT3bnDZ6mpn4AETZVNGazMjR8//gY%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZZdb%2BI4FIb/C1rt1VLskmSUStWq7Np004lDHfuE5s4Qd6HOF0k6pYzmv88J7c3MT0DKzVEskB%2Be8758n9T2OHzd166f3HyfsLtU6XRyM9kNQ9vfzGaVqc3/trL1cGVOr5292jbVrH/d9Ntu3w77pu5nZEOfA%2B8LndLNM5l6RWGmxm7n0%2B0mvP5y/UxCPySztmu%2B7Qvb9bN4v%2B2avnkerh7sO5jXcpgVtrSDLc5D/7dp99NveBI/Paa0HBK8KF/tE7/MbG2fpWVeFrnh7B0Hyty/wBeATa5VpCDppqX5EjbDhUkrmjAvkSExrAukhgnOv2JWb%2BIVORMO4/TwNEsQ61dtEKWM6UWmRS%2B1yvd9JUx39VCcJyHpgTCLncMeUgF5x3UpHbyV%2BfwK4vkNghxxsDK33lpBCMBmbeClM2nqqGTOKcqYWApUQiUljmM3AiQWJcZ4OMCXk7E9fuHX8BIbTPPon9w4SSd18v0bJQg%2BLCltxDy2qh6WhTYh0yK6WRnB/SdSkkgKeyIZUEmSHDM7OqbSQJtVRiJbk74XkRU/amPyxLE63uLxicHzzNC1w/mOPFUR7KnuY7nBtPV2366PyDOS2SmOf3ispFgeAkSgfL/ohzbhmu77pcSU0DlbV1XHJtTuf1zNhl5pl/ADQJOG5X3UJBQqYx34x78jCfIMYQfFRRIhkhuK3n7dROpnLZvykieVxGgKbhLEbAL7H2IfswbQR2yaIdtAIUi70jh07oEDeUY8qNPSBzFKtLHciYc18B5jzzeaoWK1ge75GrRLGCnEXYA4WnKIwc%2BWeqfYh2gT2Aq7YuhK36d1ytDptTm3mZmPIJzRk49sJBnZs0uh9Nw/fscTQTCSFRETsapOs2NYRQ7SCVLIT0l%2BZk%2Bm51ee35EWjoyVxV7cI6X2drbM/q0VNacmyGg1q3K/yzEuD%2BPmDAsQ3LUzm2pYbIAu%2BUEgnoco7UHyRS/709L5BbbbExMfgTWzKK945iFqJNO8w1LAI3Br0PmHvSOOrprJWYWyw/CeSoxxyssXkPmGvJuUGzIcGG7c659uPHTw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZXvbtowFMXfBU37NIqTwAaVqolih4X13tTGpgrf%2BBMCNoWK0EJc9d130617ByrFSqLYiXJ8fue8Nnb5%2BXi32bmycf3aEP2xNuPGdWN9PD6V163W42w3K/LHfHe8mvnnQ3612D%2B2yud5uThsno6b/a5ssXmw%2Bt7%2BETSD%2BYo128vlrDnLF1FzMe%2BFP8IV63V6rPV02L9slvmhbMFmcdiX%2B9Xx6ndeTWbP22NrmW/zY758vyl/zp42zReaSS%2B/CVnQazI6gq9fSkdf3Lt8d2Pc5EFNRloZFWsxMWPTS%2B/M1qx4EoBehOghAg8B8KJK9cKjjrvKyrP0pp3q7KQ4BCigUnwdK1tEyKexckkHOA6Bu5vGt39ChBevhE3O4AUDnlU06LzuSmMYMNOWfitQb2PkWYguFtJMB2iXw9TICLSo0IlaiXFq9K8BzVT9u4u3RgT1dlsIU25ou2ubbLtKkBnYlJNdOuBHnATx6NccvbpVuvDoZKjqZ1rWgjyIT8GITQLk/TZ6F6CGNlrsgk0qybJIcROmehmjkF5xV4EwNARdZ4zWhMjehRj17/tYq3HplKS8X4HPTmiLE3BxSjV2U%2B082DoPRECmGCI3Xjpxkh46YJJIOtNWOovQFx%2Bm%2BCyQhGgTykxD/nAMdUJ5Ou2iGd2mJqYckB5ZXENyIjgY2HiAPAnBrrkkaChfP/Qw40%2BQn6ZCm52gVoG7CPi0poRJnXkgRcCKukmoQbYxOKDMNCdSLJI%2B6SB/p%2BRvpYbC9O8vnRO0lAMUnvXeEx9n1Osu6umt9II8MSVGBP11PwBHrWMoS7wjX2AMXA2oe2tf/Gfk8vUoqFEXZ/SyUzuCMuSMdtSljDyjMZW0cJZWEkNFlBpBDBVeWkFOySJwOERHnLy9/QE%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv081205","name":"bez-kv081205","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081205","location":"eastus","tags":{},"deletionDate":"2021-08-12T11:09:06Z","scheduledPurgeDate":"2021-11-10T11:09:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv081204","name":"bez-kv081204","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081204","location":"eastus","tags":{},"deletionDate":"2021-08-12T11:09:06Z","scheduledPurgeDate":"2021-11-10T11:09:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv0812","name":"bez-kv0812","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv0812","location":"eastus","tags":{},"deletionDate":"2021-08-12T11:09:06Z","scheduledPurgeDate":"2021-11-10T11:09:06Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/yemingkv","name":"yemingkv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yemingkv/providers/Microsoft.KeyVault/vaults/yemingkv","location":"eastus","tags":{},"deletionDate":"2021-08-11T07:56:43Z","scheduledPurgeDate":"2021-11-09T07:56:43Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-5hqk27z","name":"cli-test-kv-mgmt-5hqk27z","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtivxo77zobhcsjfhxobh6x3jzrhadfzgw3z3pef3ekun3eovof5wnd/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-5hqk27z","location":"eastus","tags":{},"deletionDate":"2021-08-05T21:48:38Z","scheduledPurgeDate":"2021-11-03T21:48:38Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-x4nuirw5u","name":"cli-test-kv-nr-x4nuirw5u","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulepj46rajvz4tjixw64i33wvy3bgyqp5q3zovawd7ddcxau/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-x4nuirw5u","location":"eastus2","tags":{},"deletionDate":"2021-08-19T21:46:15Z","scheduledPurgeDate":"2021-11-17T21:46:15Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultlgrqhal6tqqwbvplf","name":"envaultlgrqhal6tqqwbvplf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgrgpxin3njlb4y5pyprh53y4m4mhm4sugbcvikfntmrbggbhqzcahvbdj5a3afiwyh/providers/Microsoft.KeyVault/vaults/envaultlgrqhal6tqqwbvplf","location":"eastus2","tags":{},"deletionDate":"2021-08-13T00:55:02Z","scheduledPurgeDate":"2021-11-11T00:55:02Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envault72ack4nyv66fdctnm","name":"envault72ack4nyv66fdctnm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgbg7s4fcehwz4rmlpo7buxvmeggkcq5buuu23j53i2jfpwohrysc6xrlb36jfbytae/providers/Microsoft.KeyVault/vaults/envault72ack4nyv66fdctnm","location":"eastus2","tags":{},"deletionDate":"2021-08-13T00:35:15Z","scheduledPurgeDate":"2021-11-11T00:35:15Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-5uagp74n7","name":"cli-test-kv-nr-5uagp74n7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewulibutz7kq3tybqokqxisit3qgjpnvcev2m6krqrqmfl/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-5uagp74n7","location":"eastus2","tags":{},"deletionDate":"2021-08-12T21:50:47Z","scheduledPurgeDate":"2021-11-10T21:50:47Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ksswjlznt","name":"cli-test-kv-nr-ksswjlznt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewulibutz7kq3tybqokqxisit3qgjpnvcev2m6krqrqmfl/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ksswjlznt","location":"eastus2","tags":{},"deletionDate":"2021-08-12T21:50:47Z","scheduledPurgeDate":"2021-11-10T21:50:47Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitest244umy5ikzckimt5h","name":"clitest244umy5ikzckimt5h","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5oyjsqeh6rwo7keizs577zb3i6a3oeg4wo4mumuigb5a6zow5cl6ncaifsvdezbv5/providers/Microsoft.KeyVault/vaults/clitest244umy5ikzckimt5h","location":"southcentralus","tags":{},"deletionDate":"2021-06-18T04:49:09Z","scheduledPurgeDate":"2021-09-16T04:49:09Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitest3425dgnzjhy24y7cp","name":"clitest3425dgnzjhy24y7cp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgw66da3bqvkc7ix3pjipetnpcowj7mfvbpdc32472ay4ra3njun5bws7xv2blj5dwz/providers/Microsoft.KeyVault/vaults/clitest3425dgnzjhy24y7cp","location":"southcentralus","tags":{},"deletionDate":"2021-06-18T03:28:36Z","scheduledPurgeDate":"2021-09-16T03:28:36Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestu3vmxesevwfjfzluv","name":"clitestu3vmxesevwfjfzluv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgv33w4fwpqzrzequ5rl4ncqxlzbqzwy6ojncsqd77nk6xyi4qghusrcao4cqp3u3rj/providers/Microsoft.KeyVault/vaults/clitestu3vmxesevwfjfzluv","location":"southcentralus","tags":{},"deletionDate":"2021-06-11T02:56:52Z","scheduledPurgeDate":"2021-09-09T02:56:52Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/southcentralus/deletedVaults/clitestvdvikselsshyafvq5","name":"clitestvdvikselsshyafvq5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rguw3bnrbjz7go5kuadwjx4j2d7flrtu2ggofazinh4hkq57d7r7mpifljcahncrjhn/providers/Microsoft.KeyVault/vaults/clitestvdvikselsshyafvq5","location":"southcentralus","tags":{},"deletionDate":"2021-06-04T03:51:13Z","scheduledPurgeDate":"2021-09-02T03:51:13Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clihvgl3gy46dym","name":"clihvgl3gy46dym","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identityhoi6nc2w6x7capgcly3i6fuglvr3fsgfy/providers/Microsoft.KeyVault/vaults/clihvgl3gy46dym","location":"westus","tags":{},"deletionDate":"2021-07-08T21:16:24Z","scheduledPurgeDate":"2021-10-06T21:16:24Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitesty2fw6l3y4nx4yumnz","name":"clitesty2fw6l3y4nx4yumnz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgt7podnz7yr5hzsyqc56k6b3f7e3jiq7uyvlxu2skjptnvxfmkdb3j3wnypqlml7cm/providers/Microsoft.KeyVault/vaults/clitesty2fw6l3y4nx4yumnz","location":"westus","tags":{},"deletionDate":"2021-07-08T19:07:22Z","scheduledPurgeDate":"2021-10-06T19:07:22Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clipafg4szpwly6","name":"clipafg4szpwly6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identityvftjvc5tbdyudzupxktncwcrn5ovxwhxl/providers/Microsoft.KeyVault/vaults/clipafg4szpwly6","location":"westus","tags":{},"deletionDate":"2021-07-07T02:15:17Z","scheduledPurgeDate":"2021-10-05T02:15:17Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cliyh4ybyykzmru","name":"cliyh4ybyykzmru","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identitycx7gnrguosvz7xjcexb22mdisobtob7da/providers/Microsoft.KeyVault/vaults/cliyh4ybyykzmru","location":"westus","tags":{},"deletionDate":"2021-07-07T02:09:08Z","scheduledPurgeDate":"2021-10-05T02:09:08Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envaultjls6bul3qhujyycvs","name":"envaultjls6bul3qhujyycvs","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryption5oj23ce7ezi5q6jmap4phcqk5kh3xzuso434fb332bbk76ek/providers/Microsoft.KeyVault/vaults/envaultjls6bul3qhujyycvs","location":"westus","tags":{},"deletionDate":"2021-07-02T04:04:51Z","scheduledPurgeDate":"2021-09-30T04:04:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-uqnslxox6kc5y","name":"vault3-uqnslxox6kc5y","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_xvf4sd2eb3jokf6zeqoq5ocmnmn5cc5j3y/providers/Microsoft.KeyVault/vaults/vault3-uqnslxox6kc5y","location":"westcentralus","tags":{},"deletionDate":"2021-07-08T09:07:56Z","scheduledPurgeDate":"2021-10-06T09:07:56Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-hrshjgsdgsddod","name":"vault-hrshjgsdgsddod","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_nzpw35mr6frwjvrxp42s6honl4k526lepr3rcbydm6mhdt/providers/Microsoft.KeyVault/vaults/vault-hrshjgsdgsddod","location":"westcentralus","tags":{},"deletionDate":"2021-07-08T09:05:58Z","scheduledPurgeDate":"2021-10-06T09:05:58Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-xbkxevpgbqpvw","name":"vault1-xbkxevpgbqpvw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_unp4z2d6jovrafaluvngpih5nutvddhb33lhfgn/providers/Microsoft.KeyVault/vaults/vault1-xbkxevpgbqpvw","location":"westcentralus","tags":{},"deletionDate":"2021-07-08T08:57:28Z","scheduledPurgeDate":"2021-10-06T08:57:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-ycpjuf3q56dgq","name":"vault2-ycpjuf3q56dgq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_unp4z2d6jovrafaluvngpih5nutvddhb33lhfgn/providers/Microsoft.KeyVault/vaults/vault2-ycpjuf3q56dgq","location":"westcentralus","tags":{},"deletionDate":"2021-07-08T08:57:28Z","scheduledPurgeDate":"2021-10-06T08:57:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-zhpbzv2vcnptf","name":"vault4-zhpbzv2vcnptf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_njpvcvfalq3yoh3u7oxfkxn3dt36np76x5r73/providers/Microsoft.KeyVault/vaults/vault4-zhpbzv2vcnptf","location":"westcentralus","tags":{},"deletionDate":"2021-07-08T08:54:35Z","scheduledPurgeDate":"2021-10-06T08:54:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultvmpokro","name":"keyVaultvmpokro","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5vuelqvdub/providers/Microsoft.KeyVault/vaults/keyVaultvmpokro","location":"westus2","tags":{},"deletionDate":"2021-08-05T20:53:12Z","scheduledPurgeDate":"2021-11-03T20:53:12Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskv35c7v4znx7og","name":"cliakskv35c7v4znx7og","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestdl6cslfyf6/providers/Microsoft.KeyVault/vaults/cliakskv35c7v4znx7og","location":"westus2","tags":{},"deletionDate":"2021-08-05T19:40:36Z","scheduledPurgeDate":"2021-11-03T19:40:36Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultcfm4vys","name":"keyVaultcfm4vys","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rglhkwpqg6ln/providers/Microsoft.KeyVault/vaults/keyVaultcfm4vys","location":"westus2","tags":{},"deletionDate":"2021-07-29T20:53:14Z","scheduledPurgeDate":"2021-10-27T20:53:14Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultwz53exm","name":"keyVaultwz53exm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxxzg5xzyxz/providers/Microsoft.KeyVault/vaults/keyVaultwz53exm","location":"westus2","tags":{},"deletionDate":"2021-07-29T20:52:21Z","scheduledPurgeDate":"2021-10-27T20:52:21Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultm2tcbfh","name":"keyVaultm2tcbfh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgdmpz2etjsg/providers/Microsoft.KeyVault/vaults/keyVaultm2tcbfh","location":"westus2","tags":{},"deletionDate":"2021-07-29T20:51:24Z","scheduledPurgeDate":"2021-10-27T20:51:24Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestcgsarzy32logfm6lp","name":"clitestcgsarzy32logfm6lp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4jal2ynilr5tbetkbk4wiyqu3d5sinozpy3jefwu37ofxabblq4ibxhebhvay6gj3/providers/Microsoft.KeyVault/vaults/clitestcgsarzy32logfm6lp","location":"eastus2euap","tags":{},"deletionDate":"2021-06-19T14:41:50Z","scheduledPurgeDate":"2021-09-17T14:41:50Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestp3jo3kwthrpvzi4vb","name":"clitestp3jo3kwthrpvzi4vb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg65nk4elzvzeyvtbgoeqpi6q2ulkv5fwienv2bvcf6voayja2z6i4ix3c4sdmmp73e/providers/Microsoft.KeyVault/vaults/clitestp3jo3kwthrpvzi4vb","location":"eastus2euap","tags":{},"deletionDate":"2021-06-18T04:54:22Z","scheduledPurgeDate":"2021-09-16T04:54:22Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitest6unptooss65vbegkg","name":"clitest6unptooss65vbegkg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg47bltlj4j5wchpetac3lxbhfrz4zee5s5eyaus5knqiur6gvk6et6tdklywwqgmrv/providers/Microsoft.KeyVault/vaults/clitest6unptooss65vbegkg","location":"eastus2euap","tags":{},"deletionDate":"2021-06-18T03:34:25Z","scheduledPurgeDate":"2021-09-16T03:34:25Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestn44kpagn37cjftkny","name":"clitestn44kpagn37cjftkny","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgljftvk7vhy5xqbyyyyubc3b7kutqnli6vefhty6z5353smg2q4ph7n3fag4g36qdl/providers/Microsoft.KeyVault/vaults/clitestn44kpagn37cjftkny","location":"eastus2euap","tags":{},"deletionDate":"2021-06-11T03:01:22Z","scheduledPurgeDate":"2021-09-09T03:01:22Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestyfre534m74aeohspo","name":"clitestyfre534m74aeohspo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgw4skp73opfen57vifo5erkoz7ik27hofbqpeppsx2oxw5ymwi2zmondglgy3bhrnr/providers/Microsoft.KeyVault/vaults/clitestyfre534m74aeohspo","location":"eastus2euap","tags":{},"deletionDate":"2021-06-04T03:56:05Z","scheduledPurgeDate":"2021-09-02T03:56:05Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZXRatswFIbfJYxdLY3U2hkulNGukje3VhJZOnZ8p8TqmsqO3dhp05S%2b%2b46TwfoMAYE5ICz4%2bP7%2fvA%2fWdtfdr9auHVy%2bD9h1onQyuBw8dl3TXo5GlVmbP7ay6%2b7M7Lcbe7asq1G7XbTLzarpVvW6HZEFfRh73%2bmQLh7I0CsKMzR2eTFcLoLz7%2bcPJPADMmo29cuqsJt2FK%2bWm7qtH7qzO%2fsGZlt2o8KWtrPFYWh%2fmGY1fMGb%2bPOrc0KDIcFDv35pHb5YO7u%2bUlWwzZMdGJpnuszvgEegXa4l5KCp9hXZwYJDJZnbKZBPMfGZzAohuSM431gXMHNRCuNqT1VNK10A4PKJdVGo0%2bZJMJ%2bnWSlstQt11U0k81miuDRV%2fKqrppacj2eKXA2%2b%2fQN2fnrE6FgrmEAY71TaCMv8ZySIJGpPg3QzR3mSNTg3TBGA2PlcOpCg9V6VIIX2tWFSGNLcqqrjggU8PRJLJlr9%2bsmEktf3p6haoAHVMQ58VIsLTVGVaGLLuaecfLIQMeXEBNW6RbARgupVTGTYvqGa0rIAkqyYAmdUA4Qz5z%2fDEVyKDp4iMH%2fcZxOBXSgi0SSKWX2cyHDmYdaExaylPZCw3SkKwqJpqcNvtXxDgGvMql6waCrDJcG5lSRg8j%2bwExatFyOaGEd9FOvGYvGpXjT329Npx2MS6PmeC6ndK4pYSxRNZ2ViiNur7NBxG6m4MCUjmFBREMo%2fcdPJCXaaz%2bYXBZrSeaqUUYGEDBLCkHk6a%2fJYUwAlEuPyPpp32PrYcY9IsLnFzuMx5aD6LVFihLPeNMry%2fectwPT19PQ2wbHQICzG6NkmZgGbKTmVbI757JCaD6m6SZBWqNZNeKDmZO%2fZ7kgZKbEINwXHfIOMOX8%2bePbx8Rc%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultpohjtsm","name":"cmk-test-keyvaultpohjtsm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnkipxktgopdka3i37vpckvjrnzamj2lgslp2b76i6ehfsavf2xlm7ah75lr5wswud/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultpohjtsm","location":"eastus","tags":{},"deletionDate":"2021-10-22T16:13:06Z","scheduledPurgeDate":"2022-01-20T16:13:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-zwrctam","name":"cli-test-kv-mgmt-zwrctam","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtfkrlnpbbucirm6h3ncxnpvu3aghyglvgobx2bixx7rlltjhd2q2qz/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-zwrctam","location":"eastus","tags":{},"deletionDate":"2021-10-22T10:45:58Z","scheduledPurgeDate":"2022-01-20T10:45:58Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultrqqdffi","name":"cmk-test-keyvaultrqqdffi","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwx4os36vivtpzlsti5kbtqfrrkrmxyd7j2dh3tdxzmwqryfoebpij4jdanr4t32la/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultrqqdffi","location":"eastus","tags":{},"deletionDate":"2021-10-22T08:23:27Z","scheduledPurgeDate":"2022-01-20T08:23:27Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultj7r4xi5","name":"cmk-test-keyvaultj7r4xi5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgkviirvjvg3tbz4e347ho5gn6jjavznpa3igmb32zb7koyamjzthuxgwa4mr3sqxq2/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultj7r4xi5","location":"eastus","tags":{},"deletionDate":"2021-10-21T06:19:11Z","scheduledPurgeDate":"2022-01-19T06:19:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-527cmgy","name":"cli-test-kv-mgmt-527cmgy","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtso6ot2ueobgd676pdr6g6vxd3bywrj7vhkly2i7a5nldxb33rv3ez/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-527cmgy","location":"eastus","tags":{},"deletionDate":"2021-10-19T07:13:03Z","scheduledPurgeDate":"2022-01-17T07:13:03Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-t7ftdfnwu","name":"cli-test-kv-nr-t7ftdfnwu","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruled5srvbwupd7rtby6k5owh7npgobr3oozwxqa3xtvfhzos/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-t7ftdfnwu","location":"eastus2","tags":{},"deletionDate":"2021-11-05T04:47:39Z","scheduledPurgeDate":"2021-11-12T04:47:39Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-lz2qmqryk","name":"cli-test-kv-nr-lz2qmqryk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruled5srvbwupd7rtby6k5owh7npgobr3oozwxqa3xtvfhzos/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-lz2qmqryk","location":"eastus2","tags":{},"deletionDate":"2021-11-05T04:47:39Z","scheduledPurgeDate":"2022-02-03T04:47:39Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cliaijn7iga5mci","name":"cliaijn7iga5mci","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_uribkope2mhnlxb4fhgznwvtnf44lwy5cejlacombg5/providers/Microsoft.KeyVault/vaults/cliaijn7iga5mci","location":"eastus2","tags":{},"deletionDate":"2021-11-05T04:04:04Z","scheduledPurgeDate":"2021-11-12T04:04:04Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitestiomtmrlidscf7rc67","name":"clitestiomtmrlidscf7rc67","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxks2znpsgewou7gachmndul5pz24kzanagyia2ihotx5t6clijszwdw2ykrsqd4bs/providers/Microsoft.KeyVault/vaults/clitestiomtmrlidscf7rc67","location":"westus","tags":{},"deletionDate":"2021-11-04T16:16:39Z","scheduledPurgeDate":"2021-11-11T16:16:39Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitesty7ts66rj5lv7egdmv","name":"clitesty7ts66rj5lv7egdmv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnqep3wazlxs2ji7e3ycppwjpg633wepqaru5m6jijkd6xqsb4pc7q7xvumhyflizf/providers/Microsoft.KeyVault/vaults/clitesty7ts66rj5lv7egdmv","location":"westus","tags":{},"deletionDate":"2021-11-04T15:07:04Z","scheduledPurgeDate":"2021-11-11T15:07:04Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cli-sni-kv","name":"cli-sni-kv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jiasli-cli-dev/providers/Microsoft.KeyVault/vaults/cli-sni-kv","location":"westus","tags":{},"deletionDate":"2021-09-22T07:21:49Z","scheduledPurgeDate":"2021-12-21T07:21:49Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/acctestvault210830160678","name":"acctestvault210830160678","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ml-210830160604186478/providers/Microsoft.KeyVault/vaults/acctestvault210830160678","location":"westus","tags":{},"deletionDate":"2021-08-30T08:21:45Z","scheduledPurgeDate":"2021-11-28T08:21:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/acctestvault210830151211","name":"acctestvault210830151211","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ml-210830151230299211/providers/Microsoft.KeyVault/vaults/acctestvault210830151211","location":"westus","tags":{},"deletionDate":"2021-08-30T07:18:23Z","scheduledPurgeDate":"2021-11-28T07:18:23Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testcamqjrhvf","name":"kv-ssl-testcamqjrhvf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgcdxpzguajgfl3mwq2bdicdwzanp2vwikaomv3kxzxsq4oqynzettvzhuv4o2dsxdx/providers/Microsoft.KeyVault/vaults/kv-ssl-testcamqjrhvf","location":"japanwest","tags":{},"deletionDate":"2021-09-09T20:06:49Z","scheduledPurgeDate":"2021-12-08T20:06:49Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/japanwest/deletedVaults/kv-ssl-testvrjmtf5ac","name":"kv-ssl-testvrjmtf5ac","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rghy4urkrr2mv4cyaw7fqg7a7g2jv66vzpl4zuzjvvk3uire4l4wp353tohyirgcwca/providers/Microsoft.KeyVault/vaults/kv-ssl-testvrjmtf5ac","location":"japanwest","tags":{},"deletionDate":"2021-09-02T20:06:26Z","scheduledPurgeDate":"2021-12-01T20:06:26Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-ebxidjx6ckr3i","name":"vault4-ebxidjx6ckr3i","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_rubkrl2clcwxapxr26jssn5vsfqyyunjby4cq/providers/Microsoft.KeyVault/vaults/vault4-ebxidjx6ckr3i","location":"westcentralus","tags":{},"deletionDate":"2021-11-04T22:31:00Z","scheduledPurgeDate":"2021-11-11T22:31:00Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-oor5u5pows44o","name":"vault3-oor5u5pows44o","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_hcmca3gj2hy7bofvh6rvj3nawdphjsxwyv/providers/Microsoft.KeyVault/vaults/vault3-oor5u5pows44o","location":"westcentralus","tags":{},"deletionDate":"2021-11-04T22:26:52Z","scheduledPurgeDate":"2021-11-11T22:26:52Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-iemtavyo2g23le","name":"vault-iemtavyo2g23le","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_lajn2yibchect7wqbo7qy6mg6sqaopflos6peal3ymx3xy/providers/Microsoft.KeyVault/vaults/vault-iemtavyo2g23le","location":"westcentralus","tags":{},"deletionDate":"2021-11-04T22:24:44Z","scheduledPurgeDate":"2021-11-11T22:24:44Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultawtcozj","name":"keyVaultawtcozj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgzs3umcus7g/providers/Microsoft.KeyVault/vaults/keyVaultawtcozj","location":"westus2","tags":{},"deletionDate":"2021-11-01T13:42:55Z","scheduledPurgeDate":"2022-01-30T13:42:55Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskv36n2tdhcxn4r","name":"cliakskv36n2tdhcxn4r","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitesttumoi3rk2z/providers/Microsoft.KeyVault/vaults/cliakskv36n2tdhcxn4r","location":"westus2","tags":{},"deletionDate":"2021-11-01T12:33:01Z","scheduledPurgeDate":"2022-01-30T12:33:01Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultjepf6o2","name":"keyVaultjepf6o2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgsioku372aw/providers/Microsoft.KeyVault/vaults/keyVaultjepf6o2","location":"westus2","tags":{},"deletionDate":"2021-11-01T05:59:31Z","scheduledPurgeDate":"2022-01-30T05:59:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVault4dgjlbc","name":"keyVault4dgjlbc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgsqckvliqli/providers/Microsoft.KeyVault/vaults/keyVault4dgjlbc","location":"westus2","tags":{},"deletionDate":"2021-11-01T05:59:09Z","scheduledPurgeDate":"2022-01-30T05:59:09Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultqqgdcgw","name":"keyVaultqqgdcgw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjf3vn6dero/providers/Microsoft.KeyVault/vaults/keyVaultqqgdcgw","location":"westus2","tags":{},"deletionDate":"2021-11-01T05:57:46Z","scheduledPurgeDate":"2022-01-30T05:57:46Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv3-pna-phy4stk","name":"cli-test-kv3-pna-phy4stk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnagbtt6ejtemqayupud2jenznya4kxiyqvtjcq5uenrfz4g27lpfkier/providers/Microsoft.KeyVault/vaults/cli-test-kv3-pna-phy4stk","location":"eastus2euap","tags":{},"deletionDate":"2021-11-01T14:53:55Z","scheduledPurgeDate":"2022-01-30T14:53:55Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv2-pna-xeidjn7","name":"cli-test-kv2-pna-xeidjn7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnatahfkg4d7hvik67y2lhl2kfvxdt3kqgximpf4wttrdxi4fgjfkma64/providers/Microsoft.KeyVault/vaults/cli-test-kv2-pna-xeidjn7","location":"eastus2euap","tags":{},"deletionDate":"2021-10-29T18:37:51Z","scheduledPurgeDate":"2022-01-27T18:37:51Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv3-pna-zm7kxoi","name":"cli-test-kv3-pna-zm7kxoi","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnatahfkg4d7hvik67y2lhl2kfvxdt3kqgximpf4wttrdxi4fgjfkma64/providers/Microsoft.KeyVault/vaults/cli-test-kv3-pna-zm7kxoi","location":"eastus2euap","tags":{},"deletionDate":"2021-10-29T18:37:51Z","scheduledPurgeDate":"2022-01-27T18:37:51Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-bewtwcca","name":"cli-test-kv-pna-bewtwcca","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnatahfkg4d7hvik67y2lhl2kfvxdt3kqgximpf4wttrdxi4fgjfkma64/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-bewtwcca","location":"eastus2euap","tags":{},"deletionDate":"2021-10-29T18:37:51Z","scheduledPurgeDate":"2022-01-27T18:37:51Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv2-pna-mhzqf4x","name":"cli-test-kv2-pna-mhzqf4x","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnadhiiln6gkn74al5unwex56cp4w7tbhug5wulsvrg7tktjogvaih4t2/providers/Microsoft.KeyVault/vaults/cli-test-kv2-pna-mhzqf4x","location":"eastus2euap","tags":{},"deletionDate":"2021-10-26T08:35:30Z","scheduledPurgeDate":"2022-01-24T08:35:30Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZVtb6JAFIX%2fC9nsp7W8KFttYjbgDAa2d%2biMMzT4DQFfBqtGaEWa%2fve9trvZ36AJJMxwAskz55z7buzKtnnc7KraeHg3qDeTamY8GOumOdQPpvmS7bJV%2bVLumrusez2Wd%2fn%2bxaxfF3V%2b3ByazX5Xm9bCXv4c3Ns9e7G0eoOiyHpZmfd7%2bWLk3DtLa%2bSOLPNw3L9tivJYm7DJj%2ft6v2zufpfnJHvdNmZRbsumLD4X9a%2fssOm9oRI%2fPnYse9Sz8LK%2ff6sr%2fOO%2bKndjVSXPIomkUCKQNFEzNYof1VYtSWiDzB3WpX3owpZp7sLlmbChIHPCKhHgfseo8BkpfF6FJyHzlhHVoc4FBbagamz8%2bAvCuXoSGinI3GYS3Jis7Fiuh7xb05gEEyDJVEh%2fysh8KvSaXG6OOqFTJLcNeAcXEs%2f0BizRB1m5oFcu04DW4BZ08yHX8wDXLSjuCO2d0RYB0PDMOhYwVICEPq%2bCCe%2fSC4jIe%2fLYhcaVmwJZpAOMSAsdRkWHfdD%2bMCbeidFwwGThMxURRsHm3ZbiewdNQsESGB9liYr%2bM8WEMim8xxuoC42VoCkGhTtYHyfQa%2bSRnqESPhDeBwtDRHgbqwj9os5MRgGvkmlMUP%2bfh5rdQF0o%2b6sMlcUkEiFiCBbF5KQ20PTEtR8wkp6ARhMuo2lM0wFX6ZmR8ATkMyVfE8Shynu68pzgGPEc7AonltgR3WW0BFiefhDLBDvBx%2fMXE0a8FqrQjVVoMUUxW9RlMiBCrsbGx8cf"}' headers: cache-control: no-cache - content-length: '4811' + content-length: '3988' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:39 GMT + date: Thu, 11 Nov 2021 03:24:29 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 3aaeaac4-3b12-454d-a545-6f38873df4db + x-ms-original-request-ids: 38d6927a-21b2-4996-a0a7-1e2301c53aab status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZZdb%2BI4FIb/C1rt1VLskmSUStWq7Np004lDHfuE5s4Qd6HOF0k6pYzmv88J7c3MT0DKzVEskB%2Be8758n9T2OHzd166f3HyfsLtU6XRyM9kNQ9vfzGaVqc3/trL1cGVOr5292jbVrH/d9Ntu3w77pu5nZEOfA%2B8LndLNM5l6RWGmxm7n0%2B0mvP5y/UxCPySztmu%2B7Qvb9bN4v%2B2avnkerh7sO5jXcpgVtrSDLc5D/7dp99NveBI//Paa0HBK8KF//tE7/MbG2fpWVeFrnh7B0Hyty/wBeATa5VpCDppqX5EjbDhUkrmjAvkSExrAukhgnOv2JWb%2BIVORMO4/TwNEsQ61dtEKWM6UWmRS%2B1yvd9JUx39VCcJyHpgTCLncMeUgF5x3UpHbyV%2BfwK4vkNghxxsDK33lpBCMBmbeClM2nqqGTOKcqYWApUQiUljmM3AiQWJcZ4OMCXk7E9fuHX8BIbTPPon9w4SSd18v0bJQg%2BLCltxDy2qh6WhTYh0yK6WRnB/SdSkkgKeyIZUEmSHDM7OqbSQJtVRiJbk74XkRU/amPyxLE63uLxicHzzNC1w/mOPFUR7KnuY7nBtPV2366PyDOS2SmOf3ispFgeAkSgfL/ohzbhmu77pcSU0DlbV1XHJtTuf1zNhl5pl/ADQJOG5X3UJBQqYx34x78jCfIMYQfFRRIhkhuK3n7dROpnLZvykieVxGgKbhLEbAL7H2IfswbQR2yaIdtAIUi70jh07oEDeUY8qNPSBzFKtLHciYc18B5jzzeaoWK1ge75GrRLGCnEXYA4WnKIwc%2BWeqfYh2gT2Aq7YuhK36d1ytDptTm3mZmPIJzRk49sJBnZs0uh9Nw/fscTQTCSFRETsapOs2NYRQ7SCVLIT0l%2BZk%2Bm51ee35EWjoyVxV7cI6X2drbM/q0VNacmyGg1q3K/yzEuD%2BPmDAsQ3LUzm2pYbIAu%2BUEgnoco7UHyRS/709L5BbbbExMfgTWzKK945iFqJNO8w1LAI3Br0PmHvSOOrprJWYWyw/CeSoxxyssXkPmGvJuUGzIcGG7c659uPHTw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZXvbtowFMXfBU37NIqTwAaVqolih4X13tTGpgrf%2BBMCNoWK0EJc9d130617ByrFSqLYiXJ8fue8Nnb5%2BXi32bmycf3aEP2xNuPGdWN9PD6V163W42w3K/LHfHe8mvnnQ3612D%2B2yud5uThsno6b/a5ssXmw%2Bt7%2BETSD%2BYo128vlrDnLF1FzMe%2BFP8IV63V6rPV02L9slvmhbMFmcdiX%2B9Xx6ndeTWbP22NrmW/zY758vyl/zp42zReaSS%2B/CVnQazI6gq9fSkdf3Lt8d2Pc5EFNRloZFWsxMWPTS%2B/M1qx4EoBehOghAg8B8KJK9cKjjrvKyrP0pp3q7KQ4BCigUnwdK1tEyKexckkHOA6Bu5vGt39ChBevhE3O4AUDnlU06LzuSmMYMNOWfitQb2PkWYguFtJMB2iXw9TICLSo0IlaiXFq9K8BzVT9u4u3RgT1dlsIU25ou2ubbLtKkBnYlJNdOuBHnATx6NccvbpVuvDoZKjqZ1rWgjyIT8GITQLk/TZ6F6CGNlrsgk0qybJIcROmehmjkF5xV4EwNARdZ4zWhMjehRj17/tYq3HplKS8X4HPTmiLE3BxSjV2U%2B082DoPRECmGCI3Xjpxkh46YJJIOtNWOovQFx%2Bm%2BCyQhGgTykxD/nAMdUJ5Ou2iGd2mJqYckB5ZXENyIjgY2HiAPAnBrrkkaChfP/Qw40%2BQn6ZCm52gVoG7CPi0poRJnXkgRcCKukmoQbYxOKDMNCdSLJI%2B6SB/p%2BRvpYbC9O8vnRO0lAMUnvXeEx9n1Osu6umt9II8MSVGBP11PwBHrWMoS7wjX2AMXA2oe2tf/Gfk8vUoqFEXZ/SyUzuCMuSMdtSljDyjMZW0cJZWEkNFlBpBDBVeWkFOySJwOERHnLy9/QE%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZXRatswFIbfJYxdLY3U2hkulNGukje3VhJZOnZ8p8TqmsqO3dhp05S%2B%2B46TwfoMAYE5ICz4%2BP7/vA/Wdtfdr9auHVy%2BD9h1onQyuBw8dl3TXo5GlVmbP7ay6%2B7M7Lcbe7asq1G7XbTLzarpVvW6HZEFfRh73%2BmQLh7I0CsKMzR2eTFcLoLz7%2BcPJPADMmo29cuqsJt2FK%2BWm7qtH7qzO/sGZlt2o8KWtrPFYWh/mGY1fMGb%2BPOrc0KDIcFDv35pHb5YO7u%2BUlWwzZMdGJpnuszvgEegXa4l5KCp9hXZwYJDJZnbKZBPMfGZzAohuSM431gXMHNRCuNqT1VNK10A4PKJdVGo0%2BZJMJ%2BnWSlstQt11U0k81miuDRV/Kqrppacj2eKXA2%2B/QN2fnrE6FgrmEAY71TaCMv8ZySIJGpPg3QzR3mSNTg3TBGA2PlcOpCg9V6VIIX2tWFSGNLcqqrjggU8PRJLJlr9%2BsmEktf3p6haoAHVMQ58VIsLTVGVaGLLuaecfLIQMeXEBNW6RbARgupVTGTYvqGa0rIAkqyYAmdUA4Qz5z/DEVyKDp4iMH/cZxOBXSgi0SSKWX2cyHDmYdaExaylPZCw3SkKwqJpqcNvtXxDgGvMql6waCrDJcG5lSRg8j%2BwExatFyOaGEd9FOvGYvGpXjT329Npx2MS6PmeC6ndK4pYSxRNZ2ViiNur7NBxG6m4MCUjmFBREMo/cdPJCXaaz%2BYXBZrSeaqUUYGEDBLCkHk6a/JYUwAlEuPyPpp32PrYcY9IsLnFzuMx5aD6LVFihLPeNMry/ectwPT19PQ2wbHQICzG6NkmZgGbKTmVbI757JCaD6m6SZBWqNZNeKDmZO/Z7kgZKbEINwXHfIOMOX8%2BePbx8Rc%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZVtb6JAFIX/C9nsp7W8KFttYjbgDAa2d%2BiMMzT4DQFfBqtGaEWa/ve9trvZ36AJJMxwAskz55z7buzKtnnc7KraeHg3qDeTamY8GOumOdQPpvmS7bJV%2BVLumrusez2Wd/n%2BxaxfF3V%2B3ByazX5Xm9bCXv4c3Ns9e7G0eoOiyHpZmfd7%2BWLk3DtLa%2BSOLPNw3L9tivJYm7DJj/t6v2zufpfnJHvdNmZRbsumLD4X9a/ssOm9oRI/PnYse9Sz8LK/f6sr/OO%2BKndjVSXPIomkUCKQNFEzNYof1VYtSWiDzB3WpX3owpZp7sLlmbChIHPCKhHgfseo8BkpfF6FJyHzlhHVoc4FBbagamz8%2BAvCuXoSGinI3GYS3Jis7Fiuh7xb05gEEyDJVEh/ysh8KvSaXG6OOqFTJLcNeAcXEs/0BizRB1m5oFcu04DW4BZ08yHX8wDXLSjuCO2d0RYB0PDMOhYwVICEPq%2BCCe/SC4jIe/LYhcaVmwJZpAOMSAsdRkWHfdD%2BMCbeidFwwGThMxURRsHm3ZbiewdNQsESGB9liYr%2BM8WEMim8xxuoC42VoCkGhTtYHyfQa%2BSRnqESPhDeBwtDRHgbqwj9os5MRgGvkmlMUP%2Bfh5rdQF0o%2B6sMlcUkEiFiCBbF5KQ20PTEtR8wkp6ARhMuo2lM0wFX6ZmR8ATkMyVfE8Shynu68pzgGPEc7AonltgR3WW0BFiefhDLBDvBx/MXE0a8FqrQjVVoMUUxW9RlMiBCrsbGx8cf response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultciufudg","name":"cmk-test-keyvaultciufudg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg56xrvzusc4sfvjbdrx5ji6hcpehmnfeaq5wlcqohqlproiqm3e4f2mj5kz7yzwjso/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultciufudg","location":"eastus","tags":{},"deletionDate":"2021-08-05T19:13:00Z","scheduledPurgeDate":"2021-11-03T19:13:00Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-khqxkck","name":"cli-test-kv-mgmt-khqxkck","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtyh66w7xewdhz52m23wrkasxmxdxabvp6lzuvscl5ab567gefp27to/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-khqxkck","location":"eastus","tags":{},"deletionDate":"2021-07-29T21:48:41Z","scheduledPurgeDate":"2021-10-27T21:48:41Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultbtmq7iy","name":"cmk-test-keyvaultbtmq7iy","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgejurt4f4xax3ybporewlfckame4hsio3lxdbcpadjvepotjyl6kjbeimvktfb7wfg/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultbtmq7iy","location":"eastus","tags":{},"deletionDate":"2021-07-29T19:13:17Z","scheduledPurgeDate":"2021-10-27T19:13:17Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/clitestz46b3missykdu4zog","name":"clitestz46b3missykdu4zog","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databricksw5ckwxd2dgcyklwheq3hosohyoi2nixgr4qw3r225x3wo3r26yctgkpc/providers/Microsoft.KeyVault/vaults/clitestz46b3missykdu4zog","location":"eastus","tags":{},"deletionDate":"2021-07-23T08:37:15Z","scheduledPurgeDate":"2021-10-21T08:37:15Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-xtyeqrb","name":"cli-test-kv-mgmt-xtyeqrb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmt5wqnuyymyk2wuycqyzzokv2cnzpuocp5nvlbuvyneplpbqphlrnmt/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-xtyeqrb","location":"eastus","tags":{},"deletionDate":"2021-07-22T22:10:20Z","scheduledPurgeDate":"2021-10-20T22:10:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-4pclyvady","name":"cli-test-kv-nr-4pclyvady","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewulibutz7kq3tybqokqxisit3qgjpnvcev2m6krqrqmfl/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-4pclyvady","location":"eastus2","tags":{},"deletionDate":"2021-08-12T21:50:47Z","scheduledPurgeDate":"2021-11-10T21:50:47Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-af3nsgd7m","name":"cli-test-kv-nr-af3nsgd7m","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewulibutz7kq3tybqokqxisit3qgjpnvcev2m6krqrqmfl/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-af3nsgd7m","location":"eastus2","tags":{},"deletionDate":"2021-08-12T21:50:16Z","scheduledPurgeDate":"2021-11-10T21:50:16Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ntdkvmfj6","name":"cli-test-kv-nr-ntdkvmfj6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewulibutz7kq3tybqokqxisit3qgjpnvcev2m6krqrqmfl/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ntdkvmfj6","location":"eastus2","tags":{},"deletionDate":"2021-08-12T21:50:16Z","scheduledPurgeDate":"2021-11-10T21:50:16Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cligctobwlo6h3n","name":"cligctobwlo6h3n","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_urih6s2zececes2gnzgvn5hekc4h7yk77rev3v2xnk7/providers/Microsoft.KeyVault/vaults/cligctobwlo6h3n","location":"westus","tags":{},"deletionDate":"2021-07-01T21:48:59Z","scheduledPurgeDate":"2021-09-29T21:48:59Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cligk3z5svzmcww","name":"cligk3z5svzmcww","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identityla3tu4eq35mbov6k6mt64qgutbcnas2j6/providers/Microsoft.KeyVault/vaults/cligk3z5svzmcww","location":"westus","tags":{},"deletionDate":"2021-07-01T21:48:44Z","scheduledPurgeDate":"2021-09-29T21:48:44Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitesthuobbzzoetqmmo2co","name":"clitesthuobbzzoetqmmo2co","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgu2cx2abhevlxlq5xt4wiuc5cd7njz2pnm33ki5acu2xzvppceu7bprwkdr6epnfqc/providers/Microsoft.KeyVault/vaults/clitesthuobbzzoetqmmo2co","location":"westus","tags":{},"deletionDate":"2021-07-01T19:07:20Z","scheduledPurgeDate":"2021-09-29T19:07:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envault44vvpy2j73p5daeqj","name":"envault44vvpy2j73p5daeqj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryptionbkrqmvfnczw74fevbg4isergbd7pdv7z6fn4l74nvyfgq3uz/providers/Microsoft.KeyVault/vaults/envault44vvpy2j73p5daeqj","location":"westus","tags":{},"deletionDate":"2021-06-28T14:15:00Z","scheduledPurgeDate":"2021-09-26T14:15:00Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clijkbdrqd4evyn","name":"clijkbdrqd4evyn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identityxcopbk5jx3k4hgo3jvoqfwslsjkywtduj/providers/Microsoft.KeyVault/vaults/clijkbdrqd4evyn","location":"westus","tags":{},"deletionDate":"2021-06-28T09:14:52Z","scheduledPurgeDate":"2021-09-26T09:14:52Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-xi36lvs57jx47","name":"vault3-xi36lvs57jx47","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_3eujy3trxbzvvmwmklq4s2jekjinnzaxyy/providers/Microsoft.KeyVault/vaults/vault3-xi36lvs57jx47","location":"westcentralus","tags":{},"deletionDate":"2021-07-02T04:24:18Z","scheduledPurgeDate":"2021-09-30T04:24:18Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-6jkphk5epjmnb","name":"vault1-6jkphk5epjmnb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_64jipbzt4xf7k2xwhdcys25wf6klk3itbgvboaq/providers/Microsoft.KeyVault/vaults/vault1-6jkphk5epjmnb","location":"westcentralus","tags":{},"deletionDate":"2021-07-02T04:24:01Z","scheduledPurgeDate":"2021-09-30T04:24:01Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-3hrdz7j45runn","name":"vault2-3hrdz7j45runn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_64jipbzt4xf7k2xwhdcys25wf6klk3itbgvboaq/providers/Microsoft.KeyVault/vaults/vault2-3hrdz7j45runn","location":"westcentralus","tags":{},"deletionDate":"2021-07-02T04:24:01Z","scheduledPurgeDate":"2021-09-30T04:24:01Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-m5zrlj3cx4suuv","name":"vault-m5zrlj3cx4suuv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_mfexaohstcv3qslsjyxnnmjdnphgys7v6ck4ukrn6hqijv/providers/Microsoft.KeyVault/vaults/vault-m5zrlj3cx4suuv","location":"westcentralus","tags":{},"deletionDate":"2021-07-02T04:22:25Z","scheduledPurgeDate":"2021-09-30T04:22:25Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-47trdssrqswdv","name":"vault4-47trdssrqswdv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_nvqxqk2fumrgmsmfr2aknvmo2vjrlch6l7ohd/providers/Microsoft.KeyVault/vaults/vault4-47trdssrqswdv","location":"westcentralus","tags":{},"deletionDate":"2021-07-02T04:22:08Z","scheduledPurgeDate":"2021-09-30T04:22:08Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultwxk3gui","name":"keyVaultwxk3gui","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwvd3yyfnno/providers/Microsoft.KeyVault/vaults/keyVaultwxk3gui","location":"westus2","tags":{},"deletionDate":"2021-07-22T20:40:01Z","scheduledPurgeDate":"2021-10-20T20:40:01Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultvdzd4dt","name":"keyVaultvdzd4dt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgq6ctpvruhp/providers/Microsoft.KeyVault/vaults/keyVaultvdzd4dt","location":"westus2","tags":{},"deletionDate":"2021-07-22T20:39:19Z","scheduledPurgeDate":"2021-10-20T20:39:19Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultijdfkht","name":"keyVaultijdfkht","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgynd7v6hpoy/providers/Microsoft.KeyVault/vaults/keyVaultijdfkht","location":"westus2","tags":{},"deletionDate":"2021-07-22T20:35:24Z","scheduledPurgeDate":"2021-10-20T20:35:24Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultk3mp45j","name":"keyVaultk3mp45j","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmx6umbdz5x/providers/Microsoft.KeyVault/vaults/keyVaultk3mp45j","location":"westus2","tags":{},"deletionDate":"2021-07-16T03:36:35Z","scheduledPurgeDate":"2021-10-14T03:36:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultwgv4dte","name":"keyVaultwgv4dte","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjpbkicqi3j/providers/Microsoft.KeyVault/vaults/keyVaultwgv4dte","location":"westus2","tags":{},"deletionDate":"2021-07-16T03:35:56Z","scheduledPurgeDate":"2021-10-14T03:35:56Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3dTBbtpAEAbgd0FVTyV4wSZypKhKml0qJ7bDeGZwuBm8JLC2MdgEQpR370J76DMg7WWl0a706f%2fns1PpQ%2fu0rEzTufnsyLsEKencdN7atm5uer0yq7JXXeqqvcqOu62%2bmq%2fLXrObNfPtsm6X66rpOTOxGLrXoitmC6fr5nnWzfR80J3P%2fP51f%2bH4nu%2f06u36fZnrbdMLl%2fPtulkv2qtH%2fcHZrmh7uS50q%2fPzpfmZ1cvuu520j9%2f2HeF3HXvE92%2bNsT%2buja5usfR30%2bTAmZimVEwfWQVMZkrAUyZBHjoHnikuQZoDMqxCxyNM82cYNUcUUGny5fTIMau1i5N6lTueSpCjUNIeHVah8RSa6DTvYFonYDwmDCArwz0SjIAVJ%2bjcdn78A%2btfnpgYElqhUXgSUNp4G0rrGOSLS5PaAAcSTBDB6O03Ttp4bDw5SWsI5VRZ0RiU2oABK%2bo94Or%2bcWx8yo5nsYm80IgNKS2eWfIAq3qljZCE9xFI16WyDWwEN4AqyYTcUwHnyKHhGKjwqGDQhdxbaBtJNUDBHCpF9DdiJ7BfMkK4e7rIag4hzSOW8niqakRCjq0bj%2faurSpr8uhlkMeZsS6n6tmg2epGQHS0jsnYujEGsfUaYgHbkIPNf26UXGA1PTotL7vcTonZhlIMEYNnHr26ZOyykz4nZ9H6Acu6AelJTIs4KxsrxgkUaoOoIDPCRWJbWd8m1Vbz6%2bsP"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-tesnkxh","name":"cli-test-kv-mgmt-tesnkxh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtpmpx5gysdsk5rcezcehbrn4qtktwbb3exu67lf2sa7f64u3fqxz6x/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-tesnkxh","location":"eastus","tags":{},"deletionDate":"2021-10-19T03:30:30Z","scheduledPurgeDate":"2022-01-17T03:30:30Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-6e5jo66","name":"cli-test-kv-mgmt-6e5jo66","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtl2tmyowpkbohyktwjchtsbvjstllkrttnbchwjiet6uhj6dxvtchz/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-6e5jo66","location":"eastus","tags":{},"deletionDate":"2021-10-19T03:21:53Z","scheduledPurgeDate":"2022-01-17T03:21:53Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/yetestkv","name":"yetestkv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/yetestkv","location":"eastus","tags":{},"deletionDate":"2021-10-18T09:00:26Z","scheduledPurgeDate":"2022-01-16T09:00:26Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-xgnlbxj","name":"cli-test-kv-mgmt-xgnlbxj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtph3im7ytza4hy4zwfcb3tu6qeena3hjktdrin6mfjja6ptqvnbhnf/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-xgnlbxj","location":"eastus","tags":{},"deletionDate":"2021-10-18T07:58:19Z","scheduledPurgeDate":"2022-01-16T07:58:19Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-la2ltct","name":"cli-test-kv-mgmt-la2ltct","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtbcl4x5dqkvuw3bkyxuhpyy2k3sjlpw4ocnzuclght6xdufuiqqzn7/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-la2ltct","location":"eastus","tags":{},"deletionDate":"2021-10-15T06:21:30Z","scheduledPurgeDate":"2022-01-13T06:21:30Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-dt6spfvoxpxmfn","name":"vault-dt6spfvoxpxmfn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfl4chal45g5pjvss5bk5ohhcfti5rt6d7m7gqx3u5pvjee5s4al3oe52m22fb4nhv/providers/Microsoft.KeyVault/vaults/vault-dt6spfvoxpxmfn","location":"eastus2","tags":{},"deletionDate":"2021-11-04T23:20:38Z","scheduledPurgeDate":"2021-11-11T23:20:38Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultuf6wado7qxvmt62uw","name":"envaultuf6wado7qxvmt62uw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5wdpkrg5tkalps6oyd2jorflz7nwhkdeirmxjp5o54ewid73vtk2wjeksueshybor/providers/Microsoft.KeyVault/vaults/envaultuf6wado7qxvmt62uw","location":"eastus2","tags":{},"deletionDate":"2021-11-04T21:52:06Z","scheduledPurgeDate":"2022-02-02T21:52:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-yorknenmh","name":"cli-test-kv-nr-yorknenmh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleakjsune5l7owmuyr66rff6duw72jhypjpnwohssnmtmmf/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-yorknenmh","location":"eastus2","tags":{},"deletionDate":"2021-11-04T17:55:34Z","scheduledPurgeDate":"2022-02-02T17:55:34Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-fguyfwvcu","name":"cli-test-kv-nr-fguyfwvcu","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleakjsune5l7owmuyr66rff6duw72jhypjpnwohssnmtmmf/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-fguyfwvcu","location":"eastus2","tags":{},"deletionDate":"2021-11-04T17:55:34Z","scheduledPurgeDate":"2022-02-02T17:55:34Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-vijfam6uw","name":"cli-test-kv-nr-vijfam6uw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleakjsune5l7owmuyr66rff6duw72jhypjpnwohssnmtmmf/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-vijfam6uw","location":"eastus2","tags":{},"deletionDate":"2021-11-04T17:55:34Z","scheduledPurgeDate":"2022-02-02T17:55:34Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/acctestvault210827160679","name":"acctestvault210827160679","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ml-210827160629530879/providers/Microsoft.KeyVault/vaults/acctestvault210827160679","location":"westus","tags":{},"deletionDate":"2021-08-27T08:14:48Z","scheduledPurgeDate":"2021-11-25T08:14:48Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/acctestvault210827153840","name":"acctestvault210827153840","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ml-210827153835039140/providers/Microsoft.KeyVault/vaults/acctestvault210827153840","location":"westus","tags":{},"deletionDate":"2021-08-27T07:47:29Z","scheduledPurgeDate":"2021-11-25T07:47:29Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/acctestvault210827151006","name":"acctestvault210827151006","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ml-210827151009759606/providers/Microsoft.KeyVault/vaults/acctestvault210827151006","location":"westus","tags":{},"deletionDate":"2021-08-27T07:18:49Z","scheduledPurgeDate":"2021-11-25T07:18:49Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskvs7jgjaqe3z2p","name":"cliakskvs7jgjaqe3z2p","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestzn63gxd4ty/providers/Microsoft.KeyVault/vaults/cliakskvs7jgjaqe3z2p","location":"westus2","tags":{},"deletionDate":"2021-11-01T04:44:24Z","scheduledPurgeDate":"2022-01-30T04:44:24Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultzennpva","name":"keyVaultzennpva","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgx7h3w4in7e/providers/Microsoft.KeyVault/vaults/keyVaultzennpva","location":"westus2","tags":{},"deletionDate":"2021-10-29T17:40:03Z","scheduledPurgeDate":"2022-01-27T17:40:03Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulty3t6jnv","name":"keyVaulty3t6jnv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgf6xlip3ks7/providers/Microsoft.KeyVault/vaults/keyVaulty3t6jnv","location":"westus2","tags":{},"deletionDate":"2021-10-29T17:39:11Z","scheduledPurgeDate":"2022-01-27T17:39:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultvctzmll","name":"keyVaultvctzmll","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgid6liv6rum/providers/Microsoft.KeyVault/vaults/keyVaultvctzmll","location":"westus2","tags":{},"deletionDate":"2021-10-29T17:39:09Z","scheduledPurgeDate":"2022-01-27T17:39:09Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskvsghv7dbtvjyc","name":"cliakskvsghv7dbtvjyc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestjnc3duawk7/providers/Microsoft.KeyVault/vaults/cliakskvsghv7dbtvjyc","location":"westus2","tags":{},"deletionDate":"2021-10-29T16:30:26Z","scheduledPurgeDate":"2022-01-27T16:30:26Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-6wdo4l5p","name":"cli-test-kv-pna-6wdo4l5p","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnadhiiln6gkn74al5unwex56cp4w7tbhug5wulsvrg7tktjogvaih4t2/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-6wdo4l5p","location":"eastus2euap","tags":{},"deletionDate":"2021-10-26T08:35:30Z","scheduledPurgeDate":"2022-01-24T08:35:30Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv3-pna-wfdpfm6","name":"cli-test-kv3-pna-wfdpfm6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnadhiiln6gkn74al5unwex56cp4w7tbhug5wulsvrg7tktjogvaih4t2/providers/Microsoft.KeyVault/vaults/cli-test-kv3-pna-wfdpfm6","location":"eastus2euap","tags":{},"deletionDate":"2021-10-26T08:35:30Z","scheduledPurgeDate":"2022-01-24T08:35:30Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv3-pna-cnok3ui","name":"cli-test-kv3-pna-cnok3ui","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaayz2vx3bkmtolsm4c3ln5b6o5ckplr5zvpm47ny6vuzzlldsulclyw/providers/Microsoft.KeyVault/vaults/cli-test-kv3-pna-cnok3ui","location":"eastus2euap","tags":{},"deletionDate":"2021-10-26T08:31:54Z","scheduledPurgeDate":"2022-01-24T08:31:54Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-he3v73te","name":"cli-test-kv-pna-he3v73te","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaayz2vx3bkmtolsm4c3ln5b6o5ckplr5zvpm47ny6vuzzlldsulclyw/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-he3v73te","location":"eastus2euap","tags":{},"deletionDate":"2021-10-26T08:31:54Z","scheduledPurgeDate":"2022-01-24T08:31:54Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv2-pna-xbvuujq","name":"cli-test-kv2-pna-xbvuujq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaayz2vx3bkmtolsm4c3ln5b6o5ckplr5zvpm47ny6vuzzlldsulclyw/providers/Microsoft.KeyVault/vaults/cli-test-kv2-pna-xbvuujq","location":"eastus2euap","tags":{},"deletionDate":"2021-10-26T08:31:54Z","scheduledPurgeDate":"2022-01-24T08:31:54Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZPRbpswFIbfBU27GsEYspJI0URqU9HVh9qxqZI7AiQBJxAF0iZUffd53aTtFVrJkmXpl4%2fOp%2f97tZry0j9Uje6s6atFw4VUC2tq7fr%2b2E0d55A12bY8lE0%2fyobzqRzl7cHpzusuP1XHvmqbzkFrd%2fPdv3Ftd71Btl8UmZ2VuWfn6wm%2bwRs0GU%2bQczy1z1VRnjqHVfmp7dpNP%2fpZXtPsvO%2bdotyXfVm8P7of2bGyn03SfD7DyJ3YyBz365dOm4mtLpuZ0umTSO%2blUCKSNFULNUke1F5tSOwymeOEhFcm9UsiqccGPkAtAqDUTcjqjtUMAYoRkBxzFUWJYj6QGAuVUlBLk6Yz69tfEPijk4DaEKljDNJsL%2fkY6l0gCBuLOp0D4jhR3AcKkSAacZ3ORc0vjITuH1r6N4kn%2bgkq4RkIBkToMbJ9YZIaEPcBl1uPSbgVtbkR84AaQHJHTPYKekVgSOdMK8Rl%2bA%2fEJ6hE7oHMjRjLMSPcCFMEXCkfBoWZWl6NEIZENOcovgjKfKH5YETCidSuUPw%2fOagKHz%2b8IEOIDQkf5NaFOsdQFwFT7JIQ7fF6RRiNboGYvqDY5YheE7K7e5fJSARDPrPe3n4B"}' headers: cache-control: no-cache - content-length: '3411' + content-length: '2956' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:39 GMT + date: Thu, 11 Nov 2021 03:24:30 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 940ebd1a-0dc0-45e5-bebe-754eaa606666 + x-ms-original-request-ids: 23805525-22a6-4dab-a94a-4a2e3e1fc847 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZXRatswFIbfJYxdLY3U2hkulNGukje3VhJZOnZ8p8TqmsqO3dhp05S%2B%2B46TwfoMAYE5ICz4%2BP7/vA/Wdtfdr9auHVy%2BD9h1onQyuBw8dl3TXo5GlVmbP7ay6%2B7M7Lcbe7asq1G7XbTLzarpVvW6HZEFfRh73%2BmQLh7I0CsKMzR2eTFcLoLz7%2BcPJPADMmo29cuqsJt2FK%2BWm7qtH7qzO/sGZlt2o8KWtrPFYWh/mGY1fMGb%2BPOrc0KDIcFDv35pHb5YO7u%2BUlWwzZMdGJpnuszvgEegXa4l5KCp9hXZwYJDJZnbKZBPMfGZzAohuSM431gXMHNRCuNqT1VNK10A4PKJdVGo0%2BZJMJ%2BnWSlstQt11U0k81miuDRV/Kqrppacj2eKXA2%2B/QN2fnrE6FgrmEAY71TaCMv8ZySIJGpPg3QzR3mSNTg3TBGA2PlcOpCg9V6VIIX2tWFSGNLcqqrjggU8PRJLJlr9%2BsmEktf3p6haoAHVMQ58VIsLTVGVaGLLuaecfLIQMeXEBNW6RbARgupVTGTYvqGa0rIAkqyYAmdUA4Qz5z/DEVyKDp4iMH/cZxOBXSgi0SSKWX2cyHDmYdaExaylPZCw3SkKwqJpqcNvtXxDgGvMql6waCrDJcG5lSRg8j%2BwExatFyOaGEd9FOvGYvGpXjT329Npx2MS6PmeC6ndK4pYSxRNZ2ViiNur7NBxG6m4MCUjmFBREMo/cdPJCXaaz%2BYXBZrSeaqUUYGEDBLCkHk6a/JYUwAlEuPyPpp32PrYcY9IsLnFzuMx5aD6LVFihLPeNMry/ectwPT19PQ2wbHQICzG6NkmZgGbKTmVbI757JCaD6m6SZBWqNZNeKDmZO/Z7kgZKbEINwXHfIOMOX8%2BePbx8Rc%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZVtb6JAFIX/C9nsp7W8KFttYjbgDAa2d%2BiMMzT4DQFfBqtGaEWa/ve9trvZ36AJJMxwAskz55z7buzKtnnc7KraeHg3qDeTamY8GOumOdQPpvmS7bJV%2BVLumrusez2Wd/n%2BxaxfF3V%2B3ByazX5Xm9bCXv4c3Ns9e7G0eoOiyHpZmfd7%2BWLk3DtLa%2BSOLPNw3L9tivJYm7DJj/t6v2zufpfnJHvdNmZRbsumLD4X9a/ssOm9oRI/PnYse9Sz8LK/f6sr/OO%2BKndjVSXPIomkUCKQNFEzNYof1VYtSWiDzB3WpX3owpZp7sLlmbChIHPCKhHgfseo8BkpfF6FJyHzlhHVoc4FBbagamz8%2BAvCuXoSGinI3GYS3Jis7Fiuh7xb05gEEyDJVEh/ysh8KvSaXG6OOqFTJLcNeAcXEs/0BizRB1m5oFcu04DW4BZ08yHX8wDXLSjuCO2d0RYB0PDMOhYwVICEPq%2BCCe/SC4jIe/LYhcaVmwJZpAOMSAsdRkWHfdD%2BMCbeidFwwGThMxURRsHm3ZbiewdNQsESGB9liYr%2BM8WEMim8xxuoC42VoCkGhTtYHyfQa%2BSRnqESPhDeBwtDRHgbqwj9os5MRgGvkmlMUP%2Bfh5rdQF0o%2B6sMlcUkEiFiCBbF5KQ20PTEtR8wkp6ARhMuo2lM0wFX6ZmR8ATkMyVfE8Shynu68pzgGPEc7AonltgR3WW0BFiefhDLBDvBx/MXE0a8FqrQjVVoMUUxW9RlMiBCrsbGx8cf - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dTBbtpAEAbgd0FVTyV4wSZypKhKml0qJ7bDeGZwuBm8JLC2MdgEQpR370J76DMg7WWl0a706f/ns1PpQ/u0rEzTufnsyLsEKencdN7atm5uer0yq7JXXeqqvcqOu62%2Bmq/LXrObNfPtsm6X66rpOTOxGLrXoitmC6fr5nnWzfR80J3P/P51f%2BH4nu/06u36fZnrbdMLl/Ptulkv2qtH/cHZrmh7uS50q/PzpfmZ1cvuu520j9/2HeF3HXvE92%2BNsT%2Buja5usfR30%2BTAmZimVEwfWQVMZkrAUyZBHjoHnikuQZoDMqxCxyNM82cYNUcUUGny5fTIMau1i5N6lTueSpCjUNIeHVah8RSa6DTvYFonYDwmDCArwz0SjIAVJ%2Bjcdn78A%2BtfnpgYElqhUXgSUNp4G0rrGOSLS5PaAAcSTBDB6O03Ttp4bDw5SWsI5VRZ0RiU2oABK%2Bo94Or%2BcWx8yo5nsYm80IgNKS2eWfIAq3qljZCE9xFI16WyDWwEN4AqyYTcUwHnyKHhGKjwqGDQhdxbaBtJNUDBHCpF9DdiJ7BfMkK4e7rIag4hzSOW8niqakRCjq0bj/aurSpr8uhlkMeZsS6n6tmg2epGQHS0jsnYujEGsfUaYgHbkIPNf26UXGA1PTotL7vcTonZhlIMEYNnHr26ZOyykz4nZ9H6Acu6AelJTIs4KxsrxgkUaoOoIDPCRWJbWd8m1Vbz6%2BsP + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZPRbpswFIbfBU27GsEYspJI0URqU9HVh9qxqZI7AiQBJxAF0iZUffd53aTtFVrJkmXpl4/Op/97tZry0j9Uje6s6atFw4VUC2tq7fr%2B2E0d55A12bY8lE0/yobzqRzl7cHpzusuP1XHvmqbzkFrd/Pdv3Ftd71Btl8UmZ2VuWfn6wm%2BwRs0GU%2BQczy1z1VRnjqHVfmp7dpNP/pZXtPsvO%2BdotyXfVm8P7of2bGyn03SfD7DyJ3YyBz365dOm4mtLpuZ0umTSO%2BlUCKSNFULNUke1F5tSOwymeOEhFcm9UsiqccGPkAtAqDUTcjqjtUMAYoRkBxzFUWJYj6QGAuVUlBLk6Yz69tfEPijk4DaEKljDNJsL/kY6l0gCBuLOp0D4jhR3AcKkSAacZ3ORc0vjITuH1r6N4kn%2Bgkq4RkIBkToMbJ9YZIaEPcBl1uPSbgVtbkR84AaQHJHTPYKekVgSOdMK8Rl%2BA/EJ6hE7oHMjRjLMSPcCFMEXCkfBoWZWl6NEIZENOcovgjKfKH5YETCidSuUPw/OagKHz%2B8IEOIDQkf5NaFOsdQFwFT7JIQ7fF6RRiNboGYvqDY5YheE7K7e5fJSARDPrPe3n4B response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaulttqnu44w","name":"cmk-test-keyvaulttqnu44w","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rghgkkobujagbwmtkqv7mpfprtdcnizdpk4yqqrmsovvprt3gobecmpar7iw45p5l3w/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaulttqnu44w","location":"eastus","tags":{},"deletionDate":"2021-07-22T19:12:42Z","scheduledPurgeDate":"2021-10-20T19:12:42Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/clitest76now56uou2nr5mfi","name":"clitest76now56uou2nr5mfi","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_databricksjztako4lshsvewjcixq5zjiopxrdl44cphwleq467qi3exvg7cqen4wz/providers/Microsoft.KeyVault/vaults/clitest76now56uou2nr5mfi","location":"eastus","tags":{},"deletionDate":"2021-07-21T08:15:04Z","scheduledPurgeDate":"2021-10-19T08:15:04Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-tljhdkp","name":"cli-test-kv-mgmt-tljhdkp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmt3ykcpv43sd2netuczkub6ajj4cccl6l3nkbsewmbmrpjyowm43zni/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-tljhdkp","location":"eastus","tags":{},"deletionDate":"2021-07-16T05:04:10Z","scheduledPurgeDate":"2021-10-14T05:04:10Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvault3onfvwc","name":"cmk-test-keyvault3onfvwc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtiwoptl7eq2qmz7ndp2frewquhpvdznmn3h6hcdsoqnujbb2wblswxjetq5yuxrsf/providers/Microsoft.KeyVault/vaults/cmk-test-keyvault3onfvwc","location":"eastus","tags":{},"deletionDate":"2021-07-16T01:57:11Z","scheduledPurgeDate":"2021-10-14T01:57:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test10t","name":"acctestkv-test10t","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test103/providers/Microsoft.KeyVault/vaults/acctestkv-test10t","location":"eastus","tags":{},"deletionDate":"2021-07-13T11:03:28Z","scheduledPurgeDate":"2021-10-11T11:03:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/bez-kv081203","name":"bez-kv081203","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081203","location":"eastus2","tags":{},"deletionDate":"2021-08-12T11:09:06Z","scheduledPurgeDate":"2021-11-10T11:09:06Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/bez-kv081202","name":"bez-kv081202","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081202","location":"eastus2","tags":{},"deletionDate":"2021-08-12T11:09:06Z","scheduledPurgeDate":"2021-11-10T11:09:06Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultzdjhjdcy7jvigfpa7","name":"envaultzdjhjdcy7jvigfpa7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgril6ffwpo5stdnin472xsnpouyeowjgzokoeaf273hu6ll2o2kwndqme23nwyllk2/providers/Microsoft.KeyVault/vaults/envaultzdjhjdcy7jvigfpa7","location":"eastus2","tags":{},"deletionDate":"2021-08-06T05:17:49Z","scheduledPurgeDate":"2021-11-04T05:17:49Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultbfhumbbvigz3ykfup","name":"envaultbfhumbbvigz3ykfup","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgsapbipo6jvm5urjmm3katjivjjfi6z6zakmbh7wxq3refkilajo525f33ib64gqpn/providers/Microsoft.KeyVault/vaults/envaultbfhumbbvigz3ykfup","location":"eastus2","tags":{},"deletionDate":"2021-08-06T05:08:46Z","scheduledPurgeDate":"2021-11-04T05:08:46Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clisqxpmksuvrep","name":"clisqxpmksuvrep","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_uriyq36xlwfsqht7grrfmmpryqnghxoj47v7wwyml3e/providers/Microsoft.KeyVault/vaults/clisqxpmksuvrep","location":"westus","tags":{},"deletionDate":"2021-06-28T09:14:39Z","scheduledPurgeDate":"2021-09-26T09:14:39Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitestqeydekuonk3x2fega","name":"clitestqeydekuonk3x2fega","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg3beg554fyk6csddckpwp4k3k5edxcuoj6pyrplvy3j77e6n7smtwvo6zxeada4s33/providers/Microsoft.KeyVault/vaults/clitestqeydekuonk3x2fega","location":"westus","tags":{},"deletionDate":"2021-06-28T06:31:50Z","scheduledPurgeDate":"2021-09-26T06:31:50Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envault742anw5qciy5rcokm","name":"envault742anw5qciy5rcokm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryptionfba7ifi6tvacwvu3syvqu7blt3qeohdiilzilrjss6fx7chd/providers/Microsoft.KeyVault/vaults/envault742anw5qciy5rcokm","location":"westus","tags":{},"deletionDate":"2021-06-25T03:38:16Z","scheduledPurgeDate":"2021-09-23T03:38:16Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cli3xpusgc76s6h","name":"cli3xpusgc76s6h","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identityex4s5sglm3dphdm3lan6qrxhfskellsqr/providers/Microsoft.KeyVault/vaults/cli3xpusgc76s6h","location":"westus","tags":{},"deletionDate":"2021-06-24T21:25:23Z","scheduledPurgeDate":"2021-09-22T21:25:23Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clipff2uxrjvhk3","name":"clipff2uxrjvhk3","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_urizwpzcefw3sf7ith7aobtusenelv5vxvogecd3e63/providers/Microsoft.KeyVault/vaults/clipff2uxrjvhk3","location":"westus","tags":{},"deletionDate":"2021-06-24T21:24:42Z","scheduledPurgeDate":"2021-09-22T21:24:42Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-ypj3n7j2fgccd","name":"vault3-ypj3n7j2fgccd","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_rdlndgs55jp36qlsqze6udjwhomudgsare/providers/Microsoft.KeyVault/vaults/vault3-ypj3n7j2fgccd","location":"westcentralus","tags":{},"deletionDate":"2021-06-28T14:53:24Z","scheduledPurgeDate":"2021-09-26T14:53:24Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-z4ltug3n4l2zci","name":"vault-z4ltug3n4l2zci","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_stmdmlz3vembuicypg5ag5d6gc7uoxnfjht73kuxe6pl2g/providers/Microsoft.KeyVault/vaults/vault-z4ltug3n4l2zci","location":"westcentralus","tags":{},"deletionDate":"2021-06-28T14:51:29Z","scheduledPurgeDate":"2021-09-26T14:51:29Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-rtgaveo7sjf36","name":"vault1-rtgaveo7sjf36","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_nqi7xn2h3xc74q4bmpdgw2h4l4tzxrftivafuom/providers/Microsoft.KeyVault/vaults/vault1-rtgaveo7sjf36","location":"westcentralus","tags":{},"deletionDate":"2021-06-28T14:49:38Z","scheduledPurgeDate":"2021-09-26T14:49:38Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-rvwxpvuaskxoy","name":"vault2-rvwxpvuaskxoy","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_nqi7xn2h3xc74q4bmpdgw2h4l4tzxrftivafuom/providers/Microsoft.KeyVault/vaults/vault2-rvwxpvuaskxoy","location":"westcentralus","tags":{},"deletionDate":"2021-06-28T14:49:38Z","scheduledPurgeDate":"2021-09-26T14:49:38Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-pwewca5enx3ht","name":"vault4-pwewca5enx3ht","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_625aunptnwmgfywsancdpyyq3ptcbznyuxo4d/providers/Microsoft.KeyVault/vaults/vault4-pwewca5enx3ht","location":"westcentralus","tags":{},"deletionDate":"2021-06-28T14:47:58Z","scheduledPurgeDate":"2021-09-26T14:47:58Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultkxpuani","name":"keyVaultkxpuani","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggfz7vtiz2q/providers/Microsoft.KeyVault/vaults/keyVaultkxpuani","location":"westus2","tags":{},"deletionDate":"2021-07-16T03:35:07Z","scheduledPurgeDate":"2021-10-14T03:35:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultgyemr4j","name":"keyVaultgyemr4j","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgma5v53dtvs/providers/Microsoft.KeyVault/vaults/keyVaultgyemr4j","location":"westus2","tags":{},"deletionDate":"2021-07-08T20:24:56Z","scheduledPurgeDate":"2021-10-06T20:24:56Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVault4t2x2ik","name":"keyVault4t2x2ik","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnwabgoxxq4/providers/Microsoft.KeyVault/vaults/keyVault4t2x2ik","location":"westus2","tags":{},"deletionDate":"2021-07-08T20:24:09Z","scheduledPurgeDate":"2021-10-06T20:24:09Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultilg52cf","name":"keyVaultilg52cf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgrgmmvkxsfe/providers/Microsoft.KeyVault/vaults/keyVaultilg52cf","location":"westus2","tags":{},"deletionDate":"2021-07-08T20:23:23Z","scheduledPurgeDate":"2021-10-06T20:23:23Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultikslhja","name":"keyVaultikslhja","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgqcblkj36zs/providers/Microsoft.KeyVault/vaults/keyVaultikslhja","location":"westus2","tags":{},"deletionDate":"2021-07-01T20:50:30Z","scheduledPurgeDate":"2021-09-29T20:50:30Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3dTfbtowFAbwd0HTrkZjA6FKpWpq1xOmtAng2AfwnSFmo3b%2bQEKbpuq7z%2bl2sWdAys1RHEf66fvO%2b6DQbfN0KEw9uHkfwF3KRTq4Gfxumqq%2b8bxcFeqXznXRXKnufNJXuzL36vO23p0OVXMoi9ojW7qfTq7pkG73ZDjJMjVUejce7rbB6Hq0J4EfEK86lS%2bHTJ9qLz7sTmVd7purR%2f2G6mwbL9NWNzr7HOrvqjoMX9xJd%2fntiNBgSNxDv36pjftjaXRxy%2fPgLNMWFZVrYeUjhhEKIwVDiYIKn5MWtyHmDEzLkT3HxD%2bytZ0rK6ibo5hQ2Ixtomw54ZbNWBiB7Nhc53UrLGIMPmw6nMfgbsubGaPhUQEuGOJY8Ps5s9FRdeR28O0f2OgCxWDJk7kT7Pi6YokTkV2ywHAzEcikBj8U64wpE445onTCwAzO2ax9cKJR%2f57zyInuKBdOmATA%2bKfYCi40YtPNuErYrJnwoupBXESiBc6W%2fVxoIK%2fCYKqsBM7vH5fGB24k03kLDhBjQ0ECWzjLnw68SIQ%2flX8j1oP9gISzu6eLrObUBWmBgH5fVQ300xHBBc1iGBv%2fiH2QjP%2fAKSbOBZbGnRfyQayaKKPh1FUzcUHr3PfpkgQC%2fw%2faJVZz6pbZgoF445SFMVBXLUyUcctMYKhtiClnbllBx1dVv%2fxgta5SFHYsLDMM6DE10okSyp%2fvw9hGJ96LfXz8AQ%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultabuc5xp","name":"cmk-test-keyvaultabuc5xp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgj3wvckij2mkrtp6e3wbsbrdlu3lfscmoxa7xyj7nolcde3l4mdnl4rsdjczou62oq/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultabuc5xp","location":"eastus","tags":{},"deletionDate":"2021-10-15T05:52:14Z","scheduledPurgeDate":"2022-01-13T05:52:14Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultqfmk3mt","name":"cmk-test-keyvaultqfmk3mt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfuw6kzpk2zuexg33z3es7ll6im3gsk4qdhia4kdrazrthkapxcfwhleu6rxxlxebu/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultqfmk3mt","location":"eastus","tags":{},"deletionDate":"2021-10-12T08:19:02Z","scheduledPurgeDate":"2022-01-10T08:19:02Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-e2rafd6","name":"cli-test-kv-mgmt-e2rafd6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtryanbwsykftxwz3aephyg3f2sm5zrlcwyb57ml7mvtahomvxhpd4m/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-e2rafd6","location":"eastus","tags":{},"deletionDate":"2021-09-09T21:57:55Z","scheduledPurgeDate":"2021-12-08T21:57:55Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultm4dl7rv","name":"cmk-test-keyvaultm4dl7rv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgop6v2pr4t46t4kqym6376zovr64uazcjjhje6pogvjtvnamtzmehkkl2ik3wqqlyy/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultm4dl7rv","location":"eastus","tags":{},"deletionDate":"2021-09-09T19:13:45Z","scheduledPurgeDate":"2021-12-08T19:13:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/kv-ljin-sni","name":"kv-ljin-sni","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ljin-test/providers/Microsoft.KeyVault/vaults/kv-ljin-sni","location":"eastus","tags":{},"deletionDate":"2021-09-07T02:30:42Z","scheduledPurgeDate":"2021-12-06T02:30:42Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ni4txf25n","name":"cli-test-kv-nr-ni4txf25n","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleakjsune5l7owmuyr66rff6duw72jhypjpnwohssnmtmmf/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ni4txf25n","location":"eastus2","tags":{},"deletionDate":"2021-11-04T17:55:34Z","scheduledPurgeDate":"2021-11-11T17:55:34Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-zla7kz3t3","name":"cli-test-kv-nr-zla7kz3t3","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleakjsune5l7owmuyr66rff6duw72jhypjpnwohssnmtmmf/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-zla7kz3t3","location":"eastus2","tags":{},"deletionDate":"2021-11-04T17:55:34Z","scheduledPurgeDate":"2022-02-02T17:55:34Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-52x72b5oz","name":"cli-test-kv-nr-52x72b5oz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleakjsune5l7owmuyr66rff6duw72jhypjpnwohssnmtmmf/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-52x72b5oz","location":"eastus2","tags":{},"deletionDate":"2021-11-04T17:55:34Z","scheduledPurgeDate":"2022-02-02T17:55:34Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli3lhylmvg5f65","name":"cli3lhylmvg5f65","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_urixavznqgtiz5oioy33pxn6h6btnzg3vp6amyka3e5/providers/Microsoft.KeyVault/vaults/cli3lhylmvg5f65","location":"eastus2","tags":{},"deletionDate":"2021-11-04T17:09:06Z","scheduledPurgeDate":"2021-11-11T17:09:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/clivazm4aceawbv","name":"clivazm4aceawbv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identitydfl6sky5mq4s53lmq4lx6zwh6ahtsdlhn/providers/Microsoft.KeyVault/vaults/clivazm4aceawbv","location":"eastus2","tags":{},"deletionDate":"2021-11-04T17:06:47Z","scheduledPurgeDate":"2021-11-11T17:06:47Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/acctestkv-isetest68","name":"acctestkv-isetest68","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ise-test68/providers/Microsoft.KeyVault/vaults/acctestkv-isetest68","location":"westus2","tags":{},"deletionDate":"2021-10-24T02:08:40Z","scheduledPurgeDate":"2022-01-22T02:08:40Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/acctestkv-isetest65","name":"acctestkv-isetest65","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ise-test65/providers/Microsoft.KeyVault/vaults/acctestkv-isetest65","location":"westus2","tags":{},"deletionDate":"2021-10-23T00:04:20Z","scheduledPurgeDate":"2022-01-21T00:04:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVault776u3gv","name":"keyVault776u3gv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfup6wyc6yz/providers/Microsoft.KeyVault/vaults/keyVault776u3gv","location":"westus2","tags":{},"deletionDate":"2021-10-22T17:37:31Z","scheduledPurgeDate":"2022-01-20T17:37:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulte7b45kh","name":"keyVaulte7b45kh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgy36mzurbok/providers/Microsoft.KeyVault/vaults/keyVaulte7b45kh","location":"westus2","tags":{},"deletionDate":"2021-10-22T17:36:25Z","scheduledPurgeDate":"2022-01-20T17:36:25Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultsbuslef","name":"keyVaultsbuslef","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnr56pf5z6s/providers/Microsoft.KeyVault/vaults/keyVaultsbuslef","location":"westus2","tags":{},"deletionDate":"2021-10-22T17:36:05Z","scheduledPurgeDate":"2022-01-20T17:36:05Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv2-pna-ymtvglv","name":"cli-test-kv2-pna-ymtvglv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaxsbu7otjgnre3ryivnayns6lwih5tzj5grl3znb3ue5nonuhrpgprq/providers/Microsoft.KeyVault/vaults/cli-test-kv2-pna-ymtvglv","location":"eastus2euap","tags":{},"deletionDate":"2021-10-19T02:36:25Z","scheduledPurgeDate":"2022-01-17T02:36:25Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-wvf3kftp","name":"cli-test-kv-pna-wvf3kftp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaxsbu7otjgnre3ryivnayns6lwih5tzj5grl3znb3ue5nonuhrpgprq/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-wvf3kftp","location":"eastus2euap","tags":{},"deletionDate":"2021-10-19T02:36:25Z","scheduledPurgeDate":"2022-01-17T02:36:25Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv3-pna-k2vh52b","name":"cli-test-kv3-pna-k2vh52b","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaxsbu7otjgnre3ryivnayns6lwih5tzj5grl3znb3ue5nonuhrpgprq/providers/Microsoft.KeyVault/vaults/cli-test-kv3-pna-k2vh52b","location":"eastus2euap","tags":{},"deletionDate":"2021-10-19T02:36:25Z","scheduledPurgeDate":"2022-01-17T02:36:25Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-wcqhvqeo","name":"cli-test-kv-pna-wcqhvqeo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pna7tahtaql4rojvxrbb3namoo4nql732cq3efq3ejsgd3hniktsujusy/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-wcqhvqeo","location":"eastus2euap","tags":{},"deletionDate":"2021-10-18T07:53:16Z","scheduledPurgeDate":"2022-01-16T07:53:16Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-xymo6ekn","name":"cli-test-kv-pna-xymo6ekn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaqlogqnwurrakrja4kiyumtnab7vh4s2ig3fdn7mizz24amkeqphql6/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-xymo6ekn","location":"eastus2euap","tags":{},"deletionDate":"2021-10-15T06:24:17Z","scheduledPurgeDate":"2022-01-13T06:24:17Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=1ZNRb5swEID%2fC5r2NIINYU0iRVMym4iuZ2pip2JvBEwLJBAF0oKr%2fvc5Ux%2f6FyKddDrpdCd999271aihfyiburMW7xZdbYXcWgvrpe9P3cJxjmmTPqujavpJqi9nNcnao9Nd9l12Lk992Tadg%2fa4%2bDm9wzbeF8ie5nlqpyrz7Gw%2fd%2b%2fcAs39OXJO5%2fa1zNW5c6DMzm3XFv3kjxp36eXQO7k6qF7l%2f4vuV3oq7VfTaYYvXYTnNjKBv3%2frarOxrVWzlPXuKd7di1jGgaA7uZXz6EEeZEFCDCLzQMAQkRoznWgQ9QjkfsYoeKzmKKIcg5Y%2bIzmNZUA5SoZI8IELFkC1DoCES%2bvHJwj3xkm4rAoxE9SHKhyAyDfQLzPQOeV6%2fZuRZzeW1GMEPJDBmkmKuAbfZG2IaIaSK4knelXi9kloc%2f8q0YyEbkSyt4isZ8aFgctkBJRgLgwpEg4xDXFc%2fyW8ThCIPOA19WIJX5ygcvV4615EZDWaT0FQraagYWBVMItEEACNN4B2AUOGFuEeVIcN09w3XozGkU0kDaWrFx8f%2fwA%3d"}' headers: cache-control: no-cache - content-length: '3550' + content-length: '2787' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:39 GMT + date: Thu, 11 Nov 2021 03:24:30 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: cf962745-5d1a-48bb-a8c6-3a5505afe4a5 + x-ms-original-request-ids: e1f9e9a1-b7e3-4828-81b8-4d6409e0b0b7 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dTBbtpAEAbgd0FVTyV4wSZypKhKml0qJ7bDeGZwuBm8JLC2MdgEQpR370J76DMg7WWl0a706f/ns1PpQ/u0rEzTufnsyLsEKencdN7atm5uer0yq7JXXeqqvcqOu62%2Bmq/LXrObNfPtsm6X66rpOTOxGLrXoitmC6fr5nnWzfR80J3P/P51f%2BH4nu/06u36fZnrbdMLl/Ptulkv2qtH/cHZrmh7uS50q/PzpfmZ1cvuu520j9/2HeF3HXvE92%2BNsT%2Buja5usfR30%2BTAmZimVEwfWQVMZkrAUyZBHjoHnikuQZoDMqxCxyNM82cYNUcUUGny5fTIMau1i5N6lTueSpCjUNIeHVah8RSa6DTvYFonYDwmDCArwz0SjIAVJ%2Bjcdn78A%2BtfnpgYElqhUXgSUNp4G0rrGOSLS5PaAAcSTBDB6O03Ttp4bDw5SWsI5VRZ0RiU2oABK%2Bo94Or%2BcWx8yo5nsYm80IgNKS2eWfIAq3qljZCE9xFI16WyDWwEN4AqyYTcUwHnyKHhGKjwqGDQhdxbaBtJNUDBHCpF9DdiJ7BfMkK4e7rIag4hzSOW8niqakRCjq0bj/aurSpr8uhlkMeZsS6n6tmg2epGQHS0jsnYujEGsfUaYgHbkIPNf26UXGA1PTotL7vcTonZhlIMEYNnHr26ZOyykz4nZ9H6Acu6AelJTIs4KxsrxgkUaoOoIDPCRWJbWd8m1Vbz6%2BsP + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZPRbpswFIbfBU27GsEYspJI0URqU9HVh9qxqZI7AiQBJxAF0iZUffd53aTtFVrJkmXpl4/Op/97tZry0j9Uje6s6atFw4VUC2tq7fr%2B2E0d55A12bY8lE0/yobzqRzl7cHpzusuP1XHvmqbzkFrd/Pdv3Ftd71Btl8UmZ2VuWfn6wm%2BwRs0GU%2BQczy1z1VRnjqHVfmp7dpNP/pZXtPsvO%2BdotyXfVm8P7of2bGyn03SfD7DyJ3YyBz365dOm4mtLpuZ0umTSO%2BlUCKSNFULNUke1F5tSOwymeOEhFcm9UsiqccGPkAtAqDUTcjqjtUMAYoRkBxzFUWJYj6QGAuVUlBLk6Yz69tfEPijk4DaEKljDNJsL/kY6l0gCBuLOp0D4jhR3AcKkSAacZ3ORc0vjITuH1r6N4kn%2Bgkq4RkIBkToMbJ9YZIaEPcBl1uPSbgVtbkR84AaQHJHTPYKekVgSOdMK8Rl%2BA/EJ6hE7oHMjRjLMSPcCFMEXCkfBoWZWl6NEIZENOcovgjKfKH5YETCidSuUPw/OagKHz%2B8IEOIDQkf5NaFOsdQFwFT7JIQ7fF6RRiNboGYvqDY5YheE7K7e5fJSARDPrPe3n4B - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dTfbtowFAbwd0HTrkZjA6FKpWpq1xOmtAng2AfwnSFmo3b%2BQEKbpuq7z%2Bl2sWdAys1RHEf66fvO%2B6DQbfN0KEw9uHkfwF3KRTq4Gfxumqq%2B8bxcFeqXznXRXKnufNJXuzL36vO23p0OVXMoi9ojW7qfTq7pkG73ZDjJMjVUejce7rbB6Hq0J4EfEK86lS%2BHTJ9qLz7sTmVd7purR/2G6mwbL9NWNzr7HOrvqjoMX9xJd/ntiNBgSNxDv36pjftjaXRxy/PgLNMWFZVrYeUjhhEKIwVDiYIKn5MWtyHmDEzLkT3HxD%2BytZ0rK6ibo5hQ2Ixtomw54ZbNWBiB7Nhc53UrLGIMPmw6nMfgbsubGaPhUQEuGOJY8Ps5s9FRdeR28O0f2OgCxWDJk7kT7Pi6YokTkV2ywHAzEcikBj8U64wpE445onTCwAzO2ax9cKJR/57zyInuKBdOmATA%2BKfYCi40YtPNuErYrJnwoupBXESiBc6W/VxoIK/CYKqsBM7vH5fGB24k03kLDhBjQ0ECWzjLnw68SIQ/lX8j1oP9gISzu6eLrObUBWmBgH5fVQ300xHBBc1iGBv/iH2QjP/AKSbOBZbGnRfyQayaKKPh1FUzcUHr3PfpkgQC/w/aJVZz6pbZgoF445SFMVBXLUyUcctMYKhtiClnbllBx1dVv/xgta5SFHYsLDMM6DE10okSyp/vw9hGJ96LfXz8AQ%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=1ZNRb5swEID/C5r2NIINYU0iRVMym4iuZ2pip2JvBEwLJBAF0oKr/vc5Ux/6FyKddDrpdCd999271aihfyiburMW7xZdbYXcWgvrpe9P3cJxjmmTPqujavpJqi9nNcnao9Nd9l12Lk992Tadg/a4%2BDm9wzbeF8ie5nlqpyrz7Gw/d%2B/cAs39OXJO5/a1zNW5c6DMzm3XFv3kjxp36eXQO7k6qF7l/4vuV3oq7VfTaYYvXYTnNjKBv3/rarOxrVWzlPXuKd7di1jGgaA7uZXz6EEeZEFCDCLzQMAQkRoznWgQ9QjkfsYoeKzmKKIcg5Y%2BIzmNZUA5SoZI8IELFkC1DoCES%2BvHJwj3xkm4rAoxE9SHKhyAyDfQLzPQOeV6/ZuRZzeW1GMEPJDBmkmKuAbfZG2IaIaSK4knelXi9kloc/8q0YyEbkSyt4isZ8aFgctkBJRgLgwpEg4xDXFc/yW8ThCIPOA19WIJX5ygcvV4615EZDWaT0FQraagYWBVMItEEACNN4B2AUOGFuEeVIcN09w3XozGkU0kDaWrFx8f/wA%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test109","name":"acctestkv-test109","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test109/providers/Microsoft.KeyVault/vaults/acctestkv-test109","location":"eastus","tags":{},"deletionDate":"2021-07-13T03:10:51Z","scheduledPurgeDate":"2021-10-11T03:10:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test108","name":"acctestkv-test108","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test108/providers/Microsoft.KeyVault/vaults/acctestkv-test108","location":"eastus","tags":{},"deletionDate":"2021-07-13T02:56:20Z","scheduledPurgeDate":"2021-10-11T02:56:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test103","name":"acctestkv-test103","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test103/providers/Microsoft.KeyVault/vaults/acctestkv-test103","location":"eastus","tags":{},"deletionDate":"2021-07-13T02:26:19Z","scheduledPurgeDate":"2021-10-11T02:26:19Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test102","name":"acctestkv-test102","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test102/providers/Microsoft.KeyVault/vaults/acctestkv-test102","location":"eastus","tags":{},"deletionDate":"2021-07-13T01:35:08Z","scheduledPurgeDate":"2021-10-11T01:35:08Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test101","name":"acctestkv-test101","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test101/providers/Microsoft.KeyVault/vaults/acctestkv-test101","location":"eastus","tags":{},"deletionDate":"2021-07-13T01:27:08Z","scheduledPurgeDate":"2021-10-11T01:27:08Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envault6ajikgbonqilai23a","name":"envault6ajikgbonqilai23a","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgm4xgosxz25bfqcsa3v33cdyc4x22nk77lxwezampqyuoqmxotcvbjefv4cu7xvt55/providers/Microsoft.KeyVault/vaults/envault6ajikgbonqilai23a","location":"eastus2","tags":{},"deletionDate":"2021-07-30T02:13:00Z","scheduledPurgeDate":"2021-10-28T02:13:00Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultavcdbkqivyubrv37v","name":"envaultavcdbkqivyubrv37v","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rge3xdsuzpjeu2yhwtpzw4seh5o5awaf644qz5yl3f7vaoeg7tit2a6giwbihc2uwjn/providers/Microsoft.KeyVault/vaults/envaultavcdbkqivyubrv37v","location":"eastus2","tags":{},"deletionDate":"2021-07-30T02:05:59Z","scheduledPurgeDate":"2021-10-28T02:05:59Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaulty723buhrv4gkxyi2q","name":"envaulty723buhrv4gkxyi2q","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5igujeaxydx3mv5l7kfcbi2bs6pjs5muoco42beccu3ozkgtesoeknri6cbyejueb/providers/Microsoft.KeyVault/vaults/envaulty723buhrv4gkxyi2q","location":"eastus2","tags":{},"deletionDate":"2021-07-23T02:59:53Z","scheduledPurgeDate":"2021-10-21T02:59:53Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultpbuw5dxyt6rjeiu7m","name":"envaultpbuw5dxyt6rjeiu7m","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg3kz7qyzunzpgwtwwc42v5hqrw2qxudkcffvlgfxpbsmiglqn7rfjeyhkwo2u7zvpy/providers/Microsoft.KeyVault/vaults/envaultpbuw5dxyt6rjeiu7m","location":"eastus2","tags":{},"deletionDate":"2021-07-23T02:54:39Z","scheduledPurgeDate":"2021-10-21T02:54:39Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitestcstals42retmf55gz","name":"clitestcstals42retmf55gz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg3bnw2mo2mjq3bzgfhv3gvlirpmognlv2iaptyj74te554nv76zybikfkayofucydd/providers/Microsoft.KeyVault/vaults/clitestcstals42retmf55gz","location":"westus","tags":{},"deletionDate":"2021-06-24T19:07:31Z","scheduledPurgeDate":"2021-09-22T19:07:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cli-test-kv-mgmt-zsdhkod","name":"cli-test-kv-mgmt-zsdhkod","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtimzzkwoijnckmbzn6jjahp6pcov7sqk3gmptpzopdvbkyi26eplws/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-zsdhkod","location":"westus","tags":{},"deletionDate":"2021-06-22T03:29:32Z","scheduledPurgeDate":"2021-09-20T03:29:32Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envaulti5nan2z4ea5zeqbrs","name":"envaulti5nan2z4ea5zeqbrs","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryptionvbf7tlhim3i666ub665tfnoq45a6d7hfkcoq5v4t62hgrkqe/providers/Microsoft.KeyVault/vaults/envaulti5nan2z4ea5zeqbrs","location":"westus","tags":{},"deletionDate":"2021-06-18T03:39:04Z","scheduledPurgeDate":"2021-09-16T03:39:04Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cliu2jqm7bwwxpz","name":"cliu2jqm7bwwxpz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identityox3s5of7lclwyma4aod6ufl3lfy3ehvbf/providers/Microsoft.KeyVault/vaults/cliu2jqm7bwwxpz","location":"westus","tags":{},"deletionDate":"2021-06-17T21:28:21Z","scheduledPurgeDate":"2021-09-15T21:28:21Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clirdpylduqbrpq","name":"clirdpylduqbrpq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_urivi6ahkyittmnybcjb7ibha3enhitr565gtrgvsl6/providers/Microsoft.KeyVault/vaults/clirdpylduqbrpq","location":"westus","tags":{},"deletionDate":"2021-06-17T21:28:05Z","scheduledPurgeDate":"2021-09-15T21:28:05Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-wxhmyyulvtugx","name":"vault3-wxhmyyulvtugx","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_ne4s3frzbaw6yagli44hgmrpcvvzx6iep3/providers/Microsoft.KeyVault/vaults/vault3-wxhmyyulvtugx","location":"westcentralus","tags":{},"deletionDate":"2021-06-25T03:51:45Z","scheduledPurgeDate":"2021-09-23T03:51:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-k3giflxzhimwn","name":"vault2-k3giflxzhimwn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_n2tpa6yydpmbclip2sopvtvj25x3vtvxm7pa5lk/providers/Microsoft.KeyVault/vaults/vault2-k3giflxzhimwn","location":"westcentralus","tags":{},"deletionDate":"2021-06-25T03:50:59Z","scheduledPurgeDate":"2021-09-23T03:50:59Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-s6bpq2nwjwolq","name":"vault1-s6bpq2nwjwolq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_n2tpa6yydpmbclip2sopvtvj25x3vtvxm7pa5lk/providers/Microsoft.KeyVault/vaults/vault1-s6bpq2nwjwolq","location":"westcentralus","tags":{},"deletionDate":"2021-06-25T03:50:59Z","scheduledPurgeDate":"2021-09-23T03:50:59Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-ectqevqmoj2tgi","name":"vault-ectqevqmoj2tgi","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_xi4dqzcozulvje5chsmftsry2itt72yjzywrw4ndkwa5w6/providers/Microsoft.KeyVault/vaults/vault-ectqevqmoj2tgi","location":"westcentralus","tags":{},"deletionDate":"2021-06-25T03:49:58Z","scheduledPurgeDate":"2021-09-23T03:49:58Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-r6ybk2mhxaguk","name":"vault4-r6ybk2mhxaguk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_pjrdjpujfwuolwqdjgx5s4ida6o2jyuysflxg/providers/Microsoft.KeyVault/vaults/vault4-r6ybk2mhxaguk","location":"westcentralus","tags":{},"deletionDate":"2021-06-25T03:48:11Z","scheduledPurgeDate":"2021-09-23T03:48:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultgksrgs4","name":"keyVaultgksrgs4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4zbr7vgjdl/providers/Microsoft.KeyVault/vaults/keyVaultgksrgs4","location":"westus2","tags":{},"deletionDate":"2021-07-01T20:49:51Z","scheduledPurgeDate":"2021-09-29T20:49:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultf2dcwil","name":"keyVaultf2dcwil","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4qj7c4wlye/providers/Microsoft.KeyVault/vaults/keyVaultf2dcwil","location":"westus2","tags":{},"deletionDate":"2021-07-01T20:49:06Z","scheduledPurgeDate":"2021-09-29T20:49:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVault4j3ovjo","name":"keyVault4j3ovjo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4gk4i6urdl/providers/Microsoft.KeyVault/vaults/keyVault4j3ovjo","location":"westus2","tags":{},"deletionDate":"2021-06-28T08:17:57Z","scheduledPurgeDate":"2021-09-26T08:17:57Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVault2ldz7e4","name":"keyVault2ldz7e4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgcbhkxe2ds4/providers/Microsoft.KeyVault/vaults/keyVault2ldz7e4","location":"westus2","tags":{},"deletionDate":"2021-06-28T08:16:42Z","scheduledPurgeDate":"2021-09-26T08:16:42Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultb33rhxj","name":"keyVaultb33rhxj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgblyl22zdrx/providers/Microsoft.KeyVault/vaults/keyVaultb33rhxj","location":"westus2","tags":{},"deletionDate":"2021-06-28T08:15:14Z","scheduledPurgeDate":"2021-09-26T08:15:14Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3dTRbpswFIDhd4mmXS3FJCEVlaqpWQ0bLaQ5%2bBwod05wlsRA3EDaNFXffc7aae8QiRtLB5A%2b%2fcdvvUYduvt1o9ve1VuP36QC095Vb9V1pr1ynFo28reqVdNdyON%2bpy4W29pp9%2fN2sVubbr1tWofN3eV4dOn23fmS9UdlKftSLYb9xdwfXA6WzPd85pjd9nldql3rxOvFbttul93FnXolua86p1SV6lT599B%2bl2bdf7aT9uPXA%2bb6fWYf9%2buXVts%2fbrVqrkXt74v0QNItcqyKOwoiQl0gUEHooifYgeYB1cD1QRBsYuY9gYgS4ni05yRGb0x5lUj9a2TPEGt3B5pSycjDzITAPC4EJZKZn6IxTULBU6YLiE%2fvI0UxspdUsOvet0%2bwwRmKYWoFKOw8gVDE3H3CvHwgvh0JKwVWcM6jBwgijpoy4F6AIkkAi1BkZlNawSwvQVWGi81EghUWH2IZP8%2fEfC5yM6WALBBENimUw9VUVo8jrCAF7uPj8QS64japQmkvgHwFqi6HeErUdlscJ6nU0S1mnZxpl2f%2fwX7wRMDN%2fVmu5vhxWE5V3Q0FA4q5x9O8eoDwZSQY3dnAArRORIZj3QUJenymS%2bvYMuFClHAP5ZGmsobQum4U94PP1fwI7RxXc4y5SWSlmaigUdzlKCa2PHuZ1UbPXCumC1ueLXEzCWf6JGrAXma3dn5iyyMhAqBw8YKn%2bX%2blvb%2f%2fAQ%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/azps-test-kv2","name":"azps-test-kv2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azps-test-group/providers/Microsoft.KeyVault/vaults/azps-test-kv2","location":"eastus","tags":{},"deletionDate":"2021-09-07T02:03:49Z","scheduledPurgeDate":"2021-12-06T02:03:49Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv0901","name":"bez-kv0901","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv0901","location":"eastus","tags":{},"deletionDate":"2021-09-06T06:48:08Z","scheduledPurgeDate":"2021-12-05T06:48:08Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv0830","name":"bez-kv0830","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv0830","location":"eastus","tags":{},"deletionDate":"2021-09-06T06:48:08Z","scheduledPurgeDate":"2021-12-05T06:48:08Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv090102","name":"bez-kv090102","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv090102","location":"eastus","tags":{},"deletionDate":"2021-09-06T06:48:08Z","scheduledPurgeDate":"2021-12-05T06:48:08Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-xbiglgr","name":"cli-test-kv-mgmt-xbiglgr","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtkql6clmup6fihinvzubea7zg6xxoase4c4shmf7ohv7dkqr6ht7lu/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-xbiglgr","location":"eastus","tags":{},"deletionDate":"2021-09-02T21:56:29Z","scheduledPurgeDate":"2021-12-01T21:56:29Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaults347eokedivesvq5x","name":"envaults347eokedivesvq5x","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgg2hjhwejbhaarjh2mz7dfhf2qgobiox55eo5ezyus2ynxne4c6lyyasnxko2bboy7/providers/Microsoft.KeyVault/vaults/envaults347eokedivesvq5x","location":"eastus2","tags":{},"deletionDate":"2021-11-01T19:24:05Z","scheduledPurgeDate":"2022-01-30T19:24:05Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultelnoatjg4z2bxbmfk","name":"envaultelnoatjg4z2bxbmfk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgdjgvrm375fmjnct6b2mjhg5cni2vqo7kaktkkp7sqir6hionltncmcrncnejj6ska/providers/Microsoft.KeyVault/vaults/envaultelnoatjg4z2bxbmfk","location":"eastus2","tags":{},"deletionDate":"2021-11-01T19:12:01Z","scheduledPurgeDate":"2022-01-30T19:12:01Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-fuwaucrc7","name":"cli-test-kv-nr-fuwaucrc7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule5utjemaggjdxpg3d6uor4bjru35llt355frdd5rbali5a/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-fuwaucrc7","location":"eastus2","tags":{},"deletionDate":"2021-11-01T14:58:55Z","scheduledPurgeDate":"2022-01-30T14:58:55Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-vnzj5tgo6","name":"cli-test-kv-nr-vnzj5tgo6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule5utjemaggjdxpg3d6uor4bjru35llt355frdd5rbali5a/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-vnzj5tgo6","location":"eastus2","tags":{},"deletionDate":"2021-11-01T14:58:24Z","scheduledPurgeDate":"2022-01-30T14:58:24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-lxwvg4xjr","name":"cli-test-kv-nr-lxwvg4xjr","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule5utjemaggjdxpg3d6uor4bjru35llt355frdd5rbali5a/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-lxwvg4xjr","location":"eastus2","tags":{},"deletionDate":"2021-11-01T14:58:24Z","scheduledPurgeDate":"2022-01-30T14:58:24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/acctestkv-isetest61","name":"acctestkv-isetest61","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ise-test61/providers/Microsoft.KeyVault/vaults/acctestkv-isetest61","location":"westus2","tags":{},"deletionDate":"2021-10-22T17:05:55Z","scheduledPurgeDate":"2022-01-20T17:05:55Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskvwcwnnzjqxkt4","name":"cliakskvwcwnnzjqxkt4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest5tawljixte/providers/Microsoft.KeyVault/vaults/cliakskvwcwnnzjqxkt4","location":"westus2","tags":{},"deletionDate":"2021-10-22T16:27:28Z","scheduledPurgeDate":"2022-01-20T16:27:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultyohfgwe","name":"keyVaultyohfgwe","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rggamcdz3sjs/providers/Microsoft.KeyVault/vaults/keyVaultyohfgwe","location":"westus2","tags":{},"deletionDate":"2021-10-22T09:50:50Z","scheduledPurgeDate":"2022-01-20T09:50:50Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultgz6b6fg","name":"keyVaultgz6b6fg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwhkxig5mx3/providers/Microsoft.KeyVault/vaults/keyVaultgz6b6fg","location":"westus2","tags":{},"deletionDate":"2021-10-22T09:49:11Z","scheduledPurgeDate":"2022-01-20T09:49:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultnexpnms","name":"keyVaultnexpnms","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgcufgfqjeff/providers/Microsoft.KeyVault/vaults/keyVaultnexpnms","location":"westus2","tags":{},"deletionDate":"2021-10-22T09:48:18Z","scheduledPurgeDate":"2022-01-20T09:48:18Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-xurbuvb6","name":"cli-test-kv-pna-xurbuvb6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pna7cnbtl24glakqbs5hw5af276warpsej6slkm6uksehaijbggdr27pj/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-xurbuvb6","location":"eastus2euap","tags":{},"deletionDate":"2021-10-15T03:10:11Z","scheduledPurgeDate":"2022-01-13T03:10:11Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv2-pna-ltiqwhk","name":"cli-test-kv2-pna-ltiqwhk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnafm4a345kf5uwmqj22ajlekb7ad7waio437tife7xqmc457sjcxy3rh/providers/Microsoft.KeyVault/vaults/cli-test-kv2-pna-ltiqwhk","location":"eastus2euap","tags":{},"deletionDate":"2021-10-14T03:49:11Z","scheduledPurgeDate":"2022-01-12T03:49:11Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-qp7a6b5m","name":"cli-test-kv-pna-qp7a6b5m","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnafm4a345kf5uwmqj22ajlekb7ad7waio437tife7xqmc457sjcxy3rh/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-qp7a6b5m","location":"eastus2euap","tags":{},"deletionDate":"2021-10-14T03:49:11Z","scheduledPurgeDate":"2022-01-12T03:49:11Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/cli-test-kv-pna-oyfeh7to","name":"cli-test-kv-pna-oyfeh7to","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_pnaap72o3kookf4uglrsldjgzy6utikeztgmzwrq573yyx34nxvyhorvi/providers/Microsoft.KeyVault/vaults/cli-test-kv-pna-oyfeh7to","location":"eastus2euap","tags":{},"deletionDate":"2021-10-14T03:46:32Z","scheduledPurgeDate":"2022-01-12T03:46:32Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestwxkr2ufofu33hemul","name":"clitestwxkr2ufofu33hemul","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgb7wqfxtjzqh6x7ndu2zs2hhv3e44lrb2l7ihaxhammmbcsysztl4hb77ke3vp26rh/providers/Microsoft.KeyVault/vaults/clitestwxkr2ufofu33hemul","location":"eastus2euap","tags":{},"deletionDate":"2021-09-10T02:29:08Z","scheduledPurgeDate":"2021-12-09T02:29:08Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=1ZPRbpswFIbfBU27GsGQsCaRoolgMzXrMTWxqbI7QpwETCACUhpXffe5XS%2f6CpEsWZaOjvV%2f%2br9Xq5Yv%2fUNRq86av1okWHOxtubWse%2fP3dxxTlmdHeRJ1v0o05dWjvLm5HSXbZe3xbkvmrpz0Nbd%2f5zcuba73SN7sttldibzsZ1vZ96dt0czf4acc9s8FzvZdg4Uedt0zb4f%2fZHXNLtUvbOTlezl7uPR%2fcrOhf1sJs3yhYfcmY3Mcb9%2f65T5sVGyXgiVPiXpiiciiThJxVrM4gdRiT2%2bd4HnY%2bCbCfDgBTAbYhwMtFxOKd94tAz8BAMCHWiKo2WClU4E00l5b2aXmHGlGScL68cnCO%2fGSZjE4gom9Ud6nWtarqaAkjAmgCg%2bDEwTnxI2gIpCUGygnPmg%2fkYxiSImNu8knsh7JW6fhDbpcD4AJ%2b7%2fO5kynRLAVciE6YIiY0rgCoiMAa0IVdFv0MuQ6jSk6msniAgeb7wXxpDAjfnB2CJQjPNrzI9TWlbGgMDYcIyYhivFxFh0xKY7LpQbQwX8RIEPWCyst7d%2f"}' headers: cache-control: no-cache - content-length: '3361' + content-length: '2639' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:40 GMT + date: Thu, 11 Nov 2021 03:24:30 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 22493076-2eb4-4eb6-8ee2-69febfbd6863 + x-ms-original-request-ids: e6985b1c-2bc4-4bbb-ae46-f39e8654ce73 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dTfbtowFAbwd0HTrkZjA6FKpWpq1xOmtAng2AfwnSFmo3b%2BQEKbpuq7z%2Bl2sWdAys1RHEf66fvO%2B6DQbfN0KEw9uHkfwF3KRTq4Gfxumqq%2B8bxcFeqXznXRXKnufNJXuzL36vO23p0OVXMoi9ojW7qfTq7pkG73ZDjJMjVUejce7rbB6Hq0J4EfEK86lS%2BHTJ9qLz7sTmVd7purR/2G6mwbL9NWNzr7HOrvqjoMX9xJd/ntiNBgSNxDv36pjftjaXRxy/PgLNMWFZVrYeUjhhEKIwVDiYIKn5MWtyHmDEzLkT3HxD%2BytZ0rK6ibo5hQ2Ixtomw54ZbNWBiB7Nhc53UrLGIMPmw6nMfgbsubGaPhUQEuGOJY8Ps5s9FRdeR28O0f2OgCxWDJk7kT7Pi6YokTkV2ywHAzEcikBj8U64wpE445onTCwAzO2ax9cKJR/57zyInuKBdOmATA%2BKfYCi40YtPNuErYrJnwoupBXESiBc6W/VxoIK/CYKqsBM7vH5fGB24k03kLDhBjQ0ECWzjLnw68SIQ/lX8j1oP9gISzu6eLrObUBWmBgH5fVQ300xHBBc1iGBv/iH2QjP/AKSbOBZbGnRfyQayaKKPh1FUzcUHr3PfpkgQC/w/aJVZz6pbZgoF445SFMVBXLUyUcctMYKhtiClnbllBx1dVv/xgta5SFHYsLDMM6DE10okSyp/vw9hGJ96LfXz8AQ%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=1ZNRb5swEID/C5r2NIINYU0iRVMym4iuZ2pip2JvBEwLJBAF0oKr/vc5Ux/6FyKddDrpdCd999271aihfyiburMW7xZdbYXcWgvrpe9P3cJxjmmTPqujavpJqi9nNcnao9Nd9l12Lk992Tadg/a4%2BDm9wzbeF8ie5nlqpyrz7Gw/d%2B/cAs39OXJO5/a1zNW5c6DMzm3XFv3kjxp36eXQO7k6qF7l/4vuV3oq7VfTaYYvXYTnNjKBv3/rarOxrVWzlPXuKd7di1jGgaA7uZXz6EEeZEFCDCLzQMAQkRoznWgQ9QjkfsYoeKzmKKIcg5Y%2BIzmNZUA5SoZI8IELFkC1DoCES%2BvHJwj3xkm4rAoxE9SHKhyAyDfQLzPQOeV6/ZuRZzeW1GMEPJDBmkmKuAbfZG2IaIaSK4knelXi9kloc/8q0YyEbkSyt4isZ8aFgctkBJRgLgwpEg4xDXFc/yW8ThCIPOA19WIJX5ygcvV4615EZDWaT0FQraagYWBVMItEEACNN4B2AUOGFuEeVIcN09w3XozGkU0kDaWrFx8f/wA%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dTRbpswFIDhd4mmXS3FJCEVlaqpWQ0bLaQ5%2BBwod05wlsRA3EDaNFXffc7aae8QiRtLB5A%2B/cdvvUYduvt1o9ve1VuP36QC095Vb9V1pr1ynFo28reqVdNdyON%2Bpy4W29pp9/N2sVubbr1tWofN3eV4dOn23fmS9UdlKftSLYb9xdwfXA6WzPd85pjd9nldql3rxOvFbttul93FnXolua86p1SV6lT599B%2Bl2bdf7aT9uPXA%2Bb6fWYf9%2BuXVts/brVqrkXt74v0QNItcqyKOwoiQl0gUEHooifYgeYB1cD1QRBsYuY9gYgS4ni05yRGb0x5lUj9a2TPEGt3B5pSycjDzITAPC4EJZKZn6IxTULBU6YLiE/vI0UxspdUsOvet0%2BwwRmKYWoFKOw8gVDE3H3CvHwgvh0JKwVWcM6jBwgijpoy4F6AIkkAi1BkZlNawSwvQVWGi81EghUWH2IZP8/EfC5yM6WALBBENimUw9VUVo8jrCAF7uPj8QS64japQmkvgHwFqi6HeErUdlscJ6nU0S1mnZxpl2f/wX7wRMDN/Vmu5vhxWE5V3Q0FA4q5x9O8eoDwZSQY3dnAArRORIZj3QUJenymS%2BvYMuFClHAP5ZGmsobQum4U94PP1fwI7RxXc4y5SWSlmaigUdzlKCa2PHuZ1UbPXCumC1ueLXEzCWf6JGrAXma3dn5iyyMhAqBw8YKn%2BX%2Blvb/AQ%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=1ZPRbpswFIbfBU27GsGQsCaRoolgMzXrMTWxqbI7QpwETCACUhpXffe5XS/6CpEsWZaOjvV/%2Br9Xq5Yv/UNRq86av1okWHOxtubWse/P3dxxTlmdHeRJ1v0o05dWjvLm5HSXbZe3xbkvmrpz0Nbd/5zcuba73SN7sttldibzsZ1vZ96dt0czf4acc9s8FzvZdg4Uedt0zb4f/ZHXNLtUvbOTlezl7uPR/crOhf1sJs3yhYfcmY3Mcb9/65T5sVGyXgiVPiXpiiciiThJxVrM4gdRiT2%2Bd4HnY%2BCbCfDgBTAbYhwMtFxOKd94tAz8BAMCHWiKo2WClU4E00l5b2aXmHGlGScL68cnCO/GSZjE4gom9Ud6nWtarqaAkjAmgCg%2BDEwTnxI2gIpCUGygnPmg/kYxiSImNu8knsh7JW6fhDbpcD4AJ%2B7/O5kynRLAVciE6YIiY0rgCoiMAa0IVdFv0MuQ6jSk6msniAgeb7wXxpDAjfnB2CJQjPNrzI9TWlbGgMDYcIyYhivFxFh0xKY7LpQbQwX8RIEPWCyst7d/ response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test0100","name":"acctestkv-test0100","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test100/providers/Microsoft.KeyVault/vaults/acctestkv-test0100","location":"eastus","tags":{},"deletionDate":"2021-07-13T01:16:47Z","scheduledPurgeDate":"2021-10-11T01:16:47Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test0199","name":"acctestkv-test0199","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test099/providers/Microsoft.KeyVault/vaults/acctestkv-test0199","location":"eastus","tags":{},"deletionDate":"2021-07-13T00:56:16Z","scheduledPurgeDate":"2021-10-11T00:56:16Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-a9cwn","name":"acctestkv-a9cwn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-210713083635334937/providers/Microsoft.KeyVault/vaults/acctestkv-a9cwn","location":"eastus","tags":{},"deletionDate":"2021-07-13T00:43:45Z","scheduledPurgeDate":"2021-10-11T00:43:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test099","name":"acctestkv-test099","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test099/providers/Microsoft.KeyVault/vaults/acctestkv-test099","location":"eastus","tags":{},"deletionDate":"2021-07-13T00:39:34Z","scheduledPurgeDate":"2021-10-11T00:39:34Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-sek1m","name":"acctestkv-sek1m","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-210713081459054713/providers/Microsoft.KeyVault/vaults/acctestkv-sek1m","location":"eastus","tags":{},"deletionDate":"2021-07-13T00:22:47Z","scheduledPurgeDate":"2021-10-11T00:22:47Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaults7npchc253lodwrsg","name":"envaults7npchc253lodwrsg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgvkvnjsgwxdcsrejg4cj2ettkldpc2bcdfdiprhubhi7expeyvuvuc4ae7k4tmczcq/providers/Microsoft.KeyVault/vaults/envaults7npchc253lodwrsg","location":"eastus2","tags":{},"deletionDate":"2021-07-16T10:20:03Z","scheduledPurgeDate":"2021-10-14T10:20:03Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultuds2vl5bmc2pxyvnh","name":"envaultuds2vl5bmc2pxyvnh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg26ue3lnv2zjso765ujusnw5mwcbnm2u2k32f3xruooc2b7727ksf4zuvbxxjixylg/providers/Microsoft.KeyVault/vaults/envaultuds2vl5bmc2pxyvnh","location":"eastus2","tags":{},"deletionDate":"2021-07-16T09:52:07Z","scheduledPurgeDate":"2021-10-14T09:52:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-473atjzcuikjf7","name":"vault-473atjzcuikjf7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgkkkzt2eon6bt77pxejayrvlyjkdyugzq6vv4c4n56crruiemujnqste7g4tc3m2qb/providers/Microsoft.KeyVault/vaults/vault-473atjzcuikjf7","location":"eastus2","tags":{},"deletionDate":"2021-07-09T04:11:11Z","scheduledPurgeDate":"2021-10-07T04:11:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitestvny75zj3uslno45qt","name":"clitestvny75zj3uslno45qt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg7h4kjkfmyntkj4tfdz3j26cqqygsj5rsb723ncoqekwikz3ewsjymparfpxyohn7b/providers/Microsoft.KeyVault/vaults/clitestvny75zj3uslno45qt","location":"westus","tags":{},"deletionDate":"2021-06-17T19:07:10Z","scheduledPurgeDate":"2021-09-15T19:07:10Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envaultgyj6fn3n7vtwhwwej","name":"envaultgyj6fn3n7vtwhwwej","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryptionzwzthm5v6d6m62b57vxuhnm5zuclneblfbe756womhmet6b4/providers/Microsoft.KeyVault/vaults/envaultgyj6fn3n7vtwhwwej","location":"westus","tags":{},"deletionDate":"2021-06-11T03:05:50Z","scheduledPurgeDate":"2021-09-09T03:05:50Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitcngjuytfgkp","name":"clitcngjuytfgkp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_uria3wyjzw326alxxkztjg4hdadrf2ms6ngu4c5zyrb/providers/Microsoft.KeyVault/vaults/clitcngjuytfgkp","location":"westus","tags":{},"deletionDate":"2021-06-10T21:24:44Z","scheduledPurgeDate":"2021-09-08T21:24:44Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cli3lwe5xv5kihs","name":"cli3lwe5xv5kihs","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identityj32wso6v7veh75aek5usawko2klawoeas/providers/Microsoft.KeyVault/vaults/cli3lwe5xv5kihs","location":"westus","tags":{},"deletionDate":"2021-06-10T21:24:29Z","scheduledPurgeDate":"2021-09-08T21:24:29Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitest7ccl6n5nh2kyrjhfx","name":"clitest7ccl6n5nh2kyrjhfx","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgbim6j4rqadbfzwotf3gfxsux2pkagxloydjq62zmc7lcut67jm5j67ioagoz3rtfv/providers/Microsoft.KeyVault/vaults/clitest7ccl6n5nh2kyrjhfx","location":"westus","tags":{},"deletionDate":"2021-06-10T19:10:51Z","scheduledPurgeDate":"2021-09-08T19:10:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-fior3rfxxx77p","name":"vault3-fior3rfxxx77p","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_stkdnwfgxrntg4cdlbvubnymlaizl2k256/providers/Microsoft.KeyVault/vaults/vault3-fior3rfxxx77p","location":"westcentralus","tags":{},"deletionDate":"2021-06-18T04:23:27Z","scheduledPurgeDate":"2021-09-16T04:23:27Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-gzzslgljnsio2","name":"vault2-gzzslgljnsio2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_q2cshh3zca3ytvpkcilhnonyjlbandlw67ujdxw/providers/Microsoft.KeyVault/vaults/vault2-gzzslgljnsio2","location":"westcentralus","tags":{},"deletionDate":"2021-06-18T04:22:28Z","scheduledPurgeDate":"2021-09-16T04:22:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-awap55b5zrkf2","name":"vault1-awap55b5zrkf2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_q2cshh3zca3ytvpkcilhnonyjlbandlw67ujdxw/providers/Microsoft.KeyVault/vaults/vault1-awap55b5zrkf2","location":"westcentralus","tags":{},"deletionDate":"2021-06-18T04:22:28Z","scheduledPurgeDate":"2021-09-16T04:22:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-ryflvt3gyff2vn","name":"vault-ryflvt3gyff2vn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_um5ehtjlvazbvoscnq3vi5bounvnu6xi2bgcah7cflquyo/providers/Microsoft.KeyVault/vaults/vault-ryflvt3gyff2vn","location":"westcentralus","tags":{},"deletionDate":"2021-06-18T04:21:35Z","scheduledPurgeDate":"2021-09-16T04:21:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-vm6dbdb3da6f5","name":"vault4-vm6dbdb3da6f5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_elhgh7bp7cntwiujkbqgderrjajpjdfl2ef4y/providers/Microsoft.KeyVault/vaults/vault4-vm6dbdb3da6f5","location":"westcentralus","tags":{},"deletionDate":"2021-06-18T04:19:37Z","scheduledPurgeDate":"2021-09-16T04:19:37Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultte7z5vk","name":"keyVaultte7z5vk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgt44iecwafn/providers/Microsoft.KeyVault/vaults/keyVaultte7z5vk","location":"westus2","tags":{},"deletionDate":"2021-06-24T20:49:19Z","scheduledPurgeDate":"2021-09-22T20:49:19Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultkytklbg","name":"keyVaultkytklbg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgkncpjjlxw6/providers/Microsoft.KeyVault/vaults/keyVaultkytklbg","location":"westus2","tags":{},"deletionDate":"2021-06-24T20:49:05Z","scheduledPurgeDate":"2021-09-22T20:49:05Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultmmzgml4","name":"keyVaultmmzgml4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgyuvqjferti/providers/Microsoft.KeyVault/vaults/keyVaultmmzgml4","location":"westus2","tags":{},"deletionDate":"2021-06-24T20:48:19Z","scheduledPurgeDate":"2021-09-22T20:48:19Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultuex57po","name":"keyVaultuex57po","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgb64ajzivcq/providers/Microsoft.KeyVault/vaults/keyVaultuex57po","location":"westus2","tags":{},"deletionDate":"2021-06-17T20:50:06Z","scheduledPurgeDate":"2021-09-15T20:50:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultmje2jey","name":"keyVaultmje2jey","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4fyffo3sha/providers/Microsoft.KeyVault/vaults/keyVaultmje2jey","location":"westus2","tags":{},"deletionDate":"2021-06-17T20:49:18Z","scheduledPurgeDate":"2021-09-15T20:49:18Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZTdattAEEbfxZRe1dHKtRIUCCVpdx2UWIpGO2NFd2tp3bj621hyrDjk3btKC4U%2bgmFvPhhm4XC%2beZs0eujvt03ZTS7fJvw6kZhMLidPfW%2b6S8epVaN%2b6lo3%2fZk67nf6LG9rp9uvu3y3Nf22bTqHrd3N%2bfzCnbrrDZvOi0JNlc6%2fTvO1P7uYbZjv%2bcwxu%2fZlW%2bhd5yy3%2ba7t2k1%2fdqdfSe2r3il0pXtdfITumzLb6YudtMuvZsz1p8w%2b9%2fOnrrQ%2ftqVurmTt77NkIOVmKVbZHYmAsMwQKCN00ZNsoLWgGng5SIJfS%2bY9gwwi4uJcrgyF6PFYilBVj3Obb3QVcCkhAcGZrKCLS4%2fLskjs0qNMTRu7%2fIBplQBmP7A2QYiuQMmuJl%2f%2bApudIjGUFKm6tzQh06XLk9SExNu5JRTFzEdIzQMtuoN0SSy5xyEtgBb5EesebEZMn4A4zWVJsBSW4B9iK36aivlcHW8eQOBhBDYCSCREJCywlYmgHBUUiRpVq%2bAuZp4AeRPRYriVSJnmPsfSzpPwcNULTcFO%2fgP2nYcSru9PsZo%2bl%2blTCIvCs5yC0HJ4PFJIi8PcVi%2fQ3OUZD0LgbMAKkrGalJpIMXNrq7iKq4Bg5PwhGgT6f9FOsJojMRPpOj%2fY47YLrWmP1rwPYo2BJQXPcRlGS%2b561qwI0LPHyh4%2fxAFTo6x5aLOtqjWvNh2M1R5Ne3%2f%2fDQ%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultkoag4tl","name":"cmk-test-keyvaultkoag4tl","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgcvaipfarbgammihmpsukvlnek6fsou2qoowr7ldyriyfqw57jhxk65dovofrwaync/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultkoag4tl","location":"eastus","tags":{},"deletionDate":"2021-09-02T19:12:23Z","scheduledPurgeDate":"2021-12-01T19:12:23Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-idgytif","name":"cli-test-kv-mgmt-idgytif","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmt4htyvnn4rdrqzhbq5v3xkpvhwkxides65gn24bql4xswsyjnhp2tp/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-idgytif","location":"eastus","tags":{},"deletionDate":"2021-08-26T21:44:51Z","scheduledPurgeDate":"2021-11-24T21:44:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultrqdjkvv","name":"cmk-test-keyvaultrqdjkvv","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgswz3ehiec2ycliaeuuuff356dvdxasoqjpxbsa42vlyc23thd4uhdfe4luu4376up/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultrqdjkvv","location":"eastus","tags":{},"deletionDate":"2021-08-26T19:12:38Z","scheduledPurgeDate":"2021-11-24T19:12:38Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-pzrim2n","name":"cli-test-kv-mgmt-pzrim2n","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtafrmc2k5y7ybxpw7tkjlizn3dq3lneh77f3vfjhuclte3d7kkswfm/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-pzrim2n","location":"eastus","tags":{},"deletionDate":"2021-08-19T21:40:45Z","scheduledPurgeDate":"2021-11-17T21:40:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultbrffu4s","name":"cmk-test-keyvaultbrffu4s","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgecm6lfxcdkglnmvak7sf7qsrrd3jcfj42jgatpasq5rjmzxooad2qsfzwm4gipzri/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultbrffu4s","location":"eastus","tags":{},"deletionDate":"2021-08-19T19:13:13Z","scheduledPurgeDate":"2021-11-17T19:13:13Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-fyhmd7v7e","name":"cli-test-kv-nr-fyhmd7v7e","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule5utjemaggjdxpg3d6uor4bjru35llt355frdd5rbali5a/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-fyhmd7v7e","location":"eastus2","tags":{},"deletionDate":"2021-11-01T14:58:24Z","scheduledPurgeDate":"2022-01-30T14:58:24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-cok5s2mhg","name":"cli-test-kv-nr-cok5s2mhg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule5utjemaggjdxpg3d6uor4bjru35llt355frdd5rbali5a/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-cok5s2mhg","location":"eastus2","tags":{},"deletionDate":"2021-11-01T14:58:24Z","scheduledPurgeDate":"2022-01-30T14:58:24Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaulteyzagmxvjkt7akjwu","name":"envaulteyzagmxvjkt7akjwu","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwigwidjufccb27y6z3fpfinm7ubocfe7fqmqcpvhligrdx2scdwgtdcyi4vdmm6k7/providers/Microsoft.KeyVault/vaults/envaulteyzagmxvjkt7akjwu","location":"eastus2","tags":{},"deletionDate":"2021-10-29T22:18:15Z","scheduledPurgeDate":"2022-01-27T22:18:15Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultr3gs5igb4yyfuqgbu","name":"envaultr3gs5igb4yyfuqgbu","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmpy6422bruc2ibwskciz2j5yuafbufqniqw2amekey24ymchtal5voqzm4hhja37t/providers/Microsoft.KeyVault/vaults/envaultr3gs5igb4yyfuqgbu","location":"eastus2","tags":{},"deletionDate":"2021-10-29T22:13:20Z","scheduledPurgeDate":"2022-01-27T22:13:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskvf2jhwmlvniem","name":"cliakskvf2jhwmlvniem","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestaveybw56wu/providers/Microsoft.KeyVault/vaults/cliakskvf2jhwmlvniem","location":"westus2","tags":{},"deletionDate":"2021-10-22T08:48:29Z","scheduledPurgeDate":"2022-01-20T08:48:29Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/acctestkv-isetest70","name":"acctestkv-isetest70","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ia-test70/providers/Microsoft.KeyVault/vaults/acctestkv-isetest70","location":"westus2","tags":{},"deletionDate":"2021-09-10T23:17:16Z","scheduledPurgeDate":"2021-12-09T23:17:16Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/acctestkv-isetest50","name":"acctestkv-isetest50","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ia-test50/providers/Microsoft.KeyVault/vaults/acctestkv-isetest50","location":"westus2","tags":{},"deletionDate":"2021-09-10T08:07:21Z","scheduledPurgeDate":"2021-12-09T08:07:21Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/acctestkv-isetest40","name":"acctestkv-isetest40","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ia-test40/providers/Microsoft.KeyVault/vaults/acctestkv-isetest40","location":"westus2","tags":{},"deletionDate":"2021-09-10T01:38:30Z","scheduledPurgeDate":"2021-12-09T01:38:30Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVault5g47xdu","name":"keyVault5g47xdu","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgexxici5rfn/providers/Microsoft.KeyVault/vaults/keyVault5g47xdu","location":"westus2","tags":{},"deletionDate":"2021-09-09T20:55:55Z","scheduledPurgeDate":"2021-12-08T20:55:55Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitest6ula77hut6vklldwq","name":"clitest6ula77hut6vklldwq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgm6rjzydmkbb6qdkbikn76lvhj22ejhz4mzck5pqapeerc5cvv3pygn3dcvatrinku/providers/Microsoft.KeyVault/vaults/clitest6ula77hut6vklldwq","location":"eastus2euap","tags":{},"deletionDate":"2021-09-07T07:17:04Z","scheduledPurgeDate":"2021-12-06T07:17:04Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestzp2flz3awwfjw6bdd","name":"clitestzp2flz3awwfjw6bdd","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoxrlvlb7lg5hvteihjx34bjvdrpbhmwbqwppcss6bsfhz5apd44h3zuixiemvgfor/providers/Microsoft.KeyVault/vaults/clitestzp2flz3awwfjw6bdd","location":"eastus2euap","tags":{},"deletionDate":"2021-09-03T02:49:33Z","scheduledPurgeDate":"2021-12-02T02:49:33Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitest5expuuiiepgvvfpgi","name":"clitest5expuuiiepgvvfpgi","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgds3qtpbu64hcztik3ovgsizxen3eq54uxzajci4p6gdchximiojcdwl6vkovfewrl/providers/Microsoft.KeyVault/vaults/clitest5expuuiiepgvvfpgi","location":"eastus2euap","tags":{},"deletionDate":"2021-08-27T01:58:14Z","scheduledPurgeDate":"2021-11-25T01:58:14Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2euap/deletedVaults/clitestqqoufb4h22yrdasho","name":"clitestqqoufb4h22yrdasho","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfbb4j2nahv4mrumlbcikpvdfbo4plc4dhsaxzmuzkrvabszvvchqzxahmwsc2sto5/providers/Microsoft.KeyVault/vaults/clitestqqoufb4h22yrdasho","location":"eastus2euap","tags":{},"deletionDate":"2021-08-20T01:59:31Z","scheduledPurgeDate":"2021-11-18T01:59:31Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=1ZPfbpswFIffBU27GuH%2fGiJFE41NFNZjCrGpyB0BQ8EJRIEUStV3nzvtYq8QyUc6lqxz9Pv0%2bUNp%2bTQ81a3oldWHgr09ZXtlpbwOw6Vfado5a7OKn3k7LLL5duWLvDtr%2fe3Y59f6MtRd22v60Sh%2f2g%2bGahxLXbWLIlMznltqfnTNB7PUXcfVtcu1e6sLfu01qPNr13flsPjN35Psdhq0gp%2f4wIu%2fl%2f5XdqnVN%2flSDl%2bbuuGqujzG92%2b9kBs7wds1E8lLnAQ0ZrFPccL2zA2f2ImVaGcAzS1oxAgoGkkDJlBhhfR1SeZgA6hyCGJTRA8bgqqJIGHJmkIcbGO2s4nATjTv1sqPfyDMOydhkiY3CMVOSHcyuWeT5nEJItkSkTpkTq2Y%2bkgSGWMqTJjZDBSPIUtnSceORPpF4gV%2fKXHvJCygnvSg0glKZR85gPwlYQECHYwYHbBML33AUySwHdLAJyiRZKI5pMkGBPznBGbe8517IX9IZZHGew9RpQNlMiVZyuQTMBij%2bbAFlDxKX8wYBz7gxAdUSGewA4LNkc7WyufnHw%3d%3d"}' headers: cache-control: no-cache - content-length: '3300' + content-length: '2942' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:40 GMT + date: Thu, 11 Nov 2021 03:24:30 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 947ca31b-6470-4de4-b37d-fe3842efb4f3 + x-ms-original-request-ids: 69ec9040-6fbd-40e0-a2ec-e6195c2f46ca status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dTRbpswFIDhd4mmXS3FJCEVlaqpWQ0bLaQ5%2BBwod05wlsRA3EDaNFXffc7aae8QiRtLB5A%2B/cdvvUYduvt1o9ve1VuP36QC095Vb9V1pr1ynFo28reqVdNdyON%2Bpy4W29pp9/N2sVubbr1tWofN3eV4dOn23fmS9UdlKftSLYb9xdwfXA6WzPd85pjd9nldql3rxOvFbttul93FnXolua86p1SV6lT599B%2Bl2bdf7aT9uPXA%2Bb6fWYf9%2BuXVts/brVqrkXt74v0QNItcqyKOwoiQl0gUEHooifYgeYB1cD1QRBsYuY9gYgS4ni05yRGb0x5lUj9a2TPEGt3B5pSycjDzITAPC4EJZKZn6IxTULBU6YLiE/vI0UxspdUsOvet0%2BwwRmKYWoFKOw8gVDE3H3CvHwgvh0JKwVWcM6jBwgijpoy4F6AIkkAi1BkZlNawSwvQVWGi81EghUWH2IZP8/EfC5yM6WALBBENimUw9VUVo8jrCAF7uPj8QS64japQmkvgHwFqi6HeErUdlscJ6nU0S1mnZxpl2f/wX7wRMDN/Vmu5vhxWE5V3Q0FA4q5x9O8eoDwZSQY3dnAArRORIZj3QUJenymS%2BvYMuFClHAP5ZGmsobQum4U94PP1fwI7RxXc4y5SWSlmaigUdzlKCa2PHuZ1UbPXCumC1ueLXEzCWf6JGrAXma3dn5iyyMhAqBw8YKn%2BX%2Blvb//AQ%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=1ZPRbpswFIbfBU27GsGQsCaRoolgMzXrMTWxqbI7QpwETCACUhpXffe5XS/6CpEsWZaOjvV/%2Br9Xq5Yv/UNRq86av1okWHOxtubWse/P3dxxTlmdHeRJ1v0o05dWjvLm5HSXbZe3xbkvmrpz0Nbd/5zcuba73SN7sttldibzsZ1vZ96dt0czf4acc9s8FzvZdg4Uedt0zb4f/ZHXNLtUvbOTlezl7uPR/crOhf1sJs3yhYfcmY3Mcb9/65T5sVGyXgiVPiXpiiciiThJxVrM4gdRiT2%2Bd4HnY%2BCbCfDgBTAbYhwMtFxOKd94tAz8BAMCHWiKo2WClU4E00l5b2aXmHGlGScL68cnCO/GSZjE4gom9Ud6nWtarqaAkjAmgCg%2BDEwTnxI2gIpCUGygnPmg/kYxiSImNu8knsh7JW6fhDbpcD4AJ%2B7/O5kynRLAVciE6YIiY0rgCoiMAa0IVdFv0MuQ6jSk6msniAgeb7wXxpDAjfnB2CJQjPNrzI9TWlbGgMDYcIyYhivFxFh0xKY7LpQbQwX8RIEPWCyst7d/ - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZTdattAEEbfxZRe1dHKtRIUCCVpdx2UWIpGO2NFd2tp3bj621hyrDjk3btKC4U%2BgmFvPhhm4XC%2BeZs0eujvt03ZTS7fJvw6kZhMLidPfW%2B6S8epVaN%2B6lo3/Zk67nf6LG9rp9uvu3y3Nf22bTqHrd3N%2BfzCnbrrDZvOi0JNlc6/TvO1P7uYbZjv%2Bcwxu/ZlW%2Bhd5yy3%2Ba7t2k1/dqdfSe2r3il0pXtdfITumzLb6YudtMuvZsz1p8w%2B9/OnrrQ/tqVurmTt77NkIOVmKVbZHYmAsMwQKCN00ZNsoLWgGng5SIJfS%2BY9gwwi4uJcrgyF6PFYilBVj3Obb3QVcCkhAcGZrKCLS4/Lskjs0qNMTRu7/IBplQBmP7A2QYiuQMmuJl/%2BApudIjGUFKm6tzQh06XLk9SExNu5JRTFzEdIzQMtuoN0SSy5xyEtgBb5EesebEZMn4A4zWVJsBSW4B9iK36aivlcHW8eQOBhBDYCSCREJCywlYmgHBUUiRpVq%2BAuZp4AeRPRYriVSJnmPsfSzpPwcNULTcFO/gP2nYcSru9PsZo%2Bl%2BlTCIvCs5yC0HJ4PFJIi8PcVi/Q3OUZD0LgbMAKkrGalJpIMXNrq7iKq4Bg5PwhGgT6f9FOsJojMRPpOj/Y47YLrWmP1rwPYo2BJQXPcRlGS%2B561qwI0LPHyh4/xAFTo6x5aLOtqjWvNh2M1R5Ne3/DQ%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=1ZPfbpswFIffBU27GuH/GiJFE41NFNZjCrGpyB0BQ8EJRIEUStV3nzvtYq8QyUc6lqxz9Pv0%2BUNp%2BTQ81a3oldWHgr09ZXtlpbwOw6Vfado5a7OKn3k7LLL5duWLvDtr/e3Y59f6MtRd22v60Sh/2g%2BGahxLXbWLIlMznltqfnTNB7PUXcfVtcu1e6sLfu01qPNr13flsPjN35Psdhq0gp/4wIu/l/5XdqnVN/lSDl%2BbuuGqujzG92%2B9kBs7wds1E8lLnAQ0ZrFPccL2zA2f2ImVaGcAzS1oxAgoGkkDJlBhhfR1SeZgA6hyCGJTRA8bgqqJIGHJmkIcbGO2s4nATjTv1sqPfyDMOydhkiY3CMVOSHcyuWeT5nEJItkSkTpkTq2Y%2BkgSGWMqTJjZDBSPIUtnSceORPpF4gV/KXHvJCygnvSg0glKZR85gPwlYQECHYwYHbBML33AUySwHdLAJyiRZKI5pMkGBPznBGbe8517IX9IZZHGew9RpQNlMiVZyuQTMBij%2BbAFlDxKX8wYBz7gxAdUSGewA4LNkc7WyufnHw%3D%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test044","name":"acctestkv-test044","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test044/providers/Microsoft.KeyVault/vaults/acctestkv-test044","location":"eastus","tags":{},"deletionDate":"2021-07-13T00:20:11Z","scheduledPurgeDate":"2021-10-11T00:20:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-xf6ln","name":"acctestkv-xf6ln","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-210713080004474144/providers/Microsoft.KeyVault/vaults/acctestkv-xf6ln","location":"eastus","tags":{},"deletionDate":"2021-07-13T00:08:59Z","scheduledPurgeDate":"2021-10-11T00:08:59Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test0245","name":"acctestkv-test0245","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test024/providers/Microsoft.KeyVault/vaults/acctestkv-test0245","location":"eastus","tags":{},"deletionDate":"2021-07-13T00:02:45Z","scheduledPurgeDate":"2021-10-11T00:02:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test024","name":"acctestkv-test024","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test024/providers/Microsoft.KeyVault/vaults/acctestkv-test024","location":"eastus","tags":{},"deletionDate":"2021-07-12T23:46:13Z","scheduledPurgeDate":"2021-10-10T23:46:13Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-adyaa","name":"acctestkv-adyaa","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-210713071539685768/providers/Microsoft.KeyVault/vaults/acctestkv-adyaa","location":"eastus","tags":{},"deletionDate":"2021-07-12T23:27:59Z","scheduledPurgeDate":"2021-10-10T23:27:59Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaulta5i57qalviuiud67k","name":"envaulta5i57qalviuiud67k","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgqg76zctnicqe2e4vegkensyv6lrpbobn3qukltpemzeezhausobl7g5gxcrfy4htl/providers/Microsoft.KeyVault/vaults/envaulta5i57qalviuiud67k","location":"eastus2","tags":{},"deletionDate":"2021-07-09T03:26:53Z","scheduledPurgeDate":"2021-10-07T03:26:53Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultgt2ifh5ocrvulkoau","name":"envaultgt2ifh5ocrvulkoau","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgrqzvdhfjhlor4lunvgna7cx6ceof4f2ck67gykbuzg27jqrel6662nnhf6i4gpxqr/providers/Microsoft.KeyVault/vaults/envaultgt2ifh5ocrvulkoau","location":"eastus2","tags":{},"deletionDate":"2021-07-09T03:22:21Z","scheduledPurgeDate":"2021-10-07T03:22:21Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/cliwd4z4zqe264u","name":"cliwd4z4zqe264u","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identityoe6knmjwwechgs4txluwkz6ozwlsdopno/providers/Microsoft.KeyVault/vaults/cliwd4z4zqe264u","location":"westus","tags":{},"deletionDate":"2021-06-08T02:56:11Z","scheduledPurgeDate":"2021-09-06T02:56:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/envaultnkbiqywlvqnxjc4tk","name":"envaultnkbiqywlvqnxjc4tk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_storage_encryption4g4s3rkx4kka6w5dq3hkpq42vir5tenl6i5xeem3rlek5sdz/providers/Microsoft.KeyVault/vaults/envaultnkbiqywlvqnxjc4tk","location":"westus","tags":{},"deletionDate":"2021-06-04T04:01:22Z","scheduledPurgeDate":"2021-09-02T04:01:22Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clienb2xa5ojui3","name":"clienb2xa5ojui3","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_managed_service_identitywrcs23kzgmiuvlp6dkqfkalodsy2bzwrb/providers/Microsoft.KeyVault/vaults/clienb2xa5ojui3","location":"westus","tags":{},"deletionDate":"2021-06-03T21:29:02Z","scheduledPurgeDate":"2021-09-01T21:29:02Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clisyuznrrztccw","name":"clisyuznrrztccw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cosmosdb_key_vault_key_urikn2eci2glxhjfvejgmcilaoxq7fegqsjf6p5yed4/providers/Microsoft.KeyVault/vaults/clisyuznrrztccw","location":"westus","tags":{},"deletionDate":"2021-06-03T21:28:17Z","scheduledPurgeDate":"2021-09-01T21:28:17Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/clitesttg3moqezyylf7wwho","name":"clitesttg3moqezyylf7wwho","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rguizgemuilfmcy5ja7ajm2jyrdcdgg6tetl7e2dbt73pebfpsc4rhphtwdv3s3pzzv/providers/Microsoft.KeyVault/vaults/clitesttg3moqezyylf7wwho","location":"westus","tags":{},"deletionDate":"2021-06-03T19:13:43Z","scheduledPurgeDate":"2021-09-01T19:13:43Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-sn3pml7dwqg6c","name":"vault2-sn3pml7dwqg6c","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_vgj2lv3w7idxxp6yy7oybuq6rdmsdcowj2nyscq/providers/Microsoft.KeyVault/vaults/vault2-sn3pml7dwqg6c","location":"westcentralus","tags":{},"deletionDate":"2021-06-11T03:53:48Z","scheduledPurgeDate":"2021-09-09T03:53:48Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-vs2ioriniqapg","name":"vault1-vs2ioriniqapg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_vgj2lv3w7idxxp6yy7oybuq6rdmsdcowj2nyscq/providers/Microsoft.KeyVault/vaults/vault1-vs2ioriniqapg","location":"westcentralus","tags":{},"deletionDate":"2021-06-11T03:53:48Z","scheduledPurgeDate":"2021-09-09T03:53:48Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-fkirxmqoumu5l","name":"vault3-fkirxmqoumu5l","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_icdfwwirfn7chvzxonuv36ynnel7c7xovc/providers/Microsoft.KeyVault/vaults/vault3-fkirxmqoumu5l","location":"westcentralus","tags":{},"deletionDate":"2021-06-11T03:49:11Z","scheduledPurgeDate":"2021-09-09T03:49:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-bab4x2syr2rjnk","name":"vault-bab4x2syr2rjnk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_jj55cm5otgpdc32skqu4rn7e33hqow4nalj7oy7uuw7s6q/providers/Microsoft.KeyVault/vaults/vault-bab4x2syr2rjnk","location":"westcentralus","tags":{},"deletionDate":"2021-06-11T03:47:12Z","scheduledPurgeDate":"2021-09-09T03:47:12Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-pazqivykoks7x","name":"vault4-pazqivykoks7x","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_auouoymf6eci7g3qhoo5clnqzsu624tlee5yo/providers/Microsoft.KeyVault/vaults/vault4-pazqivykoks7x","location":"westcentralus","tags":{},"deletionDate":"2021-06-11T03:44:50Z","scheduledPurgeDate":"2021-09-09T03:44:50Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultunvr7g2","name":"keyVaultunvr7g2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgw32sapx5yz/providers/Microsoft.KeyVault/vaults/keyVaultunvr7g2","location":"westus2","tags":{},"deletionDate":"2021-06-17T20:48:20Z","scheduledPurgeDate":"2021-09-15T20:48:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultaze7c4c","name":"keyVaultaze7c4c","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5ggcrhnysp/providers/Microsoft.KeyVault/vaults/keyVaultaze7c4c","location":"westus2","tags":{},"deletionDate":"2021-06-10T20:46:11Z","scheduledPurgeDate":"2021-09-08T20:46:11Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultqsarzbi","name":"keyVaultqsarzbi","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rglnqcpdkv3t/providers/Microsoft.KeyVault/vaults/keyVaultqsarzbi","location":"westus2","tags":{},"deletionDate":"2021-06-10T20:45:25Z","scheduledPurgeDate":"2021-09-08T20:45:25Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulthqmuyr6","name":"keyVaulthqmuyr6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgradzw6pi5z/providers/Microsoft.KeyVault/vaults/keyVaulthqmuyr6","location":"westus2","tags":{},"deletionDate":"2021-06-10T20:44:42Z","scheduledPurgeDate":"2021-09-08T20:44:42Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultkuzf7ra","name":"keyVaultkuzf7ra","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg6m6od4sx4s/providers/Microsoft.KeyVault/vaults/keyVaultkuzf7ra","location":"westus2","tags":{},"deletionDate":"2021-06-03T20:54:58Z","scheduledPurgeDate":"2021-09-01T20:54:58Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZTRbtowFIbfBU27Go0NpFUqVVPpbLq0Cd2JfcJyZ4gZ1EkISWiBqu%2b%2bQztp74DkmyMf2dKn7%2f%2ffepXdd4%2fryrW967eeuE2UTnrXvVXX1e2155WmMn9saavuwhx3jb1YbEqv3c3bRbOuu%2fWmaj0258vL0RXv8%2fmS9Ud5bvrGLob9xTwYXA2WLPAD5tXN5mWd26b1ovWi2bSbZXfxYA9odkXn5bawnc0%2fhva7qdf9F9qkx28GjAd9Rod%2f%2fdI6%2bnHjbHWjymCXJXs0PJvpIntAGaJ2mQbMUHPtK7bHucQShNsrhOeI%2bVtQ4RMI7isNY6u5SGdFbMvXkeJggItXcHEMk9UPXdZj2pda4RQm7YHuE3CBmAuIUeJIqTFa5zeo2E3v2z9gg3MkhrMVEdMHldZhrAOdHWFqiJhGjG0RNjjLE5ws9kQoIyJCKXhCXd%2brqq4iGTYwq4kg3GsHD6ADqT6JpeI8FQs0Khlbp4%2bqrOOI8W2qgObfI1VA8otLUjROAN2RFAsjApa6GCJRkK7wnHN5mQmYghAHNauziIfE6UOxE7A7ESu4fTzHaAbCDFdTW8ZDEik8iQQUTRA%2fT9F0wLikOTGMOFW1AedLdFliyv2dLhAjEZyi%2boRSMJ12krht9X9uOjnDaJ5MG0%2btwyGVW0hlts2OYyovKrO0CyMuG3RkXpmTWTgB4YtM5DF8RvMO9Og1dRmZ5kvaB4uhNkcy7f39Lw%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv081802","name":"bez-kv081802","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081802","location":"eastus","tags":{},"deletionDate":"2021-08-18T11:06:07Z","scheduledPurgeDate":"2021-11-16T11:06:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv081801","name":"bez-kv081801","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081801","location":"eastus","tags":{},"deletionDate":"2021-08-18T11:06:07Z","scheduledPurgeDate":"2021-11-16T11:06:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/bez-kv081805","name":"bez-kv081805","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.KeyVault/vaults/bez-kv081805","location":"eastus","tags":{},"deletionDate":"2021-08-18T11:06:07Z","scheduledPurgeDate":"2021-11-16T11:06:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-test105","name":"acctestkv-test105","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-test103/providers/Microsoft.KeyVault/vaults/acctestkv-test105","location":"eastus","tags":{},"deletionDate":"2021-08-13T12:46:45Z","scheduledPurgeDate":"2021-11-11T12:46:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-k5v4ixas3","name":"cli-test-kv-nr-k5v4ixas3","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruletekhzuw4stbaxjhxh6qr7ehe7asl6c4fwplc2rhqtln5p/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-k5v4ixas3","location":"eastus2","tags":{},"deletionDate":"2021-10-29T18:36:21Z","scheduledPurgeDate":"2022-01-27T18:36:21Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-j66xke5nl","name":"cli-test-kv-nr-j66xke5nl","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruletekhzuw4stbaxjhxh6qr7ehe7asl6c4fwplc2rhqtln5p/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-j66xke5nl","location":"eastus2","tags":{},"deletionDate":"2021-10-29T18:36:21Z","scheduledPurgeDate":"2022-01-27T18:36:21Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ck6jtj2jo","name":"cli-test-kv-nr-ck6jtj2jo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruletekhzuw4stbaxjhxh6qr7ehe7asl6c4fwplc2rhqtln5p/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ck6jtj2jo","location":"eastus2","tags":{},"deletionDate":"2021-10-29T18:35:51Z","scheduledPurgeDate":"2022-01-27T18:35:51Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-qli5bzgqg","name":"cli-test-kv-nr-qli5bzgqg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruletekhzuw4stbaxjhxh6qr7ehe7asl6c4fwplc2rhqtln5p/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-qli5bzgqg","location":"eastus2","tags":{},"deletionDate":"2021-10-29T18:35:50Z","scheduledPurgeDate":"2022-01-27T18:35:50Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultb4y52ty","name":"keyVaultb4y52ty","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmvgobqzkyd/providers/Microsoft.KeyVault/vaults/keyVaultb4y52ty","location":"westus2","tags":{},"deletionDate":"2021-09-09T20:55:19Z","scheduledPurgeDate":"2021-12-08T20:55:19Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultbbf4ydd","name":"keyVaultbbf4ydd","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgcbxhpizluk/providers/Microsoft.KeyVault/vaults/keyVaultbbf4ydd","location":"westus2","tags":{},"deletionDate":"2021-09-09T20:55:06Z","scheduledPurgeDate":"2021-12-08T20:55:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskvml3tku6pynjp","name":"cliakskvml3tku6pynjp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestjtgavoejzd/providers/Microsoft.KeyVault/vaults/cliakskvml3tku6pynjp","location":"westus2","tags":{},"deletionDate":"2021-09-09T19:36:45Z","scheduledPurgeDate":"2021-12-08T19:36:45Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/acctestkv-isetest20","name":"acctestkv-isetest20","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-ia-test20/providers/Microsoft.KeyVault/vaults/acctestkv-isetest20","location":"westus2","tags":{},"deletionDate":"2021-09-07T03:21:09Z","scheduledPurgeDate":"2021-12-06T03:21:09Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultbqko4yf","name":"keyVaultbqko4yf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgde3quyyidy/providers/Microsoft.KeyVault/vaults/keyVaultbqko4yf","location":"westus2","tags":{},"deletionDate":"2021-09-02T20:57:16Z","scheduledPurgeDate":"2021-12-01T20:57:16Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=1ZLhbqMwDMffBU336SiB0q1Uqk7tEqrulqCkCdPdNxrCRqBQETrRTHv3S6d7iUm2Jetv2fLP%2fvA6NY3PddcYb%2fXhoc2Bi4O38t7G8WxWQXAquuJVnVQ3zgp7GdRM9qfAXI5GDvV5rPvOBOAYVvfxQ%2biHxwr4cVkWfqHk3JfHJHqIKpAsEhCch%2f69LtVgAlzLoTd9Nc5%2bq2teXNoxKFWrRlV%2bJeZXca79d1fpmq8jECY%2bcBb%2buDONm9g3qluLJn9h%2bRNngqUc5eIgkuxZtKKC%2bxBzOceWAsybBYF4IrYBGWyXTDNEOdtmHAEG5UTg5kpFuqW6uWLEdlS3iOrNRK1cez%2f%2fg4i%2bOYmIaBllcA8yjheEixhDssQ6TzFEMbEEZvBPTOATJABZognCGkcuzjNOHKkvEi%2fo9hLfncQc89umIsLW%2be3%2bPF1S%2fmqJbbdU7CesqdP%2f7ghCCwzTXeY02pBHRzBmCK29z89%2f"}' headers: cache-control: no-cache - content-length: '3145' + content-length: '1762' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:40 GMT + date: Thu, 11 Nov 2021 03:24:30 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: d250afca-4359-4786-a1ff-c44404f966f9 + x-ms-original-request-ids: 3ed137f9-3933-4add-b0a1-a4403fceb2cf status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZTdattAEEbfxZRe1dHKtRIUCCVpdx2UWIpGO2NFd2tp3bj621hyrDjk3btKC4U%2BgmFvPhhm4XC%2BeZs0eujvt03ZTS7fJvw6kZhMLidPfW%2B6S8epVaN%2B6lo3/Zk67nf6LG9rp9uvu3y3Nf22bTqHrd3N%2BfzCnbrrDZvOi0JNlc6/TvO1P7uYbZjv%2Bcwxu/ZlW%2Bhd5yy3%2Ba7t2k1/dqdfSe2r3il0pXtdfITumzLb6YudtMuvZsz1p8w%2B9/OnrrQ/tqVurmTt77NkIOVmKVbZHYmAsMwQKCN00ZNsoLWgGng5SIJfS%2BY9gwwi4uJcrgyF6PFYilBVj3Obb3QVcCkhAcGZrKCLS4/Lskjs0qNMTRu7/IBplQBmP7A2QYiuQMmuJl/%2BApudIjGUFKm6tzQh06XLk9SExNu5JRTFzEdIzQMtuoN0SSy5xyEtgBb5EesebEZMn4A4zWVJsBSW4B9iK36aivlcHW8eQOBhBDYCSCREJCywlYmgHBUUiRpVq%2BAuZp4AeRPRYriVSJnmPsfSzpPwcNULTcFO/gP2nYcSru9PsZo%2Bl%2BlTCIvCs5yC0HJ4PFJIi8PcVi/Q3OUZD0LgbMAKkrGalJpIMXNrq7iKq4Bg5PwhGgT6f9FOsJojMRPpOj/Y47YLrWmP1rwPYo2BJQXPcRlGS%2B561qwI0LPHyh4/xAFTo6x5aLOtqjWvNh2M1R5Ne3//DQ%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=1ZPfbpswFIffBU27GuH/GiJFE41NFNZjCrGpyB0BQ8EJRIEUStV3nzvtYq8QyUc6lqxz9Pv0%2BUNp%2BTQ81a3oldWHgr09ZXtlpbwOw6Vfado5a7OKn3k7LLL5duWLvDtr/e3Y59f6MtRd22v60Sh/2g%2BGahxLXbWLIlMznltqfnTNB7PUXcfVtcu1e6sLfu01qPNr13flsPjN35Psdhq0gp/4wIu/l/5XdqnVN/lSDl%2BbuuGqujzG92%2B9kBs7wds1E8lLnAQ0ZrFPccL2zA2f2ImVaGcAzS1oxAgoGkkDJlBhhfR1SeZgA6hyCGJTRA8bgqqJIGHJmkIcbGO2s4nATjTv1sqPfyDMOydhkiY3CMVOSHcyuWeT5nEJItkSkTpkTq2Y%2BkgSGWMqTJjZDBSPIUtnSceORPpF4gV/KXHvJCygnvSg0glKZR85gPwlYQECHYwYHbBML33AUySwHdLAJyiRZKI5pMkGBPznBGbe8517IX9IZZHGew9RpQNlMiVZyuQTMBij%2BbAFlDxKX8wYBz7gxAdUSGewA4LNkc7WyufnHw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZTRbtowFIbfBU27Go0NpFUqVVPpbLq0Cd2JfcJyZ4gZ1EkISWiBqu%2B%2BQztp74DkmyMf2dKn7/fepXdd4/ryrW967eeuE2UTnrXvVXX1e2155WmMn9saavuwhx3jb1YbEqv3c3bRbOuu/Wmaj0258vL0RXv8/mS9Ud5bvrGLob9xTwYXA2WLPAD5tXN5mWd26b1ovWi2bSbZXfxYA9odkXn5bawnc0/hva7qdf9F9qkx28GjAd9Rod/dI6%2BnHjbHWjymCXJXs0PJvpIntAGaJ2mQbMUHPtK7bHucQShNsrhOeI%2BVtQ4RMI7isNY6u5SGdFbMvXkeJggItXcHEMk9UPXdZj2pda4RQm7YHuE3CBmAuIUeJIqTFa5zeo2E3v2z9gg3MkhrMVEdMHldZhrAOdHWFqiJhGjG0RNjjLE5ws9kQoIyJCKXhCXd%2Brqq4iGTYwq4kg3GsHD6ADqT6JpeI8FQs0Khlbp4%2BqrOOI8W2qgObfI1VA8otLUjROAN2RFAsjApa6GCJRkK7wnHN5mQmYghAHNauziIfE6UOxE7A7ESu4fTzHaAbCDFdTW8ZDEik8iQQUTRA/T9F0wLikOTGMOFW1AedLdFliyv2dLhAjEZyi%2BoRSMJ12krht9X9uOjnDaJ5MG0%2BtwyGVW0hlts2OYyovKrO0CyMuG3RkXpmTWTgB4YtM5DF8RvMO9Og1dRmZ5kvaB4uhNkcy7f39Lw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=1ZLhbqMwDMffBU336SiB0q1Uqk7tEqrulqCkCdPdNxrCRqBQETrRTHv3S6d7iUm2Jetv2fLP/vA6NY3PddcYb/Xhoc2Bi4O38t7G8WxWQXAquuJVnVQ3zgp7GdRM9qfAXI5GDvV5rPvOBOAYVvfxQ%2BiHxwr4cVkWfqHk3JfHJHqIKpAsEhCch/69LtVgAlzLoTd9Nc5%2Bq2teXNoxKFWrRlV%2BJeZXca79d1fpmq8jECY%2BcBb%2BuDONm9g3qluLJn9h%2BRNngqUc5eIgkuxZtKKC%2BxBzOceWAsybBYF4IrYBGWyXTDNEOdtmHAEG5UTg5kpFuqW6uWLEdlS3iOrNRK1cez/g4i%2BOYmIaBllcA8yjheEixhDssQ6TzFEMbEEZvBPTOATJABZognCGkcuzjNOHKkvEi/o9hLfncQc89umIsLW%2Be3%2BPF1S/mqJbbdU7CesqdP/7ghCCwzTXeY02pBHRzBmCK29z89/ response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-1otyb","name":"acctestkv-1otyb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-210712233959150277/providers/Microsoft.KeyVault/vaults/acctestkv-1otyb","location":"eastus","tags":{},"deletionDate":"2021-07-12T15:52:50Z","scheduledPurgeDate":"2021-10-10T15:52:50Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-zhinp","name":"acctestkv-zhinp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-210712231945473232/providers/Microsoft.KeyVault/vaults/acctestkv-zhinp","location":"eastus","tags":{},"deletionDate":"2021-07-12T15:32:46Z","scheduledPurgeDate":"2021-10-10T15:32:46Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvtest066","name":"acctestkvtest066","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-bcr-test066/providers/Microsoft.KeyVault/vaults/acctestkvtest066","location":"eastus","tags":{},"deletionDate":"2021-07-12T14:57:38Z","scheduledPurgeDate":"2021-10-10T14:57:38Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-j72w4","name":"acctestkv-j72w4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-210712215418618542/providers/Microsoft.KeyVault/vaults/acctestkv-j72w4","location":"eastus","tags":{},"deletionDate":"2021-07-12T14:00:17Z","scheduledPurgeDate":"2021-10-10T14:00:17Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-2ks2d","name":"acctestkv-2ks2d","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-210712213054907949/providers/Microsoft.KeyVault/vaults/acctestkv-2ks2d","location":"eastus","tags":{},"deletionDate":"2021-07-12T13:36:53Z","scheduledPurgeDate":"2021-10-10T13:36:53Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-x2jgqpt5kdqgon","name":"vault-x2jgqpt5kdqgon","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwpupqvja4gobkonv73qcxkvq2452us3532ekepw64rrq4qysgm3zy7g2stdlxsd2o/providers/Microsoft.KeyVault/vaults/vault-x2jgqpt5kdqgon","location":"eastus2","tags":{},"deletionDate":"2021-07-08T09:31:30Z","scheduledPurgeDate":"2021-10-06T09:31:30Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-rki3vwg3laz4kw","name":"vault-rki3vwg3laz4kw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgryiylivih4dvxo5xpmgt6ok5xdytoj5bc3u2dodjr6edlp6nx77als2ecrhytrbuj/providers/Microsoft.KeyVault/vaults/vault-rki3vwg3laz4kw","location":"eastus2","tags":{},"deletionDate":"2021-07-02T04:49:28Z","scheduledPurgeDate":"2021-09-30T04:49:28Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultw4re7tl4so75addmt","name":"envaultw4re7tl4so75addmt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnc7u5htdmdzi3kedhxemzunegg6l5mb3iad7z55iximttx4lwxadlwdaslniti5sx/providers/Microsoft.KeyVault/vaults/envaultw4re7tl4so75addmt","location":"eastus2","tags":{},"deletionDate":"2021-07-02T03:51:51Z","scheduledPurgeDate":"2021-09-30T03:51:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultajuv2dyqffs2pkyhg","name":"envaultajuv2dyqffs2pkyhg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtc5vvyjzqar2kpeezu6i3nauibxspwacxdqw5c6rvitu5n3ld4lclw5c7kallxnf6/providers/Microsoft.KeyVault/vaults/envaultajuv2dyqffs2pkyhg","location":"eastus2","tags":{},"deletionDate":"2021-07-02T03:48:03Z","scheduledPurgeDate":"2021-09-30T03:48:03Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault3-xkdkgezijeaev","name":"vault3-xkdkgezijeaev","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_disk_update_n6kzsnljdypmmweiz6qm2aueu7fzn2ef5o/providers/Microsoft.KeyVault/vaults/vault3-xkdkgezijeaev","location":"westcentralus","tags":{},"deletionDate":"2021-06-04T04:34:40Z","scheduledPurgeDate":"2021-09-02T04:34:40Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault-2gzm34b54diupt","name":"vault-2gzm34b54diupt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_w2fux6shjfobqknq2xyksvxhoa5jvejqdpmtx6lyry3g7r/providers/Microsoft.KeyVault/vaults/vault-2gzm34b54diupt","location":"westcentralus","tags":{},"deletionDate":"2021-06-04T04:32:47Z","scheduledPurgeDate":"2021-09-02T04:32:47Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault1-mnb4zh6ipuxxa","name":"vault1-mnb4zh6ipuxxa","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_3d6rbbh7sloxh3xszp53ihdzlsq427i6vpmvaz6/providers/Microsoft.KeyVault/vaults/vault1-mnb4zh6ipuxxa","location":"westcentralus","tags":{},"deletionDate":"2021-06-04T04:31:56Z","scheduledPurgeDate":"2021-09-02T04:31:56Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault2-hui4mlyw5spj3","name":"vault2-hui4mlyw5spj3","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_update_3d6rbbh7sloxh3xszp53ihdzlsq427i6vpmvaz6/providers/Microsoft.KeyVault/vaults/vault2-hui4mlyw5spj3","location":"westcentralus","tags":{},"deletionDate":"2021-06-04T04:31:56Z","scheduledPurgeDate":"2021-09-02T04:31:56Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westcentralus/deletedVaults/vault4-46wqop3ncxu43","name":"vault4-46wqop3ncxu43","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_disk_encryption_set_snapshot_ew6ioei5bdrndplxe4blmyww6jk43mdndgjev/providers/Microsoft.KeyVault/vaults/vault4-46wqop3ncxu43","location":"westcentralus","tags":{},"deletionDate":"2021-06-04T04:28:56Z","scheduledPurgeDate":"2021-09-02T04:28:56Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulth2gqk5h","name":"keyVaulth2gqk5h","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgoqzqwsik2m/providers/Microsoft.KeyVault/vaults/keyVaulth2gqk5h","location":"westus2","tags":{},"deletionDate":"2021-06-03T20:54:12Z","scheduledPurgeDate":"2021-09-01T20:54:12Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultpebu3ct","name":"keyVaultpebu3ct","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgi3trs63kij/providers/Microsoft.KeyVault/vaults/keyVaultpebu3ct","location":"westus2","tags":{},"deletionDate":"2021-06-03T20:53:30Z","scheduledPurgeDate":"2021-09-01T20:53:30Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZPdbpswFIDfBU27GsFOgYpI0dR2NlJaSHOwHcadE5xB%2bC04LU3Vd5%2fT7SkinZuj8yd9%2bs6H1apJP5VtNVqLD4vcJYwn1sIqtO7HheM0spV%2fVKNaPZPn06Bm%2b65xxtNu3A9lr8uuHR20wwffvcU23h2Q7ea5tKXa39j7XTC%2fnR9Q4AXI6YfutczVMDpRuR%2b6sTvo2aN6F%2fJUaydXtdIq%2f0rGn7Iv7VfTaZYv5wgHNjKBv38bK3Oxq1S7ZE1wypJJSJylvM4eBV0JXmUcRCY45h5Dk9hR0QCpJibgGCHvJUnzWDURYk0%2fRCQgW3a%2fVvVvl201RMTjrFrFEGqfNTqOiUcZE3FE%2bBur4QE4etuaekT7kHFYmX0%2bY2hp%2ffgPbH6FxHxI61hQjljaxxHCPk%2bLtaw6l9eGAF69bNIeBK3dCxHFPbJJC5BNQVkFgyKYZCRPZIUmLsQWKPXFP2JbkrAHEjO4e7pG0wIu0uJZhPt3ww0iHnB5jteCuIabEJFY0aSCBMIivJiZI48as0Ci2rv0K0qHhMVrIN4vhmENyCPZ%2bcu0CzeeXKFphtjlFytjGoZjTLDJDYFw4zJkzKKGWFqDEHzi2%2f6oiEfk%2bd6Ypm8YFmB%2blRiia9UANfOtMZPAxbTPz78%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-zguy2lc7e","name":"cli-test-kv-nr-zguy2lc7e","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruletekhzuw4stbaxjhxh6qr7ehe7asl6c4fwplc2rhqtln5p/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-zguy2lc7e","location":"eastus2","tags":{},"deletionDate":"2021-10-29T18:35:50Z","scheduledPurgeDate":"2022-01-27T18:35:50Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultkal3eofrmtgmnhnf2","name":"envaultkal3eofrmtgmnhnf2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgqo6pgnwiyohbkp53fatz6ppj6ffdta3olyul5cccprtdzm2fhyfqfejwx53ks7n5w/providers/Microsoft.KeyVault/vaults/envaultkal3eofrmtgmnhnf2","location":"eastus2","tags":{},"deletionDate":"2021-10-22T23:24:54Z","scheduledPurgeDate":"2022-01-20T23:24:54Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaulttpgn6wpjrtaoseog7","name":"envaulttpgn6wpjrtaoseog7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgs6fdionipruvleogj7xn54cnoqpxotikrrlygrxst5phkon3ykaisiuv6iym4l3d7/providers/Microsoft.KeyVault/vaults/envaulttpgn6wpjrtaoseog7","location":"eastus2","tags":{},"deletionDate":"2021-10-22T23:20:20Z","scheduledPurgeDate":"2022-01-20T23:20:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ulanmmfwa","name":"cli-test-kv-nr-ulanmmfwa","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulezgwojbl4mwrmokyusythamaslfd27xkprugvsmwcu3l3z/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ulanmmfwa","location":"eastus2","tags":{},"deletionDate":"2021-10-22T18:35:03Z","scheduledPurgeDate":"2022-01-20T18:35:03Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultahheun4","name":"keyVaultahheun4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgrbou72eucr/providers/Microsoft.KeyVault/vaults/keyVaultahheun4","location":"westus2","tags":{},"deletionDate":"2021-09-02T20:57:08Z","scheduledPurgeDate":"2021-12-01T20:57:08Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultsqjsrc2","name":"keyVaultsqjsrc2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgor4sjcgzro/providers/Microsoft.KeyVault/vaults/keyVaultsqjsrc2","location":"westus2","tags":{},"deletionDate":"2021-09-02T20:56:22Z","scheduledPurgeDate":"2021-12-01T20:56:22Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskvgrouwlusv6e4","name":"cliakskvgrouwlusv6e4","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestrqwbopqrjs/providers/Microsoft.KeyVault/vaults/cliakskvgrouwlusv6e4","location":"westus2","tags":{},"deletionDate":"2021-09-02T19:33:43Z","scheduledPurgeDate":"2021-12-01T19:33:43Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulto6qy7i7","name":"keyVaulto6qy7i7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rglraazhqszu/providers/Microsoft.KeyVault/vaults/keyVaulto6qy7i7","location":"westus2","tags":{},"deletionDate":"2021-08-26T20:50:31Z","scheduledPurgeDate":"2021-11-24T20:50:31Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultcaor4un","name":"keyVaultcaor4un","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgy6mbadvydb/providers/Microsoft.KeyVault/vaults/keyVaultcaor4un","location":"westus2","tags":{},"deletionDate":"2021-08-26T20:50:16Z","scheduledPurgeDate":"2021-11-24T20:50:16Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3VDbboJAFPwX0vSpyIJQxYQ0NrtNsB6MK4vxkcticRUIu0pZ47%2bX%2bBlNzjzMZDKTOXej5r9qXdVCGou7QZa7mO0cY2H8KNXKhWVd0jo98guv1STV145P8uZiyWsm865qVdXU0kKZXb67M9u0sxKZblGkZsrzqZlnvjNzSuR7PrLarrlVBe%2bkBVXeNbIp1eSbD0l6PSur4GeuePEk8iNtK%2fM2OsfwwEG2b6Lx7NcXKcbGRvA6YCLZ02QVU0a%2fYpKwHfM3a3ZmJQ5tiHMn0jAFvfSiU9hDLEaNzkEQN9LLAU6hu8FgR4RiigWK0KHfohBtdfEZ4aNHGQTGm7En%2f%2bET0%2bfaOHdBh2iDw3F9Mqengzei32oyAAv7iMBAReiBznsqVhgw6IiwHhALjMfjDw%3d%3d"}' headers: cache-control: no-cache - content-length: '2586' + content-length: '1706' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:40 GMT + date: Thu, 11 Nov 2021 03:24:30 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 042a300c-b2ac-49f3-a9b8-5adcbcb9ec15 + x-ms-original-request-ids: 89a5a1e1-9338-4ed7-823c-1b0c3ce95216 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZTRbtowFIbfBU27Go0NpFUqVVPpbLq0Cd2JfcJyZ4gZ1EkISWiBqu%2B%2BQztp74DkmyMf2dKn7//fepXdd4/ryrW967eeuE2UTnrXvVXX1e2155WmMn9saavuwhx3jb1YbEqv3c3bRbOuu/Wmaj0258vL0RXv8/mS9Ud5bvrGLob9xTwYXA2WLPAD5tXN5mWd26b1ovWi2bSbZXfxYA9odkXn5bawnc0/hva7qdf9F9qkx28GjAd9Rod//dI6%2BnHjbHWjymCXJXs0PJvpIntAGaJ2mQbMUHPtK7bHucQShNsrhOeI%2BVtQ4RMI7isNY6u5SGdFbMvXkeJggItXcHEMk9UPXdZj2pda4RQm7YHuE3CBmAuIUeJIqTFa5zeo2E3v2z9gg3MkhrMVEdMHldZhrAOdHWFqiJhGjG0RNjjLE5ws9kQoIyJCKXhCXd%2Brqq4iGTYwq4kg3GsHD6ADqT6JpeI8FQs0Khlbp4%2BqrOOI8W2qgObfI1VA8otLUjROAN2RFAsjApa6GCJRkK7wnHN5mQmYghAHNauziIfE6UOxE7A7ESu4fTzHaAbCDFdTW8ZDEik8iQQUTRA/T9F0wLikOTGMOFW1AedLdFliyv2dLhAjEZyi%2BoRSMJ12krht9X9uOjnDaJ5MG0%2BtwyGVW0hlts2OYyovKrO0CyMuG3RkXpmTWTgB4YtM5DF8RvMO9Og1dRmZ5kvaB4uhNkcy7f39Lw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=1ZLhbqMwDMffBU336SiB0q1Uqk7tEqrulqCkCdPdNxrCRqBQETrRTHv3S6d7iUm2Jetv2fLP/vA6NY3PddcYb/Xhoc2Bi4O38t7G8WxWQXAquuJVnVQ3zgp7GdRM9qfAXI5GDvV5rPvOBOAYVvfxQ%2BiHxwr4cVkWfqHk3JfHJHqIKpAsEhCch/69LtVgAlzLoTd9Nc5%2Bq2teXNoxKFWrRlV%2BJeZXca79d1fpmq8jECY%2BcBb%2BuDONm9g3qluLJn9h%2BRNngqUc5eIgkuxZtKKC%2BxBzOceWAsybBYF4IrYBGWyXTDNEOdtmHAEG5UTg5kpFuqW6uWLEdlS3iOrNRK1cez//g4i%2BOYmIaBllcA8yjheEixhDssQ6TzFEMbEEZvBPTOATJABZognCGkcuzjNOHKkvEi/o9hLfncQc89umIsLW%2Be3%2BPF1S/mqJbbdU7CesqdP/7ghCCwzTXeY02pBHRzBmCK29z89/ - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZPdbpswFIDfBU27GsFOgYpI0dR2NlJaSHOwHcadE5xB%2BC04LU3Vd5/T7SkinZuj8yd9%2Bs6H1apJP5VtNVqLD4vcJYwn1sIqtO7HheM0spV/VKNaPZPn06Bm%2B65xxtNu3A9lr8uuHR20wwffvcU23h2Q7ea5tKXa39j7XTC/nR9Q4AXI6YfutczVMDpRuR%2B6sTvo2aN6F/JUaydXtdIq/0rGn7Iv7VfTaZYv5wgHNjKBv38bK3Oxq1S7ZE1wypJJSJylvM4eBV0JXmUcRCY45h5Dk9hR0QCpJibgGCHvJUnzWDURYk0/RCQgW3a/VvVvl201RMTjrFrFEGqfNTqOiUcZE3FE%2BBur4QE4etuaekT7kHFYmX0%2BY2hp/fgPbH6FxHxI61hQjljaxxHCPk%2BLtaw6l9eGAF69bNIeBK3dCxHFPbJJC5BNQVkFgyKYZCRPZIUmLsQWKPXFP2JbkrAHEjO4e7pG0wIu0uJZhPt3ww0iHnB5jteCuIabEJFY0aSCBMIivJiZI48as0Ci2rv0K0qHhMVrIN4vhmENyCPZ%2Bcu0CzeeXKFphtjlFytjGoZjTLDJDYFw4zJkzKKGWFqDEHzi2/6oiEfk%2Bd6Ypm8YFmB%2BlRiia9UANfOtMZPAxbTPz78%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3VDbboJAFPwX0vSpyIJQxYQ0NrtNsB6MK4vxkcticRUIu0pZ47%2BX%2BBlNzjzMZDKTOXej5r9qXdVCGou7QZa7mO0cY2H8KNXKhWVd0jo98guv1STV145P8uZiyWsm865qVdXU0kKZXb67M9u0sxKZblGkZsrzqZlnvjNzSuR7PrLarrlVBe%2BkBVXeNbIp1eSbD0l6PSur4GeuePEk8iNtK/M2OsfwwEG2b6Lx7NcXKcbGRvA6YCLZ02QVU0a/YpKwHfM3a3ZmJQ5tiHMn0jAFvfSiU9hDLEaNzkEQN9LLAU6hu8FgR4RiigWK0KHfohBtdfEZ4aNHGQTGm7En/%2BET0%2BfaOHdBh2iDw3F9Mqengzei32oyAAv7iMBAReiBznsqVhgw6IiwHhALjMfjDw%3D%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv-9c897","name":"acctestkv-9c897","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-210712211651892258/providers/Microsoft.KeyVault/vaults/acctestkv-9c897","location":"eastus","tags":{},"deletionDate":"2021-07-12T13:29:52Z","scheduledPurgeDate":"2021-10-10T13:29:52Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvtest01224445","name":"acctestkvtest01224445","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-bcr-test01/providers/Microsoft.KeyVault/vaults/acctestkvtest01224445","location":"eastus","tags":{},"deletionDate":"2021-07-12T12:44:58Z","scheduledPurgeDate":"2021-10-10T12:44:58Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvtest0122444","name":"acctestkvtest0122444","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-bcr-test01/providers/Microsoft.KeyVault/vaults/acctestkvtest0122444","location":"eastus","tags":{},"deletionDate":"2021-07-12T11:05:50Z","scheduledPurgeDate":"2021-10-10T11:05:50Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvtest0222","name":"acctestkvtest0222","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-bcr-test0222/providers/Microsoft.KeyVault/vaults/acctestkvtest0222","location":"eastus","tags":{},"deletionDate":"2021-07-12T08:04:12Z","scheduledPurgeDate":"2021-10-10T08:04:12Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvtest012","name":"acctestkvtest012","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-bcr-test01/providers/Microsoft.KeyVault/vaults/acctestkvtest012","location":"eastus","tags":{},"deletionDate":"2021-07-12T07:39:21Z","scheduledPurgeDate":"2021-10-10T07:39:21Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-6btmpck27slmqy","name":"vault-6btmpck27slmqy","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwpwtkbdsmkzssufxfx3dzzdirxurdbilufo3fap5w7ndoa5fjedawmxsqi5ufz7ei/providers/Microsoft.KeyVault/vaults/vault-6btmpck27slmqy","location":"eastus2","tags":{},"deletionDate":"2021-06-28T15:25:37Z","scheduledPurgeDate":"2021-09-26T15:25:37Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultphpcgqdsfln3rfk3u","name":"envaultphpcgqdsfln3rfk3u","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgb2pzt7oziratao6yhu6fjy7orvn5v3nce7gyfpv533ldmn2n35rjg2i5w4se64kxg/providers/Microsoft.KeyVault/vaults/envaultphpcgqdsfln3rfk3u","location":"eastus2","tags":{},"deletionDate":"2021-06-28T14:03:08Z","scheduledPurgeDate":"2021-09-26T14:03:08Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultsiwm4bzrs5ddydh7k","name":"envaultsiwm4bzrs5ddydh7k","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgdjd7dwl4ggiqxfyjz4btb7jkompgh62ipzofpy4uiseccr3jvib7vnphsvl5o22we/providers/Microsoft.KeyVault/vaults/envaultsiwm4bzrs5ddydh7k","location":"eastus2","tags":{},"deletionDate":"2021-06-28T13:56:02Z","scheduledPurgeDate":"2021-09-26T13:56:02Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-ztmbhkjwfgea6s","name":"vault-ztmbhkjwfgea6s","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgm4k2bdoff24ruty5tlqrrylsmvxqaygsu2yrqqqpndbere3qnvkq6zmbbghiyy4ng/providers/Microsoft.KeyVault/vaults/vault-ztmbhkjwfgea6s","location":"eastus2","tags":{},"deletionDate":"2021-06-25T04:23:43Z","scheduledPurgeDate":"2021-09-23T04:23:43Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3dBtS8MwEAfw71LEV3ZNtnajgyG%2byIabrSNNrrXv%2bpBpTR9ik%2bmm7LsbxU8hHBwHd%2f%2bD35fTi5N5aHqpneWXQ%2b4SxhNn6bwYo%2fTS87qiL55FJ3ozKT6Po5hUQ%2bfpY6mrsVGmGXrtoRIf5v4Cu7g8INev68ItRDVzqzKcLqYHFAYh8tQ4vDe1GLUXNdU46OFgJjtxhuLYGq8WrTCi%2fh30baEa991u2vDVFOHQRbbw9ZWW9uMgRb9iXXjMkxMUOM94m%2b9gvQUuc04hB455wNAJyjV0lMgTA%2foaoeAtydpHIO2cITrGJCD5TMWUDD7rVUpb8pFK2MOmDhhAHMmAgNwmlOcblql1hNdgu73nHzxTY23zOEMr5%2bYPbPoPxeZPs%2foRNtEn61QckZCnWRsLee%2bz1FArNCbMigE%2fc6B9xAOSyjimG42s8EARfksk3QNvfYZgKwgG%2biN2uXwD"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-5xkr54nxc","name":"cli-test-kv-nr-5xkr54nxc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulezgwojbl4mwrmokyusythamaslfd27xkprugvsmwcu3l3z/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-5xkr54nxc","location":"eastus2","tags":{},"deletionDate":"2021-10-22T18:35:03Z","scheduledPurgeDate":"2022-01-20T18:35:03Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-dxmhcnsvy","name":"cli-test-kv-nr-dxmhcnsvy","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulezgwojbl4mwrmokyusythamaslfd27xkprugvsmwcu3l3z/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-dxmhcnsvy","location":"eastus2","tags":{},"deletionDate":"2021-10-22T18:35:03Z","scheduledPurgeDate":"2022-01-20T18:35:03Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-dmntgqz3l","name":"cli-test-kv-nr-dmntgqz3l","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulezgwojbl4mwrmokyusythamaslfd27xkprugvsmwcu3l3z/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-dmntgqz3l","location":"eastus2","tags":{},"deletionDate":"2021-10-22T18:35:02Z","scheduledPurgeDate":"2022-01-20T18:35:02Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-5g3qp7s6n","name":"cli-test-kv-nr-5g3qp7s6n","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulezgwojbl4mwrmokyusythamaslfd27xkprugvsmwcu3l3z/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-5g3qp7s6n","location":"eastus2","tags":{},"deletionDate":"2021-10-22T18:34:32Z","scheduledPurgeDate":"2022-01-20T18:34:32Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulttcpmkep","name":"keyVaulttcpmkep","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgfd3ddrlebj/providers/Microsoft.KeyVault/vaults/keyVaulttcpmkep","location":"westus2","tags":{},"deletionDate":"2021-08-26T20:49:35Z","scheduledPurgeDate":"2021-11-24T20:49:35Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskvmkhkyt5dhyjf","name":"cliakskvmkhkyt5dhyjf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestgree2zhlhi/providers/Microsoft.KeyVault/vaults/cliakskvmkhkyt5dhyjf","location":"westus2","tags":{},"deletionDate":"2021-08-26T19:28:15Z","scheduledPurgeDate":"2021-11-24T19:28:15Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaulttun5diw","name":"keyVaulttun5diw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgnr4ehdfgei/providers/Microsoft.KeyVault/vaults/keyVaulttun5diw","location":"westus2","tags":{},"deletionDate":"2021-08-19T20:48:18Z","scheduledPurgeDate":"2021-11-17T20:48:18Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultz2yrtyn","name":"keyVaultz2yrtyn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4dtcg4z7mo/providers/Microsoft.KeyVault/vaults/keyVaultz2yrtyn","location":"westus2","tags":{},"deletionDate":"2021-08-19T20:47:04Z","scheduledPurgeDate":"2021-11-17T20:47:04Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/keyVaultvk3fdop","name":"keyVaultvk3fdop","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgc3ywvimwdb/providers/Microsoft.KeyVault/vaults/keyVaultvk3fdop","location":"westus2","tags":{},"deletionDate":"2021-08-19T20:46:20Z","scheduledPurgeDate":"2021-11-17T20:46:20Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZBba4MwAIX%2fSxh7mvXatRZktEscdk2KNrHs0Ut0GqvFpDdL%2f%2fukP2NwXg4cvgPfHbT8qjZVKyRY3AFa7ijbWWABfpU6yoWuH5I2KfmBt2qSDKeeT7LuoMtTKrO%2bOqqqa6VupGbx7sxMzUwLQ3PyPNESntlalrrWzCoMd%2boa%2brHvzlXOe6njKus72RVq8s1vcXJqlJ7zhiueP4v8SI6Vdh6XI9yzDNPVjDHm64sU42MneOsxEe%2bjeE0jFvkUxWzH3O2GNayAgYlpZpEB23hANzKUFwzL65Y28witfSLYEFJsErp0CAwtLNBAajwlNLhgRL5IvYIhDTzwBvboP5iwcV1OydMAc0YbFqnX85CuPrcwRgT6kKDgShC%2bEBE44fBjRnVgh3W0wtSHkUAeeDz%2bAA%3d%3d"}' headers: cache-control: no-cache - content-length: '1738' + content-length: '1467' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:40 GMT + date: Thu, 11 Nov 2021 03:24:31 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 0ba2f79c-581e-4eb2-9c09-166303f15afa + x-ms-original-request-ids: a0b2fa05-2502-4d38-95fc-3a1f603a62a7 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZPdbpswFIDfBU27GsFOgYpI0dR2NlJaSHOwHcadE5xB%2BC04LU3Vd5/T7SkinZuj8yd9%2Bs6H1apJP5VtNVqLD4vcJYwn1sIqtO7HheM0spV/VKNaPZPn06Bm%2B65xxtNu3A9lr8uuHR20wwffvcU23h2Q7ea5tKXa39j7XTC/nR9Q4AXI6YfutczVMDpRuR%2B6sTvo2aN6F/JUaydXtdIq/0rGn7Iv7VfTaZYv5wgHNjKBv38bK3Oxq1S7ZE1wypJJSJylvM4eBV0JXmUcRCY45h5Dk9hR0QCpJibgGCHvJUnzWDURYk0/RCQgW3a/VvVvl201RMTjrFrFEGqfNTqOiUcZE3FE%2BBur4QE4etuaekT7kHFYmX0%2BY2hp/fgPbH6FxHxI61hQjljaxxHCPk%2BLtaw6l9eGAF69bNIeBK3dCxHFPbJJC5BNQVkFgyKYZCRPZIUmLsQWKPXFP2JbkrAHEjO4e7pG0wIu0uJZhPt3ww0iHnB5jteCuIabEJFY0aSCBMIivJiZI48as0Ci2rv0K0qHhMVrIN4vhmENyCPZ%2Bcu0CzeeXKFphtjlFytjGoZjTLDJDYFw4zJkzKKGWFqDEHzi2/6oiEfk%2Bd6Ypm8YFmB%2BlRiia9UANfOtMZPAxbTPz78%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3VDbboJAFPwX0vSpyIJQxYQ0NrtNsB6MK4vxkcticRUIu0pZ47%2BX%2BBlNzjzMZDKTOXej5r9qXdVCGou7QZa7mO0cY2H8KNXKhWVd0jo98guv1STV145P8uZiyWsm865qVdXU0kKZXb67M9u0sxKZblGkZsrzqZlnvjNzSuR7PrLarrlVBe%2BkBVXeNbIp1eSbD0l6PSur4GeuePEk8iNtK/M2OsfwwEG2b6Lx7NcXKcbGRvA6YCLZ02QVU0a/YpKwHfM3a3ZmJQ5tiHMn0jAFvfSiU9hDLEaNzkEQN9LLAU6hu8FgR4RiigWK0KHfohBtdfEZ4aNHGQTGm7En/%2BET0%2BfaOHdBh2iDw3F9Mqengzei32oyAAv7iMBAReiBznsqVhgw6IiwHhALjMfjDw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dBtS8MwEAfw71LEV3ZNtnajgyG%2ByIabrSNNrrXv%2BpBpTR9ik%2Bmm7LsbxU8hHBwHd/%2BD35fTi5N5aHqpneWXQ%2B4SxhNn6bwYo/TS87qiL55FJ3ozKT6Po5hUQ%2BfpY6mrsVGmGXrtoRIf5v4Cu7g8INev68ItRDVzqzKcLqYHFAYh8tQ4vDe1GLUXNdU46OFgJjtxhuLYGq8WrTCi/h30baEa991u2vDVFOHQRbbw9ZWW9uMgRb9iXXjMkxMUOM94m%2B9gvQUuc04hB455wNAJyjV0lMgTA/oaoeAtydpHIO2cITrGJCD5TMWUDD7rVUpb8pFK2MOmDhhAHMmAgNwmlOcblql1hNdgu73nHzxTY23zOEMr5%2BYPbPoPxeZPs/oRNtEn61QckZCnWRsLee%2Bz1FArNCbMigE/c6B9xAOSyjimG42s8EARfksk3QNvfYZgKwgG%2BiN2uXwD + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZBba4MwAIX/Sxh7mvXatRZktEscdk2KNrHs0Ut0GqvFpDdL/ukP2NwXg4cvgPfHbT8qjZVKyRY3AFa7ijbWWABfpU6yoWuH5I2KfmBt2qSDKeeT7LuoMtTKrO%2BOqqqa6VupGbx7sxMzUwLQ3PyPNESntlalrrWzCoMd%2Boa%2BrHvzlXOe6njKus72RVq8s1vcXJqlJ7zhiueP4v8SI6Vdh6XI9yzDNPVjDHm64sU42MneOsxEe%2BjeE0jFvkUxWzH3O2GNayAgYlpZpEB23hANzKUFwzL65Y28witfSLYEFJsErp0CAwtLNBAajwlNLhgRL5IvYIhDTzwBvboP5iwcV1OydMAc0YbFqnX85CuPrcwRgT6kKDgShC%2BEBE44fBjRnVgh3W0wtSHkUAeeDz%2BAA%3D%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvtest011","name":"acctestkvtest011","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-bcr-test01/providers/Microsoft.KeyVault/vaults/acctestkvtest011","location":"eastus","tags":{},"deletionDate":"2021-07-12T07:07:40Z","scheduledPurgeDate":"2021-10-10T07:07:40Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultvrfhm54","name":"cmk-test-keyvaultvrfhm54","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgw6vqg3y3ork4f6izzjmkv5i5n5od4fncyq3aihetllx57vys72pge25eb7cyjwp5d/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultvrfhm54","location":"eastus","tags":{},"deletionDate":"2021-07-12T07:00:14Z","scheduledPurgeDate":"2021-10-10T07:00:14Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaulthcp7e3w","name":"cmk-test-keyvaulthcp7e3w","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg5t3qiydpruwwomffhrnjwpns76ml7g6qqvxa7vnkfnz5dbjp7ye5mduaanngad324/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaulthcp7e3w","location":"eastus","tags":{},"deletionDate":"2021-07-12T05:14:16Z","scheduledPurgeDate":"2021-10-10T05:14:16Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-zx5wgqd","name":"cli-test-kv-mgmt-zx5wgqd","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtb4ptrcy3iuts553hhwwtch22id4anm7atr46jinrh3ngm46ygfz6h/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-zx5wgqd","location":"eastus","tags":{},"deletionDate":"2021-07-08T22:17:51Z","scheduledPurgeDate":"2021-10-06T22:17:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultgghihvp","name":"cmk-test-keyvaultgghihvp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rge264zdtl73kgaqtcvnellcwthq3lwbxfujqnegatuetffgx7yx4ijpgmojtiuhncj/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultgghihvp","location":"eastus","tags":{},"deletionDate":"2021-07-08T19:12:51Z","scheduledPurgeDate":"2021-10-06T19:12:51Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultw4k6dt7wb5mqhq23z","name":"envaultw4k6dt7wb5mqhq23z","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtyplklr6zcbmydo5wvodgkcwthamvimehxb7tlkgjolxbmj7cmfuuetut36w4i44d/providers/Microsoft.KeyVault/vaults/envaultw4k6dt7wb5mqhq23z","location":"eastus2","tags":{},"deletionDate":"2021-06-25T03:25:37Z","scheduledPurgeDate":"2021-09-23T03:25:37Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultvgdzqroo3sjwv6iun","name":"envaultvgdzqroo3sjwv6iun","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgedywzz3br33z7okdwyeglaq4intnqaj46ty4k5ax6ibvrjsz5wyy7tnafbiohdb55/providers/Microsoft.KeyVault/vaults/envaultvgdzqroo3sjwv6iun","location":"eastus2","tags":{},"deletionDate":"2021-06-25T03:18:21Z","scheduledPurgeDate":"2021-09-23T03:18:21Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-4e4r4qlipnjlah","name":"vault-4e4r4qlipnjlah","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4inghspexm5gup2pvx7ahitwsl4ryeihchr54iktfqeyqoejcccufmxpxiydnadtc/providers/Microsoft.KeyVault/vaults/vault-4e4r4qlipnjlah","location":"eastus2","tags":{},"deletionDate":"2021-06-18T04:53:08Z","scheduledPurgeDate":"2021-09-16T04:53:08Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3dDRbqMwEAXQf0GrPpVgZyEVkaJVqeytSKEbY09T3gw4G4oBB5MqS9V%2fL636FSvNy9WM5krnzenUZXyou8Y66zeH3GZcZM7aOY6jsWvPa2Un%2f6pWdeNCTudBLcq%2b9ey5sOVQm7HuO%2buhAh9W%2fg12cXFArl9V0pWq%2fOmWRbi8WR5QGITIM0P%2fWldqsF5Sl0Nv%2b8O42Kp%2fIM969Cql1aiqr2B%2fSVO7r%2fPl%2fHyzRDh00Tz46odt5sa%2bUd2Gt%2bE5zy4gcb4XOt8CjUE0uWCQg8Ai4OgCBYWWkebCgb0kKDjBXv8Boucdi1IRrHacPTLi%2bwJYpDQ9ZTxOGYnveWto0gSE8yhV7ZGIJxMlIhByilOpdSAa9sR0LDhHG%2bf6G2z5%2f4mFhO%2bPqdLwKUYTglf5xFKgvc8xgwrHpx1PU%2fidTFyz7Q4F5HmKmGrtxDsTKUqB703GqKGz2B2DmOTTLPb%2b%2fgE%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultokzkh3sbsypkewfwn","name":"envaultokzkh3sbsypkewfwn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgrwiorrkqmciqmwct25phokmpczlzsjluuxamj3h3ciqmdjmqiautdumewfj22cjg6/providers/Microsoft.KeyVault/vaults/envaultokzkh3sbsypkewfwn","location":"eastus2","tags":{},"deletionDate":"2021-10-22T15:43:26Z","scheduledPurgeDate":"2022-01-20T15:43:26Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envault2urvt7i5bh6lptl4l","name":"envault2urvt7i5bh6lptl4l","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rghztske4yrt7bh3u3feue3blt7r3gphs57kkywvyzoxrhwtcwb77jvtljauoccgbdm/providers/Microsoft.KeyVault/vaults/envault2urvt7i5bh6lptl4l","location":"eastus2","tags":{},"deletionDate":"2021-10-22T15:19:20Z","scheduledPurgeDate":"2022-01-20T15:19:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus2/deletedVaults/cliakskv7hlxmbm2g67r","name":"cliakskv7hlxmbm2g67r","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitestwnw54i6ski/providers/Microsoft.KeyVault/vaults/cliakskv7hlxmbm2g67r","location":"westus2","tags":{},"deletionDate":"2021-08-19T19:49:47Z","scheduledPurgeDate":"2021-11-17T19:49:47Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZBfb4IwFMW%2fS7PsaUhB3MSELCOths1CrBQz3%2fhTEKtgaFXE%2bN3X7WMsOQ%2fnJufem9%2b5g4b3alk3QoLZHeCPdczWNpiBnVInOTPNY9qkFT%2fyRo3S4dzxUd4eTXnOZN7VJ1W3jTRhZpWvzptlWFkJDacoUiPl%2bdjIM9d%2bs0voTlxonrr2Uhe8kyap866VbalGX%2fyWpOeDMgt%2b4IoXf4N8T0%2b1cdFJfdyzoeUaUMt6fpJCf2wFbzwmkg1NPmPK6DzGCVszN1qyAytRYJE4t8OBOCGqhij%2btsi%2bupJhN6VIXAkMbhGqIBFBH6ItIgzDEFNMxdbXvqdxPug9D7yADf4PTYw1%2fSRCQU%2f22CaDJke7KRG%2fxKFP8XyhyVGIA7iC%2bLpiKycctn4Ua7%2f3FxQzDzwePw%3d%3d"}' headers: cache-control: no-cache - content-length: '1922' + content-length: '1228' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:40 GMT + date: Thu, 11 Nov 2021 03:24:31 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: ec9ce532-c8a5-4d1a-8846-ec31462704bc + x-ms-original-request-ids: d4a1773d-bb96-4047-a1a9-a8002d788499 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dBtS8MwEAfw71LEV3ZNtnajgyG%2ByIabrSNNrrXv%2BpBpTR9ik%2Bmm7LsbxU8hHBwHd/%2BD35fTi5N5aHqpneWXQ%2B4SxhNn6bwYo/TS87qiL55FJ3ozKT6Po5hUQ%2BfpY6mrsVGmGXrtoRIf5v4Cu7g8INev68ItRDVzqzKcLqYHFAYh8tQ4vDe1GLUXNdU46OFgJjtxhuLYGq8WrTCi/h30baEa991u2vDVFOHQRbbw9ZWW9uMgRb9iXXjMkxMUOM94m%2B9gvQUuc04hB455wNAJyjV0lMgTA/oaoeAtydpHIO2cITrGJCD5TMWUDD7rVUpb8pFK2MOmDhhAHMmAgNwmlOcblql1hNdgu73nHzxTY23zOEMr5%2BYPbPoPxeZPs/oRNtEn61QckZCnWRsLee%2Bz1FArNCbMigE/c6B9xAOSyjimG42s8EARfksk3QNvfYZgKwgG%2BiN2uXwD + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZBba4MwAIX/Sxh7mvXatRZktEscdk2KNrHs0Ut0GqvFpDdL//ukP2NwXg4cvgPfHbT8qjZVKyRY3AFa7ijbWWABfpU6yoWuH5I2KfmBt2qSDKeeT7LuoMtTKrO%2BOqqqa6VupGbx7sxMzUwLQ3PyPNESntlalrrWzCoMd%2Boa%2BrHvzlXOe6njKus72RVq8s1vcXJqlJ7zhiueP4v8SI6Vdh6XI9yzDNPVjDHm64sU42MneOsxEe%2BjeE0jFvkUxWzH3O2GNayAgYlpZpEB23hANzKUFwzL65Y28witfSLYEFJsErp0CAwtLNBAajwlNLhgRL5IvYIhDTzwBvboP5iwcV1OydMAc0YbFqnX85CuPrcwRgT6kKDgShC%2BEBE44fBjRnVgh3W0wtSHkUAeeDz%2BAA%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dDRbqMwEAXQf0GrPpVgZyEVkaJVqeytSKEbY09T3gw4G4oBB5MqS9V/L636FSvNy9WM5krnzenUZXyou8Y66zeH3GZcZM7aOY6jsWvPa2Un/6pWdeNCTudBLcq%2B9ey5sOVQm7HuO%2BuhAh9W/g12cXFArl9V0pWq/OmWRbi8WR5QGITIM0P/WldqsF5Sl0Nv%2B8O42Kp/IM969Cql1aiqr2B/SVO7r/Pl/HyzRDh00Tz46odt5sa%2BUd2Gt%2BE5zy4gcb4XOt8CjUE0uWCQg8Ai4OgCBYWWkebCgb0kKDjBXv8Boucdi1IRrHacPTLi%2BwJYpDQ9ZTxOGYnveWto0gSE8yhV7ZGIJxMlIhByilOpdSAa9sR0LDhHG%2Bf6G2z5/4mFhO%2BPqdLwKUYTglf5xFKgvc8xgwrHpx1PU/idTFyz7Q4F5HmKmGrtxDsTKUqB703GqKGz2B2DmOTTLPb%2B/gE%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZBfb4IwFMW/S7PsaUhB3MSELCOths1CrBQz3/hTEKtgaFXE%2BN3X7WMsOQ/nJufem9%2B5g4b3alk3QoLZHeCPdczWNpiBnVInOTPNY9qkFT/yRo3S4dzxUd4eTXnOZN7VJ1W3jTRhZpWvzptlWFkJDacoUiPl%2BdjIM9d%2Bs0voTlxonrr2Uhe8kyap866VbalGX/yWpOeDMgt%2B4IoXf4N8T0%2B1cdFJfdyzoeUaUMt6fpJCf2wFbzwmkg1NPmPK6DzGCVszN1qyAytRYJE4t8OBOCGqhij%2Btsi%2BupJhN6VIXAkMbhGqIBFBH6ItIgzDEFNMxdbXvqdxPug9D7yADf4PTYw1/SRCQU/22CaDJke7KRG/xKFP8XyhyVGIA7iC%2BLpiKycctn4Ua7/3FxQzDzwePw%3D%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-jjdhuj7","name":"cli-test-kv-mgmt-jjdhuj7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtqvkx42xf26eqavxepzg4n55ic2pvbtxdsvvnlahjkw4cu4vldx24s/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-jjdhuj7","location":"eastus","tags":{},"deletionDate":"2021-07-01T22:42:37Z","scheduledPurgeDate":"2021-09-29T22:42:37Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvault5k4hwy3","name":"cmk-test-keyvault5k4hwy3","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg3y5howlltokdhqlmjrgqkox2u6qrvkm2nwg4k4xuhw4rmsywmaoehysbb3dn5pbwo/providers/Microsoft.KeyVault/vaults/cmk-test-keyvault5k4hwy3","location":"eastus","tags":{},"deletionDate":"2021-07-01T19:13:36Z","scheduledPurgeDate":"2021-09-29T19:13:36Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-27y3paf","name":"cli-test-kv-mgmt-27y3paf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtzcetinqffvdornwfnx74qje2syqcv5vfit2w7n6dyzo5us7xwdn7y/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-27y3paf","location":"eastus","tags":{},"deletionDate":"2021-06-28T10:55:50Z","scheduledPurgeDate":"2021-09-26T10:55:50Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultvbcxutl","name":"cmk-test-keyvaultvbcxutl","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgreya2ml4m5f76hdswv6hfciep5dsub2h4impc2crgu4fit34dj7g62dd4gb4s4lc3/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultvbcxutl","location":"eastus","tags":{},"deletionDate":"2021-06-28T06:36:27Z","scheduledPurgeDate":"2021-09-26T06:36:27Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-fpuzxon","name":"cli-test-kv-mgmt-fpuzxon","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtnkchztmio23bc4k4vpspzmo7e7pxim5iblintkq5bbrlxfts6bwcx/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-fpuzxon","location":"eastus","tags":{},"deletionDate":"2021-06-24T22:15:25Z","scheduledPurgeDate":"2021-09-22T22:15:25Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaults2mll72uagjafvmoj","name":"envaults2mll72uagjafvmoj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgxcc7qlxo7ose3rgg2pjzps3qo3ndcf4mcvxfhcr3gb2ajvqspkjwtpyq3otoroabl/providers/Microsoft.KeyVault/vaults/envaults2mll72uagjafvmoj","location":"eastus2","tags":{},"deletionDate":"2021-06-18T03:25:29Z","scheduledPurgeDate":"2021-09-16T03:25:29Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envault3232avqsykf3yicy6","name":"envault3232avqsykf3yicy6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgaa7ney6sag4f56ftm5rllq5bzjbgcold6t24dbvnwuqtebxu2euresgxt4jcufdru/providers/Microsoft.KeyVault/vaults/envault3232avqsykf3yicy6","location":"eastus2","tags":{},"deletionDate":"2021-06-18T03:21:55Z","scheduledPurgeDate":"2021-09-16T03:21:55Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-aaakyrmxymscsb","name":"vault-aaakyrmxymscsb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg4vnv3vq3iiff27hjj2rpvo7ioseprgdeymj6sxvdizx7cx37zyamjewexeev76apa/providers/Microsoft.KeyVault/vaults/vault-aaakyrmxymscsb","location":"eastus2","tags":{},"deletionDate":"2021-06-11T04:20:49Z","scheduledPurgeDate":"2021-09-09T04:20:49Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultelnidfemc5rswdkc7","name":"envaultelnidfemc5rswdkc7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgpekeoc4urmwtxprpbaztyvaj2h5yliwfmhcy2lak642xuivashtr34ov4iyozzoue/providers/Microsoft.KeyVault/vaults/envaultelnidfemc5rswdkc7","location":"eastus2","tags":{},"deletionDate":"2021-06-11T02:52:57Z","scheduledPurgeDate":"2021-09-09T02:52:57Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaulteijc66uqfjbpfm7yn","name":"envaulteijc66uqfjbpfm7yn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgumqfms57xdlcow7uc5vpjszhn4pamvrykbyi7p4f3ky2uc2gh5lbqly63hvly4aqk/providers/Microsoft.KeyVault/vaults/envaulteijc66uqfjbpfm7yn","location":"eastus2","tags":{},"deletionDate":"2021-06-11T02:42:22Z","scheduledPurgeDate":"2021-09-09T02:42:22Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZDdTuMwFITfJUJ7tWnsti5KpQrtam2ksk2Kax%2byuXMSlwbnx4pTCEW8O17EUyDNzWjmnJG%2bt6DT0%2fi37owL1m8B%2fXUQ8hCsg9M4WreOolZ16lG3uhtn6nIe9Kzs28idC1cOtR3rvnMRKvBxtbzGIS6OKFxWlQqVLhdhWcTz6%2fkRxSRGkR3657rSg4t2dTn0rj%2bOszv9CurcjFGlGz3q6tO4G2Xr8Nk3%2ffPNHOE4RF74x5UzfrE3utuINj7nhwkUzjPZ5HfAtiBNLjnkILEkAk1QMGg5NZMA%2frRDZPVv0aS6LS%2fCcNAypvkF9kD7pWzt4HPGM5vuWEOkzxNJqKLbA7%2bdqBS%2ftwljwLMqVYj8kZkdEn8vBdoEP7%2bAzb8fsZiqRZMAo5Po7JM2hELWJMp4Yg8WKkxfZHbiO5bfeiIpR4Ty7LTnElYCQ8opHrxPlWEL33%2b4RwTEf2Lv7x8%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-2gumjmhsm","name":"cli-test-kv-nr-2gumjmhsm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleq3swekubvq5xvi2ktoaczjmjim3263nqri7adwlq65ez6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-2gumjmhsm","location":"eastus2","tags":{},"deletionDate":"2021-10-22T10:50:50Z","scheduledPurgeDate":"2022-01-20T10:50:50Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-7px6mf2gq","name":"cli-test-kv-nr-7px6mf2gq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleq3swekubvq5xvi2ktoaczjmjim3263nqri7adwlq65ez6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-7px6mf2gq","location":"eastus2","tags":{},"deletionDate":"2021-10-22T10:50:50Z","scheduledPurgeDate":"2022-01-20T10:50:50Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-we5zrpcur","name":"cli-test-kv-nr-we5zrpcur","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleq3swekubvq5xvi2ktoaczjmjim3263nqri7adwlq65ez6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-we5zrpcur","location":"eastus2","tags":{},"deletionDate":"2021-10-22T10:50:50Z","scheduledPurgeDate":"2022-01-20T10:50:50Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-etba56h4t","name":"cli-test-kv-nr-etba56h4t","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleq3swekubvq5xvi2ktoaczjmjim3263nqri7adwlq65ez6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-etba56h4t","location":"eastus2","tags":{},"deletionDate":"2021-10-22T10:50:50Z","scheduledPurgeDate":"2022-01-20T10:50:50Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbubBJX11koQ4gFt8bSaBy7jDG6NP5h0q5a%2bu6TwXdz4HC%2bu9PJmz2oThtne3eiMM1Y6jlb58fawWwBaHnHa9nKzq74fBnlSvQtMJfCiFENVvWdAbBA1et6g1xUVNBdlyV3uRQvrigCb%2bNVMPADCIaxv6pSjgYQJcbe9JVdfcop55fGglI20sryH8w7H5R7XcwlvvMgCly4DD0%2fGb089lp2O6bzL5p%2fZJTRfRblLGXB8cAaVuEYkUx4yXz6JVivCf5Gx6z2yZm%2b0TO5JXOMKK4hwfk%2bweFEdDyRObzRc%2bgn0R4n7DRRTXbO4%2fEH"}' headers: cache-control: no-cache - content-length: '2174' + content-length: '999' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:41 GMT + date: Thu, 11 Nov 2021 03:24:31 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 068bcd19-d251-4d43-a226-9bbe34b89635 + x-ms-original-request-ids: 99dcac8c-52e0-4c6f-a4cc-2281a99892f1 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dDRbqMwEAXQf0GrPpVgZyEVkaJVqeytSKEbY09T3gw4G4oBB5MqS9V/L636FSvNy9WM5krnzenUZXyou8Y66zeH3GZcZM7aOY6jsWvPa2Un/6pWdeNCTudBLcq%2B9ey5sOVQm7HuO%2BuhAh9W/g12cXFArl9V0pWq/OmWRbi8WR5QGITIM0P/WldqsF5Sl0Nv%2B8O42Kp/IM969Cql1aiqr2B/SVO7r/Pl/HyzRDh00Tz46odt5sa%2BUd2Gt%2BE5zy4gcb4XOt8CjUE0uWCQg8Ai4OgCBYWWkebCgb0kKDjBXv8Boucdi1IRrHacPTLi%2BwJYpDQ9ZTxOGYnveWto0gSE8yhV7ZGIJxMlIhByilOpdSAa9sR0LDhHG%2Bf6G2z5/4mFhO%2BPqdLwKUYTglf5xFKgvc8xgwrHpx1PU/idTFyz7Q4F5HmKmGrtxDsTKUqB703GqKGz2B2DmOTTLPb%2B/gE%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZBfb4IwFMW/S7PsaUhB3MSELCOths1CrBQz3/hTEKtgaFXE%2BN3X7WMsOQ/nJufem9%2B5g4b3alk3QoLZHeCPdczWNpiBnVInOTPNY9qkFT/yRo3S4dzxUd4eTXnOZN7VJ1W3jTRhZpWvzptlWFkJDacoUiPl%2BdjIM9d%2Bs0voTlxonrr2Uhe8kyap866VbalGX/yWpOeDMgt%2B4IoXf4N8T0%2B1cdFJfdyzoeUaUMt6fpJCf2wFbzwmkg1NPmPK6DzGCVszN1qyAytRYJE4t8OBOCGqhij%2Btsi%2BupJhN6VIXAkMbhGqIBFBH6ItIgzDEFNMxdbXvqdxPug9D7yADf4PTYw1/SRCQU/22CaDJke7KRG/xKFP8XyhyVGIA7iC%2BLpiKycctn4Ua7/3FxQzDzwePw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZDdTuMwFITfJUJ7tWnsti5KpQrtam2ksk2Kax%2ByuXMSlwbnx4pTCEW8O17EUyDNzWjmnJG%2Bt6DT0/i37owL1m8B/XUQ8hCsg9M4WreOolZ16lG3uhtn6nIe9Kzs28idC1cOtR3rvnMRKvBxtbzGIS6OKFxWlQqVLhdhWcTz6/kRxSRGkR3657rSg4t2dTn0rj%2BOszv9CurcjFGlGz3q6tO4G2Xr8Nk3/fPNHOE4RF74x5UzfrE3utuINj7nhwkUzjPZ5HfAtiBNLjnkILEkAk1QMGg5NZMA/rRDZPVv0aS6LS/CcNAypvkF9kD7pWzt4HPGM5vuWEOkzxNJqKLbA7%2BdqBS/twljwLMqVYj8kZkdEn8vBdoEP7%2BAzb8fsZiqRZMAo5Po7JM2hELWJMp4Yg8WKkxfZHbiO5bfeiIpR4Ty7LTnElYCQ8opHrxPlWEL33%2B4RwTEf2Lv7x8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbubBJX11koQ4gFt8bSaBy7jDG6NP5h0q5a%2Bu6TwXdz4HC%2Bu9PJmz2oThtne3eiMM1Y6jlb58fawWwBaHnHa9nKzq74fBnlSvQtMJfCiFENVvWdAbBA1et6g1xUVNBdlyV3uRQvrigCb%2BNVMPADCIaxv6pSjgYQJcbe9JVdfcop55fGglI20sryH8w7H5R7XcwlvvMgCly4DD0/Gb089lp2O6bzL5p/ZJTRfRblLGXB8cAaVuEYkUx4yXz6JVivCf5Gx6z2yZm%2B0TO5JXOMKK4hwfk%2BweFEdDyRObzRc%2Bgn0R4n7DRRTXbO4/EH response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultxtiyvrf","name":"cmk-test-keyvaultxtiyvrf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgjaqnhmg5lpcusvttfxncrqzy5qddvpxjapwfe35skccv33572iwe34klzbszty576/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultxtiyvrf","location":"eastus","tags":{},"deletionDate":"2021-06-24T19:13:06Z","scheduledPurgeDate":"2021-09-22T19:13:06Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvault6rg4scs","name":"cmk-test-keyvault6rg4scs","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rglkoq6ccc5fwbeeq2rxf546odhfk4dcu467fdy7yglmgon5u23v25cznpxdaylqbsn/providers/Microsoft.KeyVault/vaults/cmk-test-keyvault6rg4scs","location":"eastus","tags":{},"deletionDate":"2021-06-21T05:41:38Z","scheduledPurgeDate":"2021-09-19T05:41:38Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-f3jfndh","name":"cli-test-kv-mgmt-f3jfndh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtl4yxvxh746abyk4a5ay7wonyqvn33vdjvhcnh6sxw7gf5gw7akhu6/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-f3jfndh","location":"eastus","tags":{},"deletionDate":"2021-06-18T01:52:10Z","scheduledPurgeDate":"2021-09-16T01:52:10Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-re3qc3e","name":"cli-test-kv-mgmt-re3qc3e","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtiurg3zszxlmdf5n7hwecjeayz5voevqv3mbojrfkntgzpmxnoo5l2/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-re3qc3e","location":"eastus","tags":{},"deletionDate":"2021-06-17T22:23:09Z","scheduledPurgeDate":"2021-09-15T22:23:09Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaulteu7wnb7","name":"cmk-test-keyvaulteu7wnb7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgrcyjoizrsbwwuu25w3zndxz7xk7sahksb2x2dievimwnemxv7g2iqbmsbjaiurwtw/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaulteu7wnb7","location":"eastus","tags":{},"deletionDate":"2021-06-17T19:12:54Z","scheduledPurgeDate":"2021-09-15T19:12:54Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-rtnbzch6g457lf","name":"vault-rtnbzch6g457lf","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgwb4ftqkkdyrlmthmi3lou7trm4qfql7yt4xwoleqynosvhtpqmcdyydok53ovhv5g/providers/Microsoft.KeyVault/vaults/vault-rtnbzch6g457lf","location":"eastus2","tags":{},"deletionDate":"2021-06-09T13:58:18Z","scheduledPurgeDate":"2021-09-07T13:58:18Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/vault-j5p3asr3rpz65b","name":"vault-j5p3asr3rpz65b","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgesxcqgdz2fstito5czw3agp5ek5bn2rynhgabguo347x7y6sl6m3vqu3mzaknaoak/providers/Microsoft.KeyVault/vaults/vault-j5p3asr3rpz65b","location":"eastus2","tags":{},"deletionDate":"2021-06-04T04:46:08Z","scheduledPurgeDate":"2021-09-02T04:46:08Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3dHRbpswFAbgd0HTrkaw05CKSNG0bhApHV5qfM4y7gw4K7MNBJOKtOq7z5v6FJXOzS%2f9Okf6zkvQqXn63nbaBZuXIP1SCCiCTfA4TYPbRJGVnfytrOqmhXy%2bjGpR9zZyl8rVYztMbd%2b5iFT0tF7d0pBWJxKumkaGUtU3YV0ly9vliSRxQqJh7J%2faRo0uytt67F1%2fmhb36oryYqaoUUZNqvkf3Gc5tOGTb%2frl2yWhSUj80I8fnPYXe626rbDJpSxmlLQ8ginvMdsj6BI4lggUYkFmrDK0PNWzQP4nJ0kqxB1TxsTCcJan8VneGMazfiXsMOZmfxaCMWXnb4D8KydxygUvcOeuoHmpND0%2fHJtC2pqCQcYgTuUz2Qaf3sCW71AM8Ph44Ltm7QXvWJqkKNgPqX%2f9E9s9kBgKsWfSwBXskOUQZ0LsDwgwe7GfXFPwHzkg4loQjl54BOHFXl%2f%2fAg%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-eo5rkiswg","name":"cli-test-kv-nr-eo5rkiswg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleq3swekubvq5xvi2ktoaczjmjim3263nqri7adwlq65ez6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-eo5rkiswg","location":"eastus2","tags":{},"deletionDate":"2021-10-22T10:50:19Z","scheduledPurgeDate":"2022-01-20T10:50:19Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-woe3racnx","name":"cli-test-kv-nr-woe3racnx","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleim7o2mbgwgid2eqbin4y4q4fuqdd7ymhgzlvjmxmoyo3c/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-woe3racnx","location":"eastus2","tags":{},"deletionDate":"2021-10-21T06:28:23Z","scheduledPurgeDate":"2022-01-19T06:28:23Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3dToMwAEbfhRjvoC2CExJiZopmc%2b0iUIy7K6UolL%2fQbm4se3eJyXdzkpPzXa1ens2u7pW2wqsVr9OMpa4VWj%2fGjDoEoOM9%2f5ad7I3D5%2bMkHTF0QB8LLaZ6NPXQawALVD16K2SjooK2V5bc5lI82KII3JVbwcAPIBin4VSXctKA1GIa9FAZ511ecn5sDShlK40s%2f0E%2f87G2T4u5xCMXosCGy9D9nVbL46BkHzGVfyb5NktY8prFOUtZsN%2bxllV4g0gmXDqzXzKvfdoojzQC0ebw9KEOmDbbmDJ2JlhdKH7BRG1cAhkiTftGcY73mPkUf0XW7fYH"}' headers: cache-control: no-cache - content-length: '1828' + content-length: '1014' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:41 GMT + date: Thu, 11 Nov 2021 03:24:31 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: bc8c10a4-85c1-4fc4-a665-cc4afd9e1b43 + x-ms-original-request-ids: b870df60-2aab-41fc-968f-d9beddfcd35f status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZDdTuMwFITfJUJ7tWnsti5KpQrtam2ksk2Kax%2ByuXMSlwbnx4pTCEW8O17EUyDNzWjmnJG%2Bt6DT0/i37owL1m8B/XUQ8hCsg9M4WreOolZ16lG3uhtn6nIe9Kzs28idC1cOtR3rvnMRKvBxtbzGIS6OKFxWlQqVLhdhWcTz6/kRxSRGkR3657rSg4t2dTn0rj%2BOszv9CurcjFGlGz3q6tO4G2Xr8Nk3/fPNHOE4RF74x5UzfrE3utuINj7nhwkUzjPZ5HfAtiBNLjnkILEkAk1QMGg5NZMA/rRDZPVv0aS6LS/CcNAypvkF9kD7pWzt4HPGM5vuWEOkzxNJqKLbA7%2BdqBS/twljwLMqVYj8kZkdEn8vBdoEP7%2BAzb8fsZiqRZMAo5Po7JM2hELWJMp4Yg8WKkxfZHbiO5bfeiIpR4Ty7LTnElYCQ8opHrxPlWEL33%2B4RwTEf2Lv7x8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbubBJX11koQ4gFt8bSaBy7jDG6NP5h0q5a%2Bu6TwXdz4HC%2Bu9PJmz2oThtne3eiMM1Y6jlb58fawWwBaHnHa9nKzq74fBnlSvQtMJfCiFENVvWdAbBA1et6g1xUVNBdlyV3uRQvrigCb%2BNVMPADCIaxv6pSjgYQJcbe9JVdfcop55fGglI20sryH8w7H5R7XcwlvvMgCly4DD0/Gb089lp2O6bzL5p/ZJTRfRblLGXB8cAaVuEYkUx4yXz6JVivCf5Gx6z2yZm%2B0TO5JXOMKK4hwfk%2BweFEdDyRObzRc%2Bgn0R4n7DRRTXbO4/EH - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dHRbpswFAbgd0HTrkaw05CKSNG0bhApHV5qfM4y7gw4K7MNBJOKtOq7z5v6FJXOzS/9Okf6zkvQqXn63nbaBZuXIP1SCCiCTfA4TYPbRJGVnfytrOqmhXy%2BjGpR9zZyl8rVYztMbd%2B5iFT0tF7d0pBWJxKumkaGUtU3YV0ly9vliSRxQqJh7J/aRo0uytt67F1/mhb36oryYqaoUUZNqvkf3Gc5tOGTb/rl2yWhSUj80I8fnPYXe626rbDJpSxmlLQ8ginvMdsj6BI4lggUYkFmrDK0PNWzQP4nJ0kqxB1TxsTCcJan8VneGMazfiXsMOZmfxaCMWXnb4D8KydxygUvcOeuoHmpND0/HJtC2pqCQcYgTuUz2Qaf3sCW71AM8Ph44Ltm7QXvWJqkKNgPqX/9E9s9kBgKsWfSwBXskOUQZ0LsDwgwe7GfXFPwHzkg4loQjl54BOHFXl/Ag%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3dToMwAEbfhRjvoC2CExJiZopmc%2B0iUIy7K6UolL/Qbm4se3eJyXdzkpPzXa1ens2u7pW2wqsVr9OMpa4VWj/GjDoEoOM9/5ad7I3D5%2BMkHTF0QB8LLaZ6NPXQawALVD16K2SjooK2V5bc5lI82KII3JVbwcAPIBin4VSXctKA1GIa9FAZ511ecn5sDShlK40s/0E/87G2T4u5xCMXosCGy9D9nVbL46BkHzGVfyb5NktY8prFOUtZsN%2BxllV4g0gmXDqzXzKvfdoojzQC0ebw9KEOmDbbmDJ2JlhdKH7BRG1cAhkiTftGcY73mPkUf0XW7fYH response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-km33hev","name":"cli-test-kv-mgmt-km33hev","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmtnfxamhflopvw3udfqplpniiipqeqjlnvvf4sivwo4vfrpmwoxfabw/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-km33hev","location":"eastus","tags":{},"deletionDate":"2021-06-10T22:04:07Z","scheduledPurgeDate":"2021-09-08T22:04:07Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultdc6qoy5","name":"cmk-test-keyvaultdc6qoy5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgolyjgumhic6hngbexnpthef4yrsk2k62ytd62ylgk4c2ubsztswglwtc7vxdbegox/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultdc6qoy5","location":"eastus","tags":{},"deletionDate":"2021-06-10T19:12:39Z","scheduledPurgeDate":"2021-09-08T19:12:39Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvukxa8","name":"acctestkvukxa8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-namespacecmk-210610190045678799/providers/Microsoft.KeyVault/vaults/acctestkvukxa8","location":"eastus","tags":{},"deletionDate":"2021-06-10T11:19:22Z","scheduledPurgeDate":"2021-09-08T11:19:22Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvxax71","name":"acctestkvxax71","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-namespacecmk-210610190045674059/providers/Microsoft.KeyVault/vaults/acctestkvxax71","location":"eastus","tags":{},"deletionDate":"2021-06-10T11:17:55Z","scheduledPurgeDate":"2021-09-08T11:17:55Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvnnl04","name":"acctestkvnnl04","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-namespacecmk-210610190045677164/providers/Microsoft.KeyVault/vaults/acctestkvnnl04","location":"eastus","tags":{},"deletionDate":"2021-06-10T11:17:22Z","scheduledPurgeDate":"2021-09-08T11:17:22Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultwvkccwnlu7mn6k3oy","name":"envaultwvkccwnlu7mn6k3oy","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rghxyx3g3n6ox3d5dsqqmysoiag2khwf3walfhc6nl7ve7po47l2eggwcdfjk5kkucp/providers/Microsoft.KeyVault/vaults/envaultwvkccwnlu7mn6k3oy","location":"eastus2","tags":{},"deletionDate":"2021-06-04T03:48:09Z","scheduledPurgeDate":"2021-09-02T03:48:09Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envault54aloshspamdu23jg","name":"envault54aloshspamdu23jg","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgbpmncga4ardw5efjcpclco3m3kihuhl22ha5whrqlrox7prnwb5luw4du2melv4tt/providers/Microsoft.KeyVault/vaults/envault54aloshspamdu23jg","location":"eastus2","tags":{},"deletionDate":"2021-06-04T03:42:30Z","scheduledPurgeDate":"2021-09-02T03:42:30Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3dBhS%2bswFAbg%2f1LET3ZN5qZ0MEQkHVbbuTQ5G%2fmWtpl2WdrYdK4q%2fvcbL%2fdXXDhfDuflPfB8B60ah%2bem1S5YfAfkvmC8CBbB2zBYt4giI1v5qoxqh4n8OvVqUnUmcqfSVX1jh6ZrXYRKvL%2bZ3eIQl3sUzupahlJV12FVxtPb6R7F8xhFtu8%2bmlr1Lsqaqu9ctx8mT%2boT5Ok4RLU6qkHVfxd3J20TfvikL19OEY5D5AdfXjjtP3ZatUtm4pMoRpBY7PhRPEGSAteCUxDAMZ8zNEKZgKFEjwzoIUMxkV%2f5Who3stamOcdkw5K1MucZ07TY6Dnf7OxaanJmOytyMicbDWtfihgCkSVpv2Wpz1eY%2bS9ZkrxvGVoGV%2f%2fApv%2bbWE4wZ14IVtWvWOtFboAlL5A8zrixfYZTAA05rOiKba3zgl6YFtL4PKcHL%2bzvogAiHtiRHhSkhP6K%2ffz8AQ%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ubjw2p3ot","name":"cli-test-kv-nr-ubjw2p3ot","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleim7o2mbgwgid2eqbin4y4q4fuqdd7ymhgzlvjmxmoyo3c/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ubjw2p3ot","location":"eastus2","tags":{},"deletionDate":"2021-10-21T06:27:49Z","scheduledPurgeDate":"2022-01-19T06:27:49Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ljh74j4jm","name":"cli-test-kv-nr-ljh74j4jm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleim7o2mbgwgid2eqbin4y4q4fuqdd7ymhgzlvjmxmoyo3c/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ljh74j4jm","location":"eastus2","tags":{},"deletionDate":"2021-10-21T06:27:49Z","scheduledPurgeDate":"2022-01-19T06:27:49Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-zrinecd4t","name":"cli-test-kv-nr-zrinecd4t","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleim7o2mbgwgid2eqbin4y4q4fuqdd7ymhgzlvjmxmoyo3c/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-zrinecd4t","location":"eastus2","tags":{},"deletionDate":"2021-10-21T06:27:49Z","scheduledPurgeDate":"2022-01-19T06:27:49Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-gw6gnnmnt","name":"cli-test-kv-nr-gw6gnnmnt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleim7o2mbgwgid2eqbin4y4q4fuqdd7ymhgzlvjmxmoyo3c/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-gw6gnnmnt","location":"eastus2","tags":{},"deletionDate":"2021-10-21T06:27:49Z","scheduledPurgeDate":"2022-01-19T06:27:49Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fSxh700Rn1ynIKIuDbY3FmDjYW4xxFT8xsZsp%2fe%2bTwYXDhcO9VzCoX3NshlaD6AqSQ8547oMInI2ZdARhLwbxrXo1GFfYZVauHHuol1LLuZlMMw4aotKrH4O953hljZygqoQjlHxwZBn6e79G4S5EcJrHS1OpWUPSyHnUY23cD7UWYukMrFSnjKr%2bi34WU%2bNcNnMbj33khQ7a4t3f6XZ7HFs1xLwtPmnxziinrywpeM7D05F3vMZvHmHSTy3%2fITaxBPOV2GwjfTqxL0zxAaUsWSnLghRvxOeEcIqJrV4y1q6ZzXYpkzG43f4A"}' headers: cache-control: no-cache - content-length: '1638' + content-length: '998' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:41 GMT + date: Thu, 11 Nov 2021 03:24:31 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 37ca385e-59bb-447b-a8ae-d9453d636da3 + x-ms-original-request-ids: 0008b62c-921c-4a39-abff-4ed3ed1fba20 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dHRbpswFAbgd0HTrkaw05CKSNG0bhApHV5qfM4y7gw4K7MNBJOKtOq7z5v6FJXOzS/9Okf6zkvQqXn63nbaBZuXIP1SCCiCTfA4TYPbRJGVnfytrOqmhXy%2BjGpR9zZyl8rVYztMbd%2B5iFT0tF7d0pBWJxKumkaGUtU3YV0ly9vliSRxQqJh7J/aRo0uytt67F1/mhb36oryYqaoUUZNqvkf3Gc5tOGTb/rl2yWhSUj80I8fnPYXe626rbDJpSxmlLQ8ginvMdsj6BI4lggUYkFmrDK0PNWzQP4nJ0kqxB1TxsTCcJan8VneGMazfiXsMOZmfxaCMWXnb4D8KydxygUvcOeuoHmpND0/HJtC2pqCQcYgTuUz2Qaf3sCW71AM8Ph44Ltm7QXvWJqkKNgPqX/9E9s9kBgKsWfSwBXskOUQZ0LsDwgwe7GfXFPwHzkg4loQjl54BOHFXl//Ag%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3dToMwAEbfhRjvoC2CExJiZopmc%2B0iUIy7K6UolL/Qbm4se3eJyXdzkpPzXa1ens2u7pW2wqsVr9OMpa4VWj/GjDoEoOM9/5ad7I3D5%2BMkHTF0QB8LLaZ6NPXQawALVD16K2SjooK2V5bc5lI82KII3JVbwcAPIBin4VSXctKA1GIa9FAZ511ecn5sDShlK40s/0E/87G2T4u5xCMXosCGy9D9nVbL46BkHzGVfyb5NktY8prFOUtZsN%2BxllV4g0gmXDqzXzKvfdoojzQC0ebw9KEOmDbbmDJ2JlhdKH7BRG1cAhkiTftGcY73mPkUf0XW7fYH - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dBhS%2BswFAbg/1LET3ZN5qZ0MEQkHVbbuTQ5G/mWtpl2WdrYdK4q/vcbL/dXXDhfDuflPfB8B60ah%2Bem1S5YfAfkvmC8CBbB2zBYt4giI1v5qoxqh4n8OvVqUnUmcqfSVX1jh6ZrXYRKvL%2BZ3eIQl3sUzupahlJV12FVxtPb6R7F8xhFtu8%2Bmlr1Lsqaqu9ctx8mT%2BoT5Ok4RLU6qkHVfxd3J20TfvikL19OEY5D5AdfXjjtP3ZatUtm4pMoRpBY7PhRPEGSAteCUxDAMZ8zNEKZgKFEjwzoIUMxkV/5Who3stamOcdkw5K1MucZ07TY6Dnf7OxaanJmOytyMicbDWtfihgCkSVpv2Wpz1eY%2BS9ZkrxvGVoGV/Apv%2BbWE4wZ14IVtWvWOtFboAlL5A8zrixfYZTAA05rOiKba3zgl6YFtL4PKcHL%2BzvogAiHtiRHhSkhP6K/fz8AQ%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/Sxh700Rn1ynIKIuDbY3FmDjYW4xxFT8xsZsp/e%2BTwYXDhcO9VzCoX3NshlaD6AqSQ8547oMInI2ZdARhLwbxrXo1GFfYZVauHHuol1LLuZlMMw4aotKrH4O953hljZygqoQjlHxwZBn6e79G4S5EcJrHS1OpWUPSyHnUY23cD7UWYukMrFSnjKr%2Bi34WU%2BNcNnMbj33khQ7a4t3f6XZ7HFs1xLwtPmnxziinrywpeM7D05F3vMZvHmHSTy3/ITaxBPOV2GwjfTqxL0zxAaUsWSnLghRvxOeEcIqJrV4y1q6ZzXYpkzG43f4A response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkv8t7mb","name":"acctestkv8t7mb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-namespacecmk-210610190045678284/providers/Microsoft.KeyVault/vaults/acctestkv8t7mb","location":"eastus","tags":{},"deletionDate":"2021-06-10T11:16:56Z","scheduledPurgeDate":"2021-09-08T11:16:56Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvtest10","name":"acctestkvtest10","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-eventhub-rg09/providers/Microsoft.KeyVault/vaults/acctestkvtest10","location":"eastus","tags":{},"deletionDate":"2021-06-10T10:20:09Z","scheduledPurgeDate":"2021-09-08T10:20:09Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvtest88","name":"acctestkvtest88","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-eventhub-rg111/providers/Microsoft.KeyVault/vaults/acctestkvtest88","location":"eastus","tags":{},"deletionDate":"2021-06-10T09:53:20Z","scheduledPurgeDate":"2021-09-08T09:53:20Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/acctestkvtest999","name":"acctestkvtest999","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-eventhub-rg111/providers/Microsoft.KeyVault/vaults/acctestkvtest999","location":"eastus","tags":{},"deletionDate":"2021-06-10T09:48:26Z","scheduledPurgeDate":"2021-09-08T09:48:26Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/kvtest11tes1t","name":"kvtest11tes1t","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-eventhub-rg09/providers/Microsoft.KeyVault/vaults/kvtest11tes1t","location":"eastus","tags":{},"deletionDate":"2021-06-09T05:28:23Z","scheduledPurgeDate":"2021-09-07T05:28:23Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3dBRT8IwEAfw77IYnxxrkWFGQowkHQqyxa49dW%2fdVnSWbnMtCBi%2bu8X4KUzu5Z%2b73OV%2b314j9%2faxbpTxJt8eucsYz7yJ925tZyZBoEUj3qSWjR2I47aXg7LVgdkWpuzrztZtYwJU4PV4dIN9XKyRP6oq4QtZXvtlEQ1vhmsUhREKur7d1ZXsTbCqy7417doOlvIAYruxQSU30srqN5hb0dX%2bzk265dMhwpGPXOHLC6PcxVbJZsp0tM2zPQicv%2fBNvoR4AVzlnEIOHPOQoT0UMWhK1J4B%2fVihiD8xmrqMme4aSULyekxSIO2IaxsnHI9fj4tkRbq564Prx1QtUsoVYoqKJ4XHXNGEzuk9f7axJJgzhqbe1R%2fY8L%2bJJe5D4USEIl%2bM09mK4M%2f8GKdSPYwYAicSQqYql%2fM5193sLAYqz4Q2B8ZmgqKQULZwwuGcASwpDz%2fhLHY6%2fQA%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-eml356d6u","name":"cli-test-kv-nr-eml356d6u","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleuwe5b2x7blcw2sfonzrm2vemc7tk6qgq5k3d2qciqtqr5/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-eml356d6u","location":"eastus2","tags":{},"deletionDate":"2021-10-15T06:22:38Z","scheduledPurgeDate":"2022-01-13T06:22:38Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-utnzr2rm7","name":"cli-test-kv-nr-utnzr2rm7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleuwe5b2x7blcw2sfonzrm2vemc7tk6qgq5k3d2qciqtqr5/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-utnzr2rm7","location":"eastus2","tags":{},"deletionDate":"2021-10-15T06:22:38Z","scheduledPurgeDate":"2022-01-13T06:22:38Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-rkn7ehjtn","name":"cli-test-kv-nr-rkn7ehjtn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleuwe5b2x7blcw2sfonzrm2vemc7tk6qgq5k3d2qciqtqr5/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-rkn7ehjtn","location":"eastus2","tags":{},"deletionDate":"2021-10-15T06:22:38Z","scheduledPurgeDate":"2022-01-13T06:22:38Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-c5nntu2j5","name":"cli-test-kv-nr-c5nntu2j5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleuwe5b2x7blcw2sfonzrm2vemc7tk6qgq5k3d2qciqtqr5/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-c5nntu2j5","location":"eastus2","tags":{},"deletionDate":"2021-10-15T06:22:38Z","scheduledPurgeDate":"2022-01-13T06:22:38Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-hk5w43jbk","name":"cli-test-kv-nr-hk5w43jbk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleuwe5b2x7blcw2sfonzrm2vemc7tk6qgq5k3d2qciqtqr5/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-hk5w43jbk","location":"eastus2","tags":{},"deletionDate":"2021-10-15T06:22:38Z","scheduledPurgeDate":"2022-01-13T06:22:38Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3baoQwAET%2fRUrfYhK77VZBiqKFbVdFTSw%2bxhht1ismLnth%2f71SmJeBc2buxigu%2bijHThnO3Qi9nNDcMhzjV%2btZORAObGStGMSoTXZbF2HyaYBqrRRf5KzlNCqIKty87fYY4KpBYFfXDDDBXwCvbGtvNch%2btRGcl%2bksa7EoGEm%2bTGpqtPktrgVbew1r0Qst6v%2biPtgswXkjt3HXQtgGaAt%2bflLd9jh1YnRpV%2fxkxRfJaPZJwoLm1E6OtKdNcMAR4VYSeNeItCgiJY6DFsVB%2fx4HKU5PhZ%2fS8pKRLIwDjhJ6uKVdHCYbm57KzfH9jHiu8Xj8AQ%3d%3d"}' headers: cache-control: no-cache - content-length: '1252' + content-length: '1043' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:41 GMT + date: Thu, 11 Nov 2021 03:24:31 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 1ac66cc9-8308-48d6-88d6-d63be635bbbe + x-ms-original-request-ids: eec195a7-d624-445e-bf65-e5f87555f5f6 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dBhS%2BswFAbg/1LET3ZN5qZ0MEQkHVbbuTQ5G/mWtpl2WdrYdK4q/vcbL/dXXDhfDuflPfB8B60ah%2Bem1S5YfAfkvmC8CBbB2zBYt4giI1v5qoxqh4n8OvVqUnUmcqfSVX1jh6ZrXYRKvL%2BZ3eIQl3sUzupahlJV12FVxtPb6R7F8xhFtu8%2Bmlr1Lsqaqu9ctx8mT%2BoT5Ok4RLU6qkHVfxd3J20TfvikL19OEY5D5AdfXjjtP3ZatUtm4pMoRpBY7PhRPEGSAteCUxDAMZ8zNEKZgKFEjwzoIUMxkV/5Who3stamOcdkw5K1MucZ07TY6Dnf7OxaanJmOytyMicbDWtfihgCkSVpv2Wpz1eY%2BS9ZkrxvGVoGV//Apv%2BbWE4wZ14IVtWvWOtFboAlL5A8zrixfYZTAA05rOiKba3zgl6YFtL4PKcHL%2BzvogAiHtiRHhSkhP6K/fz8AQ%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/Sxh700Rn1ynIKIuDbY3FmDjYW4xxFT8xsZsp/e%2BTwYXDhcO9VzCoX3NshlaD6AqSQ8547oMInI2ZdARhLwbxrXo1GFfYZVauHHuol1LLuZlMMw4aotKrH4O953hljZygqoQjlHxwZBn6e79G4S5EcJrHS1OpWUPSyHnUY23cD7UWYukMrFSnjKr%2Bi34WU%2BNcNnMbj33khQ7a4t3f6XZ7HFs1xLwtPmnxziinrywpeM7D05F3vMZvHmHSTy3/ITaxBPOV2GwjfTqxL0zxAaUsWSnLghRvxOeEcIqJrV4y1q6ZzXYpkzG43f4A - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dBRT8IwEAfw77IYnxxrkWFGQowkHQqyxa49dW/dVnSWbnMtCBi%2Bu8X4KUzu5Z%2B73OV%2B314j9/axbpTxJt8eucsYz7yJ925tZyZBoEUj3qSWjR2I47aXg7LVgdkWpuzrztZtYwJU4PV4dIN9XKyRP6oq4QtZXvtlEQ1vhmsUhREKur7d1ZXsTbCqy7417doOlvIAYruxQSU30srqN5hb0dX%2Bzk265dMhwpGPXOHLC6PcxVbJZsp0tM2zPQicv/BNvoR4AVzlnEIOHPOQoT0UMWhK1J4B/VihiD8xmrqMme4aSULyekxSIO2IaxsnHI9fj4tkRbq564Prx1QtUsoVYoqKJ4XHXNGEzuk9f7axJJgzhqbe1R/Y8L%2BJJe5D4USEIl%2BM09mK4M/8GKdSPYwYAicSQqYql/M5193sLAYqz4Q2B8ZmgqKQULZwwuGcASwpDz/hLHY6/QA%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3baoQwAET/RUrfYhK77VZBiqKFbVdFTSw%2Bxhht1ismLnth/71SmJeBc2buxigu%2BijHThnO3Qi9nNDcMhzjV%2BtZORAObGStGMSoTXZbF2HyaYBqrRRf5KzlNCqIKty87fYY4KpBYFfXDDDBXwCvbGtvNch%2BtRGcl%2Bksa7EoGEm%2BTGpqtPktrgVbew1r0Qst6v%2BiPtgswXkjt3HXQtgGaAt%2BflLd9jh1YnRpV/xkxRfJaPZJwoLm1E6OtKdNcMAR4VYSeNeItCgiJY6DFsVB/x4HKU5PhZ/S8pKRLIwDjhJ6uKVdHCYbm57KzfH9jHiu8Xj8AQ%3D%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/kvtest10test","name":"kvtest10test","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-eventhub-rg09/providers/Microsoft.KeyVault/vaults/kvtest10test","location":"eastus","tags":{},"deletionDate":"2021-06-09T04:44:42Z","scheduledPurgeDate":"2021-09-07T04:44:42Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/kvtest11test","name":"kvtest11test","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-eventhub-rg09/providers/Microsoft.KeyVault/vaults/kvtest11test","location":"eastus","tags":{},"deletionDate":"2021-06-09T04:44:32Z","scheduledPurgeDate":"2021-09-07T04:44:32Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/kvtest0003","name":"kvtest0003","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/acctestRG-eventhub-rg03/providers/Microsoft.KeyVault/vaults/kvtest0003","location":"eastus","tags":{},"deletionDate":"2021-06-05T07:29:38Z","scheduledPurgeDate":"2021-09-03T07:29:38Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cli-test-kv-mgmt-x2v3o2w","name":"cli-test-kv-mgmt-x2v3o2w","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_mgmttqbgdk6ntdapymof7otcmf6qfgmpd75g6qlp4xhwmrdnu4agjw24f/providers/Microsoft.KeyVault/vaults/cli-test-kv-mgmt-x2v3o2w","location":"eastus","tags":{},"deletionDate":"2021-06-03T22:05:44Z","scheduledPurgeDate":"2021-09-01T22:05:44Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/cmk-test-keyvaultytlygzt","name":"cmk-test-keyvaultytlygzt","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtniqzor6pdn4jcxq76qsrzcnuiruckomdjp6rt7lzurvf3eehwzt5zot3tf2wcrso/providers/Microsoft.KeyVault/vaults/cmk-test-keyvaultytlygzt","location":"eastus","tags":{},"deletionDate":"2021-06-03T19:18:49Z","scheduledPurgeDate":"2021-09-01T19:18:49Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3dBba8IwFMDx71LGnlabOKtUkLFLI%2bjqJSZnmre0jbPrLTZVXIfffUH2KQbn5cCfc%2bD341Tq0r5nVW6c8Y8TPm8Y3zhj59C22ow9r5SV%2fFSlqtqe7E6N6iV16ZlTbJIm021WV8ZDMd4PByPs4niP3EGaSleq5NFN4qA%2f6u9R4AfI0019zlLVGC%2fKkqY29b7tzdU3yFPReqkqVKvS22KepM7csy3t8Ukf4cBFdvD9ncntxzpX1YSVwUlsLiCx2PJCzIHMgOeCUxDAMfcZukBMoKRhfmFAvyIUcGBkIcukY5yKRYiP4vGwomQ3YFst1wU5AqNLWUbftn9dIz8UHV1RzjtWwCLKMYftgUpcDFlBXykhQ8rQxHn4A%2bv%2fN7GbUEdWMF347EPTmwAjSwh3A17qF8Xxcb3VK%2bD%2b1IrSFPmEsRmNQjFllZ6u8cyKadvrNw5URGRmha3Y9foL"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-aemrx32fj","name":"cli-test-kv-nr-aemrx32fj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule3skjud7oeyrq7h6y6bivr2uak3urv3f2otf3pi6suyphq/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-aemrx32fj","location":"eastus2","tags":{},"deletionDate":"2021-10-12T08:28:01Z","scheduledPurgeDate":"2022-01-10T08:28:01Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-qdmuxirio","name":"cli-test-kv-nr-qdmuxirio","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule3skjud7oeyrq7h6y6bivr2uak3urv3f2otf3pi6suyphq/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-qdmuxirio","location":"eastus2","tags":{},"deletionDate":"2021-10-12T08:27:29Z","scheduledPurgeDate":"2022-01-10T08:27:29Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-hnyodwidp","name":"cli-test-kv-nr-hnyodwidp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule3skjud7oeyrq7h6y6bivr2uak3urv3f2otf3pi6suyphq/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-hnyodwidp","location":"eastus2","tags":{},"deletionDate":"2021-10-12T08:27:29Z","scheduledPurgeDate":"2022-01-10T08:27:29Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-g6gdi4rfm","name":"cli-test-kv-nr-g6gdi4rfm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule3skjud7oeyrq7h6y6bivr2uak3urv3f2otf3pi6suyphq/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-g6gdi4rfm","location":"eastus2","tags":{},"deletionDate":"2021-10-12T08:27:29Z","scheduledPurgeDate":"2022-01-10T08:27:29Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9xSTWrVOQ4dAVXVNRE8ceo8bW%2bomJpbX0v1cG9%2bEeONx713pxVfu6b6Rm3zXfTSlLDc3WTkqN0oaw4z0%2fik70SufLPAm9GDoo51wWUz2qeuglRDmu3s0tBjivEDDLkgMuig0ocsvYGhWy3iwEx2m41KWYJCR1MQ1yqJT%2bI24Zn1sFS9EKJcp%2fkJ98rMFlNddxx0DYAmgNfn2Rzfo4NKJ3WJP9JllIE5Z8Uz9jKbOiPWtZ5QWY0MKIvGBDFoaJF6zdvZGl%2fSAsvibn0y7xYzPyw93B85eIhV%2fxufVjtDI9GgfqLoT%2bOdrj8QQ%3d"}' headers: cache-control: no-cache - content-length: '1361' + content-length: '1011' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:41 GMT + date: Thu, 11 Nov 2021 03:24:32 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: efcb2f7f-41e4-4d8f-99d8-fe7cd5ab0d50 + x-ms-original-request-ids: 8a055dc5-0dc1-431b-b961-0a4a1a430a57 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dBRT8IwEAfw77IYnxxrkWFGQowkHQqyxa49dW/dVnSWbnMtCBi%2Bu8X4KUzu5Z%2B73OV%2B314j9/axbpTxJt8eucsYz7yJ925tZyZBoEUj3qSWjR2I47aXg7LVgdkWpuzrztZtYwJU4PV4dIN9XKyRP6oq4QtZXvtlEQ1vhmsUhREKur7d1ZXsTbCqy7417doOlvIAYruxQSU30srqN5hb0dX%2Bzk265dMhwpGPXOHLC6PcxVbJZsp0tM2zPQicv/BNvoR4AVzlnEIOHPOQoT0UMWhK1J4B/VihiD8xmrqMme4aSULyekxSIO2IaxsnHI9fj4tkRbq564Prx1QtUsoVYoqKJ4XHXNGEzuk9f7axJJgzhqbe1R/Y8L%2BJJe5D4USEIl%2BM09mK4M/8GKdSPYwYAicSQqYql/M5193sLAYqz4Q2B8ZmgqKQULZwwuGcASwpDz/hLHY6/QA%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3baoQwAET/RUrfYhK77VZBiqKFbVdFTSw%2Bxhht1ismLnth/71SmJeBc2buxigu%2BijHThnO3Qi9nNDcMhzjV%2BtZORAObGStGMSoTXZbF2HyaYBqrRRf5KzlNCqIKty87fYY4KpBYFfXDDDBXwCvbGtvNch%2BtRGcl%2Bksa7EoGEm%2BTGpqtPktrgVbew1r0Qst6v%2BiPtgswXkjt3HXQtgGaAt%2BflLd9jh1YnRpV/xkxRfJaPZJwoLm1E6OtKdNcMAR4VYSeNeItCgiJY6DFsVB/x4HKU5PhZ/S8pKRLIwDjhJ6uKVdHCYbm57KzfH9jHiu8Xj8AQ%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dBba8IwFMDx71LGnlabOKtUkLFLI%2BjqJSZnmre0jbPrLTZVXIfffUH2KQbn5cCfc%2BD341Tq0r5nVW6c8Y8TPm8Y3zhj59C22ow9r5SV/FSlqtqe7E6N6iV16ZlTbJIm021WV8ZDMd4PByPs4niP3EGaSleq5NFN4qA/6u9R4AfI0019zlLVGC/KkqY29b7tzdU3yFPReqkqVKvS22KepM7csy3t8Ukf4cBFdvD9ncntxzpX1YSVwUlsLiCx2PJCzIHMgOeCUxDAMfcZukBMoKRhfmFAvyIUcGBkIcukY5yKRYiP4vGwomQ3YFst1wU5AqNLWUbftn9dIz8UHV1RzjtWwCLKMYftgUpcDFlBXykhQ8rQxHn4A%2Bv/N7GbUEdWMF347EPTmwAjSwh3A17qF8Xxcb3VK%2BD%2B1IrSFPmEsRmNQjFllZ6u8cyKadvrNw5URGRmha3Y9foL + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9xSTWrVOQ4dAVXVNRE8ceo8bW%2BomJpbX0v1cG9%2BEeONx713pxVfu6b6Rm3zXfTSlLDc3WTkqN0oaw4z0/ik70SufLPAm9GDoo51wWUz2qeuglRDmu3s0tBjivEDDLkgMuig0ocsvYGhWy3iwEx2m41KWYJCR1MQ1yqJT%2BI24Zn1sFS9EKJcp/kJ98rMFlNddxx0DYAmgNfn2Rzfo4NKJ3WJP9JllIE5Z8Uz9jKbOiPWtZ5QWY0MKIvGBDFoaJF6zdvZGl/SAsvibn0y7xYzPyw93B85eIhV/xufVjtDI9GgfqLoT%2BOdrj8QQ%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RToMwGEbfhRjvGC0bLiwhRiNcMEdmaX9n7woUxVJAWhbcsneXmHw3Jzk539Xp5Gxfm04ZZ3d14qecstx3ds6XtYPZeZ4WnfiUWnZ2JS7TKFdlrz0zFaYcm8E2fWc8VOD6YbPFLi5q5G6qSrhClmu3LEJ%2f69coDELkDWN%2fbio5Gu%2fQlGNv%2btqu9vIXxNRar5KttLL6B%2fMohsY9L%2bYSj3yEQxctw%2fd3Ri2PvZJdRHU48XwGgfmJtXwPSQpMcUaAA8MsoGiGIgFNYjVTIN9ZjH%2f4hWRCtWuqSCpZwN5odoT4Y8O05RmkADTJhJ4Tqoc0Y0GcKzgSxhPKyPOhTWN2aolo%2bQtl8E5UAIyiyLnd%2fgA%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-6am73zweq","name":"cli-test-kv-nr-6am73zweq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rule3skjud7oeyrq7h6y6bivr2uak3urv3f2otf3pi6suyphq/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-6am73zweq","location":"eastus2","tags":{},"deletionDate":"2021-10-12T08:27:29Z","scheduledPurgeDate":"2022-01-10T08:27:29Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultczifsuu7vualaxym2","name":"envaultczifsuu7vualaxym2","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgkmro3ckaxlyc3hgbdftn7pkloh62pmkfakiouwazaijhlpdv3h2qpeztux6e3oacc/providers/Microsoft.KeyVault/vaults/envaultczifsuu7vualaxym2","location":"eastus2","tags":{},"deletionDate":"2021-09-10T02:19:04Z","scheduledPurgeDate":"2021-12-09T02:19:04Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultq6kcd7v3hlcbavxwb","name":"envaultq6kcd7v3hlcbavxwb","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rg7lnz3b5rkhwbll7haxzkblscbzb4eo4aooxfzdzoltmww3llzd4keynorgu46a2op/providers/Microsoft.KeyVault/vaults/envaultq6kcd7v3hlcbavxwb","location":"eastus2","tags":{},"deletionDate":"2021-09-10T01:55:55Z","scheduledPurgeDate":"2021-12-09T01:55:55Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-hswswtkmm","name":"cli-test-kv-nr-hswswtkmm","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleb3f7cqv7ne2hpujyd2nnal2m6eyiki4zwej4vrf2apcmd/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-hswswtkmm","location":"eastus2","tags":{},"deletionDate":"2021-09-09T22:01:44Z","scheduledPurgeDate":"2021-12-08T22:01:44Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-idf7pglyk","name":"cli-test-kv-nr-idf7pglyk","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleb3f7cqv7ne2hpujyd2nnal2m6eyiki4zwej4vrf2apcmd/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-idf7pglyk","location":"eastus2","tags":{},"deletionDate":"2021-09-09T22:01:44Z","scheduledPurgeDate":"2021-12-08T22:01:44Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RboIwAEX%2fhSx7wxbUOUjMYkZdZLZk2LLMt9IWV1FKaDGK8d9HltyXk5yce%2fcadXVb3dTWi%2b8eWu0o24Ve7P0619oYgDNv%2bEGdVeMmfOg7NRHmDGxfWtHp1mnTWADLoHqZLQI%2fKCvoz6TkPldi6osyChdhBaN5BEHbmYuWqrMAa9EZayo3%2bVS3gvcnB6Q6KafkP9g33mr%2fMppjfBnCIPLhuOD5ydbjo6lVs2R18Z0XKc1ZvqaoYDsWZVt2YlWyCTAVU0xXU0IPc0IRJAMbcJK%2bkuN%2bnSUS4Zp8ZGiPSLKZfdWbATMGCRVDfhTXDKXvmP0svcfjDw%3d%3d"}' headers: cache-control: no-cache - content-length: '703' + content-length: '1331' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:41 GMT + date: Thu, 11 Nov 2021 03:24:32 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 541e1c6f-a24b-4808-a275-56c78f780b50 + x-ms-original-request-ids: 40002774-58c4-460f-bacc-a76d41ed360a status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3dBba8IwFMDx71LGnlabOKtUkLFLI%2BjqJSZnmre0jbPrLTZVXIfffUH2KQbn5cCfc%2BD341Tq0r5nVW6c8Y8TPm8Y3zhj59C22ow9r5SV/FSlqtqe7E6N6iV16ZlTbJIm021WV8ZDMd4PByPs4niP3EGaSleq5NFN4qA/6u9R4AfI0019zlLVGC/KkqY29b7tzdU3yFPReqkqVKvS22KepM7csy3t8Ukf4cBFdvD9ncntxzpX1YSVwUlsLiCx2PJCzIHMgOeCUxDAMfcZukBMoKRhfmFAvyIUcGBkIcukY5yKRYiP4vGwomQ3YFst1wU5AqNLWUbftn9dIz8UHV1RzjtWwCLKMYftgUpcDFlBXykhQ8rQxHn4A%2Bv/N7GbUEdWMF347EPTmwAjSwh3A17qF8Xxcb3VK%2BD%2B1IrSFPmEsRmNQjFllZ6u8cyKadvrNw5URGRmha3Y9foL + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9xSTWrVOQ4dAVXVNRE8ceo8bW%2BomJpbX0v1cG9%2BEeONx713pxVfu6b6Rm3zXfTSlLDc3WTkqN0oaw4z0/ik70SufLPAm9GDoo51wWUz2qeuglRDmu3s0tBjivEDDLkgMuig0ocsvYGhWy3iwEx2m41KWYJCR1MQ1yqJT%2BI24Zn1sFS9EKJcp/kJ98rMFlNddxx0DYAmgNfn2Rzfo4NKJ3WJP9JllIE5Z8Uz9jKbOiPWtZ5QWY0MKIvGBDFoaJF6zdvZGl/SAsvibn0y7xYzPyw93B85eIhV/xufVjtDI9GgfqLoT%2BOdrj8QQ%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RToMwGEbfhRjvGC0bLiwhRiNcMEdmaX9n7woUxVJAWhbcsneXmHw3Jzk539Xp5Gxfm04ZZ3d14qecstx3ds6XtYPZeZ4WnfiUWnZ2JS7TKFdlrz0zFaYcm8E2fWc8VOD6YbPFLi5q5G6qSrhClmu3LEJ/69coDELkDWN/bio5Gu/QlGNv%2Btqu9vIXxNRar5KttLL6B/MohsY9L%2BYSj3yEQxctw/d3Ri2PvZJdRHU48XwGgfmJtXwPSQpMcUaAA8MsoGiGIgFNYjVTIN9ZjH/4hWRCtWuqSCpZwN5odoT4Y8O05RmkADTJhJ4Tqoc0Y0GcKzgSxhPKyPOhTWN2aolo%2BQtl8E5UAIyiyLnd/gA%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RboIwAEX/hSx7wxbUOUjMYkZdZLZk2LLMt9IWV1FKaDGK8d9HltyXk5yce/cadXVb3dTWi%2B8eWu0o24Ve7P0619oYgDNv%2BEGdVeMmfOg7NRHmDGxfWtHp1mnTWADLoHqZLQI/KCvoz6TkPldi6osyChdhBaN5BEHbmYuWqrMAa9EZayo3%2BVS3gvcnB6Q6KafkP9g33mr/MppjfBnCIPLhuOD5ydbjo6lVs2R18Z0XKc1ZvqaoYDsWZVt2YlWyCTAVU0xXU0IPc0IRJAMbcJK%2BkuN%2BnSUS4Zp8ZGiPSLKZfdWbATMGCRVDfhTXDKXvmP0svcfjDw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1dT4MwGIX%2fCzHesbbsKyxZjJrOONzU0r4x3BUoioWW0DLRZf9dsuTcPMlzzjkHRo3%2bpTbaBZtzQO9TLtIo2ARf3ndug1ArjfxUrTJ%2bJv%2bGXs0K2yI35K7o687X1jiEc1KtFmsSkrzC4aIsZShVMQ%2bLPI7WUYXjZYxR19tTXareoUNd9NbZys8S9QtyaDwqVaO8Kq%2fg7mRXh6fJnMa3ESZxiKeQ2xunp0erldnyNh6ydARJsg%2fRZAns9iB0JhhkIIhYcjxCvoOWUT1yYN9HSlaCwxEorLjpQE2SnHdHRp8XnD%2fsD82eAoc3EN0jb1jyrpc01RmDJ%2fcz9S0jO0g5vMr2ygkj9CfleBtcLv8%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-br5slx2si","name":"cli-test-kv-nr-br5slx2si","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleb3f7cqv7ne2hpujyd2nnal2m6eyiki4zwej4vrf2apcmd/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-br5slx2si","location":"eastus2","tags":{},"deletionDate":"2021-09-09T22:01:44Z","scheduledPurgeDate":"2021-12-08T22:01:44Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-i2qbouphq","name":"cli-test-kv-nr-i2qbouphq","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleb3f7cqv7ne2hpujyd2nnal2m6eyiki4zwej4vrf2apcmd/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-i2qbouphq","location":"eastus2","tags":{},"deletionDate":"2021-09-09T22:01:44Z","scheduledPurgeDate":"2021-12-08T22:01:44Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-g32zddg7k","name":"cli-test-kv-nr-g32zddg7k","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleb3f7cqv7ne2hpujyd2nnal2m6eyiki4zwej4vrf2apcmd/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-g32zddg7k","location":"eastus2","tags":{},"deletionDate":"2021-09-09T22:01:44Z","scheduledPurgeDate":"2021-12-08T22:01:44Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-oi7daazoh","name":"cli-test-kv-nr-oi7daazoh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleex2j7mdldbqzofpejfqowzkosqngs4jtqytueep3sevjg/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-oi7daazoh","location":"eastus2","tags":{},"deletionDate":"2021-09-08T03:31:21Z","scheduledPurgeDate":"2021-12-07T03:31:21Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-zcl47uuaa","name":"cli-test-kv-nr-zcl47uuaa","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleex2j7mdldbqzofpejfqowzkosqngs4jtqytueep3sevjg/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-zcl47uuaa","location":"eastus2","tags":{},"deletionDate":"2021-09-08T03:31:21Z","scheduledPurgeDate":"2021-12-07T03:31:21Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fi4y9abx06xRkKFqwq4qaOLa3qHH1loiJXbX0v9cNzsP54PCdm0TJVZwa2nHJukm%2bk0GU6ZIlnYUYuQXAgCn%2bIQOhQsHrPBGlZAPgc8HLqRlFwygHaqHVr7u9JmtFrcq7qsIyJqUhl4Wp7%2fVaNV9MFYwTuzQVmTgIm3JinNVC%2bSBLjudegIr0RJDqH%2fg7Hhv5si03ua2rmimrW7TnJ95tj6wj1EZd%2fpnmR5ii9AD9HGXIjE%2boR7UXaCEsjRAGS%2bx119hL9Bg6a9RWb1H7pYer85t6aEnh0Y8814394Jr6327SJUbUng8R%2buuhLd3vDw%3d%3d"}' headers: cache-control: no-cache - content-length: '694' + content-length: '1110' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:41 GMT + date: Thu, 11 Nov 2021 03:24:32 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: f7ce1bed-bf5c-4395-9a0a-b02c04904e7c + x-ms-original-request-ids: 78a2565f-1f1d-47bd-975a-4561da422077 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RToMwGEbfhRjvGC0bLiwhRiNcMEdmaX9n7woUxVJAWhbcsneXmHw3Jzk539Xp5Gxfm04ZZ3d14qecstx3ds6XtYPZeZ4WnfiUWnZ2JS7TKFdlrz0zFaYcm8E2fWc8VOD6YbPFLi5q5G6qSrhClmu3LEJ/69coDELkDWN/bio5Gu/QlGNv%2Btqu9vIXxNRar5KttLL6B/MohsY9L%2BYSj3yEQxctw/d3Ri2PvZJdRHU48XwGgfmJtXwPSQpMcUaAA8MsoGiGIgFNYjVTIN9ZjH/4hWRCtWuqSCpZwN5odoT4Y8O05RmkADTJhJ4Tqoc0Y0GcKzgSxhPKyPOhTWN2aolo%2BQtl8E5UAIyiyLnd/gA%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RboIwAEX/hSx7wxbUOUjMYkZdZLZk2LLMt9IWV1FKaDGK8d9HltyXk5yce/cadXVb3dTWi%2B8eWu0o24Ve7P0619oYgDNv%2BEGdVeMmfOg7NRHmDGxfWtHp1mnTWADLoHqZLQI/KCvoz6TkPldi6osyChdhBaN5BEHbmYuWqrMAa9EZayo3%2BVS3gvcnB6Q6KafkP9g33mr/MppjfBnCIPLhuOD5ydbjo6lVs2R18Z0XKc1ZvqaoYDsWZVt2YlWyCTAVU0xXU0IPc0IRJAMbcJK%2BkuN%2BnSUS4Zp8ZGiPSLKZfdWbATMGCRVDfhTXDKXvmP0svcfjDw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dT4MwGIX/CzHesbbsKyxZjJrOONzU0r4x3BUoioWW0DLRZf9dsuTcPMlzzjkHRo3%2BpTbaBZtzQO9TLtIo2ARf3ndug1ArjfxUrTJ%2BJv%2BGXs0K2yI35K7o687X1jiEc1KtFmsSkrzC4aIsZShVMQ%2BLPI7WUYXjZYxR19tTXareoUNd9NbZys8S9QtyaDwqVaO8Kq/g7mRXh6fJnMa3ESZxiKeQ2xunp0erldnyNh6ydARJsg/RZAns9iB0JhhkIIhYcjxCvoOWUT1yYN9HSlaCwxEorLjpQE2SnHdHRp8XnD/sD82eAoc3EN0jb1jyrpc01RmDJ/cz9S0jO0g5vMr2ygkj9CfleBtcLv8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9abx06xRkKFqwq4qaOLa3qHH1loiJXbX0v9cNzsP54PCdm0TJVZwa2nHJukm%2Bk0GU6ZIlnYUYuQXAgCn%2BIQOhQsHrPBGlZAPgc8HLqRlFwygHaqHVr7u9JmtFrcq7qsIyJqUhl4Wp7/VaNV9MFYwTuzQVmTgIm3JinNVC%2BSBLjudegIr0RJDqH/g7Hhv5si03ua2rmimrW7TnJ95tj6wj1EZd/pnmR5ii9AD9HGXIjE%2BoR7UXaCEsjRAGS%2Bx119hL9Bg6a9RWb1H7pYer85t6aEnh0Y8814394Jr6327SJUbUng8R%2BuuhLd3vDw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1dT4MwGEb%2fCzHesba4j7BkMZoUzeaIlvaN9q5AUSwUpEXRZf9dNDk3T3LynFNg9eQfamtcsD0F9CbjIouCbfDmfe%2b2CLXKqlfdausX6mcc9KLoWuTG3BVD3fu6sw7hnFTr5YaEJK9wuCxLFSpdXIVFHkebqMLxKsaoH7rPutSDQ8e6GDrXVX5x0N%2bgxsajUjfa6%2fJ%2fuGvV1%2bHnbM7nuwiTOMQz5PLCmbnYGW13vI1HmU2giHwWjTxAsgdhpGAgQRCx4niCPIGWUTNxYO8pXVHOk1Q19IsLZjWNBXCW6uZlKQwcWLL%2fyHiaKQxrjkH%2b%2bTmFVOH%2bXhh2exRk%2fWTKR3bHEgEgj80egONdcD7%2fAg%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-4xec4ovqo","name":"cli-test-kv-nr-4xec4ovqo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleex2j7mdldbqzofpejfqowzkosqngs4jtqytueep3sevjg/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-4xec4ovqo","location":"eastus2","tags":{},"deletionDate":"2021-09-08T03:31:21Z","scheduledPurgeDate":"2021-12-07T03:31:21Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ntayjkcg5","name":"cli-test-kv-nr-ntayjkcg5","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleex2j7mdldbqzofpejfqowzkosqngs4jtqytueep3sevjg/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ntayjkcg5","location":"eastus2","tags":{},"deletionDate":"2021-09-08T03:31:21Z","scheduledPurgeDate":"2021-12-07T03:31:21Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-4e42lmrun","name":"cli-test-kv-nr-4e42lmrun","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_ruleex2j7mdldbqzofpejfqowzkosqngs4jtqytueep3sevjg/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-4e42lmrun","location":"eastus2","tags":{},"deletionDate":"2021-09-08T03:31:21Z","scheduledPurgeDate":"2021-12-07T03:31:21Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-3ippzi4fi","name":"cli-test-kv-nr-3ippzi4fi","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulen4ek4zal2u3ijllzf4egdnazhckojl4u3grbk52huwfvb/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-3ippzi4fi","location":"eastus2","tags":{},"deletionDate":"2021-09-08T02:54:06Z","scheduledPurgeDate":"2021-12-07T02:54:06Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-tgz55ieer","name":"cli-test-kv-nr-tgz55ieer","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulen4ek4zal2u3ijllzf4egdnazhckojl4u3grbk52huwfvb/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-tgz55ieer","location":"eastus2","tags":{},"deletionDate":"2021-09-08T02:53:35Z","scheduledPurgeDate":"2021-12-07T02:53:35Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNIm6dQoyOtRR1yjVxOFljLFz%2fmJi11n67pPBd3PgcL6bNoirOjZDKzX3pgX7jNDM1FztS6lJugD0bGBn0YtBGWxdZmHwsQdyKSWfm0k14yABLFH9bO%2bQjsoa6nZVMZ0Jbum8dMydWUPnyYFgmsdLU4lZAtzweZRjrYwP8ZuzpVOgEp1QovoH%2bcqmRr9s5hb3TIgcHW5Djw%2by3R7HVgwebfPPNI9IStOQBDnNqJMcaUdr%2f4Aw4RYmhxWTwI59DvEaWPEaviQ0CnFbQPzdmpgWZuwXFl67MPGjd%2bzvrwmp3tLg9HMiZ0%2b73%2f8A"}' headers: cache-control: no-cache - content-length: '708' + content-length: '1108' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:41 GMT + date: Thu, 11 Nov 2021 03:24:32 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 811951f3-51da-4dd4-b4de-ad33f6ac1daf + x-ms-original-request-ids: 963b0357-14a5-4d05-997f-c592121f72f0 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dT4MwGIX/CzHesbbsKyxZjJrOONzU0r4x3BUoioWW0DLRZf9dsuTcPMlzzjkHRo3%2BpTbaBZtzQO9TLtIo2ARf3ndug1ArjfxUrTJ%2BJv%2BGXs0K2yI35K7o687X1jiEc1KtFmsSkrzC4aIsZShVMQ%2BLPI7WUYXjZYxR19tTXareoUNd9NbZys8S9QtyaDwqVaO8Kq/g7mRXh6fJnMa3ESZxiKeQ2xunp0erldnyNh6ydARJsg/RZAns9iB0JhhkIIhYcjxCvoOWUT1yYN9HSlaCwxEorLjpQE2SnHdHRp8XnD/sD82eAoc3EN0jb1jyrpc01RmDJ/cz9S0jO0g5vMr2ygkj9CfleBtcLv8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9abx06xRkKFqwq4qaOLa3qHH1loiJXbX0v9cNzsP54PCdm0TJVZwa2nHJukm%2Bk0GU6ZIlnYUYuQXAgCn%2BIQOhQsHrPBGlZAPgc8HLqRlFwygHaqHVr7u9JmtFrcq7qsIyJqUhl4Wp7/VaNV9MFYwTuzQVmTgIm3JinNVC%2BSBLjudegIr0RJDqH/g7Hhv5si03ua2rmimrW7TnJ95tj6wj1EZd/pnmR5ii9AD9HGXIjE%2BoR7UXaCEsjRAGS%2Bx119hL9Bg6a9RWb1H7pYer85t6aEnh0Y8814394Jr6327SJUbUng8R%2BuuhLd3vDw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dT4MwGEb/CzHesba4j7BkMZoUzeaIlvaN9q5AUSwUpEXRZf9dNDk3T3LynFNg9eQfamtcsD0F9CbjIouCbfDmfe%2B2CLXKqlfdausX6mcc9KLoWuTG3BVD3fu6sw7hnFTr5YaEJK9wuCxLFSpdXIVFHkebqMLxKsaoH7rPutSDQ8e6GDrXVX5x0N%2BgxsajUjfa6/J/uGvV1%2BHnbM7nuwiTOMQz5PLCmbnYGW13vI1HmU2giHwWjTxAsgdhpGAgQRCx4niCPIGWUTNxYO8pXVHOk1Q19IsLZjWNBXCW6uZlKQwcWLL/yHiaKQxrjkH%2B%2BTmFVOH%2BXhh2exRk/WTKR3bHEgEgj80egONdcD7/Ag%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm6dQoyOtRR1yjVxOFljLFz/mJi11n67pPBd3PgcL6bNoirOjZDKzX3pgX7jNDM1FztS6lJugD0bGBn0YtBGWxdZmHwsQdyKSWfm0k14yABLFH9bO%2BQjsoa6nZVMZ0Jbum8dMydWUPnyYFgmsdLU4lZAtzweZRjrYwP8ZuzpVOgEp1QovoH%2BcqmRr9s5hb3TIgcHW5Djw%2By3R7HVgwebfPPNI9IStOQBDnNqJMcaUdr/4Aw4RYmhxWTwI59DvEaWPEaviQ0CnFbQPzdmpgWZuwXFl67MPGjd%2Bzvrwmp3tLg9HMiZ0%2B73/8A response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1Ra8IwGEX%2fSxl7q0k6q0SQMUYq6HRYk0%2fpW9qkW1ebZk0qneJ%2ftwzuy%2bEe7r0FRg%2f%2bozK1Cxa3gL0duDhEwSL49t66BUKNNPJLN9r4ibz2nZ4UbYNcn7uiq6yvWuMQzkk5m85JSPISh1OlZCh18RIWOY3mUYlpTDGyXXuplO4c2lZF17q29JON%2fgPZnz1S%2bqy9Vv%2fgXqWtwstojuPLCBMa4jHk%2bcnV42Nba7PkDe2zwwCSZCdxzjaQrEHUmUghA0FEzPEAeQJNyuqBQ%2fqzYzHjPN1BwgZ%2bsmYrKIOT%2boTVfsoB1ltME16PPSMzTtJO4Zhl12QHQmDR2OOeJL9HPjJk7%2bJoVymmwDleBvf7Aw%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-i6fc7pjem","name":"cli-test-kv-nr-i6fc7pjem","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulen4ek4zal2u3ijllzf4egdnazhckojl4u3grbk52huwfvb/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-i6fc7pjem","location":"eastus2","tags":{},"deletionDate":"2021-09-08T02:53:35Z","scheduledPurgeDate":"2021-12-07T02:53:35Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-mst2qeloj","name":"cli-test-kv-nr-mst2qeloj","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulen4ek4zal2u3ijllzf4egdnazhckojl4u3grbk52huwfvb/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-mst2qeloj","location":"eastus2","tags":{},"deletionDate":"2021-09-08T02:53:35Z","scheduledPurgeDate":"2021-12-07T02:53:35Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-d4ly57d2m","name":"cli-test-kv-nr-d4ly57d2m","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulen4ek4zal2u3ijllzf4egdnazhckojl4u3grbk52huwfvb/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-d4ly57d2m","location":"eastus2","tags":{},"deletionDate":"2021-09-08T02:53:35Z","scheduledPurgeDate":"2021-12-07T02:53:35Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-fahgtgcq7","name":"cli-test-kv-nr-fahgtgcq7","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulesdqm75tniolqbegpmfyz7ybaicsuhyd2seafaunfzswjx/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-fahgtgcq7","location":"eastus2","tags":{},"deletionDate":"2021-09-07T14:14:14Z","scheduledPurgeDate":"2021-12-06T14:14:14Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fi4y9aeKl6xRklJmCXWNREwd9izGuLt4wsayW%2fvfK4Lx8h49z7kYv%2fvSx6aUygruBdjmhuWMExkXrUQUAdKxnP6ITvbbYMk%2fC4kMH1FwqPjWjboZeAVja9Zu3tU27rKHpVRUzmeCuyUvf2To19Dc%2bBOM0XJtKTArghk%2bDGmptfYlbweZWg0q0QovqH9QHGxvzuprreOhA2zfhGvv1Rcn1cZCiD6ksvrPiQDKa7QkqaE7905G2tI5iGxPuYhK7yS%2bHCUk3JyJveDm8J8sFpZJ6KUW3dGk%2fk%2biMMEQwiXare44wit1M7tceh8bj8QQ%3d"}' headers: cache-control: no-cache - content-length: '714' - content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:41 GMT - expires: '-1' - pragma: no-cache - strict-transport-security: max-age=31536000; includeSubDomains - vary: Accept-Encoding - x-content-type-options: nosniff - x-ms-original-request-ids: 96aa18d3-08e9-482c-96ea-d83be2dae001 - status: - code: 200 - message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dT4MwGEb/CzHesba4j7BkMZoUzeaIlvaN9q5AUSwUpEXRZf9dNDk3T3LynFNg9eQfamtcsD0F9CbjIouCbfDmfe%2B2CLXKqlfdausX6mcc9KLoWuTG3BVD3fu6sw7hnFTr5YaEJK9wuCxLFSpdXIVFHkebqMLxKsaoH7rPutSDQ8e6GDrXVX5x0N%2BgxsajUjfa6/J/uGvV1%2BHnbM7nuwiTOMQz5PLCmbnYGW13vI1HmU2giHwWjTxAsgdhpGAgQRCx4niCPIGWUTNxYO8pXVHOk1Q19IsLZjWNBXCW6uZlKQwcWLL/yHiaKQxrjkH%2B%2BTmFVOH%2BXhh2exRk/WTKR3bHEgEgj80egONdcD7/Ag%3D%3D -- request: - body: null - headers: - Accept: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) - VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra8IwGEX/Sxl7q0k6q0SQMUYq6HRYk0/pW9qkW1ebZk0qneJ/twzuy%2BEe7r0FRg/%2BozK1Cxa3gL0duDhEwSL49t66BUKNNPJLN9r4ibz2nZ4UbYNcn7uiq6yvWuMQzkk5m85JSPISh1OlZCh18RIWOY3mUYlpTDGyXXuplO4c2lZF17q29JON/gPZnz1S%2Bqy9Vv/gXqWtwstojuPLCBMa4jHk%2BcnV42Nba7PkDe2zwwCSZCdxzjaQrEHUmUghA0FEzPEAeQJNyuqBQ/qzYzHjPN1BwgZ%2BsmYrKIOT%2BoTVfsoB1ltME16PPSMzTtJO4Zhl12QHQmDR2OOeJL9HPjJk7%2BJoVymmwDleBvf7Aw%3D%3D - response: - body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbebBLXrFgoY2N2YFcZMUmLb1Fj52JiamJxLf33yeC%2bHDicewuMnPxna5QL1rcgec0py6NgHXx7b90aAC2MOEktjV%2bI6zjIRdVr4MbSVUNrfdsbB2CJmuflCoWobGC4rGsRClk9hVUZR6uogTGOIbBDf2lrOTiwb6uhd33jFzv5y8XYeVDLTnpZ%2f4N7EbYNL7M5xzcRRHEI56HHB6fmx15Js6E6Hot84gIVR9YVO75NOVMFI7zgDDFM4cTLLdckURPl5CdLcCKuJBMKYWpsKhU%2bH47dF%2fk4LSl9KyRDyUFl2T6x70xbRxhOOCUZYRwz7QXZpudc8VzADjPOBenSM6NwE9zvfw%3d%3d"}' - headers: - cache-control: no-cache - content-length: '703' + content-length: '1067' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:32 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 4f88e197-449a-42fe-8125-8f003e4eae09 + x-ms-original-request-ids: 32508bd0-06fa-48c2-b748-bcd5d628ba84 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra8IwGEX/Sxl7q0k6q0SQMUYq6HRYk0/pW9qkW1ebZk0qneJ/twzuy%2BEe7r0FRg/%2BozK1Cxa3gL0duDhEwSL49t66BUKNNPJLN9r4ibz2nZ4UbYNcn7uiq6yvWuMQzkk5m85JSPISh1OlZCh18RIWOY3mUYlpTDGyXXuplO4c2lZF17q29JON/gPZnz1S%2Bqy9Vv/gXqWtwstojuPLCBMa4jHk%2BcnV42Nba7PkDe2zwwCSZCdxzjaQrEHUmUghA0FEzPEAeQJNyuqBQ/qzYzHjPN1BwgZ%2BsmYrKIOT%2BoTVfsoB1ltME16PPSMzTtJO4Zhl12QHQmDR2OOeJL9HPjJk7%2BJoVymmwDleBvf7Aw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm6dQoyOtRR1yjVxOFljLFz/mJi11n67pPBd3PgcL6bNoirOjZDKzX3pgX7jNDM1FztS6lJugD0bGBn0YtBGWxdZmHwsQdyKSWfm0k14yABLFH9bO%2BQjsoa6nZVMZ0Jbum8dMydWUPnyYFgmsdLU4lZAtzweZRjrYwP8ZuzpVOgEp1QovoH%2BcqmRr9s5hb3TIgcHW5Djw%2By3R7HVgwebfPPNI9IStOQBDnNqJMcaUdr/4Aw4RYmhxWTwI59DvEaWPEaviQ0CnFbQPzdmpgWZuwXFl67MPGjd%2Bzvrwmp3tLg9HMiZ0%2B73/8A - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBLXrFgoY2N2YFcZMUmLb1Fj52JiamJxLf33yeC%2BHDicewuMnPxna5QL1rcgec0py6NgHXx7b90aAC2MOEktjV%2BI6zjIRdVr4MbSVUNrfdsbB2CJmuflCoWobGC4rGsRClk9hVUZR6uogTGOIbBDf2lrOTiwb6uhd33jFzv5y8XYeVDLTnpZ/4N7EbYNL7M5xzcRRHEI56HHB6fmx15Js6E6Hot84gIVR9YVO75NOVMFI7zgDDFM4cTLLdckURPl5CdLcCKuJBMKYWpsKhU%2BH47dF/k4LSl9KyRDyUFl2T6x70xbRxhOOCUZYRwz7QXZpudc8VzADjPOBenSM6NwE9zvfw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aeKl6xRklJmCXWNREwd9izGuLt4wsayW/vfK4Lx8h49z7kYv/vSx6aUygruBdjmhuWMExkXrUQUAdKxnP6ITvbbYMk/C4kMH1FwqPjWjboZeAVja9Zu3tU27rKHpVRUzmeCuyUvf2To19Dc%2BBOM0XJtKTArghk%2BDGmptfYlbweZWg0q0QovqH9QHGxvzuprreOhA2zfhGvv1Rcn1cZCiD6ksvrPiQDKa7QkqaE7905G2tI5iGxPuYhK7yS%2BHCUk3JyJveDm8J8sFpZJ6KUW3dGk/k%2BiMMEQwiXare44wit1M7tceh8bj8QQ%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwGEb%2fi4zd2STOtFgoYxexsK62xORd8S5q7Fz8monFbfS%2fTwbn5oHDc369Ts%2fure6M9ba%2fHntJhUwDb%2bt9ODfYLUKt6tRVt7pzK%2fUzjXpV9C2yU26LsR5c3XcW4ZxU63BDfJJX2A%2fLUvlKF09%2bkUfBJqhwRCOMhrG%2f1aUeLTrWxdjbvnKrg%2f4GNTUOlbrRTpf%2fwz6rofZvi7mc7wJMIh8vkMcHa5Zib3S3E200ZekMimQX2WQHiF9BmkxyyEASSQWeIY%2bh5czMAvhnwugXF3CCfbkW7RAnLGKpgDPsr6Ew%2fMRJLBXjZwBYy8vAj4bG4tIkICFc%2fBNnVAqRJBxiKt8daEOZEHjn3e9%2f"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-zx6rflfmw","name":"cli-test-kv-nr-zx6rflfmw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulesdqm75tniolqbegpmfyz7ybaicsuhyd2seafaunfzswjx/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-zx6rflfmw","location":"eastus2","tags":{},"deletionDate":"2021-09-07T14:13:43Z","scheduledPurgeDate":"2021-12-06T14:13:43Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-vfqqhefy3","name":"cli-test-kv-nr-vfqqhefy3","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulesdqm75tniolqbegpmfyz7ybaicsuhyd2seafaunfzswjx/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-vfqqhefy3","location":"eastus2","tags":{},"deletionDate":"2021-09-07T14:13:43Z","scheduledPurgeDate":"2021-12-06T14:13:43Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-24nnlg2v6","name":"cli-test-kv-nr-24nnlg2v6","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulesdqm75tniolqbegpmfyz7ybaicsuhyd2seafaunfzswjx/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-24nnlg2v6","location":"eastus2","tags":{},"deletionDate":"2021-09-07T14:13:43Z","scheduledPurgeDate":"2021-12-06T14:13:43Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-vf3k4haxc","name":"cli-test-kv-nr-vf3k4haxc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulesdqm75tniolqbegpmfyz7ybaicsuhyd2seafaunfzswjx/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-vf3k4haxc","location":"eastus2","tags":{},"deletionDate":"2021-09-07T14:13:43Z","scheduledPurgeDate":"2021-12-06T14:13:43Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fi4y9aYyXdQoyBmrRVcWYOLq3GGPrvGJi6Vr63yuDcx4%2bOHznroz8Kg%2ft2AnFvSvBZ4FJYSiucpZyFi4AAx3piQ98lBq9rQvX2DQAsVaCLe0s22kUQK9g82btoAqrRletuqYq5cxUWeUYO6PRHdvRwbxMl7bmiwBJy5ZJTI3UvvhfSddegpr3XPL6H8QHnVv1si03uWfo0FH1LfD1RXTb49Tx0SNd%2bY3KGCOCQhyUpCBOdiA9afwIJpiZCY7M9JdtTazUP9qZH78jTOyU%2fIQZjm7IR%2fs0OBooCIPMP10T%2f7zPu8jISRwinHvK4%2fEE"}' headers: cache-control: no-cache - content-length: '697' + content-length: '1003' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:32 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 01a188dc-7703-402f-887a-8cc0bfba22de + x-ms-original-request-ids: ecb3b6f6-313b-4850-a110-c7e22e9a492b status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBLXrFgoY2N2YFcZMUmLb1Fj52JiamJxLf33yeC%2BHDicewuMnPxna5QL1rcgec0py6NgHXx7b90aAC2MOEktjV%2BI6zjIRdVr4MbSVUNrfdsbB2CJmuflCoWobGC4rGsRClk9hVUZR6uogTGOIbBDf2lrOTiwb6uhd33jFzv5y8XYeVDLTnpZ/4N7EbYNL7M5xzcRRHEI56HHB6fmx15Js6E6Hot84gIVR9YVO75NOVMFI7zgDDFM4cTLLdckURPl5CdLcCKuJBMKYWpsKhU%2BH47dF/k4LSl9KyRDyUFl2T6x70xbRxhOOCUZYRwz7QXZpudc8VzADjPOBenSM6NwE9zvfw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aeKl6xRklJmCXWNREwd9izGuLt4wsayW/vfK4Lx8h49z7kYv/vSx6aUygruBdjmhuWMExkXrUQUAdKxnP6ITvbbYMk/C4kMH1FwqPjWjboZeAVja9Zu3tU27rKHpVRUzmeCuyUvf2To19Dc%2BBOM0XJtKTArghk%2BDGmptfYlbweZWg0q0QovqH9QHGxvzuprreOhA2zfhGvv1Rcn1cZCiD6ksvrPiQDKa7QkqaE7905G2tI5iGxPuYhK7yS%2BHCUk3JyJveDm8J8sFpZJ6KUW3dGk/k%2BiMMEQwiXare44wit1M7tceh8bj8QQ%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwGEb/i4zd2STOtFgoYxexsK62xORd8S5q7Fz8monFbfS/Twbn5oHDc369Ts/ure6M9ba/HntJhUwDb%2Bt9ODfYLUKt6tRVt7pzK/UzjXpV9C2yU26LsR5c3XcW4ZxU63BDfJJX2A/LUvlKF09%2BkUfBJqhwRCOMhrG/1aUeLTrWxdjbvnKrg/4GNTUOlbrRTpf/wz6rofZvi7mc7wJMIh8vkMcHa5Zib3S3E200ZekMimQX2WQHiF9BmkxyyEASSQWeIY%2Bh5czMAvhnwugXF3CCfbkW7RAnLGKpgDPsr6Ew/MRJLBXjZwBYy8vAj4bG4tIkICFc/BNnVAqRJBxiKt8daEOZEHjn3e9/ + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aYyXdQoyBmrRVcWYOLq3GGPrvGJi6Vr63yuDcx4%2BOHznroz8Kg/t2AnFvSvBZ4FJYSiucpZyFi4AAx3piQ98lBq9rQvX2DQAsVaCLe0s22kUQK9g82btoAqrRletuqYq5cxUWeUYO6PRHdvRwbxMl7bmiwBJy5ZJTI3UvvhfSddegpr3XPL6H8QHnVv1si03uWfo0FH1LfD1RXTb49Tx0SNd%2BY3KGCOCQhyUpCBOdiA9afwIJpiZCY7M9JdtTazUP9qZH78jTOyU/IQZjm7IR/s0OBooCIPMP10T/7zPu8jISRwinHvK4/EE response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbebBJbLSmUsUEcrNOxmIQub1Hj5mJUTCyuo%2f8%2bGVy4XDic%2bxv0evGvbW9ccPgNyGPBeBEFh%2bDL%2b9EdALCqV5%2fa6t5v1HWe9KYaLHBz6aqpHX079A7AEjXJbo9CVDYw3NW1CpWutmFV4mgfNRDHGIJxGi5trScHsraaBjc0fnPSP0LNnQe17rTX9f9wD2psw8tKrvJjBBEO4Rp0f%2bfM%2bjgY3R%2bZxbMsFqGQPPNOnkT6IriRnAopOOIxg4soU2EpMQsT9DsnccLP9Zu2FWTnMdcEE8bSXJCPHbNjQQkWwtCCPmeIcWqoiYna1nlGuoSxJ5qnKX9fRRlBMbderp3IKzwGt9sf"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-6ilca2kon","name":"cli-test-kv-nr-6ilca2kon","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewwqfrp3a5rho6qh3jqciucmwcn4cnlt3hkhpbxang36f7/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-6ilca2kon","location":"eastus2","tags":{},"deletionDate":"2021-09-07T08:23:02Z","scheduledPurgeDate":"2021-12-06T08:23:02Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ftabo6n7y","name":"cli-test-kv-nr-ftabo6n7y","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewwqfrp3a5rho6qh3jqciucmwcn4cnlt3hkhpbxang36f7/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ftabo6n7y","location":"eastus2","tags":{},"deletionDate":"2021-09-07T08:23:02Z","scheduledPurgeDate":"2021-12-06T08:23:02Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-pojioqsyh","name":"cli-test-kv-nr-pojioqsyh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewwqfrp3a5rho6qh3jqciucmwcn4cnlt3hkhpbxang36f7/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-pojioqsyh","location":"eastus2","tags":{},"deletionDate":"2021-09-07T08:23:02Z","scheduledPurgeDate":"2021-12-06T08:23:02Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-hw4crbd4q","name":"cli-test-kv-nr-hw4crbd4q","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewwqfrp3a5rho6qh3jqciucmwcn4cnlt3hkhpbxang36f7/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-hw4crbd4q","location":"eastus2","tags":{},"deletionDate":"2021-09-07T08:23:02Z","scheduledPurgeDate":"2021-12-06T08:23:02Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNNHqOgUZMjOwa1LUxNHexRg78ReTdqul7z4ZfDcHDue7G4P81ftmaJUR3A0U5ZTljhEY31pPKgCg5wM%2fy14O2uLLZZaWGHugLqUSczPpZhwUgKVdv7hb27TLGppuVXGTS7ExRek7W6eGvudDMM3jtankrABuxDyqsdbWp7wV%2fNJpUMlOaln9g3rjU2NeV3ONhw60fROus5%2bfVLs%2bjq0cQtYWX1mxoxnLPigqWM78w551rI4TG1OxwTTxyHKGhzi6keXo4qV6TVuCUpZ6OD7FhEYeQaf3jLYOoUcPox3CMHEJQz8pFaHxePwB"}' headers: cache-control: no-cache - content-length: '687' + content-length: '1000' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:33 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 457fd4af-d4aa-479a-a1a5-903fc254c2c1 + x-ms-original-request-ids: a48c62a9-e3fb-4ca0-82a5-ccf8c50613d7 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwGEb/i4zd2STOtFgoYxexsK62xORd8S5q7Fz8monFbfS/Twbn5oHDc369Ts/ure6M9ba/HntJhUwDb%2Bt9ODfYLUKt6tRVt7pzK/UzjXpV9C2yU26LsR5c3XcW4ZxU63BDfJJX2A/LUvlKF09%2BkUfBJqhwRCOMhrG/1aUeLTrWxdjbvnKrg/4GNTUOlbrRTpf/wz6rofZvi7mc7wJMIh8vkMcHa5Zib3S3E200ZekMimQX2WQHiF9BmkxyyEASSQWeIY%2Bh5czMAvhnwugXF3CCfbkW7RAnLGKpgDPsr6Ew/MRJLBXjZwBYy8vAj4bG4tIkICFc/BNnVAqRJBxiKt8daEOZEHjn3e9/ + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aYyXdQoyBmrRVcWYOLq3GGPrvGJi6Vr63yuDcx4%2BOHznroz8Kg/t2AnFvSvBZ4FJYSiucpZyFi4AAx3piQ98lBq9rQvX2DQAsVaCLe0s22kUQK9g82btoAqrRletuqYq5cxUWeUYO6PRHdvRwbxMl7bmiwBJy5ZJTI3UvvhfSddegpr3XPL6H8QHnVv1si03uWfo0FH1LfD1RXTb49Tx0SNd%2BY3KGCOCQhyUpCBOdiA9afwIJpiZCY7M9JdtTazUP9qZH78jTOyU/IQZjm7IR/s0OBooCIPMP10T/7zPu8jISRwinHvK4/EE - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBJbLSmUsUEcrNOxmIQub1Hj5mJUTCyuo/8%2BGVy4XDic%2Bxv0evGvbW9ccPgNyGPBeBEFh%2BDL%2B9EdALCqV5/a6t5v1HWe9KYaLHBz6aqpHX079A7AEjXJbo9CVDYw3NW1CpWutmFV4mgfNRDHGIJxGi5trScHsraaBjc0fnPSP0LNnQe17rTX9f9wD2psw8tKrvJjBBEO4Rp0f%2BfM%2BjgY3R%2BZxbMsFqGQPPNOnkT6IriRnAopOOIxg4soU2EpMQsT9DsnccLP9Zu2FWTnMdcEE8bSXJCPHbNjQQkWwtCCPmeIcWqoiYna1nlGuoSxJ5qnKX9fRRlBMbderp3IKzwGt9sf + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNNHqOgUZMjOwa1LUxNHexRg78ReTdqul7z4ZfDcHDue7G4P81ftmaJUR3A0U5ZTljhEY31pPKgCg5wM/y14O2uLLZZaWGHugLqUSczPpZhwUgKVdv7hb27TLGppuVXGTS7ExRek7W6eGvudDMM3jtankrABuxDyqsdbWp7wV/NJpUMlOaln9g3rjU2NeV3ONhw60fROus5%2BfVLs%2Bjq0cQtYWX1mxoxnLPigqWM78w551rI4TG1OxwTTxyHKGhzi6keXo4qV6TVuCUpZ6OD7FhEYeQaf3jLYOoUcPox3CMHEJQz8pFaHxePwB response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwGEb%2fi4zdWRNXVxTK2CAttKulMe%2bL8y5qXJ2fmNjZlv73yeC5OXA4z91q1WQ%2by7bSVnC32HskIHKtwDob0%2bvAcRrZym%2fVqNYs5G0c1CLrGkePqc6Gsjdl12qHpLR4Xa6oTdOC2Ms8l7ZU2Yudpb67cgviez5x%2bqG7lLkatHMos6HTXWEWe3VFOdbGyVWtjMr%2fQb%2fJvrQvsznH1y6hvk3m0ecnXc2PXaXatWj8MYkmlDSJoU72uNkhVAlwTBAoeIJMmG6w4ayaBPKfkPnsFJ9D3OpfQXh4YJRBnB%2bRfS2hRlTgM4zPR0ngCsirE%2fGYEGEoGzO3%2bJYDHUB8RAiEQs13Cjwmb2RtPR5%2f"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-wskkwwiuh","name":"cli-test-kv-nr-wskkwwiuh","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulewwqfrp3a5rho6qh3jqciucmwcn4cnlt3hkhpbxang36f7/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-wskkwwiuh","location":"eastus2","tags":{},"deletionDate":"2021-09-07T08:22:31Z","scheduledPurgeDate":"2021-12-06T08:22:31Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultchv3dlxa3mbxmmkdo","name":"envaultchv3dlxa3mbxmmkdo","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgc6rkc2jpurucjhmslocqr6ixofvv2zpmhutuv6u4wiy4qbnccv42gs4aycvshjbbf/providers/Microsoft.KeyVault/vaults/envaultchv3dlxa3mbxmmkdo","location":"eastus2","tags":{},"deletionDate":"2021-09-03T02:40:43Z","scheduledPurgeDate":"2021-12-02T02:40:43Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ta4MwAIT%2fi4x9i0lst05BRocWujUONXH4MWrs0viGSetm6X%2bvGxzcPXDcXa1O%2fJiD7JS2vKsVblPKUsfyrG9jBu1B2PKOH0UrOmPz%2bTwKu%2bxbqM%2bFLkc5GNl3GqIC18%2frDQa4qBFYVxUHXJQrUBaus3Fq5D65CA5jf5GVGDUkshx73dfG%2fhC%2fGT83BlaiEUZU%2f6Bf%2bSDBZWku476DsAvQIvz4oNXy2CvR%2bUxlX0n2ThOW7GiYsZS5nwfWsDrYY0LLFaG5Q2aFo1OOScCW3LxELJ4iGjsxPU6JyqcoyFGEdm%2fR3ITJaYv%2fnCA2kXnvW7fbHQ%3d%3d"}' headers: cache-control: no-cache - content-length: '697' + content-length: '1076' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:33 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 587cadb4-e9a8-41b8-9357-9d2967e802b3 + x-ms-original-request-ids: 06194539-f35c-40ff-9f33-115c56790cd2 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBJbLSmUsUEcrNOxmIQub1Hj5mJUTCyuo/8%2BGVy4XDic%2Bxv0evGvbW9ccPgNyGPBeBEFh%2BDL%2B9EdALCqV5/a6t5v1HWe9KYaLHBz6aqpHX079A7AEjXJbo9CVDYw3NW1CpWutmFV4mgfNRDHGIJxGi5trScHsraaBjc0fnPSP0LNnQe17rTX9f9wD2psw8tKrvJjBBEO4Rp0f%2BfM%2BjgY3R%2BZxbMsFqGQPPNOnkT6IriRnAopOOIxg4soU2EpMQsT9DsnccLP9Zu2FWTnMdcEE8bSXJCPHbNjQQkWwtCCPmeIcWqoiYna1nlGuoSxJ5qnKX9fRRlBMbderp3IKzwGt9sf + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNNHqOgUZMjOwa1LUxNHexRg78ReTdqul7z4ZfDcHDue7G4P81ftmaJUR3A0U5ZTljhEY31pPKgCg5wM/y14O2uLLZZaWGHugLqUSczPpZhwUgKVdv7hb27TLGppuVXGTS7ExRek7W6eGvudDMM3jtankrABuxDyqsdbWp7wV/NJpUMlOaln9g3rjU2NeV3ONhw60fROus5%2BfVLs%2Bjq0cQtYWX1mxoxnLPigqWM78w551rI4TG1OxwTTxyHKGhzi6keXo4qV6TVuCUpZ6OD7FhEYeQaf3jLYOoUcPox3CMHEJQz8pFaHxePwB - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwGEb/i4zdWRNXVxTK2CAttKulMe%2BL8y5qXJ2fmNjZlv73yeC5OXA4z91q1WQ%2By7bSVnC32HskIHKtwDob0%2BvAcRrZym/VqNYs5G0c1CLrGkePqc6Gsjdl12qHpLR4Xa6oTdOC2Ms8l7ZU2Yudpb67cgviez5x%2BqG7lLkatHMos6HTXWEWe3VFOdbGyVWtjMr/Qb/JvrQvsznH1y6hvk3m0ecnXc2PXaXatWj8MYkmlDSJoU72uNkhVAlwTBAoeIJMmG6w4ayaBPKfkPnsFJ9D3OpfQXh4YJRBnB%2BRfS2hRlTgM4zPR0ngCsirE/GYEGEoGzO3%2BJYDHUB8RAiEQs13Cjwmb2RtPR5/ + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ta4MwAIT/i4x9i0lst05BRocWujUONXH4MWrs0viGSetm6X%2BvGxzcPXDcXa1O/JiD7JS2vKsVblPKUsfyrG9jBu1B2PKOH0UrOmPz%2BTwKu%2BxbqM%2BFLkc5GNl3GqIC18/rDQa4qBFYVxUHXJQrUBaus3Fq5D65CA5jf5GVGDUkshx73dfG/hC/GT83BlaiEUZU/6Bf%2BSDBZWku476DsAvQIvz4oNXy2CvR%2BUxlX0n2ThOW7GiYsZS5nwfWsDrYY0LLFaG5Q2aFo1OOScCW3LxELJ4iGjsxPU6JyqcoyFGEdm/R3ITJaYv/nCA2kXnvW7fbHQ%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1db4IwGIX%2fC1l2h20ZajAxyy6qiU6cpX1jelegTKR8hBbHXPzvY0vOzZPz5Jwfr9Gjey%2bbynqrH4%2b%2bJVwkgbfyLs51doVQrRr1qWvduJm6D72eZW2N7JDarC87V7aNRTglxSJcEp%2bkBfbDPFe%2b0tmLn6VRsAwKHM0jjLq%2bvZW57i06lFnf2rZws73%2bBjUYh3JttNP5P9hX1ZX%2bbTKn8XWASeTjKeT5yVbTY1vpZs3raJDJCIrIszByD5sdiEoKBhIEEXOOR0g3UDNajRzYNaaRSM4mVpWZOgYHTBYnzo5Aw1AA7A40%2fOIcYgC55YZdczyn4nw5gujoxIqZHZU0%2fmBCjJyw7emP73jtPR6%2f"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultm564r66ftcgeuoxfn","name":"envaultm564r66ftcgeuoxfn","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rge6mpofqddhy5trtwtrkgdbrri2ax6wc3xb5v7lule27p6xcrdlvisp2qijif6oqof/providers/Microsoft.KeyVault/vaults/envaultm564r66ftcgeuoxfn","location":"eastus2","tags":{},"deletionDate":"2021-09-03T02:34:52Z","scheduledPurgeDate":"2021-12-02T02:34:52Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-scdrjycca","name":"cli-test-kv-nr-scdrjycca","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulenpprjqsvavyvu4wvyurtp566iljs2j3g56lliesam5xh6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-scdrjycca","location":"eastus2","tags":{},"deletionDate":"2021-09-02T22:02:40Z","scheduledPurgeDate":"2021-12-01T22:02:40Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-ro5wfvwav","name":"cli-test-kv-nr-ro5wfvwav","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulenpprjqsvavyvu4wvyurtp566iljs2j3g56lliesam5xh6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-ro5wfvwav","location":"eastus2","tags":{},"deletionDate":"2021-09-02T22:02:40Z","scheduledPurgeDate":"2021-12-01T22:02:40Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-vgiqcrstc","name":"cli-test-kv-nr-vgiqcrstc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulenpprjqsvavyvu4wvyurtp566iljs2j3g56lliesam5xh6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-vgiqcrstc","location":"eastus2","tags":{},"deletionDate":"2021-09-02T22:02:40Z","scheduledPurgeDate":"2021-12-01T22:02:40Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9aRJN1ynI2KYtbk3FmDj6GDV2wU9MWjZL%2f%2ftkcF8unHvuzRrkjzmoodVWcLPi15zx3LUC69uYSQcA9GIQZ9nLwThiuczSqcYe6Eupq1lNRo2DBrBEzRPeIhuVDbRxXQtbyMqzq9J3t24D%2fY0PwTSPV1XLWQOiqnnUY2OcT%2flbiEtnQC07aWT9X%2fSLmJR9XclVHroQ%2bTZcgx4fdLs%2bjq0cQt4WX7T4YJTTHYsLnnM%2fPfCON1GCCKs8wk6YRCePRBynLHEJ656zNsOUxThjb3sa7d6PEdlQdsbZkiwpixFlx33Gi3jdhtb9%2fgc%3d"}' headers: cache-control: no-cache - content-length: '701' + content-length: '1128' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:33 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 9b86fcd2-9e8a-4afe-a668-fc24416939da + x-ms-original-request-ids: 9943e8e7-ad46-43a8-9f73-5de83e5203c1 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwGEb/i4zdWRNXVxTK2CAttKulMe%2BL8y5qXJ2fmNjZlv73yeC5OXA4z91q1WQ%2By7bSVnC32HskIHKtwDob0%2BvAcRrZym/VqNYs5G0c1CLrGkePqc6Gsjdl12qHpLR4Xa6oTdOC2Ms8l7ZU2Yudpb67cgviez5x%2BqG7lLkatHMos6HTXWEWe3VFOdbGyVWtjMr/Qb/JvrQvsznH1y6hvk3m0ecnXc2PXaXatWj8MYkmlDSJoU72uNkhVAlwTBAoeIJMmG6w4ayaBPKfkPnsFJ9D3OpfQXh4YJRBnB%2BRfS2hRlTgM4zPR0ngCsirE/GYEGEoGzO3%2BJYDHUB8RAiEQs13Cjwmb2RtPR5/ + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ta4MwAIT/i4x9i0lst05BRocWujUONXH4MWrs0viGSetm6X%2BvGxzcPXDcXa1O/JiD7JS2vKsVblPKUsfyrG9jBu1B2PKOH0UrOmPz%2BTwKu%2BxbqM%2BFLkc5GNl3GqIC18/rDQa4qBFYVxUHXJQrUBaus3Fq5D65CA5jf5GVGDUkshx73dfG/hC/GT83BlaiEUZU/6Bf%2BSDBZWku476DsAvQIvz4oNXy2CvR%2BUxlX0n2ThOW7GiYsZS5nwfWsDrYY0LLFaG5Q2aFo1OOScCW3LxELJ4iGjsxPU6JyqcoyFGEdm/R3ITJaYv/nCA2kXnvW7fbHQ%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1db4IwGIX/C1l2h20ZajAxyy6qiU6cpX1jelegTKR8hBbHXPzvY0vOzZPz5Jwfr9Gjey%2BbynqrH4%2B%2BJVwkgbfyLs51doVQrRr1qWvduJm6D72eZW2N7JDarC87V7aNRTglxSJcEp%2BkBfbDPFe%2B0tmLn6VRsAwKHM0jjLq%2BvZW57i06lFnf2rZws73%2BBjUYh3JttNP5P9hX1ZX%2BbTKn8XWASeTjKeT5yVbTY1vpZs3raJDJCIrIszByD5sdiEoKBhIEEXOOR0g3UDNajRzYNaaRSM4mVpWZOgYHTBYnzo5Aw1AA7A40/OIcYgC55YZdczyn4nw5gujoxIqZHZU0/mBCjJyw7emP73jtPR6/ + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRJN1ynI2KYtbk3FmDj6GDV2wU9MWjZL/tkcF8unHvuzRrkjzmoodVWcLPi15zx3LUC69uYSQcA9GIQZ9nLwThiuczSqcYe6Eupq1lNRo2DBrBEzRPeIhuVDbRxXQtbyMqzq9J3t24D/Y0PwTSPV1XLWQOiqnnUY2OcT/lbiEtnQC07aWT9X/SLmJR9XclVHroQ%2BTZcgx4fdLs%2Bjq0cQt4WX7T4YJTTHYsLnnM/PfCON1GCCKs8wk6YRCePRBynLHEJ656zNsOUxThjb3sa7d6PEdlQdsbZkiwpixFlx33Gi3jdhtb9/gc%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbebBKnLQpl7CEW2tVCYsLqWzRxszEqJhZn6b9PBvflcg73PrxOze6z6bT1koeHP2jOaOAl3o9zg00AMKIT38qozm3EMo1qU%2fUG2Km01dgMruk7C2CJ6m24Qz4qa%2biHUgpfqOrNr8o42AU1jKMYgmHs741UowXnphp729duc1K%2fXEytA1K1yin5X%2by7GBr%2fvprr%2bD6AKPbhGvT6YvX62GvV7XMTTwWduUDFF2uLE0%2bPnOmCEV5whliUw5mXKTcE6znn5JYxhMWSZUK3KyM3haPtdUkvBF%2fD3AwHglJGtbycU7YwM6QZi7DAR0oOLmSc05VvmZZUmGphLSfn1b8ucO89n38%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-iba3x7xgc","name":"cli-test-kv-nr-iba3x7xgc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulenpprjqsvavyvu4wvyurtp566iljs2j3g56lliesam5xh6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-iba3x7xgc","location":"eastus2","tags":{},"deletionDate":"2021-09-02T22:02:09Z","scheduledPurgeDate":"2021-12-01T22:02:09Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/cli-test-kv-nr-wce24ctuw","name":"cli-test-kv-nr-wce24ctuw","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_keyvault_network_rulenpprjqsvavyvu4wvyurtp566iljs2j3g56lliesam5xh6/providers/Microsoft.KeyVault/vaults/cli-test-kv-nr-wce24ctuw","location":"eastus2","tags":{},"deletionDate":"2021-09-02T22:02:09Z","scheduledPurgeDate":"2021-12-01T22:02:09Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultrl3dzgumylmbbyxns","name":"envaultrl3dzgumylmbbyxns","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgl6isovs2ctgfotrhnhip4lkmefj6e73oqfyr7x4x327pbgnzn5pt7kd6zbxsfrdym/providers/Microsoft.KeyVault/vaults/envaultrl3dzgumylmbbyxns","location":"eastus2","tags":{},"deletionDate":"2021-08-27T01:48:44Z","scheduledPurgeDate":"2021-11-25T01:48:44Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNEbtOgUZgjrsGosxcWx3UaPzX0xadKXvPhl8NwcO57srI1%2fluRk7oTh3JfBSQlNDcZQfKWfhADCwkdV84KPU2O914VoxDUBcc1EszSybaRRAz2H1Yh2hCvNKV62yZCrjhakWuW0cjUq3D7YO5mW6NSVfBEBNsUxiqqT2wbeMXXsJSt5zyct%2fEG9sbtTbbu5x19Chrer74POT6PbHqeOjS7vsE2cngikOSZDRlNqXM%2b1p5UcQkcJEbWQiUpsxSTbkRytqw1dMPHgh335CTmHcUisOojVp6wMOwveEdAZu6w233oa6L1d5PP4A"}' headers: cache-control: no-cache - content-length: '700' + content-length: '1088' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:33 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 9095057f-eb18-4d0b-b27e-5d34fb1ff708 + x-ms-original-request-ids: ef236325-4ab2-4d2b-a3c4-630f6ea97c16 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1db4IwGIX/C1l2h20ZajAxyy6qiU6cpX1jelegTKR8hBbHXPzvY0vOzZPz5Jwfr9Gjey%2BbynqrH4%2B%2BJVwkgbfyLs51doVQrRr1qWvduJm6D72eZW2N7JDarC87V7aNRTglxSJcEp%2BkBfbDPFe%2B0tmLn6VRsAwKHM0jjLq%2BvZW57i06lFnf2rZws73%2BBjUYh3JttNP5P9hX1ZX%2BbTKn8XWASeTjKeT5yVbTY1vpZs3raJDJCIrIszByD5sdiEoKBhIEEXOOR0g3UDNajRzYNaaRSM4mVpWZOgYHTBYnzo5Aw1AA7A40/OIcYgC55YZdczyn4nw5gujoxIqZHZU0/mBCjJyw7emP73jtPR6/ + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRJN1ynI2KYtbk3FmDj6GDV2wU9MWjZL//tkcF8unHvuzRrkjzmoodVWcLPi15zx3LUC69uYSQcA9GIQZ9nLwThiuczSqcYe6Eupq1lNRo2DBrBEzRPeIhuVDbRxXQtbyMqzq9J3t24D/Y0PwTSPV1XLWQOiqnnUY2OcT/lbiEtnQC07aWT9X/SLmJR9XclVHroQ%2BTZcgx4fdLs%2Bjq0cQt4WX7T4YJTTHYsLnnM/PfCON1GCCKs8wk6YRCePRBynLHEJ656zNsOUxThjb3sa7d6PEdlQdsbZkiwpixFlx33Gi3jdhtb9/gc%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBKnLQpl7CEW2tVCYsLqWzRxszEqJhZn6b9PBvflcg73PrxOze6z6bT1koeHP2jOaOAl3o9zg00AMKIT38qozm3EMo1qU/UG2Km01dgMruk7C2CJ6m24Qz4qa%2BiHUgpfqOrNr8o42AU1jKMYgmHs741UowXnphp729duc1K/XEytA1K1yin5X%2By7GBr/vprr%2BD6AKPbhGvT6YvX62GvV7XMTTwWduUDFF2uLE0%2BPnOmCEV5whliUw5mXKTcE6znn5JYxhMWSZUK3KyM3haPtdUkvBF/D3AwHglJGtbycU7YwM6QZi7DAR0oOLmSc05VvmZZUmGphLSfn1b8ucO89n38%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNEbtOgUZgjrsGosxcWx3UaPzX0xadKXvPhl8NwcO57srI1/luRk7oTh3JfBSQlNDcZQfKWfhADCwkdV84KPU2O914VoxDUBcc1EszSybaRRAz2H1Yh2hCvNKV62yZCrjhakWuW0cjUq3D7YO5mW6NSVfBEBNsUxiqqT2wbeMXXsJSt5zyct/EG9sbtTbbu5x19Chrer74POT6PbHqeOjS7vsE2cngikOSZDRlNqXM%2B1p5UcQkcJEbWQiUpsxSTbkRytqw1dMPHgh335CTmHcUisOojVp6wMOwveEdAZu6w233oa6L1d5PP4A response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1dS8MwAEX%2fSxHfuiR1c2QwRCQFOxcxS%2bLIW9qmrqYfoUln59h%2ftwj35R4u516jzkzhre6sjzbXiDwfuDgk0SY6heD8BoBWd%2frLtKYLC%2f07DmZR9C3wY%2b6LoXah7jsPYI6qx%2bUaxSivYLwsSx1rUzzERY6TdVJBvMIQuKE%2f16UZPNjXxdD7vgqLnblIPTYBlKYxwZT%2fxT9pV8fneTnLtwlEOIZz0P2dt%2fNjb0235S0e1WGSGqmjaNROppkUVgkmlRRIrDicZJ7KlhE7ccm%2b6QwZzygj4sI7lxqLCT%2be3iV5XXIhFSWYfBwdkym5cMtemF2RT5sx0xZQNDLbC%2fjDLKWSOMIRo5Qgon7hNrrd%2fgA%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envaultu6szedkam4asi2jlp","name":"envaultu6szedkam4asi2jlp","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rginrfepi7di5o2noos45mmw2pbcktuoxmo26aplmqoqqna4embponbc6anxd3hzfbm/providers/Microsoft.KeyVault/vaults/envaultu6szedkam4asi2jlp","location":"eastus2","tags":{},"deletionDate":"2021-08-27T01:44:49Z","scheduledPurgeDate":"2021-11-25T01:44:49Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envault4uirozg3qb53bljio","name":"envault4uirozg3qb53bljio","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgix2kwcffm7pbrnrlpsgxwxa7wncztxqmfyoz6wbzjpizlwbopnhejkz2ublpwvfft/providers/Microsoft.KeyVault/vaults/envault4uirozg3qb53bljio","location":"eastus2","tags":{},"deletionDate":"2021-08-20T01:52:29Z","scheduledPurgeDate":"2021-11-18T01:52:29Z","purgeProtectionEnabled":true}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus2/deletedVaults/envault2gyrypdbob2qcw5az","name":"envault2gyrypdbob2qcw5az","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgvutty2wzobujsddcjbqnisu34h7nq4rsroriz6s4muixug4t2elbq7fe333hu2dyj/providers/Microsoft.KeyVault/vaults/envault2gyrypdbob2qcw5az","location":"eastus2","tags":{},"deletionDate":"2021-08-20T01:39:23Z","scheduledPurgeDate":"2021-11-18T01:39:23Z","purgeProtectionEnabled":true}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1bT4MwAIX%2fCzG%2bQcvNCQkxRjBBV8ygxehbacuEcgstc2PZf5eYnJfz5eQ7V2MQZ71vBqmM8GokzwUmhWOExo%2fWkwoB6OlAj6IXg7bouszCYmMP1FIpNjeTbsZBAVjZ9YO3s027qqHpcU5NKphrsipwdk4NAz%2bAYJrHU8PFrABq2DyqsdbWu7iUdOk04KITWvD%2fop7o1JinbbnJIwfagQm32Pd3Sm6PoxRDRGT5mZdvOCf5K05KUpDgY086UsepjTBzUXv0EU4vWYw8tMoVtd%2bPmSxjtH5BhHm88XMWly9Z2yUHeXARJL8ZSR2EkZ%2fFSWTcbn8%3d"}' headers: cache-control: no-cache - content-length: '709' + content-length: '1181' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:33 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 85ac92fd-acd7-4309-90d8-c232eee6b8aa + x-ms-original-request-ids: eddeb52e-0dd4-4298-882e-ff00e2538884 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBKnLQpl7CEW2tVCYsLqWzRxszEqJhZn6b9PBvflcg73PrxOze6z6bT1koeHP2jOaOAl3o9zg00AMKIT38qozm3EMo1qU/UG2Km01dgMruk7C2CJ6m24Qz4qa%2BiHUgpfqOrNr8o42AU1jKMYgmHs741UowXnphp729duc1K/XEytA1K1yin5X%2By7GBr/vprr%2BD6AKPbhGvT6YvX62GvV7XMTTwWduUDFF2uLE0%2BPnOmCEV5whliUw5mXKTcE6znn5JYxhMWSZUK3KyM3haPtdUkvBF/D3AwHglJGtbycU7YwM6QZi7DAR0oOLmSc05VvmZZUmGphLSfn1b8ucO89n38%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNEbtOgUZgjrsGosxcWx3UaPzX0xadKXvPhl8NwcO57srI1/luRk7oTh3JfBSQlNDcZQfKWfhADCwkdV84KPU2O914VoxDUBcc1EszSybaRRAz2H1Yh2hCvNKV62yZCrjhakWuW0cjUq3D7YO5mW6NSVfBEBNsUxiqqT2wbeMXXsJSt5zyct/EG9sbtTbbu5x19Chrer74POT6PbHqeOjS7vsE2cngikOSZDRlNqXM%2B1p5UcQkcJEbWQiUpsxSTbkRytqw1dMPHgh335CTmHcUisOojVp6wMOwveEdAZu6w233oa6L1d5PP4A - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dS8MwAEX/SxHfuiR1c2QwRCQFOxcxS%2BLIW9qmrqYfoUln59h/twj35R4u516jzkzhre6sjzbXiDwfuDgk0SY6heD8BoBWd/rLtKYLC/07DmZR9C3wY%2B6LoXah7jsPYI6qx%2BUaxSivYLwsSx1rUzzERY6TdVJBvMIQuKE/16UZPNjXxdD7vgqLnblIPTYBlKYxwZT/xT9pV8fneTnLtwlEOIZz0P2dt/Njb0235S0e1WGSGqmjaNROppkUVgkmlRRIrDicZJ7KlhE7ccm%2B6QwZzygj4sI7lxqLCT%2Be3iV5XXIhFSWYfBwdkym5cMtemF2RT5sx0xZQNDLbC/jDLKWSOMIRo5Qgon7hNrrd/gA%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1bT4MwAIX/CzG%2BQcvNCQkxRjBBV8ygxehbacuEcgstc2PZf5eYnJfz5eQ7V2MQZ71vBqmM8GokzwUmhWOExo/WkwoB6OlAj6IXg7bouszCYmMP1FIpNjeTbsZBAVjZ9YO3s027qqHpcU5NKphrsipwdk4NAz%2BAYJrHU8PFrABq2DyqsdbWu7iUdOk04KITWvD/op7o1JinbbnJIwfagQm32Pd3Sm6PoxRDRGT5mZdvOCf5K05KUpDgY086UsepjTBzUXv0EU4vWYw8tMoVtd%2BPmSxjtH5BhHm88XMWly9Z2yUHeXARJL8ZSR2EkZ/FSWTcbn8%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbebBJbVxTK2EAL7WpHTLLiW4xxc6mJM7G4lv77wuC%2bHDicewu0nN1bp5UN0luQvZSEllGQBl%2fODTYFoOeaf8pearfg12mUC2F6YKfairEbXGe0BbBG7dNqjUJUtzBcNQ0PuRTLUNRJtI5amMQJBMNoLl0jRwsOnRiNNa1b7OUv49PZgUaepZPNP9hnPnThxZs%2bvokgSkLohx4frPKPRkm9IX0yVeXMOKpO9FztWb5jVFUUs4pRRGMCZ1bnrMeZmgnD3wVFP%2bVpeMdbcSXeaqBnUhxxblYE4SNWcYbVruD9YSYfjhVZnDNVHNlWIKKHEmeJ7%2bOS5fmSkNc99j1M4Ca43%2f8A"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9aRJ16xRkWIzQrUYaE8ceo8bV%2bYmJXWfpf58M7svlXM69GYO86mMztMrwbwYOM8Yz2%2fCNs9aT8gHoxSC%2bZC8HbYl1maVVjj1QS6HKuZl0Mw4KwALVz%2b4OmaiooelWlTCFLB2zLDx7Z9fQe%2fIgmObx0lRyViBpynlUY62td%2fmbi6XToJKd1LL6L%2bpVTI152ZabPLAh8ky4BT0%2bqHZ7HFs5BLzNP2j%2bxiinMcM5z7iXHnnH6%2biAElY6hCU%2fKQuvadQi8h26yUpeTu2nS2C%2bJyvFNDrHBFN8gjFOceKQtYs3FpF1jyk%2fBMb9%2fgc%3d"}' headers: cache-control: no-cache - content-length: '693' + content-length: '667' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:33 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: c9d1c1a4-2c63-48da-95c7-b27d7f9b1394 + x-ms-original-request-ids: f134f9a2-f932-4e4c-8601-dbf944da6a3a status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dS8MwAEX/SxHfuiR1c2QwRCQFOxcxS%2BLIW9qmrqYfoUln59h/twj35R4u516jzkzhre6sjzbXiDwfuDgk0SY6heD8BoBWd/rLtKYLC/07DmZR9C3wY%2B6LoXah7jsPYI6qx%2BUaxSivYLwsSx1rUzzERY6TdVJBvMIQuKE/16UZPNjXxdD7vgqLnblIPTYBlKYxwZT/xT9pV8fneTnLtwlEOIZz0P2dt/Njb0235S0e1WGSGqmjaNROppkUVgkmlRRIrDicZJ7KlhE7ccm%2B6QwZzygj4sI7lxqLCT%2Be3iV5XXIhFSWYfBwdkym5cMtemF2RT5sx0xZQNDLbC/jDLKWSOMIRo5Qgon7hNrrd/gA%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1bT4MwAIX/CzG%2BQcvNCQkxRjBBV8ygxehbacuEcgstc2PZf5eYnJfz5eQ7V2MQZ71vBqmM8GokzwUmhWOExo/WkwoB6OlAj6IXg7bouszCYmMP1FIpNjeTbsZBAVjZ9YO3s027qqHpcU5NKphrsipwdk4NAz%2BAYJrHU8PFrABq2DyqsdbWu7iUdOk04KITWvD/op7o1JinbbnJIwfagQm32Pd3Sm6PoxRDRGT5mZdvOCf5K05KUpDgY086UsepjTBzUXv0EU4vWYw8tMoVtd%2BPmSxjtH5BhHm88XMWly9Z2yUHeXARJL8ZSR2EkZ/FSWTcbn8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBJbVxTK2EAL7WpHTLLiW4xxc6mJM7G4lv77wuC%2BHDicewu0nN1bp5UN0luQvZSEllGQBl/ODTYFoOeaf8pearfg12mUC2F6YKfairEbXGe0BbBG7dNqjUJUtzBcNQ0PuRTLUNRJtI5amMQJBMNoLl0jRwsOnRiNNa1b7OUv49PZgUaepZPNP9hnPnThxZs%2BvokgSkLohx4frPKPRkm9IX0yVeXMOKpO9FztWb5jVFUUs4pRRGMCZ1bnrMeZmgnD3wVFP%2BVpeMdbcSXeaqBnUhxxblYE4SNWcYbVruD9YSYfjhVZnDNVHNlWIKKHEmeJ7%2BOS5fmSkNc99j1M4Ca43/8A + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRJ16xRkWIzQrUYaE8ceo8bV%2BYmJXWfpf58M7svlXM69GYO86mMztMrwbwYOM8Yz2/CNs9aT8gHoxSC%2BZC8HbYl1maVVjj1QS6HKuZl0Mw4KwALVz%2B4OmaiooelWlTCFLB2zLDx7Z9fQe/IgmObx0lRyViBpynlUY62td/mbi6XToJKd1LL6L%2BpVTI152ZabPLAh8ky4BT0%2BqHZ7HFs5BLzNP2j%2BxiinMcM5z7iXHnnH6%2BiAElY6hCU/KQuvadQi8h26yUpeTu2nS2C%2BJyvFNDrHBFN8gjFOceKQtYs3FpF1jyk/BMb9/gc%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwGEb%2fi4zd2SS2WhTK2IXp1s6Wpcm74V3UuLr4hYnFtvS%2fTwbn5oHDc%2b5Oqyb7UbXaONHdiV9PXJw8J3LO1vYmQqiRrfxRjWrtQt7GQS3yrkFmzEw%2bVL2tutYgnJEyWK2JS7ISu6uikK5U%2bdLNs9BbeyUO%2fRCjfuguVaEGg5IqHzrTlXaxV1eQY21RoWplVfE%2fzIvsK%2fcym%2fP5xsMkdPEMeX4yei52WrUb3oRjeppAkvRb1Oke6A6ETgWDFAQRPscTZBQaFuuJA%2fs9CBIITo9A4yuvGSgRxl%2bcHlT9vuI1yE%2fsB%2bnyfEzoLhZNr5nwY3ljR7Y9vwlgu4TSgOniwKDf8rmSYF8IjjfO4%2fEH"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuYoy6dQoyBN2waxxq4thl1Lj6F8XEYi1998rg3Bw4fN9NE3xVp0Z0UnNvWuhnhGam5mpnpSbpQjgwwf74wIXS2bbMXC%2fHAcqlkOXcTKoZhYRGgepX%2b4AAKmoD2FXFAOOlBcrCMQ9mbTgvjgGnebw0FZ8lxE05j3Kslf7FrzlbegUr3nPFq3%2bR72xqwGUv93HPNJADjB30%2fCS7%2fXHsuPBol%2f%2bk%2bZGkNP0gYU4z6nyfaE%2frIEKYlFa8hVdMqI03bOEtWeP2%2bJaSyEpbf0vI74qD6BoH%2fpq05zAOut2rz7TFKKF5kGzU0%2b73Bw%3d%3d"}' headers: cache-control: no-cache - content-length: '697' + content-length: '662' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:33 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: fa4dffe9-1122-4de1-be82-4e344ae96cf2 + x-ms-original-request-ids: 944ed266-c339-4ead-8bd3-9e54a3e3886b status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBJbVxTK2EAL7WpHTLLiW4xxc6mJM7G4lv77wuC%2BHDicewu0nN1bp5UN0luQvZSEllGQBl/ODTYFoOeaf8pearfg12mUC2F6YKfairEbXGe0BbBG7dNqjUJUtzBcNQ0PuRTLUNRJtI5amMQJBMNoLl0jRwsOnRiNNa1b7OUv49PZgUaepZPNP9hnPnThxZs%2BvokgSkLohx4frPKPRkm9IX0yVeXMOKpO9FztWb5jVFUUs4pRRGMCZ1bnrMeZmgnD3wVFP%2BVpeMdbcSXeaqBnUhxxblYE4SNWcYbVruD9YSYfjhVZnDNVHNlWIKKHEmeJ7%2BOS5fmSkNc99j1M4Ca43/8A + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRJ16xRkWIzQrUYaE8ceo8bV%2BYmJXWfpf58M7svlXM69GYO86mMztMrwbwYOM8Yz2/CNs9aT8gHoxSC%2BZC8HbYl1maVVjj1QS6HKuZl0Mw4KwALVz%2B4OmaiooelWlTCFLB2zLDx7Z9fQe/IgmObx0lRyViBpynlUY62td/mbi6XToJKd1LL6L%2BpVTI152ZabPLAh8ky4BT0%2BqHZ7HFs5BLzNP2j%2BxiinMcM5z7iXHnnH6%2BiAElY6hCU/KQuvadQi8h26yUpeTu2nS2C%2BJyvFNDrHBFN8gjFOceKQtYs3FpF1jyk/BMb9/gc%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwGEb/i4zd2SS2WhTK2IXp1s6Wpcm74V3UuLr4hYnFtvS/Twbn5oHDc%2B5Oqyb7UbXaONHdiV9PXJw8J3LO1vYmQqiRrfxRjWrtQt7GQS3yrkFmzEw%2BVL2tutYgnJEyWK2JS7ISu6uikK5U%2BdLNs9BbeyUO/RCjfuguVaEGg5IqHzrTlXaxV1eQY21RoWplVfE/zIvsK/cym/P5xsMkdPEMeX4yei52WrUb3oRjeppAkvRb1Oke6A6ETgWDFAQRPscTZBQaFuuJA/s9CBIITo9A4yuvGSgRxl%2BcHlT9vuI1yE/sB%2BnyfEzoLhZNr5nwY3ljR7Y9vwlgu4TSgOniwKDf8rmSYF8IjjfO4/EH + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuYoy6dQoyBN2waxxq4thl1Lj6F8XEYi1998rg3Bw4fN9NE3xVp0Z0UnNvWuhnhGam5mpnpSbpQjgwwf74wIXS2bbMXC/HAcqlkOXcTKoZhYRGgepX%2B4AAKmoD2FXFAOOlBcrCMQ9mbTgvjgGnebw0FZ8lxE05j3Kslf7FrzlbegUr3nPFq3%2BR72xqwGUv93HPNJADjB30/CS7/XHsuPBol/%2Bk%2BZGkNP0gYU4z6nyfaE/rIEKYlFa8hVdMqI03bOEtWeP2%2BJaSyEpbf0vI74qD6BoH/pq05zAOut2rz7TFKKF5kGzU0%2B73Bw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1RT4MwFIX%2fCzG%2bsbY4trBkMT7AA5MZob1beCtwUYQCoWXilv13q8l5%2bXK%2bnHNzelzMa9O32tndnPAl4yLznJ3zacyod4Qo2csPVNiblbzOE67KQRE9F7qcmtE0Q68JLVi9WW%2bZy4qauuuqkq7E8skti8DbejUN%2fICScRouTYWTJklTToMearM64A%2fIuTOkwg4NVv%2bgn%2bXYuBdr2vG9R1ngUhv2%2bKBb%2bzi02O%2b5CuY8W0Cy%2fCy6%2fABRDKLNRQo5CCZ8ThcoIlBp2C4c0q%2bj8MMTj4%2bokm%2buxikRbJOdO8vva04hwi4Sgkep7MTV9jK1vuBxKqn48wFDH4DHb1Idfc4gSlq2OXG6d%2b73Xw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNIm16xRkdMRCt6pUjaO7ixpdGv8wsWtT%2bu6TwXdz4HC%2bu9GzqzrwXkjDuxvBNs1Iahue8aPUKD0AOtrThnWsVxbV88SscuiAnAtZTnxUfOglgAWqX5wNMlFRQ9OpKmpSVq7MsnDtjV1Dd%2b1CME7DhVdskiDk5TTIoVbWJ7vldG4VqFjLFKv%2bQb7RkZuXxVzivg2Ra8Jl6PlJiuVxEKz3ici%2fkvwjS0iyy4KcpMSND6QlNd6jMCtXMRY60s061ESHWPzGePd6hIETnQOdZME1wtV7hE861A2MyTc%2bCnKN4AnGwR4l561vPB5%2f"}' headers: cache-control: no-cache - content-length: '701' + content-length: '655' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:33 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: d3cb7649-9603-4957-9b57-2fcc0698dbc4 + x-ms-original-request-ids: 0ef554fd-4da6-4ac4-b2c0-175df08113c9 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwGEb/i4zd2SS2WhTK2IXp1s6Wpcm74V3UuLr4hYnFtvS/Twbn5oHDc%2B5Oqyb7UbXaONHdiV9PXJw8J3LO1vYmQqiRrfxRjWrtQt7GQS3yrkFmzEw%2BVL2tutYgnJEyWK2JS7ISu6uikK5U%2BdLNs9BbeyUO/RCjfuguVaEGg5IqHzrTlXaxV1eQY21RoWplVfE/zIvsK/cym/P5xsMkdPEMeX4yei52WrUb3oRjeppAkvRb1Oke6A6ETgWDFAQRPscTZBQaFuuJA/s9CBIITo9A4yuvGSgRxl%2BcHlT9vuI1yE/sB%2BnyfEzoLhZNr5nwY3ljR7Y9vwlgu4TSgOniwKDf8rmSYF8IjjfO4/EH + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuYoy6dQoyBN2waxxq4thl1Lj6F8XEYi1998rg3Bw4fN9NE3xVp0Z0UnNvWuhnhGam5mpnpSbpQjgwwf74wIXS2bbMXC/HAcqlkOXcTKoZhYRGgepX%2B4AAKmoD2FXFAOOlBcrCMQ9mbTgvjgGnebw0FZ8lxE05j3Kslf7FrzlbegUr3nPFq3%2BR72xqwGUv93HPNJADjB30/CS7/XHsuPBol/%2Bk%2BZGkNP0gYU4z6nyfaE/rIEKYlFa8hVdMqI03bOEtWeP2%2BJaSyEpbf0vI74qD6BoH/pq05zAOut2rz7TFKKF5kGzU0%2B73Bw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1RT4MwFIX/CzG%2BsbY4trBkMT7AA5MZob1beCtwUYQCoWXilv13q8l5%2BXK%2BnHNzelzMa9O32tndnPAl4yLznJ3zacyod4Qo2csPVNiblbzOE67KQRE9F7qcmtE0Q68JLVi9WW%2BZy4qauuuqkq7E8skti8DbejUN/ICScRouTYWTJklTToMearM64A/IuTOkwg4NVv%2Bgn%2BXYuBdr2vG9R1ngUhv2%2BKBb%2Bzi02O%2B5CuY8W0Cy/Cy6/ABRDKLNRQo5CCZ8ThcoIlBp2C4c0q%2Bj8MMTj4%2Bokm%2BuxikRbJOdO8vva04hwi4Sgkep7MTV9jK1vuBxKqn48wFDH4DHb1Idfc4gSlq2OXG6d%2B73Xw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm16xRkdMRCt6pUjaO7ixpdGv8wsWtT%2Bu6TwXdz4HC%2Bu9GzqzrwXkjDuxvBNs1Iahue8aPUKD0AOtrThnWsVxbV88SscuiAnAtZTnxUfOglgAWqX5wNMlFRQ9OpKmpSVq7MsnDtjV1Dd%2B1CME7DhVdskiDk5TTIoVbWJ7vldG4VqFjLFKv%2BQb7RkZuXxVzivg2Ra8Jl6PlJiuVxEKz3ici/kvwjS0iyy4KcpMSND6QlNd6jMCtXMRY60s061ESHWPzGePd6hIETnQOdZME1wtV7hE861A2MyTc%2BCnKN4AnGwR4l561vPB5/ response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=LY1bT8IwGIb%2fy2K8G20Hk4yEGDEDAzK1ayvurtu%2byexOWTucEP67jTF5b568p4vTwGiey0ZpZ3FxwoeY8dhzFs7RmE4vEKplIz%2bhhsZM5HnoYZK1NdJDqrO%2b7EzZNhrhlBR3szlxSVpgd5bn0pWQTd0sDby5V%2bDADzDq%2bvZU5tBrtC%2bzvtVtYSY7%2bBFyqAzKoQID%2bR%2foe9mV7skm7fjSwyRwsRW5vdHKPrYKmiWrgyGJRyFJcuBVshPrreAq4VQkghPuMzyKdC1qGqqRCfoVcZ%2fHbPv6zxRCn78x8QLqY8bZKoIq%2fOZKxHQTTRmnPSh%2fzVQUi83xkWH6TrHlQ%2fciQv%2fJ%2bqu97cszXjrX6y8%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNIl16xRkyEzHuiZFaxy9jBqd%2f2JiWy1998nguzlwON9d68RNHcqulppz17B3itjJ1BztV6lBOgC0vOOFaEWnDL5MozDSvgVySmQ6loMq%2b04CmKD81doiHSU51K0s4zoX6UZPE9vcmjm0X2wIhrG%2flJkYJSBlOvayz5XxLeaYT40CmWiEEtk%2fyHc%2blPplNde4a0Jk63Aden6S9frY16JzWR3%2fhPE%2bClm4i3DMTsw%2bHljDcv8LkSi1SEQQrTxE%2fPpKKjKTqnmjcPdBl8Iii7cJMb5RjCGtiiuB%2b88gopguwRxU5zn0z672ePwB"}' headers: cache-control: no-cache - content-length: '707' + content-length: '654' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:42 GMT + date: Thu, 11 Nov 2021 03:24:34 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 8c16893a-4990-40cd-8cf3-09edb0707431 + x-ms-original-request-ids: 951459f6-6f30-4cba-81f4-336734596f37 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1RT4MwFIX/CzG%2BsbY4trBkMT7AA5MZob1beCtwUYQCoWXilv13q8l5%2BXK%2BnHNzelzMa9O32tndnPAl4yLznJ3zacyod4Qo2csPVNiblbzOE67KQRE9F7qcmtE0Q68JLVi9WW%2BZy4qauuuqkq7E8skti8DbejUN/ICScRouTYWTJklTToMearM64A/IuTOkwg4NVv%2Bgn%2BXYuBdr2vG9R1ngUhv2%2BKBb%2Bzi02O%2B5CuY8W0Cy/Cy6/ABRDKLNRQo5CCZ8ThcoIlBp2C4c0q%2Bj8MMTj4%2Bokm%2BuxikRbJOdO8vva04hwi4Sgkep7MTV9jK1vuBxKqn48wFDH4DHb1Idfc4gSlq2OXG6d%2B73Xw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm16xRkdMRCt6pUjaO7ixpdGv8wsWtT%2Bu6TwXdz4HC%2Bu9GzqzrwXkjDuxvBNs1Iahue8aPUKD0AOtrThnWsVxbV88SscuiAnAtZTnxUfOglgAWqX5wNMlFRQ9OpKmpSVq7MsnDtjV1Dd%2B1CME7DhVdskiDk5TTIoVbWJ7vldG4VqFjLFKv%2BQb7RkZuXxVzivg2Ra8Jl6PlJiuVxEKz3ici/kvwjS0iyy4KcpMSND6QlNd6jMCtXMRY60s061ESHWPzGePd6hIETnQOdZME1wtV7hE861A2MyTc%2BCnKN4AnGwR4l561vPB5/ - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=LY1bT8IwGIb/y2K8G20Hk4yEGDEDAzK1ayvurtu%2ByexOWTucEP67jTF5b568p4vTwGiey0ZpZ3FxwoeY8dhzFs7RmE4vEKplIz%2BhhsZM5HnoYZK1NdJDqrO%2B7EzZNhrhlBR3szlxSVpgd5bn0pWQTd0sDby5V%2BDADzDq%2BvZU5tBrtC%2BzvtVtYSY7%2BBFyqAzKoQID%2BR/oe9mV7skm7fjSwyRwsRW5vdHKPrYKmiWrgyGJRyFJcuBVshPrreAq4VQkghPuMzyKdC1qGqqRCfoVcZ/HbPv6zxRCn78x8QLqY8bZKoIq/OZKxHQTTRmnPSh/zVQUi83xkWH6TrHlQ/ciQv/J%2Bqu97cszXjrX6y8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIl16xRkyEzHuiZFaxy9jBqd/2JiWy1998nguzlwON9d68RNHcqulppz17B3itjJ1BztV6lBOgC0vOOFaEWnDL5MozDSvgVySmQ6loMq%2B04CmKD81doiHSU51K0s4zoX6UZPE9vcmjm0X2wIhrG/lJkYJSBlOvayz5XxLeaYT40CmWiEEtk/yHc%2BlPplNde4a0Jk63Aden6S9frY16JzWR3/hPE%2BClm4i3DMTsw%2BHljDcv8LkSi1SEQQrTxE/PpKKjKTqnmjcPdBl8Iii7cJMb5RjCGtiiuB%2B88gopguwRxU5zn0z672ePwB response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=Hc1Bb4IwHAXw70KW3bAtAw0mZtkBDjp0qe1%2fjluBMlktZbQozvjdx5a8yy95ee%2fmtXJ0r02rrLe8ecnLnvF94C29o3OdXSKkRSs%2bpZatm4mfoZez0mhkh8KWfdO5xrQW4YLU83BBfFLU2A%2brSvhClk9%2bWcTBIqhxHMUYdb05N5XsLcqasjfW1G62kVcQw8mhSp6kk9U%2f7LPoGv88NafxVYBJ7OMp5PHBqunRKNmumI6HfD%2bCIPmBn%2fINpGvgKucUcuCERwyPUKSgaaJGBvRry6Nveqh2QmeXP1d4MqM7SEzIFV1nKrxwtqVZAnOGKWyTKIXDkUpdXhmBDSXr5OMnfQNQV65gR9Pk8s7wyrvffwE%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fSxh70yRq1ynI2MVBu8aiTRzdW9S42XjDxFJT%2bt8rg%2fNy%2bA7fuYJOXPSu7qQCwRVErwfKDg4IwJ%2fWgwogbHnHf0UrOm1zM43CLvoWqilXxVgPuu47BVGOqydvjS2cV8jyypJbXBSuVeS%2bs3Yq5K98BIexP9elGBUkdTH2qq%2b0%2fSXmjE%2bNhqVohBblf1EvfKit87Jc5KGDsG%2bhJfjxQcnlsZeiC5nMvtNsS1OWftIoYwfm73esYdXHBhNaeIRKh5w2c2yku6dHE5v0mSwsZkc3Zgynp8TE0fadyGiVsJ%2b3BJELMclMEPESKkNwu90B"}' headers: cache-control: no-cache - content-length: '702' + content-length: '662' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:34 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 224173e3-e5f9-4a87-ba98-83a2ccff60ec + x-ms-original-request-ids: 68650ae3-7167-4f54-a574-6429efc98d03 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=LY1bT8IwGIb/y2K8G20Hk4yEGDEDAzK1ayvurtu%2ByexOWTucEP67jTF5b568p4vTwGiey0ZpZ3FxwoeY8dhzFs7RmE4vEKplIz%2BhhsZM5HnoYZK1NdJDqrO%2B7EzZNhrhlBR3szlxSVpgd5bn0pWQTd0sDby5V%2BDADzDq%2BvZU5tBrtC%2BzvtVtYSY7%2BBFyqAzKoQID%2BR/oe9mV7skm7fjSwyRwsRW5vdHKPrYKmiWrgyGJRyFJcuBVshPrreAq4VQkghPuMzyKdC1qGqqRCfoVcZ/HbPv6zxRCn78x8QLqY8bZKoIq/OZKxHQTTRmnPSh/zVQUi83xkWH6TrHlQ/ciQv/J%2Bqu97cszXjrX6y8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIl16xRkyEzHuiZFaxy9jBqd/2JiWy1998nguzlwON9d68RNHcqulppz17B3itjJ1BztV6lBOgC0vOOFaEWnDL5MozDSvgVySmQ6loMq%2B04CmKD81doiHSU51K0s4zoX6UZPE9vcmjm0X2wIhrG/lJkYJSBlOvayz5XxLeaYT40CmWiEEtk/yHc%2BlPplNde4a0Jk63Aden6S9frY16JzWR3/hPE%2BClm4i3DMTsw%2BHljDcv8LkSi1SEQQrTxE/PpKKjKTqnmjcPdBl8Iii7cJMb5RjCGtiiuB%2B88gopguwRxU5zn0z672ePwB - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=Hc1Bb4IwHAXw70KW3bAtAw0mZtkBDjp0qe1/jluBMlktZbQozvjdx5a8yy95ee/mtXJ0r02rrLe8ecnLnvF94C29o3OdXSKkRSs%2BpZatm4mfoZez0mhkh8KWfdO5xrQW4YLU83BBfFLU2A%2BrSvhClk9%2BWcTBIqhxHMUYdb05N5XsLcqasjfW1G62kVcQw8mhSp6kk9U/7LPoGv88NafxVYBJ7OMp5PHBqunRKNmumI6HfD%2BCIPmBn/INpGvgKucUcuCERwyPUKSgaaJGBvRry6Nveqh2QmeXP1d4MqM7SEzIFV1nKrxwtqVZAnOGKWyTKIXDkUpdXhmBDSXr5OMnfQNQV65gR9Pk8s7wyrvffwE%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/Sxh70yRq1ynI2MVBu8aiTRzdW9S42XjDxFJT%2Bt8rg/Ny%2BA7fuYJOXPSu7qQCwRVErwfKDg4IwJ/WgwogbHnHf0UrOm1zM43CLvoWqilXxVgPuu47BVGOqydvjS2cV8jyypJbXBSuVeS%2Bs3Yq5K98BIexP9elGBUkdTH2qq%2B0/SXmjE%2BNhqVohBblf1EvfKit87Jc5KGDsG%2BhJfjxQcnlsZeiC5nMvtNsS1OWftIoYwfm73esYdXHBhNaeIRKh5w2c2yku6dHE5v0mSwsZkc3Zgynp8TE0fadyGiVsJ%2B3BJELMclMEPESKkNwu90B response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da8IwGIX%2fSxm7q0k6q1SQMaEZzKksTV5c7tI2nV3sB00qVfG%2fLwzOzQPnOecetHpyn3VrbLC6B%2blbxkUWBavg5FxvVwg1qlU%2futGtm6nbOOhZ0TXIjrkthrp3dddahHNSLeZLEpK8wuG8LFWodPESFnkSLaMKJ3GCUT90l7rUg0W7uhg621VuttVXUOPZoVKftdPlP9hX1dfhxTf9%2bDrCJAmxD3l%2bssY%2fdka3a94ko8wmUEQexVlugX6AMFIwkCCIiDmeIKfQsNRMHNjvXsQLduwP2hjiebNLk5RzOAD9nnPBLKNUyBswEPgqgO11GlPONweFJRWGgfeBG5ax91Pq2X7hGDKO18Hj8Qc%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAEb%2fi4y9aRJn1ynI2KgFXWNRE0f3FmNs4x0TSy%2f0v1cG5%2bXA4fvuRi8ueif7Rhne3Qi%2bMkIz2%2fCMk9aj8gDoWM%2bOohO9tthtnoTFhw6ouVB8kqOWQ68ALFD17qyRiYoKmk5ZMpMJ%2fmbywrXXdgXdlQvBOA1nWYpJASz5NKih0taPuOZsbjUoRSu0KP9FfbJRmuelXMZ9GyLXhAvo9UU1y%2bPQiN6nTf6b5hFJabolQU4z6u53tKXVJkSYcAfXR7Qn%2fIrrxMakcTA5fWASrjCldgKDxf%2bCOAhhSqPvpMbXODigGOJLfIu28ebgG4%2fHEw%3d%3d"}' headers: cache-control: no-cache - content-length: '695' + content-length: '662' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:34 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 2b157c12-2686-4317-873b-aa87cd896a20 + x-ms-original-request-ids: 2bad62c4-7fd2-4c7d-90cd-8f9de89376dc status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=Hc1Bb4IwHAXw70KW3bAtAw0mZtkBDjp0qe1/jluBMlktZbQozvjdx5a8yy95ee/mtXJ0r02rrLe8ecnLnvF94C29o3OdXSKkRSs%2BpZatm4mfoZez0mhkh8KWfdO5xrQW4YLU83BBfFLU2A%2BrSvhClk9%2BWcTBIqhxHMUYdb05N5XsLcqasjfW1G62kVcQw8mhSp6kk9U/7LPoGv88NafxVYBJ7OMp5PHBqunRKNmumI6HfD%2BCIPmBn/INpGvgKucUcuCERwyPUKSgaaJGBvRry6Nveqh2QmeXP1d4MqM7SEzIFV1nKrxwtqVZAnOGKWyTKIXDkUpdXhmBDSXr5OMnfQNQV65gR9Pk8s7wyrvffwE%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/Sxh70yRq1ynI2MVBu8aiTRzdW9S42XjDxFJT%2Bt8rg/Ny%2BA7fuYJOXPSu7qQCwRVErwfKDg4IwJ/WgwogbHnHf0UrOm1zM43CLvoWqilXxVgPuu47BVGOqydvjS2cV8jyypJbXBSuVeS%2Bs3Yq5K98BIexP9elGBUkdTH2qq%2B0/SXmjE%2BNhqVohBblf1EvfKit87Jc5KGDsG%2BhJfjxQcnlsZeiC5nMvtNsS1OWftIoYwfm73esYdXHBhNaeIRKh5w2c2yku6dHE5v0mSwsZkc3Zgynp8TE0fadyGiVsJ%2B3BJELMclMEPESKkNwu90B - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da8IwGIX/Sxm7q0k6q1SQMaEZzKksTV5c7tI2nV3sB00qVfG/LwzOzQPnOecetHpyn3VrbLC6B%2BlbxkUWBavg5FxvVwg1qlU/utGtm6nbOOhZ0TXIjrkthrp3dddahHNSLeZLEpK8wuG8LFWodPESFnkSLaMKJ3GCUT90l7rUg0W7uhg621VuttVXUOPZoVKftdPlP9hX1dfhxTf9%2BDrCJAmxD3l%2BssY/dka3a94ko8wmUEQexVlugX6AMFIwkCCIiDmeIKfQsNRMHNjvXsQLduwP2hjiebNLk5RzOAD9nnPBLKNUyBswEPgqgO11GlPONweFJRWGgfeBG5ax91Pq2X7hGDKO18Hj8Qc%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9aRJn1ynI2KgFXWNRE0f3FmNs4x0TSy/0v1cG5%2BXA4fvuRi8ueif7Rhne3Qi%2BMkIz2/CMk9aj8gDoWM%2BOohO9tthtnoTFhw6ouVB8kqOWQ68ALFD17qyRiYoKmk5ZMpMJ/mbywrXXdgXdlQvBOA1nWYpJASz5NKih0taPuOZsbjUoRSu0KP9FfbJRmuelXMZ9GyLXhAvo9UU1y%2BPQiN6nTf6b5hFJabolQU4z6u53tKXVJkSYcAfXR7Qn/IrrxMakcTA5fWASrjCldgKDxf%2BCOAhhSqPvpMbXODigGOJLfIu28ebgG4/HEw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwGEb%2fi4zd2SSutliQsbEotKtlafKueBc1bi5%2b1cRiV%2frfJ4Pn5sDhPDenVZN9r1ptnM3NoS9HLo6es3G%2bre3NBqFGtvJLNaq1C%2fk7DmqRdw0yY2byoept1bUG4YyUq%2bWauCQrsbssCulKlT%2b5eRZ4a6%2fEgR9g1A%2fdpSrUYNC%2byofOdKVd7NQV5FhbVKhaWVX8g3mWfeVeZnOOhx4mgYvnkccHo%2bfHTqs25E0wpscJJElPok53EG1B6FQwSEEQ4XM8QRZBw6ieOLCfRAQUTn0CsbnyUz8oSlYf%2fPUAtFtyAqmiPgBPmNR44k0f7bVPP3l0YPH0JjSLmSBnrtNEEo0FQMzq7ZlzHDr3%2bx8%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HU1da4MwAPwvMvYWE52uU5BRVgW3xqEmju4tamxTPzGxtJb%2b94Vx93LHfdyNgV%2fVXgytNPy7EW5zQnPb8I2TUpP0IezZwI6854My2brM3KzGHsqllNUsJiXGQUJUWs2rs7GAVTYIOHXNAOPVC6hKz97YDfJcD8FpHi%2bi5rOEWFTzKMdGmV%2f8VrClU7DmHVe8%2fhfynU0CXHRSjwc2sjyANK3nJ9nqx7HlQ0Db4icrPklGs4iEBc2p972nHW12sYVJ5eDz0Ul2MUrIFiUrdhMSvaUtXTMar5icouz8GyYaGIVuSg833B6u6Vp8aGfVvcB4PP4A"}' headers: cache-control: no-cache - content-length: '694' + content-length: '654' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:34 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 627c5a69-1bd6-454a-988e-0442e3c1f8e1 + x-ms-original-request-ids: 81f8c0d6-5f37-4167-a9a4-43718f7ad95f status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da8IwGIX/Sxm7q0k6q1SQMaEZzKksTV5c7tI2nV3sB00qVfG/LwzOzQPnOecetHpyn3VrbLC6B%2BlbxkUWBavg5FxvVwg1qlU/utGtm6nbOOhZ0TXIjrkthrp3dddahHNSLeZLEpK8wuG8LFWodPESFnkSLaMKJ3GCUT90l7rUg0W7uhg621VuttVXUOPZoVKftdPlP9hX1dfhxTf9%2BDrCJAmxD3l%2BssY/dka3a94ko8wmUEQexVlugX6AMFIwkCCIiDmeIKfQsNRMHNjvXsQLduwP2hjiebNLk5RzOAD9nnPBLKNUyBswEPgqgO11GlPONweFJRWGgfeBG5ax91Pq2X7hGDKO18Hj8Qc%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9aRJn1ynI2KgFXWNRE0f3FmNs4x0TSy/0v1cG5%2BXA4fvuRi8ueif7Rhne3Qi%2BMkIz2/CMk9aj8gDoWM%2BOohO9tthtnoTFhw6ouVB8kqOWQ68ALFD17qyRiYoKmk5ZMpMJ/mbywrXXdgXdlQvBOA1nWYpJASz5NKih0taPuOZsbjUoRSu0KP9FfbJRmuelXMZ9GyLXhAvo9UU1y%2BPQiN6nTf6b5hFJabolQU4z6u53tKXVJkSYcAfXR7Qn/IrrxMakcTA5fWASrjCldgKDxf%2BCOAhhSqPvpMbXODigGOJLfIu28ebgG4/HEw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwGEb/i4zd2SSutliQsbEotKtlafKueBc1bi5%2B1cRiV/rfJ4Pn5sDhPDenVZN9r1ptnM3NoS9HLo6es3G%2Bre3NBqFGtvJLNaq1C/k7DmqRdw0yY2byoept1bUG4YyUq%2BWauCQrsbssCulKlT%2B5eRZ4a6/EgR9g1A/dpSrUYNC%2ByofOdKVd7NQV5FhbVKhaWVX8g3mWfeVeZnOOhx4mgYvnkccHo%2BfHTqs25E0wpscJJElPok53EG1B6FQwSEEQ4XM8QRZBw6ieOLCfRAQUTn0CsbnyUz8oSlYf/PUAtFtyAqmiPgBPmNR44k0f7bVPP3l0YPH0JjSLmSBnrtNEEo0FQMzq7ZlzHDr3%2Bx8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HU1da4MwAPwvMvYWE52uU5BRVgW3xqEmju4tamxTPzGxtJb%2B94Vx93LHfdyNgV/VXgytNPy7EW5zQnPb8I2TUpP0IezZwI6854My2brM3KzGHsqllNUsJiXGQUJUWs2rs7GAVTYIOHXNAOPVC6hKz97YDfJcD8FpHi%2Bi5rOEWFTzKMdGmV/8VrClU7DmHVe8/hfynU0CXHRSjwc2sjyANK3nJ9nqx7HlQ0Db4icrPklGs4iEBc2p972nHW12sYVJ5eDz0Ul2MUrIFiUrdhMSvaUtXTMar5icouz8GyYaGIVuSg833B6u6Vp8aGfVvcB4PP4A response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3LboMwFET%2fBVXdEdvkJSKhqguIRJqkAd%2bblJ0B01LMo9hENFH%2bvajSbEbnaOZuNXI0b2VTaWtzt%2fzXmEPsWBvry5hObwipRSM%2bZS0bMxO3oZezrK2JHlKd9WVnyrbRhKasWC3WzGZpQe1FngtbyGxuZ6nrrJ2CukuXkq5vr2Uue032Zda3ui3MbCd%2fUQzKkFwqaWT%2bX%2fSL6Er7OpnTuOdQ5tp0Cnt%2b0tX02Fay8XjtDkk8omDJBVSywyBEqBKIMEFgsOR0xDTAOvKrkWP0fQAXYh4eogBu%2fNw1e8ogmaujVB%2bLie9OLAw4DyNZ%2bZQDHiNY%2bnDp3hFwNfHtSYU%2fwMMYMdmCwnPEAjxz6lmPxx8%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ta4MwAIT%2fi4x90yRW1ynI2GiEbY2lMXF036LGzXcxsXSW%2fveGwR3HwcPd1RrkRe%2froVVWeLXwa8p46lqh9av1pEIAejGIH9nLQTtiXWbpFGMP1JKrYq4nXY%2bDAjBH1ZO3RTbKK2h7ZSlsIYuNXeSBu3UrGPgBBNM8nutSzgqQuphHNVba%2bZR%2fmVg6DUrZSS3L%2f6JexFTbZ0Oa8ciFKLChEXp8UK15HFs5RLzNvmj2wSinMcMZT3lw2POOV7t3RFjhkfXoE4bXZOXGBCVN%2fEyb1qecbAg8uUdGLgnG7gHHb5SZ3JWYtN8xbQwLT5F1u90B"}' headers: cache-control: no-cache - content-length: '706' + content-length: '662' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:34 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: b638c58e-ca4d-47cf-b426-d4328e7c728f + x-ms-original-request-ids: 78ef6267-3d04-4401-bc95-c4de587f7a41 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwGEb/i4zd2SSutliQsbEotKtlafKueBc1bi5%2B1cRiV/rfJ4Pn5sDhPDenVZN9r1ptnM3NoS9HLo6es3G%2Bre3NBqFGtvJLNaq1C/k7DmqRdw0yY2byoept1bUG4YyUq%2BWauCQrsbssCulKlT%2B5eRZ4a6/EgR9g1A/dpSrUYNC%2ByofOdKVd7NQV5FhbVKhaWVX8g3mWfeVeZnOOhx4mgYvnkccHo%2BfHTqs25E0wpscJJElPok53EG1B6FQwSEEQ4XM8QRZBw6ieOLCfRAQUTn0CsbnyUz8oSlYf/PUAtFtyAqmiPgBPmNR44k0f7bVPP3l0YPH0JjSLmSBnrtNEEo0FQMzq7ZlzHDr3%2Bx8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HU1da4MwAPwvMvYWE52uU5BRVgW3xqEmju4tamxTPzGxtJb%2B94Vx93LHfdyNgV/VXgytNPy7EW5zQnPb8I2TUpP0IezZwI6854My2brM3KzGHsqllNUsJiXGQUJUWs2rs7GAVTYIOHXNAOPVC6hKz97YDfJcD8FpHi%2Bi5rOEWFTzKMdGmV/8VrClU7DmHVe8/hfynU0CXHRSjwc2sjyANK3nJ9nqx7HlQ0Db4icrPklGs4iEBc2p972nHW12sYVJ5eDz0Ul2MUrIFiUrdhMSvaUtXTMar5icouz8GyYaGIVuSg833B6u6Vp8aGfVvcB4PP4A - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3LboMwFET/BVXdEdvkJSKhqguIRJqkAd%2BblJ0B01LMo9hENFH%2BvajSbEbnaOZuNXI0b2VTaWtzt/zXmEPsWBvry5hObwipRSM%2BZS0bMxO3oZezrK2JHlKd9WVnyrbRhKasWC3WzGZpQe1FngtbyGxuZ6nrrJ2CukuXkq5vr2Uue032Zda3ui3MbCd/UQzKkFwqaWT%2BX/SL6Er7OpnTuOdQ5tp0Cnt%2B0tX02Fay8XjtDkk8omDJBVSywyBEqBKIMEFgsOR0xDTAOvKrkWP0fQAXYh4eogBu/Nw1e8ogmaujVB%2BLie9OLAw4DyNZ%2BZQDHiNY%2BnDp3hFwNfHtSYU/wMMYMdmCwnPEAjxz6lmPxx8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ta4MwAIT/i4x90yRW1ynI2GiEbY2lMXF036LGzXcxsXSW/veGwR3HwcPd1RrkRe/roVVWeLXwa8p46lqh9av1pEIAejGIH9nLQTtiXWbpFGMP1JKrYq4nXY%2BDAjBH1ZO3RTbKK2h7ZSlsIYuNXeSBu3UrGPgBBNM8nutSzgqQuphHNVba%2BZR/mVg6DUrZSS3L/6JexFTbZ0Oa8ciFKLChEXp8UK15HFs5RLzNvmj2wSinMcMZT3lw2POOV7t3RFjhkfXoE4bXZOXGBCVN/Eyb1qecbAg8uUdGLgnG7gHHb5SZ3JWYtN8xbQwLT5F1u90B response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3dboIwAEbfhSy7w7YIGkzMMhdqopNspa3KXYEyGX%2bVFoca333E5Ls5yZdz7lYjB%2fNZNKW2FncreI8oixxrYZ2MUXoBQC0a8SNr2ZiJuPWdnKRtDXSf6LQrlCnaRgOYoHzmzpGNkhzabpYJW8h0aqeJ78ydHPqeD4Hq2kuRyU6DXZF2rW5zM9nKKxd9ZUAmK2lk9gT9JlRhX8bnKF86EPk2HIdeX3Q5FttSNkta%2b30cDVyg%2bMCqeMvxhrMyZoTHnCHmUTjwBPOaBOVAOfkNmc%2f2dBUSjKcjhzJA5%2bNt9cWDo0v3Kvqu8IzSMCJMrSkia8I8zA6K7IL4gzK%2b2ZXeWUxPIcfB05dB949RuLQej38%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1fa4MwAMS%2fi4y9aRJn1ynIGNWBXaNUE%2fcck%2bisfzFpu1n63RsG93LH7%2b5u1ih%2f9aEdO2UFNyv%2bKAgtXCuwfrSeVQDAwEbWyEGO2mHreZEOnwagzpXiSzvrdhoVgBWqX70tslFVQ9sTgtlM8hebV767dWvob3wI5mW6tEIuCuCWL5Oaau18yb%2bSnXsNhOylluLfqHc2t%2fbFkGY8dCHybWiEnp9UZx6nTo4h7crvvNyTnOafJC5pQf3sQHtaRwnChHtphBE%2bHSGOmjUzWUr2b3mMryk5uhlJNhktd2nEr3htVhyJXUpjw4s4i0zzlITW%2ff4A"}' headers: cache-control: no-cache - content-length: '709' + content-length: '642' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:34 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 345451fb-43a7-41c2-9c5e-bbdaeec72035 + x-ms-original-request-ids: 75220e08-c441-46d0-a5b9-179ab258b103 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3LboMwFET/BVXdEdvkJSKhqguIRJqkAd%2BblJ0B01LMo9hENFH%2BvajSbEbnaOZuNXI0b2VTaWtzt/zXmEPsWBvry5hObwipRSM%2BZS0bMxO3oZezrK2JHlKd9WVnyrbRhKasWC3WzGZpQe1FngtbyGxuZ6nrrJ2CukuXkq5vr2Uue032Zda3ui3MbCd/UQzKkFwqaWT%2BX/SL6Er7OpnTuOdQ5tp0Cnt%2B0tX02Fay8XjtDkk8omDJBVSywyBEqBKIMEFgsOR0xDTAOvKrkWP0fQAXYh4eogBu/Nw1e8ogmaujVB%2BLie9OLAw4DyNZ%2BZQDHiNY%2BnDp3hFwNfHtSYU/wMMYMdmCwnPEAjxz6lmPxx8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ta4MwAIT/i4x90yRW1ynI2GiEbY2lMXF036LGzXcxsXSW/veGwR3HwcPd1RrkRe/roVVWeLXwa8p46lqh9av1pEIAejGIH9nLQTtiXWbpFGMP1JKrYq4nXY%2BDAjBH1ZO3RTbKK2h7ZSlsIYuNXeSBu3UrGPgBBNM8nutSzgqQuphHNVba%2BZR/mVg6DUrZSS3L/6JexFTbZ0Oa8ciFKLChEXp8UK15HFs5RLzNvmj2wSinMcMZT3lw2POOV7t3RFjhkfXoE4bXZOXGBCVN/Eyb1qecbAg8uUdGLgnG7gHHb5SZ3JWYtN8xbQwLT5F1u90B - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3dboIwAEbfhSy7w7YIGkzMMhdqopNspa3KXYEyGX%2BVFoca333E5Ls5yZdz7lYjB/NZNKW2FncreI8oixxrYZ2MUXoBQC0a8SNr2ZiJuPWdnKRtDXSf6LQrlCnaRgOYoHzmzpGNkhzabpYJW8h0aqeJ78ydHPqeD4Hq2kuRyU6DXZF2rW5zM9nKKxd9ZUAmK2lk9gT9JlRhX8bnKF86EPk2HIdeX3Q5FttSNkta%2B30cDVyg%2BMCqeMvxhrMyZoTHnCHmUTjwBPOaBOVAOfkNmc/2dBUSjKcjhzJA5%2BNt9cWDo0v3Kvqu8IzSMCJMrSkia8I8zA6K7IL4gzK%2B2ZXeWUxPIcfB05dB949RuLQej38%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1fa4MwAMS/i4y9aRJn1ynIGNWBXaNUE/cck%2BisfzFpu1n63RsG93LH7%2B5u1ih/9aEdO2UFNyv%2BKAgtXCuwfrSeVQDAwEbWyEGO2mHreZEOnwagzpXiSzvrdhoVgBWqX70tslFVQ9sTgtlM8hebV767dWvob3wI5mW6tEIuCuCWL5Oaau18yb%2BSnXsNhOylluLfqHc2t/bFkGY8dCHybWiEnp9UZx6nTo4h7crvvNyTnOafJC5pQf3sQHtaRwnChHtphBE%2BHSGOmjUzWUr2b3mMryk5uhlJNhktd2nEr3htVhyJXUpjw4s4i0zzlITW/f4A response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RasIwGEbfpYzd1SRVJynI2KAKOhXT5Fd6l7bpVtKmJUmlTnz3lcF3c%2bBwvkdg1Oi%2faqNdED%2bC5CPlIo2COPjxvncxQq008lu1yviZ%2fB2smhVdi9yQu8LWva874xDOSfW2WJGQ5BUOF2UpQ6mKeVjkNFpFFaZLilFvu1tdKuvQoS5s57rKz%2fbqDnJoPCpVo7wq%2f8G9y74Ob5M5xdcRJjTE08jri9PTY6eVWfOWDlk6giTZVTTZHjY7EDoTDDIQRCw5HiHfQMsSPXJgpsREpNf%2bJJvkzgnbHRMqOP88se15wTWzB03sRbMTbIs7B0jPepmAPjLZOiI0uzBNhUx2R6nJfOrtz80GLhyvg%2bfzDw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1bT4MwAEb%2fCzG%2blV6GTkiI2TI00xVTaDE%2bFijIndAyHcv%2bu8TkeznJyfmuVq9%2bzanqG215VyvYxVzExPKsb2NG7UHYyV6WqlO9seUyT8rOhg7qOdXZVI2mGnoNUYqLR2eLAU4LBJw8l0CqbAOy1CVbUiD3wUVwnIZzlatJQ1pl06CHwtjv6pLIuTUwV60yKv8H%2fSzHCpxXc437BGEXoHX4%2fk436%2bPQqN4XTfIZJW88EtELDxIRC%2ffjJFpRHI6Y8swJD9ShnGG6ND8hPxJaJ0%2bs3r9GNd2wZXdhSxiEASWMlzisvxATwUKXElMR7hlivnW7%2fQE%3d"}' headers: cache-control: no-cache - content-length: '703' + content-length: '671' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:34 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 7fc5415e-e3d3-4d10-b54f-c6a58554f91b + x-ms-original-request-ids: 818f0e93-7f64-4901-bea1-d489b7553a35 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3dboIwAEbfhSy7w7YIGkzMMhdqopNspa3KXYEyGX%2BVFoca333E5Ls5yZdz7lYjB/NZNKW2FncreI8oixxrYZ2MUXoBQC0a8SNr2ZiJuPWdnKRtDXSf6LQrlCnaRgOYoHzmzpGNkhzabpYJW8h0aqeJ78ydHPqeD4Hq2kuRyU6DXZF2rW5zM9nKKxd9ZUAmK2lk9gT9JlRhX8bnKF86EPk2HIdeX3Q5FttSNkta%2B30cDVyg%2BMCqeMvxhrMyZoTHnCHmUTjwBPOaBOVAOfkNmc/2dBUSjKcjhzJA5%2BNt9cWDo0v3Kvqu8IzSMCJMrSkia8I8zA6K7IL4gzK%2B2ZXeWUxPIcfB05dB949RuLQej38%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1fa4MwAMS/i4y9aRJn1ynIGNWBXaNUE/cck%2BisfzFpu1n63RsG93LH7%2B5u1ih/9aEdO2UFNyv%2BKAgtXCuwfrSeVQDAwEbWyEGO2mHreZEOnwagzpXiSzvrdhoVgBWqX70tslFVQ9sTgtlM8hebV767dWvob3wI5mW6tEIuCuCWL5Oaau18yb%2BSnXsNhOylluLfqHc2t/bFkGY8dCHybWiEnp9UZx6nTo4h7crvvNyTnOafJC5pQf3sQHtaRwnChHtphBE%2BHSGOmjUzWUr2b3mMryk5uhlJNhktd2nEr3htVhyJXUpjw4s4i0zzlITW/f4A - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RasIwGEbfpYzd1SRVJynI2KAKOhXT5Fd6l7bpVtKmJUmlTnz3lcF3c%2BBwvkdg1Oi/aqNdED%2BC5CPlIo2COPjxvncxQq008lu1yviZ/B2smhVdi9yQu8LWva874xDOSfW2WJGQ5BUOF2UpQ6mKeVjkNFpFFaZLilFvu1tdKuvQoS5s57rKz/bqDnJoPCpVo7wq/8G9y74Ob5M5xdcRJjTE08jri9PTY6eVWfOWDlk6giTZVTTZHjY7EDoTDDIQRCw5HiHfQMsSPXJgpsREpNf%2BJJvkzgnbHRMqOP88se15wTWzB03sRbMTbIs7B0jPepmAPjLZOiI0uzBNhUx2R6nJfOrtz80GLhyvg%2BfzDw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1bT4MwAEb/CzG%2BlV6GTkiI2TI00xVTaDE%2BFijIndAyHcv%2Bu8TkeznJyfmuVq9%2BzanqG215VyvYxVzExPKsb2NG7UHYyV6WqlO9seUyT8rOhg7qOdXZVI2mGnoNUYqLR2eLAU4LBJw8l0CqbAOy1CVbUiD3wUVwnIZzlatJQ1pl06CHwtjv6pLIuTUwV60yKv8H/SzHCpxXc437BGEXoHX4/k436%2BPQqN4XTfIZJW88EtELDxIRC/fjJFpRHI6Y8swJD9ShnGG6ND8hPxJaJ0%2Bs3r9GNd2wZXdhSxiEASWMlzisvxATwUKXElMR7hlivnW7/QE%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1Rb4IwHMS%2fC1n2hm1RZyAxyx7Kg05doP3reCtQNiwtjBZlM373seXu5ZLf3d08I0f3Whtlvejm0ZeU8TTwIu%2fTuc5GCGlhxIfU0riZ%2bBl6OStajeyQ26KvO1e3xiKck%2bppsSI%2bySvsL8pS%2bEIWc7%2fIw2AVVDhchhh1fXupS9lbtKuLvrVt5WZb%2bQ1iaBwqZSOdLP%2bDfRZd7V8mchpfB5iEPp5MHh%2bsmh5bJc2a6XDI0hEEyU68ybYQb4CrjCeQASd8yfAIeQw6oWpkkJgSk6%2f01LwBxZjp7rxTIT%2by5AD0fcFUMikExuAgCMfs6JIdXlJQm73UxZUfu%2fNfX9B9CnE859rFkuJryvDau99%2fAQ%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fSxh7i4nOrVOQsaGCW2NRE%2fccNa7OT0wsNaX%2ffWFwXw7cc%2b8NTOKqjt3US%2bDfQPReUFY4wAdnpRbpIzTyif%2bIUUzK4npbhVXPI5JbJeu1W1Q3TxLhym5f3IMN7arF0G0aDrmon2Bdec7BabH37GG0rPOla8QqEenqdZZzq6wvsZd8GxRqxCCUaP5BvvGlgxfTNOOBg20PYhP78UH25nHuxRSwvvzOy0%2baszymUckK5p2ObGBtmNiE1m5KGT6F2U40MRy5afjxmrIyzCnRJ5rgVBOcRsme%2f56jTMdx1mc6j8iV6CY0bgDu9z8%3d"}' headers: cache-control: no-cache - content-length: '694' + content-length: '653' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:35 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 38c078fc-6142-4101-94c1-a252a180f42b + x-ms-original-request-ids: 50dd5a32-1d32-4f72-b38c-6756bc72d2fd status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RasIwGEbfpYzd1SRVJynI2KAKOhXT5Fd6l7bpVtKmJUmlTnz3lcF3c%2BBwvkdg1Oi/aqNdED%2BC5CPlIo2COPjxvncxQq008lu1yviZ/B2smhVdi9yQu8LWva874xDOSfW2WJGQ5BUOF2UpQ6mKeVjkNFpFFaZLilFvu1tdKuvQoS5s57rKz/bqDnJoPCpVo7wq/8G9y74Ob5M5xdcRJjTE08jri9PTY6eVWfOWDlk6giTZVTTZHjY7EDoTDDIQRCw5HiHfQMsSPXJgpsREpNf%2BJJvkzgnbHRMqOP88se15wTWzB03sRbMTbIs7B0jPepmAPjLZOiI0uzBNhUx2R6nJfOrtz80GLhyvg%2BfzDw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1bT4MwAEb/CzG%2BlV6GTkiI2TI00xVTaDE%2BFijIndAyHcv%2Bu8TkeznJyfmuVq9%2BzanqG215VyvYxVzExPKsb2NG7UHYyV6WqlO9seUyT8rOhg7qOdXZVI2mGnoNUYqLR2eLAU4LBJw8l0CqbAOy1CVbUiD3wUVwnIZzlatJQ1pl06CHwtjv6pLIuTUwV60yKv8H/SzHCpxXc437BGEXoHX4/k436%2BPQqN4XTfIZJW88EtELDxIRC/fjJFpRHI6Y8swJD9ShnGG6ND8hPxJaJ0%2Bs3r9GNd2wZXdhSxiEASWMlzisvxATwUKXElMR7hlivnW7/QE%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Rb4IwHMS/C1n2hm1RZyAxyx7Kg05doP3reCtQNiwtjBZlM373seXu5ZLf3d08I0f3Whtlvejm0ZeU8TTwIu/Tuc5GCGlhxIfU0riZ%2BBl6OStajeyQ26KvO1e3xiKck%2BppsSI%2BySvsL8pS%2BEIWc7/Iw2AVVDhchhh1fXupS9lbtKuLvrVt5WZb%2BQ1iaBwqZSOdLP%2BDfRZd7V8mchpfB5iEPp5MHh%2Bsmh5bJc2a6XDI0hEEyU68ybYQb4CrjCeQASd8yfAIeQw6oWpkkJgSk6/01LwBxZjp7rxTIT%2By5AD0fcFUMikExuAgCMfs6JIdXlJQm73UxZUfu/NfX9B9CnE859rFkuJryvDau99/AQ%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/Sxh7i4nOrVOQsaGCW2NRE/ccNa7OT0wsNaX/fWFwXw7cc%2B8NTOKqjt3US%2BDfQPReUFY4wAdnpRbpIzTyif%2BIUUzK4npbhVXPI5JbJeu1W1Q3TxLhym5f3IMN7arF0G0aDrmon2Bdec7BabH37GG0rPOla8QqEenqdZZzq6wvsZd8GxRqxCCUaP5BvvGlgxfTNOOBg20PYhP78UH25nHuxRSwvvzOy0%2BaszymUckK5p2ObGBtmNiE1m5KGT6F2U40MRy5afjxmrIyzCnRJ5rgVBOcRsme/56jTMdx1mc6j8iV6CY0bgDu9z8%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ha8IwGIT%2fSxn7VpN0VqkgY7A60E0xJu%2bk39L27exi09qk0k387wuD%2b3LH3XO3wODo3mujbbC4BenLQchDFCyCk3OdXRDSKKO%2bsEHjJup36HFStA2xQ26Lvu5c3RpLaM6q2XTOQpZXNJyWpQoVFk9hkSfRPKpoEieUdH17rUvsLfmoi761beUmG%2fwBNZwdKfGMDst%2fY59VV4dX3%2fTwZURZElIv9vhgtX9sNZqlaJIhO4ygWHaU52wDqzVInUkOGUgmY0FHyFfQ8FSPArgpKbvI42mHjf0Rmn9jyi5crLb8bT%2bVwHcc1r0Q662HjBIAUMfpp%2fa59DTgek%2fZTAjw%2ffFVNN2G69jv6TK43%2f8A"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9aRJn1ynI6FChXZNSTRx7jBo760fExOos%2fe%2bTwYXLgcu5d6MTsz5WXa0M726Eu4SyxDY840frXnkAtLzjF9GKTlt8GQdh5bIFasxUPlS9rmSnAMxQ%2bepskYmyEppOUXCTi%2fzFzDPX3toldDcuBP0gb1UhBgVwlQ9SyVJbn%2bI35WOjQSEaoUXxD%2bqd95V5W5er3Lchck24Bj0%2fqXp9lLXofFanX3F6oDGLIxqmLGHu6cgaVgZ7hGnukOtlwtf9TOh5IgGeSRC%2fERoiEtR2vHYcYETCwweB4QYvJDovOwfXeMI0ik702zcejz8%3d"}' headers: cache-control: no-cache - content-length: '701' + content-length: '661' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:35 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 6d57fce8-79ac-4f08-80b0-155d21db8e27 + x-ms-original-request-ids: 24762f40-f95f-4596-9256-7fb4cf78f3b7 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Rb4IwHMS/C1n2hm1RZyAxyx7Kg05doP3reCtQNiwtjBZlM373seXu5ZLf3d08I0f3Whtlvejm0ZeU8TTwIu/Tuc5GCGlhxIfU0riZ%2BBl6OStajeyQ26KvO1e3xiKck%2BppsSI%2BySvsL8pS%2BEIWc7/Iw2AVVDhchhh1fXupS9lbtKuLvrVt5WZb%2BQ1iaBwqZSOdLP%2BDfRZd7V8mchpfB5iEPp5MHh%2Bsmh5bJc2a6XDI0hEEyU68ybYQb4CrjCeQASd8yfAIeQw6oWpkkJgSk6/01LwBxZjp7rxTIT%2By5AD0fcFUMikExuAgCMfs6JIdXlJQm73UxZUfu/NfX9B9CnE859rFkuJryvDau99/AQ%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/Sxh7i4nOrVOQsaGCW2NRE/ccNa7OT0wsNaX/fWFwXw7cc%2B8NTOKqjt3US%2BDfQPReUFY4wAdnpRbpIzTyif%2BIUUzK4npbhVXPI5JbJeu1W1Q3TxLhym5f3IMN7arF0G0aDrmon2Bdec7BabH37GG0rPOla8QqEenqdZZzq6wvsZd8GxRqxCCUaP5BvvGlgxfTNOOBg20PYhP78UH25nHuxRSwvvzOy0%2BaszymUckK5p2ObGBtmNiE1m5KGT6F2U40MRy5afjxmrIyzCnRJ5rgVBOcRsme/56jTMdx1mc6j8iV6CY0bgDu9z8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ha8IwGIT/Sxn7VpN0VqkgY7A60E0xJu%2Bk39L27exi09qk0k387wuD%2B3LH3XO3wODo3mujbbC4BenLQchDFCyCk3OdXRDSKKO%2BsEHjJup36HFStA2xQ26Lvu5c3RpLaM6q2XTOQpZXNJyWpQoVFk9hkSfRPKpoEieUdH17rUvsLfmoi761beUmG/wBNZwdKfGMDst/Y59VV4dX3/TwZURZElIv9vhgtX9sNZqlaJIhO4ygWHaU52wDqzVInUkOGUgmY0FHyFfQ8FSPArgpKbvI42mHjf0Rmn9jyi5crLb8bT%2BVwHcc1r0Q662HjBIAUMfpp/a59DTgek/ZTAjw/fFVNN2G69jv6TK43/8A + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRJn1ynI6FChXZNSTRx7jBo760fExOos/e%2BTwYXLgcu5d6MTsz5WXa0M726Eu4SyxDY840frXnkAtLzjF9GKTlt8GQdh5bIFasxUPlS9rmSnAMxQ%2BepskYmyEppOUXCTi/zFzDPX3toldDcuBP0gb1UhBgVwlQ9SyVJbn%2BI35WOjQSEaoUXxD%2Bqd95V5W5er3Lchck24Bj0/qXp9lLXofFanX3F6oDGLIxqmLGHu6cgaVgZ7hGnukOtlwtf9TOh5IgGeSRC/ERoiEtR2vHYcYETCwweB4QYvJDovOwfXeMI0ik702zcejz8%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=Hc1Ra8IwAATg%2f1LG3mqSaicVZMzRMnTqSJM485Y26dbFplmTuk7xv68M7uWD4%2b4aGDX419poFyyuQfqUE5pHwSL49N66BQCNMOJDNcr4ibj0nZqUbQNcX7iyq62vW%2bMALFD1MJujEBUVDGdSilCochqWRRLNowomcQKB7dpzLVXnwLYuu9a1lZ9s1C8T%2fckDqU7KK%2fkP9yhsHZ7H5ji%2bjCBKQjgG3d85PT62WpklaZKe5wMTiL%2fTE9%2bwbM2o5hQzziiiMYEDKzLW4FQPhGEjIfqmZLcXjYwJwp2ESXq8rN5YepyRr1WOUfpzICsstH0ezZSOs4Nev2FqX4jGfMcyyqd2LyAfzfhWxzQncBncbn8%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fi4y9xRjr1inI6NAOuyZFTRzdW4xxFa%2bY2Iul%2f30yOC8HvvOdu9HJq95XXa0M726Em5Sy1DY846T1oDwIW97xX9nKTpt8nkZpir6FasqVGKtBV32noJWj8tVZI4Dy0gJOUXDApVgBkbv22i4t98W14DD256qQo4K4EmOv%2blKbX%2fKW8anRsJCN1LL4L%2bqdDxU4L%2bQi920LucBagp6fVL089rXsfFZn30m2owlLtjTMWMrcw541rAwihKlwyCwuOIhXhB6vhMboQE9vhEV2QncBmaMbXnYk2FwJ237E89HGgXBi%2bvOJZ3whQegbj8cf"}' headers: cache-control: no-cache - content-length: '710' + content-length: '656' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:35 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: e6f67e61-5cd2-4198-b2ee-249b712e15f2 + x-ms-original-request-ids: 224df314-08da-489b-8eb5-b0d4286766c9 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ha8IwGIT/Sxn7VpN0VqkgY7A60E0xJu%2Bk39L27exi09qk0k387wuD%2B3LH3XO3wODo3mujbbC4BenLQchDFCyCk3OdXRDSKKO%2BsEHjJup36HFStA2xQ26Lvu5c3RpLaM6q2XTOQpZXNJyWpQoVFk9hkSfRPKpoEieUdH17rUvsLfmoi761beUmG/wBNZwdKfGMDst/Y59VV4dX3/TwZURZElIv9vhgtX9sNZqlaJIhO4ygWHaU52wDqzVInUkOGUgmY0FHyFfQ8FSPArgpKbvI42mHjf0Rmn9jyi5crLb8bT%2BVwHcc1r0Q662HjBIAUMfpp/a59DTgek/ZTAjw/fFVNN2G69jv6TK43/8A + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRJn1ynI6FChXZNSTRx7jBo760fExOos/e%2BTwYXLgcu5d6MTsz5WXa0M726Eu4SyxDY840frXnkAtLzjF9GKTlt8GQdh5bIFasxUPlS9rmSnAMxQ%2BepskYmyEppOUXCTi/zFzDPX3toldDcuBP0gb1UhBgVwlQ9SyVJbn%2BI35WOjQSEaoUXxD%2Bqd95V5W5er3Lchck24Bj0/qXp9lLXofFanX3F6oDGLIxqmLGHu6cgaVgZ7hGnukOtlwtf9TOh5IgGeSRC/ERoiEtR2vHYcYETCwweB4QYvJDovOwfXeMI0ik702zcejz8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=Hc1Ra8IwAATg/1LG3mqSaicVZMzRMnTqSJM485Y26dbFplmTuk7xv68M7uWD4%2B4aGDX419poFyyuQfqUE5pHwSL49N66BQCNMOJDNcr4ibj0nZqUbQNcX7iyq62vW%2BMALFD1MJujEBUVDGdSilCochqWRRLNowomcQKB7dpzLVXnwLYuu9a1lZ9s1C8T/ckDqU7KK/kP9yhsHZ7H5ji%2BjCBKQjgG3d85PT62WpklaZKe5wMTiL/TE9%2BwbM2o5hQzziiiMYEDKzLW4FQPhGEjIfqmZLcXjYwJwp2ESXq8rN5YepyRr1WOUfpzICsstH0ezZSOs4Nev2FqX4jGfMcyyqd2LyAfzfhWxzQncBncbn8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9xRjr1inI6NAOuyZFTRzdW4xxFa%2BY2Iul/30yOC8HvvOdu9HJq95XXa0M726Em5Sy1DY846T1oDwIW97xX9nKTpt8nkZpir6FasqVGKtBV32noJWj8tVZI4Dy0gJOUXDApVgBkbv22i4t98W14DD256qQo4K4EmOv%2BlKbX/KW8anRsJCN1LL4L%2BqdDxU4L%2BQi920LucBagp6fVL089rXsfFZn30m2owlLtjTMWMrcw541rAwihKlwyCwuOIhXhB6vhMboQE9vhEV2QncBmaMbXnYk2FwJ237E89HGgXBi%2BvOJZ3whQegbj8cf response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwGEbfRcbubBKrKxbK2EAv1tkNzZ9J7qLGzaoxNbHYlb573eC7OXA439VRcrbvjWqNs7060UtGIfOcrfNjrTZbhHqhxLfspbIr8TuNclUOPTJTYcqx0bYZlEG4IPWTvyEuKWrs%2blUlXCHLtVsWobfxahwGIUZ6HM5NJUeDkqYcBzPUdrWXFyamzqJKdtLK6h%2fMs9CNe17MJb7zMAldvIw8Pph2eRxaqXa0DyeezUwQnkPH9yx%2bY9BySBlnQCCgeGZFzPo0amfKUlVhcuLr7pPFcKFKHw%2fwx%2frAIt8H%2bnqQEEIRsQ9BYh9yPSZtEAFNsxRYQHN9TJY%2bzbvF5zH90iyJyAko3jm32x0%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNIm16xRkjKqwrYlUE4e7ixpbG%2f8wsXSWvvtk8N0cOJzvbvTipg9NL5Xh3Y3wPaUstQ3POGs9Kg%2bAjvf8JDrRa4sv8ySscuiAmgtVTs2om6FXABaofnF2yERFDU2nqrjJRbkxy8K1d3YN3a0LwTgN16YSkwK4KadBDbW2vsRvxudWg0q0QovqH9QbHxvzuppr3Lchck24Dj0%2fKbk%2bDlL0PpPZd5J90oQlEQ0zljI3PrCW1cEHwrR04iC%2fkYtc8AVv8cLsmLavmCZ7zMKFyHBDZL6Q4ITi4BwSSiIsf6KjZDCh0Z4EuW88Hn8%3d"}' headers: cache-control: no-cache - content-length: '701' + content-length: '656' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:35 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 5df4a593-6e9e-4f95-a90f-19e30f2446e8 + x-ms-original-request-ids: d9e4d7a9-a3c2-4135-8b01-1be281426510 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=Hc1Ra8IwAATg/1LG3mqSaicVZMzRMnTqSJM485Y26dbFplmTuk7xv68M7uWD4%2B4aGDX419poFyyuQfqUE5pHwSL49N66BQCNMOJDNcr4ibj0nZqUbQNcX7iyq62vW%2BMALFD1MJujEBUVDGdSilCochqWRRLNowomcQKB7dpzLVXnwLYuu9a1lZ9s1C8T/ckDqU7KK/kP9yhsHZ7H5ji%2BjCBKQjgG3d85PT62WpklaZKe5wMTiL/TE9%2BwbM2o5hQzziiiMYEDKzLW4FQPhGEjIfqmZLcXjYwJwp2ESXq8rN5YepyRr1WOUfpzICsstH0ezZSOs4Nev2FqX4jGfMcyyqd2LyAfzfhWxzQncBncbn8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9xRjr1inI6NAOuyZFTRzdW4xxFa%2BY2Iul/30yOC8HvvOdu9HJq95XXa0M726Em5Sy1DY846T1oDwIW97xX9nKTpt8nkZpir6FasqVGKtBV32noJWj8tVZI4Dy0gJOUXDApVgBkbv22i4t98W14DD256qQo4K4EmOv%2BlKbX/KW8anRsJCN1LL4L%2BqdDxU4L%2BQi920LucBagp6fVL089rXsfFZn30m2owlLtjTMWMrcw541rAwihKlwyCwuOIhXhB6vhMboQE9vhEV2QncBmaMbXnYk2FwJ237E89HGgXBi%2BvOJZ3whQegbj8cf - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwGEbfRcbubBKrKxbK2EAv1tkNzZ9J7qLGzaoxNbHYlb573eC7OXA439VRcrbvjWqNs7060UtGIfOcrfNjrTZbhHqhxLfspbIr8TuNclUOPTJTYcqx0bYZlEG4IPWTvyEuKWrs%2BlUlXCHLtVsWobfxahwGIUZ6HM5NJUeDkqYcBzPUdrWXFyamzqJKdtLK6h/Ms9CNe17MJb7zMAldvIw8Pph2eRxaqXa0DyeezUwQnkPH9yx%2BY9BySBlnQCCgeGZFzPo0amfKUlVhcuLr7pPFcKFKHw/wx/rAIt8H%2BnqQEEIRsQ9BYh9yPSZtEAFNsxRYQHN9TJY%2BzbvF5zH90iyJyAko3jm32x0%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm16xRkjKqwrYlUE4e7ixpbG/8wsXSWvvtk8N0cOJzvbvTipg9NL5Xh3Y3wPaUstQ3POGs9Kg%2BAjvf8JDrRa4sv8ySscuiAmgtVTs2om6FXABaofnF2yERFDU2nqrjJRbkxy8K1d3YN3a0LwTgN16YSkwK4KadBDbW2vsRvxudWg0q0QovqH9QbHxvzuppr3Lchck24Dj0/Kbk%2BDlL0PpPZd5J90oQlEQ0zljI3PrCW1cEHwrR04iC/kYtc8AVv8cLsmLavmCZ7zMKFyHBDZL6Q4ITi4BwSSiIsf6KjZDCh0Z4EuW88Hn8%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbebBKrLRbKWEccrLMbaZJ2vkWNqxijS2JnW%2frvk8F9OXA49%2bZpObr3WjfWW908%2fLynbB94K%2b%2fkXG9XALRCi2%2fZSu1m4joYOSu6Ftght4Wpe1d32gKYo2oRLpGP8gr6YVkKX8hi7hd5HCyDCsZRDEFvunNdSmNBWhems13lZlt54WJQDpRSSSfLf7BPoq%2f982RO8XUAUezDaejxwTbTY9dIvaZtPGT7kQuUHZnKtjx546zJGOEZZ4hFFI48T3hLcDNSTnQJ0eJAk0%2bC0ZzqfiOb6EfM1YdUXyE99ERiZPhREc4izBTZpDDCnJIdebWQMmJ2LPw9HE8kxdELoxuSJgnLrnDt3e9%2f"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbeYox16yyUMdCCW5OiJo4%2bxiS2Gqti0m5a%2bu%2bTwX05cDj37nTq1%2b7rThtnc3fij5yy3Hc2ztnawWwgvPCOn9RFddbl83VUrugv0FxLI8Z6sHXfGeiVqHoN1gigsvJAICUHXIkVEGXor%2f3KC19CDw5jf6ulGg3EtRh701fW%2fVJTwa%2bthVK1yir5D%2badDzW4LeYS3%2foeCoG3DD0%2fGb089lp1W6aL76z4pBnLdjQuWM7Cw561rIoShKkIDjSZcJPOeNaIzGIi0fmNxFmEG7nLouOKNKlP4gQRHQeYpj%2fpLKNMH30c4YnQ09Z5PP4A"}' headers: cache-control: no-cache - content-length: '703' + content-length: '659' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:43 GMT + date: Thu, 11 Nov 2021 03:24:35 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 845fa3d0-f4e2-4dc5-a161-0c2f6b8b06c3 + x-ms-original-request-ids: abbb170e-189e-4b61-a55a-26862c428ec6 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwGEbfRcbubBKrKxbK2EAv1tkNzZ9J7qLGzaoxNbHYlb573eC7OXA439VRcrbvjWqNs7060UtGIfOcrfNjrTZbhHqhxLfspbIr8TuNclUOPTJTYcqx0bYZlEG4IPWTvyEuKWrs%2BlUlXCHLtVsWobfxahwGIUZ6HM5NJUeDkqYcBzPUdrWXFyamzqJKdtLK6h/Ms9CNe17MJb7zMAldvIw8Pph2eRxaqXa0DyeezUwQnkPH9yx%2BY9BySBlnQCCgeGZFzPo0amfKUlVhcuLr7pPFcKFKHw/wx/rAIt8H%2BnqQEEIRsQ9BYh9yPSZtEAFNsxRYQHN9TJY%2BzbvF5zH90iyJyAko3jm32x0%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm16xRkjKqwrYlUE4e7ixpbG/8wsXSWvvtk8N0cOJzvbvTipg9NL5Xh3Y3wPaUstQ3POGs9Kg%2BAjvf8JDrRa4sv8ySscuiAmgtVTs2om6FXABaofnF2yERFDU2nqrjJRbkxy8K1d3YN3a0LwTgN16YSkwK4KadBDbW2vsRvxudWg0q0QovqH9QbHxvzuppr3Lchck24Dj0/Kbk%2BDlL0PpPZd5J90oQlEQ0zljI3PrCW1cEHwrR04iC/kYtc8AVv8cLsmLavmCZ7zMKFyHBDZL6Q4ITi4BwSSiIsf6KjZDCh0Z4EuW88Hn8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBKrLRbKWEccrLMbaZJ2vkWNqxijS2JnW/rvk8F9OXA49%2BZpObr3WjfWW908/LynbB94K%2B/kXG9XALRCi2/ZSu1m4joYOSu6Ftght4Wpe1d32gKYo2oRLpGP8gr6YVkKX8hi7hd5HCyDCsZRDEFvunNdSmNBWhems13lZlt54WJQDpRSSSfLf7BPoq/982RO8XUAUezDaejxwTbTY9dIvaZtPGT7kQuUHZnKtjx546zJGOEZZ4hFFI48T3hLcDNSTnQJ0eJAk0%2BC0ZzqfiOb6EfM1YdUXyE99ERiZPhREc4izBTZpDDCnJIdebWQMmJ2LPw9HE8kxdELoxuSJgnLrnDt3e9/ + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbeYox16yyUMdCCW5OiJo4%2BxiS2Gqti0m5a%2Bu%2BTwX05cDj37nTq1%2B7rThtnc3fij5yy3Hc2ztnawWwgvPCOn9RFddbl83VUrugv0FxLI8Z6sHXfGeiVqHoN1gigsvJAICUHXIkVEGXor/3KC19CDw5jf6ulGg3EtRh701fW/VJTwa%2BthVK1yir5D%2BadDzW4LeYS3/oeCoG3DD0/Gb089lp1W6aL76z4pBnLdjQuWM7Cw561rIoShKkIDjSZcJPOeNaIzGIi0fmNxFmEG7nLouOKNKlP4gQRHQeYpj/pLKNMH30c4YnQ09Z5PP4A response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1Ra4MwFEb%2fi4y9WROrLRbK2EN8sKsbMfe2%2bBY1bqJGMbG4lf73SeF7OXA4393RarEfjW6Nc7g77D0TkPnOwfmxdjQHz%2bullt%2bqV9pu5N88qU059J6ZC1NOzWibQRuPFLTeBXvq0qImblBV0pWq3LplEfl7vyZRGBFvnIZbU6nJeOemnAYz1HZzUr8o5856leqUVdUTzJscG%2fe2mmv86BMauWQdfX0x7fo4tEofRR%2fNebagpPkVuvyEcYLQ5sAxR6AQCrJgEWPPWbsI5LoiIUMRfyLDUOgRU4ggu3apbINAdDw%2bs4gJwTNEWKDlqWIhA5F8ccAtXGyiMMaLSNIzw52gHFNMAAQ5Oo%2fHPw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1dT4MwAEX%2fS2N8g7YMnJAQMwWNOiBAi%2bGxQHGsfIV2c7Lsv9uY3JeTe3LvFYz8ovbdKCTwriDc5YTmFvDAQalZehAObGTffOCjMtl6WrhZTwOUp0rWSzerbholRBVuH%2bwtNnDVIsNuGmYwXm%2bMunKtrdUi13ERnJfp3DV8kTDq6mWSU6vMT%2f5bsFOvYMN7rnjzD%2fKJzZ1x1qYe9y2EXQPp4Ps7KfTjJPjoU1F8ZcUHyWj2SsKC5tRN9rSnbfCOI1I7Edmt8ZH%2bRMdUc4oScnjU7MQiWjPy%2fBYH%2fUsc0DUJBI5F6aS6S2m5yUJqJ2Hpg9vtDw%3d%3d"}' headers: cache-control: no-cache - content-length: '696' + content-length: '666' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:35 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 685d8d05-6114-4679-9e28-86f1e6747c69 + x-ms-original-request-ids: d7134e15-5c86-4a1b-b097-3c2bf378fd36 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBKrLRbKWEccrLMbaZJ2vkWNqxijS2JnW/rvk8F9OXA49%2BZpObr3WjfWW908/LynbB94K%2B/kXG9XALRCi2/ZSu1m4joYOSu6Ftght4Wpe1d32gKYo2oRLpGP8gr6YVkKX8hi7hd5HCyDCsZRDEFvunNdSmNBWhems13lZlt54WJQDpRSSSfLf7BPoq/982RO8XUAUezDaejxwTbTY9dIvaZtPGT7kQuUHZnKtjx546zJGOEZZ4hFFI48T3hLcDNSTnQJ0eJAk0%2BC0ZzqfiOb6EfM1YdUXyE99ERiZPhREc4izBTZpDDCnJIdebWQMmJ2LPw9HE8kxdELoxuSJgnLrnDt3e9/ + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbeYox16yyUMdCCW5OiJo4%2BxiS2Gqti0m5a%2Bu%2BTwX05cDj37nTq1%2B7rThtnc3fij5yy3Hc2ztnawWwgvPCOn9RFddbl83VUrugv0FxLI8Z6sHXfGeiVqHoN1gigsvJAICUHXIkVEGXor/3KC19CDw5jf6ulGg3EtRh701fW/VJTwa%2BthVK1yir5D%2BadDzW4LeYS3/oeCoG3DD0/Gb089lp1W6aL76z4pBnLdjQuWM7Cw561rIoShKkIDjSZcJPOeNaIzGIi0fmNxFmEG7nLouOKNKlP4gQRHQeYpj/pLKNMH30c4YnQ09Z5PP4A - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra4MwFEb/i4y9WROrLRbK2EN8sKsbMfe2%2BBY1bqJGMbG4lf73SeF7OXA4393RarEfjW6Nc7g77D0TkPnOwfmxdjQHz%2Bullt%2BqV9pu5N88qU059J6ZC1NOzWibQRuPFLTeBXvq0qImblBV0pWq3LplEfl7vyZRGBFvnIZbU6nJeOemnAYz1HZzUr8o5856leqUVdUTzJscG/e2mmv86BMauWQdfX0x7fo4tEofRR/NebagpPkVuvyEcYLQ5sAxR6AQCrJgEWPPWbsI5LoiIUMRfyLDUOgRU4ggu3apbINAdDw%2Bs4gJwTNEWKDlqWIhA5F8ccAtXGyiMMaLSNIzw52gHFNMAAQ5Oo/HPw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dT4MwAEX/S2N8g7YMnJAQMwWNOiBAi%2BGxQHGsfIV2c7Lsv9uY3JeTe3LvFYz8ovbdKCTwriDc5YTmFvDAQalZehAObGTffOCjMtl6WrhZTwOUp0rWSzerbholRBVuH%2BwtNnDVIsNuGmYwXm%2BMunKtrdUi13ERnJfp3DV8kTDq6mWSU6vMT/5bsFOvYMN7rnjzD/KJzZ1x1qYe9y2EXQPp4Ps7KfTjJPjoU1F8ZcUHyWj2SsKC5tRN9rSnbfCOI1I7Edmt8ZH%2BRMdUc4oScnjU7MQiWjPy/BYH/Usc0DUJBI5F6aS6S2m5yUJqJ2Hpg9vtDw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbebBJbWyyUsYJ22LVlMcm6vEUTN4lGMbG4lv777OC%2bHO7h3ptn1OjeK6Ott7558WtGaBZ4a%2b%2fHuc6uAWiEEd%2bqUcbNxHXo1axoG2CH3BZ91bmqNRbAHJXLxQr5KC%2bhv5BS%2bEIVc7%2fIo2AVlDAKIwi6vr1UUvUWHKqib21butle%2fTIx1A5IVSun5D%2fYF9FV%2fmUyp%2fFNAFHkwyno%2bcnq6bHVymxIEw08G5lA%2fExrvmdJyqjmFDPOKKIhgSPLE9bgWI%2bEYSNhGPNrelKazQnF6SEOl3xeH5VuF4%2f%2bkCT08ywzxtK3Bx9pmBDNT3g37miNLWZJT8g2w7QOKdnuPyCiX1e48e73Pw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuYhJb1ynIGDOFumqJJo5dRo3Oxj9MLGtL330yODcHDt93twb5a47toLTl3y3ynjGeOZZv%2fRgzaR%2fCXgyikb0cjC1uyyztcuyhXgpdzu1k2nHQEBW4ftnuMMBFjcC2qgQQstyAsvCcnVMjz%2fUQnObx0lZy1jBuy3nUY23sT3nNxdIZWMlOGln9i34TUwsua7mOBw7CHkAr%2bPlJq%2fVxVHIIuMq%2f0jxiKU%2f3jOQ8497pyDtehwccs9KNGXHikN5OrEHJmaKERa%2f0FpGUHVb%2fdlOmNgmhLlX7kPLoIz2raxI2bsIISkISWI%2fHHw%3d%3d"}' headers: cache-control: no-cache - content-length: '704' + content-length: '657' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:35 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 6d7fe7f2-4116-4b29-90e4-7021207fbf1b + x-ms-original-request-ids: 311e7ea1-716d-4e8c-b0a2-337733f89649 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra4MwFEb/i4y9WROrLRbK2EN8sKsbMfe2%2BBY1bqJGMbG4lf73SeF7OXA4393RarEfjW6Nc7g77D0TkPnOwfmxdjQHz%2Bullt%2BqV9pu5N88qU059J6ZC1NOzWibQRuPFLTeBXvq0qImblBV0pWq3LplEfl7vyZRGBFvnIZbU6nJeOemnAYz1HZzUr8o5856leqUVdUTzJscG/e2mmv86BMauWQdfX0x7fo4tEofRR/NebagpPkVuvyEcYLQ5sAxR6AQCrJgEWPPWbsI5LoiIUMRfyLDUOgRU4ggu3apbINAdDw%2Bs4gJwTNEWKDlqWIhA5F8ccAtXGyiMMaLSNIzw52gHFNMAAQ5Oo/HPw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dT4MwAEX/S2N8g7YMnJAQMwWNOiBAi%2BGxQHGsfIV2c7Lsv9uY3JeTe3LvFYz8ovbdKCTwriDc5YTmFvDAQalZehAObGTffOCjMtl6WrhZTwOUp0rWSzerbholRBVuH%2BwtNnDVIsNuGmYwXm%2BMunKtrdUi13ERnJfp3DV8kTDq6mWSU6vMT/5bsFOvYMN7rnjzD/KJzZ1x1qYe9y2EXQPp4Ps7KfTjJPjoU1F8ZcUHyWj2SsKC5tRN9rSnbfCOI1I7Edmt8ZH%2BRMdUc4oScnjU7MQiWjPy/BYH/Usc0DUJBI5F6aS6S2m5yUJqJ2Hpg9vtDw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBJbWyyUsYJ22LVlMcm6vEUTN4lGMbG4lv777OC%2BHO7h3ptn1OjeK6Ott7558WtGaBZ4a%2B/Huc6uAWiEEd%2BqUcbNxHXo1axoG2CH3BZ91bmqNRbAHJXLxQr5KC%2Bhv5BS%2BEIVc7/Io2AVlDAKIwi6vr1UUvUWHKqib21butle/TIx1A5IVSun5D/YF9FV/mUyp/FNAFHkwyno%2Bcnq6bHVymxIEw08G5lA/ExrvmdJyqjmFDPOKKIhgSPLE9bgWI%2BEYSNhGPNrelKazQnF6SEOl3xeH5VuF4/%2BkCT08ywzxtK3Bx9pmBDNT3g37miNLWZJT8g2w7QOKdnuPyCiX1e48e73Pw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuYhJb1ynIGDOFumqJJo5dRo3Oxj9MLGtL330yODcHDt93twb5a47toLTl3y3ynjGeOZZv/RgzaR/CXgyikb0cjC1uyyztcuyhXgpdzu1k2nHQEBW4ftnuMMBFjcC2qgQQstyAsvCcnVMjz/UQnObx0lZy1jBuy3nUY23sT3nNxdIZWMlOGln9i34TUwsua7mOBw7CHkAr%2BPlJq/VxVHIIuMq/0jxiKU/3jOQ8497pyDtehwccs9KNGXHikN5OrEHJmaKERa/0FpGUHVb/dlOmNgmhLlX7kPLoIz2raxI2bsIISkISWI/HHw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1db4IwGIX%2fC1l2h22Z1UBill2gi86P1PaN4a7QMhkWGC3KZvzva5acm5PnyTn3oNGj%2b6ia2gbJPUjfjlwcoyAJzs51NkHIyEZ%2baqMbN5G%2fQ68nRWuQHXJb9FXnqraxCOeknE3nJCR5icOpUjKUungJizyO5lGJYxpj1PXttVK6t2hbFX1r29JNNvoH5HBxSOmLdlr9F%2fsquyq8etOPLyJM4hD7kOcnW%2fvHttbNgpt4yI4jSJKdxCXbwHINos4EgwwEEZTjEfIlGJbWIwfWKEy%2fOV8fIAXKCQOFyYydzge2uk05AOxSfON86bkYhem%2btilNOWd7WDnq%2bZ55P08ZgxV7F8btdE0BOF4Ej8cf"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9aRJt1ynIGDMbukaZJu45xuisn5jYdZb%2b98rgPtwDl3OvxiAv%2btgMrTK8q4FfM8oy2%2fCMH60n5QHQ84HXspeDtvi6zNISYw%2fUUigxN5NuxkEBWKDqaXdAJioqaO7KkptcCscUhWsf7Aq6exeCaR7PTSlnBUgj5lGNlbY%2b5V%2fOl06DUnZSy%2fIf1AufGvO8LTe5b0PkmnALenxQ7fY4tnLwWZt%2fp3lEU5a%2bU5yzjLnJkXWsCkJEqNiTU7gmQe2QgEGy1heyds9fJ4FSGn8QjH8Jjd7iIMKEdjilIUxoC0mLnXjr8Sp843a7Aw%3d%3d"}' headers: cache-control: no-cache - content-length: '694' + content-length: '659' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:36 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 13e3bd45-5372-4d7d-a51c-995c005d3cde + x-ms-original-request-ids: 8e8b9895-f41a-4994-ad55-ae28d70fe803 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBJbWyyUsYJ22LVlMcm6vEUTN4lGMbG4lv777OC%2BHO7h3ptn1OjeK6Ott7558WtGaBZ4a%2B/Huc6uAWiEEd%2BqUcbNxHXo1axoG2CH3BZ91bmqNRbAHJXLxQr5KC%2Bhv5BS%2BEIVc7/Io2AVlDAKIwi6vr1UUvUWHKqib21butle/TIx1A5IVSun5D/YF9FV/mUyp/FNAFHkwyno%2Bcnq6bHVymxIEw08G5lA/ExrvmdJyqjmFDPOKKIhgSPLE9bgWI%2BEYSNhGPNrelKazQnF6SEOl3xeH5VuF4/%2BkCT08ywzxtK3Bx9pmBDNT3g37miNLWZJT8g2w7QOKdnuPyCiX1e48e73Pw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuYhJb1ynIGDOFumqJJo5dRo3Oxj9MLGtL330yODcHDt93twb5a47toLTl3y3ynjGeOZZv/RgzaR/CXgyikb0cjC1uyyztcuyhXgpdzu1k2nHQEBW4ftnuMMBFjcC2qgQQstyAsvCcnVMjz/UQnObx0lZy1jBuy3nUY23sT3nNxdIZWMlOGln9i34TUwsua7mOBw7CHkAr%2BPlJq/VxVHIIuMq/0jxiKU/3jOQ8497pyDtehwccs9KNGXHikN5OrEHJmaKERa/0FpGUHVb/dlOmNgmhLlX7kPLoIz2raxI2bsIISkISWI/HHw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1db4IwGIX/C1l2h22Z1UBill2gi86P1PaN4a7QMhkWGC3KZvzva5acm5PnyTn3oNGj%2B6ia2gbJPUjfjlwcoyAJzs51NkHIyEZ%2BaqMbN5G/Q68nRWuQHXJb9FXnqraxCOeknE3nJCR5icOpUjKUungJizyO5lGJYxpj1PXttVK6t2hbFX1r29JNNvoH5HBxSOmLdlr9F/squyq8etOPLyJM4hD7kOcnW/vHttbNgpt4yI4jSJKdxCXbwHINos4EgwwEEZTjEfIlGJbWIwfWKEy/OV8fIAXKCQOFyYydzge2uk05AOxSfON86bkYhem%2BtilNOWd7WDnq%2BZ55P08ZgxV7F8btdE0BOF4Ej8cf + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRJt1ynIGDMbukaZJu45xuisn5jYdZb%2B98rgPtwDl3OvxiAv%2BtgMrTK8q4FfM8oy2/CMH60n5QHQ84HXspeDtvi6zNISYw/UUigxN5NuxkEBWKDqaXdAJioqaO7KkptcCscUhWsf7Aq6exeCaR7PTSlnBUgj5lGNlbY%2B5V/Ol06DUnZSy/If1AufGvO8LTe5b0PkmnALenxQ7fY4tnLwWZt/p3lEU5a%2BU5yzjLnJkXWsCkJEqNiTU7gmQe2QgEGy1heyds9fJ4FSGn8QjH8Jjd7iIMKEdjilIUxoC0mLnXjr8Sp843a7Aw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1dT4MwGIX%2fCzHesba4j7BkMV6ACVNMSlsX7gp9USy0SMvEmf130eTcPDlPzvkJDMz%2bqTXaBfufIHkoGC%2biYB%2b8ez%2b4PUK9NPINejB%2bJS%2fTCKva9shNlavHdvCtNQ7hijTb9Y6EpGpwuFZKhhLqu7Cu4mgXNTjexBgNoz23CkaHntt6tM42fnWEbyGnziMFHXhQ%2f%2bDu5dCG58Vcxg8RJnGIl5DbG6eXR6vBHFgfT2UxC0nKE%2b%2fKo0gzwXXJqSgFJ3zD8CyqVPQ00TMT1Ci8%2bXxlWS7%2bWNMMNNnKS5qDtmve%2byxP4pSxlEKnv3hHPxY%2f5TqjEg%2bPTIscONkWJ%2fUCXXJZ%2boJqMlKGD8H1%2bgs%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9aT5W1ynI2KgbbjVFTRw%2bRo2dqFFMWtaU%2fveGwX05l8O9V0eKP73v5aCc8OrEbwVlBXZC51frRYUATFzyo5iE1B43p1V4zTwBdapVs%2faL7mepAKxR97zZIhfVHXQ3bctdLpont6kDvMUdDPwAgmWdz30rVgXSvllnNXfa%2bxaXkp9GDVoxCi3af1CvfOndszXteIQhClxogx4f1GAf50HIiA3lT15%2b0ZzlHzQuWcGCw56NrNslKKWNn5oMEZphQplJzfGSmvYlM5XJaIVzmiAC808Sl%2b%2fEDDilzLceJnFl%2bwQfdlXk3G53"}' headers: cache-control: no-cache - content-length: '707' + content-length: '650' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:36 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 16873071-ab9d-4ca1-b5e9-e49b6e783c7d + x-ms-original-request-ids: 25fac93b-efb1-405c-9234-5d5a4c4146e2 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1db4IwGIX/C1l2h22Z1UBill2gi86P1PaN4a7QMhkWGC3KZvzva5acm5PnyTn3oNGj%2B6ia2gbJPUjfjlwcoyAJzs51NkHIyEZ%2BaqMbN5G/Q68nRWuQHXJb9FXnqraxCOeknE3nJCR5icOpUjKUungJizyO5lGJYxpj1PXttVK6t2hbFX1r29JNNvoH5HBxSOmLdlr9F/squyq8etOPLyJM4hD7kOcnW/vHttbNgpt4yI4jSJKdxCXbwHINos4EgwwEEZTjEfIlGJbWIwfWKEy/OV8fIAXKCQOFyYydzge2uk05AOxSfON86bkYhem%2BtilNOWd7WDnq%2BZ55P08ZgxV7F8btdE0BOF4Ej8cf + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRJt1ynIGDMbukaZJu45xuisn5jYdZb%2B98rgPtwDl3OvxiAv%2BtgMrTK8q4FfM8oy2/CMH60n5QHQ84HXspeDtvi6zNISYw/UUigxN5NuxkEBWKDqaXdAJioqaO7KkptcCscUhWsf7Aq6exeCaR7PTSlnBUgj5lGNlbY%2B5V/Ol06DUnZSy/If1AufGvO8LTe5b0PkmnALenxQ7fY4tnLwWZt/p3lEU5a%2BU5yzjLnJkXWsCkJEqNiTU7gmQe2QgEGy1heyds9fJ4FSGn8QjH8Jjd7iIMKEdjilIUxoC0mLnXjr8Sp843a7Aw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dT4MwGIX/CzHesba4j7BkMV6ACVNMSlsX7gp9USy0SMvEmf130eTcPDlPzvkJDMz%2BqTXaBfufIHkoGC%2BiYB%2B8ez%2B4PUK9NPINejB%2BJS/TCKva9shNlavHdvCtNQ7hijTb9Y6EpGpwuFZKhhLqu7Cu4mgXNTjexBgNoz23CkaHntt6tM42fnWEbyGnziMFHXhQ/%2BDu5dCG58Vcxg8RJnGIl5DbG6eXR6vBHFgfT2UxC0nKE%2B/Ko0gzwXXJqSgFJ3zD8CyqVPQ00TMT1Ci8%2BXxlWS7%2BWNMMNNnKS5qDtmve%2ByxP4pSxlEKnv3hHPxY/5TqjEg%2BPTIscONkWJ/UCXXJZ%2BoJqMlKGD8H1%2Bgs%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aT5W1ynI2KgbbjVFTRw%2BRo2dqFFMWtaU/veGwX05l8O9V0eKP73v5aCc8OrEbwVlBXZC51frRYUATFzyo5iE1B43p1V4zTwBdapVs/aL7mepAKxR97zZIhfVHXQ3bctdLpont6kDvMUdDPwAgmWdz30rVgXSvllnNXfa%2BxaXkp9GDVoxCi3af1CvfOndszXteIQhClxogx4f1GAf50HIiA3lT15%2B0ZzlHzQuWcGCw56NrNslKKWNn5oMEZphQplJzfGSmvYlM5XJaIVzmiAC808Sl%2B/EDDilzLceJnFl%2BwQfdlXk3G53 response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RToMwAEX%2fhRjfWFsGLiwhRg1oNmHatR3jrdCiBCiMlolb9u8Sk%2ftykpNzr5aSk3mvVK2t9dUKn%2faE7h1rbX0b0%2bs1AC1X%2fEu2UpkFv4yDXBRdC%2fSY62KoelN1SgOYo%2fLBXSEb5SW0XSG4zWWxtIvcd1ZOCX3Ph6AfunMl5KBBXBVDp7vSLLbyl%2fGxMUDIRhop%2fkE%2f8r6yz7M5xwMHIt%2bG89D9na7nx66WKiCtP2b7iXGUpbTJtizaMFpnFLOMUUQ9AieWR6zFYT0RhpWA3um4FDsWhReS9klceydKnhMWHl2i%2bk0SRcMhbXZx1L8QirM49EKcNh%2f4dXqjDcYCwh9KcIIj5hKE9WeNTgcCA%2bt2%2bwM%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNInadRZkSONgXU0xNQ53F2Ns%2fReTFtfSd68MvpsDh%2fPdjV7Oel%2f1jTI2dyMMjgk72sbGOGs9qg0AHe%2f5SXay1xa%2fXSZpiaED6pIrMVWjroZeAZij8s1dIxPlJTTdouAml8IxRe7Za7uE3sqDYJyGa1XISYGoEtOghlJb3%2fIv5ZdWg0K2UsviH9QHHyvzuphL3Lch8ky4DL2%2bqGZ5HBrZ%2b6xJf2i6Syijn0mYsiPzDnvWshJ%2foSgRK4Izm%2bDAiZKTTWo2R%2fj8TusYEZbN8U24tA5mgsV8CHeYhLET17%2bY1mQbQ7KlTeYbj8cT"}' headers: cache-control: no-cache - content-length: '705' + content-length: '659' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:36 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: df4fd231-c97c-4ac9-addd-4bbbef6f92cf + x-ms-original-request-ids: 1eff6bc0-be23-4557-8888-011f4b1dc383 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1dT4MwGIX/CzHesba4j7BkMV6ACVNMSlsX7gp9USy0SMvEmf130eTcPDlPzvkJDMz%2BqTXaBfufIHkoGC%2BiYB%2B8ez%2B4PUK9NPINejB%2BJS/TCKva9shNlavHdvCtNQ7hijTb9Y6EpGpwuFZKhhLqu7Cu4mgXNTjexBgNoz23CkaHntt6tM42fnWEbyGnziMFHXhQ/%2BDu5dCG58Vcxg8RJnGIl5DbG6eXR6vBHFgfT2UxC0nKE%2B/Ko0gzwXXJqSgFJ3zD8CyqVPQ00TMT1Ci8%2BXxlWS7%2BWNMMNNnKS5qDtmve%2ByxP4pSxlEKnv3hHPxY/5TqjEg%2BPTIscONkWJ/UCXXJZ%2BoJqMlKGD8H1%2Bgs%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aT5W1ynI2KgbbjVFTRw%2BRo2dqFFMWtaU/veGwX05l8O9V0eKP73v5aCc8OrEbwVlBXZC51frRYUATFzyo5iE1B43p1V4zTwBdapVs/aL7mepAKxR97zZIhfVHXQ3bctdLpont6kDvMUdDPwAgmWdz30rVgXSvllnNXfa%2BxaXkp9GDVoxCi3af1CvfOndszXteIQhClxogx4f1GAf50HIiA3lT15%2B0ZzlHzQuWcGCw56NrNslKKWNn5oMEZphQplJzfGSmvYlM5XJaIVzmiAC808Sl%2B/EDDilzLceJnFl%2BwQfdlXk3G53 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RToMwAEX/hRjfWFsGLiwhRg1oNmHatR3jrdCiBCiMlolb9u8Sk/tykpNzr5aSk3mvVK2t9dUKn/aE7h1rbX0b0%2Bs1AC1X/Eu2UpkFv4yDXBRdC/SY62KoelN1SgOYo/LBXSEb5SW0XSG4zWWxtIvcd1ZOCX3Ph6AfunMl5KBBXBVDp7vSLLbyl/GxMUDIRhop/kE/8r6yz7M5xwMHIt%2BG89D9na7nx66WKiCtP2b7iXGUpbTJtizaMFpnFLOMUUQ9AieWR6zFYT0RhpWA3um4FDsWhReS9klceydKnhMWHl2i%2Bk0SRcMhbXZx1L8QirM49EKcNh/4dXqjDcYCwh9KcIIj5hKE9WeNTgcCA%2Bt2%2BwM%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNInadRZkSONgXU0xNQ53F2Ns/ReTFtfSd68MvpsDh/PdjV7Oel/1jTI2dyMMjgk72sbGOGs9qg0AHe/5SXay1xa/XSZpiaED6pIrMVWjroZeAZij8s1dIxPlJTTdouAml8IxRe7Za7uE3sqDYJyGa1XISYGoEtOghlJb3/Iv5ZdWg0K2UsviH9QHHyvzuphL3Lch8ky4DL2%2BqGZ5HBrZ%2B6xJf2i6Syijn0mYsiPzDnvWshJ/oSgRK4Izm%2BDAiZKTTWo2R/j8TusYEZbN8U24tA5mgsV8CHeYhLET17%2BY1mQbQ7KlTeYbj8cT response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1db4IwGIX%2fC1l2h7QoGkjMsgs0wakR21flrsDLxsrXaDEM439fs%2bTcPDlPznlYDY76o2yksoKHFb6fGT%2b7VmB9ad2pwHFq0YhPrLHRMzENPc6ytnbUkKqsLztdto1ySEqL5WJFbZoWxF7kubAFZnM7S3135RbE93zidH17L3PslbMvs75VbaFnO%2fwFMVTaybFCjfk%2fqDfRlfbdmGZ87RLq28SEvr4oaR5bic2a1f6QnEcQNLnyKtnBJgIuEx5DApxyj5ER0g3UcShHBnGTE%2b9HTNERtmpiMo7QSMCiI8rbwvTfKD2ezCvDkrBrdzkRL2TX%2fLAPYckIbE%2fS57GMD1h1WybhEodeeJvI2no%2b%2fwA%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1fT4MwAMS%2fCzG%2bQVsEJyTETEGDDkiBYnwspWzInxJaprDsu0uW3MNd8ru7izbwP3VohlZq7kUL9llOMlNztZNSo3QB6OlAj7zngzLoOk%2fcYKIHci4lm5pRNWKQAJaofrR2SEdlDXWrqqhOOXvQWemYO7OGju1AME7i3FR8kiBq2CSkqJXxyZeCzp0CFe%2b44tUtyGc6Nvp5I7dxz4TI0eEmdH8n2%2b1RtHzwSFt8pcVHnpL0LQ8KkhEnOZCO1H6IopzZcR6ayc3jJfa%2frWg9PWGCl4QQE7fpK4ahFfvFe0xCO%2foJfuO1e4nz%2fdY5LlGAPe16%2fQc%3d"}' headers: cache-control: no-cache - content-length: '689' + content-length: '661' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:36 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: d065c199-2b32-4f98-b2ef-273388a3994e + x-ms-original-request-ids: 8f580c83-78ba-4fe3-9ee8-50027d506d93 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RToMwAEX/hRjfWFsGLiwhRg1oNmHatR3jrdCiBCiMlolb9u8Sk/tykpNzr5aSk3mvVK2t9dUKn/aE7h1rbX0b0%2Bs1AC1X/Eu2UpkFv4yDXBRdC/SY62KoelN1SgOYo/LBXSEb5SW0XSG4zWWxtIvcd1ZOCX3Ph6AfunMl5KBBXBVDp7vSLLbyl/GxMUDIRhop/kE/8r6yz7M5xwMHIt%2BG89D9na7nx66WKiCtP2b7iXGUpbTJtizaMFpnFLOMUUQ9AieWR6zFYT0RhpWA3um4FDsWhReS9klceydKnhMWHl2i%2Bk0SRcMhbXZx1L8QirM49EKcNh/4dXqjDcYCwh9KcIIj5hKE9WeNTgcCA%2Bt2%2BwM%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNInadRZkSONgXU0xNQ53F2Ns/ReTFtfSd68MvpsDh/PdjV7Oel/1jTI2dyMMjgk72sbGOGs9qg0AHe/5SXay1xa/XSZpiaED6pIrMVWjroZeAZij8s1dIxPlJTTdouAml8IxRe7Za7uE3sqDYJyGa1XISYGoEtOghlJb3/Iv5ZdWg0K2UsviH9QHHyvzuphL3Lch8ky4DL2%2BqGZ5HBrZ%2B6xJf2i6Syijn0mYsiPzDnvWshJ/oSgRK4Izm%2BDAiZKTTWo2R/j8TusYEZbN8U24tA5mgsV8CHeYhLET17%2BY1mQbQ7KlTeYbj8cT - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1db4IwGIX/C1l2h7QoGkjMsgs0wakR21flrsDLxsrXaDEM439fs%2BTcPDlPznlYDY76o2yksoKHFb6fGT%2B7VmB9ad2pwHFq0YhPrLHRMzENPc6ytnbUkKqsLztdto1ySEqL5WJFbZoWxF7kubAFZnM7S3135RbE93zidH17L3PslbMvs75VbaFnO/wFMVTaybFCjfk/qDfRlfbdmGZ87RLq28SEvr4oaR5bic2a1f6QnEcQNLnyKtnBJgIuEx5DApxyj5ER0g3UcShHBnGTE%2B9HTNERtmpiMo7QSMCiI8rbwvTfKD2ezCvDkrBrdzkRL2TX/LAPYckIbE/S57GMD1h1WybhEodeeJvI2no%2B/wA%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1fT4MwAMS/CzG%2BQVsEJyTETEGDDkiBYnwspWzInxJaprDsu0uW3MNd8ru7izbwP3VohlZq7kUL9llOMlNztZNSo3QB6OlAj7zngzLoOk/cYKIHci4lm5pRNWKQAJaofrR2SEdlDXWrqqhOOXvQWemYO7OGju1AME7i3FR8kiBq2CSkqJXxyZeCzp0CFe%2B44tUtyGc6Nvp5I7dxz4TI0eEmdH8n2%2B1RtHzwSFt8pcVHnpL0LQ8KkhEnOZCO1H6IopzZcR6ayc3jJfa/rWg9PWGCl4QQE7fpK4ahFfvFe0xCO/oJfuO1e4nz/dY5LlGAPe16/Qc%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3dToMwGIbvhRjPWFuELSxZjAdUZQ6T0n4uPStQlACF0LKgi%2fcuM3lPnrx%2fV8%2foxb01prXe%2fuolTzkXeeDtvS%2fnRrtHqFdGfepeG7dRP%2fOkN%2bXQIzsXtpya0TWDsQgXpN6GO%2bKTosZ%2bWFXKV7p88MsiDnZBjeMoxmichktT6cmiU1NOgx1qtznqb1Bz51ClO%2b109Q%2f2UY2Nf1mT6%2fghwCT28Spyf2fb9XFotTnwPp5lvoAi8iw6eQSagmilYCBBEBFxvEBBoWdJu3BgpsLRFjjL4DkLV5Y6IeKDZxmjr6EAlmYJmfI2fYe1zfHNjyi%2f%2baKL%2bHmkJxFRxtOMJfKFA0jdpRQ4Pni%2fv38%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9aaLWdQoyynTFrVrUxD3HJLYavzCxc5b%2b98ngPtwDl3PvWs8Xdap7ITXvroWHHOHc0jztqtQoPQA60pML73ivDLLOEzfo0AE5l5JO9ajqoZcAlmb1stubullWUN8xRnTCqa3T0rX2VgVdx4VgnIZbzfgkQVzTaZBDpYwv%2fluQuVWA8ZYrzv5BvpGx1m%2fbcpP7FjRdHW4xn5%2bk2B4HwXsfi%2bI7Kz5RhrMPFBY4x%2b75hFtcBZEZI%2bokTfiTNBRuHcZN5CTB9TXFeEkb9p4hFqYrXpPgYiciss%2boOMYoXuLgsCQiO6ZN5GuPxx8%3d"}' headers: cache-control: no-cache - content-length: '692' + content-length: '659' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:36 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: ad78b0b6-c4dd-4b8c-b35e-9ab9eb9a5f56 + x-ms-original-request-ids: 7f127034-7b74-46c3-87df-165541738e90 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1db4IwGIX/C1l2h7QoGkjMsgs0wakR21flrsDLxsrXaDEM439fs%2BTcPDlPznlYDY76o2yksoKHFb6fGT%2B7VmB9ad2pwHFq0YhPrLHRMzENPc6ytnbUkKqsLztdto1ySEqL5WJFbZoWxF7kubAFZnM7S3135RbE93zidH17L3PslbMvs75VbaFnO/wFMVTaybFCjfk/qDfRlfbdmGZ87RLq28SEvr4oaR5bic2a1f6QnEcQNLnyKtnBJgIuEx5DApxyj5ER0g3UcShHBnGTE%2B9HTNERtmpiMo7QSMCiI8rbwvTfKD2ezCvDkrBrdzkRL2TX/LAPYckIbE/S57GMD1h1WybhEodeeJvI2no%2B/wA%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1fT4MwAMS/CzG%2BQVsEJyTETEGDDkiBYnwspWzInxJaprDsu0uW3MNd8ru7izbwP3VohlZq7kUL9llOMlNztZNSo3QB6OlAj7zngzLoOk/cYKIHci4lm5pRNWKQAJaofrR2SEdlDXWrqqhOOXvQWemYO7OGju1AME7i3FR8kiBq2CSkqJXxyZeCzp0CFe%2B44tUtyGc6Nvp5I7dxz4TI0eEmdH8n2%2B1RtHzwSFt8pcVHnpL0LQ8KkhEnOZCO1H6IopzZcR6ayc3jJfa/rWg9PWGCl4QQE7fpK4ahFfvFe0xCO/oJfuO1e4nz/dY5LlGAPe16/Qc%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3dToMwGIbvhRjPWFuELSxZjAdUZQ6T0n4uPStQlACF0LKgi/cuM3lPnrx/V8/oxb01prXe/uolTzkXeeDtvS/nRrtHqFdGfepeG7dRP/OkN%2BXQIzsXtpya0TWDsQgXpN6GO%2BKTosZ%2BWFXKV7p88MsiDnZBjeMoxmichktT6cmiU1NOgx1qtznqb1Bz51ClO%2B109Q/2UY2Nf1mT6/ghwCT28Spyf2fb9XFotTnwPp5lvoAi8iw6eQSagmilYCBBEBFxvEBBoWdJu3BgpsLRFjjL4DkLV5Y6IeKDZxmjr6EAlmYJmfI2fYe1zfHNjyi/%2BaKL%2BHmkJxFRxtOMJfKFA0jdpRQ4Pni/v38%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aaLWdQoyynTFrVrUxD3HJLYavzCxc5b%2B98ngPtwDl3PvWs8Xdap7ITXvroWHHOHc0jztqtQoPQA60pML73ivDLLOEzfo0AE5l5JO9ajqoZcAlmb1stubullWUN8xRnTCqa3T0rX2VgVdx4VgnIZbzfgkQVzTaZBDpYwv/luQuVWA8ZYrzv5BvpGx1m/bcpP7FjRdHW4xn5%2Bk2B4HwXsfi%2BI7Kz5RhrMPFBY4x%2B75hFtcBZEZI%2BokTfiTNBRuHcZN5CTB9TXFeEkb9p4hFqYrXpPgYiciss%2BoOMYoXuLgsCQiO6ZN5GuPxx8%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwAEX%2fRcbebBKrLRbK2IPC7Fq2mETxLZq4SaJmJha70n%2bfDO7L4R7uvXuDXNx7NyjrHe5e8poTmgfewft2ztgDAD0f%2bJfs5eA2%2fHee5KYZe2Dn2jZTZ1w3DhbAGrW7cI98VLfQD4XgPpfN1m%2fqONgHLYyjGAIzjddOyMmCc9dMox1btznJG%2bOzdkBILZ0U%2f2BfuOn862qu48cAotiHa9Dzk1Xr46jkcCR9PFf5wjiqSqqrE0szRlVFMasYRTQicGF1ynqcqIUwPAgY7QqCP3DCwpUzAdFPUZoLTt9C0pviE8ZJXorLOVU3yjCWNEpwqTGHeks1w2ca7dYeS5VGtDCZ1BnDBB69x%2bMP"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfJYzdaaLTdQoy3EzBrUaqiWOXUePmv5jYrpa%2be2Xw3Rw4nO8KBvGnDvXQSuBeAfZTylITuOBXqUm6EPZ84D%2biF4PS%2bbrMQi%2fGHsoll8VcT6oeBwlRblTP1s7QjLxCmlWWXOOieNKK3DF3ZoUc20FwmsdTXYpZwqgu5lGOldI%2fxSXjS6dgKTqhRPkP8pVPtXbazC3umchwNLTNeHyQ7fY4tmLwWJt9JdkHTViypzhjKXPiA%2btYFYRGRAs7DtiF0MiMaWiToD2Tlbwkzds%2baXwrCfzzkZYBwceVMGySJkIRDtet9R5hfI7ptwdutzs%3d"}' headers: cache-control: no-cache - content-length: '696' + content-length: '660' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:36 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 11561b51-32f9-4ded-942d-bfad41b738dd + x-ms-original-request-ids: 6c54e370-e483-42e0-a3f5-dd9b2843e7b8 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3dToMwGIbvhRjPWFuELSxZjAdUZQ6T0n4uPStQlACF0LKgi/cuM3lPnrx/V8/oxb01prXe/uolTzkXeeDtvS/nRrtHqFdGfepeG7dRP/OkN%2BXQIzsXtpya0TWDsQgXpN6GO%2BKTosZ%2BWFXKV7p88MsiDnZBjeMoxmichktT6cmiU1NOgx1qtznqb1Bz51ClO%2B109Q/2UY2Nf1mT6/ghwCT28Spyf2fb9XFotTnwPp5lvoAi8iw6eQSagmilYCBBEBFxvEBBoWdJu3BgpsLRFjjL4DkLV5Y6IeKDZxmjr6EAlmYJmfI2fYe1zfHNjyi/%2BaKL%2BHmkJxFRxtOMJfKFA0jdpRQ4Pni/v38%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aaLWdQoyynTFrVrUxD3HJLYavzCxc5b%2B98ngPtwDl3PvWs8Xdap7ITXvroWHHOHc0jztqtQoPQA60pML73ivDLLOEzfo0AE5l5JO9ajqoZcAlmb1stubullWUN8xRnTCqa3T0rX2VgVdx4VgnIZbzfgkQVzTaZBDpYwv/luQuVWA8ZYrzv5BvpGx1m/bcpP7FjRdHW4xn5%2Bk2B4HwXsfi%2BI7Kz5RhrMPFBY4x%2B75hFtcBZEZI%2BokTfiTNBRuHcZN5CTB9TXFeEkb9p4hFqYrXpPgYiciss%2BoOMYoXuLgsCQiO6ZN5GuPxx8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBKrLRbK2IPC7Fq2mETxLZq4SaJmJha70n%2BfDO7L4R7uvXuDXNx7NyjrHe5e8poTmgfewft2ztgDAD0f%2BJfs5eA2/Hee5KYZe2Dn2jZTZ1w3DhbAGrW7cI98VLfQD4XgPpfN1m/qONgHLYyjGAIzjddOyMmCc9dMox1btznJG%2BOzdkBILZ0U/2BfuOn862qu48cAotiHa9Dzk1Xr46jkcCR9PFf5wjiqSqqrE0szRlVFMasYRTQicGF1ynqcqIUwPAgY7QqCP3DCwpUzAdFPUZoLTt9C0pviE8ZJXorLOVU3yjCWNEpwqTGHeks1w2ca7dYeS5VGtDCZ1BnDBB69x%2BMP + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfJYzdaaLTdQoy3EzBrUaqiWOXUePmv5jYrpa%2Be2Xw3Rw4nO8KBvGnDvXQSuBeAfZTylITuOBXqUm6EPZ84D%2BiF4PS%2BbrMQi/GHsoll8VcT6oeBwlRblTP1s7QjLxCmlWWXOOieNKK3DF3ZoUc20FwmsdTXYpZwqgu5lGOldI/xSXjS6dgKTqhRPkP8pVPtXbazC3umchwNLTNeHyQ7fY4tmLwWJt9JdkHTViypzhjKXPiA%2BtYFYRGRAs7DtiF0MiMaWiToD2Tlbwkzds%2BaXwrCfzzkZYBwceVMGySJkIRDtet9R5hfI7ptwdutzs%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=Hc3RaoMwGAXgd5GxO5vE1hYLZaxgLtrV0Zj8K95FjZtoophYbEvffVI4Nx8cznl4Rk3uqzaN9bYPL%2f5MuUgDb%2bv9OdfbLUJaGvmrtDJuIe%2fjoBZFp5Edc1sMde%2fqzliEc1KtVxvik7zC%2fqospS9VsfSLPAo2QYWjMMKoH7prXarBolNdDJ3tKrc4qhvIsXWoVK1yqnzBfsi%2b9q9zcx7fBZhEPp5D3t9sMz92jTI7rqMxSyeQJLuINjsCPYBoMsEgA0FEyPEEOQXN4mbiwEyJozjlLIEYY96wvRLhbPot9XnFWwazh9mJ1PbGAeQZh3F2T9gphiW%2f9IdEkLXge3aidCl%2bHFWUCsbxzns%2b%2fwE%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RboIwAEX%2fhSx7w7YM5zAhC65oYBZipSzxrZTiAC2EVjM0%2frtkyX05ycm5d0vJP7OtVaut5d0Kg33G9o61tH6N6fUSgDNX%2fCjPUpkZv10GORPdGehLocVQ96bulAawQNW7u0A2Kipou2XJbS7Fmy0Kz1k4FfTmHgT90F3rUg4akFoMne4qM%2fuWY84vJwNKeZJGlv%2bgP3lf29fJnOK%2bA5Fnw2no9UW302PXSuWzNv%2bheZxRRtdZmLM989ItO7EKR4hkYp7i45ji0E2adk5wgAiOP0gWbyiLbrQJ4A7mXwlO1gmMEM3KDcGH1a4RI20OqySMfOvxeAI%3d"}' headers: cache-control: no-cache - content-length: '693' + content-length: '659' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:36 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: b87b7051-b4c3-46f9-a98f-bcc3353e0662 + x-ms-original-request-ids: 4ec647d0-fae6-45b0-aa7a-a1b1e61faf4a status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwAEX/RcbebBKrLRbK2IPC7Fq2mETxLZq4SaJmJha70n%2BfDO7L4R7uvXuDXNx7NyjrHe5e8poTmgfewft2ztgDAD0f%2BJfs5eA2/Hee5KYZe2Dn2jZTZ1w3DhbAGrW7cI98VLfQD4XgPpfN1m/qONgHLYyjGAIzjddOyMmCc9dMox1btznJG%2BOzdkBILZ0U/2BfuOn862qu48cAotiHa9Dzk1Xr46jkcCR9PFf5wjiqSqqrE0szRlVFMasYRTQicGF1ynqcqIUwPAgY7QqCP3DCwpUzAdFPUZoLTt9C0pviE8ZJXorLOVU3yjCWNEpwqTGHeks1w2ca7dYeS5VGtDCZ1BnDBB69x%2BMP + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfJYzdaaLTdQoy3EzBrUaqiWOXUePmv5jYrpa%2Be2Xw3Rw4nO8KBvGnDvXQSuBeAfZTylITuOBXqUm6EPZ84D%2BiF4PS%2BbrMQi/GHsoll8VcT6oeBwlRblTP1s7QjLxCmlWWXOOieNKK3DF3ZoUc20FwmsdTXYpZwqgu5lGOldI/xSXjS6dgKTqhRPkP8pVPtXbazC3umchwNLTNeHyQ7fY4tmLwWJt9JdkHTViypzhjKXPiA%2BtYFYRGRAs7DtiF0MiMaWiToD2Tlbwkzds%2BaXwrCfzzkZYBwceVMGySJkIRDtet9R5hfI7ptwdutzs%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=Hc3RaoMwGAXgd5GxO5vE1hYLZaxgLtrV0Zj8K95FjZtoophYbEvffVI4Nx8cznl4Rk3uqzaN9bYPL/5MuUgDb%2Bv9OdfbLUJaGvmrtDJuIe/joBZFp5Edc1sMde/qzliEc1KtVxvik7zC/qospS9VsfSLPAo2QYWjMMKoH7prXarBolNdDJ3tKrc4qhvIsXWoVK1yqnzBfsi%2B9q9zcx7fBZhEPp5D3t9sMz92jTI7rqMxSyeQJLuINjsCPYBoMsEgA0FEyPEEOQXN4mbiwEyJozjlLIEYY96wvRLhbPot9XnFWwazh9mJ1PbGAeQZh3F2T9gphiW/9IdEkLXge3aidCl%2BHFWUCsbxzns%2B/wE%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RboIwAEX/hSx7w7YM5zAhC65oYBZipSzxrZTiAC2EVjM0/rtkyX05ycm5d0vJP7OtVaut5d0Kg33G9o61tH6N6fUSgDNX/CjPUpkZv10GORPdGehLocVQ96bulAawQNW7u0A2Kipou2XJbS7Fmy0Kz1k4FfTmHgT90F3rUg4akFoMne4qM/uWY84vJwNKeZJGlv%2BgP3lf29fJnOK%2BA5Fnw2no9UW302PXSuWzNv%2BheZxRRtdZmLM989ItO7EKR4hkYp7i45ji0E2adk5wgAiOP0gWbyiLbrQJ4A7mXwlO1gmMEM3KDcGH1a4RI20OqySMfOvxeAI%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1Ra4MwGEX%2fi4y92SSuriiUsTEttJtb0%2bRr8S2auIrGiInFrvS%2fTwb35XAP9968Tk3uo%2b4a68U3L3k9MH4IvNg7O9fbGCEtOvGjtOrcQvyOg1qURiM7FrYc6t7VprMIF6R6Xq6IT4oK%2b0sphS9U%2beSXRRSsggpHYYRRP5hLLdVg0WddDsaayi126gpibB2SqlVOyX%2bwL6Kv%2fctszuPrAJPIx3PI44Nt5kfTqG7NdDTmhwkEyU%2b8zXeQboE3OaeQAyc8ZHiCIgVNk2ZiQDuJI75nNKMJxuzYg8Qkoaf2m272Sw50yGDLaQNfNN2%2bc%2fa2oTic%2b3Mm9JTyFo77mRmDTGl7Zbo3NAmHI8Nr737%2fAw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fi4y9aRIv6xRklGnBrlq8xNHHmMTVxhsmltbS%2fz43OOfhfBzOeWg9v6lD0wupeQ8t3OYFzk3N085KjdIDoCM9%2beEd75VBlnniBh06IOdK0qkZVTP0EsAK1W%2f2BumoqqFuM0Z0wqml08o1N2YNXceFYJyGa8P4JEHc0GmQQ62ML34vydwqwHjLFWf%2fQX6QsdGva3Md902IXB2uQq8vUqyPg%2bC9j0X5nZX7IsPZrghLnGP3eMAtroMIxQV1jkV6TwJqx8vJSoo%2fn9%2bPQbykeP%2bZisjOLrGVBOktWcSSXbYwXdguFeHKIycJTr72fP4C"}' headers: cache-control: no-cache - content-length: '693' + content-length: '663' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:44 GMT + date: Thu, 11 Nov 2021 03:24:36 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 208b8956-ed4b-4d97-9212-bf317170dbd8 + x-ms-original-request-ids: 0ff2c5ba-c278-4a54-8a11-007b443e8a3b status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=Hc3RaoMwGAXgd5GxO5vE1hYLZaxgLtrV0Zj8K95FjZtoophYbEvffVI4Nx8cznl4Rk3uqzaN9bYPL/5MuUgDb%2Bv9OdfbLUJaGvmrtDJuIe/joBZFp5Edc1sMde/qzliEc1KtVxvik7zC/qospS9VsfSLPAo2QYWjMMKoH7prXarBolNdDJ3tKrc4qhvIsXWoVK1yqnzBfsi%2B9q9zcx7fBZhEPp5D3t9sMz92jTI7rqMxSyeQJLuINjsCPYBoMsEgA0FEyPEEOQXN4mbiwEyJozjlLIEYY96wvRLhbPot9XnFWwazh9mJ1PbGAeQZh3F2T9gphiW/9IdEkLXge3aidCl%2BHFWUCsbxzns%2B/wE%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RboIwAEX/hSx7w7YM5zAhC65oYBZipSzxrZTiAC2EVjM0/rtkyX05ycm5d0vJP7OtVaut5d0Kg33G9o61tH6N6fUSgDNX/CjPUpkZv10GORPdGehLocVQ96bulAawQNW7u0A2Kipou2XJbS7Fmy0Kz1k4FfTmHgT90F3rUg4akFoMne4qM/uWY84vJwNKeZJGlv%2BgP3lf29fJnOK%2BA5Fnw2no9UW302PXSuWzNv%2BheZxRRtdZmLM989ItO7EKR4hkYp7i45ji0E2adk5wgAiOP0gWbyiLbrQJ4A7mXwlO1gmMEM3KDcGH1a4RI20OqySMfOvxeAI%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra4MwGEX/i4y92SSuriiUsTEttJtb0%2BRr8S2auIrGiInFrvS/Twb35XAP9968Tk3uo%2B4a68U3L3k9MH4IvNg7O9fbGCEtOvGjtOrcQvyOg1qURiM7FrYc6t7VprMIF6R6Xq6IT4oK%2B0sphS9U%2BeSXRRSsggpHYYRRP5hLLdVg0WddDsaayi126gpibB2SqlVOyX%2BwL6Kv/ctszuPrAJPIx3PI44Nt5kfTqG7NdDTmhwkEyU%2B8zXeQboE3OaeQAyc8ZHiCIgVNk2ZiQDuJI75nNKMJxuzYg8Qkoaf2m272Sw50yGDLaQNfNN2%2Bc/a2oTic%2B3Mm9JTyFo77mRmDTGl7Zbo3NAmHI8Nr737/Aw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aRIv6xRklGnBrlq8xNHHmMTVxhsmltbS/z43OOfhfBzOeWg9v6lD0wupeQ8t3OYFzk3N085KjdIDoCM9%2BeEd75VBlnniBh06IOdK0qkZVTP0EsAK1W/2BumoqqFuM0Z0wqml08o1N2YNXceFYJyGa8P4JEHc0GmQQ62ML34vydwqwHjLFWf/QX6QsdGva3Md902IXB2uQq8vUqyPg%2BC9j0X5nZX7IsPZrghLnGP3eMAtroMIxQV1jkV6TwJqx8vJSoo/n9%2BPQbykeP%2BZisjOLrGVBOktWcSSXbYwXdguFeHKIycJTr72fP4C response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcburIm1LRZk7EcH7XQsJlnJXTSxk2jiTCxupe8%2bGZybA4fvu3pazu6t1cp6%2b6uXPpaYlKG3976cG%2bw%2bCHqu%2bVn2UrsV%2f51GuapNH9ipsvXYDq412gaggs022kEfVg3wIyG4z2W99usqDndhA%2bJNDIJhNJdWyNEGeVuPxprGrY7yh%2fKpc4GQnXRS%2fIt94EPrX5ZyGU9CAGMfLMD7O6uWR6OkTnAfT6ycKYfsRDp2pNmBEsUIoowSSDYYzLTKaI9SNWOKtEwhKU%2fiXfb5jAnKBIBbtDh9PUeEIvMBs2%2biigKl7BmfhiwHm5Tgp5IDGuEOWUQPhK2HIk%2bHF6xQIWC2%2fcQg8W63Pw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3baoQwAET%2fRUrfNInVbhWklKrFdqN4iYW%2bxRitjTdM3O267L9XCjMPB4YzV23kv%2brYjUJq7lULXvKC5Kbmat9KzdIFYKAjbfnAR2XQbV24waYByLWSbOlm1U2jBLBCzaN1QDqqGqhbdU11ytmDzirHPJgNdGwHgnmZTl3NFwlwx5ZJTo0yPvilpGuvQM17rnj9D%2fKZzp1%2b2pe73DMhcnS4B93fSbE%2fToKPHhHlZ1a%2bFxnJwiIoSU6c5Eh60vgRwkV7xr6wEj%2bF8Q%2fb257j7esJw8hORXpOBbEzga3Yz94SEvqxCDYMy9e4wHZMwjAtIk%2b73f4A"}' headers: cache-control: no-cache - content-length: '705' + content-length: '666' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:45 GMT + date: Thu, 11 Nov 2021 03:24:37 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 7b30049b-a430-45a9-be32-572875182523 + x-ms-original-request-ids: 88ad613a-090d-4d51-ab46-c63ffdb15f28 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra4MwGEX/i4y92SSuriiUsTEttJtb0%2BRr8S2auIrGiInFrvS/Twb35XAP9968Tk3uo%2B4a68U3L3k9MH4IvNg7O9fbGCEtOvGjtOrcQvyOg1qURiM7FrYc6t7VprMIF6R6Xq6IT4oK%2B0sphS9U%2BeSXRRSsggpHYYRRP5hLLdVg0WddDsaayi126gpibB2SqlVOyX%2BwL6Kv/ctszuPrAJPIx3PI44Nt5kfTqG7NdDTmhwkEyU%2B8zXeQboE3OaeQAyc8ZHiCIgVNk2ZiQDuJI75nNKMJxuzYg8Qkoaf2m272Sw50yGDLaQNfNN2%2Bc/a2oTic%2B3Mm9JTyFo77mRmDTGl7Zbo3NAmHI8Nr737/Aw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aRIv6xRklGnBrlq8xNHHmMTVxhsmltbS/z43OOfhfBzOeWg9v6lD0wupeQ8t3OYFzk3N085KjdIDoCM9%2BeEd75VBlnniBh06IOdK0qkZVTP0EsAK1W/2BumoqqFuM0Z0wqml08o1N2YNXceFYJyGa8P4JEHc0GmQQ62ML34vydwqwHjLFWf/QX6QsdGva3Md902IXB2uQq8vUqyPg%2BC9j0X5nZX7IsPZrghLnGP3eMAtroMIxQV1jkV6TwJqx8vJSoo/n9%2BPQbykeP%2BZisjOLrGVBOktWcSSXbYwXdguFeHKIycJTr72fP4C - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcburIm1LRZk7EcH7XQsJlnJXTSxk2jiTCxupe8%2BGZybA4fvu3pazu6t1cp6%2B6uXPpaYlKG3976cG%2Bw%2BCHqu%2BVn2UrsV/51GuapNH9ipsvXYDq412gaggs022kEfVg3wIyG4z2W99usqDndhA%2BJNDIJhNJdWyNEGeVuPxprGrY7yh/Kpc4GQnXRS/It94EPrX5ZyGU9CAGMfLMD7O6uWR6OkTnAfT6ycKYfsRDp2pNmBEsUIoowSSDYYzLTKaI9SNWOKtEwhKU/iXfb5jAnKBIBbtDh9PUeEIvMBs2%2BiigKl7BmfhiwHm5Tgp5IDGuEOWUQPhK2HIk%2BHF6xQIWC2/cQg8W63Pw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3baoQwAET/RUrfNInVbhWklKrFdqN4iYW%2BxRitjTdM3O267L9XCjMPB4YzV23kv%2BrYjUJq7lULXvKC5Kbmat9KzdIFYKAjbfnAR2XQbV24waYByLWSbOlm1U2jBLBCzaN1QDqqGqhbdU11ytmDzirHPJgNdGwHgnmZTl3NFwlwx5ZJTo0yPvilpGuvQM17rnj9D/KZzp1%2B2pe73DMhcnS4B93fSbE/ToKPHhHlZ1a%2BFxnJwiIoSU6c5Eh60vgRwkV7xr6wEj%2BF8Q/b257j7esJw8hORXpOBbEzga3Yz94SEvqxCDYMy9e4wHZMwjAtIk%2B73f4A response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3RaoMwGEbfRcburImrLRbK2IWutFu7xiSId9H8rpImcSYWt9F3nwy%2bmwOH8%2f0GBib%2f1hnlgs1vkL0UlBVxsAku3vduE0VaGPEJGoxfiJ9xgEVjdeTG2jVD1%2fvOGhehGrer5RqHuG5RuJRShAKap7Cp03gdtyhNUhT1g711EgYXvXfNYJ1t%2feIA31yMVx9JuIIH%2bQ%2fuWfRdeJvNOb6NEU5DNA8%2fPjg1P1oFZkt1OlbFxAWuSnatDjzfc6YqRnjFGWYJRROvc65JpibKiYEMr4pSnoRCiJY9B5ZmnOZHUHZJEbEkS76qTH5wluyo9hWwJDsrciKvU8507854PxTl5SjUfkcVP5G5RynaBvf7Hw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAEb%2fSxh701zarbNQxlgjuDVKbeLYY9TYuXjDxHZN6X%2bvDL6XA4fzXUGn%2fuyu7rQB6yugbwcuDgSswY%2b1g1lD2MpOHlWrOutLN43KL%2foWmik3xVgPtu47A1GOq%2bflCns4r5C3LEvpSVUsvCIPyIpUKHgKEBzG%2flSXajSQ1cXYm76y%2fqe6ZHJqLCxVo6wq%2f8G8yqH2TrM5xzcE4cBD8%2fDjg9HzY69VtxE6%2b0qzD56KNOQ0EwcRJDvRiGobYcaPZ8YjF%2f%2fuScLZOebMJdv0hXGKEx6R2EVkr6NFTNN35jRirglj940YzcKE0sve6Q243e4%3d"}' headers: cache-control: no-cache - content-length: '694' + content-length: '675' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:45 GMT + date: Thu, 11 Nov 2021 03:24:37 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 10ead39c-2d79-44b4-8db9-43e464b34731 + x-ms-original-request-ids: 92c2159c-e618-4b4d-b6a3-f9125ec998f2 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcburIm1LRZk7EcH7XQsJlnJXTSxk2jiTCxupe8%2BGZybA4fvu3pazu6t1cp6%2B6uXPpaYlKG3976cG%2Bw%2BCHqu%2BVn2UrsV/51GuapNH9ipsvXYDq412gaggs022kEfVg3wIyG4z2W99usqDndhA%2BJNDIJhNJdWyNEGeVuPxprGrY7yh/Kpc4GQnXRS/It94EPrX5ZyGU9CAGMfLMD7O6uWR6OkTnAfT6ycKYfsRDp2pNmBEsUIoowSSDYYzLTKaI9SNWOKtEwhKU/iXfb5jAnKBIBbtDh9PUeEIvMBs2%2BiigKl7BmfhiwHm5Tgp5IDGuEOWUQPhK2HIk%2BHF6xQIWC2/cQg8W63Pw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3baoQwAET/RUrfNInVbhWklKrFdqN4iYW%2BxRitjTdM3O267L9XCjMPB4YzV23kv%2BrYjUJq7lULXvKC5Kbmat9KzdIFYKAjbfnAR2XQbV24waYByLWSbOlm1U2jBLBCzaN1QDqqGqhbdU11ytmDzirHPJgNdGwHgnmZTl3NFwlwx5ZJTo0yPvilpGuvQM17rnj9D/KZzp1%2B2pe73DMhcnS4B93fSbE/ToKPHhHlZ1a%2BFxnJwiIoSU6c5Eh60vgRwkV7xr6wEj%2BF8Q/b257j7esJw8hORXpOBbEzga3Yz94SEvqxCDYMy9e4wHZMwjAtIk%2B73f4A - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwGEbfRcburImrLRbK2IWutFu7xiSId9H8rpImcSYWt9F3nwy%2BmwOH8/0GBib/1hnlgs1vkL0UlBVxsAku3vduE0VaGPEJGoxfiJ9xgEVjdeTG2jVD1/vOGhehGrer5RqHuG5RuJRShAKap7Cp03gdtyhNUhT1g711EgYXvXfNYJ1t/eIA31yMVx9JuIIH%2BQ/uWfRdeJvNOb6NEU5DNA8/Pjg1P1oFZkt1OlbFxAWuSnatDjzfc6YqRnjFGWYJRROvc65JpibKiYEMr4pSnoRCiJY9B5ZmnOZHUHZJEbEkS76qTH5wluyo9hWwJDsrciKvU8507854PxTl5SjUfkcVP5G5RynaBvf7Hw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/Sxh701zarbNQxlgjuDVKbeLYY9TYuXjDxHZN6X%2BvDL6XA4fzXUGn/uyu7rQB6yugbwcuDgSswY%2B1g1lD2MpOHlWrOutLN43KL/oWmik3xVgPtu47A1GOq%2BflCns4r5C3LEvpSVUsvCIPyIpUKHgKEBzG/lSXajSQ1cXYm76y/qe6ZHJqLCxVo6wq/8G8yqH2TrM5xzcE4cBD8/Djg9HzY69VtxE6%2B0qzD56KNOQ0EwcRJDvRiGobYcaPZ8YjF/uScLZOebMJdv0hXGKEx6R2EVkr6NFTNN35jRirglj940YzcKE0sve6Q243e4%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y92SS2tiiUsQc7aFfHYpIV36LGzmk%2bamLnVvrfFwb35XAP994CJWb32qneBuktyJ4LQosoSINP54xNAZBc8bOQQrkF%2f51Gsai1BHaqbD12xnVaWQAr1K5XGxSiqoXhqml4yEW9DOsqiTZRC5M4gcCM%2bto1YrTg2NWjtrp1i4P4YXwaHGjEIJxo%2fsE%2bcdOFV2%2f68W0EURJCH%2fT4YHv%2fqHuhtkQmU1nMjKPyRIfywHZ7RvuSYlYyimhM4MyqHZM462fCsBJZfCFkn3PZLIky6gjjCz6ZnL2cVwRhjTP4jUleMLZbkw9j3%2fs48z7msp59%2f5XTmBLvY8bWZMBvmKKxIHAb3O9%2f"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNEbtOgUZ61Swq4qaONa7qNH5Lya21dJ3rwy%2bmwOH892Fnt74qeobJhh3wf6MEY4VwRD%2bOB%2bZAUBHelLSjvZcIus8USkbOsDmlGVTNfJq6BmQU1i8aXsowrSQRS3PiUhopopZqit7pZD1nS6DcRouVU4nBrwqmwY2FFz6pktC5paDnLaU0%2fwf2AcZK%2fGymVvcVGSoi%2fI2%2bPrCmu1xaGhv4ib5iZIjinDkIDvBMdaDE25xYbnQQ%2bXVq90lQJ7m1%2bUtQKHqo%2bN72Dh2WHuqv54PUZ1B33J3AXavkWUv%2furYnnVwAnz%2bCtdfU3g8ng%3d%3d"}' headers: cache-control: no-cache - content-length: '701' + content-length: '666' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:45 GMT + date: Thu, 11 Nov 2021 03:24:37 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: c1e8d2f9-390a-4adf-97e0-89309b14a9c1 + x-ms-original-request-ids: 1f55999c-ef01-416b-a8cb-49d46ccbc854 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3RaoMwGEbfRcburImrLRbK2IWutFu7xiSId9H8rpImcSYWt9F3nwy%2BmwOH8/0GBib/1hnlgs1vkL0UlBVxsAku3vduE0VaGPEJGoxfiJ9xgEVjdeTG2jVD1/vOGhehGrer5RqHuG5RuJRShAKap7Cp03gdtyhNUhT1g711EgYXvXfNYJ1t/eIA31yMVx9JuIIH%2BQ/uWfRdeJvNOb6NEU5DNA8/Pjg1P1oFZkt1OlbFxAWuSnatDjzfc6YqRnjFGWYJRROvc65JpibKiYEMr4pSnoRCiJY9B5ZmnOZHUHZJEbEkS76qTH5wluyo9hWwJDsrciKvU8507854PxTl5SjUfkcVP5G5RynaBvf7Hw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/Sxh701zarbNQxlgjuDVKbeLYY9TYuXjDxHZN6X%2BvDL6XA4fzXUGn/uyu7rQB6yugbwcuDgSswY%2B1g1lD2MpOHlWrOutLN43KL/oWmik3xVgPtu47A1GOq%2BflCns4r5C3LEvpSVUsvCIPyIpUKHgKEBzG/lSXajSQ1cXYm76y/qe6ZHJqLCxVo6wq/8G8yqH2TrM5xzcE4cBD8/Djg9HzY69VtxE6%2B0qzD56KNOQ0EwcRJDvRiGobYcaPZ8YjF//uScLZOebMJdv0hXGKEx6R2EVkr6NFTNN35jRirglj940YzcKE0sve6Q243e4%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y92SS2tiiUsQc7aFfHYpIV36LGzmk%2BamLnVvrfFwb35XAP994CJWb32qneBuktyJ4LQosoSINP54xNAZBc8bOQQrkF/51Gsai1BHaqbD12xnVaWQAr1K5XGxSiqoXhqml4yEW9DOsqiTZRC5M4gcCM%2Bto1YrTg2NWjtrp1i4P4YXwaHGjEIJxo/sE%2BcdOFV2/68W0EURJCH/T4YHv/qHuhtkQmU1nMjKPyRIfywHZ7RvuSYlYyimhM4MyqHZM462fCsBJZfCFkn3PZLIky6gjjCz6ZnL2cVwRhjTP4jUleMLZbkw9j3/s48z7msp59/5XTmBLvY8bWZMBvmKKxIHAb3O9/ + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNEbtOgUZ61Swq4qaONa7qNH5Lya21dJ3rwy%2BmwOH892Fnt74qeobJhh3wf6MEY4VwRD%2BOB%2BZAUBHelLSjvZcIus8USkbOsDmlGVTNfJq6BmQU1i8aXsowrSQRS3PiUhopopZqit7pZD1nS6DcRouVU4nBrwqmwY2FFz6pktC5paDnLaU0/wf2AcZK/GymVvcVGSoi/I2%2BPrCmu1xaGhv4ib5iZIjinDkIDvBMdaDE25xYbnQQ%2BXVq90lQJ7m1%2BUtQKHqo%2BN72Dh2WHuqv54PUZ1B33J3AXavkWUv/urYnnVwAnz%2BCtdfU3g8ng%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1Ra4MwGEX%2fi4y9WROrLRbK2CAW2ulGTD4636LGTYzRmdi6lf73yeC%2bXM7l3Juj5WxfG90aZ3dzyHPGeOY7O%2bfL2sHsPK8TWnzKTmq7Er%2fTKFdl33lmKkw5NoNtem08VOB6E2yxi4sauUFVCVfIcu2WReRv%2fRpFYYS8YewvTSVH4yVNOfamr%2b3qJH9ATMp6lVTSyuq%2fmCcxNO5lWS7yvY9w5KIl%2bPHBtMtj30q9Z1005dkMAudnrvITxEfgbc4p5MAxDxmaoYiho6SdGVAtSbihLE2FUmumKE1JRLKzSoF8BEwBTeAYw3l4h0NyZQBxQsKYL5xyWPPOCkrCb0HSN9HmB8Ze0oQEV2Bo79zvfw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAEb%2fi4y9aRJb1ynIGGjBrsnwEsf2FjU6jTdMbJ2l%2f70y%2bF4OHM5303q%2bqHPdC6k5N81%2fjxMam5qj%2fSo1SgeAjvWs4h3vlcHWeeJGPnRAzpnMp3pU9dBLADNUvuwPSEdZCfV9UTCd8Xyn55ltHswS2pYNwTgNl7rgkwS4zqdBDqUyPvhfyuZWgYK3XPHiH%2bQbG2v9splb3DUhsnW4DT0%2fSbE9DoL3LhXpV5SekohGx8RPaUztzzNtaekFCCfVFTfhQlZhEi9f8EqvOPl5JU2wYng6kqRCeA13xA8hEYFFILYiD1uk%2bV5CEcBIYFe73x8%3d"}' headers: cache-control: no-cache - content-length: '704' + content-length: '656' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:45 GMT + date: Thu, 11 Nov 2021 03:24:37 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 05a54ac7-b9fc-4be3-abe1-d4fc7a638018 + x-ms-original-request-ids: 84d9c47c-d0df-49d6-97a1-abe61cf9c2c0 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y92SS2tiiUsQc7aFfHYpIV36LGzmk%2BamLnVvrfFwb35XAP994CJWb32qneBuktyJ4LQosoSINP54xNAZBc8bOQQrkF/51Gsai1BHaqbD12xnVaWQAr1K5XGxSiqoXhqml4yEW9DOsqiTZRC5M4gcCM%2Bto1YrTg2NWjtrp1i4P4YXwaHGjEIJxo/sE%2BcdOFV2/68W0EURJCH/T4YHv/qHuhtkQmU1nMjKPyRIfywHZ7RvuSYlYyimhM4MyqHZM462fCsBJZfCFkn3PZLIky6gjjCz6ZnL2cVwRhjTP4jUleMLZbkw9j3/s48z7msp59/5XTmBLvY8bWZMBvmKKxIHAb3O9/ + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNEbtOgUZ61Swq4qaONa7qNH5Lya21dJ3rwy%2BmwOH892Fnt74qeobJhh3wf6MEY4VwRD%2BOB%2BZAUBHelLSjvZcIus8USkbOsDmlGVTNfJq6BmQU1i8aXsowrSQRS3PiUhopopZqit7pZD1nS6DcRouVU4nBrwqmwY2FFz6pktC5paDnLaU0/wf2AcZK/GymVvcVGSoi/I2%2BPrCmu1xaGhv4ib5iZIjinDkIDvBMdaDE25xYbnQQ%2BXVq90lQJ7m1%2BUtQKHqo%2BN72Dh2WHuqv54PUZ1B33J3AXavkWUv/urYnnVwAnz%2BCtdfU3g8ng%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra4MwGEX/i4y9WROrLRbK2CAW2ulGTD4636LGTYzRmdi6lf73yeC%2BXM7l3Juj5WxfG90aZ3dzyHPGeOY7O%2BfL2sHsPK8TWnzKTmq7Er/TKFdl33lmKkw5NoNtem08VOB6E2yxi4sauUFVCVfIcu2WReRv/RpFYYS8YewvTSVH4yVNOfamr%2B3qJH9ATMp6lVTSyuq/mCcxNO5lWS7yvY9w5KIl%2BPHBtMtj30q9Z1005dkMAudnrvITxEfgbc4p5MAxDxmaoYiho6SdGVAtSbihLE2FUmumKE1JRLKzSoF8BEwBTeAYw3l4h0NyZQBxQsKYL5xyWPPOCkrCb0HSN9HmB8Ze0oQEV2Bo79zvfw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9aRJb1ynIGGjBrsnwEsf2FjU6jTdMbJ2l/70y%2BF4OHM5303q%2BqHPdC6k5N81/jxMam5qj/So1SgeAjvWs4h3vlcHWeeJGPnRAzpnMp3pU9dBLADNUvuwPSEdZCfV9UTCd8Xyn55ltHswS2pYNwTgNl7rgkwS4zqdBDqUyPvhfyuZWgYK3XPHiH%2BQbG2v9splb3DUhsnW4DT0/SbE9DoL3LhXpV5SekohGx8RPaUztzzNtaekFCCfVFTfhQlZhEi9f8EqvOPl5JU2wYng6kqRCeA13xA8hEYFFILYiD1uk%2BV5CEcBIYFe73x8%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1Ra4MwFIX%2fi4y92dy42mKhjI3ZDbs6iEna%2bhb1uooaxcTiVvrfJ4Pz8nE%2bzrk5Gif7WenaOJubE74kXCSes3Eu1vZmQ0irtPrGFrVdqN9xwEXetcSMmcmHqrdVpw2BjJar5Zq6NCvBXRaFchXmT26eBd7aKyHwAyD90F2rAgdDDlU%2bdKYr7WKPP1KNjSUFNmix%2bAfzrPrKvc7mPL71gAYuzKGPD6aeH7sa9Za3wZgmk1Q0PYkm3ctdJEWdCiZTKajwOUwy28mWhfXEJdMY%2bquER7F8j1ccGMNZOp76WDXnpWhkwoQvjpzFCvoPzl%2bjA%2fihrONYtdPb3EcHEeyOp8sXE0B5wwwDX5x%2fYevc738%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9aaKt6xRkbFVHtxpRE0cfo0an8QsT29rS%2fz4Z3Ptw4HLuXenZVR7rngvFvivee4JJYii28ivlKGwAOtrTinWslxq9zRPT8qEDYs5EPtWjrIdeAJjp5ct2p6t6VkJ1WxRUpSzfqHlmGTujhJZpQTBOw7ku2CRAUOfTIIZSat9sSencSlCwlklW%2fIN4o2OtntflKncMqFsqXKM%2fPwm%2bPg6c9Q7h6U%2bcfuGYxD72UpIQKzySlpTuQQ9wdQmaaIOaagkxvyJM1qavsfvxGXBihtjfBzzeI%2fe0IOJ7qDndkIv8EEdmBKNL7B0c5fH4Aw%3d%3d"}' headers: cache-control: no-cache - content-length: '697' + content-length: '661' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:45 GMT + date: Thu, 11 Nov 2021 03:24:37 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 015bda2d-7a3c-40af-b4ea-7583169393a2 + x-ms-original-request-ids: e03b59c0-27c1-4992-8dd7-bb1077380e3e status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra4MwGEX/i4y9WROrLRbK2CAW2ulGTD4636LGTYzRmdi6lf73yeC%2BXM7l3Juj5WxfG90aZ3dzyHPGeOY7O%2BfL2sHsPK8TWnzKTmq7Er/TKFdl33lmKkw5NoNtem08VOB6E2yxi4sauUFVCVfIcu2WReRv/RpFYYS8YewvTSVH4yVNOfamr%2B3qJH9ATMp6lVTSyuq/mCcxNO5lWS7yvY9w5KIl%2BPHBtMtj30q9Z1005dkMAudnrvITxEfgbc4p5MAxDxmaoYiho6SdGVAtSbihLE2FUmumKE1JRLKzSoF8BEwBTeAYw3l4h0NyZQBxQsKYL5xyWPPOCkrCb0HSN9HmB8Ze0oQEV2Bo79zvfw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9aRJb1ynIGGjBrsnwEsf2FjU6jTdMbJ2l/70y%2BF4OHM5303q%2BqHPdC6k5N81/jxMam5qj/So1SgeAjvWs4h3vlcHWeeJGPnRAzpnMp3pU9dBLADNUvuwPSEdZCfV9UTCd8Xyn55ltHswS2pYNwTgNl7rgkwS4zqdBDqUyPvhfyuZWgYK3XPHiH%2BQbG2v9splb3DUhsnW4DT0/SbE9DoL3LhXpV5SekohGx8RPaUztzzNtaekFCCfVFTfhQlZhEi9f8EqvOPl5JU2wYng6kqRCeA13xA8hEYFFILYiD1uk%2BV5CEcBIYFe73x8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra4MwFIX/i4y92dy42mKhjI3ZDbs6iEna%2Bhb1uooaxcTiVvrfJ4Pz8nE%2Bzrk5Gif7WenaOJubE74kXCSes3Eu1vZmQ0irtPrGFrVdqN9xwEXetcSMmcmHqrdVpw2BjJar5Zq6NCvBXRaFchXmT26eBd7aKyHwAyD90F2rAgdDDlU%2BdKYr7WKPP1KNjSUFNmix%2BAfzrPrKvc7mPL71gAYuzKGPD6aeH7sa9Za3wZgmk1Q0PYkm3ctdJEWdCiZTKajwOUwy28mWhfXEJdMY%2BquER7F8j1ccGMNZOp76WDXnpWhkwoQvjpzFCvoPzl%2BjA/ihrONYtdPb3EcHEeyOp8sXE0B5wwwDX5x/Yevc738%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aaKt6xRkbFVHtxpRE0cfo0an8QsT29rS/z4Z3Ptw4HLuXenZVR7rngvFvivee4JJYii28ivlKGwAOtrTinWslxq9zRPT8qEDYs5EPtWjrIdeAJjp5ct2p6t6VkJ1WxRUpSzfqHlmGTujhJZpQTBOw7ku2CRAUOfTIIZSat9sSencSlCwlklW/IN4o2OtntflKncMqFsqXKM/Pwm%2BPg6c9Q7h6U%2BcfuGYxD72UpIQKzySlpTuQQ9wdQmaaIOaagkxvyJM1qavsfvxGXBihtjfBzzeI/e0IOJ7qDndkIv8EEdmBKNL7B0c5fH4Aw%3D%3D response: body: - string: '{"value":[]}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAEb%2fi4y9xVzWrlOQIajQrSpq4vAxauysV0ysnaX%2fvTL4Xg4cznfXenFTp7pvpGbeNddOKEuIZmq%2fSo3ShLDjPT%2bLTvRK5%2bs8Cb0YOijnXBZTPap66CVEOa7edwcMcF4hsCtLDrgo3kCRG%2bRAKmTsDQTHabjWpZgk9OtiGuRQKf1b%2fKV8bhUsRSuUKP9BfvKxBtfN3OIWQdgAaBt%2bfZHN9jg0ordYk%2f7E6ReNWexRN2UJM8ITa1nlHLFPz4u%2f2nv%2fEt1Ch63BmpGQth%2bB03rBhZGYuktAUy9wjkvEPDd0%2fJtPMxRTG0drhAI3s7TH4wk%3d"}' headers: cache-control: no-cache - content-length: '133' + content-length: '659' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:45 GMT + date: Thu, 11 Nov 2021 03:24:37 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 9b5d3a71-e3c6-431d-bc42-a99eb20c20cc + x-ms-original-request-ids: 65a9b034-92d5-4c15-84c8-66ef4c886e4c status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1Ra4MwFIX/i4y92dy42mKhjI3ZDbs6iEna%2Bhb1uooaxcTiVvrfJ4Pz8nE%2Bzrk5Gif7WenaOJubE74kXCSes3Eu1vZmQ0irtPrGFrVdqN9xwEXetcSMmcmHqrdVpw2BjJar5Zq6NCvBXRaFchXmT26eBd7aKyHwAyD90F2rAgdDDlU%2BdKYr7WKPP1KNjSUFNmix%2BAfzrPrKvc7mPL71gAYuzKGPD6aeH7sa9Za3wZgmk1Q0PYkm3ctdJEWdCiZTKajwOUwy28mWhfXEJdMY%2BquER7F8j1ccGMNZOp76WDXnpWhkwoQvjpzFCvoPzl%2BjA/ihrONYtdPb3EcHEeyOp8sXE0B5wwwDX5x/Yevc738%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aaKt6xRkbFVHtxpRE0cfo0an8QsT29rS/z4Z3Ptw4HLuXenZVR7rngvFvivee4JJYii28ivlKGwAOtrTinWslxq9zRPT8qEDYs5EPtWjrIdeAJjp5ct2p6t6VkJ1WxRUpSzfqHlmGTujhJZpQTBOw7ku2CRAUOfTIIZSat9sSencSlCwlklW/IN4o2OtntflKncMqFsqXKM/Pwm%2BPg6c9Q7h6U%2BcfuGYxD72UpIQKzySlpTuQQ9wdQmaaIOaagkxvyJM1qavsfvxGXBihtjfBzzeI/e0IOJ7qDndkIv8EEdmBKNL7B0c5fH4Aw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9xVzWrlOQIajQrSpq4vAxauysV0ysnaX/vTL4Xg4cznfXenFTp7pvpGbeNddOKEuIZmq/So3ShLDjPT%2BLTvRK5%2Bs8Cb0YOijnXBZTPap66CVEOa7edwcMcF4hsCtLDrgo3kCRG%2BRAKmTsDQTHabjWpZgk9OtiGuRQKf1b/KV8bhUsRSuUKP9BfvKxBtfN3OIWQdgAaBt%2BfZHN9jg0ordYk/7E6ReNWexRN2UJM8ITa1nlHLFPz4u/2nv/Et1Ch63BmpGQth%2BB03rBhZGYuktAUy9wjkvEPDd0/JtPMxRTG0drhAI3s7TH4wk%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azps-test-group/providers/Microsoft.KeyVault/vaults/azps-test-kv4","name":"azps-test-kv4","type":"Microsoft.KeyVault/vaults","location":"southcentralus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"d1178d20-4ca4-45f0-ba9a-5a08f588da8d","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://azps-test-kv4.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.KeyVault/vaults/vault1569","name":"vault1569","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"lastModifiedBy":"yishiwang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T02:57:58.008Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["Get","Create","Delete","List","Update","Import","Backup","Restore","Recover"],"secrets":["Get","List","Set","Delete","Backup","Restore","Recover"],"certificates":["Get","List","Delete","Create","Import","Update","ManageContacts","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers","ManageIssuers","Recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"ad27285a-4305-4ba5-b8e8-54367509b9d2","permissions":{"keys":["WrapKey","Get","UnwrapKey"],"secrets":[],"certificates":[]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3707fb2f-ac10-4591-a04f-8b0d786ea37d","permissions":{"keys":["Get","List","Update","Create","Delete","Import","Recover","Backup","Restore","Purge"],"secrets":["Restore","Backup","Get","List","Set","Delete","Recover","Purge"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","Purge"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"enablePurgeProtection":true,"vaultUri":"https://vault1569.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=3dTRbpswFAbgd0FVr5rGTkKrVIqmZoW0aQ0tGDv4zoBTwBgcICFJ1Xefq0272Bt0kuUbHx1L3%2fntD6sWx%2f6lqGVn3X1Yzn2Io9C6s%2fK%2b193deKx4zd%2bFEnV%2fzc%2f7VlynjRp3%2b6RL20L3RVN3Y5DA7c3sFo5gsgWjWZbxERfpdJQm88ntZAvm9hyMddsciky03RgVadt0zba%2ffhYnwvdVPz587d2Pi77RC3jJdTE6mErTfDEBcD4CZsHLi06aGxsp6kUo2kORiiXvRHaF1XzPwiMjwN4xJ6NCBatQ5og41QxHQSkcuAs32hOqO2IYuCiCTog9H03zhuK1j1wd43KZI1gBTFIbrcgmxGBhXVmhH%2bHHn46Hg%2fuXb6qC6nz4o%2fLgbSouKgaogi2iXvxWrj0E5BBXKUSR7VClCwTZDXPzMIPNiT%2fqInRdO64CP4XaoRvNyHQJMV4%2fp9LeR6rnCOqWUSiNXu9hViVEz6iyn5OV12fndZng9yOTmZ9O3DhSxxJBZ4gpOCYq6P2HJSNn0sTAnEO9I%2fWaRxjMjTw1I%2fpPxJHURjjgaWQ%2fhXXOCFxrIzSgydM5UtBDRoJFuY8occI6y5FkexZls0yRTVS7JXErmxkxLmcnsdKSus4Jl%2bshc%2bxNcjb5VccJJZk09TtcVzIwk%2ftH%2fPyV8xTYvffgFgnN7Bh7naBuz1ewevst%2fjfmTnT%2f%2bh0%2fAJ6oYaCVgVyxJ6pySabvAyYBQXIevH496M%2fPXw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fi4y9aRJ16xRk1OqgXY14iYO9RY1O4w0Tu9rS%2fz4ZnPPwweE7d2VgV3luBi4U%2b674%2byQlia7Yyo%2bUk7AB6OlAa9azQWr0tsxMK8YeiCUXxdxMshkHAWCOqldzh1SUV1A1y5KqlBWGWuSWvtMraL1YEEzzeGlKNgsQNMU8irGS2idbM7p0EpSsY5KV%2fyDe6dSol225yR0dIkuFW9Dzk%2bDb48jZ4BCefcXZKY1J%2fJH6GUmIFZ5JRyrviIK0%2fsVecA29aOtxxSlZwxS%2fRe23G3iFGfvYxTw%2bYK828a1GmPsGbl0fk9MB88iI272jPB5%2f"}' headers: cache-control: no-cache - content-length: '2094' + content-length: '661' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:45 GMT + date: Thu, 11 Nov 2021 03:24:37 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: a3b13257-6b77-497a-aafe-b55bef9ba835 + x-ms-original-request-ids: 6989d109-a9b5-4804-89e0-74a62fc437fe status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9xVzWrlOQIajQrSpq4vAxauysV0ysnaX/vTL4Xg4cznfXenFTp7pvpGbeNddOKEuIZmq/So3ShLDjPT%2BLTvRK5%2Bs8Cb0YOijnXBZTPap66CVEOa7edwcMcF4hsCtLDrgo3kCRG%2BRAKmTsDQTHabjWpZgk9OtiGuRQKf1b/KV8bhUsRSuUKP9BfvKxBtfN3OIWQdgAaBt%2BfZHN9jg0ordYk/7E6ReNWexRN2UJM8ITa1nlHLFPz4u/2nv/Et1Ch63BmpGQth%2BB03rBhZGYuktAUy9wjkvEPDd0/JtPMxRTG0drhAI3s7TH4wk%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=3dTRbpswFAbgd0FVr5rGTkKrVIqmZoW0aQ0tGDv4zoBTwBgcICFJ1Xefq0272Bt0kuUbHx1L3/ntD6sWx/6lqGVn3X1Yzn2Io9C6s/K%2B193deKx4zd%2BFEnV/zc/7VlynjRp3%2B6RL20L3RVN3Y5DA7c3sFo5gsgWjWZbxERfpdJQm88ntZAvm9hyMddsciky03RgVadt0zba/fhYnwvdVPz587d2Pi77RC3jJdTE6mErTfDEBcD4CZsHLi06aGxsp6kUo2kORiiXvRHaF1XzPwiMjwN4xJ6NCBatQ5og41QxHQSkcuAs32hOqO2IYuCiCTog9H03zhuK1j1wd43KZI1gBTFIbrcgmxGBhXVmhH%2BHHn46Hg/uXb6qC6nz4o/LgbSouKgaogi2iXvxWrj0E5BBXKUSR7VClCwTZDXPzMIPNiT/qInRdO64CP4XaoRvNyHQJMV4/p9LeR6rnCOqWUSiNXu9hViVEz6iyn5OV12fndZng9yOTmZ9O3DhSxxJBZ4gpOCYq6P2HJSNn0sTAnEO9I/WaRxjMjTw1I/pPxJHURjjgaWQ/hXXOCFxrIzSgydM5UtBDRoJFuY8occI6y5FkexZls0yRTVS7JXErmxkxLmcnsdKSus4Jl%2Bshc%2BxNcjb5VccJJZk09TtcVzIwk/tH/PyV8xTYvffgFgnN7Bh7naBuz1ewevst/jfmTnT/%2Bh0/AJ6oYaCVgVyxJ6pySabvAyYBQXIevH496M/PXw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aRJ16xRk1OqgXY14iYO9RY1O4w0Tu9rS/z4ZnPPwweE7d2VgV3luBi4U%2B674%2ByQlia7Yyo%2BUk7AB6OlAa9azQWr0tsxMK8YeiCUXxdxMshkHAWCOqldzh1SUV1A1y5KqlBWGWuSWvtMraL1YEEzzeGlKNgsQNMU8irGS2idbM7p0EpSsY5KV/yDe6dSol225yR0dIkuFW9Dzk%2BDb48jZ4BCefcXZKY1J/JH6GUmIFZ5JRyrviIK0/sVecA29aOtxxSlZwxS/Re23G3iFGfvYxTw%2BYK828a1GmPsGbl0fk9MB88iI272jPB5/ response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZLbTuswEEX%2fJUI8URKHpihI6IhALg0kEc7Fjd%2fs2MWpm0tzaVMQ%2f0444umcL0AazdPMHs3a%2b0Op%2bTS8lLXslbsPxX6IkzRW7hQxDG1%2fp6oVqckbr3g9XJP3sePXRVOp%2fUj7oivboWzqXtUo2K6Wt2AB6FZbLBkjC8KLm0VBTf1W32qmYWpq2zXHkvGuV4Oy6Jq%2b2Q7Xz%2fyckXE%2fqMfv3v%2b5GJr2HlyStlwc58lZ%2fF7XgLnQ5gKXF72cLzaS1%2fcx745lwS3Sc3aVVOaI4wlnmnHANkO8gm4sRZBp7SHX5RQ4bZ7srBDa%2bRJlLCIV9LK6lfDm9fwzb79uRJgmmqlcKXGUJt6jHSbw4eWXkghqcfr57Cnc7ElQTTMZiApp5HFl7pGNTzgtDKL7a%2fzk46B605K6jTnyx7SGBHmWkUvW0AquqcdEAOSU79aA6pmXbNqISv%2bAHUYClA1REkoIcoCkeKQoXFN3iOhGTFiyqNCdPK2mXQD8JbZFNzuxShNHZLbRzvonKsGI3X3J3v%2bSR%2favzd5%2fxPWThmZSc9Y2xG1xZrcAO6LhKPPSHSz53gcYGYTp2SGurZJuoIYq4zlMwRA8WSK2sxXOmMuq4AzrfRjop3OODJe4MMcewxlwVvO%2bNTuwhjsrmp0a%2fyE%2b5hJGVA%2fteOcLioSBEIiZ08x6jnj9zvrn5xc%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNMbadQoyNozgViNqktHLqLGz%2fkRMbNeWvvtk8N0cOJzvboziV%2b%2fbsVOGfzfQe0Fo4Ri%2b8aP1pHwABj7yoxjEqC1%2bW2ZhVXIAailVNbeTbuWogF3C5sXdQROWjW26dc1NLqqNWZWes3Ma29t6NphmeW5rMSuQtNUslWy09SWujC%2b9BrXohRb1P6g3PrXmeTXXeODY0DPtdfD5SXXro%2bzEGNCOfefsk%2bQ0jwhitKBeuqc9bcIYJuR4wSGFmKArvh0uaZi5OGSvOWIf%2bBShjBxgSroNRhHCNIYZodvkxKKUICcJYwejJDAejz8%3d"}' headers: cache-control: no-cache - content-length: '1075' + content-length: '663' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:46 GMT + date: Thu, 11 Nov 2021 03:24:37 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 8b9ad791-1b23-4079-80c6-465ef615cc35 + x-ms-original-request-ids: f2742a3c-0f8a-4c0b-802b-74e6456cb395 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=3dTRbpswFAbgd0FVr5rGTkKrVIqmZoW0aQ0tGDv4zoBTwBgcICFJ1Xefq0272Bt0kuUbHx1L3/ntD6sWx/6lqGVn3X1Yzn2Io9C6s/K%2B193deKx4zd%2BFEnV/zc/7VlynjRp3%2B6RL20L3RVN3Y5DA7c3sFo5gsgWjWZbxERfpdJQm88ntZAvm9hyMddsciky03RgVadt0zba/fhYnwvdVPz587d2Pi77RC3jJdTE6mErTfDEBcD4CZsHLi06aGxsp6kUo2kORiiXvRHaF1XzPwiMjwN4xJ6NCBatQ5og41QxHQSkcuAs32hOqO2IYuCiCTog9H03zhuK1j1wd43KZI1gBTFIbrcgmxGBhXVmhH%2BHHn46Hg/uXb6qC6nz4o/LgbSouKgaogi2iXvxWrj0E5BBXKUSR7VClCwTZDXPzMIPNiT/qInRdO64CP4XaoRvNyHQJMV4/p9LeR6rnCOqWUSiNXu9hViVEz6iyn5OV12fndZng9yOTmZ9O3DhSxxJBZ4gpOCYq6P2HJSNn0sTAnEO9I/WaRxjMjTw1I/pPxJHURjjgaWQ/hXXOCFxrIzSgydM5UtBDRoJFuY8occI6y5FkexZls0yRTVS7JXErmxkxLmcnsdKSus4Jl%2Bshc%2BxNcjb5VccJJZk09TtcVzIwk/tH/PyV8xTYvffgFgnN7Bh7naBuz1ewevst/jfmTnT/%2Bh0/AJ6oYaCVgVyxJ6pySabvAyYBQXIevH496M/PXw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aRJ16xRk1OqgXY14iYO9RY1O4w0Tu9rS/z4ZnPPwweE7d2VgV3luBi4U%2B674%2ByQlia7Yyo%2BUk7AB6OlAa9azQWr0tsxMK8YeiCUXxdxMshkHAWCOqldzh1SUV1A1y5KqlBWGWuSWvtMraL1YEEzzeGlKNgsQNMU8irGS2idbM7p0EpSsY5KV/yDe6dSol225yR0dIkuFW9Dzk%2BDb48jZ4BCefcXZKY1J/JH6GUmIFZ5JRyrviIK0/sVecA29aOtxxSlZwxS/Re23G3iFGfvYxTw%2BYK828a1GmPsGbl0fk9MB88iI272jPB5/ - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLbTuswEEX/JUI8URKHpihI6IhALg0kEc7Fjd/s2MWpm0tzaVMQ/0444umcL0AazdPMHs3a%2B0Op%2BTS8lLXslbsPxX6IkzRW7hQxDG1/p6oVqckbr3g9XJP3sePXRVOp/Uj7oivboWzqXtUo2K6Wt2AB6FZbLBkjC8KLm0VBTf1W32qmYWpq2zXHkvGuV4Oy6Jq%2B2Q7Xz/yckXE/qMfv3v%2B5GJr2HlyStlwc58lZ/F7XgLnQ5gKXF72cLzaS1/cx745lwS3Sc3aVVOaI4wlnmnHANkO8gm4sRZBp7SHX5RQ4bZ7srBDa%2BRJlLCIV9LK6lfDm9fwzb79uRJgmmqlcKXGUJt6jHSbw4eWXkghqcfr57Cnc7ElQTTMZiApp5HFl7pGNTzgtDKL7a/zk46B605K6jTnyx7SGBHmWkUvW0AquqcdEAOSU79aA6pmXbNqISv%2BAHUYClA1REkoIcoCkeKQoXFN3iOhGTFiyqNCdPK2mXQD8JbZFNzuxShNHZLbRzvonKsGI3X3J3v%2BSR/avzd5/xPWThmZSc9Y2xG1xZrcAO6LhKPPSHSz53gcYGYTp2SGurZJuoIYq4zlMwRA8WSK2sxXOmMuq4AzrfRjop3OODJe4MMcewxlwVvO%2BNTuwhjsrmp0a/yE%2B5hJGVA/teOcLioSBEIiZ08x6jnj9zvrn5xc%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNMbadQoyNozgViNqktHLqLGz/kRMbNeWvvtk8N0cOJzvboziV%2B/bsVOGfzfQe0Fo4Ri%2B8aP1pHwABj7yoxjEqC1%2BW2ZhVXIAailVNbeTbuWogF3C5sXdQROWjW26dc1NLqqNWZWes3Ma29t6NphmeW5rMSuQtNUslWy09SWujC%2B9BrXohRb1P6g3PrXmeTXXeODY0DPtdfD5SXXro%2BzEGNCOfefsk%2BQ0jwhitKBeuqc9bcIYJuR4wSGFmKArvh0uaZi5OGSvOWIf%2BBShjBxgSroNRhHCNIYZodvkxKKUICcJYwejJDAejz8%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZLbbqMwEIbfBVW9aoJhSyoiRatm48DSGhROBt8ZcBYwBgokDan67uts9yUqjUaa0z%2fSp%2f9Dadlleq1aPirrDwU%2bB2EUKGulnKZ%2bXKuqoC39wwRrpyW9nga2zDuhjqdszIeqn6quHVWQacfV45O20LIjWDwWBV1Qlv9Y5JmpP%2blHYBomUPuhO1cFG0YVVfnQjd1xWr6wOaanZlLPtzz%2bvJu6fqPd075anOWmFN%2foQDMXQIZ2fzdy%2bbHjrN0EbDhXOdvSkRUPoTBPJLiQGBhvBBaYCd8KeIli0L%2blOr%2bgfZ%2bG9db193wmvLBow6%2bRuNRIc2ZiGUFmoWuUFJ7sm8qDEnhRaP%2bCbug%2fv35TEqgt3%2f%2bT2LlJQ5GO5lBoAYVgDtqSZ4n%2fFtbO6EJwPbT7EkNnJDDXCo3PXuiWVPgAC4NS7NqR6F3G%2bXvY9i%2fUiqOobUgMDS3FBi4iIwlqt2biAIgl59ixs%2bueBtZBl6S9XN%2bnX6T3q5D7Dop7m9hxkyXbM4llLfXkXX0IwY08ht%2fWezfieOd%2beUkQgupmlTa5wZreDgQpUZNqck6p5Sdst01R648kTg2E3SmzfYKhscK140nip8wyPak3Y14O0ssJtaYmE%2b4KY4NmTTfTndNkIZzTOL8U2P2d26WHALx5%2bx9xcnVLHxoXzH3MoGHH4baOboQ%2fP%2f8C"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNIl16xRk1GmhW6PMJo7tLmq08R8Ta2fpu08G5%2baDw3duWsev6ii6WmrOTQt2J0JPpuZoZ6UG6QDQso6VvOWdMtgyjdzI%2bhbIKZXZKAYl%2bk4CmKLi2doiHaUF1K08Zzrj2UbPUtvcmgW0n2wIhrG%2fiJyPEmCRjb3sC2V88N%2bETY0COW%2b44vn%2fkK9sEPplNddz14TI1uEKenyQ9Vrsa965tE6%2b4uSdxDTekyChJ2pHR9rQwj8gTMo59EsrrHYbTII5rDIYkp%2bXiDQeroIZL58Q%2b9%2brc1hCGqCwOnsRqZe42r%2fhIPEwoa52v%2f8B"}' headers: cache-control: no-cache - content-length: '1060' + content-length: '653' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:46 GMT + date: Thu, 11 Nov 2021 03:24:38 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 3220c17a-da86-470f-a7d1-7d0f8249691c + x-ms-original-request-ids: 77868039-5765-4669-84d3-99f6d480da11 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLbTuswEEX/JUI8URKHpihI6IhALg0kEc7Fjd/s2MWpm0tzaVMQ/0444umcL0AazdPMHs3a%2B0Op%2BTS8lLXslbsPxX6IkzRW7hQxDG1/p6oVqckbr3g9XJP3sePXRVOp/Uj7oivboWzqXtUo2K6Wt2AB6FZbLBkjC8KLm0VBTf1W32qmYWpq2zXHkvGuV4Oy6Jq%2B2Q7Xz/yckXE/qMfv3v%2B5GJr2HlyStlwc58lZ/F7XgLnQ5gKXF72cLzaS1/cx745lwS3Sc3aVVOaI4wlnmnHANkO8gm4sRZBp7SHX5RQ4bZ7srBDa%2BRJlLCIV9LK6lfDm9fwzb79uRJgmmqlcKXGUJt6jHSbw4eWXkghqcfr57Cnc7ElQTTMZiApp5HFl7pGNTzgtDKL7a/zk46B605K6jTnyx7SGBHmWkUvW0AquqcdEAOSU79aA6pmXbNqISv%2BAHUYClA1REkoIcoCkeKQoXFN3iOhGTFiyqNCdPK2mXQD8JbZFNzuxShNHZLbRzvonKsGI3X3J3v%2BSR/avzd5/xPWThmZSc9Y2xG1xZrcAO6LhKPPSHSz53gcYGYTp2SGurZJuoIYq4zlMwRA8WSK2sxXOmMuq4AzrfRjop3OODJe4MMcewxlwVvO%2BNTuwhjsrmp0a/yE%2B5hJGVA/teOcLioSBEIiZ08x6jnj9zvrn5xc%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNMbadQoyNozgViNqktHLqLGz/kRMbNeWvvtk8N0cOJzvboziV%2B/bsVOGfzfQe0Fo4Ri%2B8aP1pHwABj7yoxjEqC1%2BW2ZhVXIAailVNbeTbuWogF3C5sXdQROWjW26dc1NLqqNWZWes3Ma29t6NphmeW5rMSuQtNUslWy09SWujC%2B9BrXohRb1P6g3PrXmeTXXeODY0DPtdfD5SXXro%2BzEGNCOfefsk%2BQ0jwhitKBeuqc9bcIYJuR4wSGFmKArvh0uaZi5OGSvOWIf%2BBShjBxgSroNRhHCNIYZodvkxKKUICcJYwejJDAejz8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLbbqMwEIbfBVW9aoJhSyoiRatm48DSGhROBt8ZcBYwBgokDan67uts9yUqjUaa0z/Sp/9Dadlleq1aPirrDwU%2BB2EUKGulnKZ%2BXKuqoC39wwRrpyW9nga2zDuhjqdszIeqn6quHVWQacfV45O20LIjWDwWBV1Qlv9Y5JmpP%2BlHYBomUPuhO1cFG0YVVfnQjd1xWr6wOaanZlLPtzz%2BvJu6fqPd075anOWmFN/oQDMXQIZ2fzdy%2BbHjrN0EbDhXOdvSkRUPoTBPJLiQGBhvBBaYCd8KeIli0L%2BlOr%2BgfZ%2BG9db193wmvLBow6%2BRuNRIc2ZiGUFmoWuUFJ7sm8qDEnhRaP%2BCbug/v35TEqgt3/%2BT2LlJQ5GO5lBoAYVgDtqSZ4n/FtbO6EJwPbT7EkNnJDDXCo3PXuiWVPgAC4NS7NqR6F3G%2BXvY9i/UiqOobUgMDS3FBi4iIwlqt2biAIgl59ixs%2BueBtZBl6S9XN%2BnX6T3q5D7Dop7m9hxkyXbM4llLfXkXX0IwY08ht/WezfieOd%2BeUkQgupmlTa5wZreDgQpUZNqck6p5Sdst01R648kTg2E3SmzfYKhscK140nip8wyPak3Y14O0ssJtaYmE%2B4KY4NmTTfTndNkIZzTOL8U2P2d26WHALx5%2Bx9xcnVLHxoXzH3MoGHH4baOboQ/P/8C + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIl16xRk1GmhW6PMJo7tLmq08R8Ta2fpu08G5%2BaDw3duWsev6ii6WmrOTQt2J0JPpuZoZ6UG6QDQso6VvOWdMtgyjdzI%2BhbIKZXZKAYl%2Bk4CmKLi2doiHaUF1K08Zzrj2UbPUtvcmgW0n2wIhrG/iJyPEmCRjb3sC2V88N%2BETY0COW%2B44vn/kK9sEPplNddz14TI1uEKenyQ9Vrsa965tE6%2B4uSdxDTekyChJ2pHR9rQwj8gTMo59EsrrHYbTII5rDIYkp%2BXiDQeroIZL58Q%2B9%2Brc1hCGqCwOnsRqZe42r/hIPEwoa52v/8B response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1dLbbqMwEAbgd0HVXjXl0NAqlaJV03JYWoMWDC6%2bM9gpBxvccEhC1XdfZ9WXqGTZN%2f5npG%2fmU%2bvYaXytu3bQHj415zGBaaI9aNU4yuFB1wXpyDsTrBtvyDId2E3ZC32YiqE81HKs%2b27QjcLc363vzZVZ7I3VmlKyIqy8XZXFxrq39sbG3hi6PPRzTdlh0EFdHvqh3483L%2byckYmP%2bny5h99XYy%2b35i8i69WsfqriW8swNytDHfPX1dCqjn3Lum3CDnNdsh0ZGL2GYjPh5IQzw%2f7ADkVMxF7SViAz8zPipQk8908mOECOnGAaD5HnLKjZEeSsjzCLPeDKHDaPW%2b1aS6IU%2bk9OCOPH1x%2bqALrq%2bK3wHL5xAqxY5py2VIQ5EnaUGVjmSGJgZX7cuJwIcES8eio5n7Af1EWLTYTMnojQJ75bxW4wo042AAW%2belsgqo88q56oiEeVrxkPrHwJXkIUT7GoosQ7zbilUWm5eSpODTCDIc9ocqkXvckI3O5s2FYRdYwlg7uILsZGySPnx%2b7dRRw9h0nhgSUVGIOG3%2bW8tBmXfiJwrcRNlNG2cKWnBNTe9WclEhXu%2b7nwRpIt6VGJJmEmc7zsGsbxHWqCtRI6px2tYjMwIAzWxAs%2bUFc1hajmyyRLLt%2bYHzbAwPa3eAqbuEnc%2f%2fkQGPakctVfqIS%2fvv4B"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNIm6dQoyNkyhXY1UE8d2F2PsrL%2bY2FVL330y%2bG4OHM53Mzp51Yeqq5Xh3wz8llKW2oZv%2fGg9KB%2bAlnf8JFvZaYsv0ygt0bdATbkSYzXoqu8UgDkqn90NMlFeQtMtCm5yKRxT5J69sUvoPXkQDGN%2fqQo5KhBVYuxVX2rrQ84ZnxoNCtlILYt%2fUK98qMzLaq7xwIbIM%2bE69Pig6vWxr2UXsDr7TLI9TViypThjKfPiA2tYGe5QRE%2b%2f5BzZMcVzTNlMlp1NwveXOBROFIo5OSf4yI4OwV%2fXCGJEFuwSmISE7jGpv7dRiAPjfv8D"}' headers: cache-control: no-cache - content-length: '1067' + content-length: '666' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:46 GMT + date: Thu, 11 Nov 2021 03:24:38 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: dff469c5-a018-4a2b-b6ee-56ac3db0d946 + x-ms-original-request-ids: 0a3dd707-389b-41b6-a13b-4d23d81f2b71 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLbbqMwEIbfBVW9aoJhSyoiRatm48DSGhROBt8ZcBYwBgokDan67uts9yUqjUaa0z/Sp/9Dadlleq1aPirrDwU%2BB2EUKGulnKZ%2BXKuqoC39wwRrpyW9nga2zDuhjqdszIeqn6quHVWQacfV45O20LIjWDwWBV1Qlv9Y5JmpP%2BlHYBomUPuhO1cFG0YVVfnQjd1xWr6wOaanZlLPtzz%2BvJu6fqPd075anOWmFN/oQDMXQIZ2fzdy%2BbHjrN0EbDhXOdvSkRUPoTBPJLiQGBhvBBaYCd8KeIli0L%2BlOr%2BgfZ%2BG9db193wmvLBow6%2BRuNRIc2ZiGUFmoWuUFJ7sm8qDEnhRaP%2BCbug/v35TEqgt3/%2BT2LlJQ5GO5lBoAYVgDtqSZ4n/FtbO6EJwPbT7EkNnJDDXCo3PXuiWVPgAC4NS7NqR6F3G%2BXvY9i/UiqOobUgMDS3FBi4iIwlqt2biAIgl59ixs%2BueBtZBl6S9XN%2BnX6T3q5D7Dop7m9hxkyXbM4llLfXkXX0IwY08ht/WezfieOd%2BeUkQgupmlTa5wZreDgQpUZNqck6p5Sdst01R648kTg2E3SmzfYKhscK140nip8wyPak3Y14O0ssJtaYmE%2B4KY4NmTTfTndNkIZzTOL8U2P2d26WHALx5%2Bx9xcnVLHxoXzH3MoGHH4baOboQ/P/8C + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIl16xRk1GmhW6PMJo7tLmq08R8Ta2fpu08G5%2BaDw3duWsev6ii6WmrOTQt2J0JPpuZoZ6UG6QDQso6VvOWdMtgyjdzI%2BhbIKZXZKAYl%2Bk4CmKLi2doiHaUF1K08Zzrj2UbPUtvcmgW0n2wIhrG/iJyPEmCRjb3sC2V88N%2BETY0COW%2B44vn/kK9sEPplNddz14TI1uEKenyQ9Vrsa965tE6%2B4uSdxDTekyChJ2pHR9rQwj8gTMo59EsrrHYbTII5rDIYkp%2BXiDQeroIZL58Q%2B9%2Brc1hCGqCwOnsRqZe42r/hIPEwoa52v/8B - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1dLbbqMwEAbgd0HVXjXl0NAqlaJV03JYWoMWDC6%2BM9gpBxvccEhC1XdfZ9WXqGTZN/5npG/mU%2BvYaXytu3bQHj415zGBaaI9aNU4yuFB1wXpyDsTrBtvyDId2E3ZC32YiqE81HKs%2B27QjcLc363vzZVZ7I3VmlKyIqy8XZXFxrq39sbG3hi6PPRzTdlh0EFdHvqh3483L%2ByckYmP%2Bny5h99XYy%2B35i8i69WsfqriW8swNytDHfPX1dCqjn3Lum3CDnNdsh0ZGL2GYjPh5IQzw/7ADkVMxF7SViAz8zPipQk8908mOECOnGAaD5HnLKjZEeSsjzCLPeDKHDaPW%2B1aS6IU%2Bk9OCOPH1x%2BqALrq%2BK3wHL5xAqxY5py2VIQ5EnaUGVjmSGJgZX7cuJwIcES8eio5n7Af1EWLTYTMnojQJ75bxW4wo042AAW%2Belsgqo88q56oiEeVrxkPrHwJXkIUT7GoosQ7zbilUWm5eSpODTCDIc9ocqkXvckI3O5s2FYRdYwlg7uILsZGySPnx%2B7dRRw9h0nhgSUVGIOG3%2BW8tBmXfiJwrcRNlNG2cKWnBNTe9WclEhXu%2B7nwRpIt6VGJJmEmc7zsGsbxHWqCtRI6px2tYjMwIAzWxAs%2BUFc1hajmyyRLLt%2BYHzbAwPa3eAqbuEnc/kQGPakctVfqIS/vv4B + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm6dQoyNkyhXY1UE8d2F2PsrL%2BY2FVL330y%2BG4OHM53Mzp51Yeqq5Xh3wz8llKW2oZv/Gg9KB%2BAlnf8JFvZaYsv0ygt0bdATbkSYzXoqu8UgDkqn90NMlFeQtMtCm5yKRxT5J69sUvoPXkQDGN/qQo5KhBVYuxVX2rrQ84ZnxoNCtlILYt/UK98qMzLaq7xwIbIM%2BE69Pig6vWxr2UXsDr7TLI9TViypThjKfPiA2tYGe5QRE%2B/5BzZMcVzTNlMlp1NwveXOBROFIo5OSf4yI4OwV/XCGJEFuwSmISE7jGpv7dRiAPjfv8D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZDdbqMwEIXfBVW9KsGmSSoiRautCqTpAio%2fBnxnY6cQ2%2bAFkhSqvvvSx1hpNNLojM7R%2bb6Mln%2bOf5pWDMbuy3B%2fJ2mWGDujHkc97CxLkZZ8cMXbcUXmS89XVaes4UKHqm%2f02HTtYAEKT9v1EzQhPQFzzRgxCa8ezYo69pN9As7GAZbuu2vDeD9YQVP13dCdxtUbnxC5yNG6%2fuzh193Y6T28J7oxr8vnYr63AXRMsAy8vxvEktgJ3u4T3l%2bbij%2bTgbOHVDkXnHxiBDZ%2fsctyrmI%2fEXWAZtSV8ucOD7HSZNFBWYgbz2D2nh5D5HrrFMbPDGxclB4jrtgmBXESebJIlRYxxNvFDwTCec3SsEFAOMaDkbv%2fLaGgrW%2f5S5hQP5gzhXFwlttSVhsu9SFReGmIYY6YoJ72o0KT3O2mErGIeh8T9UeC5uxWojoJ89cZP%2bozl9jOF1IVFBN%2fCSWavS4VzGdSu%2fnZI7Rg21IwEmZgQsoRNNMjFiyqbK9EhaypwCA9H98C%2b30mBybxDBzj%2b%2fsf"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fi4y9aRLbrVOQsaEOt5rSmDj6GDVW6yViYi%2bW%2fvfJ4JyHDw7fuRu9uOpt3TfKcO9G8JFQltiGa1RaD8oFoOM9P4pO9Nri8zQKK5cdUFOm8rEedC17BWCGytf1BpkoK6G5LgpucpGvzDxz7I1dQufFgWAY5bkuxKhAXOejVLLU1o%2b4pXxqNShEK7Qo%2fkG986E2z8tykXs2RI4Jl6DnJ9Usj7IRvcea9Jek35QwEtIgZQlzdlvWstKPUEyPF3w62DGNEPYjuHSF5%2bptR%2fdoP1ef%2bBRdCAuu2Mdf8dwGuAl9Qiuf%2bDjEMEYxO3jG4%2fEH"}' headers: cache-control: no-cache - content-length: '889' + content-length: '658' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:46 GMT + date: Thu, 11 Nov 2021 03:24:38 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 6ff2bf6b-423f-445a-b626-33eeb3c1219d + x-ms-original-request-ids: 42d88929-668a-4f31-a617-4bb27dca6981 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1dLbbqMwEAbgd0HVXjXl0NAqlaJV03JYWoMWDC6%2BM9gpBxvccEhC1XdfZ9WXqGTZN/5npG/mU%2BvYaXytu3bQHj415zGBaaI9aNU4yuFB1wXpyDsTrBtvyDId2E3ZC32YiqE81HKs%2B27QjcLc363vzZVZ7I3VmlKyIqy8XZXFxrq39sbG3hi6PPRzTdlh0EFdHvqh3483L%2ByckYmP%2Bny5h99XYy%2B35i8i69WsfqriW8swNytDHfPX1dCqjn3Lum3CDnNdsh0ZGL2GYjPh5IQzw/7ADkVMxF7SViAz8zPipQk8908mOECOnGAaD5HnLKjZEeSsjzCLPeDKHDaPW%2B1aS6IU%2Bk9OCOPH1x%2BqALrq%2BK3wHL5xAqxY5py2VIQ5EnaUGVjmSGJgZX7cuJwIcES8eio5n7Af1EWLTYTMnojQJ75bxW4wo042AAW%2Belsgqo88q56oiEeVrxkPrHwJXkIUT7GoosQ7zbilUWm5eSpODTCDIc9ocqkXvckI3O5s2FYRdYwlg7uILsZGySPnx%2B7dRRw9h0nhgSUVGIOG3%2BW8tBmXfiJwrcRNlNG2cKWnBNTe9WclEhXu%2B7nwRpIt6VGJJmEmc7zsGsbxHWqCtRI6px2tYjMwIAzWxAs%2BUFc1hajmyyRLLt%2BYHzbAwPa3eAqbuEnc//kQGPakctVfqIS/vv4B + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm6dQoyNkyhXY1UE8d2F2PsrL%2BY2FVL330y%2BG4OHM53Mzp51Yeqq5Xh3wz8llKW2oZv/Gg9KB%2BAlnf8JFvZaYsv0ygt0bdATbkSYzXoqu8UgDkqn90NMlFeQtMtCm5yKRxT5J69sUvoPXkQDGN/qQo5KhBVYuxVX2rrQ84ZnxoNCtlILYt/UK98qMzLaq7xwIbIM%2BE69Pig6vWxr2UXsDr7TLI9TViypThjKfPiA2tYGe5QRE%2B/5BzZMcVzTNlMlp1NwveXOBROFIo5OSf4yI4OwV/XCGJEFuwSmISE7jGpv7dRiAPjfv8D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZDdbqMwEIXfBVW9KsGmSSoiRautCqTpAio/BnxnY6cQ2%2BAFkhSqvvvSx1hpNNLojM7R%2Bb6Mln%2BOf5pWDMbuy3B/J2mWGDujHkc97CxLkZZ8cMXbcUXmS89XVaes4UKHqm/02HTtYAEKT9v1EzQhPQFzzRgxCa8ezYo69pN9As7GAZbuu2vDeD9YQVP13dCdxtUbnxC5yNG6/uzh193Y6T28J7oxr8vnYr63AXRMsAy8vxvEktgJ3u4T3l%2Bbij%2BTgbOHVDkXnHxiBDZ/sctyrmI/EXWAZtSV8ucOD7HSZNFBWYgbz2D2nh5D5HrrFMbPDGxclB4jrtgmBXESebJIlRYxxNvFDwTCec3SsEFAOMaDkbv/LaGgrW/5S5hQP5gzhXFwlttSVhsu9SFReGmIYY6YoJ72o0KT3O2mErGIeh8T9UeC5uxWojoJ89cZP%2Bozl9jOF1IVFBN/CSWavS4VzGdSu/nZI7Rg21IwEmZgQsoRNNMjFiyqbK9EhaypwCA9H98C%2B30mBybxDBzj%2B/sf + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aRLbrVOQsaEOt5rSmDj6GDVW6yViYi%2BW/vfJ4JyHDw7fuRu9uOpt3TfKcO9G8JFQltiGa1RaD8oFoOM9P4pO9Nri8zQKK5cdUFOm8rEedC17BWCGytf1BpkoK6G5LgpucpGvzDxz7I1dQufFgWAY5bkuxKhAXOejVLLU1o%2B4pXxqNShEK7Qo/kG986E2z8tykXs2RI4Jl6DnJ9Usj7IRvcea9Jek35QwEtIgZQlzdlvWstKPUEyPF3w62DGNEPYjuHSF5%2BptR/doP1ef%2BBRdCAuu2Mdf8dwGuAl9Qiuf%2BDjEMEYxO3jG4/EH response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZDRbqMwEEX%2fBVV9KsGmJRWRotVWBLa0JtoAdvGbjZ2FgA3FTppN1X8vfesvVBrNy713Rue%2bO1qe7XOrO%2bOs3p3N77woc2flNNaOZuV5imn2Tyqp7YJdjpNc1IPyzJGbempH2w7aeIDD%2ffLuHrqQ74F7JwRzmaxv3ZqH%2fr2%2fB2EQAm%2bchlMr5GQ81NbTYIa9XTzJ%2f5gde%2budvrb5dWWHcQ2v2di6p9k5H1%2f7AIYumAdeX5lu%2fjh0Uq9zOZ3aWj4wI8VNocIjzc8Ug%2bCVbgSRapfkXYNInJrqku0ECEseNd%2f1PyJKv%2bmwZJdy7dw4ZPNj6ZFu3kiU5TxBl1JRhv1GVQomIh6rQosvelPhJkFJXBWH7ICUWJIiZVncWx7hAwJ9QBM4cD%2brWJQ2rK98QuAWdcHLNno4zK3ezrlu9r9g1Te8wGdaCiZIusS6bxGgS9qJbe3HZakgxTAdiQJnnuwecxX0fwsQOh8fnw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3dboIwAEbfpVl2V1tA5yAxywxq3GwN2LJ4WUpBBCmh9Q%2fju0uWfDcnOTnfAzTqZjdlUxkQPMDie8f4zgUBOFjbmgChk2hEoU6qsSPRnzs1kvqEzDk1sitbW%2brGIJw6%2bcd46kAnzTEcZ5mAQkkPytR3p26O%2fYmPUdvpS5mpziBSyk4bndvRr7on4lxblKlaWZX9g%2fkSbQkvgznEZy52fIiHOe9vphoedaWaGa%2bSvzj5YTGPl2yR8B33txte8zxcO4QVV3qUV8oij%2fTEI0xO6PHwSatkRTnxaLicR%2f2%2bp%2bF8uQ3rVdQXd9Iv3IgVt4ivJwTvZ%2bD5fAE%3d"}' headers: cache-control: no-cache - content-length: '837' + content-length: '661' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:46 GMT + date: Thu, 11 Nov 2021 03:24:38 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: bff466cb-28f6-480f-b969-4b317cbc6c19 + x-ms-original-request-ids: 5cd7847f-c713-4268-8879-c45209701030 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZDdbqMwEIXfBVW9KsGmSSoiRautCqTpAio/BnxnY6cQ2%2BAFkhSqvvvSx1hpNNLojM7R%2Bb6Mln%2BOf5pWDMbuy3B/J2mWGDujHkc97CxLkZZ8cMXbcUXmS89XVaes4UKHqm/02HTtYAEKT9v1EzQhPQFzzRgxCa8ezYo69pN9As7GAZbuu2vDeD9YQVP13dCdxtUbnxC5yNG6/uzh193Y6T28J7oxr8vnYr63AXRMsAy8vxvEktgJ3u4T3l%2Bbij%2BTgbOHVDkXnHxiBDZ/sctyrmI/EXWAZtSV8ucOD7HSZNFBWYgbz2D2nh5D5HrrFMbPDGxclB4jrtgmBXESebJIlRYxxNvFDwTCec3SsEFAOMaDkbv/LaGgrW/5S5hQP5gzhXFwlttSVhsu9SFReGmIYY6YoJ72o0KT3O2mErGIeh8T9UeC5uxWojoJ89cZP%2Bozl9jOF1IVFBN/CSWavS4VzGdSu/nZI7Rg21IwEmZgQsoRNNMjFiyqbK9EhaypwCA9H98C%2B30mBybxDBzj%2B/sf + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aRLbrVOQsaEOt5rSmDj6GDVW6yViYi%2BW/vfJ4JyHDw7fuRu9uOpt3TfKcO9G8JFQltiGa1RaD8oFoOM9P4pO9Nri8zQKK5cdUFOm8rEedC17BWCGytf1BpkoK6G5LgpucpGvzDxz7I1dQufFgWAY5bkuxKhAXOejVLLU1o%2B4pXxqNShEK7Qo/kG986E2z8tykXs2RI4Jl6DnJ9Usj7IRvcea9Jek35QwEtIgZQlzdlvWstKPUEyPF3w62DGNEPYjuHSF5%2BptR/doP1ef%2BBRdCAuu2Mdf8dwGuAl9Qiuf%2BDjEMEYxO3jG4/EH - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZDRbqMwEEX/BVV9KsGmJRWRotVWBLa0JtoAdvGbjZ2FgA3FTppN1X8vfesvVBrNy713Rue%2BO1qe7XOrO%2BOs3p3N77woc2flNNaOZuV5imn2Tyqp7YJdjpNc1IPyzJGbempH2w7aeIDD/fLuHrqQ74F7JwRzmaxv3ZqH/r2/B2EQAm%2BchlMr5GQ81NbTYIa9XTzJ/5gde%2Budvrb5dWWHcQ2v2di6p9k5H1/7AIYumAdeX5lu/jh0Uq9zOZ3aWj4wI8VNocIjzc8Ug%2BCVbgSRapfkXYNInJrqku0ECEseNd/1PyJKv%2BmwZJdy7dw4ZPNj6ZFu3kiU5TxBl1JRhv1GVQomIh6rQosvelPhJkFJXBWH7ICUWJIiZVncWx7hAwJ9QBM4cD%2BrWJQ2rK98QuAWdcHLNno4zK3ezrlu9r9g1Te8wGdaCiZIusS6bxGgS9qJbe3HZakgxTAdiQJnnuwecxX0fwsQOh8fnw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3dboIwAEbfpVl2V1tA5yAxywxq3GwN2LJ4WUpBBCmh9Q/ju0uWfDcnOTnfAzTqZjdlUxkQPMDie8f4zgUBOFjbmgChk2hEoU6qsSPRnzs1kvqEzDk1sitbW%2BrGIJw6%2Bcd46kAnzTEcZ5mAQkkPytR3p26O/YmPUdvpS5mpziBSyk4bndvRr7on4lxblKlaWZX9g/kSbQkvgznEZy52fIiHOe9vphoedaWaGa%2BSvzj5YTGPl2yR8B33txte8zxcO4QVV3qUV8oij/TEI0xO6PHwSatkRTnxaLicR/2%2Bp%2BF8uQ3rVdQXd9Iv3IgVt4ivJwTvZ%2BD5fAE%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZHdbqMwEIXfBVW9KsGwzVZEilabDdCShUj8OfGdjZ1iHMDFhlKqvnvZu%2b0jVBrNzXd0RufMu9GySf%2flrVDG5t3wfqdZnhobo9Jaqo1lNbjFz6xhrV7heejZquwaSw1ElT2XmnetsgCxLz%2fvH2zTJhdg3lOKTczKH2ZJXOfBuQB37QJL9t3IKeuVFfGy71R30asDeyvwcNXW%2bG%2brXze6k1v7FktujotyMd86wHZNsIx9e6PEcrETrN2mrB95yXZYMXqXNe6A0gkVYP2CPApZkwSpqCLoh%2bo8xwnzbC%2brq%2f%2f5I92HX3kGtsadAb1vmz5qq1e4j1MSRHPeoDqyQ%2bfs2AG5SniEEyf5eo2K6k8U%2bKfjqcAkl11Wh4pAP4f1TpAcvaB9jKMczFldCCLO08IPpZN4WVvhYr6OUFBVBuFT%2bbjjqSenpd04usoBzTGKmqpHgkIKE53UPk99b85EcsBBOJxnv16%2b84qKBLJCvB1PIc8z4BofH58%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNDG6dQoyuulGuyZCTBy7jBqt%2f2LSdrX03SeDc%2fPB4Ts3Y5C%2f%2blAPrTL8mxFtE8YTZPjGUetJ%2bQD0YhCV7OWgLbGcZmnlYw%2fUKVP5XE%2b6HgcFYGaXz%2b7GNu2shKZbFMIUMnfMPPPQBpXQe%2fIgmObxXBdyVgDX%2bTyqsdTWl7ym4tRpUMhOaln8D%2fUqpto8r%2bZ6HiBoeyZcsR8fVLsWx1YOAW%2fTb5ruGeX0g0UpT7gXH3jHy3BnY1ZdSNMiwlqHhLsrafiFLOkLDvfvlHMYhz8OXjAi4VtE2TGkTQVjlq%2fO1o0j8okZD4z7%2fQ8%3d"}' headers: cache-control: no-cache - content-length: '863' + content-length: '671' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:46 GMT + date: Thu, 11 Nov 2021 03:24:38 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: d73a72b5-5464-45a6-9d50-efc98c697a62 + x-ms-original-request-ids: 11fe4fa8-4adb-4361-9f9a-a3926144253e status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZDRbqMwEEX/BVV9KsGmJRWRotVWBLa0JtoAdvGbjZ2FgA3FTppN1X8vfesvVBrNy713Rue%2BO1qe7XOrO%2BOs3p3N77woc2flNNaOZuV5imn2Tyqp7YJdjpNc1IPyzJGbempH2w7aeIDD/fLuHrqQ74F7JwRzmaxv3ZqH/r2/B2EQAm%2BchlMr5GQ81NbTYIa9XTzJ/5gde%2Budvrb5dWWHcQ2v2di6p9k5H1/7AIYumAdeX5lu/jh0Uq9zOZ3aWj4wI8VNocIjzc8Ug%2BCVbgSRapfkXYNInJrqku0ECEseNd/1PyJKv%2BmwZJdy7dw4ZPNj6ZFu3kiU5TxBl1JRhv1GVQomIh6rQosvelPhJkFJXBWH7ICUWJIiZVncWx7hAwJ9QBM4cD%2BrWJQ2rK98QuAWdcHLNno4zK3ezrlu9r9g1Te8wGdaCiZIusS6bxGgS9qJbe3HZakgxTAdiQJnnuwecxX0fwsQOh8fnw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3dboIwAEbfpVl2V1tA5yAxywxq3GwN2LJ4WUpBBCmh9Q/ju0uWfDcnOTnfAzTqZjdlUxkQPMDie8f4zgUBOFjbmgChk2hEoU6qsSPRnzs1kvqEzDk1sitbW%2BrGIJw6%2Bcd46kAnzTEcZ5mAQkkPytR3p26O/YmPUdvpS5mpziBSyk4bndvRr7on4lxblKlaWZX9g/kSbQkvgznEZy52fIiHOe9vphoedaWaGa%2BSvzj5YTGPl2yR8B33txte8zxcO4QVV3qUV8oij/TEI0xO6PHwSatkRTnxaLicR/2%2Bp%2BF8uQ3rVdQXd9Iv3IgVt4ivJwTvZ%2BD5fAE%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZHdbqMwEIXfBVW9KsGwzVZEilabDdCShUj8OfGdjZ1iHMDFhlKqvnvZu%2B0jVBrNzXd0RufMu9GySf/lrVDG5t3wfqdZnhobo9Jaqo1lNbjFz6xhrV7heejZquwaSw1ElT2XmnetsgCxLz/vH2zTJhdg3lOKTczKH2ZJXOfBuQB37QJL9t3IKeuVFfGy71R30asDeyvwcNXW%2BG%2BrXze6k1v7FktujotyMd86wHZNsIx9e6PEcrETrN2mrB95yXZYMXqXNe6A0gkVYP2CPApZkwSpqCLoh%2Bo8xwnzbC%2Brq/5I92HX3kGtsadAb1vmz5qq1e4j1MSRHPeoDqyQ%2Bfs2AG5SniEEyf5eo2K6k8U%2BKfjqcAkl11Wh4pAP4f1TpAcvaB9jKMczFldCCLO08IPpZN4WVvhYr6OUFBVBuFT%2BbjjqSenpd04usoBzTGKmqpHgkIKE53UPk99b85EcsBBOJxnv16%2B84qKBLJCvB1PIc8z4BofH58%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNDG6dQoyuulGuyZCTBy7jBqt/2LSdrX03SeDc/PB4Ts3Y5C/%2BlAPrTL8mxFtE8YTZPjGUetJ%2BQD0YhCV7OWgLbGcZmnlYw/UKVP5XE%2B6HgcFYGaXz%2B7GNu2shKZbFMIUMnfMPPPQBpXQe/IgmObxXBdyVgDX%2BTyqsdTWl7ym4tRpUMhOaln8D/Uqpto8r%2BZ6HiBoeyZcsR8fVLsWx1YOAW/Tb5ruGeX0g0UpT7gXH3jHy3BnY1ZdSNMiwlqHhLsrafiFLOkLDvfvlHMYhz8OXjAi4VtE2TGkTQVjlq/O1o0j8okZD4z7/Q8%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azps-test-group/providers/Microsoft.KeyVault/vaults/azps-test-kv2","name":"azps-test-kv2","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"6f4d4442-0894-47fe-a5e6-b84bfb47b944","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"63c25c04-362b-42d9-9e3f-83af045d0a3c","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"2927ba5f-2732-4a5e-bdb8-f5fc20b476c9","permissions":{"keys":["Get","List","UnwrapKey","WrapKey"],"secrets":[],"certificates":[]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"d1178d20-4ca4-45f0-ba9a-5a08f588da8d","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://azps-test-kv2.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jiasli-cli-dev/providers/Microsoft.KeyVault/vaults/cli-sni-kv","name":"cli-sni-kv","type":"Microsoft.KeyVault/vaults","location":"westus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"0d504196-1423-4569-9a6e-15149656f0ee","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","Decrypt","Encrypt","UnwrapKey","WrapKey","Verify","Sign","Purge"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore","Purge"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers","Purge"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://cli-sni-kv.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1Y%2fRboIwAEX%2fpTE%2biW1RZyAhy8gwxg23AIrwVkoZUGkJLQQ1%2fvvYZyy5uU8n9%2bQ%2bgGCj%2fqwEV8B%2bAO8tjE4hsEGpdatsCBsiyA9rmNBLcu87tqSygarPFO2qVldSKIgyXLyst9jAWYGMdZ4TgzC6MmhmmVuzQNbGQrDt5FDlrFPQr2gnlSz08oPdzqS%2fajj8tXqdadk6eE7ayhgmchp3TIQtA03B85nik1FyJpyQdUNFmUsUyxdRY%2fVpOKbx3l0lKz76uzaJatc%2fm8EmqY9xbqb7oE7r0MMo9fKYNcG7fzlwwrkFFiD2%2fuvjMotHmdwPa%2bqNl0gcy9N918XXknzt%2bI3tXT%2f2Njg5%2byNtAvEdIQc8n78%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1db4IwAEX%2fC1n2BqUV5yAhixu4zFmI0LLssUDBWr5Cq1OM%2f12y5L7cnJtzb0bHL3onOqkM72aE65TQFBmecdB6UB4ALetYzVveaYtNp5FbRd8CdcpVMYpBi75TwM5h9eKsoAnzyjadsmQm48XCLHIXrVBlu0vXBsPYn0XJRwWwKMZe9ZW2vvk1Y6dGg5I3XPPyv6g3NgjzPC9nuY9s6Jr2HPj8pOT82Eve%2bVRmP0m2JQlNNiTMaErdeEcbWgVfEJP6L5p%2bHRzgBSbSiQMM42DzGgXrCw637zN38FQvo%2bDwERMJ95NESRh9Rkd6TUiB9sfQN%2b73Bw%3d%3d"}' headers: cache-control: no-cache - content-length: '1508' + content-length: '666' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:46 GMT + date: Thu, 11 Nov 2021 03:24:38 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: e17bb64e-2aea-4ec5-816e-5c31e9a81e99 + x-ms-original-request-ids: 0afe72a2-24ea-4c4a-8b56-a3bbe8964abd status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZHdbqMwEIXfBVW9KsGwzVZEilabDdCShUj8OfGdjZ1iHMDFhlKqvnvZu%2B0jVBrNzXd0RufMu9GySf/lrVDG5t3wfqdZnhobo9Jaqo1lNbjFz6xhrV7heejZquwaSw1ElT2XmnetsgCxLz/vH2zTJhdg3lOKTczKH2ZJXOfBuQB37QJL9t3IKeuVFfGy71R30asDeyvwcNXW%2BG%2BrXze6k1v7FktujotyMd86wHZNsIx9e6PEcrETrN2mrB95yXZYMXqXNe6A0gkVYP2CPApZkwSpqCLoh%2Bo8xwnzbC%2Brq//5I92HX3kGtsadAb1vmz5qq1e4j1MSRHPeoDqyQ%2Bfs2AG5SniEEyf5eo2K6k8U%2BKfjqcAkl11Wh4pAP4f1TpAcvaB9jKMczFldCCLO08IPpZN4WVvhYr6OUFBVBuFT%2BbjjqSenpd04usoBzTGKmqpHgkIKE53UPk99b85EcsBBOJxnv16%2B84qKBLJCvB1PIc8z4BofH58%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNDG6dQoyuulGuyZCTBy7jBqt/2LSdrX03SeDc/PB4Ts3Y5C/%2BlAPrTL8mxFtE8YTZPjGUetJ%2BQD0YhCV7OWgLbGcZmnlYw/UKVP5XE%2B6HgcFYGaXz%2B7GNu2shKZbFMIUMnfMPPPQBpXQe/IgmObxXBdyVgDX%2BTyqsdTWl7ym4tRpUMhOaln8D/Uqpto8r%2BZ6HiBoeyZcsR8fVLsWx1YOAW/Tb5ruGeX0g0UpT7gXH3jHy3BnY1ZdSNMiwlqHhLsrafiFLOkLDvfvlHMYhz8OXjAi4VtE2TGkTQVjlq/O1o0j8okZD4z7/Q8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1Y/RboIwAEX/pTE%2BiW1RZyAhy8gwxg23AIrwVkoZUGkJLQQ1/vvYZyy5uU8n9%2BQ%2BgGCj/qwEV8B%2BAO8tjE4hsEGpdatsCBsiyA9rmNBLcu87tqSygarPFO2qVldSKIgyXLyst9jAWYGMdZ4TgzC6MmhmmVuzQNbGQrDt5FDlrFPQr2gnlSz08oPdzqS/ajj8tXqdadk6eE7ayhgmchp3TIQtA03B85nik1FyJpyQdUNFmUsUyxdRY/VpOKbx3l0lKz76uzaJatc/m8EmqY9xbqb7oE7r0MMo9fKYNcG7fzlwwrkFFiD2/uvjMotHmdwPa%2BqNl0gcy9N918XXknzt%2BI3tXT/2Njg5%2ByNtAvEdIQc8n78%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1db4IwAEX/C1n2BqUV5yAhixu4zFmI0LLssUDBWr5Cq1OM/12y5L7cnJtzb0bHL3onOqkM72aE65TQFBmecdB6UB4ALetYzVveaYtNp5FbRd8CdcpVMYpBi75TwM5h9eKsoAnzyjadsmQm48XCLHIXrVBlu0vXBsPYn0XJRwWwKMZe9ZW2vvk1Y6dGg5I3XPPyv6g3NgjzPC9nuY9s6Jr2HPj8pOT82Eve%2BVRmP0m2JQlNNiTMaErdeEcbWgVfEJP6L5p%2BHRzgBSbSiQMM42DzGgXrCw637zN38FQvo%2BDwERMJ95NESRh9Rkd6TUiB9sfQN%2B73Bw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1Y%2fdaoMwAIXfJZReVZOoW4kgY2Xasm6yVW1Z7hIT18xqxETpD333uccYHM7Vx%2fk4N9DKs31TbW1AeAPxc5YXGQjB0drOhBA2rGXfspGtddl16KVb6gaagZuyV51VujUQcVw9BkvsYF4hJxCCOUyWvlNy4i29CpEHgmDX61EJ2Rv4rspeG11ZdysvezacLBz%2f2jzNrO4iPGedcsaJnMYjD2HioCl4PjP1ZNS1bKNM9qMq5YoZKRZ5QwaanSnff3l5ctzyhm6y5nxieXKh626VxrigvkjpFRGwAIf4vz784YfUz9EuER7diJfXdLcWQV7E5OMzisD9%2fgs%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9xUTt1inI6Kod7ZpKonGwt6jR%2bS0m7ayl%2f70yuC%2bXczn3pnViUseyq6Xm3DR%2fE0YsNDVH%2b1VqkA6ELe94IVrRKZ3P51Hoad9CeU5kOpaDKvtOQpQY%2betqbQAjyRFYZRkHXKQWSBPbXJs5sl9sBIexv5SZGCXEZTr2ss%2bV%2fiWuMT83CmaiEUpk%2f0W%2b86EEl2W5yF0TGTZAS4znJ1kvj30tOpfV8TeNDxFldBf5MQuZHRxZw3Jvb%2bCo%2bDvNhYW9GgVePWNvc8Xz4Y1U8Rb7xCILCyJ%2fOnnNB6maHWY%2fW1LRTzJTn7D9RH3mavf7Aw%3d%3d"}' headers: cache-control: no-cache - content-length: '666' + content-length: '676' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:47 GMT + date: Thu, 11 Nov 2021 03:24:38 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 9e965e54-1a5a-4e75-be00-dd739687ad7f + x-ms-original-request-ids: e53ebe89-9eba-4cb3-a642-c4d392ef0770 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1Y/RboIwAEX/pTE%2BiW1RZyAhy8gwxg23AIrwVkoZUGkJLQQ1/vvYZyy5uU8n9%2BQ%2BgGCj/qwEV8B%2BAO8tjE4hsEGpdatsCBsiyA9rmNBLcu87tqSygarPFO2qVldSKIgyXLyst9jAWYGMdZ4TgzC6MmhmmVuzQNbGQrDt5FDlrFPQr2gnlSz08oPdzqS/ajj8tXqdadk6eE7ayhgmchp3TIQtA03B85nik1FyJpyQdUNFmUsUyxdRY/VpOKbx3l0lKz76uzaJatc/m8EmqY9xbqb7oE7r0MMo9fKYNcG7fzlwwrkFFiD2/uvjMotHmdwPa%2BqNl0gcy9N918XXknzt%2BI3tXT/2Njg5%2ByNtAvEdIQc8n78%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1db4IwAEX/C1n2BqUV5yAhixu4zFmI0LLssUDBWr5Cq1OM/12y5L7cnJtzb0bHL3onOqkM72aE65TQFBmecdB6UB4ALetYzVveaYtNp5FbRd8CdcpVMYpBi75TwM5h9eKsoAnzyjadsmQm48XCLHIXrVBlu0vXBsPYn0XJRwWwKMZe9ZW2vvk1Y6dGg5I3XPPyv6g3NgjzPC9nuY9s6Jr2HPj8pOT82Eve%2BVRmP0m2JQlNNiTMaErdeEcbWgVfEJP6L5p%2BHRzgBSbSiQMM42DzGgXrCw637zN38FQvo%2BDwERMJ95NESRh9Rkd6TUiB9sfQN%2B73Bw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1Y/daoMwAIXfJZReVZOoW4kgY2Xasm6yVW1Z7hIT18xqxETpD333uccYHM7Vx/k4N9DKs31TbW1AeAPxc5YXGQjB0drOhBA2rGXfspGtddl16KVb6gaagZuyV51VujUQcVw9BkvsYF4hJxCCOUyWvlNy4i29CpEHgmDX61EJ2Rv4rspeG11ZdysvezacLBz/2jzNrO4iPGedcsaJnMYjD2HioCl4PjP1ZNS1bKNM9qMq5YoZKRZ5QwaanSnff3l5ctzyhm6y5nxieXKh626VxrigvkjpFRGwAIf4vz784YfUz9EuER7diJfXdLcWQV7E5OMzisD9/gs%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9xUTt1inI6Kod7ZpKonGwt6jR%2BS0m7ayl/70yuC%2BXczn3pnViUseyq6Xm3DR/E0YsNDVH%2B1VqkA6ELe94IVrRKZ3P51Hoad9CeU5kOpaDKvtOQpQY%2BetqbQAjyRFYZRkHXKQWSBPbXJs5sl9sBIexv5SZGCXEZTr2ss%2BV/iWuMT83CmaiEUpk/0W%2B86EEl2W5yF0TGTZAS4znJ1kvj30tOpfV8TeNDxFldBf5MQuZHRxZw3Jvb%2BCo%2BDvNhYW9GgVePWNvc8Xz4Y1U8Rb7xCILCyJ/OnnNB6maHWY/W1LRTzJTn7D9RH3mavf7Aw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3ZboJAAEX%2fhZg%2bFRlc2mBimlqFdJGmgDPC22xWHGcJM4jS9N9Lk5v7cm7O%2ffEUv7qPWgnrLX68zXNe7HJv4R2dM3YRBBIr%2fM0lV26M%2b7bhY6plYFtiaVMbV2tlA0DCw8PsMfRDcgD%2bjDHsY06nPiXR5HFyANE8AoFp9KVmvLHBtqaNtvrgxu%2f8BnF7dsHlv%2b3TyGmzDO%2bwqf3LsBzkywkIIx8MCe9GVgyPWnC1zHlzqSlfYcvZfSGjtsqv1VYdu2rDEJfZOt2fMT%2bXXVGkCU3gfqfYiZzLvlq%2fzllsHJLRiRTwWq3TF4bSh7J%2fq%2bGU9kgZzJO0RKesgsnXrZQhIOitJX2MM2CuJchECs0OqgzncaURpCGD%2bpZJl3IhukqwT5bE822xwmgz64qYAZLAEsmjgNPvrtwNHMxucG8E60Hk%2ff7%2bAQ%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAEb%2fi4y9aeJtnYIMQQfbmkg1cewxanQ23jDpZSn975XB93LgcL6bMfGr2veTkEZ4M9K4ILRwjND4VWqRIQAjm1jHRz4pi%2bnTyq16HoE8VbJe%2b0X18yQBrOz2xdvZpl210PSahpmM165ZV4Gzc1oY%2bAEEyzqf%2b4avEqC%2bXmc5t8r64n8lOw0KNHzgijf%2fIN%2fY0pvnzdzikQPtwITb7OcnKbbHWfApoqL8zstPktP8naQlLWiQ7elA2%2bTDRqS7ZAnVWHcaH2uISOxj3bxicXCxoFekOx%2fT1MMJcg5E%2bBn9ueCkczBBbpYiHx%2fjyLjfHw%3d%3d"}' headers: cache-control: no-cache - content-length: '791' + content-length: '663' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:47 GMT + date: Thu, 11 Nov 2021 03:24:39 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 08f3cf90-ef76-46bf-888e-047710ef0c73 + x-ms-original-request-ids: cc8ecf6e-b56b-4cf3-956e-3e3f1bc3ad79 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1Y/daoMwAIXfJZReVZOoW4kgY2Xasm6yVW1Z7hIT18xqxETpD333uccYHM7Vx/k4N9DKs31TbW1AeAPxc5YXGQjB0drOhBA2rGXfspGtddl16KVb6gaagZuyV51VujUQcVw9BkvsYF4hJxCCOUyWvlNy4i29CpEHgmDX61EJ2Rv4rspeG11ZdysvezacLBz/2jzNrO4iPGedcsaJnMYjD2HioCl4PjP1ZNS1bKNM9qMq5YoZKRZ5QwaanSnff3l5ctzyhm6y5nxieXKh626VxrigvkjpFRGwAIf4vz784YfUz9EuER7diJfXdLcWQV7E5OMzisD9/gs%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9xUTt1inI6Kod7ZpKonGwt6jR%2BS0m7ayl/70yuC%2BXczn3pnViUseyq6Xm3DR/E0YsNDVH%2B1VqkA6ELe94IVrRKZ3P51Hoad9CeU5kOpaDKvtOQpQY%2BetqbQAjyRFYZRkHXKQWSBPbXJs5sl9sBIexv5SZGCXEZTr2ss%2BV/iWuMT83CmaiEUpk/0W%2B86EEl2W5yF0TGTZAS4znJ1kvj30tOpfV8TeNDxFldBf5MQuZHRxZw3Jvb%2BCo%2BDvNhYW9GgVePWNvc8Xz4Y1U8Rb7xCILCyJ/OnnNB6maHWY/W1LRTzJTn7D9RH3mavf7Aw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3ZboJAAEX/hZg%2BFRlc2mBimlqFdJGmgDPC22xWHGcJM4jS9N9Lk5v7cm7O/fEUv7qPWgnrLX68zXNe7HJv4R2dM3YRBBIr/M0lV26M%2B7bhY6plYFtiaVMbV2tlA0DCw8PsMfRDcgD%2BjDHsY06nPiXR5HFyANE8AoFp9KVmvLHBtqaNtvrgxu/8BnF7dsHlv%2B3TyGmzDO%2Bwqf3LsBzkywkIIx8MCe9GVgyPWnC1zHlzqSlfYcvZfSGjtsqv1VYdu2rDEJfZOt2fMT%2BXXVGkCU3gfqfYiZzLvlq/zllsHJLRiRTwWq3TF4bSh7J/q%2BGU9kgZzJO0RKesgsnXrZQhIOitJX2MM2CuJchECs0OqgzncaURpCGD%2BpZJl3IhukqwT5bE822xwmgz64qYAZLAEsmjgNPvrtwNHMxucG8E60Hk/f7%2BAQ%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9aeJtnYIMQQfbmkg1cewxanQ23jDpZSn975XB93LgcL6bMfGr2veTkEZ4M9K4ILRwjND4VWqRIQAjm1jHRz4pi%2BnTyq16HoE8VbJe%2B0X18yQBrOz2xdvZpl210PSahpmM165ZV4Gzc1oY%2BAEEyzqf%2B4avEqC%2BXmc5t8r64n8lOw0KNHzgijf/IN/Y0pvnzdzikQPtwITb7OcnKbbHWfApoqL8zstPktP8naQlLWiQ7elA2%2BTDRqS7ZAnVWHcaH2uISOxj3bxicXCxoFekOx/T1MMJcg5E%2BBn9ueCkczBBbpYiHx/jyLjfHw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3tioJAAEXfRaJfa87YFwaxbKxJtSb5MaX%2fxnFK05kxRy2N3n0LLhcOXM59Kpw%2b6r%2bM51JZPBXzx%2fMDT1koaV2XcqFpDHN8oYzyeoT7pqIjIpgmm1iSKivrTHCpgRieZ5M5VGF8BuokSbCKKRmrJDb0uX4GxtQAWlmJNktoJTU7I5WQ4lyPdrRDuClqrf20%2fB7UolzCIS4ztX0v3%2fKlDqChgnfgcCDz96PIKV96tGozQldY0uTLZ0YTeY%2fI5uk9MpMjZe7v%2flRgm69ECAmM9e0p7NeZZ25v0Tp1bOZuAgYLt0e3UJ9ae4YCxFPswk0XglQQVISH6x7HCM38InVIkXf%2bdbunOXj4vNwR69ChU%2bm4Y7ePjnBHGWqCK3KQZXdRnjiJtZ7a%2fgofzcndXycgtlB4ZGmOxpd7FKQe%2bTAvcNQDQ3m9%2fgE%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fSxh70xjn1inI2IgbdlVRE0cfo8bOxi9M2i6W%2fvfK4N6HA5dzr2Dgf2rXDkIC7wqC95zQ3AYe%2bFVqkh6EPRvYgfd8UCZbTjM3q7GH8lTKam4n1Y6DhFaJmhdngwxUNpbh1DUzGK%2bejKp07Y3dWO6za8FpHs9tzWcJo7aaRzk2yvzmumCnTsGad1zx%2bh%2fkG5ta47wuV7lvW8g1rDXo8UGK9XEUfPCpKH6yYksymn2SoKA5dZMd7WiDQxSRwyUhFUpwqKNjqOPjfm32muHuI6UxTkWgM7z9ivHeiRexJCTV0RLoVISXeAmdiIQ%2buN3u"}' headers: cache-control: no-cache - content-length: '793' + content-length: '659' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:47 GMT + date: Thu, 11 Nov 2021 03:24:39 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 28fc4672-7a89-4aac-91b0-355095d65545 + x-ms-original-request-ids: 6fd25821-e520-45da-a5c2-abc40ea15479 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3ZboJAAEX/hZg%2BFRlc2mBimlqFdJGmgDPC22xWHGcJM4jS9N9Lk5v7cm7O/fEUv7qPWgnrLX68zXNe7HJv4R2dM3YRBBIr/M0lV26M%2B7bhY6plYFtiaVMbV2tlA0DCw8PsMfRDcgD%2BjDHsY06nPiXR5HFyANE8AoFp9KVmvLHBtqaNtvrgxu/8BnF7dsHlv%2B3TyGmzDO%2Bwqf3LsBzkywkIIx8MCe9GVgyPWnC1zHlzqSlfYcvZfSGjtsqv1VYdu2rDEJfZOt2fMT%2BXXVGkCU3gfqfYiZzLvlq/zllsHJLRiRTwWq3TF4bSh7J/q%2BGU9kgZzJO0RKesgsnXrZQhIOitJX2MM2CuJchECs0OqgzncaURpCGD%2BpZJl3IhukqwT5bE822xwmgz64qYAZLAEsmjgNPvrtwNHMxucG8E60Hk/f7%2BAQ%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9aeJtnYIMQQfbmkg1cewxanQ23jDpZSn975XB93LgcL6bMfGr2veTkEZ4M9K4ILRwjND4VWqRIQAjm1jHRz4pi%2BnTyq16HoE8VbJe%2B0X18yQBrOz2xdvZpl210PSahpmM165ZV4Gzc1oY%2BAEEyzqf%2B4avEqC%2BXmc5t8r64n8lOw0KNHzgijf/IN/Y0pvnzdzikQPtwITb7OcnKbbHWfApoqL8zstPktP8naQlLWiQ7elA2%2BTDRqS7ZAnVWHcaH2uISOxj3bxicXCxoFekOx/T1MMJcg5E%2BBn9ueCkczBBbpYiHx/jyLjfHw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3tioJAAEXfRaJfa87YFwaxbKxJtSb5MaX/xnFK05kxRy2N3n0LLhcOXM59Kpw%2B6r%2BM51JZPBXzx/MDT1koaV2XcqFpDHN8oYzyeoT7pqIjIpgmm1iSKivrTHCpgRieZ5M5VGF8BuokSbCKKRmrJDb0uX4GxtQAWlmJNktoJTU7I5WQ4lyPdrRDuClqrf20/B7UolzCIS4ztX0v3/KlDqChgnfgcCDz96PIKV96tGozQldY0uTLZ0YTeY/I5uk9MpMjZe7v/lRgm69ECAmM9e0p7NeZZ25v0Tp1bOZuAgYLt0e3UJ9ae4YCxFPswk0XglQQVISH6x7HCM38InVIkXf%2BdbunOXj4vNwR69ChU%2Bm4Y7ePjnBHGWqCK3KQZXdRnjiJtZ7a/gofzcndXycgtlB4ZGmOxpd7FKQe%2BTAvcNQDQ3m9/gE%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/Sxh70xjn1inI2IgbdlVRE0cfo8bOxi9M2i6W/vfK4N6HA5dzr2Dgf2rXDkIC7wqC95zQ3AYe%2BFVqkh6EPRvYgfd8UCZbTjM3q7GH8lTKam4n1Y6DhFaJmhdngwxUNpbh1DUzGK%2BejKp07Y3dWO6za8FpHs9tzWcJo7aaRzk2yvzmumCnTsGad1zx%2Bh/kG5ta47wuV7lvW8g1rDXo8UGK9XEUfPCpKH6yYksymn2SoKA5dZMd7WiDQxSRwyUhFUpwqKNjqOPjfm32muHuI6UxTkWgM7z9ivHeiRexJCTV0RLoVISXeAmdiIQ%2BuN3u response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FU3bboIwAP0XYnwa0uItmJhlbsCiQzNBkL6VtkiBQqWgTuO%2fD5OT83CuD61it%2faHV4XSFg%2fN%2fvCDg68ttKxtpVoYhsAVPjHBqnaE713DRqQWhuoSRRouW15XygAJTGeTOdRhkgJ9QinWMSNjnSSWOTdTYE0tYMimvnDKGmV4nDS1qtN2tGF%2fIe7K1ri8WL0P2lou4RBLrl%2f6ZD%2b%2bNAG0dNADDgeq6B%2frglVLnzUXTtgKK0bfAmF1yL8hr8quyKYRE%2fuv7bHEHlxLFGaf21LGwbHkkY2uQb5%2b%2bd2vePkIxGK6IdG6Iy4sk0KOg0hGxIYddiGO7NhEh6xgNjwf8nDn5c45CmnuhbJLvhHeO84MhbTeil4XMvft6Q0VdEddZ%2boFq74%2fuQYOBYkbxpHIinB8usYCKuLuj35VcnoHlvZ8%2fgM%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNIm26xRklJmBXbUYEwe9ixqttY1iYu0PfffK4Ls5cDjfw5DiqreNbJXhPQy8TilLbcMzDlr3ygPgzCWvxVlIbfH7OAir6M5AjbkqhqbXTScVgDmqPhYrZKK8guaiLLnJReGYRe7aK7uC7tKFoB%2b6S1OKQYGoKYZOdZW2fsUt4%2bNJg1KchBblP6gv3jfmZTbnuG9D5JpwHnp%2fU%2b382LVC%2bqzN%2fki2oYSRH4ozljJ3t2UnVgUhimh9jWg4xfcCRQGeYhou4%2bPmMz4yh1DmJHSPo2B9jTG%2b72h9i%2bE%2bSOjhO2nDiRzxjbTMN57PFw%3d%3d"}' headers: cache-control: no-cache - content-length: '776' + content-length: '670' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:47 GMT + date: Thu, 11 Nov 2021 03:24:39 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 2abf0c3a-5c9f-4ba2-a608-d8fb18b15e1d + x-ms-original-request-ids: 939a99a8-06f1-4aab-b73d-52892db50a27 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3tioJAAEXfRaJfa87YFwaxbKxJtSb5MaX/xnFK05kxRy2N3n0LLhcOXM59Kpw%2B6r%2BM51JZPBXzx/MDT1koaV2XcqFpDHN8oYzyeoT7pqIjIpgmm1iSKivrTHCpgRieZ5M5VGF8BuokSbCKKRmrJDb0uX4GxtQAWlmJNktoJTU7I5WQ4lyPdrRDuClqrf20/B7UolzCIS4ztX0v3/KlDqChgnfgcCDz96PIKV96tGozQldY0uTLZ0YTeY/I5uk9MpMjZe7v/lRgm69ECAmM9e0p7NeZZ25v0Tp1bOZuAgYLt0e3UJ9ae4YCxFPswk0XglQQVISH6x7HCM38InVIkXf%2BdbunOXj4vNwR69ChU%2Bm4Y7ePjnBHGWqCK3KQZXdRnjiJtZ7a/gofzcndXycgtlB4ZGmOxpd7FKQe%2BTAvcNQDQ3m9/gE%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/Sxh70xjn1inI2IgbdlVRE0cfo8bOxi9M2i6W/vfK4N6HA5dzr2Dgf2rXDkIC7wqC95zQ3AYe%2BFVqkh6EPRvYgfd8UCZbTjM3q7GH8lTKam4n1Y6DhFaJmhdngwxUNpbh1DUzGK%2BejKp07Y3dWO6za8FpHs9tzWcJo7aaRzk2yvzmumCnTsGad1zx%2Bh/kG5ta47wuV7lvW8g1rDXo8UGK9XEUfPCpKH6yYksymn2SoKA5dZMd7WiDQxSRwyUhFUpwqKNjqOPjfm32muHuI6UxTkWgM7z9ivHeiRexJCTV0RLoVISXeAmdiIQ%2BuN3u - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FU3bboIwAP0XYnwa0uItmJhlbsCiQzNBkL6VtkiBQqWgTuO/D5OT83CuD61it/aHV4XSFg/N/vCDg68ttKxtpVoYhsAVPjHBqnaE713DRqQWhuoSRRouW15XygAJTGeTOdRhkgJ9QinWMSNjnSSWOTdTYE0tYMimvnDKGmV4nDS1qtN2tGF/Ie7K1ri8WL0P2lou4RBLrl/6ZD%2B%2BNAG0dNADDgeq6B/rglVLnzUXTtgKK0bfAmF1yL8hr8quyKYRE/uv7bHEHlxLFGaf21LGwbHkkY2uQb5%2B%2Bd2vePkIxGK6IdG6Iy4sk0KOg0hGxIYddiGO7NhEh6xgNjwf8nDn5c45CmnuhbJLvhHeO84MhbTeil4XMvft6Q0VdEddZ%2BoFq74/uQYOBYkbxpHIinB8usYCKuLuj35VcnoHlvZ8/gM%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm26xRklJmBXbUYEwe9ixqttY1iYu0PfffK4Ls5cDjfw5DiqreNbJXhPQy8TilLbcMzDlr3ygPgzCWvxVlIbfH7OAir6M5AjbkqhqbXTScVgDmqPhYrZKK8guaiLLnJReGYRe7aK7uC7tKFoB%2B6S1OKQYGoKYZOdZW2fsUt4%2BNJg1KchBblP6gv3jfmZTbnuG9D5JpwHnp/U%2B382LVC%2BqzN/ki2oYSRH4ozljJ3t2UnVgUhimh9jWg4xfcCRQGeYhou4%2BPmMz4yh1DmJHSPo2B9jTG%2B72h9i%2BE%2BSOjhO2nDiRzxjbTMN57PFw%3D%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=LY3tboIwAEXfhRh%2fDWk7mcHELDPzC1fMBIrwr7R1fEhBioga330sWXJzk5uc3PPQpOiar1TmSps%2btMWH6%2fmuNtWSpqnU1DAKKumPKIRsRvR%2bqcWIlYWhLrFidVo1aSmVAWJ4fBtPoA7jI9DHnFOdCvaqs9hCE3QElmkBo6rLNuWiVgZOWV2q8tiMtuJG6OXUGO1fq%2fdBU1YzOKRVqrc92Z%2fPEICWDvrA4UDlvbHMhZy5om5TJuZUCf7iFdYlcrsIy%2bQafDpuvMJ3v4joHoTXgPCtCJYHT9oZRrgLPBtgRNb%2b4UT3aH%2bOCAcMfd%2foqsvIwmzDzNnxYrmJ11FCFhUMSVLGhXP2ZZKL3DS9oLJxQBZe5qT%2fmzok731mgoF9jnK%2bY2gZ%2bkWXYbhBXr6n1Ac3fJhnGIxh6Nku9s0NW0eU34GlPZ%2b%2f"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAEb%2fi4y9xcRL1ynI2NYU1lWHaeLYY9ToNN4wsa2W%2fvfJ4LwcOHzfzejEVR%2brTirDvxn49UTZyTZ841frQfkQtrzjpWhFp02%2bTKMws76FakpVNlaDrvpOQZRaxZO7tYCVFgi4ec4BF5kDstSzt3aBvI2H4DD25yoXo4JhlY296gttfoo54VOjYS4aoUX%2bL%2bqFDxU4r%2bU6HtjI8gBasR4flFwfeym6gMnkmyQHShjZU5ywE%2fO%2bjqxhxe7DCml5jSjbRHXpRnT1nVzC5fAc1WwmMpwJwxdCs0uEQydG2IlZ7Ma1dAmN3mO2fwvxT2Dc738%3d"}' headers: cache-control: no-cache - content-length: '780' + content-length: '657' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:47 GMT + date: Thu, 11 Nov 2021 03:24:39 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 14d47741-bbed-477b-b5bd-ab9621b532fe + x-ms-original-request-ids: 0b2a2fc6-f5d7-4dc4-9cbf-285d50b7b24b status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FU3bboIwAP0XYnwa0uItmJhlbsCiQzNBkL6VtkiBQqWgTuO/D5OT83CuD61it/aHV4XSFg/N/vCDg68ttKxtpVoYhsAVPjHBqnaE713DRqQWhuoSRRouW15XygAJTGeTOdRhkgJ9QinWMSNjnSSWOTdTYE0tYMimvnDKGmV4nDS1qtN2tGF/Ie7K1ri8WL0P2lou4RBLrl/6ZD%2B%2BNAG0dNADDgeq6B/rglVLnzUXTtgKK0bfAmF1yL8hr8quyKYRE/uv7bHEHlxLFGaf21LGwbHkkY2uQb5%2B%2Bd2vePkIxGK6IdG6Iy4sk0KOg0hGxIYddiGO7NhEh6xgNjwf8nDn5c45CmnuhbJLvhHeO84MhbTeil4XMvft6Q0VdEddZ%2BoFq74/uQYOBYkbxpHIinB8usYCKuLuj35VcnoHlvZ8/gM%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm26xRklJmBXbUYEwe9ixqttY1iYu0PfffK4Ls5cDjfw5DiqreNbJXhPQy8TilLbcMzDlr3ygPgzCWvxVlIbfH7OAir6M5AjbkqhqbXTScVgDmqPhYrZKK8guaiLLnJReGYRe7aK7uC7tKFoB%2B6S1OKQYGoKYZOdZW2fsUt4%2BNJg1KchBblP6gv3jfmZTbnuG9D5JpwHnp/U%2B382LVC%2BqzN/ki2oYSRH4ozljJ3t2UnVgUhimh9jWg4xfcCRQGeYhou4%2BPmMz4yh1DmJHSPo2B9jTG%2B72h9i%2BE%2BSOjhO2nDiRzxjbTMN57PFw%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=LY3tboIwAEXfhRh/DWk7mcHELDPzC1fMBIrwr7R1fEhBioga330sWXJzk5uc3PPQpOiar1TmSps%2BtMWH6/muNtWSpqnU1DAKKumPKIRsRvR%2BqcWIlYWhLrFidVo1aSmVAWJ4fBtPoA7jI9DHnFOdCvaqs9hCE3QElmkBo6rLNuWiVgZOWV2q8tiMtuJG6OXUGO1fq/dBU1YzOKRVqrc92Z/PEICWDvrA4UDlvbHMhZy5om5TJuZUCf7iFdYlcrsIy%2BQafDpuvMJ3v4joHoTXgPCtCJYHT9oZRrgLPBtgRNb%2B4UT3aH%2BOCAcMfd/oqsvIwmzDzNnxYrmJ11FCFhUMSVLGhXP2ZZKL3DS9oLJxQBZe5qT/mzok731mgoF9jnK%2BY2gZ%2BkWXYbhBXr6n1Ac3fJhnGIxh6Nku9s0NW0eU34GlPZ%2B/ + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9xcRL1ynI2NYU1lWHaeLYY9ToNN4wsa2W/vfJ4LwcOHzfzejEVR%2BrTirDvxn49UTZyTZ841frQfkQtrzjpWhFp02%2BTKMws76FakpVNlaDrvpOQZRaxZO7tYCVFgi4ec4BF5kDstSzt3aBvI2H4DD25yoXo4JhlY296gttfoo54VOjYS4aoUX%2BL%2BqFDxU4r%2BU6HtjI8gBasR4flFwfeym6gMnkmyQHShjZU5ywE/O%2Bjqxhxe7DCml5jSjbRHXpRnT1nVzC5fAc1WwmMpwJwxdCs0uEQydG2IlZ7Ma1dAmN3mO2fwvxT2Dc738%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3bjoIwAET%2fhZh9WqTgLZiYzRrFRbeaCLbat0KrlEJpKN4w%2fvuyyWSSk0zOvCzFH82vUNJY05e1%2fI7iQ2RNraxptJk6TkkVvfCSq6ZP22vN%2b2lVOuaamLQWuhGVMg5I3PN4OHFtNzkDe8gYtSlPB3aa%2bN7EOwN%2f5ANH19VNMF4bB4q0rkx1bvob%2fkT0WjTO7b%2fNV6%2bp9Mz9oFrYt27ZyWcecH0bdHE%2fekZ2j5Xkahbx%2biZSPqeGs8%2b49K8kehCosjtebKNkBdtDSTJYnFyyclcQr8OOBfL2gCwZpt46RIoUCGgdY71jcvSzxZlASz2Ij3pDAWhRvs%2bhd%2fFO%2bTqHchTuVZYlMXqesMYch0%2b4CIpEFmOM9QaugiPO5wUaXO5Esl3qBTGM5xQvh%2fc4YADKxxHikcBBALDMdqxE4SEnBWmBb73ffw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fi4y9aRK16xRkCLqxrrEYE0f3FjV23sXEXiz975PBeTgfHL5z13pxVfuqb6Tm3rXQTyhLTM3VfpUapQtAx3t%2bEp3olcGXeRJGPnRAzpnMp2pU1dBLADNUvthbpKOshLpdFFznIrf0PHPMrVlCZ%2bNAME7DuSrEJAGu8mmQQ6mML3FL%2bdwqUIhWKFH8g3zjY6Wf1%2bUq90yIHB2uQc9Pslkfh0b0HmvSb5LuKGHknYYpS5hz2LOWlcEnwvR0jWp2wdS%2fHOjRwksO8ZK%2bxksUYMosHB7X5m%2biYBfgoEFxTT5IjW1Sp2EMfwJCmac9Hn8%3d"}' headers: cache-control: no-cache - content-length: '789' + content-length: '665' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:47 GMT + date: Thu, 11 Nov 2021 03:24:39 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 8a73673f-5b80-4584-949f-d1e1e52e9109 + x-ms-original-request-ids: 7d6a35ff-b7b8-44e2-8882-bde9dd4206fe status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=LY3tboIwAEXfhRh/DWk7mcHELDPzC1fMBIrwr7R1fEhBioga330sWXJzk5uc3PPQpOiar1TmSps%2BtMWH6/muNtWSpqnU1DAKKumPKIRsRvR%2BqcWIlYWhLrFidVo1aSmVAWJ4fBtPoA7jI9DHnFOdCvaqs9hCE3QElmkBo6rLNuWiVgZOWV2q8tiMtuJG6OXUGO1fq/dBU1YzOKRVqrc92Z/PEICWDvrA4UDlvbHMhZy5om5TJuZUCf7iFdYlcrsIy%2BQafDpuvMJ3v4joHoTXgPCtCJYHT9oZRrgLPBtgRNb%2B4UT3aH%2BOCAcMfd/oqsvIwmzDzNnxYrmJ11FCFhUMSVLGhXP2ZZKL3DS9oLJxQBZe5qT/mzok731mgoF9jnK%2BY2gZ%2BkWXYbhBXr6n1Ac3fJhnGIxh6Nku9s0NW0eU34GlPZ%2B/ + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAEb/i4y9xcRL1ynI2NYU1lWHaeLYY9ToNN4wsa2W/vfJ4LwcOHzfzejEVR%2BrTirDvxn49UTZyTZ841frQfkQtrzjpWhFp02%2BTKMws76FakpVNlaDrvpOQZRaxZO7tYCVFgi4ec4BF5kDstSzt3aBvI2H4DD25yoXo4JhlY296gttfoo54VOjYS4aoUX%2BL%2BqFDxU4r%2BU6HtjI8gBasR4flFwfeym6gMnkmyQHShjZU5ywE/O%2Bjqxhxe7DCml5jSjbRHXpRnT1nVzC5fAc1WwmMpwJwxdCs0uEQydG2IlZ7Ma1dAmN3mO2fwvxT2Dc738%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3bjoIwAET/hZh9WqTgLZiYzRrFRbeaCLbat0KrlEJpKN4w/vuyyWSSk0zOvCzFH82vUNJY05e1/I7iQ2RNraxptJk6TkkVvfCSq6ZP22vN%2B2lVOuaamLQWuhGVMg5I3PN4OHFtNzkDe8gYtSlPB3aa%2BN7EOwN/5ANH19VNMF4bB4q0rkx1bvob/kT0WjTO7b/NV6%2Bp9Mz9oFrYt27ZyWcecH0bdHE/ekZ2j5Xkahbx%2BiZSPqeGs8%2B49K8kehCosjtebKNkBdtDSTJYnFyyclcQr8OOBfL2gCwZpt46RIoUCGgdY71jcvSzxZlASz2Ij3pDAWhRvs%2Bhd/FO%2BTqHchTuVZYlMXqesMYch0%2B4CIpEFmOM9QaugiPO5wUaXO5Esl3qBTGM5xQvh/c4YADKxxHikcBBALDMdqxE4SEnBWmBb73ffw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aRK16xRkCLqxrrEYE0f3FjV23sXEXiz975PBeTgfHL5z13pxVfuqb6Tm3rXQTyhLTM3VfpUapQtAx3t%2BEp3olcGXeRJGPnRAzpnMp2pU1dBLADNUvthbpKOshLpdFFznIrf0PHPMrVlCZ%2BNAME7DuSrEJAGu8mmQQ6mML3FL%2BdwqUIhWKFH8g3zjY6Wf1%2BUq90yIHB2uQc9Pslkfh0b0HmvSb5LuKGHknYYpS5hz2LOWlcEnwvR0jWp2wdS/HOjRwksO8ZK%2BxksUYMosHB7X5m%2BiYBfgoEFxTT5IjW1Sp2EMfwJCmac9Hn8%3D response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY1ba8IwAIX%2fS5E9rTbpvFBBxpy20y0K9qZ5S9O4hlxamtRLx%2f77Ojgc%2bODjnB9Hs7v94loYZ%2fHjbN7iJI2dhVNZ25iF5ymiyTdTTNsx6buWjWmtPNMVhra8sbzWxgMFvMwmc%2bjC4gLcSVkSlzD64tIi8Of%2bBQTTAHhNW195yVrjIU7b2tQXO%2f5kj4x00nrX%2fzavI1s3S%2fhEGu5eB3MYX%2foABi4YAp9GRgyPtWB6GbP2yilbEcPK50QFHY7vGOnqlq%2f3cRGhPlW4QvIMcQQjlO%2b2A%2fPMPwK8oZBK8SBrLI59eDvrZsektEmyqpjcPs6gOpR%2bZtEJH5BM%2b4FrGu3STK9wcapuZzWNqdqnmZK4EE2P05KgaD%2fLlRRITAAW5YH6YYKSFck3k1sSlgCJ%2bwnlU56HIcjV9B3lWUc%2bMMc9CJzf3z8%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY3daoMwAEbfRcbuNIm16xRkjOqKXaNME4eXMcbO%2bouJxVr67pXBufng8J271olZnaqulppz1%2fzPhNDE1BztT6lBOgC0rGNn0YpOGWyZRmHwvgVyyiUfq0FVfScBzFH5Zu2QjvIS6lZRMJ0JvtF5bps7s4T21oZgGPtrVYhRAlzxsZd9qYxvcUvZ1ChQiEYoUfwP%2bcGGSr%2bu5nrumhDZOlxBry%2byXot9LTqX1ulvnB5JTOMv4qc0oXZ0og0tvQBhcp7DJTAx4Uvk%2fdwwyRZ8Sd9X1w9JZuH6eMAw2IReuseXZh%2fTAEV%2bNoc%2b3oakOYSEu9rj8QQ%3d"}' headers: cache-control: no-cache - content-length: '784' + content-length: '662' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:47 GMT + date: Thu, 11 Nov 2021 03:24:39 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 385fc38e-12fe-4266-9ac9-032e8e4fa15a + x-ms-original-request-ids: 884a3470-e9ae-430a-a9bb-8da33a60be1a status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3bjoIwAET/hZh9WqTgLZiYzRrFRbeaCLbat0KrlEJpKN4w/vuyyWSSk0zOvCzFH82vUNJY05e1/I7iQ2RNraxptJk6TkkVvfCSq6ZP22vN%2B2lVOuaamLQWuhGVMg5I3PN4OHFtNzkDe8gYtSlPB3aa%2BN7EOwN/5ANH19VNMF4bB4q0rkx1bvob/kT0WjTO7b/NV6%2Bp9Mz9oFrYt27ZyWcecH0bdHE/ekZ2j5Xkahbx%2BiZSPqeGs8%2B49K8kehCosjtebKNkBdtDSTJYnFyyclcQr8OOBfL2gCwZpt46RIoUCGgdY71jcvSzxZlASz2Ij3pDAWhRvs%2Bhd/FO%2BTqHchTuVZYlMXqesMYch0%2B4CIpEFmOM9QaugiPO5wUaXO5Esl3qBTGM5xQvh/c4YADKxxHikcBBALDMdqxE4SEnBWmBb73ffw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aRK16xRkCLqxrrEYE0f3FjV23sXEXiz975PBeTgfHL5z13pxVfuqb6Tm3rXQTyhLTM3VfpUapQtAx3t%2BEp3olcGXeRJGPnRAzpnMp2pU1dBLADNUvthbpKOshLpdFFznIrf0PHPMrVlCZ%2BNAME7DuSrEJAGu8mmQQ6mML3FL%2BdwqUIhWKFH8g3zjY6Wf1%2BUq90yIHB2uQc9Pslkfh0b0HmvSb5LuKGHknYYpS5hz2LOWlcEnwvR0jWp2wdS/HOjRwksO8ZK%2BxksUYMosHB7X5m%2BiYBfgoEFxTT5IjW1Sp2EMfwJCmac9Hn8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY1ba8IwAIX/S5E9rTbpvFBBxpy20y0K9qZ5S9O4hlxamtRLx/77Ojgc%2BODjnB9Hs7v94loYZ/HjbN7iJI2dhVNZ25iF5ymiyTdTTNsx6buWjWmtPNMVhra8sbzWxgMFvMwmc%2BjC4gLcSVkSlzD64tIi8Of%2BBQTTAHhNW195yVrjIU7b2tQXO/5kj4x00nrX/zavI1s3S/hEGu5eB3MYX/oABi4YAp9GRgyPtWB6GbP2yilbEcPK50QFHY7vGOnqlq/3cRGhPlW4QvIMcQQjlO%2B2A/PMPwK8oZBK8SBrLI59eDvrZsektEmyqpjcPs6gOpR%2BZtEJH5BM%2B4FrGu3STK9wcapuZzWNqdqnmZK4EE2P05KgaD/LlRRITAAW5YH6YYKSFck3k1sSlgCJ%2BwnlU56HIcjV9B3lWUc%2BMMc9CJzf3z8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm16xRkjOqKXaNME4eXMcbO%2BouJxVr67pXBufng8J271olZnaqulppz1/zPhNDE1BztT6lBOgC0rGNn0YpOGWyZRmHwvgVyyiUfq0FVfScBzFH5Zu2QjvIS6lZRMJ0JvtF5bps7s4T21oZgGPtrVYhRAlzxsZd9qYxvcUvZ1ChQiEYoUfwP%2BcGGSr%2Bu5nrumhDZOlxBry%2ByXot9LTqX1ulvnB5JTOMv4qc0oXZ0og0tvQBhcp7DJTAx4Uvk/dwwyRZ8Sd9X1w9JZuH6eMAw2IReuseXZh/TAEV%2BNoc%2B3oakOYSEu9rj8QQ%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ljin-test/providers/Microsoft.KeyVault/vaults/kv-ljin-sni","name":"kv-ljin-sni","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"534bf52a-05a4-41bb-8ef5-b29577ee4c88","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"596c247a-9db0-4c20-8ddb-d944102067ac","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://kv-ljin-sni.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3dToMwAEbfpVl2ZWkL6AIJMZJITBQTAafzrpSiBfuTtjDmsncfJl%2fO1cn5zkDxxb8INTqQnsHjQ9281yAFP94blyIkqaLfXHLlA%2fo3WR4wLZGbWsesMF5o5RBuSX8X7wgkbY9h3HUUUs4iyNok3IU9Tm4TjIzVs%2bi4dagUzGqnex8889OeTr8ezf909xuvTUa21Ag4r%2bYaz0JMEojXke3GjeujHrnKam5nwXhOHe9uGplMX%2fUiqig%2fHuS4lIU5NEMuq%2bjt1BRdzD6Kz9enaiiH%2fRFcLlc%3d"}' + string: '{"value":[]}' headers: cache-control: no-cache - content-length: '1161' + content-length: '133' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:48 GMT + date: Thu, 11 Nov 2021 03:24:39 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 719fc0ce-5a16-41ae-ac08-bd4f41237077 + x-ms-original-request-ids: 09bc9d2f-abf2-447a-9976-f1c933970f29 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY1ba8IwAIX/S5E9rTbpvFBBxpy20y0K9qZ5S9O4hlxamtRLx/77Ojgc%2BODjnB9Hs7v94loYZ/HjbN7iJI2dhVNZ25iF5ymiyTdTTNsx6buWjWmtPNMVhra8sbzWxgMFvMwmc%2BjC4gLcSVkSlzD64tIi8Of%2BBQTTAHhNW195yVrjIU7b2tQXO/5kj4x00nrX/zavI1s3S/hEGu5eB3MYX/oABi4YAp9GRgyPtWB6GbP2yilbEcPK50QFHY7vGOnqlq/3cRGhPlW4QvIMcQQjlO%2B2A/PMPwK8oZBK8SBrLI59eDvrZsektEmyqpjcPs6gOpR%2BZtEJH5BM%2B4FrGu3STK9wcapuZzWNqdqnmZK4EE2P05KgaD/LlRRITAAW5YH6YYKSFck3k1sSlgCJ%2BwnlU56HIcjV9B3lWUc%2BMMc9CJzf3z8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY3daoMwAEbfRcbuNIm16xRkjOqKXaNME4eXMcbO%2BouJxVr67pXBufng8J271olZnaqulppz1/zPhNDE1BztT6lBOgC0rGNn0YpOGWyZRmHwvgVyyiUfq0FVfScBzFH5Zu2QjvIS6lZRMJ0JvtF5bps7s4T21oZgGPtrVYhRAlzxsZd9qYxvcUvZ1ChQiEYoUfwP%2BcGGSr%2Bu5nrumhDZOlxBry%2ByXot9LTqX1ulvnB5JTOMv4qc0oXZ0og0tvQBhcp7DJTAx4Uvk/dwwyRZ8Sd9X1w9JZuH6eMAw2IReuseXZh/TAEV%2BNoc%2B3oakOYSEu9rj8QQ%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3dToMwAEbfpVl2ZWkL6AIJMZJITBQTAafzrpSiBfuTtjDmsncfJl/O1cn5zkDxxb8INTqQnsHjQ9281yAFP94blyIkqaLfXHLlA/o3WR4wLZGbWsesMF5o5RBuSX8X7wgkbY9h3HUUUs4iyNok3IU9Tm4TjIzVs%2Bi4dagUzGqnex8889OeTr8ezf909xuvTUa21Ag4r%2BYaz0JMEojXke3GjeujHrnKam5nwXhOHe9uGplMX/Uiqig/HuS4lIU5NEMuq%2Bjt1BRdzD6Kz9enaiiH/RFcLlc%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3RaoMwGEbfJZReLSZxriWCjBXmLjavtIK9i8nvllmTkERxK333Ofg4V4fz3ZCBNX5oMwaU39DrS92ca5SjrxhdyAmZhBGfMIGJifidPSTSTiTMfZBeu6itCYT2bDhkR4ZZP1CcKSWwAPmIZc%2fTYzpQ%2fsQpcd4uWoEPpNLS22CHmLzDTyvmayTLP8PzLlpXsL1wGi%2bbucWLlDKO6Ta234Vxe7QjmKIGv2gJJxFAPTQTny%2f1em3T9dCdVahK1zXfp6kunb2UKqve2q5paIHu9z8%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,YmV6LXJnfGJlei1rdjA4MTgwNQ=="}' headers: cache-control: no-cache - content-length: '1154' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:48 GMT + date: Thu, 11 Nov 2021 03:24:40 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: d9fc6486-cb0b-4bbe-b3aa-9e21541dcc92 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3dToMwAEbfpVl2ZWkL6AIJMZJITBQTAafzrpSiBfuTtjDmsncfJl/O1cn5zkDxxb8INTqQnsHjQ9281yAFP94blyIkqaLfXHLlA/o3WR4wLZGbWsesMF5o5RBuSX8X7wgkbY9h3HUUUs4iyNok3IU9Tm4TjIzVs%2Bi4dagUzGqnex8889OeTr8ezf909xuvTUa21Ag4r%2BYaz0JMEojXke3GjeujHrnKam5nwXhOHe9uGplMX/Uiqig/HuS4lIU5NEMuq%2Bjt1BRdzD6Kz9enaiiH/RFcLlc%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3RaoMwGEbfJZReLSZxriWCjBXmLjavtIK9i8nvllmTkERxK333Ofg4V4fz3ZCBNX5oMwaU39DrS92ca5SjrxhdyAmZhBGfMIGJifidPSTSTiTMfZBeu6itCYT2bDhkR4ZZP1CcKSWwAPmIZc/TYzpQ/sQpcd4uWoEPpNLS22CHmLzDTyvmayTLP8PzLlpXsL1wGi%2BbucWLlDKO6Ta234Vxe7QjmKIGv2gJJxFAPTQTny/1em3T9dCdVahK1zXfp6kunb2UKqve2q5paIHu9z8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,YmV6LXJnfGJlei1rdjA4MTgwNQ== response: body: - string: '{"value":[]}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2FlZDJwanBwdXd1bjc3Z2ttcHFwd3Y2Mmhja2lsd3JucWhsaGdyYWRraXVhMmVmdmQ1amtwbWFwdHBpa29zcDVifGNtay10ZXN0LWtleXZhdWx0M3BnbWdobw=="}' headers: cache-control: no-cache - content-length: '133' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:48 GMT + date: Thu, 11 Nov 2021 03:24:40 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 95cef187-6c42-4f9b-9672-0fd97660eee3 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3RaoMwGEbfJZReLSZxriWCjBXmLjavtIK9i8nvllmTkERxK333Ofg4V4fz3ZCBNX5oMwaU39DrS92ca5SjrxhdyAmZhBGfMIGJifidPSTSTiTMfZBeu6itCYT2bDhkR4ZZP1CcKSWwAPmIZc/TYzpQ/sQpcd4uWoEPpNLS22CHmLzDTyvmayTLP8PzLlpXsL1wGi%2BbucWLlDKO6Ta234Vxe7QjmKIGv2gJJxFAPTQTny/1em3T9dCdVahK1zXfp6kunb2UKqve2q5paIHu9z8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,YmV6LXJnfGJlei1rdjA4MTgwNQ== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2FlZDJwanBwdXd1bjc3Z2ttcHFwd3Y2Mmhja2lsd3JucWhsaGdyYWRraXVhMmVmdmQ1amtwbWFwdHBpa29zcDVifGNtay10ZXN0LWtleXZhdWx0M3BnbWdobw== response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azps-test-group/providers/Microsoft.KeyVault/vaults/azps-test-kv4","name":"azps-test-kv4","type":"Microsoft.KeyVault/vaults","location":"southcentralus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"d1178d20-4ca4-45f0-ba9a-5a08f588da8d","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://azps-test-kv4.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/fytest/providers/Microsoft.KeyVault/vaults/vault1569","name":"vault1569","type":"Microsoft.KeyVault/vaults","location":"centraluseuap","tags":{},"systemData":{"lastModifiedBy":"yishiwang@microsoft.com","lastModifiedByType":"User","lastModifiedAt":"2021-06-16T02:57:58.008Z"},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"0a592c45-613e-4f1b-9023-7c4414fd53bf","permissions":{"keys":["Get","Create","Delete","List","Update","Import","Backup","Restore","Recover"],"secrets":["Get","List","Set","Delete","Backup","Restore","Recover"],"certificates":["Get","List","Delete","Create","Import","Update","ManageContacts","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers","ManageIssuers","Recover"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"ad27285a-4305-4ba5-b8e8-54367509b9d2","permissions":{"keys":["WrapKey","Get","UnwrapKey"],"secrets":[],"certificates":[]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3707fb2f-ac10-4591-a04f-8b0d786ea37d","permissions":{"keys":["Get","List","Update","Create","Delete","Import","Recover","Backup","Restore","Purge"],"secrets":["Restore","Backup","Get","List","Set","Delete","Recover","Purge"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","Purge"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"enablePurgeProtection":true,"vaultUri":"https://vault1569.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=3dTRbpswFAbgd0FVr5rGTkKrVIqmZoW0aQ0tGDv4zoBTwBgcICFJ1Xefq0272Bt0kuUbHx1L3%2fntD6sWx%2f6lqGVn3X1Yzn2Io9C6s%2fK%2b193deKx4zd%2bFEnV%2fzc%2f7VlynjRp3%2b6RL20L3RVN3Y5DA7c3sFo5gsgWjWZbxERfpdJQm88ntZAvm9hyMddsciky03RgVadt0zba%2ffhYnwvdVPz587d2Pi77RC3jJdTE6mErTfDEBcD4CZsHLi06aGxsp6kUo2kORiiXvRHaF1XzPwiMjwN4xJ6NCBatQ5og41QxHQSkcuAs32hOqO2IYuCiCTog9H03zhuK1j1wd43KZI1gBTFIbrcgmxGBhXVmhH%2bHHn46Hg%2fuXb6qC6nz4o%2fLgbSouKgaogi2iXvxWrj0E5BBXKUSR7VClCwTZDXPzMIPNiT%2fqInRdO64CP4XaoRvNyHQJMV4%2fp9LeR6rnCOqWUSiNXu9hViVEz6iyn5OV12fndZng9yOTmZ9O3DhSxxJBZ4gpOCYq6P2HJSNn0sTAnEO9I%2fWaRxjMjTw1I%2fpPxJHURjjgaWQ%2fhXXOCFxrIzSgydM5UtBDRoJFuY8occI6y5FkexZls0yRTVS7JXErmxkxLmcnsdKSus4Jl%2bshc%2bxNcjb5VccJJZk09TtcVzIwk%2ftH%2fPyV8xTYvffgFgnN7Bh7naBuz1ewevst%2fjfmTnT%2f%2bh0%2fAJ6oYaCVgVyxJ6pySabvAyYBQXIevH496M%2fPXw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2Z1dzZrenBrMnp1ZXhnMzN6M2VzN2xsNmltM2dzazRxZGhpYTRrZHJhenJ0aGthcHhjZndobGV1NnJ4eGx4ZWJ1fGNtay10ZXN0LWtleXZhdWx0cWZtazNtdA=="}' headers: cache-control: no-cache - content-length: '2094' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:48 GMT + date: Thu, 11 Nov 2021 03:24:40 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: c66f1929-b489-4f33-b0c4-349778491157 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2FlZDJwanBwdXd1bjc3Z2ttcHFwd3Y2Mmhja2lsd3JucWhsaGdyYWRraXVhMmVmdmQ1amtwbWFwdHBpa29zcDVifGNtay10ZXN0LWtleXZhdWx0M3BnbWdobw== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=3dTRbpswFAbgd0FVr5rGTkKrVIqmZoW0aQ0tGDv4zoBTwBgcICFJ1Xefq0272Bt0kuUbHx1L3/ntD6sWx/6lqGVn3X1Yzn2Io9C6s/K%2B193deKx4zd%2BFEnV/zc/7VlynjRp3%2B6RL20L3RVN3Y5DA7c3sFo5gsgWjWZbxERfpdJQm88ntZAvm9hyMddsciky03RgVadt0zba/fhYnwvdVPz587d2Pi77RC3jJdTE6mErTfDEBcD4CZsHLi06aGxsp6kUo2kORiiXvRHaF1XzPwiMjwN4xJ6NCBatQ5og41QxHQSkcuAs32hOqO2IYuCiCTog9H03zhuK1j1wd43KZI1gBTFIbrcgmxGBhXVmhH%2BHHn46Hg/uXb6qC6nz4o/LgbSouKgaogi2iXvxWrj0E5BBXKUSR7VClCwTZDXPzMIPNiT/qInRdO64CP4XaoRvNyHQJMV4/p9LeR6rnCOqWUSiNXu9hViVEz6iyn5OV12fndZng9yOTmZ9O3DhSxxJBZ4gpOCYq6P2HJSNn0sTAnEO9I/WaRxjMjTw1I/pPxJHURjjgaWQ/hXXOCFxrIzSgydM5UtBDRoJFuY8occI6y5FkexZls0yRTVS7JXErmxkxLmcnsdKSus4Jl%2Bshc%2BxNcjb5VccJJZk09TtcVzIwk/tH/PyV8xTYvffgFgnN7Bh7naBuz1ewevst/jfmTnT/%2Bh0/AJ6oYaCVgVyxJ6pySabvAyYBQXIevH496M/PXw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2Z1dzZrenBrMnp1ZXhnMzN6M2VzN2xsNmltM2dzazRxZGhpYTRrZHJhenJ0aGthcHhjZndobGV1NnJ4eGx4ZWJ1fGNtay10ZXN0LWtleXZhdWx0cWZtazNtdA== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZLbTuswEEX%2fJUI8URKHpihI6IhALg0kEc7Fjd%2fs2MWpm0tzaVMQ%2f0444umcL0AazdPMHs3a%2b0Op%2bTS8lLXslbsPxX6IkzRW7hQxDG1%2fp6oVqckbr3g9XJP3sePXRVOp%2fUj7oivboWzqXtUo2K6Wt2AB6FZbLBkjC8KLm0VBTf1W32qmYWpq2zXHkvGuV4Oy6Jq%2b2Q7Xz%2fyckXE%2fqMfv3v%2b5GJr2HlyStlwc58lZ%2fF7XgLnQ5gKXF72cLzaS1%2fcx745lwS3Sc3aVVOaI4wlnmnHANkO8gm4sRZBp7SHX5RQ4bZ7srBDa%2bRJlLCIV9LK6lfDm9fwzb79uRJgmmqlcKXGUJt6jHSbw4eWXkghqcfr57Cnc7ElQTTMZiApp5HFl7pGNTzgtDKL7a%2fzk46B605K6jTnyx7SGBHmWkUvW0AquqcdEAOSU79aA6pmXbNqISv%2bAHUYClA1REkoIcoCkeKQoXFN3iOhGTFiyqNCdPK2mXQD8JbZFNzuxShNHZLbRzvonKsGI3X3J3v%2bSR%2favzd5%2fxPWThmZSc9Y2xG1xZrcAO6LhKPPSHSz53gcYGYTp2SGurZJuoIYq4zlMwRA8WSK2sxXOmMuq4AzrfRjop3OODJe4MMcewxlwVvO%2bNTuwhjsrmp0a%2fyE%2b5hJGVA%2fteOcLioSBEIiZ08x6jnj9zvrn5xc%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ3N3ejNlaGllYzJ5Y2xpYWV1dXVmZjM1NmR2ZHhhc29xanB4YnNhNDJ2bHljMjN0aGQ0dWhkZmU0bHV1NDM3NnVwfGNtay10ZXN0LWtleXZhdWx0cnFkamt2dg=="}' headers: cache-control: no-cache - content-length: '1075' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:48 GMT + date: Thu, 11 Nov 2021 03:24:40 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: a6ee15ca-e896-4688-ad66-ebe68f05c1d8 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=3dTRbpswFAbgd0FVr5rGTkKrVIqmZoW0aQ0tGDv4zoBTwBgcICFJ1Xefq0272Bt0kuUbHx1L3/ntD6sWx/6lqGVn3X1Yzn2Io9C6s/K%2B193deKx4zd%2BFEnV/zc/7VlynjRp3%2B6RL20L3RVN3Y5DA7c3sFo5gsgWjWZbxERfpdJQm88ntZAvm9hyMddsciky03RgVadt0zba/fhYnwvdVPz587d2Pi77RC3jJdTE6mErTfDEBcD4CZsHLi06aGxsp6kUo2kORiiXvRHaF1XzPwiMjwN4xJ6NCBatQ5og41QxHQSkcuAs32hOqO2IYuCiCTog9H03zhuK1j1wd43KZI1gBTFIbrcgmxGBhXVmhH%2BHHn46Hg/uXb6qC6nz4o/LgbSouKgaogi2iXvxWrj0E5BBXKUSR7VClCwTZDXPzMIPNiT/qInRdO64CP4XaoRvNyHQJMV4/p9LeR6rnCOqWUSiNXu9hViVEz6iyn5OV12fndZng9yOTmZ9O3DhSxxJBZ4gpOCYq6P2HJSNn0sTAnEO9I/WaRxjMjTw1I/pPxJHURjjgaWQ/hXXOCFxrIzSgydM5UtBDRoJFuY8occI6y5FkexZls0yRTVS7JXErmxkxLmcnsdKSus4Jl%2Bshc%2BxNcjb5VccJJZk09TtcVzIwk/tH/PyV8xTYvffgFgnN7Bh7naBuz1ewevst/jfmTnT/%2Bh0/AJ6oYaCVgVyxJ6pySabvAyYBQXIevH496M/PXw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2Z1dzZrenBrMnp1ZXhnMzN6M2VzN2xsNmltM2dzazRxZGhpYTRrZHJhenJ0aGthcHhjZndobGV1NnJ4eGx4ZWJ1fGNtay10ZXN0LWtleXZhdWx0cWZtazNtdA== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLbTuswEEX/JUI8URKHpihI6IhALg0kEc7Fjd/s2MWpm0tzaVMQ/0444umcL0AazdPMHs3a%2B0Op%2BTS8lLXslbsPxX6IkzRW7hQxDG1/p6oVqckbr3g9XJP3sePXRVOp/Uj7oivboWzqXtUo2K6Wt2AB6FZbLBkjC8KLm0VBTf1W32qmYWpq2zXHkvGuV4Oy6Jq%2B2Q7Xz/yckXE/qMfv3v%2B5GJr2HlyStlwc58lZ/F7XgLnQ5gKXF72cLzaS1/cx745lwS3Sc3aVVOaI4wlnmnHANkO8gm4sRZBp7SHX5RQ4bZ7srBDa%2BRJlLCIV9LK6lfDm9fwzb79uRJgmmqlcKXGUJt6jHSbw4eWXkghqcfr57Cnc7ElQTTMZiApp5HFl7pGNTzgtDKL7a/zk46B605K6jTnyx7SGBHmWkUvW0AquqcdEAOSU79aA6pmXbNqISv%2BAHUYClA1REkoIcoCkeKQoXFN3iOhGTFiyqNCdPK2mXQD8JbZFNzuxShNHZLbRzvonKsGI3X3J3v%2BSR/avzd5/xPWThmZSc9Y2xG1xZrcAO6LhKPPSHSz53gcYGYTp2SGurZJuoIYq4zlMwRA8WSK2sxXOmMuq4AzrfRjop3OODJe4MMcewxlwVvO%2BNTuwhjsrmp0a/yE%2B5hJGVA/teOcLioSBEIiZ08x6jnj9zvrn5xc%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ3N3ejNlaGllYzJ5Y2xpYWV1dXVmZjM1NmR2ZHhhc29xanB4YnNhNDJ2bHljMjN0aGQ0dWhkZmU0bHV1NDM3NnVwfGNtay10ZXN0LWtleXZhdWx0cnFkamt2dg== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZLbbqMwEIbfBVW9aoJhSyoiRatm48DSGhROBt8ZcBYwBgokDan67uts9yUqjUaa0z%2fSp%2f9Dadlleq1aPirrDwU%2bB2EUKGulnKZ%2bXKuqoC39wwRrpyW9nga2zDuhjqdszIeqn6quHVWQacfV45O20LIjWDwWBV1Qlv9Y5JmpP%2blHYBomUPuhO1cFG0YVVfnQjd1xWr6wOaanZlLPtzz%2bvJu6fqPd075anOWmFN%2foQDMXQIZ2fzdy%2bbHjrN0EbDhXOdvSkRUPoTBPJLiQGBhvBBaYCd8KeIli0L%2blOr%2bgfZ%2bG9db193wmvLBow6%2bRuNRIc2ZiGUFmoWuUFJ7sm8qDEnhRaP%2bCbug%2fv35TEqgt3%2f%2bT2LlJQ5GO5lBoAYVgDtqSZ4n%2fFtbO6EJwPbT7EkNnJDDXCo3PXuiWVPgAC4NS7NqR6F3G%2bXvY9i%2fUiqOobUgMDS3FBi4iIwlqt2biAIgl59ixs%2bueBtZBl6S9XN%2bnX6T3q5D7Dop7m9hxkyXbM4llLfXkXX0IwY08ht%2fWezfieOd%2beUkQgupmlTa5wZreDgQpUZNqck6p5Sdst01R648kTg2E3SmzfYKhscK140nip8wyPak3Y14O0ssJtaYmE%2b4KY4NmTTfTndNkIZzTOL8U2P2d26WHALx5%2bx9xcnVLHxoXzH3MoGHH4baOboQ%2fP%2f8C"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGFmcm1jMms1eTd5Ynhwdzd0a2psaXpuM2RxM2xuZWg3N2YzdmZqaHVjbHRlM2Q3a2tzd2ZtfGNsaS10ZXN0LWt2LW1nbXQtcHpyaW0ybg=="}' headers: cache-control: no-cache - content-length: '1060' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:48 GMT + date: Thu, 11 Nov 2021 03:24:40 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 27170583-2466-4d9f-abe9-0194bc7e062f + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLbTuswEEX/JUI8URKHpihI6IhALg0kEc7Fjd/s2MWpm0tzaVMQ/0444umcL0AazdPMHs3a%2B0Op%2BTS8lLXslbsPxX6IkzRW7hQxDG1/p6oVqckbr3g9XJP3sePXRVOp/Uj7oivboWzqXtUo2K6Wt2AB6FZbLBkjC8KLm0VBTf1W32qmYWpq2zXHkvGuV4Oy6Jq%2B2Q7Xz/yckXE/qMfv3v%2B5GJr2HlyStlwc58lZ/F7XgLnQ5gKXF72cLzaS1/cx745lwS3Sc3aVVOaI4wlnmnHANkO8gm4sRZBp7SHX5RQ4bZ7srBDa%2BRJlLCIV9LK6lfDm9fwzb79uRJgmmqlcKXGUJt6jHSbw4eWXkghqcfr57Cnc7ElQTTMZiApp5HFl7pGNTzgtDKL7a/zk46B605K6jTnyx7SGBHmWkUvW0AquqcdEAOSU79aA6pmXbNqISv%2BAHUYClA1REkoIcoCkeKQoXFN3iOhGTFiyqNCdPK2mXQD8JbZFNzuxShNHZLbRzvonKsGI3X3J3v%2BSR/avzd5/xPWThmZSc9Y2xG1xZrcAO6LhKPPSHSz53gcYGYTp2SGurZJuoIYq4zlMwRA8WSK2sxXOmMuq4AzrfRjop3OODJe4MMcewxlwVvO%2BNTuwhjsrmp0a/yE%2B5hJGVA/teOcLioSBEIiZ08x6jnj9zvrn5xc%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ3N3ejNlaGllYzJ5Y2xpYWV1dXVmZjM1NmR2ZHhhc29xanB4YnNhNDJ2bHljMjN0aGQ0dWhkZmU0bHV1NDM3NnVwfGNtay10ZXN0LWtleXZhdWx0cnFkamt2dg== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLbbqMwEIbfBVW9aoJhSyoiRatm48DSGhROBt8ZcBYwBgokDan67uts9yUqjUaa0z/Sp/9Dadlleq1aPirrDwU%2BB2EUKGulnKZ%2BXKuqoC39wwRrpyW9nga2zDuhjqdszIeqn6quHVWQacfV45O20LIjWDwWBV1Qlv9Y5JmpP%2BlHYBomUPuhO1cFG0YVVfnQjd1xWr6wOaanZlLPtzz%2BvJu6fqPd075anOWmFN/oQDMXQIZ2fzdy%2BbHjrN0EbDhXOdvSkRUPoTBPJLiQGBhvBBaYCd8KeIli0L%2BlOr%2BgfZ%2BG9db193wmvLBow6%2BRuNRIc2ZiGUFmoWuUFJ7sm8qDEnhRaP%2BCbug/v35TEqgt3/%2BT2LlJQ5GO5lBoAYVgDtqSZ4n/FtbO6EJwPbT7EkNnJDDXCo3PXuiWVPgAC4NS7NqR6F3G%2BXvY9i/UiqOobUgMDS3FBi4iIwlqt2biAIgl59ixs%2BueBtZBl6S9XN%2BnX6T3q5D7Dop7m9hxkyXbM4llLfXkXX0IwY08ht/WezfieOd%2BeUkQgupmlTa5wZreDgQpUZNqck6p5Sdst01R648kTg2E3SmzfYKhscK140nip8wyPak3Y14O0ssJtaYmE%2B4KY4NmTTfTndNkIZzTOL8U2P2d26WHALx5%2Bx9xcnVLHxoXzH3MoGHH4baOboQ/P/8C + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGFmcm1jMms1eTd5Ynhwdzd0a2psaXpuM2RxM2xuZWg3N2YzdmZqaHVjbHRlM2Q3a2tzd2ZtfGNsaS10ZXN0LWt2LW1nbXQtcHpyaW0ybg== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1dLbbqMwEAbgd0HVXjXl0NAqlaJV03JYWoMWDC6%2bM9gpBxvccEhC1XdfZ9WXqGTZN%2f5npG%2fmU%2bvYaXytu3bQHj415zGBaaI9aNU4yuFB1wXpyDsTrBtvyDId2E3ZC32YiqE81HKs%2b27QjcLc363vzZVZ7I3VmlKyIqy8XZXFxrq39sbG3hi6PPRzTdlh0EFdHvqh3483L%2byckYmP%2bny5h99XYy%2b35i8i69WsfqriW8swNytDHfPX1dCqjn3Lum3CDnNdsh0ZGL2GYjPh5IQzw%2f7ADkVMxF7SViAz8zPipQk8908mOECOnGAaD5HnLKjZEeSsjzCLPeDKHDaPW%2b1aS6IU%2bk9OCOPH1x%2bqALrq%2bK3wHL5xAqxY5py2VIQ5EnaUGVjmSGJgZX7cuJwIcES8eio5n7Af1EWLTYTMnojQJ75bxW4wo042AAW%2belsgqo88q56oiEeVrxkPrHwJXkIUT7GoosQ7zbilUWm5eSpODTCDIc9ocqkXvckI3O5s2FYRdYwlg7uILsZGySPnx%2b7dRRw9h0nhgSUVGIOG3%2bW8tBmXfiJwrcRNlNG2cKWnBNTe9WclEhXu%2b7nwRpIt6VGJJmEmc7zsGsbxHWqCtRI6px2tYjMwIAzWxAs%2bUFc1hajmyyRLLt%2bYHzbAwPa3eAqbuEnc%2f%2fkQGPakctVfqIS%2fvv4B"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGtxbDZjbG11cDZmaWhpbnZ6dWJlYTd6ZzZ4eG9hc2U0YzRzaG1mN29odjdka3FyNmh0N2x1fGNsaS10ZXN0LWt2LW1nbXQteGJpZ2xncg=="}' headers: cache-control: no-cache - content-length: '1067' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:48 GMT + date: Thu, 11 Nov 2021 03:24:41 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 1de006cf-5a60-4394-9afd-1ca49866ba63 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLbbqMwEIbfBVW9aoJhSyoiRatm48DSGhROBt8ZcBYwBgokDan67uts9yUqjUaa0z/Sp/9Dadlleq1aPirrDwU%2BB2EUKGulnKZ%2BXKuqoC39wwRrpyW9nga2zDuhjqdszIeqn6quHVWQacfV45O20LIjWDwWBV1Qlv9Y5JmpP%2BlHYBomUPuhO1cFG0YVVfnQjd1xWr6wOaanZlLPtzz%2BvJu6fqPd075anOWmFN/oQDMXQIZ2fzdy%2BbHjrN0EbDhXOdvSkRUPoTBPJLiQGBhvBBaYCd8KeIli0L%2BlOr%2BgfZ%2BG9db193wmvLBow6%2BRuNRIc2ZiGUFmoWuUFJ7sm8qDEnhRaP%2BCbug/v35TEqgt3/%2BT2LlJQ5GO5lBoAYVgDtqSZ4n/FtbO6EJwPbT7EkNnJDDXCo3PXuiWVPgAC4NS7NqR6F3G%2BXvY9i/UiqOobUgMDS3FBi4iIwlqt2biAIgl59ixs%2BueBtZBl6S9XN%2BnX6T3q5D7Dop7m9hxkyXbM4llLfXkXX0IwY08ht/WezfieOd%2BeUkQgupmlTa5wZreDgQpUZNqck6p5Sdst01R648kTg2E3SmzfYKhscK140nip8wyPak3Y14O0ssJtaYmE%2B4KY4NmTTfTndNkIZzTOL8U2P2d26WHALx5%2Bx9xcnVLHxoXzH3MoGHH4baOboQ/P/8C + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGFmcm1jMms1eTd5Ynhwdzd0a2psaXpuM2RxM2xuZWg3N2YzdmZqaHVjbHRlM2Q3a2tzd2ZtfGNsaS10ZXN0LWt2LW1nbXQtcHpyaW0ybg== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1dLbbqMwEAbgd0HVXjXl0NAqlaJV03JYWoMWDC6%2BM9gpBxvccEhC1XdfZ9WXqGTZN/5npG/mU%2BvYaXytu3bQHj415zGBaaI9aNU4yuFB1wXpyDsTrBtvyDId2E3ZC32YiqE81HKs%2B27QjcLc363vzZVZ7I3VmlKyIqy8XZXFxrq39sbG3hi6PPRzTdlh0EFdHvqh3483L%2ByckYmP%2Bny5h99XYy%2B35i8i69WsfqriW8swNytDHfPX1dCqjn3Lum3CDnNdsh0ZGL2GYjPh5IQzw/7ADkVMxF7SViAz8zPipQk8908mOECOnGAaD5HnLKjZEeSsjzCLPeDKHDaPW%2B1aS6IU%2Bk9OCOPH1x%2BqALrq%2BK3wHL5xAqxY5py2VIQ5EnaUGVjmSGJgZX7cuJwIcES8eio5n7Af1EWLTYTMnojQJ75bxW4wo042AAW%2Belsgqo88q56oiEeVrxkPrHwJXkIUT7GoosQ7zbilUWm5eSpODTCDIc9ocqkXvckI3O5s2FYRdYwlg7uILsZGySPnx%2B7dRRw9h0nhgSUVGIOG3%2BW8tBmXfiJwrcRNlNG2cKWnBNTe9WclEhXu%2B7nwRpIt6VGJJmEmc7zsGsbxHWqCtRI6px2tYjMwIAzWxAs%2BUFc1hajmyyRLLt%2BYHzbAwPa3eAqbuEnc/kQGPakctVfqIS/vv4B + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGtxbDZjbG11cDZmaWhpbnZ6dWJlYTd6ZzZ4eG9hc2U0YzRzaG1mN29odjdka3FyNmh0N2x1fGNsaS10ZXN0LWt2LW1nbXQteGJpZ2xncg== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZDdbqMwEIXfBVW9KsGmSSoiRautCqTpAio%2fBnxnY6cQ2%2bAFkhSqvvvSx1hpNNLojM7R%2bb6Mln%2bOf5pWDMbuy3B%2fJ2mWGDujHkc97CxLkZZ8cMXbcUXmS89XVaes4UKHqm%2f02HTtYAEKT9v1EzQhPQFzzRgxCa8ezYo69pN9As7GAZbuu2vDeD9YQVP13dCdxtUbnxC5yNG6%2fuzh193Y6T28J7oxr8vnYr63AXRMsAy8vxvEktgJ3u4T3l%2bbij%2bTgbOHVDkXnHxiBDZ%2fsctyrmI%2fEXWAZtSV8ucOD7HSZNFBWYgbz2D2nh5D5HrrFMbPDGxclB4jrtgmBXESebJIlRYxxNvFDwTCec3SsEFAOMaDkbv%2fLaGgrW%2f5S5hQP5gzhXFwlttSVhsu9SFReGmIYY6YoJ72o0KT3O2mErGIeh8T9UeC5uxWojoJ89cZP%2bozl9jOF1IVFBN%2fCSWavS4VzGdSu%2fnZI7Rg21IwEmZgQsoRNNMjFiyqbK9EhaypwCA9H98C%2b30mBybxDBzj%2b%2fsf"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdHNvNm90MnVlb2JnZDY3NnBkcjZnNnZ4ZDNieXdyajd2aGtseTJpN2E1bmxkeGIzM3J2M2V6fGNsaS10ZXN0LWt2LW1nbXQtNTI3Y21neQ=="}' headers: cache-control: no-cache - content-length: '889' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:49 GMT + date: Thu, 11 Nov 2021 03:24:41 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 67485fb6-1fdb-4ec9-a1a4-ed3336ca80c4 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1dLbbqMwEAbgd0HVXjXl0NAqlaJV03JYWoMWDC6%2BM9gpBxvccEhC1XdfZ9WXqGTZN/5npG/mU%2BvYaXytu3bQHj415zGBaaI9aNU4yuFB1wXpyDsTrBtvyDId2E3ZC32YiqE81HKs%2B27QjcLc363vzZVZ7I3VmlKyIqy8XZXFxrq39sbG3hi6PPRzTdlh0EFdHvqh3483L%2ByckYmP%2Bny5h99XYy%2B35i8i69WsfqriW8swNytDHfPX1dCqjn3Lum3CDnNdsh0ZGL2GYjPh5IQzw/7ADkVMxF7SViAz8zPipQk8908mOECOnGAaD5HnLKjZEeSsjzCLPeDKHDaPW%2B1aS6IU%2Bk9OCOPH1x%2BqALrq%2BK3wHL5xAqxY5py2VIQ5EnaUGVjmSGJgZX7cuJwIcES8eio5n7Af1EWLTYTMnojQJ75bxW4wo042AAW%2Belsgqo88q56oiEeVrxkPrHwJXkIUT7GoosQ7zbilUWm5eSpODTCDIc9ocqkXvckI3O5s2FYRdYwlg7uILsZGySPnx%2B7dRRw9h0nhgSUVGIOG3%2BW8tBmXfiJwrcRNlNG2cKWnBNTe9WclEhXu%2B7nwRpIt6VGJJmEmc7zsGsbxHWqCtRI6px2tYjMwIAzWxAs%2BUFc1hajmyyRLLt%2BYHzbAwPa3eAqbuEnc//kQGPakctVfqIS/vv4B + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGtxbDZjbG11cDZmaWhpbnZ6dWJlYTd6ZzZ4eG9hc2U0YzRzaG1mN29odjdka3FyNmh0N2x1fGNsaS10ZXN0LWt2LW1nbXQteGJpZ2xncg== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZDdbqMwEIXfBVW9KsGmSSoiRautCqTpAio/BnxnY6cQ2%2BAFkhSqvvvSx1hpNNLojM7R%2Bb6Mln%2BOf5pWDMbuy3B/J2mWGDujHkc97CxLkZZ8cMXbcUXmS89XVaes4UKHqm/02HTtYAEKT9v1EzQhPQFzzRgxCa8ezYo69pN9As7GAZbuu2vDeD9YQVP13dCdxtUbnxC5yNG6/uzh193Y6T28J7oxr8vnYr63AXRMsAy8vxvEktgJ3u4T3l%2Bbij%2BTgbOHVDkXnHxiBDZ/sctyrmI/EXWAZtSV8ucOD7HSZNFBWYgbz2D2nh5D5HrrFMbPDGxclB4jrtgmBXESebJIlRYxxNvFDwTCec3SsEFAOMaDkbv/LaGgrW/5S5hQP5gzhXFwlttSVhsu9SFReGmIYY6YoJ72o0KT3O2mErGIeh8T9UeC5uxWojoJ89cZP%2Bozl9jOF1IVFBN/CSWavS4VzGdSu/nZI7Rg21IwEmZgQsoRNNMjFiyqbK9EhaypwCA9H98C%2B30mBybxDBzj%2B/sf + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdHNvNm90MnVlb2JnZDY3NnBkcjZnNnZ4ZDNieXdyajd2aGtseTJpN2E1bmxkeGIzM3J2M2V6fGNsaS10ZXN0LWt2LW1nbXQtNTI3Y21neQ== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZDRbqMwEEX%2fBVV9KsGmJRWRotVWBLa0JtoAdvGbjZ2FgA3FTppN1X8vfesvVBrNy713Rue%2bO1qe7XOrO%2bOs3p3N77woc2flNNaOZuV5imn2Tyqp7YJdjpNc1IPyzJGbempH2w7aeIDD%2ffLuHrqQ74F7JwRzmaxv3ZqH%2fr2%2fB2EQAm%2bchlMr5GQ81NbTYIa9XTzJ%2f5gde%2budvrb5dWWHcQ2v2di6p9k5H1%2f7AIYumAdeX5lu%2fjh0Uq9zOZ3aWj4wI8VNocIjzc8Ug%2bCVbgSRapfkXYNInJrqku0ECEseNd%2f1PyJKv%2bmwZJdy7dw4ZPNj6ZFu3kiU5TxBl1JRhv1GVQomIh6rQosvelPhJkFJXBWH7ICUWJIiZVncWx7hAwJ9QBM4cD%2brWJQ2rK98QuAWdcHLNno4zK3ezrlu9r9g1Te8wGdaCiZIusS6bxGgS9qJbe3HZakgxTAdiQJnnuwecxX0fwsQOh8fnw%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/python-devops-key","name":"python-devops-key","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3835f2fd-0701-4221-8a47-a8298114e26d","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://python-devops-key.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/SDKAutoPipelineSecrets","name":"SDKAutoPipelineSecrets","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"d4bf49da-3534-4b16-b774-0d091fb4b0bb","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3835f2fd-0701-4221-8a47-a8298114e26d","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://sdkautopipelinesecrets.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,cHl0aG9uLXNkay10ZXN0fFNES0F1dG9QaXBlbGluZVNlY3JldHM="}' headers: cache-control: no-cache - content-length: '837' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:49 GMT + date: Thu, 11 Nov 2021 03:24:41 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: b8a58df8-d89f-45dc-9a86-904077e40913 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZDdbqMwEIXfBVW9KsGmSSoiRautCqTpAio/BnxnY6cQ2%2BAFkhSqvvvSx1hpNNLojM7R%2Bb6Mln%2BOf5pWDMbuy3B/J2mWGDujHkc97CxLkZZ8cMXbcUXmS89XVaes4UKHqm/02HTtYAEKT9v1EzQhPQFzzRgxCa8ezYo69pN9As7GAZbuu2vDeD9YQVP13dCdxtUbnxC5yNG6/uzh193Y6T28J7oxr8vnYr63AXRMsAy8vxvEktgJ3u4T3l%2Bbij%2BTgbOHVDkXnHxiBDZ/sctyrmI/EXWAZtSV8ucOD7HSZNFBWYgbz2D2nh5D5HrrFMbPDGxclB4jrtgmBXESebJIlRYxxNvFDwTCec3SsEFAOMaDkbv/LaGgrW/5S5hQP5gzhXFwlttSVhsu9SFReGmIYY6YoJ72o0KT3O2mErGIeh8T9UeC5uxWojoJ89cZP%2Bozl9jOF1IVFBN/CSWavS4VzGdSu/nZI7Rg21IwEmZgQsoRNNMjFiyqbK9EhaypwCA9H98C%2B30mBybxDBzj%2B/sf + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdHNvNm90MnVlb2JnZDY3NnBkcjZnNnZ4ZDNieXdyajd2aGtseTJpN2E1bmxkeGIzM3J2M2V6fGNsaS10ZXN0LWt2LW1nbXQtNTI3Y21neQ== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZDRbqMwEEX/BVV9KsGmJRWRotVWBLa0JtoAdvGbjZ2FgA3FTppN1X8vfesvVBrNy713Rue%2BO1qe7XOrO%2BOs3p3N77woc2flNNaOZuV5imn2Tyqp7YJdjpNc1IPyzJGbempH2w7aeIDD/fLuHrqQ74F7JwRzmaxv3ZqH/r2/B2EQAm%2BchlMr5GQ81NbTYIa9XTzJ/5gde%2Budvrb5dWWHcQ2v2di6p9k5H1/7AIYumAdeX5lu/jh0Uq9zOZ3aWj4wI8VNocIjzc8Ug%2BCVbgSRapfkXYNInJrqku0ECEseNd/1PyJKv%2BmwZJdy7dw4ZPNj6ZFu3kiU5TxBl1JRhv1GVQomIh6rQosvelPhJkFJXBWH7ICUWJIiZVncWx7hAwJ9QBM4cD%2BrWJQ2rK98QuAWdcHLNno4zK3ezrlu9r9g1Te8wGdaCiZIusS6bxGgS9qJbe3HZakgxTAdiQJnnuwecxX0fwsQOh8fnw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,cHl0aG9uLXNkay10ZXN0fFNES0F1dG9QaXBlbGluZVNlY3JldHM= response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZHdbqMwEIXfBVW9KsGwzVZEilabDdCShUj8OfGdjZ1iHMDFhlKqvnvZu%2b0jVBrNzXd0RufMu9GySf%2flrVDG5t3wfqdZnhobo9Jaqo1lNbjFz6xhrV7heejZquwaSw1ElT2XmnetsgCxLz%2fvH2zTJhdg3lOKTczKH2ZJXOfBuQB37QJL9t3IKeuVFfGy71R30asDeyvwcNXW%2bG%2brXze6k1v7FktujotyMd86wHZNsIx9e6PEcrETrN2mrB95yXZYMXqXNe6A0gkVYP2CPApZkwSpqCLoh%2bo8xwnzbC%2brq%2f%2f5I92HX3kGtsadAb1vmz5qq1e4j1MSRHPeoDqyQ%2bfs2AG5SniEEyf5eo2K6k8U%2bKfjqcAkl11Wh4pAP4f1TpAcvaB9jKMczFldCCLO08IPpZN4WVvhYr6OUFBVBuFT%2bbjjqSenpd04usoBzTGKmqpHgkIKE53UPk99b85EcsBBOJxnv16%2b84qKBLJCvB1PIc8z4BofH58%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/ystestkv","name":"ystestkv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3707fb2f-ac10-4591-a04f-8b0d786ea37d","permissions":{"keys":["get","recover","backup","update","purge","wrapKey","decrypt","restore","import","unwrapKey","rotate","create","delete","list","encrypt","sign","release","verify"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore","Purge"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers","Purge"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"vaultUri":"https://ystestkv.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,eWlzaGl0ZXN0fHlzdGVzdGt2"}' headers: cache-control: no-cache - content-length: '863' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:49 GMT + date: Thu, 11 Nov 2021 03:24:41 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: b1bbe1d0-6510-417a-9f70-0b9e50c10036 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZDRbqMwEEX/BVV9KsGmJRWRotVWBLa0JtoAdvGbjZ2FgA3FTppN1X8vfesvVBrNy713Rue%2BO1qe7XOrO%2BOs3p3N77woc2flNNaOZuV5imn2Tyqp7YJdjpNc1IPyzJGbempH2w7aeIDD/fLuHrqQ74F7JwRzmaxv3ZqH/r2/B2EQAm%2BchlMr5GQ81NbTYIa9XTzJ/5gde%2Budvrb5dWWHcQ2v2di6p9k5H1/7AIYumAdeX5lu/jh0Uq9zOZ3aWj4wI8VNocIjzc8Ug%2BCVbgSRapfkXYNInJrqku0ECEseNd/1PyJKv%2BmwZJdy7dw4ZPNj6ZFu3kiU5TxBl1JRhv1GVQomIh6rQosvelPhJkFJXBWH7ICUWJIiZVncWx7hAwJ9QBM4cD%2BrWJQ2rK98QuAWdcHLNno4zK3ezrlu9r9g1Te8wGdaCiZIusS6bxGgS9qJbe3HZakgxTAdiQJnnuwecxX0fwsQOh8fnw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,cHl0aG9uLXNkay10ZXN0fFNES0F1dG9QaXBlbGluZVNlY3JldHM= - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZHdbqMwEIXfBVW9KsGwzVZEilabDdCShUj8OfGdjZ1iHMDFhlKqvnvZu%2B0jVBrNzXd0RufMu9GySf/lrVDG5t3wfqdZnhobo9Jaqo1lNbjFz6xhrV7heejZquwaSw1ElT2XmnetsgCxLz/vH2zTJhdg3lOKTczKH2ZJXOfBuQB37QJL9t3IKeuVFfGy71R30asDeyvwcNXW%2BG%2BrXze6k1v7FktujotyMd86wHZNsIx9e6PEcrETrN2mrB95yXZYMXqXNe6A0gkVYP2CPApZkwSpqCLoh%2Bo8xwnzbC%2Brq/5I92HX3kGtsadAb1vmz5qq1e4j1MSRHPeoDqyQ%2Bfs2AG5SniEEyf5eo2K6k8U%2BKfjqcAkl11Wh4pAP4f1TpAcvaB9jKMczFldCCLO08IPpZN4WVvhYr6OUFBVBuFT%2BbjjqSenpd04usoBzTGKmqpHgkIKE53UPk99b85EcsBBOJxnv16%2B84qKBLJCvB1PIc8z4BofH58%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,eWlzaGl0ZXN0fHlzdGVzdGt2 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azps-test-group/providers/Microsoft.KeyVault/vaults/azps-test-kv2","name":"azps-test-kv2","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"6f4d4442-0894-47fe-a5e6-b84bfb47b944","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"63c25c04-362b-42d9-9e3f-83af045d0a3c","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"2927ba5f-2732-4a5e-bdb8-f5fc20b476c9","permissions":{"keys":["Get","List","UnwrapKey","WrapKey"],"secrets":[],"certificates":[]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"d1178d20-4ca4-45f0-ba9a-5a08f588da8d","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://azps-test-kv2.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jiasli-cli-dev/providers/Microsoft.KeyVault/vaults/cli-sni-kv","name":"cli-sni-kv","type":"Microsoft.KeyVault/vaults","location":"westus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"0d504196-1423-4569-9a6e-15149656f0ee","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","Decrypt","Encrypt","UnwrapKey","WrapKey","Verify","Sign","Purge"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore","Purge"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers","Purge"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://cli-sni-kv.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1Y%2fRboIwAEX%2fpTE%2biW1RZyAhy8gwxg23AIrwVkoZUGkJLQQ1%2fvvYZyy5uU8n9%2bQ%2bgGCj%2fqwEV8B%2bAO8tjE4hsEGpdatsCBsiyA9rmNBLcu87tqSygarPFO2qVldSKIgyXLyst9jAWYGMdZ4TgzC6MmhmmVuzQNbGQrDt5FDlrFPQr2gnlSz08oPdzqS%2fajj8tXqdadk6eE7ayhgmchp3TIQtA03B85nik1FyJpyQdUNFmUsUyxdRY%2fVpOKbx3l0lKz76uzaJatc%2fm8EmqY9xbqb7oE7r0MMo9fKYNcG7fzlwwrkFFiD2%2fuvjMotHmdwPa%2bqNl0gcy9N918XXknzt%2bI3tXT%2f2Njg5%2byNtAvEdIQc8n78%3d"}' + string: '{"value":[]}' headers: cache-control: no-cache - content-length: '1508' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:49 GMT + date: Thu, 11 Nov 2021 03:24:41 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: e3b4fe44-439e-43d8-bdce-3e71390d9107 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZHdbqMwEIXfBVW9KsGwzVZEilabDdCShUj8OfGdjZ1iHMDFhlKqvnvZu%2B0jVBrNzXd0RufMu9GySf/lrVDG5t3wfqdZnhobo9Jaqo1lNbjFz6xhrV7heejZquwaSw1ElT2XmnetsgCxLz/vH2zTJhdg3lOKTczKH2ZJXOfBuQB37QJL9t3IKeuVFfGy71R30asDeyvwcNXW%2BG%2BrXze6k1v7FktujotyMd86wHZNsIx9e6PEcrETrN2mrB95yXZYMXqXNe6A0gkVYP2CPApZkwSpqCLoh%2Bo8xwnzbC%2Brq//5I92HX3kGtsadAb1vmz5qq1e4j1MSRHPeoDqyQ%2Bfs2AG5SniEEyf5eo2K6k8U%2BKfjqcAkl11Wh4pAP4f1TpAcvaB9jKMczFldCCLO08IPpZN4WVvhYr6OUFBVBuFT%2BbjjqSenpd04usoBzTGKmqpHgkIKE53UPk99b85EcsBBOJxnv16%2B84qKBLJCvB1PIc8z4BofH58%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,eWlzaGl0ZXN0fHlzdGVzdGt2 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1Y/RboIwAEX/pTE%2BiW1RZyAhy8gwxg23AIrwVkoZUGkJLQQ1/vvYZyy5uU8n9%2BQ%2BgGCj/qwEV8B%2BAO8tjE4hsEGpdatsCBsiyA9rmNBLcu87tqSygarPFO2qVldSKIgyXLyst9jAWYGMdZ4TgzC6MmhmmVuzQNbGQrDt5FDlrFPQr2gnlSz08oPdzqS/ajj8tXqdadk6eE7ayhgmchp3TIQtA03B85nik1FyJpyQdUNFmUsUyxdRY/VpOKbx3l0lKz76uzaJatc/m8EmqY9xbqb7oE7r0MMo9fKYNcG7fzlwwrkFFiD2/uvjMotHmdwPa%2BqNl0gcy9N918XXknzt%2BI3tXT/2Njg5%2ByNtAvEdIQc8n78%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1Y%2fdaoMwAIXfJZReVZOoW4kgY2Xasm6yVW1Z7hIT18xqxETpD333uccYHM7Vx%2fk4N9DKs31TbW1AeAPxc5YXGQjB0drOhBA2rGXfspGtddl16KVb6gaagZuyV51VujUQcVw9BkvsYF4hJxCCOUyWvlNy4i29CpEHgmDX61EJ2Rv4rspeG11ZdysvezacLBz%2f2jzNrO4iPGedcsaJnMYjD2HioCl4PjP1ZNS1bKNM9qMq5YoZKRZ5QwaanSnff3l5ctzyhm6y5nxieXKh626VxrigvkjpFRGwAIf4vz784YfUz9EuER7diJfXdLcWQV7E5OMzisD9%2fgs%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,YmV6LXJnfGJlei1rdjA4MTgwNQ=="}' headers: cache-control: no-cache - content-length: '666' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:49 GMT + date: Thu, 11 Nov 2021 03:24:41 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: bc0aafe8-c244-430f-b060-33c51da95803 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1Y/RboIwAEX/pTE%2BiW1RZyAhy8gwxg23AIrwVkoZUGkJLQQ1/vvYZyy5uU8n9%2BQ%2BgGCj/qwEV8B%2BAO8tjE4hsEGpdatsCBsiyA9rmNBLcu87tqSygarPFO2qVldSKIgyXLyst9jAWYGMdZ4TgzC6MmhmmVuzQNbGQrDt5FDlrFPQr2gnlSz08oPdzqS/ajj8tXqdadk6eE7ayhgmchp3TIQtA03B85nik1FyJpyQdUNFmUsUyxdRY/VpOKbx3l0lKz76uzaJatc/m8EmqY9xbqb7oE7r0MMo9fKYNcG7fzlwwrkFFiD2/uvjMotHmdwPa%2BqNl0gcy9N918XXknzt%2BI3tXT/2Njg5%2ByNtAvEdIQc8n78%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1Y/daoMwAIXfJZReVZOoW4kgY2Xasm6yVW1Z7hIT18xqxETpD333uccYHM7Vx/k4N9DKs31TbW1AeAPxc5YXGQjB0drOhBA2rGXfspGtddl16KVb6gaagZuyV51VujUQcVw9BkvsYF4hJxCCOUyWvlNy4i29CpEHgmDX61EJ2Rv4rspeG11ZdysvezacLBz/2jzNrO4iPGedcsaJnMYjD2HioCl4PjP1ZNS1bKNM9qMq5YoZKRZ5QwaanSnff3l5ctzyhm6y5nxieXKh626VxrigvkjpFRGwAIf4vz784YfUz9EuER7diJfXdLcWQV7E5OMzisD9/gs%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,YmV6LXJnfGJlei1rdjA4MTgwNQ== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3ZboJAAEX%2fhZg%2bFRlc2mBimlqFdJGmgDPC22xWHGcJM4jS9N9Lk5v7cm7O%2ffEUv7qPWgnrLX68zXNe7HJv4R2dM3YRBBIr%2fM0lV26M%2b7bhY6plYFtiaVMbV2tlA0DCw8PsMfRDcgD%2bjDHsY06nPiXR5HFyANE8AoFp9KVmvLHBtqaNtvrgxu%2f8BnF7dsHlv%2b3TyGmzDO%2bwqf3LsBzkywkIIx8MCe9GVgyPWnC1zHlzqSlfYcvZfSGjtsqv1VYdu2rDEJfZOt2fMT%2bXXVGkCU3gfqfYiZzLvlq%2fzllsHJLRiRTwWq3TF4bSh7J%2fq%2bGU9kgZzJO0RKesgsnXrZQhIOitJX2MM2CuJchECs0OqgzncaURpCGD%2bpZJl3IhukqwT5bE822xwmgz64qYAZLAEsmjgNPvrtwNHMxucG8E60Hk%2ff7%2bAQ%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2FlZDJwanBwdXd1bjc3Z2ttcHFwd3Y2Mmhja2lsd3JucWhsaGdyYWRraXVhMmVmdmQ1amtwbWFwdHBpa29zcDVifGNtay10ZXN0LWtleXZhdWx0M3BnbWdobw=="}' headers: cache-control: no-cache - content-length: '791' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:49 GMT + date: Thu, 11 Nov 2021 03:24:42 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 723408c6-567e-497e-b995-16c49e140b0f + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1Y/daoMwAIXfJZReVZOoW4kgY2Xasm6yVW1Z7hIT18xqxETpD333uccYHM7Vx/k4N9DKs31TbW1AeAPxc5YXGQjB0drOhBA2rGXfspGtddl16KVb6gaagZuyV51VujUQcVw9BkvsYF4hJxCCOUyWvlNy4i29CpEHgmDX61EJ2Rv4rspeG11ZdysvezacLBz/2jzNrO4iPGedcsaJnMYjD2HioCl4PjP1ZNS1bKNM9qMq5YoZKRZ5QwaanSnff3l5ctzyhm6y5nxieXKh626VxrigvkjpFRGwAIf4vz784YfUz9EuER7diJfXdLcWQV7E5OMzisD9/gs%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,YmV6LXJnfGJlei1rdjA4MTgwNQ== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3ZboJAAEX/hZg%2BFRlc2mBimlqFdJGmgDPC22xWHGcJM4jS9N9Lk5v7cm7O/fEUv7qPWgnrLX68zXNe7HJv4R2dM3YRBBIr/M0lV26M%2B7bhY6plYFtiaVMbV2tlA0DCw8PsMfRDcgD%2BjDHsY06nPiXR5HFyANE8AoFp9KVmvLHBtqaNtvrgxu/8BnF7dsHlv%2B3TyGmzDO%2Bwqf3LsBzkywkIIx8MCe9GVgyPWnC1zHlzqSlfYcvZfSGjtsqv1VYdu2rDEJfZOt2fMT%2BXXVGkCU3gfqfYiZzLvlq/zllsHJLRiRTwWq3TF4bSh7J/q%2BGU9kgZzJO0RKesgsnXrZQhIOitJX2MM2CuJchECs0OqgzncaURpCGD%2BpZJl3IhukqwT5bE822xwmgz64qYAZLAEsmjgNPvrtwNHMxucG8E60Hk/f7%2BAQ%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2FlZDJwanBwdXd1bjc3Z2ttcHFwd3Y2Mmhja2lsd3JucWhsaGdyYWRraXVhMmVmdmQ1amtwbWFwdHBpa29zcDVifGNtay10ZXN0LWtleXZhdWx0M3BnbWdobw== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3tioJAAEXfRaJfa87YFwaxbKxJtSb5MaX%2fxnFK05kxRy2N3n0LLhcOXM59Kpw%2b6r%2bM51JZPBXzx%2fMDT1koaV2XcqFpDHN8oYzyeoT7pqIjIpgmm1iSKivrTHCpgRieZ5M5VGF8BuokSbCKKRmrJDb0uX4GxtQAWlmJNktoJTU7I5WQ4lyPdrRDuClqrf20%2fB7UolzCIS4ztX0v3%2fKlDqChgnfgcCDz96PIKV96tGozQldY0uTLZ0YTeY%2fI5uk9MpMjZe7v%2flRgm69ECAmM9e0p7NeZZ25v0Tp1bOZuAgYLt0e3UJ9ae4YCxFPswk0XglQQVISH6x7HCM38InVIkXf%2bdbunOXj4vNwR69ChU%2bm4Y7ePjnBHGWqCK3KQZXdRnjiJtZ7a%2fgofzcndXycgtlB4ZGmOxpd7FKQe%2bTAvcNQDQ3m9%2fgE%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2Z1dzZrenBrMnp1ZXhnMzN6M2VzN2xsNmltM2dzazRxZGhpYTRrZHJhenJ0aGthcHhjZndobGV1NnJ4eGx4ZWJ1fGNtay10ZXN0LWtleXZhdWx0cWZtazNtdA=="}' headers: cache-control: no-cache - content-length: '793' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:49 GMT + date: Thu, 11 Nov 2021 03:24:42 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: a6d99b22-81fa-4300-b841-8c40c29ab28a + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3ZboJAAEX/hZg%2BFRlc2mBimlqFdJGmgDPC22xWHGcJM4jS9N9Lk5v7cm7O/fEUv7qPWgnrLX68zXNe7HJv4R2dM3YRBBIr/M0lV26M%2B7bhY6plYFtiaVMbV2tlA0DCw8PsMfRDcgD%2BjDHsY06nPiXR5HFyANE8AoFp9KVmvLHBtqaNtvrgxu/8BnF7dsHlv%2B3TyGmzDO%2Bwqf3LsBzkywkIIx8MCe9GVgyPWnC1zHlzqSlfYcvZfSGjtsqv1VYdu2rDEJfZOt2fMT%2BXXVGkCU3gfqfYiZzLvlq/zllsHJLRiRTwWq3TF4bSh7J/q%2BGU9kgZzJO0RKesgsnXrZQhIOitJX2MM2CuJchECs0OqgzncaURpCGD%2BpZJl3IhukqwT5bE822xwmgz64qYAZLAEsmjgNPvrtwNHMxucG8E60Hk/f7%2BAQ%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2FlZDJwanBwdXd1bjc3Z2ttcHFwd3Y2Mmhja2lsd3JucWhsaGdyYWRraXVhMmVmdmQ1amtwbWFwdHBpa29zcDVifGNtay10ZXN0LWtleXZhdWx0M3BnbWdobw== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3tioJAAEXfRaJfa87YFwaxbKxJtSb5MaX/xnFK05kxRy2N3n0LLhcOXM59Kpw%2B6r%2BM51JZPBXzx/MDT1koaV2XcqFpDHN8oYzyeoT7pqIjIpgmm1iSKivrTHCpgRieZ5M5VGF8BuokSbCKKRmrJDb0uX4GxtQAWlmJNktoJTU7I5WQ4lyPdrRDuClqrf20/B7UolzCIS4ztX0v3/KlDqChgnfgcCDz96PIKV96tGozQldY0uTLZ0YTeY/I5uk9MpMjZe7v/lRgm69ECAmM9e0p7NeZZ25v0Tp1bOZuAgYLt0e3UJ9ae4YCxFPswk0XglQQVISH6x7HCM38InVIkXf%2BdbunOXj4vNwR69ChU%2Bm4Y7ePjnBHGWqCK3KQZXdRnjiJtZ7a/gofzcndXycgtlB4ZGmOxpd7FKQe%2BTAvcNQDQ3m9/gE%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2Z1dzZrenBrMnp1ZXhnMzN6M2VzN2xsNmltM2dzazRxZGhpYTRrZHJhenJ0aGthcHhjZndobGV1NnJ4eGx4ZWJ1fGNtay10ZXN0LWtleXZhdWx0cWZtazNtdA== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FU3bboIwAP0XYnwa0uItmJhlbsCiQzNBkL6VtkiBQqWgTuO%2fD5OT83CuD61it%2faHV4XSFg%2fN%2fvCDg68ttKxtpVoYhsAVPjHBqnaE713DRqQWhuoSRRouW15XygAJTGeTOdRhkgJ9QinWMSNjnSSWOTdTYE0tYMimvnDKGmV4nDS1qtN2tGF%2fIe7K1ri8WL0P2lou4RBLrl%2f6ZD%2b%2bNAG0dNADDgeq6B%2frglVLnzUXTtgKK0bfAmF1yL8hr8quyKYRE%2fuv7bHEHlxLFGaf21LGwbHkkY2uQb5%2b%2bd2vePkIxGK6IdG6Iy4sk0KOg0hGxIYddiGO7NhEh6xgNjwf8nDn5c45CmnuhbJLvhHeO84MhbTeil4XMvft6Q0VdEddZ%2boFq74%2fuQYOBYkbxpHIinB8usYCKuLuj35VcnoHlvZ8%2fgM%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ3N3ejNlaGllYzJ5Y2xpYWV1dXVmZjM1NmR2ZHhhc29xanB4YnNhNDJ2bHljMjN0aGQ0dWhkZmU0bHV1NDM3NnVwfGNtay10ZXN0LWtleXZhdWx0cnFkamt2dg=="}' headers: cache-control: no-cache - content-length: '776' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:50 GMT + date: Thu, 11 Nov 2021 03:24:42 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 6892c4e4-b04b-40bc-a91f-6496977995fb + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3tioJAAEXfRaJfa87YFwaxbKxJtSb5MaX/xnFK05kxRy2N3n0LLhcOXM59Kpw%2B6r%2BM51JZPBXzx/MDT1koaV2XcqFpDHN8oYzyeoT7pqIjIpgmm1iSKivrTHCpgRieZ5M5VGF8BuokSbCKKRmrJDb0uX4GxtQAWlmJNktoJTU7I5WQ4lyPdrRDuClqrf20/B7UolzCIS4ztX0v3/KlDqChgnfgcCDz96PIKV96tGozQldY0uTLZ0YTeY/I5uk9MpMjZe7v/lRgm69ECAmM9e0p7NeZZ25v0Tp1bOZuAgYLt0e3UJ9ae4YCxFPswk0XglQQVISH6x7HCM38InVIkXf%2BdbunOXj4vNwR69ChU%2Bm4Y7ePjnBHGWqCK3KQZXdRnjiJtZ7a/gofzcndXycgtlB4ZGmOxpd7FKQe%2BTAvcNQDQ3m9/gE%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ2Z1dzZrenBrMnp1ZXhnMzN6M2VzN2xsNmltM2dzazRxZGhpYTRrZHJhenJ0aGthcHhjZndobGV1NnJ4eGx4ZWJ1fGNtay10ZXN0LWtleXZhdWx0cWZtazNtdA== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FU3bboIwAP0XYnwa0uItmJhlbsCiQzNBkL6VtkiBQqWgTuO/D5OT83CuD61it/aHV4XSFg/N/vCDg68ttKxtpVoYhsAVPjHBqnaE713DRqQWhuoSRRouW15XygAJTGeTOdRhkgJ9QinWMSNjnSSWOTdTYE0tYMimvnDKGmV4nDS1qtN2tGF/Ie7K1ri8WL0P2lou4RBLrl/6ZD%2B%2BNAG0dNADDgeq6B/rglVLnzUXTtgKK0bfAmF1yL8hr8quyKYRE/uv7bHEHlxLFGaf21LGwbHkkY2uQb5%2B%2Bd2vePkIxGK6IdG6Iy4sk0KOg0hGxIYddiGO7NhEh6xgNjwf8nDn5c45CmnuhbJLvhHeO84MhbTeil4XMvft6Q0VdEddZ%2BoFq74/uQYOBYkbxpHIinB8usYCKuLuj35VcnoHlvZ8/gM%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ3N3ejNlaGllYzJ5Y2xpYWV1dXVmZjM1NmR2ZHhhc29xanB4YnNhNDJ2bHljMjN0aGQ0dWhkZmU0bHV1NDM3NnVwfGNtay10ZXN0LWtleXZhdWx0cnFkamt2dg== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=LY3tboIwAEXfhRh%2fDWk7mcHELDPzC1fMBIrwr7R1fEhBioga330sWXJzk5uc3PPQpOiar1TmSps%2btMWH6%2fmuNtWSpqnU1DAKKumPKIRsRvR%2bqcWIlYWhLrFidVo1aSmVAWJ4fBtPoA7jI9DHnFOdCvaqs9hCE3QElmkBo6rLNuWiVgZOWV2q8tiMtuJG6OXUGO1fq%2fdBU1YzOKRVqrc92Z%2fPEICWDvrA4UDlvbHMhZy5om5TJuZUCf7iFdYlcrsIy%2bQafDpuvMJ3v4joHoTXgPCtCJYHT9oZRrgLPBtgRNb%2b4UT3aH%2bOCAcMfd%2foqsvIwmzDzNnxYrmJ11FCFhUMSVLGhXP2ZZKL3DS9oLJxQBZe5qT%2fmzok731mgoF9jnK%2bY2gZ%2bkWXYbhBXr6n1Ac3fJhnGIxh6Nku9s0NW0eU34GlPZ%2b%2f"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGFmcm1jMms1eTd5Ynhwdzd0a2psaXpuM2RxM2xuZWg3N2YzdmZqaHVjbHRlM2Q3a2tzd2ZtfGNsaS10ZXN0LWt2LW1nbXQtcHpyaW0ybg=="}' headers: cache-control: no-cache - content-length: '780' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:50 GMT + date: Thu, 11 Nov 2021 03:24:42 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 2c5e8b64-8e7c-4343-ab92-f912899120dc + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FU3bboIwAP0XYnwa0uItmJhlbsCiQzNBkL6VtkiBQqWgTuO/D5OT83CuD61it/aHV4XSFg/N/vCDg68ttKxtpVoYhsAVPjHBqnaE713DRqQWhuoSRRouW15XygAJTGeTOdRhkgJ9QinWMSNjnSSWOTdTYE0tYMimvnDKGmV4nDS1qtN2tGF/Ie7K1ri8WL0P2lou4RBLrl/6ZD%2B%2BNAG0dNADDgeq6B/rglVLnzUXTtgKK0bfAmF1yL8hr8quyKYRE/uv7bHEHlxLFGaf21LGwbHkkY2uQb5%2B%2Bd2vePkIxGK6IdG6Iy4sk0KOg0hGxIYddiGO7NhEh6xgNjwf8nDn5c45CmnuhbJLvhHeO84MhbTeil4XMvft6Q0VdEddZ%2BoFq74/uQYOBYkbxpHIinB8usYCKuLuj35VcnoHlvZ8/gM%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpdGVzdC5yZ3N3ejNlaGllYzJ5Y2xpYWV1dXVmZjM1NmR2ZHhhc29xanB4YnNhNDJ2bHljMjN0aGQ0dWhkZmU0bHV1NDM3NnVwfGNtay10ZXN0LWtleXZhdWx0cnFkamt2dg== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=LY3tboIwAEXfhRh/DWk7mcHELDPzC1fMBIrwr7R1fEhBioga330sWXJzk5uc3PPQpOiar1TmSps%2BtMWH6/muNtWSpqnU1DAKKumPKIRsRvR%2BqcWIlYWhLrFidVo1aSmVAWJ4fBtPoA7jI9DHnFOdCvaqs9hCE3QElmkBo6rLNuWiVgZOWV2q8tiMtuJG6OXUGO1fq/dBU1YzOKRVqrc92Z/PEICWDvrA4UDlvbHMhZy5om5TJuZUCf7iFdYlcrsIy%2BQafDpuvMJ3v4joHoTXgPCtCJYHT9oZRrgLPBtgRNb%2B4UT3aH%2BOCAcMfd/oqsvIwmzDzNnxYrmJ11FCFhUMSVLGhXP2ZZKL3DS9oLJxQBZe5qT/mzok731mgoF9jnK%2BY2gZ%2BkWXYbhBXr6n1Ac3fJhnGIxh6Nku9s0NW0eU34GlPZ%2B/ + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGFmcm1jMms1eTd5Ynhwdzd0a2psaXpuM2RxM2xuZWg3N2YzdmZqaHVjbHRlM2Q3a2tzd2ZtfGNsaS10ZXN0LWt2LW1nbXQtcHpyaW0ybg== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3bjoIwAET%2fhZh9WqTgLZiYzRrFRbeaCLbat0KrlEJpKN4w%2fvuyyWSSk0zOvCzFH82vUNJY05e1%2fI7iQ2RNraxptJk6TkkVvfCSq6ZP22vN%2b2lVOuaamLQWuhGVMg5I3PN4OHFtNzkDe8gYtSlPB3aa%2bN7EOwN%2f5ANH19VNMF4bB4q0rkx1bvob%2fkT0WjTO7b%2fNV6%2bp9Mz9oFrYt27ZyWcecH0bdHE%2fekZ2j5Xkahbx%2biZSPqeGs8%2b49K8kehCosjtebKNkBdtDSTJYnFyyclcQr8OOBfL2gCwZpt46RIoUCGgdY71jcvSzxZlASz2Ij3pDAWhRvs%2bhd%2fFO%2bTqHchTuVZYlMXqesMYch0%2b4CIpEFmOM9QaugiPO5wUaXO5Esl3qBTGM5xQvh%2fc4YADKxxHikcBBALDMdqxE4SEnBWmBb73ffw%3d%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGtxbDZjbG11cDZmaWhpbnZ6dWJlYTd6ZzZ4eG9hc2U0YzRzaG1mN29odjdka3FyNmh0N2x1fGNsaS10ZXN0LWt2LW1nbXQteGJpZ2xncg=="}' headers: cache-control: no-cache - content-length: '789' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:50 GMT + date: Thu, 11 Nov 2021 03:24:42 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 85500b9a-05a7-4c4c-8284-1a8085bfd6b7 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=LY3tboIwAEXfhRh/DWk7mcHELDPzC1fMBIrwr7R1fEhBioga330sWXJzk5uc3PPQpOiar1TmSps%2BtMWH6/muNtWSpqnU1DAKKumPKIRsRvR%2BqcWIlYWhLrFidVo1aSmVAWJ4fBtPoA7jI9DHnFOdCvaqs9hCE3QElmkBo6rLNuWiVgZOWV2q8tiMtuJG6OXUGO1fq/dBU1YzOKRVqrc92Z/PEICWDvrA4UDlvbHMhZy5om5TJuZUCf7iFdYlcrsIy%2BQafDpuvMJ3v4joHoTXgPCtCJYHT9oZRrgLPBtgRNb%2B4UT3aH%2BOCAcMfd/oqsvIwmzDzNnxYrmJ11FCFhUMSVLGhXP2ZZKL3DS9oLJxQBZe5qT/mzok731mgoF9jnK%2BY2gZ%2BkWXYbhBXr6n1Ac3fJhnGIxh6Nku9s0NW0eU34GlPZ%2B/ + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGFmcm1jMms1eTd5Ynhwdzd0a2psaXpuM2RxM2xuZWg3N2YzdmZqaHVjbHRlM2Q3a2tzd2ZtfGNsaS10ZXN0LWt2LW1nbXQtcHpyaW0ybg== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3bjoIwAET/hZh9WqTgLZiYzRrFRbeaCLbat0KrlEJpKN4w/vuyyWSSk0zOvCzFH82vUNJY05e1/I7iQ2RNraxptJk6TkkVvfCSq6ZP22vN%2B2lVOuaamLQWuhGVMg5I3PN4OHFtNzkDe8gYtSlPB3aa%2BN7EOwN/5ANH19VNMF4bB4q0rkx1bvob/kT0WjTO7b/NV6%2Bp9Mz9oFrYt27ZyWcecH0bdHE/ekZ2j5Xkahbx%2BiZSPqeGs8%2B49K8kehCosjtebKNkBdtDSTJYnFyyclcQr8OOBfL2gCwZpt46RIoUCGgdY71jcvSzxZlASz2Ij3pDAWhRvs%2Bhd/FO%2BTqHchTuVZYlMXqesMYch0%2B4CIpEFmOM9QaugiPO5wUaXO5Esl3qBTGM5xQvh/c4YADKxxHikcBBALDMdqxE4SEnBWmBb73ffw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGtxbDZjbG11cDZmaWhpbnZ6dWJlYTd6ZzZ4eG9hc2U0YzRzaG1mN29odjdka3FyNmh0N2x1fGNsaS10ZXN0LWt2LW1nbXQteGJpZ2xncg== response: body: - string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY1ba8IwAIX%2fS5E9rTbpvFBBxpy20y0K9qZ5S9O4hlxamtRLx%2f77Ojgc%2bODjnB9Hs7v94loYZ%2fHjbN7iJI2dhVNZ25iF5ymiyTdTTNsx6buWjWmtPNMVhra8sbzWxgMFvMwmc%2bjC4gLcSVkSlzD64tIi8Of%2bBQTTAHhNW195yVrjIU7b2tQXO%2f5kj4x00nrX%2fzavI1s3S%2fhEGu5eB3MYX%2foABi4YAp9GRgyPtWB6GbP2yilbEcPK50QFHY7vGOnqlq%2f3cRGhPlW4QvIMcQQjlO%2b2A%2fPMPwK8oZBK8SBrLI59eDvrZsektEmyqpjcPs6gOpR%2bZtEJH5BM%2b4FrGu3STK9wcapuZzWNqdqnmZK4EE2P05KgaD%2fLlRRITAAW5YH6YYKSFck3k1sSlgCJ%2bwnlU56HIcjV9B3lWUc%2bMMc9CJzf3z8%3d"}' + string: '{"value":[],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdHNvNm90MnVlb2JnZDY3NnBkcjZnNnZ4ZDNieXdyajd2aGtseTJpN2E1bmxkeGIzM3J2M2V6fGNsaS10ZXN0LWt2LW1nbXQtNTI3Y21neQ=="}' headers: cache-control: no-cache - content-length: '784' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:50 GMT + date: Thu, 11 Nov 2021 03:24:43 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 2784ec2c-0847-4748-8651-779622198e7f + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3bjoIwAET/hZh9WqTgLZiYzRrFRbeaCLbat0KrlEJpKN4w/vuyyWSSk0zOvCzFH82vUNJY05e1/I7iQ2RNraxptJk6TkkVvfCSq6ZP22vN%2B2lVOuaamLQWuhGVMg5I3PN4OHFtNzkDe8gYtSlPB3aa%2BN7EOwN/5ANH19VNMF4bB4q0rkx1bvob/kT0WjTO7b/NV6%2Bp9Mz9oFrYt27ZyWcecH0bdHE/ekZ2j5Xkahbx%2BiZSPqeGs8%2B49K8kehCosjtebKNkBdtDSTJYnFyyclcQr8OOBfL2gCwZpt46RIoUCGgdY71jcvSzxZlASz2Ij3pDAWhRvs%2Bhd/FO%2BTqHchTuVZYlMXqesMYch0%2B4CIpEFmOM9QaugiPO5wUaXO5Esl3qBTGM5xQvh/c4YADKxxHikcBBALDMdqxE4SEnBWmBb73ffw%3D%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdGtxbDZjbG11cDZmaWhpbnZ6dWJlYTd6ZzZ4eG9hc2U0YzRzaG1mN29odjdka3FyNmh0N2x1fGNsaS10ZXN0LWt2LW1nbXQteGJpZ2xncg== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY1ba8IwAIX/S5E9rTbpvFBBxpy20y0K9qZ5S9O4hlxamtRLx/77Ojgc%2BODjnB9Hs7v94loYZ/HjbN7iJI2dhVNZ25iF5ymiyTdTTNsx6buWjWmtPNMVhra8sbzWxgMFvMwmc%2BjC4gLcSVkSlzD64tIi8Of%2BBQTTAHhNW195yVrjIU7b2tQXO/5kj4x00nrX/zavI1s3S/hEGu5eB3MYX/oABi4YAp9GRgyPtWB6GbP2yilbEcPK50QFHY7vGOnqlq/3cRGhPlW4QvIMcQQjlO%2B2A/PMPwK8oZBK8SBrLI59eDvrZsektEmyqpjcPs6gOpR%2BZtEJH5BM%2B4FrGu3STK9wcapuZzWNqdqnmZK4EE2P05KgaD/LlRRITAAW5YH6YYKSFck3k1sSlgCJ%2BwnlU56HIcjV9B3lWUc%2BMMc9CJzf3z8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdHNvNm90MnVlb2JnZDY3NnBkcjZnNnZ4ZDNieXdyajd2aGtseTJpN2E1bmxkeGIzM3J2M2V6fGNsaS10ZXN0LWt2LW1nbXQtNTI3Y21neQ== response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ljin-test/providers/Microsoft.KeyVault/vaults/kv-ljin-sni","name":"kv-ljin-sni","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"534bf52a-05a4-41bb-8ef5-b29577ee4c88","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"596c247a-9db0-4c20-8ddb-d944102067ac","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://kv-ljin-sni.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3dToMwAEbfpVl2ZWkL6AIJMZJITBQTAafzrpSiBfuTtjDmsncfJl%2fO1cn5zkDxxb8INTqQnsHjQ9281yAFP94blyIkqaLfXHLlA%2fo3WR4wLZGbWsesMF5o5RBuSX8X7wgkbY9h3HUUUs4iyNok3IU9Tm4TjIzVs%2bi4dagUzGqnex8889OeTr8ezf909xuvTUa21Ag4r%2bYaz0JMEojXke3GjeujHrnKam5nwXhOHe9uGplMX%2fUiqig%2fHuS4lIU5NEMuq%2bjt1BRdzD6Kz9enaiiH%2fRFcLlc%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/python-devops-key","name":"python-devops-key","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3835f2fd-0701-4221-8a47-a8298114e26d","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://python-devops-key.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/python-sdk-test/providers/Microsoft.KeyVault/vaults/SDKAutoPipelineSecrets","name":"SDKAutoPipelineSecrets","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"d4bf49da-3534-4b16-b774-0d091fb4b0bb","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}},{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3835f2fd-0701-4221-8a47-a8298114e26d","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://sdkautopipelinesecrets.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,cHl0aG9uLXNkay10ZXN0fFNES0F1dG9QaXBlbGluZVNlY3JldHM="}' headers: cache-control: no-cache - content-length: '1161' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:50 GMT + date: Thu, 11 Nov 2021 03:24:43 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 24f7ca18-1fb6-47c0-b06a-f2c180477ac6 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY1ba8IwAIX/S5E9rTbpvFBBxpy20y0K9qZ5S9O4hlxamtRLx/77Ojgc%2BODjnB9Hs7v94loYZ/HjbN7iJI2dhVNZ25iF5ymiyTdTTNsx6buWjWmtPNMVhra8sbzWxgMFvMwmc%2BjC4gLcSVkSlzD64tIi8Of%2BBQTTAHhNW195yVrjIU7b2tQXO/5kj4x00nrX/zavI1s3S/hEGu5eB3MYX/oABi4YAp9GRgyPtWB6GbP2yilbEcPK50QFHY7vGOnqlq/3cRGhPlW4QvIMcQQjlO%2B2A/PMPwK8oZBK8SBrLI59eDvrZsektEmyqpjcPs6gOpR%2BZtEJH5BM%2B4FrGu3STK9wcapuZzWNqdqnmZK4EE2P05KgaD/LlRRITAAW5YH6YYKSFck3k1sSlgCJ%2BwnlU56HIcjV9B3lWUc%2BMMc9CJzf3z8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Y2xpX3Rlc3Rfa2V5dmF1bHRfbWdtdHNvNm90MnVlb2JnZDY3NnBkcjZnNnZ4ZDNieXdyajd2aGtseTJpN2E1bmxkeGIzM3J2M2V6fGNsaS10ZXN0LWt2LW1nbXQtNTI3Y21neQ== - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3dToMwAEbfpVl2ZWkL6AIJMZJITBQTAafzrpSiBfuTtjDmsncfJl/O1cn5zkDxxb8INTqQnsHjQ9281yAFP94blyIkqaLfXHLlA/o3WR4wLZGbWsesMF5o5RBuSX8X7wgkbY9h3HUUUs4iyNok3IU9Tm4TjIzVs%2Bi4dagUzGqnex8889OeTr8ezf909xuvTUa21Ag4r%2BYaz0JMEojXke3GjeujHrnKam5nwXhOHe9uGplMX/Uiqig/HuS4lIU5NEMuq%2Bjt1BRdzD6Kz9enaiiH/RFcLlc%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,cHl0aG9uLXNkay10ZXN0fFNES0F1dG9QaXBlbGluZVNlY3JldHM= response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3RaoMwGEbfJZReLSZxriWCjBXmLjavtIK9i8nvllmTkERxK333Ofg4V4fz3ZCBNX5oMwaU39DrS92ca5SjrxhdyAmZhBGfMIGJifidPSTSTiTMfZBeu6itCYT2bDhkR4ZZP1CcKSWwAPmIZc%2fTYzpQ%2fsQpcd4uWoEPpNLS22CHmLzDTyvmayTLP8PzLlpXsL1wGi%2bbucWLlDKO6Ta234Vxe7QjmKIGv2gJJxFAPTQTny%2f1em3T9dCdVahK1zXfp6kunb2UKqve2q5paIHu9z8%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","accessPolicies":[{"tenantId":"72f988bf-86f1-41af-91ab-2d7cd011db47","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yishitest/providers/Microsoft.KeyVault/vaults/ystestkv","name":"ystestkv","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"3707fb2f-ac10-4591-a04f-8b0d786ea37d","permissions":{"keys":["get","recover","backup","update","purge","wrapKey","decrypt","restore","import","unwrapKey","rotate","create","delete","list","encrypt","sign","release","verify"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore","Purge"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers","Purge"],"storage":["get","list","delete","set","update","regeneratekey","setsas","listsas","getsas","deletesas"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"vaultUri":"https://ystestkv.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,eWlzaGl0ZXN0fHlzdGVzdGt2"}' headers: cache-control: no-cache - content-length: '1154' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:50 GMT + date: Thu, 11 Nov 2021 03:24:43 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 7a9c01df-29b7-4382-b533-4c9ea83e2e52 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3dToMwAEbfpVl2ZWkL6AIJMZJITBQTAafzrpSiBfuTtjDmsncfJl/O1cn5zkDxxb8INTqQnsHjQ9281yAFP94blyIkqaLfXHLlA/o3WR4wLZGbWsesMF5o5RBuSX8X7wgkbY9h3HUUUs4iyNok3IU9Tm4TjIzVs%2Bi4dagUzGqnex8889OeTr8ezf909xuvTUa21Ag4r%2BYaz0JMEojXke3GjeujHrnKam5nwXhOHe9uGplMX/Uiqig/HuS4lIU5NEMuq%2Bjt1BRdzD6Kz9enaiiH/RFcLlc%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,cHl0aG9uLXNkay10ZXN0fFNES0F1dG9QaXBlbGluZVNlY3JldHM= - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3RaoMwGEbfJZReLSZxriWCjBXmLjavtIK9i8nvllmTkERxK333Ofg4V4fz3ZCBNX5oMwaU39DrS92ca5SjrxhdyAmZhBGfMIGJifidPSTSTiTMfZBeu6itCYT2bDhkR4ZZP1CcKSWwAPmIZc/TYzpQ/sQpcd4uWoEPpNLS22CHmLzDTyvmayTLP8PzLlpXsL1wGi%2BbucWLlDKO6Ta234Vxe7QjmKIGv2gJJxFAPTQTny/1em3T9dCdVahK1zXfp6kunb2UKqve2q5paIHu9z8%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,eWlzaGl0ZXN0fHlzdGVzdGt2 response: body: string: '{"value":[]}' headers: cache-control: no-cache - content-length: '133' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:50 GMT + date: Thu, 11 Nov 2021 03:24:43 GMT expires: '-1' pragma: no-cache + server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked vary: Accept-Encoding + x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-original-request-ids: 41a9c461-3b45-494b-97f0-afeffd3f5890 + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3RaoMwGEbfJZReLSZxriWCjBXmLjavtIK9i8nvllmTkERxK333Ofg4V4fz3ZCBNX5oMwaU39DrS92ca5SjrxhdyAmZhBGfMIGJifidPSTSTiTMfZBeu6itCYT2bDhkR4ZZP1CcKSWwAPmIZc/TYzpQ/sQpcd4uWoEPpNLS22CHmLzDTyvmayTLP8PzLlpXsL1wGi%2BbucWLlDKO6Ta234Vxe7QjmKIGv2gJJxFAPTQTny/1em3T9dCdVahK1zXfp6kunb2UKqve2q5paIHu9z8%3D + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,eWlzaGl0ZXN0fHlzdGVzdGt2 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/providers/Microsoft.KeyVault/operations?api-version=2019-09-01 @@ -3104,7 +3136,7 @@ interactions: headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:51 GMT + date: Thu, 11 Nov 2021 03:24:44 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -3113,7 +3145,7 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.79.0 + x-ms-keyvault-service-version: 1.5.166.0 x-powered-by: ASP.NET status: code: 200 @@ -3129,7 +3161,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 @@ -3139,7 +3171,7 @@ interactions: headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:51 GMT + date: Thu, 11 Nov 2021 03:24:44 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -3148,13 +3180,13 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-ms-ratelimit-remaining-subscription-writes: '1198' x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-7lyvyztmydsugni7jmvaz3a5pqb6n7qvzpc33nalbgnmsiwfg67q7fc25j4s3m4bhpz2iqlcmcm/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-oki3vdpuzsrlp2drr44bzadzf73hamdbsfuzosnrblog3xllclxo636zsuxtu2x6m74ywduzjaq/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: '{"name": "sample-vault", "type": "Microsoft.KeyVault/vaults"}' headers: @@ -3165,7 +3197,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/checkNameAvailability?api-version=2019-09-01 @@ -3182,7 +3214,7 @@ interactions: headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:51 GMT + date: Thu, 11 Nov 2021 03:24:44 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -3191,7 +3223,7 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.79.0 + x-ms-keyvault-service-version: 1.5.166.0 x-powered-by: ASP.NET status: code: 200 @@ -3203,7 +3235,7 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 @@ -3213,37 +3245,37 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 26 Aug 2021 05:41:54 GMT + date: Thu, 11 Nov 2021 03:24:48 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-ms-ratelimit-remaining-subscription-deletes: '14999' x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-7lyvyztmydsugni7jmvaz3a5pqb6n7qvzpc33nalbgnmsiwfg67q7fc25j4s3m4bhpz2iqlcmcm/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-oki3vdpuzsrlp2drr44bzadzf73hamdbsfuzosnrblog3xllclxo636zsuxtu2x6m74ywduzjaq/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxyzz?api-version=2019-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","location":"eastus","tags":{},"deletionDate":"2021-08-26T05:41:52Z","scheduledPurgeDate":"2021-11-24T05:41:52Z"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","location":"eastus","tags":{},"deletionDate":"2021-11-11T03:24:45Z","scheduledPurgeDate":"2022-02-09T03:24:45Z"}}' headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:41:54 GMT + date: Thu, 11 Nov 2021 03:24:49 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -3252,7 +3284,7 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-powered-by: ASP.NET status: code: 200 @@ -3264,7 +3296,7 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxyzz/purge?api-version=2019-09-01 @@ -3274,15 +3306,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Thu, 26 Aug 2021 05:41:55 GMT + date: Thu, 11 Nov 2021 03:24:49 GMT expires: '-1' - location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMzE2NjEyODQyNnw2NzU1RjVFNDM0OUE0OUE2QkJCMEZGNDU0OTg2NjE4OA?api-version=2019-09-01 + location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 pragma: no-cache server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-ms-ratelimit-remaining-subscription-writes: '1199' x-powered-by: ASP.NET status: @@ -3293,47 +3325,105 @@ interactions: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 + response: + body: + string: '{"createdDateTime":"2021-11-11 03:24:49Z","status":"NotStarted"}' + headers: + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Thu, 11 Nov 2021 03:24:54 GMT + expires: '-1' + location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000; includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET + status: + code: 202 + message: Accepted + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 +- request: + body: null + headers: + User-Agent: + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 + response: + body: + string: '{"createdDateTime":"2021-11-11 03:24:49Z","status":"NotStarted"}' + headers: + cache-control: no-cache + content-length: '64' + content-type: application/json; charset=utf-8 + date: Thu, 11 Nov 2021 03:24:59 GMT + expires: '-1' + location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 + pragma: no-cache + server: Microsoft-IIS/10.0 + strict-transport-security: max-age=31536000; includeSubDomains + x-aspnet-version: 4.0.30319 + x-content-type-options: nosniff + x-ms-keyvault-service-version: 1.5.166.0 + x-powered-by: ASP.NET + status: + code: 202 + message: Accepted + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 +- request: + body: null + headers: + User-Agent: + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMzE2NjEyODQyNnw2NzU1RjVFNDM0OUE0OUE2QkJCMEZGNDU0OTg2NjE4OA?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 response: body: - string: '{"createdDateTime":"2021-08-26 05:41:55Z","status":"NotStarted"}' + string: '{"createdDateTime":"2021-11-11 03:24:49Z","status":"NotStarted"}' headers: cache-control: no-cache content-length: '64' content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:42:00 GMT + date: Thu, 11 Nov 2021 03:25:04 GMT expires: '-1' - location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMzE2NjEyODQyNnw2NzU1RjVFNDM0OUE0OUE2QkJCMEZGNDU0OTg2NjE4OA?api-version=2019-09-01 + location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 pragma: no-cache server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-powered-by: ASP.NET status: code: 202 message: Accepted - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMzE2NjEyODQyNnw2NzU1RjVFNDM0OUE0OUE2QkJCMEZGNDU0OTg2NjE4OA?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 - request: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-keyvault/9.1.0 Python/3.8.11 (Linux-5.8.0-1039-azure-x86_64-with-glibc2.2.5) + - azsdk-python-azure-mgmt-keyvault/0.0.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMzE2NjEyODQyNnw2NzU1RjVFNDM0OUE0OUE2QkJCMEZGNDU0OTg2NjE4OA?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 response: body: - string: '{"createdDateTime":"2021-08-26 05:41:55Z","lastActionDateTime":"2021-08-26 - 05:42:02Z","status":"Succeeded"}' + string: '{"createdDateTime":"2021-11-11 03:24:49Z","lastActionDateTime":"2021-11-11 + 03:25:04Z","status":"Succeeded"}' headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Thu, 26 Aug 2021 05:42:06 GMT + date: Thu, 11 Nov 2021 03:25:09 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -3342,10 +3432,10 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.5.99.0 + x-ms-keyvault-service-version: 1.5.166.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzY1NTUzMzE2NjEyODQyNnw2NzU1RjVFNDM0OUE0OUE2QkJCMEZGNDU0OTg2NjE4OA?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzcyMTk3ODkwMzE0NDExM3w3OTc1RjQ2NDQ5NTY0Mjk1QjgyODk4MERBN0ZCMjJFMA?api-version=2019-09-01 version: 1 diff --git a/sdk/keyvault/test-resources.json b/sdk/keyvault/test-resources.json index 9268e5237874..42a06ca6b649 100644 --- a/sdk/keyvault/test-resources.json +++ b/sdk/keyvault/test-resources.json @@ -86,6 +86,13 @@ "metadata": { "description": "Test attestation service for Secure Key Release." } + }, + "storageEndpointSuffix": { + "type": "string", + "defaultValue": "core.windows.net", + "metadata": { + "description": "The url suffix to use when accessing the storage data plane." + } } }, "variables": { @@ -145,7 +152,8 @@ "verify", "sign", "purge", - "rotate" + "rotate", + "release" ], "secrets": [ "get", @@ -272,6 +280,10 @@ "type": "string", "value": "[parameters('testApplicationOid')]" }, + "KEYVAULT_STORAGE_ENDPOINT_SUFFIX": { + "type": "string", + "value": "[parameters('storageEndpointSuffix')]" + }, "BLOB_STORAGE_ACCOUNT_NAME": { "type": "string", "value": "[variables('primaryAccountName')]" diff --git a/sdk/keyvault/tests.yml b/sdk/keyvault/tests.yml index dc3c3eb24f37..9dad181188ea 100644 --- a/sdk/keyvault/tests.yml +++ b/sdk/keyvault/tests.yml @@ -16,8 +16,6 @@ stages: ServiceDirectory: keyvault BuildTargetingString: ${{ service }} JobName: ${{ replace(service, '-', '_') }} - DeployArmTemplate: true - AllocateResourceGroup: true TestTimeoutInMinutes: 240 ${{ if or(eq(service, 'azure-keyvault-keys'), eq(service, 'azure-keyvault-administration')) }}: AdditionalMatrixConfigs: diff --git a/sdk/loganalytics/azure-loganalytics/CHANGELOG.md b/sdk/loganalytics/azure-loganalytics/CHANGELOG.md index d4d5d933d901..547f453d30ba 100644 --- a/sdk/loganalytics/azure-loganalytics/CHANGELOG.md +++ b/sdk/loganalytics/azure-loganalytics/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 0.1.1 (2021-11-11) + +* This package is no longer maintained. Please use https://pypi.org/project/azure-monitor-query/ + ## 0.1.0 (2018-07-11) -* Initial Release \ No newline at end of file +* Initial Release diff --git a/sdk/loganalytics/azure-loganalytics/README.md b/sdk/loganalytics/azure-loganalytics/README.md index d231fe63faa4..a05c070ddfde 100644 --- a/sdk/loganalytics/azure-loganalytics/README.md +++ b/sdk/loganalytics/azure-loganalytics/README.md @@ -1,40 +1,7 @@ ## Microsoft Azure SDK for Python -This is the Microsoft Azure Log Analytics Client Library. +This package is no longer being maintained. Please use our latest package [azure-monitor-query](https://pypi.org/project/azure-monitor-query/). -This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. - -For a more complete set of Azure libraries, see the -[azure sdk python release](https://aka.ms/azsdk/python/all). - -## Compatibility - -**IMPORTANT**: If you have an earlier version of the azure package -(version < 1.0), you should uninstall it before installing this -package. - -You can check the version using pip: - -``` shell -pip freeze -``` - -If you see azure==0.11.0 (or any version below 1.0), uninstall it first: - -``` shell -pip uninstall azure -``` - -## Usage - -For code examples, see [Log -Analytics](https://docs.microsoft.com/python/api/overview/azure/) on -docs.microsoft.com. - -## Provide Feedback - -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) -section of the project. +A [migration guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/migration_guide.md) has been provided for the same. ![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-loganalytics%2FREADME.png) diff --git a/sdk/loganalytics/azure-loganalytics/azure/loganalytics/version.py b/sdk/loganalytics/azure-loganalytics/azure/loganalytics/version.py index e0ec669828cb..e7efe25ea7e0 100644 --- a/sdk/loganalytics/azure-loganalytics/azure/loganalytics/version.py +++ b/sdk/loganalytics/azure-loganalytics/azure/loganalytics/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.1.0" +VERSION = "0.1.1" diff --git a/sdk/loganalytics/azure-loganalytics/sdk_packaging.toml b/sdk/loganalytics/azure-loganalytics/sdk_packaging.toml index 9410fbbee7ea..ac9c3cd82c76 100644 --- a/sdk/loganalytics/azure-loganalytics/sdk_packaging.toml +++ b/sdk/loganalytics/azure-loganalytics/sdk_packaging.toml @@ -4,3 +4,5 @@ package_pprint_name = "Log Analytics" package_doc_id = "" is_stable = false is_arm = false +auto_update = false +need_msrestazure = false diff --git a/sdk/loganalytics/azure-loganalytics/setup.py b/sdk/loganalytics/azure-loganalytics/setup.py index df3f83686695..498791463a7b 100644 --- a/sdk/loganalytics/azure-loganalytics/setup.py +++ b/sdk/loganalytics/azure-loganalytics/setup.py @@ -59,7 +59,7 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + 'Development Status :: 7 - Inactive', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/sdk/mixedreality/azure-mixedreality-authentication/CHANGELOG.md b/sdk/mixedreality/azure-mixedreality-authentication/CHANGELOG.md index 11533387e830..65176bd87245 100644 --- a/sdk/mixedreality/azure-mixedreality-authentication/CHANGELOG.md +++ b/sdk/mixedreality/azure-mixedreality-authentication/CHANGELOG.md @@ -1,5 +1,7 @@ # Release History -## 1.0.0b1 (Unreleased) +## 1.0.0b1 (2021-11-12) -- Initial release. +### Features Added + +- Initial release with support for authenticating with Mixed Reality services. diff --git a/sdk/mixedreality/tests.yml b/sdk/mixedreality/tests.yml index c630efffdeff..458762a8a3ee 100644 --- a/sdk/mixedreality/tests.yml +++ b/sdk/mixedreality/tests.yml @@ -3,12 +3,10 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: mixedreality - DeployArmTemplate: true Location: eastus2 EnvVars: AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - TEST_MODE: 'RunLiveNoRecord' \ No newline at end of file + TEST_MODE: 'RunLiveNoRecord' diff --git a/sdk/modelsrepository/tests.yml b/sdk/modelsrepository/tests.yml index 1966f9c2342d..7d831c6449af 100644 --- a/sdk/modelsrepository/tests.yml +++ b/sdk/modelsrepository/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: 'false' ServiceDirectory: modelsrepository EnvVars: TEST_MODE: 'RunLiveNoRecord' diff --git a/sdk/monitor/azure-mgmt-monitor/CHANGELOG.md b/sdk/monitor/azure-mgmt-monitor/CHANGELOG.md index eb038de11f5b..2c0679083a7a 100644 --- a/sdk/monitor/azure-mgmt-monitor/CHANGELOG.md +++ b/sdk/monitor/azure-mgmt-monitor/CHANGELOG.md @@ -1,5 +1,119 @@ # Release History +## 3.0.0 (2021-11-05) + +**Features** + + - Model LogAnalyticsDestination has a new parameter workspace_id + - Model LogSettings has a new parameter category_group + - Model Baseline has a new parameter timestamps + - Model Baseline has a new parameter error_type + - Model Baseline has a new parameter prediction_result_type + - Model Metric has a new parameter error_message + - Model Metric has a new parameter error_code + - Model Metric has a new parameter display_description + - Model ManagementGroupDiagnosticSettingsResource has a new parameter system_data + - Model ManagementGroupDiagnosticSettingsResource has a new parameter marketplace_partner_id + - Model DataCollectionRuleAssociationProxyOnlyResourceProperties has a new parameter data_collection_endpoint_id + - Model SubscriptionDiagnosticSettingsResource has a new parameter system_data + - Model SubscriptionDiagnosticSettingsResource has a new parameter marketplace_partner_id + - Model TimeSeriesBaseline has a new parameter metadata_values + - Model DataCollectionRuleAssociationProxyOnlyResource has a new parameter system_data + - Model DataCollectionRuleAssociationProxyOnlyResource has a new parameter data_collection_endpoint_id + - Model CalculateBaselineResponse has a new parameter internal_operation_id + - Model CalculateBaselineResponse has a new parameter statistics + - Model CalculateBaselineResponse has a new parameter error_type + - Model DataCollectionRule has a new parameter immutable_id + - Model AlertRuleResourcePatch has a new parameter provisioning_state + - Model AlertRuleResourcePatch has a new parameter action + - Model OperationDisplay has a new parameter description + - Model OperationDisplay has a new parameter publisher + - Model ManagementGroupLogSettings has a new parameter category_group + - Model SubscriptionLogSettings has a new parameter category_group + - Model DiagnosticSettingsCategoryResource has a new parameter system_data + - Model DiagnosticSettingsCategoryResource has a new parameter category_groups + - Model BaselineResponse has a new parameter internal_operation_id + - Model BaselineResponse has a new parameter metdata + - Model BaselineResponse has a new parameter error_type + - Model BaselineResponse has a new parameter prediction_result_type + - Model ActionGroupResource has a new parameter event_hub_receivers + - Model ActionGroupResource has a new parameter kind + - Model ActionGroupResource has a new parameter identity + - Model AutoscaleSettingResource has a new parameter system_data + - Model AutoscaleSettingResource has a new parameter predictive_autoscale_policy + - Model AutoscaleSettingResource has a new parameter target_resource_location + - Model ScheduledQueryRuleResourcePatch has a new parameter is_legacy_log_analytics_rule + - Model ScheduledQueryRuleResourcePatch has a new parameter override_query_time_range + - Model ScheduledQueryRuleResourcePatch has a new parameter display_name + - Model ScheduledQueryRuleResourcePatch has a new parameter created_with_api_version + - Model ExtensionDataSource has a new parameter input_data_sources + - Model LogSearchRuleResource has a new parameter created_with_api_version + - Model LogSearchRuleResource has a new parameter kind + - Model LogSearchRuleResource has a new parameter auto_mitigate + - Model LogSearchRuleResource has a new parameter display_name + - Model LogSearchRuleResource has a new parameter etag + - Model LogSearchRuleResource has a new parameter is_legacy_log_analytics_rule + - Model AutoscaleSettingResourcePatch has a new parameter predictive_autoscale_policy + - Model AutoscaleSettingResourcePatch has a new parameter target_resource_location + - Model RuleDataSource has a new parameter resource_location + - Model RuleDataSource has a new parameter metric_namespace + - Model RuleDataSource has a new parameter legacy_resource_id + - Model AlertRuleResource has a new parameter provisioning_state + - Model AlertRuleResource has a new parameter action + - Model Operation has a new parameter service_specification + - Model Operation has a new parameter is_data_action + - Model MetricDefinition has a new parameter metric_class + - Model MetricDefinition has a new parameter category + - Model MetricDefinition has a new parameter display_description + - Model DataCollectionRuleAssociation has a new parameter data_collection_endpoint_id + - Model MetricTrigger has a new parameter metric_resource_location + - Model MetricTrigger has a new parameter divide_per_instance + - Model MetricAlertResource has a new parameter is_migrated + - Model RuleManagementEventDataSource has a new parameter resource_location + - Model RuleManagementEventDataSource has a new parameter metric_namespace + - Model RuleManagementEventDataSource has a new parameter legacy_resource_id + - Model MetricAlertResourcePatch has a new parameter is_migrated + - Model ScheduledQueryRuleResource has a new parameter created_with_api_version + - Model ScheduledQueryRuleResource has a new parameter kind + - Model ScheduledQueryRuleResource has a new parameter etag + - Model ScheduledQueryRuleResource has a new parameter display_name + - Model ScheduledQueryRuleResource has a new parameter is_legacy_log_analytics_rule + - Model ScheduledQueryRuleResource has a new parameter override_query_time_range + - Model RuleMetricDataSource has a new parameter resource_location + - Model RuleMetricDataSource has a new parameter metric_namespace + - Model RuleMetricDataSource has a new parameter legacy_resource_id + - Model DiagnosticSettingsResource has a new parameter system_data + - Model DiagnosticSettingsResource has a new parameter marketplace_partner_id + - Model MetricNamespace has a new parameter classification + - Model DataCollectionRuleResource has a new parameter system_data + - Model DataCollectionRuleResource has a new parameter immutable_id + - Model DataCollectionRuleResource has a new parameter kind + - Model DataCollectionRuleResourceProperties has a new parameter immutable_id + - Added operation ActionGroupsOperations.begin_post_test_notifications + - Added operation ActionGroupsOperations.get_test_notifications + - Added operation group PredictiveMetricOperations + - Added operation group DataCollectionEndpointsOperations + +**Breaking changes** + + - Parameter scopes of model MetricAlertResource is now required + - Operation ActivityLogAlertsOperations.update has a new signature + - Operation ActivityLogAlertsOperations.create_or_update has a new signature + - Operation SubscriptionDiagnosticSettingsOperations.list has a new signature + - Operation SubscriptionDiagnosticSettingsOperations.get has a new signature + - Operation SubscriptionDiagnosticSettingsOperations.delete has a new signature + - Operation SubscriptionDiagnosticSettingsOperations.create_or_update has a new signature + - Model PerfCounterDataSource no longer has parameter scheduled_transfer_period + - Model ManagementGroupDiagnosticSettingsResource no longer has parameter location + - Model SubscriptionDiagnosticSettingsResource no longer has parameter location + - Model TimeSeriesBaseline no longer has parameter metadata + - Model ErrorResponse no longer has parameter target + - Model ErrorResponse no longer has parameter details + - Model ErrorResponse no longer has parameter additional_info + - Model WindowsEventLogDataSource no longer has parameter scheduled_transfer_period + - Model BaselineResponse no longer has parameter metadata + + ## 2.0.0 (2020-12-25) **Breaking changes** diff --git a/sdk/monitor/azure-mgmt-monitor/MANIFEST.in b/sdk/monitor/azure-mgmt-monitor/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/monitor/azure-mgmt-monitor/MANIFEST.in +++ b/sdk/monitor/azure-mgmt-monitor/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/monitor/azure-mgmt-monitor/_meta.json b/sdk/monitor/azure-mgmt-monitor/_meta.json new file mode 100644 index 000000000000..f0638d534bd2 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "a81eaccc23c98d2effd62f1a80b81394be30d2c5", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/monitor/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/monitor/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_configuration.py index c8e55e109fc6..3805e3b3d057 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_configuration.py @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,11 @@ from ._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -25,7 +30,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py index f92fe821ee92..3dcd1e009c20 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_monitor_management_client.py @@ -9,13 +9,22 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import ARMPipelineClient -from msrest import Serializer, Deserializer +from typing import TYPE_CHECKING +from azure.mgmt.core import ARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import MonitorManagementClientConfiguration +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -36,45 +45,55 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2019-10-17-preview' + DEFAULT_API_VERSION = '2021-09-01' _PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'action_groups': '2019-06-01', - 'activity_log_alerts': '2017-04-01', + 'activity_log_alerts': '2020-10-01', 'activity_logs': '2015-04-01', 'alert_rule_incidents': '2016-03-01', 'alert_rules': '2016-03-01', 'autoscale_settings': '2015-04-01', 'baseline': '2018-09-01', 'baselines': '2019-03-01', - 'diagnostic_settings': '2017-05-01-preview', - 'diagnostic_settings_category': '2017-05-01-preview', + 'data_collection_endpoints': '2021-04-01', + 'data_collection_rule_associations': '2021-04-01', + 'data_collection_rules': '2021-04-01', + 'diagnostic_settings': '2021-05-01-preview', + 'diagnostic_settings_category': '2021-05-01-preview', 'event_categories': '2015-04-01', 'guest_diagnostics_settings': '2018-06-01-preview', 'guest_diagnostics_settings_association': '2018-06-01-preview', 'log_profiles': '2016-03-01', + 'management_group_diagnostic_settings': '2021-05-01-preview', 'metric_alerts': '2018-03-01', 'metric_alerts_status': '2018-03-01', 'metric_baseline': '2018-09-01', 'metric_definitions': '2018-01-01', 'metric_namespaces': '2017-12-01-preview', 'metrics': '2018-01-01', - 'operations': '2015-04-01', + 'operations': '2015-07-01', + 'predictive_metric': '2021-05-01-preview', + 'private_endpoint_connections': '2019-10-17-preview', + 'private_link_resources': '2019-10-17-preview', + 'private_link_scope_operation_status': '2019-10-17-preview', + 'private_link_scoped_resources': '2019-10-17-preview', + 'private_link_scopes': '2019-10-17-preview', 'scheduled_query_rules': '2018-04-16', 'service_diagnostic_settings': '2016-09-01', - 'subscription_diagnostic_settings': '2017-05-01-preview', + 'subscription_diagnostic_settings': '2021-05-01-preview', 'tenant_activity_logs': '2015-04-01', 'vm_insights': '2018-11-27-preview', }}, @@ -85,9 +104,9 @@ def __init__( self, credential, # type: "TokenCredential" subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + api_version=None, # type: Optional[str] + base_url=None, # type: Optional[str] + profile=KnownProfiles.default, # type: KnownProfiles **kwargs # type: Any ): if not base_url: @@ -128,6 +147,10 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-11-01-preview: :mod:`v2019_11_01_preview.models` * 2020-01-01-preview: :mod:`v2020_01_01_preview.models` * 2020-05-01-preview: :mod:`v2020_05_01_preview.models` + * 2020-10-01: :mod:`v2020_10_01.models` + * 2021-04-01: :mod:`v2021_04_01.models` + * 2021-05-01-preview: :mod:`v2021_05_01_preview.models` + * 2021-09-01: :mod:`v2021_09_01.models` """ if api_version == '2015-04-01': from .v2015_04_01 import models @@ -192,6 +215,18 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-05-01-preview': from .v2020_05_01_preview import models return models + elif api_version == '2020-10-01': + from .v2020_10_01 import models + return models + elif api_version == '2021-04-01': + from .v2021_04_01 import models + return models + elif api_version == '2021-05-01-preview': + from .v2021_05_01_preview import models + return models + elif api_version == '2021-09-01': + from .v2021_09_01 import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -203,6 +238,7 @@ def action_groups(self): * 2018-09-01: :class:`ActionGroupsOperations` * 2019-03-01: :class:`ActionGroupsOperations` * 2019-06-01: :class:`ActionGroupsOperations` + * 2021-09-01: :class:`ActionGroupsOperations` """ api_version = self._get_api_version('action_groups') if api_version == '2017-04-01': @@ -215,6 +251,8 @@ def action_groups(self): from .v2019_03_01.operations import ActionGroupsOperations as OperationClass elif api_version == '2019-06-01': from .v2019_06_01.operations import ActionGroupsOperations as OperationClass + elif api_version == '2021-09-01': + from .v2021_09_01.operations import ActionGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'action_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -225,12 +263,15 @@ def activity_log_alerts(self): * 2017-03-01-preview: :class:`ActivityLogAlertsOperations` * 2017-04-01: :class:`ActivityLogAlertsOperations` + * 2020-10-01: :class:`ActivityLogAlertsOperations` """ api_version = self._get_api_version('activity_log_alerts') if api_version == '2017-03-01-preview': from .v2017_03_01_preview.operations import ActivityLogAlertsOperations as OperationClass elif api_version == '2017-04-01': from .v2017_04_01.operations import ActivityLogAlertsOperations as OperationClass + elif api_version == '2020-10-01': + from .v2020_10_01.operations import ActivityLogAlertsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'activity_log_alerts'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -265,10 +306,16 @@ def alert_rule_incidents(self): def alert_rules(self): """Instance depends on the API version: + * 2015-04-01: :class:`AlertRulesOperations` + * 2015-07-01: :class:`AlertRulesOperations` * 2016-03-01: :class:`AlertRulesOperations` """ api_version = self._get_api_version('alert_rules') - if api_version == '2016-03-01': + if api_version == '2015-04-01': + from .v2015_04_01.operations import AlertRulesOperations as OperationClass + elif api_version == '2015-07-01': + from .v2015_07_01.operations import AlertRulesOperations as OperationClass + elif api_version == '2016-03-01': from .v2016_03_01.operations import AlertRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'alert_rules'".format(api_version)) @@ -279,10 +326,13 @@ def autoscale_settings(self): """Instance depends on the API version: * 2015-04-01: :class:`AutoscaleSettingsOperations` + * 2021-05-01-preview: :class:`AutoscaleSettingsOperations` """ api_version = self._get_api_version('autoscale_settings') if api_version == '2015-04-01': from .v2015_04_01.operations import AutoscaleSettingsOperations as OperationClass + elif api_version == '2021-05-01-preview': + from .v2021_05_01_preview.operations import AutoscaleSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'autoscale_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -313,15 +363,31 @@ def baselines(self): raise ValueError("API version {} does not have operation group 'baselines'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def data_collection_endpoints(self): + """Instance depends on the API version: + + * 2021-04-01: :class:`DataCollectionEndpointsOperations` + """ + api_version = self._get_api_version('data_collection_endpoints') + if api_version == '2021-04-01': + from .v2021_04_01.operations import DataCollectionEndpointsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'data_collection_endpoints'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def data_collection_rule_associations(self): """Instance depends on the API version: * 2019-11-01-preview: :class:`DataCollectionRuleAssociationsOperations` + * 2021-04-01: :class:`DataCollectionRuleAssociationsOperations` """ api_version = self._get_api_version('data_collection_rule_associations') if api_version == '2019-11-01-preview': from .v2019_11_01_preview.operations import DataCollectionRuleAssociationsOperations as OperationClass + elif api_version == '2021-04-01': + from .v2021_04_01.operations import DataCollectionRuleAssociationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'data_collection_rule_associations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -331,10 +397,13 @@ def data_collection_rules(self): """Instance depends on the API version: * 2019-11-01-preview: :class:`DataCollectionRulesOperations` + * 2021-04-01: :class:`DataCollectionRulesOperations` """ api_version = self._get_api_version('data_collection_rules') if api_version == '2019-11-01-preview': from .v2019_11_01_preview.operations import DataCollectionRulesOperations as OperationClass + elif api_version == '2021-04-01': + from .v2021_04_01.operations import DataCollectionRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'data_collection_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -344,10 +413,13 @@ def diagnostic_settings(self): """Instance depends on the API version: * 2017-05-01-preview: :class:`DiagnosticSettingsOperations` + * 2021-05-01-preview: :class:`DiagnosticSettingsOperations` """ api_version = self._get_api_version('diagnostic_settings') if api_version == '2017-05-01-preview': from .v2017_05_01_preview.operations import DiagnosticSettingsOperations as OperationClass + elif api_version == '2021-05-01-preview': + from .v2021_05_01_preview.operations import DiagnosticSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'diagnostic_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -357,10 +429,13 @@ def diagnostic_settings_category(self): """Instance depends on the API version: * 2017-05-01-preview: :class:`DiagnosticSettingsCategoryOperations` + * 2021-05-01-preview: :class:`DiagnosticSettingsCategoryOperations` """ api_version = self._get_api_version('diagnostic_settings_category') if api_version == '2017-05-01-preview': from .v2017_05_01_preview.operations import DiagnosticSettingsCategoryOperations as OperationClass + elif api_version == '2021-05-01-preview': + from .v2021_05_01_preview.operations import DiagnosticSettingsCategoryOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'diagnostic_settings_category'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -422,10 +497,13 @@ def management_group_diagnostic_settings(self): """Instance depends on the API version: * 2020-01-01-preview: :class:`ManagementGroupDiagnosticSettingsOperations` + * 2021-05-01-preview: :class:`ManagementGroupDiagnosticSettingsOperations` """ api_version = self._get_api_version('management_group_diagnostic_settings') if api_version == '2020-01-01-preview': from .v2020_01_01_preview.operations import ManagementGroupDiagnosticSettingsOperations as OperationClass + elif api_version == '2021-05-01-preview': + from .v2021_05_01_preview.operations import ManagementGroupDiagnosticSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'management_group_diagnostic_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -476,12 +554,15 @@ def metric_baseline(self): def metric_definitions(self): """Instance depends on the API version: + * 2015-07-01: :class:`MetricDefinitionsOperations` * 2016-03-01: :class:`MetricDefinitionsOperations` * 2017-05-01-preview: :class:`MetricDefinitionsOperations` * 2018-01-01: :class:`MetricDefinitionsOperations` """ api_version = self._get_api_version('metric_definitions') - if api_version == '2016-03-01': + if api_version == '2015-07-01': + from .v2015_07_01.operations import MetricDefinitionsOperations as OperationClass + elif api_version == '2016-03-01': from .v2016_03_01.operations import MetricDefinitionsOperations as OperationClass elif api_version == '2017-05-01-preview': from .v2017_05_01_preview.operations import MetricDefinitionsOperations as OperationClass @@ -528,14 +609,30 @@ def operations(self): """Instance depends on the API version: * 2015-04-01: :class:`Operations` + * 2015-07-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2015-04-01': from .v2015_04_01.operations import Operations as OperationClass + elif api_version == '2015-07-01': + from .v2015_07_01.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def predictive_metric(self): + """Instance depends on the API version: + + * 2021-05-01-preview: :class:`PredictiveMetricOperations` + """ + api_version = self._get_api_version('predictive_metric') + if api_version == '2021-05-01-preview': + from .v2021_05_01_preview.operations import PredictiveMetricOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'predictive_metric'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def private_endpoint_connections(self): """Instance depends on the API version: @@ -638,10 +735,13 @@ def subscription_diagnostic_settings(self): """Instance depends on the API version: * 2017-05-01-preview: :class:`SubscriptionDiagnosticSettingsOperations` + * 2021-05-01-preview: :class:`SubscriptionDiagnosticSettingsOperations` """ api_version = self._get_api_version('subscription_diagnostic_settings') if api_version == '2017-05-01-preview': from .v2017_05_01_preview.operations import SubscriptionDiagnosticSettingsOperations as OperationClass + elif api_version == '2021-05-01-preview': + from .v2021_05_01_preview.operations import SubscriptionDiagnosticSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'subscription_diagnostic_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py index 48944bf3938a..cac9f5d10f8b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_configuration.py index 89560205ad29..ef0b2052527f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_configuration.py @@ -8,7 +8,7 @@ # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies @@ -16,6 +16,9 @@ from .._version import VERSION +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -25,14 +28,14 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str + credential: "AsyncTokenCredential", + subscription_id: str, **kwargs # type: Any ) -> None: if credential is None: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_management_client.py index fbdc79976659..41a59c75017f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/aio/_monitor_management_client.py @@ -9,13 +9,20 @@ # regenerated. # -------------------------------------------------------------------------- -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Serializer, Deserializer +from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin +from msrest import Deserializer, Serializer + from ._configuration import MonitorManagementClientConfiguration +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + class _SDKClient(object): def __init__(self, *args, **kwargs): """This is a fake class to support current implemetation of MultiApiClientMixin." @@ -36,45 +43,55 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str - :param str api_version: API version to use if no profile is provided, or if - missing in profile. - :param str base_url: Service URL + :param api_version: API version to use if no profile is provided, or if missing in profile. + :type api_version: str + :param base_url: Service URL + :type base_url: str :param profile: A profile definition, from KnownProfiles to dict. :type profile: azure.profiles.KnownProfiles :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2019-10-17-preview' + DEFAULT_API_VERSION = '2021-09-01' _PROFILE_TAG = "azure.mgmt.monitor.MonitorManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, - 'action_groups': '2019-06-01', - 'activity_log_alerts': '2017-04-01', + 'activity_log_alerts': '2020-10-01', 'activity_logs': '2015-04-01', 'alert_rule_incidents': '2016-03-01', 'alert_rules': '2016-03-01', 'autoscale_settings': '2015-04-01', 'baseline': '2018-09-01', 'baselines': '2019-03-01', - 'diagnostic_settings': '2017-05-01-preview', - 'diagnostic_settings_category': '2017-05-01-preview', + 'data_collection_endpoints': '2021-04-01', + 'data_collection_rule_associations': '2021-04-01', + 'data_collection_rules': '2021-04-01', + 'diagnostic_settings': '2021-05-01-preview', + 'diagnostic_settings_category': '2021-05-01-preview', 'event_categories': '2015-04-01', 'guest_diagnostics_settings': '2018-06-01-preview', 'guest_diagnostics_settings_association': '2018-06-01-preview', 'log_profiles': '2016-03-01', + 'management_group_diagnostic_settings': '2021-05-01-preview', 'metric_alerts': '2018-03-01', 'metric_alerts_status': '2018-03-01', 'metric_baseline': '2018-09-01', 'metric_definitions': '2018-01-01', 'metric_namespaces': '2017-12-01-preview', 'metrics': '2018-01-01', - 'operations': '2015-04-01', + 'operations': '2015-07-01', + 'predictive_metric': '2021-05-01-preview', + 'private_endpoint_connections': '2019-10-17-preview', + 'private_link_resources': '2019-10-17-preview', + 'private_link_scope_operation_status': '2019-10-17-preview', + 'private_link_scoped_resources': '2019-10-17-preview', + 'private_link_scopes': '2019-10-17-preview', 'scheduled_query_rules': '2018-04-16', 'service_diagnostic_settings': '2016-09-01', - 'subscription_diagnostic_settings': '2017-05-01-preview', + 'subscription_diagnostic_settings': '2021-05-01-preview', 'tenant_activity_logs': '2015-04-01', 'vm_insights': '2018-11-27-preview', }}, @@ -83,11 +100,11 @@ class MonitorManagementClient(MultiApiClientMixin, _SDKClient): def __init__( self, - credential, # type: "AsyncTokenCredential" - subscription_id, # type: str - api_version=None, - base_url=None, - profile=KnownProfiles.default, + credential: "AsyncTokenCredential", + subscription_id: str, + api_version: Optional[str] = None, + base_url: Optional[str] = None, + profile: KnownProfiles = KnownProfiles.default, **kwargs # type: Any ) -> None: if not base_url: @@ -128,6 +145,10 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2019-11-01-preview: :mod:`v2019_11_01_preview.models` * 2020-01-01-preview: :mod:`v2020_01_01_preview.models` * 2020-05-01-preview: :mod:`v2020_05_01_preview.models` + * 2020-10-01: :mod:`v2020_10_01.models` + * 2021-04-01: :mod:`v2021_04_01.models` + * 2021-05-01-preview: :mod:`v2021_05_01_preview.models` + * 2021-09-01: :mod:`v2021_09_01.models` """ if api_version == '2015-04-01': from ..v2015_04_01 import models @@ -192,6 +213,18 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-05-01-preview': from ..v2020_05_01_preview import models return models + elif api_version == '2020-10-01': + from ..v2020_10_01 import models + return models + elif api_version == '2021-04-01': + from ..v2021_04_01 import models + return models + elif api_version == '2021-05-01-preview': + from ..v2021_05_01_preview import models + return models + elif api_version == '2021-09-01': + from ..v2021_09_01 import models + return models raise ValueError("API version {} is not available".format(api_version)) @property @@ -203,6 +236,7 @@ def action_groups(self): * 2018-09-01: :class:`ActionGroupsOperations` * 2019-03-01: :class:`ActionGroupsOperations` * 2019-06-01: :class:`ActionGroupsOperations` + * 2021-09-01: :class:`ActionGroupsOperations` """ api_version = self._get_api_version('action_groups') if api_version == '2017-04-01': @@ -215,6 +249,8 @@ def action_groups(self): from ..v2019_03_01.aio.operations import ActionGroupsOperations as OperationClass elif api_version == '2019-06-01': from ..v2019_06_01.aio.operations import ActionGroupsOperations as OperationClass + elif api_version == '2021-09-01': + from ..v2021_09_01.aio.operations import ActionGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'action_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -225,12 +261,15 @@ def activity_log_alerts(self): * 2017-03-01-preview: :class:`ActivityLogAlertsOperations` * 2017-04-01: :class:`ActivityLogAlertsOperations` + * 2020-10-01: :class:`ActivityLogAlertsOperations` """ api_version = self._get_api_version('activity_log_alerts') if api_version == '2017-03-01-preview': from ..v2017_03_01_preview.aio.operations import ActivityLogAlertsOperations as OperationClass elif api_version == '2017-04-01': from ..v2017_04_01.aio.operations import ActivityLogAlertsOperations as OperationClass + elif api_version == '2020-10-01': + from ..v2020_10_01.aio.operations import ActivityLogAlertsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'activity_log_alerts'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -265,10 +304,16 @@ def alert_rule_incidents(self): def alert_rules(self): """Instance depends on the API version: + * 2015-04-01: :class:`AlertRulesOperations` + * 2015-07-01: :class:`AlertRulesOperations` * 2016-03-01: :class:`AlertRulesOperations` """ api_version = self._get_api_version('alert_rules') - if api_version == '2016-03-01': + if api_version == '2015-04-01': + from ..v2015_04_01.aio.operations import AlertRulesOperations as OperationClass + elif api_version == '2015-07-01': + from ..v2015_07_01.aio.operations import AlertRulesOperations as OperationClass + elif api_version == '2016-03-01': from ..v2016_03_01.aio.operations import AlertRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'alert_rules'".format(api_version)) @@ -279,10 +324,13 @@ def autoscale_settings(self): """Instance depends on the API version: * 2015-04-01: :class:`AutoscaleSettingsOperations` + * 2021-05-01-preview: :class:`AutoscaleSettingsOperations` """ api_version = self._get_api_version('autoscale_settings') if api_version == '2015-04-01': from ..v2015_04_01.aio.operations import AutoscaleSettingsOperations as OperationClass + elif api_version == '2021-05-01-preview': + from ..v2021_05_01_preview.aio.operations import AutoscaleSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'autoscale_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -313,15 +361,31 @@ def baselines(self): raise ValueError("API version {} does not have operation group 'baselines'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def data_collection_endpoints(self): + """Instance depends on the API version: + + * 2021-04-01: :class:`DataCollectionEndpointsOperations` + """ + api_version = self._get_api_version('data_collection_endpoints') + if api_version == '2021-04-01': + from ..v2021_04_01.aio.operations import DataCollectionEndpointsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'data_collection_endpoints'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def data_collection_rule_associations(self): """Instance depends on the API version: * 2019-11-01-preview: :class:`DataCollectionRuleAssociationsOperations` + * 2021-04-01: :class:`DataCollectionRuleAssociationsOperations` """ api_version = self._get_api_version('data_collection_rule_associations') if api_version == '2019-11-01-preview': from ..v2019_11_01_preview.aio.operations import DataCollectionRuleAssociationsOperations as OperationClass + elif api_version == '2021-04-01': + from ..v2021_04_01.aio.operations import DataCollectionRuleAssociationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'data_collection_rule_associations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -331,10 +395,13 @@ def data_collection_rules(self): """Instance depends on the API version: * 2019-11-01-preview: :class:`DataCollectionRulesOperations` + * 2021-04-01: :class:`DataCollectionRulesOperations` """ api_version = self._get_api_version('data_collection_rules') if api_version == '2019-11-01-preview': from ..v2019_11_01_preview.aio.operations import DataCollectionRulesOperations as OperationClass + elif api_version == '2021-04-01': + from ..v2021_04_01.aio.operations import DataCollectionRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'data_collection_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -344,10 +411,13 @@ def diagnostic_settings(self): """Instance depends on the API version: * 2017-05-01-preview: :class:`DiagnosticSettingsOperations` + * 2021-05-01-preview: :class:`DiagnosticSettingsOperations` """ api_version = self._get_api_version('diagnostic_settings') if api_version == '2017-05-01-preview': from ..v2017_05_01_preview.aio.operations import DiagnosticSettingsOperations as OperationClass + elif api_version == '2021-05-01-preview': + from ..v2021_05_01_preview.aio.operations import DiagnosticSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'diagnostic_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -357,10 +427,13 @@ def diagnostic_settings_category(self): """Instance depends on the API version: * 2017-05-01-preview: :class:`DiagnosticSettingsCategoryOperations` + * 2021-05-01-preview: :class:`DiagnosticSettingsCategoryOperations` """ api_version = self._get_api_version('diagnostic_settings_category') if api_version == '2017-05-01-preview': from ..v2017_05_01_preview.aio.operations import DiagnosticSettingsCategoryOperations as OperationClass + elif api_version == '2021-05-01-preview': + from ..v2021_05_01_preview.aio.operations import DiagnosticSettingsCategoryOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'diagnostic_settings_category'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -422,10 +495,13 @@ def management_group_diagnostic_settings(self): """Instance depends on the API version: * 2020-01-01-preview: :class:`ManagementGroupDiagnosticSettingsOperations` + * 2021-05-01-preview: :class:`ManagementGroupDiagnosticSettingsOperations` """ api_version = self._get_api_version('management_group_diagnostic_settings') if api_version == '2020-01-01-preview': from ..v2020_01_01_preview.aio.operations import ManagementGroupDiagnosticSettingsOperations as OperationClass + elif api_version == '2021-05-01-preview': + from ..v2021_05_01_preview.aio.operations import ManagementGroupDiagnosticSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'management_group_diagnostic_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -476,12 +552,15 @@ def metric_baseline(self): def metric_definitions(self): """Instance depends on the API version: + * 2015-07-01: :class:`MetricDefinitionsOperations` * 2016-03-01: :class:`MetricDefinitionsOperations` * 2017-05-01-preview: :class:`MetricDefinitionsOperations` * 2018-01-01: :class:`MetricDefinitionsOperations` """ api_version = self._get_api_version('metric_definitions') - if api_version == '2016-03-01': + if api_version == '2015-07-01': + from ..v2015_07_01.aio.operations import MetricDefinitionsOperations as OperationClass + elif api_version == '2016-03-01': from ..v2016_03_01.aio.operations import MetricDefinitionsOperations as OperationClass elif api_version == '2017-05-01-preview': from ..v2017_05_01_preview.aio.operations import MetricDefinitionsOperations as OperationClass @@ -528,14 +607,30 @@ def operations(self): """Instance depends on the API version: * 2015-04-01: :class:`Operations` + * 2015-07-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2015-04-01': from ..v2015_04_01.aio.operations import Operations as OperationClass + elif api_version == '2015-07-01': + from ..v2015_07_01.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def predictive_metric(self): + """Instance depends on the API version: + + * 2021-05-01-preview: :class:`PredictiveMetricOperations` + """ + api_version = self._get_api_version('predictive_metric') + if api_version == '2021-05-01-preview': + from ..v2021_05_01_preview.aio.operations import PredictiveMetricOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'predictive_metric'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def private_endpoint_connections(self): """Instance depends on the API version: @@ -638,10 +733,13 @@ def subscription_diagnostic_settings(self): """Instance depends on the API version: * 2017-05-01-preview: :class:`SubscriptionDiagnosticSettingsOperations` + * 2021-05-01-preview: :class:`SubscriptionDiagnosticSettingsOperations` """ api_version = self._get_api_version('subscription_diagnostic_settings') if api_version == '2017-05-01-preview': from ..v2017_05_01_preview.aio.operations import SubscriptionDiagnosticSettingsOperations as OperationClass + elif api_version == '2021-05-01-preview': + from ..v2021_05_01_preview.aio.operations import SubscriptionDiagnosticSettingsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'subscription_diagnostic_settings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models.py index 09110c75b60e..9def65086344 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/models.py @@ -5,10 +5,9 @@ # license information. # -------------------------------------------------------------------------- from .v2015_04_01.models import * +from .v2015_07_01.models import * from .v2016_03_01.models import * from .v2016_09_01.models import * -from .v2017_04_01.models import * -from .v2017_05_01_preview.models import * from .v2017_12_01_preview.models import * from .v2018_01_01.models import * from .v2018_03_01.models import * @@ -17,5 +16,8 @@ from .v2018_09_01.models import * from .v2018_11_27_preview.models import * from .v2019_03_01.models import * -from .v2019_06_01.models import * from .v2019_10_17.models import * +from .v2020_10_01.models import * +from .v2021_04_01.models import * +from .v2021_05_01_preview.models import * +from .v2021_09_01.models import * diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_configuration.py index db78f6dd9e94..224f0bceaf6e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ @@ -47,7 +48,6 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2015-04-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_metadata.json index 51c32ff3bddd..c77504598874 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_metadata.json @@ -1,6 +1,6 @@ { "chosen_version": "2015-04-01", - "total_api_version_list": ["2015-04-01"], + "total_api_version_list": ["2014-04-01", "2015-04-01"], "client": { "name": "MonitorManagementClient", "filename": "_monitor_management_client", @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,45 +23,86 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "activity_logs": "ActivityLogsOperations", "autoscale_settings": "AutoscaleSettingsOperations", "event_categories": "EventCategoriesOperations", "operations": "Operations", - "tenant_activity_logs": "TenantActivityLogsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + "tenant_activity_logs": "TenantActivityLogsOperations", + "alert_rules": "AlertRulesOperations" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_management_client.py index cf573933ec23..030cec917f7b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ActivityLogsOperations @@ -23,6 +24,7 @@ from .operations import EventCategoriesOperations from .operations import Operations from .operations import TenantActivityLogsOperations +from .operations import AlertRulesOperations from . import models @@ -39,9 +41,11 @@ class MonitorManagementClient(object): :vartype operations: $(python-base-namespace).v2015_04_01.operations.Operations :ivar tenant_activity_logs: TenantActivityLogsOperations operations :vartype tenant_activity_logs: $(python-base-namespace).v2015_04_01.operations.TenantActivityLogsOperations + :ivar alert_rules: AlertRulesOperations operations + :vartype alert_rules: $(python-base-namespace).v2015_04_01.operations.AlertRulesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -74,6 +78,26 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.tenant_activity_logs = TenantActivityLogsOperations( self._client, self._config, self._serialize, self._deserialize) + self.alert_rules = AlertRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response def close(self): # type: () -> None diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_configuration.py index c2ce834c0f6b..a1b513c610d4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ @@ -44,7 +45,6 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2015-04-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_management_client.py index d38f6a5af172..0e8dd89e73a9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -21,6 +22,7 @@ from .operations import EventCategoriesOperations from .operations import Operations from .operations import TenantActivityLogsOperations +from .operations import AlertRulesOperations from .. import models @@ -37,9 +39,11 @@ class MonitorManagementClient(object): :vartype operations: $(python-base-namespace).v2015_04_01.aio.operations.Operations :ivar tenant_activity_logs: TenantActivityLogsOperations operations :vartype tenant_activity_logs: $(python-base-namespace).v2015_04_01.aio.operations.TenantActivityLogsOperations + :ivar alert_rules: AlertRulesOperations operations + :vartype alert_rules: $(python-base-namespace).v2015_04_01.aio.operations.AlertRulesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -71,6 +75,25 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.tenant_activity_logs = TenantActivityLogsOperations( self._client, self._config, self._serialize, self._deserialize) + self.alert_rules = AlertRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/__init__.py index 0246aac3c8ae..76293309fbf0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/__init__.py @@ -11,6 +11,7 @@ from ._event_categories_operations import EventCategoriesOperations from ._operations import Operations from ._tenant_activity_logs_operations import TenantActivityLogsOperations +from ._alert_rules_operations import AlertRulesOperations __all__ = [ 'ActivityLogsOperations', @@ -18,4 +19,5 @@ 'EventCategoriesOperations', 'Operations', 'TenantActivityLogsOperations', + 'AlertRulesOperations', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py index 7891b73a9d1e..41231e863452 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_activity_logs_operations.py @@ -45,7 +45,7 @@ def list( self, filter: str, select: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.EventDataCollection"]: """Provides the list of records from the activity logs. @@ -94,7 +94,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -125,7 +125,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -134,4 +134,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/eventtypes/management/values'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py new file mode 100644 index 000000000000..fe527b21b961 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_alert_rules_operations.py @@ -0,0 +1,438 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AlertRulesOperations: + """AlertRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2015_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_or_update( + self, + resource_group_name: str, + rule_name: str, + parameters: "_models.AlertRuleResource", + **kwargs: Any + ) -> "_models.AlertRuleResource": + """Creates or updates a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param parameters: The parameters of the rule to create or update. + :type parameters: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AlertRuleResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + rule_name: str, + **kwargs: Any + ) -> None: + """Deletes a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + rule_name: str, + **kwargs: Any + ) -> "_models.AlertRuleResource": + """Gets a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + rule_name: str, + alert_rules_resource: "_models.AlertRuleResourcePatch", + **kwargs: Any + ) -> "_models.AlertRuleResource": + """Updates an existing classic metric AlertRuleResource. To update other fields use the + CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param alert_rules_resource: Parameters supplied to the operation. + :type alert_rules_resource: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResourcePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(alert_rules_resource, 'AlertRuleResourcePatch') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AlertRuleResourceCollection"]: + """List the classic metric alert rules within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.AlertRuleResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AlertRuleResourceCollection"]: + """List the classic metric alert rules within a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_04_01.models.AlertRuleResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py index 8b6c08b0d51a..d6e489c04fa1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_autoscale_settings_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AutoscaleSettingResourceCollection"]: """Lists the autoscale settings for a resource group. @@ -73,7 +73,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -101,7 +101,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -110,14 +110,14 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore async def create_or_update( self, resource_group_name: str, autoscale_setting_name: str, parameters: "_models.AutoscaleSettingResource", - **kwargs + **kwargs: Any ) -> "_models.AutoscaleSettingResource": """Creates or updates an autoscale setting. @@ -146,7 +146,7 @@ async def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -168,7 +168,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -181,13 +181,13 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore async def delete( self, resource_group_name: str, autoscale_setting_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes and autoscale setting. @@ -213,7 +213,7 @@ async def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -231,19 +231,19 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore async def get( self, resource_group_name: str, autoscale_setting_name: str, - **kwargs + **kwargs: Any ) -> "_models.AutoscaleSettingResource": """Gets an autoscale setting. @@ -269,7 +269,7 @@ async def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -287,7 +287,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) @@ -296,14 +296,14 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore async def update( self, resource_group_name: str, autoscale_setting_name: str, autoscale_setting_resource: "_models.AutoscaleSettingResourcePatch", - **kwargs + **kwargs: Any ) -> "_models.AutoscaleSettingResource": """Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate method. @@ -331,7 +331,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), } @@ -355,7 +355,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) @@ -364,11 +364,11 @@ async def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AutoscaleSettingResourceCollection"]: """Lists the autoscale settings for a subscription. @@ -394,7 +394,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -422,7 +422,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -431,4 +431,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/autoscalesettings'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py index 5ec63467bb15..288c4bc49327 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_event_categories_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.EventCategoryCollection"]: """Get the list of available event categories supported in the Activity Logs Service.:code:`
`The current list includes the following: Administrative, Security, @@ -95,7 +95,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -104,4 +104,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/microsoft.insights/eventcategories'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.Insights/eventcategories'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py index ba5eac551697..53313b5ec127 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_operations.py @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, - **kwargs + **kwargs: Any ) -> "_models.OperationListResult": """Lists all of the available operations from Microsoft.Insights provider. @@ -84,4 +84,4 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/providers/microsoft.insights/operations'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.Insights/operations'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py index 605d7a793407..53fd30b722a5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/aio/operations/_tenant_activity_logs_operations.py @@ -45,7 +45,7 @@ def list( self, filter: Optional[str] = None, select: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.EventDataCollection"]: """Gets the Activity Logs for the Tenant.:code:`
`Everything that is applicable to the API to get the Activity Logs for the subscription is applicable to this API (the parameters, $filter, @@ -64,10 +64,11 @@ def list( ':code:``' and eventChannels eq 'Admin, Operation'.:code:`
`- List events for a resource provider: $filter=eventTimestamp ge ':code:``' and eventTimestamp le ':code:``' and eventChannels eq 'Admin, Operation' and resourceProvider eq - ':code:``'.:code:`
`- List events for a correlation Id: api- - version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp - le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq - ':code:``'.:code:`
`\ **NOTE**\ : No other syntax is allowed. + ':code:``'.:code:`
`- List events for a correlation Id: + api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and + eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and + correlationId eq ':code:``'.:code:`
`\ **NOTE**\ : No other syntax is + allowed. :type filter: str :param select: Used to fetch events with only the given properties.:code:`
`The **$select** argument is a comma separated list of property names to be returned. Possible values are: @@ -126,7 +127,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -135,4 +136,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/microsoft.insights/eventtypes/management/values'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.Insights/eventtypes/management/values'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/__init__.py index 18b7c609c142..7e432fc032b0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AlertRuleResource + from ._models_py3 import AlertRuleResourceCollection + from ._models_py3 import AlertRuleResourcePatch from ._models_py3 import AutoscaleNotification from ._models_py3 import AutoscaleProfile from ._models_py3 import AutoscaleSettingResource @@ -19,6 +22,9 @@ from ._models_py3 import EventDataCollection from ._models_py3 import HttpRequestInfo from ._models_py3 import LocalizableString + from ._models_py3 import LocationThresholdRuleCondition + from ._models_py3 import ManagementEventAggregationCondition + from ._models_py3 import ManagementEventRuleCondition from ._models_py3 import MetricTrigger from ._models_py3 import Operation from ._models_py3 import OperationDisplay @@ -26,14 +32,26 @@ from ._models_py3 import Recurrence from ._models_py3 import RecurrentSchedule from ._models_py3 import Resource + from ._models_py3 import RuleAction + from ._models_py3 import RuleCondition + from ._models_py3 import RuleDataSource + from ._models_py3 import RuleEmailAction + from ._models_py3 import RuleManagementEventClaimsDataSource + from ._models_py3 import RuleManagementEventDataSource + from ._models_py3 import RuleMetricDataSource + from ._models_py3 import RuleWebhookAction from ._models_py3 import ScaleAction from ._models_py3 import ScaleCapacity from ._models_py3 import ScaleRule from ._models_py3 import ScaleRuleMetricDimension from ._models_py3 import SenderAuthorization + from ._models_py3 import ThresholdRuleCondition from ._models_py3 import TimeWindow from ._models_py3 import WebhookNotification except (SyntaxError, ImportError): + from ._models import AlertRuleResource # type: ignore + from ._models import AlertRuleResourceCollection # type: ignore + from ._models import AlertRuleResourcePatch # type: ignore from ._models import AutoscaleNotification # type: ignore from ._models import AutoscaleProfile # type: ignore from ._models import AutoscaleSettingResource # type: ignore @@ -46,6 +64,9 @@ from ._models import EventDataCollection # type: ignore from ._models import HttpRequestInfo # type: ignore from ._models import LocalizableString # type: ignore + from ._models import LocationThresholdRuleCondition # type: ignore + from ._models import ManagementEventAggregationCondition # type: ignore + from ._models import ManagementEventRuleCondition # type: ignore from ._models import MetricTrigger # type: ignore from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore @@ -53,26 +74,40 @@ from ._models import Recurrence # type: ignore from ._models import RecurrentSchedule # type: ignore from ._models import Resource # type: ignore + from ._models import RuleAction # type: ignore + from ._models import RuleCondition # type: ignore + from ._models import RuleDataSource # type: ignore + from ._models import RuleEmailAction # type: ignore + from ._models import RuleManagementEventClaimsDataSource # type: ignore + from ._models import RuleManagementEventDataSource # type: ignore + from ._models import RuleMetricDataSource # type: ignore + from ._models import RuleWebhookAction # type: ignore from ._models import ScaleAction # type: ignore from ._models import ScaleCapacity # type: ignore from ._models import ScaleRule # type: ignore from ._models import ScaleRuleMetricDimension # type: ignore from ._models import SenderAuthorization # type: ignore + from ._models import ThresholdRuleCondition # type: ignore from ._models import TimeWindow # type: ignore from ._models import WebhookNotification # type: ignore from ._monitor_management_client_enums import ( ComparisonOperationType, + ConditionOperator, EventLevel, MetricStatisticType, RecurrenceFrequency, ScaleDirection, ScaleRuleMetricDimensionOperationType, ScaleType, + TimeAggregationOperator, TimeAggregationType, ) __all__ = [ + 'AlertRuleResource', + 'AlertRuleResourceCollection', + 'AlertRuleResourcePatch', 'AutoscaleNotification', 'AutoscaleProfile', 'AutoscaleSettingResource', @@ -85,6 +120,9 @@ 'EventDataCollection', 'HttpRequestInfo', 'LocalizableString', + 'LocationThresholdRuleCondition', + 'ManagementEventAggregationCondition', + 'ManagementEventRuleCondition', 'MetricTrigger', 'Operation', 'OperationDisplay', @@ -92,19 +130,30 @@ 'Recurrence', 'RecurrentSchedule', 'Resource', + 'RuleAction', + 'RuleCondition', + 'RuleDataSource', + 'RuleEmailAction', + 'RuleManagementEventClaimsDataSource', + 'RuleManagementEventDataSource', + 'RuleMetricDataSource', + 'RuleWebhookAction', 'ScaleAction', 'ScaleCapacity', 'ScaleRule', 'ScaleRuleMetricDimension', 'SenderAuthorization', + 'ThresholdRuleCondition', 'TimeWindow', 'WebhookNotification', 'ComparisonOperationType', + 'ConditionOperator', 'EventLevel', 'MetricStatisticType', 'RecurrenceFrequency', 'ScaleDirection', 'ScaleRuleMetricDimensionOperationType', 'ScaleType', + 'TimeAggregationOperator', 'TimeAggregationType', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models.py index 76e77193fc27..8996b10f93c8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models.py @@ -10,6 +10,209 @@ import msrest.serialization +class Resource(msrest.serialization.Model): + """An azure resource object. + + 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. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class AlertRuleResource(Resource): + """The alert rule resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param name_properties_name: Required. the name of the alert rule. + :type name_properties_name: str + :param description: the description of the alert rule that will be included in the alert email. + :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str + :param is_enabled: Required. the flag that indicates whether the alert rule is enabled. + :type is_enabled: bool + :param condition: Required. the condition that results in the alert rule being activated. + :type condition: ~$(python-base-namespace).v2015_04_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2015_04_01.models.RuleAction + :param actions: the array of actions that are performed when the alert rule becomes active, and + when an alert condition is resolved. + :type actions: list[~$(python-base-namespace).v2015_04_01.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'name_properties_name': {'required': True}, + 'is_enabled': {'required': True}, + 'condition': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleResource, self).__init__(**kwargs) + self.name_properties_name = kwargs['name_properties_name'] + self.description = kwargs.get('description', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.is_enabled = kwargs['is_enabled'] + self.condition = kwargs['condition'] + self.action = kwargs.get('action', None) + self.actions = kwargs.get('actions', None) + self.last_updated_time = None + + +class AlertRuleResourceCollection(msrest.serialization.Model): + """Represents a collection of alert rule resources. + + :param value: the values for the alert rule resources. + :type value: list[~$(python-base-namespace).v2015_04_01.models.AlertRuleResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AlertRuleResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class AlertRuleResourcePatch(msrest.serialization.Model): + """The alert rule object for patch operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param name: the name of the alert rule. + :type name: str + :param description: the description of the alert rule that will be included in the alert email. + :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str + :param is_enabled: the flag that indicates whether the alert rule is enabled. + :type is_enabled: bool + :param condition: the condition that results in the alert rule being activated. + :type condition: ~$(python-base-namespace).v2015_04_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2015_04_01.models.RuleAction + :param actions: the array of actions that are performed when the alert rule becomes active, and + when an alert condition is resolved. + :type actions: list[~$(python-base-namespace).v2015_04_01.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: ~datetime.datetime + """ + + _validation = { + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.condition = kwargs.get('condition', None) + self.action = kwargs.get('action', None) + self.actions = kwargs.get('actions', None) + self.last_updated_time = None + + class AutoscaleNotification(msrest.serialization.Model): """Autoscale notification. @@ -17,8 +220,8 @@ class AutoscaleNotification(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar operation: Required. the operation associated with the notification and its value must be - "scale". Default value: "Scale". + :ivar operation: the operation associated with the notification and its value must be "scale". + Has constant value: "Scale". :vartype operation: str :param email: the email notification. :type email: ~$(python-base-namespace).v2015_04_01.models.EmailNotification @@ -93,52 +296,6 @@ def __init__( self.recurrence = kwargs.get('recurrence', None) -class Resource(msrest.serialization.Model): - """An azure resource object. - - 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. - - :ivar id: Azure resource Id. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs['location'] - self.tags = kwargs.get('tags', None) - - class AutoscaleSettingResource(Resource): """The autoscale setting resource. @@ -169,6 +326,9 @@ class AutoscaleSettingResource(Resource): :param target_resource_uri: the resource identifier of the resource that the autoscale setting should be added to. :type target_resource_uri: str + :param target_resource_location: the location of the resource that the autoscale setting should + be added to. + :type target_resource_location: str """ _validation = { @@ -190,6 +350,7 @@ class AutoscaleSettingResource(Resource): 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + 'target_resource_location': {'key': 'properties.targetResourceLocation', 'type': 'str'}, } def __init__( @@ -202,6 +363,7 @@ def __init__( self.enabled = kwargs.get('enabled', True) self.name_properties_name = kwargs.get('name_properties_name', None) self.target_resource_uri = kwargs.get('target_resource_uri', None) + self.target_resource_location = kwargs.get('target_resource_location', None) class AutoscaleSettingResourceCollection(msrest.serialization.Model): @@ -251,6 +413,9 @@ class AutoscaleSettingResourcePatch(msrest.serialization.Model): :param target_resource_uri: the resource identifier of the resource that the autoscale setting should be added to. :type target_resource_uri: str + :param target_resource_location: the location of the resource that the autoscale setting should + be added to. + :type target_resource_location: str """ _validation = { @@ -264,6 +429,7 @@ class AutoscaleSettingResourcePatch(msrest.serialization.Model): 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'name': {'key': 'properties.name', 'type': 'str'}, 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + 'target_resource_location': {'key': 'properties.targetResourceLocation', 'type': 'str'}, } def __init__( @@ -277,6 +443,7 @@ def __init__( self.enabled = kwargs.get('enabled', True) self.name = kwargs.get('name', None) self.target_resource_uri = kwargs.get('target_resource_uri', None) + self.target_resource_location = kwargs.get('target_resource_location', None) class EmailNotification(msrest.serialization.Model): @@ -304,8 +471,8 @@ def __init__( **kwargs ): super(EmailNotification, self).__init__(**kwargs) - self.send_to_subscription_administrator = kwargs.get('send_to_subscription_administrator', None) - self.send_to_subscription_co_administrators = kwargs.get('send_to_subscription_co_administrators', None) + self.send_to_subscription_administrator = kwargs.get('send_to_subscription_administrator', False) + self.send_to_subscription_co_administrators = kwargs.get('send_to_subscription_co_administrators', False) self.custom_emails = kwargs.get('custom_emails', None) @@ -606,6 +773,159 @@ def __init__( self.localized_value = kwargs.get('localized_value', None) +class RuleCondition(msrest.serialization.Model): + """The condition that results in the alert rule being activated. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocationThresholdRuleCondition, ManagementEventRuleCondition, ThresholdRuleCondition. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition': 'LocationThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition': 'ManagementEventRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition': 'ThresholdRuleCondition'} + } + + def __init__( + self, + **kwargs + ): + super(RuleCondition, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.data_source = kwargs.get('data_source', None) + + +class LocationThresholdRuleCondition(RuleCondition): + """A rule condition based on a certain number of locations failing. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + :param failed_location_count: Required. the number of locations that must fail to activate the + alert. + :type failed_location_count: int + """ + + _validation = { + 'odata_type': {'required': True}, + 'failed_location_count': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'failed_location_count': {'key': 'failedLocationCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(LocationThresholdRuleCondition, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' # type: str + self.window_size = kwargs.get('window_size', None) + self.failed_location_count = kwargs['failed_location_count'] + + +class ManagementEventAggregationCondition(msrest.serialization.Model): + """How the data that is collected should be combined over time. + + :param operator: the condition operator. Possible values include: "GreaterThan", + "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + :type operator: str or ~$(python-base-namespace).v2015_04_01.models.ConditionOperator + :param threshold: The threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagementEventAggregationCondition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) + self.window_size = kwargs.get('window_size', None) + + +class ManagementEventRuleCondition(RuleCondition): + """A management event rule condition. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :param aggregation: How the data that is collected should be combined over time and when the + alert is activated. Note that for management event alerts aggregation is optional – if it is + not provided then any event will cause the alert to activate. + :type aggregation: + ~$(python-base-namespace).v2015_04_01.models.ManagementEventAggregationCondition + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'aggregation': {'key': 'aggregation', 'type': 'ManagementEventAggregationCondition'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagementEventRuleCondition, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' # type: str + self.aggregation = kwargs.get('aggregation', None) + + class MetricTrigger(msrest.serialization.Model): """The trigger that results in a scaling action. @@ -618,12 +938,14 @@ class MetricTrigger(msrest.serialization.Model): :param metric_resource_uri: Required. the resource identifier of the resource the rule monitors. :type metric_resource_uri: str + :param metric_resource_location: the location of the resource the rule monitors. + :type metric_resource_location: str :param time_grain: Required. the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute. :type time_grain: ~datetime.timedelta :param statistic: Required. the metric statistic type. How the metrics from multiple instances - are combined. Possible values include: "Average", "Min", "Max", "Sum". + are combined. Possible values include: "Average", "Min", "Max", "Sum", "Count". :type statistic: str or ~$(python-base-namespace).v2015_04_01.models.MetricStatisticType :param time_window: Required. the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. @@ -642,6 +964,8 @@ class MetricTrigger(msrest.serialization.Model): :param dimensions: List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. :type dimensions: list[~$(python-base-namespace).v2015_04_01.models.ScaleRuleMetricDimension] + :param divide_per_instance: a value indicating whether metric should divide per instance. + :type divide_per_instance: bool """ _validation = { @@ -659,6 +983,7 @@ class MetricTrigger(msrest.serialization.Model): 'metric_name': {'key': 'metricName', 'type': 'str'}, 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, 'metric_resource_uri': {'key': 'metricResourceUri', 'type': 'str'}, + 'metric_resource_location': {'key': 'metricResourceLocation', 'type': 'str'}, 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, 'statistic': {'key': 'statistic', 'type': 'str'}, 'time_window': {'key': 'timeWindow', 'type': 'duration'}, @@ -666,6 +991,7 @@ class MetricTrigger(msrest.serialization.Model): 'operator': {'key': 'operator', 'type': 'str'}, 'threshold': {'key': 'threshold', 'type': 'float'}, 'dimensions': {'key': 'dimensions', 'type': '[ScaleRuleMetricDimension]'}, + 'divide_per_instance': {'key': 'dividePerInstance', 'type': 'bool'}, } def __init__( @@ -676,6 +1002,7 @@ def __init__( self.metric_name = kwargs['metric_name'] self.metric_namespace = kwargs.get('metric_namespace', None) self.metric_resource_uri = kwargs['metric_resource_uri'] + self.metric_resource_location = kwargs.get('metric_resource_location', None) self.time_grain = kwargs['time_grain'] self.statistic = kwargs['statistic'] self.time_window = kwargs['time_window'] @@ -683,6 +1010,7 @@ def __init__( self.operator = kwargs['operator'] self.threshold = kwargs['threshold'] self.dimensions = kwargs.get('dimensions', None) + self.divide_per_instance = kwargs.get('divide_per_instance', None) class Operation(msrest.serialization.Model): @@ -863,6 +1191,303 @@ def __init__( self.minutes = kwargs['minutes'] +class RuleAction(msrest.serialization.Model): + """The action that is performed when the alert rule becomes active, and when an alert condition is resolved. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleEmailAction, RuleWebhookAction. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.RuleEmailAction': 'RuleEmailAction', 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction': 'RuleWebhookAction'} + } + + def __init__( + self, + **kwargs + ): + super(RuleAction, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + + +class RuleDataSource(msrest.serialization.Model): + """The resource from which the rule collects its data. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleManagementEventDataSource, RuleMetricDataSource. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource': 'RuleManagementEventDataSource', 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource': 'RuleMetricDataSource'} + } + + def __init__( + self, + **kwargs + ): + super(RuleDataSource, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.resource_uri = kwargs.get('resource_uri', None) + self.legacy_resource_id = kwargs.get('legacy_resource_id', None) + self.resource_location = kwargs.get('resource_location', None) + self.metric_namespace = kwargs.get('metric_namespace', None) + + +class RuleEmailAction(RuleAction): + """Specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + :param send_to_service_owners: Whether the administrators (service and co-administrators) of + the service should be notified when the alert is activated. + :type send_to_service_owners: bool + :param custom_emails: the list of administrator's custom email addresses to notify of the + activation of the alert. + :type custom_emails: list[str] + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'send_to_service_owners': {'key': 'sendToServiceOwners', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleEmailAction, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' # type: str + self.send_to_service_owners = kwargs.get('send_to_service_owners', None) + self.custom_emails = kwargs.get('custom_emails', None) + + +class RuleManagementEventClaimsDataSource(msrest.serialization.Model): + """The claims for a rule management event data source. + + :param email_address: the email address. + :type email_address: str + """ + + _attribute_map = { + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleManagementEventClaimsDataSource, self).__init__(**kwargs) + self.email_address = kwargs.get('email_address', None) + + +class RuleManagementEventDataSource(RuleDataSource): + """A rule management event data source. The discriminator fields is always RuleManagementEventDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + :param event_name: the event name. + :type event_name: str + :param event_source: the event source. + :type event_source: str + :param level: the level. + :type level: str + :param operation_name: The name of the operation that should be checked for. If no name is + provided, any operation will match. + :type operation_name: str + :param resource_group_name: the resource group name. + :type resource_group_name: str + :param resource_provider_name: the resource provider name. + :type resource_provider_name: str + :param status: The status of the operation that should be checked for. If no status is + provided, any status will match. + :type status: str + :param sub_status: the substatus. + :type sub_status: str + :param claims: the claims. + :type claims: ~$(python-base-namespace).v2015_04_01.models.RuleManagementEventClaimsDataSource + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'event_source': {'key': 'eventSource', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_provider_name': {'key': 'resourceProviderName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'sub_status': {'key': 'subStatus', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'RuleManagementEventClaimsDataSource'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleManagementEventDataSource, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' # type: str + self.event_name = kwargs.get('event_name', None) + self.event_source = kwargs.get('event_source', None) + self.level = kwargs.get('level', None) + self.operation_name = kwargs.get('operation_name', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.resource_provider_name = kwargs.get('resource_provider_name', None) + self.status = kwargs.get('status', None) + self.sub_status = kwargs.get('sub_status', None) + self.claims = kwargs.get('claims', None) + + +class RuleMetricDataSource(RuleDataSource): + """A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + :param metric_name: the name of the metric that defines what the rule monitors. + :type metric_name: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleMetricDataSource, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' # type: str + self.metric_name = kwargs.get('metric_name', None) + + +class RuleWebhookAction(RuleAction): + """Specifies the action to post to service when the rule condition is evaluated. The discriminator is always RuleWebhookAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + :param service_uri: the service uri to Post the notification when the alert activates or + resolves. + :type service_uri: str + :param properties: the dictionary of custom properties to include with the post operation. + These data are appended to the webhook payload. + :type properties: dict[str, str] + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleWebhookAction, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' # type: str + self.service_uri = kwargs.get('service_uri', None) + self.properties = kwargs.get('properties', None) + + class ScaleAction(msrest.serialization.Model): """The parameters for the scaling action. @@ -872,7 +1497,7 @@ class ScaleAction(msrest.serialization.Model): decreases the number of instances. Possible values include: "None", "Increase", "Decrease". :type direction: str or ~$(python-base-namespace).v2015_04_01.models.ScaleDirection :param type: Required. the type of action that should occur when the scale rule fires. Possible - values include: "ChangeCount", "PercentChangeCount", "ExactCount". + values include: "ChangeCount", "PercentChangeCount", "ExactCount", "ServiceAllowedNextValue". :type type: str or ~$(python-base-namespace).v2015_04_01.models.ScaleType :param value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. @@ -984,8 +1609,8 @@ class ScaleRuleMetricDimension(msrest.serialization.Model): :param operator: Required. the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. Possible values include: "Equals", "NotEquals". - :type operator: str or ~$(python-base- - namespace).v2015_04_01.models.ScaleRuleMetricDimensionOperationType + :type operator: str or + ~$(python-base-namespace).v2015_04_01.models.ScaleRuleMetricDimensionOperationType :param values: Required. list of dimension values. For example: ["App1","App2"]. :type values: list[str] """ @@ -1039,6 +1664,62 @@ def __init__( self.scope = kwargs.get('scope', None) +class ThresholdRuleCondition(RuleCondition): + """A rule condition based on a metric crossing a threshold. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :param operator: Required. the operator used to compare the data and the threshold. Possible + values include: "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + :type operator: str or ~$(python-base-namespace).v2015_04_01.models.ConditionOperator + :param threshold: Required. the threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + :param time_aggregation: the time aggregation operator. How the data that are collected should + be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible + values include: "Average", "Minimum", "Maximum", "Total", "Last". + :type time_aggregation: str or + ~$(python-base-namespace).v2015_04_01.models.TimeAggregationOperator + """ + + _validation = { + 'odata_type': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ThresholdRuleCondition, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' # type: str + self.operator = kwargs['operator'] + self.threshold = kwargs['threshold'] + self.window_size = kwargs.get('window_size', None) + self.time_aggregation = kwargs.get('time_aggregation', None) + + class TimeWindow(msrest.serialization.Model): """A specific date-time for the profile. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models_py3.py index 8e4b6ec10913..621d5431777a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_models_py3.py @@ -15,6 +15,233 @@ from ._monitor_management_client_enums import * +class Resource(msrest.serialization.Model): + """An azure resource object. + + 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. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AlertRuleResource(Resource): + """The alert rule resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param name_properties_name: Required. the name of the alert rule. + :type name_properties_name: str + :param description: the description of the alert rule that will be included in the alert email. + :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str + :param is_enabled: Required. the flag that indicates whether the alert rule is enabled. + :type is_enabled: bool + :param condition: Required. the condition that results in the alert rule being activated. + :type condition: ~$(python-base-namespace).v2015_04_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2015_04_01.models.RuleAction + :param actions: the array of actions that are performed when the alert rule becomes active, and + when an alert condition is resolved. + :type actions: list[~$(python-base-namespace).v2015_04_01.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'name_properties_name': {'required': True}, + 'is_enabled': {'required': True}, + 'condition': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + location: str, + name_properties_name: str, + is_enabled: bool, + condition: "RuleCondition", + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + provisioning_state: Optional[str] = None, + action: Optional["RuleAction"] = None, + actions: Optional[List["RuleAction"]] = None, + **kwargs + ): + super(AlertRuleResource, self).__init__(location=location, tags=tags, **kwargs) + self.name_properties_name = name_properties_name + self.description = description + self.provisioning_state = provisioning_state + self.is_enabled = is_enabled + self.condition = condition + self.action = action + self.actions = actions + self.last_updated_time = None + + +class AlertRuleResourceCollection(msrest.serialization.Model): + """Represents a collection of alert rule resources. + + :param value: the values for the alert rule resources. + :type value: list[~$(python-base-namespace).v2015_04_01.models.AlertRuleResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AlertRuleResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["AlertRuleResource"]] = None, + **kwargs + ): + super(AlertRuleResourceCollection, self).__init__(**kwargs) + self.value = value + + +class AlertRuleResourcePatch(msrest.serialization.Model): + """The alert rule object for patch operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param name: the name of the alert rule. + :type name: str + :param description: the description of the alert rule that will be included in the alert email. + :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str + :param is_enabled: the flag that indicates whether the alert rule is enabled. + :type is_enabled: bool + :param condition: the condition that results in the alert rule being activated. + :type condition: ~$(python-base-namespace).v2015_04_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2015_04_01.models.RuleAction + :param actions: the array of actions that are performed when the alert rule becomes active, and + when an alert condition is resolved. + :type actions: list[~$(python-base-namespace).v2015_04_01.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: ~datetime.datetime + """ + + _validation = { + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + name: Optional[str] = None, + description: Optional[str] = None, + provisioning_state: Optional[str] = None, + is_enabled: Optional[bool] = None, + condition: Optional["RuleCondition"] = None, + action: Optional["RuleAction"] = None, + actions: Optional[List["RuleAction"]] = None, + **kwargs + ): + super(AlertRuleResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.name = name + self.description = description + self.provisioning_state = provisioning_state + self.is_enabled = is_enabled + self.condition = condition + self.action = action + self.actions = actions + self.last_updated_time = None + + class AutoscaleNotification(msrest.serialization.Model): """Autoscale notification. @@ -22,8 +249,8 @@ class AutoscaleNotification(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :ivar operation: Required. the operation associated with the notification and its value must be - "scale". Default value: "Scale". + :ivar operation: the operation associated with the notification and its value must be "scale". + Has constant value: "Scale". :vartype operation: str :param email: the email notification. :type email: ~$(python-base-namespace).v2015_04_01.models.EmailNotification @@ -107,55 +334,6 @@ def __init__( self.recurrence = recurrence -class Resource(msrest.serialization.Model): - """An azure resource object. - - 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. - - :ivar id: Azure resource Id. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - location: str, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags - - class AutoscaleSettingResource(Resource): """The autoscale setting resource. @@ -186,6 +364,9 @@ class AutoscaleSettingResource(Resource): :param target_resource_uri: the resource identifier of the resource that the autoscale setting should be added to. :type target_resource_uri: str + :param target_resource_location: the location of the resource that the autoscale setting should + be added to. + :type target_resource_location: str """ _validation = { @@ -207,6 +388,7 @@ class AutoscaleSettingResource(Resource): 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + 'target_resource_location': {'key': 'properties.targetResourceLocation', 'type': 'str'}, } def __init__( @@ -219,6 +401,7 @@ def __init__( enabled: Optional[bool] = True, name_properties_name: Optional[str] = None, target_resource_uri: Optional[str] = None, + target_resource_location: Optional[str] = None, **kwargs ): super(AutoscaleSettingResource, self).__init__(location=location, tags=tags, **kwargs) @@ -227,6 +410,7 @@ def __init__( self.enabled = enabled self.name_properties_name = name_properties_name self.target_resource_uri = target_resource_uri + self.target_resource_location = target_resource_location class AutoscaleSettingResourceCollection(msrest.serialization.Model): @@ -279,6 +463,9 @@ class AutoscaleSettingResourcePatch(msrest.serialization.Model): :param target_resource_uri: the resource identifier of the resource that the autoscale setting should be added to. :type target_resource_uri: str + :param target_resource_location: the location of the resource that the autoscale setting should + be added to. + :type target_resource_location: str """ _validation = { @@ -292,6 +479,7 @@ class AutoscaleSettingResourcePatch(msrest.serialization.Model): 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'name': {'key': 'properties.name', 'type': 'str'}, 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + 'target_resource_location': {'key': 'properties.targetResourceLocation', 'type': 'str'}, } def __init__( @@ -303,6 +491,7 @@ def __init__( enabled: Optional[bool] = True, name: Optional[str] = None, target_resource_uri: Optional[str] = None, + target_resource_location: Optional[str] = None, **kwargs ): super(AutoscaleSettingResourcePatch, self).__init__(**kwargs) @@ -312,6 +501,7 @@ def __init__( self.enabled = enabled self.name = name self.target_resource_uri = target_resource_uri + self.target_resource_location = target_resource_location class EmailNotification(msrest.serialization.Model): @@ -337,8 +527,8 @@ class EmailNotification(msrest.serialization.Model): def __init__( self, *, - send_to_subscription_administrator: Optional[bool] = None, - send_to_subscription_co_administrators: Optional[bool] = None, + send_to_subscription_administrator: Optional[bool] = False, + send_to_subscription_co_administrators: Optional[bool] = False, custom_emails: Optional[List[str]] = None, **kwargs ): @@ -661,6 +851,172 @@ def __init__( self.localized_value = localized_value +class RuleCondition(msrest.serialization.Model): + """The condition that results in the alert rule being activated. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocationThresholdRuleCondition, ManagementEventRuleCondition, ThresholdRuleCondition. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition': 'LocationThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition': 'ManagementEventRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition': 'ThresholdRuleCondition'} + } + + def __init__( + self, + *, + data_source: Optional["RuleDataSource"] = None, + **kwargs + ): + super(RuleCondition, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.data_source = data_source + + +class LocationThresholdRuleCondition(RuleCondition): + """A rule condition based on a certain number of locations failing. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + :param failed_location_count: Required. the number of locations that must fail to activate the + alert. + :type failed_location_count: int + """ + + _validation = { + 'odata_type': {'required': True}, + 'failed_location_count': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'failed_location_count': {'key': 'failedLocationCount', 'type': 'int'}, + } + + def __init__( + self, + *, + failed_location_count: int, + data_source: Optional["RuleDataSource"] = None, + window_size: Optional[datetime.timedelta] = None, + **kwargs + ): + super(LocationThresholdRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' # type: str + self.window_size = window_size + self.failed_location_count = failed_location_count + + +class ManagementEventAggregationCondition(msrest.serialization.Model): + """How the data that is collected should be combined over time. + + :param operator: the condition operator. Possible values include: "GreaterThan", + "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + :type operator: str or ~$(python-base-namespace).v2015_04_01.models.ConditionOperator + :param threshold: The threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + } + + def __init__( + self, + *, + operator: Optional[Union[str, "ConditionOperator"]] = None, + threshold: Optional[float] = None, + window_size: Optional[datetime.timedelta] = None, + **kwargs + ): + super(ManagementEventAggregationCondition, self).__init__(**kwargs) + self.operator = operator + self.threshold = threshold + self.window_size = window_size + + +class ManagementEventRuleCondition(RuleCondition): + """A management event rule condition. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :param aggregation: How the data that is collected should be combined over time and when the + alert is activated. Note that for management event alerts aggregation is optional – if it is + not provided then any event will cause the alert to activate. + :type aggregation: + ~$(python-base-namespace).v2015_04_01.models.ManagementEventAggregationCondition + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'aggregation': {'key': 'aggregation', 'type': 'ManagementEventAggregationCondition'}, + } + + def __init__( + self, + *, + data_source: Optional["RuleDataSource"] = None, + aggregation: Optional["ManagementEventAggregationCondition"] = None, + **kwargs + ): + super(ManagementEventRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' # type: str + self.aggregation = aggregation + + class MetricTrigger(msrest.serialization.Model): """The trigger that results in a scaling action. @@ -673,12 +1029,14 @@ class MetricTrigger(msrest.serialization.Model): :param metric_resource_uri: Required. the resource identifier of the resource the rule monitors. :type metric_resource_uri: str + :param metric_resource_location: the location of the resource the rule monitors. + :type metric_resource_location: str :param time_grain: Required. the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute. :type time_grain: ~datetime.timedelta :param statistic: Required. the metric statistic type. How the metrics from multiple instances - are combined. Possible values include: "Average", "Min", "Max", "Sum". + are combined. Possible values include: "Average", "Min", "Max", "Sum", "Count". :type statistic: str or ~$(python-base-namespace).v2015_04_01.models.MetricStatisticType :param time_window: Required. the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. @@ -697,6 +1055,8 @@ class MetricTrigger(msrest.serialization.Model): :param dimensions: List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. :type dimensions: list[~$(python-base-namespace).v2015_04_01.models.ScaleRuleMetricDimension] + :param divide_per_instance: a value indicating whether metric should divide per instance. + :type divide_per_instance: bool """ _validation = { @@ -714,6 +1074,7 @@ class MetricTrigger(msrest.serialization.Model): 'metric_name': {'key': 'metricName', 'type': 'str'}, 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, 'metric_resource_uri': {'key': 'metricResourceUri', 'type': 'str'}, + 'metric_resource_location': {'key': 'metricResourceLocation', 'type': 'str'}, 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, 'statistic': {'key': 'statistic', 'type': 'str'}, 'time_window': {'key': 'timeWindow', 'type': 'duration'}, @@ -721,6 +1082,7 @@ class MetricTrigger(msrest.serialization.Model): 'operator': {'key': 'operator', 'type': 'str'}, 'threshold': {'key': 'threshold', 'type': 'float'}, 'dimensions': {'key': 'dimensions', 'type': '[ScaleRuleMetricDimension]'}, + 'divide_per_instance': {'key': 'dividePerInstance', 'type': 'bool'}, } def __init__( @@ -735,13 +1097,16 @@ def __init__( operator: Union[str, "ComparisonOperationType"], threshold: float, metric_namespace: Optional[str] = None, + metric_resource_location: Optional[str] = None, dimensions: Optional[List["ScaleRuleMetricDimension"]] = None, + divide_per_instance: Optional[bool] = None, **kwargs ): super(MetricTrigger, self).__init__(**kwargs) self.metric_name = metric_name self.metric_namespace = metric_namespace self.metric_resource_uri = metric_resource_uri + self.metric_resource_location = metric_resource_location self.time_grain = time_grain self.statistic = statistic self.time_window = time_window @@ -749,6 +1114,7 @@ def __init__( self.operator = operator self.threshold = threshold self.dimensions = dimensions + self.divide_per_instance = divide_per_instance class Operation(msrest.serialization.Model): @@ -947,6 +1313,336 @@ def __init__( self.minutes = minutes +class RuleAction(msrest.serialization.Model): + """The action that is performed when the alert rule becomes active, and when an alert condition is resolved. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleEmailAction, RuleWebhookAction. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.RuleEmailAction': 'RuleEmailAction', 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction': 'RuleWebhookAction'} + } + + def __init__( + self, + **kwargs + ): + super(RuleAction, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + + +class RuleDataSource(msrest.serialization.Model): + """The resource from which the rule collects its data. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleManagementEventDataSource, RuleMetricDataSource. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource': 'RuleManagementEventDataSource', 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource': 'RuleMetricDataSource'} + } + + def __init__( + self, + *, + resource_uri: Optional[str] = None, + legacy_resource_id: Optional[str] = None, + resource_location: Optional[str] = None, + metric_namespace: Optional[str] = None, + **kwargs + ): + super(RuleDataSource, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.resource_uri = resource_uri + self.legacy_resource_id = legacy_resource_id + self.resource_location = resource_location + self.metric_namespace = metric_namespace + + +class RuleEmailAction(RuleAction): + """Specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + :param send_to_service_owners: Whether the administrators (service and co-administrators) of + the service should be notified when the alert is activated. + :type send_to_service_owners: bool + :param custom_emails: the list of administrator's custom email addresses to notify of the + activation of the alert. + :type custom_emails: list[str] + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'send_to_service_owners': {'key': 'sendToServiceOwners', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__( + self, + *, + send_to_service_owners: Optional[bool] = None, + custom_emails: Optional[List[str]] = None, + **kwargs + ): + super(RuleEmailAction, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' # type: str + self.send_to_service_owners = send_to_service_owners + self.custom_emails = custom_emails + + +class RuleManagementEventClaimsDataSource(msrest.serialization.Model): + """The claims for a rule management event data source. + + :param email_address: the email address. + :type email_address: str + """ + + _attribute_map = { + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + email_address: Optional[str] = None, + **kwargs + ): + super(RuleManagementEventClaimsDataSource, self).__init__(**kwargs) + self.email_address = email_address + + +class RuleManagementEventDataSource(RuleDataSource): + """A rule management event data source. The discriminator fields is always RuleManagementEventDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + :param event_name: the event name. + :type event_name: str + :param event_source: the event source. + :type event_source: str + :param level: the level. + :type level: str + :param operation_name: The name of the operation that should be checked for. If no name is + provided, any operation will match. + :type operation_name: str + :param resource_group_name: the resource group name. + :type resource_group_name: str + :param resource_provider_name: the resource provider name. + :type resource_provider_name: str + :param status: The status of the operation that should be checked for. If no status is + provided, any status will match. + :type status: str + :param sub_status: the substatus. + :type sub_status: str + :param claims: the claims. + :type claims: ~$(python-base-namespace).v2015_04_01.models.RuleManagementEventClaimsDataSource + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'event_source': {'key': 'eventSource', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_provider_name': {'key': 'resourceProviderName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'sub_status': {'key': 'subStatus', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'RuleManagementEventClaimsDataSource'}, + } + + def __init__( + self, + *, + resource_uri: Optional[str] = None, + legacy_resource_id: Optional[str] = None, + resource_location: Optional[str] = None, + metric_namespace: Optional[str] = None, + event_name: Optional[str] = None, + event_source: Optional[str] = None, + level: Optional[str] = None, + operation_name: Optional[str] = None, + resource_group_name: Optional[str] = None, + resource_provider_name: Optional[str] = None, + status: Optional[str] = None, + sub_status: Optional[str] = None, + claims: Optional["RuleManagementEventClaimsDataSource"] = None, + **kwargs + ): + super(RuleManagementEventDataSource, self).__init__(resource_uri=resource_uri, legacy_resource_id=legacy_resource_id, resource_location=resource_location, metric_namespace=metric_namespace, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' # type: str + self.event_name = event_name + self.event_source = event_source + self.level = level + self.operation_name = operation_name + self.resource_group_name = resource_group_name + self.resource_provider_name = resource_provider_name + self.status = status + self.sub_status = sub_status + self.claims = claims + + +class RuleMetricDataSource(RuleDataSource): + """A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + :param metric_name: the name of the metric that defines what the rule monitors. + :type metric_name: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_uri: Optional[str] = None, + legacy_resource_id: Optional[str] = None, + resource_location: Optional[str] = None, + metric_namespace: Optional[str] = None, + metric_name: Optional[str] = None, + **kwargs + ): + super(RuleMetricDataSource, self).__init__(resource_uri=resource_uri, legacy_resource_id=legacy_resource_id, resource_location=resource_location, metric_namespace=metric_namespace, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' # type: str + self.metric_name = metric_name + + +class RuleWebhookAction(RuleAction): + """Specifies the action to post to service when the rule condition is evaluated. The discriminator is always RuleWebhookAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + :param service_uri: the service uri to Post the notification when the alert activates or + resolves. + :type service_uri: str + :param properties: the dictionary of custom properties to include with the post operation. + These data are appended to the webhook payload. + :type properties: dict[str, str] + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + *, + service_uri: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + **kwargs + ): + super(RuleWebhookAction, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' # type: str + self.service_uri = service_uri + self.properties = properties + + class ScaleAction(msrest.serialization.Model): """The parameters for the scaling action. @@ -956,7 +1652,7 @@ class ScaleAction(msrest.serialization.Model): decreases the number of instances. Possible values include: "None", "Increase", "Decrease". :type direction: str or ~$(python-base-namespace).v2015_04_01.models.ScaleDirection :param type: Required. the type of action that should occur when the scale rule fires. Possible - values include: "ChangeCount", "PercentChangeCount", "ExactCount". + values include: "ChangeCount", "PercentChangeCount", "ExactCount", "ServiceAllowedNextValue". :type type: str or ~$(python-base-namespace).v2015_04_01.models.ScaleType :param value: the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1. @@ -1080,8 +1776,8 @@ class ScaleRuleMetricDimension(msrest.serialization.Model): :param operator: Required. the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. Possible values include: "Equals", "NotEquals". - :type operator: str or ~$(python-base- - namespace).v2015_04_01.models.ScaleRuleMetricDimensionOperationType + :type operator: str or + ~$(python-base-namespace).v2015_04_01.models.ScaleRuleMetricDimensionOperationType :param values: Required. list of dimension values. For example: ["App1","App2"]. :type values: list[str] """ @@ -1143,6 +1839,68 @@ def __init__( self.scope = scope +class ThresholdRuleCondition(RuleCondition): + """A rule condition based on a metric crossing a threshold. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_04_01.models.RuleDataSource + :param operator: Required. the operator used to compare the data and the threshold. Possible + values include: "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + :type operator: str or ~$(python-base-namespace).v2015_04_01.models.ConditionOperator + :param threshold: Required. the threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + :param time_aggregation: the time aggregation operator. How the data that are collected should + be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible + values include: "Average", "Minimum", "Maximum", "Total", "Last". + :type time_aggregation: str or + ~$(python-base-namespace).v2015_04_01.models.TimeAggregationOperator + """ + + _validation = { + 'odata_type': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'str'}, + } + + def __init__( + self, + *, + operator: Union[str, "ConditionOperator"], + threshold: float, + data_source: Optional["RuleDataSource"] = None, + window_size: Optional[datetime.timedelta] = None, + time_aggregation: Optional[Union[str, "TimeAggregationOperator"]] = None, + **kwargs + ): + super(ThresholdRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' # type: str + self.operator = operator + self.threshold = threshold + self.window_size = window_size + self.time_aggregation = time_aggregation + + class TimeWindow(msrest.serialization.Model): """A specific date-time for the profile. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_monitor_management_client_enums.py index 8ff9a5c89e3d..37b2db1f18f4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/models/_monitor_management_client_enums.py @@ -37,6 +37,15 @@ class ComparisonOperationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum LESS_THAN = "LessThan" LESS_THAN_OR_EQUAL = "LessThanOrEqual" +class ConditionOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Operators allowed in the rule condition. + """ + + GREATER_THAN = "GreaterThan" + GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + LESS_THAN = "LessThan" + LESS_THAN_OR_EQUAL = "LessThanOrEqual" + class EventLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """the event level """ @@ -55,6 +64,7 @@ class MetricStatisticType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MIN = "Min" MAX = "Max" SUM = "Sum" + COUNT = "Count" class RecurrenceFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """the recurrence frequency. How often the schedule profile should take effect. This value must be @@ -95,6 +105,17 @@ class ScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): CHANGE_COUNT = "ChangeCount" PERCENT_CHANGE_COUNT = "PercentChangeCount" EXACT_COUNT = "ExactCount" + SERVICE_ALLOWED_NEXT_VALUE = "ServiceAllowedNextValue" + +class TimeAggregationOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Aggregation operators allowed in a rule. + """ + + AVERAGE = "Average" + MINIMUM = "Minimum" + MAXIMUM = "Maximum" + TOTAL = "Total" + LAST = "Last" class TimeAggregationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """time aggregation type. How the data that is collected should be combined over time. The default diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/__init__.py index 0246aac3c8ae..76293309fbf0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/__init__.py @@ -11,6 +11,7 @@ from ._event_categories_operations import EventCategoriesOperations from ._operations import Operations from ._tenant_activity_logs_operations import TenantActivityLogsOperations +from ._alert_rules_operations import AlertRulesOperations __all__ = [ 'ActivityLogsOperations', @@ -18,4 +19,5 @@ 'EventCategoriesOperations', 'Operations', 'TenantActivityLogsOperations', + 'AlertRulesOperations', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py index 96a18678e754..e83da6d5d60a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_activity_logs_operations.py @@ -99,7 +99,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -130,7 +130,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -139,4 +139,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/eventtypes/management/values'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/eventtypes/management/values'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py new file mode 100644 index 000000000000..b9931cb2c2b9 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_alert_rules_operations.py @@ -0,0 +1,448 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AlertRulesOperations(object): + """AlertRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2015_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_or_update( + self, + resource_group_name, # type: str + rule_name, # type: str + parameters, # type: "_models.AlertRuleResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AlertRuleResource" + """Creates or updates a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param parameters: The parameters of the rule to create or update. + :type parameters: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AlertRuleResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AlertRuleResource" + """Gets a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + rule_name, # type: str + alert_rules_resource, # type: "_models.AlertRuleResourcePatch" + **kwargs # type: Any + ): + # type: (...) -> "_models.AlertRuleResource" + """Updates an existing classic metric AlertRuleResource. To update other fields use the + CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param alert_rules_resource: Parameters supplied to the operation. + :type alert_rules_resource: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResourcePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_04_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(alert_rules_resource, 'AlertRuleResourcePatch') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AlertRuleResourceCollection"] + """List the classic metric alert rules within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_04_01.models.AlertRuleResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AlertRuleResourceCollection"] + """List the classic metric alert rules within a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_04_01.models.AlertRuleResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py index 0d0d541a15c5..ffd1174490a1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_autoscale_settings_operations.py @@ -78,7 +78,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -106,7 +106,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -115,7 +115,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore def create_or_update( self, @@ -152,7 +152,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -174,7 +174,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -187,7 +187,7 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore def delete( self, @@ -220,7 +220,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -238,13 +238,13 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore def get( self, @@ -277,7 +277,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -295,7 +295,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) @@ -304,7 +304,7 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore def update( self, @@ -340,7 +340,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), } @@ -364,7 +364,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) @@ -373,7 +373,7 @@ def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore def list_by_subscription( self, @@ -404,7 +404,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -432,7 +432,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -441,4 +441,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/autoscalesettings'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py index a694d451cfc9..c5d271a71e2c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_event_categories_operations.py @@ -100,7 +100,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -109,4 +109,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/microsoft.insights/eventcategories'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.Insights/eventcategories'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py index 6135ddd2958a..d57820bb6d71 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py @@ -89,4 +89,4 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/providers/microsoft.insights/operations'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.Insights/operations'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py index b16eb5426291..91d274582a84 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_tenant_activity_logs_operations.py @@ -69,10 +69,11 @@ def list( ':code:``' and eventChannels eq 'Admin, Operation'.:code:`
`- List events for a resource provider: $filter=eventTimestamp ge ':code:``' and eventTimestamp le ':code:``' and eventChannels eq 'Admin, Operation' and resourceProvider eq - ':code:``'.:code:`
`- List events for a correlation Id: api- - version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and eventTimestamp - le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and correlationId eq - ':code:``'.:code:`
`\ **NOTE**\ : No other syntax is allowed. + ':code:``'.:code:`
`- List events for a correlation Id: + api-version=2014-04-01&$filter=eventTimestamp ge '2014-07-16T04:36:37.6407898Z' and + eventTimestamp le '2014-07-20T04:36:37.6407898Z' and eventChannels eq 'Admin, Operation' and + correlationId eq ':code:``'.:code:`
`\ **NOTE**\ : No other syntax is + allowed. :type filter: str :param select: Used to fetch events with only the given properties.:code:`
`The **$select** argument is a comma separated list of property names to be returned. Possible values are: @@ -131,7 +132,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -140,4 +141,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/providers/microsoft.insights/eventtypes/management/values'} # type: ignore + list.metadata = {'url': '/providers/Microsoft.Insights/eventtypes/management/values'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_configuration.py index 9199b0909a68..224f0bceaf6e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,20 +29,25 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str """ def __init__( self, credential, # type: "TokenCredential" + subscription_id, # type: str **kwargs # type: Any ): # type: (...) -> None if credential is None: raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") super(MonitorManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential - self.api_version = "2015-07-01" + self.subscription_id = subscription_id self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_metadata.json index 04615e710b29..01811c9b22b5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_metadata.json @@ -1,6 +1,6 @@ { "chosen_version": "2015-07-01", - "total_api_version_list": ["2015-07-01"], + "total_api_version_list": ["2014-04-01", "2015-07-01"], "client": { "name": "MonitorManagementClient", "filename": "_monitor_management_client", @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -18,32 +20,87 @@ "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials.TokenCredential", "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true } }, "constant": { }, - "call": "credential" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { - "service_diagnostic_settings": "ServiceDiagnosticSettingsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + "service_diagnostic_settings": "ServiceDiagnosticSettingsOperations", + "metric_definitions": "MetricDefinitionsOperations", + "alert_rules": "AlertRulesOperations", + "operations": "Operations" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_management_client.py index dfd0c5dbf56a..2f4d172e5c2a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_monitor_management_client.py @@ -16,9 +16,13 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ServiceDiagnosticSettingsOperations +from .operations import MetricDefinitionsOperations +from .operations import AlertRulesOperations +from .operations import Operations from . import models @@ -27,21 +31,30 @@ class MonitorManagementClient(object): :ivar service_diagnostic_settings: ServiceDiagnosticSettingsOperations operations :vartype service_diagnostic_settings: $(python-base-namespace).v2015_07_01.operations.ServiceDiagnosticSettingsOperations + :ivar metric_definitions: MetricDefinitionsOperations operations + :vartype metric_definitions: $(python-base-namespace).v2015_07_01.operations.MetricDefinitionsOperations + :ivar alert_rules: AlertRulesOperations operations + :vartype alert_rules: $(python-base-namespace).v2015_07_01.operations.AlertRulesOperations + :ivar operations: Operations operations + :vartype operations: $(python-base-namespace).v2015_07_01.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str :param str base_url: Service URL """ def __init__( self, credential, # type: "TokenCredential" + subscription_id, # type: str base_url=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> None if not base_url: base_url = 'https://management.azure.com' - self._config = MonitorManagementClientConfiguration(credential, **kwargs) + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -51,6 +64,30 @@ def __init__( self.service_diagnostic_settings = ServiceDiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + self.metric_definitions = MetricDefinitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.alert_rules = AlertRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response def close(self): # type: () -> None diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_configuration.py index 514386e5d273..a1b513c610d4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,19 +27,24 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str """ def __init__( self, credential: "AsyncTokenCredential", + subscription_id: str, **kwargs: Any ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") super(MonitorManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential - self.api_version = "2015-07-01" + self.subscription_id = subscription_id self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_management_client.py index ba78ca1a42c1..dc53aa1b361b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -17,6 +18,9 @@ from ._configuration import MonitorManagementClientConfiguration from .operations import ServiceDiagnosticSettingsOperations +from .operations import MetricDefinitionsOperations +from .operations import AlertRulesOperations +from .operations import Operations from .. import models @@ -25,20 +29,29 @@ class MonitorManagementClient(object): :ivar service_diagnostic_settings: ServiceDiagnosticSettingsOperations operations :vartype service_diagnostic_settings: $(python-base-namespace).v2015_07_01.aio.operations.ServiceDiagnosticSettingsOperations + :ivar metric_definitions: MetricDefinitionsOperations operations + :vartype metric_definitions: $(python-base-namespace).v2015_07_01.aio.operations.MetricDefinitionsOperations + :ivar alert_rules: AlertRulesOperations operations + :vartype alert_rules: $(python-base-namespace).v2015_07_01.aio.operations.AlertRulesOperations + :ivar operations: Operations operations + :vartype operations: $(python-base-namespace).v2015_07_01.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str :param str base_url: Service URL """ def __init__( self, credential: "AsyncTokenCredential", + subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: if not base_url: base_url = 'https://management.azure.com' - self._config = MonitorManagementClientConfiguration(credential, **kwargs) + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -48,6 +61,29 @@ def __init__( self.service_diagnostic_settings = ServiceDiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + self.metric_definitions = MetricDefinitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.alert_rules = AlertRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/__init__.py index c7d51f79a3e2..28c5041be1cd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/__init__.py @@ -7,7 +7,13 @@ # -------------------------------------------------------------------------- from ._service_diagnostic_settings_operations import ServiceDiagnosticSettingsOperations +from ._metric_definitions_operations import MetricDefinitionsOperations +from ._alert_rules_operations import AlertRulesOperations +from ._operations import Operations __all__ = [ 'ServiceDiagnosticSettingsOperations', + 'MetricDefinitionsOperations', + 'AlertRulesOperations', + 'Operations', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py new file mode 100644 index 000000000000..cd9b17b873eb --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_alert_rules_operations.py @@ -0,0 +1,438 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AlertRulesOperations: + """AlertRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2015_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_or_update( + self, + resource_group_name: str, + rule_name: str, + parameters: "_models.AlertRuleResource", + **kwargs: Any + ) -> "_models.AlertRuleResource": + """Creates or updates a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param parameters: The parameters of the rule to create or update. + :type parameters: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AlertRuleResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + rule_name: str, + **kwargs: Any + ) -> None: + """Deletes a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + rule_name: str, + **kwargs: Any + ) -> "_models.AlertRuleResource": + """Gets a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + rule_name: str, + alert_rules_resource: "_models.AlertRuleResourcePatch", + **kwargs: Any + ) -> "_models.AlertRuleResource": + """Updates an existing classic metric AlertRuleResource. To update other fields use the + CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param alert_rules_resource: Parameters supplied to the operation. + :type alert_rules_resource: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResourcePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(alert_rules_resource, 'AlertRuleResourcePatch') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AlertRuleResourceCollection"]: + """List the classic metric alert rules within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_07_01.models.AlertRuleResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AlertRuleResourceCollection"]: + """List the classic metric alert rules within a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_07_01.models.AlertRuleResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py new file mode 100644 index 000000000000..121d8fa7a388 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_metric_definitions_operations.py @@ -0,0 +1,122 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MetricDefinitionsOperations: + """MetricDefinitionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2015_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_uri: str, + filter: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.MetricDefinitionCollection"]: + """Lists the metric definitions for the resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param filter: Reduces the set of data collected by retrieving particular metric definitions + from all the definitions available for the resource.:code:`
`For example, to get just the + definition for the 'CPU percentage' counter: $filter=name.value eq '\Processor(_Total)\% + Processor Time'.:code:`
`Multiple metrics can be retrieved by joining together *'name eq + :code:``'* clauses separated by *or* logical operators.:code:`
`\ **NOTE**\ : No + other syntax is allowed. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2015_07_01.models.MetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2015-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('MetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/metricDefinitions'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py new file mode 100644 index 000000000000..969fd85250f8 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_operations.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class Operations: + """Operations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2015_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + **kwargs: Any + ) -> "_models.OperationListResult": + """Lists all of the available operations from Microsoft.Insights provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationListResult, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_07_01.models.OperationListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2015-07-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Insights/operations'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py index 6032168120e4..12badcc3e8df 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/aio/operations/_service_diagnostic_settings_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def get( self, resource_uri: str, - **kwargs + **kwargs: Any ) -> "_models.ServiceDiagnosticSettingsResource": """Gets the active diagnostic settings for the specified resource. @@ -83,7 +83,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceDiagnosticSettingsResource', pipeline_response) @@ -98,7 +98,7 @@ async def create_or_update( self, resource_uri: str, parameters: "_models.ServiceDiagnosticSettingsResource", - **kwargs + **kwargs: Any ) -> "_models.ServiceDiagnosticSettingsResource": """Create or update new diagnostic settings for the specified resource. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/__init__.py index f1974dfd3d2d..751752c69a4b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/__init__.py @@ -7,25 +7,123 @@ # -------------------------------------------------------------------------- try: + from ._models_py3 import AlertRuleResource + from ._models_py3 import AlertRuleResourceCollection + from ._models_py3 import AlertRuleResourcePatch + from ._models_py3 import DimensionProperties + from ._models_py3 import ErrorContract from ._models_py3 import ErrorResponse + from ._models_py3 import LocalizableString + from ._models_py3 import LocationThresholdRuleCondition from ._models_py3 import LogSettings + from ._models_py3 import LogSpecification + from ._models_py3 import ManagementEventAggregationCondition + from ._models_py3 import ManagementEventRuleCondition + from ._models_py3 import MetricAvailability + from ._models_py3 import MetricAvailabilityLocation + from ._models_py3 import MetricDefinition + from ._models_py3 import MetricDefinitionCollection from ._models_py3 import MetricSettings + from ._models_py3 import MetricSpecification + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult from ._models_py3 import Resource from ._models_py3 import RetentionPolicy + from ._models_py3 import RuleAction + from ._models_py3 import RuleCondition + from ._models_py3 import RuleDataSource + from ._models_py3 import RuleEmailAction + from ._models_py3 import RuleManagementEventClaimsDataSource + from ._models_py3 import RuleManagementEventDataSource + from ._models_py3 import RuleMetricDataSource + from ._models_py3 import RuleWebhookAction from ._models_py3 import ServiceDiagnosticSettingsResource + from ._models_py3 import ServiceSpecification + from ._models_py3 import TableInfoEntry + from ._models_py3 import ThresholdRuleCondition except (SyntaxError, ImportError): + from ._models import AlertRuleResource # type: ignore + from ._models import AlertRuleResourceCollection # type: ignore + from ._models import AlertRuleResourcePatch # type: ignore + from ._models import DimensionProperties # type: ignore + from ._models import ErrorContract # type: ignore from ._models import ErrorResponse # type: ignore + from ._models import LocalizableString # type: ignore + from ._models import LocationThresholdRuleCondition # type: ignore from ._models import LogSettings # type: ignore + from ._models import LogSpecification # type: ignore + from ._models import ManagementEventAggregationCondition # type: ignore + from ._models import ManagementEventRuleCondition # type: ignore + from ._models import MetricAvailability # type: ignore + from ._models import MetricAvailabilityLocation # type: ignore + from ._models import MetricDefinition # type: ignore + from ._models import MetricDefinitionCollection # type: ignore from ._models import MetricSettings # type: ignore + from ._models import MetricSpecification # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationListResult # type: ignore from ._models import Resource # type: ignore from ._models import RetentionPolicy # type: ignore + from ._models import RuleAction # type: ignore + from ._models import RuleCondition # type: ignore + from ._models import RuleDataSource # type: ignore + from ._models import RuleEmailAction # type: ignore + from ._models import RuleManagementEventClaimsDataSource # type: ignore + from ._models import RuleManagementEventDataSource # type: ignore + from ._models import RuleMetricDataSource # type: ignore + from ._models import RuleWebhookAction # type: ignore from ._models import ServiceDiagnosticSettingsResource # type: ignore + from ._models import ServiceSpecification # type: ignore + from ._models import TableInfoEntry # type: ignore + from ._models import ThresholdRuleCondition # type: ignore + +from ._monitor_management_client_enums import ( + AggregationType, + ConditionOperator, + TimeAggregationOperator, + Unit, +) __all__ = [ + 'AlertRuleResource', + 'AlertRuleResourceCollection', + 'AlertRuleResourcePatch', + 'DimensionProperties', + 'ErrorContract', 'ErrorResponse', + 'LocalizableString', + 'LocationThresholdRuleCondition', 'LogSettings', + 'LogSpecification', + 'ManagementEventAggregationCondition', + 'ManagementEventRuleCondition', + 'MetricAvailability', + 'MetricAvailabilityLocation', + 'MetricDefinition', + 'MetricDefinitionCollection', 'MetricSettings', + 'MetricSpecification', + 'Operation', + 'OperationDisplay', + 'OperationListResult', 'Resource', 'RetentionPolicy', + 'RuleAction', + 'RuleCondition', + 'RuleDataSource', + 'RuleEmailAction', + 'RuleManagementEventClaimsDataSource', + 'RuleManagementEventDataSource', + 'RuleMetricDataSource', + 'RuleWebhookAction', 'ServiceDiagnosticSettingsResource', + 'ServiceSpecification', + 'TableInfoEntry', + 'ThresholdRuleCondition', + 'AggregationType', + 'ConditionOperator', + 'TimeAggregationOperator', + 'Unit', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models.py index b6bd008c194f..6381ac0370dc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models.py @@ -10,6 +10,265 @@ import msrest.serialization +class Resource(msrest.serialization.Model): + """An azure resource object. + + 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. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class AlertRuleResource(Resource): + """The alert rule resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param name_properties_name: Required. the name of the alert rule. + :type name_properties_name: str + :param description: the description of the alert rule that will be included in the alert email. + :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str + :param is_enabled: Required. the flag that indicates whether the alert rule is enabled. + :type is_enabled: bool + :param condition: Required. the condition that results in the alert rule being activated. + :type condition: ~$(python-base-namespace).v2015_07_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2015_07_01.models.RuleAction + :param actions: the array of actions that are performed when the alert rule becomes active, and + when an alert condition is resolved. + :type actions: list[~$(python-base-namespace).v2015_07_01.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'name_properties_name': {'required': True}, + 'is_enabled': {'required': True}, + 'condition': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleResource, self).__init__(**kwargs) + self.name_properties_name = kwargs['name_properties_name'] + self.description = kwargs.get('description', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.is_enabled = kwargs['is_enabled'] + self.condition = kwargs['condition'] + self.action = kwargs.get('action', None) + self.actions = kwargs.get('actions', None) + self.last_updated_time = None + + +class AlertRuleResourceCollection(msrest.serialization.Model): + """Represents a collection of alert rule resources. + + :param value: the values for the alert rule resources. + :type value: list[~$(python-base-namespace).v2015_07_01.models.AlertRuleResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AlertRuleResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class AlertRuleResourcePatch(msrest.serialization.Model): + """The alert rule object for patch operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param name: the name of the alert rule. + :type name: str + :param description: the description of the alert rule that will be included in the alert email. + :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str + :param is_enabled: the flag that indicates whether the alert rule is enabled. + :type is_enabled: bool + :param condition: the condition that results in the alert rule being activated. + :type condition: ~$(python-base-namespace).v2015_07_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2015_07_01.models.RuleAction + :param actions: the array of actions that are performed when the alert rule becomes active, and + when an alert condition is resolved. + :type actions: list[~$(python-base-namespace).v2015_07_01.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: ~datetime.datetime + """ + + _validation = { + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.is_enabled = kwargs.get('is_enabled', None) + self.condition = kwargs.get('condition', None) + self.action = kwargs.get('action', None) + self.actions = kwargs.get('actions', None) + self.last_updated_time = None + + +class DimensionProperties(msrest.serialization.Model): + """Type of operation: get, read, delete, etc. + + :param name: Name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Legacy usage, should not set. + :type to_be_exported_for_shoebox: bool + :param is_hidden: When set, the dimension is hidden from the customer, used in conjunction with + the defaultDimensionValues field below. + :type is_hidden: bool + :param default_dimension_values: Default dimension value to be sent down for the hidden + dimension during query. + :type default_dimension_values: any + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'default_dimension_values': {'key': 'defaultDimensionValues', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(DimensionProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + self.is_hidden = kwargs.get('is_hidden', None) + self.default_dimension_values = kwargs.get('default_dimension_values', None) + + +class ErrorContract(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~$(python-base-namespace).v2015_07_01.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorContract, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + class ErrorResponse(msrest.serialization.Model): """Describes the format of Error response. @@ -20,52 +279,414 @@ class ErrorResponse(msrest.serialization.Model): """ _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, + '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 LocalizableString(msrest.serialization.Model): + """The localizable string class. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. the invariant value. + :type value: str + :param localized_value: the locale specific value. + :type localized_value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LocalizableString, self).__init__(**kwargs) + self.value = kwargs['value'] + self.localized_value = kwargs.get('localized_value', None) + + +class RuleCondition(msrest.serialization.Model): + """The condition that results in the alert rule being activated. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocationThresholdRuleCondition, ManagementEventRuleCondition, ThresholdRuleCondition. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition': 'LocationThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition': 'ManagementEventRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition': 'ThresholdRuleCondition'} + } + + def __init__( + self, + **kwargs + ): + super(RuleCondition, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.data_source = kwargs.get('data_source', None) + + +class LocationThresholdRuleCondition(RuleCondition): + """A rule condition based on a certain number of locations failing. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + :param failed_location_count: Required. the number of locations that must fail to activate the + alert. + :type failed_location_count: int + """ + + _validation = { + 'odata_type': {'required': True}, + 'failed_location_count': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'failed_location_count': {'key': 'failedLocationCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(LocationThresholdRuleCondition, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' # type: str + self.window_size = kwargs.get('window_size', None) + self.failed_location_count = kwargs['failed_location_count'] + + +class LogSettings(msrest.serialization.Model): + """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. + + All required parameters must be populated in order to send to Azure. + + :param category: Name of a Diagnostic Log category for a resource type this setting is applied + to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET + diagnostic settings operation. + :type category: str + :param enabled: Required. a value indicating whether this log is enabled. + :type enabled: bool + :param retention_policy: the retention policy for this log. + :type retention_policy: ~$(python-base-namespace).v2015_07_01.models.RetentionPolicy + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSettings, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.enabled = kwargs['enabled'] + self.retention_policy = kwargs.get('retention_policy', None) + + +class LogSpecification(msrest.serialization.Model): + """Log specification of operation. + + :param name: Name of log specification. + :type name: str + :param display_name: Display name of log specification. + :type display_name: str + :param blob_duration: Blob duration of specification. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class ManagementEventAggregationCondition(msrest.serialization.Model): + """How the data that is collected should be combined over time. + + :param operator: the condition operator. Possible values include: "GreaterThan", + "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + :type operator: str or ~$(python-base-namespace).v2015_07_01.models.ConditionOperator + :param threshold: The threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagementEventAggregationCondition, self).__init__(**kwargs) + self.operator = kwargs.get('operator', None) + self.threshold = kwargs.get('threshold', None) + self.window_size = kwargs.get('window_size', None) + + +class ManagementEventRuleCondition(RuleCondition): + """A management event rule condition. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :param aggregation: How the data that is collected should be combined over time and when the + alert is activated. Note that for management event alerts aggregation is optional – if it is + not provided then any event will cause the alert to activate. + :type aggregation: + ~$(python-base-namespace).v2015_07_01.models.ManagementEventAggregationCondition + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'aggregation': {'key': 'aggregation', 'type': 'ManagementEventAggregationCondition'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagementEventRuleCondition, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' # type: str + self.aggregation = kwargs.get('aggregation', None) + + +class MetricAvailability(msrest.serialization.Model): + """Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. + + :param time_grain: the time grain specifies the aggregation interval for the metric. Expressed + as a duration 'PT1M', 'P1D', etc. + :type time_grain: ~datetime.timedelta + :param retention: the retention period for the metric at the specified timegrain. Expressed as + a duration 'PT1M', 'P1D', etc. + :type retention: ~datetime.timedelta + :param location: Info about where the metric data is stored. + :type location: ~$(python-base-namespace).v2015_07_01.models.MetricAvailabilityLocation + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'retention': {'key': 'retention', 'type': 'duration'}, + 'location': {'key': 'location', 'type': 'MetricAvailabilityLocation'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.retention = kwargs.get('retention', None) + self.location = kwargs.get('location', None) + + +class MetricAvailabilityLocation(msrest.serialization.Model): + """Info about where the metric data is stored. + + :param table_endpoint: The url for the storage account. + :type table_endpoint: str + :param table_info: Info about the storage tables storing this resources metrics. + :type table_info: list[~$(python-base-namespace).v2015_07_01.models.TableInfoEntry] + :param partition_key: partition key in the table where the metrics for this resource are + stored. + :type partition_key: str + """ + + _attribute_map = { + 'table_endpoint': {'key': 'tableEndpoint', 'type': 'str'}, + 'table_info': {'key': 'tableInfo', 'type': '[TableInfoEntry]'}, + 'partition_key': {'key': 'partitionKey', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricAvailabilityLocation, self).__init__(**kwargs) + self.table_endpoint = kwargs.get('table_endpoint', None) + self.table_info = kwargs.get('table_info', None) + self.partition_key = kwargs.get('partition_key', None) + + +class MetricDefinition(msrest.serialization.Model): + """Metric definition class specifies the metadata for a metric. + + :param resource_id: The resource identifier of the resource that emitted the metric. + :type resource_id: str + :param resource_uri: The resource identifier of the resource that emitted the metric. + :type resource_uri: str + :param name: the name and the display name of the metric, i.e. it is a localizable string. + :type name: ~$(python-base-namespace).v2015_07_01.models.LocalizableString + :param category: The category of this metric. + :type category: str + :param unit: the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", + "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds". + :type unit: str or ~$(python-base-namespace).v2015_07_01.models.Unit + :param start_time: Start time of the metadata request timespan. + :type start_time: ~datetime.datetime + :param end_time: End time of the metadata request timespan. + :type end_time: ~datetime.datetime + :param primary_aggregation_type: the primary aggregation type value defining how to use the + values for display. Possible values include: "None", "Average", "Count", "Minimum", "Maximum", + "Total". + :type primary_aggregation_type: str or + ~$(python-base-namespace).v2015_07_01.models.AggregationType + :param supported_aggregation_types: List of all aggregations that are applicable for this + metric. + :type supported_aggregation_types: list[str or + ~$(python-base-namespace).v2015_07_01.models.AggregationType] + :param metric_availabilities: the collection of what aggregation intervals are available to be + queried. + :type metric_availabilities: + list[~$(python-base-namespace).v2015_07_01.models.MetricAvailability] + :param id: the resource identifier of the metric definition. + :type id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'category': {'key': 'category', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + 'id': {'key': 'id', 'type': 'str'}, } def __init__( self, **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) + super(MetricDefinition, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.resource_uri = kwargs.get('resource_uri', None) + self.name = kwargs.get('name', None) + self.category = kwargs.get('category', None) + self.unit = kwargs.get('unit', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.primary_aggregation_type = kwargs.get('primary_aggregation_type', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.metric_availabilities = kwargs.get('metric_availabilities', None) + self.id = kwargs.get('id', None) -class LogSettings(msrest.serialization.Model): - """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. +class MetricDefinitionCollection(msrest.serialization.Model): + """Represents collection of metric definitions. All required parameters must be populated in order to send to Azure. - :param category: Name of a Diagnostic Log category for a resource type this setting is applied - to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET - diagnostic settings operation. - :type category: str - :param enabled: Required. a value indicating whether this log is enabled. - :type enabled: bool - :param retention_policy: the retention policy for this log. - :type retention_policy: ~$(python-base-namespace).v2015_07_01.models.RetentionPolicy + :param id: Resource Id for these metric definitions. + :type id: str + :param value: Required. the values for the metric definitions. + :type value: list[~$(python-base-namespace).v2015_07_01.models.MetricDefinition] """ _validation = { - 'enabled': {'required': True}, + 'value': {'required': True}, } _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'id': {'key': 'id', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[MetricDefinition]'}, } def __init__( self, **kwargs ): - super(LogSettings, self).__init__(**kwargs) - self.category = kwargs.get('category', None) - self.enabled = kwargs['enabled'] - self.retention_policy = kwargs.get('retention_policy', None) + super(MetricDefinitionCollection, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.value = kwargs['value'] class MetricSettings(msrest.serialization.Model): @@ -102,50 +723,162 @@ def __init__( self.retention_policy = kwargs.get('retention_policy', None) -class Resource(msrest.serialization.Model): - """An azure resource object. +class MetricSpecification(msrest.serialization.Model): + """Metric specification of operation. - Variables are only populated by the server, and will be ignored when sending a request. + :param name: The name of the metric. + :type name: str + :param display_name: Display name of the metric. + :type display_name: str + :param display_description: Display description of the metric. + :type display_description: str + :param unit: The metric unit. Possible values include: + Count,Bytes,Seconds,Percent,CountPerSecond,BytesPerSecond,MilliSeconds,ByteSeconds,Unspecified,BitsPerSecond,Cores,MilliCores,NanoCores. + :type unit: str + :param aggregation_type: The default metric aggregation type. Possible values include: + Total,Average,Maximum,Minimum,Count. + :type aggregation_type: str + :param supported_aggregation_types: The supported aggregation types for the metrics. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: The supported time grain types for the metrics. + :type supported_time_grain_types: list[str] + :param availabilities: The supported time grain types for the metrics. + :type availabilities: list[str] + :param lock_aggregation_type: The metric lock aggregation type. + :type lock_aggregation_type: str + :param category: Category or type of metric. + :type category: str + :param dimensions: The dimensions of metric. + :type dimensions: list[~$(python-base-namespace).v2015_07_01.models.DimensionProperties] + :param fill_gap_with_zero: Property to specify whether to fill empty gaps with zero. + :type fill_gap_with_zero: bool + :param internal_metric_name: The internal metric name. + :type internal_metric_name: str + """ - All required parameters must be populated in order to send to Azure. + _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]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'availabilities': {'key': 'availabilities', 'type': '[str]'}, + 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } - :ivar id: Azure resource Id. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] + 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.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.availabilities = kwargs.get('availabilities', None) + self.lock_aggregation_type = kwargs.get('lock_aggregation_type', None) + self.category = kwargs.get('category', None) + self.dimensions = kwargs.get('dimensions', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.internal_metric_name = kwargs.get('internal_metric_name', None) + + +class Operation(msrest.serialization.Model): + """Microsoft Insights API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param is_data_action: Property to specify whether the action is a data action. + :type is_data_action: bool + :param display: Display metadata associated with the operation. + :type display: ~$(python-base-namespace).v2015_07_01.models.OperationDisplay + :param service_specification: One property of operation, include metric specifications. + :type service_specification: ~$(python-base-namespace).v2015_07_01.models.ServiceSpecification """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.display = kwargs.get('display', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :param publisher: The publisher of this operation. + :type publisher: str + :param provider: Service provider: Microsoft.Insights. + :type provider: str + :param resource: Resource on which the operation is performed: AlertRules, Autoscale, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: The description of the operation. + :type description: str + """ + + _attribute_map = { + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.publisher = kwargs.get('publisher', None) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list Microsoft.Insights operations. It contains a list of operations and a URL link to get the next set of results. + + :param value: List of operations supported by the Microsoft.Insights provider. + :type value: list[~$(python-base-namespace).v2015_07_01.models.Operation] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, } def __init__( self, **kwargs ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = kwargs['location'] - self.tags = kwargs.get('tags', None) + super(OperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) class RetentionPolicy(msrest.serialization.Model): @@ -179,6 +912,303 @@ def __init__( self.days = kwargs['days'] +class RuleAction(msrest.serialization.Model): + """The action that is performed when the alert rule becomes active, and when an alert condition is resolved. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleEmailAction, RuleWebhookAction. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.RuleEmailAction': 'RuleEmailAction', 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction': 'RuleWebhookAction'} + } + + def __init__( + self, + **kwargs + ): + super(RuleAction, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + + +class RuleDataSource(msrest.serialization.Model): + """The resource from which the rule collects its data. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleManagementEventDataSource, RuleMetricDataSource. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource': 'RuleManagementEventDataSource', 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource': 'RuleMetricDataSource'} + } + + def __init__( + self, + **kwargs + ): + super(RuleDataSource, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.resource_uri = kwargs.get('resource_uri', None) + self.legacy_resource_id = kwargs.get('legacy_resource_id', None) + self.resource_location = kwargs.get('resource_location', None) + self.metric_namespace = kwargs.get('metric_namespace', None) + + +class RuleEmailAction(RuleAction): + """Specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + :param send_to_service_owners: Whether the administrators (service and co-administrators) of + the service should be notified when the alert is activated. + :type send_to_service_owners: bool + :param custom_emails: the list of administrator's custom email addresses to notify of the + activation of the alert. + :type custom_emails: list[str] + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'send_to_service_owners': {'key': 'sendToServiceOwners', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleEmailAction, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' # type: str + self.send_to_service_owners = kwargs.get('send_to_service_owners', None) + self.custom_emails = kwargs.get('custom_emails', None) + + +class RuleManagementEventClaimsDataSource(msrest.serialization.Model): + """The claims for a rule management event data source. + + :param email_address: the email address. + :type email_address: str + """ + + _attribute_map = { + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleManagementEventClaimsDataSource, self).__init__(**kwargs) + self.email_address = kwargs.get('email_address', None) + + +class RuleManagementEventDataSource(RuleDataSource): + """A rule management event data source. The discriminator fields is always RuleManagementEventDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + :param event_name: the event name. + :type event_name: str + :param event_source: the event source. + :type event_source: str + :param level: the level. + :type level: str + :param operation_name: The name of the operation that should be checked for. If no name is + provided, any operation will match. + :type operation_name: str + :param resource_group_name: the resource group name. + :type resource_group_name: str + :param resource_provider_name: the resource provider name. + :type resource_provider_name: str + :param status: The status of the operation that should be checked for. If no status is + provided, any status will match. + :type status: str + :param sub_status: the substatus. + :type sub_status: str + :param claims: the claims. + :type claims: ~$(python-base-namespace).v2015_07_01.models.RuleManagementEventClaimsDataSource + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'event_source': {'key': 'eventSource', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_provider_name': {'key': 'resourceProviderName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'sub_status': {'key': 'subStatus', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'RuleManagementEventClaimsDataSource'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleManagementEventDataSource, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' # type: str + self.event_name = kwargs.get('event_name', None) + self.event_source = kwargs.get('event_source', None) + self.level = kwargs.get('level', None) + self.operation_name = kwargs.get('operation_name', None) + self.resource_group_name = kwargs.get('resource_group_name', None) + self.resource_provider_name = kwargs.get('resource_provider_name', None) + self.status = kwargs.get('status', None) + self.sub_status = kwargs.get('sub_status', None) + self.claims = kwargs.get('claims', None) + + +class RuleMetricDataSource(RuleDataSource): + """A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + :param metric_name: the name of the metric that defines what the rule monitors. + :type metric_name: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleMetricDataSource, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' # type: str + self.metric_name = kwargs.get('metric_name', None) + + +class RuleWebhookAction(RuleAction): + """Specifies the action to post to service when the rule condition is evaluated. The discriminator is always RuleWebhookAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + :param service_uri: the service uri to Post the notification when the alert activates or + resolves. + :type service_uri: str + :param properties: the dictionary of custom properties to include with the post operation. + These data are appended to the webhook payload. + :type properties: dict[str, str] + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleWebhookAction, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' # type: str + self.service_uri = kwargs.get('service_uri', None) + self.properties = kwargs.get('properties', None) + + class ServiceDiagnosticSettingsResource(Resource): """Description of a service diagnostic setting. @@ -209,8 +1239,7 @@ class ServiceDiagnosticSettingsResource(Resource): :type logs: list[~$(python-base-namespace).v2015_07_01.models.LogSettings] :param workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ @@ -244,3 +1273,123 @@ def __init__( self.metrics = kwargs.get('metrics', None) self.logs = kwargs.get('logs', None) self.workspace_id = kwargs.get('workspace_id', None) + + +class ServiceSpecification(msrest.serialization.Model): + """One property of operation, include log specifications. + + :param log_specifications: Log specifications of operation. + :type log_specifications: list[~$(python-base-namespace).v2015_07_01.models.LogSpecification] + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~$(python-base-namespace).v2015_07_01.models.MetricSpecification] + :param legacy_metric_specifications: Legacy Metric specifications for operation. Deprecated, do + not use. + :type legacy_metric_specifications: any + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'legacy_metric_specifications': {'key': 'legacyMetricSpecifications', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) + self.legacy_metric_specifications = kwargs.get('legacy_metric_specifications', None) + + +class TableInfoEntry(msrest.serialization.Model): + """Info about a storage table with metric data. + + :param table_name: Name of a table with metric data for this resource. + :type table_name: str + :param start_time: Start time of the metrics in this table. + :type start_time: ~datetime.datetime + :param end_time: End time of the metrics in this table. + :type end_time: ~datetime.datetime + :param sas_token: For the storage account with metrics. + :type sas_token: str + :param sas_token_expiration_time: For the storage account with metrics. + :type sas_token_expiration_time: ~datetime.datetime + """ + + _attribute_map = { + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'sas_token': {'key': 'sasToken', 'type': 'str'}, + 'sas_token_expiration_time': {'key': 'sasTokenExpirationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(TableInfoEntry, self).__init__(**kwargs) + self.table_name = kwargs.get('table_name', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.sas_token = kwargs.get('sas_token', None) + self.sas_token_expiration_time = kwargs.get('sas_token_expiration_time', None) + + +class ThresholdRuleCondition(RuleCondition): + """A rule condition based on a metric crossing a threshold. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :param operator: Required. the operator used to compare the data and the threshold. Possible + values include: "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + :type operator: str or ~$(python-base-namespace).v2015_07_01.models.ConditionOperator + :param threshold: Required. the threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + :param time_aggregation: the time aggregation operator. How the data that are collected should + be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible + values include: "Average", "Minimum", "Maximum", "Total", "Last". + :type time_aggregation: str or + ~$(python-base-namespace).v2015_07_01.models.TimeAggregationOperator + """ + + _validation = { + 'odata_type': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ThresholdRuleCondition, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' # type: str + self.operator = kwargs['operator'] + self.threshold = kwargs['threshold'] + self.window_size = kwargs.get('window_size', None) + self.time_aggregation = kwargs.get('time_aggregation', None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models_py3.py index 92a694055575..5b0966ae5496 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_models_py3.py @@ -7,11 +7,304 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization +from ._monitor_management_client_enums import * + + +class Resource(msrest.serialization.Model): + """An azure resource object. + + 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. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class AlertRuleResource(Resource): + """The alert rule resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param name_properties_name: Required. the name of the alert rule. + :type name_properties_name: str + :param description: the description of the alert rule that will be included in the alert email. + :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str + :param is_enabled: Required. the flag that indicates whether the alert rule is enabled. + :type is_enabled: bool + :param condition: Required. the condition that results in the alert rule being activated. + :type condition: ~$(python-base-namespace).v2015_07_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2015_07_01.models.RuleAction + :param actions: the array of actions that are performed when the alert rule becomes active, and + when an alert condition is resolved. + :type actions: list[~$(python-base-namespace).v2015_07_01.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: ~datetime.datetime + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'name_properties_name': {'required': True}, + 'is_enabled': {'required': True}, + 'condition': {'required': True}, + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + location: str, + name_properties_name: str, + is_enabled: bool, + condition: "RuleCondition", + tags: Optional[Dict[str, str]] = None, + description: Optional[str] = None, + provisioning_state: Optional[str] = None, + action: Optional["RuleAction"] = None, + actions: Optional[List["RuleAction"]] = None, + **kwargs + ): + super(AlertRuleResource, self).__init__(location=location, tags=tags, **kwargs) + self.name_properties_name = name_properties_name + self.description = description + self.provisioning_state = provisioning_state + self.is_enabled = is_enabled + self.condition = condition + self.action = action + self.actions = actions + self.last_updated_time = None + + +class AlertRuleResourceCollection(msrest.serialization.Model): + """Represents a collection of alert rule resources. + + :param value: the values for the alert rule resources. + :type value: list[~$(python-base-namespace).v2015_07_01.models.AlertRuleResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AlertRuleResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["AlertRuleResource"]] = None, + **kwargs + ): + super(AlertRuleResourceCollection, self).__init__(**kwargs) + self.value = value + + +class AlertRuleResourcePatch(msrest.serialization.Model): + """The alert rule object for patch operations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param name: the name of the alert rule. + :type name: str + :param description: the description of the alert rule that will be included in the alert email. + :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str + :param is_enabled: the flag that indicates whether the alert rule is enabled. + :type is_enabled: bool + :param condition: the condition that results in the alert rule being activated. + :type condition: ~$(python-base-namespace).v2015_07_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2015_07_01.models.RuleAction + :param actions: the array of actions that are performed when the alert rule becomes active, and + when an alert condition is resolved. + :type actions: list[~$(python-base-namespace).v2015_07_01.models.RuleAction] + :ivar last_updated_time: Last time the rule was updated in ISO8601 format. + :vartype last_updated_time: ~datetime.datetime + """ + + _validation = { + 'last_updated_time': {'readonly': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, + 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, + 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + name: Optional[str] = None, + description: Optional[str] = None, + provisioning_state: Optional[str] = None, + is_enabled: Optional[bool] = None, + condition: Optional["RuleCondition"] = None, + action: Optional["RuleAction"] = None, + actions: Optional[List["RuleAction"]] = None, + **kwargs + ): + super(AlertRuleResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.name = name + self.description = description + self.provisioning_state = provisioning_state + self.is_enabled = is_enabled + self.condition = condition + self.action = action + self.actions = actions + self.last_updated_time = None + + +class DimensionProperties(msrest.serialization.Model): + """Type of operation: get, read, delete, etc. + + :param name: Name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Legacy usage, should not set. + :type to_be_exported_for_shoebox: bool + :param is_hidden: When set, the dimension is hidden from the customer, used in conjunction with + the defaultDimensionValues field below. + :type is_hidden: bool + :param default_dimension_values: Default dimension value to be sent down for the hidden + dimension during query. + :type default_dimension_values: any + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + 'is_hidden': {'key': 'isHidden', 'type': 'bool'}, + 'default_dimension_values': {'key': 'defaultDimensionValues', 'type': 'object'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + to_be_exported_for_shoebox: Optional[bool] = None, + is_hidden: Optional[bool] = None, + default_dimension_values: Optional[Any] = None, + **kwargs + ): + super(DimensionProperties, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + self.is_hidden = is_hidden + self.default_dimension_values = default_dimension_values + + +class ErrorContract(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~$(python-base-namespace).v2015_07_01.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__( + self, + *, + error: Optional["ErrorResponse"] = None, + **kwargs + ): + super(ErrorContract, self).__init__(**kwargs) + self.error = error + class ErrorResponse(msrest.serialization.Model): """Describes the format of Error response. @@ -39,6 +332,128 @@ def __init__( self.message = message +class LocalizableString(msrest.serialization.Model): + """The localizable string class. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. the invariant value. + :type value: str + :param localized_value: the locale specific value. + :type localized_value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + *, + value: str, + localized_value: Optional[str] = None, + **kwargs + ): + super(LocalizableString, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class RuleCondition(msrest.serialization.Model): + """The condition that results in the alert rule being activated. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: LocationThresholdRuleCondition, ManagementEventRuleCondition, ThresholdRuleCondition. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition': 'LocationThresholdRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition': 'ManagementEventRuleCondition', 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition': 'ThresholdRuleCondition'} + } + + def __init__( + self, + *, + data_source: Optional["RuleDataSource"] = None, + **kwargs + ): + super(RuleCondition, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.data_source = data_source + + +class LocationThresholdRuleCondition(RuleCondition): + """A rule condition based on a certain number of locations failing. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + :param failed_location_count: Required. the number of locations that must fail to activate the + alert. + :type failed_location_count: int + """ + + _validation = { + 'odata_type': {'required': True}, + 'failed_location_count': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'failed_location_count': {'key': 'failedLocationCount', 'type': 'int'}, + } + + def __init__( + self, + *, + failed_location_count: int, + data_source: Optional["RuleDataSource"] = None, + window_size: Optional[datetime.timedelta] = None, + **kwargs + ): + super(LocationThresholdRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.LocationThresholdRuleCondition' # type: str + self.window_size = window_size + self.failed_location_count = failed_location_count + + class LogSettings(msrest.serialization.Model): """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. @@ -55,27 +470,310 @@ class LogSettings(msrest.serialization.Model): """ _validation = { - 'enabled': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__( + self, + *, + enabled: bool, + category: Optional[str] = None, + retention_policy: Optional["RetentionPolicy"] = None, + **kwargs + ): + super(LogSettings, self).__init__(**kwargs) + self.category = category + self.enabled = enabled + self.retention_policy = retention_policy + + +class LogSpecification(msrest.serialization.Model): + """Log specification of operation. + + :param name: Name of log specification. + :type name: str + :param display_name: Display name of log specification. + :type display_name: str + :param blob_duration: Blob duration of specification. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class ManagementEventAggregationCondition(msrest.serialization.Model): + """How the data that is collected should be combined over time. + + :param operator: the condition operator. Possible values include: "GreaterThan", + "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + :type operator: str or ~$(python-base-namespace).v2015_07_01.models.ConditionOperator + :param threshold: The threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + """ + + _attribute_map = { + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + } + + def __init__( + self, + *, + operator: Optional[Union[str, "ConditionOperator"]] = None, + threshold: Optional[float] = None, + window_size: Optional[datetime.timedelta] = None, + **kwargs + ): + super(ManagementEventAggregationCondition, self).__init__(**kwargs) + self.operator = operator + self.threshold = threshold + self.window_size = window_size + + +class ManagementEventRuleCondition(RuleCondition): + """A management event rule condition. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :param aggregation: How the data that is collected should be combined over time and when the + alert is activated. Note that for management event alerts aggregation is optional – if it is + not provided then any event will cause the alert to activate. + :type aggregation: + ~$(python-base-namespace).v2015_07_01.models.ManagementEventAggregationCondition + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'aggregation': {'key': 'aggregation', 'type': 'ManagementEventAggregationCondition'}, + } + + def __init__( + self, + *, + data_source: Optional["RuleDataSource"] = None, + aggregation: Optional["ManagementEventAggregationCondition"] = None, + **kwargs + ): + super(ManagementEventRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.ManagementEventRuleCondition' # type: str + self.aggregation = aggregation + + +class MetricAvailability(msrest.serialization.Model): + """Metric availability specifies the time grain (aggregation interval or frequency) and the retention period for that time grain. + + :param time_grain: the time grain specifies the aggregation interval for the metric. Expressed + as a duration 'PT1M', 'P1D', etc. + :type time_grain: ~datetime.timedelta + :param retention: the retention period for the metric at the specified timegrain. Expressed as + a duration 'PT1M', 'P1D', etc. + :type retention: ~datetime.timedelta + :param location: Info about where the metric data is stored. + :type location: ~$(python-base-namespace).v2015_07_01.models.MetricAvailabilityLocation + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'retention': {'key': 'retention', 'type': 'duration'}, + 'location': {'key': 'location', 'type': 'MetricAvailabilityLocation'}, + } + + def __init__( + self, + *, + time_grain: Optional[datetime.timedelta] = None, + retention: Optional[datetime.timedelta] = None, + location: Optional["MetricAvailabilityLocation"] = None, + **kwargs + ): + super(MetricAvailability, self).__init__(**kwargs) + self.time_grain = time_grain + self.retention = retention + self.location = location + + +class MetricAvailabilityLocation(msrest.serialization.Model): + """Info about where the metric data is stored. + + :param table_endpoint: The url for the storage account. + :type table_endpoint: str + :param table_info: Info about the storage tables storing this resources metrics. + :type table_info: list[~$(python-base-namespace).v2015_07_01.models.TableInfoEntry] + :param partition_key: partition key in the table where the metrics for this resource are + stored. + :type partition_key: str + """ + + _attribute_map = { + 'table_endpoint': {'key': 'tableEndpoint', 'type': 'str'}, + 'table_info': {'key': 'tableInfo', 'type': '[TableInfoEntry]'}, + 'partition_key': {'key': 'partitionKey', 'type': 'str'}, + } + + def __init__( + self, + *, + table_endpoint: Optional[str] = None, + table_info: Optional[List["TableInfoEntry"]] = None, + partition_key: Optional[str] = None, + **kwargs + ): + super(MetricAvailabilityLocation, self).__init__(**kwargs) + self.table_endpoint = table_endpoint + self.table_info = table_info + self.partition_key = partition_key + + +class MetricDefinition(msrest.serialization.Model): + """Metric definition class specifies the metadata for a metric. + + :param resource_id: The resource identifier of the resource that emitted the metric. + :type resource_id: str + :param resource_uri: The resource identifier of the resource that emitted the metric. + :type resource_uri: str + :param name: the name and the display name of the metric, i.e. it is a localizable string. + :type name: ~$(python-base-namespace).v2015_07_01.models.LocalizableString + :param category: The category of this metric. + :type category: str + :param unit: the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", + "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds". + :type unit: str or ~$(python-base-namespace).v2015_07_01.models.Unit + :param start_time: Start time of the metadata request timespan. + :type start_time: ~datetime.datetime + :param end_time: End time of the metadata request timespan. + :type end_time: ~datetime.datetime + :param primary_aggregation_type: the primary aggregation type value defining how to use the + values for display. Possible values include: "None", "Average", "Count", "Minimum", "Maximum", + "Total". + :type primary_aggregation_type: str or + ~$(python-base-namespace).v2015_07_01.models.AggregationType + :param supported_aggregation_types: List of all aggregations that are applicable for this + metric. + :type supported_aggregation_types: list[str or + ~$(python-base-namespace).v2015_07_01.models.AggregationType] + :param metric_availabilities: the collection of what aggregation intervals are available to be + queried. + :type metric_availabilities: + list[~$(python-base-namespace).v2015_07_01.models.MetricAvailability] + :param id: the resource identifier of the metric definition. + :type id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'category': {'key': 'category', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + resource_uri: Optional[str] = None, + name: Optional["LocalizableString"] = None, + category: Optional[str] = None, + unit: Optional[Union[str, "Unit"]] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + primary_aggregation_type: Optional[Union[str, "AggregationType"]] = None, + supported_aggregation_types: Optional[List[Union[str, "AggregationType"]]] = None, + metric_availabilities: Optional[List["MetricAvailability"]] = None, + id: Optional[str] = None, + **kwargs + ): + super(MetricDefinition, self).__init__(**kwargs) + self.resource_id = resource_id + self.resource_uri = resource_uri + self.name = name + self.category = category + self.unit = unit + self.start_time = start_time + self.end_time = end_time + self.primary_aggregation_type = primary_aggregation_type + self.supported_aggregation_types = supported_aggregation_types + self.metric_availabilities = metric_availabilities + self.id = id + + +class MetricDefinitionCollection(msrest.serialization.Model): + """Represents collection of metric definitions. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource Id for these metric definitions. + :type id: str + :param value: Required. the values for the metric definitions. + :type value: list[~$(python-base-namespace).v2015_07_01.models.MetricDefinition] + """ + + _validation = { + 'value': {'required': True}, } _attribute_map = { - 'category': {'key': 'category', 'type': 'str'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + 'id': {'key': 'id', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[MetricDefinition]'}, } def __init__( self, *, - enabled: bool, - category: Optional[str] = None, - retention_policy: Optional["RetentionPolicy"] = None, + value: List["MetricDefinition"], + id: Optional[str] = None, **kwargs ): - super(LogSettings, self).__init__(**kwargs) - self.category = category - self.enabled = enabled - self.retention_policy = retention_policy + super(MetricDefinitionCollection, self).__init__(**kwargs) + self.id = id + self.value = value class MetricSettings(msrest.serialization.Model): @@ -116,53 +814,190 @@ def __init__( self.retention_policy = retention_policy -class Resource(msrest.serialization.Model): - """An azure resource object. +class MetricSpecification(msrest.serialization.Model): + """Metric specification of operation. - Variables are only populated by the server, and will be ignored when sending a request. + :param name: The name of the metric. + :type name: str + :param display_name: Display name of the metric. + :type display_name: str + :param display_description: Display description of the metric. + :type display_description: str + :param unit: The metric unit. Possible values include: + Count,Bytes,Seconds,Percent,CountPerSecond,BytesPerSecond,MilliSeconds,ByteSeconds,Unspecified,BitsPerSecond,Cores,MilliCores,NanoCores. + :type unit: str + :param aggregation_type: The default metric aggregation type. Possible values include: + Total,Average,Maximum,Minimum,Count. + :type aggregation_type: str + :param supported_aggregation_types: The supported aggregation types for the metrics. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: The supported time grain types for the metrics. + :type supported_time_grain_types: list[str] + :param availabilities: The supported time grain types for the metrics. + :type availabilities: list[str] + :param lock_aggregation_type: The metric lock aggregation type. + :type lock_aggregation_type: str + :param category: Category or type of metric. + :type category: str + :param dimensions: The dimensions of metric. + :type dimensions: list[~$(python-base-namespace).v2015_07_01.models.DimensionProperties] + :param fill_gap_with_zero: Property to specify whether to fill empty gaps with zero. + :type fill_gap_with_zero: bool + :param internal_metric_name: The internal metric name. + :type internal_metric_name: str + """ - All required parameters must be populated in order to send to Azure. + _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]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'availabilities': {'key': 'availabilities', 'type': '[str]'}, + 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } - :ivar id: Azure resource Id. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param location: Required. Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + aggregation_type: Optional[str] = None, + supported_aggregation_types: Optional[List[str]] = None, + supported_time_grain_types: Optional[List[str]] = None, + availabilities: Optional[List[str]] = None, + lock_aggregation_type: Optional[str] = None, + category: Optional[str] = None, + dimensions: Optional[List["DimensionProperties"]] = None, + fill_gap_with_zero: Optional[bool] = None, + internal_metric_name: Optional[str] = None, + **kwargs + ): + 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.supported_time_grain_types = supported_time_grain_types + self.availabilities = availabilities + self.lock_aggregation_type = lock_aggregation_type + self.category = category + self.dimensions = dimensions + self.fill_gap_with_zero = fill_gap_with_zero + self.internal_metric_name = internal_metric_name + + +class Operation(msrest.serialization.Model): + """Microsoft Insights API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param is_data_action: Property to specify whether the action is a data action. + :type is_data_action: bool + :param display: Display metadata associated with the operation. + :type display: ~$(python-base-namespace).v2015_07_01.models.OperationDisplay + :param service_specification: One property of operation, include metric specifications. + :type service_specification: ~$(python-base-namespace).v2015_07_01.models.ServiceSpecification """ - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'ServiceSpecification'}, } + def __init__( + self, + *, + name: Optional[str] = None, + is_data_action: Optional[bool] = None, + display: Optional["OperationDisplay"] = None, + service_specification: Optional["ServiceSpecification"] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = name + self.is_data_action = is_data_action + self.display = display + self.service_specification = service_specification + + +class OperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :param publisher: The publisher of this operation. + :type publisher: str + :param provider: Service provider: Microsoft.Insights. + :type provider: str + :param resource: Resource on which the operation is performed: AlertRules, Autoscale, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: The description of the operation. + :type description: str + """ + _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'publisher': {'key': 'publisher', 'type': 'str'}, + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } def __init__( self, *, - location: str, - tags: Optional[Dict[str, str]] = None, + publisher: Optional[str] = None, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, **kwargs ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = location - self.tags = tags + super(OperationDisplay, self).__init__(**kwargs) + self.publisher = publisher + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list Microsoft.Insights operations. It contains a list of operations and a URL link to get the next set of results. + + :param value: List of operations supported by the Microsoft.Insights provider. + :type value: list[~$(python-base-namespace).v2015_07_01.models.Operation] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Operation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link class RetentionPolicy(msrest.serialization.Model): @@ -199,6 +1034,336 @@ def __init__( self.days = days +class RuleAction(msrest.serialization.Model): + """The action that is performed when the alert rule becomes active, and when an alert condition is resolved. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleEmailAction, RuleWebhookAction. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.RuleEmailAction': 'RuleEmailAction', 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction': 'RuleWebhookAction'} + } + + def __init__( + self, + **kwargs + ): + super(RuleAction, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + + +class RuleDataSource(msrest.serialization.Model): + """The resource from which the rule collects its data. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RuleManagementEventDataSource, RuleMetricDataSource. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + } + + _subtype_map = { + 'odata_type': {'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource': 'RuleManagementEventDataSource', 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource': 'RuleMetricDataSource'} + } + + def __init__( + self, + *, + resource_uri: Optional[str] = None, + legacy_resource_id: Optional[str] = None, + resource_location: Optional[str] = None, + metric_namespace: Optional[str] = None, + **kwargs + ): + super(RuleDataSource, self).__init__(**kwargs) + self.odata_type = None # type: Optional[str] + self.resource_uri = resource_uri + self.legacy_resource_id = legacy_resource_id + self.resource_location = resource_location + self.metric_namespace = metric_namespace + + +class RuleEmailAction(RuleAction): + """Specifies the action to send email when the rule condition is evaluated. The discriminator is always RuleEmailAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + :param send_to_service_owners: Whether the administrators (service and co-administrators) of + the service should be notified when the alert is activated. + :type send_to_service_owners: bool + :param custom_emails: the list of administrator's custom email addresses to notify of the + activation of the alert. + :type custom_emails: list[str] + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'send_to_service_owners': {'key': 'sendToServiceOwners', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__( + self, + *, + send_to_service_owners: Optional[bool] = None, + custom_emails: Optional[List[str]] = None, + **kwargs + ): + super(RuleEmailAction, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleEmailAction' # type: str + self.send_to_service_owners = send_to_service_owners + self.custom_emails = custom_emails + + +class RuleManagementEventClaimsDataSource(msrest.serialization.Model): + """The claims for a rule management event data source. + + :param email_address: the email address. + :type email_address: str + """ + + _attribute_map = { + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + email_address: Optional[str] = None, + **kwargs + ): + super(RuleManagementEventClaimsDataSource, self).__init__(**kwargs) + self.email_address = email_address + + +class RuleManagementEventDataSource(RuleDataSource): + """A rule management event data source. The discriminator fields is always RuleManagementEventDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + :param event_name: the event name. + :type event_name: str + :param event_source: the event source. + :type event_source: str + :param level: the level. + :type level: str + :param operation_name: The name of the operation that should be checked for. If no name is + provided, any operation will match. + :type operation_name: str + :param resource_group_name: the resource group name. + :type resource_group_name: str + :param resource_provider_name: the resource provider name. + :type resource_provider_name: str + :param status: The status of the operation that should be checked for. If no status is + provided, any status will match. + :type status: str + :param sub_status: the substatus. + :type sub_status: str + :param claims: the claims. + :type claims: ~$(python-base-namespace).v2015_07_01.models.RuleManagementEventClaimsDataSource + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'event_name': {'key': 'eventName', 'type': 'str'}, + 'event_source': {'key': 'eventSource', 'type': 'str'}, + 'level': {'key': 'level', 'type': 'str'}, + 'operation_name': {'key': 'operationName', 'type': 'str'}, + 'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'}, + 'resource_provider_name': {'key': 'resourceProviderName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'sub_status': {'key': 'subStatus', 'type': 'str'}, + 'claims': {'key': 'claims', 'type': 'RuleManagementEventClaimsDataSource'}, + } + + def __init__( + self, + *, + resource_uri: Optional[str] = None, + legacy_resource_id: Optional[str] = None, + resource_location: Optional[str] = None, + metric_namespace: Optional[str] = None, + event_name: Optional[str] = None, + event_source: Optional[str] = None, + level: Optional[str] = None, + operation_name: Optional[str] = None, + resource_group_name: Optional[str] = None, + resource_provider_name: Optional[str] = None, + status: Optional[str] = None, + sub_status: Optional[str] = None, + claims: Optional["RuleManagementEventClaimsDataSource"] = None, + **kwargs + ): + super(RuleManagementEventDataSource, self).__init__(resource_uri=resource_uri, legacy_resource_id=legacy_resource_id, resource_location=resource_location, metric_namespace=metric_namespace, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' # type: str + self.event_name = event_name + self.event_source = event_source + self.level = level + self.operation_name = operation_name + self.resource_group_name = resource_group_name + self.resource_provider_name = resource_provider_name + self.status = status + self.sub_status = sub_status + self.claims = claims + + +class RuleMetricDataSource(RuleDataSource): + """A rule metric data source. The discriminator value is always RuleMetricDataSource in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of data source. There are two types of rule + data sources: RuleMetricDataSource and RuleManagementEventDataSource.Constant filled by server. + :type odata_type: str + :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : + this property cannot be updated for an existing rule. + :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str + :param metric_name: the name of the metric that defines what the rule monitors. + :type metric_name: str + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_uri: Optional[str] = None, + legacy_resource_id: Optional[str] = None, + resource_location: Optional[str] = None, + metric_namespace: Optional[str] = None, + metric_name: Optional[str] = None, + **kwargs + ): + super(RuleMetricDataSource, self).__init__(resource_uri=resource_uri, legacy_resource_id=legacy_resource_id, resource_location=resource_location, metric_namespace=metric_namespace, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' # type: str + self.metric_name = metric_name + + +class RuleWebhookAction(RuleAction): + """Specifies the action to post to service when the rule condition is evaluated. The discriminator is always RuleWebhookAction in this case. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of the action. There are two types of actions: + RuleEmailAction and RuleWebhookAction.Constant filled by server. + :type odata_type: str + :param service_uri: the service uri to Post the notification when the alert activates or + resolves. + :type service_uri: str + :param properties: the dictionary of custom properties to include with the post operation. + These data are appended to the webhook payload. + :type properties: dict[str, str] + """ + + _validation = { + 'odata_type': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + *, + service_uri: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + **kwargs + ): + super(RuleWebhookAction, self).__init__(**kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleWebhookAction' # type: str + self.service_uri = service_uri + self.properties = properties + + class ServiceDiagnosticSettingsResource(Resource): """Description of a service diagnostic setting. @@ -229,8 +1394,7 @@ class ServiceDiagnosticSettingsResource(Resource): :type logs: list[~$(python-base-namespace).v2015_07_01.models.LogSettings] :param workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ @@ -272,3 +1436,139 @@ def __init__( self.metrics = metrics self.logs = logs self.workspace_id = workspace_id + + +class ServiceSpecification(msrest.serialization.Model): + """One property of operation, include log specifications. + + :param log_specifications: Log specifications of operation. + :type log_specifications: list[~$(python-base-namespace).v2015_07_01.models.LogSpecification] + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~$(python-base-namespace).v2015_07_01.models.MetricSpecification] + :param legacy_metric_specifications: Legacy Metric specifications for operation. Deprecated, do + not use. + :type legacy_metric_specifications: any + """ + + _attribute_map = { + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'legacy_metric_specifications': {'key': 'legacyMetricSpecifications', 'type': 'object'}, + } + + def __init__( + self, + *, + log_specifications: Optional[List["LogSpecification"]] = None, + metric_specifications: Optional[List["MetricSpecification"]] = None, + legacy_metric_specifications: Optional[Any] = None, + **kwargs + ): + super(ServiceSpecification, self).__init__(**kwargs) + self.log_specifications = log_specifications + self.metric_specifications = metric_specifications + self.legacy_metric_specifications = legacy_metric_specifications + + +class TableInfoEntry(msrest.serialization.Model): + """Info about a storage table with metric data. + + :param table_name: Name of a table with metric data for this resource. + :type table_name: str + :param start_time: Start time of the metrics in this table. + :type start_time: ~datetime.datetime + :param end_time: End time of the metrics in this table. + :type end_time: ~datetime.datetime + :param sas_token: For the storage account with metrics. + :type sas_token: str + :param sas_token_expiration_time: For the storage account with metrics. + :type sas_token_expiration_time: ~datetime.datetime + """ + + _attribute_map = { + 'table_name': {'key': 'tableName', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'sas_token': {'key': 'sasToken', 'type': 'str'}, + 'sas_token_expiration_time': {'key': 'sasTokenExpirationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + table_name: Optional[str] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + sas_token: Optional[str] = None, + sas_token_expiration_time: Optional[datetime.datetime] = None, + **kwargs + ): + super(TableInfoEntry, self).__init__(**kwargs) + self.table_name = table_name + self.start_time = start_time + self.end_time = end_time + self.sas_token = sas_token + self.sas_token_expiration_time = sas_token_expiration_time + + +class ThresholdRuleCondition(RuleCondition): + """A rule condition based on a metric crossing a threshold. + + All required parameters must be populated in order to send to Azure. + + :param odata_type: Required. specifies the type of condition. This can be one of three types: + ManagementEventRuleCondition (occurrences of management events), LocationThresholdRuleCondition + (based on the number of failures of a web test), and ThresholdRuleCondition (based on the + threshold of a metric).Constant filled by server. + :type odata_type: str + :param data_source: the resource from which the rule collects its data. For this type + dataSource will always be of type RuleMetricDataSource. + :type data_source: ~$(python-base-namespace).v2015_07_01.models.RuleDataSource + :param operator: Required. the operator used to compare the data and the threshold. Possible + values include: "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + :type operator: str or ~$(python-base-namespace).v2015_07_01.models.ConditionOperator + :param threshold: Required. the threshold value that activates the alert. + :type threshold: float + :param window_size: the period of time (in ISO 8601 duration format) that is used to monitor + alert activity based on the threshold. If specified then it must be between 5 minutes and 1 + day. + :type window_size: ~datetime.timedelta + :param time_aggregation: the time aggregation operator. How the data that are collected should + be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible + values include: "Average", "Minimum", "Maximum", "Total", "Last". + :type time_aggregation: str or + ~$(python-base-namespace).v2015_07_01.models.TimeAggregationOperator + """ + + _validation = { + 'odata_type': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'RuleDataSource'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'window_size': {'key': 'windowSize', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'str'}, + } + + def __init__( + self, + *, + operator: Union[str, "ConditionOperator"], + threshold: float, + data_source: Optional["RuleDataSource"] = None, + window_size: Optional[datetime.timedelta] = None, + time_aggregation: Optional[Union[str, "TimeAggregationOperator"]] = None, + **kwargs + ): + super(ThresholdRuleCondition, self).__init__(data_source=data_source, **kwargs) + self.odata_type = 'Microsoft.Azure.Management.Insights.Models.ThresholdRuleCondition' # type: str + self.operator = operator + self.threshold = threshold + self.window_size = window_size + self.time_aggregation = time_aggregation diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_monitor_management_client_enums.py new file mode 100644 index 000000000000..c2b5066b1b06 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/models/_monitor_management_client_enums.py @@ -0,0 +1,69 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AggregationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes how metric values are aggregated + """ + + NONE = "None" + AVERAGE = "Average" + COUNT = "Count" + MINIMUM = "Minimum" + MAXIMUM = "Maximum" + TOTAL = "Total" + +class ConditionOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Operators allowed in the rule condition. + """ + + GREATER_THAN = "GreaterThan" + GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + LESS_THAN = "LessThan" + LESS_THAN_OR_EQUAL = "LessThanOrEqual" + +class TimeAggregationOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Aggregation operators allowed in a rule. + """ + + AVERAGE = "Average" + MINIMUM = "Minimum" + MAXIMUM = "Maximum" + TOTAL = "Total" + LAST = "Last" + +class Unit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """the unit of the metric. + """ + + COUNT = "Count" + BYTES = "Bytes" + SECONDS = "Seconds" + COUNT_PER_SECOND = "CountPerSecond" + BYTES_PER_SECOND = "BytesPerSecond" + PERCENT = "Percent" + MILLI_SECONDS = "MilliSeconds" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/__init__.py index c7d51f79a3e2..28c5041be1cd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/__init__.py @@ -7,7 +7,13 @@ # -------------------------------------------------------------------------- from ._service_diagnostic_settings_operations import ServiceDiagnosticSettingsOperations +from ._metric_definitions_operations import MetricDefinitionsOperations +from ._alert_rules_operations import AlertRulesOperations +from ._operations import Operations __all__ = [ 'ServiceDiagnosticSettingsOperations', + 'MetricDefinitionsOperations', + 'AlertRulesOperations', + 'Operations', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py new file mode 100644 index 000000000000..bfbed600aa58 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_alert_rules_operations.py @@ -0,0 +1,448 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AlertRulesOperations(object): + """AlertRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2015_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_or_update( + self, + resource_group_name, # type: str + rule_name, # type: str + parameters, # type: "_models.AlertRuleResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AlertRuleResource" + """Creates or updates a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param parameters: The parameters of the rule to create or update. + :type parameters: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AlertRuleResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AlertRuleResource" + """Gets a classic metric alert rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + rule_name, # type: str + alert_rules_resource, # type: "_models.AlertRuleResourcePatch" + **kwargs # type: Any + ): + # type: (...) -> "_models.AlertRuleResource" + """Updates an existing classic metric AlertRuleResource. To update other fields use the + CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param alert_rules_resource: Parameters supplied to the operation. + :type alert_rules_resource: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResourcePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AlertRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_07_01.models.AlertRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(alert_rules_resource, 'AlertRuleResourcePatch') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AlertRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AlertRuleResourceCollection"] + """List the classic metric alert rules within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_07_01.models.AlertRuleResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AlertRuleResourceCollection"] + """List the classic metric alert rules within a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_07_01.models.AlertRuleResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2014-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py new file mode 100644 index 000000000000..ebae6587c5bd --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_metric_definitions_operations.py @@ -0,0 +1,127 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class MetricDefinitionsOperations(object): + """MetricDefinitionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2015_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_uri, # type: str + filter=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.MetricDefinitionCollection"] + """Lists the metric definitions for the resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param filter: Reduces the set of data collected by retrieving particular metric definitions + from all the definitions available for the resource.:code:`
`For example, to get just the + definition for the 'CPU percentage' counter: $filter=name.value eq '\Processor(_Total)\% + Processor Time'.:code:`
`Multiple metrics can be retrieved by joining together *'name eq + :code:``'* clauses separated by *or* logical operators.:code:`
`\ **NOTE**\ : No + other syntax is allowed. + :type filter: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either MetricDefinitionCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2015_07_01.models.MetricDefinitionCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.MetricDefinitionCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2015-07-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('MetricDefinitionCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/metricDefinitions'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py new file mode 100644 index 000000000000..a6d8bd648b53 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_operations.py @@ -0,0 +1,93 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class Operations(object): + """Operations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2015_07_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.OperationListResult" + """Lists all of the available operations from Microsoft.Insights provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OperationListResult, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2015_07_01.models.OperationListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2015-07-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OperationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Insights/operations'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py index b5d62a28a532..2dc552790fd6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_07_01/operations/_service_diagnostic_settings_operations.py @@ -88,7 +88,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceDiagnosticSettingsResource', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py index b10736e5a2a4..282a42dca8c1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_metadata.json index fd3cdba4ddce..358d4351074f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,44 +23,84 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "alert_rule_incidents": "AlertRuleIncidentsOperations", "alert_rules": "AlertRulesOperations", "log_profiles": "LogProfilesOperations", "metric_definitions": "MetricDefinitionsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_management_client.py index 8513c920c077..8f67a079ad20 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import AlertRuleIncidentsOperations @@ -38,7 +39,7 @@ class MonitorManagementClient(object): :vartype metric_definitions: $(python-base-namespace).v2016_03_01.operations.MetricDefinitionsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -70,6 +71,24 @@ def __init__( self.metric_definitions = MetricDefinitionsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py index 6756d6d2267b..4fb94b055a2b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_management_client.py index e5406701f0be..ab351d603d92 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -36,7 +37,7 @@ class MonitorManagementClient(object): :vartype metric_definitions: $(python-base-namespace).v2016_03_01.aio.operations.MetricDefinitionsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -67,6 +68,23 @@ def __init__( self.metric_definitions = MetricDefinitionsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py index 55c06f896b2b..958a1b2b8603 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rule_incidents_operations.py @@ -46,7 +46,7 @@ async def get( resource_group_name: str, rule_name: str, incident_name: str, - **kwargs + **kwargs: Any ) -> "_models.Incident": """Gets an incident associated to an alert rule. @@ -75,7 +75,7 @@ async def get( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'incidentName': self._serialize.url("incident_name", incident_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -93,7 +93,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Incident', pipeline_response) @@ -108,7 +108,7 @@ def list_by_alert_rule( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IncidentListResult"]: """Gets a list of incidents associated to an alert rule. @@ -140,7 +140,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py index eaae66796a3a..a62a6ec67216 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_alert_rules_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, rule_name: str, parameters: "_models.AlertRuleResource", - **kwargs + **kwargs: Any ) -> "_models.AlertRuleResource": """Creates or updates a classic metric alert rule. @@ -75,7 +75,7 @@ async def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -110,13 +110,13 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore async def delete( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a classic metric alert rule. @@ -135,13 +135,14 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-03-01" + accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -151,6 +152,7 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -158,18 +160,19 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore async def get( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.AlertRuleResource": """Gets a classic metric alert rule. @@ -195,7 +198,7 @@ async def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -213,7 +216,8 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AlertRuleResource', pipeline_response) @@ -221,14 +225,14 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore async def update( self, resource_group_name: str, rule_name: str, alert_rules_resource: "_models.AlertRuleResourcePatch", - **kwargs + **kwargs: Any ) -> "_models.AlertRuleResource": """Updates an existing classic metric AlertRuleResource. To update other fields use the CreateOrUpdate method. @@ -256,7 +260,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -280,7 +284,7 @@ async def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -293,12 +297,12 @@ async def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AlertRuleResourceCollection"]: """List the classic metric alert rules within a resource group. @@ -327,7 +331,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -355,19 +359,20 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules'} # type: ignore def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AlertRuleResourceCollection"]: """List the classic metric alert rules within a subscription. @@ -393,7 +398,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -421,12 +426,13 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/alertrules'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py index 786981108d81..5c218a864c22 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_log_profiles_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def delete( self, log_profile_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the log profile. @@ -66,7 +66,7 @@ async def delete( url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -88,12 +88,12 @@ async def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}'} # type: ignore async def get( self, log_profile_name: str, - **kwargs + **kwargs: Any ) -> "_models.LogProfileResource": """Gets the log profile. @@ -116,7 +116,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -134,7 +134,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LogProfileResource', pipeline_response) @@ -143,13 +143,13 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}'} # type: ignore async def create_or_update( self, log_profile_name: str, parameters: "_models.LogProfileResource", - **kwargs + **kwargs: Any ) -> "_models.LogProfileResource": """Create or update a log profile in Azure Monitoring REST API. @@ -175,7 +175,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -205,13 +205,13 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}'} # type: ignore async def update( self, log_profile_name: str, log_profiles_resource: "_models.LogProfileResourcePatch", - **kwargs + **kwargs: Any ) -> "_models.LogProfileResource": """Updates an existing LogProfilesResource. To update other fields use the CreateOrUpdate method. @@ -236,7 +236,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -259,7 +259,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LogProfileResource', pipeline_response) @@ -268,11 +268,11 @@ async def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}'} # type: ignore def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LogProfileCollection"]: """List the log profiles. @@ -298,7 +298,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -334,4 +334,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py index c4dbe2449afe..12bbcf4c9cc1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/aio/operations/_metric_definitions_operations.py @@ -45,7 +45,7 @@ def list( self, resource_uri: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MetricDefinitionCollection"]: """Lists the metric definitions for the resource. @@ -110,7 +110,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models.py index b4de0f130ae8..d737ca3227e1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models.py @@ -77,10 +77,15 @@ class AlertRuleResource(Resource): :type name_properties_name: str :param description: the description of the alert rule that will be included in the alert email. :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str :param is_enabled: Required. the flag that indicates whether the alert rule is enabled. :type is_enabled: bool :param condition: Required. the condition that results in the alert rule being activated. :type condition: ~$(python-base-namespace).v2016_03_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2016_03_01.models.RuleAction :param actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. :type actions: list[~$(python-base-namespace).v2016_03_01.models.RuleAction] @@ -107,8 +112,10 @@ class AlertRuleResource(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, } @@ -120,8 +127,10 @@ def __init__( super(AlertRuleResource, self).__init__(**kwargs) self.name_properties_name = kwargs['name_properties_name'] self.description = kwargs.get('description', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.is_enabled = kwargs['is_enabled'] self.condition = kwargs['condition'] + self.action = kwargs.get('action', None) self.actions = kwargs.get('actions', None) self.last_updated_time = None @@ -156,10 +165,15 @@ class AlertRuleResourcePatch(msrest.serialization.Model): :type name: str :param description: the description of the alert rule that will be included in the alert email. :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str :param is_enabled: the flag that indicates whether the alert rule is enabled. :type is_enabled: bool :param condition: the condition that results in the alert rule being activated. :type condition: ~$(python-base-namespace).v2016_03_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2016_03_01.models.RuleAction :param actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. :type actions: list[~$(python-base-namespace).v2016_03_01.models.RuleAction] @@ -175,8 +189,10 @@ class AlertRuleResourcePatch(msrest.serialization.Model): 'tags': {'key': 'tags', 'type': '{str}'}, 'name': {'key': 'properties.name', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, } @@ -189,8 +205,10 @@ def __init__( self.tags = kwargs.get('tags', None) self.name = kwargs.get('name', None) self.description = kwargs.get('description', None) + self.provisioning_state = kwargs.get('provisioning_state', None) self.is_enabled = kwargs.get('is_enabled', None) self.condition = kwargs.get('condition', None) + self.action = kwargs.get('action', None) self.actions = kwargs.get('actions', None) self.last_updated_time = None @@ -580,8 +598,8 @@ class ManagementEventRuleCondition(RuleCondition): :param aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate. - :type aggregation: ~$(python-base- - namespace).v2016_03_01.models.ManagementEventAggregationCondition + :type aggregation: + ~$(python-base-namespace).v2016_03_01.models.ManagementEventAggregationCondition """ _validation = { @@ -636,17 +654,18 @@ class MetricDefinition(msrest.serialization.Model): :param name: the name and the display name of the metric, i.e. it is a localizable string. :type name: ~$(python-base-namespace).v2016_03_01.models.LocalizableString :param unit: the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds". + "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", + "Cores", "MilliCores", "NanoCores", "BitsPerSecond". :type unit: str or ~$(python-base-namespace).v2016_03_01.models.Unit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: "None", "Average", "Count", "Minimum", "Maximum", "Total". - :type primary_aggregation_type: str or ~$(python-base- - namespace).v2016_03_01.models.AggregationType + :type primary_aggregation_type: str or + ~$(python-base-namespace).v2016_03_01.models.AggregationType :param metric_availabilities: the collection of what aggregation intervals are available to be queried. - :type metric_availabilities: list[~$(python-base- - namespace).v2016_03_01.models.MetricAvailability] + :type metric_availabilities: + list[~$(python-base-namespace).v2016_03_01.models.MetricAvailability] :param id: the resource identifier of the metric definition. :type id: str """ @@ -776,6 +795,13 @@ class RuleDataSource(msrest.serialization.Model): :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : this property cannot be updated for an existing rule. :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str """ _validation = { @@ -785,6 +811,9 @@ class RuleDataSource(msrest.serialization.Model): _attribute_map = { 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, } _subtype_map = { @@ -798,6 +827,9 @@ def __init__( super(RuleDataSource, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.resource_uri = kwargs.get('resource_uri', None) + self.legacy_resource_id = kwargs.get('legacy_resource_id', None) + self.resource_location = kwargs.get('resource_location', None) + self.metric_namespace = kwargs.get('metric_namespace', None) class RuleEmailAction(RuleAction): @@ -866,6 +898,13 @@ class RuleManagementEventDataSource(RuleDataSource): :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : this property cannot be updated for an existing rule. :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str :param event_name: the event name. :type event_name: str :param event_source: the event source. @@ -895,6 +934,9 @@ class RuleManagementEventDataSource(RuleDataSource): _attribute_map = { 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, 'event_name': {'key': 'eventName', 'type': 'str'}, 'event_source': {'key': 'eventSource', 'type': 'str'}, 'level': {'key': 'level', 'type': 'str'}, @@ -934,6 +976,13 @@ class RuleMetricDataSource(RuleDataSource): :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : this property cannot be updated for an existing rule. :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str :param metric_name: the name of the metric that defines what the rule monitors. :type metric_name: str """ @@ -945,6 +994,9 @@ class RuleMetricDataSource(RuleDataSource): _attribute_map = { 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, 'metric_name': {'key': 'metricName', 'type': 'str'}, } @@ -1018,8 +1070,8 @@ class ThresholdRuleCondition(RuleCondition): :param time_aggregation: the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible values include: "Average", "Minimum", "Maximum", "Total", "Last". - :type time_aggregation: str or ~$(python-base- - namespace).v2016_03_01.models.TimeAggregationOperator + :type time_aggregation: str or + ~$(python-base-namespace).v2016_03_01.models.TimeAggregationOperator """ _validation = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models_py3.py index 8be2f2a651a5..f9a35585fc3a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_models_py3.py @@ -85,10 +85,15 @@ class AlertRuleResource(Resource): :type name_properties_name: str :param description: the description of the alert rule that will be included in the alert email. :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str :param is_enabled: Required. the flag that indicates whether the alert rule is enabled. :type is_enabled: bool :param condition: Required. the condition that results in the alert rule being activated. :type condition: ~$(python-base-namespace).v2016_03_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2016_03_01.models.RuleAction :param actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. :type actions: list[~$(python-base-namespace).v2016_03_01.models.RuleAction] @@ -115,8 +120,10 @@ class AlertRuleResource(Resource): 'tags': {'key': 'tags', 'type': '{str}'}, 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, } @@ -130,14 +137,18 @@ def __init__( condition: "RuleCondition", tags: Optional[Dict[str, str]] = None, description: Optional[str] = None, + provisioning_state: Optional[str] = None, + action: Optional["RuleAction"] = None, actions: Optional[List["RuleAction"]] = None, **kwargs ): super(AlertRuleResource, self).__init__(location=location, tags=tags, **kwargs) self.name_properties_name = name_properties_name self.description = description + self.provisioning_state = provisioning_state self.is_enabled = is_enabled self.condition = condition + self.action = action self.actions = actions self.last_updated_time = None @@ -174,10 +185,15 @@ class AlertRuleResourcePatch(msrest.serialization.Model): :type name: str :param description: the description of the alert rule that will be included in the alert email. :type description: str + :param provisioning_state: the provisioning state. + :type provisioning_state: str :param is_enabled: the flag that indicates whether the alert rule is enabled. :type is_enabled: bool :param condition: the condition that results in the alert rule being activated. :type condition: ~$(python-base-namespace).v2016_03_01.models.RuleCondition + :param action: action that is performed when the alert rule becomes active, and when an alert + condition is resolved. + :type action: ~$(python-base-namespace).v2016_03_01.models.RuleAction :param actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. :type actions: list[~$(python-base-namespace).v2016_03_01.models.RuleAction] @@ -193,8 +209,10 @@ class AlertRuleResourcePatch(msrest.serialization.Model): 'tags': {'key': 'tags', 'type': '{str}'}, 'name': {'key': 'properties.name', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, 'condition': {'key': 'properties.condition', 'type': 'RuleCondition'}, + 'action': {'key': 'properties.action', 'type': 'RuleAction'}, 'actions': {'key': 'properties.actions', 'type': '[RuleAction]'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, } @@ -205,8 +223,10 @@ def __init__( tags: Optional[Dict[str, str]] = None, name: Optional[str] = None, description: Optional[str] = None, + provisioning_state: Optional[str] = None, is_enabled: Optional[bool] = None, condition: Optional["RuleCondition"] = None, + action: Optional["RuleAction"] = None, actions: Optional[List["RuleAction"]] = None, **kwargs ): @@ -214,8 +234,10 @@ def __init__( self.tags = tags self.name = name self.description = description + self.provisioning_state = provisioning_state self.is_enabled = is_enabled self.condition = condition + self.action = action self.actions = actions self.last_updated_time = None @@ -640,8 +662,8 @@ class ManagementEventRuleCondition(RuleCondition): :param aggregation: How the data that is collected should be combined over time and when the alert is activated. Note that for management event alerts aggregation is optional – if it is not provided then any event will cause the alert to activate. - :type aggregation: ~$(python-base- - namespace).v2016_03_01.models.ManagementEventAggregationCondition + :type aggregation: + ~$(python-base-namespace).v2016_03_01.models.ManagementEventAggregationCondition """ _validation = { @@ -702,17 +724,18 @@ class MetricDefinition(msrest.serialization.Model): :param name: the name and the display name of the metric, i.e. it is a localizable string. :type name: ~$(python-base-namespace).v2016_03_01.models.LocalizableString :param unit: the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds". + "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", + "Cores", "MilliCores", "NanoCores", "BitsPerSecond". :type unit: str or ~$(python-base-namespace).v2016_03_01.models.Unit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: "None", "Average", "Count", "Minimum", "Maximum", "Total". - :type primary_aggregation_type: str or ~$(python-base- - namespace).v2016_03_01.models.AggregationType + :type primary_aggregation_type: str or + ~$(python-base-namespace).v2016_03_01.models.AggregationType :param metric_availabilities: the collection of what aggregation intervals are available to be queried. - :type metric_availabilities: list[~$(python-base- - namespace).v2016_03_01.models.MetricAvailability] + :type metric_availabilities: + list[~$(python-base-namespace).v2016_03_01.models.MetricAvailability] :param id: the resource identifier of the metric definition. :type id: str """ @@ -854,6 +877,13 @@ class RuleDataSource(msrest.serialization.Model): :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : this property cannot be updated for an existing rule. :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str """ _validation = { @@ -863,6 +893,9 @@ class RuleDataSource(msrest.serialization.Model): _attribute_map = { 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, } _subtype_map = { @@ -873,11 +906,17 @@ def __init__( self, *, resource_uri: Optional[str] = None, + legacy_resource_id: Optional[str] = None, + resource_location: Optional[str] = None, + metric_namespace: Optional[str] = None, **kwargs ): super(RuleDataSource, self).__init__(**kwargs) self.odata_type = None # type: Optional[str] self.resource_uri = resource_uri + self.legacy_resource_id = legacy_resource_id + self.resource_location = resource_location + self.metric_namespace = metric_namespace class RuleEmailAction(RuleAction): @@ -951,6 +990,13 @@ class RuleManagementEventDataSource(RuleDataSource): :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : this property cannot be updated for an existing rule. :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str :param event_name: the event name. :type event_name: str :param event_source: the event source. @@ -980,6 +1026,9 @@ class RuleManagementEventDataSource(RuleDataSource): _attribute_map = { 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, 'event_name': {'key': 'eventName', 'type': 'str'}, 'event_source': {'key': 'eventSource', 'type': 'str'}, 'level': {'key': 'level', 'type': 'str'}, @@ -995,6 +1044,9 @@ def __init__( self, *, resource_uri: Optional[str] = None, + legacy_resource_id: Optional[str] = None, + resource_location: Optional[str] = None, + metric_namespace: Optional[str] = None, event_name: Optional[str] = None, event_source: Optional[str] = None, level: Optional[str] = None, @@ -1006,7 +1058,7 @@ def __init__( claims: Optional["RuleManagementEventClaimsDataSource"] = None, **kwargs ): - super(RuleManagementEventDataSource, self).__init__(resource_uri=resource_uri, **kwargs) + super(RuleManagementEventDataSource, self).__init__(resource_uri=resource_uri, legacy_resource_id=legacy_resource_id, resource_location=resource_location, metric_namespace=metric_namespace, **kwargs) self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleManagementEventDataSource' # type: str self.event_name = event_name self.event_source = event_source @@ -1030,6 +1082,13 @@ class RuleMetricDataSource(RuleDataSource): :param resource_uri: the resource identifier of the resource the rule monitors. **NOTE**\ : this property cannot be updated for an existing rule. :type resource_uri: str + :param legacy_resource_id: the legacy resource identifier of the resource the rule monitors. + **NOTE**\ : this property cannot be updated for an existing rule. + :type legacy_resource_id: str + :param resource_location: the location of the resource. + :type resource_location: str + :param metric_namespace: the namespace of the metric. + :type metric_namespace: str :param metric_name: the name of the metric that defines what the rule monitors. :type metric_name: str """ @@ -1041,6 +1100,9 @@ class RuleMetricDataSource(RuleDataSource): _attribute_map = { 'odata_type': {'key': 'odata\\.type', 'type': 'str'}, 'resource_uri': {'key': 'resourceUri', 'type': 'str'}, + 'legacy_resource_id': {'key': 'legacyResourceId', 'type': 'str'}, + 'resource_location': {'key': 'resourceLocation', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, 'metric_name': {'key': 'metricName', 'type': 'str'}, } @@ -1048,10 +1110,13 @@ def __init__( self, *, resource_uri: Optional[str] = None, + legacy_resource_id: Optional[str] = None, + resource_location: Optional[str] = None, + metric_namespace: Optional[str] = None, metric_name: Optional[str] = None, **kwargs ): - super(RuleMetricDataSource, self).__init__(resource_uri=resource_uri, **kwargs) + super(RuleMetricDataSource, self).__init__(resource_uri=resource_uri, legacy_resource_id=legacy_resource_id, resource_location=resource_location, metric_namespace=metric_namespace, **kwargs) self.odata_type = 'Microsoft.Azure.Management.Insights.Models.RuleMetricDataSource' # type: str self.metric_name = metric_name @@ -1120,8 +1185,8 @@ class ThresholdRuleCondition(RuleCondition): :param time_aggregation: the time aggregation operator. How the data that are collected should be combined over time. The default value is the PrimaryAggregationType of the Metric. Possible values include: "Average", "Minimum", "Maximum", "Total", "Last". - :type time_aggregation: str or ~$(python-base- - namespace).v2016_03_01.models.TimeAggregationOperator + :type time_aggregation: str or + ~$(python-base-namespace).v2016_03_01.models.TimeAggregationOperator """ _validation = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_monitor_management_client_enums.py index 1794d0c7662b..42b2bb7d2507 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/models/_monitor_management_client_enums.py @@ -57,7 +57,7 @@ class TimeAggregationOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum LAST = "Last" class Unit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """the unit of the metric. + """The unit of the metric. """ COUNT = "Count" @@ -67,3 +67,9 @@ class Unit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): BYTES_PER_SECOND = "BytesPerSecond" PERCENT = "Percent" MILLI_SECONDS = "MilliSeconds" + BYTE_SECONDS = "ByteSeconds" + UNSPECIFIED = "Unspecified" + CORES = "Cores" + MILLI_CORES = "MilliCores" + NANO_CORES = "NanoCores" + BITS_PER_SECOND = "BitsPerSecond" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py index 054934826b31..e852df95c901 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rule_incidents_operations.py @@ -80,7 +80,7 @@ def get( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'incidentName': self._serialize.url("incident_name", incident_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -98,7 +98,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Incident', pipeline_response) @@ -146,7 +146,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py index 4193d89ea525..82bc82bee3de 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_alert_rules_operations.py @@ -80,7 +80,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -115,7 +115,7 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore def delete( self, @@ -141,13 +141,14 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-03-01" + accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -157,6 +158,7 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -164,12 +166,13 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore def get( self, @@ -202,7 +205,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -220,7 +223,8 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AlertRuleResource', pipeline_response) @@ -228,7 +232,7 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore def update( self, @@ -264,7 +268,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -288,7 +292,7 @@ def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -301,7 +305,7 @@ def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules/{ruleName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules/{ruleName}'} # type: ignore def list_by_resource_group( self, @@ -336,7 +340,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -364,15 +368,16 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/alertrules'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/alertrules'} # type: ignore def list_by_subscription( self, @@ -403,7 +408,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -431,12 +436,13 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/alertrules'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/alertrules'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py index 742c69dc8f22..84bedb59ac2c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_log_profiles_operations.py @@ -71,7 +71,7 @@ def delete( url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -93,7 +93,7 @@ def delete( if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}'} # type: ignore def get( self, @@ -122,7 +122,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -140,7 +140,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LogProfileResource', pipeline_response) @@ -149,7 +149,7 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}'} # type: ignore def create_or_update( self, @@ -182,7 +182,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -212,7 +212,7 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}'} # type: ignore def update( self, @@ -244,7 +244,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'logProfileName': self._serialize.url("log_profile_name", log_profile_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -267,7 +267,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LogProfileResource', pipeline_response) @@ -276,7 +276,7 @@ def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles/{logProfileName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles/{logProfileName}'} # type: ignore def list( self, @@ -307,7 +307,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -343,4 +343,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/logprofiles'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/logprofiles'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py index dd1a67a25320..70e65461a6a8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_03_01/operations/_metric_definitions_operations.py @@ -115,7 +115,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py index f4e9ecb35978..49eeeacfbf31 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_metadata.json index d595643b716e..16c3223a2e2f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -22,7 +24,7 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true @@ -30,21 +32,61 @@ }, "constant": { }, - "call": "credential" + "call": "credential", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "metrics": "MetricsOperations", "service_diagnostic_settings": "ServiceDiagnosticSettingsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_management_client.py index 18c80e72a661..894c99e96514 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import MetricsOperations @@ -57,6 +58,21 @@ def __init__( self.service_diagnostic_settings = ServiceDiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py index 2a28aa709381..6e6da199d636 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_management_client.py index 1c424ce98abc..c050f4b4aa8f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -54,6 +55,20 @@ def __init__( self.service_diagnostic_settings = ServiceDiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py index a16847bb3ecd..4e6584b0e1d9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_metrics_operations.py @@ -45,7 +45,7 @@ def list( self, resource_uri: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MetricCollection"]: """Lists the metric values for a resource. @@ -122,7 +122,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py index 44549740b556..18fcacb6e3f4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/aio/operations/_service_diagnostic_settings_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def get( self, resource_uri: str, - **kwargs + **kwargs: Any ) -> "_models.ServiceDiagnosticSettingsResource": """Gets the active diagnostic settings for the specified resource. **WARNING**\ : This method will be deprecated in future releases. @@ -84,7 +84,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceDiagnosticSettingsResource', pipeline_response) @@ -99,7 +99,7 @@ async def create_or_update( self, resource_uri: str, parameters: "_models.ServiceDiagnosticSettingsResource", - **kwargs + **kwargs: Any ) -> "_models.ServiceDiagnosticSettingsResource": """Create or update new diagnostic settings for the specified resource. **WARNING**\ : This method will be deprecated in future releases. @@ -161,7 +161,7 @@ async def update( self, resource_uri: str, service_diagnostic_settings_resource: "_models.ServiceDiagnosticSettingsResourcePatch", - **kwargs + **kwargs: Any ) -> "_models.ServiceDiagnosticSettingsResource": """Updates an existing ServiceDiagnosticSettingsResource. To update other fields use the CreateOrUpdate method. **WARNING**\ : This method will be deprecated in future releases. @@ -209,7 +209,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceDiagnosticSettingsResource', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models.py index 86ba147e8131..d5842d8f0aec 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models.py @@ -110,7 +110,8 @@ class Metric(msrest.serialization.Model): string. :type name: ~$(python-base-namespace).v2016_09_01.models.LocalizableString :param unit: Required. the unit of the metric. Possible values include: "Count", "Bytes", - "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds". + "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", + "Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond". :type unit: str or ~$(python-base-namespace).v2016_09_01.models.Unit :param data: Required. Array of data points representing the metric values. :type data: list[~$(python-base-namespace).v2016_09_01.models.MetricValue] @@ -357,8 +358,7 @@ class ServiceDiagnosticSettingsResource(Resource): :type logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings] :param workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ @@ -417,8 +417,7 @@ class ServiceDiagnosticSettingsResourcePatch(msrest.serialization.Model): :type logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings] :param workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py index 34242d145757..44a91f381556 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_models_py3.py @@ -125,7 +125,8 @@ class Metric(msrest.serialization.Model): string. :type name: ~$(python-base-namespace).v2016_09_01.models.LocalizableString :param unit: Required. the unit of the metric. Possible values include: "Count", "Bytes", - "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds". + "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", + "Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond". :type unit: str or ~$(python-base-namespace).v2016_09_01.models.Unit :param data: Required. Array of data points representing the metric values. :type data: list[~$(python-base-namespace).v2016_09_01.models.MetricValue] @@ -397,8 +398,7 @@ class ServiceDiagnosticSettingsResource(Resource): :type logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings] :param workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ @@ -466,8 +466,7 @@ class ServiceDiagnosticSettingsResourcePatch(msrest.serialization.Model): :type logs: list[~$(python-base-namespace).v2016_09_01.models.LogSettings] :param workspace_id: The workspace ID (resource ID of a Log Analytics workspace) for a Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_monitor_management_client_enums.py index a97775944d3f..a8d1b59c86f2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/models/_monitor_management_client_enums.py @@ -27,7 +27,7 @@ def __getattr__(cls, name): class Unit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """the unit of the metric. + """The unit of the metric. """ COUNT = "Count" @@ -37,3 +37,9 @@ class Unit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): BYTES_PER_SECOND = "BytesPerSecond" PERCENT = "Percent" MILLI_SECONDS = "MilliSeconds" + BYTE_SECONDS = "ByteSeconds" + UNSPECIFIED = "Unspecified" + CORES = "Cores" + MILLI_CORES = "MilliCores" + NANO_CORES = "NanoCores" + BITS_PER_SECOND = "BitsPerSecond" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py index cdf6a8557a8d..09facc2424ab 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_metrics_operations.py @@ -127,7 +127,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py index 4bf7526dd8b1..aa768782b641 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2016_09_01/operations/_service_diagnostic_settings_operations.py @@ -89,7 +89,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceDiagnosticSettingsResource', pipeline_response) @@ -216,7 +216,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ServiceDiagnosticSettingsResource', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py index a79d97c17411..20b896410adb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_metadata.json index f34c78eab87d..fbd1af47ff22 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,41 +23,81 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "activity_log_alerts": "ActivityLogAlertsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_management_client.py index ddf7efa85be1..2fd4b9348900 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ActivityLogAlertsOperations @@ -29,7 +30,7 @@ class MonitorManagementClient(object): :vartype activity_log_alerts: $(python-base-namespace).v2017_03_01_preview.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -55,6 +56,24 @@ def __init__( self.activity_log_alerts = ActivityLogAlertsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py index 916df862bb10..bdfb3a86feb4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_management_client.py index 1f97fff0df70..75051515bdf3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -27,7 +28,7 @@ class MonitorManagementClient(object): :vartype activity_log_alerts: $(python-base-namespace).v2017_03_01_preview.aio.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -52,6 +53,23 @@ def __init__( self.activity_log_alerts = ActivityLogAlertsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py index 292f6ebc7657..13d3752a3570 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/aio/operations/_activity_log_alerts_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, activity_log_alert_name: str, activity_log_alert: "_models.ActivityLogAlertResource", - **kwargs + **kwargs: Any ) -> "_models.ActivityLogAlertResource": """Create a new activity log alert or update an existing one. @@ -73,7 +73,7 @@ async def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -116,7 +116,7 @@ async def get( self, resource_group_name: str, activity_log_alert_name: str, - **kwargs + **kwargs: Any ) -> "_models.ActivityLogAlertResource": """Get an activity log alert. @@ -140,7 +140,7 @@ async def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -160,7 +160,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) @@ -175,7 +175,7 @@ async def delete( self, resource_group_name: str, activity_log_alert_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an activity log alert. @@ -199,7 +199,7 @@ async def delete( # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -219,7 +219,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def update( resource_group_name: str, activity_log_alert_name: str, activity_log_alert_patch: "_models.ActivityLogAlertResourcePatch", - **kwargs + **kwargs: Any ) -> "_models.ActivityLogAlertResource": """Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. @@ -260,7 +260,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -284,7 +284,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) @@ -297,7 +297,7 @@ async def update( def list_by_subscription_id( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActivityLogAlertList"]: """Get a list of all activity log alerts in a subscription. @@ -323,7 +323,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -351,7 +351,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -365,7 +365,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActivityLogAlertList"]: """Get a list of all activity log alerts in a resource group. @@ -393,7 +393,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -422,7 +422,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models.py index abd716595d15..c8f2e52df3ed 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models.py @@ -45,8 +45,8 @@ class ActivityLogAlertActionList(msrest.serialization.Model): """A list of activity log alert actions. :param action_groups: The list of activity log alerts. - :type action_groups: list[~$(python-base- - namespace).v2017_03_01_preview.models.ActivityLogAlertActionGroup] + :type action_groups: + list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertActionGroup] """ _attribute_map = { @@ -67,8 +67,8 @@ class ActivityLogAlertAllOfCondition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param all_of: Required. The list of activity log alert conditions. - :type all_of: list[~$(python-base- - namespace).v2017_03_01_preview.models.ActivityLogAlertLeafCondition] + :type all_of: + list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertLeafCondition] """ _validation = { @@ -125,8 +125,8 @@ class ActivityLogAlertList(msrest.serialization.Model): """A list of activity log alerts. :param value: The list of activity log alerts. - :type value: list[~$(python-base- - namespace).v2017_03_01_preview.models.ActivityLogAlertResource] + :type value: + list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource] """ _attribute_map = { @@ -212,8 +212,8 @@ class ActivityLogAlertResource(Resource): is not enabled, then none of its actions will be activated. :type enabled: bool :param condition: The condition that will cause this alert to activate. - :type condition: ~$(python-base- - namespace).v2017_03_01_preview.models.ActivityLogAlertAllOfCondition + :type condition: + ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertAllOfCondition :param actions: The actions that will activate when the condition is met. :type actions: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertActionList :param description: A description of this activity log alert. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models_py3.py index a55fcbeb7e5b..e22fb206fcee 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/models/_models_py3.py @@ -50,8 +50,8 @@ class ActivityLogAlertActionList(msrest.serialization.Model): """A list of activity log alert actions. :param action_groups: The list of activity log alerts. - :type action_groups: list[~$(python-base- - namespace).v2017_03_01_preview.models.ActivityLogAlertActionGroup] + :type action_groups: + list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertActionGroup] """ _attribute_map = { @@ -74,8 +74,8 @@ class ActivityLogAlertAllOfCondition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param all_of: Required. The list of activity log alert conditions. - :type all_of: list[~$(python-base- - namespace).v2017_03_01_preview.models.ActivityLogAlertLeafCondition] + :type all_of: + list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertLeafCondition] """ _validation = { @@ -137,8 +137,8 @@ class ActivityLogAlertList(msrest.serialization.Model): """A list of activity log alerts. :param value: The list of activity log alerts. - :type value: list[~$(python-base- - namespace).v2017_03_01_preview.models.ActivityLogAlertResource] + :type value: + list[~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertResource] """ _attribute_map = { @@ -229,8 +229,8 @@ class ActivityLogAlertResource(Resource): is not enabled, then none of its actions will be activated. :type enabled: bool :param condition: The condition that will cause this alert to activate. - :type condition: ~$(python-base- - namespace).v2017_03_01_preview.models.ActivityLogAlertAllOfCondition + :type condition: + ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertAllOfCondition :param actions: The actions that will activate when the condition is met. :type actions: ~$(python-base-namespace).v2017_03_01_preview.models.ActivityLogAlertActionList :param description: A description of this activity log alert. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py index 94da74734c8c..c820ce837e51 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_03_01_preview/operations/_activity_log_alerts_operations.py @@ -78,7 +78,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -146,7 +146,7 @@ def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -166,7 +166,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) @@ -206,7 +206,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -226,7 +226,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -268,7 +268,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -292,7 +292,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) @@ -332,7 +332,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -360,7 +360,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -403,7 +403,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -432,7 +432,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py index 46edaf2a1301..5f2a86e565f7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_metadata.json index 1dd24a1ad48d..9eb75d521417 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,42 +23,82 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "action_groups": "ActionGroupsOperations", "activity_log_alerts": "ActivityLogAlertsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_management_client.py index ae156e7cffec..c030a475a77b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ActionGroupsOperations @@ -32,7 +33,7 @@ class MonitorManagementClient(object): :vartype activity_log_alerts: $(python-base-namespace).v2017_04_01.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -60,6 +61,24 @@ def __init__( self.activity_log_alerts = ActivityLogAlertsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py index 57fdcb118a0d..77ab731e4a41 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_management_client.py index e2c0fd2efe6b..b23f3b73ad1a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -30,7 +31,7 @@ class MonitorManagementClient(object): :vartype activity_log_alerts: $(python-base-namespace).v2017_04_01.aio.operations.ActivityLogAlertsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -57,6 +58,23 @@ def __init__( self.activity_log_alerts = ActivityLogAlertsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py index 353ce2bc2223..8dcaae576727 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_action_groups_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, action_group_name: str, action_group: "_models.ActionGroupResource", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Create a new action group or update an existing one. @@ -75,7 +75,7 @@ async def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -116,7 +116,7 @@ async def get( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Get an action group. @@ -142,7 +142,7 @@ async def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -160,7 +160,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -175,7 +175,7 @@ async def delete( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an action group. @@ -201,7 +201,7 @@ async def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -219,7 +219,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def update( resource_group_name: str, action_group_name: str, action_group_patch: "_models.ActionGroupPatchBody", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. @@ -259,7 +259,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -283,7 +283,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -296,7 +296,7 @@ async def update( def list_by_subscription_id( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a subscription. @@ -322,7 +322,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -350,7 +350,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -364,7 +364,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a resource group. @@ -393,7 +393,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -421,7 +421,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -437,7 +437,7 @@ async def enable_receiver( resource_group_name: str, action_group_name: str, enable_request: "_models.EnableRequest", - **kwargs + **kwargs: Any ) -> None: """Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. @@ -467,7 +467,7 @@ async def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -489,7 +489,7 @@ async def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py index 9b26a1bb6b0b..f58a8bf3f2a1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/aio/operations/_activity_log_alerts_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, activity_log_alert_name: str, activity_log_alert: "_models.ActivityLogAlertResource", - **kwargs + **kwargs: Any ) -> "_models.ActivityLogAlertResource": """Create a new activity log alert or update an existing one. @@ -73,7 +73,7 @@ async def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -116,7 +116,7 @@ async def get( self, resource_group_name: str, activity_log_alert_name: str, - **kwargs + **kwargs: Any ) -> "_models.ActivityLogAlertResource": """Get an activity log alert. @@ -140,7 +140,7 @@ async def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -160,7 +160,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) @@ -175,7 +175,7 @@ async def delete( self, resource_group_name: str, activity_log_alert_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an activity log alert. @@ -199,7 +199,7 @@ async def delete( # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -219,7 +219,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def update( resource_group_name: str, activity_log_alert_name: str, activity_log_alert_patch: "_models.ActivityLogAlertPatchBody", - **kwargs + **kwargs: Any ) -> "_models.ActivityLogAlertResource": """Updates an existing ActivityLogAlertResource's tags. To update other fields use the CreateOrUpdate method. @@ -260,7 +260,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -284,7 +284,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) @@ -297,7 +297,7 @@ async def update( def list_by_subscription_id( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActivityLogAlertList"]: """Get a list of all activity log alerts in a subscription. @@ -323,7 +323,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -351,7 +351,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -365,7 +365,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActivityLogAlertList"]: """Get a list of all activity log alerts in a resource group. @@ -393,7 +393,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -422,7 +422,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models.py index ede1d65b4331..a4233a319945 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models.py @@ -135,12 +135,12 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2017_04_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2017_04_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2017_04_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2017_04_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2017_04_01.models.AutomationRunbookReceiver] """ _validation = { @@ -217,8 +217,8 @@ class ActivityLogAlertActionList(msrest.serialization.Model): """A list of activity log alert actions. :param action_groups: The list of activity log alerts. - :type action_groups: list[~$(python-base- - namespace).v2017_04_01.models.ActivityLogAlertActionGroup] + :type action_groups: + list[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertActionGroup] """ _attribute_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models_py3.py index 35eed01fff8e..e7619cc6add3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/models/_models_py3.py @@ -146,12 +146,12 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2017_04_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2017_04_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2017_04_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2017_04_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2017_04_01.models.AutomationRunbookReceiver] """ _validation = { @@ -242,8 +242,8 @@ class ActivityLogAlertActionList(msrest.serialization.Model): """A list of activity log alert actions. :param action_groups: The list of activity log alerts. - :type action_groups: list[~$(python-base- - namespace).v2017_04_01.models.ActivityLogAlertActionGroup] + :type action_groups: + list[~$(python-base-namespace).v2017_04_01.models.ActivityLogAlertActionGroup] """ _attribute_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py index 689b1d5d1421..ea02f9051b2b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_action_groups_operations.py @@ -80,7 +80,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -148,7 +148,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -166,7 +166,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -208,7 +208,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -226,7 +226,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -267,7 +267,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -291,7 +291,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -331,7 +331,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -359,7 +359,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -403,7 +403,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -431,7 +431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -478,7 +478,7 @@ def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -500,7 +500,7 @@ def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py index 5854c48a1409..f1b3eaf39f84 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_04_01/operations/_activity_log_alerts_operations.py @@ -78,7 +78,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -146,7 +146,7 @@ def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -166,7 +166,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) @@ -206,7 +206,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -226,7 +226,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -268,7 +268,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), } @@ -292,7 +292,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) @@ -332,7 +332,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -360,7 +360,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -403,7 +403,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -432,7 +432,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py index 022f5a44fa55..7f204474d189 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,19 +29,25 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str """ def __init__( self, credential, # type: "TokenCredential" + subscription_id, # type: str **kwargs # type: Any ): # type: (...) -> None if credential is None: raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") super(MonitorManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential + self.subscription_id = subscription_id self.api_version = "2017-05-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_metadata.json index 30b3ab224ba8..1ae63ddbf336 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -18,26 +20,82 @@ "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials.TokenCredential", "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true } }, "constant": { }, - "call": "credential" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "diagnostic_settings_category": "DiagnosticSettingsCategoryOperations", @@ -45,9 +103,5 @@ "metric_definitions": "MetricDefinitionsOperations", "metrics": "MetricsOperations", "subscription_diagnostic_settings": "SubscriptionDiagnosticSettingsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_management_client.py index 32bfe4c98887..bc4d0dc8dbcd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import DiagnosticSettingsCategoryOperations @@ -41,19 +42,22 @@ class MonitorManagementClient(object): :vartype subscription_diagnostic_settings: $(python-base-namespace).v2017_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str :param str base_url: Service URL """ def __init__( self, credential, # type: "TokenCredential" + subscription_id, # type: str base_url=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> None if not base_url: base_url = 'https://management.azure.com' - self._config = MonitorManagementClientConfiguration(credential, **kwargs) + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -72,6 +76,24 @@ def __init__( self.subscription_diagnostic_settings = SubscriptionDiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py index 2db414bb1096..45862e08ab63 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,18 +27,24 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str """ def __init__( self, credential: "AsyncTokenCredential", + subscription_id: str, **kwargs: Any ) -> None: if credential is None: raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") super(MonitorManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential + self.subscription_id = subscription_id self.api_version = "2017-05-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_management_client.py index 61dc9b9b1aac..f01ad0b4a80c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -39,18 +40,21 @@ class MonitorManagementClient(object): :vartype subscription_diagnostic_settings: $(python-base-namespace).v2017_05_01_preview.aio.operations.SubscriptionDiagnosticSettingsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str :param str base_url: Service URL """ def __init__( self, credential: "AsyncTokenCredential", + subscription_id: str, base_url: Optional[str] = None, **kwargs: Any ) -> None: if not base_url: base_url = 'https://management.azure.com' - self._config = MonitorManagementClientConfiguration(credential, **kwargs) + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} @@ -69,6 +73,23 @@ def __init__( self.subscription_diagnostic_settings = SubscriptionDiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py index cb356ad37a9a..45f9db049d63 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py @@ -44,7 +44,7 @@ async def get( self, resource_uri: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticSettingsCategoryResource": """Gets the diagnostic settings category for the specified resource. @@ -87,7 +87,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsCategoryResource', pipeline_response) @@ -96,12 +96,12 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}'} # type: ignore async def list( self, resource_uri: str, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticSettingsCategoryResourceCollection": """Lists the diagnostic settings categories for the specified resource. @@ -141,7 +141,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsCategoryResourceCollection', pipeline_response) @@ -150,4 +150,4 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py index 95c8a5fd4f21..6e9b20cb8146 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_diagnostic_settings_operations.py @@ -44,7 +44,7 @@ async def get( self, resource_uri: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticSettingsResource": """Gets the active diagnostic settings for the specified resource. @@ -87,7 +87,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsResource', pipeline_response) @@ -96,14 +96,14 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore async def create_or_update( self, resource_uri: str, name: str, parameters: "_models.DiagnosticSettingsResource", - **kwargs + **kwargs: Any ) -> "_models.DiagnosticSettingsResource": """Creates or updates diagnostic settings for the specified resource. @@ -153,7 +153,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsResource', pipeline_response) @@ -162,13 +162,13 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'} # type: ignore + create_or_update.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore async def delete( self, resource_uri: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes existing diagnostic settings for the specified resource. @@ -211,18 +211,18 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'} # type: ignore + delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore async def list( self, resource_uri: str, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticSettingsResourceCollection": """Gets the active diagnostic settings list for the specified resource. @@ -262,7 +262,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsResourceCollection', pipeline_response) @@ -271,4 +271,4 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py index de54aaaa2548..2f1e2fcc8abb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metric_definitions_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, resource_uri: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MetricDefinitionCollection"]: """Lists the metric definitions for the resource. @@ -100,7 +100,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py index e5acd4985819..c67d4fab6b8a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_metrics_operations.py @@ -52,7 +52,7 @@ async def list( orderby: Optional[str] = None, filter: Optional[str] = None, result_type: Optional[Union[str, "_models.ResultType"]] = None, - **kwargs + **kwargs: Any ) -> "_models.Response": """**Lists the metric values for a resource**. @@ -138,7 +138,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Response', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py index 8d38157011b2..64ba48d799b0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py @@ -42,14 +42,11 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def get( self, - subscription_id: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionDiagnosticSettingsResource": """Gets the active subscription diagnostic settings for the specified resource. - :param subscription_id: The subscription id. - :type subscription_id: str :param name: The name of the diagnostic setting. :type name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -68,7 +65,7 @@ async def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str', skip_quote=True), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'name': self._serialize.url("name", name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -87,7 +84,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SubscriptionDiagnosticSettingsResource', pipeline_response) @@ -100,15 +97,12 @@ async def get( async def create_or_update( self, - subscription_id: str, name: str, parameters: "_models.SubscriptionDiagnosticSettingsResource", - **kwargs + **kwargs: Any ) -> "_models.SubscriptionDiagnosticSettingsResource": """Creates or updates subscription diagnostic settings for the specified resource. - :param subscription_id: The subscription id. - :type subscription_id: str :param name: The name of the diagnostic setting. :type name: str :param parameters: Parameters supplied to the operation. @@ -130,7 +124,7 @@ async def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str', skip_quote=True), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'name': self._serialize.url("name", name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -153,7 +147,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SubscriptionDiagnosticSettingsResource', pipeline_response) @@ -166,14 +160,11 @@ async def create_or_update( async def delete( self, - subscription_id: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes existing subscription diagnostic settings for the specified resource. - :param subscription_id: The subscription id. - :type subscription_id: str :param name: The name of the diagnostic setting. :type name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -192,7 +183,7 @@ async def delete( # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str', skip_quote=True), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'name': self._serialize.url("name", name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -211,7 +202,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -221,13 +212,10 @@ async def delete( async def list( self, - subscription_id: str, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionDiagnosticSettingsResourceCollection": """Gets the active subscription diagnostic settings list for the specified subscriptionId. - :param subscription_id: The subscription id. - :type subscription_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResourceCollection, or the result of cls(response) :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection @@ -244,7 +232,7 @@ async def list( # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str', skip_quote=True), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -262,7 +250,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SubscriptionDiagnosticSettingsResourceCollection', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py index eec0efc4acc0..4f1b71bd9cee 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models.py @@ -86,8 +86,8 @@ class DiagnosticSettingsCategoryResourceCollection(msrest.serialization.Model): """Represents a collection of diagnostic setting category resources. :param value: The collection of diagnostic settings category resources. - :type value: list[~$(python-base- - namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResource] + :type value: + list[~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResource] """ _attribute_map = { @@ -130,8 +130,7 @@ class DiagnosticSettingsResource(ProxyOnlyResource): :type logs: list[~$(python-base-namespace).v2017_05_01_preview.models.LogSettings] :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str :param log_analytics_destination_type: A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type @@ -179,8 +178,8 @@ class DiagnosticSettingsResourceCollection(msrest.serialization.Model): """Represents a collection of alert rule resources. :param value: The collection of diagnostic settings resources;. - :type value: list[~$(python-base- - namespace).v2017_05_01_preview.models.DiagnosticSettingsResource] + :type value: + list[~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource] """ _attribute_map = { @@ -317,9 +316,15 @@ class Metric(msrest.serialization.Model): :param name: Required. the name and the display name of the metric, i.e. it is localizable string. :type name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :param display_description: Detailed description of this metric. + :type display_description: str + :param error_code: 'Success' or the error details on query failures for this metric. + :type error_code: str + :param error_message: Error message encountered querying this specific metric. + :type error_message: str :param unit: Required. the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", - "Unspecified". + "Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond". :type unit: str or ~$(python-base-namespace).v2017_05_01_preview.models.Unit :param timeseries: Required. the time series returned when a data query is performed. :type timeseries: list[~$(python-base-namespace).v2017_05_01_preview.models.TimeSeriesElement] @@ -337,6 +342,9 @@ class Metric(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'timeseries': {'key': 'timeseries', 'type': '[TimeSeriesElement]'}, } @@ -349,6 +357,9 @@ def __init__( self.id = kwargs['id'] self.type = kwargs['type'] self.name = kwargs['name'] + self.display_description = kwargs.get('display_description', None) + self.error_code = kwargs.get('error_code', None) + self.error_message = kwargs.get('error_message', None) self.unit = kwargs['unit'] self.timeseries = kwargs['timeseries'] @@ -387,18 +398,23 @@ class MetricDefinition(msrest.serialization.Model): :type resource_id: str :param name: the name and the display name of the metric, i.e. it is a localizable string. :type name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :param display_description: Detailed description of this metric. + :type display_description: str + :param category: Custom category name for this metric. + :type category: str :param unit: the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified". + "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", + "Cores", "MilliCores", "NanoCores", "BitsPerSecond". :type unit: str or ~$(python-base-namespace).v2017_05_01_preview.models.Unit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: "None", "Average", "Count", "Minimum", "Maximum", "Total". - :type primary_aggregation_type: str or ~$(python-base- - namespace).v2017_05_01_preview.models.AggregationType + :type primary_aggregation_type: str or + ~$(python-base-namespace).v2017_05_01_preview.models.AggregationType :param metric_availabilities: the collection of what aggregation intervals are available to be queried. - :type metric_availabilities: list[~$(python-base- - namespace).v2017_05_01_preview.models.MetricAvailability] + :type metric_availabilities: + list[~$(python-base-namespace).v2017_05_01_preview.models.MetricAvailability] :param id: the resource identifier of the metric definition. :type id: str :param dimensions: the name and the display name of the dimension, i.e. it is a localizable @@ -410,6 +426,8 @@ class MetricDefinition(msrest.serialization.Model): 'is_dimension_required': {'key': 'isDimensionRequired', 'type': 'bool'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, @@ -425,6 +443,8 @@ def __init__( self.is_dimension_required = kwargs.get('is_dimension_required', None) self.resource_id = kwargs.get('resource_id', None) self.name = kwargs.get('name', None) + self.display_description = kwargs.get('display_description', None) + self.category = kwargs.get('category', None) self.unit = kwargs.get('unit', None) self.primary_aggregation_type = kwargs.get('primary_aggregation_type', None) self.metric_availabilities = kwargs.get('metric_availabilities', None) @@ -547,7 +567,7 @@ class Response(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param cost: The integer value representing the cost of the query, for data case. + :param cost: The integer value representing the relative cost of the query. :type cost: int :param timespan: Required. The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned @@ -683,8 +703,7 @@ class SubscriptionDiagnosticSettingsResource(SubscriptionProxyOnlyResource): :type logs: list[~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionLogSettings] :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ @@ -724,8 +743,8 @@ class SubscriptionDiagnosticSettingsResourceCollection(msrest.serialization.Mode """Represents a collection of subscription diagnostic settings resources. :param value: The collection of subscription diagnostic settings resources. - :type value: list[~$(python-base- - namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + :type value: + list[~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource] """ _attribute_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py index 1ab88ae839f4..c5e381a974b8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_models_py3.py @@ -93,8 +93,8 @@ class DiagnosticSettingsCategoryResourceCollection(msrest.serialization.Model): """Represents a collection of diagnostic setting category resources. :param value: The collection of diagnostic settings category resources. - :type value: list[~$(python-base- - namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResource] + :type value: + list[~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsCategoryResource] """ _attribute_map = { @@ -139,8 +139,7 @@ class DiagnosticSettingsResource(ProxyOnlyResource): :type logs: list[~$(python-base-namespace).v2017_05_01_preview.models.LogSettings] :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str :param log_analytics_destination_type: A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type @@ -197,8 +196,8 @@ class DiagnosticSettingsResourceCollection(msrest.serialization.Model): """Represents a collection of alert rule resources. :param value: The collection of diagnostic settings resources;. - :type value: list[~$(python-base- - namespace).v2017_05_01_preview.models.DiagnosticSettingsResource] + :type value: + list[~$(python-base-namespace).v2017_05_01_preview.models.DiagnosticSettingsResource] """ _attribute_map = { @@ -350,9 +349,15 @@ class Metric(msrest.serialization.Model): :param name: Required. the name and the display name of the metric, i.e. it is localizable string. :type name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :param display_description: Detailed description of this metric. + :type display_description: str + :param error_code: 'Success' or the error details on query failures for this metric. + :type error_code: str + :param error_message: Error message encountered querying this specific metric. + :type error_message: str :param unit: Required. the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", - "Unspecified". + "Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond". :type unit: str or ~$(python-base-namespace).v2017_05_01_preview.models.Unit :param timeseries: Required. the time series returned when a data query is performed. :type timeseries: list[~$(python-base-namespace).v2017_05_01_preview.models.TimeSeriesElement] @@ -370,6 +375,9 @@ class Metric(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'timeseries': {'key': 'timeseries', 'type': '[TimeSeriesElement]'}, } @@ -382,12 +390,18 @@ def __init__( name: "LocalizableString", unit: Union[str, "Unit"], timeseries: List["TimeSeriesElement"], + display_description: Optional[str] = None, + error_code: Optional[str] = None, + error_message: Optional[str] = None, **kwargs ): super(Metric, self).__init__(**kwargs) self.id = id self.type = type self.name = name + self.display_description = display_description + self.error_code = error_code + self.error_message = error_message self.unit = unit self.timeseries = timeseries @@ -429,18 +443,23 @@ class MetricDefinition(msrest.serialization.Model): :type resource_id: str :param name: the name and the display name of the metric, i.e. it is a localizable string. :type name: ~$(python-base-namespace).v2017_05_01_preview.models.LocalizableString + :param display_description: Detailed description of this metric. + :type display_description: str + :param category: Custom category name for this metric. + :type category: str :param unit: the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", - "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified". + "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", + "Cores", "MilliCores", "NanoCores", "BitsPerSecond". :type unit: str or ~$(python-base-namespace).v2017_05_01_preview.models.Unit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: "None", "Average", "Count", "Minimum", "Maximum", "Total". - :type primary_aggregation_type: str or ~$(python-base- - namespace).v2017_05_01_preview.models.AggregationType + :type primary_aggregation_type: str or + ~$(python-base-namespace).v2017_05_01_preview.models.AggregationType :param metric_availabilities: the collection of what aggregation intervals are available to be queried. - :type metric_availabilities: list[~$(python-base- - namespace).v2017_05_01_preview.models.MetricAvailability] + :type metric_availabilities: + list[~$(python-base-namespace).v2017_05_01_preview.models.MetricAvailability] :param id: the resource identifier of the metric definition. :type id: str :param dimensions: the name and the display name of the dimension, i.e. it is a localizable @@ -452,6 +471,8 @@ class MetricDefinition(msrest.serialization.Model): 'is_dimension_required': {'key': 'isDimensionRequired', 'type': 'bool'}, 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, 'metric_availabilities': {'key': 'metricAvailabilities', 'type': '[MetricAvailability]'}, @@ -465,6 +486,8 @@ def __init__( is_dimension_required: Optional[bool] = None, resource_id: Optional[str] = None, name: Optional["LocalizableString"] = None, + display_description: Optional[str] = None, + category: Optional[str] = None, unit: Optional[Union[str, "Unit"]] = None, primary_aggregation_type: Optional[Union[str, "AggregationType"]] = None, metric_availabilities: Optional[List["MetricAvailability"]] = None, @@ -476,6 +499,8 @@ def __init__( self.is_dimension_required = is_dimension_required self.resource_id = resource_id self.name = name + self.display_description = display_description + self.category = category self.unit = unit self.primary_aggregation_type = primary_aggregation_type self.metric_availabilities = metric_availabilities @@ -612,7 +637,7 @@ class Response(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param cost: The integer value representing the cost of the query, for data case. + :param cost: The integer value representing the relative cost of the query. :type cost: int :param timespan: Required. The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned @@ -758,8 +783,7 @@ class SubscriptionDiagnosticSettingsResource(SubscriptionProxyOnlyResource): :type logs: list[~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionLogSettings] :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ @@ -807,8 +831,8 @@ class SubscriptionDiagnosticSettingsResourceCollection(msrest.serialization.Mode """Represents a collection of subscription diagnostic settings resources. :param value: The collection of subscription diagnostic settings resources. - :type value: list[~$(python-base- - namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + :type value: + list[~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResource] """ _attribute_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_monitor_management_client_enums.py index 929a353a9bea..a9c23992cba4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/models/_monitor_management_client_enums.py @@ -50,7 +50,7 @@ class ResultType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): METADATA = "Metadata" class Unit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """the unit of the metric. + """The unit of the metric. """ COUNT = "Count" @@ -62,3 +62,7 @@ class Unit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MILLI_SECONDS = "MilliSeconds" BYTE_SECONDS = "ByteSeconds" UNSPECIFIED = "Unspecified" + CORES = "Cores" + MILLI_CORES = "MilliCores" + NANO_CORES = "NanoCores" + BITS_PER_SECOND = "BitsPerSecond" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py index b4f988ccfad0..34a67c997d28 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_category_operations.py @@ -92,7 +92,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsCategoryResource', pipeline_response) @@ -101,7 +101,7 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories/{name}'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}'} # type: ignore def list( self, @@ -147,7 +147,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsCategoryResourceCollection', pipeline_response) @@ -156,4 +156,4 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettingsCategories'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py index c1a0017ef007..1a0812a78dbd 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_diagnostic_settings_operations.py @@ -92,7 +92,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsResource', pipeline_response) @@ -101,7 +101,7 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore def create_or_update( self, @@ -159,7 +159,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsResource', pipeline_response) @@ -168,7 +168,7 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'} # type: ignore + create_or_update.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore def delete( self, @@ -218,13 +218,13 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings/{name}'} # type: ignore + delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore def list( self, @@ -270,7 +270,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DiagnosticSettingsResourceCollection', pipeline_response) @@ -279,4 +279,4 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/diagnosticSettings'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py index fe8410940a9d..8ea5c705647b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metric_definitions_operations.py @@ -105,7 +105,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py index f784c87fe166..797f7c758f49 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_metrics_operations.py @@ -143,7 +143,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Response', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py index b8f0928e298b..00fd46a8c877 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_05_01_preview/operations/_subscription_diagnostic_settings_operations.py @@ -46,15 +46,12 @@ def __init__(self, client, config, serializer, deserializer): def get( self, - subscription_id, # type: str name, # type: str **kwargs # type: Any ): # type: (...) -> "_models.SubscriptionDiagnosticSettingsResource" """Gets the active subscription diagnostic settings for the specified resource. - :param subscription_id: The subscription id. - :type subscription_id: str :param name: The name of the diagnostic setting. :type name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -73,7 +70,7 @@ def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str', skip_quote=True), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'name': self._serialize.url("name", name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -92,7 +89,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SubscriptionDiagnosticSettingsResource', pipeline_response) @@ -105,7 +102,6 @@ def get( def create_or_update( self, - subscription_id, # type: str name, # type: str parameters, # type: "_models.SubscriptionDiagnosticSettingsResource" **kwargs # type: Any @@ -113,8 +109,6 @@ def create_or_update( # type: (...) -> "_models.SubscriptionDiagnosticSettingsResource" """Creates or updates subscription diagnostic settings for the specified resource. - :param subscription_id: The subscription id. - :type subscription_id: str :param name: The name of the diagnostic setting. :type name: str :param parameters: Parameters supplied to the operation. @@ -136,7 +130,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str', skip_quote=True), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'name': self._serialize.url("name", name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -159,7 +153,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SubscriptionDiagnosticSettingsResource', pipeline_response) @@ -172,15 +166,12 @@ def create_or_update( def delete( self, - subscription_id, # type: str name, # type: str **kwargs # type: Any ): # type: (...) -> None """Deletes existing subscription diagnostic settings for the specified resource. - :param subscription_id: The subscription id. - :type subscription_id: str :param name: The name of the diagnostic setting. :type name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -199,7 +190,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str', skip_quote=True), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'name': self._serialize.url("name", name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -218,7 +209,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -228,14 +219,11 @@ def delete( def list( self, - subscription_id, # type: str **kwargs # type: Any ): # type: (...) -> "_models.SubscriptionDiagnosticSettingsResourceCollection" """Gets the active subscription diagnostic settings list for the specified subscriptionId. - :param subscription_id: The subscription id. - :type subscription_id: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SubscriptionDiagnosticSettingsResourceCollection, or the result of cls(response) :rtype: ~$(python-base-namespace).v2017_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection @@ -252,7 +240,7 @@ def list( # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("subscription_id", subscription_id, 'str', skip_quote=True), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -270,7 +258,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SubscriptionDiagnosticSettingsResourceCollection', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_configuration.py index 294afff25011..6dd30405ac62 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_metadata.json index 2ab7a7ecdf97..be87d4f16fcc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -22,7 +24,7 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true @@ -30,20 +32,60 @@ }, "constant": { }, - "call": "credential" + "call": "credential", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "metric_baseline": "MetricBaselineOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_monitor_management_client.py index a2ab9af3b53c..6b0003ef7c34 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import MetricBaselineOperations @@ -52,6 +53,21 @@ def __init__( self.metric_baseline = MetricBaselineOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_configuration.py index 6d9125dcdd75..f0599c4e5ec2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_monitor_management_client.py index 0c7128dc2c6d..66e7e2379476 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -49,6 +50,20 @@ def __init__( self.metric_baseline = MetricBaselineOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/_metric_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/_metric_baseline_operations.py index d4b82f738fea..dbf2ab029f66 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/_metric_baseline_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/aio/operations/_metric_baseline_operations.py @@ -50,7 +50,7 @@ async def get( aggregation: Optional[str] = None, sensitivities: Optional[str] = None, result_type: Optional[Union[str, "_models.ResultType"]] = None, - **kwargs + **kwargs: Any ) -> "_models.BaselineResponse": """**Gets the baseline values for a specific metric**. @@ -118,7 +118,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BaselineResponse', pipeline_response) @@ -127,13 +127,13 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/baseline/{metricName}'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}'} # type: ignore async def calculate_baseline( self, resource_uri: str, time_series_information: "_models.TimeSeriesInformation", - **kwargs + **kwargs: Any ) -> "_models.CalculateBaselineResponse": """**Lists the baseline values for a resource**. @@ -184,7 +184,7 @@ async def calculate_baseline( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CalculateBaselineResponse', pipeline_response) @@ -193,4 +193,4 @@ async def calculate_baseline( return cls(pipeline_response, deserialized, {}) return deserialized - calculate_baseline.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/calculatebaseline'} # type: ignore + calculate_baseline.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models.py index ce966a8a0103..7cdac8f92b2a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models.py @@ -22,6 +22,8 @@ class Baseline(msrest.serialization.Model): :type low_thresholds: list[float] :param high_thresholds: Required. The high thresholds of the baseline. :type high_thresholds: list[float] + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[~datetime.datetime] """ _validation = { @@ -34,6 +36,7 @@ class Baseline(msrest.serialization.Model): 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, 'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, } def __init__( @@ -44,6 +47,7 @@ def __init__( self.sensitivity = kwargs['sensitivity'] self.low_thresholds = kwargs['low_thresholds'] self.high_thresholds = kwargs['high_thresholds'] + self.timestamps = kwargs.get('timestamps', None) class BaselineMetadataValue(msrest.serialization.Model): @@ -95,8 +99,8 @@ class BaselineResponse(msrest.serialization.Model): :param baseline: the baseline values for each sensitivity. :type baseline: list[~$(python-base-namespace).v2017_11_01_preview.models.Baseline] :param metadata: the baseline metadata values. - :type metadata: list[~$(python-base- - namespace).v2017_11_01_preview.models.BaselineMetadataValue] + :type metadata: + list[~$(python-base-namespace).v2017_11_01_preview.models.BaselineMetadataValue] """ _validation = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models_py3.py index 595b15225092..343075e3c0dc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/models/_models_py3.py @@ -27,6 +27,8 @@ class Baseline(msrest.serialization.Model): :type low_thresholds: list[float] :param high_thresholds: Required. The high thresholds of the baseline. :type high_thresholds: list[float] + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[~datetime.datetime] """ _validation = { @@ -39,6 +41,7 @@ class Baseline(msrest.serialization.Model): 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, 'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, } def __init__( @@ -47,12 +50,14 @@ def __init__( sensitivity: Union[str, "Sensitivity"], low_thresholds: List[float], high_thresholds: List[float], + timestamps: Optional[List[datetime.datetime]] = None, **kwargs ): super(Baseline, self).__init__(**kwargs) self.sensitivity = sensitivity self.low_thresholds = low_thresholds self.high_thresholds = high_thresholds + self.timestamps = timestamps class BaselineMetadataValue(msrest.serialization.Model): @@ -107,8 +112,8 @@ class BaselineResponse(msrest.serialization.Model): :param baseline: the baseline values for each sensitivity. :type baseline: list[~$(python-base-namespace).v2017_11_01_preview.models.Baseline] :param metadata: the baseline metadata values. - :type metadata: list[~$(python-base- - namespace).v2017_11_01_preview.models.BaselineMetadataValue] + :type metadata: + list[~$(python-base-namespace).v2017_11_01_preview.models.BaselineMetadataValue] """ _validation = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/_metric_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/_metric_baseline_operations.py index 1974d16f13c4..d3198ee56882 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/_metric_baseline_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_11_01_preview/operations/_metric_baseline_operations.py @@ -123,7 +123,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BaselineResponse', pipeline_response) @@ -132,7 +132,7 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/baseline/{metricName}'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}'} # type: ignore def calculate_baseline( self, @@ -190,7 +190,7 @@ def calculate_baseline( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CalculateBaselineResponse', pipeline_response) @@ -199,4 +199,4 @@ def calculate_baseline( return cls(pipeline_response, deserialized, {}) return deserialized - calculate_baseline.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/calculatebaseline'} # type: ignore + calculate_baseline.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py index 51f3be0f9102..a1191ae931c4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_metadata.json index f4feaa1b41d5..d10acf8b52db 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -22,7 +24,7 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true @@ -30,20 +32,60 @@ }, "constant": { }, - "call": "credential" + "call": "credential", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "metric_namespaces": "MetricNamespacesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_management_client.py index 52d74ca8855f..fde0624d9475 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import MetricNamespacesOperations @@ -52,6 +53,21 @@ def __init__( self.metric_namespaces = MetricNamespacesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py index b1944665bb4c..8278395d0e83 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_management_client.py index 6aa7637f579c..174248807f3e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -49,6 +50,20 @@ def __init__( self.metric_namespaces = MetricNamespacesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py index 15497b8ed00c..0db0d9d75a4e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/aio/operations/_metric_namespaces_operations.py @@ -45,7 +45,7 @@ def list( self, resource_uri: str, start_time: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MetricNamespaceCollection"]: """Lists the metric namespaces for the resource. @@ -106,7 +106,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/__init__.py index cad75a24b747..243ba1098bad 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/__init__.py @@ -17,9 +17,14 @@ from ._models import MetricNamespaceCollection # type: ignore from ._models import MetricNamespaceName # type: ignore +from ._monitor_management_client_enums import ( + NamespaceClassification, +) + __all__ = [ 'ErrorResponse', 'MetricNamespace', 'MetricNamespaceCollection', 'MetricNamespaceName', + 'NamespaceClassification', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models.py index 4ef2490bee1a..4e9ee9c2fe29 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models.py @@ -36,12 +36,15 @@ def __init__( class MetricNamespace(msrest.serialization.Model): """Metric namespace class specifies the metadata for a metric namespace. - :param id: The ID of the metricNamespace. + :param id: The ID of the metric namespace. :type id: str :param type: The type of the namespace. :type type: str - :param name: The name of the namespace. + :param name: The escaped name of the namespace. :type name: str + :param classification: Kind of namespace. Possible values include: "Platform", "Custom", "Qos". + :type classification: str or + ~$(python-base-namespace).v2017_12_01_preview.models.NamespaceClassification :param properties: Properties which include the fully qualified namespace name. :type properties: ~$(python-base-namespace).v2017_12_01_preview.models.MetricNamespaceName """ @@ -50,6 +53,7 @@ class MetricNamespace(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'classification': {'key': 'classification', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MetricNamespaceName'}, } @@ -61,6 +65,7 @@ def __init__( self.id = kwargs.get('id', None) self.type = kwargs.get('type', None) self.name = kwargs.get('name', None) + self.classification = kwargs.get('classification', None) self.properties = kwargs.get('properties', None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models_py3.py index 76eba589eb68..e31361dc0b99 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_models_py3.py @@ -6,11 +6,13 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import List, Optional +from typing import List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization +from ._monitor_management_client_enums import * + class ErrorResponse(msrest.serialization.Model): """Describes the format of Error response. @@ -41,12 +43,15 @@ def __init__( class MetricNamespace(msrest.serialization.Model): """Metric namespace class specifies the metadata for a metric namespace. - :param id: The ID of the metricNamespace. + :param id: The ID of the metric namespace. :type id: str :param type: The type of the namespace. :type type: str - :param name: The name of the namespace. + :param name: The escaped name of the namespace. :type name: str + :param classification: Kind of namespace. Possible values include: "Platform", "Custom", "Qos". + :type classification: str or + ~$(python-base-namespace).v2017_12_01_preview.models.NamespaceClassification :param properties: Properties which include the fully qualified namespace name. :type properties: ~$(python-base-namespace).v2017_12_01_preview.models.MetricNamespaceName """ @@ -55,6 +60,7 @@ class MetricNamespace(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, + 'classification': {'key': 'classification', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'MetricNamespaceName'}, } @@ -64,6 +70,7 @@ def __init__( id: Optional[str] = None, type: Optional[str] = None, name: Optional[str] = None, + classification: Optional[Union[str, "NamespaceClassification"]] = None, properties: Optional["MetricNamespaceName"] = None, **kwargs ): @@ -71,6 +78,7 @@ def __init__( self.id = id self.type = type self.name = name + self.classification = classification self.properties = properties diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_monitor_management_client_enums.py new file mode 100644 index 000000000000..8df48e53f31d --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/models/_monitor_management_client_enums.py @@ -0,0 +1,35 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class NamespaceClassification(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Kind of namespace + """ + + PLATFORM = "Platform" + CUSTOM = "Custom" + QOS = "Qos" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py index 247d93eac5fd..97505136a476 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2017_12_01_preview/operations/_metric_namespaces_operations.py @@ -111,7 +111,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py index e27bbe464ee6..2a02767f7a67 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_metadata.json index f2ee9c91c5da..213c25c681a7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -22,7 +24,7 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true @@ -30,21 +32,61 @@ }, "constant": { }, - "call": "credential" + "call": "credential", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "metric_definitions": "MetricDefinitionsOperations", "metrics": "MetricsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_management_client.py index 4426433aa4e4..5059198cc5e5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import MetricDefinitionsOperations @@ -57,6 +58,21 @@ def __init__( self.metrics = MetricsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py index bcfe5f45da24..693bca4bcf25 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_management_client.py index d35ab95edecf..b1fe92be01a3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -54,6 +55,20 @@ def __init__( self.metrics = MetricsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py index 634aa84501b5..0345cdbc7dcb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metric_definitions_operations.py @@ -45,7 +45,7 @@ def list( self, resource_uri: str, metricnamespace: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MetricDefinitionCollection"]: """Lists the metric definitions for the resource. @@ -105,7 +105,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -114,4 +114,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/metricDefinitions'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/metricDefinitions'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py index f59760d272b8..dca74acb8dcf 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/aio/operations/_metrics_operations.py @@ -53,7 +53,7 @@ async def list( filter: Optional[str] = None, result_type: Optional[Union[str, "_models.ResultType"]] = None, metricnamespace: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.Response": """**Lists the metric values for a resource**. @@ -64,7 +64,9 @@ async def list( :type timespan: str :param interval: The interval (i.e. timegrain) of the query. :type interval: ~datetime.timedelta - :param metricnames: The names of the metrics (comma separated) to retrieve. + :param metricnames: The names of the metrics (comma separated) to retrieve. Special case: If a + metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be + **'Metric%2Name1'**. :type metricnames: str :param aggregation: The list of aggregation types (comma separated) to retrieve. :type aggregation: str @@ -76,15 +78,18 @@ async def list( Only one order can be specified. Examples: sum asc. :type orderby: str - :param filter: The **$filter** is used to reduce the set of metric data - returned.:code:`
`Example::code:`
`Metric contains metadata A, B and C.:code:`
`- - Return all time series of C where A = a1 and B = b1 or b2:code:`
`\ **$filter=A eq ‘a1’ and - B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**\ :code:`
`- Invalid variant::code:`
`\ **$filter=A - eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**\ :code:`
`This is invalid because the - logical or operator cannot separate two different metadata names.:code:`
`- Return all time - series where A = a1, B = b1 and C = c1::code:`
`\ **$filter=A eq ‘a1’ and B eq ‘b1’ and C eq - ‘c1’**\ :code:`
`- Return all time series where A = a1:code:`
`\ **$filter=A eq ‘a1’ and - B eq ‘\ *’ and C eq ‘*\ ’**. + :param filter: The **$filter** is used to reduce the set of metric data returned. Example: + Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or + b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A + eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or + operator cannot separate two different metadata names. - Return all time series where A = a1, B + = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series + where A = a1 **$filter=A eq 'a1' and B eq '\ *' and C eq '*\ '**. Special case: When dimension + name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** + Instead of using $filter= "dim (test) 1 eq '\ *' " use **$filter= "dim %2528test%2529 1 eq '*\ + ' "\ ** When dimension name is **\ dim (test) 3\ ** and dimension value is **\ dim3 (test) val\ + ** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **\ $filter= "dim + %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. :type filter: str :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. @@ -143,7 +148,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Response', pipeline_response) @@ -152,4 +157,4 @@ async def list( return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/metrics'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/metrics'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/__init__.py index 5602c66d77af..7e8c48f6ea43 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/__init__.py @@ -31,8 +31,9 @@ from ._monitor_management_client_enums import ( AggregationType, + MetricClass, + MetricUnit, ResultType, - Unit, ) __all__ = [ @@ -47,6 +48,7 @@ 'Response', 'TimeSeriesElement', 'AggregationType', + 'MetricClass', + 'MetricUnit', 'ResultType', - 'Unit', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py index 187e8d93f7c3..f474ab6343f0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models.py @@ -97,10 +97,16 @@ class Metric(msrest.serialization.Model): :param name: Required. the name and the display name of the metric, i.e. it is localizable string. :type name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString - :param unit: Required. the unit of the metric. Possible values include: "Count", "Bytes", + :param display_description: Detailed description of this metric. + :type display_description: str + :param error_code: 'Success' or the error details on query failures for this metric. + :type error_code: str + :param error_message: Error message encountered querying this specific metric. + :type error_message: str + :param unit: Required. The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond". - :type unit: str or ~$(python-base-namespace).v2018_01_01.models.Unit + :type unit: str or ~$(python-base-namespace).v2018_01_01.models.MetricUnit :param timeseries: Required. the time series returned when a data query is performed. :type timeseries: list[~$(python-base-namespace).v2018_01_01.models.TimeSeriesElement] """ @@ -117,6 +123,9 @@ class Metric(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'timeseries': {'key': 'timeseries', 'type': '[TimeSeriesElement]'}, } @@ -129,6 +138,9 @@ def __init__( self.id = kwargs['id'] self.type = kwargs['type'] self.name = kwargs['name'] + self.display_description = kwargs.get('display_description', None) + self.error_code = kwargs.get('error_code', None) + self.error_message = kwargs.get('error_message', None) self.unit = kwargs['unit'] self.timeseries = kwargs['timeseries'] @@ -169,22 +181,29 @@ class MetricDefinition(msrest.serialization.Model): :type namespace: str :param name: the name and the display name of the metric, i.e. it is a localizable string. :type name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString - :param unit: the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", + :param display_description: Detailed description of this metric. + :type display_description: str + :param category: Custom category name for this metric. + :type category: str + :param metric_class: The class of the metric. Possible values include: "Availability", + "Transactions", "Errors", "Latency", "Saturation". + :type metric_class: str or ~$(python-base-namespace).v2018_01_01.models.MetricClass + :param unit: The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond". - :type unit: str or ~$(python-base-namespace).v2018_01_01.models.Unit + :type unit: str or ~$(python-base-namespace).v2018_01_01.models.MetricUnit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: "None", "Average", "Count", "Minimum", "Maximum", "Total". - :type primary_aggregation_type: str or ~$(python-base- - namespace).v2018_01_01.models.AggregationType + :type primary_aggregation_type: str or + ~$(python-base-namespace).v2018_01_01.models.AggregationType :param supported_aggregation_types: the collection of what aggregation types are supported. - :type supported_aggregation_types: list[str or ~$(python-base- - namespace).v2018_01_01.models.AggregationType] + :type supported_aggregation_types: list[str or + ~$(python-base-namespace).v2018_01_01.models.AggregationType] :param metric_availabilities: the collection of what aggregation intervals are available to be queried. - :type metric_availabilities: list[~$(python-base- - namespace).v2018_01_01.models.MetricAvailability] + :type metric_availabilities: + list[~$(python-base-namespace).v2018_01_01.models.MetricAvailability] :param id: the resource identifier of the metric definition. :type id: str :param dimensions: the name and the display name of the dimension, i.e. it is a localizable @@ -197,6 +216,9 @@ class MetricDefinition(msrest.serialization.Model): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'namespace': {'key': 'namespace', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'metric_class': {'key': 'metricClass', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, @@ -214,6 +236,9 @@ def __init__( self.resource_id = kwargs.get('resource_id', None) self.namespace = kwargs.get('namespace', None) self.name = kwargs.get('name', None) + self.display_description = kwargs.get('display_description', None) + self.category = kwargs.get('category', None) + self.metric_class = kwargs.get('metric_class', None) self.unit = kwargs.get('unit', None) self.primary_aggregation_type = kwargs.get('primary_aggregation_type', None) self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) @@ -298,7 +323,7 @@ class Response(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param cost: The integer value representing the cost of the query, for data case. + :param cost: The integer value representing the relative cost of the query. :type cost: int :param timespan: Required. The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned @@ -308,9 +333,9 @@ class Response(msrest.serialization.Model): may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. :type interval: ~datetime.timedelta - :param namespace: The namespace of the metrics been queried. + :param namespace: The namespace of the metrics being queried. :type namespace: str - :param resourceregion: The region of the resource been queried for metrics. + :param resourceregion: The region of the resource being queried for metrics. :type resourceregion: str :param value: Required. the value of the collection. :type value: list[~$(python-base-namespace).v2018_01_01.models.Metric] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py index 5b49d941a646..d82c93e35b59 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_models_py3.py @@ -111,10 +111,16 @@ class Metric(msrest.serialization.Model): :param name: Required. the name and the display name of the metric, i.e. it is localizable string. :type name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString - :param unit: Required. the unit of the metric. Possible values include: "Count", "Bytes", + :param display_description: Detailed description of this metric. + :type display_description: str + :param error_code: 'Success' or the error details on query failures for this metric. + :type error_code: str + :param error_message: Error message encountered querying this specific metric. + :type error_message: str + :param unit: Required. The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond". - :type unit: str or ~$(python-base-namespace).v2018_01_01.models.Unit + :type unit: str or ~$(python-base-namespace).v2018_01_01.models.MetricUnit :param timeseries: Required. the time series returned when a data query is performed. :type timeseries: list[~$(python-base-namespace).v2018_01_01.models.TimeSeriesElement] """ @@ -131,6 +137,9 @@ class Metric(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'error_code': {'key': 'errorCode', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'timeseries': {'key': 'timeseries', 'type': '[TimeSeriesElement]'}, } @@ -141,14 +150,20 @@ def __init__( id: str, type: str, name: "LocalizableString", - unit: Union[str, "Unit"], + unit: Union[str, "MetricUnit"], timeseries: List["TimeSeriesElement"], + display_description: Optional[str] = None, + error_code: Optional[str] = None, + error_message: Optional[str] = None, **kwargs ): super(Metric, self).__init__(**kwargs) self.id = id self.type = type self.name = name + self.display_description = display_description + self.error_code = error_code + self.error_message = error_message self.unit = unit self.timeseries = timeseries @@ -192,22 +207,29 @@ class MetricDefinition(msrest.serialization.Model): :type namespace: str :param name: the name and the display name of the metric, i.e. it is a localizable string. :type name: ~$(python-base-namespace).v2018_01_01.models.LocalizableString - :param unit: the unit of the metric. Possible values include: "Count", "Bytes", "Seconds", + :param display_description: Detailed description of this metric. + :type display_description: str + :param category: Custom category name for this metric. + :type category: str + :param metric_class: The class of the metric. Possible values include: "Availability", + "Transactions", "Errors", "Latency", "Saturation". + :type metric_class: str or ~$(python-base-namespace).v2018_01_01.models.MetricClass + :param unit: The unit of the metric. Possible values include: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", "BitsPerSecond". - :type unit: str or ~$(python-base-namespace).v2018_01_01.models.Unit + :type unit: str or ~$(python-base-namespace).v2018_01_01.models.MetricUnit :param primary_aggregation_type: the primary aggregation type value defining how to use the values for display. Possible values include: "None", "Average", "Count", "Minimum", "Maximum", "Total". - :type primary_aggregation_type: str or ~$(python-base- - namespace).v2018_01_01.models.AggregationType + :type primary_aggregation_type: str or + ~$(python-base-namespace).v2018_01_01.models.AggregationType :param supported_aggregation_types: the collection of what aggregation types are supported. - :type supported_aggregation_types: list[str or ~$(python-base- - namespace).v2018_01_01.models.AggregationType] + :type supported_aggregation_types: list[str or + ~$(python-base-namespace).v2018_01_01.models.AggregationType] :param metric_availabilities: the collection of what aggregation intervals are available to be queried. - :type metric_availabilities: list[~$(python-base- - namespace).v2018_01_01.models.MetricAvailability] + :type metric_availabilities: + list[~$(python-base-namespace).v2018_01_01.models.MetricAvailability] :param id: the resource identifier of the metric definition. :type id: str :param dimensions: the name and the display name of the dimension, i.e. it is a localizable @@ -220,6 +242,9 @@ class MetricDefinition(msrest.serialization.Model): 'resource_id': {'key': 'resourceId', 'type': 'str'}, 'namespace': {'key': 'namespace', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'metric_class': {'key': 'metricClass', 'type': 'str'}, 'unit': {'key': 'unit', 'type': 'str'}, 'primary_aggregation_type': {'key': 'primaryAggregationType', 'type': 'str'}, 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, @@ -235,7 +260,10 @@ def __init__( resource_id: Optional[str] = None, namespace: Optional[str] = None, name: Optional["LocalizableString"] = None, - unit: Optional[Union[str, "Unit"]] = None, + display_description: Optional[str] = None, + category: Optional[str] = None, + metric_class: Optional[Union[str, "MetricClass"]] = None, + unit: Optional[Union[str, "MetricUnit"]] = None, primary_aggregation_type: Optional[Union[str, "AggregationType"]] = None, supported_aggregation_types: Optional[List[Union[str, "AggregationType"]]] = None, metric_availabilities: Optional[List["MetricAvailability"]] = None, @@ -248,6 +276,9 @@ def __init__( self.resource_id = resource_id self.namespace = namespace self.name = name + self.display_description = display_description + self.category = category + self.metric_class = metric_class self.unit = unit self.primary_aggregation_type = primary_aggregation_type self.supported_aggregation_types = supported_aggregation_types @@ -341,7 +372,7 @@ class Response(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param cost: The integer value representing the cost of the query, for data case. + :param cost: The integer value representing the relative cost of the query. :type cost: int :param timespan: Required. The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned @@ -351,9 +382,9 @@ class Response(msrest.serialization.Model): may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made. :type interval: ~datetime.timedelta - :param namespace: The namespace of the metrics been queried. + :param namespace: The namespace of the metrics being queried. :type namespace: str - :param resourceregion: The region of the resource been queried for metrics. + :param resourceregion: The region of the resource being queried for metrics. :type resourceregion: str :param value: Required. the value of the collection. :type value: list[~$(python-base-namespace).v2018_01_01.models.Metric] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py index 02a44ae871bf..6f8d86605f13 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/models/_monitor_management_client_enums.py @@ -37,13 +37,18 @@ class AggregationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MAXIMUM = "Maximum" TOTAL = "Total" -class ResultType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class MetricClass(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The class of the metric. + """ - DATA = "Data" - METADATA = "Metadata" + AVAILABILITY = "Availability" + TRANSACTIONS = "Transactions" + ERRORS = "Errors" + LATENCY = "Latency" + SATURATION = "Saturation" -class Unit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """the unit of the metric. +class MetricUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The unit of the metric. """ COUNT = "Count" @@ -59,3 +64,8 @@ class Unit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MILLI_CORES = "MilliCores" NANO_CORES = "NanoCores" BITS_PER_SECOND = "BitsPerSecond" + +class ResultType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + DATA = "Data" + METADATA = "Metadata" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py index 03e9da0f5741..c3c1565f29c7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metric_definitions_operations.py @@ -110,7 +110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -119,4 +119,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/metricDefinitions'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/metricDefinitions'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py index 0c4201e92e8a..5f9c37f40680 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_01_01/operations/_metrics_operations.py @@ -69,7 +69,9 @@ def list( :type timespan: str :param interval: The interval (i.e. timegrain) of the query. :type interval: ~datetime.timedelta - :param metricnames: The names of the metrics (comma separated) to retrieve. + :param metricnames: The names of the metrics (comma separated) to retrieve. Special case: If a + metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be + **'Metric%2Name1'**. :type metricnames: str :param aggregation: The list of aggregation types (comma separated) to retrieve. :type aggregation: str @@ -81,15 +83,18 @@ def list( Only one order can be specified. Examples: sum asc. :type orderby: str - :param filter: The **$filter** is used to reduce the set of metric data - returned.:code:`
`Example::code:`
`Metric contains metadata A, B and C.:code:`
`- - Return all time series of C where A = a1 and B = b1 or b2:code:`
`\ **$filter=A eq ‘a1’ and - B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**\ :code:`
`- Invalid variant::code:`
`\ **$filter=A - eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**\ :code:`
`This is invalid because the - logical or operator cannot separate two different metadata names.:code:`
`- Return all time - series where A = a1, B = b1 and C = c1::code:`
`\ **$filter=A eq ‘a1’ and B eq ‘b1’ and C eq - ‘c1’**\ :code:`
`- Return all time series where A = a1:code:`
`\ **$filter=A eq ‘a1’ and - B eq ‘\ *’ and C eq ‘*\ ’**. + :param filter: The **$filter** is used to reduce the set of metric data returned. Example: + Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or + b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A + eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or + operator cannot separate two different metadata names. - Return all time series where A = a1, B + = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series + where A = a1 **$filter=A eq 'a1' and B eq '\ *' and C eq '*\ '**. Special case: When dimension + name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** + Instead of using $filter= "dim (test) 1 eq '\ *' " use **$filter= "dim %2528test%2529 1 eq '*\ + ' "\ ** When dimension name is **\ dim (test) 3\ ** and dimension value is **\ dim3 (test) val\ + ** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **\ $filter= "dim + %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. :type filter: str :param result_type: Reduces the set of data collected. The syntax allowed depends on the operation. See the operation's description for details. @@ -148,7 +153,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Response', pipeline_response) @@ -157,4 +162,4 @@ def list( return cls(pipeline_response, deserialized, {}) return deserialized - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/metrics'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/metrics'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py index c8591f1762c2..779b6a13b7c4 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_metadata.json index c4e4884f37a9..72ef172f9306 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,43 +23,83 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "action_groups": "ActionGroupsOperations", "metric_alerts": "MetricAlertsOperations", "metric_alerts_status": "MetricAlertsStatusOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_management_client.py index fd71e69c92ba..bdf4e77f7ef0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ActionGroupsOperations @@ -35,7 +36,7 @@ class MonitorManagementClient(object): :vartype metric_alerts_status: $(python-base-namespace).v2018_03_01.operations.MetricAlertsStatusOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -65,6 +66,24 @@ def __init__( self.metric_alerts_status = MetricAlertsStatusOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py index 01b940070f93..aa202fc38ef3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_management_client.py index 85660a0938d7..c4d3e8ba5c32 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -33,7 +34,7 @@ class MonitorManagementClient(object): :vartype metric_alerts_status: $(python-base-namespace).v2018_03_01.aio.operations.MetricAlertsStatusOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -62,6 +63,23 @@ def __init__( self.metric_alerts_status = MetricAlertsStatusOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py index b5887d78df96..9f3045ddf232 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_action_groups_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, action_group_name: str, action_group: "_models.ActionGroupResource", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Create a new action group or update an existing one. @@ -75,7 +75,7 @@ async def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -116,7 +116,7 @@ async def get( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Get an action group. @@ -142,7 +142,7 @@ async def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -160,7 +160,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -175,7 +175,7 @@ async def delete( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an action group. @@ -201,7 +201,7 @@ async def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -219,7 +219,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def update( resource_group_name: str, action_group_name: str, action_group_patch: "_models.ActionGroupPatchBody", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. @@ -259,7 +259,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -283,7 +283,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -296,7 +296,7 @@ async def update( def list_by_subscription_id( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a subscription. @@ -322,7 +322,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -350,7 +350,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -364,7 +364,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a resource group. @@ -393,7 +393,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -421,7 +421,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -437,7 +437,7 @@ async def enable_receiver( resource_group_name: str, action_group_name: str, enable_request: "_models.EnableRequest", - **kwargs + **kwargs: Any ) -> None: """Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. @@ -467,7 +467,7 @@ async def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -489,7 +489,7 @@ async def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py index f05312f25a40..96cb5971700c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MetricAlertResourceCollection"]: """Retrieve alert rule definitions in a subscription. @@ -69,7 +69,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -97,7 +97,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -111,7 +111,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MetricAlertResourceCollection"]: """Retrieve alert rule definitions in a resource group. @@ -139,7 +139,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -168,7 +168,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -183,7 +183,7 @@ async def get( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.MetricAlertResource": """Retrieve an alert rule definition. @@ -207,7 +207,7 @@ async def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -227,7 +227,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertResource', pipeline_response) @@ -243,7 +243,7 @@ async def create_or_update( resource_group_name: str, rule_name: str, parameters: "_models.MetricAlertResource", - **kwargs + **kwargs: Any ) -> "_models.MetricAlertResource": """Create or update an metric alert definition. @@ -270,7 +270,7 @@ async def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -294,7 +294,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertResource', pipeline_response) @@ -310,7 +310,7 @@ async def update( resource_group_name: str, rule_name: str, parameters: "_models.MetricAlertResourcePatch", - **kwargs + **kwargs: Any ) -> "_models.MetricAlertResource": """Update an metric alert definition. @@ -337,7 +337,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -361,7 +361,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertResource', pipeline_response) @@ -376,7 +376,7 @@ async def delete( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an alert rule definition. @@ -395,11 +395,12 @@ async def delete( } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-03-01" + accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -411,6 +412,7 @@ async def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -418,7 +420,8 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py index 8700d6231456..0c216dfd6653 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/aio/operations/_metric_alerts_status_operations.py @@ -44,7 +44,7 @@ async def list( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.MetricAlertStatusCollection": """Retrieve an alert rule status. @@ -68,7 +68,7 @@ async def list( # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -88,7 +88,7 @@ async def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertStatusCollection', pipeline_response) @@ -104,7 +104,7 @@ async def list_by_name( resource_group_name: str, rule_name: str, status_name: str, - **kwargs + **kwargs: Any ) -> "_models.MetricAlertStatusCollection": """Retrieve an alert rule status. @@ -130,7 +130,7 @@ async def list_by_name( # Construct URL url = self.list_by_name.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'statusName': self._serialize.url("status_name", status_name, 'str'), @@ -151,7 +151,7 @@ async def list_by_name( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertStatusCollection', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/__init__.py index 5c062c3233c5..6feb745bd333 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/__init__.py @@ -72,7 +72,7 @@ from ._models import WebtestLocationAvailabilityCriteria # type: ignore from ._monitor_management_client_enums import ( - AggregationType, + AggregationTypeEnum, CriterionType, DynamicThresholdOperator, DynamicThresholdSensitivity, @@ -113,7 +113,7 @@ 'VoiceReceiver', 'WebhookReceiver', 'WebtestLocationAvailabilityCriteria', - 'AggregationType', + 'AggregationTypeEnum', 'CriterionType', 'DynamicThresholdOperator', 'DynamicThresholdSensitivity', diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py index 71bcd9cc55e5..bd481af12a40 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models.py @@ -135,20 +135,20 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2018_03_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2018_03_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2018_03_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2018_03_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2018_03_01.models.AutomationRunbookReceiver] :param voice_receivers: The list of voice receivers that are part of this action group. :type voice_receivers: list[~$(python-base-namespace).v2018_03_01.models.VoiceReceiver] :param logic_app_receivers: The list of logic app receivers that are part of this action group. :type logic_app_receivers: list[~$(python-base-namespace).v2018_03_01.models.LogicAppReceiver] :param azure_function_receivers: The list of azure function receivers that are part of this action group. - :type azure_function_receivers: list[~$(python-base- - namespace).v2018_03_01.models.AzureFunctionReceiver] + :type azure_function_receivers: + list[~$(python-base-namespace).v2018_03_01.models.AzureFunctionReceiver] """ _validation = { @@ -327,7 +327,7 @@ class MultiMetricCriteria(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param criterion_type: Required. Specifies the type of threshold criteria.Constant filled by server. Possible values include: "StaticThresholdCriterion", "DynamicThresholdCriterion". :type criterion_type: str or ~$(python-base-namespace).v2018_03_01.models.CriterionType @@ -339,7 +339,7 @@ class MultiMetricCriteria(msrest.serialization.Model): :type metric_namespace: str :param time_aggregation: Required. the criteria time aggregation types. Possible values include: "Average", "Count", "Minimum", "Maximum", "Total". - :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationType + :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum :param dimensions: List of dimension conditions. :type dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] :param skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet @@ -391,7 +391,7 @@ class DynamicMetricCriteria(MultiMetricCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param criterion_type: Required. Specifies the type of threshold criteria.Constant filled by server. Possible values include: "StaticThresholdCriterion", "DynamicThresholdCriterion". :type criterion_type: str or ~$(python-base-namespace).v2018_03_01.models.CriterionType @@ -403,7 +403,7 @@ class DynamicMetricCriteria(MultiMetricCriteria): :type metric_namespace: str :param time_aggregation: Required. the criteria time aggregation types. Possible values include: "Average", "Count", "Minimum", "Maximum", "Total". - :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationType + :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum :param dimensions: List of dimension conditions. :type dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] :param skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet @@ -415,12 +415,12 @@ class DynamicMetricCriteria(MultiMetricCriteria): :param alert_sensitivity: Required. The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Possible values include: "Low", "Medium", "High". - :type alert_sensitivity: str or ~$(python-base- - namespace).v2018_03_01.models.DynamicThresholdSensitivity + :type alert_sensitivity: str or + ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdSensitivity :param failing_periods: Required. The minimum number of violations required within the selected lookback time window required to raise an alert. - :type failing_periods: ~$(python-base- - namespace).v2018_03_01.models.DynamicThresholdFailingPeriods + :type failing_periods: + ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdFailingPeriods :param ignore_data_before: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). :type ignore_data_before: ~datetime.datetime @@ -673,7 +673,8 @@ class MetricAlertAction(msrest.serialization.Model): :param action_group_id: the id of the action group to use. :type action_group_id: str - :param web_hook_properties: The properties of a webhook object. + :param web_hook_properties: This field allows specifying custom properties, which would be + appended to the alert payload sent as input to the webhook. :type web_hook_properties: dict[str, str] """ @@ -701,7 +702,7 @@ class MetricAlertCriteria(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param odata_type: Required. specifies the type of the alert criteria.Constant filled by server. Possible values include: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", @@ -739,7 +740,7 @@ class MetricAlertMultipleResourceMultipleMetricCriteria(MetricAlertCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param odata_type: Required. specifies the type of the alert criteria.Constant filled by server. Possible values include: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", @@ -786,14 +787,14 @@ class MetricAlertResource(Resource): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param description: Required. the description of the metric alert that will be included in the - alert email. + :param description: the description of the metric alert that will be included in the alert + email. :type description: str :param severity: Required. Alert severity {0, 1, 2, 3, 4}. :type severity: int :param enabled: Required. the flag that indicates whether the metric alert is enabled. :type enabled: bool - :param scopes: the list of resource id's that this metric alert is scoped to. + :param scopes: Required. the list of resource id's that this metric alert is scoped to. :type scopes: list[str] :param evaluation_frequency: Required. how often the metric alert is evaluated represented in ISO 8601 duration format. @@ -802,10 +803,12 @@ class MetricAlertResource(Resource): monitor alert activity based on the threshold. :type window_size: ~datetime.timedelta :param target_resource_type: the resource type of the target resource(s) on which the alert is - created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. + created/updated. Mandatory if the scope contains a subscription, resource group, or more than + one resource. :type target_resource_type: str :param target_resource_region: the region of the target resource(s) on which the alert is - created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. + created/updated. Mandatory if the scope contains a subscription, resource group, or more than + one resource. :type target_resource_region: str :param criteria: Required. defines the specific alert criteria information. :type criteria: ~$(python-base-namespace).v2018_03_01.models.MetricAlertCriteria @@ -817,6 +820,8 @@ class MetricAlertResource(Resource): :type actions: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime + :ivar is_migrated: the value indicating whether this alert rule is migrated. + :vartype is_migrated: bool """ _validation = { @@ -824,13 +829,14 @@ class MetricAlertResource(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, - 'description': {'required': True}, 'severity': {'required': True}, 'enabled': {'required': True}, + 'scopes': {'required': True}, 'evaluation_frequency': {'required': True}, 'window_size': {'required': True}, 'criteria': {'required': True}, 'last_updated_time': {'readonly': True}, + 'is_migrated': {'readonly': True}, } _attribute_map = { @@ -851,6 +857,7 @@ class MetricAlertResource(Resource): 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, 'actions': {'key': 'properties.actions', 'type': '[MetricAlertAction]'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + 'is_migrated': {'key': 'properties.isMigrated', 'type': 'bool'}, } def __init__( @@ -858,10 +865,10 @@ def __init__( **kwargs ): super(MetricAlertResource, self).__init__(**kwargs) - self.description = kwargs['description'] + self.description = kwargs.get('description', None) self.severity = kwargs['severity'] self.enabled = kwargs['enabled'] - self.scopes = kwargs.get('scopes', None) + self.scopes = kwargs['scopes'] self.evaluation_frequency = kwargs['evaluation_frequency'] self.window_size = kwargs['window_size'] self.target_resource_type = kwargs.get('target_resource_type', None) @@ -870,6 +877,7 @@ def __init__( self.auto_mitigate = kwargs.get('auto_mitigate', None) self.actions = kwargs.get('actions', None) self.last_updated_time = None + self.is_migrated = None class MetricAlertResourceCollection(msrest.serialization.Model): @@ -929,10 +937,13 @@ class MetricAlertResourcePatch(msrest.serialization.Model): :type actions: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime + :ivar is_migrated: the value indicating whether this alert rule is migrated. + :vartype is_migrated: bool """ _validation = { 'last_updated_time': {'readonly': True}, + 'is_migrated': {'readonly': True}, } _attribute_map = { @@ -949,6 +960,7 @@ class MetricAlertResourcePatch(msrest.serialization.Model): 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, 'actions': {'key': 'properties.actions', 'type': '[MetricAlertAction]'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + 'is_migrated': {'key': 'properties.isMigrated', 'type': 'bool'}, } def __init__( @@ -969,6 +981,7 @@ def __init__( self.auto_mitigate = kwargs.get('auto_mitigate', None) self.actions = kwargs.get('actions', None) self.last_updated_time = None + self.is_migrated = None class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): @@ -978,7 +991,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param odata_type: Required. specifies the type of the alert criteria.Constant filled by server. Possible values include: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", @@ -1092,7 +1105,7 @@ class MetricCriteria(MultiMetricCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param criterion_type: Required. Specifies the type of threshold criteria.Constant filled by server. Possible values include: "StaticThresholdCriterion", "DynamicThresholdCriterion". :type criterion_type: str or ~$(python-base-namespace).v2018_03_01.models.CriterionType @@ -1104,14 +1117,14 @@ class MetricCriteria(MultiMetricCriteria): :type metric_namespace: str :param time_aggregation: Required. the criteria time aggregation types. Possible values include: "Average", "Count", "Minimum", "Maximum", "Total". - :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationType + :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum :param dimensions: List of dimension conditions. :type dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] :param skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. :type skip_metric_validation: bool :param operator: Required. the criteria operator. Possible values include: "Equals", - "NotEquals", "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". :type operator: str or ~$(python-base-namespace).v2018_03_01.models.Operator :param threshold: Required. the criteria threshold value that activates the alert. :type threshold: float @@ -1302,7 +1315,7 @@ class WebtestLocationAvailabilityCriteria(MetricAlertCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param odata_type: Required. specifies the type of the alert criteria.Constant filled by server. Possible values include: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py index ae64742a6783..fb4bbdf427c7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -149,20 +149,20 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2018_03_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2018_03_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2018_03_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2018_03_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2018_03_01.models.AutomationRunbookReceiver] :param voice_receivers: The list of voice receivers that are part of this action group. :type voice_receivers: list[~$(python-base-namespace).v2018_03_01.models.VoiceReceiver] :param logic_app_receivers: The list of logic app receivers that are part of this action group. :type logic_app_receivers: list[~$(python-base-namespace).v2018_03_01.models.LogicAppReceiver] :param azure_function_receivers: The list of azure function receivers that are part of this action group. - :type azure_function_receivers: list[~$(python-base- - namespace).v2018_03_01.models.AzureFunctionReceiver] + :type azure_function_receivers: + list[~$(python-base-namespace).v2018_03_01.models.AzureFunctionReceiver] """ _validation = { @@ -370,7 +370,7 @@ class MultiMetricCriteria(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param criterion_type: Required. Specifies the type of threshold criteria.Constant filled by server. Possible values include: "StaticThresholdCriterion", "DynamicThresholdCriterion". :type criterion_type: str or ~$(python-base-namespace).v2018_03_01.models.CriterionType @@ -382,7 +382,7 @@ class MultiMetricCriteria(msrest.serialization.Model): :type metric_namespace: str :param time_aggregation: Required. the criteria time aggregation types. Possible values include: "Average", "Count", "Minimum", "Maximum", "Total". - :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationType + :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum :param dimensions: List of dimension conditions. :type dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] :param skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet @@ -417,8 +417,8 @@ def __init__( *, name: str, metric_name: str, - time_aggregation: Union[str, "AggregationType"], - additional_properties: Optional[Dict[str, object]] = None, + time_aggregation: Union[str, "AggregationTypeEnum"], + additional_properties: Optional[Dict[str, Any]] = None, metric_namespace: Optional[str] = None, dimensions: Optional[List["MetricDimension"]] = None, skip_metric_validation: Optional[bool] = None, @@ -442,7 +442,7 @@ class DynamicMetricCriteria(MultiMetricCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param criterion_type: Required. Specifies the type of threshold criteria.Constant filled by server. Possible values include: "StaticThresholdCriterion", "DynamicThresholdCriterion". :type criterion_type: str or ~$(python-base-namespace).v2018_03_01.models.CriterionType @@ -454,7 +454,7 @@ class DynamicMetricCriteria(MultiMetricCriteria): :type metric_namespace: str :param time_aggregation: Required. the criteria time aggregation types. Possible values include: "Average", "Count", "Minimum", "Maximum", "Total". - :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationType + :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum :param dimensions: List of dimension conditions. :type dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] :param skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet @@ -466,12 +466,12 @@ class DynamicMetricCriteria(MultiMetricCriteria): :param alert_sensitivity: Required. The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Possible values include: "Low", "Medium", "High". - :type alert_sensitivity: str or ~$(python-base- - namespace).v2018_03_01.models.DynamicThresholdSensitivity + :type alert_sensitivity: str or + ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdSensitivity :param failing_periods: Required. The minimum number of violations required within the selected lookback time window required to raise an alert. - :type failing_periods: ~$(python-base- - namespace).v2018_03_01.models.DynamicThresholdFailingPeriods + :type failing_periods: + ~$(python-base-namespace).v2018_03_01.models.DynamicThresholdFailingPeriods :param ignore_data_before: Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). :type ignore_data_before: ~datetime.datetime @@ -507,11 +507,11 @@ def __init__( *, name: str, metric_name: str, - time_aggregation: Union[str, "AggregationType"], + time_aggregation: Union[str, "AggregationTypeEnum"], operator: Union[str, "DynamicThresholdOperator"], alert_sensitivity: Union[str, "DynamicThresholdSensitivity"], failing_periods: "DynamicThresholdFailingPeriods", - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, metric_namespace: Optional[str] = None, dimensions: Optional[List["MetricDimension"]] = None, skip_metric_validation: Optional[bool] = None, @@ -757,7 +757,8 @@ class MetricAlertAction(msrest.serialization.Model): :param action_group_id: the id of the action group to use. :type action_group_id: str - :param web_hook_properties: The properties of a webhook object. + :param web_hook_properties: This field allows specifying custom properties, which would be + appended to the alert payload sent as input to the webhook. :type web_hook_properties: dict[str, str] """ @@ -788,7 +789,7 @@ class MetricAlertCriteria(msrest.serialization.Model): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param odata_type: Required. specifies the type of the alert criteria.Constant filled by server. Possible values include: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", @@ -813,7 +814,7 @@ class MetricAlertCriteria(msrest.serialization.Model): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): super(MetricAlertCriteria, self).__init__(**kwargs) @@ -828,7 +829,7 @@ class MetricAlertMultipleResourceMultipleMetricCriteria(MetricAlertCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param odata_type: Required. specifies the type of the alert criteria.Constant filled by server. Possible values include: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", @@ -852,7 +853,7 @@ class MetricAlertMultipleResourceMultipleMetricCriteria(MetricAlertCriteria): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, all_of: Optional[List["MultiMetricCriteria"]] = None, **kwargs ): @@ -878,14 +879,14 @@ class MetricAlertResource(Resource): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param description: Required. the description of the metric alert that will be included in the - alert email. + :param description: the description of the metric alert that will be included in the alert + email. :type description: str :param severity: Required. Alert severity {0, 1, 2, 3, 4}. :type severity: int :param enabled: Required. the flag that indicates whether the metric alert is enabled. :type enabled: bool - :param scopes: the list of resource id's that this metric alert is scoped to. + :param scopes: Required. the list of resource id's that this metric alert is scoped to. :type scopes: list[str] :param evaluation_frequency: Required. how often the metric alert is evaluated represented in ISO 8601 duration format. @@ -894,10 +895,12 @@ class MetricAlertResource(Resource): monitor alert activity based on the threshold. :type window_size: ~datetime.timedelta :param target_resource_type: the resource type of the target resource(s) on which the alert is - created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. + created/updated. Mandatory if the scope contains a subscription, resource group, or more than + one resource. :type target_resource_type: str :param target_resource_region: the region of the target resource(s) on which the alert is - created/updated. Mandatory for MultipleResourceMultipleMetricCriteria. + created/updated. Mandatory if the scope contains a subscription, resource group, or more than + one resource. :type target_resource_region: str :param criteria: Required. defines the specific alert criteria information. :type criteria: ~$(python-base-namespace).v2018_03_01.models.MetricAlertCriteria @@ -909,6 +912,8 @@ class MetricAlertResource(Resource): :type actions: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime + :ivar is_migrated: the value indicating whether this alert rule is migrated. + :vartype is_migrated: bool """ _validation = { @@ -916,13 +921,14 @@ class MetricAlertResource(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, - 'description': {'required': True}, 'severity': {'required': True}, 'enabled': {'required': True}, + 'scopes': {'required': True}, 'evaluation_frequency': {'required': True}, 'window_size': {'required': True}, 'criteria': {'required': True}, 'last_updated_time': {'readonly': True}, + 'is_migrated': {'readonly': True}, } _attribute_map = { @@ -943,20 +949,21 @@ class MetricAlertResource(Resource): 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, 'actions': {'key': 'properties.actions', 'type': '[MetricAlertAction]'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + 'is_migrated': {'key': 'properties.isMigrated', 'type': 'bool'}, } def __init__( self, *, location: str, - description: str, severity: int, enabled: bool, + scopes: List[str], evaluation_frequency: datetime.timedelta, window_size: datetime.timedelta, criteria: "MetricAlertCriteria", tags: Optional[Dict[str, str]] = None, - scopes: Optional[List[str]] = None, + description: Optional[str] = None, target_resource_type: Optional[str] = None, target_resource_region: Optional[str] = None, auto_mitigate: Optional[bool] = None, @@ -976,6 +983,7 @@ def __init__( self.auto_mitigate = auto_mitigate self.actions = actions self.last_updated_time = None + self.is_migrated = None class MetricAlertResourceCollection(msrest.serialization.Model): @@ -1037,10 +1045,13 @@ class MetricAlertResourcePatch(msrest.serialization.Model): :type actions: list[~$(python-base-namespace).v2018_03_01.models.MetricAlertAction] :ivar last_updated_time: Last time the rule was updated in ISO8601 format. :vartype last_updated_time: ~datetime.datetime + :ivar is_migrated: the value indicating whether this alert rule is migrated. + :vartype is_migrated: bool """ _validation = { 'last_updated_time': {'readonly': True}, + 'is_migrated': {'readonly': True}, } _attribute_map = { @@ -1057,6 +1068,7 @@ class MetricAlertResourcePatch(msrest.serialization.Model): 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, 'actions': {'key': 'properties.actions', 'type': '[MetricAlertAction]'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, + 'is_migrated': {'key': 'properties.isMigrated', 'type': 'bool'}, } def __init__( @@ -1090,6 +1102,7 @@ def __init__( self.auto_mitigate = auto_mitigate self.actions = actions self.last_updated_time = None + self.is_migrated = None class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): @@ -1099,7 +1112,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param odata_type: Required. specifies the type of the alert criteria.Constant filled by server. Possible values include: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", @@ -1123,7 +1136,7 @@ class MetricAlertSingleResourceMultipleMetricCriteria(MetricAlertCriteria): def __init__( self, *, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, all_of: Optional[List["MetricCriteria"]] = None, **kwargs ): @@ -1227,7 +1240,7 @@ class MetricCriteria(MultiMetricCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param criterion_type: Required. Specifies the type of threshold criteria.Constant filled by server. Possible values include: "StaticThresholdCriterion", "DynamicThresholdCriterion". :type criterion_type: str or ~$(python-base-namespace).v2018_03_01.models.CriterionType @@ -1239,14 +1252,14 @@ class MetricCriteria(MultiMetricCriteria): :type metric_namespace: str :param time_aggregation: Required. the criteria time aggregation types. Possible values include: "Average", "Count", "Minimum", "Maximum", "Total". - :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationType + :type time_aggregation: str or ~$(python-base-namespace).v2018_03_01.models.AggregationTypeEnum :param dimensions: List of dimension conditions. :type dimensions: list[~$(python-base-namespace).v2018_03_01.models.MetricDimension] :param skip_metric_validation: Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped. :type skip_metric_validation: bool :param operator: Required. the criteria operator. Possible values include: "Equals", - "NotEquals", "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". + "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual". :type operator: str or ~$(python-base-namespace).v2018_03_01.models.Operator :param threshold: Required. the criteria threshold value that activates the alert. :type threshold: float @@ -1279,10 +1292,10 @@ def __init__( *, name: str, metric_name: str, - time_aggregation: Union[str, "AggregationType"], + time_aggregation: Union[str, "AggregationTypeEnum"], operator: Union[str, "Operator"], threshold: float, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, metric_namespace: Optional[str] = None, dimensions: Optional[List["MetricDimension"]] = None, skip_metric_validation: Optional[bool] = None, @@ -1462,7 +1475,7 @@ class WebtestLocationAvailabilityCriteria(MetricAlertCriteria): :param additional_properties: Unmatched properties from the message are deserialized to this collection. - :type additional_properties: dict[str, object] + :type additional_properties: dict[str, any] :param odata_type: Required. specifies the type of the alert criteria.Constant filled by server. Possible values include: "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", @@ -1498,7 +1511,7 @@ def __init__( web_test_id: str, component_id: str, failed_location_count: float, - additional_properties: Optional[Dict[str, object]] = None, + additional_properties: Optional[Dict[str, Any]] = None, **kwargs ): super(WebtestLocationAvailabilityCriteria, self).__init__(additional_properties=additional_properties, **kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_monitor_management_client_enums.py index 974c2895a8cb..3cb30eec4074 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/models/_monitor_management_client_enums.py @@ -26,7 +26,7 @@ def __getattr__(cls, name): raise AttributeError(name) -class AggregationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class AggregationTypeEnum(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """the criteria time aggregation types. """ @@ -73,7 +73,6 @@ class Operator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """ EQUALS = "Equals" - NOT_EQUALS = "NotEquals" GREATER_THAN = "GreaterThan" GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" LESS_THAN = "LessThan" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py index 3bf283074e85..d50c72b70007 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_action_groups_operations.py @@ -80,7 +80,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -148,7 +148,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -166,7 +166,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -208,7 +208,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -226,7 +226,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -267,7 +267,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -291,7 +291,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -331,7 +331,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -359,7 +359,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -403,7 +403,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -431,7 +431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -478,7 +478,7 @@ def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -500,7 +500,7 @@ def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py index 497d473da137..4a6efc48270e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_operations.py @@ -74,7 +74,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -102,7 +102,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -145,7 +145,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -174,7 +174,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -214,7 +214,7 @@ def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -234,7 +234,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertResource', pipeline_response) @@ -278,7 +278,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -302,7 +302,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertResource', pipeline_response) @@ -346,7 +346,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -370,7 +370,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertResource', pipeline_response) @@ -405,11 +405,12 @@ def delete( } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-03-01" + accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -421,6 +422,7 @@ def delete( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -428,7 +430,8 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py index 82aa2f529a36..121c90a9fdaa 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_03_01/operations/_metric_alerts_status_operations.py @@ -73,7 +73,7 @@ def list( # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -93,7 +93,7 @@ def list( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertStatusCollection', pipeline_response) @@ -136,7 +136,7 @@ def list_by_name( # Construct URL url = self.list_by_name.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'statusName': self._serialize.url("status_name", status_name, 'str'), @@ -157,7 +157,7 @@ def list_by_name( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricAlertStatusCollection', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py index 93b3c96a4a30..b6128ee1573c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_metadata.json index 391f8c05034d..1096c3229c33 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,41 +23,81 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "scheduled_query_rules": "ScheduledQueryRulesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_management_client.py index 775dcebb84e4..956b94a97ccb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ScheduledQueryRulesOperations @@ -29,7 +30,7 @@ class MonitorManagementClient(object): :vartype scheduled_query_rules: $(python-base-namespace).v2018_04_16.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -55,6 +56,24 @@ def __init__( self.scheduled_query_rules = ScheduledQueryRulesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py index 621208fc53b3..601c1798da2a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_management_client.py index 72801e36fa29..ea933cca6b44 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -27,7 +28,7 @@ class MonitorManagementClient(object): :vartype scheduled_query_rules: $(python-base-namespace).v2018_04_16.aio.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -52,6 +53,23 @@ def __init__( self.scheduled_query_rules = ScheduledQueryRulesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py index 655f20858287..67665d0db68e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/aio/operations/_scheduled_query_rules_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, rule_name: str, parameters: "_models.LogSearchRuleResource", - **kwargs + **kwargs: Any ) -> "_models.LogSearchRuleResource": """Creates or updates an log search rule. @@ -73,7 +73,7 @@ async def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -110,13 +110,13 @@ async def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}'} # type: ignore async def get( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.LogSearchRuleResource": """Gets an Log Search rule. @@ -142,7 +142,7 @@ async def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -160,7 +160,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LogSearchRuleResource', pipeline_response) @@ -169,14 +169,14 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}'} # type: ignore async def update( self, resource_group_name: str, rule_name: str, parameters: "_models.LogSearchRuleResourcePatch", - **kwargs + **kwargs: Any ) -> "_models.LogSearchRuleResource": """Update log search Rule. @@ -203,7 +203,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -227,7 +227,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LogSearchRuleResource', pipeline_response) @@ -236,13 +236,13 @@ async def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}'} # type: ignore async def delete( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a Log Search rule. @@ -268,7 +268,7 @@ async def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -286,18 +286,18 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}'} # type: ignore def list_by_subscription( self, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LogSearchRuleResourceCollection"]: """List the Log Search rules within a subscription group. @@ -326,7 +326,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -356,7 +356,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -365,13 +365,13 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/scheduledQueryRules'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/scheduledQueryRules'} # type: ignore def list_by_resource_group( self, resource_group_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LogSearchRuleResourceCollection"]: """List the Log Search rules within a resource group. @@ -403,7 +403,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -433,7 +433,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -442,4 +442,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/__init__.py index 2d034d8b3116..31b0b1f63a15 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/__init__.py @@ -12,6 +12,7 @@ from ._models_py3 import AzNsActionGroup from ._models_py3 import Criteria from ._models_py3 import Dimension + from ._models_py3 import ErrorContract from ._models_py3 import ErrorResponse from ._models_py3 import LogMetricTrigger from ._models_py3 import LogSearchRuleResource @@ -28,6 +29,7 @@ from ._models import AzNsActionGroup # type: ignore from ._models import Criteria # type: ignore from ._models import Dimension # type: ignore + from ._models import ErrorContract # type: ignore from ._models import ErrorResponse # type: ignore from ._models import LogMetricTrigger # type: ignore from ._models import LogSearchRuleResource # type: ignore @@ -55,6 +57,7 @@ 'AzNsActionGroup', 'Criteria', 'Dimension', + 'ErrorContract', 'ErrorResponse', 'LogMetricTrigger', 'LogSearchRuleResource', diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models.py index 6fd144dc7a89..b59b0546318a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models.py @@ -180,6 +180,25 @@ def __init__( self.values = kwargs['values'] +class ErrorContract(msrest.serialization.Model): + """Describes the format of Error response. + + :param error: The error details. + :type error: ~$(python-base-namespace).v2018_04_16.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorContract, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + class ErrorResponse(msrest.serialization.Model): """Describes the format of Error response. @@ -207,15 +226,16 @@ class LogMetricTrigger(msrest.serialization.Model): """A log metrics trigger descriptor. :param threshold_operator: Evaluation operation for Metric -'GreaterThan' or 'LessThan' or - 'Equal'. Possible values include: "GreaterThan", "LessThan", "Equal". - :type threshold_operator: str or ~$(python-base- - namespace).v2018_04_16.models.ConditionalOperator + 'Equal'. Possible values include: "GreaterThanOrEqual", "LessThanOrEqual", "GreaterThan", + "LessThan", "Equal". Default value: "GreaterThanOrEqual". + :type threshold_operator: str or + ~$(python-base-namespace).v2018_04_16.models.ConditionalOperator :param threshold: The threshold of the metric trigger. :type threshold: float :param metric_trigger_type: Metric Trigger Type - 'Consecutive' or 'Total'. Possible values - include: "Consecutive", "Total". - :type metric_trigger_type: str or ~$(python-base- - namespace).v2018_04_16.models.MetricTriggerType + include: "Consecutive", "Total". Default value: "Consecutive". + :type metric_trigger_type: str or + ~$(python-base-namespace).v2018_04_16.models.MetricTriggerType :param metric_column: Evaluation of metric on a particular column. :type metric_column: str """ @@ -232,9 +252,9 @@ def __init__( **kwargs ): super(LogMetricTrigger, self).__init__(**kwargs) - self.threshold_operator = kwargs.get('threshold_operator', None) + self.threshold_operator = kwargs.get('threshold_operator', "GreaterThanOrEqual") self.threshold = kwargs.get('threshold', None) - self.metric_trigger_type = kwargs.get('metric_trigger_type', None) + self.metric_trigger_type = kwargs.get('metric_trigger_type', "Consecutive") self.metric_column = kwargs.get('metric_column', None) @@ -255,6 +275,16 @@ class Resource(msrest.serialization.Model): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :vartype kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str """ _validation = { @@ -262,6 +292,8 @@ class Resource(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'kind': {'readonly': True}, + 'etag': {'readonly': True}, } _attribute_map = { @@ -270,6 +302,8 @@ class Resource(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, } def __init__( @@ -282,6 +316,8 @@ def __init__( self.type = None self.location = kwargs['location'] self.tags = kwargs.get('tags', None) + self.kind = None + self.etag = None class LogSearchRuleResource(Resource): @@ -301,8 +337,27 @@ class LogSearchRuleResource(Resource): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :vartype kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :ivar created_with_api_version: The api-version used when creating this alert rule. + :vartype created_with_api_version: str + :ivar is_legacy_log_analytics_rule: True if alert rule is legacy Log Analytic rule. + :vartype is_legacy_log_analytics_rule: bool :param description: The description of the Log Search rule. :type description: str + :param display_name: The display name of the alert rule. + :type display_name: str + :param auto_mitigate: The flag that indicates whether the alert should be automatically + resolved or not. The default is false. + :type auto_mitigate: bool :param enabled: The flag which indicates whether the Log Search rule is enabled. Value should be true or false. Possible values include: "true", "false". :type enabled: str or ~$(python-base-namespace).v2018_04_16.models.Enabled @@ -310,8 +365,8 @@ class LogSearchRuleResource(Resource): :vartype last_updated_time: ~datetime.datetime :ivar provisioning_state: Provisioning state of the scheduled query rule. Possible values include: "Succeeded", "Deploying", "Canceled", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2018_04_16.models.ProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2018_04_16.models.ProvisioningState :param source: Required. Data Source against which rule will Query Data. :type source: ~$(python-base-namespace).v2018_04_16.models.Source :param schedule: Schedule (Frequency, Time Window) for rule. Required for action type - @@ -326,6 +381,10 @@ class LogSearchRuleResource(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'kind': {'readonly': True}, + 'etag': {'readonly': True}, + 'created_with_api_version': {'readonly': True}, + 'is_legacy_log_analytics_rule': {'readonly': True}, 'last_updated_time': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'source': {'required': True}, @@ -338,7 +397,13 @@ class LogSearchRuleResource(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'created_with_api_version': {'key': 'properties.createdWithApiVersion', 'type': 'str'}, + 'is_legacy_log_analytics_rule': {'key': 'properties.isLegacyLogAnalyticsRule', 'type': 'bool'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, 'enabled': {'key': 'properties.enabled', 'type': 'str'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -352,7 +417,11 @@ def __init__( **kwargs ): super(LogSearchRuleResource, self).__init__(**kwargs) + self.created_with_api_version = None + self.is_legacy_log_analytics_rule = None self.description = kwargs.get('description', None) + self.display_name = kwargs.get('display_name', None) + self.auto_mitigate = kwargs.get('auto_mitigate', False) self.enabled = kwargs.get('enabled', None) self.last_updated_time = None self.provisioning_state = None @@ -510,9 +579,10 @@ class TriggerCondition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param threshold_operator: Required. Evaluation operation for rule - 'GreaterThan' or - 'LessThan. Possible values include: "GreaterThan", "LessThan", "Equal". - :type threshold_operator: str or ~$(python-base- - namespace).v2018_04_16.models.ConditionalOperator + 'LessThan. Possible values include: "GreaterThanOrEqual", "LessThanOrEqual", "GreaterThan", + "LessThan", "Equal". Default value: "GreaterThanOrEqual". + :type threshold_operator: str or + ~$(python-base-namespace).v2018_04_16.models.ConditionalOperator :param threshold: Required. Result or count threshold based on which rule should be triggered. :type threshold: float :param metric_trigger: Trigger condition for metric query rule. @@ -535,6 +605,6 @@ def __init__( **kwargs ): super(TriggerCondition, self).__init__(**kwargs) - self.threshold_operator = kwargs['threshold_operator'] + self.threshold_operator = kwargs.get('threshold_operator', "GreaterThanOrEqual") self.threshold = kwargs['threshold'] self.metric_trigger = kwargs.get('metric_trigger', None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models_py3.py index 97978ed14853..97d28d3679a9 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_models_py3.py @@ -200,6 +200,27 @@ def __init__( self.values = values +class ErrorContract(msrest.serialization.Model): + """Describes the format of Error response. + + :param error: The error details. + :type error: ~$(python-base-namespace).v2018_04_16.models.ErrorResponse + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorResponse'}, + } + + def __init__( + self, + *, + error: Optional["ErrorResponse"] = None, + **kwargs + ): + super(ErrorContract, self).__init__(**kwargs) + self.error = error + + class ErrorResponse(msrest.serialization.Model): """Describes the format of Error response. @@ -230,15 +251,16 @@ class LogMetricTrigger(msrest.serialization.Model): """A log metrics trigger descriptor. :param threshold_operator: Evaluation operation for Metric -'GreaterThan' or 'LessThan' or - 'Equal'. Possible values include: "GreaterThan", "LessThan", "Equal". - :type threshold_operator: str or ~$(python-base- - namespace).v2018_04_16.models.ConditionalOperator + 'Equal'. Possible values include: "GreaterThanOrEqual", "LessThanOrEqual", "GreaterThan", + "LessThan", "Equal". Default value: "GreaterThanOrEqual". + :type threshold_operator: str or + ~$(python-base-namespace).v2018_04_16.models.ConditionalOperator :param threshold: The threshold of the metric trigger. :type threshold: float :param metric_trigger_type: Metric Trigger Type - 'Consecutive' or 'Total'. Possible values - include: "Consecutive", "Total". - :type metric_trigger_type: str or ~$(python-base- - namespace).v2018_04_16.models.MetricTriggerType + include: "Consecutive", "Total". Default value: "Consecutive". + :type metric_trigger_type: str or + ~$(python-base-namespace).v2018_04_16.models.MetricTriggerType :param metric_column: Evaluation of metric on a particular column. :type metric_column: str """ @@ -253,9 +275,9 @@ class LogMetricTrigger(msrest.serialization.Model): def __init__( self, *, - threshold_operator: Optional[Union[str, "ConditionalOperator"]] = None, + threshold_operator: Optional[Union[str, "ConditionalOperator"]] = "GreaterThanOrEqual", threshold: Optional[float] = None, - metric_trigger_type: Optional[Union[str, "MetricTriggerType"]] = None, + metric_trigger_type: Optional[Union[str, "MetricTriggerType"]] = "Consecutive", metric_column: Optional[str] = None, **kwargs ): @@ -283,6 +305,16 @@ class Resource(msrest.serialization.Model): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :vartype kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str """ _validation = { @@ -290,6 +322,8 @@ class Resource(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'kind': {'readonly': True}, + 'etag': {'readonly': True}, } _attribute_map = { @@ -298,6 +332,8 @@ class Resource(msrest.serialization.Model): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, } def __init__( @@ -313,6 +349,8 @@ def __init__( self.type = None self.location = location self.tags = tags + self.kind = None + self.etag = None class LogSearchRuleResource(Resource): @@ -332,8 +370,27 @@ class LogSearchRuleResource(Resource): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :vartype kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :ivar created_with_api_version: The api-version used when creating this alert rule. + :vartype created_with_api_version: str + :ivar is_legacy_log_analytics_rule: True if alert rule is legacy Log Analytic rule. + :vartype is_legacy_log_analytics_rule: bool :param description: The description of the Log Search rule. :type description: str + :param display_name: The display name of the alert rule. + :type display_name: str + :param auto_mitigate: The flag that indicates whether the alert should be automatically + resolved or not. The default is false. + :type auto_mitigate: bool :param enabled: The flag which indicates whether the Log Search rule is enabled. Value should be true or false. Possible values include: "true", "false". :type enabled: str or ~$(python-base-namespace).v2018_04_16.models.Enabled @@ -341,8 +398,8 @@ class LogSearchRuleResource(Resource): :vartype last_updated_time: ~datetime.datetime :ivar provisioning_state: Provisioning state of the scheduled query rule. Possible values include: "Succeeded", "Deploying", "Canceled", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2018_04_16.models.ProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2018_04_16.models.ProvisioningState :param source: Required. Data Source against which rule will Query Data. :type source: ~$(python-base-namespace).v2018_04_16.models.Source :param schedule: Schedule (Frequency, Time Window) for rule. Required for action type - @@ -357,6 +414,10 @@ class LogSearchRuleResource(Resource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'kind': {'readonly': True}, + 'etag': {'readonly': True}, + 'created_with_api_version': {'readonly': True}, + 'is_legacy_log_analytics_rule': {'readonly': True}, 'last_updated_time': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'source': {'required': True}, @@ -369,7 +430,13 @@ class LogSearchRuleResource(Resource): 'type': {'key': 'type', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'created_with_api_version': {'key': 'properties.createdWithApiVersion', 'type': 'str'}, + 'is_legacy_log_analytics_rule': {'key': 'properties.isLegacyLogAnalyticsRule', 'type': 'bool'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'auto_mitigate': {'key': 'properties.autoMitigate', 'type': 'bool'}, 'enabled': {'key': 'properties.enabled', 'type': 'str'}, 'last_updated_time': {'key': 'properties.lastUpdatedTime', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -386,12 +453,18 @@ def __init__( action: "Action", tags: Optional[Dict[str, str]] = None, description: Optional[str] = None, + display_name: Optional[str] = None, + auto_mitigate: Optional[bool] = False, enabled: Optional[Union[str, "Enabled"]] = None, schedule: Optional["Schedule"] = None, **kwargs ): super(LogSearchRuleResource, self).__init__(location=location, tags=tags, **kwargs) + self.created_with_api_version = None + self.is_legacy_log_analytics_rule = None self.description = description + self.display_name = display_name + self.auto_mitigate = auto_mitigate self.enabled = enabled self.last_updated_time = None self.provisioning_state = None @@ -564,9 +637,10 @@ class TriggerCondition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param threshold_operator: Required. Evaluation operation for rule - 'GreaterThan' or - 'LessThan. Possible values include: "GreaterThan", "LessThan", "Equal". - :type threshold_operator: str or ~$(python-base- - namespace).v2018_04_16.models.ConditionalOperator + 'LessThan. Possible values include: "GreaterThanOrEqual", "LessThanOrEqual", "GreaterThan", + "LessThan", "Equal". Default value: "GreaterThanOrEqual". + :type threshold_operator: str or + ~$(python-base-namespace).v2018_04_16.models.ConditionalOperator :param threshold: Required. Result or count threshold based on which rule should be triggered. :type threshold: float :param metric_trigger: Trigger condition for metric query rule. @@ -587,7 +661,7 @@ class TriggerCondition(msrest.serialization.Model): def __init__( self, *, - threshold_operator: Union[str, "ConditionalOperator"], + threshold_operator: Union[str, "ConditionalOperator"] = "GreaterThanOrEqual", threshold: float, metric_trigger: Optional["LogMetricTrigger"] = None, **kwargs diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_monitor_management_client_enums.py index 67e81c2a0144..ce9b4a5dd1d8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/models/_monitor_management_client_enums.py @@ -41,6 +41,8 @@ class ConditionalOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): 'Equal'. """ + GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + LESS_THAN_OR_EQUAL = "LessThanOrEqual" GREATER_THAN = "GreaterThan" LESS_THAN = "LessThan" EQUAL = "Equal" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py index 63d29f5e963f..3df057ea5665 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_04_16/operations/_scheduled_query_rules_operations.py @@ -78,7 +78,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -115,7 +115,7 @@ def create_or_update( return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} # type: ignore + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}'} # type: ignore def get( self, @@ -148,7 +148,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -166,7 +166,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LogSearchRuleResource', pipeline_response) @@ -175,7 +175,7 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}'} # type: ignore def update( self, @@ -210,7 +210,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -234,7 +234,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('LogSearchRuleResource', pipeline_response) @@ -243,7 +243,7 @@ def update( return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}'} # type: ignore def delete( self, @@ -276,7 +276,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -294,13 +294,13 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules/{ruleName}'} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}'} # type: ignore def list_by_subscription( self, @@ -335,7 +335,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -365,7 +365,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -374,7 +374,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/microsoft.insights/scheduledQueryRules'} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/scheduledQueryRules'} # type: ignore def list_by_resource_group( self, @@ -413,7 +413,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -443,7 +443,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -452,4 +452,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/microsoft.insights/scheduledQueryRules'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py index 3dfeecfa782b..f6b03c03aaa5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_metadata.json index 61819c227554..cfd4d8a7a17b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,42 +23,82 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "guest_diagnostics_settings_association": "GuestDiagnosticsSettingsAssociationOperations", "guest_diagnostics_settings": "GuestDiagnosticsSettingsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_management_client.py index dd2026fed6b0..9eec57542a68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import GuestDiagnosticsSettingsAssociationOperations @@ -32,7 +33,7 @@ class MonitorManagementClient(object): :vartype guest_diagnostics_settings: $(python-base-namespace).v2018_06_01_preview.operations.GuestDiagnosticsSettingsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -60,6 +61,24 @@ def __init__( self.guest_diagnostics_settings = GuestDiagnosticsSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py index 0a08001c004e..3219bb1c9dc8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_management_client.py index fe83fe02be0c..06402e692be0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -30,7 +31,7 @@ class MonitorManagementClient(object): :vartype guest_diagnostics_settings: $(python-base-namespace).v2018_06_01_preview.aio.operations.GuestDiagnosticsSettingsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -57,6 +58,23 @@ def __init__( self.guest_diagnostics_settings = GuestDiagnosticsSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py index 176032de5bc6..897035d273d3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_association_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_uri: str, association_name: str, diagnostic_settings_association: "_models.GuestDiagnosticSettingsAssociationResource", - **kwargs + **kwargs: Any ) -> "_models.GuestDiagnosticSettingsAssociationResource": """Creates or updates guest diagnostics settings association. @@ -98,7 +98,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -117,7 +117,7 @@ async def get( self, resource_uri: str, association_name: str, - **kwargs + **kwargs: Any ) -> "_models.GuestDiagnosticSettingsAssociationResource": """Gets guest diagnostics association settings. @@ -161,7 +161,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('GuestDiagnosticSettingsAssociationResource', pipeline_response) @@ -176,7 +176,7 @@ async def delete( self, resource_uri: str, association_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete guest diagnostics association settings. @@ -220,7 +220,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -233,7 +233,7 @@ async def update( resource_uri: str, association_name: str, parameters: "_models.GuestDiagnosticSettingsAssociationResourcePatch", - **kwargs + **kwargs: Any ) -> "_models.GuestDiagnosticSettingsAssociationResource": """Updates an existing guestDiagnosticsSettingsAssociation Resource. To update other fields use the CreateOrUpdate method. @@ -285,7 +285,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('GuestDiagnosticSettingsAssociationResource', pipeline_response) @@ -298,7 +298,7 @@ async def update( def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GuestDiagnosticSettingsAssociationList"]: """Get a list of all guest diagnostic settings association in a subscription. @@ -324,7 +324,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -352,7 +352,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -366,7 +366,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GuestDiagnosticSettingsAssociationList"]: """Get a list of all guest diagnostic settings association in a resource group. @@ -395,7 +395,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -423,7 +423,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py index a9b8d306d9e5..3e4d561f6256 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/aio/operations/_guest_diagnostics_settings_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, diagnostic_settings_name: str, diagnostic_settings: "_models.GuestDiagnosticSettingsResource", - **kwargs + **kwargs: Any ) -> "_models.GuestDiagnosticSettingsResource": """Creates or updates guest diagnostics settings. @@ -75,7 +75,7 @@ async def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'diagnosticSettingsName': self._serialize.url("diagnostic_settings_name", diagnostic_settings_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -116,7 +116,7 @@ async def get( self, resource_group_name: str, diagnostic_settings_name: str, - **kwargs + **kwargs: Any ) -> "_models.GuestDiagnosticSettingsResource": """Gets guest diagnostics settings. @@ -142,7 +142,7 @@ async def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'diagnosticSettingsName': self._serialize.url("diagnostic_settings_name", diagnostic_settings_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -160,7 +160,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('GuestDiagnosticSettingsResource', pipeline_response) @@ -176,7 +176,7 @@ async def update( resource_group_name: str, diagnostic_settings_name: str, parameters: "_models.GuestDiagnosticSettingsPatchResource", - **kwargs + **kwargs: Any ) -> "_models.GuestDiagnosticSettingsResource": """Updates guest diagnostics settings. @@ -205,7 +205,7 @@ async def update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'diagnosticSettingsName': self._serialize.url("diagnostic_settings_name", diagnostic_settings_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -227,7 +227,7 @@ async def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -246,7 +246,7 @@ async def delete( self, resource_group_name: str, diagnostic_settings_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete guest diagnostics settings. @@ -272,7 +272,7 @@ async def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'diagnosticSettingsName': self._serialize.url("diagnostic_settings_name", diagnostic_settings_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -290,7 +290,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -300,7 +300,7 @@ async def delete( def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GuestDiagnosticSettingsList"]: """Get a list of all guest diagnostic settings in a subscription. @@ -326,7 +326,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -354,7 +354,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -368,7 +368,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GuestDiagnosticSettingsList"]: """Get a list of all guest diagnostic settings in a resource group. @@ -397,7 +397,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -425,7 +425,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models.py index 09b3fa00ced5..06ae1bbd2382 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models.py @@ -19,8 +19,8 @@ class DataSource(msrest.serialization.Model): "ETWProviders", "WindowsEventLogs". :type kind: str or ~$(python-base-namespace).v2018_06_01_preview.models.DataSourceKind :param configuration: Required. - :type configuration: ~$(python-base- - namespace).v2018_06_01_preview.models.DataSourceConfiguration + :type configuration: + ~$(python-base-namespace).v2018_06_01_preview.models.DataSourceConfiguration :param sinks: Required. :type sinks: list[~$(python-base-namespace).v2018_06_01_preview.models.SinkConfiguration] """ @@ -51,14 +51,14 @@ class DataSourceConfiguration(msrest.serialization.Model): """DataSourceConfiguration. :param providers: ETW providers configuration. - :type providers: list[~$(python-base- - namespace).v2018_06_01_preview.models.EtwProviderConfiguration] + :type providers: + list[~$(python-base-namespace).v2018_06_01_preview.models.EtwProviderConfiguration] :param perf_counters: Performance counter configuration. - :type perf_counters: list[~$(python-base- - namespace).v2018_06_01_preview.models.PerformanceCounterConfiguration] + :type perf_counters: + list[~$(python-base-namespace).v2018_06_01_preview.models.PerformanceCounterConfiguration] :param event_logs: Windows event logs configuration. - :type event_logs: list[~$(python-base- - namespace).v2018_06_01_preview.models.EventLogConfiguration] + :type event_logs: + list[~$(python-base-namespace).v2018_06_01_preview.models.EventLogConfiguration] """ _attribute_map = { @@ -197,8 +197,8 @@ class GuestDiagnosticSettingsAssociationList(msrest.serialization.Model): """A list of guest diagnostic settings association. :param value: The list of guest diagnostic settings association. - :type value: list[~$(python-base- - namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] + :type value: + list[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] :param next_link: Provides the link to retrieve the next set of elements. :type next_link: str """ @@ -336,8 +336,8 @@ class GuestDiagnosticSettingsList(msrest.serialization.Model): """A list of guest diagnostic settings. :param value: The list of guest diagnostic settings. - :type value: list[~$(python-base- - namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] + :type value: + list[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] :param next_link: Provides the link to retrieve the next set of elements. :type next_link: str """ @@ -363,8 +363,8 @@ class GuestDiagnosticSettingsPatchResource(msrest.serialization.Model): :type tags: dict[str, str] :param os_type: Operating system type for the configuration. Possible values include: "Windows", "Linux". - :type os_type: str or ~$(python-base- - namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType + :type os_type: str or + ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType :param data_sources: the array of data source object which are configured to collect and send data. :type data_sources: list[~$(python-base-namespace).v2018_06_01_preview.models.DataSource] @@ -409,8 +409,8 @@ class GuestDiagnosticSettingsResource(Resource): :type tags: dict[str, str] :param os_type: Operating system type for the configuration. Possible values include: "Windows", "Linux". - :type os_type: str or ~$(python-base- - namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType + :type os_type: str or + ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType :param data_sources: the array of data source object which are configured to collect and send data. :type data_sources: list[~$(python-base-namespace).v2018_06_01_preview.models.DataSource] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models_py3.py index 15c655c3ba32..9f72f55fcb22 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/models/_models_py3.py @@ -23,8 +23,8 @@ class DataSource(msrest.serialization.Model): "ETWProviders", "WindowsEventLogs". :type kind: str or ~$(python-base-namespace).v2018_06_01_preview.models.DataSourceKind :param configuration: Required. - :type configuration: ~$(python-base- - namespace).v2018_06_01_preview.models.DataSourceConfiguration + :type configuration: + ~$(python-base-namespace).v2018_06_01_preview.models.DataSourceConfiguration :param sinks: Required. :type sinks: list[~$(python-base-namespace).v2018_06_01_preview.models.SinkConfiguration] """ @@ -59,14 +59,14 @@ class DataSourceConfiguration(msrest.serialization.Model): """DataSourceConfiguration. :param providers: ETW providers configuration. - :type providers: list[~$(python-base- - namespace).v2018_06_01_preview.models.EtwProviderConfiguration] + :type providers: + list[~$(python-base-namespace).v2018_06_01_preview.models.EtwProviderConfiguration] :param perf_counters: Performance counter configuration. - :type perf_counters: list[~$(python-base- - namespace).v2018_06_01_preview.models.PerformanceCounterConfiguration] + :type perf_counters: + list[~$(python-base-namespace).v2018_06_01_preview.models.PerformanceCounterConfiguration] :param event_logs: Windows event logs configuration. - :type event_logs: list[~$(python-base- - namespace).v2018_06_01_preview.models.EventLogConfiguration] + :type event_logs: + list[~$(python-base-namespace).v2018_06_01_preview.models.EventLogConfiguration] """ _attribute_map = { @@ -222,8 +222,8 @@ class GuestDiagnosticSettingsAssociationList(msrest.serialization.Model): """A list of guest diagnostic settings association. :param value: The list of guest diagnostic settings association. - :type value: list[~$(python-base- - namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] + :type value: + list[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsAssociationResource] :param next_link: Provides the link to retrieve the next set of elements. :type next_link: str """ @@ -374,8 +374,8 @@ class GuestDiagnosticSettingsList(msrest.serialization.Model): """A list of guest diagnostic settings. :param value: The list of guest diagnostic settings. - :type value: list[~$(python-base- - namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] + :type value: + list[~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsResource] :param next_link: Provides the link to retrieve the next set of elements. :type next_link: str """ @@ -404,8 +404,8 @@ class GuestDiagnosticSettingsPatchResource(msrest.serialization.Model): :type tags: dict[str, str] :param os_type: Operating system type for the configuration. Possible values include: "Windows", "Linux". - :type os_type: str or ~$(python-base- - namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType + :type os_type: str or + ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType :param data_sources: the array of data source object which are configured to collect and send data. :type data_sources: list[~$(python-base-namespace).v2018_06_01_preview.models.DataSource] @@ -455,8 +455,8 @@ class GuestDiagnosticSettingsResource(Resource): :type tags: dict[str, str] :param os_type: Operating system type for the configuration. Possible values include: "Windows", "Linux". - :type os_type: str or ~$(python-base- - namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType + :type os_type: str or + ~$(python-base-namespace).v2018_06_01_preview.models.GuestDiagnosticSettingsOsType :param data_sources: the array of data source object which are configured to collect and send data. :type data_sources: list[~$(python-base-namespace).v2018_06_01_preview.models.DataSource] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py index 2c977cb690f0..21e8b221b17a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_association_operations.py @@ -103,7 +103,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -167,7 +167,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('GuestDiagnosticSettingsAssociationResource', pipeline_response) @@ -227,7 +227,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -293,7 +293,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('GuestDiagnosticSettingsAssociationResource', pipeline_response) @@ -333,7 +333,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -361,7 +361,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -405,7 +405,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -433,7 +433,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py index 1e45f3485e86..c7b5ae16539e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_06_01_preview/operations/_guest_diagnostics_settings_operations.py @@ -80,7 +80,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'diagnosticSettingsName': self._serialize.url("diagnostic_settings_name", diagnostic_settings_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -148,7 +148,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'diagnosticSettingsName': self._serialize.url("diagnostic_settings_name", diagnostic_settings_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -166,7 +166,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('GuestDiagnosticSettingsResource', pipeline_response) @@ -212,7 +212,7 @@ def update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'diagnosticSettingsName': self._serialize.url("diagnostic_settings_name", diagnostic_settings_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -234,7 +234,7 @@ def update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -280,7 +280,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'diagnosticSettingsName': self._serialize.url("diagnostic_settings_name", diagnostic_settings_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -298,7 +298,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -335,7 +335,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -363,7 +363,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -407,7 +407,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -435,7 +435,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py index ed38a6efebf4..08864a677576 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_metadata.json index 16f8f621713d..11badcc855fc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,43 +23,83 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "action_groups": "ActionGroupsOperations", "metric_baseline": "MetricBaselineOperations", "baseline": "BaselineOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_management_client.py index cd65097c8354..cdaddbe30328 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ActionGroupsOperations @@ -35,7 +36,7 @@ class MonitorManagementClient(object): :vartype baseline: $(python-base-namespace).v2018_09_01.operations.BaselineOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -65,6 +66,24 @@ def __init__( self.baseline = BaselineOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py index 003ad367aa61..c2ff4d18ad78 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_management_client.py index b4c6c5e5f83a..52c95081d8ec 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -33,7 +34,7 @@ class MonitorManagementClient(object): :vartype baseline: $(python-base-namespace).v2018_09_01.aio.operations.BaselineOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -62,6 +63,23 @@ def __init__( self.baseline = BaselineOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py index 784c2646f6e5..fbf6c3294322 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_action_groups_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, action_group_name: str, action_group: "_models.ActionGroupResource", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Create a new action group or update an existing one. @@ -75,7 +75,7 @@ async def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -116,7 +116,7 @@ async def get( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Get an action group. @@ -142,7 +142,7 @@ async def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -160,7 +160,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -175,7 +175,7 @@ async def delete( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an action group. @@ -201,7 +201,7 @@ async def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -219,7 +219,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def update( resource_group_name: str, action_group_name: str, action_group_patch: "_models.ActionGroupPatchBody", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. @@ -259,7 +259,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -283,7 +283,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -296,7 +296,7 @@ async def update( def list_by_subscription_id( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a subscription. @@ -322,7 +322,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -350,7 +350,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -364,7 +364,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a resource group. @@ -393,7 +393,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -421,7 +421,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -437,7 +437,7 @@ async def enable_receiver( resource_group_name: str, action_group_name: str, enable_request: "_models.EnableRequest", - **kwargs + **kwargs: Any ) -> None: """Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. @@ -467,7 +467,7 @@ async def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -489,7 +489,7 @@ async def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baseline_operations.py index 2e13edf2f29d..c8c76e693c6a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baseline_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_baseline_operations.py @@ -52,7 +52,7 @@ async def get( result_type: Optional[Union[str, "_models.ResultType"]] = None, metricnamespace: Optional[str] = None, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.BaselineResponse": """**Gets the baseline values for a resource**. @@ -61,7 +61,9 @@ async def get( For example: subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. :type resource_uri: str - :param metricnames: The names of the metrics (comma separated) to retrieve. + :param metricnames: The names of the metrics (comma separated) to retrieve. Special case: If a + metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be + **'Metric%2Name1'**. :type metricnames: str :param timespan: The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. @@ -130,7 +132,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BaselineResponse', pipeline_response) @@ -139,4 +141,4 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/baseline'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_metric_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_metric_baseline_operations.py index cf63e10acad9..0bc346ea0e7e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_metric_baseline_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/aio/operations/_metric_baseline_operations.py @@ -52,7 +52,7 @@ async def get( result_type: Optional[Union[str, "_models.ResultType"]] = None, metricnamespace: Optional[str] = None, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.BaselineResponse": """**Gets the baseline values for a specific metric**. @@ -129,7 +129,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BaselineResponse', pipeline_response) @@ -138,13 +138,13 @@ async def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/baseline/{metricName}'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}'} # type: ignore async def calculate_baseline( self, resource_uri: str, time_series_information: "_models.TimeSeriesInformation", - **kwargs + **kwargs: Any ) -> "_models.CalculateBaselineResponse": """**Lists the baseline values for a resource**. @@ -195,7 +195,7 @@ async def calculate_baseline( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CalculateBaselineResponse', pipeline_response) @@ -204,4 +204,4 @@ async def calculate_baseline( return cls(pipeline_response, deserialized, {}) return deserialized - calculate_baseline.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/calculatebaseline'} # type: ignore + calculate_baseline.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/__init__.py index fcd33d0536b5..b7bdabe81db6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/__init__.py @@ -18,6 +18,7 @@ from ._models_py3 import BaselineMetadataValue from ._models_py3 import BaselineResponse from ._models_py3 import CalculateBaselineResponse + from ._models_py3 import CalculateBaselineResponseStatistics from ._models_py3 import EmailReceiver from ._models_py3 import EnableRequest from ._models_py3 import ErrorResponse @@ -41,6 +42,7 @@ from ._models import BaselineMetadataValue # type: ignore from ._models import BaselineResponse # type: ignore from ._models import CalculateBaselineResponse # type: ignore + from ._models import CalculateBaselineResponseStatistics # type: ignore from ._models import EmailReceiver # type: ignore from ._models import EnableRequest # type: ignore from ._models import ErrorResponse # type: ignore @@ -54,6 +56,8 @@ from ._models import WebhookReceiver # type: ignore from ._monitor_management_client_enums import ( + ErrorType, + PredictionResultType, ReceiverStatus, ResultType, Sensitivity, @@ -71,6 +75,7 @@ 'BaselineMetadataValue', 'BaselineResponse', 'CalculateBaselineResponse', + 'CalculateBaselineResponseStatistics', 'EmailReceiver', 'EnableRequest', 'ErrorResponse', @@ -82,6 +87,8 @@ 'TimeSeriesInformation', 'VoiceReceiver', 'WebhookReceiver', + 'ErrorType', + 'PredictionResultType', 'ReceiverStatus', 'ResultType', 'Sensitivity', diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models.py index 8ffeb77fca18..5e39f2d75afc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models.py @@ -135,20 +135,20 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2018_09_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2018_09_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2018_09_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2018_09_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2018_09_01.models.AutomationRunbookReceiver] :param voice_receivers: The list of voice receivers that are part of this action group. :type voice_receivers: list[~$(python-base-namespace).v2018_09_01.models.VoiceReceiver] :param logic_app_receivers: The list of logic app receivers that are part of this action group. :type logic_app_receivers: list[~$(python-base-namespace).v2018_09_01.models.LogicAppReceiver] :param azure_function_receivers: The list of azure function receivers that are part of this action group. - :type azure_function_receivers: list[~$(python-base- - namespace).v2018_09_01.models.AzureFunctionReceiver] + :type azure_function_receivers: + list[~$(python-base-namespace).v2018_09_01.models.AzureFunctionReceiver] :param arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. :type arm_role_receivers: list[~$(python-base-namespace).v2018_09_01.models.ArmRoleReceiver] @@ -365,6 +365,15 @@ class Baseline(msrest.serialization.Model): :type low_thresholds: list[float] :param high_thresholds: Required. The high thresholds of the baseline. :type high_thresholds: list[float] + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[~datetime.datetime] + :param prediction_result_type: The prediction result type of the baseline. Possible values + include: "0", "1", "2". + :type prediction_result_type: str or + ~$(python-base-namespace).v2018_09_01.models.PredictionResultType + :param error_type: The error type of the baseline. Possible values include: "0", "1", "2", "3", + "4", "100", "200". + :type error_type: str or ~$(python-base-namespace).v2018_09_01.models.ErrorType """ _validation = { @@ -377,6 +386,9 @@ class Baseline(msrest.serialization.Model): 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, 'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + 'prediction_result_type': {'key': 'PredictionResultType', 'type': 'str'}, + 'error_type': {'key': 'ErrorType', 'type': 'str'}, } def __init__( @@ -387,6 +399,9 @@ def __init__( self.sensitivity = kwargs['sensitivity'] self.low_thresholds = kwargs['low_thresholds'] self.high_thresholds = kwargs['high_thresholds'] + self.timestamps = kwargs.get('timestamps', None) + self.prediction_result_type = kwargs.get('prediction_result_type', None) + self.error_type = kwargs.get('error_type', None) class BaselineMetadataValue(msrest.serialization.Model): @@ -423,6 +438,19 @@ class BaselineResponse(msrest.serialization.Model): :vartype type: str :ivar name: The name and the display name of the metric, i.e. it is localizable string. :vartype name: ~$(python-base-namespace).v2018_09_01.models.LocalizableString + :param timestamps: The array of timestamps of the baselines. + :type timestamps: list[~datetime.datetime] + :param baseline: The baseline values for each sensitivity. + :type baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] + :param metdata: The baseline metadata values. + :type metdata: list[~$(python-base-namespace).v2018_09_01.models.BaselineMetadataValue] + :param prediction_result_type: The prediction result type of the baseline. Possible values + include: "0", "1", "2". + :type prediction_result_type: str or + ~$(python-base-namespace).v2018_09_01.models.PredictionResultType + :param error_type: The error type of the baseline. Possible values include: "0", "1", "2", "3", + "4", "100", "200". + :type error_type: str or ~$(python-base-namespace).v2018_09_01.models.ErrorType :param timespan: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. @@ -433,30 +461,30 @@ class BaselineResponse(msrest.serialization.Model): :type interval: ~datetime.timedelta :param aggregation: The aggregation type of the metric. :type aggregation: str - :param timestamps: The array of timestamps of the baselines. - :type timestamps: list[~datetime.datetime] - :param baseline: The baseline values for each sensitivity. - :type baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] - :param metadata: The baseline metadata values. - :type metadata: list[~$(python-base-namespace).v2018_09_01.models.BaselineMetadataValue] + :ivar internal_operation_id: internal operation id. + :vartype internal_operation_id: str """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'internal_operation_id': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, + 'metdata': {'key': 'metdata', 'type': '[BaselineMetadataValue]'}, + 'prediction_result_type': {'key': 'predictionResultType', 'type': 'str'}, + 'error_type': {'key': 'errorType', 'type': 'str'}, 'timespan': {'key': 'properties.timespan', 'type': 'str'}, 'interval': {'key': 'properties.interval', 'type': 'duration'}, 'aggregation': {'key': 'properties.aggregation', 'type': 'str'}, - 'timestamps': {'key': 'properties.timestamps', 'type': '[iso-8601]'}, - 'baseline': {'key': 'properties.baseline', 'type': '[Baseline]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[BaselineMetadataValue]'}, + 'internal_operation_id': {'key': 'properties.internalOperationId', 'type': 'str'}, } def __init__( @@ -467,17 +495,22 @@ def __init__( self.id = None self.type = None self.name = None + self.timestamps = kwargs.get('timestamps', None) + self.baseline = kwargs.get('baseline', None) + self.metdata = kwargs.get('metdata', None) + self.prediction_result_type = kwargs.get('prediction_result_type', None) + self.error_type = kwargs.get('error_type', None) self.timespan = kwargs.get('timespan', None) self.interval = kwargs.get('interval', None) self.aggregation = kwargs.get('aggregation', None) - self.timestamps = kwargs.get('timestamps', None) - self.baseline = kwargs.get('baseline', None) - self.metadata = kwargs.get('metadata', None) + self.internal_operation_id = None class CalculateBaselineResponse(msrest.serialization.Model): """The response to a calculate baseline call. + 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 type: Required. The resource type of the baseline resource. @@ -486,17 +519,29 @@ class CalculateBaselineResponse(msrest.serialization.Model): :type timestamps: list[~datetime.datetime] :param baseline: Required. The baseline values for each sensitivity. :type baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] + :param statistics: The statistics. + :type statistics: + ~$(python-base-namespace).v2018_09_01.models.CalculateBaselineResponseStatistics + :ivar internal_operation_id: internal operation id. + :vartype internal_operation_id: str + :param error_type: The error type for calculating the baseline. Possible values include: "0", + "1", "2", "3", "4", "100", "200". + :type error_type: str or ~$(python-base-namespace).v2018_09_01.models.ErrorType """ _validation = { 'type': {'required': True}, 'baseline': {'required': True}, + 'internal_operation_id': {'readonly': True}, } _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, + 'statistics': {'key': 'statistics', 'type': 'CalculateBaselineResponseStatistics'}, + 'internal_operation_id': {'key': 'internalOperationId', 'type': 'str'}, + 'error_type': {'key': 'errorType', 'type': 'str'}, } def __init__( @@ -507,6 +552,36 @@ def __init__( self.type = kwargs['type'] self.timestamps = kwargs.get('timestamps', None) self.baseline = kwargs['baseline'] + self.statistics = kwargs.get('statistics', None) + self.internal_operation_id = None + self.error_type = kwargs.get('error_type', None) + + +class CalculateBaselineResponseStatistics(msrest.serialization.Model): + """The statistics. + + :param is_eligible: is series eligible for dynamic threshold analysis. + :type is_eligible: bool + :param status: The list of extended status for calculating the baseline. + :type status: list[str] + :param seasonality_period: The seasonality period for calculating the baseline. + :type seasonality_period: int + """ + + _attribute_map = { + 'is_eligible': {'key': 'isEligible', 'type': 'bool'}, + 'status': {'key': 'status', 'type': '[str]'}, + 'seasonality_period': {'key': 'seasonalityPeriod', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(CalculateBaselineResponseStatistics, self).__init__(**kwargs) + self.is_eligible = kwargs.get('is_eligible', None) + self.status = kwargs.get('status', None) + self.seasonality_period = kwargs.get('seasonality_period', None) class EmailReceiver(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models_py3.py index fcd6b542c2ca..6bb97b5a84c6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_models_py3.py @@ -149,20 +149,20 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2018_09_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2018_09_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2018_09_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2018_09_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2018_09_01.models.AutomationRunbookReceiver] :param voice_receivers: The list of voice receivers that are part of this action group. :type voice_receivers: list[~$(python-base-namespace).v2018_09_01.models.VoiceReceiver] :param logic_app_receivers: The list of logic app receivers that are part of this action group. :type logic_app_receivers: list[~$(python-base-namespace).v2018_09_01.models.LogicAppReceiver] :param azure_function_receivers: The list of azure function receivers that are part of this action group. - :type azure_function_receivers: list[~$(python-base- - namespace).v2018_09_01.models.AzureFunctionReceiver] + :type azure_function_receivers: + list[~$(python-base-namespace).v2018_09_01.models.AzureFunctionReceiver] :param arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. :type arm_role_receivers: list[~$(python-base-namespace).v2018_09_01.models.ArmRoleReceiver] @@ -412,6 +412,15 @@ class Baseline(msrest.serialization.Model): :type low_thresholds: list[float] :param high_thresholds: Required. The high thresholds of the baseline. :type high_thresholds: list[float] + :param timestamps: the array of timestamps of the baselines. + :type timestamps: list[~datetime.datetime] + :param prediction_result_type: The prediction result type of the baseline. Possible values + include: "0", "1", "2". + :type prediction_result_type: str or + ~$(python-base-namespace).v2018_09_01.models.PredictionResultType + :param error_type: The error type of the baseline. Possible values include: "0", "1", "2", "3", + "4", "100", "200". + :type error_type: str or ~$(python-base-namespace).v2018_09_01.models.ErrorType """ _validation = { @@ -424,6 +433,9 @@ class Baseline(msrest.serialization.Model): 'sensitivity': {'key': 'sensitivity', 'type': 'str'}, 'low_thresholds': {'key': 'lowThresholds', 'type': '[float]'}, 'high_thresholds': {'key': 'highThresholds', 'type': '[float]'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + 'prediction_result_type': {'key': 'PredictionResultType', 'type': 'str'}, + 'error_type': {'key': 'ErrorType', 'type': 'str'}, } def __init__( @@ -432,12 +444,18 @@ def __init__( sensitivity: Union[str, "Sensitivity"], low_thresholds: List[float], high_thresholds: List[float], + timestamps: Optional[List[datetime.datetime]] = None, + prediction_result_type: Optional[Union[str, "PredictionResultType"]] = None, + error_type: Optional[Union[str, "ErrorType"]] = None, **kwargs ): super(Baseline, self).__init__(**kwargs) self.sensitivity = sensitivity self.low_thresholds = low_thresholds self.high_thresholds = high_thresholds + self.timestamps = timestamps + self.prediction_result_type = prediction_result_type + self.error_type = error_type class BaselineMetadataValue(msrest.serialization.Model): @@ -477,6 +495,19 @@ class BaselineResponse(msrest.serialization.Model): :vartype type: str :ivar name: The name and the display name of the metric, i.e. it is localizable string. :vartype name: ~$(python-base-namespace).v2018_09_01.models.LocalizableString + :param timestamps: The array of timestamps of the baselines. + :type timestamps: list[~datetime.datetime] + :param baseline: The baseline values for each sensitivity. + :type baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] + :param metdata: The baseline metadata values. + :type metdata: list[~$(python-base-namespace).v2018_09_01.models.BaselineMetadataValue] + :param prediction_result_type: The prediction result type of the baseline. Possible values + include: "0", "1", "2". + :type prediction_result_type: str or + ~$(python-base-namespace).v2018_09_01.models.PredictionResultType + :param error_type: The error type of the baseline. Possible values include: "0", "1", "2", "3", + "4", "100", "200". + :type error_type: str or ~$(python-base-namespace).v2018_09_01.models.ErrorType :param timespan: The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested. @@ -487,58 +518,65 @@ class BaselineResponse(msrest.serialization.Model): :type interval: ~datetime.timedelta :param aggregation: The aggregation type of the metric. :type aggregation: str - :param timestamps: The array of timestamps of the baselines. - :type timestamps: list[~datetime.datetime] - :param baseline: The baseline values for each sensitivity. - :type baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] - :param metadata: The baseline metadata values. - :type metadata: list[~$(python-base-namespace).v2018_09_01.models.BaselineMetadataValue] + :ivar internal_operation_id: internal operation id. + :vartype internal_operation_id: str """ _validation = { 'id': {'readonly': True}, 'type': {'readonly': True}, 'name': {'readonly': True}, + 'internal_operation_id': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'LocalizableString'}, + 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, + 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, + 'metdata': {'key': 'metdata', 'type': '[BaselineMetadataValue]'}, + 'prediction_result_type': {'key': 'predictionResultType', 'type': 'str'}, + 'error_type': {'key': 'errorType', 'type': 'str'}, 'timespan': {'key': 'properties.timespan', 'type': 'str'}, 'interval': {'key': 'properties.interval', 'type': 'duration'}, 'aggregation': {'key': 'properties.aggregation', 'type': 'str'}, - 'timestamps': {'key': 'properties.timestamps', 'type': '[iso-8601]'}, - 'baseline': {'key': 'properties.baseline', 'type': '[Baseline]'}, - 'metadata': {'key': 'properties.metadata', 'type': '[BaselineMetadataValue]'}, + 'internal_operation_id': {'key': 'properties.internalOperationId', 'type': 'str'}, } def __init__( self, *, + timestamps: Optional[List[datetime.datetime]] = None, + baseline: Optional[List["Baseline"]] = None, + metdata: Optional[List["BaselineMetadataValue"]] = None, + prediction_result_type: Optional[Union[str, "PredictionResultType"]] = None, + error_type: Optional[Union[str, "ErrorType"]] = None, timespan: Optional[str] = None, interval: Optional[datetime.timedelta] = None, aggregation: Optional[str] = None, - timestamps: Optional[List[datetime.datetime]] = None, - baseline: Optional[List["Baseline"]] = None, - metadata: Optional[List["BaselineMetadataValue"]] = None, **kwargs ): super(BaselineResponse, self).__init__(**kwargs) self.id = None self.type = None self.name = None + self.timestamps = timestamps + self.baseline = baseline + self.metdata = metdata + self.prediction_result_type = prediction_result_type + self.error_type = error_type self.timespan = timespan self.interval = interval self.aggregation = aggregation - self.timestamps = timestamps - self.baseline = baseline - self.metadata = metadata + self.internal_operation_id = None class CalculateBaselineResponse(msrest.serialization.Model): """The response to a calculate baseline call. + 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 type: Required. The resource type of the baseline resource. @@ -547,17 +585,29 @@ class CalculateBaselineResponse(msrest.serialization.Model): :type timestamps: list[~datetime.datetime] :param baseline: Required. The baseline values for each sensitivity. :type baseline: list[~$(python-base-namespace).v2018_09_01.models.Baseline] + :param statistics: The statistics. + :type statistics: + ~$(python-base-namespace).v2018_09_01.models.CalculateBaselineResponseStatistics + :ivar internal_operation_id: internal operation id. + :vartype internal_operation_id: str + :param error_type: The error type for calculating the baseline. Possible values include: "0", + "1", "2", "3", "4", "100", "200". + :type error_type: str or ~$(python-base-namespace).v2018_09_01.models.ErrorType """ _validation = { 'type': {'required': True}, 'baseline': {'required': True}, + 'internal_operation_id': {'readonly': True}, } _attribute_map = { 'type': {'key': 'type', 'type': 'str'}, 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, 'baseline': {'key': 'baseline', 'type': '[Baseline]'}, + 'statistics': {'key': 'statistics', 'type': 'CalculateBaselineResponseStatistics'}, + 'internal_operation_id': {'key': 'internalOperationId', 'type': 'str'}, + 'error_type': {'key': 'errorType', 'type': 'str'}, } def __init__( @@ -566,12 +616,48 @@ def __init__( type: str, baseline: List["Baseline"], timestamps: Optional[List[datetime.datetime]] = None, + statistics: Optional["CalculateBaselineResponseStatistics"] = None, + error_type: Optional[Union[str, "ErrorType"]] = None, **kwargs ): super(CalculateBaselineResponse, self).__init__(**kwargs) self.type = type self.timestamps = timestamps self.baseline = baseline + self.statistics = statistics + self.internal_operation_id = None + self.error_type = error_type + + +class CalculateBaselineResponseStatistics(msrest.serialization.Model): + """The statistics. + + :param is_eligible: is series eligible for dynamic threshold analysis. + :type is_eligible: bool + :param status: The list of extended status for calculating the baseline. + :type status: list[str] + :param seasonality_period: The seasonality period for calculating the baseline. + :type seasonality_period: int + """ + + _attribute_map = { + 'is_eligible': {'key': 'isEligible', 'type': 'bool'}, + 'status': {'key': 'status', 'type': '[str]'}, + 'seasonality_period': {'key': 'seasonalityPeriod', 'type': 'int'}, + } + + def __init__( + self, + *, + is_eligible: Optional[bool] = None, + status: Optional[List[str]] = None, + seasonality_period: Optional[int] = None, + **kwargs + ): + super(CalculateBaselineResponseStatistics, self).__init__(**kwargs) + self.is_eligible = is_eligible + self.status = status + self.seasonality_period = seasonality_period class EmailReceiver(msrest.serialization.Model): diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_monitor_management_client_enums.py index 26ccadca6303..2968ce09e7c2 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/models/_monitor_management_client_enums.py @@ -26,6 +26,26 @@ def __getattr__(cls, name): raise AttributeError(name) +class ErrorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The error type of the baseline. + """ + + ZERO = "0" + ONE = "1" + TWO = "2" + THREE = "3" + FOUR = "4" + ONE_HUNDRED = "100" + TWO_HUNDRED = "200" + +class PredictionResultType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The prediction result type of the baseline. + """ + + ZERO = "0" + ONE = "1" + TWO = "2" + class ReceiverStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Indicates the status of the receiver. Receivers that are not Enabled will not receive any communications. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py index 46614344a75b..cbaa9affec08 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_action_groups_operations.py @@ -80,7 +80,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -148,7 +148,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -166,7 +166,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -208,7 +208,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -226,7 +226,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -267,7 +267,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -291,7 +291,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -331,7 +331,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -359,7 +359,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -403,7 +403,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -431,7 +431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -478,7 +478,7 @@ def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -500,7 +500,7 @@ def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baseline_operations.py index 2afba907f941..15dd5f3f22de 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baseline_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_baseline_operations.py @@ -66,7 +66,9 @@ def get( For example: subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1. :type resource_uri: str - :param metricnames: The names of the metrics (comma separated) to retrieve. + :param metricnames: The names of the metrics (comma separated) to retrieve. Special case: If a + metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be + **'Metric%2Name1'**. :type metricnames: str :param timespan: The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'. @@ -135,7 +137,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BaselineResponse', pipeline_response) @@ -144,4 +146,4 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/baseline'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_metric_baseline_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_metric_baseline_operations.py index e312106466af..a5b894a44c00 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_metric_baseline_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_09_01/operations/_metric_baseline_operations.py @@ -134,7 +134,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('BaselineResponse', pipeline_response) @@ -143,7 +143,7 @@ def get( return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/baseline/{metricName}'} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}'} # type: ignore def calculate_baseline( self, @@ -201,7 +201,7 @@ def calculate_baseline( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CalculateBaselineResponse', pipeline_response) @@ -210,4 +210,4 @@ def calculate_baseline( return cls(pipeline_response, deserialized, {}) return deserialized - calculate_baseline.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/calculatebaseline'} # type: ignore + calculate_baseline.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/calculatebaseline'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py index 0982355d24b6..3b7dbb10194c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_metadata.json index ae013cb651cf..108ef76686e1 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -22,7 +24,7 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true @@ -30,20 +32,60 @@ }, "constant": { }, - "call": "credential" + "call": "credential", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "vm_insights": "VMInsightsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_management_client.py index 6005223afa1b..4c8063f8d99d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import VMInsightsOperations @@ -52,6 +53,21 @@ def __init__( self.vm_insights = VMInsightsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py index 47ad42a1a50c..d8d2e140bf30 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_management_client.py index 14ccf5f02108..d517e654aef7 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -49,6 +50,20 @@ def __init__( self.vm_insights = VMInsightsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py index e79fd543f141..fa9ce068a20a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/aio/operations/_vm_insights_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def get_onboarding_status( self, resource_uri: str, - **kwargs + **kwargs: Any ) -> "_models.VMInsightsOnboardingStatus": """Retrieves the VM Insights onboarding status for the specified resource or resource scope. @@ -84,7 +84,7 @@ async def get_onboarding_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResponseWithError, response) + error = self._deserialize.failsafe_deserialize(_models.ResponseWithError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VMInsightsOnboardingStatus', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models.py index 1e5a12042acd..05352ea9024f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models.py @@ -141,8 +141,8 @@ class VMInsightsOnboardingStatus(ProxyResource): :param onboarding_status: The onboarding status for the resource. Note that, a higher level scope, e.g., resource group or subscription, is considered onboarded if at least one resource under it is onboarded. Possible values include: "onboarded", "notOnboarded", "unknown". - :type onboarding_status: str or ~$(python-base- - namespace).v2018_11_27_preview.models.OnboardingStatus + :type onboarding_status: str or + ~$(python-base-namespace).v2018_11_27_preview.models.OnboardingStatus :param data_status: The status of VM Insights data from the resource. When reported as ``present`` the data array will contain information about the data containers to which data for the specified resource is being routed. Possible values include: "present", "notPresent". diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models_py3.py index 85a106bf95eb..d377f3d4a19c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/models/_models_py3.py @@ -152,8 +152,8 @@ class VMInsightsOnboardingStatus(ProxyResource): :param onboarding_status: The onboarding status for the resource. Note that, a higher level scope, e.g., resource group or subscription, is considered onboarded if at least one resource under it is onboarded. Possible values include: "onboarded", "notOnboarded", "unknown". - :type onboarding_status: str or ~$(python-base- - namespace).v2018_11_27_preview.models.OnboardingStatus + :type onboarding_status: str or + ~$(python-base-namespace).v2018_11_27_preview.models.OnboardingStatus :param data_status: The status of VM Insights data from the resource. When reported as ``present`` the data array will contain information about the data containers to which data for the specified resource is being routed. Possible values include: "present", "notPresent". diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py index b2b629ba9c05..323b2fefa1b0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2018_11_27_preview/operations/_vm_insights_operations.py @@ -89,7 +89,7 @@ def get_onboarding_status( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ResponseWithError, response) + error = self._deserialize.failsafe_deserialize(_models.ResponseWithError, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('VMInsightsOnboardingStatus', pipeline_response) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py index 19db68b6105a..bae7197d4361 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_metadata.json index 0cda759be078..1195426a660a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,42 +23,82 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "action_groups": "ActionGroupsOperations", "baselines": "BaselinesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_management_client.py index 64272557194e..e8cda37fc5de 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ActionGroupsOperations @@ -32,7 +33,7 @@ class MonitorManagementClient(object): :vartype baselines: $(python-base-namespace).v2019_03_01.operations.BaselinesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -60,6 +61,24 @@ def __init__( self.baselines = BaselinesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py index 39a3184e2aba..14d8957671d3 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_management_client.py index 07f26ba351e4..1c5b2606dd68 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -30,7 +31,7 @@ class MonitorManagementClient(object): :vartype baselines: $(python-base-namespace).v2019_03_01.aio.operations.BaselinesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -57,6 +58,23 @@ def __init__( self.baselines = BaselinesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py index 97335a1b91b4..809dc6eb6dc6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_action_groups_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, action_group_name: str, action_group: "_models.ActionGroupResource", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Create a new action group or update an existing one. @@ -75,7 +75,7 @@ async def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -116,7 +116,7 @@ async def get( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Get an action group. @@ -142,7 +142,7 @@ async def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -160,7 +160,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -175,7 +175,7 @@ async def delete( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an action group. @@ -201,7 +201,7 @@ async def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -219,7 +219,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def update( resource_group_name: str, action_group_name: str, action_group_patch: "_models.ActionGroupPatchBody", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. @@ -259,7 +259,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -283,7 +283,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -296,7 +296,7 @@ async def update( def list_by_subscription_id( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a subscription. @@ -322,7 +322,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -350,7 +350,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -364,7 +364,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a resource group. @@ -393,7 +393,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -421,7 +421,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -437,7 +437,7 @@ async def enable_receiver( resource_group_name: str, action_group_name: str, enable_request: "_models.EnableRequest", - **kwargs + **kwargs: Any ) -> None: """Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. @@ -467,7 +467,7 @@ async def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -489,7 +489,7 @@ async def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py index a3b9afcfcf6d..da5a7bec335f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/aio/operations/_baselines_operations.py @@ -53,13 +53,15 @@ def list( sensitivities: Optional[str] = None, filter: Optional[str] = None, result_type: Optional[Union[str, "_models.ResultType"]] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MetricBaselinesResponse"]: """**Lists the metric baseline values for a resource**. :param resource_uri: The identifier of the resource. :type resource_uri: str - :param metricnames: The names of the metrics (comma separated) to retrieve. + :param metricnames: The names of the metrics (comma separated) to retrieve. Special case: If a + metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be + **'Metric%2Name1'**. :type metricnames: str :param metricnamespace: Metric namespace to query metric definitions for. :type metricnamespace: str @@ -72,15 +74,18 @@ def list( :type aggregation: str :param sensitivities: The list of sensitivities (comma separated) to retrieve. :type sensitivities: str - :param filter: The **$filter** is used to reduce the set of metric data - returned.:code:`
`Example::code:`
`Metric contains metadata A, B and C.:code:`
`- - Return all time series of C where A = a1 and B = b1 or b2:code:`
`\ **$filter=A eq ‘a1’ and - B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**\ :code:`
`- Invalid variant::code:`
`\ **$filter=A - eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**\ :code:`
`This is invalid because the - logical or operator cannot separate two different metadata names.:code:`
`- Return all time - series where A = a1, B = b1 and C = c1::code:`
`\ **$filter=A eq ‘a1’ and B eq ‘b1’ and C eq - ‘c1’**\ :code:`
`- Return all time series where A = a1:code:`
`\ **$filter=A eq ‘a1’ and - B eq ‘\ *’ and C eq ‘*\ ’**. + :param filter: The **$filter** is used to reduce the set of metric data returned. Example: + Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or + b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A + eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or + operator cannot separate two different metadata names. - Return all time series where A = a1, B + = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series + where A = a1 **$filter=A eq 'a1' and B eq '\ *' and C eq '*\ '**. Special case: When dimension + name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** + Instead of using $filter= "dim (test) 1 eq '\ *' " use **$filter= "dim %2528test%2529 1 eq '*\ + ' "\ ** When dimension name is **\ dim (test) 3\ ** and dimension value is **\ dim3 (test) val\ + ** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **\ $filter= "dim + %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. :type filter: str :param result_type: Allows retrieving only metadata of the baseline. On data request all information is retrieved. @@ -151,7 +156,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -160,4 +165,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/metricBaselines'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/metricBaselines'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/__init__.py index eda2bcda5d85..d2c6946d97e5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/__init__.py @@ -14,6 +14,7 @@ from ._models_py3 import AutomationRunbookReceiver from ._models_py3 import AzureAppPushReceiver from ._models_py3 import AzureFunctionReceiver + from ._models_py3 import AzureResource from ._models_py3 import BaselineMetadata from ._models_py3 import EmailReceiver from ._models_py3 import EnableRequest @@ -22,7 +23,6 @@ from ._models_py3 import LogicAppReceiver from ._models_py3 import MetricBaselinesResponse from ._models_py3 import MetricSingleDimension - from ._models_py3 import Resource from ._models_py3 import SingleBaseline from ._models_py3 import SingleMetricBaseline from ._models_py3 import SmsReceiver @@ -37,6 +37,7 @@ from ._models import AutomationRunbookReceiver # type: ignore from ._models import AzureAppPushReceiver # type: ignore from ._models import AzureFunctionReceiver # type: ignore + from ._models import AzureResource # type: ignore from ._models import BaselineMetadata # type: ignore from ._models import EmailReceiver # type: ignore from ._models import EnableRequest # type: ignore @@ -45,7 +46,6 @@ from ._models import LogicAppReceiver # type: ignore from ._models import MetricBaselinesResponse # type: ignore from ._models import MetricSingleDimension # type: ignore - from ._models import Resource # type: ignore from ._models import SingleBaseline # type: ignore from ._models import SingleMetricBaseline # type: ignore from ._models import SmsReceiver # type: ignore @@ -67,6 +67,7 @@ 'AutomationRunbookReceiver', 'AzureAppPushReceiver', 'AzureFunctionReceiver', + 'AzureResource', 'BaselineMetadata', 'EmailReceiver', 'EnableRequest', @@ -75,7 +76,6 @@ 'LogicAppReceiver', 'MetricBaselinesResponse', 'MetricSingleDimension', - 'Resource', 'SingleBaseline', 'SingleMetricBaseline', 'SmsReceiver', diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models.py index 5b874c6d560f..2276db6bcae0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models.py @@ -57,7 +57,7 @@ def __init__( self.enabled = kwargs.get('enabled', True) -class Resource(msrest.serialization.Model): +class AzureResource(msrest.serialization.Model): """An azure resource object. Variables are only populated by the server, and will be ignored when sending a request. @@ -70,6 +70,10 @@ class Resource(msrest.serialization.Model): :vartype name: str :ivar type: Azure resource type. :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str :param location: Required. Resource location. :type location: str :param tags: A set of tags. Resource tags. @@ -80,6 +84,8 @@ class Resource(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, 'location': {'required': True}, } @@ -87,6 +93,8 @@ class Resource(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -95,15 +103,17 @@ def __init__( self, **kwargs ): - super(Resource, self).__init__(**kwargs) + super(AzureResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None + self.kind = None + self.identity = None self.location = kwargs['location'] self.tags = kwargs.get('tags', None) -class ActionGroupResource(Resource): +class ActionGroupResource(AzureResource): """An action group resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -116,6 +126,10 @@ class ActionGroupResource(Resource): :vartype name: str :ivar type: Azure resource type. :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str :param location: Required. Resource location. :type location: str :param tags: A set of tags. Resource tags. @@ -135,20 +149,20 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2019_03_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2019_03_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2019_03_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2019_03_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2019_03_01.models.AutomationRunbookReceiver] :param voice_receivers: The list of voice receivers that are part of this action group. :type voice_receivers: list[~$(python-base-namespace).v2019_03_01.models.VoiceReceiver] :param logic_app_receivers: The list of logic app receivers that are part of this action group. :type logic_app_receivers: list[~$(python-base-namespace).v2019_03_01.models.LogicAppReceiver] :param azure_function_receivers: The list of azure function receivers that are part of this action group. - :type azure_function_receivers: list[~$(python-base- - namespace).v2019_03_01.models.AzureFunctionReceiver] + :type azure_function_receivers: + list[~$(python-base-namespace).v2019_03_01.models.AzureFunctionReceiver] :param arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. :type arm_role_receivers: list[~$(python-base-namespace).v2019_03_01.models.ArmRoleReceiver] @@ -158,6 +172,8 @@ class ActionGroupResource(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, 'location': {'required': True}, 'group_short_name': {'max_length': 12, 'min_length': 0}, } @@ -166,6 +182,8 @@ class ActionGroupResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'group_short_name': {'key': 'properties.groupShortName', 'type': 'str'}, @@ -211,14 +229,13 @@ class ArmRoleReceiver(msrest.serialization.Model): :type name: str :param role_id: Required. The arm role id. :type role_id: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ _validation = { 'name': {'required': True}, 'role_id': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -234,7 +251,7 @@ def __init__( super(ArmRoleReceiver, self).__init__(**kwargs) self.name = kwargs['name'] self.role_id = kwargs['role_id'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) class AutomationRunbookReceiver(msrest.serialization.Model): @@ -255,7 +272,7 @@ class AutomationRunbookReceiver(msrest.serialization.Model): :type name: str :param service_uri: The URI where webhooks should be sent. :type service_uri: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -264,7 +281,6 @@ class AutomationRunbookReceiver(msrest.serialization.Model): 'runbook_name': {'required': True}, 'webhook_resource_id': {'required': True}, 'is_global_runbook': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -288,7 +304,7 @@ def __init__( self.is_global_runbook = kwargs['is_global_runbook'] self.name = kwargs.get('name', None) self.service_uri = kwargs.get('service_uri', None) - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) class AzureAppPushReceiver(msrest.serialization.Model): @@ -336,7 +352,7 @@ class AzureFunctionReceiver(msrest.serialization.Model): :type function_name: str :param http_trigger_url: Required. The http trigger url where http request sent to. :type http_trigger_url: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -345,7 +361,6 @@ class AzureFunctionReceiver(msrest.serialization.Model): 'function_app_resource_id': {'required': True}, 'function_name': {'required': True}, 'http_trigger_url': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -365,7 +380,7 @@ def __init__( self.function_app_resource_id = kwargs['function_app_resource_id'] self.function_name = kwargs['function_name'] self.http_trigger_url = kwargs['http_trigger_url'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) class BaselineMetadata(msrest.serialization.Model): @@ -410,7 +425,7 @@ class EmailReceiver(msrest.serialization.Model): :type name: str :param email_address: Required. The email address of this receiver. :type email_address: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Possible values include: "NotSpecified", "Enabled", "Disabled". @@ -420,7 +435,6 @@ class EmailReceiver(msrest.serialization.Model): _validation = { 'name': {'required': True}, 'email_address': {'required': True}, - 'use_common_alert_schema': {'required': True}, 'status': {'readonly': True}, } @@ -438,7 +452,7 @@ def __init__( super(EmailReceiver, self).__init__(**kwargs) self.name = kwargs['name'] self.email_address = kwargs['email_address'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) self.status = None @@ -551,7 +565,7 @@ class LogicAppReceiver(msrest.serialization.Model): :type resource_id: str :param callback_url: Required. The callback url where http request sent to. :type callback_url: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -559,7 +573,6 @@ class LogicAppReceiver(msrest.serialization.Model): 'name': {'required': True}, 'resource_id': {'required': True}, 'callback_url': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -577,7 +590,7 @@ def __init__( self.name = kwargs['name'] self.resource_id = kwargs['resource_id'] self.callback_url = kwargs['callback_url'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) class MetricBaselinesResponse(msrest.serialization.Model): @@ -780,8 +793,8 @@ class TimeSeriesBaseline(msrest.serialization.Model): :type timestamps: list[~datetime.datetime] :param data: Required. The baseline values for each sensitivity. :type data: list[~$(python-base-namespace).v2019_03_01.models.SingleBaseline] - :param metadata: The baseline metadata values. - :type metadata: list[~$(python-base-namespace).v2019_03_01.models.BaselineMetadata] + :param metadata_values: The baseline metadata values. + :type metadata_values: list[~$(python-base-namespace).v2019_03_01.models.BaselineMetadata] """ _validation = { @@ -795,7 +808,7 @@ class TimeSeriesBaseline(msrest.serialization.Model): 'dimensions': {'key': 'dimensions', 'type': '[MetricSingleDimension]'}, 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, 'data': {'key': 'data', 'type': '[SingleBaseline]'}, - 'metadata': {'key': 'metadata', 'type': '[BaselineMetadata]'}, + 'metadata_values': {'key': 'metadataValues', 'type': '[BaselineMetadata]'}, } def __init__( @@ -807,7 +820,7 @@ def __init__( self.dimensions = kwargs.get('dimensions', None) self.timestamps = kwargs['timestamps'] self.data = kwargs['data'] - self.metadata = kwargs.get('metadata', None) + self.metadata_values = kwargs.get('metadata_values', None) class VoiceReceiver(msrest.serialization.Model): @@ -856,14 +869,13 @@ class WebhookReceiver(msrest.serialization.Model): :type name: str :param service_uri: Required. The URI where webhooks should be sent. :type service_uri: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ _validation = { 'name': {'required': True}, 'service_uri': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -879,4 +891,4 @@ def __init__( super(WebhookReceiver, self).__init__(**kwargs) self.name = kwargs['name'] self.service_uri = kwargs['service_uri'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py index ae73ab8d590a..fcf507eee081 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/models/_models_py3.py @@ -68,7 +68,7 @@ def __init__( self.enabled = enabled -class Resource(msrest.serialization.Model): +class AzureResource(msrest.serialization.Model): """An azure resource object. Variables are only populated by the server, and will be ignored when sending a request. @@ -81,6 +81,10 @@ class Resource(msrest.serialization.Model): :vartype name: str :ivar type: Azure resource type. :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str :param location: Required. Resource location. :type location: str :param tags: A set of tags. Resource tags. @@ -91,6 +95,8 @@ class Resource(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, 'location': {'required': True}, } @@ -98,6 +104,8 @@ class Resource(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -109,15 +117,17 @@ def __init__( tags: Optional[Dict[str, str]] = None, **kwargs ): - super(Resource, self).__init__(**kwargs) + super(AzureResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None + self.kind = None + self.identity = None self.location = location self.tags = tags -class ActionGroupResource(Resource): +class ActionGroupResource(AzureResource): """An action group resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -130,6 +140,10 @@ class ActionGroupResource(Resource): :vartype name: str :ivar type: Azure resource type. :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str :param location: Required. Resource location. :type location: str :param tags: A set of tags. Resource tags. @@ -149,20 +163,20 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2019_03_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2019_03_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2019_03_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2019_03_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2019_03_01.models.AutomationRunbookReceiver] :param voice_receivers: The list of voice receivers that are part of this action group. :type voice_receivers: list[~$(python-base-namespace).v2019_03_01.models.VoiceReceiver] :param logic_app_receivers: The list of logic app receivers that are part of this action group. :type logic_app_receivers: list[~$(python-base-namespace).v2019_03_01.models.LogicAppReceiver] :param azure_function_receivers: The list of azure function receivers that are part of this action group. - :type azure_function_receivers: list[~$(python-base- - namespace).v2019_03_01.models.AzureFunctionReceiver] + :type azure_function_receivers: + list[~$(python-base-namespace).v2019_03_01.models.AzureFunctionReceiver] :param arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. :type arm_role_receivers: list[~$(python-base-namespace).v2019_03_01.models.ArmRoleReceiver] @@ -172,6 +186,8 @@ class ActionGroupResource(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, 'location': {'required': True}, 'group_short_name': {'max_length': 12, 'min_length': 0}, } @@ -180,6 +196,8 @@ class ActionGroupResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'group_short_name': {'key': 'properties.groupShortName', 'type': 'str'}, @@ -240,14 +258,13 @@ class ArmRoleReceiver(msrest.serialization.Model): :type name: str :param role_id: Required. The arm role id. :type role_id: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ _validation = { 'name': {'required': True}, 'role_id': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -261,7 +278,7 @@ def __init__( *, name: str, role_id: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(ArmRoleReceiver, self).__init__(**kwargs) @@ -288,7 +305,7 @@ class AutomationRunbookReceiver(msrest.serialization.Model): :type name: str :param service_uri: The URI where webhooks should be sent. :type service_uri: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -297,7 +314,6 @@ class AutomationRunbookReceiver(msrest.serialization.Model): 'runbook_name': {'required': True}, 'webhook_resource_id': {'required': True}, 'is_global_runbook': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -317,9 +333,9 @@ def __init__( runbook_name: str, webhook_resource_id: str, is_global_runbook: bool, - use_common_alert_schema: bool, name: Optional[str] = None, service_uri: Optional[str] = None, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(AutomationRunbookReceiver, self).__init__(**kwargs) @@ -380,7 +396,7 @@ class AzureFunctionReceiver(msrest.serialization.Model): :type function_name: str :param http_trigger_url: Required. The http trigger url where http request sent to. :type http_trigger_url: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -389,7 +405,6 @@ class AzureFunctionReceiver(msrest.serialization.Model): 'function_app_resource_id': {'required': True}, 'function_name': {'required': True}, 'http_trigger_url': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -407,7 +422,7 @@ def __init__( function_app_resource_id: str, function_name: str, http_trigger_url: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(AzureFunctionReceiver, self).__init__(**kwargs) @@ -463,7 +478,7 @@ class EmailReceiver(msrest.serialization.Model): :type name: str :param email_address: Required. The email address of this receiver. :type email_address: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Possible values include: "NotSpecified", "Enabled", "Disabled". @@ -473,7 +488,6 @@ class EmailReceiver(msrest.serialization.Model): _validation = { 'name': {'required': True}, 'email_address': {'required': True}, - 'use_common_alert_schema': {'required': True}, 'status': {'readonly': True}, } @@ -489,7 +503,7 @@ def __init__( *, name: str, email_address: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(EmailReceiver, self).__init__(**kwargs) @@ -619,7 +633,7 @@ class LogicAppReceiver(msrest.serialization.Model): :type resource_id: str :param callback_url: Required. The callback url where http request sent to. :type callback_url: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -627,7 +641,6 @@ class LogicAppReceiver(msrest.serialization.Model): 'name': {'required': True}, 'resource_id': {'required': True}, 'callback_url': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -643,7 +656,7 @@ def __init__( name: str, resource_id: str, callback_url: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(LogicAppReceiver, self).__init__(**kwargs) @@ -874,8 +887,8 @@ class TimeSeriesBaseline(msrest.serialization.Model): :type timestamps: list[~datetime.datetime] :param data: Required. The baseline values for each sensitivity. :type data: list[~$(python-base-namespace).v2019_03_01.models.SingleBaseline] - :param metadata: The baseline metadata values. - :type metadata: list[~$(python-base-namespace).v2019_03_01.models.BaselineMetadata] + :param metadata_values: The baseline metadata values. + :type metadata_values: list[~$(python-base-namespace).v2019_03_01.models.BaselineMetadata] """ _validation = { @@ -889,7 +902,7 @@ class TimeSeriesBaseline(msrest.serialization.Model): 'dimensions': {'key': 'dimensions', 'type': '[MetricSingleDimension]'}, 'timestamps': {'key': 'timestamps', 'type': '[iso-8601]'}, 'data': {'key': 'data', 'type': '[SingleBaseline]'}, - 'metadata': {'key': 'metadata', 'type': '[BaselineMetadata]'}, + 'metadata_values': {'key': 'metadataValues', 'type': '[BaselineMetadata]'}, } def __init__( @@ -899,7 +912,7 @@ def __init__( timestamps: List[datetime.datetime], data: List["SingleBaseline"], dimensions: Optional[List["MetricSingleDimension"]] = None, - metadata: Optional[List["BaselineMetadata"]] = None, + metadata_values: Optional[List["BaselineMetadata"]] = None, **kwargs ): super(TimeSeriesBaseline, self).__init__(**kwargs) @@ -907,7 +920,7 @@ def __init__( self.dimensions = dimensions self.timestamps = timestamps self.data = data - self.metadata = metadata + self.metadata_values = metadata_values class VoiceReceiver(msrest.serialization.Model): @@ -960,14 +973,13 @@ class WebhookReceiver(msrest.serialization.Model): :type name: str :param service_uri: Required. The URI where webhooks should be sent. :type service_uri: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ _validation = { 'name': {'required': True}, 'service_uri': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -981,7 +993,7 @@ def __init__( *, name: str, service_uri: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(WebhookReceiver, self).__init__(**kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py index c9fbe20773ce..7be428a47714 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_action_groups_operations.py @@ -80,7 +80,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -148,7 +148,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -166,7 +166,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -208,7 +208,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -226,7 +226,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -267,7 +267,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -291,7 +291,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -331,7 +331,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -359,7 +359,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -403,7 +403,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -431,7 +431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -478,7 +478,7 @@ def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -500,7 +500,7 @@ def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py index 694d1ae0d6c6..d880d7505e7b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_03_01/operations/_baselines_operations.py @@ -64,7 +64,9 @@ def list( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param metricnames: The names of the metrics (comma separated) to retrieve. + :param metricnames: The names of the metrics (comma separated) to retrieve. Special case: If a + metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be + **'Metric%2Name1'**. :type metricnames: str :param metricnamespace: Metric namespace to query metric definitions for. :type metricnamespace: str @@ -77,15 +79,18 @@ def list( :type aggregation: str :param sensitivities: The list of sensitivities (comma separated) to retrieve. :type sensitivities: str - :param filter: The **$filter** is used to reduce the set of metric data - returned.:code:`
`Example::code:`
`Metric contains metadata A, B and C.:code:`
`- - Return all time series of C where A = a1 and B = b1 or b2:code:`
`\ **$filter=A eq ‘a1’ and - B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**\ :code:`
`- Invalid variant::code:`
`\ **$filter=A - eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**\ :code:`
`This is invalid because the - logical or operator cannot separate two different metadata names.:code:`
`- Return all time - series where A = a1, B = b1 and C = c1::code:`
`\ **$filter=A eq ‘a1’ and B eq ‘b1’ and C eq - ‘c1’**\ :code:`
`- Return all time series where A = a1:code:`
`\ **$filter=A eq ‘a1’ and - B eq ‘\ *’ and C eq ‘*\ ’**. + :param filter: The **$filter** is used to reduce the set of metric data returned. Example: + Metric contains metadata A, B and C. - Return all time series of C where A = a1 and B = b1 or + b2 **$filter=A eq 'a1' and B eq 'b1' or B eq 'b2' and C eq '*'** - Invalid variant: **$filter=A + eq 'a1' and B eq 'b1' and C eq '*' or B = 'b2'** This is invalid because the logical or + operator cannot separate two different metadata names. - Return all time series where A = a1, B + = b1 and C = c1: **$filter=A eq 'a1' and B eq 'b1' and C eq 'c1'** - Return all time series + where A = a1 **$filter=A eq 'a1' and B eq '\ *' and C eq '*\ '**. Special case: When dimension + name or dimension value uses round brackets. Eg: When dimension name is **dim (test) 1** + Instead of using $filter= "dim (test) 1 eq '\ *' " use **$filter= "dim %2528test%2529 1 eq '*\ + ' "\ ** When dimension name is **\ dim (test) 3\ ** and dimension value is **\ dim3 (test) val\ + ** Instead of using $filter= "dim (test) 3 eq 'dim3 (test) val' " use **\ $filter= "dim + %2528test%2529 3 eq 'dim3 %2528test%2529 val' "**. :type filter: str :param result_type: Allows retrieving only metadata of the baseline. On data request all information is retrieved. @@ -156,7 +161,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -165,4 +170,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/{resourceUri}/providers/microsoft.insights/metricBaselines'} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/metricBaselines'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py index 986ddf51548a..21e5e61b754a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_metadata.json index b08a44abb8ea..5e2ddffbca2b 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,41 +23,81 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "action_groups": "ActionGroupsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_management_client.py index 8602679e95fb..aa90ea634327 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ActionGroupsOperations @@ -29,7 +30,7 @@ class MonitorManagementClient(object): :vartype action_groups: $(python-base-namespace).v2019_06_01.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -55,6 +56,24 @@ def __init__( self.action_groups = ActionGroupsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py index 5a6acb7a7c8e..95f4e81a04ba 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_management_client.py index defe4fa3c721..e23a7c650d22 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -27,7 +28,7 @@ class MonitorManagementClient(object): :vartype action_groups: $(python-base-namespace).v2019_06_01.aio.operations.ActionGroupsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -52,6 +53,23 @@ def __init__( self.action_groups = ActionGroupsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py index 234fd4de0997..2920b224b86a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/aio/operations/_action_groups_operations.py @@ -46,7 +46,7 @@ async def create_or_update( resource_group_name: str, action_group_name: str, action_group: "_models.ActionGroupResource", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Create a new action group or update an existing one. @@ -75,7 +75,7 @@ async def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +97,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -116,7 +116,7 @@ async def get( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Get an action group. @@ -142,7 +142,7 @@ async def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -160,7 +160,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -175,7 +175,7 @@ async def delete( self, resource_group_name: str, action_group_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete an action group. @@ -201,7 +201,7 @@ async def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -219,7 +219,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -232,7 +232,7 @@ async def update( resource_group_name: str, action_group_name: str, action_group_patch: "_models.ActionGroupPatchBody", - **kwargs + **kwargs: Any ) -> "_models.ActionGroupResource": """Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. @@ -259,7 +259,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -283,7 +283,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -296,7 +296,7 @@ async def update( def list_by_subscription_id( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a subscription. @@ -322,7 +322,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -350,7 +350,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -364,7 +364,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ActionGroupList"]: """Get a list of all action groups in a resource group. @@ -393,7 +393,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -421,7 +421,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -437,7 +437,7 @@ async def enable_receiver( resource_group_name: str, action_group_name: str, enable_request: "_models.EnableRequest", - **kwargs + **kwargs: Any ) -> None: """Enable a receiver in an action group. This changes the receiver's status from Disabled to Enabled. This operation is only supported for Email or SMS receivers. @@ -467,7 +467,7 @@ async def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -489,7 +489,7 @@ async def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/__init__.py index 8b63784e2053..c88038080b95 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/__init__.py @@ -14,12 +14,12 @@ from ._models_py3 import AutomationRunbookReceiver from ._models_py3 import AzureAppPushReceiver from ._models_py3 import AzureFunctionReceiver + from ._models_py3 import AzureResource from ._models_py3 import EmailReceiver from ._models_py3 import EnableRequest from ._models_py3 import ErrorResponse from ._models_py3 import ItsmReceiver from ._models_py3 import LogicAppReceiver - from ._models_py3 import Resource from ._models_py3 import SmsReceiver from ._models_py3 import VoiceReceiver from ._models_py3 import WebhookReceiver @@ -31,12 +31,12 @@ from ._models import AutomationRunbookReceiver # type: ignore from ._models import AzureAppPushReceiver # type: ignore from ._models import AzureFunctionReceiver # type: ignore + from ._models import AzureResource # type: ignore from ._models import EmailReceiver # type: ignore from ._models import EnableRequest # type: ignore from ._models import ErrorResponse # type: ignore from ._models import ItsmReceiver # type: ignore from ._models import LogicAppReceiver # type: ignore - from ._models import Resource # type: ignore from ._models import SmsReceiver # type: ignore from ._models import VoiceReceiver # type: ignore from ._models import WebhookReceiver # type: ignore @@ -53,12 +53,12 @@ 'AutomationRunbookReceiver', 'AzureAppPushReceiver', 'AzureFunctionReceiver', + 'AzureResource', 'EmailReceiver', 'EnableRequest', 'ErrorResponse', 'ItsmReceiver', 'LogicAppReceiver', - 'Resource', 'SmsReceiver', 'VoiceReceiver', 'WebhookReceiver', diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models.py index a1dbf1f2dd93..a23a384c9d9c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models.py @@ -57,7 +57,7 @@ def __init__( self.enabled = kwargs.get('enabled', True) -class Resource(msrest.serialization.Model): +class AzureResource(msrest.serialization.Model): """An azure resource object. Variables are only populated by the server, and will be ignored when sending a request. @@ -70,6 +70,10 @@ class Resource(msrest.serialization.Model): :vartype name: str :ivar type: Azure resource type. :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str :param location: Required. Resource location. :type location: str :param tags: A set of tags. Resource tags. @@ -80,6 +84,8 @@ class Resource(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, 'location': {'required': True}, } @@ -87,6 +93,8 @@ class Resource(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -95,15 +103,17 @@ def __init__( self, **kwargs ): - super(Resource, self).__init__(**kwargs) + super(AzureResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None + self.kind = None + self.identity = None self.location = kwargs['location'] self.tags = kwargs.get('tags', None) -class ActionGroupResource(Resource): +class ActionGroupResource(AzureResource): """An action group resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -116,6 +126,10 @@ class ActionGroupResource(Resource): :vartype name: str :ivar type: Azure resource type. :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str :param location: Required. Resource location. :type location: str :param tags: A set of tags. Resource tags. @@ -135,20 +149,20 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2019_06_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2019_06_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2019_06_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2019_06_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2019_06_01.models.AutomationRunbookReceiver] :param voice_receivers: The list of voice receivers that are part of this action group. :type voice_receivers: list[~$(python-base-namespace).v2019_06_01.models.VoiceReceiver] :param logic_app_receivers: The list of logic app receivers that are part of this action group. :type logic_app_receivers: list[~$(python-base-namespace).v2019_06_01.models.LogicAppReceiver] :param azure_function_receivers: The list of azure function receivers that are part of this action group. - :type azure_function_receivers: list[~$(python-base- - namespace).v2019_06_01.models.AzureFunctionReceiver] + :type azure_function_receivers: + list[~$(python-base-namespace).v2019_06_01.models.AzureFunctionReceiver] :param arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. :type arm_role_receivers: list[~$(python-base-namespace).v2019_06_01.models.ArmRoleReceiver] @@ -158,6 +172,8 @@ class ActionGroupResource(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, 'location': {'required': True}, 'group_short_name': {'max_length': 12, 'min_length': 0}, } @@ -166,6 +182,8 @@ class ActionGroupResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'group_short_name': {'key': 'properties.groupShortName', 'type': 'str'}, @@ -211,14 +229,13 @@ class ArmRoleReceiver(msrest.serialization.Model): :type name: str :param role_id: Required. The arm role id. :type role_id: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ _validation = { 'name': {'required': True}, 'role_id': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -234,7 +251,7 @@ def __init__( super(ArmRoleReceiver, self).__init__(**kwargs) self.name = kwargs['name'] self.role_id = kwargs['role_id'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) class AutomationRunbookReceiver(msrest.serialization.Model): @@ -255,7 +272,7 @@ class AutomationRunbookReceiver(msrest.serialization.Model): :type name: str :param service_uri: The URI where webhooks should be sent. :type service_uri: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -264,7 +281,6 @@ class AutomationRunbookReceiver(msrest.serialization.Model): 'runbook_name': {'required': True}, 'webhook_resource_id': {'required': True}, 'is_global_runbook': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -288,7 +304,7 @@ def __init__( self.is_global_runbook = kwargs['is_global_runbook'] self.name = kwargs.get('name', None) self.service_uri = kwargs.get('service_uri', None) - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) class AzureAppPushReceiver(msrest.serialization.Model): @@ -336,7 +352,7 @@ class AzureFunctionReceiver(msrest.serialization.Model): :type function_name: str :param http_trigger_url: Required. The http trigger url where http request sent to. :type http_trigger_url: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -345,7 +361,6 @@ class AzureFunctionReceiver(msrest.serialization.Model): 'function_app_resource_id': {'required': True}, 'function_name': {'required': True}, 'http_trigger_url': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -365,7 +380,7 @@ def __init__( self.function_app_resource_id = kwargs['function_app_resource_id'] self.function_name = kwargs['function_name'] self.http_trigger_url = kwargs['http_trigger_url'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) class EmailReceiver(msrest.serialization.Model): @@ -380,7 +395,7 @@ class EmailReceiver(msrest.serialization.Model): :type name: str :param email_address: Required. The email address of this receiver. :type email_address: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Possible values include: "NotSpecified", "Enabled", "Disabled". @@ -390,7 +405,6 @@ class EmailReceiver(msrest.serialization.Model): _validation = { 'name': {'required': True}, 'email_address': {'required': True}, - 'use_common_alert_schema': {'required': True}, 'status': {'readonly': True}, } @@ -408,7 +422,7 @@ def __init__( super(EmailReceiver, self).__init__(**kwargs) self.name = kwargs['name'] self.email_address = kwargs['email_address'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) self.status = None @@ -521,7 +535,7 @@ class LogicAppReceiver(msrest.serialization.Model): :type resource_id: str :param callback_url: Required. The callback url where http request sent to. :type callback_url: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -529,7 +543,6 @@ class LogicAppReceiver(msrest.serialization.Model): 'name': {'required': True}, 'resource_id': {'required': True}, 'callback_url': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -547,7 +560,7 @@ def __init__( self.name = kwargs['name'] self.resource_id = kwargs['resource_id'] self.callback_url = kwargs['callback_url'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) class SmsReceiver(msrest.serialization.Model): @@ -640,7 +653,7 @@ class WebhookReceiver(msrest.serialization.Model): :type name: str :param service_uri: Required. The URI where webhooks should be sent. :type service_uri: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool :param use_aad_auth: Indicates whether or not use AAD authentication. :type use_aad_auth: bool @@ -655,7 +668,6 @@ class WebhookReceiver(msrest.serialization.Model): _validation = { 'name': {'required': True}, 'service_uri': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -675,7 +687,7 @@ def __init__( super(WebhookReceiver, self).__init__(**kwargs) self.name = kwargs['name'] self.service_uri = kwargs['service_uri'] - self.use_common_alert_schema = kwargs['use_common_alert_schema'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) self.use_aad_auth = kwargs.get('use_aad_auth', False) self.object_id = kwargs.get('object_id', None) self.identifier_uri = kwargs.get('identifier_uri', None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models_py3.py index 7c37fa922804..5d5c8528ce62 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/models/_models_py3.py @@ -65,7 +65,7 @@ def __init__( self.enabled = enabled -class Resource(msrest.serialization.Model): +class AzureResource(msrest.serialization.Model): """An azure resource object. Variables are only populated by the server, and will be ignored when sending a request. @@ -78,6 +78,10 @@ class Resource(msrest.serialization.Model): :vartype name: str :ivar type: Azure resource type. :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str :param location: Required. Resource location. :type location: str :param tags: A set of tags. Resource tags. @@ -88,6 +92,8 @@ class Resource(msrest.serialization.Model): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, 'location': {'required': True}, } @@ -95,6 +101,8 @@ class Resource(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -106,15 +114,17 @@ def __init__( tags: Optional[Dict[str, str]] = None, **kwargs ): - super(Resource, self).__init__(**kwargs) + super(AzureResource, self).__init__(**kwargs) self.id = None self.name = None self.type = None + self.kind = None + self.identity = None self.location = location self.tags = tags -class ActionGroupResource(Resource): +class ActionGroupResource(AzureResource): """An action group resource. Variables are only populated by the server, and will be ignored when sending a request. @@ -127,6 +137,10 @@ class ActionGroupResource(Resource): :vartype name: str :ivar type: Azure resource type. :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str :param location: Required. Resource location. :type location: str :param tags: A set of tags. Resource tags. @@ -146,20 +160,20 @@ class ActionGroupResource(Resource): :type itsm_receivers: list[~$(python-base-namespace).v2019_06_01.models.ItsmReceiver] :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this action group. - :type azure_app_push_receivers: list[~$(python-base- - namespace).v2019_06_01.models.AzureAppPushReceiver] + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2019_06_01.models.AzureAppPushReceiver] :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of this action group. - :type automation_runbook_receivers: list[~$(python-base- - namespace).v2019_06_01.models.AutomationRunbookReceiver] + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2019_06_01.models.AutomationRunbookReceiver] :param voice_receivers: The list of voice receivers that are part of this action group. :type voice_receivers: list[~$(python-base-namespace).v2019_06_01.models.VoiceReceiver] :param logic_app_receivers: The list of logic app receivers that are part of this action group. :type logic_app_receivers: list[~$(python-base-namespace).v2019_06_01.models.LogicAppReceiver] :param azure_function_receivers: The list of azure function receivers that are part of this action group. - :type azure_function_receivers: list[~$(python-base- - namespace).v2019_06_01.models.AzureFunctionReceiver] + :type azure_function_receivers: + list[~$(python-base-namespace).v2019_06_01.models.AzureFunctionReceiver] :param arm_role_receivers: The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. :type arm_role_receivers: list[~$(python-base-namespace).v2019_06_01.models.ArmRoleReceiver] @@ -169,6 +183,8 @@ class ActionGroupResource(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, 'location': {'required': True}, 'group_short_name': {'max_length': 12, 'min_length': 0}, } @@ -177,6 +193,8 @@ class ActionGroupResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'group_short_name': {'key': 'properties.groupShortName', 'type': 'str'}, @@ -237,14 +255,13 @@ class ArmRoleReceiver(msrest.serialization.Model): :type name: str :param role_id: Required. The arm role id. :type role_id: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ _validation = { 'name': {'required': True}, 'role_id': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -258,7 +275,7 @@ def __init__( *, name: str, role_id: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(ArmRoleReceiver, self).__init__(**kwargs) @@ -285,7 +302,7 @@ class AutomationRunbookReceiver(msrest.serialization.Model): :type name: str :param service_uri: The URI where webhooks should be sent. :type service_uri: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -294,7 +311,6 @@ class AutomationRunbookReceiver(msrest.serialization.Model): 'runbook_name': {'required': True}, 'webhook_resource_id': {'required': True}, 'is_global_runbook': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -314,9 +330,9 @@ def __init__( runbook_name: str, webhook_resource_id: str, is_global_runbook: bool, - use_common_alert_schema: bool, name: Optional[str] = None, service_uri: Optional[str] = None, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(AutomationRunbookReceiver, self).__init__(**kwargs) @@ -377,7 +393,7 @@ class AzureFunctionReceiver(msrest.serialization.Model): :type function_name: str :param http_trigger_url: Required. The http trigger url where http request sent to. :type http_trigger_url: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -386,7 +402,6 @@ class AzureFunctionReceiver(msrest.serialization.Model): 'function_app_resource_id': {'required': True}, 'function_name': {'required': True}, 'http_trigger_url': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -404,7 +419,7 @@ def __init__( function_app_resource_id: str, function_name: str, http_trigger_url: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(AzureFunctionReceiver, self).__init__(**kwargs) @@ -427,7 +442,7 @@ class EmailReceiver(msrest.serialization.Model): :type name: str :param email_address: Required. The email address of this receiver. :type email_address: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool :ivar status: The receiver status of the e-mail. Possible values include: "NotSpecified", "Enabled", "Disabled". @@ -437,7 +452,6 @@ class EmailReceiver(msrest.serialization.Model): _validation = { 'name': {'required': True}, 'email_address': {'required': True}, - 'use_common_alert_schema': {'required': True}, 'status': {'readonly': True}, } @@ -453,7 +467,7 @@ def __init__( *, name: str, email_address: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(EmailReceiver, self).__init__(**kwargs) @@ -583,7 +597,7 @@ class LogicAppReceiver(msrest.serialization.Model): :type resource_id: str :param callback_url: Required. The callback url where http request sent to. :type callback_url: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool """ @@ -591,7 +605,6 @@ class LogicAppReceiver(msrest.serialization.Model): 'name': {'required': True}, 'resource_id': {'required': True}, 'callback_url': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -607,7 +620,7 @@ def __init__( name: str, resource_id: str, callback_url: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, **kwargs ): super(LogicAppReceiver, self).__init__(**kwargs) @@ -715,7 +728,7 @@ class WebhookReceiver(msrest.serialization.Model): :type name: str :param service_uri: Required. The URI where webhooks should be sent. :type service_uri: str - :param use_common_alert_schema: Required. Indicates whether to use common alert schema. + :param use_common_alert_schema: Indicates whether to use common alert schema. :type use_common_alert_schema: bool :param use_aad_auth: Indicates whether or not use AAD authentication. :type use_aad_auth: bool @@ -730,7 +743,6 @@ class WebhookReceiver(msrest.serialization.Model): _validation = { 'name': {'required': True}, 'service_uri': {'required': True}, - 'use_common_alert_schema': {'required': True}, } _attribute_map = { @@ -748,7 +760,7 @@ def __init__( *, name: str, service_uri: str, - use_common_alert_schema: bool, + use_common_alert_schema: Optional[bool] = False, use_aad_auth: Optional[bool] = False, object_id: Optional[str] = None, identifier_uri: Optional[str] = None, diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py index 5e5beb6f7e23..cc8b99ea162a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_06_01/operations/_action_groups_operations.py @@ -80,7 +80,7 @@ def create_or_update( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -102,7 +102,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -148,7 +148,7 @@ def get( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -166,7 +166,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -208,7 +208,7 @@ def delete( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -226,7 +226,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -267,7 +267,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), } @@ -291,7 +291,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ActionGroupResource', pipeline_response) @@ -331,7 +331,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription_id.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -359,7 +359,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -403,7 +403,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -431,7 +431,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -478,7 +478,7 @@ def enable_receiver( path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -500,7 +500,7 @@ def enable_receiver( if response.status_code not in [200, 409]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py index 83a63e0eb1ca..3dad54793336 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_metadata.json index 3c2b0e3f3525..fec9dc40f6cb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,35 +23,79 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "private_link_scopes": "PrivateLinkScopesOperations", @@ -57,9 +103,5 @@ "private_link_resources": "PrivateLinkResourcesOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", "private_link_scoped_resources": "PrivateLinkScopedResourcesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_management_client.py index 17ca2fc7e5c5..fed0b405d309 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import PrivateLinkScopesOperations @@ -41,7 +42,7 @@ class MonitorManagementClient(object): :vartype private_link_scoped_resources: $(python-base-namespace).v2019_10_17.operations.PrivateLinkScopedResourcesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -76,6 +77,24 @@ def __init__( self.private_link_scoped_resources = PrivateLinkScopedResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py index 92d60a10ecc5..4579dfddfc72 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py index 21dbf08efa5c..1fce9050d8f0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -39,7 +40,7 @@ class MonitorManagementClient(object): :vartype private_link_scoped_resources: $(python-base-namespace).v2019_10_17.aio.operations.PrivateLinkScopedResourcesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. @@ -73,6 +74,23 @@ def __init__( self.private_link_scoped_resources = PrivateLinkScopedResourcesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py index 6737376e3138..239eddf9047e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_endpoint_connections_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, scope_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Gets a private endpoint connection. @@ -74,7 +74,7 @@ async def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -111,7 +111,7 @@ async def _create_or_update_initial( scope_name: str, private_endpoint_connection_name: str, parameters: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { @@ -125,7 +125,7 @@ async def _create_or_update_initial( # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -168,7 +168,7 @@ async def begin_create_or_update( scope_name: str, private_endpoint_connection_name: str, parameters: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Approve or reject a private endpoint connection with a given name. @@ -182,8 +182,8 @@ async def begin_create_or_update( :type parameters: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) @@ -218,7 +218,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -243,7 +243,7 @@ async def _delete_initial( resource_group_name: str, scope_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -255,7 +255,7 @@ async def _delete_initial( # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -287,7 +287,7 @@ async def begin_delete( resource_group_name: str, scope_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a private endpoint connection with a given name. @@ -299,8 +299,8 @@ async def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -331,7 +331,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -355,7 +355,7 @@ def list_by_private_link_scope( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: """Gets all private endpoint connections on a private link scope. @@ -385,7 +385,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py index bed75a78ceaf..7f2fb9820728 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_resources_operations.py @@ -45,7 +45,7 @@ def list_by_private_link_scope( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateLinkResourceListResult"]: """Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. @@ -75,7 +75,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -120,7 +120,7 @@ async def get( resource_group_name: str, scope_name: str, group_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResource": """Gets the private link resources that need to be created for a Azure Monitor PrivateLinkScope. @@ -146,7 +146,7 @@ async def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'groupName': self._serialize.url("group_name", group_name, 'str'), diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py index a5b6373e2a95..398fb3531b9f 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scope_operation_status_operations.py @@ -44,7 +44,7 @@ async def get( self, async_operation_id: str, resource_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.OperationStatus": """Get the status of an azure asynchronous operation associated with a private link scope operation. @@ -71,7 +71,7 @@ async def get( path_format_arguments = { 'asyncOperationId': self._serialize.url("async_operation_id", async_operation_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py index 54a032f85139..577349ea983d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scoped_resources_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, scope_name: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.ScopedResource": """Gets a scoped resource in a private link scope. @@ -74,7 +74,7 @@ async def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -111,7 +111,7 @@ async def _create_or_update_initial( scope_name: str, name: str, parameters: "_models.ScopedResource", - **kwargs + **kwargs: Any ) -> Optional["_models.ScopedResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ScopedResource"]] error_map = { @@ -125,7 +125,7 @@ async def _create_or_update_initial( # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -171,7 +171,7 @@ async def begin_create_or_update( scope_name: str, name: str, parameters: "_models.ScopedResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ScopedResource"]: """Approve or reject a private endpoint connection with a given name. @@ -185,8 +185,8 @@ async def begin_create_or_update( :type parameters: ~$(python-base-namespace).v2019_10_17.models.ScopedResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ScopedResource or the result of cls(response) @@ -221,7 +221,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -246,7 +246,7 @@ async def _delete_initial( resource_group_name: str, scope_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -258,7 +258,7 @@ async def _delete_initial( # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -290,7 +290,7 @@ async def begin_delete( resource_group_name: str, scope_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a private endpoint connection with a given name. @@ -302,8 +302,8 @@ async def begin_delete( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -334,7 +334,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -358,7 +358,7 @@ def list_by_private_link_scope( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScopedResourceListResult"]: """Gets all private endpoint connections on a private link scope. @@ -388,7 +388,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py index 64888edbabcb..1c9d4b02e026 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/aio/operations/_private_link_scopes_operations.py @@ -45,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AzureMonitorPrivateLinkScopeListResult"]: """Gets a list of all Azure Monitor PrivateLinkScopes within a subscription. @@ -71,7 +71,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -112,7 +112,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AzureMonitorPrivateLinkScopeListResult"]: """Gets a list of Azure Monitor PrivateLinkScopes within a resource group. @@ -141,7 +141,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -183,7 +183,7 @@ async def _delete_initial( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -196,7 +196,7 @@ async def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -225,7 +225,7 @@ async def begin_delete( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes a Azure Monitor PrivateLinkScope. @@ -235,8 +235,8 @@ async def begin_delete( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -267,7 +267,7 @@ def get_long_running_output(pipeline_response): 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -289,7 +289,7 @@ async def get( self, resource_group_name: str, scope_name: str, - **kwargs + **kwargs: Any ) -> "_models.AzureMonitorPrivateLinkScope": """Returns a Azure Monitor PrivateLinkScope. @@ -314,7 +314,7 @@ async def get( url = self.get.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -348,7 +348,7 @@ async def create_or_update( resource_group_name: str, scope_name: str, azure_monitor_private_link_scope_payload: "_models.AzureMonitorPrivateLinkScope", - **kwargs + **kwargs: Any ) -> "_models.AzureMonitorPrivateLinkScope": """Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. @@ -378,7 +378,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -420,7 +420,7 @@ async def update_tags( resource_group_name: str, scope_name: str, private_link_scope_tags: "_models.TagsResource", - **kwargs + **kwargs: Any ) -> "_models.AzureMonitorPrivateLinkScope": """Updates an existing PrivateLinkScope's tags. To update other fields use the CreateOrUpdate method. @@ -450,7 +450,7 @@ async def update_tags( url = self.update_tags.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models.py index 7372785e96dd..fbe1212940c5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models.py @@ -77,8 +77,8 @@ class AzureMonitorPrivateLinkScope(PrivateLinkScopesResource): able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. :vartype provisioning_state: str :ivar private_endpoint_connections: List of private endpoint connections. - :vartype private_endpoint_connections: list[~$(python-base- - namespace).v2019_10_17.models.PrivateEndpointConnection] + :vartype private_endpoint_connections: + list[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] """ _validation = { @@ -147,7 +147,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -204,8 +204,8 @@ class ErrorResponseCommon(ErrorResponse): :ivar details: The error details. :vartype details: list[~$(python-base-namespace).v2019_10_17.models.ErrorResponseCommon] :ivar additional_info: The error additional info. - :vartype additional_info: list[~$(python-base- - namespace).v2019_10_17.models.ErrorAdditionalInfo] + :vartype additional_info: + list[~$(python-base-namespace).v2019_10_17.models.ErrorAdditionalInfo] """ _validation = { @@ -318,8 +318,8 @@ class PrivateEndpointConnection(ProxyResource): :type private_endpoint: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. - :type private_link_service_connection_state: ~$(python-base- - namespace).v2019_10_17.models.PrivateLinkServiceConnectionStateProperty + :type private_link_service_connection_state: + ~$(python-base-namespace).v2019_10_17.models.PrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. :vartype provisioning_state: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models_py3.py index 1d69fcb6834d..a26b257a2327 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/models/_models_py3.py @@ -83,8 +83,8 @@ class AzureMonitorPrivateLinkScope(PrivateLinkScopesResource): able to read from it. Values will include Provisioning ,Succeeded, Canceled and Failed. :vartype provisioning_state: str :ivar private_endpoint_connections: List of private endpoint connections. - :vartype private_endpoint_connections: list[~$(python-base- - namespace).v2019_10_17.models.PrivateEndpointConnection] + :vartype private_endpoint_connections: + list[~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection] """ _validation = { @@ -159,7 +159,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -219,8 +219,8 @@ class ErrorResponseCommon(ErrorResponse): :ivar details: The error details. :vartype details: list[~$(python-base-namespace).v2019_10_17.models.ErrorResponseCommon] :ivar additional_info: The error additional info. - :vartype additional_info: list[~$(python-base- - namespace).v2019_10_17.models.ErrorAdditionalInfo] + :vartype additional_info: + list[~$(python-base-namespace).v2019_10_17.models.ErrorAdditionalInfo] """ _validation = { @@ -343,8 +343,8 @@ class PrivateEndpointConnection(ProxyResource): :type private_endpoint: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointProperty :param private_link_service_connection_state: Connection state of the private endpoint connection. - :type private_link_service_connection_state: ~$(python-base- - namespace).v2019_10_17.models.PrivateLinkServiceConnectionStateProperty + :type private_link_service_connection_state: + ~$(python-base-namespace).v2019_10_17.models.PrivateLinkServiceConnectionStateProperty :ivar provisioning_state: State of the private endpoint connection. :vartype provisioning_state: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py index db80c9574e45..0b05c290c9f0 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_endpoint_connections_operations.py @@ -79,7 +79,7 @@ def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -131,7 +131,7 @@ def _create_or_update_initial( # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -189,8 +189,8 @@ def begin_create_or_update( :type parameters: ~$(python-base-namespace).v2019_10_17.models.PrivateEndpointConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) @@ -225,7 +225,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -263,7 +263,7 @@ def _delete_initial( # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -308,8 +308,8 @@ def begin_delete( :type private_endpoint_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -340,7 +340,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'privateEndpointConnectionName': self._serialize.url("private_endpoint_connection_name", private_endpoint_connection_name, 'str'), @@ -395,7 +395,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py index 6620eacc112b..669f69362ef8 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_resources_operations.py @@ -80,7 +80,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -152,7 +152,7 @@ def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'groupName': self._serialize.url("group_name", group_name, 'str'), diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py index e1f637aaf3b5..e2af92cf6529 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scope_operation_status_operations.py @@ -76,7 +76,7 @@ def get( path_format_arguments = { 'asyncOperationId': self._serialize.url("async_operation_id", async_operation_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py index 7aa45cf03bd3..1766c14357ae 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scoped_resources_operations.py @@ -79,7 +79,7 @@ def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -131,7 +131,7 @@ def _create_or_update_initial( # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -192,8 +192,8 @@ def begin_create_or_update( :type parameters: ~$(python-base-namespace).v2019_10_17.models.ScopedResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ScopedResource or the result of cls(response) @@ -228,7 +228,7 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -266,7 +266,7 @@ def _delete_initial( # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -311,8 +311,8 @@ def begin_delete( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -343,7 +343,7 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), 'name': self._serialize.url("name", name, 'str'), @@ -398,7 +398,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_private_link_scope.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py index 147a41ec0f0e..814a9efd7183 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py @@ -76,7 +76,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -147,7 +147,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -203,7 +203,7 @@ def _delete_initial( url = self._delete_initial.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -243,8 +243,8 @@ def begin_delete( :type scope_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -275,7 +275,7 @@ def get_long_running_output(pipeline_response): 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } @@ -323,7 +323,7 @@ def get( url = self.get.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -388,7 +388,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -461,7 +461,7 @@ def update_tags( url = self.update_tags.metadata['url'] # type: ignore 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'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'scopeName': self._serialize.url("scope_name", scope_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py index 49e5764a1ad0..17ffb143fc7e 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_metadata.json index 9d1dbc34ccdb..2948f6d358e5 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "The ID of the target subscription.", "docstring_type": "str", "required": true @@ -42,21 +44,61 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "data_collection_rule_associations": "DataCollectionRuleAssociationsOperations", "data_collection_rules": "DataCollectionRulesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_management_client.py index 26e7eb98aa3b..4cdf02aa7cac 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import DataCollectionRuleAssociationsOperations @@ -60,6 +61,24 @@ def __init__( self.data_collection_rules = DataCollectionRulesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py index f2080febb084..77e781a7e219 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_management_client.py index 723bd1e63fee..25ca1c442b6d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -57,6 +58,23 @@ def __init__( self.data_collection_rules = DataCollectionRulesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py index b1cf0eab42bd..9cbf0246fd81 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rule_associations_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_resource( self, resource_uri: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"]: """Lists associations for the specified resource. @@ -102,7 +102,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -117,7 +117,7 @@ def list_by_rule( self, resource_group_name: str, data_collection_rule_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"]: """Lists associations for the specified data collection rule. @@ -151,8 +151,8 @@ def prepare_request(next_link=None): url = self.list_by_rule.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -180,7 +180,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -195,7 +195,7 @@ async def get( self, resource_uri: str, association_name: str, - **kwargs + **kwargs: Any ) -> "_models.DataCollectionRuleAssociationProxyOnlyResource": """Returns the specified association. @@ -203,7 +203,7 @@ async def get( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param association_name: The name of the association. + :param association_name: The name of the association. The name is case insensitive. :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) @@ -222,7 +222,7 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), - 'associationName': self._serialize.url("association_name", association_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'associationName': self._serialize.url("association_name", association_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -240,7 +240,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) @@ -256,7 +256,7 @@ async def create( resource_uri: str, association_name: str, body: Optional["_models.DataCollectionRuleAssociationProxyOnlyResource"] = None, - **kwargs + **kwargs: Any ) -> "_models.DataCollectionRuleAssociationProxyOnlyResource": """Creates or updates an association. @@ -264,7 +264,7 @@ async def create( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param association_name: The name of the association. + :param association_name: The name of the association. The name is case insensitive. :type association_name: str :param body: The payload. :type body: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource @@ -286,7 +286,7 @@ async def create( url = self.create.metadata['url'] # type: ignore path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), - 'associationName': self._serialize.url("association_name", association_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'associationName': self._serialize.url("association_name", association_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -311,7 +311,7 @@ async def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -330,7 +330,7 @@ async def delete( self, resource_uri: str, association_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an association. @@ -338,7 +338,7 @@ async def delete( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param association_name: The name of the association. + :param association_name: The name of the association. The name is case insensitive. :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -357,7 +357,7 @@ async def delete( url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), - 'associationName': self._serialize.url("association_name", association_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'associationName': self._serialize.url("association_name", association_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -375,7 +375,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py index eaa21916a40e..29bce722e889 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/aio/operations/_data_collection_rules_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DataCollectionRuleResourceListResult"]: """Lists all data collection rules in the specified resource group. @@ -75,7 +75,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -103,7 +103,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -116,7 +116,7 @@ async def get_next(next_link=None): def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DataCollectionRuleResourceListResult"]: """Lists all data collection rules in the specified subscription. @@ -172,7 +172,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -187,7 +187,7 @@ async def get( self, resource_group_name: str, data_collection_rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.DataCollectionRuleResource": """Returns the specified data collection rule. @@ -215,8 +215,8 @@ async def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -234,7 +234,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) @@ -250,7 +250,7 @@ async def create( resource_group_name: str, data_collection_rule_name: str, body: Optional["_models.DataCollectionRuleResource"] = None, - **kwargs + **kwargs: Any ) -> "_models.DataCollectionRuleResource": """Creates or updates a data collection rule. @@ -281,8 +281,8 @@ async def create( url = self.create.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -307,7 +307,7 @@ async def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -327,7 +327,7 @@ async def update( resource_group_name: str, data_collection_rule_name: str, body: Optional["_models.ResourceForUpdate"] = None, - **kwargs + **kwargs: Any ) -> "_models.DataCollectionRuleResource": """Updates part of a data collection rule. @@ -358,8 +358,8 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -384,7 +384,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) @@ -399,7 +399,7 @@ async def delete( self, resource_group_name: str, data_collection_rule_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a data collection rule. @@ -427,8 +427,8 @@ async def delete( url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -446,7 +446,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/__init__.py index 419634ac11a7..9da80ac0fffc 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/__init__.py @@ -23,12 +23,8 @@ from ._models_py3 import DestinationsSpec from ._models_py3 import DestinationsSpecAzureMonitorMetrics from ._models_py3 import ErrorAdditionalInfo - from ._models_py3 import ErrorDetails - from ._models_py3 import ErrorDetailsAutoGenerated + from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse - from ._models_py3 import ErrorResponseError - from ._models_py3 import ErrorResponseAutoGenerated - from ._models_py3 import ErrorResponseError from ._models_py3 import ExtensionDataSource from ._models_py3 import LogAnalyticsDestination from ._models_py3 import PerfCounterDataSource @@ -52,12 +48,8 @@ from ._models import DestinationsSpec # type: ignore from ._models import DestinationsSpecAzureMonitorMetrics # type: ignore from ._models import ErrorAdditionalInfo # type: ignore - from ._models import ErrorDetails # type: ignore - from ._models import ErrorDetailsAutoGenerated # type: ignore + from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore - from ._models import ErrorResponseError # type: ignore - from ._models import ErrorResponseAutoGenerated # type: ignore - from ._models import ErrorResponseError # type: ignore from ._models import ExtensionDataSource # type: ignore from ._models import LogAnalyticsDestination # type: ignore from ._models import PerfCounterDataSource # type: ignore @@ -68,14 +60,13 @@ from ._monitor_management_client_enums import ( KnownDataCollectionRuleAssociationProvisioningState, KnownDataCollectionRuleProvisioningState, + KnownDataCollectionRuleResourceKind, KnownDataFlowStreams, KnownExtensionDataSourceStreams, - KnownPerfCounterDataSourceScheduledTransferPeriod, KnownPerfCounterDataSourceStreams, KnownSyslogDataSourceFacilityNames, KnownSyslogDataSourceLogLevels, KnownSyslogDataSourceStreams, - KnownWindowsEventLogDataSourceScheduledTransferPeriod, KnownWindowsEventLogDataSourceStreams, ) @@ -96,12 +87,8 @@ 'DestinationsSpec', 'DestinationsSpecAzureMonitorMetrics', 'ErrorAdditionalInfo', - 'ErrorDetails', - 'ErrorDetailsAutoGenerated', + 'ErrorDetail', 'ErrorResponse', - 'ErrorResponseError', - 'ErrorResponseAutoGenerated', - 'ErrorResponseError', 'ExtensionDataSource', 'LogAnalyticsDestination', 'PerfCounterDataSource', @@ -110,13 +97,12 @@ 'WindowsEventLogDataSource', 'KnownDataCollectionRuleAssociationProvisioningState', 'KnownDataCollectionRuleProvisioningState', + 'KnownDataCollectionRuleResourceKind', 'KnownDataFlowStreams', 'KnownExtensionDataSourceStreams', - 'KnownPerfCounterDataSourceScheduledTransferPeriod', 'KnownPerfCounterDataSourceStreams', 'KnownSyslogDataSourceFacilityNames', 'KnownSyslogDataSourceLogLevels', 'KnownSyslogDataSourceStreams', - 'KnownWindowsEventLogDataSourceScheduledTransferPeriod', 'KnownWindowsEventLogDataSourceStreams', ] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models.py index 923fe2674a45..e5edb02c607c 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models.py @@ -13,18 +13,12 @@ class AzureMonitorMetricsDestination(msrest.serialization.Model): """Azure Monitor Metrics destination. - All required parameters must be populated in order to send to Azure. - - :param name: Required. A friendly name for the destination. + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, } @@ -34,7 +28,7 @@ def __init__( **kwargs ): super(AzureMonitorMetricsDestination, self).__init__(**kwargs) - self.name = kwargs['name'] + self.name = kwargs.get('name', None) class DataCollectionRule(msrest.serialization.Model): @@ -42,35 +36,36 @@ class DataCollectionRule(msrest.serialization.Model): 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 description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. + :type data_sources: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, - 'data_sources': {'key': 'dataSources', 'type': 'DataSourcesSpec'}, - 'destinations': {'key': 'destinations', 'type': 'DestinationsSpec'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'data_sources': {'key': 'dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'destinations', 'type': 'DataCollectionRuleDestinations'}, 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } @@ -81,9 +76,10 @@ def __init__( ): super(DataCollectionRule, self).__init__(**kwargs) self.description = kwargs.get('description', None) + self.immutable_id = None self.data_sources = kwargs.get('data_sources', None) - self.destinations = kwargs['destinations'] - self.data_flows = kwargs['data_flows'] + self.destinations = kwargs.get('destinations', None) + self.data_flows = kwargs.get('data_flows', None) self.provisioning_state = None @@ -92,22 +88,18 @@ class DataCollectionRuleAssociation(msrest.serialization.Model): 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 description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } @@ -123,7 +115,7 @@ def __init__( ): super(DataCollectionRuleAssociation, self).__init__(**kwargs) self.description = kwargs.get('description', None) - self.data_collection_rule_id = kwargs['data_collection_rule_id'] + self.data_collection_rule_id = kwargs.get('data_collection_rule_id', None) self.provisioning_state = None @@ -132,8 +124,6 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) 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. - :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -144,13 +134,13 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) :vartype etag: str :param description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -158,8 +148,6 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } @@ -183,7 +171,7 @@ def __init__( self.type = None self.etag = None self.description = kwargs.get('description', None) - self.data_collection_rule_id = kwargs['data_collection_rule_id'] + self.data_collection_rule_id = kwargs.get('data_collection_rule_id', None) self.provisioning_state = None @@ -193,8 +181,8 @@ class DataCollectionRuleAssociationProxyOnlyResourceListResult(msrest.serializat All required parameters must be populated in order to send to Azure. :param value: Required. A list of resources. - :type value: list[~$(python-base- - namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + :type value: + list[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :param next_link: The URL to use for getting the next set of results. :type next_link: str """ @@ -222,22 +210,18 @@ class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRul 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 description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } @@ -258,16 +242,16 @@ class DataSourcesSpec(msrest.serialization.Model): """Specification of data sources that will be collected. :param performance_counters: The list of performance counter data source configurations. - :type performance_counters: list[~$(python-base- - namespace).v2019_11_01_preview.models.PerfCounterDataSource] + :type performance_counters: + list[~$(python-base-namespace).v2019_11_01_preview.models.PerfCounterDataSource] :param windows_event_logs: The list of Windows Event Log data source configurations. - :type windows_event_logs: list[~$(python-base- - namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + :type windows_event_logs: + list[~$(python-base-namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] :param syslog: The list of Syslog data source configurations. :type syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] :param extensions: The list of Azure VM extension data source configurations. - :type extensions: list[~$(python-base- - namespace).v2019_11_01_preview.models.ExtensionDataSource] + :type extensions: + list[~$(python-base-namespace).v2019_11_01_preview.models.ExtensionDataSource] """ _attribute_map = { @@ -293,16 +277,16 @@ class DataCollectionRuleDataSources(DataSourcesSpec): This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :param performance_counters: The list of performance counter data source configurations. - :type performance_counters: list[~$(python-base- - namespace).v2019_11_01_preview.models.PerfCounterDataSource] + :type performance_counters: + list[~$(python-base-namespace).v2019_11_01_preview.models.PerfCounterDataSource] :param windows_event_logs: The list of Windows Event Log data source configurations. - :type windows_event_logs: list[~$(python-base- - namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + :type windows_event_logs: + list[~$(python-base-namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] :param syslog: The list of Syslog data source configurations. :type syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] :param extensions: The list of Azure VM extension data source configurations. - :type extensions: list[~$(python-base- - namespace).v2019_11_01_preview.models.ExtensionDataSource] + :type extensions: + list[~$(python-base-namespace).v2019_11_01_preview.models.ExtensionDataSource] """ _attribute_map = { @@ -323,16 +307,16 @@ class DestinationsSpec(msrest.serialization.Model): """Specification of destinations that can be used in data flows. :param log_analytics: List of Log Analytics destinations. - :type log_analytics: list[~$(python-base- - namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + :type log_analytics: + list[~$(python-base-namespace).v2019_11_01_preview.models.LogAnalyticsDestination] :param azure_monitor_metrics: Azure Monitor Metrics destination. - :type azure_monitor_metrics: ~$(python-base- - namespace).v2019_11_01_preview.models.AzureMonitorMetricsDestination + :type azure_monitor_metrics: + ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { 'log_analytics': {'key': 'logAnalytics', 'type': '[LogAnalyticsDestination]'}, - 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'AzureMonitorMetricsDestination'}, + 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'DestinationsSpecAzureMonitorMetrics'}, } def __init__( @@ -348,16 +332,16 @@ class DataCollectionRuleDestinations(DestinationsSpec): """The specification of destinations. :param log_analytics: List of Log Analytics destinations. - :type log_analytics: list[~$(python-base- - namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + :type log_analytics: + list[~$(python-base-namespace).v2019_11_01_preview.models.LogAnalyticsDestination] :param azure_monitor_metrics: Azure Monitor Metrics destination. - :type azure_monitor_metrics: ~$(python-base- - namespace).v2019_11_01_preview.models.AzureMonitorMetricsDestination + :type azure_monitor_metrics: + ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { 'log_analytics': {'key': 'logAnalytics', 'type': '[LogAnalyticsDestination]'}, - 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'AzureMonitorMetricsDestination'}, + 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'DestinationsSpecAzureMonitorMetrics'}, } def __init__( @@ -378,6 +362,9 @@ class DataCollectionRuleResource(msrest.serialization.Model): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleResourceKind :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -388,18 +375,22 @@ class DataCollectionRuleResource(msrest.serialization.Model): :vartype etag: str :param description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. + :type data_sources: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -408,22 +399,22 @@ class DataCollectionRuleResource(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, - 'data_sources': {'key': 'properties.dataSources', 'type': 'DataSourcesSpec'}, - 'destinations': {'key': 'properties.destinations', 'type': 'DestinationsSpec'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, + 'data_sources': {'key': 'properties.dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'properties.destinations', 'type': 'DataCollectionRuleDestinations'}, 'data_flows': {'key': 'properties.dataFlows', 'type': '[DataFlow]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -435,14 +426,16 @@ def __init__( super(DataCollectionRuleResource, self).__init__(**kwargs) self.location = kwargs['location'] self.tags = kwargs.get('tags', None) + self.kind = kwargs.get('kind', None) self.id = None self.name = None self.type = None self.etag = None self.description = kwargs.get('description', None) + self.immutable_id = None self.data_sources = kwargs.get('data_sources', None) - self.destinations = kwargs['destinations'] - self.data_flows = kwargs['data_flows'] + self.destinations = kwargs.get('destinations', None) + self.data_flows = kwargs.get('data_flows', None) self.provisioning_state = None @@ -452,8 +445,8 @@ class DataCollectionRuleResourceListResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param value: Required. A list of resources. - :type value: list[~$(python-base- - namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + :type value: + list[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource] :param next_link: The URL to use for getting the next set of results. :type next_link: str """ @@ -481,35 +474,36 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): 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 description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. + :type data_sources: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, - 'data_sources': {'key': 'dataSources', 'type': 'DataSourcesSpec'}, - 'destinations': {'key': 'destinations', 'type': 'DestinationsSpec'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'data_sources': {'key': 'dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'destinations', 'type': 'DataCollectionRuleDestinations'}, 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } @@ -524,20 +518,13 @@ def __init__( class DataFlow(msrest.serialization.Model): """Definition of which streams are sent to which destinations. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams for this data flow. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataFlowStreams] - :param destinations: Required. List of destinations for this data flow. + :param streams: List of streams for this data flow. + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataFlowStreams] + :param destinations: List of destinations for this data flow. :type destinations: list[str] """ - _validation = { - 'streams': {'required': True}, - 'destinations': {'required': True}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'destinations': {'key': 'destinations', 'type': '[str]'}, @@ -548,25 +535,19 @@ def __init__( **kwargs ): super(DataFlow, self).__init__(**kwargs) - self.streams = kwargs['streams'] - self.destinations = kwargs['destinations'] + self.streams = kwargs.get('streams', None) + self.destinations = kwargs.get('destinations', None) class DestinationsSpecAzureMonitorMetrics(AzureMonitorMetricsDestination): """Azure Monitor Metrics destination. - All required parameters must be populated in order to send to Azure. - - :param name: Required. A friendly name for the destination. + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, } @@ -579,14 +560,14 @@ def __init__( class ErrorAdditionalInfo(msrest.serialization.Model): - """Additional information for common error response. + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -608,71 +589,22 @@ def __init__( self.info = None -class ErrorDetails(msrest.serialization.Model): - """Common error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorDetailsAutoGenerated(msrest.serialization.Model): - """Common error details. +class ErrorDetail(msrest.serialization.Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code which can be used to programmatically identify the class of error. + :ivar code: The error code. :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. + :ivar message: The error message. :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). + :ivar target: The error target. :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorDetailsAutoGenerated] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] + :ivar details: The error details. + :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -687,7 +619,7 @@ class ErrorDetailsAutoGenerated(msrest.serialization.Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsAutoGenerated]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } @@ -695,7 +627,7 @@ def __init__( self, **kwargs ): - super(ErrorDetailsAutoGenerated, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -704,20 +636,14 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """Common error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: Error details. - :vartype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails + :param error: The error object. + :type error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetail """ - _validation = { - 'error': {'readonly': True}, - } - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( @@ -725,117 +651,7 @@ def __init__( **kwargs ): super(ErrorResponse, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseError(ErrorDetailsAutoGenerated): - """Error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorDetailsAutoGenerated] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsAutoGenerated]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseError, self).__init__(**kwargs) - - -class ErrorResponseAutoGenerated(msrest.serialization.Model): - """Common error response. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: Error details. - :vartype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetailsAutoGenerated - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetailsAutoGenerated'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseAutoGenerated, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseError(ErrorDetails): - """Error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseError, self).__init__(**kwargs) + self.error = kwargs.get('error', None) class ExtensionDataSource(msrest.serialization.Model): @@ -844,32 +660,33 @@ class ExtensionDataSource(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownExtensionDataSourceStreams] + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownExtensionDataSourceStreams] :param extension_name: Required. The name of the VM extension. :type extension_name: str :param extension_settings: The extension settings. The format is specific for particular extension. - :type extension_settings: object - :param name: Required. A friendly name for the data source. + :type extension_settings: any + :param input_data_sources: The list of data sources this extension needs data from. + :type input_data_sources: list[str] + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ _validation = { - 'streams': {'required': True}, - 'extension_name': {'required': True, 'max_length': 64, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'extension_name': {'required': True}, } _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'extension_name': {'key': 'extensionName', 'type': 'str'}, 'extension_settings': {'key': 'extensionSettings', 'type': 'object'}, + 'input_data_sources': {'key': 'inputDataSources', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, } @@ -878,32 +695,35 @@ def __init__( **kwargs ): super(ExtensionDataSource, self).__init__(**kwargs) - self.streams = kwargs['streams'] + self.streams = kwargs.get('streams', None) self.extension_name = kwargs['extension_name'] self.extension_settings = kwargs.get('extension_settings', None) - self.name = kwargs['name'] + self.input_data_sources = kwargs.get('input_data_sources', None) + self.name = kwargs.get('name', None) class LogAnalyticsDestination(msrest.serialization.Model): """Log Analytics destination. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param workspace_resource_id: Required. The resource ID of the Log Analytics workspace. + :param workspace_resource_id: The resource ID of the Log Analytics workspace. :type workspace_resource_id: str - :param name: Required. A friendly name for the destination. + :ivar workspace_id: The Customer ID of the Log Analytics workspace. + :vartype workspace_id: str + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ _validation = { - 'workspace_resource_id': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'workspace_id': {'readonly': True}, } _attribute_map = { 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, } @@ -912,51 +732,36 @@ def __init__( **kwargs ): super(LogAnalyticsDestination, self).__init__(**kwargs) - self.workspace_resource_id = kwargs['workspace_resource_id'] - self.name = kwargs['name'] + self.workspace_resource_id = kwargs.get('workspace_resource_id', None) + self.workspace_id = None + self.name = kwargs.get('name', None) class PerfCounterDataSource(msrest.serialization.Model): """Definition of which performance counters will be collected and how they will be collected by this data collection rule. Collected from both Windows and Linux machines where the counter is present. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] - :param scheduled_transfer_period: Required. The interval between data uploads (scheduled - transfers), rounded up to the nearest minute. Possible values include: "PT1M", "PT5M", "PT15M", - "PT30M", "PT60M". - :type scheduled_transfer_period: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceScheduledTransferPeriod - :param sampling_frequency_in_seconds: Required. The number of seconds between consecutive - counter measurements (samples). + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] + :param sampling_frequency_in_seconds: The number of seconds between consecutive counter + measurements (samples). :type sampling_frequency_in_seconds: int - :param counter_specifiers: Required. A list of specifier names of the performance counters you - want to collect. + :param counter_specifiers: A list of specifier names of the performance counters you want to + collect. Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run the command 'typeperf'. :type counter_specifiers: list[str] - :param name: Required. A friendly name for the data source. + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'scheduled_transfer_period': {'required': True}, - 'sampling_frequency_in_seconds': {'required': True, 'maximum': 30, 'minimum': 1}, - 'counter_specifiers': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, - 'scheduled_transfer_period': {'key': 'scheduledTransferPeriod', 'type': 'str'}, 'sampling_frequency_in_seconds': {'key': 'samplingFrequencyInSeconds', 'type': 'int'}, 'counter_specifiers': {'key': 'counterSpecifiers', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, @@ -967,11 +772,10 @@ def __init__( **kwargs ): super(PerfCounterDataSource, self).__init__(**kwargs) - self.streams = kwargs['streams'] - self.scheduled_transfer_period = kwargs['scheduled_transfer_period'] - self.sampling_frequency_in_seconds = kwargs['sampling_frequency_in_seconds'] - self.counter_specifiers = kwargs['counter_specifiers'] - self.name = kwargs['name'] + self.streams = kwargs.get('streams', None) + self.sampling_frequency_in_seconds = kwargs.get('sampling_frequency_in_seconds', None) + self.counter_specifiers = kwargs.get('counter_specifiers', None) + self.name = kwargs.get('name', None) class ResourceForUpdate(msrest.serialization.Model): @@ -997,31 +801,23 @@ class SyslogDataSource(msrest.serialization.Model): """Definition of which syslog data will be collected and how it will be collected. Only collected from Linux machines. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceStreams] - :param facility_names: Required. The list of facility names. - :type facility_names: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceStreams] + :param facility_names: The list of facility names. + :type facility_names: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] :param log_levels: The log levels to collect. - :type log_levels: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] - :param name: Required. A friendly name for the data source. + :type log_levels: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'facility_names': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'facility_names': {'key': 'facilityNames', 'type': '[str]'}, @@ -1034,46 +830,31 @@ def __init__( **kwargs ): super(SyslogDataSource, self).__init__(**kwargs) - self.streams = kwargs['streams'] - self.facility_names = kwargs['facility_names'] + self.streams = kwargs.get('streams', None) + self.facility_names = kwargs.get('facility_names', None) self.log_levels = kwargs.get('log_levels', None) - self.name = kwargs['name'] + self.name = kwargs.get('name', None) class WindowsEventLogDataSource(msrest.serialization.Model): """Definition of which Windows Event Log events will be collected and how they will be collected. Only collected from Windows machines. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] - :param scheduled_transfer_period: Required. The interval between data uploads (scheduled - transfers), rounded up to the nearest minute. Possible values include: "PT1M", "PT5M", "PT15M", - "PT30M", "PT60M". - :type scheduled_transfer_period: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceScheduledTransferPeriod - :param x_path_queries: Required. A list of Windows Event Log queries in XPATH format. + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] + :param x_path_queries: A list of Windows Event Log queries in XPATH format. :type x_path_queries: list[str] - :param name: Required. A friendly name for the data source. + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'scheduled_transfer_period': {'required': True}, - 'x_path_queries': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, - 'scheduled_transfer_period': {'key': 'scheduledTransferPeriod', 'type': 'str'}, 'x_path_queries': {'key': 'xPathQueries', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, } @@ -1083,7 +864,6 @@ def __init__( **kwargs ): super(WindowsEventLogDataSource, self).__init__(**kwargs) - self.streams = kwargs['streams'] - self.scheduled_transfer_period = kwargs['scheduled_transfer_period'] - self.x_path_queries = kwargs['x_path_queries'] - self.name = kwargs['name'] + self.streams = kwargs.get('streams', None) + self.x_path_queries = kwargs.get('x_path_queries', None) + self.name = kwargs.get('name', None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models_py3.py index e3fcfe85a32a..44aff14895f6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_models_py3.py @@ -6,7 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -17,18 +17,12 @@ class AzureMonitorMetricsDestination(msrest.serialization.Model): """Azure Monitor Metrics destination. - All required parameters must be populated in order to send to Azure. - - :param name: Required. A friendly name for the destination. + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, } @@ -36,7 +30,7 @@ class AzureMonitorMetricsDestination(msrest.serialization.Model): def __init__( self, *, - name: str, + name: Optional[str] = None, **kwargs ): super(AzureMonitorMetricsDestination, self).__init__(**kwargs) @@ -48,35 +42,36 @@ class DataCollectionRule(msrest.serialization.Model): 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 description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. + :type data_sources: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, - 'data_sources': {'key': 'dataSources', 'type': 'DataSourcesSpec'}, - 'destinations': {'key': 'destinations', 'type': 'DestinationsSpec'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'data_sources': {'key': 'dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'destinations', 'type': 'DataCollectionRuleDestinations'}, 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } @@ -84,14 +79,15 @@ class DataCollectionRule(msrest.serialization.Model): def __init__( self, *, - destinations: "DestinationsSpec", - data_flows: List["DataFlow"], description: Optional[str] = None, - data_sources: Optional["DataSourcesSpec"] = None, + data_sources: Optional["DataCollectionRuleDataSources"] = None, + destinations: Optional["DataCollectionRuleDestinations"] = None, + data_flows: Optional[List["DataFlow"]] = None, **kwargs ): super(DataCollectionRule, self).__init__(**kwargs) self.description = description + self.immutable_id = None self.data_sources = data_sources self.destinations = destinations self.data_flows = data_flows @@ -103,22 +99,18 @@ class DataCollectionRuleAssociation(msrest.serialization.Model): 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 description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } @@ -131,8 +123,8 @@ class DataCollectionRuleAssociation(msrest.serialization.Model): def __init__( self, *, - data_collection_rule_id: str, description: Optional[str] = None, + data_collection_rule_id: Optional[str] = None, **kwargs ): super(DataCollectionRuleAssociation, self).__init__(**kwargs) @@ -146,8 +138,6 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) 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. - :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -158,13 +148,13 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) :vartype etag: str :param description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { @@ -172,8 +162,6 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } @@ -190,8 +178,8 @@ class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model) def __init__( self, *, - data_collection_rule_id: str, description: Optional[str] = None, + data_collection_rule_id: Optional[str] = None, **kwargs ): super(DataCollectionRuleAssociationProxyOnlyResource, self).__init__(**kwargs) @@ -210,8 +198,8 @@ class DataCollectionRuleAssociationProxyOnlyResourceListResult(msrest.serializat All required parameters must be populated in order to send to Azure. :param value: Required. A list of resources. - :type value: list[~$(python-base- - namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] + :type value: + list[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource] :param next_link: The URL to use for getting the next set of results. :type next_link: str """ @@ -242,22 +230,18 @@ class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRul 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 description: Description of the association. :type description: str - :param data_collection_rule_id: Required. The resource ID of the data collection rule that is - to be associated. + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. :type data_collection_rule_id: str :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleAssociationProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'data_collection_rule_id': {'required': True}, 'provisioning_state': {'readonly': True}, } @@ -270,8 +254,8 @@ class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRul def __init__( self, *, - data_collection_rule_id: str, description: Optional[str] = None, + data_collection_rule_id: Optional[str] = None, **kwargs ): super(DataCollectionRuleAssociationProxyOnlyResourceProperties, self).__init__(description=description, data_collection_rule_id=data_collection_rule_id, **kwargs) @@ -281,16 +265,16 @@ class DataSourcesSpec(msrest.serialization.Model): """Specification of data sources that will be collected. :param performance_counters: The list of performance counter data source configurations. - :type performance_counters: list[~$(python-base- - namespace).v2019_11_01_preview.models.PerfCounterDataSource] + :type performance_counters: + list[~$(python-base-namespace).v2019_11_01_preview.models.PerfCounterDataSource] :param windows_event_logs: The list of Windows Event Log data source configurations. - :type windows_event_logs: list[~$(python-base- - namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + :type windows_event_logs: + list[~$(python-base-namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] :param syslog: The list of Syslog data source configurations. :type syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] :param extensions: The list of Azure VM extension data source configurations. - :type extensions: list[~$(python-base- - namespace).v2019_11_01_preview.models.ExtensionDataSource] + :type extensions: + list[~$(python-base-namespace).v2019_11_01_preview.models.ExtensionDataSource] """ _attribute_map = { @@ -321,16 +305,16 @@ class DataCollectionRuleDataSources(DataSourcesSpec): This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. :param performance_counters: The list of performance counter data source configurations. - :type performance_counters: list[~$(python-base- - namespace).v2019_11_01_preview.models.PerfCounterDataSource] + :type performance_counters: + list[~$(python-base-namespace).v2019_11_01_preview.models.PerfCounterDataSource] :param windows_event_logs: The list of Windows Event Log data source configurations. - :type windows_event_logs: list[~$(python-base- - namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] + :type windows_event_logs: + list[~$(python-base-namespace).v2019_11_01_preview.models.WindowsEventLogDataSource] :param syslog: The list of Syslog data source configurations. :type syslog: list[~$(python-base-namespace).v2019_11_01_preview.models.SyslogDataSource] :param extensions: The list of Azure VM extension data source configurations. - :type extensions: list[~$(python-base- - namespace).v2019_11_01_preview.models.ExtensionDataSource] + :type extensions: + list[~$(python-base-namespace).v2019_11_01_preview.models.ExtensionDataSource] """ _attribute_map = { @@ -356,23 +340,23 @@ class DestinationsSpec(msrest.serialization.Model): """Specification of destinations that can be used in data flows. :param log_analytics: List of Log Analytics destinations. - :type log_analytics: list[~$(python-base- - namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + :type log_analytics: + list[~$(python-base-namespace).v2019_11_01_preview.models.LogAnalyticsDestination] :param azure_monitor_metrics: Azure Monitor Metrics destination. - :type azure_monitor_metrics: ~$(python-base- - namespace).v2019_11_01_preview.models.AzureMonitorMetricsDestination + :type azure_monitor_metrics: + ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { 'log_analytics': {'key': 'logAnalytics', 'type': '[LogAnalyticsDestination]'}, - 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'AzureMonitorMetricsDestination'}, + 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'DestinationsSpecAzureMonitorMetrics'}, } def __init__( self, *, log_analytics: Optional[List["LogAnalyticsDestination"]] = None, - azure_monitor_metrics: Optional["AzureMonitorMetricsDestination"] = None, + azure_monitor_metrics: Optional["DestinationsSpecAzureMonitorMetrics"] = None, **kwargs ): super(DestinationsSpec, self).__init__(**kwargs) @@ -384,23 +368,23 @@ class DataCollectionRuleDestinations(DestinationsSpec): """The specification of destinations. :param log_analytics: List of Log Analytics destinations. - :type log_analytics: list[~$(python-base- - namespace).v2019_11_01_preview.models.LogAnalyticsDestination] + :type log_analytics: + list[~$(python-base-namespace).v2019_11_01_preview.models.LogAnalyticsDestination] :param azure_monitor_metrics: Azure Monitor Metrics destination. - :type azure_monitor_metrics: ~$(python-base- - namespace).v2019_11_01_preview.models.AzureMonitorMetricsDestination + :type azure_monitor_metrics: + ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpecAzureMonitorMetrics """ _attribute_map = { 'log_analytics': {'key': 'logAnalytics', 'type': '[LogAnalyticsDestination]'}, - 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'AzureMonitorMetricsDestination'}, + 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'DestinationsSpecAzureMonitorMetrics'}, } def __init__( self, *, log_analytics: Optional[List["LogAnalyticsDestination"]] = None, - azure_monitor_metrics: Optional["AzureMonitorMetricsDestination"] = None, + azure_monitor_metrics: Optional["DestinationsSpecAzureMonitorMetrics"] = None, **kwargs ): super(DataCollectionRuleDestinations, self).__init__(log_analytics=log_analytics, azure_monitor_metrics=azure_monitor_metrics, **kwargs) @@ -417,6 +401,9 @@ class DataCollectionRuleResource(msrest.serialization.Model): :type location: str :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleResourceKind :ivar id: Fully qualified ID of the resource. :vartype id: str :ivar name: The name of the resource. @@ -427,18 +414,22 @@ class DataCollectionRuleResource(msrest.serialization.Model): :vartype etag: str :param description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. + :type data_sources: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { @@ -447,22 +438,22 @@ class DataCollectionRuleResource(msrest.serialization.Model): 'name': {'readonly': True}, 'type': {'readonly': True}, 'etag': {'readonly': True}, - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, - 'data_sources': {'key': 'properties.dataSources', 'type': 'DataSourcesSpec'}, - 'destinations': {'key': 'properties.destinations', 'type': 'DestinationsSpec'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, + 'data_sources': {'key': 'properties.dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'properties.destinations', 'type': 'DataCollectionRuleDestinations'}, 'data_flows': {'key': 'properties.dataFlows', 'type': '[DataFlow]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -471,21 +462,24 @@ def __init__( self, *, location: str, - destinations: "DestinationsSpec", - data_flows: List["DataFlow"], tags: Optional[Dict[str, str]] = None, + kind: Optional[Union[str, "KnownDataCollectionRuleResourceKind"]] = None, description: Optional[str] = None, - data_sources: Optional["DataSourcesSpec"] = None, + data_sources: Optional["DataCollectionRuleDataSources"] = None, + destinations: Optional["DataCollectionRuleDestinations"] = None, + data_flows: Optional[List["DataFlow"]] = None, **kwargs ): super(DataCollectionRuleResource, self).__init__(**kwargs) self.location = location self.tags = tags + self.kind = kind self.id = None self.name = None self.type = None self.etag = None self.description = description + self.immutable_id = None self.data_sources = data_sources self.destinations = destinations self.data_flows = data_flows @@ -498,8 +492,8 @@ class DataCollectionRuleResourceListResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param value: Required. A list of resources. - :type value: list[~$(python-base- - namespace).v2019_11_01_preview.models.DataCollectionRuleResource] + :type value: + list[~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleResource] :param next_link: The URL to use for getting the next set of results. :type next_link: str """ @@ -530,35 +524,36 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): 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 description: Description of the data collection rule. :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str :param data_sources: The specification of data sources. This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. - :type data_sources: ~$(python-base-namespace).v2019_11_01_preview.models.DataSourcesSpec - :param destinations: Required. The specification of destinations. - :type destinations: ~$(python-base-namespace).v2019_11_01_preview.models.DestinationsSpec - :param data_flows: Required. The specification of data flows. + :type data_sources: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: + ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. :type data_flows: list[~$(python-base-namespace).v2019_11_01_preview.models.DataFlow] :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". - :vartype provisioning_state: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState + :vartype provisioning_state: str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataCollectionRuleProvisioningState """ _validation = { - 'description': {'max_length': 256, 'min_length': 0}, - 'destinations': {'required': True}, - 'data_flows': {'required': True}, + 'immutable_id': {'readonly': True}, 'provisioning_state': {'readonly': True}, } _attribute_map = { 'description': {'key': 'description', 'type': 'str'}, - 'data_sources': {'key': 'dataSources', 'type': 'DataSourcesSpec'}, - 'destinations': {'key': 'destinations', 'type': 'DestinationsSpec'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'data_sources': {'key': 'dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'destinations', 'type': 'DataCollectionRuleDestinations'}, 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, } @@ -566,10 +561,10 @@ class DataCollectionRuleResourceProperties(DataCollectionRule): def __init__( self, *, - destinations: "DestinationsSpec", - data_flows: List["DataFlow"], description: Optional[str] = None, - data_sources: Optional["DataSourcesSpec"] = None, + data_sources: Optional["DataCollectionRuleDataSources"] = None, + destinations: Optional["DataCollectionRuleDestinations"] = None, + data_flows: Optional[List["DataFlow"]] = None, **kwargs ): super(DataCollectionRuleResourceProperties, self).__init__(description=description, data_sources=data_sources, destinations=destinations, data_flows=data_flows, **kwargs) @@ -578,20 +573,13 @@ def __init__( class DataFlow(msrest.serialization.Model): """Definition of which streams are sent to which destinations. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams for this data flow. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownDataFlowStreams] - :param destinations: Required. List of destinations for this data flow. + :param streams: List of streams for this data flow. + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownDataFlowStreams] + :param destinations: List of destinations for this data flow. :type destinations: list[str] """ - _validation = { - 'streams': {'required': True}, - 'destinations': {'required': True}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'destinations': {'key': 'destinations', 'type': '[str]'}, @@ -600,8 +588,8 @@ class DataFlow(msrest.serialization.Model): def __init__( self, *, - streams: List[Union[str, "KnownDataFlowStreams"]], - destinations: List[str], + streams: Optional[List[Union[str, "KnownDataFlowStreams"]]] = None, + destinations: Optional[List[str]] = None, **kwargs ): super(DataFlow, self).__init__(**kwargs) @@ -612,18 +600,12 @@ def __init__( class DestinationsSpecAzureMonitorMetrics(AzureMonitorMetricsDestination): """Azure Monitor Metrics destination. - All required parameters must be populated in order to send to Azure. - - :param name: Required. A friendly name for the destination. + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, } @@ -631,21 +613,21 @@ class DestinationsSpecAzureMonitorMetrics(AzureMonitorMetricsDestination): def __init__( self, *, - name: str, + name: Optional[str] = None, **kwargs ): super(DestinationsSpecAzureMonitorMetrics, self).__init__(name=name, **kwargs) class ErrorAdditionalInfo(msrest.serialization.Model): - """Additional information for common error response. + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -667,23 +649,22 @@ def __init__( self.info = None -class ErrorDetails(msrest.serialization.Model): - """Common error details. +class ErrorDetail(msrest.serialization.Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. - :ivar code: Error code which can be used to programmatically identify the class of error. + :ivar code: The error code. :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. + :ivar message: The error message. :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). + :ivar target: The error target. :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] + :ivar details: The error details. + :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -698,7 +679,7 @@ class ErrorDetails(msrest.serialization.Model): 'code': {'key': 'code', 'type': 'str'}, 'message': {'key': 'message', 'type': 'str'}, 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } @@ -706,55 +687,7 @@ def __init__( self, **kwargs ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None - - -class ErrorDetailsAutoGenerated(msrest.serialization.Model): - """Common error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorDetailsAutoGenerated] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsAutoGenerated]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorDetailsAutoGenerated, self).__init__(**kwargs) + super(ErrorDetail, self).__init__(**kwargs) self.code = None self.message = None self.target = None @@ -763,138 +696,24 @@ def __init__( class ErrorResponse(msrest.serialization.Model): - """Common error response. + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: Error details. - :vartype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails + :param error: The error object. + :type error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetail """ - _validation = { - 'error': {'readonly': True}, - } - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetails'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( self, + *, + error: Optional["ErrorDetail"] = None, **kwargs ): super(ErrorResponse, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseError(ErrorDetailsAutoGenerated): - """Error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorDetailsAutoGenerated] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetailsAutoGenerated]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseError, self).__init__(**kwargs) - - -class ErrorResponseAutoGenerated(msrest.serialization.Model): - """Common error response. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar error: Error details. - :vartype error: ~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetailsAutoGenerated - """ - - _validation = { - 'error': {'readonly': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetailsAutoGenerated'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseAutoGenerated, self).__init__(**kwargs) - self.error = None - - -class ErrorResponseError(ErrorDetails): - """Error details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar code: Error code which can be used to programmatically identify the class of error. - :vartype code: str - :ivar message: Describes the error in detail and provides debugging information. - :vartype message: str - :ivar target: The target of the particular error (for example, the name of the property in - error). - :vartype target: str - :ivar details: Additional nested error detail objects. - :vartype details: list[~$(python-base-namespace).v2019_11_01_preview.models.ErrorDetails] - :ivar additional_info: Additional error information. - :vartype additional_info: list[~$(python-base- - namespace).v2019_11_01_preview.models.ErrorAdditionalInfo] - """ - - _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponseError, self).__init__(**kwargs) + self.error = error class ExtensionDataSource(msrest.serialization.Model): @@ -903,83 +722,89 @@ class ExtensionDataSource(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownExtensionDataSourceStreams] + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownExtensionDataSourceStreams] :param extension_name: Required. The name of the VM extension. :type extension_name: str :param extension_settings: The extension settings. The format is specific for particular extension. - :type extension_settings: object - :param name: Required. A friendly name for the data source. + :type extension_settings: any + :param input_data_sources: The list of data sources this extension needs data from. + :type input_data_sources: list[str] + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ _validation = { - 'streams': {'required': True}, - 'extension_name': {'required': True, 'max_length': 64, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'extension_name': {'required': True}, } _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'extension_name': {'key': 'extensionName', 'type': 'str'}, 'extension_settings': {'key': 'extensionSettings', 'type': 'object'}, + 'input_data_sources': {'key': 'inputDataSources', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, *, - streams: List[Union[str, "KnownExtensionDataSourceStreams"]], extension_name: str, - name: str, - extension_settings: Optional[object] = None, + streams: Optional[List[Union[str, "KnownExtensionDataSourceStreams"]]] = None, + extension_settings: Optional[Any] = None, + input_data_sources: Optional[List[str]] = None, + name: Optional[str] = None, **kwargs ): super(ExtensionDataSource, self).__init__(**kwargs) self.streams = streams self.extension_name = extension_name self.extension_settings = extension_settings + self.input_data_sources = input_data_sources self.name = name class LogAnalyticsDestination(msrest.serialization.Model): """Log Analytics destination. - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param workspace_resource_id: Required. The resource ID of the Log Analytics workspace. + :param workspace_resource_id: The resource ID of the Log Analytics workspace. :type workspace_resource_id: str - :param name: Required. A friendly name for the destination. + :ivar workspace_id: The Customer ID of the Log Analytics workspace. + :vartype workspace_id: str + :param name: A friendly name for the destination. This name should be unique across all destinations (regardless of type) within the data collection rule. :type name: str """ _validation = { - 'workspace_resource_id': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, + 'workspace_id': {'readonly': True}, } _attribute_map = { 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, *, - workspace_resource_id: str, - name: str, + workspace_resource_id: Optional[str] = None, + name: Optional[str] = None, **kwargs ): super(LogAnalyticsDestination, self).__init__(**kwargs) self.workspace_resource_id = workspace_resource_id + self.workspace_id = None self.name = name @@ -987,43 +812,27 @@ class PerfCounterDataSource(msrest.serialization.Model): """Definition of which performance counters will be collected and how they will be collected by this data collection rule. Collected from both Windows and Linux machines where the counter is present. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] - :param scheduled_transfer_period: Required. The interval between data uploads (scheduled - transfers), rounded up to the nearest minute. Possible values include: "PT1M", "PT5M", "PT15M", - "PT30M", "PT60M". - :type scheduled_transfer_period: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceScheduledTransferPeriod - :param sampling_frequency_in_seconds: Required. The number of seconds between consecutive - counter measurements (samples). + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownPerfCounterDataSourceStreams] + :param sampling_frequency_in_seconds: The number of seconds between consecutive counter + measurements (samples). :type sampling_frequency_in_seconds: int - :param counter_specifiers: Required. A list of specifier names of the performance counters you - want to collect. + :param counter_specifiers: A list of specifier names of the performance counters you want to + collect. Use a wildcard (*) to collect a counter for all instances. To get a list of performance counters on Windows, run the command 'typeperf'. :type counter_specifiers: list[str] - :param name: Required. A friendly name for the data source. + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'scheduled_transfer_period': {'required': True}, - 'sampling_frequency_in_seconds': {'required': True, 'maximum': 30, 'minimum': 1}, - 'counter_specifiers': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, - 'scheduled_transfer_period': {'key': 'scheduledTransferPeriod', 'type': 'str'}, 'sampling_frequency_in_seconds': {'key': 'samplingFrequencyInSeconds', 'type': 'int'}, 'counter_specifiers': {'key': 'counterSpecifiers', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, @@ -1032,16 +841,14 @@ class PerfCounterDataSource(msrest.serialization.Model): def __init__( self, *, - streams: List[Union[str, "KnownPerfCounterDataSourceStreams"]], - scheduled_transfer_period: Union[str, "KnownPerfCounterDataSourceScheduledTransferPeriod"], - sampling_frequency_in_seconds: int, - counter_specifiers: List[str], - name: str, + streams: Optional[List[Union[str, "KnownPerfCounterDataSourceStreams"]]] = None, + sampling_frequency_in_seconds: Optional[int] = None, + counter_specifiers: Optional[List[str]] = None, + name: Optional[str] = None, **kwargs ): super(PerfCounterDataSource, self).__init__(**kwargs) self.streams = streams - self.scheduled_transfer_period = scheduled_transfer_period self.sampling_frequency_in_seconds = sampling_frequency_in_seconds self.counter_specifiers = counter_specifiers self.name = name @@ -1072,31 +879,23 @@ class SyslogDataSource(msrest.serialization.Model): """Definition of which syslog data will be collected and how it will be collected. Only collected from Linux machines. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceStreams] - :param facility_names: Required. The list of facility names. - :type facility_names: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceStreams] + :param facility_names: The list of facility names. + :type facility_names: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceFacilityNames] :param log_levels: The log levels to collect. - :type log_levels: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] - :param name: Required. A friendly name for the data source. + :type log_levels: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownSyslogDataSourceLogLevels] + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'facility_names': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, 'facility_names': {'key': 'facilityNames', 'type': '[str]'}, @@ -1107,10 +906,10 @@ class SyslogDataSource(msrest.serialization.Model): def __init__( self, *, - streams: List[Union[str, "KnownSyslogDataSourceStreams"]], - facility_names: List[Union[str, "KnownSyslogDataSourceFacilityNames"]], - name: str, + streams: Optional[List[Union[str, "KnownSyslogDataSourceStreams"]]] = None, + facility_names: Optional[List[Union[str, "KnownSyslogDataSourceFacilityNames"]]] = None, log_levels: Optional[List[Union[str, "KnownSyslogDataSourceLogLevels"]]] = None, + name: Optional[str] = None, **kwargs ): super(SyslogDataSource, self).__init__(**kwargs) @@ -1124,36 +923,21 @@ class WindowsEventLogDataSource(msrest.serialization.Model): """Definition of which Windows Event Log events will be collected and how they will be collected. Only collected from Windows machines. - All required parameters must be populated in order to send to Azure. - - :param streams: Required. List of streams that this data source will be sent to. + :param streams: List of streams that this data source will be sent to. A stream indicates what schema will be used for this data and usually what table in Log Analytics the data will be sent to. - :type streams: list[str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] - :param scheduled_transfer_period: Required. The interval between data uploads (scheduled - transfers), rounded up to the nearest minute. Possible values include: "PT1M", "PT5M", "PT15M", - "PT30M", "PT60M". - :type scheduled_transfer_period: str or ~$(python-base- - namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceScheduledTransferPeriod - :param x_path_queries: Required. A list of Windows Event Log queries in XPATH format. + :type streams: list[str or + ~$(python-base-namespace).v2019_11_01_preview.models.KnownWindowsEventLogDataSourceStreams] + :param x_path_queries: A list of Windows Event Log queries in XPATH format. :type x_path_queries: list[str] - :param name: Required. A friendly name for the data source. + :param name: A friendly name for the data source. This name should be unique across all data sources (regardless of type) within the data collection rule. :type name: str """ - _validation = { - 'streams': {'required': True}, - 'scheduled_transfer_period': {'required': True}, - 'x_path_queries': {'required': True}, - 'name': {'required': True, 'max_length': 32, 'min_length': 0, 'pattern': r'^[-\w\._\(\)]+$'}, - } - _attribute_map = { 'streams': {'key': 'streams', 'type': '[str]'}, - 'scheduled_transfer_period': {'key': 'scheduledTransferPeriod', 'type': 'str'}, 'x_path_queries': {'key': 'xPathQueries', 'type': '[str]'}, 'name': {'key': 'name', 'type': 'str'}, } @@ -1161,14 +945,12 @@ class WindowsEventLogDataSource(msrest.serialization.Model): def __init__( self, *, - streams: List[Union[str, "KnownWindowsEventLogDataSourceStreams"]], - scheduled_transfer_period: Union[str, "KnownWindowsEventLogDataSourceScheduledTransferPeriod"], - x_path_queries: List[str], - name: str, + streams: Optional[List[Union[str, "KnownWindowsEventLogDataSourceStreams"]]] = None, + x_path_queries: Optional[List[str]] = None, + name: Optional[str] = None, **kwargs ): super(WindowsEventLogDataSource, self).__init__(**kwargs) self.streams = streams - self.scheduled_transfer_period = scheduled_transfer_period self.x_path_queries = x_path_queries self.name = name diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_monitor_management_client_enums.py index 2308243d3ed4..251ddeea0a23 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_monitor_management_client_enums.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/models/_monitor_management_client_enums.py @@ -46,62 +46,29 @@ class KnownDataCollectionRuleProvisioningState(with_metaclass(_CaseInsensitiveEn SUCCEEDED = "Succeeded" FAILED = "Failed" +class KnownDataCollectionRuleResourceKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The kind of the resource. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + class KnownDataFlowStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - MICROSOFT_ANTI_MALWARE_STATUS = "Microsoft-AntiMalwareStatus" - MICROSOFT_AUDITD = "Microsoft-Auditd" - MICROSOFT_CISCOASA = "Microsoft-CISCOASA" - MICROSOFT_COMMON_SECURITY_LOG = "Microsoft-CommonSecurityLog" - MICROSOFT_COMPUTER_GROUP = "Microsoft-ComputerGroup" MICROSOFT_EVENT = "Microsoft-Event" - MICROSOFT_FIREWALL_LOG = "Microsoft-FirewallLog" - MICROSOFT_HEALTH_STATE_CHANGE = "Microsoft-HealthStateChange" - MICROSOFT_HEARTBEAT = "Microsoft-Heartbeat" MICROSOFT_INSIGHTS_METRICS = "Microsoft-InsightsMetrics" - MICROSOFT_OPERATION_LOG = "Microsoft-OperationLog" MICROSOFT_PERF = "Microsoft-Perf" - MICROSOFT_PROCESS_INVESTIGATOR = "Microsoft-ProcessInvestigator" - MICROSOFT_PROTECTION_STATUS = "Microsoft-ProtectionStatus" - MICROSOFT_ROME_DETECTION_EVENT = "Microsoft-RomeDetectionEvent" - MICROSOFT_SECURITY_BASELINE = "Microsoft-SecurityBaseline" - MICROSOFT_SECURITY_BASELINE_SUMMARY = "Microsoft-SecurityBaselineSummary" - MICROSOFT_SECURITY_EVENT = "Microsoft-SecurityEvent" MICROSOFT_SYSLOG = "Microsoft-Syslog" MICROSOFT_WINDOWS_EVENT = "Microsoft-WindowsEvent" class KnownExtensionDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - MICROSOFT_ANTI_MALWARE_STATUS = "Microsoft-AntiMalwareStatus" - MICROSOFT_AUDITD = "Microsoft-Auditd" - MICROSOFT_CISCOASA = "Microsoft-CISCOASA" - MICROSOFT_COMMON_SECURITY_LOG = "Microsoft-CommonSecurityLog" - MICROSOFT_COMPUTER_GROUP = "Microsoft-ComputerGroup" MICROSOFT_EVENT = "Microsoft-Event" - MICROSOFT_FIREWALL_LOG = "Microsoft-FirewallLog" - MICROSOFT_HEALTH_STATE_CHANGE = "Microsoft-HealthStateChange" - MICROSOFT_HEARTBEAT = "Microsoft-Heartbeat" MICROSOFT_INSIGHTS_METRICS = "Microsoft-InsightsMetrics" - MICROSOFT_OPERATION_LOG = "Microsoft-OperationLog" MICROSOFT_PERF = "Microsoft-Perf" - MICROSOFT_PROCESS_INVESTIGATOR = "Microsoft-ProcessInvestigator" - MICROSOFT_PROTECTION_STATUS = "Microsoft-ProtectionStatus" - MICROSOFT_ROME_DETECTION_EVENT = "Microsoft-RomeDetectionEvent" - MICROSOFT_SECURITY_BASELINE = "Microsoft-SecurityBaseline" - MICROSOFT_SECURITY_BASELINE_SUMMARY = "Microsoft-SecurityBaselineSummary" - MICROSOFT_SECURITY_EVENT = "Microsoft-SecurityEvent" MICROSOFT_SYSLOG = "Microsoft-Syslog" MICROSOFT_WINDOWS_EVENT = "Microsoft-WindowsEvent" -class KnownPerfCounterDataSourceScheduledTransferPeriod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The interval between data uploads (scheduled transfers), rounded up to the nearest minute. - """ - - PT1_M = "PT1M" - PT5_M = "PT5M" - PT15_M = "PT15M" - PT30_M = "PT30M" - PT60_M = "PT60M" - class KnownPerfCounterDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MICROSOFT_PERF = "Microsoft-Perf" @@ -120,7 +87,7 @@ class KnownSyslogDataSourceFacilityNames(with_metaclass(_CaseInsensitiveEnumMeta NEWS = "news" SYSLOG = "syslog" USER = "user" - UUCP = "UUCP" + UUCP = "uucp" LOCAL0 = "local0" LOCAL1 = "local1" LOCAL2 = "local2" @@ -129,6 +96,7 @@ class KnownSyslogDataSourceFacilityNames(with_metaclass(_CaseInsensitiveEnumMeta LOCAL5 = "local5" LOCAL6 = "local6" LOCAL7 = "local7" + ASTERISK = "*" class KnownSyslogDataSourceLogLevels(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -140,21 +108,12 @@ class KnownSyslogDataSourceLogLevels(with_metaclass(_CaseInsensitiveEnumMeta, st CRITICAL = "Critical" ALERT = "Alert" EMERGENCY = "Emergency" + ASTERISK = "*" class KnownSyslogDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MICROSOFT_SYSLOG = "Microsoft-Syslog" -class KnownWindowsEventLogDataSourceScheduledTransferPeriod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The interval between data uploads (scheduled transfers), rounded up to the nearest minute. - """ - - PT1_M = "PT1M" - PT5_M = "PT5M" - PT15_M = "PT15M" - PT30_M = "PT30M" - PT60_M = "PT60M" - class KnownWindowsEventLogDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MICROSOFT_WINDOWS_EVENT = "Microsoft-WindowsEvent" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py index 7217c7daf643..f7feadebaa83 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rule_associations_operations.py @@ -107,7 +107,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -157,8 +157,8 @@ def prepare_request(next_link=None): url = self.list_by_rule.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -186,7 +186,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -210,7 +210,7 @@ def get( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param association_name: The name of the association. + :param association_name: The name of the association. The name is case insensitive. :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) @@ -229,7 +229,7 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), - 'associationName': self._serialize.url("association_name", association_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'associationName': self._serialize.url("association_name", association_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +247,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) @@ -272,7 +272,7 @@ def create( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param association_name: The name of the association. + :param association_name: The name of the association. The name is case insensitive. :type association_name: str :param body: The payload. :type body: ~$(python-base-namespace).v2019_11_01_preview.models.DataCollectionRuleAssociationProxyOnlyResource @@ -294,7 +294,7 @@ def create( url = self.create.metadata['url'] # type: ignore path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), - 'associationName': self._serialize.url("association_name", association_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'associationName': self._serialize.url("association_name", association_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -319,7 +319,7 @@ def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -347,7 +347,7 @@ def delete( :param resource_uri: The identifier of the resource. :type resource_uri: str - :param association_name: The name of the association. + :param association_name: The name of the association. The name is case insensitive. :type association_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -366,7 +366,7 @@ def delete( url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), - 'associationName': self._serialize.url("association_name", association_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'associationName': self._serialize.url("association_name", association_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -384,7 +384,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py index 9f555f1455d1..c7a2fca7f84d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_11_01_preview/operations/_data_collection_rules_operations.py @@ -80,7 +80,7 @@ def prepare_request(next_link=None): url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -108,7 +108,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -222,8 +222,8 @@ def get( url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -241,7 +241,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) @@ -289,8 +289,8 @@ def create( url = self.create.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -315,7 +315,7 @@ def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -367,8 +367,8 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -393,7 +393,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) @@ -437,8 +437,8 @@ def delete( url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), - 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str', max_length=64, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -456,7 +456,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponseAutoGenerated, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py index 576b2cc74589..0c4c839c6751 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_metadata.json index b5d267fb35a7..724484160644 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -22,7 +24,7 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true @@ -30,20 +32,60 @@ }, "constant": { }, - "call": "credential" + "call": "credential", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "management_group_diagnostic_settings": "ManagementGroupDiagnosticSettingsOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_management_client.py index c3d1b9f772ef..35801d7fac26 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ManagementGroupDiagnosticSettingsOperations @@ -52,6 +53,21 @@ def __init__( self.management_group_diagnostic_settings = ManagementGroupDiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py index 014f28055b13..91dce6198f59 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_management_client.py index 2f7456674d92..1b9308541bdf 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -49,6 +50,20 @@ def __init__( self.management_group_diagnostic_settings = ManagementGroupDiagnosticSettingsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + http_request.url = self._client.format_url(http_request.url) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py index 8ee8b141d012..2ff71bcf89fb 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py @@ -45,7 +45,7 @@ async def get( self, management_group_id: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.ManagementGroupDiagnosticSettingsResource": """Gets the active management group diagnostic settings for the specified resource. @@ -88,7 +88,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResource', pipeline_response) @@ -104,7 +104,7 @@ async def create_or_update( management_group_id: str, name: str, parameters: "_models.ManagementGroupDiagnosticSettingsResource", - **kwargs + **kwargs: Any ) -> "_models.ManagementGroupDiagnosticSettingsResource": """Creates or updates management group diagnostic settings for the specified resource. @@ -154,7 +154,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResource', pipeline_response) @@ -169,7 +169,7 @@ async def delete( self, management_group_id: str, name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes existing management group diagnostic settings for the specified resource. @@ -212,7 +212,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -223,7 +223,7 @@ async def delete( def list( self, management_group_id: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ManagementGroupDiagnosticSettingsResourceCollection"]: """Gets the active management group diagnostic settings list for the specified management group. @@ -279,7 +279,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models.py index f0ecc19cab41..5715644ceb01 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models.py @@ -97,12 +97,11 @@ class ManagementGroupDiagnosticSettingsResource(ManagementGroupProxyOnlyResource will be selected. :type event_hub_name: str :param logs: The list of logs settings. - :type logs: list[~$(python-base- - namespace).v2020_01_01_preview.models.ManagementGroupLogSettings] + :type logs: + list[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupLogSettings] :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ @@ -142,8 +141,8 @@ class ManagementGroupDiagnosticSettingsResourceCollection(msrest.serialization.M """Represents a collection of management group diagnostic settings resources. :param value: The collection of management group diagnostic settings resources. - :type value: list[~$(python-base- - namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] + :type value: + list[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] """ _attribute_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models_py3.py index 47525123592b..64fb6dadc29a 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/models/_models_py3.py @@ -104,12 +104,11 @@ class ManagementGroupDiagnosticSettingsResource(ManagementGroupProxyOnlyResource will be selected. :type event_hub_name: str :param logs: The list of logs settings. - :type logs: list[~$(python-base- - namespace).v2020_01_01_preview.models.ManagementGroupLogSettings] + :type logs: + list[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupLogSettings] :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would like to send Diagnostic Logs. Example: - /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights- - integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. :type workspace_id: str """ @@ -157,8 +156,8 @@ class ManagementGroupDiagnosticSettingsResourceCollection(msrest.serialization.M """Represents a collection of management group diagnostic settings resources. :param value: The collection of management group diagnostic settings resources. - :type value: list[~$(python-base- - namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] + :type value: + list[~$(python-base-namespace).v2020_01_01_preview.models.ManagementGroupDiagnosticSettingsResource] """ _attribute_map = { diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py index 9f9bdc045e1b..d15bed802560 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_01_01_preview/operations/_management_group_diagnostic_settings_operations.py @@ -93,7 +93,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResource', pipeline_response) @@ -160,7 +160,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResource', pipeline_response) @@ -219,7 +219,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -287,7 +287,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/__init__.py index ccbeb512b0c2..d82479510092 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/__init__.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/__init__.py @@ -7,6 +7,9 @@ # -------------------------------------------------------------------------- from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION __all__ = ['MonitorManagementClient'] try: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py index 78473575fb28..1f601e6a8306 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_configuration.py @@ -12,13 +12,14 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from ._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -28,7 +29,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_metadata.json index 7892eefabedf..a556e8b454f6 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_metadata.json +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": false, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -21,41 +23,81 @@ }, "subscription_id": { "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The Azure subscription Id.", + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", "docstring_type": "str", "required": true } }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "scheduled_query_rules": "ScheduledQueryRulesOperations" - }, - "operation_mixins": { - }, - "sync_imports": "None", - "async_imports": "None" + } } \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_management_client.py index 57f192b65071..f16bbdb9ca83 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_monitor_management_client.py @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import MonitorManagementClientConfiguration from .operations import ScheduledQueryRulesOperations @@ -29,7 +30,7 @@ class MonitorManagementClient(object): :vartype scheduled_query_rules: $(python-base-namespace).v2020_05_01_preview.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -55,6 +56,24 @@ def __init__( self.scheduled_query_rules = ScheduledQueryRulesOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py index 91c9d16538c3..b4b6605c0d04 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_configuration.py @@ -12,11 +12,12 @@ from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy +from .._version import VERSION + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -VERSION = "unknown" class MonitorManagementClientConfiguration(Configuration): """Configuration for MonitorManagementClient. @@ -26,7 +27,7 @@ class MonitorManagementClientConfiguration(Configuration): :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py index 8ec830e0b252..bac946198254 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/_monitor_management_client.py @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -27,7 +28,7 @@ class MonitorManagementClient(object): :vartype scheduled_query_rules: $(python-base-namespace).v2020_05_01_preview.aio.operations.ScheduledQueryRulesOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The Azure subscription Id. + :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL """ @@ -52,6 +53,23 @@ def __init__( self.scheduled_query_rules = ScheduledQueryRulesOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py index 25daa2f351dd..77eccbaf2c5d 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/aio/operations/_scheduled_query_rules_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScheduledQueryRuleResourceCollection"]: """Retrieve a scheduled query rule definitions in a subscription. @@ -69,7 +69,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -97,7 +97,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -111,7 +111,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ScheduledQueryRuleResourceCollection"]: """Retrieve scheduled query rule definitions in a resource group. @@ -139,7 +139,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -168,7 +168,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -183,7 +183,7 @@ async def get( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.ScheduledQueryRuleResource": """Retrieve an scheduled query rule definition. @@ -207,7 +207,7 @@ async def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -227,7 +227,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ScheduledQueryRuleResource', pipeline_response) @@ -243,7 +243,7 @@ async def create_or_update( resource_group_name: str, rule_name: str, parameters: "_models.ScheduledQueryRuleResource", - **kwargs + **kwargs: Any ) -> "_models.ScheduledQueryRuleResource": """Creates or updates a scheduled query rule. @@ -270,7 +270,7 @@ async def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -294,7 +294,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -314,7 +314,7 @@ async def update( resource_group_name: str, rule_name: str, parameters: "_models.ScheduledQueryRuleResourcePatch", - **kwargs + **kwargs: Any ) -> "_models.ScheduledQueryRuleResource": """Update a scheduled query rule. @@ -341,7 +341,7 @@ async def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -365,7 +365,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ScheduledQueryRuleResource', pipeline_response) @@ -380,7 +380,7 @@ async def delete( self, resource_group_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes a scheduled query rule. @@ -404,7 +404,7 @@ async def delete( # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -424,7 +424,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models.py index 65721a94a4ca..bc0dc2510e61 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models.py @@ -42,8 +42,8 @@ class Condition(msrest.serialization.Model): :type query: str :param time_aggregation: Required. Aggregation type. Possible values include: "Count", "Average", "Minimum", "Maximum", "Total". - :type time_aggregation: str or ~$(python-base- - namespace).v2020_05_01_preview.models.TimeAggregation + :type time_aggregation: str or + ~$(python-base-namespace).v2020_05_01_preview.models.TimeAggregation :param metric_measure_column: The column containing the metric measure number. :type metric_measure_column: str :param resource_id_column: The column containing the resource id. The content of the column @@ -58,8 +58,8 @@ class Condition(msrest.serialization.Model): :type threshold: float :param failing_periods: The minimum number of violations required within the selected lookback time window required to raise an alert. - :type failing_periods: ~$(python-base- - namespace).v2020_05_01_preview.models.ConditionFailingPeriods + :type failing_periods: + ~$(python-base-namespace).v2020_05_01_preview.models.ConditionFailingPeriods """ _validation = { @@ -164,7 +164,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -219,8 +219,8 @@ class ErrorResponse(msrest.serialization.Model): :ivar details: The error details. :vartype details: list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~$(python-base- - namespace).v2020_05_01_preview.models.ErrorAdditionalInfo] + :vartype additional_info: + list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -371,8 +371,24 @@ class ScheduledQueryRuleResource(TrackedResource): :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :vartype kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :ivar created_with_api_version: The api-version used when creating this alert rule. + :vartype created_with_api_version: str + :ivar is_legacy_log_analytics_rule: True if alert rule is legacy Log Analytic rule. + :vartype is_legacy_log_analytics_rule: bool :param description: The description of the scheduled query rule. :type description: str + :param display_name: The display name of the alert rule. + :type display_name: str :param severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Possible values include: 0, 1, 2, 3, 4. :type severity: str or ~$(python-base-namespace).v2020_05_01_preview.models.AlertSeverity @@ -387,6 +403,9 @@ class ScheduledQueryRuleResource(TrackedResource): :param window_size: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). :type window_size: ~datetime.timedelta + :param override_query_time_range: If specified then overrides the query time range (default is + WindowSize*NumberOfEvaluationPeriods). + :type override_query_time_range: ~datetime.timedelta :param target_resource_types: List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual @@ -406,6 +425,10 @@ class ScheduledQueryRuleResource(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'kind': {'readonly': True}, + 'etag': {'readonly': True}, + 'created_with_api_version': {'readonly': True}, + 'is_legacy_log_analytics_rule': {'readonly': True}, } _attribute_map = { @@ -414,12 +437,18 @@ class ScheduledQueryRuleResource(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'created_with_api_version': {'key': 'properties.createdWithApiVersion', 'type': 'str'}, + 'is_legacy_log_analytics_rule': {'key': 'properties.isLegacyLogAnalyticsRule', 'type': 'bool'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'float'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, 'evaluation_frequency': {'key': 'properties.evaluationFrequency', 'type': 'duration'}, 'window_size': {'key': 'properties.windowSize', 'type': 'duration'}, + 'override_query_time_range': {'key': 'properties.overrideQueryTimeRange', 'type': 'duration'}, 'target_resource_types': {'key': 'properties.targetResourceTypes', 'type': '[str]'}, 'criteria': {'key': 'properties.criteria', 'type': 'ScheduledQueryRuleCriteria'}, 'mute_actions_duration': {'key': 'properties.muteActionsDuration', 'type': 'duration'}, @@ -431,12 +460,18 @@ def __init__( **kwargs ): super(ScheduledQueryRuleResource, self).__init__(**kwargs) + self.kind = None + self.etag = None + self.created_with_api_version = None + self.is_legacy_log_analytics_rule = None self.description = kwargs.get('description', None) + self.display_name = kwargs.get('display_name', None) self.severity = kwargs.get('severity', None) self.enabled = kwargs.get('enabled', None) self.scopes = kwargs.get('scopes', None) self.evaluation_frequency = kwargs.get('evaluation_frequency', None) self.window_size = kwargs.get('window_size', None) + self.override_query_time_range = kwargs.get('override_query_time_range', None) self.target_resource_types = kwargs.get('target_resource_types', None) self.criteria = kwargs.get('criteria', None) self.mute_actions_duration = kwargs.get('mute_actions_duration', None) @@ -447,8 +482,8 @@ class ScheduledQueryRuleResourceCollection(msrest.serialization.Model): """Represents a collection of scheduled query rule resources. :param value: The values for the scheduled query rule resources. - :type value: list[~$(python-base- - namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] + :type value: + list[~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] """ _attribute_map = { @@ -466,10 +501,18 @@ def __init__( class ScheduledQueryRuleResourcePatch(msrest.serialization.Model): """The scheduled query rule resource for patch operations. + Variables are only populated by the server, and will be ignored when sending a request. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :ivar created_with_api_version: The api-version used when creating this alert rule. + :vartype created_with_api_version: str + :ivar is_legacy_log_analytics_rule: True if alert rule is legacy Log Analytic rule. + :vartype is_legacy_log_analytics_rule: bool :param description: The description of the scheduled query rule. :type description: str + :param display_name: The display name of the alert rule. + :type display_name: str :param severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Possible values include: 0, 1, 2, 3, 4. :type severity: str or ~$(python-base-namespace).v2020_05_01_preview.models.AlertSeverity @@ -484,6 +527,9 @@ class ScheduledQueryRuleResourcePatch(msrest.serialization.Model): :param window_size: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). :type window_size: ~datetime.timedelta + :param override_query_time_range: If specified then overrides the query time range (default is + WindowSize*NumberOfEvaluationPeriods). + :type override_query_time_range: ~datetime.timedelta :param target_resource_types: List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual @@ -498,14 +544,23 @@ class ScheduledQueryRuleResourcePatch(msrest.serialization.Model): :type actions: list[~$(python-base-namespace).v2020_05_01_preview.models.Action] """ + _validation = { + 'created_with_api_version': {'readonly': True}, + 'is_legacy_log_analytics_rule': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_with_api_version': {'key': 'properties.createdWithApiVersion', 'type': 'str'}, + 'is_legacy_log_analytics_rule': {'key': 'properties.isLegacyLogAnalyticsRule', 'type': 'bool'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'float'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, 'evaluation_frequency': {'key': 'properties.evaluationFrequency', 'type': 'duration'}, 'window_size': {'key': 'properties.windowSize', 'type': 'duration'}, + 'override_query_time_range': {'key': 'properties.overrideQueryTimeRange', 'type': 'duration'}, 'target_resource_types': {'key': 'properties.targetResourceTypes', 'type': '[str]'}, 'criteria': {'key': 'properties.criteria', 'type': 'ScheduledQueryRuleCriteria'}, 'mute_actions_duration': {'key': 'properties.muteActionsDuration', 'type': 'duration'}, @@ -518,12 +573,16 @@ def __init__( ): super(ScheduledQueryRuleResourcePatch, self).__init__(**kwargs) self.tags = kwargs.get('tags', None) + self.created_with_api_version = None + self.is_legacy_log_analytics_rule = None self.description = kwargs.get('description', None) + self.display_name = kwargs.get('display_name', None) self.severity = kwargs.get('severity', None) self.enabled = kwargs.get('enabled', None) self.scopes = kwargs.get('scopes', None) self.evaluation_frequency = kwargs.get('evaluation_frequency', None) self.window_size = kwargs.get('window_size', None) + self.override_query_time_range = kwargs.get('override_query_time_range', None) self.target_resource_types = kwargs.get('target_resource_types', None) self.criteria = kwargs.get('criteria', None) self.mute_actions_duration = kwargs.get('mute_actions_duration', None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models_py3.py index b50679d0ac27..1525426b24ea 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models_py3.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/models/_models_py3.py @@ -50,8 +50,8 @@ class Condition(msrest.serialization.Model): :type query: str :param time_aggregation: Required. Aggregation type. Possible values include: "Count", "Average", "Minimum", "Maximum", "Total". - :type time_aggregation: str or ~$(python-base- - namespace).v2020_05_01_preview.models.TimeAggregation + :type time_aggregation: str or + ~$(python-base-namespace).v2020_05_01_preview.models.TimeAggregation :param metric_measure_column: The column containing the metric measure number. :type metric_measure_column: str :param resource_id_column: The column containing the resource id. The content of the column @@ -66,8 +66,8 @@ class Condition(msrest.serialization.Model): :type threshold: float :param failing_periods: The minimum number of violations required within the selected lookback time window required to raise an alert. - :type failing_periods: ~$(python-base- - namespace).v2020_05_01_preview.models.ConditionFailingPeriods + :type failing_periods: + ~$(python-base-namespace).v2020_05_01_preview.models.ConditionFailingPeriods """ _validation = { @@ -188,7 +188,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -245,8 +245,8 @@ class ErrorResponse(msrest.serialization.Model): :ivar details: The error details. :vartype details: list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorResponse] :ivar additional_info: The error additional info. - :vartype additional_info: list[~$(python-base- - namespace).v2020_05_01_preview.models.ErrorAdditionalInfo] + :vartype additional_info: + list[~$(python-base-namespace).v2020_05_01_preview.models.ErrorAdditionalInfo] """ _validation = { @@ -402,8 +402,24 @@ class ScheduledQueryRuleResource(TrackedResource): :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str + :ivar kind: Metadata used by portal/tooling/etc to render different UX experiences for + resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, + the resource provider must validate and persist this value. + :vartype kind: str + :ivar etag: The etag field is *not* required. If it is provided in the response body, it must + also be provided as a header per the normal etag convention. Entity tags are used for + comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in + the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range + (section 14.27) header fields. + :vartype etag: str + :ivar created_with_api_version: The api-version used when creating this alert rule. + :vartype created_with_api_version: str + :ivar is_legacy_log_analytics_rule: True if alert rule is legacy Log Analytic rule. + :vartype is_legacy_log_analytics_rule: bool :param description: The description of the scheduled query rule. :type description: str + :param display_name: The display name of the alert rule. + :type display_name: str :param severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Possible values include: 0, 1, 2, 3, 4. :type severity: str or ~$(python-base-namespace).v2020_05_01_preview.models.AlertSeverity @@ -418,6 +434,9 @@ class ScheduledQueryRuleResource(TrackedResource): :param window_size: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). :type window_size: ~datetime.timedelta + :param override_query_time_range: If specified then overrides the query time range (default is + WindowSize*NumberOfEvaluationPeriods). + :type override_query_time_range: ~datetime.timedelta :param target_resource_types: List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual @@ -437,6 +456,10 @@ class ScheduledQueryRuleResource(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'kind': {'readonly': True}, + 'etag': {'readonly': True}, + 'created_with_api_version': {'readonly': True}, + 'is_legacy_log_analytics_rule': {'readonly': True}, } _attribute_map = { @@ -445,12 +468,18 @@ class ScheduledQueryRuleResource(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'created_with_api_version': {'key': 'properties.createdWithApiVersion', 'type': 'str'}, + 'is_legacy_log_analytics_rule': {'key': 'properties.isLegacyLogAnalyticsRule', 'type': 'bool'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'float'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, 'evaluation_frequency': {'key': 'properties.evaluationFrequency', 'type': 'duration'}, 'window_size': {'key': 'properties.windowSize', 'type': 'duration'}, + 'override_query_time_range': {'key': 'properties.overrideQueryTimeRange', 'type': 'duration'}, 'target_resource_types': {'key': 'properties.targetResourceTypes', 'type': '[str]'}, 'criteria': {'key': 'properties.criteria', 'type': 'ScheduledQueryRuleCriteria'}, 'mute_actions_duration': {'key': 'properties.muteActionsDuration', 'type': 'duration'}, @@ -463,11 +492,13 @@ def __init__( location: str, tags: Optional[Dict[str, str]] = None, description: Optional[str] = None, + display_name: Optional[str] = None, severity: Optional[Union[float, "AlertSeverity"]] = None, enabled: Optional[bool] = None, scopes: Optional[List[str]] = None, evaluation_frequency: Optional[datetime.timedelta] = None, window_size: Optional[datetime.timedelta] = None, + override_query_time_range: Optional[datetime.timedelta] = None, target_resource_types: Optional[List[str]] = None, criteria: Optional["ScheduledQueryRuleCriteria"] = None, mute_actions_duration: Optional[datetime.timedelta] = None, @@ -475,12 +506,18 @@ def __init__( **kwargs ): super(ScheduledQueryRuleResource, self).__init__(tags=tags, location=location, **kwargs) + self.kind = None + self.etag = None + self.created_with_api_version = None + self.is_legacy_log_analytics_rule = None self.description = description + self.display_name = display_name self.severity = severity self.enabled = enabled self.scopes = scopes self.evaluation_frequency = evaluation_frequency self.window_size = window_size + self.override_query_time_range = override_query_time_range self.target_resource_types = target_resource_types self.criteria = criteria self.mute_actions_duration = mute_actions_duration @@ -491,8 +528,8 @@ class ScheduledQueryRuleResourceCollection(msrest.serialization.Model): """Represents a collection of scheduled query rule resources. :param value: The values for the scheduled query rule resources. - :type value: list[~$(python-base- - namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] + :type value: + list[~$(python-base-namespace).v2020_05_01_preview.models.ScheduledQueryRuleResource] """ _attribute_map = { @@ -512,10 +549,18 @@ def __init__( class ScheduledQueryRuleResourcePatch(msrest.serialization.Model): """The scheduled query rule resource for patch operations. + Variables are only populated by the server, and will be ignored when sending a request. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] + :ivar created_with_api_version: The api-version used when creating this alert rule. + :vartype created_with_api_version: str + :ivar is_legacy_log_analytics_rule: True if alert rule is legacy Log Analytic rule. + :vartype is_legacy_log_analytics_rule: bool :param description: The description of the scheduled query rule. :type description: str + :param display_name: The display name of the alert rule. + :type display_name: str :param severity: Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Possible values include: 0, 1, 2, 3, 4. :type severity: str or ~$(python-base-namespace).v2020_05_01_preview.models.AlertSeverity @@ -530,6 +575,9 @@ class ScheduledQueryRuleResourcePatch(msrest.serialization.Model): :param window_size: The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). :type window_size: ~datetime.timedelta + :param override_query_time_range: If specified then overrides the query time range (default is + WindowSize*NumberOfEvaluationPeriods). + :type override_query_time_range: ~datetime.timedelta :param target_resource_types: List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual @@ -544,14 +592,23 @@ class ScheduledQueryRuleResourcePatch(msrest.serialization.Model): :type actions: list[~$(python-base-namespace).v2020_05_01_preview.models.Action] """ + _validation = { + 'created_with_api_version': {'readonly': True}, + 'is_legacy_log_analytics_rule': {'readonly': True}, + } + _attribute_map = { 'tags': {'key': 'tags', 'type': '{str}'}, + 'created_with_api_version': {'key': 'properties.createdWithApiVersion', 'type': 'str'}, + 'is_legacy_log_analytics_rule': {'key': 'properties.isLegacyLogAnalyticsRule', 'type': 'bool'}, 'description': {'key': 'properties.description', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'severity': {'key': 'properties.severity', 'type': 'float'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, 'evaluation_frequency': {'key': 'properties.evaluationFrequency', 'type': 'duration'}, 'window_size': {'key': 'properties.windowSize', 'type': 'duration'}, + 'override_query_time_range': {'key': 'properties.overrideQueryTimeRange', 'type': 'duration'}, 'target_resource_types': {'key': 'properties.targetResourceTypes', 'type': '[str]'}, 'criteria': {'key': 'properties.criteria', 'type': 'ScheduledQueryRuleCriteria'}, 'mute_actions_duration': {'key': 'properties.muteActionsDuration', 'type': 'duration'}, @@ -563,11 +620,13 @@ def __init__( *, tags: Optional[Dict[str, str]] = None, description: Optional[str] = None, + display_name: Optional[str] = None, severity: Optional[Union[float, "AlertSeverity"]] = None, enabled: Optional[bool] = None, scopes: Optional[List[str]] = None, evaluation_frequency: Optional[datetime.timedelta] = None, window_size: Optional[datetime.timedelta] = None, + override_query_time_range: Optional[datetime.timedelta] = None, target_resource_types: Optional[List[str]] = None, criteria: Optional["ScheduledQueryRuleCriteria"] = None, mute_actions_duration: Optional[datetime.timedelta] = None, @@ -576,12 +635,16 @@ def __init__( ): super(ScheduledQueryRuleResourcePatch, self).__init__(**kwargs) self.tags = tags + self.created_with_api_version = None + self.is_legacy_log_analytics_rule = None self.description = description + self.display_name = display_name self.severity = severity self.enabled = enabled self.scopes = scopes self.evaluation_frequency = evaluation_frequency self.window_size = window_size + self.override_query_time_range = override_query_time_range self.target_resource_types = target_resource_types self.criteria = criteria self.mute_actions_duration = mute_actions_duration diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py index 6879360b4e77..155ebb742176 100644 --- a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_05_01_preview/operations/_scheduled_query_rules_operations.py @@ -74,7 +74,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_subscription.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -102,7 +102,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -145,7 +145,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -174,7 +174,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -214,7 +214,7 @@ def get( # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -234,7 +234,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ScheduledQueryRuleResource', pipeline_response) @@ -278,7 +278,7 @@ def create_or_update( # Construct URL url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -302,7 +302,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -350,7 +350,7 @@ def update( # Construct URL url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -374,7 +374,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ScheduledQueryRuleResource', pipeline_response) @@ -414,7 +414,7 @@ def delete( # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), } @@ -434,7 +434,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorContract, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorContract, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/__init__.py new file mode 100644 index 000000000000..d82479510092 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['MonitorManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py similarity index 87% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_configuration.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py index 02b69458ecf3..28d48e6791d0 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_configuration.py @@ -21,15 +21,15 @@ from azure.core.credentials import TokenCredential -class NetworkManagementClientConfiguration(Configuration): - """Configuration for NetworkManagementClient. +class MonitorManagementClientConfiguration(Configuration): + """Configuration for MonitorManagementClient. Note that all parameters used to create this instance are saved as instance attributes. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ @@ -44,12 +44,13 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(NetworkManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id + self.api_version = "2020-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-network/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_metadata.json new file mode 100644 index 000000000000..29a3b208a966 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_metadata.json @@ -0,0 +1,103 @@ +{ + "chosen_version": "2020-10-01", + "total_api_version_list": ["2020-10-01"], + "client": { + "name": "MonitorManagementClient", + "filename": "_monitor_management_client", + "description": "Monitor Management Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "activity_log_alerts": "ActivityLogAlertsOperations" + } +} \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_management_client.py new file mode 100644 index 000000000000..b1daa9d88de5 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_monitor_management_client.py @@ -0,0 +1,88 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import MonitorManagementClientConfiguration +from .operations import ActivityLogAlertsOperations +from . import models + + +class MonitorManagementClient(object): + """Monitor Management Client. + + :ivar activity_log_alerts: ActivityLogAlertsOperations operations + :vartype activity_log_alerts: $(python-base-namespace).v2020_10_01.operations.ActivityLogAlertsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.activity_log_alerts = ActivityLogAlertsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> MonitorManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/__init__.py new file mode 100644 index 000000000000..96ce9b45c05b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._monitor_management_client import MonitorManagementClient +__all__ = ['MonitorManagementClient'] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py similarity index 87% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/_configuration.py rename to sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py index 80a5a857085b..968ee446dd68 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/_configuration.py +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_configuration.py @@ -19,15 +19,15 @@ from azure.core.credentials_async import AsyncTokenCredential -class NetworkManagementClientConfiguration(Configuration): - """Configuration for NetworkManagementClient. +class MonitorManagementClientConfiguration(Configuration): + """Configuration for MonitorManagementClient. Note that all parameters used to create this instance are saved as instance attributes. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :param subscription_id: The ID of the target subscription. :type subscription_id: str """ @@ -41,12 +41,13 @@ def __init__( raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - super(NetworkManagementClientConfiguration, self).__init__(**kwargs) + super(MonitorManagementClientConfiguration, self).__init__(**kwargs) self.credential = credential self.subscription_id = subscription_id + self.api_version = "2020-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) - kwargs.setdefault('sdk_moniker', 'mgmt-network/{}'.format(VERSION)) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) self._configure(**kwargs) def _configure( diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_management_client.py new file mode 100644 index 000000000000..ec3d4d50df64 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/_monitor_management_client.py @@ -0,0 +1,81 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import MonitorManagementClientConfiguration +from .operations import ActivityLogAlertsOperations +from .. import models + + +class MonitorManagementClient(object): + """Monitor Management Client. + + :ivar activity_log_alerts: ActivityLogAlertsOperations operations + :vartype activity_log_alerts: $(python-base-namespace).v2020_10_01.aio.operations.ActivityLogAlertsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.activity_log_alerts = ActivityLogAlertsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "MonitorManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/__init__.py new file mode 100644 index 000000000000..93b3b50f2d76 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._activity_log_alerts_operations import ActivityLogAlertsOperations + +__all__ = [ + 'ActivityLogAlertsOperations', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py new file mode 100644 index 000000000000..ecb6e1f12579 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/aio/operations/_activity_log_alerts_operations.py @@ -0,0 +1,435 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ActivityLogAlertsOperations: + """ActivityLogAlertsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2020_10_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_or_update( + self, + resource_group_name: str, + activity_log_alert_name: str, + activity_log_alert_rule: "_models.ActivityLogAlertResource", + **kwargs: Any + ) -> "_models.ActivityLogAlertResource": + """Create a new Activity Log Alert rule or update an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param activity_log_alert_name: The name of the Activity Log Alert rule. + :type activity_log_alert_name: str + :param activity_log_alert_rule: The Activity Log Alert rule to create or use for the update. + :type activity_log_alert_rule: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActivityLogAlertResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActivityLogAlertResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(activity_log_alert_rule, 'ActivityLogAlertResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + activity_log_alert_name: str, + **kwargs: Any + ) -> "_models.ActivityLogAlertResource": + """Get an Activity Log Alert rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param activity_log_alert_name: The name of the Activity Log Alert rule. + :type activity_log_alert_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActivityLogAlertResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActivityLogAlertResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + activity_log_alert_name: str, + **kwargs: Any + ) -> None: + """Delete an Activity Log Alert rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param activity_log_alert_name: The name of the Activity Log Alert rule. + :type activity_log_alert_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + activity_log_alert_name: str, + activity_log_alert_rule_patch: "_models.AlertRulePatchObject", + **kwargs: Any + ) -> "_models.ActivityLogAlertResource": + """Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update + the Alert rule tags, and to enable or disable the Alert rule. To update other fields use + CreateOrUpdate operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param activity_log_alert_name: The name of the Activity Log Alert rule. + :type activity_log_alert_name: str + :param activity_log_alert_rule_patch: Parameters supplied to the operation. + :type activity_log_alert_rule_patch: ~$(python-base-namespace).v2020_10_01.models.AlertRulePatchObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActivityLogAlertResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActivityLogAlertResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(activity_log_alert_rule_patch, 'AlertRulePatchObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'} # type: ignore + + def list_by_subscription_id( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AlertRuleList"]: + """Get a list of all Activity Log Alert rules in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2020_10_01.models.AlertRuleList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription_id.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/activityLogAlerts'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AlertRuleList"]: + """Get a list of all Activity Log Alert rules in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2020_10_01.models.AlertRuleList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/__init__.py new file mode 100644 index 000000000000..e937f3d3fe5a --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/__init__.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ActionGroup + from ._models_py3 import ActionList + from ._models_py3 import ActivityLogAlertResource + from ._models_py3 import AlertRuleAllOfCondition + from ._models_py3 import AlertRuleAnyOfOrLeafCondition + from ._models_py3 import AlertRuleLeafCondition + from ._models_py3 import AlertRuleList + from ._models_py3 import AlertRulePatchObject + from ._models_py3 import AzureResource + from ._models_py3 import ErrorResponse +except (SyntaxError, ImportError): + from ._models import ActionGroup # type: ignore + from ._models import ActionList # type: ignore + from ._models import ActivityLogAlertResource # type: ignore + from ._models import AlertRuleAllOfCondition # type: ignore + from ._models import AlertRuleAnyOfOrLeafCondition # type: ignore + from ._models import AlertRuleLeafCondition # type: ignore + from ._models import AlertRuleList # type: ignore + from ._models import AlertRulePatchObject # type: ignore + from ._models import AzureResource # type: ignore + from ._models import ErrorResponse # type: ignore + +__all__ = [ + 'ActionGroup', + 'ActionList', + 'ActivityLogAlertResource', + 'AlertRuleAllOfCondition', + 'AlertRuleAnyOfOrLeafCondition', + 'AlertRuleLeafCondition', + 'AlertRuleList', + 'AlertRulePatchObject', + 'AzureResource', + 'ErrorResponse', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models.py new file mode 100644 index 000000000000..419f5583f36f --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models.py @@ -0,0 +1,344 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class ActionGroup(msrest.serialization.Model): + """A pointer to an Azure Action Group. + + All required parameters must be populated in order to send to Azure. + + :param action_group_id: Required. The resource ID of the Action Group. This cannot be null or + empty. + :type action_group_id: str + :param webhook_properties: the dictionary of custom properties to include with the post + operation. These data are appended to the webhook payload. + :type webhook_properties: dict[str, str] + """ + + _validation = { + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ActionGroup, self).__init__(**kwargs) + self.action_group_id = kwargs['action_group_id'] + self.webhook_properties = kwargs.get('webhook_properties', None) + + +class ActionList(msrest.serialization.Model): + """A list of Activity Log Alert rule actions. + + :param action_groups: The list of the Action Groups. + :type action_groups: list[~$(python-base-namespace).v2020_10_01.models.ActionGroup] + """ + + _attribute_map = { + 'action_groups': {'key': 'actionGroups', 'type': '[ActionGroup]'}, + } + + def __init__( + self, + **kwargs + ): + super(ActionList, self).__init__(**kwargs) + self.action_groups = kwargs.get('action_groups', None) + + +class AzureResource(msrest.serialization.Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource Id. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. Since Azure Activity Log Alerts is a global + service, the location of the rules should always be 'global'. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', "global") + self.tags = kwargs.get('tags', None) + + +class ActivityLogAlertResource(AzureResource): + """An Activity Log Alert rule resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource Id. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. Since Azure Activity Log Alerts is a global + service, the location of the rules should always be 'global'. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :param scopes: A list of resource IDs that will be used as prefixes. The alert will only apply + to Activity Log events with resource IDs that fall under one of these prefixes. This list must + include at least one item. + :type scopes: list[str] + :param condition: The condition that will cause this alert to activate. + :type condition: ~$(python-base-namespace).v2020_10_01.models.AlertRuleAllOfCondition + :param actions: The actions that will activate when the condition is met. + :type actions: ~$(python-base-namespace).v2020_10_01.models.ActionList + :param enabled: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log + Alert rule is not enabled, then none of its actions will be activated. + :type enabled: bool + :param description: A description of this Activity Log Alert rule. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + 'condition': {'key': 'properties.condition', 'type': 'AlertRuleAllOfCondition'}, + 'actions': {'key': 'properties.actions', 'type': 'ActionList'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActivityLogAlertResource, self).__init__(**kwargs) + self.scopes = kwargs.get('scopes', None) + self.condition = kwargs.get('condition', None) + self.actions = kwargs.get('actions', None) + self.enabled = kwargs.get('enabled', True) + self.description = kwargs.get('description', None) + + +class AlertRuleAllOfCondition(msrest.serialization.Model): + """An Activity Log Alert rule condition that is met when all its member conditions are met. + + All required parameters must be populated in order to send to Azure. + + :param all_of: Required. The list of Activity Log Alert rule conditions. + :type all_of: list[~$(python-base-namespace).v2020_10_01.models.AlertRuleAnyOfOrLeafCondition] + """ + + _validation = { + 'all_of': {'required': True}, + } + + _attribute_map = { + 'all_of': {'key': 'allOf', 'type': '[AlertRuleAnyOfOrLeafCondition]'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleAllOfCondition, self).__init__(**kwargs) + self.all_of = kwargs['all_of'] + + +class AlertRuleLeafCondition(msrest.serialization.Model): + """An Activity Log Alert rule condition that is met by comparing the field and value of an Activity Log event. +This condition must contain 'field' and either 'equals' or 'containsAny'. + + :param field: The name of the Activity Log event's field that this condition will examine. + The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', + 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + 'resourceType', or anything beginning with 'properties'. + :type field: str + :param equals: The value of the event's field will be compared to this value (case-insensitive) + to determine if the condition is met. + :type equals: str + :param contains_any: The value of the event's field will be compared to the values in this + array (case-insensitive) to determine if the condition is met. + :type contains_any: list[str] + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'equals': {'key': 'equals', 'type': 'str'}, + 'contains_any': {'key': 'containsAny', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleLeafCondition, self).__init__(**kwargs) + self.field = kwargs.get('field', None) + self.equals = kwargs.get('equals', None) + self.contains_any = kwargs.get('contains_any', None) + + +class AlertRuleAnyOfOrLeafCondition(AlertRuleLeafCondition): + """An Activity Log Alert rule condition that is met when all its member conditions are met. +Each condition can be of one of the following types: +**Important**\ : Each type has its unique subset of properties. Properties from different types CANNOT exist in one condition. + + +* **Leaf Condition -** must contain 'field' and either 'equals' or 'containsAny'. + *Please note, 'anyOf' should **not** be set in a Leaf Condition.* + + * **AnyOf Condition -** must contain **only** 'anyOf' (which is an array of Leaf Conditions). + *Please note, 'field', 'equals' and 'containsAny' should **not** be set in an AnyOf Condition.*. + + :param field: The name of the Activity Log event's field that this condition will examine. + The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', + 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + 'resourceType', or anything beginning with 'properties'. + :type field: str + :param equals: The value of the event's field will be compared to this value (case-insensitive) + to determine if the condition is met. + :type equals: str + :param contains_any: The value of the event's field will be compared to the values in this + array (case-insensitive) to determine if the condition is met. + :type contains_any: list[str] + :param any_of: An Activity Log Alert rule condition that is met when at least one of its member + leaf conditions are met. + :type any_of: list[~$(python-base-namespace).v2020_10_01.models.AlertRuleLeafCondition] + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'equals': {'key': 'equals', 'type': 'str'}, + 'contains_any': {'key': 'containsAny', 'type': '[str]'}, + 'any_of': {'key': 'anyOf', 'type': '[AlertRuleLeafCondition]'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleAnyOfOrLeafCondition, self).__init__(**kwargs) + self.any_of = kwargs.get('any_of', None) + + +class AlertRuleList(msrest.serialization.Model): + """A list of Activity Log Alert rules. + + :param value: The list of Activity Log Alert rules. + :type value: list[~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource] + :param next_link: Provides the link to retrieve the next set of elements. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActivityLogAlertResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRuleList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AlertRulePatchObject(msrest.serialization.Model): + """An Activity Log Alert rule object for the body of patch operations. + + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + :param enabled: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log + Alert rule is not enabled, then none of its actions will be activated. + :type enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AlertRulePatchObject, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.enabled = kwargs.get('enabled', True) + + +class ErrorResponse(msrest.serialization.Model): + """The error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models_py3.py new file mode 100644 index 000000000000..f6a14450917f --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/models/_models_py3.py @@ -0,0 +1,379 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class ActionGroup(msrest.serialization.Model): + """A pointer to an Azure Action Group. + + All required parameters must be populated in order to send to Azure. + + :param action_group_id: Required. The resource ID of the Action Group. This cannot be null or + empty. + :type action_group_id: str + :param webhook_properties: the dictionary of custom properties to include with the post + operation. These data are appended to the webhook payload. + :type webhook_properties: dict[str, str] + """ + + _validation = { + 'action_group_id': {'required': True}, + } + + _attribute_map = { + 'action_group_id': {'key': 'actionGroupId', 'type': 'str'}, + 'webhook_properties': {'key': 'webhookProperties', 'type': '{str}'}, + } + + def __init__( + self, + *, + action_group_id: str, + webhook_properties: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ActionGroup, self).__init__(**kwargs) + self.action_group_id = action_group_id + self.webhook_properties = webhook_properties + + +class ActionList(msrest.serialization.Model): + """A list of Activity Log Alert rule actions. + + :param action_groups: The list of the Action Groups. + :type action_groups: list[~$(python-base-namespace).v2020_10_01.models.ActionGroup] + """ + + _attribute_map = { + 'action_groups': {'key': 'actionGroups', 'type': '[ActionGroup]'}, + } + + def __init__( + self, + *, + action_groups: Optional[List["ActionGroup"]] = None, + **kwargs + ): + super(ActionList, self).__init__(**kwargs) + self.action_groups = action_groups + + +class AzureResource(msrest.serialization.Model): + """An Azure resource object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource Id. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. Since Azure Activity Log Alerts is a global + service, the location of the rules should always be 'global'. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: Optional[str] = "global", + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ActivityLogAlertResource(AzureResource): + """An Activity Log Alert rule resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The resource Id. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The location of the resource. Since Azure Activity Log Alerts is a global + service, the location of the rules should always be 'global'. + :type location: str + :param tags: A set of tags. The tags of the resource. + :type tags: dict[str, str] + :param scopes: A list of resource IDs that will be used as prefixes. The alert will only apply + to Activity Log events with resource IDs that fall under one of these prefixes. This list must + include at least one item. + :type scopes: list[str] + :param condition: The condition that will cause this alert to activate. + :type condition: ~$(python-base-namespace).v2020_10_01.models.AlertRuleAllOfCondition + :param actions: The actions that will activate when the condition is met. + :type actions: ~$(python-base-namespace).v2020_10_01.models.ActionList + :param enabled: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log + Alert rule is not enabled, then none of its actions will be activated. + :type enabled: bool + :param description: A description of this Activity Log Alert rule. + :type description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'scopes': {'key': 'properties.scopes', 'type': '[str]'}, + 'condition': {'key': 'properties.condition', 'type': 'AlertRuleAllOfCondition'}, + 'actions': {'key': 'properties.actions', 'type': 'ActionList'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = "global", + tags: Optional[Dict[str, str]] = None, + scopes: Optional[List[str]] = None, + condition: Optional["AlertRuleAllOfCondition"] = None, + actions: Optional["ActionList"] = None, + enabled: Optional[bool] = True, + description: Optional[str] = None, + **kwargs + ): + super(ActivityLogAlertResource, self).__init__(location=location, tags=tags, **kwargs) + self.scopes = scopes + self.condition = condition + self.actions = actions + self.enabled = enabled + self.description = description + + +class AlertRuleAllOfCondition(msrest.serialization.Model): + """An Activity Log Alert rule condition that is met when all its member conditions are met. + + All required parameters must be populated in order to send to Azure. + + :param all_of: Required. The list of Activity Log Alert rule conditions. + :type all_of: list[~$(python-base-namespace).v2020_10_01.models.AlertRuleAnyOfOrLeafCondition] + """ + + _validation = { + 'all_of': {'required': True}, + } + + _attribute_map = { + 'all_of': {'key': 'allOf', 'type': '[AlertRuleAnyOfOrLeafCondition]'}, + } + + def __init__( + self, + *, + all_of: List["AlertRuleAnyOfOrLeafCondition"], + **kwargs + ): + super(AlertRuleAllOfCondition, self).__init__(**kwargs) + self.all_of = all_of + + +class AlertRuleLeafCondition(msrest.serialization.Model): + """An Activity Log Alert rule condition that is met by comparing the field and value of an Activity Log event. +This condition must contain 'field' and either 'equals' or 'containsAny'. + + :param field: The name of the Activity Log event's field that this condition will examine. + The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', + 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + 'resourceType', or anything beginning with 'properties'. + :type field: str + :param equals: The value of the event's field will be compared to this value (case-insensitive) + to determine if the condition is met. + :type equals: str + :param contains_any: The value of the event's field will be compared to the values in this + array (case-insensitive) to determine if the condition is met. + :type contains_any: list[str] + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'equals': {'key': 'equals', 'type': 'str'}, + 'contains_any': {'key': 'containsAny', 'type': '[str]'}, + } + + def __init__( + self, + *, + field: Optional[str] = None, + equals: Optional[str] = None, + contains_any: Optional[List[str]] = None, + **kwargs + ): + super(AlertRuleLeafCondition, self).__init__(**kwargs) + self.field = field + self.equals = equals + self.contains_any = contains_any + + +class AlertRuleAnyOfOrLeafCondition(AlertRuleLeafCondition): + """An Activity Log Alert rule condition that is met when all its member conditions are met. +Each condition can be of one of the following types: +**Important**\ : Each type has its unique subset of properties. Properties from different types CANNOT exist in one condition. + + +* **Leaf Condition -** must contain 'field' and either 'equals' or 'containsAny'. + *Please note, 'anyOf' should **not** be set in a Leaf Condition.* + + * **AnyOf Condition -** must contain **only** 'anyOf' (which is an array of Leaf Conditions). + *Please note, 'field', 'equals' and 'containsAny' should **not** be set in an AnyOf Condition.*. + + :param field: The name of the Activity Log event's field that this condition will examine. + The possible values for this field are (case-insensitive): 'resourceId', 'category', 'caller', + 'level', 'operationName', 'resourceGroup', 'resourceProvider', 'status', 'subStatus', + 'resourceType', or anything beginning with 'properties'. + :type field: str + :param equals: The value of the event's field will be compared to this value (case-insensitive) + to determine if the condition is met. + :type equals: str + :param contains_any: The value of the event's field will be compared to the values in this + array (case-insensitive) to determine if the condition is met. + :type contains_any: list[str] + :param any_of: An Activity Log Alert rule condition that is met when at least one of its member + leaf conditions are met. + :type any_of: list[~$(python-base-namespace).v2020_10_01.models.AlertRuleLeafCondition] + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'equals': {'key': 'equals', 'type': 'str'}, + 'contains_any': {'key': 'containsAny', 'type': '[str]'}, + 'any_of': {'key': 'anyOf', 'type': '[AlertRuleLeafCondition]'}, + } + + def __init__( + self, + *, + field: Optional[str] = None, + equals: Optional[str] = None, + contains_any: Optional[List[str]] = None, + any_of: Optional[List["AlertRuleLeafCondition"]] = None, + **kwargs + ): + super(AlertRuleAnyOfOrLeafCondition, self).__init__(field=field, equals=equals, contains_any=contains_any, **kwargs) + self.any_of = any_of + + +class AlertRuleList(msrest.serialization.Model): + """A list of Activity Log Alert rules. + + :param value: The list of Activity Log Alert rules. + :type value: list[~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource] + :param next_link: Provides the link to retrieve the next set of elements. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActivityLogAlertResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ActivityLogAlertResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AlertRuleList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AlertRulePatchObject(msrest.serialization.Model): + """An Activity Log Alert rule object for the body of patch operations. + + :param tags: A set of tags. The resource tags. + :type tags: dict[str, str] + :param enabled: Indicates whether this Activity Log Alert rule is enabled. If an Activity Log + Alert rule is not enabled, then none of its actions will be activated. + :type enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + enabled: Optional[bool] = True, + **kwargs + ): + super(AlertRulePatchObject, self).__init__(**kwargs) + self.tags = tags + self.enabled = enabled + + +class ErrorResponse(msrest.serialization.Model): + """The error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message indicating why the operation failed. + :vartype message: str + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.code = None + self.message = None diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/__init__.py new file mode 100644 index 000000000000..93b3b50f2d76 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._activity_log_alerts_operations import ActivityLogAlertsOperations + +__all__ = [ + 'ActivityLogAlertsOperations', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py new file mode 100644 index 000000000000..19e1ae46f59c --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/operations/_activity_log_alerts_operations.py @@ -0,0 +1,445 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ActivityLogAlertsOperations(object): + """ActivityLogAlertsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2020_10_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_or_update( + self, + resource_group_name, # type: str + activity_log_alert_name, # type: str + activity_log_alert_rule, # type: "_models.ActivityLogAlertResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActivityLogAlertResource" + """Create a new Activity Log Alert rule or update an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param activity_log_alert_name: The name of the Activity Log Alert rule. + :type activity_log_alert_name: str + :param activity_log_alert_rule: The Activity Log Alert rule to create or use for the update. + :type activity_log_alert_rule: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActivityLogAlertResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActivityLogAlertResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(activity_log_alert_rule, 'ActivityLogAlertResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + activity_log_alert_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ActivityLogAlertResource" + """Get an Activity Log Alert rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param activity_log_alert_name: The name of the Activity Log Alert rule. + :type activity_log_alert_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActivityLogAlertResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActivityLogAlertResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + activity_log_alert_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete an Activity Log Alert rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param activity_log_alert_name: The name of the Activity Log Alert rule. + :type activity_log_alert_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + activity_log_alert_name, # type: str + activity_log_alert_rule_patch, # type: "_models.AlertRulePatchObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActivityLogAlertResource" + """Updates 'tags' and 'enabled' fields in an existing Alert rule. This method is used to update + the Alert rule tags, and to enable or disable the Alert rule. To update other fields use + CreateOrUpdate operation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param activity_log_alert_name: The name of the Activity Log Alert rule. + :type activity_log_alert_name: str + :param activity_log_alert_rule_patch: Parameters supplied to the operation. + :type activity_log_alert_rule_patch: ~$(python-base-namespace).v2020_10_01.models.AlertRulePatchObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActivityLogAlertResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2020_10_01.models.ActivityLogAlertResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActivityLogAlertResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'activityLogAlertName': self._serialize.url("activity_log_alert_name", activity_log_alert_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(activity_log_alert_rule_patch, 'AlertRulePatchObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActivityLogAlertResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts/{activityLogAlertName}'} # type: ignore + + def list_by_subscription_id( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AlertRuleList"] + """Get a list of all Activity Log Alert rules in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2020_10_01.models.AlertRuleList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription_id.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/activityLogAlerts'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AlertRuleList"] + """Get a list of all Activity Log Alert rules in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AlertRuleList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2020_10_01.models.AlertRuleList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AlertRuleList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2020-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AlertRuleList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/activityLogAlerts'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/py.typed b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2020_10_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/__init__.py new file mode 100644 index 000000000000..d82479510092 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['MonitorManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py new file mode 100644 index 000000000000..6c2b6a6fe818 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class MonitorManagementClientConfiguration(Configuration): + """Configuration for MonitorManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-04-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_metadata.json new file mode 100644 index 000000000000..257eaf0e018b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_metadata.json @@ -0,0 +1,105 @@ +{ + "chosen_version": "2021-04-01", + "total_api_version_list": ["2021-04-01"], + "client": { + "name": "MonitorManagementClient", + "filename": "_monitor_management_client", + "description": "Monitor Management Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "data_collection_endpoints": "DataCollectionEndpointsOperations", + "data_collection_rule_associations": "DataCollectionRuleAssociationsOperations", + "data_collection_rules": "DataCollectionRulesOperations" + } +} \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_management_client.py new file mode 100644 index 000000000000..c28a4128d4c6 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_monitor_management_client.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import MonitorManagementClientConfiguration +from .operations import DataCollectionEndpointsOperations +from .operations import DataCollectionRuleAssociationsOperations +from .operations import DataCollectionRulesOperations +from . import models + + +class MonitorManagementClient(object): + """Monitor Management Client. + + :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations + :vartype data_collection_endpoints: $(python-base-namespace).v2021_04_01.operations.DataCollectionEndpointsOperations + :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations + :vartype data_collection_rule_associations: $(python-base-namespace).v2021_04_01.operations.DataCollectionRuleAssociationsOperations + :ivar data_collection_rules: DataCollectionRulesOperations operations + :vartype data_collection_rules: $(python-base-namespace).v2021_04_01.operations.DataCollectionRulesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.data_collection_endpoints = DataCollectionEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_collection_rule_associations = DataCollectionRuleAssociationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_collection_rules = DataCollectionRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> MonitorManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/__init__.py new file mode 100644 index 000000000000..96ce9b45c05b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._monitor_management_client import MonitorManagementClient +__all__ = ['MonitorManagementClient'] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py new file mode 100644 index 000000000000..cb6cdeab6de8 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class MonitorManagementClientConfiguration(Configuration): + """Configuration for MonitorManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-04-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_management_client.py new file mode 100644 index 000000000000..a18ea946eba9 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/_monitor_management_client.py @@ -0,0 +1,91 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import MonitorManagementClientConfiguration +from .operations import DataCollectionEndpointsOperations +from .operations import DataCollectionRuleAssociationsOperations +from .operations import DataCollectionRulesOperations +from .. import models + + +class MonitorManagementClient(object): + """Monitor Management Client. + + :ivar data_collection_endpoints: DataCollectionEndpointsOperations operations + :vartype data_collection_endpoints: $(python-base-namespace).v2021_04_01.aio.operations.DataCollectionEndpointsOperations + :ivar data_collection_rule_associations: DataCollectionRuleAssociationsOperations operations + :vartype data_collection_rule_associations: $(python-base-namespace).v2021_04_01.aio.operations.DataCollectionRuleAssociationsOperations + :ivar data_collection_rules: DataCollectionRulesOperations operations + :vartype data_collection_rules: $(python-base-namespace).v2021_04_01.aio.operations.DataCollectionRulesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.data_collection_endpoints = DataCollectionEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_collection_rule_associations = DataCollectionRuleAssociationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.data_collection_rules = DataCollectionRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "MonitorManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/__init__.py new file mode 100644 index 000000000000..86676ba92623 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/__init__.py @@ -0,0 +1,17 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_collection_endpoints_operations import DataCollectionEndpointsOperations +from ._data_collection_rule_associations_operations import DataCollectionRuleAssociationsOperations +from ._data_collection_rules_operations import DataCollectionRulesOperations + +__all__ = [ + 'DataCollectionEndpointsOperations', + 'DataCollectionRuleAssociationsOperations', + 'DataCollectionRulesOperations', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py new file mode 100644 index 000000000000..40fd39f48a97 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_endpoints_operations.py @@ -0,0 +1,455 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionEndpointsOperations: + """DataCollectionEndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DataCollectionEndpointResourceListResult"]: + """Lists all data collection endpoints in the specified resource group. + + Lists all data collection endpoints in the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionEndpointResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionEndpointResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.DataCollectionEndpointResourceListResult"]: + """Lists all data collection endpoints in the specified subscription. + + Lists all data collection endpoints in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionEndpointResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionEndpointResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionEndpoints'} # type: ignore + + async def get( + self, + resource_group_name: str, + data_collection_endpoint_name: str, + **kwargs: Any + ) -> "_models.DataCollectionEndpointResource": + """Returns the specified data collection endpoint. + + Returns the specified data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + async def create( + self, + resource_group_name: str, + data_collection_endpoint_name: str, + body: Optional["_models.DataCollectionEndpointResource"] = None, + **kwargs: Any + ) -> "_models.DataCollectionEndpointResource": + """Creates or updates a data collection endpoint. + + Creates or updates a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionEndpointResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + data_collection_endpoint_name: str, + body: Optional["_models.ResourceForUpdate"] = None, + **kwargs: Any + ) -> "_models.DataCollectionEndpointResource": + """Updates part of a data collection endpoint. + + Updates part of a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'ResourceForUpdate') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + data_collection_endpoint_name: str, + **kwargs: Any + ) -> None: + """Deletes a data collection endpoint. + + Deletes a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py new file mode 100644 index 000000000000..8cf71334c09e --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rule_associations_operations.py @@ -0,0 +1,384 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionRuleAssociationsOperations: + """DataCollectionRuleAssociationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource( + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncIterable["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"]: + """Lists associations for the specified resource. + + Lists associations for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations'} # type: ignore + + def list_by_rule( + self, + resource_group_name: str, + data_collection_rule_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"]: + """Lists associations for the specified data collection rule. + + Lists associations for the specified data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}/associations'} # type: ignore + + async def get( + self, + resource_uri: str, + association_name: str, + **kwargs: Any + ) -> "_models.DataCollectionRuleAssociationProxyOnlyResource": + """Returns the specified association. + + Returns the specified association. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param association_name: The name of the association. The name is case insensitive. + :type association_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleAssociationProxyOnlyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + 'associationName': self._serialize.url("association_name", association_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}'} # type: ignore + + async def create( + self, + resource_uri: str, + association_name: str, + body: Optional["_models.DataCollectionRuleAssociationProxyOnlyResource"] = None, + **kwargs: Any + ) -> "_models.DataCollectionRuleAssociationProxyOnlyResource": + """Creates or updates an association. + + Creates or updates an association. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param association_name: The name of the association. The name is case insensitive. + :type association_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleAssociationProxyOnlyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + 'associationName': self._serialize.url("association_name", association_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionRuleAssociationProxyOnlyResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}'} # type: ignore + + async def delete( + self, + resource_uri: str, + association_name: str, + **kwargs: Any + ) -> None: + """Deletes an association. + + Deletes an association. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param association_name: The name of the association. The name is case insensitive. + :type association_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + 'associationName': self._serialize.url("association_name", association_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py new file mode 100644 index 000000000000..9affad029e76 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/aio/operations/_data_collection_rules_operations.py @@ -0,0 +1,455 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionRulesOperations: + """DataCollectionRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DataCollectionRuleResourceListResult"]: + """Lists all data collection rules in the specified resource group. + + Lists all data collection rules in the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.DataCollectionRuleResourceListResult"]: + """Lists all data collection rules in the specified subscription. + + Lists all data collection rules in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionRules'} # type: ignore + + async def get( + self, + resource_group_name: str, + data_collection_rule_name: str, + **kwargs: Any + ) -> "_models.DataCollectionRuleResource": + """Returns the specified data collection rule. + + Returns the specified data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore + + async def create( + self, + resource_group_name: str, + data_collection_rule_name: str, + body: Optional["_models.DataCollectionRuleResource"] = None, + **kwargs: Any + ) -> "_models.DataCollectionRuleResource": + """Creates or updates a data collection rule. + + Creates or updates a data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionRuleResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + data_collection_rule_name: str, + body: Optional["_models.ResourceForUpdate"] = None, + **kwargs: Any + ) -> "_models.DataCollectionRuleResource": + """Updates part of a data collection rule. + + Updates part of a data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'ResourceForUpdate') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + data_collection_rule_name: str, + **kwargs: Any + ) -> None: + """Deletes a data collection rule. + + Deletes a data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/__init__.py new file mode 100644 index 000000000000..7a45f54ae725 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/__init__.py @@ -0,0 +1,158 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AzureMonitorMetricsDestination + from ._models_py3 import ConfigurationAccessEndpointSpec + from ._models_py3 import DataCollectionEndpoint + from ._models_py3 import DataCollectionEndpointConfigurationAccess + from ._models_py3 import DataCollectionEndpointLogsIngestion + from ._models_py3 import DataCollectionEndpointNetworkAcls + from ._models_py3 import DataCollectionEndpointResource + from ._models_py3 import DataCollectionEndpointResourceListResult + from ._models_py3 import DataCollectionEndpointResourceProperties + from ._models_py3 import DataCollectionEndpointResourceSystemData + from ._models_py3 import DataCollectionRule + from ._models_py3 import DataCollectionRuleAssociation + from ._models_py3 import DataCollectionRuleAssociationProxyOnlyResource + from ._models_py3 import DataCollectionRuleAssociationProxyOnlyResourceListResult + from ._models_py3 import DataCollectionRuleAssociationProxyOnlyResourceProperties + from ._models_py3 import DataCollectionRuleAssociationProxyOnlyResourceSystemData + from ._models_py3 import DataCollectionRuleDataSources + from ._models_py3 import DataCollectionRuleDestinations + from ._models_py3 import DataCollectionRuleResource + from ._models_py3 import DataCollectionRuleResourceListResult + from ._models_py3 import DataCollectionRuleResourceProperties + from ._models_py3 import DataCollectionRuleResourceSystemData + from ._models_py3 import DataFlow + from ._models_py3 import DataSourcesSpec + from ._models_py3 import DestinationsSpec + from ._models_py3 import DestinationsSpecAzureMonitorMetrics + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorResponseCommonV2 + from ._models_py3 import ExtensionDataSource + from ._models_py3 import LogAnalyticsDestination + from ._models_py3 import LogsIngestionEndpointSpec + from ._models_py3 import NetworkRuleSet + from ._models_py3 import PerfCounterDataSource + from ._models_py3 import ResourceForUpdate + from ._models_py3 import SyslogDataSource + from ._models_py3 import SystemData + from ._models_py3 import WindowsEventLogDataSource +except (SyntaxError, ImportError): + from ._models import AzureMonitorMetricsDestination # type: ignore + from ._models import ConfigurationAccessEndpointSpec # type: ignore + from ._models import DataCollectionEndpoint # type: ignore + from ._models import DataCollectionEndpointConfigurationAccess # type: ignore + from ._models import DataCollectionEndpointLogsIngestion # type: ignore + from ._models import DataCollectionEndpointNetworkAcls # type: ignore + from ._models import DataCollectionEndpointResource # type: ignore + from ._models import DataCollectionEndpointResourceListResult # type: ignore + from ._models import DataCollectionEndpointResourceProperties # type: ignore + from ._models import DataCollectionEndpointResourceSystemData # type: ignore + from ._models import DataCollectionRule # type: ignore + from ._models import DataCollectionRuleAssociation # type: ignore + from ._models import DataCollectionRuleAssociationProxyOnlyResource # type: ignore + from ._models import DataCollectionRuleAssociationProxyOnlyResourceListResult # type: ignore + from ._models import DataCollectionRuleAssociationProxyOnlyResourceProperties # type: ignore + from ._models import DataCollectionRuleAssociationProxyOnlyResourceSystemData # type: ignore + from ._models import DataCollectionRuleDataSources # type: ignore + from ._models import DataCollectionRuleDestinations # type: ignore + from ._models import DataCollectionRuleResource # type: ignore + from ._models import DataCollectionRuleResourceListResult # type: ignore + from ._models import DataCollectionRuleResourceProperties # type: ignore + from ._models import DataCollectionRuleResourceSystemData # type: ignore + from ._models import DataFlow # type: ignore + from ._models import DataSourcesSpec # type: ignore + from ._models import DestinationsSpec # type: ignore + from ._models import DestinationsSpecAzureMonitorMetrics # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ErrorResponseCommonV2 # type: ignore + from ._models import ExtensionDataSource # type: ignore + from ._models import LogAnalyticsDestination # type: ignore + from ._models import LogsIngestionEndpointSpec # type: ignore + from ._models import NetworkRuleSet # type: ignore + from ._models import PerfCounterDataSource # type: ignore + from ._models import ResourceForUpdate # type: ignore + from ._models import SyslogDataSource # type: ignore + from ._models import SystemData # type: ignore + from ._models import WindowsEventLogDataSource # type: ignore + +from ._monitor_management_client_enums import ( + CreatedByType, + KnownDataCollectionEndpointProvisioningState, + KnownDataCollectionEndpointResourceKind, + KnownDataCollectionRuleAssociationProvisioningState, + KnownDataCollectionRuleProvisioningState, + KnownDataCollectionRuleResourceKind, + KnownDataFlowStreams, + KnownExtensionDataSourceStreams, + KnownPerfCounterDataSourceStreams, + KnownPublicNetworkAccessOptions, + KnownSyslogDataSourceFacilityNames, + KnownSyslogDataSourceLogLevels, + KnownSyslogDataSourceStreams, + KnownWindowsEventLogDataSourceStreams, +) + +__all__ = [ + 'AzureMonitorMetricsDestination', + 'ConfigurationAccessEndpointSpec', + 'DataCollectionEndpoint', + 'DataCollectionEndpointConfigurationAccess', + 'DataCollectionEndpointLogsIngestion', + 'DataCollectionEndpointNetworkAcls', + 'DataCollectionEndpointResource', + 'DataCollectionEndpointResourceListResult', + 'DataCollectionEndpointResourceProperties', + 'DataCollectionEndpointResourceSystemData', + 'DataCollectionRule', + 'DataCollectionRuleAssociation', + 'DataCollectionRuleAssociationProxyOnlyResource', + 'DataCollectionRuleAssociationProxyOnlyResourceListResult', + 'DataCollectionRuleAssociationProxyOnlyResourceProperties', + 'DataCollectionRuleAssociationProxyOnlyResourceSystemData', + 'DataCollectionRuleDataSources', + 'DataCollectionRuleDestinations', + 'DataCollectionRuleResource', + 'DataCollectionRuleResourceListResult', + 'DataCollectionRuleResourceProperties', + 'DataCollectionRuleResourceSystemData', + 'DataFlow', + 'DataSourcesSpec', + 'DestinationsSpec', + 'DestinationsSpecAzureMonitorMetrics', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorResponseCommonV2', + 'ExtensionDataSource', + 'LogAnalyticsDestination', + 'LogsIngestionEndpointSpec', + 'NetworkRuleSet', + 'PerfCounterDataSource', + 'ResourceForUpdate', + 'SyslogDataSource', + 'SystemData', + 'WindowsEventLogDataSource', + 'CreatedByType', + 'KnownDataCollectionEndpointProvisioningState', + 'KnownDataCollectionEndpointResourceKind', + 'KnownDataCollectionRuleAssociationProvisioningState', + 'KnownDataCollectionRuleProvisioningState', + 'KnownDataCollectionRuleResourceKind', + 'KnownDataFlowStreams', + 'KnownExtensionDataSourceStreams', + 'KnownPerfCounterDataSourceStreams', + 'KnownPublicNetworkAccessOptions', + 'KnownSyslogDataSourceFacilityNames', + 'KnownSyslogDataSourceLogLevels', + 'KnownSyslogDataSourceStreams', + 'KnownWindowsEventLogDataSourceStreams', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models.py new file mode 100644 index 000000000000..ebdaea572762 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models.py @@ -0,0 +1,1386 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AzureMonitorMetricsDestination(msrest.serialization.Model): + """Azure Monitor Metrics destination. + + :param name: A friendly name for the destination. + This name should be unique across all destinations (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureMonitorMetricsDestination, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class ConfigurationAccessEndpointSpec(msrest.serialization.Model): + """Definition of the endpoint used for accessing configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigurationAccessEndpointSpec, self).__init__(**kwargs) + self.endpoint = None + + +class DataCollectionEndpoint(msrest.serialization.Model): + """Definition of data collection endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + :param network_acls: Network access control rules for the endpoints. + :type network_acls: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'configurationAccess', 'type': 'DataCollectionEndpointConfigurationAccess'}, + 'logs_ingestion': {'key': 'logsIngestion', 'type': 'DataCollectionEndpointLogsIngestion'}, + 'network_acls': {'key': 'networkAcls', 'type': 'DataCollectionEndpointNetworkAcls'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpoint, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.immutable_id = kwargs.get('immutable_id', None) + self.configuration_access = kwargs.get('configuration_access', None) + self.logs_ingestion = kwargs.get('logs_ingestion', None) + self.network_acls = kwargs.get('network_acls', None) + self.provisioning_state = None + + +class DataCollectionEndpointConfigurationAccess(ConfigurationAccessEndpointSpec): + """The endpoint used by agents to access their configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointConfigurationAccess, self).__init__(**kwargs) + + +class LogsIngestionEndpointSpec(msrest.serialization.Model): + """Definition of the endpoint used for ingesting logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogsIngestionEndpointSpec, self).__init__(**kwargs) + self.endpoint = None + + +class DataCollectionEndpointLogsIngestion(LogsIngestionEndpointSpec): + """The endpoint used by clients to ingest logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointLogsIngestion, self).__init__(**kwargs) + + +class NetworkRuleSet(msrest.serialization.Model): + """Definition of the network rules. + + :param public_network_access: The configuration to set whether network access from public + internet to the endpoints are allowed. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~$(python-base-namespace).v2021_04_01.models.KnownPublicNetworkAccessOptions + """ + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.public_network_access = kwargs.get('public_network_access', None) + + +class DataCollectionEndpointNetworkAcls(NetworkRuleSet): + """Network access control rules for the endpoints. + + :param public_network_access: The configuration to set whether network access from public + internet to the endpoints are allowed. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~$(python-base-namespace).v2021_04_01.models.KnownPublicNetworkAccessOptions + """ + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointNetworkAcls, self).__init__(**kwargs) + + +class DataCollectionEndpointResource(msrest.serialization.Model): + """Definition of ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The geo-location where the resource lives. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointResourceKind + :ivar id: Fully qualified ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: Resource entity tag (ETag). + :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResourceSystemData + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + :param network_acls: Network access control rules for the endpoints. + :type network_acls: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'DataCollectionEndpointResourceSystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'properties.configurationAccess', 'type': 'DataCollectionEndpointConfigurationAccess'}, + 'logs_ingestion': {'key': 'properties.logsIngestion', 'type': 'DataCollectionEndpointLogsIngestion'}, + 'network_acls': {'key': 'properties.networkAcls', 'type': 'DataCollectionEndpointNetworkAcls'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointResource, self).__init__(**kwargs) + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.kind = kwargs.get('kind', None) + self.id = None + self.name = None + self.type = None + self.etag = None + self.system_data = None + self.description = kwargs.get('description', None) + self.immutable_id = kwargs.get('immutable_id', None) + self.configuration_access = kwargs.get('configuration_access', None) + self.logs_ingestion = kwargs.get('logs_ingestion', None) + self.network_acls = kwargs.get('network_acls', None) + self.provisioning_state = None + + +class DataCollectionEndpointResourceListResult(msrest.serialization.Model): + """A pageable list of resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of resources. + :type value: list[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataCollectionEndpointResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointResourceListResult, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class DataCollectionEndpointResourceProperties(DataCollectionEndpoint): + """Resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + :param network_acls: Network access control rules for the endpoints. + :type network_acls: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'configurationAccess', 'type': 'DataCollectionEndpointConfigurationAccess'}, + 'logs_ingestion': {'key': 'logsIngestion', 'type': 'DataCollectionEndpointLogsIngestion'}, + 'network_acls': {'key': 'networkAcls', 'type': 'DataCollectionEndpointNetworkAcls'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointResourceProperties, self).__init__(**kwargs) + + +class SystemData(msrest.serialization.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 DataCollectionEndpointResourceSystemData(SystemData): + """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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointResourceSystemData, self).__init__(**kwargs) + + +class DataCollectionRule(msrest.serialization.Model): + """Definition of what monitoring data to collect and where that data should be sent. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection rule. + :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str + :param data_sources: The specification of data sources. + This property is optional and can be omitted if the rule is meant to be used via direct calls + to the provisioned endpoint. + :type data_sources: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. + :type data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleProvisioningState + """ + + _validation = { + 'immutable_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'data_sources': {'key': 'dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'destinations', 'type': 'DataCollectionRuleDestinations'}, + 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRule, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.immutable_id = None + self.data_sources = kwargs.get('data_sources', None) + self.destinations = kwargs.get('destinations', None) + self.data_flows = kwargs.get('data_flows', None) + self.provisioning_state = None + + +class DataCollectionRuleAssociation(msrest.serialization.Model): + """Definition of association of a data collection rule with a monitored Azure resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the association. + :type description: str + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. + :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'data_collection_rule_id': {'key': 'dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'dataCollectionEndpointId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleAssociation, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.data_collection_rule_id = kwargs.get('data_collection_rule_id', None) + self.data_collection_endpoint_id = kwargs.get('data_collection_endpoint_id', None) + self.provisioning_state = None + + +class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model): + """Definition of generic ARM proxy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: Resource entity tag (ETag). + :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResourceSystemData + :param description: Description of the association. + :type description: str + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. + :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'DataCollectionRuleAssociationProxyOnlyResourceSystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'data_collection_rule_id': {'key': 'properties.dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'properties.dataCollectionEndpointId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + self.system_data = None + self.description = kwargs.get('description', None) + self.data_collection_rule_id = kwargs.get('data_collection_rule_id', None) + self.data_collection_endpoint_id = kwargs.get('data_collection_endpoint_id', None) + self.provisioning_state = None + + +class DataCollectionRuleAssociationProxyOnlyResourceListResult(msrest.serialization.Model): + """A pageable list of resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of resources. + :type value: + list[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataCollectionRuleAssociationProxyOnlyResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResourceListResult, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRuleAssociation): + """Resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the association. + :type description: str + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. + :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'data_collection_rule_id': {'key': 'dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'dataCollectionEndpointId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResourceProperties, self).__init__(**kwargs) + + +class DataCollectionRuleAssociationProxyOnlyResourceSystemData(SystemData): + """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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResourceSystemData, self).__init__(**kwargs) + + +class DataSourcesSpec(msrest.serialization.Model): + """Specification of data sources that will be collected. + + :param performance_counters: The list of performance counter data source configurations. + :type performance_counters: + list[~$(python-base-namespace).v2021_04_01.models.PerfCounterDataSource] + :param windows_event_logs: The list of Windows Event Log data source configurations. + :type windows_event_logs: + list[~$(python-base-namespace).v2021_04_01.models.WindowsEventLogDataSource] + :param syslog: The list of Syslog data source configurations. + :type syslog: list[~$(python-base-namespace).v2021_04_01.models.SyslogDataSource] + :param extensions: The list of Azure VM extension data source configurations. + :type extensions: list[~$(python-base-namespace).v2021_04_01.models.ExtensionDataSource] + """ + + _attribute_map = { + 'performance_counters': {'key': 'performanceCounters', 'type': '[PerfCounterDataSource]'}, + 'windows_event_logs': {'key': 'windowsEventLogs', 'type': '[WindowsEventLogDataSource]'}, + 'syslog': {'key': 'syslog', 'type': '[SyslogDataSource]'}, + 'extensions': {'key': 'extensions', 'type': '[ExtensionDataSource]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataSourcesSpec, self).__init__(**kwargs) + self.performance_counters = kwargs.get('performance_counters', None) + self.windows_event_logs = kwargs.get('windows_event_logs', None) + self.syslog = kwargs.get('syslog', None) + self.extensions = kwargs.get('extensions', None) + + +class DataCollectionRuleDataSources(DataSourcesSpec): + """The specification of data sources. +This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. + + :param performance_counters: The list of performance counter data source configurations. + :type performance_counters: + list[~$(python-base-namespace).v2021_04_01.models.PerfCounterDataSource] + :param windows_event_logs: The list of Windows Event Log data source configurations. + :type windows_event_logs: + list[~$(python-base-namespace).v2021_04_01.models.WindowsEventLogDataSource] + :param syslog: The list of Syslog data source configurations. + :type syslog: list[~$(python-base-namespace).v2021_04_01.models.SyslogDataSource] + :param extensions: The list of Azure VM extension data source configurations. + :type extensions: list[~$(python-base-namespace).v2021_04_01.models.ExtensionDataSource] + """ + + _attribute_map = { + 'performance_counters': {'key': 'performanceCounters', 'type': '[PerfCounterDataSource]'}, + 'windows_event_logs': {'key': 'windowsEventLogs', 'type': '[WindowsEventLogDataSource]'}, + 'syslog': {'key': 'syslog', 'type': '[SyslogDataSource]'}, + 'extensions': {'key': 'extensions', 'type': '[ExtensionDataSource]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleDataSources, self).__init__(**kwargs) + + +class DestinationsSpec(msrest.serialization.Model): + """Specification of destinations that can be used in data flows. + + :param log_analytics: List of Log Analytics destinations. + :type log_analytics: list[~$(python-base-namespace).v2021_04_01.models.LogAnalyticsDestination] + :param azure_monitor_metrics: Azure Monitor Metrics destination. + :type azure_monitor_metrics: + ~$(python-base-namespace).v2021_04_01.models.DestinationsSpecAzureMonitorMetrics + """ + + _attribute_map = { + 'log_analytics': {'key': 'logAnalytics', 'type': '[LogAnalyticsDestination]'}, + 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'DestinationsSpecAzureMonitorMetrics'}, + } + + def __init__( + self, + **kwargs + ): + super(DestinationsSpec, self).__init__(**kwargs) + self.log_analytics = kwargs.get('log_analytics', None) + self.azure_monitor_metrics = kwargs.get('azure_monitor_metrics', None) + + +class DataCollectionRuleDestinations(DestinationsSpec): + """The specification of destinations. + + :param log_analytics: List of Log Analytics destinations. + :type log_analytics: list[~$(python-base-namespace).v2021_04_01.models.LogAnalyticsDestination] + :param azure_monitor_metrics: Azure Monitor Metrics destination. + :type azure_monitor_metrics: + ~$(python-base-namespace).v2021_04_01.models.DestinationsSpecAzureMonitorMetrics + """ + + _attribute_map = { + 'log_analytics': {'key': 'logAnalytics', 'type': '[LogAnalyticsDestination]'}, + 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'DestinationsSpecAzureMonitorMetrics'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleDestinations, self).__init__(**kwargs) + + +class DataCollectionRuleResource(msrest.serialization.Model): + """Definition of ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The geo-location where the resource lives. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleResourceKind + :ivar id: Fully qualified ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: Resource entity tag (ETag). + :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResourceSystemData + :param description: Description of the data collection rule. + :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str + :param data_sources: The specification of data sources. + This property is optional and can be omitted if the rule is meant to be used via direct calls + to the provisioned endpoint. + :type data_sources: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. + :type data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleProvisioningState + """ + + _validation = { + 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'immutable_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'DataCollectionRuleResourceSystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, + 'data_sources': {'key': 'properties.dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'properties.destinations', 'type': 'DataCollectionRuleDestinations'}, + 'data_flows': {'key': 'properties.dataFlows', 'type': '[DataFlow]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleResource, self).__init__(**kwargs) + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.kind = kwargs.get('kind', None) + self.id = None + self.name = None + self.type = None + self.etag = None + self.system_data = None + self.description = kwargs.get('description', None) + self.immutable_id = None + self.data_sources = kwargs.get('data_sources', None) + self.destinations = kwargs.get('destinations', None) + self.data_flows = kwargs.get('data_flows', None) + self.provisioning_state = None + + +class DataCollectionRuleResourceListResult(msrest.serialization.Model): + """A pageable list of resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of resources. + :type value: list[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataCollectionRuleResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleResourceListResult, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class DataCollectionRuleResourceProperties(DataCollectionRule): + """Resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection rule. + :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str + :param data_sources: The specification of data sources. + This property is optional and can be omitted if the rule is meant to be used via direct calls + to the provisioned endpoint. + :type data_sources: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. + :type data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleProvisioningState + """ + + _validation = { + 'immutable_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'data_sources': {'key': 'dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'destinations', 'type': 'DataCollectionRuleDestinations'}, + 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleResourceProperties, self).__init__(**kwargs) + + +class DataCollectionRuleResourceSystemData(SystemData): + """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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionRuleResourceSystemData, self).__init__(**kwargs) + + +class DataFlow(msrest.serialization.Model): + """Definition of which streams are sent to which destinations. + + :param streams: List of streams for this data flow. + :type streams: list[str or ~$(python-base-namespace).v2021_04_01.models.KnownDataFlowStreams] + :param destinations: List of destinations for this data flow. + :type destinations: list[str] + """ + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DataFlow, self).__init__(**kwargs) + self.streams = kwargs.get('streams', None) + self.destinations = kwargs.get('destinations', None) + + +class DestinationsSpecAzureMonitorMetrics(AzureMonitorMetricsDestination): + """Azure Monitor Metrics destination. + + :param name: A friendly name for the destination. + This name should be unique across all destinations (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DestinationsSpecAzureMonitorMetrics, self).__init__(**kwargs) + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~$(python-base-namespace).v2021_04_01.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~$(python-base-namespace).v2021_04_01.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponseCommonV2(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~$(python-base-namespace).v2021_04_01.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponseCommonV2, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class ExtensionDataSource(msrest.serialization.Model): + """Definition of which data will be collected from a separate VM extension that integrates with the Azure Monitor Agent. +Collected from either Windows and Linux machines, depending on which extension is defined. + + All required parameters must be populated in order to send to Azure. + + :param streams: List of streams that this data source will be sent to. + A stream indicates what schema will be used for this data and usually what table in Log + Analytics the data will be sent to. + :type streams: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownExtensionDataSourceStreams] + :param extension_name: Required. The name of the VM extension. + :type extension_name: str + :param extension_settings: The extension settings. The format is specific for particular + extension. + :type extension_settings: any + :param input_data_sources: The list of data sources this extension needs data from. + :type input_data_sources: list[str] + :param name: A friendly name for the data source. + This name should be unique across all data sources (regardless of type) within the data + collection rule. + :type name: str + """ + + _validation = { + 'extension_name': {'required': True}, + } + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'extension_settings': {'key': 'extensionSettings', 'type': 'object'}, + 'input_data_sources': {'key': 'inputDataSources', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExtensionDataSource, self).__init__(**kwargs) + self.streams = kwargs.get('streams', None) + self.extension_name = kwargs['extension_name'] + self.extension_settings = kwargs.get('extension_settings', None) + self.input_data_sources = kwargs.get('input_data_sources', None) + self.name = kwargs.get('name', None) + + +class LogAnalyticsDestination(msrest.serialization.Model): + """Log Analytics destination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param workspace_resource_id: The resource ID of the Log Analytics workspace. + :type workspace_resource_id: str + :ivar workspace_id: The Customer ID of the Log Analytics workspace. + :vartype workspace_id: str + :param name: A friendly name for the destination. + This name should be unique across all destinations (regardless of type) within the data + collection rule. + :type name: str + """ + + _validation = { + 'workspace_id': {'readonly': True}, + } + + _attribute_map = { + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogAnalyticsDestination, self).__init__(**kwargs) + self.workspace_resource_id = kwargs.get('workspace_resource_id', None) + self.workspace_id = None + self.name = kwargs.get('name', None) + + +class PerfCounterDataSource(msrest.serialization.Model): + """Definition of which performance counters will be collected and how they will be collected by this data collection rule. +Collected from both Windows and Linux machines where the counter is present. + + :param streams: List of streams that this data source will be sent to. + A stream indicates what schema will be used for this data and usually what table in Log + Analytics the data will be sent to. + :type streams: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownPerfCounterDataSourceStreams] + :param sampling_frequency_in_seconds: The number of seconds between consecutive counter + measurements (samples). + :type sampling_frequency_in_seconds: int + :param counter_specifiers: A list of specifier names of the performance counters you want to + collect. + Use a wildcard (*) to collect a counter for all instances. + To get a list of performance counters on Windows, run the command 'typeperf'. + :type counter_specifiers: list[str] + :param name: A friendly name for the data source. + This name should be unique across all data sources (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'sampling_frequency_in_seconds': {'key': 'samplingFrequencyInSeconds', 'type': 'int'}, + 'counter_specifiers': {'key': 'counterSpecifiers', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PerfCounterDataSource, self).__init__(**kwargs) + self.streams = kwargs.get('streams', None) + self.sampling_frequency_in_seconds = kwargs.get('sampling_frequency_in_seconds', None) + self.counter_specifiers = kwargs.get('counter_specifiers', None) + self.name = kwargs.get('name', None) + + +class ResourceForUpdate(msrest.serialization.Model): + """Definition of ARM tracked top level resource properties for update operation. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceForUpdate, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class SyslogDataSource(msrest.serialization.Model): + """Definition of which syslog data will be collected and how it will be collected. +Only collected from Linux machines. + + :param streams: List of streams that this data source will be sent to. + A stream indicates what schema will be used for this data and usually what table in Log + Analytics the data will be sent to. + :type streams: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceStreams] + :param facility_names: The list of facility names. + :type facility_names: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceFacilityNames] + :param log_levels: The log levels to collect. + :type log_levels: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceLogLevels] + :param name: A friendly name for the data source. + This name should be unique across all data sources (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'facility_names': {'key': 'facilityNames', 'type': '[str]'}, + 'log_levels': {'key': 'logLevels', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SyslogDataSource, self).__init__(**kwargs) + self.streams = kwargs.get('streams', None) + self.facility_names = kwargs.get('facility_names', None) + self.log_levels = kwargs.get('log_levels', None) + self.name = kwargs.get('name', None) + + +class WindowsEventLogDataSource(msrest.serialization.Model): + """Definition of which Windows Event Log events will be collected and how they will be collected. +Only collected from Windows machines. + + :param streams: List of streams that this data source will be sent to. + A stream indicates what schema will be used for this data and usually what table in Log + Analytics the data will be sent to. + :type streams: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownWindowsEventLogDataSourceStreams] + :param x_path_queries: A list of Windows Event Log queries in XPATH format. + :type x_path_queries: list[str] + :param name: A friendly name for the data source. + This name should be unique across all data sources (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'x_path_queries': {'key': 'xPathQueries', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WindowsEventLogDataSource, self).__init__(**kwargs) + self.streams = kwargs.get('streams', None) + self.x_path_queries = kwargs.get('x_path_queries', None) + self.name = kwargs.get('name', None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models_py3.py new file mode 100644 index 000000000000..b0edf7f37ce6 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_models_py3.py @@ -0,0 +1,1533 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Any, Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._monitor_management_client_enums import * + + +class AzureMonitorMetricsDestination(msrest.serialization.Model): + """Azure Monitor Metrics destination. + + :param name: A friendly name for the destination. + This name should be unique across all destinations (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(AzureMonitorMetricsDestination, self).__init__(**kwargs) + self.name = name + + +class ConfigurationAccessEndpointSpec(msrest.serialization.Model): + """Definition of the endpoint used for accessing configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigurationAccessEndpointSpec, self).__init__(**kwargs) + self.endpoint = None + + +class DataCollectionEndpoint(msrest.serialization.Model): + """Definition of data collection endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + :param network_acls: Network access control rules for the endpoints. + :type network_acls: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'configurationAccess', 'type': 'DataCollectionEndpointConfigurationAccess'}, + 'logs_ingestion': {'key': 'logsIngestion', 'type': 'DataCollectionEndpointLogsIngestion'}, + 'network_acls': {'key': 'networkAcls', 'type': 'DataCollectionEndpointNetworkAcls'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + immutable_id: Optional[str] = None, + configuration_access: Optional["DataCollectionEndpointConfigurationAccess"] = None, + logs_ingestion: Optional["DataCollectionEndpointLogsIngestion"] = None, + network_acls: Optional["DataCollectionEndpointNetworkAcls"] = None, + **kwargs + ): + super(DataCollectionEndpoint, self).__init__(**kwargs) + self.description = description + self.immutable_id = immutable_id + self.configuration_access = configuration_access + self.logs_ingestion = logs_ingestion + self.network_acls = network_acls + self.provisioning_state = None + + +class DataCollectionEndpointConfigurationAccess(ConfigurationAccessEndpointSpec): + """The endpoint used by agents to access their configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointConfigurationAccess, self).__init__(**kwargs) + + +class LogsIngestionEndpointSpec(msrest.serialization.Model): + """Definition of the endpoint used for ingesting logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogsIngestionEndpointSpec, self).__init__(**kwargs) + self.endpoint = None + + +class DataCollectionEndpointLogsIngestion(LogsIngestionEndpointSpec): + """The endpoint used by clients to ingest logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar endpoint: The endpoint. This property is READ-ONLY. + :vartype endpoint: str + """ + + _validation = { + 'endpoint': {'readonly': True}, + } + + _attribute_map = { + 'endpoint': {'key': 'endpoint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DataCollectionEndpointLogsIngestion, self).__init__(**kwargs) + + +class NetworkRuleSet(msrest.serialization.Model): + """Definition of the network rules. + + :param public_network_access: The configuration to set whether network access from public + internet to the endpoints are allowed. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~$(python-base-namespace).v2021_04_01.models.KnownPublicNetworkAccessOptions + """ + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + public_network_access: Optional[Union[str, "KnownPublicNetworkAccessOptions"]] = None, + **kwargs + ): + super(NetworkRuleSet, self).__init__(**kwargs) + self.public_network_access = public_network_access + + +class DataCollectionEndpointNetworkAcls(NetworkRuleSet): + """Network access control rules for the endpoints. + + :param public_network_access: The configuration to set whether network access from public + internet to the endpoints are allowed. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or + ~$(python-base-namespace).v2021_04_01.models.KnownPublicNetworkAccessOptions + """ + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + public_network_access: Optional[Union[str, "KnownPublicNetworkAccessOptions"]] = None, + **kwargs + ): + super(DataCollectionEndpointNetworkAcls, self).__init__(public_network_access=public_network_access, **kwargs) + + +class DataCollectionEndpointResource(msrest.serialization.Model): + """Definition of ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The geo-location where the resource lives. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointResourceKind + :ivar id: Fully qualified ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: Resource entity tag (ETag). + :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResourceSystemData + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + :param network_acls: Network access control rules for the endpoints. + :type network_acls: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'DataCollectionEndpointResourceSystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'properties.configurationAccess', 'type': 'DataCollectionEndpointConfigurationAccess'}, + 'logs_ingestion': {'key': 'properties.logsIngestion', 'type': 'DataCollectionEndpointLogsIngestion'}, + 'network_acls': {'key': 'properties.networkAcls', 'type': 'DataCollectionEndpointNetworkAcls'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kind: Optional[Union[str, "KnownDataCollectionEndpointResourceKind"]] = None, + description: Optional[str] = None, + immutable_id: Optional[str] = None, + configuration_access: Optional["DataCollectionEndpointConfigurationAccess"] = None, + logs_ingestion: Optional["DataCollectionEndpointLogsIngestion"] = None, + network_acls: Optional["DataCollectionEndpointNetworkAcls"] = None, + **kwargs + ): + super(DataCollectionEndpointResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.kind = kind + self.id = None + self.name = None + self.type = None + self.etag = None + self.system_data = None + self.description = description + self.immutable_id = immutable_id + self.configuration_access = configuration_access + self.logs_ingestion = logs_ingestion + self.network_acls = network_acls + self.provisioning_state = None + + +class DataCollectionEndpointResourceListResult(msrest.serialization.Model): + """A pageable list of resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of resources. + :type value: list[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataCollectionEndpointResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DataCollectionEndpointResource"], + next_link: Optional[str] = None, + **kwargs + ): + super(DataCollectionEndpointResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DataCollectionEndpointResourceProperties(DataCollectionEndpoint): + """Resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection endpoint. + :type description: str + :param immutable_id: The immutable ID of this data collection endpoint resource. This property + is READ-ONLY. + :type immutable_id: str + :param configuration_access: The endpoint used by agents to access their configuration. + :type configuration_access: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointConfigurationAccess + :param logs_ingestion: The endpoint used by clients to ingest logs. + :type logs_ingestion: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointLogsIngestion + :param network_acls: Network access control rules for the endpoints. + :type network_acls: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointNetworkAcls + :ivar provisioning_state: The resource provisioning state. This property is READ-ONLY. Possible + values include: "Creating", "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionEndpointProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'configuration_access': {'key': 'configurationAccess', 'type': 'DataCollectionEndpointConfigurationAccess'}, + 'logs_ingestion': {'key': 'logsIngestion', 'type': 'DataCollectionEndpointLogsIngestion'}, + 'network_acls': {'key': 'networkAcls', 'type': 'DataCollectionEndpointNetworkAcls'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + immutable_id: Optional[str] = None, + configuration_access: Optional["DataCollectionEndpointConfigurationAccess"] = None, + logs_ingestion: Optional["DataCollectionEndpointLogsIngestion"] = None, + network_acls: Optional["DataCollectionEndpointNetworkAcls"] = None, + **kwargs + ): + super(DataCollectionEndpointResourceProperties, self).__init__(description=description, immutable_id=immutable_id, configuration_access=configuration_access, logs_ingestion=logs_ingestion, network_acls=network_acls, **kwargs) + + +class SystemData(msrest.serialization.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 DataCollectionEndpointResourceSystemData(SystemData): + """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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(DataCollectionEndpointResourceSystemData, self).__init__(created_by=created_by, created_by_type=created_by_type, created_at=created_at, last_modified_by=last_modified_by, last_modified_by_type=last_modified_by_type, last_modified_at=last_modified_at, **kwargs) + + +class DataCollectionRule(msrest.serialization.Model): + """Definition of what monitoring data to collect and where that data should be sent. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection rule. + :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str + :param data_sources: The specification of data sources. + This property is optional and can be omitted if the rule is meant to be used via direct calls + to the provisioned endpoint. + :type data_sources: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. + :type data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleProvisioningState + """ + + _validation = { + 'immutable_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'data_sources': {'key': 'dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'destinations', 'type': 'DataCollectionRuleDestinations'}, + 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + data_sources: Optional["DataCollectionRuleDataSources"] = None, + destinations: Optional["DataCollectionRuleDestinations"] = None, + data_flows: Optional[List["DataFlow"]] = None, + **kwargs + ): + super(DataCollectionRule, self).__init__(**kwargs) + self.description = description + self.immutable_id = None + self.data_sources = data_sources + self.destinations = destinations + self.data_flows = data_flows + self.provisioning_state = None + + +class DataCollectionRuleAssociation(msrest.serialization.Model): + """Definition of association of a data collection rule with a monitored Azure resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the association. + :type description: str + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. + :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'data_collection_rule_id': {'key': 'dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'dataCollectionEndpointId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + data_collection_rule_id: Optional[str] = None, + data_collection_endpoint_id: Optional[str] = None, + **kwargs + ): + super(DataCollectionRuleAssociation, self).__init__(**kwargs) + self.description = description + self.data_collection_rule_id = data_collection_rule_id + self.data_collection_endpoint_id = data_collection_endpoint_id + self.provisioning_state = None + + +class DataCollectionRuleAssociationProxyOnlyResource(msrest.serialization.Model): + """Definition of generic ARM proxy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: Resource entity tag (ETag). + :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResourceSystemData + :param description: Description of the association. + :type description: str + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. + :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'DataCollectionRuleAssociationProxyOnlyResourceSystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'data_collection_rule_id': {'key': 'properties.dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'properties.dataCollectionEndpointId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + data_collection_rule_id: Optional[str] = None, + data_collection_endpoint_id: Optional[str] = None, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + self.system_data = None + self.description = description + self.data_collection_rule_id = data_collection_rule_id + self.data_collection_endpoint_id = data_collection_endpoint_id + self.provisioning_state = None + + +class DataCollectionRuleAssociationProxyOnlyResourceListResult(msrest.serialization.Model): + """A pageable list of resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of resources. + :type value: + list[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataCollectionRuleAssociationProxyOnlyResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DataCollectionRuleAssociationProxyOnlyResource"], + next_link: Optional[str] = None, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DataCollectionRuleAssociationProxyOnlyResourceProperties(DataCollectionRuleAssociation): + """Resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the association. + :type description: str + :param data_collection_rule_id: The resource ID of the data collection rule that is to be + associated. + :type data_collection_rule_id: str + :param data_collection_endpoint_id: The resource ID of the data collection endpoint that is to + be associated. + :type data_collection_endpoint_id: str + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleAssociationProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'data_collection_rule_id': {'key': 'dataCollectionRuleId', 'type': 'str'}, + 'data_collection_endpoint_id': {'key': 'dataCollectionEndpointId', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + data_collection_rule_id: Optional[str] = None, + data_collection_endpoint_id: Optional[str] = None, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResourceProperties, self).__init__(description=description, data_collection_rule_id=data_collection_rule_id, data_collection_endpoint_id=data_collection_endpoint_id, **kwargs) + + +class DataCollectionRuleAssociationProxyOnlyResourceSystemData(SystemData): + """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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(DataCollectionRuleAssociationProxyOnlyResourceSystemData, self).__init__(created_by=created_by, created_by_type=created_by_type, created_at=created_at, last_modified_by=last_modified_by, last_modified_by_type=last_modified_by_type, last_modified_at=last_modified_at, **kwargs) + + +class DataSourcesSpec(msrest.serialization.Model): + """Specification of data sources that will be collected. + + :param performance_counters: The list of performance counter data source configurations. + :type performance_counters: + list[~$(python-base-namespace).v2021_04_01.models.PerfCounterDataSource] + :param windows_event_logs: The list of Windows Event Log data source configurations. + :type windows_event_logs: + list[~$(python-base-namespace).v2021_04_01.models.WindowsEventLogDataSource] + :param syslog: The list of Syslog data source configurations. + :type syslog: list[~$(python-base-namespace).v2021_04_01.models.SyslogDataSource] + :param extensions: The list of Azure VM extension data source configurations. + :type extensions: list[~$(python-base-namespace).v2021_04_01.models.ExtensionDataSource] + """ + + _attribute_map = { + 'performance_counters': {'key': 'performanceCounters', 'type': '[PerfCounterDataSource]'}, + 'windows_event_logs': {'key': 'windowsEventLogs', 'type': '[WindowsEventLogDataSource]'}, + 'syslog': {'key': 'syslog', 'type': '[SyslogDataSource]'}, + 'extensions': {'key': 'extensions', 'type': '[ExtensionDataSource]'}, + } + + def __init__( + self, + *, + performance_counters: Optional[List["PerfCounterDataSource"]] = None, + windows_event_logs: Optional[List["WindowsEventLogDataSource"]] = None, + syslog: Optional[List["SyslogDataSource"]] = None, + extensions: Optional[List["ExtensionDataSource"]] = None, + **kwargs + ): + super(DataSourcesSpec, self).__init__(**kwargs) + self.performance_counters = performance_counters + self.windows_event_logs = windows_event_logs + self.syslog = syslog + self.extensions = extensions + + +class DataCollectionRuleDataSources(DataSourcesSpec): + """The specification of data sources. +This property is optional and can be omitted if the rule is meant to be used via direct calls to the provisioned endpoint. + + :param performance_counters: The list of performance counter data source configurations. + :type performance_counters: + list[~$(python-base-namespace).v2021_04_01.models.PerfCounterDataSource] + :param windows_event_logs: The list of Windows Event Log data source configurations. + :type windows_event_logs: + list[~$(python-base-namespace).v2021_04_01.models.WindowsEventLogDataSource] + :param syslog: The list of Syslog data source configurations. + :type syslog: list[~$(python-base-namespace).v2021_04_01.models.SyslogDataSource] + :param extensions: The list of Azure VM extension data source configurations. + :type extensions: list[~$(python-base-namespace).v2021_04_01.models.ExtensionDataSource] + """ + + _attribute_map = { + 'performance_counters': {'key': 'performanceCounters', 'type': '[PerfCounterDataSource]'}, + 'windows_event_logs': {'key': 'windowsEventLogs', 'type': '[WindowsEventLogDataSource]'}, + 'syslog': {'key': 'syslog', 'type': '[SyslogDataSource]'}, + 'extensions': {'key': 'extensions', 'type': '[ExtensionDataSource]'}, + } + + def __init__( + self, + *, + performance_counters: Optional[List["PerfCounterDataSource"]] = None, + windows_event_logs: Optional[List["WindowsEventLogDataSource"]] = None, + syslog: Optional[List["SyslogDataSource"]] = None, + extensions: Optional[List["ExtensionDataSource"]] = None, + **kwargs + ): + super(DataCollectionRuleDataSources, self).__init__(performance_counters=performance_counters, windows_event_logs=windows_event_logs, syslog=syslog, extensions=extensions, **kwargs) + + +class DestinationsSpec(msrest.serialization.Model): + """Specification of destinations that can be used in data flows. + + :param log_analytics: List of Log Analytics destinations. + :type log_analytics: list[~$(python-base-namespace).v2021_04_01.models.LogAnalyticsDestination] + :param azure_monitor_metrics: Azure Monitor Metrics destination. + :type azure_monitor_metrics: + ~$(python-base-namespace).v2021_04_01.models.DestinationsSpecAzureMonitorMetrics + """ + + _attribute_map = { + 'log_analytics': {'key': 'logAnalytics', 'type': '[LogAnalyticsDestination]'}, + 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'DestinationsSpecAzureMonitorMetrics'}, + } + + def __init__( + self, + *, + log_analytics: Optional[List["LogAnalyticsDestination"]] = None, + azure_monitor_metrics: Optional["DestinationsSpecAzureMonitorMetrics"] = None, + **kwargs + ): + super(DestinationsSpec, self).__init__(**kwargs) + self.log_analytics = log_analytics + self.azure_monitor_metrics = azure_monitor_metrics + + +class DataCollectionRuleDestinations(DestinationsSpec): + """The specification of destinations. + + :param log_analytics: List of Log Analytics destinations. + :type log_analytics: list[~$(python-base-namespace).v2021_04_01.models.LogAnalyticsDestination] + :param azure_monitor_metrics: Azure Monitor Metrics destination. + :type azure_monitor_metrics: + ~$(python-base-namespace).v2021_04_01.models.DestinationsSpecAzureMonitorMetrics + """ + + _attribute_map = { + 'log_analytics': {'key': 'logAnalytics', 'type': '[LogAnalyticsDestination]'}, + 'azure_monitor_metrics': {'key': 'azureMonitorMetrics', 'type': 'DestinationsSpecAzureMonitorMetrics'}, + } + + def __init__( + self, + *, + log_analytics: Optional[List["LogAnalyticsDestination"]] = None, + azure_monitor_metrics: Optional["DestinationsSpecAzureMonitorMetrics"] = None, + **kwargs + ): + super(DataCollectionRuleDestinations, self).__init__(log_analytics=log_analytics, azure_monitor_metrics=azure_monitor_metrics, **kwargs) + + +class DataCollectionRuleResource(msrest.serialization.Model): + """Definition of ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param location: Required. The geo-location where the resource lives. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param kind: The kind of the resource. Possible values include: "Linux", "Windows". + :type kind: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleResourceKind + :ivar id: Fully qualified ID of the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :ivar etag: Resource entity tag (ETag). + :vartype etag: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: + ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResourceSystemData + :param description: Description of the data collection rule. + :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str + :param data_sources: The specification of data sources. + This property is optional and can be omitted if the rule is meant to be used via direct calls + to the provisioned endpoint. + :type data_sources: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. + :type data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleProvisioningState + """ + + _validation = { + 'location': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'immutable_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'DataCollectionRuleResourceSystemData'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'immutable_id': {'key': 'properties.immutableId', 'type': 'str'}, + 'data_sources': {'key': 'properties.dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'properties.destinations', 'type': 'DataCollectionRuleDestinations'}, + 'data_flows': {'key': 'properties.dataFlows', 'type': '[DataFlow]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + kind: Optional[Union[str, "KnownDataCollectionRuleResourceKind"]] = None, + description: Optional[str] = None, + data_sources: Optional["DataCollectionRuleDataSources"] = None, + destinations: Optional["DataCollectionRuleDestinations"] = None, + data_flows: Optional[List["DataFlow"]] = None, + **kwargs + ): + super(DataCollectionRuleResource, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.kind = kind + self.id = None + self.name = None + self.type = None + self.etag = None + self.system_data = None + self.description = description + self.immutable_id = None + self.data_sources = data_sources + self.destinations = destinations + self.data_flows = data_flows + self.provisioning_state = None + + +class DataCollectionRuleResourceListResult(msrest.serialization.Model): + """A pageable list of resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. A list of resources. + :type value: list[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource] + :param next_link: The URL to use for getting the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DataCollectionRuleResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["DataCollectionRuleResource"], + next_link: Optional[str] = None, + **kwargs + ): + super(DataCollectionRuleResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DataCollectionRuleResourceProperties(DataCollectionRule): + """Resource properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param description: Description of the data collection rule. + :type description: str + :ivar immutable_id: The immutable ID of this data collection rule. This property is READ-ONLY. + :vartype immutable_id: str + :param data_sources: The specification of data sources. + This property is optional and can be omitted if the rule is meant to be used via direct calls + to the provisioned endpoint. + :type data_sources: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDataSources + :param destinations: The specification of destinations. + :type destinations: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleDestinations + :param data_flows: The specification of data flows. + :type data_flows: list[~$(python-base-namespace).v2021_04_01.models.DataFlow] + :ivar provisioning_state: The resource provisioning state. Possible values include: "Creating", + "Updating", "Deleting", "Succeeded", "Failed". + :vartype provisioning_state: str or + ~$(python-base-namespace).v2021_04_01.models.KnownDataCollectionRuleProvisioningState + """ + + _validation = { + 'immutable_id': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'immutable_id': {'key': 'immutableId', 'type': 'str'}, + 'data_sources': {'key': 'dataSources', 'type': 'DataCollectionRuleDataSources'}, + 'destinations': {'key': 'destinations', 'type': 'DataCollectionRuleDestinations'}, + 'data_flows': {'key': 'dataFlows', 'type': '[DataFlow]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + description: Optional[str] = None, + data_sources: Optional["DataCollectionRuleDataSources"] = None, + destinations: Optional["DataCollectionRuleDestinations"] = None, + data_flows: Optional[List["DataFlow"]] = None, + **kwargs + ): + super(DataCollectionRuleResourceProperties, self).__init__(description=description, data_sources=data_sources, destinations=destinations, data_flows=data_flows, **kwargs) + + +class DataCollectionRuleResourceSystemData(SystemData): + """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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~$(python-base-namespace).v2021_04_01.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(DataCollectionRuleResourceSystemData, self).__init__(created_by=created_by, created_by_type=created_by_type, created_at=created_at, last_modified_by=last_modified_by, last_modified_by_type=last_modified_by_type, last_modified_at=last_modified_at, **kwargs) + + +class DataFlow(msrest.serialization.Model): + """Definition of which streams are sent to which destinations. + + :param streams: List of streams for this data flow. + :type streams: list[str or ~$(python-base-namespace).v2021_04_01.models.KnownDataFlowStreams] + :param destinations: List of destinations for this data flow. + :type destinations: list[str] + """ + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + } + + def __init__( + self, + *, + streams: Optional[List[Union[str, "KnownDataFlowStreams"]]] = None, + destinations: Optional[List[str]] = None, + **kwargs + ): + super(DataFlow, self).__init__(**kwargs) + self.streams = streams + self.destinations = destinations + + +class DestinationsSpecAzureMonitorMetrics(AzureMonitorMetricsDestination): + """Azure Monitor Metrics destination. + + :param name: A friendly name for the destination. + This name should be unique across all destinations (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(DestinationsSpecAzureMonitorMetrics, self).__init__(name=name, **kwargs) + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~$(python-base-namespace).v2021_04_01.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: + list[~$(python-base-namespace).v2021_04_01.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponseCommonV2(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~$(python-base-namespace).v2021_04_01.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponseCommonV2, self).__init__(**kwargs) + self.error = error + + +class ExtensionDataSource(msrest.serialization.Model): + """Definition of which data will be collected from a separate VM extension that integrates with the Azure Monitor Agent. +Collected from either Windows and Linux machines, depending on which extension is defined. + + All required parameters must be populated in order to send to Azure. + + :param streams: List of streams that this data source will be sent to. + A stream indicates what schema will be used for this data and usually what table in Log + Analytics the data will be sent to. + :type streams: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownExtensionDataSourceStreams] + :param extension_name: Required. The name of the VM extension. + :type extension_name: str + :param extension_settings: The extension settings. The format is specific for particular + extension. + :type extension_settings: any + :param input_data_sources: The list of data sources this extension needs data from. + :type input_data_sources: list[str] + :param name: A friendly name for the data source. + This name should be unique across all data sources (regardless of type) within the data + collection rule. + :type name: str + """ + + _validation = { + 'extension_name': {'required': True}, + } + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'extension_name': {'key': 'extensionName', 'type': 'str'}, + 'extension_settings': {'key': 'extensionSettings', 'type': 'object'}, + 'input_data_sources': {'key': 'inputDataSources', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + extension_name: str, + streams: Optional[List[Union[str, "KnownExtensionDataSourceStreams"]]] = None, + extension_settings: Optional[Any] = None, + input_data_sources: Optional[List[str]] = None, + name: Optional[str] = None, + **kwargs + ): + super(ExtensionDataSource, self).__init__(**kwargs) + self.streams = streams + self.extension_name = extension_name + self.extension_settings = extension_settings + self.input_data_sources = input_data_sources + self.name = name + + +class LogAnalyticsDestination(msrest.serialization.Model): + """Log Analytics destination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param workspace_resource_id: The resource ID of the Log Analytics workspace. + :type workspace_resource_id: str + :ivar workspace_id: The Customer ID of the Log Analytics workspace. + :vartype workspace_id: str + :param name: A friendly name for the destination. + This name should be unique across all destinations (regardless of type) within the data + collection rule. + :type name: str + """ + + _validation = { + 'workspace_id': {'readonly': True}, + } + + _attribute_map = { + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + workspace_resource_id: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + super(LogAnalyticsDestination, self).__init__(**kwargs) + self.workspace_resource_id = workspace_resource_id + self.workspace_id = None + self.name = name + + +class PerfCounterDataSource(msrest.serialization.Model): + """Definition of which performance counters will be collected and how they will be collected by this data collection rule. +Collected from both Windows and Linux machines where the counter is present. + + :param streams: List of streams that this data source will be sent to. + A stream indicates what schema will be used for this data and usually what table in Log + Analytics the data will be sent to. + :type streams: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownPerfCounterDataSourceStreams] + :param sampling_frequency_in_seconds: The number of seconds between consecutive counter + measurements (samples). + :type sampling_frequency_in_seconds: int + :param counter_specifiers: A list of specifier names of the performance counters you want to + collect. + Use a wildcard (*) to collect a counter for all instances. + To get a list of performance counters on Windows, run the command 'typeperf'. + :type counter_specifiers: list[str] + :param name: A friendly name for the data source. + This name should be unique across all data sources (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'sampling_frequency_in_seconds': {'key': 'samplingFrequencyInSeconds', 'type': 'int'}, + 'counter_specifiers': {'key': 'counterSpecifiers', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + streams: Optional[List[Union[str, "KnownPerfCounterDataSourceStreams"]]] = None, + sampling_frequency_in_seconds: Optional[int] = None, + counter_specifiers: Optional[List[str]] = None, + name: Optional[str] = None, + **kwargs + ): + super(PerfCounterDataSource, self).__init__(**kwargs) + self.streams = streams + self.sampling_frequency_in_seconds = sampling_frequency_in_seconds + self.counter_specifiers = counter_specifiers + self.name = name + + +class ResourceForUpdate(msrest.serialization.Model): + """Definition of ARM tracked top level resource properties for update operation. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ResourceForUpdate, self).__init__(**kwargs) + self.tags = tags + + +class SyslogDataSource(msrest.serialization.Model): + """Definition of which syslog data will be collected and how it will be collected. +Only collected from Linux machines. + + :param streams: List of streams that this data source will be sent to. + A stream indicates what schema will be used for this data and usually what table in Log + Analytics the data will be sent to. + :type streams: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceStreams] + :param facility_names: The list of facility names. + :type facility_names: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceFacilityNames] + :param log_levels: The log levels to collect. + :type log_levels: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownSyslogDataSourceLogLevels] + :param name: A friendly name for the data source. + This name should be unique across all data sources (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'facility_names': {'key': 'facilityNames', 'type': '[str]'}, + 'log_levels': {'key': 'logLevels', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + streams: Optional[List[Union[str, "KnownSyslogDataSourceStreams"]]] = None, + facility_names: Optional[List[Union[str, "KnownSyslogDataSourceFacilityNames"]]] = None, + log_levels: Optional[List[Union[str, "KnownSyslogDataSourceLogLevels"]]] = None, + name: Optional[str] = None, + **kwargs + ): + super(SyslogDataSource, self).__init__(**kwargs) + self.streams = streams + self.facility_names = facility_names + self.log_levels = log_levels + self.name = name + + +class WindowsEventLogDataSource(msrest.serialization.Model): + """Definition of which Windows Event Log events will be collected and how they will be collected. +Only collected from Windows machines. + + :param streams: List of streams that this data source will be sent to. + A stream indicates what schema will be used for this data and usually what table in Log + Analytics the data will be sent to. + :type streams: list[str or + ~$(python-base-namespace).v2021_04_01.models.KnownWindowsEventLogDataSourceStreams] + :param x_path_queries: A list of Windows Event Log queries in XPATH format. + :type x_path_queries: list[str] + :param name: A friendly name for the data source. + This name should be unique across all data sources (regardless of type) within the data + collection rule. + :type name: str + """ + + _attribute_map = { + 'streams': {'key': 'streams', 'type': '[str]'}, + 'x_path_queries': {'key': 'xPathQueries', 'type': '[str]'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + streams: Optional[List[Union[str, "KnownWindowsEventLogDataSourceStreams"]]] = None, + x_path_queries: Optional[List[str]] = None, + name: Optional[str] = None, + **kwargs + ): + super(WindowsEventLogDataSource, self).__init__(**kwargs) + self.streams = streams + self.x_path_queries = x_path_queries + self.name = name diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_monitor_management_client_enums.py new file mode 100644 index 000000000000..9617f5f9e1e3 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/models/_monitor_management_client_enums.py @@ -0,0 +1,154 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class KnownDataCollectionEndpointProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The resource provisioning state. This property is READ-ONLY. + """ + + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class KnownDataCollectionEndpointResourceKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The kind of the resource. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + +class KnownDataCollectionRuleAssociationProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The resource provisioning state. + """ + + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class KnownDataCollectionRuleProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The resource provisioning state. + """ + + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class KnownDataCollectionRuleResourceKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The kind of the resource. + """ + + LINUX = "Linux" + WINDOWS = "Windows" + +class KnownDataFlowStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + MICROSOFT_EVENT = "Microsoft-Event" + MICROSOFT_INSIGHTS_METRICS = "Microsoft-InsightsMetrics" + MICROSOFT_PERF = "Microsoft-Perf" + MICROSOFT_SYSLOG = "Microsoft-Syslog" + MICROSOFT_WINDOWS_EVENT = "Microsoft-WindowsEvent" + +class KnownExtensionDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + MICROSOFT_EVENT = "Microsoft-Event" + MICROSOFT_INSIGHTS_METRICS = "Microsoft-InsightsMetrics" + MICROSOFT_PERF = "Microsoft-Perf" + MICROSOFT_SYSLOG = "Microsoft-Syslog" + MICROSOFT_WINDOWS_EVENT = "Microsoft-WindowsEvent" + +class KnownPerfCounterDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + MICROSOFT_PERF = "Microsoft-Perf" + MICROSOFT_INSIGHTS_METRICS = "Microsoft-InsightsMetrics" + +class KnownPublicNetworkAccessOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The configuration to set whether network access from public internet to the endpoints are + allowed. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class KnownSyslogDataSourceFacilityNames(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + AUTH = "auth" + AUTHPRIV = "authpriv" + CRON = "cron" + DAEMON = "daemon" + KERN = "kern" + LPR = "lpr" + MAIL = "mail" + MARK = "mark" + NEWS = "news" + SYSLOG = "syslog" + USER = "user" + UUCP = "uucp" + LOCAL0 = "local0" + LOCAL1 = "local1" + LOCAL2 = "local2" + LOCAL3 = "local3" + LOCAL4 = "local4" + LOCAL5 = "local5" + LOCAL6 = "local6" + LOCAL7 = "local7" + ASTERISK = "*" + +class KnownSyslogDataSourceLogLevels(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + DEBUG = "Debug" + INFO = "Info" + NOTICE = "Notice" + WARNING = "Warning" + ERROR = "Error" + CRITICAL = "Critical" + ALERT = "Alert" + EMERGENCY = "Emergency" + ASTERISK = "*" + +class KnownSyslogDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + MICROSOFT_SYSLOG = "Microsoft-Syslog" + +class KnownWindowsEventLogDataSourceStreams(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + MICROSOFT_WINDOWS_EVENT = "Microsoft-WindowsEvent" + MICROSOFT_EVENT = "Microsoft-Event" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/__init__.py new file mode 100644 index 000000000000..86676ba92623 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/__init__.py @@ -0,0 +1,17 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._data_collection_endpoints_operations import DataCollectionEndpointsOperations +from ._data_collection_rule_associations_operations import DataCollectionRuleAssociationsOperations +from ._data_collection_rules_operations import DataCollectionRulesOperations + +__all__ = [ + 'DataCollectionEndpointsOperations', + 'DataCollectionRuleAssociationsOperations', + 'DataCollectionRulesOperations', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py new file mode 100644 index 000000000000..623b4484c48f --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_endpoints_operations.py @@ -0,0 +1,465 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionEndpointsOperations(object): + """DataCollectionEndpointsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DataCollectionEndpointResourceListResult"] + """Lists all data collection endpoints in the specified resource group. + + Lists all data collection endpoints in the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionEndpointResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionEndpointResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DataCollectionEndpointResourceListResult"] + """Lists all data collection endpoints in the specified subscription. + + Lists all data collection endpoints in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionEndpointResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionEndpointResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionEndpoints'} # type: ignore + + def get( + self, + resource_group_name, # type: str + data_collection_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DataCollectionEndpointResource" + """Returns the specified data collection endpoint. + + Returns the specified data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + def create( + self, + resource_group_name, # type: str + data_collection_endpoint_name, # type: str + body=None, # type: Optional["_models.DataCollectionEndpointResource"] + **kwargs # type: Any + ): + # type: (...) -> "_models.DataCollectionEndpointResource" + """Creates or updates a data collection endpoint. + + Creates or updates a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionEndpointResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + data_collection_endpoint_name, # type: str + body=None, # type: Optional["_models.ResourceForUpdate"] + **kwargs # type: Any + ): + # type: (...) -> "_models.DataCollectionEndpointResource" + """Updates part of a data collection endpoint. + + Updates part of a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionEndpointResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionEndpointResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionEndpointResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'ResourceForUpdate') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionEndpointResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + data_collection_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a data collection endpoint. + + Deletes a data collection endpoint. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_endpoint_name: The name of the data collection endpoint. The name is + case insensitive. + :type data_collection_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionEndpointName': self._serialize.url("data_collection_endpoint_name", data_collection_endpoint_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionEndpoints/{dataCollectionEndpointName}'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py new file mode 100644 index 000000000000..9f6b43e857d1 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rule_associations_operations.py @@ -0,0 +1,393 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionRuleAssociationsOperations(object): + """DataCollectionRuleAssociationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource( + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] + """Lists associations for the specified resource. + + Lists associations for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations'} # type: ignore + + def list_by_rule( + self, + resource_group_name, # type: str + data_collection_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] + """Lists associations for the specified data collection rule. + + Lists associations for the specified data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleAssociationProxyOnlyResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleAssociationProxyOnlyResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_rule.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_rule.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}/associations'} # type: ignore + + def get( + self, + resource_uri, # type: str + association_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DataCollectionRuleAssociationProxyOnlyResource" + """Returns the specified association. + + Returns the specified association. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param association_name: The name of the association. The name is case insensitive. + :type association_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleAssociationProxyOnlyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + 'associationName': self._serialize.url("association_name", association_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}'} # type: ignore + + def create( + self, + resource_uri, # type: str + association_name, # type: str + body=None, # type: Optional["_models.DataCollectionRuleAssociationProxyOnlyResource"] + **kwargs # type: Any + ): + # type: (...) -> "_models.DataCollectionRuleAssociationProxyOnlyResource" + """Creates or updates an association. + + Creates or updates an association. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param association_name: The name of the association. The name is case insensitive. + :type association_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleAssociationProxyOnlyResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleAssociationProxyOnlyResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleAssociationProxyOnlyResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + 'associationName': self._serialize.url("association_name", association_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionRuleAssociationProxyOnlyResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionRuleAssociationProxyOnlyResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}'} # type: ignore + + def delete( + self, + resource_uri, # type: str + association_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an association. + + Deletes an association. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param association_name: The name of the association. The name is case insensitive. + :type association_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True, min_length=1), + 'associationName': self._serialize.url("association_name", association_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/dataCollectionRuleAssociations/{associationName}'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py new file mode 100644 index 000000000000..287d2a231834 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/operations/_data_collection_rules_operations.py @@ -0,0 +1,465 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DataCollectionRulesOperations(object): + """DataCollectionRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_04_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DataCollectionRuleResourceListResult"] + """Lists all data collection rules in the specified resource group. + + Lists all data collection rules in the specified resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DataCollectionRuleResourceListResult"] + """Lists all data collection rules in the specified subscription. + + Lists all data collection rules in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DataCollectionRuleResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResourceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DataCollectionRuleResourceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/dataCollectionRules'} # type: ignore + + def get( + self, + resource_group_name, # type: str + data_collection_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DataCollectionRuleResource" + """Returns the specified data collection rule. + + Returns the specified data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore + + def create( + self, + resource_group_name, # type: str + data_collection_rule_name, # type: str + body=None, # type: Optional["_models.DataCollectionRuleResource"] + **kwargs # type: Any + ): + # type: (...) -> "_models.DataCollectionRuleResource" + """Creates or updates a data collection rule. + + Creates or updates a data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'DataCollectionRuleResource') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + data_collection_rule_name, # type: str + body=None, # type: Optional["_models.ResourceForUpdate"] + **kwargs # type: Any + ): + # type: (...) -> "_models.DataCollectionRuleResource" + """Updates part of a data collection rule. + + Updates part of a data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :param body: The payload. + :type body: ~$(python-base-namespace).v2021_04_01.models.ResourceForUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DataCollectionRuleResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_04_01.models.DataCollectionRuleResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DataCollectionRuleResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if body is not None: + body_content = self._serialize.body(body, 'ResourceForUpdate') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DataCollectionRuleResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + data_collection_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a data collection rule. + + Deletes a data collection rule. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param data_collection_rule_name: The name of the data collection rule. The name is case + insensitive. + :type data_collection_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'dataCollectionRuleName': self._serialize.url("data_collection_rule_name", data_collection_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponseCommonV2, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dataCollectionRuleName}'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/py.typed b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_04_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/__init__.py new file mode 100644 index 000000000000..d82479510092 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['MonitorManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py new file mode 100644 index 000000000000..8c42b5473012 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class MonitorManagementClientConfiguration(Configuration): + """Configuration for MonitorManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-05-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_metadata.json new file mode 100644 index 000000000000..2b64e6cd360c --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_metadata.json @@ -0,0 +1,108 @@ +{ + "chosen_version": "2021-05-01-preview", + "total_api_version_list": ["2021-05-01-preview"], + "client": { + "name": "MonitorManagementClient", + "filename": "_monitor_management_client", + "description": "Monitor Management Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "autoscale_settings": "AutoscaleSettingsOperations", + "predictive_metric": "PredictiveMetricOperations", + "diagnostic_settings": "DiagnosticSettingsOperations", + "diagnostic_settings_category": "DiagnosticSettingsCategoryOperations", + "management_group_diagnostic_settings": "ManagementGroupDiagnosticSettingsOperations", + "subscription_diagnostic_settings": "SubscriptionDiagnosticSettingsOperations" + } +} \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_management_client.py new file mode 100644 index 000000000000..f8a24f027f31 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_monitor_management_client.py @@ -0,0 +1,113 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import MonitorManagementClientConfiguration +from .operations import AutoscaleSettingsOperations +from .operations import PredictiveMetricOperations +from .operations import DiagnosticSettingsOperations +from .operations import DiagnosticSettingsCategoryOperations +from .operations import ManagementGroupDiagnosticSettingsOperations +from .operations import SubscriptionDiagnosticSettingsOperations +from . import models + + +class MonitorManagementClient(object): + """Monitor Management Client. + + :ivar autoscale_settings: AutoscaleSettingsOperations operations + :vartype autoscale_settings: $(python-base-namespace).v2021_05_01_preview.operations.AutoscaleSettingsOperations + :ivar predictive_metric: PredictiveMetricOperations operations + :vartype predictive_metric: $(python-base-namespace).v2021_05_01_preview.operations.PredictiveMetricOperations + :ivar diagnostic_settings: DiagnosticSettingsOperations operations + :vartype diagnostic_settings: $(python-base-namespace).v2021_05_01_preview.operations.DiagnosticSettingsOperations + :ivar diagnostic_settings_category: DiagnosticSettingsCategoryOperations operations + :vartype diagnostic_settings_category: $(python-base-namespace).v2021_05_01_preview.operations.DiagnosticSettingsCategoryOperations + :ivar management_group_diagnostic_settings: ManagementGroupDiagnosticSettingsOperations operations + :vartype management_group_diagnostic_settings: $(python-base-namespace).v2021_05_01_preview.operations.ManagementGroupDiagnosticSettingsOperations + :ivar subscription_diagnostic_settings: SubscriptionDiagnosticSettingsOperations operations + :vartype subscription_diagnostic_settings: $(python-base-namespace).v2021_05_01_preview.operations.SubscriptionDiagnosticSettingsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.autoscale_settings = AutoscaleSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.predictive_metric = PredictiveMetricOperations( + self._client, self._config, self._serialize, self._deserialize) + self.diagnostic_settings = DiagnosticSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.diagnostic_settings_category = DiagnosticSettingsCategoryOperations( + self._client, self._config, self._serialize, self._deserialize) + self.management_group_diagnostic_settings = ManagementGroupDiagnosticSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.subscription_diagnostic_settings = SubscriptionDiagnosticSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> MonitorManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/__init__.py new file mode 100644 index 000000000000..96ce9b45c05b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._monitor_management_client import MonitorManagementClient +__all__ = ['MonitorManagementClient'] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py new file mode 100644 index 000000000000..af72dcd13a9f --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class MonitorManagementClientConfiguration(Configuration): + """Configuration for MonitorManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-05-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_management_client.py new file mode 100644 index 000000000000..44fb006c737e --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/_monitor_management_client.py @@ -0,0 +1,106 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import MonitorManagementClientConfiguration +from .operations import AutoscaleSettingsOperations +from .operations import PredictiveMetricOperations +from .operations import DiagnosticSettingsOperations +from .operations import DiagnosticSettingsCategoryOperations +from .operations import ManagementGroupDiagnosticSettingsOperations +from .operations import SubscriptionDiagnosticSettingsOperations +from .. import models + + +class MonitorManagementClient(object): + """Monitor Management Client. + + :ivar autoscale_settings: AutoscaleSettingsOperations operations + :vartype autoscale_settings: $(python-base-namespace).v2021_05_01_preview.aio.operations.AutoscaleSettingsOperations + :ivar predictive_metric: PredictiveMetricOperations operations + :vartype predictive_metric: $(python-base-namespace).v2021_05_01_preview.aio.operations.PredictiveMetricOperations + :ivar diagnostic_settings: DiagnosticSettingsOperations operations + :vartype diagnostic_settings: $(python-base-namespace).v2021_05_01_preview.aio.operations.DiagnosticSettingsOperations + :ivar diagnostic_settings_category: DiagnosticSettingsCategoryOperations operations + :vartype diagnostic_settings_category: $(python-base-namespace).v2021_05_01_preview.aio.operations.DiagnosticSettingsCategoryOperations + :ivar management_group_diagnostic_settings: ManagementGroupDiagnosticSettingsOperations operations + :vartype management_group_diagnostic_settings: $(python-base-namespace).v2021_05_01_preview.aio.operations.ManagementGroupDiagnosticSettingsOperations + :ivar subscription_diagnostic_settings: SubscriptionDiagnosticSettingsOperations operations + :vartype subscription_diagnostic_settings: $(python-base-namespace).v2021_05_01_preview.aio.operations.SubscriptionDiagnosticSettingsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.autoscale_settings = AutoscaleSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.predictive_metric = PredictiveMetricOperations( + self._client, self._config, self._serialize, self._deserialize) + self.diagnostic_settings = DiagnosticSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.diagnostic_settings_category = DiagnosticSettingsCategoryOperations( + self._client, self._config, self._serialize, self._deserialize) + self.management_group_diagnostic_settings = ManagementGroupDiagnosticSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.subscription_diagnostic_settings = SubscriptionDiagnosticSettingsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "MonitorManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/__init__.py new file mode 100644 index 000000000000..7f5c0a1041dc --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._autoscale_settings_operations import AutoscaleSettingsOperations +from ._predictive_metric_operations import PredictiveMetricOperations +from ._diagnostic_settings_operations import DiagnosticSettingsOperations +from ._diagnostic_settings_category_operations import DiagnosticSettingsCategoryOperations +from ._management_group_diagnostic_settings_operations import ManagementGroupDiagnosticSettingsOperations +from ._subscription_diagnostic_settings_operations import SubscriptionDiagnosticSettingsOperations + +__all__ = [ + 'AutoscaleSettingsOperations', + 'PredictiveMetricOperations', + 'DiagnosticSettingsOperations', + 'DiagnosticSettingsCategoryOperations', + 'ManagementGroupDiagnosticSettingsOperations', + 'SubscriptionDiagnosticSettingsOperations', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py new file mode 100644 index 000000000000..18416b0517d6 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_autoscale_settings_operations.py @@ -0,0 +1,434 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AutoscaleSettingsOperations: + """AutoscaleSettingsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AutoscaleSettingResourceCollection"]: + """Lists the autoscale settings for a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AutoscaleSettingResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AutoscaleSettingResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + autoscale_setting_name: str, + parameters: "_models.AutoscaleSettingResource", + **kwargs: Any + ) -> "_models.AutoscaleSettingResource": + """Creates or updates an autoscale setting. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AutoscaleSettingResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AutoscaleSettingResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + autoscale_setting_name: str, + **kwargs: Any + ) -> None: + """Deletes and autoscale setting. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + autoscale_setting_name: str, + **kwargs: Any + ) -> "_models.AutoscaleSettingResource": + """Gets an autoscale setting. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AutoscaleSettingResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + autoscale_setting_name: str, + autoscale_setting_resource: "_models.AutoscaleSettingResourcePatch", + **kwargs: Any + ) -> "_models.AutoscaleSettingResource": + """Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate + method. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :param autoscale_setting_resource: Parameters supplied to the operation. + :type autoscale_setting_resource: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourcePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AutoscaleSettingResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(autoscale_setting_resource, 'AutoscaleSettingResourcePatch') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AutoscaleSettingResourceCollection"]: + """Lists the autoscale settings for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AutoscaleSettingResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AutoscaleSettingResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py new file mode 100644 index 000000000000..aa9858884eae --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_category_operations.py @@ -0,0 +1,170 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DiagnosticSettingsCategoryOperations: + """DiagnosticSettingsCategoryOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_uri: str, + name: str, + **kwargs: Any + ) -> "_models.DiagnosticSettingsCategoryResource": + """Gets the diagnostic settings category for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticSettingsCategoryResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsCategoryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticSettingsCategoryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}'} # type: ignore + + def list( + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncIterable["_models.DiagnosticSettingsCategoryResourceCollection"]: + """Lists the diagnostic settings categories for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticSettingsCategoryResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsCategoryResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticSettingsCategoryResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py new file mode 100644 index 000000000000..1c0867bbab31 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_diagnostic_settings_operations.py @@ -0,0 +1,291 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DiagnosticSettingsOperations: + """DiagnosticSettingsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_uri: str, + name: str, + **kwargs: Any + ) -> "_models.DiagnosticSettingsResource": + """Gets the active diagnostic settings for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + async def create_or_update( + self, + resource_uri: str, + name: str, + parameters: "_models.DiagnosticSettingsResource", + **kwargs: Any + ) -> "_models.DiagnosticSettingsResource": + """Creates or updates diagnostic settings for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param name: The name of the diagnostic setting. + :type name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DiagnosticSettingsResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + async def delete( + self, + resource_uri: str, + name: str, + **kwargs: Any + ) -> None: + """Deletes existing diagnostic settings for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def list( + self, + resource_uri: str, + **kwargs: Any + ) -> AsyncIterable["_models.DiagnosticSettingsResourceCollection"]: + """Gets the active diagnostic settings list for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticSettingsResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticSettingsResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py new file mode 100644 index 000000000000..0d3a2f487cb7 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_management_group_diagnostic_settings_operations.py @@ -0,0 +1,291 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ManagementGroupDiagnosticSettingsOperations: + """ManagementGroupDiagnosticSettingsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + management_group_id: str, + name: str, + **kwargs: Any + ) -> "_models.ManagementGroupDiagnosticSettingsResource": + """Gets the active management group diagnostic settings for the specified resource. + + :param management_group_id: The management group id. + :type management_group_id: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagementGroupDiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagementGroupDiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + async def create_or_update( + self, + management_group_id: str, + name: str, + parameters: "_models.ManagementGroupDiagnosticSettingsResource", + **kwargs: Any + ) -> "_models.ManagementGroupDiagnosticSettingsResource": + """Creates or updates management group diagnostic settings for the specified resource. + + :param management_group_id: The management group id. + :type management_group_id: str + :param name: The name of the diagnostic setting. + :type name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagementGroupDiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagementGroupDiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagementGroupDiagnosticSettingsResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + async def delete( + self, + management_group_id: str, + name: str, + **kwargs: Any + ) -> None: + """Deletes existing management group diagnostic settings for the specified resource. + + :param management_group_id: The management group id. + :type management_group_id: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def list( + self, + management_group_id: str, + **kwargs: Any + ) -> AsyncIterable["_models.ManagementGroupDiagnosticSettingsResourceCollection"]: + """Gets the active management group diagnostic settings list for the specified management group. + + :param management_group_id: The management group id. + :type management_group_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagementGroupDiagnosticSettingsResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagementGroupDiagnosticSettingsResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py new file mode 100644 index 000000000000..55732a9aee1c --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_predictive_metric_operations.py @@ -0,0 +1,124 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PredictiveMetricOperations: + """PredictiveMetricOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + autoscale_setting_name: str, + timespan: str, + interval: datetime.timedelta, + metric_namespace: str, + metric_name: str, + aggregation: str, + **kwargs: Any + ) -> "_models.PredictiveResponse": + """get predictive autoscale metric future data. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :param timespan: The timespan of the query. It is a string with the following format + 'startDateTime_ISO/endDateTime_ISO'. + :type timespan: str + :param interval: The interval (i.e. timegrain) of the query. + :type interval: ~datetime.timedelta + :param metric_namespace: Metric namespace to query metric definitions for. + :type metric_namespace: str + :param metric_name: The names of the metrics (comma separated) to retrieve. Special case: If a + metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be + **'Metric%2Name1'**. + :type metric_name: str + :param aggregation: The list of aggregation types (comma separated) to retrieve. + :type aggregation: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PredictiveResponse, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PredictiveResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['timespan'] = self._serialize.query("timespan", timespan, 'str') + query_parameters['interval'] = self._serialize.query("interval", interval, 'duration') + query_parameters['metricNamespace'] = self._serialize.query("metric_namespace", metric_namespace, 'str') + query_parameters['metricName'] = self._serialize.query("metric_name", metric_name, 'str') + query_parameters['aggregation'] = self._serialize.query("aggregation", aggregation, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PredictiveResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}/predictiveMetrics'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py new file mode 100644 index 000000000000..303455c75d84 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/aio/operations/_subscription_diagnostic_settings_operations.py @@ -0,0 +1,279 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SubscriptionDiagnosticSettingsOperations: + """SubscriptionDiagnosticSettingsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + name: str, + **kwargs: Any + ) -> "_models.SubscriptionDiagnosticSettingsResource": + """Gets the active subscription diagnostic settings for the specified resource. + + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SubscriptionDiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionDiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SubscriptionDiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + async def create_or_update( + self, + name: str, + parameters: "_models.SubscriptionDiagnosticSettingsResource", + **kwargs: Any + ) -> "_models.SubscriptionDiagnosticSettingsResource": + """Creates or updates subscription diagnostic settings for the specified resource. + + :param name: The name of the diagnostic setting. + :type name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SubscriptionDiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionDiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SubscriptionDiagnosticSettingsResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SubscriptionDiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + async def delete( + self, + name: str, + **kwargs: Any + ) -> None: + """Deletes existing subscription diagnostic settings for the specified resource. + + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.SubscriptionDiagnosticSettingsResourceCollection"]: + """Gets the active subscription diagnostic settings list for the specified subscriptionId. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SubscriptionDiagnosticSettingsResourceCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionDiagnosticSettingsResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SubscriptionDiagnosticSettingsResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/__init__.py new file mode 100644 index 000000000000..4427b0d0f385 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/__init__.py @@ -0,0 +1,144 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AutoscaleErrorResponse + from ._models_py3 import AutoscaleErrorResponseError + from ._models_py3 import AutoscaleNotification + from ._models_py3 import AutoscaleProfile + from ._models_py3 import AutoscaleSettingResource + from ._models_py3 import AutoscaleSettingResourceCollection + from ._models_py3 import AutoscaleSettingResourcePatch + from ._models_py3 import DiagnosticSettingsCategoryResource + from ._models_py3 import DiagnosticSettingsCategoryResourceCollection + from ._models_py3 import DiagnosticSettingsResource + from ._models_py3 import DiagnosticSettingsResourceCollection + from ._models_py3 import EmailNotification + from ._models_py3 import ErrorResponse + from ._models_py3 import LogSettings + from ._models_py3 import ManagementGroupDiagnosticSettingsResource + from ._models_py3 import ManagementGroupDiagnosticSettingsResourceCollection + from ._models_py3 import ManagementGroupLogSettings + from ._models_py3 import MetricSettings + from ._models_py3 import MetricTrigger + from ._models_py3 import PredictiveAutoscalePolicy + from ._models_py3 import PredictiveResponse + from ._models_py3 import PredictiveValue + from ._models_py3 import Recurrence + from ._models_py3 import RecurrentSchedule + from ._models_py3 import Resource + from ._models_py3 import RetentionPolicy + from ._models_py3 import ScaleAction + from ._models_py3 import ScaleCapacity + from ._models_py3 import ScaleRule + from ._models_py3 import ScaleRuleMetricDimension + from ._models_py3 import SubscriptionDiagnosticSettingsResource + from ._models_py3 import SubscriptionDiagnosticSettingsResourceCollection + from ._models_py3 import SubscriptionLogSettings + from ._models_py3 import SystemData + from ._models_py3 import TimeWindow + from ._models_py3 import WebhookNotification +except (SyntaxError, ImportError): + from ._models import AutoscaleErrorResponse # type: ignore + from ._models import AutoscaleErrorResponseError # type: ignore + from ._models import AutoscaleNotification # type: ignore + from ._models import AutoscaleProfile # type: ignore + from ._models import AutoscaleSettingResource # type: ignore + from ._models import AutoscaleSettingResourceCollection # type: ignore + from ._models import AutoscaleSettingResourcePatch # type: ignore + from ._models import DiagnosticSettingsCategoryResource # type: ignore + from ._models import DiagnosticSettingsCategoryResourceCollection # type: ignore + from ._models import DiagnosticSettingsResource # type: ignore + from ._models import DiagnosticSettingsResourceCollection # type: ignore + from ._models import EmailNotification # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import LogSettings # type: ignore + from ._models import ManagementGroupDiagnosticSettingsResource # type: ignore + from ._models import ManagementGroupDiagnosticSettingsResourceCollection # type: ignore + from ._models import ManagementGroupLogSettings # type: ignore + from ._models import MetricSettings # type: ignore + from ._models import MetricTrigger # type: ignore + from ._models import PredictiveAutoscalePolicy # type: ignore + from ._models import PredictiveResponse # type: ignore + from ._models import PredictiveValue # type: ignore + from ._models import Recurrence # type: ignore + from ._models import RecurrentSchedule # type: ignore + from ._models import Resource # type: ignore + from ._models import RetentionPolicy # type: ignore + from ._models import ScaleAction # type: ignore + from ._models import ScaleCapacity # type: ignore + from ._models import ScaleRule # type: ignore + from ._models import ScaleRuleMetricDimension # type: ignore + from ._models import SubscriptionDiagnosticSettingsResource # type: ignore + from ._models import SubscriptionDiagnosticSettingsResourceCollection # type: ignore + from ._models import SubscriptionLogSettings # type: ignore + from ._models import SystemData # type: ignore + from ._models import TimeWindow # type: ignore + from ._models import WebhookNotification # type: ignore + +from ._monitor_management_client_enums import ( + CategoryType, + ComparisonOperationType, + CreatedByType, + MetricStatisticType, + PredictiveAutoscalePolicyScaleMode, + RecurrenceFrequency, + ScaleDirection, + ScaleRuleMetricDimensionOperationType, + ScaleType, + TimeAggregationType, +) + +__all__ = [ + 'AutoscaleErrorResponse', + 'AutoscaleErrorResponseError', + 'AutoscaleNotification', + 'AutoscaleProfile', + 'AutoscaleSettingResource', + 'AutoscaleSettingResourceCollection', + 'AutoscaleSettingResourcePatch', + 'DiagnosticSettingsCategoryResource', + 'DiagnosticSettingsCategoryResourceCollection', + 'DiagnosticSettingsResource', + 'DiagnosticSettingsResourceCollection', + 'EmailNotification', + 'ErrorResponse', + 'LogSettings', + 'ManagementGroupDiagnosticSettingsResource', + 'ManagementGroupDiagnosticSettingsResourceCollection', + 'ManagementGroupLogSettings', + 'MetricSettings', + 'MetricTrigger', + 'PredictiveAutoscalePolicy', + 'PredictiveResponse', + 'PredictiveValue', + 'Recurrence', + 'RecurrentSchedule', + 'Resource', + 'RetentionPolicy', + 'ScaleAction', + 'ScaleCapacity', + 'ScaleRule', + 'ScaleRuleMetricDimension', + 'SubscriptionDiagnosticSettingsResource', + 'SubscriptionDiagnosticSettingsResourceCollection', + 'SubscriptionLogSettings', + 'SystemData', + 'TimeWindow', + 'WebhookNotification', + 'CategoryType', + 'ComparisonOperationType', + 'CreatedByType', + 'MetricStatisticType', + 'PredictiveAutoscalePolicyScaleMode', + 'RecurrenceFrequency', + 'ScaleDirection', + 'ScaleRuleMetricDimensionOperationType', + 'ScaleType', + 'TimeAggregationType', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models.py new file mode 100644 index 000000000000..080976daeeff --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models.py @@ -0,0 +1,1535 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AutoscaleErrorResponse(msrest.serialization.Model): + """Describes the format of Error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param error: The error object. + :type error: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleErrorResponseError + :ivar system_data: The system metadata related to the response. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + """ + + _validation = { + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'AutoscaleErrorResponseError'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoscaleErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + self.system_data = None + + +class AutoscaleErrorResponseError(msrest.serialization.Model): + """The error object. + + :param code: One of a server-defined set of error codes. + :type code: str + :param message: A human-readable representation of the error. + :type message: str + :param target: The target of the particular error. + :type target: str + :param details: A human-readable representation of the error's details. + :type details: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoscaleErrorResponseError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class AutoscaleNotification(msrest.serialization.Model): + """Autoscale notification. + + 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. + + :ivar operation: the operation associated with the notification and its value must be "scale". + Has constant value: "Scale". + :vartype operation: str + :param email: the email notification. + :type email: ~$(python-base-namespace).v2021_05_01_preview.models.EmailNotification + :param webhooks: the collection of webhook notifications. + :type webhooks: list[~$(python-base-namespace).v2021_05_01_preview.models.WebhookNotification] + """ + + _validation = { + 'operation': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'EmailNotification'}, + 'webhooks': {'key': 'webhooks', 'type': '[WebhookNotification]'}, + } + + operation = "Scale" + + def __init__( + self, + **kwargs + ): + super(AutoscaleNotification, self).__init__(**kwargs) + self.email = kwargs.get('email', None) + self.webhooks = kwargs.get('webhooks', None) + + +class AutoscaleProfile(msrest.serialization.Model): + """Autoscale profile. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. the name of the profile. + :type name: str + :param capacity: Required. the number of instances that can be used during this profile. + :type capacity: ~$(python-base-namespace).v2021_05_01_preview.models.ScaleCapacity + :param rules: Required. the collection of rules that provide the triggers and parameters for + the scaling action. A maximum of 10 rules can be specified. + :type rules: list[~$(python-base-namespace).v2021_05_01_preview.models.ScaleRule] + :param fixed_date: the specific date-time for the profile. This element is not used if the + Recurrence element is used. + :type fixed_date: ~$(python-base-namespace).v2021_05_01_preview.models.TimeWindow + :param recurrence: the repeating times at which this profile begins. This element is not used + if the FixedDate element is used. + :type recurrence: ~$(python-base-namespace).v2021_05_01_preview.models.Recurrence + """ + + _validation = { + 'name': {'required': True}, + 'capacity': {'required': True}, + 'rules': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ScaleCapacity'}, + 'rules': {'key': 'rules', 'type': '[ScaleRule]'}, + 'fixed_date': {'key': 'fixedDate', 'type': 'TimeWindow'}, + 'recurrence': {'key': 'recurrence', 'type': 'Recurrence'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoscaleProfile, self).__init__(**kwargs) + self.name = kwargs['name'] + self.capacity = kwargs['capacity'] + self.rules = kwargs['rules'] + self.fixed_date = kwargs.get('fixed_date', None) + self.recurrence = kwargs.get('recurrence', None) + + +class AutoscaleSettingResource(msrest.serialization.Model): + """The autoscale setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Gets or sets a list of key value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in + length than 128 characters and a value no greater in length than 256 characters. + :type tags: dict[str, str] + :ivar system_data: The system metadata related to the response. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param profiles: Required. the collection of automatic scaling profiles that specify different + scaling parameters for different time periods. A maximum of 20 profiles can be specified. + :type profiles: list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleProfile] + :param notifications: the collection of notifications. + :type notifications: + list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleNotification] + :param enabled: the enabled flag. Specifies whether automatic scaling is enabled for the + resource. The default value is 'true'. + :type enabled: bool + :param predictive_autoscale_policy: the predictive autoscale policy mode. + :type predictive_autoscale_policy: + ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicy + :param name_properties_name: the name of the autoscale setting. + :type name_properties_name: str + :param target_resource_uri: the resource identifier of the resource that the autoscale setting + should be added to. + :type target_resource_uri: str + :param target_resource_location: the location of the resource that the autoscale setting should + be added to. + :type target_resource_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'profiles': {'required': True, 'max_items': 20, 'min_items': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'profiles': {'key': 'properties.profiles', 'type': '[AutoscaleProfile]'}, + 'notifications': {'key': 'properties.notifications', 'type': '[AutoscaleNotification]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'predictive_autoscale_policy': {'key': 'properties.predictiveAutoscalePolicy', 'type': 'PredictiveAutoscalePolicy'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + 'target_resource_location': {'key': 'properties.targetResourceLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoscaleSettingResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + self.system_data = None + self.profiles = kwargs['profiles'] + self.notifications = kwargs.get('notifications', None) + self.enabled = kwargs.get('enabled', True) + self.predictive_autoscale_policy = kwargs.get('predictive_autoscale_policy', None) + self.name_properties_name = kwargs.get('name_properties_name', None) + self.target_resource_uri = kwargs.get('target_resource_uri', None) + self.target_resource_location = kwargs.get('target_resource_location', None) + + +class AutoscaleSettingResourceCollection(msrest.serialization.Model): + """Represents a collection of autoscale setting resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. the values for the autoscale setting resources. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AutoscaleSettingResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoscaleSettingResourceCollection, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = kwargs.get('next_link', None) + + +class AutoscaleSettingResourcePatch(msrest.serialization.Model): + """The autoscale setting object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param profiles: the collection of automatic scaling profiles that specify different scaling + parameters for different time periods. A maximum of 20 profiles can be specified. + :type profiles: list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleProfile] + :param notifications: the collection of notifications. + :type notifications: + list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleNotification] + :param enabled: the enabled flag. Specifies whether automatic scaling is enabled for the + resource. The default value is 'true'. + :type enabled: bool + :param predictive_autoscale_policy: the predictive autoscale policy mode. + :type predictive_autoscale_policy: + ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicy + :param name: the name of the autoscale setting. + :type name: str + :param target_resource_uri: the resource identifier of the resource that the autoscale setting + should be added to. + :type target_resource_uri: str + :param target_resource_location: the location of the resource that the autoscale setting should + be added to. + :type target_resource_location: str + """ + + _validation = { + 'profiles': {'max_items': 20, 'min_items': 0}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'profiles': {'key': 'properties.profiles', 'type': '[AutoscaleProfile]'}, + 'notifications': {'key': 'properties.notifications', 'type': '[AutoscaleNotification]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'predictive_autoscale_policy': {'key': 'properties.predictiveAutoscalePolicy', 'type': 'PredictiveAutoscalePolicy'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + 'target_resource_location': {'key': 'properties.targetResourceLocation', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoscaleSettingResourcePatch, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.profiles = kwargs.get('profiles', None) + self.notifications = kwargs.get('notifications', None) + self.enabled = kwargs.get('enabled', True) + self.predictive_autoscale_policy = kwargs.get('predictive_autoscale_policy', None) + self.name = kwargs.get('name', None) + self.target_resource_uri = kwargs.get('target_resource_uri', None) + self.target_resource_location = kwargs.get('target_resource_location', None) + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DiagnosticSettingsCategoryResource(Resource): + """The diagnostic settings category resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param category_type: The type of the diagnostic settings category. Possible values include: + "Metrics", "Logs". + :type category_type: str or ~$(python-base-namespace).v2021_05_01_preview.models.CategoryType + :param category_groups: the collection of what category groups are supported. + :type category_groups: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'category_type': {'key': 'properties.categoryType', 'type': 'str'}, + 'category_groups': {'key': 'properties.categoryGroups', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticSettingsCategoryResource, self).__init__(**kwargs) + self.system_data = None + self.category_type = kwargs.get('category_type', None) + self.category_groups = kwargs.get('category_groups', None) + + +class DiagnosticSettingsCategoryResourceCollection(msrest.serialization.Model): + """Represents a collection of diagnostic setting category resources. + + :param value: The collection of diagnostic settings category resources. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticSettingsCategoryResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticSettingsCategoryResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class DiagnosticSettingsResource(Resource): + """The diagnostic setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param storage_account_id: The resource ID of the storage account to which you would like to + send Diagnostic Logs. + :type storage_account_id: str + :param service_bus_rule_id: The service bus rule Id of the diagnostic setting. This is here to + maintain backwards compatibility. + :type service_bus_rule_id: str + :param event_hub_authorization_rule_id: The resource Id for the event hub authorization rule. + :type event_hub_authorization_rule_id: str + :param event_hub_name: The name of the event hub. If none is specified, the default event hub + will be selected. + :type event_hub_name: str + :param metrics: The list of metric settings. + :type metrics: list[~$(python-base-namespace).v2021_05_01_preview.models.MetricSettings] + :param logs: The list of logs settings. + :type logs: list[~$(python-base-namespace).v2021_05_01_preview.models.LogSettings] + :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would + like to send Diagnostic Logs. Example: + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + :type workspace_id: str + :param marketplace_partner_id: The full ARM resource ID of the Marketplace resource to which + you would like to send Diagnostic Logs. + :type marketplace_partner_id: str + :param log_analytics_destination_type: A string indicating whether the export to Log Analytics + should use the default destination type, i.e. AzureDiagnostics, or use a destination type + constructed as follows: :code:``_:code:``. Possible values are: Dedicated and null (null is default.). + :type log_analytics_destination_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'}, + 'logs': {'key': 'properties.logs', 'type': '[LogSettings]'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'marketplace_partner_id': {'key': 'properties.marketplacePartnerId', 'type': 'str'}, + 'log_analytics_destination_type': {'key': 'properties.logAnalyticsDestinationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticSettingsResource, self).__init__(**kwargs) + self.system_data = None + self.storage_account_id = kwargs.get('storage_account_id', None) + self.service_bus_rule_id = kwargs.get('service_bus_rule_id', None) + self.event_hub_authorization_rule_id = kwargs.get('event_hub_authorization_rule_id', None) + self.event_hub_name = kwargs.get('event_hub_name', None) + self.metrics = kwargs.get('metrics', None) + self.logs = kwargs.get('logs', None) + self.workspace_id = kwargs.get('workspace_id', None) + self.marketplace_partner_id = kwargs.get('marketplace_partner_id', None) + self.log_analytics_destination_type = kwargs.get('log_analytics_destination_type', None) + + +class DiagnosticSettingsResourceCollection(msrest.serialization.Model): + """Represents a collection of alert rule resources. + + :param value: The collection of diagnostic settings resources;. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticSettingsResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(DiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class EmailNotification(msrest.serialization.Model): + """Email notification of an autoscale event. + + :param send_to_subscription_administrator: a value indicating whether to send email to + subscription administrator. + :type send_to_subscription_administrator: bool + :param send_to_subscription_co_administrators: a value indicating whether to send email to + subscription co-administrators. + :type send_to_subscription_co_administrators: bool + :param custom_emails: the custom e-mails list. This value can be null or empty, in which case + this attribute will be ignored. + :type custom_emails: list[str] + """ + + _attribute_map = { + 'send_to_subscription_administrator': {'key': 'sendToSubscriptionAdministrator', 'type': 'bool'}, + 'send_to_subscription_co_administrators': {'key': 'sendToSubscriptionCoAdministrators', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(EmailNotification, self).__init__(**kwargs) + self.send_to_subscription_administrator = kwargs.get('send_to_subscription_administrator', False) + self.send_to_subscription_co_administrators = kwargs.get('send_to_subscription_co_administrators', False) + self.custom_emails = kwargs.get('custom_emails', None) + + +class ErrorResponse(msrest.serialization.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 LogSettings(msrest.serialization.Model): + """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. + + All required parameters must be populated in order to send to Azure. + + :param category: Name of a Diagnostic Log category for a resource type this setting is applied + to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET + diagnostic settings operation. + :type category: str + :param category_group: Name of a Diagnostic Log category group for a resource type this setting + is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a + GET diagnostic settings operation. + :type category_group: str + :param enabled: Required. a value indicating whether this log is enabled. + :type enabled: bool + :param retention_policy: the retention policy for this log. + :type retention_policy: ~$(python-base-namespace).v2021_05_01_preview.models.RetentionPolicy + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'category_group': {'key': 'categoryGroup', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSettings, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.category_group = kwargs.get('category_group', None) + self.enabled = kwargs['enabled'] + self.retention_policy = kwargs.get('retention_policy', None) + + +class ManagementGroupDiagnosticSettingsResource(Resource): + """The management group diagnostic setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param storage_account_id: The resource ID of the storage account to which you would like to + send Diagnostic Logs. + :type storage_account_id: str + :param service_bus_rule_id: The service bus rule Id of the diagnostic setting. This is here to + maintain backwards compatibility. + :type service_bus_rule_id: str + :param event_hub_authorization_rule_id: The resource Id for the event hub authorization rule. + :type event_hub_authorization_rule_id: str + :param event_hub_name: The name of the event hub. If none is specified, the default event hub + will be selected. + :type event_hub_name: str + :param logs: The list of logs settings. + :type logs: + list[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupLogSettings] + :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would + like to send Diagnostic Logs. Example: + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + :type workspace_id: str + :param marketplace_partner_id: The full ARM resource ID of the Marketplace resource to which + you would like to send Diagnostic Logs. + :type marketplace_partner_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, + 'logs': {'key': 'properties.logs', 'type': '[ManagementGroupLogSettings]'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'marketplace_partner_id': {'key': 'properties.marketplacePartnerId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagementGroupDiagnosticSettingsResource, self).__init__(**kwargs) + self.system_data = None + self.storage_account_id = kwargs.get('storage_account_id', None) + self.service_bus_rule_id = kwargs.get('service_bus_rule_id', None) + self.event_hub_authorization_rule_id = kwargs.get('event_hub_authorization_rule_id', None) + self.event_hub_name = kwargs.get('event_hub_name', None) + self.logs = kwargs.get('logs', None) + self.workspace_id = kwargs.get('workspace_id', None) + self.marketplace_partner_id = kwargs.get('marketplace_partner_id', None) + + +class ManagementGroupDiagnosticSettingsResourceCollection(msrest.serialization.Model): + """Represents a collection of management group diagnostic settings resources. + + :param value: The collection of management group diagnostic settings resources. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagementGroupDiagnosticSettingsResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagementGroupDiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ManagementGroupLogSettings(msrest.serialization.Model): + """Part of Management Group diagnostic setting. Specifies the settings for a particular log. + + All required parameters must be populated in order to send to Azure. + + :param category: Name of a Management Group Diagnostic Log category for a resource type this + setting is applied to. + :type category: str + :param category_group: Name of a Management Group Diagnostic Log category group for a resource + type this setting is applied to. + :type category_group: str + :param enabled: Required. a value indicating whether this log is enabled. + :type enabled: bool + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'category_group': {'key': 'categoryGroup', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagementGroupLogSettings, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.category_group = kwargs.get('category_group', None) + self.enabled = kwargs['enabled'] + + +class MetricSettings(msrest.serialization.Model): + """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric. + + All required parameters must be populated in order to send to Azure. + + :param time_grain: the timegrain of the metric in ISO8601 format. + :type time_grain: ~datetime.timedelta + :param category: Name of a Diagnostic Metric category for a resource type this setting is + applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a + GET diagnostic settings operation. + :type category: str + :param enabled: Required. a value indicating whether this category is enabled. + :type enabled: bool + :param retention_policy: the retention policy for this category. + :type retention_policy: ~$(python-base-namespace).v2021_05_01_preview.models.RetentionPolicy + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'category': {'key': 'category', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricSettings, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.category = kwargs.get('category', None) + self.enabled = kwargs['enabled'] + self.retention_policy = kwargs.get('retention_policy', None) + + +class MetricTrigger(msrest.serialization.Model): + """The trigger that results in a scaling action. + + All required parameters must be populated in order to send to Azure. + + :param metric_name: Required. the name of the metric that defines what the rule monitors. + :type metric_name: str + :param metric_namespace: the namespace of the metric that defines what the rule monitors. + :type metric_namespace: str + :param metric_resource_uri: Required. the resource identifier of the resource the rule + monitors. + :type metric_resource_uri: str + :param metric_resource_location: the location of the resource the rule monitors. + :type metric_resource_location: str + :param time_grain: Required. the granularity of metrics the rule monitors. Must be one of the + predefined values returned from metric definitions for the metric. Must be between 12 hours and + 1 minute. + :type time_grain: ~datetime.timedelta + :param statistic: Required. the metric statistic type. How the metrics from multiple instances + are combined. Possible values include: "Average", "Min", "Max", "Sum", "Count". + :type statistic: str or + ~$(python-base-namespace).v2021_05_01_preview.models.MetricStatisticType + :param time_window: Required. the range of time in which instance data is collected. This value + must be greater than the delay in metric collection, which can vary from resource-to-resource. + Must be between 12 hours and 5 minutes. + :type time_window: ~datetime.timedelta + :param time_aggregation: Required. time aggregation type. How the data that is collected should + be combined over time. The default value is Average. Possible values include: "Average", + "Minimum", "Maximum", "Total", "Count", "Last". + :type time_aggregation: str or + ~$(python-base-namespace).v2021_05_01_preview.models.TimeAggregationType + :param operator: Required. the operator that is used to compare the metric data and the + threshold. Possible values include: "Equals", "NotEquals", "GreaterThan", "GreaterThanOrEqual", + "LessThan", "LessThanOrEqual". + :type operator: str or + ~$(python-base-namespace).v2021_05_01_preview.models.ComparisonOperationType + :param threshold: Required. the threshold of the metric that triggers the scale action. + :type threshold: float + :param dimensions: List of dimension conditions. For example: + [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. + :type dimensions: + list[~$(python-base-namespace).v2021_05_01_preview.models.ScaleRuleMetricDimension] + :param divide_per_instance: a value indicating whether metric should divide per instance. + :type divide_per_instance: bool + """ + + _validation = { + 'metric_name': {'required': True}, + 'metric_resource_uri': {'required': True}, + 'time_grain': {'required': True}, + 'statistic': {'required': True}, + 'time_window': {'required': True}, + 'time_aggregation': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'metric_resource_uri': {'key': 'metricResourceUri', 'type': 'str'}, + 'metric_resource_location': {'key': 'metricResourceLocation', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'statistic': {'key': 'statistic', 'type': 'str'}, + 'time_window': {'key': 'timeWindow', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'dimensions': {'key': 'dimensions', 'type': '[ScaleRuleMetricDimension]'}, + 'divide_per_instance': {'key': 'dividePerInstance', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricTrigger, self).__init__(**kwargs) + self.metric_name = kwargs['metric_name'] + self.metric_namespace = kwargs.get('metric_namespace', None) + self.metric_resource_uri = kwargs['metric_resource_uri'] + self.metric_resource_location = kwargs.get('metric_resource_location', None) + self.time_grain = kwargs['time_grain'] + self.statistic = kwargs['statistic'] + self.time_window = kwargs['time_window'] + self.time_aggregation = kwargs['time_aggregation'] + self.operator = kwargs['operator'] + self.threshold = kwargs['threshold'] + self.dimensions = kwargs.get('dimensions', None) + self.divide_per_instance = kwargs.get('divide_per_instance', None) + + +class PredictiveAutoscalePolicy(msrest.serialization.Model): + """The parameters for enabling predictive autoscale. + + All required parameters must be populated in order to send to Azure. + + :param scale_mode: Required. the predictive autoscale mode. Possible values include: + "Disabled", "ForecastOnly", "Enabled". + :type scale_mode: str or + ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicyScaleMode + :param scale_look_ahead_time: the amount of time to specify by which instances are launched in + advance. It must be between 1 minute and 60 minutes in ISO 8601 format. + :type scale_look_ahead_time: ~datetime.timedelta + """ + + _validation = { + 'scale_mode': {'required': True}, + } + + _attribute_map = { + 'scale_mode': {'key': 'scaleMode', 'type': 'str'}, + 'scale_look_ahead_time': {'key': 'scaleLookAheadTime', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + super(PredictiveAutoscalePolicy, self).__init__(**kwargs) + self.scale_mode = kwargs['scale_mode'] + self.scale_look_ahead_time = kwargs.get('scale_look_ahead_time', None) + + +class PredictiveResponse(msrest.serialization.Model): + """The response to a metrics query. + + :param timespan: The timespan for which the data was retrieved. Its value consists of two + datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back + from what was originally requested. + :type timespan: str + :param interval: The interval (window size) for which the metric data was returned in. This + may be adjusted in the future and returned back from what was originally requested. This is + not present if a metadata request was made. + :type interval: ~datetime.timedelta + :param metric_name: The metrics being queried. + :type metric_name: str + :param target_resource_id: resource of the predictive metric. + :type target_resource_id: str + :param data: the value of the collection. + :type data: list[~$(python-base-namespace).v2021_05_01_preview.models.PredictiveValue] + """ + + _attribute_map = { + 'timespan': {'key': 'timespan', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'duration'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[PredictiveValue]'}, + } + + def __init__( + self, + **kwargs + ): + super(PredictiveResponse, self).__init__(**kwargs) + self.timespan = kwargs.get('timespan', None) + self.interval = kwargs.get('interval', None) + self.metric_name = kwargs.get('metric_name', None) + self.target_resource_id = kwargs.get('target_resource_id', None) + self.data = kwargs.get('data', None) + + +class PredictiveValue(msrest.serialization.Model): + """Represents a predictive metric value in the given bucket. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp: Required. the timestamp for the metric value in ISO 8601 format. + :type time_stamp: ~datetime.datetime + :param value: Required. Predictive value in this time bucket. + :type value: float + """ + + _validation = { + 'time_stamp': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(PredictiveValue, self).__init__(**kwargs) + self.time_stamp = kwargs['time_stamp'] + self.value = kwargs['value'] + + +class Recurrence(msrest.serialization.Model): + """The repeating times at which this profile begins. This element is not used if the FixedDate element is used. + + All required parameters must be populated in order to send to Azure. + + :param frequency: Required. the recurrence frequency. How often the schedule profile should + take effect. This value must be Week, meaning each week will have the same set of profiles. For + example, to set a daily schedule, set **schedule** to every day of the week. The frequency + property specifies that the schedule is repeated weekly. Possible values include: "None", + "Second", "Minute", "Hour", "Day", "Week", "Month", "Year". + :type frequency: str or + ~$(python-base-namespace).v2021_05_01_preview.models.RecurrenceFrequency + :param schedule: Required. the scheduling constraints for when the profile begins. + :type schedule: ~$(python-base-namespace).v2021_05_01_preview.models.RecurrentSchedule + """ + + _validation = { + 'frequency': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrentSchedule'}, + } + + def __init__( + self, + **kwargs + ): + super(Recurrence, self).__init__(**kwargs) + self.frequency = kwargs['frequency'] + self.schedule = kwargs['schedule'] + + +class RecurrentSchedule(msrest.serialization.Model): + """The scheduling constraints for when the profile begins. + + All required parameters must be populated in order to send to Azure. + + :param time_zone: Required. the timezone for the hours of the profile. Some examples of valid + time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, + Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain + Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard + Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, + Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard + Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, + Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina + Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, + Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde + Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. + Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European + Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, + GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. + Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, + Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, + Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius + Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West + Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard + Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia + Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. + Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, + Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard + Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, + Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji + Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands + Standard Time. + :type time_zone: str + :param days: Required. the collection of days that the profile takes effect on. Possible values + are Sunday through Saturday. + :type days: list[str] + :param hours: Required. A collection of hours that the profile takes effect on. Values + supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported). + :type hours: list[int] + :param minutes: Required. A collection of minutes at which the profile takes effect at. + :type minutes: list[int] + """ + + _validation = { + 'time_zone': {'required': True}, + 'days': {'required': True}, + 'hours': {'required': True}, + 'minutes': {'required': True}, + } + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'days': {'key': 'days', 'type': '[str]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + } + + def __init__( + self, + **kwargs + ): + super(RecurrentSchedule, self).__init__(**kwargs) + self.time_zone = kwargs['time_zone'] + self.days = kwargs['days'] + self.hours = kwargs['hours'] + self.minutes = kwargs['minutes'] + + +class RetentionPolicy(msrest.serialization.Model): + """Specifies the retention policy for the log. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. a value indicating whether the retention policy is enabled. + :type enabled: bool + :param days: Required. the number of days for the retention in days. A value of 0 will retain + the events indefinitely. + :type days: int + """ + + _validation = { + 'enabled': {'required': True}, + 'days': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'days': {'key': 'days', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(RetentionPolicy, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.days = kwargs['days'] + + +class ScaleAction(msrest.serialization.Model): + """The parameters for the scaling action. + + All required parameters must be populated in order to send to Azure. + + :param direction: Required. the scale direction. Whether the scaling action increases or + decreases the number of instances. Possible values include: "None", "Increase", "Decrease". + :type direction: str or ~$(python-base-namespace).v2021_05_01_preview.models.ScaleDirection + :param type: Required. the type of action that should occur when the scale rule fires. Possible + values include: "ChangeCount", "PercentChangeCount", "ExactCount", "ServiceAllowedNextValue". + :type type: str or ~$(python-base-namespace).v2021_05_01_preview.models.ScaleType + :param value: the number of instances that are involved in the scaling action. This value must + be 1 or greater. The default value is 1. + :type value: str + :param cooldown: Required. the amount of time to wait since the last scaling action before this + action occurs. It must be between 1 week and 1 minute in ISO 8601 format. + :type cooldown: ~datetime.timedelta + """ + + _validation = { + 'direction': {'required': True}, + 'type': {'required': True}, + 'cooldown': {'required': True}, + } + + _attribute_map = { + 'direction': {'key': 'direction', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'cooldown': {'key': 'cooldown', 'type': 'duration'}, + } + + def __init__( + self, + **kwargs + ): + super(ScaleAction, self).__init__(**kwargs) + self.direction = kwargs['direction'] + self.type = kwargs['type'] + self.value = kwargs.get('value', "1") + self.cooldown = kwargs['cooldown'] + + +class ScaleCapacity(msrest.serialization.Model): + """The number of instances that can be used during this profile. + + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. the minimum number of instances for the resource. + :type minimum: str + :param maximum: Required. the maximum number of instances for the resource. The actual maximum + number of instances is limited by the cores that are available in the subscription. + :type maximum: str + :param default: Required. the number of instances that will be set if metrics are not available + for evaluation. The default is only used if the current instance count is lower than the + default. + :type default: str + """ + + _validation = { + 'minimum': {'required': True}, + 'maximum': {'required': True}, + 'default': {'required': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ScaleCapacity, self).__init__(**kwargs) + self.minimum = kwargs['minimum'] + self.maximum = kwargs['maximum'] + self.default = kwargs['default'] + + +class ScaleRule(msrest.serialization.Model): + """A rule that provide the triggers and parameters for the scaling action. + + All required parameters must be populated in order to send to Azure. + + :param metric_trigger: Required. the trigger that results in a scaling action. + :type metric_trigger: ~$(python-base-namespace).v2021_05_01_preview.models.MetricTrigger + :param scale_action: Required. the parameters for the scaling action. + :type scale_action: ~$(python-base-namespace).v2021_05_01_preview.models.ScaleAction + """ + + _validation = { + 'metric_trigger': {'required': True}, + 'scale_action': {'required': True}, + } + + _attribute_map = { + 'metric_trigger': {'key': 'metricTrigger', 'type': 'MetricTrigger'}, + 'scale_action': {'key': 'scaleAction', 'type': 'ScaleAction'}, + } + + def __init__( + self, + **kwargs + ): + super(ScaleRule, self).__init__(**kwargs) + self.metric_trigger = kwargs['metric_trigger'] + self.scale_action = kwargs['scale_action'] + + +class ScaleRuleMetricDimension(msrest.serialization.Model): + """Specifies an auto scale rule metric dimension. + + All required parameters must be populated in order to send to Azure. + + :param dimension_name: Required. Name of the dimension. + :type dimension_name: str + :param operator: Required. the dimension operator. Only 'Equals' and 'NotEquals' are supported. + 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. + Possible values include: "Equals", "NotEquals". + :type operator: str or + ~$(python-base-namespace).v2021_05_01_preview.models.ScaleRuleMetricDimensionOperationType + :param values: Required. list of dimension values. For example: ["App1","App2"]. + :type values: list[str] + """ + + _validation = { + 'dimension_name': {'required': True}, + 'operator': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'dimension_name': {'key': 'DimensionName', 'type': 'str'}, + 'operator': {'key': 'Operator', 'type': 'str'}, + 'values': {'key': 'Values', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ScaleRuleMetricDimension, self).__init__(**kwargs) + self.dimension_name = kwargs['dimension_name'] + self.operator = kwargs['operator'] + self.values = kwargs['values'] + + +class SubscriptionDiagnosticSettingsResource(Resource): + """The subscription diagnostic setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param storage_account_id: The resource ID of the storage account to which you would like to + send Diagnostic Logs. + :type storage_account_id: str + :param service_bus_rule_id: The service bus rule Id of the diagnostic setting. This is here to + maintain backwards compatibility. + :type service_bus_rule_id: str + :param event_hub_authorization_rule_id: The resource Id for the event hub authorization rule. + :type event_hub_authorization_rule_id: str + :param event_hub_name: The name of the event hub. If none is specified, the default event hub + will be selected. + :type event_hub_name: str + :param logs: The list of logs settings. + :type logs: list[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionLogSettings] + :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would + like to send Diagnostic Logs. Example: + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + :type workspace_id: str + :param marketplace_partner_id: The full ARM resource ID of the Marketplace resource to which + you would like to send Diagnostic Logs. + :type marketplace_partner_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, + 'logs': {'key': 'properties.logs', 'type': '[SubscriptionLogSettings]'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'marketplace_partner_id': {'key': 'properties.marketplacePartnerId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionDiagnosticSettingsResource, self).__init__(**kwargs) + self.system_data = None + self.storage_account_id = kwargs.get('storage_account_id', None) + self.service_bus_rule_id = kwargs.get('service_bus_rule_id', None) + self.event_hub_authorization_rule_id = kwargs.get('event_hub_authorization_rule_id', None) + self.event_hub_name = kwargs.get('event_hub_name', None) + self.logs = kwargs.get('logs', None) + self.workspace_id = kwargs.get('workspace_id', None) + self.marketplace_partner_id = kwargs.get('marketplace_partner_id', None) + + +class SubscriptionDiagnosticSettingsResourceCollection(msrest.serialization.Model): + """Represents a collection of subscription diagnostic settings resources. + + :param value: The collection of subscription diagnostic settings resources. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SubscriptionDiagnosticSettingsResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionDiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class SubscriptionLogSettings(msrest.serialization.Model): + """Part of Subscription diagnostic setting. Specifies the settings for a particular log. + + All required parameters must be populated in order to send to Azure. + + :param category: Name of a Subscription Diagnostic Log category for a resource type this + setting is applied to. + :type category: str + :param category_group: Name of a Subscription Diagnostic Log category group for a resource type + this setting is applied to. + :type category_group: str + :param enabled: Required. a value indicating whether this log is enabled. + :type enabled: bool + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'category_group': {'key': 'categoryGroup', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(SubscriptionLogSettings, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.category_group = kwargs.get('category_group', None) + self.enabled = kwargs['enabled'] + + +class SystemData(msrest.serialization.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 + ~$(python-base-namespace).v2021_05_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 + ~$(python-base-namespace).v2021_05_01_preview.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 TimeWindow(msrest.serialization.Model): + """A specific date-time for the profile. + + All required parameters must be populated in order to send to Azure. + + :param time_zone: the timezone of the start and end times for the profile. Some examples of + valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard + Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, + Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central + Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific + Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, + Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western + Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard + Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo + Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, + Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard + Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central + European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard + Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, + E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, + Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, + Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius + Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West + Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard + Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia + Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. + Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, + Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard + Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, + Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji + Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands + Standard Time. + :type time_zone: str + :param start: Required. the start time for the profile in ISO 8601 format. + :type start: ~datetime.datetime + :param end: Required. the end time for the profile in ISO 8601 format. + :type end: ~datetime.datetime + """ + + _validation = { + 'start': {'required': True}, + 'end': {'required': True}, + } + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(TimeWindow, self).__init__(**kwargs) + self.time_zone = kwargs.get('time_zone', None) + self.start = kwargs['start'] + self.end = kwargs['end'] + + +class WebhookNotification(msrest.serialization.Model): + """Webhook notification of an autoscale event. + + :param service_uri: the service address to receive the notification. + :type service_uri: str + :param properties: a property bag of settings. This value can be empty. + :type properties: dict[str, str] + """ + + _attribute_map = { + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(WebhookNotification, self).__init__(**kwargs) + self.service_uri = kwargs.get('service_uri', None) + self.properties = kwargs.get('properties', None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models_py3.py new file mode 100644 index 000000000000..f2757e2b62c8 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_models_py3.py @@ -0,0 +1,1706 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._monitor_management_client_enums import * + + +class AutoscaleErrorResponse(msrest.serialization.Model): + """Describes the format of Error response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param error: The error object. + :type error: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleErrorResponseError + :ivar system_data: The system metadata related to the response. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + """ + + _validation = { + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'AutoscaleErrorResponseError'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + def __init__( + self, + *, + error: Optional["AutoscaleErrorResponseError"] = None, + **kwargs + ): + super(AutoscaleErrorResponse, self).__init__(**kwargs) + self.error = error + self.system_data = None + + +class AutoscaleErrorResponseError(msrest.serialization.Model): + """The error object. + + :param code: One of a server-defined set of error codes. + :type code: str + :param message: A human-readable representation of the error. + :type message: str + :param target: The target of the particular error. + :type target: str + :param details: A human-readable representation of the error's details. + :type details: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[str] = None, + **kwargs + ): + super(AutoscaleErrorResponseError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class AutoscaleNotification(msrest.serialization.Model): + """Autoscale notification. + + 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. + + :ivar operation: the operation associated with the notification and its value must be "scale". + Has constant value: "Scale". + :vartype operation: str + :param email: the email notification. + :type email: ~$(python-base-namespace).v2021_05_01_preview.models.EmailNotification + :param webhooks: the collection of webhook notifications. + :type webhooks: list[~$(python-base-namespace).v2021_05_01_preview.models.WebhookNotification] + """ + + _validation = { + 'operation': {'required': True, 'constant': True}, + } + + _attribute_map = { + 'operation': {'key': 'operation', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'EmailNotification'}, + 'webhooks': {'key': 'webhooks', 'type': '[WebhookNotification]'}, + } + + operation = "Scale" + + def __init__( + self, + *, + email: Optional["EmailNotification"] = None, + webhooks: Optional[List["WebhookNotification"]] = None, + **kwargs + ): + super(AutoscaleNotification, self).__init__(**kwargs) + self.email = email + self.webhooks = webhooks + + +class AutoscaleProfile(msrest.serialization.Model): + """Autoscale profile. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. the name of the profile. + :type name: str + :param capacity: Required. the number of instances that can be used during this profile. + :type capacity: ~$(python-base-namespace).v2021_05_01_preview.models.ScaleCapacity + :param rules: Required. the collection of rules that provide the triggers and parameters for + the scaling action. A maximum of 10 rules can be specified. + :type rules: list[~$(python-base-namespace).v2021_05_01_preview.models.ScaleRule] + :param fixed_date: the specific date-time for the profile. This element is not used if the + Recurrence element is used. + :type fixed_date: ~$(python-base-namespace).v2021_05_01_preview.models.TimeWindow + :param recurrence: the repeating times at which this profile begins. This element is not used + if the FixedDate element is used. + :type recurrence: ~$(python-base-namespace).v2021_05_01_preview.models.Recurrence + """ + + _validation = { + 'name': {'required': True}, + 'capacity': {'required': True}, + 'rules': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'ScaleCapacity'}, + 'rules': {'key': 'rules', 'type': '[ScaleRule]'}, + 'fixed_date': {'key': 'fixedDate', 'type': 'TimeWindow'}, + 'recurrence': {'key': 'recurrence', 'type': 'Recurrence'}, + } + + def __init__( + self, + *, + name: str, + capacity: "ScaleCapacity", + rules: List["ScaleRule"], + fixed_date: Optional["TimeWindow"] = None, + recurrence: Optional["Recurrence"] = None, + **kwargs + ): + super(AutoscaleProfile, self).__init__(**kwargs) + self.name = name + self.capacity = capacity + self.rules = rules + self.fixed_date = fixed_date + self.recurrence = recurrence + + +class AutoscaleSettingResource(msrest.serialization.Model): + """The autoscale setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Gets or sets a list of key value pairs that describe the resource. + These tags can be used in viewing and grouping this resource (across resource groups). A + maximum of 15 tags can be provided for a resource. Each tag must have a key no greater in + length than 128 characters and a value no greater in length than 256 characters. + :type tags: dict[str, str] + :ivar system_data: The system metadata related to the response. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param profiles: Required. the collection of automatic scaling profiles that specify different + scaling parameters for different time periods. A maximum of 20 profiles can be specified. + :type profiles: list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleProfile] + :param notifications: the collection of notifications. + :type notifications: + list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleNotification] + :param enabled: the enabled flag. Specifies whether automatic scaling is enabled for the + resource. The default value is 'true'. + :type enabled: bool + :param predictive_autoscale_policy: the predictive autoscale policy mode. + :type predictive_autoscale_policy: + ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicy + :param name_properties_name: the name of the autoscale setting. + :type name_properties_name: str + :param target_resource_uri: the resource identifier of the resource that the autoscale setting + should be added to. + :type target_resource_uri: str + :param target_resource_location: the location of the resource that the autoscale setting should + be added to. + :type target_resource_location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'profiles': {'required': True, 'max_items': 20, 'min_items': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'profiles': {'key': 'properties.profiles', 'type': '[AutoscaleProfile]'}, + 'notifications': {'key': 'properties.notifications', 'type': '[AutoscaleNotification]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'predictive_autoscale_policy': {'key': 'properties.predictiveAutoscalePolicy', 'type': 'PredictiveAutoscalePolicy'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + 'target_resource_location': {'key': 'properties.targetResourceLocation', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + profiles: List["AutoscaleProfile"], + tags: Optional[Dict[str, str]] = None, + notifications: Optional[List["AutoscaleNotification"]] = None, + enabled: Optional[bool] = True, + predictive_autoscale_policy: Optional["PredictiveAutoscalePolicy"] = None, + name_properties_name: Optional[str] = None, + target_resource_uri: Optional[str] = None, + target_resource_location: Optional[str] = None, + **kwargs + ): + super(AutoscaleSettingResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.system_data = None + self.profiles = profiles + self.notifications = notifications + self.enabled = enabled + self.predictive_autoscale_policy = predictive_autoscale_policy + self.name_properties_name = name_properties_name + self.target_resource_uri = target_resource_uri + self.target_resource_location = target_resource_location + + +class AutoscaleSettingResourceCollection(msrest.serialization.Model): + """Represents a collection of autoscale setting resources. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. the values for the autoscale setting resources. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AutoscaleSettingResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["AutoscaleSettingResource"], + next_link: Optional[str] = None, + **kwargs + ): + super(AutoscaleSettingResourceCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AutoscaleSettingResourcePatch(msrest.serialization.Model): + """The autoscale setting object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param profiles: the collection of automatic scaling profiles that specify different scaling + parameters for different time periods. A maximum of 20 profiles can be specified. + :type profiles: list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleProfile] + :param notifications: the collection of notifications. + :type notifications: + list[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleNotification] + :param enabled: the enabled flag. Specifies whether automatic scaling is enabled for the + resource. The default value is 'true'. + :type enabled: bool + :param predictive_autoscale_policy: the predictive autoscale policy mode. + :type predictive_autoscale_policy: + ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicy + :param name: the name of the autoscale setting. + :type name: str + :param target_resource_uri: the resource identifier of the resource that the autoscale setting + should be added to. + :type target_resource_uri: str + :param target_resource_location: the location of the resource that the autoscale setting should + be added to. + :type target_resource_location: str + """ + + _validation = { + 'profiles': {'max_items': 20, 'min_items': 0}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'profiles': {'key': 'properties.profiles', 'type': '[AutoscaleProfile]'}, + 'notifications': {'key': 'properties.notifications', 'type': '[AutoscaleNotification]'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'predictive_autoscale_policy': {'key': 'properties.predictiveAutoscalePolicy', 'type': 'PredictiveAutoscalePolicy'}, + 'name': {'key': 'properties.name', 'type': 'str'}, + 'target_resource_uri': {'key': 'properties.targetResourceUri', 'type': 'str'}, + 'target_resource_location': {'key': 'properties.targetResourceLocation', 'type': 'str'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + profiles: Optional[List["AutoscaleProfile"]] = None, + notifications: Optional[List["AutoscaleNotification"]] = None, + enabled: Optional[bool] = True, + predictive_autoscale_policy: Optional["PredictiveAutoscalePolicy"] = None, + name: Optional[str] = None, + target_resource_uri: Optional[str] = None, + target_resource_location: Optional[str] = None, + **kwargs + ): + super(AutoscaleSettingResourcePatch, self).__init__(**kwargs) + self.tags = tags + self.profiles = profiles + self.notifications = notifications + self.enabled = enabled + self.predictive_autoscale_policy = predictive_autoscale_policy + self.name = name + self.target_resource_uri = target_resource_uri + self.target_resource_location = target_resource_location + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class DiagnosticSettingsCategoryResource(Resource): + """The diagnostic settings category resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param category_type: The type of the diagnostic settings category. Possible values include: + "Metrics", "Logs". + :type category_type: str or ~$(python-base-namespace).v2021_05_01_preview.models.CategoryType + :param category_groups: the collection of what category groups are supported. + :type category_groups: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'category_type': {'key': 'properties.categoryType', 'type': 'str'}, + 'category_groups': {'key': 'properties.categoryGroups', 'type': '[str]'}, + } + + def __init__( + self, + *, + category_type: Optional[Union[str, "CategoryType"]] = None, + category_groups: Optional[List[str]] = None, + **kwargs + ): + super(DiagnosticSettingsCategoryResource, self).__init__(**kwargs) + self.system_data = None + self.category_type = category_type + self.category_groups = category_groups + + +class DiagnosticSettingsCategoryResourceCollection(msrest.serialization.Model): + """Represents a collection of diagnostic setting category resources. + + :param value: The collection of diagnostic settings category resources. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticSettingsCategoryResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["DiagnosticSettingsCategoryResource"]] = None, + **kwargs + ): + super(DiagnosticSettingsCategoryResourceCollection, self).__init__(**kwargs) + self.value = value + + +class DiagnosticSettingsResource(Resource): + """The diagnostic setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param storage_account_id: The resource ID of the storage account to which you would like to + send Diagnostic Logs. + :type storage_account_id: str + :param service_bus_rule_id: The service bus rule Id of the diagnostic setting. This is here to + maintain backwards compatibility. + :type service_bus_rule_id: str + :param event_hub_authorization_rule_id: The resource Id for the event hub authorization rule. + :type event_hub_authorization_rule_id: str + :param event_hub_name: The name of the event hub. If none is specified, the default event hub + will be selected. + :type event_hub_name: str + :param metrics: The list of metric settings. + :type metrics: list[~$(python-base-namespace).v2021_05_01_preview.models.MetricSettings] + :param logs: The list of logs settings. + :type logs: list[~$(python-base-namespace).v2021_05_01_preview.models.LogSettings] + :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would + like to send Diagnostic Logs. Example: + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + :type workspace_id: str + :param marketplace_partner_id: The full ARM resource ID of the Marketplace resource to which + you would like to send Diagnostic Logs. + :type marketplace_partner_id: str + :param log_analytics_destination_type: A string indicating whether the export to Log Analytics + should use the default destination type, i.e. AzureDiagnostics, or use a destination type + constructed as follows: :code:``_:code:``. Possible values are: Dedicated and null (null is default.). + :type log_analytics_destination_type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, + 'metrics': {'key': 'properties.metrics', 'type': '[MetricSettings]'}, + 'logs': {'key': 'properties.logs', 'type': '[LogSettings]'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'marketplace_partner_id': {'key': 'properties.marketplacePartnerId', 'type': 'str'}, + 'log_analytics_destination_type': {'key': 'properties.logAnalyticsDestinationType', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_account_id: Optional[str] = None, + service_bus_rule_id: Optional[str] = None, + event_hub_authorization_rule_id: Optional[str] = None, + event_hub_name: Optional[str] = None, + metrics: Optional[List["MetricSettings"]] = None, + logs: Optional[List["LogSettings"]] = None, + workspace_id: Optional[str] = None, + marketplace_partner_id: Optional[str] = None, + log_analytics_destination_type: Optional[str] = None, + **kwargs + ): + super(DiagnosticSettingsResource, self).__init__(**kwargs) + self.system_data = None + self.storage_account_id = storage_account_id + self.service_bus_rule_id = service_bus_rule_id + self.event_hub_authorization_rule_id = event_hub_authorization_rule_id + self.event_hub_name = event_hub_name + self.metrics = metrics + self.logs = logs + self.workspace_id = workspace_id + self.marketplace_partner_id = marketplace_partner_id + self.log_analytics_destination_type = log_analytics_destination_type + + +class DiagnosticSettingsResourceCollection(msrest.serialization.Model): + """Represents a collection of alert rule resources. + + :param value: The collection of diagnostic settings resources;. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiagnosticSettingsResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["DiagnosticSettingsResource"]] = None, + **kwargs + ): + super(DiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = value + + +class EmailNotification(msrest.serialization.Model): + """Email notification of an autoscale event. + + :param send_to_subscription_administrator: a value indicating whether to send email to + subscription administrator. + :type send_to_subscription_administrator: bool + :param send_to_subscription_co_administrators: a value indicating whether to send email to + subscription co-administrators. + :type send_to_subscription_co_administrators: bool + :param custom_emails: the custom e-mails list. This value can be null or empty, in which case + this attribute will be ignored. + :type custom_emails: list[str] + """ + + _attribute_map = { + 'send_to_subscription_administrator': {'key': 'sendToSubscriptionAdministrator', 'type': 'bool'}, + 'send_to_subscription_co_administrators': {'key': 'sendToSubscriptionCoAdministrators', 'type': 'bool'}, + 'custom_emails': {'key': 'customEmails', 'type': '[str]'}, + } + + def __init__( + self, + *, + send_to_subscription_administrator: Optional[bool] = False, + send_to_subscription_co_administrators: Optional[bool] = False, + custom_emails: Optional[List[str]] = None, + **kwargs + ): + super(EmailNotification, self).__init__(**kwargs) + self.send_to_subscription_administrator = send_to_subscription_administrator + self.send_to_subscription_co_administrators = send_to_subscription_co_administrators + self.custom_emails = custom_emails + + +class ErrorResponse(msrest.serialization.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: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class LogSettings(msrest.serialization.Model): + """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular log. + + All required parameters must be populated in order to send to Azure. + + :param category: Name of a Diagnostic Log category for a resource type this setting is applied + to. To obtain the list of Diagnostic Log categories for a resource, first perform a GET + diagnostic settings operation. + :type category: str + :param category_group: Name of a Diagnostic Log category group for a resource type this setting + is applied to. To obtain the list of Diagnostic Log categories for a resource, first perform a + GET diagnostic settings operation. + :type category_group: str + :param enabled: Required. a value indicating whether this log is enabled. + :type enabled: bool + :param retention_policy: the retention policy for this log. + :type retention_policy: ~$(python-base-namespace).v2021_05_01_preview.models.RetentionPolicy + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'category_group': {'key': 'categoryGroup', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__( + self, + *, + enabled: bool, + category: Optional[str] = None, + category_group: Optional[str] = None, + retention_policy: Optional["RetentionPolicy"] = None, + **kwargs + ): + super(LogSettings, self).__init__(**kwargs) + self.category = category + self.category_group = category_group + self.enabled = enabled + self.retention_policy = retention_policy + + +class ManagementGroupDiagnosticSettingsResource(Resource): + """The management group diagnostic setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param storage_account_id: The resource ID of the storage account to which you would like to + send Diagnostic Logs. + :type storage_account_id: str + :param service_bus_rule_id: The service bus rule Id of the diagnostic setting. This is here to + maintain backwards compatibility. + :type service_bus_rule_id: str + :param event_hub_authorization_rule_id: The resource Id for the event hub authorization rule. + :type event_hub_authorization_rule_id: str + :param event_hub_name: The name of the event hub. If none is specified, the default event hub + will be selected. + :type event_hub_name: str + :param logs: The list of logs settings. + :type logs: + list[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupLogSettings] + :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would + like to send Diagnostic Logs. Example: + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + :type workspace_id: str + :param marketplace_partner_id: The full ARM resource ID of the Marketplace resource to which + you would like to send Diagnostic Logs. + :type marketplace_partner_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, + 'logs': {'key': 'properties.logs', 'type': '[ManagementGroupLogSettings]'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'marketplace_partner_id': {'key': 'properties.marketplacePartnerId', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_account_id: Optional[str] = None, + service_bus_rule_id: Optional[str] = None, + event_hub_authorization_rule_id: Optional[str] = None, + event_hub_name: Optional[str] = None, + logs: Optional[List["ManagementGroupLogSettings"]] = None, + workspace_id: Optional[str] = None, + marketplace_partner_id: Optional[str] = None, + **kwargs + ): + super(ManagementGroupDiagnosticSettingsResource, self).__init__(**kwargs) + self.system_data = None + self.storage_account_id = storage_account_id + self.service_bus_rule_id = service_bus_rule_id + self.event_hub_authorization_rule_id = event_hub_authorization_rule_id + self.event_hub_name = event_hub_name + self.logs = logs + self.workspace_id = workspace_id + self.marketplace_partner_id = marketplace_partner_id + + +class ManagementGroupDiagnosticSettingsResourceCollection(msrest.serialization.Model): + """Represents a collection of management group diagnostic settings resources. + + :param value: The collection of management group diagnostic settings resources. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ManagementGroupDiagnosticSettingsResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["ManagementGroupDiagnosticSettingsResource"]] = None, + **kwargs + ): + super(ManagementGroupDiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = value + + +class ManagementGroupLogSettings(msrest.serialization.Model): + """Part of Management Group diagnostic setting. Specifies the settings for a particular log. + + All required parameters must be populated in order to send to Azure. + + :param category: Name of a Management Group Diagnostic Log category for a resource type this + setting is applied to. + :type category: str + :param category_group: Name of a Management Group Diagnostic Log category group for a resource + type this setting is applied to. + :type category_group: str + :param enabled: Required. a value indicating whether this log is enabled. + :type enabled: bool + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'category_group': {'key': 'categoryGroup', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + enabled: bool, + category: Optional[str] = None, + category_group: Optional[str] = None, + **kwargs + ): + super(ManagementGroupLogSettings, self).__init__(**kwargs) + self.category = category + self.category_group = category_group + self.enabled = enabled + + +class MetricSettings(msrest.serialization.Model): + """Part of MultiTenantDiagnosticSettings. Specifies the settings for a particular metric. + + All required parameters must be populated in order to send to Azure. + + :param time_grain: the timegrain of the metric in ISO8601 format. + :type time_grain: ~datetime.timedelta + :param category: Name of a Diagnostic Metric category for a resource type this setting is + applied to. To obtain the list of Diagnostic metric categories for a resource, first perform a + GET diagnostic settings operation. + :type category: str + :param enabled: Required. a value indicating whether this category is enabled. + :type enabled: bool + :param retention_policy: the retention policy for this category. + :type retention_policy: ~$(python-base-namespace).v2021_05_01_preview.models.RetentionPolicy + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'category': {'key': 'category', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, + } + + def __init__( + self, + *, + enabled: bool, + time_grain: Optional[datetime.timedelta] = None, + category: Optional[str] = None, + retention_policy: Optional["RetentionPolicy"] = None, + **kwargs + ): + super(MetricSettings, self).__init__(**kwargs) + self.time_grain = time_grain + self.category = category + self.enabled = enabled + self.retention_policy = retention_policy + + +class MetricTrigger(msrest.serialization.Model): + """The trigger that results in a scaling action. + + All required parameters must be populated in order to send to Azure. + + :param metric_name: Required. the name of the metric that defines what the rule monitors. + :type metric_name: str + :param metric_namespace: the namespace of the metric that defines what the rule monitors. + :type metric_namespace: str + :param metric_resource_uri: Required. the resource identifier of the resource the rule + monitors. + :type metric_resource_uri: str + :param metric_resource_location: the location of the resource the rule monitors. + :type metric_resource_location: str + :param time_grain: Required. the granularity of metrics the rule monitors. Must be one of the + predefined values returned from metric definitions for the metric. Must be between 12 hours and + 1 minute. + :type time_grain: ~datetime.timedelta + :param statistic: Required. the metric statistic type. How the metrics from multiple instances + are combined. Possible values include: "Average", "Min", "Max", "Sum", "Count". + :type statistic: str or + ~$(python-base-namespace).v2021_05_01_preview.models.MetricStatisticType + :param time_window: Required. the range of time in which instance data is collected. This value + must be greater than the delay in metric collection, which can vary from resource-to-resource. + Must be between 12 hours and 5 minutes. + :type time_window: ~datetime.timedelta + :param time_aggregation: Required. time aggregation type. How the data that is collected should + be combined over time. The default value is Average. Possible values include: "Average", + "Minimum", "Maximum", "Total", "Count", "Last". + :type time_aggregation: str or + ~$(python-base-namespace).v2021_05_01_preview.models.TimeAggregationType + :param operator: Required. the operator that is used to compare the metric data and the + threshold. Possible values include: "Equals", "NotEquals", "GreaterThan", "GreaterThanOrEqual", + "LessThan", "LessThanOrEqual". + :type operator: str or + ~$(python-base-namespace).v2021_05_01_preview.models.ComparisonOperationType + :param threshold: Required. the threshold of the metric that triggers the scale action. + :type threshold: float + :param dimensions: List of dimension conditions. For example: + [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}]. + :type dimensions: + list[~$(python-base-namespace).v2021_05_01_preview.models.ScaleRuleMetricDimension] + :param divide_per_instance: a value indicating whether metric should divide per instance. + :type divide_per_instance: bool + """ + + _validation = { + 'metric_name': {'required': True}, + 'metric_resource_uri': {'required': True}, + 'time_grain': {'required': True}, + 'statistic': {'required': True}, + 'time_window': {'required': True}, + 'time_aggregation': {'required': True}, + 'operator': {'required': True}, + 'threshold': {'required': True}, + } + + _attribute_map = { + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'metric_namespace': {'key': 'metricNamespace', 'type': 'str'}, + 'metric_resource_uri': {'key': 'metricResourceUri', 'type': 'str'}, + 'metric_resource_location': {'key': 'metricResourceLocation', 'type': 'str'}, + 'time_grain': {'key': 'timeGrain', 'type': 'duration'}, + 'statistic': {'key': 'statistic', 'type': 'str'}, + 'time_window': {'key': 'timeWindow', 'type': 'duration'}, + 'time_aggregation': {'key': 'timeAggregation', 'type': 'str'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'threshold': {'key': 'threshold', 'type': 'float'}, + 'dimensions': {'key': 'dimensions', 'type': '[ScaleRuleMetricDimension]'}, + 'divide_per_instance': {'key': 'dividePerInstance', 'type': 'bool'}, + } + + def __init__( + self, + *, + metric_name: str, + metric_resource_uri: str, + time_grain: datetime.timedelta, + statistic: Union[str, "MetricStatisticType"], + time_window: datetime.timedelta, + time_aggregation: Union[str, "TimeAggregationType"], + operator: Union[str, "ComparisonOperationType"], + threshold: float, + metric_namespace: Optional[str] = None, + metric_resource_location: Optional[str] = None, + dimensions: Optional[List["ScaleRuleMetricDimension"]] = None, + divide_per_instance: Optional[bool] = None, + **kwargs + ): + super(MetricTrigger, self).__init__(**kwargs) + self.metric_name = metric_name + self.metric_namespace = metric_namespace + self.metric_resource_uri = metric_resource_uri + self.metric_resource_location = metric_resource_location + self.time_grain = time_grain + self.statistic = statistic + self.time_window = time_window + self.time_aggregation = time_aggregation + self.operator = operator + self.threshold = threshold + self.dimensions = dimensions + self.divide_per_instance = divide_per_instance + + +class PredictiveAutoscalePolicy(msrest.serialization.Model): + """The parameters for enabling predictive autoscale. + + All required parameters must be populated in order to send to Azure. + + :param scale_mode: Required. the predictive autoscale mode. Possible values include: + "Disabled", "ForecastOnly", "Enabled". + :type scale_mode: str or + ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveAutoscalePolicyScaleMode + :param scale_look_ahead_time: the amount of time to specify by which instances are launched in + advance. It must be between 1 minute and 60 minutes in ISO 8601 format. + :type scale_look_ahead_time: ~datetime.timedelta + """ + + _validation = { + 'scale_mode': {'required': True}, + } + + _attribute_map = { + 'scale_mode': {'key': 'scaleMode', 'type': 'str'}, + 'scale_look_ahead_time': {'key': 'scaleLookAheadTime', 'type': 'duration'}, + } + + def __init__( + self, + *, + scale_mode: Union[str, "PredictiveAutoscalePolicyScaleMode"], + scale_look_ahead_time: Optional[datetime.timedelta] = None, + **kwargs + ): + super(PredictiveAutoscalePolicy, self).__init__(**kwargs) + self.scale_mode = scale_mode + self.scale_look_ahead_time = scale_look_ahead_time + + +class PredictiveResponse(msrest.serialization.Model): + """The response to a metrics query. + + :param timespan: The timespan for which the data was retrieved. Its value consists of two + datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back + from what was originally requested. + :type timespan: str + :param interval: The interval (window size) for which the metric data was returned in. This + may be adjusted in the future and returned back from what was originally requested. This is + not present if a metadata request was made. + :type interval: ~datetime.timedelta + :param metric_name: The metrics being queried. + :type metric_name: str + :param target_resource_id: resource of the predictive metric. + :type target_resource_id: str + :param data: the value of the collection. + :type data: list[~$(python-base-namespace).v2021_05_01_preview.models.PredictiveValue] + """ + + _attribute_map = { + 'timespan': {'key': 'timespan', 'type': 'str'}, + 'interval': {'key': 'interval', 'type': 'duration'}, + 'metric_name': {'key': 'metricName', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'data': {'key': 'data', 'type': '[PredictiveValue]'}, + } + + def __init__( + self, + *, + timespan: Optional[str] = None, + interval: Optional[datetime.timedelta] = None, + metric_name: Optional[str] = None, + target_resource_id: Optional[str] = None, + data: Optional[List["PredictiveValue"]] = None, + **kwargs + ): + super(PredictiveResponse, self).__init__(**kwargs) + self.timespan = timespan + self.interval = interval + self.metric_name = metric_name + self.target_resource_id = target_resource_id + self.data = data + + +class PredictiveValue(msrest.serialization.Model): + """Represents a predictive metric value in the given bucket. + + All required parameters must be populated in order to send to Azure. + + :param time_stamp: Required. the timestamp for the metric value in ISO 8601 format. + :type time_stamp: ~datetime.datetime + :param value: Required. Predictive value in this time bucket. + :type value: float + """ + + _validation = { + 'time_stamp': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': 'float'}, + } + + def __init__( + self, + *, + time_stamp: datetime.datetime, + value: float, + **kwargs + ): + super(PredictiveValue, self).__init__(**kwargs) + self.time_stamp = time_stamp + self.value = value + + +class Recurrence(msrest.serialization.Model): + """The repeating times at which this profile begins. This element is not used if the FixedDate element is used. + + All required parameters must be populated in order to send to Azure. + + :param frequency: Required. the recurrence frequency. How often the schedule profile should + take effect. This value must be Week, meaning each week will have the same set of profiles. For + example, to set a daily schedule, set **schedule** to every day of the week. The frequency + property specifies that the schedule is repeated weekly. Possible values include: "None", + "Second", "Minute", "Hour", "Day", "Week", "Month", "Year". + :type frequency: str or + ~$(python-base-namespace).v2021_05_01_preview.models.RecurrenceFrequency + :param schedule: Required. the scheduling constraints for when the profile begins. + :type schedule: ~$(python-base-namespace).v2021_05_01_preview.models.RecurrentSchedule + """ + + _validation = { + 'frequency': {'required': True}, + 'schedule': {'required': True}, + } + + _attribute_map = { + 'frequency': {'key': 'frequency', 'type': 'str'}, + 'schedule': {'key': 'schedule', 'type': 'RecurrentSchedule'}, + } + + def __init__( + self, + *, + frequency: Union[str, "RecurrenceFrequency"], + schedule: "RecurrentSchedule", + **kwargs + ): + super(Recurrence, self).__init__(**kwargs) + self.frequency = frequency + self.schedule = schedule + + +class RecurrentSchedule(msrest.serialization.Model): + """The scheduling constraints for when the profile begins. + + All required parameters must be populated in order to send to Azure. + + :param time_zone: Required. the timezone for the hours of the profile. Some examples of valid + time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard Time, + Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, Mountain + Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central Standard + Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific Standard Time, + Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, Paraguay Standard + Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western Standard Time, + Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard Time, Argentina + Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo Standard Time, + Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, Cape Verde + Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard Time, W. + Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central European + Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard Time, + GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, E. + Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, + Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, + Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius + Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West + Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard + Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia + Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. + Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, + Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard + Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, + Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji + Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands + Standard Time. + :type time_zone: str + :param days: Required. the collection of days that the profile takes effect on. Possible values + are Sunday through Saturday. + :type days: list[str] + :param hours: Required. A collection of hours that the profile takes effect on. Values + supported are 0 to 23 on the 24-hour clock (AM/PM times are not supported). + :type hours: list[int] + :param minutes: Required. A collection of minutes at which the profile takes effect at. + :type minutes: list[int] + """ + + _validation = { + 'time_zone': {'required': True}, + 'days': {'required': True}, + 'hours': {'required': True}, + 'minutes': {'required': True}, + } + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'days': {'key': 'days', 'type': '[str]'}, + 'hours': {'key': 'hours', 'type': '[int]'}, + 'minutes': {'key': 'minutes', 'type': '[int]'}, + } + + def __init__( + self, + *, + time_zone: str, + days: List[str], + hours: List[int], + minutes: List[int], + **kwargs + ): + super(RecurrentSchedule, self).__init__(**kwargs) + self.time_zone = time_zone + self.days = days + self.hours = hours + self.minutes = minutes + + +class RetentionPolicy(msrest.serialization.Model): + """Specifies the retention policy for the log. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. a value indicating whether the retention policy is enabled. + :type enabled: bool + :param days: Required. the number of days for the retention in days. A value of 0 will retain + the events indefinitely. + :type days: int + """ + + _validation = { + 'enabled': {'required': True}, + 'days': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'days': {'key': 'days', 'type': 'int'}, + } + + def __init__( + self, + *, + enabled: bool, + days: int, + **kwargs + ): + super(RetentionPolicy, self).__init__(**kwargs) + self.enabled = enabled + self.days = days + + +class ScaleAction(msrest.serialization.Model): + """The parameters for the scaling action. + + All required parameters must be populated in order to send to Azure. + + :param direction: Required. the scale direction. Whether the scaling action increases or + decreases the number of instances. Possible values include: "None", "Increase", "Decrease". + :type direction: str or ~$(python-base-namespace).v2021_05_01_preview.models.ScaleDirection + :param type: Required. the type of action that should occur when the scale rule fires. Possible + values include: "ChangeCount", "PercentChangeCount", "ExactCount", "ServiceAllowedNextValue". + :type type: str or ~$(python-base-namespace).v2021_05_01_preview.models.ScaleType + :param value: the number of instances that are involved in the scaling action. This value must + be 1 or greater. The default value is 1. + :type value: str + :param cooldown: Required. the amount of time to wait since the last scaling action before this + action occurs. It must be between 1 week and 1 minute in ISO 8601 format. + :type cooldown: ~datetime.timedelta + """ + + _validation = { + 'direction': {'required': True}, + 'type': {'required': True}, + 'cooldown': {'required': True}, + } + + _attribute_map = { + 'direction': {'key': 'direction', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + 'cooldown': {'key': 'cooldown', 'type': 'duration'}, + } + + def __init__( + self, + *, + direction: Union[str, "ScaleDirection"], + type: Union[str, "ScaleType"], + cooldown: datetime.timedelta, + value: Optional[str] = "1", + **kwargs + ): + super(ScaleAction, self).__init__(**kwargs) + self.direction = direction + self.type = type + self.value = value + self.cooldown = cooldown + + +class ScaleCapacity(msrest.serialization.Model): + """The number of instances that can be used during this profile. + + All required parameters must be populated in order to send to Azure. + + :param minimum: Required. the minimum number of instances for the resource. + :type minimum: str + :param maximum: Required. the maximum number of instances for the resource. The actual maximum + number of instances is limited by the cores that are available in the subscription. + :type maximum: str + :param default: Required. the number of instances that will be set if metrics are not available + for evaluation. The default is only used if the current instance count is lower than the + default. + :type default: str + """ + + _validation = { + 'minimum': {'required': True}, + 'maximum': {'required': True}, + 'default': {'required': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'str'}, + 'maximum': {'key': 'maximum', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__( + self, + *, + minimum: str, + maximum: str, + default: str, + **kwargs + ): + super(ScaleCapacity, self).__init__(**kwargs) + self.minimum = minimum + self.maximum = maximum + self.default = default + + +class ScaleRule(msrest.serialization.Model): + """A rule that provide the triggers and parameters for the scaling action. + + All required parameters must be populated in order to send to Azure. + + :param metric_trigger: Required. the trigger that results in a scaling action. + :type metric_trigger: ~$(python-base-namespace).v2021_05_01_preview.models.MetricTrigger + :param scale_action: Required. the parameters for the scaling action. + :type scale_action: ~$(python-base-namespace).v2021_05_01_preview.models.ScaleAction + """ + + _validation = { + 'metric_trigger': {'required': True}, + 'scale_action': {'required': True}, + } + + _attribute_map = { + 'metric_trigger': {'key': 'metricTrigger', 'type': 'MetricTrigger'}, + 'scale_action': {'key': 'scaleAction', 'type': 'ScaleAction'}, + } + + def __init__( + self, + *, + metric_trigger: "MetricTrigger", + scale_action: "ScaleAction", + **kwargs + ): + super(ScaleRule, self).__init__(**kwargs) + self.metric_trigger = metric_trigger + self.scale_action = scale_action + + +class ScaleRuleMetricDimension(msrest.serialization.Model): + """Specifies an auto scale rule metric dimension. + + All required parameters must be populated in order to send to Azure. + + :param dimension_name: Required. Name of the dimension. + :type dimension_name: str + :param operator: Required. the dimension operator. Only 'Equals' and 'NotEquals' are supported. + 'Equals' being equal to any of the values. 'NotEquals' being not equal to all of the values. + Possible values include: "Equals", "NotEquals". + :type operator: str or + ~$(python-base-namespace).v2021_05_01_preview.models.ScaleRuleMetricDimensionOperationType + :param values: Required. list of dimension values. For example: ["App1","App2"]. + :type values: list[str] + """ + + _validation = { + 'dimension_name': {'required': True}, + 'operator': {'required': True}, + 'values': {'required': True}, + } + + _attribute_map = { + 'dimension_name': {'key': 'DimensionName', 'type': 'str'}, + 'operator': {'key': 'Operator', 'type': 'str'}, + 'values': {'key': 'Values', 'type': '[str]'}, + } + + def __init__( + self, + *, + dimension_name: str, + operator: Union[str, "ScaleRuleMetricDimensionOperationType"], + values: List[str], + **kwargs + ): + super(ScaleRuleMetricDimension, self).__init__(**kwargs) + self.dimension_name = dimension_name + self.operator = operator + self.values = values + + +class SubscriptionDiagnosticSettingsResource(Resource): + """The subscription diagnostic setting resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~$(python-base-namespace).v2021_05_01_preview.models.SystemData + :param storage_account_id: The resource ID of the storage account to which you would like to + send Diagnostic Logs. + :type storage_account_id: str + :param service_bus_rule_id: The service bus rule Id of the diagnostic setting. This is here to + maintain backwards compatibility. + :type service_bus_rule_id: str + :param event_hub_authorization_rule_id: The resource Id for the event hub authorization rule. + :type event_hub_authorization_rule_id: str + :param event_hub_name: The name of the event hub. If none is specified, the default event hub + will be selected. + :type event_hub_name: str + :param logs: The list of logs settings. + :type logs: list[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionLogSettings] + :param workspace_id: The full ARM resource ID of the Log Analytics workspace to which you would + like to send Diagnostic Logs. Example: + /subscriptions/4b9e8510-67ab-4e9a-95a9-e2f1e570ea9c/resourceGroups/insights-integration/providers/Microsoft.OperationalInsights/workspaces/viruela2. + :type workspace_id: str + :param marketplace_partner_id: The full ARM resource ID of the Marketplace resource to which + you would like to send Diagnostic Logs. + :type marketplace_partner_id: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'storage_account_id': {'key': 'properties.storageAccountId', 'type': 'str'}, + 'service_bus_rule_id': {'key': 'properties.serviceBusRuleId', 'type': 'str'}, + 'event_hub_authorization_rule_id': {'key': 'properties.eventHubAuthorizationRuleId', 'type': 'str'}, + 'event_hub_name': {'key': 'properties.eventHubName', 'type': 'str'}, + 'logs': {'key': 'properties.logs', 'type': '[SubscriptionLogSettings]'}, + 'workspace_id': {'key': 'properties.workspaceId', 'type': 'str'}, + 'marketplace_partner_id': {'key': 'properties.marketplacePartnerId', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_account_id: Optional[str] = None, + service_bus_rule_id: Optional[str] = None, + event_hub_authorization_rule_id: Optional[str] = None, + event_hub_name: Optional[str] = None, + logs: Optional[List["SubscriptionLogSettings"]] = None, + workspace_id: Optional[str] = None, + marketplace_partner_id: Optional[str] = None, + **kwargs + ): + super(SubscriptionDiagnosticSettingsResource, self).__init__(**kwargs) + self.system_data = None + self.storage_account_id = storage_account_id + self.service_bus_rule_id = service_bus_rule_id + self.event_hub_authorization_rule_id = event_hub_authorization_rule_id + self.event_hub_name = event_hub_name + self.logs = logs + self.workspace_id = workspace_id + self.marketplace_partner_id = marketplace_partner_id + + +class SubscriptionDiagnosticSettingsResourceCollection(msrest.serialization.Model): + """Represents a collection of subscription diagnostic settings resources. + + :param value: The collection of subscription diagnostic settings resources. + :type value: + list[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SubscriptionDiagnosticSettingsResource]'}, + } + + def __init__( + self, + *, + value: Optional[List["SubscriptionDiagnosticSettingsResource"]] = None, + **kwargs + ): + super(SubscriptionDiagnosticSettingsResourceCollection, self).__init__(**kwargs) + self.value = value + + +class SubscriptionLogSettings(msrest.serialization.Model): + """Part of Subscription diagnostic setting. Specifies the settings for a particular log. + + All required parameters must be populated in order to send to Azure. + + :param category: Name of a Subscription Diagnostic Log category for a resource type this + setting is applied to. + :type category: str + :param category_group: Name of a Subscription Diagnostic Log category group for a resource type + this setting is applied to. + :type category_group: str + :param enabled: Required. a value indicating whether this log is enabled. + :type enabled: bool + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'category_group': {'key': 'categoryGroup', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + enabled: bool, + category: Optional[str] = None, + category_group: Optional[str] = None, + **kwargs + ): + super(SubscriptionLogSettings, self).__init__(**kwargs) + self.category = category + self.category_group = category_group + self.enabled = enabled + + +class SystemData(msrest.serialization.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 + ~$(python-base-namespace).v2021_05_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 + ~$(python-base-namespace).v2021_05_01_preview.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 TimeWindow(msrest.serialization.Model): + """A specific date-time for the profile. + + All required parameters must be populated in order to send to Azure. + + :param time_zone: the timezone of the start and end times for the profile. Some examples of + valid time zones are: Dateline Standard Time, UTC-11, Hawaiian Standard Time, Alaskan Standard + Time, Pacific Standard Time (Mexico), Pacific Standard Time, US Mountain Standard Time, + Mountain Standard Time (Mexico), Mountain Standard Time, Central America Standard Time, Central + Standard Time, Central Standard Time (Mexico), Canada Central Standard Time, SA Pacific + Standard Time, Eastern Standard Time, US Eastern Standard Time, Venezuela Standard Time, + Paraguay Standard Time, Atlantic Standard Time, Central Brazilian Standard Time, SA Western + Standard Time, Pacific SA Standard Time, Newfoundland Standard Time, E. South America Standard + Time, Argentina Standard Time, SA Eastern Standard Time, Greenland Standard Time, Montevideo + Standard Time, Bahia Standard Time, UTC-02, Mid-Atlantic Standard Time, Azores Standard Time, + Cape Verde Standard Time, Morocco Standard Time, UTC, GMT Standard Time, Greenwich Standard + Time, W. Europe Standard Time, Central Europe Standard Time, Romance Standard Time, Central + European Standard Time, W. Central Africa Standard Time, Namibia Standard Time, Jordan Standard + Time, GTB Standard Time, Middle East Standard Time, Egypt Standard Time, Syria Standard Time, + E. Europe Standard Time, South Africa Standard Time, FLE Standard Time, Turkey Standard Time, + Israel Standard Time, Kaliningrad Standard Time, Libya Standard Time, Arabic Standard Time, + Arab Standard Time, Belarus Standard Time, Russian Standard Time, E. Africa Standard Time, Iran + Standard Time, Arabian Standard Time, Azerbaijan Standard Time, Russia Time Zone 3, Mauritius + Standard Time, Georgian Standard Time, Caucasus Standard Time, Afghanistan Standard Time, West + Asia Standard Time, Ekaterinburg Standard Time, Pakistan Standard Time, India Standard Time, + Sri Lanka Standard Time, Nepal Standard Time, Central Asia Standard Time, Bangladesh Standard + Time, N. Central Asia Standard Time, Myanmar Standard Time, SE Asia Standard Time, North Asia + Standard Time, China Standard Time, North Asia East Standard Time, Singapore Standard Time, W. + Australia Standard Time, Taipei Standard Time, Ulaanbaatar Standard Time, Tokyo Standard Time, + Korea Standard Time, Yakutsk Standard Time, Cen. Australia Standard Time, AUS Central Standard + Time, E. Australia Standard Time, AUS Eastern Standard Time, West Pacific Standard Time, + Tasmania Standard Time, Magadan Standard Time, Vladivostok Standard Time, Russia Time Zone 10, + Central Pacific Standard Time, Russia Time Zone 11, New Zealand Standard Time, UTC+12, Fiji + Standard Time, Kamchatka Standard Time, Tonga Standard Time, Samoa Standard Time, Line Islands + Standard Time. + :type time_zone: str + :param start: Required. the start time for the profile in ISO 8601 format. + :type start: ~datetime.datetime + :param end: Required. the end time for the profile in ISO 8601 format. + :type end: ~datetime.datetime + """ + + _validation = { + 'start': {'required': True}, + 'end': {'required': True}, + } + + _attribute_map = { + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + 'start': {'key': 'start', 'type': 'iso-8601'}, + 'end': {'key': 'end', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + start: datetime.datetime, + end: datetime.datetime, + time_zone: Optional[str] = None, + **kwargs + ): + super(TimeWindow, self).__init__(**kwargs) + self.time_zone = time_zone + self.start = start + self.end = end + + +class WebhookNotification(msrest.serialization.Model): + """Webhook notification of an autoscale event. + + :param service_uri: the service address to receive the notification. + :type service_uri: str + :param properties: a property bag of settings. This value can be empty. + :type properties: dict[str, str] + """ + + _attribute_map = { + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{str}'}, + } + + def __init__( + self, + *, + service_uri: Optional[str] = None, + properties: Optional[Dict[str, str]] = None, + **kwargs + ): + super(WebhookNotification, self).__init__(**kwargs) + self.service_uri = service_uri + self.properties = properties diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_monitor_management_client_enums.py new file mode 100644 index 000000000000..e8d9429aee04 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/models/_monitor_management_client_enums.py @@ -0,0 +1,125 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class CategoryType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the diagnostic settings category. + """ + + METRICS = "Metrics" + LOGS = "Logs" + +class ComparisonOperationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """the operator that is used to compare the metric data and the threshold. + """ + + EQUALS = "Equals" + NOT_EQUALS = "NotEquals" + GREATER_THAN = "GreaterThan" + GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + LESS_THAN = "LessThan" + LESS_THAN_OR_EQUAL = "LessThanOrEqual" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class MetricStatisticType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """the metric statistic type. How the metrics from multiple instances are combined. + """ + + AVERAGE = "Average" + MIN = "Min" + MAX = "Max" + SUM = "Sum" + COUNT = "Count" + +class PredictiveAutoscalePolicyScaleMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """the predictive autoscale mode + """ + + DISABLED = "Disabled" + FORECAST_ONLY = "ForecastOnly" + ENABLED = "Enabled" + +class RecurrenceFrequency(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """the recurrence frequency. How often the schedule profile should take effect. This value must be + Week, meaning each week will have the same set of profiles. For example, to set a daily + schedule, set **schedule** to every day of the week. The frequency property specifies that the + schedule is repeated weekly. + """ + + NONE = "None" + SECOND = "Second" + MINUTE = "Minute" + HOUR = "Hour" + DAY = "Day" + WEEK = "Week" + MONTH = "Month" + YEAR = "Year" + +class ScaleDirection(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """the scale direction. Whether the scaling action increases or decreases the number of instances. + """ + + NONE = "None" + INCREASE = "Increase" + DECREASE = "Decrease" + +class ScaleRuleMetricDimensionOperationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """the dimension operator. Only 'Equals' and 'NotEquals' are supported. 'Equals' being equal to + any of the values. 'NotEquals' being not equal to all of the values + """ + + EQUALS = "Equals" + NOT_EQUALS = "NotEquals" + +class ScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """the type of action that should occur when the scale rule fires. + """ + + CHANGE_COUNT = "ChangeCount" + PERCENT_CHANGE_COUNT = "PercentChangeCount" + EXACT_COUNT = "ExactCount" + SERVICE_ALLOWED_NEXT_VALUE = "ServiceAllowedNextValue" + +class TimeAggregationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """time aggregation type. How the data that is collected should be combined over time. The default + value is Average. + """ + + AVERAGE = "Average" + MINIMUM = "Minimum" + MAXIMUM = "Maximum" + TOTAL = "Total" + COUNT = "Count" + LAST = "Last" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/__init__.py new file mode 100644 index 000000000000..7f5c0a1041dc --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/__init__.py @@ -0,0 +1,23 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._autoscale_settings_operations import AutoscaleSettingsOperations +from ._predictive_metric_operations import PredictiveMetricOperations +from ._diagnostic_settings_operations import DiagnosticSettingsOperations +from ._diagnostic_settings_category_operations import DiagnosticSettingsCategoryOperations +from ._management_group_diagnostic_settings_operations import ManagementGroupDiagnosticSettingsOperations +from ._subscription_diagnostic_settings_operations import SubscriptionDiagnosticSettingsOperations + +__all__ = [ + 'AutoscaleSettingsOperations', + 'PredictiveMetricOperations', + 'DiagnosticSettingsOperations', + 'DiagnosticSettingsCategoryOperations', + 'ManagementGroupDiagnosticSettingsOperations', + 'SubscriptionDiagnosticSettingsOperations', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py new file mode 100644 index 000000000000..2eb639b31c07 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_autoscale_settings_operations.py @@ -0,0 +1,444 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AutoscaleSettingsOperations(object): + """AutoscaleSettingsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AutoscaleSettingResourceCollection"] + """Lists the autoscale settings for a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AutoscaleSettingResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AutoscaleSettingResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + autoscale_setting_name, # type: str + parameters, # type: "_models.AutoscaleSettingResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.AutoscaleSettingResource" + """Creates or updates an autoscale setting. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AutoscaleSettingResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'AutoscaleSettingResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + autoscale_setting_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes and autoscale setting. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + autoscale_setting_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.AutoscaleSettingResource" + """Gets an autoscale setting. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AutoscaleSettingResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + autoscale_setting_name, # type: str + autoscale_setting_resource, # type: "_models.AutoscaleSettingResourcePatch" + **kwargs # type: Any + ): + # type: (...) -> "_models.AutoscaleSettingResource" + """Updates an existing AutoscaleSettingsResource. To update other fields use the CreateOrUpdate + method. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :param autoscale_setting_resource: Parameters supplied to the operation. + :type autoscale_setting_resource: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourcePatch + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AutoscaleSettingResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(autoscale_setting_resource, 'AutoscaleSettingResourcePatch') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AutoscaleSettingResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AutoscaleSettingResourceCollection"] + """Lists the autoscale settings for a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AutoscaleSettingResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.AutoscaleSettingResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoscaleSettingResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AutoscaleSettingResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py new file mode 100644 index 000000000000..d6954cacf344 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_category_operations.py @@ -0,0 +1,176 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DiagnosticSettingsCategoryOperations(object): + """DiagnosticSettingsCategoryOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_uri, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DiagnosticSettingsCategoryResource" + """Gets the diagnostic settings category for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticSettingsCategoryResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsCategoryResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticSettingsCategoryResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories/{name}'} # type: ignore + + def list( + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DiagnosticSettingsCategoryResourceCollection"] + """Lists the diagnostic settings categories for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticSettingsCategoryResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsCategoryResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsCategoryResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticSettingsCategoryResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettingsCategories'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py new file mode 100644 index 000000000000..ba435b4c6207 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_diagnostic_settings_operations.py @@ -0,0 +1,299 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DiagnosticSettingsOperations(object): + """DiagnosticSettingsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_uri, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DiagnosticSettingsResource" + """Gets the active diagnostic settings for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def create_or_update( + self, + resource_uri, # type: str + name, # type: str + parameters, # type: "_models.DiagnosticSettingsResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.DiagnosticSettingsResource" + """Creates or updates diagnostic settings for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param name: The name of the diagnostic setting. + :type name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DiagnosticSettingsResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def delete( + self, + resource_uri, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes existing diagnostic settings for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def list( + self, + resource_uri, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DiagnosticSettingsResourceCollection"] + """Gets the active diagnostic settings list for the specified resource. + + :param resource_uri: The identifier of the resource. + :type resource_uri: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DiagnosticSettingsResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.DiagnosticSettingsResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DiagnosticSettingsResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceUri': self._serialize.url("resource_uri", resource_uri, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DiagnosticSettingsResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.Insights/diagnosticSettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py new file mode 100644 index 000000000000..4c8c36923707 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_management_group_diagnostic_settings_operations.py @@ -0,0 +1,299 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ManagementGroupDiagnosticSettingsOperations(object): + """ManagementGroupDiagnosticSettingsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + management_group_id, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagementGroupDiagnosticSettingsResource" + """Gets the active management group diagnostic settings for the specified resource. + + :param management_group_id: The management group id. + :type management_group_id: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagementGroupDiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagementGroupDiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def create_or_update( + self, + management_group_id, # type: str + name, # type: str + parameters, # type: "_models.ManagementGroupDiagnosticSettingsResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ManagementGroupDiagnosticSettingsResource" + """Creates or updates management group diagnostic settings for the specified resource. + + :param management_group_id: The management group id. + :type management_group_id: str + :param name: The name of the diagnostic setting. + :type name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ManagementGroupDiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagementGroupDiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ManagementGroupDiagnosticSettingsResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def delete( + self, + management_group_id, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes existing management group diagnostic settings for the specified resource. + + :param management_group_id: The management group id. + :type management_group_id: str + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str', skip_quote=True), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def list( + self, + management_group_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ManagementGroupDiagnosticSettingsResourceCollection"] + """Gets the active management group diagnostic settings list for the specified management group. + + :param management_group_id: The management group id. + :type management_group_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ManagementGroupDiagnosticSettingsResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.ManagementGroupDiagnosticSettingsResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagementGroupDiagnosticSettingsResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'managementGroupId': self._serialize.url("management_group_id", management_group_id, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ManagementGroupDiagnosticSettingsResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.Management/managementGroups/{managementGroupId}/providers/Microsoft.Insights/diagnosticSettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py new file mode 100644 index 000000000000..423b5f59072a --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_predictive_metric_operations.py @@ -0,0 +1,129 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PredictiveMetricOperations(object): + """PredictiveMetricOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + autoscale_setting_name, # type: str + timespan, # type: str + interval, # type: datetime.timedelta + metric_namespace, # type: str + metric_name, # type: str + aggregation, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PredictiveResponse" + """get predictive autoscale metric future data. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param autoscale_setting_name: The autoscale setting name. + :type autoscale_setting_name: str + :param timespan: The timespan of the query. It is a string with the following format + 'startDateTime_ISO/endDateTime_ISO'. + :type timespan: str + :param interval: The interval (i.e. timegrain) of the query. + :type interval: ~datetime.timedelta + :param metric_namespace: Metric namespace to query metric definitions for. + :type metric_namespace: str + :param metric_name: The names of the metrics (comma separated) to retrieve. Special case: If a + metricname itself has a comma in it then use %2 to indicate it. Eg: 'Metric,Name1' should be + **'Metric%2Name1'**. + :type metric_name: str + :param aggregation: The list of aggregation types (comma separated) to retrieve. + :type aggregation: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PredictiveResponse, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.PredictiveResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PredictiveResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'autoscaleSettingName': self._serialize.url("autoscale_setting_name", autoscale_setting_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['timespan'] = self._serialize.query("timespan", timespan, 'str') + query_parameters['interval'] = self._serialize.query("interval", interval, 'duration') + query_parameters['metricNamespace'] = self._serialize.query("metric_namespace", metric_namespace, 'str') + query_parameters['metricName'] = self._serialize.query("metric_name", metric_name, 'str') + query_parameters['aggregation'] = self._serialize.query("aggregation", aggregation, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.AutoscaleErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PredictiveResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{autoscaleSettingName}/predictiveMetrics'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py new file mode 100644 index 000000000000..dbb63fa1f3fe --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/operations/_subscription_diagnostic_settings_operations.py @@ -0,0 +1,287 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SubscriptionDiagnosticSettingsOperations(object): + """SubscriptionDiagnosticSettingsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_05_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SubscriptionDiagnosticSettingsResource" + """Gets the active subscription diagnostic settings for the specified resource. + + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SubscriptionDiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionDiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SubscriptionDiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def create_or_update( + self, + name, # type: str + parameters, # type: "_models.SubscriptionDiagnosticSettingsResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.SubscriptionDiagnosticSettingsResource" + """Creates or updates subscription diagnostic settings for the specified resource. + + :param name: The name of the diagnostic setting. + :type name: str + :param parameters: Parameters supplied to the operation. + :type parameters: ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SubscriptionDiagnosticSettingsResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionDiagnosticSettingsResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SubscriptionDiagnosticSettingsResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SubscriptionDiagnosticSettingsResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def delete( + self, + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes existing subscription diagnostic settings for the specified resource. + + :param name: The name of the diagnostic setting. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings/{name}'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SubscriptionDiagnosticSettingsResourceCollection"] + """Gets the active subscription diagnostic settings list for the specified subscriptionId. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SubscriptionDiagnosticSettingsResourceCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_05_01_preview.models.SubscriptionDiagnosticSettingsResourceCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubscriptionDiagnosticSettingsResourceCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SubscriptionDiagnosticSettingsResourceCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/diagnosticSettings'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/py.typed b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_05_01_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/__init__.py new file mode 100644 index 000000000000..d82479510092 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._monitor_management_client import MonitorManagementClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['MonitorManagementClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py new file mode 100644 index 000000000000..f742fdfb40ed --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class MonitorManagementClientConfiguration(Configuration): + """Configuration for MonitorManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_metadata.json b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_metadata.json new file mode 100644 index 000000000000..ac502baf335c --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_metadata.json @@ -0,0 +1,103 @@ +{ + "chosen_version": "2021-09-01", + "total_api_version_list": ["2021-09-01"], + "client": { + "name": "MonitorManagementClient", + "filename": "_monitor_management_client", + "description": "Monitor Management Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"MonitorManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "action_groups": "ActionGroupsOperations" + } +} \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_management_client.py new file mode 100644 index 000000000000..68961c58818a --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_monitor_management_client.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import MonitorManagementClientConfiguration +from .operations import ActionGroupsOperations +from . import models + + +class MonitorManagementClient(object): + """Monitor Management Client. + + :ivar action_groups: ActionGroupsOperations operations + :vartype action_groups: $(python-base-namespace).v2021_09_01.operations.ActionGroupsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.action_groups = ActionGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> MonitorManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py new file mode 100644 index 000000000000..cac9f5d10f8b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "3.0.0" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/__init__.py new file mode 100644 index 000000000000..96ce9b45c05b --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._monitor_management_client import MonitorManagementClient +__all__ = ['MonitorManagementClient'] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py new file mode 100644 index 000000000000..97e0adedc21d --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class MonitorManagementClientConfiguration(Configuration): + """Configuration for MonitorManagementClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(MonitorManagementClientConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-09-01" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-monitor/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_management_client.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_management_client.py new file mode 100644 index 000000000000..baf79082f016 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/_monitor_management_client.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import MonitorManagementClientConfiguration +from .operations import ActionGroupsOperations +from .. import models + + +class MonitorManagementClient(object): + """Monitor Management Client. + + :ivar action_groups: ActionGroupsOperations operations + :vartype action_groups: $(python-base-namespace).v2021_09_01.aio.operations.ActionGroupsOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = MonitorManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.action_groups = ActionGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "MonitorManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/__init__.py new file mode 100644 index 000000000000..dc488c51fcad --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._action_groups_operations import ActionGroupsOperations + +__all__ = [ + 'ActionGroupsOperations', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py new file mode 100644 index 000000000000..10a31edf786f --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/aio/operations/_action_groups_operations.py @@ -0,0 +1,666 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ActionGroupsOperations: + """ActionGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_or_update( + self, + resource_group_name: str, + action_group_name: str, + action_group: "_models.ActionGroupResource", + **kwargs: Any + ) -> "_models.ActionGroupResource": + """Create a new action group or update an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :param action_group: The action group to create or use for the update. + :type action_group: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActionGroupResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(action_group, 'ActionGroupResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ActionGroupResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ActionGroupResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + action_group_name: str, + **kwargs: Any + ) -> "_models.ActionGroupResource": + """Get an action group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActionGroupResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActionGroupResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + action_group_name: str, + **kwargs: Any + ) -> None: + """Delete an action group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + action_group_name: str, + action_group_patch: "_models.ActionGroupPatchBody", + **kwargs: Any + ) -> "_models.ActionGroupResource": + """Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :param action_group_patch: Parameters supplied to the operation. + :type action_group_patch: ~$(python-base-namespace).v2021_09_01.models.ActionGroupPatchBody + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActionGroupResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(action_group_patch, 'ActionGroupPatchBody') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActionGroupResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}'} # type: ignore + + async def _post_test_notifications_initial( + self, + notification_request: "_models.NotificationRequestBody", + **kwargs: Any + ) -> "_models.TestNotificationResponse": + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestNotificationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._post_test_notifications_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(notification_request, 'NotificationRequestBody') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestNotificationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _post_test_notifications_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications'} # type: ignore + + async def begin_post_test_notifications( + self, + notification_request: "_models.NotificationRequestBody", + **kwargs: Any + ) -> AsyncLROPoller["_models.TestNotificationResponse"]: + """Send test notifications to a set of provided receivers. + + :param notification_request: The notification request body which includes the contact details. + :type notification_request: ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either TestNotificationResponse or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestNotificationResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._post_test_notifications_initial( + notification_request=notification_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('TestNotificationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_post_test_notifications.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications'} # type: ignore + + async def get_test_notifications( + self, + notification_id: str, + **kwargs: Any + ) -> "_models.TestNotificationDetailsResponse": + """Get the test notifications by the notification id. + + :param notification_id: The notification id. + :type notification_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TestNotificationDetailsResponse, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestNotificationDetailsResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get_test_notifications.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'notificationId': self._serialize.url("notification_id", notification_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestNotificationDetailsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_test_notifications.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/notificationStatus/{notificationId}'} # type: ignore + + def list_by_subscription_id( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ActionGroupList"]: + """Get a list of all action groups in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ActionGroupList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_09_01.models.ActionGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription_id.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ActionGroupList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ActionGroupList"]: + """Get a list of all action groups in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ActionGroupList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~$(python-base-namespace).v2021_09_01.models.ActionGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ActionGroupList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups'} # type: ignore + + async def enable_receiver( + self, + resource_group_name: str, + action_group_name: str, + enable_request: "_models.EnableRequest", + **kwargs: Any + ) -> None: + """Enable a receiver in an action group. This changes the receiver's status from Disabled to + Enabled. This operation is only supported for Email or SMS receivers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :param enable_request: The receiver to re-enable. + :type enable_request: ~$(python-base-namespace).v2021_09_01.models.EnableRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.enable_receiver.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(enable_request, 'EnableRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_receiver.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py new file mode 100644 index 000000000000..4a0e0892d57a --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/__init__.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ActionDetail + from ._models_py3 import ActionGroupList + from ._models_py3 import ActionGroupPatchBody + from ._models_py3 import ActionGroupResource + from ._models_py3 import ArmRoleReceiver + from ._models_py3 import AutomationRunbookReceiver + from ._models_py3 import AzureAppPushReceiver + from ._models_py3 import AzureFunctionReceiver + from ._models_py3 import AzureResource + from ._models_py3 import Context + from ._models_py3 import EmailReceiver + from ._models_py3 import EnableRequest + from ._models_py3 import ErrorResponse + from ._models_py3 import EventHubReceiver + from ._models_py3 import ItsmReceiver + from ._models_py3 import LogicAppReceiver + from ._models_py3 import NotificationRequestBody + from ._models_py3 import SmsReceiver + from ._models_py3 import TestNotificationDetailsResponse + from ._models_py3 import TestNotificationResponse + from ._models_py3 import VoiceReceiver + from ._models_py3 import WebhookReceiver +except (SyntaxError, ImportError): + from ._models import ActionDetail # type: ignore + from ._models import ActionGroupList # type: ignore + from ._models import ActionGroupPatchBody # type: ignore + from ._models import ActionGroupResource # type: ignore + from ._models import ArmRoleReceiver # type: ignore + from ._models import AutomationRunbookReceiver # type: ignore + from ._models import AzureAppPushReceiver # type: ignore + from ._models import AzureFunctionReceiver # type: ignore + from ._models import AzureResource # type: ignore + from ._models import Context # type: ignore + from ._models import EmailReceiver # type: ignore + from ._models import EnableRequest # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import EventHubReceiver # type: ignore + from ._models import ItsmReceiver # type: ignore + from ._models import LogicAppReceiver # type: ignore + from ._models import NotificationRequestBody # type: ignore + from ._models import SmsReceiver # type: ignore + from ._models import TestNotificationDetailsResponse # type: ignore + from ._models import TestNotificationResponse # type: ignore + from ._models import VoiceReceiver # type: ignore + from ._models import WebhookReceiver # type: ignore + +from ._monitor_management_client_enums import ( + ReceiverStatus, +) + +__all__ = [ + 'ActionDetail', + 'ActionGroupList', + 'ActionGroupPatchBody', + 'ActionGroupResource', + 'ArmRoleReceiver', + 'AutomationRunbookReceiver', + 'AzureAppPushReceiver', + 'AzureFunctionReceiver', + 'AzureResource', + 'Context', + 'EmailReceiver', + 'EnableRequest', + 'ErrorResponse', + 'EventHubReceiver', + 'ItsmReceiver', + 'LogicAppReceiver', + 'NotificationRequestBody', + 'SmsReceiver', + 'TestNotificationDetailsResponse', + 'TestNotificationResponse', + 'VoiceReceiver', + 'WebhookReceiver', + 'ReceiverStatus', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models.py new file mode 100644 index 000000000000..66ef35c49301 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models.py @@ -0,0 +1,961 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class ActionDetail(msrest.serialization.Model): + """The action detail. + + :param mechanism_type: The mechanism type. + :type mechanism_type: str + :param name: The name of the action. + :type name: str + :param status: The status of the action. + :type status: str + :param sub_state: The substatus of the action. + :type sub_state: str + :param send_time: The send time. + :type send_time: str + :param detail: The detail of the friendly error message. + :type detail: str + """ + + _attribute_map = { + 'mechanism_type': {'key': 'MechanismType', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'sub_state': {'key': 'SubState', 'type': 'str'}, + 'send_time': {'key': 'SendTime', 'type': 'str'}, + 'detail': {'key': 'Detail', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActionDetail, self).__init__(**kwargs) + self.mechanism_type = kwargs.get('mechanism_type', None) + self.name = kwargs.get('name', None) + self.status = kwargs.get('status', None) + self.sub_state = kwargs.get('sub_state', None) + self.send_time = kwargs.get('send_time', None) + self.detail = kwargs.get('detail', None) + + +class ActionGroupList(msrest.serialization.Model): + """A list of action groups. + + :param value: The list of action groups. + :type value: list[~$(python-base-namespace).v2021_09_01.models.ActionGroupResource] + :param next_link: Provides the link to retrieve the next set of elements. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActionGroupResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActionGroupList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ActionGroupPatchBody(msrest.serialization.Model): + """An action group object for the body of patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param enabled: Indicates whether this action group is enabled. If an action group is not + enabled, then none of its actions will be activated. + :type enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ActionGroupPatchBody, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.enabled = kwargs.get('enabled', True) + + +class AzureResource(msrest.serialization.Model): + """An azure resource object. + + 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. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = None + self.identity = None + self.location = kwargs['location'] + self.tags = kwargs.get('tags', None) + + +class ActionGroupResource(AzureResource): + """An action group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param group_short_name: The short name of the action group. This will be used in SMS messages. + :type group_short_name: str + :param enabled: Indicates whether this action group is enabled. If an action group is not + enabled, then none of its receivers will receive communications. + :type enabled: bool + :param email_receivers: The list of email receivers that are part of this action group. + :type email_receivers: list[~$(python-base-namespace).v2021_09_01.models.EmailReceiver] + :param sms_receivers: The list of SMS receivers that are part of this action group. + :type sms_receivers: list[~$(python-base-namespace).v2021_09_01.models.SmsReceiver] + :param webhook_receivers: The list of webhook receivers that are part of this action group. + :type webhook_receivers: list[~$(python-base-namespace).v2021_09_01.models.WebhookReceiver] + :param itsm_receivers: The list of ITSM receivers that are part of this action group. + :type itsm_receivers: list[~$(python-base-namespace).v2021_09_01.models.ItsmReceiver] + :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this + action group. + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AzureAppPushReceiver] + :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of + this action group. + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AutomationRunbookReceiver] + :param voice_receivers: The list of voice receivers that are part of this action group. + :type voice_receivers: list[~$(python-base-namespace).v2021_09_01.models.VoiceReceiver] + :param logic_app_receivers: The list of logic app receivers that are part of this action group. + :type logic_app_receivers: list[~$(python-base-namespace).v2021_09_01.models.LogicAppReceiver] + :param azure_function_receivers: The list of azure function receivers that are part of this + action group. + :type azure_function_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AzureFunctionReceiver] + :param arm_role_receivers: The list of ARM role receivers that are part of this action group. + Roles are Azure RBAC roles and only built-in roles are supported. + :type arm_role_receivers: list[~$(python-base-namespace).v2021_09_01.models.ArmRoleReceiver] + :param event_hub_receivers: The list of event hub receivers that are part of this action group. + :type event_hub_receivers: list[~$(python-base-namespace).v2021_09_01.models.EventHubReceiver] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, + 'location': {'required': True}, + 'group_short_name': {'max_length': 12, 'min_length': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'group_short_name': {'key': 'properties.groupShortName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'email_receivers': {'key': 'properties.emailReceivers', 'type': '[EmailReceiver]'}, + 'sms_receivers': {'key': 'properties.smsReceivers', 'type': '[SmsReceiver]'}, + 'webhook_receivers': {'key': 'properties.webhookReceivers', 'type': '[WebhookReceiver]'}, + 'itsm_receivers': {'key': 'properties.itsmReceivers', 'type': '[ItsmReceiver]'}, + 'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, + 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, + 'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'}, + 'logic_app_receivers': {'key': 'properties.logicAppReceivers', 'type': '[LogicAppReceiver]'}, + 'azure_function_receivers': {'key': 'properties.azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'}, + 'arm_role_receivers': {'key': 'properties.armRoleReceivers', 'type': '[ArmRoleReceiver]'}, + 'event_hub_receivers': {'key': 'properties.eventHubReceivers', 'type': '[EventHubReceiver]'}, + } + + def __init__( + self, + **kwargs + ): + super(ActionGroupResource, self).__init__(**kwargs) + self.group_short_name = kwargs.get('group_short_name', None) + self.enabled = kwargs.get('enabled', True) + self.email_receivers = kwargs.get('email_receivers', None) + self.sms_receivers = kwargs.get('sms_receivers', None) + self.webhook_receivers = kwargs.get('webhook_receivers', None) + self.itsm_receivers = kwargs.get('itsm_receivers', None) + self.azure_app_push_receivers = kwargs.get('azure_app_push_receivers', None) + self.automation_runbook_receivers = kwargs.get('automation_runbook_receivers', None) + self.voice_receivers = kwargs.get('voice_receivers', None) + self.logic_app_receivers = kwargs.get('logic_app_receivers', None) + self.azure_function_receivers = kwargs.get('azure_function_receivers', None) + self.arm_role_receivers = kwargs.get('arm_role_receivers', None) + self.event_hub_receivers = kwargs.get('event_hub_receivers', None) + + +class ArmRoleReceiver(msrest.serialization.Model): + """An arm role receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the arm role receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param role_id: Required. The arm role id. + :type role_id: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + """ + + _validation = { + 'name': {'required': True}, + 'role_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'role_id': {'key': 'roleId', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ArmRoleReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.role_id = kwargs['role_id'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) + + +class AutomationRunbookReceiver(msrest.serialization.Model): + """The Azure Automation Runbook notification receiver. + + All required parameters must be populated in order to send to Azure. + + :param automation_account_id: Required. The Azure automation account Id which holds this + runbook and authenticate to Azure resource. + :type automation_account_id: str + :param runbook_name: Required. The name for this runbook. + :type runbook_name: str + :param webhook_resource_id: Required. The resource id for webhook linked to this runbook. + :type webhook_resource_id: str + :param is_global_runbook: Required. Indicates whether this instance is global runbook. + :type is_global_runbook: bool + :param name: Indicates name of the webhook. + :type name: str + :param service_uri: The URI where webhooks should be sent. + :type service_uri: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + """ + + _validation = { + 'automation_account_id': {'required': True}, + 'runbook_name': {'required': True}, + 'webhook_resource_id': {'required': True}, + 'is_global_runbook': {'required': True}, + } + + _attribute_map = { + 'automation_account_id': {'key': 'automationAccountId', 'type': 'str'}, + 'runbook_name': {'key': 'runbookName', 'type': 'str'}, + 'webhook_resource_id': {'key': 'webhookResourceId', 'type': 'str'}, + 'is_global_runbook': {'key': 'isGlobalRunbook', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AutomationRunbookReceiver, self).__init__(**kwargs) + self.automation_account_id = kwargs['automation_account_id'] + self.runbook_name = kwargs['runbook_name'] + self.webhook_resource_id = kwargs['webhook_resource_id'] + self.is_global_runbook = kwargs['is_global_runbook'] + self.name = kwargs.get('name', None) + self.service_uri = kwargs.get('service_uri', None) + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) + + +class AzureAppPushReceiver(msrest.serialization.Model): + """The Azure mobile App push notification receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Azure mobile app push receiver. Names must be unique + across all receivers within an action group. + :type name: str + :param email_address: Required. The email address registered for the Azure mobile app. + :type email_address: str + """ + + _validation = { + 'name': {'required': True}, + 'email_address': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureAppPushReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.email_address = kwargs['email_address'] + + +class AzureFunctionReceiver(msrest.serialization.Model): + """An azure function receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the azure function receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param function_app_resource_id: Required. The azure resource id of the function app. + :type function_app_resource_id: str + :param function_name: Required. The function name in the function app. + :type function_name: str + :param http_trigger_url: Required. The http trigger url where http request sent to. + :type http_trigger_url: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + """ + + _validation = { + 'name': {'required': True}, + 'function_app_resource_id': {'required': True}, + 'function_name': {'required': True}, + 'http_trigger_url': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'function_app_resource_id': {'key': 'functionAppResourceId', 'type': 'str'}, + 'function_name': {'key': 'functionName', 'type': 'str'}, + 'http_trigger_url': {'key': 'httpTriggerUrl', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFunctionReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.function_app_resource_id = kwargs['function_app_resource_id'] + self.function_name = kwargs['function_name'] + self.http_trigger_url = kwargs['http_trigger_url'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) + + +class Context(msrest.serialization.Model): + """The context info. + + :param notification_source: The source of the notification request. + :type notification_source: str + :param context_type: The context id type. + :type context_type: str + """ + + _attribute_map = { + 'notification_source': {'key': 'NotificationSource', 'type': 'str'}, + 'context_type': {'key': 'ContextType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Context, self).__init__(**kwargs) + self.notification_source = kwargs.get('notification_source', None) + self.context_type = kwargs.get('context_type', None) + + +class EmailReceiver(msrest.serialization.Model): + """An email receiver. + + 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 name: Required. The name of the email receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param email_address: Required. The email address of this receiver. + :type email_address: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + :ivar status: The receiver status of the e-mail. Possible values include: "NotSpecified", + "Enabled", "Disabled". + :vartype status: str or ~$(python-base-namespace).v2021_09_01.models.ReceiverStatus + """ + + _validation = { + 'name': {'required': True}, + 'email_address': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EmailReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.email_address = kwargs['email_address'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) + self.status = None + + +class EnableRequest(msrest.serialization.Model): + """Describes a receiver that should be resubscribed. + + All required parameters must be populated in order to send to Azure. + + :param receiver_name: Required. The name of the receiver to resubscribe. + :type receiver_name: str + """ + + _validation = { + 'receiver_name': {'required': True}, + } + + _attribute_map = { + 'receiver_name': {'key': 'receiverName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EnableRequest, self).__init__(**kwargs) + self.receiver_name = kwargs['receiver_name'] + + +class ErrorResponse(msrest.serialization.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 EventHubReceiver(msrest.serialization.Model): + """An Event hub receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Event hub receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param event_hub_name_space: Required. The Event Hub namespace. + :type event_hub_name_space: str + :param event_hub_name: Required. The name of the specific Event Hub queue. + :type event_hub_name: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + :param tenant_id: The tenant Id for the subscription containing this event hub. + :type tenant_id: str + :param subscription_id: Required. The Id for the subscription containing this event hub. + :type subscription_id: str + """ + + _validation = { + 'name': {'required': True}, + 'event_hub_name_space': {'required': True}, + 'event_hub_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'event_hub_name_space': {'key': 'eventHubNameSpace', 'type': 'str'}, + 'event_hub_name': {'key': 'eventHubName', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EventHubReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.event_hub_name_space = kwargs['event_hub_name_space'] + self.event_hub_name = kwargs['event_hub_name'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) + self.tenant_id = kwargs.get('tenant_id', None) + self.subscription_id = kwargs['subscription_id'] + + +class ItsmReceiver(msrest.serialization.Model): + """An Itsm receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Itsm receiver. Names must be unique across all receivers + within an action group. + :type name: str + :param workspace_id: Required. OMS LA instance identifier. + :type workspace_id: str + :param connection_id: Required. Unique identification of ITSM connection among multiple defined + in above workspace. + :type connection_id: str + :param ticket_configuration: Required. JSON blob for the configurations of the ITSM action. + CreateMultipleWorkItems option will be part of this blob as well. + :type ticket_configuration: str + :param region: Required. Region in which workspace resides. Supported + values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'. + :type region: str + """ + + _validation = { + 'name': {'required': True}, + 'workspace_id': {'required': True}, + 'connection_id': {'required': True}, + 'ticket_configuration': {'required': True}, + 'region': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'ticket_configuration': {'key': 'ticketConfiguration', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ItsmReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.workspace_id = kwargs['workspace_id'] + self.connection_id = kwargs['connection_id'] + self.ticket_configuration = kwargs['ticket_configuration'] + self.region = kwargs['region'] + + +class LogicAppReceiver(msrest.serialization.Model): + """A logic app receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the logic app receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param resource_id: Required. The azure resource id of the logic app receiver. + :type resource_id: str + :param callback_url: Required. The callback url where http request sent to. + :type callback_url: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + """ + + _validation = { + 'name': {'required': True}, + 'resource_id': {'required': True}, + 'callback_url': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'callback_url': {'key': 'callbackUrl', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(LogicAppReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.resource_id = kwargs['resource_id'] + self.callback_url = kwargs['callback_url'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) + + +class NotificationRequestBody(msrest.serialization.Model): + """The request body which contain contact detail metadata. + + All required parameters must be populated in order to send to Azure. + + :param alert_type: Required. The name of the supported alert type. + :type alert_type: str + :param email_receivers: The list of email receivers that are part of this action group. + :type email_receivers: list[~$(python-base-namespace).v2021_09_01.models.EmailReceiver] + :param sms_receivers: The list of SMS receivers that are part of this action group. + :type sms_receivers: list[~$(python-base-namespace).v2021_09_01.models.SmsReceiver] + :param webhook_receivers: The list of webhook receivers that are part of this action group. + :type webhook_receivers: list[~$(python-base-namespace).v2021_09_01.models.WebhookReceiver] + :param itsm_receivers: The list of ITSM receivers that are part of this action group. + :type itsm_receivers: list[~$(python-base-namespace).v2021_09_01.models.ItsmReceiver] + :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this + action group. + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AzureAppPushReceiver] + :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of + this action group. + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AutomationRunbookReceiver] + :param voice_receivers: The list of voice receivers that are part of this action group. + :type voice_receivers: list[~$(python-base-namespace).v2021_09_01.models.VoiceReceiver] + :param logic_app_receivers: The list of logic app receivers that are part of this action group. + :type logic_app_receivers: list[~$(python-base-namespace).v2021_09_01.models.LogicAppReceiver] + :param azure_function_receivers: The list of azure function receivers that are part of this + action group. + :type azure_function_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AzureFunctionReceiver] + :param arm_role_receivers: The list of ARM role receivers that are part of this action group. + Roles are Azure RBAC roles and only built-in roles are supported. + :type arm_role_receivers: list[~$(python-base-namespace).v2021_09_01.models.ArmRoleReceiver] + :param event_hub_receivers: The list of event hub receivers that are part of this action group. + :type event_hub_receivers: list[~$(python-base-namespace).v2021_09_01.models.EventHubReceiver] + """ + + _validation = { + 'alert_type': {'required': True, 'max_length': 30, 'min_length': 0}, + } + + _attribute_map = { + 'alert_type': {'key': 'alertType', 'type': 'str'}, + 'email_receivers': {'key': 'emailReceivers', 'type': '[EmailReceiver]'}, + 'sms_receivers': {'key': 'smsReceivers', 'type': '[SmsReceiver]'}, + 'webhook_receivers': {'key': 'webhookReceivers', 'type': '[WebhookReceiver]'}, + 'itsm_receivers': {'key': 'itsmReceivers', 'type': '[ItsmReceiver]'}, + 'azure_app_push_receivers': {'key': 'azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, + 'automation_runbook_receivers': {'key': 'automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, + 'voice_receivers': {'key': 'voiceReceivers', 'type': '[VoiceReceiver]'}, + 'logic_app_receivers': {'key': 'logicAppReceivers', 'type': '[LogicAppReceiver]'}, + 'azure_function_receivers': {'key': 'azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'}, + 'arm_role_receivers': {'key': 'armRoleReceivers', 'type': '[ArmRoleReceiver]'}, + 'event_hub_receivers': {'key': 'eventHubReceivers', 'type': '[EventHubReceiver]'}, + } + + def __init__( + self, + **kwargs + ): + super(NotificationRequestBody, self).__init__(**kwargs) + self.alert_type = kwargs['alert_type'] + self.email_receivers = kwargs.get('email_receivers', None) + self.sms_receivers = kwargs.get('sms_receivers', None) + self.webhook_receivers = kwargs.get('webhook_receivers', None) + self.itsm_receivers = kwargs.get('itsm_receivers', None) + self.azure_app_push_receivers = kwargs.get('azure_app_push_receivers', None) + self.automation_runbook_receivers = kwargs.get('automation_runbook_receivers', None) + self.voice_receivers = kwargs.get('voice_receivers', None) + self.logic_app_receivers = kwargs.get('logic_app_receivers', None) + self.azure_function_receivers = kwargs.get('azure_function_receivers', None) + self.arm_role_receivers = kwargs.get('arm_role_receivers', None) + self.event_hub_receivers = kwargs.get('event_hub_receivers', None) + + +class SmsReceiver(msrest.serialization.Model): + """An SMS receiver. + + 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 name: Required. The name of the SMS receiver. Names must be unique across all receivers + within an action group. + :type name: str + :param country_code: Required. The country code of the SMS receiver. + :type country_code: str + :param phone_number: Required. The phone number of the SMS receiver. + :type phone_number: str + :ivar status: The status of the receiver. Possible values include: "NotSpecified", "Enabled", + "Disabled". + :vartype status: str or ~$(python-base-namespace).v2021_09_01.models.ReceiverStatus + """ + + _validation = { + 'name': {'required': True}, + 'country_code': {'required': True}, + 'phone_number': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SmsReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.country_code = kwargs['country_code'] + self.phone_number = kwargs['phone_number'] + self.status = None + + +class TestNotificationDetailsResponse(msrest.serialization.Model): + """The details of the test notification results. + + All required parameters must be populated in order to send to Azure. + + :param context: The context info. + :type context: ~$(python-base-namespace).v2021_09_01.models.Context + :param state: Required. The overall state. + :type state: str + :param completed_time: The completed time. + :type completed_time: str + :param created_time: The created time. + :type created_time: str + :param action_details: The list of action detail. + :type action_details: list[~$(python-base-namespace).v2021_09_01.models.ActionDetail] + """ + + _validation = { + 'state': {'required': True}, + } + + _attribute_map = { + 'context': {'key': 'Context', 'type': 'Context'}, + 'state': {'key': 'State', 'type': 'str'}, + 'completed_time': {'key': 'CompletedTime', 'type': 'str'}, + 'created_time': {'key': 'CreatedTime', 'type': 'str'}, + 'action_details': {'key': 'ActionDetails', 'type': '[ActionDetail]'}, + } + + def __init__( + self, + **kwargs + ): + super(TestNotificationDetailsResponse, self).__init__(**kwargs) + self.context = kwargs.get('context', None) + self.state = kwargs['state'] + self.completed_time = kwargs.get('completed_time', None) + self.created_time = kwargs.get('created_time', None) + self.action_details = kwargs.get('action_details', None) + + +class TestNotificationResponse(msrest.serialization.Model): + """The response when test notification succeeded. + + All required parameters must be populated in order to send to Azure. + + :param notification_id: Required. The notification id. + :type notification_id: str + :param correlation_id: Required. The correlation id. + :type correlation_id: str + :param created_time: Required. The created time. + :type created_time: str + """ + + _validation = { + 'notification_id': {'required': True}, + 'correlation_id': {'required': True}, + 'created_time': {'required': True}, + } + + _attribute_map = { + 'notification_id': {'key': 'notificationId', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TestNotificationResponse, self).__init__(**kwargs) + self.notification_id = kwargs['notification_id'] + self.correlation_id = kwargs['correlation_id'] + self.created_time = kwargs['created_time'] + + +class VoiceReceiver(msrest.serialization.Model): + """A voice receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the voice receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param country_code: Required. The country code of the voice receiver. + :type country_code: str + :param phone_number: Required. The phone number of the voice receiver. + :type phone_number: str + """ + + _validation = { + 'name': {'required': True}, + 'country_code': {'required': True}, + 'phone_number': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VoiceReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.country_code = kwargs['country_code'] + self.phone_number = kwargs['phone_number'] + + +class WebhookReceiver(msrest.serialization.Model): + """A webhook receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the webhook receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param service_uri: Required. The URI where webhooks should be sent. + :type service_uri: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + :param use_aad_auth: Indicates whether or not use AAD authentication. + :type use_aad_auth: bool + :param object_id: Indicates the webhook app object Id for aad auth. + :type object_id: str + :param identifier_uri: Indicates the identifier uri for aad auth. + :type identifier_uri: str + :param tenant_id: Indicates the tenant id for aad auth. + :type tenant_id: str + """ + + _validation = { + 'name': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + 'use_aad_auth': {'key': 'useAadAuth', 'type': 'bool'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'identifier_uri': {'key': 'identifierUri', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebhookReceiver, self).__init__(**kwargs) + self.name = kwargs['name'] + self.service_uri = kwargs['service_uri'] + self.use_common_alert_schema = kwargs.get('use_common_alert_schema', False) + self.use_aad_auth = kwargs.get('use_aad_auth', False) + self.object_id = kwargs.get('object_id', None) + self.identifier_uri = kwargs.get('identifier_uri', None) + self.tenant_id = kwargs.get('tenant_id', None) diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models_py3.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models_py3.py new file mode 100644 index 000000000000..2f5c11e9c684 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_models_py3.py @@ -0,0 +1,1085 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Dict, List, Optional + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class ActionDetail(msrest.serialization.Model): + """The action detail. + + :param mechanism_type: The mechanism type. + :type mechanism_type: str + :param name: The name of the action. + :type name: str + :param status: The status of the action. + :type status: str + :param sub_state: The substatus of the action. + :type sub_state: str + :param send_time: The send time. + :type send_time: str + :param detail: The detail of the friendly error message. + :type detail: str + """ + + _attribute_map = { + 'mechanism_type': {'key': 'MechanismType', 'type': 'str'}, + 'name': {'key': 'Name', 'type': 'str'}, + 'status': {'key': 'Status', 'type': 'str'}, + 'sub_state': {'key': 'SubState', 'type': 'str'}, + 'send_time': {'key': 'SendTime', 'type': 'str'}, + 'detail': {'key': 'Detail', 'type': 'str'}, + } + + def __init__( + self, + *, + mechanism_type: Optional[str] = None, + name: Optional[str] = None, + status: Optional[str] = None, + sub_state: Optional[str] = None, + send_time: Optional[str] = None, + detail: Optional[str] = None, + **kwargs + ): + super(ActionDetail, self).__init__(**kwargs) + self.mechanism_type = mechanism_type + self.name = name + self.status = status + self.sub_state = sub_state + self.send_time = send_time + self.detail = detail + + +class ActionGroupList(msrest.serialization.Model): + """A list of action groups. + + :param value: The list of action groups. + :type value: list[~$(python-base-namespace).v2021_09_01.models.ActionGroupResource] + :param next_link: Provides the link to retrieve the next set of elements. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActionGroupResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ActionGroupResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ActionGroupList, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ActionGroupPatchBody(msrest.serialization.Model): + """An action group object for the body of patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param enabled: Indicates whether this action group is enabled. If an action group is not + enabled, then none of its actions will be activated. + :type enabled: bool + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + enabled: Optional[bool] = True, + **kwargs + ): + super(ActionGroupPatchBody, self).__init__(**kwargs) + self.tags = tags + self.enabled = enabled + + +class AzureResource(msrest.serialization.Model): + """An azure resource object. + + 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. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(AzureResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.kind = None + self.identity = None + self.location = location + self.tags = tags + + +class ActionGroupResource(AzureResource): + """An action group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Azure resource Id. + :vartype id: str + :ivar name: Azure resource name. + :vartype name: str + :ivar type: Azure resource type. + :vartype type: str + :ivar kind: Azure resource kind. + :vartype kind: str + :ivar identity: Azure resource identity. + :vartype identity: str + :param location: Required. Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param group_short_name: The short name of the action group. This will be used in SMS messages. + :type group_short_name: str + :param enabled: Indicates whether this action group is enabled. If an action group is not + enabled, then none of its receivers will receive communications. + :type enabled: bool + :param email_receivers: The list of email receivers that are part of this action group. + :type email_receivers: list[~$(python-base-namespace).v2021_09_01.models.EmailReceiver] + :param sms_receivers: The list of SMS receivers that are part of this action group. + :type sms_receivers: list[~$(python-base-namespace).v2021_09_01.models.SmsReceiver] + :param webhook_receivers: The list of webhook receivers that are part of this action group. + :type webhook_receivers: list[~$(python-base-namespace).v2021_09_01.models.WebhookReceiver] + :param itsm_receivers: The list of ITSM receivers that are part of this action group. + :type itsm_receivers: list[~$(python-base-namespace).v2021_09_01.models.ItsmReceiver] + :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this + action group. + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AzureAppPushReceiver] + :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of + this action group. + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AutomationRunbookReceiver] + :param voice_receivers: The list of voice receivers that are part of this action group. + :type voice_receivers: list[~$(python-base-namespace).v2021_09_01.models.VoiceReceiver] + :param logic_app_receivers: The list of logic app receivers that are part of this action group. + :type logic_app_receivers: list[~$(python-base-namespace).v2021_09_01.models.LogicAppReceiver] + :param azure_function_receivers: The list of azure function receivers that are part of this + action group. + :type azure_function_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AzureFunctionReceiver] + :param arm_role_receivers: The list of ARM role receivers that are part of this action group. + Roles are Azure RBAC roles and only built-in roles are supported. + :type arm_role_receivers: list[~$(python-base-namespace).v2021_09_01.models.ArmRoleReceiver] + :param event_hub_receivers: The list of event hub receivers that are part of this action group. + :type event_hub_receivers: list[~$(python-base-namespace).v2021_09_01.models.EventHubReceiver] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'readonly': True}, + 'identity': {'readonly': True}, + 'location': {'required': True}, + 'group_short_name': {'max_length': 12, 'min_length': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'group_short_name': {'key': 'properties.groupShortName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'email_receivers': {'key': 'properties.emailReceivers', 'type': '[EmailReceiver]'}, + 'sms_receivers': {'key': 'properties.smsReceivers', 'type': '[SmsReceiver]'}, + 'webhook_receivers': {'key': 'properties.webhookReceivers', 'type': '[WebhookReceiver]'}, + 'itsm_receivers': {'key': 'properties.itsmReceivers', 'type': '[ItsmReceiver]'}, + 'azure_app_push_receivers': {'key': 'properties.azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, + 'automation_runbook_receivers': {'key': 'properties.automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, + 'voice_receivers': {'key': 'properties.voiceReceivers', 'type': '[VoiceReceiver]'}, + 'logic_app_receivers': {'key': 'properties.logicAppReceivers', 'type': '[LogicAppReceiver]'}, + 'azure_function_receivers': {'key': 'properties.azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'}, + 'arm_role_receivers': {'key': 'properties.armRoleReceivers', 'type': '[ArmRoleReceiver]'}, + 'event_hub_receivers': {'key': 'properties.eventHubReceivers', 'type': '[EventHubReceiver]'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + group_short_name: Optional[str] = None, + enabled: Optional[bool] = True, + email_receivers: Optional[List["EmailReceiver"]] = None, + sms_receivers: Optional[List["SmsReceiver"]] = None, + webhook_receivers: Optional[List["WebhookReceiver"]] = None, + itsm_receivers: Optional[List["ItsmReceiver"]] = None, + azure_app_push_receivers: Optional[List["AzureAppPushReceiver"]] = None, + automation_runbook_receivers: Optional[List["AutomationRunbookReceiver"]] = None, + voice_receivers: Optional[List["VoiceReceiver"]] = None, + logic_app_receivers: Optional[List["LogicAppReceiver"]] = None, + azure_function_receivers: Optional[List["AzureFunctionReceiver"]] = None, + arm_role_receivers: Optional[List["ArmRoleReceiver"]] = None, + event_hub_receivers: Optional[List["EventHubReceiver"]] = None, + **kwargs + ): + super(ActionGroupResource, self).__init__(location=location, tags=tags, **kwargs) + self.group_short_name = group_short_name + self.enabled = enabled + self.email_receivers = email_receivers + self.sms_receivers = sms_receivers + self.webhook_receivers = webhook_receivers + self.itsm_receivers = itsm_receivers + self.azure_app_push_receivers = azure_app_push_receivers + self.automation_runbook_receivers = automation_runbook_receivers + self.voice_receivers = voice_receivers + self.logic_app_receivers = logic_app_receivers + self.azure_function_receivers = azure_function_receivers + self.arm_role_receivers = arm_role_receivers + self.event_hub_receivers = event_hub_receivers + + +class ArmRoleReceiver(msrest.serialization.Model): + """An arm role receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the arm role receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param role_id: Required. The arm role id. + :type role_id: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + """ + + _validation = { + 'name': {'required': True}, + 'role_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'role_id': {'key': 'roleId', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: str, + role_id: str, + use_common_alert_schema: Optional[bool] = False, + **kwargs + ): + super(ArmRoleReceiver, self).__init__(**kwargs) + self.name = name + self.role_id = role_id + self.use_common_alert_schema = use_common_alert_schema + + +class AutomationRunbookReceiver(msrest.serialization.Model): + """The Azure Automation Runbook notification receiver. + + All required parameters must be populated in order to send to Azure. + + :param automation_account_id: Required. The Azure automation account Id which holds this + runbook and authenticate to Azure resource. + :type automation_account_id: str + :param runbook_name: Required. The name for this runbook. + :type runbook_name: str + :param webhook_resource_id: Required. The resource id for webhook linked to this runbook. + :type webhook_resource_id: str + :param is_global_runbook: Required. Indicates whether this instance is global runbook. + :type is_global_runbook: bool + :param name: Indicates name of the webhook. + :type name: str + :param service_uri: The URI where webhooks should be sent. + :type service_uri: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + """ + + _validation = { + 'automation_account_id': {'required': True}, + 'runbook_name': {'required': True}, + 'webhook_resource_id': {'required': True}, + 'is_global_runbook': {'required': True}, + } + + _attribute_map = { + 'automation_account_id': {'key': 'automationAccountId', 'type': 'str'}, + 'runbook_name': {'key': 'runbookName', 'type': 'str'}, + 'webhook_resource_id': {'key': 'webhookResourceId', 'type': 'str'}, + 'is_global_runbook': {'key': 'isGlobalRunbook', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + } + + def __init__( + self, + *, + automation_account_id: str, + runbook_name: str, + webhook_resource_id: str, + is_global_runbook: bool, + name: Optional[str] = None, + service_uri: Optional[str] = None, + use_common_alert_schema: Optional[bool] = False, + **kwargs + ): + super(AutomationRunbookReceiver, self).__init__(**kwargs) + self.automation_account_id = automation_account_id + self.runbook_name = runbook_name + self.webhook_resource_id = webhook_resource_id + self.is_global_runbook = is_global_runbook + self.name = name + self.service_uri = service_uri + self.use_common_alert_schema = use_common_alert_schema + + +class AzureAppPushReceiver(msrest.serialization.Model): + """The Azure mobile App push notification receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Azure mobile app push receiver. Names must be unique + across all receivers within an action group. + :type name: str + :param email_address: Required. The email address registered for the Azure mobile app. + :type email_address: str + """ + + _validation = { + 'name': {'required': True}, + 'email_address': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + email_address: str, + **kwargs + ): + super(AzureAppPushReceiver, self).__init__(**kwargs) + self.name = name + self.email_address = email_address + + +class AzureFunctionReceiver(msrest.serialization.Model): + """An azure function receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the azure function receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param function_app_resource_id: Required. The azure resource id of the function app. + :type function_app_resource_id: str + :param function_name: Required. The function name in the function app. + :type function_name: str + :param http_trigger_url: Required. The http trigger url where http request sent to. + :type http_trigger_url: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + """ + + _validation = { + 'name': {'required': True}, + 'function_app_resource_id': {'required': True}, + 'function_name': {'required': True}, + 'http_trigger_url': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'function_app_resource_id': {'key': 'functionAppResourceId', 'type': 'str'}, + 'function_name': {'key': 'functionName', 'type': 'str'}, + 'http_trigger_url': {'key': 'httpTriggerUrl', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: str, + function_app_resource_id: str, + function_name: str, + http_trigger_url: str, + use_common_alert_schema: Optional[bool] = False, + **kwargs + ): + super(AzureFunctionReceiver, self).__init__(**kwargs) + self.name = name + self.function_app_resource_id = function_app_resource_id + self.function_name = function_name + self.http_trigger_url = http_trigger_url + self.use_common_alert_schema = use_common_alert_schema + + +class Context(msrest.serialization.Model): + """The context info. + + :param notification_source: The source of the notification request. + :type notification_source: str + :param context_type: The context id type. + :type context_type: str + """ + + _attribute_map = { + 'notification_source': {'key': 'NotificationSource', 'type': 'str'}, + 'context_type': {'key': 'ContextType', 'type': 'str'}, + } + + def __init__( + self, + *, + notification_source: Optional[str] = None, + context_type: Optional[str] = None, + **kwargs + ): + super(Context, self).__init__(**kwargs) + self.notification_source = notification_source + self.context_type = context_type + + +class EmailReceiver(msrest.serialization.Model): + """An email receiver. + + 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 name: Required. The name of the email receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param email_address: Required. The email address of this receiver. + :type email_address: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + :ivar status: The receiver status of the e-mail. Possible values include: "NotSpecified", + "Enabled", "Disabled". + :vartype status: str or ~$(python-base-namespace).v2021_09_01.models.ReceiverStatus + """ + + _validation = { + 'name': {'required': True}, + 'email_address': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'email_address': {'key': 'emailAddress', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + email_address: str, + use_common_alert_schema: Optional[bool] = False, + **kwargs + ): + super(EmailReceiver, self).__init__(**kwargs) + self.name = name + self.email_address = email_address + self.use_common_alert_schema = use_common_alert_schema + self.status = None + + +class EnableRequest(msrest.serialization.Model): + """Describes a receiver that should be resubscribed. + + All required parameters must be populated in order to send to Azure. + + :param receiver_name: Required. The name of the receiver to resubscribe. + :type receiver_name: str + """ + + _validation = { + 'receiver_name': {'required': True}, + } + + _attribute_map = { + 'receiver_name': {'key': 'receiverName', 'type': 'str'}, + } + + def __init__( + self, + *, + receiver_name: str, + **kwargs + ): + super(EnableRequest, self).__init__(**kwargs) + self.receiver_name = receiver_name + + +class ErrorResponse(msrest.serialization.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: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class EventHubReceiver(msrest.serialization.Model): + """An Event hub receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Event hub receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param event_hub_name_space: Required. The Event Hub namespace. + :type event_hub_name_space: str + :param event_hub_name: Required. The name of the specific Event Hub queue. + :type event_hub_name: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + :param tenant_id: The tenant Id for the subscription containing this event hub. + :type tenant_id: str + :param subscription_id: Required. The Id for the subscription containing this event hub. + :type subscription_id: str + """ + + _validation = { + 'name': {'required': True}, + 'event_hub_name_space': {'required': True}, + 'event_hub_name': {'required': True}, + 'subscription_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'event_hub_name_space': {'key': 'eventHubNameSpace', 'type': 'str'}, + 'event_hub_name': {'key': 'eventHubName', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + event_hub_name_space: str, + event_hub_name: str, + subscription_id: str, + use_common_alert_schema: Optional[bool] = False, + tenant_id: Optional[str] = None, + **kwargs + ): + super(EventHubReceiver, self).__init__(**kwargs) + self.name = name + self.event_hub_name_space = event_hub_name_space + self.event_hub_name = event_hub_name + self.use_common_alert_schema = use_common_alert_schema + self.tenant_id = tenant_id + self.subscription_id = subscription_id + + +class ItsmReceiver(msrest.serialization.Model): + """An Itsm receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Itsm receiver. Names must be unique across all receivers + within an action group. + :type name: str + :param workspace_id: Required. OMS LA instance identifier. + :type workspace_id: str + :param connection_id: Required. Unique identification of ITSM connection among multiple defined + in above workspace. + :type connection_id: str + :param ticket_configuration: Required. JSON blob for the configurations of the ITSM action. + CreateMultipleWorkItems option will be part of this blob as well. + :type ticket_configuration: str + :param region: Required. Region in which workspace resides. Supported + values:'centralindia','japaneast','southeastasia','australiasoutheast','uksouth','westcentralus','canadacentral','eastus','westeurope'. + :type region: str + """ + + _validation = { + 'name': {'required': True}, + 'workspace_id': {'required': True}, + 'connection_id': {'required': True}, + 'ticket_configuration': {'required': True}, + 'region': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'connection_id': {'key': 'connectionId', 'type': 'str'}, + 'ticket_configuration': {'key': 'ticketConfiguration', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + workspace_id: str, + connection_id: str, + ticket_configuration: str, + region: str, + **kwargs + ): + super(ItsmReceiver, self).__init__(**kwargs) + self.name = name + self.workspace_id = workspace_id + self.connection_id = connection_id + self.ticket_configuration = ticket_configuration + self.region = region + + +class LogicAppReceiver(msrest.serialization.Model): + """A logic app receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the logic app receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param resource_id: Required. The azure resource id of the logic app receiver. + :type resource_id: str + :param callback_url: Required. The callback url where http request sent to. + :type callback_url: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + """ + + _validation = { + 'name': {'required': True}, + 'resource_id': {'required': True}, + 'callback_url': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'callback_url': {'key': 'callbackUrl', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: str, + resource_id: str, + callback_url: str, + use_common_alert_schema: Optional[bool] = False, + **kwargs + ): + super(LogicAppReceiver, self).__init__(**kwargs) + self.name = name + self.resource_id = resource_id + self.callback_url = callback_url + self.use_common_alert_schema = use_common_alert_schema + + +class NotificationRequestBody(msrest.serialization.Model): + """The request body which contain contact detail metadata. + + All required parameters must be populated in order to send to Azure. + + :param alert_type: Required. The name of the supported alert type. + :type alert_type: str + :param email_receivers: The list of email receivers that are part of this action group. + :type email_receivers: list[~$(python-base-namespace).v2021_09_01.models.EmailReceiver] + :param sms_receivers: The list of SMS receivers that are part of this action group. + :type sms_receivers: list[~$(python-base-namespace).v2021_09_01.models.SmsReceiver] + :param webhook_receivers: The list of webhook receivers that are part of this action group. + :type webhook_receivers: list[~$(python-base-namespace).v2021_09_01.models.WebhookReceiver] + :param itsm_receivers: The list of ITSM receivers that are part of this action group. + :type itsm_receivers: list[~$(python-base-namespace).v2021_09_01.models.ItsmReceiver] + :param azure_app_push_receivers: The list of AzureAppPush receivers that are part of this + action group. + :type azure_app_push_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AzureAppPushReceiver] + :param automation_runbook_receivers: The list of AutomationRunbook receivers that are part of + this action group. + :type automation_runbook_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AutomationRunbookReceiver] + :param voice_receivers: The list of voice receivers that are part of this action group. + :type voice_receivers: list[~$(python-base-namespace).v2021_09_01.models.VoiceReceiver] + :param logic_app_receivers: The list of logic app receivers that are part of this action group. + :type logic_app_receivers: list[~$(python-base-namespace).v2021_09_01.models.LogicAppReceiver] + :param azure_function_receivers: The list of azure function receivers that are part of this + action group. + :type azure_function_receivers: + list[~$(python-base-namespace).v2021_09_01.models.AzureFunctionReceiver] + :param arm_role_receivers: The list of ARM role receivers that are part of this action group. + Roles are Azure RBAC roles and only built-in roles are supported. + :type arm_role_receivers: list[~$(python-base-namespace).v2021_09_01.models.ArmRoleReceiver] + :param event_hub_receivers: The list of event hub receivers that are part of this action group. + :type event_hub_receivers: list[~$(python-base-namespace).v2021_09_01.models.EventHubReceiver] + """ + + _validation = { + 'alert_type': {'required': True, 'max_length': 30, 'min_length': 0}, + } + + _attribute_map = { + 'alert_type': {'key': 'alertType', 'type': 'str'}, + 'email_receivers': {'key': 'emailReceivers', 'type': '[EmailReceiver]'}, + 'sms_receivers': {'key': 'smsReceivers', 'type': '[SmsReceiver]'}, + 'webhook_receivers': {'key': 'webhookReceivers', 'type': '[WebhookReceiver]'}, + 'itsm_receivers': {'key': 'itsmReceivers', 'type': '[ItsmReceiver]'}, + 'azure_app_push_receivers': {'key': 'azureAppPushReceivers', 'type': '[AzureAppPushReceiver]'}, + 'automation_runbook_receivers': {'key': 'automationRunbookReceivers', 'type': '[AutomationRunbookReceiver]'}, + 'voice_receivers': {'key': 'voiceReceivers', 'type': '[VoiceReceiver]'}, + 'logic_app_receivers': {'key': 'logicAppReceivers', 'type': '[LogicAppReceiver]'}, + 'azure_function_receivers': {'key': 'azureFunctionReceivers', 'type': '[AzureFunctionReceiver]'}, + 'arm_role_receivers': {'key': 'armRoleReceivers', 'type': '[ArmRoleReceiver]'}, + 'event_hub_receivers': {'key': 'eventHubReceivers', 'type': '[EventHubReceiver]'}, + } + + def __init__( + self, + *, + alert_type: str, + email_receivers: Optional[List["EmailReceiver"]] = None, + sms_receivers: Optional[List["SmsReceiver"]] = None, + webhook_receivers: Optional[List["WebhookReceiver"]] = None, + itsm_receivers: Optional[List["ItsmReceiver"]] = None, + azure_app_push_receivers: Optional[List["AzureAppPushReceiver"]] = None, + automation_runbook_receivers: Optional[List["AutomationRunbookReceiver"]] = None, + voice_receivers: Optional[List["VoiceReceiver"]] = None, + logic_app_receivers: Optional[List["LogicAppReceiver"]] = None, + azure_function_receivers: Optional[List["AzureFunctionReceiver"]] = None, + arm_role_receivers: Optional[List["ArmRoleReceiver"]] = None, + event_hub_receivers: Optional[List["EventHubReceiver"]] = None, + **kwargs + ): + super(NotificationRequestBody, self).__init__(**kwargs) + self.alert_type = alert_type + self.email_receivers = email_receivers + self.sms_receivers = sms_receivers + self.webhook_receivers = webhook_receivers + self.itsm_receivers = itsm_receivers + self.azure_app_push_receivers = azure_app_push_receivers + self.automation_runbook_receivers = automation_runbook_receivers + self.voice_receivers = voice_receivers + self.logic_app_receivers = logic_app_receivers + self.azure_function_receivers = azure_function_receivers + self.arm_role_receivers = arm_role_receivers + self.event_hub_receivers = event_hub_receivers + + +class SmsReceiver(msrest.serialization.Model): + """An SMS receiver. + + 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 name: Required. The name of the SMS receiver. Names must be unique across all receivers + within an action group. + :type name: str + :param country_code: Required. The country code of the SMS receiver. + :type country_code: str + :param phone_number: Required. The phone number of the SMS receiver. + :type phone_number: str + :ivar status: The status of the receiver. Possible values include: "NotSpecified", "Enabled", + "Disabled". + :vartype status: str or ~$(python-base-namespace).v2021_09_01.models.ReceiverStatus + """ + + _validation = { + 'name': {'required': True}, + 'country_code': {'required': True}, + 'phone_number': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + country_code: str, + phone_number: str, + **kwargs + ): + super(SmsReceiver, self).__init__(**kwargs) + self.name = name + self.country_code = country_code + self.phone_number = phone_number + self.status = None + + +class TestNotificationDetailsResponse(msrest.serialization.Model): + """The details of the test notification results. + + All required parameters must be populated in order to send to Azure. + + :param context: The context info. + :type context: ~$(python-base-namespace).v2021_09_01.models.Context + :param state: Required. The overall state. + :type state: str + :param completed_time: The completed time. + :type completed_time: str + :param created_time: The created time. + :type created_time: str + :param action_details: The list of action detail. + :type action_details: list[~$(python-base-namespace).v2021_09_01.models.ActionDetail] + """ + + _validation = { + 'state': {'required': True}, + } + + _attribute_map = { + 'context': {'key': 'Context', 'type': 'Context'}, + 'state': {'key': 'State', 'type': 'str'}, + 'completed_time': {'key': 'CompletedTime', 'type': 'str'}, + 'created_time': {'key': 'CreatedTime', 'type': 'str'}, + 'action_details': {'key': 'ActionDetails', 'type': '[ActionDetail]'}, + } + + def __init__( + self, + *, + state: str, + context: Optional["Context"] = None, + completed_time: Optional[str] = None, + created_time: Optional[str] = None, + action_details: Optional[List["ActionDetail"]] = None, + **kwargs + ): + super(TestNotificationDetailsResponse, self).__init__(**kwargs) + self.context = context + self.state = state + self.completed_time = completed_time + self.created_time = created_time + self.action_details = action_details + + +class TestNotificationResponse(msrest.serialization.Model): + """The response when test notification succeeded. + + All required parameters must be populated in order to send to Azure. + + :param notification_id: Required. The notification id. + :type notification_id: str + :param correlation_id: Required. The correlation id. + :type correlation_id: str + :param created_time: Required. The created time. + :type created_time: str + """ + + _validation = { + 'notification_id': {'required': True}, + 'correlation_id': {'required': True}, + 'created_time': {'required': True}, + } + + _attribute_map = { + 'notification_id': {'key': 'notificationId', 'type': 'str'}, + 'correlation_id': {'key': 'correlationId', 'type': 'str'}, + 'created_time': {'key': 'createdTime', 'type': 'str'}, + } + + def __init__( + self, + *, + notification_id: str, + correlation_id: str, + created_time: str, + **kwargs + ): + super(TestNotificationResponse, self).__init__(**kwargs) + self.notification_id = notification_id + self.correlation_id = correlation_id + self.created_time = created_time + + +class VoiceReceiver(msrest.serialization.Model): + """A voice receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the voice receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param country_code: Required. The country code of the voice receiver. + :type country_code: str + :param phone_number: Required. The phone number of the voice receiver. + :type phone_number: str + """ + + _validation = { + 'name': {'required': True}, + 'country_code': {'required': True}, + 'phone_number': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'phone_number': {'key': 'phoneNumber', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + country_code: str, + phone_number: str, + **kwargs + ): + super(VoiceReceiver, self).__init__(**kwargs) + self.name = name + self.country_code = country_code + self.phone_number = phone_number + + +class WebhookReceiver(msrest.serialization.Model): + """A webhook receiver. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the webhook receiver. Names must be unique across all + receivers within an action group. + :type name: str + :param service_uri: Required. The URI where webhooks should be sent. + :type service_uri: str + :param use_common_alert_schema: Indicates whether to use common alert schema. + :type use_common_alert_schema: bool + :param use_aad_auth: Indicates whether or not use AAD authentication. + :type use_aad_auth: bool + :param object_id: Indicates the webhook app object Id for aad auth. + :type object_id: str + :param identifier_uri: Indicates the identifier uri for aad auth. + :type identifier_uri: str + :param tenant_id: Indicates the tenant id for aad auth. + :type tenant_id: str + """ + + _validation = { + 'name': {'required': True}, + 'service_uri': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'service_uri': {'key': 'serviceUri', 'type': 'str'}, + 'use_common_alert_schema': {'key': 'useCommonAlertSchema', 'type': 'bool'}, + 'use_aad_auth': {'key': 'useAadAuth', 'type': 'bool'}, + 'object_id': {'key': 'objectId', 'type': 'str'}, + 'identifier_uri': {'key': 'identifierUri', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + service_uri: str, + use_common_alert_schema: Optional[bool] = False, + use_aad_auth: Optional[bool] = False, + object_id: Optional[str] = None, + identifier_uri: Optional[str] = None, + tenant_id: Optional[str] = None, + **kwargs + ): + super(WebhookReceiver, self).__init__(**kwargs) + self.name = name + self.service_uri = service_uri + self.use_common_alert_schema = use_common_alert_schema + self.use_aad_auth = use_aad_auth + self.object_id = object_id + self.identifier_uri = identifier_uri + self.tenant_id = tenant_id diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_monitor_management_client_enums.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_monitor_management_client_enums.py new file mode 100644 index 000000000000..238df22ea2f0 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/models/_monitor_management_client_enums.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class ReceiverStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Indicates the status of the receiver. Receivers that are not Enabled will not receive any + communications. + """ + + NOT_SPECIFIED = "NotSpecified" + ENABLED = "Enabled" + DISABLED = "Disabled" diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/__init__.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/__init__.py new file mode 100644 index 000000000000..dc488c51fcad --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._action_groups_operations import ActionGroupsOperations + +__all__ = [ + 'ActionGroupsOperations', +] diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py new file mode 100644 index 000000000000..8c710ee5b3cc --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/operations/_action_groups_operations.py @@ -0,0 +1,680 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ActionGroupsOperations(object): + """ActionGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~$(python-base-namespace).v2021_09_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_or_update( + self, + resource_group_name, # type: str + action_group_name, # type: str + action_group, # type: "_models.ActionGroupResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActionGroupResource" + """Create a new action group or update an existing one. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :param action_group: The action group to create or use for the update. + :type action_group: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActionGroupResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(action_group, 'ActionGroupResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ActionGroupResource', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ActionGroupResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + action_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ActionGroupResource" + """Get an action group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActionGroupResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActionGroupResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + action_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete an action group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + action_group_name, # type: str + action_group_patch, # type: "_models.ActionGroupPatchBody" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActionGroupResource" + """Updates an existing action group's tags. To update other fields use the CreateOrUpdate method. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :param action_group_patch: Parameters supplied to the operation. + :type action_group_patch: ~$(python-base-namespace).v2021_09_01.models.ActionGroupPatchBody + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActionGroupResource, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_09_01.models.ActionGroupResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(action_group_patch, 'ActionGroupPatchBody') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActionGroupResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}'} # type: ignore + + def _post_test_notifications_initial( + self, + notification_request, # type: "_models.NotificationRequestBody" + **kwargs # type: Any + ): + # type: (...) -> "_models.TestNotificationResponse" + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestNotificationResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._post_test_notifications_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(notification_request, 'NotificationRequestBody') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestNotificationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _post_test_notifications_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications'} # type: ignore + + def begin_post_test_notifications( + self, + notification_request, # type: "_models.NotificationRequestBody" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.TestNotificationResponse"] + """Send test notifications to a set of provided receivers. + + :param notification_request: The notification request body which includes the contact details. + :type notification_request: ~$(python-base-namespace).v2021_09_01.models.NotificationRequestBody + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either TestNotificationResponse or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~$(python-base-namespace).v2021_09_01.models.TestNotificationResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestNotificationResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._post_test_notifications_initial( + notification_request=notification_request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('TestNotificationResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_post_test_notifications.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/createNotifications'} # type: ignore + + def get_test_notifications( + self, + notification_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.TestNotificationDetailsResponse" + """Get the test notifications by the notification id. + + :param notification_id: The notification id. + :type notification_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: TestNotificationDetailsResponse, or the result of cls(response) + :rtype: ~$(python-base-namespace).v2021_09_01.models.TestNotificationDetailsResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.TestNotificationDetailsResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + # Construct URL + url = self.get_test_notifications.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'notificationId': self._serialize.url("notification_id", notification_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('TestNotificationDetailsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_test_notifications.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/notificationStatus/{notificationId}'} # type: ignore + + def list_by_subscription_id( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ActionGroupList"] + """Get a list of all action groups in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ActionGroupList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_09_01.models.ActionGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription_id.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ActionGroupList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription_id.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/actionGroups'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ActionGroupList"] + """Get a list of all action groups in a resource group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ActionGroupList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~$(python-base-namespace).v2021_09_01.models.ActionGroupList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActionGroupList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ActionGroupList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups'} # type: ignore + + def enable_receiver( + self, + resource_group_name, # type: str + action_group_name, # type: str + enable_request, # type: "_models.EnableRequest" + **kwargs # type: Any + ): + # type: (...) -> None + """Enable a receiver in an action group. This changes the receiver's status from Disabled to + Enabled. This operation is only supported for Email or SMS receivers. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param action_group_name: The name of the action group. + :type action_group_name: str + :param enable_request: The receiver to re-enable. + :type enable_request: ~$(python-base-namespace).v2021_09_01.models.EnableRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-09-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.enable_receiver.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'actionGroupName': self._serialize.url("action_group_name", action_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(enable_request, 'EnableRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + enable_receiver.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/actionGroups/{actionGroupName}/subscribe'} # type: ignore diff --git a/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/py.typed b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2021_09_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/monitor/azure-mgmt-monitor/dev_requirements.txt b/sdk/monitor/azure-mgmt-monitor/dev_requirements.txt index cfd543b488e3..287907025bfa 100644 --- a/sdk/monitor/azure-mgmt-monitor/dev_requirements.txt +++ b/sdk/monitor/azure-mgmt-monitor/dev_requirements.txt @@ -1,3 +1,11 @@ -e ../../../tools/azure-sdk-tools aiohttp>=3.0; python_version >= '3.5' --e ../../../tools/azure-devtools \ No newline at end of file +-e ../../../tools/azure-devtools +-e ../../storage/azure-mgmt-storage +-e ../../eventhub/azure-mgmt-eventhub +-e ../../loganalytics/azure-mgmt-loganalytics +-e ../../appservice/azure-mgmt-web +-e ../../compute/azure-mgmt-compute +-e ../../network/azure-mgmt-network +-e ../../applicationinsights/azure-mgmt-applicationinsights +-e ../../logic/azure-mgmt-logic diff --git a/sdk/monitor/azure-mgmt-monitor/setup.py b/sdk/monitor/azure-mgmt-monitor/setup.py index 00175cdfb83f..46f1bc9ba5be 100644 --- a/sdk/monitor/azure-mgmt-monitor/setup.py +++ b/sdk/monitor/azure-mgmt-monitor/setup.py @@ -80,7 +80,7 @@ 'azure.mgmt', ]), install_requires=[ - 'msrest>=0.5.0', + 'msrest>=0.6.21', 'azure-common~=1.1', 'azure-mgmt-core>=1.2.0,<2.0.0', ], diff --git a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_action_groups.yaml b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_action_groups.yaml index eb2849fa15dd..b2a7a99fc893 100644 --- a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_action_groups.yaml +++ b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_action_groups.yaml @@ -16,23 +16,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/actionGroups/actiongroup534a109d?api-version=2019-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/actionGroups/actiongroup534a109d?api-version=2021-09-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/actionGroups/actiongroup534a109d","type":"Microsoft.Insights/ActionGroups","name":"actiongroup534a109d","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"sample","enabled":true,"emailReceivers":[{"name":"John Doe''s email","emailAddress":"johndoe@email.com","status":"Enabled","useCommonAlertSchema":false}],"smsReceivers":[{"name":"John - Doe''s mobile","countryCode":"1","phoneNumber":"1234567890","status":"Enabled"}],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[],"armRoleReceivers":[]},"identity":null}' + Doe''s mobile","countryCode":"1","phoneNumber":"1234567890","status":"Enabled"}],"webhookReceivers":[],"eventhubReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[],"armRoleReceivers":[]},"identity":null}' headers: cache-control: - no-cache content-length: - - '832' + - '860' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:19:07 GMT + - Fri, 05 Nov 2021 06:00:12 GMT expires: - '-1' pragma: @@ -43,8 +43,8 @@ interactions: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1199' + x-ms-ratelimit-remaining-subscription-resource-requests: + - '24' status: code: 201 message: Created @@ -58,23 +58,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/actionGroups/actiongroup534a109d?api-version=2019-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/actionGroups/actiongroup534a109d?api-version=2021-09-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/actionGroups/actiongroup534a109d","type":"Microsoft.Insights/ActionGroups","name":"actiongroup534a109d","location":"Global","kind":null,"tags":null,"properties":{"groupShortName":"sample","enabled":true,"emailReceivers":[{"name":"John Doe''s email","emailAddress":"johndoe@email.com","status":"Enabled","useCommonAlertSchema":false}],"smsReceivers":[{"name":"John - Doe''s mobile","countryCode":"1","phoneNumber":"1234567890","status":"Enabled"}],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[],"armRoleReceivers":[]},"identity":null}' + Doe''s mobile","countryCode":"1","phoneNumber":"1234567890","status":"Enabled"}],"webhookReceivers":[],"eventhubReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[],"armRoleReceivers":[]},"identity":null}' headers: cache-control: - no-cache content-length: - - '832' + - '860' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:19:08 GMT + - Fri, 05 Nov 2021 06:00:13 GMT expires: - '-1' pragma: @@ -89,6 +89,8 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-ratelimit-remaining-subscription-resource-requests: + - '249' status: code: 200 message: OK @@ -106,9 +108,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/actionGroups/actiongroup534a109d/subscribe?api-version=2019-06-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/actionGroups/actiongroup534a109d/subscribe?api-version=2021-09-01 response: body: string: '{"code":"ReceiverAlreadyEnabled","message":null}' @@ -120,7 +122,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:19:08 GMT + - Fri, 05 Nov 2021 06:00:13 GMT expires: - '-1' pragma: @@ -136,95 +138,4 @@ interactions: status: code: 409 message: Conflict -- request: - body: '{"tags": {"key1": "value1", "key2": "value2"}, "properties": {"enabled": - false}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '80' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/actionGroups/actiongroup534a109d?api-version=2019-06-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/actionGroups/actiongroup534a109d","type":"Microsoft.Insights/ActionGroups","name":"actiongroup534a109d","location":"Global","kind":null,"tags":{"key1":"value1","key2":"value2"},"properties":{"groupShortName":"sample","enabled":true,"emailReceivers":[{"name":"John - Doe''s email","emailAddress":"johndoe@email.com","status":"Enabled","useCommonAlertSchema":false}],"smsReceivers":[{"name":"John - Doe''s mobile","countryCode":"1","phoneNumber":"1234567890","status":"Enabled"}],"webhookReceivers":[],"itsmReceivers":[],"azureAppPushReceivers":[],"automationRunbookReceivers":[],"voiceReceivers":[],"logicAppReceivers":[],"azureFunctionReceivers":[],"armRoleReceivers":[]},"identity":null}' - headers: - cache-control: - - no-cache - content-length: - - '861' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:19:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/actionGroups/actiongroup534a109d?api-version=2019-06-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 16 Sep 2020 03:19:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK version: 1 diff --git a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_activity_log_alerts.yaml b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_activity_log_alerts.yaml index a3a9b0544a8c..2be6d88b74ec 100644 --- a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_activity_log_alerts.yaml +++ b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_activity_log_alerts.yaml @@ -1,9 +1,9 @@ interactions: - request: - body: 'b''{"location": "Global", "properties": {"scopes": ["subscriptions/00000000-0000-0000-0000-000000000000"], - "enabled": true, "condition": {"allOf": [{"field": "category", "equals": "Administrative"}, - {"field": "level", "equals": "Error"}]}, "actions": {"actionGroups": []}, "description": - "Sample activity log alert description"}}''' + body: '{"location": "Global", "properties": {"scopes": ["subscriptions/00000000-0000-0000-0000-000000000000"], + "condition": {"allOf": [{"field": "category", "equals": "Administrative"}, {"field": + "level", "equals": "Error"}]}, "actions": {"actionGroups": []}, "enabled": true, + "description": "Sample activity log alert description"}}' headers: Accept: - application/json @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/activityLogAlerts/activitylogalertxbfb21318?api-version=2017-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/activityLogAlerts/activitylogalertxbfb21318?api-version=2020-10-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/activityLogAlerts/activitylogalertxbfb21318","type":"Microsoft.Insights/ActivityLogAlerts","name":"activitylogalertxbfb21318","location":"Global","kind":null,"tags":{},"properties":{"scopes":["subscriptions/00000000-0000-0000-0000-000000000000"],"condition":{"allOf":[{"field":"category","equals":"Administrative","containsAny":null,"odata.type":null},{"field":"level","equals":"Error","containsAny":null,"odata.type":null}],"odata.type":null},"actions":{"actionGroups":[]},"enabled":true,"description":"Sample @@ -27,11 +27,11 @@ interactions: cache-control: - no-cache content-length: - - '739' + - '744' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:19:35 GMT + - Fri, 05 Nov 2021 06:00:39 GMT expires: - '-1' pragma: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1193' status: code: 201 message: Created @@ -57,9 +57,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/activityLogAlerts/activitylogalertxbfb21318?api-version=2017-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/activityLogAlerts/activitylogalertxbfb21318?api-version=2020-10-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/activityLogAlerts/activitylogalertxbfb21318","type":"Microsoft.Insights/ActivityLogAlerts","name":"activitylogalertxbfb21318","location":"Global","kind":null,"tags":{},"properties":{"scopes":["subscriptions/00000000-0000-0000-0000-000000000000"],"condition":{"allOf":[{"field":"category","equals":"Administrative","containsAny":null,"odata.type":null},{"field":"level","equals":"Error","containsAny":null,"odata.type":null}],"odata.type":null},"actions":{"actionGroups":[]},"enabled":true,"description":"Sample @@ -68,11 +68,11 @@ interactions: cache-control: - no-cache content-length: - - '739' + - '744' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:19:35 GMT + - Fri, 05 Nov 2021 06:00:39 GMT expires: - '-1' pragma: @@ -105,9 +105,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/activityLogAlerts/activitylogalertxbfb21318?api-version=2017-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/activityLogAlerts/activitylogalertxbfb21318?api-version=2020-10-01 response: body: string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/activityLogAlerts/activitylogalertxbfb21318","type":"Microsoft.Insights/ActivityLogAlerts","name":"activitylogalertxbfb21318","location":"Global","kind":null,"tags":{"key1":"value1","key2":"value2"},"properties":{"scopes":["subscriptions/00000000-0000-0000-0000-000000000000"],"condition":{"allOf":[{"field":"category","equals":"Administrative","containsAny":null,"odata.type":null},{"field":"level","equals":"Error","containsAny":null,"odata.type":null}],"odata.type":null},"actions":{"actionGroups":[]},"enabled":false,"description":"Sample @@ -116,11 +116,11 @@ interactions: cache-control: - no-cache content-length: - - '771' + - '776' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:19:38 GMT + - Fri, 05 Nov 2021 06:00:43 GMT expires: - '-1' pragma: @@ -136,7 +136,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1194' + - '1192' status: code: 200 message: OK @@ -152,9 +152,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/activityLogAlerts/activitylogalertxbfb21318?api-version=2017-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/activityLogAlerts/activitylogalertxbfb21318?api-version=2020-10-01 response: body: string: '' @@ -164,7 +164,7 @@ interactions: content-length: - '0' date: - - Wed, 16 Sep 2020 03:19:41 GMT + - Fri, 05 Nov 2021 06:00:47 GMT expires: - '-1' pragma: @@ -176,7 +176,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' status: code: 200 message: OK diff --git a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_autoscale_settings.yaml b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_autoscale_settings.yaml deleted file mode 100644 index 7f2a473663bc..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_autoscale_settings.yaml +++ /dev/null @@ -1,952 +0,0 @@ -interactions: -- request: - body: '{"location": "eastus", "properties": {"addressSpace": {"addressPrefixes": - ["10.0.0.0/16"]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '92' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"networkxx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx\"\ - ,\r\n \"etag\": \"W/\\\"b95b2875-fd69-487f-8ae1-cc565481af3a\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"03570805-0b36-439f-9a10-d3187585b688\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ - : false\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b1cda953-6d71-4011-8b7e-a1996cb0f5c6?api-version=2019-09-01 - cache-control: - - no-cache - content-length: - - '705' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:20:03 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d282c572-d6c7-4aa3-8daa-163e2865d6f7 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b1cda953-6d71-4011-8b7e-a1996cb0f5c6?api-version=2019-09-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:20:07 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - f17c41bb-f8e9-4332-954a-5cc250fa74f1 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"networkxx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx\"\ - ,\r\n \"etag\": \"W/\\\"7c86ceac-0e97-44cb-99ef-2f55a2348d9d\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"03570805-0b36-439f-9a10-d3187585b688\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ - : false\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '706' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:20:08 GMT - etag: - - W/"7c86ceac-0e97-44cb-99ef-2f55a2348d9d" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 7789143e-2c4b-459f-ab25-e81f6bdf872e - status: - code: 200 - message: OK -- request: - body: '{"properties": {"addressPrefix": "10.0.0.0/24"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '48' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"subnetx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - ,\r\n \"etag\": \"W/\\\"5979efd2-9ecd-4039-a69b-1045cb56b4b6\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/764fb77f-a60d-4e99-be29-e4b8dea236ae?api-version=2019-09-01 - cache-control: - - no-cache - content-length: - - '589' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:20:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 54d84dfc-a271-4480-b7c6-9f32730948b2 - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/764fb77f-a60d-4e99-be29-e4b8dea236ae?api-version=2019-09-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:20:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 694b569f-34be-44c9-8a52-6a8060e5749e - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"subnetx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - ,\r\n \"etag\": \"W/\\\"e14d74a4-27b0-4949-acca-8d2adec459b8\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '590' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:20:14 GMT - etag: - - W/"e14d74a4-27b0-4949-acca-8d2adec459b8" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 5a2d64e6-013e-4ccf-a721-61daef403ff4 - status: - code: 200 - message: OK -- request: - body: 'b''b\''{"location": "eastus", "properties": {"ipConfigurations": [{"properties": - {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx"}}, - "name": "MyIpConfig"}]}}\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '334' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"interfacexx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx\"\ - ,\r\n \"etag\": \"W/\\\"25731bbc-2483-4462-8697-47499c73e239\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"83220cc4-7a23-4796-bf7c-375454b55a53\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx/ipConfigurations/MyIpConfig\"\ - ,\r\n \"etag\": \"W/\\\"25731bbc-2483-4462-8697-47499c73e239\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"auefoazwbopuhgqq0mmhlbnwra.bx.internal.cloudapp.net\"\ - \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\"\ - : false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/117bec7c-2f58-4a6c-94cf-4470317e9557?api-version=2019-09-01 - cache-control: - - no-cache - content-length: - - '1795' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:20:19 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 93704773-ea03-4d5c-9e1a-effd58948fb6 - x-ms-ratelimit-remaining-subscription-writes: - - '1195' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/117bec7c-2f58-4a6c-94cf-4470317e9557?api-version=2019-09-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:20:51 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - acf3a505-a62b-4782-982e-f0f818ebd230 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"interfacexx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx\"\ - ,\r\n \"etag\": \"W/\\\"25731bbc-2483-4462-8697-47499c73e239\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"83220cc4-7a23-4796-bf7c-375454b55a53\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx/ipConfigurations/MyIpConfig\"\ - ,\r\n \"etag\": \"W/\\\"25731bbc-2483-4462-8697-47499c73e239\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"auefoazwbopuhgqq0mmhlbnwra.bx.internal.cloudapp.net\"\ - \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\"\ - : false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1795' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:20:52 GMT - etag: - - W/"25731bbc-2483-4462-8697-47499c73e239" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b12ac33c-d63a-4346-be5d-a912500c4955 - status: - code: 200 - message: OK -- request: - body: 'b''b\''{"location": "eastus", "sku": {"name": "Standard_D1_v2", "tier": - "Standard", "capacity": 2}, "properties": {"upgradePolicy": {"mode": "Manual"}, - "virtualMachineProfile": {"osProfile": {"computerNamePrefix": "testPC", "adminUsername": - "testuser", "adminPassword": "Aa!1()-xyz"}, "storageProfile": {"imageReference": - {"publisher": "Canonical", "offer": "UbuntuServer", "sku": "18.04-LTS", "version": - "latest"}, "osDisk": {"caching": "ReadWrite", "createOption": "FromImage", "diskSizeGB": - 512, "managedDisk": {"storageAccountType": "Standard_LRS"}}}, "networkProfile": - {"networkInterfaceConfigurations": [{"name": "testPC", "properties": {"primary": - true, "ipConfigurations": [{"name": "testPC", "properties": {"subnet": {"id": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx"}}}]}}]}}, - "overprovision": true}}\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '974' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmss_name?api-version=2019-07-01 - response: - body: - string: "{\r\n \"name\": \"vmss_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmss_name\"\ - ,\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\"\ - : \"eastus\",\r\n \"sku\": {\r\n \"name\": \"Standard_D1_v2\",\r\n \ - \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\"\ - : {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n\ - \ \"mode\": \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\ - \n \"osProfile\": {\r\n \"computerNamePrefix\": \"testPC\",\r\n\ - \ \"adminUsername\": \"testuser\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": false,\r\n \"\ - provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \ - \ \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\"\ - : true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\ - \n \"createOption\": \"FromImage\",\r\n \"caching\": \"\ - ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\"\ - : \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 512\r\n \ - \ },\r\n \"imageReference\": {\r\n \"publisher\": \"\ - Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\"\ - : \"18.04-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n \ - \ },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"\ - name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\"\ - :false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"\ - ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - },\"privateIPAddressVersion\":\"IPv4\"}}]}}]}\r\n },\r\n \"provisioningState\"\ - : \"Creating\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\"\ - : false,\r\n \"uniqueId\": \"d5ca337d-36f7-4ccc-bbf1-f78d0d9798df\"\r\n\ - \ }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/64b72848-6b3c-4092-a655-b016e5b079db?api-version=2019-07-01 - cache-control: - - no-cache - content-length: - - '2069' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:21:01 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/CreateVMScaleSet3Min;59,Microsoft.Compute/CreateVMScaleSet30Min;299,Microsoft.Compute/VMScaleSetBatchedVMRequests5Min;1196,Microsoft.Compute/VmssQueuedVMOperations;4796 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-ms-request-charge: - - '4' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/64b72848-6b3c-4092-a655-b016e5b079db?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-09-16T03:20:59.8077948+00:00\",\r\n \"\ - status\": \"InProgress\",\r\n \"name\": \"64b72848-6b3c-4092-a655-b016e5b079db\"\ - \r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:21:13 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14999,Microsoft.Compute/GetOperation30Min;29999 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/64b72848-6b3c-4092-a655-b016e5b079db?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-09-16T03:20:59.8077948+00:00\",\r\n \"\ - endTime\": \"2020-09-16T03:21:54.9175421+00:00\",\r\n \"status\": \"Succeeded\"\ - ,\r\n \"name\": \"64b72848-6b3c-4092-a655-b016e5b079db\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:22:14 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14997,Microsoft.Compute/GetOperation30Min;29997 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmss_name?api-version=2019-07-01 - response: - body: - string: "{\r\n \"name\": \"vmss_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmss_name\"\ - ,\r\n \"type\": \"Microsoft.Compute/virtualMachineScaleSets\",\r\n \"location\"\ - : \"eastus\",\r\n \"sku\": {\r\n \"name\": \"Standard_D1_v2\",\r\n \ - \ \"tier\": \"Standard\",\r\n \"capacity\": 2\r\n },\r\n \"properties\"\ - : {\r\n \"singlePlacementGroup\": true,\r\n \"upgradePolicy\": {\r\n\ - \ \"mode\": \"Manual\"\r\n },\r\n \"virtualMachineProfile\": {\r\ - \n \"osProfile\": {\r\n \"computerNamePrefix\": \"testPC\",\r\n\ - \ \"adminUsername\": \"testuser\",\r\n \"linuxConfiguration\"\ - : {\r\n \"disablePasswordAuthentication\": false,\r\n \"\ - provisionVMAgent\": true\r\n },\r\n \"secrets\": [],\r\n \ - \ \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\"\ - : true\r\n },\r\n \"storageProfile\": {\r\n \"osDisk\": {\r\ - \n \"createOption\": \"FromImage\",\r\n \"caching\": \"\ - ReadWrite\",\r\n \"managedDisk\": {\r\n \"storageAccountType\"\ - : \"Standard_LRS\"\r\n },\r\n \"diskSizeGB\": 512\r\n \ - \ },\r\n \"imageReference\": {\r\n \"publisher\": \"\ - Canonical\",\r\n \"offer\": \"UbuntuServer\",\r\n \"sku\"\ - : \"18.04-LTS\",\r\n \"version\": \"latest\"\r\n }\r\n \ - \ },\r\n \"networkProfile\": {\"networkInterfaceConfigurations\":[{\"\ - name\":\"testPC\",\"properties\":{\"primary\":true,\"enableAcceleratedNetworking\"\ - :false,\"dnsSettings\":{\"dnsServers\":[]},\"enableIPForwarding\":false,\"\ - ipConfigurations\":[{\"name\":\"testPC\",\"properties\":{\"subnet\":{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - },\"privateIPAddressVersion\":\"IPv4\"}}]}}]}\r\n },\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"overprovision\": true,\r\n \"doNotRunExtensionsOnOverprovisionedVMs\"\ - : false,\r\n \"uniqueId\": \"d5ca337d-36f7-4ccc-bbf1-f78d0d9798df\"\r\n\ - \ }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '2070' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:22:15 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetVMScaleSet3Min;396,Microsoft.Compute/GetVMScaleSet30Min;2596 - status: - code: 200 - message: OK -- request: - body: 'b''b\''{"location": "West US", "properties": {"profiles": [{"name": "adios", - "capacity": {"minimum": "1", "maximum": "10", "default": "1"}, "rules": []}], - "notifications": [{"operation": "Scale", "email": {"sendToSubscriptionAdministrator": - true, "sendToSubscriptionCoAdministrators": true, "customEmails": ["gu@ms.com", - "ge@ns.net"]}, "webhooks": []}], "enabled": true, "targetResourceUri": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmss_name"}}\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '593' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.insights/autoscalesettings/autoscalesetting?api-version=2015-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/autoscalesettings/autoscalesetting","name":"autoscalesetting","type":"Microsoft.Insights/autoscaleSettings","location":"West - US","tags":{},"properties":{"profiles":[{"name":"adios","capacity":{"minimum":"1","maximum":"10","default":"1"},"rules":[]}],"enabled":true,"name":"autoscalesetting","targetResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmss_name","notifications":[{"operation":"Scale","email":{"sendToSubscriptionAdministrator":true,"sendToSubscriptionCoAdministrators":true,"customEmails":["gu@ms.com","ge@ns.net"]},"webhooks":[]}]}}' - headers: - cache-control: - - no-cache - content-length: - - '884' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:22:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.insights/autoscalesettings/autoscalesetting?api-version=2015-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/autoscalesettings/autoscalesetting","name":"autoscalesetting","type":"Microsoft.Insights/autoscaleSettings","location":"West - US","tags":{},"properties":{"profiles":[{"name":"adios","capacity":{"minimum":"1","maximum":"10","default":"1"},"rules":[]}],"enabled":true,"name":"autoscalesetting","targetResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmss_name","notifications":[{"operation":"Scale","email":{"sendToSubscriptionAdministrator":true,"sendToSubscriptionCoAdministrators":true,"customEmails":["gu@ms.com","ge@ns.net"]},"webhooks":[]}]}}' - headers: - cache-control: - - no-cache - content-length: - - '884' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:22:26 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: 'b''b\''{"properties": {"profiles": [{"name": "adios", "capacity": {"minimum": - "1", "maximum": "10", "default": "1"}, "rules": []}], "notifications": [{"operation": - "Scale", "email": {"sendToSubscriptionAdministrator": true, "sendToSubscriptionCoAdministrators": - true, "customEmails": ["gu@ms.com", "ge@ns.net"]}, "webhooks": []}], "enabled": - true, "targetResourceUri": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmss_name"}}\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '570' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.insights/autoscalesettings/autoscalesetting?api-version=2015-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/autoscalesettings/autoscalesetting","name":"autoscalesetting","type":"Microsoft.Insights/autoscaleSettings","location":"West - US","tags":{},"properties":{"profiles":[{"name":"adios","capacity":{"minimum":"1","maximum":"10","default":"1"},"rules":[]}],"enabled":true,"name":"autoscalesetting","targetResourceUri":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachineScaleSets/vmss_name","notifications":[{"operation":"Scale","email":{"sendToSubscriptionAdministrator":true,"sendToSubscriptionCoAdministrators":true,"customEmails":["gu@ms.com","ge@ns.net"]},"webhooks":[]}]}}' - headers: - cache-control: - - no-cache - content-length: - - '884' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:22:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.insights/autoscalesettings/autoscalesetting?api-version=2015-04-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 16 Sep 2020 03:22:31 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_log_profiles.yaml b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_log_profiles.yaml index 16b646ca76f6..445da0cf9d39 100644 --- a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_log_profiles.yaml +++ b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_log_profiles.yaml @@ -13,12 +13,12 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storage/5.0.0 Azure-SDK-For-Python + - python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.2 azure-mgmt-storage/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx430e1025?api-version=2019-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountb430e1025?api-version=2019-04-01 response: body: string: '' @@ -30,11 +30,11 @@ interactions: content-type: - text/plain; charset=utf-8 date: - - Wed, 16 Sep 2020 03:22:54 GMT + - Fri, 05 Nov 2021 06:02:19 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/e60f99d2-b390-401c-bb67-9a086cbef957?monitor=true&api-version=2019-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/6462b530-02b4-4729-822c-2852e3b63977?monitor=true&api-version=2019-04-01 pragma: - no-cache server: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1197' status: code: 202 message: Accepted @@ -58,22 +58,22 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storage/5.0.0 Azure-SDK-For-Python + - python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.2 azure-mgmt-storage/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/e60f99d2-b390-401c-bb67-9a086cbef957?monitor=true&api-version=2019-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/6462b530-02b4-4729-822c-2852e3b63977?monitor=true&api-version=2019-04-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx430e1025","name":"storageaccountx430e1025","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2020-09-16T03:22:55.1085297Z"},"blob":{"enabled":true,"lastEnabledTime":"2020-09-16T03:22:55.1085297Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-09-16T03:22:55.0147927Z","primaryEndpoints":{"blob":"https://storageaccountx430e1025.blob.core.windows.net/","queue":"https://storageaccountx430e1025.queue.core.windows.net/","table":"https://storageaccountx430e1025.table.core.windows.net/","file":"https://storageaccountx430e1025.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available"}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountb430e1025","name":"storageaccountb430e1025","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2021-11-05T06:02:17.6241132Z"},"blob":{"enabled":true,"lastEnabledTime":"2021-11-05T06:02:17.6241132Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2021-11-05T06:02:17.4991039Z","primaryEndpoints":{"blob":"https://storageaccountb430e1025.blob.core.windows.net/","queue":"https://storageaccountb430e1025.queue.core.windows.net/","table":"https://storageaccountb430e1025.table.core.windows.net/","file":"https://storageaccountb430e1025.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available"}}' headers: cache-control: - no-cache content-length: - - '1162' + - '1167' content-type: - application/json date: - - Wed, 16 Sep 2020 03:23:12 GMT + - Fri, 05 Nov 2021 06:02:37 GMT expires: - '-1' pragma: @@ -92,9 +92,9 @@ interactions: code: 200 message: OK - request: - body: 'b''b\''{"location": "", "properties": {"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx430e1025", + body: '{"location": "", "properties": {"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountb430e1025", "locations": ["global"], "categories": ["Write", "Delete", "Action"], "retentionPolicy": - {"enabled": true, "days": 3}}}\''''' + {"enabled": true, "days": 3}}}' headers: Accept: - application/json @@ -103,25 +103,26 @@ interactions: Connection: - keep-alive Content-Length: - - '385' + - '390' Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/logprofiles/logprofilex430e1025?api-version=2016-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Insights/logprofiles/logprofilex430e1025?api-version=2016-03-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/logprofiles/logprofilex430e1025","type":null,"name":"logprofilex430e1025","location":"","kind":null,"tags":null,"properties":{"storageAccountId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx430e1025","serviceBusRuleId":null,"locations":["global"],"categories":["Write","Delete","Action"],"retentionPolicy":{"enabled":true,"days":3}},"identity":null}' + string: '{"code":"Conflict","message":"The limit of 1 log profiles was reached. + To create new log profile ''logprofilex430e1025'', delete an existing one."}' headers: cache-control: - no-cache content-length: - - '595' + - '145' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:23:16 GMT + - Fri, 05 Nov 2021 06:02:42 GMT expires: - '-1' pragma: @@ -130,97 +131,11 @@ interactions: - Microsoft-IIS/10.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/logprofiles/logprofilex430e1025?api-version=2016-03-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/logprofiles/logprofilex430e1025","type":null,"name":"logprofilex430e1025","location":null,"kind":null,"tags":null,"properties":{"storageAccountId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx430e1025","serviceBusRuleId":null,"locations":["global"],"categories":["Write","Delete","Action"],"retentionPolicy":{"enabled":true,"days":3}},"identity":null}' - headers: - cache-control: - - no-cache - content-length: - - '597' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:23:46 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.insights/logprofiles/logprofilex430e1025?api-version=2016-03-01 - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 16 Sep 2020 03:23:47 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '1197' status: - code: 200 - message: OK + code: 409 + message: Conflict version: 1 diff --git a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_metric_alerts.yaml b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_metric_alerts.yaml deleted file mode 100644 index cad2949acb8f..000000000000 --- a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_metric_alerts.yaml +++ /dev/null @@ -1,2471 +0,0 @@ -interactions: -- request: - body: '{"location": "eastus", "properties": {"addressSpace": {"addressPrefixes": - ["10.0.0.0/16"]}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '92' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"networkxx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx\"\ - ,\r\n \"etag\": \"W/\\\"c8ff383c-3f95-4bc7-b5d9-458332db7a4f\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"d2c35ae1-0bfc-49b1-b026-f7148752aac7\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ - : false\r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/fa6ad004-dd99-4b06-8089-c6d58d8e7fca?api-version=2019-09-01 - cache-control: - - no-cache - content-length: - - '705' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:24:10 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 2dcb5c94-41f9-4051-99ff-276dfa59bd36 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/fa6ad004-dd99-4b06-8089-c6d58d8e7fca?api-version=2019-09-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:24:16 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 0b1542a2-d22d-4f05-a406-3a9c7252ff9f - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"networkxx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx\"\ - ,\r\n \"etag\": \"W/\\\"115625bd-a3ae-4895-a523-a66ca0d618d7\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"d2c35ae1-0bfc-49b1-b026-f7148752aac7\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false,\r\n \"enableVmProtection\"\ - : false\r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '706' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:24:16 GMT - etag: - - W/"115625bd-a3ae-4895-a523-a66ca0d618d7" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d843fe92-06e0-430a-850c-a48822befa5f - status: - code: 200 - message: OK -- request: - body: '{"properties": {"addressPrefix": "10.0.0.0/24"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '48' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"subnetx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - ,\r\n \"etag\": \"W/\\\"b62d5877-784c-4917-9ea2-87b8cf908884\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" - headers: - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/be8c9bc9-186d-414f-af83-07c8525463f4?api-version=2019-09-01 - cache-control: - - no-cache - content-length: - - '589' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:24:17 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 2fe2422e-944a-449a-9344-e1780bd2cc95 - x-ms-ratelimit-remaining-subscription-writes: - - '1198' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/be8c9bc9-186d-414f-af83-07c8525463f4?api-version=2019-09-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:24:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e2fe370e-1a4c-43d9-b1fd-98ac76785cb4 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"subnetx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - ,\r\n \"etag\": \"W/\\\"5d9fad09-91aa-47ee-90a6-8a0d7d475967\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '590' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:24:23 GMT - etag: - - W/"5d9fad09-91aa-47ee-90a6-8a0d7d475967" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - b699a9ef-f80c-4ed1-9004-d858698aa386 - status: - code: 200 - message: OK -- request: - body: 'b''b\''{"location": "eastus", "properties": {"ipConfigurations": [{"properties": - {"subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx"}}, - "name": "MyIpConfig"}]}}\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '334' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"interfacexx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx\"\ - ,\r\n \"etag\": \"W/\\\"74e4251a-1c2e-4cb4-852b-e22d6bc29b51\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"85c192a0-55e4-4f1e-ac93-5e0f869d3042\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx/ipConfigurations/MyIpConfig\"\ - ,\r\n \"etag\": \"W/\\\"74e4251a-1c2e-4cb4-852b-e22d6bc29b51\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"2fnmhux2boyutmbg42kiouvkyh.bx.internal.cloudapp.net\"\ - \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\"\ - : false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0f332d83-0e98-4662-b2bd-41f69b6b6619?api-version=2019-09-01 - cache-control: - - no-cache - content-length: - - '1795' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:24:28 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - d046b277-6e12-44c5-87e7-e02b48a6bf50 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0f332d83-0e98-4662-b2bd-41f69b6b6619?api-version=2019-09-01 - response: - body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '29' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:24:59 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - e30d4874-db84-4309-a098-aeea11cbecdf - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-network/7.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx?api-version=2019-09-01 - response: - body: - string: "{\r\n \"name\": \"interfacexx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx\"\ - ,\r\n \"etag\": \"W/\\\"74e4251a-1c2e-4cb4-852b-e22d6bc29b51\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"85c192a0-55e4-4f1e-ac93-5e0f869d3042\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"MyIpConfig\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx/ipConfigurations/MyIpConfig\"\ - ,\r\n \"etag\": \"W/\\\"74e4251a-1c2e-4cb4-852b-e22d6bc29b51\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/networkxx/subnets/subnetx\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"2fnmhux2boyutmbg42kiouvkyh.bx.internal.cloudapp.net\"\ - \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"enableIPForwarding\"\ - : false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1795' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:25:00 GMT - etag: - - W/"74e4251a-1c2e-4cb4-852b-e22d6bc29b51" - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - add0089e-ea1a-41cd-8d7b-4cc8568e451f - status: - code: 200 - message: OK -- request: - body: 'b''b\''{"location": "eastus", "properties": {"hardwareProfile": {"vmSize": - "Standard_D2_v2"}, "storageProfile": {"imageReference": {"publisher": "MicrosoftWindowsServer", - "offer": "WindowsServer", "sku": "2016-Datacenter", "version": "latest"}, "osDisk": - {"name": "myVMosdisk", "caching": "ReadWrite", "createOption": "FromImage", - "managedDisk": {"storageAccountType": "Standard_LRS"}}, "dataDisks": [{"lun": - 0, "createOption": "Empty", "diskSizeGB": 1023}, {"lun": 1, "createOption": - "Empty", "diskSizeGB": 1023}]}, "osProfile": {"computerName": "myVM", "adminUsername": - "testuser", "adminPassword": "Aa1!zyx_", "windowsConfiguration": {"enableAutomaticUpdates": - true}}, "networkProfile": {"networkInterfaces": [{"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx", - "properties": {"primary": true}}]}}}\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '953' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name?api-version=2019-07-01 - response: - body: - string: "{\r\n \"name\": \"vm_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name\"\ - ,\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"vmId\": \"3f145f13-f7ad-43e0-a499-37a258b865a7\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n\ - \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"\ - WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\"\ - : \"latest\",\r\n \"exactVersion\": \"14393.3930.2009041537\"\r\n \ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \ - \ \"name\": \"myVMosdisk\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \ - \ \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\": [\r\n \ - \ {\r\n \"lun\": 0,\r\n \"createOption\": \"Empty\",\r\n\ - \ \"caching\": \"None\",\r\n \"managedDisk\": {\r\n \ - \ \"storageAccountType\": \"Standard_LRS\"\r\n },\r\n \ - \ \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n \ - \ },\r\n {\r\n \"lun\": 1,\r\n \"createOption\"\ - : \"Empty\",\r\n \"caching\": \"None\",\r\n \"managedDisk\"\ - : {\r\n \"storageAccountType\": \"Standard_LRS\"\r\n },\r\ - \n \"diskSizeGB\": 1023,\r\n \"toBeDetached\": false\r\n\ - \ }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \"computerName\"\ - : \"myVM\",\r\n \"adminUsername\": \"testuser\",\r\n \"windowsConfiguration\"\ - : {\r\n \"provisionVMAgent\": true,\r\n \"enableAutomaticUpdates\"\ - : true\r\n },\r\n \"secrets\": [],\r\n \"allowExtensionOperations\"\ - : true,\r\n \"requireGuestProvisionSignal\": true\r\n },\r\n \"\ - networkProfile\": {\"networkInterfaces\":[{\"id\":\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx\"\ - ,\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Creating\"\ - \r\n }\r\n}" - headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/81f9ee6f-1e7f-4970-9565-33f9978ca670?api-version=2019-07-01 - cache-control: - - no-cache - content-length: - - '2198' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:25:09 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/PutVM3Min;239,Microsoft.Compute/PutVM30Min;1199 - x-ms-ratelimit-remaining-subscription-writes: - - '1199' - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/81f9ee6f-1e7f-4970-9565-33f9978ca670?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-09-16T03:25:08.9656355+00:00\",\r\n \"\ - status\": \"InProgress\",\r\n \"name\": \"81f9ee6f-1e7f-4970-9565-33f9978ca670\"\ - \r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:25:22 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29993 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/81f9ee6f-1e7f-4970-9565-33f9978ca670?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-09-16T03:25:08.9656355+00:00\",\r\n \"\ - status\": \"InProgress\",\r\n \"name\": \"81f9ee6f-1e7f-4970-9565-33f9978ca670\"\ - \r\n}" - headers: - cache-control: - - no-cache - content-length: - - '134' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:26:12 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14996,Microsoft.Compute/GetOperation30Min;29991 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Compute/locations/eastus/operations/81f9ee6f-1e7f-4970-9565-33f9978ca670?api-version=2019-07-01 - response: - body: - string: "{\r\n \"startTime\": \"2020-09-16T03:25:08.9656355+00:00\",\r\n \"\ - endTime\": \"2020-09-16T03:26:25.0440116+00:00\",\r\n \"status\": \"Succeeded\"\ - ,\r\n \"name\": \"81f9ee6f-1e7f-4970-9565-33f9978ca670\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '184' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:26:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/GetOperation3Min;14994,Microsoft.Compute/GetOperation30Min;29989 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-compute/10.0.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name?api-version=2019-07-01 - response: - body: - string: "{\r\n \"name\": \"vm_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name\"\ - ,\r\n \"type\": \"Microsoft.Compute/virtualMachines\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"vmId\": \"3f145f13-f7ad-43e0-a499-37a258b865a7\"\ - ,\r\n \"hardwareProfile\": {\r\n \"vmSize\": \"Standard_D2_v2\"\r\n\ - \ },\r\n \"storageProfile\": {\r\n \"imageReference\": {\r\n \ - \ \"publisher\": \"MicrosoftWindowsServer\",\r\n \"offer\": \"\ - WindowsServer\",\r\n \"sku\": \"2016-Datacenter\",\r\n \"version\"\ - : \"latest\",\r\n \"exactVersion\": \"14393.3930.2009041537\"\r\n \ - \ },\r\n \"osDisk\": {\r\n \"osType\": \"Windows\",\r\n \ - \ \"name\": \"myVMosdisk\",\r\n \"createOption\": \"FromImage\"\ - ,\r\n \"caching\": \"ReadWrite\",\r\n \"managedDisk\": {\r\n\ - \ \"storageAccountType\": \"Standard_LRS\",\r\n \"id\":\ - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/T3YSTF6ZWQW5NJU6RGJD6JDB43ZG4R5DPXWT423BKGVAFUJ5BHL4FFN2F67NJYLISNRT3LFORAE/providers/Microsoft.Compute/disks/myVMosdisk\"\ - \r\n },\r\n \"diskSizeGB\": 127\r\n },\r\n \"dataDisks\"\ - : [\r\n {\r\n \"lun\": 0,\r\n \"name\": \"vm_name_disk2_7453cbbaab4a4fcf88f83430dcb7d429\"\ - ,\r\n \"createOption\": \"Empty\",\r\n \"caching\": \"None\"\ - ,\r\n \"managedDisk\": {\r\n \"storageAccountType\": \"\ - Standard_LRS\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/T3YSTF6ZWQW5NJU6RGJD6JDB43ZG4R5DPXWT423BKGVAFUJ5BHL4FFN2F67NJYLISNRT3LFORAE/providers/Microsoft.Compute/disks/vm_name_disk2_7453cbbaab4a4fcf88f83430dcb7d429\"\ - \r\n },\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\"\ - : false\r\n },\r\n {\r\n \"lun\": 1,\r\n \"\ - name\": \"vm_name_disk3_dd107b82c8bd4708839b16a71e3e52a3\",\r\n \"\ - createOption\": \"Empty\",\r\n \"caching\": \"None\",\r\n \ - \ \"managedDisk\": {\r\n \"storageAccountType\": \"Standard_LRS\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/T3YSTF6ZWQW5NJU6RGJD6JDB43ZG4R5DPXWT423BKGVAFUJ5BHL4FFN2F67NJYLISNRT3LFORAE/providers/Microsoft.Compute/disks/vm_name_disk3_dd107b82c8bd4708839b16a71e3e52a3\"\ - \r\n },\r\n \"diskSizeGB\": 1023,\r\n \"toBeDetached\"\ - : false\r\n }\r\n ]\r\n },\r\n \"osProfile\": {\r\n \ - \ \"computerName\": \"myVM\",\r\n \"adminUsername\": \"testuser\",\r\ - \n \"windowsConfiguration\": {\r\n \"provisionVMAgent\": true,\r\ - \n \"enableAutomaticUpdates\": true\r\n },\r\n \"secrets\"\ - : [],\r\n \"allowExtensionOperations\": true,\r\n \"requireGuestProvisionSignal\"\ - : true\r\n },\r\n \"networkProfile\": {\"networkInterfaces\":[{\"id\"\ - :\"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/interfacexx\"\ - ,\"properties\":{\"primary\":true}}]},\r\n \"provisioningState\": \"Succeeded\"\ - \r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '3037' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:26:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-resource: - - Microsoft.Compute/LowCostGet3Min;3997,Microsoft.Compute/LowCostGet30Min;31997 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/providers/microsoft.insights/operations?api-version=2015-04-01 - response: - body: - string: '{"value":[{"name":"Microsoft.Insights/Operations/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Operations","operation":"Read operations","description":"Read - operations"},"properties":{}},{"name":"Microsoft.Insights/Metrics/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Action","operation":"Metric Action","description":"Metric - Action"},"properties":{}},{"name":"Microsoft.Insights/MetricDefinitions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Definitions","operation":"Read metric definitions","description":"Read - metric definitions"},"properties":{}},{"name":"Microsoft.Insights/MetricDefinitions/Microsoft.Insights/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Definitions","operation":"Read metric definitions","description":"Read - metric definitions"},"properties":{}},{"name":"Microsoft.Insights/MetricDefinitions/providers/Microsoft.Insights/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Definitions","operation":"Read metric definitions","description":"Read - metric definitions"},"properties":{}},{"name":"Microsoft.Insights/Metrics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metrics","operation":"Read metrics","description":"Read - metrics"},"properties":{}},{"name":"Microsoft.Insights/Metricnamespaces/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric namespaces","operation":"Metric namespaces - read","description":"Read metric namespaces"},"properties":{}},{"name":"Microsoft.Insights/Metrics/Write","isDataAction":true,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metrics","operation":"Write metrics","description":"Write - metrics"},"properties":{}},{"name":"Microsoft.Insights/Metrics/providers/Metrics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metrics","operation":"Read metrics","description":"Read - metrics"},"properties":{}},{"name":"Microsoft.Insights/Metrics/Microsoft.Insights/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metrics","operation":"Read metrics","description":"Read - metrics"},"properties":{}},{"name":"Microsoft.Insights/AlertRules/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Classic Metric Alerts","operation":"Create or update - classic metric alert","description":"Create or update a classic metric alert"},"properties":{}},{"name":"Microsoft.Insights/AlertRules/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Classic Metric Alerts","operation":"Delete classic - metric alert","description":"Delete a classic metric alert"},"properties":{}},{"name":"Microsoft.Insights/AlertRules/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Classic Metric Alerts","operation":"Read classic - metric alert","description":"Read a classic metric alert"},"properties":{}},{"name":"Microsoft.Insights/MetricAlerts/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Alerts","operation":"Create or update metric - alert","description":"Create or update a metric alert"},"properties":{}},{"name":"Microsoft.Insights/MetricAlerts/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Alerts","operation":"Delete metric alert","description":"Delete - a metric alert"},"properties":{}},{"name":"Microsoft.Insights/MetricAlerts/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Alerts","operation":"Read metric alert","description":"Read - a metric alert"},"properties":{}},{"name":"Microsoft.Insights/MetricAlerts/Status/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Alerts","operation":"Read metric alert status","description":"Read - metric alert status"},"properties":{}},{"name":"Microsoft.Insights/AutoscaleSettings/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Autoscale Setting","operation":"Create or update - autoscale setting","description":"Create or update an autoscale setting"},"properties":{}},{"name":"Microsoft.Insights/AutoscaleSettings/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Autoscale Setting","operation":"Delete autoscale - setting","description":"Delete an autoscale setting"},"properties":{}},{"name":"Microsoft.Insights/AutoscaleSettings/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Autoscale Setting","operation":"Read autoscale - setting","description":"Read an autoscale setting"},"properties":{}},{"name":"Microsoft.Insights/AlertRules/Incidents/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Alert Rule Incident resource","operation":"Read - classic metric alert incidents","description":"Read a classic metric alert - incident"},"properties":{}},{"name":"Microsoft.Insights/AutoscaleSettings/providers/Microsoft.Insights/MetricDefinitions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Definitions","operation":"Read metric definitions","description":"Read - metric definitions"},"properties":{"serviceSpecification":{"metricSpecifications":[{"name":"ObservedMetricValue","displayName":"Observed - Metric Value","internalMetricName":null,"displayDescription":"The value computed - by autoscale when executed","unit":"Count","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":null,"dimensions":[{"name":"MetricTriggerSource","displayName":"Metric - Trigger Source","toBeExportedForShoebox":true,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":null,"lockAggregationType":null},{"name":"MetricThreshold","displayName":"Metric - Threshold","internalMetricName":null,"displayDescription":"The configured - autoscale threshold when autoscale ran.","unit":"Count","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":null,"dimensions":[{"name":"MetricTriggerRule","displayName":"Metric - Trigger Rule","toBeExportedForShoebox":true,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":null,"lockAggregationType":null},{"name":"ObservedCapacity","displayName":"Observed - Capacity","internalMetricName":null,"displayDescription":"The capacity reported - to autoscale when it executed.","unit":"Count","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":null,"dimensions":null,"supportedAggregationTypes":null,"lockAggregationType":null},{"name":"ScaleActionsInitiated","displayName":"Scale - Actions Initiated","internalMetricName":null,"displayDescription":"The direction - of the scale operation.","unit":"Count","aggregationType":"Total","availabilities":null,"fillGapWithZero":true,"category":null,"dimensions":[{"name":"ScaleDirection","displayName":"Scale - Direction","toBeExportedForShoebox":true,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":null,"lockAggregationType":null}],"logSpecifications":null,"legacyMetricSpecifications":null}}},{"name":"Microsoft.Insights/AutoscaleSettings/providers/Microsoft.Insights/logDefinitions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Log Definitions","operation":"Log Definitions read","description":"Read - log definitions"},"properties":{"serviceSpecification":{"metricSpecifications":null,"logSpecifications":[{"name":"AutoscaleEvaluations","displayName":"Autoscale - Evaluations","blobDuration":"PT1H"},{"name":"AutoscaleScaleActions","displayName":"Autoscale - Scale Actions","blobDuration":"PT1H"}],"legacyMetricSpecifications":null}}},{"name":"Microsoft.Insights/AutoscaleSettings/providers/Microsoft.Insights/diagnosticSettings/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Resource diagnostic settings","operation":"Read - resource diagnostic setting","description":"Read a resource diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/AutoscaleSettings/providers/Microsoft.Insights/diagnosticSettings/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Resource diagnostic settings","operation":"Create - or update resource diagnostic setting","description":"Create or update a resource - diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/ActionGroups/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Action Groups","operation":"Create or update action - group","description":"Create or update an action group"},"properties":{}},{"name":"Microsoft.Insights/ActionGroups/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Action Groups","operation":"Delete action group","description":"Delete - an action group"},"properties":{}},{"name":"Microsoft.Insights/ActionGroups/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Action Groups","operation":"Read action group","description":"Read - an action group"},"properties":{}},{"name":"Microsoft.Insights/ActivityLogAlerts/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Activity Log Alert","operation":"Create or update - activity log alert","description":"Create or update an activity log alert"},"properties":{}},{"name":"Microsoft.Insights/ActivityLogAlerts/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Activity Log Alert","operation":"Delete activity - log alert","description":"Delete an activity log alert"},"properties":{}},{"name":"Microsoft.Insights/ActivityLogAlerts/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Activity Log Alert","operation":"Read activity - log alert","description":"Read an activity log alert"},"properties":{}},{"name":"Microsoft.Insights/ActivityLogAlerts/Activated/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Activity Log Alert","operation":"Activity Log Alert - activated","description":"Activity Log Alert activated"},"properties":{}},{"name":"Microsoft.Insights/Workbooks/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Workbooks","operation":"Create or update workbook","description":"Create - or update a workbook"},"properties":{}},{"name":"Microsoft.Insights/Workbooks/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Workbooks","operation":"Delete workbook","description":"Delete - a workbook"},"properties":{}},{"name":"Microsoft.Insights/Workbooks/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Workbooks","operation":"Read workbook","description":"Read - a workbook"},"properties":{}},{"name":"Microsoft.Insights/myWorkbooks/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MyWorkbooks","operation":"Create or update myWorkbook","description":"Create - or update a private Workbook"},"properties":{}},{"name":"Microsoft.Insights/myWorkbooks/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MyWorkbooks","operation":"Read myWorkbook","description":"Read - a private Workbook"},"properties":{}},{"name":"Microsoft.Insights/EventCategories/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Activity Log event category","operation":"Read - Activity Log event categories","description":"Read available Activity Log - event categories"},"properties":{}},{"name":"Microsoft.Insights/eventtypes/values/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Activity Log Events","operation":"Read Activity - Log","description":"Read Activity Log events"},"properties":{}},{"name":"Microsoft.Insights/eventtypes/digestevents/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Digest events","operation":"Event types management - digest read","description":"Read management event type digest"},"properties":{}},{"name":"Microsoft.Insights/DiagnosticSettings/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Resource diagnostic settings","operation":"Create - or update resource diagnostic setting","description":"Create or update a resource - diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/DiagnosticSettingsCategories/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Diagnostic settings categories resource","operation":"Read - diagnostic settings categories","description":"Read diagnostic settings categories"},"properties":{}},{"name":"Microsoft.Insights/DiagnosticSettings/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Resource diagnostic settings","operation":"Delete - resource diagnostic setting","description":"Delete a resource diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/DiagnosticSettings/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Resource diagnostic settings","operation":"Read - resource diagnostic setting","description":"Read a resource diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/ExtendedDiagnosticSettings/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Network flow log diagnostic setting","operation":"Create - or update network flow log diagnostic setting","description":"Create or update - a network flow log diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/ExtendedDiagnosticSettings/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Network flow log diagnostic setting","operation":"Delete - network flow log diagnostic setting","description":"Delete a network flow - log diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/ExtendedDiagnosticSettings/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Network flow log diagnostic setting","operation":"Read - network flow log diagnostic setting","description":"Read a network flow log - diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/LogProfiles/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Log Profiles","operation":"Create or update Activity - Log log profile","description":"Create or update an Activity Log log profile"},"properties":{}},{"name":"Microsoft.Insights/LogProfiles/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Log Profiles","operation":"Delete Activity Log - log profile","description":"Delete an Activity Log log profile"},"properties":{}},{"name":"Microsoft.Insights/LogProfiles/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Log Profiles","operation":"Read Activity Log log - profile","description":"Read an Activity Log log profile"},"properties":{}},{"name":"Microsoft.Insights/LogDefinitions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Log Definitions","operation":"Log Definitions read","description":"Read - log definitions"},"properties":{}},{"name":"Microsoft.Insights/AutoscaleSettings/Scaleup/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Autoscale Setting","operation":"Autoscale scale - up initiated","description":"Autoscale scale up initiated"},"properties":{}},{"name":"Microsoft.Insights/AutoscaleSettings/Scaledown/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Autoscale Setting","operation":"Autoscale scale - down initiated","description":"Autoscale scale down initiated"},"properties":{}},{"name":"Microsoft.Insights/AutoscaleSettings/ScaleupResult/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Autoscale Setting","operation":"Autoscale scale - up completed","description":"Autoscale scale up completed"},"properties":{}},{"name":"Microsoft.Insights/AutoscaleSettings/ScaledownResult/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Autoscale Setting","operation":"Autoscale scale - down completed","description":"Autoscale scale down completed"},"properties":{}},{"name":"Microsoft.Insights/AlertRules/Activated/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Classic Metric Alerts","operation":"Classic metric - alert activated","description":"Classic metric alert activated"},"properties":{}},{"name":"Microsoft.Insights/AlertRules/Resolved/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Classic Metric Alerts","operation":"Classic metric - alert resolved","description":"Classic metric alert resolved"},"properties":{}},{"name":"Microsoft.Insights/AlertRules/Throttled/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Classic Metric Alerts","operation":"Classic metric - alert rule throttled","description":"Classic metric alert rule throttled"},"properties":{}},{"name":"Microsoft.Insights/Register/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Microsoft.Insights","operation":"Register Microsoft.Insights","description":"Register - the Microsoft Insights provider"},"properties":{}},{"name":"Microsoft.Insights/Unregister/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Microsoft.Insights","operation":"Register Microsoft.Insights","description":"Register - the Microsoft Insights provider"},"properties":{}},{"name":"Microsoft.Insights/Tenants/Register/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Microsoft.Insights","operation":"Initialize Microsoft.Insights","description":"Initializes - the Microsoft Insights provider"},"properties":{}},{"name":"Microsoft.Insights/Components/AnalyticsItems/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics item","operation":"Application - Insights analytics item delete","description":"Deleting an Application Insights - analytics item"},"properties":{}},{"name":"Microsoft.Insights/Components/AnalyticsItems/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics item","operation":"Application - Insights analytics item read","description":"Reading an Application Insights - analytics item"},"properties":{}},{"name":"Microsoft.Insights/Components/AnalyticsItems/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics item","operation":"Application - Insights analytics item write","description":"Writing an Application Insights - analytics item"},"properties":{}},{"name":"Microsoft.Insights/Components/MyAnalyticsItems/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics item","operation":"Application - Insights personal analytics item delete","description":"Deleting an Application - Insights personal analytics item"},"properties":{}},{"name":"Microsoft.Insights/Components/MyAnalyticsItems/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics item","operation":"Application - Insights personal analytics item write","description":"Writing an Application - Insights personal analytics item"},"properties":{}},{"name":"Microsoft.Insights/Components/MyAnalyticsItems/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics item","operation":"Application - Insights personal analytics item read","description":"Reading an Application - Insights personal analytics item"},"properties":{}},{"name":"Microsoft.Insights/Components/AnalyticsTables/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics table","operation":"Application - Insights analytics table action","description":"Application Insights analytics - table action"},"properties":{}},{"name":"Microsoft.Insights/Components/AnalyticsTables/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics table","operation":"Application - Insights analytics table delete","description":"Deleting an Application Insights - analytics table schema"},"properties":{}},{"name":"Microsoft.Insights/Components/AnalyticsTables/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics table","operation":"Application - Insights analytics table read","description":"Reading an Application Insights - analytics table schema"},"properties":{}},{"name":"Microsoft.Insights/Components/AnalyticsTables/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights analytics table","operation":"Application - Insights analytics table write","description":"Writing an Application Insights - analytics table schema"},"properties":{}},{"name":"Microsoft.Insights/Components/Annotations/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights annotations","operation":"Application - Insights annotations delete","description":"Deleting an Application Insights - annotation"},"properties":{}},{"name":"Microsoft.Insights/Components/Annotations/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights annotations","operation":"Application - Insights annotations read","description":"Reading an Application Insights - annotation"},"properties":{}},{"name":"Microsoft.Insights/Components/Annotations/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights annotations","operation":"Application - Insights annotation write","description":"Writing an Application Insights - annotation"},"properties":{}},{"name":"Microsoft.Insights/Components/ApiKeys/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights API key","operation":"Application - Insights API key delete","description":"Deleting an Application Insights API - key"},"properties":{}},{"name":"Microsoft.Insights/Components/ApiKeys/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights API key","operation":"Application - Insights API key read","description":"Reading an Application Insights API - key"},"properties":{}},{"name":"Microsoft.Insights/Components/ApiKeys/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights API key","operation":"Application - Insights API key generate","description":"Generating an Application Insights - API key"},"properties":{}},{"name":"Microsoft.Insights/Components/Purge/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights Purge","operation":"Application - Insights Purge Data action","description":"Purging data from Application Insights"},"properties":{}},{"name":"Microsoft.Insights/Components/Operations/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights Operations","operation":"Application - Insights Operations read","description":"Get status of long-running operations - in Application Insights"},"properties":{}},{"name":"Microsoft.Insights/Components/Events/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights Events","operation":"Application - Insights Events read","description":"Get logs from Application Insights using - OData query format"},"properties":{}},{"name":"Microsoft.Insights/Components/Query/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights Query","operation":"Application - Insights Query read","description":"Run queries against Application Insights - logs"},"properties":{}},{"name":"Microsoft.Insights/Components/BillingPlanForComponent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Billing plan for Application Insights component","operation":"Billing - plan for Application Insights component read","description":"Reading a billing - plan for Application Insights component"},"properties":{}},{"name":"Microsoft.Insights/Components/CurrentBillingFeatures/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Current billing features for Application Insights - component","operation":"Current billing features for Application Insights - component read","description":"Reading current billing features for Application - Insights component"},"properties":{}},{"name":"Microsoft.Insights/Components/CurrentBillingFeatures/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Current billing features for Application Insights - component","operation":"Current billing features for Application Insights - component write","description":"Writing current billing features for Application - Insights component"},"properties":{}},{"name":"Microsoft.Insights/Components/FeatureCapabilities/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component feature capabilities","operation":"Application - Insights component feature capabilities read","description":"Reading Application - Insights component feature capabilities"},"properties":{}},{"name":"Microsoft.Insights/Components/GetAvailableBillingFeatures/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component available billing - features","operation":"Application Insights component available billing features - read","description":"Reading Application Insights component available billing - features"},"properties":{}},{"name":"Microsoft.Insights/Components/PricingPlans/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component pricing plan","operation":"Application - Insights component pricing plan read","description":"Reading an Application - Insights component pricing plan"},"properties":{}},{"name":"Microsoft.Insights/Components/PricingPlans/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component pricing plan","operation":"Application - Insights component pricing plan write","description":"Writing an Application - Insights component pricing plan"},"properties":{}},{"name":"Microsoft.Insights/Components/QuotaStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component quota status","operation":"Application - Insights component quota status read","description":"Reading Application Insights - component quota status"},"properties":{}},{"name":"Microsoft.Insights/Components/DailyCapReached/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component daily cap reached","operation":"Application - Insights component daily cap reached","description":"Reached the daily cap - for Application Insights component"},"properties":{}},{"name":"Microsoft.Insights/Components/DailyCapWarningThresholdReached/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component daily cap warning - threshold reached","operation":"Application Insights component daily cap warning - threshold reached","description":"Reached the daily cap warning threshold - for Application Insights component"},"properties":{}},{"name":"Microsoft.Insights/Components/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application insights components","operation":"Application - insights component write","description":"Writing to an application insights - component configuration"},"properties":{}},{"name":"Microsoft.Insights/Components/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application insights components","operation":"Application - insights component delete","description":"Deleting an application insights - component configuration"},"properties":{}},{"name":"Microsoft.Insights/Components/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application insights components","operation":"Application - insights component read","description":"Reading an application insights component - configuration"},"properties":{}},{"name":"Microsoft.Insights/Components/Api/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component data API","operation":"Application - Insights component data API read","description":"Reading Application Insights - component data API"},"properties":{}},{"name":"Microsoft.Insights/Components/ExtendQueries/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component extended query results","operation":"Application - Insights component extended query results read","description":"Reading Application - Insights component extended query results"},"properties":{}},{"name":"Microsoft.Insights/Components/GetToken/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component token","operation":"Application - Insights component token read","description":"Reading an Application Insights - component token"},"properties":{}},{"name":"Microsoft.Insights/Components/MetricDefinitions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component metric definitions","operation":"Application - Insights component metric definitions read","description":"Reading Application - Insights component metric definitions"},"properties":{}},{"name":"Microsoft.Insights/Components/Metrics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights component metrics","operation":"Application - Insights component metrics read","description":"Reading Application Insights - component metrics"},"properties":{}},{"name":"Microsoft.Insights/Components/providers/Microsoft.Insights/logDefinitions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Log Definitions","operation":"Log Definitions read","description":"Read - log definitions"},"properties":{"serviceSpecification":{"metricSpecifications":null,"logSpecifications":[{"name":"AppAvailabilityResults","displayName":"Availability - results","blobDuration":"PT1H"},{"name":"AppBrowserTimings","displayName":"Browser - timings","blobDuration":"PT1H"},{"name":"AppEvents","displayName":"Events","blobDuration":"PT1H"},{"name":"AppMetrics","displayName":"Metrics","blobDuration":"PT1H"},{"name":"AppDependencies","displayName":"Dependencies","blobDuration":"PT1H"},{"name":"AppExceptions","displayName":"Exceptions","blobDuration":"PT1H"},{"name":"AppPageViews","displayName":"Page - views","blobDuration":"PT1H"},{"name":"AppPerformanceCounters","displayName":"Performance - counters","blobDuration":"PT1H"},{"name":"AppRequests","displayName":"Requests","blobDuration":"PT1H"},{"name":"AppSystemEvents","displayName":"System - events","blobDuration":"PT1H"},{"name":"AppTraces","displayName":"Traces","blobDuration":"PT1H"}],"legacyMetricSpecifications":null}}},{"name":"Microsoft.Insights/Components/providers/Microsoft.Insights/diagnosticSettings/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Resource diagnostic settings","operation":"Read - resource diagnostic setting","description":"Read a resource diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/Components/providers/Microsoft.Insights/diagnosticSettings/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Resource diagnostic settings","operation":"Create - or update resource diagnostic setting","description":"Create or update a resource - diagnostic setting"},"properties":{}},{"name":"Microsoft.Insights/Components/ExportConfiguration/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights export settings","operation":"Application - Insights export settings action","description":"Application Insights export - settings action"},"properties":{}},{"name":"Microsoft.Insights/Components/ExportConfiguration/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights export settings","operation":"Application - Insights export settings delete","description":"Deleting Application Insights - export settings"},"properties":{}},{"name":"Microsoft.Insights/Components/ExportConfiguration/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights export settings","operation":"Application - Insights export settings read","description":"Reading Application Insights - export settings"},"properties":{}},{"name":"Microsoft.Insights/Components/ExportConfiguration/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights export settings","operation":"Application - Insights export settings write","description":"Writing Application Insights - export settings"},"properties":{}},{"name":"Microsoft.Insights/Components/Favorites/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights favorites","operation":"Application - Insights favorites delete","description":"Deleting an Application Insights - favorite"},"properties":{}},{"name":"Microsoft.Insights/Components/Favorites/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights favorites","operation":"Application - Insights favorites read","description":"Reading an Application Insights favorite"},"properties":{}},{"name":"Microsoft.Insights/Components/Favorites/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights favorites","operation":"Application - Insights favorite write","description":"Writing an Application Insights favorite"},"properties":{}},{"name":"Microsoft.Insights/Components/MyFavorites/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights favorites","operation":"Application - Insights personal favorites read","description":"Reading an Application Insights - personal favorite"},"properties":{}},{"name":"Microsoft.Insights/Components/providers/Microsoft.Insights/MetricDefinitions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Definitions","operation":"Read metric definitions","description":"Read - metric definitions"},"properties":{"serviceSpecification":{"metricSpecifications":[{"name":"availabilityResults/availabilityPercentage","displayName":"Availability","internalMetricName":null,"displayDescription":"Percentage - of successfully completed availability tests","unit":"Percent","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Availability","dimensions":[{"name":"availabilityResult/name","displayName":"Test - name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"availabilityResult/location","displayName":"Run - location","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average"],"lockAggregationType":null},{"name":"availabilityResults/count","displayName":"Availability - tests","internalMetricName":"availabilityResults/duration","displayDescription":"Count - of availability tests","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Availability","dimensions":[{"name":"availabilityResult/name","displayName":"Test - name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"availabilityResult/location","displayName":"Run - location","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"availabilityResult/success","displayName":"Test - result","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null},{"name":"availabilityResults/duration","displayName":"Availability - test duration","internalMetricName":null,"displayDescription":"Availability - test duration","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Availability","dimensions":[{"name":"availabilityResult/name","displayName":"Test - name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"availabilityResult/location","displayName":"Run - location","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"availabilityResult/success","displayName":"Test - result","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"browserTimings/networkDuration","displayName":"Page - load network connect time","internalMetricName":null,"displayDescription":"Time - between user request and network connection. Includes DNS lookup and transport - connection.","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Browser","dimensions":null,"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"browserTimings/processingDuration","displayName":"Client - processing time","internalMetricName":null,"displayDescription":"Time between - receiving the last byte of a document until the DOM is loaded. Async requests - may still be processing.","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Browser","dimensions":null,"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"browserTimings/receiveDuration","displayName":"Receiving - response time","internalMetricName":null,"displayDescription":"Time between - the first and last bytes, or until disconnection.","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Browser","dimensions":null,"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"browserTimings/sendDuration","displayName":"Send - request time","internalMetricName":null,"displayDescription":"Time between - network connection and receiving the first byte.","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Browser","dimensions":null,"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"browserTimings/totalDuration","displayName":"Browser - page load time","internalMetricName":null,"displayDescription":"Time from - user request until DOM, stylesheets, scripts and images are loaded.","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Browser","dimensions":null,"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"dependencies/count","displayName":"Dependency - calls","internalMetricName":"dependencies/duration","displayDescription":"Count - of calls made by the application to external resources.","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Server","dimensions":[{"name":"dependency/type","displayName":"Dependency - type","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/performanceBucket","displayName":"Dependency - performance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/success","displayName":"Successful - call","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/target","displayName":"Target - of a dependency call","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/resultCode","displayName":"Result - code","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null},{"name":"dependencies/duration","displayName":"Dependency - duration","internalMetricName":null,"displayDescription":"Duration of calls - made by the application to external resources.","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Server","dimensions":[{"name":"dependency/type","displayName":"Dependency - type","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/performanceBucket","displayName":"Dependency - performance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/success","displayName":"Successful - call","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/target","displayName":"Target - of a dependency call","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/resultCode","displayName":"Result - code","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"dependencies/failed","displayName":"Dependency - call failures","internalMetricName":"dependencies/duration","displayDescription":"Count - of failed dependency calls made by the application to external resources.","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Failures","dimensions":[{"name":"dependency/type","displayName":"Dependency - type","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/performanceBucket","displayName":"Dependency - performance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/success","displayName":"Successful - call","toBeExportedForShoebox":false,"isHidden":true,"defaultDimensionValues":[{"value":"False"}]},{"name":"dependency/target","displayName":"Target - of a dependency call","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"dependency/resultCode","displayName":"Result - code","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null},{"name":"pageViews/count","displayName":"Page - views","internalMetricName":null,"displayDescription":"Count of page views.","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Usage","dimensions":[{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null},{"name":"pageViews/duration","displayName":"Page - view load time","internalMetricName":null,"displayDescription":"Page view - load time","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Usage","dimensions":[{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"performanceCounters/requestExecutionTime","displayName":"HTTP - request execution time","internalMetricName":null,"displayDescription":"Execution - time of the most recent request.","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Performance - counters","dimensions":[{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"performanceCounters/requestsInQueue","displayName":"HTTP - requests in application queue","internalMetricName":null,"displayDescription":"Length - of the application request queue.","unit":"Count","aggregationType":"Average","availabilities":null,"fillGapWithZero":true,"category":"Performance - counters","dimensions":[{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"performanceCounters/requestsPerSecond","displayName":"HTTP - request rate","internalMetricName":null,"displayDescription":"Rate of all - requests to the application per second from ASP.NET.","unit":"CountPerSecond","aggregationType":"Average","availabilities":null,"fillGapWithZero":true,"category":"Performance - counters","dimensions":[{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"performanceCounters/exceptionsPerSecond","displayName":"Exception - rate","internalMetricName":null,"displayDescription":"Count of handled and - unhandled exceptions reported to windows, including .NET exceptions and unmanaged - exceptions that are converted into .NET exceptions.","unit":"CountPerSecond","aggregationType":"Average","availabilities":null,"fillGapWithZero":true,"category":"Performance - counters","dimensions":[{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"performanceCounters/processIOBytesPerSecond","displayName":"Process - IO rate","internalMetricName":null,"displayDescription":"Total bytes per second - read and written to files, network and devices.","unit":"BytesPerSecond","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Performance - counters","dimensions":[{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"performanceCounters/processCpuPercentage","displayName":"Process - CPU","internalMetricName":null,"displayDescription":"The percentage of elapsed - time that all process threads used the processor to execute instructions. - This can vary between 0 to 100. This metric indicates the performance of w3wp - process alone.","unit":"Percent","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Performance - counters","dimensions":[{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"performanceCounters/processorCpuPercentage","displayName":"Processor - time","internalMetricName":null,"displayDescription":"The percentage of time - that the processor spends in non-idle threads.","unit":"Percent","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Performance - counters","dimensions":[{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"performanceCounters/memoryAvailableBytes","displayName":"Available - memory","internalMetricName":null,"displayDescription":"Physical memory immediately - available for allocation to a process or for system use.","unit":"Bytes","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Performance - counters","dimensions":[{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"performanceCounters/processPrivateBytes","displayName":"Process - private bytes","internalMetricName":null,"displayDescription":"Memory exclusively - assigned to the monitored application''s processes.","unit":"Bytes","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Performance - counters","dimensions":[{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"requests/duration","displayName":"Server - response time","internalMetricName":null,"displayDescription":"Time between - receiving an HTTP request and finishing sending the response.","unit":"MilliSeconds","aggregationType":"Average","availabilities":null,"fillGapWithZero":false,"category":"Server","dimensions":[{"name":"request/performanceBucket","displayName":"Request - performance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"request/resultCode","displayName":"Result - code","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"request/success","displayName":"Successful - request","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average","Maximum","Minimum"],"lockAggregationType":null},{"name":"requests/count","displayName":"Server - requests","internalMetricName":"requests/duration","displayDescription":"Count - of HTTP requests completed.","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Server","dimensions":[{"name":"request/performanceBucket","displayName":"Request - performance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"request/resultCode","displayName":"Result - code","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"request/success","displayName":"Successful - request","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null},{"name":"requests/failed","displayName":"Failed - requests","internalMetricName":"requests/duration","displayDescription":"Count - of HTTP requests marked as failed. In most cases these are requests with a - response code >= 400 and not equal to 401.","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Failures","dimensions":[{"name":"request/performanceBucket","displayName":"Request - performance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"request/resultCode","displayName":"Result - code","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"request/success","displayName":"Successful - request","toBeExportedForShoebox":false,"isHidden":true,"defaultDimensionValues":[{"value":"False"}]},{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null},{"name":"requests/rate","displayName":"Server - request rate","internalMetricName":null,"displayDescription":"Rate of server - requests per second","unit":"CountPerSecond","aggregationType":"Average","availabilities":null,"fillGapWithZero":true,"category":"Server","dimensions":[{"name":"request/performanceBucket","displayName":"Request - performance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"request/resultCode","displayName":"Result - code","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"request/success","displayName":"Successful - request","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Average"],"lockAggregationType":"Average"},{"name":"exceptions/count","displayName":"Exceptions","internalMetricName":null,"displayDescription":"Combined - count of all uncaught exceptions.","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Failures","dimensions":[{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"client/type","displayName":"Device - type","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null},{"name":"exceptions/browser","displayName":"Browser - exceptions","internalMetricName":"exceptions/count","displayDescription":"Count - of uncaught exceptions thrown in the browser.","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Failures","dimensions":[{"name":"client/isServer","displayName":null,"toBeExportedForShoebox":false,"isHidden":true,"defaultDimensionValues":[{"value":"False"}]},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null},{"name":"exceptions/server","displayName":"Server - exceptions","internalMetricName":"exceptions/count","displayDescription":"Count - of uncaught exceptions thrown in the server application.","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Failures","dimensions":[{"name":"client/isServer","displayName":null,"toBeExportedForShoebox":false,"isHidden":true,"defaultDimensionValues":[{"value":"True"}]},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null},{"name":"traces/count","displayName":"Traces","internalMetricName":null,"displayDescription":"Trace - document count","unit":"Count","aggregationType":"Count","availabilities":null,"fillGapWithZero":true,"category":"Usage","dimensions":[{"name":"trace/severityLevel","displayName":"Severity - level","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"operation/synthetic","displayName":"Is - traffic synthetic","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleName","displayName":"Cloud - role name","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null},{"name":"cloud/roleInstance","displayName":"Cloud - role instance","toBeExportedForShoebox":false,"isHidden":false,"defaultDimensionValues":null}],"supportedAggregationTypes":["Count"],"lockAggregationType":null}],"logSpecifications":null,"legacyMetricSpecifications":null}}},{"name":"Microsoft.Insights/Components/ProactiveDetectionConfigs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights proactive detection configuration","operation":"Application - Insights proactive detection configuration read","description":"Reading Application - Insights proactive detection configuration"},"properties":{}},{"name":"Microsoft.Insights/Components/ProactiveDetectionConfigs/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights proactive detection configuration","operation":"Application - Insights proactive detection configuration read","description":"Writing Application - Insights proactive detection configuration"},"properties":{}},{"name":"Microsoft.Insights/Components/SyntheticMonitorLocations/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights webtest location","operation":"Application - Insights webtest locations read","description":"Reading Application Insights - webtest locations"},"properties":{}},{"name":"Microsoft.Insights/Components/Webtests/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Web tests","operation":"Webtest read","description":"Reading - a webtest configuration"},"properties":{}},{"name":"Microsoft.Insights/Webtests/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Web tests","operation":"Webtest write","description":"Writing - to a webtest configuration"},"properties":{}},{"name":"Microsoft.Insights/Webtests/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Web tests","operation":"Webtest delete","description":"Deleting - a webtest configuration"},"properties":{}},{"name":"Microsoft.Insights/Webtests/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Web tests","operation":"Webtest read","description":"Reading - a webtest configuration"},"properties":{}},{"name":"Microsoft.Insights/Webtests/GetToken/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Webtest token","operation":"Webtest token read","description":"Reading - a webtest token"},"properties":{}},{"name":"Microsoft.Insights/Webtests/MetricDefinitions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Webtest metric definitions","operation":"Webtest - metric definitions read","description":"Reading a webtest metric definitions"},"properties":{}},{"name":"Microsoft.Insights/Webtests/Metrics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Webtest metrics","operation":"Webtest metrics read","description":"Reading - a webtest metrics"},"properties":{}},{"name":"Microsoft.Insights/Components/WorkItemConfigs/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights ALM integration configuration","operation":"Application - Insights ALM integration configuration delete","description":"Deleting an - Application Insights ALM integration configuration"},"properties":{}},{"name":"Microsoft.Insights/Components/WorkItemConfigs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights ALM integration configuration","operation":"Application - Insights ALM integration configuration read","description":"Reading an Application - Insights ALM integration configuration"},"properties":{}},{"name":"Microsoft.Insights/Components/WorkItemConfigs/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights ALM integration configuration","operation":"Application - Insights ALM integration configuration write","description":"Writing an Application - Insights ALM integration configuration"},"properties":{}},{"name":"Microsoft.Insights/Components/DefaultWorkItemConfig/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application Insights ALM integration configuration","operation":"Application - Insights default ALM integration configuration read","description":"Reading - an Application Insights default ALM integration configuration"},"properties":{}},{"name":"Microsoft.Insights/Components/Move/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Application insights components","operation":"Application - Insights Component Move","description":"Move an Application Insights Component - to another resource group or subscription"},"properties":{}},{"name":"Microsoft.Insights/ListMigrationDate/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"List Migration Date","operation":"Subscription - migration date read","description":"Get back subscription migration date"},"properties":{}},{"name":"Microsoft.Insights/ListMigrationDate/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"List Migration Date","operation":"Subscription - migration date read","description":"Get back Subscription migration date"},"properties":{}},{"name":"Microsoft.Insights/MigrateToNewpricingModel/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Migrate to new pricing model","operation":"Migrate - subscription to new pricing model action","description":"Migrate subscription - to new pricing model"},"properties":{}},{"name":"Microsoft.Insights/RollbackToLegacyPricingModel/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Rollback legacy pricing model","operation":"Rollback - subscription to legacy pricing model action","description":"Rollback subscription - to legacy pricing model"},"properties":{}},{"name":"Microsoft.Insights/ScheduledQueryRules/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Scheduled query rule","operation":"Scheduled query - rule write","description":"Writing a scheduled query rule"},"properties":{}},{"name":"Microsoft.Insights/ScheduledQueryRules/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Scheduled query rule","operation":"Scheduled query - rule read","description":"Reading a scheduled query rule"},"properties":{}},{"name":"Microsoft.Insights/ScheduledQueryRules/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Scheduled query rule","operation":"Scheduled query - rule delete","description":"Deleting a scheduled query rule"},"properties":{}},{"name":"Microsoft.Insights/Logs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Logs","operation":"Read Logs","description":"Reading - data from all your logs"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADDomainServicesAccountLogon/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADDomainServicesAccountLogon","operation":"Read - AADDomainServicesAccountLogon data","description":"Read data from the AADDomainServicesAccountLogon - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADDomainServicesAccountManagement/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADDomainServicesAccountManagement","operation":"Read - AADDomainServicesAccountManagement data","description":"Read data from the - AADDomainServicesAccountManagement table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADDomainServicesDirectoryServiceAccess/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADDomainServicesDirectoryServiceAccess","operation":"Read - AADDomainServicesDirectoryServiceAccess data","description":"Read data from - the AADDomainServicesDirectoryServiceAccess table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADDomainServicesLogonLogoff/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADDomainServicesLogonLogoff","operation":"Read - AADDomainServicesLogonLogoff data","description":"Read data from the AADDomainServicesLogonLogoff - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADDomainServicesPolicyChange/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADDomainServicesPolicyChange","operation":"Read - AADDomainServicesPolicyChange data","description":"Read data from the AADDomainServicesPolicyChange - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADDomainServicesPrivilegeUse/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADDomainServicesPrivilegeUse","operation":"Read - AADDomainServicesPrivilegeUse data","description":"Read data from the AADDomainServicesPrivilegeUse - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADDomainServicesSystemSecurity/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADDomainServicesSystemSecurity","operation":"Read - AADDomainServicesSystemSecurity data","description":"Read data from the AADDomainServicesSystemSecurity - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADManagedIdentitySignInLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADManagedIdentitySignInLogs","operation":"Read - AADManagedIdentitySignInLogs data","description":"Read data from the AADManagedIdentitySignInLogs - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADNonInteractiveUserSignInLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADNonInteractiveUserSignInLogs","operation":"Read - AADNonInteractiveUserSignInLogs data","description":"Read data from the AADNonInteractiveUserSignInLogs - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AADServicePrincipalSignInLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AADServicePrincipalSignInLogs","operation":"Read - AADServicePrincipalSignInLogs data","description":"Read data from the AADServicePrincipalSignInLogs - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADAssessmentRecommendation","operation":"Read ADAssessmentRecommendation - data","description":"Read data from the ADAssessmentRecommendation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AddonAzureBackupAlerts/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AddonAzureBackupAlerts","operation":"Read AddonAzureBackupAlerts - data","description":"Read data from the AddonAzureBackupAlerts table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AddonAzureBackupJobs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AddonAzureBackupJobs","operation":"Read AddonAzureBackupJobs - data","description":"Read data from the AddonAzureBackupJobs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AddonAzureBackupPolicy/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AddonAzureBackupPolicy","operation":"Read AddonAzureBackupPolicy - data","description":"Read data from the AddonAzureBackupPolicy table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AddonAzureBackupProtectedInstance/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AddonAzureBackupProtectedInstance","operation":"Read - AddonAzureBackupProtectedInstance data","description":"Read data from the - AddonAzureBackupProtectedInstance table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AddonAzureBackupStorage/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AddonAzureBackupStorage","operation":"Read AddonAzureBackupStorage - data","description":"Read data from the AddonAzureBackupStorage table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADFActivityRun/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADFActivityRun","operation":"Read ADFActivityRun - data","description":"Read data from the ADFActivityRun table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADFPipelineRun/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADFPipelineRun","operation":"Read ADFPipelineRun - data","description":"Read data from the ADFPipelineRun table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADFSSISIntegrationRuntimeLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADFSSISIntegrationRuntimeLogs","operation":"Read - ADFSSISIntegrationRuntimeLogs data","description":"Read data from the ADFSSISIntegrationRuntimeLogs - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADFSSISPackageEventMessageContext/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADFSSISPackageEventMessageContext","operation":"Read - ADFSSISPackageEventMessageContext data","description":"Read data from the - ADFSSISPackageEventMessageContext table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADFSSISPackageEventMessages/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADFSSISPackageEventMessages","operation":"Read - ADFSSISPackageEventMessages data","description":"Read data from the ADFSSISPackageEventMessages - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADFSSISPackageExecutableStatistics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADFSSISPackageExecutableStatistics","operation":"Read - ADFSSISPackageExecutableStatistics data","description":"Read data from the - ADFSSISPackageExecutableStatistics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADFSSISPackageExecutionComponentPhases/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADFSSISPackageExecutionComponentPhases","operation":"Read - ADFSSISPackageExecutionComponentPhases data","description":"Read data from - the ADFSSISPackageExecutionComponentPhases table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADFSSISPackageExecutionDataStatistics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADFSSISPackageExecutionDataStatistics","operation":"Read - ADFSSISPackageExecutionDataStatistics data","description":"Read data from - the ADFSSISPackageExecutionDataStatistics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADFTriggerRun/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADFTriggerRun","operation":"Read ADFTriggerRun - data","description":"Read data from the ADFTriggerRun table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADReplicationResult/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADReplicationResult","operation":"Read ADReplicationResult - data","description":"Read data from the ADReplicationResult table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADSecurityAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADSecurityAssessmentRecommendation","operation":"Read - ADSecurityAssessmentRecommendation data","description":"Read data from the - ADSecurityAssessmentRecommendation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADTDigitalTwinsOperation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADTDigitalTwinsOperation","operation":"Read ADTDigitalTwinsOperation - data","description":"Read data from the ADTDigitalTwinsOperation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADTEventRoutesOperation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADTEventRoutesOperation","operation":"Read ADTEventRoutesOperation - data","description":"Read data from the ADTEventRoutesOperation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADTModelsOperation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADTModelsOperation","operation":"Read ADTModelsOperation - data","description":"Read data from the ADTModelsOperation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ADTQueryOperation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ADTQueryOperation","operation":"Read ADTQueryOperation - data","description":"Read data from the ADTQueryOperation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AegDeliveryFailureLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AegDeliveryFailureLogs","operation":"Read AegDeliveryFailureLogs - data","description":"Read data from the AegDeliveryFailureLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AegPublishFailureLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AegPublishFailureLogs","operation":"Read AegPublishFailureLogs - data","description":"Read data from the AegPublishFailureLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Alert/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Alert","operation":"Read Alert data","description":"Read - data from the Alert table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AlertHistory/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AlertHistory","operation":"Read AlertHistory data","description":"Read - data from the AlertHistory table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AmlComputeClusterEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AmlComputeClusterEvent","operation":"Read AmlComputeClusterEvent - data","description":"Read data from the AmlComputeClusterEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AmlComputeClusterNodeEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AmlComputeClusterNodeEvent","operation":"Read AmlComputeClusterNodeEvent - data","description":"Read data from the AmlComputeClusterNodeEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AmlComputeCpuGpuUtilization/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AmlComputeCpuGpuUtilization","operation":"Read - AmlComputeCpuGpuUtilization data","description":"Read data from the AmlComputeCpuGpuUtilization - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AmlComputeJobEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AmlComputeJobEvent","operation":"Read AmlComputeJobEvent - data","description":"Read data from the AmlComputeJobEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AmlRunStatusChangedEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AmlRunStatusChangedEvent","operation":"Read AmlRunStatusChangedEvent - data","description":"Read data from the AmlRunStatusChangedEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ApiManagementGatewayLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ApiManagementGatewayLogs","operation":"Read ApiManagementGatewayLogs - data","description":"Read data from the ApiManagementGatewayLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppAvailabilityResults/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppAvailabilityResults","operation":"Read AppAvailabilityResults - data","description":"Read data from the AppAvailabilityResults table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppBrowserTimings/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppBrowserTimings","operation":"Read AppBrowserTimings - data","description":"Read data from the AppBrowserTimings table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppCenterError/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppCenterError","operation":"Read AppCenterError - data","description":"Read data from the AppCenterError table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppDependencies/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppDependencies","operation":"Read AppDependencies - data","description":"Read data from the AppDependencies table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppEvents/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppEvents","operation":"Read AppEvents data","description":"Read - data from the AppEvents table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppExceptions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppExceptions","operation":"Read AppExceptions - data","description":"Read data from the AppExceptions table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ApplicationInsights/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ApplicationInsights","operation":"Read ApplicationInsights - data","description":"Read data from the ApplicationInsights table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppMetrics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppMetrics","operation":"Read AppMetrics data","description":"Read - data from the AppMetrics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppPageViews/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppPageViews","operation":"Read AppPageViews data","description":"Read - data from the AppPageViews table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppPerformanceCounters/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppPerformanceCounters","operation":"Read AppPerformanceCounters - data","description":"Read data from the AppPerformanceCounters table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppPlatformLogsforSpring/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppPlatformLogsforSpring","operation":"Read AppPlatformLogsforSpring - data","description":"Read data from the AppPlatformLogsforSpring table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppPlatformSystemLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppPlatformSystemLogs","operation":"Read AppPlatformSystemLogs - data","description":"Read data from the AppPlatformSystemLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppRequests/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppRequests","operation":"Read AppRequests data","description":"Read - data from the AppRequests table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppServiceAntivirusScanLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppServiceAntivirusScanLogs","operation":"Read - AppServiceAntivirusScanLogs data","description":"Read data from the AppServiceAntivirusScanLogs - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppServiceAppLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppServiceAppLogs","operation":"Read AppServiceAppLogs - data","description":"Read data from the AppServiceAppLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppServiceAuditLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppServiceAuditLogs","operation":"Read AppServiceAuditLogs - data","description":"Read data from the AppServiceAuditLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppServiceConsoleLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppServiceConsoleLogs","operation":"Read AppServiceConsoleLogs - data","description":"Read data from the AppServiceConsoleLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppServiceEnvironmentPlatformLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppServiceEnvironmentPlatformLogs","operation":"Read - AppServiceEnvironmentPlatformLogs data","description":"Read data from the - AppServiceEnvironmentPlatformLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppServiceFileAuditLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppServiceFileAuditLogs","operation":"Read AppServiceFileAuditLogs - data","description":"Read data from the AppServiceFileAuditLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppServiceHTTPLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppServiceHTTPLogs","operation":"Read AppServiceHTTPLogs - data","description":"Read data from the AppServiceHTTPLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppServicePlatformLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppServicePlatformLogs","operation":"Read AppServicePlatformLogs - data","description":"Read data from the AppServicePlatformLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppSystemEvents/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppSystemEvents","operation":"Read AppSystemEvents - data","description":"Read data from the AppSystemEvents table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AppTraces/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AppTraces","operation":"Read AppTraces data","description":"Read - data from the AppTraces table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AuditLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AuditLogs","operation":"Read AuditLogs data","description":"Read - data from the AuditLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AutoscaleEvaluationsLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AutoscaleEvaluationsLog","operation":"Read AutoscaleEvaluationsLog - data","description":"Read data from the AutoscaleEvaluationsLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AutoscaleScaleActionsLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AutoscaleScaleActionsLog","operation":"Read AutoscaleScaleActionsLog - data","description":"Read data from the AutoscaleScaleActionsLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AWSCloudTrail/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AWSCloudTrail","operation":"Read AWSCloudTrail - data","description":"Read data from the AWSCloudTrail table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AzureActivity/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AzureActivity","operation":"Read AzureActivity - data","description":"Read data from the AzureActivity table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AzureAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AzureAssessmentRecommendation","operation":"Read - AzureAssessmentRecommendation data","description":"Read data from the AzureAssessmentRecommendation - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AzureDevOpsAuditing/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AzureDevOpsAuditing","operation":"Read AzureDevOpsAuditing - data","description":"Read data from the AzureDevOpsAuditing table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AzureDiagnostics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AzureDiagnostics","operation":"Read AzureDiagnostics - data","description":"Read data from the AzureDiagnostics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/AzureMetrics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"AzureMetrics","operation":"Read AzureMetrics data","description":"Read - data from the AzureMetrics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/BaiClusterEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"BaiClusterEvent","operation":"Read BaiClusterEvent - data","description":"Read data from the BaiClusterEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/BaiClusterNodeEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"BaiClusterNodeEvent","operation":"Read BaiClusterNodeEvent - data","description":"Read data from the BaiClusterNodeEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/BaiJobEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"BaiJobEvent","operation":"Read BaiJobEvent data","description":"Read - data from the BaiJobEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/BehaviorAnalytics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"BehaviorAnalytics","operation":"Read BehaviorAnalytics - data","description":"Read data from the BehaviorAnalytics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/BlockchainApplicationLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"BlockchainApplicationLog","operation":"Read BlockchainApplicationLog - data","description":"Read data from the BlockchainApplicationLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/BlockchainProxyLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"BlockchainProxyLog","operation":"Read BlockchainProxyLog - data","description":"Read data from the BlockchainProxyLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/BoundPort/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"BoundPort","operation":"Read BoundPort data","description":"Read - data from the BoundPort table"},"properties":{}},{"name":"Microsoft.Insights/Logs/CommonSecurityLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"CommonSecurityLog","operation":"Read CommonSecurityLog - data","description":"Read data from the CommonSecurityLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ComputerGroup/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ComputerGroup","operation":"Read ComputerGroup - data","description":"Read data from the ComputerGroup table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ConfigurationChange/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ConfigurationChange","operation":"Read ConfigurationChange - data","description":"Read data from the ConfigurationChange table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ConfigurationData/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ConfigurationData","operation":"Read ConfigurationData - data","description":"Read data from the ConfigurationData table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ContainerImageInventory/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ContainerImageInventory","operation":"Read ContainerImageInventory - data","description":"Read data from the ContainerImageInventory table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ContainerInventory/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ContainerInventory","operation":"Read ContainerInventory - data","description":"Read data from the ContainerInventory table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ContainerLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ContainerLog","operation":"Read ContainerLog data","description":"Read - data from the ContainerLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ContainerNodeInventory/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ContainerNodeInventory","operation":"Read ContainerNodeInventory - data","description":"Read data from the ContainerNodeInventory table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ContainerRegistryLoginEvents/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ContainerRegistryLoginEvents","operation":"Read - ContainerRegistryLoginEvents data","description":"Read data from the ContainerRegistryLoginEvents - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ContainerRegistryRepositoryEvents/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ContainerRegistryRepositoryEvents","operation":"Read - ContainerRegistryRepositoryEvents data","description":"Read data from the - ContainerRegistryRepositoryEvents table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ContainerServiceLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ContainerServiceLog","operation":"Read ContainerServiceLog - data","description":"Read data from the ContainerServiceLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Tables.Custom/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"CustomLogs","operation":"Read Custom Logs","description":"Reading - data from any custom log"},"properties":{}},{"name":"Microsoft.Insights/Logs/CoreAzureBackup/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"CoreAzureBackup","operation":"Read CoreAzureBackup - data","description":"Read data from the CoreAzureBackup table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksAccounts/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksAccounts","operation":"Read DatabricksAccounts - data","description":"Read data from the DatabricksAccounts table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksClusters/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksClusters","operation":"Read DatabricksClusters - data","description":"Read data from the DatabricksClusters table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksDBFS/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksDBFS","operation":"Read DatabricksDBFS - data","description":"Read data from the DatabricksDBFS table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksInstancePools/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksInstancePools","operation":"Read DatabricksInstancePools - data","description":"Read data from the DatabricksInstancePools table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksJobs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksJobs","operation":"Read DatabricksJobs - data","description":"Read data from the DatabricksJobs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksNotebook/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksNotebook","operation":"Read DatabricksNotebook - data","description":"Read data from the DatabricksNotebook table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksSecrets/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksSecrets","operation":"Read DatabricksSecrets - data","description":"Read data from the DatabricksSecrets table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksSQLPermissions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksSQLPermissions","operation":"Read DatabricksSQLPermissions - data","description":"Read data from the DatabricksSQLPermissions table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksSSH/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksSSH","operation":"Read DatabricksSSH - data","description":"Read data from the DatabricksSSH table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksTables/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksTables","operation":"Read DatabricksTables - data","description":"Read data from the DatabricksTables table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DatabricksWorkspace/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DatabricksWorkspace","operation":"Read DatabricksWorkspace - data","description":"Read data from the DatabricksWorkspace table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceAppCrash/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceAppCrash","operation":"Read DeviceAppCrash - data","description":"Read data from the DeviceAppCrash table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceAppLaunch/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceAppLaunch","operation":"Read DeviceAppLaunch - data","description":"Read data from the DeviceAppLaunch table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceCalendar/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceCalendar","operation":"Read DeviceCalendar - data","description":"Read data from the DeviceCalendar table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceCleanup/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceCleanup","operation":"Read DeviceCleanup - data","description":"Read data from the DeviceCleanup table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceConnectSession/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceConnectSession","operation":"Read DeviceConnectSession - data","description":"Read data from the DeviceConnectSession table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceEtw/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceEtw","operation":"Read DeviceEtw data","description":"Read - data from the DeviceEtw table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceHardwareHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceHardwareHealth","operation":"Read DeviceHardwareHealth - data","description":"Read data from the DeviceHardwareHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceHealth","operation":"Read DeviceHealth data","description":"Read - data from the DeviceHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceHeartbeat/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceHeartbeat","operation":"Read DeviceHeartbeat - data","description":"Read data from the DeviceHeartbeat table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceSkypeHeartbeat/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceSkypeHeartbeat","operation":"Read DeviceSkypeHeartbeat - data","description":"Read data from the DeviceSkypeHeartbeat table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceSkypeSignIn/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceSkypeSignIn","operation":"Read DeviceSkypeSignIn - data","description":"Read data from the DeviceSkypeSignIn table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DeviceSleepState/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DeviceSleepState","operation":"Read DeviceSleepState - data","description":"Read data from the DeviceSleepState table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DHAppFailure/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DHAppFailure","operation":"Read DHAppFailure data","description":"Read - data from the DHAppFailure table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DHAppReliability/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DHAppReliability","operation":"Read DHAppReliability - data","description":"Read data from the DHAppReliability table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DHCPActivity/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DHCPActivity","operation":"Read DHCPActivity data","description":"Read - data from the DHCPActivity table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DHDriverReliability/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DHDriverReliability","operation":"Read DHDriverReliability - data","description":"Read data from the DHDriverReliability table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DHLogonFailures/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DHLogonFailures","operation":"Read DHLogonFailures - data","description":"Read data from the DHLogonFailures table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DHLogonMetrics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DHLogonMetrics","operation":"Read DHLogonMetrics - data","description":"Read data from the DHLogonMetrics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DHOSCrashData/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DHOSCrashData","operation":"Read DHOSCrashData - data","description":"Read data from the DHOSCrashData table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DHOSReliability/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DHOSReliability","operation":"Read DHOSReliability - data","description":"Read data from the DHOSReliability table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DHWipAppLearning/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DHWipAppLearning","operation":"Read DHWipAppLearning - data","description":"Read data from the DHWipAppLearning table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DnsEvents/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DnsEvents","operation":"Read DnsEvents data","description":"Read - data from the DnsEvents table"},"properties":{}},{"name":"Microsoft.Insights/Logs/DnsInventory/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"DnsInventory","operation":"Read DnsInventory data","description":"Read - data from the DnsInventory table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Dynamics365Activity/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Dynamics365Activity","operation":"Read Dynamics365Activity - data","description":"Read data from the Dynamics365Activity table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ETWEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ETWEvent","operation":"Read ETWEvent data","description":"Read - data from the ETWEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Event/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Event","operation":"Read Event data","description":"Read - data from the Event table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ExchangeAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ExchangeAssessmentRecommendation","operation":"Read - ExchangeAssessmentRecommendation data","description":"Read data from the ExchangeAssessmentRecommendation - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ExchangeOnlineAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ExchangeOnlineAssessmentRecommendation","operation":"Read - ExchangeOnlineAssessmentRecommendation data","description":"Read data from - the ExchangeOnlineAssessmentRecommendation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/FailedIngestion/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"FailedIngestion","operation":"Read FailedIngestion - data","description":"Read data from the FailedIngestion table"},"properties":{}},{"name":"Microsoft.Insights/Logs/FunctionAppLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"FunctionAppLogs","operation":"Read FunctionAppLogs - data","description":"Read data from the FunctionAppLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Heartbeat/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Heartbeat","operation":"Read Heartbeat data","description":"Read - data from the Heartbeat table"},"properties":{}},{"name":"Microsoft.Insights/Logs/HuntingBookmark/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"HuntingBookmark","operation":"Read HuntingBookmark - data","description":"Read data from the HuntingBookmark table"},"properties":{}},{"name":"Microsoft.Insights/Logs/IISAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"IISAssessmentRecommendation","operation":"Read - IISAssessmentRecommendation data","description":"Read data from the IISAssessmentRecommendation - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/InboundConnection/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"InboundConnection","operation":"Read InboundConnection - data","description":"Read data from the InboundConnection table"},"properties":{}},{"name":"Microsoft.Insights/Logs/InsightsMetrics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"InsightsMetrics","operation":"Read InsightsMetrics - data","description":"Read data from the InsightsMetrics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/IntuneAuditLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"IntuneAuditLogs","operation":"Read IntuneAuditLogs - data","description":"Read data from the IntuneAuditLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/IntuneDeviceComplianceOrg/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"IntuneDeviceComplianceOrg","operation":"Read IntuneDeviceComplianceOrg - data","description":"Read data from the IntuneDeviceComplianceOrg table"},"properties":{}},{"name":"Microsoft.Insights/Logs/IntuneOperationalLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"IntuneOperationalLogs","operation":"Read IntuneOperationalLogs - data","description":"Read data from the IntuneOperationalLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/IoTHubDistributedTracing/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"IoTHubDistributedTracing","operation":"Read IoTHubDistributedTracing - data","description":"Read data from the IoTHubDistributedTracing table"},"properties":{}},{"name":"Microsoft.Insights/Logs/KubeEvents/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"KubeEvents","operation":"Read KubeEvents data","description":"Read - data from the KubeEvents table"},"properties":{}},{"name":"Microsoft.Insights/Logs/KubeHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"KubeHealth","operation":"Read KubeHealth data","description":"Read - data from the KubeHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/KubeMonAgentEvents/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"KubeMonAgentEvents","operation":"Read KubeMonAgentEvents - data","description":"Read data from the KubeMonAgentEvents table"},"properties":{}},{"name":"Microsoft.Insights/Logs/KubeNodeInventory/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"KubeNodeInventory","operation":"Read KubeNodeInventory - data","description":"Read data from the KubeNodeInventory table"},"properties":{}},{"name":"Microsoft.Insights/Logs/KubePodInventory/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"KubePodInventory","operation":"Read KubePodInventory - data","description":"Read data from the KubePodInventory table"},"properties":{}},{"name":"Microsoft.Insights/Logs/KubeServices/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"KubeServices","operation":"Read KubeServices data","description":"Read - data from the KubeServices table"},"properties":{}},{"name":"Microsoft.Insights/Logs/LinuxAuditLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"LinuxAuditLog","operation":"Read LinuxAuditLog - data","description":"Read data from the LinuxAuditLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAApplication/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAApplication","operation":"Read MAApplication - data","description":"Read data from the MAApplication table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAApplicationHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAApplicationHealth","operation":"Read MAApplicationHealth - data","description":"Read data from the MAApplicationHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAApplicationHealthAlternativeVersions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAApplicationHealthAlternativeVersions","operation":"Read - MAApplicationHealthAlternativeVersions data","description":"Read data from - the MAApplicationHealthAlternativeVersions table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAApplicationHealthIssues/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAApplicationHealthIssues","operation":"Read MAApplicationHealthIssues - data","description":"Read data from the MAApplicationHealthIssues table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAApplicationInstance/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAApplicationInstance","operation":"Read MAApplicationInstance - data","description":"Read data from the MAApplicationInstance table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAApplicationInstanceReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAApplicationInstanceReadiness","operation":"Read - MAApplicationInstanceReadiness data","description":"Read data from the MAApplicationInstanceReadiness - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAApplicationReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAApplicationReadiness","operation":"Read MAApplicationReadiness - data","description":"Read data from the MAApplicationReadiness table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADeploymentPlan/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADeploymentPlan","operation":"Read MADeploymentPlan - data","description":"Read data from the MADeploymentPlan table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADevice/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADevice","operation":"Read MADevice data","description":"Read - data from the MADevice table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADeviceNotEnrolled/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADeviceNotEnrolled","operation":"Read MADeviceNotEnrolled - data","description":"Read data from the MADeviceNotEnrolled table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADeviceNRT/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADeviceNRT","operation":"Read MADeviceNRT data","description":"Read - data from the MADeviceNRT table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADevicePnPHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADevicePnPHealth","operation":"Read MADevicePnPHealth - data","description":"Read data from the MADevicePnPHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADevicePnPHealthAlternativeVersions/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADevicePnPHealthAlternativeVersions","operation":"Read - MADevicePnPHealthAlternativeVersions data","description":"Read data from the - MADevicePnPHealthAlternativeVersions table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADevicePnPHealthIssues/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADevicePnPHealthIssues","operation":"Read MADevicePnPHealthIssues - data","description":"Read data from the MADevicePnPHealthIssues table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADeviceReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADeviceReadiness","operation":"Read MADeviceReadiness - data","description":"Read data from the MADeviceReadiness table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADriverInstanceReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADriverInstanceReadiness","operation":"Read MADriverInstanceReadiness - data","description":"Read data from the MADriverInstanceReadiness table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MADriverReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MADriverReadiness","operation":"Read MADriverReadiness - data","description":"Read data from the MADriverReadiness table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAddin/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAddin","operation":"Read MAOfficeAddin - data","description":"Read data from the MAOfficeAddin table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAddinEntityHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAddinEntityHealth","operation":"Read MAOfficeAddinEntityHealth - data","description":"Read data from the MAOfficeAddinEntityHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAddinHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAddinHealth","operation":"Read MAOfficeAddinHealth - data","description":"Read data from the MAOfficeAddinHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAddinHealthEventNRT/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAddinHealthEventNRT","operation":"Read - MAOfficeAddinHealthEventNRT data","description":"Read data from the MAOfficeAddinHealthEventNRT - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAddinHealthIssues/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAddinHealthIssues","operation":"Read MAOfficeAddinHealthIssues - data","description":"Read data from the MAOfficeAddinHealthIssues table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAddinInstance/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAddinInstance","operation":"Read MAOfficeAddinInstance - data","description":"Read data from the MAOfficeAddinInstance table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAddinInstanceReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAddinInstanceReadiness","operation":"Read - MAOfficeAddinInstanceReadiness data","description":"Read data from the MAOfficeAddinInstanceReadiness - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAddinReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAddinReadiness","operation":"Read MAOfficeAddinReadiness - data","description":"Read data from the MAOfficeAddinReadiness table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeApp/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeApp","operation":"Read MAOfficeApp data","description":"Read - data from the MAOfficeApp table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAppCrashesNRT/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAppCrashesNRT","operation":"Read MAOfficeAppCrashesNRT - data","description":"Read data from the MAOfficeAppCrashesNRT table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAppHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAppHealth","operation":"Read MAOfficeAppHealth - data","description":"Read data from the MAOfficeAppHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAppInstance/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAppInstance","operation":"Read MAOfficeAppInstance - data","description":"Read data from the MAOfficeAppInstance table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAppInstanceHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAppInstanceHealth","operation":"Read MAOfficeAppInstanceHealth - data","description":"Read data from the MAOfficeAppInstanceHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAppReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAppReadiness","operation":"Read MAOfficeAppReadiness - data","description":"Read data from the MAOfficeAppReadiness table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeAppSessionsNRT/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeAppSessionsNRT","operation":"Read MAOfficeAppSessionsNRT - data","description":"Read data from the MAOfficeAppSessionsNRT table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeBuildInfo/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeBuildInfo","operation":"Read MAOfficeBuildInfo - data","description":"Read data from the MAOfficeBuildInfo table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeCurrencyAssessment/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeCurrencyAssessment","operation":"Read MAOfficeCurrencyAssessment - data","description":"Read data from the MAOfficeCurrencyAssessment table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeCurrencyAssessmentDailyCounts/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeCurrencyAssessmentDailyCounts","operation":"Read - MAOfficeCurrencyAssessmentDailyCounts data","description":"Read data from - the MAOfficeCurrencyAssessmentDailyCounts table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeDeploymentStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeDeploymentStatus","operation":"Read MAOfficeDeploymentStatus - data","description":"Read data from the MAOfficeDeploymentStatus table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeDeploymentStatusNRT/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeDeploymentStatusNRT","operation":"Read - MAOfficeDeploymentStatusNRT data","description":"Read data from the MAOfficeDeploymentStatusNRT - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeMacroErrorNRT/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeMacroErrorNRT","operation":"Read MAOfficeMacroErrorNRT - data","description":"Read data from the MAOfficeMacroErrorNRT table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeMacroGlobalHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeMacroGlobalHealth","operation":"Read MAOfficeMacroGlobalHealth - data","description":"Read data from the MAOfficeMacroGlobalHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeMacroHealth/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeMacroHealth","operation":"Read MAOfficeMacroHealth - data","description":"Read data from the MAOfficeMacroHealth table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeMacroHealthIssues/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeMacroHealthIssues","operation":"Read MAOfficeMacroHealthIssues - data","description":"Read data from the MAOfficeMacroHealthIssues table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeMacroIssueInstanceReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeMacroIssueInstanceReadiness","operation":"Read - MAOfficeMacroIssueInstanceReadiness data","description":"Read data from the - MAOfficeMacroIssueInstanceReadiness table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeMacroIssueReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeMacroIssueReadiness","operation":"Read - MAOfficeMacroIssueReadiness data","description":"Read data from the MAOfficeMacroIssueReadiness - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeMacroSummary/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeMacroSummary","operation":"Read MAOfficeMacroSummary - data","description":"Read data from the MAOfficeMacroSummary table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeSuite/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeSuite","operation":"Read MAOfficeSuite - data","description":"Read data from the MAOfficeSuite table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAOfficeSuiteInstance/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAOfficeSuiteInstance","operation":"Read MAOfficeSuiteInstance - data","description":"Read data from the MAOfficeSuiteInstance table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAProposedPilotDevices/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAProposedPilotDevices","operation":"Read MAProposedPilotDevices - data","description":"Read data from the MAProposedPilotDevices table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAWindowsBuildInfo/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAWindowsBuildInfo","operation":"Read MAWindowsBuildInfo - data","description":"Read data from the MAWindowsBuildInfo table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAWindowsCurrencyAssessment/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAWindowsCurrencyAssessment","operation":"Read - MAWindowsCurrencyAssessment data","description":"Read data from the MAWindowsCurrencyAssessment - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAWindowsCurrencyAssessmentDailyCounts/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAWindowsCurrencyAssessmentDailyCounts","operation":"Read - MAWindowsCurrencyAssessmentDailyCounts data","description":"Read data from - the MAWindowsCurrencyAssessmentDailyCounts table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAWindowsDeploymentStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAWindowsDeploymentStatus","operation":"Read MAWindowsDeploymentStatus - data","description":"Read data from the MAWindowsDeploymentStatus table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAWindowsDeploymentStatusNRT/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAWindowsDeploymentStatusNRT","operation":"Read - MAWindowsDeploymentStatusNRT data","description":"Read data from the MAWindowsDeploymentStatusNRT - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MAWindowsSysReqInstanceReadiness/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MAWindowsSysReqInstanceReadiness","operation":"Read - MAWindowsSysReqInstanceReadiness data","description":"Read data from the MAWindowsSysReqInstanceReadiness - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/McasShadowItReporting/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"McasShadowItReporting","operation":"Read McasShadowItReporting - data","description":"Read data from the McasShadowItReporting table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MicrosoftAzureBastionAuditLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MicrosoftAzureBastionAuditLogs","operation":"Read - MicrosoftAzureBastionAuditLogs data","description":"Read data from the MicrosoftAzureBastionAuditLogs - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MicrosoftDataShareReceivedSnapshotLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MicrosoftDataShareReceivedSnapshotLog","operation":"Read - MicrosoftDataShareReceivedSnapshotLog data","description":"Read data from - the MicrosoftDataShareReceivedSnapshotLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MicrosoftDataShareSentSnapshotLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MicrosoftDataShareSentSnapshotLog","operation":"Read - MicrosoftDataShareSentSnapshotLog data","description":"Read data from the - MicrosoftDataShareSentSnapshotLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MicrosoftDataShareShareLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MicrosoftDataShareShareLog","operation":"Read MicrosoftDataShareShareLog - data","description":"Read data from the MicrosoftDataShareShareLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MicrosoftDynamicsTelemetryPerformanceLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MicrosoftDynamicsTelemetryPerformanceLogs","operation":"Read - MicrosoftDynamicsTelemetryPerformanceLogs data","description":"Read data from - the MicrosoftDynamicsTelemetryPerformanceLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MicrosoftDynamicsTelemetrySystemMetricsLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MicrosoftDynamicsTelemetrySystemMetricsLogs","operation":"Read - MicrosoftDynamicsTelemetrySystemMetricsLogs data","description":"Read data - from the MicrosoftDynamicsTelemetrySystemMetricsLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/MicrosoftHealthcareApisAuditLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MicrosoftHealthcareApisAuditLogs","operation":"Read - MicrosoftHealthcareApisAuditLogs data","description":"Read data from the MicrosoftHealthcareApisAuditLogs - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/NetworkMonitoring/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"NetworkMonitoring","operation":"Read NetworkMonitoring - data","description":"Read data from the NetworkMonitoring table"},"properties":{}},{"name":"Microsoft.Insights/Logs/OfficeActivity/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"OfficeActivity","operation":"Read OfficeActivity - data","description":"Read data from the OfficeActivity table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Operation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Operation","operation":"Read Operation data","description":"Read - data from the Operation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/OutboundConnection/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"OutboundConnection","operation":"Read OutboundConnection - data","description":"Read data from the OutboundConnection table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Perf/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Perf","operation":"Read Perf data","description":"Read - data from the Perf table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ProtectionStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ProtectionStatus","operation":"Read ProtectionStatus - data","description":"Read data from the ProtectionStatus table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ReservedAzureCommonFields/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ReservedAzureCommonFields","operation":"Read ReservedAzureCommonFields - data","description":"Read data from the ReservedAzureCommonFields table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ReservedCommonFields/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ReservedCommonFields","operation":"Read ReservedCommonFields - data","description":"Read data from the ReservedCommonFields table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SCCMAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SCCMAssessmentRecommendation","operation":"Read - SCCMAssessmentRecommendation data","description":"Read data from the SCCMAssessmentRecommendation - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SCOMAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SCOMAssessmentRecommendation","operation":"Read - SCOMAssessmentRecommendation data","description":"Read data from the SCOMAssessmentRecommendation - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SecurityAlert/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SecurityAlert","operation":"Read SecurityAlert - data","description":"Read data from the SecurityAlert table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SecurityBaseline/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SecurityBaseline","operation":"Read SecurityBaseline - data","description":"Read data from the SecurityBaseline table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SecurityBaselineSummary/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SecurityBaselineSummary","operation":"Read SecurityBaselineSummary - data","description":"Read data from the SecurityBaselineSummary table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SecurityDetection/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SecurityDetection","operation":"Read SecurityDetection - data","description":"Read data from the SecurityDetection table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SecurityEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SecurityEvent","operation":"Read SecurityEvent - data","description":"Read data from the SecurityEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SecurityIncident/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SecurityIncident","operation":"Read SecurityIncident - data","description":"Read data from the SecurityIncident table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SecurityIoTRawEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SecurityIoTRawEvent","operation":"Read SecurityIoTRawEvent - data","description":"Read data from the SecurityIoTRawEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SecurityNestedRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SecurityNestedRecommendation","operation":"Read - SecurityNestedRecommendation data","description":"Read data from the SecurityNestedRecommendation - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SecurityRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SecurityRecommendation","operation":"Read SecurityRecommendation - data","description":"Read data from the SecurityRecommendation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ServiceFabricOperationalEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ServiceFabricOperationalEvent","operation":"Read - ServiceFabricOperationalEvent data","description":"Read data from the ServiceFabricOperationalEvent - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ServiceFabricReliableActorEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ServiceFabricReliableActorEvent","operation":"Read - ServiceFabricReliableActorEvent data","description":"Read data from the ServiceFabricReliableActorEvent - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ServiceFabricReliableServiceEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ServiceFabricReliableServiceEvent","operation":"Read - ServiceFabricReliableServiceEvent data","description":"Read data from the - ServiceFabricReliableServiceEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SfBAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SfBAssessmentRecommendation","operation":"Read - SfBAssessmentRecommendation data","description":"Read data from the SfBAssessmentRecommendation - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SfBOnlineAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SfBOnlineAssessmentRecommendation","operation":"Read - SfBOnlineAssessmentRecommendation data","description":"Read data from the - SfBOnlineAssessmentRecommendation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SharePointOnlineAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SharePointOnlineAssessmentRecommendation","operation":"Read - SharePointOnlineAssessmentRecommendation data","description":"Read data from - the SharePointOnlineAssessmentRecommendation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SignalRServiceDiagnosticLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SignalRServiceDiagnosticLogs","operation":"Read - SignalRServiceDiagnosticLogs data","description":"Read data from the SignalRServiceDiagnosticLogs - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SigninLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SigninLogs","operation":"Read SigninLogs data","description":"Read - data from the SigninLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SPAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SPAssessmentRecommendation","operation":"Read SPAssessmentRecommendation - data","description":"Read data from the SPAssessmentRecommendation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SQLAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SQLAssessmentRecommendation","operation":"Read - SQLAssessmentRecommendation data","description":"Read data from the SQLAssessmentRecommendation - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SqlDataClassification/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SqlDataClassification","operation":"Read SqlDataClassification - data","description":"Read data from the SqlDataClassification table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SQLQueryPerformance/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SQLQueryPerformance","operation":"Read SQLQueryPerformance - data","description":"Read data from the SQLQueryPerformance table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SqlVulnerabilityAssessmentResult/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SqlVulnerabilityAssessmentResult","operation":"Read - SqlVulnerabilityAssessmentResult data","description":"Read data from the SqlVulnerabilityAssessmentResult - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/StorageBlobLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"StorageBlobLogs","operation":"Read StorageBlobLogs - data","description":"Read data from the StorageBlobLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/StorageFileLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"StorageFileLogs","operation":"Read StorageFileLogs - data","description":"Read data from the StorageFileLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/StorageQueueLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"StorageQueueLogs","operation":"Read StorageQueueLogs - data","description":"Read data from the StorageQueueLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/StorageTableLogs/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"StorageTableLogs","operation":"Read StorageTableLogs - data","description":"Read data from the StorageTableLogs table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SucceededIngestion/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SucceededIngestion","operation":"Read SucceededIngestion - data","description":"Read data from the SucceededIngestion table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Syslog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Syslog","operation":"Read Syslog data","description":"Read - data from the Syslog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/SysmonEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"SysmonEvent","operation":"Read SysmonEvent data","description":"Read - data from the SysmonEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/ThreatIntelligenceIndicator/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"ThreatIntelligenceIndicator","operation":"Read - ThreatIntelligenceIndicator data","description":"Read data from the ThreatIntelligenceIndicator - table"},"properties":{}},{"name":"Microsoft.Insights/Logs/TSIIngress/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"TSIIngress","operation":"Read TSIIngress data","description":"Read - data from the TSIIngress table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UAApp/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UAApp","operation":"Read UAApp data","description":"Read - data from the UAApp table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UAComputer/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UAComputer","operation":"Read UAComputer data","description":"Read - data from the UAComputer table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UAComputerRank/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UAComputerRank","operation":"Read UAComputerRank - data","description":"Read data from the UAComputerRank table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UADriver/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UADriver","operation":"Read UADriver data","description":"Read - data from the UADriver table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UADriverProblemCodes/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UADriverProblemCodes","operation":"Read UADriverProblemCodes - data","description":"Read data from the UADriverProblemCodes table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UAFeedback/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UAFeedback","operation":"Read UAFeedback data","description":"Read - data from the UAFeedback table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UAHardwareSecurity/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UAHardwareSecurity","operation":"Read UAHardwareSecurity - data","description":"Read data from the UAHardwareSecurity table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UAIESiteDiscovery/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UAIESiteDiscovery","operation":"Read UAIESiteDiscovery - data","description":"Read data from the UAIESiteDiscovery table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UAOfficeAddIn/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UAOfficeAddIn","operation":"Read UAOfficeAddIn - data","description":"Read data from the UAOfficeAddIn table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UAProposedActionPlan/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UAProposedActionPlan","operation":"Read UAProposedActionPlan - data","description":"Read data from the UAProposedActionPlan table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UASysReqIssue/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UASysReqIssue","operation":"Read UASysReqIssue - data","description":"Read data from the UASysReqIssue table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UAUpgradedComputer/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UAUpgradedComputer","operation":"Read UAUpgradedComputer - data","description":"Read data from the UAUpgradedComputer table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Update/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Update","operation":"Read Update data","description":"Read - data from the Update table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UpdateRunProgress/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UpdateRunProgress","operation":"Read UpdateRunProgress - data","description":"Read data from the UpdateRunProgress table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UpdateSummary/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UpdateSummary","operation":"Read UpdateSummary - data","description":"Read data from the UpdateSummary table"},"properties":{}},{"name":"Microsoft.Insights/Logs/Usage/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Usage","operation":"Read Usage data","description":"Read - data from the Usage table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UserAccessAnalytics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UserAccessAnalytics","operation":"Read UserAccessAnalytics - data","description":"Read data from the UserAccessAnalytics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/UserPeerAnalytics/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"UserPeerAnalytics","operation":"Read UserPeerAnalytics - data","description":"Read data from the UserPeerAnalytics table"},"properties":{}},{"name":"Microsoft.Insights/Logs/VMBoundPort/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"VMBoundPort","operation":"Read VMBoundPort data","description":"Read - data from the VMBoundPort table"},"properties":{}},{"name":"Microsoft.Insights/Logs/VMComputer/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"VMComputer","operation":"Read VMComputer data","description":"Read - data from the VMComputer table"},"properties":{}},{"name":"Microsoft.Insights/Logs/VMConnection/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"VMConnection","operation":"Read VMConnection data","description":"Read - data from the VMConnection table"},"properties":{}},{"name":"Microsoft.Insights/Logs/VMProcess/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"VMProcess","operation":"Read VMProcess data","description":"Read - data from the VMProcess table"},"properties":{}},{"name":"Microsoft.Insights/Logs/W3CIISLog/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"W3CIISLog","operation":"Read W3CIISLog data","description":"Read - data from the W3CIISLog table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WaaSDeploymentStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WaaSDeploymentStatus","operation":"Read WaaSDeploymentStatus - data","description":"Read data from the WaaSDeploymentStatus table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WaaSInsiderStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WaaSInsiderStatus","operation":"Read WaaSInsiderStatus - data","description":"Read data from the WaaSInsiderStatus table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WaaSUpdateStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WaaSUpdateStatus","operation":"Read WaaSUpdateStatus - data","description":"Read data from the WaaSUpdateStatus table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WDAVStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WDAVStatus","operation":"Read WDAVStatus data","description":"Read - data from the WDAVStatus table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WDAVThreat/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WDAVThreat","operation":"Read WDAVThreat data","description":"Read - data from the WDAVThreat table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WindowsClientAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WindowsClientAssessmentRecommendation","operation":"Read - WindowsClientAssessmentRecommendation data","description":"Read data from - the WindowsClientAssessmentRecommendation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WindowsEvent/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WindowsEvent","operation":"Read WindowsEvent data","description":"Read - data from the WindowsEvent table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WindowsFirewall/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WindowsFirewall","operation":"Read WindowsFirewall - data","description":"Read data from the WindowsFirewall table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WindowsServerAssessmentRecommendation/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WindowsServerAssessmentRecommendation","operation":"Read - WindowsServerAssessmentRecommendation data","description":"Read data from - the WindowsServerAssessmentRecommendation table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WireData/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WireData","operation":"Read WireData data","description":"Read - data from the WireData table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WorkloadMonitoringPerf/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WorkloadMonitoringPerf","operation":"Read WorkloadMonitoringPerf - data","description":"Read data from the WorkloadMonitoringPerf table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WUDOAggregatedStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WUDOAggregatedStatus","operation":"Read WUDOAggregatedStatus - data","description":"Read data from the WUDOAggregatedStatus table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WUDOStatus/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WUDOStatus","operation":"Read WUDOStatus data","description":"Read - data from the WUDOStatus table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WVDCheckpoints/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WVDCheckpoints","operation":"Read WVDCheckpoints - data","description":"Read data from the WVDCheckpoints table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WVDConnections/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WVDConnections","operation":"Read WVDConnections - data","description":"Read data from the WVDConnections table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WVDErrors/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WVDErrors","operation":"Read WVDErrors data","description":"Read - data from the WVDErrors table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WVDFeeds/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WVDFeeds","operation":"Read WVDFeeds data","description":"Read - data from the WVDFeeds table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WVDHostRegistrations/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WVDHostRegistrations","operation":"Read WVDHostRegistrations - data","description":"Read data from the WVDHostRegistrations table"},"properties":{}},{"name":"Microsoft.Insights/Logs/WVDManagement/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"WVDManagement","operation":"Read WVDManagement - data","description":"Read data from the WVDManagement table"},"properties":{}},{"name":"Microsoft.Insights/Baseline/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Baseline","operation":"Read metric baseline","description":"Read - a metric baseline (preview)"},"properties":{}},{"name":"Microsoft.Insights/CalculateBaseline/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Baseline","operation":"Calculate baseline","description":"Calculate - baseline for metric values (preview)"},"properties":{}},{"name":"Microsoft.Insights/MetricBaselines/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Metric Baseline","operation":"Read metric baselines","description":"Read - metric baselines"},"properties":{}},{"name":"Microsoft.Insights/DataCollectionRules/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Data collection rule","operation":"Read data collection - rule","description":"Read a data collection rule"},"properties":{}},{"name":"Microsoft.Insights/DataCollectionRules/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Data collection rule","operation":"Create or update - data collection rule","description":"Create or update a data collection rule"},"properties":{}},{"name":"Microsoft.Insights/DataCollectionRules/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Data collection rule","operation":"Delete data - collection rule","description":"Delete a data collection rule"},"properties":{}},{"name":"Microsoft.Insights/DataCollectionRules/Data/Write","isDataAction":true,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Data collection rule","operation":"Send data to - data collection rule","description":"Send data to a data collection rule"},"properties":{}},{"name":"Microsoft.Insights/DataCollectionRuleAssociations/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Data collection rule association","operation":"Read - data collection rule association","description":"Read a resource''s association - with a data collection rule"},"properties":{}},{"name":"Microsoft.Insights/DataCollectionRuleAssociations/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Data collection rule association","operation":"Create - or update data collection rule association","description":"Create or update - a resource''s association with a data collection rule"},"properties":{}},{"name":"Microsoft.Insights/DataCollectionRuleAssociations/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Data collection rule association","operation":"Delete - data collection rule association","description":"Delete a resource''s association - with a data collection rule"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private Link Scope","operation":"Read a private - link scope","description":"Read a private link scope"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private Link Scope","operation":"Create or update - a private link scope","description":"Create or update a private link scope"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private Link Scope","operation":"Delete a private - link scope","description":"Delete a private link scope"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopeOperationStatuses/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private Link Scope operation status","operation":"Read - a private link scoped operation status","description":"Read a private link - scoped operation status"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/ScopedResources/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private Link Scoped Resource","operation":"Read - a private link scoped resource","description":"Read a private link scoped - resource"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/ScopedResources/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private Link Scoped Resource","operation":"Create - or update a private link scoped resource","description":"Create or update - a private link scoped resource"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/ScopedResources/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private Link Scoped Resource","operation":"Delete - a private link scoped resource","description":"Delete a private link scoped - resource"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/PrivateLinkResources/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private Link Resource","operation":"Read a private - link resource","description":"Read a private link resource"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/PrivateEndpointConnections/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private endpoint connection","operation":"Read - a private endpoint connection","description":"Read a private endpoint connection"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/PrivateEndpointConnections/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private endpoint connection","operation":"Create - or update a private endpoint connection","description":"Create or update a - private endpoint connection"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/PrivateEndpointConnections/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private endpoint connection","operation":"Delete - a private endpoint connection","description":"Delete a private endpoint connection"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/PrivateEndpointConnectionProxies/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private endpoint connection proxy","operation":"Read - a private endpoint connection proxy","description":"Read a private endpoint - connection proxy"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/PrivateEndpointConnectionProxies/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private endpoint connection proxy","operation":"Create - or update a private endpoint connection proxy","description":"Create or update - a private endpoint connection proxy"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/PrivateEndpointConnectionProxies/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private endpoint connection proxy","operation":"Delete - a private endpoint connection proxy","description":"Delete a private endpoint - connection proxy"},"properties":{}},{"name":"Microsoft.Insights/PrivateLinkScopes/PrivateEndpointConnectionProxies/Validate/Action","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"Private endpoint connection proxy","operation":"Validate - a private endpoint connection proxy","description":"Validate a private endpoint - connection proxy"},"properties":{}},{"name":"Microsoft.Insights/MyWorkbooks/Read","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MyWorkbooks","operation":"Read private workbook","description":"Read - a private Workbook"},"properties":{}},{"name":"Microsoft.Insights/MyWorkbooks/Write","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MyWorkbooks","operation":"Create or update private - workbook","description":"Create or update a private workbook"},"properties":{}},{"name":"Microsoft.Insights/MyWorkbooks/Delete","isDataAction":false,"display":{"publisher":"Microsoft","provider":"Microsoft - Azure Monitor","resource":"MyWorkbooks","operation":"Delete private workbook","description":"Delete - a private workbook"},"properties":{}}]}' - headers: - cache-control: - - no-cache - content-length: - - '169458' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:26:45 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: 'b''b\''{"location": "global", "properties": {"description": "This is the - description of the rule1", "severity": 3, "enabled": true, "scopes": ["/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name"], - "evaluationFrequency": "PT1M", "windowSize": "PT15M", "targetResourceType": - "Microsoft.Compute/virtualMachines", "targetResourceRegion": "southcentralus", - "criteria": {"odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - "allOf": [{"criterionType": "DynamicThresholdCriterion", "name": "High_CPU_80", - "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", - "timeAggregation": "Average", "dimensions": [], "operator": "GreaterOrLessThan", - "alertSensitivity": "Medium", "failingPeriods": {"numberOfEvaluationPeriods": - 4.0, "minFailingPeriodsToAlert": 4.0}}]}, "autoMitigate": false, "actions": - []}}\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '990' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/metricAlerts/metricnamexx?api-version=2018-03-01 - response: - body: - string: "{\r\n \"location\": \"global\",\r\n \"type\": \"Microsoft.Insights/metricAlerts\"\ - ,\r\n \"name\": \"metricnamexx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/metricAlerts/metricnamexx\"\ - ,\r\n \"properties\": {\r\n \"description\": \"This is the description\ - \ of the rule1\",\r\n \"severity\": 3,\r\n \"enabled\": true,\r\n \ - \ \"scopes\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name\"\ - \r\n ],\r\n \"evaluationFrequency\": \"PT1M\",\r\n \"windowSize\"\ - : \"PT15M\",\r\n \"templateType\": 13,\r\n \"templateSpecificParameters\"\ - : {\r\n \"direction\": \"UpAndDown\",\r\n \"sensitivity\": \"Medium\"\ - \r\n },\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \ - \ \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\"\ - : {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\"\ - : 4\r\n },\r\n \"name\": \"High_CPU_80\",\r\n \"\ - metricNamespace\": \"microsoft.compute/virtualmachines\",\r\n \"\ - metricName\": \"Percentage CPU\",\r\n \"dimensions\": [],\r\n \ - \ \"operator\": \"GreaterOrLessThan\",\r\n \"timeAggregation\"\ - : \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\ - \r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\ - \r\n },\r\n \"autoMitigate\": false,\r\n \"targetResourceType\":\ - \ \"Microsoft.Compute/virtualMachines\",\r\n \"targetResourceRegion\":\ - \ \"southcentralus\",\r\n \"actions\": []\r\n }\r\n}" - headers: - api-supported-versions: - - 1.0, 2.0, 2017-09-01-preview, 2018-03-01 - cache-control: - - no-cache - content-length: - - '1674' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:27:06 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-resource-requests: - - '299' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/metricAlerts/metricnamexx?api-version=2018-03-01 - response: - body: - string: "{\r\n \"location\": \"global\",\r\n \"type\": \"Microsoft.Insights/metricAlerts\"\ - ,\r\n \"name\": \"metricnamexx\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/metricAlerts/metricnamexx\"\ - ,\r\n \"properties\": {\r\n \"description\": \"This is the description\ - \ of the rule1\",\r\n \"severity\": 3,\r\n \"enabled\": true,\r\n \ - \ \"scopes\": [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name\"\ - \r\n ],\r\n \"evaluationFrequency\": \"PT1M\",\r\n \"windowSize\"\ - : \"PT15M\",\r\n \"templateType\": 13,\r\n \"templateSpecificParameters\"\ - : {\r\n \"direction\": \"UpAndDown\",\r\n \"sensitivity\": \"Medium\"\ - \r\n },\r\n \"criteria\": {\r\n \"allOf\": [\r\n {\r\n \ - \ \"alertSensitivity\": \"Medium\",\r\n \"failingPeriods\"\ - : {\r\n \"numberOfEvaluationPeriods\": 4,\r\n \"minFailingPeriodsToAlert\"\ - : 4\r\n },\r\n \"name\": \"High_CPU_80\",\r\n \"\ - metricNamespace\": \"microsoft.compute/virtualmachines\",\r\n \"\ - metricName\": \"Percentage CPU\",\r\n \"dimensions\": [],\r\n \ - \ \"operator\": \"GreaterOrLessThan\",\r\n \"timeAggregation\"\ - : \"Average\",\r\n \"criterionType\": \"DynamicThresholdCriterion\"\ - \r\n }\r\n ],\r\n \"odata.type\": \"Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria\"\ - \r\n },\r\n \"autoMitigate\": false,\r\n \"targetResourceType\":\ - \ \"Microsoft.Compute/virtualMachines\",\r\n \"targetResourceRegion\":\ - \ \"southcentralus\",\r\n \"actions\": []\r\n }\r\n}" - headers: - api-supported-versions: - - 1.0, 2.0, 2017-09-01-preview, 2018-03-01 - cache-control: - - no-cache - content-length: - - '1674' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:27:36 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/metricAlerts/metricnamexx/status?api-version=2018-03-01 - response: - body: - string: "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/metricAlerts/metricnamexx/status/Y3VycmVudFN0YXR1cw==\"\ - ,\r\n \"name\": \"Y3VycmVudFN0YXR1cw==\",\r\n \"type\": \"Microsoft.Insights/metricAlerts/status\"\ - ,\r\n \"properties\": {\r\n \"dimensions\": {},\r\n \"\ - status\": \"Unknown\",\r\n \"timestamp\": \"2020-09-16T03:27:39.1123665Z\"\ - \r\n }\r\n }\r\n ]\r\n}" - headers: - api-supported-versions: - - 1.0, 2.0, 2017-09-01-preview, 2018-03-01 - cache-control: - - no-cache - content-length: - - '517' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:27:38 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/metricAlerts/metricnamexx/status/Y3VycmVudFN0YXR1cw%3D%3D?api-version=2018-03-01 - response: - body: - string: "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/metricAlerts/metricnamexx\"\ - ,\r\n \"name\": \"Y3VycmVudFN0YXR1cw==\",\r\n \"type\": \"Microsoft.Insights/metricAlerts/status\"\ - ,\r\n \"properties\": {\r\n \"dimensions\": {},\r\n \"\ - status\": \"Healthy\",\r\n \"timestamp\": \"2020-09-16T03:27:41.803534Z\"\ - \r\n }\r\n }\r\n ]\r\n}" - headers: - api-supported-versions: - - 1.0, 2.0, 2017-09-01-preview, 2018-03-01 - cache-control: - - no-cache - content-length: - - '488' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:27:41 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default?api-version=2018-11-27-preview - response: - body: - string: '{"properties":{"resourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name","onboardingStatus":"unknown","dataStatus":"notPresent","data":[]},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name/providers/Microsoft.Insights/vmInsightsOnboardingStatuses/default","type":"Microsoft.Insights/vmInsightsOnboardingStatuses","name":"default"}' - headers: - cache-control: - - no-cache - content-length: - - '633' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:27:41 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - ServiceMap-API-AAPRODSEA/1.1.1348.311 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-elapsed: - - '5' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name/providers/microsoft.insights/metrics?api-version=2018-01-01 - response: - body: - string: '{"cost":0,"timespan":"2020-09-16T02:27:42Z/2020-09-16T03:27:42Z","interval":"PT1M","value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Compute/virtualMachines/vm_name/providers/Microsoft.Insights/metrics/Percentage - CPU","type":"Microsoft.Insights/metrics","name":{"value":"Percentage CPU","localizedValue":"Percentage - CPU"},"displayDescription":"The percentage of allocated compute units that - are currently in use by the Virtual Machine(s)","unit":"Percent","timeseries":[{"metadatavalues":[],"data":[{"timeStamp":"2020-09-16T02:27:00Z"},{"timeStamp":"2020-09-16T02:28:00Z"},{"timeStamp":"2020-09-16T02:29:00Z"},{"timeStamp":"2020-09-16T02:30:00Z"},{"timeStamp":"2020-09-16T02:31:00Z"},{"timeStamp":"2020-09-16T02:32:00Z"},{"timeStamp":"2020-09-16T02:33:00Z"},{"timeStamp":"2020-09-16T02:34:00Z"},{"timeStamp":"2020-09-16T02:35:00Z"},{"timeStamp":"2020-09-16T02:36:00Z"},{"timeStamp":"2020-09-16T02:37:00Z"},{"timeStamp":"2020-09-16T02:38:00Z"},{"timeStamp":"2020-09-16T02:39:00Z"},{"timeStamp":"2020-09-16T02:40:00Z"},{"timeStamp":"2020-09-16T02:41:00Z"},{"timeStamp":"2020-09-16T02:42:00Z"},{"timeStamp":"2020-09-16T02:43:00Z"},{"timeStamp":"2020-09-16T02:44:00Z"},{"timeStamp":"2020-09-16T02:45:00Z"},{"timeStamp":"2020-09-16T02:46:00Z"},{"timeStamp":"2020-09-16T02:47:00Z"},{"timeStamp":"2020-09-16T02:48:00Z"},{"timeStamp":"2020-09-16T02:49:00Z"},{"timeStamp":"2020-09-16T02:50:00Z"},{"timeStamp":"2020-09-16T02:51:00Z"},{"timeStamp":"2020-09-16T02:52:00Z"},{"timeStamp":"2020-09-16T02:53:00Z"},{"timeStamp":"2020-09-16T02:54:00Z"},{"timeStamp":"2020-09-16T02:55:00Z"},{"timeStamp":"2020-09-16T02:56:00Z"},{"timeStamp":"2020-09-16T02:57:00Z"},{"timeStamp":"2020-09-16T02:58:00Z"},{"timeStamp":"2020-09-16T02:59:00Z"},{"timeStamp":"2020-09-16T03:00:00Z"},{"timeStamp":"2020-09-16T03:01:00Z"},{"timeStamp":"2020-09-16T03:02:00Z"},{"timeStamp":"2020-09-16T03:03:00Z"},{"timeStamp":"2020-09-16T03:04:00Z"},{"timeStamp":"2020-09-16T03:05:00Z"},{"timeStamp":"2020-09-16T03:06:00Z"},{"timeStamp":"2020-09-16T03:07:00Z"},{"timeStamp":"2020-09-16T03:08:00Z"},{"timeStamp":"2020-09-16T03:09:00Z"},{"timeStamp":"2020-09-16T03:10:00Z"},{"timeStamp":"2020-09-16T03:11:00Z"},{"timeStamp":"2020-09-16T03:12:00Z"},{"timeStamp":"2020-09-16T03:13:00Z"},{"timeStamp":"2020-09-16T03:14:00Z"},{"timeStamp":"2020-09-16T03:15:00Z"},{"timeStamp":"2020-09-16T03:16:00Z"},{"timeStamp":"2020-09-16T03:17:00Z"},{"timeStamp":"2020-09-16T03:18:00Z"},{"timeStamp":"2020-09-16T03:19:00Z"},{"timeStamp":"2020-09-16T03:20:00Z"},{"timeStamp":"2020-09-16T03:21:00Z"},{"timeStamp":"2020-09-16T03:22:00Z"},{"timeStamp":"2020-09-16T03:23:00Z"},{"timeStamp":"2020-09-16T03:24:00Z"},{"timeStamp":"2020-09-16T03:25:00Z"},{"timeStamp":"2020-09-16T03:26:00Z"}]}],"errorCode":"Success"}],"namespace":"Microsoft.Compute/virtualMachines","resourceregion":"eastus"}' - headers: - cache-control: - - no-cache - content-length: - - '2949' - content-type: - - application/json - date: - - Wed, 16 Sep 2020 03:27:41 GMT - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding,Accept-Encoding - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Insights/metricAlerts/metricnamexx?api-version=2018-03-01 - response: - body: - string: '' - headers: - api-supported-versions: - - 1.0, 2.0, 2017-09-01-preview, 2018-03-01 - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 16 Sep 2020 03:27:47 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - x-powered-by: - - ASP.NET - status: - code: 200 - message: OK -version: 1 diff --git a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_monitor_diagnostic_settings.yaml b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_monitor_diagnostic_settings.yaml index 4da2b9bfe57d..d6be69b0b2fc 100644 --- a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_monitor_diagnostic_settings.yaml +++ b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_monitor_diagnostic_settings.yaml @@ -13,12 +13,12 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storage/5.0.0 Azure-SDK-For-Python + - python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.2 azure-mgmt-storage/5.0.0 Azure-SDK-For-Python accept-language: - en-US method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx683f167c?api-version=2019-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountxx683f167c?api-version=2019-04-01 response: body: string: '' @@ -30,11 +30,11 @@ interactions: content-type: - text/plain; charset=utf-8 date: - - Wed, 16 Sep 2020 03:28:08 GMT + - Fri, 05 Nov 2021 06:04:07 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/77a26213-d44a-4db7-b657-9207d7466ddd?monitor=true&api-version=2019-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/a9078a08-7b0e-411c-8fdb-6cbc57964296?monitor=true&api-version=2019-04-01 pragma: - no-cache server: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1194' status: code: 202 message: Accepted @@ -58,22 +58,22 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-storage/5.0.0 Azure-SDK-For-Python + - python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + msrest/0.6.21 msrest_azure/0.6.2 azure-mgmt-storage/5.0.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/77a26213-d44a-4db7-b657-9207d7466ddd?monitor=true&api-version=2019-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Storage/locations/eastus/asyncoperations/a9078a08-7b0e-411c-8fdb-6cbc57964296?monitor=true&api-version=2019-04-01 response: body: - string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx683f167c","name":"storageaccountx683f167c","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2020-09-16T03:28:07.5611253Z"},"blob":{"enabled":true,"lastEnabledTime":"2020-09-16T03:28:07.5611253Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2020-09-16T03:28:07.4830105Z","primaryEndpoints":{"blob":"https://storageaccountx683f167c.blob.core.windows.net/","queue":"https://storageaccountx683f167c.queue.core.windows.net/","table":"https://storageaccountx683f167c.table.core.windows.net/","file":"https://storageaccountx683f167c.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available"}}' + string: '{"sku":{"name":"Standard_LRS","tier":"Standard"},"kind":"Storage","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountxx683f167c","name":"storageaccountxx683f167c","type":"Microsoft.Storage/storageAccounts","location":"eastus","tags":{},"properties":{"networkAcls":{"bypass":"AzureServices","virtualNetworkRules":[],"ipRules":[],"defaultAction":"Allow"},"supportsHttpsTrafficOnly":true,"encryption":{"services":{"file":{"enabled":true,"lastEnabledTime":"2021-11-05T06:04:05.1863038Z"},"blob":{"enabled":true,"lastEnabledTime":"2021-11-05T06:04:05.1863038Z"}},"keySource":"Microsoft.Storage"},"provisioningState":"Succeeded","creationTime":"2021-11-05T06:04:05.0613031Z","primaryEndpoints":{"blob":"https://storageaccountxx683f167c.blob.core.windows.net/","queue":"https://storageaccountxx683f167c.queue.core.windows.net/","table":"https://storageaccountxx683f167c.table.core.windows.net/","file":"https://storageaccountxx683f167c.file.core.windows.net/"},"primaryLocation":"eastus","statusOfPrimary":"available"}}' headers: cache-control: - no-cache content-length: - - '1162' + - '1173' content-type: - application/json date: - - Wed, 16 Sep 2020 03:28:25 GMT + - Fri, 05 Nov 2021 06:04:24 GMT expires: - '-1' pragma: @@ -104,36 +104,33 @@ interactions: Content-Length: - '117' Content-Type: - - application/json; charset=utf-8 + - application/json User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-eventhub/2.6.0 Azure-SDK-For-Python - accept-language: - - en-US + - azsdk-python-azure-mgmt-eventhub/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c?api-version=2017-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacexx683f167c?api-version=2021-11-01 response: body: - string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c","name":"namespacex683f167c","type":"Microsoft.EventHub/Namespaces","location":"East - US","tags":{"tag1":"value1","tag2":"value2"},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Created","metricId":"00000000-0000-0000-0000-000000000000:namespacex683f167c","createdAt":"2020-09-16T03:28:32.01Z","updatedAt":"2020-09-16T03:28:32.01Z","serviceBusEndpoint":"https://namespacex683f167c.servicebus.windows.net:443/","status":"Activating"}}' + string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacexx683f167c","name":"namespacexx683f167c","type":"Microsoft.EventHub/Namespaces","location":"East + US","tags":{"tag1":"value1","tag2":"value2"},"properties":{"disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Created","metricId":"00000000-0000-0000-0000-000000000000:namespacexx683f167c","createdAt":"2021-11-05T06:04:34.257Z","updatedAt":"2021-11-05T06:04:34.257Z","serviceBusEndpoint":"https://namespacexx683f167c.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '762' + - '820' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:28:32 GMT + - Fri, 05 Nov 2021 06:04:36 GMT expires: - '-1' pragma: - no-cache server: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 - Microsoft-HTTPAPI/2.0 server-sb: - - Service-Bus-Resource-Provider/SN1 + - Service-Bus-Resource-Provider/CH3 strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -151,189 +148,28 @@ interactions: body: null headers: Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-eventhub/2.6.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c?api-version=2017-04-01 - response: - body: - string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c","name":"namespacex683f167c","type":"Microsoft.EventHub/Namespaces","location":"East - US","tags":{"tag1":"value1","tag2":"value2"},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Created","metricId":"00000000-0000-0000-0000-000000000000:namespacex683f167c","createdAt":"2020-09-16T03:28:32.01Z","updatedAt":"2020-09-16T03:28:32.01Z","serviceBusEndpoint":"https://namespacex683f167c.servicebus.windows.net:443/","status":"Activating"}}' - headers: - cache-control: - - no-cache - content-length: - - '762' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:29:04 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Service-Bus-Resource-Provider/SN1 - - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-eventhub/2.6.0 Azure-SDK-For-Python + - azsdk-python-azure-mgmt-eventhub/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c?api-version=2017-04-01 - response: - body: - string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c","name":"namespacex683f167c","type":"Microsoft.EventHub/Namespaces","location":"East - US","tags":{"tag1":"value1","tag2":"value2"},"properties":{"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Succeeded","metricId":"00000000-0000-0000-0000-000000000000:namespacex683f167c","createdAt":"2020-09-16T03:28:32.01Z","updatedAt":"2020-09-16T03:29:15.43Z","serviceBusEndpoint":"https://namespacex683f167c.servicebus.windows.net:443/","status":"Active"}}' - headers: - cache-control: - - no-cache - content-length: - - '760' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:29:35 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Service-Bus-Resource-Provider/SN1 - - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/SN1 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: '{"properties": {"rights": ["Listen", "Send", "Manage"]}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '56' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-eventhub/2.6.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c/AuthorizationRules/authorizationrulex683f167c?api-version=2017-04-01 - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c/AuthorizationRules/authorizationrulex683f167c","name":"authorizationrulex683f167c","type":"Microsoft.EventHub/Namespaces/AuthorizationRules","location":"East - US","properties":{"rights":["Listen","Send","Manage"]}}' - headers: - cache-control: - - no-cache - content-length: - - '422' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:29:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Service-Bus-Resource-Provider/CH3 - - Microsoft-HTTPAPI/2.0 - server-sb: - - Service-Bus-Resource-Provider/CH3 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1190' - status: - code: 200 - message: OK -- request: - body: 'b''b\''{"properties": {"messageRetentionInDays": 4, "partitionCount": 4, - "status": "Active", "captureDescription": {"enabled": true, "encoding": "Avro", - "intervalInSeconds": 120, "sizeLimitInBytes": 10485763, "destination": {"name": - "EventHubArchive.AzureBlockBlob", "properties": {"storageAccountResourceId": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx683f167c", - "blobContainer": "container", "archiveNameFormat": "{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"}}}}}\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '657' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-eventhub/2.6.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c/eventhubs/eventhubx683f167c?api-version=2017-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacexx683f167c?api-version=2021-11-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c/eventhubs/eventhubx683f167c","name":"eventhubx683f167c","type":"Microsoft.EventHub/Namespaces/EventHubs","location":"East - US","properties":{"messageRetentionInDays":4,"partitionCount":4,"status":"Active","createdAt":"2020-09-16T03:29:45.13Z","updatedAt":"2020-09-16T03:29:45.647Z","partitionIds":["0","1","2","3"],"captureDescription":{"enabled":true,"encoding":"Avro","destination":{"name":"EventHubArchive.AzureBlockBlob","properties":{"storageAccountResourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx683f167c","blobContainer":"container","archiveNameFormat":"{Namespace}/{EventHub}/{PartitionId}/{Year}/{Month}/{Day}/{Hour}/{Minute}/{Second}"}},"intervalInSeconds":120,"sizeLimitInBytes":10485763}}}' + string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacexx683f167c","name":"namespacexx683f167c","type":"Microsoft.EventHub/Namespaces","location":"East + US","tags":{"tag1":"value1","tag2":"value2"},"properties":{"disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Created","metricId":"00000000-0000-0000-0000-000000000000:namespacexx683f167c","createdAt":"2021-11-05T06:04:34.257Z","updatedAt":"2021-11-05T06:04:34.257Z","serviceBusEndpoint":"https://namespacexx683f167c.servicebus.windows.net:443/","status":"Activating"}}' headers: cache-control: - no-cache content-length: - - '1076' + - '820' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:29:46 GMT + - Fri, 05 Nov 2021 06:05:08 GMT expires: - '-1' pragma: @@ -351,44 +187,35 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1189' status: code: 200 message: OK - request: - body: '{"properties": {"rights": ["Listen", "Send", "Manage"]}}' + body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate Connection: - keep-alive - Content-Length: - - '56' - Content-Type: - - application/json; charset=utf-8 User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-eventhub/2.6.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c/eventhubs/eventhubx683f167c/authorizationRules/authorizationrulex683f167c?api-version=2017-04-01 + - azsdk-python-azure-mgmt-eventhub/10.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacexx683f167c?api-version=2021-11-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacex683f167c/eventhubs/eventhubx683f167c/authorizationRules/authorizationrulex683f167c","name":"authorizationrulex683f167c","type":"Microsoft.EventHub/Namespaces/EventHubs/AuthorizationRules","location":"East - US","properties":{"rights":["Listen","Send","Manage"]}}' + string: '{"sku":{"name":"Standard","tier":"Standard","capacity":1},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.EventHub/namespaces/namespacexx683f167c","name":"namespacexx683f167c","type":"Microsoft.EventHub/Namespaces","location":"East + US","tags":{"tag1":"value1","tag2":"value2"},"properties":{"disableLocalAuth":false,"zoneRedundant":false,"isAutoInflateEnabled":false,"maximumThroughputUnits":0,"kafkaEnabled":true,"provisioningState":"Succeeded","metricId":"00000000-0000-0000-0000-000000000000:namespacexx683f167c","createdAt":"2021-11-05T06:04:34.257Z","updatedAt":"2021-11-05T06:05:25.407Z","serviceBusEndpoint":"https://namespacexx683f167c.servicebus.windows.net:443/","status":"Active"}}' headers: cache-control: - no-cache content-length: - - '460' + - '818' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:29:47 GMT + - Fri, 05 Nov 2021 06:05:39 GMT expires: - '-1' pragma: @@ -406,440 +233,6 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1191' - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "tags": {"tag1": "val1"}, "properties": {"sku": - {"name": "PerNode"}, "retentionInDays": 30}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '115' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-loganalytics/0.2.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.OperationalInsights/workspaces/workspacex683f167c?api-version=2015-11-01-preview - response: - body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\"\ - : \"577a5b1e-cde7-47ab-9476-0db74f71f8c8\",\r\n \"provisioningState\":\ - \ \"Creating\",\r\n \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \ - \ \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": \"\ - Wed, 16 Sep 2020 03:29:51 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\ - \n \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\":\ - \ 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n \ - \ },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n\ - \ \"quotaNextResetTime\": \"Thu, 17 Sep 2020 02:00:00 GMT\",\r\n \ - \ \"dataIngestionStatus\": \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\"\ - : \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \ - \ \"createdDate\": \"Wed, 16 Sep 2020 03:29:51 GMT\",\r\n \"modifiedDate\"\ - : \"Wed, 16 Sep 2020 03:29:51 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacex683f167c\"\ - ,\r\n \"name\": \"workspacex683f167c\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\"\ - ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"val1\"\ - \r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1212' - content-type: - - application/json - date: - - Wed, 16 Sep 2020 03:29:53 GMT - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1197' - x-powered-by: - - ASP.NET - - ASP.NET - status: - code: 201 - message: Created -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-loganalytics/0.2.0 Azure-SDK-For-Python - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.OperationalInsights/workspaces/workspacex683f167c?api-version=2015-11-01-preview - response: - body: - string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\"\ - : \"577a5b1e-cde7-47ab-9476-0db74f71f8c8\",\r\n \"provisioningState\":\ - \ \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \ - \ \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": \"\ - Wed, 16 Sep 2020 03:29:51 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\ - \n \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\":\ - \ 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n \ - \ },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n\ - \ \"quotaNextResetTime\": \"Thu, 17 Sep 2020 02:00:00 GMT\",\r\n \ - \ \"dataIngestionStatus\": \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\"\ - : \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \ - \ \"createdDate\": \"Wed, 16 Sep 2020 03:29:51 GMT\",\r\n \"modifiedDate\"\ - : \"Wed, 16 Sep 2020 03:29:52 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacex683f167c\"\ - ,\r\n \"name\": \"workspacex683f167c\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\"\ - ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"val1\"\ - \r\n }\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '1213' - content-type: - - application/json - date: - - Wed, 16 Sep 2020 03:30:24 GMT - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-powered-by: - - ASP.NET - - ASP.NET - status: - code: 200 - message: OK -- request: - body: '{"location": "eastus", "properties": {"definition": {"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", - "contentVersion": "1.0.0.0", "parameters": {}, "triggers": {}, "actions": {}, - "outputs": {}}}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '267' - Content-Type: - - application/json; charset=utf-8 - User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-logic/3.0.0 Azure-SDK-For-Python - accept-language: - - en-US - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Logic/workflows/workflow683f167c?api-version=2016-06-01 - response: - body: - string: '{"properties":{"provisioningState":"Succeeded","createdTime":"2020-09-16T03:30:32.3122188Z","changedTime":"2020-09-16T03:30:32.3033861Z","state":"Enabled","version":"08586013798531987380","accessEndpoint":"https://prod-16.eastus.logic.azure.com:443/workflows/d08101e94e244680ae76b681ec2f9b11","definition":{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#","contentVersion":"1.0.0.0","parameters":{},"triggers":{},"actions":{},"outputs":{}},"parameters":{},"endpointsConfiguration":{"workflow":{"outgoingIpAddresses":[{"address":"13.92.98.111"},{"address":"40.121.91.41"},{"address":"40.114.82.191"},{"address":"23.101.139.153"},{"address":"23.100.29.190"},{"address":"23.101.136.201"},{"address":"104.45.153.81"},{"address":"23.101.132.208"}],"accessEndpointIpAddresses":[{"address":"137.135.106.54"},{"address":"40.117.99.79"},{"address":"40.117.100.228"},{"address":"137.116.126.165"}]},"connector":{"outgoingIpAddresses":[{"address":"40.71.11.80/28"},{"address":"40.71.249.205"},{"address":"40.114.40.132"},{"address":"40.71.249.139"}]}}},"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Logic/workflows/workflow683f167c","name":"workflow683f167c","type":"Microsoft.Logic/workflows","location":"eastus"}' - headers: - cache-control: - - no-cache - content-length: - - '1395' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:30:34 GMT - expires: - - '-1' - pragma: - - no-cache - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-writes: - - '1196' - status: - code: 201 - message: Created -- request: - body: 'b''b\''{"properties": {"storageAccountId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx683f167c", - "eventHubAuthorizationRuleId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.eventhub/namespaces/namespacex683f167c/authorizationrules/authorizationrulex683f167c", - "eventHubName": "eventhubx683f167c", "metrics": [], "logs": [{"category": "WorkflowRuntime", - "enabled": true, "retentionPolicy": {"enabled": false, "days": 0}}], "workspaceId": - "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacex683f167c"}}\''''' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '925' - Content-Type: - - application/json - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettings/insightx683f167c?api-version=2017-05-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettings/insightx683f167c","type":null,"name":"insightx683f167c","location":null,"kind":null,"tags":null,"properties":{"storageAccountId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx683f167c","serviceBusRuleId":null,"workspaceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacex683f167c","eventHubAuthorizationRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.eventhub/namespaces/namespacex683f167c/authorizationrules/authorizationrulex683f167c","eventHubName":"eventhubx683f167c","metrics":[],"logs":[{"category":"WorkflowRuntime","enabled":true,"retentionPolicy":{"enabled":false,"days":0}}],"logAnalyticsDestinationType":null},"identity":null}' - headers: - cache-control: - - no-cache - content-length: - - '1326' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:30:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-resource-requests: - - '149' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettingsCategories?api-version=2017-05-01-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime","type":"microsoft.insights/diagnosticSettingsCategories","name":"WorkflowRuntime","location":null,"kind":null,"tags":null,"properties":{"categoryType":"Logs"},"identity":null},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettingsCategories/AllMetrics","type":"microsoft.insights/diagnosticSettingsCategories","name":"AllMetrics","location":null,"kind":null,"tags":null,"properties":{"categoryType":"Metrics"},"identity":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '912' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:30:40 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettings?api-version=2017-05-01-preview - response: - body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettings/insightx683f167c","type":null,"name":"insightx683f167c","location":null,"kind":null,"tags":null,"properties":{"storageAccountId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx683f167c","serviceBusRuleId":null,"workspaceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacex683f167c","eventHubAuthorizationRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.eventhub/namespaces/namespacex683f167c/authorizationrules/authorizationrulex683f167c","eventHubName":"eventhubx683f167c","metrics":[],"logs":[{"category":"WorkflowRuntime","enabled":true,"retentionPolicy":{"enabled":false,"days":0}}],"logAnalyticsDestinationType":null},"identity":null}]}' - headers: - cache-control: - - no-cache - content-length: - - '1338' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:30:41 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettings/insightx683f167c?api-version=2017-05-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettings/insightx683f167c","type":null,"name":"insightx683f167c","location":null,"kind":null,"tags":null,"properties":{"storageAccountId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Storage/storageAccounts/storageaccountx683f167c","serviceBusRuleId":null,"workspaceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacex683f167c","eventHubAuthorizationRuleId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.eventhub/namespaces/namespacex683f167c/authorizationrules/authorizationrulex683f167c","eventHubName":"eventhubx683f167c","metrics":[{"category":"AllMetrics","enabled":false,"retentionPolicy":{"enabled":false,"days":0}}],"logs":[{"category":"WorkflowRuntime","enabled":true,"retentionPolicy":{"enabled":false,"days":0}}],"logAnalyticsDestinationType":null},"identity":null}' - headers: - cache-control: - - no-cache - content-length: - - '1412' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:30:41 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime?api-version=2017-05-01-preview - response: - body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettingsCategories/WorkflowRuntime","type":"microsoft.insights/diagnosticSettingsCategories","name":"WorkflowRuntime","location":null,"kind":null,"tags":null,"properties":{"categoryType":"Logs"},"identity":null}' - headers: - cache-control: - - no-cache - content-length: - - '453' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 16 Sep 2020 03:30:42 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '0' - User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) - method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.logic/workflows/workflow683f167c/providers/microsoft.insights/diagnosticSettings/insightx683f167c?api-version=2017-05-01-preview - response: - body: - string: '' - headers: - cache-control: - - no-cache - content-length: - - '0' - date: - - Wed, 16 Sep 2020 03:30:44 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-content-type-options: - - nosniff - x-ms-ratelimit-remaining-subscription-deletes: - - '14997' status: code: 200 message: OK diff --git a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_scheduled_query_rules.yaml b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_scheduled_query_rules.yaml index c04236b96fea..ec1aeb6fbc14 100644 --- a/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_scheduled_query_rules.yaml +++ b/sdk/monitor/azure-mgmt-monitor/tests/recordings/test_cli_mgmt_monitor.test_scheduled_query_rules.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"location": "eastus", "tags": {"tag1": "val1"}, "properties": {"sku": + body: '{"tags": {"tag1": "val1"}, "location": "eastus", "properties": {"sku": {"name": "PerNode"}, "retentionInDays": 30}}' headers: Accept: @@ -12,29 +12,25 @@ interactions: Content-Length: - '115' Content-Type: - - application/json; charset=utf-8 + - application/json User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-loganalytics/0.2.0 Azure-SDK-For-Python - accept-language: - - en-US + - azsdk-python-mgmt-loganalytics/11.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.OperationalInsights/workspaces/workspacexe69613f0?api-version=2015-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.OperationalInsights/workspaces/workspacexe69613f0?api-version=2020-10-01 response: body: string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\"\ - : \"2be28b83-a92e-4a8d-81b5-19750f96aab7\",\r\n \"provisioningState\":\ + : \"52f6cca9-ebbd-4de5-aac4-97947fea2d17\",\r\n \"provisioningState\":\ \ \"Creating\",\r\n \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \ - \ \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": \"\ - Wed, 16 Sep 2020 03:31:11 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\ - \n \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\":\ - \ 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n \ - \ },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n\ - \ \"quotaNextResetTime\": \"Thu, 17 Sep 2020 02:00:00 GMT\",\r\n \ - \ \"dataIngestionStatus\": \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\"\ + \ \"lastSkuUpdate\": \"Fri, 05 Nov 2021 06:06:05 GMT\"\r\n },\r\n \ + \ \"retentionInDays\": 30,\r\n \"features\": {\r\n \"legacy\": 0,\r\ + \n \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\"\ + : true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\"\ + : -1.0,\r\n \"quotaNextResetTime\": \"Fri, 05 Nov 2021 22:00:00 GMT\"\ + ,\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\"\ : \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \ - \ \"createdDate\": \"Wed, 16 Sep 2020 03:31:11 GMT\",\r\n \"modifiedDate\"\ - : \"Wed, 16 Sep 2020 03:31:11 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0\"\ + \ \"createdDate\": \"Fri, 05 Nov 2021 06:06:05 GMT\",\r\n \"modifiedDate\"\ + : \"Fri, 05 Nov 2021 06:06:05 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0\"\ ,\r\n \"name\": \"workspacexe69613f0\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\"\ ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"val1\"\ \r\n }\r\n}" @@ -42,11 +38,11 @@ interactions: cache-control: - no-cache content-length: - - '1212' + - '1173' content-type: - application/json date: - - Wed, 16 Sep 2020 03:31:13 GMT + - Fri, 05 Nov 2021 06:06:07 GMT pragma: - no-cache server: @@ -68,31 +64,29 @@ interactions: body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10 - msrest_azure/0.6.2 azure-mgmt-loganalytics/0.2.0 Azure-SDK-For-Python + - azsdk-python-mgmt-loganalytics/11.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.OperationalInsights/workspaces/workspacexe69613f0?api-version=2015-11-01-preview + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.OperationalInsights/workspaces/workspacexe69613f0?api-version=2020-10-01 response: body: string: "{\r\n \"properties\": {\r\n \"source\": \"Azure\",\r\n \"customerId\"\ - : \"2be28b83-a92e-4a8d-81b5-19750f96aab7\",\r\n \"provisioningState\":\ + : \"52f6cca9-ebbd-4de5-aac4-97947fea2d17\",\r\n \"provisioningState\":\ \ \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"pergb2018\",\r\n \ - \ \"maxCapacityReservationLevel\": 3000,\r\n \"lastSkuUpdate\": \"\ - Wed, 16 Sep 2020 03:31:11 GMT\"\r\n },\r\n \"retentionInDays\": 30,\r\ - \n \"features\": {\r\n \"legacy\": 0,\r\n \"searchVersion\":\ - \ 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\": true\r\n \ - \ },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\": -1.0,\r\n\ - \ \"quotaNextResetTime\": \"Thu, 17 Sep 2020 02:00:00 GMT\",\r\n \ - \ \"dataIngestionStatus\": \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\"\ + \ \"lastSkuUpdate\": \"Fri, 05 Nov 2021 06:06:05 GMT\"\r\n },\r\n \ + \ \"retentionInDays\": 30,\r\n \"features\": {\r\n \"legacy\": 0,\r\ + \n \"searchVersion\": 1,\r\n \"enableLogAccessUsingOnlyResourcePermissions\"\ + : true\r\n },\r\n \"workspaceCapping\": {\r\n \"dailyQuotaGb\"\ + : -1.0,\r\n \"quotaNextResetTime\": \"Fri, 05 Nov 2021 22:00:00 GMT\"\ + ,\r\n \"dataIngestionStatus\": \"RespectQuota\"\r\n },\r\n \"publicNetworkAccessForIngestion\"\ : \"Enabled\",\r\n \"publicNetworkAccessForQuery\": \"Enabled\",\r\n \ - \ \"createdDate\": \"Wed, 16 Sep 2020 03:31:11 GMT\",\r\n \"modifiedDate\"\ - : \"Wed, 16 Sep 2020 03:31:12 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0\"\ + \ \"createdDate\": \"Fri, 05 Nov 2021 06:06:05 GMT\",\r\n \"modifiedDate\"\ + : \"Fri, 05 Nov 2021 06:06:06 GMT\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0\"\ ,\r\n \"name\": \"workspacexe69613f0\",\r\n \"type\": \"Microsoft.OperationalInsights/workspaces\"\ ,\r\n \"location\": \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"val1\"\ \r\n }\r\n}" @@ -100,11 +94,11 @@ interactions: cache-control: - no-cache content-length: - - '1213' + - '1174' content-type: - application/json date: - - Wed, 16 Sep 2020 03:31:44 GMT + - Fri, 05 Nov 2021 06:06:37 GMT pragma: - no-cache server: @@ -125,15 +119,15 @@ interactions: code: 200 message: OK - request: - body: 'b''b\''{"location": "eastus", "properties": {"description": "log alert - description", "enabled": "true", "source": {"query": "Heartbeat | summarize - AggregatedValue = count() by bin(TimeGenerated, 5m)", "dataSourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0", + body: '{"location": "eastus", "properties": {"description": "log alert description", + "enabled": "true", "source": {"query": "Heartbeat | summarize AggregatedValue + = count() by bin(TimeGenerated, 5m)", "dataSourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0", "queryType": "ResultCount"}, "schedule": {"frequencyInMinutes": 15, "timeWindowInMinutes": 15}, "action": {"odata.type": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction", "severity": "1", "aznsAction": {"actionGroup": [], "emailSubject": "Email Header", "customWebhookPayload": "{}"}, "trigger": {"thresholdOperator": "GreaterThan", "threshold": 3.0, "metricTrigger": {"thresholdOperator": "GreaterThan", "threshold": - 5.0, "metricTriggerType": "Consecutive", "metricColumn": "Computer"}}}}}\''''' + 5.0, "metricTriggerType": "Consecutive", "metricColumn": "Computer"}}}}}' headers: Accept: - application/json @@ -142,61 +136,46 @@ interactions: Connection: - keep-alive Content-Length: - - '1015' + - '1020' Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.insights/scheduledQueryRules/scheduledqueryrulee69613f0?api-version=2018-04-16 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.Insights/scheduledQueryRules/scheduledqueryrulee69613f0?api-version=2018-04-16 response: body: - string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/scheduledqueryrules/scheduledqueryrulee69613f0\"\ - ,\r\n \"name\": \"scheduledqueryrulee69613f0\",\r\n \"type\": \"microsoft.insights/scheduledqueryrules\"\ - ,\r\n \"location\": \"eastus\",\r\n \"tags\": null,\r\n \"kind\": null,\r\ - \n \"etag\": \"\\\"09005b4b-0000-0100-0000-5f6187290000\\\"\",\r\n \"properties\"\ - : {\r\n \"description\": \"log alert description\",\r\n \"displayName\"\ - : \"scheduledqueryrulee69613f0\",\r\n \"enabled\": \"true\",\r\n \"\ - lastUpdatedTime\": \"2020-09-16T03:31:53.2169016Z\",\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"source\": {\r\n \"query\": \"Heartbeat | summarize\ - \ AggregatedValue = count() by bin(TimeGenerated, 5m)\",\r\n \"dataSourceId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0\"\ - ,\r\n \"queryType\": \"ResultCount\"\r\n },\r\n \"schedule\": {\r\ - \n \"frequencyInMinutes\": 15,\r\n \"timeWindowInMinutes\": 15\r\ - \n },\r\n \"action\": {\r\n \"severity\": \"1\",\r\n \"aznsAction\"\ - : {\r\n \"actionGroup\": [],\r\n \"emailSubject\": \"Email Header\"\ - ,\r\n \"customWebhookPayload\": \"{}\"\r\n },\r\n \"trigger\"\ - : {\r\n \"thresholdOperator\": \"GreaterThan\",\r\n \"threshold\"\ - : 3,\r\n \"metricTrigger\": {\r\n \"thresholdOperator\": \"\ - GreaterThan\",\r\n \"threshold\": 5,\r\n \"metricTriggerType\"\ - : \"Consecutive\",\r\n \"metricColumn\": \"Computer\"\r\n \ - \ }\r\n },\r\n \"odata.type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction\"\ - \r\n }\r\n }\r\n}" + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/scheduledqueryrules/scheduledqueryrulee69613f0","name":"scheduledqueryrulee69613f0","type":"microsoft.insights/scheduledqueryrules","location":"eastus","etag":"\"35005695-0000-0100-0000-6184c9fc0000\"","properties":{"description":"log + alert description","displayName":"scheduledqueryrulee69613f0","enabled":"true","lastUpdatedTime":"2021-11-05T06:06:52Z","provisioningState":"Succeeded","source":{"query":"Heartbeat + | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0","queryType":"ResultCount"},"schedule":{"frequencyInMinutes":15,"timeWindowInMinutes":15},"action":{"severity":"1","aznsAction":{"actionGroup":[],"emailSubject":"Email + Header","customWebhookPayload":"{}"},"trigger":{"thresholdOperator":"GreaterThan","threshold":3,"metricTrigger":{"thresholdOperator":"GreaterThan","threshold":5,"metricTriggerType":"Consecutive","metricColumn":"Computer"}},"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"}}}' headers: cache-control: - no-cache content-length: - - '1820' + - '1453' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:31:55 GMT + - Fri, 05 Nov 2021 06:06:53 GMT expires: - '-1' pragma: - no-cache - request-context: - - appId=cid-v1:c13a1a07-630f-4f42-b89b-f5aedd031684 server: - - Microsoft-IIS/10.0 + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1199' - x-powered-by: - - ASP.NET + - '1196' + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '14' + x-rate-limit-reset: + - '2021-11-05T06:07:47.2686030Z' status: code: 201 message: Created @@ -210,49 +189,30 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.insights/scheduledQueryRules/scheduledqueryrulee69613f0?api-version=2018-04-16 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.Insights/scheduledQueryRules/scheduledqueryrulee69613f0?api-version=2018-04-16 response: body: - string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/scheduledqueryrules/scheduledqueryrulee69613f0\"\ - ,\r\n \"name\": \"scheduledqueryrulee69613f0\",\r\n \"type\": \"microsoft.insights/scheduledqueryrules\"\ - ,\r\n \"location\": \"eastus\",\r\n \"tags\": null,\r\n \"kind\": null,\r\ - \n \"etag\": \"\\\"09005b4b-0000-0100-0000-5f6187290000\\\"\",\r\n \"properties\"\ - : {\r\n \"description\": \"log alert description\",\r\n \"displayName\"\ - : \"scheduledqueryrulee69613f0\",\r\n \"enabled\": \"true\",\r\n \"\ - lastUpdatedTime\": \"2020-09-16T03:31:53.2169016Z\",\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"source\": {\r\n \"query\": \"Heartbeat | summarize\ - \ AggregatedValue = count() by bin(TimeGenerated, 5m)\",\r\n \"dataSourceId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0\"\ - ,\r\n \"queryType\": \"ResultCount\"\r\n },\r\n \"schedule\": {\r\ - \n \"frequencyInMinutes\": 15,\r\n \"timeWindowInMinutes\": 15\r\ - \n },\r\n \"action\": {\r\n \"severity\": \"1\",\r\n \"aznsAction\"\ - : {\r\n \"actionGroup\": [],\r\n \"emailSubject\": \"Email Header\"\ - ,\r\n \"customWebhookPayload\": \"{}\"\r\n },\r\n \"trigger\"\ - : {\r\n \"thresholdOperator\": \"GreaterThan\",\r\n \"threshold\"\ - : 3,\r\n \"metricTrigger\": {\r\n \"thresholdOperator\": \"\ - GreaterThan\",\r\n \"threshold\": 5,\r\n \"metricTriggerType\"\ - : \"Consecutive\",\r\n \"metricColumn\": \"Computer\"\r\n \ - \ }\r\n },\r\n \"odata.type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction\"\ - \r\n }\r\n }\r\n}" + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/scheduledqueryrules/scheduledqueryrulee69613f0","name":"scheduledqueryrulee69613f0","type":"microsoft.insights/scheduledqueryrules","location":"eastus","etag":"\"35005695-0000-0100-0000-6184c9fc0000\"","properties":{"description":"log + alert description","displayName":"scheduledqueryrulee69613f0","enabled":"true","lastUpdatedTime":"2021-11-05T06:06:52Z","provisioningState":"Succeeded","source":{"query":"Heartbeat + | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0","queryType":"ResultCount"},"schedule":{"frequencyInMinutes":15,"timeWindowInMinutes":15},"action":{"severity":"1","aznsAction":{"actionGroup":[],"emailSubject":"Email + Header","customWebhookPayload":"{}"},"trigger":{"thresholdOperator":"GreaterThan","threshold":3,"metricTrigger":{"thresholdOperator":"GreaterThan","threshold":5,"metricTriggerType":"Consecutive","metricColumn":"Computer"}},"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"}}}' headers: cache-control: - no-cache content-length: - - '1820' + - '1453' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:31:55 GMT + - Fri, 05 Nov 2021 06:06:54 GMT expires: - '-1' pragma: - no-cache - request-context: - - appId=cid-v1:c13a1a07-630f-4f42-b89b-f5aedd031684 server: - - Microsoft-IIS/10.0 + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -261,8 +221,12 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff - x-powered-by: - - ASP.NET + x-rate-limit-limit: + - 1m + x-rate-limit-remaining: + - '49' + x-rate-limit-reset: + - '2021-11-05T06:07:54.3201153Z' status: code: 200 message: OK @@ -280,49 +244,30 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.insights/scheduledQueryRules/scheduledqueryrulee69613f0?api-version=2018-04-16 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.Insights/scheduledQueryRules/scheduledqueryrulee69613f0?api-version=2018-04-16 response: body: - string: "{\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/scheduledqueryrules/scheduledqueryrulee69613f0\"\ - ,\r\n \"name\": \"scheduledqueryrulee69613f0\",\r\n \"type\": \"microsoft.insights/scheduledqueryrules\"\ - ,\r\n \"location\": \"eastus\",\r\n \"tags\": null,\r\n \"kind\": null,\r\ - \n \"etag\": \"\\\"09005e4b-0000-0100-0000-5f61872c0000\\\"\",\r\n \"properties\"\ - : {\r\n \"description\": \"log alert description\",\r\n \"displayName\"\ - : \"scheduledqueryrulee69613f0\",\r\n \"enabled\": \"true\",\r\n \"\ - lastUpdatedTime\": \"2020-09-16T03:31:56.639853Z\",\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"source\": {\r\n \"query\": \"Heartbeat | summarize\ - \ AggregatedValue = count() by bin(TimeGenerated, 5m)\",\r\n \"dataSourceId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0\"\ - ,\r\n \"queryType\": \"ResultCount\"\r\n },\r\n \"schedule\": {\r\ - \n \"frequencyInMinutes\": 15,\r\n \"timeWindowInMinutes\": 15\r\ - \n },\r\n \"action\": {\r\n \"severity\": \"1\",\r\n \"aznsAction\"\ - : {\r\n \"actionGroup\": [],\r\n \"emailSubject\": \"Email Header\"\ - ,\r\n \"customWebhookPayload\": \"{}\"\r\n },\r\n \"trigger\"\ - : {\r\n \"thresholdOperator\": \"GreaterThan\",\r\n \"threshold\"\ - : 3,\r\n \"metricTrigger\": {\r\n \"thresholdOperator\": \"\ - GreaterThan\",\r\n \"threshold\": 5,\r\n \"metricTriggerType\"\ - : \"Consecutive\",\r\n \"metricColumn\": \"Computer\"\r\n \ - \ }\r\n },\r\n \"odata.type\": \"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction\"\ - \r\n }\r\n }\r\n}" + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/microsoft.insights/scheduledqueryrules/scheduledqueryrulee69613f0","name":"scheduledqueryrulee69613f0","type":"microsoft.insights/scheduledqueryrules","location":"eastus","etag":"\"35006895-0000-0100-0000-6184ca000000\"","properties":{"description":"log + alert description","displayName":"scheduledqueryrulee69613f0","enabled":"true","lastUpdatedTime":"2021-11-05T06:06:52Z","provisioningState":"Succeeded","source":{"query":"Heartbeat + | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)","dataSourceId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.operationalinsights/workspaces/workspacexe69613f0","queryType":"ResultCount"},"schedule":{"frequencyInMinutes":15,"timeWindowInMinutes":15},"action":{"severity":"1","aznsAction":{"actionGroup":[],"emailSubject":"Email + Header","customWebhookPayload":"{}"},"trigger":{"thresholdOperator":"GreaterThan","threshold":3,"metricTrigger":{"thresholdOperator":"GreaterThan","threshold":5,"metricTriggerType":"Consecutive","metricColumn":"Computer"}},"odata.type":"Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"}}}' headers: cache-control: - no-cache content-length: - - '1819' + - '1453' content-type: - application/json; charset=utf-8 date: - - Wed, 16 Sep 2020 03:31:57 GMT + - Fri, 05 Nov 2021 06:06:56 GMT expires: - '-1' pragma: - no-cache - request-context: - - appId=cid-v1:c13a1a07-630f-4f42-b89b-f5aedd031684 server: - - Microsoft-IIS/10.0 + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains transfer-encoding: @@ -332,9 +277,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' - x-powered-by: - - ASP.NET + - '1195' status: code: 200 message: OK @@ -350,9 +293,9 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-eventhub/1.0.0 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-monitor/3.0.0 Python/3.6.9 (Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/microsoft.insights/scheduledQueryRules/scheduledqueryrulee69613f0?api-version=2018-04-16 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rgname/providers/Microsoft.Insights/scheduledQueryRules/scheduledqueryrulee69613f0?api-version=2018-04-16 response: body: string: '' @@ -362,23 +305,19 @@ interactions: content-length: - '0' date: - - Wed, 16 Sep 2020 03:32:03 GMT + - Fri, 05 Nov 2021 06:07:03 GMT expires: - '-1' pragma: - no-cache - request-context: - - appId=cid-v1:c13a1a07-630f-4f42-b89b-f5aedd031684 server: - - Microsoft-IIS/10.0 + - Kestrel strict-transport-security: - max-age=31536000; includeSubDomains x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' - x-powered-by: - - ASP.NET + - '14998' status: code: 200 message: OK diff --git a/sdk/monitor/azure-mgmt-monitor/tests/test_cli_mgmt_monitor.py b/sdk/monitor/azure-mgmt-monitor/tests/test_cli_mgmt_monitor.py index 4dd645f72765..ba3891904592 100644 --- a/sdk/monitor/azure-mgmt-monitor/tests/test_cli_mgmt_monitor.py +++ b/sdk/monitor/azure-mgmt-monitor/tests/test_cli_mgmt_monitor.py @@ -154,7 +154,7 @@ def create_event_hub_authorization_rule( "tag2": "value2" } } - result = self.eventhub_client.namespaces.create_or_update(group_name, name_space, BODY) + result = self.eventhub_client.namespaces.begin_create_or_update(group_name, name_space, BODY) result.result() # NameSpaceAuthorizationRuleCreate[put] @@ -214,7 +214,7 @@ def create_workspace( "tag1": "val1" } } - result = self.loganalytics_client.workspaces.create_or_update( + result = self.loganalytics_client.workspaces.begin_create_or_update( group_name, workspace_name, BODY @@ -252,7 +252,7 @@ def create_site(self, group_name, location, site_name, app_service_plan_name): # use track 1 version def create_virtual_network(self, group_name, location, network_name, subnet_name): - azure_operation_poller = self.network_client.virtual_networks.create_or_update( + azure_operation_poller = self.network_client.virtual_networks.begin_create_or_update( group_name, network_name, { @@ -263,7 +263,7 @@ def create_virtual_network(self, group_name, location, network_name, subnet_name }, ) result_create = azure_operation_poller.result() - async_subnet_creation = self.network_client.subnets.create_or_update( + async_subnet_creation = self.network_client.subnets.begin_create_or_update( group_name, network_name, subnet_name, @@ -275,7 +275,7 @@ def create_virtual_network(self, group_name, location, network_name, subnet_name # use track 1 version def create_network_interface(self, group_name, location, nic_name, subnet): - async_nic_creation = self.network_client.network_interfaces.create_or_update( + async_nic_creation = self.network_client.network_interfaces.begin_create_or_update( group_name, nic_name, { @@ -438,17 +438,18 @@ def create_vmss( return vmss + @unittest.skip('hard to test') @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_monitor_diagnostic_settings(self, resource_group): SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID RESOURCE_GROUP = resource_group.name # RESOURCE_URI = "subscriptions/{}/resourcegroups/{}".format(SUBSCRIPTION_ID, RESOURCE_GROUP) - STORAGE_ACCOUNT_NAME = self.get_resource_name("storageaccountx") - NAMESPACE_NAME = self.get_resource_name("namespacex") - EVENTHUB_NAME = self.get_resource_name("eventhubx") - AUTHORIZATIONRULE_NAME = self.get_resource_name("authorizationrulex") - INSIGHT_NAME = self.get_resource_name("insightx") - WORKSPACE_NAME = self.get_resource_name("workspacex") + STORAGE_ACCOUNT_NAME = self.get_resource_name("storageaccountxx") + NAMESPACE_NAME = self.get_resource_name("namespacexx") + EVENTHUB_NAME = self.get_resource_name("eventhubxx") + AUTHORIZATIONRULE_NAME = self.get_resource_name("authorizationrulexx") + INSIGHT_NAME = self.get_resource_name("insightxx") + WORKSPACE_NAME = self.get_resource_name("workspacexx") WORKFLOW_NAME = self.get_resource_name("workflow") if self.is_live: @@ -516,12 +517,13 @@ def test_monitor_diagnostic_settings(self, resource_group): # Deletes the diagnostic setting[delete] result = self.mgmt_client.diagnostic_settings.delete(RESOURCE_URI, INSIGHT_NAME) + @unittest.skip('hard to test') @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_log_profiles(self, resource_group): SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID RESOURCE_GROUP = resource_group.name LOGPROFILE_NAME = self.get_resource_name("logprofilex") - STORAGE_ACCOUNT_NAME = self.get_resource_name("storageaccountx") + STORAGE_ACCOUNT_NAME = self.get_resource_name("storageaccountb") if self.is_live: storage_account_id = self.create_storage_account(RESOURCE_GROUP, AZURE_LOCATION, STORAGE_ACCOUNT_NAME) @@ -681,6 +683,7 @@ def test_alert_rule(self, resource_group): # Delete an alert rulte[delete] result = self.mgmt_client.alert_rules.delete(resource_group.name, ALERTRULE_NAME) + @unittest.skip('hard to test') @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_metric_alerts(self, resource_group): SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID @@ -848,6 +851,7 @@ def test_metric_alerts(self, resource_group): # Delete an alert rule[delete] result = self.mgmt_client.metric_alerts.delete(resource_group.name, METRIC_ALERT_NAME) + @unittest.skip('hard to test') @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_action_groups(self, resource_group): @@ -976,6 +980,7 @@ def test_activity_log_alerts(self, resource_group): # Delete an activity log alert[delete] result = self.mgmt_client.activity_log_alerts.delete(resource_group.name, ACTIVITY_LOG_ALERT_NAME) + @unittest.skip('hard to test') @RandomNameResourceGroupPreparer(location=AZURE_LOCATION) def test_autoscale_settings(self, resource_group): diff --git a/sdk/monitor/azure-mgmt-monitor/tests/test_cli_mgmt_monitor_async.py b/sdk/monitor/azure-mgmt-monitor/tests/test_cli_mgmt_monitor_async.py index d83700efeb6a..7ab190446663 100644 --- a/sdk/monitor/azure-mgmt-monitor/tests/test_cli_mgmt_monitor_async.py +++ b/sdk/monitor/azure-mgmt-monitor/tests/test_cli_mgmt_monitor_async.py @@ -112,7 +112,7 @@ def create_event_hub_authorization_rule( "tag2": "value2" } } - result = self.eventhub_client.namespaces.create_or_update(group_name, name_space, BODY) + result = self.eventhub_client.namespaces.begin_create_or_update(group_name, name_space, BODY) result.result() # NameSpaceAuthorizationRuleCreate[put] @@ -182,7 +182,7 @@ def create_workspace( # use track 1 version def create_virtual_network(self, group_name, location, network_name, subnet_name): - azure_operation_poller = self.network_client.virtual_networks.create_or_update( + azure_operation_poller = self.network_client.virtual_networks.begin_create_or_update( group_name, network_name, { @@ -193,7 +193,7 @@ def create_virtual_network(self, group_name, location, network_name, subnet_name }, ) result_create = azure_operation_poller.result() - async_subnet_creation = self.network_client.subnets.create_or_update( + async_subnet_creation = self.network_client.subnets.begincreate_or_update( group_name, network_name, subnet_name, @@ -288,12 +288,12 @@ def test_monitor_diagnostic_settings(self, resource_group): SUBSCRIPTION_ID = self.settings.SUBSCRIPTION_ID RESOURCE_GROUP = resource_group.name # RESOURCE_URI = "subscriptions/{}/resourcegroups/{}".format(SUBSCRIPTION_ID, RESOURCE_GROUP) - STORAGE_ACCOUNT_NAME = self.get_resource_name("storageaccountx") - NAMESPACE_NAME = self.get_resource_name("namespacex") - EVENTHUB_NAME = self.get_resource_name("eventhubx") - AUTHORIZATIONRULE_NAME = self.get_resource_name("authorizationrulex") - INSIGHT_NAME = self.get_resource_name("insightx") - WORKSPACE_NAME = self.get_resource_name("workspacex") + STORAGE_ACCOUNT_NAME = self.get_resource_name("storageaccountxx") + NAMESPACE_NAME = self.get_resource_name("namespacexx") + EVENTHUB_NAME = self.get_resource_name("eventhubxx") + AUTHORIZATIONRULE_NAME = self.get_resource_name("authorizationrulexx") + INSIGHT_NAME = self.get_resource_name("insightxx") + WORKSPACE_NAME = self.get_resource_name("workspacexx") WORKFLOW_NAME = self.get_resource_name("workflow") if self.is_live: diff --git a/sdk/monitor/azure-monitor-opentelemetry-exporter/tests/test_base_exporter.py b/sdk/monitor/azure-monitor-opentelemetry-exporter/tests/test_base_exporter.py index adf632154df9..79fae6e1dd3d 100644 --- a/sdk/monitor/azure-monitor-opentelemetry-exporter/tests/test_base_exporter.py +++ b/sdk/monitor/azure-monitor-opentelemetry-exporter/tests/test_base_exporter.py @@ -316,3 +316,8 @@ def __init__(self, status_code, text, headers={}, reason="test", content="{}"): self.headers = headers self.reason = reason self.content = content + self.raw = MockRaw() + +class MockRaw: + def __init__(self): + self.enforce_content_length = False diff --git a/sdk/monitor/azure-monitor-query/CHANGELOG.md b/sdk/monitor/azure-monitor-query/CHANGELOG.md index f1043932106b..11df874fa23e 100644 --- a/sdk/monitor/azure-monitor-query/CHANGELOG.md +++ b/sdk/monitor/azure-monitor-query/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 1.0.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 1.0.1 (2021-11-09) ### Bugs Fixed -### Other Changes +- Fixed a bug where Metadata values in timestamp don't show up sometimes. ## 1.0.0 (2021-10-06) diff --git a/sdk/monitor/azure-monitor-query/README.md b/sdk/monitor/azure-monitor-query/README.md index e40bacc0b17f..aac6d1f59b7a 100644 --- a/sdk/monitor/azure-monitor-query/README.md +++ b/sdk/monitor/azure-monitor-query/README.md @@ -445,7 +445,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [package]: https://aka.ms/azsdk-python-monitor-query-pypi [pip]: https://pypi.org/project/pip/ [python_logging]: https://docs.python.org/3/library/logging.html -[python-query-ref-docs]: https://docs.microsoft.com/python/api/overview/azure/monitor-query-readme?view=azure-python-preview +[python-query-ref-docs]: https://aka.ms/azsdk/python/monitor-query/docs [samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-query/samples [source]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/ diff --git a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py index 1b7b30da04de..fc0462f9b1be 100644 --- a/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py +++ b/sdk/monitor/azure-monitor-query/azure/monitor/query/_models.py @@ -509,7 +509,7 @@ class TimeSeriesElement(object): """ def __init__(self, **kwargs): # type: (Any) -> None - self.metadata_values = kwargs.get("metadatavalues", None) + self.metadata_values = kwargs.get("metadata_values", None) self.data = kwargs.get("data", None) @classmethod diff --git a/sdk/monitor/azure-monitor-query/migration_guide.md b/sdk/monitor/azure-monitor-query/migration_guide.md new file mode 100644 index 000000000000..631167991a76 --- /dev/null +++ b/sdk/monitor/azure-monitor-query/migration_guide.md @@ -0,0 +1,100 @@ +# Guide for migrating from azure-loganalytics v0.1.0 to azure-monitor-query v1.0.x + +This guide assists you in the migration from [azure-loganalytics](https://pypi.org/project/azure-loganalytics/) v0.1.0 to [azure-monitor-query](https://pypi.org/project/azure-monitor-query/) v1.0.x. Side-by-side comparisons are provided for similar operations between the two packages. + +Familiarity with the `azure-loganalytics` v0.1.0 package is assumed. If you're new to the Azure Monitor Query client library for Python, see the [README for `azure-monitor-query`](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/README.md) instead of this guide. + +## Table of contents + +- [Migration benefits](#migration-benefits) + - [Cross-service SDK improvements](#cross-service-sdk-improvements) + - [New features](#new-features) +- [Important changes](#important-changes) + - [The client](#the-client) + - [Client constructors and authentication](#client-constructors-and-authentication) + - [Send a single query request](#sending-a-single-query-request) +- [Additional samples](#additional-samples) + +## Migration benefits + +A natural question to ask when considering whether to adopt a new version or library is what the benefits of doing so would be. As Azure has matured and been embraced by a more diverse group of developers, we've focused on learning the patterns and practices to best support developer productivity and to understand the gaps that the Python client libraries have. + +Several areas of consistent feedback were expressed across the Azure client library ecosystem. One of the most important is that the client libraries for different Azure services haven't had a consistent approach to organization, naming, and API structure. Additionally, many developers have felt that the learning curve was too steep. The APIs didn't offer an approachable and consistent onboarding story for those learning Azure or exploring a specific Azure service. + +To improve the development experience across Azure services, a set of uniform [design guidelines](https://azure.github.io/azure-sdk/general_introduction.html) was created for all languages to drive a consistent experience with established API patterns for all services. A set of [Python-specific guidelines](https://azure.github.io/azure-sdk/python/guidelines/index.html) was also introduced to ensure that Python clients have a natural and idiomatic feel with respect to the Python ecosystem. Further details are available in the guidelines. + +### Cross-service SDK improvements + +The Azure Monitor Query client library also takes advantage of the cross-service improvements made to the Azure development experience. Examples include: + +- Using the new [`azure-identity`](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/README.md) library to share a single authentication approach between clients. +- A unified logging and diagnostics pipeline offering a common view of the activities across each of the client libraries. + +### New features + +There are a variety of new features in version 1.0 of the Monitor Query library. Some include: + +- The ability to execute a batch of queries with the `LogsQueryClient.query_batch()` API. +- The ability to configure the retry policy used by the operations on the client. +- Authentication with Azure Active Directory (Azure AD) credentials using [`azure-identity`](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/README.md). + +For more new features, changes, and bug fixes, see the [change log](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/monitor/azure-monitor-query/CHANGELOG.md). + +## Important changes + +### The client + +To provide a more intuitive experience, the top-level client to query logs was renamed to `LogsQueryClient` from `LogAnalyticsDataClient`. `LogsQueryClient` can be authenticated using Azure AD. This client is the single entry point to execute a single query or a batch of queries. + +#### Consistency + +There are now methods with similar names, signatures, and locations to create senders and receivers. The result is consistency and predictability on the various features of the library. + +### Client constructors and authentication + +In `azure-loganalytics` v0.1.0: + +```python +from azure.loganalytics import LogAnalyticsDataClient +from msrestazure.azure_active_directory import ServicePrincipalCredentials + +credential = ServicePrincipalCredentials(...) +client = LogAnalyticsDataClient(credentials=credential) +``` + +In `azure-monitor-query` v1.0.x: + +```python +from azure.monitor.query import LogsQueryClient +from azure.identity import DefaultAzureCredential + +credential = DefaultAzureCredential() +client = LogsQueryClient(credential=credential) +``` + +### Send a single query request + +In version 1.0 of the Monitor Query library: + +- The `QueryBody` is flattened. Users are expected to pass the Kusto query directly to the API. +- The `timespan` attribute is now required, which helped to avoid querying over the entire data set. + +In `azure-loganalytics` v0.1.0: + +```python +from azure.loganalytics.models import QueryBody + +query = 'AppRequests | take 5' +response = client.query(workspace_id, QueryBody(**{'query': query})) +``` + +In `azure-monitor-query` v1.0.x: + +```python +query = 'AppRequests | take 5' +client.query(workspace_id, query, timespan=timedelta(days=1)) +``` + +## Additional samples + +For more examples, see [Samples for azure-monitor-query](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/monitor/azure-monitor-query/samples). diff --git a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_log_query_async.py b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_log_query_async.py index b2ef2090b2f6..336b6f8d3861 100644 --- a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_log_query_async.py +++ b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_log_query_async.py @@ -3,41 +3,37 @@ """ FILE: sample_logs_single_query_async.py DESCRIPTION: - This sample demonstrates authenticating the LogsQueryClient and querying a single query. + This sample demonstrates authenticating the LogsQueryClient and executing a single + Kusto query. USAGE: python sample_logs_single_query_async.py Set the environment variables with your own values before running the sample: 1) LOGS_WORKSPACE_ID - The first (primary) workspace ID. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. -**Note** - Although this example uses pandas to prin the response, it is totally optional and is -not a required package for querying. Alternatively, native python can be used as well. +**Note** - Although this example uses pandas to print the response, it's optional and +isn't a required package for querying. Alternatively, native Python can be used as well. """ import asyncio import os import pandas as pd +from datetime import timedelta from azure.monitor.query.aio import LogsQueryClient from azure.monitor.query import LogsQueryStatus from azure.core.exceptions import HttpResponseError from azure.identity.aio import DefaultAzureCredential async def logs_query(): - credential = DefaultAzureCredential( - client_id = os.environ['AZURE_CLIENT_ID'], - client_secret = os.environ['AZURE_CLIENT_SECRET'], - tenant_id = os.environ['AZURE_TENANT_ID'] - ) + credential = DefaultAzureCredential() client = LogsQueryClient(credential) query= """AppRequests | take 5""" try: - response = await client.query_workspace(os.environ['LOG_WORKSPACE_ID'], query, timespan=timedelta(days=1)) + response = await client.query_workspace(os.environ['LOGS_WORKSPACE_ID'], query, timespan=timedelta(days=1)) if response.status == LogsQueryStatus.PARTIAL: error = response.partial_error data = response.partial_data diff --git a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_definitions_async.py b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_definitions_async.py index dc2aeab0f6dc..1b1ebd8068c7 100644 --- a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_definitions_async.py +++ b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_definitions_async.py @@ -7,13 +7,12 @@ USAGE: python sample_metric_definitions_async.py Set the environment variables with your own values before running the sample: - 1) METRICS_RESOURCE_URI - The resource uri of the resource for which the metrics are being queried. - In this example, an eventgrid account resource URI is taken. + 1) METRICS_RESOURCE_URI - The resource URI of the resource for which the metrics are being queried. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. + This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. + For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. + + In this example, an Event Grid account resource URI is taken. """ import os import asyncio diff --git a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_namespaces_async.py b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_namespaces_async.py index 7418414eb0df..cb6379804589 100644 --- a/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_namespaces_async.py +++ b/sdk/monitor/azure-monitor-query/samples/async_samples/sample_metric_namespaces_async.py @@ -7,13 +7,12 @@ USAGE: python sample_metric_namespaces_async.py Set the environment variables with your own values before running the sample: - 1) METRICS_RESOURCE_URI - The resource uri of the resource for which the metrics are being queried. - In this example, a storage account resource URI is taken. + 1) METRICS_RESOURCE_URI - The resource URI of the resource for which the metrics are being queried. + + This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. + For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. + In this example, a Storage account resource URI is taken. """ import os import asyncio diff --git a/sdk/monitor/azure-monitor-query/samples/sample_batch_query.py b/sdk/monitor/azure-monitor-query/samples/sample_batch_query.py index 95d6f9ac9efe..2963914143e7 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_batch_query.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_batch_query.py @@ -9,13 +9,11 @@ Set the environment variables with your own values before running the sample: 1) LOGS_WORKSPACE_ID - The The first (primary) workspace ID. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. -**Note** - Although this example uses pandas to prin the response, it is totally optional and is -not a required package for querying. Alternatively, native python can be used as well. +**Note** - Although this example uses pandas to print the response, it's optional and +isn't a required package for querying. Alternatively, native Python can be used as well. """ from datetime import datetime, timedelta, timezone @@ -24,7 +22,6 @@ from azure.monitor.query import LogsQueryClient, LogsBatchQuery, LogsQueryStatus from azure.identity import DefaultAzureCredential - credential = DefaultAzureCredential() client = LogsQueryClient(credential) @@ -34,18 +31,18 @@ LogsBatchQuery( query="AzureActivity | summarize count()", timespan=timedelta(hours=1), - workspace_id= os.environ['LOG_WORKSPACE_ID'] + workspace_id= os.environ['LOGS_WORKSPACE_ID'] ), LogsBatchQuery( query= """bad query""", timespan=timedelta(days=1), - workspace_id= os.environ['LOG_WORKSPACE_ID'] + workspace_id= os.environ['LOGS_WORKSPACE_ID'] ), LogsBatchQuery( query= """let Weight = 92233720368547758; range x from 1 to 3 step 1 | summarize percentilesw(x, Weight * 100, 50)""", - workspace_id= os.environ['LOG_WORKSPACE_ID'], + workspace_id= os.environ['LOGS_WORKSPACE_ID'], timespan=(datetime(2021, 6, 2, tzinfo=timezone.utc), datetime(2021, 6, 5, tzinfo=timezone.utc)), # (start, end) include_statistics=True ), diff --git a/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py b/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py index 2a4b86674561..7be747030e92 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_log_query_multiple_workspaces.py @@ -11,13 +11,11 @@ 1) LOGS_WORKSPACE_ID - The first (primary) workspace ID. 2) SECONDARY_WORKSPACE_ID - An additional workspace. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. -**Note** - Although this example uses pandas to prin the response, it is totally optional and is -not a required package for querying. Alternatively, native python can be used as well. +**Note** - Although this example uses pandas to print the response, it's optional and +isn't a required package for querying. Alternatively, native Python can be used as well. """ import os import pandas as pd @@ -34,7 +32,7 @@ try: response = client.query_workspace( - os.environ['LOG_WORKSPACE_ID'], + os.environ['LOGS_WORKSPACE_ID'], query, timespan=timedelta(days=1), additional_workspaces=[os.environ['SECONDARY_WORKSPACE_ID']] diff --git a/sdk/monitor/azure-monitor-query/samples/sample_logs_query_key_value_form.py b/sdk/monitor/azure-monitor-query/samples/sample_logs_query_key_value_form.py index 22ec67a6a096..d8877d521388 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_logs_query_key_value_form.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_logs_query_key_value_form.py @@ -10,13 +10,11 @@ Set the environment variables with your own values before running the sample: 1) LOGS_WORKSPACE_ID - The first (primary) workspace ID. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. -**Note** - Although this example uses pandas to prin the response, it is totally optional and is -not a required package for querying. Alternatively, native python can be used as well. +**Note** - Although this example uses pandas to print the response, it's optional and +isn't a required package for querying. Alternatively, native Python can be used as well. """ import os import pandas as pd @@ -33,7 +31,7 @@ query= """AppRequests | take 5""" try: - response = client.query_workspace(os.environ['LOG_WORKSPACE_ID'], query, timespan=timedelta(days=1)) + response = client.query_workspace(os.environ['LOGS_WORKSPACE_ID'], query, timespan=timedelta(days=1)) if response.status == LogsQueryStatus.PARTIAL: error = response.partial_error data = response.partial_data diff --git a/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query.py b/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query.py index 0e163ea06f78..7b62b2d2c361 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query.py @@ -9,13 +9,11 @@ Set the environment variables with your own values before running the sample: 1) LOGS_WORKSPACE_ID - The first (primary) workspace ID. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. -**Note** - Although this example uses pandas to prin the response, it is totally optional and is -not a required package for querying. Alternatively, native python can be used as well. +**Note** - Although this example uses pandas to print the response, it's optional and +isn't a required package for querying. Alternatively, native Python can be used as well. """ import os import pandas as pd @@ -34,7 +32,7 @@ query= """AppRequests | take 5""" try: - response = client.query_workspace(os.environ['LOG_WORKSPACE_ID'], query, timespan=timedelta(days=1)) + response = client.query_workspace(os.environ['LOGS_WORKSPACE_ID'], query, timespan=timedelta(days=1)) if response.status == LogsQueryStatus.PARTIAL: error = response.partial_error data = response.partial_data diff --git a/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query_partial_result.py b/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query_partial_result.py index 6c0d41a575a7..9830c426c961 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query_partial_result.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_logs_single_query_partial_result.py @@ -10,13 +10,11 @@ Set the environment variables with your own values before running the sample: 1) LOGS_WORKSPACE_ID - The first (primary) workspace ID. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. -**Note** - Although this example uses pandas to prin the response, it is totally optional and is -not a required package for querying. Alternatively, native python can be used as well. +**Note** - Although this example uses pandas to print the response, it's optional and +isn't a required package for querying. Alternatively, native Python can be used as well. """ import os import pandas as pd @@ -37,7 +35,7 @@ # this block of code is exactly the same whether the expected result is a success, a failure or a # partial success try: - response = client.query_workspace(os.environ['LOG_WORKSPACE_ID'], query, timespan=timedelta(days=1)) + response = client.query_workspace(os.environ['LOGS_WORKSPACE_ID'], query, timespan=timedelta(days=1)) if response.status == LogsQueryStatus.PARTIAL: # handle error here error = response.partial_error diff --git a/sdk/monitor/azure-monitor-query/samples/sample_metric_definitions.py b/sdk/monitor/azure-monitor-query/samples/sample_metric_definitions.py index 8ab1778a2c85..74b7ef45c88e 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_metric_definitions.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_metric_definitions.py @@ -7,13 +7,12 @@ USAGE: python sample_metric_definitions.py Set the environment variables with your own values before running the sample: - 1) METRICS_RESOURCE_URI - The resource uri of the resource for which the metrics are being queried. - In this example, an eventgrid account resource URI is taken. + 1) METRICS_RESOURCE_URI - The resource URI of the resource for which the metrics are being queried. + + This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. + For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. + In this example, an Event Grid account resource URI is taken. """ import os from azure.monitor.query import MetricsQueryClient diff --git a/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py b/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py index ccc51bbf0fb6..2a03b6ad421d 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_metric_namespaces.py @@ -7,13 +7,12 @@ USAGE: python sample_metric_namespaces.py Set the environment variables with your own values before running the sample: - 1) METRICS_RESOURCE_URI - The resource uri of the resource for which the metrics are being queried. - In this example, a storage account resource URI is taken. + 1) METRICS_RESOURCE_URI - The resource URI of the resource for which the metrics are being queried. + + This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. + For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. + In this example, a Storage account resource URI is taken. """ import os from azure.monitor.query import MetricsQueryClient diff --git a/sdk/monitor/azure-monitor-query/samples/sample_metrics_query.py b/sdk/monitor/azure-monitor-query/samples/sample_metrics_query.py index 0c1844b59792..434fe860b933 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_metrics_query.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_metrics_query.py @@ -3,18 +3,18 @@ """ FILE: sample_metrics_query.py DESCRIPTION: - This sample demonstrates authenticating the LogsQueryClient and querying a single query - on multiple workspaces using the additional_workspaces param. + This sample demonstrates authenticating the MetricsQueryClient and retrieving the "Ingress" + metric along with the "Average" aggregation type. The query will execute over a timespan + of 2 hours with a granularity of 5 minutes. USAGE: python sample_metrics_query.py Set the environment variables with your own values before running the sample: 1) METRICS_RESOURCE_URI - The resource uri of the resource for which the metrics are being queried. - In this example, a storage account resource URI is taken. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. + This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. + For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. + + In this example, a Storage account resource URI is taken. """ import os from datetime import timedelta diff --git a/sdk/monitor/azure-monitor-query/samples/sample_server_timeout.py b/sdk/monitor/azure-monitor-query/samples/sample_server_timeout.py index 812091440925..354dbfc7a60d 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_server_timeout.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_server_timeout.py @@ -3,19 +3,17 @@ """ FILE: sample_server_timeout.py DESCRIPTION: - This sample demostrates how to update a server timeout for a long running query. + This sample demonstrates how to update a server timeout for a long running query. USAGE: python sample_server_timeout.py Set the environment variables with your own values before running the sample: 1) LOGS_WORKSPACE_ID - The first (primary) workspace ID. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. -**Note** - Although this example uses pandas to prin the response, it is totally optional and is -not a required package for querying. Alternatively, native python can be used as well. +**Note** - Although this example uses pandas to print the response, it's optional and +isn't a required package for querying. Alternatively, native Python can be used as well. """ import os import pandas as pd @@ -32,7 +30,7 @@ try: response = client.query_workspace( - os.environ['LOG_WORKSPACE_ID'], + os.environ['LOGS_WORKSPACE_ID'], query, timespan=timedelta(days=1), server_timeout=3 diff --git a/sdk/monitor/azure-monitor-query/samples/sample_single_log_query_without_pandas.py b/sdk/monitor/azure-monitor-query/samples/sample_single_log_query_without_pandas.py index 5f8a9f09fafd..a6aefb3aa6cb 100644 --- a/sdk/monitor/azure-monitor-query/samples/sample_single_log_query_without_pandas.py +++ b/sdk/monitor/azure-monitor-query/samples/sample_single_log_query_without_pandas.py @@ -10,10 +10,8 @@ Set the environment variables with your own values before running the sample: 1) LOGS_WORKSPACE_ID - The first (primary) workspace ID. - In order to use the DefaultAzureCredential, the following environment variables must be set: - 1) AZURE_CLIENT_ID - The client ID of a user-assigned managed identity. - 2) AZURE_TENANT_ID - Tenant ID to use when authenticating a user. - 3) AZURE_CLIENT_ID - The client secret to be used for authentication. +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ import os from datetime import timedelta @@ -27,9 +25,8 @@ query= """AppRequests | take 5""" - try: - response = client.query_workspace(os.environ['LOG_WORKSPACE_ID'], query, timespan=timedelta(days=1)) + response = client.query_workspace(os.environ['LOGS_WORKSPACE_ID'], query, timespan=timedelta(days=1)) if response.status == LogsQueryStatus.PARTIAL: # handle error here error = response.partial_error diff --git a/sdk/monitor/azure-monitor-query/tests/async/test_metrics_client_async.py b/sdk/monitor/azure-monitor-query/tests/async/test_metrics_client_async.py index 89757e75e37d..3f41f0b45af1 100644 --- a/sdk/monitor/azure-monitor-query/tests/async/test_metrics_client_async.py +++ b/sdk/monitor/azure-monitor-query/tests/async/test_metrics_client_async.py @@ -43,6 +43,43 @@ async def test_metrics_granularity(): assert response.granularity == timedelta(minutes=5) +@pytest.mark.live_test_only +@pytest.mark.asyncio +async def test_metrics_list(): + credential = _credential() + client = MetricsQueryClient(credential) + response = await client.query_resource( + os.environ['METRICS_RESOURCE_URI'], + metric_names=["MatchedEventCount"], + timespan=timedelta(days=1), + granularity=timedelta(minutes=5), + aggregations=[MetricAggregationType.COUNT] + ) + assert response + metrics = response.metrics + assert len(metrics) == 1 + assert metrics[0].__class__ == Metric + assert metrics['MatchedEventCount'].__class__ == Metric + assert metrics['MatchedEventCount'] == metrics[0] + +@pytest.mark.live_test_only +@pytest.mark.asyncio +async def test_metrics_filter(): + credential = _credential() + client = MetricsQueryClient(credential) + response = await client.query_resource( + os.environ['METRICS_RESOURCE_URI'], + metric_names=["MatchedEventCount"], + timespan=timedelta(days=1), + granularity=timedelta(minutes=5), + filter="EventSubscriptionName eq '*'", + aggregations=[MetricAggregationType.COUNT] + ) + assert response + metric = response.metrics['MatchedEventCount'] + for t in metric.timeseries: + assert t.metadata_values is not None + @pytest.mark.live_test_only @pytest.mark.asyncio async def test_metrics_list(): diff --git a/sdk/monitor/azure-monitor-query/tests/test_metrics_client.py b/sdk/monitor/azure-monitor-query/tests/test_metrics_client.py index f9f5da4db012..54656b1cb3cf 100644 --- a/sdk/monitor/azure-monitor-query/tests/test_metrics_client.py +++ b/sdk/monitor/azure-monitor-query/tests/test_metrics_client.py @@ -39,6 +39,23 @@ def test_metrics_granularity(): assert response assert response.granularity == timedelta(minutes=5) +@pytest.mark.live_test_only +def test_metrics_filter(): + credential = _credential() + client = MetricsQueryClient(credential) + response = client.query_resource( + os.environ['METRICS_RESOURCE_URI'], + metric_names=["MatchedEventCount"], + timespan=timedelta(days=1), + granularity=timedelta(minutes=5), + filter="EventSubscriptionName eq '*'", + aggregations=[MetricAggregationType.COUNT] + ) + assert response + metric = response.metrics['MatchedEventCount'] + for t in metric.timeseries: + assert t.metadata_values is not None + @pytest.mark.live_test_only def test_metrics_list(): credential = _credential() diff --git a/sdk/network/azure-mgmt-network/CHANGELOG.md b/sdk/network/azure-mgmt-network/CHANGELOG.md index 9c848c678dbb..9c06cc3814f1 100644 --- a/sdk/network/azure-mgmt-network/CHANGELOG.md +++ b/sdk/network/azure-mgmt-network/CHANGELOG.md @@ -1,5 +1,48 @@ # Release History +## 19.3.0 (2021-11-05) + +**Features** + + - Model LoadBalancerBackendAddress has a new parameter inbound_nat_rules_port_mapping + - Model VpnNatRuleMapping has a new parameter port_range + - Model OwaspCrsExclusionEntry has a new parameter exclusion_managed_rule_sets + - Model VirtualNetworkPeering has a new parameter remote_virtual_network_encryption + - Model NetworkInterface has a new parameter vnet_encryption_supported + - Model VirtualNetworkGateway has a new parameter disable_ip_sec_replay_protection + - Model VirtualNetwork has a new parameter encryption + - Model BackendAddressPool has a new parameter inbound_nat_rules + - Added operation LoadBalancersOperations.begin_list_inbound_nat_rule_port_mappings + - Added operation group FirewallPolicyIdpsSignaturesOverridesOperations + - Added operation group RoutingIntentOperations + - Added operation group FirewallPolicyIdpsSignaturesOperations + - Added operation group FirewallPolicyIdpsSignaturesFilterValuesOperations + +## 19.2.0 (2021-10-21) + +**Features** + + - Added operation group AdminRuleCollectionsOperations + - Added operation group SecurityUserConfigurationsOperations + - Added operation group ConnectivityConfigurationsOperations + - Added operation group ActiveSecurityUserRulesOperations + - Added operation group NetworkManagerCommitsOperations + - Added operation group NetworkManagersOperations + - Added operation group NetworkManagerDeploymentStatusOperations + - Added operation group ActiveConnectivityConfigurationsOperations + - Added operation group NetworkManagerEffectiveSecurityAdminRulesOperations + - Added operation group UserRuleCollectionsOperations + - Added operation group ActiveSecurityAdminRulesOperations + - Added operation group UserRulesOperations + - Added operation group NetworkGroupsOperations + - Added operation group EffectiveVirtualNetworksOperations + - Added operation group NetworkSecurityPerimetersOperations + - Added operation group PerimeterAssociableResourceTypesOperations + - Added operation group AdminRulesOperations + - Added operation group SecurityAdminConfigurationsOperations + - Added operation group EffectiveConnectivityConfigurationsOperations + - Removed old api-version `2017-08-01` + ## 19.1.0 (2021-10-09) **Features** diff --git a/sdk/network/azure-mgmt-network/_meta.json b/sdk/network/azure-mgmt-network/_meta.json index 5d470392da94..8a8c38d37de7 100644 --- a/sdk/network/azure-mgmt-network/_meta.json +++ b/sdk/network/azure-mgmt-network/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "54f1c87938269d4706629dc04c26ee1f3634585a", + "commit": "200370117556209695877b7631afa7d6c100c356", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/network/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/network/resource-manager/readme.md" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py index 8636a5e926d3..265216ce7101 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_network_management_client.py @@ -57,14 +57,33 @@ class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiCl :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2021-03-01' + DEFAULT_API_VERSION = '2021-05-01' _PROFILE_TAG = "azure.mgmt.network.NetworkManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, + 'active_connectivity_configurations': '2021-02-01-preview', + 'active_security_admin_rules': '2021-02-01-preview', + 'active_security_user_rules': '2021-02-01-preview', + 'admin_rule_collections': '2021-02-01-preview', + 'admin_rules': '2021-02-01-preview', + 'connectivity_configurations': '2021-02-01-preview', + 'effective_connectivity_configurations': '2021-02-01-preview', + 'effective_virtual_networks': '2021-02-01-preview', 'firewall_policy_rule_groups': '2020-04-01', 'interface_endpoints': '2019-02-01', + 'network_groups': '2021-02-01-preview', + 'network_manager_commits': '2021-02-01-preview', + 'network_manager_deployment_status': '2021-02-01-preview', + 'network_manager_effective_security_admin_rules': '2021-02-01-preview', + 'network_managers': '2021-02-01-preview', + 'network_security_perimeters': '2021-02-01-preview', 'p2_svpn_server_configurations': '2019-07-01', + 'perimeter_associable_resource_types': '2021-02-01-preview', + 'security_admin_configurations': '2021-02-01-preview', + 'security_user_configurations': '2021-02-01-preview', + 'user_rule_collections': '2021-02-01-preview', + 'user_rules': '2021-02-01-preview', }}, _PROFILE_TAG + " latest" ) @@ -100,10 +119,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2016-12-01: :mod:`v2016_12_01.models` * 2017-03-01: :mod:`v2017_03_01.models` * 2017-06-01: :mod:`v2017_06_01.models` - * 2017-08-01: :mod:`v2017_08_01.models` - * 2017-09-01: :mod:`v2017_09_01.models` * 2017-10-01: :mod:`v2017_10_01.models` - * 2017-11-01: :mod:`v2017_11_01.models` * 2018-01-01: :mod:`v2018_01_01.models` * 2018-02-01: :mod:`v2018_02_01.models` * 2018-04-01: :mod:`v2018_04_01.models` @@ -129,7 +145,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2020-08-01: :mod:`v2020_08_01.models` * 2020-11-01: :mod:`v2020_11_01.models` * 2021-02-01: :mod:`v2021_02_01.models` - * 2021-03-01: :mod:`v2021_03_01.models` + * 2021-02-01-preview: :mod:`v2021_02_01_preview.models` + * 2021-05-01: :mod:`v2021_05_01.models` """ if api_version == '2015-06-15': from .v2015_06_15 import models @@ -146,18 +163,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2017-06-01': from .v2017_06_01 import models return models - elif api_version == '2017-08-01': - from .v2017_08_01 import models - return models - elif api_version == '2017-09-01': - from .v2017_09_01 import models - return models elif api_version == '2017-10-01': from .v2017_10_01 import models return models - elif api_version == '2017-11-01': - from .v2017_11_01 import models - return models elif api_version == '2018-01-01': from .v2018_01_01 import models return models @@ -233,11 +241,79 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-02-01': from .v2021_02_01 import models return models - elif api_version == '2021-03-01': - from .v2021_03_01 import models + elif api_version == '2021-02-01-preview': + from .v2021_02_01_preview import models + return models + elif api_version == '2021-05-01': + from .v2021_05_01 import models return models raise ValueError("API version {} is not available".format(api_version)) + @property + def active_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('active_connectivity_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ActiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('active_security_admin_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ActiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityUserRulesOperations` + """ + api_version = self._get_api_version('active_security_user_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ActiveSecurityUserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRuleCollectionsOperations` + """ + api_version = self._get_api_version('admin_rule_collections') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import AdminRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRulesOperations` + """ + api_version = self._get_api_version('admin_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import AdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def application_gateway_private_endpoint_connections(self): """Instance depends on the API version: @@ -248,7 +324,7 @@ def application_gateway_private_endpoint_connections(self): * 2020-08-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` * 2020-11-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` * 2021-02-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` - * 2021-03-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-05-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('application_gateway_private_endpoint_connections') if api_version == '2020-05-01': @@ -263,8 +339,8 @@ def application_gateway_private_endpoint_connections(self): from .v2020_11_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'application_gateway_private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -279,7 +355,7 @@ def application_gateway_private_link_resources(self): * 2020-08-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` * 2020-11-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` * 2021-02-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` - * 2021-03-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-05-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` """ api_version = self._get_api_version('application_gateway_private_link_resources') if api_version == '2020-05-01': @@ -294,8 +370,8 @@ def application_gateway_private_link_resources(self): from .v2020_11_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'application_gateway_private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -309,10 +385,7 @@ def application_gateways(self): * 2016-12-01: :class:`ApplicationGatewaysOperations` * 2017-03-01: :class:`ApplicationGatewaysOperations` * 2017-06-01: :class:`ApplicationGatewaysOperations` - * 2017-08-01: :class:`ApplicationGatewaysOperations` - * 2017-09-01: :class:`ApplicationGatewaysOperations` * 2017-10-01: :class:`ApplicationGatewaysOperations` - * 2017-11-01: :class:`ApplicationGatewaysOperations` * 2018-01-01: :class:`ApplicationGatewaysOperations` * 2018-02-01: :class:`ApplicationGatewaysOperations` * 2018-04-01: :class:`ApplicationGatewaysOperations` @@ -338,7 +411,7 @@ def application_gateways(self): * 2020-08-01: :class:`ApplicationGatewaysOperations` * 2020-11-01: :class:`ApplicationGatewaysOperations` * 2021-02-01: :class:`ApplicationGatewaysOperations` - * 2021-03-01: :class:`ApplicationGatewaysOperations` + * 2021-05-01: :class:`ApplicationGatewaysOperations` """ api_version = self._get_api_version('application_gateways') if api_version == '2015-06-15': @@ -351,14 +424,8 @@ def application_gateways(self): from .v2017_03_01.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import ApplicationGatewaysOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import ApplicationGatewaysOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import ApplicationGatewaysOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2018-02-01': @@ -409,8 +476,8 @@ def application_gateways(self): from .v2020_11_01.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ApplicationGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ApplicationGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'application_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -419,9 +486,7 @@ def application_gateways(self): def application_security_groups(self): """Instance depends on the API version: - * 2017-09-01: :class:`ApplicationSecurityGroupsOperations` * 2017-10-01: :class:`ApplicationSecurityGroupsOperations` - * 2017-11-01: :class:`ApplicationSecurityGroupsOperations` * 2018-01-01: :class:`ApplicationSecurityGroupsOperations` * 2018-02-01: :class:`ApplicationSecurityGroupsOperations` * 2018-04-01: :class:`ApplicationSecurityGroupsOperations` @@ -447,15 +512,11 @@ def application_security_groups(self): * 2020-08-01: :class:`ApplicationSecurityGroupsOperations` * 2020-11-01: :class:`ApplicationSecurityGroupsOperations` * 2021-02-01: :class:`ApplicationSecurityGroupsOperations` - * 2021-03-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-05-01: :class:`ApplicationSecurityGroupsOperations` """ api_version = self._get_api_version('application_security_groups') - if api_version == '2017-09-01': - from .v2017_09_01.operations import ApplicationSecurityGroupsOperations as OperationClass - elif api_version == '2017-10-01': + if api_version == '2017-10-01': from .v2017_10_01.operations import ApplicationSecurityGroupsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import ApplicationSecurityGroupsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import ApplicationSecurityGroupsOperations as OperationClass elif api_version == '2018-02-01': @@ -506,8 +567,8 @@ def application_security_groups(self): from .v2020_11_01.operations import ApplicationSecurityGroupsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ApplicationSecurityGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ApplicationSecurityGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'application_security_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -536,7 +597,7 @@ def available_delegations(self): * 2020-08-01: :class:`AvailableDelegationsOperations` * 2020-11-01: :class:`AvailableDelegationsOperations` * 2021-02-01: :class:`AvailableDelegationsOperations` - * 2021-03-01: :class:`AvailableDelegationsOperations` + * 2021-05-01: :class:`AvailableDelegationsOperations` """ api_version = self._get_api_version('available_delegations') if api_version == '2018-08-01': @@ -579,8 +640,8 @@ def available_delegations(self): from .v2020_11_01.operations import AvailableDelegationsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import AvailableDelegationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailableDelegationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_delegations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -590,10 +651,7 @@ def available_endpoint_services(self): """Instance depends on the API version: * 2017-06-01: :class:`AvailableEndpointServicesOperations` - * 2017-08-01: :class:`AvailableEndpointServicesOperations` - * 2017-09-01: :class:`AvailableEndpointServicesOperations` * 2017-10-01: :class:`AvailableEndpointServicesOperations` - * 2017-11-01: :class:`AvailableEndpointServicesOperations` * 2018-01-01: :class:`AvailableEndpointServicesOperations` * 2018-02-01: :class:`AvailableEndpointServicesOperations` * 2018-04-01: :class:`AvailableEndpointServicesOperations` @@ -619,19 +677,13 @@ def available_endpoint_services(self): * 2020-08-01: :class:`AvailableEndpointServicesOperations` * 2020-11-01: :class:`AvailableEndpointServicesOperations` * 2021-02-01: :class:`AvailableEndpointServicesOperations` - * 2021-03-01: :class:`AvailableEndpointServicesOperations` + * 2021-05-01: :class:`AvailableEndpointServicesOperations` """ api_version = self._get_api_version('available_endpoint_services') if api_version == '2017-06-01': from .v2017_06_01.operations import AvailableEndpointServicesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import AvailableEndpointServicesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import AvailableEndpointServicesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2018-02-01': @@ -682,8 +734,8 @@ def available_endpoint_services(self): from .v2020_11_01.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import AvailableEndpointServicesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailableEndpointServicesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_endpoint_services'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -707,7 +759,7 @@ def available_private_endpoint_types(self): * 2020-08-01: :class:`AvailablePrivateEndpointTypesOperations` * 2020-11-01: :class:`AvailablePrivateEndpointTypesOperations` * 2021-02-01: :class:`AvailablePrivateEndpointTypesOperations` - * 2021-03-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-05-01: :class:`AvailablePrivateEndpointTypesOperations` """ api_version = self._get_api_version('available_private_endpoint_types') if api_version == '2019-04-01': @@ -740,8 +792,8 @@ def available_private_endpoint_types(self): from .v2020_11_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailablePrivateEndpointTypesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_private_endpoint_types'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -770,7 +822,7 @@ def available_resource_group_delegations(self): * 2020-08-01: :class:`AvailableResourceGroupDelegationsOperations` * 2020-11-01: :class:`AvailableResourceGroupDelegationsOperations` * 2021-02-01: :class:`AvailableResourceGroupDelegationsOperations` - * 2021-03-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-05-01: :class:`AvailableResourceGroupDelegationsOperations` """ api_version = self._get_api_version('available_resource_group_delegations') if api_version == '2018-08-01': @@ -813,8 +865,8 @@ def available_resource_group_delegations(self): from .v2020_11_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailableResourceGroupDelegationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_resource_group_delegations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -835,7 +887,7 @@ def available_service_aliases(self): * 2020-08-01: :class:`AvailableServiceAliasesOperations` * 2020-11-01: :class:`AvailableServiceAliasesOperations` * 2021-02-01: :class:`AvailableServiceAliasesOperations` - * 2021-03-01: :class:`AvailableServiceAliasesOperations` + * 2021-05-01: :class:`AvailableServiceAliasesOperations` """ api_version = self._get_api_version('available_service_aliases') if api_version == '2019-08-01': @@ -862,8 +914,8 @@ def available_service_aliases(self): from .v2020_11_01.operations import AvailableServiceAliasesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import AvailableServiceAliasesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AvailableServiceAliasesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_service_aliases'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -892,7 +944,7 @@ def azure_firewall_fqdn_tags(self): * 2020-08-01: :class:`AzureFirewallFqdnTagsOperations` * 2020-11-01: :class:`AzureFirewallFqdnTagsOperations` * 2021-02-01: :class:`AzureFirewallFqdnTagsOperations` - * 2021-03-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-05-01: :class:`AzureFirewallFqdnTagsOperations` """ api_version = self._get_api_version('azure_firewall_fqdn_tags') if api_version == '2018-08-01': @@ -935,8 +987,8 @@ def azure_firewall_fqdn_tags(self): from .v2020_11_01.operations import AzureFirewallFqdnTagsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import AzureFirewallFqdnTagsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AzureFirewallFqdnTagsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'azure_firewall_fqdn_tags'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -968,7 +1020,7 @@ def azure_firewalls(self): * 2020-08-01: :class:`AzureFirewallsOperations` * 2020-11-01: :class:`AzureFirewallsOperations` * 2021-02-01: :class:`AzureFirewallsOperations` - * 2021-03-01: :class:`AzureFirewallsOperations` + * 2021-05-01: :class:`AzureFirewallsOperations` """ api_version = self._get_api_version('azure_firewalls') if api_version == '2018-04-01': @@ -1017,8 +1069,8 @@ def azure_firewalls(self): from .v2020_11_01.operations import AzureFirewallsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import AzureFirewallsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import AzureFirewallsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'azure_firewalls'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1042,7 +1094,7 @@ def bastion_hosts(self): * 2020-08-01: :class:`BastionHostsOperations` * 2020-11-01: :class:`BastionHostsOperations` * 2021-02-01: :class:`BastionHostsOperations` - * 2021-03-01: :class:`BastionHostsOperations` + * 2021-05-01: :class:`BastionHostsOperations` """ api_version = self._get_api_version('bastion_hosts') if api_version == '2019-04-01': @@ -1075,8 +1127,8 @@ def bastion_hosts(self): from .v2020_11_01.operations import BastionHostsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import BastionHostsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import BastionHostsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'bastion_hosts'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1088,10 +1140,7 @@ def bgp_service_communities(self): * 2016-12-01: :class:`BgpServiceCommunitiesOperations` * 2017-03-01: :class:`BgpServiceCommunitiesOperations` * 2017-06-01: :class:`BgpServiceCommunitiesOperations` - * 2017-08-01: :class:`BgpServiceCommunitiesOperations` - * 2017-09-01: :class:`BgpServiceCommunitiesOperations` * 2017-10-01: :class:`BgpServiceCommunitiesOperations` - * 2017-11-01: :class:`BgpServiceCommunitiesOperations` * 2018-01-01: :class:`BgpServiceCommunitiesOperations` * 2018-02-01: :class:`BgpServiceCommunitiesOperations` * 2018-04-01: :class:`BgpServiceCommunitiesOperations` @@ -1117,7 +1166,7 @@ def bgp_service_communities(self): * 2020-08-01: :class:`BgpServiceCommunitiesOperations` * 2020-11-01: :class:`BgpServiceCommunitiesOperations` * 2021-02-01: :class:`BgpServiceCommunitiesOperations` - * 2021-03-01: :class:`BgpServiceCommunitiesOperations` + * 2021-05-01: :class:`BgpServiceCommunitiesOperations` """ api_version = self._get_api_version('bgp_service_communities') if api_version == '2016-12-01': @@ -1126,14 +1175,8 @@ def bgp_service_communities(self): from .v2017_03_01.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import BgpServiceCommunitiesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import BgpServiceCommunitiesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import BgpServiceCommunitiesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2018-02-01': @@ -1184,8 +1227,8 @@ def bgp_service_communities(self): from .v2020_11_01.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import BgpServiceCommunitiesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import BgpServiceCommunitiesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'bgp_service_communities'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1195,7 +1238,6 @@ def connection_monitors(self): """Instance depends on the API version: * 2017-10-01: :class:`ConnectionMonitorsOperations` - * 2017-11-01: :class:`ConnectionMonitorsOperations` * 2018-01-01: :class:`ConnectionMonitorsOperations` * 2018-02-01: :class:`ConnectionMonitorsOperations` * 2018-04-01: :class:`ConnectionMonitorsOperations` @@ -1221,13 +1263,11 @@ def connection_monitors(self): * 2020-08-01: :class:`ConnectionMonitorsOperations` * 2020-11-01: :class:`ConnectionMonitorsOperations` * 2021-02-01: :class:`ConnectionMonitorsOperations` - * 2021-03-01: :class:`ConnectionMonitorsOperations` + * 2021-05-01: :class:`ConnectionMonitorsOperations` """ api_version = self._get_api_version('connection_monitors') if api_version == '2017-10-01': from .v2017_10_01.operations import ConnectionMonitorsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import ConnectionMonitorsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import ConnectionMonitorsOperations as OperationClass elif api_version == '2018-02-01': @@ -1278,12 +1318,25 @@ def connection_monitors(self): from .v2020_11_01.operations import ConnectionMonitorsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ConnectionMonitorsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ConnectionMonitorsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'connection_monitors'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('connectivity_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import ConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def custom_ip_prefixes(self): """Instance depends on the API version: @@ -1293,7 +1346,7 @@ def custom_ip_prefixes(self): * 2020-08-01: :class:`CustomIPPrefixesOperations` * 2020-11-01: :class:`CustomIPPrefixesOperations` * 2021-02-01: :class:`CustomIPPrefixesOperations` - * 2021-03-01: :class:`CustomIPPrefixesOperations` + * 2021-05-01: :class:`CustomIPPrefixesOperations` """ api_version = self._get_api_version('custom_ip_prefixes') if api_version == '2020-06-01': @@ -1306,8 +1359,8 @@ def custom_ip_prefixes(self): from .v2020_11_01.operations import CustomIPPrefixesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import CustomIPPrefixesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import CustomIPPrefixesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'custom_ip_prefixes'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1334,7 +1387,7 @@ def ddos_custom_policies(self): * 2020-08-01: :class:`DdosCustomPoliciesOperations` * 2020-11-01: :class:`DdosCustomPoliciesOperations` * 2021-02-01: :class:`DdosCustomPoliciesOperations` - * 2021-03-01: :class:`DdosCustomPoliciesOperations` + * 2021-05-01: :class:`DdosCustomPoliciesOperations` """ api_version = self._get_api_version('ddos_custom_policies') if api_version == '2018-11-01': @@ -1373,8 +1426,8 @@ def ddos_custom_policies(self): from .v2020_11_01.operations import DdosCustomPoliciesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import DdosCustomPoliciesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import DdosCustomPoliciesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'ddos_custom_policies'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1407,7 +1460,7 @@ def ddos_protection_plans(self): * 2020-08-01: :class:`DdosProtectionPlansOperations` * 2020-11-01: :class:`DdosProtectionPlansOperations` * 2021-02-01: :class:`DdosProtectionPlansOperations` - * 2021-03-01: :class:`DdosProtectionPlansOperations` + * 2021-05-01: :class:`DdosProtectionPlansOperations` """ api_version = self._get_api_version('ddos_protection_plans') if api_version == '2018-02-01': @@ -1458,8 +1511,8 @@ def ddos_protection_plans(self): from .v2020_11_01.operations import DdosProtectionPlansOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import DdosProtectionPlansOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import DdosProtectionPlansOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'ddos_protection_plans'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1469,10 +1522,7 @@ def default_security_rules(self): """Instance depends on the API version: * 2017-06-01: :class:`DefaultSecurityRulesOperations` - * 2017-08-01: :class:`DefaultSecurityRulesOperations` - * 2017-09-01: :class:`DefaultSecurityRulesOperations` * 2017-10-01: :class:`DefaultSecurityRulesOperations` - * 2017-11-01: :class:`DefaultSecurityRulesOperations` * 2018-01-01: :class:`DefaultSecurityRulesOperations` * 2018-02-01: :class:`DefaultSecurityRulesOperations` * 2018-04-01: :class:`DefaultSecurityRulesOperations` @@ -1498,19 +1548,13 @@ def default_security_rules(self): * 2020-08-01: :class:`DefaultSecurityRulesOperations` * 2020-11-01: :class:`DefaultSecurityRulesOperations` * 2021-02-01: :class:`DefaultSecurityRulesOperations` - * 2021-03-01: :class:`DefaultSecurityRulesOperations` + * 2021-05-01: :class:`DefaultSecurityRulesOperations` """ api_version = self._get_api_version('default_security_rules') if api_version == '2017-06-01': from .v2017_06_01.operations import DefaultSecurityRulesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import DefaultSecurityRulesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import DefaultSecurityRulesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -1561,8 +1605,8 @@ def default_security_rules(self): from .v2020_11_01.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import DefaultSecurityRulesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import DefaultSecurityRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'default_security_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1576,7 +1620,7 @@ def dscp_configuration(self): * 2020-08-01: :class:`DscpConfigurationOperations` * 2020-11-01: :class:`DscpConfigurationOperations` * 2021-02-01: :class:`DscpConfigurationOperations` - * 2021-03-01: :class:`DscpConfigurationOperations` + * 2021-05-01: :class:`DscpConfigurationOperations` """ api_version = self._get_api_version('dscp_configuration') if api_version == '2020-06-01': @@ -1589,12 +1633,38 @@ def dscp_configuration(self): from .v2020_11_01.operations import DscpConfigurationOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import DscpConfigurationOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import DscpConfigurationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'dscp_configuration'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def effective_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('effective_connectivity_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import EffectiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def effective_virtual_networks(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveVirtualNetworksOperations` + """ + api_version = self._get_api_version('effective_virtual_networks') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import EffectiveVirtualNetworksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_virtual_networks'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def express_route_circuit_authorizations(self): """Instance depends on the API version: @@ -1604,10 +1674,7 @@ def express_route_circuit_authorizations(self): * 2016-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` - * 2017-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` - * 2017-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-10-01: :class:`ExpressRouteCircuitAuthorizationsOperations` - * 2017-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2018-01-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2018-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2018-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` @@ -1633,7 +1700,7 @@ def express_route_circuit_authorizations(self): * 2020-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2020-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2021-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` - * 2021-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitAuthorizationsOperations` """ api_version = self._get_api_version('express_route_circuit_authorizations') if api_version == '2015-06-15': @@ -1646,14 +1713,8 @@ def express_route_circuit_authorizations(self): from .v2017_03_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2018-02-01': @@ -1704,8 +1765,8 @@ def express_route_circuit_authorizations(self): from .v2020_11_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_circuit_authorizations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1738,7 +1799,7 @@ def express_route_circuit_connections(self): * 2020-08-01: :class:`ExpressRouteCircuitConnectionsOperations` * 2020-11-01: :class:`ExpressRouteCircuitConnectionsOperations` * 2021-02-01: :class:`ExpressRouteCircuitConnectionsOperations` - * 2021-03-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitConnectionsOperations` """ api_version = self._get_api_version('express_route_circuit_connections') if api_version == '2018-02-01': @@ -1789,8 +1850,8 @@ def express_route_circuit_connections(self): from .v2020_11_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCircuitConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_circuit_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1804,10 +1865,7 @@ def express_route_circuit_peerings(self): * 2016-12-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-03-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-06-01: :class:`ExpressRouteCircuitPeeringsOperations` - * 2017-08-01: :class:`ExpressRouteCircuitPeeringsOperations` - * 2017-09-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-10-01: :class:`ExpressRouteCircuitPeeringsOperations` - * 2017-11-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2018-01-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2018-02-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2018-04-01: :class:`ExpressRouteCircuitPeeringsOperations` @@ -1833,7 +1891,7 @@ def express_route_circuit_peerings(self): * 2020-08-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2020-11-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2021-02-01: :class:`ExpressRouteCircuitPeeringsOperations` - * 2021-03-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitPeeringsOperations` """ api_version = self._get_api_version('express_route_circuit_peerings') if api_version == '2015-06-15': @@ -1846,14 +1904,8 @@ def express_route_circuit_peerings(self): from .v2017_03_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2018-02-01': @@ -1904,8 +1956,8 @@ def express_route_circuit_peerings(self): from .v2020_11_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCircuitPeeringsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_circuit_peerings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1919,10 +1971,7 @@ def express_route_circuits(self): * 2016-12-01: :class:`ExpressRouteCircuitsOperations` * 2017-03-01: :class:`ExpressRouteCircuitsOperations` * 2017-06-01: :class:`ExpressRouteCircuitsOperations` - * 2017-08-01: :class:`ExpressRouteCircuitsOperations` - * 2017-09-01: :class:`ExpressRouteCircuitsOperations` * 2017-10-01: :class:`ExpressRouteCircuitsOperations` - * 2017-11-01: :class:`ExpressRouteCircuitsOperations` * 2018-01-01: :class:`ExpressRouteCircuitsOperations` * 2018-02-01: :class:`ExpressRouteCircuitsOperations` * 2018-04-01: :class:`ExpressRouteCircuitsOperations` @@ -1948,7 +1997,7 @@ def express_route_circuits(self): * 2020-08-01: :class:`ExpressRouteCircuitsOperations` * 2020-11-01: :class:`ExpressRouteCircuitsOperations` * 2021-02-01: :class:`ExpressRouteCircuitsOperations` - * 2021-03-01: :class:`ExpressRouteCircuitsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitsOperations` """ api_version = self._get_api_version('express_route_circuits') if api_version == '2015-06-15': @@ -1961,14 +2010,8 @@ def express_route_circuits(self): from .v2017_03_01.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import ExpressRouteCircuitsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import ExpressRouteCircuitsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import ExpressRouteCircuitsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2018-02-01': @@ -2019,8 +2062,8 @@ def express_route_circuits(self): from .v2020_11_01.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteCircuitsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCircuitsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_circuits'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2049,7 +2092,7 @@ def express_route_connections(self): * 2020-08-01: :class:`ExpressRouteConnectionsOperations` * 2020-11-01: :class:`ExpressRouteConnectionsOperations` * 2021-02-01: :class:`ExpressRouteConnectionsOperations` - * 2021-03-01: :class:`ExpressRouteConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteConnectionsOperations` """ api_version = self._get_api_version('express_route_connections') if api_version == '2018-08-01': @@ -2092,8 +2135,8 @@ def express_route_connections(self): from .v2020_11_01.operations import ExpressRouteConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2126,7 +2169,7 @@ def express_route_cross_connection_peerings(self): * 2020-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` * 2020-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` * 2021-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` - * 2021-03-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-05-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` """ api_version = self._get_api_version('express_route_cross_connection_peerings') if api_version == '2018-02-01': @@ -2177,8 +2220,8 @@ def express_route_cross_connection_peerings(self): from .v2020_11_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_cross_connection_peerings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2211,7 +2254,7 @@ def express_route_cross_connections(self): * 2020-08-01: :class:`ExpressRouteCrossConnectionsOperations` * 2020-11-01: :class:`ExpressRouteCrossConnectionsOperations` * 2021-02-01: :class:`ExpressRouteCrossConnectionsOperations` - * 2021-03-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteCrossConnectionsOperations` """ api_version = self._get_api_version('express_route_cross_connections') if api_version == '2018-02-01': @@ -2262,8 +2305,8 @@ def express_route_cross_connections(self): from .v2020_11_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteCrossConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_cross_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2292,7 +2335,7 @@ def express_route_gateways(self): * 2020-08-01: :class:`ExpressRouteGatewaysOperations` * 2020-11-01: :class:`ExpressRouteGatewaysOperations` * 2021-02-01: :class:`ExpressRouteGatewaysOperations` - * 2021-03-01: :class:`ExpressRouteGatewaysOperations` + * 2021-05-01: :class:`ExpressRouteGatewaysOperations` """ api_version = self._get_api_version('express_route_gateways') if api_version == '2018-08-01': @@ -2335,8 +2378,8 @@ def express_route_gateways(self): from .v2020_11_01.operations import ExpressRouteGatewaysOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2365,7 +2408,7 @@ def express_route_links(self): * 2020-08-01: :class:`ExpressRouteLinksOperations` * 2020-11-01: :class:`ExpressRouteLinksOperations` * 2021-02-01: :class:`ExpressRouteLinksOperations` - * 2021-03-01: :class:`ExpressRouteLinksOperations` + * 2021-05-01: :class:`ExpressRouteLinksOperations` """ api_version = self._get_api_version('express_route_links') if api_version == '2018-08-01': @@ -2408,8 +2451,8 @@ def express_route_links(self): from .v2020_11_01.operations import ExpressRouteLinksOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteLinksOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteLinksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_links'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2438,7 +2481,7 @@ def express_route_ports(self): * 2020-08-01: :class:`ExpressRoutePortsOperations` * 2020-11-01: :class:`ExpressRoutePortsOperations` * 2021-02-01: :class:`ExpressRoutePortsOperations` - * 2021-03-01: :class:`ExpressRoutePortsOperations` + * 2021-05-01: :class:`ExpressRoutePortsOperations` """ api_version = self._get_api_version('express_route_ports') if api_version == '2018-08-01': @@ -2481,8 +2524,8 @@ def express_route_ports(self): from .v2020_11_01.operations import ExpressRoutePortsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRoutePortsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRoutePortsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_ports'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2511,7 +2554,7 @@ def express_route_ports_locations(self): * 2020-08-01: :class:`ExpressRoutePortsLocationsOperations` * 2020-11-01: :class:`ExpressRoutePortsLocationsOperations` * 2021-02-01: :class:`ExpressRoutePortsLocationsOperations` - * 2021-03-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-05-01: :class:`ExpressRoutePortsLocationsOperations` """ api_version = self._get_api_version('express_route_ports_locations') if api_version == '2018-08-01': @@ -2554,8 +2597,8 @@ def express_route_ports_locations(self): from .v2020_11_01.operations import ExpressRoutePortsLocationsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRoutePortsLocationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRoutePortsLocationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_ports_locations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2569,10 +2612,7 @@ def express_route_service_providers(self): * 2016-12-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-03-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-06-01: :class:`ExpressRouteServiceProvidersOperations` - * 2017-08-01: :class:`ExpressRouteServiceProvidersOperations` - * 2017-09-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-10-01: :class:`ExpressRouteServiceProvidersOperations` - * 2017-11-01: :class:`ExpressRouteServiceProvidersOperations` * 2018-01-01: :class:`ExpressRouteServiceProvidersOperations` * 2018-02-01: :class:`ExpressRouteServiceProvidersOperations` * 2018-04-01: :class:`ExpressRouteServiceProvidersOperations` @@ -2598,7 +2638,7 @@ def express_route_service_providers(self): * 2020-08-01: :class:`ExpressRouteServiceProvidersOperations` * 2020-11-01: :class:`ExpressRouteServiceProvidersOperations` * 2021-02-01: :class:`ExpressRouteServiceProvidersOperations` - * 2021-03-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-05-01: :class:`ExpressRouteServiceProvidersOperations` """ api_version = self._get_api_version('express_route_service_providers') if api_version == '2015-06-15': @@ -2611,14 +2651,8 @@ def express_route_service_providers(self): from .v2017_03_01.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import ExpressRouteServiceProvidersOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import ExpressRouteServiceProvidersOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import ExpressRouteServiceProvidersOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2018-02-01': @@ -2669,8 +2703,8 @@ def express_route_service_providers(self): from .v2020_11_01.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ExpressRouteServiceProvidersOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ExpressRouteServiceProvidersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_service_providers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2693,7 +2727,7 @@ def firewall_policies(self): * 2020-08-01: :class:`FirewallPoliciesOperations` * 2020-11-01: :class:`FirewallPoliciesOperations` * 2021-02-01: :class:`FirewallPoliciesOperations` - * 2021-03-01: :class:`FirewallPoliciesOperations` + * 2021-05-01: :class:`FirewallPoliciesOperations` """ api_version = self._get_api_version('firewall_policies') if api_version == '2019-06-01': @@ -2724,12 +2758,51 @@ def firewall_policies(self): from .v2020_11_01.operations import FirewallPoliciesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import FirewallPoliciesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPoliciesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'firewall_policies'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def firewall_policy_idps_signatures(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures') + if api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPolicyIdpsSignaturesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures_filter_values(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesFilterValuesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures_filter_values') + if api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPolicyIdpsSignaturesFilterValuesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures_filter_values'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures_overrides(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesOverridesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures_overrides') + if api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPolicyIdpsSignaturesOverridesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures_overrides'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def firewall_policy_rule_collection_groups(self): """Instance depends on the API version: @@ -2740,7 +2813,7 @@ def firewall_policy_rule_collection_groups(self): * 2020-08-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` * 2020-11-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` * 2021-02-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` - * 2021-03-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-05-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` """ api_version = self._get_api_version('firewall_policy_rule_collection_groups') if api_version == '2020-05-01': @@ -2755,8 +2828,8 @@ def firewall_policy_rule_collection_groups(self): from .v2020_11_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'firewall_policy_rule_collection_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2809,7 +2882,7 @@ def flow_logs(self): * 2020-08-01: :class:`FlowLogsOperations` * 2020-11-01: :class:`FlowLogsOperations` * 2021-02-01: :class:`FlowLogsOperations` - * 2021-03-01: :class:`FlowLogsOperations` + * 2021-05-01: :class:`FlowLogsOperations` """ api_version = self._get_api_version('flow_logs') if api_version == '2019-11-01': @@ -2832,8 +2905,8 @@ def flow_logs(self): from .v2020_11_01.operations import FlowLogsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import FlowLogsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import FlowLogsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'flow_logs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2849,7 +2922,7 @@ def hub_route_tables(self): * 2020-08-01: :class:`HubRouteTablesOperations` * 2020-11-01: :class:`HubRouteTablesOperations` * 2021-02-01: :class:`HubRouteTablesOperations` - * 2021-03-01: :class:`HubRouteTablesOperations` + * 2021-05-01: :class:`HubRouteTablesOperations` """ api_version = self._get_api_version('hub_route_tables') if api_version == '2020-04-01': @@ -2866,8 +2939,8 @@ def hub_route_tables(self): from .v2020_11_01.operations import HubRouteTablesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import HubRouteTablesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import HubRouteTablesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'hub_route_tables'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2899,7 +2972,7 @@ def hub_virtual_network_connections(self): * 2020-08-01: :class:`HubVirtualNetworkConnectionsOperations` * 2020-11-01: :class:`HubVirtualNetworkConnectionsOperations` * 2021-02-01: :class:`HubVirtualNetworkConnectionsOperations` - * 2021-03-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-05-01: :class:`HubVirtualNetworkConnectionsOperations` """ api_version = self._get_api_version('hub_virtual_network_connections') if api_version == '2018-04-01': @@ -2948,8 +3021,8 @@ def hub_virtual_network_connections(self): from .v2020_11_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import HubVirtualNetworkConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'hub_virtual_network_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2959,10 +3032,7 @@ def inbound_nat_rules(self): """Instance depends on the API version: * 2017-06-01: :class:`InboundNatRulesOperations` - * 2017-08-01: :class:`InboundNatRulesOperations` - * 2017-09-01: :class:`InboundNatRulesOperations` * 2017-10-01: :class:`InboundNatRulesOperations` - * 2017-11-01: :class:`InboundNatRulesOperations` * 2018-01-01: :class:`InboundNatRulesOperations` * 2018-02-01: :class:`InboundNatRulesOperations` * 2018-04-01: :class:`InboundNatRulesOperations` @@ -2988,19 +3058,13 @@ def inbound_nat_rules(self): * 2020-08-01: :class:`InboundNatRulesOperations` * 2020-11-01: :class:`InboundNatRulesOperations` * 2021-02-01: :class:`InboundNatRulesOperations` - * 2021-03-01: :class:`InboundNatRulesOperations` + * 2021-05-01: :class:`InboundNatRulesOperations` """ api_version = self._get_api_version('inbound_nat_rules') if api_version == '2017-06-01': from .v2017_06_01.operations import InboundNatRulesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import InboundNatRulesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import InboundNatRulesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import InboundNatRulesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import InboundNatRulesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import InboundNatRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -3051,8 +3115,8 @@ def inbound_nat_rules(self): from .v2020_11_01.operations import InboundNatRulesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import InboundNatRulesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import InboundNatRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'inbound_nat_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3066,7 +3130,7 @@ def inbound_security_rule(self): * 2020-08-01: :class:`InboundSecurityRuleOperations` * 2020-11-01: :class:`InboundSecurityRuleOperations` * 2021-02-01: :class:`InboundSecurityRuleOperations` - * 2021-03-01: :class:`InboundSecurityRuleOperations` + * 2021-05-01: :class:`InboundSecurityRuleOperations` """ api_version = self._get_api_version('inbound_security_rule') if api_version == '2020-06-01': @@ -3079,8 +3143,8 @@ def inbound_security_rule(self): from .v2020_11_01.operations import InboundSecurityRuleOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import InboundSecurityRuleOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import InboundSecurityRuleOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'inbound_security_rule'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3122,7 +3186,7 @@ def ip_allocations(self): * 2020-08-01: :class:`IpAllocationsOperations` * 2020-11-01: :class:`IpAllocationsOperations` * 2021-02-01: :class:`IpAllocationsOperations` - * 2021-03-01: :class:`IpAllocationsOperations` + * 2021-05-01: :class:`IpAllocationsOperations` """ api_version = self._get_api_version('ip_allocations') if api_version == '2020-03-01': @@ -3141,8 +3205,8 @@ def ip_allocations(self): from .v2020_11_01.operations import IpAllocationsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import IpAllocationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import IpAllocationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'ip_allocations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3162,7 +3226,7 @@ def ip_groups(self): * 2020-08-01: :class:`IpGroupsOperations` * 2020-11-01: :class:`IpGroupsOperations` * 2021-02-01: :class:`IpGroupsOperations` - * 2021-03-01: :class:`IpGroupsOperations` + * 2021-05-01: :class:`IpGroupsOperations` """ api_version = self._get_api_version('ip_groups') if api_version == '2019-09-01': @@ -3187,8 +3251,8 @@ def ip_groups(self): from .v2020_11_01.operations import IpGroupsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import IpGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import IpGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'ip_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3198,10 +3262,7 @@ def load_balancer_backend_address_pools(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` - * 2017-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` - * 2017-09-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2017-10-01: :class:`LoadBalancerBackendAddressPoolsOperations` - * 2017-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2018-01-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2018-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2018-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` @@ -3227,19 +3288,13 @@ def load_balancer_backend_address_pools(self): * 2020-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2020-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2021-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` - * 2021-03-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-05-01: :class:`LoadBalancerBackendAddressPoolsOperations` """ api_version = self._get_api_version('load_balancer_backend_address_pools') if api_version == '2017-06-01': from .v2017_06_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2018-02-01': @@ -3290,8 +3345,8 @@ def load_balancer_backend_address_pools(self): from .v2020_11_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_backend_address_pools'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3301,10 +3356,7 @@ def load_balancer_frontend_ip_configurations(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` - * 2017-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` - * 2017-09-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2017-10-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` - * 2017-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2018-01-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2018-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2018-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` @@ -3330,19 +3382,13 @@ def load_balancer_frontend_ip_configurations(self): * 2020-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2020-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2021-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` - * 2021-03-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-05-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` """ api_version = self._get_api_version('load_balancer_frontend_ip_configurations') if api_version == '2017-06-01': from .v2017_06_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2018-02-01': @@ -3393,8 +3439,8 @@ def load_balancer_frontend_ip_configurations(self): from .v2020_11_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_frontend_ip_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3404,10 +3450,7 @@ def load_balancer_load_balancing_rules(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` - * 2017-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` - * 2017-09-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2017-10-01: :class:`LoadBalancerLoadBalancingRulesOperations` - * 2017-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2018-01-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2018-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2018-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` @@ -3433,19 +3476,13 @@ def load_balancer_load_balancing_rules(self): * 2020-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2020-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2021-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` - * 2021-03-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-05-01: :class:`LoadBalancerLoadBalancingRulesOperations` """ api_version = self._get_api_version('load_balancer_load_balancing_rules') if api_version == '2017-06-01': from .v2017_06_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -3496,8 +3533,8 @@ def load_balancer_load_balancing_rules(self): from .v2020_11_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_load_balancing_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3507,10 +3544,7 @@ def load_balancer_network_interfaces(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerNetworkInterfacesOperations` - * 2017-08-01: :class:`LoadBalancerNetworkInterfacesOperations` - * 2017-09-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2017-10-01: :class:`LoadBalancerNetworkInterfacesOperations` - * 2017-11-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2018-01-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2018-02-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2018-04-01: :class:`LoadBalancerNetworkInterfacesOperations` @@ -3536,19 +3570,13 @@ def load_balancer_network_interfaces(self): * 2020-08-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2020-11-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2021-02-01: :class:`LoadBalancerNetworkInterfacesOperations` - * 2021-03-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-05-01: :class:`LoadBalancerNetworkInterfacesOperations` """ api_version = self._get_api_version('load_balancer_network_interfaces') if api_version == '2017-06-01': from .v2017_06_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2018-02-01': @@ -3599,8 +3627,8 @@ def load_balancer_network_interfaces(self): from .v2020_11_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerNetworkInterfacesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_network_interfaces'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3629,7 +3657,7 @@ def load_balancer_outbound_rules(self): * 2020-08-01: :class:`LoadBalancerOutboundRulesOperations` * 2020-11-01: :class:`LoadBalancerOutboundRulesOperations` * 2021-02-01: :class:`LoadBalancerOutboundRulesOperations` - * 2021-03-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-05-01: :class:`LoadBalancerOutboundRulesOperations` """ api_version = self._get_api_version('load_balancer_outbound_rules') if api_version == '2018-08-01': @@ -3672,8 +3700,8 @@ def load_balancer_outbound_rules(self): from .v2020_11_01.operations import LoadBalancerOutboundRulesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import LoadBalancerOutboundRulesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerOutboundRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_outbound_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3683,10 +3711,7 @@ def load_balancer_probes(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerProbesOperations` - * 2017-08-01: :class:`LoadBalancerProbesOperations` - * 2017-09-01: :class:`LoadBalancerProbesOperations` * 2017-10-01: :class:`LoadBalancerProbesOperations` - * 2017-11-01: :class:`LoadBalancerProbesOperations` * 2018-01-01: :class:`LoadBalancerProbesOperations` * 2018-02-01: :class:`LoadBalancerProbesOperations` * 2018-04-01: :class:`LoadBalancerProbesOperations` @@ -3712,19 +3737,13 @@ def load_balancer_probes(self): * 2020-08-01: :class:`LoadBalancerProbesOperations` * 2020-11-01: :class:`LoadBalancerProbesOperations` * 2021-02-01: :class:`LoadBalancerProbesOperations` - * 2021-03-01: :class:`LoadBalancerProbesOperations` + * 2021-05-01: :class:`LoadBalancerProbesOperations` """ api_version = self._get_api_version('load_balancer_probes') if api_version == '2017-06-01': from .v2017_06_01.operations import LoadBalancerProbesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import LoadBalancerProbesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import LoadBalancerProbesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2018-02-01': @@ -3775,8 +3794,8 @@ def load_balancer_probes(self): from .v2020_11_01.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import LoadBalancerProbesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancerProbesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_probes'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3790,10 +3809,7 @@ def load_balancers(self): * 2016-12-01: :class:`LoadBalancersOperations` * 2017-03-01: :class:`LoadBalancersOperations` * 2017-06-01: :class:`LoadBalancersOperations` - * 2017-08-01: :class:`LoadBalancersOperations` - * 2017-09-01: :class:`LoadBalancersOperations` * 2017-10-01: :class:`LoadBalancersOperations` - * 2017-11-01: :class:`LoadBalancersOperations` * 2018-01-01: :class:`LoadBalancersOperations` * 2018-02-01: :class:`LoadBalancersOperations` * 2018-04-01: :class:`LoadBalancersOperations` @@ -3819,7 +3835,7 @@ def load_balancers(self): * 2020-08-01: :class:`LoadBalancersOperations` * 2020-11-01: :class:`LoadBalancersOperations` * 2021-02-01: :class:`LoadBalancersOperations` - * 2021-03-01: :class:`LoadBalancersOperations` + * 2021-05-01: :class:`LoadBalancersOperations` """ api_version = self._get_api_version('load_balancers') if api_version == '2015-06-15': @@ -3832,14 +3848,8 @@ def load_balancers(self): from .v2017_03_01.operations import LoadBalancersOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import LoadBalancersOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import LoadBalancersOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import LoadBalancersOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import LoadBalancersOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import LoadBalancersOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import LoadBalancersOperations as OperationClass elif api_version == '2018-02-01': @@ -3890,8 +3900,8 @@ def load_balancers(self): from .v2020_11_01.operations import LoadBalancersOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import LoadBalancersOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LoadBalancersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3905,10 +3915,7 @@ def local_network_gateways(self): * 2016-12-01: :class:`LocalNetworkGatewaysOperations` * 2017-03-01: :class:`LocalNetworkGatewaysOperations` * 2017-06-01: :class:`LocalNetworkGatewaysOperations` - * 2017-08-01: :class:`LocalNetworkGatewaysOperations` - * 2017-09-01: :class:`LocalNetworkGatewaysOperations` * 2017-10-01: :class:`LocalNetworkGatewaysOperations` - * 2017-11-01: :class:`LocalNetworkGatewaysOperations` * 2018-01-01: :class:`LocalNetworkGatewaysOperations` * 2018-02-01: :class:`LocalNetworkGatewaysOperations` * 2018-04-01: :class:`LocalNetworkGatewaysOperations` @@ -3934,7 +3941,7 @@ def local_network_gateways(self): * 2020-08-01: :class:`LocalNetworkGatewaysOperations` * 2020-11-01: :class:`LocalNetworkGatewaysOperations` * 2021-02-01: :class:`LocalNetworkGatewaysOperations` - * 2021-03-01: :class:`LocalNetworkGatewaysOperations` + * 2021-05-01: :class:`LocalNetworkGatewaysOperations` """ api_version = self._get_api_version('local_network_gateways') if api_version == '2015-06-15': @@ -3947,14 +3954,8 @@ def local_network_gateways(self): from .v2017_03_01.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import LocalNetworkGatewaysOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import LocalNetworkGatewaysOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import LocalNetworkGatewaysOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2018-02-01': @@ -4005,8 +4006,8 @@ def local_network_gateways(self): from .v2020_11_01.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import LocalNetworkGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import LocalNetworkGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'local_network_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4031,7 +4032,7 @@ def nat_gateways(self): * 2020-08-01: :class:`NatGatewaysOperations` * 2020-11-01: :class:`NatGatewaysOperations` * 2021-02-01: :class:`NatGatewaysOperations` - * 2021-03-01: :class:`NatGatewaysOperations` + * 2021-05-01: :class:`NatGatewaysOperations` """ api_version = self._get_api_version('nat_gateways') if api_version == '2019-02-01': @@ -4066,8 +4067,8 @@ def nat_gateways(self): from .v2020_11_01.operations import NatGatewaysOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NatGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NatGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'nat_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4079,7 +4080,7 @@ def nat_rules(self): * 2020-08-01: :class:`NatRulesOperations` * 2020-11-01: :class:`NatRulesOperations` * 2021-02-01: :class:`NatRulesOperations` - * 2021-03-01: :class:`NatRulesOperations` + * 2021-05-01: :class:`NatRulesOperations` """ api_version = self._get_api_version('nat_rules') if api_version == '2020-08-01': @@ -4088,21 +4089,31 @@ def nat_rules(self): from .v2020_11_01.operations import NatRulesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NatRulesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NatRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'nat_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_groups(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkGroupsOperations` + """ + api_version = self._get_api_version('network_groups') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_interface_ip_configurations(self): """Instance depends on the API version: * 2017-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` - * 2017-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` - * 2017-09-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2017-10-01: :class:`NetworkInterfaceIPConfigurationsOperations` - * 2017-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2018-01-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2018-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2018-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` @@ -4128,19 +4139,13 @@ def network_interface_ip_configurations(self): * 2020-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2020-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2021-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` - * 2021-03-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-05-01: :class:`NetworkInterfaceIPConfigurationsOperations` """ api_version = self._get_api_version('network_interface_ip_configurations') if api_version == '2017-06-01': from .v2017_06_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2018-02-01': @@ -4191,8 +4196,8 @@ def network_interface_ip_configurations(self): from .v2020_11_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_interface_ip_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4202,10 +4207,7 @@ def network_interface_load_balancers(self): """Instance depends on the API version: * 2017-06-01: :class:`NetworkInterfaceLoadBalancersOperations` - * 2017-08-01: :class:`NetworkInterfaceLoadBalancersOperations` - * 2017-09-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2017-10-01: :class:`NetworkInterfaceLoadBalancersOperations` - * 2017-11-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2018-01-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2018-02-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2018-04-01: :class:`NetworkInterfaceLoadBalancersOperations` @@ -4231,19 +4233,13 @@ def network_interface_load_balancers(self): * 2020-08-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2020-11-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2021-02-01: :class:`NetworkInterfaceLoadBalancersOperations` - * 2021-03-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-05-01: :class:`NetworkInterfaceLoadBalancersOperations` """ api_version = self._get_api_version('network_interface_load_balancers') if api_version == '2017-06-01': from .v2017_06_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2018-02-01': @@ -4294,8 +4290,8 @@ def network_interface_load_balancers(self): from .v2020_11_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkInterfaceLoadBalancersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_interface_load_balancers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4324,7 +4320,7 @@ def network_interface_tap_configurations(self): * 2020-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` * 2020-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` * 2021-02-01: :class:`NetworkInterfaceTapConfigurationsOperations` - * 2021-03-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-05-01: :class:`NetworkInterfaceTapConfigurationsOperations` """ api_version = self._get_api_version('network_interface_tap_configurations') if api_version == '2018-08-01': @@ -4367,8 +4363,8 @@ def network_interface_tap_configurations(self): from .v2020_11_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_interface_tap_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4382,10 +4378,7 @@ def network_interfaces(self): * 2016-12-01: :class:`NetworkInterfacesOperations` * 2017-03-01: :class:`NetworkInterfacesOperations` * 2017-06-01: :class:`NetworkInterfacesOperations` - * 2017-08-01: :class:`NetworkInterfacesOperations` - * 2017-09-01: :class:`NetworkInterfacesOperations` * 2017-10-01: :class:`NetworkInterfacesOperations` - * 2017-11-01: :class:`NetworkInterfacesOperations` * 2018-01-01: :class:`NetworkInterfacesOperations` * 2018-02-01: :class:`NetworkInterfacesOperations` * 2018-04-01: :class:`NetworkInterfacesOperations` @@ -4411,7 +4404,7 @@ def network_interfaces(self): * 2020-08-01: :class:`NetworkInterfacesOperations` * 2020-11-01: :class:`NetworkInterfacesOperations` * 2021-02-01: :class:`NetworkInterfacesOperations` - * 2021-03-01: :class:`NetworkInterfacesOperations` + * 2021-05-01: :class:`NetworkInterfacesOperations` """ api_version = self._get_api_version('network_interfaces') if api_version == '2015-06-15': @@ -4424,14 +4417,8 @@ def network_interfaces(self): from .v2017_03_01.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import NetworkInterfacesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import NetworkInterfacesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import NetworkInterfacesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2018-02-01': @@ -4482,12 +4469,64 @@ def network_interfaces(self): from .v2020_11_01.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkInterfacesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkInterfacesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_interfaces'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_manager_commits(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerCommitsOperations` + """ + api_version = self._get_api_version('network_manager_commits') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagerCommitsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_commits'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_deployment_status(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerDeploymentStatusOperations` + """ + api_version = self._get_api_version('network_manager_deployment_status') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagerDeploymentStatusOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_deployment_status'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_effective_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerEffectiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('network_manager_effective_security_admin_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagerEffectiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_effective_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_managers(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagersOperations` + """ + api_version = self._get_api_version('network_managers') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkManagersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_managers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_profiles(self): """Instance depends on the API version: @@ -4512,7 +4551,7 @@ def network_profiles(self): * 2020-08-01: :class:`NetworkProfilesOperations` * 2020-11-01: :class:`NetworkProfilesOperations` * 2021-02-01: :class:`NetworkProfilesOperations` - * 2021-03-01: :class:`NetworkProfilesOperations` + * 2021-05-01: :class:`NetworkProfilesOperations` """ api_version = self._get_api_version('network_profiles') if api_version == '2018-08-01': @@ -4555,8 +4594,8 @@ def network_profiles(self): from .v2020_11_01.operations import NetworkProfilesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkProfilesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkProfilesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_profiles'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4570,10 +4609,7 @@ def network_security_groups(self): * 2016-12-01: :class:`NetworkSecurityGroupsOperations` * 2017-03-01: :class:`NetworkSecurityGroupsOperations` * 2017-06-01: :class:`NetworkSecurityGroupsOperations` - * 2017-08-01: :class:`NetworkSecurityGroupsOperations` - * 2017-09-01: :class:`NetworkSecurityGroupsOperations` * 2017-10-01: :class:`NetworkSecurityGroupsOperations` - * 2017-11-01: :class:`NetworkSecurityGroupsOperations` * 2018-01-01: :class:`NetworkSecurityGroupsOperations` * 2018-02-01: :class:`NetworkSecurityGroupsOperations` * 2018-04-01: :class:`NetworkSecurityGroupsOperations` @@ -4599,7 +4635,7 @@ def network_security_groups(self): * 2020-08-01: :class:`NetworkSecurityGroupsOperations` * 2020-11-01: :class:`NetworkSecurityGroupsOperations` * 2021-02-01: :class:`NetworkSecurityGroupsOperations` - * 2021-03-01: :class:`NetworkSecurityGroupsOperations` + * 2021-05-01: :class:`NetworkSecurityGroupsOperations` """ api_version = self._get_api_version('network_security_groups') if api_version == '2015-06-15': @@ -4612,14 +4648,8 @@ def network_security_groups(self): from .v2017_03_01.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import NetworkSecurityGroupsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import NetworkSecurityGroupsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import NetworkSecurityGroupsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2018-02-01': @@ -4670,12 +4700,25 @@ def network_security_groups(self): from .v2020_11_01.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkSecurityGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkSecurityGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_security_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_security_perimeters(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkSecurityPerimetersOperations` + """ + api_version = self._get_api_version('network_security_perimeters') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import NetworkSecurityPerimetersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_security_perimeters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_virtual_appliances(self): """Instance depends on the API version: @@ -4689,7 +4732,7 @@ def network_virtual_appliances(self): * 2020-08-01: :class:`NetworkVirtualAppliancesOperations` * 2020-11-01: :class:`NetworkVirtualAppliancesOperations` * 2021-02-01: :class:`NetworkVirtualAppliancesOperations` - * 2021-03-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-05-01: :class:`NetworkVirtualAppliancesOperations` """ api_version = self._get_api_version('network_virtual_appliances') if api_version == '2019-12-01': @@ -4710,8 +4753,8 @@ def network_virtual_appliances(self): from .v2020_11_01.operations import NetworkVirtualAppliancesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkVirtualAppliancesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkVirtualAppliancesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_virtual_appliances'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4724,10 +4767,7 @@ def network_watchers(self): * 2016-12-01: :class:`NetworkWatchersOperations` * 2017-03-01: :class:`NetworkWatchersOperations` * 2017-06-01: :class:`NetworkWatchersOperations` - * 2017-08-01: :class:`NetworkWatchersOperations` - * 2017-09-01: :class:`NetworkWatchersOperations` * 2017-10-01: :class:`NetworkWatchersOperations` - * 2017-11-01: :class:`NetworkWatchersOperations` * 2018-01-01: :class:`NetworkWatchersOperations` * 2018-02-01: :class:`NetworkWatchersOperations` * 2018-04-01: :class:`NetworkWatchersOperations` @@ -4753,7 +4793,7 @@ def network_watchers(self): * 2020-08-01: :class:`NetworkWatchersOperations` * 2020-11-01: :class:`NetworkWatchersOperations` * 2021-02-01: :class:`NetworkWatchersOperations` - * 2021-03-01: :class:`NetworkWatchersOperations` + * 2021-05-01: :class:`NetworkWatchersOperations` """ api_version = self._get_api_version('network_watchers') if api_version == '2016-09-01': @@ -4764,14 +4804,8 @@ def network_watchers(self): from .v2017_03_01.operations import NetworkWatchersOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import NetworkWatchersOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import NetworkWatchersOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import NetworkWatchersOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import NetworkWatchersOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import NetworkWatchersOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import NetworkWatchersOperations as OperationClass elif api_version == '2018-02-01': @@ -4822,8 +4856,8 @@ def network_watchers(self): from .v2020_11_01.operations import NetworkWatchersOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkWatchersOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkWatchersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_watchers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4832,9 +4866,7 @@ def network_watchers(self): def operations(self): """Instance depends on the API version: - * 2017-09-01: :class:`Operations` * 2017-10-01: :class:`Operations` - * 2017-11-01: :class:`Operations` * 2018-01-01: :class:`Operations` * 2018-02-01: :class:`Operations` * 2018-04-01: :class:`Operations` @@ -4860,15 +4892,11 @@ def operations(self): * 2020-08-01: :class:`Operations` * 2020-11-01: :class:`Operations` * 2021-02-01: :class:`Operations` - * 2021-03-01: :class:`Operations` + * 2021-05-01: :class:`Operations` """ api_version = self._get_api_version('operations') - if api_version == '2017-09-01': - from .v2017_09_01.operations import Operations as OperationClass - elif api_version == '2017-10-01': + if api_version == '2017-10-01': from .v2017_10_01.operations import Operations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import Operations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import Operations as OperationClass elif api_version == '2018-02-01': @@ -4919,8 +4947,8 @@ def operations(self): from .v2020_11_01.operations import Operations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import Operations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import Operations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4949,7 +4977,7 @@ def p2_svpn_gateways(self): * 2020-08-01: :class:`P2SVpnGatewaysOperations` * 2020-11-01: :class:`P2SVpnGatewaysOperations` * 2021-02-01: :class:`P2SVpnGatewaysOperations` - * 2021-03-01: :class:`P2SVpnGatewaysOperations` + * 2021-05-01: :class:`P2SVpnGatewaysOperations` """ api_version = self._get_api_version('p2_svpn_gateways') if api_version == '2018-08-01': @@ -4992,8 +5020,8 @@ def p2_svpn_gateways(self): from .v2020_11_01.operations import P2SVpnGatewaysOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import P2SVpnGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import P2SVpnGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'p2_svpn_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5040,10 +5068,7 @@ def packet_captures(self): * 2016-12-01: :class:`PacketCapturesOperations` * 2017-03-01: :class:`PacketCapturesOperations` * 2017-06-01: :class:`PacketCapturesOperations` - * 2017-08-01: :class:`PacketCapturesOperations` - * 2017-09-01: :class:`PacketCapturesOperations` * 2017-10-01: :class:`PacketCapturesOperations` - * 2017-11-01: :class:`PacketCapturesOperations` * 2018-01-01: :class:`PacketCapturesOperations` * 2018-02-01: :class:`PacketCapturesOperations` * 2018-04-01: :class:`PacketCapturesOperations` @@ -5069,7 +5094,7 @@ def packet_captures(self): * 2020-08-01: :class:`PacketCapturesOperations` * 2020-11-01: :class:`PacketCapturesOperations` * 2021-02-01: :class:`PacketCapturesOperations` - * 2021-03-01: :class:`PacketCapturesOperations` + * 2021-05-01: :class:`PacketCapturesOperations` """ api_version = self._get_api_version('packet_captures') if api_version == '2016-09-01': @@ -5080,14 +5105,8 @@ def packet_captures(self): from .v2017_03_01.operations import PacketCapturesOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import PacketCapturesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import PacketCapturesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import PacketCapturesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import PacketCapturesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import PacketCapturesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import PacketCapturesOperations as OperationClass elif api_version == '2018-02-01': @@ -5138,8 +5157,8 @@ def packet_captures(self): from .v2020_11_01.operations import PacketCapturesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import PacketCapturesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PacketCapturesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'packet_captures'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5165,7 +5184,7 @@ def peer_express_route_circuit_connections(self): * 2020-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` * 2020-11-01: :class:`PeerExpressRouteCircuitConnectionsOperations` * 2021-02-01: :class:`PeerExpressRouteCircuitConnectionsOperations` - * 2021-03-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-05-01: :class:`PeerExpressRouteCircuitConnectionsOperations` """ api_version = self._get_api_version('peer_express_route_circuit_connections') if api_version == '2018-12-01': @@ -5202,12 +5221,25 @@ def peer_express_route_circuit_connections(self): from .v2020_11_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'peer_express_route_circuit_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def perimeter_associable_resource_types(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`PerimeterAssociableResourceTypesOperations` + """ + api_version = self._get_api_version('perimeter_associable_resource_types') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import PerimeterAssociableResourceTypesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'perimeter_associable_resource_types'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def private_dns_zone_groups(self): """Instance depends on the API version: @@ -5220,7 +5252,7 @@ def private_dns_zone_groups(self): * 2020-08-01: :class:`PrivateDnsZoneGroupsOperations` * 2020-11-01: :class:`PrivateDnsZoneGroupsOperations` * 2021-02-01: :class:`PrivateDnsZoneGroupsOperations` - * 2021-03-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-05-01: :class:`PrivateDnsZoneGroupsOperations` """ api_version = self._get_api_version('private_dns_zone_groups') if api_version == '2020-03-01': @@ -5239,8 +5271,8 @@ def private_dns_zone_groups(self): from .v2020_11_01.operations import PrivateDnsZoneGroupsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import PrivateDnsZoneGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateDnsZoneGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_dns_zone_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5264,7 +5296,7 @@ def private_endpoints(self): * 2020-08-01: :class:`PrivateEndpointsOperations` * 2020-11-01: :class:`PrivateEndpointsOperations` * 2021-02-01: :class:`PrivateEndpointsOperations` - * 2021-03-01: :class:`PrivateEndpointsOperations` + * 2021-05-01: :class:`PrivateEndpointsOperations` """ api_version = self._get_api_version('private_endpoints') if api_version == '2019-04-01': @@ -5297,8 +5329,8 @@ def private_endpoints(self): from .v2020_11_01.operations import PrivateEndpointsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import PrivateEndpointsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateEndpointsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoints'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5322,7 +5354,7 @@ def private_link_services(self): * 2020-08-01: :class:`PrivateLinkServicesOperations` * 2020-11-01: :class:`PrivateLinkServicesOperations` * 2021-02-01: :class:`PrivateLinkServicesOperations` - * 2021-03-01: :class:`PrivateLinkServicesOperations` + * 2021-05-01: :class:`PrivateLinkServicesOperations` """ api_version = self._get_api_version('private_link_services') if api_version == '2019-04-01': @@ -5355,8 +5387,8 @@ def private_link_services(self): from .v2020_11_01.operations import PrivateLinkServicesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import PrivateLinkServicesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PrivateLinkServicesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_services'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5370,10 +5402,7 @@ def public_ip_addresses(self): * 2016-12-01: :class:`PublicIPAddressesOperations` * 2017-03-01: :class:`PublicIPAddressesOperations` * 2017-06-01: :class:`PublicIPAddressesOperations` - * 2017-08-01: :class:`PublicIPAddressesOperations` - * 2017-09-01: :class:`PublicIPAddressesOperations` * 2017-10-01: :class:`PublicIPAddressesOperations` - * 2017-11-01: :class:`PublicIPAddressesOperations` * 2018-01-01: :class:`PublicIPAddressesOperations` * 2018-02-01: :class:`PublicIPAddressesOperations` * 2018-04-01: :class:`PublicIPAddressesOperations` @@ -5399,7 +5428,7 @@ def public_ip_addresses(self): * 2020-08-01: :class:`PublicIPAddressesOperations` * 2020-11-01: :class:`PublicIPAddressesOperations` * 2021-02-01: :class:`PublicIPAddressesOperations` - * 2021-03-01: :class:`PublicIPAddressesOperations` + * 2021-05-01: :class:`PublicIPAddressesOperations` """ api_version = self._get_api_version('public_ip_addresses') if api_version == '2015-06-15': @@ -5412,14 +5441,8 @@ def public_ip_addresses(self): from .v2017_03_01.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import PublicIPAddressesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import PublicIPAddressesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import PublicIPAddressesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2018-02-01': @@ -5470,8 +5493,8 @@ def public_ip_addresses(self): from .v2020_11_01.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import PublicIPAddressesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PublicIPAddressesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'public_ip_addresses'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5501,7 +5524,7 @@ def public_ip_prefixes(self): * 2020-08-01: :class:`PublicIPPrefixesOperations` * 2020-11-01: :class:`PublicIPPrefixesOperations` * 2021-02-01: :class:`PublicIPPrefixesOperations` - * 2021-03-01: :class:`PublicIPPrefixesOperations` + * 2021-05-01: :class:`PublicIPPrefixesOperations` """ api_version = self._get_api_version('public_ip_prefixes') if api_version == '2018-07-01': @@ -5546,8 +5569,8 @@ def public_ip_prefixes(self): from .v2020_11_01.operations import PublicIPPrefixesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import PublicIPPrefixesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import PublicIPPrefixesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'public_ip_prefixes'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5572,7 +5595,7 @@ def resource_navigation_links(self): * 2020-08-01: :class:`ResourceNavigationLinksOperations` * 2020-11-01: :class:`ResourceNavigationLinksOperations` * 2021-02-01: :class:`ResourceNavigationLinksOperations` - * 2021-03-01: :class:`ResourceNavigationLinksOperations` + * 2021-05-01: :class:`ResourceNavigationLinksOperations` """ api_version = self._get_api_version('resource_navigation_links') if api_version == '2019-02-01': @@ -5607,8 +5630,8 @@ def resource_navigation_links(self): from .v2020_11_01.operations import ResourceNavigationLinksOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ResourceNavigationLinksOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ResourceNavigationLinksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'resource_navigation_links'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5620,10 +5643,7 @@ def route_filter_rules(self): * 2016-12-01: :class:`RouteFilterRulesOperations` * 2017-03-01: :class:`RouteFilterRulesOperations` * 2017-06-01: :class:`RouteFilterRulesOperations` - * 2017-08-01: :class:`RouteFilterRulesOperations` - * 2017-09-01: :class:`RouteFilterRulesOperations` * 2017-10-01: :class:`RouteFilterRulesOperations` - * 2017-11-01: :class:`RouteFilterRulesOperations` * 2018-01-01: :class:`RouteFilterRulesOperations` * 2018-02-01: :class:`RouteFilterRulesOperations` * 2018-04-01: :class:`RouteFilterRulesOperations` @@ -5649,7 +5669,7 @@ def route_filter_rules(self): * 2020-08-01: :class:`RouteFilterRulesOperations` * 2020-11-01: :class:`RouteFilterRulesOperations` * 2021-02-01: :class:`RouteFilterRulesOperations` - * 2021-03-01: :class:`RouteFilterRulesOperations` + * 2021-05-01: :class:`RouteFilterRulesOperations` """ api_version = self._get_api_version('route_filter_rules') if api_version == '2016-12-01': @@ -5658,14 +5678,8 @@ def route_filter_rules(self): from .v2017_03_01.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import RouteFilterRulesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import RouteFilterRulesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import RouteFilterRulesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -5716,8 +5730,8 @@ def route_filter_rules(self): from .v2020_11_01.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import RouteFilterRulesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import RouteFilterRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'route_filter_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5729,10 +5743,7 @@ def route_filters(self): * 2016-12-01: :class:`RouteFiltersOperations` * 2017-03-01: :class:`RouteFiltersOperations` * 2017-06-01: :class:`RouteFiltersOperations` - * 2017-08-01: :class:`RouteFiltersOperations` - * 2017-09-01: :class:`RouteFiltersOperations` * 2017-10-01: :class:`RouteFiltersOperations` - * 2017-11-01: :class:`RouteFiltersOperations` * 2018-01-01: :class:`RouteFiltersOperations` * 2018-02-01: :class:`RouteFiltersOperations` * 2018-04-01: :class:`RouteFiltersOperations` @@ -5758,7 +5769,7 @@ def route_filters(self): * 2020-08-01: :class:`RouteFiltersOperations` * 2020-11-01: :class:`RouteFiltersOperations` * 2021-02-01: :class:`RouteFiltersOperations` - * 2021-03-01: :class:`RouteFiltersOperations` + * 2021-05-01: :class:`RouteFiltersOperations` """ api_version = self._get_api_version('route_filters') if api_version == '2016-12-01': @@ -5767,14 +5778,8 @@ def route_filters(self): from .v2017_03_01.operations import RouteFiltersOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import RouteFiltersOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import RouteFiltersOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import RouteFiltersOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import RouteFiltersOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import RouteFiltersOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import RouteFiltersOperations as OperationClass elif api_version == '2018-02-01': @@ -5825,8 +5830,8 @@ def route_filters(self): from .v2020_11_01.operations import RouteFiltersOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import RouteFiltersOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import RouteFiltersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'route_filters'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5840,10 +5845,7 @@ def route_tables(self): * 2016-12-01: :class:`RouteTablesOperations` * 2017-03-01: :class:`RouteTablesOperations` * 2017-06-01: :class:`RouteTablesOperations` - * 2017-08-01: :class:`RouteTablesOperations` - * 2017-09-01: :class:`RouteTablesOperations` * 2017-10-01: :class:`RouteTablesOperations` - * 2017-11-01: :class:`RouteTablesOperations` * 2018-01-01: :class:`RouteTablesOperations` * 2018-02-01: :class:`RouteTablesOperations` * 2018-04-01: :class:`RouteTablesOperations` @@ -5869,7 +5871,7 @@ def route_tables(self): * 2020-08-01: :class:`RouteTablesOperations` * 2020-11-01: :class:`RouteTablesOperations` * 2021-02-01: :class:`RouteTablesOperations` - * 2021-03-01: :class:`RouteTablesOperations` + * 2021-05-01: :class:`RouteTablesOperations` """ api_version = self._get_api_version('route_tables') if api_version == '2015-06-15': @@ -5882,14 +5884,8 @@ def route_tables(self): from .v2017_03_01.operations import RouteTablesOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import RouteTablesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import RouteTablesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import RouteTablesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import RouteTablesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import RouteTablesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import RouteTablesOperations as OperationClass elif api_version == '2018-02-01': @@ -5940,8 +5936,8 @@ def route_tables(self): from .v2020_11_01.operations import RouteTablesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import RouteTablesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import RouteTablesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'route_tables'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5955,10 +5951,7 @@ def routes(self): * 2016-12-01: :class:`RoutesOperations` * 2017-03-01: :class:`RoutesOperations` * 2017-06-01: :class:`RoutesOperations` - * 2017-08-01: :class:`RoutesOperations` - * 2017-09-01: :class:`RoutesOperations` * 2017-10-01: :class:`RoutesOperations` - * 2017-11-01: :class:`RoutesOperations` * 2018-01-01: :class:`RoutesOperations` * 2018-02-01: :class:`RoutesOperations` * 2018-04-01: :class:`RoutesOperations` @@ -5984,7 +5977,7 @@ def routes(self): * 2020-08-01: :class:`RoutesOperations` * 2020-11-01: :class:`RoutesOperations` * 2021-02-01: :class:`RoutesOperations` - * 2021-03-01: :class:`RoutesOperations` + * 2021-05-01: :class:`RoutesOperations` """ api_version = self._get_api_version('routes') if api_version == '2015-06-15': @@ -5997,14 +5990,8 @@ def routes(self): from .v2017_03_01.operations import RoutesOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import RoutesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import RoutesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import RoutesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import RoutesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import RoutesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import RoutesOperations as OperationClass elif api_version == '2018-02-01': @@ -6055,12 +6042,38 @@ def routes(self): from .v2020_11_01.operations import RoutesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import RoutesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import RoutesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import RoutesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'routes'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def routing_intent(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`RoutingIntentOperations` + """ + api_version = self._get_api_version('routing_intent') + if api_version == '2021-05-01': + from .v2021_05_01.operations import RoutingIntentOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'routing_intent'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_admin_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityAdminConfigurationsOperations` + """ + api_version = self._get_api_version('security_admin_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import SecurityAdminConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_admin_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def security_partner_providers(self): """Instance depends on the API version: @@ -6073,7 +6086,7 @@ def security_partner_providers(self): * 2020-08-01: :class:`SecurityPartnerProvidersOperations` * 2020-11-01: :class:`SecurityPartnerProvidersOperations` * 2021-02-01: :class:`SecurityPartnerProvidersOperations` - * 2021-03-01: :class:`SecurityPartnerProvidersOperations` + * 2021-05-01: :class:`SecurityPartnerProvidersOperations` """ api_version = self._get_api_version('security_partner_providers') if api_version == '2020-03-01': @@ -6092,8 +6105,8 @@ def security_partner_providers(self): from .v2020_11_01.operations import SecurityPartnerProvidersOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import SecurityPartnerProvidersOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import SecurityPartnerProvidersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'security_partner_providers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6107,10 +6120,7 @@ def security_rules(self): * 2016-12-01: :class:`SecurityRulesOperations` * 2017-03-01: :class:`SecurityRulesOperations` * 2017-06-01: :class:`SecurityRulesOperations` - * 2017-08-01: :class:`SecurityRulesOperations` - * 2017-09-01: :class:`SecurityRulesOperations` * 2017-10-01: :class:`SecurityRulesOperations` - * 2017-11-01: :class:`SecurityRulesOperations` * 2018-01-01: :class:`SecurityRulesOperations` * 2018-02-01: :class:`SecurityRulesOperations` * 2018-04-01: :class:`SecurityRulesOperations` @@ -6136,7 +6146,7 @@ def security_rules(self): * 2020-08-01: :class:`SecurityRulesOperations` * 2020-11-01: :class:`SecurityRulesOperations` * 2021-02-01: :class:`SecurityRulesOperations` - * 2021-03-01: :class:`SecurityRulesOperations` + * 2021-05-01: :class:`SecurityRulesOperations` """ api_version = self._get_api_version('security_rules') if api_version == '2015-06-15': @@ -6149,14 +6159,8 @@ def security_rules(self): from .v2017_03_01.operations import SecurityRulesOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import SecurityRulesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import SecurityRulesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import SecurityRulesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import SecurityRulesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import SecurityRulesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import SecurityRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -6207,12 +6211,25 @@ def security_rules(self): from .v2020_11_01.operations import SecurityRulesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import SecurityRulesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import SecurityRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'security_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def security_user_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityUserConfigurationsOperations` + """ + api_version = self._get_api_version('security_user_configurations') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import SecurityUserConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_user_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def service_association_links(self): """Instance depends on the API version: @@ -6233,7 +6250,7 @@ def service_association_links(self): * 2020-08-01: :class:`ServiceAssociationLinksOperations` * 2020-11-01: :class:`ServiceAssociationLinksOperations` * 2021-02-01: :class:`ServiceAssociationLinksOperations` - * 2021-03-01: :class:`ServiceAssociationLinksOperations` + * 2021-05-01: :class:`ServiceAssociationLinksOperations` """ api_version = self._get_api_version('service_association_links') if api_version == '2019-02-01': @@ -6268,8 +6285,8 @@ def service_association_links(self): from .v2020_11_01.operations import ServiceAssociationLinksOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ServiceAssociationLinksOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceAssociationLinksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_association_links'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6299,7 +6316,7 @@ def service_endpoint_policies(self): * 2020-08-01: :class:`ServiceEndpointPoliciesOperations` * 2020-11-01: :class:`ServiceEndpointPoliciesOperations` * 2021-02-01: :class:`ServiceEndpointPoliciesOperations` - * 2021-03-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-05-01: :class:`ServiceEndpointPoliciesOperations` """ api_version = self._get_api_version('service_endpoint_policies') if api_version == '2018-07-01': @@ -6344,8 +6361,8 @@ def service_endpoint_policies(self): from .v2020_11_01.operations import ServiceEndpointPoliciesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ServiceEndpointPoliciesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceEndpointPoliciesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_endpoint_policies'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6375,7 +6392,7 @@ def service_endpoint_policy_definitions(self): * 2020-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` * 2020-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` * 2021-02-01: :class:`ServiceEndpointPolicyDefinitionsOperations` - * 2021-03-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-05-01: :class:`ServiceEndpointPolicyDefinitionsOperations` """ api_version = self._get_api_version('service_endpoint_policy_definitions') if api_version == '2018-07-01': @@ -6420,8 +6437,8 @@ def service_endpoint_policy_definitions(self): from .v2020_11_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_endpoint_policy_definitions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6430,11 +6447,11 @@ def service_endpoint_policy_definitions(self): def service_tag_information(self): """Instance depends on the API version: - * 2021-03-01: :class:`ServiceTagInformationOperations` + * 2021-05-01: :class:`ServiceTagInformationOperations` """ api_version = self._get_api_version('service_tag_information') - if api_version == '2021-03-01': - from .v2021_03_01.operations import ServiceTagInformationOperations as OperationClass + if api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceTagInformationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_tag_information'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6458,7 +6475,7 @@ def service_tags(self): * 2020-08-01: :class:`ServiceTagsOperations` * 2020-11-01: :class:`ServiceTagsOperations` * 2021-02-01: :class:`ServiceTagsOperations` - * 2021-03-01: :class:`ServiceTagsOperations` + * 2021-05-01: :class:`ServiceTagsOperations` """ api_version = self._get_api_version('service_tags') if api_version == '2019-04-01': @@ -6491,8 +6508,8 @@ def service_tags(self): from .v2020_11_01.operations import ServiceTagsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import ServiceTagsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import ServiceTagsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_tags'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6506,10 +6523,7 @@ def subnets(self): * 2016-12-01: :class:`SubnetsOperations` * 2017-03-01: :class:`SubnetsOperations` * 2017-06-01: :class:`SubnetsOperations` - * 2017-08-01: :class:`SubnetsOperations` - * 2017-09-01: :class:`SubnetsOperations` * 2017-10-01: :class:`SubnetsOperations` - * 2017-11-01: :class:`SubnetsOperations` * 2018-01-01: :class:`SubnetsOperations` * 2018-02-01: :class:`SubnetsOperations` * 2018-04-01: :class:`SubnetsOperations` @@ -6535,7 +6549,7 @@ def subnets(self): * 2020-08-01: :class:`SubnetsOperations` * 2020-11-01: :class:`SubnetsOperations` * 2021-02-01: :class:`SubnetsOperations` - * 2021-03-01: :class:`SubnetsOperations` + * 2021-05-01: :class:`SubnetsOperations` """ api_version = self._get_api_version('subnets') if api_version == '2015-06-15': @@ -6548,14 +6562,8 @@ def subnets(self): from .v2017_03_01.operations import SubnetsOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import SubnetsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import SubnetsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import SubnetsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import SubnetsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import SubnetsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import SubnetsOperations as OperationClass elif api_version == '2018-02-01': @@ -6606,8 +6614,8 @@ def subnets(self): from .v2020_11_01.operations import SubnetsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import SubnetsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import SubnetsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import SubnetsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'subnets'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6621,10 +6629,7 @@ def usages(self): * 2016-12-01: :class:`UsagesOperations` * 2017-03-01: :class:`UsagesOperations` * 2017-06-01: :class:`UsagesOperations` - * 2017-08-01: :class:`UsagesOperations` - * 2017-09-01: :class:`UsagesOperations` * 2017-10-01: :class:`UsagesOperations` - * 2017-11-01: :class:`UsagesOperations` * 2018-01-01: :class:`UsagesOperations` * 2018-02-01: :class:`UsagesOperations` * 2018-04-01: :class:`UsagesOperations` @@ -6650,7 +6655,7 @@ def usages(self): * 2020-08-01: :class:`UsagesOperations` * 2020-11-01: :class:`UsagesOperations` * 2021-02-01: :class:`UsagesOperations` - * 2021-03-01: :class:`UsagesOperations` + * 2021-05-01: :class:`UsagesOperations` """ api_version = self._get_api_version('usages') if api_version == '2015-06-15': @@ -6663,14 +6668,8 @@ def usages(self): from .v2017_03_01.operations import UsagesOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import UsagesOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import UsagesOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import UsagesOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import UsagesOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import UsagesOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import UsagesOperations as OperationClass elif api_version == '2018-02-01': @@ -6721,12 +6720,38 @@ def usages(self): from .v2020_11_01.operations import UsagesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import UsagesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import UsagesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import UsagesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'usages'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def user_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRuleCollectionsOperations` + """ + api_version = self._get_api_version('user_rule_collections') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import UserRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRulesOperations` + """ + api_version = self._get_api_version('user_rules') + if api_version == '2021-02-01-preview': + from .v2021_02_01_preview.operations import UserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def virtual_appliance_sites(self): """Instance depends on the API version: @@ -6737,7 +6762,7 @@ def virtual_appliance_sites(self): * 2020-08-01: :class:`VirtualApplianceSitesOperations` * 2020-11-01: :class:`VirtualApplianceSitesOperations` * 2021-02-01: :class:`VirtualApplianceSitesOperations` - * 2021-03-01: :class:`VirtualApplianceSitesOperations` + * 2021-05-01: :class:`VirtualApplianceSitesOperations` """ api_version = self._get_api_version('virtual_appliance_sites') if api_version == '2020-05-01': @@ -6752,8 +6777,8 @@ def virtual_appliance_sites(self): from .v2020_11_01.operations import VirtualApplianceSitesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualApplianceSitesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualApplianceSitesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_appliance_sites'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6768,7 +6793,7 @@ def virtual_appliance_skus(self): * 2020-08-01: :class:`VirtualApplianceSkusOperations` * 2020-11-01: :class:`VirtualApplianceSkusOperations` * 2021-02-01: :class:`VirtualApplianceSkusOperations` - * 2021-03-01: :class:`VirtualApplianceSkusOperations` + * 2021-05-01: :class:`VirtualApplianceSkusOperations` """ api_version = self._get_api_version('virtual_appliance_skus') if api_version == '2020-05-01': @@ -6783,8 +6808,8 @@ def virtual_appliance_skus(self): from .v2020_11_01.operations import VirtualApplianceSkusOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualApplianceSkusOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualApplianceSkusOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_appliance_skus'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6799,7 +6824,7 @@ def virtual_hub_bgp_connection(self): * 2020-08-01: :class:`VirtualHubBgpConnectionOperations` * 2020-11-01: :class:`VirtualHubBgpConnectionOperations` * 2021-02-01: :class:`VirtualHubBgpConnectionOperations` - * 2021-03-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-05-01: :class:`VirtualHubBgpConnectionOperations` """ api_version = self._get_api_version('virtual_hub_bgp_connection') if api_version == '2020-05-01': @@ -6814,8 +6839,8 @@ def virtual_hub_bgp_connection(self): from .v2020_11_01.operations import VirtualHubBgpConnectionOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualHubBgpConnectionOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubBgpConnectionOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connection'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6830,7 +6855,7 @@ def virtual_hub_bgp_connections(self): * 2020-08-01: :class:`VirtualHubBgpConnectionsOperations` * 2020-11-01: :class:`VirtualHubBgpConnectionsOperations` * 2021-02-01: :class:`VirtualHubBgpConnectionsOperations` - * 2021-03-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-05-01: :class:`VirtualHubBgpConnectionsOperations` """ api_version = self._get_api_version('virtual_hub_bgp_connections') if api_version == '2020-05-01': @@ -6845,8 +6870,8 @@ def virtual_hub_bgp_connections(self): from .v2020_11_01.operations import VirtualHubBgpConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualHubBgpConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubBgpConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6861,7 +6886,7 @@ def virtual_hub_ip_configuration(self): * 2020-08-01: :class:`VirtualHubIpConfigurationOperations` * 2020-11-01: :class:`VirtualHubIpConfigurationOperations` * 2021-02-01: :class:`VirtualHubIpConfigurationOperations` - * 2021-03-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-05-01: :class:`VirtualHubIpConfigurationOperations` """ api_version = self._get_api_version('virtual_hub_ip_configuration') if api_version == '2020-05-01': @@ -6876,8 +6901,8 @@ def virtual_hub_ip_configuration(self): from .v2020_11_01.operations import VirtualHubIpConfigurationOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualHubIpConfigurationOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubIpConfigurationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hub_ip_configuration'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6897,7 +6922,7 @@ def virtual_hub_route_table_v2_s(self): * 2020-08-01: :class:`VirtualHubRouteTableV2SOperations` * 2020-11-01: :class:`VirtualHubRouteTableV2SOperations` * 2021-02-01: :class:`VirtualHubRouteTableV2SOperations` - * 2021-03-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-05-01: :class:`VirtualHubRouteTableV2SOperations` """ api_version = self._get_api_version('virtual_hub_route_table_v2_s') if api_version == '2019-09-01': @@ -6922,8 +6947,8 @@ def virtual_hub_route_table_v2_s(self): from .v2020_11_01.operations import VirtualHubRouteTableV2SOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualHubRouteTableV2SOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubRouteTableV2SOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hub_route_table_v2_s'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6955,7 +6980,7 @@ def virtual_hubs(self): * 2020-08-01: :class:`VirtualHubsOperations` * 2020-11-01: :class:`VirtualHubsOperations` * 2021-02-01: :class:`VirtualHubsOperations` - * 2021-03-01: :class:`VirtualHubsOperations` + * 2021-05-01: :class:`VirtualHubsOperations` """ api_version = self._get_api_version('virtual_hubs') if api_version == '2018-04-01': @@ -7004,8 +7029,8 @@ def virtual_hubs(self): from .v2020_11_01.operations import VirtualHubsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualHubsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualHubsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hubs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7019,10 +7044,7 @@ def virtual_network_gateway_connections(self): * 2016-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` - * 2017-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` - * 2017-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-10-01: :class:`VirtualNetworkGatewayConnectionsOperations` - * 2017-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2018-01-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2018-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2018-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` @@ -7048,7 +7070,7 @@ def virtual_network_gateway_connections(self): * 2020-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2020-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2021-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` - * 2021-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-05-01: :class:`VirtualNetworkGatewayConnectionsOperations` """ api_version = self._get_api_version('virtual_network_gateway_connections') if api_version == '2015-06-15': @@ -7061,14 +7083,8 @@ def virtual_network_gateway_connections(self): from .v2017_03_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2018-02-01': @@ -7119,8 +7135,8 @@ def virtual_network_gateway_connections(self): from .v2020_11_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_gateway_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7130,13 +7146,13 @@ def virtual_network_gateway_nat_rules(self): """Instance depends on the API version: * 2021-02-01: :class:`VirtualNetworkGatewayNatRulesOperations` - * 2021-03-01: :class:`VirtualNetworkGatewayNatRulesOperations` + * 2021-05-01: :class:`VirtualNetworkGatewayNatRulesOperations` """ api_version = self._get_api_version('virtual_network_gateway_nat_rules') if api_version == '2021-02-01': from .v2021_02_01.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_gateway_nat_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7150,10 +7166,7 @@ def virtual_network_gateways(self): * 2016-12-01: :class:`VirtualNetworkGatewaysOperations` * 2017-03-01: :class:`VirtualNetworkGatewaysOperations` * 2017-06-01: :class:`VirtualNetworkGatewaysOperations` - * 2017-08-01: :class:`VirtualNetworkGatewaysOperations` - * 2017-09-01: :class:`VirtualNetworkGatewaysOperations` * 2017-10-01: :class:`VirtualNetworkGatewaysOperations` - * 2017-11-01: :class:`VirtualNetworkGatewaysOperations` * 2018-01-01: :class:`VirtualNetworkGatewaysOperations` * 2018-02-01: :class:`VirtualNetworkGatewaysOperations` * 2018-04-01: :class:`VirtualNetworkGatewaysOperations` @@ -7179,7 +7192,7 @@ def virtual_network_gateways(self): * 2020-08-01: :class:`VirtualNetworkGatewaysOperations` * 2020-11-01: :class:`VirtualNetworkGatewaysOperations` * 2021-02-01: :class:`VirtualNetworkGatewaysOperations` - * 2021-03-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-05-01: :class:`VirtualNetworkGatewaysOperations` """ api_version = self._get_api_version('virtual_network_gateways') if api_version == '2015-06-15': @@ -7192,14 +7205,8 @@ def virtual_network_gateways(self): from .v2017_03_01.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import VirtualNetworkGatewaysOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import VirtualNetworkGatewaysOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import VirtualNetworkGatewaysOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2018-02-01': @@ -7250,8 +7257,8 @@ def virtual_network_gateways(self): from .v2020_11_01.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualNetworkGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7264,10 +7271,7 @@ def virtual_network_peerings(self): * 2016-12-01: :class:`VirtualNetworkPeeringsOperations` * 2017-03-01: :class:`VirtualNetworkPeeringsOperations` * 2017-06-01: :class:`VirtualNetworkPeeringsOperations` - * 2017-08-01: :class:`VirtualNetworkPeeringsOperations` - * 2017-09-01: :class:`VirtualNetworkPeeringsOperations` * 2017-10-01: :class:`VirtualNetworkPeeringsOperations` - * 2017-11-01: :class:`VirtualNetworkPeeringsOperations` * 2018-01-01: :class:`VirtualNetworkPeeringsOperations` * 2018-02-01: :class:`VirtualNetworkPeeringsOperations` * 2018-04-01: :class:`VirtualNetworkPeeringsOperations` @@ -7293,7 +7297,7 @@ def virtual_network_peerings(self): * 2020-08-01: :class:`VirtualNetworkPeeringsOperations` * 2020-11-01: :class:`VirtualNetworkPeeringsOperations` * 2021-02-01: :class:`VirtualNetworkPeeringsOperations` - * 2021-03-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-05-01: :class:`VirtualNetworkPeeringsOperations` """ api_version = self._get_api_version('virtual_network_peerings') if api_version == '2016-09-01': @@ -7304,14 +7308,8 @@ def virtual_network_peerings(self): from .v2017_03_01.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import VirtualNetworkPeeringsOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import VirtualNetworkPeeringsOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import VirtualNetworkPeeringsOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2018-02-01': @@ -7362,8 +7360,8 @@ def virtual_network_peerings(self): from .v2020_11_01.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualNetworkPeeringsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkPeeringsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_peerings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7392,7 +7390,7 @@ def virtual_network_taps(self): * 2020-08-01: :class:`VirtualNetworkTapsOperations` * 2020-11-01: :class:`VirtualNetworkTapsOperations` * 2021-02-01: :class:`VirtualNetworkTapsOperations` - * 2021-03-01: :class:`VirtualNetworkTapsOperations` + * 2021-05-01: :class:`VirtualNetworkTapsOperations` """ api_version = self._get_api_version('virtual_network_taps') if api_version == '2018-08-01': @@ -7435,8 +7433,8 @@ def virtual_network_taps(self): from .v2020_11_01.operations import VirtualNetworkTapsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualNetworkTapsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworkTapsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_taps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7450,10 +7448,7 @@ def virtual_networks(self): * 2016-12-01: :class:`VirtualNetworksOperations` * 2017-03-01: :class:`VirtualNetworksOperations` * 2017-06-01: :class:`VirtualNetworksOperations` - * 2017-08-01: :class:`VirtualNetworksOperations` - * 2017-09-01: :class:`VirtualNetworksOperations` * 2017-10-01: :class:`VirtualNetworksOperations` - * 2017-11-01: :class:`VirtualNetworksOperations` * 2018-01-01: :class:`VirtualNetworksOperations` * 2018-02-01: :class:`VirtualNetworksOperations` * 2018-04-01: :class:`VirtualNetworksOperations` @@ -7479,7 +7474,7 @@ def virtual_networks(self): * 2020-08-01: :class:`VirtualNetworksOperations` * 2020-11-01: :class:`VirtualNetworksOperations` * 2021-02-01: :class:`VirtualNetworksOperations` - * 2021-03-01: :class:`VirtualNetworksOperations` + * 2021-05-01: :class:`VirtualNetworksOperations` """ api_version = self._get_api_version('virtual_networks') if api_version == '2015-06-15': @@ -7492,14 +7487,8 @@ def virtual_networks(self): from .v2017_03_01.operations import VirtualNetworksOperations as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import VirtualNetworksOperations as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import VirtualNetworksOperations as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import VirtualNetworksOperations as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import VirtualNetworksOperations as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import VirtualNetworksOperations as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import VirtualNetworksOperations as OperationClass elif api_version == '2018-02-01': @@ -7550,8 +7539,8 @@ def virtual_networks(self): from .v2020_11_01.operations import VirtualNetworksOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualNetworksOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualNetworksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_networks'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7573,7 +7562,7 @@ def virtual_router_peerings(self): * 2020-08-01: :class:`VirtualRouterPeeringsOperations` * 2020-11-01: :class:`VirtualRouterPeeringsOperations` * 2021-02-01: :class:`VirtualRouterPeeringsOperations` - * 2021-03-01: :class:`VirtualRouterPeeringsOperations` + * 2021-05-01: :class:`VirtualRouterPeeringsOperations` """ api_version = self._get_api_version('virtual_router_peerings') if api_version == '2019-07-01': @@ -7602,8 +7591,8 @@ def virtual_router_peerings(self): from .v2020_11_01.operations import VirtualRouterPeeringsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualRouterPeeringsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualRouterPeeringsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_router_peerings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7625,7 +7614,7 @@ def virtual_routers(self): * 2020-08-01: :class:`VirtualRoutersOperations` * 2020-11-01: :class:`VirtualRoutersOperations` * 2021-02-01: :class:`VirtualRoutersOperations` - * 2021-03-01: :class:`VirtualRoutersOperations` + * 2021-05-01: :class:`VirtualRoutersOperations` """ api_version = self._get_api_version('virtual_routers') if api_version == '2019-07-01': @@ -7654,8 +7643,8 @@ def virtual_routers(self): from .v2020_11_01.operations import VirtualRoutersOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualRoutersOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualRoutersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_routers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7687,7 +7676,7 @@ def virtual_wans(self): * 2020-08-01: :class:`VirtualWansOperations` * 2020-11-01: :class:`VirtualWansOperations` * 2021-02-01: :class:`VirtualWansOperations` - * 2021-03-01: :class:`VirtualWansOperations` + * 2021-05-01: :class:`VirtualWansOperations` """ api_version = self._get_api_version('virtual_wans') if api_version == '2018-04-01': @@ -7736,8 +7725,8 @@ def virtual_wans(self): from .v2020_11_01.operations import VirtualWansOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VirtualWansOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VirtualWansOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_wans'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7769,7 +7758,7 @@ def vpn_connections(self): * 2020-08-01: :class:`VpnConnectionsOperations` * 2020-11-01: :class:`VpnConnectionsOperations` * 2021-02-01: :class:`VpnConnectionsOperations` - * 2021-03-01: :class:`VpnConnectionsOperations` + * 2021-05-01: :class:`VpnConnectionsOperations` """ api_version = self._get_api_version('vpn_connections') if api_version == '2018-04-01': @@ -7818,8 +7807,8 @@ def vpn_connections(self): from .v2020_11_01.operations import VpnConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VpnConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7851,7 +7840,7 @@ def vpn_gateways(self): * 2020-08-01: :class:`VpnGatewaysOperations` * 2020-11-01: :class:`VpnGatewaysOperations` * 2021-02-01: :class:`VpnGatewaysOperations` - * 2021-03-01: :class:`VpnGatewaysOperations` + * 2021-05-01: :class:`VpnGatewaysOperations` """ api_version = self._get_api_version('vpn_gateways') if api_version == '2018-04-01': @@ -7900,8 +7889,8 @@ def vpn_gateways(self): from .v2020_11_01.operations import VpnGatewaysOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VpnGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7924,7 +7913,7 @@ def vpn_link_connections(self): * 2020-08-01: :class:`VpnLinkConnectionsOperations` * 2020-11-01: :class:`VpnLinkConnectionsOperations` * 2021-02-01: :class:`VpnLinkConnectionsOperations` - * 2021-03-01: :class:`VpnLinkConnectionsOperations` + * 2021-05-01: :class:`VpnLinkConnectionsOperations` """ api_version = self._get_api_version('vpn_link_connections') if api_version == '2019-06-01': @@ -7955,8 +7944,8 @@ def vpn_link_connections(self): from .v2020_11_01.operations import VpnLinkConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VpnLinkConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnLinkConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_link_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7977,7 +7966,7 @@ def vpn_server_configurations(self): * 2020-08-01: :class:`VpnServerConfigurationsOperations` * 2020-11-01: :class:`VpnServerConfigurationsOperations` * 2021-02-01: :class:`VpnServerConfigurationsOperations` - * 2021-03-01: :class:`VpnServerConfigurationsOperations` + * 2021-05-01: :class:`VpnServerConfigurationsOperations` """ api_version = self._get_api_version('vpn_server_configurations') if api_version == '2019-08-01': @@ -8004,8 +7993,8 @@ def vpn_server_configurations(self): from .v2020_11_01.operations import VpnServerConfigurationsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VpnServerConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnServerConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_server_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8026,7 +8015,7 @@ def vpn_server_configurations_associated_with_virtual_wan(self): * 2020-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` * 2020-11-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` * 2021-02-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` - * 2021-03-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-05-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` """ api_version = self._get_api_version('vpn_server_configurations_associated_with_virtual_wan') if api_version == '2019-08-01': @@ -8053,8 +8042,8 @@ def vpn_server_configurations_associated_with_virtual_wan(self): from .v2020_11_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_server_configurations_associated_with_virtual_wan'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8077,7 +8066,7 @@ def vpn_site_link_connections(self): * 2020-08-01: :class:`VpnSiteLinkConnectionsOperations` * 2020-11-01: :class:`VpnSiteLinkConnectionsOperations` * 2021-02-01: :class:`VpnSiteLinkConnectionsOperations` - * 2021-03-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-05-01: :class:`VpnSiteLinkConnectionsOperations` """ api_version = self._get_api_version('vpn_site_link_connections') if api_version == '2019-06-01': @@ -8108,8 +8097,8 @@ def vpn_site_link_connections(self): from .v2020_11_01.operations import VpnSiteLinkConnectionsOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VpnSiteLinkConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnSiteLinkConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_site_link_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8132,7 +8121,7 @@ def vpn_site_links(self): * 2020-08-01: :class:`VpnSiteLinksOperations` * 2020-11-01: :class:`VpnSiteLinksOperations` * 2021-02-01: :class:`VpnSiteLinksOperations` - * 2021-03-01: :class:`VpnSiteLinksOperations` + * 2021-05-01: :class:`VpnSiteLinksOperations` """ api_version = self._get_api_version('vpn_site_links') if api_version == '2019-06-01': @@ -8163,8 +8152,8 @@ def vpn_site_links(self): from .v2020_11_01.operations import VpnSiteLinksOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VpnSiteLinksOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnSiteLinksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_site_links'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8196,7 +8185,7 @@ def vpn_sites(self): * 2020-08-01: :class:`VpnSitesOperations` * 2020-11-01: :class:`VpnSitesOperations` * 2021-02-01: :class:`VpnSitesOperations` - * 2021-03-01: :class:`VpnSitesOperations` + * 2021-05-01: :class:`VpnSitesOperations` """ api_version = self._get_api_version('vpn_sites') if api_version == '2018-04-01': @@ -8245,8 +8234,8 @@ def vpn_sites(self): from .v2020_11_01.operations import VpnSitesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VpnSitesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnSitesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_sites'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8278,7 +8267,7 @@ def vpn_sites_configuration(self): * 2020-08-01: :class:`VpnSitesConfigurationOperations` * 2020-11-01: :class:`VpnSitesConfigurationOperations` * 2021-02-01: :class:`VpnSitesConfigurationOperations` - * 2021-03-01: :class:`VpnSitesConfigurationOperations` + * 2021-05-01: :class:`VpnSitesConfigurationOperations` """ api_version = self._get_api_version('vpn_sites_configuration') if api_version == '2018-04-01': @@ -8327,8 +8316,8 @@ def vpn_sites_configuration(self): from .v2020_11_01.operations import VpnSitesConfigurationOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import VpnSitesConfigurationOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import VpnSitesConfigurationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_sites_configuration'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8354,7 +8343,7 @@ def web_application_firewall_policies(self): * 2020-08-01: :class:`WebApplicationFirewallPoliciesOperations` * 2020-11-01: :class:`WebApplicationFirewallPoliciesOperations` * 2021-02-01: :class:`WebApplicationFirewallPoliciesOperations` - * 2021-03-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-05-01: :class:`WebApplicationFirewallPoliciesOperations` """ api_version = self._get_api_version('web_application_firewall_policies') if api_version == '2018-12-01': @@ -8391,8 +8380,8 @@ def web_application_firewall_policies(self): from .v2020_11_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import WebApplicationFirewallPoliciesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'web_application_firewall_policies'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8405,7 +8394,7 @@ def web_categories(self): * 2020-08-01: :class:`WebCategoriesOperations` * 2020-11-01: :class:`WebCategoriesOperations` * 2021-02-01: :class:`WebCategoriesOperations` - * 2021-03-01: :class:`WebCategoriesOperations` + * 2021-05-01: :class:`WebCategoriesOperations` """ api_version = self._get_api_version('web_categories') if api_version == '2020-07-01': @@ -8416,8 +8405,8 @@ def web_categories(self): from .v2020_11_01.operations import WebCategoriesOperations as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import WebCategoriesOperations as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import WebCategoriesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'web_categories'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py index cff05a5678cb..03e8cdd4faff 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_operations_mixin.py @@ -41,7 +41,7 @@ def begin_delete_bastion_shareable_link( :param bastion_host_name: The name of the Bastion Host. :type bastion_host_name: str :param bsl_request: Post request for all the Bastion Shareable Link endpoints. - :type bsl_request: ~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListRequest + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -75,8 +75,8 @@ def begin_delete_bastion_shareable_link( from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_delete_bastion_shareable_link'".format(api_version)) mixin_instance = OperationClass() @@ -104,7 +104,7 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile( :type virtual_wan_name: str :param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation operation. - :type vpn_client_params: ~azure.mgmt.network.v2021_03_01.models.VirtualWanVpnProfileParameters + :type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -112,7 +112,7 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VpnProfileResponse or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_03_01.models.VpnProfileResponse] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_generatevirtualwanvpnserverconfigurationvpnprofile') @@ -140,8 +140,8 @@ def begin_generatevirtualwanvpnserverconfigurationvpnprofile( from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_generatevirtualwanvpnserverconfigurationvpnprofile'".format(api_version)) mixin_instance = OperationClass() @@ -171,7 +171,7 @@ def begin_get_active_sessions( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either BastionActiveSessionListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_03_01.models.BastionActiveSessionListResult]] + :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_get_active_sessions') @@ -197,8 +197,8 @@ def begin_get_active_sessions( from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_get_active_sessions'".format(api_version)) mixin_instance = OperationClass() @@ -223,7 +223,7 @@ def begin_put_bastion_shareable_link( :param bastion_host_name: The name of the Bastion Host. :type bastion_host_name: str :param bsl_request: Post request for all the Bastion Shareable Link endpoints. - :type bsl_request: ~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListRequest + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -231,7 +231,7 @@ def begin_put_bastion_shareable_link( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns an iterator like instance of either BastionShareableLinkListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListResult]] + :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_put_bastion_shareable_link') @@ -257,8 +257,8 @@ def begin_put_bastion_shareable_link( from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_put_bastion_shareable_link'".format(api_version)) mixin_instance = OperationClass() @@ -284,7 +284,7 @@ def check_dns_name_availability( :type domain_name_label: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DnsNameAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2021_03_01.models.DnsNameAvailabilityResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.DnsNameAvailabilityResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('check_dns_name_availability') @@ -298,14 +298,8 @@ def check_dns_name_availability( from .v2017_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-06-01': from .v2017_06_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2017-08-01': - from .v2017_08_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2017-09-01': - from .v2017_09_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-10-01': from .v2017_10_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2017-11-01': - from .v2017_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2018-01-01': from .v2018_01_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2018-02-01': @@ -356,8 +350,8 @@ def check_dns_name_availability( from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'check_dns_name_availability'".format(api_version)) mixin_instance = OperationClass() @@ -382,10 +376,10 @@ def disconnect_active_sessions( :param bastion_host_name: The name of the Bastion Host. :type bastion_host_name: str :param session_ids: The list of sessionids to disconnect. - :type session_ids: ~azure.mgmt.network.v2021_03_01.models.SessionIds + :type session_ids: ~azure.mgmt.network.v2021_05_01.models.SessionIds :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_03_01.models.BastionSessionDeleteResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('disconnect_active_sessions') @@ -411,8 +405,8 @@ def disconnect_active_sessions( from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'disconnect_active_sessions'".format(api_version)) mixin_instance = OperationClass() @@ -437,10 +431,10 @@ def get_bastion_shareable_link( :param bastion_host_name: The name of the Bastion Host. :type bastion_host_name: str :param bsl_request: Post request for all the Bastion Shareable Link endpoints. - :type bsl_request: ~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListRequest + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_bastion_shareable_link') @@ -466,8 +460,8 @@ def get_bastion_shareable_link( from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_bastion_shareable_link'".format(api_version)) mixin_instance = OperationClass() @@ -493,7 +487,7 @@ def supported_security_providers( :type virtual_wan_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualWanSecurityProviders, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2021_03_01.models.VirtualWanSecurityProviders + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProviders :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('supported_security_providers') @@ -537,8 +531,8 @@ def supported_security_providers( from .v2020_11_01.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from .v2021_02_01.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from .v2021_03_01.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from .v2021_05_01.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'supported_security_providers'".format(api_version)) mixin_instance = OperationClass() diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py index 4516c083e685..dcd3f89f57ae 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py index 319067fc4511..cb9e987a84f8 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_network_management_client.py @@ -55,14 +55,33 @@ class NetworkManagementClient(NetworkManagementClientOperationsMixin, MultiApiCl :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = '2021-03-01' + DEFAULT_API_VERSION = '2021-05-01' _PROFILE_TAG = "azure.mgmt.network.NetworkManagementClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { None: DEFAULT_API_VERSION, + 'active_connectivity_configurations': '2021-02-01-preview', + 'active_security_admin_rules': '2021-02-01-preview', + 'active_security_user_rules': '2021-02-01-preview', + 'admin_rule_collections': '2021-02-01-preview', + 'admin_rules': '2021-02-01-preview', + 'connectivity_configurations': '2021-02-01-preview', + 'effective_connectivity_configurations': '2021-02-01-preview', + 'effective_virtual_networks': '2021-02-01-preview', 'firewall_policy_rule_groups': '2020-04-01', 'interface_endpoints': '2019-02-01', + 'network_groups': '2021-02-01-preview', + 'network_manager_commits': '2021-02-01-preview', + 'network_manager_deployment_status': '2021-02-01-preview', + 'network_manager_effective_security_admin_rules': '2021-02-01-preview', + 'network_managers': '2021-02-01-preview', + 'network_security_perimeters': '2021-02-01-preview', 'p2_svpn_server_configurations': '2019-07-01', + 'perimeter_associable_resource_types': '2021-02-01-preview', + 'security_admin_configurations': '2021-02-01-preview', + 'security_user_configurations': '2021-02-01-preview', + 'user_rule_collections': '2021-02-01-preview', + 'user_rules': '2021-02-01-preview', }}, _PROFILE_TAG + " latest" ) @@ -98,10 +117,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2016-12-01: :mod:`v2016_12_01.models` * 2017-03-01: :mod:`v2017_03_01.models` * 2017-06-01: :mod:`v2017_06_01.models` - * 2017-08-01: :mod:`v2017_08_01.models` - * 2017-09-01: :mod:`v2017_09_01.models` * 2017-10-01: :mod:`v2017_10_01.models` - * 2017-11-01: :mod:`v2017_11_01.models` * 2018-01-01: :mod:`v2018_01_01.models` * 2018-02-01: :mod:`v2018_02_01.models` * 2018-04-01: :mod:`v2018_04_01.models` @@ -127,7 +143,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2020-08-01: :mod:`v2020_08_01.models` * 2020-11-01: :mod:`v2020_11_01.models` * 2021-02-01: :mod:`v2021_02_01.models` - * 2021-03-01: :mod:`v2021_03_01.models` + * 2021-02-01-preview: :mod:`v2021_02_01_preview.models` + * 2021-05-01: :mod:`v2021_05_01.models` """ if api_version == '2015-06-15': from ..v2015_06_15 import models @@ -144,18 +161,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2017-06-01': from ..v2017_06_01 import models return models - elif api_version == '2017-08-01': - from ..v2017_08_01 import models - return models - elif api_version == '2017-09-01': - from ..v2017_09_01 import models - return models elif api_version == '2017-10-01': from ..v2017_10_01 import models return models - elif api_version == '2017-11-01': - from ..v2017_11_01 import models - return models elif api_version == '2018-01-01': from ..v2018_01_01 import models return models @@ -231,11 +239,79 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2021-02-01': from ..v2021_02_01 import models return models - elif api_version == '2021-03-01': - from ..v2021_03_01 import models + elif api_version == '2021-02-01-preview': + from ..v2021_02_01_preview import models + return models + elif api_version == '2021-05-01': + from ..v2021_05_01 import models return models raise ValueError("API version {} is not available".format(api_version)) + @property + def active_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('active_connectivity_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ActiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('active_security_admin_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ActiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def active_security_user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ActiveSecurityUserRulesOperations` + """ + api_version = self._get_api_version('active_security_user_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ActiveSecurityUserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'active_security_user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRuleCollectionsOperations` + """ + api_version = self._get_api_version('admin_rule_collections') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import AdminRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`AdminRulesOperations` + """ + api_version = self._get_api_version('admin_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import AdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def application_gateway_private_endpoint_connections(self): """Instance depends on the API version: @@ -246,7 +322,7 @@ def application_gateway_private_endpoint_connections(self): * 2020-08-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` * 2020-11-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` * 2021-02-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` - * 2021-03-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` + * 2021-05-01: :class:`ApplicationGatewayPrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('application_gateway_private_endpoint_connections') if api_version == '2020-05-01': @@ -261,8 +337,8 @@ def application_gateway_private_endpoint_connections(self): from ..v2020_11_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ApplicationGatewayPrivateEndpointConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'application_gateway_private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -277,7 +353,7 @@ def application_gateway_private_link_resources(self): * 2020-08-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` * 2020-11-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` * 2021-02-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` - * 2021-03-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` + * 2021-05-01: :class:`ApplicationGatewayPrivateLinkResourcesOperations` """ api_version = self._get_api_version('application_gateway_private_link_resources') if api_version == '2020-05-01': @@ -292,8 +368,8 @@ def application_gateway_private_link_resources(self): from ..v2020_11_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ApplicationGatewayPrivateLinkResourcesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'application_gateway_private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -307,10 +383,7 @@ def application_gateways(self): * 2016-12-01: :class:`ApplicationGatewaysOperations` * 2017-03-01: :class:`ApplicationGatewaysOperations` * 2017-06-01: :class:`ApplicationGatewaysOperations` - * 2017-08-01: :class:`ApplicationGatewaysOperations` - * 2017-09-01: :class:`ApplicationGatewaysOperations` * 2017-10-01: :class:`ApplicationGatewaysOperations` - * 2017-11-01: :class:`ApplicationGatewaysOperations` * 2018-01-01: :class:`ApplicationGatewaysOperations` * 2018-02-01: :class:`ApplicationGatewaysOperations` * 2018-04-01: :class:`ApplicationGatewaysOperations` @@ -336,7 +409,7 @@ def application_gateways(self): * 2020-08-01: :class:`ApplicationGatewaysOperations` * 2020-11-01: :class:`ApplicationGatewaysOperations` * 2021-02-01: :class:`ApplicationGatewaysOperations` - * 2021-03-01: :class:`ApplicationGatewaysOperations` + * 2021-05-01: :class:`ApplicationGatewaysOperations` """ api_version = self._get_api_version('application_gateways') if api_version == '2015-06-15': @@ -349,14 +422,8 @@ def application_gateways(self): from ..v2017_03_01.aio.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ApplicationGatewaysOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ApplicationGatewaysOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import ApplicationGatewaysOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2018-02-01': @@ -407,8 +474,8 @@ def application_gateways(self): from ..v2020_11_01.aio.operations import ApplicationGatewaysOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ApplicationGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ApplicationGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ApplicationGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'application_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -417,9 +484,7 @@ def application_gateways(self): def application_security_groups(self): """Instance depends on the API version: - * 2017-09-01: :class:`ApplicationSecurityGroupsOperations` * 2017-10-01: :class:`ApplicationSecurityGroupsOperations` - * 2017-11-01: :class:`ApplicationSecurityGroupsOperations` * 2018-01-01: :class:`ApplicationSecurityGroupsOperations` * 2018-02-01: :class:`ApplicationSecurityGroupsOperations` * 2018-04-01: :class:`ApplicationSecurityGroupsOperations` @@ -445,15 +510,11 @@ def application_security_groups(self): * 2020-08-01: :class:`ApplicationSecurityGroupsOperations` * 2020-11-01: :class:`ApplicationSecurityGroupsOperations` * 2021-02-01: :class:`ApplicationSecurityGroupsOperations` - * 2021-03-01: :class:`ApplicationSecurityGroupsOperations` + * 2021-05-01: :class:`ApplicationSecurityGroupsOperations` """ api_version = self._get_api_version('application_security_groups') - if api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass - elif api_version == '2017-10-01': + if api_version == '2017-10-01': from ..v2017_10_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass elif api_version == '2018-02-01': @@ -504,8 +565,8 @@ def application_security_groups(self): from ..v2020_11_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ApplicationSecurityGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'application_security_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -534,7 +595,7 @@ def available_delegations(self): * 2020-08-01: :class:`AvailableDelegationsOperations` * 2020-11-01: :class:`AvailableDelegationsOperations` * 2021-02-01: :class:`AvailableDelegationsOperations` - * 2021-03-01: :class:`AvailableDelegationsOperations` + * 2021-05-01: :class:`AvailableDelegationsOperations` """ api_version = self._get_api_version('available_delegations') if api_version == '2018-08-01': @@ -577,8 +638,8 @@ def available_delegations(self): from ..v2020_11_01.aio.operations import AvailableDelegationsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import AvailableDelegationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import AvailableDelegationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailableDelegationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_delegations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -588,10 +649,7 @@ def available_endpoint_services(self): """Instance depends on the API version: * 2017-06-01: :class:`AvailableEndpointServicesOperations` - * 2017-08-01: :class:`AvailableEndpointServicesOperations` - * 2017-09-01: :class:`AvailableEndpointServicesOperations` * 2017-10-01: :class:`AvailableEndpointServicesOperations` - * 2017-11-01: :class:`AvailableEndpointServicesOperations` * 2018-01-01: :class:`AvailableEndpointServicesOperations` * 2018-02-01: :class:`AvailableEndpointServicesOperations` * 2018-04-01: :class:`AvailableEndpointServicesOperations` @@ -617,19 +675,13 @@ def available_endpoint_services(self): * 2020-08-01: :class:`AvailableEndpointServicesOperations` * 2020-11-01: :class:`AvailableEndpointServicesOperations` * 2021-02-01: :class:`AvailableEndpointServicesOperations` - * 2021-03-01: :class:`AvailableEndpointServicesOperations` + * 2021-05-01: :class:`AvailableEndpointServicesOperations` """ api_version = self._get_api_version('available_endpoint_services') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import AvailableEndpointServicesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import AvailableEndpointServicesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import AvailableEndpointServicesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2018-02-01': @@ -680,8 +732,8 @@ def available_endpoint_services(self): from ..v2020_11_01.aio.operations import AvailableEndpointServicesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import AvailableEndpointServicesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import AvailableEndpointServicesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailableEndpointServicesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_endpoint_services'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -705,7 +757,7 @@ def available_private_endpoint_types(self): * 2020-08-01: :class:`AvailablePrivateEndpointTypesOperations` * 2020-11-01: :class:`AvailablePrivateEndpointTypesOperations` * 2021-02-01: :class:`AvailablePrivateEndpointTypesOperations` - * 2021-03-01: :class:`AvailablePrivateEndpointTypesOperations` + * 2021-05-01: :class:`AvailablePrivateEndpointTypesOperations` """ api_version = self._get_api_version('available_private_endpoint_types') if api_version == '2019-04-01': @@ -738,8 +790,8 @@ def available_private_endpoint_types(self): from ..v2020_11_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailablePrivateEndpointTypesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_private_endpoint_types'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -768,7 +820,7 @@ def available_resource_group_delegations(self): * 2020-08-01: :class:`AvailableResourceGroupDelegationsOperations` * 2020-11-01: :class:`AvailableResourceGroupDelegationsOperations` * 2021-02-01: :class:`AvailableResourceGroupDelegationsOperations` - * 2021-03-01: :class:`AvailableResourceGroupDelegationsOperations` + * 2021-05-01: :class:`AvailableResourceGroupDelegationsOperations` """ api_version = self._get_api_version('available_resource_group_delegations') if api_version == '2018-08-01': @@ -811,8 +863,8 @@ def available_resource_group_delegations(self): from ..v2020_11_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailableResourceGroupDelegationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_resource_group_delegations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -833,7 +885,7 @@ def available_service_aliases(self): * 2020-08-01: :class:`AvailableServiceAliasesOperations` * 2020-11-01: :class:`AvailableServiceAliasesOperations` * 2021-02-01: :class:`AvailableServiceAliasesOperations` - * 2021-03-01: :class:`AvailableServiceAliasesOperations` + * 2021-05-01: :class:`AvailableServiceAliasesOperations` """ api_version = self._get_api_version('available_service_aliases') if api_version == '2019-08-01': @@ -860,8 +912,8 @@ def available_service_aliases(self): from ..v2020_11_01.aio.operations import AvailableServiceAliasesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import AvailableServiceAliasesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import AvailableServiceAliasesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AvailableServiceAliasesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'available_service_aliases'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -890,7 +942,7 @@ def azure_firewall_fqdn_tags(self): * 2020-08-01: :class:`AzureFirewallFqdnTagsOperations` * 2020-11-01: :class:`AzureFirewallFqdnTagsOperations` * 2021-02-01: :class:`AzureFirewallFqdnTagsOperations` - * 2021-03-01: :class:`AzureFirewallFqdnTagsOperations` + * 2021-05-01: :class:`AzureFirewallFqdnTagsOperations` """ api_version = self._get_api_version('azure_firewall_fqdn_tags') if api_version == '2018-08-01': @@ -933,8 +985,8 @@ def azure_firewall_fqdn_tags(self): from ..v2020_11_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AzureFirewallFqdnTagsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'azure_firewall_fqdn_tags'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -966,7 +1018,7 @@ def azure_firewalls(self): * 2020-08-01: :class:`AzureFirewallsOperations` * 2020-11-01: :class:`AzureFirewallsOperations` * 2021-02-01: :class:`AzureFirewallsOperations` - * 2021-03-01: :class:`AzureFirewallsOperations` + * 2021-05-01: :class:`AzureFirewallsOperations` """ api_version = self._get_api_version('azure_firewalls') if api_version == '2018-04-01': @@ -1015,8 +1067,8 @@ def azure_firewalls(self): from ..v2020_11_01.aio.operations import AzureFirewallsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import AzureFirewallsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import AzureFirewallsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import AzureFirewallsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'azure_firewalls'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1040,7 +1092,7 @@ def bastion_hosts(self): * 2020-08-01: :class:`BastionHostsOperations` * 2020-11-01: :class:`BastionHostsOperations` * 2021-02-01: :class:`BastionHostsOperations` - * 2021-03-01: :class:`BastionHostsOperations` + * 2021-05-01: :class:`BastionHostsOperations` """ api_version = self._get_api_version('bastion_hosts') if api_version == '2019-04-01': @@ -1073,8 +1125,8 @@ def bastion_hosts(self): from ..v2020_11_01.aio.operations import BastionHostsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import BastionHostsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import BastionHostsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import BastionHostsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'bastion_hosts'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1086,10 +1138,7 @@ def bgp_service_communities(self): * 2016-12-01: :class:`BgpServiceCommunitiesOperations` * 2017-03-01: :class:`BgpServiceCommunitiesOperations` * 2017-06-01: :class:`BgpServiceCommunitiesOperations` - * 2017-08-01: :class:`BgpServiceCommunitiesOperations` - * 2017-09-01: :class:`BgpServiceCommunitiesOperations` * 2017-10-01: :class:`BgpServiceCommunitiesOperations` - * 2017-11-01: :class:`BgpServiceCommunitiesOperations` * 2018-01-01: :class:`BgpServiceCommunitiesOperations` * 2018-02-01: :class:`BgpServiceCommunitiesOperations` * 2018-04-01: :class:`BgpServiceCommunitiesOperations` @@ -1115,7 +1164,7 @@ def bgp_service_communities(self): * 2020-08-01: :class:`BgpServiceCommunitiesOperations` * 2020-11-01: :class:`BgpServiceCommunitiesOperations` * 2021-02-01: :class:`BgpServiceCommunitiesOperations` - * 2021-03-01: :class:`BgpServiceCommunitiesOperations` + * 2021-05-01: :class:`BgpServiceCommunitiesOperations` """ api_version = self._get_api_version('bgp_service_communities') if api_version == '2016-12-01': @@ -1124,14 +1173,8 @@ def bgp_service_communities(self): from ..v2017_03_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2018-02-01': @@ -1182,8 +1225,8 @@ def bgp_service_communities(self): from ..v2020_11_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import BgpServiceCommunitiesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'bgp_service_communities'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1193,7 +1236,6 @@ def connection_monitors(self): """Instance depends on the API version: * 2017-10-01: :class:`ConnectionMonitorsOperations` - * 2017-11-01: :class:`ConnectionMonitorsOperations` * 2018-01-01: :class:`ConnectionMonitorsOperations` * 2018-02-01: :class:`ConnectionMonitorsOperations` * 2018-04-01: :class:`ConnectionMonitorsOperations` @@ -1219,13 +1261,11 @@ def connection_monitors(self): * 2020-08-01: :class:`ConnectionMonitorsOperations` * 2020-11-01: :class:`ConnectionMonitorsOperations` * 2021-02-01: :class:`ConnectionMonitorsOperations` - * 2021-03-01: :class:`ConnectionMonitorsOperations` + * 2021-05-01: :class:`ConnectionMonitorsOperations` """ api_version = self._get_api_version('connection_monitors') if api_version == '2017-10-01': from ..v2017_10_01.aio.operations import ConnectionMonitorsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import ConnectionMonitorsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import ConnectionMonitorsOperations as OperationClass elif api_version == '2018-02-01': @@ -1276,12 +1316,25 @@ def connection_monitors(self): from ..v2020_11_01.aio.operations import ConnectionMonitorsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ConnectionMonitorsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ConnectionMonitorsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ConnectionMonitorsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'connection_monitors'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`ConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('connectivity_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import ConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def custom_ip_prefixes(self): """Instance depends on the API version: @@ -1291,7 +1344,7 @@ def custom_ip_prefixes(self): * 2020-08-01: :class:`CustomIPPrefixesOperations` * 2020-11-01: :class:`CustomIPPrefixesOperations` * 2021-02-01: :class:`CustomIPPrefixesOperations` - * 2021-03-01: :class:`CustomIPPrefixesOperations` + * 2021-05-01: :class:`CustomIPPrefixesOperations` """ api_version = self._get_api_version('custom_ip_prefixes') if api_version == '2020-06-01': @@ -1304,8 +1357,8 @@ def custom_ip_prefixes(self): from ..v2020_11_01.aio.operations import CustomIPPrefixesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import CustomIPPrefixesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import CustomIPPrefixesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import CustomIPPrefixesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'custom_ip_prefixes'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1332,7 +1385,7 @@ def ddos_custom_policies(self): * 2020-08-01: :class:`DdosCustomPoliciesOperations` * 2020-11-01: :class:`DdosCustomPoliciesOperations` * 2021-02-01: :class:`DdosCustomPoliciesOperations` - * 2021-03-01: :class:`DdosCustomPoliciesOperations` + * 2021-05-01: :class:`DdosCustomPoliciesOperations` """ api_version = self._get_api_version('ddos_custom_policies') if api_version == '2018-11-01': @@ -1371,8 +1424,8 @@ def ddos_custom_policies(self): from ..v2020_11_01.aio.operations import DdosCustomPoliciesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import DdosCustomPoliciesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import DdosCustomPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import DdosCustomPoliciesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'ddos_custom_policies'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1405,7 +1458,7 @@ def ddos_protection_plans(self): * 2020-08-01: :class:`DdosProtectionPlansOperations` * 2020-11-01: :class:`DdosProtectionPlansOperations` * 2021-02-01: :class:`DdosProtectionPlansOperations` - * 2021-03-01: :class:`DdosProtectionPlansOperations` + * 2021-05-01: :class:`DdosProtectionPlansOperations` """ api_version = self._get_api_version('ddos_protection_plans') if api_version == '2018-02-01': @@ -1456,8 +1509,8 @@ def ddos_protection_plans(self): from ..v2020_11_01.aio.operations import DdosProtectionPlansOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import DdosProtectionPlansOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import DdosProtectionPlansOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import DdosProtectionPlansOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'ddos_protection_plans'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1467,10 +1520,7 @@ def default_security_rules(self): """Instance depends on the API version: * 2017-06-01: :class:`DefaultSecurityRulesOperations` - * 2017-08-01: :class:`DefaultSecurityRulesOperations` - * 2017-09-01: :class:`DefaultSecurityRulesOperations` * 2017-10-01: :class:`DefaultSecurityRulesOperations` - * 2017-11-01: :class:`DefaultSecurityRulesOperations` * 2018-01-01: :class:`DefaultSecurityRulesOperations` * 2018-02-01: :class:`DefaultSecurityRulesOperations` * 2018-04-01: :class:`DefaultSecurityRulesOperations` @@ -1496,19 +1546,13 @@ def default_security_rules(self): * 2020-08-01: :class:`DefaultSecurityRulesOperations` * 2020-11-01: :class:`DefaultSecurityRulesOperations` * 2021-02-01: :class:`DefaultSecurityRulesOperations` - * 2021-03-01: :class:`DefaultSecurityRulesOperations` + * 2021-05-01: :class:`DefaultSecurityRulesOperations` """ api_version = self._get_api_version('default_security_rules') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import DefaultSecurityRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import DefaultSecurityRulesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import DefaultSecurityRulesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -1559,8 +1603,8 @@ def default_security_rules(self): from ..v2020_11_01.aio.operations import DefaultSecurityRulesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import DefaultSecurityRulesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import DefaultSecurityRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import DefaultSecurityRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'default_security_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1574,7 +1618,7 @@ def dscp_configuration(self): * 2020-08-01: :class:`DscpConfigurationOperations` * 2020-11-01: :class:`DscpConfigurationOperations` * 2021-02-01: :class:`DscpConfigurationOperations` - * 2021-03-01: :class:`DscpConfigurationOperations` + * 2021-05-01: :class:`DscpConfigurationOperations` """ api_version = self._get_api_version('dscp_configuration') if api_version == '2020-06-01': @@ -1587,12 +1631,38 @@ def dscp_configuration(self): from ..v2020_11_01.aio.operations import DscpConfigurationOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import DscpConfigurationOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import DscpConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import DscpConfigurationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'dscp_configuration'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def effective_connectivity_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveConnectivityConfigurationsOperations` + """ + api_version = self._get_api_version('effective_connectivity_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import EffectiveConnectivityConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_connectivity_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def effective_virtual_networks(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`EffectiveVirtualNetworksOperations` + """ + api_version = self._get_api_version('effective_virtual_networks') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import EffectiveVirtualNetworksOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'effective_virtual_networks'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def express_route_circuit_authorizations(self): """Instance depends on the API version: @@ -1602,10 +1672,7 @@ def express_route_circuit_authorizations(self): * 2016-12-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-06-01: :class:`ExpressRouteCircuitAuthorizationsOperations` - * 2017-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` - * 2017-09-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2017-10-01: :class:`ExpressRouteCircuitAuthorizationsOperations` - * 2017-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2018-01-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2018-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2018-04-01: :class:`ExpressRouteCircuitAuthorizationsOperations` @@ -1631,7 +1698,7 @@ def express_route_circuit_authorizations(self): * 2020-08-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2020-11-01: :class:`ExpressRouteCircuitAuthorizationsOperations` * 2021-02-01: :class:`ExpressRouteCircuitAuthorizationsOperations` - * 2021-03-01: :class:`ExpressRouteCircuitAuthorizationsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitAuthorizationsOperations` """ api_version = self._get_api_version('express_route_circuit_authorizations') if api_version == '2015-06-15': @@ -1644,14 +1711,8 @@ def express_route_circuit_authorizations(self): from ..v2017_03_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2018-02-01': @@ -1702,8 +1763,8 @@ def express_route_circuit_authorizations(self): from ..v2020_11_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCircuitAuthorizationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_circuit_authorizations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1736,7 +1797,7 @@ def express_route_circuit_connections(self): * 2020-08-01: :class:`ExpressRouteCircuitConnectionsOperations` * 2020-11-01: :class:`ExpressRouteCircuitConnectionsOperations` * 2021-02-01: :class:`ExpressRouteCircuitConnectionsOperations` - * 2021-03-01: :class:`ExpressRouteCircuitConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitConnectionsOperations` """ api_version = self._get_api_version('express_route_circuit_connections') if api_version == '2018-02-01': @@ -1787,8 +1848,8 @@ def express_route_circuit_connections(self): from ..v2020_11_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCircuitConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_circuit_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1802,10 +1863,7 @@ def express_route_circuit_peerings(self): * 2016-12-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-03-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-06-01: :class:`ExpressRouteCircuitPeeringsOperations` - * 2017-08-01: :class:`ExpressRouteCircuitPeeringsOperations` - * 2017-09-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2017-10-01: :class:`ExpressRouteCircuitPeeringsOperations` - * 2017-11-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2018-01-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2018-02-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2018-04-01: :class:`ExpressRouteCircuitPeeringsOperations` @@ -1831,7 +1889,7 @@ def express_route_circuit_peerings(self): * 2020-08-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2020-11-01: :class:`ExpressRouteCircuitPeeringsOperations` * 2021-02-01: :class:`ExpressRouteCircuitPeeringsOperations` - * 2021-03-01: :class:`ExpressRouteCircuitPeeringsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitPeeringsOperations` """ api_version = self._get_api_version('express_route_circuit_peerings') if api_version == '2015-06-15': @@ -1844,14 +1902,8 @@ def express_route_circuit_peerings(self): from ..v2017_03_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2018-02-01': @@ -1902,8 +1954,8 @@ def express_route_circuit_peerings(self): from ..v2020_11_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCircuitPeeringsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_circuit_peerings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -1917,10 +1969,7 @@ def express_route_circuits(self): * 2016-12-01: :class:`ExpressRouteCircuitsOperations` * 2017-03-01: :class:`ExpressRouteCircuitsOperations` * 2017-06-01: :class:`ExpressRouteCircuitsOperations` - * 2017-08-01: :class:`ExpressRouteCircuitsOperations` - * 2017-09-01: :class:`ExpressRouteCircuitsOperations` * 2017-10-01: :class:`ExpressRouteCircuitsOperations` - * 2017-11-01: :class:`ExpressRouteCircuitsOperations` * 2018-01-01: :class:`ExpressRouteCircuitsOperations` * 2018-02-01: :class:`ExpressRouteCircuitsOperations` * 2018-04-01: :class:`ExpressRouteCircuitsOperations` @@ -1946,7 +1995,7 @@ def express_route_circuits(self): * 2020-08-01: :class:`ExpressRouteCircuitsOperations` * 2020-11-01: :class:`ExpressRouteCircuitsOperations` * 2021-02-01: :class:`ExpressRouteCircuitsOperations` - * 2021-03-01: :class:`ExpressRouteCircuitsOperations` + * 2021-05-01: :class:`ExpressRouteCircuitsOperations` """ api_version = self._get_api_version('express_route_circuits') if api_version == '2015-06-15': @@ -1959,14 +2008,8 @@ def express_route_circuits(self): from ..v2017_03_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2018-02-01': @@ -2017,8 +2060,8 @@ def express_route_circuits(self): from ..v2020_11_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCircuitsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_circuits'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2047,7 +2090,7 @@ def express_route_connections(self): * 2020-08-01: :class:`ExpressRouteConnectionsOperations` * 2020-11-01: :class:`ExpressRouteConnectionsOperations` * 2021-02-01: :class:`ExpressRouteConnectionsOperations` - * 2021-03-01: :class:`ExpressRouteConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteConnectionsOperations` """ api_version = self._get_api_version('express_route_connections') if api_version == '2018-08-01': @@ -2090,8 +2133,8 @@ def express_route_connections(self): from ..v2020_11_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2124,7 +2167,7 @@ def express_route_cross_connection_peerings(self): * 2020-08-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` * 2020-11-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` * 2021-02-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` - * 2021-03-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` + * 2021-05-01: :class:`ExpressRouteCrossConnectionPeeringsOperations` """ api_version = self._get_api_version('express_route_cross_connection_peerings') if api_version == '2018-02-01': @@ -2175,8 +2218,8 @@ def express_route_cross_connection_peerings(self): from ..v2020_11_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCrossConnectionPeeringsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_cross_connection_peerings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2209,7 +2252,7 @@ def express_route_cross_connections(self): * 2020-08-01: :class:`ExpressRouteCrossConnectionsOperations` * 2020-11-01: :class:`ExpressRouteCrossConnectionsOperations` * 2021-02-01: :class:`ExpressRouteCrossConnectionsOperations` - * 2021-03-01: :class:`ExpressRouteCrossConnectionsOperations` + * 2021-05-01: :class:`ExpressRouteCrossConnectionsOperations` """ api_version = self._get_api_version('express_route_cross_connections') if api_version == '2018-02-01': @@ -2260,8 +2303,8 @@ def express_route_cross_connections(self): from ..v2020_11_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteCrossConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_cross_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2290,7 +2333,7 @@ def express_route_gateways(self): * 2020-08-01: :class:`ExpressRouteGatewaysOperations` * 2020-11-01: :class:`ExpressRouteGatewaysOperations` * 2021-02-01: :class:`ExpressRouteGatewaysOperations` - * 2021-03-01: :class:`ExpressRouteGatewaysOperations` + * 2021-05-01: :class:`ExpressRouteGatewaysOperations` """ api_version = self._get_api_version('express_route_gateways') if api_version == '2018-08-01': @@ -2333,8 +2376,8 @@ def express_route_gateways(self): from ..v2020_11_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2363,7 +2406,7 @@ def express_route_links(self): * 2020-08-01: :class:`ExpressRouteLinksOperations` * 2020-11-01: :class:`ExpressRouteLinksOperations` * 2021-02-01: :class:`ExpressRouteLinksOperations` - * 2021-03-01: :class:`ExpressRouteLinksOperations` + * 2021-05-01: :class:`ExpressRouteLinksOperations` """ api_version = self._get_api_version('express_route_links') if api_version == '2018-08-01': @@ -2406,8 +2449,8 @@ def express_route_links(self): from ..v2020_11_01.aio.operations import ExpressRouteLinksOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteLinksOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteLinksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteLinksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_links'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2436,7 +2479,7 @@ def express_route_ports(self): * 2020-08-01: :class:`ExpressRoutePortsOperations` * 2020-11-01: :class:`ExpressRoutePortsOperations` * 2021-02-01: :class:`ExpressRoutePortsOperations` - * 2021-03-01: :class:`ExpressRoutePortsOperations` + * 2021-05-01: :class:`ExpressRoutePortsOperations` """ api_version = self._get_api_version('express_route_ports') if api_version == '2018-08-01': @@ -2479,8 +2522,8 @@ def express_route_ports(self): from ..v2020_11_01.aio.operations import ExpressRoutePortsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRoutePortsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRoutePortsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRoutePortsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_ports'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2509,7 +2552,7 @@ def express_route_ports_locations(self): * 2020-08-01: :class:`ExpressRoutePortsLocationsOperations` * 2020-11-01: :class:`ExpressRoutePortsLocationsOperations` * 2021-02-01: :class:`ExpressRoutePortsLocationsOperations` - * 2021-03-01: :class:`ExpressRoutePortsLocationsOperations` + * 2021-05-01: :class:`ExpressRoutePortsLocationsOperations` """ api_version = self._get_api_version('express_route_ports_locations') if api_version == '2018-08-01': @@ -2552,8 +2595,8 @@ def express_route_ports_locations(self): from ..v2020_11_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRoutePortsLocationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_ports_locations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2567,10 +2610,7 @@ def express_route_service_providers(self): * 2016-12-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-03-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-06-01: :class:`ExpressRouteServiceProvidersOperations` - * 2017-08-01: :class:`ExpressRouteServiceProvidersOperations` - * 2017-09-01: :class:`ExpressRouteServiceProvidersOperations` * 2017-10-01: :class:`ExpressRouteServiceProvidersOperations` - * 2017-11-01: :class:`ExpressRouteServiceProvidersOperations` * 2018-01-01: :class:`ExpressRouteServiceProvidersOperations` * 2018-02-01: :class:`ExpressRouteServiceProvidersOperations` * 2018-04-01: :class:`ExpressRouteServiceProvidersOperations` @@ -2596,7 +2636,7 @@ def express_route_service_providers(self): * 2020-08-01: :class:`ExpressRouteServiceProvidersOperations` * 2020-11-01: :class:`ExpressRouteServiceProvidersOperations` * 2021-02-01: :class:`ExpressRouteServiceProvidersOperations` - * 2021-03-01: :class:`ExpressRouteServiceProvidersOperations` + * 2021-05-01: :class:`ExpressRouteServiceProvidersOperations` """ api_version = self._get_api_version('express_route_service_providers') if api_version == '2015-06-15': @@ -2609,14 +2649,8 @@ def express_route_service_providers(self): from ..v2017_03_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2018-02-01': @@ -2667,8 +2701,8 @@ def express_route_service_providers(self): from ..v2020_11_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ExpressRouteServiceProvidersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'express_route_service_providers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2691,7 +2725,7 @@ def firewall_policies(self): * 2020-08-01: :class:`FirewallPoliciesOperations` * 2020-11-01: :class:`FirewallPoliciesOperations` * 2021-02-01: :class:`FirewallPoliciesOperations` - * 2021-03-01: :class:`FirewallPoliciesOperations` + * 2021-05-01: :class:`FirewallPoliciesOperations` """ api_version = self._get_api_version('firewall_policies') if api_version == '2019-06-01': @@ -2722,12 +2756,51 @@ def firewall_policies(self): from ..v2020_11_01.aio.operations import FirewallPoliciesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import FirewallPoliciesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import FirewallPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPoliciesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'firewall_policies'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def firewall_policy_idps_signatures(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures') + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPolicyIdpsSignaturesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures_filter_values(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesFilterValuesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures_filter_values') + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPolicyIdpsSignaturesFilterValuesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures_filter_values'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def firewall_policy_idps_signatures_overrides(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`FirewallPolicyIdpsSignaturesOverridesOperations` + """ + api_version = self._get_api_version('firewall_policy_idps_signatures_overrides') + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPolicyIdpsSignaturesOverridesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'firewall_policy_idps_signatures_overrides'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def firewall_policy_rule_collection_groups(self): """Instance depends on the API version: @@ -2738,7 +2811,7 @@ def firewall_policy_rule_collection_groups(self): * 2020-08-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` * 2020-11-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` * 2021-02-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` - * 2021-03-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` + * 2021-05-01: :class:`FirewallPolicyRuleCollectionGroupsOperations` """ api_version = self._get_api_version('firewall_policy_rule_collection_groups') if api_version == '2020-05-01': @@ -2753,8 +2826,8 @@ def firewall_policy_rule_collection_groups(self): from ..v2020_11_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FirewallPolicyRuleCollectionGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'firewall_policy_rule_collection_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2807,7 +2880,7 @@ def flow_logs(self): * 2020-08-01: :class:`FlowLogsOperations` * 2020-11-01: :class:`FlowLogsOperations` * 2021-02-01: :class:`FlowLogsOperations` - * 2021-03-01: :class:`FlowLogsOperations` + * 2021-05-01: :class:`FlowLogsOperations` """ api_version = self._get_api_version('flow_logs') if api_version == '2019-11-01': @@ -2830,8 +2903,8 @@ def flow_logs(self): from ..v2020_11_01.aio.operations import FlowLogsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import FlowLogsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import FlowLogsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import FlowLogsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'flow_logs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2847,7 +2920,7 @@ def hub_route_tables(self): * 2020-08-01: :class:`HubRouteTablesOperations` * 2020-11-01: :class:`HubRouteTablesOperations` * 2021-02-01: :class:`HubRouteTablesOperations` - * 2021-03-01: :class:`HubRouteTablesOperations` + * 2021-05-01: :class:`HubRouteTablesOperations` """ api_version = self._get_api_version('hub_route_tables') if api_version == '2020-04-01': @@ -2864,8 +2937,8 @@ def hub_route_tables(self): from ..v2020_11_01.aio.operations import HubRouteTablesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import HubRouteTablesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import HubRouteTablesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import HubRouteTablesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'hub_route_tables'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2897,7 +2970,7 @@ def hub_virtual_network_connections(self): * 2020-08-01: :class:`HubVirtualNetworkConnectionsOperations` * 2020-11-01: :class:`HubVirtualNetworkConnectionsOperations` * 2021-02-01: :class:`HubVirtualNetworkConnectionsOperations` - * 2021-03-01: :class:`HubVirtualNetworkConnectionsOperations` + * 2021-05-01: :class:`HubVirtualNetworkConnectionsOperations` """ api_version = self._get_api_version('hub_virtual_network_connections') if api_version == '2018-04-01': @@ -2946,8 +3019,8 @@ def hub_virtual_network_connections(self): from ..v2020_11_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import HubVirtualNetworkConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'hub_virtual_network_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -2957,10 +3030,7 @@ def inbound_nat_rules(self): """Instance depends on the API version: * 2017-06-01: :class:`InboundNatRulesOperations` - * 2017-08-01: :class:`InboundNatRulesOperations` - * 2017-09-01: :class:`InboundNatRulesOperations` * 2017-10-01: :class:`InboundNatRulesOperations` - * 2017-11-01: :class:`InboundNatRulesOperations` * 2018-01-01: :class:`InboundNatRulesOperations` * 2018-02-01: :class:`InboundNatRulesOperations` * 2018-04-01: :class:`InboundNatRulesOperations` @@ -2986,19 +3056,13 @@ def inbound_nat_rules(self): * 2020-08-01: :class:`InboundNatRulesOperations` * 2020-11-01: :class:`InboundNatRulesOperations` * 2021-02-01: :class:`InboundNatRulesOperations` - * 2021-03-01: :class:`InboundNatRulesOperations` + * 2021-05-01: :class:`InboundNatRulesOperations` """ api_version = self._get_api_version('inbound_nat_rules') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import InboundNatRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import InboundNatRulesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import InboundNatRulesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import InboundNatRulesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import InboundNatRulesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import InboundNatRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -3049,8 +3113,8 @@ def inbound_nat_rules(self): from ..v2020_11_01.aio.operations import InboundNatRulesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import InboundNatRulesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import InboundNatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import InboundNatRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'inbound_nat_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3064,7 +3128,7 @@ def inbound_security_rule(self): * 2020-08-01: :class:`InboundSecurityRuleOperations` * 2020-11-01: :class:`InboundSecurityRuleOperations` * 2021-02-01: :class:`InboundSecurityRuleOperations` - * 2021-03-01: :class:`InboundSecurityRuleOperations` + * 2021-05-01: :class:`InboundSecurityRuleOperations` """ api_version = self._get_api_version('inbound_security_rule') if api_version == '2020-06-01': @@ -3077,8 +3141,8 @@ def inbound_security_rule(self): from ..v2020_11_01.aio.operations import InboundSecurityRuleOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import InboundSecurityRuleOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import InboundSecurityRuleOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import InboundSecurityRuleOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'inbound_security_rule'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3120,7 +3184,7 @@ def ip_allocations(self): * 2020-08-01: :class:`IpAllocationsOperations` * 2020-11-01: :class:`IpAllocationsOperations` * 2021-02-01: :class:`IpAllocationsOperations` - * 2021-03-01: :class:`IpAllocationsOperations` + * 2021-05-01: :class:`IpAllocationsOperations` """ api_version = self._get_api_version('ip_allocations') if api_version == '2020-03-01': @@ -3139,8 +3203,8 @@ def ip_allocations(self): from ..v2020_11_01.aio.operations import IpAllocationsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import IpAllocationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import IpAllocationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import IpAllocationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'ip_allocations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3160,7 +3224,7 @@ def ip_groups(self): * 2020-08-01: :class:`IpGroupsOperations` * 2020-11-01: :class:`IpGroupsOperations` * 2021-02-01: :class:`IpGroupsOperations` - * 2021-03-01: :class:`IpGroupsOperations` + * 2021-05-01: :class:`IpGroupsOperations` """ api_version = self._get_api_version('ip_groups') if api_version == '2019-09-01': @@ -3185,8 +3249,8 @@ def ip_groups(self): from ..v2020_11_01.aio.operations import IpGroupsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import IpGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import IpGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import IpGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'ip_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3196,10 +3260,7 @@ def load_balancer_backend_address_pools(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerBackendAddressPoolsOperations` - * 2017-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` - * 2017-09-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2017-10-01: :class:`LoadBalancerBackendAddressPoolsOperations` - * 2017-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2018-01-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2018-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2018-04-01: :class:`LoadBalancerBackendAddressPoolsOperations` @@ -3225,19 +3286,13 @@ def load_balancer_backend_address_pools(self): * 2020-08-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2020-11-01: :class:`LoadBalancerBackendAddressPoolsOperations` * 2021-02-01: :class:`LoadBalancerBackendAddressPoolsOperations` - * 2021-03-01: :class:`LoadBalancerBackendAddressPoolsOperations` + * 2021-05-01: :class:`LoadBalancerBackendAddressPoolsOperations` """ api_version = self._get_api_version('load_balancer_backend_address_pools') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2018-02-01': @@ -3288,8 +3343,8 @@ def load_balancer_backend_address_pools(self): from ..v2020_11_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerBackendAddressPoolsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_backend_address_pools'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3299,10 +3354,7 @@ def load_balancer_frontend_ip_configurations(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` - * 2017-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` - * 2017-09-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2017-10-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` - * 2017-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2018-01-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2018-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2018-04-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` @@ -3328,19 +3380,13 @@ def load_balancer_frontend_ip_configurations(self): * 2020-08-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2020-11-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` * 2021-02-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` - * 2021-03-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` + * 2021-05-01: :class:`LoadBalancerFrontendIPConfigurationsOperations` """ api_version = self._get_api_version('load_balancer_frontend_ip_configurations') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2018-02-01': @@ -3391,8 +3437,8 @@ def load_balancer_frontend_ip_configurations(self): from ..v2020_11_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerFrontendIPConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_frontend_ip_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3402,10 +3448,7 @@ def load_balancer_load_balancing_rules(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerLoadBalancingRulesOperations` - * 2017-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` - * 2017-09-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2017-10-01: :class:`LoadBalancerLoadBalancingRulesOperations` - * 2017-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2018-01-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2018-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2018-04-01: :class:`LoadBalancerLoadBalancingRulesOperations` @@ -3431,19 +3474,13 @@ def load_balancer_load_balancing_rules(self): * 2020-08-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2020-11-01: :class:`LoadBalancerLoadBalancingRulesOperations` * 2021-02-01: :class:`LoadBalancerLoadBalancingRulesOperations` - * 2021-03-01: :class:`LoadBalancerLoadBalancingRulesOperations` + * 2021-05-01: :class:`LoadBalancerLoadBalancingRulesOperations` """ api_version = self._get_api_version('load_balancer_load_balancing_rules') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -3494,8 +3531,8 @@ def load_balancer_load_balancing_rules(self): from ..v2020_11_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerLoadBalancingRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_load_balancing_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3505,10 +3542,7 @@ def load_balancer_network_interfaces(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerNetworkInterfacesOperations` - * 2017-08-01: :class:`LoadBalancerNetworkInterfacesOperations` - * 2017-09-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2017-10-01: :class:`LoadBalancerNetworkInterfacesOperations` - * 2017-11-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2018-01-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2018-02-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2018-04-01: :class:`LoadBalancerNetworkInterfacesOperations` @@ -3534,19 +3568,13 @@ def load_balancer_network_interfaces(self): * 2020-08-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2020-11-01: :class:`LoadBalancerNetworkInterfacesOperations` * 2021-02-01: :class:`LoadBalancerNetworkInterfacesOperations` - * 2021-03-01: :class:`LoadBalancerNetworkInterfacesOperations` + * 2021-05-01: :class:`LoadBalancerNetworkInterfacesOperations` """ api_version = self._get_api_version('load_balancer_network_interfaces') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2018-02-01': @@ -3597,8 +3625,8 @@ def load_balancer_network_interfaces(self): from ..v2020_11_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerNetworkInterfacesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_network_interfaces'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3627,7 +3655,7 @@ def load_balancer_outbound_rules(self): * 2020-08-01: :class:`LoadBalancerOutboundRulesOperations` * 2020-11-01: :class:`LoadBalancerOutboundRulesOperations` * 2021-02-01: :class:`LoadBalancerOutboundRulesOperations` - * 2021-03-01: :class:`LoadBalancerOutboundRulesOperations` + * 2021-05-01: :class:`LoadBalancerOutboundRulesOperations` """ api_version = self._get_api_version('load_balancer_outbound_rules') if api_version == '2018-08-01': @@ -3670,8 +3698,8 @@ def load_balancer_outbound_rules(self): from ..v2020_11_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerOutboundRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_outbound_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3681,10 +3709,7 @@ def load_balancer_probes(self): """Instance depends on the API version: * 2017-06-01: :class:`LoadBalancerProbesOperations` - * 2017-08-01: :class:`LoadBalancerProbesOperations` - * 2017-09-01: :class:`LoadBalancerProbesOperations` * 2017-10-01: :class:`LoadBalancerProbesOperations` - * 2017-11-01: :class:`LoadBalancerProbesOperations` * 2018-01-01: :class:`LoadBalancerProbesOperations` * 2018-02-01: :class:`LoadBalancerProbesOperations` * 2018-04-01: :class:`LoadBalancerProbesOperations` @@ -3710,19 +3735,13 @@ def load_balancer_probes(self): * 2020-08-01: :class:`LoadBalancerProbesOperations` * 2020-11-01: :class:`LoadBalancerProbesOperations` * 2021-02-01: :class:`LoadBalancerProbesOperations` - * 2021-03-01: :class:`LoadBalancerProbesOperations` + * 2021-05-01: :class:`LoadBalancerProbesOperations` """ api_version = self._get_api_version('load_balancer_probes') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancerProbesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancerProbesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import LoadBalancerProbesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2018-02-01': @@ -3773,8 +3792,8 @@ def load_balancer_probes(self): from ..v2020_11_01.aio.operations import LoadBalancerProbesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import LoadBalancerProbesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import LoadBalancerProbesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancerProbesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancer_probes'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3788,10 +3807,7 @@ def load_balancers(self): * 2016-12-01: :class:`LoadBalancersOperations` * 2017-03-01: :class:`LoadBalancersOperations` * 2017-06-01: :class:`LoadBalancersOperations` - * 2017-08-01: :class:`LoadBalancersOperations` - * 2017-09-01: :class:`LoadBalancersOperations` * 2017-10-01: :class:`LoadBalancersOperations` - * 2017-11-01: :class:`LoadBalancersOperations` * 2018-01-01: :class:`LoadBalancersOperations` * 2018-02-01: :class:`LoadBalancersOperations` * 2018-04-01: :class:`LoadBalancersOperations` @@ -3817,7 +3833,7 @@ def load_balancers(self): * 2020-08-01: :class:`LoadBalancersOperations` * 2020-11-01: :class:`LoadBalancersOperations` * 2021-02-01: :class:`LoadBalancersOperations` - * 2021-03-01: :class:`LoadBalancersOperations` + * 2021-05-01: :class:`LoadBalancersOperations` """ api_version = self._get_api_version('load_balancers') if api_version == '2015-06-15': @@ -3830,14 +3846,8 @@ def load_balancers(self): from ..v2017_03_01.aio.operations import LoadBalancersOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LoadBalancersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LoadBalancersOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import LoadBalancersOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import LoadBalancersOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import LoadBalancersOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import LoadBalancersOperations as OperationClass elif api_version == '2018-02-01': @@ -3888,8 +3898,8 @@ def load_balancers(self): from ..v2020_11_01.aio.operations import LoadBalancersOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import LoadBalancersOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import LoadBalancersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LoadBalancersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'load_balancers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -3903,10 +3913,7 @@ def local_network_gateways(self): * 2016-12-01: :class:`LocalNetworkGatewaysOperations` * 2017-03-01: :class:`LocalNetworkGatewaysOperations` * 2017-06-01: :class:`LocalNetworkGatewaysOperations` - * 2017-08-01: :class:`LocalNetworkGatewaysOperations` - * 2017-09-01: :class:`LocalNetworkGatewaysOperations` * 2017-10-01: :class:`LocalNetworkGatewaysOperations` - * 2017-11-01: :class:`LocalNetworkGatewaysOperations` * 2018-01-01: :class:`LocalNetworkGatewaysOperations` * 2018-02-01: :class:`LocalNetworkGatewaysOperations` * 2018-04-01: :class:`LocalNetworkGatewaysOperations` @@ -3932,7 +3939,7 @@ def local_network_gateways(self): * 2020-08-01: :class:`LocalNetworkGatewaysOperations` * 2020-11-01: :class:`LocalNetworkGatewaysOperations` * 2021-02-01: :class:`LocalNetworkGatewaysOperations` - * 2021-03-01: :class:`LocalNetworkGatewaysOperations` + * 2021-05-01: :class:`LocalNetworkGatewaysOperations` """ api_version = self._get_api_version('local_network_gateways') if api_version == '2015-06-15': @@ -3945,14 +3952,8 @@ def local_network_gateways(self): from ..v2017_03_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2018-02-01': @@ -4003,8 +4004,8 @@ def local_network_gateways(self): from ..v2020_11_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import LocalNetworkGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'local_network_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4029,7 +4030,7 @@ def nat_gateways(self): * 2020-08-01: :class:`NatGatewaysOperations` * 2020-11-01: :class:`NatGatewaysOperations` * 2021-02-01: :class:`NatGatewaysOperations` - * 2021-03-01: :class:`NatGatewaysOperations` + * 2021-05-01: :class:`NatGatewaysOperations` """ api_version = self._get_api_version('nat_gateways') if api_version == '2019-02-01': @@ -4064,8 +4065,8 @@ def nat_gateways(self): from ..v2020_11_01.aio.operations import NatGatewaysOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NatGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NatGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NatGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'nat_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4077,7 +4078,7 @@ def nat_rules(self): * 2020-08-01: :class:`NatRulesOperations` * 2020-11-01: :class:`NatRulesOperations` * 2021-02-01: :class:`NatRulesOperations` - * 2021-03-01: :class:`NatRulesOperations` + * 2021-05-01: :class:`NatRulesOperations` """ api_version = self._get_api_version('nat_rules') if api_version == '2020-08-01': @@ -4086,21 +4087,31 @@ def nat_rules(self): from ..v2020_11_01.aio.operations import NatRulesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NatRulesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NatRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'nat_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_groups(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkGroupsOperations` + """ + api_version = self._get_api_version('network_groups') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkGroupsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_groups'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_interface_ip_configurations(self): """Instance depends on the API version: * 2017-06-01: :class:`NetworkInterfaceIPConfigurationsOperations` - * 2017-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` - * 2017-09-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2017-10-01: :class:`NetworkInterfaceIPConfigurationsOperations` - * 2017-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2018-01-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2018-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2018-04-01: :class:`NetworkInterfaceIPConfigurationsOperations` @@ -4126,19 +4137,13 @@ def network_interface_ip_configurations(self): * 2020-08-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2020-11-01: :class:`NetworkInterfaceIPConfigurationsOperations` * 2021-02-01: :class:`NetworkInterfaceIPConfigurationsOperations` - * 2021-03-01: :class:`NetworkInterfaceIPConfigurationsOperations` + * 2021-05-01: :class:`NetworkInterfaceIPConfigurationsOperations` """ api_version = self._get_api_version('network_interface_ip_configurations') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2018-02-01': @@ -4189,8 +4194,8 @@ def network_interface_ip_configurations(self): from ..v2020_11_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkInterfaceIPConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_interface_ip_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4200,10 +4205,7 @@ def network_interface_load_balancers(self): """Instance depends on the API version: * 2017-06-01: :class:`NetworkInterfaceLoadBalancersOperations` - * 2017-08-01: :class:`NetworkInterfaceLoadBalancersOperations` - * 2017-09-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2017-10-01: :class:`NetworkInterfaceLoadBalancersOperations` - * 2017-11-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2018-01-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2018-02-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2018-04-01: :class:`NetworkInterfaceLoadBalancersOperations` @@ -4229,19 +4231,13 @@ def network_interface_load_balancers(self): * 2020-08-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2020-11-01: :class:`NetworkInterfaceLoadBalancersOperations` * 2021-02-01: :class:`NetworkInterfaceLoadBalancersOperations` - * 2021-03-01: :class:`NetworkInterfaceLoadBalancersOperations` + * 2021-05-01: :class:`NetworkInterfaceLoadBalancersOperations` """ api_version = self._get_api_version('network_interface_load_balancers') if api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2018-02-01': @@ -4292,8 +4288,8 @@ def network_interface_load_balancers(self): from ..v2020_11_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkInterfaceLoadBalancersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_interface_load_balancers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4322,7 +4318,7 @@ def network_interface_tap_configurations(self): * 2020-08-01: :class:`NetworkInterfaceTapConfigurationsOperations` * 2020-11-01: :class:`NetworkInterfaceTapConfigurationsOperations` * 2021-02-01: :class:`NetworkInterfaceTapConfigurationsOperations` - * 2021-03-01: :class:`NetworkInterfaceTapConfigurationsOperations` + * 2021-05-01: :class:`NetworkInterfaceTapConfigurationsOperations` """ api_version = self._get_api_version('network_interface_tap_configurations') if api_version == '2018-08-01': @@ -4365,8 +4361,8 @@ def network_interface_tap_configurations(self): from ..v2020_11_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkInterfaceTapConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_interface_tap_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4380,10 +4376,7 @@ def network_interfaces(self): * 2016-12-01: :class:`NetworkInterfacesOperations` * 2017-03-01: :class:`NetworkInterfacesOperations` * 2017-06-01: :class:`NetworkInterfacesOperations` - * 2017-08-01: :class:`NetworkInterfacesOperations` - * 2017-09-01: :class:`NetworkInterfacesOperations` * 2017-10-01: :class:`NetworkInterfacesOperations` - * 2017-11-01: :class:`NetworkInterfacesOperations` * 2018-01-01: :class:`NetworkInterfacesOperations` * 2018-02-01: :class:`NetworkInterfacesOperations` * 2018-04-01: :class:`NetworkInterfacesOperations` @@ -4409,7 +4402,7 @@ def network_interfaces(self): * 2020-08-01: :class:`NetworkInterfacesOperations` * 2020-11-01: :class:`NetworkInterfacesOperations` * 2021-02-01: :class:`NetworkInterfacesOperations` - * 2021-03-01: :class:`NetworkInterfacesOperations` + * 2021-05-01: :class:`NetworkInterfacesOperations` """ api_version = self._get_api_version('network_interfaces') if api_version == '2015-06-15': @@ -4422,14 +4415,8 @@ def network_interfaces(self): from ..v2017_03_01.aio.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkInterfacesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkInterfacesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import NetworkInterfacesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2018-02-01': @@ -4480,12 +4467,64 @@ def network_interfaces(self): from ..v2020_11_01.aio.operations import NetworkInterfacesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkInterfacesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkInterfacesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkInterfacesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_interfaces'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_manager_commits(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerCommitsOperations` + """ + api_version = self._get_api_version('network_manager_commits') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagerCommitsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_commits'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_deployment_status(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerDeploymentStatusOperations` + """ + api_version = self._get_api_version('network_manager_deployment_status') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagerDeploymentStatusOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_deployment_status'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_manager_effective_security_admin_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagerEffectiveSecurityAdminRulesOperations` + """ + api_version = self._get_api_version('network_manager_effective_security_admin_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagerEffectiveSecurityAdminRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_manager_effective_security_admin_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def network_managers(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkManagersOperations` + """ + api_version = self._get_api_version('network_managers') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkManagersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_managers'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_profiles(self): """Instance depends on the API version: @@ -4510,7 +4549,7 @@ def network_profiles(self): * 2020-08-01: :class:`NetworkProfilesOperations` * 2020-11-01: :class:`NetworkProfilesOperations` * 2021-02-01: :class:`NetworkProfilesOperations` - * 2021-03-01: :class:`NetworkProfilesOperations` + * 2021-05-01: :class:`NetworkProfilesOperations` """ api_version = self._get_api_version('network_profiles') if api_version == '2018-08-01': @@ -4553,8 +4592,8 @@ def network_profiles(self): from ..v2020_11_01.aio.operations import NetworkProfilesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkProfilesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkProfilesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkProfilesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_profiles'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4568,10 +4607,7 @@ def network_security_groups(self): * 2016-12-01: :class:`NetworkSecurityGroupsOperations` * 2017-03-01: :class:`NetworkSecurityGroupsOperations` * 2017-06-01: :class:`NetworkSecurityGroupsOperations` - * 2017-08-01: :class:`NetworkSecurityGroupsOperations` - * 2017-09-01: :class:`NetworkSecurityGroupsOperations` * 2017-10-01: :class:`NetworkSecurityGroupsOperations` - * 2017-11-01: :class:`NetworkSecurityGroupsOperations` * 2018-01-01: :class:`NetworkSecurityGroupsOperations` * 2018-02-01: :class:`NetworkSecurityGroupsOperations` * 2018-04-01: :class:`NetworkSecurityGroupsOperations` @@ -4597,7 +4633,7 @@ def network_security_groups(self): * 2020-08-01: :class:`NetworkSecurityGroupsOperations` * 2020-11-01: :class:`NetworkSecurityGroupsOperations` * 2021-02-01: :class:`NetworkSecurityGroupsOperations` - * 2021-03-01: :class:`NetworkSecurityGroupsOperations` + * 2021-05-01: :class:`NetworkSecurityGroupsOperations` """ api_version = self._get_api_version('network_security_groups') if api_version == '2015-06-15': @@ -4610,14 +4646,8 @@ def network_security_groups(self): from ..v2017_03_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2018-02-01': @@ -4668,12 +4698,25 @@ def network_security_groups(self): from ..v2020_11_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkSecurityGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_security_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def network_security_perimeters(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`NetworkSecurityPerimetersOperations` + """ + api_version = self._get_api_version('network_security_perimeters') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import NetworkSecurityPerimetersOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'network_security_perimeters'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def network_virtual_appliances(self): """Instance depends on the API version: @@ -4687,7 +4730,7 @@ def network_virtual_appliances(self): * 2020-08-01: :class:`NetworkVirtualAppliancesOperations` * 2020-11-01: :class:`NetworkVirtualAppliancesOperations` * 2021-02-01: :class:`NetworkVirtualAppliancesOperations` - * 2021-03-01: :class:`NetworkVirtualAppliancesOperations` + * 2021-05-01: :class:`NetworkVirtualAppliancesOperations` """ api_version = self._get_api_version('network_virtual_appliances') if api_version == '2019-12-01': @@ -4708,8 +4751,8 @@ def network_virtual_appliances(self): from ..v2020_11_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkVirtualAppliancesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_virtual_appliances'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4722,10 +4765,7 @@ def network_watchers(self): * 2016-12-01: :class:`NetworkWatchersOperations` * 2017-03-01: :class:`NetworkWatchersOperations` * 2017-06-01: :class:`NetworkWatchersOperations` - * 2017-08-01: :class:`NetworkWatchersOperations` - * 2017-09-01: :class:`NetworkWatchersOperations` * 2017-10-01: :class:`NetworkWatchersOperations` - * 2017-11-01: :class:`NetworkWatchersOperations` * 2018-01-01: :class:`NetworkWatchersOperations` * 2018-02-01: :class:`NetworkWatchersOperations` * 2018-04-01: :class:`NetworkWatchersOperations` @@ -4751,7 +4791,7 @@ def network_watchers(self): * 2020-08-01: :class:`NetworkWatchersOperations` * 2020-11-01: :class:`NetworkWatchersOperations` * 2021-02-01: :class:`NetworkWatchersOperations` - * 2021-03-01: :class:`NetworkWatchersOperations` + * 2021-05-01: :class:`NetworkWatchersOperations` """ api_version = self._get_api_version('network_watchers') if api_version == '2016-09-01': @@ -4762,14 +4802,8 @@ def network_watchers(self): from ..v2017_03_01.aio.operations import NetworkWatchersOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkWatchersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkWatchersOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import NetworkWatchersOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import NetworkWatchersOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import NetworkWatchersOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import NetworkWatchersOperations as OperationClass elif api_version == '2018-02-01': @@ -4820,8 +4854,8 @@ def network_watchers(self): from ..v2020_11_01.aio.operations import NetworkWatchersOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkWatchersOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkWatchersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkWatchersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'network_watchers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4830,9 +4864,7 @@ def network_watchers(self): def operations(self): """Instance depends on the API version: - * 2017-09-01: :class:`Operations` * 2017-10-01: :class:`Operations` - * 2017-11-01: :class:`Operations` * 2018-01-01: :class:`Operations` * 2018-02-01: :class:`Operations` * 2018-04-01: :class:`Operations` @@ -4858,15 +4890,11 @@ def operations(self): * 2020-08-01: :class:`Operations` * 2020-11-01: :class:`Operations` * 2021-02-01: :class:`Operations` - * 2021-03-01: :class:`Operations` + * 2021-05-01: :class:`Operations` """ api_version = self._get_api_version('operations') - if api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import Operations as OperationClass - elif api_version == '2017-10-01': + if api_version == '2017-10-01': from ..v2017_10_01.aio.operations import Operations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import Operations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import Operations as OperationClass elif api_version == '2018-02-01': @@ -4917,8 +4945,8 @@ def operations(self): from ..v2020_11_01.aio.operations import Operations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import Operations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import Operations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import Operations as OperationClass else: raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -4947,7 +4975,7 @@ def p2_svpn_gateways(self): * 2020-08-01: :class:`P2SVpnGatewaysOperations` * 2020-11-01: :class:`P2SVpnGatewaysOperations` * 2021-02-01: :class:`P2SVpnGatewaysOperations` - * 2021-03-01: :class:`P2SVpnGatewaysOperations` + * 2021-05-01: :class:`P2SVpnGatewaysOperations` """ api_version = self._get_api_version('p2_svpn_gateways') if api_version == '2018-08-01': @@ -4990,8 +5018,8 @@ def p2_svpn_gateways(self): from ..v2020_11_01.aio.operations import P2SVpnGatewaysOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import P2SVpnGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import P2SVpnGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import P2SVpnGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'p2_svpn_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5038,10 +5066,7 @@ def packet_captures(self): * 2016-12-01: :class:`PacketCapturesOperations` * 2017-03-01: :class:`PacketCapturesOperations` * 2017-06-01: :class:`PacketCapturesOperations` - * 2017-08-01: :class:`PacketCapturesOperations` - * 2017-09-01: :class:`PacketCapturesOperations` * 2017-10-01: :class:`PacketCapturesOperations` - * 2017-11-01: :class:`PacketCapturesOperations` * 2018-01-01: :class:`PacketCapturesOperations` * 2018-02-01: :class:`PacketCapturesOperations` * 2018-04-01: :class:`PacketCapturesOperations` @@ -5067,7 +5092,7 @@ def packet_captures(self): * 2020-08-01: :class:`PacketCapturesOperations` * 2020-11-01: :class:`PacketCapturesOperations` * 2021-02-01: :class:`PacketCapturesOperations` - * 2021-03-01: :class:`PacketCapturesOperations` + * 2021-05-01: :class:`PacketCapturesOperations` """ api_version = self._get_api_version('packet_captures') if api_version == '2016-09-01': @@ -5078,14 +5103,8 @@ def packet_captures(self): from ..v2017_03_01.aio.operations import PacketCapturesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import PacketCapturesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import PacketCapturesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import PacketCapturesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import PacketCapturesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import PacketCapturesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import PacketCapturesOperations as OperationClass elif api_version == '2018-02-01': @@ -5136,8 +5155,8 @@ def packet_captures(self): from ..v2020_11_01.aio.operations import PacketCapturesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import PacketCapturesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import PacketCapturesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PacketCapturesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'packet_captures'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5163,7 +5182,7 @@ def peer_express_route_circuit_connections(self): * 2020-08-01: :class:`PeerExpressRouteCircuitConnectionsOperations` * 2020-11-01: :class:`PeerExpressRouteCircuitConnectionsOperations` * 2021-02-01: :class:`PeerExpressRouteCircuitConnectionsOperations` - * 2021-03-01: :class:`PeerExpressRouteCircuitConnectionsOperations` + * 2021-05-01: :class:`PeerExpressRouteCircuitConnectionsOperations` """ api_version = self._get_api_version('peer_express_route_circuit_connections') if api_version == '2018-12-01': @@ -5200,12 +5219,25 @@ def peer_express_route_circuit_connections(self): from ..v2020_11_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PeerExpressRouteCircuitConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'peer_express_route_circuit_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def perimeter_associable_resource_types(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`PerimeterAssociableResourceTypesOperations` + """ + api_version = self._get_api_version('perimeter_associable_resource_types') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import PerimeterAssociableResourceTypesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'perimeter_associable_resource_types'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def private_dns_zone_groups(self): """Instance depends on the API version: @@ -5218,7 +5250,7 @@ def private_dns_zone_groups(self): * 2020-08-01: :class:`PrivateDnsZoneGroupsOperations` * 2020-11-01: :class:`PrivateDnsZoneGroupsOperations` * 2021-02-01: :class:`PrivateDnsZoneGroupsOperations` - * 2021-03-01: :class:`PrivateDnsZoneGroupsOperations` + * 2021-05-01: :class:`PrivateDnsZoneGroupsOperations` """ api_version = self._get_api_version('private_dns_zone_groups') if api_version == '2020-03-01': @@ -5237,8 +5269,8 @@ def private_dns_zone_groups(self): from ..v2020_11_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PrivateDnsZoneGroupsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_dns_zone_groups'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5262,7 +5294,7 @@ def private_endpoints(self): * 2020-08-01: :class:`PrivateEndpointsOperations` * 2020-11-01: :class:`PrivateEndpointsOperations` * 2021-02-01: :class:`PrivateEndpointsOperations` - * 2021-03-01: :class:`PrivateEndpointsOperations` + * 2021-05-01: :class:`PrivateEndpointsOperations` """ api_version = self._get_api_version('private_endpoints') if api_version == '2019-04-01': @@ -5295,8 +5327,8 @@ def private_endpoints(self): from ..v2020_11_01.aio.operations import PrivateEndpointsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import PrivateEndpointsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import PrivateEndpointsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PrivateEndpointsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_endpoints'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5320,7 +5352,7 @@ def private_link_services(self): * 2020-08-01: :class:`PrivateLinkServicesOperations` * 2020-11-01: :class:`PrivateLinkServicesOperations` * 2021-02-01: :class:`PrivateLinkServicesOperations` - * 2021-03-01: :class:`PrivateLinkServicesOperations` + * 2021-05-01: :class:`PrivateLinkServicesOperations` """ api_version = self._get_api_version('private_link_services') if api_version == '2019-04-01': @@ -5353,8 +5385,8 @@ def private_link_services(self): from ..v2020_11_01.aio.operations import PrivateLinkServicesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import PrivateLinkServicesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import PrivateLinkServicesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PrivateLinkServicesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'private_link_services'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5368,10 +5400,7 @@ def public_ip_addresses(self): * 2016-12-01: :class:`PublicIPAddressesOperations` * 2017-03-01: :class:`PublicIPAddressesOperations` * 2017-06-01: :class:`PublicIPAddressesOperations` - * 2017-08-01: :class:`PublicIPAddressesOperations` - * 2017-09-01: :class:`PublicIPAddressesOperations` * 2017-10-01: :class:`PublicIPAddressesOperations` - * 2017-11-01: :class:`PublicIPAddressesOperations` * 2018-01-01: :class:`PublicIPAddressesOperations` * 2018-02-01: :class:`PublicIPAddressesOperations` * 2018-04-01: :class:`PublicIPAddressesOperations` @@ -5397,7 +5426,7 @@ def public_ip_addresses(self): * 2020-08-01: :class:`PublicIPAddressesOperations` * 2020-11-01: :class:`PublicIPAddressesOperations` * 2021-02-01: :class:`PublicIPAddressesOperations` - * 2021-03-01: :class:`PublicIPAddressesOperations` + * 2021-05-01: :class:`PublicIPAddressesOperations` """ api_version = self._get_api_version('public_ip_addresses') if api_version == '2015-06-15': @@ -5410,14 +5439,8 @@ def public_ip_addresses(self): from ..v2017_03_01.aio.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import PublicIPAddressesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import PublicIPAddressesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import PublicIPAddressesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2018-02-01': @@ -5468,8 +5491,8 @@ def public_ip_addresses(self): from ..v2020_11_01.aio.operations import PublicIPAddressesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import PublicIPAddressesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import PublicIPAddressesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PublicIPAddressesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'public_ip_addresses'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5499,7 +5522,7 @@ def public_ip_prefixes(self): * 2020-08-01: :class:`PublicIPPrefixesOperations` * 2020-11-01: :class:`PublicIPPrefixesOperations` * 2021-02-01: :class:`PublicIPPrefixesOperations` - * 2021-03-01: :class:`PublicIPPrefixesOperations` + * 2021-05-01: :class:`PublicIPPrefixesOperations` """ api_version = self._get_api_version('public_ip_prefixes') if api_version == '2018-07-01': @@ -5544,8 +5567,8 @@ def public_ip_prefixes(self): from ..v2020_11_01.aio.operations import PublicIPPrefixesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import PublicIPPrefixesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import PublicIPPrefixesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import PublicIPPrefixesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'public_ip_prefixes'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5570,7 +5593,7 @@ def resource_navigation_links(self): * 2020-08-01: :class:`ResourceNavigationLinksOperations` * 2020-11-01: :class:`ResourceNavigationLinksOperations` * 2021-02-01: :class:`ResourceNavigationLinksOperations` - * 2021-03-01: :class:`ResourceNavigationLinksOperations` + * 2021-05-01: :class:`ResourceNavigationLinksOperations` """ api_version = self._get_api_version('resource_navigation_links') if api_version == '2019-02-01': @@ -5605,8 +5628,8 @@ def resource_navigation_links(self): from ..v2020_11_01.aio.operations import ResourceNavigationLinksOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ResourceNavigationLinksOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ResourceNavigationLinksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ResourceNavigationLinksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'resource_navigation_links'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5618,10 +5641,7 @@ def route_filter_rules(self): * 2016-12-01: :class:`RouteFilterRulesOperations` * 2017-03-01: :class:`RouteFilterRulesOperations` * 2017-06-01: :class:`RouteFilterRulesOperations` - * 2017-08-01: :class:`RouteFilterRulesOperations` - * 2017-09-01: :class:`RouteFilterRulesOperations` * 2017-10-01: :class:`RouteFilterRulesOperations` - * 2017-11-01: :class:`RouteFilterRulesOperations` * 2018-01-01: :class:`RouteFilterRulesOperations` * 2018-02-01: :class:`RouteFilterRulesOperations` * 2018-04-01: :class:`RouteFilterRulesOperations` @@ -5647,7 +5667,7 @@ def route_filter_rules(self): * 2020-08-01: :class:`RouteFilterRulesOperations` * 2020-11-01: :class:`RouteFilterRulesOperations` * 2021-02-01: :class:`RouteFilterRulesOperations` - * 2021-03-01: :class:`RouteFilterRulesOperations` + * 2021-05-01: :class:`RouteFilterRulesOperations` """ api_version = self._get_api_version('route_filter_rules') if api_version == '2016-12-01': @@ -5656,14 +5676,8 @@ def route_filter_rules(self): from ..v2017_03_01.aio.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import RouteFilterRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import RouteFilterRulesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import RouteFilterRulesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -5714,8 +5728,8 @@ def route_filter_rules(self): from ..v2020_11_01.aio.operations import RouteFilterRulesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import RouteFilterRulesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import RouteFilterRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RouteFilterRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'route_filter_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5727,10 +5741,7 @@ def route_filters(self): * 2016-12-01: :class:`RouteFiltersOperations` * 2017-03-01: :class:`RouteFiltersOperations` * 2017-06-01: :class:`RouteFiltersOperations` - * 2017-08-01: :class:`RouteFiltersOperations` - * 2017-09-01: :class:`RouteFiltersOperations` * 2017-10-01: :class:`RouteFiltersOperations` - * 2017-11-01: :class:`RouteFiltersOperations` * 2018-01-01: :class:`RouteFiltersOperations` * 2018-02-01: :class:`RouteFiltersOperations` * 2018-04-01: :class:`RouteFiltersOperations` @@ -5756,7 +5767,7 @@ def route_filters(self): * 2020-08-01: :class:`RouteFiltersOperations` * 2020-11-01: :class:`RouteFiltersOperations` * 2021-02-01: :class:`RouteFiltersOperations` - * 2021-03-01: :class:`RouteFiltersOperations` + * 2021-05-01: :class:`RouteFiltersOperations` """ api_version = self._get_api_version('route_filters') if api_version == '2016-12-01': @@ -5765,14 +5776,8 @@ def route_filters(self): from ..v2017_03_01.aio.operations import RouteFiltersOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import RouteFiltersOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import RouteFiltersOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import RouteFiltersOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import RouteFiltersOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import RouteFiltersOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import RouteFiltersOperations as OperationClass elif api_version == '2018-02-01': @@ -5823,8 +5828,8 @@ def route_filters(self): from ..v2020_11_01.aio.operations import RouteFiltersOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import RouteFiltersOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import RouteFiltersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RouteFiltersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'route_filters'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5838,10 +5843,7 @@ def route_tables(self): * 2016-12-01: :class:`RouteTablesOperations` * 2017-03-01: :class:`RouteTablesOperations` * 2017-06-01: :class:`RouteTablesOperations` - * 2017-08-01: :class:`RouteTablesOperations` - * 2017-09-01: :class:`RouteTablesOperations` * 2017-10-01: :class:`RouteTablesOperations` - * 2017-11-01: :class:`RouteTablesOperations` * 2018-01-01: :class:`RouteTablesOperations` * 2018-02-01: :class:`RouteTablesOperations` * 2018-04-01: :class:`RouteTablesOperations` @@ -5867,7 +5869,7 @@ def route_tables(self): * 2020-08-01: :class:`RouteTablesOperations` * 2020-11-01: :class:`RouteTablesOperations` * 2021-02-01: :class:`RouteTablesOperations` - * 2021-03-01: :class:`RouteTablesOperations` + * 2021-05-01: :class:`RouteTablesOperations` """ api_version = self._get_api_version('route_tables') if api_version == '2015-06-15': @@ -5880,14 +5882,8 @@ def route_tables(self): from ..v2017_03_01.aio.operations import RouteTablesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import RouteTablesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import RouteTablesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import RouteTablesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import RouteTablesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import RouteTablesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import RouteTablesOperations as OperationClass elif api_version == '2018-02-01': @@ -5938,8 +5934,8 @@ def route_tables(self): from ..v2020_11_01.aio.operations import RouteTablesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import RouteTablesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import RouteTablesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RouteTablesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'route_tables'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -5953,10 +5949,7 @@ def routes(self): * 2016-12-01: :class:`RoutesOperations` * 2017-03-01: :class:`RoutesOperations` * 2017-06-01: :class:`RoutesOperations` - * 2017-08-01: :class:`RoutesOperations` - * 2017-09-01: :class:`RoutesOperations` * 2017-10-01: :class:`RoutesOperations` - * 2017-11-01: :class:`RoutesOperations` * 2018-01-01: :class:`RoutesOperations` * 2018-02-01: :class:`RoutesOperations` * 2018-04-01: :class:`RoutesOperations` @@ -5982,7 +5975,7 @@ def routes(self): * 2020-08-01: :class:`RoutesOperations` * 2020-11-01: :class:`RoutesOperations` * 2021-02-01: :class:`RoutesOperations` - * 2021-03-01: :class:`RoutesOperations` + * 2021-05-01: :class:`RoutesOperations` """ api_version = self._get_api_version('routes') if api_version == '2015-06-15': @@ -5995,14 +5988,8 @@ def routes(self): from ..v2017_03_01.aio.operations import RoutesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import RoutesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import RoutesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import RoutesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import RoutesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import RoutesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import RoutesOperations as OperationClass elif api_version == '2018-02-01': @@ -6053,12 +6040,38 @@ def routes(self): from ..v2020_11_01.aio.operations import RoutesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import RoutesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import RoutesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RoutesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'routes'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def routing_intent(self): + """Instance depends on the API version: + + * 2021-05-01: :class:`RoutingIntentOperations` + """ + api_version = self._get_api_version('routing_intent') + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import RoutingIntentOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'routing_intent'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def security_admin_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityAdminConfigurationsOperations` + """ + api_version = self._get_api_version('security_admin_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import SecurityAdminConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_admin_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def security_partner_providers(self): """Instance depends on the API version: @@ -6071,7 +6084,7 @@ def security_partner_providers(self): * 2020-08-01: :class:`SecurityPartnerProvidersOperations` * 2020-11-01: :class:`SecurityPartnerProvidersOperations` * 2021-02-01: :class:`SecurityPartnerProvidersOperations` - * 2021-03-01: :class:`SecurityPartnerProvidersOperations` + * 2021-05-01: :class:`SecurityPartnerProvidersOperations` """ api_version = self._get_api_version('security_partner_providers') if api_version == '2020-03-01': @@ -6090,8 +6103,8 @@ def security_partner_providers(self): from ..v2020_11_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import SecurityPartnerProvidersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'security_partner_providers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6105,10 +6118,7 @@ def security_rules(self): * 2016-12-01: :class:`SecurityRulesOperations` * 2017-03-01: :class:`SecurityRulesOperations` * 2017-06-01: :class:`SecurityRulesOperations` - * 2017-08-01: :class:`SecurityRulesOperations` - * 2017-09-01: :class:`SecurityRulesOperations` * 2017-10-01: :class:`SecurityRulesOperations` - * 2017-11-01: :class:`SecurityRulesOperations` * 2018-01-01: :class:`SecurityRulesOperations` * 2018-02-01: :class:`SecurityRulesOperations` * 2018-04-01: :class:`SecurityRulesOperations` @@ -6134,7 +6144,7 @@ def security_rules(self): * 2020-08-01: :class:`SecurityRulesOperations` * 2020-11-01: :class:`SecurityRulesOperations` * 2021-02-01: :class:`SecurityRulesOperations` - * 2021-03-01: :class:`SecurityRulesOperations` + * 2021-05-01: :class:`SecurityRulesOperations` """ api_version = self._get_api_version('security_rules') if api_version == '2015-06-15': @@ -6147,14 +6157,8 @@ def security_rules(self): from ..v2017_03_01.aio.operations import SecurityRulesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import SecurityRulesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import SecurityRulesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import SecurityRulesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import SecurityRulesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import SecurityRulesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import SecurityRulesOperations as OperationClass elif api_version == '2018-02-01': @@ -6205,12 +6209,25 @@ def security_rules(self): from ..v2020_11_01.aio.operations import SecurityRulesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import SecurityRulesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import SecurityRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import SecurityRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'security_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def security_user_configurations(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`SecurityUserConfigurationsOperations` + """ + api_version = self._get_api_version('security_user_configurations') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import SecurityUserConfigurationsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'security_user_configurations'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def service_association_links(self): """Instance depends on the API version: @@ -6231,7 +6248,7 @@ def service_association_links(self): * 2020-08-01: :class:`ServiceAssociationLinksOperations` * 2020-11-01: :class:`ServiceAssociationLinksOperations` * 2021-02-01: :class:`ServiceAssociationLinksOperations` - * 2021-03-01: :class:`ServiceAssociationLinksOperations` + * 2021-05-01: :class:`ServiceAssociationLinksOperations` """ api_version = self._get_api_version('service_association_links') if api_version == '2019-02-01': @@ -6266,8 +6283,8 @@ def service_association_links(self): from ..v2020_11_01.aio.operations import ServiceAssociationLinksOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ServiceAssociationLinksOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ServiceAssociationLinksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceAssociationLinksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_association_links'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6297,7 +6314,7 @@ def service_endpoint_policies(self): * 2020-08-01: :class:`ServiceEndpointPoliciesOperations` * 2020-11-01: :class:`ServiceEndpointPoliciesOperations` * 2021-02-01: :class:`ServiceEndpointPoliciesOperations` - * 2021-03-01: :class:`ServiceEndpointPoliciesOperations` + * 2021-05-01: :class:`ServiceEndpointPoliciesOperations` """ api_version = self._get_api_version('service_endpoint_policies') if api_version == '2018-07-01': @@ -6342,8 +6359,8 @@ def service_endpoint_policies(self): from ..v2020_11_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceEndpointPoliciesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_endpoint_policies'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6373,7 +6390,7 @@ def service_endpoint_policy_definitions(self): * 2020-08-01: :class:`ServiceEndpointPolicyDefinitionsOperations` * 2020-11-01: :class:`ServiceEndpointPolicyDefinitionsOperations` * 2021-02-01: :class:`ServiceEndpointPolicyDefinitionsOperations` - * 2021-03-01: :class:`ServiceEndpointPolicyDefinitionsOperations` + * 2021-05-01: :class:`ServiceEndpointPolicyDefinitionsOperations` """ api_version = self._get_api_version('service_endpoint_policy_definitions') if api_version == '2018-07-01': @@ -6418,8 +6435,8 @@ def service_endpoint_policy_definitions(self): from ..v2020_11_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceEndpointPolicyDefinitionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_endpoint_policy_definitions'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6428,11 +6445,11 @@ def service_endpoint_policy_definitions(self): def service_tag_information(self): """Instance depends on the API version: - * 2021-03-01: :class:`ServiceTagInformationOperations` + * 2021-05-01: :class:`ServiceTagInformationOperations` """ api_version = self._get_api_version('service_tag_information') - if api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ServiceTagInformationOperations as OperationClass + if api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceTagInformationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_tag_information'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6456,7 +6473,7 @@ def service_tags(self): * 2020-08-01: :class:`ServiceTagsOperations` * 2020-11-01: :class:`ServiceTagsOperations` * 2021-02-01: :class:`ServiceTagsOperations` - * 2021-03-01: :class:`ServiceTagsOperations` + * 2021-05-01: :class:`ServiceTagsOperations` """ api_version = self._get_api_version('service_tags') if api_version == '2019-04-01': @@ -6489,8 +6506,8 @@ def service_tags(self): from ..v2020_11_01.aio.operations import ServiceTagsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import ServiceTagsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import ServiceTagsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import ServiceTagsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'service_tags'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6504,10 +6521,7 @@ def subnets(self): * 2016-12-01: :class:`SubnetsOperations` * 2017-03-01: :class:`SubnetsOperations` * 2017-06-01: :class:`SubnetsOperations` - * 2017-08-01: :class:`SubnetsOperations` - * 2017-09-01: :class:`SubnetsOperations` * 2017-10-01: :class:`SubnetsOperations` - * 2017-11-01: :class:`SubnetsOperations` * 2018-01-01: :class:`SubnetsOperations` * 2018-02-01: :class:`SubnetsOperations` * 2018-04-01: :class:`SubnetsOperations` @@ -6533,7 +6547,7 @@ def subnets(self): * 2020-08-01: :class:`SubnetsOperations` * 2020-11-01: :class:`SubnetsOperations` * 2021-02-01: :class:`SubnetsOperations` - * 2021-03-01: :class:`SubnetsOperations` + * 2021-05-01: :class:`SubnetsOperations` """ api_version = self._get_api_version('subnets') if api_version == '2015-06-15': @@ -6546,14 +6560,8 @@ def subnets(self): from ..v2017_03_01.aio.operations import SubnetsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import SubnetsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import SubnetsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import SubnetsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import SubnetsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import SubnetsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import SubnetsOperations as OperationClass elif api_version == '2018-02-01': @@ -6604,8 +6612,8 @@ def subnets(self): from ..v2020_11_01.aio.operations import SubnetsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import SubnetsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import SubnetsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import SubnetsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'subnets'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6619,10 +6627,7 @@ def usages(self): * 2016-12-01: :class:`UsagesOperations` * 2017-03-01: :class:`UsagesOperations` * 2017-06-01: :class:`UsagesOperations` - * 2017-08-01: :class:`UsagesOperations` - * 2017-09-01: :class:`UsagesOperations` * 2017-10-01: :class:`UsagesOperations` - * 2017-11-01: :class:`UsagesOperations` * 2018-01-01: :class:`UsagesOperations` * 2018-02-01: :class:`UsagesOperations` * 2018-04-01: :class:`UsagesOperations` @@ -6648,7 +6653,7 @@ def usages(self): * 2020-08-01: :class:`UsagesOperations` * 2020-11-01: :class:`UsagesOperations` * 2021-02-01: :class:`UsagesOperations` - * 2021-03-01: :class:`UsagesOperations` + * 2021-05-01: :class:`UsagesOperations` """ api_version = self._get_api_version('usages') if api_version == '2015-06-15': @@ -6661,14 +6666,8 @@ def usages(self): from ..v2017_03_01.aio.operations import UsagesOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import UsagesOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import UsagesOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import UsagesOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import UsagesOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import UsagesOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import UsagesOperations as OperationClass elif api_version == '2018-02-01': @@ -6719,12 +6718,38 @@ def usages(self): from ..v2020_11_01.aio.operations import UsagesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import UsagesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import UsagesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import UsagesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'usages'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property + def user_rule_collections(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRuleCollectionsOperations` + """ + api_version = self._get_api_version('user_rule_collections') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import UserRuleCollectionsOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rule_collections'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + + @property + def user_rules(self): + """Instance depends on the API version: + + * 2021-02-01-preview: :class:`UserRulesOperations` + """ + api_version = self._get_api_version('user_rules') + if api_version == '2021-02-01-preview': + from ..v2021_02_01_preview.aio.operations import UserRulesOperations as OperationClass + else: + raise ValueError("API version {} does not have operation group 'user_rules'".format(api_version)) + return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) + @property def virtual_appliance_sites(self): """Instance depends on the API version: @@ -6735,7 +6760,7 @@ def virtual_appliance_sites(self): * 2020-08-01: :class:`VirtualApplianceSitesOperations` * 2020-11-01: :class:`VirtualApplianceSitesOperations` * 2021-02-01: :class:`VirtualApplianceSitesOperations` - * 2021-03-01: :class:`VirtualApplianceSitesOperations` + * 2021-05-01: :class:`VirtualApplianceSitesOperations` """ api_version = self._get_api_version('virtual_appliance_sites') if api_version == '2020-05-01': @@ -6750,8 +6775,8 @@ def virtual_appliance_sites(self): from ..v2020_11_01.aio.operations import VirtualApplianceSitesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualApplianceSitesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualApplianceSitesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualApplianceSitesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_appliance_sites'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6766,7 +6791,7 @@ def virtual_appliance_skus(self): * 2020-08-01: :class:`VirtualApplianceSkusOperations` * 2020-11-01: :class:`VirtualApplianceSkusOperations` * 2021-02-01: :class:`VirtualApplianceSkusOperations` - * 2021-03-01: :class:`VirtualApplianceSkusOperations` + * 2021-05-01: :class:`VirtualApplianceSkusOperations` """ api_version = self._get_api_version('virtual_appliance_skus') if api_version == '2020-05-01': @@ -6781,8 +6806,8 @@ def virtual_appliance_skus(self): from ..v2020_11_01.aio.operations import VirtualApplianceSkusOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualApplianceSkusOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualApplianceSkusOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualApplianceSkusOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_appliance_skus'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6797,7 +6822,7 @@ def virtual_hub_bgp_connection(self): * 2020-08-01: :class:`VirtualHubBgpConnectionOperations` * 2020-11-01: :class:`VirtualHubBgpConnectionOperations` * 2021-02-01: :class:`VirtualHubBgpConnectionOperations` - * 2021-03-01: :class:`VirtualHubBgpConnectionOperations` + * 2021-05-01: :class:`VirtualHubBgpConnectionOperations` """ api_version = self._get_api_version('virtual_hub_bgp_connection') if api_version == '2020-05-01': @@ -6812,8 +6837,8 @@ def virtual_hub_bgp_connection(self): from ..v2020_11_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubBgpConnectionOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connection'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6828,7 +6853,7 @@ def virtual_hub_bgp_connections(self): * 2020-08-01: :class:`VirtualHubBgpConnectionsOperations` * 2020-11-01: :class:`VirtualHubBgpConnectionsOperations` * 2021-02-01: :class:`VirtualHubBgpConnectionsOperations` - * 2021-03-01: :class:`VirtualHubBgpConnectionsOperations` + * 2021-05-01: :class:`VirtualHubBgpConnectionsOperations` """ api_version = self._get_api_version('virtual_hub_bgp_connections') if api_version == '2020-05-01': @@ -6843,8 +6868,8 @@ def virtual_hub_bgp_connections(self): from ..v2020_11_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubBgpConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hub_bgp_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6859,7 +6884,7 @@ def virtual_hub_ip_configuration(self): * 2020-08-01: :class:`VirtualHubIpConfigurationOperations` * 2020-11-01: :class:`VirtualHubIpConfigurationOperations` * 2021-02-01: :class:`VirtualHubIpConfigurationOperations` - * 2021-03-01: :class:`VirtualHubIpConfigurationOperations` + * 2021-05-01: :class:`VirtualHubIpConfigurationOperations` """ api_version = self._get_api_version('virtual_hub_ip_configuration') if api_version == '2020-05-01': @@ -6874,8 +6899,8 @@ def virtual_hub_ip_configuration(self): from ..v2020_11_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubIpConfigurationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hub_ip_configuration'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6895,7 +6920,7 @@ def virtual_hub_route_table_v2_s(self): * 2020-08-01: :class:`VirtualHubRouteTableV2SOperations` * 2020-11-01: :class:`VirtualHubRouteTableV2SOperations` * 2021-02-01: :class:`VirtualHubRouteTableV2SOperations` - * 2021-03-01: :class:`VirtualHubRouteTableV2SOperations` + * 2021-05-01: :class:`VirtualHubRouteTableV2SOperations` """ api_version = self._get_api_version('virtual_hub_route_table_v2_s') if api_version == '2019-09-01': @@ -6920,8 +6945,8 @@ def virtual_hub_route_table_v2_s(self): from ..v2020_11_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubRouteTableV2SOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hub_route_table_v2_s'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -6953,7 +6978,7 @@ def virtual_hubs(self): * 2020-08-01: :class:`VirtualHubsOperations` * 2020-11-01: :class:`VirtualHubsOperations` * 2021-02-01: :class:`VirtualHubsOperations` - * 2021-03-01: :class:`VirtualHubsOperations` + * 2021-05-01: :class:`VirtualHubsOperations` """ api_version = self._get_api_version('virtual_hubs') if api_version == '2018-04-01': @@ -7002,8 +7027,8 @@ def virtual_hubs(self): from ..v2020_11_01.aio.operations import VirtualHubsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualHubsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualHubsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualHubsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_hubs'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7017,10 +7042,7 @@ def virtual_network_gateway_connections(self): * 2016-12-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-06-01: :class:`VirtualNetworkGatewayConnectionsOperations` - * 2017-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` - * 2017-09-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2017-10-01: :class:`VirtualNetworkGatewayConnectionsOperations` - * 2017-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2018-01-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2018-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2018-04-01: :class:`VirtualNetworkGatewayConnectionsOperations` @@ -7046,7 +7068,7 @@ def virtual_network_gateway_connections(self): * 2020-08-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2020-11-01: :class:`VirtualNetworkGatewayConnectionsOperations` * 2021-02-01: :class:`VirtualNetworkGatewayConnectionsOperations` - * 2021-03-01: :class:`VirtualNetworkGatewayConnectionsOperations` + * 2021-05-01: :class:`VirtualNetworkGatewayConnectionsOperations` """ api_version = self._get_api_version('virtual_network_gateway_connections') if api_version == '2015-06-15': @@ -7059,14 +7081,8 @@ def virtual_network_gateway_connections(self): from ..v2017_03_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2018-02-01': @@ -7117,8 +7133,8 @@ def virtual_network_gateway_connections(self): from ..v2020_11_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkGatewayConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_gateway_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7128,13 +7144,13 @@ def virtual_network_gateway_nat_rules(self): """Instance depends on the API version: * 2021-02-01: :class:`VirtualNetworkGatewayNatRulesOperations` - * 2021-03-01: :class:`VirtualNetworkGatewayNatRulesOperations` + * 2021-05-01: :class:`VirtualNetworkGatewayNatRulesOperations` """ api_version = self._get_api_version('virtual_network_gateway_nat_rules') if api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkGatewayNatRulesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_gateway_nat_rules'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7148,10 +7164,7 @@ def virtual_network_gateways(self): * 2016-12-01: :class:`VirtualNetworkGatewaysOperations` * 2017-03-01: :class:`VirtualNetworkGatewaysOperations` * 2017-06-01: :class:`VirtualNetworkGatewaysOperations` - * 2017-08-01: :class:`VirtualNetworkGatewaysOperations` - * 2017-09-01: :class:`VirtualNetworkGatewaysOperations` * 2017-10-01: :class:`VirtualNetworkGatewaysOperations` - * 2017-11-01: :class:`VirtualNetworkGatewaysOperations` * 2018-01-01: :class:`VirtualNetworkGatewaysOperations` * 2018-02-01: :class:`VirtualNetworkGatewaysOperations` * 2018-04-01: :class:`VirtualNetworkGatewaysOperations` @@ -7177,7 +7190,7 @@ def virtual_network_gateways(self): * 2020-08-01: :class:`VirtualNetworkGatewaysOperations` * 2020-11-01: :class:`VirtualNetworkGatewaysOperations` * 2021-02-01: :class:`VirtualNetworkGatewaysOperations` - * 2021-03-01: :class:`VirtualNetworkGatewaysOperations` + * 2021-05-01: :class:`VirtualNetworkGatewaysOperations` """ api_version = self._get_api_version('virtual_network_gateways') if api_version == '2015-06-15': @@ -7190,14 +7203,8 @@ def virtual_network_gateways(self): from ..v2017_03_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2018-02-01': @@ -7248,8 +7255,8 @@ def virtual_network_gateways(self): from ..v2020_11_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7262,10 +7269,7 @@ def virtual_network_peerings(self): * 2016-12-01: :class:`VirtualNetworkPeeringsOperations` * 2017-03-01: :class:`VirtualNetworkPeeringsOperations` * 2017-06-01: :class:`VirtualNetworkPeeringsOperations` - * 2017-08-01: :class:`VirtualNetworkPeeringsOperations` - * 2017-09-01: :class:`VirtualNetworkPeeringsOperations` * 2017-10-01: :class:`VirtualNetworkPeeringsOperations` - * 2017-11-01: :class:`VirtualNetworkPeeringsOperations` * 2018-01-01: :class:`VirtualNetworkPeeringsOperations` * 2018-02-01: :class:`VirtualNetworkPeeringsOperations` * 2018-04-01: :class:`VirtualNetworkPeeringsOperations` @@ -7291,7 +7295,7 @@ def virtual_network_peerings(self): * 2020-08-01: :class:`VirtualNetworkPeeringsOperations` * 2020-11-01: :class:`VirtualNetworkPeeringsOperations` * 2021-02-01: :class:`VirtualNetworkPeeringsOperations` - * 2021-03-01: :class:`VirtualNetworkPeeringsOperations` + * 2021-05-01: :class:`VirtualNetworkPeeringsOperations` """ api_version = self._get_api_version('virtual_network_peerings') if api_version == '2016-09-01': @@ -7302,14 +7306,8 @@ def virtual_network_peerings(self): from ..v2017_03_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2018-02-01': @@ -7360,8 +7358,8 @@ def virtual_network_peerings(self): from ..v2020_11_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkPeeringsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_peerings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7390,7 +7388,7 @@ def virtual_network_taps(self): * 2020-08-01: :class:`VirtualNetworkTapsOperations` * 2020-11-01: :class:`VirtualNetworkTapsOperations` * 2021-02-01: :class:`VirtualNetworkTapsOperations` - * 2021-03-01: :class:`VirtualNetworkTapsOperations` + * 2021-05-01: :class:`VirtualNetworkTapsOperations` """ api_version = self._get_api_version('virtual_network_taps') if api_version == '2018-08-01': @@ -7433,8 +7431,8 @@ def virtual_network_taps(self): from ..v2020_11_01.aio.operations import VirtualNetworkTapsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualNetworkTapsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualNetworkTapsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworkTapsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_network_taps'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7448,10 +7446,7 @@ def virtual_networks(self): * 2016-12-01: :class:`VirtualNetworksOperations` * 2017-03-01: :class:`VirtualNetworksOperations` * 2017-06-01: :class:`VirtualNetworksOperations` - * 2017-08-01: :class:`VirtualNetworksOperations` - * 2017-09-01: :class:`VirtualNetworksOperations` * 2017-10-01: :class:`VirtualNetworksOperations` - * 2017-11-01: :class:`VirtualNetworksOperations` * 2018-01-01: :class:`VirtualNetworksOperations` * 2018-02-01: :class:`VirtualNetworksOperations` * 2018-04-01: :class:`VirtualNetworksOperations` @@ -7477,7 +7472,7 @@ def virtual_networks(self): * 2020-08-01: :class:`VirtualNetworksOperations` * 2020-11-01: :class:`VirtualNetworksOperations` * 2021-02-01: :class:`VirtualNetworksOperations` - * 2021-03-01: :class:`VirtualNetworksOperations` + * 2021-05-01: :class:`VirtualNetworksOperations` """ api_version = self._get_api_version('virtual_networks') if api_version == '2015-06-15': @@ -7490,14 +7485,8 @@ def virtual_networks(self): from ..v2017_03_01.aio.operations import VirtualNetworksOperations as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import VirtualNetworksOperations as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import VirtualNetworksOperations as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import VirtualNetworksOperations as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import VirtualNetworksOperations as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import VirtualNetworksOperations as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import VirtualNetworksOperations as OperationClass elif api_version == '2018-02-01': @@ -7548,8 +7537,8 @@ def virtual_networks(self): from ..v2020_11_01.aio.operations import VirtualNetworksOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualNetworksOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualNetworksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualNetworksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_networks'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7571,7 +7560,7 @@ def virtual_router_peerings(self): * 2020-08-01: :class:`VirtualRouterPeeringsOperations` * 2020-11-01: :class:`VirtualRouterPeeringsOperations` * 2021-02-01: :class:`VirtualRouterPeeringsOperations` - * 2021-03-01: :class:`VirtualRouterPeeringsOperations` + * 2021-05-01: :class:`VirtualRouterPeeringsOperations` """ api_version = self._get_api_version('virtual_router_peerings') if api_version == '2019-07-01': @@ -7600,8 +7589,8 @@ def virtual_router_peerings(self): from ..v2020_11_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualRouterPeeringsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_router_peerings'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7623,7 +7612,7 @@ def virtual_routers(self): * 2020-08-01: :class:`VirtualRoutersOperations` * 2020-11-01: :class:`VirtualRoutersOperations` * 2021-02-01: :class:`VirtualRoutersOperations` - * 2021-03-01: :class:`VirtualRoutersOperations` + * 2021-05-01: :class:`VirtualRoutersOperations` """ api_version = self._get_api_version('virtual_routers') if api_version == '2019-07-01': @@ -7652,8 +7641,8 @@ def virtual_routers(self): from ..v2020_11_01.aio.operations import VirtualRoutersOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualRoutersOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualRoutersOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualRoutersOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_routers'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7685,7 +7674,7 @@ def virtual_wans(self): * 2020-08-01: :class:`VirtualWansOperations` * 2020-11-01: :class:`VirtualWansOperations` * 2021-02-01: :class:`VirtualWansOperations` - * 2021-03-01: :class:`VirtualWansOperations` + * 2021-05-01: :class:`VirtualWansOperations` """ api_version = self._get_api_version('virtual_wans') if api_version == '2018-04-01': @@ -7734,8 +7723,8 @@ def virtual_wans(self): from ..v2020_11_01.aio.operations import VirtualWansOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VirtualWansOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VirtualWansOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VirtualWansOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'virtual_wans'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7767,7 +7756,7 @@ def vpn_connections(self): * 2020-08-01: :class:`VpnConnectionsOperations` * 2020-11-01: :class:`VpnConnectionsOperations` * 2021-02-01: :class:`VpnConnectionsOperations` - * 2021-03-01: :class:`VpnConnectionsOperations` + * 2021-05-01: :class:`VpnConnectionsOperations` """ api_version = self._get_api_version('vpn_connections') if api_version == '2018-04-01': @@ -7816,8 +7805,8 @@ def vpn_connections(self): from ..v2020_11_01.aio.operations import VpnConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VpnConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VpnConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7849,7 +7838,7 @@ def vpn_gateways(self): * 2020-08-01: :class:`VpnGatewaysOperations` * 2020-11-01: :class:`VpnGatewaysOperations` * 2021-02-01: :class:`VpnGatewaysOperations` - * 2021-03-01: :class:`VpnGatewaysOperations` + * 2021-05-01: :class:`VpnGatewaysOperations` """ api_version = self._get_api_version('vpn_gateways') if api_version == '2018-04-01': @@ -7898,8 +7887,8 @@ def vpn_gateways(self): from ..v2020_11_01.aio.operations import VpnGatewaysOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VpnGatewaysOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VpnGatewaysOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnGatewaysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_gateways'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7922,7 +7911,7 @@ def vpn_link_connections(self): * 2020-08-01: :class:`VpnLinkConnectionsOperations` * 2020-11-01: :class:`VpnLinkConnectionsOperations` * 2021-02-01: :class:`VpnLinkConnectionsOperations` - * 2021-03-01: :class:`VpnLinkConnectionsOperations` + * 2021-05-01: :class:`VpnLinkConnectionsOperations` """ api_version = self._get_api_version('vpn_link_connections') if api_version == '2019-06-01': @@ -7953,8 +7942,8 @@ def vpn_link_connections(self): from ..v2020_11_01.aio.operations import VpnLinkConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VpnLinkConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VpnLinkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnLinkConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_link_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -7975,7 +7964,7 @@ def vpn_server_configurations(self): * 2020-08-01: :class:`VpnServerConfigurationsOperations` * 2020-11-01: :class:`VpnServerConfigurationsOperations` * 2021-02-01: :class:`VpnServerConfigurationsOperations` - * 2021-03-01: :class:`VpnServerConfigurationsOperations` + * 2021-05-01: :class:`VpnServerConfigurationsOperations` """ api_version = self._get_api_version('vpn_server_configurations') if api_version == '2019-08-01': @@ -8002,8 +7991,8 @@ def vpn_server_configurations(self): from ..v2020_11_01.aio.operations import VpnServerConfigurationsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VpnServerConfigurationsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VpnServerConfigurationsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnServerConfigurationsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_server_configurations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8024,7 +8013,7 @@ def vpn_server_configurations_associated_with_virtual_wan(self): * 2020-08-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` * 2020-11-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` * 2021-02-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` - * 2021-03-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` + * 2021-05-01: :class:`VpnServerConfigurationsAssociatedWithVirtualWanOperations` """ api_version = self._get_api_version('vpn_server_configurations_associated_with_virtual_wan') if api_version == '2019-08-01': @@ -8051,8 +8040,8 @@ def vpn_server_configurations_associated_with_virtual_wan(self): from ..v2020_11_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_server_configurations_associated_with_virtual_wan'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8075,7 +8064,7 @@ def vpn_site_link_connections(self): * 2020-08-01: :class:`VpnSiteLinkConnectionsOperations` * 2020-11-01: :class:`VpnSiteLinkConnectionsOperations` * 2021-02-01: :class:`VpnSiteLinkConnectionsOperations` - * 2021-03-01: :class:`VpnSiteLinkConnectionsOperations` + * 2021-05-01: :class:`VpnSiteLinkConnectionsOperations` """ api_version = self._get_api_version('vpn_site_link_connections') if api_version == '2019-06-01': @@ -8106,8 +8095,8 @@ def vpn_site_link_connections(self): from ..v2020_11_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnSiteLinkConnectionsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_site_link_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8130,7 +8119,7 @@ def vpn_site_links(self): * 2020-08-01: :class:`VpnSiteLinksOperations` * 2020-11-01: :class:`VpnSiteLinksOperations` * 2021-02-01: :class:`VpnSiteLinksOperations` - * 2021-03-01: :class:`VpnSiteLinksOperations` + * 2021-05-01: :class:`VpnSiteLinksOperations` """ api_version = self._get_api_version('vpn_site_links') if api_version == '2019-06-01': @@ -8161,8 +8150,8 @@ def vpn_site_links(self): from ..v2020_11_01.aio.operations import VpnSiteLinksOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VpnSiteLinksOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VpnSiteLinksOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnSiteLinksOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_site_links'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8194,7 +8183,7 @@ def vpn_sites(self): * 2020-08-01: :class:`VpnSitesOperations` * 2020-11-01: :class:`VpnSitesOperations` * 2021-02-01: :class:`VpnSitesOperations` - * 2021-03-01: :class:`VpnSitesOperations` + * 2021-05-01: :class:`VpnSitesOperations` """ api_version = self._get_api_version('vpn_sites') if api_version == '2018-04-01': @@ -8243,8 +8232,8 @@ def vpn_sites(self): from ..v2020_11_01.aio.operations import VpnSitesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VpnSitesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VpnSitesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnSitesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_sites'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8276,7 +8265,7 @@ def vpn_sites_configuration(self): * 2020-08-01: :class:`VpnSitesConfigurationOperations` * 2020-11-01: :class:`VpnSitesConfigurationOperations` * 2021-02-01: :class:`VpnSitesConfigurationOperations` - * 2021-03-01: :class:`VpnSitesConfigurationOperations` + * 2021-05-01: :class:`VpnSitesConfigurationOperations` """ api_version = self._get_api_version('vpn_sites_configuration') if api_version == '2018-04-01': @@ -8325,8 +8314,8 @@ def vpn_sites_configuration(self): from ..v2020_11_01.aio.operations import VpnSitesConfigurationOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import VpnSitesConfigurationOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import VpnSitesConfigurationOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import VpnSitesConfigurationOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'vpn_sites_configuration'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8352,7 +8341,7 @@ def web_application_firewall_policies(self): * 2020-08-01: :class:`WebApplicationFirewallPoliciesOperations` * 2020-11-01: :class:`WebApplicationFirewallPoliciesOperations` * 2021-02-01: :class:`WebApplicationFirewallPoliciesOperations` - * 2021-03-01: :class:`WebApplicationFirewallPoliciesOperations` + * 2021-05-01: :class:`WebApplicationFirewallPoliciesOperations` """ api_version = self._get_api_version('web_application_firewall_policies') if api_version == '2018-12-01': @@ -8389,8 +8378,8 @@ def web_application_firewall_policies(self): from ..v2020_11_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import WebApplicationFirewallPoliciesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'web_application_firewall_policies'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -8403,7 +8392,7 @@ def web_categories(self): * 2020-08-01: :class:`WebCategoriesOperations` * 2020-11-01: :class:`WebCategoriesOperations` * 2021-02-01: :class:`WebCategoriesOperations` - * 2021-03-01: :class:`WebCategoriesOperations` + * 2021-05-01: :class:`WebCategoriesOperations` """ api_version = self._get_api_version('web_categories') if api_version == '2020-07-01': @@ -8414,8 +8403,8 @@ def web_categories(self): from ..v2020_11_01.aio.operations import WebCategoriesOperations as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import WebCategoriesOperations as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import WebCategoriesOperations as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import WebCategoriesOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'web_categories'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_operations_mixin.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_operations_mixin.py index a68cd8b5dbbe..2f1608697066 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_operations_mixin.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/aio/_operations_mixin.py @@ -37,7 +37,7 @@ async def begin_delete_bastion_shareable_link( :param bastion_host_name: The name of the Bastion Host. :type bastion_host_name: str :param bsl_request: Post request for all the Bastion Shareable Link endpoints. - :type bsl_request: ~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListRequest + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -71,8 +71,8 @@ async def begin_delete_bastion_shareable_link( from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_delete_bastion_shareable_link'".format(api_version)) mixin_instance = OperationClass() @@ -100,7 +100,7 @@ async def begin_generatevirtualwanvpnserverconfigurationvpnprofile( :type virtual_wan_name: str :param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation operation. - :type vpn_client_params: ~azure.mgmt.network.v2021_03_01.models.VirtualWanVpnProfileParameters + :type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -108,7 +108,7 @@ async def begin_generatevirtualwanvpnserverconfigurationvpnprofile( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VpnProfileResponse or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_03_01.models.VpnProfileResponse] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_generatevirtualwanvpnserverconfigurationvpnprofile') @@ -136,8 +136,8 @@ async def begin_generatevirtualwanvpnserverconfigurationvpnprofile( from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_generatevirtualwanvpnserverconfigurationvpnprofile'".format(api_version)) mixin_instance = OperationClass() @@ -167,7 +167,7 @@ def begin_get_active_sessions( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either BastionActiveSessionListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_03_01.models.BastionActiveSessionListResult]] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_get_active_sessions') @@ -193,8 +193,8 @@ def begin_get_active_sessions( from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_get_active_sessions'".format(api_version)) mixin_instance = OperationClass() @@ -219,7 +219,7 @@ def begin_put_bastion_shareable_link( :param bastion_host_name: The name of the Bastion Host. :type bastion_host_name: str :param bsl_request: Post request for all the Bastion Shareable Link endpoints. - :type bsl_request: ~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListRequest + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -227,7 +227,7 @@ def begin_put_bastion_shareable_link( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns an iterator like instance of either BastionShareableLinkListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListResult]] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]] :raises ~azure.core.exceptions.HttpResponseError: """ api_version = self._get_api_version('begin_put_bastion_shareable_link') @@ -253,8 +253,8 @@ def begin_put_bastion_shareable_link( from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_put_bastion_shareable_link'".format(api_version)) mixin_instance = OperationClass() @@ -280,7 +280,7 @@ async def check_dns_name_availability( :type domain_name_label: str :keyword callable cls: A custom type or function that will be passed the direct response :return: DnsNameAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2021_03_01.models.DnsNameAvailabilityResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.DnsNameAvailabilityResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('check_dns_name_availability') @@ -294,14 +294,8 @@ async def check_dns_name_availability( from ..v2017_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-06-01': from ..v2017_06_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2017-08-01': - from ..v2017_08_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2017-09-01': - from ..v2017_09_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2017-10-01': from ..v2017_10_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2017-11-01': - from ..v2017_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2018-01-01': from ..v2018_01_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2018-02-01': @@ -352,8 +346,8 @@ async def check_dns_name_availability( from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'check_dns_name_availability'".format(api_version)) mixin_instance = OperationClass() @@ -378,10 +372,10 @@ def disconnect_active_sessions( :param bastion_host_name: The name of the Bastion Host. :type bastion_host_name: str :param session_ids: The list of sessionids to disconnect. - :type session_ids: ~azure.mgmt.network.v2021_03_01.models.SessionIds + :type session_ids: ~azure.mgmt.network.v2021_05_01.models.SessionIds :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_03_01.models.BastionSessionDeleteResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('disconnect_active_sessions') @@ -407,8 +401,8 @@ def disconnect_active_sessions( from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'disconnect_active_sessions'".format(api_version)) mixin_instance = OperationClass() @@ -433,10 +427,10 @@ def get_bastion_shareable_link( :param bastion_host_name: The name of the Bastion Host. :type bastion_host_name: str :param bsl_request: Post request for all the Bastion Shareable Link endpoints. - :type bsl_request: ~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListRequest + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_03_01.models.BastionShareableLinkListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('get_bastion_shareable_link') @@ -462,8 +456,8 @@ def get_bastion_shareable_link( from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'get_bastion_shareable_link'".format(api_version)) mixin_instance = OperationClass() @@ -489,7 +483,7 @@ async def supported_security_providers( :type virtual_wan_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualWanSecurityProviders, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2021_03_01.models.VirtualWanSecurityProviders + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProviders :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('supported_security_providers') @@ -533,8 +527,8 @@ async def supported_security_providers( from ..v2020_11_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass elif api_version == '2021-02-01': from ..v2021_02_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass - elif api_version == '2021-03-01': - from ..v2021_03_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass + elif api_version == '2021-05-01': + from ..v2021_05_01.aio.operations import NetworkManagementClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'supported_security_providers'".format(api_version)) mixin_instance = OperationClass() diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/models.py index 3b23b973bea6..ebca6664d3e4 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/models.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/models.py @@ -7,4 +7,5 @@ from .v2019_02_01.models import * from .v2019_07_01.models import * from .v2020_04_01.models import * -from .v2021_03_01.models import * +from .v2021_02_01_preview.models import * +from .v2021_05_01.models import * diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2015_06_15/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2016_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_metadata.json b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_metadata.json deleted file mode 100644 index 5823936ee457..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_metadata.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "chosen_version": "2017-08-01", - "total_api_version_list": ["2017-03-30", "2017-08-01"], - "client": { - "name": "NetworkManagementClient", - "filename": "_network_management_client", - "description": "Network Client.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"], \"._operations_mixin\": [\"NetworkManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"], \"._operations_mixin\": [\"NetworkManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=None, # type: Optional[str]", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: Optional[str] = None,", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "application_gateways": "ApplicationGatewaysOperations", - "available_endpoint_services": "AvailableEndpointServicesOperations", - "express_route_circuit_authorizations": "ExpressRouteCircuitAuthorizationsOperations", - "express_route_circuit_peerings": "ExpressRouteCircuitPeeringsOperations", - "express_route_circuits": "ExpressRouteCircuitsOperations", - "express_route_service_providers": "ExpressRouteServiceProvidersOperations", - "load_balancers": "LoadBalancersOperations", - "load_balancer_backend_address_pools": "LoadBalancerBackendAddressPoolsOperations", - "load_balancer_frontend_ip_configurations": "LoadBalancerFrontendIPConfigurationsOperations", - "inbound_nat_rules": "InboundNatRulesOperations", - "load_balancer_load_balancing_rules": "LoadBalancerLoadBalancingRulesOperations", - "load_balancer_network_interfaces": "LoadBalancerNetworkInterfacesOperations", - "load_balancer_probes": "LoadBalancerProbesOperations", - "network_interfaces": "NetworkInterfacesOperations", - "network_interface_ip_configurations": "NetworkInterfaceIPConfigurationsOperations", - "network_interface_load_balancers": "NetworkInterfaceLoadBalancersOperations", - "network_security_groups": "NetworkSecurityGroupsOperations", - "security_rules": "SecurityRulesOperations", - "default_security_rules": "DefaultSecurityRulesOperations", - "network_watchers": "NetworkWatchersOperations", - "packet_captures": "PacketCapturesOperations", - "public_ip_addresses": "PublicIPAddressesOperations", - "route_filters": "RouteFiltersOperations", - "route_filter_rules": "RouteFilterRulesOperations", - "route_tables": "RouteTablesOperations", - "routes": "RoutesOperations", - "bgp_service_communities": "BgpServiceCommunitiesOperations", - "usages": "UsagesOperations", - "virtual_networks": "VirtualNetworksOperations", - "subnets": "SubnetsOperations", - "virtual_network_peerings": "VirtualNetworkPeeringsOperations", - "virtual_network_gateways": "VirtualNetworkGatewaysOperations", - "virtual_network_gateway_connections": "VirtualNetworkGatewayConnectionsOperations", - "local_network_gateways": "LocalNetworkGatewaysOperations" - }, - "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", - "operations": { - "check_dns_name_availability" : { - "sync": { - "signature": "def check_dns_name_availability(\n self,\n location, # type: str\n domain_name_label, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Checks whether a domain name in the cloudapp.azure.com zone is available for use.\n\n:param location: The location of the domain name.\n:type location: str\n:param domain_name_label: The domain name to be verified. It must conform to the following\n regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.\n:type domain_name_label: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DnsNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2017_08_01.models.DnsNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_dns_name_availability(\n self,\n location: str,\n domain_name_label: str,\n **kwargs: Any\n) -\u003e \"_models.DnsNameAvailabilityResult\":\n", - "doc": "\"\"\"Checks whether a domain name in the cloudapp.azure.com zone is available for use.\n\n:param location: The location of the domain name.\n:type location: str\n:param domain_name_label: The domain name to be verified. It must conform to the following\n regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.\n:type domain_name_label: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DnsNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2017_08_01.models.DnsNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "location, domain_name_label" - } - } - } -} \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_network_management_client.py deleted file mode 100644 index ae7d1c278805..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_network_management_client.py +++ /dev/null @@ -1,255 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import NetworkManagementClientConfiguration -from .operations import ApplicationGatewaysOperations -from .operations import NetworkManagementClientOperationsMixin -from .operations import AvailableEndpointServicesOperations -from .operations import ExpressRouteCircuitAuthorizationsOperations -from .operations import ExpressRouteCircuitPeeringsOperations -from .operations import ExpressRouteCircuitsOperations -from .operations import ExpressRouteServiceProvidersOperations -from .operations import LoadBalancersOperations -from .operations import LoadBalancerBackendAddressPoolsOperations -from .operations import LoadBalancerFrontendIPConfigurationsOperations -from .operations import InboundNatRulesOperations -from .operations import LoadBalancerLoadBalancingRulesOperations -from .operations import LoadBalancerNetworkInterfacesOperations -from .operations import LoadBalancerProbesOperations -from .operations import NetworkInterfacesOperations -from .operations import NetworkInterfaceIPConfigurationsOperations -from .operations import NetworkInterfaceLoadBalancersOperations -from .operations import NetworkSecurityGroupsOperations -from .operations import SecurityRulesOperations -from .operations import DefaultSecurityRulesOperations -from .operations import NetworkWatchersOperations -from .operations import PacketCapturesOperations -from .operations import PublicIPAddressesOperations -from .operations import RouteFiltersOperations -from .operations import RouteFilterRulesOperations -from .operations import RouteTablesOperations -from .operations import RoutesOperations -from .operations import BgpServiceCommunitiesOperations -from .operations import UsagesOperations -from .operations import VirtualNetworksOperations -from .operations import SubnetsOperations -from .operations import VirtualNetworkPeeringsOperations -from .operations import VirtualNetworkGatewaysOperations -from .operations import VirtualNetworkGatewayConnectionsOperations -from .operations import LocalNetworkGatewaysOperations -from . import models - - -class NetworkManagementClient(NetworkManagementClientOperationsMixin): - """Network Client. - - :ivar application_gateways: ApplicationGatewaysOperations operations - :vartype application_gateways: azure.mgmt.network.v2017_08_01.operations.ApplicationGatewaysOperations - :ivar available_endpoint_services: AvailableEndpointServicesOperations operations - :vartype available_endpoint_services: azure.mgmt.network.v2017_08_01.operations.AvailableEndpointServicesOperations - :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations - :vartype express_route_circuit_authorizations: azure.mgmt.network.v2017_08_01.operations.ExpressRouteCircuitAuthorizationsOperations - :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations - :vartype express_route_circuit_peerings: azure.mgmt.network.v2017_08_01.operations.ExpressRouteCircuitPeeringsOperations - :ivar express_route_circuits: ExpressRouteCircuitsOperations operations - :vartype express_route_circuits: azure.mgmt.network.v2017_08_01.operations.ExpressRouteCircuitsOperations - :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations - :vartype express_route_service_providers: azure.mgmt.network.v2017_08_01.operations.ExpressRouteServiceProvidersOperations - :ivar load_balancers: LoadBalancersOperations operations - :vartype load_balancers: azure.mgmt.network.v2017_08_01.operations.LoadBalancersOperations - :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations - :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2017_08_01.operations.LoadBalancerBackendAddressPoolsOperations - :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations - :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2017_08_01.operations.LoadBalancerFrontendIPConfigurationsOperations - :ivar inbound_nat_rules: InboundNatRulesOperations operations - :vartype inbound_nat_rules: azure.mgmt.network.v2017_08_01.operations.InboundNatRulesOperations - :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations - :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2017_08_01.operations.LoadBalancerLoadBalancingRulesOperations - :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations - :vartype load_balancer_network_interfaces: azure.mgmt.network.v2017_08_01.operations.LoadBalancerNetworkInterfacesOperations - :ivar load_balancer_probes: LoadBalancerProbesOperations operations - :vartype load_balancer_probes: azure.mgmt.network.v2017_08_01.operations.LoadBalancerProbesOperations - :ivar network_interfaces: NetworkInterfacesOperations operations - :vartype network_interfaces: azure.mgmt.network.v2017_08_01.operations.NetworkInterfacesOperations - :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations - :vartype network_interface_ip_configurations: azure.mgmt.network.v2017_08_01.operations.NetworkInterfaceIPConfigurationsOperations - :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations - :vartype network_interface_load_balancers: azure.mgmt.network.v2017_08_01.operations.NetworkInterfaceLoadBalancersOperations - :ivar network_security_groups: NetworkSecurityGroupsOperations operations - :vartype network_security_groups: azure.mgmt.network.v2017_08_01.operations.NetworkSecurityGroupsOperations - :ivar security_rules: SecurityRulesOperations operations - :vartype security_rules: azure.mgmt.network.v2017_08_01.operations.SecurityRulesOperations - :ivar default_security_rules: DefaultSecurityRulesOperations operations - :vartype default_security_rules: azure.mgmt.network.v2017_08_01.operations.DefaultSecurityRulesOperations - :ivar network_watchers: NetworkWatchersOperations operations - :vartype network_watchers: azure.mgmt.network.v2017_08_01.operations.NetworkWatchersOperations - :ivar packet_captures: PacketCapturesOperations operations - :vartype packet_captures: azure.mgmt.network.v2017_08_01.operations.PacketCapturesOperations - :ivar public_ip_addresses: PublicIPAddressesOperations operations - :vartype public_ip_addresses: azure.mgmt.network.v2017_08_01.operations.PublicIPAddressesOperations - :ivar route_filters: RouteFiltersOperations operations - :vartype route_filters: azure.mgmt.network.v2017_08_01.operations.RouteFiltersOperations - :ivar route_filter_rules: RouteFilterRulesOperations operations - :vartype route_filter_rules: azure.mgmt.network.v2017_08_01.operations.RouteFilterRulesOperations - :ivar route_tables: RouteTablesOperations operations - :vartype route_tables: azure.mgmt.network.v2017_08_01.operations.RouteTablesOperations - :ivar routes: RoutesOperations operations - :vartype routes: azure.mgmt.network.v2017_08_01.operations.RoutesOperations - :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations - :vartype bgp_service_communities: azure.mgmt.network.v2017_08_01.operations.BgpServiceCommunitiesOperations - :ivar usages: UsagesOperations operations - :vartype usages: azure.mgmt.network.v2017_08_01.operations.UsagesOperations - :ivar virtual_networks: VirtualNetworksOperations operations - :vartype virtual_networks: azure.mgmt.network.v2017_08_01.operations.VirtualNetworksOperations - :ivar subnets: SubnetsOperations operations - :vartype subnets: azure.mgmt.network.v2017_08_01.operations.SubnetsOperations - :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations - :vartype virtual_network_peerings: azure.mgmt.network.v2017_08_01.operations.VirtualNetworkPeeringsOperations - :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations - :vartype virtual_network_gateways: azure.mgmt.network.v2017_08_01.operations.VirtualNetworkGatewaysOperations - :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations - :vartype virtual_network_gateway_connections: azure.mgmt.network.v2017_08_01.operations.VirtualNetworkGatewayConnectionsOperations - :ivar local_network_gateways: LocalNetworkGatewaysOperations operations - :vartype local_network_gateways: azure.mgmt.network.v2017_08_01.operations.LocalNetworkGatewaysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.application_gateways = ApplicationGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.available_endpoint_services = AvailableEndpointServicesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuits = ExpressRouteCircuitsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_service_providers = ExpressRouteServiceProvidersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancers = LoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.inbound_nat_rules = InboundNatRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_probes = LoadBalancerProbesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interfaces = NetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_security_groups = NetworkSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.security_rules = SecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.default_security_rules = DefaultSecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_watchers = NetworkWatchersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.packet_captures = PacketCapturesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.public_ip_addresses = PublicIPAddressesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filters = RouteFiltersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filter_rules = RouteFilterRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_tables = RouteTablesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.routes = RoutesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.bgp_service_communities = BgpServiceCommunitiesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.usages = UsagesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_networks = VirtualNetworksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.subnets = SubnetsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_peerings = VirtualNetworkPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateways = VirtualNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.local_network_gateways = LocalNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> NetworkManagementClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/_network_management_client.py deleted file mode 100644 index f513ad88f906..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/_network_management_client.py +++ /dev/null @@ -1,248 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional, TYPE_CHECKING - -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -from ._configuration import NetworkManagementClientConfiguration -from .operations import ApplicationGatewaysOperations -from .operations import NetworkManagementClientOperationsMixin -from .operations import AvailableEndpointServicesOperations -from .operations import ExpressRouteCircuitAuthorizationsOperations -from .operations import ExpressRouteCircuitPeeringsOperations -from .operations import ExpressRouteCircuitsOperations -from .operations import ExpressRouteServiceProvidersOperations -from .operations import LoadBalancersOperations -from .operations import LoadBalancerBackendAddressPoolsOperations -from .operations import LoadBalancerFrontendIPConfigurationsOperations -from .operations import InboundNatRulesOperations -from .operations import LoadBalancerLoadBalancingRulesOperations -from .operations import LoadBalancerNetworkInterfacesOperations -from .operations import LoadBalancerProbesOperations -from .operations import NetworkInterfacesOperations -from .operations import NetworkInterfaceIPConfigurationsOperations -from .operations import NetworkInterfaceLoadBalancersOperations -from .operations import NetworkSecurityGroupsOperations -from .operations import SecurityRulesOperations -from .operations import DefaultSecurityRulesOperations -from .operations import NetworkWatchersOperations -from .operations import PacketCapturesOperations -from .operations import PublicIPAddressesOperations -from .operations import RouteFiltersOperations -from .operations import RouteFilterRulesOperations -from .operations import RouteTablesOperations -from .operations import RoutesOperations -from .operations import BgpServiceCommunitiesOperations -from .operations import UsagesOperations -from .operations import VirtualNetworksOperations -from .operations import SubnetsOperations -from .operations import VirtualNetworkPeeringsOperations -from .operations import VirtualNetworkGatewaysOperations -from .operations import VirtualNetworkGatewayConnectionsOperations -from .operations import LocalNetworkGatewaysOperations -from .. import models - - -class NetworkManagementClient(NetworkManagementClientOperationsMixin): - """Network Client. - - :ivar application_gateways: ApplicationGatewaysOperations operations - :vartype application_gateways: azure.mgmt.network.v2017_08_01.aio.operations.ApplicationGatewaysOperations - :ivar available_endpoint_services: AvailableEndpointServicesOperations operations - :vartype available_endpoint_services: azure.mgmt.network.v2017_08_01.aio.operations.AvailableEndpointServicesOperations - :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations - :vartype express_route_circuit_authorizations: azure.mgmt.network.v2017_08_01.aio.operations.ExpressRouteCircuitAuthorizationsOperations - :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations - :vartype express_route_circuit_peerings: azure.mgmt.network.v2017_08_01.aio.operations.ExpressRouteCircuitPeeringsOperations - :ivar express_route_circuits: ExpressRouteCircuitsOperations operations - :vartype express_route_circuits: azure.mgmt.network.v2017_08_01.aio.operations.ExpressRouteCircuitsOperations - :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations - :vartype express_route_service_providers: azure.mgmt.network.v2017_08_01.aio.operations.ExpressRouteServiceProvidersOperations - :ivar load_balancers: LoadBalancersOperations operations - :vartype load_balancers: azure.mgmt.network.v2017_08_01.aio.operations.LoadBalancersOperations - :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations - :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2017_08_01.aio.operations.LoadBalancerBackendAddressPoolsOperations - :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations - :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2017_08_01.aio.operations.LoadBalancerFrontendIPConfigurationsOperations - :ivar inbound_nat_rules: InboundNatRulesOperations operations - :vartype inbound_nat_rules: azure.mgmt.network.v2017_08_01.aio.operations.InboundNatRulesOperations - :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations - :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2017_08_01.aio.operations.LoadBalancerLoadBalancingRulesOperations - :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations - :vartype load_balancer_network_interfaces: azure.mgmt.network.v2017_08_01.aio.operations.LoadBalancerNetworkInterfacesOperations - :ivar load_balancer_probes: LoadBalancerProbesOperations operations - :vartype load_balancer_probes: azure.mgmt.network.v2017_08_01.aio.operations.LoadBalancerProbesOperations - :ivar network_interfaces: NetworkInterfacesOperations operations - :vartype network_interfaces: azure.mgmt.network.v2017_08_01.aio.operations.NetworkInterfacesOperations - :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations - :vartype network_interface_ip_configurations: azure.mgmt.network.v2017_08_01.aio.operations.NetworkInterfaceIPConfigurationsOperations - :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations - :vartype network_interface_load_balancers: azure.mgmt.network.v2017_08_01.aio.operations.NetworkInterfaceLoadBalancersOperations - :ivar network_security_groups: NetworkSecurityGroupsOperations operations - :vartype network_security_groups: azure.mgmt.network.v2017_08_01.aio.operations.NetworkSecurityGroupsOperations - :ivar security_rules: SecurityRulesOperations operations - :vartype security_rules: azure.mgmt.network.v2017_08_01.aio.operations.SecurityRulesOperations - :ivar default_security_rules: DefaultSecurityRulesOperations operations - :vartype default_security_rules: azure.mgmt.network.v2017_08_01.aio.operations.DefaultSecurityRulesOperations - :ivar network_watchers: NetworkWatchersOperations operations - :vartype network_watchers: azure.mgmt.network.v2017_08_01.aio.operations.NetworkWatchersOperations - :ivar packet_captures: PacketCapturesOperations operations - :vartype packet_captures: azure.mgmt.network.v2017_08_01.aio.operations.PacketCapturesOperations - :ivar public_ip_addresses: PublicIPAddressesOperations operations - :vartype public_ip_addresses: azure.mgmt.network.v2017_08_01.aio.operations.PublicIPAddressesOperations - :ivar route_filters: RouteFiltersOperations operations - :vartype route_filters: azure.mgmt.network.v2017_08_01.aio.operations.RouteFiltersOperations - :ivar route_filter_rules: RouteFilterRulesOperations operations - :vartype route_filter_rules: azure.mgmt.network.v2017_08_01.aio.operations.RouteFilterRulesOperations - :ivar route_tables: RouteTablesOperations operations - :vartype route_tables: azure.mgmt.network.v2017_08_01.aio.operations.RouteTablesOperations - :ivar routes: RoutesOperations operations - :vartype routes: azure.mgmt.network.v2017_08_01.aio.operations.RoutesOperations - :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations - :vartype bgp_service_communities: azure.mgmt.network.v2017_08_01.aio.operations.BgpServiceCommunitiesOperations - :ivar usages: UsagesOperations operations - :vartype usages: azure.mgmt.network.v2017_08_01.aio.operations.UsagesOperations - :ivar virtual_networks: VirtualNetworksOperations operations - :vartype virtual_networks: azure.mgmt.network.v2017_08_01.aio.operations.VirtualNetworksOperations - :ivar subnets: SubnetsOperations operations - :vartype subnets: azure.mgmt.network.v2017_08_01.aio.operations.SubnetsOperations - :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations - :vartype virtual_network_peerings: azure.mgmt.network.v2017_08_01.aio.operations.VirtualNetworkPeeringsOperations - :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations - :vartype virtual_network_gateways: azure.mgmt.network.v2017_08_01.aio.operations.VirtualNetworkGatewaysOperations - :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations - :vartype virtual_network_gateway_connections: azure.mgmt.network.v2017_08_01.aio.operations.VirtualNetworkGatewayConnectionsOperations - :ivar local_network_gateways: LocalNetworkGatewaysOperations operations - :vartype local_network_gateways: azure.mgmt.network.v2017_08_01.aio.operations.LocalNetworkGatewaysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.application_gateways = ApplicationGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.available_endpoint_services = AvailableEndpointServicesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuits = ExpressRouteCircuitsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_service_providers = ExpressRouteServiceProvidersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancers = LoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.inbound_nat_rules = InboundNatRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_probes = LoadBalancerProbesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interfaces = NetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_security_groups = NetworkSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.security_rules = SecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.default_security_rules = DefaultSecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_watchers = NetworkWatchersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.packet_captures = PacketCapturesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.public_ip_addresses = PublicIPAddressesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filters = RouteFiltersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filter_rules = RouteFilterRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_tables = RouteTablesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.routes = RoutesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.bgp_service_communities = BgpServiceCommunitiesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.usages = UsagesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_networks = VirtualNetworksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.subnets = SubnetsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_peerings = VirtualNetworkPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateways = VirtualNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.local_network_gateways = LocalNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "NetworkManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/__init__.py deleted file mode 100644 index cca1cde6acc2..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/__init__.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._application_gateways_operations import ApplicationGatewaysOperations -from ._network_management_client_operations import NetworkManagementClientOperationsMixin -from ._available_endpoint_services_operations import AvailableEndpointServicesOperations -from ._express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations -from ._express_route_circuit_peerings_operations import ExpressRouteCircuitPeeringsOperations -from ._express_route_circuits_operations import ExpressRouteCircuitsOperations -from ._express_route_service_providers_operations import ExpressRouteServiceProvidersOperations -from ._load_balancers_operations import LoadBalancersOperations -from ._load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations -from ._load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations -from ._inbound_nat_rules_operations import InboundNatRulesOperations -from ._load_balancer_load_balancing_rules_operations import LoadBalancerLoadBalancingRulesOperations -from ._load_balancer_network_interfaces_operations import LoadBalancerNetworkInterfacesOperations -from ._load_balancer_probes_operations import LoadBalancerProbesOperations -from ._network_interfaces_operations import NetworkInterfacesOperations -from ._network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations -from ._network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations -from ._network_security_groups_operations import NetworkSecurityGroupsOperations -from ._security_rules_operations import SecurityRulesOperations -from ._default_security_rules_operations import DefaultSecurityRulesOperations -from ._network_watchers_operations import NetworkWatchersOperations -from ._packet_captures_operations import PacketCapturesOperations -from ._public_ip_addresses_operations import PublicIPAddressesOperations -from ._route_filters_operations import RouteFiltersOperations -from ._route_filter_rules_operations import RouteFilterRulesOperations -from ._route_tables_operations import RouteTablesOperations -from ._routes_operations import RoutesOperations -from ._bgp_service_communities_operations import BgpServiceCommunitiesOperations -from ._usages_operations import UsagesOperations -from ._virtual_networks_operations import VirtualNetworksOperations -from ._subnets_operations import SubnetsOperations -from ._virtual_network_peerings_operations import VirtualNetworkPeeringsOperations -from ._virtual_network_gateways_operations import VirtualNetworkGatewaysOperations -from ._virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations -from ._local_network_gateways_operations import LocalNetworkGatewaysOperations - -__all__ = [ - 'ApplicationGatewaysOperations', - 'NetworkManagementClientOperationsMixin', - 'AvailableEndpointServicesOperations', - 'ExpressRouteCircuitAuthorizationsOperations', - 'ExpressRouteCircuitPeeringsOperations', - 'ExpressRouteCircuitsOperations', - 'ExpressRouteServiceProvidersOperations', - 'LoadBalancersOperations', - 'LoadBalancerBackendAddressPoolsOperations', - 'LoadBalancerFrontendIPConfigurationsOperations', - 'InboundNatRulesOperations', - 'LoadBalancerLoadBalancingRulesOperations', - 'LoadBalancerNetworkInterfacesOperations', - 'LoadBalancerProbesOperations', - 'NetworkInterfacesOperations', - 'NetworkInterfaceIPConfigurationsOperations', - 'NetworkInterfaceLoadBalancersOperations', - 'NetworkSecurityGroupsOperations', - 'SecurityRulesOperations', - 'DefaultSecurityRulesOperations', - 'NetworkWatchersOperations', - 'PacketCapturesOperations', - 'PublicIPAddressesOperations', - 'RouteFiltersOperations', - 'RouteFilterRulesOperations', - 'RouteTablesOperations', - 'RoutesOperations', - 'BgpServiceCommunitiesOperations', - 'UsagesOperations', - 'VirtualNetworksOperations', - 'SubnetsOperations', - 'VirtualNetworkPeeringsOperations', - 'VirtualNetworkGatewaysOperations', - 'VirtualNetworkGatewayConnectionsOperations', - 'LocalNetworkGatewaysOperations', -] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_default_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_default_security_rules_operations.py deleted file mode 100644 index 1789f1345921..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_default_security_rules_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class DefaultSecurityRulesOperations: - """DefaultSecurityRulesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - network_security_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.SecurityRuleListResult"]: - """Gets all default security rules in a network security group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.SecurityRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules'} # type: ignore - - async def get( - self, - resource_group_name: str, - network_security_group_name: str, - default_security_rule_name: str, - **kwargs: Any - ) -> "_models.SecurityRule": - """Get the specified default network security rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param default_security_rule_name: The name of the default security rule. - :type default_security_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.SecurityRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'defaultSecurityRuleName': self._serialize.url("default_security_rule_name", default_security_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecurityRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_watchers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_watchers_operations.py deleted file mode 100644 index 0aec719f7f4b..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_watchers_operations.py +++ /dev/null @@ -1,1505 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class NetworkWatchersOperations: - """NetworkWatchersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def create_or_update( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.NetworkWatcher", - **kwargs: Any - ) -> "_models.NetworkWatcher": - """Creates or updates a network watcher in the specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the network watcher resource. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.NetworkWatcher - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkWatcher - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkWatcher') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('NetworkWatcher', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('NetworkWatcher', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - network_watcher_name: str, - **kwargs: Any - ) -> "_models.NetworkWatcher": - """Gets the specified network watcher by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkWatcher - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkWatcher', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - network_watcher_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - network_watcher_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified network watcher resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - def list( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.NetworkWatcherListResult"]: - """Gets all network watchers by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkWatcherListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkWatcherListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers'} # type: ignore - - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable["_models.NetworkWatcherListResult"]: - """Gets all network watchers by subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkWatcherListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkWatcherListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers'} # type: ignore - - async def get_topology( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.TopologyParameters", - **kwargs: Any - ) -> "_models.Topology": - """Gets the current network topology by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the representation of topology. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.TopologyParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Topology, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.Topology - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Topology"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self.get_topology.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TopologyParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Topology', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_topology.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology'} # type: ignore - - async def _verify_ip_flow_initial( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.VerificationIPFlowParameters", - **kwargs: Any - ) -> "_models.VerificationIPFlowResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._verify_ip_flow_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VerificationIPFlowParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _verify_ip_flow_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify'} # type: ignore - - async def begin_verify_ip_flow( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.VerificationIPFlowParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.VerificationIPFlowResult"]: - """Verify IP flow from the specified VM to a location given the currently configured NSG rules. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the IP flow to be verified. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VerificationIPFlowParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VerificationIPFlowResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.VerificationIPFlowResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._verify_ip_flow_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_verify_ip_flow.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify'} # type: ignore - - async def _get_next_hop_initial( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.NextHopParameters", - **kwargs: Any - ) -> "_models.NextHopResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_next_hop_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NextHopParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('NextHopResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('NextHopResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_next_hop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop'} # type: ignore - - async def begin_get_next_hop( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.NextHopParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.NextHopResult"]: - """Gets the next hop from the specified VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the source and destination endpoint. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.NextHopParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NextHopResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.NextHopResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_next_hop_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NextHopResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_next_hop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop'} # type: ignore - - async def _get_vm_security_rules_initial( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.SecurityGroupViewParameters", - **kwargs: Any - ) -> "_models.SecurityGroupViewResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_vm_security_rules_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SecurityGroupViewParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_vm_security_rules_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView'} # type: ignore - - async def begin_get_vm_security_rules( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.SecurityGroupViewParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.SecurityGroupViewResult"]: - """Gets the configured and effective security group rules on the specified VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the VM to check security groups for. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.SecurityGroupViewParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either SecurityGroupViewResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.SecurityGroupViewResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_vm_security_rules_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_vm_security_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView'} # type: ignore - - async def _get_troubleshooting_initial( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.TroubleshootingParameters", - **kwargs: Any - ) -> "_models.TroubleshootingResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_troubleshooting_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TroubleshootingParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_troubleshooting_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot'} # type: ignore - - async def begin_get_troubleshooting( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.TroubleshootingParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.TroubleshootingResult"]: - """Initiate troubleshooting on a specified resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the resource to troubleshoot. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.TroubleshootingParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.TroubleshootingResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_troubleshooting_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_troubleshooting.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot'} # type: ignore - - async def _get_troubleshooting_result_initial( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.QueryTroubleshootingParameters", - **kwargs: Any - ) -> "_models.TroubleshootingResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_troubleshooting_result_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'QueryTroubleshootingParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_troubleshooting_result_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult'} # type: ignore - - async def begin_get_troubleshooting_result( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.QueryTroubleshootingParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.TroubleshootingResult"]: - """Get the last completed troubleshooting result on a specified resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the resource to query the troubleshooting result. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.QueryTroubleshootingParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.TroubleshootingResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_troubleshooting_result_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_troubleshooting_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult'} # type: ignore - - async def _set_flow_log_configuration_initial( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.FlowLogInformation", - **kwargs: Any - ) -> "_models.FlowLogInformation": - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._set_flow_log_configuration_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FlowLogInformation') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _set_flow_log_configuration_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog'} # type: ignore - - async def begin_set_flow_log_configuration( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.FlowLogInformation", - **kwargs: Any - ) -> AsyncLROPoller["_models.FlowLogInformation"]: - """Configures flow log on a specified resource. - - :param resource_group_name: The name of the network watcher resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the configuration of flow log. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.FlowLogInformation - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.FlowLogInformation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._set_flow_log_configuration_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_flow_log_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog'} # type: ignore - - async def _get_flow_log_status_initial( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.FlowLogStatusParameters", - **kwargs: Any - ) -> "_models.FlowLogInformation": - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_flow_log_status_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FlowLogStatusParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_flow_log_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus'} # type: ignore - - async def begin_get_flow_log_status( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.FlowLogStatusParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.FlowLogInformation"]: - """Queries status of flow log on a specified resource. - - :param resource_group_name: The name of the network watcher resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define a resource to query flow log status. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.FlowLogStatusParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.FlowLogInformation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_flow_log_status_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_flow_log_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus'} # type: ignore - - async def _check_connectivity_initial( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.ConnectivityParameters", - **kwargs: Any - ) -> "_models.ConnectivityInformation": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._check_connectivity_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectivityParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _check_connectivity_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck'} # type: ignore - - async def begin_check_connectivity( - self, - resource_group_name: str, - network_watcher_name: str, - parameters: "_models.ConnectivityParameters", - **kwargs: Any - ) -> AsyncLROPoller["_models.ConnectivityInformation"]: - """Verifies the possibility of establishing a direct TCP connection from a virtual machine to a - given endpoint including another VM or an arbitrary remote server. - - :param resource_group_name: The name of the network watcher resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that determine how the connectivity check will be performed. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ConnectivityParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ConnectivityInformation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ConnectivityInformation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._check_connectivity_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_check_connectivity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_public_ip_addresses_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_public_ip_addresses_operations.py deleted file mode 100644 index e07c3cb946f6..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_public_ip_addresses_operations.py +++ /dev/null @@ -1,717 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class PublicIPAddressesOperations: - """PublicIPAddressesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def _delete_initial( - self, - resource_group_name: str, - public_ip_address_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - public_ip_address_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified public IP address. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. - :type public_ip_address_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - public_ip_address_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> "_models.PublicIPAddress": - """Gets the specified public IP address in a specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - public_ip_address_name: str, - parameters: "_models.PublicIPAddress", - **kwargs: Any - ) -> "_models.PublicIPAddress": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PublicIPAddress') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - public_ip_address_name: str, - parameters: "_models.PublicIPAddress", - **kwargs: Any - ) -> AsyncLROPoller["_models.PublicIPAddress"]: - """Creates or updates a static or dynamic public IP address. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param public_ip_address_name: The name of the public IP address. - :type public_ip_address_name: str - :param parameters: Parameters supplied to the create or update public IP address operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.PublicIPAddress] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets all the public IP addresses in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses'} # type: ignore - - def list( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets all public IP addresses in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses'} # type: ignore - - def list_virtual_machine_scale_set_public_ip_addresses( - self, - resource_group_name: str, - virtual_machine_scale_set_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets information about all public IP addresses on a virtual machine scale set level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_virtual_machine_scale_set_public_ip_addresses.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_virtual_machine_scale_set_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses'} # type: ignore - - def list_virtual_machine_scale_set_vm_public_ip_addresses( - self, - resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, - network_interface_name: str, - ip_configuration_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.PublicIPAddressListResult"]: - """Gets information about all public IP addresses in a virtual machine IP configuration in a - virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The network interface name. - :type network_interface_name: str - :param ip_configuration_name: The IP configuration name. - :type ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_virtual_machine_scale_set_vm_public_ip_addresses.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_virtual_machine_scale_set_vm_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses'} # type: ignore - - async def get_virtual_machine_scale_set_public_ip_address( - self, - resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, - network_interface_name: str, - ip_configuration_name: str, - public_ip_address_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> "_models.PublicIPAddress": - """Get the specified public IP address in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the IP configuration. - :type ip_configuration_name: str - :param public_ip_address_name: The name of the public IP Address. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - # Construct URL - url = self.get_virtual_machine_scale_set_public_ip_address.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_virtual_machine_scale_set_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_peerings_operations.py deleted file mode 100644 index 983fbf211d95..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_peerings_operations.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class VirtualNetworkPeeringsOperations: - """VirtualNetworkPeeringsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def _delete_initial( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified virtual network peering. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the virtual network peering. - :type virtual_network_peering_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - virtual_network_peering_name=virtual_network_peering_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - **kwargs: Any - ) -> "_models.VirtualNetworkPeering": - """Gets the specified virtual network peering. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the virtual network peering. - :type virtual_network_peering_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - virtual_network_peering_parameters: "_models.VirtualNetworkPeering", - **kwargs: Any - ) -> "_models.VirtualNetworkPeering": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(virtual_network_peering_parameters, 'VirtualNetworkPeering') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - virtual_network_peering_parameters: "_models.VirtualNetworkPeering", - **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkPeering"]: - """Creates or updates a peering in the specified virtual network. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the peering. - :type virtual_network_peering_name: str - :param virtual_network_peering_parameters: Parameters supplied to the create or update virtual - network peering operation. - :type virtual_network_peering_parameters: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkPeering or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - virtual_network_peering_name=virtual_network_peering_name, - virtual_network_peering_parameters=virtual_network_peering_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - def list( - self, - resource_group_name: str, - virtual_network_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkPeeringListResult"]: - """Gets all virtual network peerings in a virtual network. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkPeeringListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeeringListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeeringListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkPeeringListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/__init__.py deleted file mode 100644 index e23134cb0203..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/__init__.py +++ /dev/null @@ -1,717 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AddressSpace - from ._models_py3 import ApplicationGateway - from ._models_py3 import ApplicationGatewayAuthenticationCertificate - from ._models_py3 import ApplicationGatewayAvailableSslOptions - from ._models_py3 import ApplicationGatewayAvailableSslPredefinedPolicies - from ._models_py3 import ApplicationGatewayAvailableWafRuleSetsResult - from ._models_py3 import ApplicationGatewayBackendAddress - from ._models_py3 import ApplicationGatewayBackendAddressPool - from ._models_py3 import ApplicationGatewayBackendHealth - from ._models_py3 import ApplicationGatewayBackendHealthHttpSettings - from ._models_py3 import ApplicationGatewayBackendHealthPool - from ._models_py3 import ApplicationGatewayBackendHealthServer - from ._models_py3 import ApplicationGatewayBackendHttpSettings - from ._models_py3 import ApplicationGatewayConnectionDraining - from ._models_py3 import ApplicationGatewayFirewallDisabledRuleGroup - from ._models_py3 import ApplicationGatewayFirewallRule - from ._models_py3 import ApplicationGatewayFirewallRuleGroup - from ._models_py3 import ApplicationGatewayFirewallRuleSet - from ._models_py3 import ApplicationGatewayFrontendIPConfiguration - from ._models_py3 import ApplicationGatewayFrontendPort - from ._models_py3 import ApplicationGatewayHttpListener - from ._models_py3 import ApplicationGatewayIPConfiguration - from ._models_py3 import ApplicationGatewayListResult - from ._models_py3 import ApplicationGatewayPathRule - from ._models_py3 import ApplicationGatewayProbe - from ._models_py3 import ApplicationGatewayProbeHealthResponseMatch - from ._models_py3 import ApplicationGatewayRedirectConfiguration - from ._models_py3 import ApplicationGatewayRequestRoutingRule - from ._models_py3 import ApplicationGatewaySku - from ._models_py3 import ApplicationGatewaySslCertificate - from ._models_py3 import ApplicationGatewaySslPolicy - from ._models_py3 import ApplicationGatewaySslPredefinedPolicy - from ._models_py3 import ApplicationGatewayUrlPathMap - from ._models_py3 import ApplicationGatewayWebApplicationFirewallConfiguration - from ._models_py3 import AuthorizationListResult - from ._models_py3 import AzureAsyncOperationResult - from ._models_py3 import BGPCommunity - from ._models_py3 import BackendAddressPool - from ._models_py3 import BgpPeerStatus - from ._models_py3 import BgpPeerStatusListResult - from ._models_py3 import BgpServiceCommunity - from ._models_py3 import BgpServiceCommunityListResult - from ._models_py3 import BgpSettings - from ._models_py3 import ConnectionResetSharedKey - from ._models_py3 import ConnectionSharedKey - from ._models_py3 import ConnectivityDestination - from ._models_py3 import ConnectivityHop - from ._models_py3 import ConnectivityInformation - from ._models_py3 import ConnectivityIssue - from ._models_py3 import ConnectivityParameters - from ._models_py3 import ConnectivitySource - from ._models_py3 import DhcpOptions - from ._models_py3 import DnsNameAvailabilityResult - from ._models_py3 import EffectiveNetworkSecurityGroup - from ._models_py3 import EffectiveNetworkSecurityGroupAssociation - from ._models_py3 import EffectiveNetworkSecurityGroupListResult - from ._models_py3 import EffectiveNetworkSecurityRule - from ._models_py3 import EffectiveRoute - from ._models_py3 import EffectiveRouteListResult - from ._models_py3 import EndpointServiceResult - from ._models_py3 import EndpointServicesListResult - from ._models_py3 import Error - from ._models_py3 import ErrorDetails - from ._models_py3 import ExpressRouteCircuit - from ._models_py3 import ExpressRouteCircuitArpTable - from ._models_py3 import ExpressRouteCircuitAuthorization - from ._models_py3 import ExpressRouteCircuitListResult - from ._models_py3 import ExpressRouteCircuitPeering - from ._models_py3 import ExpressRouteCircuitPeeringConfig - from ._models_py3 import ExpressRouteCircuitPeeringListResult - from ._models_py3 import ExpressRouteCircuitRoutesTable - from ._models_py3 import ExpressRouteCircuitRoutesTableSummary - from ._models_py3 import ExpressRouteCircuitServiceProviderProperties - from ._models_py3 import ExpressRouteCircuitSku - from ._models_py3 import ExpressRouteCircuitStats - from ._models_py3 import ExpressRouteCircuitsArpTableListResult - from ._models_py3 import ExpressRouteCircuitsRoutesTableListResult - from ._models_py3 import ExpressRouteCircuitsRoutesTableSummaryListResult - from ._models_py3 import ExpressRouteServiceProvider - from ._models_py3 import ExpressRouteServiceProviderBandwidthsOffered - from ._models_py3 import ExpressRouteServiceProviderListResult - from ._models_py3 import FlowLogInformation - from ._models_py3 import FlowLogStatusParameters - from ._models_py3 import FrontendIPConfiguration - from ._models_py3 import GatewayRoute - from ._models_py3 import GatewayRouteListResult - from ._models_py3 import IPAddressAvailabilityResult - from ._models_py3 import IPConfiguration - from ._models_py3 import InboundNatPool - from ._models_py3 import InboundNatRule - from ._models_py3 import InboundNatRuleListResult - from ._models_py3 import IpsecPolicy - from ._models_py3 import Ipv6ExpressRouteCircuitPeeringConfig - from ._models_py3 import LoadBalancer - from ._models_py3 import LoadBalancerBackendAddressPoolListResult - from ._models_py3 import LoadBalancerFrontendIPConfigurationListResult - from ._models_py3 import LoadBalancerListResult - from ._models_py3 import LoadBalancerLoadBalancingRuleListResult - from ._models_py3 import LoadBalancerProbeListResult - from ._models_py3 import LoadBalancerSku - from ._models_py3 import LoadBalancingRule - from ._models_py3 import LocalNetworkGateway - from ._models_py3 import LocalNetworkGatewayListResult - from ._models_py3 import NetworkInterface - from ._models_py3 import NetworkInterfaceAssociation - from ._models_py3 import NetworkInterfaceDnsSettings - from ._models_py3 import NetworkInterfaceIPConfiguration - from ._models_py3 import NetworkInterfaceIPConfigurationListResult - from ._models_py3 import NetworkInterfaceListResult - from ._models_py3 import NetworkInterfaceLoadBalancerListResult - from ._models_py3 import NetworkSecurityGroup - from ._models_py3 import NetworkSecurityGroupListResult - from ._models_py3 import NetworkWatcher - from ._models_py3 import NetworkWatcherListResult - from ._models_py3 import NextHopParameters - from ._models_py3 import NextHopResult - from ._models_py3 import OutboundNatRule - from ._models_py3 import PacketCapture - from ._models_py3 import PacketCaptureFilter - from ._models_py3 import PacketCaptureListResult - from ._models_py3 import PacketCaptureParameters - from ._models_py3 import PacketCaptureQueryStatusResult - from ._models_py3 import PacketCaptureResult - from ._models_py3 import PacketCaptureResultProperties - from ._models_py3 import PacketCaptureStorageLocation - from ._models_py3 import PatchRouteFilter - from ._models_py3 import PatchRouteFilterRule - from ._models_py3 import Probe - from ._models_py3 import PublicIPAddress - from ._models_py3 import PublicIPAddressDnsSettings - from ._models_py3 import PublicIPAddressListResult - from ._models_py3 import PublicIPAddressSku - from ._models_py3 import QueryTroubleshootingParameters - from ._models_py3 import Resource - from ._models_py3 import ResourceNavigationLink - from ._models_py3 import RetentionPolicyParameters - from ._models_py3 import Route - from ._models_py3 import RouteFilter - from ._models_py3 import RouteFilterListResult - from ._models_py3 import RouteFilterRule - from ._models_py3 import RouteFilterRuleListResult - from ._models_py3 import RouteListResult - from ._models_py3 import RouteTable - from ._models_py3 import RouteTableListResult - from ._models_py3 import SecurityGroupNetworkInterface - from ._models_py3 import SecurityGroupViewParameters - from ._models_py3 import SecurityGroupViewResult - from ._models_py3 import SecurityRule - from ._models_py3 import SecurityRuleAssociations - from ._models_py3 import SecurityRuleListResult - from ._models_py3 import ServiceEndpointPropertiesFormat - from ._models_py3 import SubResource - from ._models_py3 import Subnet - from ._models_py3 import SubnetAssociation - from ._models_py3 import SubnetListResult - from ._models_py3 import Topology - from ._models_py3 import TopologyAssociation - from ._models_py3 import TopologyParameters - from ._models_py3 import TopologyResource - from ._models_py3 import TroubleshootingDetails - from ._models_py3 import TroubleshootingParameters - from ._models_py3 import TroubleshootingRecommendedActions - from ._models_py3 import TroubleshootingResult - from ._models_py3 import TunnelConnectionHealth - from ._models_py3 import Usage - from ._models_py3 import UsageName - from ._models_py3 import UsagesListResult - from ._models_py3 import VerificationIPFlowParameters - from ._models_py3 import VerificationIPFlowResult - from ._models_py3 import VirtualNetwork - from ._models_py3 import VirtualNetworkConnectionGatewayReference - from ._models_py3 import VirtualNetworkGateway - from ._models_py3 import VirtualNetworkGatewayConnection - from ._models_py3 import VirtualNetworkGatewayConnectionListEntity - from ._models_py3 import VirtualNetworkGatewayConnectionListResult - from ._models_py3 import VirtualNetworkGatewayIPConfiguration - from ._models_py3 import VirtualNetworkGatewayListConnectionsResult - from ._models_py3 import VirtualNetworkGatewayListResult - from ._models_py3 import VirtualNetworkGatewaySku - from ._models_py3 import VirtualNetworkListResult - from ._models_py3 import VirtualNetworkListUsageResult - from ._models_py3 import VirtualNetworkPeering - from ._models_py3 import VirtualNetworkPeeringListResult - from ._models_py3 import VirtualNetworkUsage - from ._models_py3 import VirtualNetworkUsageName - from ._models_py3 import VpnClientConfiguration - from ._models_py3 import VpnClientParameters - from ._models_py3 import VpnClientRevokedCertificate - from ._models_py3 import VpnClientRootCertificate -except (SyntaxError, ImportError): - from ._models import AddressSpace # type: ignore - from ._models import ApplicationGateway # type: ignore - from ._models import ApplicationGatewayAuthenticationCertificate # type: ignore - from ._models import ApplicationGatewayAvailableSslOptions # type: ignore - from ._models import ApplicationGatewayAvailableSslPredefinedPolicies # type: ignore - from ._models import ApplicationGatewayAvailableWafRuleSetsResult # type: ignore - from ._models import ApplicationGatewayBackendAddress # type: ignore - from ._models import ApplicationGatewayBackendAddressPool # type: ignore - from ._models import ApplicationGatewayBackendHealth # type: ignore - from ._models import ApplicationGatewayBackendHealthHttpSettings # type: ignore - from ._models import ApplicationGatewayBackendHealthPool # type: ignore - from ._models import ApplicationGatewayBackendHealthServer # type: ignore - from ._models import ApplicationGatewayBackendHttpSettings # type: ignore - from ._models import ApplicationGatewayConnectionDraining # type: ignore - from ._models import ApplicationGatewayFirewallDisabledRuleGroup # type: ignore - from ._models import ApplicationGatewayFirewallRule # type: ignore - from ._models import ApplicationGatewayFirewallRuleGroup # type: ignore - from ._models import ApplicationGatewayFirewallRuleSet # type: ignore - from ._models import ApplicationGatewayFrontendIPConfiguration # type: ignore - from ._models import ApplicationGatewayFrontendPort # type: ignore - from ._models import ApplicationGatewayHttpListener # type: ignore - from ._models import ApplicationGatewayIPConfiguration # type: ignore - from ._models import ApplicationGatewayListResult # type: ignore - from ._models import ApplicationGatewayPathRule # type: ignore - from ._models import ApplicationGatewayProbe # type: ignore - from ._models import ApplicationGatewayProbeHealthResponseMatch # type: ignore - from ._models import ApplicationGatewayRedirectConfiguration # type: ignore - from ._models import ApplicationGatewayRequestRoutingRule # type: ignore - from ._models import ApplicationGatewaySku # type: ignore - from ._models import ApplicationGatewaySslCertificate # type: ignore - from ._models import ApplicationGatewaySslPolicy # type: ignore - from ._models import ApplicationGatewaySslPredefinedPolicy # type: ignore - from ._models import ApplicationGatewayUrlPathMap # type: ignore - from ._models import ApplicationGatewayWebApplicationFirewallConfiguration # type: ignore - from ._models import AuthorizationListResult # type: ignore - from ._models import AzureAsyncOperationResult # type: ignore - from ._models import BGPCommunity # type: ignore - from ._models import BackendAddressPool # type: ignore - from ._models import BgpPeerStatus # type: ignore - from ._models import BgpPeerStatusListResult # type: ignore - from ._models import BgpServiceCommunity # type: ignore - from ._models import BgpServiceCommunityListResult # type: ignore - from ._models import BgpSettings # type: ignore - from ._models import ConnectionResetSharedKey # type: ignore - from ._models import ConnectionSharedKey # type: ignore - from ._models import ConnectivityDestination # type: ignore - from ._models import ConnectivityHop # type: ignore - from ._models import ConnectivityInformation # type: ignore - from ._models import ConnectivityIssue # type: ignore - from ._models import ConnectivityParameters # type: ignore - from ._models import ConnectivitySource # type: ignore - from ._models import DhcpOptions # type: ignore - from ._models import DnsNameAvailabilityResult # type: ignore - from ._models import EffectiveNetworkSecurityGroup # type: ignore - from ._models import EffectiveNetworkSecurityGroupAssociation # type: ignore - from ._models import EffectiveNetworkSecurityGroupListResult # type: ignore - from ._models import EffectiveNetworkSecurityRule # type: ignore - from ._models import EffectiveRoute # type: ignore - from ._models import EffectiveRouteListResult # type: ignore - from ._models import EndpointServiceResult # type: ignore - from ._models import EndpointServicesListResult # type: ignore - from ._models import Error # type: ignore - from ._models import ErrorDetails # type: ignore - from ._models import ExpressRouteCircuit # type: ignore - from ._models import ExpressRouteCircuitArpTable # type: ignore - from ._models import ExpressRouteCircuitAuthorization # type: ignore - from ._models import ExpressRouteCircuitListResult # type: ignore - from ._models import ExpressRouteCircuitPeering # type: ignore - from ._models import ExpressRouteCircuitPeeringConfig # type: ignore - from ._models import ExpressRouteCircuitPeeringListResult # type: ignore - from ._models import ExpressRouteCircuitRoutesTable # type: ignore - from ._models import ExpressRouteCircuitRoutesTableSummary # type: ignore - from ._models import ExpressRouteCircuitServiceProviderProperties # type: ignore - from ._models import ExpressRouteCircuitSku # type: ignore - from ._models import ExpressRouteCircuitStats # type: ignore - from ._models import ExpressRouteCircuitsArpTableListResult # type: ignore - from ._models import ExpressRouteCircuitsRoutesTableListResult # type: ignore - from ._models import ExpressRouteCircuitsRoutesTableSummaryListResult # type: ignore - from ._models import ExpressRouteServiceProvider # type: ignore - from ._models import ExpressRouteServiceProviderBandwidthsOffered # type: ignore - from ._models import ExpressRouteServiceProviderListResult # type: ignore - from ._models import FlowLogInformation # type: ignore - from ._models import FlowLogStatusParameters # type: ignore - from ._models import FrontendIPConfiguration # type: ignore - from ._models import GatewayRoute # type: ignore - from ._models import GatewayRouteListResult # type: ignore - from ._models import IPAddressAvailabilityResult # type: ignore - from ._models import IPConfiguration # type: ignore - from ._models import InboundNatPool # type: ignore - from ._models import InboundNatRule # type: ignore - from ._models import InboundNatRuleListResult # type: ignore - from ._models import IpsecPolicy # type: ignore - from ._models import Ipv6ExpressRouteCircuitPeeringConfig # type: ignore - from ._models import LoadBalancer # type: ignore - from ._models import LoadBalancerBackendAddressPoolListResult # type: ignore - from ._models import LoadBalancerFrontendIPConfigurationListResult # type: ignore - from ._models import LoadBalancerListResult # type: ignore - from ._models import LoadBalancerLoadBalancingRuleListResult # type: ignore - from ._models import LoadBalancerProbeListResult # type: ignore - from ._models import LoadBalancerSku # type: ignore - from ._models import LoadBalancingRule # type: ignore - from ._models import LocalNetworkGateway # type: ignore - from ._models import LocalNetworkGatewayListResult # type: ignore - from ._models import NetworkInterface # type: ignore - from ._models import NetworkInterfaceAssociation # type: ignore - from ._models import NetworkInterfaceDnsSettings # type: ignore - from ._models import NetworkInterfaceIPConfiguration # type: ignore - from ._models import NetworkInterfaceIPConfigurationListResult # type: ignore - from ._models import NetworkInterfaceListResult # type: ignore - from ._models import NetworkInterfaceLoadBalancerListResult # type: ignore - from ._models import NetworkSecurityGroup # type: ignore - from ._models import NetworkSecurityGroupListResult # type: ignore - from ._models import NetworkWatcher # type: ignore - from ._models import NetworkWatcherListResult # type: ignore - from ._models import NextHopParameters # type: ignore - from ._models import NextHopResult # type: ignore - from ._models import OutboundNatRule # type: ignore - from ._models import PacketCapture # type: ignore - from ._models import PacketCaptureFilter # type: ignore - from ._models import PacketCaptureListResult # type: ignore - from ._models import PacketCaptureParameters # type: ignore - from ._models import PacketCaptureQueryStatusResult # type: ignore - from ._models import PacketCaptureResult # type: ignore - from ._models import PacketCaptureResultProperties # type: ignore - from ._models import PacketCaptureStorageLocation # type: ignore - from ._models import PatchRouteFilter # type: ignore - from ._models import PatchRouteFilterRule # type: ignore - from ._models import Probe # type: ignore - from ._models import PublicIPAddress # type: ignore - from ._models import PublicIPAddressDnsSettings # type: ignore - from ._models import PublicIPAddressListResult # type: ignore - from ._models import PublicIPAddressSku # type: ignore - from ._models import QueryTroubleshootingParameters # type: ignore - from ._models import Resource # type: ignore - from ._models import ResourceNavigationLink # type: ignore - from ._models import RetentionPolicyParameters # type: ignore - from ._models import Route # type: ignore - from ._models import RouteFilter # type: ignore - from ._models import RouteFilterListResult # type: ignore - from ._models import RouteFilterRule # type: ignore - from ._models import RouteFilterRuleListResult # type: ignore - from ._models import RouteListResult # type: ignore - from ._models import RouteTable # type: ignore - from ._models import RouteTableListResult # type: ignore - from ._models import SecurityGroupNetworkInterface # type: ignore - from ._models import SecurityGroupViewParameters # type: ignore - from ._models import SecurityGroupViewResult # type: ignore - from ._models import SecurityRule # type: ignore - from ._models import SecurityRuleAssociations # type: ignore - from ._models import SecurityRuleListResult # type: ignore - from ._models import ServiceEndpointPropertiesFormat # type: ignore - from ._models import SubResource # type: ignore - from ._models import Subnet # type: ignore - from ._models import SubnetAssociation # type: ignore - from ._models import SubnetListResult # type: ignore - from ._models import Topology # type: ignore - from ._models import TopologyAssociation # type: ignore - from ._models import TopologyParameters # type: ignore - from ._models import TopologyResource # type: ignore - from ._models import TroubleshootingDetails # type: ignore - from ._models import TroubleshootingParameters # type: ignore - from ._models import TroubleshootingRecommendedActions # type: ignore - from ._models import TroubleshootingResult # type: ignore - from ._models import TunnelConnectionHealth # type: ignore - from ._models import Usage # type: ignore - from ._models import UsageName # type: ignore - from ._models import UsagesListResult # type: ignore - from ._models import VerificationIPFlowParameters # type: ignore - from ._models import VerificationIPFlowResult # type: ignore - from ._models import VirtualNetwork # type: ignore - from ._models import VirtualNetworkConnectionGatewayReference # type: ignore - from ._models import VirtualNetworkGateway # type: ignore - from ._models import VirtualNetworkGatewayConnection # type: ignore - from ._models import VirtualNetworkGatewayConnectionListEntity # type: ignore - from ._models import VirtualNetworkGatewayConnectionListResult # type: ignore - from ._models import VirtualNetworkGatewayIPConfiguration # type: ignore - from ._models import VirtualNetworkGatewayListConnectionsResult # type: ignore - from ._models import VirtualNetworkGatewayListResult # type: ignore - from ._models import VirtualNetworkGatewaySku # type: ignore - from ._models import VirtualNetworkListResult # type: ignore - from ._models import VirtualNetworkListUsageResult # type: ignore - from ._models import VirtualNetworkPeering # type: ignore - from ._models import VirtualNetworkPeeringListResult # type: ignore - from ._models import VirtualNetworkUsage # type: ignore - from ._models import VirtualNetworkUsageName # type: ignore - from ._models import VpnClientConfiguration # type: ignore - from ._models import VpnClientParameters # type: ignore - from ._models import VpnClientRevokedCertificate # type: ignore - from ._models import VpnClientRootCertificate # type: ignore - -from ._network_management_client_enums import ( - Access, - ApplicationGatewayBackendHealthServerHealth, - ApplicationGatewayCookieBasedAffinity, - ApplicationGatewayFirewallMode, - ApplicationGatewayOperationalState, - ApplicationGatewayProtocol, - ApplicationGatewayRedirectType, - ApplicationGatewayRequestRoutingRuleType, - ApplicationGatewaySkuName, - ApplicationGatewaySslCipherSuite, - ApplicationGatewaySslPolicyName, - ApplicationGatewaySslPolicyType, - ApplicationGatewaySslProtocol, - ApplicationGatewayTier, - AssociationType, - AuthenticationMethod, - AuthorizationUseStatus, - BgpPeerState, - ConnectionStatus, - DhGroup, - Direction, - EffectiveRouteSource, - EffectiveRouteState, - EffectiveSecurityRuleProtocol, - ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, - ExpressRouteCircuitPeeringState, - ExpressRouteCircuitPeeringType, - ExpressRouteCircuitSkuFamily, - ExpressRouteCircuitSkuTier, - IPAllocationMethod, - IPVersion, - IkeEncryption, - IkeIntegrity, - IpsecEncryption, - IpsecIntegrity, - IssueType, - LoadBalancerSkuName, - LoadDistribution, - NetworkOperationStatus, - NextHopType, - Origin, - PcError, - PcProtocol, - PcStatus, - PfsGroup, - ProbeProtocol, - ProcessorArchitecture, - Protocol, - ProvisioningState, - PublicIPAddressSkuName, - RouteFilterRuleType, - RouteNextHopType, - SecurityRuleAccess, - SecurityRuleDirection, - SecurityRuleProtocol, - ServiceProviderProvisioningState, - Severity, - TransportProtocol, - UsageUnit, - VirtualNetworkGatewayConnectionStatus, - VirtualNetworkGatewayConnectionType, - VirtualNetworkGatewaySkuName, - VirtualNetworkGatewaySkuTier, - VirtualNetworkGatewayType, - VirtualNetworkPeeringState, - VpnClientProtocol, - VpnType, -) - -__all__ = [ - 'AddressSpace', - 'ApplicationGateway', - 'ApplicationGatewayAuthenticationCertificate', - 'ApplicationGatewayAvailableSslOptions', - 'ApplicationGatewayAvailableSslPredefinedPolicies', - 'ApplicationGatewayAvailableWafRuleSetsResult', - 'ApplicationGatewayBackendAddress', - 'ApplicationGatewayBackendAddressPool', - 'ApplicationGatewayBackendHealth', - 'ApplicationGatewayBackendHealthHttpSettings', - 'ApplicationGatewayBackendHealthPool', - 'ApplicationGatewayBackendHealthServer', - 'ApplicationGatewayBackendHttpSettings', - 'ApplicationGatewayConnectionDraining', - 'ApplicationGatewayFirewallDisabledRuleGroup', - 'ApplicationGatewayFirewallRule', - 'ApplicationGatewayFirewallRuleGroup', - 'ApplicationGatewayFirewallRuleSet', - 'ApplicationGatewayFrontendIPConfiguration', - 'ApplicationGatewayFrontendPort', - 'ApplicationGatewayHttpListener', - 'ApplicationGatewayIPConfiguration', - 'ApplicationGatewayListResult', - 'ApplicationGatewayPathRule', - 'ApplicationGatewayProbe', - 'ApplicationGatewayProbeHealthResponseMatch', - 'ApplicationGatewayRedirectConfiguration', - 'ApplicationGatewayRequestRoutingRule', - 'ApplicationGatewaySku', - 'ApplicationGatewaySslCertificate', - 'ApplicationGatewaySslPolicy', - 'ApplicationGatewaySslPredefinedPolicy', - 'ApplicationGatewayUrlPathMap', - 'ApplicationGatewayWebApplicationFirewallConfiguration', - 'AuthorizationListResult', - 'AzureAsyncOperationResult', - 'BGPCommunity', - 'BackendAddressPool', - 'BgpPeerStatus', - 'BgpPeerStatusListResult', - 'BgpServiceCommunity', - 'BgpServiceCommunityListResult', - 'BgpSettings', - 'ConnectionResetSharedKey', - 'ConnectionSharedKey', - 'ConnectivityDestination', - 'ConnectivityHop', - 'ConnectivityInformation', - 'ConnectivityIssue', - 'ConnectivityParameters', - 'ConnectivitySource', - 'DhcpOptions', - 'DnsNameAvailabilityResult', - 'EffectiveNetworkSecurityGroup', - 'EffectiveNetworkSecurityGroupAssociation', - 'EffectiveNetworkSecurityGroupListResult', - 'EffectiveNetworkSecurityRule', - 'EffectiveRoute', - 'EffectiveRouteListResult', - 'EndpointServiceResult', - 'EndpointServicesListResult', - 'Error', - 'ErrorDetails', - 'ExpressRouteCircuit', - 'ExpressRouteCircuitArpTable', - 'ExpressRouteCircuitAuthorization', - 'ExpressRouteCircuitListResult', - 'ExpressRouteCircuitPeering', - 'ExpressRouteCircuitPeeringConfig', - 'ExpressRouteCircuitPeeringListResult', - 'ExpressRouteCircuitRoutesTable', - 'ExpressRouteCircuitRoutesTableSummary', - 'ExpressRouteCircuitServiceProviderProperties', - 'ExpressRouteCircuitSku', - 'ExpressRouteCircuitStats', - 'ExpressRouteCircuitsArpTableListResult', - 'ExpressRouteCircuitsRoutesTableListResult', - 'ExpressRouteCircuitsRoutesTableSummaryListResult', - 'ExpressRouteServiceProvider', - 'ExpressRouteServiceProviderBandwidthsOffered', - 'ExpressRouteServiceProviderListResult', - 'FlowLogInformation', - 'FlowLogStatusParameters', - 'FrontendIPConfiguration', - 'GatewayRoute', - 'GatewayRouteListResult', - 'IPAddressAvailabilityResult', - 'IPConfiguration', - 'InboundNatPool', - 'InboundNatRule', - 'InboundNatRuleListResult', - 'IpsecPolicy', - 'Ipv6ExpressRouteCircuitPeeringConfig', - 'LoadBalancer', - 'LoadBalancerBackendAddressPoolListResult', - 'LoadBalancerFrontendIPConfigurationListResult', - 'LoadBalancerListResult', - 'LoadBalancerLoadBalancingRuleListResult', - 'LoadBalancerProbeListResult', - 'LoadBalancerSku', - 'LoadBalancingRule', - 'LocalNetworkGateway', - 'LocalNetworkGatewayListResult', - 'NetworkInterface', - 'NetworkInterfaceAssociation', - 'NetworkInterfaceDnsSettings', - 'NetworkInterfaceIPConfiguration', - 'NetworkInterfaceIPConfigurationListResult', - 'NetworkInterfaceListResult', - 'NetworkInterfaceLoadBalancerListResult', - 'NetworkSecurityGroup', - 'NetworkSecurityGroupListResult', - 'NetworkWatcher', - 'NetworkWatcherListResult', - 'NextHopParameters', - 'NextHopResult', - 'OutboundNatRule', - 'PacketCapture', - 'PacketCaptureFilter', - 'PacketCaptureListResult', - 'PacketCaptureParameters', - 'PacketCaptureQueryStatusResult', - 'PacketCaptureResult', - 'PacketCaptureResultProperties', - 'PacketCaptureStorageLocation', - 'PatchRouteFilter', - 'PatchRouteFilterRule', - 'Probe', - 'PublicIPAddress', - 'PublicIPAddressDnsSettings', - 'PublicIPAddressListResult', - 'PublicIPAddressSku', - 'QueryTroubleshootingParameters', - 'Resource', - 'ResourceNavigationLink', - 'RetentionPolicyParameters', - 'Route', - 'RouteFilter', - 'RouteFilterListResult', - 'RouteFilterRule', - 'RouteFilterRuleListResult', - 'RouteListResult', - 'RouteTable', - 'RouteTableListResult', - 'SecurityGroupNetworkInterface', - 'SecurityGroupViewParameters', - 'SecurityGroupViewResult', - 'SecurityRule', - 'SecurityRuleAssociations', - 'SecurityRuleListResult', - 'ServiceEndpointPropertiesFormat', - 'SubResource', - 'Subnet', - 'SubnetAssociation', - 'SubnetListResult', - 'Topology', - 'TopologyAssociation', - 'TopologyParameters', - 'TopologyResource', - 'TroubleshootingDetails', - 'TroubleshootingParameters', - 'TroubleshootingRecommendedActions', - 'TroubleshootingResult', - 'TunnelConnectionHealth', - 'Usage', - 'UsageName', - 'UsagesListResult', - 'VerificationIPFlowParameters', - 'VerificationIPFlowResult', - 'VirtualNetwork', - 'VirtualNetworkConnectionGatewayReference', - 'VirtualNetworkGateway', - 'VirtualNetworkGatewayConnection', - 'VirtualNetworkGatewayConnectionListEntity', - 'VirtualNetworkGatewayConnectionListResult', - 'VirtualNetworkGatewayIPConfiguration', - 'VirtualNetworkGatewayListConnectionsResult', - 'VirtualNetworkGatewayListResult', - 'VirtualNetworkGatewaySku', - 'VirtualNetworkListResult', - 'VirtualNetworkListUsageResult', - 'VirtualNetworkPeering', - 'VirtualNetworkPeeringListResult', - 'VirtualNetworkUsage', - 'VirtualNetworkUsageName', - 'VpnClientConfiguration', - 'VpnClientParameters', - 'VpnClientRevokedCertificate', - 'VpnClientRootCertificate', - 'Access', - 'ApplicationGatewayBackendHealthServerHealth', - 'ApplicationGatewayCookieBasedAffinity', - 'ApplicationGatewayFirewallMode', - 'ApplicationGatewayOperationalState', - 'ApplicationGatewayProtocol', - 'ApplicationGatewayRedirectType', - 'ApplicationGatewayRequestRoutingRuleType', - 'ApplicationGatewaySkuName', - 'ApplicationGatewaySslCipherSuite', - 'ApplicationGatewaySslPolicyName', - 'ApplicationGatewaySslPolicyType', - 'ApplicationGatewaySslProtocol', - 'ApplicationGatewayTier', - 'AssociationType', - 'AuthenticationMethod', - 'AuthorizationUseStatus', - 'BgpPeerState', - 'ConnectionStatus', - 'DhGroup', - 'Direction', - 'EffectiveRouteSource', - 'EffectiveRouteState', - 'EffectiveSecurityRuleProtocol', - 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixState', - 'ExpressRouteCircuitPeeringState', - 'ExpressRouteCircuitPeeringType', - 'ExpressRouteCircuitSkuFamily', - 'ExpressRouteCircuitSkuTier', - 'IPAllocationMethod', - 'IPVersion', - 'IkeEncryption', - 'IkeIntegrity', - 'IpsecEncryption', - 'IpsecIntegrity', - 'IssueType', - 'LoadBalancerSkuName', - 'LoadDistribution', - 'NetworkOperationStatus', - 'NextHopType', - 'Origin', - 'PcError', - 'PcProtocol', - 'PcStatus', - 'PfsGroup', - 'ProbeProtocol', - 'ProcessorArchitecture', - 'Protocol', - 'ProvisioningState', - 'PublicIPAddressSkuName', - 'RouteFilterRuleType', - 'RouteNextHopType', - 'SecurityRuleAccess', - 'SecurityRuleDirection', - 'SecurityRuleProtocol', - 'ServiceProviderProvisioningState', - 'Severity', - 'TransportProtocol', - 'UsageUnit', - 'VirtualNetworkGatewayConnectionStatus', - 'VirtualNetworkGatewayConnectionType', - 'VirtualNetworkGatewaySkuName', - 'VirtualNetworkGatewaySkuTier', - 'VirtualNetworkGatewayType', - 'VirtualNetworkPeeringState', - 'VpnClientProtocol', - 'VpnType', -] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_models.py deleted file mode 100644 index 29c83c05824f..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_models.py +++ /dev/null @@ -1,7796 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import msrest.serialization - - -class AddressSpace(msrest.serialization.Model): - """AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. - - :param address_prefixes: A list of address blocks reserved for this virtual network in CIDR - notation. - :type address_prefixes: list[str] - """ - - _attribute_map = { - 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressSpace, self).__init__(**kwargs) - self.address_prefixes = kwargs.get('address_prefixes', None) - - -class Resource(msrest.serialization.Model): - """Common resource representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ApplicationGateway(Resource): - """Application gateway resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param sku: SKU of the application gateway resource. - :type sku: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySku - :param ssl_policy: SSL policy of the application gateway resource. - :type ssl_policy: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPolicy - :ivar operational_state: Operational state of the application gateway resource. Possible values - include: "Stopped", "Starting", "Running", "Stopping". - :vartype operational_state: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayOperationalState - :param gateway_ip_configurations: Subnets of application the gateway resource. - :type gateway_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayIPConfiguration] - :param authentication_certificates: Authentication certificates of the application gateway - resource. - :type authentication_certificates: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayAuthenticationCertificate] - :param ssl_certificates: SSL certificates of the application gateway resource. - :type ssl_certificates: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslCertificate] - :param frontend_ip_configurations: Frontend IP addresses of the application gateway resource. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFrontendIPConfiguration] - :param frontend_ports: Frontend ports of the application gateway resource. - :type frontend_ports: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFrontendPort] - :param probes: Probes of the application gateway resource. - :type probes: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProbe] - :param backend_address_pools: Backend address pool of the application gateway resource. - :type backend_address_pools: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendAddressPool] - :param backend_http_settings_collection: Backend http settings of the application gateway - resource. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHttpSettings] - :param http_listeners: Http listeners of the application gateway resource. - :type http_listeners: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayHttpListener] - :param url_path_maps: URL path map of the application gateway resource. - :type url_path_maps: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayUrlPathMap] - :param request_routing_rules: Request routing rules of the application gateway resource. - :type request_routing_rules: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayRequestRoutingRule] - :param redirect_configurations: Redirect configurations of the application gateway resource. - :type redirect_configurations: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayRedirectConfiguration] - :param web_application_firewall_configuration: Web application firewall configuration. - :type web_application_firewall_configuration: - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayWebApplicationFirewallConfiguration - :param resource_guid: Resource GUID property of the application gateway resource. - :type resource_guid: str - :param provisioning_state: Provisioning state of the application gateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'operational_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'ApplicationGatewaySku'}, - 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, - 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, - 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, - 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, - 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, - 'probes': {'key': 'properties.probes', 'type': '[ApplicationGatewayProbe]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'backend_http_settings_collection': {'key': 'properties.backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHttpSettings]'}, - 'http_listeners': {'key': 'properties.httpListeners', 'type': '[ApplicationGatewayHttpListener]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[ApplicationGatewayUrlPathMap]'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[ApplicationGatewayRequestRoutingRule]'}, - 'redirect_configurations': {'key': 'properties.redirectConfigurations', 'type': '[ApplicationGatewayRedirectConfiguration]'}, - 'web_application_firewall_configuration': {'key': 'properties.webApplicationFirewallConfiguration', 'type': 'ApplicationGatewayWebApplicationFirewallConfiguration'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGateway, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.sku = kwargs.get('sku', None) - self.ssl_policy = kwargs.get('ssl_policy', None) - self.operational_state = None - self.gateway_ip_configurations = kwargs.get('gateway_ip_configurations', None) - self.authentication_certificates = kwargs.get('authentication_certificates', None) - self.ssl_certificates = kwargs.get('ssl_certificates', None) - self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) - self.frontend_ports = kwargs.get('frontend_ports', None) - self.probes = kwargs.get('probes', None) - self.backend_address_pools = kwargs.get('backend_address_pools', None) - self.backend_http_settings_collection = kwargs.get('backend_http_settings_collection', None) - self.http_listeners = kwargs.get('http_listeners', None) - self.url_path_maps = kwargs.get('url_path_maps', None) - self.request_routing_rules = kwargs.get('request_routing_rules', None) - self.redirect_configurations = kwargs.get('redirect_configurations', None) - self.web_application_firewall_configuration = kwargs.get('web_application_firewall_configuration', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class SubResource(msrest.serialization.Model): - """Reference to another subresource. - - :param id: Resource ID. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class ApplicationGatewayAuthenticationCertificate(SubResource): - """Authentication certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Certificate public data. - :type data: str - :param provisioning_state: Provisioning state of the authentication certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAuthenticationCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.data = kwargs.get('data', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayAvailableSslOptions(Resource): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param predefined_policies: List of available Ssl predefined policy. - :type predefined_policies: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param default_policy: Name of the Ssl predefined policy applied by default to application - gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", - "AppGwSslPolicy20170401S". - :type default_policy: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPolicyName - :param available_cipher_suites: List of available Ssl cipher suites. - :type available_cipher_suites: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslCipherSuite] - :param available_protocols: List of available Ssl protocols. - :type available_protocols: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslProtocol] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'predefined_policies': {'key': 'properties.predefinedPolicies', 'type': '[SubResource]'}, - 'default_policy': {'key': 'properties.defaultPolicy', 'type': 'str'}, - 'available_cipher_suites': {'key': 'properties.availableCipherSuites', 'type': '[str]'}, - 'available_protocols': {'key': 'properties.availableProtocols', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAvailableSslOptions, self).__init__(**kwargs) - self.predefined_policies = kwargs.get('predefined_policies', None) - self.default_policy = kwargs.get('default_policy', None) - self.available_cipher_suites = kwargs.get('available_cipher_suites', None) - self.available_protocols = kwargs.get('available_protocols', None) - - -class ApplicationGatewayAvailableSslPredefinedPolicies(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - :param value: List of available Ssl predefined policy. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPredefinedPolicy] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewaySslPredefinedPolicy]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAvailableSslPredefinedPolicies, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ApplicationGatewayAvailableWafRuleSetsResult(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableWafRuleSets API service call. - - :param value: The list of application gateway rule sets. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallRuleSet] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAvailableWafRuleSetsResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ApplicationGatewayBackendAddress(msrest.serialization.Model): - """Backend address of an application gateway. - - :param fqdn: Fully qualified domain name (FQDN). - :type fqdn: str - :param ip_address: IP address. - :type ip_address: str - """ - - _attribute_map = { - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendAddress, self).__init__(**kwargs) - self.fqdn = kwargs.get('fqdn', None) - self.ip_address = kwargs.get('ip_address', None) - - -class ApplicationGatewayBackendAddressPool(SubResource): - """Backend Address Pool of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Resource that is unique within a resource group. This name can be used to access - the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param backend_ip_configurations: Collection of references to IPs defined in network - interfaces. - :type backend_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration] - :param backend_addresses: Backend addresses. - :type backend_addresses: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendAddress] - :param provisioning_state: Provisioning state of the backend address pool resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'backend_addresses': {'key': 'properties.backendAddresses', 'type': '[ApplicationGatewayBackendAddress]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendAddressPool, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.backend_ip_configurations = kwargs.get('backend_ip_configurations', None) - self.backend_addresses = kwargs.get('backend_addresses', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayBackendHealth(msrest.serialization.Model): - """List of ApplicationGatewayBackendHealthPool resources. - - :param backend_address_pools: - :type backend_address_pools: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealthPool] - """ - - _attribute_map = { - 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealth, self).__init__(**kwargs) - self.backend_address_pools = kwargs.get('backend_address_pools', None) - - -class ApplicationGatewayBackendHealthHttpSettings(msrest.serialization.Model): - """Application gateway BackendHealthHttp settings. - - :param backend_http_settings: Reference of an ApplicationGatewayBackendHttpSettings resource. - :type backend_http_settings: - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHttpSettings - :param servers: List of ApplicationGatewayBackendHealthServer resources. - :type servers: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealthServer] - """ - - _attribute_map = { - 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'ApplicationGatewayBackendHttpSettings'}, - 'servers': {'key': 'servers', 'type': '[ApplicationGatewayBackendHealthServer]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealthHttpSettings, self).__init__(**kwargs) - self.backend_http_settings = kwargs.get('backend_http_settings', None) - self.servers = kwargs.get('servers', None) - - -class ApplicationGatewayBackendHealthPool(msrest.serialization.Model): - """Application gateway BackendHealth pool. - - :param backend_address_pool: Reference of an ApplicationGatewayBackendAddressPool resource. - :type backend_address_pool: - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendAddressPool - :param backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings - resources. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealthHttpSettings] - """ - - _attribute_map = { - 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, - 'backend_http_settings_collection': {'key': 'backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHealthHttpSettings]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealthPool, self).__init__(**kwargs) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.backend_http_settings_collection = kwargs.get('backend_http_settings_collection', None) - - -class ApplicationGatewayBackendHealthServer(msrest.serialization.Model): - """Application gateway backendhealth http settings. - - :param address: IP address or FQDN of backend server. - :type address: str - :param ip_configuration: Reference of IP configuration of backend server. - :type ip_configuration: ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration - :param health: Health of backend server. Possible values include: "Unknown", "Up", "Down", - "Partial", "Draining". - :type health: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealthServerHealth - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'health': {'key': 'health', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealthServer, self).__init__(**kwargs) - self.address = kwargs.get('address', None) - self.ip_configuration = kwargs.get('ip_configuration', None) - self.health = kwargs.get('health', None) - - -class ApplicationGatewayBackendHttpSettings(SubResource): - """Backend address pool settings of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Port. - :type port: int - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProtocol - :param cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", - "Disabled". - :type cookie_based_affinity: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayCookieBasedAffinity - :param request_timeout: Request timeout in seconds. Application Gateway will fail the request - if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 - seconds. - :type request_timeout: int - :param probe: Probe resource of an application gateway. - :type probe: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param authentication_certificates: Array of references to application gateway authentication - certificates. - :type authentication_certificates: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param connection_draining: Connection draining of the backend http settings resource. - :type connection_draining: - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayConnectionDraining - :param host_name: Host header to be sent to the backend servers. - :type host_name: str - :param pick_host_name_from_backend_address: Whether to pick host header should be picked from - the host name of the backend server. Default value is false. - :type pick_host_name_from_backend_address: bool - :param affinity_cookie_name: Cookie name to use for the affinity cookie. - :type affinity_cookie_name: str - :param probe_enabled: Whether the probe is enabled. Default value is false. - :type probe_enabled: bool - :param path: Path which should be used as a prefix for all HTTP requests. Null means no path - will be prefixed. Default value is null. - :type path: str - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'cookie_based_affinity': {'key': 'properties.cookieBasedAffinity', 'type': 'str'}, - 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, - 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, - 'affinity_cookie_name': {'key': 'properties.affinityCookieName', 'type': 'str'}, - 'probe_enabled': {'key': 'properties.probeEnabled', 'type': 'bool'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHttpSettings, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.port = kwargs.get('port', None) - self.protocol = kwargs.get('protocol', None) - self.cookie_based_affinity = kwargs.get('cookie_based_affinity', None) - self.request_timeout = kwargs.get('request_timeout', None) - self.probe = kwargs.get('probe', None) - self.authentication_certificates = kwargs.get('authentication_certificates', None) - self.connection_draining = kwargs.get('connection_draining', None) - self.host_name = kwargs.get('host_name', None) - self.pick_host_name_from_backend_address = kwargs.get('pick_host_name_from_backend_address', None) - self.affinity_cookie_name = kwargs.get('affinity_cookie_name', None) - self.probe_enabled = kwargs.get('probe_enabled', None) - self.path = kwargs.get('path', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayConnectionDraining(msrest.serialization.Model): - """Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether connection draining is enabled or not. - :type enabled: bool - :param drain_timeout_in_sec: Required. The number of seconds connection draining is active. - Acceptable values are from 1 second to 3600 seconds. - :type drain_timeout_in_sec: int - """ - - _validation = { - 'enabled': {'required': True}, - 'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayConnectionDraining, self).__init__(**kwargs) - self.enabled = kwargs['enabled'] - self.drain_timeout_in_sec = kwargs['drain_timeout_in_sec'] - - -class ApplicationGatewayFirewallDisabledRuleGroup(msrest.serialization.Model): - """Allows to disable rules within a rule group or an entire rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the rule group that will be disabled. - :type rule_group_name: str - :param rules: The list of rules that will be disabled. If null, all rules of the rule group - will be disabled. - :type rules: list[int] - """ - - _validation = { - 'rule_group_name': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[int]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallDisabledRuleGroup, self).__init__(**kwargs) - self.rule_group_name = kwargs['rule_group_name'] - self.rules = kwargs.get('rules', None) - - -class ApplicationGatewayFirewallRule(msrest.serialization.Model): - """A web application firewall rule. - - All required parameters must be populated in order to send to Azure. - - :param rule_id: Required. The identifier of the web application firewall rule. - :type rule_id: int - :param description: The description of the web application firewall rule. - :type description: str - """ - - _validation = { - 'rule_id': {'required': True}, - } - - _attribute_map = { - 'rule_id': {'key': 'ruleId', 'type': 'int'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallRule, self).__init__(**kwargs) - self.rule_id = kwargs['rule_id'] - self.description = kwargs.get('description', None) - - -class ApplicationGatewayFirewallRuleGroup(msrest.serialization.Model): - """A web application firewall rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the web application firewall rule group. - :type rule_group_name: str - :param description: The description of the web application firewall rule group. - :type description: str - :param rules: Required. The rules of the web application firewall rule group. - :type rules: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallRule] - """ - - _validation = { - 'rule_group_name': {'required': True}, - 'rules': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[ApplicationGatewayFirewallRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallRuleGroup, self).__init__(**kwargs) - self.rule_group_name = kwargs['rule_group_name'] - self.description = kwargs.get('description', None) - self.rules = kwargs['rules'] - - -class ApplicationGatewayFirewallRuleSet(Resource): - """A web application firewall rule set. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the web application firewall rule set. - :type provisioning_state: str - :param rule_set_type: The type of the web application firewall rule set. - :type rule_set_type: str - :param rule_set_version: The version of the web application firewall rule set type. - :type rule_set_version: str - :param rule_groups: The rule groups of the web application firewall rule set. - :type rule_groups: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallRuleGroup] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, - 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ApplicationGatewayFirewallRuleGroup]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallRuleSet, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.rule_set_type = kwargs.get('rule_set_type', None) - self.rule_set_version = kwargs.get('rule_set_version', None) - self.rule_groups = kwargs.get('rule_groups', None) - - -class ApplicationGatewayFrontendIPConfiguration(SubResource): - """Frontend IP configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param private_ip_address: PrivateIPAddress of the network interface IP Configuration. - :type private_ip_address: str - :param private_ip_allocation_method: PrivateIP allocation method. Possible values include: - "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param subnet: Reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param public_ip_address: Reference of the PublicIP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Provisioning state of the public IP resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFrontendIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayFrontendPort(SubResource): - """Frontend port of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Frontend port. - :type port: int - :param provisioning_state: Provisioning state of the frontend port resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFrontendPort, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.port = kwargs.get('port', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayHttpListener(SubResource): - """Http listener of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param frontend_ip_configuration: Frontend IP configuration resource of an application gateway. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param frontend_port: Frontend port resource of an application gateway. - :type frontend_port: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProtocol - :param host_name: Host name of HTTP listener. - :type host_name: str - :param ssl_certificate: SSL certificate resource of an application gateway. - :type ssl_certificate: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param require_server_name_indication: Applicable only if protocol is https. Enables SNI for - multi-hosting. - :type require_server_name_indication: bool - :param provisioning_state: Provisioning state of the HTTP listener resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, - 'require_server_name_indication': {'key': 'properties.requireServerNameIndication', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayHttpListener, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.protocol = kwargs.get('protocol', None) - self.host_name = kwargs.get('host_name', None) - self.ssl_certificate = kwargs.get('ssl_certificate', None) - self.require_server_name_indication = kwargs.get('require_server_name_indication', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayIPConfiguration(SubResource): - """IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param subnet: Reference of the subnet resource. A subnet from where application gateway gets - its private address. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Provisioning state of the application gateway subnet resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.subnet = kwargs.get('subnet', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayListResult(msrest.serialization.Model): - """Response for ListApplicationGateways API service call. - - :param value: List of an application gateways in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGateway] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ApplicationGatewayPathRule(SubResource): - """Path rule of URL path map of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param paths: Path rules of URL path map. - :type paths: list[str] - :param backend_address_pool: Backend address pool resource of URL path map path rule. - :type backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param backend_http_settings: Backend http settings resource of URL path map path rule. - :type backend_http_settings: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of URL path map path rule. - :type redirect_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Path rule of URL path map resource. Possible values are: 'Updating', - 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'paths': {'key': 'properties.paths', 'type': '[str]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayPathRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.paths = kwargs.get('paths', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.backend_http_settings = kwargs.get('backend_http_settings', None) - self.redirect_configuration = kwargs.get('redirect_configuration', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayProbe(SubResource): - """Probe of the application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProtocol - :param host: Host name to send the probe to. - :type host: str - :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. - :type path: str - :param interval: The probing interval in seconds. This is the time interval between two - consecutive probes. Acceptable values are from 1 second to 86400 seconds. - :type interval: int - :param timeout: the probe timeout in seconds. Probe marked as failed if valid response is not - received with this timeout period. Acceptable values are from 1 second to 86400 seconds. - :type timeout: int - :param unhealthy_threshold: The probe retry count. Backend server is marked down after - consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second - to 20. - :type unhealthy_threshold: int - :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from - the backend http settings. Default value is false. - :type pick_host_name_from_backend_http_settings: bool - :param min_servers: Minimum number of servers that are always marked healthy. Default value is - 0. - :type min_servers: int - :param match: Criterion for classifying a healthy probe response. - :type match: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProbeHealthResponseMatch - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host': {'key': 'properties.host', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'timeout': {'key': 'properties.timeout', 'type': 'int'}, - 'unhealthy_threshold': {'key': 'properties.unhealthyThreshold', 'type': 'int'}, - 'pick_host_name_from_backend_http_settings': {'key': 'properties.pickHostNameFromBackendHttpSettings', 'type': 'bool'}, - 'min_servers': {'key': 'properties.minServers', 'type': 'int'}, - 'match': {'key': 'properties.match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayProbe, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.protocol = kwargs.get('protocol', None) - self.host = kwargs.get('host', None) - self.path = kwargs.get('path', None) - self.interval = kwargs.get('interval', None) - self.timeout = kwargs.get('timeout', None) - self.unhealthy_threshold = kwargs.get('unhealthy_threshold', None) - self.pick_host_name_from_backend_http_settings = kwargs.get('pick_host_name_from_backend_http_settings', None) - self.min_servers = kwargs.get('min_servers', None) - self.match = kwargs.get('match', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayProbeHealthResponseMatch(msrest.serialization.Model): - """Application gateway probe health response match. - - :param body: Body that must be contained in the health response. Default value is empty. - :type body: str - :param status_codes: Allowed ranges of healthy status codes. Default range of healthy status - codes is 200-399. - :type status_codes: list[str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'status_codes': {'key': 'statusCodes', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayProbeHealthResponseMatch, self).__init__(**kwargs) - self.body = kwargs.get('body', None) - self.status_codes = kwargs.get('status_codes', None) - - -class ApplicationGatewayRedirectConfiguration(SubResource): - """Redirect configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param redirect_type: Supported http redirection types - Permanent, Temporary, Found, SeeOther. - Possible values include: "Permanent", "Found", "SeeOther", "Temporary". - :type redirect_type: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayRedirectType - :param target_listener: Reference to a listener to redirect the request to. - :type target_listener: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param target_url: Url to redirect the request to. - :type target_url: str - :param include_path: Include path in the redirected url. - :type include_path: bool - :param include_query_string: Include query string in the redirected url. - :type include_query_string: bool - :param request_routing_rules: Request routing specifying redirect configuration. - :type request_routing_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param url_path_maps: Url path maps specifying default redirect configuration. - :type url_path_maps: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param path_rules: Path rules specifying redirect configuration. - :type path_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'redirect_type': {'key': 'properties.redirectType', 'type': 'str'}, - 'target_listener': {'key': 'properties.targetListener', 'type': 'SubResource'}, - 'target_url': {'key': 'properties.targetUrl', 'type': 'str'}, - 'include_path': {'key': 'properties.includePath', 'type': 'bool'}, - 'include_query_string': {'key': 'properties.includeQueryString', 'type': 'bool'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[SubResource]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[SubResource]'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[SubResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayRedirectConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.redirect_type = kwargs.get('redirect_type', None) - self.target_listener = kwargs.get('target_listener', None) - self.target_url = kwargs.get('target_url', None) - self.include_path = kwargs.get('include_path', None) - self.include_query_string = kwargs.get('include_query_string', None) - self.request_routing_rules = kwargs.get('request_routing_rules', None) - self.url_path_maps = kwargs.get('url_path_maps', None) - self.path_rules = kwargs.get('path_rules', None) - - -class ApplicationGatewayRequestRoutingRule(SubResource): - """Request routing rule of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". - :type rule_type: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayRequestRoutingRuleType - :param backend_address_pool: Backend address pool resource of the application gateway. - :type backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param backend_http_settings: Frontend port resource of the application gateway. - :type backend_http_settings: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param http_listener: Http listener resource of the application gateway. - :type http_listener: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param url_path_map: URL path map resource of the application gateway. - :type url_path_map: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of the application gateway. - :type redirect_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Provisioning state of the request routing rule resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'http_listener': {'key': 'properties.httpListener', 'type': 'SubResource'}, - 'url_path_map': {'key': 'properties.urlPathMap', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayRequestRoutingRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.rule_type = kwargs.get('rule_type', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.backend_http_settings = kwargs.get('backend_http_settings', None) - self.http_listener = kwargs.get('http_listener', None) - self.url_path_map = kwargs.get('url_path_map', None) - self.redirect_configuration = kwargs.get('redirect_configuration', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewaySku(msrest.serialization.Model): - """SKU of an application gateway. - - :param name: Name of an application gateway SKU. Possible values include: "Standard_Small", - "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large". - :type name: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySkuName - :param tier: Tier of an application gateway. Possible values include: "Standard", "WAF". - :type tier: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayTier - :param capacity: Capacity (instance count) of an application gateway. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - - -class ApplicationGatewaySslCertificate(SubResource): - """SSL certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Base-64 encoded pfx certificate. Only applicable in PUT Request. - :type data: str - :param password: Password for the pfx file specified in data. Only applicable in PUT request. - :type password: str - :param public_cert_data: Base-64 encoded Public cert data corresponding to pfx specified in - data. Only applicable in GET request. - :type public_cert_data: str - :param provisioning_state: Provisioning state of the SSL certificate resource Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySslCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.data = kwargs.get('data', None) - self.password = kwargs.get('password', None) - self.public_cert_data = kwargs.get('public_cert_data', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewaySslPolicy(msrest.serialization.Model): - """Application Gateway Ssl policy. - - :param disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. - :type disabled_ssl_protocols: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslProtocol] - :param policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". - :type policy_type: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPolicyType - :param policy_name: Name of Ssl predefined policy. Possible values include: - "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". - :type policy_name: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPolicyName - :param cipher_suites: Ssl cipher suites to be enabled in the specified order to application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'cipher_suites': {'key': 'cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySslPolicy, self).__init__(**kwargs) - self.disabled_ssl_protocols = kwargs.get('disabled_ssl_protocols', None) - self.policy_type = kwargs.get('policy_type', None) - self.policy_name = kwargs.get('policy_name', None) - self.cipher_suites = kwargs.get('cipher_suites', None) - self.min_protocol_version = kwargs.get('min_protocol_version', None) - - -class ApplicationGatewaySslPredefinedPolicy(SubResource): - """An Ssl predefined policy. - - :param id: Resource ID. - :type id: str - :param name: Name of Ssl predefined policy. - :type name: str - :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySslPredefinedPolicy, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.cipher_suites = kwargs.get('cipher_suites', None) - self.min_protocol_version = kwargs.get('min_protocol_version', None) - - -class ApplicationGatewayUrlPathMap(SubResource): - """UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param default_backend_address_pool: Default backend address pool resource of URL path map. - :type default_backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param default_backend_http_settings: Default backend http settings resource of URL path map. - :type default_backend_http_settings: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param default_redirect_configuration: Default redirect configuration resource of URL path map. - :type default_redirect_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param path_rules: Path rule of URL path map resource. - :type path_rules: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayPathRule] - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_backend_address_pool': {'key': 'properties.defaultBackendAddressPool', 'type': 'SubResource'}, - 'default_backend_http_settings': {'key': 'properties.defaultBackendHttpSettings', 'type': 'SubResource'}, - 'default_redirect_configuration': {'key': 'properties.defaultRedirectConfiguration', 'type': 'SubResource'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[ApplicationGatewayPathRule]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayUrlPathMap, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.default_backend_address_pool = kwargs.get('default_backend_address_pool', None) - self.default_backend_http_settings = kwargs.get('default_backend_http_settings', None) - self.default_redirect_configuration = kwargs.get('default_redirect_configuration', None) - self.path_rules = kwargs.get('path_rules', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayWebApplicationFirewallConfiguration(msrest.serialization.Model): - """Application gateway web application firewall configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the web application firewall is enabled or not. - :type enabled: bool - :param firewall_mode: Required. Web application firewall mode. Possible values include: - "Detection", "Prevention". - :type firewall_mode: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallMode - :param rule_set_type: Required. The type of the web application firewall rule set. Possible - values are: 'OWASP'. - :type rule_set_type: str - :param rule_set_version: Required. The version of the rule set type. - :type rule_set_version: str - :param disabled_rule_groups: The disabled rule groups. - :type disabled_rule_groups: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallDisabledRuleGroup] - """ - - _validation = { - 'enabled': {'required': True}, - 'firewall_mode': {'required': True}, - 'rule_set_type': {'required': True}, - 'rule_set_version': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, - 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, - 'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs) - self.enabled = kwargs['enabled'] - self.firewall_mode = kwargs['firewall_mode'] - self.rule_set_type = kwargs['rule_set_type'] - self.rule_set_version = kwargs['rule_set_version'] - self.disabled_rule_groups = kwargs.get('disabled_rule_groups', None) - - -class AuthorizationListResult(msrest.serialization.Model): - """Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. - - :param value: The authorizations in an ExpressRoute Circuit. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AuthorizationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class AzureAsyncOperationResult(msrest.serialization.Model): - """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. - - :param status: Status of the Azure async operation. Possible values are: 'InProgress', - 'Succeeded', and 'Failed'. Possible values include: "InProgress", "Succeeded", "Failed". - :type status: str or ~azure.mgmt.network.v2017_08_01.models.NetworkOperationStatus - :param error: - :type error: ~azure.mgmt.network.v2017_08_01.models.Error - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'Error'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureAsyncOperationResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.error = kwargs.get('error', None) - - -class BackendAddressPool(SubResource): - """Pool of backend IP addresses. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar backend_ip_configurations: Gets collection of references to IP addresses defined in - network interfaces. - :vartype backend_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration] - :ivar load_balancing_rules: Gets load balancing rules that use this backend address pool. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :ivar outbound_nat_rule: Gets outbound rules that use this backend address pool. - :vartype outbound_nat_rule: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Get provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configurations': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - 'outbound_nat_rule': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'outbound_nat_rule': {'key': 'properties.outboundNatRule', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BackendAddressPool, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.backend_ip_configurations = None - self.load_balancing_rules = None - self.outbound_nat_rule = None - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class BGPCommunity(msrest.serialization.Model): - """Contains bgp community information offered in Service Community resources. - - :param service_supported_region: The region which the service support. e.g. For O365, region is - Global. - :type service_supported_region: str - :param community_name: The name of the bgp community. e.g. Skype. - :type community_name: str - :param community_value: The value of the bgp community. For more information: - https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - :type community_value: str - :param community_prefixes: The prefixes that the bgp community contains. - :type community_prefixes: list[str] - :param is_authorized_to_use: Customer is authorized to use bgp community or not. - :type is_authorized_to_use: bool - :param service_group: The service group of the bgp community contains. - :type service_group: str - """ - - _attribute_map = { - 'service_supported_region': {'key': 'serviceSupportedRegion', 'type': 'str'}, - 'community_name': {'key': 'communityName', 'type': 'str'}, - 'community_value': {'key': 'communityValue', 'type': 'str'}, - 'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'}, - 'is_authorized_to_use': {'key': 'isAuthorizedToUse', 'type': 'bool'}, - 'service_group': {'key': 'serviceGroup', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BGPCommunity, self).__init__(**kwargs) - self.service_supported_region = kwargs.get('service_supported_region', None) - self.community_name = kwargs.get('community_name', None) - self.community_value = kwargs.get('community_value', None) - self.community_prefixes = kwargs.get('community_prefixes', None) - self.is_authorized_to_use = kwargs.get('is_authorized_to_use', None) - self.service_group = kwargs.get('service_group', None) - - -class BgpPeerStatus(msrest.serialization.Model): - """BGP peer status details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The virtual network gateway's local address. - :vartype local_address: str - :ivar neighbor: The remote BGP peer. - :vartype neighbor: str - :ivar asn: The autonomous system number of the remote BGP peer. - :vartype asn: int - :ivar state: The BGP peer state. Possible values include: "Unknown", "Stopped", "Idle", - "Connecting", "Connected". - :vartype state: str or ~azure.mgmt.network.v2017_08_01.models.BgpPeerState - :ivar connected_duration: For how long the peering has been up. - :vartype connected_duration: str - :ivar routes_received: The number of routes learned from this peer. - :vartype routes_received: long - :ivar messages_sent: The number of BGP messages sent. - :vartype messages_sent: long - :ivar messages_received: The number of BGP messages received. - :vartype messages_received: long - """ - - _validation = { - 'local_address': {'readonly': True}, - 'neighbor': {'readonly': True}, - 'asn': {'readonly': True}, - 'state': {'readonly': True}, - 'connected_duration': {'readonly': True}, - 'routes_received': {'readonly': True}, - 'messages_sent': {'readonly': True}, - 'messages_received': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'asn': {'key': 'asn', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'str'}, - 'connected_duration': {'key': 'connectedDuration', 'type': 'str'}, - 'routes_received': {'key': 'routesReceived', 'type': 'long'}, - 'messages_sent': {'key': 'messagesSent', 'type': 'long'}, - 'messages_received': {'key': 'messagesReceived', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpPeerStatus, self).__init__(**kwargs) - self.local_address = None - self.neighbor = None - self.asn = None - self.state = None - self.connected_duration = None - self.routes_received = None - self.messages_sent = None - self.messages_received = None - - -class BgpPeerStatusListResult(msrest.serialization.Model): - """Response for list BGP peer status API service call. - - :param value: List of BGP peers. - :type value: list[~azure.mgmt.network.v2017_08_01.models.BgpPeerStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpPeerStatusListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class BgpServiceCommunity(Resource): - """Service Community Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param service_name: The name of the bgp community. e.g. Skype. - :type service_name: str - :param bgp_communities: Get a list of bgp communities. - :type bgp_communities: list[~azure.mgmt.network.v2017_08_01.models.BGPCommunity] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, - 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': '[BGPCommunity]'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpServiceCommunity, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.bgp_communities = kwargs.get('bgp_communities', None) - - -class BgpServiceCommunityListResult(msrest.serialization.Model): - """Response for the ListServiceCommunity API service call. - - :param value: A list of service community resources. - :type value: list[~azure.mgmt.network.v2017_08_01.models.BgpServiceCommunity] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpServiceCommunityListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class BgpSettings(msrest.serialization.Model): - """BGP settings details. - - :param asn: The BGP speaker's ASN. - :type asn: long - :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. - :type bgp_peering_address: str - :param peer_weight: The weight added to routes learned from this BGP speaker. - :type peer_weight: int - """ - - _attribute_map = { - 'asn': {'key': 'asn', 'type': 'long'}, - 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, - 'peer_weight': {'key': 'peerWeight', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpSettings, self).__init__(**kwargs) - self.asn = kwargs.get('asn', None) - self.bgp_peering_address = kwargs.get('bgp_peering_address', None) - self.peer_weight = kwargs.get('peer_weight', None) - - -class ConnectionResetSharedKey(msrest.serialization.Model): - """The virtual network connection reset shared key. - - All required parameters must be populated in order to send to Azure. - - :param key_length: Required. The virtual network connection reset shared key length, should - between 1 and 128. - :type key_length: int - """ - - _validation = { - 'key_length': {'required': True, 'maximum': 128, 'minimum': 1}, - } - - _attribute_map = { - 'key_length': {'key': 'keyLength', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionResetSharedKey, self).__init__(**kwargs) - self.key_length = kwargs['key_length'] - - -class ConnectionSharedKey(msrest.serialization.Model): - """Response for GetConnectionSharedKey API service call. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. The virtual network connection shared key value. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionSharedKey, self).__init__(**kwargs) - self.value = kwargs['value'] - - -class ConnectivityDestination(msrest.serialization.Model): - """Parameters that define destination of connection. - - :param resource_id: The ID of the resource to which a connection attempt will be made. - :type resource_id: str - :param address: The IP address or URI the resource to which a connection attempt will be made. - :type address: str - :param port: Port on which check connectivity will be performed. - :type port: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityDestination, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.address = kwargs.get('address', None) - self.port = kwargs.get('port', None) - - -class ConnectivityHop(msrest.serialization.Model): - """Information about a hop between the source and the destination. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the hop. - :vartype type: str - :ivar id: The ID of the hop. - :vartype id: str - :ivar address: The IP address of the hop. - :vartype address: str - :ivar resource_id: The ID of the resource corresponding to this hop. - :vartype resource_id: str - :ivar next_hop_ids: List of next hop identifiers. - :vartype next_hop_ids: list[str] - :ivar issues: List of issues. - :vartype issues: list[~azure.mgmt.network.v2017_08_01.models.ConnectivityIssue] - """ - - _validation = { - 'type': {'readonly': True}, - 'id': {'readonly': True}, - 'address': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'next_hop_ids': {'readonly': True}, - 'issues': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, - 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityHop, self).__init__(**kwargs) - self.type = None - self.id = None - self.address = None - self.resource_id = None - self.next_hop_ids = None - self.issues = None - - -class ConnectivityInformation(msrest.serialization.Model): - """Information on the connectivity status. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hops: List of hops between the source and the destination. - :vartype hops: list[~azure.mgmt.network.v2017_08_01.models.ConnectivityHop] - :ivar connection_status: The connection status. Possible values include: "Unknown", - "Connected", "Disconnected", "Degraded". - :vartype connection_status: str or ~azure.mgmt.network.v2017_08_01.models.ConnectionStatus - :ivar avg_latency_in_ms: Average latency in milliseconds. - :vartype avg_latency_in_ms: int - :ivar min_latency_in_ms: Minimum latency in milliseconds. - :vartype min_latency_in_ms: int - :ivar max_latency_in_ms: Maximum latency in milliseconds. - :vartype max_latency_in_ms: int - :ivar probes_sent: Total number of probes sent. - :vartype probes_sent: int - :ivar probes_failed: Number of failed probes. - :vartype probes_failed: int - """ - - _validation = { - 'hops': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'avg_latency_in_ms': {'readonly': True}, - 'min_latency_in_ms': {'readonly': True}, - 'max_latency_in_ms': {'readonly': True}, - 'probes_sent': {'readonly': True}, - 'probes_failed': {'readonly': True}, - } - - _attribute_map = { - 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'int'}, - 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'int'}, - 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'int'}, - 'probes_sent': {'key': 'probesSent', 'type': 'int'}, - 'probes_failed': {'key': 'probesFailed', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityInformation, self).__init__(**kwargs) - self.hops = None - self.connection_status = None - self.avg_latency_in_ms = None - self.min_latency_in_ms = None - self.max_latency_in_ms = None - self.probes_sent = None - self.probes_failed = None - - -class ConnectivityIssue(msrest.serialization.Model): - """Information about an issue encountered in the process of checking for connectivity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". - :vartype origin: str or ~azure.mgmt.network.v2017_08_01.models.Origin - :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". - :vartype severity: str or ~azure.mgmt.network.v2017_08_01.models.Severity - :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", - "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", - "PortThrottled", "Platform". - :vartype type: str or ~azure.mgmt.network.v2017_08_01.models.IssueType - :ivar context: Provides additional context on the issue. - :vartype context: list[dict[str, str]] - """ - - _validation = { - 'origin': {'readonly': True}, - 'severity': {'readonly': True}, - 'type': {'readonly': True}, - 'context': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'context': {'key': 'context', 'type': '[{str}]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityIssue, self).__init__(**kwargs) - self.origin = None - self.severity = None - self.type = None - self.context = None - - -class ConnectivityParameters(msrest.serialization.Model): - """Parameters that determine how the connectivity check will be performed. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Parameters that define the source of the connection. - :type source: ~azure.mgmt.network.v2017_08_01.models.ConnectivitySource - :param destination: Required. Parameters that define destination of connection. - :type destination: ~azure.mgmt.network.v2017_08_01.models.ConnectivityDestination - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectivitySource'}, - 'destination': {'key': 'destination', 'type': 'ConnectivityDestination'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityParameters, self).__init__(**kwargs) - self.source = kwargs['source'] - self.destination = kwargs['destination'] - - -class ConnectivitySource(msrest.serialization.Model): - """Parameters that define the source of the connection. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The ID of the resource from which a connectivity check will be - initiated. - :type resource_id: str - :param port: The source port from which a connectivity check will be performed. - :type port: int - """ - - _validation = { - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivitySource, self).__init__(**kwargs) - self.resource_id = kwargs['resource_id'] - self.port = kwargs.get('port', None) - - -class DhcpOptions(msrest.serialization.Model): - """DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. - - :param dns_servers: The list of DNS servers IP addresses. - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(DhcpOptions, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) - - -class DnsNameAvailabilityResult(msrest.serialization.Model): - """Response for the CheckDnsNameAvailability API service call. - - :param available: Domain availability (True/False). - :type available: bool - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(DnsNameAvailabilityResult, self).__init__(**kwargs) - self.available = kwargs.get('available', None) - - -class EffectiveNetworkSecurityGroup(msrest.serialization.Model): - """Effective network security group. - - :param network_security_group: The ID of network security group that is applied. - :type network_security_group: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param association: Associated resources. - :type association: - ~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityGroupAssociation - :param effective_security_rules: A collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityRule] - :param tag_map: Mapping of tags to list of IP Addresses included within the tag. - :type tag_map: str - """ - - _attribute_map = { - 'network_security_group': {'key': 'networkSecurityGroup', 'type': 'SubResource'}, - 'association': {'key': 'association', 'type': 'EffectiveNetworkSecurityGroupAssociation'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - 'tag_map': {'key': 'tagMap', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityGroup, self).__init__(**kwargs) - self.network_security_group = kwargs.get('network_security_group', None) - self.association = kwargs.get('association', None) - self.effective_security_rules = kwargs.get('effective_security_rules', None) - self.tag_map = kwargs.get('tag_map', None) - - -class EffectiveNetworkSecurityGroupAssociation(msrest.serialization.Model): - """The effective network security group association. - - :param subnet: The ID of the subnet if assigned. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param network_interface: The ID of the network interface if assigned. - :type network_interface: ~azure.mgmt.network.v2017_08_01.models.SubResource - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'SubResource'}, - 'network_interface': {'key': 'networkInterface', 'type': 'SubResource'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityGroupAssociation, self).__init__(**kwargs) - self.subnet = kwargs.get('subnet', None) - self.network_interface = kwargs.get('network_interface', None) - - -class EffectiveNetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for list effective network security groups API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective network security groups. - :type value: list[~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class EffectiveNetworkSecurityRule(msrest.serialization.Model): - """Effective network security rules. - - :param name: The name of the security rule specified by the user (if created by the user). - :type name: str - :param protocol: The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', - and 'All'. Possible values include: "Tcp", "Udp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.EffectiveSecurityRuleProtocol - :param source_port_range: The source port or range. - :type source_port_range: str - :param destination_port_range: The destination port or range. - :type destination_port_range: str - :param source_port_ranges: The source port ranges. Expected values include a single integer - between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. Expected values include a single - integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type destination_port_ranges: list[str] - :param source_address_prefix: The source address prefix. - :type source_address_prefix: str - :param destination_address_prefix: The destination address prefix. - :type destination_address_prefix: str - :param source_address_prefixes: The source address prefixes. Expected values include CIDR IP - ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the - asterisk (*). - :type source_address_prefixes: list[str] - :param destination_address_prefixes: The destination address prefixes. Expected values include - CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and - the asterisk (*). - :type destination_address_prefixes: list[str] - :param expanded_source_address_prefix: The expanded source address prefix. - :type expanded_source_address_prefix: list[str] - :param expanded_destination_address_prefix: Expanded destination address prefix. - :type expanded_destination_address_prefix: list[str] - :param access: Whether network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleAccess - :param priority: The priority of the rule. - :type priority: int - :param direction: The direction of the rule. Possible values are: 'Inbound and Outbound'. - Possible values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleDirection - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, - 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[str]'}, - 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, - 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'sourceAddressPrefixes', 'type': '[str]'}, - 'destination_address_prefixes': {'key': 'destinationAddressPrefixes', 'type': '[str]'}, - 'expanded_source_address_prefix': {'key': 'expandedSourceAddressPrefix', 'type': '[str]'}, - 'expanded_destination_address_prefix': {'key': 'expandedDestinationAddressPrefix', 'type': '[str]'}, - 'access': {'key': 'access', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'direction': {'key': 'direction', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.protocol = kwargs.get('protocol', None) - self.source_port_range = kwargs.get('source_port_range', None) - self.destination_port_range = kwargs.get('destination_port_range', None) - self.source_port_ranges = kwargs.get('source_port_ranges', None) - self.destination_port_ranges = kwargs.get('destination_port_ranges', None) - self.source_address_prefix = kwargs.get('source_address_prefix', None) - self.destination_address_prefix = kwargs.get('destination_address_prefix', None) - self.source_address_prefixes = kwargs.get('source_address_prefixes', None) - self.destination_address_prefixes = kwargs.get('destination_address_prefixes', None) - self.expanded_source_address_prefix = kwargs.get('expanded_source_address_prefix', None) - self.expanded_destination_address_prefix = kwargs.get('expanded_destination_address_prefix', None) - self.access = kwargs.get('access', None) - self.priority = kwargs.get('priority', None) - self.direction = kwargs.get('direction', None) - - -class EffectiveRoute(msrest.serialization.Model): - """Effective Route. - - :param name: The name of the user defined route. This is optional. - :type name: str - :param source: Who created the route. Possible values are: 'Unknown', 'User', - 'VirtualNetworkGateway', and 'Default'. Possible values include: "Unknown", "User", - "VirtualNetworkGateway", "Default". - :type source: str or ~azure.mgmt.network.v2017_08_01.models.EffectiveRouteSource - :param state: The value of effective route. Possible values are: 'Active' and 'Invalid'. - Possible values include: "Active", "Invalid". - :type state: str or ~azure.mgmt.network.v2017_08_01.models.EffectiveRouteState - :param address_prefix: The address prefixes of the effective routes in CIDR notation. - :type address_prefix: list[str] - :param next_hop_ip_address: The IP address of the next hop of the effective route. - :type next_hop_ip_address: list[str] - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_08_01.models.RouteNextHopType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address_prefix': {'key': 'addressPrefix', 'type': '[str]'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': '[str]'}, - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveRoute, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.source = kwargs.get('source', None) - self.state = kwargs.get('state', None) - self.address_prefix = kwargs.get('address_prefix', None) - self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) - self.next_hop_type = kwargs.get('next_hop_type', None) - - -class EffectiveRouteListResult(msrest.serialization.Model): - """Response for list effective route API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective routes. - :type value: list[~azure.mgmt.network.v2017_08_01.models.EffectiveRoute] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveRoute]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveRouteListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class EndpointServiceResult(SubResource): - """Endpoint service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Name of the endpoint service. - :vartype name: str - :ivar type: Type of the endpoint service. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EndpointServiceResult, self).__init__(**kwargs) - self.name = None - self.type = None - - -class EndpointServicesListResult(msrest.serialization.Model): - """Response for the ListAvailableEndpointServices API service call. - - :param value: List of available endpoint services in a region. - :type value: list[~azure.mgmt.network.v2017_08_01.models.EndpointServiceResult] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EndpointServiceResult]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EndpointServicesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class Error(msrest.serialization.Model): - """Error. - - :param code: - :type code: str - :param message: - :type message: str - :param target: - :type target: str - :param details: - :type details: list[~azure.mgmt.network.v2017_08_01.models.ErrorDetails] - :param inner_error: - :type inner_error: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'inner_error': {'key': 'innerError', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Error, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - self.inner_error = kwargs.get('inner_error', None) - - -class ErrorDetails(msrest.serialization.Model): - """ErrorDetails. - - :param code: - :type code: str - :param target: - :type target: str - :param message: - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) - - -class ExpressRouteCircuit(Resource): - """ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The SKU. - :type sku: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitSku - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param allow_classic_operations: Allow classic operations. - :type allow_classic_operations: bool - :param circuit_provisioning_state: The CircuitProvisioningState state of the resource. - :type circuit_provisioning_state: str - :param service_provider_provisioning_state: The ServiceProviderProvisioningState state of the - resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and - 'Deprovisioning'. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", - "Deprovisioning". - :type service_provider_provisioning_state: str or - ~azure.mgmt.network.v2017_08_01.models.ServiceProviderProvisioningState - :param authorizations: The list of authorizations. - :type authorizations: - list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization] - :param peerings: The list of peerings. - :type peerings: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] - :param service_key: The ServiceKey. - :type service_key: str - :param service_provider_notes: The ServiceProviderNotes. - :type service_provider_notes: str - :param service_provider_properties: The ServiceProviderProperties. - :type service_provider_properties: - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitServiceProviderProperties - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ExpressRouteCircuitSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_classic_operations': {'key': 'properties.allowClassicOperations', 'type': 'bool'}, - 'circuit_provisioning_state': {'key': 'properties.circuitProvisioningState', 'type': 'str'}, - 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, - 'authorizations': {'key': 'properties.authorizations', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, - 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, - 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuit, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.etag = None - self.allow_classic_operations = kwargs.get('allow_classic_operations', None) - self.circuit_provisioning_state = kwargs.get('circuit_provisioning_state', None) - self.service_provider_provisioning_state = kwargs.get('service_provider_provisioning_state', None) - self.authorizations = kwargs.get('authorizations', None) - self.peerings = kwargs.get('peerings', None) - self.service_key = kwargs.get('service_key', None) - self.service_provider_notes = kwargs.get('service_provider_notes', None) - self.service_provider_properties = kwargs.get('service_provider_properties', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) - - -class ExpressRouteCircuitArpTable(msrest.serialization.Model): - """The ARP table associated with the ExpressRouteCircuit. - - :param age: Age. - :type age: int - :param interface: Interface. - :type interface: str - :param ip_address: The IP address. - :type ip_address: str - :param mac_address: The MAC address. - :type mac_address: str - """ - - _attribute_map = { - 'age': {'key': 'age', 'type': 'int'}, - 'interface': {'key': 'interface', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'mac_address': {'key': 'macAddress', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitArpTable, self).__init__(**kwargs) - self.age = kwargs.get('age', None) - self.interface = kwargs.get('interface', None) - self.ip_address = kwargs.get('ip_address', None) - self.mac_address = kwargs.get('mac_address', None) - - -class ExpressRouteCircuitAuthorization(SubResource): - """Authorization in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param authorization_key: The authorization key. - :type authorization_key: str - :param authorization_use_status: AuthorizationUseStatus. Possible values are: 'Available' and - 'InUse'. Possible values include: "Available", "InUse". - :type authorization_use_status: str or - ~azure.mgmt.network.v2017_08_01.models.AuthorizationUseStatus - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitAuthorization, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = None - self.authorization_key = kwargs.get('authorization_key', None) - self.authorization_use_status = kwargs.get('authorization_use_status', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ExpressRouteCircuitListResult(msrest.serialization.Model): - """Response for ListExpressRouteCircuit API service call. - - :param value: A list of ExpressRouteCircuits in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuit] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuit]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitPeering(SubResource): - """Peering in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param peering_type: The PeeringType. Possible values are: 'AzurePublicPeering', - 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: "AzurePublicPeering", - "AzurePrivatePeering", "MicrosoftPeering". - :type peering_type: str or - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringType - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringState - :param azure_asn: The Azure ASN. - :type azure_asn: int - :param peer_asn: The peer ASN. - :type peer_asn: int - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param primary_azure_port: The primary port. - :type primary_azure_port: str - :param secondary_azure_port: The secondary port. - :type secondary_azure_port: str - :param shared_key: The shared key. - :type shared_key: str - :param vlan_id: The VLAN ID. - :type vlan_id: int - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringConfig - :param stats: Gets peering stats. - :type stats: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitStats - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - :param last_modified_by: Gets whether the provider or the customer last modified the peering. - :type last_modified_by: str - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_08_01.models.RouteFilter - :param ipv6_peering_config: The IPv6 peering configuration. - :type ipv6_peering_config: - ~azure.mgmt.network.v2017_08_01.models.Ipv6ExpressRouteCircuitPeeringConfig - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, - 'peer_asn': {'key': 'properties.peerASN', 'type': 'int'}, - 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, - 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, - 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, - 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'stats': {'key': 'properties.stats', 'type': 'ExpressRouteCircuitStats'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'route_filter': {'key': 'properties.routeFilter', 'type': 'RouteFilter'}, - 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitPeering, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = None - self.peering_type = kwargs.get('peering_type', None) - self.state = kwargs.get('state', None) - self.azure_asn = kwargs.get('azure_asn', None) - self.peer_asn = kwargs.get('peer_asn', None) - self.primary_peer_address_prefix = kwargs.get('primary_peer_address_prefix', None) - self.secondary_peer_address_prefix = kwargs.get('secondary_peer_address_prefix', None) - self.primary_azure_port = kwargs.get('primary_azure_port', None) - self.secondary_azure_port = kwargs.get('secondary_azure_port', None) - self.shared_key = kwargs.get('shared_key', None) - self.vlan_id = kwargs.get('vlan_id', None) - self.microsoft_peering_config = kwargs.get('microsoft_peering_config', None) - self.stats = kwargs.get('stats', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.route_filter = kwargs.get('route_filter', None) - self.ipv6_peering_config = kwargs.get('ipv6_peering_config', None) - - -class ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Specifies the peering configuration. - - :param advertised_public_prefixes: The reference of AdvertisedPublicPrefixes. - :type advertised_public_prefixes: list[str] - :param advertised_communities: The communities of bgp peering. Specified for microsoft peering. - :type advertised_communities: list[str] - :param advertised_public_prefixes_state: AdvertisedPublicPrefixState of the Peering resource. - Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. - Possible values include: "NotConfigured", "Configuring", "Configured", "ValidationNeeded". - :type advertised_public_prefixes_state: str or - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState - :param legacy_mode: The legacy mode of the peering. - :type legacy_mode: int - :param customer_asn: The CustomerASN of the peering. - :type customer_asn: int - :param routing_registry_name: The RoutingRegistryName of the configuration. - :type routing_registry_name: str - """ - - _attribute_map = { - 'advertised_public_prefixes': {'key': 'advertisedPublicPrefixes', 'type': '[str]'}, - 'advertised_communities': {'key': 'advertisedCommunities', 'type': '[str]'}, - 'advertised_public_prefixes_state': {'key': 'advertisedPublicPrefixesState', 'type': 'str'}, - 'legacy_mode': {'key': 'legacyMode', 'type': 'int'}, - 'customer_asn': {'key': 'customerASN', 'type': 'int'}, - 'routing_registry_name': {'key': 'routingRegistryName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.advertised_public_prefixes = kwargs.get('advertised_public_prefixes', None) - self.advertised_communities = kwargs.get('advertised_communities', None) - self.advertised_public_prefixes_state = kwargs.get('advertised_public_prefixes_state', None) - self.legacy_mode = kwargs.get('legacy_mode', None) - self.customer_asn = kwargs.get('customer_asn', None) - self.routing_registry_name = kwargs.get('routing_registry_name', None) - - -class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): - """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. - - :param value: The peerings in an express route circuit. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitPeeringListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitRoutesTable(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param network: network. - :type network: str - :param next_hop: nextHop. - :type next_hop: str - :param loc_prf: locPrf. - :type loc_prf: str - :param weight: weight. - :type weight: int - :param path: path. - :type path: str - """ - - _attribute_map = { - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'loc_prf': {'key': 'locPrf', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitRoutesTable, self).__init__(**kwargs) - self.network = kwargs.get('network', None) - self.next_hop = kwargs.get('next_hop', None) - self.loc_prf = kwargs.get('loc_prf', None) - self.weight = kwargs.get('weight', None) - self.path = kwargs.get('path', None) - - -class ExpressRouteCircuitRoutesTableSummary(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param neighbor: Neighbor. - :type neighbor: str - :param v: BGP version number spoken to the neighbor. - :type v: int - :param as_property: Autonomous system number. - :type as_property: int - :param up_down: The length of time that the BGP session has been in the Established state, or - the current status if not in the Established state. - :type up_down: str - :param state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have - been received from a neighbor or peer group. - :type state_pfx_rcd: str - """ - - _attribute_map = { - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'v': {'key': 'v', 'type': 'int'}, - 'as_property': {'key': 'as', 'type': 'int'}, - 'up_down': {'key': 'upDown', 'type': 'str'}, - 'state_pfx_rcd': {'key': 'statePfxRcd', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitRoutesTableSummary, self).__init__(**kwargs) - self.neighbor = kwargs.get('neighbor', None) - self.v = kwargs.get('v', None) - self.as_property = kwargs.get('as_property', None) - self.up_down = kwargs.get('up_down', None) - self.state_pfx_rcd = kwargs.get('state_pfx_rcd', None) - - -class ExpressRouteCircuitsArpTableListResult(msrest.serialization.Model): - """Response for ListArpTable associated with the Express Route Circuits API. - - :param value: Gets list of the ARP table. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitArpTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitArpTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitsArpTableListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitServiceProviderProperties(msrest.serialization.Model): - """Contains ServiceProviderProperties in an ExpressRouteCircuit. - - :param service_provider_name: The serviceProviderName. - :type service_provider_name: str - :param peering_location: The peering location. - :type peering_location: str - :param bandwidth_in_mbps: The BandwidthInMbps. - :type bandwidth_in_mbps: int - """ - - _attribute_map = { - 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, - 'peering_location': {'key': 'peeringLocation', 'type': 'str'}, - 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitServiceProviderProperties, self).__init__(**kwargs) - self.service_provider_name = kwargs.get('service_provider_name', None) - self.peering_location = kwargs.get('peering_location', None) - self.bandwidth_in_mbps = kwargs.get('bandwidth_in_mbps', None) - - -class ExpressRouteCircuitSku(msrest.serialization.Model): - """Contains SKU in an ExpressRouteCircuit. - - :param name: The name of the SKU. - :type name: str - :param tier: The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values - include: "Standard", "Premium". - :type tier: str or ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitSkuTier - :param family: The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. - Possible values include: "UnlimitedData", "MeteredData". - :type family: str or ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitSkuFamily - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.family = kwargs.get('family', None) - - -class ExpressRouteCircuitsRoutesTableListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: The list of routes table. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitRoutesTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitsRoutesTableSummaryListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: A list of the routes table. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitRoutesTableSummary] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableSummaryListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitStats(msrest.serialization.Model): - """Contains stats associated with the peering. - - :param primarybytes_in: Gets BytesIn of the peering. - :type primarybytes_in: long - :param primarybytes_out: Gets BytesOut of the peering. - :type primarybytes_out: long - :param secondarybytes_in: Gets BytesIn of the peering. - :type secondarybytes_in: long - :param secondarybytes_out: Gets BytesOut of the peering. - :type secondarybytes_out: long - """ - - _attribute_map = { - 'primarybytes_in': {'key': 'primarybytesIn', 'type': 'long'}, - 'primarybytes_out': {'key': 'primarybytesOut', 'type': 'long'}, - 'secondarybytes_in': {'key': 'secondarybytesIn', 'type': 'long'}, - 'secondarybytes_out': {'key': 'secondarybytesOut', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitStats, self).__init__(**kwargs) - self.primarybytes_in = kwargs.get('primarybytes_in', None) - self.primarybytes_out = kwargs.get('primarybytes_out', None) - self.secondarybytes_in = kwargs.get('secondarybytes_in', None) - self.secondarybytes_out = kwargs.get('secondarybytes_out', None) - - -class ExpressRouteServiceProvider(Resource): - """A ExpressRouteResourceProvider object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param peering_locations: Get a list of peering locations. - :type peering_locations: list[str] - :param bandwidths_offered: Gets bandwidths offered. - :type bandwidths_offered: - list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteServiceProviderBandwidthsOffered] - :param provisioning_state: Gets the provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, - 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteServiceProvider, self).__init__(**kwargs) - self.peering_locations = kwargs.get('peering_locations', None) - self.bandwidths_offered = kwargs.get('bandwidths_offered', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ExpressRouteServiceProviderBandwidthsOffered(msrest.serialization.Model): - """Contains bandwidths offered in ExpressRouteServiceProvider resources. - - :param offer_name: The OfferName. - :type offer_name: str - :param value_in_mbps: The ValueInMbps. - :type value_in_mbps: int - """ - - _attribute_map = { - 'offer_name': {'key': 'offerName', 'type': 'str'}, - 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs) - self.offer_name = kwargs.get('offer_name', None) - self.value_in_mbps = kwargs.get('value_in_mbps', None) - - -class ExpressRouteServiceProviderListResult(msrest.serialization.Model): - """Response for the ListExpressRouteServiceProvider API service call. - - :param value: A list of ExpressRouteResourceProvider resources. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteServiceProvider] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteServiceProviderListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class FlowLogInformation(msrest.serialization.Model): - """Information on the configuration of flow log. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the resource to configure for flow logging. - :type target_resource_id: str - :param storage_id: Required. ID of the storage account which is used to store the flow log. - :type storage_id: str - :param enabled: Required. Flag to enable/disable flow logging. - :type enabled: bool - :param retention_policy: Parameters that define the retention policy for flow log. - :type retention_policy: ~azure.mgmt.network.v2017_08_01.models.RetentionPolicyParameters - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowLogInformation, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.storage_id = kwargs['storage_id'] - self.enabled = kwargs['enabled'] - self.retention_policy = kwargs.get('retention_policy', None) - - -class FlowLogStatusParameters(msrest.serialization.Model): - """Parameters that define a resource to query flow log status. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource where getting the flow logging status. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowLogStatusParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - - -class FrontendIPConfiguration(SubResource): - """Frontend IP address of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :ivar inbound_nat_rules: Read only. Inbound rules URIs that use this frontend IP. - :vartype inbound_nat_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :ivar inbound_nat_pools: Read only. Inbound pools URIs that use this frontend IP. - :vartype inbound_nat_pools: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :ivar outbound_nat_rules: Read only. Outbound rules URIs that use this frontend IP. - :vartype outbound_nat_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :ivar load_balancing_rules: Gets load balancing rules URIs that use this frontend IP. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The Private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.Subnet - :param public_ip_address: The reference of the Public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'inbound_nat_rules': {'readonly': True}, - 'inbound_nat_pools': {'readonly': True}, - 'outbound_nat_rules': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[SubResource]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[SubResource]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(FrontendIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.zones = kwargs.get('zones', None) - self.inbound_nat_rules = None - self.inbound_nat_pools = None - self.outbound_nat_rules = None - self.load_balancing_rules = None - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class GatewayRoute(msrest.serialization.Model): - """Gateway routing details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The gateway's local address. - :vartype local_address: str - :ivar network: The route's network prefix. - :vartype network: str - :ivar next_hop: The route's next hop. - :vartype next_hop: str - :ivar source_peer: The peer this route was learned from. - :vartype source_peer: str - :ivar origin: The source this route was learned from. - :vartype origin: str - :ivar as_path: The route's AS path sequence. - :vartype as_path: str - :ivar weight: The route's weight. - :vartype weight: int - """ - - _validation = { - 'local_address': {'readonly': True}, - 'network': {'readonly': True}, - 'next_hop': {'readonly': True}, - 'source_peer': {'readonly': True}, - 'origin': {'readonly': True}, - 'as_path': {'readonly': True}, - 'weight': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'as_path': {'key': 'asPath', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(GatewayRoute, self).__init__(**kwargs) - self.local_address = None - self.network = None - self.next_hop = None - self.source_peer = None - self.origin = None - self.as_path = None - self.weight = None - - -class GatewayRouteListResult(msrest.serialization.Model): - """List of virtual network gateway routes. - - :param value: List of gateway routes. - :type value: list[~azure.mgmt.network.v2017_08_01.models.GatewayRoute] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[GatewayRoute]'}, - } - - def __init__( - self, - **kwargs - ): - super(GatewayRouteListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class InboundNatPool(SubResource): - """Inbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. - Possible values include: "Udp", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.TransportProtocol - :param frontend_port_range_start: The first port number in the range of external ports that - will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values - range between 1 and 65534. - :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of external ports that will - be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range - between 1 and 65535. - :type frontend_port_range_end: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 1 and 65535. - :type backend_port: int - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, - 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatPool, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.protocol = kwargs.get('protocol', None) - self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) - self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) - self.backend_port = kwargs.get('backend_port', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class InboundNatRule(SubResource): - """Inbound NAT rule of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :ivar backend_ip_configuration: A reference to a private IP address defined on a network - interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations - is forwarded to the backend IP. - :vartype backend_ip_configuration: - ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration - :param protocol: The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. - Possible values include: "Udp", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.TransportProtocol - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values range from 1 to 65534. - :type frontend_port: int - :param backend_port: The port used for the internal endpoint. Acceptable values range from 1 to - 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_ip_configuration': {'key': 'properties.backendIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.backend_ip_configuration = None - self.protocol = kwargs.get('protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.enable_floating_ip = kwargs.get('enable_floating_ip', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class InboundNatRuleListResult(msrest.serialization.Model): - """Response for ListInboundNatRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of inbound nat rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.InboundNatRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InboundNatRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class IPAddressAvailabilityResult(msrest.serialization.Model): - """Response for CheckIPAddressAvailability API service call. - - :param available: Private IP address availability. - :type available: bool - :param available_ip_addresses: Contains other available private IP addresses if the asked for - address is taken. - :type available_ip_addresses: list[str] - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'available_ip_addresses': {'key': 'availableIPAddresses', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(IPAddressAvailabilityResult, self).__init__(**kwargs) - self.available = kwargs.get('available', None) - self.available_ip_addresses = kwargs.get('available_ip_addresses', None) - - -class IPConfiguration(SubResource): - """IP configuration. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.Subnet - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class IpsecPolicy(msrest.serialization.Model): - """An IPSec Policy configuration for a virtual network gateway connection. - - All required parameters must be populated in order to send to Azure. - - :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - :type sa_life_time_seconds: int - :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - :type sa_data_size_kilobytes: int - :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible - values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", - "GCMAES256". - :type ipsec_encryption: str or ~azure.mgmt.network.v2017_08_01.models.IpsecEncryption - :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values - include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". - :type ipsec_integrity: str or ~azure.mgmt.network.v2017_08_01.models.IpsecIntegrity - :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values - include: "DES", "DES3", "AES128", "AES192", "AES256". - :type ike_encryption: str or ~azure.mgmt.network.v2017_08_01.models.IkeEncryption - :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values - include: "MD5", "SHA1", "SHA256", "SHA384". - :type ike_integrity: str or ~azure.mgmt.network.v2017_08_01.models.IkeIntegrity - :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values - include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", - "DHGroup24". - :type dh_group: str or ~azure.mgmt.network.v2017_08_01.models.DhGroup - :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new child SA. Possible values - include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24". - :type pfs_group: str or ~azure.mgmt.network.v2017_08_01.models.PfsGroup - """ - - _validation = { - 'sa_life_time_seconds': {'required': True}, - 'sa_data_size_kilobytes': {'required': True}, - 'ipsec_encryption': {'required': True}, - 'ipsec_integrity': {'required': True}, - 'ike_encryption': {'required': True}, - 'ike_integrity': {'required': True}, - 'dh_group': {'required': True}, - 'pfs_group': {'required': True}, - } - - _attribute_map = { - 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, - 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, - 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, - 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, - 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, - 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, - 'dh_group': {'key': 'dhGroup', 'type': 'str'}, - 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IpsecPolicy, self).__init__(**kwargs) - self.sa_life_time_seconds = kwargs['sa_life_time_seconds'] - self.sa_data_size_kilobytes = kwargs['sa_data_size_kilobytes'] - self.ipsec_encryption = kwargs['ipsec_encryption'] - self.ipsec_integrity = kwargs['ipsec_integrity'] - self.ike_encryption = kwargs['ike_encryption'] - self.ike_integrity = kwargs['ike_integrity'] - self.dh_group = kwargs['dh_group'] - self.pfs_group = kwargs['pfs_group'] - - -class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Contains IPv6 peering config. - - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringConfig - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_08_01.models.RouteFilter - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringState - """ - - _attribute_map = { - 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, - 'microsoft_peering_config': {'key': 'microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'route_filter': {'key': 'routeFilter', 'type': 'RouteFilter'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Ipv6ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.primary_peer_address_prefix = kwargs.get('primary_peer_address_prefix', None) - self.secondary_peer_address_prefix = kwargs.get('secondary_peer_address_prefix', None) - self.microsoft_peering_config = kwargs.get('microsoft_peering_config', None) - self.route_filter = kwargs.get('route_filter', None) - self.state = kwargs.get('state', None) - - -class LoadBalancer(Resource): - """LoadBalancer resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The load balancer SKU. - :type sku: ~azure.mgmt.network.v2017_08_01.models.LoadBalancerSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configurations: Object representing the frontend IPs to be used for the load - balancer. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.FrontendIPConfiguration] - :param backend_address_pools: Collection of backend address pools used by a load balancer. - :type backend_address_pools: list[~azure.mgmt.network.v2017_08_01.models.BackendAddressPool] - :param load_balancing_rules: Object collection representing the load balancing rules Gets the - provisioning. - :type load_balancing_rules: list[~azure.mgmt.network.v2017_08_01.models.LoadBalancingRule] - :param probes: Collection of probe objects used in the load balancer. - :type probes: list[~azure.mgmt.network.v2017_08_01.models.Probe] - :param inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining - inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT - pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are - associated with individual virtual machines cannot reference an Inbound NAT pool. They have to - reference individual inbound NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.network.v2017_08_01.models.InboundNatRule] - :param inbound_nat_pools: Defines an external port range for inbound NAT to a single backend - port on NICs associated with a load balancer. Inbound NAT rules are created automatically for - each NIC associated with the Load Balancer using an external port from this range. Defining an - Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. - Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with - individual virtual machines cannot reference an inbound NAT pool. They have to reference - individual inbound NAT rules. - :type inbound_nat_pools: list[~azure.mgmt.network.v2017_08_01.models.InboundNatPool] - :param outbound_nat_rules: The outbound NAT rules. - :type outbound_nat_rules: list[~azure.mgmt.network.v2017_08_01.models.OutboundNatRule] - :param resource_guid: The resource GUID property of the load balancer resource. - :type resource_guid: str - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'LoadBalancerSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[FrontendIPConfiguration]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'probes': {'key': 'properties.probes', 'type': '[Probe]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[InboundNatRule]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[InboundNatPool]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[OutboundNatRule]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancer, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) - self.backend_address_pools = kwargs.get('backend_address_pools', None) - self.load_balancing_rules = kwargs.get('load_balancing_rules', None) - self.probes = kwargs.get('probes', None) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) - self.inbound_nat_pools = kwargs.get('inbound_nat_pools', None) - self.outbound_nat_rules = kwargs.get('outbound_nat_rules', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class LoadBalancerBackendAddressPoolListResult(msrest.serialization.Model): - """Response for ListBackendAddressPool API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of backend address pools in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.BackendAddressPool] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackendAddressPool]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerBackendAddressPoolListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): - """Response for ListFrontendIPConfiguration API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of frontend IP configurations in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.FrontendIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerFrontendIPConfigurationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerListResult(msrest.serialization.Model): - """Response for ListLoadBalancers API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerLoadBalancingRuleListResult(msrest.serialization.Model): - """Response for ListLoadBalancingRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancing rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.LoadBalancingRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancingRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerLoadBalancingRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerProbeListResult(msrest.serialization.Model): - """Response for ListProbe API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of probes in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.Probe] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Probe]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerProbeListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerSku(msrest.serialization.Model): - """SKU of a load balancer. - - :param name: Name of a load balancer SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_08_01.models.LoadBalancerSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class LoadBalancingRule(SubResource): - """A load balancing rule for a load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param probe: The reference of the load balancer probe used by the load balancing rule. - :type probe: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param protocol: The transport protocol for the external endpoint. Possible values are 'Udp' or - 'Tcp'. Possible values include: "Udp", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.TransportProtocol - :param load_distribution: The load distribution policy for this rule. Possible values are - 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: "Default", "SourceIP", - "SourceIPProtocol". - :type load_distribution: str or ~azure.mgmt.network.v2017_08_01.models.LoadDistribution - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values are between 1 and 65534. - :type frontend_port: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 1 and 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the - publicIP address specified in the frontend of the load balancing rule. - :type disable_outbound_snat: bool - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'load_distribution': {'key': 'properties.loadDistribution', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'disable_outbound_snat': {'key': 'properties.disableOutboundSnat', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancingRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.probe = kwargs.get('probe', None) - self.protocol = kwargs.get('protocol', None) - self.load_distribution = kwargs.get('load_distribution', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.enable_floating_ip = kwargs.get('enable_floating_ip', None) - self.disable_outbound_snat = kwargs.get('disable_outbound_snat', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class LocalNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param local_network_address_space: Local network site address space. - :type local_network_address_space: ~azure.mgmt.network.v2017_08_01.models.AddressSpace - :param gateway_ip_address: IP address of local network gateway. - :type gateway_ip_address: str - :param bgp_settings: Local network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_08_01.models.BgpSettings - :param resource_guid: The resource GUID property of the LocalNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the LocalNetworkGateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'local_network_address_space': {'key': 'properties.localNetworkAddressSpace', 'type': 'AddressSpace'}, - 'gateway_ip_address': {'key': 'properties.gatewayIpAddress', 'type': 'str'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LocalNetworkGateway, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.local_network_address_space = kwargs.get('local_network_address_space', None) - self.gateway_ip_address = kwargs.get('gateway_ip_address', None) - self.bgp_settings = kwargs.get('bgp_settings', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class LocalNetworkGatewayListResult(msrest.serialization.Model): - """Response for ListLocalNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of local network gateways that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LocalNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LocalNetworkGatewayListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkInterface(Resource): - """A network interface in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param virtual_machine: The reference of a virtual machine. - :type virtual_machine: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup - :param ip_configurations: A list of IPConfigurations of the network interface. - :type ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration] - :param dns_settings: The DNS settings in network interface. - :type dns_settings: ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceDnsSettings - :param mac_address: The MAC address of the network interface. - :type mac_address: str - :param primary: Gets whether this is a primary network interface on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: If the network interface is accelerated networking - enabled. - :type enable_accelerated_networking: bool - :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network - interface. - :type enable_ip_forwarding: bool - :param resource_guid: The resource GUID property of the network interface resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, - 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterface, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.virtual_machine = kwargs.get('virtual_machine', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.mac_address = kwargs.get('mac_address', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class NetworkInterfaceAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Network interface ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = kwargs.get('security_rules', None) - - -class NetworkInterfaceDnsSettings(msrest.serialization.Model): - """DNS settings of a network interface. - - :param dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure - provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be - the only value in dnsServers collection. - :type dns_servers: list[str] - :param applied_dns_servers: If the VM that uses this NIC is part of an Availability Set, then - this list will have the union of all DNS servers from all NICs that are part of the - Availability Set. This property is what is configured on each of those VMs. - :type applied_dns_servers: list[str] - :param internal_dns_name_label: Relative DNS name for this NIC used for internal communications - between VMs in the same virtual network. - :type internal_dns_name_label: str - :param internal_fqdn: Fully qualified DNS name supporting internal communications between VMs - in the same virtual network. - :type internal_fqdn: str - :param internal_domain_name_suffix: Even if internalDnsNameLabel is not specified, a DNS entry - is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the - VM name with the value of internalDomainNameSuffix. - :type internal_domain_name_suffix: str - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, - 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, - 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'}, - 'internal_domain_name_suffix': {'key': 'internalDomainNameSuffix', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceDnsSettings, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) - self.applied_dns_servers = kwargs.get('applied_dns_servers', None) - self.internal_dns_name_label = kwargs.get('internal_dns_name_label', None) - self.internal_fqdn = kwargs.get('internal_fqdn', None) - self.internal_domain_name_suffix = kwargs.get('internal_domain_name_suffix', None) - - -class NetworkInterfaceIPConfiguration(SubResource): - """IPConfiguration in a network interface. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param application_gateway_backend_address_pools: The reference of - ApplicationGatewayBackendAddressPool resource. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendAddressPool] - :param load_balancer_backend_address_pools: The reference of LoadBalancerBackendAddressPool - resource. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.network.v2017_08_01.models.BackendAddressPool] - :param load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. - :type load_balancer_inbound_nat_rules: - list[~azure.mgmt.network.v2017_08_01.models.InboundNatRule] - :param private_ip_address: Private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: Defines how a private IP address is assigned. Possible - values are: 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param private_ip_address_version: Available from Api-Version 2016-03-30 onwards, it represents - whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible - values are: 'IPv4' and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type private_ip_address_version: str or ~azure.mgmt.network.v2017_08_01.models.IPVersion - :param subnet: Subnet bound to the IP configuration. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.Subnet - :param primary: Gets whether this is a primary customer address on the network interface. - :type primary: bool - :param public_ip_address: Public IP address bound to the IP configuration. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :param provisioning_state: The provisioning state of the network interface IP configuration. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_rules = kwargs.get('load_balancer_inbound_nat_rules', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of ip configurations. - :type value: list[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceIPConfigurationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkInterfaceListResult(msrest.serialization.Model): - """Response for the ListNetworkInterface API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of network interfaces in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.NetworkInterface] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterface]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkInterfaceLoadBalancerListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers. - :type value: list[~azure.mgmt.network.v2017_08_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceLoadBalancerListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkSecurityGroup(Resource): - """NetworkSecurityGroup resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param security_rules: A collection of security rules of the network security group. - :type security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - :param default_security_rules: The default security rules of network security group. - :type default_security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - :ivar network_interfaces: A collection of references to network interfaces. - :vartype network_interfaces: list[~azure.mgmt.network.v2017_08_01.models.NetworkInterface] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_08_01.models.Subnet] - :param resource_guid: The resource GUID property of the network security group resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'network_interfaces': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'security_rules': {'key': 'properties.securityRules', 'type': '[SecurityRule]'}, - 'default_security_rules': {'key': 'properties.defaultSecurityRules', 'type': '[SecurityRule]'}, - 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkSecurityGroup, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.security_rules = kwargs.get('security_rules', None) - self.default_security_rules = kwargs.get('default_security_rules', None) - self.network_interfaces = None - self.subnets = None - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class NetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for ListNetworkSecurityGroups API service call. - - :param value: A list of NetworkSecurityGroup resources. - :type value: list[~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class NetworkWatcher(Resource): - """Network watcher in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar provisioning_state: The provisioning state of the resource. Possible values include: - "Succeeded", "Updating", "Deleting", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.network.v2017_08_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkWatcher, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.provisioning_state = None - - -class NetworkWatcherListResult(msrest.serialization.Model): - """List of network watcher resources. - - :param value: - :type value: list[~azure.mgmt.network.v2017_08_01.models.NetworkWatcher] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkWatcher]'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkWatcherListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class NextHopParameters(msrest.serialization.Model): - """Parameters that define the source and destination endpoint. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The resource identifier of the target resource against - which the action is to be performed. - :type target_resource_id: str - :param source_ip_address: Required. The source IP address. - :type source_ip_address: str - :param destination_ip_address: Required. The destination IP address. - :type destination_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of the nics, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'source_ip_address': {'required': True}, - 'destination_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'source_ip_address': {'key': 'sourceIPAddress', 'type': 'str'}, - 'destination_ip_address': {'key': 'destinationIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NextHopParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.source_ip_address = kwargs['source_ip_address'] - self.destination_ip_address = kwargs['destination_ip_address'] - self.target_nic_resource_id = kwargs.get('target_nic_resource_id', None) - - -class NextHopResult(msrest.serialization.Model): - """The information about next hop from the specified VM. - - :param next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", - "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_08_01.models.NextHopType - :param next_hop_ip_address: Next hop IP Address. - :type next_hop_ip_address: str - :param route_table_id: The resource identifier for the route table associated with the route - being returned. If the route being returned does not correspond to any user created routes then - this field will be the string 'System Route'. - :type route_table_id: str - """ - - _attribute_map = { - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, - 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NextHopResult, self).__init__(**kwargs) - self.next_hop_type = kwargs.get('next_hop_type', None) - self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) - self.route_table_id = kwargs.get('route_table_id', None) - - -class OutboundNatRule(SubResource): - """Outbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allocated_outbound_ports: The number of outbound ports to be used for NAT. - :type allocated_outbound_ports: int - :param frontend_ip_configurations: The Frontend IP addresses of the load balancer. - :type frontend_ip_configurations: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[SubResource]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OutboundNatRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', None) - self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PacketCapture(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCapture, self).__init__(**kwargs) - self.target = kwargs['target'] - self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) - self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) - self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) - self.storage_location = kwargs['storage_location'] - self.filters = kwargs.get('filters', None) - - -class PacketCaptureFilter(msrest.serialization.Model): - """Filter that is applied to packet capture request. Multiple filters can be applied. - - :param protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". - Default value: "Any". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.PcProtocol - :param local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type local_ip_address: str - :param remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type remote_ip_address: str - :param local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type local_port: str - :param remote_port: Remote port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type remote_port: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureFilter, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', "Any") - self.local_ip_address = kwargs.get('local_ip_address', None) - self.remote_ip_address = kwargs.get('remote_ip_address', None) - self.local_port = kwargs.get('local_port', None) - self.remote_port = kwargs.get('remote_port', None) - - -class PacketCaptureListResult(msrest.serialization.Model): - """List of packet capture sessions. - - :param value: Information about packet capture sessions. - :type value: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureResult] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PacketCaptureParameters(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureParameters, self).__init__(**kwargs) - self.target = kwargs['target'] - self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) - self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) - self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) - self.storage_location = kwargs['storage_location'] - self.filters = kwargs.get('filters', None) - - -class PacketCaptureQueryStatusResult(msrest.serialization.Model): - """Status of packet capture session. - - :param name: The name of the packet capture resource. - :type name: str - :param id: The ID of the packet capture resource. - :type id: str - :param capture_start_time: The start time of the packet capture session. - :type capture_start_time: ~datetime.datetime - :param packet_capture_status: The status of the packet capture session. Possible values - include: "NotStarted", "Running", "Stopped", "Error", "Unknown". - :type packet_capture_status: str or ~azure.mgmt.network.v2017_08_01.models.PcStatus - :param stop_reason: The reason the current packet capture session was stopped. - :type stop_reason: str - :param packet_capture_error: List of errors of packet capture session. - :type packet_capture_error: list[str or ~azure.mgmt.network.v2017_08_01.models.PcError] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'capture_start_time': {'key': 'captureStartTime', 'type': 'iso-8601'}, - 'packet_capture_status': {'key': 'packetCaptureStatus', 'type': 'str'}, - 'stop_reason': {'key': 'stopReason', 'type': 'str'}, - 'packet_capture_error': {'key': 'packetCaptureError', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureQueryStatusResult, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - self.capture_start_time = kwargs.get('capture_start_time', None) - self.packet_capture_status = kwargs.get('packet_capture_status', None) - self.stop_reason = kwargs.get('stop_reason', None) - self.packet_capture_error = kwargs.get('packet_capture_error', None) - - -class PacketCaptureResult(msrest.serialization.Model): - """Information about packet capture session. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the packet capture session. - :vartype name: str - :ivar id: ID of the packet capture operation. - :vartype id: str - :param etag: - :type etag: str - :param target: The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_08_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureResult, self).__init__(**kwargs) - self.name = None - self.id = None - self.etag = kwargs.get('etag', "A unique read-only string that changes whenever the resource is updated.") - self.target = kwargs.get('target', None) - self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) - self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) - self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) - self.storage_location = kwargs.get('storage_location', None) - self.filters = kwargs.get('filters', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PacketCaptureResultProperties(PacketCaptureParameters): - """Describes the properties of a packet capture session. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_08_01.models.ProvisioningState - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureResultProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PacketCaptureStorageLocation(msrest.serialization.Model): - """Describes the storage location for a packet capture session. - - :param storage_id: The ID of the storage account to save the packet capture session. Required - if no local file path is provided. - :type storage_id: str - :param storage_path: The URI of the storage path to save the packet capture. Must be a - well-formed URI describing the location to save the packet capture. - :type storage_path: str - :param file_path: A valid local path on the targeting VM. Must include the name of the capture - file (*.cap). For linux virtual machine it must start with /var/captures. Required if no - storage ID is provided, otherwise optional. - :type file_path: str - """ - - _attribute_map = { - 'storage_id': {'key': 'storageId', 'type': 'str'}, - 'storage_path': {'key': 'storagePath', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureStorageLocation, self).__init__(**kwargs) - self.storage_id = kwargs.get('storage_id', None) - self.storage_path = kwargs.get('storage_path', None) - self.file_path = kwargs.get('file_path', None) - - -class PatchRouteFilter(SubResource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar type: Resource type. - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PatchRouteFilter, self).__init__(**kwargs) - self.name = None - self.etag = None - self.type = None - self.tags = kwargs.get('tags', None) - self.rules = kwargs.get('rules', None) - self.peerings = kwargs.get('peerings', None) - self.provisioning_state = None - - -class PatchRouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_08_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PatchRouteFilterRule, self).__init__(**kwargs) - self.name = None - self.etag = None - self.tags = kwargs.get('tags', None) - self.access = kwargs.get('access', None) - self.route_filter_rule_type = kwargs.get('route_filter_rule_type', None) - self.communities = kwargs.get('communities', None) - self.provisioning_state = None - - -class Probe(SubResource): - """A load balancer probe. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar load_balancing_rules: The load balancer rules that use this probe. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param protocol: The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' - is specified, a received ACK is required for the probe to be successful. If 'Http' is - specified, a 200 OK response from the specifies URI is required for the probe to be successful. - Possible values include: "Http", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.ProbeProtocol - :param port: The port for communicating the probe. Possible values range from 1 to 65535, - inclusive. - :type port: int - :param interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint - for health status. Typically, the interval is slightly less than half the allocated timeout - period (in seconds) which allows two full probes before taking the instance out of rotation. - The default value is 15, the minimum value is 5. - :type interval_in_seconds: int - :param number_of_probes: The number of probes where if no response, will result in stopping - further traffic from being delivered to the endpoint. This values allows endpoints to be taken - out of rotation faster or slower than the typical times used in Azure. - :type number_of_probes: int - :param request_path: The URI used for requesting health status from the VM. Path is required if - a protocol is set to http. Otherwise, it is not allowed. There is no default value. - :type request_path: str - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, - 'number_of_probes': {'key': 'properties.numberOfProbes', 'type': 'int'}, - 'request_path': {'key': 'properties.requestPath', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Probe, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.load_balancing_rules = None - self.protocol = kwargs.get('protocol', None) - self.port = kwargs.get('port', None) - self.interval_in_seconds = kwargs.get('interval_in_seconds', None) - self.number_of_probes = kwargs.get('number_of_probes', None) - self.request_path = kwargs.get('request_path', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PublicIPAddress(Resource): - """Public IP address resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The public IP address SKU. - :type sku: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddressSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :param public_ip_allocation_method: The public IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type public_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param public_ip_address_version: The public IP address version. Possible values are: 'IPv4' - and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type public_ip_address_version: str or ~azure.mgmt.network.v2017_08_01.models.IPVersion - :ivar ip_configuration: The IP configuration associated with the public IP address. - :vartype ip_configuration: ~azure.mgmt.network.v2017_08_01.models.IPConfiguration - :param dns_settings: The FQDN of the DNS record associated with the public IP address. - :type dns_settings: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddressDnsSettings - :param ip_address: The IP address associated with the public IP address resource. - :type ip_address: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param resource_guid: The resource GUID property of the public IP resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'PublicIPAddressSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'public_ip_allocation_method': {'key': 'properties.publicIPAllocationMethod', 'type': 'str'}, - 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, - 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddress, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.etag = kwargs.get('etag', None) - self.zones = kwargs.get('zones', None) - self.public_ip_allocation_method = kwargs.get('public_ip_allocation_method', None) - self.public_ip_address_version = kwargs.get('public_ip_address_version', None) - self.ip_configuration = None - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_address = kwargs.get('ip_address', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PublicIPAddressDnsSettings(msrest.serialization.Model): - """Contains FQDN of the DNS record associated with the public IP address. - - :param domain_name_label: Gets or sets the Domain name label.The concatenation of the domain - name label and the regionalized DNS zone make up the fully qualified domain name associated - with the public IP address. If a domain name label is specified, an A DNS record is created for - the public IP in the Microsoft Azure DNS system. - :type domain_name_label: str - :param fqdn: Gets the FQDN, Fully qualified domain name of the A DNS record associated with the - public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. - :type fqdn: str - :param reverse_fqdn: Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name - that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record - is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. - :type reverse_fqdn: str - """ - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'reverse_fqdn': {'key': 'reverseFqdn', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddressDnsSettings, self).__init__(**kwargs) - self.domain_name_label = kwargs.get('domain_name_label', None) - self.fqdn = kwargs.get('fqdn', None) - self.reverse_fqdn = kwargs.get('reverse_fqdn', None) - - -class PublicIPAddressListResult(msrest.serialization.Model): - """Response for ListPublicIpAddresses API service call. - - :param value: A list of public IP addresses that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.PublicIPAddress] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddressListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class PublicIPAddressSku(msrest.serialization.Model): - """SKU of a public IP address. - - :param name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_08_01.models.PublicIPAddressSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddressSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class QueryTroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to query the troubleshooting result. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource ID to query the troubleshooting - result. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(QueryTroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - - -class ResourceNavigationLink(SubResource): - """ResourceNavigationLink resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param linked_resource_type: Resource type of the linked resource. - :type linked_resource_type: str - :param link: Link to the external resource. - :type link: str - :ivar provisioning_state: Provisioning state of the ResourceNavigationLink resource. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, - 'link': {'key': 'properties.link', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceNavigationLink, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = None - self.linked_resource_type = kwargs.get('linked_resource_type', None) - self.link = kwargs.get('link', None) - self.provisioning_state = None - - -class RetentionPolicyParameters(msrest.serialization.Model): - """Parameters that define the retention policy for flow log. - - :param days: Number of days to retain flow log records. - :type days: int - :param enabled: Flag to enable/disable retention. - :type enabled: bool - """ - - _attribute_map = { - 'days': {'key': 'days', 'type': 'int'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(RetentionPolicyParameters, self).__init__(**kwargs) - self.days = kwargs.get('days', 0) - self.enabled = kwargs.get('enabled', False) - - -class Route(SubResource): - """Route resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The destination CIDR to which the route applies. - :type address_prefix: str - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_08_01.models.RouteNextHopType - :param next_hop_ip_address: The IP address packets should be forwarded to. Next hop values are - only allowed in routes where the next hop type is VirtualAppliance. - :type next_hop_ip_address: str - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'next_hop_type': {'key': 'properties.nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'properties.nextHopIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Route, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.address_prefix = kwargs.get('address_prefix', None) - self.next_hop_type = kwargs.get('next_hop_type', None) - self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class RouteFilter(Resource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilter, self).__init__(**kwargs) - self.etag = None - self.rules = kwargs.get('rules', None) - self.peerings = kwargs.get('peerings', None) - self.provisioning_state = None - - -class RouteFilterListResult(msrest.serialization.Model): - """Response for the ListRouteFilters API service call. - - :param value: Gets a list of route filters in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.RouteFilter] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilter]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilterListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param location: Resource location. - :type location: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_08_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilterRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.etag = None - self.tags = kwargs.get('tags', None) - self.access = kwargs.get('access', None) - self.route_filter_rule_type = kwargs.get('route_filter_rule_type', None) - self.communities = kwargs.get('communities', None) - self.provisioning_state = None - - -class RouteFilterRuleListResult(msrest.serialization.Model): - """Response for the ListRouteFilterRules API service call. - - :param value: Gets a list of RouteFilterRules in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilterRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilterRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RouteListResult(msrest.serialization.Model): - """Response for the ListRoute API service call. - - :param value: Gets a list of routes in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.Route] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Route]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RouteTable(Resource): - """Route table resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param routes: Collection of routes contained within a route table. - :type routes: list[~azure.mgmt.network.v2017_08_01.models.Route] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_08_01.models.Subnet] - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'routes': {'key': 'properties.routes', 'type': '[Route]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteTable, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.routes = kwargs.get('routes', None) - self.subnets = None - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class RouteTableListResult(msrest.serialization.Model): - """Response for the ListRouteTable API service call. - - :param value: Gets a list of route tables in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.RouteTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteTableListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class SecurityGroupNetworkInterface(msrest.serialization.Model): - """Network interface and all its associated security rules. - - :param id: ID of the network interface. - :type id: str - :param security_rule_associations: All security rules associated with the network interface. - :type security_rule_associations: - ~azure.mgmt.network.v2017_08_01.models.SecurityRuleAssociations - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rule_associations': {'key': 'securityRuleAssociations', 'type': 'SecurityRuleAssociations'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityGroupNetworkInterface, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.security_rule_associations = kwargs.get('security_rule_associations', None) - - -class SecurityGroupViewParameters(msrest.serialization.Model): - """Parameters that define the VM to check security groups for. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. ID of the target VM. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityGroupViewParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - - -class SecurityGroupViewResult(msrest.serialization.Model): - """The information about security rules applied to the specified VM. - - :param network_interfaces: List of network interfaces on the specified VM. - :type network_interfaces: - list[~azure.mgmt.network.v2017_08_01.models.SecurityGroupNetworkInterface] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityGroupViewResult, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) - - -class SecurityRule(SubResource): - """Network security rule. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param description: A description for this rule. Restricted to 140 chars. - :type description: str - :param protocol: Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and - '*'. Possible values include: "Tcp", "Udp", "*". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleProtocol - :param source_port_range: The source port or range. Integer or range between 0 and 65535. - Asterisk '*' can also be used to match all ports. - :type source_port_range: str - :param destination_port_range: The destination port or range. Integer or range between 0 and - 65535. Asterisk '*' can also be used to match all ports. - :type destination_port_range: str - :param source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to - match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - can also be used. If this is an ingress rule, specifies where network traffic originates from. - :type source_address_prefix: str - :param source_address_prefixes: The CIDR or source IP ranges. - :type source_address_prefixes: list[str] - :param destination_address_prefix: The destination address prefix. CIDR or destination IP - range. Asterisk '*' can also be used to match all source IPs. Default tags such as - 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - :type destination_address_prefix: str - :param destination_address_prefixes: The destination address prefixes. CIDR or destination IP - ranges. - :type destination_address_prefixes: list[str] - :param source_port_ranges: The source port ranges. - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. - :type destination_port_ranges: list[str] - :param access: The network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleAccess - :param priority: The priority of the rule. The value can be between 100 and 4096. The priority - number must be unique for each rule in the collection. The lower the priority number, the - higher the priority of the rule. - :type priority: int - :param direction: The direction of the rule. The direction specifies if rule will be evaluated - on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleDirection - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'source_port_range': {'key': 'properties.sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'properties.destinationPortRange', 'type': 'str'}, - 'source_address_prefix': {'key': 'properties.sourceAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'properties.sourceAddressPrefixes', 'type': '[str]'}, - 'destination_address_prefix': {'key': 'properties.destinationAddressPrefix', 'type': 'str'}, - 'destination_address_prefixes': {'key': 'properties.destinationAddressPrefixes', 'type': '[str]'}, - 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'priority': {'key': 'properties.priority', 'type': 'int'}, - 'direction': {'key': 'properties.direction', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.description = kwargs.get('description', None) - self.protocol = kwargs.get('protocol', None) - self.source_port_range = kwargs.get('source_port_range', None) - self.destination_port_range = kwargs.get('destination_port_range', None) - self.source_address_prefix = kwargs.get('source_address_prefix', None) - self.source_address_prefixes = kwargs.get('source_address_prefixes', None) - self.destination_address_prefix = kwargs.get('destination_address_prefix', None) - self.destination_address_prefixes = kwargs.get('destination_address_prefixes', None) - self.source_port_ranges = kwargs.get('source_port_ranges', None) - self.destination_port_ranges = kwargs.get('destination_port_ranges', None) - self.access = kwargs.get('access', None) - self.priority = kwargs.get('priority', None) - self.direction = kwargs.get('direction', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class SecurityRuleAssociations(msrest.serialization.Model): - """All security rules associated with the network interface. - - :param network_interface_association: Network interface and its custom security rules. - :type network_interface_association: - ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceAssociation - :param subnet_association: Network interface and its custom security rules. - :type subnet_association: ~azure.mgmt.network.v2017_08_01.models.SubnetAssociation - :param default_security_rules: Collection of default security rules of the network security - group. - :type default_security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - :param effective_security_rules: Collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityRule] - """ - - _attribute_map = { - 'network_interface_association': {'key': 'networkInterfaceAssociation', 'type': 'NetworkInterfaceAssociation'}, - 'subnet_association': {'key': 'subnetAssociation', 'type': 'SubnetAssociation'}, - 'default_security_rules': {'key': 'defaultSecurityRules', 'type': '[SecurityRule]'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityRuleAssociations, self).__init__(**kwargs) - self.network_interface_association = kwargs.get('network_interface_association', None) - self.subnet_association = kwargs.get('subnet_association', None) - self.default_security_rules = kwargs.get('default_security_rules', None) - self.effective_security_rules = kwargs.get('effective_security_rules', None) - - -class SecurityRuleListResult(msrest.serialization.Model): - """Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. - - :param value: The security rules in a network security group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ServiceEndpointPropertiesFormat(msrest.serialization.Model): - """The service endpoint properties. - - :param service: The type of the endpoint service. - :type service: str - :param locations: A list of locations. - :type locations: list[str] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'service': {'key': 'service', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceEndpointPropertiesFormat, self).__init__(**kwargs) - self.service = kwargs.get('service', None) - self.locations = kwargs.get('locations', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class Subnet(SubResource): - """Subnet in a virtual network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The address prefix for the subnet. - :type address_prefix: str - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup - :param route_table: The reference of the RouteTable resource. - :type route_table: ~azure.mgmt.network.v2017_08_01.models.RouteTable - :param service_endpoints: An array of service endpoints. - :type service_endpoints: - list[~azure.mgmt.network.v2017_08_01.models.ServiceEndpointPropertiesFormat] - :ivar ip_configurations: Gets an array of references to the network interface IP configurations - using subnet. - :vartype ip_configurations: list[~azure.mgmt.network.v2017_08_01.models.IPConfiguration] - :param resource_navigation_links: Gets an array of references to the external resources using - subnet. - :type resource_navigation_links: - list[~azure.mgmt.network.v2017_08_01.models.ResourceNavigationLink] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'ip_configurations': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, - 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, - 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Subnet, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.address_prefix = kwargs.get('address_prefix', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.route_table = kwargs.get('route_table', None) - self.service_endpoints = kwargs.get('service_endpoints', None) - self.ip_configurations = None - self.resource_navigation_links = kwargs.get('resource_navigation_links', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class SubnetAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Subnet ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(SubnetAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = kwargs.get('security_rules', None) - - -class SubnetListResult(msrest.serialization.Model): - """Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. - - :param value: The subnets in a virtual network. - :type value: list[~azure.mgmt.network.v2017_08_01.models.Subnet] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Subnet]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SubnetListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class Topology(msrest.serialization.Model): - """Topology of the specified resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: GUID representing the operation id. - :vartype id: str - :ivar created_date_time: The datetime when the topology was initially created for the resource - group. - :vartype created_date_time: ~datetime.datetime - :ivar last_modified: The datetime when the topology was last modified. - :vartype last_modified: ~datetime.datetime - :param resources: - :type resources: list[~azure.mgmt.network.v2017_08_01.models.TopologyResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'last_modified': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, - 'resources': {'key': 'resources', 'type': '[TopologyResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(Topology, self).__init__(**kwargs) - self.id = None - self.created_date_time = None - self.last_modified = None - self.resources = kwargs.get('resources', None) - - -class TopologyAssociation(msrest.serialization.Model): - """Resources that have an association with the parent resource. - - :param name: The name of the resource that is associated with the parent resource. - :type name: str - :param resource_id: The ID of the resource that is associated with the parent resource. - :type resource_id: str - :param association_type: The association type of the child resource to the parent resource. - Possible values include: "Associated", "Contains". - :type association_type: str or ~azure.mgmt.network.v2017_08_01.models.AssociationType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'association_type': {'key': 'associationType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TopologyAssociation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.resource_id = kwargs.get('resource_id', None) - self.association_type = kwargs.get('association_type', None) - - -class TopologyParameters(msrest.serialization.Model): - """Parameters that define the representation of topology. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_group_name: Required. The name of the target resource group to perform - topology on. - :type target_resource_group_name: str - """ - - _validation = { - 'target_resource_group_name': {'required': True}, - } - - _attribute_map = { - 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TopologyParameters, self).__init__(**kwargs) - self.target_resource_group_name = kwargs['target_resource_group_name'] - - -class TopologyResource(msrest.serialization.Model): - """The network resource topology information for the given resource group. - - :param name: Name of the resource. - :type name: str - :param id: ID of the resource. - :type id: str - :param location: Resource location. - :type location: str - :param associations: Holds the associations the resource has with other resources in the - resource group. - :type associations: list[~azure.mgmt.network.v2017_08_01.models.TopologyAssociation] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, - } - - def __init__( - self, - **kwargs - ): - super(TopologyResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - self.location = kwargs.get('location', None) - self.associations = kwargs.get('associations', None) - - -class TroubleshootingDetails(msrest.serialization.Model): - """Information gained from troubleshooting of specified resource. - - :param id: The id of the get troubleshoot operation. - :type id: str - :param reason_type: Reason type of failure. - :type reason_type: str - :param summary: A summary of troubleshooting. - :type summary: str - :param detail: Details on troubleshooting results. - :type detail: str - :param recommended_actions: List of recommended actions. - :type recommended_actions: - list[~azure.mgmt.network.v2017_08_01.models.TroubleshootingRecommendedActions] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'reason_type': {'key': 'reasonType', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': 'str'}, - 'detail': {'key': 'detail', 'type': 'str'}, - 'recommended_actions': {'key': 'recommendedActions', 'type': '[TroubleshootingRecommendedActions]'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingDetails, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.reason_type = kwargs.get('reason_type', None) - self.summary = kwargs.get('summary', None) - self.detail = kwargs.get('detail', None) - self.recommended_actions = kwargs.get('recommended_actions', None) - - -class TroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to troubleshoot. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource to troubleshoot. - :type target_resource_id: str - :param storage_id: Required. The ID for the storage account to save the troubleshoot result. - :type storage_id: str - :param storage_path: Required. The path to the blob to save the troubleshoot result in. - :type storage_path: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'storage_path': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'storage_path': {'key': 'properties.storagePath', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.storage_id = kwargs['storage_id'] - self.storage_path = kwargs['storage_path'] - - -class TroubleshootingRecommendedActions(msrest.serialization.Model): - """Recommended actions based on discovered issues. - - :param action_id: ID of the recommended action. - :type action_id: str - :param action_text: Description of recommended actions. - :type action_text: str - :param action_uri: The uri linking to a documentation for the recommended troubleshooting - actions. - :type action_uri: str - :param action_uri_text: The information from the URI for the recommended troubleshooting - actions. - :type action_uri_text: str - """ - - _attribute_map = { - 'action_id': {'key': 'actionId', 'type': 'str'}, - 'action_text': {'key': 'actionText', 'type': 'str'}, - 'action_uri': {'key': 'actionUri', 'type': 'str'}, - 'action_uri_text': {'key': 'actionUriText', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingRecommendedActions, self).__init__(**kwargs) - self.action_id = kwargs.get('action_id', None) - self.action_text = kwargs.get('action_text', None) - self.action_uri = kwargs.get('action_uri', None) - self.action_uri_text = kwargs.get('action_uri_text', None) - - -class TroubleshootingResult(msrest.serialization.Model): - """Troubleshooting information gained from specified resource. - - :param start_time: The start time of the troubleshooting. - :type start_time: ~datetime.datetime - :param end_time: The end time of the troubleshooting. - :type end_time: ~datetime.datetime - :param code: The result code of the troubleshooting. - :type code: str - :param results: Information from troubleshooting. - :type results: list[~azure.mgmt.network.v2017_08_01.models.TroubleshootingDetails] - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingResult, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.code = kwargs.get('code', None) - self.results = kwargs.get('results', None) - - -class TunnelConnectionHealth(msrest.serialization.Model): - """VirtualNetworkGatewayConnection properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar tunnel: Tunnel name. - :vartype tunnel: str - :ivar connection_status: Virtual network Gateway connection status. Possible values include: - "Unknown", "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionStatus - :ivar ingress_bytes_transferred: The Ingress Bytes Transferred in this connection. - :vartype ingress_bytes_transferred: long - :ivar egress_bytes_transferred: The Egress Bytes Transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar last_connection_established_utc_time: The time at which connection was established in Utc - format. - :vartype last_connection_established_utc_time: str - """ - - _validation = { - 'tunnel': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'last_connection_established_utc_time': {'readonly': True}, - } - - _attribute_map = { - 'tunnel': {'key': 'tunnel', 'type': 'str'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, - 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, - 'last_connection_established_utc_time': {'key': 'lastConnectionEstablishedUtcTime', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TunnelConnectionHealth, self).__init__(**kwargs) - self.tunnel = None - self.connection_status = None - self.ingress_bytes_transferred = None - self.egress_bytes_transferred = None - self.last_connection_established_utc_time = None - - -class Usage(msrest.serialization.Model): - """Describes network resource usage. - - 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. - - :ivar id: Resource identifier. - :vartype id: str - :param unit: Required. An enum describing the unit of measurement. Possible values include: - "Count". - :type unit: str or ~azure.mgmt.network.v2017_08_01.models.UsageUnit - :param current_value: Required. The current value of the usage. - :type current_value: long - :param limit: Required. The limit of usage. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.network.v2017_08_01.models.UsageName - """ - - _validation = { - 'id': {'readonly': True}, - 'unit': {'required': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - def __init__( - self, - **kwargs - ): - super(Usage, self).__init__(**kwargs) - self.id = None - self.unit = kwargs['unit'] - self.current_value = kwargs['current_value'] - self.limit = kwargs['limit'] - self.name = kwargs['name'] - - -class UsageName(msrest.serialization.Model): - """The usage names. - - :param value: A string describing the resource name. - :type value: str - :param localized_value: A localized string describing the resource name. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) - - -class UsagesListResult(msrest.serialization.Model): - """The list usages operation response. - - :param value: The list network resource usages. - :type value: list[~azure.mgmt.network.v2017_08_01.models.Usage] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(UsagesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class VerificationIPFlowParameters(msrest.serialization.Model): - """Parameters that define the IP flow to be verified. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the target resource to perform next-hop on. - :type target_resource_id: str - :param direction: Required. The direction of the packet represented as a 5-tuple. Possible - values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_08_01.models.Direction - :param protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.Protocol - :param local_port: Required. The local port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type local_port: str - :param remote_port: Required. The remote port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type remote_port: str - :param local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 - addresses. - :type local_ip_address: str - :param remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 - addresses. - :type remote_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of them, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'direction': {'required': True}, - 'protocol': {'required': True}, - 'local_port': {'required': True}, - 'remote_port': {'required': True}, - 'local_ip_address': {'required': True}, - 'remote_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'direction': {'key': 'direction', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VerificationIPFlowParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.direction = kwargs['direction'] - self.protocol = kwargs['protocol'] - self.local_port = kwargs['local_port'] - self.remote_port = kwargs['remote_port'] - self.local_ip_address = kwargs['local_ip_address'] - self.remote_ip_address = kwargs['remote_ip_address'] - self.target_nic_resource_id = kwargs.get('target_nic_resource_id', None) - - -class VerificationIPFlowResult(msrest.serialization.Model): - """Results of IP flow verification on the target resource. - - :param access: Indicates whether the traffic is allowed or denied. Possible values include: - "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.Access - :param rule_name: Name of the rule. If input is not matched against any security rule, it is - not displayed. - :type rule_name: str - """ - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'rule_name': {'key': 'ruleName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VerificationIPFlowResult, self).__init__(**kwargs) - self.access = kwargs.get('access', None) - self.rule_name = kwargs.get('rule_name', None) - - -class VirtualNetwork(Resource): - """Virtual Network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_space: The AddressSpace that contains an array of IP address ranges that can be - used by subnets. - :type address_space: ~azure.mgmt.network.v2017_08_01.models.AddressSpace - :param dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs - deployed in the virtual network. - :type dhcp_options: ~azure.mgmt.network.v2017_08_01.models.DhcpOptions - :param subnets: A list of subnets in a Virtual Network. - :type subnets: list[~azure.mgmt.network.v2017_08_01.models.Subnet] - :param virtual_network_peerings: A list of peerings in a Virtual Network. - :type virtual_network_peerings: - list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering] - :param resource_guid: The resourceGuid property of the Virtual Network resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, - 'dhcp_options': {'key': 'properties.dhcpOptions', 'type': 'DhcpOptions'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'virtual_network_peerings': {'key': 'properties.virtualNetworkPeerings', 'type': '[VirtualNetworkPeering]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetwork, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.address_space = kwargs.get('address_space', None) - self.dhcp_options = kwargs.get('dhcp_options', None) - self.subnets = kwargs.get('subnets', None) - self.virtual_network_peerings = kwargs.get('virtual_network_peerings', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class VirtualNetworkConnectionGatewayReference(msrest.serialization.Model): - """A reference to VirtualNetworkGateway or LocalNetworkGateway resource. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkConnectionGatewayReference, self).__init__(**kwargs) - self.id = kwargs['id'] - - -class VirtualNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param ip_configurations: IP configurations for virtual network gateway. - :type ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayIPConfiguration] - :param gateway_type: The type of this virtual network gateway. Possible values are: 'Vpn' and - 'ExpressRoute'. Possible values include: "Vpn", "ExpressRoute". - :type gateway_type: str or ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayType - :param vpn_type: The type of this virtual network gateway. Possible values are: 'PolicyBased' - and 'RouteBased'. Possible values include: "PolicyBased", "RouteBased". - :type vpn_type: str or ~azure.mgmt.network.v2017_08_01.models.VpnType - :param enable_bgp: Whether BGP is enabled for this virtual network gateway or not. - :type enable_bgp: bool - :param active: ActiveActive flag. - :type active: bool - :param gateway_default_site: The reference of the LocalNetworkGateway resource which represents - local network site having default routes. Assign Null value in case of removing existing - default site setting. - :type gateway_default_site: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param sku: The reference of the VirtualNetworkGatewaySku resource which represents the SKU - selected for Virtual network gateway. - :type sku: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewaySku - :param vpn_client_configuration: The reference of the VpnClientConfiguration resource which - represents the P2S VpnClient configurations. - :type vpn_client_configuration: ~azure.mgmt.network.v2017_08_01.models.VpnClientConfiguration - :param bgp_settings: Virtual network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_08_01.models.BgpSettings - :param resource_guid: The resource GUID property of the VirtualNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGateway resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualNetworkGatewayIPConfiguration]'}, - 'gateway_type': {'key': 'properties.gatewayType', 'type': 'str'}, - 'vpn_type': {'key': 'properties.vpnType', 'type': 'str'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'active': {'key': 'properties.activeActive', 'type': 'bool'}, - 'gateway_default_site': {'key': 'properties.gatewayDefaultSite', 'type': 'SubResource'}, - 'sku': {'key': 'properties.sku', 'type': 'VirtualNetworkGatewaySku'}, - 'vpn_client_configuration': {'key': 'properties.vpnClientConfiguration', 'type': 'VpnClientConfiguration'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGateway, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.gateway_type = kwargs.get('gateway_type', None) - self.vpn_type = kwargs.get('vpn_type', None) - self.enable_bgp = kwargs.get('enable_bgp', None) - self.active = kwargs.get('active', None) - self.gateway_default_site = kwargs.get('gateway_default_site', None) - self.sku = kwargs.get('sku', None) - self.vpn_client_configuration = kwargs.get('vpn_client_configuration', None) - self.bgp_settings = kwargs.get('bgp_settings', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayConnection(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: ~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_08_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_08_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkGateway'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkGateway'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'LocalNetworkGateway'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayConnection, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.authorization_key = kwargs.get('authorization_key', None) - self.virtual_network_gateway1 = kwargs['virtual_network_gateway1'] - self.virtual_network_gateway2 = kwargs.get('virtual_network_gateway2', None) - self.local_network_gateway2 = kwargs.get('local_network_gateway2', None) - self.connection_type = kwargs['connection_type'] - self.routing_weight = kwargs.get('routing_weight', None) - self.shared_key = kwargs.get('shared_key', None) - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = kwargs.get('peer', None) - self.enable_bgp = kwargs.get('enable_bgp', None) - self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) - self.ipsec_policies = kwargs.get('ipsec_policies', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListEntity(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkConnectionGatewayReference - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkConnectionGatewayReference - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkConnectionGatewayReference - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_08_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_08_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListEntity, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.authorization_key = kwargs.get('authorization_key', None) - self.virtual_network_gateway1 = kwargs['virtual_network_gateway1'] - self.virtual_network_gateway2 = kwargs.get('virtual_network_gateway2', None) - self.local_network_gateway2 = kwargs.get('local_network_gateway2', None) - self.connection_type = kwargs['connection_type'] - self.routing_weight = kwargs.get('routing_weight', None) - self.shared_key = kwargs.get('shared_key', None) - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = kwargs.get('peer', None) - self.enable_bgp = kwargs.get('enable_bgp', None) - self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) - self.ipsec_policies = kwargs.get('ipsec_policies', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGatewayConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnection] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnection]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class VirtualNetworkGatewayIPConfiguration(SubResource): - """IP configuration for virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.SubResource - :ivar provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayListConnectionsResult(msrest.serialization.Model): - """Response for the VirtualNetworkGatewayListConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: - list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionListEntity] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnectionListEntity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayListConnectionsResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class VirtualNetworkGatewayListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGateway resources that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class VirtualNetworkGatewaySku(msrest.serialization.Model): - """VirtualNetworkGatewaySku details. - - :param name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type name: str or ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewaySkuName - :param tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type tier: str or ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewaySkuTier - :param capacity: The capacity. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewaySku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - - -class VirtualNetworkListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworks API service call. - - :param value: Gets a list of VirtualNetwork resources in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetwork] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class VirtualNetworkListUsageResult(msrest.serialization.Model): - """Response for the virtual networks GetUsage API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: VirtualNetwork usage stats. - :vartype value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkUsage] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkListUsageResult, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class VirtualNetworkPeering(SubResource): - """Peerings in a virtual network resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allow_virtual_network_access: Whether the VMs in the linked virtual network space would - be able to access all the VMs in local Virtual network space. - :type allow_virtual_network_access: bool - :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the remote - virtual network will be allowed/disallowed. - :type allow_forwarded_traffic: bool - :param allow_gateway_transit: If gateway links can be used in remote virtual networking to link - to this virtual network. - :type allow_gateway_transit: bool - :param use_remote_gateways: If remote gateways can be used on this virtual network. If the flag - is set to true, and allowGatewayTransit on remote peering is also true, virtual network will - use gateways of remote virtual network for transit. Only one peering can have this flag set to - true. This flag cannot be set if virtual network already has a gateway. - :type use_remote_gateways: bool - :param remote_virtual_network: The reference of the remote virtual network. - :type remote_virtual_network: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param peering_state: The status of the virtual network peering. Possible values are - 'Initiated', 'Connected', and 'Disconnected'. Possible values include: "Initiated", - "Connected", "Disconnected". - :type peering_state: str or ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeeringState - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, - 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, - 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, - 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, - 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, - 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkPeering, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.allow_virtual_network_access = kwargs.get('allow_virtual_network_access', None) - self.allow_forwarded_traffic = kwargs.get('allow_forwarded_traffic', None) - self.allow_gateway_transit = kwargs.get('allow_gateway_transit', None) - self.use_remote_gateways = kwargs.get('use_remote_gateways', None) - self.remote_virtual_network = kwargs.get('remote_virtual_network', None) - self.peering_state = kwargs.get('peering_state', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class VirtualNetworkPeeringListResult(msrest.serialization.Model): - """Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. - - :param value: The peerings in a virtual network. - :type value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkPeeringListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class VirtualNetworkUsage(msrest.serialization.Model): - """Usage details for subnet. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar current_value: Indicates number of IPs used from the Subnet. - :vartype current_value: float - :ivar id: Subnet identifier. - :vartype id: str - :ivar limit: Indicates the size of the subnet. - :vartype limit: float - :ivar name: The name containing common and localized value for usage. - :vartype name: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkUsageName - :ivar unit: Usage units. Returns 'Count'. - :vartype unit: str - """ - - _validation = { - 'current_value': {'readonly': True}, - 'id': {'readonly': True}, - 'limit': {'readonly': True}, - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'id': {'key': 'id', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'name': {'key': 'name', 'type': 'VirtualNetworkUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsage, self).__init__(**kwargs) - self.current_value = None - self.id = None - self.limit = None - self.name = None - self.unit = None - - -class VirtualNetworkUsageName(msrest.serialization.Model): - """Usage strings container. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar localized_value: Localized subnet size and usage string. - :vartype localized_value: str - :ivar value: Subnet size and usage string. - :vartype value: str - """ - - _validation = { - 'localized_value': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsageName, self).__init__(**kwargs) - self.localized_value = None - self.value = None - - -class VpnClientConfiguration(msrest.serialization.Model): - """VpnClientConfiguration for P2S client. - - :param vpn_client_address_pool: The reference of the address space resource which represents - Address space for P2S VpnClient. - :type vpn_client_address_pool: ~azure.mgmt.network.v2017_08_01.models.AddressSpace - :param vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. - :type vpn_client_root_certificates: - list[~azure.mgmt.network.v2017_08_01.models.VpnClientRootCertificate] - :param vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network - gateway. - :type vpn_client_revoked_certificates: - list[~azure.mgmt.network.v2017_08_01.models.VpnClientRevokedCertificate] - :param vpn_client_protocols: VpnClientProtocols for Virtual network gateway. - :type vpn_client_protocols: list[str or - ~azure.mgmt.network.v2017_08_01.models.VpnClientProtocol] - :param radius_server_address: The radius server address property of the VirtualNetworkGateway - resource for vpn client connection. - :type radius_server_address: str - :param radius_server_secret: The radius secret property of the VirtualNetworkGateway resource - for vpn client connection. - :type radius_server_secret: str - """ - - _attribute_map = { - 'vpn_client_address_pool': {'key': 'vpnClientAddressPool', 'type': 'AddressSpace'}, - 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, - 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, - 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, - 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, - 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientConfiguration, self).__init__(**kwargs) - self.vpn_client_address_pool = kwargs.get('vpn_client_address_pool', None) - self.vpn_client_root_certificates = kwargs.get('vpn_client_root_certificates', None) - self.vpn_client_revoked_certificates = kwargs.get('vpn_client_revoked_certificates', None) - self.vpn_client_protocols = kwargs.get('vpn_client_protocols', None) - self.radius_server_address = kwargs.get('radius_server_address', None) - self.radius_server_secret = kwargs.get('radius_server_secret', None) - - -class VpnClientParameters(msrest.serialization.Model): - """Vpn Client Parameters for package generation. - - :param processor_architecture: VPN client Processor Architecture. Possible values are: 'AMD64' - and 'X86'. Possible values include: "Amd64", "X86". - :type processor_architecture: str or - ~azure.mgmt.network.v2017_08_01.models.ProcessorArchitecture - :param authentication_method: VPN client Authentication Method. Possible values are: 'EAPTLS' - and 'EAPMSCHAPv2'. Possible values include: "EAPTLS", "EAPMSCHAPv2". - :type authentication_method: str or ~azure.mgmt.network.v2017_08_01.models.AuthenticationMethod - :param radius_server_auth_certificate: The public certificate data for the radius server - authentication certificate as a Base-64 encoded string. Required only if external radius - authentication has been configured with EAPTLS authentication. - :type radius_server_auth_certificate: str - :param client_root_certificates: A list of client root certificates public certificate data - encoded as Base-64 strings. Optional parameter for external radius based authentication with - EAPTLS. - :type client_root_certificates: list[str] - """ - - _attribute_map = { - 'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'}, - 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, - 'radius_server_auth_certificate': {'key': 'radiusServerAuthCertificate', 'type': 'str'}, - 'client_root_certificates': {'key': 'clientRootCertificates', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientParameters, self).__init__(**kwargs) - self.processor_architecture = kwargs.get('processor_architecture', None) - self.authentication_method = kwargs.get('authentication_method', None) - self.radius_server_auth_certificate = kwargs.get('radius_server_auth_certificate', None) - self.client_root_certificates = kwargs.get('client_root_certificates', None) - - -class VpnClientRevokedCertificate(SubResource): - """VPN client revoked certificate of virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param thumbprint: The revoked VPN client certificate thumbprint. - :type thumbprint: str - :ivar provisioning_state: The provisioning state of the VPN client revoked certificate - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientRevokedCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.provisioning_state = None - - -class VpnClientRootCertificate(SubResource): - """VPN client root certificate of virtual network gateway. - - 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 id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param public_cert_data: Required. The certificate public data. - :type public_cert_data: str - :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'public_cert_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientRootCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.public_cert_data = kwargs['public_cert_data'] - self.provisioning_state = None diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_models_py3.py deleted file mode 100644 index b5c63073c922..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_models_py3.py +++ /dev/null @@ -1,8826 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Dict, List, Optional, Union - -import msrest.serialization - -from ._network_management_client_enums import * - - -class AddressSpace(msrest.serialization.Model): - """AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. - - :param address_prefixes: A list of address blocks reserved for this virtual network in CIDR - notation. - :type address_prefixes: list[str] - """ - - _attribute_map = { - 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, - } - - def __init__( - self, - *, - address_prefixes: Optional[List[str]] = None, - **kwargs - ): - super(AddressSpace, self).__init__(**kwargs) - self.address_prefixes = address_prefixes - - -class Resource(msrest.serialization.Model): - """Common resource representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ApplicationGateway(Resource): - """Application gateway resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param sku: SKU of the application gateway resource. - :type sku: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySku - :param ssl_policy: SSL policy of the application gateway resource. - :type ssl_policy: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPolicy - :ivar operational_state: Operational state of the application gateway resource. Possible values - include: "Stopped", "Starting", "Running", "Stopping". - :vartype operational_state: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayOperationalState - :param gateway_ip_configurations: Subnets of application the gateway resource. - :type gateway_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayIPConfiguration] - :param authentication_certificates: Authentication certificates of the application gateway - resource. - :type authentication_certificates: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayAuthenticationCertificate] - :param ssl_certificates: SSL certificates of the application gateway resource. - :type ssl_certificates: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslCertificate] - :param frontend_ip_configurations: Frontend IP addresses of the application gateway resource. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFrontendIPConfiguration] - :param frontend_ports: Frontend ports of the application gateway resource. - :type frontend_ports: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFrontendPort] - :param probes: Probes of the application gateway resource. - :type probes: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProbe] - :param backend_address_pools: Backend address pool of the application gateway resource. - :type backend_address_pools: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendAddressPool] - :param backend_http_settings_collection: Backend http settings of the application gateway - resource. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHttpSettings] - :param http_listeners: Http listeners of the application gateway resource. - :type http_listeners: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayHttpListener] - :param url_path_maps: URL path map of the application gateway resource. - :type url_path_maps: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayUrlPathMap] - :param request_routing_rules: Request routing rules of the application gateway resource. - :type request_routing_rules: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayRequestRoutingRule] - :param redirect_configurations: Redirect configurations of the application gateway resource. - :type redirect_configurations: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayRedirectConfiguration] - :param web_application_firewall_configuration: Web application firewall configuration. - :type web_application_firewall_configuration: - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayWebApplicationFirewallConfiguration - :param resource_guid: Resource GUID property of the application gateway resource. - :type resource_guid: str - :param provisioning_state: Provisioning state of the application gateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'operational_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'ApplicationGatewaySku'}, - 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, - 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, - 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, - 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, - 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, - 'probes': {'key': 'properties.probes', 'type': '[ApplicationGatewayProbe]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'backend_http_settings_collection': {'key': 'properties.backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHttpSettings]'}, - 'http_listeners': {'key': 'properties.httpListeners', 'type': '[ApplicationGatewayHttpListener]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[ApplicationGatewayUrlPathMap]'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[ApplicationGatewayRequestRoutingRule]'}, - 'redirect_configurations': {'key': 'properties.redirectConfigurations', 'type': '[ApplicationGatewayRedirectConfiguration]'}, - 'web_application_firewall_configuration': {'key': 'properties.webApplicationFirewallConfiguration', 'type': 'ApplicationGatewayWebApplicationFirewallConfiguration'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - sku: Optional["ApplicationGatewaySku"] = None, - ssl_policy: Optional["ApplicationGatewaySslPolicy"] = None, - gateway_ip_configurations: Optional[List["ApplicationGatewayIPConfiguration"]] = None, - authentication_certificates: Optional[List["ApplicationGatewayAuthenticationCertificate"]] = None, - ssl_certificates: Optional[List["ApplicationGatewaySslCertificate"]] = None, - frontend_ip_configurations: Optional[List["ApplicationGatewayFrontendIPConfiguration"]] = None, - frontend_ports: Optional[List["ApplicationGatewayFrontendPort"]] = None, - probes: Optional[List["ApplicationGatewayProbe"]] = None, - backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, - backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHttpSettings"]] = None, - http_listeners: Optional[List["ApplicationGatewayHttpListener"]] = None, - url_path_maps: Optional[List["ApplicationGatewayUrlPathMap"]] = None, - request_routing_rules: Optional[List["ApplicationGatewayRequestRoutingRule"]] = None, - redirect_configurations: Optional[List["ApplicationGatewayRedirectConfiguration"]] = None, - web_application_firewall_configuration: Optional["ApplicationGatewayWebApplicationFirewallConfiguration"] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.sku = sku - self.ssl_policy = ssl_policy - self.operational_state = None - self.gateway_ip_configurations = gateway_ip_configurations - self.authentication_certificates = authentication_certificates - self.ssl_certificates = ssl_certificates - self.frontend_ip_configurations = frontend_ip_configurations - self.frontend_ports = frontend_ports - self.probes = probes - self.backend_address_pools = backend_address_pools - self.backend_http_settings_collection = backend_http_settings_collection - self.http_listeners = http_listeners - self.url_path_maps = url_path_maps - self.request_routing_rules = request_routing_rules - self.redirect_configurations = redirect_configurations - self.web_application_firewall_configuration = web_application_firewall_configuration - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class SubResource(msrest.serialization.Model): - """Reference to another subresource. - - :param id: Resource ID. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - super(SubResource, self).__init__(**kwargs) - self.id = id - - -class ApplicationGatewayAuthenticationCertificate(SubResource): - """Authentication certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Certificate public data. - :type data: str - :param provisioning_state: Provisioning state of the authentication certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - data: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayAuthenticationCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.data = data - self.provisioning_state = provisioning_state - - -class ApplicationGatewayAvailableSslOptions(Resource): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param predefined_policies: List of available Ssl predefined policy. - :type predefined_policies: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param default_policy: Name of the Ssl predefined policy applied by default to application - gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", - "AppGwSslPolicy20170401S". - :type default_policy: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPolicyName - :param available_cipher_suites: List of available Ssl cipher suites. - :type available_cipher_suites: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslCipherSuite] - :param available_protocols: List of available Ssl protocols. - :type available_protocols: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslProtocol] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'predefined_policies': {'key': 'properties.predefinedPolicies', 'type': '[SubResource]'}, - 'default_policy': {'key': 'properties.defaultPolicy', 'type': 'str'}, - 'available_cipher_suites': {'key': 'properties.availableCipherSuites', 'type': '[str]'}, - 'available_protocols': {'key': 'properties.availableProtocols', 'type': '[str]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - predefined_policies: Optional[List["SubResource"]] = None, - default_policy: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, - available_cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, - available_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, - **kwargs - ): - super(ApplicationGatewayAvailableSslOptions, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.predefined_policies = predefined_policies - self.default_policy = default_policy - self.available_cipher_suites = available_cipher_suites - self.available_protocols = available_protocols - - -class ApplicationGatewayAvailableSslPredefinedPolicies(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - :param value: List of available Ssl predefined policy. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPredefinedPolicy] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewaySslPredefinedPolicy]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationGatewaySslPredefinedPolicy"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayAvailableSslPredefinedPolicies, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApplicationGatewayAvailableWafRuleSetsResult(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableWafRuleSets API service call. - - :param value: The list of application gateway rule sets. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallRuleSet] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationGatewayFirewallRuleSet"]] = None, - **kwargs - ): - super(ApplicationGatewayAvailableWafRuleSetsResult, self).__init__(**kwargs) - self.value = value - - -class ApplicationGatewayBackendAddress(msrest.serialization.Model): - """Backend address of an application gateway. - - :param fqdn: Fully qualified domain name (FQDN). - :type fqdn: str - :param ip_address: IP address. - :type ip_address: str - """ - - _attribute_map = { - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__( - self, - *, - fqdn: Optional[str] = None, - ip_address: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayBackendAddress, self).__init__(**kwargs) - self.fqdn = fqdn - self.ip_address = ip_address - - -class ApplicationGatewayBackendAddressPool(SubResource): - """Backend Address Pool of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Resource that is unique within a resource group. This name can be used to access - the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param backend_ip_configurations: Collection of references to IPs defined in network - interfaces. - :type backend_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration] - :param backend_addresses: Backend addresses. - :type backend_addresses: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendAddress] - :param provisioning_state: Provisioning state of the backend address pool resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'backend_addresses': {'key': 'properties.backendAddresses', 'type': '[ApplicationGatewayBackendAddress]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - backend_ip_configurations: Optional[List["NetworkInterfaceIPConfiguration"]] = None, - backend_addresses: Optional[List["ApplicationGatewayBackendAddress"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayBackendAddressPool, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.backend_ip_configurations = backend_ip_configurations - self.backend_addresses = backend_addresses - self.provisioning_state = provisioning_state - - -class ApplicationGatewayBackendHealth(msrest.serialization.Model): - """List of ApplicationGatewayBackendHealthPool resources. - - :param backend_address_pools: - :type backend_address_pools: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealthPool] - """ - - _attribute_map = { - 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, - } - - def __init__( - self, - *, - backend_address_pools: Optional[List["ApplicationGatewayBackendHealthPool"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealth, self).__init__(**kwargs) - self.backend_address_pools = backend_address_pools - - -class ApplicationGatewayBackendHealthHttpSettings(msrest.serialization.Model): - """Application gateway BackendHealthHttp settings. - - :param backend_http_settings: Reference of an ApplicationGatewayBackendHttpSettings resource. - :type backend_http_settings: - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHttpSettings - :param servers: List of ApplicationGatewayBackendHealthServer resources. - :type servers: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealthServer] - """ - - _attribute_map = { - 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'ApplicationGatewayBackendHttpSettings'}, - 'servers': {'key': 'servers', 'type': '[ApplicationGatewayBackendHealthServer]'}, - } - - def __init__( - self, - *, - backend_http_settings: Optional["ApplicationGatewayBackendHttpSettings"] = None, - servers: Optional[List["ApplicationGatewayBackendHealthServer"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealthHttpSettings, self).__init__(**kwargs) - self.backend_http_settings = backend_http_settings - self.servers = servers - - -class ApplicationGatewayBackendHealthPool(msrest.serialization.Model): - """Application gateway BackendHealth pool. - - :param backend_address_pool: Reference of an ApplicationGatewayBackendAddressPool resource. - :type backend_address_pool: - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendAddressPool - :param backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings - resources. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealthHttpSettings] - """ - - _attribute_map = { - 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, - 'backend_http_settings_collection': {'key': 'backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHealthHttpSettings]'}, - } - - def __init__( - self, - *, - backend_address_pool: Optional["ApplicationGatewayBackendAddressPool"] = None, - backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHealthHttpSettings"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealthPool, self).__init__(**kwargs) - self.backend_address_pool = backend_address_pool - self.backend_http_settings_collection = backend_http_settings_collection - - -class ApplicationGatewayBackendHealthServer(msrest.serialization.Model): - """Application gateway backendhealth http settings. - - :param address: IP address or FQDN of backend server. - :type address: str - :param ip_configuration: Reference of IP configuration of backend server. - :type ip_configuration: ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration - :param health: Health of backend server. Possible values include: "Unknown", "Up", "Down", - "Partial", "Draining". - :type health: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendHealthServerHealth - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'health': {'key': 'health', 'type': 'str'}, - } - - def __init__( - self, - *, - address: Optional[str] = None, - ip_configuration: Optional["NetworkInterfaceIPConfiguration"] = None, - health: Optional[Union[str, "ApplicationGatewayBackendHealthServerHealth"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealthServer, self).__init__(**kwargs) - self.address = address - self.ip_configuration = ip_configuration - self.health = health - - -class ApplicationGatewayBackendHttpSettings(SubResource): - """Backend address pool settings of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Port. - :type port: int - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProtocol - :param cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", - "Disabled". - :type cookie_based_affinity: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayCookieBasedAffinity - :param request_timeout: Request timeout in seconds. Application Gateway will fail the request - if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 - seconds. - :type request_timeout: int - :param probe: Probe resource of an application gateway. - :type probe: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param authentication_certificates: Array of references to application gateway authentication - certificates. - :type authentication_certificates: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param connection_draining: Connection draining of the backend http settings resource. - :type connection_draining: - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayConnectionDraining - :param host_name: Host header to be sent to the backend servers. - :type host_name: str - :param pick_host_name_from_backend_address: Whether to pick host header should be picked from - the host name of the backend server. Default value is false. - :type pick_host_name_from_backend_address: bool - :param affinity_cookie_name: Cookie name to use for the affinity cookie. - :type affinity_cookie_name: str - :param probe_enabled: Whether the probe is enabled. Default value is false. - :type probe_enabled: bool - :param path: Path which should be used as a prefix for all HTTP requests. Null means no path - will be prefixed. Default value is null. - :type path: str - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'cookie_based_affinity': {'key': 'properties.cookieBasedAffinity', 'type': 'str'}, - 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, - 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, - 'affinity_cookie_name': {'key': 'properties.affinityCookieName', 'type': 'str'}, - 'probe_enabled': {'key': 'properties.probeEnabled', 'type': 'bool'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - port: Optional[int] = None, - protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, - cookie_based_affinity: Optional[Union[str, "ApplicationGatewayCookieBasedAffinity"]] = None, - request_timeout: Optional[int] = None, - probe: Optional["SubResource"] = None, - authentication_certificates: Optional[List["SubResource"]] = None, - connection_draining: Optional["ApplicationGatewayConnectionDraining"] = None, - host_name: Optional[str] = None, - pick_host_name_from_backend_address: Optional[bool] = None, - affinity_cookie_name: Optional[str] = None, - probe_enabled: Optional[bool] = None, - path: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayBackendHttpSettings, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.port = port - self.protocol = protocol - self.cookie_based_affinity = cookie_based_affinity - self.request_timeout = request_timeout - self.probe = probe - self.authentication_certificates = authentication_certificates - self.connection_draining = connection_draining - self.host_name = host_name - self.pick_host_name_from_backend_address = pick_host_name_from_backend_address - self.affinity_cookie_name = affinity_cookie_name - self.probe_enabled = probe_enabled - self.path = path - self.provisioning_state = provisioning_state - - -class ApplicationGatewayConnectionDraining(msrest.serialization.Model): - """Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether connection draining is enabled or not. - :type enabled: bool - :param drain_timeout_in_sec: Required. The number of seconds connection draining is active. - Acceptable values are from 1 second to 3600 seconds. - :type drain_timeout_in_sec: int - """ - - _validation = { - 'enabled': {'required': True}, - 'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'}, - } - - def __init__( - self, - *, - enabled: bool, - drain_timeout_in_sec: int, - **kwargs - ): - super(ApplicationGatewayConnectionDraining, self).__init__(**kwargs) - self.enabled = enabled - self.drain_timeout_in_sec = drain_timeout_in_sec - - -class ApplicationGatewayFirewallDisabledRuleGroup(msrest.serialization.Model): - """Allows to disable rules within a rule group or an entire rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the rule group that will be disabled. - :type rule_group_name: str - :param rules: The list of rules that will be disabled. If null, all rules of the rule group - will be disabled. - :type rules: list[int] - """ - - _validation = { - 'rule_group_name': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[int]'}, - } - - def __init__( - self, - *, - rule_group_name: str, - rules: Optional[List[int]] = None, - **kwargs - ): - super(ApplicationGatewayFirewallDisabledRuleGroup, self).__init__(**kwargs) - self.rule_group_name = rule_group_name - self.rules = rules - - -class ApplicationGatewayFirewallRule(msrest.serialization.Model): - """A web application firewall rule. - - All required parameters must be populated in order to send to Azure. - - :param rule_id: Required. The identifier of the web application firewall rule. - :type rule_id: int - :param description: The description of the web application firewall rule. - :type description: str - """ - - _validation = { - 'rule_id': {'required': True}, - } - - _attribute_map = { - 'rule_id': {'key': 'ruleId', 'type': 'int'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - rule_id: int, - description: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFirewallRule, self).__init__(**kwargs) - self.rule_id = rule_id - self.description = description - - -class ApplicationGatewayFirewallRuleGroup(msrest.serialization.Model): - """A web application firewall rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the web application firewall rule group. - :type rule_group_name: str - :param description: The description of the web application firewall rule group. - :type description: str - :param rules: Required. The rules of the web application firewall rule group. - :type rules: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallRule] - """ - - _validation = { - 'rule_group_name': {'required': True}, - 'rules': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[ApplicationGatewayFirewallRule]'}, - } - - def __init__( - self, - *, - rule_group_name: str, - rules: List["ApplicationGatewayFirewallRule"], - description: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFirewallRuleGroup, self).__init__(**kwargs) - self.rule_group_name = rule_group_name - self.description = description - self.rules = rules - - -class ApplicationGatewayFirewallRuleSet(Resource): - """A web application firewall rule set. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the web application firewall rule set. - :type provisioning_state: str - :param rule_set_type: The type of the web application firewall rule set. - :type rule_set_type: str - :param rule_set_version: The version of the web application firewall rule set type. - :type rule_set_version: str - :param rule_groups: The rule groups of the web application firewall rule set. - :type rule_groups: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallRuleGroup] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, - 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ApplicationGatewayFirewallRuleGroup]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - provisioning_state: Optional[str] = None, - rule_set_type: Optional[str] = None, - rule_set_version: Optional[str] = None, - rule_groups: Optional[List["ApplicationGatewayFirewallRuleGroup"]] = None, - **kwargs - ): - super(ApplicationGatewayFirewallRuleSet, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.provisioning_state = provisioning_state - self.rule_set_type = rule_set_type - self.rule_set_version = rule_set_version - self.rule_groups = rule_groups - - -class ApplicationGatewayFrontendIPConfiguration(SubResource): - """Frontend IP configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param private_ip_address: PrivateIPAddress of the network interface IP Configuration. - :type private_ip_address: str - :param private_ip_allocation_method: PrivateIP allocation method. Possible values include: - "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param subnet: Reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param public_ip_address: Reference of the PublicIP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Provisioning state of the public IP resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["SubResource"] = None, - public_ip_address: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFrontendIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class ApplicationGatewayFrontendPort(SubResource): - """Frontend port of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Frontend port. - :type port: int - :param provisioning_state: Provisioning state of the frontend port resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - port: Optional[int] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFrontendPort, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.port = port - self.provisioning_state = provisioning_state - - -class ApplicationGatewayHttpListener(SubResource): - """Http listener of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param frontend_ip_configuration: Frontend IP configuration resource of an application gateway. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param frontend_port: Frontend port resource of an application gateway. - :type frontend_port: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProtocol - :param host_name: Host name of HTTP listener. - :type host_name: str - :param ssl_certificate: SSL certificate resource of an application gateway. - :type ssl_certificate: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param require_server_name_indication: Applicable only if protocol is https. Enables SNI for - multi-hosting. - :type require_server_name_indication: bool - :param provisioning_state: Provisioning state of the HTTP listener resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, - 'require_server_name_indication': {'key': 'properties.requireServerNameIndication', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - frontend_port: Optional["SubResource"] = None, - protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, - host_name: Optional[str] = None, - ssl_certificate: Optional["SubResource"] = None, - require_server_name_indication: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayHttpListener, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.frontend_ip_configuration = frontend_ip_configuration - self.frontend_port = frontend_port - self.protocol = protocol - self.host_name = host_name - self.ssl_certificate = ssl_certificate - self.require_server_name_indication = require_server_name_indication - self.provisioning_state = provisioning_state - - -class ApplicationGatewayIPConfiguration(SubResource): - """IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param subnet: Reference of the subnet resource. A subnet from where application gateway gets - its private address. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Provisioning state of the application gateway subnet resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - subnet: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.subnet = subnet - self.provisioning_state = provisioning_state - - -class ApplicationGatewayListResult(msrest.serialization.Model): - """Response for ListApplicationGateways API service call. - - :param value: List of an application gateways in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGateway] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationGateway"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApplicationGatewayPathRule(SubResource): - """Path rule of URL path map of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param paths: Path rules of URL path map. - :type paths: list[str] - :param backend_address_pool: Backend address pool resource of URL path map path rule. - :type backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param backend_http_settings: Backend http settings resource of URL path map path rule. - :type backend_http_settings: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of URL path map path rule. - :type redirect_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Path rule of URL path map resource. Possible values are: 'Updating', - 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'paths': {'key': 'properties.paths', 'type': '[str]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - paths: Optional[List[str]] = None, - backend_address_pool: Optional["SubResource"] = None, - backend_http_settings: Optional["SubResource"] = None, - redirect_configuration: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayPathRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.paths = paths - self.backend_address_pool = backend_address_pool - self.backend_http_settings = backend_http_settings - self.redirect_configuration = redirect_configuration - self.provisioning_state = provisioning_state - - -class ApplicationGatewayProbe(SubResource): - """Probe of the application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProtocol - :param host: Host name to send the probe to. - :type host: str - :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. - :type path: str - :param interval: The probing interval in seconds. This is the time interval between two - consecutive probes. Acceptable values are from 1 second to 86400 seconds. - :type interval: int - :param timeout: the probe timeout in seconds. Probe marked as failed if valid response is not - received with this timeout period. Acceptable values are from 1 second to 86400 seconds. - :type timeout: int - :param unhealthy_threshold: The probe retry count. Backend server is marked down after - consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second - to 20. - :type unhealthy_threshold: int - :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from - the backend http settings. Default value is false. - :type pick_host_name_from_backend_http_settings: bool - :param min_servers: Minimum number of servers that are always marked healthy. Default value is - 0. - :type min_servers: int - :param match: Criterion for classifying a healthy probe response. - :type match: ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayProbeHealthResponseMatch - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host': {'key': 'properties.host', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'timeout': {'key': 'properties.timeout', 'type': 'int'}, - 'unhealthy_threshold': {'key': 'properties.unhealthyThreshold', 'type': 'int'}, - 'pick_host_name_from_backend_http_settings': {'key': 'properties.pickHostNameFromBackendHttpSettings', 'type': 'bool'}, - 'min_servers': {'key': 'properties.minServers', 'type': 'int'}, - 'match': {'key': 'properties.match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, - host: Optional[str] = None, - path: Optional[str] = None, - interval: Optional[int] = None, - timeout: Optional[int] = None, - unhealthy_threshold: Optional[int] = None, - pick_host_name_from_backend_http_settings: Optional[bool] = None, - min_servers: Optional[int] = None, - match: Optional["ApplicationGatewayProbeHealthResponseMatch"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayProbe, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.protocol = protocol - self.host = host - self.path = path - self.interval = interval - self.timeout = timeout - self.unhealthy_threshold = unhealthy_threshold - self.pick_host_name_from_backend_http_settings = pick_host_name_from_backend_http_settings - self.min_servers = min_servers - self.match = match - self.provisioning_state = provisioning_state - - -class ApplicationGatewayProbeHealthResponseMatch(msrest.serialization.Model): - """Application gateway probe health response match. - - :param body: Body that must be contained in the health response. Default value is empty. - :type body: str - :param status_codes: Allowed ranges of healthy status codes. Default range of healthy status - codes is 200-399. - :type status_codes: list[str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'status_codes': {'key': 'statusCodes', 'type': '[str]'}, - } - - def __init__( - self, - *, - body: Optional[str] = None, - status_codes: Optional[List[str]] = None, - **kwargs - ): - super(ApplicationGatewayProbeHealthResponseMatch, self).__init__(**kwargs) - self.body = body - self.status_codes = status_codes - - -class ApplicationGatewayRedirectConfiguration(SubResource): - """Redirect configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param redirect_type: Supported http redirection types - Permanent, Temporary, Found, SeeOther. - Possible values include: "Permanent", "Found", "SeeOther", "Temporary". - :type redirect_type: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayRedirectType - :param target_listener: Reference to a listener to redirect the request to. - :type target_listener: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param target_url: Url to redirect the request to. - :type target_url: str - :param include_path: Include path in the redirected url. - :type include_path: bool - :param include_query_string: Include query string in the redirected url. - :type include_query_string: bool - :param request_routing_rules: Request routing specifying redirect configuration. - :type request_routing_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param url_path_maps: Url path maps specifying default redirect configuration. - :type url_path_maps: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param path_rules: Path rules specifying redirect configuration. - :type path_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'redirect_type': {'key': 'properties.redirectType', 'type': 'str'}, - 'target_listener': {'key': 'properties.targetListener', 'type': 'SubResource'}, - 'target_url': {'key': 'properties.targetUrl', 'type': 'str'}, - 'include_path': {'key': 'properties.includePath', 'type': 'bool'}, - 'include_query_string': {'key': 'properties.includeQueryString', 'type': 'bool'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[SubResource]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[SubResource]'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[SubResource]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - redirect_type: Optional[Union[str, "ApplicationGatewayRedirectType"]] = None, - target_listener: Optional["SubResource"] = None, - target_url: Optional[str] = None, - include_path: Optional[bool] = None, - include_query_string: Optional[bool] = None, - request_routing_rules: Optional[List["SubResource"]] = None, - url_path_maps: Optional[List["SubResource"]] = None, - path_rules: Optional[List["SubResource"]] = None, - **kwargs - ): - super(ApplicationGatewayRedirectConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.redirect_type = redirect_type - self.target_listener = target_listener - self.target_url = target_url - self.include_path = include_path - self.include_query_string = include_query_string - self.request_routing_rules = request_routing_rules - self.url_path_maps = url_path_maps - self.path_rules = path_rules - - -class ApplicationGatewayRequestRoutingRule(SubResource): - """Request routing rule of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". - :type rule_type: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayRequestRoutingRuleType - :param backend_address_pool: Backend address pool resource of the application gateway. - :type backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param backend_http_settings: Frontend port resource of the application gateway. - :type backend_http_settings: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param http_listener: Http listener resource of the application gateway. - :type http_listener: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param url_path_map: URL path map resource of the application gateway. - :type url_path_map: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of the application gateway. - :type redirect_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Provisioning state of the request routing rule resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'http_listener': {'key': 'properties.httpListener', 'type': 'SubResource'}, - 'url_path_map': {'key': 'properties.urlPathMap', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - rule_type: Optional[Union[str, "ApplicationGatewayRequestRoutingRuleType"]] = None, - backend_address_pool: Optional["SubResource"] = None, - backend_http_settings: Optional["SubResource"] = None, - http_listener: Optional["SubResource"] = None, - url_path_map: Optional["SubResource"] = None, - redirect_configuration: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayRequestRoutingRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.rule_type = rule_type - self.backend_address_pool = backend_address_pool - self.backend_http_settings = backend_http_settings - self.http_listener = http_listener - self.url_path_map = url_path_map - self.redirect_configuration = redirect_configuration - self.provisioning_state = provisioning_state - - -class ApplicationGatewaySku(msrest.serialization.Model): - """SKU of an application gateway. - - :param name: Name of an application gateway SKU. Possible values include: "Standard_Small", - "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large". - :type name: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySkuName - :param tier: Tier of an application gateway. Possible values include: "Standard", "WAF". - :type tier: str or ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayTier - :param capacity: Capacity (instance count) of an application gateway. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "ApplicationGatewaySkuName"]] = None, - tier: Optional[Union[str, "ApplicationGatewayTier"]] = None, - capacity: Optional[int] = None, - **kwargs - ): - super(ApplicationGatewaySku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - - -class ApplicationGatewaySslCertificate(SubResource): - """SSL certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Base-64 encoded pfx certificate. Only applicable in PUT Request. - :type data: str - :param password: Password for the pfx file specified in data. Only applicable in PUT request. - :type password: str - :param public_cert_data: Base-64 encoded Public cert data corresponding to pfx specified in - data. Only applicable in GET request. - :type public_cert_data: str - :param provisioning_state: Provisioning state of the SSL certificate resource Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - data: Optional[str] = None, - password: Optional[str] = None, - public_cert_data: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewaySslCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.data = data - self.password = password - self.public_cert_data = public_cert_data - self.provisioning_state = provisioning_state - - -class ApplicationGatewaySslPolicy(msrest.serialization.Model): - """Application Gateway Ssl policy. - - :param disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. - :type disabled_ssl_protocols: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslProtocol] - :param policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". - :type policy_type: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPolicyType - :param policy_name: Name of Ssl predefined policy. Possible values include: - "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". - :type policy_name: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslPolicyName - :param cipher_suites: Ssl cipher suites to be enabled in the specified order to application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'cipher_suites': {'key': 'cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - disabled_ssl_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, - policy_type: Optional[Union[str, "ApplicationGatewaySslPolicyType"]] = None, - policy_name: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, - cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, - min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, - **kwargs - ): - super(ApplicationGatewaySslPolicy, self).__init__(**kwargs) - self.disabled_ssl_protocols = disabled_ssl_protocols - self.policy_type = policy_type - self.policy_name = policy_name - self.cipher_suites = cipher_suites - self.min_protocol_version = min_protocol_version - - -class ApplicationGatewaySslPredefinedPolicy(SubResource): - """An Ssl predefined policy. - - :param id: Resource ID. - :type id: str - :param name: Name of Ssl predefined policy. - :type name: str - :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, - min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, - **kwargs - ): - super(ApplicationGatewaySslPredefinedPolicy, self).__init__(id=id, **kwargs) - self.name = name - self.cipher_suites = cipher_suites - self.min_protocol_version = min_protocol_version - - -class ApplicationGatewayUrlPathMap(SubResource): - """UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param default_backend_address_pool: Default backend address pool resource of URL path map. - :type default_backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param default_backend_http_settings: Default backend http settings resource of URL path map. - :type default_backend_http_settings: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param default_redirect_configuration: Default redirect configuration resource of URL path map. - :type default_redirect_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param path_rules: Path rule of URL path map resource. - :type path_rules: list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayPathRule] - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_backend_address_pool': {'key': 'properties.defaultBackendAddressPool', 'type': 'SubResource'}, - 'default_backend_http_settings': {'key': 'properties.defaultBackendHttpSettings', 'type': 'SubResource'}, - 'default_redirect_configuration': {'key': 'properties.defaultRedirectConfiguration', 'type': 'SubResource'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[ApplicationGatewayPathRule]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - default_backend_address_pool: Optional["SubResource"] = None, - default_backend_http_settings: Optional["SubResource"] = None, - default_redirect_configuration: Optional["SubResource"] = None, - path_rules: Optional[List["ApplicationGatewayPathRule"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayUrlPathMap, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.default_backend_address_pool = default_backend_address_pool - self.default_backend_http_settings = default_backend_http_settings - self.default_redirect_configuration = default_redirect_configuration - self.path_rules = path_rules - self.provisioning_state = provisioning_state - - -class ApplicationGatewayWebApplicationFirewallConfiguration(msrest.serialization.Model): - """Application gateway web application firewall configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the web application firewall is enabled or not. - :type enabled: bool - :param firewall_mode: Required. Web application firewall mode. Possible values include: - "Detection", "Prevention". - :type firewall_mode: str or - ~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallMode - :param rule_set_type: Required. The type of the web application firewall rule set. Possible - values are: 'OWASP'. - :type rule_set_type: str - :param rule_set_version: Required. The version of the rule set type. - :type rule_set_version: str - :param disabled_rule_groups: The disabled rule groups. - :type disabled_rule_groups: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayFirewallDisabledRuleGroup] - """ - - _validation = { - 'enabled': {'required': True}, - 'firewall_mode': {'required': True}, - 'rule_set_type': {'required': True}, - 'rule_set_version': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, - 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, - 'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'}, - } - - def __init__( - self, - *, - enabled: bool, - firewall_mode: Union[str, "ApplicationGatewayFirewallMode"], - rule_set_type: str, - rule_set_version: str, - disabled_rule_groups: Optional[List["ApplicationGatewayFirewallDisabledRuleGroup"]] = None, - **kwargs - ): - super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs) - self.enabled = enabled - self.firewall_mode = firewall_mode - self.rule_set_type = rule_set_type - self.rule_set_version = rule_set_version - self.disabled_rule_groups = disabled_rule_groups - - -class AuthorizationListResult(msrest.serialization.Model): - """Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. - - :param value: The authorizations in an ExpressRoute Circuit. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitAuthorization"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(AuthorizationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class AzureAsyncOperationResult(msrest.serialization.Model): - """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. - - :param status: Status of the Azure async operation. Possible values are: 'InProgress', - 'Succeeded', and 'Failed'. Possible values include: "InProgress", "Succeeded", "Failed". - :type status: str or ~azure.mgmt.network.v2017_08_01.models.NetworkOperationStatus - :param error: - :type error: ~azure.mgmt.network.v2017_08_01.models.Error - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'Error'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "NetworkOperationStatus"]] = None, - error: Optional["Error"] = None, - **kwargs - ): - super(AzureAsyncOperationResult, self).__init__(**kwargs) - self.status = status - self.error = error - - -class BackendAddressPool(SubResource): - """Pool of backend IP addresses. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar backend_ip_configurations: Gets collection of references to IP addresses defined in - network interfaces. - :vartype backend_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration] - :ivar load_balancing_rules: Gets load balancing rules that use this backend address pool. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :ivar outbound_nat_rule: Gets outbound rules that use this backend address pool. - :vartype outbound_nat_rule: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Get provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configurations': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - 'outbound_nat_rule': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'outbound_nat_rule': {'key': 'properties.outboundNatRule', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(BackendAddressPool, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.backend_ip_configurations = None - self.load_balancing_rules = None - self.outbound_nat_rule = None - self.provisioning_state = provisioning_state - - -class BGPCommunity(msrest.serialization.Model): - """Contains bgp community information offered in Service Community resources. - - :param service_supported_region: The region which the service support. e.g. For O365, region is - Global. - :type service_supported_region: str - :param community_name: The name of the bgp community. e.g. Skype. - :type community_name: str - :param community_value: The value of the bgp community. For more information: - https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - :type community_value: str - :param community_prefixes: The prefixes that the bgp community contains. - :type community_prefixes: list[str] - :param is_authorized_to_use: Customer is authorized to use bgp community or not. - :type is_authorized_to_use: bool - :param service_group: The service group of the bgp community contains. - :type service_group: str - """ - - _attribute_map = { - 'service_supported_region': {'key': 'serviceSupportedRegion', 'type': 'str'}, - 'community_name': {'key': 'communityName', 'type': 'str'}, - 'community_value': {'key': 'communityValue', 'type': 'str'}, - 'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'}, - 'is_authorized_to_use': {'key': 'isAuthorizedToUse', 'type': 'bool'}, - 'service_group': {'key': 'serviceGroup', 'type': 'str'}, - } - - def __init__( - self, - *, - service_supported_region: Optional[str] = None, - community_name: Optional[str] = None, - community_value: Optional[str] = None, - community_prefixes: Optional[List[str]] = None, - is_authorized_to_use: Optional[bool] = None, - service_group: Optional[str] = None, - **kwargs - ): - super(BGPCommunity, self).__init__(**kwargs) - self.service_supported_region = service_supported_region - self.community_name = community_name - self.community_value = community_value - self.community_prefixes = community_prefixes - self.is_authorized_to_use = is_authorized_to_use - self.service_group = service_group - - -class BgpPeerStatus(msrest.serialization.Model): - """BGP peer status details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The virtual network gateway's local address. - :vartype local_address: str - :ivar neighbor: The remote BGP peer. - :vartype neighbor: str - :ivar asn: The autonomous system number of the remote BGP peer. - :vartype asn: int - :ivar state: The BGP peer state. Possible values include: "Unknown", "Stopped", "Idle", - "Connecting", "Connected". - :vartype state: str or ~azure.mgmt.network.v2017_08_01.models.BgpPeerState - :ivar connected_duration: For how long the peering has been up. - :vartype connected_duration: str - :ivar routes_received: The number of routes learned from this peer. - :vartype routes_received: long - :ivar messages_sent: The number of BGP messages sent. - :vartype messages_sent: long - :ivar messages_received: The number of BGP messages received. - :vartype messages_received: long - """ - - _validation = { - 'local_address': {'readonly': True}, - 'neighbor': {'readonly': True}, - 'asn': {'readonly': True}, - 'state': {'readonly': True}, - 'connected_duration': {'readonly': True}, - 'routes_received': {'readonly': True}, - 'messages_sent': {'readonly': True}, - 'messages_received': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'asn': {'key': 'asn', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'str'}, - 'connected_duration': {'key': 'connectedDuration', 'type': 'str'}, - 'routes_received': {'key': 'routesReceived', 'type': 'long'}, - 'messages_sent': {'key': 'messagesSent', 'type': 'long'}, - 'messages_received': {'key': 'messagesReceived', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpPeerStatus, self).__init__(**kwargs) - self.local_address = None - self.neighbor = None - self.asn = None - self.state = None - self.connected_duration = None - self.routes_received = None - self.messages_sent = None - self.messages_received = None - - -class BgpPeerStatusListResult(msrest.serialization.Model): - """Response for list BGP peer status API service call. - - :param value: List of BGP peers. - :type value: list[~azure.mgmt.network.v2017_08_01.models.BgpPeerStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, - } - - def __init__( - self, - *, - value: Optional[List["BgpPeerStatus"]] = None, - **kwargs - ): - super(BgpPeerStatusListResult, self).__init__(**kwargs) - self.value = value - - -class BgpServiceCommunity(Resource): - """Service Community Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param service_name: The name of the bgp community. e.g. Skype. - :type service_name: str - :param bgp_communities: Get a list of bgp communities. - :type bgp_communities: list[~azure.mgmt.network.v2017_08_01.models.BGPCommunity] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, - 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': '[BGPCommunity]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - service_name: Optional[str] = None, - bgp_communities: Optional[List["BGPCommunity"]] = None, - **kwargs - ): - super(BgpServiceCommunity, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.service_name = service_name - self.bgp_communities = bgp_communities - - -class BgpServiceCommunityListResult(msrest.serialization.Model): - """Response for the ListServiceCommunity API service call. - - :param value: A list of service community resources. - :type value: list[~azure.mgmt.network.v2017_08_01.models.BgpServiceCommunity] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["BgpServiceCommunity"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(BgpServiceCommunityListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class BgpSettings(msrest.serialization.Model): - """BGP settings details. - - :param asn: The BGP speaker's ASN. - :type asn: long - :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. - :type bgp_peering_address: str - :param peer_weight: The weight added to routes learned from this BGP speaker. - :type peer_weight: int - """ - - _attribute_map = { - 'asn': {'key': 'asn', 'type': 'long'}, - 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, - 'peer_weight': {'key': 'peerWeight', 'type': 'int'}, - } - - def __init__( - self, - *, - asn: Optional[int] = None, - bgp_peering_address: Optional[str] = None, - peer_weight: Optional[int] = None, - **kwargs - ): - super(BgpSettings, self).__init__(**kwargs) - self.asn = asn - self.bgp_peering_address = bgp_peering_address - self.peer_weight = peer_weight - - -class ConnectionResetSharedKey(msrest.serialization.Model): - """The virtual network connection reset shared key. - - All required parameters must be populated in order to send to Azure. - - :param key_length: Required. The virtual network connection reset shared key length, should - between 1 and 128. - :type key_length: int - """ - - _validation = { - 'key_length': {'required': True, 'maximum': 128, 'minimum': 1}, - } - - _attribute_map = { - 'key_length': {'key': 'keyLength', 'type': 'int'}, - } - - def __init__( - self, - *, - key_length: int, - **kwargs - ): - super(ConnectionResetSharedKey, self).__init__(**kwargs) - self.key_length = key_length - - -class ConnectionSharedKey(msrest.serialization.Model): - """Response for GetConnectionSharedKey API service call. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. The virtual network connection shared key value. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - value: str, - **kwargs - ): - super(ConnectionSharedKey, self).__init__(**kwargs) - self.value = value - - -class ConnectivityDestination(msrest.serialization.Model): - """Parameters that define destination of connection. - - :param resource_id: The ID of the resource to which a connection attempt will be made. - :type resource_id: str - :param address: The IP address or URI the resource to which a connection attempt will be made. - :type address: str - :param port: Port on which check connectivity will be performed. - :type port: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - resource_id: Optional[str] = None, - address: Optional[str] = None, - port: Optional[int] = None, - **kwargs - ): - super(ConnectivityDestination, self).__init__(**kwargs) - self.resource_id = resource_id - self.address = address - self.port = port - - -class ConnectivityHop(msrest.serialization.Model): - """Information about a hop between the source and the destination. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the hop. - :vartype type: str - :ivar id: The ID of the hop. - :vartype id: str - :ivar address: The IP address of the hop. - :vartype address: str - :ivar resource_id: The ID of the resource corresponding to this hop. - :vartype resource_id: str - :ivar next_hop_ids: List of next hop identifiers. - :vartype next_hop_ids: list[str] - :ivar issues: List of issues. - :vartype issues: list[~azure.mgmt.network.v2017_08_01.models.ConnectivityIssue] - """ - - _validation = { - 'type': {'readonly': True}, - 'id': {'readonly': True}, - 'address': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'next_hop_ids': {'readonly': True}, - 'issues': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, - 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityHop, self).__init__(**kwargs) - self.type = None - self.id = None - self.address = None - self.resource_id = None - self.next_hop_ids = None - self.issues = None - - -class ConnectivityInformation(msrest.serialization.Model): - """Information on the connectivity status. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hops: List of hops between the source and the destination. - :vartype hops: list[~azure.mgmt.network.v2017_08_01.models.ConnectivityHop] - :ivar connection_status: The connection status. Possible values include: "Unknown", - "Connected", "Disconnected", "Degraded". - :vartype connection_status: str or ~azure.mgmt.network.v2017_08_01.models.ConnectionStatus - :ivar avg_latency_in_ms: Average latency in milliseconds. - :vartype avg_latency_in_ms: int - :ivar min_latency_in_ms: Minimum latency in milliseconds. - :vartype min_latency_in_ms: int - :ivar max_latency_in_ms: Maximum latency in milliseconds. - :vartype max_latency_in_ms: int - :ivar probes_sent: Total number of probes sent. - :vartype probes_sent: int - :ivar probes_failed: Number of failed probes. - :vartype probes_failed: int - """ - - _validation = { - 'hops': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'avg_latency_in_ms': {'readonly': True}, - 'min_latency_in_ms': {'readonly': True}, - 'max_latency_in_ms': {'readonly': True}, - 'probes_sent': {'readonly': True}, - 'probes_failed': {'readonly': True}, - } - - _attribute_map = { - 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'int'}, - 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'int'}, - 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'int'}, - 'probes_sent': {'key': 'probesSent', 'type': 'int'}, - 'probes_failed': {'key': 'probesFailed', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityInformation, self).__init__(**kwargs) - self.hops = None - self.connection_status = None - self.avg_latency_in_ms = None - self.min_latency_in_ms = None - self.max_latency_in_ms = None - self.probes_sent = None - self.probes_failed = None - - -class ConnectivityIssue(msrest.serialization.Model): - """Information about an issue encountered in the process of checking for connectivity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". - :vartype origin: str or ~azure.mgmt.network.v2017_08_01.models.Origin - :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". - :vartype severity: str or ~azure.mgmt.network.v2017_08_01.models.Severity - :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", - "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", - "PortThrottled", "Platform". - :vartype type: str or ~azure.mgmt.network.v2017_08_01.models.IssueType - :ivar context: Provides additional context on the issue. - :vartype context: list[dict[str, str]] - """ - - _validation = { - 'origin': {'readonly': True}, - 'severity': {'readonly': True}, - 'type': {'readonly': True}, - 'context': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'context': {'key': 'context', 'type': '[{str}]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityIssue, self).__init__(**kwargs) - self.origin = None - self.severity = None - self.type = None - self.context = None - - -class ConnectivityParameters(msrest.serialization.Model): - """Parameters that determine how the connectivity check will be performed. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Parameters that define the source of the connection. - :type source: ~azure.mgmt.network.v2017_08_01.models.ConnectivitySource - :param destination: Required. Parameters that define destination of connection. - :type destination: ~azure.mgmt.network.v2017_08_01.models.ConnectivityDestination - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectivitySource'}, - 'destination': {'key': 'destination', 'type': 'ConnectivityDestination'}, - } - - def __init__( - self, - *, - source: "ConnectivitySource", - destination: "ConnectivityDestination", - **kwargs - ): - super(ConnectivityParameters, self).__init__(**kwargs) - self.source = source - self.destination = destination - - -class ConnectivitySource(msrest.serialization.Model): - """Parameters that define the source of the connection. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The ID of the resource from which a connectivity check will be - initiated. - :type resource_id: str - :param port: The source port from which a connectivity check will be performed. - :type port: int - """ - - _validation = { - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - resource_id: str, - port: Optional[int] = None, - **kwargs - ): - super(ConnectivitySource, self).__init__(**kwargs) - self.resource_id = resource_id - self.port = port - - -class DhcpOptions(msrest.serialization.Model): - """DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. - - :param dns_servers: The list of DNS servers IP addresses. - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__( - self, - *, - dns_servers: Optional[List[str]] = None, - **kwargs - ): - super(DhcpOptions, self).__init__(**kwargs) - self.dns_servers = dns_servers - - -class DnsNameAvailabilityResult(msrest.serialization.Model): - """Response for the CheckDnsNameAvailability API service call. - - :param available: Domain availability (True/False). - :type available: bool - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - } - - def __init__( - self, - *, - available: Optional[bool] = None, - **kwargs - ): - super(DnsNameAvailabilityResult, self).__init__(**kwargs) - self.available = available - - -class EffectiveNetworkSecurityGroup(msrest.serialization.Model): - """Effective network security group. - - :param network_security_group: The ID of network security group that is applied. - :type network_security_group: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param association: Associated resources. - :type association: - ~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityGroupAssociation - :param effective_security_rules: A collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityRule] - :param tag_map: Mapping of tags to list of IP Addresses included within the tag. - :type tag_map: str - """ - - _attribute_map = { - 'network_security_group': {'key': 'networkSecurityGroup', 'type': 'SubResource'}, - 'association': {'key': 'association', 'type': 'EffectiveNetworkSecurityGroupAssociation'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - 'tag_map': {'key': 'tagMap', 'type': 'str'}, - } - - def __init__( - self, - *, - network_security_group: Optional["SubResource"] = None, - association: Optional["EffectiveNetworkSecurityGroupAssociation"] = None, - effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, - tag_map: Optional[str] = None, - **kwargs - ): - super(EffectiveNetworkSecurityGroup, self).__init__(**kwargs) - self.network_security_group = network_security_group - self.association = association - self.effective_security_rules = effective_security_rules - self.tag_map = tag_map - - -class EffectiveNetworkSecurityGroupAssociation(msrest.serialization.Model): - """The effective network security group association. - - :param subnet: The ID of the subnet if assigned. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param network_interface: The ID of the network interface if assigned. - :type network_interface: ~azure.mgmt.network.v2017_08_01.models.SubResource - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'SubResource'}, - 'network_interface': {'key': 'networkInterface', 'type': 'SubResource'}, - } - - def __init__( - self, - *, - subnet: Optional["SubResource"] = None, - network_interface: Optional["SubResource"] = None, - **kwargs - ): - super(EffectiveNetworkSecurityGroupAssociation, self).__init__(**kwargs) - self.subnet = subnet - self.network_interface = network_interface - - -class EffectiveNetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for list effective network security groups API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective network security groups. - :type value: list[~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["EffectiveNetworkSecurityGroup"]] = None, - **kwargs - ): - super(EffectiveNetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class EffectiveNetworkSecurityRule(msrest.serialization.Model): - """Effective network security rules. - - :param name: The name of the security rule specified by the user (if created by the user). - :type name: str - :param protocol: The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', - and 'All'. Possible values include: "Tcp", "Udp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.EffectiveSecurityRuleProtocol - :param source_port_range: The source port or range. - :type source_port_range: str - :param destination_port_range: The destination port or range. - :type destination_port_range: str - :param source_port_ranges: The source port ranges. Expected values include a single integer - between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. Expected values include a single - integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type destination_port_ranges: list[str] - :param source_address_prefix: The source address prefix. - :type source_address_prefix: str - :param destination_address_prefix: The destination address prefix. - :type destination_address_prefix: str - :param source_address_prefixes: The source address prefixes. Expected values include CIDR IP - ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the - asterisk (*). - :type source_address_prefixes: list[str] - :param destination_address_prefixes: The destination address prefixes. Expected values include - CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and - the asterisk (*). - :type destination_address_prefixes: list[str] - :param expanded_source_address_prefix: The expanded source address prefix. - :type expanded_source_address_prefix: list[str] - :param expanded_destination_address_prefix: Expanded destination address prefix. - :type expanded_destination_address_prefix: list[str] - :param access: Whether network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleAccess - :param priority: The priority of the rule. - :type priority: int - :param direction: The direction of the rule. Possible values are: 'Inbound and Outbound'. - Possible values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleDirection - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, - 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[str]'}, - 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, - 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'sourceAddressPrefixes', 'type': '[str]'}, - 'destination_address_prefixes': {'key': 'destinationAddressPrefixes', 'type': '[str]'}, - 'expanded_source_address_prefix': {'key': 'expandedSourceAddressPrefix', 'type': '[str]'}, - 'expanded_destination_address_prefix': {'key': 'expandedDestinationAddressPrefix', 'type': '[str]'}, - 'access': {'key': 'access', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'direction': {'key': 'direction', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - protocol: Optional[Union[str, "EffectiveSecurityRuleProtocol"]] = None, - source_port_range: Optional[str] = None, - destination_port_range: Optional[str] = None, - source_port_ranges: Optional[List[str]] = None, - destination_port_ranges: Optional[List[str]] = None, - source_address_prefix: Optional[str] = None, - destination_address_prefix: Optional[str] = None, - source_address_prefixes: Optional[List[str]] = None, - destination_address_prefixes: Optional[List[str]] = None, - expanded_source_address_prefix: Optional[List[str]] = None, - expanded_destination_address_prefix: Optional[List[str]] = None, - access: Optional[Union[str, "SecurityRuleAccess"]] = None, - priority: Optional[int] = None, - direction: Optional[Union[str, "SecurityRuleDirection"]] = None, - **kwargs - ): - super(EffectiveNetworkSecurityRule, self).__init__(**kwargs) - self.name = name - self.protocol = protocol - self.source_port_range = source_port_range - self.destination_port_range = destination_port_range - self.source_port_ranges = source_port_ranges - self.destination_port_ranges = destination_port_ranges - self.source_address_prefix = source_address_prefix - self.destination_address_prefix = destination_address_prefix - self.source_address_prefixes = source_address_prefixes - self.destination_address_prefixes = destination_address_prefixes - self.expanded_source_address_prefix = expanded_source_address_prefix - self.expanded_destination_address_prefix = expanded_destination_address_prefix - self.access = access - self.priority = priority - self.direction = direction - - -class EffectiveRoute(msrest.serialization.Model): - """Effective Route. - - :param name: The name of the user defined route. This is optional. - :type name: str - :param source: Who created the route. Possible values are: 'Unknown', 'User', - 'VirtualNetworkGateway', and 'Default'. Possible values include: "Unknown", "User", - "VirtualNetworkGateway", "Default". - :type source: str or ~azure.mgmt.network.v2017_08_01.models.EffectiveRouteSource - :param state: The value of effective route. Possible values are: 'Active' and 'Invalid'. - Possible values include: "Active", "Invalid". - :type state: str or ~azure.mgmt.network.v2017_08_01.models.EffectiveRouteState - :param address_prefix: The address prefixes of the effective routes in CIDR notation. - :type address_prefix: list[str] - :param next_hop_ip_address: The IP address of the next hop of the effective route. - :type next_hop_ip_address: list[str] - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_08_01.models.RouteNextHopType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address_prefix': {'key': 'addressPrefix', 'type': '[str]'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': '[str]'}, - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - source: Optional[Union[str, "EffectiveRouteSource"]] = None, - state: Optional[Union[str, "EffectiveRouteState"]] = None, - address_prefix: Optional[List[str]] = None, - next_hop_ip_address: Optional[List[str]] = None, - next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, - **kwargs - ): - super(EffectiveRoute, self).__init__(**kwargs) - self.name = name - self.source = source - self.state = state - self.address_prefix = address_prefix - self.next_hop_ip_address = next_hop_ip_address - self.next_hop_type = next_hop_type - - -class EffectiveRouteListResult(msrest.serialization.Model): - """Response for list effective route API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective routes. - :type value: list[~azure.mgmt.network.v2017_08_01.models.EffectiveRoute] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveRoute]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["EffectiveRoute"]] = None, - **kwargs - ): - super(EffectiveRouteListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class EndpointServiceResult(SubResource): - """Endpoint service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Name of the endpoint service. - :vartype name: str - :ivar type: Type of the endpoint service. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - super(EndpointServiceResult, self).__init__(id=id, **kwargs) - self.name = None - self.type = None - - -class EndpointServicesListResult(msrest.serialization.Model): - """Response for the ListAvailableEndpointServices API service call. - - :param value: List of available endpoint services in a region. - :type value: list[~azure.mgmt.network.v2017_08_01.models.EndpointServiceResult] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EndpointServiceResult]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["EndpointServiceResult"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(EndpointServicesListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Error(msrest.serialization.Model): - """Error. - - :param code: - :type code: str - :param message: - :type message: str - :param target: - :type target: str - :param details: - :type details: list[~azure.mgmt.network.v2017_08_01.models.ErrorDetails] - :param inner_error: - :type inner_error: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'inner_error': {'key': 'innerError', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - target: Optional[str] = None, - details: Optional[List["ErrorDetails"]] = None, - inner_error: Optional[str] = None, - **kwargs - ): - super(Error, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - self.inner_error = inner_error - - -class ErrorDetails(msrest.serialization.Model): - """ErrorDetails. - - :param code: - :type code: str - :param target: - :type target: str - :param message: - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - target: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message - - -class ExpressRouteCircuit(Resource): - """ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The SKU. - :type sku: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitSku - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param allow_classic_operations: Allow classic operations. - :type allow_classic_operations: bool - :param circuit_provisioning_state: The CircuitProvisioningState state of the resource. - :type circuit_provisioning_state: str - :param service_provider_provisioning_state: The ServiceProviderProvisioningState state of the - resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and - 'Deprovisioning'. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", - "Deprovisioning". - :type service_provider_provisioning_state: str or - ~azure.mgmt.network.v2017_08_01.models.ServiceProviderProvisioningState - :param authorizations: The list of authorizations. - :type authorizations: - list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization] - :param peerings: The list of peerings. - :type peerings: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] - :param service_key: The ServiceKey. - :type service_key: str - :param service_provider_notes: The ServiceProviderNotes. - :type service_provider_notes: str - :param service_provider_properties: The ServiceProviderProperties. - :type service_provider_properties: - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitServiceProviderProperties - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ExpressRouteCircuitSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_classic_operations': {'key': 'properties.allowClassicOperations', 'type': 'bool'}, - 'circuit_provisioning_state': {'key': 'properties.circuitProvisioningState', 'type': 'str'}, - 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, - 'authorizations': {'key': 'properties.authorizations', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, - 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, - 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["ExpressRouteCircuitSku"] = None, - allow_classic_operations: Optional[bool] = None, - circuit_provisioning_state: Optional[str] = None, - service_provider_provisioning_state: Optional[Union[str, "ServiceProviderProvisioningState"]] = None, - authorizations: Optional[List["ExpressRouteCircuitAuthorization"]] = None, - peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, - service_key: Optional[str] = None, - service_provider_notes: Optional[str] = None, - service_provider_properties: Optional["ExpressRouteCircuitServiceProviderProperties"] = None, - provisioning_state: Optional[str] = None, - gateway_manager_etag: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuit, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.sku = sku - self.etag = None - self.allow_classic_operations = allow_classic_operations - self.circuit_provisioning_state = circuit_provisioning_state - self.service_provider_provisioning_state = service_provider_provisioning_state - self.authorizations = authorizations - self.peerings = peerings - self.service_key = service_key - self.service_provider_notes = service_provider_notes - self.service_provider_properties = service_provider_properties - self.provisioning_state = provisioning_state - self.gateway_manager_etag = gateway_manager_etag - - -class ExpressRouteCircuitArpTable(msrest.serialization.Model): - """The ARP table associated with the ExpressRouteCircuit. - - :param age: Age. - :type age: int - :param interface: Interface. - :type interface: str - :param ip_address: The IP address. - :type ip_address: str - :param mac_address: The MAC address. - :type mac_address: str - """ - - _attribute_map = { - 'age': {'key': 'age', 'type': 'int'}, - 'interface': {'key': 'interface', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'mac_address': {'key': 'macAddress', 'type': 'str'}, - } - - def __init__( - self, - *, - age: Optional[int] = None, - interface: Optional[str] = None, - ip_address: Optional[str] = None, - mac_address: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitArpTable, self).__init__(**kwargs) - self.age = age - self.interface = interface - self.ip_address = ip_address - self.mac_address = mac_address - - -class ExpressRouteCircuitAuthorization(SubResource): - """Authorization in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param authorization_key: The authorization key. - :type authorization_key: str - :param authorization_use_status: AuthorizationUseStatus. Possible values are: 'Available' and - 'InUse'. Possible values include: "Available", "InUse". - :type authorization_use_status: str or - ~azure.mgmt.network.v2017_08_01.models.AuthorizationUseStatus - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - authorization_key: Optional[str] = None, - authorization_use_status: Optional[Union[str, "AuthorizationUseStatus"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitAuthorization, self).__init__(id=id, **kwargs) - self.name = name - self.etag = None - self.authorization_key = authorization_key - self.authorization_use_status = authorization_use_status - self.provisioning_state = provisioning_state - - -class ExpressRouteCircuitListResult(msrest.serialization.Model): - """Response for ListExpressRouteCircuit API service call. - - :param value: A list of ExpressRouteCircuits in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuit] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuit]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuit"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitPeering(SubResource): - """Peering in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param peering_type: The PeeringType. Possible values are: 'AzurePublicPeering', - 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: "AzurePublicPeering", - "AzurePrivatePeering", "MicrosoftPeering". - :type peering_type: str or - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringType - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringState - :param azure_asn: The Azure ASN. - :type azure_asn: int - :param peer_asn: The peer ASN. - :type peer_asn: int - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param primary_azure_port: The primary port. - :type primary_azure_port: str - :param secondary_azure_port: The secondary port. - :type secondary_azure_port: str - :param shared_key: The shared key. - :type shared_key: str - :param vlan_id: The VLAN ID. - :type vlan_id: int - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringConfig - :param stats: Gets peering stats. - :type stats: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitStats - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - :param last_modified_by: Gets whether the provider or the customer last modified the peering. - :type last_modified_by: str - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_08_01.models.RouteFilter - :param ipv6_peering_config: The IPv6 peering configuration. - :type ipv6_peering_config: - ~azure.mgmt.network.v2017_08_01.models.Ipv6ExpressRouteCircuitPeeringConfig - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, - 'peer_asn': {'key': 'properties.peerASN', 'type': 'int'}, - 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, - 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, - 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, - 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'stats': {'key': 'properties.stats', 'type': 'ExpressRouteCircuitStats'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'route_filter': {'key': 'properties.routeFilter', 'type': 'RouteFilter'}, - 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - peering_type: Optional[Union[str, "ExpressRouteCircuitPeeringType"]] = None, - state: Optional[Union[str, "ExpressRouteCircuitPeeringState"]] = None, - azure_asn: Optional[int] = None, - peer_asn: Optional[int] = None, - primary_peer_address_prefix: Optional[str] = None, - secondary_peer_address_prefix: Optional[str] = None, - primary_azure_port: Optional[str] = None, - secondary_azure_port: Optional[str] = None, - shared_key: Optional[str] = None, - vlan_id: Optional[int] = None, - microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, - stats: Optional["ExpressRouteCircuitStats"] = None, - provisioning_state: Optional[str] = None, - gateway_manager_etag: Optional[str] = None, - last_modified_by: Optional[str] = None, - route_filter: Optional["RouteFilter"] = None, - ipv6_peering_config: Optional["Ipv6ExpressRouteCircuitPeeringConfig"] = None, - **kwargs - ): - super(ExpressRouteCircuitPeering, self).__init__(id=id, **kwargs) - self.name = name - self.etag = None - self.peering_type = peering_type - self.state = state - self.azure_asn = azure_asn - self.peer_asn = peer_asn - self.primary_peer_address_prefix = primary_peer_address_prefix - self.secondary_peer_address_prefix = secondary_peer_address_prefix - self.primary_azure_port = primary_azure_port - self.secondary_azure_port = secondary_azure_port - self.shared_key = shared_key - self.vlan_id = vlan_id - self.microsoft_peering_config = microsoft_peering_config - self.stats = stats - self.provisioning_state = provisioning_state - self.gateway_manager_etag = gateway_manager_etag - self.last_modified_by = last_modified_by - self.route_filter = route_filter - self.ipv6_peering_config = ipv6_peering_config - - -class ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Specifies the peering configuration. - - :param advertised_public_prefixes: The reference of AdvertisedPublicPrefixes. - :type advertised_public_prefixes: list[str] - :param advertised_communities: The communities of bgp peering. Specified for microsoft peering. - :type advertised_communities: list[str] - :param advertised_public_prefixes_state: AdvertisedPublicPrefixState of the Peering resource. - Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. - Possible values include: "NotConfigured", "Configuring", "Configured", "ValidationNeeded". - :type advertised_public_prefixes_state: str or - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState - :param legacy_mode: The legacy mode of the peering. - :type legacy_mode: int - :param customer_asn: The CustomerASN of the peering. - :type customer_asn: int - :param routing_registry_name: The RoutingRegistryName of the configuration. - :type routing_registry_name: str - """ - - _attribute_map = { - 'advertised_public_prefixes': {'key': 'advertisedPublicPrefixes', 'type': '[str]'}, - 'advertised_communities': {'key': 'advertisedCommunities', 'type': '[str]'}, - 'advertised_public_prefixes_state': {'key': 'advertisedPublicPrefixesState', 'type': 'str'}, - 'legacy_mode': {'key': 'legacyMode', 'type': 'int'}, - 'customer_asn': {'key': 'customerASN', 'type': 'int'}, - 'routing_registry_name': {'key': 'routingRegistryName', 'type': 'str'}, - } - - def __init__( - self, - *, - advertised_public_prefixes: Optional[List[str]] = None, - advertised_communities: Optional[List[str]] = None, - advertised_public_prefixes_state: Optional[Union[str, "ExpressRouteCircuitPeeringAdvertisedPublicPrefixState"]] = None, - legacy_mode: Optional[int] = None, - customer_asn: Optional[int] = None, - routing_registry_name: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.advertised_public_prefixes = advertised_public_prefixes - self.advertised_communities = advertised_communities - self.advertised_public_prefixes_state = advertised_public_prefixes_state - self.legacy_mode = legacy_mode - self.customer_asn = customer_asn - self.routing_registry_name = routing_registry_name - - -class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): - """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. - - :param value: The peerings in an express route circuit. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitPeering"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitPeeringListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitRoutesTable(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param network: network. - :type network: str - :param next_hop: nextHop. - :type next_hop: str - :param loc_prf: locPrf. - :type loc_prf: str - :param weight: weight. - :type weight: int - :param path: path. - :type path: str - """ - - _attribute_map = { - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'loc_prf': {'key': 'locPrf', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - *, - network: Optional[str] = None, - next_hop: Optional[str] = None, - loc_prf: Optional[str] = None, - weight: Optional[int] = None, - path: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitRoutesTable, self).__init__(**kwargs) - self.network = network - self.next_hop = next_hop - self.loc_prf = loc_prf - self.weight = weight - self.path = path - - -class ExpressRouteCircuitRoutesTableSummary(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param neighbor: Neighbor. - :type neighbor: str - :param v: BGP version number spoken to the neighbor. - :type v: int - :param as_property: Autonomous system number. - :type as_property: int - :param up_down: The length of time that the BGP session has been in the Established state, or - the current status if not in the Established state. - :type up_down: str - :param state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have - been received from a neighbor or peer group. - :type state_pfx_rcd: str - """ - - _attribute_map = { - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'v': {'key': 'v', 'type': 'int'}, - 'as_property': {'key': 'as', 'type': 'int'}, - 'up_down': {'key': 'upDown', 'type': 'str'}, - 'state_pfx_rcd': {'key': 'statePfxRcd', 'type': 'str'}, - } - - def __init__( - self, - *, - neighbor: Optional[str] = None, - v: Optional[int] = None, - as_property: Optional[int] = None, - up_down: Optional[str] = None, - state_pfx_rcd: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitRoutesTableSummary, self).__init__(**kwargs) - self.neighbor = neighbor - self.v = v - self.as_property = as_property - self.up_down = up_down - self.state_pfx_rcd = state_pfx_rcd - - -class ExpressRouteCircuitsArpTableListResult(msrest.serialization.Model): - """Response for ListArpTable associated with the Express Route Circuits API. - - :param value: Gets list of the ARP table. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitArpTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitArpTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitArpTable"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitsArpTableListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitServiceProviderProperties(msrest.serialization.Model): - """Contains ServiceProviderProperties in an ExpressRouteCircuit. - - :param service_provider_name: The serviceProviderName. - :type service_provider_name: str - :param peering_location: The peering location. - :type peering_location: str - :param bandwidth_in_mbps: The BandwidthInMbps. - :type bandwidth_in_mbps: int - """ - - _attribute_map = { - 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, - 'peering_location': {'key': 'peeringLocation', 'type': 'str'}, - 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, - } - - def __init__( - self, - *, - service_provider_name: Optional[str] = None, - peering_location: Optional[str] = None, - bandwidth_in_mbps: Optional[int] = None, - **kwargs - ): - super(ExpressRouteCircuitServiceProviderProperties, self).__init__(**kwargs) - self.service_provider_name = service_provider_name - self.peering_location = peering_location - self.bandwidth_in_mbps = bandwidth_in_mbps - - -class ExpressRouteCircuitSku(msrest.serialization.Model): - """Contains SKU in an ExpressRouteCircuit. - - :param name: The name of the SKU. - :type name: str - :param tier: The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values - include: "Standard", "Premium". - :type tier: str or ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitSkuTier - :param family: The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. - Possible values include: "UnlimitedData", "MeteredData". - :type family: str or ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitSkuFamily - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - tier: Optional[Union[str, "ExpressRouteCircuitSkuTier"]] = None, - family: Optional[Union[str, "ExpressRouteCircuitSkuFamily"]] = None, - **kwargs - ): - super(ExpressRouteCircuitSku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.family = family - - -class ExpressRouteCircuitsRoutesTableListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: The list of routes table. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitRoutesTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitRoutesTable"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitsRoutesTableSummaryListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: A list of the routes table. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitRoutesTableSummary] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitRoutesTableSummary"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableSummaryListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitStats(msrest.serialization.Model): - """Contains stats associated with the peering. - - :param primarybytes_in: Gets BytesIn of the peering. - :type primarybytes_in: long - :param primarybytes_out: Gets BytesOut of the peering. - :type primarybytes_out: long - :param secondarybytes_in: Gets BytesIn of the peering. - :type secondarybytes_in: long - :param secondarybytes_out: Gets BytesOut of the peering. - :type secondarybytes_out: long - """ - - _attribute_map = { - 'primarybytes_in': {'key': 'primarybytesIn', 'type': 'long'}, - 'primarybytes_out': {'key': 'primarybytesOut', 'type': 'long'}, - 'secondarybytes_in': {'key': 'secondarybytesIn', 'type': 'long'}, - 'secondarybytes_out': {'key': 'secondarybytesOut', 'type': 'long'}, - } - - def __init__( - self, - *, - primarybytes_in: Optional[int] = None, - primarybytes_out: Optional[int] = None, - secondarybytes_in: Optional[int] = None, - secondarybytes_out: Optional[int] = None, - **kwargs - ): - super(ExpressRouteCircuitStats, self).__init__(**kwargs) - self.primarybytes_in = primarybytes_in - self.primarybytes_out = primarybytes_out - self.secondarybytes_in = secondarybytes_in - self.secondarybytes_out = secondarybytes_out - - -class ExpressRouteServiceProvider(Resource): - """A ExpressRouteResourceProvider object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param peering_locations: Get a list of peering locations. - :type peering_locations: list[str] - :param bandwidths_offered: Gets bandwidths offered. - :type bandwidths_offered: - list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteServiceProviderBandwidthsOffered] - :param provisioning_state: Gets the provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, - 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - peering_locations: Optional[List[str]] = None, - bandwidths_offered: Optional[List["ExpressRouteServiceProviderBandwidthsOffered"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ExpressRouteServiceProvider, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.peering_locations = peering_locations - self.bandwidths_offered = bandwidths_offered - self.provisioning_state = provisioning_state - - -class ExpressRouteServiceProviderBandwidthsOffered(msrest.serialization.Model): - """Contains bandwidths offered in ExpressRouteServiceProvider resources. - - :param offer_name: The OfferName. - :type offer_name: str - :param value_in_mbps: The ValueInMbps. - :type value_in_mbps: int - """ - - _attribute_map = { - 'offer_name': {'key': 'offerName', 'type': 'str'}, - 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, - } - - def __init__( - self, - *, - offer_name: Optional[str] = None, - value_in_mbps: Optional[int] = None, - **kwargs - ): - super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs) - self.offer_name = offer_name - self.value_in_mbps = value_in_mbps - - -class ExpressRouteServiceProviderListResult(msrest.serialization.Model): - """Response for the ListExpressRouteServiceProvider API service call. - - :param value: A list of ExpressRouteResourceProvider resources. - :type value: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteServiceProvider] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteServiceProvider"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteServiceProviderListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class FlowLogInformation(msrest.serialization.Model): - """Information on the configuration of flow log. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the resource to configure for flow logging. - :type target_resource_id: str - :param storage_id: Required. ID of the storage account which is used to store the flow log. - :type storage_id: str - :param enabled: Required. Flag to enable/disable flow logging. - :type enabled: bool - :param retention_policy: Parameters that define the retention policy for flow log. - :type retention_policy: ~azure.mgmt.network.v2017_08_01.models.RetentionPolicyParameters - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, - } - - def __init__( - self, - *, - target_resource_id: str, - storage_id: str, - enabled: bool, - retention_policy: Optional["RetentionPolicyParameters"] = None, - **kwargs - ): - super(FlowLogInformation, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.storage_id = storage_id - self.enabled = enabled - self.retention_policy = retention_policy - - -class FlowLogStatusParameters(msrest.serialization.Model): - """Parameters that define a resource to query flow log status. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource where getting the flow logging status. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - **kwargs - ): - super(FlowLogStatusParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - - -class FrontendIPConfiguration(SubResource): - """Frontend IP address of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :ivar inbound_nat_rules: Read only. Inbound rules URIs that use this frontend IP. - :vartype inbound_nat_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :ivar inbound_nat_pools: Read only. Inbound pools URIs that use this frontend IP. - :vartype inbound_nat_pools: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :ivar outbound_nat_rules: Read only. Outbound rules URIs that use this frontend IP. - :vartype outbound_nat_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :ivar load_balancing_rules: Gets load balancing rules URIs that use this frontend IP. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The Private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.Subnet - :param public_ip_address: The reference of the Public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'inbound_nat_rules': {'readonly': True}, - 'inbound_nat_pools': {'readonly': True}, - 'outbound_nat_rules': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[SubResource]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[SubResource]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - zones: Optional[List[str]] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["Subnet"] = None, - public_ip_address: Optional["PublicIPAddress"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(FrontendIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.zones = zones - self.inbound_nat_rules = None - self.inbound_nat_pools = None - self.outbound_nat_rules = None - self.load_balancing_rules = None - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class GatewayRoute(msrest.serialization.Model): - """Gateway routing details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The gateway's local address. - :vartype local_address: str - :ivar network: The route's network prefix. - :vartype network: str - :ivar next_hop: The route's next hop. - :vartype next_hop: str - :ivar source_peer: The peer this route was learned from. - :vartype source_peer: str - :ivar origin: The source this route was learned from. - :vartype origin: str - :ivar as_path: The route's AS path sequence. - :vartype as_path: str - :ivar weight: The route's weight. - :vartype weight: int - """ - - _validation = { - 'local_address': {'readonly': True}, - 'network': {'readonly': True}, - 'next_hop': {'readonly': True}, - 'source_peer': {'readonly': True}, - 'origin': {'readonly': True}, - 'as_path': {'readonly': True}, - 'weight': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'as_path': {'key': 'asPath', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(GatewayRoute, self).__init__(**kwargs) - self.local_address = None - self.network = None - self.next_hop = None - self.source_peer = None - self.origin = None - self.as_path = None - self.weight = None - - -class GatewayRouteListResult(msrest.serialization.Model): - """List of virtual network gateway routes. - - :param value: List of gateway routes. - :type value: list[~azure.mgmt.network.v2017_08_01.models.GatewayRoute] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[GatewayRoute]'}, - } - - def __init__( - self, - *, - value: Optional[List["GatewayRoute"]] = None, - **kwargs - ): - super(GatewayRouteListResult, self).__init__(**kwargs) - self.value = value - - -class InboundNatPool(SubResource): - """Inbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. - Possible values include: "Udp", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.TransportProtocol - :param frontend_port_range_start: The first port number in the range of external ports that - will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values - range between 1 and 65534. - :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of external ports that will - be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range - between 1 and 65535. - :type frontend_port_range_end: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 1 and 65535. - :type backend_port: int - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, - 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - protocol: Optional[Union[str, "TransportProtocol"]] = None, - frontend_port_range_start: Optional[int] = None, - frontend_port_range_end: Optional[int] = None, - backend_port: Optional[int] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(InboundNatPool, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.frontend_ip_configuration = frontend_ip_configuration - self.protocol = protocol - self.frontend_port_range_start = frontend_port_range_start - self.frontend_port_range_end = frontend_port_range_end - self.backend_port = backend_port - self.provisioning_state = provisioning_state - - -class InboundNatRule(SubResource): - """Inbound NAT rule of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :ivar backend_ip_configuration: A reference to a private IP address defined on a network - interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations - is forwarded to the backend IP. - :vartype backend_ip_configuration: - ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration - :param protocol: The transport protocol for the endpoint. Possible values are: 'Udp' or 'Tcp'. - Possible values include: "Udp", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.TransportProtocol - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values range from 1 to 65534. - :type frontend_port: int - :param backend_port: The port used for the internal endpoint. Acceptable values range from 1 to - 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_ip_configuration': {'key': 'properties.backendIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - protocol: Optional[Union[str, "TransportProtocol"]] = None, - frontend_port: Optional[int] = None, - backend_port: Optional[int] = None, - idle_timeout_in_minutes: Optional[int] = None, - enable_floating_ip: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(InboundNatRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.frontend_ip_configuration = frontend_ip_configuration - self.backend_ip_configuration = None - self.protocol = protocol - self.frontend_port = frontend_port - self.backend_port = backend_port - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.enable_floating_ip = enable_floating_ip - self.provisioning_state = provisioning_state - - -class InboundNatRuleListResult(msrest.serialization.Model): - """Response for ListInboundNatRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of inbound nat rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.InboundNatRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InboundNatRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["InboundNatRule"]] = None, - **kwargs - ): - super(InboundNatRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class IPAddressAvailabilityResult(msrest.serialization.Model): - """Response for CheckIPAddressAvailability API service call. - - :param available: Private IP address availability. - :type available: bool - :param available_ip_addresses: Contains other available private IP addresses if the asked for - address is taken. - :type available_ip_addresses: list[str] - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'available_ip_addresses': {'key': 'availableIPAddresses', 'type': '[str]'}, - } - - def __init__( - self, - *, - available: Optional[bool] = None, - available_ip_addresses: Optional[List[str]] = None, - **kwargs - ): - super(IPAddressAvailabilityResult, self).__init__(**kwargs) - self.available = available - self.available_ip_addresses = available_ip_addresses - - -class IPConfiguration(SubResource): - """IP configuration. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.Subnet - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["Subnet"] = None, - public_ip_address: Optional["PublicIPAddress"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(IPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class IpsecPolicy(msrest.serialization.Model): - """An IPSec Policy configuration for a virtual network gateway connection. - - All required parameters must be populated in order to send to Azure. - - :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - :type sa_life_time_seconds: int - :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - :type sa_data_size_kilobytes: int - :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible - values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", - "GCMAES256". - :type ipsec_encryption: str or ~azure.mgmt.network.v2017_08_01.models.IpsecEncryption - :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values - include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". - :type ipsec_integrity: str or ~azure.mgmt.network.v2017_08_01.models.IpsecIntegrity - :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values - include: "DES", "DES3", "AES128", "AES192", "AES256". - :type ike_encryption: str or ~azure.mgmt.network.v2017_08_01.models.IkeEncryption - :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values - include: "MD5", "SHA1", "SHA256", "SHA384". - :type ike_integrity: str or ~azure.mgmt.network.v2017_08_01.models.IkeIntegrity - :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values - include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", - "DHGroup24". - :type dh_group: str or ~azure.mgmt.network.v2017_08_01.models.DhGroup - :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new child SA. Possible values - include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24". - :type pfs_group: str or ~azure.mgmt.network.v2017_08_01.models.PfsGroup - """ - - _validation = { - 'sa_life_time_seconds': {'required': True}, - 'sa_data_size_kilobytes': {'required': True}, - 'ipsec_encryption': {'required': True}, - 'ipsec_integrity': {'required': True}, - 'ike_encryption': {'required': True}, - 'ike_integrity': {'required': True}, - 'dh_group': {'required': True}, - 'pfs_group': {'required': True}, - } - - _attribute_map = { - 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, - 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, - 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, - 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, - 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, - 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, - 'dh_group': {'key': 'dhGroup', 'type': 'str'}, - 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, - } - - def __init__( - self, - *, - sa_life_time_seconds: int, - sa_data_size_kilobytes: int, - ipsec_encryption: Union[str, "IpsecEncryption"], - ipsec_integrity: Union[str, "IpsecIntegrity"], - ike_encryption: Union[str, "IkeEncryption"], - ike_integrity: Union[str, "IkeIntegrity"], - dh_group: Union[str, "DhGroup"], - pfs_group: Union[str, "PfsGroup"], - **kwargs - ): - super(IpsecPolicy, self).__init__(**kwargs) - self.sa_life_time_seconds = sa_life_time_seconds - self.sa_data_size_kilobytes = sa_data_size_kilobytes - self.ipsec_encryption = ipsec_encryption - self.ipsec_integrity = ipsec_integrity - self.ike_encryption = ike_encryption - self.ike_integrity = ike_integrity - self.dh_group = dh_group - self.pfs_group = pfs_group - - -class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Contains IPv6 peering config. - - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringConfig - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_08_01.models.RouteFilter - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringState - """ - - _attribute_map = { - 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, - 'microsoft_peering_config': {'key': 'microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'route_filter': {'key': 'routeFilter', 'type': 'RouteFilter'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - *, - primary_peer_address_prefix: Optional[str] = None, - secondary_peer_address_prefix: Optional[str] = None, - microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, - route_filter: Optional["RouteFilter"] = None, - state: Optional[Union[str, "ExpressRouteCircuitPeeringState"]] = None, - **kwargs - ): - super(Ipv6ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.primary_peer_address_prefix = primary_peer_address_prefix - self.secondary_peer_address_prefix = secondary_peer_address_prefix - self.microsoft_peering_config = microsoft_peering_config - self.route_filter = route_filter - self.state = state - - -class LoadBalancer(Resource): - """LoadBalancer resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The load balancer SKU. - :type sku: ~azure.mgmt.network.v2017_08_01.models.LoadBalancerSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configurations: Object representing the frontend IPs to be used for the load - balancer. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.FrontendIPConfiguration] - :param backend_address_pools: Collection of backend address pools used by a load balancer. - :type backend_address_pools: list[~azure.mgmt.network.v2017_08_01.models.BackendAddressPool] - :param load_balancing_rules: Object collection representing the load balancing rules Gets the - provisioning. - :type load_balancing_rules: list[~azure.mgmt.network.v2017_08_01.models.LoadBalancingRule] - :param probes: Collection of probe objects used in the load balancer. - :type probes: list[~azure.mgmt.network.v2017_08_01.models.Probe] - :param inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining - inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT - pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are - associated with individual virtual machines cannot reference an Inbound NAT pool. They have to - reference individual inbound NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.network.v2017_08_01.models.InboundNatRule] - :param inbound_nat_pools: Defines an external port range for inbound NAT to a single backend - port on NICs associated with a load balancer. Inbound NAT rules are created automatically for - each NIC associated with the Load Balancer using an external port from this range. Defining an - Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. - Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with - individual virtual machines cannot reference an inbound NAT pool. They have to reference - individual inbound NAT rules. - :type inbound_nat_pools: list[~azure.mgmt.network.v2017_08_01.models.InboundNatPool] - :param outbound_nat_rules: The outbound NAT rules. - :type outbound_nat_rules: list[~azure.mgmt.network.v2017_08_01.models.OutboundNatRule] - :param resource_guid: The resource GUID property of the load balancer resource. - :type resource_guid: str - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'LoadBalancerSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[FrontendIPConfiguration]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'probes': {'key': 'properties.probes', 'type': '[Probe]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[InboundNatRule]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[InboundNatPool]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[OutboundNatRule]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["LoadBalancerSku"] = None, - etag: Optional[str] = None, - frontend_ip_configurations: Optional[List["FrontendIPConfiguration"]] = None, - backend_address_pools: Optional[List["BackendAddressPool"]] = None, - load_balancing_rules: Optional[List["LoadBalancingRule"]] = None, - probes: Optional[List["Probe"]] = None, - inbound_nat_rules: Optional[List["InboundNatRule"]] = None, - inbound_nat_pools: Optional[List["InboundNatPool"]] = None, - outbound_nat_rules: Optional[List["OutboundNatRule"]] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(LoadBalancer, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.sku = sku - self.etag = etag - self.frontend_ip_configurations = frontend_ip_configurations - self.backend_address_pools = backend_address_pools - self.load_balancing_rules = load_balancing_rules - self.probes = probes - self.inbound_nat_rules = inbound_nat_rules - self.inbound_nat_pools = inbound_nat_pools - self.outbound_nat_rules = outbound_nat_rules - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class LoadBalancerBackendAddressPoolListResult(msrest.serialization.Model): - """Response for ListBackendAddressPool API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of backend address pools in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.BackendAddressPool] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackendAddressPool]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["BackendAddressPool"]] = None, - **kwargs - ): - super(LoadBalancerBackendAddressPoolListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): - """Response for ListFrontendIPConfiguration API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of frontend IP configurations in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.FrontendIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["FrontendIPConfiguration"]] = None, - **kwargs - ): - super(LoadBalancerFrontendIPConfigurationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerListResult(msrest.serialization.Model): - """Response for ListLoadBalancers API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LoadBalancer"]] = None, - **kwargs - ): - super(LoadBalancerListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerLoadBalancingRuleListResult(msrest.serialization.Model): - """Response for ListLoadBalancingRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancing rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.LoadBalancingRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancingRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LoadBalancingRule"]] = None, - **kwargs - ): - super(LoadBalancerLoadBalancingRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerProbeListResult(msrest.serialization.Model): - """Response for ListProbe API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of probes in a load balancer. - :type value: list[~azure.mgmt.network.v2017_08_01.models.Probe] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Probe]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Probe"]] = None, - **kwargs - ): - super(LoadBalancerProbeListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerSku(msrest.serialization.Model): - """SKU of a load balancer. - - :param name: Name of a load balancer SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_08_01.models.LoadBalancerSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "LoadBalancerSkuName"]] = None, - **kwargs - ): - super(LoadBalancerSku, self).__init__(**kwargs) - self.name = name - - -class LoadBalancingRule(SubResource): - """A load balancing rule for a load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param probe: The reference of the load balancer probe used by the load balancing rule. - :type probe: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param protocol: The transport protocol for the external endpoint. Possible values are 'Udp' or - 'Tcp'. Possible values include: "Udp", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.TransportProtocol - :param load_distribution: The load distribution policy for this rule. Possible values are - 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: "Default", "SourceIP", - "SourceIPProtocol". - :type load_distribution: str or ~azure.mgmt.network.v2017_08_01.models.LoadDistribution - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values are between 1 and 65534. - :type frontend_port: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 1 and 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the - publicIP address specified in the frontend of the load balancing rule. - :type disable_outbound_snat: bool - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'load_distribution': {'key': 'properties.loadDistribution', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'disable_outbound_snat': {'key': 'properties.disableOutboundSnat', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - backend_address_pool: Optional["SubResource"] = None, - probe: Optional["SubResource"] = None, - protocol: Optional[Union[str, "TransportProtocol"]] = None, - load_distribution: Optional[Union[str, "LoadDistribution"]] = None, - frontend_port: Optional[int] = None, - backend_port: Optional[int] = None, - idle_timeout_in_minutes: Optional[int] = None, - enable_floating_ip: Optional[bool] = None, - disable_outbound_snat: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(LoadBalancingRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.frontend_ip_configuration = frontend_ip_configuration - self.backend_address_pool = backend_address_pool - self.probe = probe - self.protocol = protocol - self.load_distribution = load_distribution - self.frontend_port = frontend_port - self.backend_port = backend_port - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.enable_floating_ip = enable_floating_ip - self.disable_outbound_snat = disable_outbound_snat - self.provisioning_state = provisioning_state - - -class LocalNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param local_network_address_space: Local network site address space. - :type local_network_address_space: ~azure.mgmt.network.v2017_08_01.models.AddressSpace - :param gateway_ip_address: IP address of local network gateway. - :type gateway_ip_address: str - :param bgp_settings: Local network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_08_01.models.BgpSettings - :param resource_guid: The resource GUID property of the LocalNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the LocalNetworkGateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'local_network_address_space': {'key': 'properties.localNetworkAddressSpace', 'type': 'AddressSpace'}, - 'gateway_ip_address': {'key': 'properties.gatewayIpAddress', 'type': 'str'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - local_network_address_space: Optional["AddressSpace"] = None, - gateway_ip_address: Optional[str] = None, - bgp_settings: Optional["BgpSettings"] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(LocalNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.local_network_address_space = local_network_address_space - self.gateway_ip_address = gateway_ip_address - self.bgp_settings = bgp_settings - self.resource_guid = resource_guid - self.provisioning_state = None - - -class LocalNetworkGatewayListResult(msrest.serialization.Model): - """Response for ListLocalNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of local network gateways that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LocalNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LocalNetworkGateway"]] = None, - **kwargs - ): - super(LocalNetworkGatewayListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkInterface(Resource): - """A network interface in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param virtual_machine: The reference of a virtual machine. - :type virtual_machine: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup - :param ip_configurations: A list of IPConfigurations of the network interface. - :type ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration] - :param dns_settings: The DNS settings in network interface. - :type dns_settings: ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceDnsSettings - :param mac_address: The MAC address of the network interface. - :type mac_address: str - :param primary: Gets whether this is a primary network interface on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: If the network interface is accelerated networking - enabled. - :type enable_accelerated_networking: bool - :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network - interface. - :type enable_ip_forwarding: bool - :param resource_guid: The resource GUID property of the network interface resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, - 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - virtual_machine: Optional["SubResource"] = None, - network_security_group: Optional["NetworkSecurityGroup"] = None, - ip_configurations: Optional[List["NetworkInterfaceIPConfiguration"]] = None, - dns_settings: Optional["NetworkInterfaceDnsSettings"] = None, - mac_address: Optional[str] = None, - primary: Optional[bool] = None, - enable_accelerated_networking: Optional[bool] = None, - enable_ip_forwarding: Optional[bool] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(NetworkInterface, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.virtual_machine = virtual_machine - self.network_security_group = network_security_group - self.ip_configurations = ip_configurations - self.dns_settings = dns_settings - self.mac_address = mac_address - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.enable_ip_forwarding = enable_ip_forwarding - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class NetworkInterfaceAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Network interface ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - *, - security_rules: Optional[List["SecurityRule"]] = None, - **kwargs - ): - super(NetworkInterfaceAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = security_rules - - -class NetworkInterfaceDnsSettings(msrest.serialization.Model): - """DNS settings of a network interface. - - :param dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure - provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be - the only value in dnsServers collection. - :type dns_servers: list[str] - :param applied_dns_servers: If the VM that uses this NIC is part of an Availability Set, then - this list will have the union of all DNS servers from all NICs that are part of the - Availability Set. This property is what is configured on each of those VMs. - :type applied_dns_servers: list[str] - :param internal_dns_name_label: Relative DNS name for this NIC used for internal communications - between VMs in the same virtual network. - :type internal_dns_name_label: str - :param internal_fqdn: Fully qualified DNS name supporting internal communications between VMs - in the same virtual network. - :type internal_fqdn: str - :param internal_domain_name_suffix: Even if internalDnsNameLabel is not specified, a DNS entry - is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the - VM name with the value of internalDomainNameSuffix. - :type internal_domain_name_suffix: str - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, - 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, - 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'}, - 'internal_domain_name_suffix': {'key': 'internalDomainNameSuffix', 'type': 'str'}, - } - - def __init__( - self, - *, - dns_servers: Optional[List[str]] = None, - applied_dns_servers: Optional[List[str]] = None, - internal_dns_name_label: Optional[str] = None, - internal_fqdn: Optional[str] = None, - internal_domain_name_suffix: Optional[str] = None, - **kwargs - ): - super(NetworkInterfaceDnsSettings, self).__init__(**kwargs) - self.dns_servers = dns_servers - self.applied_dns_servers = applied_dns_servers - self.internal_dns_name_label = internal_dns_name_label - self.internal_fqdn = internal_fqdn - self.internal_domain_name_suffix = internal_domain_name_suffix - - -class NetworkInterfaceIPConfiguration(SubResource): - """IPConfiguration in a network interface. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param application_gateway_backend_address_pools: The reference of - ApplicationGatewayBackendAddressPool resource. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.network.v2017_08_01.models.ApplicationGatewayBackendAddressPool] - :param load_balancer_backend_address_pools: The reference of LoadBalancerBackendAddressPool - resource. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.network.v2017_08_01.models.BackendAddressPool] - :param load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. - :type load_balancer_inbound_nat_rules: - list[~azure.mgmt.network.v2017_08_01.models.InboundNatRule] - :param private_ip_address: Private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: Defines how a private IP address is assigned. Possible - values are: 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param private_ip_address_version: Available from Api-Version 2016-03-30 onwards, it represents - whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible - values are: 'IPv4' and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type private_ip_address_version: str or ~azure.mgmt.network.v2017_08_01.models.IPVersion - :param subnet: Subnet bound to the IP configuration. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.Subnet - :param primary: Gets whether this is a primary customer address on the network interface. - :type primary: bool - :param public_ip_address: Public IP address bound to the IP configuration. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :param provisioning_state: The provisioning state of the network interface IP configuration. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - application_gateway_backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, - load_balancer_backend_address_pools: Optional[List["BackendAddressPool"]] = None, - load_balancer_inbound_nat_rules: Optional[List["InboundNatRule"]] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - private_ip_address_version: Optional[Union[str, "IPVersion"]] = None, - subnet: Optional["Subnet"] = None, - primary: Optional[bool] = None, - public_ip_address: Optional["PublicIPAddress"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(NetworkInterfaceIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_rules = load_balancer_inbound_nat_rules - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.private_ip_address_version = private_ip_address_version - self.subnet = subnet - self.primary = primary - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of ip configurations. - :type value: list[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkInterfaceIPConfiguration"]] = None, - **kwargs - ): - super(NetworkInterfaceIPConfigurationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkInterfaceListResult(msrest.serialization.Model): - """Response for the ListNetworkInterface API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of network interfaces in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.NetworkInterface] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterface]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkInterface"]] = None, - **kwargs - ): - super(NetworkInterfaceListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkInterfaceLoadBalancerListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers. - :type value: list[~azure.mgmt.network.v2017_08_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LoadBalancer"]] = None, - **kwargs - ): - super(NetworkInterfaceLoadBalancerListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkSecurityGroup(Resource): - """NetworkSecurityGroup resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param security_rules: A collection of security rules of the network security group. - :type security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - :param default_security_rules: The default security rules of network security group. - :type default_security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - :ivar network_interfaces: A collection of references to network interfaces. - :vartype network_interfaces: list[~azure.mgmt.network.v2017_08_01.models.NetworkInterface] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_08_01.models.Subnet] - :param resource_guid: The resource GUID property of the network security group resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'network_interfaces': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'security_rules': {'key': 'properties.securityRules', 'type': '[SecurityRule]'}, - 'default_security_rules': {'key': 'properties.defaultSecurityRules', 'type': '[SecurityRule]'}, - 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - security_rules: Optional[List["SecurityRule"]] = None, - default_security_rules: Optional[List["SecurityRule"]] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(NetworkSecurityGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.security_rules = security_rules - self.default_security_rules = default_security_rules - self.network_interfaces = None - self.subnets = None - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class NetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for ListNetworkSecurityGroups API service call. - - :param value: A list of NetworkSecurityGroup resources. - :type value: list[~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkSecurityGroup"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(NetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkWatcher(Resource): - """Network watcher in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar provisioning_state: The provisioning state of the resource. Possible values include: - "Succeeded", "Updating", "Deleting", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.network.v2017_08_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - **kwargs - ): - super(NetworkWatcher, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.provisioning_state = None - - -class NetworkWatcherListResult(msrest.serialization.Model): - """List of network watcher resources. - - :param value: - :type value: list[~azure.mgmt.network.v2017_08_01.models.NetworkWatcher] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkWatcher]'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkWatcher"]] = None, - **kwargs - ): - super(NetworkWatcherListResult, self).__init__(**kwargs) - self.value = value - - -class NextHopParameters(msrest.serialization.Model): - """Parameters that define the source and destination endpoint. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The resource identifier of the target resource against - which the action is to be performed. - :type target_resource_id: str - :param source_ip_address: Required. The source IP address. - :type source_ip_address: str - :param destination_ip_address: Required. The destination IP address. - :type destination_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of the nics, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'source_ip_address': {'required': True}, - 'destination_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'source_ip_address': {'key': 'sourceIPAddress', 'type': 'str'}, - 'destination_ip_address': {'key': 'destinationIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - source_ip_address: str, - destination_ip_address: str, - target_nic_resource_id: Optional[str] = None, - **kwargs - ): - super(NextHopParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.source_ip_address = source_ip_address - self.destination_ip_address = destination_ip_address - self.target_nic_resource_id = target_nic_resource_id - - -class NextHopResult(msrest.serialization.Model): - """The information about next hop from the specified VM. - - :param next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", - "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_08_01.models.NextHopType - :param next_hop_ip_address: Next hop IP Address. - :type next_hop_ip_address: str - :param route_table_id: The resource identifier for the route table associated with the route - being returned. If the route being returned does not correspond to any user created routes then - this field will be the string 'System Route'. - :type route_table_id: str - """ - - _attribute_map = { - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, - 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, - } - - def __init__( - self, - *, - next_hop_type: Optional[Union[str, "NextHopType"]] = None, - next_hop_ip_address: Optional[str] = None, - route_table_id: Optional[str] = None, - **kwargs - ): - super(NextHopResult, self).__init__(**kwargs) - self.next_hop_type = next_hop_type - self.next_hop_ip_address = next_hop_ip_address - self.route_table_id = route_table_id - - -class OutboundNatRule(SubResource): - """Outbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allocated_outbound_ports: The number of outbound ports to be used for NAT. - :type allocated_outbound_ports: int - :param frontend_ip_configurations: The Frontend IP addresses of the load balancer. - :type frontend_ip_configurations: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[SubResource]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - allocated_outbound_ports: Optional[int] = None, - frontend_ip_configurations: Optional[List["SubResource"]] = None, - backend_address_pool: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(OutboundNatRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.allocated_outbound_ports = allocated_outbound_ports - self.frontend_ip_configurations = frontend_ip_configurations - self.backend_address_pool = backend_address_pool - self.provisioning_state = provisioning_state - - -class PacketCapture(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - *, - target: str, - storage_location: "PacketCaptureStorageLocation", - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - filters: Optional[List["PacketCaptureFilter"]] = None, - **kwargs - ): - super(PacketCapture, self).__init__(**kwargs) - self.target = target - self.bytes_to_capture_per_packet = bytes_to_capture_per_packet - self.total_bytes_per_session = total_bytes_per_session - self.time_limit_in_seconds = time_limit_in_seconds - self.storage_location = storage_location - self.filters = filters - - -class PacketCaptureFilter(msrest.serialization.Model): - """Filter that is applied to packet capture request. Multiple filters can be applied. - - :param protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". - Default value: "Any". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.PcProtocol - :param local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type local_ip_address: str - :param remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type remote_ip_address: str - :param local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type local_port: str - :param remote_port: Remote port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type remote_port: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - } - - def __init__( - self, - *, - protocol: Optional[Union[str, "PcProtocol"]] = "Any", - local_ip_address: Optional[str] = None, - remote_ip_address: Optional[str] = None, - local_port: Optional[str] = None, - remote_port: Optional[str] = None, - **kwargs - ): - super(PacketCaptureFilter, self).__init__(**kwargs) - self.protocol = protocol - self.local_ip_address = local_ip_address - self.remote_ip_address = remote_ip_address - self.local_port = local_port - self.remote_port = remote_port - - -class PacketCaptureListResult(msrest.serialization.Model): - """List of packet capture sessions. - - :param value: Information about packet capture sessions. - :type value: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureResult] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, - } - - def __init__( - self, - *, - value: Optional[List["PacketCaptureResult"]] = None, - **kwargs - ): - super(PacketCaptureListResult, self).__init__(**kwargs) - self.value = value - - -class PacketCaptureParameters(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - *, - target: str, - storage_location: "PacketCaptureStorageLocation", - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - filters: Optional[List["PacketCaptureFilter"]] = None, - **kwargs - ): - super(PacketCaptureParameters, self).__init__(**kwargs) - self.target = target - self.bytes_to_capture_per_packet = bytes_to_capture_per_packet - self.total_bytes_per_session = total_bytes_per_session - self.time_limit_in_seconds = time_limit_in_seconds - self.storage_location = storage_location - self.filters = filters - - -class PacketCaptureQueryStatusResult(msrest.serialization.Model): - """Status of packet capture session. - - :param name: The name of the packet capture resource. - :type name: str - :param id: The ID of the packet capture resource. - :type id: str - :param capture_start_time: The start time of the packet capture session. - :type capture_start_time: ~datetime.datetime - :param packet_capture_status: The status of the packet capture session. Possible values - include: "NotStarted", "Running", "Stopped", "Error", "Unknown". - :type packet_capture_status: str or ~azure.mgmt.network.v2017_08_01.models.PcStatus - :param stop_reason: The reason the current packet capture session was stopped. - :type stop_reason: str - :param packet_capture_error: List of errors of packet capture session. - :type packet_capture_error: list[str or ~azure.mgmt.network.v2017_08_01.models.PcError] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'capture_start_time': {'key': 'captureStartTime', 'type': 'iso-8601'}, - 'packet_capture_status': {'key': 'packetCaptureStatus', 'type': 'str'}, - 'stop_reason': {'key': 'stopReason', 'type': 'str'}, - 'packet_capture_error': {'key': 'packetCaptureError', 'type': '[str]'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - id: Optional[str] = None, - capture_start_time: Optional[datetime.datetime] = None, - packet_capture_status: Optional[Union[str, "PcStatus"]] = None, - stop_reason: Optional[str] = None, - packet_capture_error: Optional[List[Union[str, "PcError"]]] = None, - **kwargs - ): - super(PacketCaptureQueryStatusResult, self).__init__(**kwargs) - self.name = name - self.id = id - self.capture_start_time = capture_start_time - self.packet_capture_status = packet_capture_status - self.stop_reason = stop_reason - self.packet_capture_error = packet_capture_error - - -class PacketCaptureResult(msrest.serialization.Model): - """Information about packet capture session. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the packet capture session. - :vartype name: str - :ivar id: ID of the packet capture operation. - :vartype id: str - :param etag: - :type etag: str - :param target: The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_08_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - etag: Optional[str] = "A unique read-only string that changes whenever the resource is updated.", - target: Optional[str] = None, - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - storage_location: Optional["PacketCaptureStorageLocation"] = None, - filters: Optional[List["PacketCaptureFilter"]] = None, - provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, - **kwargs - ): - super(PacketCaptureResult, self).__init__(**kwargs) - self.name = None - self.id = None - self.etag = etag - self.target = target - self.bytes_to_capture_per_packet = bytes_to_capture_per_packet - self.total_bytes_per_session = total_bytes_per_session - self.time_limit_in_seconds = time_limit_in_seconds - self.storage_location = storage_location - self.filters = filters - self.provisioning_state = provisioning_state - - -class PacketCaptureResultProperties(PacketCaptureParameters): - """Describes the properties of a packet capture session. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_08_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_08_01.models.ProvisioningState - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - target: str, - storage_location: "PacketCaptureStorageLocation", - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - filters: Optional[List["PacketCaptureFilter"]] = None, - provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, - **kwargs - ): - super(PacketCaptureResultProperties, self).__init__(target=target, bytes_to_capture_per_packet=bytes_to_capture_per_packet, total_bytes_per_session=total_bytes_per_session, time_limit_in_seconds=time_limit_in_seconds, storage_location=storage_location, filters=filters, **kwargs) - self.provisioning_state = provisioning_state - - -class PacketCaptureStorageLocation(msrest.serialization.Model): - """Describes the storage location for a packet capture session. - - :param storage_id: The ID of the storage account to save the packet capture session. Required - if no local file path is provided. - :type storage_id: str - :param storage_path: The URI of the storage path to save the packet capture. Must be a - well-formed URI describing the location to save the packet capture. - :type storage_path: str - :param file_path: A valid local path on the targeting VM. Must include the name of the capture - file (*.cap). For linux virtual machine it must start with /var/captures. Required if no - storage ID is provided, otherwise optional. - :type file_path: str - """ - - _attribute_map = { - 'storage_id': {'key': 'storageId', 'type': 'str'}, - 'storage_path': {'key': 'storagePath', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - } - - def __init__( - self, - *, - storage_id: Optional[str] = None, - storage_path: Optional[str] = None, - file_path: Optional[str] = None, - **kwargs - ): - super(PacketCaptureStorageLocation, self).__init__(**kwargs) - self.storage_id = storage_id - self.storage_path = storage_path - self.file_path = file_path - - -class PatchRouteFilter(SubResource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar type: Resource type. - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - rules: Optional[List["RouteFilterRule"]] = None, - peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, - **kwargs - ): - super(PatchRouteFilter, self).__init__(id=id, **kwargs) - self.name = None - self.etag = None - self.type = None - self.tags = tags - self.rules = rules - self.peerings = peerings - self.provisioning_state = None - - -class PatchRouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_08_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - access: Optional[Union[str, "Access"]] = None, - route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, - communities: Optional[List[str]] = None, - **kwargs - ): - super(PatchRouteFilterRule, self).__init__(id=id, **kwargs) - self.name = None - self.etag = None - self.tags = tags - self.access = access - self.route_filter_rule_type = route_filter_rule_type - self.communities = communities - self.provisioning_state = None - - -class Probe(SubResource): - """A load balancer probe. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar load_balancing_rules: The load balancer rules that use this probe. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_08_01.models.SubResource] - :param protocol: The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' - is specified, a received ACK is required for the probe to be successful. If 'Http' is - specified, a 200 OK response from the specifies URI is required for the probe to be successful. - Possible values include: "Http", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.ProbeProtocol - :param port: The port for communicating the probe. Possible values range from 1 to 65535, - inclusive. - :type port: int - :param interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint - for health status. Typically, the interval is slightly less than half the allocated timeout - period (in seconds) which allows two full probes before taking the instance out of rotation. - The default value is 15, the minimum value is 5. - :type interval_in_seconds: int - :param number_of_probes: The number of probes where if no response, will result in stopping - further traffic from being delivered to the endpoint. This values allows endpoints to be taken - out of rotation faster or slower than the typical times used in Azure. - :type number_of_probes: int - :param request_path: The URI used for requesting health status from the VM. Path is required if - a protocol is set to http. Otherwise, it is not allowed. There is no default value. - :type request_path: str - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, - 'number_of_probes': {'key': 'properties.numberOfProbes', 'type': 'int'}, - 'request_path': {'key': 'properties.requestPath', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - protocol: Optional[Union[str, "ProbeProtocol"]] = None, - port: Optional[int] = None, - interval_in_seconds: Optional[int] = None, - number_of_probes: Optional[int] = None, - request_path: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(Probe, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.load_balancing_rules = None - self.protocol = protocol - self.port = port - self.interval_in_seconds = interval_in_seconds - self.number_of_probes = number_of_probes - self.request_path = request_path - self.provisioning_state = provisioning_state - - -class PublicIPAddress(Resource): - """Public IP address resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The public IP address SKU. - :type sku: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddressSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :param public_ip_allocation_method: The public IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type public_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param public_ip_address_version: The public IP address version. Possible values are: 'IPv4' - and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type public_ip_address_version: str or ~azure.mgmt.network.v2017_08_01.models.IPVersion - :ivar ip_configuration: The IP configuration associated with the public IP address. - :vartype ip_configuration: ~azure.mgmt.network.v2017_08_01.models.IPConfiguration - :param dns_settings: The FQDN of the DNS record associated with the public IP address. - :type dns_settings: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddressDnsSettings - :param ip_address: The IP address associated with the public IP address resource. - :type ip_address: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param resource_guid: The resource GUID property of the public IP resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'PublicIPAddressSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'public_ip_allocation_method': {'key': 'properties.publicIPAllocationMethod', 'type': 'str'}, - 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, - 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["PublicIPAddressSku"] = None, - etag: Optional[str] = None, - zones: Optional[List[str]] = None, - public_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - public_ip_address_version: Optional[Union[str, "IPVersion"]] = None, - dns_settings: Optional["PublicIPAddressDnsSettings"] = None, - ip_address: Optional[str] = None, - idle_timeout_in_minutes: Optional[int] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(PublicIPAddress, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.sku = sku - self.etag = etag - self.zones = zones - self.public_ip_allocation_method = public_ip_allocation_method - self.public_ip_address_version = public_ip_address_version - self.ip_configuration = None - self.dns_settings = dns_settings - self.ip_address = ip_address - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class PublicIPAddressDnsSettings(msrest.serialization.Model): - """Contains FQDN of the DNS record associated with the public IP address. - - :param domain_name_label: Gets or sets the Domain name label.The concatenation of the domain - name label and the regionalized DNS zone make up the fully qualified domain name associated - with the public IP address. If a domain name label is specified, an A DNS record is created for - the public IP in the Microsoft Azure DNS system. - :type domain_name_label: str - :param fqdn: Gets the FQDN, Fully qualified domain name of the A DNS record associated with the - public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. - :type fqdn: str - :param reverse_fqdn: Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name - that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record - is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. - :type reverse_fqdn: str - """ - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'reverse_fqdn': {'key': 'reverseFqdn', 'type': 'str'}, - } - - def __init__( - self, - *, - domain_name_label: Optional[str] = None, - fqdn: Optional[str] = None, - reverse_fqdn: Optional[str] = None, - **kwargs - ): - super(PublicIPAddressDnsSettings, self).__init__(**kwargs) - self.domain_name_label = domain_name_label - self.fqdn = fqdn - self.reverse_fqdn = reverse_fqdn - - -class PublicIPAddressListResult(msrest.serialization.Model): - """Response for ListPublicIpAddresses API service call. - - :param value: A list of public IP addresses that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.PublicIPAddress] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["PublicIPAddress"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(PublicIPAddressListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class PublicIPAddressSku(msrest.serialization.Model): - """SKU of a public IP address. - - :param name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_08_01.models.PublicIPAddressSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "PublicIPAddressSkuName"]] = None, - **kwargs - ): - super(PublicIPAddressSku, self).__init__(**kwargs) - self.name = name - - -class QueryTroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to query the troubleshooting result. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource ID to query the troubleshooting - result. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - **kwargs - ): - super(QueryTroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - - -class ResourceNavigationLink(SubResource): - """ResourceNavigationLink resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param linked_resource_type: Resource type of the linked resource. - :type linked_resource_type: str - :param link: Link to the external resource. - :type link: str - :ivar provisioning_state: Provisioning state of the ResourceNavigationLink resource. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, - 'link': {'key': 'properties.link', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - linked_resource_type: Optional[str] = None, - link: Optional[str] = None, - **kwargs - ): - super(ResourceNavigationLink, self).__init__(id=id, **kwargs) - self.name = name - self.etag = None - self.linked_resource_type = linked_resource_type - self.link = link - self.provisioning_state = None - - -class RetentionPolicyParameters(msrest.serialization.Model): - """Parameters that define the retention policy for flow log. - - :param days: Number of days to retain flow log records. - :type days: int - :param enabled: Flag to enable/disable retention. - :type enabled: bool - """ - - _attribute_map = { - 'days': {'key': 'days', 'type': 'int'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__( - self, - *, - days: Optional[int] = 0, - enabled: Optional[bool] = False, - **kwargs - ): - super(RetentionPolicyParameters, self).__init__(**kwargs) - self.days = days - self.enabled = enabled - - -class Route(SubResource): - """Route resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The destination CIDR to which the route applies. - :type address_prefix: str - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_08_01.models.RouteNextHopType - :param next_hop_ip_address: The IP address packets should be forwarded to. Next hop values are - only allowed in routes where the next hop type is VirtualAppliance. - :type next_hop_ip_address: str - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'next_hop_type': {'key': 'properties.nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'properties.nextHopIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - address_prefix: Optional[str] = None, - next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, - next_hop_ip_address: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(Route, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.address_prefix = address_prefix - self.next_hop_type = next_hop_type - self.next_hop_ip_address = next_hop_ip_address - self.provisioning_state = provisioning_state - - -class RouteFilter(Resource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - rules: Optional[List["RouteFilterRule"]] = None, - peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, - **kwargs - ): - super(RouteFilter, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = None - self.rules = rules - self.peerings = peerings - self.provisioning_state = None - - -class RouteFilterListResult(msrest.serialization.Model): - """Response for the ListRouteFilters API service call. - - :param value: Gets a list of route filters in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.RouteFilter] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilter]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RouteFilter"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteFilterListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param location: Resource location. - :type location: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_08_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - access: Optional[Union[str, "Access"]] = None, - route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, - communities: Optional[List[str]] = None, - **kwargs - ): - super(RouteFilterRule, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.etag = None - self.tags = tags - self.access = access - self.route_filter_rule_type = route_filter_rule_type - self.communities = communities - self.provisioning_state = None - - -class RouteFilterRuleListResult(msrest.serialization.Model): - """Response for the ListRouteFilterRules API service call. - - :param value: Gets a list of RouteFilterRules in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilterRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RouteFilterRule"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteFilterRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RouteListResult(msrest.serialization.Model): - """Response for the ListRoute API service call. - - :param value: Gets a list of routes in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.Route] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Route]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Route"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RouteTable(Resource): - """Route table resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param routes: Collection of routes contained within a route table. - :type routes: list[~azure.mgmt.network.v2017_08_01.models.Route] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_08_01.models.Subnet] - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'routes': {'key': 'properties.routes', 'type': '[Route]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - routes: Optional[List["Route"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(RouteTable, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.routes = routes - self.subnets = None - self.provisioning_state = provisioning_state - - -class RouteTableListResult(msrest.serialization.Model): - """Response for the ListRouteTable API service call. - - :param value: Gets a list of route tables in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.RouteTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RouteTable"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteTableListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class SecurityGroupNetworkInterface(msrest.serialization.Model): - """Network interface and all its associated security rules. - - :param id: ID of the network interface. - :type id: str - :param security_rule_associations: All security rules associated with the network interface. - :type security_rule_associations: - ~azure.mgmt.network.v2017_08_01.models.SecurityRuleAssociations - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rule_associations': {'key': 'securityRuleAssociations', 'type': 'SecurityRuleAssociations'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - security_rule_associations: Optional["SecurityRuleAssociations"] = None, - **kwargs - ): - super(SecurityGroupNetworkInterface, self).__init__(**kwargs) - self.id = id - self.security_rule_associations = security_rule_associations - - -class SecurityGroupViewParameters(msrest.serialization.Model): - """Parameters that define the VM to check security groups for. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. ID of the target VM. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - **kwargs - ): - super(SecurityGroupViewParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - - -class SecurityGroupViewResult(msrest.serialization.Model): - """The information about security rules applied to the specified VM. - - :param network_interfaces: List of network interfaces on the specified VM. - :type network_interfaces: - list[~azure.mgmt.network.v2017_08_01.models.SecurityGroupNetworkInterface] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, - } - - def __init__( - self, - *, - network_interfaces: Optional[List["SecurityGroupNetworkInterface"]] = None, - **kwargs - ): - super(SecurityGroupViewResult, self).__init__(**kwargs) - self.network_interfaces = network_interfaces - - -class SecurityRule(SubResource): - """Network security rule. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param description: A description for this rule. Restricted to 140 chars. - :type description: str - :param protocol: Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and - '*'. Possible values include: "Tcp", "Udp", "*". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleProtocol - :param source_port_range: The source port or range. Integer or range between 0 and 65535. - Asterisk '*' can also be used to match all ports. - :type source_port_range: str - :param destination_port_range: The destination port or range. Integer or range between 0 and - 65535. Asterisk '*' can also be used to match all ports. - :type destination_port_range: str - :param source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to - match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - can also be used. If this is an ingress rule, specifies where network traffic originates from. - :type source_address_prefix: str - :param source_address_prefixes: The CIDR or source IP ranges. - :type source_address_prefixes: list[str] - :param destination_address_prefix: The destination address prefix. CIDR or destination IP - range. Asterisk '*' can also be used to match all source IPs. Default tags such as - 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - :type destination_address_prefix: str - :param destination_address_prefixes: The destination address prefixes. CIDR or destination IP - ranges. - :type destination_address_prefixes: list[str] - :param source_port_ranges: The source port ranges. - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. - :type destination_port_ranges: list[str] - :param access: The network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleAccess - :param priority: The priority of the rule. The value can be between 100 and 4096. The priority - number must be unique for each rule in the collection. The lower the priority number, the - higher the priority of the rule. - :type priority: int - :param direction: The direction of the rule. The direction specifies if rule will be evaluated - on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_08_01.models.SecurityRuleDirection - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'source_port_range': {'key': 'properties.sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'properties.destinationPortRange', 'type': 'str'}, - 'source_address_prefix': {'key': 'properties.sourceAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'properties.sourceAddressPrefixes', 'type': '[str]'}, - 'destination_address_prefix': {'key': 'properties.destinationAddressPrefix', 'type': 'str'}, - 'destination_address_prefixes': {'key': 'properties.destinationAddressPrefixes', 'type': '[str]'}, - 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'priority': {'key': 'properties.priority', 'type': 'int'}, - 'direction': {'key': 'properties.direction', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - description: Optional[str] = None, - protocol: Optional[Union[str, "SecurityRuleProtocol"]] = None, - source_port_range: Optional[str] = None, - destination_port_range: Optional[str] = None, - source_address_prefix: Optional[str] = None, - source_address_prefixes: Optional[List[str]] = None, - destination_address_prefix: Optional[str] = None, - destination_address_prefixes: Optional[List[str]] = None, - source_port_ranges: Optional[List[str]] = None, - destination_port_ranges: Optional[List[str]] = None, - access: Optional[Union[str, "SecurityRuleAccess"]] = None, - priority: Optional[int] = None, - direction: Optional[Union[str, "SecurityRuleDirection"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(SecurityRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.description = description - self.protocol = protocol - self.source_port_range = source_port_range - self.destination_port_range = destination_port_range - self.source_address_prefix = source_address_prefix - self.source_address_prefixes = source_address_prefixes - self.destination_address_prefix = destination_address_prefix - self.destination_address_prefixes = destination_address_prefixes - self.source_port_ranges = source_port_ranges - self.destination_port_ranges = destination_port_ranges - self.access = access - self.priority = priority - self.direction = direction - self.provisioning_state = provisioning_state - - -class SecurityRuleAssociations(msrest.serialization.Model): - """All security rules associated with the network interface. - - :param network_interface_association: Network interface and its custom security rules. - :type network_interface_association: - ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceAssociation - :param subnet_association: Network interface and its custom security rules. - :type subnet_association: ~azure.mgmt.network.v2017_08_01.models.SubnetAssociation - :param default_security_rules: Collection of default security rules of the network security - group. - :type default_security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - :param effective_security_rules: Collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityRule] - """ - - _attribute_map = { - 'network_interface_association': {'key': 'networkInterfaceAssociation', 'type': 'NetworkInterfaceAssociation'}, - 'subnet_association': {'key': 'subnetAssociation', 'type': 'SubnetAssociation'}, - 'default_security_rules': {'key': 'defaultSecurityRules', 'type': '[SecurityRule]'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - } - - def __init__( - self, - *, - network_interface_association: Optional["NetworkInterfaceAssociation"] = None, - subnet_association: Optional["SubnetAssociation"] = None, - default_security_rules: Optional[List["SecurityRule"]] = None, - effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, - **kwargs - ): - super(SecurityRuleAssociations, self).__init__(**kwargs) - self.network_interface_association = network_interface_association - self.subnet_association = subnet_association - self.default_security_rules = default_security_rules - self.effective_security_rules = effective_security_rules - - -class SecurityRuleListResult(msrest.serialization.Model): - """Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. - - :param value: The security rules in a network security group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["SecurityRule"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(SecurityRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ServiceEndpointPropertiesFormat(msrest.serialization.Model): - """The service endpoint properties. - - :param service: The type of the endpoint service. - :type service: str - :param locations: A list of locations. - :type locations: list[str] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'service': {'key': 'service', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - service: Optional[str] = None, - locations: Optional[List[str]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ServiceEndpointPropertiesFormat, self).__init__(**kwargs) - self.service = service - self.locations = locations - self.provisioning_state = provisioning_state - - -class Subnet(SubResource): - """Subnet in a virtual network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The address prefix for the subnet. - :type address_prefix: str - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup - :param route_table: The reference of the RouteTable resource. - :type route_table: ~azure.mgmt.network.v2017_08_01.models.RouteTable - :param service_endpoints: An array of service endpoints. - :type service_endpoints: - list[~azure.mgmt.network.v2017_08_01.models.ServiceEndpointPropertiesFormat] - :ivar ip_configurations: Gets an array of references to the network interface IP configurations - using subnet. - :vartype ip_configurations: list[~azure.mgmt.network.v2017_08_01.models.IPConfiguration] - :param resource_navigation_links: Gets an array of references to the external resources using - subnet. - :type resource_navigation_links: - list[~azure.mgmt.network.v2017_08_01.models.ResourceNavigationLink] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'ip_configurations': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, - 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, - 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - address_prefix: Optional[str] = None, - network_security_group: Optional["NetworkSecurityGroup"] = None, - route_table: Optional["RouteTable"] = None, - service_endpoints: Optional[List["ServiceEndpointPropertiesFormat"]] = None, - resource_navigation_links: Optional[List["ResourceNavigationLink"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(Subnet, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.address_prefix = address_prefix - self.network_security_group = network_security_group - self.route_table = route_table - self.service_endpoints = service_endpoints - self.ip_configurations = None - self.resource_navigation_links = resource_navigation_links - self.provisioning_state = provisioning_state - - -class SubnetAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Subnet ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_08_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - *, - security_rules: Optional[List["SecurityRule"]] = None, - **kwargs - ): - super(SubnetAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = security_rules - - -class SubnetListResult(msrest.serialization.Model): - """Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. - - :param value: The subnets in a virtual network. - :type value: list[~azure.mgmt.network.v2017_08_01.models.Subnet] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Subnet]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Subnet"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(SubnetListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Topology(msrest.serialization.Model): - """Topology of the specified resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: GUID representing the operation id. - :vartype id: str - :ivar created_date_time: The datetime when the topology was initially created for the resource - group. - :vartype created_date_time: ~datetime.datetime - :ivar last_modified: The datetime when the topology was last modified. - :vartype last_modified: ~datetime.datetime - :param resources: - :type resources: list[~azure.mgmt.network.v2017_08_01.models.TopologyResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'last_modified': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, - 'resources': {'key': 'resources', 'type': '[TopologyResource]'}, - } - - def __init__( - self, - *, - resources: Optional[List["TopologyResource"]] = None, - **kwargs - ): - super(Topology, self).__init__(**kwargs) - self.id = None - self.created_date_time = None - self.last_modified = None - self.resources = resources - - -class TopologyAssociation(msrest.serialization.Model): - """Resources that have an association with the parent resource. - - :param name: The name of the resource that is associated with the parent resource. - :type name: str - :param resource_id: The ID of the resource that is associated with the parent resource. - :type resource_id: str - :param association_type: The association type of the child resource to the parent resource. - Possible values include: "Associated", "Contains". - :type association_type: str or ~azure.mgmt.network.v2017_08_01.models.AssociationType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'association_type': {'key': 'associationType', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - resource_id: Optional[str] = None, - association_type: Optional[Union[str, "AssociationType"]] = None, - **kwargs - ): - super(TopologyAssociation, self).__init__(**kwargs) - self.name = name - self.resource_id = resource_id - self.association_type = association_type - - -class TopologyParameters(msrest.serialization.Model): - """Parameters that define the representation of topology. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_group_name: Required. The name of the target resource group to perform - topology on. - :type target_resource_group_name: str - """ - - _validation = { - 'target_resource_group_name': {'required': True}, - } - - _attribute_map = { - 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_group_name: str, - **kwargs - ): - super(TopologyParameters, self).__init__(**kwargs) - self.target_resource_group_name = target_resource_group_name - - -class TopologyResource(msrest.serialization.Model): - """The network resource topology information for the given resource group. - - :param name: Name of the resource. - :type name: str - :param id: ID of the resource. - :type id: str - :param location: Resource location. - :type location: str - :param associations: Holds the associations the resource has with other resources in the - resource group. - :type associations: list[~azure.mgmt.network.v2017_08_01.models.TopologyAssociation] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - id: Optional[str] = None, - location: Optional[str] = None, - associations: Optional[List["TopologyAssociation"]] = None, - **kwargs - ): - super(TopologyResource, self).__init__(**kwargs) - self.name = name - self.id = id - self.location = location - self.associations = associations - - -class TroubleshootingDetails(msrest.serialization.Model): - """Information gained from troubleshooting of specified resource. - - :param id: The id of the get troubleshoot operation. - :type id: str - :param reason_type: Reason type of failure. - :type reason_type: str - :param summary: A summary of troubleshooting. - :type summary: str - :param detail: Details on troubleshooting results. - :type detail: str - :param recommended_actions: List of recommended actions. - :type recommended_actions: - list[~azure.mgmt.network.v2017_08_01.models.TroubleshootingRecommendedActions] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'reason_type': {'key': 'reasonType', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': 'str'}, - 'detail': {'key': 'detail', 'type': 'str'}, - 'recommended_actions': {'key': 'recommendedActions', 'type': '[TroubleshootingRecommendedActions]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - reason_type: Optional[str] = None, - summary: Optional[str] = None, - detail: Optional[str] = None, - recommended_actions: Optional[List["TroubleshootingRecommendedActions"]] = None, - **kwargs - ): - super(TroubleshootingDetails, self).__init__(**kwargs) - self.id = id - self.reason_type = reason_type - self.summary = summary - self.detail = detail - self.recommended_actions = recommended_actions - - -class TroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to troubleshoot. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource to troubleshoot. - :type target_resource_id: str - :param storage_id: Required. The ID for the storage account to save the troubleshoot result. - :type storage_id: str - :param storage_path: Required. The path to the blob to save the troubleshoot result in. - :type storage_path: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'storage_path': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'storage_path': {'key': 'properties.storagePath', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - storage_id: str, - storage_path: str, - **kwargs - ): - super(TroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.storage_id = storage_id - self.storage_path = storage_path - - -class TroubleshootingRecommendedActions(msrest.serialization.Model): - """Recommended actions based on discovered issues. - - :param action_id: ID of the recommended action. - :type action_id: str - :param action_text: Description of recommended actions. - :type action_text: str - :param action_uri: The uri linking to a documentation for the recommended troubleshooting - actions. - :type action_uri: str - :param action_uri_text: The information from the URI for the recommended troubleshooting - actions. - :type action_uri_text: str - """ - - _attribute_map = { - 'action_id': {'key': 'actionId', 'type': 'str'}, - 'action_text': {'key': 'actionText', 'type': 'str'}, - 'action_uri': {'key': 'actionUri', 'type': 'str'}, - 'action_uri_text': {'key': 'actionUriText', 'type': 'str'}, - } - - def __init__( - self, - *, - action_id: Optional[str] = None, - action_text: Optional[str] = None, - action_uri: Optional[str] = None, - action_uri_text: Optional[str] = None, - **kwargs - ): - super(TroubleshootingRecommendedActions, self).__init__(**kwargs) - self.action_id = action_id - self.action_text = action_text - self.action_uri = action_uri - self.action_uri_text = action_uri_text - - -class TroubleshootingResult(msrest.serialization.Model): - """Troubleshooting information gained from specified resource. - - :param start_time: The start time of the troubleshooting. - :type start_time: ~datetime.datetime - :param end_time: The end time of the troubleshooting. - :type end_time: ~datetime.datetime - :param code: The result code of the troubleshooting. - :type code: str - :param results: Information from troubleshooting. - :type results: list[~azure.mgmt.network.v2017_08_01.models.TroubleshootingDetails] - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - code: Optional[str] = None, - results: Optional[List["TroubleshootingDetails"]] = None, - **kwargs - ): - super(TroubleshootingResult, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.code = code - self.results = results - - -class TunnelConnectionHealth(msrest.serialization.Model): - """VirtualNetworkGatewayConnection properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar tunnel: Tunnel name. - :vartype tunnel: str - :ivar connection_status: Virtual network Gateway connection status. Possible values include: - "Unknown", "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionStatus - :ivar ingress_bytes_transferred: The Ingress Bytes Transferred in this connection. - :vartype ingress_bytes_transferred: long - :ivar egress_bytes_transferred: The Egress Bytes Transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar last_connection_established_utc_time: The time at which connection was established in Utc - format. - :vartype last_connection_established_utc_time: str - """ - - _validation = { - 'tunnel': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'last_connection_established_utc_time': {'readonly': True}, - } - - _attribute_map = { - 'tunnel': {'key': 'tunnel', 'type': 'str'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, - 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, - 'last_connection_established_utc_time': {'key': 'lastConnectionEstablishedUtcTime', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TunnelConnectionHealth, self).__init__(**kwargs) - self.tunnel = None - self.connection_status = None - self.ingress_bytes_transferred = None - self.egress_bytes_transferred = None - self.last_connection_established_utc_time = None - - -class Usage(msrest.serialization.Model): - """Describes network resource usage. - - 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. - - :ivar id: Resource identifier. - :vartype id: str - :param unit: Required. An enum describing the unit of measurement. Possible values include: - "Count". - :type unit: str or ~azure.mgmt.network.v2017_08_01.models.UsageUnit - :param current_value: Required. The current value of the usage. - :type current_value: long - :param limit: Required. The limit of usage. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.network.v2017_08_01.models.UsageName - """ - - _validation = { - 'id': {'readonly': True}, - 'unit': {'required': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - def __init__( - self, - *, - unit: Union[str, "UsageUnit"], - current_value: int, - limit: int, - name: "UsageName", - **kwargs - ): - super(Usage, self).__init__(**kwargs) - self.id = None - self.unit = unit - self.current_value = current_value - self.limit = limit - self.name = name - - -class UsageName(msrest.serialization.Model): - """The usage names. - - :param value: A string describing the resource name. - :type value: str - :param localized_value: A localized string describing the resource name. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - localized_value: Optional[str] = None, - **kwargs - ): - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class UsagesListResult(msrest.serialization.Model): - """The list usages operation response. - - :param value: The list network resource usages. - :type value: list[~azure.mgmt.network.v2017_08_01.models.Usage] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Usage"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(UsagesListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class VerificationIPFlowParameters(msrest.serialization.Model): - """Parameters that define the IP flow to be verified. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the target resource to perform next-hop on. - :type target_resource_id: str - :param direction: Required. The direction of the packet represented as a 5-tuple. Possible - values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_08_01.models.Direction - :param protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". - :type protocol: str or ~azure.mgmt.network.v2017_08_01.models.Protocol - :param local_port: Required. The local port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type local_port: str - :param remote_port: Required. The remote port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type remote_port: str - :param local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 - addresses. - :type local_ip_address: str - :param remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 - addresses. - :type remote_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of them, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'direction': {'required': True}, - 'protocol': {'required': True}, - 'local_port': {'required': True}, - 'remote_port': {'required': True}, - 'local_ip_address': {'required': True}, - 'remote_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'direction': {'key': 'direction', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - direction: Union[str, "Direction"], - protocol: Union[str, "Protocol"], - local_port: str, - remote_port: str, - local_ip_address: str, - remote_ip_address: str, - target_nic_resource_id: Optional[str] = None, - **kwargs - ): - super(VerificationIPFlowParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.direction = direction - self.protocol = protocol - self.local_port = local_port - self.remote_port = remote_port - self.local_ip_address = local_ip_address - self.remote_ip_address = remote_ip_address - self.target_nic_resource_id = target_nic_resource_id - - -class VerificationIPFlowResult(msrest.serialization.Model): - """Results of IP flow verification on the target resource. - - :param access: Indicates whether the traffic is allowed or denied. Possible values include: - "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_08_01.models.Access - :param rule_name: Name of the rule. If input is not matched against any security rule, it is - not displayed. - :type rule_name: str - """ - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'rule_name': {'key': 'ruleName', 'type': 'str'}, - } - - def __init__( - self, - *, - access: Optional[Union[str, "Access"]] = None, - rule_name: Optional[str] = None, - **kwargs - ): - super(VerificationIPFlowResult, self).__init__(**kwargs) - self.access = access - self.rule_name = rule_name - - -class VirtualNetwork(Resource): - """Virtual Network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_space: The AddressSpace that contains an array of IP address ranges that can be - used by subnets. - :type address_space: ~azure.mgmt.network.v2017_08_01.models.AddressSpace - :param dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs - deployed in the virtual network. - :type dhcp_options: ~azure.mgmt.network.v2017_08_01.models.DhcpOptions - :param subnets: A list of subnets in a Virtual Network. - :type subnets: list[~azure.mgmt.network.v2017_08_01.models.Subnet] - :param virtual_network_peerings: A list of peerings in a Virtual Network. - :type virtual_network_peerings: - list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering] - :param resource_guid: The resourceGuid property of the Virtual Network resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, - 'dhcp_options': {'key': 'properties.dhcpOptions', 'type': 'DhcpOptions'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'virtual_network_peerings': {'key': 'properties.virtualNetworkPeerings', 'type': '[VirtualNetworkPeering]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - address_space: Optional["AddressSpace"] = None, - dhcp_options: Optional["DhcpOptions"] = None, - subnets: Optional[List["Subnet"]] = None, - virtual_network_peerings: Optional[List["VirtualNetworkPeering"]] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(VirtualNetwork, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.address_space = address_space - self.dhcp_options = dhcp_options - self.subnets = subnets - self.virtual_network_peerings = virtual_network_peerings - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class VirtualNetworkConnectionGatewayReference(msrest.serialization.Model): - """A reference to VirtualNetworkGateway or LocalNetworkGateway resource. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: str, - **kwargs - ): - super(VirtualNetworkConnectionGatewayReference, self).__init__(**kwargs) - self.id = id - - -class VirtualNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param ip_configurations: IP configurations for virtual network gateway. - :type ip_configurations: - list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayIPConfiguration] - :param gateway_type: The type of this virtual network gateway. Possible values are: 'Vpn' and - 'ExpressRoute'. Possible values include: "Vpn", "ExpressRoute". - :type gateway_type: str or ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayType - :param vpn_type: The type of this virtual network gateway. Possible values are: 'PolicyBased' - and 'RouteBased'. Possible values include: "PolicyBased", "RouteBased". - :type vpn_type: str or ~azure.mgmt.network.v2017_08_01.models.VpnType - :param enable_bgp: Whether BGP is enabled for this virtual network gateway or not. - :type enable_bgp: bool - :param active: ActiveActive flag. - :type active: bool - :param gateway_default_site: The reference of the LocalNetworkGateway resource which represents - local network site having default routes. Assign Null value in case of removing existing - default site setting. - :type gateway_default_site: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param sku: The reference of the VirtualNetworkGatewaySku resource which represents the SKU - selected for Virtual network gateway. - :type sku: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewaySku - :param vpn_client_configuration: The reference of the VpnClientConfiguration resource which - represents the P2S VpnClient configurations. - :type vpn_client_configuration: ~azure.mgmt.network.v2017_08_01.models.VpnClientConfiguration - :param bgp_settings: Virtual network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_08_01.models.BgpSettings - :param resource_guid: The resource GUID property of the VirtualNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGateway resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualNetworkGatewayIPConfiguration]'}, - 'gateway_type': {'key': 'properties.gatewayType', 'type': 'str'}, - 'vpn_type': {'key': 'properties.vpnType', 'type': 'str'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'active': {'key': 'properties.activeActive', 'type': 'bool'}, - 'gateway_default_site': {'key': 'properties.gatewayDefaultSite', 'type': 'SubResource'}, - 'sku': {'key': 'properties.sku', 'type': 'VirtualNetworkGatewaySku'}, - 'vpn_client_configuration': {'key': 'properties.vpnClientConfiguration', 'type': 'VpnClientConfiguration'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - ip_configurations: Optional[List["VirtualNetworkGatewayIPConfiguration"]] = None, - gateway_type: Optional[Union[str, "VirtualNetworkGatewayType"]] = None, - vpn_type: Optional[Union[str, "VpnType"]] = None, - enable_bgp: Optional[bool] = None, - active: Optional[bool] = None, - gateway_default_site: Optional["SubResource"] = None, - sku: Optional["VirtualNetworkGatewaySku"] = None, - vpn_client_configuration: Optional["VpnClientConfiguration"] = None, - bgp_settings: Optional["BgpSettings"] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.ip_configurations = ip_configurations - self.gateway_type = gateway_type - self.vpn_type = vpn_type - self.enable_bgp = enable_bgp - self.active = active - self.gateway_default_site = gateway_default_site - self.sku = sku - self.vpn_client_configuration = vpn_client_configuration - self.bgp_settings = bgp_settings - self.resource_guid = resource_guid - self.provisioning_state = None - - -class VirtualNetworkGatewayConnection(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: ~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_08_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_08_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkGateway'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkGateway'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'LocalNetworkGateway'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - virtual_network_gateway1: "VirtualNetworkGateway", - connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - authorization_key: Optional[str] = None, - virtual_network_gateway2: Optional["VirtualNetworkGateway"] = None, - local_network_gateway2: Optional["LocalNetworkGateway"] = None, - routing_weight: Optional[int] = None, - shared_key: Optional[str] = None, - peer: Optional["SubResource"] = None, - enable_bgp: Optional[bool] = None, - use_policy_based_traffic_selectors: Optional[bool] = None, - ipsec_policies: Optional[List["IpsecPolicy"]] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkGatewayConnection, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.authorization_key = authorization_key - self.virtual_network_gateway1 = virtual_network_gateway1 - self.virtual_network_gateway2 = virtual_network_gateway2 - self.local_network_gateway2 = local_network_gateway2 - self.connection_type = connection_type - self.routing_weight = routing_weight - self.shared_key = shared_key - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = peer - self.enable_bgp = enable_bgp - self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors - self.ipsec_policies = ipsec_policies - self.resource_guid = resource_guid - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListEntity(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkConnectionGatewayReference - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkConnectionGatewayReference - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkConnectionGatewayReference - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_08_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_08_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - virtual_network_gateway1: "VirtualNetworkConnectionGatewayReference", - connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - authorization_key: Optional[str] = None, - virtual_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, - local_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, - routing_weight: Optional[int] = None, - shared_key: Optional[str] = None, - peer: Optional["SubResource"] = None, - enable_bgp: Optional[bool] = None, - use_policy_based_traffic_selectors: Optional[bool] = None, - ipsec_policies: Optional[List["IpsecPolicy"]] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListEntity, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.authorization_key = authorization_key - self.virtual_network_gateway1 = virtual_network_gateway1 - self.virtual_network_gateway2 = virtual_network_gateway2 - self.local_network_gateway2 = local_network_gateway2 - self.connection_type = connection_type - self.routing_weight = routing_weight - self.shared_key = shared_key - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = peer - self.enable_bgp = enable_bgp - self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors - self.ipsec_policies = ipsec_policies - self.resource_guid = resource_guid - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGatewayConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnection] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnection]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkGatewayConnection"]] = None, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class VirtualNetworkGatewayIPConfiguration(SubResource): - """IP configuration for virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_08_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_08_01.models.SubResource - :ivar provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["SubResource"] = None, - public_ip_address: Optional["SubResource"] = None, - **kwargs - ): - super(VirtualNetworkGatewayIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = None - - -class VirtualNetworkGatewayListConnectionsResult(msrest.serialization.Model): - """Response for the VirtualNetworkGatewayListConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: - list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionListEntity] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnectionListEntity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkGatewayConnectionListEntity"]] = None, - **kwargs - ): - super(VirtualNetworkGatewayListConnectionsResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class VirtualNetworkGatewayListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGateway resources that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkGateway"]] = None, - **kwargs - ): - super(VirtualNetworkGatewayListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class VirtualNetworkGatewaySku(msrest.serialization.Model): - """VirtualNetworkGatewaySku details. - - :param name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type name: str or ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewaySkuName - :param tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type tier: str or ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewaySkuTier - :param capacity: The capacity. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "VirtualNetworkGatewaySkuName"]] = None, - tier: Optional[Union[str, "VirtualNetworkGatewaySkuTier"]] = None, - capacity: Optional[int] = None, - **kwargs - ): - super(VirtualNetworkGatewaySku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - - -class VirtualNetworkListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworks API service call. - - :param value: Gets a list of VirtualNetwork resources in a resource group. - :type value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetwork] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetwork"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class VirtualNetworkListUsageResult(msrest.serialization.Model): - """Response for the virtual networks GetUsage API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: VirtualNetwork usage stats. - :vartype value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkUsage] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkListUsageResult, self).__init__(**kwargs) - self.value = None - self.next_link = next_link - - -class VirtualNetworkPeering(SubResource): - """Peerings in a virtual network resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allow_virtual_network_access: Whether the VMs in the linked virtual network space would - be able to access all the VMs in local Virtual network space. - :type allow_virtual_network_access: bool - :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the remote - virtual network will be allowed/disallowed. - :type allow_forwarded_traffic: bool - :param allow_gateway_transit: If gateway links can be used in remote virtual networking to link - to this virtual network. - :type allow_gateway_transit: bool - :param use_remote_gateways: If remote gateways can be used on this virtual network. If the flag - is set to true, and allowGatewayTransit on remote peering is also true, virtual network will - use gateways of remote virtual network for transit. Only one peering can have this flag set to - true. This flag cannot be set if virtual network already has a gateway. - :type use_remote_gateways: bool - :param remote_virtual_network: The reference of the remote virtual network. - :type remote_virtual_network: ~azure.mgmt.network.v2017_08_01.models.SubResource - :param peering_state: The status of the virtual network peering. Possible values are - 'Initiated', 'Connected', and 'Disconnected'. Possible values include: "Initiated", - "Connected", "Disconnected". - :type peering_state: str or ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeeringState - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, - 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, - 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, - 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, - 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, - 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - allow_virtual_network_access: Optional[bool] = None, - allow_forwarded_traffic: Optional[bool] = None, - allow_gateway_transit: Optional[bool] = None, - use_remote_gateways: Optional[bool] = None, - remote_virtual_network: Optional["SubResource"] = None, - peering_state: Optional[Union[str, "VirtualNetworkPeeringState"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkPeering, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.allow_virtual_network_access = allow_virtual_network_access - self.allow_forwarded_traffic = allow_forwarded_traffic - self.allow_gateway_transit = allow_gateway_transit - self.use_remote_gateways = use_remote_gateways - self.remote_virtual_network = remote_virtual_network - self.peering_state = peering_state - self.provisioning_state = provisioning_state - - -class VirtualNetworkPeeringListResult(msrest.serialization.Model): - """Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. - - :param value: The peerings in a virtual network. - :type value: list[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkPeering"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkPeeringListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class VirtualNetworkUsage(msrest.serialization.Model): - """Usage details for subnet. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar current_value: Indicates number of IPs used from the Subnet. - :vartype current_value: float - :ivar id: Subnet identifier. - :vartype id: str - :ivar limit: Indicates the size of the subnet. - :vartype limit: float - :ivar name: The name containing common and localized value for usage. - :vartype name: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkUsageName - :ivar unit: Usage units. Returns 'Count'. - :vartype unit: str - """ - - _validation = { - 'current_value': {'readonly': True}, - 'id': {'readonly': True}, - 'limit': {'readonly': True}, - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'id': {'key': 'id', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'name': {'key': 'name', 'type': 'VirtualNetworkUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsage, self).__init__(**kwargs) - self.current_value = None - self.id = None - self.limit = None - self.name = None - self.unit = None - - -class VirtualNetworkUsageName(msrest.serialization.Model): - """Usage strings container. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar localized_value: Localized subnet size and usage string. - :vartype localized_value: str - :ivar value: Subnet size and usage string. - :vartype value: str - """ - - _validation = { - 'localized_value': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsageName, self).__init__(**kwargs) - self.localized_value = None - self.value = None - - -class VpnClientConfiguration(msrest.serialization.Model): - """VpnClientConfiguration for P2S client. - - :param vpn_client_address_pool: The reference of the address space resource which represents - Address space for P2S VpnClient. - :type vpn_client_address_pool: ~azure.mgmt.network.v2017_08_01.models.AddressSpace - :param vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. - :type vpn_client_root_certificates: - list[~azure.mgmt.network.v2017_08_01.models.VpnClientRootCertificate] - :param vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network - gateway. - :type vpn_client_revoked_certificates: - list[~azure.mgmt.network.v2017_08_01.models.VpnClientRevokedCertificate] - :param vpn_client_protocols: VpnClientProtocols for Virtual network gateway. - :type vpn_client_protocols: list[str or - ~azure.mgmt.network.v2017_08_01.models.VpnClientProtocol] - :param radius_server_address: The radius server address property of the VirtualNetworkGateway - resource for vpn client connection. - :type radius_server_address: str - :param radius_server_secret: The radius secret property of the VirtualNetworkGateway resource - for vpn client connection. - :type radius_server_secret: str - """ - - _attribute_map = { - 'vpn_client_address_pool': {'key': 'vpnClientAddressPool', 'type': 'AddressSpace'}, - 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, - 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, - 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, - 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, - 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, - } - - def __init__( - self, - *, - vpn_client_address_pool: Optional["AddressSpace"] = None, - vpn_client_root_certificates: Optional[List["VpnClientRootCertificate"]] = None, - vpn_client_revoked_certificates: Optional[List["VpnClientRevokedCertificate"]] = None, - vpn_client_protocols: Optional[List[Union[str, "VpnClientProtocol"]]] = None, - radius_server_address: Optional[str] = None, - radius_server_secret: Optional[str] = None, - **kwargs - ): - super(VpnClientConfiguration, self).__init__(**kwargs) - self.vpn_client_address_pool = vpn_client_address_pool - self.vpn_client_root_certificates = vpn_client_root_certificates - self.vpn_client_revoked_certificates = vpn_client_revoked_certificates - self.vpn_client_protocols = vpn_client_protocols - self.radius_server_address = radius_server_address - self.radius_server_secret = radius_server_secret - - -class VpnClientParameters(msrest.serialization.Model): - """Vpn Client Parameters for package generation. - - :param processor_architecture: VPN client Processor Architecture. Possible values are: 'AMD64' - and 'X86'. Possible values include: "Amd64", "X86". - :type processor_architecture: str or - ~azure.mgmt.network.v2017_08_01.models.ProcessorArchitecture - :param authentication_method: VPN client Authentication Method. Possible values are: 'EAPTLS' - and 'EAPMSCHAPv2'. Possible values include: "EAPTLS", "EAPMSCHAPv2". - :type authentication_method: str or ~azure.mgmt.network.v2017_08_01.models.AuthenticationMethod - :param radius_server_auth_certificate: The public certificate data for the radius server - authentication certificate as a Base-64 encoded string. Required only if external radius - authentication has been configured with EAPTLS authentication. - :type radius_server_auth_certificate: str - :param client_root_certificates: A list of client root certificates public certificate data - encoded as Base-64 strings. Optional parameter for external radius based authentication with - EAPTLS. - :type client_root_certificates: list[str] - """ - - _attribute_map = { - 'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'}, - 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, - 'radius_server_auth_certificate': {'key': 'radiusServerAuthCertificate', 'type': 'str'}, - 'client_root_certificates': {'key': 'clientRootCertificates', 'type': '[str]'}, - } - - def __init__( - self, - *, - processor_architecture: Optional[Union[str, "ProcessorArchitecture"]] = None, - authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, - radius_server_auth_certificate: Optional[str] = None, - client_root_certificates: Optional[List[str]] = None, - **kwargs - ): - super(VpnClientParameters, self).__init__(**kwargs) - self.processor_architecture = processor_architecture - self.authentication_method = authentication_method - self.radius_server_auth_certificate = radius_server_auth_certificate - self.client_root_certificates = client_root_certificates - - -class VpnClientRevokedCertificate(SubResource): - """VPN client revoked certificate of virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param thumbprint: The revoked VPN client certificate thumbprint. - :type thumbprint: str - :ivar provisioning_state: The provisioning state of the VPN client revoked certificate - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - thumbprint: Optional[str] = None, - **kwargs - ): - super(VpnClientRevokedCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.thumbprint = thumbprint - self.provisioning_state = None - - -class VpnClientRootCertificate(SubResource): - """VPN client root certificate of virtual network gateway. - - 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 id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param public_cert_data: Required. The certificate public data. - :type public_cert_data: str - :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'public_cert_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - public_cert_data: str, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - **kwargs - ): - super(VpnClientRootCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.public_cert_data = public_cert_data - self.provisioning_state = None diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_network_management_client_enums.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_network_management_client_enums.py deleted file mode 100644 index db6b5c4fce88..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/_network_management_client_enums.py +++ /dev/null @@ -1,623 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum, EnumMeta -from six import with_metaclass - -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class Access(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Indicates whether the traffic is allowed or denied. - """ - - ALLOW = "Allow" - DENY = "Deny" - -class ApplicationGatewayBackendHealthServerHealth(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Health of backend server. - """ - - UNKNOWN = "Unknown" - UP = "Up" - DOWN = "Down" - PARTIAL = "Partial" - DRAINING = "Draining" - -class ApplicationGatewayCookieBasedAffinity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Cookie based affinity. - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class ApplicationGatewayFirewallMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Web application firewall mode. - """ - - DETECTION = "Detection" - PREVENTION = "Prevention" - -class ApplicationGatewayOperationalState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Operational state of the application gateway resource. - """ - - STOPPED = "Stopped" - STARTING = "Starting" - RUNNING = "Running" - STOPPING = "Stopping" - -class ApplicationGatewayProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protocol. - """ - - HTTP = "Http" - HTTPS = "Https" - -class ApplicationGatewayRedirectType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - PERMANENT = "Permanent" - FOUND = "Found" - SEE_OTHER = "SeeOther" - TEMPORARY = "Temporary" - -class ApplicationGatewayRequestRoutingRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Rule type. - """ - - BASIC = "Basic" - PATH_BASED_ROUTING = "PathBasedRouting" - -class ApplicationGatewaySkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Name of an application gateway SKU. - """ - - STANDARD_SMALL = "Standard_Small" - STANDARD_MEDIUM = "Standard_Medium" - STANDARD_LARGE = "Standard_Large" - WAF_MEDIUM = "WAF_Medium" - WAF_LARGE = "WAF_Large" - -class ApplicationGatewaySslCipherSuite(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Ssl cipher suites enums. - """ - - TLS_ECDHE_RSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - TLS_ECDHE_RSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - TLS_ECDHE_RSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - TLS_ECDHE_RSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - TLS_DHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - TLS_DHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - TLS_DHE_RSA_WITH_AES256_CBC_SHA = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - TLS_DHE_RSA_WITH_AES128_CBC_SHA = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - TLS_RSA_WITH_AES256_GCM_SHA384 = "TLS_RSA_WITH_AES_256_GCM_SHA384" - TLS_RSA_WITH_AES128_GCM_SHA256 = "TLS_RSA_WITH_AES_128_GCM_SHA256" - TLS_RSA_WITH_AES256_CBC_SHA256 = "TLS_RSA_WITH_AES_256_CBC_SHA256" - TLS_RSA_WITH_AES128_CBC_SHA256 = "TLS_RSA_WITH_AES_128_CBC_SHA256" - TLS_RSA_WITH_AES256_CBC_SHA = "TLS_RSA_WITH_AES_256_CBC_SHA" - TLS_RSA_WITH_AES128_CBC_SHA = "TLS_RSA_WITH_AES_128_CBC_SHA" - TLS_ECDHE_ECDSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - TLS_ECDHE_ECDSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - TLS_DHE_DSS_WITH_AES256_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - TLS_DHE_DSS_WITH_AES128_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - TLS_DHE_DSS_WITH_AES256_CBC_SHA = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - TLS_DHE_DSS_WITH_AES128_CBC_SHA = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - TLS_RSA_WITH3_DES_EDE_CBC_SHA = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" - TLS_DHE_DSS_WITH3_DES_EDE_CBC_SHA = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - TLS_ECDHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - TLS_ECDHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - -class ApplicationGatewaySslPolicyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Ssl predefined policy name enums. - """ - - APP_GW_SSL_POLICY20150501 = "AppGwSslPolicy20150501" - APP_GW_SSL_POLICY20170401 = "AppGwSslPolicy20170401" - APP_GW_SSL_POLICY20170401_S = "AppGwSslPolicy20170401S" - -class ApplicationGatewaySslPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of Ssl Policy - """ - - PREDEFINED = "Predefined" - CUSTOM = "Custom" - -class ApplicationGatewaySslProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Ssl protocol enums. - """ - - TL_SV1_0 = "TLSv1_0" - TL_SV1_1 = "TLSv1_1" - TL_SV1_2 = "TLSv1_2" - -class ApplicationGatewayTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Tier of an application gateway. - """ - - STANDARD = "Standard" - WAF = "WAF" - -class AssociationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The association type of the child resource to the parent resource. - """ - - ASSOCIATED = "Associated" - CONTAINS = "Contains" - -class AuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. - """ - - EAPTLS = "EAPTLS" - EAPMSCHA_PV2 = "EAPMSCHAPv2" - -class AuthorizationUseStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. - """ - - AVAILABLE = "Available" - IN_USE = "InUse" - -class BgpPeerState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The BGP peer state - """ - - UNKNOWN = "Unknown" - STOPPED = "Stopped" - IDLE = "Idle" - CONNECTING = "Connecting" - CONNECTED = "Connected" - -class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The connection status. - """ - - UNKNOWN = "Unknown" - CONNECTED = "Connected" - DISCONNECTED = "Disconnected" - DEGRADED = "Degraded" - -class DhGroup(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The DH Groups used in IKE Phase 1 for initial SA. - """ - - NONE = "None" - DH_GROUP1 = "DHGroup1" - DH_GROUP2 = "DHGroup2" - DH_GROUP14 = "DHGroup14" - DH_GROUP2048 = "DHGroup2048" - ECP256 = "ECP256" - ECP384 = "ECP384" - DH_GROUP24 = "DHGroup24" - -class Direction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The direction of the packet represented as a 5-tuple. - """ - - INBOUND = "Inbound" - OUTBOUND = "Outbound" - -class EffectiveRouteSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and - 'Default'. - """ - - UNKNOWN = "Unknown" - USER = "User" - VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" - DEFAULT = "Default" - -class EffectiveRouteState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The value of effective route. Possible values are: 'Active' and 'Invalid'. - """ - - ACTIVE = "Active" - INVALID = "Invalid" - -class EffectiveSecurityRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. - """ - - TCP = "Tcp" - UDP = "Udp" - ALL = "All" - -class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', - 'Configuring', 'Configured', and 'ValidationNeeded'. - """ - - NOT_CONFIGURED = "NotConfigured" - CONFIGURING = "Configuring" - CONFIGURED = "Configured" - VALIDATION_NEEDED = "ValidationNeeded" - -class ExpressRouteCircuitPeeringState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of peering. Possible values are: 'Disabled' and 'Enabled' - """ - - DISABLED = "Disabled" - ENABLED = "Enabled" - -class ExpressRouteCircuitPeeringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - 'MicrosoftPeering'. - """ - - AZURE_PUBLIC_PEERING = "AzurePublicPeering" - AZURE_PRIVATE_PEERING = "AzurePrivatePeering" - MICROSOFT_PEERING = "MicrosoftPeering" - -class ExpressRouteCircuitSkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. - """ - - UNLIMITED_DATA = "UnlimitedData" - METERED_DATA = "MeteredData" - -class ExpressRouteCircuitSkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The tier of the SKU. Possible values are 'Standard' and 'Premium'. - """ - - STANDARD = "Standard" - PREMIUM = "Premium" - -class IkeEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IKE encryption algorithm (IKE phase 2). - """ - - DES = "DES" - DES3 = "DES3" - AES128 = "AES128" - AES192 = "AES192" - AES256 = "AES256" - -class IkeIntegrity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IKE integrity algorithm (IKE phase 2). - """ - - MD5 = "MD5" - SHA1 = "SHA1" - SHA256 = "SHA256" - SHA384 = "SHA384" - -class IPAllocationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """PrivateIP allocation method. - """ - - STATIC = "Static" - DYNAMIC = "Dynamic" - -class IpsecEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IPSec encryption algorithm (IKE phase 1). - """ - - NONE = "None" - DES = "DES" - DES3 = "DES3" - AES128 = "AES128" - AES192 = "AES192" - AES256 = "AES256" - GCMAES128 = "GCMAES128" - GCMAES192 = "GCMAES192" - GCMAES256 = "GCMAES256" - -class IpsecIntegrity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IPSec integrity algorithm (IKE phase 1). - """ - - MD5 = "MD5" - SHA1 = "SHA1" - SHA256 = "SHA256" - GCMAES128 = "GCMAES128" - GCMAES192 = "GCMAES192" - GCMAES256 = "GCMAES256" - -class IPVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Available from Api-Version 2016-03-30 onwards, it represents whether the specific - ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and - 'IPv6'. - """ - - I_PV4 = "IPv4" - I_PV6 = "IPv6" - -class IssueType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of issue. - """ - - UNKNOWN = "Unknown" - AGENT_STOPPED = "AgentStopped" - GUEST_FIREWALL = "GuestFirewall" - DNS_RESOLUTION = "DnsResolution" - SOCKET_BIND = "SocketBind" - NETWORK_SECURITY_RULE = "NetworkSecurityRule" - USER_DEFINED_ROUTE = "UserDefinedRoute" - PORT_THROTTLED = "PortThrottled" - PLATFORM = "Platform" - -class LoadBalancerSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Name of a load balancer SKU. - """ - - BASIC = "Basic" - STANDARD = "Standard" - -class LoadDistribution(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and - 'SourceIPProtocol'. - """ - - DEFAULT = "Default" - SOURCE_IP = "SourceIP" - SOURCE_IP_PROTOCOL = "SourceIPProtocol" - -class NetworkOperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and - 'Failed'. - """ - - IN_PROGRESS = "InProgress" - SUCCEEDED = "Succeeded" - FAILED = "Failed" - -class NextHopType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Next hop type. - """ - - INTERNET = "Internet" - VIRTUAL_APPLIANCE = "VirtualAppliance" - VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" - VNET_LOCAL = "VnetLocal" - HYPER_NET_GATEWAY = "HyperNetGateway" - NONE = "None" - -class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The origin of the issue. - """ - - LOCAL = "Local" - INBOUND = "Inbound" - OUTBOUND = "Outbound" - -class PcError(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - INTERNAL_ERROR = "InternalError" - AGENT_STOPPED = "AgentStopped" - CAPTURE_FAILED = "CaptureFailed" - LOCAL_FILE_FAILED = "LocalFileFailed" - STORAGE_FAILED = "StorageFailed" - -class PcProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protocol to be filtered on. - """ - - TCP = "TCP" - UDP = "UDP" - ANY = "Any" - -class PcStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the packet capture session. - """ - - NOT_STARTED = "NotStarted" - RUNNING = "Running" - STOPPED = "Stopped" - ERROR = "Error" - UNKNOWN = "Unknown" - -class PfsGroup(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The DH Groups used in IKE Phase 2 for new child SA. - """ - - NONE = "None" - PFS1 = "PFS1" - PFS2 = "PFS2" - PFS2048 = "PFS2048" - ECP256 = "ECP256" - ECP384 = "ECP384" - PFS24 = "PFS24" - -class ProbeProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a - received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK - response from the specifies URI is required for the probe to be successful. - """ - - HTTP = "Http" - TCP = "Tcp" - -class ProcessorArchitecture(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. - """ - - AMD64 = "Amd64" - X86 = "X86" - -class Protocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protocol to be verified on. - """ - - TCP = "TCP" - UDP = "UDP" - -class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state of the resource. - """ - - SUCCEEDED = "Succeeded" - UPDATING = "Updating" - DELETING = "Deleting" - FAILED = "Failed" - -class PublicIPAddressSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Name of a public IP address SKU. - """ - - BASIC = "Basic" - STANDARD = "Standard" - -class RouteFilterRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The rule type of the rule. Valid value is: 'Community' - """ - - COMMUNITY = "Community" - -class RouteNextHopType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. - """ - - VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" - VNET_LOCAL = "VnetLocal" - INTERNET = "Internet" - VIRTUAL_APPLIANCE = "VirtualAppliance" - NONE = "None" - -class SecurityRuleAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. - """ - - ALLOW = "Allow" - DENY = "Deny" - -class SecurityRuleDirection(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The direction of the rule. Possible values are: 'Inbound and Outbound'. - """ - - INBOUND = "Inbound" - OUTBOUND = "Outbound" - -class SecurityRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. - """ - - TCP = "Tcp" - UDP = "Udp" - ASTERISK = "*" - -class ServiceProviderProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The ServiceProviderProvisioningState state of the resource. Possible values are - 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. - """ - - NOT_PROVISIONED = "NotProvisioned" - PROVISIONING = "Provisioning" - PROVISIONED = "Provisioned" - DEPROVISIONING = "Deprovisioning" - -class Severity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The severity of the issue. - """ - - ERROR = "Error" - WARNING = "Warning" - -class TransportProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The transport protocol for the external endpoint. Possible values are 'Udp' or 'Tcp' - """ - - UDP = "Udp" - TCP = "Tcp" - -class UsageUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """An enum describing the unit of measurement. - """ - - COUNT = "Count" - -class VirtualNetworkGatewayConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Virtual network Gateway connection status - """ - - UNKNOWN = "Unknown" - CONNECTING = "Connecting" - CONNECTED = "Connected" - NOT_CONNECTED = "NotConnected" - -class VirtualNetworkGatewayConnectionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and - 'VPNClient. - """ - - I_PSEC = "IPsec" - VNET2_VNET = "Vnet2Vnet" - EXPRESS_ROUTE = "ExpressRoute" - VPN_CLIENT = "VPNClient" - -class VirtualNetworkGatewaySkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gateway SKU name. - """ - - BASIC = "Basic" - HIGH_PERFORMANCE = "HighPerformance" - STANDARD = "Standard" - ULTRA_PERFORMANCE = "UltraPerformance" - VPN_GW1 = "VpnGw1" - VPN_GW2 = "VpnGw2" - VPN_GW3 = "VpnGw3" - -class VirtualNetworkGatewaySkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gateway SKU tier. - """ - - BASIC = "Basic" - HIGH_PERFORMANCE = "HighPerformance" - STANDARD = "Standard" - ULTRA_PERFORMANCE = "UltraPerformance" - VPN_GW1 = "VpnGw1" - VPN_GW2 = "VpnGw2" - VPN_GW3 = "VpnGw3" - -class VirtualNetworkGatewayType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. - """ - - VPN = "Vpn" - EXPRESS_ROUTE = "ExpressRoute" - -class VirtualNetworkPeeringState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and - 'Disconnected'. - """ - - INITIATED = "Initiated" - CONNECTED = "Connected" - DISCONNECTED = "Disconnected" - -class VpnClientProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VPN client protocol enabled for the virtual network gateway. - """ - - IKE_V2 = "IkeV2" - SSTP = "SSTP" - -class VpnType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. - """ - - POLICY_BASED = "PolicyBased" - ROUTE_BASED = "RouteBased" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/__init__.py deleted file mode 100644 index cca1cde6acc2..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/__init__.py +++ /dev/null @@ -1,81 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._application_gateways_operations import ApplicationGatewaysOperations -from ._network_management_client_operations import NetworkManagementClientOperationsMixin -from ._available_endpoint_services_operations import AvailableEndpointServicesOperations -from ._express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations -from ._express_route_circuit_peerings_operations import ExpressRouteCircuitPeeringsOperations -from ._express_route_circuits_operations import ExpressRouteCircuitsOperations -from ._express_route_service_providers_operations import ExpressRouteServiceProvidersOperations -from ._load_balancers_operations import LoadBalancersOperations -from ._load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations -from ._load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations -from ._inbound_nat_rules_operations import InboundNatRulesOperations -from ._load_balancer_load_balancing_rules_operations import LoadBalancerLoadBalancingRulesOperations -from ._load_balancer_network_interfaces_operations import LoadBalancerNetworkInterfacesOperations -from ._load_balancer_probes_operations import LoadBalancerProbesOperations -from ._network_interfaces_operations import NetworkInterfacesOperations -from ._network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations -from ._network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations -from ._network_security_groups_operations import NetworkSecurityGroupsOperations -from ._security_rules_operations import SecurityRulesOperations -from ._default_security_rules_operations import DefaultSecurityRulesOperations -from ._network_watchers_operations import NetworkWatchersOperations -from ._packet_captures_operations import PacketCapturesOperations -from ._public_ip_addresses_operations import PublicIPAddressesOperations -from ._route_filters_operations import RouteFiltersOperations -from ._route_filter_rules_operations import RouteFilterRulesOperations -from ._route_tables_operations import RouteTablesOperations -from ._routes_operations import RoutesOperations -from ._bgp_service_communities_operations import BgpServiceCommunitiesOperations -from ._usages_operations import UsagesOperations -from ._virtual_networks_operations import VirtualNetworksOperations -from ._subnets_operations import SubnetsOperations -from ._virtual_network_peerings_operations import VirtualNetworkPeeringsOperations -from ._virtual_network_gateways_operations import VirtualNetworkGatewaysOperations -from ._virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations -from ._local_network_gateways_operations import LocalNetworkGatewaysOperations - -__all__ = [ - 'ApplicationGatewaysOperations', - 'NetworkManagementClientOperationsMixin', - 'AvailableEndpointServicesOperations', - 'ExpressRouteCircuitAuthorizationsOperations', - 'ExpressRouteCircuitPeeringsOperations', - 'ExpressRouteCircuitsOperations', - 'ExpressRouteServiceProvidersOperations', - 'LoadBalancersOperations', - 'LoadBalancerBackendAddressPoolsOperations', - 'LoadBalancerFrontendIPConfigurationsOperations', - 'InboundNatRulesOperations', - 'LoadBalancerLoadBalancingRulesOperations', - 'LoadBalancerNetworkInterfacesOperations', - 'LoadBalancerProbesOperations', - 'NetworkInterfacesOperations', - 'NetworkInterfaceIPConfigurationsOperations', - 'NetworkInterfaceLoadBalancersOperations', - 'NetworkSecurityGroupsOperations', - 'SecurityRulesOperations', - 'DefaultSecurityRulesOperations', - 'NetworkWatchersOperations', - 'PacketCapturesOperations', - 'PublicIPAddressesOperations', - 'RouteFiltersOperations', - 'RouteFilterRulesOperations', - 'RouteTablesOperations', - 'RoutesOperations', - 'BgpServiceCommunitiesOperations', - 'UsagesOperations', - 'VirtualNetworksOperations', - 'SubnetsOperations', - 'VirtualNetworkPeeringsOperations', - 'VirtualNetworkGatewaysOperations', - 'VirtualNetworkGatewayConnectionsOperations', - 'LocalNetworkGatewaysOperations', -] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_service_providers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_service_providers_operations.py deleted file mode 100644 index cdc524349dc5..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_service_providers_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ExpressRouteServiceProvidersOperations(object): - """ExpressRouteServiceProvidersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ExpressRouteServiceProviderListResult"] - """Gets all the available express route service providers. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteServiceProviderListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.ExpressRouteServiceProviderListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteServiceProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteServiceProviderListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_watchers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_watchers_operations.py deleted file mode 100644 index 55f281b429b8..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_watchers_operations.py +++ /dev/null @@ -1,1532 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class NetworkWatchersOperations(object): - """NetworkWatchersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def create_or_update( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.NetworkWatcher" - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkWatcher" - """Creates or updates a network watcher in the specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the network watcher resource. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.NetworkWatcher - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkWatcher - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkWatcher') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('NetworkWatcher', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('NetworkWatcher', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkWatcher" - """Gets the specified network watcher by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkWatcher - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkWatcher', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified network watcher resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}'} # type: ignore - - def list( - self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkWatcherListResult"] - """Gets all network watchers by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkWatcherListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkWatcherListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers'} # type: ignore - - def list_all( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkWatcherListResult"] - """Gets all network watchers by subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkWatcherListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkWatcherListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkWatchers'} # type: ignore - - def get_topology( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.TopologyParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.Topology" - """Gets the current network topology by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the representation of topology. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.TopologyParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Topology, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.Topology - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Topology"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self.get_topology.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TopologyParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Topology', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_topology.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/topology'} # type: ignore - - def _verify_ip_flow_initial( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.VerificationIPFlowParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.VerificationIPFlowResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._verify_ip_flow_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VerificationIPFlowParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _verify_ip_flow_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify'} # type: ignore - - def begin_verify_ip_flow( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.VerificationIPFlowParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.VerificationIPFlowResult"] - """Verify IP flow from the specified VM to a location given the currently configured NSG rules. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the IP flow to be verified. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VerificationIPFlowParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VerificationIPFlowResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.VerificationIPFlowResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VerificationIPFlowResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._verify_ip_flow_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_verify_ip_flow.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/ipFlowVerify'} # type: ignore - - def _get_next_hop_initial( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.NextHopParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.NextHopResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_next_hop_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NextHopParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('NextHopResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('NextHopResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_next_hop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop'} # type: ignore - - def begin_get_next_hop( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.NextHopParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.NextHopResult"] - """Gets the next hop from the specified VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the source and destination endpoint. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.NextHopParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NextHopResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.NextHopResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NextHopResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_next_hop_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NextHopResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_next_hop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/nextHop'} # type: ignore - - def _get_vm_security_rules_initial( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.SecurityGroupViewParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.SecurityGroupViewResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_vm_security_rules_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SecurityGroupViewParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_vm_security_rules_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView'} # type: ignore - - def begin_get_vm_security_rules( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.SecurityGroupViewParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.SecurityGroupViewResult"] - """Gets the configured and effective security group rules on the specified VM. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param parameters: Parameters that define the VM to check security groups for. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.SecurityGroupViewParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either SecurityGroupViewResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.SecurityGroupViewResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityGroupViewResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_vm_security_rules_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_vm_security_rules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/securityGroupView'} # type: ignore - - def _get_troubleshooting_initial( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.TroubleshootingParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.TroubleshootingResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_troubleshooting_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TroubleshootingParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_troubleshooting_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot'} # type: ignore - - def begin_get_troubleshooting( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.TroubleshootingParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.TroubleshootingResult"] - """Initiate troubleshooting on a specified resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the resource to troubleshoot. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.TroubleshootingParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.TroubleshootingResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_troubleshooting_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_troubleshooting.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/troubleshoot'} # type: ignore - - def _get_troubleshooting_result_initial( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.QueryTroubleshootingParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.TroubleshootingResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_troubleshooting_result_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'QueryTroubleshootingParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_troubleshooting_result_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult'} # type: ignore - - def begin_get_troubleshooting_result( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.QueryTroubleshootingParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.TroubleshootingResult"] - """Get the last completed troubleshooting result on a specified resource. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the resource to query the troubleshooting result. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.QueryTroubleshootingParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.TroubleshootingResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.TroubleshootingResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_troubleshooting_result_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('TroubleshootingResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_troubleshooting_result.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryTroubleshootResult'} # type: ignore - - def _set_flow_log_configuration_initial( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.FlowLogInformation" - **kwargs # type: Any - ): - # type: (...) -> "_models.FlowLogInformation" - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._set_flow_log_configuration_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FlowLogInformation') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _set_flow_log_configuration_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog'} # type: ignore - - def begin_set_flow_log_configuration( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.FlowLogInformation" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.FlowLogInformation"] - """Configures flow log on a specified resource. - - :param resource_group_name: The name of the network watcher resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define the configuration of flow log. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.FlowLogInformation - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.FlowLogInformation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._set_flow_log_configuration_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_flow_log_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/configureFlowLog'} # type: ignore - - def _get_flow_log_status_initial( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.FlowLogStatusParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.FlowLogInformation" - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._get_flow_log_status_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'FlowLogStatusParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_flow_log_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus'} # type: ignore - - def begin_get_flow_log_status( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.FlowLogStatusParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.FlowLogInformation"] - """Queries status of flow log on a specified resource. - - :param resource_group_name: The name of the network watcher resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that define a resource to query flow log status. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.FlowLogStatusParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.FlowLogInformation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_flow_log_status_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('FlowLogInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_flow_log_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/queryFlowLogStatus'} # type: ignore - - def _check_connectivity_initial( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.ConnectivityParameters" - **kwargs # type: Any - ): - # type: (...) -> "_models.ConnectivityInformation" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._check_connectivity_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectivityParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _check_connectivity_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck'} # type: ignore - - def begin_check_connectivity( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - parameters, # type: "_models.ConnectivityParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ConnectivityInformation"] - """Verifies the possibility of establishing a direct TCP connection from a virtual machine to a - given endpoint including another VM or an arbitrary remote server. - - :param resource_group_name: The name of the network watcher resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher resource. - :type network_watcher_name: str - :param parameters: Parameters that determine how the connectivity check will be performed. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ConnectivityParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ConnectivityInformation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ConnectivityInformation] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityInformation"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._check_connectivity_initial( - resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectivityInformation', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_check_connectivity.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectivityCheck'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_public_ip_addresses_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_public_ip_addresses_operations.py deleted file mode 100644 index 375d77990a65..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_public_ip_addresses_operations.py +++ /dev/null @@ -1,731 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class PublicIPAddressesOperations(object): - """PublicIPAddressesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def _delete_initial( - self, - resource_group_name, # type: str - public_ip_address_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - public_ip_address_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified public IP address. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. - :type public_ip_address_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - public_ip_address_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.PublicIPAddress" - """Gets the specified public IP address in a specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - public_ip_address_name, # type: str - parameters, # type: "_models.PublicIPAddress" - **kwargs # type: Any - ): - # type: (...) -> "_models.PublicIPAddress" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PublicIPAddress') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - public_ip_address_name, # type: str - parameters, # type: "_models.PublicIPAddress" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.PublicIPAddress"] - """Creates or updates a static or dynamic public IP address. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param public_ip_address_name: The name of the public IP address. - :type public_ip_address_name: str - :param parameters: Parameters supplied to the create or update public IP address operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.PublicIPAddress] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - def list_all( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets all the public IP addresses in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPAddresses'} # type: ignore - - def list( - self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets all public IP addresses in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses'} # type: ignore - - def list_virtual_machine_scale_set_public_ip_addresses( - self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets information about all public IP addresses on a virtual machine scale set level. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_virtual_machine_scale_set_public_ip_addresses.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_virtual_machine_scale_set_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/publicipaddresses'} # type: ignore - - def list_virtual_machine_scale_set_vm_public_ip_addresses( - self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str - network_interface_name, # type: str - ip_configuration_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.PublicIPAddressListResult"] - """Gets information about all public IP addresses in a virtual machine IP configuration in a - virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The network interface name. - :type network_interface_name: str - :param ip_configuration_name: The IP configuration name. - :type ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.PublicIPAddressListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_virtual_machine_scale_set_vm_public_ip_addresses.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_virtual_machine_scale_set_vm_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses'} # type: ignore - - def get_virtual_machine_scale_set_public_ip_address( - self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str - network_interface_name, # type: str - ip_configuration_name, # type: str - public_ip_address_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.PublicIPAddress" - """Get the specified public IP address in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the IP configuration. - :type ip_configuration_name: str - :param public_ip_address_name: The name of the public IP Address. - :type public_ip_address_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.PublicIPAddress - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - # Construct URL - url = self.get_virtual_machine_scale_set_public_ip_address.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_virtual_machine_scale_set_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_filter_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_filter_rules_operations.py deleted file mode 100644 index d644fe2854fc..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_filter_rules_operations.py +++ /dev/null @@ -1,573 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class RouteFilterRulesOperations(object): - """RouteFilterRulesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def _delete_initial( - self, - resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified rule from a route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.RouteFilterRule" - """Gets the specified rule from a route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the rule. - :type rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilterRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.RouteFilterRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.RouteFilterRule" - **kwargs # type: Any - ): - # type: (...) -> "_models.RouteFilterRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.RouteFilterRule" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.RouteFilterRule"] - """Creates or updates a route in the specified route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the create or update route filter - rule operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_08_01.models.RouteFilterRule - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - - def _update_initial( - self, - resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.PatchRouteFilterRule" - **kwargs # type: Any - ): - # type: (...) -> "_models.RouteFilterRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" - - # Construct URL - url = self._update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_rule_parameters, 'PatchRouteFilterRule') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - - def begin_update( - self, - resource_group_name, # type: str - route_filter_name, # type: str - rule_name, # type: str - route_filter_rule_parameters, # type: "_models.PatchRouteFilterRule" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.RouteFilterRule"] - """Updates a route in the specified route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param rule_name: The name of the route filter rule. - :type rule_name: str - :param route_filter_rule_parameters: Parameters supplied to the update route filter rule - operation. - :type route_filter_rule_parameters: ~azure.mgmt.network.v2017_08_01.models.PatchRouteFilterRule - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilterRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.RouteFilterRule] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - rule_name=rule_name, - route_filter_rule_parameters=route_filter_rule_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilterRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - - def list_by_route_filter( - self, - resource_group_name, # type: str - route_filter_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.RouteFilterRuleListResult"] - """Gets all RouteFilterRules in a route filter. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteFilterRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_by_route_filter.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_by_route_filter.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_usages_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_usages_operations.py deleted file mode 100644 index 86675719184e..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_usages_operations.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class UsagesOperations(object): - """UsagesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - location, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.UsagesListResult"] - """List network usages for a subscription. - - :param location: The location where resource usage is queried. - :type location: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.UsagesListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('UsagesListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_metadata.json b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_metadata.json deleted file mode 100644 index a303ea29edf0..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_metadata.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "chosen_version": "2017-09-01", - "total_api_version_list": ["2017-03-30", "2017-09-01"], - "client": { - "name": "NetworkManagementClient", - "filename": "_network_management_client", - "description": "Network Client.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"], \"._operations_mixin\": [\"NetworkManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"], \"._operations_mixin\": [\"NetworkManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=None, # type: Optional[str]", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: Optional[str] = None,", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "application_gateways": "ApplicationGatewaysOperations", - "application_security_groups": "ApplicationSecurityGroupsOperations", - "available_endpoint_services": "AvailableEndpointServicesOperations", - "express_route_circuit_authorizations": "ExpressRouteCircuitAuthorizationsOperations", - "express_route_circuit_peerings": "ExpressRouteCircuitPeeringsOperations", - "express_route_circuits": "ExpressRouteCircuitsOperations", - "express_route_service_providers": "ExpressRouteServiceProvidersOperations", - "load_balancers": "LoadBalancersOperations", - "load_balancer_backend_address_pools": "LoadBalancerBackendAddressPoolsOperations", - "load_balancer_frontend_ip_configurations": "LoadBalancerFrontendIPConfigurationsOperations", - "inbound_nat_rules": "InboundNatRulesOperations", - "load_balancer_load_balancing_rules": "LoadBalancerLoadBalancingRulesOperations", - "load_balancer_network_interfaces": "LoadBalancerNetworkInterfacesOperations", - "load_balancer_probes": "LoadBalancerProbesOperations", - "network_interfaces": "NetworkInterfacesOperations", - "network_interface_ip_configurations": "NetworkInterfaceIPConfigurationsOperations", - "network_interface_load_balancers": "NetworkInterfaceLoadBalancersOperations", - "network_security_groups": "NetworkSecurityGroupsOperations", - "security_rules": "SecurityRulesOperations", - "default_security_rules": "DefaultSecurityRulesOperations", - "network_watchers": "NetworkWatchersOperations", - "packet_captures": "PacketCapturesOperations", - "operations": "Operations", - "public_ip_addresses": "PublicIPAddressesOperations", - "route_filters": "RouteFiltersOperations", - "route_filter_rules": "RouteFilterRulesOperations", - "route_tables": "RouteTablesOperations", - "routes": "RoutesOperations", - "bgp_service_communities": "BgpServiceCommunitiesOperations", - "usages": "UsagesOperations", - "virtual_networks": "VirtualNetworksOperations", - "subnets": "SubnetsOperations", - "virtual_network_peerings": "VirtualNetworkPeeringsOperations", - "virtual_network_gateways": "VirtualNetworkGatewaysOperations", - "virtual_network_gateway_connections": "VirtualNetworkGatewayConnectionsOperations", - "local_network_gateways": "LocalNetworkGatewaysOperations" - }, - "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", - "operations": { - "check_dns_name_availability" : { - "sync": { - "signature": "def check_dns_name_availability(\n self,\n location, # type: str\n domain_name_label, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Checks whether a domain name in the cloudapp.azure.com zone is available for use.\n\n:param location: The location of the domain name.\n:type location: str\n:param domain_name_label: The domain name to be verified. It must conform to the following\n regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.\n:type domain_name_label: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DnsNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2017_09_01.models.DnsNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_dns_name_availability(\n self,\n location: str,\n domain_name_label: str,\n **kwargs: Any\n) -\u003e \"_models.DnsNameAvailabilityResult\":\n", - "doc": "\"\"\"Checks whether a domain name in the cloudapp.azure.com zone is available for use.\n\n:param location: The location of the domain name.\n:type location: str\n:param domain_name_label: The domain name to be verified. It must conform to the following\n regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.\n:type domain_name_label: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DnsNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2017_09_01.models.DnsNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "location, domain_name_label" - } - } - } -} \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_network_management_client.py deleted file mode 100644 index 5c9434c076d3..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/_network_management_client.py +++ /dev/null @@ -1,265 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import NetworkManagementClientConfiguration -from .operations import ApplicationGatewaysOperations -from .operations import ApplicationSecurityGroupsOperations -from .operations import NetworkManagementClientOperationsMixin -from .operations import AvailableEndpointServicesOperations -from .operations import ExpressRouteCircuitAuthorizationsOperations -from .operations import ExpressRouteCircuitPeeringsOperations -from .operations import ExpressRouteCircuitsOperations -from .operations import ExpressRouteServiceProvidersOperations -from .operations import LoadBalancersOperations -from .operations import LoadBalancerBackendAddressPoolsOperations -from .operations import LoadBalancerFrontendIPConfigurationsOperations -from .operations import InboundNatRulesOperations -from .operations import LoadBalancerLoadBalancingRulesOperations -from .operations import LoadBalancerNetworkInterfacesOperations -from .operations import LoadBalancerProbesOperations -from .operations import NetworkInterfacesOperations -from .operations import NetworkInterfaceIPConfigurationsOperations -from .operations import NetworkInterfaceLoadBalancersOperations -from .operations import NetworkSecurityGroupsOperations -from .operations import SecurityRulesOperations -from .operations import DefaultSecurityRulesOperations -from .operations import NetworkWatchersOperations -from .operations import PacketCapturesOperations -from .operations import Operations -from .operations import PublicIPAddressesOperations -from .operations import RouteFiltersOperations -from .operations import RouteFilterRulesOperations -from .operations import RouteTablesOperations -from .operations import RoutesOperations -from .operations import BgpServiceCommunitiesOperations -from .operations import UsagesOperations -from .operations import VirtualNetworksOperations -from .operations import SubnetsOperations -from .operations import VirtualNetworkPeeringsOperations -from .operations import VirtualNetworkGatewaysOperations -from .operations import VirtualNetworkGatewayConnectionsOperations -from .operations import LocalNetworkGatewaysOperations -from . import models - - -class NetworkManagementClient(NetworkManagementClientOperationsMixin): - """Network Client. - - :ivar application_gateways: ApplicationGatewaysOperations operations - :vartype application_gateways: azure.mgmt.network.v2017_09_01.operations.ApplicationGatewaysOperations - :ivar application_security_groups: ApplicationSecurityGroupsOperations operations - :vartype application_security_groups: azure.mgmt.network.v2017_09_01.operations.ApplicationSecurityGroupsOperations - :ivar available_endpoint_services: AvailableEndpointServicesOperations operations - :vartype available_endpoint_services: azure.mgmt.network.v2017_09_01.operations.AvailableEndpointServicesOperations - :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations - :vartype express_route_circuit_authorizations: azure.mgmt.network.v2017_09_01.operations.ExpressRouteCircuitAuthorizationsOperations - :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations - :vartype express_route_circuit_peerings: azure.mgmt.network.v2017_09_01.operations.ExpressRouteCircuitPeeringsOperations - :ivar express_route_circuits: ExpressRouteCircuitsOperations operations - :vartype express_route_circuits: azure.mgmt.network.v2017_09_01.operations.ExpressRouteCircuitsOperations - :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations - :vartype express_route_service_providers: azure.mgmt.network.v2017_09_01.operations.ExpressRouteServiceProvidersOperations - :ivar load_balancers: LoadBalancersOperations operations - :vartype load_balancers: azure.mgmt.network.v2017_09_01.operations.LoadBalancersOperations - :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations - :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2017_09_01.operations.LoadBalancerBackendAddressPoolsOperations - :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations - :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2017_09_01.operations.LoadBalancerFrontendIPConfigurationsOperations - :ivar inbound_nat_rules: InboundNatRulesOperations operations - :vartype inbound_nat_rules: azure.mgmt.network.v2017_09_01.operations.InboundNatRulesOperations - :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations - :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2017_09_01.operations.LoadBalancerLoadBalancingRulesOperations - :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations - :vartype load_balancer_network_interfaces: azure.mgmt.network.v2017_09_01.operations.LoadBalancerNetworkInterfacesOperations - :ivar load_balancer_probes: LoadBalancerProbesOperations operations - :vartype load_balancer_probes: azure.mgmt.network.v2017_09_01.operations.LoadBalancerProbesOperations - :ivar network_interfaces: NetworkInterfacesOperations operations - :vartype network_interfaces: azure.mgmt.network.v2017_09_01.operations.NetworkInterfacesOperations - :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations - :vartype network_interface_ip_configurations: azure.mgmt.network.v2017_09_01.operations.NetworkInterfaceIPConfigurationsOperations - :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations - :vartype network_interface_load_balancers: azure.mgmt.network.v2017_09_01.operations.NetworkInterfaceLoadBalancersOperations - :ivar network_security_groups: NetworkSecurityGroupsOperations operations - :vartype network_security_groups: azure.mgmt.network.v2017_09_01.operations.NetworkSecurityGroupsOperations - :ivar security_rules: SecurityRulesOperations operations - :vartype security_rules: azure.mgmt.network.v2017_09_01.operations.SecurityRulesOperations - :ivar default_security_rules: DefaultSecurityRulesOperations operations - :vartype default_security_rules: azure.mgmt.network.v2017_09_01.operations.DefaultSecurityRulesOperations - :ivar network_watchers: NetworkWatchersOperations operations - :vartype network_watchers: azure.mgmt.network.v2017_09_01.operations.NetworkWatchersOperations - :ivar packet_captures: PacketCapturesOperations operations - :vartype packet_captures: azure.mgmt.network.v2017_09_01.operations.PacketCapturesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.network.v2017_09_01.operations.Operations - :ivar public_ip_addresses: PublicIPAddressesOperations operations - :vartype public_ip_addresses: azure.mgmt.network.v2017_09_01.operations.PublicIPAddressesOperations - :ivar route_filters: RouteFiltersOperations operations - :vartype route_filters: azure.mgmt.network.v2017_09_01.operations.RouteFiltersOperations - :ivar route_filter_rules: RouteFilterRulesOperations operations - :vartype route_filter_rules: azure.mgmt.network.v2017_09_01.operations.RouteFilterRulesOperations - :ivar route_tables: RouteTablesOperations operations - :vartype route_tables: azure.mgmt.network.v2017_09_01.operations.RouteTablesOperations - :ivar routes: RoutesOperations operations - :vartype routes: azure.mgmt.network.v2017_09_01.operations.RoutesOperations - :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations - :vartype bgp_service_communities: azure.mgmt.network.v2017_09_01.operations.BgpServiceCommunitiesOperations - :ivar usages: UsagesOperations operations - :vartype usages: azure.mgmt.network.v2017_09_01.operations.UsagesOperations - :ivar virtual_networks: VirtualNetworksOperations operations - :vartype virtual_networks: azure.mgmt.network.v2017_09_01.operations.VirtualNetworksOperations - :ivar subnets: SubnetsOperations operations - :vartype subnets: azure.mgmt.network.v2017_09_01.operations.SubnetsOperations - :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations - :vartype virtual_network_peerings: azure.mgmt.network.v2017_09_01.operations.VirtualNetworkPeeringsOperations - :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations - :vartype virtual_network_gateways: azure.mgmt.network.v2017_09_01.operations.VirtualNetworkGatewaysOperations - :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations - :vartype virtual_network_gateway_connections: azure.mgmt.network.v2017_09_01.operations.VirtualNetworkGatewayConnectionsOperations - :ivar local_network_gateways: LocalNetworkGatewaysOperations operations - :vartype local_network_gateways: azure.mgmt.network.v2017_09_01.operations.LocalNetworkGatewaysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.application_gateways = ApplicationGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.application_security_groups = ApplicationSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.available_endpoint_services = AvailableEndpointServicesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuits = ExpressRouteCircuitsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_service_providers = ExpressRouteServiceProvidersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancers = LoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.inbound_nat_rules = InboundNatRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_probes = LoadBalancerProbesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interfaces = NetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_security_groups = NetworkSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.security_rules = SecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.default_security_rules = DefaultSecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_watchers = NetworkWatchersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.packet_captures = PacketCapturesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.public_ip_addresses = PublicIPAddressesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filters = RouteFiltersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filter_rules = RouteFilterRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_tables = RouteTablesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.routes = RoutesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.bgp_service_communities = BgpServiceCommunitiesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.usages = UsagesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_networks = VirtualNetworksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.subnets = SubnetsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_peerings = VirtualNetworkPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateways = VirtualNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.local_network_gateways = LocalNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> NetworkManagementClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/_network_management_client.py deleted file mode 100644 index 2c46c51429b5..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/_network_management_client.py +++ /dev/null @@ -1,258 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional, TYPE_CHECKING - -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -from ._configuration import NetworkManagementClientConfiguration -from .operations import ApplicationGatewaysOperations -from .operations import ApplicationSecurityGroupsOperations -from .operations import NetworkManagementClientOperationsMixin -from .operations import AvailableEndpointServicesOperations -from .operations import ExpressRouteCircuitAuthorizationsOperations -from .operations import ExpressRouteCircuitPeeringsOperations -from .operations import ExpressRouteCircuitsOperations -from .operations import ExpressRouteServiceProvidersOperations -from .operations import LoadBalancersOperations -from .operations import LoadBalancerBackendAddressPoolsOperations -from .operations import LoadBalancerFrontendIPConfigurationsOperations -from .operations import InboundNatRulesOperations -from .operations import LoadBalancerLoadBalancingRulesOperations -from .operations import LoadBalancerNetworkInterfacesOperations -from .operations import LoadBalancerProbesOperations -from .operations import NetworkInterfacesOperations -from .operations import NetworkInterfaceIPConfigurationsOperations -from .operations import NetworkInterfaceLoadBalancersOperations -from .operations import NetworkSecurityGroupsOperations -from .operations import SecurityRulesOperations -from .operations import DefaultSecurityRulesOperations -from .operations import NetworkWatchersOperations -from .operations import PacketCapturesOperations -from .operations import Operations -from .operations import PublicIPAddressesOperations -from .operations import RouteFiltersOperations -from .operations import RouteFilterRulesOperations -from .operations import RouteTablesOperations -from .operations import RoutesOperations -from .operations import BgpServiceCommunitiesOperations -from .operations import UsagesOperations -from .operations import VirtualNetworksOperations -from .operations import SubnetsOperations -from .operations import VirtualNetworkPeeringsOperations -from .operations import VirtualNetworkGatewaysOperations -from .operations import VirtualNetworkGatewayConnectionsOperations -from .operations import LocalNetworkGatewaysOperations -from .. import models - - -class NetworkManagementClient(NetworkManagementClientOperationsMixin): - """Network Client. - - :ivar application_gateways: ApplicationGatewaysOperations operations - :vartype application_gateways: azure.mgmt.network.v2017_09_01.aio.operations.ApplicationGatewaysOperations - :ivar application_security_groups: ApplicationSecurityGroupsOperations operations - :vartype application_security_groups: azure.mgmt.network.v2017_09_01.aio.operations.ApplicationSecurityGroupsOperations - :ivar available_endpoint_services: AvailableEndpointServicesOperations operations - :vartype available_endpoint_services: azure.mgmt.network.v2017_09_01.aio.operations.AvailableEndpointServicesOperations - :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations - :vartype express_route_circuit_authorizations: azure.mgmt.network.v2017_09_01.aio.operations.ExpressRouteCircuitAuthorizationsOperations - :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations - :vartype express_route_circuit_peerings: azure.mgmt.network.v2017_09_01.aio.operations.ExpressRouteCircuitPeeringsOperations - :ivar express_route_circuits: ExpressRouteCircuitsOperations operations - :vartype express_route_circuits: azure.mgmt.network.v2017_09_01.aio.operations.ExpressRouteCircuitsOperations - :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations - :vartype express_route_service_providers: azure.mgmt.network.v2017_09_01.aio.operations.ExpressRouteServiceProvidersOperations - :ivar load_balancers: LoadBalancersOperations operations - :vartype load_balancers: azure.mgmt.network.v2017_09_01.aio.operations.LoadBalancersOperations - :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations - :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2017_09_01.aio.operations.LoadBalancerBackendAddressPoolsOperations - :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations - :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2017_09_01.aio.operations.LoadBalancerFrontendIPConfigurationsOperations - :ivar inbound_nat_rules: InboundNatRulesOperations operations - :vartype inbound_nat_rules: azure.mgmt.network.v2017_09_01.aio.operations.InboundNatRulesOperations - :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations - :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2017_09_01.aio.operations.LoadBalancerLoadBalancingRulesOperations - :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations - :vartype load_balancer_network_interfaces: azure.mgmt.network.v2017_09_01.aio.operations.LoadBalancerNetworkInterfacesOperations - :ivar load_balancer_probes: LoadBalancerProbesOperations operations - :vartype load_balancer_probes: azure.mgmt.network.v2017_09_01.aio.operations.LoadBalancerProbesOperations - :ivar network_interfaces: NetworkInterfacesOperations operations - :vartype network_interfaces: azure.mgmt.network.v2017_09_01.aio.operations.NetworkInterfacesOperations - :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations - :vartype network_interface_ip_configurations: azure.mgmt.network.v2017_09_01.aio.operations.NetworkInterfaceIPConfigurationsOperations - :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations - :vartype network_interface_load_balancers: azure.mgmt.network.v2017_09_01.aio.operations.NetworkInterfaceLoadBalancersOperations - :ivar network_security_groups: NetworkSecurityGroupsOperations operations - :vartype network_security_groups: azure.mgmt.network.v2017_09_01.aio.operations.NetworkSecurityGroupsOperations - :ivar security_rules: SecurityRulesOperations operations - :vartype security_rules: azure.mgmt.network.v2017_09_01.aio.operations.SecurityRulesOperations - :ivar default_security_rules: DefaultSecurityRulesOperations operations - :vartype default_security_rules: azure.mgmt.network.v2017_09_01.aio.operations.DefaultSecurityRulesOperations - :ivar network_watchers: NetworkWatchersOperations operations - :vartype network_watchers: azure.mgmt.network.v2017_09_01.aio.operations.NetworkWatchersOperations - :ivar packet_captures: PacketCapturesOperations operations - :vartype packet_captures: azure.mgmt.network.v2017_09_01.aio.operations.PacketCapturesOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.network.v2017_09_01.aio.operations.Operations - :ivar public_ip_addresses: PublicIPAddressesOperations operations - :vartype public_ip_addresses: azure.mgmt.network.v2017_09_01.aio.operations.PublicIPAddressesOperations - :ivar route_filters: RouteFiltersOperations operations - :vartype route_filters: azure.mgmt.network.v2017_09_01.aio.operations.RouteFiltersOperations - :ivar route_filter_rules: RouteFilterRulesOperations operations - :vartype route_filter_rules: azure.mgmt.network.v2017_09_01.aio.operations.RouteFilterRulesOperations - :ivar route_tables: RouteTablesOperations operations - :vartype route_tables: azure.mgmt.network.v2017_09_01.aio.operations.RouteTablesOperations - :ivar routes: RoutesOperations operations - :vartype routes: azure.mgmt.network.v2017_09_01.aio.operations.RoutesOperations - :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations - :vartype bgp_service_communities: azure.mgmt.network.v2017_09_01.aio.operations.BgpServiceCommunitiesOperations - :ivar usages: UsagesOperations operations - :vartype usages: azure.mgmt.network.v2017_09_01.aio.operations.UsagesOperations - :ivar virtual_networks: VirtualNetworksOperations operations - :vartype virtual_networks: azure.mgmt.network.v2017_09_01.aio.operations.VirtualNetworksOperations - :ivar subnets: SubnetsOperations operations - :vartype subnets: azure.mgmt.network.v2017_09_01.aio.operations.SubnetsOperations - :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations - :vartype virtual_network_peerings: azure.mgmt.network.v2017_09_01.aio.operations.VirtualNetworkPeeringsOperations - :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations - :vartype virtual_network_gateways: azure.mgmt.network.v2017_09_01.aio.operations.VirtualNetworkGatewaysOperations - :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations - :vartype virtual_network_gateway_connections: azure.mgmt.network.v2017_09_01.aio.operations.VirtualNetworkGatewayConnectionsOperations - :ivar local_network_gateways: LocalNetworkGatewaysOperations operations - :vartype local_network_gateways: azure.mgmt.network.v2017_09_01.aio.operations.LocalNetworkGatewaysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.application_gateways = ApplicationGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.application_security_groups = ApplicationSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.available_endpoint_services = AvailableEndpointServicesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuits = ExpressRouteCircuitsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_service_providers = ExpressRouteServiceProvidersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancers = LoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.inbound_nat_rules = InboundNatRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_probes = LoadBalancerProbesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interfaces = NetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_security_groups = NetworkSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.security_rules = SecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.default_security_rules = DefaultSecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_watchers = NetworkWatchersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.packet_captures = PacketCapturesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.public_ip_addresses = PublicIPAddressesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filters = RouteFiltersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filter_rules = RouteFilterRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_tables = RouteTablesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.routes = RoutesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.bgp_service_communities = BgpServiceCommunitiesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.usages = UsagesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_networks = VirtualNetworksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.subnets = SubnetsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_peerings = VirtualNetworkPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateways = VirtualNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.local_network_gateways = LocalNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "NetworkManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/__init__.py deleted file mode 100644 index e2bc8b73d1b7..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/__init__.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._application_gateways_operations import ApplicationGatewaysOperations -from ._application_security_groups_operations import ApplicationSecurityGroupsOperations -from ._network_management_client_operations import NetworkManagementClientOperationsMixin -from ._available_endpoint_services_operations import AvailableEndpointServicesOperations -from ._express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations -from ._express_route_circuit_peerings_operations import ExpressRouteCircuitPeeringsOperations -from ._express_route_circuits_operations import ExpressRouteCircuitsOperations -from ._express_route_service_providers_operations import ExpressRouteServiceProvidersOperations -from ._load_balancers_operations import LoadBalancersOperations -from ._load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations -from ._load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations -from ._inbound_nat_rules_operations import InboundNatRulesOperations -from ._load_balancer_load_balancing_rules_operations import LoadBalancerLoadBalancingRulesOperations -from ._load_balancer_network_interfaces_operations import LoadBalancerNetworkInterfacesOperations -from ._load_balancer_probes_operations import LoadBalancerProbesOperations -from ._network_interfaces_operations import NetworkInterfacesOperations -from ._network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations -from ._network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations -from ._network_security_groups_operations import NetworkSecurityGroupsOperations -from ._security_rules_operations import SecurityRulesOperations -from ._default_security_rules_operations import DefaultSecurityRulesOperations -from ._network_watchers_operations import NetworkWatchersOperations -from ._packet_captures_operations import PacketCapturesOperations -from ._operations import Operations -from ._public_ip_addresses_operations import PublicIPAddressesOperations -from ._route_filters_operations import RouteFiltersOperations -from ._route_filter_rules_operations import RouteFilterRulesOperations -from ._route_tables_operations import RouteTablesOperations -from ._routes_operations import RoutesOperations -from ._bgp_service_communities_operations import BgpServiceCommunitiesOperations -from ._usages_operations import UsagesOperations -from ._virtual_networks_operations import VirtualNetworksOperations -from ._subnets_operations import SubnetsOperations -from ._virtual_network_peerings_operations import VirtualNetworkPeeringsOperations -from ._virtual_network_gateways_operations import VirtualNetworkGatewaysOperations -from ._virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations -from ._local_network_gateways_operations import LocalNetworkGatewaysOperations - -__all__ = [ - 'ApplicationGatewaysOperations', - 'ApplicationSecurityGroupsOperations', - 'NetworkManagementClientOperationsMixin', - 'AvailableEndpointServicesOperations', - 'ExpressRouteCircuitAuthorizationsOperations', - 'ExpressRouteCircuitPeeringsOperations', - 'ExpressRouteCircuitsOperations', - 'ExpressRouteServiceProvidersOperations', - 'LoadBalancersOperations', - 'LoadBalancerBackendAddressPoolsOperations', - 'LoadBalancerFrontendIPConfigurationsOperations', - 'InboundNatRulesOperations', - 'LoadBalancerLoadBalancingRulesOperations', - 'LoadBalancerNetworkInterfacesOperations', - 'LoadBalancerProbesOperations', - 'NetworkInterfacesOperations', - 'NetworkInterfaceIPConfigurationsOperations', - 'NetworkInterfaceLoadBalancersOperations', - 'NetworkSecurityGroupsOperations', - 'SecurityRulesOperations', - 'DefaultSecurityRulesOperations', - 'NetworkWatchersOperations', - 'PacketCapturesOperations', - 'Operations', - 'PublicIPAddressesOperations', - 'RouteFiltersOperations', - 'RouteFilterRulesOperations', - 'RouteTablesOperations', - 'RoutesOperations', - 'BgpServiceCommunitiesOperations', - 'UsagesOperations', - 'VirtualNetworksOperations', - 'SubnetsOperations', - 'VirtualNetworkPeeringsOperations', - 'VirtualNetworkGatewaysOperations', - 'VirtualNetworkGatewayConnectionsOperations', - 'LocalNetworkGatewaysOperations', -] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_default_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_default_security_rules_operations.py deleted file mode 100644 index 924a12e96785..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_default_security_rules_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class DefaultSecurityRulesOperations: - """DefaultSecurityRulesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - network_security_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.SecurityRuleListResult"]: - """Gets all default security rules in a network security group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.SecurityRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules'} # type: ignore - - async def get( - self, - resource_group_name: str, - network_security_group_name: str, - default_security_rule_name: str, - **kwargs: Any - ) -> "_models.SecurityRule": - """Get the specified default network security rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param default_security_rule_name: The name of the default security rule. - :type default_security_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.SecurityRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'defaultSecurityRuleName': self._serialize.url("default_security_rule_name", default_security_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecurityRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_service_providers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_service_providers_operations.py deleted file mode 100644 index 59a36af3fa67..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_service_providers_operations.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ExpressRouteServiceProvidersOperations: - """ExpressRouteServiceProvidersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs: Any - ) -> AsyncIterable["_models.ExpressRouteServiceProviderListResult"]: - """Gets all the available express route service providers. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteServiceProviderListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.ExpressRouteServiceProviderListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteServiceProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteServiceProviderListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py deleted file mode 100644 index eb7cbee0b96c..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class LoadBalancerFrontendIPConfigurationsOperations: - """LoadBalancerFrontendIPConfigurationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - load_balancer_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerFrontendIPConfigurationListResult"]: - """Gets all the load balancer frontend IP configurations. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerFrontendIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerFrontendIPConfigurationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerFrontendIPConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerFrontendIPConfigurationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations'} # type: ignore - - async def get( - self, - resource_group_name: str, - load_balancer_name: str, - frontend_ip_configuration_name: str, - **kwargs: Any - ) -> "_models.FrontendIPConfiguration": - """Gets load balancer frontend IP configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param frontend_ip_configuration_name: The name of the frontend IP configuration. - :type frontend_ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: FrontendIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.FrontendIPConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendIPConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'frontendIPConfigurationName': self._serialize.url("frontend_ip_configuration_name", frontend_ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('FrontendIPConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interface_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interface_ip_configurations_operations.py deleted file mode 100644 index 18f083674c28..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interface_ip_configurations_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class NetworkInterfaceIPConfigurationsOperations: - """NetworkInterfaceIPConfigurationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - network_interface_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceIPConfigurationListResult"]: - """Get all ip configurations in a network interface. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfigurationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceIPConfigurationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations'} # type: ignore - - async def get( - self, - resource_group_name: str, - network_interface_name: str, - ip_configuration_name: str, - **kwargs: Any - ) -> "_models.NetworkInterfaceIPConfiguration": - """Gets the specified network interface ip configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the ip configuration name. - :type ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_gateways_operations.py deleted file mode 100644 index 1324bee34696..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_gateways_operations.py +++ /dev/null @@ -1,1589 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class VirtualNetworkGatewaysOperations: - """VirtualNetworkGatewaysOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def _create_or_update_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VirtualNetworkGateway", - **kwargs: Any - ) -> "_models.VirtualNetworkGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGateway') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VirtualNetworkGateway", - **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGateway"]: - """Creates or updates a virtual network gateway in the specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to create or update virtual network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - **kwargs: Any - ) -> "_models.VirtualNetworkGateway": - """Gets the specified virtual network gateway by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified virtual network gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - async def _update_tags_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> "_models.VirtualNetworkGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGateway"]: - """Updates a virtual network gateway tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to update virtual network gateway tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - def list( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkGatewayListResult"]: - """Gets all virtual network gateways by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways'} # type: ignore - - def list_connections( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkGatewayListConnectionsResult"]: - """Gets all the connections in a virtual network gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayListConnectionsResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayListConnectionsResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListConnectionsResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_connections.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayListConnectionsResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections'} # type: ignore - - async def _reset_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - gateway_vip: Optional[str] = None, - **kwargs: Any - ) -> Optional["_models.VirtualNetworkGateway"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._reset_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if gateway_vip is not None: - query_parameters['gatewayVip'] = self._serialize.query("gateway_vip", gateway_vip, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _reset_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore - - async def begin_reset( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - gateway_vip: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGateway"]: - """Resets the primary of the virtual network gateway in the specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param gateway_vip: Virtual network gateway vip address supplied to the begin reset of the - active-active feature enabled gateway. - :type gateway_vip: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._reset_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - gateway_vip=gateway_vip, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore - - async def _generatevpnclientpackage_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VpnClientParameters", - **kwargs: Any - ) -> Optional[str]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._generatevpnclientpackage_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnClientParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _generatevpnclientpackage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'} # type: ignore - - async def begin_generatevpnclientpackage( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VpnClientParameters", - **kwargs: Any - ) -> AsyncLROPoller[str]: - """Generates VPN client package for P2S client of the virtual network gateway in the specified - resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to the generate virtual network gateway VPN client - package operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VpnClientParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[str] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._generatevpnclientpackage_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_generatevpnclientpackage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'} # type: ignore - - async def _generate_vpn_profile_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VpnClientParameters", - **kwargs: Any - ) -> Optional[str]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._generate_vpn_profile_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnClientParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _generate_vpn_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile'} # type: ignore - - async def begin_generate_vpn_profile( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VpnClientParameters", - **kwargs: Any - ) -> AsyncLROPoller[str]: - """Generates VPN profile for P2S client of the virtual network gateway in the specified resource - group. Used for IKEV2 and radius based authentication. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to the generate virtual network gateway VPN client - package operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VpnClientParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[str] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._generate_vpn_profile_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_generate_vpn_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile'} # type: ignore - - async def _get_vpn_profile_package_url_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - **kwargs: Any - ) -> Optional[str]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._get_vpn_profile_package_url_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_vpn_profile_package_url_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'} # type: ignore - - async def begin_get_vpn_profile_package_url( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - **kwargs: Any - ) -> AsyncLROPoller[str]: - """Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified - resource group. The profile needs to be generated first using generateVpnProfile. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[str] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_vpn_profile_package_url_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_vpn_profile_package_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'} # type: ignore - - async def _get_bgp_peer_status_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - peer: Optional[str] = None, - **kwargs: Any - ) -> Optional["_models.BgpPeerStatusListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BgpPeerStatusListResult"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._get_bgp_peer_status_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if peer is not None: - query_parameters['peer'] = self._serialize.query("peer", peer, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_bgp_peer_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus'} # type: ignore - - async def begin_get_bgp_peer_status( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - peer: Optional[str] = None, - **kwargs: Any - ) -> AsyncLROPoller["_models.BgpPeerStatusListResult"]: - """The GetBgpPeerStatus operation retrieves the status of all BGP peers. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param peer: The IP address of the peer to retrieve the status of. - :type peer: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either BgpPeerStatusListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.BgpPeerStatusListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpPeerStatusListResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_bgp_peer_status_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - peer=peer, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_bgp_peer_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus'} # type: ignore - - async def supported_vpn_devices( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - **kwargs: Any - ) -> str: - """Gets a xml format representation for supported vpn devices. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.supported_vpn_devices.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - supported_vpn_devices.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices'} # type: ignore - - async def _get_learned_routes_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - **kwargs: Any - ) -> Optional["_models.GatewayRouteListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._get_learned_routes_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_learned_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes'} # type: ignore - - async def begin_get_learned_routes( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.GatewayRouteListResult"]: - """This operation retrieves a list of routes the virtual network gateway has learned, including - routes learned from BGP peers. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.GatewayRouteListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_learned_routes_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_learned_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes'} # type: ignore - - async def _get_advertised_routes_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - peer: str, - **kwargs: Any - ) -> Optional["_models.GatewayRouteListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._get_advertised_routes_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['peer'] = self._serialize.query("peer", peer, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_advertised_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore - - async def begin_get_advertised_routes( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - peer: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.GatewayRouteListResult"]: - """This operation retrieves a list of routes the virtual network gateway is advertising to the - specified peer. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param peer: The IP address of the peer. - :type peer: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.GatewayRouteListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_advertised_routes_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - peer=peer, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore - - async def vpn_device_configuration_script( - self, - resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.VpnDeviceScriptParameters", - **kwargs: Any - ) -> str: - """Gets a xml format representation for vpn device configuration script. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection for which the configuration script is generated. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the generate vpn device script operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VpnDeviceScriptParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self.vpn_device_configuration_script.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnDeviceScriptParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - vpn_device_configuration_script.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/__init__.py deleted file mode 100644 index a70d6164b480..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/__init__.py +++ /dev/null @@ -1,783 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AddressSpace - from ._models_py3 import ApplicationGateway - from ._models_py3 import ApplicationGatewayAuthenticationCertificate - from ._models_py3 import ApplicationGatewayAvailableSslOptions - from ._models_py3 import ApplicationGatewayAvailableSslPredefinedPolicies - from ._models_py3 import ApplicationGatewayAvailableWafRuleSetsResult - from ._models_py3 import ApplicationGatewayBackendAddress - from ._models_py3 import ApplicationGatewayBackendAddressPool - from ._models_py3 import ApplicationGatewayBackendHealth - from ._models_py3 import ApplicationGatewayBackendHealthHttpSettings - from ._models_py3 import ApplicationGatewayBackendHealthPool - from ._models_py3 import ApplicationGatewayBackendHealthServer - from ._models_py3 import ApplicationGatewayBackendHttpSettings - from ._models_py3 import ApplicationGatewayConnectionDraining - from ._models_py3 import ApplicationGatewayFirewallDisabledRuleGroup - from ._models_py3 import ApplicationGatewayFirewallRule - from ._models_py3 import ApplicationGatewayFirewallRuleGroup - from ._models_py3 import ApplicationGatewayFirewallRuleSet - from ._models_py3 import ApplicationGatewayFrontendIPConfiguration - from ._models_py3 import ApplicationGatewayFrontendPort - from ._models_py3 import ApplicationGatewayHttpListener - from ._models_py3 import ApplicationGatewayIPConfiguration - from ._models_py3 import ApplicationGatewayListResult - from ._models_py3 import ApplicationGatewayPathRule - from ._models_py3 import ApplicationGatewayProbe - from ._models_py3 import ApplicationGatewayProbeHealthResponseMatch - from ._models_py3 import ApplicationGatewayRedirectConfiguration - from ._models_py3 import ApplicationGatewayRequestRoutingRule - from ._models_py3 import ApplicationGatewaySku - from ._models_py3 import ApplicationGatewaySslCertificate - from ._models_py3 import ApplicationGatewaySslPolicy - from ._models_py3 import ApplicationGatewaySslPredefinedPolicy - from ._models_py3 import ApplicationGatewayUrlPathMap - from ._models_py3 import ApplicationGatewayWebApplicationFirewallConfiguration - from ._models_py3 import ApplicationSecurityGroup - from ._models_py3 import ApplicationSecurityGroupListResult - from ._models_py3 import AuthorizationListResult - from ._models_py3 import Availability - from ._models_py3 import AvailableProvidersList - from ._models_py3 import AvailableProvidersListCity - from ._models_py3 import AvailableProvidersListCountry - from ._models_py3 import AvailableProvidersListParameters - from ._models_py3 import AvailableProvidersListState - from ._models_py3 import AzureAsyncOperationResult - from ._models_py3 import AzureReachabilityReport - from ._models_py3 import AzureReachabilityReportItem - from ._models_py3 import AzureReachabilityReportLatencyInfo - from ._models_py3 import AzureReachabilityReportLocation - from ._models_py3 import AzureReachabilityReportParameters - from ._models_py3 import BGPCommunity - from ._models_py3 import BackendAddressPool - from ._models_py3 import BgpPeerStatus - from ._models_py3 import BgpPeerStatusListResult - from ._models_py3 import BgpServiceCommunity - from ._models_py3 import BgpServiceCommunityListResult - from ._models_py3 import BgpSettings - from ._models_py3 import ConnectionResetSharedKey - from ._models_py3 import ConnectionSharedKey - from ._models_py3 import ConnectivityDestination - from ._models_py3 import ConnectivityHop - from ._models_py3 import ConnectivityInformation - from ._models_py3 import ConnectivityIssue - from ._models_py3 import ConnectivityParameters - from ._models_py3 import ConnectivitySource - from ._models_py3 import DhcpOptions - from ._models_py3 import Dimension - from ._models_py3 import DnsNameAvailabilityResult - from ._models_py3 import EffectiveNetworkSecurityGroup - from ._models_py3 import EffectiveNetworkSecurityGroupAssociation - from ._models_py3 import EffectiveNetworkSecurityGroupListResult - from ._models_py3 import EffectiveNetworkSecurityRule - from ._models_py3 import EffectiveRoute - from ._models_py3 import EffectiveRouteListResult - from ._models_py3 import EndpointServiceResult - from ._models_py3 import EndpointServicesListResult - from ._models_py3 import Error - from ._models_py3 import ErrorDetails - from ._models_py3 import ExpressRouteCircuit - from ._models_py3 import ExpressRouteCircuitArpTable - from ._models_py3 import ExpressRouteCircuitAuthorization - from ._models_py3 import ExpressRouteCircuitListResult - from ._models_py3 import ExpressRouteCircuitPeering - from ._models_py3 import ExpressRouteCircuitPeeringConfig - from ._models_py3 import ExpressRouteCircuitPeeringListResult - from ._models_py3 import ExpressRouteCircuitRoutesTable - from ._models_py3 import ExpressRouteCircuitRoutesTableSummary - from ._models_py3 import ExpressRouteCircuitServiceProviderProperties - from ._models_py3 import ExpressRouteCircuitSku - from ._models_py3 import ExpressRouteCircuitStats - from ._models_py3 import ExpressRouteCircuitsArpTableListResult - from ._models_py3 import ExpressRouteCircuitsRoutesTableListResult - from ._models_py3 import ExpressRouteCircuitsRoutesTableSummaryListResult - from ._models_py3 import ExpressRouteServiceProvider - from ._models_py3 import ExpressRouteServiceProviderBandwidthsOffered - from ._models_py3 import ExpressRouteServiceProviderListResult - from ._models_py3 import FlowLogInformation - from ._models_py3 import FlowLogStatusParameters - from ._models_py3 import FrontendIPConfiguration - from ._models_py3 import GatewayRoute - from ._models_py3 import GatewayRouteListResult - from ._models_py3 import IPAddressAvailabilityResult - from ._models_py3 import IPConfiguration - from ._models_py3 import InboundNatPool - from ._models_py3 import InboundNatRule - from ._models_py3 import InboundNatRuleListResult - from ._models_py3 import IpsecPolicy - from ._models_py3 import Ipv6ExpressRouteCircuitPeeringConfig - from ._models_py3 import LoadBalancer - from ._models_py3 import LoadBalancerBackendAddressPoolListResult - from ._models_py3 import LoadBalancerFrontendIPConfigurationListResult - from ._models_py3 import LoadBalancerListResult - from ._models_py3 import LoadBalancerLoadBalancingRuleListResult - from ._models_py3 import LoadBalancerProbeListResult - from ._models_py3 import LoadBalancerSku - from ._models_py3 import LoadBalancingRule - from ._models_py3 import LocalNetworkGateway - from ._models_py3 import LocalNetworkGatewayListResult - from ._models_py3 import LogSpecification - from ._models_py3 import MetricSpecification - from ._models_py3 import NetworkInterface - from ._models_py3 import NetworkInterfaceAssociation - from ._models_py3 import NetworkInterfaceDnsSettings - from ._models_py3 import NetworkInterfaceIPConfiguration - from ._models_py3 import NetworkInterfaceIPConfigurationListResult - from ._models_py3 import NetworkInterfaceListResult - from ._models_py3 import NetworkInterfaceLoadBalancerListResult - from ._models_py3 import NetworkSecurityGroup - from ._models_py3 import NetworkSecurityGroupListResult - from ._models_py3 import NetworkWatcher - from ._models_py3 import NetworkWatcherListResult - from ._models_py3 import NextHopParameters - from ._models_py3 import NextHopResult - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import OperationPropertiesFormatServiceSpecification - from ._models_py3 import OutboundNatRule - from ._models_py3 import PacketCapture - from ._models_py3 import PacketCaptureFilter - from ._models_py3 import PacketCaptureListResult - from ._models_py3 import PacketCaptureParameters - from ._models_py3 import PacketCaptureQueryStatusResult - from ._models_py3 import PacketCaptureResult - from ._models_py3 import PacketCaptureResultProperties - from ._models_py3 import PacketCaptureStorageLocation - from ._models_py3 import PatchRouteFilter - from ._models_py3 import PatchRouteFilterRule - from ._models_py3 import Probe - from ._models_py3 import PublicIPAddress - from ._models_py3 import PublicIPAddressDnsSettings - from ._models_py3 import PublicIPAddressListResult - from ._models_py3 import PublicIPAddressSku - from ._models_py3 import QueryTroubleshootingParameters - from ._models_py3 import Resource - from ._models_py3 import ResourceNavigationLink - from ._models_py3 import RetentionPolicyParameters - from ._models_py3 import Route - from ._models_py3 import RouteFilter - from ._models_py3 import RouteFilterListResult - from ._models_py3 import RouteFilterRule - from ._models_py3 import RouteFilterRuleListResult - from ._models_py3 import RouteListResult - from ._models_py3 import RouteTable - from ._models_py3 import RouteTableListResult - from ._models_py3 import SecurityGroupNetworkInterface - from ._models_py3 import SecurityGroupViewParameters - from ._models_py3 import SecurityGroupViewResult - from ._models_py3 import SecurityRule - from ._models_py3 import SecurityRuleAssociations - from ._models_py3 import SecurityRuleListResult - from ._models_py3 import ServiceEndpointPropertiesFormat - from ._models_py3 import SubResource - from ._models_py3 import Subnet - from ._models_py3 import SubnetAssociation - from ._models_py3 import SubnetListResult - from ._models_py3 import TagsObject - from ._models_py3 import Topology - from ._models_py3 import TopologyAssociation - from ._models_py3 import TopologyParameters - from ._models_py3 import TopologyResource - from ._models_py3 import TroubleshootingDetails - from ._models_py3 import TroubleshootingParameters - from ._models_py3 import TroubleshootingRecommendedActions - from ._models_py3 import TroubleshootingResult - from ._models_py3 import TunnelConnectionHealth - from ._models_py3 import Usage - from ._models_py3 import UsageName - from ._models_py3 import UsagesListResult - from ._models_py3 import VerificationIPFlowParameters - from ._models_py3 import VerificationIPFlowResult - from ._models_py3 import VirtualNetwork - from ._models_py3 import VirtualNetworkConnectionGatewayReference - from ._models_py3 import VirtualNetworkGateway - from ._models_py3 import VirtualNetworkGatewayConnection - from ._models_py3 import VirtualNetworkGatewayConnectionListEntity - from ._models_py3 import VirtualNetworkGatewayConnectionListResult - from ._models_py3 import VirtualNetworkGatewayIPConfiguration - from ._models_py3 import VirtualNetworkGatewayListConnectionsResult - from ._models_py3 import VirtualNetworkGatewayListResult - from ._models_py3 import VirtualNetworkGatewaySku - from ._models_py3 import VirtualNetworkListResult - from ._models_py3 import VirtualNetworkListUsageResult - from ._models_py3 import VirtualNetworkPeering - from ._models_py3 import VirtualNetworkPeeringListResult - from ._models_py3 import VirtualNetworkUsage - from ._models_py3 import VirtualNetworkUsageName - from ._models_py3 import VpnClientConfiguration - from ._models_py3 import VpnClientParameters - from ._models_py3 import VpnClientRevokedCertificate - from ._models_py3 import VpnClientRootCertificate - from ._models_py3 import VpnDeviceScriptParameters -except (SyntaxError, ImportError): - from ._models import AddressSpace # type: ignore - from ._models import ApplicationGateway # type: ignore - from ._models import ApplicationGatewayAuthenticationCertificate # type: ignore - from ._models import ApplicationGatewayAvailableSslOptions # type: ignore - from ._models import ApplicationGatewayAvailableSslPredefinedPolicies # type: ignore - from ._models import ApplicationGatewayAvailableWafRuleSetsResult # type: ignore - from ._models import ApplicationGatewayBackendAddress # type: ignore - from ._models import ApplicationGatewayBackendAddressPool # type: ignore - from ._models import ApplicationGatewayBackendHealth # type: ignore - from ._models import ApplicationGatewayBackendHealthHttpSettings # type: ignore - from ._models import ApplicationGatewayBackendHealthPool # type: ignore - from ._models import ApplicationGatewayBackendHealthServer # type: ignore - from ._models import ApplicationGatewayBackendHttpSettings # type: ignore - from ._models import ApplicationGatewayConnectionDraining # type: ignore - from ._models import ApplicationGatewayFirewallDisabledRuleGroup # type: ignore - from ._models import ApplicationGatewayFirewallRule # type: ignore - from ._models import ApplicationGatewayFirewallRuleGroup # type: ignore - from ._models import ApplicationGatewayFirewallRuleSet # type: ignore - from ._models import ApplicationGatewayFrontendIPConfiguration # type: ignore - from ._models import ApplicationGatewayFrontendPort # type: ignore - from ._models import ApplicationGatewayHttpListener # type: ignore - from ._models import ApplicationGatewayIPConfiguration # type: ignore - from ._models import ApplicationGatewayListResult # type: ignore - from ._models import ApplicationGatewayPathRule # type: ignore - from ._models import ApplicationGatewayProbe # type: ignore - from ._models import ApplicationGatewayProbeHealthResponseMatch # type: ignore - from ._models import ApplicationGatewayRedirectConfiguration # type: ignore - from ._models import ApplicationGatewayRequestRoutingRule # type: ignore - from ._models import ApplicationGatewaySku # type: ignore - from ._models import ApplicationGatewaySslCertificate # type: ignore - from ._models import ApplicationGatewaySslPolicy # type: ignore - from ._models import ApplicationGatewaySslPredefinedPolicy # type: ignore - from ._models import ApplicationGatewayUrlPathMap # type: ignore - from ._models import ApplicationGatewayWebApplicationFirewallConfiguration # type: ignore - from ._models import ApplicationSecurityGroup # type: ignore - from ._models import ApplicationSecurityGroupListResult # type: ignore - from ._models import AuthorizationListResult # type: ignore - from ._models import Availability # type: ignore - from ._models import AvailableProvidersList # type: ignore - from ._models import AvailableProvidersListCity # type: ignore - from ._models import AvailableProvidersListCountry # type: ignore - from ._models import AvailableProvidersListParameters # type: ignore - from ._models import AvailableProvidersListState # type: ignore - from ._models import AzureAsyncOperationResult # type: ignore - from ._models import AzureReachabilityReport # type: ignore - from ._models import AzureReachabilityReportItem # type: ignore - from ._models import AzureReachabilityReportLatencyInfo # type: ignore - from ._models import AzureReachabilityReportLocation # type: ignore - from ._models import AzureReachabilityReportParameters # type: ignore - from ._models import BGPCommunity # type: ignore - from ._models import BackendAddressPool # type: ignore - from ._models import BgpPeerStatus # type: ignore - from ._models import BgpPeerStatusListResult # type: ignore - from ._models import BgpServiceCommunity # type: ignore - from ._models import BgpServiceCommunityListResult # type: ignore - from ._models import BgpSettings # type: ignore - from ._models import ConnectionResetSharedKey # type: ignore - from ._models import ConnectionSharedKey # type: ignore - from ._models import ConnectivityDestination # type: ignore - from ._models import ConnectivityHop # type: ignore - from ._models import ConnectivityInformation # type: ignore - from ._models import ConnectivityIssue # type: ignore - from ._models import ConnectivityParameters # type: ignore - from ._models import ConnectivitySource # type: ignore - from ._models import DhcpOptions # type: ignore - from ._models import Dimension # type: ignore - from ._models import DnsNameAvailabilityResult # type: ignore - from ._models import EffectiveNetworkSecurityGroup # type: ignore - from ._models import EffectiveNetworkSecurityGroupAssociation # type: ignore - from ._models import EffectiveNetworkSecurityGroupListResult # type: ignore - from ._models import EffectiveNetworkSecurityRule # type: ignore - from ._models import EffectiveRoute # type: ignore - from ._models import EffectiveRouteListResult # type: ignore - from ._models import EndpointServiceResult # type: ignore - from ._models import EndpointServicesListResult # type: ignore - from ._models import Error # type: ignore - from ._models import ErrorDetails # type: ignore - from ._models import ExpressRouteCircuit # type: ignore - from ._models import ExpressRouteCircuitArpTable # type: ignore - from ._models import ExpressRouteCircuitAuthorization # type: ignore - from ._models import ExpressRouteCircuitListResult # type: ignore - from ._models import ExpressRouteCircuitPeering # type: ignore - from ._models import ExpressRouteCircuitPeeringConfig # type: ignore - from ._models import ExpressRouteCircuitPeeringListResult # type: ignore - from ._models import ExpressRouteCircuitRoutesTable # type: ignore - from ._models import ExpressRouteCircuitRoutesTableSummary # type: ignore - from ._models import ExpressRouteCircuitServiceProviderProperties # type: ignore - from ._models import ExpressRouteCircuitSku # type: ignore - from ._models import ExpressRouteCircuitStats # type: ignore - from ._models import ExpressRouteCircuitsArpTableListResult # type: ignore - from ._models import ExpressRouteCircuitsRoutesTableListResult # type: ignore - from ._models import ExpressRouteCircuitsRoutesTableSummaryListResult # type: ignore - from ._models import ExpressRouteServiceProvider # type: ignore - from ._models import ExpressRouteServiceProviderBandwidthsOffered # type: ignore - from ._models import ExpressRouteServiceProviderListResult # type: ignore - from ._models import FlowLogInformation # type: ignore - from ._models import FlowLogStatusParameters # type: ignore - from ._models import FrontendIPConfiguration # type: ignore - from ._models import GatewayRoute # type: ignore - from ._models import GatewayRouteListResult # type: ignore - from ._models import IPAddressAvailabilityResult # type: ignore - from ._models import IPConfiguration # type: ignore - from ._models import InboundNatPool # type: ignore - from ._models import InboundNatRule # type: ignore - from ._models import InboundNatRuleListResult # type: ignore - from ._models import IpsecPolicy # type: ignore - from ._models import Ipv6ExpressRouteCircuitPeeringConfig # type: ignore - from ._models import LoadBalancer # type: ignore - from ._models import LoadBalancerBackendAddressPoolListResult # type: ignore - from ._models import LoadBalancerFrontendIPConfigurationListResult # type: ignore - from ._models import LoadBalancerListResult # type: ignore - from ._models import LoadBalancerLoadBalancingRuleListResult # type: ignore - from ._models import LoadBalancerProbeListResult # type: ignore - from ._models import LoadBalancerSku # type: ignore - from ._models import LoadBalancingRule # type: ignore - from ._models import LocalNetworkGateway # type: ignore - from ._models import LocalNetworkGatewayListResult # type: ignore - from ._models import LogSpecification # type: ignore - from ._models import MetricSpecification # type: ignore - from ._models import NetworkInterface # type: ignore - from ._models import NetworkInterfaceAssociation # type: ignore - from ._models import NetworkInterfaceDnsSettings # type: ignore - from ._models import NetworkInterfaceIPConfiguration # type: ignore - from ._models import NetworkInterfaceIPConfigurationListResult # type: ignore - from ._models import NetworkInterfaceListResult # type: ignore - from ._models import NetworkInterfaceLoadBalancerListResult # type: ignore - from ._models import NetworkSecurityGroup # type: ignore - from ._models import NetworkSecurityGroupListResult # type: ignore - from ._models import NetworkWatcher # type: ignore - from ._models import NetworkWatcherListResult # type: ignore - from ._models import NextHopParameters # type: ignore - from ._models import NextHopResult # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationDisplay # type: ignore - from ._models import OperationListResult # type: ignore - from ._models import OperationPropertiesFormatServiceSpecification # type: ignore - from ._models import OutboundNatRule # type: ignore - from ._models import PacketCapture # type: ignore - from ._models import PacketCaptureFilter # type: ignore - from ._models import PacketCaptureListResult # type: ignore - from ._models import PacketCaptureParameters # type: ignore - from ._models import PacketCaptureQueryStatusResult # type: ignore - from ._models import PacketCaptureResult # type: ignore - from ._models import PacketCaptureResultProperties # type: ignore - from ._models import PacketCaptureStorageLocation # type: ignore - from ._models import PatchRouteFilter # type: ignore - from ._models import PatchRouteFilterRule # type: ignore - from ._models import Probe # type: ignore - from ._models import PublicIPAddress # type: ignore - from ._models import PublicIPAddressDnsSettings # type: ignore - from ._models import PublicIPAddressListResult # type: ignore - from ._models import PublicIPAddressSku # type: ignore - from ._models import QueryTroubleshootingParameters # type: ignore - from ._models import Resource # type: ignore - from ._models import ResourceNavigationLink # type: ignore - from ._models import RetentionPolicyParameters # type: ignore - from ._models import Route # type: ignore - from ._models import RouteFilter # type: ignore - from ._models import RouteFilterListResult # type: ignore - from ._models import RouteFilterRule # type: ignore - from ._models import RouteFilterRuleListResult # type: ignore - from ._models import RouteListResult # type: ignore - from ._models import RouteTable # type: ignore - from ._models import RouteTableListResult # type: ignore - from ._models import SecurityGroupNetworkInterface # type: ignore - from ._models import SecurityGroupViewParameters # type: ignore - from ._models import SecurityGroupViewResult # type: ignore - from ._models import SecurityRule # type: ignore - from ._models import SecurityRuleAssociations # type: ignore - from ._models import SecurityRuleListResult # type: ignore - from ._models import ServiceEndpointPropertiesFormat # type: ignore - from ._models import SubResource # type: ignore - from ._models import Subnet # type: ignore - from ._models import SubnetAssociation # type: ignore - from ._models import SubnetListResult # type: ignore - from ._models import TagsObject # type: ignore - from ._models import Topology # type: ignore - from ._models import TopologyAssociation # type: ignore - from ._models import TopologyParameters # type: ignore - from ._models import TopologyResource # type: ignore - from ._models import TroubleshootingDetails # type: ignore - from ._models import TroubleshootingParameters # type: ignore - from ._models import TroubleshootingRecommendedActions # type: ignore - from ._models import TroubleshootingResult # type: ignore - from ._models import TunnelConnectionHealth # type: ignore - from ._models import Usage # type: ignore - from ._models import UsageName # type: ignore - from ._models import UsagesListResult # type: ignore - from ._models import VerificationIPFlowParameters # type: ignore - from ._models import VerificationIPFlowResult # type: ignore - from ._models import VirtualNetwork # type: ignore - from ._models import VirtualNetworkConnectionGatewayReference # type: ignore - from ._models import VirtualNetworkGateway # type: ignore - from ._models import VirtualNetworkGatewayConnection # type: ignore - from ._models import VirtualNetworkGatewayConnectionListEntity # type: ignore - from ._models import VirtualNetworkGatewayConnectionListResult # type: ignore - from ._models import VirtualNetworkGatewayIPConfiguration # type: ignore - from ._models import VirtualNetworkGatewayListConnectionsResult # type: ignore - from ._models import VirtualNetworkGatewayListResult # type: ignore - from ._models import VirtualNetworkGatewaySku # type: ignore - from ._models import VirtualNetworkListResult # type: ignore - from ._models import VirtualNetworkListUsageResult # type: ignore - from ._models import VirtualNetworkPeering # type: ignore - from ._models import VirtualNetworkPeeringListResult # type: ignore - from ._models import VirtualNetworkUsage # type: ignore - from ._models import VirtualNetworkUsageName # type: ignore - from ._models import VpnClientConfiguration # type: ignore - from ._models import VpnClientParameters # type: ignore - from ._models import VpnClientRevokedCertificate # type: ignore - from ._models import VpnClientRootCertificate # type: ignore - from ._models import VpnDeviceScriptParameters # type: ignore - -from ._network_management_client_enums import ( - Access, - ApplicationGatewayBackendHealthServerHealth, - ApplicationGatewayCookieBasedAffinity, - ApplicationGatewayFirewallMode, - ApplicationGatewayOperationalState, - ApplicationGatewayProtocol, - ApplicationGatewayRedirectType, - ApplicationGatewayRequestRoutingRuleType, - ApplicationGatewaySkuName, - ApplicationGatewaySslCipherSuite, - ApplicationGatewaySslPolicyName, - ApplicationGatewaySslPolicyType, - ApplicationGatewaySslProtocol, - ApplicationGatewayTier, - AssociationType, - AuthenticationMethod, - AuthorizationUseStatus, - BgpPeerState, - ConnectionStatus, - DhGroup, - Direction, - EffectiveRouteSource, - EffectiveRouteState, - EffectiveSecurityRuleProtocol, - ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, - ExpressRouteCircuitPeeringState, - ExpressRouteCircuitPeeringType, - ExpressRouteCircuitSkuFamily, - ExpressRouteCircuitSkuTier, - IPAllocationMethod, - IPVersion, - IkeEncryption, - IkeIntegrity, - IpsecEncryption, - IpsecIntegrity, - IssueType, - LoadBalancerSkuName, - LoadDistribution, - NetworkOperationStatus, - NextHopType, - Origin, - PcError, - PcProtocol, - PcStatus, - PfsGroup, - ProbeProtocol, - ProcessorArchitecture, - Protocol, - ProvisioningState, - PublicIPAddressSkuName, - RouteFilterRuleType, - RouteNextHopType, - SecurityRuleAccess, - SecurityRuleDirection, - SecurityRuleProtocol, - ServiceProviderProvisioningState, - Severity, - TransportProtocol, - UsageUnit, - VirtualNetworkGatewayConnectionStatus, - VirtualNetworkGatewayConnectionType, - VirtualNetworkGatewaySkuName, - VirtualNetworkGatewaySkuTier, - VirtualNetworkGatewayType, - VirtualNetworkPeeringState, - VpnClientProtocol, - VpnType, -) - -__all__ = [ - 'AddressSpace', - 'ApplicationGateway', - 'ApplicationGatewayAuthenticationCertificate', - 'ApplicationGatewayAvailableSslOptions', - 'ApplicationGatewayAvailableSslPredefinedPolicies', - 'ApplicationGatewayAvailableWafRuleSetsResult', - 'ApplicationGatewayBackendAddress', - 'ApplicationGatewayBackendAddressPool', - 'ApplicationGatewayBackendHealth', - 'ApplicationGatewayBackendHealthHttpSettings', - 'ApplicationGatewayBackendHealthPool', - 'ApplicationGatewayBackendHealthServer', - 'ApplicationGatewayBackendHttpSettings', - 'ApplicationGatewayConnectionDraining', - 'ApplicationGatewayFirewallDisabledRuleGroup', - 'ApplicationGatewayFirewallRule', - 'ApplicationGatewayFirewallRuleGroup', - 'ApplicationGatewayFirewallRuleSet', - 'ApplicationGatewayFrontendIPConfiguration', - 'ApplicationGatewayFrontendPort', - 'ApplicationGatewayHttpListener', - 'ApplicationGatewayIPConfiguration', - 'ApplicationGatewayListResult', - 'ApplicationGatewayPathRule', - 'ApplicationGatewayProbe', - 'ApplicationGatewayProbeHealthResponseMatch', - 'ApplicationGatewayRedirectConfiguration', - 'ApplicationGatewayRequestRoutingRule', - 'ApplicationGatewaySku', - 'ApplicationGatewaySslCertificate', - 'ApplicationGatewaySslPolicy', - 'ApplicationGatewaySslPredefinedPolicy', - 'ApplicationGatewayUrlPathMap', - 'ApplicationGatewayWebApplicationFirewallConfiguration', - 'ApplicationSecurityGroup', - 'ApplicationSecurityGroupListResult', - 'AuthorizationListResult', - 'Availability', - 'AvailableProvidersList', - 'AvailableProvidersListCity', - 'AvailableProvidersListCountry', - 'AvailableProvidersListParameters', - 'AvailableProvidersListState', - 'AzureAsyncOperationResult', - 'AzureReachabilityReport', - 'AzureReachabilityReportItem', - 'AzureReachabilityReportLatencyInfo', - 'AzureReachabilityReportLocation', - 'AzureReachabilityReportParameters', - 'BGPCommunity', - 'BackendAddressPool', - 'BgpPeerStatus', - 'BgpPeerStatusListResult', - 'BgpServiceCommunity', - 'BgpServiceCommunityListResult', - 'BgpSettings', - 'ConnectionResetSharedKey', - 'ConnectionSharedKey', - 'ConnectivityDestination', - 'ConnectivityHop', - 'ConnectivityInformation', - 'ConnectivityIssue', - 'ConnectivityParameters', - 'ConnectivitySource', - 'DhcpOptions', - 'Dimension', - 'DnsNameAvailabilityResult', - 'EffectiveNetworkSecurityGroup', - 'EffectiveNetworkSecurityGroupAssociation', - 'EffectiveNetworkSecurityGroupListResult', - 'EffectiveNetworkSecurityRule', - 'EffectiveRoute', - 'EffectiveRouteListResult', - 'EndpointServiceResult', - 'EndpointServicesListResult', - 'Error', - 'ErrorDetails', - 'ExpressRouteCircuit', - 'ExpressRouteCircuitArpTable', - 'ExpressRouteCircuitAuthorization', - 'ExpressRouteCircuitListResult', - 'ExpressRouteCircuitPeering', - 'ExpressRouteCircuitPeeringConfig', - 'ExpressRouteCircuitPeeringListResult', - 'ExpressRouteCircuitRoutesTable', - 'ExpressRouteCircuitRoutesTableSummary', - 'ExpressRouteCircuitServiceProviderProperties', - 'ExpressRouteCircuitSku', - 'ExpressRouteCircuitStats', - 'ExpressRouteCircuitsArpTableListResult', - 'ExpressRouteCircuitsRoutesTableListResult', - 'ExpressRouteCircuitsRoutesTableSummaryListResult', - 'ExpressRouteServiceProvider', - 'ExpressRouteServiceProviderBandwidthsOffered', - 'ExpressRouteServiceProviderListResult', - 'FlowLogInformation', - 'FlowLogStatusParameters', - 'FrontendIPConfiguration', - 'GatewayRoute', - 'GatewayRouteListResult', - 'IPAddressAvailabilityResult', - 'IPConfiguration', - 'InboundNatPool', - 'InboundNatRule', - 'InboundNatRuleListResult', - 'IpsecPolicy', - 'Ipv6ExpressRouteCircuitPeeringConfig', - 'LoadBalancer', - 'LoadBalancerBackendAddressPoolListResult', - 'LoadBalancerFrontendIPConfigurationListResult', - 'LoadBalancerListResult', - 'LoadBalancerLoadBalancingRuleListResult', - 'LoadBalancerProbeListResult', - 'LoadBalancerSku', - 'LoadBalancingRule', - 'LocalNetworkGateway', - 'LocalNetworkGatewayListResult', - 'LogSpecification', - 'MetricSpecification', - 'NetworkInterface', - 'NetworkInterfaceAssociation', - 'NetworkInterfaceDnsSettings', - 'NetworkInterfaceIPConfiguration', - 'NetworkInterfaceIPConfigurationListResult', - 'NetworkInterfaceListResult', - 'NetworkInterfaceLoadBalancerListResult', - 'NetworkSecurityGroup', - 'NetworkSecurityGroupListResult', - 'NetworkWatcher', - 'NetworkWatcherListResult', - 'NextHopParameters', - 'NextHopResult', - 'Operation', - 'OperationDisplay', - 'OperationListResult', - 'OperationPropertiesFormatServiceSpecification', - 'OutboundNatRule', - 'PacketCapture', - 'PacketCaptureFilter', - 'PacketCaptureListResult', - 'PacketCaptureParameters', - 'PacketCaptureQueryStatusResult', - 'PacketCaptureResult', - 'PacketCaptureResultProperties', - 'PacketCaptureStorageLocation', - 'PatchRouteFilter', - 'PatchRouteFilterRule', - 'Probe', - 'PublicIPAddress', - 'PublicIPAddressDnsSettings', - 'PublicIPAddressListResult', - 'PublicIPAddressSku', - 'QueryTroubleshootingParameters', - 'Resource', - 'ResourceNavigationLink', - 'RetentionPolicyParameters', - 'Route', - 'RouteFilter', - 'RouteFilterListResult', - 'RouteFilterRule', - 'RouteFilterRuleListResult', - 'RouteListResult', - 'RouteTable', - 'RouteTableListResult', - 'SecurityGroupNetworkInterface', - 'SecurityGroupViewParameters', - 'SecurityGroupViewResult', - 'SecurityRule', - 'SecurityRuleAssociations', - 'SecurityRuleListResult', - 'ServiceEndpointPropertiesFormat', - 'SubResource', - 'Subnet', - 'SubnetAssociation', - 'SubnetListResult', - 'TagsObject', - 'Topology', - 'TopologyAssociation', - 'TopologyParameters', - 'TopologyResource', - 'TroubleshootingDetails', - 'TroubleshootingParameters', - 'TroubleshootingRecommendedActions', - 'TroubleshootingResult', - 'TunnelConnectionHealth', - 'Usage', - 'UsageName', - 'UsagesListResult', - 'VerificationIPFlowParameters', - 'VerificationIPFlowResult', - 'VirtualNetwork', - 'VirtualNetworkConnectionGatewayReference', - 'VirtualNetworkGateway', - 'VirtualNetworkGatewayConnection', - 'VirtualNetworkGatewayConnectionListEntity', - 'VirtualNetworkGatewayConnectionListResult', - 'VirtualNetworkGatewayIPConfiguration', - 'VirtualNetworkGatewayListConnectionsResult', - 'VirtualNetworkGatewayListResult', - 'VirtualNetworkGatewaySku', - 'VirtualNetworkListResult', - 'VirtualNetworkListUsageResult', - 'VirtualNetworkPeering', - 'VirtualNetworkPeeringListResult', - 'VirtualNetworkUsage', - 'VirtualNetworkUsageName', - 'VpnClientConfiguration', - 'VpnClientParameters', - 'VpnClientRevokedCertificate', - 'VpnClientRootCertificate', - 'VpnDeviceScriptParameters', - 'Access', - 'ApplicationGatewayBackendHealthServerHealth', - 'ApplicationGatewayCookieBasedAffinity', - 'ApplicationGatewayFirewallMode', - 'ApplicationGatewayOperationalState', - 'ApplicationGatewayProtocol', - 'ApplicationGatewayRedirectType', - 'ApplicationGatewayRequestRoutingRuleType', - 'ApplicationGatewaySkuName', - 'ApplicationGatewaySslCipherSuite', - 'ApplicationGatewaySslPolicyName', - 'ApplicationGatewaySslPolicyType', - 'ApplicationGatewaySslProtocol', - 'ApplicationGatewayTier', - 'AssociationType', - 'AuthenticationMethod', - 'AuthorizationUseStatus', - 'BgpPeerState', - 'ConnectionStatus', - 'DhGroup', - 'Direction', - 'EffectiveRouteSource', - 'EffectiveRouteState', - 'EffectiveSecurityRuleProtocol', - 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixState', - 'ExpressRouteCircuitPeeringState', - 'ExpressRouteCircuitPeeringType', - 'ExpressRouteCircuitSkuFamily', - 'ExpressRouteCircuitSkuTier', - 'IPAllocationMethod', - 'IPVersion', - 'IkeEncryption', - 'IkeIntegrity', - 'IpsecEncryption', - 'IpsecIntegrity', - 'IssueType', - 'LoadBalancerSkuName', - 'LoadDistribution', - 'NetworkOperationStatus', - 'NextHopType', - 'Origin', - 'PcError', - 'PcProtocol', - 'PcStatus', - 'PfsGroup', - 'ProbeProtocol', - 'ProcessorArchitecture', - 'Protocol', - 'ProvisioningState', - 'PublicIPAddressSkuName', - 'RouteFilterRuleType', - 'RouteNextHopType', - 'SecurityRuleAccess', - 'SecurityRuleDirection', - 'SecurityRuleProtocol', - 'ServiceProviderProvisioningState', - 'Severity', - 'TransportProtocol', - 'UsageUnit', - 'VirtualNetworkGatewayConnectionStatus', - 'VirtualNetworkGatewayConnectionType', - 'VirtualNetworkGatewaySkuName', - 'VirtualNetworkGatewaySkuTier', - 'VirtualNetworkGatewayType', - 'VirtualNetworkPeeringState', - 'VpnClientProtocol', - 'VpnType', -] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_models.py deleted file mode 100644 index 66c6ef157189..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_models.py +++ /dev/null @@ -1,8524 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import msrest.serialization - - -class AddressSpace(msrest.serialization.Model): - """AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. - - :param address_prefixes: A list of address blocks reserved for this virtual network in CIDR - notation. - :type address_prefixes: list[str] - """ - - _attribute_map = { - 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressSpace, self).__init__(**kwargs) - self.address_prefixes = kwargs.get('address_prefixes', None) - - -class Resource(msrest.serialization.Model): - """Common resource representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ApplicationGateway(Resource): - """Application gateway resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param sku: SKU of the application gateway resource. - :type sku: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySku - :param ssl_policy: SSL policy of the application gateway resource. - :type ssl_policy: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPolicy - :ivar operational_state: Operational state of the application gateway resource. Possible values - include: "Stopped", "Starting", "Running", "Stopping". - :vartype operational_state: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayOperationalState - :param gateway_ip_configurations: Subnets of application the gateway resource. - :type gateway_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayIPConfiguration] - :param authentication_certificates: Authentication certificates of the application gateway - resource. - :type authentication_certificates: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayAuthenticationCertificate] - :param ssl_certificates: SSL certificates of the application gateway resource. - :type ssl_certificates: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslCertificate] - :param frontend_ip_configurations: Frontend IP addresses of the application gateway resource. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFrontendIPConfiguration] - :param frontend_ports: Frontend ports of the application gateway resource. - :type frontend_ports: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFrontendPort] - :param probes: Probes of the application gateway resource. - :type probes: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProbe] - :param backend_address_pools: Backend address pool of the application gateway resource. - :type backend_address_pools: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendAddressPool] - :param backend_http_settings_collection: Backend http settings of the application gateway - resource. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHttpSettings] - :param http_listeners: Http listeners of the application gateway resource. - :type http_listeners: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayHttpListener] - :param url_path_maps: URL path map of the application gateway resource. - :type url_path_maps: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayUrlPathMap] - :param request_routing_rules: Request routing rules of the application gateway resource. - :type request_routing_rules: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayRequestRoutingRule] - :param redirect_configurations: Redirect configurations of the application gateway resource. - :type redirect_configurations: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayRedirectConfiguration] - :param web_application_firewall_configuration: Web application firewall configuration. - :type web_application_firewall_configuration: - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayWebApplicationFirewallConfiguration - :param resource_guid: Resource GUID property of the application gateway resource. - :type resource_guid: str - :param provisioning_state: Provisioning state of the application gateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'operational_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'ApplicationGatewaySku'}, - 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, - 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, - 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, - 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, - 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, - 'probes': {'key': 'properties.probes', 'type': '[ApplicationGatewayProbe]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'backend_http_settings_collection': {'key': 'properties.backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHttpSettings]'}, - 'http_listeners': {'key': 'properties.httpListeners', 'type': '[ApplicationGatewayHttpListener]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[ApplicationGatewayUrlPathMap]'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[ApplicationGatewayRequestRoutingRule]'}, - 'redirect_configurations': {'key': 'properties.redirectConfigurations', 'type': '[ApplicationGatewayRedirectConfiguration]'}, - 'web_application_firewall_configuration': {'key': 'properties.webApplicationFirewallConfiguration', 'type': 'ApplicationGatewayWebApplicationFirewallConfiguration'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGateway, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.sku = kwargs.get('sku', None) - self.ssl_policy = kwargs.get('ssl_policy', None) - self.operational_state = None - self.gateway_ip_configurations = kwargs.get('gateway_ip_configurations', None) - self.authentication_certificates = kwargs.get('authentication_certificates', None) - self.ssl_certificates = kwargs.get('ssl_certificates', None) - self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) - self.frontend_ports = kwargs.get('frontend_ports', None) - self.probes = kwargs.get('probes', None) - self.backend_address_pools = kwargs.get('backend_address_pools', None) - self.backend_http_settings_collection = kwargs.get('backend_http_settings_collection', None) - self.http_listeners = kwargs.get('http_listeners', None) - self.url_path_maps = kwargs.get('url_path_maps', None) - self.request_routing_rules = kwargs.get('request_routing_rules', None) - self.redirect_configurations = kwargs.get('redirect_configurations', None) - self.web_application_firewall_configuration = kwargs.get('web_application_firewall_configuration', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class SubResource(msrest.serialization.Model): - """Reference to another subresource. - - :param id: Resource ID. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class ApplicationGatewayAuthenticationCertificate(SubResource): - """Authentication certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Certificate public data. - :type data: str - :param provisioning_state: Provisioning state of the authentication certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAuthenticationCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.data = kwargs.get('data', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayAvailableSslOptions(Resource): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param predefined_policies: List of available Ssl predefined policy. - :type predefined_policies: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param default_policy: Name of the Ssl predefined policy applied by default to application - gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", - "AppGwSslPolicy20170401S". - :type default_policy: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPolicyName - :param available_cipher_suites: List of available Ssl cipher suites. - :type available_cipher_suites: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslCipherSuite] - :param available_protocols: List of available Ssl protocols. - :type available_protocols: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslProtocol] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'predefined_policies': {'key': 'properties.predefinedPolicies', 'type': '[SubResource]'}, - 'default_policy': {'key': 'properties.defaultPolicy', 'type': 'str'}, - 'available_cipher_suites': {'key': 'properties.availableCipherSuites', 'type': '[str]'}, - 'available_protocols': {'key': 'properties.availableProtocols', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAvailableSslOptions, self).__init__(**kwargs) - self.predefined_policies = kwargs.get('predefined_policies', None) - self.default_policy = kwargs.get('default_policy', None) - self.available_cipher_suites = kwargs.get('available_cipher_suites', None) - self.available_protocols = kwargs.get('available_protocols', None) - - -class ApplicationGatewayAvailableSslPredefinedPolicies(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - :param value: List of available Ssl predefined policy. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPredefinedPolicy] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewaySslPredefinedPolicy]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAvailableSslPredefinedPolicies, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ApplicationGatewayAvailableWafRuleSetsResult(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableWafRuleSets API service call. - - :param value: The list of application gateway rule sets. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallRuleSet] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAvailableWafRuleSetsResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ApplicationGatewayBackendAddress(msrest.serialization.Model): - """Backend address of an application gateway. - - :param fqdn: Fully qualified domain name (FQDN). - :type fqdn: str - :param ip_address: IP address. - :type ip_address: str - """ - - _attribute_map = { - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendAddress, self).__init__(**kwargs) - self.fqdn = kwargs.get('fqdn', None) - self.ip_address = kwargs.get('ip_address', None) - - -class ApplicationGatewayBackendAddressPool(SubResource): - """Backend Address Pool of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Resource that is unique within a resource group. This name can be used to access - the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param backend_ip_configurations: Collection of references to IPs defined in network - interfaces. - :type backend_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration] - :param backend_addresses: Backend addresses. - :type backend_addresses: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendAddress] - :param provisioning_state: Provisioning state of the backend address pool resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'backend_addresses': {'key': 'properties.backendAddresses', 'type': '[ApplicationGatewayBackendAddress]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendAddressPool, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.backend_ip_configurations = kwargs.get('backend_ip_configurations', None) - self.backend_addresses = kwargs.get('backend_addresses', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayBackendHealth(msrest.serialization.Model): - """List of ApplicationGatewayBackendHealthPool resources. - - :param backend_address_pools: - :type backend_address_pools: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealthPool] - """ - - _attribute_map = { - 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealth, self).__init__(**kwargs) - self.backend_address_pools = kwargs.get('backend_address_pools', None) - - -class ApplicationGatewayBackendHealthHttpSettings(msrest.serialization.Model): - """Application gateway BackendHealthHttp settings. - - :param backend_http_settings: Reference of an ApplicationGatewayBackendHttpSettings resource. - :type backend_http_settings: - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHttpSettings - :param servers: List of ApplicationGatewayBackendHealthServer resources. - :type servers: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealthServer] - """ - - _attribute_map = { - 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'ApplicationGatewayBackendHttpSettings'}, - 'servers': {'key': 'servers', 'type': '[ApplicationGatewayBackendHealthServer]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealthHttpSettings, self).__init__(**kwargs) - self.backend_http_settings = kwargs.get('backend_http_settings', None) - self.servers = kwargs.get('servers', None) - - -class ApplicationGatewayBackendHealthPool(msrest.serialization.Model): - """Application gateway BackendHealth pool. - - :param backend_address_pool: Reference of an ApplicationGatewayBackendAddressPool resource. - :type backend_address_pool: - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendAddressPool - :param backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings - resources. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealthHttpSettings] - """ - - _attribute_map = { - 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, - 'backend_http_settings_collection': {'key': 'backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHealthHttpSettings]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealthPool, self).__init__(**kwargs) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.backend_http_settings_collection = kwargs.get('backend_http_settings_collection', None) - - -class ApplicationGatewayBackendHealthServer(msrest.serialization.Model): - """Application gateway backendhealth http settings. - - :param address: IP address or FQDN of backend server. - :type address: str - :param ip_configuration: Reference of IP configuration of backend server. - :type ip_configuration: ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration - :param health: Health of backend server. Possible values include: "Unknown", "Up", "Down", - "Partial", "Draining". - :type health: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealthServerHealth - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'health': {'key': 'health', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealthServer, self).__init__(**kwargs) - self.address = kwargs.get('address', None) - self.ip_configuration = kwargs.get('ip_configuration', None) - self.health = kwargs.get('health', None) - - -class ApplicationGatewayBackendHttpSettings(SubResource): - """Backend address pool settings of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Port. - :type port: int - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProtocol - :param cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", - "Disabled". - :type cookie_based_affinity: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayCookieBasedAffinity - :param request_timeout: Request timeout in seconds. Application Gateway will fail the request - if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 - seconds. - :type request_timeout: int - :param probe: Probe resource of an application gateway. - :type probe: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param authentication_certificates: Array of references to application gateway authentication - certificates. - :type authentication_certificates: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param connection_draining: Connection draining of the backend http settings resource. - :type connection_draining: - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayConnectionDraining - :param host_name: Host header to be sent to the backend servers. - :type host_name: str - :param pick_host_name_from_backend_address: Whether to pick host header should be picked from - the host name of the backend server. Default value is false. - :type pick_host_name_from_backend_address: bool - :param affinity_cookie_name: Cookie name to use for the affinity cookie. - :type affinity_cookie_name: str - :param probe_enabled: Whether the probe is enabled. Default value is false. - :type probe_enabled: bool - :param path: Path which should be used as a prefix for all HTTP requests. Null means no path - will be prefixed. Default value is null. - :type path: str - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'cookie_based_affinity': {'key': 'properties.cookieBasedAffinity', 'type': 'str'}, - 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, - 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, - 'affinity_cookie_name': {'key': 'properties.affinityCookieName', 'type': 'str'}, - 'probe_enabled': {'key': 'properties.probeEnabled', 'type': 'bool'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHttpSettings, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.port = kwargs.get('port', None) - self.protocol = kwargs.get('protocol', None) - self.cookie_based_affinity = kwargs.get('cookie_based_affinity', None) - self.request_timeout = kwargs.get('request_timeout', None) - self.probe = kwargs.get('probe', None) - self.authentication_certificates = kwargs.get('authentication_certificates', None) - self.connection_draining = kwargs.get('connection_draining', None) - self.host_name = kwargs.get('host_name', None) - self.pick_host_name_from_backend_address = kwargs.get('pick_host_name_from_backend_address', None) - self.affinity_cookie_name = kwargs.get('affinity_cookie_name', None) - self.probe_enabled = kwargs.get('probe_enabled', None) - self.path = kwargs.get('path', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayConnectionDraining(msrest.serialization.Model): - """Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether connection draining is enabled or not. - :type enabled: bool - :param drain_timeout_in_sec: Required. The number of seconds connection draining is active. - Acceptable values are from 1 second to 3600 seconds. - :type drain_timeout_in_sec: int - """ - - _validation = { - 'enabled': {'required': True}, - 'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayConnectionDraining, self).__init__(**kwargs) - self.enabled = kwargs['enabled'] - self.drain_timeout_in_sec = kwargs['drain_timeout_in_sec'] - - -class ApplicationGatewayFirewallDisabledRuleGroup(msrest.serialization.Model): - """Allows to disable rules within a rule group or an entire rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the rule group that will be disabled. - :type rule_group_name: str - :param rules: The list of rules that will be disabled. If null, all rules of the rule group - will be disabled. - :type rules: list[int] - """ - - _validation = { - 'rule_group_name': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[int]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallDisabledRuleGroup, self).__init__(**kwargs) - self.rule_group_name = kwargs['rule_group_name'] - self.rules = kwargs.get('rules', None) - - -class ApplicationGatewayFirewallRule(msrest.serialization.Model): - """A web application firewall rule. - - All required parameters must be populated in order to send to Azure. - - :param rule_id: Required. The identifier of the web application firewall rule. - :type rule_id: int - :param description: The description of the web application firewall rule. - :type description: str - """ - - _validation = { - 'rule_id': {'required': True}, - } - - _attribute_map = { - 'rule_id': {'key': 'ruleId', 'type': 'int'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallRule, self).__init__(**kwargs) - self.rule_id = kwargs['rule_id'] - self.description = kwargs.get('description', None) - - -class ApplicationGatewayFirewallRuleGroup(msrest.serialization.Model): - """A web application firewall rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the web application firewall rule group. - :type rule_group_name: str - :param description: The description of the web application firewall rule group. - :type description: str - :param rules: Required. The rules of the web application firewall rule group. - :type rules: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallRule] - """ - - _validation = { - 'rule_group_name': {'required': True}, - 'rules': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[ApplicationGatewayFirewallRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallRuleGroup, self).__init__(**kwargs) - self.rule_group_name = kwargs['rule_group_name'] - self.description = kwargs.get('description', None) - self.rules = kwargs['rules'] - - -class ApplicationGatewayFirewallRuleSet(Resource): - """A web application firewall rule set. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the web application firewall rule set. - :type provisioning_state: str - :param rule_set_type: The type of the web application firewall rule set. - :type rule_set_type: str - :param rule_set_version: The version of the web application firewall rule set type. - :type rule_set_version: str - :param rule_groups: The rule groups of the web application firewall rule set. - :type rule_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallRuleGroup] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, - 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ApplicationGatewayFirewallRuleGroup]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallRuleSet, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.rule_set_type = kwargs.get('rule_set_type', None) - self.rule_set_version = kwargs.get('rule_set_version', None) - self.rule_groups = kwargs.get('rule_groups', None) - - -class ApplicationGatewayFrontendIPConfiguration(SubResource): - """Frontend IP configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param private_ip_address: PrivateIPAddress of the network interface IP Configuration. - :type private_ip_address: str - :param private_ip_allocation_method: PrivateIP allocation method. Possible values include: - "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param subnet: Reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param public_ip_address: Reference of the PublicIP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Provisioning state of the public IP resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFrontendIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayFrontendPort(SubResource): - """Frontend port of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Frontend port. - :type port: int - :param provisioning_state: Provisioning state of the frontend port resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFrontendPort, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.port = kwargs.get('port', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayHttpListener(SubResource): - """Http listener of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param frontend_ip_configuration: Frontend IP configuration resource of an application gateway. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param frontend_port: Frontend port resource of an application gateway. - :type frontend_port: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProtocol - :param host_name: Host name of HTTP listener. - :type host_name: str - :param ssl_certificate: SSL certificate resource of an application gateway. - :type ssl_certificate: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param require_server_name_indication: Applicable only if protocol is https. Enables SNI for - multi-hosting. - :type require_server_name_indication: bool - :param provisioning_state: Provisioning state of the HTTP listener resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, - 'require_server_name_indication': {'key': 'properties.requireServerNameIndication', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayHttpListener, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.protocol = kwargs.get('protocol', None) - self.host_name = kwargs.get('host_name', None) - self.ssl_certificate = kwargs.get('ssl_certificate', None) - self.require_server_name_indication = kwargs.get('require_server_name_indication', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayIPConfiguration(SubResource): - """IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param subnet: Reference of the subnet resource. A subnet from where application gateway gets - its private address. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Provisioning state of the application gateway subnet resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.subnet = kwargs.get('subnet', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayListResult(msrest.serialization.Model): - """Response for ListApplicationGateways API service call. - - :param value: List of an application gateways in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGateway] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ApplicationGatewayPathRule(SubResource): - """Path rule of URL path map of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param paths: Path rules of URL path map. - :type paths: list[str] - :param backend_address_pool: Backend address pool resource of URL path map path rule. - :type backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param backend_http_settings: Backend http settings resource of URL path map path rule. - :type backend_http_settings: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of URL path map path rule. - :type redirect_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Path rule of URL path map resource. Possible values are: 'Updating', - 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'paths': {'key': 'properties.paths', 'type': '[str]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayPathRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.paths = kwargs.get('paths', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.backend_http_settings = kwargs.get('backend_http_settings', None) - self.redirect_configuration = kwargs.get('redirect_configuration', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayProbe(SubResource): - """Probe of the application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProtocol - :param host: Host name to send the probe to. - :type host: str - :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. - :type path: str - :param interval: The probing interval in seconds. This is the time interval between two - consecutive probes. Acceptable values are from 1 second to 86400 seconds. - :type interval: int - :param timeout: the probe timeout in seconds. Probe marked as failed if valid response is not - received with this timeout period. Acceptable values are from 1 second to 86400 seconds. - :type timeout: int - :param unhealthy_threshold: The probe retry count. Backend server is marked down after - consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second - to 20. - :type unhealthy_threshold: int - :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from - the backend http settings. Default value is false. - :type pick_host_name_from_backend_http_settings: bool - :param min_servers: Minimum number of servers that are always marked healthy. Default value is - 0. - :type min_servers: int - :param match: Criterion for classifying a healthy probe response. - :type match: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProbeHealthResponseMatch - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host': {'key': 'properties.host', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'timeout': {'key': 'properties.timeout', 'type': 'int'}, - 'unhealthy_threshold': {'key': 'properties.unhealthyThreshold', 'type': 'int'}, - 'pick_host_name_from_backend_http_settings': {'key': 'properties.pickHostNameFromBackendHttpSettings', 'type': 'bool'}, - 'min_servers': {'key': 'properties.minServers', 'type': 'int'}, - 'match': {'key': 'properties.match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayProbe, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.protocol = kwargs.get('protocol', None) - self.host = kwargs.get('host', None) - self.path = kwargs.get('path', None) - self.interval = kwargs.get('interval', None) - self.timeout = kwargs.get('timeout', None) - self.unhealthy_threshold = kwargs.get('unhealthy_threshold', None) - self.pick_host_name_from_backend_http_settings = kwargs.get('pick_host_name_from_backend_http_settings', None) - self.min_servers = kwargs.get('min_servers', None) - self.match = kwargs.get('match', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayProbeHealthResponseMatch(msrest.serialization.Model): - """Application gateway probe health response match. - - :param body: Body that must be contained in the health response. Default value is empty. - :type body: str - :param status_codes: Allowed ranges of healthy status codes. Default range of healthy status - codes is 200-399. - :type status_codes: list[str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'status_codes': {'key': 'statusCodes', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayProbeHealthResponseMatch, self).__init__(**kwargs) - self.body = kwargs.get('body', None) - self.status_codes = kwargs.get('status_codes', None) - - -class ApplicationGatewayRedirectConfiguration(SubResource): - """Redirect configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param redirect_type: Supported http redirection types - Permanent, Temporary, Found, SeeOther. - Possible values include: "Permanent", "Found", "SeeOther", "Temporary". - :type redirect_type: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayRedirectType - :param target_listener: Reference to a listener to redirect the request to. - :type target_listener: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param target_url: Url to redirect the request to. - :type target_url: str - :param include_path: Include path in the redirected url. - :type include_path: bool - :param include_query_string: Include query string in the redirected url. - :type include_query_string: bool - :param request_routing_rules: Request routing specifying redirect configuration. - :type request_routing_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param url_path_maps: Url path maps specifying default redirect configuration. - :type url_path_maps: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param path_rules: Path rules specifying redirect configuration. - :type path_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'redirect_type': {'key': 'properties.redirectType', 'type': 'str'}, - 'target_listener': {'key': 'properties.targetListener', 'type': 'SubResource'}, - 'target_url': {'key': 'properties.targetUrl', 'type': 'str'}, - 'include_path': {'key': 'properties.includePath', 'type': 'bool'}, - 'include_query_string': {'key': 'properties.includeQueryString', 'type': 'bool'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[SubResource]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[SubResource]'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[SubResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayRedirectConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.redirect_type = kwargs.get('redirect_type', None) - self.target_listener = kwargs.get('target_listener', None) - self.target_url = kwargs.get('target_url', None) - self.include_path = kwargs.get('include_path', None) - self.include_query_string = kwargs.get('include_query_string', None) - self.request_routing_rules = kwargs.get('request_routing_rules', None) - self.url_path_maps = kwargs.get('url_path_maps', None) - self.path_rules = kwargs.get('path_rules', None) - - -class ApplicationGatewayRequestRoutingRule(SubResource): - """Request routing rule of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". - :type rule_type: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayRequestRoutingRuleType - :param backend_address_pool: Backend address pool resource of the application gateway. - :type backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param backend_http_settings: Frontend port resource of the application gateway. - :type backend_http_settings: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param http_listener: Http listener resource of the application gateway. - :type http_listener: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param url_path_map: URL path map resource of the application gateway. - :type url_path_map: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of the application gateway. - :type redirect_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Provisioning state of the request routing rule resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'http_listener': {'key': 'properties.httpListener', 'type': 'SubResource'}, - 'url_path_map': {'key': 'properties.urlPathMap', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayRequestRoutingRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.rule_type = kwargs.get('rule_type', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.backend_http_settings = kwargs.get('backend_http_settings', None) - self.http_listener = kwargs.get('http_listener', None) - self.url_path_map = kwargs.get('url_path_map', None) - self.redirect_configuration = kwargs.get('redirect_configuration', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewaySku(msrest.serialization.Model): - """SKU of an application gateway. - - :param name: Name of an application gateway SKU. Possible values include: "Standard_Small", - "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large". - :type name: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySkuName - :param tier: Tier of an application gateway. Possible values include: "Standard", "WAF". - :type tier: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayTier - :param capacity: Capacity (instance count) of an application gateway. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - - -class ApplicationGatewaySslCertificate(SubResource): - """SSL certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Base-64 encoded pfx certificate. Only applicable in PUT Request. - :type data: str - :param password: Password for the pfx file specified in data. Only applicable in PUT request. - :type password: str - :param public_cert_data: Base-64 encoded Public cert data corresponding to pfx specified in - data. Only applicable in GET request. - :type public_cert_data: str - :param provisioning_state: Provisioning state of the SSL certificate resource Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySslCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.data = kwargs.get('data', None) - self.password = kwargs.get('password', None) - self.public_cert_data = kwargs.get('public_cert_data', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewaySslPolicy(msrest.serialization.Model): - """Application Gateway Ssl policy. - - :param disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. - :type disabled_ssl_protocols: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslProtocol] - :param policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". - :type policy_type: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPolicyType - :param policy_name: Name of Ssl predefined policy. Possible values include: - "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". - :type policy_name: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPolicyName - :param cipher_suites: Ssl cipher suites to be enabled in the specified order to application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'cipher_suites': {'key': 'cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySslPolicy, self).__init__(**kwargs) - self.disabled_ssl_protocols = kwargs.get('disabled_ssl_protocols', None) - self.policy_type = kwargs.get('policy_type', None) - self.policy_name = kwargs.get('policy_name', None) - self.cipher_suites = kwargs.get('cipher_suites', None) - self.min_protocol_version = kwargs.get('min_protocol_version', None) - - -class ApplicationGatewaySslPredefinedPolicy(SubResource): - """An Ssl predefined policy. - - :param id: Resource ID. - :type id: str - :param name: Name of Ssl predefined policy. - :type name: str - :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySslPredefinedPolicy, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.cipher_suites = kwargs.get('cipher_suites', None) - self.min_protocol_version = kwargs.get('min_protocol_version', None) - - -class ApplicationGatewayUrlPathMap(SubResource): - """UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param default_backend_address_pool: Default backend address pool resource of URL path map. - :type default_backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param default_backend_http_settings: Default backend http settings resource of URL path map. - :type default_backend_http_settings: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param default_redirect_configuration: Default redirect configuration resource of URL path map. - :type default_redirect_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param path_rules: Path rule of URL path map resource. - :type path_rules: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayPathRule] - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_backend_address_pool': {'key': 'properties.defaultBackendAddressPool', 'type': 'SubResource'}, - 'default_backend_http_settings': {'key': 'properties.defaultBackendHttpSettings', 'type': 'SubResource'}, - 'default_redirect_configuration': {'key': 'properties.defaultRedirectConfiguration', 'type': 'SubResource'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[ApplicationGatewayPathRule]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayUrlPathMap, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.default_backend_address_pool = kwargs.get('default_backend_address_pool', None) - self.default_backend_http_settings = kwargs.get('default_backend_http_settings', None) - self.default_redirect_configuration = kwargs.get('default_redirect_configuration', None) - self.path_rules = kwargs.get('path_rules', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayWebApplicationFirewallConfiguration(msrest.serialization.Model): - """Application gateway web application firewall configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the web application firewall is enabled or not. - :type enabled: bool - :param firewall_mode: Required. Web application firewall mode. Possible values include: - "Detection", "Prevention". - :type firewall_mode: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallMode - :param rule_set_type: Required. The type of the web application firewall rule set. Possible - values are: 'OWASP'. - :type rule_set_type: str - :param rule_set_version: Required. The version of the rule set type. - :type rule_set_version: str - :param disabled_rule_groups: The disabled rule groups. - :type disabled_rule_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallDisabledRuleGroup] - """ - - _validation = { - 'enabled': {'required': True}, - 'firewall_mode': {'required': True}, - 'rule_set_type': {'required': True}, - 'rule_set_version': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, - 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, - 'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs) - self.enabled = kwargs['enabled'] - self.firewall_mode = kwargs['firewall_mode'] - self.rule_set_type = kwargs['rule_set_type'] - self.rule_set_version = kwargs['rule_set_version'] - self.disabled_rule_groups = kwargs.get('disabled_rule_groups', None) - - -class ApplicationSecurityGroup(Resource): - """An application security group in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar resource_guid: The resource GUID property of the application security group resource. It - uniquely identifies a resource, even if the user changes its name or migrate the resource - across subscriptions or resource groups. - :vartype resource_guid: str - :ivar provisioning_state: The provisioning state of the application security group resource. - Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'resource_guid': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationSecurityGroup, self).__init__(**kwargs) - self.etag = None - self.resource_guid = None - self.provisioning_state = None - - -class ApplicationSecurityGroupListResult(msrest.serialization.Model): - """A list of application security groups. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of application security groups. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationSecurityGroupListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class AuthorizationListResult(msrest.serialization.Model): - """Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. - - :param value: The authorizations in an ExpressRoute Circuit. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AuthorizationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class Availability(msrest.serialization.Model): - """Availability of the metric. - - :param time_grain: The time grain of the availability. - :type time_grain: str - :param retention: The retention of the availability. - :type retention: str - :param blob_duration: Duration of the availability blob. - :type blob_duration: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Availability, self).__init__(**kwargs) - self.time_grain = kwargs.get('time_grain', None) - self.retention = kwargs.get('retention', None) - self.blob_duration = kwargs.get('blob_duration', None) - - -class AvailableProvidersList(msrest.serialization.Model): - """List of available countries with details. - - All required parameters must be populated in order to send to Azure. - - :param countries: Required. List of available countries. - :type countries: list[~azure.mgmt.network.v2017_09_01.models.AvailableProvidersListCountry] - """ - - _validation = { - 'countries': {'required': True}, - } - - _attribute_map = { - 'countries': {'key': 'countries', 'type': '[AvailableProvidersListCountry]'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersList, self).__init__(**kwargs) - self.countries = kwargs['countries'] - - -class AvailableProvidersListCity(msrest.serialization.Model): - """City or town details. - - :param city_name: The city or town name. - :type city_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - """ - - _attribute_map = { - 'city_name': {'key': 'cityName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersListCity, self).__init__(**kwargs) - self.city_name = kwargs.get('city_name', None) - self.providers = kwargs.get('providers', None) - - -class AvailableProvidersListCountry(msrest.serialization.Model): - """Country details. - - :param country_name: The country name. - :type country_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - :param states: List of available states in the country. - :type states: list[~azure.mgmt.network.v2017_09_01.models.AvailableProvidersListState] - """ - - _attribute_map = { - 'country_name': {'key': 'countryName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'states': {'key': 'states', 'type': '[AvailableProvidersListState]'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersListCountry, self).__init__(**kwargs) - self.country_name = kwargs.get('country_name', None) - self.providers = kwargs.get('providers', None) - self.states = kwargs.get('states', None) - - -class AvailableProvidersListParameters(msrest.serialization.Model): - """Constraints that determine the list of available Internet service providers. - - :param azure_locations: A list of Azure regions. - :type azure_locations: list[str] - :param country: The country for available providers list. - :type country: str - :param state: The state for available providers list. - :type state: str - :param city: The city or town for available providers list. - :type city: str - """ - - _attribute_map = { - 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, - 'country': {'key': 'country', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersListParameters, self).__init__(**kwargs) - self.azure_locations = kwargs.get('azure_locations', None) - self.country = kwargs.get('country', None) - self.state = kwargs.get('state', None) - self.city = kwargs.get('city', None) - - -class AvailableProvidersListState(msrest.serialization.Model): - """State details. - - :param state_name: The state name. - :type state_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - :param cities: List of available cities or towns in the state. - :type cities: list[~azure.mgmt.network.v2017_09_01.models.AvailableProvidersListCity] - """ - - _attribute_map = { - 'state_name': {'key': 'stateName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'cities': {'key': 'cities', 'type': '[AvailableProvidersListCity]'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersListState, self).__init__(**kwargs) - self.state_name = kwargs.get('state_name', None) - self.providers = kwargs.get('providers', None) - self.cities = kwargs.get('cities', None) - - -class AzureAsyncOperationResult(msrest.serialization.Model): - """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. - - :param status: Status of the Azure async operation. Possible values are: 'InProgress', - 'Succeeded', and 'Failed'. Possible values include: "InProgress", "Succeeded", "Failed". - :type status: str or ~azure.mgmt.network.v2017_09_01.models.NetworkOperationStatus - :param error: - :type error: ~azure.mgmt.network.v2017_09_01.models.Error - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'Error'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureAsyncOperationResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.error = kwargs.get('error', None) - - -class AzureReachabilityReport(msrest.serialization.Model): - """Azure reachability report details. - - All required parameters must be populated in order to send to Azure. - - :param aggregation_level: Required. The aggregation level of Azure reachability report. Can be - Country, State or City. - :type aggregation_level: str - :param provider_location: Required. Parameters that define a geographic location. - :type provider_location: ~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportLocation - :param reachability_report: Required. List of Azure reachability report items. - :type reachability_report: - list[~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportItem] - """ - - _validation = { - 'aggregation_level': {'required': True}, - 'provider_location': {'required': True}, - 'reachability_report': {'required': True}, - } - - _attribute_map = { - 'aggregation_level': {'key': 'aggregationLevel', 'type': 'str'}, - 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, - 'reachability_report': {'key': 'reachabilityReport', 'type': '[AzureReachabilityReportItem]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReport, self).__init__(**kwargs) - self.aggregation_level = kwargs['aggregation_level'] - self.provider_location = kwargs['provider_location'] - self.reachability_report = kwargs['reachability_report'] - - -class AzureReachabilityReportItem(msrest.serialization.Model): - """Azure reachability report details for a given provider location. - - :param provider: The Internet service provider. - :type provider: str - :param azure_location: The Azure region. - :type azure_location: str - :param latencies: List of latency details for each of the time series. - :type latencies: - list[~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportLatencyInfo] - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'azure_location': {'key': 'azureLocation', 'type': 'str'}, - 'latencies': {'key': 'latencies', 'type': '[AzureReachabilityReportLatencyInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReportItem, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.azure_location = kwargs.get('azure_location', None) - self.latencies = kwargs.get('latencies', None) - - -class AzureReachabilityReportLatencyInfo(msrest.serialization.Model): - """Details on latency for a time series. - - :param time_stamp: The time stamp. - :type time_stamp: ~datetime.datetime - :param score: The relative latency score between 1 and 100, higher values indicating a faster - connection. - :type score: int - """ - - _validation = { - 'score': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, - 'score': {'key': 'score', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReportLatencyInfo, self).__init__(**kwargs) - self.time_stamp = kwargs.get('time_stamp', None) - self.score = kwargs.get('score', None) - - -class AzureReachabilityReportLocation(msrest.serialization.Model): - """Parameters that define a geographic location. - - All required parameters must be populated in order to send to Azure. - - :param country: Required. The name of the country. - :type country: str - :param state: The name of the state. - :type state: str - :param city: The name of the city or town. - :type city: str - """ - - _validation = { - 'country': {'required': True}, - } - - _attribute_map = { - 'country': {'key': 'country', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReportLocation, self).__init__(**kwargs) - self.country = kwargs['country'] - self.state = kwargs.get('state', None) - self.city = kwargs.get('city', None) - - -class AzureReachabilityReportParameters(msrest.serialization.Model): - """Geographic and time constraints for Azure reachability report. - - All required parameters must be populated in order to send to Azure. - - :param provider_location: Required. Parameters that define a geographic location. - :type provider_location: ~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportLocation - :param providers: List of Internet service providers. - :type providers: list[str] - :param azure_locations: Optional Azure regions to scope the query to. - :type azure_locations: list[str] - :param start_time: Required. The start time for the Azure reachability report. - :type start_time: ~datetime.datetime - :param end_time: Required. The end time for the Azure reachability report. - :type end_time: ~datetime.datetime - """ - - _validation = { - 'provider_location': {'required': True}, - 'start_time': {'required': True}, - 'end_time': {'required': True}, - } - - _attribute_map = { - 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReportParameters, self).__init__(**kwargs) - self.provider_location = kwargs['provider_location'] - self.providers = kwargs.get('providers', None) - self.azure_locations = kwargs.get('azure_locations', None) - self.start_time = kwargs['start_time'] - self.end_time = kwargs['end_time'] - - -class BackendAddressPool(SubResource): - """Pool of backend IP addresses. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar backend_ip_configurations: Gets collection of references to IP addresses defined in - network interfaces. - :vartype backend_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration] - :ivar load_balancing_rules: Gets load balancing rules that use this backend address pool. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :ivar outbound_nat_rule: Gets outbound rules that use this backend address pool. - :vartype outbound_nat_rule: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Get provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configurations': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - 'outbound_nat_rule': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'outbound_nat_rule': {'key': 'properties.outboundNatRule', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BackendAddressPool, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.backend_ip_configurations = None - self.load_balancing_rules = None - self.outbound_nat_rule = None - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class BGPCommunity(msrest.serialization.Model): - """Contains bgp community information offered in Service Community resources. - - :param service_supported_region: The region which the service support. e.g. For O365, region is - Global. - :type service_supported_region: str - :param community_name: The name of the bgp community. e.g. Skype. - :type community_name: str - :param community_value: The value of the bgp community. For more information: - https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - :type community_value: str - :param community_prefixes: The prefixes that the bgp community contains. - :type community_prefixes: list[str] - :param is_authorized_to_use: Customer is authorized to use bgp community or not. - :type is_authorized_to_use: bool - :param service_group: The service group of the bgp community contains. - :type service_group: str - """ - - _attribute_map = { - 'service_supported_region': {'key': 'serviceSupportedRegion', 'type': 'str'}, - 'community_name': {'key': 'communityName', 'type': 'str'}, - 'community_value': {'key': 'communityValue', 'type': 'str'}, - 'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'}, - 'is_authorized_to_use': {'key': 'isAuthorizedToUse', 'type': 'bool'}, - 'service_group': {'key': 'serviceGroup', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BGPCommunity, self).__init__(**kwargs) - self.service_supported_region = kwargs.get('service_supported_region', None) - self.community_name = kwargs.get('community_name', None) - self.community_value = kwargs.get('community_value', None) - self.community_prefixes = kwargs.get('community_prefixes', None) - self.is_authorized_to_use = kwargs.get('is_authorized_to_use', None) - self.service_group = kwargs.get('service_group', None) - - -class BgpPeerStatus(msrest.serialization.Model): - """BGP peer status details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The virtual network gateway's local address. - :vartype local_address: str - :ivar neighbor: The remote BGP peer. - :vartype neighbor: str - :ivar asn: The autonomous system number of the remote BGP peer. - :vartype asn: int - :ivar state: The BGP peer state. Possible values include: "Unknown", "Stopped", "Idle", - "Connecting", "Connected". - :vartype state: str or ~azure.mgmt.network.v2017_09_01.models.BgpPeerState - :ivar connected_duration: For how long the peering has been up. - :vartype connected_duration: str - :ivar routes_received: The number of routes learned from this peer. - :vartype routes_received: long - :ivar messages_sent: The number of BGP messages sent. - :vartype messages_sent: long - :ivar messages_received: The number of BGP messages received. - :vartype messages_received: long - """ - - _validation = { - 'local_address': {'readonly': True}, - 'neighbor': {'readonly': True}, - 'asn': {'readonly': True}, - 'state': {'readonly': True}, - 'connected_duration': {'readonly': True}, - 'routes_received': {'readonly': True}, - 'messages_sent': {'readonly': True}, - 'messages_received': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'asn': {'key': 'asn', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'str'}, - 'connected_duration': {'key': 'connectedDuration', 'type': 'str'}, - 'routes_received': {'key': 'routesReceived', 'type': 'long'}, - 'messages_sent': {'key': 'messagesSent', 'type': 'long'}, - 'messages_received': {'key': 'messagesReceived', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpPeerStatus, self).__init__(**kwargs) - self.local_address = None - self.neighbor = None - self.asn = None - self.state = None - self.connected_duration = None - self.routes_received = None - self.messages_sent = None - self.messages_received = None - - -class BgpPeerStatusListResult(msrest.serialization.Model): - """Response for list BGP peer status API service call. - - :param value: List of BGP peers. - :type value: list[~azure.mgmt.network.v2017_09_01.models.BgpPeerStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpPeerStatusListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class BgpServiceCommunity(Resource): - """Service Community Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param service_name: The name of the bgp community. e.g. Skype. - :type service_name: str - :param bgp_communities: Get a list of bgp communities. - :type bgp_communities: list[~azure.mgmt.network.v2017_09_01.models.BGPCommunity] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, - 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': '[BGPCommunity]'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpServiceCommunity, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.bgp_communities = kwargs.get('bgp_communities', None) - - -class BgpServiceCommunityListResult(msrest.serialization.Model): - """Response for the ListServiceCommunity API service call. - - :param value: A list of service community resources. - :type value: list[~azure.mgmt.network.v2017_09_01.models.BgpServiceCommunity] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpServiceCommunityListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class BgpSettings(msrest.serialization.Model): - """BGP settings details. - - :param asn: The BGP speaker's ASN. - :type asn: long - :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. - :type bgp_peering_address: str - :param peer_weight: The weight added to routes learned from this BGP speaker. - :type peer_weight: int - """ - - _attribute_map = { - 'asn': {'key': 'asn', 'type': 'long'}, - 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, - 'peer_weight': {'key': 'peerWeight', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpSettings, self).__init__(**kwargs) - self.asn = kwargs.get('asn', None) - self.bgp_peering_address = kwargs.get('bgp_peering_address', None) - self.peer_weight = kwargs.get('peer_weight', None) - - -class ConnectionResetSharedKey(msrest.serialization.Model): - """The virtual network connection reset shared key. - - All required parameters must be populated in order to send to Azure. - - :param key_length: Required. The virtual network connection reset shared key length, should - between 1 and 128. - :type key_length: int - """ - - _validation = { - 'key_length': {'required': True, 'maximum': 128, 'minimum': 1}, - } - - _attribute_map = { - 'key_length': {'key': 'keyLength', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionResetSharedKey, self).__init__(**kwargs) - self.key_length = kwargs['key_length'] - - -class ConnectionSharedKey(msrest.serialization.Model): - """Response for GetConnectionSharedKey API service call. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. The virtual network connection shared key value. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionSharedKey, self).__init__(**kwargs) - self.value = kwargs['value'] - - -class ConnectivityDestination(msrest.serialization.Model): - """Parameters that define destination of connection. - - :param resource_id: The ID of the resource to which a connection attempt will be made. - :type resource_id: str - :param address: The IP address or URI the resource to which a connection attempt will be made. - :type address: str - :param port: Port on which check connectivity will be performed. - :type port: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityDestination, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.address = kwargs.get('address', None) - self.port = kwargs.get('port', None) - - -class ConnectivityHop(msrest.serialization.Model): - """Information about a hop between the source and the destination. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the hop. - :vartype type: str - :ivar id: The ID of the hop. - :vartype id: str - :ivar address: The IP address of the hop. - :vartype address: str - :ivar resource_id: The ID of the resource corresponding to this hop. - :vartype resource_id: str - :ivar next_hop_ids: List of next hop identifiers. - :vartype next_hop_ids: list[str] - :ivar issues: List of issues. - :vartype issues: list[~azure.mgmt.network.v2017_09_01.models.ConnectivityIssue] - """ - - _validation = { - 'type': {'readonly': True}, - 'id': {'readonly': True}, - 'address': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'next_hop_ids': {'readonly': True}, - 'issues': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, - 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityHop, self).__init__(**kwargs) - self.type = None - self.id = None - self.address = None - self.resource_id = None - self.next_hop_ids = None - self.issues = None - - -class ConnectivityInformation(msrest.serialization.Model): - """Information on the connectivity status. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hops: List of hops between the source and the destination. - :vartype hops: list[~azure.mgmt.network.v2017_09_01.models.ConnectivityHop] - :ivar connection_status: The connection status. Possible values include: "Unknown", - "Connected", "Disconnected", "Degraded". - :vartype connection_status: str or ~azure.mgmt.network.v2017_09_01.models.ConnectionStatus - :ivar avg_latency_in_ms: Average latency in milliseconds. - :vartype avg_latency_in_ms: int - :ivar min_latency_in_ms: Minimum latency in milliseconds. - :vartype min_latency_in_ms: int - :ivar max_latency_in_ms: Maximum latency in milliseconds. - :vartype max_latency_in_ms: int - :ivar probes_sent: Total number of probes sent. - :vartype probes_sent: int - :ivar probes_failed: Number of failed probes. - :vartype probes_failed: int - """ - - _validation = { - 'hops': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'avg_latency_in_ms': {'readonly': True}, - 'min_latency_in_ms': {'readonly': True}, - 'max_latency_in_ms': {'readonly': True}, - 'probes_sent': {'readonly': True}, - 'probes_failed': {'readonly': True}, - } - - _attribute_map = { - 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'int'}, - 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'int'}, - 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'int'}, - 'probes_sent': {'key': 'probesSent', 'type': 'int'}, - 'probes_failed': {'key': 'probesFailed', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityInformation, self).__init__(**kwargs) - self.hops = None - self.connection_status = None - self.avg_latency_in_ms = None - self.min_latency_in_ms = None - self.max_latency_in_ms = None - self.probes_sent = None - self.probes_failed = None - - -class ConnectivityIssue(msrest.serialization.Model): - """Information about an issue encountered in the process of checking for connectivity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". - :vartype origin: str or ~azure.mgmt.network.v2017_09_01.models.Origin - :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". - :vartype severity: str or ~azure.mgmt.network.v2017_09_01.models.Severity - :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", - "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", - "PortThrottled", "Platform". - :vartype type: str or ~azure.mgmt.network.v2017_09_01.models.IssueType - :ivar context: Provides additional context on the issue. - :vartype context: list[dict[str, str]] - """ - - _validation = { - 'origin': {'readonly': True}, - 'severity': {'readonly': True}, - 'type': {'readonly': True}, - 'context': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'context': {'key': 'context', 'type': '[{str}]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityIssue, self).__init__(**kwargs) - self.origin = None - self.severity = None - self.type = None - self.context = None - - -class ConnectivityParameters(msrest.serialization.Model): - """Parameters that determine how the connectivity check will be performed. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Parameters that define the source of the connection. - :type source: ~azure.mgmt.network.v2017_09_01.models.ConnectivitySource - :param destination: Required. Parameters that define destination of connection. - :type destination: ~azure.mgmt.network.v2017_09_01.models.ConnectivityDestination - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectivitySource'}, - 'destination': {'key': 'destination', 'type': 'ConnectivityDestination'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityParameters, self).__init__(**kwargs) - self.source = kwargs['source'] - self.destination = kwargs['destination'] - - -class ConnectivitySource(msrest.serialization.Model): - """Parameters that define the source of the connection. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The ID of the resource from which a connectivity check will be - initiated. - :type resource_id: str - :param port: The source port from which a connectivity check will be performed. - :type port: int - """ - - _validation = { - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivitySource, self).__init__(**kwargs) - self.resource_id = kwargs['resource_id'] - self.port = kwargs.get('port', None) - - -class DhcpOptions(msrest.serialization.Model): - """DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. - - :param dns_servers: The list of DNS servers IP addresses. - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(DhcpOptions, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) - - -class Dimension(msrest.serialization.Model): - """Dimension of the metric. - - :param name: The name of the dimension. - :type name: str - :param display_name: The display name of the dimension. - :type display_name: str - :param internal_name: The internal name of the dimension. - :type internal_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Dimension, 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) - - -class DnsNameAvailabilityResult(msrest.serialization.Model): - """Response for the CheckDnsNameAvailability API service call. - - :param available: Domain availability (True/False). - :type available: bool - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(DnsNameAvailabilityResult, self).__init__(**kwargs) - self.available = kwargs.get('available', None) - - -class EffectiveNetworkSecurityGroup(msrest.serialization.Model): - """Effective network security group. - - :param network_security_group: The ID of network security group that is applied. - :type network_security_group: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param association: Associated resources. - :type association: - ~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityGroupAssociation - :param effective_security_rules: A collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityRule] - :param tag_map: Mapping of tags to list of IP Addresses included within the tag. - :type tag_map: str - """ - - _attribute_map = { - 'network_security_group': {'key': 'networkSecurityGroup', 'type': 'SubResource'}, - 'association': {'key': 'association', 'type': 'EffectiveNetworkSecurityGroupAssociation'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - 'tag_map': {'key': 'tagMap', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityGroup, self).__init__(**kwargs) - self.network_security_group = kwargs.get('network_security_group', None) - self.association = kwargs.get('association', None) - self.effective_security_rules = kwargs.get('effective_security_rules', None) - self.tag_map = kwargs.get('tag_map', None) - - -class EffectiveNetworkSecurityGroupAssociation(msrest.serialization.Model): - """The effective network security group association. - - :param subnet: The ID of the subnet if assigned. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param network_interface: The ID of the network interface if assigned. - :type network_interface: ~azure.mgmt.network.v2017_09_01.models.SubResource - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'SubResource'}, - 'network_interface': {'key': 'networkInterface', 'type': 'SubResource'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityGroupAssociation, self).__init__(**kwargs) - self.subnet = kwargs.get('subnet', None) - self.network_interface = kwargs.get('network_interface', None) - - -class EffectiveNetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for list effective network security groups API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective network security groups. - :type value: list[~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class EffectiveNetworkSecurityRule(msrest.serialization.Model): - """Effective network security rules. - - :param name: The name of the security rule specified by the user (if created by the user). - :type name: str - :param protocol: The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', - and 'All'. Possible values include: "Tcp", "Udp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.EffectiveSecurityRuleProtocol - :param source_port_range: The source port or range. - :type source_port_range: str - :param destination_port_range: The destination port or range. - :type destination_port_range: str - :param source_port_ranges: The source port ranges. Expected values include a single integer - between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. Expected values include a single - integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type destination_port_ranges: list[str] - :param source_address_prefix: The source address prefix. - :type source_address_prefix: str - :param destination_address_prefix: The destination address prefix. - :type destination_address_prefix: str - :param source_address_prefixes: The source address prefixes. Expected values include CIDR IP - ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the - asterisk (*). - :type source_address_prefixes: list[str] - :param destination_address_prefixes: The destination address prefixes. Expected values include - CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and - the asterisk (*). - :type destination_address_prefixes: list[str] - :param expanded_source_address_prefix: The expanded source address prefix. - :type expanded_source_address_prefix: list[str] - :param expanded_destination_address_prefix: Expanded destination address prefix. - :type expanded_destination_address_prefix: list[str] - :param access: Whether network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleAccess - :param priority: The priority of the rule. - :type priority: int - :param direction: The direction of the rule. Possible values are: 'Inbound and Outbound'. - Possible values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleDirection - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, - 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[str]'}, - 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, - 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'sourceAddressPrefixes', 'type': '[str]'}, - 'destination_address_prefixes': {'key': 'destinationAddressPrefixes', 'type': '[str]'}, - 'expanded_source_address_prefix': {'key': 'expandedSourceAddressPrefix', 'type': '[str]'}, - 'expanded_destination_address_prefix': {'key': 'expandedDestinationAddressPrefix', 'type': '[str]'}, - 'access': {'key': 'access', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'direction': {'key': 'direction', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.protocol = kwargs.get('protocol', None) - self.source_port_range = kwargs.get('source_port_range', None) - self.destination_port_range = kwargs.get('destination_port_range', None) - self.source_port_ranges = kwargs.get('source_port_ranges', None) - self.destination_port_ranges = kwargs.get('destination_port_ranges', None) - self.source_address_prefix = kwargs.get('source_address_prefix', None) - self.destination_address_prefix = kwargs.get('destination_address_prefix', None) - self.source_address_prefixes = kwargs.get('source_address_prefixes', None) - self.destination_address_prefixes = kwargs.get('destination_address_prefixes', None) - self.expanded_source_address_prefix = kwargs.get('expanded_source_address_prefix', None) - self.expanded_destination_address_prefix = kwargs.get('expanded_destination_address_prefix', None) - self.access = kwargs.get('access', None) - self.priority = kwargs.get('priority', None) - self.direction = kwargs.get('direction', None) - - -class EffectiveRoute(msrest.serialization.Model): - """Effective Route. - - :param name: The name of the user defined route. This is optional. - :type name: str - :param source: Who created the route. Possible values are: 'Unknown', 'User', - 'VirtualNetworkGateway', and 'Default'. Possible values include: "Unknown", "User", - "VirtualNetworkGateway", "Default". - :type source: str or ~azure.mgmt.network.v2017_09_01.models.EffectiveRouteSource - :param state: The value of effective route. Possible values are: 'Active' and 'Invalid'. - Possible values include: "Active", "Invalid". - :type state: str or ~azure.mgmt.network.v2017_09_01.models.EffectiveRouteState - :param address_prefix: The address prefixes of the effective routes in CIDR notation. - :type address_prefix: list[str] - :param next_hop_ip_address: The IP address of the next hop of the effective route. - :type next_hop_ip_address: list[str] - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_09_01.models.RouteNextHopType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address_prefix': {'key': 'addressPrefix', 'type': '[str]'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': '[str]'}, - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveRoute, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.source = kwargs.get('source', None) - self.state = kwargs.get('state', None) - self.address_prefix = kwargs.get('address_prefix', None) - self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) - self.next_hop_type = kwargs.get('next_hop_type', None) - - -class EffectiveRouteListResult(msrest.serialization.Model): - """Response for list effective route API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective routes. - :type value: list[~azure.mgmt.network.v2017_09_01.models.EffectiveRoute] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveRoute]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveRouteListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class EndpointServiceResult(SubResource): - """Endpoint service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Name of the endpoint service. - :vartype name: str - :ivar type: Type of the endpoint service. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EndpointServiceResult, self).__init__(**kwargs) - self.name = None - self.type = None - - -class EndpointServicesListResult(msrest.serialization.Model): - """Response for the ListAvailableEndpointServices API service call. - - :param value: List of available endpoint services in a region. - :type value: list[~azure.mgmt.network.v2017_09_01.models.EndpointServiceResult] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EndpointServiceResult]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EndpointServicesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class Error(msrest.serialization.Model): - """Error. - - :param code: - :type code: str - :param message: - :type message: str - :param target: - :type target: str - :param details: - :type details: list[~azure.mgmt.network.v2017_09_01.models.ErrorDetails] - :param inner_error: - :type inner_error: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'inner_error': {'key': 'innerError', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Error, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - self.inner_error = kwargs.get('inner_error', None) - - -class ErrorDetails(msrest.serialization.Model): - """ErrorDetails. - - :param code: - :type code: str - :param target: - :type target: str - :param message: - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) - - -class ExpressRouteCircuit(Resource): - """ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The SKU. - :type sku: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitSku - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param allow_classic_operations: Allow classic operations. - :type allow_classic_operations: bool - :param circuit_provisioning_state: The CircuitProvisioningState state of the resource. - :type circuit_provisioning_state: str - :param service_provider_provisioning_state: The ServiceProviderProvisioningState state of the - resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and - 'Deprovisioning'. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", - "Deprovisioning". - :type service_provider_provisioning_state: str or - ~azure.mgmt.network.v2017_09_01.models.ServiceProviderProvisioningState - :param authorizations: The list of authorizations. - :type authorizations: - list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization] - :param peerings: The list of peerings. - :type peerings: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] - :param service_key: The ServiceKey. - :type service_key: str - :param service_provider_notes: The ServiceProviderNotes. - :type service_provider_notes: str - :param service_provider_properties: The ServiceProviderProperties. - :type service_provider_properties: - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitServiceProviderProperties - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ExpressRouteCircuitSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_classic_operations': {'key': 'properties.allowClassicOperations', 'type': 'bool'}, - 'circuit_provisioning_state': {'key': 'properties.circuitProvisioningState', 'type': 'str'}, - 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, - 'authorizations': {'key': 'properties.authorizations', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, - 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, - 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuit, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.etag = None - self.allow_classic_operations = kwargs.get('allow_classic_operations', None) - self.circuit_provisioning_state = kwargs.get('circuit_provisioning_state', None) - self.service_provider_provisioning_state = kwargs.get('service_provider_provisioning_state', None) - self.authorizations = kwargs.get('authorizations', None) - self.peerings = kwargs.get('peerings', None) - self.service_key = kwargs.get('service_key', None) - self.service_provider_notes = kwargs.get('service_provider_notes', None) - self.service_provider_properties = kwargs.get('service_provider_properties', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) - - -class ExpressRouteCircuitArpTable(msrest.serialization.Model): - """The ARP table associated with the ExpressRouteCircuit. - - :param age: Age. - :type age: int - :param interface: Interface. - :type interface: str - :param ip_address: The IP address. - :type ip_address: str - :param mac_address: The MAC address. - :type mac_address: str - """ - - _attribute_map = { - 'age': {'key': 'age', 'type': 'int'}, - 'interface': {'key': 'interface', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'mac_address': {'key': 'macAddress', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitArpTable, self).__init__(**kwargs) - self.age = kwargs.get('age', None) - self.interface = kwargs.get('interface', None) - self.ip_address = kwargs.get('ip_address', None) - self.mac_address = kwargs.get('mac_address', None) - - -class ExpressRouteCircuitAuthorization(SubResource): - """Authorization in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param authorization_key: The authorization key. - :type authorization_key: str - :param authorization_use_status: AuthorizationUseStatus. Possible values are: 'Available' and - 'InUse'. Possible values include: "Available", "InUse". - :type authorization_use_status: str or - ~azure.mgmt.network.v2017_09_01.models.AuthorizationUseStatus - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitAuthorization, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = None - self.authorization_key = kwargs.get('authorization_key', None) - self.authorization_use_status = kwargs.get('authorization_use_status', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ExpressRouteCircuitListResult(msrest.serialization.Model): - """Response for ListExpressRouteCircuit API service call. - - :param value: A list of ExpressRouteCircuits in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuit]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitPeering(SubResource): - """Peering in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param peering_type: The PeeringType. Possible values are: 'AzurePublicPeering', - 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: "AzurePublicPeering", - "AzurePrivatePeering", "MicrosoftPeering". - :type peering_type: str or - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringType - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringState - :param azure_asn: The Azure ASN. - :type azure_asn: int - :param peer_asn: The peer ASN. - :type peer_asn: int - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param primary_azure_port: The primary port. - :type primary_azure_port: str - :param secondary_azure_port: The secondary port. - :type secondary_azure_port: str - :param shared_key: The shared key. - :type shared_key: str - :param vlan_id: The VLAN ID. - :type vlan_id: int - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringConfig - :param stats: Gets peering stats. - :type stats: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitStats - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - :param last_modified_by: Gets whether the provider or the customer last modified the peering. - :type last_modified_by: str - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_09_01.models.RouteFilter - :param ipv6_peering_config: The IPv6 peering configuration. - :type ipv6_peering_config: - ~azure.mgmt.network.v2017_09_01.models.Ipv6ExpressRouteCircuitPeeringConfig - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, - 'peer_asn': {'key': 'properties.peerASN', 'type': 'int'}, - 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, - 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, - 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, - 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'stats': {'key': 'properties.stats', 'type': 'ExpressRouteCircuitStats'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'route_filter': {'key': 'properties.routeFilter', 'type': 'RouteFilter'}, - 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitPeering, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = None - self.peering_type = kwargs.get('peering_type', None) - self.state = kwargs.get('state', None) - self.azure_asn = kwargs.get('azure_asn', None) - self.peer_asn = kwargs.get('peer_asn', None) - self.primary_peer_address_prefix = kwargs.get('primary_peer_address_prefix', None) - self.secondary_peer_address_prefix = kwargs.get('secondary_peer_address_prefix', None) - self.primary_azure_port = kwargs.get('primary_azure_port', None) - self.secondary_azure_port = kwargs.get('secondary_azure_port', None) - self.shared_key = kwargs.get('shared_key', None) - self.vlan_id = kwargs.get('vlan_id', None) - self.microsoft_peering_config = kwargs.get('microsoft_peering_config', None) - self.stats = kwargs.get('stats', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.route_filter = kwargs.get('route_filter', None) - self.ipv6_peering_config = kwargs.get('ipv6_peering_config', None) - - -class ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Specifies the peering configuration. - - :param advertised_public_prefixes: The reference of AdvertisedPublicPrefixes. - :type advertised_public_prefixes: list[str] - :param advertised_communities: The communities of bgp peering. Specified for microsoft peering. - :type advertised_communities: list[str] - :param advertised_public_prefixes_state: AdvertisedPublicPrefixState of the Peering resource. - Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. - Possible values include: "NotConfigured", "Configuring", "Configured", "ValidationNeeded". - :type advertised_public_prefixes_state: str or - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState - :param legacy_mode: The legacy mode of the peering. - :type legacy_mode: int - :param customer_asn: The CustomerASN of the peering. - :type customer_asn: int - :param routing_registry_name: The RoutingRegistryName of the configuration. - :type routing_registry_name: str - """ - - _attribute_map = { - 'advertised_public_prefixes': {'key': 'advertisedPublicPrefixes', 'type': '[str]'}, - 'advertised_communities': {'key': 'advertisedCommunities', 'type': '[str]'}, - 'advertised_public_prefixes_state': {'key': 'advertisedPublicPrefixesState', 'type': 'str'}, - 'legacy_mode': {'key': 'legacyMode', 'type': 'int'}, - 'customer_asn': {'key': 'customerASN', 'type': 'int'}, - 'routing_registry_name': {'key': 'routingRegistryName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.advertised_public_prefixes = kwargs.get('advertised_public_prefixes', None) - self.advertised_communities = kwargs.get('advertised_communities', None) - self.advertised_public_prefixes_state = kwargs.get('advertised_public_prefixes_state', None) - self.legacy_mode = kwargs.get('legacy_mode', None) - self.customer_asn = kwargs.get('customer_asn', None) - self.routing_registry_name = kwargs.get('routing_registry_name', None) - - -class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): - """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. - - :param value: The peerings in an express route circuit. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitPeeringListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitRoutesTable(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param network: network. - :type network: str - :param next_hop: nextHop. - :type next_hop: str - :param loc_prf: locPrf. - :type loc_prf: str - :param weight: weight. - :type weight: int - :param path: path. - :type path: str - """ - - _attribute_map = { - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'loc_prf': {'key': 'locPrf', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitRoutesTable, self).__init__(**kwargs) - self.network = kwargs.get('network', None) - self.next_hop = kwargs.get('next_hop', None) - self.loc_prf = kwargs.get('loc_prf', None) - self.weight = kwargs.get('weight', None) - self.path = kwargs.get('path', None) - - -class ExpressRouteCircuitRoutesTableSummary(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param neighbor: Neighbor. - :type neighbor: str - :param v: BGP version number spoken to the neighbor. - :type v: int - :param as_property: Autonomous system number. - :type as_property: int - :param up_down: The length of time that the BGP session has been in the Established state, or - the current status if not in the Established state. - :type up_down: str - :param state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have - been received from a neighbor or peer group. - :type state_pfx_rcd: str - """ - - _attribute_map = { - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'v': {'key': 'v', 'type': 'int'}, - 'as_property': {'key': 'as', 'type': 'int'}, - 'up_down': {'key': 'upDown', 'type': 'str'}, - 'state_pfx_rcd': {'key': 'statePfxRcd', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitRoutesTableSummary, self).__init__(**kwargs) - self.neighbor = kwargs.get('neighbor', None) - self.v = kwargs.get('v', None) - self.as_property = kwargs.get('as_property', None) - self.up_down = kwargs.get('up_down', None) - self.state_pfx_rcd = kwargs.get('state_pfx_rcd', None) - - -class ExpressRouteCircuitsArpTableListResult(msrest.serialization.Model): - """Response for ListArpTable associated with the Express Route Circuits API. - - :param value: Gets list of the ARP table. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitArpTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitArpTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitsArpTableListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitServiceProviderProperties(msrest.serialization.Model): - """Contains ServiceProviderProperties in an ExpressRouteCircuit. - - :param service_provider_name: The serviceProviderName. - :type service_provider_name: str - :param peering_location: The peering location. - :type peering_location: str - :param bandwidth_in_mbps: The BandwidthInMbps. - :type bandwidth_in_mbps: int - """ - - _attribute_map = { - 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, - 'peering_location': {'key': 'peeringLocation', 'type': 'str'}, - 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitServiceProviderProperties, self).__init__(**kwargs) - self.service_provider_name = kwargs.get('service_provider_name', None) - self.peering_location = kwargs.get('peering_location', None) - self.bandwidth_in_mbps = kwargs.get('bandwidth_in_mbps', None) - - -class ExpressRouteCircuitSku(msrest.serialization.Model): - """Contains SKU in an ExpressRouteCircuit. - - :param name: The name of the SKU. - :type name: str - :param tier: The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values - include: "Standard", "Premium". - :type tier: str or ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitSkuTier - :param family: The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. - Possible values include: "UnlimitedData", "MeteredData". - :type family: str or ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitSkuFamily - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.family = kwargs.get('family', None) - - -class ExpressRouteCircuitsRoutesTableListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: The list of routes table. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitRoutesTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitsRoutesTableSummaryListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: A list of the routes table. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitRoutesTableSummary] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableSummaryListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitStats(msrest.serialization.Model): - """Contains stats associated with the peering. - - :param primarybytes_in: Gets BytesIn of the peering. - :type primarybytes_in: long - :param primarybytes_out: Gets BytesOut of the peering. - :type primarybytes_out: long - :param secondarybytes_in: Gets BytesIn of the peering. - :type secondarybytes_in: long - :param secondarybytes_out: Gets BytesOut of the peering. - :type secondarybytes_out: long - """ - - _attribute_map = { - 'primarybytes_in': {'key': 'primarybytesIn', 'type': 'long'}, - 'primarybytes_out': {'key': 'primarybytesOut', 'type': 'long'}, - 'secondarybytes_in': {'key': 'secondarybytesIn', 'type': 'long'}, - 'secondarybytes_out': {'key': 'secondarybytesOut', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitStats, self).__init__(**kwargs) - self.primarybytes_in = kwargs.get('primarybytes_in', None) - self.primarybytes_out = kwargs.get('primarybytes_out', None) - self.secondarybytes_in = kwargs.get('secondarybytes_in', None) - self.secondarybytes_out = kwargs.get('secondarybytes_out', None) - - -class ExpressRouteServiceProvider(Resource): - """A ExpressRouteResourceProvider object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param peering_locations: Get a list of peering locations. - :type peering_locations: list[str] - :param bandwidths_offered: Gets bandwidths offered. - :type bandwidths_offered: - list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteServiceProviderBandwidthsOffered] - :param provisioning_state: Gets the provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, - 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteServiceProvider, self).__init__(**kwargs) - self.peering_locations = kwargs.get('peering_locations', None) - self.bandwidths_offered = kwargs.get('bandwidths_offered', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ExpressRouteServiceProviderBandwidthsOffered(msrest.serialization.Model): - """Contains bandwidths offered in ExpressRouteServiceProvider resources. - - :param offer_name: The OfferName. - :type offer_name: str - :param value_in_mbps: The ValueInMbps. - :type value_in_mbps: int - """ - - _attribute_map = { - 'offer_name': {'key': 'offerName', 'type': 'str'}, - 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs) - self.offer_name = kwargs.get('offer_name', None) - self.value_in_mbps = kwargs.get('value_in_mbps', None) - - -class ExpressRouteServiceProviderListResult(msrest.serialization.Model): - """Response for the ListExpressRouteServiceProvider API service call. - - :param value: A list of ExpressRouteResourceProvider resources. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteServiceProvider] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteServiceProviderListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class FlowLogInformation(msrest.serialization.Model): - """Information on the configuration of flow log. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the resource to configure for flow logging. - :type target_resource_id: str - :param storage_id: Required. ID of the storage account which is used to store the flow log. - :type storage_id: str - :param enabled: Required. Flag to enable/disable flow logging. - :type enabled: bool - :param retention_policy: Parameters that define the retention policy for flow log. - :type retention_policy: ~azure.mgmt.network.v2017_09_01.models.RetentionPolicyParameters - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowLogInformation, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.storage_id = kwargs['storage_id'] - self.enabled = kwargs['enabled'] - self.retention_policy = kwargs.get('retention_policy', None) - - -class FlowLogStatusParameters(msrest.serialization.Model): - """Parameters that define a resource to query flow log status. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource where getting the flow logging status. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowLogStatusParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - - -class FrontendIPConfiguration(SubResource): - """Frontend IP address of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :ivar inbound_nat_rules: Read only. Inbound rules URIs that use this frontend IP. - :vartype inbound_nat_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :ivar inbound_nat_pools: Read only. Inbound pools URIs that use this frontend IP. - :vartype inbound_nat_pools: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :ivar outbound_nat_rules: Read only. Outbound rules URIs that use this frontend IP. - :vartype outbound_nat_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :ivar load_balancing_rules: Gets load balancing rules URIs that use this frontend IP. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The Private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.Subnet - :param public_ip_address: The reference of the Public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'inbound_nat_rules': {'readonly': True}, - 'inbound_nat_pools': {'readonly': True}, - 'outbound_nat_rules': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[SubResource]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[SubResource]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(FrontendIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.zones = kwargs.get('zones', None) - self.inbound_nat_rules = None - self.inbound_nat_pools = None - self.outbound_nat_rules = None - self.load_balancing_rules = None - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class GatewayRoute(msrest.serialization.Model): - """Gateway routing details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The gateway's local address. - :vartype local_address: str - :ivar network: The route's network prefix. - :vartype network: str - :ivar next_hop: The route's next hop. - :vartype next_hop: str - :ivar source_peer: The peer this route was learned from. - :vartype source_peer: str - :ivar origin: The source this route was learned from. - :vartype origin: str - :ivar as_path: The route's AS path sequence. - :vartype as_path: str - :ivar weight: The route's weight. - :vartype weight: int - """ - - _validation = { - 'local_address': {'readonly': True}, - 'network': {'readonly': True}, - 'next_hop': {'readonly': True}, - 'source_peer': {'readonly': True}, - 'origin': {'readonly': True}, - 'as_path': {'readonly': True}, - 'weight': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'as_path': {'key': 'asPath', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(GatewayRoute, self).__init__(**kwargs) - self.local_address = None - self.network = None - self.next_hop = None - self.source_peer = None - self.origin = None - self.as_path = None - self.weight = None - - -class GatewayRouteListResult(msrest.serialization.Model): - """List of virtual network gateway routes. - - :param value: List of gateway routes. - :type value: list[~azure.mgmt.network.v2017_09_01.models.GatewayRoute] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[GatewayRoute]'}, - } - - def __init__( - self, - **kwargs - ): - super(GatewayRouteListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class InboundNatPool(SubResource): - """Inbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.TransportProtocol - :param frontend_port_range_start: The first port number in the range of external ports that - will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values - range between 1 and 65534. - :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of external ports that will - be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range - between 1 and 65535. - :type frontend_port_range_end: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 1 and 65535. - :type backend_port: int - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, - 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatPool, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.protocol = kwargs.get('protocol', None) - self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) - self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) - self.backend_port = kwargs.get('backend_port', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class InboundNatRule(SubResource): - """Inbound NAT rule of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :ivar backend_ip_configuration: A reference to a private IP address defined on a network - interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations - is forwarded to the backend IP. - :vartype backend_ip_configuration: - ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.TransportProtocol - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values range from 1 to 65534. - :type frontend_port: int - :param backend_port: The port used for the internal endpoint. Acceptable values range from 1 to - 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_ip_configuration': {'key': 'properties.backendIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.backend_ip_configuration = None - self.protocol = kwargs.get('protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.enable_floating_ip = kwargs.get('enable_floating_ip', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class InboundNatRuleListResult(msrest.serialization.Model): - """Response for ListInboundNatRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of inbound nat rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.InboundNatRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InboundNatRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class IPAddressAvailabilityResult(msrest.serialization.Model): - """Response for CheckIPAddressAvailability API service call. - - :param available: Private IP address availability. - :type available: bool - :param available_ip_addresses: Contains other available private IP addresses if the asked for - address is taken. - :type available_ip_addresses: list[str] - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'available_ip_addresses': {'key': 'availableIPAddresses', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(IPAddressAvailabilityResult, self).__init__(**kwargs) - self.available = kwargs.get('available', None) - self.available_ip_addresses = kwargs.get('available_ip_addresses', None) - - -class IPConfiguration(SubResource): - """IP configuration. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.Subnet - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class IpsecPolicy(msrest.serialization.Model): - """An IPSec Policy configuration for a virtual network gateway connection. - - All required parameters must be populated in order to send to Azure. - - :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - :type sa_life_time_seconds: int - :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - :type sa_data_size_kilobytes: int - :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible - values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", - "GCMAES256". - :type ipsec_encryption: str or ~azure.mgmt.network.v2017_09_01.models.IpsecEncryption - :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values - include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". - :type ipsec_integrity: str or ~azure.mgmt.network.v2017_09_01.models.IpsecIntegrity - :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values - include: "DES", "DES3", "AES128", "AES192", "AES256". - :type ike_encryption: str or ~azure.mgmt.network.v2017_09_01.models.IkeEncryption - :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values - include: "MD5", "SHA1", "SHA256", "SHA384". - :type ike_integrity: str or ~azure.mgmt.network.v2017_09_01.models.IkeIntegrity - :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values - include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", - "DHGroup24". - :type dh_group: str or ~azure.mgmt.network.v2017_09_01.models.DhGroup - :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new child SA. Possible values - include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24". - :type pfs_group: str or ~azure.mgmt.network.v2017_09_01.models.PfsGroup - """ - - _validation = { - 'sa_life_time_seconds': {'required': True}, - 'sa_data_size_kilobytes': {'required': True}, - 'ipsec_encryption': {'required': True}, - 'ipsec_integrity': {'required': True}, - 'ike_encryption': {'required': True}, - 'ike_integrity': {'required': True}, - 'dh_group': {'required': True}, - 'pfs_group': {'required': True}, - } - - _attribute_map = { - 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, - 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, - 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, - 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, - 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, - 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, - 'dh_group': {'key': 'dhGroup', 'type': 'str'}, - 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IpsecPolicy, self).__init__(**kwargs) - self.sa_life_time_seconds = kwargs['sa_life_time_seconds'] - self.sa_data_size_kilobytes = kwargs['sa_data_size_kilobytes'] - self.ipsec_encryption = kwargs['ipsec_encryption'] - self.ipsec_integrity = kwargs['ipsec_integrity'] - self.ike_encryption = kwargs['ike_encryption'] - self.ike_integrity = kwargs['ike_integrity'] - self.dh_group = kwargs['dh_group'] - self.pfs_group = kwargs['pfs_group'] - - -class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Contains IPv6 peering config. - - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringConfig - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_09_01.models.RouteFilter - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringState - """ - - _attribute_map = { - 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, - 'microsoft_peering_config': {'key': 'microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'route_filter': {'key': 'routeFilter', 'type': 'RouteFilter'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Ipv6ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.primary_peer_address_prefix = kwargs.get('primary_peer_address_prefix', None) - self.secondary_peer_address_prefix = kwargs.get('secondary_peer_address_prefix', None) - self.microsoft_peering_config = kwargs.get('microsoft_peering_config', None) - self.route_filter = kwargs.get('route_filter', None) - self.state = kwargs.get('state', None) - - -class LoadBalancer(Resource): - """LoadBalancer resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The load balancer SKU. - :type sku: ~azure.mgmt.network.v2017_09_01.models.LoadBalancerSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configurations: Object representing the frontend IPs to be used for the load - balancer. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.FrontendIPConfiguration] - :param backend_address_pools: Collection of backend address pools used by a load balancer. - :type backend_address_pools: list[~azure.mgmt.network.v2017_09_01.models.BackendAddressPool] - :param load_balancing_rules: Object collection representing the load balancing rules Gets the - provisioning. - :type load_balancing_rules: list[~azure.mgmt.network.v2017_09_01.models.LoadBalancingRule] - :param probes: Collection of probe objects used in the load balancer. - :type probes: list[~azure.mgmt.network.v2017_09_01.models.Probe] - :param inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining - inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT - pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are - associated with individual virtual machines cannot reference an Inbound NAT pool. They have to - reference individual inbound NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.network.v2017_09_01.models.InboundNatRule] - :param inbound_nat_pools: Defines an external port range for inbound NAT to a single backend - port on NICs associated with a load balancer. Inbound NAT rules are created automatically for - each NIC associated with the Load Balancer using an external port from this range. Defining an - Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. - Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with - individual virtual machines cannot reference an inbound NAT pool. They have to reference - individual inbound NAT rules. - :type inbound_nat_pools: list[~azure.mgmt.network.v2017_09_01.models.InboundNatPool] - :param outbound_nat_rules: The outbound NAT rules. - :type outbound_nat_rules: list[~azure.mgmt.network.v2017_09_01.models.OutboundNatRule] - :param resource_guid: The resource GUID property of the load balancer resource. - :type resource_guid: str - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'LoadBalancerSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[FrontendIPConfiguration]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'probes': {'key': 'properties.probes', 'type': '[Probe]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[InboundNatRule]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[InboundNatPool]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[OutboundNatRule]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancer, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) - self.backend_address_pools = kwargs.get('backend_address_pools', None) - self.load_balancing_rules = kwargs.get('load_balancing_rules', None) - self.probes = kwargs.get('probes', None) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) - self.inbound_nat_pools = kwargs.get('inbound_nat_pools', None) - self.outbound_nat_rules = kwargs.get('outbound_nat_rules', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class LoadBalancerBackendAddressPoolListResult(msrest.serialization.Model): - """Response for ListBackendAddressPool API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of backend address pools in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.BackendAddressPool] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackendAddressPool]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerBackendAddressPoolListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): - """Response for ListFrontendIPConfiguration API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of frontend IP configurations in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.FrontendIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerFrontendIPConfigurationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerListResult(msrest.serialization.Model): - """Response for ListLoadBalancers API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerLoadBalancingRuleListResult(msrest.serialization.Model): - """Response for ListLoadBalancingRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancing rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.LoadBalancingRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancingRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerLoadBalancingRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerProbeListResult(msrest.serialization.Model): - """Response for ListProbe API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of probes in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Probe] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Probe]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerProbeListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerSku(msrest.serialization.Model): - """SKU of a load balancer. - - :param name: Name of a load balancer SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_09_01.models.LoadBalancerSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class LoadBalancingRule(SubResource): - """A load balancing rule for a load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param probe: The reference of the load balancer probe used by the load balancing rule. - :type probe: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.TransportProtocol - :param load_distribution: The load distribution policy for this rule. Possible values are - 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: "Default", "SourceIP", - "SourceIPProtocol". - :type load_distribution: str or ~azure.mgmt.network.v2017_09_01.models.LoadDistribution - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 - enables "Any Port". - :type frontend_port: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 0 and 65535. Note that value 0 enables "Any Port". - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the - publicIP address specified in the frontend of the load balancing rule. - :type disable_outbound_snat: bool - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'load_distribution': {'key': 'properties.loadDistribution', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'disable_outbound_snat': {'key': 'properties.disableOutboundSnat', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancingRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.probe = kwargs.get('probe', None) - self.protocol = kwargs.get('protocol', None) - self.load_distribution = kwargs.get('load_distribution', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.enable_floating_ip = kwargs.get('enable_floating_ip', None) - self.disable_outbound_snat = kwargs.get('disable_outbound_snat', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class LocalNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param local_network_address_space: Local network site address space. - :type local_network_address_space: ~azure.mgmt.network.v2017_09_01.models.AddressSpace - :param gateway_ip_address: IP address of local network gateway. - :type gateway_ip_address: str - :param bgp_settings: Local network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_09_01.models.BgpSettings - :param resource_guid: The resource GUID property of the LocalNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the LocalNetworkGateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'local_network_address_space': {'key': 'properties.localNetworkAddressSpace', 'type': 'AddressSpace'}, - 'gateway_ip_address': {'key': 'properties.gatewayIpAddress', 'type': 'str'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LocalNetworkGateway, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.local_network_address_space = kwargs.get('local_network_address_space', None) - self.gateway_ip_address = kwargs.get('gateway_ip_address', None) - self.bgp_settings = kwargs.get('bgp_settings', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class LocalNetworkGatewayListResult(msrest.serialization.Model): - """Response for ListLocalNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of local network gateways that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LocalNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LocalNetworkGatewayListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LogSpecification(msrest.serialization.Model): - """Description of logging specification. - - :param name: The name of the specification. - :type name: str - :param display_name: The display name of the specification. - :type display_name: str - :param blob_duration: Duration of the blob. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LogSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.blob_duration = kwargs.get('blob_duration', None) - - -class MetricSpecification(msrest.serialization.Model): - """Description of metrics specification. - - :param name: The name of the metric. - :type name: str - :param display_name: The display name of the metric. - :type display_name: str - :param display_description: The description of the metric. - :type display_description: str - :param unit: Units the metric to be displayed in. - :type unit: str - :param aggregation_type: The aggregation type. - :type aggregation_type: str - :param availabilities: List of availability. - :type availabilities: list[~azure.mgmt.network.v2017_09_01.models.Availability] - :param enable_regional_mdm_account: Whether regional MDM account enabled. - :type enable_regional_mdm_account: bool - :param fill_gap_with_zero: Whether gaps would be filled with zeros. - :type fill_gap_with_zero: bool - :param metric_filter_pattern: Pattern for the filter of the metric. - :type metric_filter_pattern: str - :param dimensions: List of dimensions. - :type dimensions: list[~azure.mgmt.network.v2017_09_01.models.Dimension] - :param is_internal: Whether the metric is internal. - :type is_internal: bool - :param source_mdm_account: The source MDM account. - :type source_mdm_account: str - :param source_mdm_namespace: The source MDM namespace. - :type source_mdm_namespace: str - :param resource_id_dimension_name_override: The resource Id dimension name override. - :type resource_id_dimension_name_override: str - """ - - _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'}, - 'availabilities': {'key': 'availabilities', 'type': '[Availability]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, - 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, - 'is_internal': {'key': 'isInternal', 'type': 'bool'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, - } - - 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.availabilities = kwargs.get('availabilities', None) - self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) - self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) - self.metric_filter_pattern = kwargs.get('metric_filter_pattern', None) - self.dimensions = kwargs.get('dimensions', None) - self.is_internal = kwargs.get('is_internal', None) - self.source_mdm_account = kwargs.get('source_mdm_account', None) - self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) - self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) - - -class NetworkInterface(Resource): - """A network interface in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param virtual_machine: The reference of a virtual machine. - :type virtual_machine: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup - :param ip_configurations: A list of IPConfigurations of the network interface. - :type ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration] - :param dns_settings: The DNS settings in network interface. - :type dns_settings: ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceDnsSettings - :param mac_address: The MAC address of the network interface. - :type mac_address: str - :param primary: Gets whether this is a primary network interface on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: If the network interface is accelerated networking - enabled. - :type enable_accelerated_networking: bool - :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network - interface. - :type enable_ip_forwarding: bool - :param resource_guid: The resource GUID property of the network interface resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, - 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterface, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.virtual_machine = kwargs.get('virtual_machine', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.mac_address = kwargs.get('mac_address', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class NetworkInterfaceAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Network interface ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = kwargs.get('security_rules', None) - - -class NetworkInterfaceDnsSettings(msrest.serialization.Model): - """DNS settings of a network interface. - - :param dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure - provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be - the only value in dnsServers collection. - :type dns_servers: list[str] - :param applied_dns_servers: If the VM that uses this NIC is part of an Availability Set, then - this list will have the union of all DNS servers from all NICs that are part of the - Availability Set. This property is what is configured on each of those VMs. - :type applied_dns_servers: list[str] - :param internal_dns_name_label: Relative DNS name for this NIC used for internal communications - between VMs in the same virtual network. - :type internal_dns_name_label: str - :param internal_fqdn: Fully qualified DNS name supporting internal communications between VMs - in the same virtual network. - :type internal_fqdn: str - :param internal_domain_name_suffix: Even if internalDnsNameLabel is not specified, a DNS entry - is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the - VM name with the value of internalDomainNameSuffix. - :type internal_domain_name_suffix: str - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, - 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, - 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'}, - 'internal_domain_name_suffix': {'key': 'internalDomainNameSuffix', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceDnsSettings, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) - self.applied_dns_servers = kwargs.get('applied_dns_servers', None) - self.internal_dns_name_label = kwargs.get('internal_dns_name_label', None) - self.internal_fqdn = kwargs.get('internal_fqdn', None) - self.internal_domain_name_suffix = kwargs.get('internal_domain_name_suffix', None) - - -class NetworkInterfaceIPConfiguration(SubResource): - """IPConfiguration in a network interface. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param application_gateway_backend_address_pools: The reference of - ApplicationGatewayBackendAddressPool resource. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendAddressPool] - :param load_balancer_backend_address_pools: The reference of LoadBalancerBackendAddressPool - resource. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.network.v2017_09_01.models.BackendAddressPool] - :param load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. - :type load_balancer_inbound_nat_rules: - list[~azure.mgmt.network.v2017_09_01.models.InboundNatRule] - :param private_ip_address: Private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: Defines how a private IP address is assigned. Possible - values are: 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param private_ip_address_version: Available from Api-Version 2016-03-30 onwards, it represents - whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible - values are: 'IPv4' and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type private_ip_address_version: str or ~azure.mgmt.network.v2017_09_01.models.IPVersion - :param subnet: Subnet bound to the IP configuration. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.Subnet - :param primary: Gets whether this is a primary customer address on the network interface. - :type primary: bool - :param public_ip_address: Public IP address bound to the IP configuration. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress - :param application_security_groups: Application security groups in which the IP configuration - is included. - :type application_security_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] - :param provisioning_state: The provisioning state of the network interface IP configuration. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_rules = kwargs.get('load_balancer_inbound_nat_rules', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.application_security_groups = kwargs.get('application_security_groups', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of ip configurations. - :type value: list[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceIPConfigurationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkInterfaceListResult(msrest.serialization.Model): - """Response for the ListNetworkInterface API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of network interfaces in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.NetworkInterface] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterface]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkInterfaceLoadBalancerListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers. - :type value: list[~azure.mgmt.network.v2017_09_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceLoadBalancerListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkSecurityGroup(Resource): - """NetworkSecurityGroup resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param security_rules: A collection of security rules of the network security group. - :type security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - :param default_security_rules: The default security rules of network security group. - :type default_security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - :ivar network_interfaces: A collection of references to network interfaces. - :vartype network_interfaces: list[~azure.mgmt.network.v2017_09_01.models.NetworkInterface] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_09_01.models.Subnet] - :param resource_guid: The resource GUID property of the network security group resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'network_interfaces': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'security_rules': {'key': 'properties.securityRules', 'type': '[SecurityRule]'}, - 'default_security_rules': {'key': 'properties.defaultSecurityRules', 'type': '[SecurityRule]'}, - 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkSecurityGroup, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.security_rules = kwargs.get('security_rules', None) - self.default_security_rules = kwargs.get('default_security_rules', None) - self.network_interfaces = None - self.subnets = None - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class NetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for ListNetworkSecurityGroups API service call. - - :param value: A list of NetworkSecurityGroup resources. - :type value: list[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class NetworkWatcher(Resource): - """Network watcher in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar provisioning_state: The provisioning state of the resource. Possible values include: - "Succeeded", "Updating", "Deleting", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.network.v2017_09_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkWatcher, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.provisioning_state = None - - -class NetworkWatcherListResult(msrest.serialization.Model): - """List of network watcher resources. - - :param value: - :type value: list[~azure.mgmt.network.v2017_09_01.models.NetworkWatcher] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkWatcher]'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkWatcherListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class NextHopParameters(msrest.serialization.Model): - """Parameters that define the source and destination endpoint. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The resource identifier of the target resource against - which the action is to be performed. - :type target_resource_id: str - :param source_ip_address: Required. The source IP address. - :type source_ip_address: str - :param destination_ip_address: Required. The destination IP address. - :type destination_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of the nics, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'source_ip_address': {'required': True}, - 'destination_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'source_ip_address': {'key': 'sourceIPAddress', 'type': 'str'}, - 'destination_ip_address': {'key': 'destinationIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NextHopParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.source_ip_address = kwargs['source_ip_address'] - self.destination_ip_address = kwargs['destination_ip_address'] - self.target_nic_resource_id = kwargs.get('target_nic_resource_id', None) - - -class NextHopResult(msrest.serialization.Model): - """The information about next hop from the specified VM. - - :param next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", - "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_09_01.models.NextHopType - :param next_hop_ip_address: Next hop IP Address. - :type next_hop_ip_address: str - :param route_table_id: The resource identifier for the route table associated with the route - being returned. If the route being returned does not correspond to any user created routes then - this field will be the string 'System Route'. - :type route_table_id: str - """ - - _attribute_map = { - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, - 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NextHopResult, self).__init__(**kwargs) - self.next_hop_type = kwargs.get('next_hop_type', None) - self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) - self.route_table_id = kwargs.get('route_table_id', None) - - -class Operation(msrest.serialization.Model): - """Network REST API operation definition. - - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.network.v2017_09_01.models.OperationDisplay - :param origin: Origin of the operation. - :type origin: str - :param service_specification: Specification of the service. - :type service_specification: - ~azure.mgmt.network.v2017_09_01.models.OperationPropertiesFormatServiceSpecification - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationPropertiesFormatServiceSpecification'}, - } - - def __init__( - self, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.service_specification = kwargs.get('service_specification', None) - - -class OperationDisplay(msrest.serialization.Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft Network. - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - :param operation: Type of the operation: get, read, delete, etc. - :type operation: str - :param description: Description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) - - -class OperationListResult(msrest.serialization.Model): - """Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of results. - - :param value: List of Network operations supported by the Network resource provider. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Operation] - :param next_link: URL to get the next set of operation list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class OperationPropertiesFormatServiceSpecification(msrest.serialization.Model): - """Specification of the service. - - :param metric_specifications: Operation service specification. - :type metric_specifications: list[~azure.mgmt.network.v2017_09_01.models.MetricSpecification] - :param log_specifications: Operation log specification. - :type log_specifications: list[~azure.mgmt.network.v2017_09_01.models.LogSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationPropertiesFormatServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = kwargs.get('metric_specifications', None) - self.log_specifications = kwargs.get('log_specifications', None) - - -class OutboundNatRule(SubResource): - """Outbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allocated_outbound_ports: The number of outbound ports to be used for NAT. - :type allocated_outbound_ports: int - :param frontend_ip_configurations: The Frontend IP addresses of the load balancer. - :type frontend_ip_configurations: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[SubResource]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OutboundNatRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', None) - self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PacketCapture(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCapture, self).__init__(**kwargs) - self.target = kwargs['target'] - self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) - self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) - self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) - self.storage_location = kwargs['storage_location'] - self.filters = kwargs.get('filters', None) - - -class PacketCaptureFilter(msrest.serialization.Model): - """Filter that is applied to packet capture request. Multiple filters can be applied. - - :param protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". - Default value: "Any". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.PcProtocol - :param local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type local_ip_address: str - :param remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type remote_ip_address: str - :param local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type local_port: str - :param remote_port: Remote port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type remote_port: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureFilter, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', "Any") - self.local_ip_address = kwargs.get('local_ip_address', None) - self.remote_ip_address = kwargs.get('remote_ip_address', None) - self.local_port = kwargs.get('local_port', None) - self.remote_port = kwargs.get('remote_port', None) - - -class PacketCaptureListResult(msrest.serialization.Model): - """List of packet capture sessions. - - :param value: Information about packet capture sessions. - :type value: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureResult] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PacketCaptureParameters(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureParameters, self).__init__(**kwargs) - self.target = kwargs['target'] - self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) - self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) - self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) - self.storage_location = kwargs['storage_location'] - self.filters = kwargs.get('filters', None) - - -class PacketCaptureQueryStatusResult(msrest.serialization.Model): - """Status of packet capture session. - - :param name: The name of the packet capture resource. - :type name: str - :param id: The ID of the packet capture resource. - :type id: str - :param capture_start_time: The start time of the packet capture session. - :type capture_start_time: ~datetime.datetime - :param packet_capture_status: The status of the packet capture session. Possible values - include: "NotStarted", "Running", "Stopped", "Error", "Unknown". - :type packet_capture_status: str or ~azure.mgmt.network.v2017_09_01.models.PcStatus - :param stop_reason: The reason the current packet capture session was stopped. - :type stop_reason: str - :param packet_capture_error: List of errors of packet capture session. - :type packet_capture_error: list[str or ~azure.mgmt.network.v2017_09_01.models.PcError] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'capture_start_time': {'key': 'captureStartTime', 'type': 'iso-8601'}, - 'packet_capture_status': {'key': 'packetCaptureStatus', 'type': 'str'}, - 'stop_reason': {'key': 'stopReason', 'type': 'str'}, - 'packet_capture_error': {'key': 'packetCaptureError', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureQueryStatusResult, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - self.capture_start_time = kwargs.get('capture_start_time', None) - self.packet_capture_status = kwargs.get('packet_capture_status', None) - self.stop_reason = kwargs.get('stop_reason', None) - self.packet_capture_error = kwargs.get('packet_capture_error', None) - - -class PacketCaptureResult(msrest.serialization.Model): - """Information about packet capture session. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the packet capture session. - :vartype name: str - :ivar id: ID of the packet capture operation. - :vartype id: str - :param etag: - :type etag: str - :param target: The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_09_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureResult, self).__init__(**kwargs) - self.name = None - self.id = None - self.etag = kwargs.get('etag', "A unique read-only string that changes whenever the resource is updated.") - self.target = kwargs.get('target', None) - self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) - self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) - self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) - self.storage_location = kwargs.get('storage_location', None) - self.filters = kwargs.get('filters', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PacketCaptureResultProperties(PacketCaptureParameters): - """Describes the properties of a packet capture session. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_09_01.models.ProvisioningState - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureResultProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PacketCaptureStorageLocation(msrest.serialization.Model): - """Describes the storage location for a packet capture session. - - :param storage_id: The ID of the storage account to save the packet capture session. Required - if no local file path is provided. - :type storage_id: str - :param storage_path: The URI of the storage path to save the packet capture. Must be a - well-formed URI describing the location to save the packet capture. - :type storage_path: str - :param file_path: A valid local path on the targeting VM. Must include the name of the capture - file (*.cap). For linux virtual machine it must start with /var/captures. Required if no - storage ID is provided, otherwise optional. - :type file_path: str - """ - - _attribute_map = { - 'storage_id': {'key': 'storageId', 'type': 'str'}, - 'storage_path': {'key': 'storagePath', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureStorageLocation, self).__init__(**kwargs) - self.storage_id = kwargs.get('storage_id', None) - self.storage_path = kwargs.get('storage_path', None) - self.file_path = kwargs.get('file_path', None) - - -class PatchRouteFilter(SubResource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar type: Resource type. - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PatchRouteFilter, self).__init__(**kwargs) - self.name = None - self.etag = None - self.type = None - self.tags = kwargs.get('tags', None) - self.rules = kwargs.get('rules', None) - self.peerings = kwargs.get('peerings', None) - self.provisioning_state = None - - -class PatchRouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_09_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PatchRouteFilterRule, self).__init__(**kwargs) - self.name = None - self.etag = None - self.tags = kwargs.get('tags', None) - self.access = kwargs.get('access', None) - self.route_filter_rule_type = kwargs.get('route_filter_rule_type', None) - self.communities = kwargs.get('communities', None) - self.provisioning_state = None - - -class Probe(SubResource): - """A load balancer probe. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar load_balancing_rules: The load balancer rules that use this probe. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param protocol: The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' - is specified, a received ACK is required for the probe to be successful. If 'Http' is - specified, a 200 OK response from the specifies URI is required for the probe to be successful. - Possible values include: "Http", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.ProbeProtocol - :param port: The port for communicating the probe. Possible values range from 1 to 65535, - inclusive. - :type port: int - :param interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint - for health status. Typically, the interval is slightly less than half the allocated timeout - period (in seconds) which allows two full probes before taking the instance out of rotation. - The default value is 15, the minimum value is 5. - :type interval_in_seconds: int - :param number_of_probes: The number of probes where if no response, will result in stopping - further traffic from being delivered to the endpoint. This values allows endpoints to be taken - out of rotation faster or slower than the typical times used in Azure. - :type number_of_probes: int - :param request_path: The URI used for requesting health status from the VM. Path is required if - a protocol is set to http. Otherwise, it is not allowed. There is no default value. - :type request_path: str - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, - 'number_of_probes': {'key': 'properties.numberOfProbes', 'type': 'int'}, - 'request_path': {'key': 'properties.requestPath', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Probe, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.load_balancing_rules = None - self.protocol = kwargs.get('protocol', None) - self.port = kwargs.get('port', None) - self.interval_in_seconds = kwargs.get('interval_in_seconds', None) - self.number_of_probes = kwargs.get('number_of_probes', None) - self.request_path = kwargs.get('request_path', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PublicIPAddress(Resource): - """Public IP address resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The public IP address SKU. - :type sku: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddressSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :param public_ip_allocation_method: The public IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type public_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param public_ip_address_version: The public IP address version. Possible values are: 'IPv4' - and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type public_ip_address_version: str or ~azure.mgmt.network.v2017_09_01.models.IPVersion - :ivar ip_configuration: The IP configuration associated with the public IP address. - :vartype ip_configuration: ~azure.mgmt.network.v2017_09_01.models.IPConfiguration - :param dns_settings: The FQDN of the DNS record associated with the public IP address. - :type dns_settings: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddressDnsSettings - :param ip_address: The IP address associated with the public IP address resource. - :type ip_address: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param resource_guid: The resource GUID property of the public IP resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'PublicIPAddressSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'public_ip_allocation_method': {'key': 'properties.publicIPAllocationMethod', 'type': 'str'}, - 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, - 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddress, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.etag = kwargs.get('etag', None) - self.zones = kwargs.get('zones', None) - self.public_ip_allocation_method = kwargs.get('public_ip_allocation_method', None) - self.public_ip_address_version = kwargs.get('public_ip_address_version', None) - self.ip_configuration = None - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_address = kwargs.get('ip_address', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PublicIPAddressDnsSettings(msrest.serialization.Model): - """Contains FQDN of the DNS record associated with the public IP address. - - :param domain_name_label: Gets or sets the Domain name label.The concatenation of the domain - name label and the regionalized DNS zone make up the fully qualified domain name associated - with the public IP address. If a domain name label is specified, an A DNS record is created for - the public IP in the Microsoft Azure DNS system. - :type domain_name_label: str - :param fqdn: Gets the FQDN, Fully qualified domain name of the A DNS record associated with the - public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. - :type fqdn: str - :param reverse_fqdn: Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name - that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record - is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. - :type reverse_fqdn: str - """ - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'reverse_fqdn': {'key': 'reverseFqdn', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddressDnsSettings, self).__init__(**kwargs) - self.domain_name_label = kwargs.get('domain_name_label', None) - self.fqdn = kwargs.get('fqdn', None) - self.reverse_fqdn = kwargs.get('reverse_fqdn', None) - - -class PublicIPAddressListResult(msrest.serialization.Model): - """Response for ListPublicIpAddresses API service call. - - :param value: A list of public IP addresses that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.PublicIPAddress] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddressListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class PublicIPAddressSku(msrest.serialization.Model): - """SKU of a public IP address. - - :param name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_09_01.models.PublicIPAddressSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddressSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class QueryTroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to query the troubleshooting result. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource ID to query the troubleshooting - result. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(QueryTroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - - -class ResourceNavigationLink(SubResource): - """ResourceNavigationLink resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param linked_resource_type: Resource type of the linked resource. - :type linked_resource_type: str - :param link: Link to the external resource. - :type link: str - :ivar provisioning_state: Provisioning state of the ResourceNavigationLink resource. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, - 'link': {'key': 'properties.link', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceNavigationLink, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = None - self.linked_resource_type = kwargs.get('linked_resource_type', None) - self.link = kwargs.get('link', None) - self.provisioning_state = None - - -class RetentionPolicyParameters(msrest.serialization.Model): - """Parameters that define the retention policy for flow log. - - :param days: Number of days to retain flow log records. - :type days: int - :param enabled: Flag to enable/disable retention. - :type enabled: bool - """ - - _attribute_map = { - 'days': {'key': 'days', 'type': 'int'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(RetentionPolicyParameters, self).__init__(**kwargs) - self.days = kwargs.get('days', 0) - self.enabled = kwargs.get('enabled', False) - - -class Route(SubResource): - """Route resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The destination CIDR to which the route applies. - :type address_prefix: str - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_09_01.models.RouteNextHopType - :param next_hop_ip_address: The IP address packets should be forwarded to. Next hop values are - only allowed in routes where the next hop type is VirtualAppliance. - :type next_hop_ip_address: str - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'next_hop_type': {'key': 'properties.nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'properties.nextHopIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Route, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.address_prefix = kwargs.get('address_prefix', None) - self.next_hop_type = kwargs.get('next_hop_type', None) - self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class RouteFilter(Resource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilter, self).__init__(**kwargs) - self.etag = None - self.rules = kwargs.get('rules', None) - self.peerings = kwargs.get('peerings', None) - self.provisioning_state = None - - -class RouteFilterListResult(msrest.serialization.Model): - """Response for the ListRouteFilters API service call. - - :param value: Gets a list of route filters in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.RouteFilter] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilter]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilterListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param location: Resource location. - :type location: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_09_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilterRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.etag = None - self.tags = kwargs.get('tags', None) - self.access = kwargs.get('access', None) - self.route_filter_rule_type = kwargs.get('route_filter_rule_type', None) - self.communities = kwargs.get('communities', None) - self.provisioning_state = None - - -class RouteFilterRuleListResult(msrest.serialization.Model): - """Response for the ListRouteFilterRules API service call. - - :param value: Gets a list of RouteFilterRules in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilterRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilterRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RouteListResult(msrest.serialization.Model): - """Response for the ListRoute API service call. - - :param value: Gets a list of routes in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Route] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Route]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RouteTable(Resource): - """Route table resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param routes: Collection of routes contained within a route table. - :type routes: list[~azure.mgmt.network.v2017_09_01.models.Route] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_09_01.models.Subnet] - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'routes': {'key': 'properties.routes', 'type': '[Route]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteTable, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.routes = kwargs.get('routes', None) - self.subnets = None - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class RouteTableListResult(msrest.serialization.Model): - """Response for the ListRouteTable API service call. - - :param value: Gets a list of route tables in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.RouteTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteTableListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class SecurityGroupNetworkInterface(msrest.serialization.Model): - """Network interface and all its associated security rules. - - :param id: ID of the network interface. - :type id: str - :param security_rule_associations: All security rules associated with the network interface. - :type security_rule_associations: - ~azure.mgmt.network.v2017_09_01.models.SecurityRuleAssociations - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rule_associations': {'key': 'securityRuleAssociations', 'type': 'SecurityRuleAssociations'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityGroupNetworkInterface, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.security_rule_associations = kwargs.get('security_rule_associations', None) - - -class SecurityGroupViewParameters(msrest.serialization.Model): - """Parameters that define the VM to check security groups for. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. ID of the target VM. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityGroupViewParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - - -class SecurityGroupViewResult(msrest.serialization.Model): - """The information about security rules applied to the specified VM. - - :param network_interfaces: List of network interfaces on the specified VM. - :type network_interfaces: - list[~azure.mgmt.network.v2017_09_01.models.SecurityGroupNetworkInterface] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityGroupViewResult, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) - - -class SecurityRule(SubResource): - """Network security rule. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param description: A description for this rule. Restricted to 140 chars. - :type description: str - :param protocol: Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and - '*'. Possible values include: "Tcp", "Udp", "*". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleProtocol - :param source_port_range: The source port or range. Integer or range between 0 and 65535. - Asterisk '*' can also be used to match all ports. - :type source_port_range: str - :param destination_port_range: The destination port or range. Integer or range between 0 and - 65535. Asterisk '*' can also be used to match all ports. - :type destination_port_range: str - :param source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to - match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - can also be used. If this is an ingress rule, specifies where network traffic originates from. - :type source_address_prefix: str - :param source_address_prefixes: The CIDR or source IP ranges. - :type source_address_prefixes: list[str] - :param source_application_security_groups: The application security group specified as source. - :type source_application_security_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] - :param destination_address_prefix: The destination address prefix. CIDR or destination IP - range. Asterisk '*' can also be used to match all source IPs. Default tags such as - 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - :type destination_address_prefix: str - :param destination_address_prefixes: The destination address prefixes. CIDR or destination IP - ranges. - :type destination_address_prefixes: list[str] - :param destination_application_security_groups: The application security group specified as - destination. - :type destination_application_security_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] - :param source_port_ranges: The source port ranges. - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. - :type destination_port_ranges: list[str] - :param access: The network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleAccess - :param priority: The priority of the rule. The value can be between 100 and 4096. The priority - number must be unique for each rule in the collection. The lower the priority number, the - higher the priority of the rule. - :type priority: int - :param direction: The direction of the rule. The direction specifies if rule will be evaluated - on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleDirection - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'source_port_range': {'key': 'properties.sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'properties.destinationPortRange', 'type': 'str'}, - 'source_address_prefix': {'key': 'properties.sourceAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'properties.sourceAddressPrefixes', 'type': '[str]'}, - 'source_application_security_groups': {'key': 'properties.sourceApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'destination_address_prefix': {'key': 'properties.destinationAddressPrefix', 'type': 'str'}, - 'destination_address_prefixes': {'key': 'properties.destinationAddressPrefixes', 'type': '[str]'}, - 'destination_application_security_groups': {'key': 'properties.destinationApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'priority': {'key': 'properties.priority', 'type': 'int'}, - 'direction': {'key': 'properties.direction', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.description = kwargs.get('description', None) - self.protocol = kwargs.get('protocol', None) - self.source_port_range = kwargs.get('source_port_range', None) - self.destination_port_range = kwargs.get('destination_port_range', None) - self.source_address_prefix = kwargs.get('source_address_prefix', None) - self.source_address_prefixes = kwargs.get('source_address_prefixes', None) - self.source_application_security_groups = kwargs.get('source_application_security_groups', None) - self.destination_address_prefix = kwargs.get('destination_address_prefix', None) - self.destination_address_prefixes = kwargs.get('destination_address_prefixes', None) - self.destination_application_security_groups = kwargs.get('destination_application_security_groups', None) - self.source_port_ranges = kwargs.get('source_port_ranges', None) - self.destination_port_ranges = kwargs.get('destination_port_ranges', None) - self.access = kwargs.get('access', None) - self.priority = kwargs.get('priority', None) - self.direction = kwargs.get('direction', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class SecurityRuleAssociations(msrest.serialization.Model): - """All security rules associated with the network interface. - - :param network_interface_association: Network interface and its custom security rules. - :type network_interface_association: - ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceAssociation - :param subnet_association: Network interface and its custom security rules. - :type subnet_association: ~azure.mgmt.network.v2017_09_01.models.SubnetAssociation - :param default_security_rules: Collection of default security rules of the network security - group. - :type default_security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - :param effective_security_rules: Collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityRule] - """ - - _attribute_map = { - 'network_interface_association': {'key': 'networkInterfaceAssociation', 'type': 'NetworkInterfaceAssociation'}, - 'subnet_association': {'key': 'subnetAssociation', 'type': 'SubnetAssociation'}, - 'default_security_rules': {'key': 'defaultSecurityRules', 'type': '[SecurityRule]'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityRuleAssociations, self).__init__(**kwargs) - self.network_interface_association = kwargs.get('network_interface_association', None) - self.subnet_association = kwargs.get('subnet_association', None) - self.default_security_rules = kwargs.get('default_security_rules', None) - self.effective_security_rules = kwargs.get('effective_security_rules', None) - - -class SecurityRuleListResult(msrest.serialization.Model): - """Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. - - :param value: The security rules in a network security group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ServiceEndpointPropertiesFormat(msrest.serialization.Model): - """The service endpoint properties. - - :param service: The type of the endpoint service. - :type service: str - :param locations: A list of locations. - :type locations: list[str] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'service': {'key': 'service', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceEndpointPropertiesFormat, self).__init__(**kwargs) - self.service = kwargs.get('service', None) - self.locations = kwargs.get('locations', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class Subnet(SubResource): - """Subnet in a virtual network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The address prefix for the subnet. - :type address_prefix: str - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup - :param route_table: The reference of the RouteTable resource. - :type route_table: ~azure.mgmt.network.v2017_09_01.models.RouteTable - :param service_endpoints: An array of service endpoints. - :type service_endpoints: - list[~azure.mgmt.network.v2017_09_01.models.ServiceEndpointPropertiesFormat] - :ivar ip_configurations: Gets an array of references to the network interface IP configurations - using subnet. - :vartype ip_configurations: list[~azure.mgmt.network.v2017_09_01.models.IPConfiguration] - :param resource_navigation_links: Gets an array of references to the external resources using - subnet. - :type resource_navigation_links: - list[~azure.mgmt.network.v2017_09_01.models.ResourceNavigationLink] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'ip_configurations': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, - 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, - 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Subnet, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.address_prefix = kwargs.get('address_prefix', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.route_table = kwargs.get('route_table', None) - self.service_endpoints = kwargs.get('service_endpoints', None) - self.ip_configurations = None - self.resource_navigation_links = kwargs.get('resource_navigation_links', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class SubnetAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Subnet ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(SubnetAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = kwargs.get('security_rules', None) - - -class SubnetListResult(msrest.serialization.Model): - """Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. - - :param value: The subnets in a virtual network. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Subnet] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Subnet]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SubnetListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class TagsObject(msrest.serialization.Model): - """Tags object for patch operations. - - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class Topology(msrest.serialization.Model): - """Topology of the specified resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: GUID representing the operation id. - :vartype id: str - :ivar created_date_time: The datetime when the topology was initially created for the resource - group. - :vartype created_date_time: ~datetime.datetime - :ivar last_modified: The datetime when the topology was last modified. - :vartype last_modified: ~datetime.datetime - :param resources: - :type resources: list[~azure.mgmt.network.v2017_09_01.models.TopologyResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'last_modified': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, - 'resources': {'key': 'resources', 'type': '[TopologyResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(Topology, self).__init__(**kwargs) - self.id = None - self.created_date_time = None - self.last_modified = None - self.resources = kwargs.get('resources', None) - - -class TopologyAssociation(msrest.serialization.Model): - """Resources that have an association with the parent resource. - - :param name: The name of the resource that is associated with the parent resource. - :type name: str - :param resource_id: The ID of the resource that is associated with the parent resource. - :type resource_id: str - :param association_type: The association type of the child resource to the parent resource. - Possible values include: "Associated", "Contains". - :type association_type: str or ~azure.mgmt.network.v2017_09_01.models.AssociationType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'association_type': {'key': 'associationType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TopologyAssociation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.resource_id = kwargs.get('resource_id', None) - self.association_type = kwargs.get('association_type', None) - - -class TopologyParameters(msrest.serialization.Model): - """Parameters that define the representation of topology. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_group_name: Required. The name of the target resource group to perform - topology on. - :type target_resource_group_name: str - """ - - _validation = { - 'target_resource_group_name': {'required': True}, - } - - _attribute_map = { - 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TopologyParameters, self).__init__(**kwargs) - self.target_resource_group_name = kwargs['target_resource_group_name'] - - -class TopologyResource(msrest.serialization.Model): - """The network resource topology information for the given resource group. - - :param name: Name of the resource. - :type name: str - :param id: ID of the resource. - :type id: str - :param location: Resource location. - :type location: str - :param associations: Holds the associations the resource has with other resources in the - resource group. - :type associations: list[~azure.mgmt.network.v2017_09_01.models.TopologyAssociation] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, - } - - def __init__( - self, - **kwargs - ): - super(TopologyResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - self.location = kwargs.get('location', None) - self.associations = kwargs.get('associations', None) - - -class TroubleshootingDetails(msrest.serialization.Model): - """Information gained from troubleshooting of specified resource. - - :param id: The id of the get troubleshoot operation. - :type id: str - :param reason_type: Reason type of failure. - :type reason_type: str - :param summary: A summary of troubleshooting. - :type summary: str - :param detail: Details on troubleshooting results. - :type detail: str - :param recommended_actions: List of recommended actions. - :type recommended_actions: - list[~azure.mgmt.network.v2017_09_01.models.TroubleshootingRecommendedActions] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'reason_type': {'key': 'reasonType', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': 'str'}, - 'detail': {'key': 'detail', 'type': 'str'}, - 'recommended_actions': {'key': 'recommendedActions', 'type': '[TroubleshootingRecommendedActions]'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingDetails, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.reason_type = kwargs.get('reason_type', None) - self.summary = kwargs.get('summary', None) - self.detail = kwargs.get('detail', None) - self.recommended_actions = kwargs.get('recommended_actions', None) - - -class TroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to troubleshoot. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource to troubleshoot. - :type target_resource_id: str - :param storage_id: Required. The ID for the storage account to save the troubleshoot result. - :type storage_id: str - :param storage_path: Required. The path to the blob to save the troubleshoot result in. - :type storage_path: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'storage_path': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'storage_path': {'key': 'properties.storagePath', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.storage_id = kwargs['storage_id'] - self.storage_path = kwargs['storage_path'] - - -class TroubleshootingRecommendedActions(msrest.serialization.Model): - """Recommended actions based on discovered issues. - - :param action_id: ID of the recommended action. - :type action_id: str - :param action_text: Description of recommended actions. - :type action_text: str - :param action_uri: The uri linking to a documentation for the recommended troubleshooting - actions. - :type action_uri: str - :param action_uri_text: The information from the URI for the recommended troubleshooting - actions. - :type action_uri_text: str - """ - - _attribute_map = { - 'action_id': {'key': 'actionId', 'type': 'str'}, - 'action_text': {'key': 'actionText', 'type': 'str'}, - 'action_uri': {'key': 'actionUri', 'type': 'str'}, - 'action_uri_text': {'key': 'actionUriText', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingRecommendedActions, self).__init__(**kwargs) - self.action_id = kwargs.get('action_id', None) - self.action_text = kwargs.get('action_text', None) - self.action_uri = kwargs.get('action_uri', None) - self.action_uri_text = kwargs.get('action_uri_text', None) - - -class TroubleshootingResult(msrest.serialization.Model): - """Troubleshooting information gained from specified resource. - - :param start_time: The start time of the troubleshooting. - :type start_time: ~datetime.datetime - :param end_time: The end time of the troubleshooting. - :type end_time: ~datetime.datetime - :param code: The result code of the troubleshooting. - :type code: str - :param results: Information from troubleshooting. - :type results: list[~azure.mgmt.network.v2017_09_01.models.TroubleshootingDetails] - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingResult, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.code = kwargs.get('code', None) - self.results = kwargs.get('results', None) - - -class TunnelConnectionHealth(msrest.serialization.Model): - """VirtualNetworkGatewayConnection properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar tunnel: Tunnel name. - :vartype tunnel: str - :ivar connection_status: Virtual network Gateway connection status. Possible values include: - "Unknown", "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionStatus - :ivar ingress_bytes_transferred: The Ingress Bytes Transferred in this connection. - :vartype ingress_bytes_transferred: long - :ivar egress_bytes_transferred: The Egress Bytes Transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar last_connection_established_utc_time: The time at which connection was established in Utc - format. - :vartype last_connection_established_utc_time: str - """ - - _validation = { - 'tunnel': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'last_connection_established_utc_time': {'readonly': True}, - } - - _attribute_map = { - 'tunnel': {'key': 'tunnel', 'type': 'str'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, - 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, - 'last_connection_established_utc_time': {'key': 'lastConnectionEstablishedUtcTime', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TunnelConnectionHealth, self).__init__(**kwargs) - self.tunnel = None - self.connection_status = None - self.ingress_bytes_transferred = None - self.egress_bytes_transferred = None - self.last_connection_established_utc_time = None - - -class Usage(msrest.serialization.Model): - """Describes network resource usage. - - 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. - - :ivar id: Resource identifier. - :vartype id: str - :param unit: Required. An enum describing the unit of measurement. Possible values include: - "Count". - :type unit: str or ~azure.mgmt.network.v2017_09_01.models.UsageUnit - :param current_value: Required. The current value of the usage. - :type current_value: long - :param limit: Required. The limit of usage. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.network.v2017_09_01.models.UsageName - """ - - _validation = { - 'id': {'readonly': True}, - 'unit': {'required': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - def __init__( - self, - **kwargs - ): - super(Usage, self).__init__(**kwargs) - self.id = None - self.unit = kwargs['unit'] - self.current_value = kwargs['current_value'] - self.limit = kwargs['limit'] - self.name = kwargs['name'] - - -class UsageName(msrest.serialization.Model): - """The usage names. - - :param value: A string describing the resource name. - :type value: str - :param localized_value: A localized string describing the resource name. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) - - -class UsagesListResult(msrest.serialization.Model): - """The list usages operation response. - - :param value: The list network resource usages. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Usage] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(UsagesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class VerificationIPFlowParameters(msrest.serialization.Model): - """Parameters that define the IP flow to be verified. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the target resource to perform next-hop on. - :type target_resource_id: str - :param direction: Required. The direction of the packet represented as a 5-tuple. Possible - values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_09_01.models.Direction - :param protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.Protocol - :param local_port: Required. The local port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type local_port: str - :param remote_port: Required. The remote port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type remote_port: str - :param local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 - addresses. - :type local_ip_address: str - :param remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 - addresses. - :type remote_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of them, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'direction': {'required': True}, - 'protocol': {'required': True}, - 'local_port': {'required': True}, - 'remote_port': {'required': True}, - 'local_ip_address': {'required': True}, - 'remote_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'direction': {'key': 'direction', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VerificationIPFlowParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.direction = kwargs['direction'] - self.protocol = kwargs['protocol'] - self.local_port = kwargs['local_port'] - self.remote_port = kwargs['remote_port'] - self.local_ip_address = kwargs['local_ip_address'] - self.remote_ip_address = kwargs['remote_ip_address'] - self.target_nic_resource_id = kwargs.get('target_nic_resource_id', None) - - -class VerificationIPFlowResult(msrest.serialization.Model): - """Results of IP flow verification on the target resource. - - :param access: Indicates whether the traffic is allowed or denied. Possible values include: - "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.Access - :param rule_name: Name of the rule. If input is not matched against any security rule, it is - not displayed. - :type rule_name: str - """ - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'rule_name': {'key': 'ruleName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VerificationIPFlowResult, self).__init__(**kwargs) - self.access = kwargs.get('access', None) - self.rule_name = kwargs.get('rule_name', None) - - -class VirtualNetwork(Resource): - """Virtual Network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_space: The AddressSpace that contains an array of IP address ranges that can be - used by subnets. - :type address_space: ~azure.mgmt.network.v2017_09_01.models.AddressSpace - :param dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs - deployed in the virtual network. - :type dhcp_options: ~azure.mgmt.network.v2017_09_01.models.DhcpOptions - :param subnets: A list of subnets in a Virtual Network. - :type subnets: list[~azure.mgmt.network.v2017_09_01.models.Subnet] - :param virtual_network_peerings: A list of peerings in a Virtual Network. - :type virtual_network_peerings: - list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering] - :param resource_guid: The resourceGuid property of the Virtual Network resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param enable_ddos_protection: Indicates if DDoS protection is enabled for all the protected - resources in a Virtual Network. - :type enable_ddos_protection: bool - :param enable_vm_protection: Indicates if Vm protection is enabled for all the subnets in a - Virtual Network. - :type enable_vm_protection: bool - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, - 'dhcp_options': {'key': 'properties.dhcpOptions', 'type': 'DhcpOptions'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'virtual_network_peerings': {'key': 'properties.virtualNetworkPeerings', 'type': '[VirtualNetworkPeering]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'enable_ddos_protection': {'key': 'properties.enableDdosProtection', 'type': 'bool'}, - 'enable_vm_protection': {'key': 'properties.enableVmProtection', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetwork, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.address_space = kwargs.get('address_space', None) - self.dhcp_options = kwargs.get('dhcp_options', None) - self.subnets = kwargs.get('subnets', None) - self.virtual_network_peerings = kwargs.get('virtual_network_peerings', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.enable_ddos_protection = kwargs.get('enable_ddos_protection', None) - self.enable_vm_protection = kwargs.get('enable_vm_protection', None) - - -class VirtualNetworkConnectionGatewayReference(msrest.serialization.Model): - """A reference to VirtualNetworkGateway or LocalNetworkGateway resource. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkConnectionGatewayReference, self).__init__(**kwargs) - self.id = kwargs['id'] - - -class VirtualNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param ip_configurations: IP configurations for virtual network gateway. - :type ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayIPConfiguration] - :param gateway_type: The type of this virtual network gateway. Possible values are: 'Vpn' and - 'ExpressRoute'. Possible values include: "Vpn", "ExpressRoute". - :type gateway_type: str or ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayType - :param vpn_type: The type of this virtual network gateway. Possible values are: 'PolicyBased' - and 'RouteBased'. Possible values include: "PolicyBased", "RouteBased". - :type vpn_type: str or ~azure.mgmt.network.v2017_09_01.models.VpnType - :param enable_bgp: Whether BGP is enabled for this virtual network gateway or not. - :type enable_bgp: bool - :param active: ActiveActive flag. - :type active: bool - :param gateway_default_site: The reference of the LocalNetworkGateway resource which represents - local network site having default routes. Assign Null value in case of removing existing - default site setting. - :type gateway_default_site: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param sku: The reference of the VirtualNetworkGatewaySku resource which represents the SKU - selected for Virtual network gateway. - :type sku: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewaySku - :param vpn_client_configuration: The reference of the VpnClientConfiguration resource which - represents the P2S VpnClient configurations. - :type vpn_client_configuration: ~azure.mgmt.network.v2017_09_01.models.VpnClientConfiguration - :param bgp_settings: Virtual network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_09_01.models.BgpSettings - :param resource_guid: The resource GUID property of the VirtualNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGateway resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualNetworkGatewayIPConfiguration]'}, - 'gateway_type': {'key': 'properties.gatewayType', 'type': 'str'}, - 'vpn_type': {'key': 'properties.vpnType', 'type': 'str'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'active': {'key': 'properties.activeActive', 'type': 'bool'}, - 'gateway_default_site': {'key': 'properties.gatewayDefaultSite', 'type': 'SubResource'}, - 'sku': {'key': 'properties.sku', 'type': 'VirtualNetworkGatewaySku'}, - 'vpn_client_configuration': {'key': 'properties.vpnClientConfiguration', 'type': 'VpnClientConfiguration'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGateway, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.gateway_type = kwargs.get('gateway_type', None) - self.vpn_type = kwargs.get('vpn_type', None) - self.enable_bgp = kwargs.get('enable_bgp', None) - self.active = kwargs.get('active', None) - self.gateway_default_site = kwargs.get('gateway_default_site', None) - self.sku = kwargs.get('sku', None) - self.vpn_client_configuration = kwargs.get('vpn_client_configuration', None) - self.bgp_settings = kwargs.get('bgp_settings', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayConnection(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: ~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_09_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_09_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkGateway'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkGateway'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'LocalNetworkGateway'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayConnection, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.authorization_key = kwargs.get('authorization_key', None) - self.virtual_network_gateway1 = kwargs['virtual_network_gateway1'] - self.virtual_network_gateway2 = kwargs.get('virtual_network_gateway2', None) - self.local_network_gateway2 = kwargs.get('local_network_gateway2', None) - self.connection_type = kwargs['connection_type'] - self.routing_weight = kwargs.get('routing_weight', None) - self.shared_key = kwargs.get('shared_key', None) - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = kwargs.get('peer', None) - self.enable_bgp = kwargs.get('enable_bgp', None) - self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) - self.ipsec_policies = kwargs.get('ipsec_policies', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListEntity(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkConnectionGatewayReference - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkConnectionGatewayReference - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkConnectionGatewayReference - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_09_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_09_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListEntity, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.authorization_key = kwargs.get('authorization_key', None) - self.virtual_network_gateway1 = kwargs['virtual_network_gateway1'] - self.virtual_network_gateway2 = kwargs.get('virtual_network_gateway2', None) - self.local_network_gateway2 = kwargs.get('local_network_gateway2', None) - self.connection_type = kwargs['connection_type'] - self.routing_weight = kwargs.get('routing_weight', None) - self.shared_key = kwargs.get('shared_key', None) - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = kwargs.get('peer', None) - self.enable_bgp = kwargs.get('enable_bgp', None) - self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) - self.ipsec_policies = kwargs.get('ipsec_policies', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGatewayConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnection] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnection]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class VirtualNetworkGatewayIPConfiguration(SubResource): - """IP configuration for virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.SubResource - :ivar provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayListConnectionsResult(msrest.serialization.Model): - """Response for the VirtualNetworkGatewayListConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: - list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionListEntity] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnectionListEntity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayListConnectionsResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class VirtualNetworkGatewayListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGateway resources that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class VirtualNetworkGatewaySku(msrest.serialization.Model): - """VirtualNetworkGatewaySku details. - - :param name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type name: str or ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewaySkuName - :param tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type tier: str or ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewaySkuTier - :param capacity: The capacity. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewaySku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - - -class VirtualNetworkListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworks API service call. - - :param value: Gets a list of VirtualNetwork resources in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetwork] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class VirtualNetworkListUsageResult(msrest.serialization.Model): - """Response for the virtual networks GetUsage API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: VirtualNetwork usage stats. - :vartype value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkUsage] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkListUsageResult, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class VirtualNetworkPeering(SubResource): - """Peerings in a virtual network resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allow_virtual_network_access: Whether the VMs in the linked virtual network space would - be able to access all the VMs in local Virtual network space. - :type allow_virtual_network_access: bool - :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the remote - virtual network will be allowed/disallowed. - :type allow_forwarded_traffic: bool - :param allow_gateway_transit: If gateway links can be used in remote virtual networking to link - to this virtual network. - :type allow_gateway_transit: bool - :param use_remote_gateways: If remote gateways can be used on this virtual network. If the flag - is set to true, and allowGatewayTransit on remote peering is also true, virtual network will - use gateways of remote virtual network for transit. Only one peering can have this flag set to - true. This flag cannot be set if virtual network already has a gateway. - :type use_remote_gateways: bool - :param remote_virtual_network: The reference of the remote virtual network. The remote virtual - network can be in the same or different region (preview). See here to register for the preview - and learn more - (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). - :type remote_virtual_network: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param remote_address_space: The reference of the remote virtual network address space. - :type remote_address_space: ~azure.mgmt.network.v2017_09_01.models.AddressSpace - :param peering_state: The status of the virtual network peering. Possible values are - 'Initiated', 'Connected', and 'Disconnected'. Possible values include: "Initiated", - "Connected", "Disconnected". - :type peering_state: str or ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeeringState - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, - 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, - 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, - 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, - 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, - 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, - 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkPeering, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.allow_virtual_network_access = kwargs.get('allow_virtual_network_access', None) - self.allow_forwarded_traffic = kwargs.get('allow_forwarded_traffic', None) - self.allow_gateway_transit = kwargs.get('allow_gateway_transit', None) - self.use_remote_gateways = kwargs.get('use_remote_gateways', None) - self.remote_virtual_network = kwargs.get('remote_virtual_network', None) - self.remote_address_space = kwargs.get('remote_address_space', None) - self.peering_state = kwargs.get('peering_state', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class VirtualNetworkPeeringListResult(msrest.serialization.Model): - """Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. - - :param value: The peerings in a virtual network. - :type value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkPeeringListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class VirtualNetworkUsage(msrest.serialization.Model): - """Usage details for subnet. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar current_value: Indicates number of IPs used from the Subnet. - :vartype current_value: float - :ivar id: Subnet identifier. - :vartype id: str - :ivar limit: Indicates the size of the subnet. - :vartype limit: float - :ivar name: The name containing common and localized value for usage. - :vartype name: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkUsageName - :ivar unit: Usage units. Returns 'Count'. - :vartype unit: str - """ - - _validation = { - 'current_value': {'readonly': True}, - 'id': {'readonly': True}, - 'limit': {'readonly': True}, - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'id': {'key': 'id', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'name': {'key': 'name', 'type': 'VirtualNetworkUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsage, self).__init__(**kwargs) - self.current_value = None - self.id = None - self.limit = None - self.name = None - self.unit = None - - -class VirtualNetworkUsageName(msrest.serialization.Model): - """Usage strings container. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar localized_value: Localized subnet size and usage string. - :vartype localized_value: str - :ivar value: Subnet size and usage string. - :vartype value: str - """ - - _validation = { - 'localized_value': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsageName, self).__init__(**kwargs) - self.localized_value = None - self.value = None - - -class VpnClientConfiguration(msrest.serialization.Model): - """VpnClientConfiguration for P2S client. - - :param vpn_client_address_pool: The reference of the address space resource which represents - Address space for P2S VpnClient. - :type vpn_client_address_pool: ~azure.mgmt.network.v2017_09_01.models.AddressSpace - :param vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. - :type vpn_client_root_certificates: - list[~azure.mgmt.network.v2017_09_01.models.VpnClientRootCertificate] - :param vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network - gateway. - :type vpn_client_revoked_certificates: - list[~azure.mgmt.network.v2017_09_01.models.VpnClientRevokedCertificate] - :param vpn_client_protocols: VpnClientProtocols for Virtual network gateway. - :type vpn_client_protocols: list[str or - ~azure.mgmt.network.v2017_09_01.models.VpnClientProtocol] - :param radius_server_address: The radius server address property of the VirtualNetworkGateway - resource for vpn client connection. - :type radius_server_address: str - :param radius_server_secret: The radius secret property of the VirtualNetworkGateway resource - for vpn client connection. - :type radius_server_secret: str - """ - - _attribute_map = { - 'vpn_client_address_pool': {'key': 'vpnClientAddressPool', 'type': 'AddressSpace'}, - 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, - 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, - 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, - 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, - 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientConfiguration, self).__init__(**kwargs) - self.vpn_client_address_pool = kwargs.get('vpn_client_address_pool', None) - self.vpn_client_root_certificates = kwargs.get('vpn_client_root_certificates', None) - self.vpn_client_revoked_certificates = kwargs.get('vpn_client_revoked_certificates', None) - self.vpn_client_protocols = kwargs.get('vpn_client_protocols', None) - self.radius_server_address = kwargs.get('radius_server_address', None) - self.radius_server_secret = kwargs.get('radius_server_secret', None) - - -class VpnClientParameters(msrest.serialization.Model): - """Vpn Client Parameters for package generation. - - :param processor_architecture: VPN client Processor Architecture. Possible values are: 'AMD64' - and 'X86'. Possible values include: "Amd64", "X86". - :type processor_architecture: str or - ~azure.mgmt.network.v2017_09_01.models.ProcessorArchitecture - :param authentication_method: VPN client Authentication Method. Possible values are: 'EAPTLS' - and 'EAPMSCHAPv2'. Possible values include: "EAPTLS", "EAPMSCHAPv2". - :type authentication_method: str or ~azure.mgmt.network.v2017_09_01.models.AuthenticationMethod - :param radius_server_auth_certificate: The public certificate data for the radius server - authentication certificate as a Base-64 encoded string. Required only if external radius - authentication has been configured with EAPTLS authentication. - :type radius_server_auth_certificate: str - :param client_root_certificates: A list of client root certificates public certificate data - encoded as Base-64 strings. Optional parameter for external radius based authentication with - EAPTLS. - :type client_root_certificates: list[str] - """ - - _attribute_map = { - 'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'}, - 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, - 'radius_server_auth_certificate': {'key': 'radiusServerAuthCertificate', 'type': 'str'}, - 'client_root_certificates': {'key': 'clientRootCertificates', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientParameters, self).__init__(**kwargs) - self.processor_architecture = kwargs.get('processor_architecture', None) - self.authentication_method = kwargs.get('authentication_method', None) - self.radius_server_auth_certificate = kwargs.get('radius_server_auth_certificate', None) - self.client_root_certificates = kwargs.get('client_root_certificates', None) - - -class VpnClientRevokedCertificate(SubResource): - """VPN client revoked certificate of virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param thumbprint: The revoked VPN client certificate thumbprint. - :type thumbprint: str - :ivar provisioning_state: The provisioning state of the VPN client revoked certificate - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientRevokedCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.provisioning_state = None - - -class VpnClientRootCertificate(SubResource): - """VPN client root certificate of virtual network gateway. - - 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 id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param public_cert_data: Required. The certificate public data. - :type public_cert_data: str - :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'public_cert_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientRootCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.public_cert_data = kwargs['public_cert_data'] - self.provisioning_state = None - - -class VpnDeviceScriptParameters(msrest.serialization.Model): - """Vpn device configuration script generation parameters. - - :param vendor: The vendor for the vpn device. - :type vendor: str - :param device_family: The device family for the vpn device. - :type device_family: str - :param firmware_version: The firmware version for the vpn device. - :type firmware_version: str - """ - - _attribute_map = { - 'vendor': {'key': 'vendor', 'type': 'str'}, - 'device_family': {'key': 'deviceFamily', 'type': 'str'}, - 'firmware_version': {'key': 'firmwareVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnDeviceScriptParameters, self).__init__(**kwargs) - self.vendor = kwargs.get('vendor', None) - self.device_family = kwargs.get('device_family', None) - self.firmware_version = kwargs.get('firmware_version', None) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_models_py3.py deleted file mode 100644 index 5ad0ea241d7d..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_models_py3.py +++ /dev/null @@ -1,9654 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Dict, List, Optional, Union - -import msrest.serialization - -from ._network_management_client_enums import * - - -class AddressSpace(msrest.serialization.Model): - """AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. - - :param address_prefixes: A list of address blocks reserved for this virtual network in CIDR - notation. - :type address_prefixes: list[str] - """ - - _attribute_map = { - 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, - } - - def __init__( - self, - *, - address_prefixes: Optional[List[str]] = None, - **kwargs - ): - super(AddressSpace, self).__init__(**kwargs) - self.address_prefixes = address_prefixes - - -class Resource(msrest.serialization.Model): - """Common resource representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ApplicationGateway(Resource): - """Application gateway resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param sku: SKU of the application gateway resource. - :type sku: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySku - :param ssl_policy: SSL policy of the application gateway resource. - :type ssl_policy: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPolicy - :ivar operational_state: Operational state of the application gateway resource. Possible values - include: "Stopped", "Starting", "Running", "Stopping". - :vartype operational_state: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayOperationalState - :param gateway_ip_configurations: Subnets of application the gateway resource. - :type gateway_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayIPConfiguration] - :param authentication_certificates: Authentication certificates of the application gateway - resource. - :type authentication_certificates: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayAuthenticationCertificate] - :param ssl_certificates: SSL certificates of the application gateway resource. - :type ssl_certificates: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslCertificate] - :param frontend_ip_configurations: Frontend IP addresses of the application gateway resource. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFrontendIPConfiguration] - :param frontend_ports: Frontend ports of the application gateway resource. - :type frontend_ports: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFrontendPort] - :param probes: Probes of the application gateway resource. - :type probes: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProbe] - :param backend_address_pools: Backend address pool of the application gateway resource. - :type backend_address_pools: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendAddressPool] - :param backend_http_settings_collection: Backend http settings of the application gateway - resource. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHttpSettings] - :param http_listeners: Http listeners of the application gateway resource. - :type http_listeners: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayHttpListener] - :param url_path_maps: URL path map of the application gateway resource. - :type url_path_maps: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayUrlPathMap] - :param request_routing_rules: Request routing rules of the application gateway resource. - :type request_routing_rules: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayRequestRoutingRule] - :param redirect_configurations: Redirect configurations of the application gateway resource. - :type redirect_configurations: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayRedirectConfiguration] - :param web_application_firewall_configuration: Web application firewall configuration. - :type web_application_firewall_configuration: - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayWebApplicationFirewallConfiguration - :param resource_guid: Resource GUID property of the application gateway resource. - :type resource_guid: str - :param provisioning_state: Provisioning state of the application gateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'operational_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'ApplicationGatewaySku'}, - 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, - 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, - 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, - 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, - 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, - 'probes': {'key': 'properties.probes', 'type': '[ApplicationGatewayProbe]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'backend_http_settings_collection': {'key': 'properties.backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHttpSettings]'}, - 'http_listeners': {'key': 'properties.httpListeners', 'type': '[ApplicationGatewayHttpListener]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[ApplicationGatewayUrlPathMap]'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[ApplicationGatewayRequestRoutingRule]'}, - 'redirect_configurations': {'key': 'properties.redirectConfigurations', 'type': '[ApplicationGatewayRedirectConfiguration]'}, - 'web_application_firewall_configuration': {'key': 'properties.webApplicationFirewallConfiguration', 'type': 'ApplicationGatewayWebApplicationFirewallConfiguration'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - sku: Optional["ApplicationGatewaySku"] = None, - ssl_policy: Optional["ApplicationGatewaySslPolicy"] = None, - gateway_ip_configurations: Optional[List["ApplicationGatewayIPConfiguration"]] = None, - authentication_certificates: Optional[List["ApplicationGatewayAuthenticationCertificate"]] = None, - ssl_certificates: Optional[List["ApplicationGatewaySslCertificate"]] = None, - frontend_ip_configurations: Optional[List["ApplicationGatewayFrontendIPConfiguration"]] = None, - frontend_ports: Optional[List["ApplicationGatewayFrontendPort"]] = None, - probes: Optional[List["ApplicationGatewayProbe"]] = None, - backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, - backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHttpSettings"]] = None, - http_listeners: Optional[List["ApplicationGatewayHttpListener"]] = None, - url_path_maps: Optional[List["ApplicationGatewayUrlPathMap"]] = None, - request_routing_rules: Optional[List["ApplicationGatewayRequestRoutingRule"]] = None, - redirect_configurations: Optional[List["ApplicationGatewayRedirectConfiguration"]] = None, - web_application_firewall_configuration: Optional["ApplicationGatewayWebApplicationFirewallConfiguration"] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.sku = sku - self.ssl_policy = ssl_policy - self.operational_state = None - self.gateway_ip_configurations = gateway_ip_configurations - self.authentication_certificates = authentication_certificates - self.ssl_certificates = ssl_certificates - self.frontend_ip_configurations = frontend_ip_configurations - self.frontend_ports = frontend_ports - self.probes = probes - self.backend_address_pools = backend_address_pools - self.backend_http_settings_collection = backend_http_settings_collection - self.http_listeners = http_listeners - self.url_path_maps = url_path_maps - self.request_routing_rules = request_routing_rules - self.redirect_configurations = redirect_configurations - self.web_application_firewall_configuration = web_application_firewall_configuration - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class SubResource(msrest.serialization.Model): - """Reference to another subresource. - - :param id: Resource ID. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - super(SubResource, self).__init__(**kwargs) - self.id = id - - -class ApplicationGatewayAuthenticationCertificate(SubResource): - """Authentication certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Certificate public data. - :type data: str - :param provisioning_state: Provisioning state of the authentication certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - data: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayAuthenticationCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.data = data - self.provisioning_state = provisioning_state - - -class ApplicationGatewayAvailableSslOptions(Resource): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param predefined_policies: List of available Ssl predefined policy. - :type predefined_policies: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param default_policy: Name of the Ssl predefined policy applied by default to application - gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", - "AppGwSslPolicy20170401S". - :type default_policy: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPolicyName - :param available_cipher_suites: List of available Ssl cipher suites. - :type available_cipher_suites: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslCipherSuite] - :param available_protocols: List of available Ssl protocols. - :type available_protocols: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslProtocol] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'predefined_policies': {'key': 'properties.predefinedPolicies', 'type': '[SubResource]'}, - 'default_policy': {'key': 'properties.defaultPolicy', 'type': 'str'}, - 'available_cipher_suites': {'key': 'properties.availableCipherSuites', 'type': '[str]'}, - 'available_protocols': {'key': 'properties.availableProtocols', 'type': '[str]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - predefined_policies: Optional[List["SubResource"]] = None, - default_policy: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, - available_cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, - available_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, - **kwargs - ): - super(ApplicationGatewayAvailableSslOptions, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.predefined_policies = predefined_policies - self.default_policy = default_policy - self.available_cipher_suites = available_cipher_suites - self.available_protocols = available_protocols - - -class ApplicationGatewayAvailableSslPredefinedPolicies(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - :param value: List of available Ssl predefined policy. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPredefinedPolicy] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewaySslPredefinedPolicy]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationGatewaySslPredefinedPolicy"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayAvailableSslPredefinedPolicies, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApplicationGatewayAvailableWafRuleSetsResult(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableWafRuleSets API service call. - - :param value: The list of application gateway rule sets. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallRuleSet] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationGatewayFirewallRuleSet"]] = None, - **kwargs - ): - super(ApplicationGatewayAvailableWafRuleSetsResult, self).__init__(**kwargs) - self.value = value - - -class ApplicationGatewayBackendAddress(msrest.serialization.Model): - """Backend address of an application gateway. - - :param fqdn: Fully qualified domain name (FQDN). - :type fqdn: str - :param ip_address: IP address. - :type ip_address: str - """ - - _attribute_map = { - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__( - self, - *, - fqdn: Optional[str] = None, - ip_address: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayBackendAddress, self).__init__(**kwargs) - self.fqdn = fqdn - self.ip_address = ip_address - - -class ApplicationGatewayBackendAddressPool(SubResource): - """Backend Address Pool of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Resource that is unique within a resource group. This name can be used to access - the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param backend_ip_configurations: Collection of references to IPs defined in network - interfaces. - :type backend_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration] - :param backend_addresses: Backend addresses. - :type backend_addresses: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendAddress] - :param provisioning_state: Provisioning state of the backend address pool resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'backend_addresses': {'key': 'properties.backendAddresses', 'type': '[ApplicationGatewayBackendAddress]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - backend_ip_configurations: Optional[List["NetworkInterfaceIPConfiguration"]] = None, - backend_addresses: Optional[List["ApplicationGatewayBackendAddress"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayBackendAddressPool, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.backend_ip_configurations = backend_ip_configurations - self.backend_addresses = backend_addresses - self.provisioning_state = provisioning_state - - -class ApplicationGatewayBackendHealth(msrest.serialization.Model): - """List of ApplicationGatewayBackendHealthPool resources. - - :param backend_address_pools: - :type backend_address_pools: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealthPool] - """ - - _attribute_map = { - 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, - } - - def __init__( - self, - *, - backend_address_pools: Optional[List["ApplicationGatewayBackendHealthPool"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealth, self).__init__(**kwargs) - self.backend_address_pools = backend_address_pools - - -class ApplicationGatewayBackendHealthHttpSettings(msrest.serialization.Model): - """Application gateway BackendHealthHttp settings. - - :param backend_http_settings: Reference of an ApplicationGatewayBackendHttpSettings resource. - :type backend_http_settings: - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHttpSettings - :param servers: List of ApplicationGatewayBackendHealthServer resources. - :type servers: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealthServer] - """ - - _attribute_map = { - 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'ApplicationGatewayBackendHttpSettings'}, - 'servers': {'key': 'servers', 'type': '[ApplicationGatewayBackendHealthServer]'}, - } - - def __init__( - self, - *, - backend_http_settings: Optional["ApplicationGatewayBackendHttpSettings"] = None, - servers: Optional[List["ApplicationGatewayBackendHealthServer"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealthHttpSettings, self).__init__(**kwargs) - self.backend_http_settings = backend_http_settings - self.servers = servers - - -class ApplicationGatewayBackendHealthPool(msrest.serialization.Model): - """Application gateway BackendHealth pool. - - :param backend_address_pool: Reference of an ApplicationGatewayBackendAddressPool resource. - :type backend_address_pool: - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendAddressPool - :param backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings - resources. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealthHttpSettings] - """ - - _attribute_map = { - 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, - 'backend_http_settings_collection': {'key': 'backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHealthHttpSettings]'}, - } - - def __init__( - self, - *, - backend_address_pool: Optional["ApplicationGatewayBackendAddressPool"] = None, - backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHealthHttpSettings"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealthPool, self).__init__(**kwargs) - self.backend_address_pool = backend_address_pool - self.backend_http_settings_collection = backend_http_settings_collection - - -class ApplicationGatewayBackendHealthServer(msrest.serialization.Model): - """Application gateway backendhealth http settings. - - :param address: IP address or FQDN of backend server. - :type address: str - :param ip_configuration: Reference of IP configuration of backend server. - :type ip_configuration: ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration - :param health: Health of backend server. Possible values include: "Unknown", "Up", "Down", - "Partial", "Draining". - :type health: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealthServerHealth - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'health': {'key': 'health', 'type': 'str'}, - } - - def __init__( - self, - *, - address: Optional[str] = None, - ip_configuration: Optional["NetworkInterfaceIPConfiguration"] = None, - health: Optional[Union[str, "ApplicationGatewayBackendHealthServerHealth"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealthServer, self).__init__(**kwargs) - self.address = address - self.ip_configuration = ip_configuration - self.health = health - - -class ApplicationGatewayBackendHttpSettings(SubResource): - """Backend address pool settings of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Port. - :type port: int - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProtocol - :param cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", - "Disabled". - :type cookie_based_affinity: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayCookieBasedAffinity - :param request_timeout: Request timeout in seconds. Application Gateway will fail the request - if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 - seconds. - :type request_timeout: int - :param probe: Probe resource of an application gateway. - :type probe: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param authentication_certificates: Array of references to application gateway authentication - certificates. - :type authentication_certificates: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param connection_draining: Connection draining of the backend http settings resource. - :type connection_draining: - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayConnectionDraining - :param host_name: Host header to be sent to the backend servers. - :type host_name: str - :param pick_host_name_from_backend_address: Whether to pick host header should be picked from - the host name of the backend server. Default value is false. - :type pick_host_name_from_backend_address: bool - :param affinity_cookie_name: Cookie name to use for the affinity cookie. - :type affinity_cookie_name: str - :param probe_enabled: Whether the probe is enabled. Default value is false. - :type probe_enabled: bool - :param path: Path which should be used as a prefix for all HTTP requests. Null means no path - will be prefixed. Default value is null. - :type path: str - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'cookie_based_affinity': {'key': 'properties.cookieBasedAffinity', 'type': 'str'}, - 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, - 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, - 'affinity_cookie_name': {'key': 'properties.affinityCookieName', 'type': 'str'}, - 'probe_enabled': {'key': 'properties.probeEnabled', 'type': 'bool'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - port: Optional[int] = None, - protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, - cookie_based_affinity: Optional[Union[str, "ApplicationGatewayCookieBasedAffinity"]] = None, - request_timeout: Optional[int] = None, - probe: Optional["SubResource"] = None, - authentication_certificates: Optional[List["SubResource"]] = None, - connection_draining: Optional["ApplicationGatewayConnectionDraining"] = None, - host_name: Optional[str] = None, - pick_host_name_from_backend_address: Optional[bool] = None, - affinity_cookie_name: Optional[str] = None, - probe_enabled: Optional[bool] = None, - path: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayBackendHttpSettings, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.port = port - self.protocol = protocol - self.cookie_based_affinity = cookie_based_affinity - self.request_timeout = request_timeout - self.probe = probe - self.authentication_certificates = authentication_certificates - self.connection_draining = connection_draining - self.host_name = host_name - self.pick_host_name_from_backend_address = pick_host_name_from_backend_address - self.affinity_cookie_name = affinity_cookie_name - self.probe_enabled = probe_enabled - self.path = path - self.provisioning_state = provisioning_state - - -class ApplicationGatewayConnectionDraining(msrest.serialization.Model): - """Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether connection draining is enabled or not. - :type enabled: bool - :param drain_timeout_in_sec: Required. The number of seconds connection draining is active. - Acceptable values are from 1 second to 3600 seconds. - :type drain_timeout_in_sec: int - """ - - _validation = { - 'enabled': {'required': True}, - 'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'}, - } - - def __init__( - self, - *, - enabled: bool, - drain_timeout_in_sec: int, - **kwargs - ): - super(ApplicationGatewayConnectionDraining, self).__init__(**kwargs) - self.enabled = enabled - self.drain_timeout_in_sec = drain_timeout_in_sec - - -class ApplicationGatewayFirewallDisabledRuleGroup(msrest.serialization.Model): - """Allows to disable rules within a rule group or an entire rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the rule group that will be disabled. - :type rule_group_name: str - :param rules: The list of rules that will be disabled. If null, all rules of the rule group - will be disabled. - :type rules: list[int] - """ - - _validation = { - 'rule_group_name': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[int]'}, - } - - def __init__( - self, - *, - rule_group_name: str, - rules: Optional[List[int]] = None, - **kwargs - ): - super(ApplicationGatewayFirewallDisabledRuleGroup, self).__init__(**kwargs) - self.rule_group_name = rule_group_name - self.rules = rules - - -class ApplicationGatewayFirewallRule(msrest.serialization.Model): - """A web application firewall rule. - - All required parameters must be populated in order to send to Azure. - - :param rule_id: Required. The identifier of the web application firewall rule. - :type rule_id: int - :param description: The description of the web application firewall rule. - :type description: str - """ - - _validation = { - 'rule_id': {'required': True}, - } - - _attribute_map = { - 'rule_id': {'key': 'ruleId', 'type': 'int'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - rule_id: int, - description: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFirewallRule, self).__init__(**kwargs) - self.rule_id = rule_id - self.description = description - - -class ApplicationGatewayFirewallRuleGroup(msrest.serialization.Model): - """A web application firewall rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the web application firewall rule group. - :type rule_group_name: str - :param description: The description of the web application firewall rule group. - :type description: str - :param rules: Required. The rules of the web application firewall rule group. - :type rules: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallRule] - """ - - _validation = { - 'rule_group_name': {'required': True}, - 'rules': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[ApplicationGatewayFirewallRule]'}, - } - - def __init__( - self, - *, - rule_group_name: str, - rules: List["ApplicationGatewayFirewallRule"], - description: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFirewallRuleGroup, self).__init__(**kwargs) - self.rule_group_name = rule_group_name - self.description = description - self.rules = rules - - -class ApplicationGatewayFirewallRuleSet(Resource): - """A web application firewall rule set. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the web application firewall rule set. - :type provisioning_state: str - :param rule_set_type: The type of the web application firewall rule set. - :type rule_set_type: str - :param rule_set_version: The version of the web application firewall rule set type. - :type rule_set_version: str - :param rule_groups: The rule groups of the web application firewall rule set. - :type rule_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallRuleGroup] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, - 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ApplicationGatewayFirewallRuleGroup]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - provisioning_state: Optional[str] = None, - rule_set_type: Optional[str] = None, - rule_set_version: Optional[str] = None, - rule_groups: Optional[List["ApplicationGatewayFirewallRuleGroup"]] = None, - **kwargs - ): - super(ApplicationGatewayFirewallRuleSet, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.provisioning_state = provisioning_state - self.rule_set_type = rule_set_type - self.rule_set_version = rule_set_version - self.rule_groups = rule_groups - - -class ApplicationGatewayFrontendIPConfiguration(SubResource): - """Frontend IP configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param private_ip_address: PrivateIPAddress of the network interface IP Configuration. - :type private_ip_address: str - :param private_ip_allocation_method: PrivateIP allocation method. Possible values include: - "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param subnet: Reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param public_ip_address: Reference of the PublicIP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Provisioning state of the public IP resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["SubResource"] = None, - public_ip_address: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFrontendIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class ApplicationGatewayFrontendPort(SubResource): - """Frontend port of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Frontend port. - :type port: int - :param provisioning_state: Provisioning state of the frontend port resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - port: Optional[int] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFrontendPort, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.port = port - self.provisioning_state = provisioning_state - - -class ApplicationGatewayHttpListener(SubResource): - """Http listener of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param frontend_ip_configuration: Frontend IP configuration resource of an application gateway. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param frontend_port: Frontend port resource of an application gateway. - :type frontend_port: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProtocol - :param host_name: Host name of HTTP listener. - :type host_name: str - :param ssl_certificate: SSL certificate resource of an application gateway. - :type ssl_certificate: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param require_server_name_indication: Applicable only if protocol is https. Enables SNI for - multi-hosting. - :type require_server_name_indication: bool - :param provisioning_state: Provisioning state of the HTTP listener resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, - 'require_server_name_indication': {'key': 'properties.requireServerNameIndication', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - frontend_port: Optional["SubResource"] = None, - protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, - host_name: Optional[str] = None, - ssl_certificate: Optional["SubResource"] = None, - require_server_name_indication: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayHttpListener, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.frontend_ip_configuration = frontend_ip_configuration - self.frontend_port = frontend_port - self.protocol = protocol - self.host_name = host_name - self.ssl_certificate = ssl_certificate - self.require_server_name_indication = require_server_name_indication - self.provisioning_state = provisioning_state - - -class ApplicationGatewayIPConfiguration(SubResource): - """IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param subnet: Reference of the subnet resource. A subnet from where application gateway gets - its private address. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Provisioning state of the application gateway subnet resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - subnet: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.subnet = subnet - self.provisioning_state = provisioning_state - - -class ApplicationGatewayListResult(msrest.serialization.Model): - """Response for ListApplicationGateways API service call. - - :param value: List of an application gateways in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGateway] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationGateway"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApplicationGatewayPathRule(SubResource): - """Path rule of URL path map of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param paths: Path rules of URL path map. - :type paths: list[str] - :param backend_address_pool: Backend address pool resource of URL path map path rule. - :type backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param backend_http_settings: Backend http settings resource of URL path map path rule. - :type backend_http_settings: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of URL path map path rule. - :type redirect_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Path rule of URL path map resource. Possible values are: 'Updating', - 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'paths': {'key': 'properties.paths', 'type': '[str]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - paths: Optional[List[str]] = None, - backend_address_pool: Optional["SubResource"] = None, - backend_http_settings: Optional["SubResource"] = None, - redirect_configuration: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayPathRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.paths = paths - self.backend_address_pool = backend_address_pool - self.backend_http_settings = backend_http_settings - self.redirect_configuration = redirect_configuration - self.provisioning_state = provisioning_state - - -class ApplicationGatewayProbe(SubResource): - """Probe of the application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProtocol - :param host: Host name to send the probe to. - :type host: str - :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. - :type path: str - :param interval: The probing interval in seconds. This is the time interval between two - consecutive probes. Acceptable values are from 1 second to 86400 seconds. - :type interval: int - :param timeout: the probe timeout in seconds. Probe marked as failed if valid response is not - received with this timeout period. Acceptable values are from 1 second to 86400 seconds. - :type timeout: int - :param unhealthy_threshold: The probe retry count. Backend server is marked down after - consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second - to 20. - :type unhealthy_threshold: int - :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from - the backend http settings. Default value is false. - :type pick_host_name_from_backend_http_settings: bool - :param min_servers: Minimum number of servers that are always marked healthy. Default value is - 0. - :type min_servers: int - :param match: Criterion for classifying a healthy probe response. - :type match: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayProbeHealthResponseMatch - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host': {'key': 'properties.host', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'timeout': {'key': 'properties.timeout', 'type': 'int'}, - 'unhealthy_threshold': {'key': 'properties.unhealthyThreshold', 'type': 'int'}, - 'pick_host_name_from_backend_http_settings': {'key': 'properties.pickHostNameFromBackendHttpSettings', 'type': 'bool'}, - 'min_servers': {'key': 'properties.minServers', 'type': 'int'}, - 'match': {'key': 'properties.match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, - host: Optional[str] = None, - path: Optional[str] = None, - interval: Optional[int] = None, - timeout: Optional[int] = None, - unhealthy_threshold: Optional[int] = None, - pick_host_name_from_backend_http_settings: Optional[bool] = None, - min_servers: Optional[int] = None, - match: Optional["ApplicationGatewayProbeHealthResponseMatch"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayProbe, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.protocol = protocol - self.host = host - self.path = path - self.interval = interval - self.timeout = timeout - self.unhealthy_threshold = unhealthy_threshold - self.pick_host_name_from_backend_http_settings = pick_host_name_from_backend_http_settings - self.min_servers = min_servers - self.match = match - self.provisioning_state = provisioning_state - - -class ApplicationGatewayProbeHealthResponseMatch(msrest.serialization.Model): - """Application gateway probe health response match. - - :param body: Body that must be contained in the health response. Default value is empty. - :type body: str - :param status_codes: Allowed ranges of healthy status codes. Default range of healthy status - codes is 200-399. - :type status_codes: list[str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'status_codes': {'key': 'statusCodes', 'type': '[str]'}, - } - - def __init__( - self, - *, - body: Optional[str] = None, - status_codes: Optional[List[str]] = None, - **kwargs - ): - super(ApplicationGatewayProbeHealthResponseMatch, self).__init__(**kwargs) - self.body = body - self.status_codes = status_codes - - -class ApplicationGatewayRedirectConfiguration(SubResource): - """Redirect configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param redirect_type: Supported http redirection types - Permanent, Temporary, Found, SeeOther. - Possible values include: "Permanent", "Found", "SeeOther", "Temporary". - :type redirect_type: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayRedirectType - :param target_listener: Reference to a listener to redirect the request to. - :type target_listener: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param target_url: Url to redirect the request to. - :type target_url: str - :param include_path: Include path in the redirected url. - :type include_path: bool - :param include_query_string: Include query string in the redirected url. - :type include_query_string: bool - :param request_routing_rules: Request routing specifying redirect configuration. - :type request_routing_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param url_path_maps: Url path maps specifying default redirect configuration. - :type url_path_maps: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param path_rules: Path rules specifying redirect configuration. - :type path_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'redirect_type': {'key': 'properties.redirectType', 'type': 'str'}, - 'target_listener': {'key': 'properties.targetListener', 'type': 'SubResource'}, - 'target_url': {'key': 'properties.targetUrl', 'type': 'str'}, - 'include_path': {'key': 'properties.includePath', 'type': 'bool'}, - 'include_query_string': {'key': 'properties.includeQueryString', 'type': 'bool'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[SubResource]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[SubResource]'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[SubResource]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - redirect_type: Optional[Union[str, "ApplicationGatewayRedirectType"]] = None, - target_listener: Optional["SubResource"] = None, - target_url: Optional[str] = None, - include_path: Optional[bool] = None, - include_query_string: Optional[bool] = None, - request_routing_rules: Optional[List["SubResource"]] = None, - url_path_maps: Optional[List["SubResource"]] = None, - path_rules: Optional[List["SubResource"]] = None, - **kwargs - ): - super(ApplicationGatewayRedirectConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.redirect_type = redirect_type - self.target_listener = target_listener - self.target_url = target_url - self.include_path = include_path - self.include_query_string = include_query_string - self.request_routing_rules = request_routing_rules - self.url_path_maps = url_path_maps - self.path_rules = path_rules - - -class ApplicationGatewayRequestRoutingRule(SubResource): - """Request routing rule of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". - :type rule_type: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayRequestRoutingRuleType - :param backend_address_pool: Backend address pool resource of the application gateway. - :type backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param backend_http_settings: Frontend port resource of the application gateway. - :type backend_http_settings: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param http_listener: Http listener resource of the application gateway. - :type http_listener: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param url_path_map: URL path map resource of the application gateway. - :type url_path_map: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of the application gateway. - :type redirect_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Provisioning state of the request routing rule resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'http_listener': {'key': 'properties.httpListener', 'type': 'SubResource'}, - 'url_path_map': {'key': 'properties.urlPathMap', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - rule_type: Optional[Union[str, "ApplicationGatewayRequestRoutingRuleType"]] = None, - backend_address_pool: Optional["SubResource"] = None, - backend_http_settings: Optional["SubResource"] = None, - http_listener: Optional["SubResource"] = None, - url_path_map: Optional["SubResource"] = None, - redirect_configuration: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayRequestRoutingRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.rule_type = rule_type - self.backend_address_pool = backend_address_pool - self.backend_http_settings = backend_http_settings - self.http_listener = http_listener - self.url_path_map = url_path_map - self.redirect_configuration = redirect_configuration - self.provisioning_state = provisioning_state - - -class ApplicationGatewaySku(msrest.serialization.Model): - """SKU of an application gateway. - - :param name: Name of an application gateway SKU. Possible values include: "Standard_Small", - "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large". - :type name: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySkuName - :param tier: Tier of an application gateway. Possible values include: "Standard", "WAF". - :type tier: str or ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayTier - :param capacity: Capacity (instance count) of an application gateway. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "ApplicationGatewaySkuName"]] = None, - tier: Optional[Union[str, "ApplicationGatewayTier"]] = None, - capacity: Optional[int] = None, - **kwargs - ): - super(ApplicationGatewaySku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - - -class ApplicationGatewaySslCertificate(SubResource): - """SSL certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Base-64 encoded pfx certificate. Only applicable in PUT Request. - :type data: str - :param password: Password for the pfx file specified in data. Only applicable in PUT request. - :type password: str - :param public_cert_data: Base-64 encoded Public cert data corresponding to pfx specified in - data. Only applicable in GET request. - :type public_cert_data: str - :param provisioning_state: Provisioning state of the SSL certificate resource Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - data: Optional[str] = None, - password: Optional[str] = None, - public_cert_data: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewaySslCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.data = data - self.password = password - self.public_cert_data = public_cert_data - self.provisioning_state = provisioning_state - - -class ApplicationGatewaySslPolicy(msrest.serialization.Model): - """Application Gateway Ssl policy. - - :param disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. - :type disabled_ssl_protocols: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslProtocol] - :param policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". - :type policy_type: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPolicyType - :param policy_name: Name of Ssl predefined policy. Possible values include: - "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". - :type policy_name: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPolicyName - :param cipher_suites: Ssl cipher suites to be enabled in the specified order to application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'cipher_suites': {'key': 'cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - disabled_ssl_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, - policy_type: Optional[Union[str, "ApplicationGatewaySslPolicyType"]] = None, - policy_name: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, - cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, - min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, - **kwargs - ): - super(ApplicationGatewaySslPolicy, self).__init__(**kwargs) - self.disabled_ssl_protocols = disabled_ssl_protocols - self.policy_type = policy_type - self.policy_name = policy_name - self.cipher_suites = cipher_suites - self.min_protocol_version = min_protocol_version - - -class ApplicationGatewaySslPredefinedPolicy(SubResource): - """An Ssl predefined policy. - - :param id: Resource ID. - :type id: str - :param name: Name of Ssl predefined policy. - :type name: str - :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, - min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, - **kwargs - ): - super(ApplicationGatewaySslPredefinedPolicy, self).__init__(id=id, **kwargs) - self.name = name - self.cipher_suites = cipher_suites - self.min_protocol_version = min_protocol_version - - -class ApplicationGatewayUrlPathMap(SubResource): - """UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param default_backend_address_pool: Default backend address pool resource of URL path map. - :type default_backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param default_backend_http_settings: Default backend http settings resource of URL path map. - :type default_backend_http_settings: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param default_redirect_configuration: Default redirect configuration resource of URL path map. - :type default_redirect_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param path_rules: Path rule of URL path map resource. - :type path_rules: list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayPathRule] - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_backend_address_pool': {'key': 'properties.defaultBackendAddressPool', 'type': 'SubResource'}, - 'default_backend_http_settings': {'key': 'properties.defaultBackendHttpSettings', 'type': 'SubResource'}, - 'default_redirect_configuration': {'key': 'properties.defaultRedirectConfiguration', 'type': 'SubResource'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[ApplicationGatewayPathRule]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - default_backend_address_pool: Optional["SubResource"] = None, - default_backend_http_settings: Optional["SubResource"] = None, - default_redirect_configuration: Optional["SubResource"] = None, - path_rules: Optional[List["ApplicationGatewayPathRule"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayUrlPathMap, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.default_backend_address_pool = default_backend_address_pool - self.default_backend_http_settings = default_backend_http_settings - self.default_redirect_configuration = default_redirect_configuration - self.path_rules = path_rules - self.provisioning_state = provisioning_state - - -class ApplicationGatewayWebApplicationFirewallConfiguration(msrest.serialization.Model): - """Application gateway web application firewall configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the web application firewall is enabled or not. - :type enabled: bool - :param firewall_mode: Required. Web application firewall mode. Possible values include: - "Detection", "Prevention". - :type firewall_mode: str or - ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallMode - :param rule_set_type: Required. The type of the web application firewall rule set. Possible - values are: 'OWASP'. - :type rule_set_type: str - :param rule_set_version: Required. The version of the rule set type. - :type rule_set_version: str - :param disabled_rule_groups: The disabled rule groups. - :type disabled_rule_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayFirewallDisabledRuleGroup] - """ - - _validation = { - 'enabled': {'required': True}, - 'firewall_mode': {'required': True}, - 'rule_set_type': {'required': True}, - 'rule_set_version': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, - 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, - 'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'}, - } - - def __init__( - self, - *, - enabled: bool, - firewall_mode: Union[str, "ApplicationGatewayFirewallMode"], - rule_set_type: str, - rule_set_version: str, - disabled_rule_groups: Optional[List["ApplicationGatewayFirewallDisabledRuleGroup"]] = None, - **kwargs - ): - super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs) - self.enabled = enabled - self.firewall_mode = firewall_mode - self.rule_set_type = rule_set_type - self.rule_set_version = rule_set_version - self.disabled_rule_groups = disabled_rule_groups - - -class ApplicationSecurityGroup(Resource): - """An application security group in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar resource_guid: The resource GUID property of the application security group resource. It - uniquely identifies a resource, even if the user changes its name or migrate the resource - across subscriptions or resource groups. - :vartype resource_guid: str - :ivar provisioning_state: The provisioning state of the application security group resource. - Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'resource_guid': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(ApplicationSecurityGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = None - self.resource_guid = None - self.provisioning_state = None - - -class ApplicationSecurityGroupListResult(msrest.serialization.Model): - """A list of application security groups. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of application security groups. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationSecurityGroup"]] = None, - **kwargs - ): - super(ApplicationSecurityGroupListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class AuthorizationListResult(msrest.serialization.Model): - """Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. - - :param value: The authorizations in an ExpressRoute Circuit. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitAuthorization"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(AuthorizationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Availability(msrest.serialization.Model): - """Availability of the metric. - - :param time_grain: The time grain of the availability. - :type time_grain: str - :param retention: The retention of the availability. - :type retention: str - :param blob_duration: Duration of the availability blob. - :type blob_duration: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - *, - time_grain: Optional[str] = None, - retention: Optional[str] = None, - blob_duration: Optional[str] = None, - **kwargs - ): - super(Availability, self).__init__(**kwargs) - self.time_grain = time_grain - self.retention = retention - self.blob_duration = blob_duration - - -class AvailableProvidersList(msrest.serialization.Model): - """List of available countries with details. - - All required parameters must be populated in order to send to Azure. - - :param countries: Required. List of available countries. - :type countries: list[~azure.mgmt.network.v2017_09_01.models.AvailableProvidersListCountry] - """ - - _validation = { - 'countries': {'required': True}, - } - - _attribute_map = { - 'countries': {'key': 'countries', 'type': '[AvailableProvidersListCountry]'}, - } - - def __init__( - self, - *, - countries: List["AvailableProvidersListCountry"], - **kwargs - ): - super(AvailableProvidersList, self).__init__(**kwargs) - self.countries = countries - - -class AvailableProvidersListCity(msrest.serialization.Model): - """City or town details. - - :param city_name: The city or town name. - :type city_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - """ - - _attribute_map = { - 'city_name': {'key': 'cityName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - } - - def __init__( - self, - *, - city_name: Optional[str] = None, - providers: Optional[List[str]] = None, - **kwargs - ): - super(AvailableProvidersListCity, self).__init__(**kwargs) - self.city_name = city_name - self.providers = providers - - -class AvailableProvidersListCountry(msrest.serialization.Model): - """Country details. - - :param country_name: The country name. - :type country_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - :param states: List of available states in the country. - :type states: list[~azure.mgmt.network.v2017_09_01.models.AvailableProvidersListState] - """ - - _attribute_map = { - 'country_name': {'key': 'countryName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'states': {'key': 'states', 'type': '[AvailableProvidersListState]'}, - } - - def __init__( - self, - *, - country_name: Optional[str] = None, - providers: Optional[List[str]] = None, - states: Optional[List["AvailableProvidersListState"]] = None, - **kwargs - ): - super(AvailableProvidersListCountry, self).__init__(**kwargs) - self.country_name = country_name - self.providers = providers - self.states = states - - -class AvailableProvidersListParameters(msrest.serialization.Model): - """Constraints that determine the list of available Internet service providers. - - :param azure_locations: A list of Azure regions. - :type azure_locations: list[str] - :param country: The country for available providers list. - :type country: str - :param state: The state for available providers list. - :type state: str - :param city: The city or town for available providers list. - :type city: str - """ - - _attribute_map = { - 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, - 'country': {'key': 'country', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - } - - def __init__( - self, - *, - azure_locations: Optional[List[str]] = None, - country: Optional[str] = None, - state: Optional[str] = None, - city: Optional[str] = None, - **kwargs - ): - super(AvailableProvidersListParameters, self).__init__(**kwargs) - self.azure_locations = azure_locations - self.country = country - self.state = state - self.city = city - - -class AvailableProvidersListState(msrest.serialization.Model): - """State details. - - :param state_name: The state name. - :type state_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - :param cities: List of available cities or towns in the state. - :type cities: list[~azure.mgmt.network.v2017_09_01.models.AvailableProvidersListCity] - """ - - _attribute_map = { - 'state_name': {'key': 'stateName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'cities': {'key': 'cities', 'type': '[AvailableProvidersListCity]'}, - } - - def __init__( - self, - *, - state_name: Optional[str] = None, - providers: Optional[List[str]] = None, - cities: Optional[List["AvailableProvidersListCity"]] = None, - **kwargs - ): - super(AvailableProvidersListState, self).__init__(**kwargs) - self.state_name = state_name - self.providers = providers - self.cities = cities - - -class AzureAsyncOperationResult(msrest.serialization.Model): - """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. - - :param status: Status of the Azure async operation. Possible values are: 'InProgress', - 'Succeeded', and 'Failed'. Possible values include: "InProgress", "Succeeded", "Failed". - :type status: str or ~azure.mgmt.network.v2017_09_01.models.NetworkOperationStatus - :param error: - :type error: ~azure.mgmt.network.v2017_09_01.models.Error - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'Error'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "NetworkOperationStatus"]] = None, - error: Optional["Error"] = None, - **kwargs - ): - super(AzureAsyncOperationResult, self).__init__(**kwargs) - self.status = status - self.error = error - - -class AzureReachabilityReport(msrest.serialization.Model): - """Azure reachability report details. - - All required parameters must be populated in order to send to Azure. - - :param aggregation_level: Required. The aggregation level of Azure reachability report. Can be - Country, State or City. - :type aggregation_level: str - :param provider_location: Required. Parameters that define a geographic location. - :type provider_location: ~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportLocation - :param reachability_report: Required. List of Azure reachability report items. - :type reachability_report: - list[~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportItem] - """ - - _validation = { - 'aggregation_level': {'required': True}, - 'provider_location': {'required': True}, - 'reachability_report': {'required': True}, - } - - _attribute_map = { - 'aggregation_level': {'key': 'aggregationLevel', 'type': 'str'}, - 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, - 'reachability_report': {'key': 'reachabilityReport', 'type': '[AzureReachabilityReportItem]'}, - } - - def __init__( - self, - *, - aggregation_level: str, - provider_location: "AzureReachabilityReportLocation", - reachability_report: List["AzureReachabilityReportItem"], - **kwargs - ): - super(AzureReachabilityReport, self).__init__(**kwargs) - self.aggregation_level = aggregation_level - self.provider_location = provider_location - self.reachability_report = reachability_report - - -class AzureReachabilityReportItem(msrest.serialization.Model): - """Azure reachability report details for a given provider location. - - :param provider: The Internet service provider. - :type provider: str - :param azure_location: The Azure region. - :type azure_location: str - :param latencies: List of latency details for each of the time series. - :type latencies: - list[~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportLatencyInfo] - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'azure_location': {'key': 'azureLocation', 'type': 'str'}, - 'latencies': {'key': 'latencies', 'type': '[AzureReachabilityReportLatencyInfo]'}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - azure_location: Optional[str] = None, - latencies: Optional[List["AzureReachabilityReportLatencyInfo"]] = None, - **kwargs - ): - super(AzureReachabilityReportItem, self).__init__(**kwargs) - self.provider = provider - self.azure_location = azure_location - self.latencies = latencies - - -class AzureReachabilityReportLatencyInfo(msrest.serialization.Model): - """Details on latency for a time series. - - :param time_stamp: The time stamp. - :type time_stamp: ~datetime.datetime - :param score: The relative latency score between 1 and 100, higher values indicating a faster - connection. - :type score: int - """ - - _validation = { - 'score': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, - 'score': {'key': 'score', 'type': 'int'}, - } - - def __init__( - self, - *, - time_stamp: Optional[datetime.datetime] = None, - score: Optional[int] = None, - **kwargs - ): - super(AzureReachabilityReportLatencyInfo, self).__init__(**kwargs) - self.time_stamp = time_stamp - self.score = score - - -class AzureReachabilityReportLocation(msrest.serialization.Model): - """Parameters that define a geographic location. - - All required parameters must be populated in order to send to Azure. - - :param country: Required. The name of the country. - :type country: str - :param state: The name of the state. - :type state: str - :param city: The name of the city or town. - :type city: str - """ - - _validation = { - 'country': {'required': True}, - } - - _attribute_map = { - 'country': {'key': 'country', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - } - - def __init__( - self, - *, - country: str, - state: Optional[str] = None, - city: Optional[str] = None, - **kwargs - ): - super(AzureReachabilityReportLocation, self).__init__(**kwargs) - self.country = country - self.state = state - self.city = city - - -class AzureReachabilityReportParameters(msrest.serialization.Model): - """Geographic and time constraints for Azure reachability report. - - All required parameters must be populated in order to send to Azure. - - :param provider_location: Required. Parameters that define a geographic location. - :type provider_location: ~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportLocation - :param providers: List of Internet service providers. - :type providers: list[str] - :param azure_locations: Optional Azure regions to scope the query to. - :type azure_locations: list[str] - :param start_time: Required. The start time for the Azure reachability report. - :type start_time: ~datetime.datetime - :param end_time: Required. The end time for the Azure reachability report. - :type end_time: ~datetime.datetime - """ - - _validation = { - 'provider_location': {'required': True}, - 'start_time': {'required': True}, - 'end_time': {'required': True}, - } - - _attribute_map = { - 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - provider_location: "AzureReachabilityReportLocation", - start_time: datetime.datetime, - end_time: datetime.datetime, - providers: Optional[List[str]] = None, - azure_locations: Optional[List[str]] = None, - **kwargs - ): - super(AzureReachabilityReportParameters, self).__init__(**kwargs) - self.provider_location = provider_location - self.providers = providers - self.azure_locations = azure_locations - self.start_time = start_time - self.end_time = end_time - - -class BackendAddressPool(SubResource): - """Pool of backend IP addresses. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar backend_ip_configurations: Gets collection of references to IP addresses defined in - network interfaces. - :vartype backend_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration] - :ivar load_balancing_rules: Gets load balancing rules that use this backend address pool. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :ivar outbound_nat_rule: Gets outbound rules that use this backend address pool. - :vartype outbound_nat_rule: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Get provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configurations': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - 'outbound_nat_rule': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'outbound_nat_rule': {'key': 'properties.outboundNatRule', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(BackendAddressPool, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.backend_ip_configurations = None - self.load_balancing_rules = None - self.outbound_nat_rule = None - self.provisioning_state = provisioning_state - - -class BGPCommunity(msrest.serialization.Model): - """Contains bgp community information offered in Service Community resources. - - :param service_supported_region: The region which the service support. e.g. For O365, region is - Global. - :type service_supported_region: str - :param community_name: The name of the bgp community. e.g. Skype. - :type community_name: str - :param community_value: The value of the bgp community. For more information: - https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - :type community_value: str - :param community_prefixes: The prefixes that the bgp community contains. - :type community_prefixes: list[str] - :param is_authorized_to_use: Customer is authorized to use bgp community or not. - :type is_authorized_to_use: bool - :param service_group: The service group of the bgp community contains. - :type service_group: str - """ - - _attribute_map = { - 'service_supported_region': {'key': 'serviceSupportedRegion', 'type': 'str'}, - 'community_name': {'key': 'communityName', 'type': 'str'}, - 'community_value': {'key': 'communityValue', 'type': 'str'}, - 'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'}, - 'is_authorized_to_use': {'key': 'isAuthorizedToUse', 'type': 'bool'}, - 'service_group': {'key': 'serviceGroup', 'type': 'str'}, - } - - def __init__( - self, - *, - service_supported_region: Optional[str] = None, - community_name: Optional[str] = None, - community_value: Optional[str] = None, - community_prefixes: Optional[List[str]] = None, - is_authorized_to_use: Optional[bool] = None, - service_group: Optional[str] = None, - **kwargs - ): - super(BGPCommunity, self).__init__(**kwargs) - self.service_supported_region = service_supported_region - self.community_name = community_name - self.community_value = community_value - self.community_prefixes = community_prefixes - self.is_authorized_to_use = is_authorized_to_use - self.service_group = service_group - - -class BgpPeerStatus(msrest.serialization.Model): - """BGP peer status details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The virtual network gateway's local address. - :vartype local_address: str - :ivar neighbor: The remote BGP peer. - :vartype neighbor: str - :ivar asn: The autonomous system number of the remote BGP peer. - :vartype asn: int - :ivar state: The BGP peer state. Possible values include: "Unknown", "Stopped", "Idle", - "Connecting", "Connected". - :vartype state: str or ~azure.mgmt.network.v2017_09_01.models.BgpPeerState - :ivar connected_duration: For how long the peering has been up. - :vartype connected_duration: str - :ivar routes_received: The number of routes learned from this peer. - :vartype routes_received: long - :ivar messages_sent: The number of BGP messages sent. - :vartype messages_sent: long - :ivar messages_received: The number of BGP messages received. - :vartype messages_received: long - """ - - _validation = { - 'local_address': {'readonly': True}, - 'neighbor': {'readonly': True}, - 'asn': {'readonly': True}, - 'state': {'readonly': True}, - 'connected_duration': {'readonly': True}, - 'routes_received': {'readonly': True}, - 'messages_sent': {'readonly': True}, - 'messages_received': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'asn': {'key': 'asn', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'str'}, - 'connected_duration': {'key': 'connectedDuration', 'type': 'str'}, - 'routes_received': {'key': 'routesReceived', 'type': 'long'}, - 'messages_sent': {'key': 'messagesSent', 'type': 'long'}, - 'messages_received': {'key': 'messagesReceived', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpPeerStatus, self).__init__(**kwargs) - self.local_address = None - self.neighbor = None - self.asn = None - self.state = None - self.connected_duration = None - self.routes_received = None - self.messages_sent = None - self.messages_received = None - - -class BgpPeerStatusListResult(msrest.serialization.Model): - """Response for list BGP peer status API service call. - - :param value: List of BGP peers. - :type value: list[~azure.mgmt.network.v2017_09_01.models.BgpPeerStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, - } - - def __init__( - self, - *, - value: Optional[List["BgpPeerStatus"]] = None, - **kwargs - ): - super(BgpPeerStatusListResult, self).__init__(**kwargs) - self.value = value - - -class BgpServiceCommunity(Resource): - """Service Community Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param service_name: The name of the bgp community. e.g. Skype. - :type service_name: str - :param bgp_communities: Get a list of bgp communities. - :type bgp_communities: list[~azure.mgmt.network.v2017_09_01.models.BGPCommunity] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, - 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': '[BGPCommunity]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - service_name: Optional[str] = None, - bgp_communities: Optional[List["BGPCommunity"]] = None, - **kwargs - ): - super(BgpServiceCommunity, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.service_name = service_name - self.bgp_communities = bgp_communities - - -class BgpServiceCommunityListResult(msrest.serialization.Model): - """Response for the ListServiceCommunity API service call. - - :param value: A list of service community resources. - :type value: list[~azure.mgmt.network.v2017_09_01.models.BgpServiceCommunity] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["BgpServiceCommunity"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(BgpServiceCommunityListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class BgpSettings(msrest.serialization.Model): - """BGP settings details. - - :param asn: The BGP speaker's ASN. - :type asn: long - :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. - :type bgp_peering_address: str - :param peer_weight: The weight added to routes learned from this BGP speaker. - :type peer_weight: int - """ - - _attribute_map = { - 'asn': {'key': 'asn', 'type': 'long'}, - 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, - 'peer_weight': {'key': 'peerWeight', 'type': 'int'}, - } - - def __init__( - self, - *, - asn: Optional[int] = None, - bgp_peering_address: Optional[str] = None, - peer_weight: Optional[int] = None, - **kwargs - ): - super(BgpSettings, self).__init__(**kwargs) - self.asn = asn - self.bgp_peering_address = bgp_peering_address - self.peer_weight = peer_weight - - -class ConnectionResetSharedKey(msrest.serialization.Model): - """The virtual network connection reset shared key. - - All required parameters must be populated in order to send to Azure. - - :param key_length: Required. The virtual network connection reset shared key length, should - between 1 and 128. - :type key_length: int - """ - - _validation = { - 'key_length': {'required': True, 'maximum': 128, 'minimum': 1}, - } - - _attribute_map = { - 'key_length': {'key': 'keyLength', 'type': 'int'}, - } - - def __init__( - self, - *, - key_length: int, - **kwargs - ): - super(ConnectionResetSharedKey, self).__init__(**kwargs) - self.key_length = key_length - - -class ConnectionSharedKey(msrest.serialization.Model): - """Response for GetConnectionSharedKey API service call. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. The virtual network connection shared key value. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - value: str, - **kwargs - ): - super(ConnectionSharedKey, self).__init__(**kwargs) - self.value = value - - -class ConnectivityDestination(msrest.serialization.Model): - """Parameters that define destination of connection. - - :param resource_id: The ID of the resource to which a connection attempt will be made. - :type resource_id: str - :param address: The IP address or URI the resource to which a connection attempt will be made. - :type address: str - :param port: Port on which check connectivity will be performed. - :type port: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - resource_id: Optional[str] = None, - address: Optional[str] = None, - port: Optional[int] = None, - **kwargs - ): - super(ConnectivityDestination, self).__init__(**kwargs) - self.resource_id = resource_id - self.address = address - self.port = port - - -class ConnectivityHop(msrest.serialization.Model): - """Information about a hop between the source and the destination. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the hop. - :vartype type: str - :ivar id: The ID of the hop. - :vartype id: str - :ivar address: The IP address of the hop. - :vartype address: str - :ivar resource_id: The ID of the resource corresponding to this hop. - :vartype resource_id: str - :ivar next_hop_ids: List of next hop identifiers. - :vartype next_hop_ids: list[str] - :ivar issues: List of issues. - :vartype issues: list[~azure.mgmt.network.v2017_09_01.models.ConnectivityIssue] - """ - - _validation = { - 'type': {'readonly': True}, - 'id': {'readonly': True}, - 'address': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'next_hop_ids': {'readonly': True}, - 'issues': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, - 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityHop, self).__init__(**kwargs) - self.type = None - self.id = None - self.address = None - self.resource_id = None - self.next_hop_ids = None - self.issues = None - - -class ConnectivityInformation(msrest.serialization.Model): - """Information on the connectivity status. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hops: List of hops between the source and the destination. - :vartype hops: list[~azure.mgmt.network.v2017_09_01.models.ConnectivityHop] - :ivar connection_status: The connection status. Possible values include: "Unknown", - "Connected", "Disconnected", "Degraded". - :vartype connection_status: str or ~azure.mgmt.network.v2017_09_01.models.ConnectionStatus - :ivar avg_latency_in_ms: Average latency in milliseconds. - :vartype avg_latency_in_ms: int - :ivar min_latency_in_ms: Minimum latency in milliseconds. - :vartype min_latency_in_ms: int - :ivar max_latency_in_ms: Maximum latency in milliseconds. - :vartype max_latency_in_ms: int - :ivar probes_sent: Total number of probes sent. - :vartype probes_sent: int - :ivar probes_failed: Number of failed probes. - :vartype probes_failed: int - """ - - _validation = { - 'hops': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'avg_latency_in_ms': {'readonly': True}, - 'min_latency_in_ms': {'readonly': True}, - 'max_latency_in_ms': {'readonly': True}, - 'probes_sent': {'readonly': True}, - 'probes_failed': {'readonly': True}, - } - - _attribute_map = { - 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'int'}, - 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'int'}, - 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'int'}, - 'probes_sent': {'key': 'probesSent', 'type': 'int'}, - 'probes_failed': {'key': 'probesFailed', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityInformation, self).__init__(**kwargs) - self.hops = None - self.connection_status = None - self.avg_latency_in_ms = None - self.min_latency_in_ms = None - self.max_latency_in_ms = None - self.probes_sent = None - self.probes_failed = None - - -class ConnectivityIssue(msrest.serialization.Model): - """Information about an issue encountered in the process of checking for connectivity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". - :vartype origin: str or ~azure.mgmt.network.v2017_09_01.models.Origin - :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". - :vartype severity: str or ~azure.mgmt.network.v2017_09_01.models.Severity - :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", - "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", - "PortThrottled", "Platform". - :vartype type: str or ~azure.mgmt.network.v2017_09_01.models.IssueType - :ivar context: Provides additional context on the issue. - :vartype context: list[dict[str, str]] - """ - - _validation = { - 'origin': {'readonly': True}, - 'severity': {'readonly': True}, - 'type': {'readonly': True}, - 'context': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'context': {'key': 'context', 'type': '[{str}]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityIssue, self).__init__(**kwargs) - self.origin = None - self.severity = None - self.type = None - self.context = None - - -class ConnectivityParameters(msrest.serialization.Model): - """Parameters that determine how the connectivity check will be performed. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Parameters that define the source of the connection. - :type source: ~azure.mgmt.network.v2017_09_01.models.ConnectivitySource - :param destination: Required. Parameters that define destination of connection. - :type destination: ~azure.mgmt.network.v2017_09_01.models.ConnectivityDestination - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectivitySource'}, - 'destination': {'key': 'destination', 'type': 'ConnectivityDestination'}, - } - - def __init__( - self, - *, - source: "ConnectivitySource", - destination: "ConnectivityDestination", - **kwargs - ): - super(ConnectivityParameters, self).__init__(**kwargs) - self.source = source - self.destination = destination - - -class ConnectivitySource(msrest.serialization.Model): - """Parameters that define the source of the connection. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The ID of the resource from which a connectivity check will be - initiated. - :type resource_id: str - :param port: The source port from which a connectivity check will be performed. - :type port: int - """ - - _validation = { - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - resource_id: str, - port: Optional[int] = None, - **kwargs - ): - super(ConnectivitySource, self).__init__(**kwargs) - self.resource_id = resource_id - self.port = port - - -class DhcpOptions(msrest.serialization.Model): - """DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. - - :param dns_servers: The list of DNS servers IP addresses. - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__( - self, - *, - dns_servers: Optional[List[str]] = None, - **kwargs - ): - super(DhcpOptions, self).__init__(**kwargs) - self.dns_servers = dns_servers - - -class Dimension(msrest.serialization.Model): - """Dimension of the metric. - - :param name: The name of the dimension. - :type name: str - :param display_name: The display name of the dimension. - :type display_name: str - :param internal_name: The internal name of the dimension. - :type internal_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - internal_name: Optional[str] = None, - **kwargs - ): - super(Dimension, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.internal_name = internal_name - - -class DnsNameAvailabilityResult(msrest.serialization.Model): - """Response for the CheckDnsNameAvailability API service call. - - :param available: Domain availability (True/False). - :type available: bool - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - } - - def __init__( - self, - *, - available: Optional[bool] = None, - **kwargs - ): - super(DnsNameAvailabilityResult, self).__init__(**kwargs) - self.available = available - - -class EffectiveNetworkSecurityGroup(msrest.serialization.Model): - """Effective network security group. - - :param network_security_group: The ID of network security group that is applied. - :type network_security_group: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param association: Associated resources. - :type association: - ~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityGroupAssociation - :param effective_security_rules: A collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityRule] - :param tag_map: Mapping of tags to list of IP Addresses included within the tag. - :type tag_map: str - """ - - _attribute_map = { - 'network_security_group': {'key': 'networkSecurityGroup', 'type': 'SubResource'}, - 'association': {'key': 'association', 'type': 'EffectiveNetworkSecurityGroupAssociation'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - 'tag_map': {'key': 'tagMap', 'type': 'str'}, - } - - def __init__( - self, - *, - network_security_group: Optional["SubResource"] = None, - association: Optional["EffectiveNetworkSecurityGroupAssociation"] = None, - effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, - tag_map: Optional[str] = None, - **kwargs - ): - super(EffectiveNetworkSecurityGroup, self).__init__(**kwargs) - self.network_security_group = network_security_group - self.association = association - self.effective_security_rules = effective_security_rules - self.tag_map = tag_map - - -class EffectiveNetworkSecurityGroupAssociation(msrest.serialization.Model): - """The effective network security group association. - - :param subnet: The ID of the subnet if assigned. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param network_interface: The ID of the network interface if assigned. - :type network_interface: ~azure.mgmt.network.v2017_09_01.models.SubResource - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'SubResource'}, - 'network_interface': {'key': 'networkInterface', 'type': 'SubResource'}, - } - - def __init__( - self, - *, - subnet: Optional["SubResource"] = None, - network_interface: Optional["SubResource"] = None, - **kwargs - ): - super(EffectiveNetworkSecurityGroupAssociation, self).__init__(**kwargs) - self.subnet = subnet - self.network_interface = network_interface - - -class EffectiveNetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for list effective network security groups API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective network security groups. - :type value: list[~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["EffectiveNetworkSecurityGroup"]] = None, - **kwargs - ): - super(EffectiveNetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class EffectiveNetworkSecurityRule(msrest.serialization.Model): - """Effective network security rules. - - :param name: The name of the security rule specified by the user (if created by the user). - :type name: str - :param protocol: The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', - and 'All'. Possible values include: "Tcp", "Udp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.EffectiveSecurityRuleProtocol - :param source_port_range: The source port or range. - :type source_port_range: str - :param destination_port_range: The destination port or range. - :type destination_port_range: str - :param source_port_ranges: The source port ranges. Expected values include a single integer - between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. Expected values include a single - integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type destination_port_ranges: list[str] - :param source_address_prefix: The source address prefix. - :type source_address_prefix: str - :param destination_address_prefix: The destination address prefix. - :type destination_address_prefix: str - :param source_address_prefixes: The source address prefixes. Expected values include CIDR IP - ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the - asterisk (*). - :type source_address_prefixes: list[str] - :param destination_address_prefixes: The destination address prefixes. Expected values include - CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and - the asterisk (*). - :type destination_address_prefixes: list[str] - :param expanded_source_address_prefix: The expanded source address prefix. - :type expanded_source_address_prefix: list[str] - :param expanded_destination_address_prefix: Expanded destination address prefix. - :type expanded_destination_address_prefix: list[str] - :param access: Whether network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleAccess - :param priority: The priority of the rule. - :type priority: int - :param direction: The direction of the rule. Possible values are: 'Inbound and Outbound'. - Possible values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleDirection - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, - 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[str]'}, - 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, - 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'sourceAddressPrefixes', 'type': '[str]'}, - 'destination_address_prefixes': {'key': 'destinationAddressPrefixes', 'type': '[str]'}, - 'expanded_source_address_prefix': {'key': 'expandedSourceAddressPrefix', 'type': '[str]'}, - 'expanded_destination_address_prefix': {'key': 'expandedDestinationAddressPrefix', 'type': '[str]'}, - 'access': {'key': 'access', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'direction': {'key': 'direction', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - protocol: Optional[Union[str, "EffectiveSecurityRuleProtocol"]] = None, - source_port_range: Optional[str] = None, - destination_port_range: Optional[str] = None, - source_port_ranges: Optional[List[str]] = None, - destination_port_ranges: Optional[List[str]] = None, - source_address_prefix: Optional[str] = None, - destination_address_prefix: Optional[str] = None, - source_address_prefixes: Optional[List[str]] = None, - destination_address_prefixes: Optional[List[str]] = None, - expanded_source_address_prefix: Optional[List[str]] = None, - expanded_destination_address_prefix: Optional[List[str]] = None, - access: Optional[Union[str, "SecurityRuleAccess"]] = None, - priority: Optional[int] = None, - direction: Optional[Union[str, "SecurityRuleDirection"]] = None, - **kwargs - ): - super(EffectiveNetworkSecurityRule, self).__init__(**kwargs) - self.name = name - self.protocol = protocol - self.source_port_range = source_port_range - self.destination_port_range = destination_port_range - self.source_port_ranges = source_port_ranges - self.destination_port_ranges = destination_port_ranges - self.source_address_prefix = source_address_prefix - self.destination_address_prefix = destination_address_prefix - self.source_address_prefixes = source_address_prefixes - self.destination_address_prefixes = destination_address_prefixes - self.expanded_source_address_prefix = expanded_source_address_prefix - self.expanded_destination_address_prefix = expanded_destination_address_prefix - self.access = access - self.priority = priority - self.direction = direction - - -class EffectiveRoute(msrest.serialization.Model): - """Effective Route. - - :param name: The name of the user defined route. This is optional. - :type name: str - :param source: Who created the route. Possible values are: 'Unknown', 'User', - 'VirtualNetworkGateway', and 'Default'. Possible values include: "Unknown", "User", - "VirtualNetworkGateway", "Default". - :type source: str or ~azure.mgmt.network.v2017_09_01.models.EffectiveRouteSource - :param state: The value of effective route. Possible values are: 'Active' and 'Invalid'. - Possible values include: "Active", "Invalid". - :type state: str or ~azure.mgmt.network.v2017_09_01.models.EffectiveRouteState - :param address_prefix: The address prefixes of the effective routes in CIDR notation. - :type address_prefix: list[str] - :param next_hop_ip_address: The IP address of the next hop of the effective route. - :type next_hop_ip_address: list[str] - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_09_01.models.RouteNextHopType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address_prefix': {'key': 'addressPrefix', 'type': '[str]'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': '[str]'}, - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - source: Optional[Union[str, "EffectiveRouteSource"]] = None, - state: Optional[Union[str, "EffectiveRouteState"]] = None, - address_prefix: Optional[List[str]] = None, - next_hop_ip_address: Optional[List[str]] = None, - next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, - **kwargs - ): - super(EffectiveRoute, self).__init__(**kwargs) - self.name = name - self.source = source - self.state = state - self.address_prefix = address_prefix - self.next_hop_ip_address = next_hop_ip_address - self.next_hop_type = next_hop_type - - -class EffectiveRouteListResult(msrest.serialization.Model): - """Response for list effective route API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective routes. - :type value: list[~azure.mgmt.network.v2017_09_01.models.EffectiveRoute] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveRoute]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["EffectiveRoute"]] = None, - **kwargs - ): - super(EffectiveRouteListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class EndpointServiceResult(SubResource): - """Endpoint service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Name of the endpoint service. - :vartype name: str - :ivar type: Type of the endpoint service. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - super(EndpointServiceResult, self).__init__(id=id, **kwargs) - self.name = None - self.type = None - - -class EndpointServicesListResult(msrest.serialization.Model): - """Response for the ListAvailableEndpointServices API service call. - - :param value: List of available endpoint services in a region. - :type value: list[~azure.mgmt.network.v2017_09_01.models.EndpointServiceResult] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EndpointServiceResult]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["EndpointServiceResult"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(EndpointServicesListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Error(msrest.serialization.Model): - """Error. - - :param code: - :type code: str - :param message: - :type message: str - :param target: - :type target: str - :param details: - :type details: list[~azure.mgmt.network.v2017_09_01.models.ErrorDetails] - :param inner_error: - :type inner_error: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'inner_error': {'key': 'innerError', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - target: Optional[str] = None, - details: Optional[List["ErrorDetails"]] = None, - inner_error: Optional[str] = None, - **kwargs - ): - super(Error, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - self.inner_error = inner_error - - -class ErrorDetails(msrest.serialization.Model): - """ErrorDetails. - - :param code: - :type code: str - :param target: - :type target: str - :param message: - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - target: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message - - -class ExpressRouteCircuit(Resource): - """ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The SKU. - :type sku: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitSku - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param allow_classic_operations: Allow classic operations. - :type allow_classic_operations: bool - :param circuit_provisioning_state: The CircuitProvisioningState state of the resource. - :type circuit_provisioning_state: str - :param service_provider_provisioning_state: The ServiceProviderProvisioningState state of the - resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and - 'Deprovisioning'. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", - "Deprovisioning". - :type service_provider_provisioning_state: str or - ~azure.mgmt.network.v2017_09_01.models.ServiceProviderProvisioningState - :param authorizations: The list of authorizations. - :type authorizations: - list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization] - :param peerings: The list of peerings. - :type peerings: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] - :param service_key: The ServiceKey. - :type service_key: str - :param service_provider_notes: The ServiceProviderNotes. - :type service_provider_notes: str - :param service_provider_properties: The ServiceProviderProperties. - :type service_provider_properties: - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitServiceProviderProperties - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ExpressRouteCircuitSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_classic_operations': {'key': 'properties.allowClassicOperations', 'type': 'bool'}, - 'circuit_provisioning_state': {'key': 'properties.circuitProvisioningState', 'type': 'str'}, - 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, - 'authorizations': {'key': 'properties.authorizations', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, - 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, - 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["ExpressRouteCircuitSku"] = None, - allow_classic_operations: Optional[bool] = None, - circuit_provisioning_state: Optional[str] = None, - service_provider_provisioning_state: Optional[Union[str, "ServiceProviderProvisioningState"]] = None, - authorizations: Optional[List["ExpressRouteCircuitAuthorization"]] = None, - peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, - service_key: Optional[str] = None, - service_provider_notes: Optional[str] = None, - service_provider_properties: Optional["ExpressRouteCircuitServiceProviderProperties"] = None, - provisioning_state: Optional[str] = None, - gateway_manager_etag: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuit, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.sku = sku - self.etag = None - self.allow_classic_operations = allow_classic_operations - self.circuit_provisioning_state = circuit_provisioning_state - self.service_provider_provisioning_state = service_provider_provisioning_state - self.authorizations = authorizations - self.peerings = peerings - self.service_key = service_key - self.service_provider_notes = service_provider_notes - self.service_provider_properties = service_provider_properties - self.provisioning_state = provisioning_state - self.gateway_manager_etag = gateway_manager_etag - - -class ExpressRouteCircuitArpTable(msrest.serialization.Model): - """The ARP table associated with the ExpressRouteCircuit. - - :param age: Age. - :type age: int - :param interface: Interface. - :type interface: str - :param ip_address: The IP address. - :type ip_address: str - :param mac_address: The MAC address. - :type mac_address: str - """ - - _attribute_map = { - 'age': {'key': 'age', 'type': 'int'}, - 'interface': {'key': 'interface', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'mac_address': {'key': 'macAddress', 'type': 'str'}, - } - - def __init__( - self, - *, - age: Optional[int] = None, - interface: Optional[str] = None, - ip_address: Optional[str] = None, - mac_address: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitArpTable, self).__init__(**kwargs) - self.age = age - self.interface = interface - self.ip_address = ip_address - self.mac_address = mac_address - - -class ExpressRouteCircuitAuthorization(SubResource): - """Authorization in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param authorization_key: The authorization key. - :type authorization_key: str - :param authorization_use_status: AuthorizationUseStatus. Possible values are: 'Available' and - 'InUse'. Possible values include: "Available", "InUse". - :type authorization_use_status: str or - ~azure.mgmt.network.v2017_09_01.models.AuthorizationUseStatus - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - authorization_key: Optional[str] = None, - authorization_use_status: Optional[Union[str, "AuthorizationUseStatus"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitAuthorization, self).__init__(id=id, **kwargs) - self.name = name - self.etag = None - self.authorization_key = authorization_key - self.authorization_use_status = authorization_use_status - self.provisioning_state = provisioning_state - - -class ExpressRouteCircuitListResult(msrest.serialization.Model): - """Response for ListExpressRouteCircuit API service call. - - :param value: A list of ExpressRouteCircuits in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuit]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuit"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitPeering(SubResource): - """Peering in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param peering_type: The PeeringType. Possible values are: 'AzurePublicPeering', - 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: "AzurePublicPeering", - "AzurePrivatePeering", "MicrosoftPeering". - :type peering_type: str or - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringType - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringState - :param azure_asn: The Azure ASN. - :type azure_asn: int - :param peer_asn: The peer ASN. - :type peer_asn: int - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param primary_azure_port: The primary port. - :type primary_azure_port: str - :param secondary_azure_port: The secondary port. - :type secondary_azure_port: str - :param shared_key: The shared key. - :type shared_key: str - :param vlan_id: The VLAN ID. - :type vlan_id: int - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringConfig - :param stats: Gets peering stats. - :type stats: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitStats - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - :param last_modified_by: Gets whether the provider or the customer last modified the peering. - :type last_modified_by: str - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_09_01.models.RouteFilter - :param ipv6_peering_config: The IPv6 peering configuration. - :type ipv6_peering_config: - ~azure.mgmt.network.v2017_09_01.models.Ipv6ExpressRouteCircuitPeeringConfig - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, - 'peer_asn': {'key': 'properties.peerASN', 'type': 'int'}, - 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, - 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, - 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, - 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'stats': {'key': 'properties.stats', 'type': 'ExpressRouteCircuitStats'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'route_filter': {'key': 'properties.routeFilter', 'type': 'RouteFilter'}, - 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - peering_type: Optional[Union[str, "ExpressRouteCircuitPeeringType"]] = None, - state: Optional[Union[str, "ExpressRouteCircuitPeeringState"]] = None, - azure_asn: Optional[int] = None, - peer_asn: Optional[int] = None, - primary_peer_address_prefix: Optional[str] = None, - secondary_peer_address_prefix: Optional[str] = None, - primary_azure_port: Optional[str] = None, - secondary_azure_port: Optional[str] = None, - shared_key: Optional[str] = None, - vlan_id: Optional[int] = None, - microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, - stats: Optional["ExpressRouteCircuitStats"] = None, - provisioning_state: Optional[str] = None, - gateway_manager_etag: Optional[str] = None, - last_modified_by: Optional[str] = None, - route_filter: Optional["RouteFilter"] = None, - ipv6_peering_config: Optional["Ipv6ExpressRouteCircuitPeeringConfig"] = None, - **kwargs - ): - super(ExpressRouteCircuitPeering, self).__init__(id=id, **kwargs) - self.name = name - self.etag = None - self.peering_type = peering_type - self.state = state - self.azure_asn = azure_asn - self.peer_asn = peer_asn - self.primary_peer_address_prefix = primary_peer_address_prefix - self.secondary_peer_address_prefix = secondary_peer_address_prefix - self.primary_azure_port = primary_azure_port - self.secondary_azure_port = secondary_azure_port - self.shared_key = shared_key - self.vlan_id = vlan_id - self.microsoft_peering_config = microsoft_peering_config - self.stats = stats - self.provisioning_state = provisioning_state - self.gateway_manager_etag = gateway_manager_etag - self.last_modified_by = last_modified_by - self.route_filter = route_filter - self.ipv6_peering_config = ipv6_peering_config - - -class ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Specifies the peering configuration. - - :param advertised_public_prefixes: The reference of AdvertisedPublicPrefixes. - :type advertised_public_prefixes: list[str] - :param advertised_communities: The communities of bgp peering. Specified for microsoft peering. - :type advertised_communities: list[str] - :param advertised_public_prefixes_state: AdvertisedPublicPrefixState of the Peering resource. - Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. - Possible values include: "NotConfigured", "Configuring", "Configured", "ValidationNeeded". - :type advertised_public_prefixes_state: str or - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState - :param legacy_mode: The legacy mode of the peering. - :type legacy_mode: int - :param customer_asn: The CustomerASN of the peering. - :type customer_asn: int - :param routing_registry_name: The RoutingRegistryName of the configuration. - :type routing_registry_name: str - """ - - _attribute_map = { - 'advertised_public_prefixes': {'key': 'advertisedPublicPrefixes', 'type': '[str]'}, - 'advertised_communities': {'key': 'advertisedCommunities', 'type': '[str]'}, - 'advertised_public_prefixes_state': {'key': 'advertisedPublicPrefixesState', 'type': 'str'}, - 'legacy_mode': {'key': 'legacyMode', 'type': 'int'}, - 'customer_asn': {'key': 'customerASN', 'type': 'int'}, - 'routing_registry_name': {'key': 'routingRegistryName', 'type': 'str'}, - } - - def __init__( - self, - *, - advertised_public_prefixes: Optional[List[str]] = None, - advertised_communities: Optional[List[str]] = None, - advertised_public_prefixes_state: Optional[Union[str, "ExpressRouteCircuitPeeringAdvertisedPublicPrefixState"]] = None, - legacy_mode: Optional[int] = None, - customer_asn: Optional[int] = None, - routing_registry_name: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.advertised_public_prefixes = advertised_public_prefixes - self.advertised_communities = advertised_communities - self.advertised_public_prefixes_state = advertised_public_prefixes_state - self.legacy_mode = legacy_mode - self.customer_asn = customer_asn - self.routing_registry_name = routing_registry_name - - -class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): - """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. - - :param value: The peerings in an express route circuit. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitPeering"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitPeeringListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitRoutesTable(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param network: network. - :type network: str - :param next_hop: nextHop. - :type next_hop: str - :param loc_prf: locPrf. - :type loc_prf: str - :param weight: weight. - :type weight: int - :param path: path. - :type path: str - """ - - _attribute_map = { - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'loc_prf': {'key': 'locPrf', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - *, - network: Optional[str] = None, - next_hop: Optional[str] = None, - loc_prf: Optional[str] = None, - weight: Optional[int] = None, - path: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitRoutesTable, self).__init__(**kwargs) - self.network = network - self.next_hop = next_hop - self.loc_prf = loc_prf - self.weight = weight - self.path = path - - -class ExpressRouteCircuitRoutesTableSummary(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param neighbor: Neighbor. - :type neighbor: str - :param v: BGP version number spoken to the neighbor. - :type v: int - :param as_property: Autonomous system number. - :type as_property: int - :param up_down: The length of time that the BGP session has been in the Established state, or - the current status if not in the Established state. - :type up_down: str - :param state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have - been received from a neighbor or peer group. - :type state_pfx_rcd: str - """ - - _attribute_map = { - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'v': {'key': 'v', 'type': 'int'}, - 'as_property': {'key': 'as', 'type': 'int'}, - 'up_down': {'key': 'upDown', 'type': 'str'}, - 'state_pfx_rcd': {'key': 'statePfxRcd', 'type': 'str'}, - } - - def __init__( - self, - *, - neighbor: Optional[str] = None, - v: Optional[int] = None, - as_property: Optional[int] = None, - up_down: Optional[str] = None, - state_pfx_rcd: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitRoutesTableSummary, self).__init__(**kwargs) - self.neighbor = neighbor - self.v = v - self.as_property = as_property - self.up_down = up_down - self.state_pfx_rcd = state_pfx_rcd - - -class ExpressRouteCircuitsArpTableListResult(msrest.serialization.Model): - """Response for ListArpTable associated with the Express Route Circuits API. - - :param value: Gets list of the ARP table. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitArpTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitArpTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitArpTable"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitsArpTableListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitServiceProviderProperties(msrest.serialization.Model): - """Contains ServiceProviderProperties in an ExpressRouteCircuit. - - :param service_provider_name: The serviceProviderName. - :type service_provider_name: str - :param peering_location: The peering location. - :type peering_location: str - :param bandwidth_in_mbps: The BandwidthInMbps. - :type bandwidth_in_mbps: int - """ - - _attribute_map = { - 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, - 'peering_location': {'key': 'peeringLocation', 'type': 'str'}, - 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, - } - - def __init__( - self, - *, - service_provider_name: Optional[str] = None, - peering_location: Optional[str] = None, - bandwidth_in_mbps: Optional[int] = None, - **kwargs - ): - super(ExpressRouteCircuitServiceProviderProperties, self).__init__(**kwargs) - self.service_provider_name = service_provider_name - self.peering_location = peering_location - self.bandwidth_in_mbps = bandwidth_in_mbps - - -class ExpressRouteCircuitSku(msrest.serialization.Model): - """Contains SKU in an ExpressRouteCircuit. - - :param name: The name of the SKU. - :type name: str - :param tier: The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values - include: "Standard", "Premium". - :type tier: str or ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitSkuTier - :param family: The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. - Possible values include: "UnlimitedData", "MeteredData". - :type family: str or ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitSkuFamily - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - tier: Optional[Union[str, "ExpressRouteCircuitSkuTier"]] = None, - family: Optional[Union[str, "ExpressRouteCircuitSkuFamily"]] = None, - **kwargs - ): - super(ExpressRouteCircuitSku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.family = family - - -class ExpressRouteCircuitsRoutesTableListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: The list of routes table. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitRoutesTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitRoutesTable"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitsRoutesTableSummaryListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: A list of the routes table. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitRoutesTableSummary] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitRoutesTableSummary"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableSummaryListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitStats(msrest.serialization.Model): - """Contains stats associated with the peering. - - :param primarybytes_in: Gets BytesIn of the peering. - :type primarybytes_in: long - :param primarybytes_out: Gets BytesOut of the peering. - :type primarybytes_out: long - :param secondarybytes_in: Gets BytesIn of the peering. - :type secondarybytes_in: long - :param secondarybytes_out: Gets BytesOut of the peering. - :type secondarybytes_out: long - """ - - _attribute_map = { - 'primarybytes_in': {'key': 'primarybytesIn', 'type': 'long'}, - 'primarybytes_out': {'key': 'primarybytesOut', 'type': 'long'}, - 'secondarybytes_in': {'key': 'secondarybytesIn', 'type': 'long'}, - 'secondarybytes_out': {'key': 'secondarybytesOut', 'type': 'long'}, - } - - def __init__( - self, - *, - primarybytes_in: Optional[int] = None, - primarybytes_out: Optional[int] = None, - secondarybytes_in: Optional[int] = None, - secondarybytes_out: Optional[int] = None, - **kwargs - ): - super(ExpressRouteCircuitStats, self).__init__(**kwargs) - self.primarybytes_in = primarybytes_in - self.primarybytes_out = primarybytes_out - self.secondarybytes_in = secondarybytes_in - self.secondarybytes_out = secondarybytes_out - - -class ExpressRouteServiceProvider(Resource): - """A ExpressRouteResourceProvider object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param peering_locations: Get a list of peering locations. - :type peering_locations: list[str] - :param bandwidths_offered: Gets bandwidths offered. - :type bandwidths_offered: - list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteServiceProviderBandwidthsOffered] - :param provisioning_state: Gets the provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, - 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - peering_locations: Optional[List[str]] = None, - bandwidths_offered: Optional[List["ExpressRouteServiceProviderBandwidthsOffered"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ExpressRouteServiceProvider, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.peering_locations = peering_locations - self.bandwidths_offered = bandwidths_offered - self.provisioning_state = provisioning_state - - -class ExpressRouteServiceProviderBandwidthsOffered(msrest.serialization.Model): - """Contains bandwidths offered in ExpressRouteServiceProvider resources. - - :param offer_name: The OfferName. - :type offer_name: str - :param value_in_mbps: The ValueInMbps. - :type value_in_mbps: int - """ - - _attribute_map = { - 'offer_name': {'key': 'offerName', 'type': 'str'}, - 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, - } - - def __init__( - self, - *, - offer_name: Optional[str] = None, - value_in_mbps: Optional[int] = None, - **kwargs - ): - super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs) - self.offer_name = offer_name - self.value_in_mbps = value_in_mbps - - -class ExpressRouteServiceProviderListResult(msrest.serialization.Model): - """Response for the ListExpressRouteServiceProvider API service call. - - :param value: A list of ExpressRouteResourceProvider resources. - :type value: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteServiceProvider] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteServiceProvider"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteServiceProviderListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class FlowLogInformation(msrest.serialization.Model): - """Information on the configuration of flow log. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the resource to configure for flow logging. - :type target_resource_id: str - :param storage_id: Required. ID of the storage account which is used to store the flow log. - :type storage_id: str - :param enabled: Required. Flag to enable/disable flow logging. - :type enabled: bool - :param retention_policy: Parameters that define the retention policy for flow log. - :type retention_policy: ~azure.mgmt.network.v2017_09_01.models.RetentionPolicyParameters - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, - } - - def __init__( - self, - *, - target_resource_id: str, - storage_id: str, - enabled: bool, - retention_policy: Optional["RetentionPolicyParameters"] = None, - **kwargs - ): - super(FlowLogInformation, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.storage_id = storage_id - self.enabled = enabled - self.retention_policy = retention_policy - - -class FlowLogStatusParameters(msrest.serialization.Model): - """Parameters that define a resource to query flow log status. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource where getting the flow logging status. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - **kwargs - ): - super(FlowLogStatusParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - - -class FrontendIPConfiguration(SubResource): - """Frontend IP address of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :ivar inbound_nat_rules: Read only. Inbound rules URIs that use this frontend IP. - :vartype inbound_nat_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :ivar inbound_nat_pools: Read only. Inbound pools URIs that use this frontend IP. - :vartype inbound_nat_pools: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :ivar outbound_nat_rules: Read only. Outbound rules URIs that use this frontend IP. - :vartype outbound_nat_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :ivar load_balancing_rules: Gets load balancing rules URIs that use this frontend IP. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The Private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.Subnet - :param public_ip_address: The reference of the Public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'inbound_nat_rules': {'readonly': True}, - 'inbound_nat_pools': {'readonly': True}, - 'outbound_nat_rules': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[SubResource]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[SubResource]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - zones: Optional[List[str]] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["Subnet"] = None, - public_ip_address: Optional["PublicIPAddress"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(FrontendIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.zones = zones - self.inbound_nat_rules = None - self.inbound_nat_pools = None - self.outbound_nat_rules = None - self.load_balancing_rules = None - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class GatewayRoute(msrest.serialization.Model): - """Gateway routing details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The gateway's local address. - :vartype local_address: str - :ivar network: The route's network prefix. - :vartype network: str - :ivar next_hop: The route's next hop. - :vartype next_hop: str - :ivar source_peer: The peer this route was learned from. - :vartype source_peer: str - :ivar origin: The source this route was learned from. - :vartype origin: str - :ivar as_path: The route's AS path sequence. - :vartype as_path: str - :ivar weight: The route's weight. - :vartype weight: int - """ - - _validation = { - 'local_address': {'readonly': True}, - 'network': {'readonly': True}, - 'next_hop': {'readonly': True}, - 'source_peer': {'readonly': True}, - 'origin': {'readonly': True}, - 'as_path': {'readonly': True}, - 'weight': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'as_path': {'key': 'asPath', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(GatewayRoute, self).__init__(**kwargs) - self.local_address = None - self.network = None - self.next_hop = None - self.source_peer = None - self.origin = None - self.as_path = None - self.weight = None - - -class GatewayRouteListResult(msrest.serialization.Model): - """List of virtual network gateway routes. - - :param value: List of gateway routes. - :type value: list[~azure.mgmt.network.v2017_09_01.models.GatewayRoute] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[GatewayRoute]'}, - } - - def __init__( - self, - *, - value: Optional[List["GatewayRoute"]] = None, - **kwargs - ): - super(GatewayRouteListResult, self).__init__(**kwargs) - self.value = value - - -class InboundNatPool(SubResource): - """Inbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.TransportProtocol - :param frontend_port_range_start: The first port number in the range of external ports that - will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values - range between 1 and 65534. - :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of external ports that will - be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range - between 1 and 65535. - :type frontend_port_range_end: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 1 and 65535. - :type backend_port: int - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, - 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - protocol: Optional[Union[str, "TransportProtocol"]] = None, - frontend_port_range_start: Optional[int] = None, - frontend_port_range_end: Optional[int] = None, - backend_port: Optional[int] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(InboundNatPool, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.frontend_ip_configuration = frontend_ip_configuration - self.protocol = protocol - self.frontend_port_range_start = frontend_port_range_start - self.frontend_port_range_end = frontend_port_range_end - self.backend_port = backend_port - self.provisioning_state = provisioning_state - - -class InboundNatRule(SubResource): - """Inbound NAT rule of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :ivar backend_ip_configuration: A reference to a private IP address defined on a network - interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations - is forwarded to the backend IP. - :vartype backend_ip_configuration: - ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.TransportProtocol - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values range from 1 to 65534. - :type frontend_port: int - :param backend_port: The port used for the internal endpoint. Acceptable values range from 1 to - 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_ip_configuration': {'key': 'properties.backendIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - protocol: Optional[Union[str, "TransportProtocol"]] = None, - frontend_port: Optional[int] = None, - backend_port: Optional[int] = None, - idle_timeout_in_minutes: Optional[int] = None, - enable_floating_ip: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(InboundNatRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.frontend_ip_configuration = frontend_ip_configuration - self.backend_ip_configuration = None - self.protocol = protocol - self.frontend_port = frontend_port - self.backend_port = backend_port - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.enable_floating_ip = enable_floating_ip - self.provisioning_state = provisioning_state - - -class InboundNatRuleListResult(msrest.serialization.Model): - """Response for ListInboundNatRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of inbound nat rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.InboundNatRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InboundNatRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["InboundNatRule"]] = None, - **kwargs - ): - super(InboundNatRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class IPAddressAvailabilityResult(msrest.serialization.Model): - """Response for CheckIPAddressAvailability API service call. - - :param available: Private IP address availability. - :type available: bool - :param available_ip_addresses: Contains other available private IP addresses if the asked for - address is taken. - :type available_ip_addresses: list[str] - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'available_ip_addresses': {'key': 'availableIPAddresses', 'type': '[str]'}, - } - - def __init__( - self, - *, - available: Optional[bool] = None, - available_ip_addresses: Optional[List[str]] = None, - **kwargs - ): - super(IPAddressAvailabilityResult, self).__init__(**kwargs) - self.available = available - self.available_ip_addresses = available_ip_addresses - - -class IPConfiguration(SubResource): - """IP configuration. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.Subnet - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["Subnet"] = None, - public_ip_address: Optional["PublicIPAddress"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(IPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class IpsecPolicy(msrest.serialization.Model): - """An IPSec Policy configuration for a virtual network gateway connection. - - All required parameters must be populated in order to send to Azure. - - :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - :type sa_life_time_seconds: int - :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - :type sa_data_size_kilobytes: int - :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible - values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", - "GCMAES256". - :type ipsec_encryption: str or ~azure.mgmt.network.v2017_09_01.models.IpsecEncryption - :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values - include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". - :type ipsec_integrity: str or ~azure.mgmt.network.v2017_09_01.models.IpsecIntegrity - :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values - include: "DES", "DES3", "AES128", "AES192", "AES256". - :type ike_encryption: str or ~azure.mgmt.network.v2017_09_01.models.IkeEncryption - :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values - include: "MD5", "SHA1", "SHA256", "SHA384". - :type ike_integrity: str or ~azure.mgmt.network.v2017_09_01.models.IkeIntegrity - :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values - include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", - "DHGroup24". - :type dh_group: str or ~azure.mgmt.network.v2017_09_01.models.DhGroup - :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new child SA. Possible values - include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24". - :type pfs_group: str or ~azure.mgmt.network.v2017_09_01.models.PfsGroup - """ - - _validation = { - 'sa_life_time_seconds': {'required': True}, - 'sa_data_size_kilobytes': {'required': True}, - 'ipsec_encryption': {'required': True}, - 'ipsec_integrity': {'required': True}, - 'ike_encryption': {'required': True}, - 'ike_integrity': {'required': True}, - 'dh_group': {'required': True}, - 'pfs_group': {'required': True}, - } - - _attribute_map = { - 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, - 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, - 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, - 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, - 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, - 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, - 'dh_group': {'key': 'dhGroup', 'type': 'str'}, - 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, - } - - def __init__( - self, - *, - sa_life_time_seconds: int, - sa_data_size_kilobytes: int, - ipsec_encryption: Union[str, "IpsecEncryption"], - ipsec_integrity: Union[str, "IpsecIntegrity"], - ike_encryption: Union[str, "IkeEncryption"], - ike_integrity: Union[str, "IkeIntegrity"], - dh_group: Union[str, "DhGroup"], - pfs_group: Union[str, "PfsGroup"], - **kwargs - ): - super(IpsecPolicy, self).__init__(**kwargs) - self.sa_life_time_seconds = sa_life_time_seconds - self.sa_data_size_kilobytes = sa_data_size_kilobytes - self.ipsec_encryption = ipsec_encryption - self.ipsec_integrity = ipsec_integrity - self.ike_encryption = ike_encryption - self.ike_integrity = ike_integrity - self.dh_group = dh_group - self.pfs_group = pfs_group - - -class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Contains IPv6 peering config. - - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringConfig - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_09_01.models.RouteFilter - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringState - """ - - _attribute_map = { - 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, - 'microsoft_peering_config': {'key': 'microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'route_filter': {'key': 'routeFilter', 'type': 'RouteFilter'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - *, - primary_peer_address_prefix: Optional[str] = None, - secondary_peer_address_prefix: Optional[str] = None, - microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, - route_filter: Optional["RouteFilter"] = None, - state: Optional[Union[str, "ExpressRouteCircuitPeeringState"]] = None, - **kwargs - ): - super(Ipv6ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.primary_peer_address_prefix = primary_peer_address_prefix - self.secondary_peer_address_prefix = secondary_peer_address_prefix - self.microsoft_peering_config = microsoft_peering_config - self.route_filter = route_filter - self.state = state - - -class LoadBalancer(Resource): - """LoadBalancer resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The load balancer SKU. - :type sku: ~azure.mgmt.network.v2017_09_01.models.LoadBalancerSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configurations: Object representing the frontend IPs to be used for the load - balancer. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.FrontendIPConfiguration] - :param backend_address_pools: Collection of backend address pools used by a load balancer. - :type backend_address_pools: list[~azure.mgmt.network.v2017_09_01.models.BackendAddressPool] - :param load_balancing_rules: Object collection representing the load balancing rules Gets the - provisioning. - :type load_balancing_rules: list[~azure.mgmt.network.v2017_09_01.models.LoadBalancingRule] - :param probes: Collection of probe objects used in the load balancer. - :type probes: list[~azure.mgmt.network.v2017_09_01.models.Probe] - :param inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining - inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT - pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are - associated with individual virtual machines cannot reference an Inbound NAT pool. They have to - reference individual inbound NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.network.v2017_09_01.models.InboundNatRule] - :param inbound_nat_pools: Defines an external port range for inbound NAT to a single backend - port on NICs associated with a load balancer. Inbound NAT rules are created automatically for - each NIC associated with the Load Balancer using an external port from this range. Defining an - Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. - Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with - individual virtual machines cannot reference an inbound NAT pool. They have to reference - individual inbound NAT rules. - :type inbound_nat_pools: list[~azure.mgmt.network.v2017_09_01.models.InboundNatPool] - :param outbound_nat_rules: The outbound NAT rules. - :type outbound_nat_rules: list[~azure.mgmt.network.v2017_09_01.models.OutboundNatRule] - :param resource_guid: The resource GUID property of the load balancer resource. - :type resource_guid: str - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'LoadBalancerSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[FrontendIPConfiguration]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'probes': {'key': 'properties.probes', 'type': '[Probe]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[InboundNatRule]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[InboundNatPool]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[OutboundNatRule]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["LoadBalancerSku"] = None, - etag: Optional[str] = None, - frontend_ip_configurations: Optional[List["FrontendIPConfiguration"]] = None, - backend_address_pools: Optional[List["BackendAddressPool"]] = None, - load_balancing_rules: Optional[List["LoadBalancingRule"]] = None, - probes: Optional[List["Probe"]] = None, - inbound_nat_rules: Optional[List["InboundNatRule"]] = None, - inbound_nat_pools: Optional[List["InboundNatPool"]] = None, - outbound_nat_rules: Optional[List["OutboundNatRule"]] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(LoadBalancer, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.sku = sku - self.etag = etag - self.frontend_ip_configurations = frontend_ip_configurations - self.backend_address_pools = backend_address_pools - self.load_balancing_rules = load_balancing_rules - self.probes = probes - self.inbound_nat_rules = inbound_nat_rules - self.inbound_nat_pools = inbound_nat_pools - self.outbound_nat_rules = outbound_nat_rules - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class LoadBalancerBackendAddressPoolListResult(msrest.serialization.Model): - """Response for ListBackendAddressPool API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of backend address pools in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.BackendAddressPool] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackendAddressPool]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["BackendAddressPool"]] = None, - **kwargs - ): - super(LoadBalancerBackendAddressPoolListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): - """Response for ListFrontendIPConfiguration API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of frontend IP configurations in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.FrontendIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["FrontendIPConfiguration"]] = None, - **kwargs - ): - super(LoadBalancerFrontendIPConfigurationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerListResult(msrest.serialization.Model): - """Response for ListLoadBalancers API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LoadBalancer"]] = None, - **kwargs - ): - super(LoadBalancerListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerLoadBalancingRuleListResult(msrest.serialization.Model): - """Response for ListLoadBalancingRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancing rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.LoadBalancingRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancingRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LoadBalancingRule"]] = None, - **kwargs - ): - super(LoadBalancerLoadBalancingRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerProbeListResult(msrest.serialization.Model): - """Response for ListProbe API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of probes in a load balancer. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Probe] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Probe]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Probe"]] = None, - **kwargs - ): - super(LoadBalancerProbeListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerSku(msrest.serialization.Model): - """SKU of a load balancer. - - :param name: Name of a load balancer SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_09_01.models.LoadBalancerSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "LoadBalancerSkuName"]] = None, - **kwargs - ): - super(LoadBalancerSku, self).__init__(**kwargs) - self.name = name - - -class LoadBalancingRule(SubResource): - """A load balancing rule for a load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param probe: The reference of the load balancer probe used by the load balancing rule. - :type probe: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.TransportProtocol - :param load_distribution: The load distribution policy for this rule. Possible values are - 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: "Default", "SourceIP", - "SourceIPProtocol". - :type load_distribution: str or ~azure.mgmt.network.v2017_09_01.models.LoadDistribution - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 - enables "Any Port". - :type frontend_port: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 0 and 65535. Note that value 0 enables "Any Port". - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the - publicIP address specified in the frontend of the load balancing rule. - :type disable_outbound_snat: bool - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'load_distribution': {'key': 'properties.loadDistribution', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'disable_outbound_snat': {'key': 'properties.disableOutboundSnat', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - backend_address_pool: Optional["SubResource"] = None, - probe: Optional["SubResource"] = None, - protocol: Optional[Union[str, "TransportProtocol"]] = None, - load_distribution: Optional[Union[str, "LoadDistribution"]] = None, - frontend_port: Optional[int] = None, - backend_port: Optional[int] = None, - idle_timeout_in_minutes: Optional[int] = None, - enable_floating_ip: Optional[bool] = None, - disable_outbound_snat: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(LoadBalancingRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.frontend_ip_configuration = frontend_ip_configuration - self.backend_address_pool = backend_address_pool - self.probe = probe - self.protocol = protocol - self.load_distribution = load_distribution - self.frontend_port = frontend_port - self.backend_port = backend_port - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.enable_floating_ip = enable_floating_ip - self.disable_outbound_snat = disable_outbound_snat - self.provisioning_state = provisioning_state - - -class LocalNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param local_network_address_space: Local network site address space. - :type local_network_address_space: ~azure.mgmt.network.v2017_09_01.models.AddressSpace - :param gateway_ip_address: IP address of local network gateway. - :type gateway_ip_address: str - :param bgp_settings: Local network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_09_01.models.BgpSettings - :param resource_guid: The resource GUID property of the LocalNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the LocalNetworkGateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'local_network_address_space': {'key': 'properties.localNetworkAddressSpace', 'type': 'AddressSpace'}, - 'gateway_ip_address': {'key': 'properties.gatewayIpAddress', 'type': 'str'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - local_network_address_space: Optional["AddressSpace"] = None, - gateway_ip_address: Optional[str] = None, - bgp_settings: Optional["BgpSettings"] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(LocalNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.local_network_address_space = local_network_address_space - self.gateway_ip_address = gateway_ip_address - self.bgp_settings = bgp_settings - self.resource_guid = resource_guid - self.provisioning_state = None - - -class LocalNetworkGatewayListResult(msrest.serialization.Model): - """Response for ListLocalNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of local network gateways that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LocalNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LocalNetworkGateway"]] = None, - **kwargs - ): - super(LocalNetworkGatewayListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LogSpecification(msrest.serialization.Model): - """Description of logging specification. - - :param name: The name of the specification. - :type name: str - :param display_name: The display name of the specification. - :type display_name: str - :param blob_duration: Duration of the blob. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - blob_duration: Optional[str] = None, - **kwargs - ): - super(LogSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration - - -class MetricSpecification(msrest.serialization.Model): - """Description of metrics specification. - - :param name: The name of the metric. - :type name: str - :param display_name: The display name of the metric. - :type display_name: str - :param display_description: The description of the metric. - :type display_description: str - :param unit: Units the metric to be displayed in. - :type unit: str - :param aggregation_type: The aggregation type. - :type aggregation_type: str - :param availabilities: List of availability. - :type availabilities: list[~azure.mgmt.network.v2017_09_01.models.Availability] - :param enable_regional_mdm_account: Whether regional MDM account enabled. - :type enable_regional_mdm_account: bool - :param fill_gap_with_zero: Whether gaps would be filled with zeros. - :type fill_gap_with_zero: bool - :param metric_filter_pattern: Pattern for the filter of the metric. - :type metric_filter_pattern: str - :param dimensions: List of dimensions. - :type dimensions: list[~azure.mgmt.network.v2017_09_01.models.Dimension] - :param is_internal: Whether the metric is internal. - :type is_internal: bool - :param source_mdm_account: The source MDM account. - :type source_mdm_account: str - :param source_mdm_namespace: The source MDM namespace. - :type source_mdm_namespace: str - :param resource_id_dimension_name_override: The resource Id dimension name override. - :type resource_id_dimension_name_override: str - """ - - _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'}, - 'availabilities': {'key': 'availabilities', 'type': '[Availability]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, - 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, - 'is_internal': {'key': 'isInternal', 'type': 'bool'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - display_description: Optional[str] = None, - unit: Optional[str] = None, - aggregation_type: Optional[str] = None, - availabilities: Optional[List["Availability"]] = None, - enable_regional_mdm_account: Optional[bool] = None, - fill_gap_with_zero: Optional[bool] = None, - metric_filter_pattern: Optional[str] = None, - dimensions: Optional[List["Dimension"]] = None, - is_internal: Optional[bool] = None, - source_mdm_account: Optional[str] = None, - source_mdm_namespace: Optional[str] = None, - resource_id_dimension_name_override: Optional[str] = None, - **kwargs - ): - 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.availabilities = availabilities - self.enable_regional_mdm_account = enable_regional_mdm_account - self.fill_gap_with_zero = fill_gap_with_zero - self.metric_filter_pattern = metric_filter_pattern - self.dimensions = dimensions - self.is_internal = is_internal - self.source_mdm_account = source_mdm_account - self.source_mdm_namespace = source_mdm_namespace - self.resource_id_dimension_name_override = resource_id_dimension_name_override - - -class NetworkInterface(Resource): - """A network interface in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param virtual_machine: The reference of a virtual machine. - :type virtual_machine: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup - :param ip_configurations: A list of IPConfigurations of the network interface. - :type ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration] - :param dns_settings: The DNS settings in network interface. - :type dns_settings: ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceDnsSettings - :param mac_address: The MAC address of the network interface. - :type mac_address: str - :param primary: Gets whether this is a primary network interface on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: If the network interface is accelerated networking - enabled. - :type enable_accelerated_networking: bool - :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network - interface. - :type enable_ip_forwarding: bool - :param resource_guid: The resource GUID property of the network interface resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, - 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - virtual_machine: Optional["SubResource"] = None, - network_security_group: Optional["NetworkSecurityGroup"] = None, - ip_configurations: Optional[List["NetworkInterfaceIPConfiguration"]] = None, - dns_settings: Optional["NetworkInterfaceDnsSettings"] = None, - mac_address: Optional[str] = None, - primary: Optional[bool] = None, - enable_accelerated_networking: Optional[bool] = None, - enable_ip_forwarding: Optional[bool] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(NetworkInterface, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.virtual_machine = virtual_machine - self.network_security_group = network_security_group - self.ip_configurations = ip_configurations - self.dns_settings = dns_settings - self.mac_address = mac_address - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.enable_ip_forwarding = enable_ip_forwarding - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class NetworkInterfaceAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Network interface ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - *, - security_rules: Optional[List["SecurityRule"]] = None, - **kwargs - ): - super(NetworkInterfaceAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = security_rules - - -class NetworkInterfaceDnsSettings(msrest.serialization.Model): - """DNS settings of a network interface. - - :param dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure - provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be - the only value in dnsServers collection. - :type dns_servers: list[str] - :param applied_dns_servers: If the VM that uses this NIC is part of an Availability Set, then - this list will have the union of all DNS servers from all NICs that are part of the - Availability Set. This property is what is configured on each of those VMs. - :type applied_dns_servers: list[str] - :param internal_dns_name_label: Relative DNS name for this NIC used for internal communications - between VMs in the same virtual network. - :type internal_dns_name_label: str - :param internal_fqdn: Fully qualified DNS name supporting internal communications between VMs - in the same virtual network. - :type internal_fqdn: str - :param internal_domain_name_suffix: Even if internalDnsNameLabel is not specified, a DNS entry - is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the - VM name with the value of internalDomainNameSuffix. - :type internal_domain_name_suffix: str - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, - 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, - 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'}, - 'internal_domain_name_suffix': {'key': 'internalDomainNameSuffix', 'type': 'str'}, - } - - def __init__( - self, - *, - dns_servers: Optional[List[str]] = None, - applied_dns_servers: Optional[List[str]] = None, - internal_dns_name_label: Optional[str] = None, - internal_fqdn: Optional[str] = None, - internal_domain_name_suffix: Optional[str] = None, - **kwargs - ): - super(NetworkInterfaceDnsSettings, self).__init__(**kwargs) - self.dns_servers = dns_servers - self.applied_dns_servers = applied_dns_servers - self.internal_dns_name_label = internal_dns_name_label - self.internal_fqdn = internal_fqdn - self.internal_domain_name_suffix = internal_domain_name_suffix - - -class NetworkInterfaceIPConfiguration(SubResource): - """IPConfiguration in a network interface. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param application_gateway_backend_address_pools: The reference of - ApplicationGatewayBackendAddressPool resource. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendAddressPool] - :param load_balancer_backend_address_pools: The reference of LoadBalancerBackendAddressPool - resource. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.network.v2017_09_01.models.BackendAddressPool] - :param load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. - :type load_balancer_inbound_nat_rules: - list[~azure.mgmt.network.v2017_09_01.models.InboundNatRule] - :param private_ip_address: Private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: Defines how a private IP address is assigned. Possible - values are: 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param private_ip_address_version: Available from Api-Version 2016-03-30 onwards, it represents - whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible - values are: 'IPv4' and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type private_ip_address_version: str or ~azure.mgmt.network.v2017_09_01.models.IPVersion - :param subnet: Subnet bound to the IP configuration. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.Subnet - :param primary: Gets whether this is a primary customer address on the network interface. - :type primary: bool - :param public_ip_address: Public IP address bound to the IP configuration. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddress - :param application_security_groups: Application security groups in which the IP configuration - is included. - :type application_security_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] - :param provisioning_state: The provisioning state of the network interface IP configuration. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - application_gateway_backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, - load_balancer_backend_address_pools: Optional[List["BackendAddressPool"]] = None, - load_balancer_inbound_nat_rules: Optional[List["InboundNatRule"]] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - private_ip_address_version: Optional[Union[str, "IPVersion"]] = None, - subnet: Optional["Subnet"] = None, - primary: Optional[bool] = None, - public_ip_address: Optional["PublicIPAddress"] = None, - application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(NetworkInterfaceIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_rules = load_balancer_inbound_nat_rules - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.private_ip_address_version = private_ip_address_version - self.subnet = subnet - self.primary = primary - self.public_ip_address = public_ip_address - self.application_security_groups = application_security_groups - self.provisioning_state = provisioning_state - - -class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of ip configurations. - :type value: list[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkInterfaceIPConfiguration"]] = None, - **kwargs - ): - super(NetworkInterfaceIPConfigurationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkInterfaceListResult(msrest.serialization.Model): - """Response for the ListNetworkInterface API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of network interfaces in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.NetworkInterface] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterface]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkInterface"]] = None, - **kwargs - ): - super(NetworkInterfaceListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkInterfaceLoadBalancerListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers. - :type value: list[~azure.mgmt.network.v2017_09_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LoadBalancer"]] = None, - **kwargs - ): - super(NetworkInterfaceLoadBalancerListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkSecurityGroup(Resource): - """NetworkSecurityGroup resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param security_rules: A collection of security rules of the network security group. - :type security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - :param default_security_rules: The default security rules of network security group. - :type default_security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - :ivar network_interfaces: A collection of references to network interfaces. - :vartype network_interfaces: list[~azure.mgmt.network.v2017_09_01.models.NetworkInterface] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_09_01.models.Subnet] - :param resource_guid: The resource GUID property of the network security group resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'network_interfaces': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'security_rules': {'key': 'properties.securityRules', 'type': '[SecurityRule]'}, - 'default_security_rules': {'key': 'properties.defaultSecurityRules', 'type': '[SecurityRule]'}, - 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - security_rules: Optional[List["SecurityRule"]] = None, - default_security_rules: Optional[List["SecurityRule"]] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(NetworkSecurityGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.security_rules = security_rules - self.default_security_rules = default_security_rules - self.network_interfaces = None - self.subnets = None - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class NetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for ListNetworkSecurityGroups API service call. - - :param value: A list of NetworkSecurityGroup resources. - :type value: list[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkSecurityGroup"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(NetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkWatcher(Resource): - """Network watcher in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar provisioning_state: The provisioning state of the resource. Possible values include: - "Succeeded", "Updating", "Deleting", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.network.v2017_09_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - **kwargs - ): - super(NetworkWatcher, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.provisioning_state = None - - -class NetworkWatcherListResult(msrest.serialization.Model): - """List of network watcher resources. - - :param value: - :type value: list[~azure.mgmt.network.v2017_09_01.models.NetworkWatcher] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkWatcher]'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkWatcher"]] = None, - **kwargs - ): - super(NetworkWatcherListResult, self).__init__(**kwargs) - self.value = value - - -class NextHopParameters(msrest.serialization.Model): - """Parameters that define the source and destination endpoint. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The resource identifier of the target resource against - which the action is to be performed. - :type target_resource_id: str - :param source_ip_address: Required. The source IP address. - :type source_ip_address: str - :param destination_ip_address: Required. The destination IP address. - :type destination_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of the nics, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'source_ip_address': {'required': True}, - 'destination_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'source_ip_address': {'key': 'sourceIPAddress', 'type': 'str'}, - 'destination_ip_address': {'key': 'destinationIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - source_ip_address: str, - destination_ip_address: str, - target_nic_resource_id: Optional[str] = None, - **kwargs - ): - super(NextHopParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.source_ip_address = source_ip_address - self.destination_ip_address = destination_ip_address - self.target_nic_resource_id = target_nic_resource_id - - -class NextHopResult(msrest.serialization.Model): - """The information about next hop from the specified VM. - - :param next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", - "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_09_01.models.NextHopType - :param next_hop_ip_address: Next hop IP Address. - :type next_hop_ip_address: str - :param route_table_id: The resource identifier for the route table associated with the route - being returned. If the route being returned does not correspond to any user created routes then - this field will be the string 'System Route'. - :type route_table_id: str - """ - - _attribute_map = { - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, - 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, - } - - def __init__( - self, - *, - next_hop_type: Optional[Union[str, "NextHopType"]] = None, - next_hop_ip_address: Optional[str] = None, - route_table_id: Optional[str] = None, - **kwargs - ): - super(NextHopResult, self).__init__(**kwargs) - self.next_hop_type = next_hop_type - self.next_hop_ip_address = next_hop_ip_address - self.route_table_id = route_table_id - - -class Operation(msrest.serialization.Model): - """Network REST API operation definition. - - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.network.v2017_09_01.models.OperationDisplay - :param origin: Origin of the operation. - :type origin: str - :param service_specification: Specification of the service. - :type service_specification: - ~azure.mgmt.network.v2017_09_01.models.OperationPropertiesFormatServiceSpecification - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationPropertiesFormatServiceSpecification'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display: Optional["OperationDisplay"] = None, - origin: Optional[str] = None, - service_specification: Optional["OperationPropertiesFormatServiceSpecification"] = None, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.service_specification = service_specification - - -class OperationDisplay(msrest.serialization.Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft Network. - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - :param operation: Type of the operation: get, read, delete, etc. - :type operation: str - :param description: Description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - resource: Optional[str] = None, - operation: Optional[str] = None, - description: Optional[str] = None, - **kwargs - ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class OperationListResult(msrest.serialization.Model): - """Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of results. - - :param value: List of Network operations supported by the Network resource provider. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Operation] - :param next_link: URL to get the next set of operation list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Operation"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(OperationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class OperationPropertiesFormatServiceSpecification(msrest.serialization.Model): - """Specification of the service. - - :param metric_specifications: Operation service specification. - :type metric_specifications: list[~azure.mgmt.network.v2017_09_01.models.MetricSpecification] - :param log_specifications: Operation log specification. - :type log_specifications: list[~azure.mgmt.network.v2017_09_01.models.LogSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__( - self, - *, - metric_specifications: Optional[List["MetricSpecification"]] = None, - log_specifications: Optional[List["LogSpecification"]] = None, - **kwargs - ): - super(OperationPropertiesFormatServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = metric_specifications - self.log_specifications = log_specifications - - -class OutboundNatRule(SubResource): - """Outbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allocated_outbound_ports: The number of outbound ports to be used for NAT. - :type allocated_outbound_ports: int - :param frontend_ip_configurations: The Frontend IP addresses of the load balancer. - :type frontend_ip_configurations: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[SubResource]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - allocated_outbound_ports: Optional[int] = None, - frontend_ip_configurations: Optional[List["SubResource"]] = None, - backend_address_pool: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(OutboundNatRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.allocated_outbound_ports = allocated_outbound_ports - self.frontend_ip_configurations = frontend_ip_configurations - self.backend_address_pool = backend_address_pool - self.provisioning_state = provisioning_state - - -class PacketCapture(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - *, - target: str, - storage_location: "PacketCaptureStorageLocation", - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - filters: Optional[List["PacketCaptureFilter"]] = None, - **kwargs - ): - super(PacketCapture, self).__init__(**kwargs) - self.target = target - self.bytes_to_capture_per_packet = bytes_to_capture_per_packet - self.total_bytes_per_session = total_bytes_per_session - self.time_limit_in_seconds = time_limit_in_seconds - self.storage_location = storage_location - self.filters = filters - - -class PacketCaptureFilter(msrest.serialization.Model): - """Filter that is applied to packet capture request. Multiple filters can be applied. - - :param protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". - Default value: "Any". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.PcProtocol - :param local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type local_ip_address: str - :param remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type remote_ip_address: str - :param local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type local_port: str - :param remote_port: Remote port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type remote_port: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - } - - def __init__( - self, - *, - protocol: Optional[Union[str, "PcProtocol"]] = "Any", - local_ip_address: Optional[str] = None, - remote_ip_address: Optional[str] = None, - local_port: Optional[str] = None, - remote_port: Optional[str] = None, - **kwargs - ): - super(PacketCaptureFilter, self).__init__(**kwargs) - self.protocol = protocol - self.local_ip_address = local_ip_address - self.remote_ip_address = remote_ip_address - self.local_port = local_port - self.remote_port = remote_port - - -class PacketCaptureListResult(msrest.serialization.Model): - """List of packet capture sessions. - - :param value: Information about packet capture sessions. - :type value: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureResult] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, - } - - def __init__( - self, - *, - value: Optional[List["PacketCaptureResult"]] = None, - **kwargs - ): - super(PacketCaptureListResult, self).__init__(**kwargs) - self.value = value - - -class PacketCaptureParameters(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - *, - target: str, - storage_location: "PacketCaptureStorageLocation", - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - filters: Optional[List["PacketCaptureFilter"]] = None, - **kwargs - ): - super(PacketCaptureParameters, self).__init__(**kwargs) - self.target = target - self.bytes_to_capture_per_packet = bytes_to_capture_per_packet - self.total_bytes_per_session = total_bytes_per_session - self.time_limit_in_seconds = time_limit_in_seconds - self.storage_location = storage_location - self.filters = filters - - -class PacketCaptureQueryStatusResult(msrest.serialization.Model): - """Status of packet capture session. - - :param name: The name of the packet capture resource. - :type name: str - :param id: The ID of the packet capture resource. - :type id: str - :param capture_start_time: The start time of the packet capture session. - :type capture_start_time: ~datetime.datetime - :param packet_capture_status: The status of the packet capture session. Possible values - include: "NotStarted", "Running", "Stopped", "Error", "Unknown". - :type packet_capture_status: str or ~azure.mgmt.network.v2017_09_01.models.PcStatus - :param stop_reason: The reason the current packet capture session was stopped. - :type stop_reason: str - :param packet_capture_error: List of errors of packet capture session. - :type packet_capture_error: list[str or ~azure.mgmt.network.v2017_09_01.models.PcError] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'capture_start_time': {'key': 'captureStartTime', 'type': 'iso-8601'}, - 'packet_capture_status': {'key': 'packetCaptureStatus', 'type': 'str'}, - 'stop_reason': {'key': 'stopReason', 'type': 'str'}, - 'packet_capture_error': {'key': 'packetCaptureError', 'type': '[str]'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - id: Optional[str] = None, - capture_start_time: Optional[datetime.datetime] = None, - packet_capture_status: Optional[Union[str, "PcStatus"]] = None, - stop_reason: Optional[str] = None, - packet_capture_error: Optional[List[Union[str, "PcError"]]] = None, - **kwargs - ): - super(PacketCaptureQueryStatusResult, self).__init__(**kwargs) - self.name = name - self.id = id - self.capture_start_time = capture_start_time - self.packet_capture_status = packet_capture_status - self.stop_reason = stop_reason - self.packet_capture_error = packet_capture_error - - -class PacketCaptureResult(msrest.serialization.Model): - """Information about packet capture session. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the packet capture session. - :vartype name: str - :ivar id: ID of the packet capture operation. - :vartype id: str - :param etag: - :type etag: str - :param target: The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_09_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - etag: Optional[str] = "A unique read-only string that changes whenever the resource is updated.", - target: Optional[str] = None, - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - storage_location: Optional["PacketCaptureStorageLocation"] = None, - filters: Optional[List["PacketCaptureFilter"]] = None, - provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, - **kwargs - ): - super(PacketCaptureResult, self).__init__(**kwargs) - self.name = None - self.id = None - self.etag = etag - self.target = target - self.bytes_to_capture_per_packet = bytes_to_capture_per_packet - self.total_bytes_per_session = total_bytes_per_session - self.time_limit_in_seconds = time_limit_in_seconds - self.storage_location = storage_location - self.filters = filters - self.provisioning_state = provisioning_state - - -class PacketCaptureResultProperties(PacketCaptureParameters): - """Describes the properties of a packet capture session. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_09_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_09_01.models.ProvisioningState - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - target: str, - storage_location: "PacketCaptureStorageLocation", - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - filters: Optional[List["PacketCaptureFilter"]] = None, - provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, - **kwargs - ): - super(PacketCaptureResultProperties, self).__init__(target=target, bytes_to_capture_per_packet=bytes_to_capture_per_packet, total_bytes_per_session=total_bytes_per_session, time_limit_in_seconds=time_limit_in_seconds, storage_location=storage_location, filters=filters, **kwargs) - self.provisioning_state = provisioning_state - - -class PacketCaptureStorageLocation(msrest.serialization.Model): - """Describes the storage location for a packet capture session. - - :param storage_id: The ID of the storage account to save the packet capture session. Required - if no local file path is provided. - :type storage_id: str - :param storage_path: The URI of the storage path to save the packet capture. Must be a - well-formed URI describing the location to save the packet capture. - :type storage_path: str - :param file_path: A valid local path on the targeting VM. Must include the name of the capture - file (*.cap). For linux virtual machine it must start with /var/captures. Required if no - storage ID is provided, otherwise optional. - :type file_path: str - """ - - _attribute_map = { - 'storage_id': {'key': 'storageId', 'type': 'str'}, - 'storage_path': {'key': 'storagePath', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - } - - def __init__( - self, - *, - storage_id: Optional[str] = None, - storage_path: Optional[str] = None, - file_path: Optional[str] = None, - **kwargs - ): - super(PacketCaptureStorageLocation, self).__init__(**kwargs) - self.storage_id = storage_id - self.storage_path = storage_path - self.file_path = file_path - - -class PatchRouteFilter(SubResource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar type: Resource type. - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - rules: Optional[List["RouteFilterRule"]] = None, - peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, - **kwargs - ): - super(PatchRouteFilter, self).__init__(id=id, **kwargs) - self.name = None - self.etag = None - self.type = None - self.tags = tags - self.rules = rules - self.peerings = peerings - self.provisioning_state = None - - -class PatchRouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_09_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - access: Optional[Union[str, "Access"]] = None, - route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, - communities: Optional[List[str]] = None, - **kwargs - ): - super(PatchRouteFilterRule, self).__init__(id=id, **kwargs) - self.name = None - self.etag = None - self.tags = tags - self.access = access - self.route_filter_rule_type = route_filter_rule_type - self.communities = communities - self.provisioning_state = None - - -class Probe(SubResource): - """A load balancer probe. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar load_balancing_rules: The load balancer rules that use this probe. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_09_01.models.SubResource] - :param protocol: The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' - is specified, a received ACK is required for the probe to be successful. If 'Http' is - specified, a 200 OK response from the specifies URI is required for the probe to be successful. - Possible values include: "Http", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.ProbeProtocol - :param port: The port for communicating the probe. Possible values range from 1 to 65535, - inclusive. - :type port: int - :param interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint - for health status. Typically, the interval is slightly less than half the allocated timeout - period (in seconds) which allows two full probes before taking the instance out of rotation. - The default value is 15, the minimum value is 5. - :type interval_in_seconds: int - :param number_of_probes: The number of probes where if no response, will result in stopping - further traffic from being delivered to the endpoint. This values allows endpoints to be taken - out of rotation faster or slower than the typical times used in Azure. - :type number_of_probes: int - :param request_path: The URI used for requesting health status from the VM. Path is required if - a protocol is set to http. Otherwise, it is not allowed. There is no default value. - :type request_path: str - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, - 'number_of_probes': {'key': 'properties.numberOfProbes', 'type': 'int'}, - 'request_path': {'key': 'properties.requestPath', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - protocol: Optional[Union[str, "ProbeProtocol"]] = None, - port: Optional[int] = None, - interval_in_seconds: Optional[int] = None, - number_of_probes: Optional[int] = None, - request_path: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(Probe, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.load_balancing_rules = None - self.protocol = protocol - self.port = port - self.interval_in_seconds = interval_in_seconds - self.number_of_probes = number_of_probes - self.request_path = request_path - self.provisioning_state = provisioning_state - - -class PublicIPAddress(Resource): - """Public IP address resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The public IP address SKU. - :type sku: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddressSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :param public_ip_allocation_method: The public IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type public_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param public_ip_address_version: The public IP address version. Possible values are: 'IPv4' - and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type public_ip_address_version: str or ~azure.mgmt.network.v2017_09_01.models.IPVersion - :ivar ip_configuration: The IP configuration associated with the public IP address. - :vartype ip_configuration: ~azure.mgmt.network.v2017_09_01.models.IPConfiguration - :param dns_settings: The FQDN of the DNS record associated with the public IP address. - :type dns_settings: ~azure.mgmt.network.v2017_09_01.models.PublicIPAddressDnsSettings - :param ip_address: The IP address associated with the public IP address resource. - :type ip_address: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param resource_guid: The resource GUID property of the public IP resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'PublicIPAddressSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'public_ip_allocation_method': {'key': 'properties.publicIPAllocationMethod', 'type': 'str'}, - 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, - 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["PublicIPAddressSku"] = None, - etag: Optional[str] = None, - zones: Optional[List[str]] = None, - public_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - public_ip_address_version: Optional[Union[str, "IPVersion"]] = None, - dns_settings: Optional["PublicIPAddressDnsSettings"] = None, - ip_address: Optional[str] = None, - idle_timeout_in_minutes: Optional[int] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(PublicIPAddress, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.sku = sku - self.etag = etag - self.zones = zones - self.public_ip_allocation_method = public_ip_allocation_method - self.public_ip_address_version = public_ip_address_version - self.ip_configuration = None - self.dns_settings = dns_settings - self.ip_address = ip_address - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class PublicIPAddressDnsSettings(msrest.serialization.Model): - """Contains FQDN of the DNS record associated with the public IP address. - - :param domain_name_label: Gets or sets the Domain name label.The concatenation of the domain - name label and the regionalized DNS zone make up the fully qualified domain name associated - with the public IP address. If a domain name label is specified, an A DNS record is created for - the public IP in the Microsoft Azure DNS system. - :type domain_name_label: str - :param fqdn: Gets the FQDN, Fully qualified domain name of the A DNS record associated with the - public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. - :type fqdn: str - :param reverse_fqdn: Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name - that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record - is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. - :type reverse_fqdn: str - """ - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'reverse_fqdn': {'key': 'reverseFqdn', 'type': 'str'}, - } - - def __init__( - self, - *, - domain_name_label: Optional[str] = None, - fqdn: Optional[str] = None, - reverse_fqdn: Optional[str] = None, - **kwargs - ): - super(PublicIPAddressDnsSettings, self).__init__(**kwargs) - self.domain_name_label = domain_name_label - self.fqdn = fqdn - self.reverse_fqdn = reverse_fqdn - - -class PublicIPAddressListResult(msrest.serialization.Model): - """Response for ListPublicIpAddresses API service call. - - :param value: A list of public IP addresses that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.PublicIPAddress] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["PublicIPAddress"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(PublicIPAddressListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class PublicIPAddressSku(msrest.serialization.Model): - """SKU of a public IP address. - - :param name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_09_01.models.PublicIPAddressSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "PublicIPAddressSkuName"]] = None, - **kwargs - ): - super(PublicIPAddressSku, self).__init__(**kwargs) - self.name = name - - -class QueryTroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to query the troubleshooting result. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource ID to query the troubleshooting - result. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - **kwargs - ): - super(QueryTroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - - -class ResourceNavigationLink(SubResource): - """ResourceNavigationLink resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param linked_resource_type: Resource type of the linked resource. - :type linked_resource_type: str - :param link: Link to the external resource. - :type link: str - :ivar provisioning_state: Provisioning state of the ResourceNavigationLink resource. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, - 'link': {'key': 'properties.link', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - linked_resource_type: Optional[str] = None, - link: Optional[str] = None, - **kwargs - ): - super(ResourceNavigationLink, self).__init__(id=id, **kwargs) - self.name = name - self.etag = None - self.linked_resource_type = linked_resource_type - self.link = link - self.provisioning_state = None - - -class RetentionPolicyParameters(msrest.serialization.Model): - """Parameters that define the retention policy for flow log. - - :param days: Number of days to retain flow log records. - :type days: int - :param enabled: Flag to enable/disable retention. - :type enabled: bool - """ - - _attribute_map = { - 'days': {'key': 'days', 'type': 'int'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__( - self, - *, - days: Optional[int] = 0, - enabled: Optional[bool] = False, - **kwargs - ): - super(RetentionPolicyParameters, self).__init__(**kwargs) - self.days = days - self.enabled = enabled - - -class Route(SubResource): - """Route resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The destination CIDR to which the route applies. - :type address_prefix: str - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_09_01.models.RouteNextHopType - :param next_hop_ip_address: The IP address packets should be forwarded to. Next hop values are - only allowed in routes where the next hop type is VirtualAppliance. - :type next_hop_ip_address: str - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'next_hop_type': {'key': 'properties.nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'properties.nextHopIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - address_prefix: Optional[str] = None, - next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, - next_hop_ip_address: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(Route, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.address_prefix = address_prefix - self.next_hop_type = next_hop_type - self.next_hop_ip_address = next_hop_ip_address - self.provisioning_state = provisioning_state - - -class RouteFilter(Resource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - rules: Optional[List["RouteFilterRule"]] = None, - peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, - **kwargs - ): - super(RouteFilter, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = None - self.rules = rules - self.peerings = peerings - self.provisioning_state = None - - -class RouteFilterListResult(msrest.serialization.Model): - """Response for the ListRouteFilters API service call. - - :param value: Gets a list of route filters in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.RouteFilter] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilter]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RouteFilter"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteFilterListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param location: Resource location. - :type location: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_09_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - access: Optional[Union[str, "Access"]] = None, - route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, - communities: Optional[List[str]] = None, - **kwargs - ): - super(RouteFilterRule, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.etag = None - self.tags = tags - self.access = access - self.route_filter_rule_type = route_filter_rule_type - self.communities = communities - self.provisioning_state = None - - -class RouteFilterRuleListResult(msrest.serialization.Model): - """Response for the ListRouteFilterRules API service call. - - :param value: Gets a list of RouteFilterRules in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.RouteFilterRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilterRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RouteFilterRule"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteFilterRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RouteListResult(msrest.serialization.Model): - """Response for the ListRoute API service call. - - :param value: Gets a list of routes in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Route] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Route]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Route"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RouteTable(Resource): - """Route table resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param routes: Collection of routes contained within a route table. - :type routes: list[~azure.mgmt.network.v2017_09_01.models.Route] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_09_01.models.Subnet] - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'routes': {'key': 'properties.routes', 'type': '[Route]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - routes: Optional[List["Route"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(RouteTable, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.routes = routes - self.subnets = None - self.provisioning_state = provisioning_state - - -class RouteTableListResult(msrest.serialization.Model): - """Response for the ListRouteTable API service call. - - :param value: Gets a list of route tables in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.RouteTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RouteTable"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteTableListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class SecurityGroupNetworkInterface(msrest.serialization.Model): - """Network interface and all its associated security rules. - - :param id: ID of the network interface. - :type id: str - :param security_rule_associations: All security rules associated with the network interface. - :type security_rule_associations: - ~azure.mgmt.network.v2017_09_01.models.SecurityRuleAssociations - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rule_associations': {'key': 'securityRuleAssociations', 'type': 'SecurityRuleAssociations'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - security_rule_associations: Optional["SecurityRuleAssociations"] = None, - **kwargs - ): - super(SecurityGroupNetworkInterface, self).__init__(**kwargs) - self.id = id - self.security_rule_associations = security_rule_associations - - -class SecurityGroupViewParameters(msrest.serialization.Model): - """Parameters that define the VM to check security groups for. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. ID of the target VM. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - **kwargs - ): - super(SecurityGroupViewParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - - -class SecurityGroupViewResult(msrest.serialization.Model): - """The information about security rules applied to the specified VM. - - :param network_interfaces: List of network interfaces on the specified VM. - :type network_interfaces: - list[~azure.mgmt.network.v2017_09_01.models.SecurityGroupNetworkInterface] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, - } - - def __init__( - self, - *, - network_interfaces: Optional[List["SecurityGroupNetworkInterface"]] = None, - **kwargs - ): - super(SecurityGroupViewResult, self).__init__(**kwargs) - self.network_interfaces = network_interfaces - - -class SecurityRule(SubResource): - """Network security rule. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param description: A description for this rule. Restricted to 140 chars. - :type description: str - :param protocol: Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and - '*'. Possible values include: "Tcp", "Udp", "*". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleProtocol - :param source_port_range: The source port or range. Integer or range between 0 and 65535. - Asterisk '*' can also be used to match all ports. - :type source_port_range: str - :param destination_port_range: The destination port or range. Integer or range between 0 and - 65535. Asterisk '*' can also be used to match all ports. - :type destination_port_range: str - :param source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to - match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - can also be used. If this is an ingress rule, specifies where network traffic originates from. - :type source_address_prefix: str - :param source_address_prefixes: The CIDR or source IP ranges. - :type source_address_prefixes: list[str] - :param source_application_security_groups: The application security group specified as source. - :type source_application_security_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] - :param destination_address_prefix: The destination address prefix. CIDR or destination IP - range. Asterisk '*' can also be used to match all source IPs. Default tags such as - 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - :type destination_address_prefix: str - :param destination_address_prefixes: The destination address prefixes. CIDR or destination IP - ranges. - :type destination_address_prefixes: list[str] - :param destination_application_security_groups: The application security group specified as - destination. - :type destination_application_security_groups: - list[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] - :param source_port_ranges: The source port ranges. - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. - :type destination_port_ranges: list[str] - :param access: The network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleAccess - :param priority: The priority of the rule. The value can be between 100 and 4096. The priority - number must be unique for each rule in the collection. The lower the priority number, the - higher the priority of the rule. - :type priority: int - :param direction: The direction of the rule. The direction specifies if rule will be evaluated - on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_09_01.models.SecurityRuleDirection - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'source_port_range': {'key': 'properties.sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'properties.destinationPortRange', 'type': 'str'}, - 'source_address_prefix': {'key': 'properties.sourceAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'properties.sourceAddressPrefixes', 'type': '[str]'}, - 'source_application_security_groups': {'key': 'properties.sourceApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'destination_address_prefix': {'key': 'properties.destinationAddressPrefix', 'type': 'str'}, - 'destination_address_prefixes': {'key': 'properties.destinationAddressPrefixes', 'type': '[str]'}, - 'destination_application_security_groups': {'key': 'properties.destinationApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'priority': {'key': 'properties.priority', 'type': 'int'}, - 'direction': {'key': 'properties.direction', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - description: Optional[str] = None, - protocol: Optional[Union[str, "SecurityRuleProtocol"]] = None, - source_port_range: Optional[str] = None, - destination_port_range: Optional[str] = None, - source_address_prefix: Optional[str] = None, - source_address_prefixes: Optional[List[str]] = None, - source_application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, - destination_address_prefix: Optional[str] = None, - destination_address_prefixes: Optional[List[str]] = None, - destination_application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, - source_port_ranges: Optional[List[str]] = None, - destination_port_ranges: Optional[List[str]] = None, - access: Optional[Union[str, "SecurityRuleAccess"]] = None, - priority: Optional[int] = None, - direction: Optional[Union[str, "SecurityRuleDirection"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(SecurityRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.description = description - self.protocol = protocol - self.source_port_range = source_port_range - self.destination_port_range = destination_port_range - self.source_address_prefix = source_address_prefix - self.source_address_prefixes = source_address_prefixes - self.source_application_security_groups = source_application_security_groups - self.destination_address_prefix = destination_address_prefix - self.destination_address_prefixes = destination_address_prefixes - self.destination_application_security_groups = destination_application_security_groups - self.source_port_ranges = source_port_ranges - self.destination_port_ranges = destination_port_ranges - self.access = access - self.priority = priority - self.direction = direction - self.provisioning_state = provisioning_state - - -class SecurityRuleAssociations(msrest.serialization.Model): - """All security rules associated with the network interface. - - :param network_interface_association: Network interface and its custom security rules. - :type network_interface_association: - ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceAssociation - :param subnet_association: Network interface and its custom security rules. - :type subnet_association: ~azure.mgmt.network.v2017_09_01.models.SubnetAssociation - :param default_security_rules: Collection of default security rules of the network security - group. - :type default_security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - :param effective_security_rules: Collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityRule] - """ - - _attribute_map = { - 'network_interface_association': {'key': 'networkInterfaceAssociation', 'type': 'NetworkInterfaceAssociation'}, - 'subnet_association': {'key': 'subnetAssociation', 'type': 'SubnetAssociation'}, - 'default_security_rules': {'key': 'defaultSecurityRules', 'type': '[SecurityRule]'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - } - - def __init__( - self, - *, - network_interface_association: Optional["NetworkInterfaceAssociation"] = None, - subnet_association: Optional["SubnetAssociation"] = None, - default_security_rules: Optional[List["SecurityRule"]] = None, - effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, - **kwargs - ): - super(SecurityRuleAssociations, self).__init__(**kwargs) - self.network_interface_association = network_interface_association - self.subnet_association = subnet_association - self.default_security_rules = default_security_rules - self.effective_security_rules = effective_security_rules - - -class SecurityRuleListResult(msrest.serialization.Model): - """Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. - - :param value: The security rules in a network security group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["SecurityRule"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(SecurityRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ServiceEndpointPropertiesFormat(msrest.serialization.Model): - """The service endpoint properties. - - :param service: The type of the endpoint service. - :type service: str - :param locations: A list of locations. - :type locations: list[str] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'service': {'key': 'service', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - service: Optional[str] = None, - locations: Optional[List[str]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ServiceEndpointPropertiesFormat, self).__init__(**kwargs) - self.service = service - self.locations = locations - self.provisioning_state = provisioning_state - - -class Subnet(SubResource): - """Subnet in a virtual network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The address prefix for the subnet. - :type address_prefix: str - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup - :param route_table: The reference of the RouteTable resource. - :type route_table: ~azure.mgmt.network.v2017_09_01.models.RouteTable - :param service_endpoints: An array of service endpoints. - :type service_endpoints: - list[~azure.mgmt.network.v2017_09_01.models.ServiceEndpointPropertiesFormat] - :ivar ip_configurations: Gets an array of references to the network interface IP configurations - using subnet. - :vartype ip_configurations: list[~azure.mgmt.network.v2017_09_01.models.IPConfiguration] - :param resource_navigation_links: Gets an array of references to the external resources using - subnet. - :type resource_navigation_links: - list[~azure.mgmt.network.v2017_09_01.models.ResourceNavigationLink] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'ip_configurations': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, - 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, - 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - address_prefix: Optional[str] = None, - network_security_group: Optional["NetworkSecurityGroup"] = None, - route_table: Optional["RouteTable"] = None, - service_endpoints: Optional[List["ServiceEndpointPropertiesFormat"]] = None, - resource_navigation_links: Optional[List["ResourceNavigationLink"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(Subnet, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.address_prefix = address_prefix - self.network_security_group = network_security_group - self.route_table = route_table - self.service_endpoints = service_endpoints - self.ip_configurations = None - self.resource_navigation_links = resource_navigation_links - self.provisioning_state = provisioning_state - - -class SubnetAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Subnet ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_09_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - *, - security_rules: Optional[List["SecurityRule"]] = None, - **kwargs - ): - super(SubnetAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = security_rules - - -class SubnetListResult(msrest.serialization.Model): - """Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. - - :param value: The subnets in a virtual network. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Subnet] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Subnet]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Subnet"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(SubnetListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class TagsObject(msrest.serialization.Model): - """Tags object for patch operations. - - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(TagsObject, self).__init__(**kwargs) - self.tags = tags - - -class Topology(msrest.serialization.Model): - """Topology of the specified resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: GUID representing the operation id. - :vartype id: str - :ivar created_date_time: The datetime when the topology was initially created for the resource - group. - :vartype created_date_time: ~datetime.datetime - :ivar last_modified: The datetime when the topology was last modified. - :vartype last_modified: ~datetime.datetime - :param resources: - :type resources: list[~azure.mgmt.network.v2017_09_01.models.TopologyResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'last_modified': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, - 'resources': {'key': 'resources', 'type': '[TopologyResource]'}, - } - - def __init__( - self, - *, - resources: Optional[List["TopologyResource"]] = None, - **kwargs - ): - super(Topology, self).__init__(**kwargs) - self.id = None - self.created_date_time = None - self.last_modified = None - self.resources = resources - - -class TopologyAssociation(msrest.serialization.Model): - """Resources that have an association with the parent resource. - - :param name: The name of the resource that is associated with the parent resource. - :type name: str - :param resource_id: The ID of the resource that is associated with the parent resource. - :type resource_id: str - :param association_type: The association type of the child resource to the parent resource. - Possible values include: "Associated", "Contains". - :type association_type: str or ~azure.mgmt.network.v2017_09_01.models.AssociationType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'association_type': {'key': 'associationType', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - resource_id: Optional[str] = None, - association_type: Optional[Union[str, "AssociationType"]] = None, - **kwargs - ): - super(TopologyAssociation, self).__init__(**kwargs) - self.name = name - self.resource_id = resource_id - self.association_type = association_type - - -class TopologyParameters(msrest.serialization.Model): - """Parameters that define the representation of topology. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_group_name: Required. The name of the target resource group to perform - topology on. - :type target_resource_group_name: str - """ - - _validation = { - 'target_resource_group_name': {'required': True}, - } - - _attribute_map = { - 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_group_name: str, - **kwargs - ): - super(TopologyParameters, self).__init__(**kwargs) - self.target_resource_group_name = target_resource_group_name - - -class TopologyResource(msrest.serialization.Model): - """The network resource topology information for the given resource group. - - :param name: Name of the resource. - :type name: str - :param id: ID of the resource. - :type id: str - :param location: Resource location. - :type location: str - :param associations: Holds the associations the resource has with other resources in the - resource group. - :type associations: list[~azure.mgmt.network.v2017_09_01.models.TopologyAssociation] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - id: Optional[str] = None, - location: Optional[str] = None, - associations: Optional[List["TopologyAssociation"]] = None, - **kwargs - ): - super(TopologyResource, self).__init__(**kwargs) - self.name = name - self.id = id - self.location = location - self.associations = associations - - -class TroubleshootingDetails(msrest.serialization.Model): - """Information gained from troubleshooting of specified resource. - - :param id: The id of the get troubleshoot operation. - :type id: str - :param reason_type: Reason type of failure. - :type reason_type: str - :param summary: A summary of troubleshooting. - :type summary: str - :param detail: Details on troubleshooting results. - :type detail: str - :param recommended_actions: List of recommended actions. - :type recommended_actions: - list[~azure.mgmt.network.v2017_09_01.models.TroubleshootingRecommendedActions] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'reason_type': {'key': 'reasonType', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': 'str'}, - 'detail': {'key': 'detail', 'type': 'str'}, - 'recommended_actions': {'key': 'recommendedActions', 'type': '[TroubleshootingRecommendedActions]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - reason_type: Optional[str] = None, - summary: Optional[str] = None, - detail: Optional[str] = None, - recommended_actions: Optional[List["TroubleshootingRecommendedActions"]] = None, - **kwargs - ): - super(TroubleshootingDetails, self).__init__(**kwargs) - self.id = id - self.reason_type = reason_type - self.summary = summary - self.detail = detail - self.recommended_actions = recommended_actions - - -class TroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to troubleshoot. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource to troubleshoot. - :type target_resource_id: str - :param storage_id: Required. The ID for the storage account to save the troubleshoot result. - :type storage_id: str - :param storage_path: Required. The path to the blob to save the troubleshoot result in. - :type storage_path: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'storage_path': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'storage_path': {'key': 'properties.storagePath', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - storage_id: str, - storage_path: str, - **kwargs - ): - super(TroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.storage_id = storage_id - self.storage_path = storage_path - - -class TroubleshootingRecommendedActions(msrest.serialization.Model): - """Recommended actions based on discovered issues. - - :param action_id: ID of the recommended action. - :type action_id: str - :param action_text: Description of recommended actions. - :type action_text: str - :param action_uri: The uri linking to a documentation for the recommended troubleshooting - actions. - :type action_uri: str - :param action_uri_text: The information from the URI for the recommended troubleshooting - actions. - :type action_uri_text: str - """ - - _attribute_map = { - 'action_id': {'key': 'actionId', 'type': 'str'}, - 'action_text': {'key': 'actionText', 'type': 'str'}, - 'action_uri': {'key': 'actionUri', 'type': 'str'}, - 'action_uri_text': {'key': 'actionUriText', 'type': 'str'}, - } - - def __init__( - self, - *, - action_id: Optional[str] = None, - action_text: Optional[str] = None, - action_uri: Optional[str] = None, - action_uri_text: Optional[str] = None, - **kwargs - ): - super(TroubleshootingRecommendedActions, self).__init__(**kwargs) - self.action_id = action_id - self.action_text = action_text - self.action_uri = action_uri - self.action_uri_text = action_uri_text - - -class TroubleshootingResult(msrest.serialization.Model): - """Troubleshooting information gained from specified resource. - - :param start_time: The start time of the troubleshooting. - :type start_time: ~datetime.datetime - :param end_time: The end time of the troubleshooting. - :type end_time: ~datetime.datetime - :param code: The result code of the troubleshooting. - :type code: str - :param results: Information from troubleshooting. - :type results: list[~azure.mgmt.network.v2017_09_01.models.TroubleshootingDetails] - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - code: Optional[str] = None, - results: Optional[List["TroubleshootingDetails"]] = None, - **kwargs - ): - super(TroubleshootingResult, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.code = code - self.results = results - - -class TunnelConnectionHealth(msrest.serialization.Model): - """VirtualNetworkGatewayConnection properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar tunnel: Tunnel name. - :vartype tunnel: str - :ivar connection_status: Virtual network Gateway connection status. Possible values include: - "Unknown", "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionStatus - :ivar ingress_bytes_transferred: The Ingress Bytes Transferred in this connection. - :vartype ingress_bytes_transferred: long - :ivar egress_bytes_transferred: The Egress Bytes Transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar last_connection_established_utc_time: The time at which connection was established in Utc - format. - :vartype last_connection_established_utc_time: str - """ - - _validation = { - 'tunnel': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'last_connection_established_utc_time': {'readonly': True}, - } - - _attribute_map = { - 'tunnel': {'key': 'tunnel', 'type': 'str'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, - 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, - 'last_connection_established_utc_time': {'key': 'lastConnectionEstablishedUtcTime', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TunnelConnectionHealth, self).__init__(**kwargs) - self.tunnel = None - self.connection_status = None - self.ingress_bytes_transferred = None - self.egress_bytes_transferred = None - self.last_connection_established_utc_time = None - - -class Usage(msrest.serialization.Model): - """Describes network resource usage. - - 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. - - :ivar id: Resource identifier. - :vartype id: str - :param unit: Required. An enum describing the unit of measurement. Possible values include: - "Count". - :type unit: str or ~azure.mgmt.network.v2017_09_01.models.UsageUnit - :param current_value: Required. The current value of the usage. - :type current_value: long - :param limit: Required. The limit of usage. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.network.v2017_09_01.models.UsageName - """ - - _validation = { - 'id': {'readonly': True}, - 'unit': {'required': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - def __init__( - self, - *, - unit: Union[str, "UsageUnit"], - current_value: int, - limit: int, - name: "UsageName", - **kwargs - ): - super(Usage, self).__init__(**kwargs) - self.id = None - self.unit = unit - self.current_value = current_value - self.limit = limit - self.name = name - - -class UsageName(msrest.serialization.Model): - """The usage names. - - :param value: A string describing the resource name. - :type value: str - :param localized_value: A localized string describing the resource name. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - localized_value: Optional[str] = None, - **kwargs - ): - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class UsagesListResult(msrest.serialization.Model): - """The list usages operation response. - - :param value: The list network resource usages. - :type value: list[~azure.mgmt.network.v2017_09_01.models.Usage] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Usage"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(UsagesListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class VerificationIPFlowParameters(msrest.serialization.Model): - """Parameters that define the IP flow to be verified. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the target resource to perform next-hop on. - :type target_resource_id: str - :param direction: Required. The direction of the packet represented as a 5-tuple. Possible - values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_09_01.models.Direction - :param protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". - :type protocol: str or ~azure.mgmt.network.v2017_09_01.models.Protocol - :param local_port: Required. The local port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type local_port: str - :param remote_port: Required. The remote port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type remote_port: str - :param local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 - addresses. - :type local_ip_address: str - :param remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 - addresses. - :type remote_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of them, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'direction': {'required': True}, - 'protocol': {'required': True}, - 'local_port': {'required': True}, - 'remote_port': {'required': True}, - 'local_ip_address': {'required': True}, - 'remote_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'direction': {'key': 'direction', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - direction: Union[str, "Direction"], - protocol: Union[str, "Protocol"], - local_port: str, - remote_port: str, - local_ip_address: str, - remote_ip_address: str, - target_nic_resource_id: Optional[str] = None, - **kwargs - ): - super(VerificationIPFlowParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.direction = direction - self.protocol = protocol - self.local_port = local_port - self.remote_port = remote_port - self.local_ip_address = local_ip_address - self.remote_ip_address = remote_ip_address - self.target_nic_resource_id = target_nic_resource_id - - -class VerificationIPFlowResult(msrest.serialization.Model): - """Results of IP flow verification on the target resource. - - :param access: Indicates whether the traffic is allowed or denied. Possible values include: - "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_09_01.models.Access - :param rule_name: Name of the rule. If input is not matched against any security rule, it is - not displayed. - :type rule_name: str - """ - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'rule_name': {'key': 'ruleName', 'type': 'str'}, - } - - def __init__( - self, - *, - access: Optional[Union[str, "Access"]] = None, - rule_name: Optional[str] = None, - **kwargs - ): - super(VerificationIPFlowResult, self).__init__(**kwargs) - self.access = access - self.rule_name = rule_name - - -class VirtualNetwork(Resource): - """Virtual Network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_space: The AddressSpace that contains an array of IP address ranges that can be - used by subnets. - :type address_space: ~azure.mgmt.network.v2017_09_01.models.AddressSpace - :param dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs - deployed in the virtual network. - :type dhcp_options: ~azure.mgmt.network.v2017_09_01.models.DhcpOptions - :param subnets: A list of subnets in a Virtual Network. - :type subnets: list[~azure.mgmt.network.v2017_09_01.models.Subnet] - :param virtual_network_peerings: A list of peerings in a Virtual Network. - :type virtual_network_peerings: - list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering] - :param resource_guid: The resourceGuid property of the Virtual Network resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param enable_ddos_protection: Indicates if DDoS protection is enabled for all the protected - resources in a Virtual Network. - :type enable_ddos_protection: bool - :param enable_vm_protection: Indicates if Vm protection is enabled for all the subnets in a - Virtual Network. - :type enable_vm_protection: bool - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, - 'dhcp_options': {'key': 'properties.dhcpOptions', 'type': 'DhcpOptions'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'virtual_network_peerings': {'key': 'properties.virtualNetworkPeerings', 'type': '[VirtualNetworkPeering]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'enable_ddos_protection': {'key': 'properties.enableDdosProtection', 'type': 'bool'}, - 'enable_vm_protection': {'key': 'properties.enableVmProtection', 'type': 'bool'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - address_space: Optional["AddressSpace"] = None, - dhcp_options: Optional["DhcpOptions"] = None, - subnets: Optional[List["Subnet"]] = None, - virtual_network_peerings: Optional[List["VirtualNetworkPeering"]] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - enable_ddos_protection: Optional[bool] = None, - enable_vm_protection: Optional[bool] = None, - **kwargs - ): - super(VirtualNetwork, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.address_space = address_space - self.dhcp_options = dhcp_options - self.subnets = subnets - self.virtual_network_peerings = virtual_network_peerings - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - self.enable_ddos_protection = enable_ddos_protection - self.enable_vm_protection = enable_vm_protection - - -class VirtualNetworkConnectionGatewayReference(msrest.serialization.Model): - """A reference to VirtualNetworkGateway or LocalNetworkGateway resource. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: str, - **kwargs - ): - super(VirtualNetworkConnectionGatewayReference, self).__init__(**kwargs) - self.id = id - - -class VirtualNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param ip_configurations: IP configurations for virtual network gateway. - :type ip_configurations: - list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayIPConfiguration] - :param gateway_type: The type of this virtual network gateway. Possible values are: 'Vpn' and - 'ExpressRoute'. Possible values include: "Vpn", "ExpressRoute". - :type gateway_type: str or ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayType - :param vpn_type: The type of this virtual network gateway. Possible values are: 'PolicyBased' - and 'RouteBased'. Possible values include: "PolicyBased", "RouteBased". - :type vpn_type: str or ~azure.mgmt.network.v2017_09_01.models.VpnType - :param enable_bgp: Whether BGP is enabled for this virtual network gateway or not. - :type enable_bgp: bool - :param active: ActiveActive flag. - :type active: bool - :param gateway_default_site: The reference of the LocalNetworkGateway resource which represents - local network site having default routes. Assign Null value in case of removing existing - default site setting. - :type gateway_default_site: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param sku: The reference of the VirtualNetworkGatewaySku resource which represents the SKU - selected for Virtual network gateway. - :type sku: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewaySku - :param vpn_client_configuration: The reference of the VpnClientConfiguration resource which - represents the P2S VpnClient configurations. - :type vpn_client_configuration: ~azure.mgmt.network.v2017_09_01.models.VpnClientConfiguration - :param bgp_settings: Virtual network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_09_01.models.BgpSettings - :param resource_guid: The resource GUID property of the VirtualNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGateway resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualNetworkGatewayIPConfiguration]'}, - 'gateway_type': {'key': 'properties.gatewayType', 'type': 'str'}, - 'vpn_type': {'key': 'properties.vpnType', 'type': 'str'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'active': {'key': 'properties.activeActive', 'type': 'bool'}, - 'gateway_default_site': {'key': 'properties.gatewayDefaultSite', 'type': 'SubResource'}, - 'sku': {'key': 'properties.sku', 'type': 'VirtualNetworkGatewaySku'}, - 'vpn_client_configuration': {'key': 'properties.vpnClientConfiguration', 'type': 'VpnClientConfiguration'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - ip_configurations: Optional[List["VirtualNetworkGatewayIPConfiguration"]] = None, - gateway_type: Optional[Union[str, "VirtualNetworkGatewayType"]] = None, - vpn_type: Optional[Union[str, "VpnType"]] = None, - enable_bgp: Optional[bool] = None, - active: Optional[bool] = None, - gateway_default_site: Optional["SubResource"] = None, - sku: Optional["VirtualNetworkGatewaySku"] = None, - vpn_client_configuration: Optional["VpnClientConfiguration"] = None, - bgp_settings: Optional["BgpSettings"] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.ip_configurations = ip_configurations - self.gateway_type = gateway_type - self.vpn_type = vpn_type - self.enable_bgp = enable_bgp - self.active = active - self.gateway_default_site = gateway_default_site - self.sku = sku - self.vpn_client_configuration = vpn_client_configuration - self.bgp_settings = bgp_settings - self.resource_guid = resource_guid - self.provisioning_state = None - - -class VirtualNetworkGatewayConnection(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: ~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_09_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_09_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkGateway'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkGateway'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'LocalNetworkGateway'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - virtual_network_gateway1: "VirtualNetworkGateway", - connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - authorization_key: Optional[str] = None, - virtual_network_gateway2: Optional["VirtualNetworkGateway"] = None, - local_network_gateway2: Optional["LocalNetworkGateway"] = None, - routing_weight: Optional[int] = None, - shared_key: Optional[str] = None, - peer: Optional["SubResource"] = None, - enable_bgp: Optional[bool] = None, - use_policy_based_traffic_selectors: Optional[bool] = None, - ipsec_policies: Optional[List["IpsecPolicy"]] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkGatewayConnection, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.authorization_key = authorization_key - self.virtual_network_gateway1 = virtual_network_gateway1 - self.virtual_network_gateway2 = virtual_network_gateway2 - self.local_network_gateway2 = local_network_gateway2 - self.connection_type = connection_type - self.routing_weight = routing_weight - self.shared_key = shared_key - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = peer - self.enable_bgp = enable_bgp - self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors - self.ipsec_policies = ipsec_policies - self.resource_guid = resource_guid - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListEntity(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkConnectionGatewayReference - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkConnectionGatewayReference - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkConnectionGatewayReference - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_09_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_09_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - virtual_network_gateway1: "VirtualNetworkConnectionGatewayReference", - connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - authorization_key: Optional[str] = None, - virtual_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, - local_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, - routing_weight: Optional[int] = None, - shared_key: Optional[str] = None, - peer: Optional["SubResource"] = None, - enable_bgp: Optional[bool] = None, - use_policy_based_traffic_selectors: Optional[bool] = None, - ipsec_policies: Optional[List["IpsecPolicy"]] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListEntity, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.authorization_key = authorization_key - self.virtual_network_gateway1 = virtual_network_gateway1 - self.virtual_network_gateway2 = virtual_network_gateway2 - self.local_network_gateway2 = local_network_gateway2 - self.connection_type = connection_type - self.routing_weight = routing_weight - self.shared_key = shared_key - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = peer - self.enable_bgp = enable_bgp - self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors - self.ipsec_policies = ipsec_policies - self.resource_guid = resource_guid - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGatewayConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnection] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnection]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkGatewayConnection"]] = None, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class VirtualNetworkGatewayIPConfiguration(SubResource): - """IP configuration for virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_09_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_09_01.models.SubResource - :ivar provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["SubResource"] = None, - public_ip_address: Optional["SubResource"] = None, - **kwargs - ): - super(VirtualNetworkGatewayIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = None - - -class VirtualNetworkGatewayListConnectionsResult(msrest.serialization.Model): - """Response for the VirtualNetworkGatewayListConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: - list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayConnectionListEntity] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnectionListEntity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkGatewayConnectionListEntity"]] = None, - **kwargs - ): - super(VirtualNetworkGatewayListConnectionsResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class VirtualNetworkGatewayListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGateway resources that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkGateway"]] = None, - **kwargs - ): - super(VirtualNetworkGatewayListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class VirtualNetworkGatewaySku(msrest.serialization.Model): - """VirtualNetworkGatewaySku details. - - :param name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type name: str or ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewaySkuName - :param tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type tier: str or ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewaySkuTier - :param capacity: The capacity. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "VirtualNetworkGatewaySkuName"]] = None, - tier: Optional[Union[str, "VirtualNetworkGatewaySkuTier"]] = None, - capacity: Optional[int] = None, - **kwargs - ): - super(VirtualNetworkGatewaySku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - - -class VirtualNetworkListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworks API service call. - - :param value: Gets a list of VirtualNetwork resources in a resource group. - :type value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetwork] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetwork"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class VirtualNetworkListUsageResult(msrest.serialization.Model): - """Response for the virtual networks GetUsage API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: VirtualNetwork usage stats. - :vartype value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkUsage] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkListUsageResult, self).__init__(**kwargs) - self.value = None - self.next_link = next_link - - -class VirtualNetworkPeering(SubResource): - """Peerings in a virtual network resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allow_virtual_network_access: Whether the VMs in the linked virtual network space would - be able to access all the VMs in local Virtual network space. - :type allow_virtual_network_access: bool - :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the remote - virtual network will be allowed/disallowed. - :type allow_forwarded_traffic: bool - :param allow_gateway_transit: If gateway links can be used in remote virtual networking to link - to this virtual network. - :type allow_gateway_transit: bool - :param use_remote_gateways: If remote gateways can be used on this virtual network. If the flag - is set to true, and allowGatewayTransit on remote peering is also true, virtual network will - use gateways of remote virtual network for transit. Only one peering can have this flag set to - true. This flag cannot be set if virtual network already has a gateway. - :type use_remote_gateways: bool - :param remote_virtual_network: The reference of the remote virtual network. The remote virtual - network can be in the same or different region (preview). See here to register for the preview - and learn more - (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). - :type remote_virtual_network: ~azure.mgmt.network.v2017_09_01.models.SubResource - :param remote_address_space: The reference of the remote virtual network address space. - :type remote_address_space: ~azure.mgmt.network.v2017_09_01.models.AddressSpace - :param peering_state: The status of the virtual network peering. Possible values are - 'Initiated', 'Connected', and 'Disconnected'. Possible values include: "Initiated", - "Connected", "Disconnected". - :type peering_state: str or ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeeringState - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, - 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, - 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, - 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, - 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, - 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, - 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - allow_virtual_network_access: Optional[bool] = None, - allow_forwarded_traffic: Optional[bool] = None, - allow_gateway_transit: Optional[bool] = None, - use_remote_gateways: Optional[bool] = None, - remote_virtual_network: Optional["SubResource"] = None, - remote_address_space: Optional["AddressSpace"] = None, - peering_state: Optional[Union[str, "VirtualNetworkPeeringState"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkPeering, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.allow_virtual_network_access = allow_virtual_network_access - self.allow_forwarded_traffic = allow_forwarded_traffic - self.allow_gateway_transit = allow_gateway_transit - self.use_remote_gateways = use_remote_gateways - self.remote_virtual_network = remote_virtual_network - self.remote_address_space = remote_address_space - self.peering_state = peering_state - self.provisioning_state = provisioning_state - - -class VirtualNetworkPeeringListResult(msrest.serialization.Model): - """Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. - - :param value: The peerings in a virtual network. - :type value: list[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkPeering"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkPeeringListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class VirtualNetworkUsage(msrest.serialization.Model): - """Usage details for subnet. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar current_value: Indicates number of IPs used from the Subnet. - :vartype current_value: float - :ivar id: Subnet identifier. - :vartype id: str - :ivar limit: Indicates the size of the subnet. - :vartype limit: float - :ivar name: The name containing common and localized value for usage. - :vartype name: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkUsageName - :ivar unit: Usage units. Returns 'Count'. - :vartype unit: str - """ - - _validation = { - 'current_value': {'readonly': True}, - 'id': {'readonly': True}, - 'limit': {'readonly': True}, - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'id': {'key': 'id', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'name': {'key': 'name', 'type': 'VirtualNetworkUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsage, self).__init__(**kwargs) - self.current_value = None - self.id = None - self.limit = None - self.name = None - self.unit = None - - -class VirtualNetworkUsageName(msrest.serialization.Model): - """Usage strings container. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar localized_value: Localized subnet size and usage string. - :vartype localized_value: str - :ivar value: Subnet size and usage string. - :vartype value: str - """ - - _validation = { - 'localized_value': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsageName, self).__init__(**kwargs) - self.localized_value = None - self.value = None - - -class VpnClientConfiguration(msrest.serialization.Model): - """VpnClientConfiguration for P2S client. - - :param vpn_client_address_pool: The reference of the address space resource which represents - Address space for P2S VpnClient. - :type vpn_client_address_pool: ~azure.mgmt.network.v2017_09_01.models.AddressSpace - :param vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. - :type vpn_client_root_certificates: - list[~azure.mgmt.network.v2017_09_01.models.VpnClientRootCertificate] - :param vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network - gateway. - :type vpn_client_revoked_certificates: - list[~azure.mgmt.network.v2017_09_01.models.VpnClientRevokedCertificate] - :param vpn_client_protocols: VpnClientProtocols for Virtual network gateway. - :type vpn_client_protocols: list[str or - ~azure.mgmt.network.v2017_09_01.models.VpnClientProtocol] - :param radius_server_address: The radius server address property of the VirtualNetworkGateway - resource for vpn client connection. - :type radius_server_address: str - :param radius_server_secret: The radius secret property of the VirtualNetworkGateway resource - for vpn client connection. - :type radius_server_secret: str - """ - - _attribute_map = { - 'vpn_client_address_pool': {'key': 'vpnClientAddressPool', 'type': 'AddressSpace'}, - 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, - 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, - 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, - 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, - 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, - } - - def __init__( - self, - *, - vpn_client_address_pool: Optional["AddressSpace"] = None, - vpn_client_root_certificates: Optional[List["VpnClientRootCertificate"]] = None, - vpn_client_revoked_certificates: Optional[List["VpnClientRevokedCertificate"]] = None, - vpn_client_protocols: Optional[List[Union[str, "VpnClientProtocol"]]] = None, - radius_server_address: Optional[str] = None, - radius_server_secret: Optional[str] = None, - **kwargs - ): - super(VpnClientConfiguration, self).__init__(**kwargs) - self.vpn_client_address_pool = vpn_client_address_pool - self.vpn_client_root_certificates = vpn_client_root_certificates - self.vpn_client_revoked_certificates = vpn_client_revoked_certificates - self.vpn_client_protocols = vpn_client_protocols - self.radius_server_address = radius_server_address - self.radius_server_secret = radius_server_secret - - -class VpnClientParameters(msrest.serialization.Model): - """Vpn Client Parameters for package generation. - - :param processor_architecture: VPN client Processor Architecture. Possible values are: 'AMD64' - and 'X86'. Possible values include: "Amd64", "X86". - :type processor_architecture: str or - ~azure.mgmt.network.v2017_09_01.models.ProcessorArchitecture - :param authentication_method: VPN client Authentication Method. Possible values are: 'EAPTLS' - and 'EAPMSCHAPv2'. Possible values include: "EAPTLS", "EAPMSCHAPv2". - :type authentication_method: str or ~azure.mgmt.network.v2017_09_01.models.AuthenticationMethod - :param radius_server_auth_certificate: The public certificate data for the radius server - authentication certificate as a Base-64 encoded string. Required only if external radius - authentication has been configured with EAPTLS authentication. - :type radius_server_auth_certificate: str - :param client_root_certificates: A list of client root certificates public certificate data - encoded as Base-64 strings. Optional parameter for external radius based authentication with - EAPTLS. - :type client_root_certificates: list[str] - """ - - _attribute_map = { - 'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'}, - 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, - 'radius_server_auth_certificate': {'key': 'radiusServerAuthCertificate', 'type': 'str'}, - 'client_root_certificates': {'key': 'clientRootCertificates', 'type': '[str]'}, - } - - def __init__( - self, - *, - processor_architecture: Optional[Union[str, "ProcessorArchitecture"]] = None, - authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, - radius_server_auth_certificate: Optional[str] = None, - client_root_certificates: Optional[List[str]] = None, - **kwargs - ): - super(VpnClientParameters, self).__init__(**kwargs) - self.processor_architecture = processor_architecture - self.authentication_method = authentication_method - self.radius_server_auth_certificate = radius_server_auth_certificate - self.client_root_certificates = client_root_certificates - - -class VpnClientRevokedCertificate(SubResource): - """VPN client revoked certificate of virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param thumbprint: The revoked VPN client certificate thumbprint. - :type thumbprint: str - :ivar provisioning_state: The provisioning state of the VPN client revoked certificate - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - thumbprint: Optional[str] = None, - **kwargs - ): - super(VpnClientRevokedCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.thumbprint = thumbprint - self.provisioning_state = None - - -class VpnClientRootCertificate(SubResource): - """VPN client root certificate of virtual network gateway. - - 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 id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param public_cert_data: Required. The certificate public data. - :type public_cert_data: str - :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'public_cert_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - public_cert_data: str, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - **kwargs - ): - super(VpnClientRootCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.public_cert_data = public_cert_data - self.provisioning_state = None - - -class VpnDeviceScriptParameters(msrest.serialization.Model): - """Vpn device configuration script generation parameters. - - :param vendor: The vendor for the vpn device. - :type vendor: str - :param device_family: The device family for the vpn device. - :type device_family: str - :param firmware_version: The firmware version for the vpn device. - :type firmware_version: str - """ - - _attribute_map = { - 'vendor': {'key': 'vendor', 'type': 'str'}, - 'device_family': {'key': 'deviceFamily', 'type': 'str'}, - 'firmware_version': {'key': 'firmwareVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - vendor: Optional[str] = None, - device_family: Optional[str] = None, - firmware_version: Optional[str] = None, - **kwargs - ): - super(VpnDeviceScriptParameters, self).__init__(**kwargs) - self.vendor = vendor - self.device_family = device_family - self.firmware_version = firmware_version diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_network_management_client_enums.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_network_management_client_enums.py deleted file mode 100644 index de7916b9d953..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/models/_network_management_client_enums.py +++ /dev/null @@ -1,624 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum, EnumMeta -from six import with_metaclass - -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class Access(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Indicates whether the traffic is allowed or denied. - """ - - ALLOW = "Allow" - DENY = "Deny" - -class ApplicationGatewayBackendHealthServerHealth(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Health of backend server. - """ - - UNKNOWN = "Unknown" - UP = "Up" - DOWN = "Down" - PARTIAL = "Partial" - DRAINING = "Draining" - -class ApplicationGatewayCookieBasedAffinity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Cookie based affinity. - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class ApplicationGatewayFirewallMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Web application firewall mode. - """ - - DETECTION = "Detection" - PREVENTION = "Prevention" - -class ApplicationGatewayOperationalState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Operational state of the application gateway resource. - """ - - STOPPED = "Stopped" - STARTING = "Starting" - RUNNING = "Running" - STOPPING = "Stopping" - -class ApplicationGatewayProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protocol. - """ - - HTTP = "Http" - HTTPS = "Https" - -class ApplicationGatewayRedirectType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - PERMANENT = "Permanent" - FOUND = "Found" - SEE_OTHER = "SeeOther" - TEMPORARY = "Temporary" - -class ApplicationGatewayRequestRoutingRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Rule type. - """ - - BASIC = "Basic" - PATH_BASED_ROUTING = "PathBasedRouting" - -class ApplicationGatewaySkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Name of an application gateway SKU. - """ - - STANDARD_SMALL = "Standard_Small" - STANDARD_MEDIUM = "Standard_Medium" - STANDARD_LARGE = "Standard_Large" - WAF_MEDIUM = "WAF_Medium" - WAF_LARGE = "WAF_Large" - -class ApplicationGatewaySslCipherSuite(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Ssl cipher suites enums. - """ - - TLS_ECDHE_RSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - TLS_ECDHE_RSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - TLS_ECDHE_RSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - TLS_ECDHE_RSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - TLS_DHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - TLS_DHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - TLS_DHE_RSA_WITH_AES256_CBC_SHA = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - TLS_DHE_RSA_WITH_AES128_CBC_SHA = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - TLS_RSA_WITH_AES256_GCM_SHA384 = "TLS_RSA_WITH_AES_256_GCM_SHA384" - TLS_RSA_WITH_AES128_GCM_SHA256 = "TLS_RSA_WITH_AES_128_GCM_SHA256" - TLS_RSA_WITH_AES256_CBC_SHA256 = "TLS_RSA_WITH_AES_256_CBC_SHA256" - TLS_RSA_WITH_AES128_CBC_SHA256 = "TLS_RSA_WITH_AES_128_CBC_SHA256" - TLS_RSA_WITH_AES256_CBC_SHA = "TLS_RSA_WITH_AES_256_CBC_SHA" - TLS_RSA_WITH_AES128_CBC_SHA = "TLS_RSA_WITH_AES_128_CBC_SHA" - TLS_ECDHE_ECDSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - TLS_ECDHE_ECDSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - TLS_DHE_DSS_WITH_AES256_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - TLS_DHE_DSS_WITH_AES128_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - TLS_DHE_DSS_WITH_AES256_CBC_SHA = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - TLS_DHE_DSS_WITH_AES128_CBC_SHA = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - TLS_RSA_WITH3_DES_EDE_CBC_SHA = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" - TLS_DHE_DSS_WITH3_DES_EDE_CBC_SHA = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - TLS_ECDHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - TLS_ECDHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - -class ApplicationGatewaySslPolicyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Ssl predefined policy name enums. - """ - - APP_GW_SSL_POLICY20150501 = "AppGwSslPolicy20150501" - APP_GW_SSL_POLICY20170401 = "AppGwSslPolicy20170401" - APP_GW_SSL_POLICY20170401_S = "AppGwSslPolicy20170401S" - -class ApplicationGatewaySslPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of Ssl Policy - """ - - PREDEFINED = "Predefined" - CUSTOM = "Custom" - -class ApplicationGatewaySslProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Ssl protocol enums. - """ - - TL_SV1_0 = "TLSv1_0" - TL_SV1_1 = "TLSv1_1" - TL_SV1_2 = "TLSv1_2" - -class ApplicationGatewayTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Tier of an application gateway. - """ - - STANDARD = "Standard" - WAF = "WAF" - -class AssociationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The association type of the child resource to the parent resource. - """ - - ASSOCIATED = "Associated" - CONTAINS = "Contains" - -class AuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. - """ - - EAPTLS = "EAPTLS" - EAPMSCHA_PV2 = "EAPMSCHAPv2" - -class AuthorizationUseStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. - """ - - AVAILABLE = "Available" - IN_USE = "InUse" - -class BgpPeerState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The BGP peer state - """ - - UNKNOWN = "Unknown" - STOPPED = "Stopped" - IDLE = "Idle" - CONNECTING = "Connecting" - CONNECTED = "Connected" - -class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The connection status. - """ - - UNKNOWN = "Unknown" - CONNECTED = "Connected" - DISCONNECTED = "Disconnected" - DEGRADED = "Degraded" - -class DhGroup(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The DH Groups used in IKE Phase 1 for initial SA. - """ - - NONE = "None" - DH_GROUP1 = "DHGroup1" - DH_GROUP2 = "DHGroup2" - DH_GROUP14 = "DHGroup14" - DH_GROUP2048 = "DHGroup2048" - ECP256 = "ECP256" - ECP384 = "ECP384" - DH_GROUP24 = "DHGroup24" - -class Direction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The direction of the packet represented as a 5-tuple. - """ - - INBOUND = "Inbound" - OUTBOUND = "Outbound" - -class EffectiveRouteSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and - 'Default'. - """ - - UNKNOWN = "Unknown" - USER = "User" - VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" - DEFAULT = "Default" - -class EffectiveRouteState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The value of effective route. Possible values are: 'Active' and 'Invalid'. - """ - - ACTIVE = "Active" - INVALID = "Invalid" - -class EffectiveSecurityRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. - """ - - TCP = "Tcp" - UDP = "Udp" - ALL = "All" - -class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', - 'Configuring', 'Configured', and 'ValidationNeeded'. - """ - - NOT_CONFIGURED = "NotConfigured" - CONFIGURING = "Configuring" - CONFIGURED = "Configured" - VALIDATION_NEEDED = "ValidationNeeded" - -class ExpressRouteCircuitPeeringState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of peering. Possible values are: 'Disabled' and 'Enabled' - """ - - DISABLED = "Disabled" - ENABLED = "Enabled" - -class ExpressRouteCircuitPeeringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - 'MicrosoftPeering'. - """ - - AZURE_PUBLIC_PEERING = "AzurePublicPeering" - AZURE_PRIVATE_PEERING = "AzurePrivatePeering" - MICROSOFT_PEERING = "MicrosoftPeering" - -class ExpressRouteCircuitSkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. - """ - - UNLIMITED_DATA = "UnlimitedData" - METERED_DATA = "MeteredData" - -class ExpressRouteCircuitSkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The tier of the SKU. Possible values are 'Standard' and 'Premium'. - """ - - STANDARD = "Standard" - PREMIUM = "Premium" - -class IkeEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IKE encryption algorithm (IKE phase 2). - """ - - DES = "DES" - DES3 = "DES3" - AES128 = "AES128" - AES192 = "AES192" - AES256 = "AES256" - -class IkeIntegrity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IKE integrity algorithm (IKE phase 2). - """ - - MD5 = "MD5" - SHA1 = "SHA1" - SHA256 = "SHA256" - SHA384 = "SHA384" - -class IPAllocationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """PrivateIP allocation method. - """ - - STATIC = "Static" - DYNAMIC = "Dynamic" - -class IpsecEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IPSec encryption algorithm (IKE phase 1). - """ - - NONE = "None" - DES = "DES" - DES3 = "DES3" - AES128 = "AES128" - AES192 = "AES192" - AES256 = "AES256" - GCMAES128 = "GCMAES128" - GCMAES192 = "GCMAES192" - GCMAES256 = "GCMAES256" - -class IpsecIntegrity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IPSec integrity algorithm (IKE phase 1). - """ - - MD5 = "MD5" - SHA1 = "SHA1" - SHA256 = "SHA256" - GCMAES128 = "GCMAES128" - GCMAES192 = "GCMAES192" - GCMAES256 = "GCMAES256" - -class IPVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Available from Api-Version 2016-03-30 onwards, it represents whether the specific - ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and - 'IPv6'. - """ - - I_PV4 = "IPv4" - I_PV6 = "IPv6" - -class IssueType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of issue. - """ - - UNKNOWN = "Unknown" - AGENT_STOPPED = "AgentStopped" - GUEST_FIREWALL = "GuestFirewall" - DNS_RESOLUTION = "DnsResolution" - SOCKET_BIND = "SocketBind" - NETWORK_SECURITY_RULE = "NetworkSecurityRule" - USER_DEFINED_ROUTE = "UserDefinedRoute" - PORT_THROTTLED = "PortThrottled" - PLATFORM = "Platform" - -class LoadBalancerSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Name of a load balancer SKU. - """ - - BASIC = "Basic" - STANDARD = "Standard" - -class LoadDistribution(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and - 'SourceIPProtocol'. - """ - - DEFAULT = "Default" - SOURCE_IP = "SourceIP" - SOURCE_IP_PROTOCOL = "SourceIPProtocol" - -class NetworkOperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and - 'Failed'. - """ - - IN_PROGRESS = "InProgress" - SUCCEEDED = "Succeeded" - FAILED = "Failed" - -class NextHopType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Next hop type. - """ - - INTERNET = "Internet" - VIRTUAL_APPLIANCE = "VirtualAppliance" - VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" - VNET_LOCAL = "VnetLocal" - HYPER_NET_GATEWAY = "HyperNetGateway" - NONE = "None" - -class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The origin of the issue. - """ - - LOCAL = "Local" - INBOUND = "Inbound" - OUTBOUND = "Outbound" - -class PcError(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - INTERNAL_ERROR = "InternalError" - AGENT_STOPPED = "AgentStopped" - CAPTURE_FAILED = "CaptureFailed" - LOCAL_FILE_FAILED = "LocalFileFailed" - STORAGE_FAILED = "StorageFailed" - -class PcProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protocol to be filtered on. - """ - - TCP = "TCP" - UDP = "UDP" - ANY = "Any" - -class PcStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the packet capture session. - """ - - NOT_STARTED = "NotStarted" - RUNNING = "Running" - STOPPED = "Stopped" - ERROR = "Error" - UNKNOWN = "Unknown" - -class PfsGroup(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The DH Groups used in IKE Phase 2 for new child SA. - """ - - NONE = "None" - PFS1 = "PFS1" - PFS2 = "PFS2" - PFS2048 = "PFS2048" - ECP256 = "ECP256" - ECP384 = "ECP384" - PFS24 = "PFS24" - -class ProbeProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a - received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK - response from the specifies URI is required for the probe to be successful. - """ - - HTTP = "Http" - TCP = "Tcp" - -class ProcessorArchitecture(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. - """ - - AMD64 = "Amd64" - X86 = "X86" - -class Protocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protocol to be verified on. - """ - - TCP = "TCP" - UDP = "UDP" - -class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state of the resource. - """ - - SUCCEEDED = "Succeeded" - UPDATING = "Updating" - DELETING = "Deleting" - FAILED = "Failed" - -class PublicIPAddressSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Name of a public IP address SKU. - """ - - BASIC = "Basic" - STANDARD = "Standard" - -class RouteFilterRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The rule type of the rule. Valid value is: 'Community' - """ - - COMMUNITY = "Community" - -class RouteNextHopType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. - """ - - VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" - VNET_LOCAL = "VnetLocal" - INTERNET = "Internet" - VIRTUAL_APPLIANCE = "VirtualAppliance" - NONE = "None" - -class SecurityRuleAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. - """ - - ALLOW = "Allow" - DENY = "Deny" - -class SecurityRuleDirection(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The direction of the rule. Possible values are: 'Inbound and Outbound'. - """ - - INBOUND = "Inbound" - OUTBOUND = "Outbound" - -class SecurityRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. - """ - - TCP = "Tcp" - UDP = "Udp" - ASTERISK = "*" - -class ServiceProviderProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The ServiceProviderProvisioningState state of the resource. Possible values are - 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. - """ - - NOT_PROVISIONED = "NotProvisioned" - PROVISIONING = "Provisioning" - PROVISIONED = "Provisioned" - DEPROVISIONING = "Deprovisioning" - -class Severity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The severity of the issue. - """ - - ERROR = "Error" - WARNING = "Warning" - -class TransportProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or 'All.' - """ - - UDP = "Udp" - TCP = "Tcp" - ALL = "All" - -class UsageUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """An enum describing the unit of measurement. - """ - - COUNT = "Count" - -class VirtualNetworkGatewayConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Virtual network Gateway connection status - """ - - UNKNOWN = "Unknown" - CONNECTING = "Connecting" - CONNECTED = "Connected" - NOT_CONNECTED = "NotConnected" - -class VirtualNetworkGatewayConnectionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and - 'VPNClient. - """ - - I_PSEC = "IPsec" - VNET2_VNET = "Vnet2Vnet" - EXPRESS_ROUTE = "ExpressRoute" - VPN_CLIENT = "VPNClient" - -class VirtualNetworkGatewaySkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gateway SKU name. - """ - - BASIC = "Basic" - HIGH_PERFORMANCE = "HighPerformance" - STANDARD = "Standard" - ULTRA_PERFORMANCE = "UltraPerformance" - VPN_GW1 = "VpnGw1" - VPN_GW2 = "VpnGw2" - VPN_GW3 = "VpnGw3" - -class VirtualNetworkGatewaySkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gateway SKU tier. - """ - - BASIC = "Basic" - HIGH_PERFORMANCE = "HighPerformance" - STANDARD = "Standard" - ULTRA_PERFORMANCE = "UltraPerformance" - VPN_GW1 = "VpnGw1" - VPN_GW2 = "VpnGw2" - VPN_GW3 = "VpnGw3" - -class VirtualNetworkGatewayType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. - """ - - VPN = "Vpn" - EXPRESS_ROUTE = "ExpressRoute" - -class VirtualNetworkPeeringState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and - 'Disconnected'. - """ - - INITIATED = "Initiated" - CONNECTED = "Connected" - DISCONNECTED = "Disconnected" - -class VpnClientProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VPN client protocol enabled for the virtual network gateway. - """ - - IKE_V2 = "IkeV2" - SSTP = "SSTP" - -class VpnType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. - """ - - POLICY_BASED = "PolicyBased" - ROUTE_BASED = "RouteBased" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/__init__.py deleted file mode 100644 index e2bc8b73d1b7..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/__init__.py +++ /dev/null @@ -1,85 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._application_gateways_operations import ApplicationGatewaysOperations -from ._application_security_groups_operations import ApplicationSecurityGroupsOperations -from ._network_management_client_operations import NetworkManagementClientOperationsMixin -from ._available_endpoint_services_operations import AvailableEndpointServicesOperations -from ._express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations -from ._express_route_circuit_peerings_operations import ExpressRouteCircuitPeeringsOperations -from ._express_route_circuits_operations import ExpressRouteCircuitsOperations -from ._express_route_service_providers_operations import ExpressRouteServiceProvidersOperations -from ._load_balancers_operations import LoadBalancersOperations -from ._load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations -from ._load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations -from ._inbound_nat_rules_operations import InboundNatRulesOperations -from ._load_balancer_load_balancing_rules_operations import LoadBalancerLoadBalancingRulesOperations -from ._load_balancer_network_interfaces_operations import LoadBalancerNetworkInterfacesOperations -from ._load_balancer_probes_operations import LoadBalancerProbesOperations -from ._network_interfaces_operations import NetworkInterfacesOperations -from ._network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations -from ._network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations -from ._network_security_groups_operations import NetworkSecurityGroupsOperations -from ._security_rules_operations import SecurityRulesOperations -from ._default_security_rules_operations import DefaultSecurityRulesOperations -from ._network_watchers_operations import NetworkWatchersOperations -from ._packet_captures_operations import PacketCapturesOperations -from ._operations import Operations -from ._public_ip_addresses_operations import PublicIPAddressesOperations -from ._route_filters_operations import RouteFiltersOperations -from ._route_filter_rules_operations import RouteFilterRulesOperations -from ._route_tables_operations import RouteTablesOperations -from ._routes_operations import RoutesOperations -from ._bgp_service_communities_operations import BgpServiceCommunitiesOperations -from ._usages_operations import UsagesOperations -from ._virtual_networks_operations import VirtualNetworksOperations -from ._subnets_operations import SubnetsOperations -from ._virtual_network_peerings_operations import VirtualNetworkPeeringsOperations -from ._virtual_network_gateways_operations import VirtualNetworkGatewaysOperations -from ._virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations -from ._local_network_gateways_operations import LocalNetworkGatewaysOperations - -__all__ = [ - 'ApplicationGatewaysOperations', - 'ApplicationSecurityGroupsOperations', - 'NetworkManagementClientOperationsMixin', - 'AvailableEndpointServicesOperations', - 'ExpressRouteCircuitAuthorizationsOperations', - 'ExpressRouteCircuitPeeringsOperations', - 'ExpressRouteCircuitsOperations', - 'ExpressRouteServiceProvidersOperations', - 'LoadBalancersOperations', - 'LoadBalancerBackendAddressPoolsOperations', - 'LoadBalancerFrontendIPConfigurationsOperations', - 'InboundNatRulesOperations', - 'LoadBalancerLoadBalancingRulesOperations', - 'LoadBalancerNetworkInterfacesOperations', - 'LoadBalancerProbesOperations', - 'NetworkInterfacesOperations', - 'NetworkInterfaceIPConfigurationsOperations', - 'NetworkInterfaceLoadBalancersOperations', - 'NetworkSecurityGroupsOperations', - 'SecurityRulesOperations', - 'DefaultSecurityRulesOperations', - 'NetworkWatchersOperations', - 'PacketCapturesOperations', - 'Operations', - 'PublicIPAddressesOperations', - 'RouteFiltersOperations', - 'RouteFilterRulesOperations', - 'RouteTablesOperations', - 'RoutesOperations', - 'BgpServiceCommunitiesOperations', - 'UsagesOperations', - 'VirtualNetworksOperations', - 'SubnetsOperations', - 'VirtualNetworkPeeringsOperations', - 'VirtualNetworkGatewaysOperations', - 'VirtualNetworkGatewayConnectionsOperations', - 'LocalNetworkGatewaysOperations', -] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_default_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_default_security_rules_operations.py deleted file mode 100644 index 9e8bc52fd990..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_default_security_rules_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class DefaultSecurityRulesOperations(object): - """DefaultSecurityRulesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.SecurityRuleListResult"] - """Gets all default security rules in a network security group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.SecurityRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules'} # type: ignore - - def get( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - default_security_rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.SecurityRule" - """Get the specified default network security rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param default_security_rule_name: The name of the default security rule. - :type default_security_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.SecurityRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'defaultSecurityRuleName': self._serialize.url("default_security_rule_name", default_security_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecurityRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_ip_configurations_operations.py deleted file mode 100644 index cfac3ea3887a..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_ip_configurations_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class NetworkInterfaceIPConfigurationsOperations(object): - """NetworkInterfaceIPConfigurationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - network_interface_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkInterfaceIPConfigurationListResult"] - """Get all ip configurations in a network interface. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfigurationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceIPConfigurationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations'} # type: ignore - - def get( - self, - resource_group_name, # type: str - network_interface_name, # type: str - ip_configuration_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkInterfaceIPConfiguration" - """Gets the specified network interface ip configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the ip configuration name. - :type ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_security_groups_operations.py deleted file mode 100644 index 728c1cd1ccd9..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_security_groups_operations.py +++ /dev/null @@ -1,615 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class NetworkSecurityGroupsOperations(object): - """NetworkSecurityGroupsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def _delete_initial( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified network security group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkSecurityGroup" - """Gets the specified network security group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - parameters, # type: "_models.NetworkSecurityGroup" - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkSecurityGroup" - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkSecurityGroup') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - parameters, # type: "_models.NetworkSecurityGroup" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.NetworkSecurityGroup"] - """Creates or updates a network security group in the specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - def _update_tags_initial( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkSecurityGroup" - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.NetworkSecurityGroup"] - """Updates a network security group tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - def list_all( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkSecurityGroupListResult"] - """Gets all network security groups in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroupListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroupListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups'} # type: ignore - - def list( - self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkSecurityGroupListResult"] - """Gets all network security groups in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroupListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroupListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_gateways_operations.py deleted file mode 100644 index 6943b41f5c64..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_gateways_operations.py +++ /dev/null @@ -1,1618 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class VirtualNetworkGatewaysOperations(object): - """VirtualNetworkGatewaysOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def _create_or_update_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VirtualNetworkGateway" - **kwargs # type: Any - ): - # type: (...) -> "_models.VirtualNetworkGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGateway') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VirtualNetworkGateway" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.VirtualNetworkGateway"] - """Creates or updates a virtual network gateway in the specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to create or update virtual network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.VirtualNetworkGateway" - """Gets the specified virtual network gateway by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - def _delete_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified virtual network gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - def _update_tags_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> "_models.VirtualNetworkGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.VirtualNetworkGateway"] - """Updates a virtual network gateway tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to update virtual network gateway tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - def list( - self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.VirtualNetworkGatewayListResult"] - """Gets all virtual network gateways by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways'} # type: ignore - - def list_connections( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.VirtualNetworkGatewayListConnectionsResult"] - """Gets all the connections in a virtual network gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayListConnectionsResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGatewayListConnectionsResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListConnectionsResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_connections.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayListConnectionsResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections'} # type: ignore - - def _reset_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - gateway_vip=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.VirtualNetworkGateway"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._reset_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if gateway_vip is not None: - query_parameters['gatewayVip'] = self._serialize.query("gateway_vip", gateway_vip, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _reset_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore - - def begin_reset( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - gateway_vip=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.VirtualNetworkGateway"] - """Resets the primary of the virtual network gateway in the specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param gateway_vip: Virtual network gateway vip address supplied to the begin reset of the - active-active feature enabled gateway. - :type gateway_vip: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._reset_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - gateway_vip=gateway_vip, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore - - def _generatevpnclientpackage_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VpnClientParameters" - **kwargs # type: Any - ): - # type: (...) -> Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._generatevpnclientpackage_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnClientParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _generatevpnclientpackage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'} # type: ignore - - def begin_generatevpnclientpackage( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VpnClientParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[str] - """Generates VPN client package for P2S client of the virtual network gateway in the specified - resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to the generate virtual network gateway VPN client - package operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VpnClientParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[str] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._generatevpnclientpackage_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_generatevpnclientpackage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'} # type: ignore - - def _generate_vpn_profile_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VpnClientParameters" - **kwargs # type: Any - ): - # type: (...) -> Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._generate_vpn_profile_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnClientParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _generate_vpn_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile'} # type: ignore - - def begin_generate_vpn_profile( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VpnClientParameters" - **kwargs # type: Any - ): - # type: (...) -> LROPoller[str] - """Generates VPN profile for P2S client of the virtual network gateway in the specified resource - group. Used for IKEV2 and radius based authentication. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to the generate virtual network gateway VPN client - package operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VpnClientParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[str] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._generate_vpn_profile_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_generate_vpn_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile'} # type: ignore - - def _get_vpn_profile_package_url_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._get_vpn_profile_package_url_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_vpn_profile_package_url_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'} # type: ignore - - def begin_get_vpn_profile_package_url( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[str] - """Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified - resource group. The profile needs to be generated first using generateVpnProfile. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[str] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_vpn_profile_package_url_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_vpn_profile_package_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'} # type: ignore - - def _get_bgp_peer_status_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - peer=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.BgpPeerStatusListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BgpPeerStatusListResult"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._get_bgp_peer_status_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if peer is not None: - query_parameters['peer'] = self._serialize.query("peer", peer, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_bgp_peer_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus'} # type: ignore - - def begin_get_bgp_peer_status( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - peer=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.BgpPeerStatusListResult"] - """The GetBgpPeerStatus operation retrieves the status of all BGP peers. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param peer: The IP address of the peer to retrieve the status of. - :type peer: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either BgpPeerStatusListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.BgpPeerStatusListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpPeerStatusListResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_bgp_peer_status_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - peer=peer, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_bgp_peer_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus'} # type: ignore - - def supported_vpn_devices( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> str - """Gets a xml format representation for supported vpn devices. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.supported_vpn_devices.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - supported_vpn_devices.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/supportedvpndevices'} # type: ignore - - def _get_learned_routes_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.GatewayRouteListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._get_learned_routes_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_learned_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes'} # type: ignore - - def begin_get_learned_routes( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.GatewayRouteListResult"] - """This operation retrieves a list of routes the virtual network gateway has learned, including - routes learned from BGP peers. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.GatewayRouteListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_learned_routes_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_learned_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes'} # type: ignore - - def _get_advertised_routes_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - peer, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.GatewayRouteListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self._get_advertised_routes_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['peer'] = self._serialize.query("peer", peer, 'str') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _get_advertised_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore - - def begin_get_advertised_routes( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - peer, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.GatewayRouteListResult"] - """This operation retrieves a list of routes the virtual network gateway is advertising to the - specified peer. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param peer: The IP address of the peer. - :type peer: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.GatewayRouteListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_advertised_routes_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - peer=peer, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore - - def vpn_device_configuration_script( - self, - resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.VpnDeviceScriptParameters" - **kwargs # type: Any - ): - # type: (...) -> str - """Gets a xml format representation for vpn device configuration script. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection for which the configuration script is generated. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the generate vpn device script operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VpnDeviceScriptParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self.vpn_device_configuration_script.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnDeviceScriptParameters') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('str', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - vpn_device_configuration_script.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_metadata.json b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_metadata.json deleted file mode 100644 index 98d375002d60..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_metadata.json +++ /dev/null @@ -1,157 +0,0 @@ -{ - "chosen_version": "2017-11-01", - "total_api_version_list": ["2017-03-30", "2017-11-01"], - "client": { - "name": "NetworkManagementClient", - "filename": "_network_management_client", - "description": "Network Client.", - "base_url": "\u0027https://management.azure.com\u0027", - "custom_base_url": null, - "azure_arm": true, - "has_lro_operations": true, - "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"], \"._operations_mixin\": [\"NetworkManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"], \"._operations_mixin\": [\"NetworkManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" - }, - "global_parameters": { - "sync": { - "credential": { - "signature": "credential, # type: \"TokenCredential\"", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials.TokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id, # type: str", - "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "async": { - "credential": { - "signature": "credential: \"AsyncTokenCredential\",", - "description": "Credential needed for the client to connect to Azure.", - "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", - "required": true - }, - "subscription_id": { - "signature": "subscription_id: str,", - "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", - "docstring_type": "str", - "required": true - } - }, - "constant": { - }, - "call": "credential, subscription_id", - "service_client_specific": { - "sync": { - "api_version": { - "signature": "api_version=None, # type: Optional[str]", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url=None, # type: Optional[str]", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile=KnownProfiles.default, # type: KnownProfiles", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - }, - "async": { - "api_version": { - "signature": "api_version: Optional[str] = None,", - "description": "API version to use if no profile is provided, or if missing in profile.", - "docstring_type": "str", - "required": false - }, - "base_url": { - "signature": "base_url: Optional[str] = None,", - "description": "Service URL", - "docstring_type": "str", - "required": false - }, - "profile": { - "signature": "profile: KnownProfiles = KnownProfiles.default,", - "description": "A profile definition, from KnownProfiles to dict.", - "docstring_type": "azure.profiles.KnownProfiles", - "required": false - } - } - } - }, - "config": { - "credential": true, - "credential_scopes": ["https://management.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" - }, - "operation_groups": { - "application_gateways": "ApplicationGatewaysOperations", - "application_security_groups": "ApplicationSecurityGroupsOperations", - "available_endpoint_services": "AvailableEndpointServicesOperations", - "express_route_circuit_authorizations": "ExpressRouteCircuitAuthorizationsOperations", - "express_route_circuit_peerings": "ExpressRouteCircuitPeeringsOperations", - "express_route_circuits": "ExpressRouteCircuitsOperations", - "express_route_service_providers": "ExpressRouteServiceProvidersOperations", - "load_balancers": "LoadBalancersOperations", - "load_balancer_backend_address_pools": "LoadBalancerBackendAddressPoolsOperations", - "load_balancer_frontend_ip_configurations": "LoadBalancerFrontendIPConfigurationsOperations", - "inbound_nat_rules": "InboundNatRulesOperations", - "load_balancer_load_balancing_rules": "LoadBalancerLoadBalancingRulesOperations", - "load_balancer_network_interfaces": "LoadBalancerNetworkInterfacesOperations", - "load_balancer_probes": "LoadBalancerProbesOperations", - "network_interfaces": "NetworkInterfacesOperations", - "network_interface_ip_configurations": "NetworkInterfaceIPConfigurationsOperations", - "network_interface_load_balancers": "NetworkInterfaceLoadBalancersOperations", - "network_security_groups": "NetworkSecurityGroupsOperations", - "security_rules": "SecurityRulesOperations", - "default_security_rules": "DefaultSecurityRulesOperations", - "network_watchers": "NetworkWatchersOperations", - "packet_captures": "PacketCapturesOperations", - "connection_monitors": "ConnectionMonitorsOperations", - "operations": "Operations", - "public_ip_addresses": "PublicIPAddressesOperations", - "route_filters": "RouteFiltersOperations", - "route_filter_rules": "RouteFilterRulesOperations", - "route_tables": "RouteTablesOperations", - "routes": "RoutesOperations", - "bgp_service_communities": "BgpServiceCommunitiesOperations", - "usages": "UsagesOperations", - "virtual_networks": "VirtualNetworksOperations", - "subnets": "SubnetsOperations", - "virtual_network_peerings": "VirtualNetworkPeeringsOperations", - "virtual_network_gateways": "VirtualNetworkGatewaysOperations", - "virtual_network_gateway_connections": "VirtualNetworkGatewayConnectionsOperations", - "local_network_gateways": "LocalNetworkGatewaysOperations" - }, - "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", - "operations": { - "check_dns_name_availability" : { - "sync": { - "signature": "def check_dns_name_availability(\n self,\n location, # type: str\n domain_name_label, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Checks whether a domain name in the cloudapp.azure.com zone is available for use.\n\n:param location: The location of the domain name.\n:type location: str\n:param domain_name_label: The domain name to be verified. It must conform to the following\n regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.\n:type domain_name_label: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DnsNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2017_11_01.models.DnsNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_dns_name_availability(\n self,\n location: str,\n domain_name_label: str,\n **kwargs: Any\n) -\u003e \"_models.DnsNameAvailabilityResult\":\n", - "doc": "\"\"\"Checks whether a domain name in the cloudapp.azure.com zone is available for use.\n\n:param location: The location of the domain name.\n:type location: str\n:param domain_name_label: The domain name to be verified. It must conform to the following\n regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.\n:type domain_name_label: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DnsNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2017_11_01.models.DnsNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "location, domain_name_label" - } - } - } -} \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_network_management_client.py deleted file mode 100644 index 277c2cdb1b7f..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_network_management_client.py +++ /dev/null @@ -1,270 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import TYPE_CHECKING - -from azure.mgmt.core import ARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional - - from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import NetworkManagementClientConfiguration -from .operations import ApplicationGatewaysOperations -from .operations import ApplicationSecurityGroupsOperations -from .operations import NetworkManagementClientOperationsMixin -from .operations import AvailableEndpointServicesOperations -from .operations import ExpressRouteCircuitAuthorizationsOperations -from .operations import ExpressRouteCircuitPeeringsOperations -from .operations import ExpressRouteCircuitsOperations -from .operations import ExpressRouteServiceProvidersOperations -from .operations import LoadBalancersOperations -from .operations import LoadBalancerBackendAddressPoolsOperations -from .operations import LoadBalancerFrontendIPConfigurationsOperations -from .operations import InboundNatRulesOperations -from .operations import LoadBalancerLoadBalancingRulesOperations -from .operations import LoadBalancerNetworkInterfacesOperations -from .operations import LoadBalancerProbesOperations -from .operations import NetworkInterfacesOperations -from .operations import NetworkInterfaceIPConfigurationsOperations -from .operations import NetworkInterfaceLoadBalancersOperations -from .operations import NetworkSecurityGroupsOperations -from .operations import SecurityRulesOperations -from .operations import DefaultSecurityRulesOperations -from .operations import NetworkWatchersOperations -from .operations import PacketCapturesOperations -from .operations import ConnectionMonitorsOperations -from .operations import Operations -from .operations import PublicIPAddressesOperations -from .operations import RouteFiltersOperations -from .operations import RouteFilterRulesOperations -from .operations import RouteTablesOperations -from .operations import RoutesOperations -from .operations import BgpServiceCommunitiesOperations -from .operations import UsagesOperations -from .operations import VirtualNetworksOperations -from .operations import SubnetsOperations -from .operations import VirtualNetworkPeeringsOperations -from .operations import VirtualNetworkGatewaysOperations -from .operations import VirtualNetworkGatewayConnectionsOperations -from .operations import LocalNetworkGatewaysOperations -from . import models - - -class NetworkManagementClient(NetworkManagementClientOperationsMixin): - """Network Client. - - :ivar application_gateways: ApplicationGatewaysOperations operations - :vartype application_gateways: azure.mgmt.network.v2017_11_01.operations.ApplicationGatewaysOperations - :ivar application_security_groups: ApplicationSecurityGroupsOperations operations - :vartype application_security_groups: azure.mgmt.network.v2017_11_01.operations.ApplicationSecurityGroupsOperations - :ivar available_endpoint_services: AvailableEndpointServicesOperations operations - :vartype available_endpoint_services: azure.mgmt.network.v2017_11_01.operations.AvailableEndpointServicesOperations - :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations - :vartype express_route_circuit_authorizations: azure.mgmt.network.v2017_11_01.operations.ExpressRouteCircuitAuthorizationsOperations - :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations - :vartype express_route_circuit_peerings: azure.mgmt.network.v2017_11_01.operations.ExpressRouteCircuitPeeringsOperations - :ivar express_route_circuits: ExpressRouteCircuitsOperations operations - :vartype express_route_circuits: azure.mgmt.network.v2017_11_01.operations.ExpressRouteCircuitsOperations - :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations - :vartype express_route_service_providers: azure.mgmt.network.v2017_11_01.operations.ExpressRouteServiceProvidersOperations - :ivar load_balancers: LoadBalancersOperations operations - :vartype load_balancers: azure.mgmt.network.v2017_11_01.operations.LoadBalancersOperations - :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations - :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2017_11_01.operations.LoadBalancerBackendAddressPoolsOperations - :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations - :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2017_11_01.operations.LoadBalancerFrontendIPConfigurationsOperations - :ivar inbound_nat_rules: InboundNatRulesOperations operations - :vartype inbound_nat_rules: azure.mgmt.network.v2017_11_01.operations.InboundNatRulesOperations - :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations - :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2017_11_01.operations.LoadBalancerLoadBalancingRulesOperations - :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations - :vartype load_balancer_network_interfaces: azure.mgmt.network.v2017_11_01.operations.LoadBalancerNetworkInterfacesOperations - :ivar load_balancer_probes: LoadBalancerProbesOperations operations - :vartype load_balancer_probes: azure.mgmt.network.v2017_11_01.operations.LoadBalancerProbesOperations - :ivar network_interfaces: NetworkInterfacesOperations operations - :vartype network_interfaces: azure.mgmt.network.v2017_11_01.operations.NetworkInterfacesOperations - :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations - :vartype network_interface_ip_configurations: azure.mgmt.network.v2017_11_01.operations.NetworkInterfaceIPConfigurationsOperations - :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations - :vartype network_interface_load_balancers: azure.mgmt.network.v2017_11_01.operations.NetworkInterfaceLoadBalancersOperations - :ivar network_security_groups: NetworkSecurityGroupsOperations operations - :vartype network_security_groups: azure.mgmt.network.v2017_11_01.operations.NetworkSecurityGroupsOperations - :ivar security_rules: SecurityRulesOperations operations - :vartype security_rules: azure.mgmt.network.v2017_11_01.operations.SecurityRulesOperations - :ivar default_security_rules: DefaultSecurityRulesOperations operations - :vartype default_security_rules: azure.mgmt.network.v2017_11_01.operations.DefaultSecurityRulesOperations - :ivar network_watchers: NetworkWatchersOperations operations - :vartype network_watchers: azure.mgmt.network.v2017_11_01.operations.NetworkWatchersOperations - :ivar packet_captures: PacketCapturesOperations operations - :vartype packet_captures: azure.mgmt.network.v2017_11_01.operations.PacketCapturesOperations - :ivar connection_monitors: ConnectionMonitorsOperations operations - :vartype connection_monitors: azure.mgmt.network.v2017_11_01.operations.ConnectionMonitorsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.network.v2017_11_01.operations.Operations - :ivar public_ip_addresses: PublicIPAddressesOperations operations - :vartype public_ip_addresses: azure.mgmt.network.v2017_11_01.operations.PublicIPAddressesOperations - :ivar route_filters: RouteFiltersOperations operations - :vartype route_filters: azure.mgmt.network.v2017_11_01.operations.RouteFiltersOperations - :ivar route_filter_rules: RouteFilterRulesOperations operations - :vartype route_filter_rules: azure.mgmt.network.v2017_11_01.operations.RouteFilterRulesOperations - :ivar route_tables: RouteTablesOperations operations - :vartype route_tables: azure.mgmt.network.v2017_11_01.operations.RouteTablesOperations - :ivar routes: RoutesOperations operations - :vartype routes: azure.mgmt.network.v2017_11_01.operations.RoutesOperations - :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations - :vartype bgp_service_communities: azure.mgmt.network.v2017_11_01.operations.BgpServiceCommunitiesOperations - :ivar usages: UsagesOperations operations - :vartype usages: azure.mgmt.network.v2017_11_01.operations.UsagesOperations - :ivar virtual_networks: VirtualNetworksOperations operations - :vartype virtual_networks: azure.mgmt.network.v2017_11_01.operations.VirtualNetworksOperations - :ivar subnets: SubnetsOperations operations - :vartype subnets: azure.mgmt.network.v2017_11_01.operations.SubnetsOperations - :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations - :vartype virtual_network_peerings: azure.mgmt.network.v2017_11_01.operations.VirtualNetworkPeeringsOperations - :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations - :vartype virtual_network_gateways: azure.mgmt.network.v2017_11_01.operations.VirtualNetworkGatewaysOperations - :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations - :vartype virtual_network_gateway_connections: azure.mgmt.network.v2017_11_01.operations.VirtualNetworkGatewayConnectionsOperations - :ivar local_network_gateways: LocalNetworkGatewaysOperations operations - :vartype local_network_gateways: azure.mgmt.network.v2017_11_01.operations.LocalNetworkGatewaysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential - :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential, # type: "TokenCredential" - subscription_id, # type: str - base_url=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> None - if not base_url: - base_url = 'https://management.azure.com' - self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.application_gateways = ApplicationGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.application_security_groups = ApplicationSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.available_endpoint_services = AvailableEndpointServicesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuits = ExpressRouteCircuitsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_service_providers = ExpressRouteServiceProvidersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancers = LoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.inbound_nat_rules = InboundNatRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_probes = LoadBalancerProbesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interfaces = NetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_security_groups = NetworkSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.security_rules = SecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.default_security_rules = DefaultSecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_watchers = NetworkWatchersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.packet_captures = PacketCapturesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.connection_monitors = ConnectionMonitorsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.public_ip_addresses = PublicIPAddressesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filters = RouteFiltersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filter_rules = RouteFilterRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_tables = RouteTablesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.routes = RoutesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.bgp_service_communities = BgpServiceCommunitiesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.usages = UsagesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_networks = VirtualNetworksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.subnets = SubnetsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_peerings = VirtualNetworkPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateways = VirtualNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.local_network_gateways = LocalNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - def close(self): - # type: () -> None - self._client.close() - - def __enter__(self): - # type: () -> NetworkManagementClient - self._client.__enter__() - return self - - def __exit__(self, *exc_details): - # type: (Any) -> None - self._client.__exit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/_network_management_client.py deleted file mode 100644 index ff81f96bb940..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/_network_management_client.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from typing import Any, Optional, TYPE_CHECKING - -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core import AsyncARMPipelineClient -from msrest import Deserializer, Serializer - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - -from ._configuration import NetworkManagementClientConfiguration -from .operations import ApplicationGatewaysOperations -from .operations import ApplicationSecurityGroupsOperations -from .operations import NetworkManagementClientOperationsMixin -from .operations import AvailableEndpointServicesOperations -from .operations import ExpressRouteCircuitAuthorizationsOperations -from .operations import ExpressRouteCircuitPeeringsOperations -from .operations import ExpressRouteCircuitsOperations -from .operations import ExpressRouteServiceProvidersOperations -from .operations import LoadBalancersOperations -from .operations import LoadBalancerBackendAddressPoolsOperations -from .operations import LoadBalancerFrontendIPConfigurationsOperations -from .operations import InboundNatRulesOperations -from .operations import LoadBalancerLoadBalancingRulesOperations -from .operations import LoadBalancerNetworkInterfacesOperations -from .operations import LoadBalancerProbesOperations -from .operations import NetworkInterfacesOperations -from .operations import NetworkInterfaceIPConfigurationsOperations -from .operations import NetworkInterfaceLoadBalancersOperations -from .operations import NetworkSecurityGroupsOperations -from .operations import SecurityRulesOperations -from .operations import DefaultSecurityRulesOperations -from .operations import NetworkWatchersOperations -from .operations import PacketCapturesOperations -from .operations import ConnectionMonitorsOperations -from .operations import Operations -from .operations import PublicIPAddressesOperations -from .operations import RouteFiltersOperations -from .operations import RouteFilterRulesOperations -from .operations import RouteTablesOperations -from .operations import RoutesOperations -from .operations import BgpServiceCommunitiesOperations -from .operations import UsagesOperations -from .operations import VirtualNetworksOperations -from .operations import SubnetsOperations -from .operations import VirtualNetworkPeeringsOperations -from .operations import VirtualNetworkGatewaysOperations -from .operations import VirtualNetworkGatewayConnectionsOperations -from .operations import LocalNetworkGatewaysOperations -from .. import models - - -class NetworkManagementClient(NetworkManagementClientOperationsMixin): - """Network Client. - - :ivar application_gateways: ApplicationGatewaysOperations operations - :vartype application_gateways: azure.mgmt.network.v2017_11_01.aio.operations.ApplicationGatewaysOperations - :ivar application_security_groups: ApplicationSecurityGroupsOperations operations - :vartype application_security_groups: azure.mgmt.network.v2017_11_01.aio.operations.ApplicationSecurityGroupsOperations - :ivar available_endpoint_services: AvailableEndpointServicesOperations operations - :vartype available_endpoint_services: azure.mgmt.network.v2017_11_01.aio.operations.AvailableEndpointServicesOperations - :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations - :vartype express_route_circuit_authorizations: azure.mgmt.network.v2017_11_01.aio.operations.ExpressRouteCircuitAuthorizationsOperations - :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations - :vartype express_route_circuit_peerings: azure.mgmt.network.v2017_11_01.aio.operations.ExpressRouteCircuitPeeringsOperations - :ivar express_route_circuits: ExpressRouteCircuitsOperations operations - :vartype express_route_circuits: azure.mgmt.network.v2017_11_01.aio.operations.ExpressRouteCircuitsOperations - :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations - :vartype express_route_service_providers: azure.mgmt.network.v2017_11_01.aio.operations.ExpressRouteServiceProvidersOperations - :ivar load_balancers: LoadBalancersOperations operations - :vartype load_balancers: azure.mgmt.network.v2017_11_01.aio.operations.LoadBalancersOperations - :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations - :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2017_11_01.aio.operations.LoadBalancerBackendAddressPoolsOperations - :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations - :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2017_11_01.aio.operations.LoadBalancerFrontendIPConfigurationsOperations - :ivar inbound_nat_rules: InboundNatRulesOperations operations - :vartype inbound_nat_rules: azure.mgmt.network.v2017_11_01.aio.operations.InboundNatRulesOperations - :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations - :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2017_11_01.aio.operations.LoadBalancerLoadBalancingRulesOperations - :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations - :vartype load_balancer_network_interfaces: azure.mgmt.network.v2017_11_01.aio.operations.LoadBalancerNetworkInterfacesOperations - :ivar load_balancer_probes: LoadBalancerProbesOperations operations - :vartype load_balancer_probes: azure.mgmt.network.v2017_11_01.aio.operations.LoadBalancerProbesOperations - :ivar network_interfaces: NetworkInterfacesOperations operations - :vartype network_interfaces: azure.mgmt.network.v2017_11_01.aio.operations.NetworkInterfacesOperations - :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations - :vartype network_interface_ip_configurations: azure.mgmt.network.v2017_11_01.aio.operations.NetworkInterfaceIPConfigurationsOperations - :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations - :vartype network_interface_load_balancers: azure.mgmt.network.v2017_11_01.aio.operations.NetworkInterfaceLoadBalancersOperations - :ivar network_security_groups: NetworkSecurityGroupsOperations operations - :vartype network_security_groups: azure.mgmt.network.v2017_11_01.aio.operations.NetworkSecurityGroupsOperations - :ivar security_rules: SecurityRulesOperations operations - :vartype security_rules: azure.mgmt.network.v2017_11_01.aio.operations.SecurityRulesOperations - :ivar default_security_rules: DefaultSecurityRulesOperations operations - :vartype default_security_rules: azure.mgmt.network.v2017_11_01.aio.operations.DefaultSecurityRulesOperations - :ivar network_watchers: NetworkWatchersOperations operations - :vartype network_watchers: azure.mgmt.network.v2017_11_01.aio.operations.NetworkWatchersOperations - :ivar packet_captures: PacketCapturesOperations operations - :vartype packet_captures: azure.mgmt.network.v2017_11_01.aio.operations.PacketCapturesOperations - :ivar connection_monitors: ConnectionMonitorsOperations operations - :vartype connection_monitors: azure.mgmt.network.v2017_11_01.aio.operations.ConnectionMonitorsOperations - :ivar operations: Operations operations - :vartype operations: azure.mgmt.network.v2017_11_01.aio.operations.Operations - :ivar public_ip_addresses: PublicIPAddressesOperations operations - :vartype public_ip_addresses: azure.mgmt.network.v2017_11_01.aio.operations.PublicIPAddressesOperations - :ivar route_filters: RouteFiltersOperations operations - :vartype route_filters: azure.mgmt.network.v2017_11_01.aio.operations.RouteFiltersOperations - :ivar route_filter_rules: RouteFilterRulesOperations operations - :vartype route_filter_rules: azure.mgmt.network.v2017_11_01.aio.operations.RouteFilterRulesOperations - :ivar route_tables: RouteTablesOperations operations - :vartype route_tables: azure.mgmt.network.v2017_11_01.aio.operations.RouteTablesOperations - :ivar routes: RoutesOperations operations - :vartype routes: azure.mgmt.network.v2017_11_01.aio.operations.RoutesOperations - :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations - :vartype bgp_service_communities: azure.mgmt.network.v2017_11_01.aio.operations.BgpServiceCommunitiesOperations - :ivar usages: UsagesOperations operations - :vartype usages: azure.mgmt.network.v2017_11_01.aio.operations.UsagesOperations - :ivar virtual_networks: VirtualNetworksOperations operations - :vartype virtual_networks: azure.mgmt.network.v2017_11_01.aio.operations.VirtualNetworksOperations - :ivar subnets: SubnetsOperations operations - :vartype subnets: azure.mgmt.network.v2017_11_01.aio.operations.SubnetsOperations - :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations - :vartype virtual_network_peerings: azure.mgmt.network.v2017_11_01.aio.operations.VirtualNetworkPeeringsOperations - :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations - :vartype virtual_network_gateways: azure.mgmt.network.v2017_11_01.aio.operations.VirtualNetworkGatewaysOperations - :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations - :vartype virtual_network_gateway_connections: azure.mgmt.network.v2017_11_01.aio.operations.VirtualNetworkGatewayConnectionsOperations - :ivar local_network_gateways: LocalNetworkGatewaysOperations operations - :vartype local_network_gateways: azure.mgmt.network.v2017_11_01.aio.operations.LocalNetworkGatewaysOperations - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. - :type subscription_id: str - :param str base_url: Service URL - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - """ - - def __init__( - self, - credential: "AsyncTokenCredential", - subscription_id: str, - base_url: Optional[str] = None, - **kwargs: Any - ) -> None: - if not base_url: - base_url = 'https://management.azure.com' - self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) - self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) - - client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False - self._deserialize = Deserializer(client_models) - - self.application_gateways = ApplicationGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.application_security_groups = ApplicationSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.available_endpoint_services = AvailableEndpointServicesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_circuits = ExpressRouteCircuitsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.express_route_service_providers = ExpressRouteServiceProvidersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancers = LoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.inbound_nat_rules = InboundNatRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.load_balancer_probes = LoadBalancerProbesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interfaces = NetworkInterfacesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_security_groups = NetworkSecurityGroupsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.security_rules = SecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.default_security_rules = DefaultSecurityRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.network_watchers = NetworkWatchersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.packet_captures = PacketCapturesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.connection_monitors = ConnectionMonitorsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.operations = Operations( - self._client, self._config, self._serialize, self._deserialize) - self.public_ip_addresses = PublicIPAddressesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filters = RouteFiltersOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_filter_rules = RouteFilterRulesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.route_tables = RouteTablesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.routes = RoutesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.bgp_service_communities = BgpServiceCommunitiesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.usages = UsagesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_networks = VirtualNetworksOperations( - self._client, self._config, self._serialize, self._deserialize) - self.subnets = SubnetsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_peerings = VirtualNetworkPeeringsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateways = VirtualNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.local_network_gateways = LocalNetworkGatewaysOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: - """Runs the network request through the client's chained policies. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse - """ - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response - - async def close(self) -> None: - await self._client.close() - - async def __aenter__(self) -> "NetworkManagementClient": - await self._client.__aenter__() - return self - - async def __aexit__(self, *exc_details) -> None: - await self._client.__aexit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/__init__.py deleted file mode 100644 index 1263809bc3f1..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/__init__.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._application_gateways_operations import ApplicationGatewaysOperations -from ._application_security_groups_operations import ApplicationSecurityGroupsOperations -from ._network_management_client_operations import NetworkManagementClientOperationsMixin -from ._available_endpoint_services_operations import AvailableEndpointServicesOperations -from ._express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations -from ._express_route_circuit_peerings_operations import ExpressRouteCircuitPeeringsOperations -from ._express_route_circuits_operations import ExpressRouteCircuitsOperations -from ._express_route_service_providers_operations import ExpressRouteServiceProvidersOperations -from ._load_balancers_operations import LoadBalancersOperations -from ._load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations -from ._load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations -from ._inbound_nat_rules_operations import InboundNatRulesOperations -from ._load_balancer_load_balancing_rules_operations import LoadBalancerLoadBalancingRulesOperations -from ._load_balancer_network_interfaces_operations import LoadBalancerNetworkInterfacesOperations -from ._load_balancer_probes_operations import LoadBalancerProbesOperations -from ._network_interfaces_operations import NetworkInterfacesOperations -from ._network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations -from ._network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations -from ._network_security_groups_operations import NetworkSecurityGroupsOperations -from ._security_rules_operations import SecurityRulesOperations -from ._default_security_rules_operations import DefaultSecurityRulesOperations -from ._network_watchers_operations import NetworkWatchersOperations -from ._packet_captures_operations import PacketCapturesOperations -from ._connection_monitors_operations import ConnectionMonitorsOperations -from ._operations import Operations -from ._public_ip_addresses_operations import PublicIPAddressesOperations -from ._route_filters_operations import RouteFiltersOperations -from ._route_filter_rules_operations import RouteFilterRulesOperations -from ._route_tables_operations import RouteTablesOperations -from ._routes_operations import RoutesOperations -from ._bgp_service_communities_operations import BgpServiceCommunitiesOperations -from ._usages_operations import UsagesOperations -from ._virtual_networks_operations import VirtualNetworksOperations -from ._subnets_operations import SubnetsOperations -from ._virtual_network_peerings_operations import VirtualNetworkPeeringsOperations -from ._virtual_network_gateways_operations import VirtualNetworkGatewaysOperations -from ._virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations -from ._local_network_gateways_operations import LocalNetworkGatewaysOperations - -__all__ = [ - 'ApplicationGatewaysOperations', - 'ApplicationSecurityGroupsOperations', - 'NetworkManagementClientOperationsMixin', - 'AvailableEndpointServicesOperations', - 'ExpressRouteCircuitAuthorizationsOperations', - 'ExpressRouteCircuitPeeringsOperations', - 'ExpressRouteCircuitsOperations', - 'ExpressRouteServiceProvidersOperations', - 'LoadBalancersOperations', - 'LoadBalancerBackendAddressPoolsOperations', - 'LoadBalancerFrontendIPConfigurationsOperations', - 'InboundNatRulesOperations', - 'LoadBalancerLoadBalancingRulesOperations', - 'LoadBalancerNetworkInterfacesOperations', - 'LoadBalancerProbesOperations', - 'NetworkInterfacesOperations', - 'NetworkInterfaceIPConfigurationsOperations', - 'NetworkInterfaceLoadBalancersOperations', - 'NetworkSecurityGroupsOperations', - 'SecurityRulesOperations', - 'DefaultSecurityRulesOperations', - 'NetworkWatchersOperations', - 'PacketCapturesOperations', - 'ConnectionMonitorsOperations', - 'Operations', - 'PublicIPAddressesOperations', - 'RouteFiltersOperations', - 'RouteFilterRulesOperations', - 'RouteTablesOperations', - 'RoutesOperations', - 'BgpServiceCommunitiesOperations', - 'UsagesOperations', - 'VirtualNetworksOperations', - 'SubnetsOperations', - 'VirtualNetworkPeeringsOperations', - 'VirtualNetworkGatewaysOperations', - 'VirtualNetworkGatewayConnectionsOperations', - 'LocalNetworkGatewaysOperations', -] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuit_authorizations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuit_authorizations_operations.py deleted file mode 100644 index 5d8e03f54932..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuit_authorizations_operations.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ExpressRouteCircuitAuthorizationsOperations: - """ExpressRouteCircuitAuthorizationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def _delete_initial( - self, - resource_group_name: str, - circuit_name: str, - authorization_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - circuit_name: str, - authorization_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified authorization from the specified express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - authorization_name=authorization_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - circuit_name: str, - authorization_name: str, - **kwargs: Any - ) -> "_models.ExpressRouteCircuitAuthorization": - """Gets the specified authorization from the specified express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitAuthorization, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - circuit_name: str, - authorization_name: str, - authorization_parameters: "_models.ExpressRouteCircuitAuthorization", - **kwargs: Any - ) -> "_models.ExpressRouteCircuitAuthorization": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(authorization_parameters, 'ExpressRouteCircuitAuthorization') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - circuit_name: str, - authorization_name: str, - authorization_parameters: "_models.ExpressRouteCircuitAuthorization", - **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuitAuthorization"]: - """Creates or updates an authorization in the specified express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str - :param authorization_parameters: Parameters supplied to the create or update express route - circuit authorization operation. - :type authorization_parameters: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitAuthorization or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - authorization_name=authorization_name, - authorization_parameters=authorization_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - def list( - self, - resource_group_name: str, - circuit_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.AuthorizationListResult"]: - """Gets all authorizations in an express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either AuthorizationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.AuthorizationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('AuthorizationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_service_providers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_service_providers_operations.py deleted file mode 100644 index 4266e46b798c..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_service_providers_operations.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class ExpressRouteServiceProvidersOperations: - """ExpressRouteServiceProvidersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs: Any - ) -> AsyncIterable["_models.ExpressRouteServiceProviderListResult"]: - """Gets all the available express route service providers. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteServiceProviderListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ExpressRouteServiceProviderListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteServiceProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteServiceProviderListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py deleted file mode 100644 index 4f3267303293..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class LoadBalancerFrontendIPConfigurationsOperations: - """LoadBalancerFrontendIPConfigurationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - load_balancer_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerFrontendIPConfigurationListResult"]: - """Gets all the load balancer frontend IP configurations. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerFrontendIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerFrontendIPConfigurationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerFrontendIPConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerFrontendIPConfigurationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations'} # type: ignore - - async def get( - self, - resource_group_name: str, - load_balancer_name: str, - frontend_ip_configuration_name: str, - **kwargs: Any - ) -> "_models.FrontendIPConfiguration": - """Gets load balancer frontend IP configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param frontend_ip_configuration_name: The name of the frontend IP configuration. - :type frontend_ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: FrontendIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.FrontendIPConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendIPConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'frontendIPConfigurationName': self._serialize.url("frontend_ip_configuration_name", frontend_ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('FrontendIPConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interface_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interface_ip_configurations_operations.py deleted file mode 100644 index 618a52a25169..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interface_ip_configurations_operations.py +++ /dev/null @@ -1,178 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class NetworkInterfaceIPConfigurationsOperations: - """NetworkInterfaceIPConfigurationsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - network_interface_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceIPConfigurationListResult"]: - """Get all ip configurations in a network interface. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfigurationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceIPConfigurationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations'} # type: ignore - - async def get( - self, - resource_group_name: str, - network_interface_name: str, - ip_configuration_name: str, - **kwargs: Any - ) -> "_models.NetworkInterfaceIPConfiguration": - """Gets the specified network interface ip configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the ip configuration name. - :type ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interface_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interface_load_balancers_operations.py deleted file mode 100644 index bc6e1723c895..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interface_load_balancers_operations.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class NetworkInterfaceLoadBalancersOperations: - """NetworkInterfaceLoadBalancersOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name: str, - network_interface_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceLoadBalancerListResult"]: - """List all load balancers in a network interface. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceLoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceLoadBalancerListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceLoadBalancerListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceLoadBalancerListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_usages_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_usages_operations.py deleted file mode 100644 index 90bbfc85b5f0..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_usages_operations.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.mgmt.core.exceptions import ARMErrorFormat - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class UsagesOperations: - """UsagesOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - location: str, - **kwargs: Any - ) -> AsyncIterable["_models.UsagesListResult"]: - """List network usages for a subscription. - - :param location: The location where resource usage is queried. - :type location: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.UsagesListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('UsagesListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_peerings_operations.py deleted file mode 100644 index ee962182a37d..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_peerings_operations.py +++ /dev/null @@ -1,429 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class VirtualNetworkPeeringsOperations: - """VirtualNetworkPeeringsOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def _delete_initial( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified virtual network peering. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the virtual network peering. - :type virtual_network_peering_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - virtual_network_peering_name=virtual_network_peering_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - **kwargs: Any - ) -> "_models.VirtualNetworkPeering": - """Gets the specified virtual network peering. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the virtual network peering. - :type virtual_network_peering_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - virtual_network_peering_parameters: "_models.VirtualNetworkPeering", - **kwargs: Any - ) -> "_models.VirtualNetworkPeering": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(virtual_network_peering_parameters, 'VirtualNetworkPeering') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - async def begin_create_or_update( - self, - resource_group_name: str, - virtual_network_name: str, - virtual_network_peering_name: str, - virtual_network_peering_parameters: "_models.VirtualNetworkPeering", - **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkPeering"]: - """Creates or updates a peering in the specified virtual network. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the peering. - :type virtual_network_peering_name: str - :param virtual_network_peering_parameters: Parameters supplied to the create or update virtual - network peering operation. - :type virtual_network_peering_parameters: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkPeering or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._create_or_update_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - virtual_network_peering_name=virtual_network_peering_name, - virtual_network_peering_parameters=virtual_network_peering_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - def list( - self, - resource_group_name: str, - virtual_network_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkPeeringListResult"]: - """Gets all virtual network peerings in a virtual network. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkPeeringListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeeringListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeeringListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkPeeringListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/__init__.py deleted file mode 100644 index cf61fdd798ac..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/__init__.py +++ /dev/null @@ -1,817 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -try: - from ._models_py3 import AddressSpace - from ._models_py3 import ApplicationGateway - from ._models_py3 import ApplicationGatewayAuthenticationCertificate - from ._models_py3 import ApplicationGatewayAvailableSslOptions - from ._models_py3 import ApplicationGatewayAvailableSslPredefinedPolicies - from ._models_py3 import ApplicationGatewayAvailableWafRuleSetsResult - from ._models_py3 import ApplicationGatewayBackendAddress - from ._models_py3 import ApplicationGatewayBackendAddressPool - from ._models_py3 import ApplicationGatewayBackendHealth - from ._models_py3 import ApplicationGatewayBackendHealthHttpSettings - from ._models_py3 import ApplicationGatewayBackendHealthPool - from ._models_py3 import ApplicationGatewayBackendHealthServer - from ._models_py3 import ApplicationGatewayBackendHttpSettings - from ._models_py3 import ApplicationGatewayConnectionDraining - from ._models_py3 import ApplicationGatewayFirewallDisabledRuleGroup - from ._models_py3 import ApplicationGatewayFirewallRule - from ._models_py3 import ApplicationGatewayFirewallRuleGroup - from ._models_py3 import ApplicationGatewayFirewallRuleSet - from ._models_py3 import ApplicationGatewayFrontendIPConfiguration - from ._models_py3 import ApplicationGatewayFrontendPort - from ._models_py3 import ApplicationGatewayHttpListener - from ._models_py3 import ApplicationGatewayIPConfiguration - from ._models_py3 import ApplicationGatewayListResult - from ._models_py3 import ApplicationGatewayPathRule - from ._models_py3 import ApplicationGatewayProbe - from ._models_py3 import ApplicationGatewayProbeHealthResponseMatch - from ._models_py3 import ApplicationGatewayRedirectConfiguration - from ._models_py3 import ApplicationGatewayRequestRoutingRule - from ._models_py3 import ApplicationGatewaySku - from ._models_py3 import ApplicationGatewaySslCertificate - from ._models_py3 import ApplicationGatewaySslPolicy - from ._models_py3 import ApplicationGatewaySslPredefinedPolicy - from ._models_py3 import ApplicationGatewayUrlPathMap - from ._models_py3 import ApplicationGatewayWebApplicationFirewallConfiguration - from ._models_py3 import ApplicationSecurityGroup - from ._models_py3 import ApplicationSecurityGroupListResult - from ._models_py3 import AuthorizationListResult - from ._models_py3 import Availability - from ._models_py3 import AvailableProvidersList - from ._models_py3 import AvailableProvidersListCity - from ._models_py3 import AvailableProvidersListCountry - from ._models_py3 import AvailableProvidersListParameters - from ._models_py3 import AvailableProvidersListState - from ._models_py3 import AzureAsyncOperationResult - from ._models_py3 import AzureReachabilityReport - from ._models_py3 import AzureReachabilityReportItem - from ._models_py3 import AzureReachabilityReportLatencyInfo - from ._models_py3 import AzureReachabilityReportLocation - from ._models_py3 import AzureReachabilityReportParameters - from ._models_py3 import BGPCommunity - from ._models_py3 import BackendAddressPool - from ._models_py3 import BgpPeerStatus - from ._models_py3 import BgpPeerStatusListResult - from ._models_py3 import BgpServiceCommunity - from ._models_py3 import BgpServiceCommunityListResult - from ._models_py3 import BgpSettings - from ._models_py3 import ConnectionMonitor - from ._models_py3 import ConnectionMonitorDestination - from ._models_py3 import ConnectionMonitorListResult - from ._models_py3 import ConnectionMonitorParameters - from ._models_py3 import ConnectionMonitorQueryResult - from ._models_py3 import ConnectionMonitorResult - from ._models_py3 import ConnectionMonitorResultProperties - from ._models_py3 import ConnectionMonitorSource - from ._models_py3 import ConnectionResetSharedKey - from ._models_py3 import ConnectionSharedKey - from ._models_py3 import ConnectionStateSnapshot - from ._models_py3 import ConnectivityDestination - from ._models_py3 import ConnectivityHop - from ._models_py3 import ConnectivityInformation - from ._models_py3 import ConnectivityIssue - from ._models_py3 import ConnectivityParameters - from ._models_py3 import ConnectivitySource - from ._models_py3 import DhcpOptions - from ._models_py3 import Dimension - from ._models_py3 import DnsNameAvailabilityResult - from ._models_py3 import EffectiveNetworkSecurityGroup - from ._models_py3 import EffectiveNetworkSecurityGroupAssociation - from ._models_py3 import EffectiveNetworkSecurityGroupListResult - from ._models_py3 import EffectiveNetworkSecurityRule - from ._models_py3 import EffectiveRoute - from ._models_py3 import EffectiveRouteListResult - from ._models_py3 import EndpointServiceResult - from ._models_py3 import EndpointServicesListResult - from ._models_py3 import Error - from ._models_py3 import ErrorDetails - from ._models_py3 import ExpressRouteCircuit - from ._models_py3 import ExpressRouteCircuitArpTable - from ._models_py3 import ExpressRouteCircuitAuthorization - from ._models_py3 import ExpressRouteCircuitListResult - from ._models_py3 import ExpressRouteCircuitPeering - from ._models_py3 import ExpressRouteCircuitPeeringConfig - from ._models_py3 import ExpressRouteCircuitPeeringListResult - from ._models_py3 import ExpressRouteCircuitRoutesTable - from ._models_py3 import ExpressRouteCircuitRoutesTableSummary - from ._models_py3 import ExpressRouteCircuitServiceProviderProperties - from ._models_py3 import ExpressRouteCircuitSku - from ._models_py3 import ExpressRouteCircuitStats - from ._models_py3 import ExpressRouteCircuitsArpTableListResult - from ._models_py3 import ExpressRouteCircuitsRoutesTableListResult - from ._models_py3 import ExpressRouteCircuitsRoutesTableSummaryListResult - from ._models_py3 import ExpressRouteServiceProvider - from ._models_py3 import ExpressRouteServiceProviderBandwidthsOffered - from ._models_py3 import ExpressRouteServiceProviderListResult - from ._models_py3 import FlowLogInformation - from ._models_py3 import FlowLogStatusParameters - from ._models_py3 import FrontendIPConfiguration - from ._models_py3 import GatewayRoute - from ._models_py3 import GatewayRouteListResult - from ._models_py3 import IPAddressAvailabilityResult - from ._models_py3 import IPConfiguration - from ._models_py3 import InboundNatPool - from ._models_py3 import InboundNatRule - from ._models_py3 import InboundNatRuleListResult - from ._models_py3 import IpTag - from ._models_py3 import IpsecPolicy - from ._models_py3 import Ipv6ExpressRouteCircuitPeeringConfig - from ._models_py3 import LoadBalancer - from ._models_py3 import LoadBalancerBackendAddressPoolListResult - from ._models_py3 import LoadBalancerFrontendIPConfigurationListResult - from ._models_py3 import LoadBalancerListResult - from ._models_py3 import LoadBalancerLoadBalancingRuleListResult - from ._models_py3 import LoadBalancerProbeListResult - from ._models_py3 import LoadBalancerSku - from ._models_py3 import LoadBalancingRule - from ._models_py3 import LocalNetworkGateway - from ._models_py3 import LocalNetworkGatewayListResult - from ._models_py3 import LogSpecification - from ._models_py3 import MetricSpecification - from ._models_py3 import NetworkInterface - from ._models_py3 import NetworkInterfaceAssociation - from ._models_py3 import NetworkInterfaceDnsSettings - from ._models_py3 import NetworkInterfaceIPConfiguration - from ._models_py3 import NetworkInterfaceIPConfigurationListResult - from ._models_py3 import NetworkInterfaceListResult - from ._models_py3 import NetworkInterfaceLoadBalancerListResult - from ._models_py3 import NetworkSecurityGroup - from ._models_py3 import NetworkSecurityGroupListResult - from ._models_py3 import NetworkWatcher - from ._models_py3 import NetworkWatcherListResult - from ._models_py3 import NextHopParameters - from ._models_py3 import NextHopResult - from ._models_py3 import Operation - from ._models_py3 import OperationDisplay - from ._models_py3 import OperationListResult - from ._models_py3 import OperationPropertiesFormatServiceSpecification - from ._models_py3 import OutboundNatRule - from ._models_py3 import PacketCapture - from ._models_py3 import PacketCaptureFilter - from ._models_py3 import PacketCaptureListResult - from ._models_py3 import PacketCaptureParameters - from ._models_py3 import PacketCaptureQueryStatusResult - from ._models_py3 import PacketCaptureResult - from ._models_py3 import PacketCaptureResultProperties - from ._models_py3 import PacketCaptureStorageLocation - from ._models_py3 import PatchRouteFilter - from ._models_py3 import PatchRouteFilterRule - from ._models_py3 import Probe - from ._models_py3 import PublicIPAddress - from ._models_py3 import PublicIPAddressDnsSettings - from ._models_py3 import PublicIPAddressListResult - from ._models_py3 import PublicIPAddressSku - from ._models_py3 import QueryTroubleshootingParameters - from ._models_py3 import Resource - from ._models_py3 import ResourceNavigationLink - from ._models_py3 import RetentionPolicyParameters - from ._models_py3 import Route - from ._models_py3 import RouteFilter - from ._models_py3 import RouteFilterListResult - from ._models_py3 import RouteFilterRule - from ._models_py3 import RouteFilterRuleListResult - from ._models_py3 import RouteListResult - from ._models_py3 import RouteTable - from ._models_py3 import RouteTableListResult - from ._models_py3 import SecurityGroupNetworkInterface - from ._models_py3 import SecurityGroupViewParameters - from ._models_py3 import SecurityGroupViewResult - from ._models_py3 import SecurityRule - from ._models_py3 import SecurityRuleAssociations - from ._models_py3 import SecurityRuleListResult - from ._models_py3 import ServiceEndpointPropertiesFormat - from ._models_py3 import SubResource - from ._models_py3 import Subnet - from ._models_py3 import SubnetAssociation - from ._models_py3 import SubnetListResult - from ._models_py3 import TagsObject - from ._models_py3 import Topology - from ._models_py3 import TopologyAssociation - from ._models_py3 import TopologyParameters - from ._models_py3 import TopologyResource - from ._models_py3 import TroubleshootingDetails - from ._models_py3 import TroubleshootingParameters - from ._models_py3 import TroubleshootingRecommendedActions - from ._models_py3 import TroubleshootingResult - from ._models_py3 import TunnelConnectionHealth - from ._models_py3 import Usage - from ._models_py3 import UsageName - from ._models_py3 import UsagesListResult - from ._models_py3 import VerificationIPFlowParameters - from ._models_py3 import VerificationIPFlowResult - from ._models_py3 import VirtualNetwork - from ._models_py3 import VirtualNetworkConnectionGatewayReference - from ._models_py3 import VirtualNetworkGateway - from ._models_py3 import VirtualNetworkGatewayConnection - from ._models_py3 import VirtualNetworkGatewayConnectionListEntity - from ._models_py3 import VirtualNetworkGatewayConnectionListResult - from ._models_py3 import VirtualNetworkGatewayIPConfiguration - from ._models_py3 import VirtualNetworkGatewayListConnectionsResult - from ._models_py3 import VirtualNetworkGatewayListResult - from ._models_py3 import VirtualNetworkGatewaySku - from ._models_py3 import VirtualNetworkListResult - from ._models_py3 import VirtualNetworkListUsageResult - from ._models_py3 import VirtualNetworkPeering - from ._models_py3 import VirtualNetworkPeeringListResult - from ._models_py3 import VirtualNetworkUsage - from ._models_py3 import VirtualNetworkUsageName - from ._models_py3 import VpnClientConfiguration - from ._models_py3 import VpnClientParameters - from ._models_py3 import VpnClientRevokedCertificate - from ._models_py3 import VpnClientRootCertificate - from ._models_py3 import VpnDeviceScriptParameters -except (SyntaxError, ImportError): - from ._models import AddressSpace # type: ignore - from ._models import ApplicationGateway # type: ignore - from ._models import ApplicationGatewayAuthenticationCertificate # type: ignore - from ._models import ApplicationGatewayAvailableSslOptions # type: ignore - from ._models import ApplicationGatewayAvailableSslPredefinedPolicies # type: ignore - from ._models import ApplicationGatewayAvailableWafRuleSetsResult # type: ignore - from ._models import ApplicationGatewayBackendAddress # type: ignore - from ._models import ApplicationGatewayBackendAddressPool # type: ignore - from ._models import ApplicationGatewayBackendHealth # type: ignore - from ._models import ApplicationGatewayBackendHealthHttpSettings # type: ignore - from ._models import ApplicationGatewayBackendHealthPool # type: ignore - from ._models import ApplicationGatewayBackendHealthServer # type: ignore - from ._models import ApplicationGatewayBackendHttpSettings # type: ignore - from ._models import ApplicationGatewayConnectionDraining # type: ignore - from ._models import ApplicationGatewayFirewallDisabledRuleGroup # type: ignore - from ._models import ApplicationGatewayFirewallRule # type: ignore - from ._models import ApplicationGatewayFirewallRuleGroup # type: ignore - from ._models import ApplicationGatewayFirewallRuleSet # type: ignore - from ._models import ApplicationGatewayFrontendIPConfiguration # type: ignore - from ._models import ApplicationGatewayFrontendPort # type: ignore - from ._models import ApplicationGatewayHttpListener # type: ignore - from ._models import ApplicationGatewayIPConfiguration # type: ignore - from ._models import ApplicationGatewayListResult # type: ignore - from ._models import ApplicationGatewayPathRule # type: ignore - from ._models import ApplicationGatewayProbe # type: ignore - from ._models import ApplicationGatewayProbeHealthResponseMatch # type: ignore - from ._models import ApplicationGatewayRedirectConfiguration # type: ignore - from ._models import ApplicationGatewayRequestRoutingRule # type: ignore - from ._models import ApplicationGatewaySku # type: ignore - from ._models import ApplicationGatewaySslCertificate # type: ignore - from ._models import ApplicationGatewaySslPolicy # type: ignore - from ._models import ApplicationGatewaySslPredefinedPolicy # type: ignore - from ._models import ApplicationGatewayUrlPathMap # type: ignore - from ._models import ApplicationGatewayWebApplicationFirewallConfiguration # type: ignore - from ._models import ApplicationSecurityGroup # type: ignore - from ._models import ApplicationSecurityGroupListResult # type: ignore - from ._models import AuthorizationListResult # type: ignore - from ._models import Availability # type: ignore - from ._models import AvailableProvidersList # type: ignore - from ._models import AvailableProvidersListCity # type: ignore - from ._models import AvailableProvidersListCountry # type: ignore - from ._models import AvailableProvidersListParameters # type: ignore - from ._models import AvailableProvidersListState # type: ignore - from ._models import AzureAsyncOperationResult # type: ignore - from ._models import AzureReachabilityReport # type: ignore - from ._models import AzureReachabilityReportItem # type: ignore - from ._models import AzureReachabilityReportLatencyInfo # type: ignore - from ._models import AzureReachabilityReportLocation # type: ignore - from ._models import AzureReachabilityReportParameters # type: ignore - from ._models import BGPCommunity # type: ignore - from ._models import BackendAddressPool # type: ignore - from ._models import BgpPeerStatus # type: ignore - from ._models import BgpPeerStatusListResult # type: ignore - from ._models import BgpServiceCommunity # type: ignore - from ._models import BgpServiceCommunityListResult # type: ignore - from ._models import BgpSettings # type: ignore - from ._models import ConnectionMonitor # type: ignore - from ._models import ConnectionMonitorDestination # type: ignore - from ._models import ConnectionMonitorListResult # type: ignore - from ._models import ConnectionMonitorParameters # type: ignore - from ._models import ConnectionMonitorQueryResult # type: ignore - from ._models import ConnectionMonitorResult # type: ignore - from ._models import ConnectionMonitorResultProperties # type: ignore - from ._models import ConnectionMonitorSource # type: ignore - from ._models import ConnectionResetSharedKey # type: ignore - from ._models import ConnectionSharedKey # type: ignore - from ._models import ConnectionStateSnapshot # type: ignore - from ._models import ConnectivityDestination # type: ignore - from ._models import ConnectivityHop # type: ignore - from ._models import ConnectivityInformation # type: ignore - from ._models import ConnectivityIssue # type: ignore - from ._models import ConnectivityParameters # type: ignore - from ._models import ConnectivitySource # type: ignore - from ._models import DhcpOptions # type: ignore - from ._models import Dimension # type: ignore - from ._models import DnsNameAvailabilityResult # type: ignore - from ._models import EffectiveNetworkSecurityGroup # type: ignore - from ._models import EffectiveNetworkSecurityGroupAssociation # type: ignore - from ._models import EffectiveNetworkSecurityGroupListResult # type: ignore - from ._models import EffectiveNetworkSecurityRule # type: ignore - from ._models import EffectiveRoute # type: ignore - from ._models import EffectiveRouteListResult # type: ignore - from ._models import EndpointServiceResult # type: ignore - from ._models import EndpointServicesListResult # type: ignore - from ._models import Error # type: ignore - from ._models import ErrorDetails # type: ignore - from ._models import ExpressRouteCircuit # type: ignore - from ._models import ExpressRouteCircuitArpTable # type: ignore - from ._models import ExpressRouteCircuitAuthorization # type: ignore - from ._models import ExpressRouteCircuitListResult # type: ignore - from ._models import ExpressRouteCircuitPeering # type: ignore - from ._models import ExpressRouteCircuitPeeringConfig # type: ignore - from ._models import ExpressRouteCircuitPeeringListResult # type: ignore - from ._models import ExpressRouteCircuitRoutesTable # type: ignore - from ._models import ExpressRouteCircuitRoutesTableSummary # type: ignore - from ._models import ExpressRouteCircuitServiceProviderProperties # type: ignore - from ._models import ExpressRouteCircuitSku # type: ignore - from ._models import ExpressRouteCircuitStats # type: ignore - from ._models import ExpressRouteCircuitsArpTableListResult # type: ignore - from ._models import ExpressRouteCircuitsRoutesTableListResult # type: ignore - from ._models import ExpressRouteCircuitsRoutesTableSummaryListResult # type: ignore - from ._models import ExpressRouteServiceProvider # type: ignore - from ._models import ExpressRouteServiceProviderBandwidthsOffered # type: ignore - from ._models import ExpressRouteServiceProviderListResult # type: ignore - from ._models import FlowLogInformation # type: ignore - from ._models import FlowLogStatusParameters # type: ignore - from ._models import FrontendIPConfiguration # type: ignore - from ._models import GatewayRoute # type: ignore - from ._models import GatewayRouteListResult # type: ignore - from ._models import IPAddressAvailabilityResult # type: ignore - from ._models import IPConfiguration # type: ignore - from ._models import InboundNatPool # type: ignore - from ._models import InboundNatRule # type: ignore - from ._models import InboundNatRuleListResult # type: ignore - from ._models import IpTag # type: ignore - from ._models import IpsecPolicy # type: ignore - from ._models import Ipv6ExpressRouteCircuitPeeringConfig # type: ignore - from ._models import LoadBalancer # type: ignore - from ._models import LoadBalancerBackendAddressPoolListResult # type: ignore - from ._models import LoadBalancerFrontendIPConfigurationListResult # type: ignore - from ._models import LoadBalancerListResult # type: ignore - from ._models import LoadBalancerLoadBalancingRuleListResult # type: ignore - from ._models import LoadBalancerProbeListResult # type: ignore - from ._models import LoadBalancerSku # type: ignore - from ._models import LoadBalancingRule # type: ignore - from ._models import LocalNetworkGateway # type: ignore - from ._models import LocalNetworkGatewayListResult # type: ignore - from ._models import LogSpecification # type: ignore - from ._models import MetricSpecification # type: ignore - from ._models import NetworkInterface # type: ignore - from ._models import NetworkInterfaceAssociation # type: ignore - from ._models import NetworkInterfaceDnsSettings # type: ignore - from ._models import NetworkInterfaceIPConfiguration # type: ignore - from ._models import NetworkInterfaceIPConfigurationListResult # type: ignore - from ._models import NetworkInterfaceListResult # type: ignore - from ._models import NetworkInterfaceLoadBalancerListResult # type: ignore - from ._models import NetworkSecurityGroup # type: ignore - from ._models import NetworkSecurityGroupListResult # type: ignore - from ._models import NetworkWatcher # type: ignore - from ._models import NetworkWatcherListResult # type: ignore - from ._models import NextHopParameters # type: ignore - from ._models import NextHopResult # type: ignore - from ._models import Operation # type: ignore - from ._models import OperationDisplay # type: ignore - from ._models import OperationListResult # type: ignore - from ._models import OperationPropertiesFormatServiceSpecification # type: ignore - from ._models import OutboundNatRule # type: ignore - from ._models import PacketCapture # type: ignore - from ._models import PacketCaptureFilter # type: ignore - from ._models import PacketCaptureListResult # type: ignore - from ._models import PacketCaptureParameters # type: ignore - from ._models import PacketCaptureQueryStatusResult # type: ignore - from ._models import PacketCaptureResult # type: ignore - from ._models import PacketCaptureResultProperties # type: ignore - from ._models import PacketCaptureStorageLocation # type: ignore - from ._models import PatchRouteFilter # type: ignore - from ._models import PatchRouteFilterRule # type: ignore - from ._models import Probe # type: ignore - from ._models import PublicIPAddress # type: ignore - from ._models import PublicIPAddressDnsSettings # type: ignore - from ._models import PublicIPAddressListResult # type: ignore - from ._models import PublicIPAddressSku # type: ignore - from ._models import QueryTroubleshootingParameters # type: ignore - from ._models import Resource # type: ignore - from ._models import ResourceNavigationLink # type: ignore - from ._models import RetentionPolicyParameters # type: ignore - from ._models import Route # type: ignore - from ._models import RouteFilter # type: ignore - from ._models import RouteFilterListResult # type: ignore - from ._models import RouteFilterRule # type: ignore - from ._models import RouteFilterRuleListResult # type: ignore - from ._models import RouteListResult # type: ignore - from ._models import RouteTable # type: ignore - from ._models import RouteTableListResult # type: ignore - from ._models import SecurityGroupNetworkInterface # type: ignore - from ._models import SecurityGroupViewParameters # type: ignore - from ._models import SecurityGroupViewResult # type: ignore - from ._models import SecurityRule # type: ignore - from ._models import SecurityRuleAssociations # type: ignore - from ._models import SecurityRuleListResult # type: ignore - from ._models import ServiceEndpointPropertiesFormat # type: ignore - from ._models import SubResource # type: ignore - from ._models import Subnet # type: ignore - from ._models import SubnetAssociation # type: ignore - from ._models import SubnetListResult # type: ignore - from ._models import TagsObject # type: ignore - from ._models import Topology # type: ignore - from ._models import TopologyAssociation # type: ignore - from ._models import TopologyParameters # type: ignore - from ._models import TopologyResource # type: ignore - from ._models import TroubleshootingDetails # type: ignore - from ._models import TroubleshootingParameters # type: ignore - from ._models import TroubleshootingRecommendedActions # type: ignore - from ._models import TroubleshootingResult # type: ignore - from ._models import TunnelConnectionHealth # type: ignore - from ._models import Usage # type: ignore - from ._models import UsageName # type: ignore - from ._models import UsagesListResult # type: ignore - from ._models import VerificationIPFlowParameters # type: ignore - from ._models import VerificationIPFlowResult # type: ignore - from ._models import VirtualNetwork # type: ignore - from ._models import VirtualNetworkConnectionGatewayReference # type: ignore - from ._models import VirtualNetworkGateway # type: ignore - from ._models import VirtualNetworkGatewayConnection # type: ignore - from ._models import VirtualNetworkGatewayConnectionListEntity # type: ignore - from ._models import VirtualNetworkGatewayConnectionListResult # type: ignore - from ._models import VirtualNetworkGatewayIPConfiguration # type: ignore - from ._models import VirtualNetworkGatewayListConnectionsResult # type: ignore - from ._models import VirtualNetworkGatewayListResult # type: ignore - from ._models import VirtualNetworkGatewaySku # type: ignore - from ._models import VirtualNetworkListResult # type: ignore - from ._models import VirtualNetworkListUsageResult # type: ignore - from ._models import VirtualNetworkPeering # type: ignore - from ._models import VirtualNetworkPeeringListResult # type: ignore - from ._models import VirtualNetworkUsage # type: ignore - from ._models import VirtualNetworkUsageName # type: ignore - from ._models import VpnClientConfiguration # type: ignore - from ._models import VpnClientParameters # type: ignore - from ._models import VpnClientRevokedCertificate # type: ignore - from ._models import VpnClientRootCertificate # type: ignore - from ._models import VpnDeviceScriptParameters # type: ignore - -from ._network_management_client_enums import ( - Access, - ApplicationGatewayBackendHealthServerHealth, - ApplicationGatewayCookieBasedAffinity, - ApplicationGatewayFirewallMode, - ApplicationGatewayOperationalState, - ApplicationGatewayProtocol, - ApplicationGatewayRedirectType, - ApplicationGatewayRequestRoutingRuleType, - ApplicationGatewaySkuName, - ApplicationGatewaySslCipherSuite, - ApplicationGatewaySslPolicyName, - ApplicationGatewaySslPolicyType, - ApplicationGatewaySslProtocol, - ApplicationGatewayTier, - AssociationType, - AuthenticationMethod, - AuthorizationUseStatus, - BgpPeerState, - ConnectionState, - ConnectionStatus, - DhGroup, - Direction, - EffectiveRouteSource, - EffectiveRouteState, - EffectiveSecurityRuleProtocol, - EvaluationState, - ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, - ExpressRouteCircuitPeeringState, - ExpressRouteCircuitPeeringType, - ExpressRouteCircuitSkuFamily, - ExpressRouteCircuitSkuTier, - IPAllocationMethod, - IPVersion, - IkeEncryption, - IkeIntegrity, - IpsecEncryption, - IpsecIntegrity, - IssueType, - LoadBalancerSkuName, - LoadDistribution, - NetworkOperationStatus, - NextHopType, - Origin, - PcError, - PcProtocol, - PcStatus, - PfsGroup, - ProbeProtocol, - ProcessorArchitecture, - Protocol, - ProvisioningState, - PublicIPAddressSkuName, - RouteFilterRuleType, - RouteNextHopType, - SecurityRuleAccess, - SecurityRuleDirection, - SecurityRuleProtocol, - ServiceProviderProvisioningState, - Severity, - TransportProtocol, - UsageUnit, - VirtualNetworkGatewayConnectionStatus, - VirtualNetworkGatewayConnectionType, - VirtualNetworkGatewaySkuName, - VirtualNetworkGatewaySkuTier, - VirtualNetworkGatewayType, - VirtualNetworkPeeringState, - VpnClientProtocol, - VpnType, -) - -__all__ = [ - 'AddressSpace', - 'ApplicationGateway', - 'ApplicationGatewayAuthenticationCertificate', - 'ApplicationGatewayAvailableSslOptions', - 'ApplicationGatewayAvailableSslPredefinedPolicies', - 'ApplicationGatewayAvailableWafRuleSetsResult', - 'ApplicationGatewayBackendAddress', - 'ApplicationGatewayBackendAddressPool', - 'ApplicationGatewayBackendHealth', - 'ApplicationGatewayBackendHealthHttpSettings', - 'ApplicationGatewayBackendHealthPool', - 'ApplicationGatewayBackendHealthServer', - 'ApplicationGatewayBackendHttpSettings', - 'ApplicationGatewayConnectionDraining', - 'ApplicationGatewayFirewallDisabledRuleGroup', - 'ApplicationGatewayFirewallRule', - 'ApplicationGatewayFirewallRuleGroup', - 'ApplicationGatewayFirewallRuleSet', - 'ApplicationGatewayFrontendIPConfiguration', - 'ApplicationGatewayFrontendPort', - 'ApplicationGatewayHttpListener', - 'ApplicationGatewayIPConfiguration', - 'ApplicationGatewayListResult', - 'ApplicationGatewayPathRule', - 'ApplicationGatewayProbe', - 'ApplicationGatewayProbeHealthResponseMatch', - 'ApplicationGatewayRedirectConfiguration', - 'ApplicationGatewayRequestRoutingRule', - 'ApplicationGatewaySku', - 'ApplicationGatewaySslCertificate', - 'ApplicationGatewaySslPolicy', - 'ApplicationGatewaySslPredefinedPolicy', - 'ApplicationGatewayUrlPathMap', - 'ApplicationGatewayWebApplicationFirewallConfiguration', - 'ApplicationSecurityGroup', - 'ApplicationSecurityGroupListResult', - 'AuthorizationListResult', - 'Availability', - 'AvailableProvidersList', - 'AvailableProvidersListCity', - 'AvailableProvidersListCountry', - 'AvailableProvidersListParameters', - 'AvailableProvidersListState', - 'AzureAsyncOperationResult', - 'AzureReachabilityReport', - 'AzureReachabilityReportItem', - 'AzureReachabilityReportLatencyInfo', - 'AzureReachabilityReportLocation', - 'AzureReachabilityReportParameters', - 'BGPCommunity', - 'BackendAddressPool', - 'BgpPeerStatus', - 'BgpPeerStatusListResult', - 'BgpServiceCommunity', - 'BgpServiceCommunityListResult', - 'BgpSettings', - 'ConnectionMonitor', - 'ConnectionMonitorDestination', - 'ConnectionMonitorListResult', - 'ConnectionMonitorParameters', - 'ConnectionMonitorQueryResult', - 'ConnectionMonitorResult', - 'ConnectionMonitorResultProperties', - 'ConnectionMonitorSource', - 'ConnectionResetSharedKey', - 'ConnectionSharedKey', - 'ConnectionStateSnapshot', - 'ConnectivityDestination', - 'ConnectivityHop', - 'ConnectivityInformation', - 'ConnectivityIssue', - 'ConnectivityParameters', - 'ConnectivitySource', - 'DhcpOptions', - 'Dimension', - 'DnsNameAvailabilityResult', - 'EffectiveNetworkSecurityGroup', - 'EffectiveNetworkSecurityGroupAssociation', - 'EffectiveNetworkSecurityGroupListResult', - 'EffectiveNetworkSecurityRule', - 'EffectiveRoute', - 'EffectiveRouteListResult', - 'EndpointServiceResult', - 'EndpointServicesListResult', - 'Error', - 'ErrorDetails', - 'ExpressRouteCircuit', - 'ExpressRouteCircuitArpTable', - 'ExpressRouteCircuitAuthorization', - 'ExpressRouteCircuitListResult', - 'ExpressRouteCircuitPeering', - 'ExpressRouteCircuitPeeringConfig', - 'ExpressRouteCircuitPeeringListResult', - 'ExpressRouteCircuitRoutesTable', - 'ExpressRouteCircuitRoutesTableSummary', - 'ExpressRouteCircuitServiceProviderProperties', - 'ExpressRouteCircuitSku', - 'ExpressRouteCircuitStats', - 'ExpressRouteCircuitsArpTableListResult', - 'ExpressRouteCircuitsRoutesTableListResult', - 'ExpressRouteCircuitsRoutesTableSummaryListResult', - 'ExpressRouteServiceProvider', - 'ExpressRouteServiceProviderBandwidthsOffered', - 'ExpressRouteServiceProviderListResult', - 'FlowLogInformation', - 'FlowLogStatusParameters', - 'FrontendIPConfiguration', - 'GatewayRoute', - 'GatewayRouteListResult', - 'IPAddressAvailabilityResult', - 'IPConfiguration', - 'InboundNatPool', - 'InboundNatRule', - 'InboundNatRuleListResult', - 'IpTag', - 'IpsecPolicy', - 'Ipv6ExpressRouteCircuitPeeringConfig', - 'LoadBalancer', - 'LoadBalancerBackendAddressPoolListResult', - 'LoadBalancerFrontendIPConfigurationListResult', - 'LoadBalancerListResult', - 'LoadBalancerLoadBalancingRuleListResult', - 'LoadBalancerProbeListResult', - 'LoadBalancerSku', - 'LoadBalancingRule', - 'LocalNetworkGateway', - 'LocalNetworkGatewayListResult', - 'LogSpecification', - 'MetricSpecification', - 'NetworkInterface', - 'NetworkInterfaceAssociation', - 'NetworkInterfaceDnsSettings', - 'NetworkInterfaceIPConfiguration', - 'NetworkInterfaceIPConfigurationListResult', - 'NetworkInterfaceListResult', - 'NetworkInterfaceLoadBalancerListResult', - 'NetworkSecurityGroup', - 'NetworkSecurityGroupListResult', - 'NetworkWatcher', - 'NetworkWatcherListResult', - 'NextHopParameters', - 'NextHopResult', - 'Operation', - 'OperationDisplay', - 'OperationListResult', - 'OperationPropertiesFormatServiceSpecification', - 'OutboundNatRule', - 'PacketCapture', - 'PacketCaptureFilter', - 'PacketCaptureListResult', - 'PacketCaptureParameters', - 'PacketCaptureQueryStatusResult', - 'PacketCaptureResult', - 'PacketCaptureResultProperties', - 'PacketCaptureStorageLocation', - 'PatchRouteFilter', - 'PatchRouteFilterRule', - 'Probe', - 'PublicIPAddress', - 'PublicIPAddressDnsSettings', - 'PublicIPAddressListResult', - 'PublicIPAddressSku', - 'QueryTroubleshootingParameters', - 'Resource', - 'ResourceNavigationLink', - 'RetentionPolicyParameters', - 'Route', - 'RouteFilter', - 'RouteFilterListResult', - 'RouteFilterRule', - 'RouteFilterRuleListResult', - 'RouteListResult', - 'RouteTable', - 'RouteTableListResult', - 'SecurityGroupNetworkInterface', - 'SecurityGroupViewParameters', - 'SecurityGroupViewResult', - 'SecurityRule', - 'SecurityRuleAssociations', - 'SecurityRuleListResult', - 'ServiceEndpointPropertiesFormat', - 'SubResource', - 'Subnet', - 'SubnetAssociation', - 'SubnetListResult', - 'TagsObject', - 'Topology', - 'TopologyAssociation', - 'TopologyParameters', - 'TopologyResource', - 'TroubleshootingDetails', - 'TroubleshootingParameters', - 'TroubleshootingRecommendedActions', - 'TroubleshootingResult', - 'TunnelConnectionHealth', - 'Usage', - 'UsageName', - 'UsagesListResult', - 'VerificationIPFlowParameters', - 'VerificationIPFlowResult', - 'VirtualNetwork', - 'VirtualNetworkConnectionGatewayReference', - 'VirtualNetworkGateway', - 'VirtualNetworkGatewayConnection', - 'VirtualNetworkGatewayConnectionListEntity', - 'VirtualNetworkGatewayConnectionListResult', - 'VirtualNetworkGatewayIPConfiguration', - 'VirtualNetworkGatewayListConnectionsResult', - 'VirtualNetworkGatewayListResult', - 'VirtualNetworkGatewaySku', - 'VirtualNetworkListResult', - 'VirtualNetworkListUsageResult', - 'VirtualNetworkPeering', - 'VirtualNetworkPeeringListResult', - 'VirtualNetworkUsage', - 'VirtualNetworkUsageName', - 'VpnClientConfiguration', - 'VpnClientParameters', - 'VpnClientRevokedCertificate', - 'VpnClientRootCertificate', - 'VpnDeviceScriptParameters', - 'Access', - 'ApplicationGatewayBackendHealthServerHealth', - 'ApplicationGatewayCookieBasedAffinity', - 'ApplicationGatewayFirewallMode', - 'ApplicationGatewayOperationalState', - 'ApplicationGatewayProtocol', - 'ApplicationGatewayRedirectType', - 'ApplicationGatewayRequestRoutingRuleType', - 'ApplicationGatewaySkuName', - 'ApplicationGatewaySslCipherSuite', - 'ApplicationGatewaySslPolicyName', - 'ApplicationGatewaySslPolicyType', - 'ApplicationGatewaySslProtocol', - 'ApplicationGatewayTier', - 'AssociationType', - 'AuthenticationMethod', - 'AuthorizationUseStatus', - 'BgpPeerState', - 'ConnectionState', - 'ConnectionStatus', - 'DhGroup', - 'Direction', - 'EffectiveRouteSource', - 'EffectiveRouteState', - 'EffectiveSecurityRuleProtocol', - 'EvaluationState', - 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixState', - 'ExpressRouteCircuitPeeringState', - 'ExpressRouteCircuitPeeringType', - 'ExpressRouteCircuitSkuFamily', - 'ExpressRouteCircuitSkuTier', - 'IPAllocationMethod', - 'IPVersion', - 'IkeEncryption', - 'IkeIntegrity', - 'IpsecEncryption', - 'IpsecIntegrity', - 'IssueType', - 'LoadBalancerSkuName', - 'LoadDistribution', - 'NetworkOperationStatus', - 'NextHopType', - 'Origin', - 'PcError', - 'PcProtocol', - 'PcStatus', - 'PfsGroup', - 'ProbeProtocol', - 'ProcessorArchitecture', - 'Protocol', - 'ProvisioningState', - 'PublicIPAddressSkuName', - 'RouteFilterRuleType', - 'RouteNextHopType', - 'SecurityRuleAccess', - 'SecurityRuleDirection', - 'SecurityRuleProtocol', - 'ServiceProviderProvisioningState', - 'Severity', - 'TransportProtocol', - 'UsageUnit', - 'VirtualNetworkGatewayConnectionStatus', - 'VirtualNetworkGatewayConnectionType', - 'VirtualNetworkGatewaySkuName', - 'VirtualNetworkGatewaySkuTier', - 'VirtualNetworkGatewayType', - 'VirtualNetworkPeeringState', - 'VpnClientProtocol', - 'VpnType', -] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_models.py deleted file mode 100644 index 3411df37c3b8..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_models.py +++ /dev/null @@ -1,8913 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import msrest.serialization - - -class AddressSpace(msrest.serialization.Model): - """AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. - - :param address_prefixes: A list of address blocks reserved for this virtual network in CIDR - notation. - :type address_prefixes: list[str] - """ - - _attribute_map = { - 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(AddressSpace, self).__init__(**kwargs) - self.address_prefixes = kwargs.get('address_prefixes', None) - - -class Resource(msrest.serialization.Model): - """Common resource representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.name = None - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - - -class ApplicationGateway(Resource): - """Application gateway resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param sku: SKU of the application gateway resource. - :type sku: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySku - :param ssl_policy: SSL policy of the application gateway resource. - :type ssl_policy: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPolicy - :ivar operational_state: Operational state of the application gateway resource. Possible values - include: "Stopped", "Starting", "Running", "Stopping". - :vartype operational_state: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayOperationalState - :param gateway_ip_configurations: Subnets of application the gateway resource. - :type gateway_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayIPConfiguration] - :param authentication_certificates: Authentication certificates of the application gateway - resource. - :type authentication_certificates: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayAuthenticationCertificate] - :param ssl_certificates: SSL certificates of the application gateway resource. - :type ssl_certificates: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslCertificate] - :param frontend_ip_configurations: Frontend IP addresses of the application gateway resource. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFrontendIPConfiguration] - :param frontend_ports: Frontend ports of the application gateway resource. - :type frontend_ports: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFrontendPort] - :param probes: Probes of the application gateway resource. - :type probes: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProbe] - :param backend_address_pools: Backend address pool of the application gateway resource. - :type backend_address_pools: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendAddressPool] - :param backend_http_settings_collection: Backend http settings of the application gateway - resource. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHttpSettings] - :param http_listeners: Http listeners of the application gateway resource. - :type http_listeners: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayHttpListener] - :param url_path_maps: URL path map of the application gateway resource. - :type url_path_maps: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayUrlPathMap] - :param request_routing_rules: Request routing rules of the application gateway resource. - :type request_routing_rules: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayRequestRoutingRule] - :param redirect_configurations: Redirect configurations of the application gateway resource. - :type redirect_configurations: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayRedirectConfiguration] - :param web_application_firewall_configuration: Web application firewall configuration. - :type web_application_firewall_configuration: - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayWebApplicationFirewallConfiguration - :param enable_http2: Whether HTTP2 is enabled on the application gateway resource. - :type enable_http2: bool - :param resource_guid: Resource GUID property of the application gateway resource. - :type resource_guid: str - :param provisioning_state: Provisioning state of the application gateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'operational_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'ApplicationGatewaySku'}, - 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, - 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, - 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, - 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, - 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, - 'probes': {'key': 'properties.probes', 'type': '[ApplicationGatewayProbe]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'backend_http_settings_collection': {'key': 'properties.backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHttpSettings]'}, - 'http_listeners': {'key': 'properties.httpListeners', 'type': '[ApplicationGatewayHttpListener]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[ApplicationGatewayUrlPathMap]'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[ApplicationGatewayRequestRoutingRule]'}, - 'redirect_configurations': {'key': 'properties.redirectConfigurations', 'type': '[ApplicationGatewayRedirectConfiguration]'}, - 'web_application_firewall_configuration': {'key': 'properties.webApplicationFirewallConfiguration', 'type': 'ApplicationGatewayWebApplicationFirewallConfiguration'}, - 'enable_http2': {'key': 'properties.enableHttp2', 'type': 'bool'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGateway, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.sku = kwargs.get('sku', None) - self.ssl_policy = kwargs.get('ssl_policy', None) - self.operational_state = None - self.gateway_ip_configurations = kwargs.get('gateway_ip_configurations', None) - self.authentication_certificates = kwargs.get('authentication_certificates', None) - self.ssl_certificates = kwargs.get('ssl_certificates', None) - self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) - self.frontend_ports = kwargs.get('frontend_ports', None) - self.probes = kwargs.get('probes', None) - self.backend_address_pools = kwargs.get('backend_address_pools', None) - self.backend_http_settings_collection = kwargs.get('backend_http_settings_collection', None) - self.http_listeners = kwargs.get('http_listeners', None) - self.url_path_maps = kwargs.get('url_path_maps', None) - self.request_routing_rules = kwargs.get('request_routing_rules', None) - self.redirect_configurations = kwargs.get('redirect_configurations', None) - self.web_application_firewall_configuration = kwargs.get('web_application_firewall_configuration', None) - self.enable_http2 = kwargs.get('enable_http2', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class SubResource(msrest.serialization.Model): - """Reference to another subresource. - - :param id: Resource ID. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - -class ApplicationGatewayAuthenticationCertificate(SubResource): - """Authentication certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Certificate public data. - :type data: str - :param provisioning_state: Provisioning state of the authentication certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAuthenticationCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.data = kwargs.get('data', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayAvailableSslOptions(Resource): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param predefined_policies: List of available Ssl predefined policy. - :type predefined_policies: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param default_policy: Name of the Ssl predefined policy applied by default to application - gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", - "AppGwSslPolicy20170401S". - :type default_policy: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPolicyName - :param available_cipher_suites: List of available Ssl cipher suites. - :type available_cipher_suites: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslCipherSuite] - :param available_protocols: List of available Ssl protocols. - :type available_protocols: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslProtocol] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'predefined_policies': {'key': 'properties.predefinedPolicies', 'type': '[SubResource]'}, - 'default_policy': {'key': 'properties.defaultPolicy', 'type': 'str'}, - 'available_cipher_suites': {'key': 'properties.availableCipherSuites', 'type': '[str]'}, - 'available_protocols': {'key': 'properties.availableProtocols', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAvailableSslOptions, self).__init__(**kwargs) - self.predefined_policies = kwargs.get('predefined_policies', None) - self.default_policy = kwargs.get('default_policy', None) - self.available_cipher_suites = kwargs.get('available_cipher_suites', None) - self.available_protocols = kwargs.get('available_protocols', None) - - -class ApplicationGatewayAvailableSslPredefinedPolicies(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - :param value: List of available Ssl predefined policy. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPredefinedPolicy] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewaySslPredefinedPolicy]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAvailableSslPredefinedPolicies, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ApplicationGatewayAvailableWafRuleSetsResult(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableWafRuleSets API service call. - - :param value: The list of application gateway rule sets. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallRuleSet] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayAvailableWafRuleSetsResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ApplicationGatewayBackendAddress(msrest.serialization.Model): - """Backend address of an application gateway. - - :param fqdn: Fully qualified domain name (FQDN). - :type fqdn: str - :param ip_address: IP address. - :type ip_address: str - """ - - _attribute_map = { - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendAddress, self).__init__(**kwargs) - self.fqdn = kwargs.get('fqdn', None) - self.ip_address = kwargs.get('ip_address', None) - - -class ApplicationGatewayBackendAddressPool(SubResource): - """Backend Address Pool of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Resource that is unique within a resource group. This name can be used to access - the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param backend_ip_configurations: Collection of references to IPs defined in network - interfaces. - :type backend_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration] - :param backend_addresses: Backend addresses. - :type backend_addresses: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendAddress] - :param provisioning_state: Provisioning state of the backend address pool resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'backend_addresses': {'key': 'properties.backendAddresses', 'type': '[ApplicationGatewayBackendAddress]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendAddressPool, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.backend_ip_configurations = kwargs.get('backend_ip_configurations', None) - self.backend_addresses = kwargs.get('backend_addresses', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayBackendHealth(msrest.serialization.Model): - """List of ApplicationGatewayBackendHealthPool resources. - - :param backend_address_pools: - :type backend_address_pools: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealthPool] - """ - - _attribute_map = { - 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealth, self).__init__(**kwargs) - self.backend_address_pools = kwargs.get('backend_address_pools', None) - - -class ApplicationGatewayBackendHealthHttpSettings(msrest.serialization.Model): - """Application gateway BackendHealthHttp settings. - - :param backend_http_settings: Reference of an ApplicationGatewayBackendHttpSettings resource. - :type backend_http_settings: - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHttpSettings - :param servers: List of ApplicationGatewayBackendHealthServer resources. - :type servers: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealthServer] - """ - - _attribute_map = { - 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'ApplicationGatewayBackendHttpSettings'}, - 'servers': {'key': 'servers', 'type': '[ApplicationGatewayBackendHealthServer]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealthHttpSettings, self).__init__(**kwargs) - self.backend_http_settings = kwargs.get('backend_http_settings', None) - self.servers = kwargs.get('servers', None) - - -class ApplicationGatewayBackendHealthPool(msrest.serialization.Model): - """Application gateway BackendHealth pool. - - :param backend_address_pool: Reference of an ApplicationGatewayBackendAddressPool resource. - :type backend_address_pool: - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendAddressPool - :param backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings - resources. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealthHttpSettings] - """ - - _attribute_map = { - 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, - 'backend_http_settings_collection': {'key': 'backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHealthHttpSettings]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealthPool, self).__init__(**kwargs) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.backend_http_settings_collection = kwargs.get('backend_http_settings_collection', None) - - -class ApplicationGatewayBackendHealthServer(msrest.serialization.Model): - """Application gateway backendhealth http settings. - - :param address: IP address or FQDN of backend server. - :type address: str - :param ip_configuration: Reference of IP configuration of backend server. - :type ip_configuration: ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration - :param health: Health of backend server. Possible values include: "Unknown", "Up", "Down", - "Partial", "Draining". - :type health: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealthServerHealth - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'health': {'key': 'health', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHealthServer, self).__init__(**kwargs) - self.address = kwargs.get('address', None) - self.ip_configuration = kwargs.get('ip_configuration', None) - self.health = kwargs.get('health', None) - - -class ApplicationGatewayBackendHttpSettings(SubResource): - """Backend address pool settings of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Port. - :type port: int - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProtocol - :param cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", - "Disabled". - :type cookie_based_affinity: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayCookieBasedAffinity - :param request_timeout: Request timeout in seconds. Application Gateway will fail the request - if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 - seconds. - :type request_timeout: int - :param probe: Probe resource of an application gateway. - :type probe: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param authentication_certificates: Array of references to application gateway authentication - certificates. - :type authentication_certificates: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param connection_draining: Connection draining of the backend http settings resource. - :type connection_draining: - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayConnectionDraining - :param host_name: Host header to be sent to the backend servers. - :type host_name: str - :param pick_host_name_from_backend_address: Whether to pick host header should be picked from - the host name of the backend server. Default value is false. - :type pick_host_name_from_backend_address: bool - :param affinity_cookie_name: Cookie name to use for the affinity cookie. - :type affinity_cookie_name: str - :param probe_enabled: Whether the probe is enabled. Default value is false. - :type probe_enabled: bool - :param path: Path which should be used as a prefix for all HTTP requests. Null means no path - will be prefixed. Default value is null. - :type path: str - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'cookie_based_affinity': {'key': 'properties.cookieBasedAffinity', 'type': 'str'}, - 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, - 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, - 'affinity_cookie_name': {'key': 'properties.affinityCookieName', 'type': 'str'}, - 'probe_enabled': {'key': 'properties.probeEnabled', 'type': 'bool'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayBackendHttpSettings, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.port = kwargs.get('port', None) - self.protocol = kwargs.get('protocol', None) - self.cookie_based_affinity = kwargs.get('cookie_based_affinity', None) - self.request_timeout = kwargs.get('request_timeout', None) - self.probe = kwargs.get('probe', None) - self.authentication_certificates = kwargs.get('authentication_certificates', None) - self.connection_draining = kwargs.get('connection_draining', None) - self.host_name = kwargs.get('host_name', None) - self.pick_host_name_from_backend_address = kwargs.get('pick_host_name_from_backend_address', None) - self.affinity_cookie_name = kwargs.get('affinity_cookie_name', None) - self.probe_enabled = kwargs.get('probe_enabled', None) - self.path = kwargs.get('path', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayConnectionDraining(msrest.serialization.Model): - """Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether connection draining is enabled or not. - :type enabled: bool - :param drain_timeout_in_sec: Required. The number of seconds connection draining is active. - Acceptable values are from 1 second to 3600 seconds. - :type drain_timeout_in_sec: int - """ - - _validation = { - 'enabled': {'required': True}, - 'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayConnectionDraining, self).__init__(**kwargs) - self.enabled = kwargs['enabled'] - self.drain_timeout_in_sec = kwargs['drain_timeout_in_sec'] - - -class ApplicationGatewayFirewallDisabledRuleGroup(msrest.serialization.Model): - """Allows to disable rules within a rule group or an entire rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the rule group that will be disabled. - :type rule_group_name: str - :param rules: The list of rules that will be disabled. If null, all rules of the rule group - will be disabled. - :type rules: list[int] - """ - - _validation = { - 'rule_group_name': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[int]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallDisabledRuleGroup, self).__init__(**kwargs) - self.rule_group_name = kwargs['rule_group_name'] - self.rules = kwargs.get('rules', None) - - -class ApplicationGatewayFirewallRule(msrest.serialization.Model): - """A web application firewall rule. - - All required parameters must be populated in order to send to Azure. - - :param rule_id: Required. The identifier of the web application firewall rule. - :type rule_id: int - :param description: The description of the web application firewall rule. - :type description: str - """ - - _validation = { - 'rule_id': {'required': True}, - } - - _attribute_map = { - 'rule_id': {'key': 'ruleId', 'type': 'int'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallRule, self).__init__(**kwargs) - self.rule_id = kwargs['rule_id'] - self.description = kwargs.get('description', None) - - -class ApplicationGatewayFirewallRuleGroup(msrest.serialization.Model): - """A web application firewall rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the web application firewall rule group. - :type rule_group_name: str - :param description: The description of the web application firewall rule group. - :type description: str - :param rules: Required. The rules of the web application firewall rule group. - :type rules: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallRule] - """ - - _validation = { - 'rule_group_name': {'required': True}, - 'rules': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[ApplicationGatewayFirewallRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallRuleGroup, self).__init__(**kwargs) - self.rule_group_name = kwargs['rule_group_name'] - self.description = kwargs.get('description', None) - self.rules = kwargs['rules'] - - -class ApplicationGatewayFirewallRuleSet(Resource): - """A web application firewall rule set. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the web application firewall rule set. - :type provisioning_state: str - :param rule_set_type: The type of the web application firewall rule set. - :type rule_set_type: str - :param rule_set_version: The version of the web application firewall rule set type. - :type rule_set_version: str - :param rule_groups: The rule groups of the web application firewall rule set. - :type rule_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallRuleGroup] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, - 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ApplicationGatewayFirewallRuleGroup]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFirewallRuleSet, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.rule_set_type = kwargs.get('rule_set_type', None) - self.rule_set_version = kwargs.get('rule_set_version', None) - self.rule_groups = kwargs.get('rule_groups', None) - - -class ApplicationGatewayFrontendIPConfiguration(SubResource): - """Frontend IP configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param private_ip_address: PrivateIPAddress of the network interface IP Configuration. - :type private_ip_address: str - :param private_ip_allocation_method: PrivateIP allocation method. Possible values include: - "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param subnet: Reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param public_ip_address: Reference of the PublicIP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Provisioning state of the public IP resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFrontendIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayFrontendPort(SubResource): - """Frontend port of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Frontend port. - :type port: int - :param provisioning_state: Provisioning state of the frontend port resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayFrontendPort, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.port = kwargs.get('port', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayHttpListener(SubResource): - """Http listener of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param frontend_ip_configuration: Frontend IP configuration resource of an application gateway. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param frontend_port: Frontend port resource of an application gateway. - :type frontend_port: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProtocol - :param host_name: Host name of HTTP listener. - :type host_name: str - :param ssl_certificate: SSL certificate resource of an application gateway. - :type ssl_certificate: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param require_server_name_indication: Applicable only if protocol is https. Enables SNI for - multi-hosting. - :type require_server_name_indication: bool - :param provisioning_state: Provisioning state of the HTTP listener resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, - 'require_server_name_indication': {'key': 'properties.requireServerNameIndication', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayHttpListener, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.protocol = kwargs.get('protocol', None) - self.host_name = kwargs.get('host_name', None) - self.ssl_certificate = kwargs.get('ssl_certificate', None) - self.require_server_name_indication = kwargs.get('require_server_name_indication', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayIPConfiguration(SubResource): - """IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param subnet: Reference of the subnet resource. A subnet from where application gateway gets - its private address. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Provisioning state of the application gateway subnet resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.subnet = kwargs.get('subnet', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayListResult(msrest.serialization.Model): - """Response for ListApplicationGateways API service call. - - :param value: List of an application gateways in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGateway] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ApplicationGatewayPathRule(SubResource): - """Path rule of URL path map of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param paths: Path rules of URL path map. - :type paths: list[str] - :param backend_address_pool: Backend address pool resource of URL path map path rule. - :type backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param backend_http_settings: Backend http settings resource of URL path map path rule. - :type backend_http_settings: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of URL path map path rule. - :type redirect_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Path rule of URL path map resource. Possible values are: 'Updating', - 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'paths': {'key': 'properties.paths', 'type': '[str]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayPathRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.paths = kwargs.get('paths', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.backend_http_settings = kwargs.get('backend_http_settings', None) - self.redirect_configuration = kwargs.get('redirect_configuration', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayProbe(SubResource): - """Probe of the application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProtocol - :param host: Host name to send the probe to. - :type host: str - :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. - :type path: str - :param interval: The probing interval in seconds. This is the time interval between two - consecutive probes. Acceptable values are from 1 second to 86400 seconds. - :type interval: int - :param timeout: the probe timeout in seconds. Probe marked as failed if valid response is not - received with this timeout period. Acceptable values are from 1 second to 86400 seconds. - :type timeout: int - :param unhealthy_threshold: The probe retry count. Backend server is marked down after - consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second - to 20. - :type unhealthy_threshold: int - :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from - the backend http settings. Default value is false. - :type pick_host_name_from_backend_http_settings: bool - :param min_servers: Minimum number of servers that are always marked healthy. Default value is - 0. - :type min_servers: int - :param match: Criterion for classifying a healthy probe response. - :type match: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProbeHealthResponseMatch - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host': {'key': 'properties.host', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'timeout': {'key': 'properties.timeout', 'type': 'int'}, - 'unhealthy_threshold': {'key': 'properties.unhealthyThreshold', 'type': 'int'}, - 'pick_host_name_from_backend_http_settings': {'key': 'properties.pickHostNameFromBackendHttpSettings', 'type': 'bool'}, - 'min_servers': {'key': 'properties.minServers', 'type': 'int'}, - 'match': {'key': 'properties.match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayProbe, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.protocol = kwargs.get('protocol', None) - self.host = kwargs.get('host', None) - self.path = kwargs.get('path', None) - self.interval = kwargs.get('interval', None) - self.timeout = kwargs.get('timeout', None) - self.unhealthy_threshold = kwargs.get('unhealthy_threshold', None) - self.pick_host_name_from_backend_http_settings = kwargs.get('pick_host_name_from_backend_http_settings', None) - self.min_servers = kwargs.get('min_servers', None) - self.match = kwargs.get('match', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayProbeHealthResponseMatch(msrest.serialization.Model): - """Application gateway probe health response match. - - :param body: Body that must be contained in the health response. Default value is empty. - :type body: str - :param status_codes: Allowed ranges of healthy status codes. Default range of healthy status - codes is 200-399. - :type status_codes: list[str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'status_codes': {'key': 'statusCodes', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayProbeHealthResponseMatch, self).__init__(**kwargs) - self.body = kwargs.get('body', None) - self.status_codes = kwargs.get('status_codes', None) - - -class ApplicationGatewayRedirectConfiguration(SubResource): - """Redirect configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param redirect_type: Supported http redirection types - Permanent, Temporary, Found, SeeOther. - Possible values include: "Permanent", "Found", "SeeOther", "Temporary". - :type redirect_type: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayRedirectType - :param target_listener: Reference to a listener to redirect the request to. - :type target_listener: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param target_url: Url to redirect the request to. - :type target_url: str - :param include_path: Include path in the redirected url. - :type include_path: bool - :param include_query_string: Include query string in the redirected url. - :type include_query_string: bool - :param request_routing_rules: Request routing specifying redirect configuration. - :type request_routing_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param url_path_maps: Url path maps specifying default redirect configuration. - :type url_path_maps: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param path_rules: Path rules specifying redirect configuration. - :type path_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'redirect_type': {'key': 'properties.redirectType', 'type': 'str'}, - 'target_listener': {'key': 'properties.targetListener', 'type': 'SubResource'}, - 'target_url': {'key': 'properties.targetUrl', 'type': 'str'}, - 'include_path': {'key': 'properties.includePath', 'type': 'bool'}, - 'include_query_string': {'key': 'properties.includeQueryString', 'type': 'bool'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[SubResource]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[SubResource]'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[SubResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayRedirectConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.redirect_type = kwargs.get('redirect_type', None) - self.target_listener = kwargs.get('target_listener', None) - self.target_url = kwargs.get('target_url', None) - self.include_path = kwargs.get('include_path', None) - self.include_query_string = kwargs.get('include_query_string', None) - self.request_routing_rules = kwargs.get('request_routing_rules', None) - self.url_path_maps = kwargs.get('url_path_maps', None) - self.path_rules = kwargs.get('path_rules', None) - - -class ApplicationGatewayRequestRoutingRule(SubResource): - """Request routing rule of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". - :type rule_type: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayRequestRoutingRuleType - :param backend_address_pool: Backend address pool resource of the application gateway. - :type backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param backend_http_settings: Frontend port resource of the application gateway. - :type backend_http_settings: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param http_listener: Http listener resource of the application gateway. - :type http_listener: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param url_path_map: URL path map resource of the application gateway. - :type url_path_map: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of the application gateway. - :type redirect_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Provisioning state of the request routing rule resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'http_listener': {'key': 'properties.httpListener', 'type': 'SubResource'}, - 'url_path_map': {'key': 'properties.urlPathMap', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayRequestRoutingRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.rule_type = kwargs.get('rule_type', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.backend_http_settings = kwargs.get('backend_http_settings', None) - self.http_listener = kwargs.get('http_listener', None) - self.url_path_map = kwargs.get('url_path_map', None) - self.redirect_configuration = kwargs.get('redirect_configuration', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewaySku(msrest.serialization.Model): - """SKU of an application gateway. - - :param name: Name of an application gateway SKU. Possible values include: "Standard_Small", - "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large". - :type name: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySkuName - :param tier: Tier of an application gateway. Possible values include: "Standard", "WAF". - :type tier: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayTier - :param capacity: Capacity (instance count) of an application gateway. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - - -class ApplicationGatewaySslCertificate(SubResource): - """SSL certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Base-64 encoded pfx certificate. Only applicable in PUT Request. - :type data: str - :param password: Password for the pfx file specified in data. Only applicable in PUT request. - :type password: str - :param public_cert_data: Base-64 encoded Public cert data corresponding to pfx specified in - data. Only applicable in GET request. - :type public_cert_data: str - :param provisioning_state: Provisioning state of the SSL certificate resource Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySslCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.data = kwargs.get('data', None) - self.password = kwargs.get('password', None) - self.public_cert_data = kwargs.get('public_cert_data', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewaySslPolicy(msrest.serialization.Model): - """Application Gateway Ssl policy. - - :param disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. - :type disabled_ssl_protocols: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslProtocol] - :param policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". - :type policy_type: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPolicyType - :param policy_name: Name of Ssl predefined policy. Possible values include: - "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". - :type policy_name: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPolicyName - :param cipher_suites: Ssl cipher suites to be enabled in the specified order to application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'cipher_suites': {'key': 'cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySslPolicy, self).__init__(**kwargs) - self.disabled_ssl_protocols = kwargs.get('disabled_ssl_protocols', None) - self.policy_type = kwargs.get('policy_type', None) - self.policy_name = kwargs.get('policy_name', None) - self.cipher_suites = kwargs.get('cipher_suites', None) - self.min_protocol_version = kwargs.get('min_protocol_version', None) - - -class ApplicationGatewaySslPredefinedPolicy(SubResource): - """An Ssl predefined policy. - - :param id: Resource ID. - :type id: str - :param name: Name of Ssl predefined policy. - :type name: str - :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewaySslPredefinedPolicy, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.cipher_suites = kwargs.get('cipher_suites', None) - self.min_protocol_version = kwargs.get('min_protocol_version', None) - - -class ApplicationGatewayUrlPathMap(SubResource): - """UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param default_backend_address_pool: Default backend address pool resource of URL path map. - :type default_backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param default_backend_http_settings: Default backend http settings resource of URL path map. - :type default_backend_http_settings: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param default_redirect_configuration: Default redirect configuration resource of URL path map. - :type default_redirect_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param path_rules: Path rule of URL path map resource. - :type path_rules: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayPathRule] - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_backend_address_pool': {'key': 'properties.defaultBackendAddressPool', 'type': 'SubResource'}, - 'default_backend_http_settings': {'key': 'properties.defaultBackendHttpSettings', 'type': 'SubResource'}, - 'default_redirect_configuration': {'key': 'properties.defaultRedirectConfiguration', 'type': 'SubResource'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[ApplicationGatewayPathRule]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayUrlPathMap, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.type = kwargs.get('type', None) - self.default_backend_address_pool = kwargs.get('default_backend_address_pool', None) - self.default_backend_http_settings = kwargs.get('default_backend_http_settings', None) - self.default_redirect_configuration = kwargs.get('default_redirect_configuration', None) - self.path_rules = kwargs.get('path_rules', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ApplicationGatewayWebApplicationFirewallConfiguration(msrest.serialization.Model): - """Application gateway web application firewall configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the web application firewall is enabled or not. - :type enabled: bool - :param firewall_mode: Required. Web application firewall mode. Possible values include: - "Detection", "Prevention". - :type firewall_mode: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallMode - :param rule_set_type: Required. The type of the web application firewall rule set. Possible - values are: 'OWASP'. - :type rule_set_type: str - :param rule_set_version: Required. The version of the rule set type. - :type rule_set_version: str - :param disabled_rule_groups: The disabled rule groups. - :type disabled_rule_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallDisabledRuleGroup] - """ - - _validation = { - 'enabled': {'required': True}, - 'firewall_mode': {'required': True}, - 'rule_set_type': {'required': True}, - 'rule_set_version': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, - 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, - 'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs) - self.enabled = kwargs['enabled'] - self.firewall_mode = kwargs['firewall_mode'] - self.rule_set_type = kwargs['rule_set_type'] - self.rule_set_version = kwargs['rule_set_version'] - self.disabled_rule_groups = kwargs.get('disabled_rule_groups', None) - - -class ApplicationSecurityGroup(Resource): - """An application security group in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar resource_guid: The resource GUID property of the application security group resource. It - uniquely identifies a resource, even if the user changes its name or migrate the resource - across subscriptions or resource groups. - :vartype resource_guid: str - :ivar provisioning_state: The provisioning state of the application security group resource. - Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'resource_guid': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationSecurityGroup, self).__init__(**kwargs) - self.etag = None - self.resource_guid = None - self.provisioning_state = None - - -class ApplicationSecurityGroupListResult(msrest.serialization.Model): - """A list of application security groups. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of application security groups. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ApplicationSecurityGroupListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class AuthorizationListResult(msrest.serialization.Model): - """Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. - - :param value: The authorizations in an ExpressRoute Circuit. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AuthorizationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class Availability(msrest.serialization.Model): - """Availability of the metric. - - :param time_grain: The time grain of the availability. - :type time_grain: str - :param retention: The retention of the availability. - :type retention: str - :param blob_duration: Duration of the availability blob. - :type blob_duration: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Availability, self).__init__(**kwargs) - self.time_grain = kwargs.get('time_grain', None) - self.retention = kwargs.get('retention', None) - self.blob_duration = kwargs.get('blob_duration', None) - - -class AvailableProvidersList(msrest.serialization.Model): - """List of available countries with details. - - All required parameters must be populated in order to send to Azure. - - :param countries: Required. List of available countries. - :type countries: list[~azure.mgmt.network.v2017_11_01.models.AvailableProvidersListCountry] - """ - - _validation = { - 'countries': {'required': True}, - } - - _attribute_map = { - 'countries': {'key': 'countries', 'type': '[AvailableProvidersListCountry]'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersList, self).__init__(**kwargs) - self.countries = kwargs['countries'] - - -class AvailableProvidersListCity(msrest.serialization.Model): - """City or town details. - - :param city_name: The city or town name. - :type city_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - """ - - _attribute_map = { - 'city_name': {'key': 'cityName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersListCity, self).__init__(**kwargs) - self.city_name = kwargs.get('city_name', None) - self.providers = kwargs.get('providers', None) - - -class AvailableProvidersListCountry(msrest.serialization.Model): - """Country details. - - :param country_name: The country name. - :type country_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - :param states: List of available states in the country. - :type states: list[~azure.mgmt.network.v2017_11_01.models.AvailableProvidersListState] - """ - - _attribute_map = { - 'country_name': {'key': 'countryName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'states': {'key': 'states', 'type': '[AvailableProvidersListState]'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersListCountry, self).__init__(**kwargs) - self.country_name = kwargs.get('country_name', None) - self.providers = kwargs.get('providers', None) - self.states = kwargs.get('states', None) - - -class AvailableProvidersListParameters(msrest.serialization.Model): - """Constraints that determine the list of available Internet service providers. - - :param azure_locations: A list of Azure regions. - :type azure_locations: list[str] - :param country: The country for available providers list. - :type country: str - :param state: The state for available providers list. - :type state: str - :param city: The city or town for available providers list. - :type city: str - """ - - _attribute_map = { - 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, - 'country': {'key': 'country', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersListParameters, self).__init__(**kwargs) - self.azure_locations = kwargs.get('azure_locations', None) - self.country = kwargs.get('country', None) - self.state = kwargs.get('state', None) - self.city = kwargs.get('city', None) - - -class AvailableProvidersListState(msrest.serialization.Model): - """State details. - - :param state_name: The state name. - :type state_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - :param cities: List of available cities or towns in the state. - :type cities: list[~azure.mgmt.network.v2017_11_01.models.AvailableProvidersListCity] - """ - - _attribute_map = { - 'state_name': {'key': 'stateName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'cities': {'key': 'cities', 'type': '[AvailableProvidersListCity]'}, - } - - def __init__( - self, - **kwargs - ): - super(AvailableProvidersListState, self).__init__(**kwargs) - self.state_name = kwargs.get('state_name', None) - self.providers = kwargs.get('providers', None) - self.cities = kwargs.get('cities', None) - - -class AzureAsyncOperationResult(msrest.serialization.Model): - """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. - - :param status: Status of the Azure async operation. Possible values are: 'InProgress', - 'Succeeded', and 'Failed'. Possible values include: "InProgress", "Succeeded", "Failed". - :type status: str or ~azure.mgmt.network.v2017_11_01.models.NetworkOperationStatus - :param error: - :type error: ~azure.mgmt.network.v2017_11_01.models.Error - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'Error'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureAsyncOperationResult, self).__init__(**kwargs) - self.status = kwargs.get('status', None) - self.error = kwargs.get('error', None) - - -class AzureReachabilityReport(msrest.serialization.Model): - """Azure reachability report details. - - All required parameters must be populated in order to send to Azure. - - :param aggregation_level: Required. The aggregation level of Azure reachability report. Can be - Country, State or City. - :type aggregation_level: str - :param provider_location: Required. Parameters that define a geographic location. - :type provider_location: ~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportLocation - :param reachability_report: Required. List of Azure reachability report items. - :type reachability_report: - list[~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportItem] - """ - - _validation = { - 'aggregation_level': {'required': True}, - 'provider_location': {'required': True}, - 'reachability_report': {'required': True}, - } - - _attribute_map = { - 'aggregation_level': {'key': 'aggregationLevel', 'type': 'str'}, - 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, - 'reachability_report': {'key': 'reachabilityReport', 'type': '[AzureReachabilityReportItem]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReport, self).__init__(**kwargs) - self.aggregation_level = kwargs['aggregation_level'] - self.provider_location = kwargs['provider_location'] - self.reachability_report = kwargs['reachability_report'] - - -class AzureReachabilityReportItem(msrest.serialization.Model): - """Azure reachability report details for a given provider location. - - :param provider: The Internet service provider. - :type provider: str - :param azure_location: The Azure region. - :type azure_location: str - :param latencies: List of latency details for each of the time series. - :type latencies: - list[~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportLatencyInfo] - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'azure_location': {'key': 'azureLocation', 'type': 'str'}, - 'latencies': {'key': 'latencies', 'type': '[AzureReachabilityReportLatencyInfo]'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReportItem, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.azure_location = kwargs.get('azure_location', None) - self.latencies = kwargs.get('latencies', None) - - -class AzureReachabilityReportLatencyInfo(msrest.serialization.Model): - """Details on latency for a time series. - - :param time_stamp: The time stamp. - :type time_stamp: ~datetime.datetime - :param score: The relative latency score between 1 and 100, higher values indicating a faster - connection. - :type score: int - """ - - _validation = { - 'score': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, - 'score': {'key': 'score', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReportLatencyInfo, self).__init__(**kwargs) - self.time_stamp = kwargs.get('time_stamp', None) - self.score = kwargs.get('score', None) - - -class AzureReachabilityReportLocation(msrest.serialization.Model): - """Parameters that define a geographic location. - - All required parameters must be populated in order to send to Azure. - - :param country: Required. The name of the country. - :type country: str - :param state: The name of the state. - :type state: str - :param city: The name of the city or town. - :type city: str - """ - - _validation = { - 'country': {'required': True}, - } - - _attribute_map = { - 'country': {'key': 'country', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReportLocation, self).__init__(**kwargs) - self.country = kwargs['country'] - self.state = kwargs.get('state', None) - self.city = kwargs.get('city', None) - - -class AzureReachabilityReportParameters(msrest.serialization.Model): - """Geographic and time constraints for Azure reachability report. - - All required parameters must be populated in order to send to Azure. - - :param provider_location: Required. Parameters that define a geographic location. - :type provider_location: ~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportLocation - :param providers: List of Internet service providers. - :type providers: list[str] - :param azure_locations: Optional Azure regions to scope the query to. - :type azure_locations: list[str] - :param start_time: Required. The start time for the Azure reachability report. - :type start_time: ~datetime.datetime - :param end_time: Required. The end time for the Azure reachability report. - :type end_time: ~datetime.datetime - """ - - _validation = { - 'provider_location': {'required': True}, - 'start_time': {'required': True}, - 'end_time': {'required': True}, - } - - _attribute_map = { - 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - **kwargs - ): - super(AzureReachabilityReportParameters, self).__init__(**kwargs) - self.provider_location = kwargs['provider_location'] - self.providers = kwargs.get('providers', None) - self.azure_locations = kwargs.get('azure_locations', None) - self.start_time = kwargs['start_time'] - self.end_time = kwargs['end_time'] - - -class BackendAddressPool(SubResource): - """Pool of backend IP addresses. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar backend_ip_configurations: Gets collection of references to IP addresses defined in - network interfaces. - :vartype backend_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration] - :ivar load_balancing_rules: Gets load balancing rules that use this backend address pool. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :ivar outbound_nat_rule: Gets outbound rules that use this backend address pool. - :vartype outbound_nat_rule: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Get provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configurations': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - 'outbound_nat_rule': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'outbound_nat_rule': {'key': 'properties.outboundNatRule', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BackendAddressPool, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.backend_ip_configurations = None - self.load_balancing_rules = None - self.outbound_nat_rule = None - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class BGPCommunity(msrest.serialization.Model): - """Contains bgp community information offered in Service Community resources. - - :param service_supported_region: The region which the service support. e.g. For O365, region is - Global. - :type service_supported_region: str - :param community_name: The name of the bgp community. e.g. Skype. - :type community_name: str - :param community_value: The value of the bgp community. For more information: - https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - :type community_value: str - :param community_prefixes: The prefixes that the bgp community contains. - :type community_prefixes: list[str] - :param is_authorized_to_use: Customer is authorized to use bgp community or not. - :type is_authorized_to_use: bool - :param service_group: The service group of the bgp community contains. - :type service_group: str - """ - - _attribute_map = { - 'service_supported_region': {'key': 'serviceSupportedRegion', 'type': 'str'}, - 'community_name': {'key': 'communityName', 'type': 'str'}, - 'community_value': {'key': 'communityValue', 'type': 'str'}, - 'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'}, - 'is_authorized_to_use': {'key': 'isAuthorizedToUse', 'type': 'bool'}, - 'service_group': {'key': 'serviceGroup', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BGPCommunity, self).__init__(**kwargs) - self.service_supported_region = kwargs.get('service_supported_region', None) - self.community_name = kwargs.get('community_name', None) - self.community_value = kwargs.get('community_value', None) - self.community_prefixes = kwargs.get('community_prefixes', None) - self.is_authorized_to_use = kwargs.get('is_authorized_to_use', None) - self.service_group = kwargs.get('service_group', None) - - -class BgpPeerStatus(msrest.serialization.Model): - """BGP peer status details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The virtual network gateway's local address. - :vartype local_address: str - :ivar neighbor: The remote BGP peer. - :vartype neighbor: str - :ivar asn: The autonomous system number of the remote BGP peer. - :vartype asn: int - :ivar state: The BGP peer state. Possible values include: "Unknown", "Stopped", "Idle", - "Connecting", "Connected". - :vartype state: str or ~azure.mgmt.network.v2017_11_01.models.BgpPeerState - :ivar connected_duration: For how long the peering has been up. - :vartype connected_duration: str - :ivar routes_received: The number of routes learned from this peer. - :vartype routes_received: long - :ivar messages_sent: The number of BGP messages sent. - :vartype messages_sent: long - :ivar messages_received: The number of BGP messages received. - :vartype messages_received: long - """ - - _validation = { - 'local_address': {'readonly': True}, - 'neighbor': {'readonly': True}, - 'asn': {'readonly': True}, - 'state': {'readonly': True}, - 'connected_duration': {'readonly': True}, - 'routes_received': {'readonly': True}, - 'messages_sent': {'readonly': True}, - 'messages_received': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'asn': {'key': 'asn', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'str'}, - 'connected_duration': {'key': 'connectedDuration', 'type': 'str'}, - 'routes_received': {'key': 'routesReceived', 'type': 'long'}, - 'messages_sent': {'key': 'messagesSent', 'type': 'long'}, - 'messages_received': {'key': 'messagesReceived', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpPeerStatus, self).__init__(**kwargs) - self.local_address = None - self.neighbor = None - self.asn = None - self.state = None - self.connected_duration = None - self.routes_received = None - self.messages_sent = None - self.messages_received = None - - -class BgpPeerStatusListResult(msrest.serialization.Model): - """Response for list BGP peer status API service call. - - :param value: List of BGP peers. - :type value: list[~azure.mgmt.network.v2017_11_01.models.BgpPeerStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpPeerStatusListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class BgpServiceCommunity(Resource): - """Service Community Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param service_name: The name of the bgp community. e.g. Skype. - :type service_name: str - :param bgp_communities: Get a list of bgp communities. - :type bgp_communities: list[~azure.mgmt.network.v2017_11_01.models.BGPCommunity] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, - 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': '[BGPCommunity]'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpServiceCommunity, self).__init__(**kwargs) - self.service_name = kwargs.get('service_name', None) - self.bgp_communities = kwargs.get('bgp_communities', None) - - -class BgpServiceCommunityListResult(msrest.serialization.Model): - """Response for the ListServiceCommunity API service call. - - :param value: A list of service community resources. - :type value: list[~azure.mgmt.network.v2017_11_01.models.BgpServiceCommunity] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpServiceCommunityListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class BgpSettings(msrest.serialization.Model): - """BGP settings details. - - :param asn: The BGP speaker's ASN. - :type asn: long - :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. - :type bgp_peering_address: str - :param peer_weight: The weight added to routes learned from this BGP speaker. - :type peer_weight: int - """ - - _attribute_map = { - 'asn': {'key': 'asn', 'type': 'long'}, - 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, - 'peer_weight': {'key': 'peerWeight', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpSettings, self).__init__(**kwargs) - self.asn = kwargs.get('asn', None) - self.bgp_peering_address = kwargs.get('bgp_peering_address', None) - self.peer_weight = kwargs.get('peer_weight', None) - - -class ConnectionMonitor(msrest.serialization.Model): - """Parameters that define the operation to create a connection monitor. - - All required parameters must be populated in order to send to Azure. - - :param location: Connection monitor location. - :type location: str - :param tags: A set of tags. Connection monitor tags. - :type tags: dict[str, str] - :param source: Required. Describes the source of connection monitor. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorSource - :param destination: Required. Describes the destination of connection monitor. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorDestination - :param auto_start: Determines if the connection monitor will start automatically once created. - :type auto_start: bool - :param monitoring_interval_in_seconds: Monitoring interval in seconds. - :type monitoring_interval_in_seconds: int - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, - 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, - 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, - 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionMonitor, self).__init__(**kwargs) - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.source = kwargs['source'] - self.destination = kwargs['destination'] - self.auto_start = kwargs.get('auto_start', True) - self.monitoring_interval_in_seconds = kwargs.get('monitoring_interval_in_seconds', 60) - - -class ConnectionMonitorDestination(msrest.serialization.Model): - """Describes the destination of connection monitor. - - :param resource_id: The ID of the resource used as the destination by connection monitor. - :type resource_id: str - :param address: Address of the connection monitor destination (IP or domain name). - :type address: str - :param port: The destination port used by connection monitor. - :type port: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionMonitorDestination, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.address = kwargs.get('address', None) - self.port = kwargs.get('port', None) - - -class ConnectionMonitorListResult(msrest.serialization.Model): - """List of connection monitors. - - :param value: Information about connection monitors. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorResult] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ConnectionMonitorResult]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionMonitorListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class ConnectionMonitorParameters(msrest.serialization.Model): - """Parameters that define the operation to create a connection monitor. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Describes the source of connection monitor. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorSource - :param destination: Required. Describes the destination of connection monitor. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorDestination - :param auto_start: Determines if the connection monitor will start automatically once created. - :type auto_start: bool - :param monitoring_interval_in_seconds: Monitoring interval in seconds. - :type monitoring_interval_in_seconds: int - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, - 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, - 'auto_start': {'key': 'autoStart', 'type': 'bool'}, - 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionMonitorParameters, self).__init__(**kwargs) - self.source = kwargs['source'] - self.destination = kwargs['destination'] - self.auto_start = kwargs.get('auto_start', True) - self.monitoring_interval_in_seconds = kwargs.get('monitoring_interval_in_seconds', 60) - - -class ConnectionMonitorQueryResult(msrest.serialization.Model): - """List of connection states snapshots. - - :param states: Information about connection states. - :type states: list[~azure.mgmt.network.v2017_11_01.models.ConnectionStateSnapshot] - """ - - _attribute_map = { - 'states': {'key': 'states', 'type': '[ConnectionStateSnapshot]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionMonitorQueryResult, self).__init__(**kwargs) - self.states = kwargs.get('states', None) - - -class ConnectionMonitorResult(msrest.serialization.Model): - """Information about the connection monitor. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the connection monitor. - :vartype name: str - :ivar id: ID of the connection monitor. - :vartype id: str - :param etag: - :type etag: str - :ivar type: Connection monitor type. - :vartype type: str - :param location: Connection monitor location. - :type location: str - :param tags: A set of tags. Connection monitor tags. - :type tags: dict[str, str] - :param source: Describes the source of connection monitor. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorSource - :param destination: Describes the destination of connection monitor. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorDestination - :param auto_start: Determines if the connection monitor will start automatically once created. - :type auto_start: bool - :param monitoring_interval_in_seconds: Monitoring interval in seconds. - :type monitoring_interval_in_seconds: int - :param provisioning_state: The provisioning state of the connection monitor. Possible values - include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - :param start_time: The date and time when the connection monitor was started. - :type start_time: ~datetime.datetime - :param monitoring_status: The monitoring status of the connection monitor. - :type monitoring_status: str - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, - 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, - 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, - 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionMonitorResult, self).__init__(**kwargs) - self.name = None - self.id = None - self.etag = kwargs.get('etag', "A unique read-only string that changes whenever the resource is updated.") - self.type = None - self.location = kwargs.get('location', None) - self.tags = kwargs.get('tags', None) - self.source = kwargs.get('source', None) - self.destination = kwargs.get('destination', None) - self.auto_start = kwargs.get('auto_start', True) - self.monitoring_interval_in_seconds = kwargs.get('monitoring_interval_in_seconds', 60) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.start_time = kwargs.get('start_time', None) - self.monitoring_status = kwargs.get('monitoring_status', None) - - -class ConnectionMonitorResultProperties(ConnectionMonitorParameters): - """Describes the properties of a connection monitor. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Describes the source of connection monitor. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorSource - :param destination: Required. Describes the destination of connection monitor. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorDestination - :param auto_start: Determines if the connection monitor will start automatically once created. - :type auto_start: bool - :param monitoring_interval_in_seconds: Monitoring interval in seconds. - :type monitoring_interval_in_seconds: int - :param provisioning_state: The provisioning state of the connection monitor. Possible values - include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - :param start_time: The date and time when the connection monitor was started. - :type start_time: ~datetime.datetime - :param monitoring_status: The monitoring status of the connection monitor. - :type monitoring_status: str - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, - 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, - 'auto_start': {'key': 'autoStart', 'type': 'bool'}, - 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'monitoring_status': {'key': 'monitoringStatus', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionMonitorResultProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.start_time = kwargs.get('start_time', None) - self.monitoring_status = kwargs.get('monitoring_status', None) - - -class ConnectionMonitorSource(msrest.serialization.Model): - """Describes the source of connection monitor. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The ID of the resource used as the source by connection monitor. - :type resource_id: str - :param port: The source port used by connection monitor. - :type port: int - """ - - _validation = { - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionMonitorSource, self).__init__(**kwargs) - self.resource_id = kwargs['resource_id'] - self.port = kwargs.get('port', None) - - -class ConnectionResetSharedKey(msrest.serialization.Model): - """The virtual network connection reset shared key. - - All required parameters must be populated in order to send to Azure. - - :param key_length: Required. The virtual network connection reset shared key length, should - between 1 and 128. - :type key_length: int - """ - - _validation = { - 'key_length': {'required': True, 'maximum': 128, 'minimum': 1}, - } - - _attribute_map = { - 'key_length': {'key': 'keyLength', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionResetSharedKey, self).__init__(**kwargs) - self.key_length = kwargs['key_length'] - - -class ConnectionSharedKey(msrest.serialization.Model): - """Response for GetConnectionSharedKey API service call. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. The virtual network connection shared key value. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionSharedKey, self).__init__(**kwargs) - self.value = kwargs['value'] - - -class ConnectionStateSnapshot(msrest.serialization.Model): - """Connection state snapshot. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param connection_state: The connection state. Possible values include: "Reachable", - "Unreachable", "Unknown". - :type connection_state: str or ~azure.mgmt.network.v2017_11_01.models.ConnectionState - :param start_time: The start time of the connection snapshot. - :type start_time: ~datetime.datetime - :param end_time: The end time of the connection snapshot. - :type end_time: ~datetime.datetime - :param evaluation_state: Connectivity analysis evaluation state. Possible values include: - "NotStarted", "InProgress", "Completed". - :type evaluation_state: str or ~azure.mgmt.network.v2017_11_01.models.EvaluationState - :ivar hops: List of hops between the source and the destination. - :vartype hops: list[~azure.mgmt.network.v2017_11_01.models.ConnectivityHop] - """ - - _validation = { - 'hops': {'readonly': True}, - } - - _attribute_map = { - 'connection_state': {'key': 'connectionState', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'evaluation_state': {'key': 'evaluationState', 'type': 'str'}, - 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectionStateSnapshot, self).__init__(**kwargs) - self.connection_state = kwargs.get('connection_state', None) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.evaluation_state = kwargs.get('evaluation_state', None) - self.hops = None - - -class ConnectivityDestination(msrest.serialization.Model): - """Parameters that define destination of connection. - - :param resource_id: The ID of the resource to which a connection attempt will be made. - :type resource_id: str - :param address: The IP address or URI the resource to which a connection attempt will be made. - :type address: str - :param port: Port on which check connectivity will be performed. - :type port: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityDestination, self).__init__(**kwargs) - self.resource_id = kwargs.get('resource_id', None) - self.address = kwargs.get('address', None) - self.port = kwargs.get('port', None) - - -class ConnectivityHop(msrest.serialization.Model): - """Information about a hop between the source and the destination. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the hop. - :vartype type: str - :ivar id: The ID of the hop. - :vartype id: str - :ivar address: The IP address of the hop. - :vartype address: str - :ivar resource_id: The ID of the resource corresponding to this hop. - :vartype resource_id: str - :ivar next_hop_ids: List of next hop identifiers. - :vartype next_hop_ids: list[str] - :ivar issues: List of issues. - :vartype issues: list[~azure.mgmt.network.v2017_11_01.models.ConnectivityIssue] - """ - - _validation = { - 'type': {'readonly': True}, - 'id': {'readonly': True}, - 'address': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'next_hop_ids': {'readonly': True}, - 'issues': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, - 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityHop, self).__init__(**kwargs) - self.type = None - self.id = None - self.address = None - self.resource_id = None - self.next_hop_ids = None - self.issues = None - - -class ConnectivityInformation(msrest.serialization.Model): - """Information on the connectivity status. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hops: List of hops between the source and the destination. - :vartype hops: list[~azure.mgmt.network.v2017_11_01.models.ConnectivityHop] - :ivar connection_status: The connection status. Possible values include: "Unknown", - "Connected", "Disconnected", "Degraded". - :vartype connection_status: str or ~azure.mgmt.network.v2017_11_01.models.ConnectionStatus - :ivar avg_latency_in_ms: Average latency in milliseconds. - :vartype avg_latency_in_ms: int - :ivar min_latency_in_ms: Minimum latency in milliseconds. - :vartype min_latency_in_ms: int - :ivar max_latency_in_ms: Maximum latency in milliseconds. - :vartype max_latency_in_ms: int - :ivar probes_sent: Total number of probes sent. - :vartype probes_sent: int - :ivar probes_failed: Number of failed probes. - :vartype probes_failed: int - """ - - _validation = { - 'hops': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'avg_latency_in_ms': {'readonly': True}, - 'min_latency_in_ms': {'readonly': True}, - 'max_latency_in_ms': {'readonly': True}, - 'probes_sent': {'readonly': True}, - 'probes_failed': {'readonly': True}, - } - - _attribute_map = { - 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'int'}, - 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'int'}, - 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'int'}, - 'probes_sent': {'key': 'probesSent', 'type': 'int'}, - 'probes_failed': {'key': 'probesFailed', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityInformation, self).__init__(**kwargs) - self.hops = None - self.connection_status = None - self.avg_latency_in_ms = None - self.min_latency_in_ms = None - self.max_latency_in_ms = None - self.probes_sent = None - self.probes_failed = None - - -class ConnectivityIssue(msrest.serialization.Model): - """Information about an issue encountered in the process of checking for connectivity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". - :vartype origin: str or ~azure.mgmt.network.v2017_11_01.models.Origin - :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". - :vartype severity: str or ~azure.mgmt.network.v2017_11_01.models.Severity - :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", - "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", - "PortThrottled", "Platform". - :vartype type: str or ~azure.mgmt.network.v2017_11_01.models.IssueType - :ivar context: Provides additional context on the issue. - :vartype context: list[dict[str, str]] - """ - - _validation = { - 'origin': {'readonly': True}, - 'severity': {'readonly': True}, - 'type': {'readonly': True}, - 'context': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'context': {'key': 'context', 'type': '[{str}]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityIssue, self).__init__(**kwargs) - self.origin = None - self.severity = None - self.type = None - self.context = None - - -class ConnectivityParameters(msrest.serialization.Model): - """Parameters that determine how the connectivity check will be performed. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Parameters that define the source of the connection. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectivitySource - :param destination: Required. Parameters that define destination of connection. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectivityDestination - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectivitySource'}, - 'destination': {'key': 'destination', 'type': 'ConnectivityDestination'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityParameters, self).__init__(**kwargs) - self.source = kwargs['source'] - self.destination = kwargs['destination'] - - -class ConnectivitySource(msrest.serialization.Model): - """Parameters that define the source of the connection. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The ID of the resource from which a connectivity check will be - initiated. - :type resource_id: str - :param port: The source port from which a connectivity check will be performed. - :type port: int - """ - - _validation = { - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivitySource, self).__init__(**kwargs) - self.resource_id = kwargs['resource_id'] - self.port = kwargs.get('port', None) - - -class DhcpOptions(msrest.serialization.Model): - """DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. - - :param dns_servers: The list of DNS servers IP addresses. - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(DhcpOptions, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) - - -class Dimension(msrest.serialization.Model): - """Dimension of the metric. - - :param name: The name of the dimension. - :type name: str - :param display_name: The display name of the dimension. - :type display_name: str - :param internal_name: The internal name of the dimension. - :type internal_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Dimension, 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) - - -class DnsNameAvailabilityResult(msrest.serialization.Model): - """Response for the CheckDnsNameAvailability API service call. - - :param available: Domain availability (True/False). - :type available: bool - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(DnsNameAvailabilityResult, self).__init__(**kwargs) - self.available = kwargs.get('available', None) - - -class EffectiveNetworkSecurityGroup(msrest.serialization.Model): - """Effective network security group. - - :param network_security_group: The ID of network security group that is applied. - :type network_security_group: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param association: Associated resources. - :type association: - ~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityGroupAssociation - :param effective_security_rules: A collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityRule] - :param tag_map: Mapping of tags to list of IP Addresses included within the tag. - :type tag_map: str - """ - - _attribute_map = { - 'network_security_group': {'key': 'networkSecurityGroup', 'type': 'SubResource'}, - 'association': {'key': 'association', 'type': 'EffectiveNetworkSecurityGroupAssociation'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - 'tag_map': {'key': 'tagMap', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityGroup, self).__init__(**kwargs) - self.network_security_group = kwargs.get('network_security_group', None) - self.association = kwargs.get('association', None) - self.effective_security_rules = kwargs.get('effective_security_rules', None) - self.tag_map = kwargs.get('tag_map', None) - - -class EffectiveNetworkSecurityGroupAssociation(msrest.serialization.Model): - """The effective network security group association. - - :param subnet: The ID of the subnet if assigned. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param network_interface: The ID of the network interface if assigned. - :type network_interface: ~azure.mgmt.network.v2017_11_01.models.SubResource - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'SubResource'}, - 'network_interface': {'key': 'networkInterface', 'type': 'SubResource'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityGroupAssociation, self).__init__(**kwargs) - self.subnet = kwargs.get('subnet', None) - self.network_interface = kwargs.get('network_interface', None) - - -class EffectiveNetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for list effective network security groups API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective network security groups. - :type value: list[~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class EffectiveNetworkSecurityRule(msrest.serialization.Model): - """Effective network security rules. - - :param name: The name of the security rule specified by the user (if created by the user). - :type name: str - :param protocol: The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', - and 'All'. Possible values include: "Tcp", "Udp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.EffectiveSecurityRuleProtocol - :param source_port_range: The source port or range. - :type source_port_range: str - :param destination_port_range: The destination port or range. - :type destination_port_range: str - :param source_port_ranges: The source port ranges. Expected values include a single integer - between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. Expected values include a single - integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type destination_port_ranges: list[str] - :param source_address_prefix: The source address prefix. - :type source_address_prefix: str - :param destination_address_prefix: The destination address prefix. - :type destination_address_prefix: str - :param source_address_prefixes: The source address prefixes. Expected values include CIDR IP - ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the - asterisk (*). - :type source_address_prefixes: list[str] - :param destination_address_prefixes: The destination address prefixes. Expected values include - CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and - the asterisk (*). - :type destination_address_prefixes: list[str] - :param expanded_source_address_prefix: The expanded source address prefix. - :type expanded_source_address_prefix: list[str] - :param expanded_destination_address_prefix: Expanded destination address prefix. - :type expanded_destination_address_prefix: list[str] - :param access: Whether network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleAccess - :param priority: The priority of the rule. - :type priority: int - :param direction: The direction of the rule. Possible values are: 'Inbound and Outbound'. - Possible values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleDirection - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, - 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[str]'}, - 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, - 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'sourceAddressPrefixes', 'type': '[str]'}, - 'destination_address_prefixes': {'key': 'destinationAddressPrefixes', 'type': '[str]'}, - 'expanded_source_address_prefix': {'key': 'expandedSourceAddressPrefix', 'type': '[str]'}, - 'expanded_destination_address_prefix': {'key': 'expandedDestinationAddressPrefix', 'type': '[str]'}, - 'access': {'key': 'access', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'direction': {'key': 'direction', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveNetworkSecurityRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.protocol = kwargs.get('protocol', None) - self.source_port_range = kwargs.get('source_port_range', None) - self.destination_port_range = kwargs.get('destination_port_range', None) - self.source_port_ranges = kwargs.get('source_port_ranges', None) - self.destination_port_ranges = kwargs.get('destination_port_ranges', None) - self.source_address_prefix = kwargs.get('source_address_prefix', None) - self.destination_address_prefix = kwargs.get('destination_address_prefix', None) - self.source_address_prefixes = kwargs.get('source_address_prefixes', None) - self.destination_address_prefixes = kwargs.get('destination_address_prefixes', None) - self.expanded_source_address_prefix = kwargs.get('expanded_source_address_prefix', None) - self.expanded_destination_address_prefix = kwargs.get('expanded_destination_address_prefix', None) - self.access = kwargs.get('access', None) - self.priority = kwargs.get('priority', None) - self.direction = kwargs.get('direction', None) - - -class EffectiveRoute(msrest.serialization.Model): - """Effective Route. - - :param name: The name of the user defined route. This is optional. - :type name: str - :param source: Who created the route. Possible values are: 'Unknown', 'User', - 'VirtualNetworkGateway', and 'Default'. Possible values include: "Unknown", "User", - "VirtualNetworkGateway", "Default". - :type source: str or ~azure.mgmt.network.v2017_11_01.models.EffectiveRouteSource - :param state: The value of effective route. Possible values are: 'Active' and 'Invalid'. - Possible values include: "Active", "Invalid". - :type state: str or ~azure.mgmt.network.v2017_11_01.models.EffectiveRouteState - :param address_prefix: The address prefixes of the effective routes in CIDR notation. - :type address_prefix: list[str] - :param next_hop_ip_address: The IP address of the next hop of the effective route. - :type next_hop_ip_address: list[str] - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_11_01.models.RouteNextHopType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address_prefix': {'key': 'addressPrefix', 'type': '[str]'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': '[str]'}, - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveRoute, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.source = kwargs.get('source', None) - self.state = kwargs.get('state', None) - self.address_prefix = kwargs.get('address_prefix', None) - self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) - self.next_hop_type = kwargs.get('next_hop_type', None) - - -class EffectiveRouteListResult(msrest.serialization.Model): - """Response for list effective route API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective routes. - :type value: list[~azure.mgmt.network.v2017_11_01.models.EffectiveRoute] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveRoute]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EffectiveRouteListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class EndpointServiceResult(SubResource): - """Endpoint service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Name of the endpoint service. - :vartype name: str - :ivar type: Type of the endpoint service. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EndpointServiceResult, self).__init__(**kwargs) - self.name = None - self.type = None - - -class EndpointServicesListResult(msrest.serialization.Model): - """Response for the ListAvailableEndpointServices API service call. - - :param value: List of available endpoint services in a region. - :type value: list[~azure.mgmt.network.v2017_11_01.models.EndpointServiceResult] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EndpointServiceResult]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EndpointServicesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class Error(msrest.serialization.Model): - """Error. - - :param code: - :type code: str - :param message: - :type message: str - :param target: - :type target: str - :param details: - :type details: list[~azure.mgmt.network.v2017_11_01.models.ErrorDetails] - :param inner_error: - :type inner_error: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'inner_error': {'key': 'innerError', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Error, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - self.target = kwargs.get('target', None) - self.details = kwargs.get('details', None) - self.inner_error = kwargs.get('inner_error', None) - - -class ErrorDetails(msrest.serialization.Model): - """ErrorDetails. - - :param code: - :type code: str - :param target: - :type target: str - :param message: - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.target = kwargs.get('target', None) - self.message = kwargs.get('message', None) - - -class ExpressRouteCircuit(Resource): - """ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The SKU. - :type sku: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitSku - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param allow_classic_operations: Allow classic operations. - :type allow_classic_operations: bool - :param circuit_provisioning_state: The CircuitProvisioningState state of the resource. - :type circuit_provisioning_state: str - :param service_provider_provisioning_state: The ServiceProviderProvisioningState state of the - resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and - 'Deprovisioning'. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", - "Deprovisioning". - :type service_provider_provisioning_state: str or - ~azure.mgmt.network.v2017_11_01.models.ServiceProviderProvisioningState - :param authorizations: The list of authorizations. - :type authorizations: - list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization] - :param peerings: The list of peerings. - :type peerings: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] - :param service_key: The ServiceKey. - :type service_key: str - :param service_provider_notes: The ServiceProviderNotes. - :type service_provider_notes: str - :param service_provider_properties: The ServiceProviderProperties. - :type service_provider_properties: - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitServiceProviderProperties - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ExpressRouteCircuitSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_classic_operations': {'key': 'properties.allowClassicOperations', 'type': 'bool'}, - 'circuit_provisioning_state': {'key': 'properties.circuitProvisioningState', 'type': 'str'}, - 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, - 'authorizations': {'key': 'properties.authorizations', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, - 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, - 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuit, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.etag = None - self.allow_classic_operations = kwargs.get('allow_classic_operations', None) - self.circuit_provisioning_state = kwargs.get('circuit_provisioning_state', None) - self.service_provider_provisioning_state = kwargs.get('service_provider_provisioning_state', None) - self.authorizations = kwargs.get('authorizations', None) - self.peerings = kwargs.get('peerings', None) - self.service_key = kwargs.get('service_key', None) - self.service_provider_notes = kwargs.get('service_provider_notes', None) - self.service_provider_properties = kwargs.get('service_provider_properties', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) - - -class ExpressRouteCircuitArpTable(msrest.serialization.Model): - """The ARP table associated with the ExpressRouteCircuit. - - :param age: Age. - :type age: int - :param interface: Interface. - :type interface: str - :param ip_address: The IP address. - :type ip_address: str - :param mac_address: The MAC address. - :type mac_address: str - """ - - _attribute_map = { - 'age': {'key': 'age', 'type': 'int'}, - 'interface': {'key': 'interface', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'mac_address': {'key': 'macAddress', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitArpTable, self).__init__(**kwargs) - self.age = kwargs.get('age', None) - self.interface = kwargs.get('interface', None) - self.ip_address = kwargs.get('ip_address', None) - self.mac_address = kwargs.get('mac_address', None) - - -class ExpressRouteCircuitAuthorization(SubResource): - """Authorization in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param authorization_key: The authorization key. - :type authorization_key: str - :param authorization_use_status: AuthorizationUseStatus. Possible values are: 'Available' and - 'InUse'. Possible values include: "Available", "InUse". - :type authorization_use_status: str or - ~azure.mgmt.network.v2017_11_01.models.AuthorizationUseStatus - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitAuthorization, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = None - self.authorization_key = kwargs.get('authorization_key', None) - self.authorization_use_status = kwargs.get('authorization_use_status', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ExpressRouteCircuitListResult(msrest.serialization.Model): - """Response for ListExpressRouteCircuit API service call. - - :param value: A list of ExpressRouteCircuits in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuit]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitPeering(SubResource): - """Peering in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param peering_type: The PeeringType. Possible values are: 'AzurePublicPeering', - 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: "AzurePublicPeering", - "AzurePrivatePeering", "MicrosoftPeering". - :type peering_type: str or - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringType - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringState - :param azure_asn: The Azure ASN. - :type azure_asn: int - :param peer_asn: The peer ASN. - :type peer_asn: long - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param primary_azure_port: The primary port. - :type primary_azure_port: str - :param secondary_azure_port: The secondary port. - :type secondary_azure_port: str - :param shared_key: The shared key. - :type shared_key: str - :param vlan_id: The VLAN ID. - :type vlan_id: int - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringConfig - :param stats: Gets peering stats. - :type stats: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitStats - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - :param last_modified_by: Gets whether the provider or the customer last modified the peering. - :type last_modified_by: str - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_11_01.models.RouteFilter - :param ipv6_peering_config: The IPv6 peering configuration. - :type ipv6_peering_config: - ~azure.mgmt.network.v2017_11_01.models.Ipv6ExpressRouteCircuitPeeringConfig - """ - - _validation = { - 'etag': {'readonly': True}, - 'peer_asn': {'maximum': 4294967295, 'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, - 'peer_asn': {'key': 'properties.peerASN', 'type': 'long'}, - 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, - 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, - 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, - 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'stats': {'key': 'properties.stats', 'type': 'ExpressRouteCircuitStats'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'route_filter': {'key': 'properties.routeFilter', 'type': 'RouteFilter'}, - 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitPeering, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = None - self.peering_type = kwargs.get('peering_type', None) - self.state = kwargs.get('state', None) - self.azure_asn = kwargs.get('azure_asn', None) - self.peer_asn = kwargs.get('peer_asn', None) - self.primary_peer_address_prefix = kwargs.get('primary_peer_address_prefix', None) - self.secondary_peer_address_prefix = kwargs.get('secondary_peer_address_prefix', None) - self.primary_azure_port = kwargs.get('primary_azure_port', None) - self.secondary_azure_port = kwargs.get('secondary_azure_port', None) - self.shared_key = kwargs.get('shared_key', None) - self.vlan_id = kwargs.get('vlan_id', None) - self.microsoft_peering_config = kwargs.get('microsoft_peering_config', None) - self.stats = kwargs.get('stats', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) - self.last_modified_by = kwargs.get('last_modified_by', None) - self.route_filter = kwargs.get('route_filter', None) - self.ipv6_peering_config = kwargs.get('ipv6_peering_config', None) - - -class ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Specifies the peering configuration. - - :param advertised_public_prefixes: The reference of AdvertisedPublicPrefixes. - :type advertised_public_prefixes: list[str] - :param advertised_communities: The communities of bgp peering. Specified for microsoft peering. - :type advertised_communities: list[str] - :param advertised_public_prefixes_state: AdvertisedPublicPrefixState of the Peering resource. - Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. - Possible values include: "NotConfigured", "Configuring", "Configured", "ValidationNeeded". - :type advertised_public_prefixes_state: str or - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState - :param legacy_mode: The legacy mode of the peering. - :type legacy_mode: int - :param customer_asn: The CustomerASN of the peering. - :type customer_asn: int - :param routing_registry_name: The RoutingRegistryName of the configuration. - :type routing_registry_name: str - """ - - _attribute_map = { - 'advertised_public_prefixes': {'key': 'advertisedPublicPrefixes', 'type': '[str]'}, - 'advertised_communities': {'key': 'advertisedCommunities', 'type': '[str]'}, - 'advertised_public_prefixes_state': {'key': 'advertisedPublicPrefixesState', 'type': 'str'}, - 'legacy_mode': {'key': 'legacyMode', 'type': 'int'}, - 'customer_asn': {'key': 'customerASN', 'type': 'int'}, - 'routing_registry_name': {'key': 'routingRegistryName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.advertised_public_prefixes = kwargs.get('advertised_public_prefixes', None) - self.advertised_communities = kwargs.get('advertised_communities', None) - self.advertised_public_prefixes_state = kwargs.get('advertised_public_prefixes_state', None) - self.legacy_mode = kwargs.get('legacy_mode', None) - self.customer_asn = kwargs.get('customer_asn', None) - self.routing_registry_name = kwargs.get('routing_registry_name', None) - - -class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): - """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. - - :param value: The peerings in an express route circuit. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitPeeringListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitRoutesTable(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param network: network. - :type network: str - :param next_hop: nextHop. - :type next_hop: str - :param loc_prf: locPrf. - :type loc_prf: str - :param weight: weight. - :type weight: int - :param path: path. - :type path: str - """ - - _attribute_map = { - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'loc_prf': {'key': 'locPrf', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitRoutesTable, self).__init__(**kwargs) - self.network = kwargs.get('network', None) - self.next_hop = kwargs.get('next_hop', None) - self.loc_prf = kwargs.get('loc_prf', None) - self.weight = kwargs.get('weight', None) - self.path = kwargs.get('path', None) - - -class ExpressRouteCircuitRoutesTableSummary(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param neighbor: Neighbor. - :type neighbor: str - :param v: BGP version number spoken to the neighbor. - :type v: int - :param as_property: Autonomous system number. - :type as_property: int - :param up_down: The length of time that the BGP session has been in the Established state, or - the current status if not in the Established state. - :type up_down: str - :param state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have - been received from a neighbor or peer group. - :type state_pfx_rcd: str - """ - - _attribute_map = { - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'v': {'key': 'v', 'type': 'int'}, - 'as_property': {'key': 'as', 'type': 'int'}, - 'up_down': {'key': 'upDown', 'type': 'str'}, - 'state_pfx_rcd': {'key': 'statePfxRcd', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitRoutesTableSummary, self).__init__(**kwargs) - self.neighbor = kwargs.get('neighbor', None) - self.v = kwargs.get('v', None) - self.as_property = kwargs.get('as_property', None) - self.up_down = kwargs.get('up_down', None) - self.state_pfx_rcd = kwargs.get('state_pfx_rcd', None) - - -class ExpressRouteCircuitsArpTableListResult(msrest.serialization.Model): - """Response for ListArpTable associated with the Express Route Circuits API. - - :param value: Gets list of the ARP table. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitArpTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitArpTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitsArpTableListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitServiceProviderProperties(msrest.serialization.Model): - """Contains ServiceProviderProperties in an ExpressRouteCircuit. - - :param service_provider_name: The serviceProviderName. - :type service_provider_name: str - :param peering_location: The peering location. - :type peering_location: str - :param bandwidth_in_mbps: The BandwidthInMbps. - :type bandwidth_in_mbps: int - """ - - _attribute_map = { - 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, - 'peering_location': {'key': 'peeringLocation', 'type': 'str'}, - 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitServiceProviderProperties, self).__init__(**kwargs) - self.service_provider_name = kwargs.get('service_provider_name', None) - self.peering_location = kwargs.get('peering_location', None) - self.bandwidth_in_mbps = kwargs.get('bandwidth_in_mbps', None) - - -class ExpressRouteCircuitSku(msrest.serialization.Model): - """Contains SKU in an ExpressRouteCircuit. - - :param name: The name of the SKU. - :type name: str - :param tier: The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values - include: "Standard", "Premium". - :type tier: str or ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitSkuTier - :param family: The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. - Possible values include: "UnlimitedData", "MeteredData". - :type family: str or ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitSkuFamily - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.family = kwargs.get('family', None) - - -class ExpressRouteCircuitsRoutesTableListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: The list of routes table. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitRoutesTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitsRoutesTableSummaryListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: A list of the routes table. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitRoutesTableSummary] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableSummaryListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ExpressRouteCircuitStats(msrest.serialization.Model): - """Contains stats associated with the peering. - - :param primarybytes_in: Gets BytesIn of the peering. - :type primarybytes_in: long - :param primarybytes_out: Gets BytesOut of the peering. - :type primarybytes_out: long - :param secondarybytes_in: Gets BytesIn of the peering. - :type secondarybytes_in: long - :param secondarybytes_out: Gets BytesOut of the peering. - :type secondarybytes_out: long - """ - - _attribute_map = { - 'primarybytes_in': {'key': 'primarybytesIn', 'type': 'long'}, - 'primarybytes_out': {'key': 'primarybytesOut', 'type': 'long'}, - 'secondarybytes_in': {'key': 'secondarybytesIn', 'type': 'long'}, - 'secondarybytes_out': {'key': 'secondarybytesOut', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteCircuitStats, self).__init__(**kwargs) - self.primarybytes_in = kwargs.get('primarybytes_in', None) - self.primarybytes_out = kwargs.get('primarybytes_out', None) - self.secondarybytes_in = kwargs.get('secondarybytes_in', None) - self.secondarybytes_out = kwargs.get('secondarybytes_out', None) - - -class ExpressRouteServiceProvider(Resource): - """A ExpressRouteResourceProvider object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param peering_locations: Get a list of peering locations. - :type peering_locations: list[str] - :param bandwidths_offered: Gets bandwidths offered. - :type bandwidths_offered: - list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteServiceProviderBandwidthsOffered] - :param provisioning_state: Gets the provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, - 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteServiceProvider, self).__init__(**kwargs) - self.peering_locations = kwargs.get('peering_locations', None) - self.bandwidths_offered = kwargs.get('bandwidths_offered', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class ExpressRouteServiceProviderBandwidthsOffered(msrest.serialization.Model): - """Contains bandwidths offered in ExpressRouteServiceProvider resources. - - :param offer_name: The OfferName. - :type offer_name: str - :param value_in_mbps: The ValueInMbps. - :type value_in_mbps: int - """ - - _attribute_map = { - 'offer_name': {'key': 'offerName', 'type': 'str'}, - 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs) - self.offer_name = kwargs.get('offer_name', None) - self.value_in_mbps = kwargs.get('value_in_mbps', None) - - -class ExpressRouteServiceProviderListResult(msrest.serialization.Model): - """Response for the ListExpressRouteServiceProvider API service call. - - :param value: A list of ExpressRouteResourceProvider resources. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteServiceProvider] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExpressRouteServiceProviderListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class FlowLogInformation(msrest.serialization.Model): - """Information on the configuration of flow log. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the resource to configure for flow logging. - :type target_resource_id: str - :param storage_id: Required. ID of the storage account which is used to store the flow log. - :type storage_id: str - :param enabled: Required. Flag to enable/disable flow logging. - :type enabled: bool - :param retention_policy: Parameters that define the retention policy for flow log. - :type retention_policy: ~azure.mgmt.network.v2017_11_01.models.RetentionPolicyParameters - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowLogInformation, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.storage_id = kwargs['storage_id'] - self.enabled = kwargs['enabled'] - self.retention_policy = kwargs.get('retention_policy', None) - - -class FlowLogStatusParameters(msrest.serialization.Model): - """Parameters that define a resource to query flow log status. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource where getting the flow logging status. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(FlowLogStatusParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - - -class FrontendIPConfiguration(SubResource): - """Frontend IP address of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :ivar inbound_nat_rules: Read only. Inbound rules URIs that use this frontend IP. - :vartype inbound_nat_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :ivar inbound_nat_pools: Read only. Inbound pools URIs that use this frontend IP. - :vartype inbound_nat_pools: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :ivar outbound_nat_rules: Read only. Outbound rules URIs that use this frontend IP. - :vartype outbound_nat_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :ivar load_balancing_rules: Gets load balancing rules URIs that use this frontend IP. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The Private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.Subnet - :param public_ip_address: The reference of the Public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'inbound_nat_rules': {'readonly': True}, - 'inbound_nat_pools': {'readonly': True}, - 'outbound_nat_rules': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[SubResource]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[SubResource]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(FrontendIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.zones = kwargs.get('zones', None) - self.inbound_nat_rules = None - self.inbound_nat_pools = None - self.outbound_nat_rules = None - self.load_balancing_rules = None - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class GatewayRoute(msrest.serialization.Model): - """Gateway routing details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The gateway's local address. - :vartype local_address: str - :ivar network: The route's network prefix. - :vartype network: str - :ivar next_hop: The route's next hop. - :vartype next_hop: str - :ivar source_peer: The peer this route was learned from. - :vartype source_peer: str - :ivar origin: The source this route was learned from. - :vartype origin: str - :ivar as_path: The route's AS path sequence. - :vartype as_path: str - :ivar weight: The route's weight. - :vartype weight: int - """ - - _validation = { - 'local_address': {'readonly': True}, - 'network': {'readonly': True}, - 'next_hop': {'readonly': True}, - 'source_peer': {'readonly': True}, - 'origin': {'readonly': True}, - 'as_path': {'readonly': True}, - 'weight': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'as_path': {'key': 'asPath', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(GatewayRoute, self).__init__(**kwargs) - self.local_address = None - self.network = None - self.next_hop = None - self.source_peer = None - self.origin = None - self.as_path = None - self.weight = None - - -class GatewayRouteListResult(msrest.serialization.Model): - """List of virtual network gateway routes. - - :param value: List of gateway routes. - :type value: list[~azure.mgmt.network.v2017_11_01.models.GatewayRoute] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[GatewayRoute]'}, - } - - def __init__( - self, - **kwargs - ): - super(GatewayRouteListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class InboundNatPool(SubResource): - """Inbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.TransportProtocol - :param frontend_port_range_start: The first port number in the range of external ports that - will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values - range between 1 and 65534. - :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of external ports that will - be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range - between 1 and 65535. - :type frontend_port_range_end: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 1 and 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, - 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatPool, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.protocol = kwargs.get('protocol', None) - self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) - self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) - self.backend_port = kwargs.get('backend_port', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.enable_floating_ip = kwargs.get('enable_floating_ip', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class InboundNatRule(SubResource): - """Inbound NAT rule of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :ivar backend_ip_configuration: A reference to a private IP address defined on a network - interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations - is forwarded to the backend IP. - :vartype backend_ip_configuration: - ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.TransportProtocol - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values range from 1 to 65534. - :type frontend_port: int - :param backend_port: The port used for the internal endpoint. Acceptable values range from 1 to - 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_ip_configuration': {'key': 'properties.backendIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.backend_ip_configuration = None - self.protocol = kwargs.get('protocol', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.enable_floating_ip = kwargs.get('enable_floating_ip', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class InboundNatRuleListResult(msrest.serialization.Model): - """Response for ListInboundNatRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of inbound nat rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.InboundNatRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InboundNatRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(InboundNatRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class IPAddressAvailabilityResult(msrest.serialization.Model): - """Response for CheckIPAddressAvailability API service call. - - :param available: Private IP address availability. - :type available: bool - :param available_ip_addresses: Contains other available private IP addresses if the asked for - address is taken. - :type available_ip_addresses: list[str] - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'available_ip_addresses': {'key': 'availableIPAddresses', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(IPAddressAvailabilityResult, self).__init__(**kwargs) - self.available = kwargs.get('available', None) - self.available_ip_addresses = kwargs.get('available_ip_addresses', None) - - -class IPConfiguration(SubResource): - """IP configuration. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.Subnet - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class IpsecPolicy(msrest.serialization.Model): - """An IPSec Policy configuration for a virtual network gateway connection. - - All required parameters must be populated in order to send to Azure. - - :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - :type sa_life_time_seconds: int - :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - :type sa_data_size_kilobytes: int - :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible - values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", - "GCMAES256". - :type ipsec_encryption: str or ~azure.mgmt.network.v2017_11_01.models.IpsecEncryption - :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values - include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". - :type ipsec_integrity: str or ~azure.mgmt.network.v2017_11_01.models.IpsecIntegrity - :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values - include: "DES", "DES3", "AES128", "AES192", "AES256". - :type ike_encryption: str or ~azure.mgmt.network.v2017_11_01.models.IkeEncryption - :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values - include: "MD5", "SHA1", "SHA256", "SHA384". - :type ike_integrity: str or ~azure.mgmt.network.v2017_11_01.models.IkeIntegrity - :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values - include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", - "DHGroup24". - :type dh_group: str or ~azure.mgmt.network.v2017_11_01.models.DhGroup - :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new child SA. Possible values - include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24". - :type pfs_group: str or ~azure.mgmt.network.v2017_11_01.models.PfsGroup - """ - - _validation = { - 'sa_life_time_seconds': {'required': True}, - 'sa_data_size_kilobytes': {'required': True}, - 'ipsec_encryption': {'required': True}, - 'ipsec_integrity': {'required': True}, - 'ike_encryption': {'required': True}, - 'ike_integrity': {'required': True}, - 'dh_group': {'required': True}, - 'pfs_group': {'required': True}, - } - - _attribute_map = { - 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, - 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, - 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, - 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, - 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, - 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, - 'dh_group': {'key': 'dhGroup', 'type': 'str'}, - 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IpsecPolicy, self).__init__(**kwargs) - self.sa_life_time_seconds = kwargs['sa_life_time_seconds'] - self.sa_data_size_kilobytes = kwargs['sa_data_size_kilobytes'] - self.ipsec_encryption = kwargs['ipsec_encryption'] - self.ipsec_integrity = kwargs['ipsec_integrity'] - self.ike_encryption = kwargs['ike_encryption'] - self.ike_integrity = kwargs['ike_integrity'] - self.dh_group = kwargs['dh_group'] - self.pfs_group = kwargs['pfs_group'] - - -class IpTag(msrest.serialization.Model): - """Contains the IpTag associated with the public IP address. - - :param ip_tag_type: Gets or sets the ipTag type: Example FirstPartyUsage. - :type ip_tag_type: str - :param tag: Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(IpTag, self).__init__(**kwargs) - self.ip_tag_type = kwargs.get('ip_tag_type', None) - self.tag = kwargs.get('tag', None) - - -class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Contains IPv6 peering config. - - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringConfig - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_11_01.models.RouteFilter - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringState - """ - - _attribute_map = { - 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, - 'microsoft_peering_config': {'key': 'microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'route_filter': {'key': 'routeFilter', 'type': 'RouteFilter'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Ipv6ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.primary_peer_address_prefix = kwargs.get('primary_peer_address_prefix', None) - self.secondary_peer_address_prefix = kwargs.get('secondary_peer_address_prefix', None) - self.microsoft_peering_config = kwargs.get('microsoft_peering_config', None) - self.route_filter = kwargs.get('route_filter', None) - self.state = kwargs.get('state', None) - - -class LoadBalancer(Resource): - """LoadBalancer resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The load balancer SKU. - :type sku: ~azure.mgmt.network.v2017_11_01.models.LoadBalancerSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configurations: Object representing the frontend IPs to be used for the load - balancer. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.FrontendIPConfiguration] - :param backend_address_pools: Collection of backend address pools used by a load balancer. - :type backend_address_pools: list[~azure.mgmt.network.v2017_11_01.models.BackendAddressPool] - :param load_balancing_rules: Object collection representing the load balancing rules Gets the - provisioning. - :type load_balancing_rules: list[~azure.mgmt.network.v2017_11_01.models.LoadBalancingRule] - :param probes: Collection of probe objects used in the load balancer. - :type probes: list[~azure.mgmt.network.v2017_11_01.models.Probe] - :param inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining - inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT - pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are - associated with individual virtual machines cannot reference an Inbound NAT pool. They have to - reference individual inbound NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.network.v2017_11_01.models.InboundNatRule] - :param inbound_nat_pools: Defines an external port range for inbound NAT to a single backend - port on NICs associated with a load balancer. Inbound NAT rules are created automatically for - each NIC associated with the Load Balancer using an external port from this range. Defining an - Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. - Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with - individual virtual machines cannot reference an inbound NAT pool. They have to reference - individual inbound NAT rules. - :type inbound_nat_pools: list[~azure.mgmt.network.v2017_11_01.models.InboundNatPool] - :param outbound_nat_rules: The outbound NAT rules. - :type outbound_nat_rules: list[~azure.mgmt.network.v2017_11_01.models.OutboundNatRule] - :param resource_guid: The resource GUID property of the load balancer resource. - :type resource_guid: str - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'LoadBalancerSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[FrontendIPConfiguration]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'probes': {'key': 'properties.probes', 'type': '[Probe]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[InboundNatRule]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[InboundNatPool]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[OutboundNatRule]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancer, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) - self.backend_address_pools = kwargs.get('backend_address_pools', None) - self.load_balancing_rules = kwargs.get('load_balancing_rules', None) - self.probes = kwargs.get('probes', None) - self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) - self.inbound_nat_pools = kwargs.get('inbound_nat_pools', None) - self.outbound_nat_rules = kwargs.get('outbound_nat_rules', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class LoadBalancerBackendAddressPoolListResult(msrest.serialization.Model): - """Response for ListBackendAddressPool API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of backend address pools in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.BackendAddressPool] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackendAddressPool]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerBackendAddressPoolListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): - """Response for ListFrontendIPConfiguration API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of frontend IP configurations in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.FrontendIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerFrontendIPConfigurationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerListResult(msrest.serialization.Model): - """Response for ListLoadBalancers API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerLoadBalancingRuleListResult(msrest.serialization.Model): - """Response for ListLoadBalancingRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancing rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.LoadBalancingRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancingRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerLoadBalancingRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerProbeListResult(msrest.serialization.Model): - """Response for ListProbe API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of probes in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Probe] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Probe]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerProbeListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LoadBalancerSku(msrest.serialization.Model): - """SKU of a load balancer. - - :param name: Name of a load balancer SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_11_01.models.LoadBalancerSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancerSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class LoadBalancingRule(SubResource): - """A load balancing rule for a load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param probe: The reference of the load balancer probe used by the load balancing rule. - :type probe: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.TransportProtocol - :param load_distribution: The load distribution policy for this rule. Possible values are - 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: "Default", "SourceIP", - "SourceIPProtocol". - :type load_distribution: str or ~azure.mgmt.network.v2017_11_01.models.LoadDistribution - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 - enables "Any Port". - :type frontend_port: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 0 and 65535. Note that value 0 enables "Any Port". - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the - publicIP address specified in the frontend of the load balancing rule. - :type disable_outbound_snat: bool - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'load_distribution': {'key': 'properties.loadDistribution', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'disable_outbound_snat': {'key': 'properties.disableOutboundSnat', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LoadBalancingRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.probe = kwargs.get('probe', None) - self.protocol = kwargs.get('protocol', None) - self.load_distribution = kwargs.get('load_distribution', None) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.enable_floating_ip = kwargs.get('enable_floating_ip', None) - self.disable_outbound_snat = kwargs.get('disable_outbound_snat', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class LocalNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param local_network_address_space: Local network site address space. - :type local_network_address_space: ~azure.mgmt.network.v2017_11_01.models.AddressSpace - :param gateway_ip_address: IP address of local network gateway. - :type gateway_ip_address: str - :param bgp_settings: Local network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_11_01.models.BgpSettings - :param resource_guid: The resource GUID property of the LocalNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the LocalNetworkGateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'local_network_address_space': {'key': 'properties.localNetworkAddressSpace', 'type': 'AddressSpace'}, - 'gateway_ip_address': {'key': 'properties.gatewayIpAddress', 'type': 'str'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LocalNetworkGateway, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.local_network_address_space = kwargs.get('local_network_address_space', None) - self.gateway_ip_address = kwargs.get('gateway_ip_address', None) - self.bgp_settings = kwargs.get('bgp_settings', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class LocalNetworkGatewayListResult(msrest.serialization.Model): - """Response for ListLocalNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of local network gateways that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LocalNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LocalNetworkGatewayListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class LogSpecification(msrest.serialization.Model): - """Description of logging specification. - - :param name: The name of the specification. - :type name: str - :param display_name: The display name of the specification. - :type display_name: str - :param blob_duration: Duration of the blob. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LogSpecification, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display_name = kwargs.get('display_name', None) - self.blob_duration = kwargs.get('blob_duration', None) - - -class MetricSpecification(msrest.serialization.Model): - """Description of metrics specification. - - :param name: The name of the metric. - :type name: str - :param display_name: The display name of the metric. - :type display_name: str - :param display_description: The description of the metric. - :type display_description: str - :param unit: Units the metric to be displayed in. - :type unit: str - :param aggregation_type: The aggregation type. - :type aggregation_type: str - :param availabilities: List of availability. - :type availabilities: list[~azure.mgmt.network.v2017_11_01.models.Availability] - :param enable_regional_mdm_account: Whether regional MDM account enabled. - :type enable_regional_mdm_account: bool - :param fill_gap_with_zero: Whether gaps would be filled with zeros. - :type fill_gap_with_zero: bool - :param metric_filter_pattern: Pattern for the filter of the metric. - :type metric_filter_pattern: str - :param dimensions: List of dimensions. - :type dimensions: list[~azure.mgmt.network.v2017_11_01.models.Dimension] - :param is_internal: Whether the metric is internal. - :type is_internal: bool - :param source_mdm_account: The source MDM account. - :type source_mdm_account: str - :param source_mdm_namespace: The source MDM namespace. - :type source_mdm_namespace: str - :param resource_id_dimension_name_override: The resource Id dimension name override. - :type resource_id_dimension_name_override: str - """ - - _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'}, - 'availabilities': {'key': 'availabilities', 'type': '[Availability]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, - 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, - 'is_internal': {'key': 'isInternal', 'type': 'bool'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, - } - - 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.availabilities = kwargs.get('availabilities', None) - self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) - self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) - self.metric_filter_pattern = kwargs.get('metric_filter_pattern', None) - self.dimensions = kwargs.get('dimensions', None) - self.is_internal = kwargs.get('is_internal', None) - self.source_mdm_account = kwargs.get('source_mdm_account', None) - self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) - self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) - - -class NetworkInterface(Resource): - """A network interface in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param virtual_machine: The reference of a virtual machine. - :type virtual_machine: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup - :param ip_configurations: A list of IPConfigurations of the network interface. - :type ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration] - :param dns_settings: The DNS settings in network interface. - :type dns_settings: ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceDnsSettings - :param mac_address: The MAC address of the network interface. - :type mac_address: str - :param primary: Gets whether this is a primary network interface on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: If the network interface is accelerated networking - enabled. - :type enable_accelerated_networking: bool - :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network - interface. - :type enable_ip_forwarding: bool - :param resource_guid: The resource GUID property of the network interface resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, - 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterface, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.virtual_machine = kwargs.get('virtual_machine', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.dns_settings = kwargs.get('dns_settings', None) - self.mac_address = kwargs.get('mac_address', None) - self.primary = kwargs.get('primary', None) - self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) - self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class NetworkInterfaceAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Network interface ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = kwargs.get('security_rules', None) - - -class NetworkInterfaceDnsSettings(msrest.serialization.Model): - """DNS settings of a network interface. - - :param dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure - provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be - the only value in dnsServers collection. - :type dns_servers: list[str] - :param applied_dns_servers: If the VM that uses this NIC is part of an Availability Set, then - this list will have the union of all DNS servers from all NICs that are part of the - Availability Set. This property is what is configured on each of those VMs. - :type applied_dns_servers: list[str] - :param internal_dns_name_label: Relative DNS name for this NIC used for internal communications - between VMs in the same virtual network. - :type internal_dns_name_label: str - :param internal_fqdn: Fully qualified DNS name supporting internal communications between VMs - in the same virtual network. - :type internal_fqdn: str - :param internal_domain_name_suffix: Even if internalDnsNameLabel is not specified, a DNS entry - is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the - VM name with the value of internalDomainNameSuffix. - :type internal_domain_name_suffix: str - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, - 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, - 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'}, - 'internal_domain_name_suffix': {'key': 'internalDomainNameSuffix', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceDnsSettings, self).__init__(**kwargs) - self.dns_servers = kwargs.get('dns_servers', None) - self.applied_dns_servers = kwargs.get('applied_dns_servers', None) - self.internal_dns_name_label = kwargs.get('internal_dns_name_label', None) - self.internal_fqdn = kwargs.get('internal_fqdn', None) - self.internal_domain_name_suffix = kwargs.get('internal_domain_name_suffix', None) - - -class NetworkInterfaceIPConfiguration(SubResource): - """IPConfiguration in a network interface. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param application_gateway_backend_address_pools: The reference of - ApplicationGatewayBackendAddressPool resource. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendAddressPool] - :param load_balancer_backend_address_pools: The reference of LoadBalancerBackendAddressPool - resource. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.network.v2017_11_01.models.BackendAddressPool] - :param load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. - :type load_balancer_inbound_nat_rules: - list[~azure.mgmt.network.v2017_11_01.models.InboundNatRule] - :param private_ip_address: Private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: Defines how a private IP address is assigned. Possible - values are: 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param private_ip_address_version: Available from Api-Version 2016-03-30 onwards, it represents - whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible - values are: 'IPv4' and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type private_ip_address_version: str or ~azure.mgmt.network.v2017_11_01.models.IPVersion - :param subnet: Subnet bound to the IP configuration. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.Subnet - :param primary: Gets whether this is a primary customer address on the network interface. - :type primary: bool - :param public_ip_address: Public IP address bound to the IP configuration. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress - :param application_security_groups: Application security groups in which the IP configuration - is included. - :type application_security_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] - :param provisioning_state: The provisioning state of the network interface IP configuration. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) - self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) - self.load_balancer_inbound_nat_rules = kwargs.get('load_balancer_inbound_nat_rules', None) - self.private_ip_address = kwargs.get('private_ip_address', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.private_ip_address_version = kwargs.get('private_ip_address_version', None) - self.subnet = kwargs.get('subnet', None) - self.primary = kwargs.get('primary', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.application_security_groups = kwargs.get('application_security_groups', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of ip configurations. - :type value: list[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceIPConfigurationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkInterfaceListResult(msrest.serialization.Model): - """Response for the ListNetworkInterface API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of network interfaces in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.NetworkInterface] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterface]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkInterfaceLoadBalancerListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers. - :type value: list[~azure.mgmt.network.v2017_11_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkInterfaceLoadBalancerListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class NetworkSecurityGroup(Resource): - """NetworkSecurityGroup resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param security_rules: A collection of security rules of the network security group. - :type security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - :param default_security_rules: The default security rules of network security group. - :type default_security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - :ivar network_interfaces: A collection of references to network interfaces. - :vartype network_interfaces: list[~azure.mgmt.network.v2017_11_01.models.NetworkInterface] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_11_01.models.Subnet] - :param resource_guid: The resource GUID property of the network security group resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'network_interfaces': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'security_rules': {'key': 'properties.securityRules', 'type': '[SecurityRule]'}, - 'default_security_rules': {'key': 'properties.defaultSecurityRules', 'type': '[SecurityRule]'}, - 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkSecurityGroup, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.security_rules = kwargs.get('security_rules', None) - self.default_security_rules = kwargs.get('default_security_rules', None) - self.network_interfaces = None - self.subnets = None - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class NetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for ListNetworkSecurityGroups API service call. - - :param value: A list of NetworkSecurityGroup resources. - :type value: list[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class NetworkWatcher(Resource): - """Network watcher in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar provisioning_state: The provisioning state of the resource. Possible values include: - "Succeeded", "Updating", "Deleting", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkWatcher, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.provisioning_state = None - - -class NetworkWatcherListResult(msrest.serialization.Model): - """List of network watcher resources. - - :param value: - :type value: list[~azure.mgmt.network.v2017_11_01.models.NetworkWatcher] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkWatcher]'}, - } - - def __init__( - self, - **kwargs - ): - super(NetworkWatcherListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class NextHopParameters(msrest.serialization.Model): - """Parameters that define the source and destination endpoint. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The resource identifier of the target resource against - which the action is to be performed. - :type target_resource_id: str - :param source_ip_address: Required. The source IP address. - :type source_ip_address: str - :param destination_ip_address: Required. The destination IP address. - :type destination_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of the nics, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'source_ip_address': {'required': True}, - 'destination_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'source_ip_address': {'key': 'sourceIPAddress', 'type': 'str'}, - 'destination_ip_address': {'key': 'destinationIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NextHopParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.source_ip_address = kwargs['source_ip_address'] - self.destination_ip_address = kwargs['destination_ip_address'] - self.target_nic_resource_id = kwargs.get('target_nic_resource_id', None) - - -class NextHopResult(msrest.serialization.Model): - """The information about next hop from the specified VM. - - :param next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", - "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_11_01.models.NextHopType - :param next_hop_ip_address: Next hop IP Address. - :type next_hop_ip_address: str - :param route_table_id: The resource identifier for the route table associated with the route - being returned. If the route being returned does not correspond to any user created routes then - this field will be the string 'System Route'. - :type route_table_id: str - """ - - _attribute_map = { - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, - 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(NextHopResult, self).__init__(**kwargs) - self.next_hop_type = kwargs.get('next_hop_type', None) - self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) - self.route_table_id = kwargs.get('route_table_id', None) - - -class Operation(msrest.serialization.Model): - """Network REST API operation definition. - - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.network.v2017_11_01.models.OperationDisplay - :param origin: Origin of the operation. - :type origin: str - :param service_specification: Specification of the service. - :type service_specification: - ~azure.mgmt.network.v2017_11_01.models.OperationPropertiesFormatServiceSpecification - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationPropertiesFormatServiceSpecification'}, - } - - def __init__( - self, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.service_specification = kwargs.get('service_specification', None) - - -class OperationDisplay(msrest.serialization.Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft Network. - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - :param operation: Type of the operation: get, read, delete, etc. - :type operation: str - :param description: Description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) - - -class OperationListResult(msrest.serialization.Model): - """Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of results. - - :param value: List of Network operations supported by the Network resource provider. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Operation] - :param next_link: URL to get the next set of operation list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class OperationPropertiesFormatServiceSpecification(msrest.serialization.Model): - """Specification of the service. - - :param metric_specifications: Operation service specification. - :type metric_specifications: list[~azure.mgmt.network.v2017_11_01.models.MetricSpecification] - :param log_specifications: Operation log specification. - :type log_specifications: list[~azure.mgmt.network.v2017_11_01.models.LogSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__( - self, - **kwargs - ): - super(OperationPropertiesFormatServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = kwargs.get('metric_specifications', None) - self.log_specifications = kwargs.get('log_specifications', None) - - -class OutboundNatRule(SubResource): - """Outbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allocated_outbound_ports: The number of outbound ports to be used for NAT. - :type allocated_outbound_ports: int - :param frontend_ip_configurations: The Frontend IP addresses of the load balancer. - :type frontend_ip_configurations: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[SubResource]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(OutboundNatRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', None) - self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) - self.backend_address_pool = kwargs.get('backend_address_pool', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PacketCapture(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCapture, self).__init__(**kwargs) - self.target = kwargs['target'] - self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) - self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) - self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) - self.storage_location = kwargs['storage_location'] - self.filters = kwargs.get('filters', None) - - -class PacketCaptureFilter(msrest.serialization.Model): - """Filter that is applied to packet capture request. Multiple filters can be applied. - - :param protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". - Default value: "Any". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.PcProtocol - :param local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type local_ip_address: str - :param remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type remote_ip_address: str - :param local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type local_port: str - :param remote_port: Remote port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type remote_port: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureFilter, self).__init__(**kwargs) - self.protocol = kwargs.get('protocol', "Any") - self.local_ip_address = kwargs.get('local_ip_address', None) - self.remote_ip_address = kwargs.get('remote_ip_address', None) - self.local_port = kwargs.get('local_port', None) - self.remote_port = kwargs.get('remote_port', None) - - -class PacketCaptureListResult(msrest.serialization.Model): - """List of packet capture sessions. - - :param value: Information about packet capture sessions. - :type value: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureResult] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - - -class PacketCaptureParameters(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureParameters, self).__init__(**kwargs) - self.target = kwargs['target'] - self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) - self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) - self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) - self.storage_location = kwargs['storage_location'] - self.filters = kwargs.get('filters', None) - - -class PacketCaptureQueryStatusResult(msrest.serialization.Model): - """Status of packet capture session. - - :param name: The name of the packet capture resource. - :type name: str - :param id: The ID of the packet capture resource. - :type id: str - :param capture_start_time: The start time of the packet capture session. - :type capture_start_time: ~datetime.datetime - :param packet_capture_status: The status of the packet capture session. Possible values - include: "NotStarted", "Running", "Stopped", "Error", "Unknown". - :type packet_capture_status: str or ~azure.mgmt.network.v2017_11_01.models.PcStatus - :param stop_reason: The reason the current packet capture session was stopped. - :type stop_reason: str - :param packet_capture_error: List of errors of packet capture session. - :type packet_capture_error: list[str or ~azure.mgmt.network.v2017_11_01.models.PcError] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'capture_start_time': {'key': 'captureStartTime', 'type': 'iso-8601'}, - 'packet_capture_status': {'key': 'packetCaptureStatus', 'type': 'str'}, - 'stop_reason': {'key': 'stopReason', 'type': 'str'}, - 'packet_capture_error': {'key': 'packetCaptureError', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureQueryStatusResult, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - self.capture_start_time = kwargs.get('capture_start_time', None) - self.packet_capture_status = kwargs.get('packet_capture_status', None) - self.stop_reason = kwargs.get('stop_reason', None) - self.packet_capture_error = kwargs.get('packet_capture_error', None) - - -class PacketCaptureResult(msrest.serialization.Model): - """Information about packet capture session. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the packet capture session. - :vartype name: str - :ivar id: ID of the packet capture operation. - :vartype id: str - :param etag: - :type etag: str - :param target: The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureResult, self).__init__(**kwargs) - self.name = None - self.id = None - self.etag = kwargs.get('etag', "A unique read-only string that changes whenever the resource is updated.") - self.target = kwargs.get('target', None) - self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) - self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) - self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) - self.storage_location = kwargs.get('storage_location', None) - self.filters = kwargs.get('filters', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PacketCaptureResultProperties(PacketCaptureParameters): - """Describes the properties of a packet capture session. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureResultProperties, self).__init__(**kwargs) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PacketCaptureStorageLocation(msrest.serialization.Model): - """Describes the storage location for a packet capture session. - - :param storage_id: The ID of the storage account to save the packet capture session. Required - if no local file path is provided. - :type storage_id: str - :param storage_path: The URI of the storage path to save the packet capture. Must be a - well-formed URI describing the location to save the packet capture. - :type storage_path: str - :param file_path: A valid local path on the targeting VM. Must include the name of the capture - file (*.cap). For linux virtual machine it must start with /var/captures. Required if no - storage ID is provided, otherwise optional. - :type file_path: str - """ - - _attribute_map = { - 'storage_id': {'key': 'storageId', 'type': 'str'}, - 'storage_path': {'key': 'storagePath', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PacketCaptureStorageLocation, self).__init__(**kwargs) - self.storage_id = kwargs.get('storage_id', None) - self.storage_path = kwargs.get('storage_path', None) - self.file_path = kwargs.get('file_path', None) - - -class PatchRouteFilter(SubResource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar type: Resource type. - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PatchRouteFilter, self).__init__(**kwargs) - self.name = None - self.etag = None - self.type = None - self.tags = kwargs.get('tags', None) - self.rules = kwargs.get('rules', None) - self.peerings = kwargs.get('peerings', None) - self.provisioning_state = None - - -class PatchRouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_11_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PatchRouteFilterRule, self).__init__(**kwargs) - self.name = None - self.etag = None - self.access = kwargs.get('access', None) - self.route_filter_rule_type = kwargs.get('route_filter_rule_type', None) - self.communities = kwargs.get('communities', None) - self.provisioning_state = None - - -class Probe(SubResource): - """A load balancer probe. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar load_balancing_rules: The load balancer rules that use this probe. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param protocol: The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' - is specified, a received ACK is required for the probe to be successful. If 'Http' is - specified, a 200 OK response from the specifies URI is required for the probe to be successful. - Possible values include: "Http", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.ProbeProtocol - :param port: The port for communicating the probe. Possible values range from 1 to 65535, - inclusive. - :type port: int - :param interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint - for health status. Typically, the interval is slightly less than half the allocated timeout - period (in seconds) which allows two full probes before taking the instance out of rotation. - The default value is 15, the minimum value is 5. - :type interval_in_seconds: int - :param number_of_probes: The number of probes where if no response, will result in stopping - further traffic from being delivered to the endpoint. This values allows endpoints to be taken - out of rotation faster or slower than the typical times used in Azure. - :type number_of_probes: int - :param request_path: The URI used for requesting health status from the VM. Path is required if - a protocol is set to http. Otherwise, it is not allowed. There is no default value. - :type request_path: str - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, - 'number_of_probes': {'key': 'properties.numberOfProbes', 'type': 'int'}, - 'request_path': {'key': 'properties.requestPath', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Probe, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.load_balancing_rules = None - self.protocol = kwargs.get('protocol', None) - self.port = kwargs.get('port', None) - self.interval_in_seconds = kwargs.get('interval_in_seconds', None) - self.number_of_probes = kwargs.get('number_of_probes', None) - self.request_path = kwargs.get('request_path', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PublicIPAddress(Resource): - """Public IP address resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The public IP address SKU. - :type sku: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddressSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :param public_ip_allocation_method: The public IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type public_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param public_ip_address_version: The public IP address version. Possible values are: 'IPv4' - and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type public_ip_address_version: str or ~azure.mgmt.network.v2017_11_01.models.IPVersion - :ivar ip_configuration: The IP configuration associated with the public IP address. - :vartype ip_configuration: ~azure.mgmt.network.v2017_11_01.models.IPConfiguration - :param dns_settings: The FQDN of the DNS record associated with the public IP address. - :type dns_settings: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddressDnsSettings - :param ip_tags: The list of tags associated with the public IP address. - :type ip_tags: list[~azure.mgmt.network.v2017_11_01.models.IpTag] - :param ip_address: The IP address associated with the public IP address resource. - :type ip_address: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param resource_guid: The resource GUID property of the public IP resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'PublicIPAddressSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'public_ip_allocation_method': {'key': 'properties.publicIPAllocationMethod', 'type': 'str'}, - 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, - 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddress, self).__init__(**kwargs) - self.sku = kwargs.get('sku', None) - self.etag = kwargs.get('etag', None) - self.zones = kwargs.get('zones', None) - self.public_ip_allocation_method = kwargs.get('public_ip_allocation_method', None) - self.public_ip_address_version = kwargs.get('public_ip_address_version', None) - self.ip_configuration = None - self.dns_settings = kwargs.get('dns_settings', None) - self.ip_tags = kwargs.get('ip_tags', None) - self.ip_address = kwargs.get('ip_address', None) - self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class PublicIPAddressDnsSettings(msrest.serialization.Model): - """Contains FQDN of the DNS record associated with the public IP address. - - :param domain_name_label: Gets or sets the Domain name label.The concatenation of the domain - name label and the regionalized DNS zone make up the fully qualified domain name associated - with the public IP address. If a domain name label is specified, an A DNS record is created for - the public IP in the Microsoft Azure DNS system. - :type domain_name_label: str - :param fqdn: Gets the FQDN, Fully qualified domain name of the A DNS record associated with the - public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. - :type fqdn: str - :param reverse_fqdn: Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name - that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record - is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. - :type reverse_fqdn: str - """ - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'reverse_fqdn': {'key': 'reverseFqdn', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddressDnsSettings, self).__init__(**kwargs) - self.domain_name_label = kwargs.get('domain_name_label', None) - self.fqdn = kwargs.get('fqdn', None) - self.reverse_fqdn = kwargs.get('reverse_fqdn', None) - - -class PublicIPAddressListResult(msrest.serialization.Model): - """Response for ListPublicIpAddresses API service call. - - :param value: A list of public IP addresses that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.PublicIPAddress] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddressListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class PublicIPAddressSku(msrest.serialization.Model): - """SKU of a public IP address. - - :param name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_11_01.models.PublicIPAddressSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PublicIPAddressSku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - -class QueryTroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to query the troubleshooting result. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource ID to query the troubleshooting - result. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(QueryTroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - - -class ResourceNavigationLink(SubResource): - """ResourceNavigationLink resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param linked_resource_type: Resource type of the linked resource. - :type linked_resource_type: str - :param link: Link to the external resource. - :type link: str - :ivar provisioning_state: Provisioning state of the ResourceNavigationLink resource. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, - 'link': {'key': 'properties.link', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ResourceNavigationLink, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = None - self.linked_resource_type = kwargs.get('linked_resource_type', None) - self.link = kwargs.get('link', None) - self.provisioning_state = None - - -class RetentionPolicyParameters(msrest.serialization.Model): - """Parameters that define the retention policy for flow log. - - :param days: Number of days to retain flow log records. - :type days: int - :param enabled: Flag to enable/disable retention. - :type enabled: bool - """ - - _attribute_map = { - 'days': {'key': 'days', 'type': 'int'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(RetentionPolicyParameters, self).__init__(**kwargs) - self.days = kwargs.get('days', 0) - self.enabled = kwargs.get('enabled', False) - - -class Route(SubResource): - """Route resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The destination CIDR to which the route applies. - :type address_prefix: str - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_11_01.models.RouteNextHopType - :param next_hop_ip_address: The IP address packets should be forwarded to. Next hop values are - only allowed in routes where the next hop type is VirtualAppliance. - :type next_hop_ip_address: str - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'next_hop_type': {'key': 'properties.nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'properties.nextHopIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Route, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.address_prefix = kwargs.get('address_prefix', None) - self.next_hop_type = kwargs.get('next_hop_type', None) - self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class RouteFilter(Resource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilter, self).__init__(**kwargs) - self.etag = None - self.rules = kwargs.get('rules', None) - self.peerings = kwargs.get('peerings', None) - self.provisioning_state = None - - -class RouteFilterListResult(msrest.serialization.Model): - """Response for the ListRouteFilters API service call. - - :param value: Gets a list of route filters in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.RouteFilter] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilter]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilterListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param location: Resource location. - :type location: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_11_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilterRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.location = kwargs.get('location', None) - self.etag = None - self.access = kwargs.get('access', None) - self.route_filter_rule_type = kwargs.get('route_filter_rule_type', None) - self.communities = kwargs.get('communities', None) - self.provisioning_state = None - - -class RouteFilterRuleListResult(msrest.serialization.Model): - """Response for the ListRouteFilterRules API service call. - - :param value: Gets a list of RouteFilterRules in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilterRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteFilterRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RouteListResult(msrest.serialization.Model): - """Response for the ListRoute API service call. - - :param value: Gets a list of routes in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Route] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Route]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class RouteTable(Resource): - """Route table resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param routes: Collection of routes contained within a route table. - :type routes: list[~azure.mgmt.network.v2017_11_01.models.Route] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_11_01.models.Subnet] - :param disable_bgp_route_propagation: Gets or sets whether to disable the routes learned by BGP - on that route table. True means disable. - :type disable_bgp_route_propagation: bool - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'routes': {'key': 'properties.routes', 'type': '[Route]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'disable_bgp_route_propagation': {'key': 'properties.disableBgpRoutePropagation', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteTable, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.routes = kwargs.get('routes', None) - self.subnets = None - self.disable_bgp_route_propagation = kwargs.get('disable_bgp_route_propagation', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class RouteTableListResult(msrest.serialization.Model): - """Response for the ListRouteTable API service call. - - :param value: Gets a list of route tables in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.RouteTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(RouteTableListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class SecurityGroupNetworkInterface(msrest.serialization.Model): - """Network interface and all its associated security rules. - - :param id: ID of the network interface. - :type id: str - :param security_rule_associations: All security rules associated with the network interface. - :type security_rule_associations: - ~azure.mgmt.network.v2017_11_01.models.SecurityRuleAssociations - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rule_associations': {'key': 'securityRuleAssociations', 'type': 'SecurityRuleAssociations'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityGroupNetworkInterface, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.security_rule_associations = kwargs.get('security_rule_associations', None) - - -class SecurityGroupViewParameters(msrest.serialization.Model): - """Parameters that define the VM to check security groups for. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. ID of the target VM. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityGroupViewParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - - -class SecurityGroupViewResult(msrest.serialization.Model): - """The information about security rules applied to the specified VM. - - :param network_interfaces: List of network interfaces on the specified VM. - :type network_interfaces: - list[~azure.mgmt.network.v2017_11_01.models.SecurityGroupNetworkInterface] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityGroupViewResult, self).__init__(**kwargs) - self.network_interfaces = kwargs.get('network_interfaces', None) - - -class SecurityRule(SubResource): - """Network security rule. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param description: A description for this rule. Restricted to 140 chars. - :type description: str - :param protocol: Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and - '*'. Possible values include: "Tcp", "Udp", "*". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleProtocol - :param source_port_range: The source port or range. Integer or range between 0 and 65535. - Asterisk '*' can also be used to match all ports. - :type source_port_range: str - :param destination_port_range: The destination port or range. Integer or range between 0 and - 65535. Asterisk '*' can also be used to match all ports. - :type destination_port_range: str - :param source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to - match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - can also be used. If this is an ingress rule, specifies where network traffic originates from. - :type source_address_prefix: str - :param source_address_prefixes: The CIDR or source IP ranges. - :type source_address_prefixes: list[str] - :param source_application_security_groups: The application security group specified as source. - :type source_application_security_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] - :param destination_address_prefix: The destination address prefix. CIDR or destination IP - range. Asterisk '*' can also be used to match all source IPs. Default tags such as - 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - :type destination_address_prefix: str - :param destination_address_prefixes: The destination address prefixes. CIDR or destination IP - ranges. - :type destination_address_prefixes: list[str] - :param destination_application_security_groups: The application security group specified as - destination. - :type destination_application_security_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] - :param source_port_ranges: The source port ranges. - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. - :type destination_port_ranges: list[str] - :param access: The network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleAccess - :param priority: The priority of the rule. The value can be between 100 and 4096. The priority - number must be unique for each rule in the collection. The lower the priority number, the - higher the priority of the rule. - :type priority: int - :param direction: The direction of the rule. The direction specifies if rule will be evaluated - on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleDirection - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'source_port_range': {'key': 'properties.sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'properties.destinationPortRange', 'type': 'str'}, - 'source_address_prefix': {'key': 'properties.sourceAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'properties.sourceAddressPrefixes', 'type': '[str]'}, - 'source_application_security_groups': {'key': 'properties.sourceApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'destination_address_prefix': {'key': 'properties.destinationAddressPrefix', 'type': 'str'}, - 'destination_address_prefixes': {'key': 'properties.destinationAddressPrefixes', 'type': '[str]'}, - 'destination_application_security_groups': {'key': 'properties.destinationApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'priority': {'key': 'properties.priority', 'type': 'int'}, - 'direction': {'key': 'properties.direction', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityRule, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.description = kwargs.get('description', None) - self.protocol = kwargs.get('protocol', None) - self.source_port_range = kwargs.get('source_port_range', None) - self.destination_port_range = kwargs.get('destination_port_range', None) - self.source_address_prefix = kwargs.get('source_address_prefix', None) - self.source_address_prefixes = kwargs.get('source_address_prefixes', None) - self.source_application_security_groups = kwargs.get('source_application_security_groups', None) - self.destination_address_prefix = kwargs.get('destination_address_prefix', None) - self.destination_address_prefixes = kwargs.get('destination_address_prefixes', None) - self.destination_application_security_groups = kwargs.get('destination_application_security_groups', None) - self.source_port_ranges = kwargs.get('source_port_ranges', None) - self.destination_port_ranges = kwargs.get('destination_port_ranges', None) - self.access = kwargs.get('access', None) - self.priority = kwargs.get('priority', None) - self.direction = kwargs.get('direction', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class SecurityRuleAssociations(msrest.serialization.Model): - """All security rules associated with the network interface. - - :param network_interface_association: Network interface and its custom security rules. - :type network_interface_association: - ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceAssociation - :param subnet_association: Network interface and its custom security rules. - :type subnet_association: ~azure.mgmt.network.v2017_11_01.models.SubnetAssociation - :param default_security_rules: Collection of default security rules of the network security - group. - :type default_security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - :param effective_security_rules: Collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityRule] - """ - - _attribute_map = { - 'network_interface_association': {'key': 'networkInterfaceAssociation', 'type': 'NetworkInterfaceAssociation'}, - 'subnet_association': {'key': 'subnetAssociation', 'type': 'SubnetAssociation'}, - 'default_security_rules': {'key': 'defaultSecurityRules', 'type': '[SecurityRule]'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityRuleAssociations, self).__init__(**kwargs) - self.network_interface_association = kwargs.get('network_interface_association', None) - self.subnet_association = kwargs.get('subnet_association', None) - self.default_security_rules = kwargs.get('default_security_rules', None) - self.effective_security_rules = kwargs.get('effective_security_rules', None) - - -class SecurityRuleListResult(msrest.serialization.Model): - """Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. - - :param value: The security rules in a network security group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecurityRuleListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class ServiceEndpointPropertiesFormat(msrest.serialization.Model): - """The service endpoint properties. - - :param service: The type of the endpoint service. - :type service: str - :param locations: A list of locations. - :type locations: list[str] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'service': {'key': 'service', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ServiceEndpointPropertiesFormat, self).__init__(**kwargs) - self.service = kwargs.get('service', None) - self.locations = kwargs.get('locations', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class Subnet(SubResource): - """Subnet in a virtual network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The address prefix for the subnet. - :type address_prefix: str - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup - :param route_table: The reference of the RouteTable resource. - :type route_table: ~azure.mgmt.network.v2017_11_01.models.RouteTable - :param service_endpoints: An array of service endpoints. - :type service_endpoints: - list[~azure.mgmt.network.v2017_11_01.models.ServiceEndpointPropertiesFormat] - :ivar ip_configurations: Gets an array of references to the network interface IP configurations - using subnet. - :vartype ip_configurations: list[~azure.mgmt.network.v2017_11_01.models.IPConfiguration] - :param resource_navigation_links: Gets an array of references to the external resources using - subnet. - :type resource_navigation_links: - list[~azure.mgmt.network.v2017_11_01.models.ResourceNavigationLink] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'ip_configurations': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, - 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, - 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Subnet, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.address_prefix = kwargs.get('address_prefix', None) - self.network_security_group = kwargs.get('network_security_group', None) - self.route_table = kwargs.get('route_table', None) - self.service_endpoints = kwargs.get('service_endpoints', None) - self.ip_configurations = None - self.resource_navigation_links = kwargs.get('resource_navigation_links', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class SubnetAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Subnet ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - **kwargs - ): - super(SubnetAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = kwargs.get('security_rules', None) - - -class SubnetListResult(msrest.serialization.Model): - """Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. - - :param value: The subnets in a virtual network. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Subnet] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Subnet]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SubnetListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class TagsObject(msrest.serialization.Model): - """Tags object for patch operations. - - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(TagsObject, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - - -class Topology(msrest.serialization.Model): - """Topology of the specified resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: GUID representing the operation id. - :vartype id: str - :ivar created_date_time: The datetime when the topology was initially created for the resource - group. - :vartype created_date_time: ~datetime.datetime - :ivar last_modified: The datetime when the topology was last modified. - :vartype last_modified: ~datetime.datetime - :param resources: - :type resources: list[~azure.mgmt.network.v2017_11_01.models.TopologyResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'last_modified': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, - 'resources': {'key': 'resources', 'type': '[TopologyResource]'}, - } - - def __init__( - self, - **kwargs - ): - super(Topology, self).__init__(**kwargs) - self.id = None - self.created_date_time = None - self.last_modified = None - self.resources = kwargs.get('resources', None) - - -class TopologyAssociation(msrest.serialization.Model): - """Resources that have an association with the parent resource. - - :param name: The name of the resource that is associated with the parent resource. - :type name: str - :param resource_id: The ID of the resource that is associated with the parent resource. - :type resource_id: str - :param association_type: The association type of the child resource to the parent resource. - Possible values include: "Associated", "Contains". - :type association_type: str or ~azure.mgmt.network.v2017_11_01.models.AssociationType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'association_type': {'key': 'associationType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TopologyAssociation, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.resource_id = kwargs.get('resource_id', None) - self.association_type = kwargs.get('association_type', None) - - -class TopologyParameters(msrest.serialization.Model): - """Parameters that define the representation of topology. - - :param target_resource_group_name: The name of the target resource group to perform topology - on. - :type target_resource_group_name: str - :param target_virtual_network: The reference of the Virtual Network resource. - :type target_virtual_network: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param target_subnet: The reference of the Subnet resource. - :type target_subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - """ - - _attribute_map = { - 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, - 'target_virtual_network': {'key': 'targetVirtualNetwork', 'type': 'SubResource'}, - 'target_subnet': {'key': 'targetSubnet', 'type': 'SubResource'}, - } - - def __init__( - self, - **kwargs - ): - super(TopologyParameters, self).__init__(**kwargs) - self.target_resource_group_name = kwargs.get('target_resource_group_name', None) - self.target_virtual_network = kwargs.get('target_virtual_network', None) - self.target_subnet = kwargs.get('target_subnet', None) - - -class TopologyResource(msrest.serialization.Model): - """The network resource topology information for the given resource group. - - :param name: Name of the resource. - :type name: str - :param id: ID of the resource. - :type id: str - :param location: Resource location. - :type location: str - :param associations: Holds the associations the resource has with other resources in the - resource group. - :type associations: list[~azure.mgmt.network.v2017_11_01.models.TopologyAssociation] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, - } - - def __init__( - self, - **kwargs - ): - super(TopologyResource, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.id = kwargs.get('id', None) - self.location = kwargs.get('location', None) - self.associations = kwargs.get('associations', None) - - -class TroubleshootingDetails(msrest.serialization.Model): - """Information gained from troubleshooting of specified resource. - - :param id: The id of the get troubleshoot operation. - :type id: str - :param reason_type: Reason type of failure. - :type reason_type: str - :param summary: A summary of troubleshooting. - :type summary: str - :param detail: Details on troubleshooting results. - :type detail: str - :param recommended_actions: List of recommended actions. - :type recommended_actions: - list[~azure.mgmt.network.v2017_11_01.models.TroubleshootingRecommendedActions] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'reason_type': {'key': 'reasonType', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': 'str'}, - 'detail': {'key': 'detail', 'type': 'str'}, - 'recommended_actions': {'key': 'recommendedActions', 'type': '[TroubleshootingRecommendedActions]'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingDetails, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - self.reason_type = kwargs.get('reason_type', None) - self.summary = kwargs.get('summary', None) - self.detail = kwargs.get('detail', None) - self.recommended_actions = kwargs.get('recommended_actions', None) - - -class TroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to troubleshoot. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource to troubleshoot. - :type target_resource_id: str - :param storage_id: Required. The ID for the storage account to save the troubleshoot result. - :type storage_id: str - :param storage_path: Required. The path to the blob to save the troubleshoot result in. - :type storage_path: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'storage_path': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'storage_path': {'key': 'properties.storagePath', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.storage_id = kwargs['storage_id'] - self.storage_path = kwargs['storage_path'] - - -class TroubleshootingRecommendedActions(msrest.serialization.Model): - """Recommended actions based on discovered issues. - - :param action_id: ID of the recommended action. - :type action_id: str - :param action_text: Description of recommended actions. - :type action_text: str - :param action_uri: The uri linking to a documentation for the recommended troubleshooting - actions. - :type action_uri: str - :param action_uri_text: The information from the URI for the recommended troubleshooting - actions. - :type action_uri_text: str - """ - - _attribute_map = { - 'action_id': {'key': 'actionId', 'type': 'str'}, - 'action_text': {'key': 'actionText', 'type': 'str'}, - 'action_uri': {'key': 'actionUri', 'type': 'str'}, - 'action_uri_text': {'key': 'actionUriText', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingRecommendedActions, self).__init__(**kwargs) - self.action_id = kwargs.get('action_id', None) - self.action_text = kwargs.get('action_text', None) - self.action_uri = kwargs.get('action_uri', None) - self.action_uri_text = kwargs.get('action_uri_text', None) - - -class TroubleshootingResult(msrest.serialization.Model): - """Troubleshooting information gained from specified resource. - - :param start_time: The start time of the troubleshooting. - :type start_time: ~datetime.datetime - :param end_time: The end time of the troubleshooting. - :type end_time: ~datetime.datetime - :param code: The result code of the troubleshooting. - :type code: str - :param results: Information from troubleshooting. - :type results: list[~azure.mgmt.network.v2017_11_01.models.TroubleshootingDetails] - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, - } - - def __init__( - self, - **kwargs - ): - super(TroubleshootingResult, self).__init__(**kwargs) - self.start_time = kwargs.get('start_time', None) - self.end_time = kwargs.get('end_time', None) - self.code = kwargs.get('code', None) - self.results = kwargs.get('results', None) - - -class TunnelConnectionHealth(msrest.serialization.Model): - """VirtualNetworkGatewayConnection properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar tunnel: Tunnel name. - :vartype tunnel: str - :ivar connection_status: Virtual network Gateway connection status. Possible values include: - "Unknown", "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionStatus - :ivar ingress_bytes_transferred: The Ingress Bytes Transferred in this connection. - :vartype ingress_bytes_transferred: long - :ivar egress_bytes_transferred: The Egress Bytes Transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar last_connection_established_utc_time: The time at which connection was established in Utc - format. - :vartype last_connection_established_utc_time: str - """ - - _validation = { - 'tunnel': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'last_connection_established_utc_time': {'readonly': True}, - } - - _attribute_map = { - 'tunnel': {'key': 'tunnel', 'type': 'str'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, - 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, - 'last_connection_established_utc_time': {'key': 'lastConnectionEstablishedUtcTime', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TunnelConnectionHealth, self).__init__(**kwargs) - self.tunnel = None - self.connection_status = None - self.ingress_bytes_transferred = None - self.egress_bytes_transferred = None - self.last_connection_established_utc_time = None - - -class Usage(msrest.serialization.Model): - """Describes network resource usage. - - 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. - - :ivar id: Resource identifier. - :vartype id: str - :param unit: Required. An enum describing the unit of measurement. Possible values include: - "Count". - :type unit: str or ~azure.mgmt.network.v2017_11_01.models.UsageUnit - :param current_value: Required. The current value of the usage. - :type current_value: long - :param limit: Required. The limit of usage. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.network.v2017_11_01.models.UsageName - """ - - _validation = { - 'id': {'readonly': True}, - 'unit': {'required': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - def __init__( - self, - **kwargs - ): - super(Usage, self).__init__(**kwargs) - self.id = None - self.unit = kwargs['unit'] - self.current_value = kwargs['current_value'] - self.limit = kwargs['limit'] - self.name = kwargs['name'] - - -class UsageName(msrest.serialization.Model): - """The usage names. - - :param value: A string describing the resource name. - :type value: str - :param localized_value: A localized string describing the resource name. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(UsageName, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.localized_value = kwargs.get('localized_value', None) - - -class UsagesListResult(msrest.serialization.Model): - """The list usages operation response. - - :param value: The list network resource usages. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Usage] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(UsagesListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class VerificationIPFlowParameters(msrest.serialization.Model): - """Parameters that define the IP flow to be verified. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the target resource to perform next-hop on. - :type target_resource_id: str - :param direction: Required. The direction of the packet represented as a 5-tuple. Possible - values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_11_01.models.Direction - :param protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.Protocol - :param local_port: Required. The local port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type local_port: str - :param remote_port: Required. The remote port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type remote_port: str - :param local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 - addresses. - :type local_ip_address: str - :param remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 - addresses. - :type remote_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of them, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'direction': {'required': True}, - 'protocol': {'required': True}, - 'local_port': {'required': True}, - 'remote_port': {'required': True}, - 'local_ip_address': {'required': True}, - 'remote_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'direction': {'key': 'direction', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VerificationIPFlowParameters, self).__init__(**kwargs) - self.target_resource_id = kwargs['target_resource_id'] - self.direction = kwargs['direction'] - self.protocol = kwargs['protocol'] - self.local_port = kwargs['local_port'] - self.remote_port = kwargs['remote_port'] - self.local_ip_address = kwargs['local_ip_address'] - self.remote_ip_address = kwargs['remote_ip_address'] - self.target_nic_resource_id = kwargs.get('target_nic_resource_id', None) - - -class VerificationIPFlowResult(msrest.serialization.Model): - """Results of IP flow verification on the target resource. - - :param access: Indicates whether the traffic is allowed or denied. Possible values include: - "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.Access - :param rule_name: Name of the rule. If input is not matched against any security rule, it is - not displayed. - :type rule_name: str - """ - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'rule_name': {'key': 'ruleName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VerificationIPFlowResult, self).__init__(**kwargs) - self.access = kwargs.get('access', None) - self.rule_name = kwargs.get('rule_name', None) - - -class VirtualNetwork(Resource): - """Virtual Network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_space: The AddressSpace that contains an array of IP address ranges that can be - used by subnets. - :type address_space: ~azure.mgmt.network.v2017_11_01.models.AddressSpace - :param dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs - deployed in the virtual network. - :type dhcp_options: ~azure.mgmt.network.v2017_11_01.models.DhcpOptions - :param subnets: A list of subnets in a Virtual Network. - :type subnets: list[~azure.mgmt.network.v2017_11_01.models.Subnet] - :param virtual_network_peerings: A list of peerings in a Virtual Network. - :type virtual_network_peerings: - list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering] - :param resource_guid: The resourceGuid property of the Virtual Network resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param enable_ddos_protection: Indicates if DDoS protection is enabled for all the protected - resources in a Virtual Network. - :type enable_ddos_protection: bool - :param enable_vm_protection: Indicates if Vm protection is enabled for all the subnets in a - Virtual Network. - :type enable_vm_protection: bool - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, - 'dhcp_options': {'key': 'properties.dhcpOptions', 'type': 'DhcpOptions'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'virtual_network_peerings': {'key': 'properties.virtualNetworkPeerings', 'type': '[VirtualNetworkPeering]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'enable_ddos_protection': {'key': 'properties.enableDdosProtection', 'type': 'bool'}, - 'enable_vm_protection': {'key': 'properties.enableVmProtection', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetwork, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.address_space = kwargs.get('address_space', None) - self.dhcp_options = kwargs.get('dhcp_options', None) - self.subnets = kwargs.get('subnets', None) - self.virtual_network_peerings = kwargs.get('virtual_network_peerings', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - self.enable_ddos_protection = kwargs.get('enable_ddos_protection', None) - self.enable_vm_protection = kwargs.get('enable_vm_protection', None) - - -class VirtualNetworkConnectionGatewayReference(msrest.serialization.Model): - """A reference to VirtualNetworkGateway or LocalNetworkGateway resource. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkConnectionGatewayReference, self).__init__(**kwargs) - self.id = kwargs['id'] - - -class VirtualNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param ip_configurations: IP configurations for virtual network gateway. - :type ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayIPConfiguration] - :param gateway_type: The type of this virtual network gateway. Possible values are: 'Vpn' and - 'ExpressRoute'. Possible values include: "Vpn", "ExpressRoute". - :type gateway_type: str or ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayType - :param vpn_type: The type of this virtual network gateway. Possible values are: 'PolicyBased' - and 'RouteBased'. Possible values include: "PolicyBased", "RouteBased". - :type vpn_type: str or ~azure.mgmt.network.v2017_11_01.models.VpnType - :param enable_bgp: Whether BGP is enabled for this virtual network gateway or not. - :type enable_bgp: bool - :param active: ActiveActive flag. - :type active: bool - :param gateway_default_site: The reference of the LocalNetworkGateway resource which represents - local network site having default routes. Assign Null value in case of removing existing - default site setting. - :type gateway_default_site: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param sku: The reference of the VirtualNetworkGatewaySku resource which represents the SKU - selected for Virtual network gateway. - :type sku: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewaySku - :param vpn_client_configuration: The reference of the VpnClientConfiguration resource which - represents the P2S VpnClient configurations. - :type vpn_client_configuration: ~azure.mgmt.network.v2017_11_01.models.VpnClientConfiguration - :param bgp_settings: Virtual network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_11_01.models.BgpSettings - :param resource_guid: The resource GUID property of the VirtualNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGateway resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualNetworkGatewayIPConfiguration]'}, - 'gateway_type': {'key': 'properties.gatewayType', 'type': 'str'}, - 'vpn_type': {'key': 'properties.vpnType', 'type': 'str'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'active': {'key': 'properties.activeActive', 'type': 'bool'}, - 'gateway_default_site': {'key': 'properties.gatewayDefaultSite', 'type': 'SubResource'}, - 'sku': {'key': 'properties.sku', 'type': 'VirtualNetworkGatewaySku'}, - 'vpn_client_configuration': {'key': 'properties.vpnClientConfiguration', 'type': 'VpnClientConfiguration'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGateway, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.ip_configurations = kwargs.get('ip_configurations', None) - self.gateway_type = kwargs.get('gateway_type', None) - self.vpn_type = kwargs.get('vpn_type', None) - self.enable_bgp = kwargs.get('enable_bgp', None) - self.active = kwargs.get('active', None) - self.gateway_default_site = kwargs.get('gateway_default_site', None) - self.sku = kwargs.get('sku', None) - self.vpn_client_configuration = kwargs.get('vpn_client_configuration', None) - self.bgp_settings = kwargs.get('bgp_settings', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayConnection(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: ~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_11_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_11_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkGateway'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkGateway'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'LocalNetworkGateway'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayConnection, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.authorization_key = kwargs.get('authorization_key', None) - self.virtual_network_gateway1 = kwargs['virtual_network_gateway1'] - self.virtual_network_gateway2 = kwargs.get('virtual_network_gateway2', None) - self.local_network_gateway2 = kwargs.get('local_network_gateway2', None) - self.connection_type = kwargs['connection_type'] - self.routing_weight = kwargs.get('routing_weight', None) - self.shared_key = kwargs.get('shared_key', None) - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = kwargs.get('peer', None) - self.enable_bgp = kwargs.get('enable_bgp', None) - self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) - self.ipsec_policies = kwargs.get('ipsec_policies', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListEntity(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkConnectionGatewayReference - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkConnectionGatewayReference - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkConnectionGatewayReference - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_11_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_11_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListEntity, self).__init__(**kwargs) - self.etag = kwargs.get('etag', None) - self.authorization_key = kwargs.get('authorization_key', None) - self.virtual_network_gateway1 = kwargs['virtual_network_gateway1'] - self.virtual_network_gateway2 = kwargs.get('virtual_network_gateway2', None) - self.local_network_gateway2 = kwargs.get('local_network_gateway2', None) - self.connection_type = kwargs['connection_type'] - self.routing_weight = kwargs.get('routing_weight', None) - self.shared_key = kwargs.get('shared_key', None) - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = kwargs.get('peer', None) - self.enable_bgp = kwargs.get('enable_bgp', None) - self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) - self.ipsec_policies = kwargs.get('ipsec_policies', None) - self.resource_guid = kwargs.get('resource_guid', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGatewayConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnection] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnection]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class VirtualNetworkGatewayIPConfiguration(SubResource): - """IP configuration for virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.SubResource - :ivar provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayIPConfiguration, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) - self.subnet = kwargs.get('subnet', None) - self.public_ip_address = kwargs.get('public_ip_address', None) - self.provisioning_state = None - - -class VirtualNetworkGatewayListConnectionsResult(msrest.serialization.Model): - """Response for the VirtualNetworkGatewayListConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: - list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionListEntity] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnectionListEntity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayListConnectionsResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class VirtualNetworkGatewayListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGateway resources that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewayListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = None - - -class VirtualNetworkGatewaySku(msrest.serialization.Model): - """VirtualNetworkGatewaySku details. - - :param name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type name: str or ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewaySkuName - :param tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type tier: str or ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewaySkuTier - :param capacity: The capacity. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkGatewaySku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.tier = kwargs.get('tier', None) - self.capacity = kwargs.get('capacity', None) - - -class VirtualNetworkListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworks API service call. - - :param value: Gets a list of VirtualNetwork resources in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetwork] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class VirtualNetworkListUsageResult(msrest.serialization.Model): - """Response for the virtual networks GetUsage API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: VirtualNetwork usage stats. - :vartype value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkUsage] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkListUsageResult, self).__init__(**kwargs) - self.value = None - self.next_link = kwargs.get('next_link', None) - - -class VirtualNetworkPeering(SubResource): - """Peerings in a virtual network resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allow_virtual_network_access: Whether the VMs in the linked virtual network space would - be able to access all the VMs in local Virtual network space. - :type allow_virtual_network_access: bool - :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the remote - virtual network will be allowed/disallowed. - :type allow_forwarded_traffic: bool - :param allow_gateway_transit: If gateway links can be used in remote virtual networking to link - to this virtual network. - :type allow_gateway_transit: bool - :param use_remote_gateways: If remote gateways can be used on this virtual network. If the flag - is set to true, and allowGatewayTransit on remote peering is also true, virtual network will - use gateways of remote virtual network for transit. Only one peering can have this flag set to - true. This flag cannot be set if virtual network already has a gateway. - :type use_remote_gateways: bool - :param remote_virtual_network: The reference of the remote virtual network. The remote virtual - network can be in the same or different region (preview). See here to register for the preview - and learn more - (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). - :type remote_virtual_network: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param remote_address_space: The reference of the remote virtual network address space. - :type remote_address_space: ~azure.mgmt.network.v2017_11_01.models.AddressSpace - :param peering_state: The status of the virtual network peering. Possible values are - 'Initiated', 'Connected', and 'Disconnected'. Possible values include: "Initiated", - "Connected", "Disconnected". - :type peering_state: str or ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeeringState - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, - 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, - 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, - 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, - 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, - 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, - 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkPeering, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.allow_virtual_network_access = kwargs.get('allow_virtual_network_access', None) - self.allow_forwarded_traffic = kwargs.get('allow_forwarded_traffic', None) - self.allow_gateway_transit = kwargs.get('allow_gateway_transit', None) - self.use_remote_gateways = kwargs.get('use_remote_gateways', None) - self.remote_virtual_network = kwargs.get('remote_virtual_network', None) - self.remote_address_space = kwargs.get('remote_address_space', None) - self.peering_state = kwargs.get('peering_state', None) - self.provisioning_state = kwargs.get('provisioning_state', None) - - -class VirtualNetworkPeeringListResult(msrest.serialization.Model): - """Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. - - :param value: The peerings in a virtual network. - :type value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkPeeringListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class VirtualNetworkUsage(msrest.serialization.Model): - """Usage details for subnet. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar current_value: Indicates number of IPs used from the Subnet. - :vartype current_value: float - :ivar id: Subnet identifier. - :vartype id: str - :ivar limit: Indicates the size of the subnet. - :vartype limit: float - :ivar name: The name containing common and localized value for usage. - :vartype name: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkUsageName - :ivar unit: Usage units. Returns 'Count'. - :vartype unit: str - """ - - _validation = { - 'current_value': {'readonly': True}, - 'id': {'readonly': True}, - 'limit': {'readonly': True}, - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'id': {'key': 'id', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'name': {'key': 'name', 'type': 'VirtualNetworkUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsage, self).__init__(**kwargs) - self.current_value = None - self.id = None - self.limit = None - self.name = None - self.unit = None - - -class VirtualNetworkUsageName(msrest.serialization.Model): - """Usage strings container. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar localized_value: Localized subnet size and usage string. - :vartype localized_value: str - :ivar value: Subnet size and usage string. - :vartype value: str - """ - - _validation = { - 'localized_value': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsageName, self).__init__(**kwargs) - self.localized_value = None - self.value = None - - -class VpnClientConfiguration(msrest.serialization.Model): - """VpnClientConfiguration for P2S client. - - :param vpn_client_address_pool: The reference of the address space resource which represents - Address space for P2S VpnClient. - :type vpn_client_address_pool: ~azure.mgmt.network.v2017_11_01.models.AddressSpace - :param vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. - :type vpn_client_root_certificates: - list[~azure.mgmt.network.v2017_11_01.models.VpnClientRootCertificate] - :param vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network - gateway. - :type vpn_client_revoked_certificates: - list[~azure.mgmt.network.v2017_11_01.models.VpnClientRevokedCertificate] - :param vpn_client_protocols: VpnClientProtocols for Virtual network gateway. - :type vpn_client_protocols: list[str or - ~azure.mgmt.network.v2017_11_01.models.VpnClientProtocol] - :param radius_server_address: The radius server address property of the VirtualNetworkGateway - resource for vpn client connection. - :type radius_server_address: str - :param radius_server_secret: The radius secret property of the VirtualNetworkGateway resource - for vpn client connection. - :type radius_server_secret: str - """ - - _attribute_map = { - 'vpn_client_address_pool': {'key': 'vpnClientAddressPool', 'type': 'AddressSpace'}, - 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, - 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, - 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, - 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, - 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientConfiguration, self).__init__(**kwargs) - self.vpn_client_address_pool = kwargs.get('vpn_client_address_pool', None) - self.vpn_client_root_certificates = kwargs.get('vpn_client_root_certificates', None) - self.vpn_client_revoked_certificates = kwargs.get('vpn_client_revoked_certificates', None) - self.vpn_client_protocols = kwargs.get('vpn_client_protocols', None) - self.radius_server_address = kwargs.get('radius_server_address', None) - self.radius_server_secret = kwargs.get('radius_server_secret', None) - - -class VpnClientParameters(msrest.serialization.Model): - """Vpn Client Parameters for package generation. - - :param processor_architecture: VPN client Processor Architecture. Possible values are: 'AMD64' - and 'X86'. Possible values include: "Amd64", "X86". - :type processor_architecture: str or - ~azure.mgmt.network.v2017_11_01.models.ProcessorArchitecture - :param authentication_method: VPN client Authentication Method. Possible values are: 'EAPTLS' - and 'EAPMSCHAPv2'. Possible values include: "EAPTLS", "EAPMSCHAPv2". - :type authentication_method: str or ~azure.mgmt.network.v2017_11_01.models.AuthenticationMethod - :param radius_server_auth_certificate: The public certificate data for the radius server - authentication certificate as a Base-64 encoded string. Required only if external radius - authentication has been configured with EAPTLS authentication. - :type radius_server_auth_certificate: str - :param client_root_certificates: A list of client root certificates public certificate data - encoded as Base-64 strings. Optional parameter for external radius based authentication with - EAPTLS. - :type client_root_certificates: list[str] - """ - - _attribute_map = { - 'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'}, - 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, - 'radius_server_auth_certificate': {'key': 'radiusServerAuthCertificate', 'type': 'str'}, - 'client_root_certificates': {'key': 'clientRootCertificates', 'type': '[str]'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientParameters, self).__init__(**kwargs) - self.processor_architecture = kwargs.get('processor_architecture', None) - self.authentication_method = kwargs.get('authentication_method', None) - self.radius_server_auth_certificate = kwargs.get('radius_server_auth_certificate', None) - self.client_root_certificates = kwargs.get('client_root_certificates', None) - - -class VpnClientRevokedCertificate(SubResource): - """VPN client revoked certificate of virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param thumbprint: The revoked VPN client certificate thumbprint. - :type thumbprint: str - :ivar provisioning_state: The provisioning state of the VPN client revoked certificate - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientRevokedCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.provisioning_state = None - - -class VpnClientRootCertificate(SubResource): - """VPN client root certificate of virtual network gateway. - - 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 id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param public_cert_data: Required. The certificate public data. - :type public_cert_data: str - :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'public_cert_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnClientRootCertificate, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.etag = kwargs.get('etag', None) - self.public_cert_data = kwargs['public_cert_data'] - self.provisioning_state = None - - -class VpnDeviceScriptParameters(msrest.serialization.Model): - """Vpn device configuration script generation parameters. - - :param vendor: The vendor for the vpn device. - :type vendor: str - :param device_family: The device family for the vpn device. - :type device_family: str - :param firmware_version: The firmware version for the vpn device. - :type firmware_version: str - """ - - _attribute_map = { - 'vendor': {'key': 'vendor', 'type': 'str'}, - 'device_family': {'key': 'deviceFamily', 'type': 'str'}, - 'firmware_version': {'key': 'firmwareVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VpnDeviceScriptParameters, self).__init__(**kwargs) - self.vendor = kwargs.get('vendor', None) - self.device_family = kwargs.get('device_family', None) - self.firmware_version = kwargs.get('firmware_version', None) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_models_py3.py deleted file mode 100644 index a56c94ed8390..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_models_py3.py +++ /dev/null @@ -1,10098 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Dict, List, Optional, Union - -import msrest.serialization - -from ._network_management_client_enums import * - - -class AddressSpace(msrest.serialization.Model): - """AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. - - :param address_prefixes: A list of address blocks reserved for this virtual network in CIDR - notation. - :type address_prefixes: list[str] - """ - - _attribute_map = { - 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, - } - - def __init__( - self, - *, - address_prefixes: Optional[List[str]] = None, - **kwargs - ): - super(AddressSpace, self).__init__(**kwargs) - self.address_prefixes = address_prefixes - - -class Resource(msrest.serialization.Model): - """Common resource representation. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = id - self.name = None - self.type = None - self.location = location - self.tags = tags - - -class ApplicationGateway(Resource): - """Application gateway resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param sku: SKU of the application gateway resource. - :type sku: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySku - :param ssl_policy: SSL policy of the application gateway resource. - :type ssl_policy: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPolicy - :ivar operational_state: Operational state of the application gateway resource. Possible values - include: "Stopped", "Starting", "Running", "Stopping". - :vartype operational_state: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayOperationalState - :param gateway_ip_configurations: Subnets of application the gateway resource. - :type gateway_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayIPConfiguration] - :param authentication_certificates: Authentication certificates of the application gateway - resource. - :type authentication_certificates: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayAuthenticationCertificate] - :param ssl_certificates: SSL certificates of the application gateway resource. - :type ssl_certificates: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslCertificate] - :param frontend_ip_configurations: Frontend IP addresses of the application gateway resource. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFrontendIPConfiguration] - :param frontend_ports: Frontend ports of the application gateway resource. - :type frontend_ports: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFrontendPort] - :param probes: Probes of the application gateway resource. - :type probes: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProbe] - :param backend_address_pools: Backend address pool of the application gateway resource. - :type backend_address_pools: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendAddressPool] - :param backend_http_settings_collection: Backend http settings of the application gateway - resource. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHttpSettings] - :param http_listeners: Http listeners of the application gateway resource. - :type http_listeners: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayHttpListener] - :param url_path_maps: URL path map of the application gateway resource. - :type url_path_maps: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayUrlPathMap] - :param request_routing_rules: Request routing rules of the application gateway resource. - :type request_routing_rules: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayRequestRoutingRule] - :param redirect_configurations: Redirect configurations of the application gateway resource. - :type redirect_configurations: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayRedirectConfiguration] - :param web_application_firewall_configuration: Web application firewall configuration. - :type web_application_firewall_configuration: - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayWebApplicationFirewallConfiguration - :param enable_http2: Whether HTTP2 is enabled on the application gateway resource. - :type enable_http2: bool - :param resource_guid: Resource GUID property of the application gateway resource. - :type resource_guid: str - :param provisioning_state: Provisioning state of the application gateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'operational_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'sku': {'key': 'properties.sku', 'type': 'ApplicationGatewaySku'}, - 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, - 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, - 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, - 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, - 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, - 'probes': {'key': 'properties.probes', 'type': '[ApplicationGatewayProbe]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'backend_http_settings_collection': {'key': 'properties.backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHttpSettings]'}, - 'http_listeners': {'key': 'properties.httpListeners', 'type': '[ApplicationGatewayHttpListener]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[ApplicationGatewayUrlPathMap]'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[ApplicationGatewayRequestRoutingRule]'}, - 'redirect_configurations': {'key': 'properties.redirectConfigurations', 'type': '[ApplicationGatewayRedirectConfiguration]'}, - 'web_application_firewall_configuration': {'key': 'properties.webApplicationFirewallConfiguration', 'type': 'ApplicationGatewayWebApplicationFirewallConfiguration'}, - 'enable_http2': {'key': 'properties.enableHttp2', 'type': 'bool'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - sku: Optional["ApplicationGatewaySku"] = None, - ssl_policy: Optional["ApplicationGatewaySslPolicy"] = None, - gateway_ip_configurations: Optional[List["ApplicationGatewayIPConfiguration"]] = None, - authentication_certificates: Optional[List["ApplicationGatewayAuthenticationCertificate"]] = None, - ssl_certificates: Optional[List["ApplicationGatewaySslCertificate"]] = None, - frontend_ip_configurations: Optional[List["ApplicationGatewayFrontendIPConfiguration"]] = None, - frontend_ports: Optional[List["ApplicationGatewayFrontendPort"]] = None, - probes: Optional[List["ApplicationGatewayProbe"]] = None, - backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, - backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHttpSettings"]] = None, - http_listeners: Optional[List["ApplicationGatewayHttpListener"]] = None, - url_path_maps: Optional[List["ApplicationGatewayUrlPathMap"]] = None, - request_routing_rules: Optional[List["ApplicationGatewayRequestRoutingRule"]] = None, - redirect_configurations: Optional[List["ApplicationGatewayRedirectConfiguration"]] = None, - web_application_firewall_configuration: Optional["ApplicationGatewayWebApplicationFirewallConfiguration"] = None, - enable_http2: Optional[bool] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.sku = sku - self.ssl_policy = ssl_policy - self.operational_state = None - self.gateway_ip_configurations = gateway_ip_configurations - self.authentication_certificates = authentication_certificates - self.ssl_certificates = ssl_certificates - self.frontend_ip_configurations = frontend_ip_configurations - self.frontend_ports = frontend_ports - self.probes = probes - self.backend_address_pools = backend_address_pools - self.backend_http_settings_collection = backend_http_settings_collection - self.http_listeners = http_listeners - self.url_path_maps = url_path_maps - self.request_routing_rules = request_routing_rules - self.redirect_configurations = redirect_configurations - self.web_application_firewall_configuration = web_application_firewall_configuration - self.enable_http2 = enable_http2 - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class SubResource(msrest.serialization.Model): - """Reference to another subresource. - - :param id: Resource ID. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - super(SubResource, self).__init__(**kwargs) - self.id = id - - -class ApplicationGatewayAuthenticationCertificate(SubResource): - """Authentication certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Certificate public data. - :type data: str - :param provisioning_state: Provisioning state of the authentication certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - data: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayAuthenticationCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.data = data - self.provisioning_state = provisioning_state - - -class ApplicationGatewayAvailableSslOptions(Resource): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param predefined_policies: List of available Ssl predefined policy. - :type predefined_policies: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param default_policy: Name of the Ssl predefined policy applied by default to application - gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", - "AppGwSslPolicy20170401S". - :type default_policy: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPolicyName - :param available_cipher_suites: List of available Ssl cipher suites. - :type available_cipher_suites: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslCipherSuite] - :param available_protocols: List of available Ssl protocols. - :type available_protocols: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslProtocol] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'predefined_policies': {'key': 'properties.predefinedPolicies', 'type': '[SubResource]'}, - 'default_policy': {'key': 'properties.defaultPolicy', 'type': 'str'}, - 'available_cipher_suites': {'key': 'properties.availableCipherSuites', 'type': '[str]'}, - 'available_protocols': {'key': 'properties.availableProtocols', 'type': '[str]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - predefined_policies: Optional[List["SubResource"]] = None, - default_policy: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, - available_cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, - available_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, - **kwargs - ): - super(ApplicationGatewayAvailableSslOptions, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.predefined_policies = predefined_policies - self.default_policy = default_policy - self.available_cipher_suites = available_cipher_suites - self.available_protocols = available_protocols - - -class ApplicationGatewayAvailableSslPredefinedPolicies(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableSslOptions API service call. - - :param value: List of available Ssl predefined policy. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPredefinedPolicy] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewaySslPredefinedPolicy]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationGatewaySslPredefinedPolicy"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayAvailableSslPredefinedPolicies, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApplicationGatewayAvailableWafRuleSetsResult(msrest.serialization.Model): - """Response for ApplicationGatewayAvailableWafRuleSets API service call. - - :param value: The list of application gateway rule sets. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallRuleSet] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationGatewayFirewallRuleSet"]] = None, - **kwargs - ): - super(ApplicationGatewayAvailableWafRuleSetsResult, self).__init__(**kwargs) - self.value = value - - -class ApplicationGatewayBackendAddress(msrest.serialization.Model): - """Backend address of an application gateway. - - :param fqdn: Fully qualified domain name (FQDN). - :type fqdn: str - :param ip_address: IP address. - :type ip_address: str - """ - - _attribute_map = { - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - } - - def __init__( - self, - *, - fqdn: Optional[str] = None, - ip_address: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayBackendAddress, self).__init__(**kwargs) - self.fqdn = fqdn - self.ip_address = ip_address - - -class ApplicationGatewayBackendAddressPool(SubResource): - """Backend Address Pool of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Resource that is unique within a resource group. This name can be used to access - the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param backend_ip_configurations: Collection of references to IPs defined in network - interfaces. - :type backend_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration] - :param backend_addresses: Backend addresses. - :type backend_addresses: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendAddress] - :param provisioning_state: Provisioning state of the backend address pool resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'backend_addresses': {'key': 'properties.backendAddresses', 'type': '[ApplicationGatewayBackendAddress]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - backend_ip_configurations: Optional[List["NetworkInterfaceIPConfiguration"]] = None, - backend_addresses: Optional[List["ApplicationGatewayBackendAddress"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayBackendAddressPool, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.backend_ip_configurations = backend_ip_configurations - self.backend_addresses = backend_addresses - self.provisioning_state = provisioning_state - - -class ApplicationGatewayBackendHealth(msrest.serialization.Model): - """List of ApplicationGatewayBackendHealthPool resources. - - :param backend_address_pools: - :type backend_address_pools: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealthPool] - """ - - _attribute_map = { - 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, - } - - def __init__( - self, - *, - backend_address_pools: Optional[List["ApplicationGatewayBackendHealthPool"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealth, self).__init__(**kwargs) - self.backend_address_pools = backend_address_pools - - -class ApplicationGatewayBackendHealthHttpSettings(msrest.serialization.Model): - """Application gateway BackendHealthHttp settings. - - :param backend_http_settings: Reference of an ApplicationGatewayBackendHttpSettings resource. - :type backend_http_settings: - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHttpSettings - :param servers: List of ApplicationGatewayBackendHealthServer resources. - :type servers: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealthServer] - """ - - _attribute_map = { - 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'ApplicationGatewayBackendHttpSettings'}, - 'servers': {'key': 'servers', 'type': '[ApplicationGatewayBackendHealthServer]'}, - } - - def __init__( - self, - *, - backend_http_settings: Optional["ApplicationGatewayBackendHttpSettings"] = None, - servers: Optional[List["ApplicationGatewayBackendHealthServer"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealthHttpSettings, self).__init__(**kwargs) - self.backend_http_settings = backend_http_settings - self.servers = servers - - -class ApplicationGatewayBackendHealthPool(msrest.serialization.Model): - """Application gateway BackendHealth pool. - - :param backend_address_pool: Reference of an ApplicationGatewayBackendAddressPool resource. - :type backend_address_pool: - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendAddressPool - :param backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings - resources. - :type backend_http_settings_collection: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealthHttpSettings] - """ - - _attribute_map = { - 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, - 'backend_http_settings_collection': {'key': 'backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHealthHttpSettings]'}, - } - - def __init__( - self, - *, - backend_address_pool: Optional["ApplicationGatewayBackendAddressPool"] = None, - backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHealthHttpSettings"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealthPool, self).__init__(**kwargs) - self.backend_address_pool = backend_address_pool - self.backend_http_settings_collection = backend_http_settings_collection - - -class ApplicationGatewayBackendHealthServer(msrest.serialization.Model): - """Application gateway backendhealth http settings. - - :param address: IP address or FQDN of backend server. - :type address: str - :param ip_configuration: Reference of IP configuration of backend server. - :type ip_configuration: ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration - :param health: Health of backend server. Possible values include: "Unknown", "Up", "Down", - "Partial", "Draining". - :type health: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealthServerHealth - """ - - _attribute_map = { - 'address': {'key': 'address', 'type': 'str'}, - 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'health': {'key': 'health', 'type': 'str'}, - } - - def __init__( - self, - *, - address: Optional[str] = None, - ip_configuration: Optional["NetworkInterfaceIPConfiguration"] = None, - health: Optional[Union[str, "ApplicationGatewayBackendHealthServerHealth"]] = None, - **kwargs - ): - super(ApplicationGatewayBackendHealthServer, self).__init__(**kwargs) - self.address = address - self.ip_configuration = ip_configuration - self.health = health - - -class ApplicationGatewayBackendHttpSettings(SubResource): - """Backend address pool settings of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Port. - :type port: int - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProtocol - :param cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", - "Disabled". - :type cookie_based_affinity: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayCookieBasedAffinity - :param request_timeout: Request timeout in seconds. Application Gateway will fail the request - if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 - seconds. - :type request_timeout: int - :param probe: Probe resource of an application gateway. - :type probe: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param authentication_certificates: Array of references to application gateway authentication - certificates. - :type authentication_certificates: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param connection_draining: Connection draining of the backend http settings resource. - :type connection_draining: - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayConnectionDraining - :param host_name: Host header to be sent to the backend servers. - :type host_name: str - :param pick_host_name_from_backend_address: Whether to pick host header should be picked from - the host name of the backend server. Default value is false. - :type pick_host_name_from_backend_address: bool - :param affinity_cookie_name: Cookie name to use for the affinity cookie. - :type affinity_cookie_name: str - :param probe_enabled: Whether the probe is enabled. Default value is false. - :type probe_enabled: bool - :param path: Path which should be used as a prefix for all HTTP requests. Null means no path - will be prefixed. Default value is null. - :type path: str - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'cookie_based_affinity': {'key': 'properties.cookieBasedAffinity', 'type': 'str'}, - 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, - 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, - 'affinity_cookie_name': {'key': 'properties.affinityCookieName', 'type': 'str'}, - 'probe_enabled': {'key': 'properties.probeEnabled', 'type': 'bool'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - port: Optional[int] = None, - protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, - cookie_based_affinity: Optional[Union[str, "ApplicationGatewayCookieBasedAffinity"]] = None, - request_timeout: Optional[int] = None, - probe: Optional["SubResource"] = None, - authentication_certificates: Optional[List["SubResource"]] = None, - connection_draining: Optional["ApplicationGatewayConnectionDraining"] = None, - host_name: Optional[str] = None, - pick_host_name_from_backend_address: Optional[bool] = None, - affinity_cookie_name: Optional[str] = None, - probe_enabled: Optional[bool] = None, - path: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayBackendHttpSettings, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.port = port - self.protocol = protocol - self.cookie_based_affinity = cookie_based_affinity - self.request_timeout = request_timeout - self.probe = probe - self.authentication_certificates = authentication_certificates - self.connection_draining = connection_draining - self.host_name = host_name - self.pick_host_name_from_backend_address = pick_host_name_from_backend_address - self.affinity_cookie_name = affinity_cookie_name - self.probe_enabled = probe_enabled - self.path = path - self.provisioning_state = provisioning_state - - -class ApplicationGatewayConnectionDraining(msrest.serialization.Model): - """Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether connection draining is enabled or not. - :type enabled: bool - :param drain_timeout_in_sec: Required. The number of seconds connection draining is active. - Acceptable values are from 1 second to 3600 seconds. - :type drain_timeout_in_sec: int - """ - - _validation = { - 'enabled': {'required': True}, - 'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'}, - } - - def __init__( - self, - *, - enabled: bool, - drain_timeout_in_sec: int, - **kwargs - ): - super(ApplicationGatewayConnectionDraining, self).__init__(**kwargs) - self.enabled = enabled - self.drain_timeout_in_sec = drain_timeout_in_sec - - -class ApplicationGatewayFirewallDisabledRuleGroup(msrest.serialization.Model): - """Allows to disable rules within a rule group or an entire rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the rule group that will be disabled. - :type rule_group_name: str - :param rules: The list of rules that will be disabled. If null, all rules of the rule group - will be disabled. - :type rules: list[int] - """ - - _validation = { - 'rule_group_name': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[int]'}, - } - - def __init__( - self, - *, - rule_group_name: str, - rules: Optional[List[int]] = None, - **kwargs - ): - super(ApplicationGatewayFirewallDisabledRuleGroup, self).__init__(**kwargs) - self.rule_group_name = rule_group_name - self.rules = rules - - -class ApplicationGatewayFirewallRule(msrest.serialization.Model): - """A web application firewall rule. - - All required parameters must be populated in order to send to Azure. - - :param rule_id: Required. The identifier of the web application firewall rule. - :type rule_id: int - :param description: The description of the web application firewall rule. - :type description: str - """ - - _validation = { - 'rule_id': {'required': True}, - } - - _attribute_map = { - 'rule_id': {'key': 'ruleId', 'type': 'int'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - rule_id: int, - description: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFirewallRule, self).__init__(**kwargs) - self.rule_id = rule_id - self.description = description - - -class ApplicationGatewayFirewallRuleGroup(msrest.serialization.Model): - """A web application firewall rule group. - - All required parameters must be populated in order to send to Azure. - - :param rule_group_name: Required. The name of the web application firewall rule group. - :type rule_group_name: str - :param description: The description of the web application firewall rule group. - :type description: str - :param rules: Required. The rules of the web application firewall rule group. - :type rules: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallRule] - """ - - _validation = { - 'rule_group_name': {'required': True}, - 'rules': {'required': True}, - } - - _attribute_map = { - 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - 'rules': {'key': 'rules', 'type': '[ApplicationGatewayFirewallRule]'}, - } - - def __init__( - self, - *, - rule_group_name: str, - rules: List["ApplicationGatewayFirewallRule"], - description: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFirewallRuleGroup, self).__init__(**kwargs) - self.rule_group_name = rule_group_name - self.description = description - self.rules = rules - - -class ApplicationGatewayFirewallRuleSet(Resource): - """A web application firewall rule set. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param provisioning_state: The provisioning state of the web application firewall rule set. - :type provisioning_state: str - :param rule_set_type: The type of the web application firewall rule set. - :type rule_set_type: str - :param rule_set_version: The version of the web application firewall rule set type. - :type rule_set_version: str - :param rule_groups: The rule groups of the web application firewall rule set. - :type rule_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallRuleGroup] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, - 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ApplicationGatewayFirewallRuleGroup]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - provisioning_state: Optional[str] = None, - rule_set_type: Optional[str] = None, - rule_set_version: Optional[str] = None, - rule_groups: Optional[List["ApplicationGatewayFirewallRuleGroup"]] = None, - **kwargs - ): - super(ApplicationGatewayFirewallRuleSet, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.provisioning_state = provisioning_state - self.rule_set_type = rule_set_type - self.rule_set_version = rule_set_version - self.rule_groups = rule_groups - - -class ApplicationGatewayFrontendIPConfiguration(SubResource): - """Frontend IP configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param private_ip_address: PrivateIPAddress of the network interface IP Configuration. - :type private_ip_address: str - :param private_ip_allocation_method: PrivateIP allocation method. Possible values include: - "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param subnet: Reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param public_ip_address: Reference of the PublicIP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Provisioning state of the public IP resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["SubResource"] = None, - public_ip_address: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFrontendIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class ApplicationGatewayFrontendPort(SubResource): - """Frontend port of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param port: Frontend port. - :type port: int - :param provisioning_state: Provisioning state of the frontend port resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - port: Optional[int] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayFrontendPort, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.port = port - self.provisioning_state = provisioning_state - - -class ApplicationGatewayHttpListener(SubResource): - """Http listener of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param frontend_ip_configuration: Frontend IP configuration resource of an application gateway. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param frontend_port: Frontend port resource of an application gateway. - :type frontend_port: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProtocol - :param host_name: Host name of HTTP listener. - :type host_name: str - :param ssl_certificate: SSL certificate resource of an application gateway. - :type ssl_certificate: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param require_server_name_indication: Applicable only if protocol is https. Enables SNI for - multi-hosting. - :type require_server_name_indication: bool - :param provisioning_state: Provisioning state of the HTTP listener resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host_name': {'key': 'properties.hostName', 'type': 'str'}, - 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, - 'require_server_name_indication': {'key': 'properties.requireServerNameIndication', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - frontend_port: Optional["SubResource"] = None, - protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, - host_name: Optional[str] = None, - ssl_certificate: Optional["SubResource"] = None, - require_server_name_indication: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayHttpListener, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.frontend_ip_configuration = frontend_ip_configuration - self.frontend_port = frontend_port - self.protocol = protocol - self.host_name = host_name - self.ssl_certificate = ssl_certificate - self.require_server_name_indication = require_server_name_indication - self.provisioning_state = provisioning_state - - -class ApplicationGatewayIPConfiguration(SubResource): - """IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param subnet: Reference of the subnet resource. A subnet from where application gateway gets - its private address. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Provisioning state of the application gateway subnet resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - subnet: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.subnet = subnet - self.provisioning_state = provisioning_state - - -class ApplicationGatewayListResult(msrest.serialization.Model): - """Response for ListApplicationGateways API service call. - - :param value: List of an application gateways in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGateway] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationGateway"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ApplicationGatewayPathRule(SubResource): - """Path rule of URL path map of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param paths: Path rules of URL path map. - :type paths: list[str] - :param backend_address_pool: Backend address pool resource of URL path map path rule. - :type backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param backend_http_settings: Backend http settings resource of URL path map path rule. - :type backend_http_settings: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of URL path map path rule. - :type redirect_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Path rule of URL path map resource. Possible values are: 'Updating', - 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'paths': {'key': 'properties.paths', 'type': '[str]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - paths: Optional[List[str]] = None, - backend_address_pool: Optional["SubResource"] = None, - backend_http_settings: Optional["SubResource"] = None, - redirect_configuration: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayPathRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.paths = paths - self.backend_address_pool = backend_address_pool - self.backend_http_settings = backend_http_settings - self.redirect_configuration = redirect_configuration - self.provisioning_state = provisioning_state - - -class ApplicationGatewayProbe(SubResource): - """Probe of the application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param protocol: Protocol. Possible values include: "Http", "Https". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProtocol - :param host: Host name to send the probe to. - :type host: str - :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to - :code:``://:code:``::code:``:code:``. - :type path: str - :param interval: The probing interval in seconds. This is the time interval between two - consecutive probes. Acceptable values are from 1 second to 86400 seconds. - :type interval: int - :param timeout: the probe timeout in seconds. Probe marked as failed if valid response is not - received with this timeout period. Acceptable values are from 1 second to 86400 seconds. - :type timeout: int - :param unhealthy_threshold: The probe retry count. Backend server is marked down after - consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second - to 20. - :type unhealthy_threshold: int - :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from - the backend http settings. Default value is false. - :type pick_host_name_from_backend_http_settings: bool - :param min_servers: Minimum number of servers that are always marked healthy. Default value is - 0. - :type min_servers: int - :param match: Criterion for classifying a healthy probe response. - :type match: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayProbeHealthResponseMatch - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'host': {'key': 'properties.host', 'type': 'str'}, - 'path': {'key': 'properties.path', 'type': 'str'}, - 'interval': {'key': 'properties.interval', 'type': 'int'}, - 'timeout': {'key': 'properties.timeout', 'type': 'int'}, - 'unhealthy_threshold': {'key': 'properties.unhealthyThreshold', 'type': 'int'}, - 'pick_host_name_from_backend_http_settings': {'key': 'properties.pickHostNameFromBackendHttpSettings', 'type': 'bool'}, - 'min_servers': {'key': 'properties.minServers', 'type': 'int'}, - 'match': {'key': 'properties.match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, - host: Optional[str] = None, - path: Optional[str] = None, - interval: Optional[int] = None, - timeout: Optional[int] = None, - unhealthy_threshold: Optional[int] = None, - pick_host_name_from_backend_http_settings: Optional[bool] = None, - min_servers: Optional[int] = None, - match: Optional["ApplicationGatewayProbeHealthResponseMatch"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayProbe, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.protocol = protocol - self.host = host - self.path = path - self.interval = interval - self.timeout = timeout - self.unhealthy_threshold = unhealthy_threshold - self.pick_host_name_from_backend_http_settings = pick_host_name_from_backend_http_settings - self.min_servers = min_servers - self.match = match - self.provisioning_state = provisioning_state - - -class ApplicationGatewayProbeHealthResponseMatch(msrest.serialization.Model): - """Application gateway probe health response match. - - :param body: Body that must be contained in the health response. Default value is empty. - :type body: str - :param status_codes: Allowed ranges of healthy status codes. Default range of healthy status - codes is 200-399. - :type status_codes: list[str] - """ - - _attribute_map = { - 'body': {'key': 'body', 'type': 'str'}, - 'status_codes': {'key': 'statusCodes', 'type': '[str]'}, - } - - def __init__( - self, - *, - body: Optional[str] = None, - status_codes: Optional[List[str]] = None, - **kwargs - ): - super(ApplicationGatewayProbeHealthResponseMatch, self).__init__(**kwargs) - self.body = body - self.status_codes = status_codes - - -class ApplicationGatewayRedirectConfiguration(SubResource): - """Redirect configuration of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param redirect_type: Supported http redirection types - Permanent, Temporary, Found, SeeOther. - Possible values include: "Permanent", "Found", "SeeOther", "Temporary". - :type redirect_type: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayRedirectType - :param target_listener: Reference to a listener to redirect the request to. - :type target_listener: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param target_url: Url to redirect the request to. - :type target_url: str - :param include_path: Include path in the redirected url. - :type include_path: bool - :param include_query_string: Include query string in the redirected url. - :type include_query_string: bool - :param request_routing_rules: Request routing specifying redirect configuration. - :type request_routing_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param url_path_maps: Url path maps specifying default redirect configuration. - :type url_path_maps: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param path_rules: Path rules specifying redirect configuration. - :type path_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'redirect_type': {'key': 'properties.redirectType', 'type': 'str'}, - 'target_listener': {'key': 'properties.targetListener', 'type': 'SubResource'}, - 'target_url': {'key': 'properties.targetUrl', 'type': 'str'}, - 'include_path': {'key': 'properties.includePath', 'type': 'bool'}, - 'include_query_string': {'key': 'properties.includeQueryString', 'type': 'bool'}, - 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[SubResource]'}, - 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[SubResource]'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[SubResource]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - redirect_type: Optional[Union[str, "ApplicationGatewayRedirectType"]] = None, - target_listener: Optional["SubResource"] = None, - target_url: Optional[str] = None, - include_path: Optional[bool] = None, - include_query_string: Optional[bool] = None, - request_routing_rules: Optional[List["SubResource"]] = None, - url_path_maps: Optional[List["SubResource"]] = None, - path_rules: Optional[List["SubResource"]] = None, - **kwargs - ): - super(ApplicationGatewayRedirectConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.redirect_type = redirect_type - self.target_listener = target_listener - self.target_url = target_url - self.include_path = include_path - self.include_query_string = include_query_string - self.request_routing_rules = request_routing_rules - self.url_path_maps = url_path_maps - self.path_rules = path_rules - - -class ApplicationGatewayRequestRoutingRule(SubResource): - """Request routing rule of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". - :type rule_type: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayRequestRoutingRuleType - :param backend_address_pool: Backend address pool resource of the application gateway. - :type backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param backend_http_settings: Frontend port resource of the application gateway. - :type backend_http_settings: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param http_listener: Http listener resource of the application gateway. - :type http_listener: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param url_path_map: URL path map resource of the application gateway. - :type url_path_map: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param redirect_configuration: Redirect configuration resource of the application gateway. - :type redirect_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Provisioning state of the request routing rule resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, - 'http_listener': {'key': 'properties.httpListener', 'type': 'SubResource'}, - 'url_path_map': {'key': 'properties.urlPathMap', 'type': 'SubResource'}, - 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - rule_type: Optional[Union[str, "ApplicationGatewayRequestRoutingRuleType"]] = None, - backend_address_pool: Optional["SubResource"] = None, - backend_http_settings: Optional["SubResource"] = None, - http_listener: Optional["SubResource"] = None, - url_path_map: Optional["SubResource"] = None, - redirect_configuration: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayRequestRoutingRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.rule_type = rule_type - self.backend_address_pool = backend_address_pool - self.backend_http_settings = backend_http_settings - self.http_listener = http_listener - self.url_path_map = url_path_map - self.redirect_configuration = redirect_configuration - self.provisioning_state = provisioning_state - - -class ApplicationGatewaySku(msrest.serialization.Model): - """SKU of an application gateway. - - :param name: Name of an application gateway SKU. Possible values include: "Standard_Small", - "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large". - :type name: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySkuName - :param tier: Tier of an application gateway. Possible values include: "Standard", "WAF". - :type tier: str or ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayTier - :param capacity: Capacity (instance count) of an application gateway. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "ApplicationGatewaySkuName"]] = None, - tier: Optional[Union[str, "ApplicationGatewayTier"]] = None, - capacity: Optional[int] = None, - **kwargs - ): - super(ApplicationGatewaySku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - - -class ApplicationGatewaySslCertificate(SubResource): - """SSL certificates of an application gateway. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param data: Base-64 encoded pfx certificate. Only applicable in PUT Request. - :type data: str - :param password: Password for the pfx file specified in data. Only applicable in PUT request. - :type password: str - :param public_cert_data: Base-64 encoded Public cert data corresponding to pfx specified in - data. Only applicable in GET request. - :type public_cert_data: str - :param provisioning_state: Provisioning state of the SSL certificate resource Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'data': {'key': 'properties.data', 'type': 'str'}, - 'password': {'key': 'properties.password', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - data: Optional[str] = None, - password: Optional[str] = None, - public_cert_data: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewaySslCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.data = data - self.password = password - self.public_cert_data = public_cert_data - self.provisioning_state = provisioning_state - - -class ApplicationGatewaySslPolicy(msrest.serialization.Model): - """Application Gateway Ssl policy. - - :param disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. - :type disabled_ssl_protocols: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslProtocol] - :param policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". - :type policy_type: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPolicyType - :param policy_name: Name of Ssl predefined policy. Possible values include: - "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". - :type policy_name: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPolicyName - :param cipher_suites: Ssl cipher suites to be enabled in the specified order to application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'}, - 'policy_type': {'key': 'policyType', 'type': 'str'}, - 'policy_name': {'key': 'policyName', 'type': 'str'}, - 'cipher_suites': {'key': 'cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - disabled_ssl_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, - policy_type: Optional[Union[str, "ApplicationGatewaySslPolicyType"]] = None, - policy_name: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, - cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, - min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, - **kwargs - ): - super(ApplicationGatewaySslPolicy, self).__init__(**kwargs) - self.disabled_ssl_protocols = disabled_ssl_protocols - self.policy_type = policy_type - self.policy_name = policy_name - self.cipher_suites = cipher_suites - self.min_protocol_version = min_protocol_version - - -class ApplicationGatewaySslPredefinedPolicy(SubResource): - """An Ssl predefined policy. - - :param id: Resource ID. - :type id: str - :param name: Name of Ssl predefined policy. - :type name: str - :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application - gateway. - :type cipher_suites: list[str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslCipherSuite] - :param min_protocol_version: Minimum version of Ssl protocol to be supported on application - gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". - :type min_protocol_version: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslProtocol - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, - 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, - min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, - **kwargs - ): - super(ApplicationGatewaySslPredefinedPolicy, self).__init__(id=id, **kwargs) - self.name = name - self.cipher_suites = cipher_suites - self.min_protocol_version = min_protocol_version - - -class ApplicationGatewayUrlPathMap(SubResource): - """UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param type: Type of the resource. - :type type: str - :param default_backend_address_pool: Default backend address pool resource of URL path map. - :type default_backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param default_backend_http_settings: Default backend http settings resource of URL path map. - :type default_backend_http_settings: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param default_redirect_configuration: Default redirect configuration resource of URL path map. - :type default_redirect_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param path_rules: Path rule of URL path map resource. - :type path_rules: list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayPathRule] - :param provisioning_state: Provisioning state of the backend http settings resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'default_backend_address_pool': {'key': 'properties.defaultBackendAddressPool', 'type': 'SubResource'}, - 'default_backend_http_settings': {'key': 'properties.defaultBackendHttpSettings', 'type': 'SubResource'}, - 'default_redirect_configuration': {'key': 'properties.defaultRedirectConfiguration', 'type': 'SubResource'}, - 'path_rules': {'key': 'properties.pathRules', 'type': '[ApplicationGatewayPathRule]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - type: Optional[str] = None, - default_backend_address_pool: Optional["SubResource"] = None, - default_backend_http_settings: Optional["SubResource"] = None, - default_redirect_configuration: Optional["SubResource"] = None, - path_rules: Optional[List["ApplicationGatewayPathRule"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ApplicationGatewayUrlPathMap, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.type = type - self.default_backend_address_pool = default_backend_address_pool - self.default_backend_http_settings = default_backend_http_settings - self.default_redirect_configuration = default_redirect_configuration - self.path_rules = path_rules - self.provisioning_state = provisioning_state - - -class ApplicationGatewayWebApplicationFirewallConfiguration(msrest.serialization.Model): - """Application gateway web application firewall configuration. - - All required parameters must be populated in order to send to Azure. - - :param enabled: Required. Whether the web application firewall is enabled or not. - :type enabled: bool - :param firewall_mode: Required. Web application firewall mode. Possible values include: - "Detection", "Prevention". - :type firewall_mode: str or - ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallMode - :param rule_set_type: Required. The type of the web application firewall rule set. Possible - values are: 'OWASP'. - :type rule_set_type: str - :param rule_set_version: Required. The version of the rule set type. - :type rule_set_version: str - :param disabled_rule_groups: The disabled rule groups. - :type disabled_rule_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayFirewallDisabledRuleGroup] - """ - - _validation = { - 'enabled': {'required': True}, - 'firewall_mode': {'required': True}, - 'rule_set_type': {'required': True}, - 'rule_set_version': {'required': True}, - } - - _attribute_map = { - 'enabled': {'key': 'enabled', 'type': 'bool'}, - 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, - 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, - 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, - 'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'}, - } - - def __init__( - self, - *, - enabled: bool, - firewall_mode: Union[str, "ApplicationGatewayFirewallMode"], - rule_set_type: str, - rule_set_version: str, - disabled_rule_groups: Optional[List["ApplicationGatewayFirewallDisabledRuleGroup"]] = None, - **kwargs - ): - super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs) - self.enabled = enabled - self.firewall_mode = firewall_mode - self.rule_set_type = rule_set_type - self.rule_set_version = rule_set_version - self.disabled_rule_groups = disabled_rule_groups - - -class ApplicationSecurityGroup(Resource): - """An application security group in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar resource_guid: The resource GUID property of the application security group resource. It - uniquely identifies a resource, even if the user changes its name or migrate the resource - across subscriptions or resource groups. - :vartype resource_guid: str - :ivar provisioning_state: The provisioning state of the application security group resource. - Possible values are: 'Succeeded', 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'resource_guid': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(ApplicationSecurityGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = None - self.resource_guid = None - self.provisioning_state = None - - -class ApplicationSecurityGroupListResult(msrest.serialization.Model): - """A list of application security groups. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of application security groups. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ApplicationSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ApplicationSecurityGroup"]] = None, - **kwargs - ): - super(ApplicationSecurityGroupListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class AuthorizationListResult(msrest.serialization.Model): - """Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. - - :param value: The authorizations in an ExpressRoute Circuit. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitAuthorization"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(AuthorizationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Availability(msrest.serialization.Model): - """Availability of the metric. - - :param time_grain: The time grain of the availability. - :type time_grain: str - :param retention: The retention of the availability. - :type retention: str - :param blob_duration: Duration of the availability blob. - :type blob_duration: str - """ - - _attribute_map = { - 'time_grain': {'key': 'timeGrain', 'type': 'str'}, - 'retention': {'key': 'retention', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - *, - time_grain: Optional[str] = None, - retention: Optional[str] = None, - blob_duration: Optional[str] = None, - **kwargs - ): - super(Availability, self).__init__(**kwargs) - self.time_grain = time_grain - self.retention = retention - self.blob_duration = blob_duration - - -class AvailableProvidersList(msrest.serialization.Model): - """List of available countries with details. - - All required parameters must be populated in order to send to Azure. - - :param countries: Required. List of available countries. - :type countries: list[~azure.mgmt.network.v2017_11_01.models.AvailableProvidersListCountry] - """ - - _validation = { - 'countries': {'required': True}, - } - - _attribute_map = { - 'countries': {'key': 'countries', 'type': '[AvailableProvidersListCountry]'}, - } - - def __init__( - self, - *, - countries: List["AvailableProvidersListCountry"], - **kwargs - ): - super(AvailableProvidersList, self).__init__(**kwargs) - self.countries = countries - - -class AvailableProvidersListCity(msrest.serialization.Model): - """City or town details. - - :param city_name: The city or town name. - :type city_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - """ - - _attribute_map = { - 'city_name': {'key': 'cityName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - } - - def __init__( - self, - *, - city_name: Optional[str] = None, - providers: Optional[List[str]] = None, - **kwargs - ): - super(AvailableProvidersListCity, self).__init__(**kwargs) - self.city_name = city_name - self.providers = providers - - -class AvailableProvidersListCountry(msrest.serialization.Model): - """Country details. - - :param country_name: The country name. - :type country_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - :param states: List of available states in the country. - :type states: list[~azure.mgmt.network.v2017_11_01.models.AvailableProvidersListState] - """ - - _attribute_map = { - 'country_name': {'key': 'countryName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'states': {'key': 'states', 'type': '[AvailableProvidersListState]'}, - } - - def __init__( - self, - *, - country_name: Optional[str] = None, - providers: Optional[List[str]] = None, - states: Optional[List["AvailableProvidersListState"]] = None, - **kwargs - ): - super(AvailableProvidersListCountry, self).__init__(**kwargs) - self.country_name = country_name - self.providers = providers - self.states = states - - -class AvailableProvidersListParameters(msrest.serialization.Model): - """Constraints that determine the list of available Internet service providers. - - :param azure_locations: A list of Azure regions. - :type azure_locations: list[str] - :param country: The country for available providers list. - :type country: str - :param state: The state for available providers list. - :type state: str - :param city: The city or town for available providers list. - :type city: str - """ - - _attribute_map = { - 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, - 'country': {'key': 'country', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - } - - def __init__( - self, - *, - azure_locations: Optional[List[str]] = None, - country: Optional[str] = None, - state: Optional[str] = None, - city: Optional[str] = None, - **kwargs - ): - super(AvailableProvidersListParameters, self).__init__(**kwargs) - self.azure_locations = azure_locations - self.country = country - self.state = state - self.city = city - - -class AvailableProvidersListState(msrest.serialization.Model): - """State details. - - :param state_name: The state name. - :type state_name: str - :param providers: A list of Internet service providers. - :type providers: list[str] - :param cities: List of available cities or towns in the state. - :type cities: list[~azure.mgmt.network.v2017_11_01.models.AvailableProvidersListCity] - """ - - _attribute_map = { - 'state_name': {'key': 'stateName', 'type': 'str'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'cities': {'key': 'cities', 'type': '[AvailableProvidersListCity]'}, - } - - def __init__( - self, - *, - state_name: Optional[str] = None, - providers: Optional[List[str]] = None, - cities: Optional[List["AvailableProvidersListCity"]] = None, - **kwargs - ): - super(AvailableProvidersListState, self).__init__(**kwargs) - self.state_name = state_name - self.providers = providers - self.cities = cities - - -class AzureAsyncOperationResult(msrest.serialization.Model): - """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. - - :param status: Status of the Azure async operation. Possible values are: 'InProgress', - 'Succeeded', and 'Failed'. Possible values include: "InProgress", "Succeeded", "Failed". - :type status: str or ~azure.mgmt.network.v2017_11_01.models.NetworkOperationStatus - :param error: - :type error: ~azure.mgmt.network.v2017_11_01.models.Error - """ - - _attribute_map = { - 'status': {'key': 'status', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'Error'}, - } - - def __init__( - self, - *, - status: Optional[Union[str, "NetworkOperationStatus"]] = None, - error: Optional["Error"] = None, - **kwargs - ): - super(AzureAsyncOperationResult, self).__init__(**kwargs) - self.status = status - self.error = error - - -class AzureReachabilityReport(msrest.serialization.Model): - """Azure reachability report details. - - All required parameters must be populated in order to send to Azure. - - :param aggregation_level: Required. The aggregation level of Azure reachability report. Can be - Country, State or City. - :type aggregation_level: str - :param provider_location: Required. Parameters that define a geographic location. - :type provider_location: ~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportLocation - :param reachability_report: Required. List of Azure reachability report items. - :type reachability_report: - list[~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportItem] - """ - - _validation = { - 'aggregation_level': {'required': True}, - 'provider_location': {'required': True}, - 'reachability_report': {'required': True}, - } - - _attribute_map = { - 'aggregation_level': {'key': 'aggregationLevel', 'type': 'str'}, - 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, - 'reachability_report': {'key': 'reachabilityReport', 'type': '[AzureReachabilityReportItem]'}, - } - - def __init__( - self, - *, - aggregation_level: str, - provider_location: "AzureReachabilityReportLocation", - reachability_report: List["AzureReachabilityReportItem"], - **kwargs - ): - super(AzureReachabilityReport, self).__init__(**kwargs) - self.aggregation_level = aggregation_level - self.provider_location = provider_location - self.reachability_report = reachability_report - - -class AzureReachabilityReportItem(msrest.serialization.Model): - """Azure reachability report details for a given provider location. - - :param provider: The Internet service provider. - :type provider: str - :param azure_location: The Azure region. - :type azure_location: str - :param latencies: List of latency details for each of the time series. - :type latencies: - list[~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportLatencyInfo] - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'azure_location': {'key': 'azureLocation', 'type': 'str'}, - 'latencies': {'key': 'latencies', 'type': '[AzureReachabilityReportLatencyInfo]'}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - azure_location: Optional[str] = None, - latencies: Optional[List["AzureReachabilityReportLatencyInfo"]] = None, - **kwargs - ): - super(AzureReachabilityReportItem, self).__init__(**kwargs) - self.provider = provider - self.azure_location = azure_location - self.latencies = latencies - - -class AzureReachabilityReportLatencyInfo(msrest.serialization.Model): - """Details on latency for a time series. - - :param time_stamp: The time stamp. - :type time_stamp: ~datetime.datetime - :param score: The relative latency score between 1 and 100, higher values indicating a faster - connection. - :type score: int - """ - - _validation = { - 'score': {'maximum': 100, 'minimum': 1}, - } - - _attribute_map = { - 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, - 'score': {'key': 'score', 'type': 'int'}, - } - - def __init__( - self, - *, - time_stamp: Optional[datetime.datetime] = None, - score: Optional[int] = None, - **kwargs - ): - super(AzureReachabilityReportLatencyInfo, self).__init__(**kwargs) - self.time_stamp = time_stamp - self.score = score - - -class AzureReachabilityReportLocation(msrest.serialization.Model): - """Parameters that define a geographic location. - - All required parameters must be populated in order to send to Azure. - - :param country: Required. The name of the country. - :type country: str - :param state: The name of the state. - :type state: str - :param city: The name of the city or town. - :type city: str - """ - - _validation = { - 'country': {'required': True}, - } - - _attribute_map = { - 'country': {'key': 'country', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'city': {'key': 'city', 'type': 'str'}, - } - - def __init__( - self, - *, - country: str, - state: Optional[str] = None, - city: Optional[str] = None, - **kwargs - ): - super(AzureReachabilityReportLocation, self).__init__(**kwargs) - self.country = country - self.state = state - self.city = city - - -class AzureReachabilityReportParameters(msrest.serialization.Model): - """Geographic and time constraints for Azure reachability report. - - All required parameters must be populated in order to send to Azure. - - :param provider_location: Required. Parameters that define a geographic location. - :type provider_location: ~azure.mgmt.network.v2017_11_01.models.AzureReachabilityReportLocation - :param providers: List of Internet service providers. - :type providers: list[str] - :param azure_locations: Optional Azure regions to scope the query to. - :type azure_locations: list[str] - :param start_time: Required. The start time for the Azure reachability report. - :type start_time: ~datetime.datetime - :param end_time: Required. The end time for the Azure reachability report. - :type end_time: ~datetime.datetime - """ - - _validation = { - 'provider_location': {'required': True}, - 'start_time': {'required': True}, - 'end_time': {'required': True}, - } - - _attribute_map = { - 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, - 'providers': {'key': 'providers', 'type': '[str]'}, - 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - } - - def __init__( - self, - *, - provider_location: "AzureReachabilityReportLocation", - start_time: datetime.datetime, - end_time: datetime.datetime, - providers: Optional[List[str]] = None, - azure_locations: Optional[List[str]] = None, - **kwargs - ): - super(AzureReachabilityReportParameters, self).__init__(**kwargs) - self.provider_location = provider_location - self.providers = providers - self.azure_locations = azure_locations - self.start_time = start_time - self.end_time = end_time - - -class BackendAddressPool(SubResource): - """Pool of backend IP addresses. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar backend_ip_configurations: Gets collection of references to IP addresses defined in - network interfaces. - :vartype backend_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration] - :ivar load_balancing_rules: Gets load balancing rules that use this backend address pool. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :ivar outbound_nat_rule: Gets outbound rules that use this backend address pool. - :vartype outbound_nat_rule: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Get provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configurations': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - 'outbound_nat_rule': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'outbound_nat_rule': {'key': 'properties.outboundNatRule', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(BackendAddressPool, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.backend_ip_configurations = None - self.load_balancing_rules = None - self.outbound_nat_rule = None - self.provisioning_state = provisioning_state - - -class BGPCommunity(msrest.serialization.Model): - """Contains bgp community information offered in Service Community resources. - - :param service_supported_region: The region which the service support. e.g. For O365, region is - Global. - :type service_supported_region: str - :param community_name: The name of the bgp community. e.g. Skype. - :type community_name: str - :param community_value: The value of the bgp community. For more information: - https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. - :type community_value: str - :param community_prefixes: The prefixes that the bgp community contains. - :type community_prefixes: list[str] - :param is_authorized_to_use: Customer is authorized to use bgp community or not. - :type is_authorized_to_use: bool - :param service_group: The service group of the bgp community contains. - :type service_group: str - """ - - _attribute_map = { - 'service_supported_region': {'key': 'serviceSupportedRegion', 'type': 'str'}, - 'community_name': {'key': 'communityName', 'type': 'str'}, - 'community_value': {'key': 'communityValue', 'type': 'str'}, - 'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'}, - 'is_authorized_to_use': {'key': 'isAuthorizedToUse', 'type': 'bool'}, - 'service_group': {'key': 'serviceGroup', 'type': 'str'}, - } - - def __init__( - self, - *, - service_supported_region: Optional[str] = None, - community_name: Optional[str] = None, - community_value: Optional[str] = None, - community_prefixes: Optional[List[str]] = None, - is_authorized_to_use: Optional[bool] = None, - service_group: Optional[str] = None, - **kwargs - ): - super(BGPCommunity, self).__init__(**kwargs) - self.service_supported_region = service_supported_region - self.community_name = community_name - self.community_value = community_value - self.community_prefixes = community_prefixes - self.is_authorized_to_use = is_authorized_to_use - self.service_group = service_group - - -class BgpPeerStatus(msrest.serialization.Model): - """BGP peer status details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The virtual network gateway's local address. - :vartype local_address: str - :ivar neighbor: The remote BGP peer. - :vartype neighbor: str - :ivar asn: The autonomous system number of the remote BGP peer. - :vartype asn: int - :ivar state: The BGP peer state. Possible values include: "Unknown", "Stopped", "Idle", - "Connecting", "Connected". - :vartype state: str or ~azure.mgmt.network.v2017_11_01.models.BgpPeerState - :ivar connected_duration: For how long the peering has been up. - :vartype connected_duration: str - :ivar routes_received: The number of routes learned from this peer. - :vartype routes_received: long - :ivar messages_sent: The number of BGP messages sent. - :vartype messages_sent: long - :ivar messages_received: The number of BGP messages received. - :vartype messages_received: long - """ - - _validation = { - 'local_address': {'readonly': True}, - 'neighbor': {'readonly': True}, - 'asn': {'readonly': True}, - 'state': {'readonly': True}, - 'connected_duration': {'readonly': True}, - 'routes_received': {'readonly': True}, - 'messages_sent': {'readonly': True}, - 'messages_received': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'asn': {'key': 'asn', 'type': 'int'}, - 'state': {'key': 'state', 'type': 'str'}, - 'connected_duration': {'key': 'connectedDuration', 'type': 'str'}, - 'routes_received': {'key': 'routesReceived', 'type': 'long'}, - 'messages_sent': {'key': 'messagesSent', 'type': 'long'}, - 'messages_received': {'key': 'messagesReceived', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(BgpPeerStatus, self).__init__(**kwargs) - self.local_address = None - self.neighbor = None - self.asn = None - self.state = None - self.connected_duration = None - self.routes_received = None - self.messages_sent = None - self.messages_received = None - - -class BgpPeerStatusListResult(msrest.serialization.Model): - """Response for list BGP peer status API service call. - - :param value: List of BGP peers. - :type value: list[~azure.mgmt.network.v2017_11_01.models.BgpPeerStatus] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, - } - - def __init__( - self, - *, - value: Optional[List["BgpPeerStatus"]] = None, - **kwargs - ): - super(BgpPeerStatusListResult, self).__init__(**kwargs) - self.value = value - - -class BgpServiceCommunity(Resource): - """Service Community Properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param service_name: The name of the bgp community. e.g. Skype. - :type service_name: str - :param bgp_communities: Get a list of bgp communities. - :type bgp_communities: list[~azure.mgmt.network.v2017_11_01.models.BGPCommunity] - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, - 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': '[BGPCommunity]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - service_name: Optional[str] = None, - bgp_communities: Optional[List["BGPCommunity"]] = None, - **kwargs - ): - super(BgpServiceCommunity, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.service_name = service_name - self.bgp_communities = bgp_communities - - -class BgpServiceCommunityListResult(msrest.serialization.Model): - """Response for the ListServiceCommunity API service call. - - :param value: A list of service community resources. - :type value: list[~azure.mgmt.network.v2017_11_01.models.BgpServiceCommunity] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["BgpServiceCommunity"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(BgpServiceCommunityListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class BgpSettings(msrest.serialization.Model): - """BGP settings details. - - :param asn: The BGP speaker's ASN. - :type asn: long - :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. - :type bgp_peering_address: str - :param peer_weight: The weight added to routes learned from this BGP speaker. - :type peer_weight: int - """ - - _attribute_map = { - 'asn': {'key': 'asn', 'type': 'long'}, - 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, - 'peer_weight': {'key': 'peerWeight', 'type': 'int'}, - } - - def __init__( - self, - *, - asn: Optional[int] = None, - bgp_peering_address: Optional[str] = None, - peer_weight: Optional[int] = None, - **kwargs - ): - super(BgpSettings, self).__init__(**kwargs) - self.asn = asn - self.bgp_peering_address = bgp_peering_address - self.peer_weight = peer_weight - - -class ConnectionMonitor(msrest.serialization.Model): - """Parameters that define the operation to create a connection monitor. - - All required parameters must be populated in order to send to Azure. - - :param location: Connection monitor location. - :type location: str - :param tags: A set of tags. Connection monitor tags. - :type tags: dict[str, str] - :param source: Required. Describes the source of connection monitor. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorSource - :param destination: Required. Describes the destination of connection monitor. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorDestination - :param auto_start: Determines if the connection monitor will start automatically once created. - :type auto_start: bool - :param monitoring_interval_in_seconds: Monitoring interval in seconds. - :type monitoring_interval_in_seconds: int - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, - 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, - 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, - 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, - } - - def __init__( - self, - *, - source: "ConnectionMonitorSource", - destination: "ConnectionMonitorDestination", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - auto_start: Optional[bool] = True, - monitoring_interval_in_seconds: Optional[int] = 60, - **kwargs - ): - super(ConnectionMonitor, self).__init__(**kwargs) - self.location = location - self.tags = tags - self.source = source - self.destination = destination - self.auto_start = auto_start - self.monitoring_interval_in_seconds = monitoring_interval_in_seconds - - -class ConnectionMonitorDestination(msrest.serialization.Model): - """Describes the destination of connection monitor. - - :param resource_id: The ID of the resource used as the destination by connection monitor. - :type resource_id: str - :param address: Address of the connection monitor destination (IP or domain name). - :type address: str - :param port: The destination port used by connection monitor. - :type port: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - resource_id: Optional[str] = None, - address: Optional[str] = None, - port: Optional[int] = None, - **kwargs - ): - super(ConnectionMonitorDestination, self).__init__(**kwargs) - self.resource_id = resource_id - self.address = address - self.port = port - - -class ConnectionMonitorListResult(msrest.serialization.Model): - """List of connection monitors. - - :param value: Information about connection monitors. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorResult] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ConnectionMonitorResult]'}, - } - - def __init__( - self, - *, - value: Optional[List["ConnectionMonitorResult"]] = None, - **kwargs - ): - super(ConnectionMonitorListResult, self).__init__(**kwargs) - self.value = value - - -class ConnectionMonitorParameters(msrest.serialization.Model): - """Parameters that define the operation to create a connection monitor. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Describes the source of connection monitor. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorSource - :param destination: Required. Describes the destination of connection monitor. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorDestination - :param auto_start: Determines if the connection monitor will start automatically once created. - :type auto_start: bool - :param monitoring_interval_in_seconds: Monitoring interval in seconds. - :type monitoring_interval_in_seconds: int - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, - 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, - 'auto_start': {'key': 'autoStart', 'type': 'bool'}, - 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, - } - - def __init__( - self, - *, - source: "ConnectionMonitorSource", - destination: "ConnectionMonitorDestination", - auto_start: Optional[bool] = True, - monitoring_interval_in_seconds: Optional[int] = 60, - **kwargs - ): - super(ConnectionMonitorParameters, self).__init__(**kwargs) - self.source = source - self.destination = destination - self.auto_start = auto_start - self.monitoring_interval_in_seconds = monitoring_interval_in_seconds - - -class ConnectionMonitorQueryResult(msrest.serialization.Model): - """List of connection states snapshots. - - :param states: Information about connection states. - :type states: list[~azure.mgmt.network.v2017_11_01.models.ConnectionStateSnapshot] - """ - - _attribute_map = { - 'states': {'key': 'states', 'type': '[ConnectionStateSnapshot]'}, - } - - def __init__( - self, - *, - states: Optional[List["ConnectionStateSnapshot"]] = None, - **kwargs - ): - super(ConnectionMonitorQueryResult, self).__init__(**kwargs) - self.states = states - - -class ConnectionMonitorResult(msrest.serialization.Model): - """Information about the connection monitor. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the connection monitor. - :vartype name: str - :ivar id: ID of the connection monitor. - :vartype id: str - :param etag: - :type etag: str - :ivar type: Connection monitor type. - :vartype type: str - :param location: Connection monitor location. - :type location: str - :param tags: A set of tags. Connection monitor tags. - :type tags: dict[str, str] - :param source: Describes the source of connection monitor. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorSource - :param destination: Describes the destination of connection monitor. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorDestination - :param auto_start: Determines if the connection monitor will start automatically once created. - :type auto_start: bool - :param monitoring_interval_in_seconds: Monitoring interval in seconds. - :type monitoring_interval_in_seconds: int - :param provisioning_state: The provisioning state of the connection monitor. Possible values - include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - :param start_time: The date and time when the connection monitor was started. - :type start_time: ~datetime.datetime - :param monitoring_status: The monitoring status of the connection monitor. - :type monitoring_status: str - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, - 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, - 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, - 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, - } - - def __init__( - self, - *, - etag: Optional[str] = "A unique read-only string that changes whenever the resource is updated.", - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - source: Optional["ConnectionMonitorSource"] = None, - destination: Optional["ConnectionMonitorDestination"] = None, - auto_start: Optional[bool] = True, - monitoring_interval_in_seconds: Optional[int] = 60, - provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, - start_time: Optional[datetime.datetime] = None, - monitoring_status: Optional[str] = None, - **kwargs - ): - super(ConnectionMonitorResult, self).__init__(**kwargs) - self.name = None - self.id = None - self.etag = etag - self.type = None - self.location = location - self.tags = tags - self.source = source - self.destination = destination - self.auto_start = auto_start - self.monitoring_interval_in_seconds = monitoring_interval_in_seconds - self.provisioning_state = provisioning_state - self.start_time = start_time - self.monitoring_status = monitoring_status - - -class ConnectionMonitorResultProperties(ConnectionMonitorParameters): - """Describes the properties of a connection monitor. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Describes the source of connection monitor. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorSource - :param destination: Required. Describes the destination of connection monitor. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorDestination - :param auto_start: Determines if the connection monitor will start automatically once created. - :type auto_start: bool - :param monitoring_interval_in_seconds: Monitoring interval in seconds. - :type monitoring_interval_in_seconds: int - :param provisioning_state: The provisioning state of the connection monitor. Possible values - include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - :param start_time: The date and time when the connection monitor was started. - :type start_time: ~datetime.datetime - :param monitoring_status: The monitoring status of the connection monitor. - :type monitoring_status: str - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, - 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, - 'auto_start': {'key': 'autoStart', 'type': 'bool'}, - 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'monitoring_status': {'key': 'monitoringStatus', 'type': 'str'}, - } - - def __init__( - self, - *, - source: "ConnectionMonitorSource", - destination: "ConnectionMonitorDestination", - auto_start: Optional[bool] = True, - monitoring_interval_in_seconds: Optional[int] = 60, - provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, - start_time: Optional[datetime.datetime] = None, - monitoring_status: Optional[str] = None, - **kwargs - ): - super(ConnectionMonitorResultProperties, self).__init__(source=source, destination=destination, auto_start=auto_start, monitoring_interval_in_seconds=monitoring_interval_in_seconds, **kwargs) - self.provisioning_state = provisioning_state - self.start_time = start_time - self.monitoring_status = monitoring_status - - -class ConnectionMonitorSource(msrest.serialization.Model): - """Describes the source of connection monitor. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The ID of the resource used as the source by connection monitor. - :type resource_id: str - :param port: The source port used by connection monitor. - :type port: int - """ - - _validation = { - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - resource_id: str, - port: Optional[int] = None, - **kwargs - ): - super(ConnectionMonitorSource, self).__init__(**kwargs) - self.resource_id = resource_id - self.port = port - - -class ConnectionResetSharedKey(msrest.serialization.Model): - """The virtual network connection reset shared key. - - All required parameters must be populated in order to send to Azure. - - :param key_length: Required. The virtual network connection reset shared key length, should - between 1 and 128. - :type key_length: int - """ - - _validation = { - 'key_length': {'required': True, 'maximum': 128, 'minimum': 1}, - } - - _attribute_map = { - 'key_length': {'key': 'keyLength', 'type': 'int'}, - } - - def __init__( - self, - *, - key_length: int, - **kwargs - ): - super(ConnectionResetSharedKey, self).__init__(**kwargs) - self.key_length = key_length - - -class ConnectionSharedKey(msrest.serialization.Model): - """Response for GetConnectionSharedKey API service call. - - All required parameters must be populated in order to send to Azure. - - :param value: Required. The virtual network connection shared key value. - :type value: str - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - *, - value: str, - **kwargs - ): - super(ConnectionSharedKey, self).__init__(**kwargs) - self.value = value - - -class ConnectionStateSnapshot(msrest.serialization.Model): - """Connection state snapshot. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param connection_state: The connection state. Possible values include: "Reachable", - "Unreachable", "Unknown". - :type connection_state: str or ~azure.mgmt.network.v2017_11_01.models.ConnectionState - :param start_time: The start time of the connection snapshot. - :type start_time: ~datetime.datetime - :param end_time: The end time of the connection snapshot. - :type end_time: ~datetime.datetime - :param evaluation_state: Connectivity analysis evaluation state. Possible values include: - "NotStarted", "InProgress", "Completed". - :type evaluation_state: str or ~azure.mgmt.network.v2017_11_01.models.EvaluationState - :ivar hops: List of hops between the source and the destination. - :vartype hops: list[~azure.mgmt.network.v2017_11_01.models.ConnectivityHop] - """ - - _validation = { - 'hops': {'readonly': True}, - } - - _attribute_map = { - 'connection_state': {'key': 'connectionState', 'type': 'str'}, - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'evaluation_state': {'key': 'evaluationState', 'type': 'str'}, - 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, - } - - def __init__( - self, - *, - connection_state: Optional[Union[str, "ConnectionState"]] = None, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - evaluation_state: Optional[Union[str, "EvaluationState"]] = None, - **kwargs - ): - super(ConnectionStateSnapshot, self).__init__(**kwargs) - self.connection_state = connection_state - self.start_time = start_time - self.end_time = end_time - self.evaluation_state = evaluation_state - self.hops = None - - -class ConnectivityDestination(msrest.serialization.Model): - """Parameters that define destination of connection. - - :param resource_id: The ID of the resource to which a connection attempt will be made. - :type resource_id: str - :param address: The IP address or URI the resource to which a connection attempt will be made. - :type address: str - :param port: Port on which check connectivity will be performed. - :type port: int - """ - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - resource_id: Optional[str] = None, - address: Optional[str] = None, - port: Optional[int] = None, - **kwargs - ): - super(ConnectivityDestination, self).__init__(**kwargs) - self.resource_id = resource_id - self.address = address - self.port = port - - -class ConnectivityHop(msrest.serialization.Model): - """Information about a hop between the source and the destination. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar type: The type of the hop. - :vartype type: str - :ivar id: The ID of the hop. - :vartype id: str - :ivar address: The IP address of the hop. - :vartype address: str - :ivar resource_id: The ID of the resource corresponding to this hop. - :vartype resource_id: str - :ivar next_hop_ids: List of next hop identifiers. - :vartype next_hop_ids: list[str] - :ivar issues: List of issues. - :vartype issues: list[~azure.mgmt.network.v2017_11_01.models.ConnectivityIssue] - """ - - _validation = { - 'type': {'readonly': True}, - 'id': {'readonly': True}, - 'address': {'readonly': True}, - 'resource_id': {'readonly': True}, - 'next_hop_ids': {'readonly': True}, - 'issues': {'readonly': True}, - } - - _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'address': {'key': 'address', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, - 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityHop, self).__init__(**kwargs) - self.type = None - self.id = None - self.address = None - self.resource_id = None - self.next_hop_ids = None - self.issues = None - - -class ConnectivityInformation(msrest.serialization.Model): - """Information on the connectivity status. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar hops: List of hops between the source and the destination. - :vartype hops: list[~azure.mgmt.network.v2017_11_01.models.ConnectivityHop] - :ivar connection_status: The connection status. Possible values include: "Unknown", - "Connected", "Disconnected", "Degraded". - :vartype connection_status: str or ~azure.mgmt.network.v2017_11_01.models.ConnectionStatus - :ivar avg_latency_in_ms: Average latency in milliseconds. - :vartype avg_latency_in_ms: int - :ivar min_latency_in_ms: Minimum latency in milliseconds. - :vartype min_latency_in_ms: int - :ivar max_latency_in_ms: Maximum latency in milliseconds. - :vartype max_latency_in_ms: int - :ivar probes_sent: Total number of probes sent. - :vartype probes_sent: int - :ivar probes_failed: Number of failed probes. - :vartype probes_failed: int - """ - - _validation = { - 'hops': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'avg_latency_in_ms': {'readonly': True}, - 'min_latency_in_ms': {'readonly': True}, - 'max_latency_in_ms': {'readonly': True}, - 'probes_sent': {'readonly': True}, - 'probes_failed': {'readonly': True}, - } - - _attribute_map = { - 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'int'}, - 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'int'}, - 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'int'}, - 'probes_sent': {'key': 'probesSent', 'type': 'int'}, - 'probes_failed': {'key': 'probesFailed', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityInformation, self).__init__(**kwargs) - self.hops = None - self.connection_status = None - self.avg_latency_in_ms = None - self.min_latency_in_ms = None - self.max_latency_in_ms = None - self.probes_sent = None - self.probes_failed = None - - -class ConnectivityIssue(msrest.serialization.Model): - """Information about an issue encountered in the process of checking for connectivity. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". - :vartype origin: str or ~azure.mgmt.network.v2017_11_01.models.Origin - :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". - :vartype severity: str or ~azure.mgmt.network.v2017_11_01.models.Severity - :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", - "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", - "PortThrottled", "Platform". - :vartype type: str or ~azure.mgmt.network.v2017_11_01.models.IssueType - :ivar context: Provides additional context on the issue. - :vartype context: list[dict[str, str]] - """ - - _validation = { - 'origin': {'readonly': True}, - 'severity': {'readonly': True}, - 'type': {'readonly': True}, - 'context': {'readonly': True}, - } - - _attribute_map = { - 'origin': {'key': 'origin', 'type': 'str'}, - 'severity': {'key': 'severity', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'context': {'key': 'context', 'type': '[{str}]'}, - } - - def __init__( - self, - **kwargs - ): - super(ConnectivityIssue, self).__init__(**kwargs) - self.origin = None - self.severity = None - self.type = None - self.context = None - - -class ConnectivityParameters(msrest.serialization.Model): - """Parameters that determine how the connectivity check will be performed. - - All required parameters must be populated in order to send to Azure. - - :param source: Required. Parameters that define the source of the connection. - :type source: ~azure.mgmt.network.v2017_11_01.models.ConnectivitySource - :param destination: Required. Parameters that define destination of connection. - :type destination: ~azure.mgmt.network.v2017_11_01.models.ConnectivityDestination - """ - - _validation = { - 'source': {'required': True}, - 'destination': {'required': True}, - } - - _attribute_map = { - 'source': {'key': 'source', 'type': 'ConnectivitySource'}, - 'destination': {'key': 'destination', 'type': 'ConnectivityDestination'}, - } - - def __init__( - self, - *, - source: "ConnectivitySource", - destination: "ConnectivityDestination", - **kwargs - ): - super(ConnectivityParameters, self).__init__(**kwargs) - self.source = source - self.destination = destination - - -class ConnectivitySource(msrest.serialization.Model): - """Parameters that define the source of the connection. - - All required parameters must be populated in order to send to Azure. - - :param resource_id: Required. The ID of the resource from which a connectivity check will be - initiated. - :type resource_id: str - :param port: The source port from which a connectivity check will be performed. - :type port: int - """ - - _validation = { - 'resource_id': {'required': True}, - } - - _attribute_map = { - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'port': {'key': 'port', 'type': 'int'}, - } - - def __init__( - self, - *, - resource_id: str, - port: Optional[int] = None, - **kwargs - ): - super(ConnectivitySource, self).__init__(**kwargs) - self.resource_id = resource_id - self.port = port - - -class DhcpOptions(msrest.serialization.Model): - """DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. - - :param dns_servers: The list of DNS servers IP addresses. - :type dns_servers: list[str] - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - } - - def __init__( - self, - *, - dns_servers: Optional[List[str]] = None, - **kwargs - ): - super(DhcpOptions, self).__init__(**kwargs) - self.dns_servers = dns_servers - - -class Dimension(msrest.serialization.Model): - """Dimension of the metric. - - :param name: The name of the dimension. - :type name: str - :param display_name: The display name of the dimension. - :type display_name: str - :param internal_name: The internal name of the dimension. - :type internal_name: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'internal_name': {'key': 'internalName', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - internal_name: Optional[str] = None, - **kwargs - ): - super(Dimension, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.internal_name = internal_name - - -class DnsNameAvailabilityResult(msrest.serialization.Model): - """Response for the CheckDnsNameAvailability API service call. - - :param available: Domain availability (True/False). - :type available: bool - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - } - - def __init__( - self, - *, - available: Optional[bool] = None, - **kwargs - ): - super(DnsNameAvailabilityResult, self).__init__(**kwargs) - self.available = available - - -class EffectiveNetworkSecurityGroup(msrest.serialization.Model): - """Effective network security group. - - :param network_security_group: The ID of network security group that is applied. - :type network_security_group: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param association: Associated resources. - :type association: - ~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityGroupAssociation - :param effective_security_rules: A collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityRule] - :param tag_map: Mapping of tags to list of IP Addresses included within the tag. - :type tag_map: str - """ - - _attribute_map = { - 'network_security_group': {'key': 'networkSecurityGroup', 'type': 'SubResource'}, - 'association': {'key': 'association', 'type': 'EffectiveNetworkSecurityGroupAssociation'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - 'tag_map': {'key': 'tagMap', 'type': 'str'}, - } - - def __init__( - self, - *, - network_security_group: Optional["SubResource"] = None, - association: Optional["EffectiveNetworkSecurityGroupAssociation"] = None, - effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, - tag_map: Optional[str] = None, - **kwargs - ): - super(EffectiveNetworkSecurityGroup, self).__init__(**kwargs) - self.network_security_group = network_security_group - self.association = association - self.effective_security_rules = effective_security_rules - self.tag_map = tag_map - - -class EffectiveNetworkSecurityGroupAssociation(msrest.serialization.Model): - """The effective network security group association. - - :param subnet: The ID of the subnet if assigned. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param network_interface: The ID of the network interface if assigned. - :type network_interface: ~azure.mgmt.network.v2017_11_01.models.SubResource - """ - - _attribute_map = { - 'subnet': {'key': 'subnet', 'type': 'SubResource'}, - 'network_interface': {'key': 'networkInterface', 'type': 'SubResource'}, - } - - def __init__( - self, - *, - subnet: Optional["SubResource"] = None, - network_interface: Optional["SubResource"] = None, - **kwargs - ): - super(EffectiveNetworkSecurityGroupAssociation, self).__init__(**kwargs) - self.subnet = subnet - self.network_interface = network_interface - - -class EffectiveNetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for list effective network security groups API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective network security groups. - :type value: list[~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityGroup] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["EffectiveNetworkSecurityGroup"]] = None, - **kwargs - ): - super(EffectiveNetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class EffectiveNetworkSecurityRule(msrest.serialization.Model): - """Effective network security rules. - - :param name: The name of the security rule specified by the user (if created by the user). - :type name: str - :param protocol: The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', - and 'All'. Possible values include: "Tcp", "Udp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.EffectiveSecurityRuleProtocol - :param source_port_range: The source port or range. - :type source_port_range: str - :param destination_port_range: The destination port or range. - :type destination_port_range: str - :param source_port_ranges: The source port ranges. Expected values include a single integer - between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. Expected values include a single - integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). - :type destination_port_ranges: list[str] - :param source_address_prefix: The source address prefix. - :type source_address_prefix: str - :param destination_address_prefix: The destination address prefix. - :type destination_address_prefix: str - :param source_address_prefixes: The source address prefixes. Expected values include CIDR IP - ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the - asterisk (*). - :type source_address_prefixes: list[str] - :param destination_address_prefixes: The destination address prefixes. Expected values include - CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and - the asterisk (*). - :type destination_address_prefixes: list[str] - :param expanded_source_address_prefix: The expanded source address prefix. - :type expanded_source_address_prefix: list[str] - :param expanded_destination_address_prefix: Expanded destination address prefix. - :type expanded_destination_address_prefix: list[str] - :param access: Whether network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleAccess - :param priority: The priority of the rule. - :type priority: int - :param direction: The direction of the rule. Possible values are: 'Inbound and Outbound'. - Possible values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleDirection - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, - 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[str]'}, - 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, - 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'sourceAddressPrefixes', 'type': '[str]'}, - 'destination_address_prefixes': {'key': 'destinationAddressPrefixes', 'type': '[str]'}, - 'expanded_source_address_prefix': {'key': 'expandedSourceAddressPrefix', 'type': '[str]'}, - 'expanded_destination_address_prefix': {'key': 'expandedDestinationAddressPrefix', 'type': '[str]'}, - 'access': {'key': 'access', 'type': 'str'}, - 'priority': {'key': 'priority', 'type': 'int'}, - 'direction': {'key': 'direction', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - protocol: Optional[Union[str, "EffectiveSecurityRuleProtocol"]] = None, - source_port_range: Optional[str] = None, - destination_port_range: Optional[str] = None, - source_port_ranges: Optional[List[str]] = None, - destination_port_ranges: Optional[List[str]] = None, - source_address_prefix: Optional[str] = None, - destination_address_prefix: Optional[str] = None, - source_address_prefixes: Optional[List[str]] = None, - destination_address_prefixes: Optional[List[str]] = None, - expanded_source_address_prefix: Optional[List[str]] = None, - expanded_destination_address_prefix: Optional[List[str]] = None, - access: Optional[Union[str, "SecurityRuleAccess"]] = None, - priority: Optional[int] = None, - direction: Optional[Union[str, "SecurityRuleDirection"]] = None, - **kwargs - ): - super(EffectiveNetworkSecurityRule, self).__init__(**kwargs) - self.name = name - self.protocol = protocol - self.source_port_range = source_port_range - self.destination_port_range = destination_port_range - self.source_port_ranges = source_port_ranges - self.destination_port_ranges = destination_port_ranges - self.source_address_prefix = source_address_prefix - self.destination_address_prefix = destination_address_prefix - self.source_address_prefixes = source_address_prefixes - self.destination_address_prefixes = destination_address_prefixes - self.expanded_source_address_prefix = expanded_source_address_prefix - self.expanded_destination_address_prefix = expanded_destination_address_prefix - self.access = access - self.priority = priority - self.direction = direction - - -class EffectiveRoute(msrest.serialization.Model): - """Effective Route. - - :param name: The name of the user defined route. This is optional. - :type name: str - :param source: Who created the route. Possible values are: 'Unknown', 'User', - 'VirtualNetworkGateway', and 'Default'. Possible values include: "Unknown", "User", - "VirtualNetworkGateway", "Default". - :type source: str or ~azure.mgmt.network.v2017_11_01.models.EffectiveRouteSource - :param state: The value of effective route. Possible values are: 'Active' and 'Invalid'. - Possible values include: "Active", "Invalid". - :type state: str or ~azure.mgmt.network.v2017_11_01.models.EffectiveRouteState - :param address_prefix: The address prefixes of the effective routes in CIDR notation. - :type address_prefix: list[str] - :param next_hop_ip_address: The IP address of the next hop of the effective route. - :type next_hop_ip_address: list[str] - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_11_01.models.RouteNextHopType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'source': {'key': 'source', 'type': 'str'}, - 'state': {'key': 'state', 'type': 'str'}, - 'address_prefix': {'key': 'addressPrefix', 'type': '[str]'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': '[str]'}, - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - source: Optional[Union[str, "EffectiveRouteSource"]] = None, - state: Optional[Union[str, "EffectiveRouteState"]] = None, - address_prefix: Optional[List[str]] = None, - next_hop_ip_address: Optional[List[str]] = None, - next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, - **kwargs - ): - super(EffectiveRoute, self).__init__(**kwargs) - self.name = name - self.source = source - self.state = state - self.address_prefix = address_prefix - self.next_hop_ip_address = next_hop_ip_address - self.next_hop_type = next_hop_type - - -class EffectiveRouteListResult(msrest.serialization.Model): - """Response for list effective route API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of effective routes. - :type value: list[~azure.mgmt.network.v2017_11_01.models.EffectiveRoute] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EffectiveRoute]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["EffectiveRoute"]] = None, - **kwargs - ): - super(EffectiveRouteListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class EndpointServiceResult(SubResource): - """Endpoint service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Name of the endpoint service. - :vartype name: str - :ivar type: Type of the endpoint service. - :vartype type: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - **kwargs - ): - super(EndpointServiceResult, self).__init__(id=id, **kwargs) - self.name = None - self.type = None - - -class EndpointServicesListResult(msrest.serialization.Model): - """Response for the ListAvailableEndpointServices API service call. - - :param value: List of available endpoint services in a region. - :type value: list[~azure.mgmt.network.v2017_11_01.models.EndpointServiceResult] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[EndpointServiceResult]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["EndpointServiceResult"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(EndpointServicesListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class Error(msrest.serialization.Model): - """Error. - - :param code: - :type code: str - :param message: - :type message: str - :param target: - :type target: str - :param details: - :type details: list[~azure.mgmt.network.v2017_11_01.models.ErrorDetails] - :param inner_error: - :type inner_error: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetails]'}, - 'inner_error': {'key': 'innerError', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - message: Optional[str] = None, - target: Optional[str] = None, - details: Optional[List["ErrorDetails"]] = None, - inner_error: Optional[str] = None, - **kwargs - ): - super(Error, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.details = details - self.inner_error = inner_error - - -class ErrorDetails(msrest.serialization.Model): - """ErrorDetails. - - :param code: - :type code: str - :param target: - :type target: str - :param message: - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Optional[str] = None, - target: Optional[str] = None, - message: Optional[str] = None, - **kwargs - ): - super(ErrorDetails, self).__init__(**kwargs) - self.code = code - self.target = target - self.message = message - - -class ExpressRouteCircuit(Resource): - """ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The SKU. - :type sku: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitSku - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param allow_classic_operations: Allow classic operations. - :type allow_classic_operations: bool - :param circuit_provisioning_state: The CircuitProvisioningState state of the resource. - :type circuit_provisioning_state: str - :param service_provider_provisioning_state: The ServiceProviderProvisioningState state of the - resource. Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned', and - 'Deprovisioning'. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", - "Deprovisioning". - :type service_provider_provisioning_state: str or - ~azure.mgmt.network.v2017_11_01.models.ServiceProviderProvisioningState - :param authorizations: The list of authorizations. - :type authorizations: - list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization] - :param peerings: The list of peerings. - :type peerings: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] - :param service_key: The ServiceKey. - :type service_key: str - :param service_provider_notes: The ServiceProviderNotes. - :type service_provider_notes: str - :param service_provider_properties: The ServiceProviderProperties. - :type service_provider_properties: - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitServiceProviderProperties - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'ExpressRouteCircuitSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_classic_operations': {'key': 'properties.allowClassicOperations', 'type': 'bool'}, - 'circuit_provisioning_state': {'key': 'properties.circuitProvisioningState', 'type': 'str'}, - 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, - 'authorizations': {'key': 'properties.authorizations', 'type': '[ExpressRouteCircuitAuthorization]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, - 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, - 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["ExpressRouteCircuitSku"] = None, - allow_classic_operations: Optional[bool] = None, - circuit_provisioning_state: Optional[str] = None, - service_provider_provisioning_state: Optional[Union[str, "ServiceProviderProvisioningState"]] = None, - authorizations: Optional[List["ExpressRouteCircuitAuthorization"]] = None, - peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, - service_key: Optional[str] = None, - service_provider_notes: Optional[str] = None, - service_provider_properties: Optional["ExpressRouteCircuitServiceProviderProperties"] = None, - provisioning_state: Optional[str] = None, - gateway_manager_etag: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuit, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.sku = sku - self.etag = None - self.allow_classic_operations = allow_classic_operations - self.circuit_provisioning_state = circuit_provisioning_state - self.service_provider_provisioning_state = service_provider_provisioning_state - self.authorizations = authorizations - self.peerings = peerings - self.service_key = service_key - self.service_provider_notes = service_provider_notes - self.service_provider_properties = service_provider_properties - self.provisioning_state = provisioning_state - self.gateway_manager_etag = gateway_manager_etag - - -class ExpressRouteCircuitArpTable(msrest.serialization.Model): - """The ARP table associated with the ExpressRouteCircuit. - - :param age: Age. - :type age: int - :param interface: Interface. - :type interface: str - :param ip_address: The IP address. - :type ip_address: str - :param mac_address: The MAC address. - :type mac_address: str - """ - - _attribute_map = { - 'age': {'key': 'age', 'type': 'int'}, - 'interface': {'key': 'interface', 'type': 'str'}, - 'ip_address': {'key': 'ipAddress', 'type': 'str'}, - 'mac_address': {'key': 'macAddress', 'type': 'str'}, - } - - def __init__( - self, - *, - age: Optional[int] = None, - interface: Optional[str] = None, - ip_address: Optional[str] = None, - mac_address: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitArpTable, self).__init__(**kwargs) - self.age = age - self.interface = interface - self.ip_address = ip_address - self.mac_address = mac_address - - -class ExpressRouteCircuitAuthorization(SubResource): - """Authorization in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param authorization_key: The authorization key. - :type authorization_key: str - :param authorization_use_status: AuthorizationUseStatus. Possible values are: 'Available' and - 'InUse'. Possible values include: "Available", "InUse". - :type authorization_use_status: str or - ~azure.mgmt.network.v2017_11_01.models.AuthorizationUseStatus - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - authorization_key: Optional[str] = None, - authorization_use_status: Optional[Union[str, "AuthorizationUseStatus"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitAuthorization, self).__init__(id=id, **kwargs) - self.name = name - self.etag = None - self.authorization_key = authorization_key - self.authorization_use_status = authorization_use_status - self.provisioning_state = provisioning_state - - -class ExpressRouteCircuitListResult(msrest.serialization.Model): - """Response for ListExpressRouteCircuit API service call. - - :param value: A list of ExpressRouteCircuits in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuit] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuit]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuit"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitPeering(SubResource): - """Peering in an ExpressRouteCircuit resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param peering_type: The PeeringType. Possible values are: 'AzurePublicPeering', - 'AzurePrivatePeering', and 'MicrosoftPeering'. Possible values include: "AzurePublicPeering", - "AzurePrivatePeering", "MicrosoftPeering". - :type peering_type: str or - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringType - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringState - :param azure_asn: The Azure ASN. - :type azure_asn: int - :param peer_asn: The peer ASN. - :type peer_asn: long - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param primary_azure_port: The primary port. - :type primary_azure_port: str - :param secondary_azure_port: The secondary port. - :type secondary_azure_port: str - :param shared_key: The shared key. - :type shared_key: str - :param vlan_id: The VLAN ID. - :type vlan_id: int - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringConfig - :param stats: Gets peering stats. - :type stats: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitStats - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param gateway_manager_etag: The GatewayManager Etag. - :type gateway_manager_etag: str - :param last_modified_by: Gets whether the provider or the customer last modified the peering. - :type last_modified_by: str - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_11_01.models.RouteFilter - :param ipv6_peering_config: The IPv6 peering configuration. - :type ipv6_peering_config: - ~azure.mgmt.network.v2017_11_01.models.Ipv6ExpressRouteCircuitPeeringConfig - """ - - _validation = { - 'etag': {'readonly': True}, - 'peer_asn': {'maximum': 4294967295, 'minimum': 1}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, - 'peer_asn': {'key': 'properties.peerASN', 'type': 'long'}, - 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, - 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, - 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, - 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'stats': {'key': 'properties.stats', 'type': 'ExpressRouteCircuitStats'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, - 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, - 'route_filter': {'key': 'properties.routeFilter', 'type': 'RouteFilter'}, - 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - peering_type: Optional[Union[str, "ExpressRouteCircuitPeeringType"]] = None, - state: Optional[Union[str, "ExpressRouteCircuitPeeringState"]] = None, - azure_asn: Optional[int] = None, - peer_asn: Optional[int] = None, - primary_peer_address_prefix: Optional[str] = None, - secondary_peer_address_prefix: Optional[str] = None, - primary_azure_port: Optional[str] = None, - secondary_azure_port: Optional[str] = None, - shared_key: Optional[str] = None, - vlan_id: Optional[int] = None, - microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, - stats: Optional["ExpressRouteCircuitStats"] = None, - provisioning_state: Optional[str] = None, - gateway_manager_etag: Optional[str] = None, - last_modified_by: Optional[str] = None, - route_filter: Optional["RouteFilter"] = None, - ipv6_peering_config: Optional["Ipv6ExpressRouteCircuitPeeringConfig"] = None, - **kwargs - ): - super(ExpressRouteCircuitPeering, self).__init__(id=id, **kwargs) - self.name = name - self.etag = None - self.peering_type = peering_type - self.state = state - self.azure_asn = azure_asn - self.peer_asn = peer_asn - self.primary_peer_address_prefix = primary_peer_address_prefix - self.secondary_peer_address_prefix = secondary_peer_address_prefix - self.primary_azure_port = primary_azure_port - self.secondary_azure_port = secondary_azure_port - self.shared_key = shared_key - self.vlan_id = vlan_id - self.microsoft_peering_config = microsoft_peering_config - self.stats = stats - self.provisioning_state = provisioning_state - self.gateway_manager_etag = gateway_manager_etag - self.last_modified_by = last_modified_by - self.route_filter = route_filter - self.ipv6_peering_config = ipv6_peering_config - - -class ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Specifies the peering configuration. - - :param advertised_public_prefixes: The reference of AdvertisedPublicPrefixes. - :type advertised_public_prefixes: list[str] - :param advertised_communities: The communities of bgp peering. Specified for microsoft peering. - :type advertised_communities: list[str] - :param advertised_public_prefixes_state: AdvertisedPublicPrefixState of the Peering resource. - Possible values are 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. - Possible values include: "NotConfigured", "Configuring", "Configured", "ValidationNeeded". - :type advertised_public_prefixes_state: str or - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState - :param legacy_mode: The legacy mode of the peering. - :type legacy_mode: int - :param customer_asn: The CustomerASN of the peering. - :type customer_asn: int - :param routing_registry_name: The RoutingRegistryName of the configuration. - :type routing_registry_name: str - """ - - _attribute_map = { - 'advertised_public_prefixes': {'key': 'advertisedPublicPrefixes', 'type': '[str]'}, - 'advertised_communities': {'key': 'advertisedCommunities', 'type': '[str]'}, - 'advertised_public_prefixes_state': {'key': 'advertisedPublicPrefixesState', 'type': 'str'}, - 'legacy_mode': {'key': 'legacyMode', 'type': 'int'}, - 'customer_asn': {'key': 'customerASN', 'type': 'int'}, - 'routing_registry_name': {'key': 'routingRegistryName', 'type': 'str'}, - } - - def __init__( - self, - *, - advertised_public_prefixes: Optional[List[str]] = None, - advertised_communities: Optional[List[str]] = None, - advertised_public_prefixes_state: Optional[Union[str, "ExpressRouteCircuitPeeringAdvertisedPublicPrefixState"]] = None, - legacy_mode: Optional[int] = None, - customer_asn: Optional[int] = None, - routing_registry_name: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.advertised_public_prefixes = advertised_public_prefixes - self.advertised_communities = advertised_communities - self.advertised_public_prefixes_state = advertised_public_prefixes_state - self.legacy_mode = legacy_mode - self.customer_asn = customer_asn - self.routing_registry_name = routing_registry_name - - -class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): - """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. - - :param value: The peerings in an express route circuit. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitPeering"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitPeeringListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitRoutesTable(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param network: network. - :type network: str - :param next_hop: nextHop. - :type next_hop: str - :param loc_prf: locPrf. - :type loc_prf: str - :param weight: weight. - :type weight: int - :param path: path. - :type path: str - """ - - _attribute_map = { - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'loc_prf': {'key': 'locPrf', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - 'path': {'key': 'path', 'type': 'str'}, - } - - def __init__( - self, - *, - network: Optional[str] = None, - next_hop: Optional[str] = None, - loc_prf: Optional[str] = None, - weight: Optional[int] = None, - path: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitRoutesTable, self).__init__(**kwargs) - self.network = network - self.next_hop = next_hop - self.loc_prf = loc_prf - self.weight = weight - self.path = path - - -class ExpressRouteCircuitRoutesTableSummary(msrest.serialization.Model): - """The routes table associated with the ExpressRouteCircuit. - - :param neighbor: Neighbor. - :type neighbor: str - :param v: BGP version number spoken to the neighbor. - :type v: int - :param as_property: Autonomous system number. - :type as_property: int - :param up_down: The length of time that the BGP session has been in the Established state, or - the current status if not in the Established state. - :type up_down: str - :param state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have - been received from a neighbor or peer group. - :type state_pfx_rcd: str - """ - - _attribute_map = { - 'neighbor': {'key': 'neighbor', 'type': 'str'}, - 'v': {'key': 'v', 'type': 'int'}, - 'as_property': {'key': 'as', 'type': 'int'}, - 'up_down': {'key': 'upDown', 'type': 'str'}, - 'state_pfx_rcd': {'key': 'statePfxRcd', 'type': 'str'}, - } - - def __init__( - self, - *, - neighbor: Optional[str] = None, - v: Optional[int] = None, - as_property: Optional[int] = None, - up_down: Optional[str] = None, - state_pfx_rcd: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitRoutesTableSummary, self).__init__(**kwargs) - self.neighbor = neighbor - self.v = v - self.as_property = as_property - self.up_down = up_down - self.state_pfx_rcd = state_pfx_rcd - - -class ExpressRouteCircuitsArpTableListResult(msrest.serialization.Model): - """Response for ListArpTable associated with the Express Route Circuits API. - - :param value: Gets list of the ARP table. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitArpTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitArpTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitArpTable"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitsArpTableListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitServiceProviderProperties(msrest.serialization.Model): - """Contains ServiceProviderProperties in an ExpressRouteCircuit. - - :param service_provider_name: The serviceProviderName. - :type service_provider_name: str - :param peering_location: The peering location. - :type peering_location: str - :param bandwidth_in_mbps: The BandwidthInMbps. - :type bandwidth_in_mbps: int - """ - - _attribute_map = { - 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, - 'peering_location': {'key': 'peeringLocation', 'type': 'str'}, - 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, - } - - def __init__( - self, - *, - service_provider_name: Optional[str] = None, - peering_location: Optional[str] = None, - bandwidth_in_mbps: Optional[int] = None, - **kwargs - ): - super(ExpressRouteCircuitServiceProviderProperties, self).__init__(**kwargs) - self.service_provider_name = service_provider_name - self.peering_location = peering_location - self.bandwidth_in_mbps = bandwidth_in_mbps - - -class ExpressRouteCircuitSku(msrest.serialization.Model): - """Contains SKU in an ExpressRouteCircuit. - - :param name: The name of the SKU. - :type name: str - :param tier: The tier of the SKU. Possible values are 'Standard' and 'Premium'. Possible values - include: "Standard", "Premium". - :type tier: str or ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitSkuTier - :param family: The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. - Possible values include: "UnlimitedData", "MeteredData". - :type family: str or ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitSkuFamily - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'family': {'key': 'family', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - tier: Optional[Union[str, "ExpressRouteCircuitSkuTier"]] = None, - family: Optional[Union[str, "ExpressRouteCircuitSkuFamily"]] = None, - **kwargs - ): - super(ExpressRouteCircuitSku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.family = family - - -class ExpressRouteCircuitsRoutesTableListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: The list of routes table. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitRoutesTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitRoutesTable"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitsRoutesTableSummaryListResult(msrest.serialization.Model): - """Response for ListRoutesTable associated with the Express Route Circuits API. - - :param value: A list of the routes table. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitRoutesTableSummary] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteCircuitRoutesTableSummary"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteCircuitsRoutesTableSummaryListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ExpressRouteCircuitStats(msrest.serialization.Model): - """Contains stats associated with the peering. - - :param primarybytes_in: Gets BytesIn of the peering. - :type primarybytes_in: long - :param primarybytes_out: Gets BytesOut of the peering. - :type primarybytes_out: long - :param secondarybytes_in: Gets BytesIn of the peering. - :type secondarybytes_in: long - :param secondarybytes_out: Gets BytesOut of the peering. - :type secondarybytes_out: long - """ - - _attribute_map = { - 'primarybytes_in': {'key': 'primarybytesIn', 'type': 'long'}, - 'primarybytes_out': {'key': 'primarybytesOut', 'type': 'long'}, - 'secondarybytes_in': {'key': 'secondarybytesIn', 'type': 'long'}, - 'secondarybytes_out': {'key': 'secondarybytesOut', 'type': 'long'}, - } - - def __init__( - self, - *, - primarybytes_in: Optional[int] = None, - primarybytes_out: Optional[int] = None, - secondarybytes_in: Optional[int] = None, - secondarybytes_out: Optional[int] = None, - **kwargs - ): - super(ExpressRouteCircuitStats, self).__init__(**kwargs) - self.primarybytes_in = primarybytes_in - self.primarybytes_out = primarybytes_out - self.secondarybytes_in = secondarybytes_in - self.secondarybytes_out = secondarybytes_out - - -class ExpressRouteServiceProvider(Resource): - """A ExpressRouteResourceProvider object. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param peering_locations: Get a list of peering locations. - :type peering_locations: list[str] - :param bandwidths_offered: Gets bandwidths offered. - :type bandwidths_offered: - list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteServiceProviderBandwidthsOffered] - :param provisioning_state: Gets the provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, - 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - peering_locations: Optional[List[str]] = None, - bandwidths_offered: Optional[List["ExpressRouteServiceProviderBandwidthsOffered"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ExpressRouteServiceProvider, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.peering_locations = peering_locations - self.bandwidths_offered = bandwidths_offered - self.provisioning_state = provisioning_state - - -class ExpressRouteServiceProviderBandwidthsOffered(msrest.serialization.Model): - """Contains bandwidths offered in ExpressRouteServiceProvider resources. - - :param offer_name: The OfferName. - :type offer_name: str - :param value_in_mbps: The ValueInMbps. - :type value_in_mbps: int - """ - - _attribute_map = { - 'offer_name': {'key': 'offerName', 'type': 'str'}, - 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, - } - - def __init__( - self, - *, - offer_name: Optional[str] = None, - value_in_mbps: Optional[int] = None, - **kwargs - ): - super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs) - self.offer_name = offer_name - self.value_in_mbps = value_in_mbps - - -class ExpressRouteServiceProviderListResult(msrest.serialization.Model): - """Response for the ListExpressRouteServiceProvider API service call. - - :param value: A list of ExpressRouteResourceProvider resources. - :type value: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteServiceProvider] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["ExpressRouteServiceProvider"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(ExpressRouteServiceProviderListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class FlowLogInformation(msrest.serialization.Model): - """Information on the configuration of flow log. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the resource to configure for flow logging. - :type target_resource_id: str - :param storage_id: Required. ID of the storage account which is used to store the flow log. - :type storage_id: str - :param enabled: Required. Flag to enable/disable flow logging. - :type enabled: bool - :param retention_policy: Parameters that define the retention policy for flow log. - :type retention_policy: ~azure.mgmt.network.v2017_11_01.models.RetentionPolicyParameters - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'enabled': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, - } - - def __init__( - self, - *, - target_resource_id: str, - storage_id: str, - enabled: bool, - retention_policy: Optional["RetentionPolicyParameters"] = None, - **kwargs - ): - super(FlowLogInformation, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.storage_id = storage_id - self.enabled = enabled - self.retention_policy = retention_policy - - -class FlowLogStatusParameters(msrest.serialization.Model): - """Parameters that define a resource to query flow log status. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource where getting the flow logging status. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - **kwargs - ): - super(FlowLogStatusParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - - -class FrontendIPConfiguration(SubResource): - """Frontend IP address of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :ivar inbound_nat_rules: Read only. Inbound rules URIs that use this frontend IP. - :vartype inbound_nat_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :ivar inbound_nat_pools: Read only. Inbound pools URIs that use this frontend IP. - :vartype inbound_nat_pools: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :ivar outbound_nat_rules: Read only. Outbound rules URIs that use this frontend IP. - :vartype outbound_nat_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :ivar load_balancing_rules: Gets load balancing rules URIs that use this frontend IP. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The Private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.Subnet - :param public_ip_address: The reference of the Public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'inbound_nat_rules': {'readonly': True}, - 'inbound_nat_pools': {'readonly': True}, - 'outbound_nat_rules': {'readonly': True}, - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[SubResource]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[SubResource]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - zones: Optional[List[str]] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["Subnet"] = None, - public_ip_address: Optional["PublicIPAddress"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(FrontendIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.zones = zones - self.inbound_nat_rules = None - self.inbound_nat_pools = None - self.outbound_nat_rules = None - self.load_balancing_rules = None - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class GatewayRoute(msrest.serialization.Model): - """Gateway routing details. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar local_address: The gateway's local address. - :vartype local_address: str - :ivar network: The route's network prefix. - :vartype network: str - :ivar next_hop: The route's next hop. - :vartype next_hop: str - :ivar source_peer: The peer this route was learned from. - :vartype source_peer: str - :ivar origin: The source this route was learned from. - :vartype origin: str - :ivar as_path: The route's AS path sequence. - :vartype as_path: str - :ivar weight: The route's weight. - :vartype weight: int - """ - - _validation = { - 'local_address': {'readonly': True}, - 'network': {'readonly': True}, - 'next_hop': {'readonly': True}, - 'source_peer': {'readonly': True}, - 'origin': {'readonly': True}, - 'as_path': {'readonly': True}, - 'weight': {'readonly': True}, - } - - _attribute_map = { - 'local_address': {'key': 'localAddress', 'type': 'str'}, - 'network': {'key': 'network', 'type': 'str'}, - 'next_hop': {'key': 'nextHop', 'type': 'str'}, - 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'as_path': {'key': 'asPath', 'type': 'str'}, - 'weight': {'key': 'weight', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(GatewayRoute, self).__init__(**kwargs) - self.local_address = None - self.network = None - self.next_hop = None - self.source_peer = None - self.origin = None - self.as_path = None - self.weight = None - - -class GatewayRouteListResult(msrest.serialization.Model): - """List of virtual network gateway routes. - - :param value: List of gateway routes. - :type value: list[~azure.mgmt.network.v2017_11_01.models.GatewayRoute] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[GatewayRoute]'}, - } - - def __init__( - self, - *, - value: Optional[List["GatewayRoute"]] = None, - **kwargs - ): - super(GatewayRouteListResult, self).__init__(**kwargs) - self.value = value - - -class InboundNatPool(SubResource): - """Inbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.TransportProtocol - :param frontend_port_range_start: The first port number in the range of external ports that - will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values - range between 1 and 65534. - :type frontend_port_range_start: int - :param frontend_port_range_end: The last port number in the range of external ports that will - be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range - between 1 and 65535. - :type frontend_port_range_end: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 1 and 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, - 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - protocol: Optional[Union[str, "TransportProtocol"]] = None, - frontend_port_range_start: Optional[int] = None, - frontend_port_range_end: Optional[int] = None, - backend_port: Optional[int] = None, - idle_timeout_in_minutes: Optional[int] = None, - enable_floating_ip: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(InboundNatPool, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.frontend_ip_configuration = frontend_ip_configuration - self.protocol = protocol - self.frontend_port_range_start = frontend_port_range_start - self.frontend_port_range_end = frontend_port_range_end - self.backend_port = backend_port - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.enable_floating_ip = enable_floating_ip - self.provisioning_state = provisioning_state - - -class InboundNatRule(SubResource): - """Inbound NAT rule of the load balancer. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :ivar backend_ip_configuration: A reference to a private IP address defined on a network - interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations - is forwarded to the backend IP. - :vartype backend_ip_configuration: - ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.TransportProtocol - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values range from 1 to 65534. - :type frontend_port: int - :param backend_port: The port used for the internal endpoint. Acceptable values range from 1 to - 65535. - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'backend_ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_ip_configuration': {'key': 'properties.backendIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - protocol: Optional[Union[str, "TransportProtocol"]] = None, - frontend_port: Optional[int] = None, - backend_port: Optional[int] = None, - idle_timeout_in_minutes: Optional[int] = None, - enable_floating_ip: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(InboundNatRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.frontend_ip_configuration = frontend_ip_configuration - self.backend_ip_configuration = None - self.protocol = protocol - self.frontend_port = frontend_port - self.backend_port = backend_port - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.enable_floating_ip = enable_floating_ip - self.provisioning_state = provisioning_state - - -class InboundNatRuleListResult(msrest.serialization.Model): - """Response for ListInboundNatRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of inbound nat rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.InboundNatRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[InboundNatRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["InboundNatRule"]] = None, - **kwargs - ): - super(InboundNatRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class IPAddressAvailabilityResult(msrest.serialization.Model): - """Response for CheckIPAddressAvailability API service call. - - :param available: Private IP address availability. - :type available: bool - :param available_ip_addresses: Contains other available private IP addresses if the asked for - address is taken. - :type available_ip_addresses: list[str] - """ - - _attribute_map = { - 'available': {'key': 'available', 'type': 'bool'}, - 'available_ip_addresses': {'key': 'availableIPAddresses', 'type': '[str]'}, - } - - def __init__( - self, - *, - available: Optional[bool] = None, - available_ip_addresses: Optional[List[str]] = None, - **kwargs - ): - super(IPAddressAvailabilityResult, self).__init__(**kwargs) - self.available = available - self.available_ip_addresses = available_ip_addresses - - -class IPConfiguration(SubResource): - """IP configuration. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_address: The private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.Subnet - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["Subnet"] = None, - public_ip_address: Optional["PublicIPAddress"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(IPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = provisioning_state - - -class IpsecPolicy(msrest.serialization.Model): - """An IPSec Policy configuration for a virtual network gateway connection. - - All required parameters must be populated in order to send to Azure. - - :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. - :type sa_life_time_seconds: int - :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode - or Phase 2 SA) payload size in KB for a site to site VPN tunnel. - :type sa_data_size_kilobytes: int - :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible - values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", - "GCMAES256". - :type ipsec_encryption: str or ~azure.mgmt.network.v2017_11_01.models.IpsecEncryption - :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values - include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". - :type ipsec_integrity: str or ~azure.mgmt.network.v2017_11_01.models.IpsecIntegrity - :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values - include: "DES", "DES3", "AES128", "AES192", "AES256". - :type ike_encryption: str or ~azure.mgmt.network.v2017_11_01.models.IkeEncryption - :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values - include: "MD5", "SHA1", "SHA256", "SHA384". - :type ike_integrity: str or ~azure.mgmt.network.v2017_11_01.models.IkeIntegrity - :param dh_group: Required. The DH Groups used in IKE Phase 1 for initial SA. Possible values - include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", - "DHGroup24". - :type dh_group: str or ~azure.mgmt.network.v2017_11_01.models.DhGroup - :param pfs_group: Required. The DH Groups used in IKE Phase 2 for new child SA. Possible values - include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24". - :type pfs_group: str or ~azure.mgmt.network.v2017_11_01.models.PfsGroup - """ - - _validation = { - 'sa_life_time_seconds': {'required': True}, - 'sa_data_size_kilobytes': {'required': True}, - 'ipsec_encryption': {'required': True}, - 'ipsec_integrity': {'required': True}, - 'ike_encryption': {'required': True}, - 'ike_integrity': {'required': True}, - 'dh_group': {'required': True}, - 'pfs_group': {'required': True}, - } - - _attribute_map = { - 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, - 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, - 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, - 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, - 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, - 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, - 'dh_group': {'key': 'dhGroup', 'type': 'str'}, - 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, - } - - def __init__( - self, - *, - sa_life_time_seconds: int, - sa_data_size_kilobytes: int, - ipsec_encryption: Union[str, "IpsecEncryption"], - ipsec_integrity: Union[str, "IpsecIntegrity"], - ike_encryption: Union[str, "IkeEncryption"], - ike_integrity: Union[str, "IkeIntegrity"], - dh_group: Union[str, "DhGroup"], - pfs_group: Union[str, "PfsGroup"], - **kwargs - ): - super(IpsecPolicy, self).__init__(**kwargs) - self.sa_life_time_seconds = sa_life_time_seconds - self.sa_data_size_kilobytes = sa_data_size_kilobytes - self.ipsec_encryption = ipsec_encryption - self.ipsec_integrity = ipsec_integrity - self.ike_encryption = ike_encryption - self.ike_integrity = ike_integrity - self.dh_group = dh_group - self.pfs_group = pfs_group - - -class IpTag(msrest.serialization.Model): - """Contains the IpTag associated with the public IP address. - - :param ip_tag_type: Gets or sets the ipTag type: Example FirstPartyUsage. - :type ip_tag_type: str - :param tag: Gets or sets value of the IpTag associated with the public IP. Example SQL, Storage - etc. - :type tag: str - """ - - _attribute_map = { - 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, - 'tag': {'key': 'tag', 'type': 'str'}, - } - - def __init__( - self, - *, - ip_tag_type: Optional[str] = None, - tag: Optional[str] = None, - **kwargs - ): - super(IpTag, self).__init__(**kwargs) - self.ip_tag_type = ip_tag_type - self.tag = tag - - -class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): - """Contains IPv6 peering config. - - :param primary_peer_address_prefix: The primary address prefix. - :type primary_peer_address_prefix: str - :param secondary_peer_address_prefix: The secondary address prefix. - :type secondary_peer_address_prefix: str - :param microsoft_peering_config: The Microsoft peering configuration. - :type microsoft_peering_config: - ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringConfig - :param route_filter: The reference of the RouteFilter resource. - :type route_filter: ~azure.mgmt.network.v2017_11_01.models.RouteFilter - :param state: The state of peering. Possible values are: 'Disabled' and 'Enabled'. Possible - values include: "Disabled", "Enabled". - :type state: str or ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringState - """ - - _attribute_map = { - 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, - 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, - 'microsoft_peering_config': {'key': 'microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, - 'route_filter': {'key': 'routeFilter', 'type': 'RouteFilter'}, - 'state': {'key': 'state', 'type': 'str'}, - } - - def __init__( - self, - *, - primary_peer_address_prefix: Optional[str] = None, - secondary_peer_address_prefix: Optional[str] = None, - microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, - route_filter: Optional["RouteFilter"] = None, - state: Optional[Union[str, "ExpressRouteCircuitPeeringState"]] = None, - **kwargs - ): - super(Ipv6ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) - self.primary_peer_address_prefix = primary_peer_address_prefix - self.secondary_peer_address_prefix = secondary_peer_address_prefix - self.microsoft_peering_config = microsoft_peering_config - self.route_filter = route_filter - self.state = state - - -class LoadBalancer(Resource): - """LoadBalancer resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The load balancer SKU. - :type sku: ~azure.mgmt.network.v2017_11_01.models.LoadBalancerSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configurations: Object representing the frontend IPs to be used for the load - balancer. - :type frontend_ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.FrontendIPConfiguration] - :param backend_address_pools: Collection of backend address pools used by a load balancer. - :type backend_address_pools: list[~azure.mgmt.network.v2017_11_01.models.BackendAddressPool] - :param load_balancing_rules: Object collection representing the load balancing rules Gets the - provisioning. - :type load_balancing_rules: list[~azure.mgmt.network.v2017_11_01.models.LoadBalancingRule] - :param probes: Collection of probe objects used in the load balancer. - :type probes: list[~azure.mgmt.network.v2017_11_01.models.Probe] - :param inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining - inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT - pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are - associated with individual virtual machines cannot reference an Inbound NAT pool. They have to - reference individual inbound NAT rules. - :type inbound_nat_rules: list[~azure.mgmt.network.v2017_11_01.models.InboundNatRule] - :param inbound_nat_pools: Defines an external port range for inbound NAT to a single backend - port on NICs associated with a load balancer. Inbound NAT rules are created automatically for - each NIC associated with the Load Balancer using an external port from this range. Defining an - Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound Nat rules. - Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with - individual virtual machines cannot reference an inbound NAT pool. They have to reference - individual inbound NAT rules. - :type inbound_nat_pools: list[~azure.mgmt.network.v2017_11_01.models.InboundNatPool] - :param outbound_nat_rules: The outbound NAT rules. - :type outbound_nat_rules: list[~azure.mgmt.network.v2017_11_01.models.OutboundNatRule] - :param resource_guid: The resource GUID property of the load balancer resource. - :type resource_guid: str - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'LoadBalancerSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[FrontendIPConfiguration]'}, - 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'probes': {'key': 'properties.probes', 'type': '[Probe]'}, - 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[InboundNatRule]'}, - 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[InboundNatPool]'}, - 'outbound_nat_rules': {'key': 'properties.outboundNatRules', 'type': '[OutboundNatRule]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["LoadBalancerSku"] = None, - etag: Optional[str] = None, - frontend_ip_configurations: Optional[List["FrontendIPConfiguration"]] = None, - backend_address_pools: Optional[List["BackendAddressPool"]] = None, - load_balancing_rules: Optional[List["LoadBalancingRule"]] = None, - probes: Optional[List["Probe"]] = None, - inbound_nat_rules: Optional[List["InboundNatRule"]] = None, - inbound_nat_pools: Optional[List["InboundNatPool"]] = None, - outbound_nat_rules: Optional[List["OutboundNatRule"]] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(LoadBalancer, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.sku = sku - self.etag = etag - self.frontend_ip_configurations = frontend_ip_configurations - self.backend_address_pools = backend_address_pools - self.load_balancing_rules = load_balancing_rules - self.probes = probes - self.inbound_nat_rules = inbound_nat_rules - self.inbound_nat_pools = inbound_nat_pools - self.outbound_nat_rules = outbound_nat_rules - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class LoadBalancerBackendAddressPoolListResult(msrest.serialization.Model): - """Response for ListBackendAddressPool API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of backend address pools in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.BackendAddressPool] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[BackendAddressPool]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["BackendAddressPool"]] = None, - **kwargs - ): - super(LoadBalancerBackendAddressPoolListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): - """Response for ListFrontendIPConfiguration API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of frontend IP configurations in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.FrontendIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["FrontendIPConfiguration"]] = None, - **kwargs - ): - super(LoadBalancerFrontendIPConfigurationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerListResult(msrest.serialization.Model): - """Response for ListLoadBalancers API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LoadBalancer"]] = None, - **kwargs - ): - super(LoadBalancerListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerLoadBalancingRuleListResult(msrest.serialization.Model): - """Response for ListLoadBalancingRule API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancing rules in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.LoadBalancingRule] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancingRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LoadBalancingRule"]] = None, - **kwargs - ): - super(LoadBalancerLoadBalancingRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerProbeListResult(msrest.serialization.Model): - """Response for ListProbe API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of probes in a load balancer. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Probe] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Probe]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Probe"]] = None, - **kwargs - ): - super(LoadBalancerProbeListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LoadBalancerSku(msrest.serialization.Model): - """SKU of a load balancer. - - :param name: Name of a load balancer SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_11_01.models.LoadBalancerSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "LoadBalancerSkuName"]] = None, - **kwargs - ): - super(LoadBalancerSku, self).__init__(**kwargs) - self.name = name - - -class LoadBalancingRule(SubResource): - """A load balancing rule for a load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param frontend_ip_configuration: A reference to frontend IP addresses. - :type frontend_ip_configuration: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param probe: The reference of the load balancer probe used by the load balancing rule. - :type probe: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param protocol: The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or - 'All.'. Possible values include: "Udp", "Tcp", "All". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.TransportProtocol - :param load_distribution: The load distribution policy for this rule. Possible values are - 'Default', 'SourceIP', and 'SourceIPProtocol'. Possible values include: "Default", "SourceIP", - "SourceIPProtocol". - :type load_distribution: str or ~azure.mgmt.network.v2017_11_01.models.LoadDistribution - :param frontend_port: The port for the external endpoint. Port numbers for each rule must be - unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 - enables "Any Port". - :type frontend_port: int - :param backend_port: The port used for internal connections on the endpoint. Acceptable values - are between 0 and 65535. Note that value 0 enables "Any Port". - :type backend_port: int - :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set - between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the - protocol is set to TCP. - :type idle_timeout_in_minutes: int - :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP - capability required to configure a SQL AlwaysOn Availability Group. This setting is required - when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed - after you create the endpoint. - :type enable_floating_ip: bool - :param disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the - publicIP address specified in the frontend of the load balancing rule. - :type disable_outbound_snat: bool - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'load_distribution': {'key': 'properties.loadDistribution', 'type': 'str'}, - 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, - 'disable_outbound_snat': {'key': 'properties.disableOutboundSnat', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - frontend_ip_configuration: Optional["SubResource"] = None, - backend_address_pool: Optional["SubResource"] = None, - probe: Optional["SubResource"] = None, - protocol: Optional[Union[str, "TransportProtocol"]] = None, - load_distribution: Optional[Union[str, "LoadDistribution"]] = None, - frontend_port: Optional[int] = None, - backend_port: Optional[int] = None, - idle_timeout_in_minutes: Optional[int] = None, - enable_floating_ip: Optional[bool] = None, - disable_outbound_snat: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(LoadBalancingRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.frontend_ip_configuration = frontend_ip_configuration - self.backend_address_pool = backend_address_pool - self.probe = probe - self.protocol = protocol - self.load_distribution = load_distribution - self.frontend_port = frontend_port - self.backend_port = backend_port - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.enable_floating_ip = enable_floating_ip - self.disable_outbound_snat = disable_outbound_snat - self.provisioning_state = provisioning_state - - -class LocalNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param local_network_address_space: Local network site address space. - :type local_network_address_space: ~azure.mgmt.network.v2017_11_01.models.AddressSpace - :param gateway_ip_address: IP address of local network gateway. - :type gateway_ip_address: str - :param bgp_settings: Local network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_11_01.models.BgpSettings - :param resource_guid: The resource GUID property of the LocalNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the LocalNetworkGateway resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'local_network_address_space': {'key': 'properties.localNetworkAddressSpace', 'type': 'AddressSpace'}, - 'gateway_ip_address': {'key': 'properties.gatewayIpAddress', 'type': 'str'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - local_network_address_space: Optional["AddressSpace"] = None, - gateway_ip_address: Optional[str] = None, - bgp_settings: Optional["BgpSettings"] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(LocalNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.local_network_address_space = local_network_address_space - self.gateway_ip_address = gateway_ip_address - self.bgp_settings = bgp_settings - self.resource_guid = resource_guid - self.provisioning_state = None - - -class LocalNetworkGatewayListResult(msrest.serialization.Model): - """Response for ListLocalNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of local network gateways that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LocalNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LocalNetworkGateway"]] = None, - **kwargs - ): - super(LocalNetworkGatewayListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class LogSpecification(msrest.serialization.Model): - """Description of logging specification. - - :param name: The name of the specification. - :type name: str - :param display_name: The display name of the specification. - :type display_name: str - :param blob_duration: Duration of the blob. - :type blob_duration: str - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - blob_duration: Optional[str] = None, - **kwargs - ): - super(LogSpecification, self).__init__(**kwargs) - self.name = name - self.display_name = display_name - self.blob_duration = blob_duration - - -class MetricSpecification(msrest.serialization.Model): - """Description of metrics specification. - - :param name: The name of the metric. - :type name: str - :param display_name: The display name of the metric. - :type display_name: str - :param display_description: The description of the metric. - :type display_description: str - :param unit: Units the metric to be displayed in. - :type unit: str - :param aggregation_type: The aggregation type. - :type aggregation_type: str - :param availabilities: List of availability. - :type availabilities: list[~azure.mgmt.network.v2017_11_01.models.Availability] - :param enable_regional_mdm_account: Whether regional MDM account enabled. - :type enable_regional_mdm_account: bool - :param fill_gap_with_zero: Whether gaps would be filled with zeros. - :type fill_gap_with_zero: bool - :param metric_filter_pattern: Pattern for the filter of the metric. - :type metric_filter_pattern: str - :param dimensions: List of dimensions. - :type dimensions: list[~azure.mgmt.network.v2017_11_01.models.Dimension] - :param is_internal: Whether the metric is internal. - :type is_internal: bool - :param source_mdm_account: The source MDM account. - :type source_mdm_account: str - :param source_mdm_namespace: The source MDM namespace. - :type source_mdm_namespace: str - :param resource_id_dimension_name_override: The resource Id dimension name override. - :type resource_id_dimension_name_override: str - """ - - _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'}, - 'availabilities': {'key': 'availabilities', 'type': '[Availability]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, - 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, - 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, - 'is_internal': {'key': 'isInternal', 'type': 'bool'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display_name: Optional[str] = None, - display_description: Optional[str] = None, - unit: Optional[str] = None, - aggregation_type: Optional[str] = None, - availabilities: Optional[List["Availability"]] = None, - enable_regional_mdm_account: Optional[bool] = None, - fill_gap_with_zero: Optional[bool] = None, - metric_filter_pattern: Optional[str] = None, - dimensions: Optional[List["Dimension"]] = None, - is_internal: Optional[bool] = None, - source_mdm_account: Optional[str] = None, - source_mdm_namespace: Optional[str] = None, - resource_id_dimension_name_override: Optional[str] = None, - **kwargs - ): - 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.availabilities = availabilities - self.enable_regional_mdm_account = enable_regional_mdm_account - self.fill_gap_with_zero = fill_gap_with_zero - self.metric_filter_pattern = metric_filter_pattern - self.dimensions = dimensions - self.is_internal = is_internal - self.source_mdm_account = source_mdm_account - self.source_mdm_namespace = source_mdm_namespace - self.resource_id_dimension_name_override = resource_id_dimension_name_override - - -class NetworkInterface(Resource): - """A network interface in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param virtual_machine: The reference of a virtual machine. - :type virtual_machine: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup - :param ip_configurations: A list of IPConfigurations of the network interface. - :type ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration] - :param dns_settings: The DNS settings in network interface. - :type dns_settings: ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceDnsSettings - :param mac_address: The MAC address of the network interface. - :type mac_address: str - :param primary: Gets whether this is a primary network interface on a virtual machine. - :type primary: bool - :param enable_accelerated_networking: If the network interface is accelerated networking - enabled. - :type enable_accelerated_networking: bool - :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network - interface. - :type enable_ip_forwarding: bool - :param resource_guid: The resource GUID property of the network interface resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, - 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, - 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - virtual_machine: Optional["SubResource"] = None, - network_security_group: Optional["NetworkSecurityGroup"] = None, - ip_configurations: Optional[List["NetworkInterfaceIPConfiguration"]] = None, - dns_settings: Optional["NetworkInterfaceDnsSettings"] = None, - mac_address: Optional[str] = None, - primary: Optional[bool] = None, - enable_accelerated_networking: Optional[bool] = None, - enable_ip_forwarding: Optional[bool] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(NetworkInterface, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.virtual_machine = virtual_machine - self.network_security_group = network_security_group - self.ip_configurations = ip_configurations - self.dns_settings = dns_settings - self.mac_address = mac_address - self.primary = primary - self.enable_accelerated_networking = enable_accelerated_networking - self.enable_ip_forwarding = enable_ip_forwarding - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class NetworkInterfaceAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Network interface ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - *, - security_rules: Optional[List["SecurityRule"]] = None, - **kwargs - ): - super(NetworkInterfaceAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = security_rules - - -class NetworkInterfaceDnsSettings(msrest.serialization.Model): - """DNS settings of a network interface. - - :param dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure - provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be - the only value in dnsServers collection. - :type dns_servers: list[str] - :param applied_dns_servers: If the VM that uses this NIC is part of an Availability Set, then - this list will have the union of all DNS servers from all NICs that are part of the - Availability Set. This property is what is configured on each of those VMs. - :type applied_dns_servers: list[str] - :param internal_dns_name_label: Relative DNS name for this NIC used for internal communications - between VMs in the same virtual network. - :type internal_dns_name_label: str - :param internal_fqdn: Fully qualified DNS name supporting internal communications between VMs - in the same virtual network. - :type internal_fqdn: str - :param internal_domain_name_suffix: Even if internalDnsNameLabel is not specified, a DNS entry - is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the - VM name with the value of internalDomainNameSuffix. - :type internal_domain_name_suffix: str - """ - - _attribute_map = { - 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, - 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, - 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, - 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'}, - 'internal_domain_name_suffix': {'key': 'internalDomainNameSuffix', 'type': 'str'}, - } - - def __init__( - self, - *, - dns_servers: Optional[List[str]] = None, - applied_dns_servers: Optional[List[str]] = None, - internal_dns_name_label: Optional[str] = None, - internal_fqdn: Optional[str] = None, - internal_domain_name_suffix: Optional[str] = None, - **kwargs - ): - super(NetworkInterfaceDnsSettings, self).__init__(**kwargs) - self.dns_servers = dns_servers - self.applied_dns_servers = applied_dns_servers - self.internal_dns_name_label = internal_dns_name_label - self.internal_fqdn = internal_fqdn - self.internal_domain_name_suffix = internal_domain_name_suffix - - -class NetworkInterfaceIPConfiguration(SubResource): - """IPConfiguration in a network interface. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param application_gateway_backend_address_pools: The reference of - ApplicationGatewayBackendAddressPool resource. - :type application_gateway_backend_address_pools: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendAddressPool] - :param load_balancer_backend_address_pools: The reference of LoadBalancerBackendAddressPool - resource. - :type load_balancer_backend_address_pools: - list[~azure.mgmt.network.v2017_11_01.models.BackendAddressPool] - :param load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. - :type load_balancer_inbound_nat_rules: - list[~azure.mgmt.network.v2017_11_01.models.InboundNatRule] - :param private_ip_address: Private IP address of the IP configuration. - :type private_ip_address: str - :param private_ip_allocation_method: Defines how a private IP address is assigned. Possible - values are: 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param private_ip_address_version: Available from Api-Version 2016-03-30 onwards, it represents - whether the specific ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible - values are: 'IPv4' and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type private_ip_address_version: str or ~azure.mgmt.network.v2017_11_01.models.IPVersion - :param subnet: Subnet bound to the IP configuration. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.Subnet - :param primary: Gets whether this is a primary customer address on the network interface. - :type primary: bool - :param public_ip_address: Public IP address bound to the IP configuration. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress - :param application_security_groups: Application security groups in which the IP configuration - is included. - :type application_security_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] - :param provisioning_state: The provisioning state of the network interface IP configuration. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, - 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, - 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, - 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, - 'primary': {'key': 'properties.primary', 'type': 'bool'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, - 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - application_gateway_backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, - load_balancer_backend_address_pools: Optional[List["BackendAddressPool"]] = None, - load_balancer_inbound_nat_rules: Optional[List["InboundNatRule"]] = None, - private_ip_address: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - private_ip_address_version: Optional[Union[str, "IPVersion"]] = None, - subnet: Optional["Subnet"] = None, - primary: Optional[bool] = None, - public_ip_address: Optional["PublicIPAddress"] = None, - application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(NetworkInterfaceIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.application_gateway_backend_address_pools = application_gateway_backend_address_pools - self.load_balancer_backend_address_pools = load_balancer_backend_address_pools - self.load_balancer_inbound_nat_rules = load_balancer_inbound_nat_rules - self.private_ip_address = private_ip_address - self.private_ip_allocation_method = private_ip_allocation_method - self.private_ip_address_version = private_ip_address_version - self.subnet = subnet - self.primary = primary - self.public_ip_address = public_ip_address - self.application_security_groups = application_security_groups - self.provisioning_state = provisioning_state - - -class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of ip configurations. - :type value: list[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkInterfaceIPConfiguration"]] = None, - **kwargs - ): - super(NetworkInterfaceIPConfigurationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkInterfaceListResult(msrest.serialization.Model): - """Response for the ListNetworkInterface API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of network interfaces in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.NetworkInterface] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkInterface]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkInterface"]] = None, - **kwargs - ): - super(NetworkInterfaceListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkInterfaceLoadBalancerListResult(msrest.serialization.Model): - """Response for list ip configurations API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: A list of load balancers. - :type value: list[~azure.mgmt.network.v2017_11_01.models.LoadBalancer] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[LoadBalancer]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["LoadBalancer"]] = None, - **kwargs - ): - super(NetworkInterfaceLoadBalancerListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class NetworkSecurityGroup(Resource): - """NetworkSecurityGroup resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param security_rules: A collection of security rules of the network security group. - :type security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - :param default_security_rules: The default security rules of network security group. - :type default_security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - :ivar network_interfaces: A collection of references to network interfaces. - :vartype network_interfaces: list[~azure.mgmt.network.v2017_11_01.models.NetworkInterface] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_11_01.models.Subnet] - :param resource_guid: The resource GUID property of the network security group resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'network_interfaces': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'security_rules': {'key': 'properties.securityRules', 'type': '[SecurityRule]'}, - 'default_security_rules': {'key': 'properties.defaultSecurityRules', 'type': '[SecurityRule]'}, - 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - security_rules: Optional[List["SecurityRule"]] = None, - default_security_rules: Optional[List["SecurityRule"]] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(NetworkSecurityGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.security_rules = security_rules - self.default_security_rules = default_security_rules - self.network_interfaces = None - self.subnets = None - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class NetworkSecurityGroupListResult(msrest.serialization.Model): - """Response for ListNetworkSecurityGroups API service call. - - :param value: A list of NetworkSecurityGroup resources. - :type value: list[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkSecurityGroup]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkSecurityGroup"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(NetworkSecurityGroupListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class NetworkWatcher(Resource): - """Network watcher in a resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar provisioning_state: The provisioning state of the resource. Possible values include: - "Succeeded", "Updating", "Deleting", "Failed". - :vartype provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - **kwargs - ): - super(NetworkWatcher, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.provisioning_state = None - - -class NetworkWatcherListResult(msrest.serialization.Model): - """List of network watcher resources. - - :param value: - :type value: list[~azure.mgmt.network.v2017_11_01.models.NetworkWatcher] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[NetworkWatcher]'}, - } - - def __init__( - self, - *, - value: Optional[List["NetworkWatcher"]] = None, - **kwargs - ): - super(NetworkWatcherListResult, self).__init__(**kwargs) - self.value = value - - -class NextHopParameters(msrest.serialization.Model): - """Parameters that define the source and destination endpoint. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The resource identifier of the target resource against - which the action is to be performed. - :type target_resource_id: str - :param source_ip_address: Required. The source IP address. - :type source_ip_address: str - :param destination_ip_address: Required. The destination IP address. - :type destination_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of the nics, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'source_ip_address': {'required': True}, - 'destination_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'source_ip_address': {'key': 'sourceIPAddress', 'type': 'str'}, - 'destination_ip_address': {'key': 'destinationIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - source_ip_address: str, - destination_ip_address: str, - target_nic_resource_id: Optional[str] = None, - **kwargs - ): - super(NextHopParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.source_ip_address = source_ip_address - self.destination_ip_address = destination_ip_address - self.target_nic_resource_id = target_nic_resource_id - - -class NextHopResult(msrest.serialization.Model): - """The information about next hop from the specified VM. - - :param next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", - "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_11_01.models.NextHopType - :param next_hop_ip_address: Next hop IP Address. - :type next_hop_ip_address: str - :param route_table_id: The resource identifier for the route table associated with the route - being returned. If the route being returned does not correspond to any user created routes then - this field will be the string 'System Route'. - :type route_table_id: str - """ - - _attribute_map = { - 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, - 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, - } - - def __init__( - self, - *, - next_hop_type: Optional[Union[str, "NextHopType"]] = None, - next_hop_ip_address: Optional[str] = None, - route_table_id: Optional[str] = None, - **kwargs - ): - super(NextHopResult, self).__init__(**kwargs) - self.next_hop_type = next_hop_type - self.next_hop_ip_address = next_hop_ip_address - self.route_table_id = route_table_id - - -class Operation(msrest.serialization.Model): - """Network REST API operation definition. - - :param name: Operation name: {provider}/{resource}/{operation}. - :type name: str - :param display: Display metadata associated with the operation. - :type display: ~azure.mgmt.network.v2017_11_01.models.OperationDisplay - :param origin: Origin of the operation. - :type origin: str - :param service_specification: Specification of the service. - :type service_specification: - ~azure.mgmt.network.v2017_11_01.models.OperationPropertiesFormatServiceSpecification - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationPropertiesFormatServiceSpecification'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - display: Optional["OperationDisplay"] = None, - origin: Optional[str] = None, - service_specification: Optional["OperationPropertiesFormatServiceSpecification"] = None, - **kwargs - ): - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.service_specification = service_specification - - -class OperationDisplay(msrest.serialization.Model): - """Display metadata associated with the operation. - - :param provider: Service provider: Microsoft Network. - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - :param operation: Type of the operation: get, read, delete, etc. - :type operation: str - :param description: Description of the operation. - :type description: str - """ - - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, - } - - def __init__( - self, - *, - provider: Optional[str] = None, - resource: Optional[str] = None, - operation: Optional[str] = None, - description: Optional[str] = None, - **kwargs - ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation - self.description = description - - -class OperationListResult(msrest.serialization.Model): - """Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of results. - - :param value: List of Network operations supported by the Network resource provider. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Operation] - :param next_link: URL to get the next set of operation list results if there are any. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Operation"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(OperationListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class OperationPropertiesFormatServiceSpecification(msrest.serialization.Model): - """Specification of the service. - - :param metric_specifications: Operation service specification. - :type metric_specifications: list[~azure.mgmt.network.v2017_11_01.models.MetricSpecification] - :param log_specifications: Operation log specification. - :type log_specifications: list[~azure.mgmt.network.v2017_11_01.models.LogSpecification] - """ - - _attribute_map = { - 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, - 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, - } - - def __init__( - self, - *, - metric_specifications: Optional[List["MetricSpecification"]] = None, - log_specifications: Optional[List["LogSpecification"]] = None, - **kwargs - ): - super(OperationPropertiesFormatServiceSpecification, self).__init__(**kwargs) - self.metric_specifications = metric_specifications - self.log_specifications = log_specifications - - -class OutboundNatRule(SubResource): - """Outbound NAT pool of the load balancer. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allocated_outbound_ports: The number of outbound ports to be used for NAT. - :type allocated_outbound_ports: int - :param frontend_ip_configurations: The Frontend IP addresses of the load balancer. - :type frontend_ip_configurations: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load - balanced across IPs in the backend IPs. - :type backend_address_pool: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param provisioning_state: Gets the provisioning state of the PublicIP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, - 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[SubResource]'}, - 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - allocated_outbound_ports: Optional[int] = None, - frontend_ip_configurations: Optional[List["SubResource"]] = None, - backend_address_pool: Optional["SubResource"] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(OutboundNatRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.allocated_outbound_ports = allocated_outbound_ports - self.frontend_ip_configurations = frontend_ip_configurations - self.backend_address_pool = backend_address_pool - self.provisioning_state = provisioning_state - - -class PacketCapture(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - *, - target: str, - storage_location: "PacketCaptureStorageLocation", - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - filters: Optional[List["PacketCaptureFilter"]] = None, - **kwargs - ): - super(PacketCapture, self).__init__(**kwargs) - self.target = target - self.bytes_to_capture_per_packet = bytes_to_capture_per_packet - self.total_bytes_per_session = total_bytes_per_session - self.time_limit_in_seconds = time_limit_in_seconds - self.storage_location = storage_location - self.filters = filters - - -class PacketCaptureFilter(msrest.serialization.Model): - """Filter that is applied to packet capture request. Multiple filters can be applied. - - :param protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". - Default value: "Any". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.PcProtocol - :param local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type local_ip_address: str - :param remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single - address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. - Multiple ranges not currently supported. Mixing ranges with multiple entries not currently - supported. Default = null. - :type remote_ip_address: str - :param local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type local_port: str - :param remote_port: Remote port to be filtered on. Notation: "80" for single port entry."80-85" - for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing - ranges with multiple entries not currently supported. Default = null. - :type remote_port: str - """ - - _attribute_map = { - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - } - - def __init__( - self, - *, - protocol: Optional[Union[str, "PcProtocol"]] = "Any", - local_ip_address: Optional[str] = None, - remote_ip_address: Optional[str] = None, - local_port: Optional[str] = None, - remote_port: Optional[str] = None, - **kwargs - ): - super(PacketCaptureFilter, self).__init__(**kwargs) - self.protocol = protocol - self.local_ip_address = local_ip_address - self.remote_ip_address = remote_ip_address - self.local_port = local_port - self.remote_port = remote_port - - -class PacketCaptureListResult(msrest.serialization.Model): - """List of packet capture sessions. - - :param value: Information about packet capture sessions. - :type value: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureResult] - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, - } - - def __init__( - self, - *, - value: Optional[List["PacketCaptureResult"]] = None, - **kwargs - ): - super(PacketCaptureListResult, self).__init__(**kwargs) - self.value = value - - -class PacketCaptureParameters(msrest.serialization.Model): - """Parameters that define the create packet capture operation. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureFilter] - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - } - - def __init__( - self, - *, - target: str, - storage_location: "PacketCaptureStorageLocation", - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - filters: Optional[List["PacketCaptureFilter"]] = None, - **kwargs - ): - super(PacketCaptureParameters, self).__init__(**kwargs) - self.target = target - self.bytes_to_capture_per_packet = bytes_to_capture_per_packet - self.total_bytes_per_session = total_bytes_per_session - self.time_limit_in_seconds = time_limit_in_seconds - self.storage_location = storage_location - self.filters = filters - - -class PacketCaptureQueryStatusResult(msrest.serialization.Model): - """Status of packet capture session. - - :param name: The name of the packet capture resource. - :type name: str - :param id: The ID of the packet capture resource. - :type id: str - :param capture_start_time: The start time of the packet capture session. - :type capture_start_time: ~datetime.datetime - :param packet_capture_status: The status of the packet capture session. Possible values - include: "NotStarted", "Running", "Stopped", "Error", "Unknown". - :type packet_capture_status: str or ~azure.mgmt.network.v2017_11_01.models.PcStatus - :param stop_reason: The reason the current packet capture session was stopped. - :type stop_reason: str - :param packet_capture_error: List of errors of packet capture session. - :type packet_capture_error: list[str or ~azure.mgmt.network.v2017_11_01.models.PcError] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'capture_start_time': {'key': 'captureStartTime', 'type': 'iso-8601'}, - 'packet_capture_status': {'key': 'packetCaptureStatus', 'type': 'str'}, - 'stop_reason': {'key': 'stopReason', 'type': 'str'}, - 'packet_capture_error': {'key': 'packetCaptureError', 'type': '[str]'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - id: Optional[str] = None, - capture_start_time: Optional[datetime.datetime] = None, - packet_capture_status: Optional[Union[str, "PcStatus"]] = None, - stop_reason: Optional[str] = None, - packet_capture_error: Optional[List[Union[str, "PcError"]]] = None, - **kwargs - ): - super(PacketCaptureQueryStatusResult, self).__init__(**kwargs) - self.name = name - self.id = id - self.capture_start_time = capture_start_time - self.packet_capture_status = packet_capture_status - self.stop_reason = stop_reason - self.packet_capture_error = packet_capture_error - - -class PacketCaptureResult(msrest.serialization.Model): - """Information about packet capture session. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar name: Name of the packet capture session. - :vartype name: str - :ivar id: ID of the packet capture operation. - :vartype id: str - :param etag: - :type etag: str - :param target: The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - """ - - _validation = { - 'name': {'readonly': True}, - 'id': {'readonly': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'target': {'key': 'properties.target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - etag: Optional[str] = "A unique read-only string that changes whenever the resource is updated.", - target: Optional[str] = None, - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - storage_location: Optional["PacketCaptureStorageLocation"] = None, - filters: Optional[List["PacketCaptureFilter"]] = None, - provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, - **kwargs - ): - super(PacketCaptureResult, self).__init__(**kwargs) - self.name = None - self.id = None - self.etag = etag - self.target = target - self.bytes_to_capture_per_packet = bytes_to_capture_per_packet - self.total_bytes_per_session = total_bytes_per_session - self.time_limit_in_seconds = time_limit_in_seconds - self.storage_location = storage_location - self.filters = filters - self.provisioning_state = provisioning_state - - -class PacketCaptureResultProperties(PacketCaptureParameters): - """Describes the properties of a packet capture session. - - All required parameters must be populated in order to send to Azure. - - :param target: Required. The ID of the targeted resource, only VM is currently supported. - :type target: str - :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes - are truncated. - :type bytes_to_capture_per_packet: int - :param total_bytes_per_session: Maximum size of the capture output. - :type total_bytes_per_session: int - :param time_limit_in_seconds: Maximum duration of the capture session in seconds. - :type time_limit_in_seconds: int - :param storage_location: Required. Describes the storage location for a packet capture session. - :type storage_location: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureStorageLocation - :param filters: - :type filters: list[~azure.mgmt.network.v2017_11_01.models.PacketCaptureFilter] - :param provisioning_state: The provisioning state of the packet capture session. Possible - values include: "Succeeded", "Updating", "Deleting", "Failed". - :type provisioning_state: str or ~azure.mgmt.network.v2017_11_01.models.ProvisioningState - """ - - _validation = { - 'target': {'required': True}, - 'storage_location': {'required': True}, - } - - _attribute_map = { - 'target': {'key': 'target', 'type': 'str'}, - 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'int'}, - 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'int'}, - 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, - 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, - 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - target: str, - storage_location: "PacketCaptureStorageLocation", - bytes_to_capture_per_packet: Optional[int] = 0, - total_bytes_per_session: Optional[int] = 1073741824, - time_limit_in_seconds: Optional[int] = 18000, - filters: Optional[List["PacketCaptureFilter"]] = None, - provisioning_state: Optional[Union[str, "ProvisioningState"]] = None, - **kwargs - ): - super(PacketCaptureResultProperties, self).__init__(target=target, bytes_to_capture_per_packet=bytes_to_capture_per_packet, total_bytes_per_session=total_bytes_per_session, time_limit_in_seconds=time_limit_in_seconds, storage_location=storage_location, filters=filters, **kwargs) - self.provisioning_state = provisioning_state - - -class PacketCaptureStorageLocation(msrest.serialization.Model): - """Describes the storage location for a packet capture session. - - :param storage_id: The ID of the storage account to save the packet capture session. Required - if no local file path is provided. - :type storage_id: str - :param storage_path: The URI of the storage path to save the packet capture. Must be a - well-formed URI describing the location to save the packet capture. - :type storage_path: str - :param file_path: A valid local path on the targeting VM. Must include the name of the capture - file (*.cap). For linux virtual machine it must start with /var/captures. Required if no - storage ID is provided, otherwise optional. - :type file_path: str - """ - - _attribute_map = { - 'storage_id': {'key': 'storageId', 'type': 'str'}, - 'storage_path': {'key': 'storagePath', 'type': 'str'}, - 'file_path': {'key': 'filePath', 'type': 'str'}, - } - - def __init__( - self, - *, - storage_id: Optional[str] = None, - storage_path: Optional[str] = None, - file_path: Optional[str] = None, - **kwargs - ): - super(PacketCaptureStorageLocation, self).__init__(**kwargs) - self.storage_id = storage_id - self.storage_path = storage_path - self.file_path = file_path - - -class PatchRouteFilter(SubResource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :ivar type: Resource type. - :vartype type: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - rules: Optional[List["RouteFilterRule"]] = None, - peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, - **kwargs - ): - super(PatchRouteFilter, self).__init__(id=id, **kwargs) - self.name = None - self.etag = None - self.type = None - self.tags = tags - self.rules = rules - self.peerings = peerings - self.provisioning_state = None - - -class PatchRouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :vartype name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_11_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - access: Optional[Union[str, "Access"]] = None, - route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, - communities: Optional[List[str]] = None, - **kwargs - ): - super(PatchRouteFilterRule, self).__init__(id=id, **kwargs) - self.name = None - self.etag = None - self.access = access - self.route_filter_rule_type = route_filter_rule_type - self.communities = communities - self.provisioning_state = None - - -class Probe(SubResource): - """A load balancer probe. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Gets name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :ivar load_balancing_rules: The load balancer rules that use this probe. - :vartype load_balancing_rules: list[~azure.mgmt.network.v2017_11_01.models.SubResource] - :param protocol: The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' - is specified, a received ACK is required for the probe to be successful. If 'Http' is - specified, a 200 OK response from the specifies URI is required for the probe to be successful. - Possible values include: "Http", "Tcp". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.ProbeProtocol - :param port: The port for communicating the probe. Possible values range from 1 to 65535, - inclusive. - :type port: int - :param interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint - for health status. Typically, the interval is slightly less than half the allocated timeout - period (in seconds) which allows two full probes before taking the instance out of rotation. - The default value is 15, the minimum value is 5. - :type interval_in_seconds: int - :param number_of_probes: The number of probes where if no response, will result in stopping - further traffic from being delivered to the endpoint. This values allows endpoints to be taken - out of rotation faster or slower than the typical times used in Azure. - :type number_of_probes: int - :param request_path: The URI used for requesting health status from the VM. Path is required if - a protocol is set to http. Otherwise, it is not allowed. There is no default value. - :type request_path: str - :param provisioning_state: Gets the provisioning state of the public IP resource. Possible - values are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'load_balancing_rules': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'port': {'key': 'properties.port', 'type': 'int'}, - 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, - 'number_of_probes': {'key': 'properties.numberOfProbes', 'type': 'int'}, - 'request_path': {'key': 'properties.requestPath', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - protocol: Optional[Union[str, "ProbeProtocol"]] = None, - port: Optional[int] = None, - interval_in_seconds: Optional[int] = None, - number_of_probes: Optional[int] = None, - request_path: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(Probe, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.load_balancing_rules = None - self.protocol = protocol - self.port = port - self.interval_in_seconds = interval_in_seconds - self.number_of_probes = number_of_probes - self.request_path = request_path - self.provisioning_state = provisioning_state - - -class PublicIPAddress(Resource): - """Public IP address resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param sku: The public IP address SKU. - :type sku: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddressSku - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param zones: A list of availability zones denoting the IP allocated for the resource needs to - come from. - :type zones: list[str] - :param public_ip_allocation_method: The public IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type public_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param public_ip_address_version: The public IP address version. Possible values are: 'IPv4' - and 'IPv6'. Possible values include: "IPv4", "IPv6". - :type public_ip_address_version: str or ~azure.mgmt.network.v2017_11_01.models.IPVersion - :ivar ip_configuration: The IP configuration associated with the public IP address. - :vartype ip_configuration: ~azure.mgmt.network.v2017_11_01.models.IPConfiguration - :param dns_settings: The FQDN of the DNS record associated with the public IP address. - :type dns_settings: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddressDnsSettings - :param ip_tags: The list of tags associated with the public IP address. - :type ip_tags: list[~azure.mgmt.network.v2017_11_01.models.IpTag] - :param ip_address: The IP address associated with the public IP address resource. - :type ip_address: str - :param idle_timeout_in_minutes: The idle timeout of the public IP address. - :type idle_timeout_in_minutes: int - :param resource_guid: The resource GUID property of the public IP resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'ip_configuration': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'sku': {'key': 'sku', 'type': 'PublicIPAddressSku'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'zones': {'key': 'zones', 'type': '[str]'}, - 'public_ip_allocation_method': {'key': 'properties.publicIPAllocationMethod', 'type': 'str'}, - 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, - 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, - 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, - 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, - 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, - 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - sku: Optional["PublicIPAddressSku"] = None, - etag: Optional[str] = None, - zones: Optional[List[str]] = None, - public_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - public_ip_address_version: Optional[Union[str, "IPVersion"]] = None, - dns_settings: Optional["PublicIPAddressDnsSettings"] = None, - ip_tags: Optional[List["IpTag"]] = None, - ip_address: Optional[str] = None, - idle_timeout_in_minutes: Optional[int] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(PublicIPAddress, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.sku = sku - self.etag = etag - self.zones = zones - self.public_ip_allocation_method = public_ip_allocation_method - self.public_ip_address_version = public_ip_address_version - self.ip_configuration = None - self.dns_settings = dns_settings - self.ip_tags = ip_tags - self.ip_address = ip_address - self.idle_timeout_in_minutes = idle_timeout_in_minutes - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - - -class PublicIPAddressDnsSettings(msrest.serialization.Model): - """Contains FQDN of the DNS record associated with the public IP address. - - :param domain_name_label: Gets or sets the Domain name label.The concatenation of the domain - name label and the regionalized DNS zone make up the fully qualified domain name associated - with the public IP address. If a domain name label is specified, an A DNS record is created for - the public IP in the Microsoft Azure DNS system. - :type domain_name_label: str - :param fqdn: Gets the FQDN, Fully qualified domain name of the A DNS record associated with the - public IP. This is the concatenation of the domainNameLabel and the regionalized DNS zone. - :type fqdn: str - :param reverse_fqdn: Gets or Sets the Reverse FQDN. A user-visible, fully qualified domain name - that resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record - is created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. - :type reverse_fqdn: str - """ - - _attribute_map = { - 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, - 'fqdn': {'key': 'fqdn', 'type': 'str'}, - 'reverse_fqdn': {'key': 'reverseFqdn', 'type': 'str'}, - } - - def __init__( - self, - *, - domain_name_label: Optional[str] = None, - fqdn: Optional[str] = None, - reverse_fqdn: Optional[str] = None, - **kwargs - ): - super(PublicIPAddressDnsSettings, self).__init__(**kwargs) - self.domain_name_label = domain_name_label - self.fqdn = fqdn - self.reverse_fqdn = reverse_fqdn - - -class PublicIPAddressListResult(msrest.serialization.Model): - """Response for ListPublicIpAddresses API service call. - - :param value: A list of public IP addresses that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.PublicIPAddress] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["PublicIPAddress"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(PublicIPAddressListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class PublicIPAddressSku(msrest.serialization.Model): - """SKU of a public IP address. - - :param name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". - :type name: str or ~azure.mgmt.network.v2017_11_01.models.PublicIPAddressSkuName - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "PublicIPAddressSkuName"]] = None, - **kwargs - ): - super(PublicIPAddressSku, self).__init__(**kwargs) - self.name = name - - -class QueryTroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to query the troubleshooting result. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource ID to query the troubleshooting - result. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - **kwargs - ): - super(QueryTroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - - -class ResourceNavigationLink(SubResource): - """ResourceNavigationLink resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: Name of the resource that is unique within a resource group. This name can be used - to access the resource. - :type name: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param linked_resource_type: Resource type of the linked resource. - :type linked_resource_type: str - :param link: Link to the external resource. - :type link: str - :ivar provisioning_state: Provisioning state of the ResourceNavigationLink resource. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, - 'link': {'key': 'properties.link', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - linked_resource_type: Optional[str] = None, - link: Optional[str] = None, - **kwargs - ): - super(ResourceNavigationLink, self).__init__(id=id, **kwargs) - self.name = name - self.etag = None - self.linked_resource_type = linked_resource_type - self.link = link - self.provisioning_state = None - - -class RetentionPolicyParameters(msrest.serialization.Model): - """Parameters that define the retention policy for flow log. - - :param days: Number of days to retain flow log records. - :type days: int - :param enabled: Flag to enable/disable retention. - :type enabled: bool - """ - - _attribute_map = { - 'days': {'key': 'days', 'type': 'int'}, - 'enabled': {'key': 'enabled', 'type': 'bool'}, - } - - def __init__( - self, - *, - days: Optional[int] = 0, - enabled: Optional[bool] = False, - **kwargs - ): - super(RetentionPolicyParameters, self).__init__(**kwargs) - self.days = days - self.enabled = enabled - - -class Route(SubResource): - """Route resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The destination CIDR to which the route applies. - :type address_prefix: str - :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. Possible - values include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". - :type next_hop_type: str or ~azure.mgmt.network.v2017_11_01.models.RouteNextHopType - :param next_hop_ip_address: The IP address packets should be forwarded to. Next hop values are - only allowed in routes where the next hop type is VirtualAppliance. - :type next_hop_ip_address: str - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'next_hop_type': {'key': 'properties.nextHopType', 'type': 'str'}, - 'next_hop_ip_address': {'key': 'properties.nextHopIpAddress', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - address_prefix: Optional[str] = None, - next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, - next_hop_ip_address: Optional[str] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(Route, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.address_prefix = address_prefix - self.next_hop_type = next_hop_type - self.next_hop_ip_address = next_hop_ip_address - self.provisioning_state = provisioning_state - - -class RouteFilter(Resource): - """Route Filter Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :ivar etag: Gets a unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param rules: Collection of RouteFilterRules contained within a route filter. - :type rules: list[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] - :param peerings: A collection of references to express route circuit peerings. - :type peerings: list[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, - 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - rules: Optional[List["RouteFilterRule"]] = None, - peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, - **kwargs - ): - super(RouteFilter, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = None - self.rules = rules - self.peerings = peerings - self.provisioning_state = None - - -class RouteFilterListResult(msrest.serialization.Model): - """Response for the ListRouteFilters API service call. - - :param value: Gets a list of route filters in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.RouteFilter] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilter]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RouteFilter"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteFilterListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RouteFilterRule(SubResource): - """Route Filter Rule Resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param location: Resource location. - :type location: str - :ivar etag: A unique read-only string that changes whenever the resource is updated. - :vartype etag: str - :param access: The access type of the rule. Valid values are: 'Allow', 'Deny'. Possible values - include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.Access - :param route_filter_rule_type: The rule type of the rule. Valid value is: 'Community'. Possible - values include: "Community". - :type route_filter_rule_type: str or ~azure.mgmt.network.v2017_11_01.models.RouteFilterRuleType - :param communities: The collection for bgp community values to filter on. e.g. - ['12076:5010','12076:5020']. - :type communities: list[str] - :ivar provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', 'Succeeded' and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'etag': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, - 'communities': {'key': 'properties.communities', 'type': '[str]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - location: Optional[str] = None, - access: Optional[Union[str, "Access"]] = None, - route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, - communities: Optional[List[str]] = None, - **kwargs - ): - super(RouteFilterRule, self).__init__(id=id, **kwargs) - self.name = name - self.location = location - self.etag = None - self.access = access - self.route_filter_rule_type = route_filter_rule_type - self.communities = communities - self.provisioning_state = None - - -class RouteFilterRuleListResult(msrest.serialization.Model): - """Response for the ListRouteFilterRules API service call. - - :param value: Gets a list of RouteFilterRules in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.RouteFilterRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteFilterRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RouteFilterRule"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteFilterRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RouteListResult(msrest.serialization.Model): - """Response for the ListRoute API service call. - - :param value: Gets a list of routes in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Route] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Route]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Route"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class RouteTable(Resource): - """Route table resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param routes: Collection of routes contained within a route table. - :type routes: list[~azure.mgmt.network.v2017_11_01.models.Route] - :ivar subnets: A collection of references to subnets. - :vartype subnets: list[~azure.mgmt.network.v2017_11_01.models.Subnet] - :param disable_bgp_route_propagation: Gets or sets whether to disable the routes learned by BGP - on that route table. True means disable. - :type disable_bgp_route_propagation: bool - :param provisioning_state: The provisioning state of the resource. Possible values are: - 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'subnets': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'routes': {'key': 'properties.routes', 'type': '[Route]'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'disable_bgp_route_propagation': {'key': 'properties.disableBgpRoutePropagation', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - routes: Optional[List["Route"]] = None, - disable_bgp_route_propagation: Optional[bool] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(RouteTable, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.routes = routes - self.subnets = None - self.disable_bgp_route_propagation = disable_bgp_route_propagation - self.provisioning_state = provisioning_state - - -class RouteTableListResult(msrest.serialization.Model): - """Response for the ListRouteTable API service call. - - :param value: Gets a list of route tables in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.RouteTable] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[RouteTable]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["RouteTable"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(RouteTableListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class SecurityGroupNetworkInterface(msrest.serialization.Model): - """Network interface and all its associated security rules. - - :param id: ID of the network interface. - :type id: str - :param security_rule_associations: All security rules associated with the network interface. - :type security_rule_associations: - ~azure.mgmt.network.v2017_11_01.models.SecurityRuleAssociations - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rule_associations': {'key': 'securityRuleAssociations', 'type': 'SecurityRuleAssociations'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - security_rule_associations: Optional["SecurityRuleAssociations"] = None, - **kwargs - ): - super(SecurityGroupNetworkInterface, self).__init__(**kwargs) - self.id = id - self.security_rule_associations = security_rule_associations - - -class SecurityGroupViewParameters(msrest.serialization.Model): - """Parameters that define the VM to check security groups for. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. ID of the target VM. - :type target_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - **kwargs - ): - super(SecurityGroupViewParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - - -class SecurityGroupViewResult(msrest.serialization.Model): - """The information about security rules applied to the specified VM. - - :param network_interfaces: List of network interfaces on the specified VM. - :type network_interfaces: - list[~azure.mgmt.network.v2017_11_01.models.SecurityGroupNetworkInterface] - """ - - _attribute_map = { - 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, - } - - def __init__( - self, - *, - network_interfaces: Optional[List["SecurityGroupNetworkInterface"]] = None, - **kwargs - ): - super(SecurityGroupViewResult, self).__init__(**kwargs) - self.network_interfaces = network_interfaces - - -class SecurityRule(SubResource): - """Network security rule. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param description: A description for this rule. Restricted to 140 chars. - :type description: str - :param protocol: Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and - '*'. Possible values include: "Tcp", "Udp", "*". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleProtocol - :param source_port_range: The source port or range. Integer or range between 0 and 65535. - Asterisk '*' can also be used to match all ports. - :type source_port_range: str - :param destination_port_range: The destination port or range. Integer or range between 0 and - 65535. Asterisk '*' can also be used to match all ports. - :type destination_port_range: str - :param source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to - match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - can also be used. If this is an ingress rule, specifies where network traffic originates from. - :type source_address_prefix: str - :param source_address_prefixes: The CIDR or source IP ranges. - :type source_address_prefixes: list[str] - :param source_application_security_groups: The application security group specified as source. - :type source_application_security_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] - :param destination_address_prefix: The destination address prefix. CIDR or destination IP - range. Asterisk '*' can also be used to match all source IPs. Default tags such as - 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. - :type destination_address_prefix: str - :param destination_address_prefixes: The destination address prefixes. CIDR or destination IP - ranges. - :type destination_address_prefixes: list[str] - :param destination_application_security_groups: The application security group specified as - destination. - :type destination_application_security_groups: - list[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] - :param source_port_ranges: The source port ranges. - :type source_port_ranges: list[str] - :param destination_port_ranges: The destination port ranges. - :type destination_port_ranges: list[str] - :param access: The network traffic is allowed or denied. Possible values are: 'Allow' and - 'Deny'. Possible values include: "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleAccess - :param priority: The priority of the rule. The value can be between 100 and 4096. The priority - number must be unique for each rule in the collection. The lower the priority number, the - higher the priority of the rule. - :type priority: int - :param direction: The direction of the rule. The direction specifies if rule will be evaluated - on incoming or outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_11_01.models.SecurityRuleDirection - :param provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'description': {'key': 'properties.description', 'type': 'str'}, - 'protocol': {'key': 'properties.protocol', 'type': 'str'}, - 'source_port_range': {'key': 'properties.sourcePortRange', 'type': 'str'}, - 'destination_port_range': {'key': 'properties.destinationPortRange', 'type': 'str'}, - 'source_address_prefix': {'key': 'properties.sourceAddressPrefix', 'type': 'str'}, - 'source_address_prefixes': {'key': 'properties.sourceAddressPrefixes', 'type': '[str]'}, - 'source_application_security_groups': {'key': 'properties.sourceApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'destination_address_prefix': {'key': 'properties.destinationAddressPrefix', 'type': 'str'}, - 'destination_address_prefixes': {'key': 'properties.destinationAddressPrefixes', 'type': '[str]'}, - 'destination_application_security_groups': {'key': 'properties.destinationApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, - 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, - 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, - 'access': {'key': 'properties.access', 'type': 'str'}, - 'priority': {'key': 'properties.priority', 'type': 'int'}, - 'direction': {'key': 'properties.direction', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - description: Optional[str] = None, - protocol: Optional[Union[str, "SecurityRuleProtocol"]] = None, - source_port_range: Optional[str] = None, - destination_port_range: Optional[str] = None, - source_address_prefix: Optional[str] = None, - source_address_prefixes: Optional[List[str]] = None, - source_application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, - destination_address_prefix: Optional[str] = None, - destination_address_prefixes: Optional[List[str]] = None, - destination_application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, - source_port_ranges: Optional[List[str]] = None, - destination_port_ranges: Optional[List[str]] = None, - access: Optional[Union[str, "SecurityRuleAccess"]] = None, - priority: Optional[int] = None, - direction: Optional[Union[str, "SecurityRuleDirection"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(SecurityRule, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.description = description - self.protocol = protocol - self.source_port_range = source_port_range - self.destination_port_range = destination_port_range - self.source_address_prefix = source_address_prefix - self.source_address_prefixes = source_address_prefixes - self.source_application_security_groups = source_application_security_groups - self.destination_address_prefix = destination_address_prefix - self.destination_address_prefixes = destination_address_prefixes - self.destination_application_security_groups = destination_application_security_groups - self.source_port_ranges = source_port_ranges - self.destination_port_ranges = destination_port_ranges - self.access = access - self.priority = priority - self.direction = direction - self.provisioning_state = provisioning_state - - -class SecurityRuleAssociations(msrest.serialization.Model): - """All security rules associated with the network interface. - - :param network_interface_association: Network interface and its custom security rules. - :type network_interface_association: - ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceAssociation - :param subnet_association: Network interface and its custom security rules. - :type subnet_association: ~azure.mgmt.network.v2017_11_01.models.SubnetAssociation - :param default_security_rules: Collection of default security rules of the network security - group. - :type default_security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - :param effective_security_rules: Collection of effective security rules. - :type effective_security_rules: - list[~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityRule] - """ - - _attribute_map = { - 'network_interface_association': {'key': 'networkInterfaceAssociation', 'type': 'NetworkInterfaceAssociation'}, - 'subnet_association': {'key': 'subnetAssociation', 'type': 'SubnetAssociation'}, - 'default_security_rules': {'key': 'defaultSecurityRules', 'type': '[SecurityRule]'}, - 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, - } - - def __init__( - self, - *, - network_interface_association: Optional["NetworkInterfaceAssociation"] = None, - subnet_association: Optional["SubnetAssociation"] = None, - default_security_rules: Optional[List["SecurityRule"]] = None, - effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, - **kwargs - ): - super(SecurityRuleAssociations, self).__init__(**kwargs) - self.network_interface_association = network_interface_association - self.subnet_association = subnet_association - self.default_security_rules = default_security_rules - self.effective_security_rules = effective_security_rules - - -class SecurityRuleListResult(msrest.serialization.Model): - """Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. - - :param value: The security rules in a network security group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[SecurityRule]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["SecurityRule"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(SecurityRuleListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class ServiceEndpointPropertiesFormat(msrest.serialization.Model): - """The service endpoint properties. - - :param service: The type of the endpoint service. - :type service: str - :param locations: A list of locations. - :type locations: list[str] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'service': {'key': 'service', 'type': 'str'}, - 'locations': {'key': 'locations', 'type': '[str]'}, - 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - service: Optional[str] = None, - locations: Optional[List[str]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(ServiceEndpointPropertiesFormat, self).__init__(**kwargs) - self.service = service - self.locations = locations - self.provisioning_state = provisioning_state - - -class Subnet(SubResource): - """Subnet in a virtual network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_prefix: The address prefix for the subnet. - :type address_prefix: str - :param network_security_group: The reference of the NetworkSecurityGroup resource. - :type network_security_group: ~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup - :param route_table: The reference of the RouteTable resource. - :type route_table: ~azure.mgmt.network.v2017_11_01.models.RouteTable - :param service_endpoints: An array of service endpoints. - :type service_endpoints: - list[~azure.mgmt.network.v2017_11_01.models.ServiceEndpointPropertiesFormat] - :ivar ip_configurations: Gets an array of references to the network interface IP configurations - using subnet. - :vartype ip_configurations: list[~azure.mgmt.network.v2017_11_01.models.IPConfiguration] - :param resource_navigation_links: Gets an array of references to the external resources using - subnet. - :type resource_navigation_links: - list[~azure.mgmt.network.v2017_11_01.models.ResourceNavigationLink] - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _validation = { - 'ip_configurations': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, - 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, - 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, - 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, - 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - address_prefix: Optional[str] = None, - network_security_group: Optional["NetworkSecurityGroup"] = None, - route_table: Optional["RouteTable"] = None, - service_endpoints: Optional[List["ServiceEndpointPropertiesFormat"]] = None, - resource_navigation_links: Optional[List["ResourceNavigationLink"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(Subnet, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.address_prefix = address_prefix - self.network_security_group = network_security_group - self.route_table = route_table - self.service_endpoints = service_endpoints - self.ip_configurations = None - self.resource_navigation_links = resource_navigation_links - self.provisioning_state = provisioning_state - - -class SubnetAssociation(msrest.serialization.Model): - """Network interface and its custom security rules. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Subnet ID. - :vartype id: str - :param security_rules: Collection of custom security rules. - :type security_rules: list[~azure.mgmt.network.v2017_11_01.models.SecurityRule] - """ - - _validation = { - 'id': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, - } - - def __init__( - self, - *, - security_rules: Optional[List["SecurityRule"]] = None, - **kwargs - ): - super(SubnetAssociation, self).__init__(**kwargs) - self.id = None - self.security_rules = security_rules - - -class SubnetListResult(msrest.serialization.Model): - """Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. - - :param value: The subnets in a virtual network. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Subnet] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Subnet]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Subnet"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(SubnetListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class TagsObject(msrest.serialization.Model): - """Tags object for patch operations. - - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(TagsObject, self).__init__(**kwargs) - self.tags = tags - - -class Topology(msrest.serialization.Model): - """Topology of the specified resource group. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: GUID representing the operation id. - :vartype id: str - :ivar created_date_time: The datetime when the topology was initially created for the resource - group. - :vartype created_date_time: ~datetime.datetime - :ivar last_modified: The datetime when the topology was last modified. - :vartype last_modified: ~datetime.datetime - :param resources: - :type resources: list[~azure.mgmt.network.v2017_11_01.models.TopologyResource] - """ - - _validation = { - 'id': {'readonly': True}, - 'created_date_time': {'readonly': True}, - 'last_modified': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, - 'resources': {'key': 'resources', 'type': '[TopologyResource]'}, - } - - def __init__( - self, - *, - resources: Optional[List["TopologyResource"]] = None, - **kwargs - ): - super(Topology, self).__init__(**kwargs) - self.id = None - self.created_date_time = None - self.last_modified = None - self.resources = resources - - -class TopologyAssociation(msrest.serialization.Model): - """Resources that have an association with the parent resource. - - :param name: The name of the resource that is associated with the parent resource. - :type name: str - :param resource_id: The ID of the resource that is associated with the parent resource. - :type resource_id: str - :param association_type: The association type of the child resource to the parent resource. - Possible values include: "Associated", "Contains". - :type association_type: str or ~azure.mgmt.network.v2017_11_01.models.AssociationType - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'resource_id': {'key': 'resourceId', 'type': 'str'}, - 'association_type': {'key': 'associationType', 'type': 'str'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - resource_id: Optional[str] = None, - association_type: Optional[Union[str, "AssociationType"]] = None, - **kwargs - ): - super(TopologyAssociation, self).__init__(**kwargs) - self.name = name - self.resource_id = resource_id - self.association_type = association_type - - -class TopologyParameters(msrest.serialization.Model): - """Parameters that define the representation of topology. - - :param target_resource_group_name: The name of the target resource group to perform topology - on. - :type target_resource_group_name: str - :param target_virtual_network: The reference of the Virtual Network resource. - :type target_virtual_network: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param target_subnet: The reference of the Subnet resource. - :type target_subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - """ - - _attribute_map = { - 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, - 'target_virtual_network': {'key': 'targetVirtualNetwork', 'type': 'SubResource'}, - 'target_subnet': {'key': 'targetSubnet', 'type': 'SubResource'}, - } - - def __init__( - self, - *, - target_resource_group_name: Optional[str] = None, - target_virtual_network: Optional["SubResource"] = None, - target_subnet: Optional["SubResource"] = None, - **kwargs - ): - super(TopologyParameters, self).__init__(**kwargs) - self.target_resource_group_name = target_resource_group_name - self.target_virtual_network = target_virtual_network - self.target_subnet = target_subnet - - -class TopologyResource(msrest.serialization.Model): - """The network resource topology information for the given resource group. - - :param name: Name of the resource. - :type name: str - :param id: ID of the resource. - :type id: str - :param location: Resource location. - :type location: str - :param associations: Holds the associations the resource has with other resources in the - resource group. - :type associations: list[~azure.mgmt.network.v2017_11_01.models.TopologyAssociation] - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, - } - - def __init__( - self, - *, - name: Optional[str] = None, - id: Optional[str] = None, - location: Optional[str] = None, - associations: Optional[List["TopologyAssociation"]] = None, - **kwargs - ): - super(TopologyResource, self).__init__(**kwargs) - self.name = name - self.id = id - self.location = location - self.associations = associations - - -class TroubleshootingDetails(msrest.serialization.Model): - """Information gained from troubleshooting of specified resource. - - :param id: The id of the get troubleshoot operation. - :type id: str - :param reason_type: Reason type of failure. - :type reason_type: str - :param summary: A summary of troubleshooting. - :type summary: str - :param detail: Details on troubleshooting results. - :type detail: str - :param recommended_actions: List of recommended actions. - :type recommended_actions: - list[~azure.mgmt.network.v2017_11_01.models.TroubleshootingRecommendedActions] - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'reason_type': {'key': 'reasonType', 'type': 'str'}, - 'summary': {'key': 'summary', 'type': 'str'}, - 'detail': {'key': 'detail', 'type': 'str'}, - 'recommended_actions': {'key': 'recommendedActions', 'type': '[TroubleshootingRecommendedActions]'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - reason_type: Optional[str] = None, - summary: Optional[str] = None, - detail: Optional[str] = None, - recommended_actions: Optional[List["TroubleshootingRecommendedActions"]] = None, - **kwargs - ): - super(TroubleshootingDetails, self).__init__(**kwargs) - self.id = id - self.reason_type = reason_type - self.summary = summary - self.detail = detail - self.recommended_actions = recommended_actions - - -class TroubleshootingParameters(msrest.serialization.Model): - """Parameters that define the resource to troubleshoot. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The target resource to troubleshoot. - :type target_resource_id: str - :param storage_id: Required. The ID for the storage account to save the troubleshoot result. - :type storage_id: str - :param storage_path: Required. The path to the blob to save the troubleshoot result in. - :type storage_path: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'storage_id': {'required': True}, - 'storage_path': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, - 'storage_path': {'key': 'properties.storagePath', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - storage_id: str, - storage_path: str, - **kwargs - ): - super(TroubleshootingParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.storage_id = storage_id - self.storage_path = storage_path - - -class TroubleshootingRecommendedActions(msrest.serialization.Model): - """Recommended actions based on discovered issues. - - :param action_id: ID of the recommended action. - :type action_id: str - :param action_text: Description of recommended actions. - :type action_text: str - :param action_uri: The uri linking to a documentation for the recommended troubleshooting - actions. - :type action_uri: str - :param action_uri_text: The information from the URI for the recommended troubleshooting - actions. - :type action_uri_text: str - """ - - _attribute_map = { - 'action_id': {'key': 'actionId', 'type': 'str'}, - 'action_text': {'key': 'actionText', 'type': 'str'}, - 'action_uri': {'key': 'actionUri', 'type': 'str'}, - 'action_uri_text': {'key': 'actionUriText', 'type': 'str'}, - } - - def __init__( - self, - *, - action_id: Optional[str] = None, - action_text: Optional[str] = None, - action_uri: Optional[str] = None, - action_uri_text: Optional[str] = None, - **kwargs - ): - super(TroubleshootingRecommendedActions, self).__init__(**kwargs) - self.action_id = action_id - self.action_text = action_text - self.action_uri = action_uri - self.action_uri_text = action_uri_text - - -class TroubleshootingResult(msrest.serialization.Model): - """Troubleshooting information gained from specified resource. - - :param start_time: The start time of the troubleshooting. - :type start_time: ~datetime.datetime - :param end_time: The end time of the troubleshooting. - :type end_time: ~datetime.datetime - :param code: The result code of the troubleshooting. - :type code: str - :param results: Information from troubleshooting. - :type results: list[~azure.mgmt.network.v2017_11_01.models.TroubleshootingDetails] - """ - - _attribute_map = { - 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, - 'code': {'key': 'code', 'type': 'str'}, - 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, - } - - def __init__( - self, - *, - start_time: Optional[datetime.datetime] = None, - end_time: Optional[datetime.datetime] = None, - code: Optional[str] = None, - results: Optional[List["TroubleshootingDetails"]] = None, - **kwargs - ): - super(TroubleshootingResult, self).__init__(**kwargs) - self.start_time = start_time - self.end_time = end_time - self.code = code - self.results = results - - -class TunnelConnectionHealth(msrest.serialization.Model): - """VirtualNetworkGatewayConnection properties. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar tunnel: Tunnel name. - :vartype tunnel: str - :ivar connection_status: Virtual network Gateway connection status. Possible values include: - "Unknown", "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionStatus - :ivar ingress_bytes_transferred: The Ingress Bytes Transferred in this connection. - :vartype ingress_bytes_transferred: long - :ivar egress_bytes_transferred: The Egress Bytes Transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar last_connection_established_utc_time: The time at which connection was established in Utc - format. - :vartype last_connection_established_utc_time: str - """ - - _validation = { - 'tunnel': {'readonly': True}, - 'connection_status': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'last_connection_established_utc_time': {'readonly': True}, - } - - _attribute_map = { - 'tunnel': {'key': 'tunnel', 'type': 'str'}, - 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, - 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, - 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, - 'last_connection_established_utc_time': {'key': 'lastConnectionEstablishedUtcTime', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TunnelConnectionHealth, self).__init__(**kwargs) - self.tunnel = None - self.connection_status = None - self.ingress_bytes_transferred = None - self.egress_bytes_transferred = None - self.last_connection_established_utc_time = None - - -class Usage(msrest.serialization.Model): - """Describes network resource usage. - - 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. - - :ivar id: Resource identifier. - :vartype id: str - :param unit: Required. An enum describing the unit of measurement. Possible values include: - "Count". - :type unit: str or ~azure.mgmt.network.v2017_11_01.models.UsageUnit - :param current_value: Required. The current value of the usage. - :type current_value: long - :param limit: Required. The limit of usage. - :type limit: long - :param name: Required. The name of the type of usage. - :type name: ~azure.mgmt.network.v2017_11_01.models.UsageName - """ - - _validation = { - 'id': {'readonly': True}, - 'unit': {'required': True}, - 'current_value': {'required': True}, - 'limit': {'required': True}, - 'name': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'unit': {'key': 'unit', 'type': 'str'}, - 'current_value': {'key': 'currentValue', 'type': 'long'}, - 'limit': {'key': 'limit', 'type': 'long'}, - 'name': {'key': 'name', 'type': 'UsageName'}, - } - - def __init__( - self, - *, - unit: Union[str, "UsageUnit"], - current_value: int, - limit: int, - name: "UsageName", - **kwargs - ): - super(Usage, self).__init__(**kwargs) - self.id = None - self.unit = unit - self.current_value = current_value - self.limit = limit - self.name = name - - -class UsageName(msrest.serialization.Model): - """The usage names. - - :param value: A string describing the resource name. - :type value: str - :param localized_value: A localized string describing the resource name. - :type localized_value: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - localized_value: Optional[str] = None, - **kwargs - ): - super(UsageName, self).__init__(**kwargs) - self.value = value - self.localized_value = localized_value - - -class UsagesListResult(msrest.serialization.Model): - """The list usages operation response. - - :param value: The list network resource usages. - :type value: list[~azure.mgmt.network.v2017_11_01.models.Usage] - :param next_link: URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Usage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Usage"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(UsagesListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class VerificationIPFlowParameters(msrest.serialization.Model): - """Parameters that define the IP flow to be verified. - - All required parameters must be populated in order to send to Azure. - - :param target_resource_id: Required. The ID of the target resource to perform next-hop on. - :type target_resource_id: str - :param direction: Required. The direction of the packet represented as a 5-tuple. Possible - values include: "Inbound", "Outbound". - :type direction: str or ~azure.mgmt.network.v2017_11_01.models.Direction - :param protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". - :type protocol: str or ~azure.mgmt.network.v2017_11_01.models.Protocol - :param local_port: Required. The local port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type local_port: str - :param remote_port: Required. The remote port. Acceptable values are a single integer in the - range (0-65535). Support for * for the source port, which depends on the direction. - :type remote_port: str - :param local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 - addresses. - :type local_ip_address: str - :param remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 - addresses. - :type remote_ip_address: str - :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is - enabled on any of them, then this parameter must be specified. Otherwise optional). - :type target_nic_resource_id: str - """ - - _validation = { - 'target_resource_id': {'required': True}, - 'direction': {'required': True}, - 'protocol': {'required': True}, - 'local_port': {'required': True}, - 'remote_port': {'required': True}, - 'local_ip_address': {'required': True}, - 'remote_ip_address': {'required': True}, - } - - _attribute_map = { - 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, - 'direction': {'key': 'direction', 'type': 'str'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'local_port': {'key': 'localPort', 'type': 'str'}, - 'remote_port': {'key': 'remotePort', 'type': 'str'}, - 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, - 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, - 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, - } - - def __init__( - self, - *, - target_resource_id: str, - direction: Union[str, "Direction"], - protocol: Union[str, "Protocol"], - local_port: str, - remote_port: str, - local_ip_address: str, - remote_ip_address: str, - target_nic_resource_id: Optional[str] = None, - **kwargs - ): - super(VerificationIPFlowParameters, self).__init__(**kwargs) - self.target_resource_id = target_resource_id - self.direction = direction - self.protocol = protocol - self.local_port = local_port - self.remote_port = remote_port - self.local_ip_address = local_ip_address - self.remote_ip_address = remote_ip_address - self.target_nic_resource_id = target_nic_resource_id - - -class VerificationIPFlowResult(msrest.serialization.Model): - """Results of IP flow verification on the target resource. - - :param access: Indicates whether the traffic is allowed or denied. Possible values include: - "Allow", "Deny". - :type access: str or ~azure.mgmt.network.v2017_11_01.models.Access - :param rule_name: Name of the rule. If input is not matched against any security rule, it is - not displayed. - :type rule_name: str - """ - - _attribute_map = { - 'access': {'key': 'access', 'type': 'str'}, - 'rule_name': {'key': 'ruleName', 'type': 'str'}, - } - - def __init__( - self, - *, - access: Optional[Union[str, "Access"]] = None, - rule_name: Optional[str] = None, - **kwargs - ): - super(VerificationIPFlowResult, self).__init__(**kwargs) - self.access = access - self.rule_name = rule_name - - -class VirtualNetwork(Resource): - """Virtual Network resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param address_space: The AddressSpace that contains an array of IP address ranges that can be - used by subnets. - :type address_space: ~azure.mgmt.network.v2017_11_01.models.AddressSpace - :param dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs - deployed in the virtual network. - :type dhcp_options: ~azure.mgmt.network.v2017_11_01.models.DhcpOptions - :param subnets: A list of subnets in a Virtual Network. - :type subnets: list[~azure.mgmt.network.v2017_11_01.models.Subnet] - :param virtual_network_peerings: A list of peerings in a Virtual Network. - :type virtual_network_peerings: - list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering] - :param resource_guid: The resourceGuid property of the Virtual Network resource. - :type resource_guid: str - :param provisioning_state: The provisioning state of the PublicIP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :type provisioning_state: str - :param enable_ddos_protection: Indicates if DDoS protection is enabled for all the protected - resources in a Virtual Network. - :type enable_ddos_protection: bool - :param enable_vm_protection: Indicates if Vm protection is enabled for all the subnets in a - Virtual Network. - :type enable_vm_protection: bool - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, - 'dhcp_options': {'key': 'properties.dhcpOptions', 'type': 'DhcpOptions'}, - 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, - 'virtual_network_peerings': {'key': 'properties.virtualNetworkPeerings', 'type': '[VirtualNetworkPeering]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'enable_ddos_protection': {'key': 'properties.enableDdosProtection', 'type': 'bool'}, - 'enable_vm_protection': {'key': 'properties.enableVmProtection', 'type': 'bool'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - address_space: Optional["AddressSpace"] = None, - dhcp_options: Optional["DhcpOptions"] = None, - subnets: Optional[List["Subnet"]] = None, - virtual_network_peerings: Optional[List["VirtualNetworkPeering"]] = None, - resource_guid: Optional[str] = None, - provisioning_state: Optional[str] = None, - enable_ddos_protection: Optional[bool] = None, - enable_vm_protection: Optional[bool] = None, - **kwargs - ): - super(VirtualNetwork, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.address_space = address_space - self.dhcp_options = dhcp_options - self.subnets = subnets - self.virtual_network_peerings = virtual_network_peerings - self.resource_guid = resource_guid - self.provisioning_state = provisioning_state - self.enable_ddos_protection = enable_ddos_protection - self.enable_vm_protection = enable_vm_protection - - -class VirtualNetworkConnectionGatewayReference(msrest.serialization.Model): - """A reference to VirtualNetworkGateway or LocalNetworkGateway resource. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. - :type id: str - """ - - _validation = { - 'id': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - id: str, - **kwargs - ): - super(VirtualNetworkConnectionGatewayReference, self).__init__(**kwargs) - self.id = id - - -class VirtualNetworkGateway(Resource): - """A common class for general resource information. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param ip_configurations: IP configurations for virtual network gateway. - :type ip_configurations: - list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayIPConfiguration] - :param gateway_type: The type of this virtual network gateway. Possible values are: 'Vpn' and - 'ExpressRoute'. Possible values include: "Vpn", "ExpressRoute". - :type gateway_type: str or ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayType - :param vpn_type: The type of this virtual network gateway. Possible values are: 'PolicyBased' - and 'RouteBased'. Possible values include: "PolicyBased", "RouteBased". - :type vpn_type: str or ~azure.mgmt.network.v2017_11_01.models.VpnType - :param enable_bgp: Whether BGP is enabled for this virtual network gateway or not. - :type enable_bgp: bool - :param active: ActiveActive flag. - :type active: bool - :param gateway_default_site: The reference of the LocalNetworkGateway resource which represents - local network site having default routes. Assign Null value in case of removing existing - default site setting. - :type gateway_default_site: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param sku: The reference of the VirtualNetworkGatewaySku resource which represents the SKU - selected for Virtual network gateway. - :type sku: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewaySku - :param vpn_client_configuration: The reference of the VpnClientConfiguration resource which - represents the P2S VpnClient configurations. - :type vpn_client_configuration: ~azure.mgmt.network.v2017_11_01.models.VpnClientConfiguration - :param bgp_settings: Virtual network gateway's BGP speaker settings. - :type bgp_settings: ~azure.mgmt.network.v2017_11_01.models.BgpSettings - :param resource_guid: The resource GUID property of the VirtualNetworkGateway resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGateway resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualNetworkGatewayIPConfiguration]'}, - 'gateway_type': {'key': 'properties.gatewayType', 'type': 'str'}, - 'vpn_type': {'key': 'properties.vpnType', 'type': 'str'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'active': {'key': 'properties.activeActive', 'type': 'bool'}, - 'gateway_default_site': {'key': 'properties.gatewayDefaultSite', 'type': 'SubResource'}, - 'sku': {'key': 'properties.sku', 'type': 'VirtualNetworkGatewaySku'}, - 'vpn_client_configuration': {'key': 'properties.vpnClientConfiguration', 'type': 'VpnClientConfiguration'}, - 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - ip_configurations: Optional[List["VirtualNetworkGatewayIPConfiguration"]] = None, - gateway_type: Optional[Union[str, "VirtualNetworkGatewayType"]] = None, - vpn_type: Optional[Union[str, "VpnType"]] = None, - enable_bgp: Optional[bool] = None, - active: Optional[bool] = None, - gateway_default_site: Optional["SubResource"] = None, - sku: Optional["VirtualNetworkGatewaySku"] = None, - vpn_client_configuration: Optional["VpnClientConfiguration"] = None, - bgp_settings: Optional["BgpSettings"] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.ip_configurations = ip_configurations - self.gateway_type = gateway_type - self.vpn_type = vpn_type - self.enable_bgp = enable_bgp - self.active = active - self.gateway_default_site = gateway_default_site - self.sku = sku - self.vpn_client_configuration = vpn_client_configuration - self.bgp_settings = bgp_settings - self.resource_guid = resource_guid - self.provisioning_state = None - - -class VirtualNetworkGatewayConnection(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: ~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_11_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_11_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkGateway'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkGateway'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'LocalNetworkGateway'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - virtual_network_gateway1: "VirtualNetworkGateway", - connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - authorization_key: Optional[str] = None, - virtual_network_gateway2: Optional["VirtualNetworkGateway"] = None, - local_network_gateway2: Optional["LocalNetworkGateway"] = None, - routing_weight: Optional[int] = None, - shared_key: Optional[str] = None, - peer: Optional["SubResource"] = None, - enable_bgp: Optional[bool] = None, - use_policy_based_traffic_selectors: Optional[bool] = None, - ipsec_policies: Optional[List["IpsecPolicy"]] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkGatewayConnection, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.authorization_key = authorization_key - self.virtual_network_gateway1 = virtual_network_gateway1 - self.virtual_network_gateway2 = virtual_network_gateway2 - self.local_network_gateway2 = local_network_gateway2 - self.connection_type = connection_type - self.routing_weight = routing_weight - self.shared_key = shared_key - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = peer - self.enable_bgp = enable_bgp - self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors - self.ipsec_policies = ipsec_policies - self.resource_guid = resource_guid - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListEntity(Resource): - """A common class for general resource information. - - 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 id: Resource ID. - :type id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :param location: Resource location. - :type location: str - :param tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param etag: Gets a unique read-only string that changes whenever the resource is updated. - :type etag: str - :param authorization_key: The authorizationKey. - :type authorization_key: str - :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. - :type virtual_network_gateway1: - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkConnectionGatewayReference - :param virtual_network_gateway2: The reference to virtual network gateway resource. - :type virtual_network_gateway2: - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkConnectionGatewayReference - :param local_network_gateway2: The reference to local network gateway resource. - :type local_network_gateway2: - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkConnectionGatewayReference - :param connection_type: Required. Gateway connection type. Possible values are: - 'IPsec','Vnet2Vnet','ExpressRoute', and 'VPNClient. Possible values include: "IPsec", - "Vnet2Vnet", "ExpressRoute", "VPNClient". - :type connection_type: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionType - :param routing_weight: The routing weight. - :type routing_weight: int - :param shared_key: The IPSec shared key. - :type shared_key: str - :ivar connection_status: Virtual network Gateway connection status. Possible values are - 'Unknown', 'Connecting', 'Connected' and 'NotConnected'. Possible values include: "Unknown", - "Connecting", "Connected", "NotConnected". - :vartype connection_status: str or - ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionStatus - :ivar tunnel_connection_status: Collection of all tunnels' connection health status. - :vartype tunnel_connection_status: - list[~azure.mgmt.network.v2017_11_01.models.TunnelConnectionHealth] - :ivar egress_bytes_transferred: The egress bytes transferred in this connection. - :vartype egress_bytes_transferred: long - :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. - :vartype ingress_bytes_transferred: long - :param peer: The reference to peerings resource. - :type peer: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param enable_bgp: EnableBgp flag. - :type enable_bgp: bool - :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. - :type use_policy_based_traffic_selectors: bool - :param ipsec_policies: The IPSec Policies to be considered by this connection. - :type ipsec_policies: list[~azure.mgmt.network.v2017_11_01.models.IpsecPolicy] - :param resource_guid: The resource GUID property of the VirtualNetworkGatewayConnection - resource. - :type resource_guid: str - :ivar provisioning_state: The provisioning state of the VirtualNetworkGatewayConnection - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'virtual_network_gateway1': {'required': True}, - 'connection_type': {'required': True}, - 'connection_status': {'readonly': True}, - 'tunnel_connection_status': {'readonly': True}, - 'egress_bytes_transferred': {'readonly': True}, - 'ingress_bytes_transferred': {'readonly': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, - 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, - 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, - 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, - 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, - 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, - 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, - 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, - 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, - 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, - 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, - 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, - 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, - 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - virtual_network_gateway1: "VirtualNetworkConnectionGatewayReference", - connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], - id: Optional[str] = None, - location: Optional[str] = None, - tags: Optional[Dict[str, str]] = None, - etag: Optional[str] = None, - authorization_key: Optional[str] = None, - virtual_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, - local_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, - routing_weight: Optional[int] = None, - shared_key: Optional[str] = None, - peer: Optional["SubResource"] = None, - enable_bgp: Optional[bool] = None, - use_policy_based_traffic_selectors: Optional[bool] = None, - ipsec_policies: Optional[List["IpsecPolicy"]] = None, - resource_guid: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListEntity, self).__init__(id=id, location=location, tags=tags, **kwargs) - self.etag = etag - self.authorization_key = authorization_key - self.virtual_network_gateway1 = virtual_network_gateway1 - self.virtual_network_gateway2 = virtual_network_gateway2 - self.local_network_gateway2 = local_network_gateway2 - self.connection_type = connection_type - self.routing_weight = routing_weight - self.shared_key = shared_key - self.connection_status = None - self.tunnel_connection_status = None - self.egress_bytes_transferred = None - self.ingress_bytes_transferred = None - self.peer = peer - self.enable_bgp = enable_bgp - self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors - self.ipsec_policies = ipsec_policies - self.resource_guid = resource_guid - self.provisioning_state = None - - -class VirtualNetworkGatewayConnectionListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGatewayConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnection] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnection]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkGatewayConnection"]] = None, - **kwargs - ): - super(VirtualNetworkGatewayConnectionListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class VirtualNetworkGatewayIPConfiguration(SubResource): - """IP configuration for virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param private_ip_allocation_method: The private IP allocation method. Possible values are: - 'Static' and 'Dynamic'. Possible values include: "Static", "Dynamic". - :type private_ip_allocation_method: str or - ~azure.mgmt.network.v2017_11_01.models.IPAllocationMethod - :param subnet: The reference of the subnet resource. - :type subnet: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param public_ip_address: The reference of the public IP resource. - :type public_ip_address: ~azure.mgmt.network.v2017_11_01.models.SubResource - :ivar provisioning_state: The provisioning state of the public IP resource. Possible values - are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, - 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, - 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, - subnet: Optional["SubResource"] = None, - public_ip_address: Optional["SubResource"] = None, - **kwargs - ): - super(VirtualNetworkGatewayIPConfiguration, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.private_ip_allocation_method = private_ip_allocation_method - self.subnet = subnet - self.public_ip_address = public_ip_address - self.provisioning_state = None - - -class VirtualNetworkGatewayListConnectionsResult(msrest.serialization.Model): - """Response for the VirtualNetworkGatewayListConnections API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGatewayConnection resources that exists in a - resource group. - :type value: - list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionListEntity] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnectionListEntity]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkGatewayConnectionListEntity"]] = None, - **kwargs - ): - super(VirtualNetworkGatewayListConnectionsResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class VirtualNetworkGatewayListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworkGateways API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: Gets a list of VirtualNetworkGateway resources that exists in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway] - :ivar next_link: The URL to get the next set of results. - :vartype next_link: str - """ - - _validation = { - 'next_link': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkGateway"]] = None, - **kwargs - ): - super(VirtualNetworkGatewayListResult, self).__init__(**kwargs) - self.value = value - self.next_link = None - - -class VirtualNetworkGatewaySku(msrest.serialization.Model): - """VirtualNetworkGatewaySku details. - - :param name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type name: str or ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewaySkuName - :param tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", "Standard", - "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3". - :type tier: str or ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewaySkuTier - :param capacity: The capacity. - :type capacity: int - """ - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'tier': {'key': 'tier', 'type': 'str'}, - 'capacity': {'key': 'capacity', 'type': 'int'}, - } - - def __init__( - self, - *, - name: Optional[Union[str, "VirtualNetworkGatewaySkuName"]] = None, - tier: Optional[Union[str, "VirtualNetworkGatewaySkuTier"]] = None, - capacity: Optional[int] = None, - **kwargs - ): - super(VirtualNetworkGatewaySku, self).__init__(**kwargs) - self.name = name - self.tier = tier - self.capacity = capacity - - -class VirtualNetworkListResult(msrest.serialization.Model): - """Response for the ListVirtualNetworks API service call. - - :param value: Gets a list of VirtualNetwork resources in a resource group. - :type value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetwork] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetwork"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class VirtualNetworkListUsageResult(msrest.serialization.Model): - """Response for the virtual networks GetUsage API service call. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar value: VirtualNetwork usage stats. - :vartype value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkUsage] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _validation = { - 'value': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkListUsageResult, self).__init__(**kwargs) - self.value = None - self.next_link = next_link - - -class VirtualNetworkPeering(SubResource): - """Peerings in a virtual network resource. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param allow_virtual_network_access: Whether the VMs in the linked virtual network space would - be able to access all the VMs in local Virtual network space. - :type allow_virtual_network_access: bool - :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the remote - virtual network will be allowed/disallowed. - :type allow_forwarded_traffic: bool - :param allow_gateway_transit: If gateway links can be used in remote virtual networking to link - to this virtual network. - :type allow_gateway_transit: bool - :param use_remote_gateways: If remote gateways can be used on this virtual network. If the flag - is set to true, and allowGatewayTransit on remote peering is also true, virtual network will - use gateways of remote virtual network for transit. Only one peering can have this flag set to - true. This flag cannot be set if virtual network already has a gateway. - :type use_remote_gateways: bool - :param remote_virtual_network: The reference of the remote virtual network. The remote virtual - network can be in the same or different region (preview). See here to register for the preview - and learn more - (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). - :type remote_virtual_network: ~azure.mgmt.network.v2017_11_01.models.SubResource - :param remote_address_space: The reference of the remote virtual network address space. - :type remote_address_space: ~azure.mgmt.network.v2017_11_01.models.AddressSpace - :param peering_state: The status of the virtual network peering. Possible values are - 'Initiated', 'Connected', and 'Disconnected'. Possible values include: "Initiated", - "Connected", "Disconnected". - :type peering_state: str or ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeeringState - :param provisioning_state: The provisioning state of the resource. - :type provisioning_state: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, - 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, - 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, - 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, - 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, - 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, - 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - allow_virtual_network_access: Optional[bool] = None, - allow_forwarded_traffic: Optional[bool] = None, - allow_gateway_transit: Optional[bool] = None, - use_remote_gateways: Optional[bool] = None, - remote_virtual_network: Optional["SubResource"] = None, - remote_address_space: Optional["AddressSpace"] = None, - peering_state: Optional[Union[str, "VirtualNetworkPeeringState"]] = None, - provisioning_state: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkPeering, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.allow_virtual_network_access = allow_virtual_network_access - self.allow_forwarded_traffic = allow_forwarded_traffic - self.allow_gateway_transit = allow_gateway_transit - self.use_remote_gateways = use_remote_gateways - self.remote_virtual_network = remote_virtual_network - self.remote_address_space = remote_address_space - self.peering_state = peering_state - self.provisioning_state = provisioning_state - - -class VirtualNetworkPeeringListResult(msrest.serialization.Model): - """Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. - - :param value: The peerings in a virtual network. - :type value: list[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering] - :param next_link: The URL to get the next set of results. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[VirtualNetworkPeering]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["VirtualNetworkPeering"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(VirtualNetworkPeeringListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class VirtualNetworkUsage(msrest.serialization.Model): - """Usage details for subnet. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar current_value: Indicates number of IPs used from the Subnet. - :vartype current_value: float - :ivar id: Subnet identifier. - :vartype id: str - :ivar limit: Indicates the size of the subnet. - :vartype limit: float - :ivar name: The name containing common and localized value for usage. - :vartype name: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkUsageName - :ivar unit: Usage units. Returns 'Count'. - :vartype unit: str - """ - - _validation = { - 'current_value': {'readonly': True}, - 'id': {'readonly': True}, - 'limit': {'readonly': True}, - 'name': {'readonly': True}, - 'unit': {'readonly': True}, - } - - _attribute_map = { - 'current_value': {'key': 'currentValue', 'type': 'float'}, - 'id': {'key': 'id', 'type': 'str'}, - 'limit': {'key': 'limit', 'type': 'float'}, - 'name': {'key': 'name', 'type': 'VirtualNetworkUsageName'}, - 'unit': {'key': 'unit', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsage, self).__init__(**kwargs) - self.current_value = None - self.id = None - self.limit = None - self.name = None - self.unit = None - - -class VirtualNetworkUsageName(msrest.serialization.Model): - """Usage strings container. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar localized_value: Localized subnet size and usage string. - :vartype localized_value: str - :ivar value: Subnet size and usage string. - :vartype value: str - """ - - _validation = { - 'localized_value': {'readonly': True}, - 'value': {'readonly': True}, - } - - _attribute_map = { - 'localized_value': {'key': 'localizedValue', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(VirtualNetworkUsageName, self).__init__(**kwargs) - self.localized_value = None - self.value = None - - -class VpnClientConfiguration(msrest.serialization.Model): - """VpnClientConfiguration for P2S client. - - :param vpn_client_address_pool: The reference of the address space resource which represents - Address space for P2S VpnClient. - :type vpn_client_address_pool: ~azure.mgmt.network.v2017_11_01.models.AddressSpace - :param vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. - :type vpn_client_root_certificates: - list[~azure.mgmt.network.v2017_11_01.models.VpnClientRootCertificate] - :param vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network - gateway. - :type vpn_client_revoked_certificates: - list[~azure.mgmt.network.v2017_11_01.models.VpnClientRevokedCertificate] - :param vpn_client_protocols: VpnClientProtocols for Virtual network gateway. - :type vpn_client_protocols: list[str or - ~azure.mgmt.network.v2017_11_01.models.VpnClientProtocol] - :param radius_server_address: The radius server address property of the VirtualNetworkGateway - resource for vpn client connection. - :type radius_server_address: str - :param radius_server_secret: The radius secret property of the VirtualNetworkGateway resource - for vpn client connection. - :type radius_server_secret: str - """ - - _attribute_map = { - 'vpn_client_address_pool': {'key': 'vpnClientAddressPool', 'type': 'AddressSpace'}, - 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, - 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, - 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, - 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, - 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, - } - - def __init__( - self, - *, - vpn_client_address_pool: Optional["AddressSpace"] = None, - vpn_client_root_certificates: Optional[List["VpnClientRootCertificate"]] = None, - vpn_client_revoked_certificates: Optional[List["VpnClientRevokedCertificate"]] = None, - vpn_client_protocols: Optional[List[Union[str, "VpnClientProtocol"]]] = None, - radius_server_address: Optional[str] = None, - radius_server_secret: Optional[str] = None, - **kwargs - ): - super(VpnClientConfiguration, self).__init__(**kwargs) - self.vpn_client_address_pool = vpn_client_address_pool - self.vpn_client_root_certificates = vpn_client_root_certificates - self.vpn_client_revoked_certificates = vpn_client_revoked_certificates - self.vpn_client_protocols = vpn_client_protocols - self.radius_server_address = radius_server_address - self.radius_server_secret = radius_server_secret - - -class VpnClientParameters(msrest.serialization.Model): - """Vpn Client Parameters for package generation. - - :param processor_architecture: VPN client Processor Architecture. Possible values are: 'AMD64' - and 'X86'. Possible values include: "Amd64", "X86". - :type processor_architecture: str or - ~azure.mgmt.network.v2017_11_01.models.ProcessorArchitecture - :param authentication_method: VPN client Authentication Method. Possible values are: 'EAPTLS' - and 'EAPMSCHAPv2'. Possible values include: "EAPTLS", "EAPMSCHAPv2". - :type authentication_method: str or ~azure.mgmt.network.v2017_11_01.models.AuthenticationMethod - :param radius_server_auth_certificate: The public certificate data for the radius server - authentication certificate as a Base-64 encoded string. Required only if external radius - authentication has been configured with EAPTLS authentication. - :type radius_server_auth_certificate: str - :param client_root_certificates: A list of client root certificates public certificate data - encoded as Base-64 strings. Optional parameter for external radius based authentication with - EAPTLS. - :type client_root_certificates: list[str] - """ - - _attribute_map = { - 'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'}, - 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, - 'radius_server_auth_certificate': {'key': 'radiusServerAuthCertificate', 'type': 'str'}, - 'client_root_certificates': {'key': 'clientRootCertificates', 'type': '[str]'}, - } - - def __init__( - self, - *, - processor_architecture: Optional[Union[str, "ProcessorArchitecture"]] = None, - authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, - radius_server_auth_certificate: Optional[str] = None, - client_root_certificates: Optional[List[str]] = None, - **kwargs - ): - super(VpnClientParameters, self).__init__(**kwargs) - self.processor_architecture = processor_architecture - self.authentication_method = authentication_method - self.radius_server_auth_certificate = radius_server_auth_certificate - self.client_root_certificates = client_root_certificates - - -class VpnClientRevokedCertificate(SubResource): - """VPN client revoked certificate of virtual network gateway. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param thumbprint: The revoked VPN client certificate thumbprint. - :type thumbprint: str - :ivar provisioning_state: The provisioning state of the VPN client revoked certificate - resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - thumbprint: Optional[str] = None, - **kwargs - ): - super(VpnClientRevokedCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.thumbprint = thumbprint - self.provisioning_state = None - - -class VpnClientRootCertificate(SubResource): - """VPN client root certificate of virtual network gateway. - - 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 id: Resource ID. - :type id: str - :param name: The name of the resource that is unique within a resource group. This name can be - used to access the resource. - :type name: str - :param etag: A unique read-only string that changes whenever the resource is updated. - :type etag: str - :param public_cert_data: Required. The certificate public data. - :type public_cert_data: str - :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. - Possible values are: 'Updating', 'Deleting', and 'Failed'. - :vartype provisioning_state: str - """ - - _validation = { - 'public_cert_data': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__( - self, - *, - public_cert_data: str, - id: Optional[str] = None, - name: Optional[str] = None, - etag: Optional[str] = None, - **kwargs - ): - super(VpnClientRootCertificate, self).__init__(id=id, **kwargs) - self.name = name - self.etag = etag - self.public_cert_data = public_cert_data - self.provisioning_state = None - - -class VpnDeviceScriptParameters(msrest.serialization.Model): - """Vpn device configuration script generation parameters. - - :param vendor: The vendor for the vpn device. - :type vendor: str - :param device_family: The device family for the vpn device. - :type device_family: str - :param firmware_version: The firmware version for the vpn device. - :type firmware_version: str - """ - - _attribute_map = { - 'vendor': {'key': 'vendor', 'type': 'str'}, - 'device_family': {'key': 'deviceFamily', 'type': 'str'}, - 'firmware_version': {'key': 'firmwareVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - vendor: Optional[str] = None, - device_family: Optional[str] = None, - firmware_version: Optional[str] = None, - **kwargs - ): - super(VpnDeviceScriptParameters, self).__init__(**kwargs) - self.vendor = vendor - self.device_family = device_family - self.firmware_version = firmware_version diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_network_management_client_enums.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_network_management_client_enums.py deleted file mode 100644 index 26ce7319c39c..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/_network_management_client_enums.py +++ /dev/null @@ -1,640 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from enum import Enum, EnumMeta -from six import with_metaclass - -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class Access(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Indicates whether the traffic is allowed or denied. - """ - - ALLOW = "Allow" - DENY = "Deny" - -class ApplicationGatewayBackendHealthServerHealth(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Health of backend server. - """ - - UNKNOWN = "Unknown" - UP = "Up" - DOWN = "Down" - PARTIAL = "Partial" - DRAINING = "Draining" - -class ApplicationGatewayCookieBasedAffinity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Cookie based affinity. - """ - - ENABLED = "Enabled" - DISABLED = "Disabled" - -class ApplicationGatewayFirewallMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Web application firewall mode. - """ - - DETECTION = "Detection" - PREVENTION = "Prevention" - -class ApplicationGatewayOperationalState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Operational state of the application gateway resource. - """ - - STOPPED = "Stopped" - STARTING = "Starting" - RUNNING = "Running" - STOPPING = "Stopping" - -class ApplicationGatewayProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protocol. - """ - - HTTP = "Http" - HTTPS = "Https" - -class ApplicationGatewayRedirectType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - PERMANENT = "Permanent" - FOUND = "Found" - SEE_OTHER = "SeeOther" - TEMPORARY = "Temporary" - -class ApplicationGatewayRequestRoutingRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Rule type. - """ - - BASIC = "Basic" - PATH_BASED_ROUTING = "PathBasedRouting" - -class ApplicationGatewaySkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Name of an application gateway SKU. - """ - - STANDARD_SMALL = "Standard_Small" - STANDARD_MEDIUM = "Standard_Medium" - STANDARD_LARGE = "Standard_Large" - WAF_MEDIUM = "WAF_Medium" - WAF_LARGE = "WAF_Large" - -class ApplicationGatewaySslCipherSuite(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Ssl cipher suites enums. - """ - - TLS_ECDHE_RSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" - TLS_ECDHE_RSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" - TLS_ECDHE_RSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" - TLS_ECDHE_RSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" - TLS_DHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" - TLS_DHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" - TLS_DHE_RSA_WITH_AES256_CBC_SHA = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" - TLS_DHE_RSA_WITH_AES128_CBC_SHA = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" - TLS_RSA_WITH_AES256_GCM_SHA384 = "TLS_RSA_WITH_AES_256_GCM_SHA384" - TLS_RSA_WITH_AES128_GCM_SHA256 = "TLS_RSA_WITH_AES_128_GCM_SHA256" - TLS_RSA_WITH_AES256_CBC_SHA256 = "TLS_RSA_WITH_AES_256_CBC_SHA256" - TLS_RSA_WITH_AES128_CBC_SHA256 = "TLS_RSA_WITH_AES_128_CBC_SHA256" - TLS_RSA_WITH_AES256_CBC_SHA = "TLS_RSA_WITH_AES_256_CBC_SHA" - TLS_RSA_WITH_AES128_CBC_SHA = "TLS_RSA_WITH_AES_128_CBC_SHA" - TLS_ECDHE_ECDSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" - TLS_ECDHE_ECDSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" - TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" - TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" - TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" - TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" - TLS_DHE_DSS_WITH_AES256_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" - TLS_DHE_DSS_WITH_AES128_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" - TLS_DHE_DSS_WITH_AES256_CBC_SHA = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" - TLS_DHE_DSS_WITH_AES128_CBC_SHA = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" - TLS_RSA_WITH3_DES_EDE_CBC_SHA = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" - TLS_DHE_DSS_WITH3_DES_EDE_CBC_SHA = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" - TLS_ECDHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" - TLS_ECDHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" - -class ApplicationGatewaySslPolicyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Ssl predefined policy name enums. - """ - - APP_GW_SSL_POLICY20150501 = "AppGwSslPolicy20150501" - APP_GW_SSL_POLICY20170401 = "AppGwSslPolicy20170401" - APP_GW_SSL_POLICY20170401_S = "AppGwSslPolicy20170401S" - -class ApplicationGatewaySslPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of Ssl Policy - """ - - PREDEFINED = "Predefined" - CUSTOM = "Custom" - -class ApplicationGatewaySslProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Ssl protocol enums. - """ - - TL_SV1_0 = "TLSv1_0" - TL_SV1_1 = "TLSv1_1" - TL_SV1_2 = "TLSv1_2" - -class ApplicationGatewayTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Tier of an application gateway. - """ - - STANDARD = "Standard" - WAF = "WAF" - -class AssociationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The association type of the child resource to the parent resource. - """ - - ASSOCIATED = "Associated" - CONTAINS = "Contains" - -class AuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VPN client Authentication Method. Possible values are: 'EAPTLS' and 'EAPMSCHAPv2'. - """ - - EAPTLS = "EAPTLS" - EAPMSCHA_PV2 = "EAPMSCHAPv2" - -class AuthorizationUseStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. - """ - - AVAILABLE = "Available" - IN_USE = "InUse" - -class BgpPeerState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The BGP peer state - """ - - UNKNOWN = "Unknown" - STOPPED = "Stopped" - IDLE = "Idle" - CONNECTING = "Connecting" - CONNECTED = "Connected" - -class ConnectionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The connection state. - """ - - REACHABLE = "Reachable" - UNREACHABLE = "Unreachable" - UNKNOWN = "Unknown" - -class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The connection status. - """ - - UNKNOWN = "Unknown" - CONNECTED = "Connected" - DISCONNECTED = "Disconnected" - DEGRADED = "Degraded" - -class DhGroup(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The DH Groups used in IKE Phase 1 for initial SA. - """ - - NONE = "None" - DH_GROUP1 = "DHGroup1" - DH_GROUP2 = "DHGroup2" - DH_GROUP14 = "DHGroup14" - DH_GROUP2048 = "DHGroup2048" - ECP256 = "ECP256" - ECP384 = "ECP384" - DH_GROUP24 = "DHGroup24" - -class Direction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The direction of the packet represented as a 5-tuple. - """ - - INBOUND = "Inbound" - OUTBOUND = "Outbound" - -class EffectiveRouteSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Who created the route. Possible values are: 'Unknown', 'User', 'VirtualNetworkGateway', and - 'Default'. - """ - - UNKNOWN = "Unknown" - USER = "User" - VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" - DEFAULT = "Default" - -class EffectiveRouteState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The value of effective route. Possible values are: 'Active' and 'Invalid'. - """ - - ACTIVE = "Active" - INVALID = "Invalid" - -class EffectiveSecurityRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The network protocol this rule applies to. Possible values are: 'Tcp', 'Udp', and 'All'. - """ - - TCP = "Tcp" - UDP = "Udp" - ALL = "All" - -class EvaluationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Connectivity analysis evaluation state. - """ - - NOT_STARTED = "NotStarted" - IN_PROGRESS = "InProgress" - COMPLETED = "Completed" - -class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """AdvertisedPublicPrefixState of the Peering resource. Possible values are 'NotConfigured', - 'Configuring', 'Configured', and 'ValidationNeeded'. - """ - - NOT_CONFIGURED = "NotConfigured" - CONFIGURING = "Configuring" - CONFIGURED = "Configured" - VALIDATION_NEEDED = "ValidationNeeded" - -class ExpressRouteCircuitPeeringState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The state of peering. Possible values are: 'Disabled' and 'Enabled' - """ - - DISABLED = "Disabled" - ENABLED = "Enabled" - -class ExpressRouteCircuitPeeringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The PeeringType. Possible values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - 'MicrosoftPeering'. - """ - - AZURE_PUBLIC_PEERING = "AzurePublicPeering" - AZURE_PRIVATE_PEERING = "AzurePrivatePeering" - MICROSOFT_PEERING = "MicrosoftPeering" - -class ExpressRouteCircuitSkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The family of the SKU. Possible values are: 'UnlimitedData' and 'MeteredData'. - """ - - UNLIMITED_DATA = "UnlimitedData" - METERED_DATA = "MeteredData" - -class ExpressRouteCircuitSkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The tier of the SKU. Possible values are 'Standard' and 'Premium'. - """ - - STANDARD = "Standard" - PREMIUM = "Premium" - -class IkeEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IKE encryption algorithm (IKE phase 2). - """ - - DES = "DES" - DES3 = "DES3" - AES128 = "AES128" - AES192 = "AES192" - AES256 = "AES256" - -class IkeIntegrity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IKE integrity algorithm (IKE phase 2). - """ - - MD5 = "MD5" - SHA1 = "SHA1" - SHA256 = "SHA256" - SHA384 = "SHA384" - -class IPAllocationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """PrivateIP allocation method. - """ - - STATIC = "Static" - DYNAMIC = "Dynamic" - -class IpsecEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IPSec encryption algorithm (IKE phase 1). - """ - - NONE = "None" - DES = "DES" - DES3 = "DES3" - AES128 = "AES128" - AES192 = "AES192" - AES256 = "AES256" - GCMAES128 = "GCMAES128" - GCMAES192 = "GCMAES192" - GCMAES256 = "GCMAES256" - -class IpsecIntegrity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The IPSec integrity algorithm (IKE phase 1). - """ - - MD5 = "MD5" - SHA1 = "SHA1" - SHA256 = "SHA256" - GCMAES128 = "GCMAES128" - GCMAES192 = "GCMAES192" - GCMAES256 = "GCMAES256" - -class IPVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Available from Api-Version 2016-03-30 onwards, it represents whether the specific - ipconfiguration is IPv4 or IPv6. Default is taken as IPv4. Possible values are: 'IPv4' and - 'IPv6'. - """ - - I_PV4 = "IPv4" - I_PV6 = "IPv6" - -class IssueType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of issue. - """ - - UNKNOWN = "Unknown" - AGENT_STOPPED = "AgentStopped" - GUEST_FIREWALL = "GuestFirewall" - DNS_RESOLUTION = "DnsResolution" - SOCKET_BIND = "SocketBind" - NETWORK_SECURITY_RULE = "NetworkSecurityRule" - USER_DEFINED_ROUTE = "UserDefinedRoute" - PORT_THROTTLED = "PortThrottled" - PLATFORM = "Platform" - -class LoadBalancerSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Name of a load balancer SKU. - """ - - BASIC = "Basic" - STANDARD = "Standard" - -class LoadDistribution(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The load distribution policy for this rule. Possible values are 'Default', 'SourceIP', and - 'SourceIPProtocol'. - """ - - DEFAULT = "Default" - SOURCE_IP = "SourceIP" - SOURCE_IP_PROTOCOL = "SourceIPProtocol" - -class NetworkOperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and - 'Failed'. - """ - - IN_PROGRESS = "InProgress" - SUCCEEDED = "Succeeded" - FAILED = "Failed" - -class NextHopType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Next hop type. - """ - - INTERNET = "Internet" - VIRTUAL_APPLIANCE = "VirtualAppliance" - VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" - VNET_LOCAL = "VnetLocal" - HYPER_NET_GATEWAY = "HyperNetGateway" - NONE = "None" - -class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The origin of the issue. - """ - - LOCAL = "Local" - INBOUND = "Inbound" - OUTBOUND = "Outbound" - -class PcError(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - - INTERNAL_ERROR = "InternalError" - AGENT_STOPPED = "AgentStopped" - CAPTURE_FAILED = "CaptureFailed" - LOCAL_FILE_FAILED = "LocalFileFailed" - STORAGE_FAILED = "StorageFailed" - -class PcProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protocol to be filtered on. - """ - - TCP = "TCP" - UDP = "UDP" - ANY = "Any" - -class PcStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the packet capture session. - """ - - NOT_STARTED = "NotStarted" - RUNNING = "Running" - STOPPED = "Stopped" - ERROR = "Error" - UNKNOWN = "Unknown" - -class PfsGroup(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The DH Groups used in IKE Phase 2 for new child SA. - """ - - NONE = "None" - PFS1 = "PFS1" - PFS2 = "PFS2" - PFS2048 = "PFS2048" - ECP256 = "ECP256" - ECP384 = "ECP384" - PFS24 = "PFS24" - -class ProbeProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The protocol of the end point. Possible values are: 'Http' or 'Tcp'. If 'Tcp' is specified, a - received ACK is required for the probe to be successful. If 'Http' is specified, a 200 OK - response from the specifies URI is required for the probe to be successful. - """ - - HTTP = "Http" - TCP = "Tcp" - -class ProcessorArchitecture(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VPN client Processor Architecture. Possible values are: 'AMD64' and 'X86'. - """ - - AMD64 = "Amd64" - X86 = "X86" - -class Protocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Protocol to be verified on. - """ - - TCP = "TCP" - UDP = "UDP" - -class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The provisioning state of the resource. - """ - - SUCCEEDED = "Succeeded" - UPDATING = "Updating" - DELETING = "Deleting" - FAILED = "Failed" - -class PublicIPAddressSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Name of a public IP address SKU. - """ - - BASIC = "Basic" - STANDARD = "Standard" - -class RouteFilterRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The rule type of the rule. Valid value is: 'Community' - """ - - COMMUNITY = "Community" - -class RouteNextHopType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of Azure hop the packet should be sent to. Possible values are: - 'VirtualNetworkGateway', 'VnetLocal', 'Internet', 'VirtualAppliance', and 'None'. - """ - - VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" - VNET_LOCAL = "VnetLocal" - INTERNET = "Internet" - VIRTUAL_APPLIANCE = "VirtualAppliance" - NONE = "None" - -class SecurityRuleAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Whether network traffic is allowed or denied. Possible values are: 'Allow' and 'Deny'. - """ - - ALLOW = "Allow" - DENY = "Deny" - -class SecurityRuleDirection(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The direction of the rule. Possible values are: 'Inbound and Outbound'. - """ - - INBOUND = "Inbound" - OUTBOUND = "Outbound" - -class SecurityRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Network protocol this rule applies to. Possible values are 'Tcp', 'Udp', and '*'. - """ - - TCP = "Tcp" - UDP = "Udp" - ASTERISK = "*" - -class ServiceProviderProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The ServiceProviderProvisioningState state of the resource. Possible values are - 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. - """ - - NOT_PROVISIONED = "NotProvisioned" - PROVISIONING = "Provisioning" - PROVISIONED = "Provisioned" - DEPROVISIONING = "Deprovisioning" - -class Severity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The severity of the issue. - """ - - ERROR = "Error" - WARNING = "Warning" - -class TransportProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The transport protocol for the endpoint. Possible values are 'Udp' or 'Tcp' or 'All.' - """ - - UDP = "Udp" - TCP = "Tcp" - ALL = "All" - -class UsageUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """An enum describing the unit of measurement. - """ - - COUNT = "Count" - -class VirtualNetworkGatewayConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Virtual network Gateway connection status - """ - - UNKNOWN = "Unknown" - CONNECTING = "Connecting" - CONNECTED = "Connected" - NOT_CONNECTED = "NotConnected" - -class VirtualNetworkGatewayConnectionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gateway connection type. Possible values are: 'IPsec','Vnet2Vnet','ExpressRoute', and - 'VPNClient. - """ - - I_PSEC = "IPsec" - VNET2_VNET = "Vnet2Vnet" - EXPRESS_ROUTE = "ExpressRoute" - VPN_CLIENT = "VPNClient" - -class VirtualNetworkGatewaySkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gateway SKU name. - """ - - BASIC = "Basic" - HIGH_PERFORMANCE = "HighPerformance" - STANDARD = "Standard" - ULTRA_PERFORMANCE = "UltraPerformance" - VPN_GW1 = "VpnGw1" - VPN_GW2 = "VpnGw2" - VPN_GW3 = "VpnGw3" - -class VirtualNetworkGatewaySkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Gateway SKU tier. - """ - - BASIC = "Basic" - HIGH_PERFORMANCE = "HighPerformance" - STANDARD = "Standard" - ULTRA_PERFORMANCE = "UltraPerformance" - VPN_GW1 = "VpnGw1" - VPN_GW2 = "VpnGw2" - VPN_GW3 = "VpnGw3" - -class VirtualNetworkGatewayType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. - """ - - VPN = "Vpn" - EXPRESS_ROUTE = "ExpressRoute" - -class VirtualNetworkPeeringState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The status of the virtual network peering. Possible values are 'Initiated', 'Connected', and - 'Disconnected'. - """ - - INITIATED = "Initiated" - CONNECTED = "Connected" - DISCONNECTED = "Disconnected" - -class VpnClientProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """VPN client protocol enabled for the virtual network gateway. - """ - - IKE_V2 = "IkeV2" - SSTP = "SSTP" - -class VpnType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """The type of this virtual network gateway. Possible values are: 'PolicyBased' and 'RouteBased'. - """ - - POLICY_BASED = "PolicyBased" - ROUTE_BASED = "RouteBased" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/__init__.py deleted file mode 100644 index 1263809bc3f1..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/__init__.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from ._application_gateways_operations import ApplicationGatewaysOperations -from ._application_security_groups_operations import ApplicationSecurityGroupsOperations -from ._network_management_client_operations import NetworkManagementClientOperationsMixin -from ._available_endpoint_services_operations import AvailableEndpointServicesOperations -from ._express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations -from ._express_route_circuit_peerings_operations import ExpressRouteCircuitPeeringsOperations -from ._express_route_circuits_operations import ExpressRouteCircuitsOperations -from ._express_route_service_providers_operations import ExpressRouteServiceProvidersOperations -from ._load_balancers_operations import LoadBalancersOperations -from ._load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations -from ._load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations -from ._inbound_nat_rules_operations import InboundNatRulesOperations -from ._load_balancer_load_balancing_rules_operations import LoadBalancerLoadBalancingRulesOperations -from ._load_balancer_network_interfaces_operations import LoadBalancerNetworkInterfacesOperations -from ._load_balancer_probes_operations import LoadBalancerProbesOperations -from ._network_interfaces_operations import NetworkInterfacesOperations -from ._network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations -from ._network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations -from ._network_security_groups_operations import NetworkSecurityGroupsOperations -from ._security_rules_operations import SecurityRulesOperations -from ._default_security_rules_operations import DefaultSecurityRulesOperations -from ._network_watchers_operations import NetworkWatchersOperations -from ._packet_captures_operations import PacketCapturesOperations -from ._connection_monitors_operations import ConnectionMonitorsOperations -from ._operations import Operations -from ._public_ip_addresses_operations import PublicIPAddressesOperations -from ._route_filters_operations import RouteFiltersOperations -from ._route_filter_rules_operations import RouteFilterRulesOperations -from ._route_tables_operations import RouteTablesOperations -from ._routes_operations import RoutesOperations -from ._bgp_service_communities_operations import BgpServiceCommunitiesOperations -from ._usages_operations import UsagesOperations -from ._virtual_networks_operations import VirtualNetworksOperations -from ._subnets_operations import SubnetsOperations -from ._virtual_network_peerings_operations import VirtualNetworkPeeringsOperations -from ._virtual_network_gateways_operations import VirtualNetworkGatewaysOperations -from ._virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations -from ._local_network_gateways_operations import LocalNetworkGatewaysOperations - -__all__ = [ - 'ApplicationGatewaysOperations', - 'ApplicationSecurityGroupsOperations', - 'NetworkManagementClientOperationsMixin', - 'AvailableEndpointServicesOperations', - 'ExpressRouteCircuitAuthorizationsOperations', - 'ExpressRouteCircuitPeeringsOperations', - 'ExpressRouteCircuitsOperations', - 'ExpressRouteServiceProvidersOperations', - 'LoadBalancersOperations', - 'LoadBalancerBackendAddressPoolsOperations', - 'LoadBalancerFrontendIPConfigurationsOperations', - 'InboundNatRulesOperations', - 'LoadBalancerLoadBalancingRulesOperations', - 'LoadBalancerNetworkInterfacesOperations', - 'LoadBalancerProbesOperations', - 'NetworkInterfacesOperations', - 'NetworkInterfaceIPConfigurationsOperations', - 'NetworkInterfaceLoadBalancersOperations', - 'NetworkSecurityGroupsOperations', - 'SecurityRulesOperations', - 'DefaultSecurityRulesOperations', - 'NetworkWatchersOperations', - 'PacketCapturesOperations', - 'ConnectionMonitorsOperations', - 'Operations', - 'PublicIPAddressesOperations', - 'RouteFiltersOperations', - 'RouteFilterRulesOperations', - 'RouteTablesOperations', - 'RoutesOperations', - 'BgpServiceCommunitiesOperations', - 'UsagesOperations', - 'VirtualNetworksOperations', - 'SubnetsOperations', - 'VirtualNetworkPeeringsOperations', - 'VirtualNetworkGatewaysOperations', - 'VirtualNetworkGatewayConnectionsOperations', - 'LocalNetworkGatewaysOperations', -] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_default_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_default_security_rules_operations.py deleted file mode 100644 index ed90360f273b..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_default_security_rules_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class DefaultSecurityRulesOperations(object): - """DefaultSecurityRulesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.SecurityRuleListResult"] - """Gets all default security rules in a network security group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.SecurityRuleListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityRuleListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules'} # type: ignore - - def get( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - default_security_rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.SecurityRule" - """Get the specified default network security rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param default_security_rule_name: The name of the default security rule. - :type default_security_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.SecurityRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'defaultSecurityRuleName': self._serialize.url("default_security_rule_name", default_security_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('SecurityRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/defaultSecurityRules/{defaultSecurityRuleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuit_authorizations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuit_authorizations_operations.py deleted file mode 100644 index 0005726ff77f..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuit_authorizations_operations.py +++ /dev/null @@ -1,439 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.mgmt.core.exceptions import ARMErrorFormat -from azure.mgmt.core.polling.arm_polling import ARMPolling - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ExpressRouteCircuitAuthorizationsOperations(object): - """ExpressRouteCircuitAuthorizationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def _delete_initial( - self, - resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified authorization from the specified express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - authorization_name=authorization_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ExpressRouteCircuitAuthorization" - """Gets the specified authorization from the specified express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitAuthorization, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str - authorization_parameters, # type: "_models.ExpressRouteCircuitAuthorization" - **kwargs # type: Any - ): - # type: (...) -> "_models.ExpressRouteCircuitAuthorization" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(authorization_parameters, 'ExpressRouteCircuitAuthorization') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - def begin_create_or_update( - self, - resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str - authorization_parameters, # type: "_models.ExpressRouteCircuitAuthorization" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuitAuthorization"] - """Creates or updates an authorization in the specified express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str - :param authorization_parameters: Parameters supplied to the create or update express route - circuit authorization operation. - :type authorization_parameters: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuitAuthorization or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitAuthorization] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - authorization_name=authorization_name, - authorization_parameters=authorization_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore - - def list( - self, - resource_group_name, # type: str - circuit_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.AuthorizationListResult"] - """Gets all authorizations in an express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either AuthorizationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.AuthorizationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('AuthorizationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_service_providers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_service_providers_operations.py deleted file mode 100644 index 77e784012053..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_service_providers_operations.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class ExpressRouteServiceProvidersOperations(object): - """ExpressRouteServiceProvidersOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ExpressRouteServiceProviderListResult"] - """Gets all the available express route service providers. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteServiceProviderListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ExpressRouteServiceProviderListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteServiceProviderListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteServiceProviderListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteServiceProviders'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_frontend_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_frontend_ip_configurations_operations.py deleted file mode 100644 index 3bbdc5a4d1af..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_frontend_ip_configurations_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class LoadBalancerFrontendIPConfigurationsOperations(object): - """LoadBalancerFrontendIPConfigurationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - load_balancer_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.LoadBalancerFrontendIPConfigurationListResult"] - """Gets all the load balancer frontend IP configurations. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerFrontendIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerFrontendIPConfigurationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerFrontendIPConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerFrontendIPConfigurationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations'} # type: ignore - - def get( - self, - resource_group_name, # type: str - load_balancer_name, # type: str - frontend_ip_configuration_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.FrontendIPConfiguration" - """Gets load balancer frontend IP configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param frontend_ip_configuration_name: The name of the frontend IP configuration. - :type frontend_ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: FrontendIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.FrontendIPConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendIPConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'frontendIPConfigurationName': self._serialize.url("frontend_ip_configuration_name", frontend_ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('FrontendIPConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/frontendIPConfigurations/{frontendIPConfigurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interface_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interface_ip_configurations_operations.py deleted file mode 100644 index 7fe9f7d01ad6..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interface_ip_configurations_operations.py +++ /dev/null @@ -1,184 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class NetworkInterfaceIPConfigurationsOperations(object): - """NetworkInterfaceIPConfigurationsOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - resource_group_name, # type: str - network_interface_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkInterfaceIPConfigurationListResult"] - """Get all ip configurations in a network interface. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfigurationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceIPConfigurationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations'} # type: ignore - - def get( - self, - resource_group_name, # type: str - network_interface_name, # type: str - ip_configuration_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkInterfaceIPConfiguration" - """Gets the specified network interface ip configuration. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the ip configuration name. - :type ip_configuration_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_usages_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_usages_operations.py deleted file mode 100644 index 7d64deeee28e..000000000000 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_usages_operations.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.mgmt.core.exceptions import ARMErrorFormat - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class UsagesOperations(object): - """UsagesOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def list( - self, - location, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.UsagesListResult"] - """List network usages for a subscription. - - :param location: The location where resource usage is queried. - :type location: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.UsagesListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('UsagesListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_12_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_05_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_06_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_07_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_11_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/_version.py index 5bd246a15fc6..f84067011e13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/_version.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "19.1.0" +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/__init__.py similarity index 100% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/__init__.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/__init__.py diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_configuration.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_configuration.py similarity index 98% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_configuration.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_configuration.py index 02b69458ecf3..d3ec9ffb0ec0 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/_configuration.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_configuration.py @@ -48,6 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.api_version = "2021-02-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-network/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_metadata.json b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_metadata.json new file mode 100644 index 000000000000..3b8e77f02a25 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_metadata.json @@ -0,0 +1,121 @@ +{ + "chosen_version": "2021-02-01-preview", + "total_api_version_list": ["2021-02-01-preview"], + "client": { + "name": "NetworkManagementClient", + "filename": "_network_management_client", + "description": "Network Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": false, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "network_managers": "NetworkManagersOperations", + "network_manager_commits": "NetworkManagerCommitsOperations", + "network_manager_deployment_status": "NetworkManagerDeploymentStatusOperations", + "effective_virtual_networks": "EffectiveVirtualNetworksOperations", + "active_connectivity_configurations": "ActiveConnectivityConfigurationsOperations", + "active_security_admin_rules": "ActiveSecurityAdminRulesOperations", + "active_security_user_rules": "ActiveSecurityUserRulesOperations", + "connectivity_configurations": "ConnectivityConfigurationsOperations", + "effective_connectivity_configurations": "EffectiveConnectivityConfigurationsOperations", + "network_manager_effective_security_admin_rules": "NetworkManagerEffectiveSecurityAdminRulesOperations", + "network_groups": "NetworkGroupsOperations", + "security_user_configurations": "SecurityUserConfigurationsOperations", + "user_rule_collections": "UserRuleCollectionsOperations", + "user_rules": "UserRulesOperations", + "security_admin_configurations": "SecurityAdminConfigurationsOperations", + "admin_rule_collections": "AdminRuleCollectionsOperations", + "admin_rules": "AdminRulesOperations", + "network_security_perimeters": "NetworkSecurityPerimetersOperations", + "perimeter_associable_resource_types": "PerimeterAssociableResourceTypesOperations" + } +} \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_network_management_client.py new file mode 100644 index 000000000000..7ff3d3761744 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_network_management_client.py @@ -0,0 +1,178 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import NetworkManagementClientConfiguration +from .operations import NetworkManagersOperations +from .operations import NetworkManagerCommitsOperations +from .operations import NetworkManagerDeploymentStatusOperations +from .operations import EffectiveVirtualNetworksOperations +from .operations import ActiveConnectivityConfigurationsOperations +from .operations import ActiveSecurityAdminRulesOperations +from .operations import ActiveSecurityUserRulesOperations +from .operations import ConnectivityConfigurationsOperations +from .operations import EffectiveConnectivityConfigurationsOperations +from .operations import NetworkManagerEffectiveSecurityAdminRulesOperations +from .operations import NetworkGroupsOperations +from .operations import SecurityUserConfigurationsOperations +from .operations import UserRuleCollectionsOperations +from .operations import UserRulesOperations +from .operations import SecurityAdminConfigurationsOperations +from .operations import AdminRuleCollectionsOperations +from .operations import AdminRulesOperations +from .operations import NetworkSecurityPerimetersOperations +from .operations import PerimeterAssociableResourceTypesOperations +from . import models + + +class NetworkManagementClient(object): + """Network Client. + + :ivar network_managers: NetworkManagersOperations operations + :vartype network_managers: azure.mgmt.network.v2021_02_01_preview.operations.NetworkManagersOperations + :ivar network_manager_commits: NetworkManagerCommitsOperations operations + :vartype network_manager_commits: azure.mgmt.network.v2021_02_01_preview.operations.NetworkManagerCommitsOperations + :ivar network_manager_deployment_status: NetworkManagerDeploymentStatusOperations operations + :vartype network_manager_deployment_status: azure.mgmt.network.v2021_02_01_preview.operations.NetworkManagerDeploymentStatusOperations + :ivar effective_virtual_networks: EffectiveVirtualNetworksOperations operations + :vartype effective_virtual_networks: azure.mgmt.network.v2021_02_01_preview.operations.EffectiveVirtualNetworksOperations + :ivar active_connectivity_configurations: ActiveConnectivityConfigurationsOperations operations + :vartype active_connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.operations.ActiveConnectivityConfigurationsOperations + :ivar active_security_admin_rules: ActiveSecurityAdminRulesOperations operations + :vartype active_security_admin_rules: azure.mgmt.network.v2021_02_01_preview.operations.ActiveSecurityAdminRulesOperations + :ivar active_security_user_rules: ActiveSecurityUserRulesOperations operations + :vartype active_security_user_rules: azure.mgmt.network.v2021_02_01_preview.operations.ActiveSecurityUserRulesOperations + :ivar connectivity_configurations: ConnectivityConfigurationsOperations operations + :vartype connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.operations.ConnectivityConfigurationsOperations + :ivar effective_connectivity_configurations: EffectiveConnectivityConfigurationsOperations operations + :vartype effective_connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.operations.EffectiveConnectivityConfigurationsOperations + :ivar network_manager_effective_security_admin_rules: NetworkManagerEffectiveSecurityAdminRulesOperations operations + :vartype network_manager_effective_security_admin_rules: azure.mgmt.network.v2021_02_01_preview.operations.NetworkManagerEffectiveSecurityAdminRulesOperations + :ivar network_groups: NetworkGroupsOperations operations + :vartype network_groups: azure.mgmt.network.v2021_02_01_preview.operations.NetworkGroupsOperations + :ivar security_user_configurations: SecurityUserConfigurationsOperations operations + :vartype security_user_configurations: azure.mgmt.network.v2021_02_01_preview.operations.SecurityUserConfigurationsOperations + :ivar user_rule_collections: UserRuleCollectionsOperations operations + :vartype user_rule_collections: azure.mgmt.network.v2021_02_01_preview.operations.UserRuleCollectionsOperations + :ivar user_rules: UserRulesOperations operations + :vartype user_rules: azure.mgmt.network.v2021_02_01_preview.operations.UserRulesOperations + :ivar security_admin_configurations: SecurityAdminConfigurationsOperations operations + :vartype security_admin_configurations: azure.mgmt.network.v2021_02_01_preview.operations.SecurityAdminConfigurationsOperations + :ivar admin_rule_collections: AdminRuleCollectionsOperations operations + :vartype admin_rule_collections: azure.mgmt.network.v2021_02_01_preview.operations.AdminRuleCollectionsOperations + :ivar admin_rules: AdminRulesOperations operations + :vartype admin_rules: azure.mgmt.network.v2021_02_01_preview.operations.AdminRulesOperations + :ivar network_security_perimeters: NetworkSecurityPerimetersOperations operations + :vartype network_security_perimeters: azure.mgmt.network.v2021_02_01_preview.operations.NetworkSecurityPerimetersOperations + :ivar perimeter_associable_resource_types: PerimeterAssociableResourceTypesOperations operations + :vartype perimeter_associable_resource_types: azure.mgmt.network.v2021_02_01_preview.operations.PerimeterAssociableResourceTypesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.network_managers = NetworkManagersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_commits = NetworkManagerCommitsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_deployment_status = NetworkManagerDeploymentStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.effective_virtual_networks = EffectiveVirtualNetworksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_connectivity_configurations = ActiveConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_security_admin_rules = ActiveSecurityAdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_security_user_rules = ActiveSecurityUserRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.connectivity_configurations = ConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.effective_connectivity_configurations = EffectiveConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_effective_security_admin_rules = NetworkManagerEffectiveSecurityAdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_groups = NetworkGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_user_configurations = SecurityUserConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_rule_collections = UserRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_rules = UserRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_admin_configurations = SecurityAdminConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.admin_rule_collections = AdminRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.admin_rules = AdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_security_perimeters = NetworkSecurityPerimetersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.perimeter_associable_resource_types = PerimeterAssociableResourceTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> NetworkManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_version.py new file mode 100644 index 000000000000..f84067011e13 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/__init__.py similarity index 100% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/__init__.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/__init__.py diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/_configuration.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_configuration.py similarity index 98% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/_configuration.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_configuration.py index 80a5a857085b..05295a7364a2 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/_configuration.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_configuration.py @@ -45,6 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id + self.api_version = "2021-02-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-network/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_network_management_client.py new file mode 100644 index 000000000000..9de340f52e36 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/_network_management_client.py @@ -0,0 +1,171 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import NetworkManagementClientConfiguration +from .operations import NetworkManagersOperations +from .operations import NetworkManagerCommitsOperations +from .operations import NetworkManagerDeploymentStatusOperations +from .operations import EffectiveVirtualNetworksOperations +from .operations import ActiveConnectivityConfigurationsOperations +from .operations import ActiveSecurityAdminRulesOperations +from .operations import ActiveSecurityUserRulesOperations +from .operations import ConnectivityConfigurationsOperations +from .operations import EffectiveConnectivityConfigurationsOperations +from .operations import NetworkManagerEffectiveSecurityAdminRulesOperations +from .operations import NetworkGroupsOperations +from .operations import SecurityUserConfigurationsOperations +from .operations import UserRuleCollectionsOperations +from .operations import UserRulesOperations +from .operations import SecurityAdminConfigurationsOperations +from .operations import AdminRuleCollectionsOperations +from .operations import AdminRulesOperations +from .operations import NetworkSecurityPerimetersOperations +from .operations import PerimeterAssociableResourceTypesOperations +from .. import models + + +class NetworkManagementClient(object): + """Network Client. + + :ivar network_managers: NetworkManagersOperations operations + :vartype network_managers: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkManagersOperations + :ivar network_manager_commits: NetworkManagerCommitsOperations operations + :vartype network_manager_commits: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkManagerCommitsOperations + :ivar network_manager_deployment_status: NetworkManagerDeploymentStatusOperations operations + :vartype network_manager_deployment_status: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkManagerDeploymentStatusOperations + :ivar effective_virtual_networks: EffectiveVirtualNetworksOperations operations + :vartype effective_virtual_networks: azure.mgmt.network.v2021_02_01_preview.aio.operations.EffectiveVirtualNetworksOperations + :ivar active_connectivity_configurations: ActiveConnectivityConfigurationsOperations operations + :vartype active_connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.ActiveConnectivityConfigurationsOperations + :ivar active_security_admin_rules: ActiveSecurityAdminRulesOperations operations + :vartype active_security_admin_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.ActiveSecurityAdminRulesOperations + :ivar active_security_user_rules: ActiveSecurityUserRulesOperations operations + :vartype active_security_user_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.ActiveSecurityUserRulesOperations + :ivar connectivity_configurations: ConnectivityConfigurationsOperations operations + :vartype connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.ConnectivityConfigurationsOperations + :ivar effective_connectivity_configurations: EffectiveConnectivityConfigurationsOperations operations + :vartype effective_connectivity_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.EffectiveConnectivityConfigurationsOperations + :ivar network_manager_effective_security_admin_rules: NetworkManagerEffectiveSecurityAdminRulesOperations operations + :vartype network_manager_effective_security_admin_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkManagerEffectiveSecurityAdminRulesOperations + :ivar network_groups: NetworkGroupsOperations operations + :vartype network_groups: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkGroupsOperations + :ivar security_user_configurations: SecurityUserConfigurationsOperations operations + :vartype security_user_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.SecurityUserConfigurationsOperations + :ivar user_rule_collections: UserRuleCollectionsOperations operations + :vartype user_rule_collections: azure.mgmt.network.v2021_02_01_preview.aio.operations.UserRuleCollectionsOperations + :ivar user_rules: UserRulesOperations operations + :vartype user_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.UserRulesOperations + :ivar security_admin_configurations: SecurityAdminConfigurationsOperations operations + :vartype security_admin_configurations: azure.mgmt.network.v2021_02_01_preview.aio.operations.SecurityAdminConfigurationsOperations + :ivar admin_rule_collections: AdminRuleCollectionsOperations operations + :vartype admin_rule_collections: azure.mgmt.network.v2021_02_01_preview.aio.operations.AdminRuleCollectionsOperations + :ivar admin_rules: AdminRulesOperations operations + :vartype admin_rules: azure.mgmt.network.v2021_02_01_preview.aio.operations.AdminRulesOperations + :ivar network_security_perimeters: NetworkSecurityPerimetersOperations operations + :vartype network_security_perimeters: azure.mgmt.network.v2021_02_01_preview.aio.operations.NetworkSecurityPerimetersOperations + :ivar perimeter_associable_resource_types: PerimeterAssociableResourceTypesOperations operations + :vartype perimeter_associable_resource_types: azure.mgmt.network.v2021_02_01_preview.aio.operations.PerimeterAssociableResourceTypesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.network_managers = NetworkManagersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_commits = NetworkManagerCommitsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_deployment_status = NetworkManagerDeploymentStatusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.effective_virtual_networks = EffectiveVirtualNetworksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_connectivity_configurations = ActiveConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_security_admin_rules = ActiveSecurityAdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.active_security_user_rules = ActiveSecurityUserRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.connectivity_configurations = ConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.effective_connectivity_configurations = EffectiveConnectivityConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_manager_effective_security_admin_rules = NetworkManagerEffectiveSecurityAdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_groups = NetworkGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_user_configurations = SecurityUserConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_rule_collections = UserRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.user_rules = UserRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_admin_configurations = SecurityAdminConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.admin_rule_collections = AdminRuleCollectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.admin_rules = AdminRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_security_perimeters = NetworkSecurityPerimetersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.perimeter_associable_resource_types = PerimeterAssociableResourceTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "NetworkManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/__init__.py new file mode 100644 index 000000000000..e3ab4d13aca9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/__init__.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._network_managers_operations import NetworkManagersOperations +from ._network_manager_commits_operations import NetworkManagerCommitsOperations +from ._network_manager_deployment_status_operations import NetworkManagerDeploymentStatusOperations +from ._effective_virtual_networks_operations import EffectiveVirtualNetworksOperations +from ._active_connectivity_configurations_operations import ActiveConnectivityConfigurationsOperations +from ._active_security_admin_rules_operations import ActiveSecurityAdminRulesOperations +from ._active_security_user_rules_operations import ActiveSecurityUserRulesOperations +from ._connectivity_configurations_operations import ConnectivityConfigurationsOperations +from ._effective_connectivity_configurations_operations import EffectiveConnectivityConfigurationsOperations +from ._network_manager_effective_security_admin_rules_operations import NetworkManagerEffectiveSecurityAdminRulesOperations +from ._network_groups_operations import NetworkGroupsOperations +from ._security_user_configurations_operations import SecurityUserConfigurationsOperations +from ._user_rule_collections_operations import UserRuleCollectionsOperations +from ._user_rules_operations import UserRulesOperations +from ._security_admin_configurations_operations import SecurityAdminConfigurationsOperations +from ._admin_rule_collections_operations import AdminRuleCollectionsOperations +from ._admin_rules_operations import AdminRulesOperations +from ._network_security_perimeters_operations import NetworkSecurityPerimetersOperations +from ._perimeter_associable_resource_types_operations import PerimeterAssociableResourceTypesOperations + +__all__ = [ + 'NetworkManagersOperations', + 'NetworkManagerCommitsOperations', + 'NetworkManagerDeploymentStatusOperations', + 'EffectiveVirtualNetworksOperations', + 'ActiveConnectivityConfigurationsOperations', + 'ActiveSecurityAdminRulesOperations', + 'ActiveSecurityUserRulesOperations', + 'ConnectivityConfigurationsOperations', + 'EffectiveConnectivityConfigurationsOperations', + 'NetworkManagerEffectiveSecurityAdminRulesOperations', + 'NetworkGroupsOperations', + 'SecurityUserConfigurationsOperations', + 'UserRuleCollectionsOperations', + 'UserRulesOperations', + 'SecurityAdminConfigurationsOperations', + 'AdminRuleCollectionsOperations', + 'AdminRulesOperations', + 'NetworkSecurityPerimetersOperations', + 'PerimeterAssociableResourceTypesOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_connectivity_configurations_operations.py new file mode 100644 index 000000000000..3abf2e351531 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_connectivity_configurations_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ActiveConnectivityConfigurationsOperations: + """ActiveConnectivityConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.ActiveConfigurationParameter", + **kwargs: Any + ) -> "_models.ActiveConnectivityConfigurationsListResult": + """Lists active connectivity configurations in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveConnectivityConfigurationsListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConnectivityConfigurationsListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveConnectivityConfigurationsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveConnectivityConfigurationsListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveConnectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_admin_rules_operations.py new file mode 100644 index 000000000000..23e9a9b4987e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_admin_rules_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ActiveSecurityAdminRulesOperations: + """ActiveSecurityAdminRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.ActiveConfigurationParameter", + **kwargs: Any + ) -> "_models.ActiveSecurityAdminRulesListResult": + """Lists active security admin rules in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveSecurityAdminRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveSecurityAdminRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveSecurityAdminRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveSecurityAdminRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityAdminRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_user_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_user_rules_operations.py new file mode 100644 index 000000000000..8cef3bdce40a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_active_security_user_rules_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ActiveSecurityUserRulesOperations: + """ActiveSecurityUserRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.ActiveConfigurationParameter", + **kwargs: Any + ) -> "_models.ActiveSecurityUserRulesListResult": + """Lists Active Security User Rules in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveSecurityUserRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveSecurityUserRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveSecurityUserRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveSecurityUserRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityUserRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rule_collections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rule_collections_operations.py new file mode 100644 index 000000000000..eca2c67749c3 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rule_collections_operations.py @@ -0,0 +1,343 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AdminRuleCollectionsOperations: + """AdminRuleCollectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.RuleCollectionListResult"]: + """Lists all the rule collections in a security admin configuration, in a paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RuleCollectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RuleCollectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> "_models.RuleCollection": + """Gets a network manager security admin configuration rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_collection: "_models.RuleCollection", + **kwargs: Any + ) -> "_models.RuleCollection": + """Creates or updates an admin rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. + :type rule_collection: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(rule_collection, 'RuleCollection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> None: + """Deletes an admin rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rules_operations.py new file mode 100644 index 000000000000..4d41ba8a9b60 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_admin_rules_operations.py @@ -0,0 +1,360 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AdminRulesOperations: + """AdminRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.AdminRuleListResult"]: + """List all network manager security configuration admin rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AdminRuleListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AdminRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AdminRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> "_models.BaseAdminRule": + """Gets a network manager security configuration admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseAdminRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseAdminRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + admin_rule: "_models.BaseAdminRule", + **kwargs: Any + ) -> "_models.BaseAdminRule": + """Creates or updates an admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param admin_rule: The admin rule to create or update. + :type admin_rule: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseAdminRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseAdminRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(admin_rule, 'BaseAdminRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> None: + """Deletes an admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_connectivity_configurations_operations.py new file mode 100644 index 000000000000..7aaf0f0a2c51 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_connectivity_configurations_operations.py @@ -0,0 +1,327 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ConnectivityConfigurationsOperations: + """ConnectivityConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> "_models.ConnectivityConfiguration": + """Gets a Network Connectivity Configuration, specified by the resource group, network manager + name, and connectivity Configuration name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectivityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + connectivity_configuration: "_models.ConnectivityConfiguration", + **kwargs: Any + ) -> "_models.ConnectivityConfiguration": + """Creates/Updates a new network manager connectivity configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :param connectivity_configuration: Parameters supplied to create/update a network manager + connectivity configuration. + :type connectivity_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectivityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connectivity_configuration, 'ConnectivityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> None: + """Deletes a network manager connectivity configuration, specified by the resource group, network + manager name, and connectivity configuration name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + def list( + self, + resource_group_name: str, + network_manager_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ConnectivityConfigurationListResult"]: + """Lists all the network manager connectivity configuration in a specified network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConnectivityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ConnectivityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_connectivity_configurations_operations.py new file mode 100644 index 000000000000..a25307a90642 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_connectivity_configurations_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EffectiveConnectivityConfigurationsOperations: + """EffectiveConnectivityConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.QueryRequestOptions", + **kwargs: Any + ) -> "_models.NetworkManagerEffectiveConnectivityConfigurationListResult": + """List all effective connectivity configurations applied on a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerEffectiveConnectivityConfigurationListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerEffectiveConnectivityConfigurationListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerEffectiveConnectivityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerEffectiveConnectivityConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveConnectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_virtual_networks_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_virtual_networks_operations.py new file mode 100644 index 000000000000..7f424f19c79e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_effective_virtual_networks_operations.py @@ -0,0 +1,190 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class EffectiveVirtualNetworksOperations: + """EffectiveVirtualNetworksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_by_network_manager( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.EffectiveVirtualNetworksParameter", + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> "_models.EffectiveVirtualNetworksListResult": + """List effective virtual networks in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Effective Virtual Networks Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksParameter + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EffectiveVirtualNetworksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveVirtualNetworksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_by_network_manager.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'EffectiveVirtualNetworksParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EffectiveVirtualNetworksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_network_manager.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listEffectiveVirtualNetworks'} # type: ignore + + async def list_by_network_group( + self, + resource_group_name: str, + network_manager_name: str, + network_group_name: str, + parameters: "_models.QueryRequestOptions", + **kwargs: Any + ) -> "_models.EffectiveVirtualNetworksListResult": + """Lists all effective virtual networks by specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EffectiveVirtualNetworksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveVirtualNetworksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_by_network_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EffectiveVirtualNetworksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_network_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/listEffectiveVirtualNetworks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_groups_operations.py new file mode 100644 index 000000000000..5393f2574ab9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_groups_operations.py @@ -0,0 +1,334 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkGroupsOperations: + """NetworkGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + network_group_name: str, + **kwargs: Any + ) -> "_models.NetworkGroup": + """Gets the specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + network_group_name: str, + parameters: "_models.NetworkGroup", + if_match: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkGroup": + """Creates or updates a network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :param parameters: Parameters supplied to the specify which network group need to create. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :param if_match: The ETag of the transformation. Omit this value to always overwrite the + current resource. Specify the last-seen ETag value to prevent accidentally overwriting + concurrent changes. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if response.status_code == 201: + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + network_group_name: str, + **kwargs: Any + ) -> None: + """Deletes a network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + def list( + self, + resource_group_name: str, + network_manager_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkGroupListResult"]: + """Lists the specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkGroupListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_commits_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_commits_operations.py new file mode 100644 index 000000000000..edb5e278cd4b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_commits_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerCommitsOperations: + """NetworkManagerCommitsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def post( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.NetworkManagerCommit", + **kwargs: Any + ) -> "_models.NetworkManagerCommit": + """Post a Network Manager Commit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network commit is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerCommit + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerCommit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerCommit + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerCommit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManagerCommit') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerCommit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commit'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_deployment_status_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_deployment_status_operations.py new file mode 100644 index 000000000000..217199348e4a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_deployment_status_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerDeploymentStatusOperations: + """NetworkManagerDeploymentStatusOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.NetworkManagerDeploymentStatusParameter", + **kwargs: Any + ) -> "_models.NetworkManagerDeploymentStatusListResult": + """Post to List of Network Manager Deployment Status. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network deployment status is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatusParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerDeploymentStatusListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatusListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerDeploymentStatusListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManagerDeploymentStatusParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerDeploymentStatusListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listDeploymentStatus'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_effective_security_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_effective_security_admin_rules_operations.py new file mode 100644 index 000000000000..0d2ea7723710 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_manager_effective_security_admin_rules_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerEffectiveSecurityAdminRulesOperations: + """NetworkManagerEffectiveSecurityAdminRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + virtual_network_name: str, + parameters: "_models.QueryRequestOptions", + **kwargs: Any + ) -> "_models.NetworkManagerEffectiveSecurityAdminRulesListResult": + """List all effective security admin rules applied on a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerEffectiveSecurityAdminRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerEffectiveSecurityAdminRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerEffectiveSecurityAdminRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerEffectiveSecurityAdminRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveSecurityAdminRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_managers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_managers_operations.py new file mode 100644 index 000000000000..922ec5fdb525 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_managers_operations.py @@ -0,0 +1,453 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagersOperations: + """NetworkManagersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + **kwargs: Any + ) -> "_models.NetworkManager": + """Gets the specified Network Manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.NetworkManager", + **kwargs: Any + ) -> "_models.NetworkManager": + """Creates or updates a Network Manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which network manager is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManager') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + **kwargs: Any + ) -> None: + """Deletes a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + async def patch_tags( + self, + resource_group_name: str, + network_manager_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkManager": + """Patch a NetworkManager Tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to update network manager tags. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def list_by_subscription( + self, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkManagerListResult"]: + """List all network managers in a subscription. + + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkManagerListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkManagerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagers'} # type: ignore + + def list( + self, + resource_group_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkManagerListResult"]: + """List network managers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkManagerListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkManagerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_security_perimeters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_security_perimeters_operations.py new file mode 100644 index 000000000000..e848ca499c6b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_network_security_perimeters_operations.py @@ -0,0 +1,387 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkSecurityPerimetersOperations: + """NetworkSecurityPerimetersOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + network_security_perimeter_name: str, + **kwargs: Any + ) -> "_models.NetworkSecurityPerimeter": + """Gets the specified network security perimeter by the name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_security_perimeter_name: str, + parameters: "_models.NetworkSecurityPerimeter", + **kwargs: Any + ) -> "_models.NetworkSecurityPerimeter": + """Creates or updates a Network Security Perimeter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :param parameters: Parameter supplied to create or update the network security perimeter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkSecurityPerimeter') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_security_perimeter_name: str, + **kwargs: Any + ) -> None: + """Deletes a network security perimeter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + def list_by_subscription( + self, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkSecurityPerimeterListResult"]: + """List all network security perimeters in a subscription. + + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkSecurityPerimeterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters'} # type: ignore + + def list( + self, + resource_group_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkSecurityPerimeterListResult"]: + """List network security perimeters in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkSecurityPerimeterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_perimeter_associable_resource_types_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_perimeter_associable_resource_types_operations.py new file mode 100644 index 000000000000..7052642970c2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_perimeter_associable_resource_types_operations.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PerimeterAssociableResourceTypesOperations: + """PerimeterAssociableResourceTypesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + location: str, + **kwargs: Any + ) -> "_models.PerimeterAssociableResourcesListResult": + """Gets the list of resources that are onboarded with NSP. These resources can be associated with + a network security perimeter. + + :param location: The location of the where the association is present. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PerimeterAssociableResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.PerimeterAssociableResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerimeterAssociableResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PerimeterAssociableResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_admin_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_admin_configurations_operations.py new file mode 100644 index 000000000000..1376e034b69e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_admin_configurations_operations.py @@ -0,0 +1,325 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SecurityAdminConfigurationsOperations: + """SecurityAdminConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.SecurityConfigurationListResult"]: + """Lists all the network manager security admin configurations in a network manager, in a + paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SecurityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> "_models.SecurityConfiguration": + """Retrieves a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + security_admin_configuration: "_models.SecurityConfiguration", + **kwargs: Any + ) -> "_models.SecurityConfiguration": + """Creates or updates a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param security_admin_configuration: The security admin configuration to create or update. + :type security_admin_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(security_admin_configuration, 'SecurityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> None: + """Deletes a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_user_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_user_configurations_operations.py new file mode 100644 index 000000000000..90c23233f465 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_security_user_configurations_operations.py @@ -0,0 +1,325 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class SecurityUserConfigurationsOperations: + """SecurityUserConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.SecurityConfigurationListResult"]: + """Lists all the network manager security user configurations in a network manager, in a paginated + format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SecurityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> "_models.SecurityConfiguration": + """Retrieves a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + security_user_configuration: "_models.SecurityConfiguration", + **kwargs: Any + ) -> "_models.SecurityConfiguration": + """Creates or updates a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param security_user_configuration: The security user configuration to create or update. + :type security_user_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(security_user_configuration, 'SecurityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + **kwargs: Any + ) -> None: + """Deletes a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rule_collections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rule_collections_operations.py new file mode 100644 index 000000000000..ef488639df0a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rule_collections_operations.py @@ -0,0 +1,343 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class UserRuleCollectionsOperations: + """UserRuleCollectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.RuleCollectionListResult"]: + """Lists all the user rule collections in a security configuration, in a paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RuleCollectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('RuleCollectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> "_models.RuleCollection": + """Gets a network manager security user configuration rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + user_rule_collection: "_models.RuleCollection", + **kwargs: Any + ) -> "_models.RuleCollection": + """Creates or updates a user rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param user_rule_collection: The User Rule Collection to create or update. + :type user_rule_collection: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_rule_collection, 'RuleCollection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + **kwargs: Any + ) -> None: + """Deletes a user rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rules_operations.py new file mode 100644 index 000000000000..895b099aca7b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/aio/operations/_user_rules_operations.py @@ -0,0 +1,360 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class UserRulesOperations: + """UserRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + top: Optional[int] = None, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.UserRuleListResult"]: + """Lists all user rules in a rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UserRuleListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.UserRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('UserRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> "_models.BaseUserRule": + """Gets a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseUserRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseUserRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + user_rule: "_models.BaseUserRule", + **kwargs: Any + ) -> "_models.BaseUserRule": + """Creates or updates a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param user_rule: The user rule to create or update. + :type user_rule: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseUserRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseUserRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_rule, 'BaseUserRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + network_manager_name: str, + configuration_name: str, + rule_collection_name: str, + rule_name: str, + **kwargs: Any + ) -> None: + """Deletes a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/__init__.py new file mode 100644 index 000000000000..a0e46b4c3056 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/__init__.py @@ -0,0 +1,233 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import ActiveBaseSecurityAdminRule + from ._models_py3 import ActiveBaseSecurityUserRule + from ._models_py3 import ActiveConfigurationParameter + from ._models_py3 import ActiveConnectivityConfiguration + from ._models_py3 import ActiveConnectivityConfigurationsListResult + from ._models_py3 import ActiveDefaultSecurityAdminRule + from ._models_py3 import ActiveDefaultSecurityUserRule + from ._models_py3 import ActiveSecurityAdminRule + from ._models_py3 import ActiveSecurityAdminRulesListResult + from ._models_py3 import ActiveSecurityUserRule + from ._models_py3 import ActiveSecurityUserRulesListResult + from ._models_py3 import AddressPrefixItem + from ._models_py3 import AdminRule + from ._models_py3 import AdminRuleListResult + from ._models_py3 import BaseAdminRule + from ._models_py3 import BaseUserRule + from ._models_py3 import CloudErrorBody + from ._models_py3 import ConfigurationGroup + from ._models_py3 import ConnectivityConfiguration + from ._models_py3 import ConnectivityConfigurationListResult + from ._models_py3 import ConnectivityGroupItem + from ._models_py3 import DefaultAdminRule + from ._models_py3 import DefaultUserRule + from ._models_py3 import EffectiveBaseSecurityAdminRule + from ._models_py3 import EffectiveConnectivityConfiguration + from ._models_py3 import EffectiveDefaultSecurityAdminRule + from ._models_py3 import EffectiveSecurityAdminRule + from ._models_py3 import EffectiveVirtualNetwork + from ._models_py3 import EffectiveVirtualNetworksListResult + from ._models_py3 import EffectiveVirtualNetworksParameter + from ._models_py3 import GroupMembersItem + from ._models_py3 import Hub + from ._models_py3 import NetworkGroup + from ._models_py3 import NetworkGroupListResult + from ._models_py3 import NetworkManager + from ._models_py3 import NetworkManagerCommit + from ._models_py3 import NetworkManagerDeploymentStatus + from ._models_py3 import NetworkManagerDeploymentStatusListResult + from ._models_py3 import NetworkManagerDeploymentStatusParameter + from ._models_py3 import NetworkManagerEffectiveConnectivityConfigurationListResult + from ._models_py3 import NetworkManagerEffectiveSecurityAdminRulesListResult + from ._models_py3 import NetworkManagerListResult + from ._models_py3 import NetworkManagerPropertiesNetworkManagerScopes + from ._models_py3 import NetworkManagerSecurityGroupItem + from ._models_py3 import NetworkSecurityPerimeter + from ._models_py3 import NetworkSecurityPerimeterListResult + from ._models_py3 import PerimeterAssociableResource + from ._models_py3 import PerimeterAssociableResourcesListResult + from ._models_py3 import ProxyResource + from ._models_py3 import QueryRequestOptions + from ._models_py3 import Resource + from ._models_py3 import RuleCollection + from ._models_py3 import RuleCollectionListResult + from ._models_py3 import SecurityConfiguration + from ._models_py3 import SecurityConfigurationListResult + from ._models_py3 import SystemData + from ._models_py3 import TagsObject + from ._models_py3 import UserRule + from ._models_py3 import UserRuleListResult +except (SyntaxError, ImportError): + from ._models import ActiveBaseSecurityAdminRule # type: ignore + from ._models import ActiveBaseSecurityUserRule # type: ignore + from ._models import ActiveConfigurationParameter # type: ignore + from ._models import ActiveConnectivityConfiguration # type: ignore + from ._models import ActiveConnectivityConfigurationsListResult # type: ignore + from ._models import ActiveDefaultSecurityAdminRule # type: ignore + from ._models import ActiveDefaultSecurityUserRule # type: ignore + from ._models import ActiveSecurityAdminRule # type: ignore + from ._models import ActiveSecurityAdminRulesListResult # type: ignore + from ._models import ActiveSecurityUserRule # type: ignore + from ._models import ActiveSecurityUserRulesListResult # type: ignore + from ._models import AddressPrefixItem # type: ignore + from ._models import AdminRule # type: ignore + from ._models import AdminRuleListResult # type: ignore + from ._models import BaseAdminRule # type: ignore + from ._models import BaseUserRule # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import ConfigurationGroup # type: ignore + from ._models import ConnectivityConfiguration # type: ignore + from ._models import ConnectivityConfigurationListResult # type: ignore + from ._models import ConnectivityGroupItem # type: ignore + from ._models import DefaultAdminRule # type: ignore + from ._models import DefaultUserRule # type: ignore + from ._models import EffectiveBaseSecurityAdminRule # type: ignore + from ._models import EffectiveConnectivityConfiguration # type: ignore + from ._models import EffectiveDefaultSecurityAdminRule # type: ignore + from ._models import EffectiveSecurityAdminRule # type: ignore + from ._models import EffectiveVirtualNetwork # type: ignore + from ._models import EffectiveVirtualNetworksListResult # type: ignore + from ._models import EffectiveVirtualNetworksParameter # type: ignore + from ._models import GroupMembersItem # type: ignore + from ._models import Hub # type: ignore + from ._models import NetworkGroup # type: ignore + from ._models import NetworkGroupListResult # type: ignore + from ._models import NetworkManager # type: ignore + from ._models import NetworkManagerCommit # type: ignore + from ._models import NetworkManagerDeploymentStatus # type: ignore + from ._models import NetworkManagerDeploymentStatusListResult # type: ignore + from ._models import NetworkManagerDeploymentStatusParameter # type: ignore + from ._models import NetworkManagerEffectiveConnectivityConfigurationListResult # type: ignore + from ._models import NetworkManagerEffectiveSecurityAdminRulesListResult # type: ignore + from ._models import NetworkManagerListResult # type: ignore + from ._models import NetworkManagerPropertiesNetworkManagerScopes # type: ignore + from ._models import NetworkManagerSecurityGroupItem # type: ignore + from ._models import NetworkSecurityPerimeter # type: ignore + from ._models import NetworkSecurityPerimeterListResult # type: ignore + from ._models import PerimeterAssociableResource # type: ignore + from ._models import PerimeterAssociableResourcesListResult # type: ignore + from ._models import ProxyResource # type: ignore + from ._models import QueryRequestOptions # type: ignore + from ._models import Resource # type: ignore + from ._models import RuleCollection # type: ignore + from ._models import RuleCollectionListResult # type: ignore + from ._models import SecurityConfiguration # type: ignore + from ._models import SecurityConfigurationListResult # type: ignore + from ._models import SystemData # type: ignore + from ._models import TagsObject # type: ignore + from ._models import UserRule # type: ignore + from ._models import UserRuleListResult # type: ignore + +from ._network_management_client_enums import ( + AddressPrefixType, + AdminRuleKind, + ConfigurationType, + ConnectivityTopology, + CreatedByType, + DeleteExistingNSGs, + DeleteExistingPeering, + DeploymentStatus, + EffectiveAdminRuleKind, + EffectiveUserRuleKind, + GroupConnectivity, + IsGlobal, + MembershipType, + ProvisioningState, + SecurityConfigurationRuleAccess, + SecurityConfigurationRuleDirection, + SecurityConfigurationRuleProtocol, + SecurityType, + UseHubGateway, + UserRuleKind, +) + +__all__ = [ + 'ActiveBaseSecurityAdminRule', + 'ActiveBaseSecurityUserRule', + 'ActiveConfigurationParameter', + 'ActiveConnectivityConfiguration', + 'ActiveConnectivityConfigurationsListResult', + 'ActiveDefaultSecurityAdminRule', + 'ActiveDefaultSecurityUserRule', + 'ActiveSecurityAdminRule', + 'ActiveSecurityAdminRulesListResult', + 'ActiveSecurityUserRule', + 'ActiveSecurityUserRulesListResult', + 'AddressPrefixItem', + 'AdminRule', + 'AdminRuleListResult', + 'BaseAdminRule', + 'BaseUserRule', + 'CloudErrorBody', + 'ConfigurationGroup', + 'ConnectivityConfiguration', + 'ConnectivityConfigurationListResult', + 'ConnectivityGroupItem', + 'DefaultAdminRule', + 'DefaultUserRule', + 'EffectiveBaseSecurityAdminRule', + 'EffectiveConnectivityConfiguration', + 'EffectiveDefaultSecurityAdminRule', + 'EffectiveSecurityAdminRule', + 'EffectiveVirtualNetwork', + 'EffectiveVirtualNetworksListResult', + 'EffectiveVirtualNetworksParameter', + 'GroupMembersItem', + 'Hub', + 'NetworkGroup', + 'NetworkGroupListResult', + 'NetworkManager', + 'NetworkManagerCommit', + 'NetworkManagerDeploymentStatus', + 'NetworkManagerDeploymentStatusListResult', + 'NetworkManagerDeploymentStatusParameter', + 'NetworkManagerEffectiveConnectivityConfigurationListResult', + 'NetworkManagerEffectiveSecurityAdminRulesListResult', + 'NetworkManagerListResult', + 'NetworkManagerPropertiesNetworkManagerScopes', + 'NetworkManagerSecurityGroupItem', + 'NetworkSecurityPerimeter', + 'NetworkSecurityPerimeterListResult', + 'PerimeterAssociableResource', + 'PerimeterAssociableResourcesListResult', + 'ProxyResource', + 'QueryRequestOptions', + 'Resource', + 'RuleCollection', + 'RuleCollectionListResult', + 'SecurityConfiguration', + 'SecurityConfigurationListResult', + 'SystemData', + 'TagsObject', + 'UserRule', + 'UserRuleListResult', + 'AddressPrefixType', + 'AdminRuleKind', + 'ConfigurationType', + 'ConnectivityTopology', + 'CreatedByType', + 'DeleteExistingNSGs', + 'DeleteExistingPeering', + 'DeploymentStatus', + 'EffectiveAdminRuleKind', + 'EffectiveUserRuleKind', + 'GroupConnectivity', + 'IsGlobal', + 'MembershipType', + 'ProvisioningState', + 'SecurityConfigurationRuleAccess', + 'SecurityConfigurationRuleDirection', + 'SecurityConfigurationRuleProtocol', + 'SecurityType', + 'UseHubGateway', + 'UserRuleKind', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models.py new file mode 100644 index 000000000000..c84460c52695 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models.py @@ -0,0 +1,2956 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 msrest.serialization + + +class ActiveBaseSecurityAdminRule(msrest.serialization.Model): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ActiveSecurityAdminRule, ActiveDefaultSecurityAdminRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'ActiveSecurityAdminRule', 'Default': 'ActiveDefaultSecurityAdminRule'} + } + + def __init__( + self, + **kwargs + ): + super(ActiveBaseSecurityAdminRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.commit_time = kwargs.get('commit_time', None) + self.region = kwargs.get('region', None) + self.configuration_display_name = kwargs.get('configuration_display_name', None) + self.configuration_description = kwargs.get('configuration_description', None) + self.rule_collection_display_name = kwargs.get('rule_collection_display_name', None) + self.rule_collection_description = kwargs.get('rule_collection_description', None) + self.rule_collection_applies_to_groups = kwargs.get('rule_collection_applies_to_groups', None) + self.rule_groups = kwargs.get('rule_groups', None) + self.kind = None # type: Optional[str] + + +class ActiveBaseSecurityUserRule(msrest.serialization.Model): + """Network base rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ActiveSecurityUserRule, ActiveDefaultSecurityUserRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'ActiveSecurityUserRule', 'Default': 'ActiveDefaultSecurityUserRule'} + } + + def __init__( + self, + **kwargs + ): + super(ActiveBaseSecurityUserRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.commit_time = kwargs.get('commit_time', None) + self.region = kwargs.get('region', None) + self.configuration_display_name = kwargs.get('configuration_display_name', None) + self.configuration_description = kwargs.get('configuration_description', None) + self.rule_collection_display_name = kwargs.get('rule_collection_display_name', None) + self.rule_collection_description = kwargs.get('rule_collection_description', None) + self.rule_collection_applies_to_groups = kwargs.get('rule_collection_applies_to_groups', None) + self.rule_groups = kwargs.get('rule_groups', None) + self.kind = None # type: Optional[str] + + +class ActiveConfigurationParameter(msrest.serialization.Model): + """Effective Virtual Networks Parameter. + + :param regions: List of regions. + :type regions: list[str] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveConfigurationParameter, self).__init__(**kwargs) + self.regions = kwargs.get('regions', None) + self.skip_token = kwargs.get('skip_token', None) + + +class EffectiveConnectivityConfiguration(msrest.serialization.Model): + """The network manager effective connectivity configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param configuration_groups: Effective configuration groups. + :type configuration_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_groups': {'key': 'configurationGroups', 'type': '[ConfigurationGroup]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveConnectivityConfiguration, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.configuration_groups = kwargs.get('configuration_groups', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.connectivity_topology = kwargs.get('connectivity_topology', None) + self.hubs = kwargs.get('hubs', None) + self.is_global = kwargs.get('is_global', None) + self.applies_to_groups = kwargs.get('applies_to_groups', None) + self.provisioning_state = None + self.delete_existing_peering = kwargs.get('delete_existing_peering', None) + + +class ActiveConnectivityConfiguration(EffectiveConnectivityConfiguration): + """Active connectivity configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param configuration_groups: Effective configuration groups. + :type configuration_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_groups': {'key': 'configurationGroups', 'type': '[ConfigurationGroup]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveConnectivityConfiguration, self).__init__(**kwargs) + self.commit_time = kwargs.get('commit_time', None) + self.region = kwargs.get('region', None) + + +class ActiveConnectivityConfigurationsListResult(msrest.serialization.Model): + """Result of the request to list active connectivity configurations. It contains a list of active connectivity configurations and a skiptoken to get the next set of results. + + :param value: Gets a page of active connectivity configurations. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveConnectivityConfiguration] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveConnectivityConfiguration]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveConnectivityConfigurationsListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class ActiveDefaultSecurityAdminRule(ActiveBaseSecurityAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveDefaultSecurityAdminRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class ActiveDefaultSecurityUserRule(ActiveBaseSecurityUserRule): + """Network security default user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveDefaultSecurityUserRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.direction = None + self.provisioning_state = None + + +class ActiveSecurityAdminRule(ActiveBaseSecurityAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveSecurityAdminRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.access = kwargs.get('access', None) + self.priority = kwargs.get('priority', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class ActiveSecurityAdminRulesListResult(msrest.serialization.Model): + """Result of the request to list active security admin rules. It contains a list of active security admin rules and a skiptoken to get the next set of results. + + :param value: Gets a page of active security admin rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveBaseSecurityAdminRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveBaseSecurityAdminRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveSecurityAdminRulesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class ActiveSecurityUserRule(ActiveBaseSecurityUserRule): + """Network security user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveSecurityUserRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class ActiveSecurityUserRulesListResult(msrest.serialization.Model): + """Result of the request to list active security user rules. It contains a list of active security user rules and a skiptoken to get the next set of results. + + :param value: Gets a page of active security user rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveBaseSecurityUserRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveBaseSecurityUserRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ActiveSecurityUserRulesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class AddressPrefixItem(msrest.serialization.Model): + """Address prefix item. + + :param address_prefix: Address prefix. + :type address_prefix: str + :param address_prefix_type: Address prefix type. Possible values include: "IPPrefix", + "ServiceTag". + :type address_prefix_type: str or + ~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixType + """ + + _attribute_map = { + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + 'address_prefix_type': {'key': 'addressPrefixType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressPrefixItem, self).__init__(**kwargs) + self.address_prefix = kwargs.get('address_prefix', None) + self.address_prefix_type = kwargs.get('address_prefix_type', None) + + +class ProxyResource(msrest.serialization.Model): + """Proxy resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class BaseAdminRule(ProxyResource): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdminRule, DefaultAdminRule. + + 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. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'Custom': 'AdminRule', 'Default': 'DefaultAdminRule'} + } + + def __init__( + self, + **kwargs + ): + super(BaseAdminRule, self).__init__(**kwargs) + self.kind = 'BaseAdminRule' # type: str + self.system_data = None + + +class AdminRule(BaseAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdminRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.access = kwargs.get('access', None) + self.priority = kwargs.get('priority', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class AdminRuleListResult(msrest.serialization.Model): + """security configuration admin rule list result. + + :param value: A list of admin rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BaseAdminRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AdminRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class BaseUserRule(ProxyResource): + """Network base rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: UserRule, DefaultUserRule. + + 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. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'Custom': 'UserRule', 'Default': 'DefaultUserRule'} + } + + def __init__( + self, + **kwargs + ): + super(BaseUserRule, self).__init__(**kwargs) + self.kind = 'BaseUserRule' # type: str + self.system_data = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.network.v2021_02_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class ConfigurationGroup(msrest.serialization.Model): + """The network configuration group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param display_name: A friendly name for the network group. + :type display_name: str + :param description: A description of the network group. + :type description: str + :param member_type: Group member type. + :type member_type: str + :param group_members: Group members of network group. + :type group_members: list[~azure.mgmt.network.v2021_02_01_preview.models.GroupMembersItem] + :param conditional_membership: Network group conditional filter. + :type conditional_membership: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'member_type': {'key': 'properties.memberType', 'type': 'str'}, + 'group_members': {'key': 'properties.groupMembers', 'type': '[GroupMembersItem]'}, + 'conditional_membership': {'key': 'properties.conditionalMembership', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConfigurationGroup, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.member_type = kwargs.get('member_type', None) + self.group_members = kwargs.get('group_members', None) + self.conditional_membership = kwargs.get('conditional_membership', None) + self.provisioning_state = None + + +class ConnectivityConfiguration(ProxyResource): + """The network manager connectivity configuration resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityConfiguration, self).__init__(**kwargs) + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.connectivity_topology = kwargs.get('connectivity_topology', None) + self.hubs = kwargs.get('hubs', None) + self.is_global = kwargs.get('is_global', None) + self.applies_to_groups = kwargs.get('applies_to_groups', None) + self.provisioning_state = None + self.delete_existing_peering = kwargs.get('delete_existing_peering', None) + + +class ConnectivityConfigurationListResult(msrest.serialization.Model): + """Result of the request to list network manager connectivity configurations. It contains a list of configurations and a link to get the next set of results. + + :param value: Gets a page of Connectivity Configurations. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectivityConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ConnectivityGroupItem(msrest.serialization.Model): + """ConnectivityGroupItem. + + :param network_group_id: Network group Id. + :type network_group_id: str + :param use_hub_gateway: Flag if need to use hub gateway. Possible values include: "False", + "True". + :type use_hub_gateway: str or ~azure.mgmt.network.v2021_02_01_preview.models.UseHubGateway + :param is_global: Flag if global is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param group_connectivity: Group connectivity type. Possible values include: "None", + "DirectlyConnected". + :type group_connectivity: str or + ~azure.mgmt.network.v2021_02_01_preview.models.GroupConnectivity + """ + + _attribute_map = { + 'network_group_id': {'key': 'networkGroupId', 'type': 'str'}, + 'use_hub_gateway': {'key': 'useHubGateway', 'type': 'str'}, + 'is_global': {'key': 'isGlobal', 'type': 'str'}, + 'group_connectivity': {'key': 'groupConnectivity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityGroupItem, self).__init__(**kwargs) + self.network_group_id = kwargs.get('network_group_id', None) + self.use_hub_gateway = kwargs.get('use_hub_gateway', None) + self.is_global = kwargs.get('is_global', None) + self.group_connectivity = kwargs.get('group_connectivity', None) + + +class DefaultAdminRule(BaseAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultAdminRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class DefaultUserRule(BaseUserRule): + """Network security default user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DefaultUserRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.direction = None + self.provisioning_state = None + + +class EffectiveBaseSecurityAdminRule(msrest.serialization.Model): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EffectiveSecurityAdminRule, EffectiveDefaultSecurityAdminRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'EffectiveSecurityAdminRule', 'Default': 'EffectiveDefaultSecurityAdminRule'} + } + + def __init__( + self, + **kwargs + ): + super(EffectiveBaseSecurityAdminRule, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.configuration_display_name = kwargs.get('configuration_display_name', None) + self.configuration_description = kwargs.get('configuration_description', None) + self.rule_collection_display_name = kwargs.get('rule_collection_display_name', None) + self.rule_collection_description = kwargs.get('rule_collection_description', None) + self.rule_collection_applies_to_groups = kwargs.get('rule_collection_applies_to_groups', None) + self.rule_groups = kwargs.get('rule_groups', None) + self.kind = None # type: Optional[str] + + +class EffectiveDefaultSecurityAdminRule(EffectiveBaseSecurityAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveDefaultSecurityAdminRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = kwargs.get('flag', None) + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class EffectiveSecurityAdminRule(EffectiveBaseSecurityAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveSecurityAdminRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.access = kwargs.get('access', None) + self.priority = kwargs.get('priority', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class EffectiveVirtualNetwork(msrest.serialization.Model): + """Effective Virtual Network. + + :param id: Effective vnet Id. + :type id: str + :param location: Location of vnet. + :type location: str + :param membership_type: Membership Type. Possible values include: "Static", "Dynamic". + :type membership_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.MembershipType + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'membership_type': {'key': 'membershipType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveVirtualNetwork, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.location = kwargs.get('location', None) + self.membership_type = kwargs.get('membership_type', None) + + +class EffectiveVirtualNetworksListResult(msrest.serialization.Model): + """Result of the request to list Effective Virtual Network. It contains a list of groups and a URL link to get the next set of results. + + :param value: Gets a page of EffectiveVirtualNetwork. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetwork] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveVirtualNetwork]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveVirtualNetworksListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class EffectiveVirtualNetworksParameter(msrest.serialization.Model): + """Effective Virtual Networks Parameter. + + :param conditional_members: Conditional Members. + :type conditional_members: str + :param skip_token: Continuation token for pagination, capturing the next page size and offset, + as well as the context of the query. + :type skip_token: str + """ + + _attribute_map = { + 'conditional_members': {'key': 'conditionalMembers', 'type': 'str'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveVirtualNetworksParameter, self).__init__(**kwargs) + self.conditional_members = kwargs.get('conditional_members', None) + self.skip_token = kwargs.get('skip_token', None) + + +class GroupMembersItem(msrest.serialization.Model): + """GroupMembers Item. + + :param resource_id: Resource Id. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GroupMembersItem, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + + +class Hub(msrest.serialization.Model): + """Hub Item. + + :param resource_id: Resource Id. + :type resource_id: str + :param resource_type: Resource Type. + :type resource_type: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Hub, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.resource_type = kwargs.get('resource_type', None) + + +class NetworkGroup(ProxyResource): + """The network group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the network group. + :type display_name: str + :param description: A description of the network group. + :type description: str + :param member_type: Group member type. + :type member_type: str + :param group_members: Group members of network group. + :type group_members: list[~azure.mgmt.network.v2021_02_01_preview.models.GroupMembersItem] + :param conditional_membership: Network group conditional filter. + :type conditional_membership: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'member_type': {'key': 'properties.memberType', 'type': 'str'}, + 'group_members': {'key': 'properties.groupMembers', 'type': '[GroupMembersItem]'}, + 'conditional_membership': {'key': 'properties.conditionalMembership', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkGroup, self).__init__(**kwargs) + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.member_type = kwargs.get('member_type', None) + self.group_members = kwargs.get('group_members', None) + self.conditional_membership = kwargs.get('conditional_membership', None) + self.provisioning_state = None + + +class NetworkGroupListResult(msrest.serialization.Model): + """Result of the request to list NetworkGroup. It contains a list of groups and a URL link to get the next set of results. + + :param value: Gets a page of NetworkGroup. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup] + :param next_link: Gets the URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class Resource(msrest.serialization.Model): + """Common resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class NetworkManager(Resource): + """The Managed Network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the network manager. + :type display_name: str + :param description: A description of the network manager. + :type description: str + :param network_manager_scopes: Scope of Network Manager. + :type network_manager_scopes: + ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerPropertiesNetworkManagerScopes + :param network_manager_scope_accesses: Scope Access. + :type network_manager_scope_accesses: list[str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType] + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'network_manager_scopes': {'key': 'properties.networkManagerScopes', 'type': 'NetworkManagerPropertiesNetworkManagerScopes'}, + 'network_manager_scope_accesses': {'key': 'properties.networkManagerScopeAccesses', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManager, self).__init__(**kwargs) + self.etag = None + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.network_manager_scopes = kwargs.get('network_manager_scopes', None) + self.network_manager_scope_accesses = kwargs.get('network_manager_scope_accesses', None) + self.provisioning_state = None + + +class NetworkManagerCommit(msrest.serialization.Model): + """Network Manager Commit. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar commit_id: Commit Id. + :vartype commit_id: str + :param target_locations: List of target locations. + :type target_locations: list[str] + :param configuration_ids: List of configuration ids. + :type configuration_ids: list[str] + :param commit_type: Commit Type. Possible values include: "SecurityAdmin", "SecurityUser", + "Connectivity". + :type commit_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType + """ + + _validation = { + 'commit_id': {'readonly': True}, + } + + _attribute_map = { + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'target_locations': {'key': 'targetLocations', 'type': '[str]'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[str]'}, + 'commit_type': {'key': 'commitType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerCommit, self).__init__(**kwargs) + self.commit_id = None + self.target_locations = kwargs.get('target_locations', None) + self.configuration_ids = kwargs.get('configuration_ids', None) + self.commit_type = kwargs.get('commit_type', None) + + +class NetworkManagerDeploymentStatus(msrest.serialization.Model): + """Network Manager Deployment Status. + + :param commit_time: Commit Time. + :type commit_time: ~datetime.datetime + :param region: Region Name. + :type region: str + :param deployment_status: Deployment Status. Possible values include: "NotStarted", + "Deploying", "Deployed", "Failed". + :type deployment_status: str or ~azure.mgmt.network.v2021_02_01_preview.models.DeploymentStatus + :param configuration_ids: List of configuration ids. + :type configuration_ids: list[str] + :param deployment_type: Configuration Deployment Type. Possible values include: + "SecurityAdmin", "SecurityUser", "Connectivity". + :type deployment_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType + :param error_message: Error Message. + :type error_message: str + """ + + _attribute_map = { + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[str]'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerDeploymentStatus, self).__init__(**kwargs) + self.commit_time = kwargs.get('commit_time', None) + self.region = kwargs.get('region', None) + self.deployment_status = kwargs.get('deployment_status', None) + self.configuration_ids = kwargs.get('configuration_ids', None) + self.deployment_type = kwargs.get('deployment_type', None) + self.error_message = kwargs.get('error_message', None) + + +class NetworkManagerDeploymentStatusListResult(msrest.serialization.Model): + """A list of Network Manager Deployment Status. + + :param value: Gets a page of Network Manager Deployment Status. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatus] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkManagerDeploymentStatus]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerDeploymentStatusListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class NetworkManagerDeploymentStatusParameter(msrest.serialization.Model): + """Network Manager Deployment Status Parameter. + + :param regions: List of locations. + :type regions: list[str] + :param deployment_types: List of deployment types. + :type deployment_types: list[str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType] + :param skip_token: Continuation token for pagination, capturing the next page size and offset, + as well as the context of the query. + :type skip_token: str + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'deployment_types': {'key': 'deploymentTypes', 'type': '[str]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerDeploymentStatusParameter, self).__init__(**kwargs) + self.regions = kwargs.get('regions', None) + self.deployment_types = kwargs.get('deployment_types', None) + self.skip_token = kwargs.get('skip_token', None) + + +class NetworkManagerEffectiveConnectivityConfigurationListResult(msrest.serialization.Model): + """Result of the request to list networkManagerEffectiveConnectivityConfiguration. It contains a list of groups and a skiptoken to get the next set of results. + + :param value: Gets a page of NetworkManagerEffectiveConnectivityConfiguration. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveConnectivityConfiguration] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveConnectivityConfiguration]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerEffectiveConnectivityConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class NetworkManagerEffectiveSecurityAdminRulesListResult(msrest.serialization.Model): + """Result of the request to list networkManagerEffectiveSecurityAdminRules. It contains a list of groups and a skiptoken to get the next set of results. + + :param value: Gets a page of NetworkManagerEffectiveSecurityAdminRules. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveBaseSecurityAdminRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveBaseSecurityAdminRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerEffectiveSecurityAdminRulesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.skip_token = kwargs.get('skip_token', None) + + +class NetworkManagerListResult(msrest.serialization.Model): + """Result of the request to list NetworkManager. It contains a list of network managers and a URL link to get the next set of results. + + :param value: Gets a page of NetworkManager. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkManager]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NetworkManagerPropertiesNetworkManagerScopes(msrest.serialization.Model): + """Scope of Network Manager. + + :param management_groups: List of management groups. + :type management_groups: list[str] + :param subscriptions: List of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'management_groups': {'key': 'managementGroups', 'type': '[str]'}, + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerPropertiesNetworkManagerScopes, self).__init__(**kwargs) + self.management_groups = kwargs.get('management_groups', None) + self.subscriptions = kwargs.get('subscriptions', None) + + +class NetworkManagerSecurityGroupItem(msrest.serialization.Model): + """Network manager security group item. + + :param network_group_id: Network manager group Id. + :type network_group_id: str + """ + + _attribute_map = { + 'network_group_id': {'key': 'networkGroupId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkManagerSecurityGroupItem, self).__init__(**kwargs) + self.network_group_id = kwargs.get('network_group_id', None) + + +class NetworkSecurityPerimeter(Resource): + """The Network Security Perimeter resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param display_name: A friendly name for the network security perimeter. + :type display_name: str + :param description: A description of the network security perimeter. + :type description: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkSecurityPerimeter, self).__init__(**kwargs) + self.etag = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.provisioning_state = None + + +class NetworkSecurityPerimeterListResult(msrest.serialization.Model): + """Result of the request to list NetworkSecurityPerimeter. It contains a list of network security perimeters and a URL link to get the next set of results. + + :param value: Gets a page of NetworkSecurityPerimeter. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkSecurityPerimeter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkSecurityPerimeterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PerimeterAssociableResource(Resource): + """Resource that is onboarded to use network security perimeter. Also referred as perimeter associable resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar display_name: A friendly name for the properties of perimeter associable resources. + :vartype display_name: str + :ivar resource_type: Resource type/provider name. + :vartype resource_type: str + :ivar public_dns_zones: Public DNS zone names of the resources. + :vartype public_dns_zones: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'public_dns_zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'public_dns_zones': {'key': 'properties.publicDnsZones', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PerimeterAssociableResource, self).__init__(**kwargs) + self.display_name = None + self.resource_type = None + self.public_dns_zones = None + + +class PerimeterAssociableResourcesListResult(msrest.serialization.Model): + """Paged list of perimeter associable resources. + + :param value: Gets paged list of perimeter associable resources. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.PerimeterAssociableResource] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PerimeterAssociableResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PerimeterAssociableResourcesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class QueryRequestOptions(msrest.serialization.Model): + """Query Request Options. + + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryRequestOptions, self).__init__(**kwargs) + self.skip_token = kwargs.get('skip_token', None) + + +class RuleCollection(ProxyResource): + """Defines the rule collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A display name of the rule collection. + :type display_name: str + :param description: A description of the rule collection. + :type description: str + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleCollection, self).__init__(**kwargs) + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.applies_to_groups = kwargs.get('applies_to_groups', None) + self.provisioning_state = None + + +class RuleCollectionListResult(msrest.serialization.Model): + """Security configuration rule collection list result. + + :param value: A list of network manager security configuration rule collections. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection] + :param next_link: Gets the URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RuleCollection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RuleCollectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SecurityConfiguration(ProxyResource): + """Defines the security configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A display name of the security configuration. + :type display_name: str + :param description: A description of the security configuration. + :type description: str + :param security_type: Security Type. Possible values include: "AdminPolicy", "UserPolicy". + :type security_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.SecurityType + :param delete_existing_ns_gs: Flag if need to delete existing network security groups. Possible + values include: "False", "True". + :type delete_existing_ns_gs: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingNSGs + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'security_type': {'key': 'properties.securityType', 'type': 'str'}, + 'delete_existing_ns_gs': {'key': 'properties.deleteExistingNSGs', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityConfiguration, self).__init__(**kwargs) + self.system_data = None + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.security_type = kwargs.get('security_type', None) + self.delete_existing_ns_gs = kwargs.get('delete_existing_ns_gs', None) + self.provisioning_state = None + + +class SecurityConfigurationListResult(msrest.serialization.Model): + """A list of network manager security configurations. + + :param value: Gets a page of security configurations. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SystemData(msrest.serialization.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.network.v2021_02_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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.network.v2021_02_01_preview.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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 TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class UserRule(BaseUserRule): + """Network security user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = kwargs.get('display_name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.sources = kwargs.get('sources', None) + self.destinations = kwargs.get('destinations', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class UserRuleListResult(msrest.serialization.Model): + """security user rule list result. + + :param value: A list of user rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BaseUserRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UserRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models_py3.py new file mode 100644 index 000000000000..b9f1489bf650 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_models_py3.py @@ -0,0 +1,3281 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +import msrest.serialization + +from ._network_management_client_enums import * + + +class ActiveBaseSecurityAdminRule(msrest.serialization.Model): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ActiveSecurityAdminRule, ActiveDefaultSecurityAdminRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'ActiveSecurityAdminRule', 'Default': 'ActiveDefaultSecurityAdminRule'} + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + **kwargs + ): + super(ActiveBaseSecurityAdminRule, self).__init__(**kwargs) + self.id = id + self.commit_time = commit_time + self.region = region + self.configuration_display_name = configuration_display_name + self.configuration_description = configuration_description + self.rule_collection_display_name = rule_collection_display_name + self.rule_collection_description = rule_collection_description + self.rule_collection_applies_to_groups = rule_collection_applies_to_groups + self.rule_groups = rule_groups + self.kind = None # type: Optional[str] + + +class ActiveBaseSecurityUserRule(msrest.serialization.Model): + """Network base rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ActiveSecurityUserRule, ActiveDefaultSecurityUserRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'ActiveSecurityUserRule', 'Default': 'ActiveDefaultSecurityUserRule'} + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + **kwargs + ): + super(ActiveBaseSecurityUserRule, self).__init__(**kwargs) + self.id = id + self.commit_time = commit_time + self.region = region + self.configuration_display_name = configuration_display_name + self.configuration_description = configuration_description + self.rule_collection_display_name = rule_collection_display_name + self.rule_collection_description = rule_collection_description + self.rule_collection_applies_to_groups = rule_collection_applies_to_groups + self.rule_groups = rule_groups + self.kind = None # type: Optional[str] + + +class ActiveConfigurationParameter(msrest.serialization.Model): + """Effective Virtual Networks Parameter. + + :param regions: List of regions. + :type regions: list[str] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + regions: Optional[List[str]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(ActiveConfigurationParameter, self).__init__(**kwargs) + self.regions = regions + self.skip_token = skip_token + + +class EffectiveConnectivityConfiguration(msrest.serialization.Model): + """The network manager effective connectivity configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param configuration_groups: Effective configuration groups. + :type configuration_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_groups': {'key': 'configurationGroups', 'type': '[ConfigurationGroup]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + connectivity_topology: Optional[Union[str, "ConnectivityTopology"]] = None, + hubs: Optional[List["Hub"]] = None, + is_global: Optional[Union[str, "IsGlobal"]] = None, + applies_to_groups: Optional[List["ConnectivityGroupItem"]] = None, + delete_existing_peering: Optional[Union[str, "DeleteExistingPeering"]] = None, + **kwargs + ): + super(EffectiveConnectivityConfiguration, self).__init__(**kwargs) + self.id = id + self.configuration_groups = configuration_groups + self.display_name = display_name + self.description = description + self.connectivity_topology = connectivity_topology + self.hubs = hubs + self.is_global = is_global + self.applies_to_groups = applies_to_groups + self.provisioning_state = None + self.delete_existing_peering = delete_existing_peering + + +class ActiveConnectivityConfiguration(EffectiveConnectivityConfiguration): + """Active connectivity configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param configuration_groups: Effective configuration groups. + :type configuration_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_groups': {'key': 'configurationGroups', 'type': '[ConfigurationGroup]'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + connectivity_topology: Optional[Union[str, "ConnectivityTopology"]] = None, + hubs: Optional[List["Hub"]] = None, + is_global: Optional[Union[str, "IsGlobal"]] = None, + applies_to_groups: Optional[List["ConnectivityGroupItem"]] = None, + delete_existing_peering: Optional[Union[str, "DeleteExistingPeering"]] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + **kwargs + ): + super(ActiveConnectivityConfiguration, self).__init__(id=id, configuration_groups=configuration_groups, display_name=display_name, description=description, connectivity_topology=connectivity_topology, hubs=hubs, is_global=is_global, applies_to_groups=applies_to_groups, delete_existing_peering=delete_existing_peering, **kwargs) + self.commit_time = commit_time + self.region = region + + +class ActiveConnectivityConfigurationsListResult(msrest.serialization.Model): + """Result of the request to list active connectivity configurations. It contains a list of active connectivity configurations and a skiptoken to get the next set of results. + + :param value: Gets a page of active connectivity configurations. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveConnectivityConfiguration] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveConnectivityConfiguration]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ActiveConnectivityConfiguration"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(ActiveConnectivityConfigurationsListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class ActiveDefaultSecurityAdminRule(ActiveBaseSecurityAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + flag: Optional[str] = None, + **kwargs + ): + super(ActiveDefaultSecurityAdminRule, self).__init__(id=id, commit_time=commit_time, region=region, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class ActiveDefaultSecurityUserRule(ActiveBaseSecurityUserRule): + """Network security default user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + flag: Optional[str] = None, + **kwargs + ): + super(ActiveDefaultSecurityUserRule, self).__init__(id=id, commit_time=commit_time, region=region, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.direction = None + self.provisioning_state = None + + +class ActiveSecurityAdminRule(ActiveBaseSecurityAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityConfigurationRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(ActiveSecurityAdminRule, self).__init__(id=id, commit_time=commit_time, region=region, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.access = access + self.priority = priority + self.direction = direction + self.provisioning_state = None + + +class ActiveSecurityAdminRulesListResult(msrest.serialization.Model): + """Result of the request to list active security admin rules. It contains a list of active security admin rules and a skiptoken to get the next set of results. + + :param value: Gets a page of active security admin rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveBaseSecurityAdminRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveBaseSecurityAdminRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ActiveBaseSecurityAdminRule"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(ActiveSecurityAdminRulesListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class ActiveSecurityUserRule(ActiveBaseSecurityUserRule): + """Network security user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param commit_time: Deployment time string. + :type commit_time: ~datetime.datetime + :param region: Deployment region. + :type region: str + :param configuration_display_name: A display name of the security user configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security user configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveUserRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(ActiveSecurityUserRule, self).__init__(id=id, commit_time=commit_time, region=region, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.direction = direction + self.provisioning_state = None + + +class ActiveSecurityUserRulesListResult(msrest.serialization.Model): + """Result of the request to list active security user rules. It contains a list of active security user rules and a skiptoken to get the next set of results. + + :param value: Gets a page of active security user rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ActiveBaseSecurityUserRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ActiveBaseSecurityUserRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ActiveBaseSecurityUserRule"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(ActiveSecurityUserRulesListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class AddressPrefixItem(msrest.serialization.Model): + """Address prefix item. + + :param address_prefix: Address prefix. + :type address_prefix: str + :param address_prefix_type: Address prefix type. Possible values include: "IPPrefix", + "ServiceTag". + :type address_prefix_type: str or + ~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixType + """ + + _attribute_map = { + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + 'address_prefix_type': {'key': 'addressPrefixType', 'type': 'str'}, + } + + def __init__( + self, + *, + address_prefix: Optional[str] = None, + address_prefix_type: Optional[Union[str, "AddressPrefixType"]] = None, + **kwargs + ): + super(AddressPrefixItem, self).__init__(**kwargs) + self.address_prefix = address_prefix + self.address_prefix_type = address_prefix_type + + +class ProxyResource(msrest.serialization.Model): + """Proxy resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProxyResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.etag = None + + +class BaseAdminRule(ProxyResource): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AdminRule, DefaultAdminRule. + + 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. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'Custom': 'AdminRule', 'Default': 'DefaultAdminRule'} + } + + def __init__( + self, + **kwargs + ): + super(BaseAdminRule, self).__init__(**kwargs) + self.kind = 'BaseAdminRule' # type: str + self.system_data = None + + +class AdminRule(BaseAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityConfigurationRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(AdminRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.access = access + self.priority = priority + self.direction = direction + self.provisioning_state = None + + +class AdminRuleListResult(msrest.serialization.Model): + """security configuration admin rule list result. + + :param value: A list of admin rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BaseAdminRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BaseAdminRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AdminRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BaseUserRule(ProxyResource): + """Network base rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: UserRule, DefaultUserRule. + + 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. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + } + + _subtype_map = { + 'kind': {'Custom': 'UserRule', 'Default': 'DefaultUserRule'} + } + + def __init__( + self, + **kwargs + ): + super(BaseUserRule, self).__init__(**kwargs) + self.kind = 'BaseUserRule' # type: str + self.system_data = None + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.network.v2021_02_01_preview.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class ConfigurationGroup(msrest.serialization.Model): + """The network configuration group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param display_name: A friendly name for the network group. + :type display_name: str + :param description: A description of the network group. + :type description: str + :param member_type: Group member type. + :type member_type: str + :param group_members: Group members of network group. + :type group_members: list[~azure.mgmt.network.v2021_02_01_preview.models.GroupMembersItem] + :param conditional_membership: Network group conditional filter. + :type conditional_membership: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'member_type': {'key': 'properties.memberType', 'type': 'str'}, + 'group_members': {'key': 'properties.groupMembers', 'type': '[GroupMembersItem]'}, + 'conditional_membership': {'key': 'properties.conditionalMembership', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + member_type: Optional[str] = None, + group_members: Optional[List["GroupMembersItem"]] = None, + conditional_membership: Optional[str] = None, + **kwargs + ): + super(ConfigurationGroup, self).__init__(**kwargs) + self.id = id + self.display_name = display_name + self.description = description + self.member_type = member_type + self.group_members = group_members + self.conditional_membership = conditional_membership + self.provisioning_state = None + + +class ConnectivityConfiguration(ProxyResource): + """The network manager connectivity configuration resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the resource. + :type display_name: str + :param description: A description of the connectivity configuration. + :type description: str + :param connectivity_topology: Connectivity topology type. Possible values include: + "HubAndSpoke", "Mesh". + :type connectivity_topology: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityTopology + :param hubs: List of hubItems. + :type hubs: list[~azure.mgmt.network.v2021_02_01_preview.models.Hub] + :param is_global: Flag if global mesh is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityGroupItem] + :ivar provisioning_state: The provisioning state of the connectivity configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + :param delete_existing_peering: Flag if need to remove current existing peerings. Possible + values include: "False", "True". + :type delete_existing_peering: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingPeering + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'connectivity_topology': {'key': 'properties.connectivityTopology', 'type': 'str'}, + 'hubs': {'key': 'properties.hubs', 'type': '[Hub]'}, + 'is_global': {'key': 'properties.isGlobal', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[ConnectivityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'delete_existing_peering': {'key': 'properties.deleteExistingPeering', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + connectivity_topology: Optional[Union[str, "ConnectivityTopology"]] = None, + hubs: Optional[List["Hub"]] = None, + is_global: Optional[Union[str, "IsGlobal"]] = None, + applies_to_groups: Optional[List["ConnectivityGroupItem"]] = None, + delete_existing_peering: Optional[Union[str, "DeleteExistingPeering"]] = None, + **kwargs + ): + super(ConnectivityConfiguration, self).__init__(**kwargs) + self.system_data = None + self.display_name = display_name + self.description = description + self.connectivity_topology = connectivity_topology + self.hubs = hubs + self.is_global = is_global + self.applies_to_groups = applies_to_groups + self.provisioning_state = None + self.delete_existing_peering = delete_existing_peering + + +class ConnectivityConfigurationListResult(msrest.serialization.Model): + """Result of the request to list network manager connectivity configurations. It contains a list of configurations and a link to get the next set of results. + + :param value: Gets a page of Connectivity Configurations. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectivityConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ConnectivityConfiguration"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ConnectivityConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ConnectivityGroupItem(msrest.serialization.Model): + """ConnectivityGroupItem. + + :param network_group_id: Network group Id. + :type network_group_id: str + :param use_hub_gateway: Flag if need to use hub gateway. Possible values include: "False", + "True". + :type use_hub_gateway: str or ~azure.mgmt.network.v2021_02_01_preview.models.UseHubGateway + :param is_global: Flag if global is supported. Possible values include: "False", "True". + :type is_global: str or ~azure.mgmt.network.v2021_02_01_preview.models.IsGlobal + :param group_connectivity: Group connectivity type. Possible values include: "None", + "DirectlyConnected". + :type group_connectivity: str or + ~azure.mgmt.network.v2021_02_01_preview.models.GroupConnectivity + """ + + _attribute_map = { + 'network_group_id': {'key': 'networkGroupId', 'type': 'str'}, + 'use_hub_gateway': {'key': 'useHubGateway', 'type': 'str'}, + 'is_global': {'key': 'isGlobal', 'type': 'str'}, + 'group_connectivity': {'key': 'groupConnectivity', 'type': 'str'}, + } + + def __init__( + self, + *, + network_group_id: Optional[str] = None, + use_hub_gateway: Optional[Union[str, "UseHubGateway"]] = None, + is_global: Optional[Union[str, "IsGlobal"]] = None, + group_connectivity: Optional[Union[str, "GroupConnectivity"]] = None, + **kwargs + ): + super(ConnectivityGroupItem, self).__init__(**kwargs) + self.network_group_id = network_group_id + self.use_hub_gateway = use_hub_gateway + self.is_global = is_global + self.group_connectivity = group_connectivity + + +class DefaultAdminRule(BaseAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + flag: Optional[str] = None, + **kwargs + ): + super(DefaultAdminRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class DefaultUserRule(BaseUserRule): + """Network security default user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + flag: Optional[str] = None, + **kwargs + ): + super(DefaultUserRule, self).__init__(**kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.direction = None + self.provisioning_state = None + + +class EffectiveBaseSecurityAdminRule(msrest.serialization.Model): + """Network base admin rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EffectiveSecurityAdminRule, EffectiveDefaultSecurityAdminRule. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + } + + _subtype_map = { + 'kind': {'Custom': 'EffectiveSecurityAdminRule', 'Default': 'EffectiveDefaultSecurityAdminRule'} + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + **kwargs + ): + super(EffectiveBaseSecurityAdminRule, self).__init__(**kwargs) + self.id = id + self.configuration_display_name = configuration_display_name + self.configuration_description = configuration_description + self.rule_collection_display_name = rule_collection_display_name + self.rule_collection_description = rule_collection_description + self.rule_collection_applies_to_groups = rule_collection_applies_to_groups + self.rule_groups = rule_groups + self.kind = None # type: Optional[str] + + +class EffectiveDefaultSecurityAdminRule(EffectiveBaseSecurityAdminRule): + """Network default admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :ivar display_name: A friendly name for the rule. + :vartype display_name: str + :ivar description: A description for this rule. Restricted to 140 chars. + :vartype description: str + :param flag: Default rule flag. + :type flag: str + :ivar protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :vartype protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :ivar sources: The CIDR or source IP ranges. + :vartype sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar destinations: The destination address prefixes. CIDR or destination IP ranges. + :vartype destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :ivar source_port_ranges: The source port ranges. + :vartype source_port_ranges: list[str] + :ivar destination_port_ranges: The destination port ranges. + :vartype destination_port_ranges: list[str] + :ivar access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :vartype access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :ivar priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :vartype priority: int + :ivar direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :vartype direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'protocol': {'readonly': True}, + 'sources': {'readonly': True}, + 'destinations': {'readonly': True}, + 'source_port_ranges': {'readonly': True}, + 'destination_port_ranges': {'readonly': True}, + 'access': {'readonly': True}, + 'priority': {'readonly': True}, + 'direction': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'flag': {'key': 'properties.flag', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + flag: Optional[str] = None, + **kwargs + ): + super(EffectiveDefaultSecurityAdminRule, self).__init__(id=id, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Default' # type: str + self.display_name = None + self.description = None + self.flag = flag + self.protocol = None + self.sources = None + self.destinations = None + self.source_port_ranges = None + self.destination_port_ranges = None + self.access = None + self.priority = None + self.direction = None + self.provisioning_state = None + + +class EffectiveSecurityAdminRule(EffectiveBaseSecurityAdminRule): + """Network admin rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param configuration_display_name: A display name of the security admin configuration. + :type configuration_display_name: str + :param configuration_description: A description of the security admin configuration. + :type configuration_description: str + :param rule_collection_display_name: A display name of the rule collection. + :type rule_collection_display_name: str + :param rule_collection_description: A description of the rule collection. + :type rule_collection_description: str + :param rule_collection_applies_to_groups: Groups for rule collection. + :type rule_collection_applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :param rule_groups: Effective configuration groups. + :type rule_groups: list[~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationGroup] + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveAdminRuleKind + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: Indicates the access allowed for this particular rule. Possible values include: + "Allow", "Deny", "AlwaysAllow". + :type access: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleAccess + :param priority: The priority of the rule. The value can be between 1 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'kind': {'required': True}, + 'priority': {'maximum': 4096, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'configuration_display_name': {'key': 'configurationDisplayName', 'type': 'str'}, + 'configuration_description': {'key': 'configurationDescription', 'type': 'str'}, + 'rule_collection_display_name': {'key': 'ruleCollectionDisplayName', 'type': 'str'}, + 'rule_collection_description': {'key': 'ruleCollectionDescription', 'type': 'str'}, + 'rule_collection_applies_to_groups': {'key': 'ruleCollectionAppliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ConfigurationGroup]'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + configuration_display_name: Optional[str] = None, + configuration_description: Optional[str] = None, + rule_collection_display_name: Optional[str] = None, + rule_collection_description: Optional[str] = None, + rule_collection_applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + rule_groups: Optional[List["ConfigurationGroup"]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityConfigurationRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(EffectiveSecurityAdminRule, self).__init__(id=id, configuration_display_name=configuration_display_name, configuration_description=configuration_description, rule_collection_display_name=rule_collection_display_name, rule_collection_description=rule_collection_description, rule_collection_applies_to_groups=rule_collection_applies_to_groups, rule_groups=rule_groups, **kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.access = access + self.priority = priority + self.direction = direction + self.provisioning_state = None + + +class EffectiveVirtualNetwork(msrest.serialization.Model): + """Effective Virtual Network. + + :param id: Effective vnet Id. + :type id: str + :param location: Location of vnet. + :type location: str + :param membership_type: Membership Type. Possible values include: "Static", "Dynamic". + :type membership_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.MembershipType + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'membership_type': {'key': 'membershipType', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + membership_type: Optional[Union[str, "MembershipType"]] = None, + **kwargs + ): + super(EffectiveVirtualNetwork, self).__init__(**kwargs) + self.id = id + self.location = location + self.membership_type = membership_type + + +class EffectiveVirtualNetworksListResult(msrest.serialization.Model): + """Result of the request to list Effective Virtual Network. It contains a list of groups and a URL link to get the next set of results. + + :param value: Gets a page of EffectiveVirtualNetwork. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetwork] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveVirtualNetwork]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveVirtualNetwork"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(EffectiveVirtualNetworksListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class EffectiveVirtualNetworksParameter(msrest.serialization.Model): + """Effective Virtual Networks Parameter. + + :param conditional_members: Conditional Members. + :type conditional_members: str + :param skip_token: Continuation token for pagination, capturing the next page size and offset, + as well as the context of the query. + :type skip_token: str + """ + + _attribute_map = { + 'conditional_members': {'key': 'conditionalMembers', 'type': 'str'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + conditional_members: Optional[str] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(EffectiveVirtualNetworksParameter, self).__init__(**kwargs) + self.conditional_members = conditional_members + self.skip_token = skip_token + + +class GroupMembersItem(msrest.serialization.Model): + """GroupMembers Item. + + :param resource_id: Resource Id. + :type resource_id: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + **kwargs + ): + super(GroupMembersItem, self).__init__(**kwargs) + self.resource_id = resource_id + + +class Hub(msrest.serialization.Model): + """Hub Item. + + :param resource_id: Resource Id. + :type resource_id: str + :param resource_type: Resource Type. + :type resource_type: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + resource_type: Optional[str] = None, + **kwargs + ): + super(Hub, self).__init__(**kwargs) + self.resource_id = resource_id + self.resource_type = resource_type + + +class NetworkGroup(ProxyResource): + """The network group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the network group. + :type display_name: str + :param description: A description of the network group. + :type description: str + :param member_type: Group member type. + :type member_type: str + :param group_members: Group members of network group. + :type group_members: list[~azure.mgmt.network.v2021_02_01_preview.models.GroupMembersItem] + :param conditional_membership: Network group conditional filter. + :type conditional_membership: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'member_type': {'key': 'properties.memberType', 'type': 'str'}, + 'group_members': {'key': 'properties.groupMembers', 'type': '[GroupMembersItem]'}, + 'conditional_membership': {'key': 'properties.conditionalMembership', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + member_type: Optional[str] = None, + group_members: Optional[List["GroupMembersItem"]] = None, + conditional_membership: Optional[str] = None, + **kwargs + ): + super(NetworkGroup, self).__init__(**kwargs) + self.system_data = None + self.display_name = display_name + self.description = description + self.member_type = member_type + self.group_members = group_members + self.conditional_membership = conditional_membership + self.provisioning_state = None + + +class NetworkGroupListResult(msrest.serialization.Model): + """Result of the request to list NetworkGroup. It contains a list of groups and a URL link to get the next set of results. + + :param value: Gets a page of NetworkGroup. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup] + :param next_link: Gets the URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class Resource(msrest.serialization.Model): + """Common resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class NetworkManager(Resource): + """The Managed Network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the network manager. + :type display_name: str + :param description: A description of the network manager. + :type description: str + :param network_manager_scopes: Scope of Network Manager. + :type network_manager_scopes: + ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerPropertiesNetworkManagerScopes + :param network_manager_scope_accesses: Scope Access. + :type network_manager_scope_accesses: list[str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType] + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'network_manager_scopes': {'key': 'properties.networkManagerScopes', 'type': 'NetworkManagerPropertiesNetworkManagerScopes'}, + 'network_manager_scope_accesses': {'key': 'properties.networkManagerScopeAccesses', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + network_manager_scopes: Optional["NetworkManagerPropertiesNetworkManagerScopes"] = None, + network_manager_scope_accesses: Optional[List[Union[str, "ConfigurationType"]]] = None, + **kwargs + ): + super(NetworkManager, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.system_data = None + self.display_name = display_name + self.description = description + self.network_manager_scopes = network_manager_scopes + self.network_manager_scope_accesses = network_manager_scope_accesses + self.provisioning_state = None + + +class NetworkManagerCommit(msrest.serialization.Model): + """Network Manager Commit. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar commit_id: Commit Id. + :vartype commit_id: str + :param target_locations: List of target locations. + :type target_locations: list[str] + :param configuration_ids: List of configuration ids. + :type configuration_ids: list[str] + :param commit_type: Commit Type. Possible values include: "SecurityAdmin", "SecurityUser", + "Connectivity". + :type commit_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType + """ + + _validation = { + 'commit_id': {'readonly': True}, + } + + _attribute_map = { + 'commit_id': {'key': 'commitId', 'type': 'str'}, + 'target_locations': {'key': 'targetLocations', 'type': '[str]'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[str]'}, + 'commit_type': {'key': 'commitType', 'type': 'str'}, + } + + def __init__( + self, + *, + target_locations: Optional[List[str]] = None, + configuration_ids: Optional[List[str]] = None, + commit_type: Optional[Union[str, "ConfigurationType"]] = None, + **kwargs + ): + super(NetworkManagerCommit, self).__init__(**kwargs) + self.commit_id = None + self.target_locations = target_locations + self.configuration_ids = configuration_ids + self.commit_type = commit_type + + +class NetworkManagerDeploymentStatus(msrest.serialization.Model): + """Network Manager Deployment Status. + + :param commit_time: Commit Time. + :type commit_time: ~datetime.datetime + :param region: Region Name. + :type region: str + :param deployment_status: Deployment Status. Possible values include: "NotStarted", + "Deploying", "Deployed", "Failed". + :type deployment_status: str or ~azure.mgmt.network.v2021_02_01_preview.models.DeploymentStatus + :param configuration_ids: List of configuration ids. + :type configuration_ids: list[str] + :param deployment_type: Configuration Deployment Type. Possible values include: + "SecurityAdmin", "SecurityUser", "Connectivity". + :type deployment_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType + :param error_message: Error Message. + :type error_message: str + """ + + _attribute_map = { + 'commit_time': {'key': 'commitTime', 'type': 'iso-8601'}, + 'region': {'key': 'region', 'type': 'str'}, + 'deployment_status': {'key': 'deploymentStatus', 'type': 'str'}, + 'configuration_ids': {'key': 'configurationIds', 'type': '[str]'}, + 'deployment_type': {'key': 'deploymentType', 'type': 'str'}, + 'error_message': {'key': 'errorMessage', 'type': 'str'}, + } + + def __init__( + self, + *, + commit_time: Optional[datetime.datetime] = None, + region: Optional[str] = None, + deployment_status: Optional[Union[str, "DeploymentStatus"]] = None, + configuration_ids: Optional[List[str]] = None, + deployment_type: Optional[Union[str, "ConfigurationType"]] = None, + error_message: Optional[str] = None, + **kwargs + ): + super(NetworkManagerDeploymentStatus, self).__init__(**kwargs) + self.commit_time = commit_time + self.region = region + self.deployment_status = deployment_status + self.configuration_ids = configuration_ids + self.deployment_type = deployment_type + self.error_message = error_message + + +class NetworkManagerDeploymentStatusListResult(msrest.serialization.Model): + """A list of Network Manager Deployment Status. + + :param value: Gets a page of Network Manager Deployment Status. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatus] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkManagerDeploymentStatus]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkManagerDeploymentStatus"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(NetworkManagerDeploymentStatusListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class NetworkManagerDeploymentStatusParameter(msrest.serialization.Model): + """Network Manager Deployment Status Parameter. + + :param regions: List of locations. + :type regions: list[str] + :param deployment_types: List of deployment types. + :type deployment_types: list[str or + ~azure.mgmt.network.v2021_02_01_preview.models.ConfigurationType] + :param skip_token: Continuation token for pagination, capturing the next page size and offset, + as well as the context of the query. + :type skip_token: str + """ + + _attribute_map = { + 'regions': {'key': 'regions', 'type': '[str]'}, + 'deployment_types': {'key': 'deploymentTypes', 'type': '[str]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + regions: Optional[List[str]] = None, + deployment_types: Optional[List[Union[str, "ConfigurationType"]]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(NetworkManagerDeploymentStatusParameter, self).__init__(**kwargs) + self.regions = regions + self.deployment_types = deployment_types + self.skip_token = skip_token + + +class NetworkManagerEffectiveConnectivityConfigurationListResult(msrest.serialization.Model): + """Result of the request to list networkManagerEffectiveConnectivityConfiguration. It contains a list of groups and a skiptoken to get the next set of results. + + :param value: Gets a page of NetworkManagerEffectiveConnectivityConfiguration. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveConnectivityConfiguration] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveConnectivityConfiguration]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveConnectivityConfiguration"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(NetworkManagerEffectiveConnectivityConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class NetworkManagerEffectiveSecurityAdminRulesListResult(msrest.serialization.Model): + """Result of the request to list networkManagerEffectiveSecurityAdminRules. It contains a list of groups and a skiptoken to get the next set of results. + + :param value: Gets a page of NetworkManagerEffectiveSecurityAdminRules. + :type value: + list[~azure.mgmt.network.v2021_02_01_preview.models.EffectiveBaseSecurityAdminRule] + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveBaseSecurityAdminRule]'}, + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveBaseSecurityAdminRule"]] = None, + skip_token: Optional[str] = None, + **kwargs + ): + super(NetworkManagerEffectiveSecurityAdminRulesListResult, self).__init__(**kwargs) + self.value = value + self.skip_token = skip_token + + +class NetworkManagerListResult(msrest.serialization.Model): + """Result of the request to list NetworkManager. It contains a list of network managers and a URL link to get the next set of results. + + :param value: Gets a page of NetworkManager. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkManager]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkManager"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkManagerListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkManagerPropertiesNetworkManagerScopes(msrest.serialization.Model): + """Scope of Network Manager. + + :param management_groups: List of management groups. + :type management_groups: list[str] + :param subscriptions: List of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'management_groups': {'key': 'managementGroups', 'type': '[str]'}, + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + *, + management_groups: Optional[List[str]] = None, + subscriptions: Optional[List[str]] = None, + **kwargs + ): + super(NetworkManagerPropertiesNetworkManagerScopes, self).__init__(**kwargs) + self.management_groups = management_groups + self.subscriptions = subscriptions + + +class NetworkManagerSecurityGroupItem(msrest.serialization.Model): + """Network manager security group item. + + :param network_group_id: Network manager group Id. + :type network_group_id: str + """ + + _attribute_map = { + 'network_group_id': {'key': 'networkGroupId', 'type': 'str'}, + } + + def __init__( + self, + *, + network_group_id: Optional[str] = None, + **kwargs + ): + super(NetworkManagerSecurityGroupItem, self).__init__(**kwargs) + self.network_group_id = network_group_id + + +class NetworkSecurityPerimeter(Resource): + """The Network Security Perimeter resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param display_name: A friendly name for the network security perimeter. + :type display_name: str + :param description: A description of the network security perimeter. + :type description: str + :ivar provisioning_state: The provisioning state of the scope assignment resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + display_name: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(NetworkSecurityPerimeter, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.display_name = display_name + self.description = description + self.provisioning_state = None + + +class NetworkSecurityPerimeterListResult(msrest.serialization.Model): + """Result of the request to list NetworkSecurityPerimeter. It contains a list of network security perimeters and a URL link to get the next set of results. + + :param value: Gets a page of NetworkSecurityPerimeter. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkSecurityPerimeter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkSecurityPerimeter"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkSecurityPerimeterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PerimeterAssociableResource(Resource): + """Resource that is onboarded to use network security perimeter. Also referred as perimeter associable resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar display_name: A friendly name for the properties of perimeter associable resources. + :vartype display_name: str + :ivar resource_type: Resource type/provider name. + :vartype resource_type: str + :ivar public_dns_zones: Public DNS zone names of the resources. + :vartype public_dns_zones: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'public_dns_zones': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'public_dns_zones': {'key': 'properties.publicDnsZones', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(PerimeterAssociableResource, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.display_name = None + self.resource_type = None + self.public_dns_zones = None + + +class PerimeterAssociableResourcesListResult(msrest.serialization.Model): + """Paged list of perimeter associable resources. + + :param value: Gets paged list of perimeter associable resources. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.PerimeterAssociableResource] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PerimeterAssociableResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PerimeterAssociableResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PerimeterAssociableResourcesListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class QueryRequestOptions(msrest.serialization.Model): + """Query Request Options. + + :param skip_token: When present, the value can be passed to a subsequent query call (together + with the same query and scopes used in the current request) to retrieve the next page of data. + :type skip_token: str + """ + + _attribute_map = { + 'skip_token': {'key': 'skipToken', 'type': 'str'}, + } + + def __init__( + self, + *, + skip_token: Optional[str] = None, + **kwargs + ): + super(QueryRequestOptions, self).__init__(**kwargs) + self.skip_token = skip_token + + +class RuleCollection(ProxyResource): + """Defines the rule collection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A display name of the rule collection. + :type display_name: str + :param description: A description of the rule collection. + :type description: str + :param applies_to_groups: Groups for configuration. + :type applies_to_groups: + list[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerSecurityGroupItem] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'applies_to_groups': {'key': 'properties.appliesToGroups', 'type': '[NetworkManagerSecurityGroupItem]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + applies_to_groups: Optional[List["NetworkManagerSecurityGroupItem"]] = None, + **kwargs + ): + super(RuleCollection, self).__init__(**kwargs) + self.system_data = None + self.display_name = display_name + self.description = description + self.applies_to_groups = applies_to_groups + self.provisioning_state = None + + +class RuleCollectionListResult(msrest.serialization.Model): + """Security configuration rule collection list result. + + :param value: A list of network manager security configuration rule collections. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection] + :param next_link: Gets the URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RuleCollection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RuleCollection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RuleCollectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SecurityConfiguration(ProxyResource): + """Defines the security configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A display name of the security configuration. + :type display_name: str + :param description: A description of the security configuration. + :type description: str + :param security_type: Security Type. Possible values include: "AdminPolicy", "UserPolicy". + :type security_type: str or ~azure.mgmt.network.v2021_02_01_preview.models.SecurityType + :param delete_existing_ns_gs: Flag if need to delete existing network security groups. Possible + values include: "False", "True". + :type delete_existing_ns_gs: str or + ~azure.mgmt.network.v2021_02_01_preview.models.DeleteExistingNSGs + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'security_type': {'key': 'properties.securityType', 'type': 'str'}, + 'delete_existing_ns_gs': {'key': 'properties.deleteExistingNSGs', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + security_type: Optional[Union[str, "SecurityType"]] = None, + delete_existing_ns_gs: Optional[Union[str, "DeleteExistingNSGs"]] = None, + **kwargs + ): + super(SecurityConfiguration, self).__init__(**kwargs) + self.system_data = None + self.display_name = display_name + self.description = description + self.security_type = security_type + self.delete_existing_ns_gs = delete_existing_ns_gs + self.provisioning_state = None + + +class SecurityConfigurationListResult(msrest.serialization.Model): + """A list of network manager security configurations. + + :param value: Gets a page of security configurations. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration] + :param next_link: Gets the URL to get the next page of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["SecurityConfiguration"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(SecurityConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SystemData(msrest.serialization.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.network.v2021_02_01_preview.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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.network.v2021_02_01_preview.models.CreatedByType + :param last_modified_at: The type of identity that last modified the resource. + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = tags + + +class UserRule(BaseUserRule): + """Network security user rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param kind: Required. Whether the rule is custom or default.Constant filled by server. + Possible values include: "Custom", "Default". + :type kind: str or ~azure.mgmt.network.v2021_02_01_preview.models.UserRuleKind + :ivar system_data: The system metadata related to this resource. + :vartype system_data: ~azure.mgmt.network.v2021_02_01_preview.models.SystemData + :param display_name: A friendly name for the rule. + :type display_name: str + :param description: A description for this rule. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "Any", "Ah". + :type protocol: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleProtocol + :param sources: The CIDR or source IP ranges. + :type sources: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param destinations: The destination address prefixes. CIDR or destination IP ranges. + :type destinations: list[~azure.mgmt.network.v2021_02_01_preview.models.AddressPrefixItem] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param direction: Indicates if the traffic matched against the rule in inbound or outbound. + Possible values include: "Inbound", "Outbound". + :type direction: str or + ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationRuleDirection + :ivar provisioning_state: The provisioning state of the security configuration user rule + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~azure.mgmt.network.v2021_02_01_preview.models.ProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'sources': {'key': 'properties.sources', 'type': '[AddressPrefixItem]'}, + 'destinations': {'key': 'properties.destinations', 'type': '[AddressPrefixItem]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityConfigurationRuleProtocol"]] = None, + sources: Optional[List["AddressPrefixItem"]] = None, + destinations: Optional[List["AddressPrefixItem"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + direction: Optional[Union[str, "SecurityConfigurationRuleDirection"]] = None, + **kwargs + ): + super(UserRule, self).__init__(**kwargs) + self.kind = 'Custom' # type: str + self.display_name = display_name + self.description = description + self.protocol = protocol + self.sources = sources + self.destinations = destinations + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.direction = direction + self.provisioning_state = None + + +class UserRuleListResult(msrest.serialization.Model): + """security user rule list result. + + :param value: A list of user rules. + :type value: list[~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BaseUserRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BaseUserRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(UserRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_network_management_client_enums.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_network_management_client_enums.py new file mode 100644 index 000000000000..b0161e3803da --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/models/_network_management_client_enums.py @@ -0,0 +1,180 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AddressPrefixType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Address prefix type. + """ + + IP_PREFIX = "IPPrefix" + SERVICE_TAG = "ServiceTag" + +class AdminRuleKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether the rule is custom or default. + """ + + CUSTOM = "Custom" + DEFAULT = "Default" + +class ConfigurationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Configuration Deployment Type. + """ + + SECURITY_ADMIN = "SecurityAdmin" + SECURITY_USER = "SecurityUser" + CONNECTIVITY = "Connectivity" + +class ConnectivityTopology(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Connectivity topology type. + """ + + HUB_AND_SPOKE = "HubAndSpoke" + MESH = "Mesh" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class DeleteExistingNSGs(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Flag if need to delete existing network security groups. + """ + + FALSE = "False" + TRUE = "True" + +class DeleteExistingPeering(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Flag if need to remove current existing peerings. + """ + + FALSE = "False" + TRUE = "True" + +class DeploymentStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Deployment Status. + """ + + NOT_STARTED = "NotStarted" + DEPLOYING = "Deploying" + DEPLOYED = "Deployed" + FAILED = "Failed" + +class EffectiveAdminRuleKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether the rule is custom or default. + """ + + CUSTOM = "Custom" + DEFAULT = "Default" + +class EffectiveUserRuleKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether the rule is custom or default. + """ + + CUSTOM = "Custom" + DEFAULT = "Default" + +class GroupConnectivity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Group connectivity type. + """ + + NONE = "None" + DIRECTLY_CONNECTED = "DirectlyConnected" + +class IsGlobal(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Flag if global mesh is supported. + """ + + FALSE = "False" + TRUE = "True" + +class MembershipType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Membership Type. + """ + + STATIC = "Static" + DYNAMIC = "Dynamic" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class SecurityConfigurationRuleAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether network traffic is allowed or denied. + """ + + ALLOW = "Allow" + DENY = "Deny" + ALWAYS_ALLOW = "AlwaysAllow" + +class SecurityConfigurationRuleDirection(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The direction of the rule. The direction specifies if the rule will be evaluated on incoming or + outgoing traffic. + """ + + INBOUND = "Inbound" + OUTBOUND = "Outbound" + +class SecurityConfigurationRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network protocol this rule applies to. + """ + + TCP = "Tcp" + UDP = "Udp" + ICMP = "Icmp" + ESP = "Esp" + ANY = "Any" + AH = "Ah" + +class SecurityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Security Type. + """ + + ADMIN_POLICY = "AdminPolicy" + USER_POLICY = "UserPolicy" + +class UseHubGateway(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Flag if need to use hub gateway. + """ + + FALSE = "False" + TRUE = "True" + +class UserRuleKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether the rule is custom or default. + """ + + CUSTOM = "Custom" + DEFAULT = "Default" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/__init__.py new file mode 100644 index 000000000000..e3ab4d13aca9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/__init__.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._network_managers_operations import NetworkManagersOperations +from ._network_manager_commits_operations import NetworkManagerCommitsOperations +from ._network_manager_deployment_status_operations import NetworkManagerDeploymentStatusOperations +from ._effective_virtual_networks_operations import EffectiveVirtualNetworksOperations +from ._active_connectivity_configurations_operations import ActiveConnectivityConfigurationsOperations +from ._active_security_admin_rules_operations import ActiveSecurityAdminRulesOperations +from ._active_security_user_rules_operations import ActiveSecurityUserRulesOperations +from ._connectivity_configurations_operations import ConnectivityConfigurationsOperations +from ._effective_connectivity_configurations_operations import EffectiveConnectivityConfigurationsOperations +from ._network_manager_effective_security_admin_rules_operations import NetworkManagerEffectiveSecurityAdminRulesOperations +from ._network_groups_operations import NetworkGroupsOperations +from ._security_user_configurations_operations import SecurityUserConfigurationsOperations +from ._user_rule_collections_operations import UserRuleCollectionsOperations +from ._user_rules_operations import UserRulesOperations +from ._security_admin_configurations_operations import SecurityAdminConfigurationsOperations +from ._admin_rule_collections_operations import AdminRuleCollectionsOperations +from ._admin_rules_operations import AdminRulesOperations +from ._network_security_perimeters_operations import NetworkSecurityPerimetersOperations +from ._perimeter_associable_resource_types_operations import PerimeterAssociableResourceTypesOperations + +__all__ = [ + 'NetworkManagersOperations', + 'NetworkManagerCommitsOperations', + 'NetworkManagerDeploymentStatusOperations', + 'EffectiveVirtualNetworksOperations', + 'ActiveConnectivityConfigurationsOperations', + 'ActiveSecurityAdminRulesOperations', + 'ActiveSecurityUserRulesOperations', + 'ConnectivityConfigurationsOperations', + 'EffectiveConnectivityConfigurationsOperations', + 'NetworkManagerEffectiveSecurityAdminRulesOperations', + 'NetworkGroupsOperations', + 'SecurityUserConfigurationsOperations', + 'UserRuleCollectionsOperations', + 'UserRulesOperations', + 'SecurityAdminConfigurationsOperations', + 'AdminRuleCollectionsOperations', + 'AdminRulesOperations', + 'NetworkSecurityPerimetersOperations', + 'PerimeterAssociableResourceTypesOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_connectivity_configurations_operations.py new file mode 100644 index 000000000000..b3cccd8ae216 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_connectivity_configurations_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ActiveConnectivityConfigurationsOperations(object): + """ActiveConnectivityConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.ActiveConfigurationParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActiveConnectivityConfigurationsListResult" + """Lists active connectivity configurations in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveConnectivityConfigurationsListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConnectivityConfigurationsListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveConnectivityConfigurationsListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveConnectivityConfigurationsListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveConnectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_admin_rules_operations.py new file mode 100644 index 000000000000..cfc78b9b64f6 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_admin_rules_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ActiveSecurityAdminRulesOperations(object): + """ActiveSecurityAdminRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.ActiveConfigurationParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActiveSecurityAdminRulesListResult" + """Lists active security admin rules in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveSecurityAdminRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveSecurityAdminRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveSecurityAdminRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveSecurityAdminRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityAdminRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_user_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_user_rules_operations.py new file mode 100644 index 000000000000..c50c995dd9f2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_active_security_user_rules_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ActiveSecurityUserRulesOperations(object): + """ActiveSecurityUserRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.ActiveConfigurationParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.ActiveSecurityUserRulesListResult" + """Lists Active Security User Rules in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Active Configuration Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveConfigurationParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ActiveSecurityUserRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ActiveSecurityUserRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ActiveSecurityUserRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ActiveConfigurationParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ActiveSecurityUserRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listActiveSecurityUserRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rule_collections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rule_collections_operations.py new file mode 100644 index 000000000000..752c53b39f4e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rule_collections_operations.py @@ -0,0 +1,351 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AdminRuleCollectionsOperations(object): + """AdminRuleCollectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RuleCollectionListResult"] + """Lists all the rule collections in a security admin configuration, in a paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RuleCollectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RuleCollectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RuleCollection" + """Gets a network manager security admin configuration rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_collection, # type: "_models.RuleCollection" + **kwargs # type: Any + ): + # type: (...) -> "_models.RuleCollection" + """Creates or updates an admin rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_collection: The Rule Collection to create or update. + :type rule_collection: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(rule_collection, 'RuleCollection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an admin rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rules_operations.py new file mode 100644 index 000000000000..a0d26b49613c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_admin_rules_operations.py @@ -0,0 +1,368 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AdminRulesOperations(object): + """AdminRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AdminRuleListResult"] + """List all network manager security configuration admin rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AdminRuleListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.AdminRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AdminRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AdminRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseAdminRule" + """Gets a network manager security configuration admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseAdminRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseAdminRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + admin_rule, # type: "_models.BaseAdminRule" + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseAdminRule" + """Creates or updates an admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param admin_rule: The admin rule to create or update. + :type admin_rule: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseAdminRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseAdminRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseAdminRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(admin_rule, 'BaseAdminRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BaseAdminRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes an admin rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_connectivity_configurations_operations.py new file mode 100644 index 000000000000..64f3fec527a3 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_connectivity_configurations_operations.py @@ -0,0 +1,335 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ConnectivityConfigurationsOperations(object): + """ConnectivityConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectivityConfiguration" + """Gets a Network Connectivity Configuration, specified by the resource group, network manager + name, and connectivity Configuration name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectivityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + connectivity_configuration, # type: "_models.ConnectivityConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectivityConfiguration" + """Creates/Updates a new network manager connectivity configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :param connectivity_configuration: Parameters supplied to create/update a network manager + connectivity configuration. + :type connectivity_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectivityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connectivity_configuration, 'ConnectivityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectivityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network manager connectivity configuration, specified by the resource group, network + manager name, and connectivity configuration name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager connectivity configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations/{configurationName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ConnectivityConfigurationListResult"] + """Lists all the network manager connectivity configuration in a specified network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConnectivityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.ConnectivityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ConnectivityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/connectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_connectivity_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_connectivity_configurations_operations.py new file mode 100644 index 000000000000..df94773153e0 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_connectivity_configurations_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class EffectiveConnectivityConfigurationsOperations(object): + """EffectiveConnectivityConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + virtual_network_name, # type: str + parameters, # type: "_models.QueryRequestOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManagerEffectiveConnectivityConfigurationListResult" + """List all effective connectivity configurations applied on a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerEffectiveConnectivityConfigurationListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerEffectiveConnectivityConfigurationListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerEffectiveConnectivityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerEffectiveConnectivityConfigurationListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveConnectivityConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_virtual_networks_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_virtual_networks_operations.py new file mode 100644 index 000000000000..6d438d765388 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_effective_virtual_networks_operations.py @@ -0,0 +1,196 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class EffectiveVirtualNetworksOperations(object): + """EffectiveVirtualNetworksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_network_manager( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.EffectiveVirtualNetworksParameter" + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.EffectiveVirtualNetworksListResult" + """List effective virtual networks in a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Effective Virtual Networks Parameter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksParameter + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EffectiveVirtualNetworksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveVirtualNetworksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_by_network_manager.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'EffectiveVirtualNetworksParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EffectiveVirtualNetworksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_network_manager.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listEffectiveVirtualNetworks'} # type: ignore + + def list_by_network_group( + self, + resource_group_name, # type: str + network_manager_name, # type: str + network_group_name, # type: str + parameters, # type: "_models.QueryRequestOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.EffectiveVirtualNetworksListResult" + """Lists all effective virtual networks by specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: EffectiveVirtualNetworksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.EffectiveVirtualNetworksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveVirtualNetworksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list_by_network_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('EffectiveVirtualNetworksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_network_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}/listEffectiveVirtualNetworks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_groups_operations.py new file mode 100644 index 000000000000..7a079d7d3a60 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_groups_operations.py @@ -0,0 +1,342 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkGroupsOperations(object): + """NetworkGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + network_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkGroup" + """Gets the specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + network_group_name, # type: str + parameters, # type: "_models.NetworkGroup" + if_match=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkGroup" + """Creates or updates a network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :param parameters: Parameters supplied to the specify which network group need to create. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :param if_match: The ETag of the transformation. Omit this value to always overwrite the + current resource. Specify the last-seen ETag value to prevent accidentally overwriting + concurrent changes. + :type if_match: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if if_match is not None: + header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str') + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + response_headers = {} + if response.status_code == 200: + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if response.status_code == 201: + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + deserialized = self._deserialize('NetworkGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + network_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param network_group_name: The name of the network group to get. + :type network_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'networkGroupName': self._serialize.url("network_group_name", network_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups/{networkGroupName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkGroupListResult"] + """Lists the specified network group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/networkGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_commits_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_commits_operations.py new file mode 100644 index 000000000000..1c68982adfe4 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_commits_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerCommitsOperations(object): + """NetworkManagerCommitsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def post( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.NetworkManagerCommit" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManagerCommit" + """Post a Network Manager Commit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network commit is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerCommit + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerCommit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerCommit + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerCommit"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.post.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManagerCommit') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerCommit', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + post.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/commit'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_deployment_status_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_deployment_status_operations.py new file mode 100644 index 000000000000..76556a8b989d --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_deployment_status_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerDeploymentStatusOperations(object): + """NetworkManagerDeploymentStatusOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.NetworkManagerDeploymentStatusParameter" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManagerDeploymentStatusListResult" + """Post to List of Network Manager Deployment Status. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which Managed Network deployment status is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatusParameter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerDeploymentStatusListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerDeploymentStatusListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerDeploymentStatusListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManagerDeploymentStatusParameter') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerDeploymentStatusListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/listDeploymentStatus'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_effective_security_admin_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_effective_security_admin_rules_operations.py new file mode 100644 index 000000000000..4305b69c894c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_manager_effective_security_admin_rules_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagerEffectiveSecurityAdminRulesOperations(object): + """NetworkManagerEffectiveSecurityAdminRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + virtual_network_name, # type: str + parameters, # type: "_models.QueryRequestOptions" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManagerEffectiveSecurityAdminRulesListResult" + """List all effective security admin rules applied on a virtual network. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to list correct page. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.QueryRequestOptions + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManagerEffectiveSecurityAdminRulesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerEffectiveSecurityAdminRulesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerEffectiveSecurityAdminRulesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryRequestOptions') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManagerEffectiveSecurityAdminRulesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/listNetworkManagerEffectiveSecurityAdminRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_managers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_managers_operations.py new file mode 100644 index 000000000000..0174d552e5f6 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_managers_operations.py @@ -0,0 +1,463 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkManagersOperations(object): + """NetworkManagersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManager" + """Gets the specified Network Manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.NetworkManager" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManager" + """Creates or updates a Network Manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to specify which network manager is. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkManager') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network manager. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def patch_tags( + self, + resource_group_name, # type: str + network_manager_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkManager" + """Patch a NetworkManager Tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param parameters: Parameters supplied to update network manager tags. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkManager, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkManager + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManager"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkManager', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}'} # type: ignore + + def list_by_subscription( + self, + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkManagerListResult"] + """List all network managers in a subscription. + + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkManagerListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkManagerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkManagers'} # type: ignore + + def list( + self, + resource_group_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkManagerListResult"] + """List network managers in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkManagerListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkManagerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkManagerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkManagerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_security_perimeters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_security_perimeters_operations.py new file mode 100644 index 000000000000..5a3be1c8dea9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_network_security_perimeters_operations.py @@ -0,0 +1,396 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkSecurityPerimetersOperations(object): + """NetworkSecurityPerimetersOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + network_security_perimeter_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkSecurityPerimeter" + """Gets the specified network security perimeter by the name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_security_perimeter_name, # type: str + parameters, # type: "_models.NetworkSecurityPerimeter" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkSecurityPerimeter" + """Creates or updates a Network Security Perimeter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :param parameters: Parameter supplied to create or update the network security perimeter. + :type parameters: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityPerimeter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeter + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeter"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkSecurityPerimeter') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkSecurityPerimeter', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_security_perimeter_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network security perimeter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_perimeter_name: The name of the network security perimeter. + :type network_security_perimeter_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkSecurityPerimeterName': self._serialize.url("network_security_perimeter_name", network_security_perimeter_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters/{networkSecurityPerimeterName}'} # type: ignore + + def list_by_subscription( + self, + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkSecurityPerimeterListResult"] + """List all network security perimeters in a subscription. + + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkSecurityPerimeterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityPerimeters'} # type: ignore + + def list( + self, + resource_group_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkSecurityPerimeterListResult"] + """List network security perimeters in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkSecurityPerimeterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.NetworkSecurityPerimeterListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityPerimeterListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkSecurityPerimeterListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityPerimeters'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_perimeter_associable_resource_types_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_perimeter_associable_resource_types_operations.py new file mode 100644 index 000000000000..80c30a1f6355 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_perimeter_associable_resource_types_operations.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PerimeterAssociableResourceTypesOperations(object): + """PerimeterAssociableResourceTypesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PerimeterAssociableResourcesListResult" + """Gets the list of resources that are onboarded with NSP. These resources can be associated with + a network security perimeter. + + :param location: The location of the where the association is present. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PerimeterAssociableResourcesListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.PerimeterAssociableResourcesListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PerimeterAssociableResourcesListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PerimeterAssociableResourcesListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/perimeterAssociableResourceTypes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_admin_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_admin_configurations_operations.py new file mode 100644 index 000000000000..ba11d9a55e7e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_admin_configurations_operations.py @@ -0,0 +1,333 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SecurityAdminConfigurationsOperations(object): + """SecurityAdminConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SecurityConfigurationListResult"] + """Lists all the network manager security admin configurations in a network manager, in a + paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SecurityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SecurityConfiguration" + """Retrieves a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + security_admin_configuration, # type: "_models.SecurityConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.SecurityConfiguration" + """Creates or updates a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param security_admin_configuration: The security admin configuration to create or update. + :type security_admin_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(security_admin_configuration, 'SecurityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network manager security admin configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityAdminConfigurations/{configurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_user_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_user_configurations_operations.py new file mode 100644 index 000000000000..b3befcb62c6c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_security_user_configurations_operations.py @@ -0,0 +1,333 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class SecurityUserConfigurationsOperations(object): + """SecurityUserConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SecurityConfigurationListResult"] + """Lists all the network manager security user configurations in a network manager, in a paginated + format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SecurityConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SecurityConfigurationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SecurityConfiguration" + """Retrieves a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + security_user_configuration, # type: "_models.SecurityConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.SecurityConfiguration" + """Creates or updates a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param security_user_configuration: The security user configuration to create or update. + :type security_user_configuration: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.SecurityConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(security_user_configuration, 'SecurityConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('SecurityConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a network manager security user configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rule_collections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rule_collections_operations.py new file mode 100644 index 000000000000..a0b0d83a4855 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rule_collections_operations.py @@ -0,0 +1,351 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class UserRuleCollectionsOperations(object): + """UserRuleCollectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.RuleCollectionListResult"] + """Lists all the user rule collections in a security configuration, in a paginated format. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either RuleCollectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.RuleCollectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('RuleCollectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.RuleCollection" + """Gets a network manager security user configuration rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + user_rule_collection, # type: "_models.RuleCollection" + **kwargs # type: Any + ): + # type: (...) -> "_models.RuleCollection" + """Creates or updates a user rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param user_rule_collection: The User Rule Collection to create or update. + :type user_rule_collection: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RuleCollection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.RuleCollection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_rule_collection, 'RuleCollection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RuleCollection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a user rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rules_operations.py new file mode 100644 index 000000000000..8d787a37c8e1 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/operations/_user_rules_operations.py @@ -0,0 +1,368 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class UserRulesOperations(object): + """UserRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_02_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + top=None, # type: Optional[int] + skip_token=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.UserRuleListResult"] + """Lists all user rules in a rule collection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param top: An optional query parameter which specifies the maximum number of records to be + returned by the server. + :type top: int + :param skip_token: SkipToken is only used if a previous operation returned a partial result. If + a previous response contains a nextLink element, the value of the nextLink element will include + a skipToken parameter that specifies a starting point to use for subsequent calls. + :type skip_token: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either UserRuleListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_02_01_preview.models.UserRuleListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UserRuleListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=20, minimum=1) + if skip_token is not None: + query_parameters['$skipToken'] = self._serialize.query("skip_token", skip_token, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('UserRuleListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseUserRule" + """Gets a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseUserRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseUserRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + user_rule, # type: "_models.BaseUserRule" + **kwargs # type: Any + ): + # type: (...) -> "_models.BaseUserRule" + """Creates or updates a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :param user_rule: The user rule to create or update. + :type user_rule: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BaseUserRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_02_01_preview.models.BaseUserRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BaseUserRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(user_rule, 'BaseUserRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BaseUserRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + network_manager_name, # type: str + configuration_name, # type: str + rule_collection_name, # type: str + rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a user rule. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_manager_name: The name of the network manager. + :type network_manager_name: str + :param configuration_name: The name of the network manager security Configuration. + :type configuration_name: str + :param rule_collection_name: The name of the network manager security Configuration rule + collection. + :type rule_collection_name: str + :param rule_name: The name of the rule. + :type rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-02-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkManagerName': self._serialize.url("network_manager_name", network_manager_name, 'str'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkManagers/{networkManagerName}/securityUserConfigurations/{configurationName}/ruleCollections/{ruleCollectionName}/rules/{ruleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/py.typed b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01_preview/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/__init__.py similarity index 100% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/__init__.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/__init__.py diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_configuration.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_configuration.py similarity index 100% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/_configuration.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_configuration.py diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_metadata.json b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_metadata.json new file mode 100644 index 000000000000..4e0faf16c3c1 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_metadata.json @@ -0,0 +1,364 @@ +{ + "chosen_version": "2021-05-01", + "total_api_version_list": ["2018-10-01", "2021-05-01"], + "client": { + "name": "NetworkManagementClient", + "filename": "_network_management_client", + "description": "Network Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"], \"._operations_mixin\": [\"NetworkManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetworkManagementClientConfiguration\"], \"._operations_mixin\": [\"NetworkManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "application_gateways": "ApplicationGatewaysOperations", + "application_gateway_private_link_resources": "ApplicationGatewayPrivateLinkResourcesOperations", + "application_gateway_private_endpoint_connections": "ApplicationGatewayPrivateEndpointConnectionsOperations", + "application_security_groups": "ApplicationSecurityGroupsOperations", + "available_delegations": "AvailableDelegationsOperations", + "available_resource_group_delegations": "AvailableResourceGroupDelegationsOperations", + "available_service_aliases": "AvailableServiceAliasesOperations", + "azure_firewalls": "AzureFirewallsOperations", + "azure_firewall_fqdn_tags": "AzureFirewallFqdnTagsOperations", + "web_categories": "WebCategoriesOperations", + "bastion_hosts": "BastionHostsOperations", + "network_interfaces": "NetworkInterfacesOperations", + "public_ip_addresses": "PublicIPAddressesOperations", + "custom_ip_prefixes": "CustomIPPrefixesOperations", + "ddos_custom_policies": "DdosCustomPoliciesOperations", + "ddos_protection_plans": "DdosProtectionPlansOperations", + "dscp_configuration": "DscpConfigurationOperations", + "available_endpoint_services": "AvailableEndpointServicesOperations", + "express_route_circuit_authorizations": "ExpressRouteCircuitAuthorizationsOperations", + "express_route_circuit_peerings": "ExpressRouteCircuitPeeringsOperations", + "express_route_circuit_connections": "ExpressRouteCircuitConnectionsOperations", + "peer_express_route_circuit_connections": "PeerExpressRouteCircuitConnectionsOperations", + "express_route_circuits": "ExpressRouteCircuitsOperations", + "express_route_service_providers": "ExpressRouteServiceProvidersOperations", + "express_route_cross_connections": "ExpressRouteCrossConnectionsOperations", + "express_route_cross_connection_peerings": "ExpressRouteCrossConnectionPeeringsOperations", + "express_route_ports_locations": "ExpressRoutePortsLocationsOperations", + "express_route_ports": "ExpressRoutePortsOperations", + "express_route_links": "ExpressRouteLinksOperations", + "firewall_policies": "FirewallPoliciesOperations", + "firewall_policy_rule_collection_groups": "FirewallPolicyRuleCollectionGroupsOperations", + "firewall_policy_idps_signatures": "FirewallPolicyIdpsSignaturesOperations", + "firewall_policy_idps_signatures_overrides": "FirewallPolicyIdpsSignaturesOverridesOperations", + "firewall_policy_idps_signatures_filter_values": "FirewallPolicyIdpsSignaturesFilterValuesOperations", + "ip_allocations": "IpAllocationsOperations", + "ip_groups": "IpGroupsOperations", + "load_balancers": "LoadBalancersOperations", + "load_balancer_backend_address_pools": "LoadBalancerBackendAddressPoolsOperations", + "load_balancer_frontend_ip_configurations": "LoadBalancerFrontendIPConfigurationsOperations", + "inbound_nat_rules": "InboundNatRulesOperations", + "load_balancer_load_balancing_rules": "LoadBalancerLoadBalancingRulesOperations", + "load_balancer_outbound_rules": "LoadBalancerOutboundRulesOperations", + "load_balancer_network_interfaces": "LoadBalancerNetworkInterfacesOperations", + "load_balancer_probes": "LoadBalancerProbesOperations", + "nat_gateways": "NatGatewaysOperations", + "network_interface_ip_configurations": "NetworkInterfaceIPConfigurationsOperations", + "network_interface_load_balancers": "NetworkInterfaceLoadBalancersOperations", + "network_interface_tap_configurations": "NetworkInterfaceTapConfigurationsOperations", + "network_profiles": "NetworkProfilesOperations", + "network_security_groups": "NetworkSecurityGroupsOperations", + "security_rules": "SecurityRulesOperations", + "default_security_rules": "DefaultSecurityRulesOperations", + "network_virtual_appliances": "NetworkVirtualAppliancesOperations", + "virtual_appliance_sites": "VirtualApplianceSitesOperations", + "virtual_appliance_skus": "VirtualApplianceSkusOperations", + "inbound_security_rule": "InboundSecurityRuleOperations", + "network_watchers": "NetworkWatchersOperations", + "packet_captures": "PacketCapturesOperations", + "connection_monitors": "ConnectionMonitorsOperations", + "flow_logs": "FlowLogsOperations", + "operations": "Operations", + "private_endpoints": "PrivateEndpointsOperations", + "available_private_endpoint_types": "AvailablePrivateEndpointTypesOperations", + "private_dns_zone_groups": "PrivateDnsZoneGroupsOperations", + "private_link_services": "PrivateLinkServicesOperations", + "public_ip_prefixes": "PublicIPPrefixesOperations", + "route_filters": "RouteFiltersOperations", + "route_filter_rules": "RouteFilterRulesOperations", + "route_tables": "RouteTablesOperations", + "routes": "RoutesOperations", + "security_partner_providers": "SecurityPartnerProvidersOperations", + "bgp_service_communities": "BgpServiceCommunitiesOperations", + "service_endpoint_policies": "ServiceEndpointPoliciesOperations", + "service_endpoint_policy_definitions": "ServiceEndpointPolicyDefinitionsOperations", + "service_tags": "ServiceTagsOperations", + "service_tag_information": "ServiceTagInformationOperations", + "usages": "UsagesOperations", + "virtual_networks": "VirtualNetworksOperations", + "subnets": "SubnetsOperations", + "resource_navigation_links": "ResourceNavigationLinksOperations", + "service_association_links": "ServiceAssociationLinksOperations", + "virtual_network_peerings": "VirtualNetworkPeeringsOperations", + "virtual_network_gateways": "VirtualNetworkGatewaysOperations", + "virtual_network_gateway_connections": "VirtualNetworkGatewayConnectionsOperations", + "local_network_gateways": "LocalNetworkGatewaysOperations", + "virtual_network_gateway_nat_rules": "VirtualNetworkGatewayNatRulesOperations", + "virtual_network_taps": "VirtualNetworkTapsOperations", + "virtual_routers": "VirtualRoutersOperations", + "virtual_router_peerings": "VirtualRouterPeeringsOperations", + "virtual_wans": "VirtualWansOperations", + "vpn_sites": "VpnSitesOperations", + "vpn_site_links": "VpnSiteLinksOperations", + "vpn_sites_configuration": "VpnSitesConfigurationOperations", + "vpn_server_configurations": "VpnServerConfigurationsOperations", + "virtual_hubs": "VirtualHubsOperations", + "hub_virtual_network_connections": "HubVirtualNetworkConnectionsOperations", + "vpn_gateways": "VpnGatewaysOperations", + "vpn_link_connections": "VpnLinkConnectionsOperations", + "vpn_connections": "VpnConnectionsOperations", + "vpn_site_link_connections": "VpnSiteLinkConnectionsOperations", + "nat_rules": "NatRulesOperations", + "p2_svpn_gateways": "P2SVpnGatewaysOperations", + "vpn_server_configurations_associated_with_virtual_wan": "VpnServerConfigurationsAssociatedWithVirtualWanOperations", + "virtual_hub_route_table_v2_s": "VirtualHubRouteTableV2SOperations", + "express_route_gateways": "ExpressRouteGatewaysOperations", + "express_route_connections": "ExpressRouteConnectionsOperations", + "virtual_hub_bgp_connection": "VirtualHubBgpConnectionOperations", + "virtual_hub_bgp_connections": "VirtualHubBgpConnectionsOperations", + "virtual_hub_ip_configuration": "VirtualHubIpConfigurationOperations", + "hub_route_tables": "HubRouteTablesOperations", + "routing_intent": "RoutingIntentOperations", + "web_application_firewall_policies": "WebApplicationFirewallPoliciesOperations" + }, + "operation_mixins": { + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.mgmt.core.polling.arm_polling\": [\"ARMPolling\"], \"azure.core.paging\": [\"ItemPaged\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Iterable\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.mgmt.core.polling.async_arm_polling\": [\"AsyncARMPolling\"], \"azure.core.async_paging\": [\"AsyncItemPaged\", \"AsyncList\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"AsyncIterable\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "_put_bastion_shareable_link_initial" : { + "sync": { + "signature": "def _put_bastion_shareable_link_initial(\n self,\n resource_group_name, # type: str\n bastion_host_name, # type: str\n bsl_request, # type: \"_models.BastionShareableLinkListRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: BastionShareableLinkListResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _put_bastion_shareable_link_initial(\n self,\n resource_group_name: str,\n bastion_host_name: str,\n bsl_request: \"_models.BastionShareableLinkListRequest\",\n **kwargs: Any\n) -\u003e Optional[\"_models.BastionShareableLinkListResult\"]:\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: BastionShareableLinkListResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, bastion_host_name, bsl_request" + }, + "begin_put_bastion_shareable_link" : { + "sync": { + "signature": "def begin_put_bastion_shareable_link(\n self,\n resource_group_name, # type: str\n bastion_host_name, # type: str\n bsl_request, # type: \"_models.BastionShareableLinkListRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Creates a Bastion Shareable Links for all the VMs specified in the request.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns an iterator like instance of either BastionShareableLinkListResult or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def begin_put_bastion_shareable_link(\n self,\n resource_group_name: str,\n bastion_host_name: str,\n bsl_request: \"_models.BastionShareableLinkListRequest\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[AsyncItemPaged[\"_models.BastionShareableLinkListResult\"]]:\n", + "doc": "\"\"\"Creates a Bastion Shareable Links for all the VMs specified in the request.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns an iterator like instance of either BastionShareableLinkListResult or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "resource_group_name, bastion_host_name, bsl_request" + }, + "_delete_bastion_shareable_link_initial" : { + "sync": { + "signature": "def _delete_bastion_shareable_link_initial(\n self,\n resource_group_name, # type: str\n bastion_host_name, # type: str\n bsl_request, # type: \"_models.BastionShareableLinkListRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _delete_bastion_shareable_link_initial(\n self,\n resource_group_name: str,\n bastion_host_name: str,\n bsl_request: \"_models.BastionShareableLinkListRequest\",\n **kwargs: Any\n) -\u003e None:\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, bastion_host_name, bsl_request" + }, + "begin_delete_bastion_shareable_link" : { + "sync": { + "signature": "def begin_delete_bastion_shareable_link(\n self,\n resource_group_name, # type: str\n bastion_host_name, # type: str\n bsl_request, # type: \"_models.BastionShareableLinkListRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Deletes the Bastion Shareable Links for all the VMs specified in the request.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_delete_bastion_shareable_link(\n self,\n resource_group_name: str,\n bastion_host_name: str,\n bsl_request: \"_models.BastionShareableLinkListRequest\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", + "doc": "\"\"\"Deletes the Bastion Shareable Links for all the VMs specified in the request.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "resource_group_name, bastion_host_name, bsl_request" + }, + "get_bastion_shareable_link" : { + "sync": { + "signature": "def get_bastion_shareable_link(\n self,\n resource_group_name, # type: str\n bastion_host_name, # type: str\n bsl_request, # type: \"_models.BastionShareableLinkListRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Return the Bastion Shareable Links for all the VMs specified in the request.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def get_bastion_shareable_link(\n self,\n resource_group_name: str,\n bastion_host_name: str,\n bsl_request: \"_models.BastionShareableLinkListRequest\",\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.BastionShareableLinkListResult\"]:\n", + "doc": "\"\"\"Return the Bastion Shareable Links for all the VMs specified in the request.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param bsl_request: Post request for all the Bastion Shareable Link endpoints.\n:type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, bastion_host_name, bsl_request" + }, + "_get_active_sessions_initial" : { + "sync": { + "signature": "def _get_active_sessions_initial(\n self,\n resource_group_name, # type: str\n bastion_host_name, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: BastionActiveSessionListResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _get_active_sessions_initial(\n self,\n resource_group_name: str,\n bastion_host_name: str,\n **kwargs: Any\n) -\u003e Optional[\"_models.BastionActiveSessionListResult\"]:\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: BastionActiveSessionListResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, bastion_host_name" + }, + "begin_get_active_sessions" : { + "sync": { + "signature": "def begin_get_active_sessions(\n self,\n resource_group_name, # type: str\n bastion_host_name, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Returns the list of currently active sessions on the Bastion.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns an iterator like instance of either BastionActiveSessionListResult or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def begin_get_active_sessions(\n self,\n resource_group_name: str,\n bastion_host_name: str,\n **kwargs: Any\n) -\u003e AsyncLROPoller[AsyncItemPaged[\"_models.BastionActiveSessionListResult\"]]:\n", + "doc": "\"\"\"Returns the list of currently active sessions on the Bastion.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns an iterator like instance of either BastionActiveSessionListResult or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "resource_group_name, bastion_host_name" + }, + "disconnect_active_sessions" : { + "sync": { + "signature": "def disconnect_active_sessions(\n self,\n resource_group_name, # type: str\n bastion_host_name, # type: str\n session_ids, # type: \"_models.SessionIds\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Returns the list of currently active sessions on the Bastion.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param session_ids: The list of sessionids to disconnect.\n:type session_ids: ~azure.mgmt.network.v2021_05_01.models.SessionIds\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response)\n:rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": false, + "signature": "def disconnect_active_sessions(\n self,\n resource_group_name: str,\n bastion_host_name: str,\n session_ids: \"_models.SessionIds\",\n **kwargs: Any\n) -\u003e AsyncItemPaged[\"_models.BastionSessionDeleteResult\"]:\n", + "doc": "\"\"\"Returns the list of currently active sessions on the Bastion.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param bastion_host_name: The name of the Bastion Host.\n:type bastion_host_name: str\n:param session_ids: The list of sessionids to disconnect.\n:type session_ids: ~azure.mgmt.network.v2021_05_01.models.SessionIds\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response)\n:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, bastion_host_name, session_ids" + }, + "check_dns_name_availability" : { + "sync": { + "signature": "def check_dns_name_availability(\n self,\n location, # type: str\n domain_name_label, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Checks whether a domain name in the cloudapp.azure.com zone is available for use.\n\n:param location: The location of the domain name.\n:type location: str\n:param domain_name_label: The domain name to be verified. It must conform to the following\n regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.\n:type domain_name_label: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DnsNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.DnsNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_dns_name_availability(\n self,\n location: str,\n domain_name_label: str,\n **kwargs: Any\n) -\u003e \"_models.DnsNameAvailabilityResult\":\n", + "doc": "\"\"\"Checks whether a domain name in the cloudapp.azure.com zone is available for use.\n\n:param location: The location of the domain name.\n:type location: str\n:param domain_name_label: The domain name to be verified. It must conform to the following\n regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$.\n:type domain_name_label: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: DnsNameAvailabilityResult, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.DnsNameAvailabilityResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "location, domain_name_label" + }, + "supported_security_providers" : { + "sync": { + "signature": "def supported_security_providers(\n self,\n resource_group_name, # type: str\n virtual_wan_name, # type: str\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Gives the supported security providers for the virtual wan.\n\n:param resource_group_name: The resource group name.\n:type resource_group_name: str\n:param virtual_wan_name: The name of the VirtualWAN for which supported security providers are\n needed.\n:type virtual_wan_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VirtualWanSecurityProviders, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProviders\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def supported_security_providers(\n self,\n resource_group_name: str,\n virtual_wan_name: str,\n **kwargs: Any\n) -\u003e \"_models.VirtualWanSecurityProviders\":\n", + "doc": "\"\"\"Gives the supported security providers for the virtual wan.\n\n:param resource_group_name: The resource group name.\n:type resource_group_name: str\n:param virtual_wan_name: The name of the VirtualWAN for which supported security providers are\n needed.\n:type virtual_wan_name: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VirtualWanSecurityProviders, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProviders\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, virtual_wan_name" + }, + "_generatevirtualwanvpnserverconfigurationvpnprofile_initial" : { + "sync": { + "signature": "def _generatevirtualwanvpnserverconfigurationvpnprofile_initial(\n self,\n resource_group_name, # type: str\n virtual_wan_name, # type: str\n vpn_client_params, # type: \"_models.VirtualWanVpnProfileParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param resource_group_name: The resource group name.\n:type resource_group_name: str\n:param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is\n needed.\n:type virtual_wan_name: str\n:param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation\n operation.\n:type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VpnProfileResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _generatevirtualwanvpnserverconfigurationvpnprofile_initial(\n self,\n resource_group_name: str,\n virtual_wan_name: str,\n vpn_client_params: \"_models.VirtualWanVpnProfileParameters\",\n **kwargs: Any\n) -\u003e Optional[\"_models.VpnProfileResponse\"]:\n", + "doc": "\"\"\"\n\n:param resource_group_name: The resource group name.\n:type resource_group_name: str\n:param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is\n needed.\n:type virtual_wan_name: str\n:param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation\n operation.\n:type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: VpnProfileResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, virtual_wan_name, vpn_client_params" + }, + "begin_generatevirtualwanvpnserverconfigurationvpnprofile" : { + "sync": { + "signature": "def begin_generatevirtualwanvpnserverconfigurationvpnprofile(\n self,\n resource_group_name, # type: str\n virtual_wan_name, # type: str\n vpn_client_params, # type: \"_models.VirtualWanVpnProfileParameters\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Generates a unique VPN profile for P2S clients for VirtualWan and associated\nVpnServerConfiguration combination in the specified resource group.\n\n:param resource_group_name: The resource group name.\n:type resource_group_name: str\n:param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is\n needed.\n:type virtual_wan_name: str\n:param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation\n operation.\n:type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either VpnProfileResponse or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_generatevirtualwanvpnserverconfigurationvpnprofile(\n self,\n resource_group_name: str,\n virtual_wan_name: str,\n vpn_client_params: \"_models.VirtualWanVpnProfileParameters\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.VpnProfileResponse\"]:\n", + "doc": "\"\"\"Generates a unique VPN profile for P2S clients for VirtualWan and associated\nVpnServerConfiguration combination in the specified resource group.\n\n:param resource_group_name: The resource group name.\n:type resource_group_name: str\n:param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is\n needed.\n:type virtual_wan_name: str\n:param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation\n operation.\n:type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either VpnProfileResponse or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "resource_group_name, virtual_wan_name, vpn_client_params" + } + } + } +} \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_network_management_client.py new file mode 100644 index 000000000000..5bca3d16b133 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_network_management_client.py @@ -0,0 +1,645 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import NetworkManagementClientConfiguration +from .operations import ApplicationGatewaysOperations +from .operations import ApplicationGatewayPrivateLinkResourcesOperations +from .operations import ApplicationGatewayPrivateEndpointConnectionsOperations +from .operations import ApplicationSecurityGroupsOperations +from .operations import AvailableDelegationsOperations +from .operations import AvailableResourceGroupDelegationsOperations +from .operations import AvailableServiceAliasesOperations +from .operations import AzureFirewallsOperations +from .operations import AzureFirewallFqdnTagsOperations +from .operations import WebCategoriesOperations +from .operations import BastionHostsOperations +from .operations import NetworkManagementClientOperationsMixin +from .operations import NetworkInterfacesOperations +from .operations import PublicIPAddressesOperations +from .operations import CustomIPPrefixesOperations +from .operations import DdosCustomPoliciesOperations +from .operations import DdosProtectionPlansOperations +from .operations import DscpConfigurationOperations +from .operations import AvailableEndpointServicesOperations +from .operations import ExpressRouteCircuitAuthorizationsOperations +from .operations import ExpressRouteCircuitPeeringsOperations +from .operations import ExpressRouteCircuitConnectionsOperations +from .operations import PeerExpressRouteCircuitConnectionsOperations +from .operations import ExpressRouteCircuitsOperations +from .operations import ExpressRouteServiceProvidersOperations +from .operations import ExpressRouteCrossConnectionsOperations +from .operations import ExpressRouteCrossConnectionPeeringsOperations +from .operations import ExpressRoutePortsLocationsOperations +from .operations import ExpressRoutePortsOperations +from .operations import ExpressRouteLinksOperations +from .operations import FirewallPoliciesOperations +from .operations import FirewallPolicyRuleCollectionGroupsOperations +from .operations import FirewallPolicyIdpsSignaturesOperations +from .operations import FirewallPolicyIdpsSignaturesOverridesOperations +from .operations import FirewallPolicyIdpsSignaturesFilterValuesOperations +from .operations import IpAllocationsOperations +from .operations import IpGroupsOperations +from .operations import LoadBalancersOperations +from .operations import LoadBalancerBackendAddressPoolsOperations +from .operations import LoadBalancerFrontendIPConfigurationsOperations +from .operations import InboundNatRulesOperations +from .operations import LoadBalancerLoadBalancingRulesOperations +from .operations import LoadBalancerOutboundRulesOperations +from .operations import LoadBalancerNetworkInterfacesOperations +from .operations import LoadBalancerProbesOperations +from .operations import NatGatewaysOperations +from .operations import NetworkInterfaceIPConfigurationsOperations +from .operations import NetworkInterfaceLoadBalancersOperations +from .operations import NetworkInterfaceTapConfigurationsOperations +from .operations import NetworkProfilesOperations +from .operations import NetworkSecurityGroupsOperations +from .operations import SecurityRulesOperations +from .operations import DefaultSecurityRulesOperations +from .operations import NetworkVirtualAppliancesOperations +from .operations import VirtualApplianceSitesOperations +from .operations import VirtualApplianceSkusOperations +from .operations import InboundSecurityRuleOperations +from .operations import NetworkWatchersOperations +from .operations import PacketCapturesOperations +from .operations import ConnectionMonitorsOperations +from .operations import FlowLogsOperations +from .operations import Operations +from .operations import PrivateEndpointsOperations +from .operations import AvailablePrivateEndpointTypesOperations +from .operations import PrivateDnsZoneGroupsOperations +from .operations import PrivateLinkServicesOperations +from .operations import PublicIPPrefixesOperations +from .operations import RouteFiltersOperations +from .operations import RouteFilterRulesOperations +from .operations import RouteTablesOperations +from .operations import RoutesOperations +from .operations import SecurityPartnerProvidersOperations +from .operations import BgpServiceCommunitiesOperations +from .operations import ServiceEndpointPoliciesOperations +from .operations import ServiceEndpointPolicyDefinitionsOperations +from .operations import ServiceTagsOperations +from .operations import ServiceTagInformationOperations +from .operations import UsagesOperations +from .operations import VirtualNetworksOperations +from .operations import SubnetsOperations +from .operations import ResourceNavigationLinksOperations +from .operations import ServiceAssociationLinksOperations +from .operations import VirtualNetworkPeeringsOperations +from .operations import VirtualNetworkGatewaysOperations +from .operations import VirtualNetworkGatewayConnectionsOperations +from .operations import LocalNetworkGatewaysOperations +from .operations import VirtualNetworkGatewayNatRulesOperations +from .operations import VirtualNetworkTapsOperations +from .operations import VirtualRoutersOperations +from .operations import VirtualRouterPeeringsOperations +from .operations import VirtualWansOperations +from .operations import VpnSitesOperations +from .operations import VpnSiteLinksOperations +from .operations import VpnSitesConfigurationOperations +from .operations import VpnServerConfigurationsOperations +from .operations import VirtualHubsOperations +from .operations import HubVirtualNetworkConnectionsOperations +from .operations import VpnGatewaysOperations +from .operations import VpnLinkConnectionsOperations +from .operations import VpnConnectionsOperations +from .operations import VpnSiteLinkConnectionsOperations +from .operations import NatRulesOperations +from .operations import P2SVpnGatewaysOperations +from .operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations +from .operations import VirtualHubRouteTableV2SOperations +from .operations import ExpressRouteGatewaysOperations +from .operations import ExpressRouteConnectionsOperations +from .operations import VirtualHubBgpConnectionOperations +from .operations import VirtualHubBgpConnectionsOperations +from .operations import VirtualHubIpConfigurationOperations +from .operations import HubRouteTablesOperations +from .operations import RoutingIntentOperations +from .operations import WebApplicationFirewallPoliciesOperations +from . import models + + +class NetworkManagementClient(NetworkManagementClientOperationsMixin): + """Network Client. + + :ivar application_gateways: ApplicationGatewaysOperations operations + :vartype application_gateways: azure.mgmt.network.v2021_05_01.operations.ApplicationGatewaysOperations + :ivar application_gateway_private_link_resources: ApplicationGatewayPrivateLinkResourcesOperations operations + :vartype application_gateway_private_link_resources: azure.mgmt.network.v2021_05_01.operations.ApplicationGatewayPrivateLinkResourcesOperations + :ivar application_gateway_private_endpoint_connections: ApplicationGatewayPrivateEndpointConnectionsOperations operations + :vartype application_gateway_private_endpoint_connections: azure.mgmt.network.v2021_05_01.operations.ApplicationGatewayPrivateEndpointConnectionsOperations + :ivar application_security_groups: ApplicationSecurityGroupsOperations operations + :vartype application_security_groups: azure.mgmt.network.v2021_05_01.operations.ApplicationSecurityGroupsOperations + :ivar available_delegations: AvailableDelegationsOperations operations + :vartype available_delegations: azure.mgmt.network.v2021_05_01.operations.AvailableDelegationsOperations + :ivar available_resource_group_delegations: AvailableResourceGroupDelegationsOperations operations + :vartype available_resource_group_delegations: azure.mgmt.network.v2021_05_01.operations.AvailableResourceGroupDelegationsOperations + :ivar available_service_aliases: AvailableServiceAliasesOperations operations + :vartype available_service_aliases: azure.mgmt.network.v2021_05_01.operations.AvailableServiceAliasesOperations + :ivar azure_firewalls: AzureFirewallsOperations operations + :vartype azure_firewalls: azure.mgmt.network.v2021_05_01.operations.AzureFirewallsOperations + :ivar azure_firewall_fqdn_tags: AzureFirewallFqdnTagsOperations operations + :vartype azure_firewall_fqdn_tags: azure.mgmt.network.v2021_05_01.operations.AzureFirewallFqdnTagsOperations + :ivar web_categories: WebCategoriesOperations operations + :vartype web_categories: azure.mgmt.network.v2021_05_01.operations.WebCategoriesOperations + :ivar bastion_hosts: BastionHostsOperations operations + :vartype bastion_hosts: azure.mgmt.network.v2021_05_01.operations.BastionHostsOperations + :ivar network_interfaces: NetworkInterfacesOperations operations + :vartype network_interfaces: azure.mgmt.network.v2021_05_01.operations.NetworkInterfacesOperations + :ivar public_ip_addresses: PublicIPAddressesOperations operations + :vartype public_ip_addresses: azure.mgmt.network.v2021_05_01.operations.PublicIPAddressesOperations + :ivar custom_ip_prefixes: CustomIPPrefixesOperations operations + :vartype custom_ip_prefixes: azure.mgmt.network.v2021_05_01.operations.CustomIPPrefixesOperations + :ivar ddos_custom_policies: DdosCustomPoliciesOperations operations + :vartype ddos_custom_policies: azure.mgmt.network.v2021_05_01.operations.DdosCustomPoliciesOperations + :ivar ddos_protection_plans: DdosProtectionPlansOperations operations + :vartype ddos_protection_plans: azure.mgmt.network.v2021_05_01.operations.DdosProtectionPlansOperations + :ivar dscp_configuration: DscpConfigurationOperations operations + :vartype dscp_configuration: azure.mgmt.network.v2021_05_01.operations.DscpConfigurationOperations + :ivar available_endpoint_services: AvailableEndpointServicesOperations operations + :vartype available_endpoint_services: azure.mgmt.network.v2021_05_01.operations.AvailableEndpointServicesOperations + :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations + :vartype express_route_circuit_authorizations: azure.mgmt.network.v2021_05_01.operations.ExpressRouteCircuitAuthorizationsOperations + :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations + :vartype express_route_circuit_peerings: azure.mgmt.network.v2021_05_01.operations.ExpressRouteCircuitPeeringsOperations + :ivar express_route_circuit_connections: ExpressRouteCircuitConnectionsOperations operations + :vartype express_route_circuit_connections: azure.mgmt.network.v2021_05_01.operations.ExpressRouteCircuitConnectionsOperations + :ivar peer_express_route_circuit_connections: PeerExpressRouteCircuitConnectionsOperations operations + :vartype peer_express_route_circuit_connections: azure.mgmt.network.v2021_05_01.operations.PeerExpressRouteCircuitConnectionsOperations + :ivar express_route_circuits: ExpressRouteCircuitsOperations operations + :vartype express_route_circuits: azure.mgmt.network.v2021_05_01.operations.ExpressRouteCircuitsOperations + :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations + :vartype express_route_service_providers: azure.mgmt.network.v2021_05_01.operations.ExpressRouteServiceProvidersOperations + :ivar express_route_cross_connections: ExpressRouteCrossConnectionsOperations operations + :vartype express_route_cross_connections: azure.mgmt.network.v2021_05_01.operations.ExpressRouteCrossConnectionsOperations + :ivar express_route_cross_connection_peerings: ExpressRouteCrossConnectionPeeringsOperations operations + :vartype express_route_cross_connection_peerings: azure.mgmt.network.v2021_05_01.operations.ExpressRouteCrossConnectionPeeringsOperations + :ivar express_route_ports_locations: ExpressRoutePortsLocationsOperations operations + :vartype express_route_ports_locations: azure.mgmt.network.v2021_05_01.operations.ExpressRoutePortsLocationsOperations + :ivar express_route_ports: ExpressRoutePortsOperations operations + :vartype express_route_ports: azure.mgmt.network.v2021_05_01.operations.ExpressRoutePortsOperations + :ivar express_route_links: ExpressRouteLinksOperations operations + :vartype express_route_links: azure.mgmt.network.v2021_05_01.operations.ExpressRouteLinksOperations + :ivar firewall_policies: FirewallPoliciesOperations operations + :vartype firewall_policies: azure.mgmt.network.v2021_05_01.operations.FirewallPoliciesOperations + :ivar firewall_policy_rule_collection_groups: FirewallPolicyRuleCollectionGroupsOperations operations + :vartype firewall_policy_rule_collection_groups: azure.mgmt.network.v2021_05_01.operations.FirewallPolicyRuleCollectionGroupsOperations + :ivar firewall_policy_idps_signatures: FirewallPolicyIdpsSignaturesOperations operations + :vartype firewall_policy_idps_signatures: azure.mgmt.network.v2021_05_01.operations.FirewallPolicyIdpsSignaturesOperations + :ivar firewall_policy_idps_signatures_overrides: FirewallPolicyIdpsSignaturesOverridesOperations operations + :vartype firewall_policy_idps_signatures_overrides: azure.mgmt.network.v2021_05_01.operations.FirewallPolicyIdpsSignaturesOverridesOperations + :ivar firewall_policy_idps_signatures_filter_values: FirewallPolicyIdpsSignaturesFilterValuesOperations operations + :vartype firewall_policy_idps_signatures_filter_values: azure.mgmt.network.v2021_05_01.operations.FirewallPolicyIdpsSignaturesFilterValuesOperations + :ivar ip_allocations: IpAllocationsOperations operations + :vartype ip_allocations: azure.mgmt.network.v2021_05_01.operations.IpAllocationsOperations + :ivar ip_groups: IpGroupsOperations operations + :vartype ip_groups: azure.mgmt.network.v2021_05_01.operations.IpGroupsOperations + :ivar load_balancers: LoadBalancersOperations operations + :vartype load_balancers: azure.mgmt.network.v2021_05_01.operations.LoadBalancersOperations + :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations + :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2021_05_01.operations.LoadBalancerBackendAddressPoolsOperations + :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations + :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2021_05_01.operations.LoadBalancerFrontendIPConfigurationsOperations + :ivar inbound_nat_rules: InboundNatRulesOperations operations + :vartype inbound_nat_rules: azure.mgmt.network.v2021_05_01.operations.InboundNatRulesOperations + :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations + :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2021_05_01.operations.LoadBalancerLoadBalancingRulesOperations + :ivar load_balancer_outbound_rules: LoadBalancerOutboundRulesOperations operations + :vartype load_balancer_outbound_rules: azure.mgmt.network.v2021_05_01.operations.LoadBalancerOutboundRulesOperations + :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations + :vartype load_balancer_network_interfaces: azure.mgmt.network.v2021_05_01.operations.LoadBalancerNetworkInterfacesOperations + :ivar load_balancer_probes: LoadBalancerProbesOperations operations + :vartype load_balancer_probes: azure.mgmt.network.v2021_05_01.operations.LoadBalancerProbesOperations + :ivar nat_gateways: NatGatewaysOperations operations + :vartype nat_gateways: azure.mgmt.network.v2021_05_01.operations.NatGatewaysOperations + :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations + :vartype network_interface_ip_configurations: azure.mgmt.network.v2021_05_01.operations.NetworkInterfaceIPConfigurationsOperations + :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations + :vartype network_interface_load_balancers: azure.mgmt.network.v2021_05_01.operations.NetworkInterfaceLoadBalancersOperations + :ivar network_interface_tap_configurations: NetworkInterfaceTapConfigurationsOperations operations + :vartype network_interface_tap_configurations: azure.mgmt.network.v2021_05_01.operations.NetworkInterfaceTapConfigurationsOperations + :ivar network_profiles: NetworkProfilesOperations operations + :vartype network_profiles: azure.mgmt.network.v2021_05_01.operations.NetworkProfilesOperations + :ivar network_security_groups: NetworkSecurityGroupsOperations operations + :vartype network_security_groups: azure.mgmt.network.v2021_05_01.operations.NetworkSecurityGroupsOperations + :ivar security_rules: SecurityRulesOperations operations + :vartype security_rules: azure.mgmt.network.v2021_05_01.operations.SecurityRulesOperations + :ivar default_security_rules: DefaultSecurityRulesOperations operations + :vartype default_security_rules: azure.mgmt.network.v2021_05_01.operations.DefaultSecurityRulesOperations + :ivar network_virtual_appliances: NetworkVirtualAppliancesOperations operations + :vartype network_virtual_appliances: azure.mgmt.network.v2021_05_01.operations.NetworkVirtualAppliancesOperations + :ivar virtual_appliance_sites: VirtualApplianceSitesOperations operations + :vartype virtual_appliance_sites: azure.mgmt.network.v2021_05_01.operations.VirtualApplianceSitesOperations + :ivar virtual_appliance_skus: VirtualApplianceSkusOperations operations + :vartype virtual_appliance_skus: azure.mgmt.network.v2021_05_01.operations.VirtualApplianceSkusOperations + :ivar inbound_security_rule: InboundSecurityRuleOperations operations + :vartype inbound_security_rule: azure.mgmt.network.v2021_05_01.operations.InboundSecurityRuleOperations + :ivar network_watchers: NetworkWatchersOperations operations + :vartype network_watchers: azure.mgmt.network.v2021_05_01.operations.NetworkWatchersOperations + :ivar packet_captures: PacketCapturesOperations operations + :vartype packet_captures: azure.mgmt.network.v2021_05_01.operations.PacketCapturesOperations + :ivar connection_monitors: ConnectionMonitorsOperations operations + :vartype connection_monitors: azure.mgmt.network.v2021_05_01.operations.ConnectionMonitorsOperations + :ivar flow_logs: FlowLogsOperations operations + :vartype flow_logs: azure.mgmt.network.v2021_05_01.operations.FlowLogsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.network.v2021_05_01.operations.Operations + :ivar private_endpoints: PrivateEndpointsOperations operations + :vartype private_endpoints: azure.mgmt.network.v2021_05_01.operations.PrivateEndpointsOperations + :ivar available_private_endpoint_types: AvailablePrivateEndpointTypesOperations operations + :vartype available_private_endpoint_types: azure.mgmt.network.v2021_05_01.operations.AvailablePrivateEndpointTypesOperations + :ivar private_dns_zone_groups: PrivateDnsZoneGroupsOperations operations + :vartype private_dns_zone_groups: azure.mgmt.network.v2021_05_01.operations.PrivateDnsZoneGroupsOperations + :ivar private_link_services: PrivateLinkServicesOperations operations + :vartype private_link_services: azure.mgmt.network.v2021_05_01.operations.PrivateLinkServicesOperations + :ivar public_ip_prefixes: PublicIPPrefixesOperations operations + :vartype public_ip_prefixes: azure.mgmt.network.v2021_05_01.operations.PublicIPPrefixesOperations + :ivar route_filters: RouteFiltersOperations operations + :vartype route_filters: azure.mgmt.network.v2021_05_01.operations.RouteFiltersOperations + :ivar route_filter_rules: RouteFilterRulesOperations operations + :vartype route_filter_rules: azure.mgmt.network.v2021_05_01.operations.RouteFilterRulesOperations + :ivar route_tables: RouteTablesOperations operations + :vartype route_tables: azure.mgmt.network.v2021_05_01.operations.RouteTablesOperations + :ivar routes: RoutesOperations operations + :vartype routes: azure.mgmt.network.v2021_05_01.operations.RoutesOperations + :ivar security_partner_providers: SecurityPartnerProvidersOperations operations + :vartype security_partner_providers: azure.mgmt.network.v2021_05_01.operations.SecurityPartnerProvidersOperations + :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations + :vartype bgp_service_communities: azure.mgmt.network.v2021_05_01.operations.BgpServiceCommunitiesOperations + :ivar service_endpoint_policies: ServiceEndpointPoliciesOperations operations + :vartype service_endpoint_policies: azure.mgmt.network.v2021_05_01.operations.ServiceEndpointPoliciesOperations + :ivar service_endpoint_policy_definitions: ServiceEndpointPolicyDefinitionsOperations operations + :vartype service_endpoint_policy_definitions: azure.mgmt.network.v2021_05_01.operations.ServiceEndpointPolicyDefinitionsOperations + :ivar service_tags: ServiceTagsOperations operations + :vartype service_tags: azure.mgmt.network.v2021_05_01.operations.ServiceTagsOperations + :ivar service_tag_information: ServiceTagInformationOperations operations + :vartype service_tag_information: azure.mgmt.network.v2021_05_01.operations.ServiceTagInformationOperations + :ivar usages: UsagesOperations operations + :vartype usages: azure.mgmt.network.v2021_05_01.operations.UsagesOperations + :ivar virtual_networks: VirtualNetworksOperations operations + :vartype virtual_networks: azure.mgmt.network.v2021_05_01.operations.VirtualNetworksOperations + :ivar subnets: SubnetsOperations operations + :vartype subnets: azure.mgmt.network.v2021_05_01.operations.SubnetsOperations + :ivar resource_navigation_links: ResourceNavigationLinksOperations operations + :vartype resource_navigation_links: azure.mgmt.network.v2021_05_01.operations.ResourceNavigationLinksOperations + :ivar service_association_links: ServiceAssociationLinksOperations operations + :vartype service_association_links: azure.mgmt.network.v2021_05_01.operations.ServiceAssociationLinksOperations + :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations + :vartype virtual_network_peerings: azure.mgmt.network.v2021_05_01.operations.VirtualNetworkPeeringsOperations + :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations + :vartype virtual_network_gateways: azure.mgmt.network.v2021_05_01.operations.VirtualNetworkGatewaysOperations + :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations + :vartype virtual_network_gateway_connections: azure.mgmt.network.v2021_05_01.operations.VirtualNetworkGatewayConnectionsOperations + :ivar local_network_gateways: LocalNetworkGatewaysOperations operations + :vartype local_network_gateways: azure.mgmt.network.v2021_05_01.operations.LocalNetworkGatewaysOperations + :ivar virtual_network_gateway_nat_rules: VirtualNetworkGatewayNatRulesOperations operations + :vartype virtual_network_gateway_nat_rules: azure.mgmt.network.v2021_05_01.operations.VirtualNetworkGatewayNatRulesOperations + :ivar virtual_network_taps: VirtualNetworkTapsOperations operations + :vartype virtual_network_taps: azure.mgmt.network.v2021_05_01.operations.VirtualNetworkTapsOperations + :ivar virtual_routers: VirtualRoutersOperations operations + :vartype virtual_routers: azure.mgmt.network.v2021_05_01.operations.VirtualRoutersOperations + :ivar virtual_router_peerings: VirtualRouterPeeringsOperations operations + :vartype virtual_router_peerings: azure.mgmt.network.v2021_05_01.operations.VirtualRouterPeeringsOperations + :ivar virtual_wans: VirtualWansOperations operations + :vartype virtual_wans: azure.mgmt.network.v2021_05_01.operations.VirtualWansOperations + :ivar vpn_sites: VpnSitesOperations operations + :vartype vpn_sites: azure.mgmt.network.v2021_05_01.operations.VpnSitesOperations + :ivar vpn_site_links: VpnSiteLinksOperations operations + :vartype vpn_site_links: azure.mgmt.network.v2021_05_01.operations.VpnSiteLinksOperations + :ivar vpn_sites_configuration: VpnSitesConfigurationOperations operations + :vartype vpn_sites_configuration: azure.mgmt.network.v2021_05_01.operations.VpnSitesConfigurationOperations + :ivar vpn_server_configurations: VpnServerConfigurationsOperations operations + :vartype vpn_server_configurations: azure.mgmt.network.v2021_05_01.operations.VpnServerConfigurationsOperations + :ivar virtual_hubs: VirtualHubsOperations operations + :vartype virtual_hubs: azure.mgmt.network.v2021_05_01.operations.VirtualHubsOperations + :ivar hub_virtual_network_connections: HubVirtualNetworkConnectionsOperations operations + :vartype hub_virtual_network_connections: azure.mgmt.network.v2021_05_01.operations.HubVirtualNetworkConnectionsOperations + :ivar vpn_gateways: VpnGatewaysOperations operations + :vartype vpn_gateways: azure.mgmt.network.v2021_05_01.operations.VpnGatewaysOperations + :ivar vpn_link_connections: VpnLinkConnectionsOperations operations + :vartype vpn_link_connections: azure.mgmt.network.v2021_05_01.operations.VpnLinkConnectionsOperations + :ivar vpn_connections: VpnConnectionsOperations operations + :vartype vpn_connections: azure.mgmt.network.v2021_05_01.operations.VpnConnectionsOperations + :ivar vpn_site_link_connections: VpnSiteLinkConnectionsOperations operations + :vartype vpn_site_link_connections: azure.mgmt.network.v2021_05_01.operations.VpnSiteLinkConnectionsOperations + :ivar nat_rules: NatRulesOperations operations + :vartype nat_rules: azure.mgmt.network.v2021_05_01.operations.NatRulesOperations + :ivar p2_svpn_gateways: P2SVpnGatewaysOperations operations + :vartype p2_svpn_gateways: azure.mgmt.network.v2021_05_01.operations.P2SVpnGatewaysOperations + :ivar vpn_server_configurations_associated_with_virtual_wan: VpnServerConfigurationsAssociatedWithVirtualWanOperations operations + :vartype vpn_server_configurations_associated_with_virtual_wan: azure.mgmt.network.v2021_05_01.operations.VpnServerConfigurationsAssociatedWithVirtualWanOperations + :ivar virtual_hub_route_table_v2_s: VirtualHubRouteTableV2SOperations operations + :vartype virtual_hub_route_table_v2_s: azure.mgmt.network.v2021_05_01.operations.VirtualHubRouteTableV2SOperations + :ivar express_route_gateways: ExpressRouteGatewaysOperations operations + :vartype express_route_gateways: azure.mgmt.network.v2021_05_01.operations.ExpressRouteGatewaysOperations + :ivar express_route_connections: ExpressRouteConnectionsOperations operations + :vartype express_route_connections: azure.mgmt.network.v2021_05_01.operations.ExpressRouteConnectionsOperations + :ivar virtual_hub_bgp_connection: VirtualHubBgpConnectionOperations operations + :vartype virtual_hub_bgp_connection: azure.mgmt.network.v2021_05_01.operations.VirtualHubBgpConnectionOperations + :ivar virtual_hub_bgp_connections: VirtualHubBgpConnectionsOperations operations + :vartype virtual_hub_bgp_connections: azure.mgmt.network.v2021_05_01.operations.VirtualHubBgpConnectionsOperations + :ivar virtual_hub_ip_configuration: VirtualHubIpConfigurationOperations operations + :vartype virtual_hub_ip_configuration: azure.mgmt.network.v2021_05_01.operations.VirtualHubIpConfigurationOperations + :ivar hub_route_tables: HubRouteTablesOperations operations + :vartype hub_route_tables: azure.mgmt.network.v2021_05_01.operations.HubRouteTablesOperations + :ivar routing_intent: RoutingIntentOperations operations + :vartype routing_intent: azure.mgmt.network.v2021_05_01.operations.RoutingIntentOperations + :ivar web_application_firewall_policies: WebApplicationFirewallPoliciesOperations operations + :vartype web_application_firewall_policies: azure.mgmt.network.v2021_05_01.operations.WebApplicationFirewallPoliciesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.application_gateways = ApplicationGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.application_gateway_private_link_resources = ApplicationGatewayPrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.application_gateway_private_endpoint_connections = ApplicationGatewayPrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.application_security_groups = ApplicationSecurityGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_delegations = AvailableDelegationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_resource_group_delegations = AvailableResourceGroupDelegationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_service_aliases = AvailableServiceAliasesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.azure_firewalls = AzureFirewallsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.azure_firewall_fqdn_tags = AzureFirewallFqdnTagsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.web_categories = WebCategoriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.bastion_hosts = BastionHostsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_interfaces = NetworkInterfacesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.public_ip_addresses = PublicIPAddressesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.custom_ip_prefixes = CustomIPPrefixesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.ddos_custom_policies = DdosCustomPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.ddos_protection_plans = DdosProtectionPlansOperations( + self._client, self._config, self._serialize, self._deserialize) + self.dscp_configuration = DscpConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_endpoint_services = AvailableEndpointServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_connections = ExpressRouteCircuitConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.peer_express_route_circuit_connections = PeerExpressRouteCircuitConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuits = ExpressRouteCircuitsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_service_providers = ExpressRouteServiceProvidersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_cross_connections = ExpressRouteCrossConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_cross_connection_peerings = ExpressRouteCrossConnectionPeeringsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_ports_locations = ExpressRoutePortsLocationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_ports = ExpressRoutePortsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_links = ExpressRouteLinksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policies = FirewallPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_rule_collection_groups = FirewallPolicyRuleCollectionGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures = FirewallPolicyIdpsSignaturesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures_overrides = FirewallPolicyIdpsSignaturesOverridesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures_filter_values = FirewallPolicyIdpsSignaturesFilterValuesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.ip_allocations = IpAllocationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.ip_groups = IpGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancers = LoadBalancersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.inbound_nat_rules = InboundNatRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_outbound_rules = LoadBalancerOutboundRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_probes = LoadBalancerProbesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.nat_gateways = NatGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_interface_tap_configurations = NetworkInterfaceTapConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_profiles = NetworkProfilesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_security_groups = NetworkSecurityGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_rules = SecurityRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.default_security_rules = DefaultSecurityRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_virtual_appliances = NetworkVirtualAppliancesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_appliance_sites = VirtualApplianceSitesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_appliance_skus = VirtualApplianceSkusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.inbound_security_rule = InboundSecurityRuleOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_watchers = NetworkWatchersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.packet_captures = PacketCapturesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.connection_monitors = ConnectionMonitorsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.flow_logs = FlowLogsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoints = PrivateEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_private_endpoint_types = AvailablePrivateEndpointTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_dns_zone_groups = PrivateDnsZoneGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_services = PrivateLinkServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.public_ip_prefixes = PublicIPPrefixesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.route_filters = RouteFiltersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.route_filter_rules = RouteFilterRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.route_tables = RouteTablesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.routes = RoutesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_partner_providers = SecurityPartnerProvidersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.bgp_service_communities = BgpServiceCommunitiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_endpoint_policies = ServiceEndpointPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_endpoint_policy_definitions = ServiceEndpointPolicyDefinitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_tags = ServiceTagsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_tag_information = ServiceTagInformationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_networks = VirtualNetworksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.subnets = SubnetsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_navigation_links = ResourceNavigationLinksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_association_links = ServiceAssociationLinksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_peerings = VirtualNetworkPeeringsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateways = VirtualNetworkGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.local_network_gateways = LocalNetworkGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateway_nat_rules = VirtualNetworkGatewayNatRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_taps = VirtualNetworkTapsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_routers = VirtualRoutersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_router_peerings = VirtualRouterPeeringsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_wans = VirtualWansOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_sites = VpnSitesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_site_links = VpnSiteLinksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_sites_configuration = VpnSitesConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_server_configurations = VpnServerConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hubs = VirtualHubsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.hub_virtual_network_connections = HubVirtualNetworkConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_gateways = VpnGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_link_connections = VpnLinkConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_connections = VpnConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_site_link_connections = VpnSiteLinkConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.nat_rules = NatRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.p2_svpn_gateways = P2SVpnGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_server_configurations_associated_with_virtual_wan = VpnServerConfigurationsAssociatedWithVirtualWanOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_route_table_v2_s = VirtualHubRouteTableV2SOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_gateways = ExpressRouteGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_connections = ExpressRouteConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_bgp_connection = VirtualHubBgpConnectionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_bgp_connections = VirtualHubBgpConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_ip_configuration = VirtualHubIpConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.hub_route_tables = HubRouteTablesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.routing_intent = RoutingIntentOperations( + self._client, self._config, self._serialize, self._deserialize) + self.web_application_firewall_policies = WebApplicationFirewallPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> NetworkManagementClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_version.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_version.py new file mode 100644 index 000000000000..f84067011e13 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "19.3.0" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/__init__.py similarity index 100% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/__init__.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/__init__.py diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/_configuration.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/_configuration.py similarity index 100% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/_configuration.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/_configuration.py diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/_network_management_client.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/_network_management_client.py new file mode 100644 index 000000000000..457350e09afd --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/_network_management_client.py @@ -0,0 +1,638 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import NetworkManagementClientConfiguration +from .operations import ApplicationGatewaysOperations +from .operations import ApplicationGatewayPrivateLinkResourcesOperations +from .operations import ApplicationGatewayPrivateEndpointConnectionsOperations +from .operations import ApplicationSecurityGroupsOperations +from .operations import AvailableDelegationsOperations +from .operations import AvailableResourceGroupDelegationsOperations +from .operations import AvailableServiceAliasesOperations +from .operations import AzureFirewallsOperations +from .operations import AzureFirewallFqdnTagsOperations +from .operations import WebCategoriesOperations +from .operations import BastionHostsOperations +from .operations import NetworkManagementClientOperationsMixin +from .operations import NetworkInterfacesOperations +from .operations import PublicIPAddressesOperations +from .operations import CustomIPPrefixesOperations +from .operations import DdosCustomPoliciesOperations +from .operations import DdosProtectionPlansOperations +from .operations import DscpConfigurationOperations +from .operations import AvailableEndpointServicesOperations +from .operations import ExpressRouteCircuitAuthorizationsOperations +from .operations import ExpressRouteCircuitPeeringsOperations +from .operations import ExpressRouteCircuitConnectionsOperations +from .operations import PeerExpressRouteCircuitConnectionsOperations +from .operations import ExpressRouteCircuitsOperations +from .operations import ExpressRouteServiceProvidersOperations +from .operations import ExpressRouteCrossConnectionsOperations +from .operations import ExpressRouteCrossConnectionPeeringsOperations +from .operations import ExpressRoutePortsLocationsOperations +from .operations import ExpressRoutePortsOperations +from .operations import ExpressRouteLinksOperations +from .operations import FirewallPoliciesOperations +from .operations import FirewallPolicyRuleCollectionGroupsOperations +from .operations import FirewallPolicyIdpsSignaturesOperations +from .operations import FirewallPolicyIdpsSignaturesOverridesOperations +from .operations import FirewallPolicyIdpsSignaturesFilterValuesOperations +from .operations import IpAllocationsOperations +from .operations import IpGroupsOperations +from .operations import LoadBalancersOperations +from .operations import LoadBalancerBackendAddressPoolsOperations +from .operations import LoadBalancerFrontendIPConfigurationsOperations +from .operations import InboundNatRulesOperations +from .operations import LoadBalancerLoadBalancingRulesOperations +from .operations import LoadBalancerOutboundRulesOperations +from .operations import LoadBalancerNetworkInterfacesOperations +from .operations import LoadBalancerProbesOperations +from .operations import NatGatewaysOperations +from .operations import NetworkInterfaceIPConfigurationsOperations +from .operations import NetworkInterfaceLoadBalancersOperations +from .operations import NetworkInterfaceTapConfigurationsOperations +from .operations import NetworkProfilesOperations +from .operations import NetworkSecurityGroupsOperations +from .operations import SecurityRulesOperations +from .operations import DefaultSecurityRulesOperations +from .operations import NetworkVirtualAppliancesOperations +from .operations import VirtualApplianceSitesOperations +from .operations import VirtualApplianceSkusOperations +from .operations import InboundSecurityRuleOperations +from .operations import NetworkWatchersOperations +from .operations import PacketCapturesOperations +from .operations import ConnectionMonitorsOperations +from .operations import FlowLogsOperations +from .operations import Operations +from .operations import PrivateEndpointsOperations +from .operations import AvailablePrivateEndpointTypesOperations +from .operations import PrivateDnsZoneGroupsOperations +from .operations import PrivateLinkServicesOperations +from .operations import PublicIPPrefixesOperations +from .operations import RouteFiltersOperations +from .operations import RouteFilterRulesOperations +from .operations import RouteTablesOperations +from .operations import RoutesOperations +from .operations import SecurityPartnerProvidersOperations +from .operations import BgpServiceCommunitiesOperations +from .operations import ServiceEndpointPoliciesOperations +from .operations import ServiceEndpointPolicyDefinitionsOperations +from .operations import ServiceTagsOperations +from .operations import ServiceTagInformationOperations +from .operations import UsagesOperations +from .operations import VirtualNetworksOperations +from .operations import SubnetsOperations +from .operations import ResourceNavigationLinksOperations +from .operations import ServiceAssociationLinksOperations +from .operations import VirtualNetworkPeeringsOperations +from .operations import VirtualNetworkGatewaysOperations +from .operations import VirtualNetworkGatewayConnectionsOperations +from .operations import LocalNetworkGatewaysOperations +from .operations import VirtualNetworkGatewayNatRulesOperations +from .operations import VirtualNetworkTapsOperations +from .operations import VirtualRoutersOperations +from .operations import VirtualRouterPeeringsOperations +from .operations import VirtualWansOperations +from .operations import VpnSitesOperations +from .operations import VpnSiteLinksOperations +from .operations import VpnSitesConfigurationOperations +from .operations import VpnServerConfigurationsOperations +from .operations import VirtualHubsOperations +from .operations import HubVirtualNetworkConnectionsOperations +from .operations import VpnGatewaysOperations +from .operations import VpnLinkConnectionsOperations +from .operations import VpnConnectionsOperations +from .operations import VpnSiteLinkConnectionsOperations +from .operations import NatRulesOperations +from .operations import P2SVpnGatewaysOperations +from .operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations +from .operations import VirtualHubRouteTableV2SOperations +from .operations import ExpressRouteGatewaysOperations +from .operations import ExpressRouteConnectionsOperations +from .operations import VirtualHubBgpConnectionOperations +from .operations import VirtualHubBgpConnectionsOperations +from .operations import VirtualHubIpConfigurationOperations +from .operations import HubRouteTablesOperations +from .operations import RoutingIntentOperations +from .operations import WebApplicationFirewallPoliciesOperations +from .. import models + + +class NetworkManagementClient(NetworkManagementClientOperationsMixin): + """Network Client. + + :ivar application_gateways: ApplicationGatewaysOperations operations + :vartype application_gateways: azure.mgmt.network.v2021_05_01.aio.operations.ApplicationGatewaysOperations + :ivar application_gateway_private_link_resources: ApplicationGatewayPrivateLinkResourcesOperations operations + :vartype application_gateway_private_link_resources: azure.mgmt.network.v2021_05_01.aio.operations.ApplicationGatewayPrivateLinkResourcesOperations + :ivar application_gateway_private_endpoint_connections: ApplicationGatewayPrivateEndpointConnectionsOperations operations + :vartype application_gateway_private_endpoint_connections: azure.mgmt.network.v2021_05_01.aio.operations.ApplicationGatewayPrivateEndpointConnectionsOperations + :ivar application_security_groups: ApplicationSecurityGroupsOperations operations + :vartype application_security_groups: azure.mgmt.network.v2021_05_01.aio.operations.ApplicationSecurityGroupsOperations + :ivar available_delegations: AvailableDelegationsOperations operations + :vartype available_delegations: azure.mgmt.network.v2021_05_01.aio.operations.AvailableDelegationsOperations + :ivar available_resource_group_delegations: AvailableResourceGroupDelegationsOperations operations + :vartype available_resource_group_delegations: azure.mgmt.network.v2021_05_01.aio.operations.AvailableResourceGroupDelegationsOperations + :ivar available_service_aliases: AvailableServiceAliasesOperations operations + :vartype available_service_aliases: azure.mgmt.network.v2021_05_01.aio.operations.AvailableServiceAliasesOperations + :ivar azure_firewalls: AzureFirewallsOperations operations + :vartype azure_firewalls: azure.mgmt.network.v2021_05_01.aio.operations.AzureFirewallsOperations + :ivar azure_firewall_fqdn_tags: AzureFirewallFqdnTagsOperations operations + :vartype azure_firewall_fqdn_tags: azure.mgmt.network.v2021_05_01.aio.operations.AzureFirewallFqdnTagsOperations + :ivar web_categories: WebCategoriesOperations operations + :vartype web_categories: azure.mgmt.network.v2021_05_01.aio.operations.WebCategoriesOperations + :ivar bastion_hosts: BastionHostsOperations operations + :vartype bastion_hosts: azure.mgmt.network.v2021_05_01.aio.operations.BastionHostsOperations + :ivar network_interfaces: NetworkInterfacesOperations operations + :vartype network_interfaces: azure.mgmt.network.v2021_05_01.aio.operations.NetworkInterfacesOperations + :ivar public_ip_addresses: PublicIPAddressesOperations operations + :vartype public_ip_addresses: azure.mgmt.network.v2021_05_01.aio.operations.PublicIPAddressesOperations + :ivar custom_ip_prefixes: CustomIPPrefixesOperations operations + :vartype custom_ip_prefixes: azure.mgmt.network.v2021_05_01.aio.operations.CustomIPPrefixesOperations + :ivar ddos_custom_policies: DdosCustomPoliciesOperations operations + :vartype ddos_custom_policies: azure.mgmt.network.v2021_05_01.aio.operations.DdosCustomPoliciesOperations + :ivar ddos_protection_plans: DdosProtectionPlansOperations operations + :vartype ddos_protection_plans: azure.mgmt.network.v2021_05_01.aio.operations.DdosProtectionPlansOperations + :ivar dscp_configuration: DscpConfigurationOperations operations + :vartype dscp_configuration: azure.mgmt.network.v2021_05_01.aio.operations.DscpConfigurationOperations + :ivar available_endpoint_services: AvailableEndpointServicesOperations operations + :vartype available_endpoint_services: azure.mgmt.network.v2021_05_01.aio.operations.AvailableEndpointServicesOperations + :ivar express_route_circuit_authorizations: ExpressRouteCircuitAuthorizationsOperations operations + :vartype express_route_circuit_authorizations: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteCircuitAuthorizationsOperations + :ivar express_route_circuit_peerings: ExpressRouteCircuitPeeringsOperations operations + :vartype express_route_circuit_peerings: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteCircuitPeeringsOperations + :ivar express_route_circuit_connections: ExpressRouteCircuitConnectionsOperations operations + :vartype express_route_circuit_connections: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteCircuitConnectionsOperations + :ivar peer_express_route_circuit_connections: PeerExpressRouteCircuitConnectionsOperations operations + :vartype peer_express_route_circuit_connections: azure.mgmt.network.v2021_05_01.aio.operations.PeerExpressRouteCircuitConnectionsOperations + :ivar express_route_circuits: ExpressRouteCircuitsOperations operations + :vartype express_route_circuits: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteCircuitsOperations + :ivar express_route_service_providers: ExpressRouteServiceProvidersOperations operations + :vartype express_route_service_providers: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteServiceProvidersOperations + :ivar express_route_cross_connections: ExpressRouteCrossConnectionsOperations operations + :vartype express_route_cross_connections: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteCrossConnectionsOperations + :ivar express_route_cross_connection_peerings: ExpressRouteCrossConnectionPeeringsOperations operations + :vartype express_route_cross_connection_peerings: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteCrossConnectionPeeringsOperations + :ivar express_route_ports_locations: ExpressRoutePortsLocationsOperations operations + :vartype express_route_ports_locations: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRoutePortsLocationsOperations + :ivar express_route_ports: ExpressRoutePortsOperations operations + :vartype express_route_ports: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRoutePortsOperations + :ivar express_route_links: ExpressRouteLinksOperations operations + :vartype express_route_links: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteLinksOperations + :ivar firewall_policies: FirewallPoliciesOperations operations + :vartype firewall_policies: azure.mgmt.network.v2021_05_01.aio.operations.FirewallPoliciesOperations + :ivar firewall_policy_rule_collection_groups: FirewallPolicyRuleCollectionGroupsOperations operations + :vartype firewall_policy_rule_collection_groups: azure.mgmt.network.v2021_05_01.aio.operations.FirewallPolicyRuleCollectionGroupsOperations + :ivar firewall_policy_idps_signatures: FirewallPolicyIdpsSignaturesOperations operations + :vartype firewall_policy_idps_signatures: azure.mgmt.network.v2021_05_01.aio.operations.FirewallPolicyIdpsSignaturesOperations + :ivar firewall_policy_idps_signatures_overrides: FirewallPolicyIdpsSignaturesOverridesOperations operations + :vartype firewall_policy_idps_signatures_overrides: azure.mgmt.network.v2021_05_01.aio.operations.FirewallPolicyIdpsSignaturesOverridesOperations + :ivar firewall_policy_idps_signatures_filter_values: FirewallPolicyIdpsSignaturesFilterValuesOperations operations + :vartype firewall_policy_idps_signatures_filter_values: azure.mgmt.network.v2021_05_01.aio.operations.FirewallPolicyIdpsSignaturesFilterValuesOperations + :ivar ip_allocations: IpAllocationsOperations operations + :vartype ip_allocations: azure.mgmt.network.v2021_05_01.aio.operations.IpAllocationsOperations + :ivar ip_groups: IpGroupsOperations operations + :vartype ip_groups: azure.mgmt.network.v2021_05_01.aio.operations.IpGroupsOperations + :ivar load_balancers: LoadBalancersOperations operations + :vartype load_balancers: azure.mgmt.network.v2021_05_01.aio.operations.LoadBalancersOperations + :ivar load_balancer_backend_address_pools: LoadBalancerBackendAddressPoolsOperations operations + :vartype load_balancer_backend_address_pools: azure.mgmt.network.v2021_05_01.aio.operations.LoadBalancerBackendAddressPoolsOperations + :ivar load_balancer_frontend_ip_configurations: LoadBalancerFrontendIPConfigurationsOperations operations + :vartype load_balancer_frontend_ip_configurations: azure.mgmt.network.v2021_05_01.aio.operations.LoadBalancerFrontendIPConfigurationsOperations + :ivar inbound_nat_rules: InboundNatRulesOperations operations + :vartype inbound_nat_rules: azure.mgmt.network.v2021_05_01.aio.operations.InboundNatRulesOperations + :ivar load_balancer_load_balancing_rules: LoadBalancerLoadBalancingRulesOperations operations + :vartype load_balancer_load_balancing_rules: azure.mgmt.network.v2021_05_01.aio.operations.LoadBalancerLoadBalancingRulesOperations + :ivar load_balancer_outbound_rules: LoadBalancerOutboundRulesOperations operations + :vartype load_balancer_outbound_rules: azure.mgmt.network.v2021_05_01.aio.operations.LoadBalancerOutboundRulesOperations + :ivar load_balancer_network_interfaces: LoadBalancerNetworkInterfacesOperations operations + :vartype load_balancer_network_interfaces: azure.mgmt.network.v2021_05_01.aio.operations.LoadBalancerNetworkInterfacesOperations + :ivar load_balancer_probes: LoadBalancerProbesOperations operations + :vartype load_balancer_probes: azure.mgmt.network.v2021_05_01.aio.operations.LoadBalancerProbesOperations + :ivar nat_gateways: NatGatewaysOperations operations + :vartype nat_gateways: azure.mgmt.network.v2021_05_01.aio.operations.NatGatewaysOperations + :ivar network_interface_ip_configurations: NetworkInterfaceIPConfigurationsOperations operations + :vartype network_interface_ip_configurations: azure.mgmt.network.v2021_05_01.aio.operations.NetworkInterfaceIPConfigurationsOperations + :ivar network_interface_load_balancers: NetworkInterfaceLoadBalancersOperations operations + :vartype network_interface_load_balancers: azure.mgmt.network.v2021_05_01.aio.operations.NetworkInterfaceLoadBalancersOperations + :ivar network_interface_tap_configurations: NetworkInterfaceTapConfigurationsOperations operations + :vartype network_interface_tap_configurations: azure.mgmt.network.v2021_05_01.aio.operations.NetworkInterfaceTapConfigurationsOperations + :ivar network_profiles: NetworkProfilesOperations operations + :vartype network_profiles: azure.mgmt.network.v2021_05_01.aio.operations.NetworkProfilesOperations + :ivar network_security_groups: NetworkSecurityGroupsOperations operations + :vartype network_security_groups: azure.mgmt.network.v2021_05_01.aio.operations.NetworkSecurityGroupsOperations + :ivar security_rules: SecurityRulesOperations operations + :vartype security_rules: azure.mgmt.network.v2021_05_01.aio.operations.SecurityRulesOperations + :ivar default_security_rules: DefaultSecurityRulesOperations operations + :vartype default_security_rules: azure.mgmt.network.v2021_05_01.aio.operations.DefaultSecurityRulesOperations + :ivar network_virtual_appliances: NetworkVirtualAppliancesOperations operations + :vartype network_virtual_appliances: azure.mgmt.network.v2021_05_01.aio.operations.NetworkVirtualAppliancesOperations + :ivar virtual_appliance_sites: VirtualApplianceSitesOperations operations + :vartype virtual_appliance_sites: azure.mgmt.network.v2021_05_01.aio.operations.VirtualApplianceSitesOperations + :ivar virtual_appliance_skus: VirtualApplianceSkusOperations operations + :vartype virtual_appliance_skus: azure.mgmt.network.v2021_05_01.aio.operations.VirtualApplianceSkusOperations + :ivar inbound_security_rule: InboundSecurityRuleOperations operations + :vartype inbound_security_rule: azure.mgmt.network.v2021_05_01.aio.operations.InboundSecurityRuleOperations + :ivar network_watchers: NetworkWatchersOperations operations + :vartype network_watchers: azure.mgmt.network.v2021_05_01.aio.operations.NetworkWatchersOperations + :ivar packet_captures: PacketCapturesOperations operations + :vartype packet_captures: azure.mgmt.network.v2021_05_01.aio.operations.PacketCapturesOperations + :ivar connection_monitors: ConnectionMonitorsOperations operations + :vartype connection_monitors: azure.mgmt.network.v2021_05_01.aio.operations.ConnectionMonitorsOperations + :ivar flow_logs: FlowLogsOperations operations + :vartype flow_logs: azure.mgmt.network.v2021_05_01.aio.operations.FlowLogsOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.network.v2021_05_01.aio.operations.Operations + :ivar private_endpoints: PrivateEndpointsOperations operations + :vartype private_endpoints: azure.mgmt.network.v2021_05_01.aio.operations.PrivateEndpointsOperations + :ivar available_private_endpoint_types: AvailablePrivateEndpointTypesOperations operations + :vartype available_private_endpoint_types: azure.mgmt.network.v2021_05_01.aio.operations.AvailablePrivateEndpointTypesOperations + :ivar private_dns_zone_groups: PrivateDnsZoneGroupsOperations operations + :vartype private_dns_zone_groups: azure.mgmt.network.v2021_05_01.aio.operations.PrivateDnsZoneGroupsOperations + :ivar private_link_services: PrivateLinkServicesOperations operations + :vartype private_link_services: azure.mgmt.network.v2021_05_01.aio.operations.PrivateLinkServicesOperations + :ivar public_ip_prefixes: PublicIPPrefixesOperations operations + :vartype public_ip_prefixes: azure.mgmt.network.v2021_05_01.aio.operations.PublicIPPrefixesOperations + :ivar route_filters: RouteFiltersOperations operations + :vartype route_filters: azure.mgmt.network.v2021_05_01.aio.operations.RouteFiltersOperations + :ivar route_filter_rules: RouteFilterRulesOperations operations + :vartype route_filter_rules: azure.mgmt.network.v2021_05_01.aio.operations.RouteFilterRulesOperations + :ivar route_tables: RouteTablesOperations operations + :vartype route_tables: azure.mgmt.network.v2021_05_01.aio.operations.RouteTablesOperations + :ivar routes: RoutesOperations operations + :vartype routes: azure.mgmt.network.v2021_05_01.aio.operations.RoutesOperations + :ivar security_partner_providers: SecurityPartnerProvidersOperations operations + :vartype security_partner_providers: azure.mgmt.network.v2021_05_01.aio.operations.SecurityPartnerProvidersOperations + :ivar bgp_service_communities: BgpServiceCommunitiesOperations operations + :vartype bgp_service_communities: azure.mgmt.network.v2021_05_01.aio.operations.BgpServiceCommunitiesOperations + :ivar service_endpoint_policies: ServiceEndpointPoliciesOperations operations + :vartype service_endpoint_policies: azure.mgmt.network.v2021_05_01.aio.operations.ServiceEndpointPoliciesOperations + :ivar service_endpoint_policy_definitions: ServiceEndpointPolicyDefinitionsOperations operations + :vartype service_endpoint_policy_definitions: azure.mgmt.network.v2021_05_01.aio.operations.ServiceEndpointPolicyDefinitionsOperations + :ivar service_tags: ServiceTagsOperations operations + :vartype service_tags: azure.mgmt.network.v2021_05_01.aio.operations.ServiceTagsOperations + :ivar service_tag_information: ServiceTagInformationOperations operations + :vartype service_tag_information: azure.mgmt.network.v2021_05_01.aio.operations.ServiceTagInformationOperations + :ivar usages: UsagesOperations operations + :vartype usages: azure.mgmt.network.v2021_05_01.aio.operations.UsagesOperations + :ivar virtual_networks: VirtualNetworksOperations operations + :vartype virtual_networks: azure.mgmt.network.v2021_05_01.aio.operations.VirtualNetworksOperations + :ivar subnets: SubnetsOperations operations + :vartype subnets: azure.mgmt.network.v2021_05_01.aio.operations.SubnetsOperations + :ivar resource_navigation_links: ResourceNavigationLinksOperations operations + :vartype resource_navigation_links: azure.mgmt.network.v2021_05_01.aio.operations.ResourceNavigationLinksOperations + :ivar service_association_links: ServiceAssociationLinksOperations operations + :vartype service_association_links: azure.mgmt.network.v2021_05_01.aio.operations.ServiceAssociationLinksOperations + :ivar virtual_network_peerings: VirtualNetworkPeeringsOperations operations + :vartype virtual_network_peerings: azure.mgmt.network.v2021_05_01.aio.operations.VirtualNetworkPeeringsOperations + :ivar virtual_network_gateways: VirtualNetworkGatewaysOperations operations + :vartype virtual_network_gateways: azure.mgmt.network.v2021_05_01.aio.operations.VirtualNetworkGatewaysOperations + :ivar virtual_network_gateway_connections: VirtualNetworkGatewayConnectionsOperations operations + :vartype virtual_network_gateway_connections: azure.mgmt.network.v2021_05_01.aio.operations.VirtualNetworkGatewayConnectionsOperations + :ivar local_network_gateways: LocalNetworkGatewaysOperations operations + :vartype local_network_gateways: azure.mgmt.network.v2021_05_01.aio.operations.LocalNetworkGatewaysOperations + :ivar virtual_network_gateway_nat_rules: VirtualNetworkGatewayNatRulesOperations operations + :vartype virtual_network_gateway_nat_rules: azure.mgmt.network.v2021_05_01.aio.operations.VirtualNetworkGatewayNatRulesOperations + :ivar virtual_network_taps: VirtualNetworkTapsOperations operations + :vartype virtual_network_taps: azure.mgmt.network.v2021_05_01.aio.operations.VirtualNetworkTapsOperations + :ivar virtual_routers: VirtualRoutersOperations operations + :vartype virtual_routers: azure.mgmt.network.v2021_05_01.aio.operations.VirtualRoutersOperations + :ivar virtual_router_peerings: VirtualRouterPeeringsOperations operations + :vartype virtual_router_peerings: azure.mgmt.network.v2021_05_01.aio.operations.VirtualRouterPeeringsOperations + :ivar virtual_wans: VirtualWansOperations operations + :vartype virtual_wans: azure.mgmt.network.v2021_05_01.aio.operations.VirtualWansOperations + :ivar vpn_sites: VpnSitesOperations operations + :vartype vpn_sites: azure.mgmt.network.v2021_05_01.aio.operations.VpnSitesOperations + :ivar vpn_site_links: VpnSiteLinksOperations operations + :vartype vpn_site_links: azure.mgmt.network.v2021_05_01.aio.operations.VpnSiteLinksOperations + :ivar vpn_sites_configuration: VpnSitesConfigurationOperations operations + :vartype vpn_sites_configuration: azure.mgmt.network.v2021_05_01.aio.operations.VpnSitesConfigurationOperations + :ivar vpn_server_configurations: VpnServerConfigurationsOperations operations + :vartype vpn_server_configurations: azure.mgmt.network.v2021_05_01.aio.operations.VpnServerConfigurationsOperations + :ivar virtual_hubs: VirtualHubsOperations operations + :vartype virtual_hubs: azure.mgmt.network.v2021_05_01.aio.operations.VirtualHubsOperations + :ivar hub_virtual_network_connections: HubVirtualNetworkConnectionsOperations operations + :vartype hub_virtual_network_connections: azure.mgmt.network.v2021_05_01.aio.operations.HubVirtualNetworkConnectionsOperations + :ivar vpn_gateways: VpnGatewaysOperations operations + :vartype vpn_gateways: azure.mgmt.network.v2021_05_01.aio.operations.VpnGatewaysOperations + :ivar vpn_link_connections: VpnLinkConnectionsOperations operations + :vartype vpn_link_connections: azure.mgmt.network.v2021_05_01.aio.operations.VpnLinkConnectionsOperations + :ivar vpn_connections: VpnConnectionsOperations operations + :vartype vpn_connections: azure.mgmt.network.v2021_05_01.aio.operations.VpnConnectionsOperations + :ivar vpn_site_link_connections: VpnSiteLinkConnectionsOperations operations + :vartype vpn_site_link_connections: azure.mgmt.network.v2021_05_01.aio.operations.VpnSiteLinkConnectionsOperations + :ivar nat_rules: NatRulesOperations operations + :vartype nat_rules: azure.mgmt.network.v2021_05_01.aio.operations.NatRulesOperations + :ivar p2_svpn_gateways: P2SVpnGatewaysOperations operations + :vartype p2_svpn_gateways: azure.mgmt.network.v2021_05_01.aio.operations.P2SVpnGatewaysOperations + :ivar vpn_server_configurations_associated_with_virtual_wan: VpnServerConfigurationsAssociatedWithVirtualWanOperations operations + :vartype vpn_server_configurations_associated_with_virtual_wan: azure.mgmt.network.v2021_05_01.aio.operations.VpnServerConfigurationsAssociatedWithVirtualWanOperations + :ivar virtual_hub_route_table_v2_s: VirtualHubRouteTableV2SOperations operations + :vartype virtual_hub_route_table_v2_s: azure.mgmt.network.v2021_05_01.aio.operations.VirtualHubRouteTableV2SOperations + :ivar express_route_gateways: ExpressRouteGatewaysOperations operations + :vartype express_route_gateways: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteGatewaysOperations + :ivar express_route_connections: ExpressRouteConnectionsOperations operations + :vartype express_route_connections: azure.mgmt.network.v2021_05_01.aio.operations.ExpressRouteConnectionsOperations + :ivar virtual_hub_bgp_connection: VirtualHubBgpConnectionOperations operations + :vartype virtual_hub_bgp_connection: azure.mgmt.network.v2021_05_01.aio.operations.VirtualHubBgpConnectionOperations + :ivar virtual_hub_bgp_connections: VirtualHubBgpConnectionsOperations operations + :vartype virtual_hub_bgp_connections: azure.mgmt.network.v2021_05_01.aio.operations.VirtualHubBgpConnectionsOperations + :ivar virtual_hub_ip_configuration: VirtualHubIpConfigurationOperations operations + :vartype virtual_hub_ip_configuration: azure.mgmt.network.v2021_05_01.aio.operations.VirtualHubIpConfigurationOperations + :ivar hub_route_tables: HubRouteTablesOperations operations + :vartype hub_route_tables: azure.mgmt.network.v2021_05_01.aio.operations.HubRouteTablesOperations + :ivar routing_intent: RoutingIntentOperations operations + :vartype routing_intent: azure.mgmt.network.v2021_05_01.aio.operations.RoutingIntentOperations + :ivar web_application_firewall_policies: WebApplicationFirewallPoliciesOperations operations + :vartype web_application_firewall_policies: azure.mgmt.network.v2021_05_01.aio.operations.WebApplicationFirewallPoliciesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = NetworkManagementClientConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.application_gateways = ApplicationGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.application_gateway_private_link_resources = ApplicationGatewayPrivateLinkResourcesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.application_gateway_private_endpoint_connections = ApplicationGatewayPrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.application_security_groups = ApplicationSecurityGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_delegations = AvailableDelegationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_resource_group_delegations = AvailableResourceGroupDelegationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_service_aliases = AvailableServiceAliasesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.azure_firewalls = AzureFirewallsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.azure_firewall_fqdn_tags = AzureFirewallFqdnTagsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.web_categories = WebCategoriesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.bastion_hosts = BastionHostsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_interfaces = NetworkInterfacesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.public_ip_addresses = PublicIPAddressesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.custom_ip_prefixes = CustomIPPrefixesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.ddos_custom_policies = DdosCustomPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.ddos_protection_plans = DdosProtectionPlansOperations( + self._client, self._config, self._serialize, self._deserialize) + self.dscp_configuration = DscpConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_endpoint_services = AvailableEndpointServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_authorizations = ExpressRouteCircuitAuthorizationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_peerings = ExpressRouteCircuitPeeringsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuit_connections = ExpressRouteCircuitConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.peer_express_route_circuit_connections = PeerExpressRouteCircuitConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_circuits = ExpressRouteCircuitsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_service_providers = ExpressRouteServiceProvidersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_cross_connections = ExpressRouteCrossConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_cross_connection_peerings = ExpressRouteCrossConnectionPeeringsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_ports_locations = ExpressRoutePortsLocationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_ports = ExpressRoutePortsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_links = ExpressRouteLinksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policies = FirewallPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_rule_collection_groups = FirewallPolicyRuleCollectionGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures = FirewallPolicyIdpsSignaturesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures_overrides = FirewallPolicyIdpsSignaturesOverridesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.firewall_policy_idps_signatures_filter_values = FirewallPolicyIdpsSignaturesFilterValuesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.ip_allocations = IpAllocationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.ip_groups = IpGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancers = LoadBalancersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_backend_address_pools = LoadBalancerBackendAddressPoolsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_frontend_ip_configurations = LoadBalancerFrontendIPConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.inbound_nat_rules = InboundNatRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_load_balancing_rules = LoadBalancerLoadBalancingRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_outbound_rules = LoadBalancerOutboundRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_network_interfaces = LoadBalancerNetworkInterfacesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.load_balancer_probes = LoadBalancerProbesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.nat_gateways = NatGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_interface_ip_configurations = NetworkInterfaceIPConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_interface_load_balancers = NetworkInterfaceLoadBalancersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_interface_tap_configurations = NetworkInterfaceTapConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_profiles = NetworkProfilesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_security_groups = NetworkSecurityGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_rules = SecurityRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.default_security_rules = DefaultSecurityRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_virtual_appliances = NetworkVirtualAppliancesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_appliance_sites = VirtualApplianceSitesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_appliance_skus = VirtualApplianceSkusOperations( + self._client, self._config, self._serialize, self._deserialize) + self.inbound_security_rule = InboundSecurityRuleOperations( + self._client, self._config, self._serialize, self._deserialize) + self.network_watchers = NetworkWatchersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.packet_captures = PacketCapturesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.connection_monitors = ConnectionMonitorsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.flow_logs = FlowLogsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self._config, self._serialize, self._deserialize) + self.private_endpoints = PrivateEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.available_private_endpoint_types = AvailablePrivateEndpointTypesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_dns_zone_groups = PrivateDnsZoneGroupsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.private_link_services = PrivateLinkServicesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.public_ip_prefixes = PublicIPPrefixesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.route_filters = RouteFiltersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.route_filter_rules = RouteFilterRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.route_tables = RouteTablesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.routes = RoutesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.security_partner_providers = SecurityPartnerProvidersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.bgp_service_communities = BgpServiceCommunitiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_endpoint_policies = ServiceEndpointPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_endpoint_policy_definitions = ServiceEndpointPolicyDefinitionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_tags = ServiceTagsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_tag_information = ServiceTagInformationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.usages = UsagesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_networks = VirtualNetworksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.subnets = SubnetsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_navigation_links = ResourceNavigationLinksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.service_association_links = ServiceAssociationLinksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_peerings = VirtualNetworkPeeringsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateways = VirtualNetworkGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateway_connections = VirtualNetworkGatewayConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.local_network_gateways = LocalNetworkGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_gateway_nat_rules = VirtualNetworkGatewayNatRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_network_taps = VirtualNetworkTapsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_routers = VirtualRoutersOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_router_peerings = VirtualRouterPeeringsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_wans = VirtualWansOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_sites = VpnSitesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_site_links = VpnSiteLinksOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_sites_configuration = VpnSitesConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_server_configurations = VpnServerConfigurationsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hubs = VirtualHubsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.hub_virtual_network_connections = HubVirtualNetworkConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_gateways = VpnGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_link_connections = VpnLinkConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_connections = VpnConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_site_link_connections = VpnSiteLinkConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.nat_rules = NatRulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.p2_svpn_gateways = P2SVpnGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.vpn_server_configurations_associated_with_virtual_wan = VpnServerConfigurationsAssociatedWithVirtualWanOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_route_table_v2_s = VirtualHubRouteTableV2SOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_gateways = ExpressRouteGatewaysOperations( + self._client, self._config, self._serialize, self._deserialize) + self.express_route_connections = ExpressRouteConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_bgp_connection = VirtualHubBgpConnectionOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_bgp_connections = VirtualHubBgpConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.virtual_hub_ip_configuration = VirtualHubIpConfigurationOperations( + self._client, self._config, self._serialize, self._deserialize) + self.hub_route_tables = HubRouteTablesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.routing_intent = RoutingIntentOperations( + self._client, self._config, self._serialize, self._deserialize) + self.web_application_firewall_policies = WebApplicationFirewallPoliciesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "NetworkManagementClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/__init__.py new file mode 100644 index 000000000000..aa657a943504 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/__init__.py @@ -0,0 +1,237 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._application_gateways_operations import ApplicationGatewaysOperations +from ._application_gateway_private_link_resources_operations import ApplicationGatewayPrivateLinkResourcesOperations +from ._application_gateway_private_endpoint_connections_operations import ApplicationGatewayPrivateEndpointConnectionsOperations +from ._application_security_groups_operations import ApplicationSecurityGroupsOperations +from ._available_delegations_operations import AvailableDelegationsOperations +from ._available_resource_group_delegations_operations import AvailableResourceGroupDelegationsOperations +from ._available_service_aliases_operations import AvailableServiceAliasesOperations +from ._azure_firewalls_operations import AzureFirewallsOperations +from ._azure_firewall_fqdn_tags_operations import AzureFirewallFqdnTagsOperations +from ._web_categories_operations import WebCategoriesOperations +from ._bastion_hosts_operations import BastionHostsOperations +from ._network_management_client_operations import NetworkManagementClientOperationsMixin +from ._network_interfaces_operations import NetworkInterfacesOperations +from ._public_ip_addresses_operations import PublicIPAddressesOperations +from ._custom_ip_prefixes_operations import CustomIPPrefixesOperations +from ._ddos_custom_policies_operations import DdosCustomPoliciesOperations +from ._ddos_protection_plans_operations import DdosProtectionPlansOperations +from ._dscp_configuration_operations import DscpConfigurationOperations +from ._available_endpoint_services_operations import AvailableEndpointServicesOperations +from ._express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations +from ._express_route_circuit_peerings_operations import ExpressRouteCircuitPeeringsOperations +from ._express_route_circuit_connections_operations import ExpressRouteCircuitConnectionsOperations +from ._peer_express_route_circuit_connections_operations import PeerExpressRouteCircuitConnectionsOperations +from ._express_route_circuits_operations import ExpressRouteCircuitsOperations +from ._express_route_service_providers_operations import ExpressRouteServiceProvidersOperations +from ._express_route_cross_connections_operations import ExpressRouteCrossConnectionsOperations +from ._express_route_cross_connection_peerings_operations import ExpressRouteCrossConnectionPeeringsOperations +from ._express_route_ports_locations_operations import ExpressRoutePortsLocationsOperations +from ._express_route_ports_operations import ExpressRoutePortsOperations +from ._express_route_links_operations import ExpressRouteLinksOperations +from ._firewall_policies_operations import FirewallPoliciesOperations +from ._firewall_policy_rule_collection_groups_operations import FirewallPolicyRuleCollectionGroupsOperations +from ._firewall_policy_idps_signatures_operations import FirewallPolicyIdpsSignaturesOperations +from ._firewall_policy_idps_signatures_overrides_operations import FirewallPolicyIdpsSignaturesOverridesOperations +from ._firewall_policy_idps_signatures_filter_values_operations import FirewallPolicyIdpsSignaturesFilterValuesOperations +from ._ip_allocations_operations import IpAllocationsOperations +from ._ip_groups_operations import IpGroupsOperations +from ._load_balancers_operations import LoadBalancersOperations +from ._load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations +from ._load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations +from ._inbound_nat_rules_operations import InboundNatRulesOperations +from ._load_balancer_load_balancing_rules_operations import LoadBalancerLoadBalancingRulesOperations +from ._load_balancer_outbound_rules_operations import LoadBalancerOutboundRulesOperations +from ._load_balancer_network_interfaces_operations import LoadBalancerNetworkInterfacesOperations +from ._load_balancer_probes_operations import LoadBalancerProbesOperations +from ._nat_gateways_operations import NatGatewaysOperations +from ._network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations +from ._network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations +from ._network_interface_tap_configurations_operations import NetworkInterfaceTapConfigurationsOperations +from ._network_profiles_operations import NetworkProfilesOperations +from ._network_security_groups_operations import NetworkSecurityGroupsOperations +from ._security_rules_operations import SecurityRulesOperations +from ._default_security_rules_operations import DefaultSecurityRulesOperations +from ._network_virtual_appliances_operations import NetworkVirtualAppliancesOperations +from ._virtual_appliance_sites_operations import VirtualApplianceSitesOperations +from ._virtual_appliance_skus_operations import VirtualApplianceSkusOperations +from ._inbound_security_rule_operations import InboundSecurityRuleOperations +from ._network_watchers_operations import NetworkWatchersOperations +from ._packet_captures_operations import PacketCapturesOperations +from ._connection_monitors_operations import ConnectionMonitorsOperations +from ._flow_logs_operations import FlowLogsOperations +from ._operations import Operations +from ._private_endpoints_operations import PrivateEndpointsOperations +from ._available_private_endpoint_types_operations import AvailablePrivateEndpointTypesOperations +from ._private_dns_zone_groups_operations import PrivateDnsZoneGroupsOperations +from ._private_link_services_operations import PrivateLinkServicesOperations +from ._public_ip_prefixes_operations import PublicIPPrefixesOperations +from ._route_filters_operations import RouteFiltersOperations +from ._route_filter_rules_operations import RouteFilterRulesOperations +from ._route_tables_operations import RouteTablesOperations +from ._routes_operations import RoutesOperations +from ._security_partner_providers_operations import SecurityPartnerProvidersOperations +from ._bgp_service_communities_operations import BgpServiceCommunitiesOperations +from ._service_endpoint_policies_operations import ServiceEndpointPoliciesOperations +from ._service_endpoint_policy_definitions_operations import ServiceEndpointPolicyDefinitionsOperations +from ._service_tags_operations import ServiceTagsOperations +from ._service_tag_information_operations import ServiceTagInformationOperations +from ._usages_operations import UsagesOperations +from ._virtual_networks_operations import VirtualNetworksOperations +from ._subnets_operations import SubnetsOperations +from ._resource_navigation_links_operations import ResourceNavigationLinksOperations +from ._service_association_links_operations import ServiceAssociationLinksOperations +from ._virtual_network_peerings_operations import VirtualNetworkPeeringsOperations +from ._virtual_network_gateways_operations import VirtualNetworkGatewaysOperations +from ._virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations +from ._local_network_gateways_operations import LocalNetworkGatewaysOperations +from ._virtual_network_gateway_nat_rules_operations import VirtualNetworkGatewayNatRulesOperations +from ._virtual_network_taps_operations import VirtualNetworkTapsOperations +from ._virtual_routers_operations import VirtualRoutersOperations +from ._virtual_router_peerings_operations import VirtualRouterPeeringsOperations +from ._virtual_wans_operations import VirtualWansOperations +from ._vpn_sites_operations import VpnSitesOperations +from ._vpn_site_links_operations import VpnSiteLinksOperations +from ._vpn_sites_configuration_operations import VpnSitesConfigurationOperations +from ._vpn_server_configurations_operations import VpnServerConfigurationsOperations +from ._virtual_hubs_operations import VirtualHubsOperations +from ._hub_virtual_network_connections_operations import HubVirtualNetworkConnectionsOperations +from ._vpn_gateways_operations import VpnGatewaysOperations +from ._vpn_link_connections_operations import VpnLinkConnectionsOperations +from ._vpn_connections_operations import VpnConnectionsOperations +from ._vpn_site_link_connections_operations import VpnSiteLinkConnectionsOperations +from ._nat_rules_operations import NatRulesOperations +from ._p2_svpn_gateways_operations import P2SVpnGatewaysOperations +from ._vpn_server_configurations_associated_with_virtual_wan_operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations +from ._virtual_hub_route_table_v2_s_operations import VirtualHubRouteTableV2SOperations +from ._express_route_gateways_operations import ExpressRouteGatewaysOperations +from ._express_route_connections_operations import ExpressRouteConnectionsOperations +from ._virtual_hub_bgp_connection_operations import VirtualHubBgpConnectionOperations +from ._virtual_hub_bgp_connections_operations import VirtualHubBgpConnectionsOperations +from ._virtual_hub_ip_configuration_operations import VirtualHubIpConfigurationOperations +from ._hub_route_tables_operations import HubRouteTablesOperations +from ._routing_intent_operations import RoutingIntentOperations +from ._web_application_firewall_policies_operations import WebApplicationFirewallPoliciesOperations + +__all__ = [ + 'ApplicationGatewaysOperations', + 'ApplicationGatewayPrivateLinkResourcesOperations', + 'ApplicationGatewayPrivateEndpointConnectionsOperations', + 'ApplicationSecurityGroupsOperations', + 'AvailableDelegationsOperations', + 'AvailableResourceGroupDelegationsOperations', + 'AvailableServiceAliasesOperations', + 'AzureFirewallsOperations', + 'AzureFirewallFqdnTagsOperations', + 'WebCategoriesOperations', + 'BastionHostsOperations', + 'NetworkManagementClientOperationsMixin', + 'NetworkInterfacesOperations', + 'PublicIPAddressesOperations', + 'CustomIPPrefixesOperations', + 'DdosCustomPoliciesOperations', + 'DdosProtectionPlansOperations', + 'DscpConfigurationOperations', + 'AvailableEndpointServicesOperations', + 'ExpressRouteCircuitAuthorizationsOperations', + 'ExpressRouteCircuitPeeringsOperations', + 'ExpressRouteCircuitConnectionsOperations', + 'PeerExpressRouteCircuitConnectionsOperations', + 'ExpressRouteCircuitsOperations', + 'ExpressRouteServiceProvidersOperations', + 'ExpressRouteCrossConnectionsOperations', + 'ExpressRouteCrossConnectionPeeringsOperations', + 'ExpressRoutePortsLocationsOperations', + 'ExpressRoutePortsOperations', + 'ExpressRouteLinksOperations', + 'FirewallPoliciesOperations', + 'FirewallPolicyRuleCollectionGroupsOperations', + 'FirewallPolicyIdpsSignaturesOperations', + 'FirewallPolicyIdpsSignaturesOverridesOperations', + 'FirewallPolicyIdpsSignaturesFilterValuesOperations', + 'IpAllocationsOperations', + 'IpGroupsOperations', + 'LoadBalancersOperations', + 'LoadBalancerBackendAddressPoolsOperations', + 'LoadBalancerFrontendIPConfigurationsOperations', + 'InboundNatRulesOperations', + 'LoadBalancerLoadBalancingRulesOperations', + 'LoadBalancerOutboundRulesOperations', + 'LoadBalancerNetworkInterfacesOperations', + 'LoadBalancerProbesOperations', + 'NatGatewaysOperations', + 'NetworkInterfaceIPConfigurationsOperations', + 'NetworkInterfaceLoadBalancersOperations', + 'NetworkInterfaceTapConfigurationsOperations', + 'NetworkProfilesOperations', + 'NetworkSecurityGroupsOperations', + 'SecurityRulesOperations', + 'DefaultSecurityRulesOperations', + 'NetworkVirtualAppliancesOperations', + 'VirtualApplianceSitesOperations', + 'VirtualApplianceSkusOperations', + 'InboundSecurityRuleOperations', + 'NetworkWatchersOperations', + 'PacketCapturesOperations', + 'ConnectionMonitorsOperations', + 'FlowLogsOperations', + 'Operations', + 'PrivateEndpointsOperations', + 'AvailablePrivateEndpointTypesOperations', + 'PrivateDnsZoneGroupsOperations', + 'PrivateLinkServicesOperations', + 'PublicIPPrefixesOperations', + 'RouteFiltersOperations', + 'RouteFilterRulesOperations', + 'RouteTablesOperations', + 'RoutesOperations', + 'SecurityPartnerProvidersOperations', + 'BgpServiceCommunitiesOperations', + 'ServiceEndpointPoliciesOperations', + 'ServiceEndpointPolicyDefinitionsOperations', + 'ServiceTagsOperations', + 'ServiceTagInformationOperations', + 'UsagesOperations', + 'VirtualNetworksOperations', + 'SubnetsOperations', + 'ResourceNavigationLinksOperations', + 'ServiceAssociationLinksOperations', + 'VirtualNetworkPeeringsOperations', + 'VirtualNetworkGatewaysOperations', + 'VirtualNetworkGatewayConnectionsOperations', + 'LocalNetworkGatewaysOperations', + 'VirtualNetworkGatewayNatRulesOperations', + 'VirtualNetworkTapsOperations', + 'VirtualRoutersOperations', + 'VirtualRouterPeeringsOperations', + 'VirtualWansOperations', + 'VpnSitesOperations', + 'VpnSiteLinksOperations', + 'VpnSitesConfigurationOperations', + 'VpnServerConfigurationsOperations', + 'VirtualHubsOperations', + 'HubVirtualNetworkConnectionsOperations', + 'VpnGatewaysOperations', + 'VpnLinkConnectionsOperations', + 'VpnConnectionsOperations', + 'VpnSiteLinkConnectionsOperations', + 'NatRulesOperations', + 'P2SVpnGatewaysOperations', + 'VpnServerConfigurationsAssociatedWithVirtualWanOperations', + 'VirtualHubRouteTableV2SOperations', + 'ExpressRouteGatewaysOperations', + 'ExpressRouteConnectionsOperations', + 'VirtualHubBgpConnectionOperations', + 'VirtualHubBgpConnectionsOperations', + 'VirtualHubIpConfigurationOperations', + 'HubRouteTablesOperations', + 'RoutingIntentOperations', + 'WebApplicationFirewallPoliciesOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateway_private_endpoint_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateway_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..674548cdc95f --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateway_private_endpoint_connections_operations.py @@ -0,0 +1,429 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ApplicationGatewayPrivateEndpointConnectionsOperations: + """ApplicationGatewayPrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + async def _update_initial( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + parameters: "_models.ApplicationGatewayPrivateEndpointConnection", + **kwargs: Any + ) -> Optional["_models.ApplicationGatewayPrivateEndpointConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayPrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ApplicationGatewayPrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + async def begin_update( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + parameters: "_models.ApplicationGatewayPrivateEndpointConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.ApplicationGatewayPrivateEndpointConnection"]: + """Updates the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :param parameters: Parameters supplied to update application gateway private endpoint + connection operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ApplicationGatewayPrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + application_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.ApplicationGatewayPrivateEndpointConnection": + """Gets the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewayPrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + def list( + self, + resource_group_name: str, + application_gateway_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ApplicationGatewayPrivateEndpointConnectionListResult"]: + """Lists all private endpoint connections on an application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayPrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interface_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateway_private_link_resources_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interface_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateway_private_link_resources_operations.py index 039ac9152d3b..4f3b4e0c3597 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interface_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateway_private_link_resources_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NetworkInterfaceLoadBalancersOperations: - """NetworkInterfaceLoadBalancersOperations async operations. +class ApplicationGatewayPrivateLinkResourcesOperations: + """ApplicationGatewayPrivateLinkResourcesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -44,27 +44,27 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, resource_group_name: str, - network_interface_name: str, + application_gateway_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceLoadBalancerListResult"]: - """List all load balancers in a network interface. + ) -> AsyncIterable["_models.ApplicationGatewayPrivateLinkResourceListResult"]: + """Lists all private link resources on an application gateway. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceLoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceLoadBalancerListResult] + :return: An iterator like instance of either ApplicationGatewayPrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceLoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -76,7 +76,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -92,7 +92,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceLoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('ApplicationGatewayPrivateLinkResourceListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,4 +113,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_application_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateways_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_application_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateways_operations.py index a111aba2a8c1..ef3fdee85956 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_application_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_gateways_operations.py @@ -5,7 +5,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -28,7 +28,7 @@ class ApplicationGatewaysOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -135,7 +137,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -163,7 +165,7 @@ async def get( :type application_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationGateway + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGateway :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] @@ -171,7 +173,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -219,7 +221,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -278,7 +280,7 @@ async def begin_create_or_update( :param application_gateway_name: The name of the application gateway. :type application_gateway_name: str :param parameters: Parameters supplied to the create or update application gateway operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ApplicationGateway + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ApplicationGateway :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -286,7 +288,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ApplicationGateway] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -321,7 +323,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -335,24 +337,37 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, application_gateway_name: str, parameters: "_models.TagsObject", **kwargs: Any ) -> "_models.ApplicationGateway": + """Updates the specified application gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param parameters: Parameters supplied to update application gateway tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), @@ -386,78 +401,7 @@ async def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - application_gateway_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.ApplicationGateway"]: - """Updates the specified application gateway tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param parameters: Parameters supplied to update application gateway tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ApplicationGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore def list( self, @@ -470,7 +414,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] @@ -478,7 +422,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -537,7 +481,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] @@ -545,7 +489,7 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -606,7 +550,8 @@ async def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._start_initial.metadata['url'] # type: ignore @@ -623,6 +568,7 @@ async def _start_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -687,7 +633,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -712,7 +658,8 @@ async def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._stop_initial.metadata['url'] # type: ignore @@ -729,6 +676,7 @@ async def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -793,7 +741,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -819,7 +767,7 @@ async def _backend_health_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -881,7 +829,7 @@ async def begin_backend_health( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ApplicationGatewayBackendHealth or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayBackendHealth] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealth] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -916,7 +864,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -930,6 +878,293 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_backend_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + async def _backend_health_on_demand_initial( + self, + resource_group_name: str, + application_gateway_name: str, + probe_request: "_models.ApplicationGatewayOnDemandProbe", + expand: Optional[str] = None, + **kwargs: Any + ) -> Optional["_models.ApplicationGatewayBackendHealthOnDemand"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealthOnDemand"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._backend_health_on_demand_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(probe_request, 'ApplicationGatewayOnDemandProbe') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayBackendHealthOnDemand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _backend_health_on_demand_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand'} # type: ignore + + async def begin_backend_health_on_demand( + self, + resource_group_name: str, + application_gateway_name: str, + probe_request: "_models.ApplicationGatewayOnDemandProbe", + expand: Optional[str] = None, + **kwargs: Any + ) -> AsyncLROPoller["_models.ApplicationGatewayBackendHealthOnDemand"]: + """Gets the backend health for given combination of backend pool and http setting of the specified + application gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param probe_request: Request body for on-demand test probe operation. + :type probe_request: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayOnDemandProbe + :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ApplicationGatewayBackendHealthOnDemand or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthOnDemand] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealthOnDemand"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._backend_health_on_demand_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + probe_request=probe_request, + expand=expand, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ApplicationGatewayBackendHealthOnDemand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_backend_health_on_demand.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand'} # type: ignore + + async def list_available_server_variables( + self, + **kwargs: Any + ) -> List[str]: + """Lists all available server variables. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_available_server_variables.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_available_server_variables.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables'} # type: ignore + + async def list_available_request_headers( + self, + **kwargs: Any + ) -> List[str]: + """Lists all available request headers. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_available_request_headers.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_available_request_headers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders'} # type: ignore + + async def list_available_response_headers( + self, + **kwargs: Any + ) -> List[str]: + """Lists all available response headers. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_available_response_headers.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_available_response_headers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders'} # type: ignore + async def list_available_waf_rule_sets( self, **kwargs: Any @@ -938,7 +1173,7 @@ async def list_available_waf_rule_sets( :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationGatewayAvailableWafRuleSetsResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayAvailableWafRuleSetsResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAvailableWafRuleSetsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableWafRuleSetsResult"] @@ -946,7 +1181,7 @@ async def list_available_waf_rule_sets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -988,7 +1223,7 @@ async def list_available_ssl_options( :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationGatewayAvailableSslOptions, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayAvailableSslOptions + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAvailableSslOptions :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslOptions"] @@ -996,7 +1231,7 @@ async def list_available_ssl_options( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -1038,7 +1273,7 @@ def list_available_ssl_predefined_policies( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationGatewayAvailableSslPredefinedPolicies or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] @@ -1046,7 +1281,7 @@ def list_available_ssl_predefined_policies( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -1107,7 +1342,7 @@ async def get_ssl_predefined_policy( :type predefined_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationGatewaySslPredefinedPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationGatewaySslPredefinedPolicy + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPredefinedPolicy :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewaySslPredefinedPolicy"] @@ -1115,7 +1350,7 @@ async def get_ssl_predefined_policy( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_application_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_security_groups_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_application_security_groups_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_security_groups_operations.py index afc8445deafd..5123bd8b92f2 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_application_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_application_security_groups_operations.py @@ -28,7 +28,7 @@ class ApplicationSecurityGroupsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -135,7 +137,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -163,7 +165,7 @@ async def get( :type application_security_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] @@ -171,7 +173,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -219,7 +221,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -279,7 +281,7 @@ async def begin_create_or_update( :type application_security_group_name: str :param parameters: Parameters supplied to the create or update ApplicationSecurityGroup operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -287,7 +289,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ApplicationSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -322,7 +324,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -336,6 +338,72 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + async def update_tags( + self, + resource_group_name: str, + application_security_group_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ApplicationSecurityGroup": + """Updates an application security group's tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :param parameters: Parameters supplied to update application security group tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + def list_all( self, **kwargs: Any @@ -344,7 +412,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroupListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] @@ -352,7 +420,7 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -413,7 +481,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroupListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] @@ -421,7 +489,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_available_endpoint_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_delegations_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_available_endpoint_services_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_delegations_operations.py index 9d2ed04cd32a..0cf061356dda 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_available_endpoint_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_delegations_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class AvailableEndpointServicesOperations: - """AvailableEndpointServicesOperations async operations. +class AvailableDelegationsOperations: + """AvailableDelegationsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,22 +45,22 @@ def list( self, location: str, **kwargs: Any - ) -> AsyncIterable["_models.EndpointServicesListResult"]: - """List what values of endpoint services are available for use. + ) -> AsyncIterable["_models.AvailableDelegationsResult"]: + """Gets all of the available subnet delegations for this subscription in this region. - :param location: The location to check available endpoint services. + :param location: The location of the subnet. :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EndpointServicesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.EndpointServicesListResult] + :return: An iterator like instance of either AvailableDelegationsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailableDelegationsResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointServicesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableDelegationsResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -88,7 +88,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('EndpointServicesListResult', pipeline_response) + deserialized = self._deserialize('AvailableDelegationsResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -109,4 +109,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_available_endpoint_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_endpoint_services_operations.py similarity index 97% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_available_endpoint_services_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_endpoint_services_operations.py index 9961e06ac415..3c402bbaab7b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_available_endpoint_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_endpoint_services_operations.py @@ -26,7 +26,7 @@ class AvailableEndpointServicesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -52,7 +52,7 @@ def list( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either EndpointServicesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.EndpointServicesListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.EndpointServicesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointServicesListResult"] @@ -60,7 +60,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_private_endpoint_types_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_private_endpoint_types_operations.py new file mode 100644 index 000000000000..cde29690d843 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_private_endpoint_types_operations.py @@ -0,0 +1,188 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AvailablePrivateEndpointTypesOperations: + """AvailablePrivateEndpointTypesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location: str, + **kwargs: Any + ) -> AsyncIterable["_models.AvailablePrivateEndpointTypesResult"]: + """Returns all of the resource types that can be linked to a Private Endpoint in this subscription + in this region. + + :param location: The location of the domain name. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailablePrivateEndpointTypesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailablePrivateEndpointTypesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailablePrivateEndpointTypesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AvailablePrivateEndpointTypesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes'} # type: ignore + + def list_by_resource_group( + self, + location: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.AvailablePrivateEndpointTypesResult"]: + """Returns all of the resource types that can be linked to a Private Endpoint in this subscription + in this region. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailablePrivateEndpointTypesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailablePrivateEndpointTypesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailablePrivateEndpointTypesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AvailablePrivateEndpointTypesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_resource_group_delegations_operations.py similarity index 81% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_resource_group_delegations_operations.py index 821abf1be50d..c9a3521d4279 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_resource_group_delegations_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerNetworkInterfacesOperations: - """LoadBalancerNetworkInterfacesOperations async operations. +class AvailableResourceGroupDelegationsOperations: + """AvailableResourceGroupDelegationsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,28 +43,28 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, + location: str, resource_group_name: str, - load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets associated load balancer network interfaces. + ) -> AsyncIterable["_models.AvailableDelegationsResult"]: + """Gets all of the available subnet delegations for this resource group in this region. + :param location: The location of the domain name. + :type location: str :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either AvailableDelegationsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailableDelegationsResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableDelegationsResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -75,8 +75,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -92,7 +92,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('AvailableDelegationsResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,4 +113,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_load_balancing_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_service_aliases_operations.py similarity index 55% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_load_balancing_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_service_aliases_operations.py index 812bc42afeee..f997c0dbc9a8 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_load_balancing_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_available_service_aliases_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerLoadBalancingRulesOperations: - """LoadBalancerLoadBalancingRulesOperations async operations. +class AvailableServiceAliasesOperations: + """AvailableServiceAliasesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,28 +43,25 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - resource_group_name: str, - load_balancer_name: str, + location: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerLoadBalancingRuleListResult"]: - """Gets all the load balancing rules in a load balancer. + ) -> AsyncIterable["_models.AvailableServiceAliasesResult"]: + """Gets all available service aliases for this subscription in this region. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param location: The location. + :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerLoadBalancingRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerLoadBalancingRuleListResult] + :return: An iterator like instance of either AvailableServiceAliasesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailableServiceAliasesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerLoadBalancingRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableServiceAliasesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -75,8 +72,7 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -92,7 +88,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerLoadBalancingRuleListResult', pipeline_response) + deserialized = self._deserialize('AvailableServiceAliasesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,66 +109,78 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases'} # type: ignore - async def get( + def list_by_resource_group( self, resource_group_name: str, - load_balancer_name: str, - load_balancing_rule_name: str, + location: str, **kwargs: Any - ) -> "_models.LoadBalancingRule": - """Gets the specified load balancer load balancing rule. + ) -> AsyncIterable["_models.AvailableServiceAliasesResult"]: + """Gets all available service aliases for this resource group in this region. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param load_balancing_rule_name: The name of the load balancing rule. - :type load_balancing_rule_name: str + :param location: The location. + :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancingRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.LoadBalancingRule + :return: An iterator like instance of either AvailableServiceAliasesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailableServiceAliasesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancingRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableServiceAliasesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'loadBalancingRuleName': self._serialize.url("load_balancing_rule_name", load_balancing_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + api_version = "2021-05-01" + accept = "application/json" - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableServiceAliasesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - deserialized = self._deserialize('LoadBalancingRule', pipeline_response) + async def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, deserialized, {}) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}'} # type: ignore + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_bgp_service_communities_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_azure_firewall_fqdn_tags_operations.py similarity index 83% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_bgp_service_communities_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_azure_firewall_fqdn_tags_operations.py index 0aeeea58ab95..e5c0da45c92e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_bgp_service_communities_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_azure_firewall_fqdn_tags_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class BgpServiceCommunitiesOperations: - """BgpServiceCommunitiesOperations async operations. +class AzureFirewallFqdnTagsOperations: + """AzureFirewallFqdnTagsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -41,23 +41,23 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - def list( + def list_all( self, **kwargs: Any - ) -> AsyncIterable["_models.BgpServiceCommunityListResult"]: - """Gets all the available bgp service communities. + ) -> AsyncIterable["_models.AzureFirewallFqdnTagListResult"]: + """Gets all the Azure Firewall FQDN Tags in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BgpServiceCommunityListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.BgpServiceCommunityListResult] + :return: An iterator like instance of either AzureFirewallFqdnTagListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AzureFirewallFqdnTagListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpServiceCommunityListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallFqdnTagListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -67,7 +67,7 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_all.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -84,7 +84,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('BgpServiceCommunityListResult', pipeline_response) + deserialized = self._deserialize('AzureFirewallFqdnTagListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -105,4 +105,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_azure_firewalls_operations.py similarity index 80% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_azure_firewalls_operations.py index 33f2128b9bfb..9e3983be792d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_azure_firewalls_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancersOperations: - """LoadBalancersOperations async operations. +class AzureFirewallsOperations: + """AzureFirewallsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - load_balancer_name: str, + azure_firewall_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,13 +54,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,20 +85,20 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - load_balancer_name: str, + azure_firewall_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified load balancer. + """Deletes the specified Azure Firewall. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +119,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + azure_firewall_name=azure_firewall_name, cls=lambda x,y,z: x, **kwargs ) @@ -131,11 +133,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,41 +149,38 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore async def get( self, resource_group_name: str, - load_balancer_name: str, - expand: Optional[str] = None, + azure_firewall_name: str, **kwargs: Any - ) -> "_models.LoadBalancer": - """Gets the specified load balancer. + ) -> "_models.AzureFirewall": + """Gets the specified Azure Firewall. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param expand: Expands referenced resources. - :type expand: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancer, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.LoadBalancer + :return: AzureFirewall, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.AzureFirewall :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -189,8 +188,6 @@ async def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -204,35 +201,35 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - load_balancer_name: str, - parameters: "_models.LoadBalancer", + azure_firewall_name: str, + parameters: "_models.AzureFirewall", **kwargs: Any - ) -> "_models.LoadBalancer": - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + ) -> "_models.AzureFirewall": + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str', max_length=56, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +244,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LoadBalancer') + body_content = self._serialize.body(parameters, 'AzureFirewall') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -258,44 +255,44 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - load_balancer_name: str, - parameters: "_models.LoadBalancer", + azure_firewall_name: str, + parameters: "_models.AzureFirewall", **kwargs: Any - ) -> AsyncLROPoller["_models.LoadBalancer"]: - """Creates or updates a load balancer. + ) -> AsyncLROPoller["_models.AzureFirewall"]: + """Creates or updates the specified Azure Firewall. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.LoadBalancer + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :param parameters: Parameters supplied to the create or update Azure Firewall operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.AzureFirewall :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.LoadBalancer] + :return: An instance of AsyncLROPoller that returns either AzureFirewall or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.AzureFirewall] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -304,7 +301,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + azure_firewall_name=azure_firewall_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -314,7 +311,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -322,11 +319,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str', max_length=56, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -338,29 +335,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore async def _update_tags_initial( self, resource_group_name: str, - load_balancer_name: str, + azure_firewall_name: str, parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.LoadBalancer": - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + ) -> Optional["_models.AzureFirewall"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AzureFirewall"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -381,45 +378,47 @@ async def _update_tags_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore async def begin_update_tags( self, resource_group_name: str, - load_balancer_name: str, + azure_firewall_name: str, parameters: "_models.TagsObject", **kwargs: Any - ) -> AsyncLROPoller["_models.LoadBalancer"]: - """Updates a load balancer tags. + ) -> AsyncLROPoller["_models.AzureFirewall"]: + """Updates tags of an Azure Firewall resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :param parameters: Parameters supplied to update azure firewall tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.LoadBalancer] + :return: An instance of AsyncLROPoller that returns either AzureFirewall or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.AzureFirewall] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -428,7 +427,7 @@ async def begin_update_tags( if cont_token is None: raw_result = await self._update_tags_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + azure_firewall_name=azure_firewall_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -438,7 +437,7 @@ async def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -446,11 +445,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -462,26 +461,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore - def list_all( + def list( self, + resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerListResult"]: - """Gets all the load balancers in a subscription. + ) -> AsyncIterable["_models.AzureFirewallListResult"]: + """Lists all Azure Firewalls in a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerListResult] + :return: An iterator like instance of either AzureFirewallListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AzureFirewallListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -490,8 +492,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -507,7 +510,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('AzureFirewallListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -528,29 +531,26 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls'} # type: ignore - def list( + def list_all( self, - resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerListResult"]: - """Gets all the load balancers in a resource group. + ) -> AsyncIterable["_models.AzureFirewallListResult"]: + """Gets all the Azure Firewalls in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerListResult] + :return: An iterator like instance of either AzureFirewallListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AzureFirewallListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -559,9 +559,8 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_all.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -577,7 +576,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('AzureFirewallListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -598,4 +597,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_tables_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_bastion_hosts_operations.py similarity index 80% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_tables_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_bastion_hosts_operations.py index b3e95ea36b5f..10ef0110d4f0 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_tables_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_bastion_hosts_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RouteTablesOperations: - """RouteTablesOperations async operations. +class BastionHostsOperations: + """BastionHostsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - route_table_name: str, + bastion_host_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,13 +54,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,20 +85,20 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - route_table_name: str, + bastion_host_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified route table. + """Deletes the specified Bastion Host. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +119,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + bastion_host_name=bastion_host_name, cls=lambda x,y,z: x, **kwargs ) @@ -131,11 +133,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,41 +149,38 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore async def get( self, resource_group_name: str, - route_table_name: str, - expand: Optional[str] = None, + bastion_host_name: str, **kwargs: Any - ) -> "_models.RouteTable": - """Gets the specified route table. + ) -> "_models.BastionHost": + """Gets the specified Bastion Host. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param expand: Expands referenced resources. - :type expand: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteTable, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.RouteTable + :return: BastionHost, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.BastionHost :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -189,8 +188,6 @@ async def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -204,35 +201,35 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - route_table_name: str, - parameters: "_models.RouteTable", + bastion_host_name: str, + parameters: "_models.BastionHost", **kwargs: Any - ) -> "_models.RouteTable": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + ) -> "_models.BastionHost": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +244,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'RouteTable') + body_content = self._serialize.body(parameters, 'BastionHost') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -258,44 +255,44 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - route_table_name: str, - parameters: "_models.RouteTable", + bastion_host_name: str, + parameters: "_models.BastionHost", **kwargs: Any - ) -> AsyncLROPoller["_models.RouteTable"]: - """Create or updates a route table in a specified resource group. + ) -> AsyncLROPoller["_models.BastionHost"]: + """Creates or updates the specified Bastion Host. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param parameters: Parameters supplied to the create or update route table operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.RouteTable + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param parameters: Parameters supplied to the create or update Bastion Host operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.BastionHost :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.RouteTable] + :return: An instance of AsyncLROPoller that returns either BastionHost or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.BastionHost] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -304,7 +301,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + bastion_host_name=bastion_host_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -314,7 +311,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -322,11 +319,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -338,30 +335,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore async def _update_tags_initial( self, resource_group_name: str, - route_table_name: str, + bastion_host_name: str, parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.RouteTable": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + ) -> Optional["_models.BastionHost"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionHost"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -381,45 +378,47 @@ async def _update_tags_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore async def begin_update_tags( self, resource_group_name: str, - route_table_name: str, + bastion_host_name: str, parameters: "_models.TagsObject", **kwargs: Any - ) -> AsyncLROPoller["_models.RouteTable"]: - """Updates a route table tags. + ) -> AsyncLROPoller["_models.BastionHost"]: + """Updates Tags for BastionHost resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param parameters: Parameters supplied to update route table tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param parameters: Parameters supplied to update BastionHost tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.RouteTable] + :return: An instance of AsyncLROPoller that returns either BastionHost or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.BastionHost] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -428,7 +427,7 @@ async def begin_update_tags( if cont_token is None: raw_result = await self._update_tags_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + bastion_host_name=bastion_host_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -438,19 +437,19 @@ async def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -462,29 +461,26 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore def list( self, - resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RouteTableListResult"]: - """Gets all route tables in a resource group. + ) -> AsyncIterable["_models.BastionHostListResult"]: + """Lists all Bastion Hosts in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteTableListResult] + :return: An iterator like instance of either BastionHostListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionHostListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHostListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -495,7 +491,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -511,7 +506,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteTableListResult', pipeline_response) + deserialized = self._deserialize('BastionHostListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -532,26 +527,29 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts'} # type: ignore - def list_all( + def list_by_resource_group( self, + resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RouteTableListResult"]: - """Gets all route tables in a subscription. + ) -> AsyncIterable["_models.BastionHostListResult"]: + """Lists all Bastion Hosts in a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteTableListResult] + :return: An iterator like instance of either BastionHostListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionHostListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHostListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -560,8 +558,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -577,7 +576,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteTableListResult', pipeline_response) + deserialized = self._deserialize('BastionHostListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -598,4 +597,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_bgp_service_communities_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_bgp_service_communities_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_bgp_service_communities_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_bgp_service_communities_operations.py index 4adf0d6cd4c2..ca382c77ff8c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_bgp_service_communities_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_bgp_service_communities_operations.py @@ -26,7 +26,7 @@ class BgpServiceCommunitiesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BgpServiceCommunityListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.BgpServiceCommunityListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BgpServiceCommunityListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpServiceCommunityListResult"] @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_connection_monitors_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_connection_monitors_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_connection_monitors_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_connection_monitors_operations.py index 4883d6ad1bba..3dc8adeccbed 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_connection_monitors_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_connection_monitors_operations.py @@ -28,7 +28,7 @@ class ConnectionMonitorsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,6 +49,7 @@ async def _create_or_update_initial( network_watcher_name: str, connection_monitor_name: str, parameters: "_models.ConnectionMonitor", + migrate: Optional[str] = None, **kwargs: Any ) -> "_models.ConnectionMonitorResult": cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] @@ -56,9 +57,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -73,6 +74,8 @@ async def _create_or_update_initial( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if migrate is not None: + query_parameters['migrate'] = self._serialize.query("migrate", migrate, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -88,7 +91,8 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) @@ -108,6 +112,7 @@ async def begin_create_or_update( network_watcher_name: str, connection_monitor_name: str, parameters: "_models.ConnectionMonitor", + migrate: Optional[str] = None, **kwargs: Any ) -> AsyncLROPoller["_models.ConnectionMonitorResult"]: """Create or update a connection monitor. @@ -119,7 +124,9 @@ async def begin_create_or_update( :param connection_monitor_name: The name of the connection monitor. :type connection_monitor_name: str :param parameters: Parameters that define the operation to create a connection monitor. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitor + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitor + :param migrate: Value indicating whether connection monitor V1 should be migrated to V2 format. + :type migrate: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -127,7 +134,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ConnectionMonitorResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -143,6 +150,7 @@ async def begin_create_or_update( network_watcher_name=network_watcher_name, connection_monitor_name=connection_monitor_name, parameters=parameters, + migrate=migrate, cls=lambda x,y,z: x, **kwargs ) @@ -164,7 +172,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -195,7 +203,7 @@ async def get( :type connection_monitor_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ConnectionMonitorResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] @@ -203,8 +211,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -230,7 +238,8 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) @@ -252,7 +261,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -270,6 +280,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -277,7 +288,8 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -339,7 +351,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -353,6 +365,77 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'} # type: ignore + async def update_tags( + self, + resource_group_name: str, + network_watcher_name: str, + connection_monitor_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ConnectionMonitorResult": + """Update tags of the specified connection monitor. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :param parameters: Parameters supplied to update connection monitor tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionMonitorResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'connectionMonitorName': self._serialize.url("connection_monitor_name", connection_monitor_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'} # type: ignore + async def _stop_initial( self, resource_group_name: str, @@ -365,7 +448,8 @@ async def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._stop_initial.metadata['url'] # type: ignore @@ -383,6 +467,7 @@ async def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -390,7 +475,8 @@ async def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -452,7 +538,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -478,7 +564,8 @@ async def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._start_initial.metadata['url'] # type: ignore @@ -496,6 +583,7 @@ async def _start_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -503,7 +591,8 @@ async def _start_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -565,7 +654,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -591,8 +680,8 @@ async def _query_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._query_initial.metadata['url'] # type: ignore @@ -618,7 +707,8 @@ async def _query_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('ConnectionMonitorQueryResult', pipeline_response) @@ -654,7 +744,7 @@ async def begin_query( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ConnectionMonitorQueryResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorQueryResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorQueryResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -690,7 +780,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -718,7 +808,7 @@ def list( :type network_watcher_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConnectionMonitorListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorListResult"] @@ -726,8 +816,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -768,8 +858,9 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_custom_ip_prefixes_operations.py similarity index 72% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_custom_ip_prefixes_operations.py index 0dfec7016400..7554cdee0525 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_custom_ip_prefixes_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancersOperations: - """LoadBalancersOperations async operations. +class CustomIPPrefixesOperations: + """CustomIPPrefixesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - load_balancer_name: str, + custom_ip_prefix_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,13 +54,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,20 +85,20 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - load_balancer_name: str, + custom_ip_prefix_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified load balancer. + """Deletes the specified custom IP prefix. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param custom_ip_prefix_name: The name of the CustomIpPrefix. + :type custom_ip_prefix_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +119,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + custom_ip_prefix_name=custom_ip_prefix_name, cls=lambda x,y,z: x, **kwargs ) @@ -131,11 +133,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,41 +149,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore async def get( self, resource_group_name: str, - load_balancer_name: str, + custom_ip_prefix_name: str, expand: Optional[str] = None, **kwargs: Any - ) -> "_models.LoadBalancer": - """Gets the specified load balancer. + ) -> "_models.CustomIpPrefix": + """Gets the specified custom IP prefix in a specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancer, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.LoadBalancer + :return: CustomIpPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -204,35 +206,35 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - load_balancer_name: str, - parameters: "_models.LoadBalancer", + custom_ip_prefix_name: str, + parameters: "_models.CustomIpPrefix", **kwargs: Any - ) -> "_models.LoadBalancer": - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + ) -> "_models.CustomIpPrefix": + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +249,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LoadBalancer') + body_content = self._serialize.body(parameters, 'CustomIpPrefix') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -258,44 +260,44 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - load_balancer_name: str, - parameters: "_models.LoadBalancer", + custom_ip_prefix_name: str, + parameters: "_models.CustomIpPrefix", **kwargs: Any - ) -> AsyncLROPoller["_models.LoadBalancer"]: - """Creates or updates a load balancer. + ) -> AsyncLROPoller["_models.CustomIpPrefix"]: + """Creates or updates a custom IP prefix. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.LoadBalancer + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param parameters: Parameters supplied to the create or update custom IP prefix operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.LoadBalancer] + :return: An instance of AsyncLROPoller that returns either CustomIpPrefix or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -304,7 +306,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + custom_ip_prefix_name=custom_ip_prefix_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -314,7 +316,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -322,11 +324,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -338,29 +340,42 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, - load_balancer_name: str, + custom_ip_prefix_name: str, parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.LoadBalancer": - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + ) -> "_models.CustomIpPrefix": + """Updates custom IP prefix tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param parameters: Parameters supplied to update custom IP prefix tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomIpPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -385,103 +400,32 @@ async def _update_tags_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - load_balancer_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.LoadBalancer"]: - """Updates a load balancer tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.LoadBalancer] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore def list_all( self, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerListResult"]: - """Gets all the load balancers in a subscription. + ) -> AsyncIterable["_models.CustomIpPrefixListResult"]: + """Gets all the custom IP prefixes in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerListResult] + :return: An iterator like instance of either CustomIpPrefixListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.CustomIpPrefixListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefixListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -507,7 +451,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('CustomIpPrefixListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -528,29 +472,29 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes'} # type: ignore def list( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerListResult"]: - """Gets all the load balancers in a resource group. + ) -> AsyncIterable["_models.CustomIpPrefixListResult"]: + """Gets all custom IP prefixes in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerListResult] + :return: An iterator like instance of either CustomIpPrefixListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.CustomIpPrefixListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefixListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -577,7 +521,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('CustomIpPrefixListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -598,4 +542,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ddos_custom_policies_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ddos_custom_policies_operations.py new file mode 100644 index 000000000000..def5f0a8ecbd --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ddos_custom_policies_operations.py @@ -0,0 +1,403 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DdosCustomPoliciesOperations: + """DdosCustomPoliciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + **kwargs: Any + ) -> "_models.DdosCustomPolicy": + """Gets information about the specified DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosCustomPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + parameters: "_models.DdosCustomPolicy", + **kwargs: Any + ) -> "_models.DdosCustomPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DdosCustomPolicy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + parameters: "_models.DdosCustomPolicy", + **kwargs: Any + ) -> AsyncLROPoller["_models.DdosCustomPolicy"]: + """Creates or updates a DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :param parameters: Parameters supplied to the create or update operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DdosCustomPolicy or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + ddos_custom_policy_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.DdosCustomPolicy": + """Update a DDoS custom policy tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :param parameters: Parameters supplied to update DDoS custom policy resource tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosCustomPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ddos_protection_plans_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ddos_protection_plans_operations.py new file mode 100644 index 000000000000..9d54316c94b6 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ddos_protection_plans_operations.py @@ -0,0 +1,540 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class DdosProtectionPlansOperations: + """DdosProtectionPlansOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + **kwargs: Any + ) -> "_models.DdosProtectionPlan": + """Gets information about the specified DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosProtectionPlan, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + parameters: "_models.DdosProtectionPlan", + **kwargs: Any + ) -> "_models.DdosProtectionPlan": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DdosProtectionPlan') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + parameters: "_models.DdosProtectionPlan", + **kwargs: Any + ) -> AsyncLROPoller["_models.DdosProtectionPlan"]: + """Creates or updates a DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :param parameters: Parameters supplied to the create or update operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either DdosProtectionPlan or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + ddos_protection_plan_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.DdosProtectionPlan": + """Update a DDoS protection plan tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :param parameters: Parameters supplied to the update DDoS protection plan resource tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosProtectionPlan, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.DdosProtectionPlanListResult"]: + """Gets all DDoS protection plans in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DdosProtectionPlanListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DdosProtectionPlanListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DdosProtectionPlanListResult"]: + """Gets all the DDoS protection plans in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DdosProtectionPlanListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('DdosProtectionPlanListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_default_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_default_security_rules_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_default_security_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_default_security_rules_operations.py index 213ae2d5c61d..f3bf49d1fc98 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_default_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_default_security_rules_operations.py @@ -26,7 +26,7 @@ class DefaultSecurityRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list( :type network_security_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.SecurityRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.SecurityRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] @@ -63,8 +63,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -132,7 +132,7 @@ async def get( :type default_security_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.SecurityRule + :rtype: ~azure.mgmt.network.v2021_05_01.models.SecurityRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] @@ -140,8 +140,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_dscp_configuration_operations.py similarity index 80% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_dscp_configuration_operations.py index 9139ed5bb08e..55335445f215 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_dscp_configuration_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancersOperations: - """LoadBalancersOperations async operations. +class DscpConfigurationOperations: + """DscpConfigurationOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,24 +43,27 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def _create_or_update_initial( self, resource_group_name: str, - load_balancer_name: str, + dscp_configuration_name: str, + parameters: "_models.DscpConfiguration", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.DscpConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,53 +74,69 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DscpConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, - load_balancer_name: str, + dscp_configuration_name: str, + parameters: "_models.DscpConfiguration", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified load balancer. + ) -> AsyncLROPoller["_models.DscpConfiguration"]: + """Creates or updates a DSCP Configuration. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str + :param parameters: Parameters supplied to the create or update dscp configuration operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.DscpConfiguration :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either DscpConfiguration or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.DscpConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + dscp_configuration_name=dscp_configuration_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -126,16 +145,19 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,92 +169,27 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - load_balancer_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> "_models.LoadBalancer": - """Gets the specified load balancer. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancer, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.LoadBalancer - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('LoadBalancer', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - - async def _create_or_update_initial( + async def _delete_initial( self, resource_group_name: str, - load_balancer_name: str, - parameters: "_models.LoadBalancer", + dscp_configuration_name: str, **kwargs: Any - ) -> "_models.LoadBalancer": - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -243,69 +200,54 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LoadBalancer') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('LoadBalancer', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('LoadBalancer', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, - load_balancer_name: str, - parameters: "_models.LoadBalancer", + dscp_configuration_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.LoadBalancer"]: - """Creates or updates a load balancer. + ) -> AsyncLROPoller[None]: + """Deletes a DSCP Configuration. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.LoadBalancer + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.LoadBalancer] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - parameters=parameters, + dscp_configuration_name=dscp_configuration_name, cls=lambda x,y,z: x, **kwargs ) @@ -314,19 +256,16 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -338,26 +277,87 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore - def list_all( + async def get( self, + resource_group_name: str, + dscp_configuration_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerListResult"]: - """Gets all the load balancers in a subscription. + ) -> "_models.DscpConfiguration": + """Gets a DSCP Configuration. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerListResult] + :return: DscpConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DscpConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore + + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.DscpConfigurationListResult"]: + """Gets a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DscpConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.DscpConfigurationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfigurationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -366,8 +366,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -383,7 +384,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('DscpConfigurationListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -404,29 +405,26 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations'} # type: ignore - def list( + def list_all( self, - resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerListResult"]: - """Gets all the load balancers in a resource group. + ) -> AsyncIterable["_models.DscpConfigurationListResult"]: + """Gets all dscp configurations in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerListResult] + :return: An iterator like instance of either DscpConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.DscpConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -435,9 +433,8 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_all.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -453,7 +450,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('DscpConfigurationListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -474,4 +471,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_circuit_authorizations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuit_authorizations_operations.py similarity index 95% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_circuit_authorizations_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuit_authorizations_operations.py index 4e43bb24941d..d69ea0c8099e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_circuit_authorizations_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuit_authorizations_operations.py @@ -28,7 +28,7 @@ class ExpressRouteCircuitAuthorizationsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -73,6 +74,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -142,7 +144,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -173,7 +175,7 @@ async def get( :type authorization_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuitAuthorization, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] @@ -181,8 +183,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -231,9 +233,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -295,7 +297,7 @@ async def begin_create_or_update( :type authorization_name: str :param authorization_parameters: Parameters supplied to the create or update express route circuit authorization operation. - :type authorization_parameters: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization + :type authorization_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -303,7 +305,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitAuthorization or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -340,7 +342,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -368,7 +370,7 @@ def list( :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AuthorizationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.AuthorizationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AuthorizationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationListResult"] @@ -376,8 +378,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_circuit_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuit_connections_operations.py similarity index 80% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_circuit_peerings_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuit_connections_operations.py index 6ee51a2b2e60..ca9d542d148e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_circuit_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuit_connections_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitPeeringsOperations: - """ExpressRouteCircuitPeeringsOperations async operations. +class ExpressRouteCircuitConnectionsOperations: + """ExpressRouteCircuitConnectionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,6 +48,7 @@ async def _delete_initial( resource_group_name: str, circuit_name: str, peering_name: str, + connection_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -55,7 +56,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -63,6 +65,7 @@ async def _delete_initial( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -73,6 +76,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -85,16 +89,18 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore async def begin_delete( self, resource_group_name: str, circuit_name: str, peering_name: str, + connection_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified peering from the specified express route circuit. + """Deletes the specified Express Route Circuit Connection from the specified express route + circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -102,6 +108,8 @@ async def begin_delete( :type circuit_name: str :param peering_name: The name of the peering. :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -124,6 +132,7 @@ async def begin_delete( resource_group_name=resource_group_name, circuit_name=circuit_name, peering_name=peering_name, + connection_name=connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -139,10 +148,11 @@ def get_long_running_output(pipeline_response): 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,16 +164,17 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore async def get( self, resource_group_name: str, circuit_name: str, peering_name: str, + connection_name: str, **kwargs: Any - ) -> "_models.ExpressRouteCircuitPeering": - """Gets the specified authorization from the specified express route circuit. + ) -> "_models.ExpressRouteCircuitConnection": + """Gets the specified Express Route Circuit Connection from the specified express route circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -171,18 +182,20 @@ async def get( :type circuit_name: str :param peering_name: The name of the peering. :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering + :return: ExpressRouteCircuitConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -190,6 +203,7 @@ async def get( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -210,30 +224,31 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, circuit_name: str, peering_name: str, - peering_parameters: "_models.ExpressRouteCircuitPeering", + connection_name: str, + express_route_circuit_connection_parameters: "_models.ExpressRouteCircuitConnection", **kwargs: Any - ) -> "_models.ExpressRouteCircuitPeering": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + ) -> "_models.ExpressRouteCircuitConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -241,6 +256,7 @@ async def _create_or_update_initial( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +271,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(peering_parameters, 'ExpressRouteCircuitPeering') + body_content = self._serialize.body(express_route_circuit_connection_parameters, 'ExpressRouteCircuitConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,26 +282,27 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, circuit_name: str, peering_name: str, - peering_parameters: "_models.ExpressRouteCircuitPeering", + connection_name: str, + express_route_circuit_connection_parameters: "_models.ExpressRouteCircuitConnection", **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuitPeering"]: - """Creates or updates a peering in the specified express route circuits. + ) -> AsyncLROPoller["_models.ExpressRouteCircuitConnection"]: + """Creates or updates a Express Route Circuit Connection in the specified express route circuits. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -293,21 +310,23 @@ async def begin_create_or_update( :type circuit_name: str :param peering_name: The name of the peering. :type peering_name: str - :param peering_parameters: Parameters supplied to the create or update express route circuit - peering operation. - :type peering_parameters: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering + :param connection_name: The name of the express route circuit connection. + :type connection_name: str + :param express_route_circuit_connection_parameters: Parameters supplied to the create or update + express route circuit connection operation. + :type express_route_circuit_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitPeering or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] + :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -318,7 +337,8 @@ async def begin_create_or_update( resource_group_name=resource_group_name, circuit_name=circuit_name, peering_name=peering_name, - peering_parameters=peering_parameters, + connection_name=connection_name, + express_route_circuit_connection_parameters=express_route_circuit_connection_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -327,7 +347,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -337,10 +357,11 @@ def get_long_running_output(pipeline_response): 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -352,32 +373,36 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore def list( self, resource_group_name: str, circuit_name: str, + peering_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ExpressRouteCircuitPeeringListResult"]: - """Gets all peerings in a specified express route circuit. + ) -> AsyncIterable["_models.ExpressRouteCircuitConnectionListResult"]: + """Gets all global reach connections associated with a private peering in an express route + circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. + :param circuit_name: The name of the circuit. :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitPeeringListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringListResult] + :return: An iterator like instance of either ExpressRouteCircuitConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeeringListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -390,6 +415,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -405,7 +431,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitPeeringListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnectionListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -426,4 +452,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuit_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuit_peerings_operations.py similarity index 95% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuit_peerings_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuit_peerings_operations.py index 5b366b00ac96..70b2cbd7392d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_express_route_circuit_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuit_peerings_operations.py @@ -28,7 +28,7 @@ class ExpressRouteCircuitPeeringsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -73,6 +74,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -142,7 +144,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -163,7 +165,7 @@ async def get( peering_name: str, **kwargs: Any ) -> "_models.ExpressRouteCircuitPeering": - """Gets the specified authorization from the specified express route circuit. + """Gets the specified peering for the express route circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -173,7 +175,7 @@ async def get( :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuitPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] @@ -181,8 +183,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -231,9 +233,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -295,7 +297,7 @@ async def begin_create_or_update( :type peering_name: str :param peering_parameters: Parameters supplied to the create or update express route circuit peering operation. - :type peering_parameters: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering + :type peering_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -303,7 +305,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitPeering or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -340,7 +342,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -368,7 +370,7 @@ def list( :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExpressRouteCircuitPeeringListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeeringListResult"] @@ -376,8 +378,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_circuits_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuits_operations.py similarity index 90% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_circuits_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuits_operations.py index 6b1e30a4677e..cb9b85b0a3f7 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_circuits_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_circuits_operations.py @@ -28,7 +28,7 @@ class ExpressRouteCircuitsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -135,7 +137,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -163,7 +165,7 @@ async def get( :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuit, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] @@ -171,8 +173,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -219,9 +221,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -278,7 +280,7 @@ async def begin_create_or_update( :param circuit_name: The name of the circuit. :type circuit_name: str :param parameters: Parameters supplied to the create or update express route circuit operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -286,7 +288,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -321,7 +323,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -335,24 +337,37 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, circuit_name: str, parameters: "_models.TagsObject", **kwargs: Any ) -> "_models.ExpressRouteCircuit": + """Updates an express route circuit tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param parameters: Parameters supplied to update express route circuit tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), @@ -386,78 +401,7 @@ async def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - circuit_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuit"]: - """Updates an express route circuit tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :param parameters: Parameters supplied to update express route circuit tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore async def _list_arp_table_initial( self, @@ -472,8 +416,8 @@ async def _list_arp_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_arp_table_initial.metadata['url'] # type: ignore @@ -538,7 +482,7 @@ async def begin_list_arp_table( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsArpTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitsArpTableListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsArpTableListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -576,7 +520,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -603,8 +547,8 @@ async def _list_routes_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_routes_table_initial.metadata['url'] # type: ignore @@ -669,7 +613,7 @@ async def begin_list_routes_table( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitsRoutesTableListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsRoutesTableListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -707,7 +651,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -734,8 +678,8 @@ async def _list_routes_table_summary_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_routes_table_summary_initial.metadata['url'] # type: ignore @@ -800,7 +744,7 @@ async def begin_list_routes_table_summary( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsRoutesTableSummaryListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -838,7 +782,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -866,7 +810,7 @@ async def get_stats( :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitStats + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitStats :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] @@ -874,8 +818,8 @@ async def get_stats( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get_stats.metadata['url'] # type: ignore @@ -927,7 +871,7 @@ async def get_peering_stats( :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitStats + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitStats :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] @@ -935,8 +879,8 @@ async def get_peering_stats( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get_peering_stats.metadata['url'] # type: ignore @@ -983,7 +927,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] @@ -991,8 +935,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -1050,7 +994,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] @@ -1058,8 +1002,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_connections_operations.py new file mode 100644 index 000000000000..415a8069059c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_connections_operations.py @@ -0,0 +1,414 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExpressRouteConnectionsOperations: + """ExpressRouteConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + put_express_route_connection_parameters: "_models.ExpressRouteConnection", + **kwargs: Any + ) -> "_models.ExpressRouteConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(put_express_route_connection_parameters, 'ExpressRouteConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + put_express_route_connection_parameters: "_models.ExpressRouteConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteConnection"]: + """Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_name: str + :param put_express_route_connection_parameters: Parameters required in an + ExpressRouteConnection PUT operation. + :type put_express_route_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + put_express_route_connection_parameters=put_express_route_connection_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteConnection": + """Gets the specified ExpressRouteConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the ExpressRoute connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + express_route_gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a connection to a ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + async def list( + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteConnectionList": + """Lists ExpressRouteConnections. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteConnectionList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnectionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnectionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteConnectionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_circuit_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_cross_connection_peerings_operations.py similarity index 78% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_circuit_peerings_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_cross_connection_peerings_operations.py index e4f0b578e2d1..0bc0f0eac6fb 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_circuit_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_cross_connection_peerings_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitPeeringsOperations: - """ExpressRouteCircuitPeeringsOperations async operations. +class ExpressRouteCrossConnectionPeeringsOperations: + """ExpressRouteCrossConnectionPeeringsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,10 +43,84 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + def list( + self, + resource_group_name: str, + cross_connection_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteCrossConnectionPeeringList"]: + """Gets all peerings in a specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionPeeringList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeeringList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeeringList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRouteCrossConnectionPeeringList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings'} # type: ignore + async def _delete_initial( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, **kwargs: Any ) -> None: @@ -55,13 +129,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -73,6 +148,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -85,21 +161,21 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified peering from the specified express route circuit. + """Deletes the specified peering from the ExpressRouteCrossConnection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -122,7 +198,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, cls=lambda x,y,z: x, **kwargs @@ -137,12 +213,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,41 +230,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore async def get( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, **kwargs: Any - ) -> "_models.ExpressRouteCircuitPeering": - """Gets the specified authorization from the specified express route circuit. + ) -> "_models.ExpressRouteCrossConnectionPeering": + """Gets the specified peering for the ExpressRouteCrossConnection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering + :return: ExpressRouteCrossConnectionPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -210,36 +286,36 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, - peering_parameters: "_models.ExpressRouteCircuitPeering", + peering_parameters: "_models.ExpressRouteCrossConnectionPeering", **kwargs: Any - ) -> "_models.ExpressRouteCircuitPeering": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + ) -> "_models.ExpressRouteCrossConnectionPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -255,7 +331,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(peering_parameters, 'ExpressRouteCircuitPeering') + body_content = self._serialize.body(peering_parameters, 'ExpressRouteCrossConnectionPeering') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,48 +342,48 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, - peering_parameters: "_models.ExpressRouteCircuitPeering", + peering_parameters: "_models.ExpressRouteCrossConnectionPeering", **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuitPeering"]: - """Creates or updates a peering in the specified express route circuits. + ) -> AsyncLROPoller["_models.ExpressRouteCrossConnectionPeering"]: + """Creates or updates a peering in the specified ExpressRouteCrossConnection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str - :param peering_parameters: Parameters supplied to the create or update express route circuit - peering operation. - :type peering_parameters: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering + :param peering_parameters: Parameters supplied to the create or update + ExpressRouteCrossConnection peering operation. + :type peering_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitPeering or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] + :return: An instance of AsyncLROPoller that returns either ExpressRouteCrossConnectionPeering or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -316,7 +392,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, peering_parameters=peering_parameters, cls=lambda x,y,z: x, @@ -327,7 +403,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -335,12 +411,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -352,78 +428,4 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore - - def list( - self, - resource_group_name: str, - circuit_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ExpressRouteCircuitPeeringListResult"]: - """Gets all peerings in a specified express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitPeeringListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeeringListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitPeeringListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_circuits_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_cross_connections_operations.py similarity index 67% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_circuits_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_cross_connections_operations.py index e1005906b974..23a8bf2034f9 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_circuits_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_cross_connections_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitsOperations: - """ExpressRouteCircuitsOperations async operations. +class ExpressRouteCrossConnectionsOperations: + """ExpressRouteCrossConnectionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,142 +43,173 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + def list( self, - resource_group_name: str, - circuit_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> AsyncIterable["_models.ExpressRouteCrossConnectionListResult"]: + """Retrieves all the ExpressRouteCrossConnections in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRouteCrossConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + return pipeline_response - async def begin_delete( + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections'} # type: ignore + + def list_by_resource_group( self, resource_group_name: str, - circuit_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified express route circuit. + ) -> AsyncIterable["_models.ExpressRouteCrossConnectionListResult"]: + """Retrieves all the ExpressRouteCrossConnections in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :return: An iterator like instance of either ExpressRouteCrossConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - cls=lambda x,y,z: x, - **kwargs - ) + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_long_running_output(pipeline_response): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRouteCrossConnectionListResult', pipeline_response) + list_of_elem = deserialized.value if cls: - return cls(pipeline_response, None, {}) + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } + async def get_next(next_link=None): + request = prepare_request(next_link) - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections'} # type: ignore async def get( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, **kwargs: Any - ) -> "_models.ExpressRouteCircuit": - """Gets information about the specified express route circuit. + ) -> "_models.ExpressRouteCrossConnection": + """Gets details about the specified ExpressRouteCrossConnection. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group (peering location of the circuit). :type resource_group_name: str - :param circuit_name: The name of express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection (service key of the + circuit). + :type cross_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuit, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuit + :return: ExpressRouteCrossConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -199,35 +230,35 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - circuit_name: str, - parameters: "_models.ExpressRouteCircuit", + cross_connection_name: str, + parameters: "_models.ExpressRouteCrossConnection", **kwargs: Any - ) -> "_models.ExpressRouteCircuit": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + ) -> "_models.ExpressRouteCrossConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -242,55 +273,51 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ExpressRouteCircuit') + body_content = self._serialize.body(parameters, 'ExpressRouteCrossConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - circuit_name: str, - parameters: "_models.ExpressRouteCircuit", + cross_connection_name: str, + parameters: "_models.ExpressRouteCrossConnection", **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuit"]: - """Creates or updates an express route circuit. + ) -> AsyncLROPoller["_models.ExpressRouteCrossConnection"]: + """Update the specified ExpressRouteCrossConnection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :param parameters: Parameters supplied to the create or update express route circuit operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuit + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param parameters: Parameters supplied to the update express route crossConnection operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuit] + :return: An instance of AsyncLROPoller that returns either ExpressRouteCrossConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -299,7 +326,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -309,7 +336,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -317,11 +344,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -333,12 +360,79 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + cross_connection_name: str, + cross_connection_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.ExpressRouteCrossConnection": + """Updates an express route cross connection tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the cross connection. + :type cross_connection_name: str + :param cross_connection_parameters: Parameters supplied to update express route cross + connection tags. + :type cross_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCrossConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cross_connection_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'} # type: ignore async def _list_arp_table_initial( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any @@ -348,14 +442,14 @@ async def _list_arp_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_arp_table_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -386,23 +480,23 @@ async def _list_arp_table_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _list_arp_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore + _list_arp_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore async def begin_list_arp_table( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any ) -> AsyncLROPoller["_models.ExpressRouteCircuitsArpTableListResult"]: - """Gets the currently advertised ARP table associated with the express route circuit in a resource - group. + """Gets the currently advertised ARP table associated with the express route cross connection in a + resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :param device_path: The path of the device. @@ -414,7 +508,7 @@ async def begin_list_arp_table( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsArpTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitsArpTableListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsArpTableListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -427,7 +521,7 @@ async def begin_list_arp_table( if cont_token is None: raw_result = await self._list_arp_table_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, device_path=device_path, cls=lambda x,y,z: x, @@ -446,13 +540,13 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -464,29 +558,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_arp_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore + begin_list_arp_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore - async def _list_routes_table_initial( + async def _list_routes_table_summary_initial( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any - ) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] + ) -> Optional["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._list_routes_table_initial.metadata['url'] # type: ignore + url = self._list_routes_table_summary_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -511,29 +605,29 @@ async def _list_routes_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionsRoutesTableSummaryListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_routes_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore + _list_routes_table_summary_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore - async def begin_list_routes_table( + async def begin_list_routes_table_summary( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"]: - """Gets the currently advertised routes table associated with the express route circuit in a - resource group. + ) -> AsyncLROPoller["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]: + """Gets the route table summary associated with the express route cross connection in a resource + group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :param device_path: The path of the device. @@ -544,21 +638,21 @@ async def begin_list_routes_table( Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitsRoutesTableListResult] + :return: An instance of AsyncLROPoller that returns either ExpressRouteCrossConnectionsRoutesTableSummaryListResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._list_routes_table_initial( + raw_result = await self._list_routes_table_summary_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, device_path=device_path, cls=lambda x,y,z: x, @@ -569,7 +663,7 @@ async def begin_list_routes_table( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionsRoutesTableSummaryListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -577,13 +671,13 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -595,29 +689,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_routes_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore + begin_list_routes_table_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore - async def _list_routes_table_summary_initial( + async def _list_routes_table_initial( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any - ) -> Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]] + ) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._list_routes_table_summary_initial.metadata['url'] # type: ignore + url = self._list_routes_table_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -642,29 +736,29 @@ async def _list_routes_table_summary_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_routes_table_summary_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore + _list_routes_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore - async def begin_list_routes_table_summary( + async def begin_list_routes_table( self, resource_group_name: str, - circuit_name: str, + cross_connection_name: str, peering_name: str, device_path: str, **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]: - """Gets the currently advertised routes table summary associated with the express route circuit in - a resource group. + ) -> AsyncLROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"]: + """Gets the currently advertised routes table associated with the express route cross connection + in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :param device_path: The path of the device. @@ -675,21 +769,21 @@ async def begin_list_routes_table_summary( Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsRoutesTableSummaryListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] + :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsRoutesTableListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._list_routes_table_summary_initial( + raw_result = await self._list_routes_table_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, device_path=device_path, cls=lambda x,y,z: x, @@ -700,7 +794,7 @@ async def begin_list_routes_table_summary( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -708,13 +802,13 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -726,260 +820,4 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_routes_table_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore - - async def get_stats( - self, - resource_group_name: str, - circuit_name: str, - **kwargs: Any - ) -> "_models.ExpressRouteCircuitStats": - """Gets all the stats from an express route circuit in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitStats - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get_stats.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats'} # type: ignore - - async def get_peering_stats( - self, - resource_group_name: str, - circuit_name: str, - peering_name: str, - **kwargs: Any - ) -> "_models.ExpressRouteCircuitStats": - """Gets all stats from an express route circuit in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitStats - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get_peering_stats.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_peering_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats'} # type: ignore - - def list( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.ExpressRouteCircuitListResult"]: - """Gets all the express route circuits in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits'} # type: ignore - - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable["_models.ExpressRouteCircuitListResult"]: - """Gets all the express route circuits in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits'} # type: ignore + begin_list_routes_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_gateways_operations.py new file mode 100644 index 000000000000..857b50f9b40e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_gateways_operations.py @@ -0,0 +1,570 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExpressRouteGatewaysOperations: + """ExpressRouteGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_by_subscription( + self, + **kwargs: Any + ) -> "_models.ExpressRouteGatewayList": + """Lists ExpressRoute gateways under a given subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGatewayList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGatewayList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGatewayList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGatewayList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways'} # type: ignore + + async def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteGatewayList": + """Lists ExpressRoute gateways in a given resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGatewayList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGatewayList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGatewayList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGatewayList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + put_express_route_gateway_parameters: "_models.ExpressRouteGateway", + **kwargs: Any + ) -> "_models.ExpressRouteGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(put_express_route_gateway_parameters, 'ExpressRouteGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + express_route_gateway_name: str, + put_express_route_gateway_parameters: "_models.ExpressRouteGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteGateway"]: + """Creates or updates a ExpressRoute gateway in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param put_express_route_gateway_parameters: Parameters required in an ExpressRoute gateway PUT + operation. + :type put_express_route_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + put_express_route_gateway_parameters=put_express_route_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + express_route_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.ExpressRouteGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(express_route_gateway_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + express_route_gateway_name: str, + express_route_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.ExpressRouteGateway"]: + """Updates express route gateway tags. + + :param resource_group_name: The resource group name of the ExpressRouteGateway. + :type resource_group_name: str + :param express_route_gateway_name: The name of the gateway. + :type express_route_gateway_name: str + :param express_route_gateway_parameters: Parameters supplied to update a virtual wan express + route gateway tags. + :type express_route_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ExpressRouteGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + express_route_gateway_parameters=express_route_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteGateway": + """Fetches the details of a ExpressRoute gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + express_route_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway + resource can only be deleted when there are no connection subresources. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_links_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_links_operations.py new file mode 100644 index 000000000000..89371f77989e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_links_operations.py @@ -0,0 +1,178 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExpressRouteLinksOperations: + """ExpressRouteLinksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + express_route_port_name: str, + link_name: str, + **kwargs: Any + ) -> "_models.ExpressRouteLink": + """Retrieves the specified ExpressRouteLink resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param link_name: The name of the ExpressRouteLink resource. + :type link_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteLink, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLink + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + 'linkName': self._serialize.url("link_name", link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}'} # type: ignore + + def list( + self, + resource_group_name: str, + express_route_port_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRouteLinkListResult"]: + """Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteLinkListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRouteLinkListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_ports_locations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_ports_locations_operations.py new file mode 100644 index 000000000000..61e30851626e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_ports_locations_operations.py @@ -0,0 +1,165 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ExpressRoutePortsLocationsOperations: + """ExpressRoutePortsLocationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ExpressRoutePortsLocationListResult"]: + """Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each + location. Available bandwidths can only be obtained when retrieving a specific peering + location. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortsLocationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsLocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortsLocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRoutePortsLocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations'} # type: ignore + + async def get( + self, + location_name: str, + **kwargs: Any + ) -> "_models.ExpressRoutePortsLocation": + """Retrieves a single ExpressRoutePort peering location, including the list of available + bandwidths available at said peering location. + + :param location_name: Name of the requested ExpressRoutePort peering location. + :type location_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePortsLocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsLocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortsLocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePortsLocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_ports_operations.py similarity index 69% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_security_groups_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_ports_operations.py index 7ea78aea3c30..1c68b4f0d2bf 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_ports_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NetworkSecurityGroupsOperations: - """NetworkSecurityGroupsOperations async operations. +class ExpressRoutePortsOperations: + """ExpressRoutePortsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - network_security_group_name: str, + express_route_port_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,14 +54,15 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,20 +85,20 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - network_security_group_name: str, + express_route_port_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified network security group. + """Deletes the specified ExpressRoutePort resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +119,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + express_route_port_name=express_route_port_name, cls=lambda x,y,z: x, **kwargs ) @@ -130,12 +132,12 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,50 +149,45 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore async def get( self, resource_group_name: str, - network_security_group_name: str, - expand: Optional[str] = None, + express_route_port_name: str, **kwargs: Any - ) -> "_models.NetworkSecurityGroup": - """Gets the specified network security group. + ) -> "_models.ExpressRoutePort": + """Retrieves the requested ExpressRoutePort resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param expand: Expands referenced resources. - :type expand: str + :param express_route_port_name: The name of ExpressRoutePort. + :type express_route_port_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup + :return: ExpressRoutePort, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -204,36 +201,36 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - network_security_group_name: str, - parameters: "_models.NetworkSecurityGroup", + express_route_port_name: str, + parameters: "_models.ExpressRoutePort", **kwargs: Any - ) -> "_models.NetworkSecurityGroup": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + ) -> "_models.ExpressRoutePort": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +244,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkSecurityGroup') + body_content = self._serialize.body(parameters, 'ExpressRoutePort') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -258,45 +255,44 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - network_security_group_name: str, - parameters: "_models.NetworkSecurityGroup", + express_route_port_name: str, + parameters: "_models.ExpressRoutePort", **kwargs: Any - ) -> AsyncLROPoller["_models.NetworkSecurityGroup"]: - """Creates or updates a network security group in the specified resource group. + ) -> AsyncLROPoller["_models.ExpressRoutePort"]: + """Creates or updates the specified ExpressRoutePort resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param parameters: Parameters supplied to the create ExpressRoutePort operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup] + :return: An instance of AsyncLROPoller that returns either ExpressRoutePort or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -305,7 +301,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + express_route_port_name=express_route_port_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -315,19 +311,19 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -339,30 +335,43 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, - network_security_group_name: str, + express_route_port_name: str, parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.NetworkSecurityGroup": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + ) -> "_models.ExpressRoutePort": + """Update ExpressRoutePort tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param parameters: Parameters supplied to update ExpressRoutePort resource tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePort, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -386,103 +395,35 @@ async def _update_tags_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore - async def begin_update_tags( + def list_by_resource_group( self, resource_group_name: str, - network_security_group_name: str, - parameters: "_models.TagsObject", **kwargs: Any - ) -> AsyncLROPoller["_models.NetworkSecurityGroup"]: - """Updates a network security group tags. + ) -> AsyncIterable["_models.ExpressRoutePortListResult"]: + """List all the ExpressRoutePort resources in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable["_models.NetworkSecurityGroupListResult"]: - """Gets all network security groups in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroupListResult] + :return: An iterator like instance of either ExpressRoutePortListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -491,9 +432,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -508,7 +450,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('ExpressRoutePortListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -529,29 +471,26 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts'} # type: ignore def list( self, - resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkSecurityGroupListResult"]: - """Gets all network security groups in a resource group. + ) -> AsyncIterable["_models.ExpressRoutePortListResult"]: + """List all the ExpressRoutePort resources in the specified subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroupListResult] + :return: An iterator like instance of either ExpressRoutePortListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -562,7 +501,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -578,7 +516,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('ExpressRoutePortListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -599,4 +537,70 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts'} # type: ignore + + async def generate_loa( + self, + resource_group_name: str, + express_route_port_name: str, + request: "_models.GenerateExpressRoutePortsLOARequest", + **kwargs: Any + ) -> "_models.GenerateExpressRoutePortsLOAResult": + """Generate a letter of authorization for the requested ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of ExpressRoutePort. + :type express_route_port_name: str + :param request: Request parameters supplied to generate a letter of authorization. + :type request: ~azure.mgmt.network.v2021_05_01.models.GenerateExpressRoutePortsLOARequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GenerateExpressRoutePortsLOAResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.GenerateExpressRoutePortsLOAResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GenerateExpressRoutePortsLOAResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.generate_loa.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'GenerateExpressRoutePortsLOARequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GenerateExpressRoutePortsLOAResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + generate_loa.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/generateLoa'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_service_providers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_service_providers_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_service_providers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_service_providers_operations.py index 89d9f7a3f4b9..ab17d4dbab13 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_express_route_service_providers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_express_route_service_providers_operations.py @@ -26,7 +26,7 @@ class ExpressRouteServiceProvidersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExpressRouteServiceProviderListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.ExpressRouteServiceProviderListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteServiceProviderListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteServiceProviderListResult"] @@ -57,8 +57,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_tables_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policies_operations.py similarity index 81% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_tables_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policies_operations.py index 7b51e7f54b09..08f18fda3af6 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_tables_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policies_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RouteTablesOperations: - """RouteTablesOperations async operations. +class FirewallPoliciesOperations: + """FirewallPoliciesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - route_table_name: str, + firewall_policy_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,13 +54,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,20 +85,20 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - route_table_name: str, + firewall_policy_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified route table. + """Deletes the specified Firewall Policy. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +119,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + firewall_policy_name=firewall_policy_name, cls=lambda x,y,z: x, **kwargs ) @@ -131,11 +133,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,41 +149,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore async def get( self, resource_group_name: str, - route_table_name: str, + firewall_policy_name: str, expand: Optional[str] = None, **kwargs: Any - ) -> "_models.RouteTable": - """Gets the specified route table. + ) -> "_models.FirewallPolicy": + """Gets the specified Firewall Policy. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteTable, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.RouteTable + :return: FirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicy :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -204,35 +206,35 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('FirewallPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - route_table_name: str, - parameters: "_models.RouteTable", + firewall_policy_name: str, + parameters: "_models.FirewallPolicy", **kwargs: Any - ) -> "_models.RouteTable": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + ) -> "_models.FirewallPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +249,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'RouteTable') + body_content = self._serialize.body(parameters, 'FirewallPolicy') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -258,44 +260,44 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('FirewallPolicy', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('FirewallPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - route_table_name: str, - parameters: "_models.RouteTable", + firewall_policy_name: str, + parameters: "_models.FirewallPolicy", **kwargs: Any - ) -> AsyncLROPoller["_models.RouteTable"]: - """Create or updates a route table in a specified resource group. + ) -> AsyncLROPoller["_models.FirewallPolicy"]: + """Creates or updates the specified Firewall Policy. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param parameters: Parameters supplied to the create or update route table operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.RouteTable + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Parameters supplied to the create or update Firewall Policy operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.RouteTable] + :return: An instance of AsyncLROPoller that returns either FirewallPolicy or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.FirewallPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -304,7 +306,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + firewall_policy_name=firewall_policy_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -314,7 +316,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('FirewallPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -322,11 +324,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -338,29 +340,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore def list( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RouteTableListResult"]: - """Gets all route tables in a resource group. + ) -> AsyncIterable["_models.FirewallPolicyListResult"]: + """Lists all Firewall Policies in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteTableListResult] + :return: An iterator like instance of either FirewallPolicyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -387,7 +389,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteTableListResult', pipeline_response) + deserialized = self._deserialize('FirewallPolicyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -408,26 +410,26 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies'} # type: ignore def list_all( self, **kwargs: Any - ) -> AsyncIterable["_models.RouteTableListResult"]: - """Gets all route tables in a subscription. + ) -> AsyncIterable["_models.FirewallPolicyListResult"]: + """Gets all the Firewall Policies in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteTableListResult] + :return: An iterator like instance of either FirewallPolicyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -453,7 +455,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteTableListResult', pipeline_response) + deserialized = self._deserialize('FirewallPolicyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -474,4 +476,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_filter_values_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_filter_values_operations.py new file mode 100644 index 000000000000..d22bcad04e6c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_filter_values_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FirewallPolicyIdpsSignaturesFilterValuesOperations: + """FirewallPolicyIdpsSignaturesFilterValuesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.SignatureOverridesFilterValuesQuery", + **kwargs: Any + ) -> "_models.SignatureOverridesFilterValuesResponse": + """Retrieves the current filter values for the signatures overrides. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SignatureOverridesFilterValuesQuery + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignatureOverridesFilterValuesResponse, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignatureOverridesFilterValuesResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignatureOverridesFilterValuesResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SignatureOverridesFilterValuesQuery') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignatureOverridesFilterValuesResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_operations.py new file mode 100644 index 000000000000..7cc00e2fdf7b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FirewallPolicyIdpsSignaturesOperations: + """FirewallPolicyIdpsSignaturesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.IDPSQueryObject", + **kwargs: Any + ) -> "_models.QueryResults": + """Retrieves the current status of IDPS signatures for the relevant policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: + :type parameters: ~azure.mgmt.network.v2021_05_01.models.IDPSQueryObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QueryResults, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.QueryResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'IDPSQueryObject') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('QueryResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_overrides_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_overrides_operations.py new file mode 100644 index 000000000000..7f2f5c9e1d29 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_idps_signatures_overrides_operations.py @@ -0,0 +1,282 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class FirewallPolicyIdpsSignaturesOverridesOperations: + """FirewallPolicyIdpsSignaturesOverridesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def patch( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.SignaturesOverrides", + **kwargs: Any + ) -> "_models.SignaturesOverrides": + """Will update the status of policy's signature overrides for IDPS. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Will contain all properties of the object to put. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SignaturesOverrides') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default'} # type: ignore + + async def put( + self, + resource_group_name: str, + firewall_policy_name: str, + parameters: "_models.SignaturesOverrides", + **kwargs: Any + ) -> "_models.SignaturesOverrides": + """Will override/create a new signature overrides for the policy's IDPS. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Will contain all properties of the object to put. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SignaturesOverrides') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default'} # type: ignore + + async def get( + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> "_models.SignaturesOverrides": + """Returns all signatures overrides for a specific policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default'} # type: ignore + + async def list( + self, + resource_group_name: str, + firewall_policy_name: str, + **kwargs: Any + ) -> "_models.SignaturesOverridesList": + """Returns all signatures overrides objects for a specific policy as a list containing a single + value. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverridesList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverridesList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverridesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverridesList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_circuit_authorizations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_rule_collection_groups_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_circuit_authorizations_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_rule_collection_groups_operations.py index db01307eea26..e057b0cc708c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_express_route_circuit_authorizations_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_firewall_policy_rule_collection_groups_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitAuthorizationsOperations: - """ExpressRouteCircuitAuthorizationsOperations async operations. +class FirewallPolicyRuleCollectionGroupsOperations: + """FirewallPolicyRuleCollectionGroupsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,8 +46,8 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - circuit_name: str, - authorization_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -55,14 +55,15 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -73,6 +74,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -85,23 +87,23 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - circuit_name: str, - authorization_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified authorization from the specified express route circuit. + """Deletes the specified FirewallPolicyRuleCollectionGroup. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -122,8 +124,8 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, - authorization_name=authorization_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,12 +139,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,42 +156,42 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore async def get( self, resource_group_name: str, - circuit_name: str, - authorization_name: str, + firewall_policy_name: str, + rule_collection_group_name: str, **kwargs: Any - ) -> "_models.ExpressRouteCircuitAuthorization": - """Gets the specified authorization from the specified express route circuit. + ) -> "_models.FirewallPolicyRuleCollectionGroup": + """Gets the specified FirewallPolicyRuleCollectionGroup. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitAuthorization, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization + :return: FirewallPolicyRuleCollectionGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroup :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -210,37 +212,37 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - circuit_name: str, - authorization_name: str, - authorization_parameters: "_models.ExpressRouteCircuitAuthorization", + firewall_policy_name: str, + rule_collection_group_name: str, + parameters: "_models.FirewallPolicyRuleCollectionGroup", **kwargs: Any - ) -> "_models.ExpressRouteCircuitAuthorization": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + ) -> "_models.FirewallPolicyRuleCollectionGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +257,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(authorization_parameters, 'ExpressRouteCircuitAuthorization') + body_content = self._serialize.body(parameters, 'FirewallPolicyRuleCollectionGroup') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,48 +268,48 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - circuit_name: str, - authorization_name: str, - authorization_parameters: "_models.ExpressRouteCircuitAuthorization", + firewall_policy_name: str, + rule_collection_group_name: str, + parameters: "_models.FirewallPolicyRuleCollectionGroup", **kwargs: Any - ) -> AsyncLROPoller["_models.ExpressRouteCircuitAuthorization"]: - """Creates or updates an authorization in the specified express route circuit. + ) -> AsyncLROPoller["_models.FirewallPolicyRuleCollectionGroup"]: + """Creates or updates the specified FirewallPolicyRuleCollectionGroup. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str - :param authorization_parameters: Parameters supplied to the create or update express route - circuit authorization operation. - :type authorization_parameters: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str + :param parameters: Parameters supplied to the create or update + FirewallPolicyRuleCollectionGroup operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ExpressRouteCircuitAuthorization or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization] + :return: An instance of AsyncLROPoller that returns either FirewallPolicyRuleCollectionGroup or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroup] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -316,9 +318,9 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, - authorization_name=authorization_name, - authorization_parameters=authorization_parameters, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -327,7 +329,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -335,12 +337,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -352,32 +354,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore def list( self, resource_group_name: str, - circuit_name: str, + firewall_policy_name: str, **kwargs: Any - ) -> AsyncIterable["_models.AuthorizationListResult"]: - """Gets all authorizations in an express route circuit. + ) -> AsyncIterable["_models.FirewallPolicyRuleCollectionGroupListResult"]: + """Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either AuthorizationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.AuthorizationListResult] + :return: An iterator like instance of either FirewallPolicyRuleCollectionGroupListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroupListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -389,7 +391,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -405,7 +407,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('AuthorizationListResult', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroupListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -426,4 +428,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_local_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_flow_logs_operations.py similarity index 66% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_local_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_flow_logs_operations.py index 7c4e2d762fb0..032deb14894e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_local_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_flow_logs_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LocalNetworkGatewaysOperations: - """LocalNetworkGatewaysOperations async operations. +class FlowLogsOperations: + """FlowLogsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,24 +46,26 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _create_or_update_initial( self, resource_group_name: str, - local_network_gateway_name: str, - parameters: "_models.LocalNetworkGateway", + network_watcher_name: str, + flow_log_name: str, + parameters: "_models.FlowLog", **kwargs: Any - ) -> "_models.LocalNetworkGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + ) -> "_models.FlowLog": + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,7 +80,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LocalNetworkGateway') + body_content = self._serialize.body(parameters, 'FlowLog') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -86,47 +88,51 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('FlowLog', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('FlowLog', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - local_network_gateway_name: str, - parameters: "_models.LocalNetworkGateway", + network_watcher_name: str, + flow_log_name: str, + parameters: "_models.FlowLog", **kwargs: Any - ) -> AsyncLROPoller["_models.LocalNetworkGateway"]: - """Creates or updates a local network gateway in the specified resource group. + ) -> AsyncLROPoller["_models.FlowLog"]: + """Create or update a flow log for the specified network security group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :param parameters: Parameters supplied to the create or update local network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log. + :type flow_log_name: str + :param parameters: Parameters that define the create or update flow log resource. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FlowLog :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway] + :return: An instance of AsyncLROPoller that returns either FlowLog or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.FlowLog] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -135,7 +141,8 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -145,7 +152,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('FlowLog', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -153,11 +160,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -169,38 +177,46 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore - async def get( + async def update_tags( self, resource_group_name: str, - local_network_gateway_name: str, + network_watcher_name: str, + flow_log_name: str, + parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.LocalNetworkGateway": - """Gets the specified local network gateway in a resource group. + ) -> "_models.FlowLog": + """Update tags of the specified flow log. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log. + :type flow_log_name: str + :param parameters: Parameters supplied to update flow log tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response - :return: LocalNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway + :return: FlowLog, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.FlowLog :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -211,42 +227,63 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('FlowLog', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore - async def _delete_initial( + async def get( self, resource_group_name: str, - local_network_gateway_name: str, + network_watcher_name: str, + flow_log_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.FlowLog": + """Gets a flow log resource by name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log resource. + :type flow_log_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FlowLog, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.FlowLog + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -257,105 +294,46 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FlowLog', pipeline_response) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore - async def begin_delete( + async def _delete_initial( self, resource_group_name: str, - local_network_gateway_name: str, + network_watcher_name: str, + flow_log_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified local network gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore - - async def _update_tags_initial( - self, - resource_group_name: str, - local_network_gateway_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> "_models.LocalNetworkGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -366,65 +344,59 @@ async def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore - async def begin_update_tags( + async def begin_delete( self, resource_group_name: str, - local_network_gateway_name: str, - parameters: "_models.TagsObject", + network_watcher_name: str, + flow_log_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.LocalNetworkGateway"]: - """Updates a local network gateway tags. + ) -> AsyncLROPoller[None]: + """Deletes the specified flow log resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :param parameters: Parameters supplied to update local network gateway tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log resource. + :type flow_log_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_tags_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, - parameters=parameters, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, cls=lambda x,y,z: x, **kwargs ) @@ -433,19 +405,17 @@ async def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -457,29 +427,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore def list( self, resource_group_name: str, + network_watcher_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LocalNetworkGatewayListResult"]: - """Gets all the local network gateways in a resource group. + ) -> AsyncIterable["_models.FlowLogListResult"]: + """Lists all flow log resources for the specified Network Watcher. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group containing Network Watcher. :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LocalNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.LocalNetworkGatewayListResult] + :return: An iterator like instance of either FlowLogListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.FlowLogListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -491,6 +464,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -506,7 +480,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LocalNetworkGatewayListResult', pipeline_response) + deserialized = self._deserialize('FlowLogListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -519,12 +493,13 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_routes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_hub_route_tables_operations.py similarity index 77% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_routes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_hub_route_tables_operations.py index cfbc4bc6a51b..34c7ab6dc329 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_routes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_hub_route_tables_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RoutesOperations: - """RoutesOperations async operations. +class HubRouteTablesOperations: + """HubRouteTablesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,27 +43,30 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def _create_or_update_initial( self, resource_group_name: str, + virtual_hub_name: str, route_table_name: str, - route_name: str, + route_table_parameters: "_models.HubRouteTable", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.HubRouteTable": + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -73,57 +76,73 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(route_table_parameters, 'HubRouteTable') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('HubRouteTable', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubRouteTable', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, + virtual_hub_name: str, route_table_name: str, - route_name: str, + route_table_parameters: "_models.HubRouteTable", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified route from a route table. + ) -> AsyncLROPoller["_models.HubRouteTable"]: + """Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param route_table_name: The name of the route table. + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str + :param route_table_parameters: Parameters supplied to create or update RouteTable. + :type route_table_parameters: ~azure.mgmt.network.v2021_05_01.models.HubRouteTable :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either HubRouteTable or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.HubRouteTable] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, route_table_name=route_table_name, - route_name=route_name, + route_table_parameters=route_table_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -132,17 +151,20 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('HubRouteTable', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,43 +176,43 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore async def get( self, resource_group_name: str, + virtual_hub_name: str, route_table_name: str, - route_name: str, **kwargs: Any - ) -> "_models.Route": - """Gets the specified route from a route table. + ) -> "_models.HubRouteTable": + """Retrieves the details of a RouteTable. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param route_table_name: The name of the route table. + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Route, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.Route + :return: HubRouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.HubRouteTable :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -210,38 +232,36 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Route', pipeline_response) + deserialized = self._deserialize('HubRouteTable', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore - async def _create_or_update_initial( + async def _delete_initial( self, resource_group_name: str, + virtual_hub_name: str, route_table_name: str, - route_name: str, - route_parameters: "_models.Route", **kwargs: Any - ) -> "_models.Route": - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -251,73 +271,58 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_parameters, 'Route') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('Route', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Route', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, + virtual_hub_name: str, route_table_name: str, - route_name: str, - route_parameters: "_models.Route", **kwargs: Any - ) -> AsyncLROPoller["_models.Route"]: - """Creates or updates a route in the specified route table. + ) -> AsyncLROPoller[None]: + """Deletes a RouteTable. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the RouteTable. :type resource_group_name: str - :param route_table_name: The name of the route table. + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str - :param route_parameters: Parameters supplied to the create or update route operation. - :type route_parameters: ~azure.mgmt.network.v2017_11_01.models.Route :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.Route] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, route_table_name=route_table_name, - route_name=route_name, - route_parameters=route_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -326,20 +331,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Route', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -351,32 +353,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore def list( self, resource_group_name: str, - route_table_name: str, + virtual_hub_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RouteListResult"]: - """Gets all routes in a route table. + ) -> AsyncIterable["_models.ListHubRouteTablesResult"]: + """Retrieves the details of all RouteTables. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteListResult] + :return: An iterator like instance of either ListHubRouteTablesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListHubRouteTablesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListHubRouteTablesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -387,9 +389,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -404,7 +406,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteListResult', pipeline_response) + deserialized = self._deserialize('ListHubRouteTablesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -425,4 +427,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_hub_virtual_network_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_hub_virtual_network_connections_operations.py new file mode 100644 index 000000000000..c722a7042b4d --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_hub_virtual_network_connections_operations.py @@ -0,0 +1,431 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class HubVirtualNetworkConnectionsOperations: + """HubVirtualNetworkConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + hub_virtual_network_connection_parameters: "_models.HubVirtualNetworkConnection", + **kwargs: Any + ) -> "_models.HubVirtualNetworkConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(hub_virtual_network_connection_parameters, 'HubVirtualNetworkConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + hub_virtual_network_connection_parameters: "_models.HubVirtualNetworkConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.HubVirtualNetworkConnection"]: + """Creates a hub virtual network connection if it doesn't exist else updates the existing one. + + :param resource_group_name: The resource group name of the HubVirtualNetworkConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the HubVirtualNetworkConnection. + :type connection_name: str + :param hub_virtual_network_connection_parameters: Parameters supplied to create or update a hub + virtual network connection. + :type hub_virtual_network_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.HubVirtualNetworkConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either HubVirtualNetworkConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.HubVirtualNetworkConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + hub_virtual_network_connection_parameters=hub_virtual_network_connection_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a HubVirtualNetworkConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the HubVirtualNetworkConnection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.HubVirtualNetworkConnection": + """Retrieves the details of a HubVirtualNetworkConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubVirtualNetworkConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.HubVirtualNetworkConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListHubVirtualNetworkConnectionsResult"]: + """Retrieves the details of all HubVirtualNetworkConnections. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListHubVirtualNetworkConnectionsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListHubVirtualNetworkConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListHubVirtualNetworkConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListHubVirtualNetworkConnectionsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_inbound_nat_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_inbound_nat_rules_operations.py similarity index 93% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_inbound_nat_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_inbound_nat_rules_operations.py index 21864da53252..0c4d01a5bddf 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_inbound_nat_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_inbound_nat_rules_operations.py @@ -28,7 +28,7 @@ class InboundNatRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ def list( load_balancer_name: str, **kwargs: Any ) -> AsyncIterable["_models.InboundNatRuleListResult"]: - """Gets all the inbound nat rules in a load balancer. + """Gets all the inbound NAT rules in a load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -57,7 +57,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InboundNatRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.InboundNatRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.InboundNatRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRuleListResult"] @@ -65,8 +65,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -129,7 +129,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -147,6 +148,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -168,13 +170,13 @@ async def begin_delete( inbound_nat_rule_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified load balancer inbound nat rule. + """Deletes the specified load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. + :param inbound_nat_rule_name: The name of the inbound NAT rule. :type inbound_nat_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -216,7 +218,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -238,19 +240,19 @@ async def get( expand: Optional[str] = None, **kwargs: Any ) -> "_models.InboundNatRule": - """Gets the specified load balancer inbound nat rule. + """Gets the specified load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. + :param inbound_nat_rule_name: The name of the inbound NAT rule. :type inbound_nat_rule_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: InboundNatRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.InboundNatRule + :rtype: ~azure.mgmt.network.v2021_05_01.models.InboundNatRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] @@ -258,8 +260,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -310,9 +312,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -364,17 +366,17 @@ async def begin_create_or_update( inbound_nat_rule_parameters: "_models.InboundNatRule", **kwargs: Any ) -> AsyncLROPoller["_models.InboundNatRule"]: - """Creates or updates a load balancer inbound nat rule. + """Creates or updates a load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. + :param inbound_nat_rule_name: The name of the inbound NAT rule. :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound nat + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT rule operation. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2017_09_01.models.InboundNatRule + :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.InboundNatRule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -382,7 +384,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.InboundNatRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -419,7 +421,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_inbound_security_rule_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_inbound_security_rule_operations.py new file mode 100644 index 000000000000..d45de4b84a87 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_inbound_security_rule_operations.py @@ -0,0 +1,179 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class InboundSecurityRuleOperations: + """InboundSecurityRuleOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + rule_collection_name: str, + parameters: "_models.InboundSecurityRule", + **kwargs: Any + ) -> "_models.InboundSecurityRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundSecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'InboundSecurityRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + rule_collection_name: str, + parameters: "_models.InboundSecurityRule", + **kwargs: Any + ) -> AsyncLROPoller["_models.InboundSecurityRule"]: + """Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param rule_collection_name: The name of security rule collection. + :type rule_collection_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance + Inbound Security Rules operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.InboundSecurityRule + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either InboundSecurityRule or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.InboundSecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundSecurityRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + rule_collection_name=rule_collection_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ip_allocations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ip_allocations_operations.py new file mode 100644 index 000000000000..a567919138fd --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ip_allocations_operations.py @@ -0,0 +1,545 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IpAllocationsOperations: + """IpAllocationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + ip_allocation_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + ip_allocation_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified IpAllocation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + ip_allocation_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.IpAllocation": + """Gets the specified IpAllocation by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpAllocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.IpAllocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + ip_allocation_name: str, + parameters: "_models.IpAllocation", + **kwargs: Any + ) -> "_models.IpAllocation": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'IpAllocation') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + ip_allocation_name: str, + parameters: "_models.IpAllocation", + **kwargs: Any + ) -> AsyncLROPoller["_models.IpAllocation"]: + """Creates or updates an IpAllocation in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.IpAllocation + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either IpAllocation or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.IpAllocation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + ip_allocation_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.IpAllocation": + """Updates a IpAllocation tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpAllocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.IpAllocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.IpAllocationListResult"]: + """Gets all IpAllocations in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpAllocationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.IpAllocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IpAllocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.IpAllocationListResult"]: + """Gets all IpAllocations in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpAllocationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.IpAllocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IpAllocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ip_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ip_groups_operations.py new file mode 100644 index 000000000000..f426529f78fc --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_ip_groups_operations.py @@ -0,0 +1,552 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class IpGroupsOperations: + """IpGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + ip_groups_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.IpGroup": + """Gets the specified ipGroups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param expand: Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced + by the IpGroups resource. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.IpGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + ip_groups_name: str, + parameters: "_models.IpGroup", + **kwargs: Any + ) -> "_models.IpGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'IpGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IpGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + ip_groups_name: str, + parameters: "_models.IpGroup", + **kwargs: Any + ) -> AsyncLROPoller["_models.IpGroup"]: + """Creates or updates an ipGroups in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.IpGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either IpGroup or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.IpGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + async def update_groups( + self, + resource_group_name: str, + ip_groups_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.IpGroup": + """Updates tags of an IpGroups resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.IpGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_groups.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + ip_groups_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + ip_groups_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified ipGroups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.IpGroupListResult"]: + """Gets all IpGroups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpGroupListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.IpGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IpGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.IpGroupListResult"]: + """Gets all IpGroups in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpGroupListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.IpGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('IpGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_inbound_nat_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_backend_address_pools_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_inbound_nat_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_backend_address_pools_operations.py index dd4da26dcc89..3e5880605f6f 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_inbound_nat_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_backend_address_pools_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class InboundNatRulesOperations: - """InboundNatRulesOperations async operations. +class LoadBalancerBackendAddressPoolsOperations: + """LoadBalancerBackendAddressPoolsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,25 +48,25 @@ def list( resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.InboundNatRuleListResult"]: - """Gets all the inbound nat rules in a load balancer. + ) -> AsyncIterable["_models.LoadBalancerBackendAddressPoolListResult"]: + """Gets all the load balancer backed address pools. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either InboundNatRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.InboundNatRuleListResult] + :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerBackendAddressPoolListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -94,7 +94,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('InboundNatRuleListResult', pipeline_response) + deserialized = self._deserialize('LoadBalancerBackendAddressPoolListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -115,28 +115,42 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools'} # type: ignore - async def _delete_initial( + async def get( self, resource_group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, + backend_address_pool_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.BackendAddressPool": + """Gets load balancer backend address pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackendAddressPool, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.BackendAddressPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -147,57 +161,125 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore - async def begin_delete( + async def _create_or_update_initial( self, resource_group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, + backend_address_pool_name: str, + parameters: "_models.BackendAddressPool", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified load balancer inbound nat rule. + ) -> "_models.BackendAddressPool": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackendAddressPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + load_balancer_name: str, + backend_address_pool_name: str, + parameters: "_models.BackendAddressPool", + **kwargs: Any + ) -> AsyncLROPoller["_models.BackendAddressPool"]: + """Creates or updates a load balancer backend address pool. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.BackendAddressPool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either BackendAddressPool or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.BackendAddressPool] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, + backend_address_pool_name=backend_address_pool_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -206,17 +288,20 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -228,98 +313,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore - async def get( - self, - resource_group_name: str, - load_balancer_name: str, - inbound_nat_rule_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> "_models.InboundNatRule": - """Gets the specified load balancer inbound nat rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: InboundNatRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.InboundNatRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('InboundNatRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore - - async def _create_or_update_initial( + async def _delete_initial( self, resource_group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: "_models.InboundNatRule", + backend_address_pool_name: str, **kwargs: Any - ) -> "_models.InboundNatRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -330,74 +346,58 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(inbound_nat_rule_parameters, 'InboundNatRule') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('InboundNatRule', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('InboundNatRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, load_balancer_name: str, - inbound_nat_rule_name: str, - inbound_nat_rule_parameters: "_models.InboundNatRule", + backend_address_pool_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.InboundNatRule"]: - """Creates or updates a load balancer inbound nat rule. + ) -> AsyncLROPoller[None]: + """Deletes the specified load balancer backend address pool. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound nat - rule operation. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2017_11_01.models.InboundNatRule + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.InboundNatRule] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, - inbound_nat_rule_parameters=inbound_nat_rule_parameters, + backend_address_pool_name=backend_address_pool_name, cls=lambda x,y,z: x, **kwargs ) @@ -406,20 +406,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('InboundNatRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -431,4 +428,4 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py index 09f3439e932e..21f3aeebcc4d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_frontend_ip_configurations_operations.py @@ -26,7 +26,7 @@ class LoadBalancerFrontendIPConfigurationsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LoadBalancerFrontendIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerFrontendIPConfigurationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerFrontendIPConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerFrontendIPConfigurationListResult"] @@ -63,8 +63,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -132,7 +132,7 @@ async def get( :type frontend_ip_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FrontendIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.FrontendIPConfiguration + :rtype: ~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendIPConfiguration"] @@ -140,8 +140,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_load_balancing_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_load_balancing_rules_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_load_balancing_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_load_balancing_rules_operations.py index 4d53686f2f9f..5ce7ace6806d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_load_balancer_load_balancing_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_load_balancing_rules_operations.py @@ -26,7 +26,7 @@ class LoadBalancerLoadBalancingRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LoadBalancerLoadBalancingRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerLoadBalancingRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerLoadBalancingRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerLoadBalancingRuleListResult"] @@ -63,8 +63,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -132,7 +132,7 @@ async def get( :type load_balancing_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LoadBalancingRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.LoadBalancingRule + :rtype: ~azure.mgmt.network.v2021_05_01.models.LoadBalancingRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancingRule"] @@ -140,8 +140,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_network_interfaces_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_network_interfaces_operations.py index 58cb19092171..5828f31efa8d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_network_interfaces_operations.py @@ -26,7 +26,7 @@ class LoadBalancerNetworkInterfacesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -63,8 +63,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_probes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_outbound_rules_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_probes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_outbound_rules_operations.py index 6741a39c7600..44e87193f2c3 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_probes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_outbound_rules_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerProbesOperations: - """LoadBalancerProbesOperations async operations. +class LoadBalancerOutboundRulesOperations: + """LoadBalancerOutboundRulesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,25 +46,25 @@ def list( resource_group_name: str, load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerProbeListResult"]: - """Gets all the load balancer probes. + ) -> AsyncIterable["_models.LoadBalancerOutboundRuleListResult"]: + """Gets all the outbound rules in a load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerProbeListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerProbeListResult] + :return: An iterator like instance of either LoadBalancerOutboundRuleListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerOutboundRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerProbeListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerOutboundRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -92,7 +92,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerProbeListResult', pipeline_response) + deserialized = self._deserialize('LoadBalancerOutboundRuleListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,42 +113,42 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules'} # type: ignore async def get( self, resource_group_name: str, load_balancer_name: str, - probe_name: str, + outbound_rule_name: str, **kwargs: Any - ) -> "_models.Probe": - """Gets load balancer probe. + ) -> "_models.OutboundRule": + """Gets the specified load balancer outbound rule. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param probe_name: The name of the probe. - :type probe_name: str + :param outbound_rule_name: The name of the outbound rule. + :type outbound_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Probe, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.Probe + :return: OutboundRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.OutboundRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Probe"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'probeName': self._serialize.url("probe_name", probe_name, 'str'), + 'outboundRuleName': self._serialize.url("outbound_rule_name", outbound_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -169,10 +169,10 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Probe', pipeline_response) + deserialized = self._deserialize('OutboundRule', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_probes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_probes_operations.py similarity index 95% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_probes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_probes_operations.py index 1a478ba3d957..88b0ebd439c0 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_load_balancer_probes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancer_probes_operations.py @@ -26,7 +26,7 @@ class LoadBalancerProbesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LoadBalancerProbeListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerProbeListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerProbeListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerProbeListResult"] @@ -63,8 +63,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -132,7 +132,7 @@ async def get( :type probe_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Probe, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.Probe + :rtype: ~azure.mgmt.network.v2021_05_01.models.Probe :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Probe"] @@ -140,8 +140,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_gateway_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancers_operations.py similarity index 65% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_gateway_connections_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancers_operations.py index 1b2eb22d3079..5108dc6d6dcd 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_gateway_connections_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_load_balancers_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkGatewayConnectionsOperations: - """VirtualNetworkGatewayConnectionsOperations async operations. +class LoadBalancersOperations: + """LoadBalancersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,27 +43,25 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _create_or_update_initial( + async def _delete_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.VirtualNetworkGatewayConnection", + load_balancer_name: str, **kwargs: Any - ) -> "_models.VirtualNetworkGatewayConnection": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -74,71 +72,54 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.VirtualNetworkGatewayConnection", + load_balancer_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGatewayConnection"]: - """Creates or updates a virtual network gateway connection in the specified resource group. + ) -> AsyncLROPoller[None]: + """Deletes the specified load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the create or update virtual network gateway - connection operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnection + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnection] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + load_balancer_name=load_balancer_name, cls=lambda x,y,z: x, **kwargs ) @@ -147,19 +128,16 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -171,39 +149,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore async def get( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, + load_balancer_name: str, + expand: Optional[str] = None, **kwargs: Any - ) -> "_models.VirtualNetworkGatewayConnection": - """Gets the specified virtual network gateway connection by resource group. + ) -> "_models.LoadBalancer": + """Gets the specified load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param expand: Expands referenced resources. + :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGatewayConnection, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnection + :return: LoadBalancer, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.LoadBalancer :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -211,6 +191,8 @@ async def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -224,142 +206,35 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - async def _delete_initial( - self, - resource_group_name: str, - virtual_network_gateway_connection_name: str, - **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - async def begin_delete( - self, - resource_group_name: str, - virtual_network_gateway_connection_name: str, - **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified virtual network Gateway connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - async def _set_shared_key_initial( + async def _create_or_update_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionSharedKey", + load_balancer_name: str, + parameters: "_models.LoadBalancer", **kwargs: Any - ) -> "_models.ConnectionSharedKey": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + ) -> "_models.LoadBalancer": + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._set_shared_key_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -374,7 +249,7 @@ async def _set_shared_key_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionSharedKey') + body_content = self._serialize.body(parameters, 'LoadBalancer') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -385,56 +260,53 @@ async def _set_shared_key_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _set_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - async def begin_set_shared_key( + async def begin_create_or_update( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionSharedKey", + load_balancer_name: str, + parameters: "_models.LoadBalancer", **kwargs: Any - ) -> AsyncLROPoller["_models.ConnectionSharedKey"]: - """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + ) -> AsyncLROPoller["_models.LoadBalancer"]: + """Creates or updates a load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection - Shared key operation throughNetwork resource provider. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ConnectionSharedKey + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param parameters: Parameters supplied to the create or update load balancer operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.LoadBalancer :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ConnectionSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ConnectionSharedKey] + :return: An instance of AsyncLROPoller that returns either LoadBalancer or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._set_shared_key_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + load_balancer_name=load_balancer_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -444,7 +316,7 @@ async def begin_set_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -452,11 +324,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -468,40 +340,42 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - async def get_shared_key( + async def update_tags( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, + load_balancer_name: str, + parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.ConnectionSharedKey": - """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the - specified virtual network gateway connection shared key through Network resource provider. + ) -> "_models.LoadBalancer": + """Updates a load balancer tags. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection shared - key name. - :type virtual_network_gateway_connection_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConnectionSharedKey, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ConnectionSharedKey + :return: LoadBalancer, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.LoadBalancer :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_shared_key.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -512,9 +386,13 @@ async def get_shared_key( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -522,36 +400,101 @@ async def get_shared_key( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.LoadBalancerListResult"]: + """Gets all the load balancers in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'} # type: ignore def list( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkGatewayConnectionListResult"]: - """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways - connections created. + ) -> AsyncIterable["_models.LoadBalancerListResult"]: + """Gets all the load balancers in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionListResult] + :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -578,7 +521,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListResult', pipeline_response) + deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -599,29 +542,142 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'} # type: ignore - async def _reset_shared_key_initial( + async def _swap_public_ip_addresses_initial( self, - resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionResetSharedKey", + location: str, + parameters: "_models.LoadBalancerVipSwapRequest", **kwargs: Any - ) -> Optional["_models.ConnectionResetSharedKey"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._reset_shared_key_initial.metadata['url'] # type: ignore + url = self._swap_public_ip_addresses_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'LoadBalancerVipSwapRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _swap_public_ip_addresses_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses'} # type: ignore + + async def begin_swap_public_ip_addresses( + self, + location: str, + parameters: "_models.LoadBalancerVipSwapRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Swaps VIPs between two load balancers. + + :param location: The region where load balancers are located at. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.LoadBalancerVipSwapRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._swap_public_ip_addresses_initial( + location=location, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_swap_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses'} # type: ignore + + async def _list_inbound_nat_rule_port_mappings_initial( + self, + group_name: str, + load_balancer_name: str, + backend_pool_name: str, + parameters: "_models.QueryInboundNatRulePortMappingRequest", + **kwargs: Any + ) -> "_models.BackendAddressInboundNatRulePortMappings": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressInboundNatRulePortMappings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._list_inbound_nat_rule_port_mappings_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'backendPoolName': self._serialize.url("backend_pool_name", backend_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -636,7 +692,7 @@ async def _reset_shared_key_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionResetSharedKey') + body_content = self._serialize.body(parameters, 'QueryInboundNatRulePortMappingRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -646,56 +702,58 @@ async def _reset_shared_key_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _reset_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + _list_inbound_nat_rule_port_mappings_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping'} # type: ignore - async def begin_reset_shared_key( + async def begin_list_inbound_nat_rule_port_mappings( self, - resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionResetSharedKey", + group_name: str, + load_balancer_name: str, + backend_pool_name: str, + parameters: "_models.QueryInboundNatRulePortMappingRequest", **kwargs: Any - ) -> AsyncLROPoller["_models.ConnectionResetSharedKey"]: - """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection reset - shared key Name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the begin reset virtual network gateway connection - shared key operation through network resource provider. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ConnectionResetSharedKey + ) -> AsyncLROPoller["_models.BackendAddressInboundNatRulePortMappings"]: + """List of inbound NAT rule port mappings. + + :param group_name: The name of the resource group. + :type group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_pool_name: The name of the load balancer backend address pool. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.QueryInboundNatRulePortMappingRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ConnectionResetSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.ConnectionResetSharedKey] + :return: An instance of AsyncLROPoller that returns either BackendAddressInboundNatRulePortMappings or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.BackendAddressInboundNatRulePortMappings] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressInboundNatRulePortMappings"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._reset_shared_key_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + raw_result = await self._list_inbound_nat_rule_port_mappings_initial( + group_name=group_name, + load_balancer_name=load_balancer_name, + backend_pool_name=backend_pool_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -705,15 +763,16 @@ async def begin_reset_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'backendPoolName': self._serialize.url("backend_pool_name", backend_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -729,4 +788,4 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + begin_list_inbound_nat_rule_port_mappings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_local_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_local_network_gateways_operations.py similarity index 83% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_local_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_local_network_gateways_operations.py index 522e04362187..2141f65c6f72 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_local_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_local_network_gateways_operations.py @@ -28,7 +28,7 @@ class LocalNetworkGatewaysOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,9 +55,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -114,7 +114,7 @@ async def begin_create_or_update( :param local_network_gateway_name: The name of the local network gateway. :type local_network_gateway_name: str :param parameters: Parameters supplied to the create or update local network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway + :type parameters: ~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -122,7 +122,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -157,7 +157,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -185,7 +185,7 @@ async def get( :type local_network_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LocalNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway + :rtype: ~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] @@ -193,8 +193,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -240,7 +240,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -257,6 +258,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -335,24 +337,37 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, local_network_gateway_name: str, parameters: "_models.TagsObject", **kwargs: Any ) -> "_models.LocalNetworkGateway": + """Updates a local network gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :param parameters: Parameters supplied to update local network gateway tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocalNetworkGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), @@ -386,78 +401,7 @@ async def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - local_network_gateway_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.LocalNetworkGateway"]: - """Updates a local network gateway tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :param parameters: Parameters supplied to update local network gateway tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore def list( self, @@ -470,7 +414,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LocalNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.LocalNetworkGatewayListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.LocalNetworkGatewayListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGatewayListResult"] @@ -478,8 +422,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_nat_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_nat_gateways_operations.py new file mode 100644 index 000000000000..2cd0c2f089db --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_nat_gateways_operations.py @@ -0,0 +1,546 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NatGatewaysOperations: + """NatGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + nat_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + nat_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified nat gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + nat_gateway_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NatGateway": + """Gets the specified nat gateway in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NatGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NatGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: "_models.NatGateway", + **kwargs: Any + ) -> Optional["_models.NatGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NatGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NatGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NatGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: "_models.NatGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.NatGateway"]: + """Creates or updates a nat gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NatGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NatGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.NatGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + nat_gateway_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NatGateway": + """Updates nat gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NatGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NatGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NatGatewayListResult"]: + """Gets all the Nat Gateways in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NatGatewayListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NatGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NatGatewayListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways'} # type: ignore + + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NatGatewayListResult"]: + """Gets all nat gateways in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NatGatewayListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NatGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NatGatewayListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_subnets_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_nat_rules_operations.py similarity index 73% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_subnets_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_nat_rules_operations.py index 3cb3d2090cf0..02af3f0b0b59 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_subnets_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_nat_rules_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class SubnetsOperations: - """SubnetsOperations async operations. +class NatRulesOperations: + """NatRulesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,27 +43,92 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def get( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, + gateway_name: str, + nat_rule_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.VpnGatewayNatRule": + """Retrieves the details of a nat ruleGet. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnGatewayNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VpnGatewayNatRule", + **kwargs: Any + ) -> "_models.VpnGatewayNatRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -73,57 +138,74 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(nat_rule_parameters, 'VpnGatewayNatRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, + gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VpnGatewayNatRule", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified subnet. + ) -> AsyncLROPoller["_models.VpnGatewayNatRule"]: + """Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat + rules. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :param nat_rule_parameters: Parameters supplied to create or Update a Nat Rule. + :type nat_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either VpnGatewayNatRule or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + nat_rule_parameters=nat_rule_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -132,17 +214,20 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,99 +239,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore - async def get( + async def _delete_initial( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, - expand: Optional[str] = None, + gateway_name: str, + nat_rule_name: str, **kwargs: Any - ) -> "_models.Subnet": - """Gets the specified subnet by virtual network and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Subnet, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.Subnet - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Subnet', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - virtual_network_name: str, - subnet_name: str, - subnet_parameters: "_models.Subnet", - **kwargs: Any - ) -> "_models.Subnet": - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -256,73 +272,58 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(subnet_parameters, 'Subnet') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('Subnet', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, - subnet_parameters: "_models.Subnet", + gateway_name: str, + nat_rule_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.Subnet"]: - """Creates or updates a subnet in the specified virtual network. + ) -> AsyncLROPoller[None]: + """Deletes a nat rule. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param subnet_parameters: Parameters supplied to the create or update subnet operation. - :type subnet_parameters: ~azure.mgmt.network.v2017_09_01.models.Subnet + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either Subnet or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.Subnet] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, - subnet_parameters=subnet_parameters, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, cls=lambda x,y,z: x, **kwargs ) @@ -331,20 +332,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -356,32 +354,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore - def list( + def list_by_vpn_gateway( self, resource_group_name: str, - virtual_network_name: str, + gateway_name: str, **kwargs: Any - ) -> AsyncIterable["_models.SubnetListResult"]: - """Gets all subnets in a virtual network. + ) -> AsyncIterable["_models.ListVpnGatewayNatRulesResult"]: + """Retrieves all nat rules for a particular virtual wan vpn gateway. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SubnetListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.SubnetListResult] + :return: An iterator like instance of either ListVpnGatewayNatRulesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnGatewayNatRulesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewayNatRulesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -390,11 +388,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_vpn_gateway.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -409,7 +407,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('SubnetListResult', pipeline_response) + deserialized = self._deserialize('ListVpnGatewayNatRulesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -430,4 +428,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets'} # type: ignore + list_by_vpn_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_interface_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interface_ip_configurations_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_interface_ip_configurations_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interface_ip_configurations_operations.py index e057efda6b1c..56847a3d52b6 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_interface_ip_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interface_ip_configurations_operations.py @@ -26,7 +26,7 @@ class NetworkInterfaceIPConfigurationsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list( :type network_interface_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfigurationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] @@ -63,8 +63,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -132,7 +132,7 @@ async def get( :type ip_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] @@ -140,8 +140,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_interface_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interface_load_balancers_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_interface_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interface_load_balancers_operations.py index ae7ff7ad721e..33091abeee94 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_interface_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interface_load_balancers_operations.py @@ -26,7 +26,7 @@ class NetworkInterfaceLoadBalancersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,7 @@ def list( :type network_interface_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceLoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceLoadBalancerListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceLoadBalancerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceLoadBalancerListResult"] @@ -63,8 +63,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interface_tap_configurations_operations.py similarity index 72% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_security_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interface_tap_configurations_operations.py index 75c3529003a5..41a725dcac97 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interface_tap_configurations_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class SecurityRulesOperations: - """SecurityRulesOperations async operations. +class NetworkInterfaceTapConfigurationsOperations: + """NetworkInterfaceTapConfigurationsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,8 +46,8 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, + network_interface_name: str, + tap_configuration_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -55,14 +55,15 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -73,6 +74,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -85,23 +87,23 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, + network_interface_name: str, + tap_configuration_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified network security rule. + """Deletes the specified tap configuration from the NetworkInterface. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -122,8 +124,8 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,12 +139,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,42 +156,42 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore async def get( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, + network_interface_name: str, + tap_configuration_name: str, **kwargs: Any - ) -> "_models.SecurityRule": - """Get the specified network security rule. + ) -> "_models.NetworkInterfaceTapConfiguration": + """Get the specified tap configuration on a network interface. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.SecurityRule + :return: NetworkInterfaceTapConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -210,37 +212,37 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: "_models.SecurityRule", + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: "_models.NetworkInterfaceTapConfiguration", **kwargs: Any - ) -> "_models.SecurityRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + ) -> "_models.NetworkInterfaceTapConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +257,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(security_rule_parameters, 'SecurityRule') + body_content = self._serialize.body(tap_configuration_parameters, 'NetworkInterfaceTapConfiguration') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,48 +268,48 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: "_models.SecurityRule", + network_interface_name: str, + tap_configuration_name: str, + tap_configuration_parameters: "_models.NetworkInterfaceTapConfiguration", **kwargs: Any - ) -> AsyncLROPoller["_models.SecurityRule"]: - """Creates or updates a security rule in the specified network security group. + ) -> AsyncLROPoller["_models.NetworkInterfaceTapConfiguration"]: + """Creates or updates a Tap configuration in the specified NetworkInterface. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. - :type security_rule_parameters: ~azure.mgmt.network.v2017_09_01.models.SecurityRule + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. + :type tap_configuration_parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.SecurityRule] + :return: An instance of AsyncLROPoller that returns either NetworkInterfaceTapConfiguration or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -316,9 +318,9 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, - security_rule_parameters=security_rule_parameters, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + tap_configuration_parameters=tap_configuration_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -327,7 +329,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -335,12 +337,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -352,32 +354,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore def list( self, resource_group_name: str, - network_security_group_name: str, + network_interface_name: str, **kwargs: Any - ) -> AsyncIterable["_models.SecurityRuleListResult"]: - """Gets all security rules in a network security group. + ) -> AsyncIterable["_models.NetworkInterfaceTapConfigurationListResult"]: + """Get all Tap configurations in a network interface. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.SecurityRuleListResult] + :return: An iterator like instance of either NetworkInterfaceTapConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -389,7 +391,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -405,7 +407,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityRuleListResult', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfigurationListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -426,4 +428,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interfaces_operations.py similarity index 81% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interfaces_operations.py index 52a153de0ca7..44e3302ddbc9 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_interfaces_operations.py @@ -28,7 +28,7 @@ class NetworkInterfacesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,6 +43,229 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + def list_cloud_service_role_instance_network_interfaces( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: + """Gets information about all network interfaces in a role instance in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_cloud_service_role_instance_network_interfaces.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_cloud_service_role_instance_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces'} # type: ignore + + def list_cloud_service_network_interfaces( + self, + resource_group_name: str, + cloud_service_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: + """Gets all network interfaces in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_cloud_service_network_interfaces.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_cloud_service_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces'} # type: ignore + + async def get_cloud_service_network_interface( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkInterface": + """Get the specified network interface in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_cloud_service_network_interface.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_cloud_service_network_interface.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}'} # type: ignore + async def _delete_initial( self, resource_group_name: str, @@ -54,7 +277,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -71,6 +295,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -135,7 +360,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -166,7 +391,7 @@ async def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkInterface + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] @@ -174,8 +399,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -224,9 +449,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -283,7 +508,7 @@ async def begin_create_or_update( :param network_interface_name: The name of the network interface. :type network_interface_name: str :param parameters: Parameters supplied to the create or update network interface operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.NetworkInterface + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -291,7 +516,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.NetworkInterface] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -326,7 +551,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -340,24 +565,37 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, network_interface_name: str, parameters: "_models.TagsObject", **kwargs: Any ) -> "_models.NetworkInterface": + """Updates a network interface tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param parameters: Parameters supplied to update network interface tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), @@ -391,78 +629,7 @@ async def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - network_interface_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.NetworkInterface"]: - """Updates a network interface tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param parameters: Parameters supplied to update network interface tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore def list_all( self, @@ -472,7 +639,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -480,8 +647,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -541,7 +708,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -549,8 +716,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -611,8 +778,8 @@ async def _get_effective_route_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_effective_route_table_initial.metadata['url'] # type: ignore @@ -668,7 +835,7 @@ async def begin_get_effective_route_table( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either EffectiveRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.EffectiveRouteListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.EffectiveRouteListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -702,7 +869,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -727,8 +894,8 @@ async def _list_effective_network_security_groups_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_effective_network_security_groups_initial.metadata['url'] # type: ignore @@ -784,7 +951,7 @@ async def begin_list_effective_network_security_groups( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either EffectiveNetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityGroupListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityGroupListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -818,7 +985,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -850,7 +1017,7 @@ def list_virtual_machine_scale_set_vm_network_interfaces( :type virtualmachine_index: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -858,8 +1025,8 @@ def list_virtual_machine_scale_set_vm_network_interfaces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -925,7 +1092,7 @@ def list_virtual_machine_scale_set_network_interfaces( :type virtual_machine_scale_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -933,8 +1100,8 @@ def list_virtual_machine_scale_set_network_interfaces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -1008,7 +1175,7 @@ async def get_virtual_machine_scale_set_network_interface( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkInterface + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] @@ -1016,8 +1183,8 @@ async def get_virtual_machine_scale_set_network_interface( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" # Construct URL url = self.get_virtual_machine_scale_set_network_interface.metadata['url'] # type: ignore @@ -1079,7 +1246,7 @@ def list_virtual_machine_scale_set_ip_configurations( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfigurationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] @@ -1087,8 +1254,8 @@ def list_virtual_machine_scale_set_ip_configurations( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -1169,7 +1336,7 @@ async def get_virtual_machine_scale_set_ip_configuration( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] @@ -1177,8 +1344,8 @@ async def get_virtual_machine_scale_set_ip_configuration( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" # Construct URL url = self.get_virtual_machine_scale_set_ip_configuration.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_management_client_operations.py similarity index 61% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_management_client_operations.py index 11faf037f414..fe77670ed8f6 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_management_client_operations.py @@ -21,46 +21,29 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NetworkInterfacesOperations: - """NetworkInterfacesOperations async operations. +class NetworkManagementClientOperationsMixin: - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def _delete_initial( + async def _put_bastion_shareable_link_initial( self, resource_group_name: str, - network_interface_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> Optional["_models.BastionShareableLinkListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionShareableLinkListResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._put_bastion_shareable_link_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,71 +54,150 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionShareableLinkListResult', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + return deserialized + _put_bastion_shareable_link_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks'} # type: ignore - async def begin_delete( + async def begin_put_bastion_shareable_link( self, resource_group_name: str, - network_interface_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified network interface. + ) -> AsyncLROPoller[AsyncItemPaged["_models.BastionShareableLinkListResult"]]: + """Creates a Bastion Shareable Links for all the VMs specified in the request. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns an iterator like instance of either BastionShareableLinkListResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]] :raises ~azure.core.exceptions.HttpResponseError: """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.put_bastion_shareable_link.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('BastionShareableLinkListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._put_bastion_shareable_link_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + bastion_host_name=bastion_host_name, + bsl_request=bsl_request, cls=lambda x,y,z: x, **kwargs ) kwargs.pop('error_map', None) kwargs.pop('content_type', None) - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return await get_next(next_link) + + return AsyncItemPaged( + internal_get_next, extract_data + ) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,92 +209,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - network_interface_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> "_models.NetworkInterface": - """Gets information about the specified network interface. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkInterface - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + begin_put_bastion_shareable_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks'} # type: ignore - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore - - async def _create_or_update_initial( + async def _delete_bastion_shareable_link_initial( self, resource_group_name: str, - network_interface_name: str, - parameters: "_models.NetworkInterface", + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", **kwargs: Any - ) -> "_models.NetworkInterface": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_bastion_shareable_link_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,65 +246,58 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkInterface') + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('NetworkInterface', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + _delete_bastion_shareable_link_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks'} # type: ignore - async def begin_create_or_update( + async def begin_delete_bastion_shareable_link( self, resource_group_name: str, - network_interface_name: str, - parameters: "_models.NetworkInterface", + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", **kwargs: Any - ) -> AsyncLROPoller["_models.NetworkInterface"]: - """Creates or updates a network interface. + ) -> AsyncLROPoller[None]: + """Deletes the Bastion Shareable Links for all the VMs specified in the request. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param parameters: Parameters supplied to the create or update network interface operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.NetworkInterface + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.NetworkInterface] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_bastion_shareable_link_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - parameters=parameters, + bastion_host_name=bastion_host_name, + bsl_request=bsl_request, cls=lambda x,y,z: x, **kwargs ) @@ -314,19 +306,16 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkInterface', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -338,106 +327,49 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore - - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets all network interfaces in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response + begin_delete_bastion_shareable_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks'} # type: ignore - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces'} # type: ignore - - def list( + def get_bastion_shareable_link( self, resource_group_name: str, + bastion_host_name: str, + bsl_request: "_models.BastionShareableLinkListRequest", **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets all network interfaces in a resource group. + ) -> AsyncIterable["_models.BastionShareableLinkListResult"]: + """Return the Bastion Shareable Links for all the VMs specified in the request. :param resource_group_name: The name of the resource group. :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = "application/json" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.get_bastion_shareable_link.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -445,15 +377,21 @@ def prepare_request(next_link=None): query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) else: url = next_link query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('BastionShareableLinkListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -474,27 +412,27 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces'} # type: ignore + get_bastion_shareable_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks'} # type: ignore - async def _get_effective_route_table_initial( + async def _get_active_sessions_initial( self, resource_group_name: str, - network_interface_name: str, + bastion_host_name: str, **kwargs: Any - ) -> Optional["_models.EffectiveRouteListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveRouteListResult"]] + ) -> Optional["_models.BastionActiveSessionListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionActiveSessionListResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._get_effective_route_table_initial.metadata['url'] # type: ignore + url = self._get_active_sessions_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -517,184 +455,122 @@ async def _get_effective_route_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + deserialized = self._deserialize('BastionActiveSessionListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_effective_route_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'} # type: ignore + _get_active_sessions_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions'} # type: ignore - async def begin_get_effective_route_table( + async def begin_get_active_sessions( self, resource_group_name: str, - network_interface_name: str, + bastion_host_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.EffectiveRouteListResult"]: - """Gets all route tables applied to a network interface. + ) -> AsyncLROPoller[AsyncItemPaged["_models.BastionActiveSessionListResult"]]: + """Returns the list of currently active sessions on the Bastion. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either EffectiveRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.EffectiveRouteListResult] + :return: An instance of AsyncLROPoller that returns an iterator like instance of either BastionActiveSessionListResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveRouteListResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._get_effective_route_table_initial( - resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_effective_route_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'} # type: ignore - - async def _list_effective_network_security_groups_initial( - self, - resource_group_name: str, - network_interface_name: str, - **kwargs: Any - ) -> Optional["_models.EffectiveNetworkSecurityGroupListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveNetworkSecurityGroupListResult"]] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionActiveSessionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self._list_effective_network_security_groups_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + api_version = "2021-05-01" + accept = "application/json" - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: + # Construct URL + url = self.get_active_sessions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def extract_data(pipeline_response): + deserialized = self._deserialize('BastionActiveSessionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + async def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, deserialized, {}) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - return deserialized - _list_effective_network_security_groups_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - async def begin_list_effective_network_security_groups( - self, - resource_group_name: str, - network_interface_name: str, - **kwargs: Any - ) -> AsyncLROPoller["_models.EffectiveNetworkSecurityGroupListResult"]: - """Gets all network security groups applied to a network interface. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either EffectiveNetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityGroupListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveNetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionActiveSessionListResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._list_effective_network_security_groups_initial( + raw_result = await self._get_active_sessions_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + bastion_host_name=bastion_host_name, cls=lambda x,y,z: x, **kwargs ) kwargs.pop('error_map', None) kwargs.pop('content_type', None) - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - + async def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return await get_next(next_link) + + return AsyncItemPaged( + internal_get_next, extract_data + ) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -706,49 +582,49 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_effective_network_security_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'} # type: ignore + begin_get_active_sessions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions'} # type: ignore - def list_virtual_machine_scale_set_vm_network_interfaces( + def disconnect_active_sessions( self, resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, + bastion_host_name: str, + session_ids: "_models.SessionIds", **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets information about all network interfaces in a virtual machine in a virtual machine scale - set. + ) -> AsyncIterable["_models.BastionSessionDeleteResult"]: + """Returns the list of currently active sessions on the Bastion. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param session_ids: The list of sessionids to disconnect. + :type session_ids: ~azure.mgmt.network.v2021_05_01.models.SessionIds :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionSessionDeleteResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = "application/json" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_vm_network_interfaces.metadata['url'] # type: ignore + url = self.disconnect_active_sessions.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -756,15 +632,21 @@ def prepare_request(next_link=None): query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(session_ids, 'SessionIds') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) else: url = next_link query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(session_ids, 'SessionIds') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('BastionSessionDeleteResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -785,132 +667,105 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_vm_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces'} # type: ignore + disconnect_active_sessions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions'} # type: ignore - def list_virtual_machine_scale_set_network_interfaces( + async def check_dns_name_availability( self, - resource_group_name: str, - virtual_machine_scale_set_name: str, + location: str, + domain_name_label: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets all network interfaces in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str + ) -> "_models.DnsNameAvailabilityResult": + """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + + :param location: The location of the domain name. + :type location: str + :param domain_name_label: The domain name to be verified. It must conform to the following + regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + :type domain_name_label: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] + :return: DnsNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DnsNameAvailabilityResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = "2021-05-01" + accept = "application/json" - if not next_link: - # Construct URL - url = self.list_virtual_machine_scale_set_network_interfaces.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.check_dns_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return AsyncItemPaged( - get_next, extract_data - ) - list_virtual_machine_scale_set_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces'} # type: ignore + return deserialized + check_dns_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'} # type: ignore - async def get_virtual_machine_scale_set_network_interface( + async def supported_security_providers( self, resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, - network_interface_name: str, - expand: Optional[str] = None, + virtual_wan_name: str, **kwargs: Any - ) -> "_models.NetworkInterface": - """Get the specified network interface in a virtual machine scale set. + ) -> "_models.VirtualWanSecurityProviders": + """Gives the supported security providers for the virtual wan. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name. :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str + :param virtual_wan_name: The name of the VirtualWAN for which supported security providers are + needed. + :type virtual_wan_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkInterface + :return: VirtualWanSecurityProviders, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProviders :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWanSecurityProviders"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self.get_virtual_machine_scale_set_network_interface.metadata['url'] # type: ignore + url = self.supported_security_providers.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -924,10 +779,139 @@ async def get_virtual_machine_scale_set_network_interface( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('VirtualWanSecurityProviders', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + supported_security_providers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders'} # type: ignore + + async def _generatevirtualwanvpnserverconfigurationvpnprofile_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + vpn_client_params: "_models.VirtualWanVpnProfileParameters", + **kwargs: Any + ) -> Optional["_models.VpnProfileResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnProfileResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._generatevirtualwanvpnserverconfigurationvpnprofile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_client_params, 'VirtualWanVpnProfileParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_virtual_machine_scale_set_network_interface.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}'} # type: ignore + _generatevirtualwanvpnserverconfigurationvpnprofile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile'} # type: ignore + + async def begin_generatevirtualwanvpnserverconfigurationvpnprofile( + self, + resource_group_name: str, + virtual_wan_name: str, + vpn_client_params: "_models.VirtualWanVpnProfileParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnProfileResponse"]: + """Generates a unique VPN profile for P2S clients for VirtualWan and associated + VpnServerConfiguration combination in the specified resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation + operation. + :type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnProfileResponse or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnProfileResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._generatevirtualwanvpnserverconfigurationvpnprofile_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + vpn_client_params=vpn_client_params, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_generatevirtualwanvpnserverconfigurationvpnprofile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_profiles_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_profiles_operations.py new file mode 100644 index 000000000000..1c1ab58c364b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_profiles_operations.py @@ -0,0 +1,487 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkProfilesOperations: + """NetworkProfilesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + network_profile_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + network_profile_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified network profile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the NetworkProfile. + :type network_profile_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_profile_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkProfile": + """Gets the specified network profile in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the public IP prefix. + :type network_profile_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + network_profile_name: str, + parameters: "_models.NetworkProfile", + **kwargs: Any + ) -> "_models.NetworkProfile": + """Creates or updates a network profile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkProfile') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + network_profile_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkProfile": + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkProfileListResult"]: + """Gets all the network profiles in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkProfileListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkProfileListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkProfileListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles'} # type: ignore + + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkProfileListResult"]: + """Gets all network profiles in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkProfileListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkProfileListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkProfileListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_security_groups_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_security_groups_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_security_groups_operations.py index efe929c71293..51cbe5a0b889 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_security_groups_operations.py @@ -28,7 +28,7 @@ class NetworkSecurityGroupsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -135,7 +137,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -166,7 +168,7 @@ async def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] @@ -174,8 +176,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -224,9 +226,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -284,7 +286,7 @@ async def begin_create_or_update( :type network_security_group_name: str :param parameters: Parameters supplied to the create or update network security group operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -292,7 +294,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -327,7 +329,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -341,24 +343,37 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, network_security_group_name: str, parameters: "_models.TagsObject", **kwargs: Any ) -> "_models.NetworkSecurityGroup": + """Updates a network security group tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), @@ -392,78 +407,7 @@ async def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - network_security_group_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.NetworkSecurityGroup"]: - """Updates a network security group tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore def list_all( self, @@ -473,7 +417,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroupListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] @@ -481,8 +425,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -542,7 +486,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkSecurityGroupListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] @@ -550,8 +494,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_virtual_appliances_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_virtual_appliances_operations.py new file mode 100644 index 000000000000..bdb4720b582a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_virtual_appliances_operations.py @@ -0,0 +1,545 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class NetworkVirtualAppliancesOperations: + """NetworkVirtualAppliancesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.NetworkVirtualAppliance": + """Gets the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualAppliance, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.NetworkVirtualAppliance": + """Updates a Network Virtual Appliance. + + :param resource_group_name: The resource group name of Network Virtual Appliance. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance being updated. + :type network_virtual_appliance_name: str + :param parameters: Parameters supplied to Update Network Virtual Appliance Tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualAppliance, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + parameters: "_models.NetworkVirtualAppliance", + **kwargs: Any + ) -> "_models.NetworkVirtualAppliance": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkVirtualAppliance') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + network_virtual_appliance_name: str, + parameters: "_models.NetworkVirtualAppliance", + **kwargs: Any + ) -> AsyncLROPoller["_models.NetworkVirtualAppliance"]: + """Creates or updates the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NetworkVirtualAppliance or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkVirtualApplianceListResult"]: + """Lists all Network Virtual Appliances in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkVirtualApplianceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkVirtualApplianceListResult"]: + """Gets all Network Virtual Appliances in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkVirtualApplianceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_watchers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_watchers_operations.py similarity index 85% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_watchers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_watchers_operations.py index efd7dbe53f6a..f49831e11401 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_network_watchers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_network_watchers_operations.py @@ -28,7 +28,7 @@ class NetworkWatchersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,10 +57,10 @@ async def create_or_update( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the network watcher resource. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.NetworkWatcher + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkWatcher :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkWatcher + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkWatcher :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] @@ -68,9 +68,9 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore @@ -99,7 +99,8 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('NetworkWatcher', pipeline_response) @@ -127,7 +128,7 @@ async def get( :type network_watcher_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkWatcher + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkWatcher :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] @@ -135,8 +136,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -161,7 +162,8 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NetworkWatcher', pipeline_response) @@ -182,7 +184,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -199,6 +202,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -206,7 +210,8 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -263,7 +268,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -291,10 +296,10 @@ async def update_tags( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters supplied to update network watcher tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkWatcher + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkWatcher :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] @@ -302,9 +307,9 @@ async def update_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self.update_tags.metadata['url'] # type: ignore @@ -333,7 +338,8 @@ async def update_tags( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NetworkWatcher', pipeline_response) @@ -354,7 +360,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkWatcherListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkWatcherListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] @@ -362,8 +368,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -403,8 +409,9 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -421,7 +428,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkWatcherListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkWatcherListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] @@ -429,8 +436,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -469,8 +476,9 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -493,10 +501,10 @@ async def get_topology( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the representation of topology. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TopologyParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TopologyParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: Topology, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.Topology + :rtype: ~azure.mgmt.network.v2021_05_01.models.Topology :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Topology"] @@ -504,9 +512,9 @@ async def get_topology( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self.get_topology.metadata['url'] # type: ignore @@ -535,7 +543,8 @@ async def get_topology( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Topology', pipeline_response) @@ -557,9 +566,9 @@ async def _verify_ip_flow_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._verify_ip_flow_initial.metadata['url'] # type: ignore @@ -588,7 +597,8 @@ async def _verify_ip_flow_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) @@ -616,7 +626,7 @@ async def begin_verify_ip_flow( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the IP flow to be verified. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VerificationIPFlowParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VerificationIPFlowParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -624,7 +634,7 @@ async def begin_verify_ip_flow( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VerificationIPFlowResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.VerificationIPFlowResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VerificationIPFlowResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -659,7 +669,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -685,9 +695,9 @@ async def _get_next_hop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_next_hop_initial.metadata['url'] # type: ignore @@ -716,7 +726,8 @@ async def _get_next_hop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('NextHopResult', pipeline_response) @@ -744,7 +755,7 @@ async def begin_get_next_hop( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the source and destination endpoint. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.NextHopParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NextHopParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -752,7 +763,7 @@ async def begin_get_next_hop( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either NextHopResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.NextHopResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.NextHopResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -787,7 +798,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -813,9 +824,9 @@ async def _get_vm_security_rules_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_vm_security_rules_initial.metadata['url'] # type: ignore @@ -844,7 +855,8 @@ async def _get_vm_security_rules_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) @@ -872,7 +884,7 @@ async def begin_get_vm_security_rules( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the VM to check security groups for. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.SecurityGroupViewParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SecurityGroupViewParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -880,7 +892,7 @@ async def begin_get_vm_security_rules( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SecurityGroupViewResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.SecurityGroupViewResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.SecurityGroupViewResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -915,7 +927,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -941,9 +953,9 @@ async def _get_troubleshooting_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_troubleshooting_initial.metadata['url'] # type: ignore @@ -972,7 +984,8 @@ async def _get_troubleshooting_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('TroubleshootingResult', pipeline_response) @@ -1000,7 +1013,7 @@ async def begin_get_troubleshooting( :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that define the resource to troubleshoot. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TroubleshootingParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TroubleshootingParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -1008,7 +1021,7 @@ async def begin_get_troubleshooting( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.TroubleshootingResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.TroubleshootingResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1043,7 +1056,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -1069,9 +1082,9 @@ async def _get_troubleshooting_result_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_troubleshooting_result_initial.metadata['url'] # type: ignore @@ -1100,7 +1113,8 @@ async def _get_troubleshooting_result_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('TroubleshootingResult', pipeline_response) @@ -1128,7 +1142,7 @@ async def begin_get_troubleshooting_result( :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that define the resource to query the troubleshooting result. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.QueryTroubleshootingParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.QueryTroubleshootingParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -1136,7 +1150,7 @@ async def begin_get_troubleshooting_result( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.TroubleshootingResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.TroubleshootingResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1171,7 +1185,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -1197,9 +1211,9 @@ async def _set_flow_log_configuration_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._set_flow_log_configuration_initial.metadata['url'] # type: ignore @@ -1228,7 +1242,8 @@ async def _set_flow_log_configuration_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('FlowLogInformation', pipeline_response) @@ -1249,14 +1264,14 @@ async def begin_set_flow_log_configuration( parameters: "_models.FlowLogInformation", **kwargs: Any ) -> AsyncLROPoller["_models.FlowLogInformation"]: - """Configures flow log on a specified resource. + """Configures flow log and traffic analytics (optional) on a specified resource. :param resource_group_name: The name of the network watcher resource group. :type resource_group_name: str :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that define the configuration of flow log. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.FlowLogInformation + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FlowLogInformation :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -1264,7 +1279,7 @@ async def begin_set_flow_log_configuration( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.FlowLogInformation] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.FlowLogInformation] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1299,7 +1314,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -1325,9 +1340,9 @@ async def _get_flow_log_status_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_flow_log_status_initial.metadata['url'] # type: ignore @@ -1356,7 +1371,8 @@ async def _get_flow_log_status_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('FlowLogInformation', pipeline_response) @@ -1377,14 +1393,15 @@ async def begin_get_flow_log_status( parameters: "_models.FlowLogStatusParameters", **kwargs: Any ) -> AsyncLROPoller["_models.FlowLogInformation"]: - """Queries status of flow log on a specified resource. + """Queries status of flow log and traffic analytics (optional) on a specified resource. :param resource_group_name: The name of the network watcher resource group. :type resource_group_name: str :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str - :param parameters: Parameters that define a resource to query flow log status. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.FlowLogStatusParameters + :param parameters: Parameters that define a resource to query flow log and traffic analytics + (optional) status. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FlowLogStatusParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -1392,7 +1409,7 @@ async def begin_get_flow_log_status( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.FlowLogInformation] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.FlowLogInformation] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1427,7 +1444,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -1453,9 +1470,9 @@ async def _check_connectivity_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._check_connectivity_initial.metadata['url'] # type: ignore @@ -1484,7 +1501,8 @@ async def _check_connectivity_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('ConnectivityInformation', pipeline_response) @@ -1513,7 +1531,7 @@ async def begin_check_connectivity( :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that determine how the connectivity check will be performed. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ConnectivityParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ConnectivityParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -1521,7 +1539,7 @@ async def begin_check_connectivity( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ConnectivityInformation or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.ConnectivityInformation] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectivityInformation] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1556,7 +1574,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -1582,9 +1600,9 @@ async def _get_azure_reachability_report_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_azure_reachability_report_initial.metadata['url'] # type: ignore @@ -1613,7 +1631,8 @@ async def _get_azure_reachability_report_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) @@ -1634,15 +1653,16 @@ async def begin_get_azure_reachability_report( parameters: "_models.AzureReachabilityReportParameters", **kwargs: Any ) -> AsyncLROPoller["_models.AzureReachabilityReport"]: - """Gets the relative latency score for internet service providers from a specified location to - Azure regions. + """NOTE: This feature is currently in preview and still being tested for stability. Gets the + relative latency score for internet service providers from a specified location to Azure + regions. :param resource_group_name: The name of the network watcher resource group. :type resource_group_name: str :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that determine Azure reachability report configuration. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -1650,7 +1670,7 @@ async def begin_get_azure_reachability_report( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AzureReachabilityReport or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReport] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReport] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1685,7 +1705,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -1711,9 +1731,9 @@ async def _list_available_providers_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._list_available_providers_initial.metadata['url'] # type: ignore @@ -1742,7 +1762,8 @@ async def _list_available_providers_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('AvailableProvidersList', pipeline_response) @@ -1763,14 +1784,15 @@ async def begin_list_available_providers( parameters: "_models.AvailableProvidersListParameters", **kwargs: Any ) -> AsyncLROPoller["_models.AvailableProvidersList"]: - """Lists all available internet service providers for a specified Azure region. + """NOTE: This feature is currently in preview and still being tested for stability. Lists all + available internet service providers for a specified Azure region. :param resource_group_name: The name of the network watcher resource group. :type resource_group_name: str :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that scope the list of available providers. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.AvailableProvidersListParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.AvailableProvidersListParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -1778,7 +1800,7 @@ async def begin_list_available_providers( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AvailableProvidersList or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.AvailableProvidersList] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.AvailableProvidersList] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1813,7 +1835,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -1826,3 +1848,136 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_list_available_providers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList'} # type: ignore + + async def _get_network_configuration_diagnostic_initial( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NetworkConfigurationDiagnosticParameters", + **kwargs: Any + ) -> "_models.NetworkConfigurationDiagnosticResponse": + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkConfigurationDiagnosticResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._get_network_configuration_diagnostic_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkConfigurationDiagnosticParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_network_configuration_diagnostic_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic'} # type: ignore + + async def begin_get_network_configuration_diagnostic( + self, + resource_group_name: str, + network_watcher_name: str, + parameters: "_models.NetworkConfigurationDiagnosticParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.NetworkConfigurationDiagnosticResponse"]: + """Gets Network Configuration Diagnostic data to help customers understand and debug network + behavior. It provides detailed information on what security rules were applied to a specified + traffic flow and the result of evaluating these rules. Customers must provide details of a flow + like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, + the rules evaluated for the specified flow and the evaluation results. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters to get network configuration diagnostic. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either NetworkConfigurationDiagnosticResponse or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkConfigurationDiagnosticResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_network_configuration_diagnostic_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_network_configuration_diagnostic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_operations.py index 33b935cac78c..ae1ccdcb9b3c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_operations.py @@ -26,7 +26,7 @@ class Operations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -49,7 +49,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.OperationListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_p2_svpn_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_p2_svpn_gateways_operations.py new file mode 100644 index 000000000000..f859035e6db4 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_p2_svpn_gateways_operations.py @@ -0,0 +1,1208 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class P2SVpnGatewaysOperations: + """P2SVpnGatewaysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> "_models.P2SVpnGateway": + """Retrieves the details of a virtual wan p2s vpn gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: P2SVpnGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.P2SVpnGateway", + **kwargs: Any + ) -> "_models.P2SVpnGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(p2_s_vpn_gateway_parameters, 'P2SVpnGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.P2SVpnGateway", + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnGateway"]: + """Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param p2_s_vpn_gateway_parameters: Parameters supplied to create or Update a virtual wan p2s + vpn gateway. + :type p2_s_vpn_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + p2_s_vpn_gateway_parameters=p2_s_vpn_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + async def _update_tags_initial( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> Optional["_models.P2SVpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(p2_s_vpn_gateway_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + gateway_name: str, + p2_s_vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnGateway"]: + """Updates virtual wan p2s vpn gateway tags. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param p2_s_vpn_gateway_parameters: Parameters supplied to update a virtual wan p2s vpn gateway + tags. + :type p2_s_vpn_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + p2_s_vpn_gateway_parameters=p2_s_vpn_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a virtual wan p2s vpn gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListP2SVpnGatewaysResult"]: + """Lists all the P2SVpnGateways in a resource group. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListP2SVpnGatewaysResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListP2SVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListP2SVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListP2SVpnGatewaysResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListP2SVpnGatewaysResult"]: + """Lists all the P2SVpnGateways in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListP2SVpnGatewaysResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListP2SVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListP2SVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListP2SVpnGatewaysResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways'} # type: ignore + + async def _reset_initial( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Optional["_models.P2SVpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._reset_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _reset_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset'} # type: ignore + + async def begin_reset( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnGateway"]: + """Resets the primary of the p2s vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset'} # type: ignore + + async def _generate_vpn_profile_initial( + self, + resource_group_name: str, + gateway_name: str, + parameters: "_models.P2SVpnProfileParameters", + **kwargs: Any + ) -> Optional["_models.VpnProfileResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnProfileResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._generate_vpn_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'P2SVpnProfileParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _generate_vpn_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile'} # type: ignore + + async def begin_generate_vpn_profile( + self, + resource_group_name: str, + gateway_name: str, + parameters: "_models.P2SVpnProfileParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnProfileResponse"]: + """Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :param parameters: Parameters supplied to the generate P2SVpnGateway VPN client package + operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.P2SVpnProfileParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnProfileResponse or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnProfileResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._generate_vpn_profile_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_generate_vpn_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile'} # type: ignore + + async def _get_p2_s_vpn_connection_health_initial( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> Optional["_models.P2SVpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._get_p2_s_vpn_connection_health_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_p2_s_vpn_connection_health_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth'} # type: ignore + + async def begin_get_p2_s_vpn_connection_health( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnGateway"]: + """Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_p2_s_vpn_connection_health_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_p2_s_vpn_connection_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth'} # type: ignore + + async def _get_p2_s_vpn_connection_health_detailed_initial( + self, + resource_group_name: str, + gateway_name: str, + request: "_models.P2SVpnConnectionHealthRequest", + **kwargs: Any + ) -> Optional["_models.P2SVpnConnectionHealth"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnConnectionHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._get_p2_s_vpn_connection_health_detailed_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'P2SVpnConnectionHealthRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnConnectionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_p2_s_vpn_connection_health_detailed_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed'} # type: ignore + + async def begin_get_p2_s_vpn_connection_health_detailed( + self, + resource_group_name: str, + gateway_name: str, + request: "_models.P2SVpnConnectionHealthRequest", + **kwargs: Any + ) -> AsyncLROPoller["_models.P2SVpnConnectionHealth"]: + """Gets the sas url to get the connection health detail of P2S clients of the virtual wan + P2SVpnGateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :param request: Request parameters supplied to get p2s vpn connections detailed health. + :type request: ~azure.mgmt.network.v2021_05_01.models.P2SVpnConnectionHealthRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either P2SVpnConnectionHealth or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnConnectionHealth] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnConnectionHealth"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_p2_s_vpn_connection_health_detailed_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnConnectionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_p2_s_vpn_connection_health_detailed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed'} # type: ignore + + async def _disconnect_p2_s_vpn_connections_initial( + self, + resource_group_name: str, + p2_s_vpn_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._disconnect_p2_s_vpn_connections_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'p2sVpnGatewayName': self._serialize.url("p2_s_vpn_gateway_name", p2_s_vpn_gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'P2SVpnConnectionRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disconnect_p2_s_vpn_connections_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections'} # type: ignore + + async def begin_disconnect_p2_s_vpn_connections( + self, + resource_group_name: str, + p2_s_vpn_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param p2_s_vpn_gateway_name: The name of the P2S Vpn Gateway. + :type p2_s_vpn_gateway_name: str + :param request: The parameters are supplied to disconnect p2s vpn connections. + :type request: ~azure.mgmt.network.v2021_05_01.models.P2SVpnConnectionRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._disconnect_p2_s_vpn_connections_initial( + resource_group_name=resource_group_name, + p2_s_vpn_gateway_name=p2_s_vpn_gateway_name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'p2sVpnGatewayName': self._serialize.url("p2_s_vpn_gateway_name", p2_s_vpn_gateway_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_disconnect_p2_s_vpn_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_packet_captures_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_packet_captures_operations.py similarity index 93% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_packet_captures_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_packet_captures_operations.py index d2ff3c5909eb..f9e0b2c9d375 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_packet_captures_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_packet_captures_operations.py @@ -28,7 +28,7 @@ class PacketCapturesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -56,9 +56,9 @@ async def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore @@ -88,7 +88,8 @@ async def _create_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PacketCaptureResult', pipeline_response) @@ -115,7 +116,7 @@ async def begin_create( :param packet_capture_name: The name of the packet capture session. :type packet_capture_name: str :param parameters: Parameters that define the create packet capture operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.PacketCapture + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PacketCapture :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -123,7 +124,7 @@ async def begin_create( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PacketCaptureResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.PacketCaptureResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PacketCaptureResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -160,7 +161,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -191,7 +192,7 @@ async def get( :type packet_capture_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PacketCaptureResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] @@ -199,8 +200,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -226,7 +227,8 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PacketCaptureResult', pipeline_response) @@ -248,7 +250,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -266,6 +269,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -273,7 +277,8 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -335,7 +340,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -361,7 +366,8 @@ async def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._stop_initial.metadata['url'] # type: ignore @@ -379,6 +385,7 @@ async def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -386,7 +393,8 @@ async def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -448,7 +456,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -474,8 +482,8 @@ async def _get_status_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_status_initial.metadata['url'] # type: ignore @@ -501,7 +509,8 @@ async def _get_status_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) @@ -537,7 +546,7 @@ async def begin_get_status( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PacketCaptureQueryStatusResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.PacketCaptureQueryStatusResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PacketCaptureQueryStatusResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -601,7 +610,7 @@ def list( :type network_watcher_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PacketCaptureListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.PacketCaptureListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PacketCaptureListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureListResult"] @@ -609,8 +618,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -651,8 +660,9 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_load_balancing_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_peer_express_route_circuit_connections_operations.py similarity index 70% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_load_balancing_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_peer_express_route_circuit_connections_operations.py index b3a51d519278..58f528a422fb 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_load_balancing_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_peer_express_route_circuit_connections_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerLoadBalancingRulesOperations: - """LoadBalancerLoadBalancingRulesOperations async operations. +class PeerExpressRouteCircuitConnectionsOperations: + """PeerExpressRouteCircuitConnectionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -41,30 +41,101 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + async def get( + self, + resource_group_name: str, + circuit_name: str, + peering_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.PeerExpressRouteCircuitConnection": + """Gets the specified Peer Express Route Circuit Connection from the specified express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the peer express route circuit connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PeerExpressRouteCircuitConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PeerExpressRouteCircuitConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerExpressRouteCircuitConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PeerExpressRouteCircuitConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}'} # type: ignore + def list( self, resource_group_name: str, - load_balancer_name: str, + circuit_name: str, + peering_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerLoadBalancingRuleListResult"]: - """Gets all the load balancing rules in a load balancer. + ) -> AsyncIterable["_models.PeerExpressRouteCircuitConnectionListResult"]: + """Gets all global reach peer connections associated with a private peering in an express route + circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerLoadBalancingRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerLoadBalancingRuleListResult] + :return: An iterator like instance of either PeerExpressRouteCircuitConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PeerExpressRouteCircuitConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerLoadBalancingRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerExpressRouteCircuitConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -76,7 +147,8 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -92,7 +164,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerLoadBalancingRuleListResult', pipeline_response) + deserialized = self._deserialize('PeerExpressRouteCircuitConnectionListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,66 +185,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules'} # type: ignore - - async def get( - self, - resource_group_name: str, - load_balancer_name: str, - load_balancing_rule_name: str, - **kwargs: Any - ) -> "_models.LoadBalancingRule": - """Gets the specified load balancer load balancing rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param load_balancing_rule_name: The name of the load balancing rule. - :type load_balancing_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancingRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.LoadBalancingRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancingRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'loadBalancingRuleName': self._serialize.url("load_balancing_rule_name", load_balancing_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('LoadBalancingRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_dns_zone_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_dns_zone_groups_operations.py new file mode 100644 index 000000000000..19ff62abd500 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_dns_zone_groups_operations.py @@ -0,0 +1,432 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateDnsZoneGroupsOperations: + """PrivateDnsZoneGroupsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private dns zone group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + **kwargs: Any + ) -> "_models.PrivateDnsZoneGroup": + """Gets the private dns zone group resource by specified private dns zone group name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateDnsZoneGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + parameters: "_models.PrivateDnsZoneGroup", + **kwargs: Any + ) -> "_models.PrivateDnsZoneGroup": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateDnsZoneGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + private_endpoint_name: str, + private_dns_zone_group_name: str, + parameters: "_models.PrivateDnsZoneGroup", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateDnsZoneGroup"]: + """Creates or updates a private dns zone group in the specified private endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :param parameters: Parameters supplied to the create or update private dns zone group + operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateDnsZoneGroup or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + def list( + self, + private_endpoint_name: str, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateDnsZoneGroupListResult"]: + """Gets all private dns zone groups in a private endpoint. + + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateDnsZoneGroupListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateDnsZoneGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_endpoints_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_endpoints_operations.py new file mode 100644 index 000000000000..419f5fb74ac5 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_endpoints_operations.py @@ -0,0 +1,484 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointsOperations: + """PrivateEndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + private_endpoint_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + private_endpoint_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified private endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + private_endpoint_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PrivateEndpoint": + """Gets the specified private endpoint by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpoint, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + private_endpoint_name: str, + parameters: "_models.PrivateEndpoint", + **kwargs: Any + ) -> "_models.PrivateEndpoint": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpoint') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + private_endpoint_name: str, + parameters: "_models.PrivateEndpoint", + **kwargs: Any + ) -> AsyncLROPoller["_models.PrivateEndpoint"]: + """Creates or updates an private endpoint in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param parameters: Parameters supplied to the create or update private endpoint operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PrivateEndpoint or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointListResult"]: + """Gets all private endpoints in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateEndpointListResult"]: + """Gets all private endpoints in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_link_services_operations.py similarity index 66% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_link_services_operations.py index 9d05b5ec5e0f..f36a21872269 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_private_link_services_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NetworkInterfacesOperations: - """NetworkInterfacesOperations async operations. +class PrivateLinkServicesOperations: + """PrivateLinkServicesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - network_interface_name: str, + service_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,13 +54,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -78,25 +80,26 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - network_interface_name: str, + service_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified network interface. + """Deletes the specified private link service. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param service_name: The name of the private link service. + :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +120,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + service_name=service_name, cls=lambda x,y,z: x, **kwargs ) @@ -131,11 +134,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,41 +150,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore async def get( self, resource_group_name: str, - network_interface_name: str, + service_name: str, expand: Optional[str] = None, **kwargs: Any - ) -> "_models.NetworkInterface": - """Gets information about the specified network interface. + ) -> "_models.PrivateLinkService": + """Gets the specified private link service by resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param service_name: The name of the private link service. + :type service_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkInterface + :return: PrivateLinkService, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateLinkService :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -202,37 +205,38 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateLinkService', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - network_interface_name: str, - parameters: "_models.NetworkInterface", + service_name: str, + parameters: "_models.PrivateLinkService", **kwargs: Any - ) -> "_models.NetworkInterface": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + ) -> "_models.PrivateLinkService": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +251,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkInterface') + body_content = self._serialize.body(parameters, 'PrivateLinkService') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -255,47 +259,48 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateLinkService', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateLinkService', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - network_interface_name: str, - parameters: "_models.NetworkInterface", + service_name: str, + parameters: "_models.PrivateLinkService", **kwargs: Any - ) -> AsyncLROPoller["_models.NetworkInterface"]: - """Creates or updates a network interface. + ) -> AsyncLROPoller["_models.PrivateLinkService"]: + """Creates or updates an private link service in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param parameters: Parameters supplied to the create or update network interface operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.NetworkInterface + :param service_name: The name of the private link service. + :type service_name: str + :param parameters: Parameters supplied to the create or update private link service operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PrivateLinkService :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.NetworkInterface] + :return: An instance of AsyncLROPoller that returns either PrivateLinkService or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateLinkService] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -304,7 +309,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + service_name=service_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -314,7 +319,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateLinkService', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -322,11 +327,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -338,29 +343,253 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore + + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkServiceListResult"]: + """Gets all private link services in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkServiceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateLinkServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.PrivateLinkServiceListResult"]: + """Gets all private link service in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkServiceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateLinkServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response - async def _update_tags_initial( + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices'} # type: ignore + + async def get_private_endpoint_connection( self, resource_group_name: str, - network_interface_name: str, - parameters: "_models.TagsObject", + service_name: str, + pe_connection_name: str, + expand: Optional[str] = None, **kwargs: Any - ) -> "_models.NetworkInterface": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + ) -> "_models.PrivateEndpointConnection": + """Get the specific private end point connection by specific private link service in the resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'peConnectionName': self._serialize.url("pe_connection_name", pe_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} # type: ignore + + async def update_private_endpoint_connection( + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Approve or reject private end point connection for a private link service in a subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :param parameters: Parameters supplied to approve or reject the private end point connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_private_endpoint_connection.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'peConnectionName': self._serialize.url("pe_connection_name", pe_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -375,61 +604,109 @@ async def _update_tags_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + update_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} # type: ignore - async def begin_update_tags( + async def _delete_private_endpoint_connection_initial( self, resource_group_name: str, - network_interface_name: str, - parameters: "_models.TagsObject", + service_name: str, + pe_connection_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.NetworkInterface"]: - """Updates a network interface tags. + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'peConnectionName': self._serialize.url("pe_connection_name", pe_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} # type: ignore + + async def begin_delete_private_endpoint_connection( + self, + resource_group_name: str, + service_name: str, + pe_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete private end point connection for a private link service in a subscription. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param parameters: Parameters supplied to update network interface tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.NetworkInterface] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_tags_initial( + raw_result = await self._delete_private_endpoint_connection_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - parameters=parameters, + service_name=service_name, + pe_connection_name=pe_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -438,19 +715,17 @@ async def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkInterface', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'peConnectionName': self._serialize.url("pe_connection_name", pe_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -462,95 +737,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} # type: ignore - def list_all( - self, - **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets all network interfaces in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces'} # type: ignore - - def list( + def list_private_endpoint_connections( self, resource_group_name: str, + service_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets all network interfaces in a resource group. + ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: + """Gets all private end point connections for a specific private link service. :param resource_group_name: The name of the resource group. :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -559,9 +771,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_private_endpoint_connections.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -577,7 +790,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -590,35 +803,36 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces'} # type: ignore + list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections'} # type: ignore - async def _get_effective_route_table_initial( + async def _check_private_link_service_visibility_initial( self, - resource_group_name: str, - network_interface_name: str, + location: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", **kwargs: Any - ) -> Optional["_models.EffectiveRouteListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveRouteListResult"]] + ) -> Optional["_models.PrivateLinkServiceVisibility"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateLinkServiceVisibility"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_effective_route_table_initial.metadata['url'] # type: ignore + url = self._check_private_link_service_visibility_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -629,9 +843,13 @@ async def _get_effective_route_table_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckPrivateLinkServiceVisibilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -641,47 +859,47 @@ async def _get_effective_route_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_effective_route_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'} # type: ignore + _check_private_link_service_visibility_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} # type: ignore - async def begin_get_effective_route_table( + async def begin_check_private_link_service_visibility( self, - resource_group_name: str, - network_interface_name: str, + location: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", **kwargs: Any - ) -> AsyncLROPoller["_models.EffectiveRouteListResult"]: - """Gets all route tables applied to a network interface. + ) -> AsyncLROPoller["_models.PrivateLinkServiceVisibility"]: + """Checks whether the subscription is visible to private link service. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param location: The location of the domain name. + :type location: str + :param parameters: The request body of CheckPrivateLinkService API call. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.CheckPrivateLinkServiceVisibilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either EffectiveRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.EffectiveRouteListResult] + :return: An instance of AsyncLROPoller that returns either PrivateLinkServiceVisibility or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceVisibility] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveRouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceVisibility"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_effective_route_table_initial( - resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + raw_result = await self._check_private_link_service_visibility_initial( + location=location, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -690,19 +908,18 @@ async def begin_get_effective_route_table( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -714,27 +931,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_effective_route_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'} # type: ignore + begin_check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} # type: ignore - async def _list_effective_network_security_groups_initial( + async def _check_private_link_service_visibility_by_resource_group_initial( self, + location: str, resource_group_name: str, - network_interface_name: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", **kwargs: Any - ) -> Optional["_models.EffectiveNetworkSecurityGroupListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveNetworkSecurityGroupListResult"]] + ) -> Optional["_models.PrivateLinkServiceVisibility"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateLinkServiceVisibility"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._list_effective_network_security_groups_initial.metadata['url'] # type: ignore + url = self._check_private_link_service_visibility_by_resource_group_initial.metadata['url'] # type: ignore path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -745,9 +964,13 @@ async def _list_effective_network_security_groups_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckPrivateLinkServiceVisibilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -757,47 +980,52 @@ async def _list_effective_network_security_groups_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_effective_network_security_groups_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'} # type: ignore + _check_private_link_service_visibility_by_resource_group_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} # type: ignore - async def begin_list_effective_network_security_groups( + async def begin_check_private_link_service_visibility_by_resource_group( self, + location: str, resource_group_name: str, - network_interface_name: str, + parameters: "_models.CheckPrivateLinkServiceVisibilityRequest", **kwargs: Any - ) -> AsyncLROPoller["_models.EffectiveNetworkSecurityGroupListResult"]: - """Gets all network security groups applied to a network interface. + ) -> AsyncLROPoller["_models.PrivateLinkServiceVisibility"]: + """Checks whether the subscription is visible to private link service in the specified resource + group. + :param location: The location of the domain name. + :type location: str :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param parameters: The request body of CheckPrivateLinkService API call. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.CheckPrivateLinkServiceVisibilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either EffectiveNetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityGroupListResult] + :return: An instance of AsyncLROPoller that returns either PrivateLinkServiceVisibility or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceVisibility] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveNetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceVisibility"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._list_effective_network_security_groups_initial( + raw_result = await self._check_private_link_service_visibility_by_resource_group_initial( + location=location, resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -806,19 +1034,19 @@ async def begin_list_effective_network_security_groups( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -830,36 +1058,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_effective_network_security_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'} # type: ignore + begin_check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} # type: ignore - def list_virtual_machine_scale_set_vm_network_interfaces( + def list_auto_approved_private_link_services( self, - resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, + location: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets information about all network interfaces in a virtual machine in a virtual machine scale - set. + ) -> AsyncIterable["_models.AutoApprovedPrivateLinkServicesResult"]: + """Returns all of the private link service ids that can be linked to a Private Endpoint with auto + approved in this subscription in this region. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str + :param location: The location of the domain name. + :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either AutoApprovedPrivateLinkServicesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AutoApprovedPrivateLinkServicesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoApprovedPrivateLinkServicesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -868,11 +1090,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_vm_network_interfaces.metadata['url'] # type: ignore + url = self.list_auto_approved_private_link_services.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), + 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -888,7 +1108,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('AutoApprovedPrivateLinkServicesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -909,32 +1129,33 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_vm_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces'} # type: ignore + list_auto_approved_private_link_services.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices'} # type: ignore - def list_virtual_machine_scale_set_network_interfaces( + def list_auto_approved_private_link_services_by_resource_group( self, + location: str, resource_group_name: str, - virtual_machine_scale_set_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets all network interfaces in a virtual machine scale set. + ) -> AsyncIterable["_models.AutoApprovedPrivateLinkServicesResult"]: + """Returns all of the private link service ids that can be linked to a Private Endpoint with auto + approved in this subscription in this region. + :param location: The location of the domain name. + :type location: str :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either AutoApprovedPrivateLinkServicesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AutoApprovedPrivateLinkServicesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoApprovedPrivateLinkServicesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -943,10 +1164,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_network_interfaces.metadata['url'] # type: ignore + url = self.list_auto_approved_private_link_services_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -962,7 +1183,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('AutoApprovedPrivateLinkServicesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -983,237 +1204,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces'} # type: ignore - - async def get_virtual_machine_scale_set_network_interface( - self, - resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, - network_interface_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> "_models.NetworkInterface": - """Get the specified network interface in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkInterface - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - # Construct URL - url = self.get_virtual_machine_scale_set_network_interface.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_virtual_machine_scale_set_network_interface.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}'} # type: ignore - - def list_virtual_machine_scale_set_ip_configurations( - self, - resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, - network_interface_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceIPConfigurationListResult"]: - """Get the specified network interface ip configuration in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfigurationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_virtual_machine_scale_set_ip_configurations.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceIPConfigurationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_virtual_machine_scale_set_ip_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations'} # type: ignore - - async def get_virtual_machine_scale_set_ip_configuration( - self, - resource_group_name: str, - virtual_machine_scale_set_name: str, - virtualmachine_index: str, - network_interface_name: str, - ip_configuration_name: str, - expand: Optional[str] = None, - **kwargs: Any - ) -> "_models.NetworkInterfaceIPConfiguration": - """Get the specified network interface ip configuration in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the ip configuration. - :type ip_configuration_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - # Construct URL - url = self.get_virtual_machine_scale_set_ip_configuration.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_virtual_machine_scale_set_ip_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}'} # type: ignore + list_auto_approved_private_link_services_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_public_ip_addresses_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_public_ip_addresses_operations.py similarity index 73% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_public_ip_addresses_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_public_ip_addresses_operations.py index e2d5fd63c86a..3fa1c09405b6 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_public_ip_addresses_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_public_ip_addresses_operations.py @@ -28,7 +28,7 @@ class PublicIPAddressesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,6 +43,246 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + def list_cloud_service_public_ip_addresses( + self, + resource_group_name: str, + cloud_service_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses on a cloud service level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_cloud_service_public_ip_addresses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_cloud_service_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses'} # type: ignore + + def list_cloud_service_role_instance_public_ip_addresses( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + ip_configuration_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPAddressListResult"]: + """Gets information about all public IP addresses in a role instance IP configuration in a cloud + service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :param network_interface_name: The network interface name. + :type network_interface_name: str + :param ip_configuration_name: The IP configuration name. + :type ip_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_cloud_service_role_instance_public_ip_addresses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_cloud_service_role_instance_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses'} # type: ignore + + async def get_cloud_service_public_ip_address( + self, + resource_group_name: str, + cloud_service_name: str, + role_instance_name: str, + network_interface_name: str, + ip_configuration_name: str, + public_ip_address_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPAddress": + """Get the specified public IP address in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The role instance name. + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the IP configuration. + :type ip_configuration_name: str + :param public_ip_address_name: The name of the public IP Address. + :type public_ip_address_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_cloud_service_public_ip_address.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), + 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_cloud_service_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore + async def _delete_initial( self, resource_group_name: str, @@ -54,7 +294,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -71,6 +312,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -95,7 +337,7 @@ async def begin_delete( :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. + :param public_ip_address_name: The name of the public IP address. :type public_ip_address_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -135,7 +377,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -160,13 +402,13 @@ async def get( :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. + :param public_ip_address_name: The name of the public IP address. :type public_ip_address_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] @@ -174,8 +416,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -224,9 +466,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -283,7 +525,7 @@ async def begin_create_or_update( :param public_ip_address_name: The name of the public IP address. :type public_ip_address_name: str :param parameters: Parameters supplied to the create or update public IP address operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -291,7 +533,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.PublicIPAddress] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PublicIPAddress] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -326,7 +568,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -340,24 +582,37 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, public_ip_address_name: str, parameters: "_models.TagsObject", **kwargs: Any ) -> "_models.PublicIPAddress": + """Updates public IP address tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :param parameters: Parameters supplied to update public IP address tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), @@ -391,78 +646,7 @@ async def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - public_ip_address_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.PublicIPAddress"]: - """Updates public IP address tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param public_ip_address_name: The name of the public IP address. - :type public_ip_address_name: str - :param parameters: Parameters supplied to update public IP address tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.PublicIPAddress] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore def list_all( self, @@ -472,7 +656,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.PublicIPAddressListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] @@ -480,8 +664,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -541,7 +725,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.PublicIPAddressListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] @@ -549,8 +733,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -614,7 +798,7 @@ def list_virtual_machine_scale_set_public_ip_addresses( :type virtual_machine_scale_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.PublicIPAddressListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] @@ -622,8 +806,8 @@ def list_virtual_machine_scale_set_public_ip_addresses( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -698,7 +882,7 @@ def list_virtual_machine_scale_set_vm_public_ip_addresses( :type ip_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.PublicIPAddressListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] @@ -706,8 +890,8 @@ def list_virtual_machine_scale_set_vm_public_ip_addresses( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -790,7 +974,7 @@ async def get_virtual_machine_scale_set_public_ip_address( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] @@ -798,8 +982,8 @@ async def get_virtual_machine_scale_set_public_ip_address( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" # Construct URL url = self.get_virtual_machine_scale_set_public_ip_address.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_public_ip_prefixes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_public_ip_prefixes_operations.py new file mode 100644 index 000000000000..1e927eda0b3b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_public_ip_prefixes_operations.py @@ -0,0 +1,545 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PublicIPPrefixesOperations: + """PublicIPPrefixesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + public_ip_prefix_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + public_ip_prefix_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified public IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the PublicIpPrefix. + :type public_ip_prefix_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + public_ip_prefix_name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.PublicIPPrefix": + """Gets the specified public IP prefix in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + public_ip_prefix_name: str, + parameters: "_models.PublicIPPrefix", + **kwargs: Any + ) -> "_models.PublicIPPrefix": + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PublicIPPrefix') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + public_ip_prefix_name: str, + parameters: "_models.PublicIPPrefix", + **kwargs: Any + ) -> AsyncLROPoller["_models.PublicIPPrefix"]: + """Creates or updates a static or dynamic public IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param parameters: Parameters supplied to the create or update public IP prefix operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PublicIPPrefix or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + public_ip_prefix_name: str, + parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.PublicIPPrefix": + """Updates public IP prefix tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param parameters: Parameters supplied to update public IP prefix tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPPrefixListResult"]: + """Gets all the public IP prefixes in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPPrefixListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PublicIPPrefixListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes'} # type: ignore + + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.PublicIPPrefixListResult"]: + """Gets all public IP prefixes in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPPrefixListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PublicIPPrefixListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_resource_navigation_links_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_resource_navigation_links_operations.py new file mode 100644 index 000000000000..75aecbb33248 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_resource_navigation_links_operations.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResourceNavigationLinksOperations: + """ResourceNavigationLinksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> "_models.ResourceNavigationLinksListResult": + """Gets a list of resource navigation links for a subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceNavigationLinksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ResourceNavigationLinksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceNavigationLinksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceNavigationLinksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_local_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_route_filter_rules_operations.py similarity index 75% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_local_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_route_filter_rules_operations.py index 2f24f98481eb..2d2af2f7489c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_local_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_route_filter_rules_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LocalNetworkGatewaysOperations: - """LocalNetworkGatewaysOperations async operations. +class RouteFilterRulesOperations: + """RouteFilterRulesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,27 +43,27 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _create_or_update_initial( + async def _delete_initial( self, resource_group_name: str, - local_network_gateway_name: str, - parameters: "_models.LocalNetworkGateway", + route_filter_name: str, + rule_name: str, **kwargs: Any - ) -> "_models.LocalNetworkGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -74,69 +74,58 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LocalNetworkGateway') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, - local_network_gateway_name: str, - parameters: "_models.LocalNetworkGateway", + route_filter_name: str, + rule_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.LocalNetworkGateway"]: - """Creates or updates a local network gateway in the specified resource group. + ) -> AsyncLROPoller[None]: + """Deletes the specified rule from a route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :param parameters: Parameters supplied to the create or update local network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the rule. + :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, - parameters=parameters, + route_filter_name=route_filter_name, + rule_name=rule_name, cls=lambda x,y,z: x, **kwargs ) @@ -145,19 +134,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -169,38 +156,42 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore async def get( self, resource_group_name: str, - local_network_gateway_name: str, + route_filter_name: str, + rule_name: str, **kwargs: Any - ) -> "_models.LocalNetworkGateway": - """Gets the specified local network gateway in a resource group. + ) -> "_models.RouteFilterRule": + """Gets the specified rule from a route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the rule. + :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: LocalNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway + :return: RouteFilterRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteFilterRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -221,32 +212,37 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('RouteFilterRule', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - async def _delete_initial( + async def _create_or_update_initial( self, resource_group_name: str, - local_network_gateway_name: str, + route_filter_name: str, + rule_name: str, + route_filter_rule_parameters: "_models.RouteFilterRule", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.RouteFilterRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -257,53 +253,74 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, - local_network_gateway_name: str, + route_filter_name: str, + rule_name: str, + route_filter_rule_parameters: "_models.RouteFilterRule", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified local network gateway. + ) -> AsyncLROPoller["_models.RouteFilterRule"]: + """Creates or updates a route in the specified route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the route filter rule. + :type rule_name: str + :param route_filter_rule_parameters: Parameters supplied to the create or update route filter + rule operation. + :type route_filter_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.RouteFilterRule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either RouteFilterRule or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.RouteFilterRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, + route_filter_name=route_filter_name, + rule_name=rule_name, + route_filter_rule_parameters=route_filter_rule_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -312,16 +329,20 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RouteFilterRule', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -333,29 +354,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - def list( + def list_by_route_filter( self, resource_group_name: str, + route_filter_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LocalNetworkGatewayListResult"]: - """Gets all the local network gateways in a resource group. + ) -> AsyncIterable["_models.RouteFilterRuleListResult"]: + """Gets all RouteFilterRules in a route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LocalNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.LocalNetworkGatewayListResult] + :return: An iterator like instance of either RouteFilterRuleListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteFilterRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -364,9 +388,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_route_filter.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -382,7 +407,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LocalNetworkGatewayListResult', pipeline_response) + deserialized = self._deserialize('RouteFilterRuleListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -403,4 +428,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways'} # type: ignore + list_by_route_filter.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_filters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_route_filters_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_filters_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_route_filters_operations.py index 268136315aa6..2cf342a133d7 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_route_filters_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_route_filters_operations.py @@ -28,7 +28,7 @@ class RouteFiltersOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -135,7 +137,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -166,7 +168,7 @@ async def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RouteFilter, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.RouteFilter + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteFilter :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] @@ -174,7 +176,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -224,7 +226,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -284,7 +286,7 @@ async def begin_create_or_update( :type route_filter_name: str :param route_filter_parameters: Parameters supplied to the create or update route filter operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_08_01.models.RouteFilter + :type route_filter_parameters: ~azure.mgmt.network.v2021_05_01.models.RouteFilter :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -292,7 +294,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.RouteFilter] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.RouteFilter] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -327,7 +329,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -341,24 +343,37 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore - async def _update_initial( + async def update_tags( self, resource_group_name: str, route_filter_name: str, - route_filter_parameters: "_models.PatchRouteFilter", + parameters: "_models.TagsObject", **kwargs: Any ) -> "_models.RouteFilter": + """Updates tags of a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param parameters: Parameters supplied to update route filter tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteFilter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteFilter + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), @@ -376,7 +391,7 @@ async def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'PatchRouteFilter') + body_content = self._serialize.body(parameters, 'TagsObject') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -392,78 +407,7 @@ async def _update_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore - - async def begin_update( - self, - resource_group_name: str, - route_filter_name: str, - route_filter_parameters: "_models.PatchRouteFilter", - **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilter"]: - """Updates a route filter in a specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the update route filter operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_08_01.models.PatchRouteFilter - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.RouteFilter] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore def list_by_resource_group( self, @@ -476,7 +420,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteFilterListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteFilterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] @@ -484,7 +428,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -543,7 +487,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteFilterListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteFilterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] @@ -551,7 +495,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_tables_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_route_tables_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_tables_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_route_tables_operations.py index 5f8d4ec27d6b..2011affcb6b4 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_tables_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_route_tables_operations.py @@ -28,7 +28,7 @@ class RouteTablesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -135,7 +137,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -166,7 +168,7 @@ async def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RouteTable, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.RouteTable + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteTable :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] @@ -174,8 +176,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -224,9 +226,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -283,7 +285,7 @@ async def begin_create_or_update( :param route_table_name: The name of the route table. :type route_table_name: str :param parameters: Parameters supplied to the create or update route table operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.RouteTable + :type parameters: ~azure.mgmt.network.v2021_05_01.models.RouteTable :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -291,7 +293,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.RouteTable] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.RouteTable] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -326,7 +328,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -340,24 +342,37 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, route_table_name: str, parameters: "_models.TagsObject", **kwargs: Any ) -> "_models.RouteTable": + """Updates a route table tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param parameters: Parameters supplied to update route table tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteTable + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), @@ -391,78 +406,7 @@ async def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - route_table_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.RouteTable"]: - """Updates a route table tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param parameters: Parameters supplied to update route table tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.RouteTable] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - route_table_name=route_table_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteTable', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore def list( self, @@ -475,7 +419,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteTableListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteTableListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] @@ -483,8 +427,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -542,7 +486,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteTableListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteTableListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] @@ -550,8 +494,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_routes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_routes_operations.py similarity index 95% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_routes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_routes_operations.py index 8302468ed492..2ca75cc04e45 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_routes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_routes_operations.py @@ -28,7 +28,7 @@ class RoutesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -73,6 +74,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -142,7 +144,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -173,7 +175,7 @@ async def get( :type route_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Route, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.Route + :rtype: ~azure.mgmt.network.v2021_05_01.models.Route :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] @@ -181,8 +183,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -231,9 +233,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -294,7 +296,7 @@ async def begin_create_or_update( :param route_name: The name of the route. :type route_name: str :param route_parameters: Parameters supplied to the create or update route operation. - :type route_parameters: ~azure.mgmt.network.v2017_08_01.models.Route + :type route_parameters: ~azure.mgmt.network.v2021_05_01.models.Route :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -302,7 +304,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.Route] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.Route] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -339,7 +341,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -367,7 +369,7 @@ def list( :type route_table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteListResult"] @@ -375,8 +377,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_subnets_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_routing_intent_operations.py similarity index 73% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_subnets_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_routing_intent_operations.py index 6fb8895bac62..674abc102fa2 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_subnets_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_routing_intent_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class SubnetsOperations: - """SubnetsOperations async operations. +class RoutingIntentOperations: + """RoutingIntentOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,27 +43,30 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def _create_or_update_initial( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, + virtual_hub_name: str, + routing_intent_name: str, + routing_intent_parameters: "_models.RoutingIntent", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.RoutingIntent": + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -73,57 +76,73 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(routing_intent_parameters, 'RoutingIntent') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('RoutingIntent', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RoutingIntent', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, + virtual_hub_name: str, + routing_intent_name: str, + routing_intent_parameters: "_models.RoutingIntent", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified subnet. + ) -> AsyncLROPoller["_models.RoutingIntent"]: + """Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the RoutingIntent. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the per VirtualHub singleton Routing Intent resource. + :type routing_intent_name: str + :param routing_intent_parameters: Parameters supplied to create or update RoutingIntent. + :type routing_intent_parameters: ~azure.mgmt.network.v2021_05_01.models.RoutingIntent :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either RoutingIntent or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.RoutingIntent] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + routing_intent_parameters=routing_intent_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -132,17 +151,20 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RoutingIntent', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,54 +176,49 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore async def get( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, - expand: Optional[str] = None, + virtual_hub_name: str, + routing_intent_name: str, **kwargs: Any - ) -> "_models.Subnet": - """Gets the specified subnet by virtual network and resource group. + ) -> "_models.RoutingIntent": + """Retrieves the details of a RoutingIntent. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the RoutingIntent. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param expand: Expands referenced resources. - :type expand: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the RoutingIntent. + :type routing_intent_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Subnet, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.Subnet + :return: RoutingIntent, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.RoutingIntent :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -215,38 +232,36 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Subnet', pipeline_response) + deserialized = self._deserialize('RoutingIntent', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore - async def _create_or_update_initial( + async def _delete_initial( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, - subnet_parameters: "_models.Subnet", + virtual_hub_name: str, + routing_intent_name: str, **kwargs: Any - ) -> "_models.Subnet": - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -256,73 +271,58 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(subnet_parameters, 'Subnet') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('Subnet', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, - subnet_parameters: "_models.Subnet", + virtual_hub_name: str, + routing_intent_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.Subnet"]: - """Creates or updates a subnet in the specified virtual network. + ) -> AsyncLROPoller[None]: + """Deletes a RoutingIntent. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the RoutingIntent. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param subnet_parameters: Parameters supplied to the create or update subnet operation. - :type subnet_parameters: ~azure.mgmt.network.v2017_11_01.models.Subnet + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the RoutingIntent. + :type routing_intent_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either Subnet or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.Subnet] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, - subnet_parameters=subnet_parameters, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, cls=lambda x,y,z: x, **kwargs ) @@ -331,20 +331,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -356,32 +353,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore def list( self, resource_group_name: str, - virtual_network_name: str, + virtual_hub_name: str, **kwargs: Any - ) -> AsyncIterable["_models.SubnetListResult"]: - """Gets all subnets in a virtual network. + ) -> AsyncIterable["_models.ListRoutingIntentResult"]: + """Retrieves the details of all RoutingIntent child resources of the VirtualHub. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SubnetListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.SubnetListResult] + :return: An iterator like instance of either ListRoutingIntentResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListRoutingIntentResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListRoutingIntentResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -392,9 +389,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -409,7 +406,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('SubnetListResult', pipeline_response) + deserialized = self._deserialize('ListRoutingIntentResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -430,4 +427,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_filters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_security_partner_providers_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_filters_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_security_partner_providers_operations.py index 2d1382d752cd..0074d2f9b062 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_route_filters_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_security_partner_providers_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RouteFiltersOperations: - """RouteFiltersOperations async operations. +class SecurityPartnerProvidersOperations: + """SecurityPartnerProvidersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - route_filter_name: str, + security_partner_provider_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,13 +54,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,20 +85,20 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - route_filter_name: str, + security_partner_provider_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified route filter. + """Deletes the specified Security Partner Provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +119,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, + security_partner_provider_name=security_partner_provider_name, cls=lambda x,y,z: x, **kwargs ) @@ -131,11 +133,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,41 +149,38 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore async def get( self, resource_group_name: str, - route_filter_name: str, - expand: Optional[str] = None, + security_partner_provider_name: str, **kwargs: Any - ) -> "_models.RouteFilter": - """Gets the specified route filter. + ) -> "_models.SecurityPartnerProvider": + """Gets the specified Security Partner Provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param expand: Expands referenced express route bgp peering resources. - :type expand: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilter, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.RouteFilter + :return: SecurityPartnerProvider, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -189,8 +188,6 @@ async def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -204,27 +201,27 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - route_filter_name: str, - route_filter_parameters: "_models.RouteFilter", + security_partner_provider_name: str, + parameters: "_models.SecurityPartnerProvider", **kwargs: Any - ) -> "_models.RouteFilter": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + ) -> "_models.SecurityPartnerProvider": + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -232,7 +229,7 @@ async def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +244,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'RouteFilter') + body_content = self._serialize.body(parameters, 'SecurityPartnerProvider') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -258,45 +255,45 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - route_filter_name: str, - route_filter_parameters: "_models.RouteFilter", + security_partner_provider_name: str, + parameters: "_models.SecurityPartnerProvider", **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilter"]: - """Creates or updates a route filter in a specified resource group. + ) -> AsyncLROPoller["_models.SecurityPartnerProvider"]: + """Creates or updates the specified Security Partner Provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the create or update route filter + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :param parameters: Parameters supplied to the create or update Security Partner Provider operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_09_01.models.RouteFilter + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.RouteFilter] + :return: An instance of AsyncLROPoller that returns either SecurityPartnerProvider or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -305,8 +302,8 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, + security_partner_provider_name=security_partner_provider_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -315,7 +312,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -323,11 +320,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -339,29 +336,42 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore - async def _update_initial( + async def update_tags( self, resource_group_name: str, - route_filter_name: str, - route_filter_parameters: "_models.PatchRouteFilter", + security_partner_provider_name: str, + parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.RouteFilter": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + ) -> "_models.SecurityPartnerProvider": + """Updates tags of a Security Partner Provider resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :param parameters: Parameters supplied to update Security Partner Provider tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityPartnerProvider, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -376,7 +386,7 @@ async def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'PatchRouteFilter') + body_content = self._serialize.body(parameters, 'TagsObject') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -386,105 +396,34 @@ async def _update_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore - - async def begin_update( - self, - resource_group_name: str, - route_filter_name: str, - route_filter_parameters: "_models.PatchRouteFilter", - **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilter"]: - """Updates a route filter in a specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the update route filter operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_09_01.models.PatchRouteFilter - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.RouteFilter] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RouteFilterListResult"]: - """Gets all route filters in a resource group. + ) -> AsyncIterable["_models.SecurityPartnerProviderListResult"]: + """Lists all Security Partner Providers in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteFilterListResult] + :return: An iterator like instance of either SecurityPartnerProviderListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProviderListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProviderListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -512,7 +451,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterListResult', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProviderListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -533,25 +472,25 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders'} # type: ignore def list( self, **kwargs: Any - ) -> AsyncIterable["_models.RouteFilterListResult"]: - """Gets all route filters in a subscription. + ) -> AsyncIterable["_models.SecurityPartnerProviderListResult"]: + """Gets all the Security Partner Providers in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteFilterListResult] + :return: An iterator like instance of either SecurityPartnerProviderListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProviderListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProviderListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -578,7 +517,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterListResult', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProviderListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -599,4 +538,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_security_rules_operations.py similarity index 95% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_security_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_security_rules_operations.py index f2a2b63d9188..10e59b195aeb 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_security_rules_operations.py @@ -28,7 +28,7 @@ class SecurityRulesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -73,6 +74,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -142,7 +144,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -173,7 +175,7 @@ async def get( :type security_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.SecurityRule + :rtype: ~azure.mgmt.network.v2021_05_01.models.SecurityRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] @@ -181,8 +183,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -231,9 +233,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -295,7 +297,7 @@ async def begin_create_or_update( :type security_rule_name: str :param security_rule_parameters: Parameters supplied to the create or update network security rule operation. - :type security_rule_parameters: ~azure.mgmt.network.v2017_08_01.models.SecurityRule + :type security_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.SecurityRule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -303,7 +305,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.SecurityRule] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.SecurityRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -340,7 +342,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -368,7 +370,7 @@ def list( :type network_security_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.SecurityRuleListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.SecurityRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] @@ -376,8 +378,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_association_links_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_association_links_operations.py new file mode 100644 index 000000000000..4b97a883876b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_association_links_operations.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceAssociationLinksOperations: + """ServiceAssociationLinksOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + virtual_network_name: str, + subnet_name: str, + **kwargs: Any + ) -> "_models.ServiceAssociationLinksListResult": + """Gets a list of service association links for a subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceAssociationLinksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceAssociationLinksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceAssociationLinksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceAssociationLinksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_filters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_endpoint_policies_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_filters_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_endpoint_policies_operations.py index 7b11bb5733ed..a00dc0bc7efe 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_route_filters_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_endpoint_policies_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RouteFiltersOperations: - """RouteFiltersOperations async operations. +class ServiceEndpointPoliciesOperations: + """ServiceEndpointPoliciesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - route_filter_name: str, + service_endpoint_policy_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,13 +54,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,20 +85,20 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - route_filter_name: str, + service_endpoint_policy_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified route filter. + """Deletes the specified service endpoint policy. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +119,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, + service_endpoint_policy_name=service_endpoint_policy_name, cls=lambda x,y,z: x, **kwargs ) @@ -131,11 +133,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,41 +149,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore async def get( self, resource_group_name: str, - route_filter_name: str, + service_endpoint_policy_name: str, expand: Optional[str] = None, **kwargs: Any - ) -> "_models.RouteFilter": - """Gets the specified route filter. + ) -> "_models.ServiceEndpointPolicy": + """Gets the specified service Endpoint Policies in a specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param expand: Expands referenced express route bgp peering resources. + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilter, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.RouteFilter + :return: ServiceEndpointPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -204,27 +206,27 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - route_filter_name: str, - route_filter_parameters: "_models.RouteFilter", + service_endpoint_policy_name: str, + parameters: "_models.ServiceEndpointPolicy", **kwargs: Any - ) -> "_models.RouteFilter": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + ) -> "_models.ServiceEndpointPolicy": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -232,7 +234,7 @@ async def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +249,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'RouteFilter') + body_content = self._serialize.body(parameters, 'ServiceEndpointPolicy') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -258,45 +260,45 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - route_filter_name: str, - route_filter_parameters: "_models.RouteFilter", + service_endpoint_policy_name: str, + parameters: "_models.ServiceEndpointPolicy", **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilter"]: - """Creates or updates a route filter in a specified resource group. + ) -> AsyncLROPoller["_models.ServiceEndpointPolicy"]: + """Creates or updates a service Endpoint Policies. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the create or update route filter + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param parameters: Parameters supplied to the create or update service endpoint policy operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_11_01.models.RouteFilter + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.RouteFilter] + :return: An instance of AsyncLROPoller that returns either ServiceEndpointPolicy or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -305,8 +307,8 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, + service_endpoint_policy_name=service_endpoint_policy_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -315,7 +317,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -323,11 +325,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -339,29 +341,42 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore - async def _update_initial( + async def update_tags( self, resource_group_name: str, - route_filter_name: str, - route_filter_parameters: "_models.PatchRouteFilter", + service_endpoint_policy_name: str, + parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.RouteFilter": - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + ) -> "_models.ServiceEndpointPolicy": + """Updates tags of a service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param parameters: Parameters supplied to update service endpoint policy tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -376,7 +391,7 @@ async def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'PatchRouteFilter') + body_content = self._serialize.body(parameters, 'TagsObject') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -386,105 +401,31 @@ async def _update_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore - - async def begin_update( - self, - resource_group_name: str, - route_filter_name: str, - route_filter_parameters: "_models.PatchRouteFilter", - **kwargs: Any - ) -> AsyncLROPoller["_models.RouteFilter"]: - """Updates a route filter in a specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the update route filter operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_11_01.models.PatchRouteFilter - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.RouteFilter] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore - def list_by_resource_group( + def list( self, - resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RouteFilterListResult"]: - """Gets all route filters in a resource group. + ) -> AsyncIterable["_models.ServiceEndpointPolicyListResult"]: + """Gets all the service endpoint policies in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteFilterListResult] + :return: An iterator like instance of either ServiceEndpointPolicyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -494,9 +435,8 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -512,7 +452,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterListResult', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -533,25 +473,28 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies'} # type: ignore - def list( + def list_by_resource_group( self, + resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RouteFilterListResult"]: - """Gets all route filters in a subscription. + ) -> AsyncIterable["_models.ServiceEndpointPolicyListResult"]: + """Gets all service endpoint Policies in a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteFilterListResult] + :return: An iterator like instance of either ServiceEndpointPolicyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -561,8 +504,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -578,7 +522,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterListResult', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -599,4 +543,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_endpoint_policy_definitions_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_endpoint_policy_definitions_operations.py new file mode 100644 index 000000000000..58bd70781fe0 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_endpoint_policy_definitions_operations.py @@ -0,0 +1,435 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceEndpointPolicyDefinitionsOperations: + """ServiceEndpointPolicyDefinitionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified ServiceEndpoint policy definitions. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the Service Endpoint Policy. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition. + :type service_endpoint_policy_definition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + **kwargs: Any + ) -> "_models.ServiceEndpointPolicyDefinition": + """Get the specified service endpoint policy definitions from service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy name. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition name. + :type service_endpoint_policy_definition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicyDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + service_endpoint_policy_definitions: "_models.ServiceEndpointPolicyDefinition", + **kwargs: Any + ) -> "_models.ServiceEndpointPolicyDefinition": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(service_endpoint_policy_definitions, 'ServiceEndpointPolicyDefinition') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + service_endpoint_policy_definition_name: str, + service_endpoint_policy_definitions: "_models.ServiceEndpointPolicyDefinition", + **kwargs: Any + ) -> AsyncLROPoller["_models.ServiceEndpointPolicyDefinition"]: + """Creates or updates a service endpoint policy definition in the specified service endpoint + policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition name. + :type service_endpoint_policy_definition_name: str + :param service_endpoint_policy_definitions: Parameters supplied to the create or update service + endpoint policy operation. + :type service_endpoint_policy_definitions: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either ServiceEndpointPolicyDefinition or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + service_endpoint_policy_definitions=service_endpoint_policy_definitions, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + service_endpoint_policy_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ServiceEndpointPolicyDefinitionListResult"]: + """Gets all service endpoint policy definitions in a service end point policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy name. + :type service_endpoint_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceEndpointPolicyDefinitionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinitionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinitionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceEndpointPolicyDefinitionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_tag_information_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_tag_information_operations.py new file mode 100644 index 000000000000..0278bb3f43f3 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_tag_information_operations.py @@ -0,0 +1,124 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ServiceTagInformationOperations: + """ServiceTagInformationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location: str, + no_address_prefixes: Optional[bool] = None, + tag_name: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable["_models.ServiceTagInformationListResult"]: + """Gets a list of service tag information resources with pagination. + + :param location: The location that will be used as a reference for cloud (not as a filter based + on location, you will get the list of service tags with prefix details across all regions but + limited to the cloud that your subscription belongs to). + :type location: str + :param no_address_prefixes: Do not return address prefixes for the tag(s). + :type no_address_prefixes: bool + :param tag_name: Return tag information for a particular tag. + :type tag_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceTagInformationListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ServiceTagInformationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTagInformationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if no_address_prefixes is not None: + query_parameters['noAddressPrefixes'] = self._serialize.query("no_address_prefixes", no_address_prefixes, 'bool') + if tag_name is not None: + query_parameters['tagName'] = self._serialize.query("tag_name", tag_name, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceTagInformationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_management_client_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_tags_operations.py similarity index 61% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_management_client_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_tags_operations.py index 9a8b2b4b973a..6c8f09e411b1 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_network_management_client_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_service_tags_operations.py @@ -18,36 +18,54 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NetworkManagementClientOperationsMixin: +class ServiceTagsOperations: + """ServiceTagsOperations async operations. - async def check_dns_name_availability( + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( self, location: str, - domain_name_label: str, **kwargs: Any - ) -> "_models.DnsNameAvailabilityResult": - """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + ) -> "_models.ServiceTagsListResult": + """Gets a list of service tag information resources. - :param location: The location of the domain name. + :param location: The location that will be used as a reference for version (not as a filter + based on location, you will get the list of service tags with prefix details across all regions + but limited to the cloud that your subscription belongs to). :type location: str - :param domain_name_label: The domain name to be verified. It must conform to the following - regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. - :type domain_name_label: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DnsNameAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.DnsNameAvailabilityResult + :return: ServiceTagsListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceTagsListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTagsListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self.check_dns_name_availability.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -56,7 +74,6 @@ async def check_dns_name_availability( # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -71,10 +88,10 @@ async def check_dns_name_availability( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) + deserialized = self._deserialize('ServiceTagsListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_dns_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_packet_captures_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_subnets_operations.py similarity index 66% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_packet_captures_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_subnets_operations.py index d7a9e998cb87..52c5fa6405fc 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_packet_captures_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_subnets_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PacketCapturesOperations: - """PacketCapturesOperations async operations. +class SubnetsOperations: + """SubnetsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,29 +43,27 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _create_initial( + async def _delete_initial( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, - parameters: "_models.PacketCapture", + virtual_network_name: str, + subnet_name: str, **kwargs: Any - ) -> "_models.PacketCaptureResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,69 +74,58 @@ async def _create_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PacketCapture') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - async def begin_create( + async def begin_delete( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, - parameters: "_models.PacketCapture", + virtual_network_name: str, + subnet_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.PacketCaptureResult"]: - """Create and start a packet capture on the specified VM. + ) -> AsyncLROPoller[None]: + """Deletes the specified subnet. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str - :param parameters: Parameters that define the create packet capture operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.PacketCapture + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PacketCaptureResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.PacketCaptureResult] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, - parameters=parameters, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, cls=lambda x,y,z: x, **kwargs ) @@ -147,20 +134,17 @@ async def begin_create( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -172,42 +156,45 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore async def get( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + virtual_network_name: str, + subnet_name: str, + expand: Optional[str] = None, **kwargs: Any - ) -> "_models.PacketCaptureResult": - """Gets a packet capture session by name. + ) -> "_models.Subnet": + """Gets the specified subnet by virtual network and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param expand: Expands referenced resources. + :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PacketCaptureResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureResult + :return: Subnet, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.Subnet :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -215,6 +202,8 @@ async def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -228,34 +217,37 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + deserialized = self._deserialize('Subnet', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - async def _delete_initial( + async def _create_or_update_initial( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + virtual_network_name: str, + subnet_name: str, + subnet_parameters: "_models.Subnet", **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.Subnet": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -266,57 +258,73 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(subnet_parameters, 'Subnet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('Subnet', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Subnet', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + virtual_network_name: str, + subnet_name: str, + subnet_parameters: "_models.Subnet", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified packet capture session. + ) -> AsyncLROPoller["_models.Subnet"]: + """Creates or updates a subnet in the specified virtual network. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param subnet_parameters: Parameters supplied to the create or update subnet operation. + :type subnet_parameters: ~azure.mgmt.network.v2021_05_01.models.Subnet :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either Subnet or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.Subnet] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subnet_parameters=subnet_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -325,17 +333,20 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Subnet', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -347,13 +358,14 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - async def _stop_initial( + async def _prepare_network_policies_initial( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + virtual_network_name: str, + subnet_name: str, + prepare_network_policies_request_parameters: "_models.PrepareNetworkPoliciesRequest", **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -361,14 +373,16 @@ async def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._stop_initial.metadata['url'] # type: ignore + url = self._prepare_network_policies_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -379,8 +393,13 @@ async def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(prepare_network_policies_request_parameters, 'PrepareNetworkPoliciesRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -391,23 +410,27 @@ async def _stop_initial( if cls: return cls(pipeline_response, None, {}) - _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop'} # type: ignore + _prepare_network_policies_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies'} # type: ignore - async def begin_stop( + async def begin_prepare_network_policies( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + virtual_network_name: str, + subnet_name: str, + prepare_network_policies_request_parameters: "_models.PrepareNetworkPoliciesRequest", **kwargs: Any ) -> AsyncLROPoller[None]: - """Stops a specified packet capture session. + """Prepares a subnet by applying network intent policies. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param prepare_network_policies_request_parameters: Parameters supplied to prepare subnet by + applying network intent policies. + :type prepare_network_policies_request_parameters: ~azure.mgmt.network.v2021_05_01.models.PrepareNetworkPoliciesRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -426,10 +449,11 @@ async def begin_stop( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._stop_initial( + raw_result = await self._prepare_network_policies_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + prepare_network_policies_request_parameters=prepare_network_policies_request_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -443,12 +467,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -460,29 +484,31 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop'} # type: ignore + begin_prepare_network_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies'} # type: ignore - async def _get_status_initial( + async def _unprepare_network_policies_initial( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + virtual_network_name: str, + subnet_name: str, + unprepare_network_policies_request_parameters: "_models.UnprepareNetworkPoliciesRequest", **kwargs: Any - ) -> "_models.PacketCaptureQueryStatusResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_status_initial.metadata['url'] # type: ignore + url = self._unprepare_network_policies_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -493,9 +519,13 @@ async def _get_status_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(unprepare_network_policies_request_parameters, 'UnprepareNetworkPoliciesRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -503,55 +533,53 @@ async def _get_status_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus'} # type: ignore + _unprepare_network_policies_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies'} # type: ignore - async def begin_get_status( + async def begin_unprepare_network_policies( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + virtual_network_name: str, + subnet_name: str, + unprepare_network_policies_request_parameters: "_models.UnprepareNetworkPoliciesRequest", **kwargs: Any - ) -> AsyncLROPoller["_models.PacketCaptureQueryStatusResult"]: - """Query the status of a running packet capture session. + ) -> AsyncLROPoller[None]: + """Unprepares a subnet by removing network intent policies. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the Network Watcher resource. - :type network_watcher_name: str - :param packet_capture_name: The name given to the packet capture session. - :type packet_capture_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param unprepare_network_policies_request_parameters: Parameters supplied to unprepare subnet + to remove network intent policies. + :type unprepare_network_policies_request_parameters: ~azure.mgmt.network.v2021_05_01.models.UnprepareNetworkPoliciesRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PacketCaptureQueryStatusResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.PacketCaptureQueryStatusResult] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_status_initial( + raw_result = await self._unprepare_network_policies_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + unprepare_network_policies_request_parameters=unprepare_network_policies_request_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -560,16 +588,13 @@ async def begin_get_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -585,32 +610,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus'} # type: ignore + begin_unprepare_network_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies'} # type: ignore def list( self, resource_group_name: str, - network_watcher_name: str, + virtual_network_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PacketCaptureListResult"]: - """Lists all packet capture sessions within the specified resource group. + ) -> AsyncIterable["_models.SubnetListResult"]: + """Gets all subnets in a virtual network. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the Network Watcher resource. - :type network_watcher_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PacketCaptureListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.PacketCaptureListResult] + :return: An iterator like instance of either SubnetListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.SubnetListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -622,7 +647,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -638,11 +663,11 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PacketCaptureListResult', pipeline_response) + deserialized = self._deserialize('SubnetListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): request = prepare_request(next_link) @@ -659,4 +684,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_usages_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_usages_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_usages_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_usages_operations.py index bf594e2a7a97..e47fc8492745 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_usages_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_usages_operations.py @@ -26,7 +26,7 @@ class UsagesOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -52,7 +52,7 @@ def list( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UsagesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.UsagesListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.UsagesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesListResult"] @@ -60,8 +60,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_appliance_sites_operations.py similarity index 73% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_security_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_appliance_sites_operations.py index 773aa3270821..7ac23813d3c4 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_appliance_sites_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class SecurityRulesOperations: - """SecurityRulesOperations async operations. +class VirtualApplianceSitesOperations: + """VirtualApplianceSitesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,8 +46,8 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, + network_virtual_appliance_name: str, + site_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -55,14 +55,15 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -73,6 +74,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -85,23 +87,23 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, + network_virtual_appliance_name: str, + site_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified network security rule. + """Deletes the specified site from a Virtual Appliance. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -122,8 +124,8 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,12 +139,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,42 +156,42 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore async def get( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, + network_virtual_appliance_name: str, + site_name: str, **kwargs: Any - ) -> "_models.SecurityRule": - """Get the specified network security rule. + ) -> "_models.VirtualApplianceSite": + """Gets the specified Virtual Appliance Site. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.SecurityRule + :return: VirtualApplianceSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSite :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -210,37 +212,37 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: "_models.SecurityRule", + network_virtual_appliance_name: str, + site_name: str, + parameters: "_models.VirtualApplianceSite", **kwargs: Any - ) -> "_models.SecurityRule": - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + ) -> "_models.VirtualApplianceSite": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +257,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(security_rule_parameters, 'SecurityRule') + body_content = self._serialize.body(parameters, 'VirtualApplianceSite') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,48 +268,48 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - network_security_group_name: str, - security_rule_name: str, - security_rule_parameters: "_models.SecurityRule", + network_virtual_appliance_name: str, + site_name: str, + parameters: "_models.VirtualApplianceSite", **kwargs: Any - ) -> AsyncLROPoller["_models.SecurityRule"]: - """Creates or updates a security rule in the specified network security group. + ) -> AsyncLROPoller["_models.VirtualApplianceSite"]: + """Creates or updates the specified Network Virtual Appliance Site. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. - :type security_rule_parameters: ~azure.mgmt.network.v2017_11_01.models.SecurityRule + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance Site + operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSite :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either SecurityRule or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.SecurityRule] + :return: An instance of AsyncLROPoller that returns either VirtualApplianceSite or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSite] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -316,9 +318,9 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, - security_rule_parameters=security_rule_parameters, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -327,7 +329,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -335,12 +337,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -352,32 +354,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore def list( self, resource_group_name: str, - network_security_group_name: str, + network_virtual_appliance_name: str, **kwargs: Any - ) -> AsyncIterable["_models.SecurityRuleListResult"]: - """Gets all security rules in a network security group. + ) -> AsyncIterable["_models.NetworkVirtualApplianceSiteListResult"]: + """Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.SecurityRuleListResult] + :return: An iterator like instance of either NetworkVirtualApplianceSiteListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSiteListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSiteListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -389,7 +391,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -405,7 +407,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityRuleListResult', pipeline_response) + deserialized = self._deserialize('NetworkVirtualApplianceSiteListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -426,4 +428,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_appliance_skus_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_appliance_skus_operations.py new file mode 100644 index 000000000000..d2a76b9b4c6f --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_appliance_skus_operations.py @@ -0,0 +1,162 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualApplianceSkusOperations: + """VirtualApplianceSkusOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.NetworkVirtualApplianceSkuListResult"]: + """List all SKUs available for a virtual appliance. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceSkuListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSkuListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSkuListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkVirtualApplianceSkuListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus'} # type: ignore + + async def get( + self, + sku_name: str, + **kwargs: Any + ) -> "_models.NetworkVirtualApplianceSku": + """Retrieves a single available sku for network virtual appliance. + + :param sku_name: Name of the Sku. + :type sku_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualApplianceSku, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSku + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSku"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'skuName': self._serialize.url("sku_name", sku_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualApplianceSku', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_bgp_connection_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_bgp_connection_operations.py new file mode 100644 index 000000000000..b1b0ac5f2cb5 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_bgp_connection_operations.py @@ -0,0 +1,356 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualHubBgpConnectionOperations: + """VirtualHubBgpConnectionOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> "_models.BgpConnection": + """Retrieves the details of a Virtual Hub Bgp Connection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BgpConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.BgpConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + parameters: "_models.BgpConnection", + **kwargs: Any + ) -> "_models.BgpConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BgpConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + parameters: "_models.BgpConnection", + **kwargs: Any + ) -> AsyncLROPoller["_models.BgpConnection"]: + """Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing + VirtualHubBgpConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :param parameters: Parameters of Bgp connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.BgpConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either BgpConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.BgpConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + virtual_hub_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VirtualHubBgpConnection. + + :param resource_group_name: The resource group name of the VirtualHubBgpConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_bgp_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_bgp_connections_operations.py new file mode 100644 index 000000000000..f7c6794e6b1a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_bgp_connections_operations.py @@ -0,0 +1,364 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualHubBgpConnectionsOperations: + """VirtualHubBgpConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualHubBgpConnectionResults"]: + """Retrieves the details of all VirtualHubBgpConnections. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubBgpConnectionResults or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubBgpConnectionResults] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubBgpConnectionResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualHubBgpConnectionResults', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections'} # type: ignore + + async def _list_learned_routes_initial( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> Optional["_models.PeerRouteList"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PeerRouteList"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._list_learned_routes_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_learned_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes'} # type: ignore + + async def begin_list_learned_routes( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.PeerRouteList"]: + """Retrieves a list of routes the virtual hub bgp connection has learned. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param hub_name: The name of the virtual hub. + :type hub_name: str + :param connection_name: The name of the virtual hub bgp connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PeerRouteList or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PeerRouteList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerRouteList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_learned_routes_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_learned_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes'} # type: ignore + + async def _list_advertised_routes_initial( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> Optional["_models.PeerRouteList"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PeerRouteList"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._list_advertised_routes_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_advertised_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes'} # type: ignore + + async def begin_list_advertised_routes( + self, + resource_group_name: str, + hub_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.PeerRouteList"]: + """Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param hub_name: The name of the virtual hub. + :type hub_name: str + :param connection_name: The name of the virtual hub bgp connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either PeerRouteList or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.PeerRouteList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerRouteList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_advertised_routes_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_subnets_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_ip_configuration_operations.py similarity index 74% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_subnets_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_ip_configuration_operations.py index 1e30aaa6325f..98d299a435d2 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_subnets_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_ip_configuration_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class SubnetsOperations: - """SubnetsOperations async operations. +class VirtualHubIpConfigurationOperations: + """VirtualHubIpConfigurationOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,27 +43,92 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def get( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, + virtual_hub_name: str, + ip_config_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.HubIpConfiguration": + """Retrieves the details of a Virtual Hub Ip configuration. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubIpConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.HubIpConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + ip_config_name: str, + parameters: "_models.HubIpConfiguration", + **kwargs: Any + ) -> "_models.HubIpConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -73,57 +138,74 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'HubIpConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, + virtual_hub_name: str, + ip_config_name: str, + parameters: "_models.HubIpConfiguration", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified subnet. + ) -> AsyncLROPoller["_models.HubIpConfiguration"]: + """Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing + VirtualHubIpConfiguration. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :param parameters: Hub Ip Configuration parameters. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.HubIpConfiguration :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either HubIpConfiguration or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.HubIpConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -132,17 +214,20 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,99 +239,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore - async def get( + async def _delete_initial( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, - expand: Optional[str] = None, + virtual_hub_name: str, + ip_config_name: str, **kwargs: Any - ) -> "_models.Subnet": - """Gets the specified subnet by virtual network and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Subnet, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.Subnet - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Subnet', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - virtual_network_name: str, - subnet_name: str, - subnet_parameters: "_models.Subnet", - **kwargs: Any - ) -> "_models.Subnet": - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -256,73 +272,58 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(subnet_parameters, 'Subnet') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('Subnet', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, - virtual_network_name: str, - subnet_name: str, - subnet_parameters: "_models.Subnet", + virtual_hub_name: str, + ip_config_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.Subnet"]: - """Creates or updates a subnet in the specified virtual network. + ) -> AsyncLROPoller[None]: + """Deletes a VirtualHubIpConfiguration. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHubBgpConnection. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param subnet_parameters: Parameters supplied to the create or update subnet operation. - :type subnet_parameters: ~azure.mgmt.network.v2017_08_01.models.Subnet + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either Subnet or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.Subnet] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, - subnet_parameters=subnet_parameters, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, cls=lambda x,y,z: x, **kwargs ) @@ -331,20 +332,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -356,32 +354,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore def list( self, resource_group_name: str, - virtual_network_name: str, + virtual_hub_name: str, **kwargs: Any - ) -> AsyncIterable["_models.SubnetListResult"]: - """Gets all subnets in a virtual network. + ) -> AsyncIterable["_models.ListVirtualHubIpConfigurationResults"]: + """Retrieves the details of all VirtualHubIpConfigurations. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SubnetListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.SubnetListResult] + :return: An iterator like instance of either ListVirtualHubIpConfigurationResults or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubIpConfigurationResults] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubIpConfigurationResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -392,9 +390,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -409,7 +407,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('SubnetListResult', pipeline_response) + deserialized = self._deserialize('ListVirtualHubIpConfigurationResults', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -430,4 +428,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_routes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_route_table_v2_s_operations.py similarity index 74% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_routes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_route_table_v2_s_operations.py index 34b5dd3918be..1c8315169655 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_routes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hub_route_table_v2_s_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class RoutesOperations: - """RoutesOperations async operations. +class VirtualHubRouteTableV2SOperations: + """VirtualHubRouteTableV2SOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,27 +43,93 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + async def get( self, resource_group_name: str, + virtual_hub_name: str, route_table_name: str, - route_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> "_models.VirtualHubRouteTableV2": + """Retrieves the details of a VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHubRouteTableV2. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHubRouteTableV2, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + route_table_name: str, + virtual_hub_route_table_v2_parameters: "_models.VirtualHubRouteTableV2", + **kwargs: Any + ) -> "_models.VirtualHubRouteTableV2": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -73,57 +139,76 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(virtual_hub_route_table_v2_parameters, 'VirtualHubRouteTableV2') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore - async def begin_delete( + async def begin_create_or_update( self, resource_group_name: str, + virtual_hub_name: str, route_table_name: str, - route_name: str, + virtual_hub_route_table_v2_parameters: "_models.VirtualHubRouteTableV2", **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified route from a route table. + ) -> AsyncLROPoller["_models.VirtualHubRouteTableV2"]: + """Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing + VirtualHubRouteTableV2. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param route_table_name: The name of the route table. + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str + :param virtual_hub_route_table_v2_parameters: Parameters supplied to create or update + VirtualHubRouteTableV2. + :type virtual_hub_route_table_v2_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2 :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either VirtualHubRouteTableV2 or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._delete_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, route_table_name=route_table_name, - route_name=route_name, + virtual_hub_route_table_v2_parameters=virtual_hub_route_table_v2_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -132,17 +217,20 @@ async def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -154,94 +242,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore - async def get( + async def _delete_initial( self, resource_group_name: str, + virtual_hub_name: str, route_table_name: str, - route_name: str, **kwargs: Any - ) -> "_models.Route": - """Gets the specified route from a route table. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Route, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.Route - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Route', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore - - async def _create_or_update_initial( - self, - resource_group_name: str, - route_table_name: str, - route_name: str, - route_parameters: "_models.Route", - **kwargs: Any - ) -> "_models.Route": - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -251,73 +275,59 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_parameters, 'Route') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if response.status_code == 200: - deserialized = self._deserialize('Route', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Route', pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore - async def begin_create_or_update( + async def begin_delete( self, resource_group_name: str, + virtual_hub_name: str, route_table_name: str, - route_name: str, - route_parameters: "_models.Route", **kwargs: Any - ) -> AsyncLROPoller["_models.Route"]: - """Creates or updates a route in the specified route table. + ) -> AsyncLROPoller[None]: + """Deletes a VirtualHubRouteTableV2. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHubRouteTableV2. :type resource_group_name: str - :param route_table_name: The name of the route table. + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str - :param route_parameters: Parameters supplied to the create or update route operation. - :type route_parameters: ~azure.mgmt.network.v2017_09_01.models.Route :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.Route] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_or_update_initial( + raw_result = await self._delete_initial( resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, route_table_name=route_table_name, - route_name=route_name, - route_parameters=route_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -326,20 +336,17 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Route', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -351,32 +358,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore def list( self, resource_group_name: str, - route_table_name: str, + virtual_hub_name: str, **kwargs: Any - ) -> AsyncIterable["_models.RouteListResult"]: - """Gets all routes in a route table. + ) -> AsyncIterable["_models.ListVirtualHubRouteTableV2SResult"]: + """Retrieves the details of all VirtualHubRouteTableV2s. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteListResult] + :return: An iterator like instance of either ListVirtualHubRouteTableV2SResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubRouteTableV2SResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubRouteTableV2SResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -387,9 +394,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -404,7 +411,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('RouteListResult', pipeline_response) + deserialized = self._deserialize('ListVirtualHubRouteTableV2SResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -425,4 +432,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hubs_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hubs_operations.py new file mode 100644 index 000000000000..f2d1401c5cbf --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_hubs_operations.py @@ -0,0 +1,662 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualHubsOperations: + """VirtualHubsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> "_models.VirtualHub": + """Retrieves the details of a VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHub, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + virtual_hub_parameters: "_models.VirtualHub", + **kwargs: Any + ) -> "_models.VirtualHub": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(virtual_hub_parameters, 'VirtualHub') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_hub_name: str, + virtual_hub_parameters: "_models.VirtualHub", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualHub"]: + """Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param virtual_hub_parameters: Parameters supplied to create or update VirtualHub. + :type virtual_hub_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualHub + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualHub or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualHub] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + virtual_hub_parameters=virtual_hub_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + virtual_hub_name: str, + virtual_hub_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualHub": + """Updates VirtualHub tags. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param virtual_hub_parameters: Parameters supplied to update VirtualHub tags. + :type virtual_hub_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHub, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(virtual_hub_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + virtual_hub_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualHubsResult"]: + """Lists all the VirtualHubs in a resource group. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualHubsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualHubsResult"]: + """Lists all the VirtualHubs in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualHubsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs'} # type: ignore + + async def _get_effective_virtual_hub_routes_initial( + self, + resource_group_name: str, + virtual_hub_name: str, + effective_routes_parameters: Optional["_models.EffectiveRoutesParameters"] = None, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._get_effective_virtual_hub_routes_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if effective_routes_parameters is not None: + body_content = self._serialize.body(effective_routes_parameters, 'EffectiveRoutesParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _get_effective_virtual_hub_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes'} # type: ignore + + async def begin_get_effective_virtual_hub_routes( + self, + resource_group_name: str, + virtual_hub_name: str, + effective_routes_parameters: Optional["_models.EffectiveRoutesParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Gets the effective routes configured for the Virtual Hub resource or the specified resource . + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param effective_routes_parameters: Parameters supplied to get the effective routes for a + specific resource. + :type effective_routes_parameters: ~azure.mgmt.network.v2021_05_01.models.EffectiveRoutesParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_effective_virtual_hub_routes_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + effective_routes_parameters=effective_routes_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_effective_virtual_hub_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_connections_operations.py similarity index 66% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_connections_operations.py index 289f1ddbaad0..6c08f533d27c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_connections_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkGatewaysOperations: - """VirtualNetworkGatewaysOperations async operations. +class VirtualNetworkGatewayConnectionsOperations: + """VirtualNetworkGatewayConnectionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,24 +46,24 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _create_or_update_initial( self, resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VirtualNetworkGateway", + virtual_network_gateway_connection_name: str, + parameters: "_models.VirtualNetworkGatewayConnection", **kwargs: Any - ) -> "_models.VirtualNetworkGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + ) -> "_models.VirtualNetworkGatewayConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,7 +78,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGateway') + body_content = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -89,44 +89,46 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VirtualNetworkGateway", + virtual_network_gateway_connection_name: str, + parameters: "_models.VirtualNetworkGatewayConnection", **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGateway"]: - """Creates or updates a virtual network gateway in the specified resource group. + ) -> AsyncLROPoller["_models.VirtualNetworkGatewayConnection"]: + """Creates or updates a virtual network gateway connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to create or update virtual network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the create or update virtual network gateway + connection operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway] + :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -135,7 +137,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -145,7 +147,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -153,11 +155,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -169,38 +171,39 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore async def get( self, resource_group_name: str, - virtual_network_gateway_name: str, + virtual_network_gateway_connection_name: str, **kwargs: Any - ) -> "_models.VirtualNetworkGateway": - """Gets the specified virtual network gateway by resource group. + ) -> "_models.VirtualNetworkGatewayConnection": + """Gets the specified virtual network gateway connection by resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway + :return: VirtualNetworkGatewayConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -221,18 +224,18 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore async def _delete_initial( self, resource_group_name: str, - virtual_network_gateway_name: str, + virtual_network_gateway_connection_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -240,13 +243,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -257,6 +261,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -269,20 +274,21 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - virtual_network_gateway_name: str, + virtual_network_gateway_connection_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified virtual network gateway. + """Deletes the specified virtual network Gateway connection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -303,7 +309,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -317,7 +323,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -333,187 +339,46 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore - - def list( - self, - resource_group_name: str, - **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkGatewayListResult"]: - """Gets all virtual network gateways by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways'} # type: ignore - - def list_connections( + async def _update_tags_initial( self, resource_group_name: str, - virtual_network_gateway_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.TagsObject", **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkGatewayListConnectionsResult"]: - """Gets all the connections in a virtual network gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayListConnectionsResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayListConnectionsResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListConnectionsResult"] + ) -> Optional["_models.VirtualNetworkGatewayConnection"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGatewayConnection"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_connections.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayListConnectionsResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) - list_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections'} # type: ignore - - async def _reset_initial( - self, - resource_group_name: str, - virtual_network_gateway_name: str, - gateway_vip: Optional[str] = None, - **kwargs: Any - ) -> Optional["_models.VirtualNetworkGateway"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._reset_initial.metadata['url'] # type: ignore + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - if gateway_vip is not None: - query_parameters['gatewayVip'] = self._serialize.query("gateway_vip", gateway_vip, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -523,52 +388,52 @@ async def _reset_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _reset_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - async def begin_reset( + async def begin_update_tags( self, resource_group_name: str, - virtual_network_gateway_name: str, - gateway_vip: Optional[str] = None, + virtual_network_gateway_connection_name: str, + parameters: "_models.TagsObject", **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGateway"]: - """Resets the primary of the virtual network gateway in the specified resource group. + ) -> AsyncLROPoller["_models.VirtualNetworkGatewayConnection"]: + """Updates a virtual network gateway connection tags. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param gateway_vip: Virtual network gateway vip address supplied to the begin reset of the - active-active feature enabled gateway. - :type gateway_vip: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to update virtual network gateway connection tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway] + :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._reset_initial( + raw_result = await self._update_tags_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - gateway_vip=gateway_vip, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -577,7 +442,7 @@ async def begin_reset( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -585,11 +450,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -601,29 +466,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - async def _generatevpnclientpackage_initial( + async def _set_shared_key_initial( self, resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VpnClientParameters", + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionSharedKey", **kwargs: Any - ) -> Optional[str]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + ) -> "_models.ConnectionSharedKey": + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._generatevpnclientpackage_initial.metadata['url'] # type: ignore + url = self._set_shared_key_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -638,64 +503,67 @@ async def _generatevpnclientpackage_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnClientParameters') + body_content = self._serialize.body(parameters, 'ConnectionSharedKey') body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _generatevpnclientpackage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'} # type: ignore + _set_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore - async def begin_generatevpnclientpackage( + async def begin_set_shared_key( self, resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VpnClientParameters", + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionSharedKey", **kwargs: Any - ) -> AsyncLROPoller[str]: - """Generates VPN client package for P2S client of the virtual network gateway in the specified - resource group. + ) -> AsyncLROPoller["_models.ConnectionSharedKey"]: + """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway + connection shared key for passed virtual network gateway connection in the specified resource + group through Network resource provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to the generate virtual network gateway VPN client - package operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VpnClientParameters + :param virtual_network_gateway_connection_name: The virtual network gateway connection name. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection + Shared key operation throughNetwork resource provider. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ConnectionSharedKey :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[str] + :return: An instance of AsyncLROPoller that returns either ConnectionSharedKey or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectionSharedKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._generatevpnclientpackage_initial( + raw_result = await self._set_shared_key_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -705,7 +573,7 @@ async def begin_generatevpnclientpackage( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -713,11 +581,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -729,29 +597,160 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_generatevpnclientpackage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'} # type: ignore + begin_set_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore - async def _generate_vpn_profile_initial( + async def get_shared_key( self, resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VpnClientParameters", + virtual_network_gateway_connection_name: str, **kwargs: Any - ) -> Optional[str]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + ) -> "_models.ConnectionSharedKey": + """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the + specified virtual network gateway connection shared key through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The virtual network gateway connection shared + key name. + :type virtual_network_gateway_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionSharedKey, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ConnectionSharedKey + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_shared_key.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualNetworkGatewayConnectionListResult"]: + """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways + connections created. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('VirtualNetworkGatewayConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections'} # type: ignore + + async def _reset_shared_key_initial( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionResetSharedKey", + **kwargs: Any + ) -> Optional["_models.ConnectionResetSharedKey"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._generate_vpn_profile_initial.metadata['url'] # type: ignore + url = self._reset_shared_key_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -766,7 +765,7 @@ async def _generate_vpn_profile_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnClientParameters') + body_content = self._serialize.body(parameters, 'ConnectionResetSharedKey') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -778,52 +777,54 @@ async def _generate_vpn_profile_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _generate_vpn_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile'} # type: ignore + _reset_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore - async def begin_generate_vpn_profile( + async def begin_reset_shared_key( self, resource_group_name: str, - virtual_network_gateway_name: str, - parameters: "_models.VpnClientParameters", + virtual_network_gateway_connection_name: str, + parameters: "_models.ConnectionResetSharedKey", **kwargs: Any - ) -> AsyncLROPoller[str]: - """Generates VPN profile for P2S client of the virtual network gateway in the specified resource - group. Used for IKEV2 and radius based authentication. + ) -> AsyncLROPoller["_models.ConnectionResetSharedKey"]: + """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway + connection shared key for passed virtual network gateway connection in the specified resource + group through Network resource provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to the generate virtual network gateway VPN client - package operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VpnClientParameters + :param virtual_network_gateway_connection_name: The virtual network gateway connection reset + shared key Name. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the begin reset virtual network gateway connection + shared key operation through network resource provider. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ConnectionResetSharedKey :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[str] + :return: An instance of AsyncLROPoller that returns either ConnectionResetSharedKey or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectionResetSharedKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._generate_vpn_profile_initial( + raw_result = await self._reset_shared_key_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -833,7 +834,7 @@ async def begin_generate_vpn_profile( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -841,7 +842,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -857,12 +858,13 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_generate_vpn_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile'} # type: ignore + begin_reset_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore - async def _get_vpn_profile_package_url_initial( + async def _start_packet_capture_initial( self, resource_group_name: str, - virtual_network_gateway_name: str, + virtual_network_gateway_connection_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, **kwargs: Any ) -> Optional[str]: cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] @@ -870,14 +872,15 @@ async def _get_vpn_profile_package_url_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_vpn_profile_package_url_initial.metadata['url'] # type: ignore + url = self._start_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -888,15 +891,23 @@ async def _get_vpn_profile_package_url_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnPacketCaptureStartParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -906,21 +917,25 @@ async def _get_vpn_profile_package_url_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _get_vpn_profile_package_url_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'} # type: ignore + _start_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture'} # type: ignore - async def begin_get_vpn_profile_package_url( + async def begin_start_packet_capture( self, resource_group_name: str, - virtual_network_gateway_name: str, + virtual_network_gateway_connection_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, **kwargs: Any ) -> AsyncLROPoller[str]: - """Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified - resource group. The profile needs to be generated first using generateVpnProfile. + """Starts packet capture on virtual network gateway connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to start packet + capture on gateway connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnPacketCaptureStartParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -939,9 +954,10 @@ async def begin_get_vpn_profile_package_url( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_vpn_profile_package_url_initial( + raw_result = await self._start_packet_capture_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -958,7 +974,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -974,97 +990,103 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_vpn_profile_package_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'} # type: ignore + begin_start_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture'} # type: ignore - async def _get_bgp_peer_status_initial( + async def _stop_packet_capture_initial( self, resource_group_name: str, - virtual_network_gateway_name: str, - peer: Optional[str] = None, + virtual_network_gateway_connection_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", **kwargs: Any - ) -> Optional["_models.BgpPeerStatusListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BgpPeerStatusListResult"]] + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_bgp_peer_status_initial.metadata['url'] # type: ignore + url = self._stop_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - if peer is not None: - query_parameters['peer'] = self._serialize.query("peer", peer, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VpnPacketCaptureStopParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_bgp_peer_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus'} # type: ignore + _stop_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture'} # type: ignore - async def begin_get_bgp_peer_status( + async def begin_stop_packet_capture( self, resource_group_name: str, - virtual_network_gateway_name: str, - peer: Optional[str] = None, + virtual_network_gateway_connection_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", **kwargs: Any - ) -> AsyncLROPoller["_models.BgpPeerStatusListResult"]: - """The GetBgpPeerStatus operation retrieves the status of all BGP peers. + ) -> AsyncLROPoller[str]: + """Stops packet capture on virtual network gateway connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param peer: The IP address of the peer to retrieve the status of. - :type peer: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to stop packet + capture on gateway connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnPacketCaptureStopParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either BgpPeerStatusListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.BgpPeerStatusListResult] + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpPeerStatusListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_bgp_peer_status_initial( + raw_result = await self._stop_packet_capture_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - peer=peer, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -1073,7 +1095,7 @@ async def begin_get_bgp_peer_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -1081,7 +1103,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -1097,27 +1119,27 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_bgp_peer_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus'} # type: ignore + begin_stop_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture'} # type: ignore - async def _get_learned_routes_initial( + async def _get_ike_sas_initial( self, resource_group_name: str, - virtual_network_gateway_name: str, + virtual_network_gateway_connection_name: str, **kwargs: Any - ) -> Optional["_models.GatewayRouteListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._get_learned_routes_initial.metadata['url'] # type: ignore + url = self._get_ike_sas_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1136,52 +1158,54 @@ async def _get_learned_routes_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_learned_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes'} # type: ignore + _get_ike_sas_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas'} # type: ignore - async def begin_get_learned_routes( + async def begin_get_ike_sas( self, resource_group_name: str, - virtual_network_gateway_name: str, + virtual_network_gateway_connection_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.GatewayRouteListResult"]: - """This operation retrieves a list of routes the virtual network gateway has learned, including - routes learned from BGP peers. + ) -> AsyncLROPoller[str]: + """Lists IKE Security Associations for the virtual network gateway connection in the specified + resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.GatewayRouteListResult] + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_learned_routes_initial( + raw_result = await self._get_ike_sas_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -1190,7 +1214,7 @@ async def begin_get_learned_routes( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -1198,7 +1222,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -1214,35 +1238,33 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_learned_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes'} # type: ignore + begin_get_ike_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas'} # type: ignore - async def _get_advertised_routes_initial( + async def _reset_connection_initial( self, resource_group_name: str, - virtual_network_gateway_name: str, - peer: str, + virtual_network_gateway_connection_name: str, **kwargs: Any - ) -> Optional["_models.GatewayRouteListResult"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._get_advertised_routes_initial.metadata['url'] # type: ignore + url = self._reset_connection_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['peer'] = self._serialize.query("peer", peer, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -1253,58 +1275,50 @@ async def _get_advertised_routes_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_advertised_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore + _reset_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection'} # type: ignore - async def begin_get_advertised_routes( + async def begin_reset_connection( self, resource_group_name: str, - virtual_network_gateway_name: str, - peer: str, + virtual_network_gateway_connection_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.GatewayRouteListResult"]: - """This operation retrieves a list of routes the virtual network gateway is advertising to the - specified peer. + ) -> AsyncLROPoller[None]: + """Resets the virtual network gateway connection specified. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param peer: The IP address of the peer. - :type peer: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.GatewayRouteListResult] + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_advertised_routes_initial( + raw_result = await self._reset_connection_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - peer=peer, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -1313,15 +1327,12 @@ async def begin_get_advertised_routes( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -1337,4 +1348,4 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore + begin_reset_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_nat_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_nat_rules_operations.py new file mode 100644 index 000000000000..796e58f989d2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateway_nat_rules_operations.py @@ -0,0 +1,431 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualNetworkGatewayNatRulesOperations: + """VirtualNetworkGatewayNatRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayNatRule": + """Retrieves the details of a nat rule. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkGatewayNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VirtualNetworkGatewayNatRule", + **kwargs: Any + ) -> "_models.VirtualNetworkGatewayNatRule": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(nat_rule_parameters, 'VirtualNetworkGatewayNatRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + nat_rule_parameters: "_models.VirtualNetworkGatewayNatRule", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualNetworkGatewayNatRule"]: + """Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the + existing nat rules. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :param nat_rule_parameters: Parameters supplied to create or Update a Nat Rule. + :type nat_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayNatRule or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + nat_rule_parameters=nat_rule_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + nat_rule_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a nat rule. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore + + def list_by_virtual_network_gateway( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualNetworkGatewayNatRulesResult"]: + """Retrieves all nat rules for a particular virtual network gateway. + + :param resource_group_name: The resource group name of the virtual network gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualNetworkGatewayNatRulesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualNetworkGatewayNatRulesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualNetworkGatewayNatRulesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_virtual_network_gateway.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualNetworkGatewayNatRulesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_virtual_network_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateways_operations.py similarity index 62% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateways_operations.py index 867d69b69201..c34e44dd7246 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_gateways_operations.py @@ -28,7 +28,7 @@ class VirtualNetworkGatewaysOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,9 +55,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -114,7 +114,7 @@ async def begin_create_or_update( :param virtual_network_gateway_name: The name of the virtual network gateway. :type virtual_network_gateway_name: str :param parameters: Parameters supplied to create or update virtual network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -122,7 +122,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -157,7 +157,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -185,7 +185,7 @@ async def get( :type virtual_network_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] @@ -193,8 +193,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -240,7 +240,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -257,6 +258,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -341,15 +343,15 @@ async def _update_tags_initial( virtual_network_gateway_name: str, parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.VirtualNetworkGateway": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + ) -> Optional["_models.VirtualNetworkGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._update_tags_initial.metadata['url'] # type: ignore @@ -376,11 +378,13 @@ async def _update_tags_initial( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -402,7 +406,7 @@ async def begin_update_tags( :param virtual_network_gateway_name: The name of the virtual network gateway. :type virtual_network_gateway_name: str :param parameters: Parameters supplied to update virtual network gateway tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -410,7 +414,7 @@ async def begin_update_tags( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -445,7 +449,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -470,7 +474,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListResult"] @@ -478,8 +482,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -543,7 +547,7 @@ def list_connections( :type virtual_network_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkGatewayListConnectionsResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayListConnectionsResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayListConnectionsResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListConnectionsResult"] @@ -551,8 +555,8 @@ def list_connections( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -615,8 +619,8 @@ async def _reset_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._reset_initial.metadata['url'] # type: ignore @@ -678,7 +682,7 @@ async def begin_reset( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -727,6 +731,115 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore + async def _reset_vpn_client_shared_key_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._reset_vpn_client_shared_key_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_vpn_client_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey'} # type: ignore + + async def begin_reset_vpn_client_shared_key( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Resets the VPN client shared key of the virtual network gateway in the specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_vpn_client_shared_key_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_vpn_client_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey'} # type: ignore + async def _generatevpnclientpackage_initial( self, resource_group_name: str, @@ -739,9 +852,9 @@ async def _generatevpnclientpackage_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._generatevpnclientpackage_initial.metadata['url'] # type: ignore @@ -798,7 +911,7 @@ async def begin_generatevpnclientpackage( :type virtual_network_gateway_name: str :param parameters: Parameters supplied to the generate virtual network gateway VPN client package operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VpnClientParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnClientParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -867,9 +980,9 @@ async def _generate_vpn_profile_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._generate_vpn_profile_initial.metadata['url'] # type: ignore @@ -926,7 +1039,7 @@ async def begin_generate_vpn_profile( :type virtual_network_gateway_name: str :param parameters: Parameters supplied to the generate virtual network gateway VPN client package operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VpnClientParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnClientParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -994,8 +1107,8 @@ async def _get_vpn_profile_package_url_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_vpn_profile_package_url_initial.metadata['url'] # type: ignore @@ -1112,8 +1225,8 @@ async def _get_bgp_peer_status_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_bgp_peer_status_initial.metadata['url'] # type: ignore @@ -1174,7 +1287,7 @@ async def begin_get_bgp_peer_status( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either BgpPeerStatusListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.BgpPeerStatusListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.BgpPeerStatusListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1245,8 +1358,8 @@ async def supported_vpn_devices( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.supported_vpn_devices.metadata['url'] # type: ignore @@ -1292,8 +1405,8 @@ async def _get_learned_routes_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_learned_routes_initial.metadata['url'] # type: ignore @@ -1350,7 +1463,7 @@ async def begin_get_learned_routes( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.GatewayRouteListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.GatewayRouteListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1410,8 +1523,8 @@ async def _get_advertised_routes_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_advertised_routes_initial.metadata['url'] # type: ignore @@ -1472,7 +1585,7 @@ async def begin_get_advertised_routes( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.GatewayRouteListResult] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.GatewayRouteListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -1521,41 +1634,27 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_get_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore - async def vpn_device_configuration_script( + async def _set_vpnclient_ipsec_parameters_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.VpnDeviceScriptParameters", + virtual_network_gateway_name: str, + vpnclient_ipsec_params: "_models.VpnClientIPsecParameters", **kwargs: Any - ) -> str: - """Gets a xml format representation for vpn device configuration script. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection for which the configuration script is generated. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the generate vpn device script operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VpnDeviceScriptParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] + ) -> Optional["_models.VpnClientIPsecParameters"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnClientIPsecParameters"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self.vpn_device_configuration_script.metadata['url'] # type: ignore + url = self._set_vpnclient_ipsec_parameters_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1570,20 +1669,772 @@ async def vpn_device_configuration_script( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnDeviceScriptParameters') + body_content = self._serialize.body(vpnclient_ipsec_params, 'VpnClientIPsecParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _set_vpnclient_ipsec_parameters_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters'} # type: ignore + + async def begin_set_vpnclient_ipsec_parameters( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + vpnclient_ipsec_params: "_models.VpnClientIPsecParameters", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnClientIPsecParameters"]: + """The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of + virtual network gateway in the specified resource group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param vpnclient_ipsec_params: Parameters supplied to the Begin Set vpnclient ipsec parameters + of Virtual Network Gateway P2S client operation through Network resource provider. + :type vpnclient_ipsec_params: ~azure.mgmt.network.v2021_05_01.models.VpnClientIPsecParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnClientIPsecParameters or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnClientIPsecParameters] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._set_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + vpnclient_ipsec_params=vpnclient_ipsec_params, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_set_vpnclient_ipsec_parameters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters'} # type: ignore + + async def _get_vpnclient_ipsec_parameters_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> "_models.VpnClientIPsecParameters": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._get_vpnclient_ipsec_parameters_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - vpn_device_configuration_script.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript'} # type: ignore + _get_vpnclient_ipsec_parameters_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters'} # type: ignore + + async def begin_get_vpnclient_ipsec_parameters( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnClientIPsecParameters"]: + """The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec + policy for P2S client of virtual network gateway in the specified resource group through + Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The virtual network gateway name. + :type virtual_network_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnClientIPsecParameters or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnClientIPsecParameters] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_vpnclient_ipsec_parameters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters'} # type: ignore + + async def vpn_device_configuration_script( + self, + resource_group_name: str, + virtual_network_gateway_connection_name: str, + parameters: "_models.VpnDeviceScriptParameters", + **kwargs: Any + ) -> str: + """Gets a xml format representation for vpn device configuration script. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection for which the configuration script is generated. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the generate vpn device script operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnDeviceScriptParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.vpn_device_configuration_script.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VpnDeviceScriptParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + vpn_device_configuration_script.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript'} # type: ignore + + async def _start_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._start_packet_capture_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnPacketCaptureStartParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture'} # type: ignore + + async def begin_start_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: Optional["_models.VpnPacketCaptureStartParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Starts packet capture on virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to start packet + capture on gateway. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnPacketCaptureStartParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._start_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture'} # type: ignore + + async def _stop_packet_capture_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._stop_packet_capture_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VpnPacketCaptureStopParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _stop_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture'} # type: ignore + + async def begin_stop_packet_capture( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + parameters: "_models.VpnPacketCaptureStopParameters", + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Stops packet capture on virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to stop packet + capture on gateway. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnPacketCaptureStopParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture'} # type: ignore + + async def _get_vpnclient_connection_health_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> Optional["_models.VpnClientConnectionHealthDetailListResult"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnClientConnectionHealthDetailListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._get_vpnclient_connection_health_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnClientConnectionHealthDetailListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_vpnclient_connection_health_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth'} # type: ignore + + async def begin_get_vpnclient_connection_health( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnClientConnectionHealthDetailListResult"]: + """Get VPN client connection health detail per P2S client connection of the virtual network + gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnClientConnectionHealthDetailListResult or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnClientConnectionHealthDetailListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientConnectionHealthDetailListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_vpnclient_connection_health_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnClientConnectionHealthDetailListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_vpnclient_connection_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth'} # type: ignore + + async def _disconnect_virtual_network_gateway_vpn_connections_initial( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._disconnect_virtual_network_gateway_vpn_connections_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'P2SVpnConnectionRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disconnect_virtual_network_gateway_vpn_connections_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections'} # type: ignore + + async def begin_disconnect_virtual_network_gateway_vpn_connections( + self, + resource_group_name: str, + virtual_network_gateway_name: str, + request: "_models.P2SVpnConnectionRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Disconnect vpn connections of virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param request: The parameters are supplied to disconnect vpn connections. + :type request: ~azure.mgmt.network.v2021_05_01.models.P2SVpnConnectionRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._disconnect_virtual_network_gateway_vpn_connections_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_disconnect_virtual_network_gateway_vpn_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_peerings_operations.py similarity index 93% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_peerings_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_peerings_operations.py index 81e529d593ac..14e97dd05ae3 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_network_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_peerings_operations.py @@ -28,7 +28,7 @@ class VirtualNetworkPeeringsOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -55,7 +55,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -73,6 +74,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -142,7 +144,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -173,7 +175,7 @@ async def get( :type virtual_network_peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] @@ -181,8 +183,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -224,6 +226,7 @@ async def _create_or_update_initial( virtual_network_name: str, virtual_network_peering_name: str, virtual_network_peering_parameters: "_models.VirtualNetworkPeering", + sync_remote_address_space: Optional[Union[str, "_models.SyncRemoteAddressSpace"]] = None, **kwargs: Any ) -> "_models.VirtualNetworkPeering": cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] @@ -231,9 +234,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -247,6 +250,8 @@ async def _create_or_update_initial( # Construct parameters query_parameters = {} # type: Dict[str, Any] + if sync_remote_address_space is not None: + query_parameters['syncRemoteAddressSpace'] = self._serialize.query("sync_remote_address_space", sync_remote_address_space, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -283,6 +288,7 @@ async def begin_create_or_update( virtual_network_name: str, virtual_network_peering_name: str, virtual_network_peering_parameters: "_models.VirtualNetworkPeering", + sync_remote_address_space: Optional[Union[str, "_models.SyncRemoteAddressSpace"]] = None, **kwargs: Any ) -> AsyncLROPoller["_models.VirtualNetworkPeering"]: """Creates or updates a peering in the specified virtual network. @@ -295,7 +301,10 @@ async def begin_create_or_update( :type virtual_network_peering_name: str :param virtual_network_peering_parameters: Parameters supplied to the create or update virtual network peering operation. - :type virtual_network_peering_parameters: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering + :type virtual_network_peering_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering + :param sync_remote_address_space: Parameter indicates the intention to sync the peering with + the current address space on the remote vNet after it's updated. + :type sync_remote_address_space: str or ~azure.mgmt.network.v2021_05_01.models.SyncRemoteAddressSpace :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -303,7 +312,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VirtualNetworkPeering or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -319,6 +328,7 @@ async def begin_create_or_update( virtual_network_name=virtual_network_name, virtual_network_peering_name=virtual_network_peering_name, virtual_network_peering_parameters=virtual_network_peering_parameters, + sync_remote_address_space=sync_remote_address_space, cls=lambda x,y,z: x, **kwargs ) @@ -340,7 +350,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -368,7 +378,7 @@ def list( :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkPeeringListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeeringListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeeringListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeeringListResult"] @@ -376,8 +386,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_application_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_taps_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_application_security_groups_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_taps_operations.py index a416b531ec64..3027560715d9 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_application_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_network_taps_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class ApplicationSecurityGroupsOperations: - """ApplicationSecurityGroupsOperations async operations. +class VirtualNetworkTapsOperations: + """VirtualNetworkTapsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - application_security_group_name: str, + tap_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,13 +54,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,20 +85,20 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - application_security_group_name: str, + tap_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified application security group. + """Deletes the specified virtual network tap. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_security_group_name: The name of the application security group. - :type application_security_group_name: str + :param tap_name: The name of the virtual network tap. + :type tap_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +119,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - application_security_group_name=application_security_group_name, + tap_name=tap_name, cls=lambda x,y,z: x, **kwargs ) @@ -131,11 +133,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,38 +149,38 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore async def get( self, resource_group_name: str, - application_security_group_name: str, + tap_name: str, **kwargs: Any - ) -> "_models.ApplicationSecurityGroup": - """Gets information about the specified application security group. + ) -> "_models.VirtualNetworkTap": + """Gets information about the specified virtual network tap. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_security_group_name: The name of the application security group. - :type application_security_group_name: str + :param tap_name: The name of virtual network tap. + :type tap_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup + :return: VirtualNetworkTap, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -199,27 +201,27 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - application_security_group_name: str, - parameters: "_models.ApplicationSecurityGroup", + tap_name: str, + parameters: "_models.VirtualNetworkTap", **kwargs: Any - ) -> "_models.ApplicationSecurityGroup": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + ) -> "_models.VirtualNetworkTap": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -227,7 +229,7 @@ async def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -242,7 +244,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ApplicationSecurityGroup') + body_content = self._serialize.body(parameters, 'VirtualNetworkTap') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -253,45 +255,44 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - application_security_group_name: str, - parameters: "_models.ApplicationSecurityGroup", + tap_name: str, + parameters: "_models.VirtualNetworkTap", **kwargs: Any - ) -> AsyncLROPoller["_models.ApplicationSecurityGroup"]: - """Creates or updates an application security group. + ) -> AsyncLROPoller["_models.VirtualNetworkTap"]: + """Creates or updates a Virtual Network Tap. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_security_group_name: The name of the application security group. - :type application_security_group_name: str - :param parameters: Parameters supplied to the create or update ApplicationSecurityGroup - operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup + :param tap_name: The name of the virtual network tap. + :type tap_name: str + :param parameters: Parameters supplied to the create or update virtual network tap operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ApplicationSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] + :return: An instance of AsyncLROPoller that returns either VirtualNetworkTap or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -300,7 +301,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - application_security_group_name=application_security_group_name, + tap_name=tap_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -310,7 +311,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -318,11 +319,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -334,25 +335,91 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + tap_name: str, + tap_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualNetworkTap": + """Updates an VirtualNetworkTap tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the tap. + :type tap_name: str + :param tap_parameters: Parameters supplied to update VirtualNetworkTap tags. + :type tap_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkTap, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(tap_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore def list_all( self, **kwargs: Any - ) -> AsyncIterable["_models.ApplicationSecurityGroupListResult"]: - """Gets all application security groups in a subscription. + ) -> AsyncIterable["_models.VirtualNetworkTapListResult"]: + """Gets all the VirtualNetworkTaps in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroupListResult] + :return: An iterator like instance of either VirtualNetworkTapListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTapListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTapListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -379,7 +446,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTapListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -400,28 +467,28 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps'} # type: ignore - def list( + def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.ApplicationSecurityGroupListResult"]: - """Gets all the application security groups in a resource group. + ) -> AsyncIterable["_models.VirtualNetworkTapListResult"]: + """Gets all the VirtualNetworkTaps in a subscription. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroupListResult] + :return: An iterator like instance of either VirtualNetworkTapListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTapListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTapListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -431,7 +498,7 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), @@ -449,7 +516,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTapListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -470,4 +537,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_networks_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_networks_operations.py similarity index 86% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_networks_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_networks_operations.py index 4b63cef281b2..5bf6ddd454aa 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_virtual_networks_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_networks_operations.py @@ -28,7 +28,7 @@ class VirtualNetworksOperations: instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,8 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -135,7 +137,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -166,7 +168,7 @@ async def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.VirtualNetwork + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetwork :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] @@ -174,8 +176,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -224,9 +226,9 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -283,7 +285,7 @@ async def begin_create_or_update( :param virtual_network_name: The name of the virtual network. :type virtual_network_name: str :param parameters: Parameters supplied to the create or update virtual network operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VirtualNetwork + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetwork :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -291,7 +293,7 @@ async def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetwork] + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetwork] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] @@ -326,7 +328,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -340,24 +342,37 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore - async def _update_tags_initial( + async def update_tags( self, resource_group_name: str, virtual_network_name: str, parameters: "_models.TagsObject", **kwargs: Any ) -> "_models.VirtualNetwork": + """Updates a virtual network tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to update virtual network tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), @@ -391,78 +406,7 @@ async def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore - - async def begin_update_tags( - self, - resource_group_name: str, - virtual_network_name: str, - parameters: "_models.TagsObject", - **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetwork"]: - """Updates a virtual network tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param parameters: Parameters supplied to update virtual network tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._update_tags_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetwork', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore def list_all( self, @@ -472,7 +416,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] @@ -480,8 +424,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -541,7 +485,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkListResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] @@ -549,8 +493,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -604,7 +548,7 @@ async def check_ip_address_availability( self, resource_group_name: str, virtual_network_name: str, - ip_address: Optional[str] = None, + ip_address: str, **kwargs: Any ) -> "_models.IPAddressAvailabilityResult": """Checks whether a private IP address is available for use. @@ -617,7 +561,7 @@ async def check_ip_address_availability( :type ip_address: str :keyword callable cls: A custom type or function that will be passed the direct response :return: IPAddressAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.IPAddressAvailabilityResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.IPAddressAvailabilityResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IPAddressAvailabilityResult"] @@ -625,8 +569,8 @@ async def check_ip_address_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.check_ip_address_availability.metadata['url'] # type: ignore @@ -639,8 +583,7 @@ async def check_ip_address_availability( # Construct parameters query_parameters = {} # type: Dict[str, Any] - if ip_address is not None: - query_parameters['ipAddress'] = self._serialize.query("ip_address", ip_address, 'str') + query_parameters['ipAddress'] = self._serialize.query("ip_address", ip_address, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -677,7 +620,7 @@ def list_usage( :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListUsageResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkListUsageResult] + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkListUsageResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListUsageResult"] @@ -685,8 +628,8 @@ def list_usage( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_router_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_router_peerings_operations.py new file mode 100644 index 000000000000..875604c22ee5 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_router_peerings_operations.py @@ -0,0 +1,435 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualRouterPeeringsOperations: + """VirtualRouterPeeringsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _delete_initial( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes the specified peering from a Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + **kwargs: Any + ) -> "_models.VirtualRouterPeering": + """Gets the specified Virtual Router Peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the Virtual Router Peering. + :type peering_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualRouterPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + parameters: "_models.VirtualRouterPeering", + **kwargs: Any + ) -> "_models.VirtualRouterPeering": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VirtualRouterPeering') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_router_name: str, + peering_name: str, + parameters: "_models.VirtualRouterPeering", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualRouterPeering"]: + """Creates or updates the specified Virtual Router Peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the Virtual Router Peering. + :type peering_name: str + :param parameters: Parameters supplied to the create or update Virtual Router Peering + operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeering + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualRouterPeering or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeering] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + def list( + self, + resource_group_name: str, + virtual_router_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.VirtualRouterPeeringListResult"]: + """Lists all Virtual Router Peerings in a Virtual Router resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualRouterPeeringListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeeringListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeeringListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('VirtualRouterPeeringListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_routers_operations.py similarity index 77% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_security_groups_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_routers_operations.py index 20bdfafa829b..ad8e445191b8 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_network_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_routers_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class NetworkSecurityGroupsOperations: - """NetworkSecurityGroupsOperations async operations. +class VirtualRoutersOperations: + """VirtualRoutersOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def _delete_initial( self, resource_group_name: str, - network_security_group_name: str, + virtual_router_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -54,13 +54,14 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -71,6 +72,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -78,25 +80,26 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - network_security_group_name: str, + virtual_router_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified network security group. + """Deletes the specified Virtual Router. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -117,7 +120,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + virtual_router_name=virtual_router_name, cls=lambda x,y,z: x, **kwargs ) @@ -131,11 +134,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -147,41 +150,41 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore async def get( self, resource_group_name: str, - network_security_group_name: str, + virtual_router_name: str, expand: Optional[str] = None, **kwargs: Any - ) -> "_models.NetworkSecurityGroup": - """Gets the specified network security group. + ) -> "_models.VirtualRouter": + """Gets the specified Virtual Router. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup + :return: VirtualRouter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualRouter :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -202,37 +205,38 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualRouter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - network_security_group_name: str, - parameters: "_models.NetworkSecurityGroup", + virtual_router_name: str, + parameters: "_models.VirtualRouter", **kwargs: Any - ) -> "_models.NetworkSecurityGroup": - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + ) -> "_models.VirtualRouter": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +251,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkSecurityGroup') + body_content = self._serialize.body(parameters, 'VirtualRouter') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -255,48 +259,48 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualRouter', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualRouter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - network_security_group_name: str, - parameters: "_models.NetworkSecurityGroup", + virtual_router_name: str, + parameters: "_models.VirtualRouter", **kwargs: Any - ) -> AsyncLROPoller["_models.NetworkSecurityGroup"]: - """Creates or updates a network security group in the specified resource group. + ) -> AsyncLROPoller["_models.VirtualRouter"]: + """Creates or updates the specified Virtual Router. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param parameters: Parameters supplied to the create or update Virtual Router. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualRouter :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup] + :return: An instance of AsyncLROPoller that returns either VirtualRouter or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualRouter] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -305,7 +309,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + virtual_router_name=virtual_router_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -315,7 +319,7 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualRouter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -323,11 +327,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -339,26 +343,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore - def list_all( + def list_by_resource_group( self, + resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkSecurityGroupListResult"]: - """Gets all network security groups in a subscription. + ) -> AsyncIterable["_models.VirtualRouterListResult"]: + """Lists all Virtual Routers in a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroupListResult] + :return: An iterator like instance of either VirtualRouterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualRouterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -367,8 +374,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -384,7 +392,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('VirtualRouterListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -397,37 +405,35 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters'} # type: ignore def list( self, - resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkSecurityGroupListResult"]: - """Gets all network security groups in a resource group. + ) -> AsyncIterable["_models.VirtualRouterListResult"]: + """Gets all the Virtual Routers in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroupListResult] + :return: An iterator like instance of either VirtualRouterListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualRouterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -438,7 +444,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -454,7 +459,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('VirtualRouterListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -467,12 +472,13 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_wans_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_wans_operations.py new file mode 100644 index 000000000000..793b53f73832 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_virtual_wans_operations.py @@ -0,0 +1,540 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VirtualWansOperations: + """VirtualWansOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> "_models.VirtualWAN": + """Retrieves the details of a VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being retrieved. + :type virtual_wan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWAN, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWAN + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + wan_parameters: "_models.VirtualWAN", + **kwargs: Any + ) -> "_models.VirtualWAN": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(wan_parameters, 'VirtualWAN') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + virtual_wan_name: str, + wan_parameters: "_models.VirtualWAN", + **kwargs: Any + ) -> AsyncLROPoller["_models.VirtualWAN"]: + """Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being created or updated. + :type virtual_wan_name: str + :param wan_parameters: Parameters supplied to create or update VirtualWAN. + :type wan_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualWAN + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VirtualWAN or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualWAN] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + wan_parameters=wan_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + virtual_wan_name: str, + wan_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VirtualWAN": + """Updates a VirtualWAN tags. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being updated. + :type virtual_wan_name: str + :param wan_parameters: Parameters supplied to Update VirtualWAN tags. + :type wan_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWAN, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWAN + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(wan_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being deleted. + :type virtual_wan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualWANsResult"]: + """Lists all the VirtualWANs in a resource group. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualWANsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualWANsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualWANsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualWANsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListVirtualWANsResult"]: + """Lists all the VirtualWANs in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualWANsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualWANsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualWANsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualWANsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_packet_captures_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_connections_operations.py similarity index 64% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_packet_captures_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_connections_operations.py index 16c4fe7a794a..f8903ee1bef2 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/aio/operations/_packet_captures_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_connections_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class PacketCapturesOperations: - """PacketCapturesOperations async operations. +class VpnConnectionsOperations: + """VpnConnectionsOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,30 +43,92 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _create_initial( + async def get( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, - parameters: "_models.PacketCapture", + gateway_name: str, + connection_name: str, **kwargs: Any - ) -> "_models.PacketCaptureResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + ) -> "_models.VpnConnection": + """Retrieves the details of a vpn connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + vpn_connection_parameters: "_models.VpnConnection", + **kwargs: Any + ) -> "_models.VpnConnection": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -80,65 +142,70 @@ async def _create_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PacketCapture') + body_content = self._serialize.body(vpn_connection_parameters, 'VpnConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore - async def begin_create( + async def begin_create_or_update( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, - parameters: "_models.PacketCapture", + gateway_name: str, + connection_name: str, + vpn_connection_parameters: "_models.VpnConnection", **kwargs: Any - ) -> AsyncLROPoller["_models.PacketCaptureResult"]: - """Create and start a packet capture on the specified VM. + ) -> AsyncLROPoller["_models.VpnConnection"]: + """Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the + existing connection. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str - :param parameters: Parameters that define the create packet capture operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.PacketCapture + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :param vpn_connection_parameters: Parameters supplied to create or Update a VPN Connection. + :type vpn_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PacketCaptureResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.PacketCaptureResult] + :return: An instance of AsyncLROPoller that returns either VpnConnection or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._create_initial( + raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, - parameters=parameters, + gateway_name=gateway_name, + connection_name=connection_name, + vpn_connection_parameters=vpn_connection_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -147,20 +214,20 @@ async def begin_create( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + deserialized = self._deserialize('VpnConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -172,75 +239,13 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore - - async def get( - self, - resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, - **kwargs: Any - ) -> "_models.PacketCaptureResult": - """Gets a packet capture session by name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PacketCaptureResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore async def _delete_initial( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + gateway_name: str, + connection_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -248,15 +253,16 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -266,35 +272,36 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + gateway_name: str, + connection_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified packet capture session. + """Deletes a vpn connection. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the connection. + :type connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -315,8 +322,8 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + gateway_name=gateway_name, + connection_name=connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -329,13 +336,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -347,28 +354,31 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore - async def _stop_initial( + async def _start_packet_capture_initial( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStartParameters"] = None, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._stop_initial.metadata['url'] # type: ignore + url = self._start_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'vpnConnectionName': self._serialize.url("vpn_connection_name", vpn_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -379,8 +389,16 @@ async def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnConnectionPacketCaptureStartParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -388,48 +406,58 @@ async def _stop_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop'} # type: ignore + return deserialized + _start_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture'} # type: ignore - async def begin_stop( + async def begin_start_packet_capture( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStartParameters"] = None, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Stops a specified packet capture session. + ) -> AsyncLROPoller[str]: + """Starts packet capture on Vpn connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_connection_name: The name of the vpn connection. + :type vpn_connection_name: str + :param parameters: Vpn Connection packet capture parameters supplied to start packet capture on + gateway connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnConnectionPacketCaptureStartParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._stop_initial( + raw_result = await self._start_packet_capture_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -438,17 +466,20 @@ async def begin_stop( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'vpnConnectionName': self._serialize.url("vpn_connection_name", vpn_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -460,29 +491,31 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop'} # type: ignore + begin_start_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture'} # type: ignore - async def _get_status_initial( + async def _stop_packet_capture_initial( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStopParameters"] = None, **kwargs: Any - ) -> "_models.PacketCaptureQueryStatusResult": - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_status_initial.metadata['url'] # type: ignore + url = self._stop_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'vpnConnectionName': self._serialize.url("vpn_connection_name", vpn_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -493,9 +526,16 @@ async def _get_status_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnConnectionPacketCaptureStopParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -503,55 +543,58 @@ async def _get_status_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus'} # type: ignore + _stop_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture'} # type: ignore - async def begin_get_status( + async def begin_stop_packet_capture( self, resource_group_name: str, - network_watcher_name: str, - packet_capture_name: str, + gateway_name: str, + vpn_connection_name: str, + parameters: Optional["_models.VpnConnectionPacketCaptureStopParameters"] = None, **kwargs: Any - ) -> AsyncLROPoller["_models.PacketCaptureQueryStatusResult"]: - """Query the status of a running packet capture session. + ) -> AsyncLROPoller[str]: + """Stops packet capture on Vpn connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the Network Watcher resource. - :type network_watcher_name: str - :param packet_capture_name: The name given to the packet capture session. - :type packet_capture_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_connection_name: The name of the vpn connection. + :type vpn_connection_name: str + :param parameters: Vpn Connection packet capture parameters supplied to stop packet capture on + gateway connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnConnectionPacketCaptureStopParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either PacketCaptureQueryStatusResult or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_09_01.models.PacketCaptureQueryStatusResult] + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._get_status_initial( + raw_result = await self._stop_packet_capture_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -560,7 +603,7 @@ async def begin_get_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -568,8 +611,8 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'vpnConnectionName': self._serialize.url("vpn_connection_name", vpn_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -585,32 +628,32 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus'} # type: ignore + begin_stop_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture'} # type: ignore - def list( + def list_by_vpn_gateway( self, resource_group_name: str, - network_watcher_name: str, + gateway_name: str, **kwargs: Any - ) -> AsyncIterable["_models.PacketCaptureListResult"]: - """Lists all packet capture sessions within the specified resource group. + ) -> AsyncIterable["_models.ListVpnConnectionsResult"]: + """Retrieves all vpn connections for a particular virtual wan vpn gateway. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param network_watcher_name: The name of the Network Watcher resource. - :type network_watcher_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PacketCaptureListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_09_01.models.PacketCaptureListResult] + :return: An iterator like instance of either ListVpnConnectionsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnConnectionsResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnConnectionsResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -619,11 +662,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_vpn_gateway.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -638,11 +681,11 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('PacketCaptureListResult', pipeline_response) + deserialized = self._deserialize('ListVpnConnectionsResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, AsyncList(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) async def get_next(next_link=None): request = prepare_request(next_link) @@ -659,4 +702,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures'} # type: ignore + list_by_vpn_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_gateway_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_gateways_operations.py similarity index 64% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_gateway_connections_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_gateways_operations.py index 3f01e631860c..29f36b46cf07 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/aio/operations/_virtual_network_gateway_connections_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_gateways_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkGatewayConnectionsOperations: - """VirtualNetworkGatewayConnectionsOperations async operations. +class VpnGatewaysOperations: + """VpnGatewaysOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,28 +43,86 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + async def get( + self, + resource_group_name: str, + gateway_name: str, + **kwargs: Any + ) -> "_models.VpnGateway": + """Retrieves the details of a virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore + async def _create_or_update_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.VirtualNetworkGatewayConnection", + gateway_name: str, + vpn_gateway_parameters: "_models.VpnGateway", **kwargs: Any - ) -> "_models.VirtualNetworkGatewayConnection": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + ) -> "_models.VpnGateway": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,7 +136,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') + body_content = self._serialize.body(vpn_gateway_parameters, 'VpnGateway') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -89,46 +147,45 @@ async def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('VpnGateway', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.VirtualNetworkGatewayConnection", + gateway_name: str, + vpn_gateway_parameters: "_models.VpnGateway", **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGatewayConnection"]: - """Creates or updates a virtual network gateway connection in the specified resource group. + ) -> AsyncLROPoller["_models.VpnGateway"]: + """Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the create or update virtual network gateway - connection operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnection + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_gateway_parameters: Parameters supplied to create or Update a virtual wan vpn + gateway. + :type vpn_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnGateway :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnection] + :return: An instance of AsyncLROPoller that returns either VpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -137,8 +194,8 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + gateway_name=gateway_name, + vpn_gateway_parameters=vpn_gateway_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -147,19 +204,19 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -171,40 +228,30 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore - async def get( + async def _update_tags_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.TagsObject", **kwargs: Any - ) -> "_models.VirtualNetworkGatewayConnection": - """Gets the specified virtual network gateway connection by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGatewayConnection, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + ) -> Optional["_models.VpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnGateway"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -214,28 +261,105 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_gateway_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore + + async def begin_update_tags( + self, + resource_group_name: str, + gateway_name: str, + vpn_gateway_parameters: "_models.TagsObject", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnGateway"]: + """Updates virtual wan vpn gateway tags. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_gateway_parameters: Parameters supplied to update a virtual wan vpn gateway tags. + :type vpn_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_tags_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_gateway_parameters=vpn_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore async def _delete_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, + gateway_name: str, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -243,14 +367,15 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -260,6 +385,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -272,21 +398,20 @@ async def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore async def begin_delete( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, + gateway_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Deletes the specified virtual network Gateway connection. + """Deletes a virtual wan vpn gateway. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. @@ -307,7 +432,7 @@ async def begin_delete( if cont_token is None: raw_result = await self._delete_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + gateway_name=gateway_name, cls=lambda x,y,z: x, **kwargs ) @@ -320,9 +445,9 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -337,29 +462,27 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore - async def _update_tags_initial( + async def _reset_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.TagsObject", + gateway_name: str, **kwargs: Any - ) -> "_models.VirtualNetworkGatewayConnectionListEntity": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListEntity"] + ) -> Optional["_models.VpnGateway"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnGateway"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self._reset_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -370,66 +493,59 @@ async def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListEntity', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _reset_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset'} # type: ignore - async def begin_update_tags( + async def begin_reset( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.TagsObject", + gateway_name: str, **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetworkGatewayConnectionListEntity"]: - """Updates a virtual network gateway connection tags. + ) -> AsyncLROPoller["_models.VpnGateway"]: + """Resets the primary of the vpn gateway in the specified resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to update virtual network gateway connection tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param gateway_name: The name of the gateway. + :type gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetworkGatewayConnectionListEntity or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionListEntity] + :return: An instance of AsyncLROPoller that returns either VpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListEntity"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._update_tags_initial( + raw_result = await self._reset_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + gateway_name=gateway_name, cls=lambda x,y,z: x, **kwargs ) @@ -438,7 +554,7 @@ async def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListEntity', pipeline_response) + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -446,11 +562,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -462,29 +578,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset'} # type: ignore - async def _set_shared_key_initial( + async def _start_packet_capture_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionSharedKey", + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStartParameters"] = None, **kwargs: Any - ) -> "_models.ConnectionSharedKey": - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._set_shared_key_initial.metadata['url'] # type: ignore + url = self._start_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -499,67 +615,66 @@ async def _set_shared_key_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionSharedKey') + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnGatewayPacketCaptureStartParameters') + else: + body_content = None body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _set_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + _start_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture'} # type: ignore - async def begin_set_shared_key( + async def begin_start_packet_capture( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionSharedKey", + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStartParameters"] = None, **kwargs: Any - ) -> AsyncLROPoller["_models.ConnectionSharedKey"]: - """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + ) -> AsyncLROPoller[str]: + """Starts packet capture on vpn gateway in the specified resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection - Shared key operation throughNetwork resource provider. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ConnectionSharedKey + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param parameters: Vpn gateway packet capture parameters supplied to start packet capture on + vpn gateway. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnGatewayPacketCaptureStartParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ConnectionSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectionSharedKey] + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = await self._set_shared_key_initial( + raw_result = await self._start_packet_capture_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + gateway_name=gateway_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -569,7 +684,7 @@ async def begin_set_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -577,11 +692,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -593,40 +708,29 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + begin_start_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture'} # type: ignore - async def get_shared_key( + async def _stop_packet_capture_initial( self, resource_group_name: str, - virtual_network_gateway_connection_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStopParameters"] = None, **kwargs: Any - ) -> "_models.ConnectionSharedKey": - """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the - specified virtual network gateway connection shared key through Network resource provider. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection shared - key name. - :type virtual_network_gateway_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConnectionSharedKey, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ConnectionSharedKey - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_shared_key.metadata['url'] # type: ignore + url = self._stop_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -637,46 +741,126 @@ async def get_shared_key( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnGatewayPacketCaptureStopParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + _stop_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture'} # type: ignore - def list( + async def begin_stop_packet_capture( + self, + resource_group_name: str, + gateway_name: str, + parameters: Optional["_models.VpnGatewayPacketCaptureStopParameters"] = None, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Stops packet capture on vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param parameters: Vpn gateway packet capture parameters supplied to stop packet capture on vpn + gateway. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnGatewayPacketCaptureStopParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture'} # type: ignore + + def list_by_resource_group( self, resource_group_name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkGatewayConnectionListResult"]: - """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways - connections created. + ) -> AsyncIterable["_models.ListVpnGatewaysResult"]: + """Lists all the VpnGateways in a resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionListResult] + :return: An iterator like instance of either ListVpnGatewaysResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnGatewaysResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewaysResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -685,10 +869,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -703,7 +887,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListResult', pipeline_response) + deserialized = self._deserialize('ListVpnGatewaysResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -724,134 +908,70 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways'} # type: ignore - async def _reset_shared_key_initial( + def list( self, - resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionResetSharedKey", **kwargs: Any - ) -> Optional["_models.ConnectionResetSharedKey"]: - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + ) -> AsyncIterable["_models.ListVpnGatewaysResult"]: + """Lists all the VpnGateways in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnGatewaysResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewaysResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" - # Construct URL - url = self._reset_shared_key_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionResetSharedKey') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnGatewaysResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + async def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, deserialized, {}) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - return deserialized - _reset_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - async def begin_reset_shared_key( - self, - resource_group_name: str, - virtual_network_gateway_connection_name: str, - parameters: "_models.ConnectionResetSharedKey", - **kwargs: Any - ) -> AsyncLROPoller["_models.ConnectionResetSharedKey"]: - """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection reset - shared key Name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the begin reset virtual network gateway connection - shared key operation through network resource provider. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ConnectionResetSharedKey - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either ConnectionResetSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectionResetSharedKey] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return AsyncItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._reset_shared_key_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_link_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_link_connections_operations.py new file mode 100644 index 000000000000..bfea5f061260 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_link_connections_operations.py @@ -0,0 +1,377 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VpnLinkConnectionsOperations: + """VpnLinkConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _reset_connection_initial( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._reset_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection'} # type: ignore + + async def begin_reset_connection( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Resets the VpnLink connection specified. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn link connection. + :type link_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._reset_connection_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection'} # type: ignore + + async def _get_ike_sas_initial( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> Optional[str]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._get_ike_sas_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_ike_sas_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas'} # type: ignore + + async def begin_get_ike_sas( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> AsyncLROPoller[str]: + """Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn link connection. + :type link_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._get_ike_sas_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_ike_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas'} # type: ignore + + def list_by_vpn_connection( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnSiteLinkConnectionsResult"]: + """Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn + connection. + + :param resource_group_name: The resource group name of the vpn gateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSiteLinkConnectionsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnSiteLinkConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSiteLinkConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_vpn_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnSiteLinkConnectionsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_vpn_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py new file mode 100644 index 000000000000..424189e71fac --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py @@ -0,0 +1,160 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VpnServerConfigurationsAssociatedWithVirtualWanOperations: + """VpnServerConfigurationsAssociatedWithVirtualWanOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _list_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> Optional["_models.VpnServerConfigurationsResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnServerConfigurationsResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._list_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfigurationsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations'} # type: ignore + + async def begin_list( + self, + resource_group_name: str, + virtual_wan_name: str, + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnServerConfigurationsResponse"]: + """Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnServerConfigurationsResponse or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigurationsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationsResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._list_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnServerConfigurationsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_server_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_server_configurations_operations.py new file mode 100644 index 000000000000..8f741e79ba32 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_server_configurations_operations.py @@ -0,0 +1,544 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VpnServerConfigurationsOperations: + """VpnServerConfigurationsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> "_models.VpnServerConfiguration": + """Retrieves the details of a VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being retrieved. + :type vpn_server_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + vpn_server_configuration_parameters: "_models.VpnServerConfiguration", + **kwargs: Any + ) -> "_models.VpnServerConfiguration": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_server_configuration_parameters, 'VpnServerConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + vpn_server_configuration_parameters: "_models.VpnServerConfiguration", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnServerConfiguration"]: + """Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing + VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being created or + updated. + :type vpn_server_configuration_name: str + :param vpn_server_configuration_parameters: Parameters supplied to create or update + VpnServerConfiguration. + :type vpn_server_configuration_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnServerConfiguration or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + vpn_server_configuration_parameters=vpn_server_configuration_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + vpn_server_configuration_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VpnServerConfiguration": + """Updates VpnServerConfiguration tags. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being updated. + :type vpn_server_configuration_name: str + :param vpn_server_configuration_parameters: Parameters supplied to update + VpnServerConfiguration tags. + :type vpn_server_configuration_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_server_configuration_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + vpn_server_configuration_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being deleted. + :type vpn_server_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnServerConfigurationsResult"]: + """Lists all the vpnServerConfigurations in a resource group. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnServerConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnServerConfigurationsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnServerConfigurationsResult"]: + """Lists all the VpnServerConfigurations in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationsResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnServerConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnServerConfigurationsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_site_link_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_site_link_connections_operations.py new file mode 100644 index 000000000000..331db947801d --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_site_link_connections_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VpnSiteLinkConnectionsOperations: + """VpnSiteLinkConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + gateway_name: str, + connection_name: str, + link_connection_name: str, + **kwargs: Any + ) -> "_models.VpnSiteLinkConnection": + """Retrieves the details of a vpn site link connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn connection. + :type link_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSiteLinkConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnSiteLinkConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSiteLinkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSiteLinkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_backend_address_pools_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_site_links_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_backend_address_pools_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_site_links_operations.py index 5221191e2b34..cb516ccbe7e0 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_backend_address_pools_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_site_links_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerBackendAddressPoolsOperations: - """LoadBalancerBackendAddressPoolsOperations async operations. +class VpnSiteLinksOperations: + """VpnSiteLinksOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -41,30 +41,92 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - def list( + async def get( self, resource_group_name: str, - load_balancer_name: str, + vpn_site_name: str, + vpn_site_link_name: str, **kwargs: Any - ) -> AsyncIterable["_models.LoadBalancerBackendAddressPoolListResult"]: - """Gets all the load balancer backed address pools. + ) -> "_models.VpnSiteLink": + """Retrieves the details of a VPN site link. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnSite. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param vpn_site_name: The name of the VpnSite. + :type vpn_site_name: str + :param vpn_site_link_name: The name of the VpnSiteLink being retrieved. + :type vpn_site_link_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerBackendAddressPoolListResult] + :return: VpnSiteLink, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnSiteLink :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSiteLink"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + 'vpnSiteLinkName': self._serialize.url("vpn_site_link_name", vpn_site_link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSiteLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}'} # type: ignore + + def list_by_vpn_site( + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnSiteLinksResult"]: + """Lists all the vpnSiteLinks in a resource group for a vpn site. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite. + :type vpn_site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSiteLinksResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnSiteLinksResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSiteLinksResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -73,11 +135,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_vpn_site.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -92,7 +154,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerBackendAddressPoolListResult', pipeline_response) + deserialized = self._deserialize('ListVpnSiteLinksResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,66 +175,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools'} # type: ignore - - async def get( - self, - resource_group_name: str, - load_balancer_name: str, - backend_address_pool_name: str, - **kwargs: Any - ) -> "_models.BackendAddressPool": - """Gets load balancer backend address pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. - :type backend_address_pool_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackendAddressPool, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.BackendAddressPool - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackendAddressPool', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore + list_by_vpn_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_sites_configuration_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_sites_configuration_operations.py new file mode 100644 index 000000000000..8415d1d6c997 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_sites_configuration_operations.py @@ -0,0 +1,162 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VpnSitesConfigurationOperations: + """VpnSitesConfigurationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def _download_initial( + self, + resource_group_name: str, + virtual_wan_name: str, + request: "_models.GetVpnSitesConfigurationRequest", + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._download_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'GetVpnSitesConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _download_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration'} # type: ignore + + async def begin_download( + self, + resource_group_name: str, + virtual_wan_name: str, + request: "_models.GetVpnSitesConfigurationRequest", + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Gives the sas-url to download the configurations for vpn-sites in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN for which configuration of all vpn-sites is + needed. + :type virtual_wan_name: str + :param request: Parameters supplied to download vpn-sites configuration. + :type request: ~azure.mgmt.network.v2021_05_01.models.GetVpnSitesConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._download_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_download.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_sites_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_sites_operations.py new file mode 100644 index 000000000000..0f3490928aa4 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_vpn_sites_operations.py @@ -0,0 +1,540 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VpnSitesOperations: + """VpnSitesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> "_models.VpnSite": + """Retrieves the details of a VPN site. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being retrieved. + :type vpn_site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + async def _create_or_update_initial( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_parameters: "_models.VpnSite", + **kwargs: Any + ) -> "_models.VpnSite": + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_site_parameters, 'VpnSite') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnSite', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_parameters: "_models.VpnSite", + **kwargs: Any + ) -> AsyncLROPoller["_models.VpnSite"]: + """Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being created or updated. + :type vpn_site_name: str + :param vpn_site_parameters: Parameters supplied to create or update VpnSite. + :type vpn_site_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnSite + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VpnSite or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2021_05_01.models.VpnSite] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + vpn_site_parameters=vpn_site_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + async def update_tags( + self, + resource_group_name: str, + vpn_site_name: str, + vpn_site_parameters: "_models.TagsObject", + **kwargs: Any + ) -> "_models.VpnSite": + """Updates VpnSite tags. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being updated. + :type vpn_site_name: str + :param vpn_site_parameters: Parameters supplied to update VpnSite tags. + :type vpn_site_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_site_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + vpn_site_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes a VpnSite. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being deleted. + :type vpn_site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnSitesResult"]: + """Lists all the vpnSites in a resource group. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSitesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnSitesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSitesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnSitesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites'} # type: ignore + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ListVpnSitesResult"]: + """Lists all the VpnSites in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSitesResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnSitesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSitesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnSitesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_web_application_firewall_policies_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_web_application_firewall_policies_operations.py new file mode 100644 index 000000000000..766db7de8178 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_web_application_firewall_policies_operations.py @@ -0,0 +1,416 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WebApplicationFirewallPoliciesOperations: + """WebApplicationFirewallPoliciesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.WebApplicationFirewallPolicyListResult"]: + """Lists all of the protection policies within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebApplicationFirewallPolicyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies'} # type: ignore + + def list_all( + self, + **kwargs: Any + ) -> AsyncIterable["_models.WebApplicationFirewallPolicyListResult"]: + """Gets all the WAF policies in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebApplicationFirewallPolicyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies'} # type: ignore + + async def get( + self, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> "_models.WebApplicationFirewallPolicy": + """Retrieve protection policy with specified name within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param policy_name: The name of the policy. + :type policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + policy_name: str, + parameters: "_models.WebApplicationFirewallPolicy", + **kwargs: Any + ) -> "_models.WebApplicationFirewallPolicy": + """Creates or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param policy_name: The name of the policy. + :type policy_name: str + :param parameters: Policy to be created. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'WebApplicationFirewallPolicy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + async def _delete_initial( + self, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + async def begin_delete( + self, + resource_group_name: str, + policy_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deletes Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param policy_name: The name of the policy. + :type policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_web_categories_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_web_categories_operations.py new file mode 100644 index 000000000000..af8d313683a7 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/aio/operations/_web_categories_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WebCategoriesOperations: + """WebCategoriesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + name: str, + expand: Optional[str] = None, + **kwargs: Any + ) -> "_models.AzureWebCategory": + """Gets the specified Azure Web Category. + + :param name: The name of the azureWebCategory. + :type name: str + :param expand: Expands resourceIds back referenced by the azureWebCategory resource. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureWebCategory, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.AzureWebCategory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureWebCategory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureWebCategory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.AzureWebCategoryListResult"]: + """Gets all the Azure Web Categories in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureWebCategoryListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2021_05_01.models.AzureWebCategoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureWebCategoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('AzureWebCategoryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/__init__.py new file mode 100644 index 000000000000..9378916787c3 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/__init__.py @@ -0,0 +1,2132 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AadAuthenticationParameters + from ._models_py3 import AddressSpace + from ._models_py3 import ApplicationGateway + from ._models_py3 import ApplicationGatewayAuthenticationCertificate + from ._models_py3 import ApplicationGatewayAutoscaleConfiguration + from ._models_py3 import ApplicationGatewayAvailableSslOptions + from ._models_py3 import ApplicationGatewayAvailableSslPredefinedPolicies + from ._models_py3 import ApplicationGatewayAvailableWafRuleSetsResult + from ._models_py3 import ApplicationGatewayBackendAddress + from ._models_py3 import ApplicationGatewayBackendAddressPool + from ._models_py3 import ApplicationGatewayBackendHealth + from ._models_py3 import ApplicationGatewayBackendHealthHttpSettings + from ._models_py3 import ApplicationGatewayBackendHealthOnDemand + from ._models_py3 import ApplicationGatewayBackendHealthPool + from ._models_py3 import ApplicationGatewayBackendHealthServer + from ._models_py3 import ApplicationGatewayBackendHttpSettings + from ._models_py3 import ApplicationGatewayClientAuthConfiguration + from ._models_py3 import ApplicationGatewayConnectionDraining + from ._models_py3 import ApplicationGatewayCustomError + from ._models_py3 import ApplicationGatewayFirewallDisabledRuleGroup + from ._models_py3 import ApplicationGatewayFirewallExclusion + from ._models_py3 import ApplicationGatewayFirewallRule + from ._models_py3 import ApplicationGatewayFirewallRuleGroup + from ._models_py3 import ApplicationGatewayFirewallRuleSet + from ._models_py3 import ApplicationGatewayFrontendIPConfiguration + from ._models_py3 import ApplicationGatewayFrontendPort + from ._models_py3 import ApplicationGatewayGlobalConfiguration + from ._models_py3 import ApplicationGatewayHeaderConfiguration + from ._models_py3 import ApplicationGatewayHttpListener + from ._models_py3 import ApplicationGatewayIPConfiguration + from ._models_py3 import ApplicationGatewayListResult + from ._models_py3 import ApplicationGatewayLoadDistributionPolicy + from ._models_py3 import ApplicationGatewayLoadDistributionTarget + from ._models_py3 import ApplicationGatewayOnDemandProbe + from ._models_py3 import ApplicationGatewayPathRule + from ._models_py3 import ApplicationGatewayPrivateEndpointConnection + from ._models_py3 import ApplicationGatewayPrivateEndpointConnectionListResult + from ._models_py3 import ApplicationGatewayPrivateLinkConfiguration + from ._models_py3 import ApplicationGatewayPrivateLinkIpConfiguration + from ._models_py3 import ApplicationGatewayPrivateLinkResource + from ._models_py3 import ApplicationGatewayPrivateLinkResourceListResult + from ._models_py3 import ApplicationGatewayProbe + from ._models_py3 import ApplicationGatewayProbeHealthResponseMatch + from ._models_py3 import ApplicationGatewayRedirectConfiguration + from ._models_py3 import ApplicationGatewayRequestRoutingRule + from ._models_py3 import ApplicationGatewayRewriteRule + from ._models_py3 import ApplicationGatewayRewriteRuleActionSet + from ._models_py3 import ApplicationGatewayRewriteRuleCondition + from ._models_py3 import ApplicationGatewayRewriteRuleSet + from ._models_py3 import ApplicationGatewaySku + from ._models_py3 import ApplicationGatewaySslCertificate + from ._models_py3 import ApplicationGatewaySslPolicy + from ._models_py3 import ApplicationGatewaySslPredefinedPolicy + from ._models_py3 import ApplicationGatewaySslProfile + from ._models_py3 import ApplicationGatewayTrustedClientCertificate + from ._models_py3 import ApplicationGatewayTrustedRootCertificate + from ._models_py3 import ApplicationGatewayUrlConfiguration + from ._models_py3 import ApplicationGatewayUrlPathMap + from ._models_py3 import ApplicationGatewayWebApplicationFirewallConfiguration + from ._models_py3 import ApplicationRule + from ._models_py3 import ApplicationSecurityGroup + from ._models_py3 import ApplicationSecurityGroupListResult + from ._models_py3 import AuthorizationListResult + from ._models_py3 import AutoApprovedPrivateLinkService + from ._models_py3 import AutoApprovedPrivateLinkServicesResult + from ._models_py3 import Availability + from ._models_py3 import AvailableDelegation + from ._models_py3 import AvailableDelegationsResult + from ._models_py3 import AvailablePrivateEndpointType + from ._models_py3 import AvailablePrivateEndpointTypesResult + from ._models_py3 import AvailableProvidersList + from ._models_py3 import AvailableProvidersListCity + from ._models_py3 import AvailableProvidersListCountry + from ._models_py3 import AvailableProvidersListParameters + from ._models_py3 import AvailableProvidersListState + from ._models_py3 import AvailableServiceAlias + from ._models_py3 import AvailableServiceAliasesResult + from ._models_py3 import AzureAsyncOperationResult + from ._models_py3 import AzureFirewall + from ._models_py3 import AzureFirewallApplicationRule + from ._models_py3 import AzureFirewallApplicationRuleCollection + from ._models_py3 import AzureFirewallApplicationRuleProtocol + from ._models_py3 import AzureFirewallFqdnTag + from ._models_py3 import AzureFirewallFqdnTagListResult + from ._models_py3 import AzureFirewallIPConfiguration + from ._models_py3 import AzureFirewallIpGroups + from ._models_py3 import AzureFirewallListResult + from ._models_py3 import AzureFirewallNatRCAction + from ._models_py3 import AzureFirewallNatRule + from ._models_py3 import AzureFirewallNatRuleCollection + from ._models_py3 import AzureFirewallNetworkRule + from ._models_py3 import AzureFirewallNetworkRuleCollection + from ._models_py3 import AzureFirewallPublicIPAddress + from ._models_py3 import AzureFirewallRCAction + from ._models_py3 import AzureFirewallSku + from ._models_py3 import AzureReachabilityReport + from ._models_py3 import AzureReachabilityReportItem + from ._models_py3 import AzureReachabilityReportLatencyInfo + from ._models_py3 import AzureReachabilityReportLocation + from ._models_py3 import AzureReachabilityReportParameters + from ._models_py3 import AzureWebCategory + from ._models_py3 import AzureWebCategoryListResult + from ._models_py3 import BGPCommunity + from ._models_py3 import BackendAddressInboundNatRulePortMappings + from ._models_py3 import BackendAddressPool + from ._models_py3 import BastionActiveSession + from ._models_py3 import BastionActiveSessionListResult + from ._models_py3 import BastionHost + from ._models_py3 import BastionHostIPConfiguration + from ._models_py3 import BastionHostListResult + from ._models_py3 import BastionSessionDeleteResult + from ._models_py3 import BastionSessionState + from ._models_py3 import BastionShareableLink + from ._models_py3 import BastionShareableLinkListRequest + from ._models_py3 import BastionShareableLinkListResult + from ._models_py3 import BgpConnection + from ._models_py3 import BgpPeerStatus + from ._models_py3 import BgpPeerStatusListResult + from ._models_py3 import BgpServiceCommunity + from ._models_py3 import BgpServiceCommunityListResult + from ._models_py3 import BgpSettings + from ._models_py3 import BreakOutCategoryPolicies + from ._models_py3 import CheckPrivateLinkServiceVisibilityRequest + from ._models_py3 import CloudErrorBody + from ._models_py3 import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties + from ._models_py3 import ConnectionMonitor + from ._models_py3 import ConnectionMonitorDestination + from ._models_py3 import ConnectionMonitorEndpoint + from ._models_py3 import ConnectionMonitorEndpointFilter + from ._models_py3 import ConnectionMonitorEndpointFilterItem + from ._models_py3 import ConnectionMonitorEndpointScope + from ._models_py3 import ConnectionMonitorEndpointScopeItem + from ._models_py3 import ConnectionMonitorHttpConfiguration + from ._models_py3 import ConnectionMonitorIcmpConfiguration + from ._models_py3 import ConnectionMonitorListResult + from ._models_py3 import ConnectionMonitorOutput + from ._models_py3 import ConnectionMonitorParameters + from ._models_py3 import ConnectionMonitorQueryResult + from ._models_py3 import ConnectionMonitorResult + from ._models_py3 import ConnectionMonitorResultProperties + from ._models_py3 import ConnectionMonitorSource + from ._models_py3 import ConnectionMonitorSuccessThreshold + from ._models_py3 import ConnectionMonitorTcpConfiguration + from ._models_py3 import ConnectionMonitorTestConfiguration + from ._models_py3 import ConnectionMonitorTestGroup + from ._models_py3 import ConnectionMonitorWorkspaceSettings + from ._models_py3 import ConnectionResetSharedKey + from ._models_py3 import ConnectionSharedKey + from ._models_py3 import ConnectionStateSnapshot + from ._models_py3 import ConnectivityDestination + from ._models_py3 import ConnectivityHop + from ._models_py3 import ConnectivityInformation + from ._models_py3 import ConnectivityIssue + from ._models_py3 import ConnectivityParameters + from ._models_py3 import ConnectivitySource + from ._models_py3 import Container + from ._models_py3 import ContainerNetworkInterface + from ._models_py3 import ContainerNetworkInterfaceConfiguration + from ._models_py3 import ContainerNetworkInterfaceIpConfiguration + from ._models_py3 import CustomDnsConfigPropertiesFormat + from ._models_py3 import CustomIpPrefix + from ._models_py3 import CustomIpPrefixListResult + from ._models_py3 import DdosCustomPolicy + from ._models_py3 import DdosProtectionPlan + from ._models_py3 import DdosProtectionPlanListResult + from ._models_py3 import DdosSettings + from ._models_py3 import Delegation + from ._models_py3 import DeviceProperties + from ._models_py3 import DhcpOptions + from ._models_py3 import Dimension + from ._models_py3 import DnsNameAvailabilityResult + from ._models_py3 import DnsSettings + from ._models_py3 import DscpConfiguration + from ._models_py3 import DscpConfigurationListResult + from ._models_py3 import EffectiveNetworkSecurityGroup + from ._models_py3 import EffectiveNetworkSecurityGroupAssociation + from ._models_py3 import EffectiveNetworkSecurityGroupListResult + from ._models_py3 import EffectiveNetworkSecurityRule + from ._models_py3 import EffectiveRoute + from ._models_py3 import EffectiveRouteListResult + from ._models_py3 import EffectiveRoutesParameters + from ._models_py3 import EndpointServiceResult + from ._models_py3 import EndpointServicesListResult + from ._models_py3 import Error + from ._models_py3 import ErrorDetails + from ._models_py3 import ErrorResponse + from ._models_py3 import EvaluatedNetworkSecurityGroup + from ._models_py3 import ExclusionManagedRule + from ._models_py3 import ExclusionManagedRuleGroup + from ._models_py3 import ExclusionManagedRuleSet + from ._models_py3 import ExplicitProxySettings + from ._models_py3 import ExpressRouteCircuit + from ._models_py3 import ExpressRouteCircuitArpTable + from ._models_py3 import ExpressRouteCircuitAuthorization + from ._models_py3 import ExpressRouteCircuitConnection + from ._models_py3 import ExpressRouteCircuitConnectionListResult + from ._models_py3 import ExpressRouteCircuitListResult + from ._models_py3 import ExpressRouteCircuitPeering + from ._models_py3 import ExpressRouteCircuitPeeringConfig + from ._models_py3 import ExpressRouteCircuitPeeringId + from ._models_py3 import ExpressRouteCircuitPeeringListResult + from ._models_py3 import ExpressRouteCircuitReference + from ._models_py3 import ExpressRouteCircuitRoutesTable + from ._models_py3 import ExpressRouteCircuitRoutesTableSummary + from ._models_py3 import ExpressRouteCircuitServiceProviderProperties + from ._models_py3 import ExpressRouteCircuitSku + from ._models_py3 import ExpressRouteCircuitStats + from ._models_py3 import ExpressRouteCircuitsArpTableListResult + from ._models_py3 import ExpressRouteCircuitsRoutesTableListResult + from ._models_py3 import ExpressRouteCircuitsRoutesTableSummaryListResult + from ._models_py3 import ExpressRouteConnection + from ._models_py3 import ExpressRouteConnectionId + from ._models_py3 import ExpressRouteConnectionList + from ._models_py3 import ExpressRouteCrossConnection + from ._models_py3 import ExpressRouteCrossConnectionListResult + from ._models_py3 import ExpressRouteCrossConnectionPeering + from ._models_py3 import ExpressRouteCrossConnectionPeeringList + from ._models_py3 import ExpressRouteCrossConnectionRoutesTableSummary + from ._models_py3 import ExpressRouteCrossConnectionsRoutesTableSummaryListResult + from ._models_py3 import ExpressRouteGateway + from ._models_py3 import ExpressRouteGatewayList + from ._models_py3 import ExpressRouteGatewayPropertiesAutoScaleConfiguration + from ._models_py3 import ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds + from ._models_py3 import ExpressRouteLink + from ._models_py3 import ExpressRouteLinkListResult + from ._models_py3 import ExpressRouteLinkMacSecConfig + from ._models_py3 import ExpressRoutePort + from ._models_py3 import ExpressRoutePortListResult + from ._models_py3 import ExpressRoutePortsLocation + from ._models_py3 import ExpressRoutePortsLocationBandwidths + from ._models_py3 import ExpressRoutePortsLocationListResult + from ._models_py3 import ExpressRouteServiceProvider + from ._models_py3 import ExpressRouteServiceProviderBandwidthsOffered + from ._models_py3 import ExpressRouteServiceProviderListResult + from ._models_py3 import ExtendedLocation + from ._models_py3 import FilterItems + from ._models_py3 import FirewallPolicy + from ._models_py3 import FirewallPolicyCertificateAuthority + from ._models_py3 import FirewallPolicyFilterRuleCollection + from ._models_py3 import FirewallPolicyFilterRuleCollectionAction + from ._models_py3 import FirewallPolicyInsights + from ._models_py3 import FirewallPolicyIntrusionDetection + from ._models_py3 import FirewallPolicyIntrusionDetectionBypassTrafficSpecifications + from ._models_py3 import FirewallPolicyIntrusionDetectionConfiguration + from ._models_py3 import FirewallPolicyIntrusionDetectionSignatureSpecification + from ._models_py3 import FirewallPolicyListResult + from ._models_py3 import FirewallPolicyLogAnalyticsResources + from ._models_py3 import FirewallPolicyLogAnalyticsWorkspace + from ._models_py3 import FirewallPolicyNatRuleCollection + from ._models_py3 import FirewallPolicyNatRuleCollectionAction + from ._models_py3 import FirewallPolicyRule + from ._models_py3 import FirewallPolicyRuleApplicationProtocol + from ._models_py3 import FirewallPolicyRuleCollection + from ._models_py3 import FirewallPolicyRuleCollectionGroup + from ._models_py3 import FirewallPolicyRuleCollectionGroupListResult + from ._models_py3 import FirewallPolicySNAT + from ._models_py3 import FirewallPolicySQL + from ._models_py3 import FirewallPolicySku + from ._models_py3 import FirewallPolicyThreatIntelWhitelist + from ._models_py3 import FirewallPolicyTransportSecurity + from ._models_py3 import FlowLog + from ._models_py3 import FlowLogFormatParameters + from ._models_py3 import FlowLogInformation + from ._models_py3 import FlowLogListResult + from ._models_py3 import FlowLogStatusParameters + from ._models_py3 import FrontendIPConfiguration + from ._models_py3 import GatewayLoadBalancerTunnelInterface + from ._models_py3 import GatewayRoute + from ._models_py3 import GatewayRouteListResult + from ._models_py3 import GenerateExpressRoutePortsLOARequest + from ._models_py3 import GenerateExpressRoutePortsLOAResult + from ._models_py3 import GetVpnSitesConfigurationRequest + from ._models_py3 import HTTPConfiguration + from ._models_py3 import HTTPHeader + from ._models_py3 import HopLink + from ._models_py3 import HubIPAddresses + from ._models_py3 import HubIpConfiguration + from ._models_py3 import HubPublicIPAddresses + from ._models_py3 import HubRoute + from ._models_py3 import HubRouteTable + from ._models_py3 import HubVirtualNetworkConnection + from ._models_py3 import IDPSQueryObject + from ._models_py3 import IPAddressAvailabilityResult + from ._models_py3 import IPConfiguration + from ._models_py3 import IPConfigurationBgpPeeringAddress + from ._models_py3 import IPConfigurationProfile + from ._models_py3 import InboundNatPool + from ._models_py3 import InboundNatRule + from ._models_py3 import InboundNatRuleListResult + from ._models_py3 import InboundNatRulePortMapping + from ._models_py3 import InboundSecurityRule + from ._models_py3 import InboundSecurityRules + from ._models_py3 import IpAllocation + from ._models_py3 import IpAllocationListResult + from ._models_py3 import IpGroup + from ._models_py3 import IpGroupListResult + from ._models_py3 import IpTag + from ._models_py3 import IpsecPolicy + from ._models_py3 import Ipv6CircuitConnectionConfig + from ._models_py3 import Ipv6ExpressRouteCircuitPeeringConfig + from ._models_py3 import ListHubRouteTablesResult + from ._models_py3 import ListHubVirtualNetworkConnectionsResult + from ._models_py3 import ListP2SVpnGatewaysResult + from ._models_py3 import ListRoutingIntentResult + from ._models_py3 import ListVirtualHubBgpConnectionResults + from ._models_py3 import ListVirtualHubIpConfigurationResults + from ._models_py3 import ListVirtualHubRouteTableV2SResult + from ._models_py3 import ListVirtualHubsResult + from ._models_py3 import ListVirtualNetworkGatewayNatRulesResult + from ._models_py3 import ListVirtualWANsResult + from ._models_py3 import ListVpnConnectionsResult + from ._models_py3 import ListVpnGatewayNatRulesResult + from ._models_py3 import ListVpnGatewaysResult + from ._models_py3 import ListVpnServerConfigurationsResult + from ._models_py3 import ListVpnSiteLinkConnectionsResult + from ._models_py3 import ListVpnSiteLinksResult + from ._models_py3 import ListVpnSitesResult + from ._models_py3 import LoadBalancer + from ._models_py3 import LoadBalancerBackendAddress + from ._models_py3 import LoadBalancerBackendAddressPoolListResult + from ._models_py3 import LoadBalancerFrontendIPConfigurationListResult + from ._models_py3 import LoadBalancerListResult + from ._models_py3 import LoadBalancerLoadBalancingRuleListResult + from ._models_py3 import LoadBalancerOutboundRuleListResult + from ._models_py3 import LoadBalancerProbeListResult + from ._models_py3 import LoadBalancerSku + from ._models_py3 import LoadBalancerVipSwapRequest + from ._models_py3 import LoadBalancerVipSwapRequestFrontendIPConfiguration + from ._models_py3 import LoadBalancingRule + from ._models_py3 import LocalNetworkGateway + from ._models_py3 import LocalNetworkGatewayListResult + from ._models_py3 import LogSpecification + from ._models_py3 import ManagedRuleGroupOverride + from ._models_py3 import ManagedRuleOverride + from ._models_py3 import ManagedRuleSet + from ._models_py3 import ManagedRulesDefinition + from ._models_py3 import ManagedServiceIdentity + from ._models_py3 import MatchCondition + from ._models_py3 import MatchVariable + from ._models_py3 import MatchedRule + from ._models_py3 import MetricSpecification + from ._models_py3 import NatGateway + from ._models_py3 import NatGatewayListResult + from ._models_py3 import NatGatewaySku + from ._models_py3 import NatRule + from ._models_py3 import NatRulePortMapping + from ._models_py3 import NetworkConfigurationDiagnosticParameters + from ._models_py3 import NetworkConfigurationDiagnosticProfile + from ._models_py3 import NetworkConfigurationDiagnosticResponse + from ._models_py3 import NetworkConfigurationDiagnosticResult + from ._models_py3 import NetworkIntentPolicy + from ._models_py3 import NetworkIntentPolicyConfiguration + from ._models_py3 import NetworkInterface + from ._models_py3 import NetworkInterfaceAssociation + from ._models_py3 import NetworkInterfaceDnsSettings + from ._models_py3 import NetworkInterfaceIPConfiguration + from ._models_py3 import NetworkInterfaceIPConfigurationListResult + from ._models_py3 import NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties + from ._models_py3 import NetworkInterfaceListResult + from ._models_py3 import NetworkInterfaceLoadBalancerListResult + from ._models_py3 import NetworkInterfaceTapConfiguration + from ._models_py3 import NetworkInterfaceTapConfigurationListResult + from ._models_py3 import NetworkProfile + from ._models_py3 import NetworkProfileListResult + from ._models_py3 import NetworkRule + from ._models_py3 import NetworkSecurityGroup + from ._models_py3 import NetworkSecurityGroupListResult + from ._models_py3 import NetworkSecurityGroupResult + from ._models_py3 import NetworkSecurityRulesEvaluationResult + from ._models_py3 import NetworkVirtualAppliance + from ._models_py3 import NetworkVirtualApplianceListResult + from ._models_py3 import NetworkVirtualApplianceSiteListResult + from ._models_py3 import NetworkVirtualApplianceSku + from ._models_py3 import NetworkVirtualApplianceSkuInstances + from ._models_py3 import NetworkVirtualApplianceSkuListResult + from ._models_py3 import NetworkWatcher + from ._models_py3 import NetworkWatcherListResult + from ._models_py3 import NextHopParameters + from ._models_py3 import NextHopResult + from ._models_py3 import O365BreakOutCategoryPolicies + from ._models_py3 import O365PolicyProperties + from ._models_py3 import Office365PolicyProperties + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import OperationListResult + from ._models_py3 import OperationPropertiesFormatServiceSpecification + from ._models_py3 import OrderBy + from ._models_py3 import OutboundRule + from ._models_py3 import OwaspCrsExclusionEntry + from ._models_py3 import P2SConnectionConfiguration + from ._models_py3 import P2SVpnConnectionHealth + from ._models_py3 import P2SVpnConnectionHealthRequest + from ._models_py3 import P2SVpnConnectionRequest + from ._models_py3 import P2SVpnGateway + from ._models_py3 import P2SVpnProfileParameters + from ._models_py3 import PacketCapture + from ._models_py3 import PacketCaptureFilter + from ._models_py3 import PacketCaptureListResult + from ._models_py3 import PacketCaptureParameters + from ._models_py3 import PacketCaptureQueryStatusResult + from ._models_py3 import PacketCaptureResult + from ._models_py3 import PacketCaptureResultProperties + from ._models_py3 import PacketCaptureStorageLocation + from ._models_py3 import PatchRouteFilter + from ._models_py3 import PatchRouteFilterRule + from ._models_py3 import PeerExpressRouteCircuitConnection + from ._models_py3 import PeerExpressRouteCircuitConnectionListResult + from ._models_py3 import PeerRoute + from ._models_py3 import PeerRouteList + from ._models_py3 import PolicySettings + from ._models_py3 import PrepareNetworkPoliciesRequest + from ._models_py3 import PrivateDnsZoneConfig + from ._models_py3 import PrivateDnsZoneGroup + from ._models_py3 import PrivateDnsZoneGroupListResult + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateEndpointIPConfiguration + from ._models_py3 import PrivateEndpointListResult + from ._models_py3 import PrivateLinkService + from ._models_py3 import PrivateLinkServiceConnection + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import PrivateLinkServiceIpConfiguration + from ._models_py3 import PrivateLinkServiceListResult + from ._models_py3 import PrivateLinkServicePropertiesAutoApproval + from ._models_py3 import PrivateLinkServicePropertiesVisibility + from ._models_py3 import PrivateLinkServiceVisibility + from ._models_py3 import Probe + from ._models_py3 import PropagatedRouteTable + from ._models_py3 import ProtocolConfiguration + from ._models_py3 import ProtocolCustomSettingsFormat + from ._models_py3 import PublicIPAddress + from ._models_py3 import PublicIPAddressDnsSettings + from ._models_py3 import PublicIPAddressListResult + from ._models_py3 import PublicIPAddressSku + from ._models_py3 import PublicIPPrefix + from ._models_py3 import PublicIPPrefixListResult + from ._models_py3 import PublicIPPrefixSku + from ._models_py3 import QosDefinition + from ._models_py3 import QosIpRange + from ._models_py3 import QosPortRange + from ._models_py3 import QueryInboundNatRulePortMappingRequest + from ._models_py3 import QueryResults + from ._models_py3 import QueryTroubleshootingParameters + from ._models_py3 import RadiusServer + from ._models_py3 import RecordSet + from ._models_py3 import ReferencedPublicIpAddress + from ._models_py3 import Resource + from ._models_py3 import ResourceNavigationLink + from ._models_py3 import ResourceNavigationLinksListResult + from ._models_py3 import ResourceSet + from ._models_py3 import RetentionPolicyParameters + from ._models_py3 import Route + from ._models_py3 import RouteFilter + from ._models_py3 import RouteFilterListResult + from ._models_py3 import RouteFilterRule + from ._models_py3 import RouteFilterRuleListResult + from ._models_py3 import RouteListResult + from ._models_py3 import RouteTable + from ._models_py3 import RouteTableListResult + from ._models_py3 import RoutingConfiguration + from ._models_py3 import RoutingIntent + from ._models_py3 import RoutingPolicy + from ._models_py3 import SecurityGroupNetworkInterface + from ._models_py3 import SecurityGroupViewParameters + from ._models_py3 import SecurityGroupViewResult + from ._models_py3 import SecurityPartnerProvider + from ._models_py3 import SecurityPartnerProviderListResult + from ._models_py3 import SecurityRule + from ._models_py3 import SecurityRuleAssociations + from ._models_py3 import SecurityRuleListResult + from ._models_py3 import ServiceAssociationLink + from ._models_py3 import ServiceAssociationLinksListResult + from ._models_py3 import ServiceEndpointPolicy + from ._models_py3 import ServiceEndpointPolicyDefinition + from ._models_py3 import ServiceEndpointPolicyDefinitionListResult + from ._models_py3 import ServiceEndpointPolicyListResult + from ._models_py3 import ServiceEndpointPropertiesFormat + from ._models_py3 import ServiceTagInformation + from ._models_py3 import ServiceTagInformationListResult + from ._models_py3 import ServiceTagInformationPropertiesFormat + from ._models_py3 import ServiceTagsListResult + from ._models_py3 import SessionIds + from ._models_py3 import SignatureOverridesFilterValuesQuery + from ._models_py3 import SignatureOverridesFilterValuesResponse + from ._models_py3 import SignaturesOverrides + from ._models_py3 import SignaturesOverridesList + from ._models_py3 import SignaturesOverridesProperties + from ._models_py3 import SingleQueryResult + from ._models_py3 import Sku + from ._models_py3 import StaticRoute + from ._models_py3 import SubResource + from ._models_py3 import Subnet + from ._models_py3 import SubnetAssociation + from ._models_py3 import SubnetListResult + from ._models_py3 import TagsObject + from ._models_py3 import Topology + from ._models_py3 import TopologyAssociation + from ._models_py3 import TopologyParameters + from ._models_py3 import TopologyResource + from ._models_py3 import TrafficAnalyticsConfigurationProperties + from ._models_py3 import TrafficAnalyticsProperties + from ._models_py3 import TrafficSelectorPolicy + from ._models_py3 import TroubleshootingDetails + from ._models_py3 import TroubleshootingParameters + from ._models_py3 import TroubleshootingRecommendedActions + from ._models_py3 import TroubleshootingResult + from ._models_py3 import TunnelConnectionHealth + from ._models_py3 import UnprepareNetworkPoliciesRequest + from ._models_py3 import Usage + from ._models_py3 import UsageName + from ._models_py3 import UsagesListResult + from ._models_py3 import VM + from ._models_py3 import VerificationIPFlowParameters + from ._models_py3 import VerificationIPFlowResult + from ._models_py3 import VirtualApplianceNicProperties + from ._models_py3 import VirtualApplianceSite + from ._models_py3 import VirtualApplianceSkuProperties + from ._models_py3 import VirtualHub + from ._models_py3 import VirtualHubEffectiveRoute + from ._models_py3 import VirtualHubEffectiveRouteList + from ._models_py3 import VirtualHubId + from ._models_py3 import VirtualHubRoute + from ._models_py3 import VirtualHubRouteTable + from ._models_py3 import VirtualHubRouteTableV2 + from ._models_py3 import VirtualHubRouteV2 + from ._models_py3 import VirtualNetwork + from ._models_py3 import VirtualNetworkBgpCommunities + from ._models_py3 import VirtualNetworkConnectionGatewayReference + from ._models_py3 import VirtualNetworkEncryption + from ._models_py3 import VirtualNetworkGateway + from ._models_py3 import VirtualNetworkGatewayConnection + from ._models_py3 import VirtualNetworkGatewayConnectionListEntity + from ._models_py3 import VirtualNetworkGatewayConnectionListResult + from ._models_py3 import VirtualNetworkGatewayIPConfiguration + from ._models_py3 import VirtualNetworkGatewayListConnectionsResult + from ._models_py3 import VirtualNetworkGatewayListResult + from ._models_py3 import VirtualNetworkGatewayNatRule + from ._models_py3 import VirtualNetworkGatewaySku + from ._models_py3 import VirtualNetworkListResult + from ._models_py3 import VirtualNetworkListUsageResult + from ._models_py3 import VirtualNetworkPeering + from ._models_py3 import VirtualNetworkPeeringListResult + from ._models_py3 import VirtualNetworkTap + from ._models_py3 import VirtualNetworkTapListResult + from ._models_py3 import VirtualNetworkUsage + from ._models_py3 import VirtualNetworkUsageName + from ._models_py3 import VirtualRouter + from ._models_py3 import VirtualRouterListResult + from ._models_py3 import VirtualRouterPeering + from ._models_py3 import VirtualRouterPeeringListResult + from ._models_py3 import VirtualWAN + from ._models_py3 import VirtualWanSecurityProvider + from ._models_py3 import VirtualWanSecurityProviders + from ._models_py3 import VirtualWanVpnProfileParameters + from ._models_py3 import VnetRoute + from ._models_py3 import VpnClientConfiguration + from ._models_py3 import VpnClientConnectionHealth + from ._models_py3 import VpnClientConnectionHealthDetail + from ._models_py3 import VpnClientConnectionHealthDetailListResult + from ._models_py3 import VpnClientIPsecParameters + from ._models_py3 import VpnClientParameters + from ._models_py3 import VpnClientRevokedCertificate + from ._models_py3 import VpnClientRootCertificate + from ._models_py3 import VpnConnection + from ._models_py3 import VpnConnectionPacketCaptureStartParameters + from ._models_py3 import VpnConnectionPacketCaptureStopParameters + from ._models_py3 import VpnDeviceScriptParameters + from ._models_py3 import VpnGateway + from ._models_py3 import VpnGatewayIpConfiguration + from ._models_py3 import VpnGatewayNatRule + from ._models_py3 import VpnGatewayPacketCaptureStartParameters + from ._models_py3 import VpnGatewayPacketCaptureStopParameters + from ._models_py3 import VpnLinkBgpSettings + from ._models_py3 import VpnLinkProviderProperties + from ._models_py3 import VpnNatRuleMapping + from ._models_py3 import VpnPacketCaptureStartParameters + from ._models_py3 import VpnPacketCaptureStopParameters + from ._models_py3 import VpnProfileResponse + from ._models_py3 import VpnServerConfigRadiusClientRootCertificate + from ._models_py3 import VpnServerConfigRadiusServerRootCertificate + from ._models_py3 import VpnServerConfigVpnClientRevokedCertificate + from ._models_py3 import VpnServerConfigVpnClientRootCertificate + from ._models_py3 import VpnServerConfiguration + from ._models_py3 import VpnServerConfigurationsResponse + from ._models_py3 import VpnSite + from ._models_py3 import VpnSiteId + from ._models_py3 import VpnSiteLink + from ._models_py3 import VpnSiteLinkConnection + from ._models_py3 import WebApplicationFirewallCustomRule + from ._models_py3 import WebApplicationFirewallPolicy + from ._models_py3 import WebApplicationFirewallPolicyListResult +except (SyntaxError, ImportError): + from ._models import AadAuthenticationParameters # type: ignore + from ._models import AddressSpace # type: ignore + from ._models import ApplicationGateway # type: ignore + from ._models import ApplicationGatewayAuthenticationCertificate # type: ignore + from ._models import ApplicationGatewayAutoscaleConfiguration # type: ignore + from ._models import ApplicationGatewayAvailableSslOptions # type: ignore + from ._models import ApplicationGatewayAvailableSslPredefinedPolicies # type: ignore + from ._models import ApplicationGatewayAvailableWafRuleSetsResult # type: ignore + from ._models import ApplicationGatewayBackendAddress # type: ignore + from ._models import ApplicationGatewayBackendAddressPool # type: ignore + from ._models import ApplicationGatewayBackendHealth # type: ignore + from ._models import ApplicationGatewayBackendHealthHttpSettings # type: ignore + from ._models import ApplicationGatewayBackendHealthOnDemand # type: ignore + from ._models import ApplicationGatewayBackendHealthPool # type: ignore + from ._models import ApplicationGatewayBackendHealthServer # type: ignore + from ._models import ApplicationGatewayBackendHttpSettings # type: ignore + from ._models import ApplicationGatewayClientAuthConfiguration # type: ignore + from ._models import ApplicationGatewayConnectionDraining # type: ignore + from ._models import ApplicationGatewayCustomError # type: ignore + from ._models import ApplicationGatewayFirewallDisabledRuleGroup # type: ignore + from ._models import ApplicationGatewayFirewallExclusion # type: ignore + from ._models import ApplicationGatewayFirewallRule # type: ignore + from ._models import ApplicationGatewayFirewallRuleGroup # type: ignore + from ._models import ApplicationGatewayFirewallRuleSet # type: ignore + from ._models import ApplicationGatewayFrontendIPConfiguration # type: ignore + from ._models import ApplicationGatewayFrontendPort # type: ignore + from ._models import ApplicationGatewayGlobalConfiguration # type: ignore + from ._models import ApplicationGatewayHeaderConfiguration # type: ignore + from ._models import ApplicationGatewayHttpListener # type: ignore + from ._models import ApplicationGatewayIPConfiguration # type: ignore + from ._models import ApplicationGatewayListResult # type: ignore + from ._models import ApplicationGatewayLoadDistributionPolicy # type: ignore + from ._models import ApplicationGatewayLoadDistributionTarget # type: ignore + from ._models import ApplicationGatewayOnDemandProbe # type: ignore + from ._models import ApplicationGatewayPathRule # type: ignore + from ._models import ApplicationGatewayPrivateEndpointConnection # type: ignore + from ._models import ApplicationGatewayPrivateEndpointConnectionListResult # type: ignore + from ._models import ApplicationGatewayPrivateLinkConfiguration # type: ignore + from ._models import ApplicationGatewayPrivateLinkIpConfiguration # type: ignore + from ._models import ApplicationGatewayPrivateLinkResource # type: ignore + from ._models import ApplicationGatewayPrivateLinkResourceListResult # type: ignore + from ._models import ApplicationGatewayProbe # type: ignore + from ._models import ApplicationGatewayProbeHealthResponseMatch # type: ignore + from ._models import ApplicationGatewayRedirectConfiguration # type: ignore + from ._models import ApplicationGatewayRequestRoutingRule # type: ignore + from ._models import ApplicationGatewayRewriteRule # type: ignore + from ._models import ApplicationGatewayRewriteRuleActionSet # type: ignore + from ._models import ApplicationGatewayRewriteRuleCondition # type: ignore + from ._models import ApplicationGatewayRewriteRuleSet # type: ignore + from ._models import ApplicationGatewaySku # type: ignore + from ._models import ApplicationGatewaySslCertificate # type: ignore + from ._models import ApplicationGatewaySslPolicy # type: ignore + from ._models import ApplicationGatewaySslPredefinedPolicy # type: ignore + from ._models import ApplicationGatewaySslProfile # type: ignore + from ._models import ApplicationGatewayTrustedClientCertificate # type: ignore + from ._models import ApplicationGatewayTrustedRootCertificate # type: ignore + from ._models import ApplicationGatewayUrlConfiguration # type: ignore + from ._models import ApplicationGatewayUrlPathMap # type: ignore + from ._models import ApplicationGatewayWebApplicationFirewallConfiguration # type: ignore + from ._models import ApplicationRule # type: ignore + from ._models import ApplicationSecurityGroup # type: ignore + from ._models import ApplicationSecurityGroupListResult # type: ignore + from ._models import AuthorizationListResult # type: ignore + from ._models import AutoApprovedPrivateLinkService # type: ignore + from ._models import AutoApprovedPrivateLinkServicesResult # type: ignore + from ._models import Availability # type: ignore + from ._models import AvailableDelegation # type: ignore + from ._models import AvailableDelegationsResult # type: ignore + from ._models import AvailablePrivateEndpointType # type: ignore + from ._models import AvailablePrivateEndpointTypesResult # type: ignore + from ._models import AvailableProvidersList # type: ignore + from ._models import AvailableProvidersListCity # type: ignore + from ._models import AvailableProvidersListCountry # type: ignore + from ._models import AvailableProvidersListParameters # type: ignore + from ._models import AvailableProvidersListState # type: ignore + from ._models import AvailableServiceAlias # type: ignore + from ._models import AvailableServiceAliasesResult # type: ignore + from ._models import AzureAsyncOperationResult # type: ignore + from ._models import AzureFirewall # type: ignore + from ._models import AzureFirewallApplicationRule # type: ignore + from ._models import AzureFirewallApplicationRuleCollection # type: ignore + from ._models import AzureFirewallApplicationRuleProtocol # type: ignore + from ._models import AzureFirewallFqdnTag # type: ignore + from ._models import AzureFirewallFqdnTagListResult # type: ignore + from ._models import AzureFirewallIPConfiguration # type: ignore + from ._models import AzureFirewallIpGroups # type: ignore + from ._models import AzureFirewallListResult # type: ignore + from ._models import AzureFirewallNatRCAction # type: ignore + from ._models import AzureFirewallNatRule # type: ignore + from ._models import AzureFirewallNatRuleCollection # type: ignore + from ._models import AzureFirewallNetworkRule # type: ignore + from ._models import AzureFirewallNetworkRuleCollection # type: ignore + from ._models import AzureFirewallPublicIPAddress # type: ignore + from ._models import AzureFirewallRCAction # type: ignore + from ._models import AzureFirewallSku # type: ignore + from ._models import AzureReachabilityReport # type: ignore + from ._models import AzureReachabilityReportItem # type: ignore + from ._models import AzureReachabilityReportLatencyInfo # type: ignore + from ._models import AzureReachabilityReportLocation # type: ignore + from ._models import AzureReachabilityReportParameters # type: ignore + from ._models import AzureWebCategory # type: ignore + from ._models import AzureWebCategoryListResult # type: ignore + from ._models import BGPCommunity # type: ignore + from ._models import BackendAddressInboundNatRulePortMappings # type: ignore + from ._models import BackendAddressPool # type: ignore + from ._models import BastionActiveSession # type: ignore + from ._models import BastionActiveSessionListResult # type: ignore + from ._models import BastionHost # type: ignore + from ._models import BastionHostIPConfiguration # type: ignore + from ._models import BastionHostListResult # type: ignore + from ._models import BastionSessionDeleteResult # type: ignore + from ._models import BastionSessionState # type: ignore + from ._models import BastionShareableLink # type: ignore + from ._models import BastionShareableLinkListRequest # type: ignore + from ._models import BastionShareableLinkListResult # type: ignore + from ._models import BgpConnection # type: ignore + from ._models import BgpPeerStatus # type: ignore + from ._models import BgpPeerStatusListResult # type: ignore + from ._models import BgpServiceCommunity # type: ignore + from ._models import BgpServiceCommunityListResult # type: ignore + from ._models import BgpSettings # type: ignore + from ._models import BreakOutCategoryPolicies # type: ignore + from ._models import CheckPrivateLinkServiceVisibilityRequest # type: ignore + from ._models import CloudErrorBody # type: ignore + from ._models import Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties # type: ignore + from ._models import ConnectionMonitor # type: ignore + from ._models import ConnectionMonitorDestination # type: ignore + from ._models import ConnectionMonitorEndpoint # type: ignore + from ._models import ConnectionMonitorEndpointFilter # type: ignore + from ._models import ConnectionMonitorEndpointFilterItem # type: ignore + from ._models import ConnectionMonitorEndpointScope # type: ignore + from ._models import ConnectionMonitorEndpointScopeItem # type: ignore + from ._models import ConnectionMonitorHttpConfiguration # type: ignore + from ._models import ConnectionMonitorIcmpConfiguration # type: ignore + from ._models import ConnectionMonitorListResult # type: ignore + from ._models import ConnectionMonitorOutput # type: ignore + from ._models import ConnectionMonitorParameters # type: ignore + from ._models import ConnectionMonitorQueryResult # type: ignore + from ._models import ConnectionMonitorResult # type: ignore + from ._models import ConnectionMonitorResultProperties # type: ignore + from ._models import ConnectionMonitorSource # type: ignore + from ._models import ConnectionMonitorSuccessThreshold # type: ignore + from ._models import ConnectionMonitorTcpConfiguration # type: ignore + from ._models import ConnectionMonitorTestConfiguration # type: ignore + from ._models import ConnectionMonitorTestGroup # type: ignore + from ._models import ConnectionMonitorWorkspaceSettings # type: ignore + from ._models import ConnectionResetSharedKey # type: ignore + from ._models import ConnectionSharedKey # type: ignore + from ._models import ConnectionStateSnapshot # type: ignore + from ._models import ConnectivityDestination # type: ignore + from ._models import ConnectivityHop # type: ignore + from ._models import ConnectivityInformation # type: ignore + from ._models import ConnectivityIssue # type: ignore + from ._models import ConnectivityParameters # type: ignore + from ._models import ConnectivitySource # type: ignore + from ._models import Container # type: ignore + from ._models import ContainerNetworkInterface # type: ignore + from ._models import ContainerNetworkInterfaceConfiguration # type: ignore + from ._models import ContainerNetworkInterfaceIpConfiguration # type: ignore + from ._models import CustomDnsConfigPropertiesFormat # type: ignore + from ._models import CustomIpPrefix # type: ignore + from ._models import CustomIpPrefixListResult # type: ignore + from ._models import DdosCustomPolicy # type: ignore + from ._models import DdosProtectionPlan # type: ignore + from ._models import DdosProtectionPlanListResult # type: ignore + from ._models import DdosSettings # type: ignore + from ._models import Delegation # type: ignore + from ._models import DeviceProperties # type: ignore + from ._models import DhcpOptions # type: ignore + from ._models import Dimension # type: ignore + from ._models import DnsNameAvailabilityResult # type: ignore + from ._models import DnsSettings # type: ignore + from ._models import DscpConfiguration # type: ignore + from ._models import DscpConfigurationListResult # type: ignore + from ._models import EffectiveNetworkSecurityGroup # type: ignore + from ._models import EffectiveNetworkSecurityGroupAssociation # type: ignore + from ._models import EffectiveNetworkSecurityGroupListResult # type: ignore + from ._models import EffectiveNetworkSecurityRule # type: ignore + from ._models import EffectiveRoute # type: ignore + from ._models import EffectiveRouteListResult # type: ignore + from ._models import EffectiveRoutesParameters # type: ignore + from ._models import EndpointServiceResult # type: ignore + from ._models import EndpointServicesListResult # type: ignore + from ._models import Error # type: ignore + from ._models import ErrorDetails # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import EvaluatedNetworkSecurityGroup # type: ignore + from ._models import ExclusionManagedRule # type: ignore + from ._models import ExclusionManagedRuleGroup # type: ignore + from ._models import ExclusionManagedRuleSet # type: ignore + from ._models import ExplicitProxySettings # type: ignore + from ._models import ExpressRouteCircuit # type: ignore + from ._models import ExpressRouteCircuitArpTable # type: ignore + from ._models import ExpressRouteCircuitAuthorization # type: ignore + from ._models import ExpressRouteCircuitConnection # type: ignore + from ._models import ExpressRouteCircuitConnectionListResult # type: ignore + from ._models import ExpressRouteCircuitListResult # type: ignore + from ._models import ExpressRouteCircuitPeering # type: ignore + from ._models import ExpressRouteCircuitPeeringConfig # type: ignore + from ._models import ExpressRouteCircuitPeeringId # type: ignore + from ._models import ExpressRouteCircuitPeeringListResult # type: ignore + from ._models import ExpressRouteCircuitReference # type: ignore + from ._models import ExpressRouteCircuitRoutesTable # type: ignore + from ._models import ExpressRouteCircuitRoutesTableSummary # type: ignore + from ._models import ExpressRouteCircuitServiceProviderProperties # type: ignore + from ._models import ExpressRouteCircuitSku # type: ignore + from ._models import ExpressRouteCircuitStats # type: ignore + from ._models import ExpressRouteCircuitsArpTableListResult # type: ignore + from ._models import ExpressRouteCircuitsRoutesTableListResult # type: ignore + from ._models import ExpressRouteCircuitsRoutesTableSummaryListResult # type: ignore + from ._models import ExpressRouteConnection # type: ignore + from ._models import ExpressRouteConnectionId # type: ignore + from ._models import ExpressRouteConnectionList # type: ignore + from ._models import ExpressRouteCrossConnection # type: ignore + from ._models import ExpressRouteCrossConnectionListResult # type: ignore + from ._models import ExpressRouteCrossConnectionPeering # type: ignore + from ._models import ExpressRouteCrossConnectionPeeringList # type: ignore + from ._models import ExpressRouteCrossConnectionRoutesTableSummary # type: ignore + from ._models import ExpressRouteCrossConnectionsRoutesTableSummaryListResult # type: ignore + from ._models import ExpressRouteGateway # type: ignore + from ._models import ExpressRouteGatewayList # type: ignore + from ._models import ExpressRouteGatewayPropertiesAutoScaleConfiguration # type: ignore + from ._models import ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds # type: ignore + from ._models import ExpressRouteLink # type: ignore + from ._models import ExpressRouteLinkListResult # type: ignore + from ._models import ExpressRouteLinkMacSecConfig # type: ignore + from ._models import ExpressRoutePort # type: ignore + from ._models import ExpressRoutePortListResult # type: ignore + from ._models import ExpressRoutePortsLocation # type: ignore + from ._models import ExpressRoutePortsLocationBandwidths # type: ignore + from ._models import ExpressRoutePortsLocationListResult # type: ignore + from ._models import ExpressRouteServiceProvider # type: ignore + from ._models import ExpressRouteServiceProviderBandwidthsOffered # type: ignore + from ._models import ExpressRouteServiceProviderListResult # type: ignore + from ._models import ExtendedLocation # type: ignore + from ._models import FilterItems # type: ignore + from ._models import FirewallPolicy # type: ignore + from ._models import FirewallPolicyCertificateAuthority # type: ignore + from ._models import FirewallPolicyFilterRuleCollection # type: ignore + from ._models import FirewallPolicyFilterRuleCollectionAction # type: ignore + from ._models import FirewallPolicyInsights # type: ignore + from ._models import FirewallPolicyIntrusionDetection # type: ignore + from ._models import FirewallPolicyIntrusionDetectionBypassTrafficSpecifications # type: ignore + from ._models import FirewallPolicyIntrusionDetectionConfiguration # type: ignore + from ._models import FirewallPolicyIntrusionDetectionSignatureSpecification # type: ignore + from ._models import FirewallPolicyListResult # type: ignore + from ._models import FirewallPolicyLogAnalyticsResources # type: ignore + from ._models import FirewallPolicyLogAnalyticsWorkspace # type: ignore + from ._models import FirewallPolicyNatRuleCollection # type: ignore + from ._models import FirewallPolicyNatRuleCollectionAction # type: ignore + from ._models import FirewallPolicyRule # type: ignore + from ._models import FirewallPolicyRuleApplicationProtocol # type: ignore + from ._models import FirewallPolicyRuleCollection # type: ignore + from ._models import FirewallPolicyRuleCollectionGroup # type: ignore + from ._models import FirewallPolicyRuleCollectionGroupListResult # type: ignore + from ._models import FirewallPolicySNAT # type: ignore + from ._models import FirewallPolicySQL # type: ignore + from ._models import FirewallPolicySku # type: ignore + from ._models import FirewallPolicyThreatIntelWhitelist # type: ignore + from ._models import FirewallPolicyTransportSecurity # type: ignore + from ._models import FlowLog # type: ignore + from ._models import FlowLogFormatParameters # type: ignore + from ._models import FlowLogInformation # type: ignore + from ._models import FlowLogListResult # type: ignore + from ._models import FlowLogStatusParameters # type: ignore + from ._models import FrontendIPConfiguration # type: ignore + from ._models import GatewayLoadBalancerTunnelInterface # type: ignore + from ._models import GatewayRoute # type: ignore + from ._models import GatewayRouteListResult # type: ignore + from ._models import GenerateExpressRoutePortsLOARequest # type: ignore + from ._models import GenerateExpressRoutePortsLOAResult # type: ignore + from ._models import GetVpnSitesConfigurationRequest # type: ignore + from ._models import HTTPConfiguration # type: ignore + from ._models import HTTPHeader # type: ignore + from ._models import HopLink # type: ignore + from ._models import HubIPAddresses # type: ignore + from ._models import HubIpConfiguration # type: ignore + from ._models import HubPublicIPAddresses # type: ignore + from ._models import HubRoute # type: ignore + from ._models import HubRouteTable # type: ignore + from ._models import HubVirtualNetworkConnection # type: ignore + from ._models import IDPSQueryObject # type: ignore + from ._models import IPAddressAvailabilityResult # type: ignore + from ._models import IPConfiguration # type: ignore + from ._models import IPConfigurationBgpPeeringAddress # type: ignore + from ._models import IPConfigurationProfile # type: ignore + from ._models import InboundNatPool # type: ignore + from ._models import InboundNatRule # type: ignore + from ._models import InboundNatRuleListResult # type: ignore + from ._models import InboundNatRulePortMapping # type: ignore + from ._models import InboundSecurityRule # type: ignore + from ._models import InboundSecurityRules # type: ignore + from ._models import IpAllocation # type: ignore + from ._models import IpAllocationListResult # type: ignore + from ._models import IpGroup # type: ignore + from ._models import IpGroupListResult # type: ignore + from ._models import IpTag # type: ignore + from ._models import IpsecPolicy # type: ignore + from ._models import Ipv6CircuitConnectionConfig # type: ignore + from ._models import Ipv6ExpressRouteCircuitPeeringConfig # type: ignore + from ._models import ListHubRouteTablesResult # type: ignore + from ._models import ListHubVirtualNetworkConnectionsResult # type: ignore + from ._models import ListP2SVpnGatewaysResult # type: ignore + from ._models import ListRoutingIntentResult # type: ignore + from ._models import ListVirtualHubBgpConnectionResults # type: ignore + from ._models import ListVirtualHubIpConfigurationResults # type: ignore + from ._models import ListVirtualHubRouteTableV2SResult # type: ignore + from ._models import ListVirtualHubsResult # type: ignore + from ._models import ListVirtualNetworkGatewayNatRulesResult # type: ignore + from ._models import ListVirtualWANsResult # type: ignore + from ._models import ListVpnConnectionsResult # type: ignore + from ._models import ListVpnGatewayNatRulesResult # type: ignore + from ._models import ListVpnGatewaysResult # type: ignore + from ._models import ListVpnServerConfigurationsResult # type: ignore + from ._models import ListVpnSiteLinkConnectionsResult # type: ignore + from ._models import ListVpnSiteLinksResult # type: ignore + from ._models import ListVpnSitesResult # type: ignore + from ._models import LoadBalancer # type: ignore + from ._models import LoadBalancerBackendAddress # type: ignore + from ._models import LoadBalancerBackendAddressPoolListResult # type: ignore + from ._models import LoadBalancerFrontendIPConfigurationListResult # type: ignore + from ._models import LoadBalancerListResult # type: ignore + from ._models import LoadBalancerLoadBalancingRuleListResult # type: ignore + from ._models import LoadBalancerOutboundRuleListResult # type: ignore + from ._models import LoadBalancerProbeListResult # type: ignore + from ._models import LoadBalancerSku # type: ignore + from ._models import LoadBalancerVipSwapRequest # type: ignore + from ._models import LoadBalancerVipSwapRequestFrontendIPConfiguration # type: ignore + from ._models import LoadBalancingRule # type: ignore + from ._models import LocalNetworkGateway # type: ignore + from ._models import LocalNetworkGatewayListResult # type: ignore + from ._models import LogSpecification # type: ignore + from ._models import ManagedRuleGroupOverride # type: ignore + from ._models import ManagedRuleOverride # type: ignore + from ._models import ManagedRuleSet # type: ignore + from ._models import ManagedRulesDefinition # type: ignore + from ._models import ManagedServiceIdentity # type: ignore + from ._models import MatchCondition # type: ignore + from ._models import MatchVariable # type: ignore + from ._models import MatchedRule # type: ignore + from ._models import MetricSpecification # type: ignore + from ._models import NatGateway # type: ignore + from ._models import NatGatewayListResult # type: ignore + from ._models import NatGatewaySku # type: ignore + from ._models import NatRule # type: ignore + from ._models import NatRulePortMapping # type: ignore + from ._models import NetworkConfigurationDiagnosticParameters # type: ignore + from ._models import NetworkConfigurationDiagnosticProfile # type: ignore + from ._models import NetworkConfigurationDiagnosticResponse # type: ignore + from ._models import NetworkConfigurationDiagnosticResult # type: ignore + from ._models import NetworkIntentPolicy # type: ignore + from ._models import NetworkIntentPolicyConfiguration # type: ignore + from ._models import NetworkInterface # type: ignore + from ._models import NetworkInterfaceAssociation # type: ignore + from ._models import NetworkInterfaceDnsSettings # type: ignore + from ._models import NetworkInterfaceIPConfiguration # type: ignore + from ._models import NetworkInterfaceIPConfigurationListResult # type: ignore + from ._models import NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties # type: ignore + from ._models import NetworkInterfaceListResult # type: ignore + from ._models import NetworkInterfaceLoadBalancerListResult # type: ignore + from ._models import NetworkInterfaceTapConfiguration # type: ignore + from ._models import NetworkInterfaceTapConfigurationListResult # type: ignore + from ._models import NetworkProfile # type: ignore + from ._models import NetworkProfileListResult # type: ignore + from ._models import NetworkRule # type: ignore + from ._models import NetworkSecurityGroup # type: ignore + from ._models import NetworkSecurityGroupListResult # type: ignore + from ._models import NetworkSecurityGroupResult # type: ignore + from ._models import NetworkSecurityRulesEvaluationResult # type: ignore + from ._models import NetworkVirtualAppliance # type: ignore + from ._models import NetworkVirtualApplianceListResult # type: ignore + from ._models import NetworkVirtualApplianceSiteListResult # type: ignore + from ._models import NetworkVirtualApplianceSku # type: ignore + from ._models import NetworkVirtualApplianceSkuInstances # type: ignore + from ._models import NetworkVirtualApplianceSkuListResult # type: ignore + from ._models import NetworkWatcher # type: ignore + from ._models import NetworkWatcherListResult # type: ignore + from ._models import NextHopParameters # type: ignore + from ._models import NextHopResult # type: ignore + from ._models import O365BreakOutCategoryPolicies # type: ignore + from ._models import O365PolicyProperties # type: ignore + from ._models import Office365PolicyProperties # type: ignore + from ._models import Operation # type: ignore + from ._models import OperationDisplay # type: ignore + from ._models import OperationListResult # type: ignore + from ._models import OperationPropertiesFormatServiceSpecification # type: ignore + from ._models import OrderBy # type: ignore + from ._models import OutboundRule # type: ignore + from ._models import OwaspCrsExclusionEntry # type: ignore + from ._models import P2SConnectionConfiguration # type: ignore + from ._models import P2SVpnConnectionHealth # type: ignore + from ._models import P2SVpnConnectionHealthRequest # type: ignore + from ._models import P2SVpnConnectionRequest # type: ignore + from ._models import P2SVpnGateway # type: ignore + from ._models import P2SVpnProfileParameters # type: ignore + from ._models import PacketCapture # type: ignore + from ._models import PacketCaptureFilter # type: ignore + from ._models import PacketCaptureListResult # type: ignore + from ._models import PacketCaptureParameters # type: ignore + from ._models import PacketCaptureQueryStatusResult # type: ignore + from ._models import PacketCaptureResult # type: ignore + from ._models import PacketCaptureResultProperties # type: ignore + from ._models import PacketCaptureStorageLocation # type: ignore + from ._models import PatchRouteFilter # type: ignore + from ._models import PatchRouteFilterRule # type: ignore + from ._models import PeerExpressRouteCircuitConnection # type: ignore + from ._models import PeerExpressRouteCircuitConnectionListResult # type: ignore + from ._models import PeerRoute # type: ignore + from ._models import PeerRouteList # type: ignore + from ._models import PolicySettings # type: ignore + from ._models import PrepareNetworkPoliciesRequest # type: ignore + from ._models import PrivateDnsZoneConfig # type: ignore + from ._models import PrivateDnsZoneGroup # type: ignore + from ._models import PrivateDnsZoneGroupListResult # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateEndpointIPConfiguration # type: ignore + from ._models import PrivateEndpointListResult # type: ignore + from ._models import PrivateLinkService # type: ignore + from ._models import PrivateLinkServiceConnection # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import PrivateLinkServiceIpConfiguration # type: ignore + from ._models import PrivateLinkServiceListResult # type: ignore + from ._models import PrivateLinkServicePropertiesAutoApproval # type: ignore + from ._models import PrivateLinkServicePropertiesVisibility # type: ignore + from ._models import PrivateLinkServiceVisibility # type: ignore + from ._models import Probe # type: ignore + from ._models import PropagatedRouteTable # type: ignore + from ._models import ProtocolConfiguration # type: ignore + from ._models import ProtocolCustomSettingsFormat # type: ignore + from ._models import PublicIPAddress # type: ignore + from ._models import PublicIPAddressDnsSettings # type: ignore + from ._models import PublicIPAddressListResult # type: ignore + from ._models import PublicIPAddressSku # type: ignore + from ._models import PublicIPPrefix # type: ignore + from ._models import PublicIPPrefixListResult # type: ignore + from ._models import PublicIPPrefixSku # type: ignore + from ._models import QosDefinition # type: ignore + from ._models import QosIpRange # type: ignore + from ._models import QosPortRange # type: ignore + from ._models import QueryInboundNatRulePortMappingRequest # type: ignore + from ._models import QueryResults # type: ignore + from ._models import QueryTroubleshootingParameters # type: ignore + from ._models import RadiusServer # type: ignore + from ._models import RecordSet # type: ignore + from ._models import ReferencedPublicIpAddress # type: ignore + from ._models import Resource # type: ignore + from ._models import ResourceNavigationLink # type: ignore + from ._models import ResourceNavigationLinksListResult # type: ignore + from ._models import ResourceSet # type: ignore + from ._models import RetentionPolicyParameters # type: ignore + from ._models import Route # type: ignore + from ._models import RouteFilter # type: ignore + from ._models import RouteFilterListResult # type: ignore + from ._models import RouteFilterRule # type: ignore + from ._models import RouteFilterRuleListResult # type: ignore + from ._models import RouteListResult # type: ignore + from ._models import RouteTable # type: ignore + from ._models import RouteTableListResult # type: ignore + from ._models import RoutingConfiguration # type: ignore + from ._models import RoutingIntent # type: ignore + from ._models import RoutingPolicy # type: ignore + from ._models import SecurityGroupNetworkInterface # type: ignore + from ._models import SecurityGroupViewParameters # type: ignore + from ._models import SecurityGroupViewResult # type: ignore + from ._models import SecurityPartnerProvider # type: ignore + from ._models import SecurityPartnerProviderListResult # type: ignore + from ._models import SecurityRule # type: ignore + from ._models import SecurityRuleAssociations # type: ignore + from ._models import SecurityRuleListResult # type: ignore + from ._models import ServiceAssociationLink # type: ignore + from ._models import ServiceAssociationLinksListResult # type: ignore + from ._models import ServiceEndpointPolicy # type: ignore + from ._models import ServiceEndpointPolicyDefinition # type: ignore + from ._models import ServiceEndpointPolicyDefinitionListResult # type: ignore + from ._models import ServiceEndpointPolicyListResult # type: ignore + from ._models import ServiceEndpointPropertiesFormat # type: ignore + from ._models import ServiceTagInformation # type: ignore + from ._models import ServiceTagInformationListResult # type: ignore + from ._models import ServiceTagInformationPropertiesFormat # type: ignore + from ._models import ServiceTagsListResult # type: ignore + from ._models import SessionIds # type: ignore + from ._models import SignatureOverridesFilterValuesQuery # type: ignore + from ._models import SignatureOverridesFilterValuesResponse # type: ignore + from ._models import SignaturesOverrides # type: ignore + from ._models import SignaturesOverridesList # type: ignore + from ._models import SignaturesOverridesProperties # type: ignore + from ._models import SingleQueryResult # type: ignore + from ._models import Sku # type: ignore + from ._models import StaticRoute # type: ignore + from ._models import SubResource # type: ignore + from ._models import Subnet # type: ignore + from ._models import SubnetAssociation # type: ignore + from ._models import SubnetListResult # type: ignore + from ._models import TagsObject # type: ignore + from ._models import Topology # type: ignore + from ._models import TopologyAssociation # type: ignore + from ._models import TopologyParameters # type: ignore + from ._models import TopologyResource # type: ignore + from ._models import TrafficAnalyticsConfigurationProperties # type: ignore + from ._models import TrafficAnalyticsProperties # type: ignore + from ._models import TrafficSelectorPolicy # type: ignore + from ._models import TroubleshootingDetails # type: ignore + from ._models import TroubleshootingParameters # type: ignore + from ._models import TroubleshootingRecommendedActions # type: ignore + from ._models import TroubleshootingResult # type: ignore + from ._models import TunnelConnectionHealth # type: ignore + from ._models import UnprepareNetworkPoliciesRequest # type: ignore + from ._models import Usage # type: ignore + from ._models import UsageName # type: ignore + from ._models import UsagesListResult # type: ignore + from ._models import VM # type: ignore + from ._models import VerificationIPFlowParameters # type: ignore + from ._models import VerificationIPFlowResult # type: ignore + from ._models import VirtualApplianceNicProperties # type: ignore + from ._models import VirtualApplianceSite # type: ignore + from ._models import VirtualApplianceSkuProperties # type: ignore + from ._models import VirtualHub # type: ignore + from ._models import VirtualHubEffectiveRoute # type: ignore + from ._models import VirtualHubEffectiveRouteList # type: ignore + from ._models import VirtualHubId # type: ignore + from ._models import VirtualHubRoute # type: ignore + from ._models import VirtualHubRouteTable # type: ignore + from ._models import VirtualHubRouteTableV2 # type: ignore + from ._models import VirtualHubRouteV2 # type: ignore + from ._models import VirtualNetwork # type: ignore + from ._models import VirtualNetworkBgpCommunities # type: ignore + from ._models import VirtualNetworkConnectionGatewayReference # type: ignore + from ._models import VirtualNetworkEncryption # type: ignore + from ._models import VirtualNetworkGateway # type: ignore + from ._models import VirtualNetworkGatewayConnection # type: ignore + from ._models import VirtualNetworkGatewayConnectionListEntity # type: ignore + from ._models import VirtualNetworkGatewayConnectionListResult # type: ignore + from ._models import VirtualNetworkGatewayIPConfiguration # type: ignore + from ._models import VirtualNetworkGatewayListConnectionsResult # type: ignore + from ._models import VirtualNetworkGatewayListResult # type: ignore + from ._models import VirtualNetworkGatewayNatRule # type: ignore + from ._models import VirtualNetworkGatewaySku # type: ignore + from ._models import VirtualNetworkListResult # type: ignore + from ._models import VirtualNetworkListUsageResult # type: ignore + from ._models import VirtualNetworkPeering # type: ignore + from ._models import VirtualNetworkPeeringListResult # type: ignore + from ._models import VirtualNetworkTap # type: ignore + from ._models import VirtualNetworkTapListResult # type: ignore + from ._models import VirtualNetworkUsage # type: ignore + from ._models import VirtualNetworkUsageName # type: ignore + from ._models import VirtualRouter # type: ignore + from ._models import VirtualRouterListResult # type: ignore + from ._models import VirtualRouterPeering # type: ignore + from ._models import VirtualRouterPeeringListResult # type: ignore + from ._models import VirtualWAN # type: ignore + from ._models import VirtualWanSecurityProvider # type: ignore + from ._models import VirtualWanSecurityProviders # type: ignore + from ._models import VirtualWanVpnProfileParameters # type: ignore + from ._models import VnetRoute # type: ignore + from ._models import VpnClientConfiguration # type: ignore + from ._models import VpnClientConnectionHealth # type: ignore + from ._models import VpnClientConnectionHealthDetail # type: ignore + from ._models import VpnClientConnectionHealthDetailListResult # type: ignore + from ._models import VpnClientIPsecParameters # type: ignore + from ._models import VpnClientParameters # type: ignore + from ._models import VpnClientRevokedCertificate # type: ignore + from ._models import VpnClientRootCertificate # type: ignore + from ._models import VpnConnection # type: ignore + from ._models import VpnConnectionPacketCaptureStartParameters # type: ignore + from ._models import VpnConnectionPacketCaptureStopParameters # type: ignore + from ._models import VpnDeviceScriptParameters # type: ignore + from ._models import VpnGateway # type: ignore + from ._models import VpnGatewayIpConfiguration # type: ignore + from ._models import VpnGatewayNatRule # type: ignore + from ._models import VpnGatewayPacketCaptureStartParameters # type: ignore + from ._models import VpnGatewayPacketCaptureStopParameters # type: ignore + from ._models import VpnLinkBgpSettings # type: ignore + from ._models import VpnLinkProviderProperties # type: ignore + from ._models import VpnNatRuleMapping # type: ignore + from ._models import VpnPacketCaptureStartParameters # type: ignore + from ._models import VpnPacketCaptureStopParameters # type: ignore + from ._models import VpnProfileResponse # type: ignore + from ._models import VpnServerConfigRadiusClientRootCertificate # type: ignore + from ._models import VpnServerConfigRadiusServerRootCertificate # type: ignore + from ._models import VpnServerConfigVpnClientRevokedCertificate # type: ignore + from ._models import VpnServerConfigVpnClientRootCertificate # type: ignore + from ._models import VpnServerConfiguration # type: ignore + from ._models import VpnServerConfigurationsResponse # type: ignore + from ._models import VpnSite # type: ignore + from ._models import VpnSiteId # type: ignore + from ._models import VpnSiteLink # type: ignore + from ._models import VpnSiteLinkConnection # type: ignore + from ._models import WebApplicationFirewallCustomRule # type: ignore + from ._models import WebApplicationFirewallPolicy # type: ignore + from ._models import WebApplicationFirewallPolicyListResult # type: ignore + +from ._network_management_client_enums import ( + Access, + ApplicationGatewayBackendHealthServerHealth, + ApplicationGatewayCookieBasedAffinity, + ApplicationGatewayCustomErrorStatusCode, + ApplicationGatewayFirewallMode, + ApplicationGatewayLoadDistributionAlgorithm, + ApplicationGatewayOperationalState, + ApplicationGatewayProtocol, + ApplicationGatewayRedirectType, + ApplicationGatewayRequestRoutingRuleType, + ApplicationGatewaySkuName, + ApplicationGatewaySslCipherSuite, + ApplicationGatewaySslPolicyName, + ApplicationGatewaySslPolicyType, + ApplicationGatewaySslProtocol, + ApplicationGatewayTier, + AssociationType, + AuthenticationMethod, + AuthorizationUseStatus, + AzureFirewallApplicationRuleProtocolType, + AzureFirewallNatRCActionType, + AzureFirewallNetworkRuleProtocol, + AzureFirewallRCActionType, + AzureFirewallSkuName, + AzureFirewallSkuTier, + AzureFirewallThreatIntelMode, + BastionConnectProtocol, + BastionHostSkuName, + BgpPeerState, + CircuitConnectionStatus, + CommissionedState, + ConnectionMonitorEndpointFilterItemType, + ConnectionMonitorEndpointFilterType, + ConnectionMonitorSourceStatus, + ConnectionMonitorTestConfigurationProtocol, + ConnectionMonitorType, + ConnectionState, + ConnectionStatus, + CoverageLevel, + DdosCustomPolicyProtocol, + DdosCustomPolicyTriggerSensitivityOverride, + DdosSettingsProtectionCoverage, + DeleteOptions, + DestinationPortBehavior, + DhGroup, + Direction, + EffectiveRouteSource, + EffectiveRouteState, + EffectiveSecurityRuleProtocol, + EndpointType, + EvaluationState, + ExpressRouteCircuitPeeringAdvertisedPublicPrefixState, + ExpressRouteCircuitPeeringState, + ExpressRouteCircuitSkuFamily, + ExpressRouteCircuitSkuTier, + ExpressRouteLinkAdminState, + ExpressRouteLinkConnectorType, + ExpressRouteLinkMacSecCipher, + ExpressRouteLinkMacSecSciState, + ExpressRoutePeeringState, + ExpressRoutePeeringType, + ExpressRoutePortsEncapsulation, + ExtendedLocationTypes, + FirewallPolicyFilterRuleCollectionActionType, + FirewallPolicyIntrusionDetectionProtocol, + FirewallPolicyIntrusionDetectionStateType, + FirewallPolicyNatRuleCollectionActionType, + FirewallPolicyRuleApplicationProtocolType, + FirewallPolicyRuleCollectionType, + FirewallPolicyRuleNetworkProtocol, + FirewallPolicyRuleType, + FirewallPolicySkuTier, + FlowLogFormatType, + GatewayLoadBalancerTunnelInterfaceType, + GatewayLoadBalancerTunnelProtocol, + HTTPConfigurationMethod, + HTTPMethod, + HubBgpConnectionStatus, + HubVirtualNetworkConnectionStatus, + IPAllocationMethod, + IPVersion, + IkeEncryption, + IkeIntegrity, + InboundSecurityRulesProtocol, + IpAllocationType, + IpFlowProtocol, + IpsecEncryption, + IpsecIntegrity, + IssueType, + LoadBalancerOutboundRuleProtocol, + LoadBalancerSkuName, + LoadBalancerSkuTier, + LoadDistribution, + ManagedRuleEnabledState, + NatGatewaySkuName, + NetworkInterfaceMigrationPhase, + NetworkInterfaceNicType, + NetworkOperationStatus, + NextHopType, + OfficeTrafficCategory, + OrderByOrder, + Origin, + OutputType, + OwaspCrsExclusionEntryMatchVariable, + OwaspCrsExclusionEntrySelectorMatchOperator, + PcError, + PcProtocol, + PcStatus, + PfsGroup, + PreferredIPVersion, + PreferredRoutingGateway, + ProbeProtocol, + ProcessorArchitecture, + Protocol, + ProtocolType, + ProvisioningState, + PublicIPAddressMigrationPhase, + PublicIPAddressSkuName, + PublicIPAddressSkuTier, + PublicIPPrefixSkuName, + PublicIPPrefixSkuTier, + ResourceIdentityType, + RouteFilterRuleType, + RouteNextHopType, + RoutingState, + SecurityPartnerProviderConnectionStatus, + SecurityProviderName, + SecurityRuleAccess, + SecurityRuleDirection, + SecurityRuleProtocol, + ServiceProviderProvisioningState, + Severity, + SingleQueryResultDirection, + SingleQueryResultMode, + SingleQueryResultSeverity, + SyncRemoteAddressSpace, + TransportProtocol, + TunnelConnectionStatus, + UsageUnit, + VerbosityLevel, + VirtualNetworkEncryptionEnforcement, + VirtualNetworkGatewayConnectionMode, + VirtualNetworkGatewayConnectionProtocol, + VirtualNetworkGatewayConnectionStatus, + VirtualNetworkGatewayConnectionType, + VirtualNetworkGatewaySkuName, + VirtualNetworkGatewaySkuTier, + VirtualNetworkGatewayType, + VirtualNetworkPeeringLevel, + VirtualNetworkPeeringState, + VirtualNetworkPrivateEndpointNetworkPolicies, + VirtualNetworkPrivateLinkServiceNetworkPolicies, + VirtualWanSecurityProviderType, + VpnAuthenticationType, + VpnClientProtocol, + VpnConnectionStatus, + VpnGatewayGeneration, + VpnGatewayTunnelingProtocol, + VpnLinkConnectionMode, + VpnNatRuleMode, + VpnNatRuleType, + VpnType, + WebApplicationFirewallAction, + WebApplicationFirewallEnabledState, + WebApplicationFirewallMatchVariable, + WebApplicationFirewallMode, + WebApplicationFirewallOperator, + WebApplicationFirewallPolicyResourceState, + WebApplicationFirewallRuleType, + WebApplicationFirewallTransform, +) + +__all__ = [ + 'AadAuthenticationParameters', + 'AddressSpace', + 'ApplicationGateway', + 'ApplicationGatewayAuthenticationCertificate', + 'ApplicationGatewayAutoscaleConfiguration', + 'ApplicationGatewayAvailableSslOptions', + 'ApplicationGatewayAvailableSslPredefinedPolicies', + 'ApplicationGatewayAvailableWafRuleSetsResult', + 'ApplicationGatewayBackendAddress', + 'ApplicationGatewayBackendAddressPool', + 'ApplicationGatewayBackendHealth', + 'ApplicationGatewayBackendHealthHttpSettings', + 'ApplicationGatewayBackendHealthOnDemand', + 'ApplicationGatewayBackendHealthPool', + 'ApplicationGatewayBackendHealthServer', + 'ApplicationGatewayBackendHttpSettings', + 'ApplicationGatewayClientAuthConfiguration', + 'ApplicationGatewayConnectionDraining', + 'ApplicationGatewayCustomError', + 'ApplicationGatewayFirewallDisabledRuleGroup', + 'ApplicationGatewayFirewallExclusion', + 'ApplicationGatewayFirewallRule', + 'ApplicationGatewayFirewallRuleGroup', + 'ApplicationGatewayFirewallRuleSet', + 'ApplicationGatewayFrontendIPConfiguration', + 'ApplicationGatewayFrontendPort', + 'ApplicationGatewayGlobalConfiguration', + 'ApplicationGatewayHeaderConfiguration', + 'ApplicationGatewayHttpListener', + 'ApplicationGatewayIPConfiguration', + 'ApplicationGatewayListResult', + 'ApplicationGatewayLoadDistributionPolicy', + 'ApplicationGatewayLoadDistributionTarget', + 'ApplicationGatewayOnDemandProbe', + 'ApplicationGatewayPathRule', + 'ApplicationGatewayPrivateEndpointConnection', + 'ApplicationGatewayPrivateEndpointConnectionListResult', + 'ApplicationGatewayPrivateLinkConfiguration', + 'ApplicationGatewayPrivateLinkIpConfiguration', + 'ApplicationGatewayPrivateLinkResource', + 'ApplicationGatewayPrivateLinkResourceListResult', + 'ApplicationGatewayProbe', + 'ApplicationGatewayProbeHealthResponseMatch', + 'ApplicationGatewayRedirectConfiguration', + 'ApplicationGatewayRequestRoutingRule', + 'ApplicationGatewayRewriteRule', + 'ApplicationGatewayRewriteRuleActionSet', + 'ApplicationGatewayRewriteRuleCondition', + 'ApplicationGatewayRewriteRuleSet', + 'ApplicationGatewaySku', + 'ApplicationGatewaySslCertificate', + 'ApplicationGatewaySslPolicy', + 'ApplicationGatewaySslPredefinedPolicy', + 'ApplicationGatewaySslProfile', + 'ApplicationGatewayTrustedClientCertificate', + 'ApplicationGatewayTrustedRootCertificate', + 'ApplicationGatewayUrlConfiguration', + 'ApplicationGatewayUrlPathMap', + 'ApplicationGatewayWebApplicationFirewallConfiguration', + 'ApplicationRule', + 'ApplicationSecurityGroup', + 'ApplicationSecurityGroupListResult', + 'AuthorizationListResult', + 'AutoApprovedPrivateLinkService', + 'AutoApprovedPrivateLinkServicesResult', + 'Availability', + 'AvailableDelegation', + 'AvailableDelegationsResult', + 'AvailablePrivateEndpointType', + 'AvailablePrivateEndpointTypesResult', + 'AvailableProvidersList', + 'AvailableProvidersListCity', + 'AvailableProvidersListCountry', + 'AvailableProvidersListParameters', + 'AvailableProvidersListState', + 'AvailableServiceAlias', + 'AvailableServiceAliasesResult', + 'AzureAsyncOperationResult', + 'AzureFirewall', + 'AzureFirewallApplicationRule', + 'AzureFirewallApplicationRuleCollection', + 'AzureFirewallApplicationRuleProtocol', + 'AzureFirewallFqdnTag', + 'AzureFirewallFqdnTagListResult', + 'AzureFirewallIPConfiguration', + 'AzureFirewallIpGroups', + 'AzureFirewallListResult', + 'AzureFirewallNatRCAction', + 'AzureFirewallNatRule', + 'AzureFirewallNatRuleCollection', + 'AzureFirewallNetworkRule', + 'AzureFirewallNetworkRuleCollection', + 'AzureFirewallPublicIPAddress', + 'AzureFirewallRCAction', + 'AzureFirewallSku', + 'AzureReachabilityReport', + 'AzureReachabilityReportItem', + 'AzureReachabilityReportLatencyInfo', + 'AzureReachabilityReportLocation', + 'AzureReachabilityReportParameters', + 'AzureWebCategory', + 'AzureWebCategoryListResult', + 'BGPCommunity', + 'BackendAddressInboundNatRulePortMappings', + 'BackendAddressPool', + 'BastionActiveSession', + 'BastionActiveSessionListResult', + 'BastionHost', + 'BastionHostIPConfiguration', + 'BastionHostListResult', + 'BastionSessionDeleteResult', + 'BastionSessionState', + 'BastionShareableLink', + 'BastionShareableLinkListRequest', + 'BastionShareableLinkListResult', + 'BgpConnection', + 'BgpPeerStatus', + 'BgpPeerStatusListResult', + 'BgpServiceCommunity', + 'BgpServiceCommunityListResult', + 'BgpSettings', + 'BreakOutCategoryPolicies', + 'CheckPrivateLinkServiceVisibilityRequest', + 'CloudErrorBody', + 'Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties', + 'ConnectionMonitor', + 'ConnectionMonitorDestination', + 'ConnectionMonitorEndpoint', + 'ConnectionMonitorEndpointFilter', + 'ConnectionMonitorEndpointFilterItem', + 'ConnectionMonitorEndpointScope', + 'ConnectionMonitorEndpointScopeItem', + 'ConnectionMonitorHttpConfiguration', + 'ConnectionMonitorIcmpConfiguration', + 'ConnectionMonitorListResult', + 'ConnectionMonitorOutput', + 'ConnectionMonitorParameters', + 'ConnectionMonitorQueryResult', + 'ConnectionMonitorResult', + 'ConnectionMonitorResultProperties', + 'ConnectionMonitorSource', + 'ConnectionMonitorSuccessThreshold', + 'ConnectionMonitorTcpConfiguration', + 'ConnectionMonitorTestConfiguration', + 'ConnectionMonitorTestGroup', + 'ConnectionMonitorWorkspaceSettings', + 'ConnectionResetSharedKey', + 'ConnectionSharedKey', + 'ConnectionStateSnapshot', + 'ConnectivityDestination', + 'ConnectivityHop', + 'ConnectivityInformation', + 'ConnectivityIssue', + 'ConnectivityParameters', + 'ConnectivitySource', + 'Container', + 'ContainerNetworkInterface', + 'ContainerNetworkInterfaceConfiguration', + 'ContainerNetworkInterfaceIpConfiguration', + 'CustomDnsConfigPropertiesFormat', + 'CustomIpPrefix', + 'CustomIpPrefixListResult', + 'DdosCustomPolicy', + 'DdosProtectionPlan', + 'DdosProtectionPlanListResult', + 'DdosSettings', + 'Delegation', + 'DeviceProperties', + 'DhcpOptions', + 'Dimension', + 'DnsNameAvailabilityResult', + 'DnsSettings', + 'DscpConfiguration', + 'DscpConfigurationListResult', + 'EffectiveNetworkSecurityGroup', + 'EffectiveNetworkSecurityGroupAssociation', + 'EffectiveNetworkSecurityGroupListResult', + 'EffectiveNetworkSecurityRule', + 'EffectiveRoute', + 'EffectiveRouteListResult', + 'EffectiveRoutesParameters', + 'EndpointServiceResult', + 'EndpointServicesListResult', + 'Error', + 'ErrorDetails', + 'ErrorResponse', + 'EvaluatedNetworkSecurityGroup', + 'ExclusionManagedRule', + 'ExclusionManagedRuleGroup', + 'ExclusionManagedRuleSet', + 'ExplicitProxySettings', + 'ExpressRouteCircuit', + 'ExpressRouteCircuitArpTable', + 'ExpressRouteCircuitAuthorization', + 'ExpressRouteCircuitConnection', + 'ExpressRouteCircuitConnectionListResult', + 'ExpressRouteCircuitListResult', + 'ExpressRouteCircuitPeering', + 'ExpressRouteCircuitPeeringConfig', + 'ExpressRouteCircuitPeeringId', + 'ExpressRouteCircuitPeeringListResult', + 'ExpressRouteCircuitReference', + 'ExpressRouteCircuitRoutesTable', + 'ExpressRouteCircuitRoutesTableSummary', + 'ExpressRouteCircuitServiceProviderProperties', + 'ExpressRouteCircuitSku', + 'ExpressRouteCircuitStats', + 'ExpressRouteCircuitsArpTableListResult', + 'ExpressRouteCircuitsRoutesTableListResult', + 'ExpressRouteCircuitsRoutesTableSummaryListResult', + 'ExpressRouteConnection', + 'ExpressRouteConnectionId', + 'ExpressRouteConnectionList', + 'ExpressRouteCrossConnection', + 'ExpressRouteCrossConnectionListResult', + 'ExpressRouteCrossConnectionPeering', + 'ExpressRouteCrossConnectionPeeringList', + 'ExpressRouteCrossConnectionRoutesTableSummary', + 'ExpressRouteCrossConnectionsRoutesTableSummaryListResult', + 'ExpressRouteGateway', + 'ExpressRouteGatewayList', + 'ExpressRouteGatewayPropertiesAutoScaleConfiguration', + 'ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds', + 'ExpressRouteLink', + 'ExpressRouteLinkListResult', + 'ExpressRouteLinkMacSecConfig', + 'ExpressRoutePort', + 'ExpressRoutePortListResult', + 'ExpressRoutePortsLocation', + 'ExpressRoutePortsLocationBandwidths', + 'ExpressRoutePortsLocationListResult', + 'ExpressRouteServiceProvider', + 'ExpressRouteServiceProviderBandwidthsOffered', + 'ExpressRouteServiceProviderListResult', + 'ExtendedLocation', + 'FilterItems', + 'FirewallPolicy', + 'FirewallPolicyCertificateAuthority', + 'FirewallPolicyFilterRuleCollection', + 'FirewallPolicyFilterRuleCollectionAction', + 'FirewallPolicyInsights', + 'FirewallPolicyIntrusionDetection', + 'FirewallPolicyIntrusionDetectionBypassTrafficSpecifications', + 'FirewallPolicyIntrusionDetectionConfiguration', + 'FirewallPolicyIntrusionDetectionSignatureSpecification', + 'FirewallPolicyListResult', + 'FirewallPolicyLogAnalyticsResources', + 'FirewallPolicyLogAnalyticsWorkspace', + 'FirewallPolicyNatRuleCollection', + 'FirewallPolicyNatRuleCollectionAction', + 'FirewallPolicyRule', + 'FirewallPolicyRuleApplicationProtocol', + 'FirewallPolicyRuleCollection', + 'FirewallPolicyRuleCollectionGroup', + 'FirewallPolicyRuleCollectionGroupListResult', + 'FirewallPolicySNAT', + 'FirewallPolicySQL', + 'FirewallPolicySku', + 'FirewallPolicyThreatIntelWhitelist', + 'FirewallPolicyTransportSecurity', + 'FlowLog', + 'FlowLogFormatParameters', + 'FlowLogInformation', + 'FlowLogListResult', + 'FlowLogStatusParameters', + 'FrontendIPConfiguration', + 'GatewayLoadBalancerTunnelInterface', + 'GatewayRoute', + 'GatewayRouteListResult', + 'GenerateExpressRoutePortsLOARequest', + 'GenerateExpressRoutePortsLOAResult', + 'GetVpnSitesConfigurationRequest', + 'HTTPConfiguration', + 'HTTPHeader', + 'HopLink', + 'HubIPAddresses', + 'HubIpConfiguration', + 'HubPublicIPAddresses', + 'HubRoute', + 'HubRouteTable', + 'HubVirtualNetworkConnection', + 'IDPSQueryObject', + 'IPAddressAvailabilityResult', + 'IPConfiguration', + 'IPConfigurationBgpPeeringAddress', + 'IPConfigurationProfile', + 'InboundNatPool', + 'InboundNatRule', + 'InboundNatRuleListResult', + 'InboundNatRulePortMapping', + 'InboundSecurityRule', + 'InboundSecurityRules', + 'IpAllocation', + 'IpAllocationListResult', + 'IpGroup', + 'IpGroupListResult', + 'IpTag', + 'IpsecPolicy', + 'Ipv6CircuitConnectionConfig', + 'Ipv6ExpressRouteCircuitPeeringConfig', + 'ListHubRouteTablesResult', + 'ListHubVirtualNetworkConnectionsResult', + 'ListP2SVpnGatewaysResult', + 'ListRoutingIntentResult', + 'ListVirtualHubBgpConnectionResults', + 'ListVirtualHubIpConfigurationResults', + 'ListVirtualHubRouteTableV2SResult', + 'ListVirtualHubsResult', + 'ListVirtualNetworkGatewayNatRulesResult', + 'ListVirtualWANsResult', + 'ListVpnConnectionsResult', + 'ListVpnGatewayNatRulesResult', + 'ListVpnGatewaysResult', + 'ListVpnServerConfigurationsResult', + 'ListVpnSiteLinkConnectionsResult', + 'ListVpnSiteLinksResult', + 'ListVpnSitesResult', + 'LoadBalancer', + 'LoadBalancerBackendAddress', + 'LoadBalancerBackendAddressPoolListResult', + 'LoadBalancerFrontendIPConfigurationListResult', + 'LoadBalancerListResult', + 'LoadBalancerLoadBalancingRuleListResult', + 'LoadBalancerOutboundRuleListResult', + 'LoadBalancerProbeListResult', + 'LoadBalancerSku', + 'LoadBalancerVipSwapRequest', + 'LoadBalancerVipSwapRequestFrontendIPConfiguration', + 'LoadBalancingRule', + 'LocalNetworkGateway', + 'LocalNetworkGatewayListResult', + 'LogSpecification', + 'ManagedRuleGroupOverride', + 'ManagedRuleOverride', + 'ManagedRuleSet', + 'ManagedRulesDefinition', + 'ManagedServiceIdentity', + 'MatchCondition', + 'MatchVariable', + 'MatchedRule', + 'MetricSpecification', + 'NatGateway', + 'NatGatewayListResult', + 'NatGatewaySku', + 'NatRule', + 'NatRulePortMapping', + 'NetworkConfigurationDiagnosticParameters', + 'NetworkConfigurationDiagnosticProfile', + 'NetworkConfigurationDiagnosticResponse', + 'NetworkConfigurationDiagnosticResult', + 'NetworkIntentPolicy', + 'NetworkIntentPolicyConfiguration', + 'NetworkInterface', + 'NetworkInterfaceAssociation', + 'NetworkInterfaceDnsSettings', + 'NetworkInterfaceIPConfiguration', + 'NetworkInterfaceIPConfigurationListResult', + 'NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties', + 'NetworkInterfaceListResult', + 'NetworkInterfaceLoadBalancerListResult', + 'NetworkInterfaceTapConfiguration', + 'NetworkInterfaceTapConfigurationListResult', + 'NetworkProfile', + 'NetworkProfileListResult', + 'NetworkRule', + 'NetworkSecurityGroup', + 'NetworkSecurityGroupListResult', + 'NetworkSecurityGroupResult', + 'NetworkSecurityRulesEvaluationResult', + 'NetworkVirtualAppliance', + 'NetworkVirtualApplianceListResult', + 'NetworkVirtualApplianceSiteListResult', + 'NetworkVirtualApplianceSku', + 'NetworkVirtualApplianceSkuInstances', + 'NetworkVirtualApplianceSkuListResult', + 'NetworkWatcher', + 'NetworkWatcherListResult', + 'NextHopParameters', + 'NextHopResult', + 'O365BreakOutCategoryPolicies', + 'O365PolicyProperties', + 'Office365PolicyProperties', + 'Operation', + 'OperationDisplay', + 'OperationListResult', + 'OperationPropertiesFormatServiceSpecification', + 'OrderBy', + 'OutboundRule', + 'OwaspCrsExclusionEntry', + 'P2SConnectionConfiguration', + 'P2SVpnConnectionHealth', + 'P2SVpnConnectionHealthRequest', + 'P2SVpnConnectionRequest', + 'P2SVpnGateway', + 'P2SVpnProfileParameters', + 'PacketCapture', + 'PacketCaptureFilter', + 'PacketCaptureListResult', + 'PacketCaptureParameters', + 'PacketCaptureQueryStatusResult', + 'PacketCaptureResult', + 'PacketCaptureResultProperties', + 'PacketCaptureStorageLocation', + 'PatchRouteFilter', + 'PatchRouteFilterRule', + 'PeerExpressRouteCircuitConnection', + 'PeerExpressRouteCircuitConnectionListResult', + 'PeerRoute', + 'PeerRouteList', + 'PolicySettings', + 'PrepareNetworkPoliciesRequest', + 'PrivateDnsZoneConfig', + 'PrivateDnsZoneGroup', + 'PrivateDnsZoneGroupListResult', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateEndpointIPConfiguration', + 'PrivateEndpointListResult', + 'PrivateLinkService', + 'PrivateLinkServiceConnection', + 'PrivateLinkServiceConnectionState', + 'PrivateLinkServiceIpConfiguration', + 'PrivateLinkServiceListResult', + 'PrivateLinkServicePropertiesAutoApproval', + 'PrivateLinkServicePropertiesVisibility', + 'PrivateLinkServiceVisibility', + 'Probe', + 'PropagatedRouteTable', + 'ProtocolConfiguration', + 'ProtocolCustomSettingsFormat', + 'PublicIPAddress', + 'PublicIPAddressDnsSettings', + 'PublicIPAddressListResult', + 'PublicIPAddressSku', + 'PublicIPPrefix', + 'PublicIPPrefixListResult', + 'PublicIPPrefixSku', + 'QosDefinition', + 'QosIpRange', + 'QosPortRange', + 'QueryInboundNatRulePortMappingRequest', + 'QueryResults', + 'QueryTroubleshootingParameters', + 'RadiusServer', + 'RecordSet', + 'ReferencedPublicIpAddress', + 'Resource', + 'ResourceNavigationLink', + 'ResourceNavigationLinksListResult', + 'ResourceSet', + 'RetentionPolicyParameters', + 'Route', + 'RouteFilter', + 'RouteFilterListResult', + 'RouteFilterRule', + 'RouteFilterRuleListResult', + 'RouteListResult', + 'RouteTable', + 'RouteTableListResult', + 'RoutingConfiguration', + 'RoutingIntent', + 'RoutingPolicy', + 'SecurityGroupNetworkInterface', + 'SecurityGroupViewParameters', + 'SecurityGroupViewResult', + 'SecurityPartnerProvider', + 'SecurityPartnerProviderListResult', + 'SecurityRule', + 'SecurityRuleAssociations', + 'SecurityRuleListResult', + 'ServiceAssociationLink', + 'ServiceAssociationLinksListResult', + 'ServiceEndpointPolicy', + 'ServiceEndpointPolicyDefinition', + 'ServiceEndpointPolicyDefinitionListResult', + 'ServiceEndpointPolicyListResult', + 'ServiceEndpointPropertiesFormat', + 'ServiceTagInformation', + 'ServiceTagInformationListResult', + 'ServiceTagInformationPropertiesFormat', + 'ServiceTagsListResult', + 'SessionIds', + 'SignatureOverridesFilterValuesQuery', + 'SignatureOverridesFilterValuesResponse', + 'SignaturesOverrides', + 'SignaturesOverridesList', + 'SignaturesOverridesProperties', + 'SingleQueryResult', + 'Sku', + 'StaticRoute', + 'SubResource', + 'Subnet', + 'SubnetAssociation', + 'SubnetListResult', + 'TagsObject', + 'Topology', + 'TopologyAssociation', + 'TopologyParameters', + 'TopologyResource', + 'TrafficAnalyticsConfigurationProperties', + 'TrafficAnalyticsProperties', + 'TrafficSelectorPolicy', + 'TroubleshootingDetails', + 'TroubleshootingParameters', + 'TroubleshootingRecommendedActions', + 'TroubleshootingResult', + 'TunnelConnectionHealth', + 'UnprepareNetworkPoliciesRequest', + 'Usage', + 'UsageName', + 'UsagesListResult', + 'VM', + 'VerificationIPFlowParameters', + 'VerificationIPFlowResult', + 'VirtualApplianceNicProperties', + 'VirtualApplianceSite', + 'VirtualApplianceSkuProperties', + 'VirtualHub', + 'VirtualHubEffectiveRoute', + 'VirtualHubEffectiveRouteList', + 'VirtualHubId', + 'VirtualHubRoute', + 'VirtualHubRouteTable', + 'VirtualHubRouteTableV2', + 'VirtualHubRouteV2', + 'VirtualNetwork', + 'VirtualNetworkBgpCommunities', + 'VirtualNetworkConnectionGatewayReference', + 'VirtualNetworkEncryption', + 'VirtualNetworkGateway', + 'VirtualNetworkGatewayConnection', + 'VirtualNetworkGatewayConnectionListEntity', + 'VirtualNetworkGatewayConnectionListResult', + 'VirtualNetworkGatewayIPConfiguration', + 'VirtualNetworkGatewayListConnectionsResult', + 'VirtualNetworkGatewayListResult', + 'VirtualNetworkGatewayNatRule', + 'VirtualNetworkGatewaySku', + 'VirtualNetworkListResult', + 'VirtualNetworkListUsageResult', + 'VirtualNetworkPeering', + 'VirtualNetworkPeeringListResult', + 'VirtualNetworkTap', + 'VirtualNetworkTapListResult', + 'VirtualNetworkUsage', + 'VirtualNetworkUsageName', + 'VirtualRouter', + 'VirtualRouterListResult', + 'VirtualRouterPeering', + 'VirtualRouterPeeringListResult', + 'VirtualWAN', + 'VirtualWanSecurityProvider', + 'VirtualWanSecurityProviders', + 'VirtualWanVpnProfileParameters', + 'VnetRoute', + 'VpnClientConfiguration', + 'VpnClientConnectionHealth', + 'VpnClientConnectionHealthDetail', + 'VpnClientConnectionHealthDetailListResult', + 'VpnClientIPsecParameters', + 'VpnClientParameters', + 'VpnClientRevokedCertificate', + 'VpnClientRootCertificate', + 'VpnConnection', + 'VpnConnectionPacketCaptureStartParameters', + 'VpnConnectionPacketCaptureStopParameters', + 'VpnDeviceScriptParameters', + 'VpnGateway', + 'VpnGatewayIpConfiguration', + 'VpnGatewayNatRule', + 'VpnGatewayPacketCaptureStartParameters', + 'VpnGatewayPacketCaptureStopParameters', + 'VpnLinkBgpSettings', + 'VpnLinkProviderProperties', + 'VpnNatRuleMapping', + 'VpnPacketCaptureStartParameters', + 'VpnPacketCaptureStopParameters', + 'VpnProfileResponse', + 'VpnServerConfigRadiusClientRootCertificate', + 'VpnServerConfigRadiusServerRootCertificate', + 'VpnServerConfigVpnClientRevokedCertificate', + 'VpnServerConfigVpnClientRootCertificate', + 'VpnServerConfiguration', + 'VpnServerConfigurationsResponse', + 'VpnSite', + 'VpnSiteId', + 'VpnSiteLink', + 'VpnSiteLinkConnection', + 'WebApplicationFirewallCustomRule', + 'WebApplicationFirewallPolicy', + 'WebApplicationFirewallPolicyListResult', + 'Access', + 'ApplicationGatewayBackendHealthServerHealth', + 'ApplicationGatewayCookieBasedAffinity', + 'ApplicationGatewayCustomErrorStatusCode', + 'ApplicationGatewayFirewallMode', + 'ApplicationGatewayLoadDistributionAlgorithm', + 'ApplicationGatewayOperationalState', + 'ApplicationGatewayProtocol', + 'ApplicationGatewayRedirectType', + 'ApplicationGatewayRequestRoutingRuleType', + 'ApplicationGatewaySkuName', + 'ApplicationGatewaySslCipherSuite', + 'ApplicationGatewaySslPolicyName', + 'ApplicationGatewaySslPolicyType', + 'ApplicationGatewaySslProtocol', + 'ApplicationGatewayTier', + 'AssociationType', + 'AuthenticationMethod', + 'AuthorizationUseStatus', + 'AzureFirewallApplicationRuleProtocolType', + 'AzureFirewallNatRCActionType', + 'AzureFirewallNetworkRuleProtocol', + 'AzureFirewallRCActionType', + 'AzureFirewallSkuName', + 'AzureFirewallSkuTier', + 'AzureFirewallThreatIntelMode', + 'BastionConnectProtocol', + 'BastionHostSkuName', + 'BgpPeerState', + 'CircuitConnectionStatus', + 'CommissionedState', + 'ConnectionMonitorEndpointFilterItemType', + 'ConnectionMonitorEndpointFilterType', + 'ConnectionMonitorSourceStatus', + 'ConnectionMonitorTestConfigurationProtocol', + 'ConnectionMonitorType', + 'ConnectionState', + 'ConnectionStatus', + 'CoverageLevel', + 'DdosCustomPolicyProtocol', + 'DdosCustomPolicyTriggerSensitivityOverride', + 'DdosSettingsProtectionCoverage', + 'DeleteOptions', + 'DestinationPortBehavior', + 'DhGroup', + 'Direction', + 'EffectiveRouteSource', + 'EffectiveRouteState', + 'EffectiveSecurityRuleProtocol', + 'EndpointType', + 'EvaluationState', + 'ExpressRouteCircuitPeeringAdvertisedPublicPrefixState', + 'ExpressRouteCircuitPeeringState', + 'ExpressRouteCircuitSkuFamily', + 'ExpressRouteCircuitSkuTier', + 'ExpressRouteLinkAdminState', + 'ExpressRouteLinkConnectorType', + 'ExpressRouteLinkMacSecCipher', + 'ExpressRouteLinkMacSecSciState', + 'ExpressRoutePeeringState', + 'ExpressRoutePeeringType', + 'ExpressRoutePortsEncapsulation', + 'ExtendedLocationTypes', + 'FirewallPolicyFilterRuleCollectionActionType', + 'FirewallPolicyIntrusionDetectionProtocol', + 'FirewallPolicyIntrusionDetectionStateType', + 'FirewallPolicyNatRuleCollectionActionType', + 'FirewallPolicyRuleApplicationProtocolType', + 'FirewallPolicyRuleCollectionType', + 'FirewallPolicyRuleNetworkProtocol', + 'FirewallPolicyRuleType', + 'FirewallPolicySkuTier', + 'FlowLogFormatType', + 'GatewayLoadBalancerTunnelInterfaceType', + 'GatewayLoadBalancerTunnelProtocol', + 'HTTPConfigurationMethod', + 'HTTPMethod', + 'HubBgpConnectionStatus', + 'HubVirtualNetworkConnectionStatus', + 'IPAllocationMethod', + 'IPVersion', + 'IkeEncryption', + 'IkeIntegrity', + 'InboundSecurityRulesProtocol', + 'IpAllocationType', + 'IpFlowProtocol', + 'IpsecEncryption', + 'IpsecIntegrity', + 'IssueType', + 'LoadBalancerOutboundRuleProtocol', + 'LoadBalancerSkuName', + 'LoadBalancerSkuTier', + 'LoadDistribution', + 'ManagedRuleEnabledState', + 'NatGatewaySkuName', + 'NetworkInterfaceMigrationPhase', + 'NetworkInterfaceNicType', + 'NetworkOperationStatus', + 'NextHopType', + 'OfficeTrafficCategory', + 'OrderByOrder', + 'Origin', + 'OutputType', + 'OwaspCrsExclusionEntryMatchVariable', + 'OwaspCrsExclusionEntrySelectorMatchOperator', + 'PcError', + 'PcProtocol', + 'PcStatus', + 'PfsGroup', + 'PreferredIPVersion', + 'PreferredRoutingGateway', + 'ProbeProtocol', + 'ProcessorArchitecture', + 'Protocol', + 'ProtocolType', + 'ProvisioningState', + 'PublicIPAddressMigrationPhase', + 'PublicIPAddressSkuName', + 'PublicIPAddressSkuTier', + 'PublicIPPrefixSkuName', + 'PublicIPPrefixSkuTier', + 'ResourceIdentityType', + 'RouteFilterRuleType', + 'RouteNextHopType', + 'RoutingState', + 'SecurityPartnerProviderConnectionStatus', + 'SecurityProviderName', + 'SecurityRuleAccess', + 'SecurityRuleDirection', + 'SecurityRuleProtocol', + 'ServiceProviderProvisioningState', + 'Severity', + 'SingleQueryResultDirection', + 'SingleQueryResultMode', + 'SingleQueryResultSeverity', + 'SyncRemoteAddressSpace', + 'TransportProtocol', + 'TunnelConnectionStatus', + 'UsageUnit', + 'VerbosityLevel', + 'VirtualNetworkEncryptionEnforcement', + 'VirtualNetworkGatewayConnectionMode', + 'VirtualNetworkGatewayConnectionProtocol', + 'VirtualNetworkGatewayConnectionStatus', + 'VirtualNetworkGatewayConnectionType', + 'VirtualNetworkGatewaySkuName', + 'VirtualNetworkGatewaySkuTier', + 'VirtualNetworkGatewayType', + 'VirtualNetworkPeeringLevel', + 'VirtualNetworkPeeringState', + 'VirtualNetworkPrivateEndpointNetworkPolicies', + 'VirtualNetworkPrivateLinkServiceNetworkPolicies', + 'VirtualWanSecurityProviderType', + 'VpnAuthenticationType', + 'VpnClientProtocol', + 'VpnConnectionStatus', + 'VpnGatewayGeneration', + 'VpnGatewayTunnelingProtocol', + 'VpnLinkConnectionMode', + 'VpnNatRuleMode', + 'VpnNatRuleType', + 'VpnType', + 'WebApplicationFirewallAction', + 'WebApplicationFirewallEnabledState', + 'WebApplicationFirewallMatchVariable', + 'WebApplicationFirewallMode', + 'WebApplicationFirewallOperator', + 'WebApplicationFirewallPolicyResourceState', + 'WebApplicationFirewallRuleType', + 'WebApplicationFirewallTransform', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_models.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_models.py new file mode 100644 index 000000000000..9b7069b97d8e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_models.py @@ -0,0 +1,24239 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AadAuthenticationParameters(msrest.serialization.Model): + """AAD Vpn authentication type related parameters. + + :param aad_tenant: AAD Vpn authentication parameter AAD tenant. + :type aad_tenant: str + :param aad_audience: AAD Vpn authentication parameter AAD audience. + :type aad_audience: str + :param aad_issuer: AAD Vpn authentication parameter AAD issuer. + :type aad_issuer: str + """ + + _attribute_map = { + 'aad_tenant': {'key': 'aadTenant', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + 'aad_issuer': {'key': 'aadIssuer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AadAuthenticationParameters, self).__init__(**kwargs) + self.aad_tenant = kwargs.get('aad_tenant', None) + self.aad_audience = kwargs.get('aad_audience', None) + self.aad_issuer = kwargs.get('aad_issuer', None) + + +class AddressSpace(msrest.serialization.Model): + """AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. + + :param address_prefixes: A list of address blocks reserved for this virtual network in CIDR + notation. + :type address_prefixes: list[str] + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AddressSpace, self).__init__(**kwargs) + self.address_prefixes = kwargs.get('address_prefixes', None) + + +class Resource(msrest.serialization.Model): + """Common resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + + +class ApplicationGateway(Resource): + """Application gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param zones: A list of availability zones denoting where the resource needs to come from. + :type zones: list[str] + :param identity: The identity of the application gateway, if configured. + :type identity: ~azure.mgmt.network.v2021_05_01.models.ManagedServiceIdentity + :param sku: SKU of the application gateway resource. + :type sku: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySku + :param ssl_policy: SSL policy of the application gateway resource. + :type ssl_policy: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicy + :ivar operational_state: Operational state of the application gateway resource. Possible values + include: "Stopped", "Starting", "Running", "Stopping". + :vartype operational_state: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayOperationalState + :param gateway_ip_configurations: Subnets of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :type gateway_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayIPConfiguration] + :param authentication_certificates: Authentication certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :type authentication_certificates: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAuthenticationCertificate] + :param trusted_root_certificates: Trusted Root certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :type trusted_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayTrustedRootCertificate] + :param trusted_client_certificates: Trusted client certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :type trusted_client_certificates: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayTrustedClientCertificate] + :param ssl_certificates: SSL certificates of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :type ssl_certificates: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslCertificate] + :param frontend_ip_configurations: Frontend IP addresses of the application gateway resource. + For default limits, see `Application Gateway limits + `_. + :type frontend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFrontendIPConfiguration] + :param frontend_ports: Frontend ports of the application gateway resource. For default limits, + see `Application Gateway limits + `_. + :type frontend_ports: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFrontendPort] + :param probes: Probes of the application gateway resource. + :type probes: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProbe] + :param backend_address_pools: Backend address pool of the application gateway resource. For + default limits, see `Application Gateway limits + `_. + :type backend_address_pools: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddressPool] + :param backend_http_settings_collection: Backend http settings of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :type backend_http_settings_collection: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHttpSettings] + :param http_listeners: Http listeners of the application gateway resource. For default limits, + see `Application Gateway limits + `_. + :type http_listeners: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayHttpListener] + :param ssl_profiles: SSL profiles of the application gateway resource. For default limits, see + `Application Gateway limits + `_. + :type ssl_profiles: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProfile] + :param url_path_maps: URL path map of the application gateway resource. For default limits, see + `Application Gateway limits + `_. + :type url_path_maps: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayUrlPathMap] + :param request_routing_rules: Request routing rules of the application gateway resource. + :type request_routing_rules: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRequestRoutingRule] + :param rewrite_rule_sets: Rewrite rules for the application gateway resource. + :type rewrite_rule_sets: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRewriteRuleSet] + :param redirect_configurations: Redirect configurations of the application gateway resource. + For default limits, see `Application Gateway limits + `_. + :type redirect_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRedirectConfiguration] + :param web_application_firewall_configuration: Web application firewall configuration. + :type web_application_firewall_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayWebApplicationFirewallConfiguration + :param firewall_policy: Reference to the FirewallPolicy resource. + :type firewall_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param enable_http2: Whether HTTP2 is enabled on the application gateway resource. + :type enable_http2: bool + :param enable_fips: Whether FIPS is enabled on the application gateway resource. + :type enable_fips: bool + :param autoscale_configuration: Autoscale Configuration. + :type autoscale_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAutoscaleConfiguration + :param private_link_configurations: PrivateLink configurations on application gateway. + :type private_link_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateLinkConfiguration] + :ivar private_endpoint_connections: Private Endpoint connections on application gateway. + :vartype private_endpoint_connections: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection] + :ivar resource_guid: The resource GUID property of the application gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the application gateway resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param custom_error_configurations: Custom error configurations of the application gateway + resource. + :type custom_error_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayCustomError] + :param force_firewall_policy_association: If true, associates a firewall policy with an + application gateway regardless whether the policy differs from the WAF Config. + :type force_firewall_policy_association: bool + :param load_distribution_policies: Load distribution policies of the application gateway + resource. + :type load_distribution_policies: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayLoadDistributionPolicy] + :param global_configuration: Global Configuration. + :type global_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayGlobalConfiguration + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'operational_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'sku': {'key': 'properties.sku', 'type': 'ApplicationGatewaySku'}, + 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, + 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, + 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, + 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[ApplicationGatewayTrustedRootCertificate]'}, + 'trusted_client_certificates': {'key': 'properties.trustedClientCertificates', 'type': '[ApplicationGatewayTrustedClientCertificate]'}, + 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, + 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, + 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, + 'probes': {'key': 'properties.probes', 'type': '[ApplicationGatewayProbe]'}, + 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, + 'backend_http_settings_collection': {'key': 'properties.backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHttpSettings]'}, + 'http_listeners': {'key': 'properties.httpListeners', 'type': '[ApplicationGatewayHttpListener]'}, + 'ssl_profiles': {'key': 'properties.sslProfiles', 'type': '[ApplicationGatewaySslProfile]'}, + 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[ApplicationGatewayUrlPathMap]'}, + 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[ApplicationGatewayRequestRoutingRule]'}, + 'rewrite_rule_sets': {'key': 'properties.rewriteRuleSets', 'type': '[ApplicationGatewayRewriteRuleSet]'}, + 'redirect_configurations': {'key': 'properties.redirectConfigurations', 'type': '[ApplicationGatewayRedirectConfiguration]'}, + 'web_application_firewall_configuration': {'key': 'properties.webApplicationFirewallConfiguration', 'type': 'ApplicationGatewayWebApplicationFirewallConfiguration'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + 'enable_http2': {'key': 'properties.enableHttp2', 'type': 'bool'}, + 'enable_fips': {'key': 'properties.enableFips', 'type': 'bool'}, + 'autoscale_configuration': {'key': 'properties.autoscaleConfiguration', 'type': 'ApplicationGatewayAutoscaleConfiguration'}, + 'private_link_configurations': {'key': 'properties.privateLinkConfigurations', 'type': '[ApplicationGatewayPrivateLinkConfiguration]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ApplicationGatewayPrivateEndpointConnection]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'custom_error_configurations': {'key': 'properties.customErrorConfigurations', 'type': '[ApplicationGatewayCustomError]'}, + 'force_firewall_policy_association': {'key': 'properties.forceFirewallPolicyAssociation', 'type': 'bool'}, + 'load_distribution_policies': {'key': 'properties.loadDistributionPolicies', 'type': '[ApplicationGatewayLoadDistributionPolicy]'}, + 'global_configuration': {'key': 'properties.globalConfiguration', 'type': 'ApplicationGatewayGlobalConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGateway, self).__init__(**kwargs) + self.etag = None + self.zones = kwargs.get('zones', None) + self.identity = kwargs.get('identity', None) + self.sku = kwargs.get('sku', None) + self.ssl_policy = kwargs.get('ssl_policy', None) + self.operational_state = None + self.gateway_ip_configurations = kwargs.get('gateway_ip_configurations', None) + self.authentication_certificates = kwargs.get('authentication_certificates', None) + self.trusted_root_certificates = kwargs.get('trusted_root_certificates', None) + self.trusted_client_certificates = kwargs.get('trusted_client_certificates', None) + self.ssl_certificates = kwargs.get('ssl_certificates', None) + self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) + self.frontend_ports = kwargs.get('frontend_ports', None) + self.probes = kwargs.get('probes', None) + self.backend_address_pools = kwargs.get('backend_address_pools', None) + self.backend_http_settings_collection = kwargs.get('backend_http_settings_collection', None) + self.http_listeners = kwargs.get('http_listeners', None) + self.ssl_profiles = kwargs.get('ssl_profiles', None) + self.url_path_maps = kwargs.get('url_path_maps', None) + self.request_routing_rules = kwargs.get('request_routing_rules', None) + self.rewrite_rule_sets = kwargs.get('rewrite_rule_sets', None) + self.redirect_configurations = kwargs.get('redirect_configurations', None) + self.web_application_firewall_configuration = kwargs.get('web_application_firewall_configuration', None) + self.firewall_policy = kwargs.get('firewall_policy', None) + self.enable_http2 = kwargs.get('enable_http2', None) + self.enable_fips = kwargs.get('enable_fips', None) + self.autoscale_configuration = kwargs.get('autoscale_configuration', None) + self.private_link_configurations = kwargs.get('private_link_configurations', None) + self.private_endpoint_connections = None + self.resource_guid = None + self.provisioning_state = None + self.custom_error_configurations = kwargs.get('custom_error_configurations', None) + self.force_firewall_policy_association = kwargs.get('force_firewall_policy_association', None) + self.load_distribution_policies = kwargs.get('load_distribution_policies', None) + self.global_configuration = kwargs.get('global_configuration', None) + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ApplicationGatewayAuthenticationCertificate(SubResource): + """Authentication certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the authentication certificate that is unique within an Application + Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param data: Certificate public data. + :type data: str + :ivar provisioning_state: The provisioning state of the authentication certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayAuthenticationCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.data = kwargs.get('data', None) + self.provisioning_state = None + + +class ApplicationGatewayAutoscaleConfiguration(msrest.serialization.Model): + """Application Gateway autoscale configuration. + + All required parameters must be populated in order to send to Azure. + + :param min_capacity: Required. Lower bound on number of Application Gateway capacity. + :type min_capacity: int + :param max_capacity: Upper bound on number of Application Gateway capacity. + :type max_capacity: int + """ + + _validation = { + 'min_capacity': {'required': True, 'minimum': 0}, + 'max_capacity': {'minimum': 2}, + } + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'int'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayAutoscaleConfiguration, self).__init__(**kwargs) + self.min_capacity = kwargs['min_capacity'] + self.max_capacity = kwargs.get('max_capacity', None) + + +class ApplicationGatewayAvailableSslOptions(Resource): + """Response for ApplicationGatewayAvailableSslOptions API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param predefined_policies: List of available Ssl predefined policy. + :type predefined_policies: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param default_policy: Name of the Ssl predefined policy applied by default to application + gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", + "AppGwSslPolicy20170401S". + :type default_policy: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicyName + :param available_cipher_suites: List of available Ssl cipher suites. + :type available_cipher_suites: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslCipherSuite] + :param available_protocols: List of available Ssl protocols. + :type available_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProtocol] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'predefined_policies': {'key': 'properties.predefinedPolicies', 'type': '[SubResource]'}, + 'default_policy': {'key': 'properties.defaultPolicy', 'type': 'str'}, + 'available_cipher_suites': {'key': 'properties.availableCipherSuites', 'type': '[str]'}, + 'available_protocols': {'key': 'properties.availableProtocols', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayAvailableSslOptions, self).__init__(**kwargs) + self.predefined_policies = kwargs.get('predefined_policies', None) + self.default_policy = kwargs.get('default_policy', None) + self.available_cipher_suites = kwargs.get('available_cipher_suites', None) + self.available_protocols = kwargs.get('available_protocols', None) + + +class ApplicationGatewayAvailableSslPredefinedPolicies(msrest.serialization.Model): + """Response for ApplicationGatewayAvailableSslOptions API service call. + + :param value: List of available Ssl predefined policy. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPredefinedPolicy] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewaySslPredefinedPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayAvailableSslPredefinedPolicies, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ApplicationGatewayAvailableWafRuleSetsResult(msrest.serialization.Model): + """Response for ApplicationGatewayAvailableWafRuleSets API service call. + + :param value: The list of application gateway rule sets. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallRuleSet] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayAvailableWafRuleSetsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ApplicationGatewayBackendAddress(msrest.serialization.Model): + """Backend address of an application gateway. + + :param fqdn: Fully qualified domain name (FQDN). + :type fqdn: str + :param ip_address: IP address. + :type ip_address: str + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayBackendAddress, self).__init__(**kwargs) + self.fqdn = kwargs.get('fqdn', None) + self.ip_address = kwargs.get('ip_address', None) + + +class ApplicationGatewayBackendAddressPool(SubResource): + """Backend Address Pool of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the backend address pool that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar backend_ip_configurations: Collection of references to IPs defined in network interfaces. + :vartype backend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration] + :param backend_addresses: Backend addresses. + :type backend_addresses: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddress] + :ivar provisioning_state: The provisioning state of the backend address pool resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'backend_ip_configurations': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'backend_addresses': {'key': 'properties.backendAddresses', 'type': '[ApplicationGatewayBackendAddress]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayBackendAddressPool, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.backend_ip_configurations = None + self.backend_addresses = kwargs.get('backend_addresses', None) + self.provisioning_state = None + + +class ApplicationGatewayBackendHealth(msrest.serialization.Model): + """Response for ApplicationGatewayBackendHealth API service call. + + :param backend_address_pools: A list of ApplicationGatewayBackendHealthPool resources. + :type backend_address_pools: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthPool] + """ + + _attribute_map = { + 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayBackendHealth, self).__init__(**kwargs) + self.backend_address_pools = kwargs.get('backend_address_pools', None) + + +class ApplicationGatewayBackendHealthHttpSettings(msrest.serialization.Model): + """Application gateway BackendHealthHttp settings. + + :param backend_http_settings: Reference to an ApplicationGatewayBackendHttpSettings resource. + :type backend_http_settings: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHttpSettings + :param servers: List of ApplicationGatewayBackendHealthServer resources. + :type servers: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthServer] + """ + + _attribute_map = { + 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'ApplicationGatewayBackendHttpSettings'}, + 'servers': {'key': 'servers', 'type': '[ApplicationGatewayBackendHealthServer]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayBackendHealthHttpSettings, self).__init__(**kwargs) + self.backend_http_settings = kwargs.get('backend_http_settings', None) + self.servers = kwargs.get('servers', None) + + +class ApplicationGatewayBackendHealthOnDemand(msrest.serialization.Model): + """Result of on demand test probe. + + :param backend_address_pool: Reference to an ApplicationGatewayBackendAddressPool resource. + :type backend_address_pool: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddressPool + :param backend_health_http_settings: Application gateway BackendHealthHttp settings. + :type backend_health_http_settings: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthHttpSettings + """ + + _attribute_map = { + 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, + 'backend_health_http_settings': {'key': 'backendHealthHttpSettings', 'type': 'ApplicationGatewayBackendHealthHttpSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayBackendHealthOnDemand, self).__init__(**kwargs) + self.backend_address_pool = kwargs.get('backend_address_pool', None) + self.backend_health_http_settings = kwargs.get('backend_health_http_settings', None) + + +class ApplicationGatewayBackendHealthPool(msrest.serialization.Model): + """Application gateway BackendHealth pool. + + :param backend_address_pool: Reference to an ApplicationGatewayBackendAddressPool resource. + :type backend_address_pool: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddressPool + :param backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings + resources. + :type backend_http_settings_collection: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthHttpSettings] + """ + + _attribute_map = { + 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, + 'backend_http_settings_collection': {'key': 'backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHealthHttpSettings]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayBackendHealthPool, self).__init__(**kwargs) + self.backend_address_pool = kwargs.get('backend_address_pool', None) + self.backend_http_settings_collection = kwargs.get('backend_http_settings_collection', None) + + +class ApplicationGatewayBackendHealthServer(msrest.serialization.Model): + """Application gateway backendhealth http settings. + + :param address: IP address or FQDN of backend server. + :type address: str + :param ip_configuration: Reference to IP configuration of backend server. + :type ip_configuration: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration + :param health: Health of backend server. Possible values include: "Unknown", "Up", "Down", + "Partial", "Draining". + :type health: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthServerHealth + :param health_probe_log: Health Probe Log. + :type health_probe_log: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'health': {'key': 'health', 'type': 'str'}, + 'health_probe_log': {'key': 'healthProbeLog', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayBackendHealthServer, self).__init__(**kwargs) + self.address = kwargs.get('address', None) + self.ip_configuration = kwargs.get('ip_configuration', None) + self.health = kwargs.get('health', None) + self.health_probe_log = kwargs.get('health_probe_log', None) + + +class ApplicationGatewayBackendHttpSettings(SubResource): + """Backend address pool settings of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the backend http settings that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param port: The destination port on the backend. + :type port: int + :param protocol: The protocol used to communicate with the backend. Possible values include: + "Http", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProtocol + :param cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", + "Disabled". + :type cookie_based_affinity: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayCookieBasedAffinity + :param request_timeout: Request timeout in seconds. Application Gateway will fail the request + if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 + seconds. + :type request_timeout: int + :param probe: Probe resource of an application gateway. + :type probe: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param authentication_certificates: Array of references to application gateway authentication + certificates. + :type authentication_certificates: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param trusted_root_certificates: Array of references to application gateway trusted root + certificates. + :type trusted_root_certificates: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param connection_draining: Connection draining of the backend http settings resource. + :type connection_draining: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayConnectionDraining + :param host_name: Host header to be sent to the backend servers. + :type host_name: str + :param pick_host_name_from_backend_address: Whether to pick host header should be picked from + the host name of the backend server. Default value is false. + :type pick_host_name_from_backend_address: bool + :param affinity_cookie_name: Cookie name to use for the affinity cookie. + :type affinity_cookie_name: str + :param probe_enabled: Whether the probe is enabled. Default value is false. + :type probe_enabled: bool + :param path: Path which should be used as a prefix for all HTTP requests. Null means no path + will be prefixed. Default value is null. + :type path: str + :ivar provisioning_state: The provisioning state of the backend HTTP settings resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'cookie_based_affinity': {'key': 'properties.cookieBasedAffinity', 'type': 'str'}, + 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, + 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, + 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[SubResource]'}, + 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, + 'affinity_cookie_name': {'key': 'properties.affinityCookieName', 'type': 'str'}, + 'probe_enabled': {'key': 'properties.probeEnabled', 'type': 'bool'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayBackendHttpSettings, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.port = kwargs.get('port', None) + self.protocol = kwargs.get('protocol', None) + self.cookie_based_affinity = kwargs.get('cookie_based_affinity', None) + self.request_timeout = kwargs.get('request_timeout', None) + self.probe = kwargs.get('probe', None) + self.authentication_certificates = kwargs.get('authentication_certificates', None) + self.trusted_root_certificates = kwargs.get('trusted_root_certificates', None) + self.connection_draining = kwargs.get('connection_draining', None) + self.host_name = kwargs.get('host_name', None) + self.pick_host_name_from_backend_address = kwargs.get('pick_host_name_from_backend_address', None) + self.affinity_cookie_name = kwargs.get('affinity_cookie_name', None) + self.probe_enabled = kwargs.get('probe_enabled', None) + self.path = kwargs.get('path', None) + self.provisioning_state = None + + +class ApplicationGatewayClientAuthConfiguration(msrest.serialization.Model): + """Application gateway client authentication configuration. + + :param verify_client_cert_issuer_dn: Verify client certificate issuer name on the application + gateway. + :type verify_client_cert_issuer_dn: bool + """ + + _attribute_map = { + 'verify_client_cert_issuer_dn': {'key': 'verifyClientCertIssuerDN', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayClientAuthConfiguration, self).__init__(**kwargs) + self.verify_client_cert_issuer_dn = kwargs.get('verify_client_cert_issuer_dn', None) + + +class ApplicationGatewayConnectionDraining(msrest.serialization.Model): + """Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether connection draining is enabled or not. + :type enabled: bool + :param drain_timeout_in_sec: Required. The number of seconds connection draining is active. + Acceptable values are from 1 second to 3600 seconds. + :type drain_timeout_in_sec: int + """ + + _validation = { + 'enabled': {'required': True}, + 'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayConnectionDraining, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.drain_timeout_in_sec = kwargs['drain_timeout_in_sec'] + + +class ApplicationGatewayCustomError(msrest.serialization.Model): + """Customer error of an application gateway. + + :param status_code: Status code of the application gateway customer error. Possible values + include: "HttpStatus403", "HttpStatus502". + :type status_code: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayCustomErrorStatusCode + :param custom_error_page_url: Error page URL of the application gateway customer error. + :type custom_error_page_url: str + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'custom_error_page_url': {'key': 'customErrorPageUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayCustomError, self).__init__(**kwargs) + self.status_code = kwargs.get('status_code', None) + self.custom_error_page_url = kwargs.get('custom_error_page_url', None) + + +class ApplicationGatewayFirewallDisabledRuleGroup(msrest.serialization.Model): + """Allows to disable rules within a rule group or an entire rule group. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. The name of the rule group that will be disabled. + :type rule_group_name: str + :param rules: The list of rules that will be disabled. If null, all rules of the rule group + will be disabled. + :type rules: list[int] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[int]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayFirewallDisabledRuleGroup, self).__init__(**kwargs) + self.rule_group_name = kwargs['rule_group_name'] + self.rules = kwargs.get('rules', None) + + +class ApplicationGatewayFirewallExclusion(msrest.serialization.Model): + """Allow to exclude some variable satisfy the condition for the WAF check. + + All required parameters must be populated in order to send to Azure. + + :param match_variable: Required. The variable to be excluded. + :type match_variable: str + :param selector_match_operator: Required. When matchVariable is a collection, operate on the + selector to specify which elements in the collection this exclusion applies to. + :type selector_match_operator: str + :param selector: Required. When matchVariable is a collection, operator used to specify which + elements in the collection this exclusion applies to. + :type selector: str + """ + + _validation = { + 'match_variable': {'required': True}, + 'selector_match_operator': {'required': True}, + 'selector': {'required': True}, + } + + _attribute_map = { + 'match_variable': {'key': 'matchVariable', 'type': 'str'}, + 'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayFirewallExclusion, self).__init__(**kwargs) + self.match_variable = kwargs['match_variable'] + self.selector_match_operator = kwargs['selector_match_operator'] + self.selector = kwargs['selector'] + + +class ApplicationGatewayFirewallRule(msrest.serialization.Model): + """A web application firewall rule. + + All required parameters must be populated in order to send to Azure. + + :param rule_id: Required. The identifier of the web application firewall rule. + :type rule_id: int + :param description: The description of the web application firewall rule. + :type description: str + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayFirewallRule, self).__init__(**kwargs) + self.rule_id = kwargs['rule_id'] + self.description = kwargs.get('description', None) + + +class ApplicationGatewayFirewallRuleGroup(msrest.serialization.Model): + """A web application firewall rule group. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. The name of the web application firewall rule group. + :type rule_group_name: str + :param description: The description of the web application firewall rule group. + :type description: str + :param rules: Required. The rules of the web application firewall rule group. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallRule] + """ + + _validation = { + 'rule_group_name': {'required': True}, + 'rules': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ApplicationGatewayFirewallRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayFirewallRuleGroup, self).__init__(**kwargs) + self.rule_group_name = kwargs['rule_group_name'] + self.description = kwargs.get('description', None) + self.rules = kwargs['rules'] + + +class ApplicationGatewayFirewallRuleSet(Resource): + """A web application firewall rule set. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: The provisioning state of the web application firewall rule set. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param rule_set_type: The type of the web application firewall rule set. + :type rule_set_type: str + :param rule_set_version: The version of the web application firewall rule set type. + :type rule_set_version: str + :param rule_groups: The rule groups of the web application firewall rule set. + :type rule_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallRuleGroup] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, + 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ApplicationGatewayFirewallRuleGroup]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayFirewallRuleSet, self).__init__(**kwargs) + self.provisioning_state = None + self.rule_set_type = kwargs.get('rule_set_type', None) + self.rule_set_version = kwargs.get('rule_set_version', None) + self.rule_groups = kwargs.get('rule_groups', None) + + +class ApplicationGatewayFrontendIPConfiguration(SubResource): + """Frontend IP configuration of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the frontend IP configuration that is unique within an Application + Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param private_ip_address: PrivateIPAddress of the network interface IP Configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: Reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param public_ip_address: Reference to the PublicIP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param private_link_configuration: Reference to the application gateway private link + configuration. + :type private_link_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the frontend IP configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'private_link_configuration': {'key': 'properties.privateLinkConfiguration', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayFrontendIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.private_ip_address = kwargs.get('private_ip_address', None) + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.subnet = kwargs.get('subnet', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_link_configuration = kwargs.get('private_link_configuration', None) + self.provisioning_state = None + + +class ApplicationGatewayFrontendPort(SubResource): + """Frontend port of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the frontend port that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param port: Frontend port. + :type port: int + :ivar provisioning_state: The provisioning state of the frontend port resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayFrontendPort, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.port = kwargs.get('port', None) + self.provisioning_state = None + + +class ApplicationGatewayGlobalConfiguration(msrest.serialization.Model): + """Application Gateway global configuration. + + :param enable_request_buffering: Enable request buffering. + :type enable_request_buffering: bool + :param enable_response_buffering: Enable response buffering. + :type enable_response_buffering: bool + """ + + _attribute_map = { + 'enable_request_buffering': {'key': 'enableRequestBuffering', 'type': 'bool'}, + 'enable_response_buffering': {'key': 'enableResponseBuffering', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayGlobalConfiguration, self).__init__(**kwargs) + self.enable_request_buffering = kwargs.get('enable_request_buffering', None) + self.enable_response_buffering = kwargs.get('enable_response_buffering', None) + + +class ApplicationGatewayHeaderConfiguration(msrest.serialization.Model): + """Header configuration of the Actions set in Application Gateway. + + :param header_name: Header name of the header configuration. + :type header_name: str + :param header_value: Header value of the header configuration. + :type header_value: str + """ + + _attribute_map = { + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'header_value': {'key': 'headerValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayHeaderConfiguration, self).__init__(**kwargs) + self.header_name = kwargs.get('header_name', None) + self.header_value = kwargs.get('header_value', None) + + +class ApplicationGatewayHttpListener(SubResource): + """Http listener of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the HTTP listener that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param frontend_ip_configuration: Frontend IP configuration resource of an application gateway. + :type frontend_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param frontend_port: Frontend port resource of an application gateway. + :type frontend_port: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param protocol: Protocol of the HTTP listener. Possible values include: "Http", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProtocol + :param host_name: Host name of HTTP listener. + :type host_name: str + :param ssl_certificate: SSL certificate resource of an application gateway. + :type ssl_certificate: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param ssl_profile: SSL profile resource of the application gateway. + :type ssl_profile: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param require_server_name_indication: Applicable only if protocol is https. Enables SNI for + multi-hosting. + :type require_server_name_indication: bool + :ivar provisioning_state: The provisioning state of the HTTP listener resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param custom_error_configurations: Custom error configurations of the HTTP listener. + :type custom_error_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayCustomError] + :param firewall_policy: Reference to the FirewallPolicy resource. + :type firewall_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param host_names: List of Host names for HTTP Listener that allows special wildcard characters + as well. + :type host_names: list[str] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, + 'ssl_profile': {'key': 'properties.sslProfile', 'type': 'SubResource'}, + 'require_server_name_indication': {'key': 'properties.requireServerNameIndication', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'custom_error_configurations': {'key': 'properties.customErrorConfigurations', 'type': '[ApplicationGatewayCustomError]'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayHttpListener, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.protocol = kwargs.get('protocol', None) + self.host_name = kwargs.get('host_name', None) + self.ssl_certificate = kwargs.get('ssl_certificate', None) + self.ssl_profile = kwargs.get('ssl_profile', None) + self.require_server_name_indication = kwargs.get('require_server_name_indication', None) + self.provisioning_state = None + self.custom_error_configurations = kwargs.get('custom_error_configurations', None) + self.firewall_policy = kwargs.get('firewall_policy', None) + self.host_names = kwargs.get('host_names', None) + + +class ApplicationGatewayIPConfiguration(SubResource): + """IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the IP configuration that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param subnet: Reference to the subnet resource. A subnet from where application gateway gets + its private address. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the application gateway IP configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.subnet = kwargs.get('subnet', None) + self.provisioning_state = None + + +class ApplicationGatewayListResult(msrest.serialization.Model): + """Response for ListApplicationGateways API service call. + + :param value: List of an application gateways in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGateway] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ApplicationGatewayLoadDistributionPolicy(SubResource): + """Load Distribution Policy of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the load distribution policy that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param load_distribution_targets: Load Distribution Targets resource of an application gateway. + :type load_distribution_targets: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayLoadDistributionTarget] + :param load_distribution_algorithm: Load Distribution Targets resource of an application + gateway. Possible values include: "RoundRobin", "LeastConnections", "IpHash". + :type load_distribution_algorithm: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayLoadDistributionAlgorithm + :ivar provisioning_state: The provisioning state of the Load Distribution Policy resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'load_distribution_targets': {'key': 'properties.loadDistributionTargets', 'type': '[ApplicationGatewayLoadDistributionTarget]'}, + 'load_distribution_algorithm': {'key': 'properties.loadDistributionAlgorithm', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayLoadDistributionPolicy, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.load_distribution_targets = kwargs.get('load_distribution_targets', None) + self.load_distribution_algorithm = kwargs.get('load_distribution_algorithm', None) + self.provisioning_state = None + + +class ApplicationGatewayLoadDistributionTarget(SubResource): + """Load Distribution Target of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the load distribution policy that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param weight_per_server: Weight per server. Range between 1 and 100. + :type weight_per_server: int + :param backend_address_pool: Backend address pool resource of the application gateway. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'weight_per_server': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'weight_per_server': {'key': 'properties.weightPerServer', 'type': 'int'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayLoadDistributionTarget, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.weight_per_server = kwargs.get('weight_per_server', None) + self.backend_address_pool = kwargs.get('backend_address_pool', None) + + +class ApplicationGatewayOnDemandProbe(msrest.serialization.Model): + """Details of on demand test probe request. + + :param protocol: The protocol used for the probe. Possible values include: "Http", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProtocol + :param host: Host name to send the probe to. + :type host: str + :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to + :code:``://:code:``::code:``:code:``. + :type path: str + :param timeout: The probe timeout in seconds. Probe marked as failed if valid response is not + received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + :type timeout: int + :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from + the backend http settings. Default value is false. + :type pick_host_name_from_backend_http_settings: bool + :param match: Criterion for classifying a healthy probe response. + :type match: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProbeHealthResponseMatch + :param backend_address_pool: Reference to backend pool of application gateway to which probe + request will be sent. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_http_settings: Reference to backend http setting of application gateway to be + used for test probe. + :type backend_http_settings: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + 'pick_host_name_from_backend_http_settings': {'key': 'pickHostNameFromBackendHttpSettings', 'type': 'bool'}, + 'match': {'key': 'match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, + 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'SubResource'}, + 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'SubResource'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayOnDemandProbe, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.host = kwargs.get('host', None) + self.path = kwargs.get('path', None) + self.timeout = kwargs.get('timeout', None) + self.pick_host_name_from_backend_http_settings = kwargs.get('pick_host_name_from_backend_http_settings', None) + self.match = kwargs.get('match', None) + self.backend_address_pool = kwargs.get('backend_address_pool', None) + self.backend_http_settings = kwargs.get('backend_http_settings', None) + + +class ApplicationGatewayPathRule(SubResource): + """Path rule of URL path map of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the path rule that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param paths: Path rules of URL path map. + :type paths: list[str] + :param backend_address_pool: Backend address pool resource of URL path map path rule. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_http_settings: Backend http settings resource of URL path map path rule. + :type backend_http_settings: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param redirect_configuration: Redirect configuration resource of URL path map path rule. + :type redirect_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param rewrite_rule_set: Rewrite rule set resource of URL path map path rule. + :type rewrite_rule_set: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param load_distribution_policy: Load Distribution Policy resource of URL path map path rule. + :type load_distribution_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the path rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param firewall_policy: Reference to the FirewallPolicy resource. + :type firewall_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'paths': {'key': 'properties.paths', 'type': '[str]'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, + 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, + 'rewrite_rule_set': {'key': 'properties.rewriteRuleSet', 'type': 'SubResource'}, + 'load_distribution_policy': {'key': 'properties.loadDistributionPolicy', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayPathRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.paths = kwargs.get('paths', None) + self.backend_address_pool = kwargs.get('backend_address_pool', None) + self.backend_http_settings = kwargs.get('backend_http_settings', None) + self.redirect_configuration = kwargs.get('redirect_configuration', None) + self.rewrite_rule_set = kwargs.get('rewrite_rule_set', None) + self.load_distribution_policy = kwargs.get('load_distribution_policy', None) + self.provisioning_state = None + self.firewall_policy = kwargs.get('firewall_policy', None) + + +class ApplicationGatewayPrivateEndpointConnection(SubResource): + """Private Endpoint connection on an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the private endpoint connection on an application gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the application gateway private endpoint + connection resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar link_identifier: The consumer link id. + :vartype link_identifier: str + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'link_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'link_identifier': {'key': 'properties.linkIdentifier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayPrivateEndpointConnection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.private_endpoint = None + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + self.link_identifier = None + + +class ApplicationGatewayPrivateEndpointConnectionListResult(msrest.serialization.Model): + """Response for ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections for an application gateway. + + :param value: List of private endpoint connections on an application gateway. + :type value: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewayPrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayPrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ApplicationGatewayPrivateLinkConfiguration(SubResource): + """Private Link Configuration on an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the private link configuration that is unique within an Application + Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param ip_configurations: An array of application gateway private link ip configurations. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateLinkIpConfiguration] + :ivar provisioning_state: The provisioning state of the application gateway private link + configuration. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[ApplicationGatewayPrivateLinkIpConfiguration]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayPrivateLinkConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.ip_configurations = kwargs.get('ip_configurations', None) + self.provisioning_state = None + + +class ApplicationGatewayPrivateLinkIpConfiguration(SubResource): + """The application gateway private link ip configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of application gateway private link ip configuration. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: Reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param primary: Whether the ip configuration is primary or not. + :type primary: bool + :ivar provisioning_state: The provisioning state of the application gateway private link IP + configuration. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayPrivateLinkIpConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.private_ip_address = kwargs.get('private_ip_address', None) + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.provisioning_state = None + + +class ApplicationGatewayPrivateLinkResource(SubResource): + """PrivateLink Resource of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the private link resource that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar group_id: Group identifier of private link resource. + :vartype group_id: str + :ivar required_members: Required member names of private link resource. + :vartype required_members: list[str] + :param required_zone_names: Required DNS zone names of the the private link resource. + :type required_zone_names: list[str] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayPrivateLinkResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class ApplicationGatewayPrivateLinkResourceListResult(msrest.serialization.Model): + """Response for ListApplicationGatewayPrivateLinkResources API service call. Gets all private link resources for an application gateway. + + :param value: List of private link resources of an application gateway. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateLinkResource] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewayPrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayPrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ApplicationGatewayProbe(SubResource): + """Probe of the application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the probe that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param protocol: The protocol used for the probe. Possible values include: "Http", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProtocol + :param host: Host name to send the probe to. + :type host: str + :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to + :code:``://:code:``::code:``:code:``. + :type path: str + :param interval: The probing interval in seconds. This is the time interval between two + consecutive probes. Acceptable values are from 1 second to 86400 seconds. + :type interval: int + :param timeout: The probe timeout in seconds. Probe marked as failed if valid response is not + received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + :type timeout: int + :param unhealthy_threshold: The probe retry count. Backend server is marked down after + consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second + to 20. + :type unhealthy_threshold: int + :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from + the backend http settings. Default value is false. + :type pick_host_name_from_backend_http_settings: bool + :param min_servers: Minimum number of servers that are always marked healthy. Default value is + 0. + :type min_servers: int + :param match: Criterion for classifying a healthy probe response. + :type match: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProbeHealthResponseMatch + :ivar provisioning_state: The provisioning state of the probe resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param port: Custom port which will be used for probing the backend servers. The valid value + ranges from 1 to 65535. In case not set, port from http settings will be used. This property is + valid for Standard_v2 and WAF_v2 only. + :type port: int + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'port': {'maximum': 65535, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'host': {'key': 'properties.host', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'timeout': {'key': 'properties.timeout', 'type': 'int'}, + 'unhealthy_threshold': {'key': 'properties.unhealthyThreshold', 'type': 'int'}, + 'pick_host_name_from_backend_http_settings': {'key': 'properties.pickHostNameFromBackendHttpSettings', 'type': 'bool'}, + 'min_servers': {'key': 'properties.minServers', 'type': 'int'}, + 'match': {'key': 'properties.match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayProbe, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.protocol = kwargs.get('protocol', None) + self.host = kwargs.get('host', None) + self.path = kwargs.get('path', None) + self.interval = kwargs.get('interval', None) + self.timeout = kwargs.get('timeout', None) + self.unhealthy_threshold = kwargs.get('unhealthy_threshold', None) + self.pick_host_name_from_backend_http_settings = kwargs.get('pick_host_name_from_backend_http_settings', None) + self.min_servers = kwargs.get('min_servers', None) + self.match = kwargs.get('match', None) + self.provisioning_state = None + self.port = kwargs.get('port', None) + + +class ApplicationGatewayProbeHealthResponseMatch(msrest.serialization.Model): + """Application gateway probe health response match. + + :param body: Body that must be contained in the health response. Default value is empty. + :type body: str + :param status_codes: Allowed ranges of healthy status codes. Default range of healthy status + codes is 200-399. + :type status_codes: list[str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'status_codes': {'key': 'statusCodes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayProbeHealthResponseMatch, self).__init__(**kwargs) + self.body = kwargs.get('body', None) + self.status_codes = kwargs.get('status_codes', None) + + +class ApplicationGatewayRedirectConfiguration(SubResource): + """Redirect configuration of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the redirect configuration that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param redirect_type: HTTP redirection type. Possible values include: "Permanent", "Found", + "SeeOther", "Temporary". + :type redirect_type: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRedirectType + :param target_listener: Reference to a listener to redirect the request to. + :type target_listener: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param target_url: Url to redirect the request to. + :type target_url: str + :param include_path: Include path in the redirected url. + :type include_path: bool + :param include_query_string: Include query string in the redirected url. + :type include_query_string: bool + :param request_routing_rules: Request routing specifying redirect configuration. + :type request_routing_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param url_path_maps: Url path maps specifying default redirect configuration. + :type url_path_maps: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param path_rules: Path rules specifying redirect configuration. + :type path_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'redirect_type': {'key': 'properties.redirectType', 'type': 'str'}, + 'target_listener': {'key': 'properties.targetListener', 'type': 'SubResource'}, + 'target_url': {'key': 'properties.targetUrl', 'type': 'str'}, + 'include_path': {'key': 'properties.includePath', 'type': 'bool'}, + 'include_query_string': {'key': 'properties.includeQueryString', 'type': 'bool'}, + 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[SubResource]'}, + 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[SubResource]'}, + 'path_rules': {'key': 'properties.pathRules', 'type': '[SubResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayRedirectConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.redirect_type = kwargs.get('redirect_type', None) + self.target_listener = kwargs.get('target_listener', None) + self.target_url = kwargs.get('target_url', None) + self.include_path = kwargs.get('include_path', None) + self.include_query_string = kwargs.get('include_query_string', None) + self.request_routing_rules = kwargs.get('request_routing_rules', None) + self.url_path_maps = kwargs.get('url_path_maps', None) + self.path_rules = kwargs.get('path_rules', None) + + +class ApplicationGatewayRequestRoutingRule(SubResource): + """Request routing rule of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the request routing rule that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". + :type rule_type: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRequestRoutingRuleType + :param priority: Priority of the request routing rule. + :type priority: int + :param backend_address_pool: Backend address pool resource of the application gateway. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_http_settings: Backend http settings resource of the application gateway. + :type backend_http_settings: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param http_listener: Http listener resource of the application gateway. + :type http_listener: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param url_path_map: URL path map resource of the application gateway. + :type url_path_map: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param rewrite_rule_set: Rewrite Rule Set resource in Basic rule of the application gateway. + :type rewrite_rule_set: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param redirect_configuration: Redirect configuration resource of the application gateway. + :type redirect_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param load_distribution_policy: Load Distribution Policy resource of the application gateway. + :type load_distribution_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the request routing rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'priority': {'maximum': 20000, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, + 'http_listener': {'key': 'properties.httpListener', 'type': 'SubResource'}, + 'url_path_map': {'key': 'properties.urlPathMap', 'type': 'SubResource'}, + 'rewrite_rule_set': {'key': 'properties.rewriteRuleSet', 'type': 'SubResource'}, + 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, + 'load_distribution_policy': {'key': 'properties.loadDistributionPolicy', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayRequestRoutingRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.rule_type = kwargs.get('rule_type', None) + self.priority = kwargs.get('priority', None) + self.backend_address_pool = kwargs.get('backend_address_pool', None) + self.backend_http_settings = kwargs.get('backend_http_settings', None) + self.http_listener = kwargs.get('http_listener', None) + self.url_path_map = kwargs.get('url_path_map', None) + self.rewrite_rule_set = kwargs.get('rewrite_rule_set', None) + self.redirect_configuration = kwargs.get('redirect_configuration', None) + self.load_distribution_policy = kwargs.get('load_distribution_policy', None) + self.provisioning_state = None + + +class ApplicationGatewayRewriteRule(msrest.serialization.Model): + """Rewrite rule of an application gateway. + + :param name: Name of the rewrite rule that is unique within an Application Gateway. + :type name: str + :param rule_sequence: Rule Sequence of the rewrite rule that determines the order of execution + of a particular rule in a RewriteRuleSet. + :type rule_sequence: int + :param conditions: Conditions based on which the action set execution will be evaluated. + :type conditions: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRewriteRuleCondition] + :param action_set: Set of actions to be done as part of the rewrite Rule. + :type action_set: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRewriteRuleActionSet + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'rule_sequence': {'key': 'ruleSequence', 'type': 'int'}, + 'conditions': {'key': 'conditions', 'type': '[ApplicationGatewayRewriteRuleCondition]'}, + 'action_set': {'key': 'actionSet', 'type': 'ApplicationGatewayRewriteRuleActionSet'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayRewriteRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.rule_sequence = kwargs.get('rule_sequence', None) + self.conditions = kwargs.get('conditions', None) + self.action_set = kwargs.get('action_set', None) + + +class ApplicationGatewayRewriteRuleActionSet(msrest.serialization.Model): + """Set of actions in the Rewrite Rule in Application Gateway. + + :param request_header_configurations: Request Header Actions in the Action Set. + :type request_header_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayHeaderConfiguration] + :param response_header_configurations: Response Header Actions in the Action Set. + :type response_header_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayHeaderConfiguration] + :param url_configuration: Url Configuration Action in the Action Set. + :type url_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayUrlConfiguration + """ + + _attribute_map = { + 'request_header_configurations': {'key': 'requestHeaderConfigurations', 'type': '[ApplicationGatewayHeaderConfiguration]'}, + 'response_header_configurations': {'key': 'responseHeaderConfigurations', 'type': '[ApplicationGatewayHeaderConfiguration]'}, + 'url_configuration': {'key': 'urlConfiguration', 'type': 'ApplicationGatewayUrlConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayRewriteRuleActionSet, self).__init__(**kwargs) + self.request_header_configurations = kwargs.get('request_header_configurations', None) + self.response_header_configurations = kwargs.get('response_header_configurations', None) + self.url_configuration = kwargs.get('url_configuration', None) + + +class ApplicationGatewayRewriteRuleCondition(msrest.serialization.Model): + """Set of conditions in the Rewrite Rule in Application Gateway. + + :param variable: The condition parameter of the RewriteRuleCondition. + :type variable: str + :param pattern: The pattern, either fixed string or regular expression, that evaluates the + truthfulness of the condition. + :type pattern: str + :param ignore_case: Setting this parameter to truth value with force the pattern to do a case + in-sensitive comparison. + :type ignore_case: bool + :param negate: Setting this value as truth will force to check the negation of the condition + given by the user. + :type negate: bool + """ + + _attribute_map = { + 'variable': {'key': 'variable', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'ignore_case': {'key': 'ignoreCase', 'type': 'bool'}, + 'negate': {'key': 'negate', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayRewriteRuleCondition, self).__init__(**kwargs) + self.variable = kwargs.get('variable', None) + self.pattern = kwargs.get('pattern', None) + self.ignore_case = kwargs.get('ignore_case', None) + self.negate = kwargs.get('negate', None) + + +class ApplicationGatewayRewriteRuleSet(SubResource): + """Rewrite rule set of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the rewrite rule set that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param rewrite_rules: Rewrite rules in the rewrite rule set. + :type rewrite_rules: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRewriteRule] + :ivar provisioning_state: The provisioning state of the rewrite rule set resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'rewrite_rules': {'key': 'properties.rewriteRules', 'type': '[ApplicationGatewayRewriteRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayRewriteRuleSet, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.rewrite_rules = kwargs.get('rewrite_rules', None) + self.provisioning_state = None + + +class ApplicationGatewaySku(msrest.serialization.Model): + """SKU of an application gateway. + + :param name: Name of an application gateway SKU. Possible values include: "Standard_Small", + "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large", "Standard_v2", "WAF_v2". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySkuName + :param tier: Tier of an application gateway. Possible values include: "Standard", "WAF", + "Standard_v2", "WAF_v2". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayTier + :param capacity: Capacity (instance count) of an application gateway. + :type capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewaySku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = kwargs.get('capacity', None) + + +class ApplicationGatewaySslCertificate(SubResource): + """SSL certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the SSL certificate that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param data: Base-64 encoded pfx certificate. Only applicable in PUT Request. + :type data: str + :param password: Password for the pfx file specified in data. Only applicable in PUT request. + :type password: str + :ivar public_cert_data: Base-64 encoded Public cert data corresponding to pfx specified in + data. Only applicable in GET request. + :vartype public_cert_data: str + :param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :type key_vault_secret_id: str + :ivar provisioning_state: The provisioning state of the SSL certificate resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'public_cert_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, + 'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewaySslCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.data = kwargs.get('data', None) + self.password = kwargs.get('password', None) + self.public_cert_data = None + self.key_vault_secret_id = kwargs.get('key_vault_secret_id', None) + self.provisioning_state = None + + +class ApplicationGatewaySslPolicy(msrest.serialization.Model): + """Application Gateway Ssl policy. + + :param disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. + :type disabled_ssl_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProtocol] + :param policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". + :type policy_type: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicyType + :param policy_name: Name of Ssl predefined policy. Possible values include: + "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". + :type policy_name: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicyName + :param cipher_suites: Ssl cipher suites to be enabled in the specified order to application + gateway. + :type cipher_suites: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslCipherSuite] + :param min_protocol_version: Minimum version of Ssl protocol to be supported on application + gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". + :type min_protocol_version: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProtocol + """ + + _attribute_map = { + 'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'cipher_suites': {'key': 'cipherSuites', 'type': '[str]'}, + 'min_protocol_version': {'key': 'minProtocolVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewaySslPolicy, self).__init__(**kwargs) + self.disabled_ssl_protocols = kwargs.get('disabled_ssl_protocols', None) + self.policy_type = kwargs.get('policy_type', None) + self.policy_name = kwargs.get('policy_name', None) + self.cipher_suites = kwargs.get('cipher_suites', None) + self.min_protocol_version = kwargs.get('min_protocol_version', None) + + +class ApplicationGatewaySslPredefinedPolicy(SubResource): + """An Ssl predefined policy. + + :param id: Resource ID. + :type id: str + :param name: Name of the Ssl predefined policy. + :type name: str + :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application + gateway. + :type cipher_suites: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslCipherSuite] + :param min_protocol_version: Minimum version of Ssl protocol to be supported on application + gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". + :type min_protocol_version: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProtocol + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, + 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewaySslPredefinedPolicy, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.cipher_suites = kwargs.get('cipher_suites', None) + self.min_protocol_version = kwargs.get('min_protocol_version', None) + + +class ApplicationGatewaySslProfile(SubResource): + """SSL profile of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the SSL profile that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param trusted_client_certificates: Array of references to application gateway trusted client + certificates. + :type trusted_client_certificates: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param ssl_policy: SSL policy of the application gateway resource. + :type ssl_policy: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicy + :param client_auth_configuration: Client authentication configuration of the application + gateway resource. + :type client_auth_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayClientAuthConfiguration + :ivar provisioning_state: The provisioning state of the HTTP listener resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'trusted_client_certificates': {'key': 'properties.trustedClientCertificates', 'type': '[SubResource]'}, + 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, + 'client_auth_configuration': {'key': 'properties.clientAuthConfiguration', 'type': 'ApplicationGatewayClientAuthConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewaySslProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.trusted_client_certificates = kwargs.get('trusted_client_certificates', None) + self.ssl_policy = kwargs.get('ssl_policy', None) + self.client_auth_configuration = kwargs.get('client_auth_configuration', None) + self.provisioning_state = None + + +class ApplicationGatewayTrustedClientCertificate(SubResource): + """Trusted client certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the trusted client certificate that is unique within an Application + Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param data: Certificate public data. + :type data: str + :ivar validated_cert_data: Validated certificate data. + :vartype validated_cert_data: str + :ivar client_cert_issuer_dn: Distinguished name of client certificate issuer. + :vartype client_cert_issuer_dn: str + :ivar provisioning_state: The provisioning state of the trusted client certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'validated_cert_data': {'readonly': True}, + 'client_cert_issuer_dn': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'validated_cert_data': {'key': 'properties.validatedCertData', 'type': 'str'}, + 'client_cert_issuer_dn': {'key': 'properties.clientCertIssuerDN', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayTrustedClientCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.data = kwargs.get('data', None) + self.validated_cert_data = None + self.client_cert_issuer_dn = None + self.provisioning_state = None + + +class ApplicationGatewayTrustedRootCertificate(SubResource): + """Trusted Root certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the trusted root certificate that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param data: Certificate public data. + :type data: str + :param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :type key_vault_secret_id: str + :ivar provisioning_state: The provisioning state of the trusted root certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayTrustedRootCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.data = kwargs.get('data', None) + self.key_vault_secret_id = kwargs.get('key_vault_secret_id', None) + self.provisioning_state = None + + +class ApplicationGatewayUrlConfiguration(msrest.serialization.Model): + """Url configuration of the Actions set in Application Gateway. + + :param modified_path: Url path which user has provided for url rewrite. Null means no path will + be updated. Default value is null. + :type modified_path: str + :param modified_query_string: Query string which user has provided for url rewrite. Null means + no query string will be updated. Default value is null. + :type modified_query_string: str + :param reroute: If set as true, it will re-evaluate the url path map provided in path based + request routing rules using modified path. Default value is false. + :type reroute: bool + """ + + _attribute_map = { + 'modified_path': {'key': 'modifiedPath', 'type': 'str'}, + 'modified_query_string': {'key': 'modifiedQueryString', 'type': 'str'}, + 'reroute': {'key': 'reroute', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayUrlConfiguration, self).__init__(**kwargs) + self.modified_path = kwargs.get('modified_path', None) + self.modified_query_string = kwargs.get('modified_query_string', None) + self.reroute = kwargs.get('reroute', None) + + +class ApplicationGatewayUrlPathMap(SubResource): + """UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the URL path map that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param default_backend_address_pool: Default backend address pool resource of URL path map. + :type default_backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param default_backend_http_settings: Default backend http settings resource of URL path map. + :type default_backend_http_settings: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param default_rewrite_rule_set: Default Rewrite rule set resource of URL path map. + :type default_rewrite_rule_set: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param default_redirect_configuration: Default redirect configuration resource of URL path map. + :type default_redirect_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param default_load_distribution_policy: Default Load Distribution Policy resource of URL path + map. + :type default_load_distribution_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param path_rules: Path rule of URL path map resource. + :type path_rules: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPathRule] + :ivar provisioning_state: The provisioning state of the URL path map resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_backend_address_pool': {'key': 'properties.defaultBackendAddressPool', 'type': 'SubResource'}, + 'default_backend_http_settings': {'key': 'properties.defaultBackendHttpSettings', 'type': 'SubResource'}, + 'default_rewrite_rule_set': {'key': 'properties.defaultRewriteRuleSet', 'type': 'SubResource'}, + 'default_redirect_configuration': {'key': 'properties.defaultRedirectConfiguration', 'type': 'SubResource'}, + 'default_load_distribution_policy': {'key': 'properties.defaultLoadDistributionPolicy', 'type': 'SubResource'}, + 'path_rules': {'key': 'properties.pathRules', 'type': '[ApplicationGatewayPathRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayUrlPathMap, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.default_backend_address_pool = kwargs.get('default_backend_address_pool', None) + self.default_backend_http_settings = kwargs.get('default_backend_http_settings', None) + self.default_rewrite_rule_set = kwargs.get('default_rewrite_rule_set', None) + self.default_redirect_configuration = kwargs.get('default_redirect_configuration', None) + self.default_load_distribution_policy = kwargs.get('default_load_distribution_policy', None) + self.path_rules = kwargs.get('path_rules', None) + self.provisioning_state = None + + +class ApplicationGatewayWebApplicationFirewallConfiguration(msrest.serialization.Model): + """Application gateway web application firewall configuration. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the web application firewall is enabled or not. + :type enabled: bool + :param firewall_mode: Required. Web application firewall mode. Possible values include: + "Detection", "Prevention". + :type firewall_mode: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallMode + :param rule_set_type: Required. The type of the web application firewall rule set. Possible + values are: 'OWASP'. + :type rule_set_type: str + :param rule_set_version: Required. The version of the rule set type. + :type rule_set_version: str + :param disabled_rule_groups: The disabled rule groups. + :type disabled_rule_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallDisabledRuleGroup] + :param request_body_check: Whether allow WAF to check request Body. + :type request_body_check: bool + :param max_request_body_size: Maximum request body size for WAF. + :type max_request_body_size: int + :param max_request_body_size_in_kb: Maximum request body size in Kb for WAF. + :type max_request_body_size_in_kb: int + :param file_upload_limit_in_mb: Maximum file upload size in Mb for WAF. + :type file_upload_limit_in_mb: int + :param exclusions: The exclusion list. + :type exclusions: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallExclusion] + """ + + _validation = { + 'enabled': {'required': True}, + 'firewall_mode': {'required': True}, + 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, + 'max_request_body_size': {'maximum': 128, 'minimum': 8}, + 'max_request_body_size_in_kb': {'maximum': 128, 'minimum': 8}, + 'file_upload_limit_in_mb': {'minimum': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, + 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'}, + 'request_body_check': {'key': 'requestBodyCheck', 'type': 'bool'}, + 'max_request_body_size': {'key': 'maxRequestBodySize', 'type': 'int'}, + 'max_request_body_size_in_kb': {'key': 'maxRequestBodySizeInKb', 'type': 'int'}, + 'file_upload_limit_in_mb': {'key': 'fileUploadLimitInMb', 'type': 'int'}, + 'exclusions': {'key': 'exclusions', 'type': '[ApplicationGatewayFirewallExclusion]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.firewall_mode = kwargs['firewall_mode'] + self.rule_set_type = kwargs['rule_set_type'] + self.rule_set_version = kwargs['rule_set_version'] + self.disabled_rule_groups = kwargs.get('disabled_rule_groups', None) + self.request_body_check = kwargs.get('request_body_check', None) + self.max_request_body_size = kwargs.get('max_request_body_size', None) + self.max_request_body_size_in_kb = kwargs.get('max_request_body_size_in_kb', None) + self.file_upload_limit_in_mb = kwargs.get('file_upload_limit_in_mb', None) + self.exclusions = kwargs.get('exclusions', None) + + +class FirewallPolicyRule(msrest.serialization.Model): + """Properties of a rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationRule, NatRule, NetworkRule. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleType + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + } + + _subtype_map = { + 'rule_type': {'ApplicationRule': 'ApplicationRule', 'NatRule': 'NatRule', 'NetworkRule': 'NetworkRule'} + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.rule_type = None # type: Optional[str] + + +class ApplicationRule(FirewallPolicyRule): + """Rule of type application. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleType + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses or Service Tags. + :type destination_addresses: list[str] + :param protocols: Array of Application Protocols. + :type protocols: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleApplicationProtocol] + :param target_fqdns: List of FQDNs for this rule. + :type target_fqdns: list[str] + :param target_urls: List of Urls for this rule condition. + :type target_urls: list[str] + :param fqdn_tags: List of FQDN Tags for this rule. + :type fqdn_tags: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param terminate_tls: Terminate TLS connections for this rule. + :type terminate_tls: bool + :param web_categories: List of destination azure web categories. + :type web_categories: list[str] + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[FirewallPolicyRuleApplicationProtocol]'}, + 'target_fqdns': {'key': 'targetFqdns', 'type': '[str]'}, + 'target_urls': {'key': 'targetUrls', 'type': '[str]'}, + 'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'terminate_tls': {'key': 'terminateTLS', 'type': 'bool'}, + 'web_categories': {'key': 'webCategories', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationRule, self).__init__(**kwargs) + self.rule_type = 'ApplicationRule' # type: str + self.source_addresses = kwargs.get('source_addresses', None) + self.destination_addresses = kwargs.get('destination_addresses', None) + self.protocols = kwargs.get('protocols', None) + self.target_fqdns = kwargs.get('target_fqdns', None) + self.target_urls = kwargs.get('target_urls', None) + self.fqdn_tags = kwargs.get('fqdn_tags', None) + self.source_ip_groups = kwargs.get('source_ip_groups', None) + self.terminate_tls = kwargs.get('terminate_tls', None) + self.web_categories = kwargs.get('web_categories', None) + + +class ApplicationSecurityGroup(Resource): + """An application security group in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar resource_guid: The resource GUID property of the application security group resource. It + uniquely identifies a resource, even if the user changes its name or migrate the resource + across subscriptions or resource groups. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the application security group resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationSecurityGroup, self).__init__(**kwargs) + self.etag = None + self.resource_guid = None + self.provisioning_state = None + + +class ApplicationSecurityGroupListResult(msrest.serialization.Model): + """A list of application security groups. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of application security groups. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationSecurityGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplicationSecurityGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AuthorizationListResult(msrest.serialization.Model): + """Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. + + :param value: The authorizations in an ExpressRoute Circuit. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AuthorizationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AutoApprovedPrivateLinkService(msrest.serialization.Model): + """The information of an AutoApprovedPrivateLinkService. + + :param private_link_service: The id of the private link service resource. + :type private_link_service: str + """ + + _attribute_map = { + 'private_link_service': {'key': 'privateLinkService', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoApprovedPrivateLinkService, self).__init__(**kwargs) + self.private_link_service = kwargs.get('private_link_service', None) + + +class AutoApprovedPrivateLinkServicesResult(msrest.serialization.Model): + """An array of private link service id that can be linked to a private end point with auto approved. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: An array of auto approved private link service. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AutoApprovedPrivateLinkService] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AutoApprovedPrivateLinkService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AutoApprovedPrivateLinkServicesResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class Availability(msrest.serialization.Model): + """Availability of the metric. + + :param time_grain: The time grain of the availability. + :type time_grain: str + :param retention: The retention of the availability. + :type retention: str + :param blob_duration: Duration of the availability blob. + :type blob_duration: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Availability, self).__init__(**kwargs) + self.time_grain = kwargs.get('time_grain', None) + self.retention = kwargs.get('retention', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class AvailableDelegation(msrest.serialization.Model): + """The serviceName of an AvailableDelegation indicates a possible delegation for a subnet. + + :param name: The name of the AvailableDelegation resource. + :type name: str + :param id: A unique identifier of the AvailableDelegation resource. + :type id: str + :param type: Resource type. + :type type: str + :param service_name: The name of the service and resource. + :type service_name: str + :param actions: The actions permitted to the service upon delegation. + :type actions: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableDelegation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.service_name = kwargs.get('service_name', None) + self.actions = kwargs.get('actions', None) + + +class AvailableDelegationsResult(msrest.serialization.Model): + """An array of available delegations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: An array of available delegations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AvailableDelegation] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableDelegation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableDelegationsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AvailablePrivateEndpointType(msrest.serialization.Model): + """The information of an AvailablePrivateEndpointType. + + :param name: The name of the service and resource. + :type name: str + :param id: A unique identifier of the AvailablePrivateEndpoint Type resource. + :type id: str + :param type: Resource type. + :type type: str + :param resource_name: The name of the service and resource. + :type resource_name: str + :param display_name: Display name of the resource. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailablePrivateEndpointType, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.resource_name = kwargs.get('resource_name', None) + self.display_name = kwargs.get('display_name', None) + + +class AvailablePrivateEndpointTypesResult(msrest.serialization.Model): + """An array of available PrivateEndpoint types. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: An array of available privateEndpoint type. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AvailablePrivateEndpointType] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailablePrivateEndpointType]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailablePrivateEndpointTypesResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AvailableProvidersList(msrest.serialization.Model): + """List of available countries with details. + + All required parameters must be populated in order to send to Azure. + + :param countries: Required. List of available countries. + :type countries: list[~azure.mgmt.network.v2021_05_01.models.AvailableProvidersListCountry] + """ + + _validation = { + 'countries': {'required': True}, + } + + _attribute_map = { + 'countries': {'key': 'countries', 'type': '[AvailableProvidersListCountry]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableProvidersList, self).__init__(**kwargs) + self.countries = kwargs['countries'] + + +class AvailableProvidersListCity(msrest.serialization.Model): + """City or town details. + + :param city_name: The city or town name. + :type city_name: str + :param providers: A list of Internet service providers. + :type providers: list[str] + """ + + _attribute_map = { + 'city_name': {'key': 'cityName', 'type': 'str'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableProvidersListCity, self).__init__(**kwargs) + self.city_name = kwargs.get('city_name', None) + self.providers = kwargs.get('providers', None) + + +class AvailableProvidersListCountry(msrest.serialization.Model): + """Country details. + + :param country_name: The country name. + :type country_name: str + :param providers: A list of Internet service providers. + :type providers: list[str] + :param states: List of available states in the country. + :type states: list[~azure.mgmt.network.v2021_05_01.models.AvailableProvidersListState] + """ + + _attribute_map = { + 'country_name': {'key': 'countryName', 'type': 'str'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + 'states': {'key': 'states', 'type': '[AvailableProvidersListState]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableProvidersListCountry, self).__init__(**kwargs) + self.country_name = kwargs.get('country_name', None) + self.providers = kwargs.get('providers', None) + self.states = kwargs.get('states', None) + + +class AvailableProvidersListParameters(msrest.serialization.Model): + """Constraints that determine the list of available Internet service providers. + + :param azure_locations: A list of Azure regions. + :type azure_locations: list[str] + :param country: The country for available providers list. + :type country: str + :param state: The state for available providers list. + :type state: str + :param city: The city or town for available providers list. + :type city: str + """ + + _attribute_map = { + 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, + 'country': {'key': 'country', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableProvidersListParameters, self).__init__(**kwargs) + self.azure_locations = kwargs.get('azure_locations', None) + self.country = kwargs.get('country', None) + self.state = kwargs.get('state', None) + self.city = kwargs.get('city', None) + + +class AvailableProvidersListState(msrest.serialization.Model): + """State details. + + :param state_name: The state name. + :type state_name: str + :param providers: A list of Internet service providers. + :type providers: list[str] + :param cities: List of available cities or towns in the state. + :type cities: list[~azure.mgmt.network.v2021_05_01.models.AvailableProvidersListCity] + """ + + _attribute_map = { + 'state_name': {'key': 'stateName', 'type': 'str'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + 'cities': {'key': 'cities', 'type': '[AvailableProvidersListCity]'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableProvidersListState, self).__init__(**kwargs) + self.state_name = kwargs.get('state_name', None) + self.providers = kwargs.get('providers', None) + self.cities = kwargs.get('cities', None) + + +class AvailableServiceAlias(msrest.serialization.Model): + """The available service alias. + + :param name: The name of the service alias. + :type name: str + :param id: The ID of the service alias. + :type id: str + :param type: The type of the resource. + :type type: str + :param resource_name: The resource name of the service alias. + :type resource_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableServiceAlias, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.resource_name = kwargs.get('resource_name', None) + + +class AvailableServiceAliasesResult(msrest.serialization.Model): + """An array of available service aliases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: An array of available service aliases. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AvailableServiceAlias] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableServiceAlias]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AvailableServiceAliasesResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class AzureAsyncOperationResult(msrest.serialization.Model): + """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. + + :param status: Status of the Azure async operation. Possible values include: "InProgress", + "Succeeded", "Failed". + :type status: str or ~azure.mgmt.network.v2021_05_01.models.NetworkOperationStatus + :param error: Details of the error occurred during specified asynchronous operation. + :type error: ~azure.mgmt.network.v2021_05_01.models.Error + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureAsyncOperationResult, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error = kwargs.get('error', None) + + +class AzureFirewall(Resource): + """Azure Firewall resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param zones: A list of availability zones denoting where the resource needs to come from. + :type zones: list[str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param application_rule_collections: Collection of application rule collections used by Azure + Firewall. + :type application_rule_collections: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallApplicationRuleCollection] + :param nat_rule_collections: Collection of NAT rule collections used by Azure Firewall. + :type nat_rule_collections: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallNatRuleCollection] + :param network_rule_collections: Collection of network rule collections used by Azure Firewall. + :type network_rule_collections: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallNetworkRuleCollection] + :param ip_configurations: IP configuration of the Azure Firewall resource. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallIPConfiguration] + :param management_ip_configuration: IP configuration of the Azure Firewall used for management + traffic. + :type management_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallIPConfiguration + :ivar provisioning_state: The provisioning state of the Azure firewall resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param threat_intel_mode: The operation mode for Threat Intelligence. Possible values include: + "Alert", "Deny", "Off". + :type threat_intel_mode: str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallThreatIntelMode + :param virtual_hub: The virtualHub to which the firewall belongs. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param firewall_policy: The firewallPolicy associated with this azure firewall. + :type firewall_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param hub_ip_addresses: IP addresses associated with AzureFirewall. + :type hub_ip_addresses: ~azure.mgmt.network.v2021_05_01.models.HubIPAddresses + :ivar ip_groups: IpGroups associated with AzureFirewall. + :vartype ip_groups: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallIpGroups] + :param sku: The Azure Firewall Resource SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.AzureFirewallSku + :param additional_properties: The additional properties used to further config this azure + firewall. + :type additional_properties: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'ip_groups': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'application_rule_collections': {'key': 'properties.applicationRuleCollections', 'type': '[AzureFirewallApplicationRuleCollection]'}, + 'nat_rule_collections': {'key': 'properties.natRuleCollections', 'type': '[AzureFirewallNatRuleCollection]'}, + 'network_rule_collections': {'key': 'properties.networkRuleCollections', 'type': '[AzureFirewallNetworkRuleCollection]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[AzureFirewallIPConfiguration]'}, + 'management_ip_configuration': {'key': 'properties.managementIpConfiguration', 'type': 'AzureFirewallIPConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'threat_intel_mode': {'key': 'properties.threatIntelMode', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + 'hub_ip_addresses': {'key': 'properties.hubIPAddresses', 'type': 'HubIPAddresses'}, + 'ip_groups': {'key': 'properties.ipGroups', 'type': '[AzureFirewallIpGroups]'}, + 'sku': {'key': 'properties.sku', 'type': 'AzureFirewallSku'}, + 'additional_properties': {'key': 'properties.additionalProperties', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewall, self).__init__(**kwargs) + self.zones = kwargs.get('zones', None) + self.etag = None + self.application_rule_collections = kwargs.get('application_rule_collections', None) + self.nat_rule_collections = kwargs.get('nat_rule_collections', None) + self.network_rule_collections = kwargs.get('network_rule_collections', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.management_ip_configuration = kwargs.get('management_ip_configuration', None) + self.provisioning_state = None + self.threat_intel_mode = kwargs.get('threat_intel_mode', None) + self.virtual_hub = kwargs.get('virtual_hub', None) + self.firewall_policy = kwargs.get('firewall_policy', None) + self.hub_ip_addresses = kwargs.get('hub_ip_addresses', None) + self.ip_groups = None + self.sku = kwargs.get('sku', None) + self.additional_properties = kwargs.get('additional_properties', None) + + +class AzureFirewallApplicationRule(msrest.serialization.Model): + """Properties of an application rule. + + :param name: Name of the application rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param protocols: Array of ApplicationRuleProtocols. + :type protocols: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallApplicationRuleProtocol] + :param target_fqdns: List of FQDNs for this rule. + :type target_fqdns: list[str] + :param fqdn_tags: List of FQDN Tags for this rule. + :type fqdn_tags: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[AzureFirewallApplicationRuleProtocol]'}, + 'target_fqdns': {'key': 'targetFqdns', 'type': '[str]'}, + 'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallApplicationRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.source_addresses = kwargs.get('source_addresses', None) + self.protocols = kwargs.get('protocols', None) + self.target_fqdns = kwargs.get('target_fqdns', None) + self.fqdn_tags = kwargs.get('fqdn_tags', None) + self.source_ip_groups = kwargs.get('source_ip_groups', None) + + +class AzureFirewallApplicationRuleCollection(SubResource): + """Application rule collection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the Azure firewall. This name can + be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param priority: Priority of the application rule collection resource. + :type priority: int + :param action: The action type of a rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.AzureFirewallRCAction + :param rules: Collection of rules used by a application rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallApplicationRule] + :ivar provisioning_state: The provisioning state of the application rule collection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallApplicationRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallApplicationRuleCollection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.priority = kwargs.get('priority', None) + self.action = kwargs.get('action', None) + self.rules = kwargs.get('rules', None) + self.provisioning_state = None + + +class AzureFirewallApplicationRuleProtocol(msrest.serialization.Model): + """Properties of the application rule protocol. + + :param protocol_type: Protocol type. Possible values include: "Http", "Https", "Mssql". + :type protocol_type: str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallApplicationRuleProtocolType + :param port: Port number for the protocol, cannot be greater than 64000. This field is + optional. + :type port: int + """ + + _validation = { + 'port': {'maximum': 64000, 'minimum': 0}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallApplicationRuleProtocol, self).__init__(**kwargs) + self.protocol_type = kwargs.get('protocol_type', None) + self.port = kwargs.get('port', None) + + +class AzureFirewallFqdnTag(Resource): + """Azure Firewall FQDN Tag Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the Azure firewall FQDN tag resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar fqdn_tag_name: The name of this FQDN Tag. + :vartype fqdn_tag_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'fqdn_tag_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'fqdn_tag_name': {'key': 'properties.fqdnTagName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallFqdnTag, self).__init__(**kwargs) + self.etag = None + self.provisioning_state = None + self.fqdn_tag_name = None + + +class AzureFirewallFqdnTagListResult(msrest.serialization.Model): + """Response for ListAzureFirewallFqdnTags API service call. + + :param value: List of Azure Firewall FQDN Tags in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallFqdnTag] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AzureFirewallFqdnTag]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallFqdnTagListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AzureFirewallIPConfiguration(SubResource): + """IP configuration of an Azure Firewall. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar private_ip_address: The Firewall Internal Load Balancer IP to be used as the next hop in + User Defined Routes. + :vartype private_ip_address: str + :param subnet: Reference to the subnet resource. This resource must be named + 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param public_ip_address: Reference to the PublicIP resource. This field is a mandatory input + if subnet is not null. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the Azure firewall IP configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.private_ip_address = None + self.subnet = kwargs.get('subnet', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.provisioning_state = None + + +class AzureFirewallIpGroups(msrest.serialization.Model): + """IpGroups associated with azure firewall. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar change_number: The iteration number. + :vartype change_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'change_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'change_number': {'key': 'changeNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallIpGroups, self).__init__(**kwargs) + self.id = None + self.change_number = None + + +class AzureFirewallListResult(msrest.serialization.Model): + """Response for ListAzureFirewalls API service call. + + :param value: List of Azure Firewalls in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewall] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AzureFirewall]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class AzureFirewallNatRCAction(msrest.serialization.Model): + """AzureFirewall NAT Rule Collection Action. + + :param type: The type of action. Possible values include: "Snat", "Dnat". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.AzureFirewallNatRCActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallNatRCAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + + +class AzureFirewallNatRule(msrest.serialization.Model): + """Properties of a NAT rule. + + :param name: Name of the NAT rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses for this rule. Supports IP + ranges, prefixes, and service tags. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param protocols: Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. + :type protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallNetworkRuleProtocol] + :param translated_address: The translated address for this NAT rule. + :type translated_address: str + :param translated_port: The translated port for this NAT rule. + :type translated_port: str + :param translated_fqdn: The translated FQDN for this NAT rule. + :type translated_fqdn: str + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[str]'}, + 'translated_address': {'key': 'translatedAddress', 'type': 'str'}, + 'translated_port': {'key': 'translatedPort', 'type': 'str'}, + 'translated_fqdn': {'key': 'translatedFqdn', 'type': 'str'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallNatRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.source_addresses = kwargs.get('source_addresses', None) + self.destination_addresses = kwargs.get('destination_addresses', None) + self.destination_ports = kwargs.get('destination_ports', None) + self.protocols = kwargs.get('protocols', None) + self.translated_address = kwargs.get('translated_address', None) + self.translated_port = kwargs.get('translated_port', None) + self.translated_fqdn = kwargs.get('translated_fqdn', None) + self.source_ip_groups = kwargs.get('source_ip_groups', None) + + +class AzureFirewallNatRuleCollection(SubResource): + """NAT rule collection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the Azure firewall. This name can + be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param priority: Priority of the NAT rule collection resource. + :type priority: int + :param action: The action type of a NAT rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.AzureFirewallNatRCAction + :param rules: Collection of rules used by a NAT rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallNatRule] + :ivar provisioning_state: The provisioning state of the NAT rule collection resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallNatRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallNatRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallNatRuleCollection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.priority = kwargs.get('priority', None) + self.action = kwargs.get('action', None) + self.rules = kwargs.get('rules', None) + self.provisioning_state = None + + +class AzureFirewallNetworkRule(msrest.serialization.Model): + """Properties of the network rule. + + :param name: Name of the network rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param protocols: Array of AzureFirewallNetworkRuleProtocols. + :type protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallNetworkRuleProtocol] + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param destination_fqdns: List of destination FQDNs. + :type destination_fqdns: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param destination_ip_groups: List of destination IpGroups for this rule. + :type destination_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'protocols': {'key': 'protocols', 'type': '[str]'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'destination_fqdns': {'key': 'destinationFqdns', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'destination_ip_groups': {'key': 'destinationIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallNetworkRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.protocols = kwargs.get('protocols', None) + self.source_addresses = kwargs.get('source_addresses', None) + self.destination_addresses = kwargs.get('destination_addresses', None) + self.destination_ports = kwargs.get('destination_ports', None) + self.destination_fqdns = kwargs.get('destination_fqdns', None) + self.source_ip_groups = kwargs.get('source_ip_groups', None) + self.destination_ip_groups = kwargs.get('destination_ip_groups', None) + + +class AzureFirewallNetworkRuleCollection(SubResource): + """Network rule collection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the Azure firewall. This name can + be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param priority: Priority of the network rule collection resource. + :type priority: int + :param action: The action type of a rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.AzureFirewallRCAction + :param rules: Collection of rules used by a network rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallNetworkRule] + :ivar provisioning_state: The provisioning state of the network rule collection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallNetworkRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallNetworkRuleCollection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.priority = kwargs.get('priority', None) + self.action = kwargs.get('action', None) + self.rules = kwargs.get('rules', None) + self.provisioning_state = None + + +class AzureFirewallPublicIPAddress(msrest.serialization.Model): + """Public IP Address associated with azure firewall. + + :param address: Public IP Address value. + :type address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallPublicIPAddress, self).__init__(**kwargs) + self.address = kwargs.get('address', None) + + +class AzureFirewallRCAction(msrest.serialization.Model): + """Properties of the AzureFirewallRCAction. + + :param type: The type of action. Possible values include: "Allow", "Deny". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.AzureFirewallRCActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallRCAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + + +class AzureFirewallSku(msrest.serialization.Model): + """SKU of an Azure Firewall. + + :param name: Name of an Azure Firewall SKU. Possible values include: "AZFW_VNet", "AZFW_Hub". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.AzureFirewallSkuName + :param tier: Tier of an Azure Firewall. Possible values include: "Standard", "Premium", + "Basic". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.AzureFirewallSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class AzureReachabilityReport(msrest.serialization.Model): + """Azure reachability report details. + + All required parameters must be populated in order to send to Azure. + + :param aggregation_level: Required. The aggregation level of Azure reachability report. Can be + Country, State or City. + :type aggregation_level: str + :param provider_location: Required. Parameters that define a geographic location. + :type provider_location: ~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportLocation + :param reachability_report: Required. List of Azure reachability report items. + :type reachability_report: + list[~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportItem] + """ + + _validation = { + 'aggregation_level': {'required': True}, + 'provider_location': {'required': True}, + 'reachability_report': {'required': True}, + } + + _attribute_map = { + 'aggregation_level': {'key': 'aggregationLevel', 'type': 'str'}, + 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, + 'reachability_report': {'key': 'reachabilityReport', 'type': '[AzureReachabilityReportItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureReachabilityReport, self).__init__(**kwargs) + self.aggregation_level = kwargs['aggregation_level'] + self.provider_location = kwargs['provider_location'] + self.reachability_report = kwargs['reachability_report'] + + +class AzureReachabilityReportItem(msrest.serialization.Model): + """Azure reachability report details for a given provider location. + + :param provider: The Internet service provider. + :type provider: str + :param azure_location: The Azure region. + :type azure_location: str + :param latencies: List of latency details for each of the time series. + :type latencies: + list[~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportLatencyInfo] + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'azure_location': {'key': 'azureLocation', 'type': 'str'}, + 'latencies': {'key': 'latencies', 'type': '[AzureReachabilityReportLatencyInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureReachabilityReportItem, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.azure_location = kwargs.get('azure_location', None) + self.latencies = kwargs.get('latencies', None) + + +class AzureReachabilityReportLatencyInfo(msrest.serialization.Model): + """Details on latency for a time series. + + :param time_stamp: The time stamp. + :type time_stamp: ~datetime.datetime + :param score: The relative latency score between 1 and 100, higher values indicating a faster + connection. + :type score: int + """ + + _validation = { + 'score': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'score': {'key': 'score', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureReachabilityReportLatencyInfo, self).__init__(**kwargs) + self.time_stamp = kwargs.get('time_stamp', None) + self.score = kwargs.get('score', None) + + +class AzureReachabilityReportLocation(msrest.serialization.Model): + """Parameters that define a geographic location. + + All required parameters must be populated in order to send to Azure. + + :param country: Required. The name of the country. + :type country: str + :param state: The name of the state. + :type state: str + :param city: The name of the city or town. + :type city: str + """ + + _validation = { + 'country': {'required': True}, + } + + _attribute_map = { + 'country': {'key': 'country', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureReachabilityReportLocation, self).__init__(**kwargs) + self.country = kwargs['country'] + self.state = kwargs.get('state', None) + self.city = kwargs.get('city', None) + + +class AzureReachabilityReportParameters(msrest.serialization.Model): + """Geographic and time constraints for Azure reachability report. + + All required parameters must be populated in order to send to Azure. + + :param provider_location: Required. Parameters that define a geographic location. + :type provider_location: ~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportLocation + :param providers: List of Internet service providers. + :type providers: list[str] + :param azure_locations: Optional Azure regions to scope the query to. + :type azure_locations: list[str] + :param start_time: Required. The start time for the Azure reachability report. + :type start_time: ~datetime.datetime + :param end_time: Required. The end time for the Azure reachability report. + :type end_time: ~datetime.datetime + """ + + _validation = { + 'provider_location': {'required': True}, + 'start_time': {'required': True}, + 'end_time': {'required': True}, + } + + _attribute_map = { + 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureReachabilityReportParameters, self).__init__(**kwargs) + self.provider_location = kwargs['provider_location'] + self.providers = kwargs.get('providers', None) + self.azure_locations = kwargs.get('azure_locations', None) + self.start_time = kwargs['start_time'] + self.end_time = kwargs['end_time'] + + +class AzureWebCategory(msrest.serialization.Model): + """Azure Web Category Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar group: The name of the group that the category belongs to. + :vartype group: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'group': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'group': {'key': 'properties.group', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureWebCategory, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.name = None + self.type = None + self.etag = None + self.group = None + + +class AzureWebCategoryListResult(msrest.serialization.Model): + """Response for ListAzureWebCategories API service call. + + :param value: List of Azure Web Categories for a given Subscription. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AzureWebCategory] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AzureWebCategory]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureWebCategoryListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class BackendAddressInboundNatRulePortMappings(msrest.serialization.Model): + """The response for a QueryInboundNatRulePortMapping API. + + :param inbound_nat_rule_port_mappings: Collection of inbound NAT rule port mappings. + :type inbound_nat_rule_port_mappings: + list[~azure.mgmt.network.v2021_05_01.models.InboundNatRulePortMapping] + """ + + _attribute_map = { + 'inbound_nat_rule_port_mappings': {'key': 'inboundNatRulePortMappings', 'type': '[InboundNatRulePortMapping]'}, + } + + def __init__( + self, + **kwargs + ): + super(BackendAddressInboundNatRulePortMappings, self).__init__(**kwargs) + self.inbound_nat_rule_port_mappings = kwargs.get('inbound_nat_rule_port_mappings', None) + + +class BackendAddressPool(SubResource): + """Pool of backend IP addresses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of backend address pools + used by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param location: The location of the backend address pool. + :type location: str + :param tunnel_interfaces: An array of gateway load balancer tunnel interfaces. + :type tunnel_interfaces: + list[~azure.mgmt.network.v2021_05_01.models.GatewayLoadBalancerTunnelInterface] + :param load_balancer_backend_addresses: An array of backend addresses. + :type load_balancer_backend_addresses: + list[~azure.mgmt.network.v2021_05_01.models.LoadBalancerBackendAddress] + :ivar backend_ip_configurations: An array of references to IP addresses defined in network + interfaces. + :vartype backend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration] + :ivar load_balancing_rules: An array of references to load balancing rules that use this + backend address pool. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar outbound_rule: A reference to an outbound rule that uses this backend address pool. + :vartype outbound_rule: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar outbound_rules: An array of references to outbound rules that use this backend address + pool. + :vartype outbound_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar inbound_nat_rules: An array of references to inbound NAT rules that use this backend + address pool. + :vartype inbound_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the backend address pool resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'backend_ip_configurations': {'readonly': True}, + 'load_balancing_rules': {'readonly': True}, + 'outbound_rule': {'readonly': True}, + 'outbound_rules': {'readonly': True}, + 'inbound_nat_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'tunnel_interfaces': {'key': 'properties.tunnelInterfaces', 'type': '[GatewayLoadBalancerTunnelInterface]'}, + 'load_balancer_backend_addresses': {'key': 'properties.loadBalancerBackendAddresses', 'type': '[LoadBalancerBackendAddress]'}, + 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, + 'outbound_rule': {'key': 'properties.outboundRule', 'type': 'SubResource'}, + 'outbound_rules': {'key': 'properties.outboundRules', 'type': '[SubResource]'}, + 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BackendAddressPool, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.location = kwargs.get('location', None) + self.tunnel_interfaces = kwargs.get('tunnel_interfaces', None) + self.load_balancer_backend_addresses = kwargs.get('load_balancer_backend_addresses', None) + self.backend_ip_configurations = None + self.load_balancing_rules = None + self.outbound_rule = None + self.outbound_rules = None + self.inbound_nat_rules = None + self.provisioning_state = None + + +class BastionActiveSession(msrest.serialization.Model): + """The session detail for a target. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar session_id: A unique id for the session. + :vartype session_id: str + :ivar start_time: The time when the session started. + :vartype start_time: any + :ivar target_subscription_id: The subscription id for the target virtual machine. + :vartype target_subscription_id: str + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar target_host_name: The host name of the target. + :vartype target_host_name: str + :ivar target_resource_group: The resource group of the target. + :vartype target_resource_group: str + :ivar user_name: The user name who is active on this session. + :vartype user_name: str + :ivar target_ip_address: The IP Address of the target. + :vartype target_ip_address: str + :ivar protocol: The protocol used to connect to the target. Possible values include: "SSH", + "RDP". + :vartype protocol: str or ~azure.mgmt.network.v2021_05_01.models.BastionConnectProtocol + :ivar target_resource_id: The resource id of the target. + :vartype target_resource_id: str + :ivar session_duration_in_mins: Duration in mins the session has been active. + :vartype session_duration_in_mins: float + """ + + _validation = { + 'session_id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'target_subscription_id': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'target_host_name': {'readonly': True}, + 'target_resource_group': {'readonly': True}, + 'user_name': {'readonly': True}, + 'target_ip_address': {'readonly': True}, + 'protocol': {'readonly': True}, + 'target_resource_id': {'readonly': True}, + 'session_duration_in_mins': {'readonly': True}, + } + + _attribute_map = { + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'object'}, + 'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_host_name': {'key': 'targetHostName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'target_ip_address': {'key': 'targetIpAddress', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'session_duration_in_mins': {'key': 'sessionDurationInMins', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionActiveSession, self).__init__(**kwargs) + self.session_id = None + self.start_time = None + self.target_subscription_id = None + self.resource_type = None + self.target_host_name = None + self.target_resource_group = None + self.user_name = None + self.target_ip_address = None + self.protocol = None + self.target_resource_id = None + self.session_duration_in_mins = None + + +class BastionActiveSessionListResult(msrest.serialization.Model): + """Response for GetActiveSessions. + + :param value: List of active sessions on the bastion. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BastionActiveSession] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionActiveSession]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionActiveSessionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class BastionHost(Resource): + """Bastion Host resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param sku: The sku of this Bastion Host. + :type sku: ~azure.mgmt.network.v2021_05_01.models.Sku + :param ip_configurations: IP configuration of the Bastion Host resource. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.BastionHostIPConfiguration] + :param dns_name: FQDN for the endpoint on which bastion host is accessible. + :type dns_name: str + :ivar provisioning_state: The provisioning state of the bastion host resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param scale_units: The scale units for the Bastion Host resource. + :type scale_units: int + :param disable_copy_paste: Enable/Disable Copy/Paste feature of the Bastion Host resource. + :type disable_copy_paste: bool + :param enable_file_copy: Enable/Disable File Copy feature of the Bastion Host resource. + :type enable_file_copy: bool + :param enable_ip_connect: Enable/Disable IP Connect feature of the Bastion Host resource. + :type enable_ip_connect: bool + :param enable_shareable_link: Enable/Disable Shareable Link of the Bastion Host resource. + :type enable_shareable_link: bool + :param enable_tunneling: Enable/Disable Tunneling feature of the Bastion Host resource. + :type enable_tunneling: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'scale_units': {'maximum': 50, 'minimum': 2}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[BastionHostIPConfiguration]'}, + 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'scale_units': {'key': 'properties.scaleUnits', 'type': 'int'}, + 'disable_copy_paste': {'key': 'properties.disableCopyPaste', 'type': 'bool'}, + 'enable_file_copy': {'key': 'properties.enableFileCopy', 'type': 'bool'}, + 'enable_ip_connect': {'key': 'properties.enableIpConnect', 'type': 'bool'}, + 'enable_shareable_link': {'key': 'properties.enableShareableLink', 'type': 'bool'}, + 'enable_tunneling': {'key': 'properties.enableTunneling', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionHost, self).__init__(**kwargs) + self.etag = None + self.sku = kwargs.get('sku', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.dns_name = kwargs.get('dns_name', None) + self.provisioning_state = None + self.scale_units = kwargs.get('scale_units', None) + self.disable_copy_paste = kwargs.get('disable_copy_paste', False) + self.enable_file_copy = kwargs.get('enable_file_copy', False) + self.enable_ip_connect = kwargs.get('enable_ip_connect', False) + self.enable_shareable_link = kwargs.get('enable_shareable_link', False) + self.enable_tunneling = kwargs.get('enable_tunneling', False) + + +class BastionHostIPConfiguration(SubResource): + """IP configuration of an Bastion Host. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Ip configuration type. + :vartype type: str + :param subnet: Reference of the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param public_ip_address: Reference of the PublicIP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the bastion host IP configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_ip_allocation_method: Private IP allocation method. Possible values include: + "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionHostIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.subnet = kwargs.get('subnet', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.provisioning_state = None + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + + +class BastionHostListResult(msrest.serialization.Model): + """Response for ListBastionHosts API service call. + + :param value: List of Bastion Hosts in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BastionHost] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionHost]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionHostListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class BastionSessionDeleteResult(msrest.serialization.Model): + """Response for DisconnectActiveSessions. + + :param value: List of sessions with their corresponding state. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BastionSessionState] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionSessionState]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionSessionDeleteResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class BastionSessionState(msrest.serialization.Model): + """The session state detail for a target. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar session_id: A unique id for the session. + :vartype session_id: str + :ivar message: Used for extra information. + :vartype message: str + :ivar state: The state of the session. Disconnected/Failed/NotFound. + :vartype state: str + """ + + _validation = { + 'session_id': {'readonly': True}, + 'message': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionSessionState, self).__init__(**kwargs) + self.session_id = None + self.message = None + self.state = None + + +class BastionShareableLink(msrest.serialization.Model): + """Bastion Shareable Link. + + 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 vm: Required. Reference of the virtual machine resource. + :type vm: ~azure.mgmt.network.v2021_05_01.models.VM + :ivar bsl: The unique Bastion Shareable Link to the virtual machine. + :vartype bsl: str + :ivar created_at: The time when the link was created. + :vartype created_at: str + :ivar message: Optional field indicating the warning or error message related to the vm in case + of partial failure. + :vartype message: str + """ + + _validation = { + 'vm': {'required': True}, + 'bsl': {'readonly': True}, + 'created_at': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'vm': {'key': 'vm', 'type': 'VM'}, + 'bsl': {'key': 'bsl', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionShareableLink, self).__init__(**kwargs) + self.vm = kwargs['vm'] + self.bsl = None + self.created_at = None + self.message = None + + +class BastionShareableLinkListRequest(msrest.serialization.Model): + """Post request for all the Bastion Shareable Link endpoints. + + :param vms: List of VM references. + :type vms: list[~azure.mgmt.network.v2021_05_01.models.BastionShareableLink] + """ + + _attribute_map = { + 'vms': {'key': 'vms', 'type': '[BastionShareableLink]'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionShareableLinkListRequest, self).__init__(**kwargs) + self.vms = kwargs.get('vms', None) + + +class BastionShareableLinkListResult(msrest.serialization.Model): + """Response for all the Bastion Shareable Link endpoints. + + :param value: List of Bastion Shareable Links for the request. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BastionShareableLink] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionShareableLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionShareableLinkListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class BGPCommunity(msrest.serialization.Model): + """Contains bgp community information offered in Service Community resources. + + :param service_supported_region: The region which the service support. e.g. For O365, region is + Global. + :type service_supported_region: str + :param community_name: The name of the bgp community. e.g. Skype. + :type community_name: str + :param community_value: The value of the bgp community. For more information: + https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + :type community_value: str + :param community_prefixes: The prefixes that the bgp community contains. + :type community_prefixes: list[str] + :param is_authorized_to_use: Customer is authorized to use bgp community or not. + :type is_authorized_to_use: bool + :param service_group: The service group of the bgp community contains. + :type service_group: str + """ + + _attribute_map = { + 'service_supported_region': {'key': 'serviceSupportedRegion', 'type': 'str'}, + 'community_name': {'key': 'communityName', 'type': 'str'}, + 'community_value': {'key': 'communityValue', 'type': 'str'}, + 'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'}, + 'is_authorized_to_use': {'key': 'isAuthorizedToUse', 'type': 'bool'}, + 'service_group': {'key': 'serviceGroup', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BGPCommunity, self).__init__(**kwargs) + self.service_supported_region = kwargs.get('service_supported_region', None) + self.community_name = kwargs.get('community_name', None) + self.community_value = kwargs.get('community_value', None) + self.community_prefixes = kwargs.get('community_prefixes', None) + self.is_authorized_to_use = kwargs.get('is_authorized_to_use', None) + self.service_group = kwargs.get('service_group', None) + + +class BgpConnection(SubResource): + """Virtual Appliance Site resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the connection. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Connection type. + :vartype type: str + :param peer_asn: Peer ASN. + :type peer_asn: long + :param peer_ip: Peer IP. + :type peer_ip: str + :param hub_virtual_network_connection: The reference to the HubVirtualNetworkConnection + resource. + :type hub_virtual_network_connection: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar connection_state: The current state of the VirtualHub to Peer. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_state: str or ~azure.mgmt.network.v2021_05_01.models.HubBgpConnectionStatus + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + 'connection_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peer_asn': {'key': 'properties.peerAsn', 'type': 'long'}, + 'peer_ip': {'key': 'properties.peerIp', 'type': 'str'}, + 'hub_virtual_network_connection': {'key': 'properties.hubVirtualNetworkConnection', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'connection_state': {'key': 'properties.connectionState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BgpConnection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.peer_asn = kwargs.get('peer_asn', None) + self.peer_ip = kwargs.get('peer_ip', None) + self.hub_virtual_network_connection = kwargs.get('hub_virtual_network_connection', None) + self.provisioning_state = None + self.connection_state = None + + +class BgpPeerStatus(msrest.serialization.Model): + """BGP peer status details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar local_address: The virtual network gateway's local address. + :vartype local_address: str + :ivar neighbor: The remote BGP peer. + :vartype neighbor: str + :ivar asn: The autonomous system number of the remote BGP peer. + :vartype asn: long + :ivar state: The BGP peer state. Possible values include: "Unknown", "Stopped", "Idle", + "Connecting", "Connected". + :vartype state: str or ~azure.mgmt.network.v2021_05_01.models.BgpPeerState + :ivar connected_duration: For how long the peering has been up. + :vartype connected_duration: str + :ivar routes_received: The number of routes learned from this peer. + :vartype routes_received: long + :ivar messages_sent: The number of BGP messages sent. + :vartype messages_sent: long + :ivar messages_received: The number of BGP messages received. + :vartype messages_received: long + """ + + _validation = { + 'local_address': {'readonly': True}, + 'neighbor': {'readonly': True}, + 'asn': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + 'state': {'readonly': True}, + 'connected_duration': {'readonly': True}, + 'routes_received': {'readonly': True}, + 'messages_sent': {'readonly': True}, + 'messages_received': {'readonly': True}, + } + + _attribute_map = { + 'local_address': {'key': 'localAddress', 'type': 'str'}, + 'neighbor': {'key': 'neighbor', 'type': 'str'}, + 'asn': {'key': 'asn', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'connected_duration': {'key': 'connectedDuration', 'type': 'str'}, + 'routes_received': {'key': 'routesReceived', 'type': 'long'}, + 'messages_sent': {'key': 'messagesSent', 'type': 'long'}, + 'messages_received': {'key': 'messagesReceived', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(BgpPeerStatus, self).__init__(**kwargs) + self.local_address = None + self.neighbor = None + self.asn = None + self.state = None + self.connected_duration = None + self.routes_received = None + self.messages_sent = None + self.messages_received = None + + +class BgpPeerStatusListResult(msrest.serialization.Model): + """Response for list BGP peer status API service call. + + :param value: List of BGP peers. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BgpPeerStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, + } + + def __init__( + self, + **kwargs + ): + super(BgpPeerStatusListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class BgpServiceCommunity(Resource): + """Service Community Properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param service_name: The name of the bgp community. e.g. Skype. + :type service_name: str + :param bgp_communities: A list of bgp communities. + :type bgp_communities: list[~azure.mgmt.network.v2021_05_01.models.BGPCommunity] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, + 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': '[BGPCommunity]'}, + } + + def __init__( + self, + **kwargs + ): + super(BgpServiceCommunity, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.bgp_communities = kwargs.get('bgp_communities', None) + + +class BgpServiceCommunityListResult(msrest.serialization.Model): + """Response for the ListServiceCommunity API service call. + + :param value: A list of service community resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BgpServiceCommunity] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BgpServiceCommunityListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class BgpSettings(msrest.serialization.Model): + """BGP settings details. + + :param asn: The BGP speaker's ASN. + :type asn: long + :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. + :type bgp_peering_address: str + :param peer_weight: The weight added to routes learned from this BGP speaker. + :type peer_weight: int + :param bgp_peering_addresses: BGP peering address with IP configuration ID for virtual network + gateway. + :type bgp_peering_addresses: + list[~azure.mgmt.network.v2021_05_01.models.IPConfigurationBgpPeeringAddress] + """ + + _validation = { + 'asn': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'asn': {'key': 'asn', 'type': 'long'}, + 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, + 'peer_weight': {'key': 'peerWeight', 'type': 'int'}, + 'bgp_peering_addresses': {'key': 'bgpPeeringAddresses', 'type': '[IPConfigurationBgpPeeringAddress]'}, + } + + def __init__( + self, + **kwargs + ): + super(BgpSettings, self).__init__(**kwargs) + self.asn = kwargs.get('asn', None) + self.bgp_peering_address = kwargs.get('bgp_peering_address', None) + self.peer_weight = kwargs.get('peer_weight', None) + self.bgp_peering_addresses = kwargs.get('bgp_peering_addresses', None) + + +class BreakOutCategoryPolicies(msrest.serialization.Model): + """Network Virtual Appliance Sku Properties. + + :param allow: Flag to control breakout of o365 allow category. + :type allow: bool + :param optimize: Flag to control breakout of o365 optimize category. + :type optimize: bool + :param default: Flag to control breakout of o365 default category. + :type default: bool + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': 'bool'}, + 'optimize': {'key': 'optimize', 'type': 'bool'}, + 'default': {'key': 'default', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(BreakOutCategoryPolicies, self).__init__(**kwargs) + self.allow = kwargs.get('allow', None) + self.optimize = kwargs.get('optimize', None) + self.default = kwargs.get('default', None) + + +class CheckPrivateLinkServiceVisibilityRequest(msrest.serialization.Model): + """Request body of the CheckPrivateLinkServiceVisibility API service call. + + :param private_link_service_alias: The alias of the private link service. + :type private_link_service_alias: str + """ + + _attribute_map = { + 'private_link_service_alias': {'key': 'privateLinkServiceAlias', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CheckPrivateLinkServiceVisibilityRequest, self).__init__(**kwargs) + self.private_link_service_alias = kwargs.get('private_link_service_alias', None) + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.network.v2021_05_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + + +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class ConnectionMonitor(msrest.serialization.Model): + """Parameters that define the operation to create a connection monitor. + + :param location: Connection monitor location. + :type location: str + :param tags: A set of tags. Connection monitor tags. + :type tags: dict[str, str] + :param source: Describes the source of connection monitor. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSource + :param destination: Describes the destination of connection monitor. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start automatically once created. + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + :type monitoring_interval_in_seconds: int + :param endpoints: List of connection monitor endpoints. + :type endpoints: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpoint] + :param test_configurations: List of connection monitor test configurations. + :type test_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfiguration] + :param test_groups: List of connection monitor test groups. + :type test_groups: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestGroup] + :param outputs: List of connection monitor outputs. + :type outputs: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorOutput] + :param notes: Optional notes to be associated with the connection monitor. + :type notes: str + """ + + _validation = { + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'properties.testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'properties.testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'properties.outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitor, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.source = kwargs.get('source', None) + self.destination = kwargs.get('destination', None) + self.auto_start = kwargs.get('auto_start', True) + self.monitoring_interval_in_seconds = kwargs.get('monitoring_interval_in_seconds', 60) + self.endpoints = kwargs.get('endpoints', None) + self.test_configurations = kwargs.get('test_configurations', None) + self.test_groups = kwargs.get('test_groups', None) + self.outputs = kwargs.get('outputs', None) + self.notes = kwargs.get('notes', None) + + +class ConnectionMonitorDestination(msrest.serialization.Model): + """Describes the destination of connection monitor. + + :param resource_id: The ID of the resource used as the destination by connection monitor. + :type resource_id: str + :param address: Address of the connection monitor destination (IP or domain name). + :type address: str + :param port: The destination port used by connection monitor. + :type port: int + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorDestination, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.address = kwargs.get('address', None) + self.port = kwargs.get('port', None) + + +class ConnectionMonitorEndpoint(msrest.serialization.Model): + """Describes the connection monitor endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the connection monitor endpoint. + :type name: str + :param type: The endpoint type. Possible values include: "AzureVM", "AzureVNet", "AzureSubnet", + "ExternalAddress", "MMAWorkspaceMachine", "MMAWorkspaceNetwork". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.EndpointType + :param resource_id: Resource ID of the connection monitor endpoint. + :type resource_id: str + :param address: Address of the connection monitor endpoint (IP or domain name). + :type address: str + :param filter: Filter for sub-items within the endpoint. + :type filter: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointFilter + :param scope: Endpoint scope. + :type scope: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointScope + :param coverage_level: Test coverage for the endpoint. Possible values include: "Default", + "Low", "BelowAverage", "Average", "AboveAverage", "Full". + :type coverage_level: str or ~azure.mgmt.network.v2021_05_01.models.CoverageLevel + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'ConnectionMonitorEndpointFilter'}, + 'scope': {'key': 'scope', 'type': 'ConnectionMonitorEndpointScope'}, + 'coverage_level': {'key': 'coverageLevel', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorEndpoint, self).__init__(**kwargs) + self.name = kwargs['name'] + self.type = kwargs.get('type', None) + self.resource_id = kwargs.get('resource_id', None) + self.address = kwargs.get('address', None) + self.filter = kwargs.get('filter', None) + self.scope = kwargs.get('scope', None) + self.coverage_level = kwargs.get('coverage_level', None) + + +class ConnectionMonitorEndpointFilter(msrest.serialization.Model): + """Describes the connection monitor endpoint filter. + + :param type: The behavior of the endpoint filter. Currently only 'Include' is supported. + Possible values include: "Include". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointFilterType + :param items: List of items in the filter. + :type items: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointFilterItem] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'items': {'key': 'items', 'type': '[ConnectionMonitorEndpointFilterItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorEndpointFilter, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.items = kwargs.get('items', None) + + +class ConnectionMonitorEndpointFilterItem(msrest.serialization.Model): + """Describes the connection monitor endpoint filter item. + + :param type: The type of item included in the filter. Currently only 'AgentAddress' is + supported. Possible values include: "AgentAddress". + :type type: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointFilterItemType + :param address: The address of the filter item. + :type address: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorEndpointFilterItem, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.address = kwargs.get('address', None) + + +class ConnectionMonitorEndpointScope(msrest.serialization.Model): + """Describes the connection monitor endpoint scope. + + :param include: List of items which needs to be included to the endpoint scope. + :type include: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointScopeItem] + :param exclude: List of items which needs to be excluded from the endpoint scope. + :type exclude: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointScopeItem] + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': '[ConnectionMonitorEndpointScopeItem]'}, + 'exclude': {'key': 'exclude', 'type': '[ConnectionMonitorEndpointScopeItem]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorEndpointScope, self).__init__(**kwargs) + self.include = kwargs.get('include', None) + self.exclude = kwargs.get('exclude', None) + + +class ConnectionMonitorEndpointScopeItem(msrest.serialization.Model): + """Describes the connection monitor endpoint scope item. + + :param address: The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or + IPv4/IPv6 IP address. + :type address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorEndpointScopeItem, self).__init__(**kwargs) + self.address = kwargs.get('address', None) + + +class ConnectionMonitorHttpConfiguration(msrest.serialization.Model): + """Describes the HTTP configuration. + + :param port: The port to connect to. + :type port: int + :param method: The HTTP method to use. Possible values include: "Get", "Post". + :type method: str or ~azure.mgmt.network.v2021_05_01.models.HTTPConfigurationMethod + :param path: The path component of the URI. For instance, "/dir1/dir2". + :type path: str + :param request_headers: The HTTP headers to transmit with the request. + :type request_headers: list[~azure.mgmt.network.v2021_05_01.models.HTTPHeader] + :param valid_status_code_ranges: HTTP status codes to consider successful. For instance, + "2xx,301-304,418". + :type valid_status_code_ranges: list[str] + :param prefer_https: Value indicating whether HTTPS is preferred over HTTP in cases where the + choice is not explicit. + :type prefer_https: bool + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'method': {'key': 'method', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'request_headers': {'key': 'requestHeaders', 'type': '[HTTPHeader]'}, + 'valid_status_code_ranges': {'key': 'validStatusCodeRanges', 'type': '[str]'}, + 'prefer_https': {'key': 'preferHTTPS', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorHttpConfiguration, self).__init__(**kwargs) + self.port = kwargs.get('port', None) + self.method = kwargs.get('method', None) + self.path = kwargs.get('path', None) + self.request_headers = kwargs.get('request_headers', None) + self.valid_status_code_ranges = kwargs.get('valid_status_code_ranges', None) + self.prefer_https = kwargs.get('prefer_https', None) + + +class ConnectionMonitorIcmpConfiguration(msrest.serialization.Model): + """Describes the ICMP configuration. + + :param disable_trace_route: Value indicating whether path evaluation with trace route should be + disabled. + :type disable_trace_route: bool + """ + + _attribute_map = { + 'disable_trace_route': {'key': 'disableTraceRoute', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorIcmpConfiguration, self).__init__(**kwargs) + self.disable_trace_route = kwargs.get('disable_trace_route', None) + + +class ConnectionMonitorListResult(msrest.serialization.Model): + """List of connection monitors. + + :param value: Information about connection monitors. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectionMonitorResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ConnectionMonitorOutput(msrest.serialization.Model): + """Describes a connection monitor output destination. + + :param type: Connection monitor output destination type. Currently, only "Workspace" is + supported. Possible values include: "Workspace". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.OutputType + :param workspace_settings: Describes the settings for producing output into a log analytics + workspace. + :type workspace_settings: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorWorkspaceSettings + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'workspace_settings': {'key': 'workspaceSettings', 'type': 'ConnectionMonitorWorkspaceSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorOutput, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.workspace_settings = kwargs.get('workspace_settings', None) + + +class ConnectionMonitorParameters(msrest.serialization.Model): + """Parameters that define the operation to create a connection monitor. + + :param source: Describes the source of connection monitor. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSource + :param destination: Describes the destination of connection monitor. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start automatically once created. + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + :type monitoring_interval_in_seconds: int + :param endpoints: List of connection monitor endpoints. + :type endpoints: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpoint] + :param test_configurations: List of connection monitor test configurations. + :type test_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfiguration] + :param test_groups: List of connection monitor test groups. + :type test_groups: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestGroup] + :param outputs: List of connection monitor outputs. + :type outputs: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorOutput] + :param notes: Optional notes to be associated with the connection monitor. + :type notes: str + """ + + _validation = { + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'notes', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorParameters, self).__init__(**kwargs) + self.source = kwargs.get('source', None) + self.destination = kwargs.get('destination', None) + self.auto_start = kwargs.get('auto_start', True) + self.monitoring_interval_in_seconds = kwargs.get('monitoring_interval_in_seconds', 60) + self.endpoints = kwargs.get('endpoints', None) + self.test_configurations = kwargs.get('test_configurations', None) + self.test_groups = kwargs.get('test_groups', None) + self.outputs = kwargs.get('outputs', None) + self.notes = kwargs.get('notes', None) + + +class ConnectionMonitorQueryResult(msrest.serialization.Model): + """List of connection states snapshots. + + :param source_status: Status of connection monitor source. Possible values include: "Unknown", + "Active", "Inactive". + :type source_status: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSourceStatus + :param states: Information about connection states. + :type states: list[~azure.mgmt.network.v2021_05_01.models.ConnectionStateSnapshot] + """ + + _attribute_map = { + 'source_status': {'key': 'sourceStatus', 'type': 'str'}, + 'states': {'key': 'states', 'type': '[ConnectionStateSnapshot]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorQueryResult, self).__init__(**kwargs) + self.source_status = kwargs.get('source_status', None) + self.states = kwargs.get('states', None) + + +class ConnectionMonitorResult(msrest.serialization.Model): + """Information about the connection monitor. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the connection monitor. + :vartype name: str + :ivar id: ID of the connection monitor. + :vartype id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Connection monitor type. + :vartype type: str + :param location: Connection monitor location. + :type location: str + :param tags: A set of tags. Connection monitor tags. + :type tags: dict[str, str] + :param source: Describes the source of connection monitor. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSource + :param destination: Describes the destination of connection monitor. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start automatically once created. + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + :type monitoring_interval_in_seconds: int + :param endpoints: List of connection monitor endpoints. + :type endpoints: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpoint] + :param test_configurations: List of connection monitor test configurations. + :type test_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfiguration] + :param test_groups: List of connection monitor test groups. + :type test_groups: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestGroup] + :param outputs: List of connection monitor outputs. + :type outputs: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorOutput] + :param notes: Optional notes to be associated with the connection monitor. + :type notes: str + :ivar provisioning_state: The provisioning state of the connection monitor. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar start_time: The date and time when the connection monitor was started. + :vartype start_time: ~datetime.datetime + :ivar monitoring_status: The monitoring status of the connection monitor. + :vartype monitoring_status: str + :ivar connection_monitor_type: Type of connection monitor. Possible values include: + "MultiEndpoint", "SingleSourceDestination". + :vartype connection_monitor_type: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorType + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + 'provisioning_state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'monitoring_status': {'readonly': True}, + 'connection_monitor_type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'properties.testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'properties.testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'properties.outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + 'connection_monitor_type': {'key': 'properties.connectionMonitorType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.etag = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.source = kwargs.get('source', None) + self.destination = kwargs.get('destination', None) + self.auto_start = kwargs.get('auto_start', True) + self.monitoring_interval_in_seconds = kwargs.get('monitoring_interval_in_seconds', 60) + self.endpoints = kwargs.get('endpoints', None) + self.test_configurations = kwargs.get('test_configurations', None) + self.test_groups = kwargs.get('test_groups', None) + self.outputs = kwargs.get('outputs', None) + self.notes = kwargs.get('notes', None) + self.provisioning_state = None + self.start_time = None + self.monitoring_status = None + self.connection_monitor_type = None + + +class ConnectionMonitorResultProperties(ConnectionMonitorParameters): + """Describes the properties of a connection monitor. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param source: Describes the source of connection monitor. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSource + :param destination: Describes the destination of connection monitor. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start automatically once created. + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + :type monitoring_interval_in_seconds: int + :param endpoints: List of connection monitor endpoints. + :type endpoints: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpoint] + :param test_configurations: List of connection monitor test configurations. + :type test_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfiguration] + :param test_groups: List of connection monitor test groups. + :type test_groups: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestGroup] + :param outputs: List of connection monitor outputs. + :type outputs: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorOutput] + :param notes: Optional notes to be associated with the connection monitor. + :type notes: str + :ivar provisioning_state: The provisioning state of the connection monitor. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar start_time: The date and time when the connection monitor was started. + :vartype start_time: ~datetime.datetime + :ivar monitoring_status: The monitoring status of the connection monitor. + :vartype monitoring_status: str + :ivar connection_monitor_type: Type of connection monitor. Possible values include: + "MultiEndpoint", "SingleSourceDestination". + :vartype connection_monitor_type: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorType + """ + + _validation = { + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + 'provisioning_state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'monitoring_status': {'readonly': True}, + 'connection_monitor_type': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'notes', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'monitoring_status': {'key': 'monitoringStatus', 'type': 'str'}, + 'connection_monitor_type': {'key': 'connectionMonitorType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorResultProperties, self).__init__(**kwargs) + self.provisioning_state = None + self.start_time = None + self.monitoring_status = None + self.connection_monitor_type = None + + +class ConnectionMonitorSource(msrest.serialization.Model): + """Describes the source of connection monitor. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The ID of the resource used as the source by connection monitor. + :type resource_id: str + :param port: The source port used by connection monitor. + :type port: int + """ + + _validation = { + 'resource_id': {'required': True}, + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorSource, self).__init__(**kwargs) + self.resource_id = kwargs['resource_id'] + self.port = kwargs.get('port', None) + + +class ConnectionMonitorSuccessThreshold(msrest.serialization.Model): + """Describes the threshold for declaring a test successful. + + :param checks_failed_percent: The maximum percentage of failed checks permitted for a test to + evaluate as successful. + :type checks_failed_percent: int + :param round_trip_time_ms: The maximum round-trip time in milliseconds permitted for a test to + evaluate as successful. + :type round_trip_time_ms: float + """ + + _attribute_map = { + 'checks_failed_percent': {'key': 'checksFailedPercent', 'type': 'int'}, + 'round_trip_time_ms': {'key': 'roundTripTimeMs', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorSuccessThreshold, self).__init__(**kwargs) + self.checks_failed_percent = kwargs.get('checks_failed_percent', None) + self.round_trip_time_ms = kwargs.get('round_trip_time_ms', None) + + +class ConnectionMonitorTcpConfiguration(msrest.serialization.Model): + """Describes the TCP configuration. + + :param port: The port to connect to. + :type port: int + :param disable_trace_route: Value indicating whether path evaluation with trace route should be + disabled. + :type disable_trace_route: bool + :param destination_port_behavior: Destination port behavior. Possible values include: "None", + "ListenIfAvailable". + :type destination_port_behavior: str or + ~azure.mgmt.network.v2021_05_01.models.DestinationPortBehavior + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'disable_trace_route': {'key': 'disableTraceRoute', 'type': 'bool'}, + 'destination_port_behavior': {'key': 'destinationPortBehavior', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorTcpConfiguration, self).__init__(**kwargs) + self.port = kwargs.get('port', None) + self.disable_trace_route = kwargs.get('disable_trace_route', None) + self.destination_port_behavior = kwargs.get('destination_port_behavior', None) + + +class ConnectionMonitorTestConfiguration(msrest.serialization.Model): + """Describes a connection monitor test configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the connection monitor test configuration. + :type name: str + :param test_frequency_sec: The frequency of test evaluation, in seconds. + :type test_frequency_sec: int + :param protocol: Required. The protocol to use in test evaluation. Possible values include: + "Tcp", "Http", "Icmp". + :type protocol: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfigurationProtocol + :param preferred_ip_version: The preferred IP version to use in test evaluation. The connection + monitor may choose to use a different version depending on other parameters. Possible values + include: "IPv4", "IPv6". + :type preferred_ip_version: str or ~azure.mgmt.network.v2021_05_01.models.PreferredIPVersion + :param http_configuration: The parameters used to perform test evaluation over HTTP. + :type http_configuration: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorHttpConfiguration + :param tcp_configuration: The parameters used to perform test evaluation over TCP. + :type tcp_configuration: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTcpConfiguration + :param icmp_configuration: The parameters used to perform test evaluation over ICMP. + :type icmp_configuration: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorIcmpConfiguration + :param success_threshold: The threshold for declaring a test successful. + :type success_threshold: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSuccessThreshold + """ + + _validation = { + 'name': {'required': True}, + 'protocol': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'test_frequency_sec': {'key': 'testFrequencySec', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'preferred_ip_version': {'key': 'preferredIPVersion', 'type': 'str'}, + 'http_configuration': {'key': 'httpConfiguration', 'type': 'ConnectionMonitorHttpConfiguration'}, + 'tcp_configuration': {'key': 'tcpConfiguration', 'type': 'ConnectionMonitorTcpConfiguration'}, + 'icmp_configuration': {'key': 'icmpConfiguration', 'type': 'ConnectionMonitorIcmpConfiguration'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'ConnectionMonitorSuccessThreshold'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorTestConfiguration, self).__init__(**kwargs) + self.name = kwargs['name'] + self.test_frequency_sec = kwargs.get('test_frequency_sec', None) + self.protocol = kwargs['protocol'] + self.preferred_ip_version = kwargs.get('preferred_ip_version', None) + self.http_configuration = kwargs.get('http_configuration', None) + self.tcp_configuration = kwargs.get('tcp_configuration', None) + self.icmp_configuration = kwargs.get('icmp_configuration', None) + self.success_threshold = kwargs.get('success_threshold', None) + + +class ConnectionMonitorTestGroup(msrest.serialization.Model): + """Describes the connection monitor test group. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the connection monitor test group. + :type name: str + :param disable: Value indicating whether test group is disabled. + :type disable: bool + :param test_configurations: Required. List of test configuration names. + :type test_configurations: list[str] + :param sources: Required. List of source endpoint names. + :type sources: list[str] + :param destinations: Required. List of destination endpoint names. + :type destinations: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'test_configurations': {'required': True}, + 'sources': {'required': True}, + 'destinations': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disable': {'key': 'disable', 'type': 'bool'}, + 'test_configurations': {'key': 'testConfigurations', 'type': '[str]'}, + 'sources': {'key': 'sources', 'type': '[str]'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorTestGroup, self).__init__(**kwargs) + self.name = kwargs['name'] + self.disable = kwargs.get('disable', None) + self.test_configurations = kwargs['test_configurations'] + self.sources = kwargs['sources'] + self.destinations = kwargs['destinations'] + + +class ConnectionMonitorWorkspaceSettings(msrest.serialization.Model): + """Describes the settings for producing output into a log analytics workspace. + + :param workspace_resource_id: Log analytics workspace resource ID. + :type workspace_resource_id: str + """ + + _attribute_map = { + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionMonitorWorkspaceSettings, self).__init__(**kwargs) + self.workspace_resource_id = kwargs.get('workspace_resource_id', None) + + +class ConnectionResetSharedKey(msrest.serialization.Model): + """The virtual network connection reset shared key. + + All required parameters must be populated in order to send to Azure. + + :param key_length: Required. The virtual network connection reset shared key length, should + between 1 and 128. + :type key_length: int + """ + + _validation = { + 'key_length': {'required': True, 'maximum': 128, 'minimum': 1}, + } + + _attribute_map = { + 'key_length': {'key': 'keyLength', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionResetSharedKey, self).__init__(**kwargs) + self.key_length = kwargs['key_length'] + + +class ConnectionSharedKey(SubResource): + """Response for GetConnectionSharedKey API service call. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param value: Required. The virtual network connection shared key value. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionSharedKey, self).__init__(**kwargs) + self.value = kwargs['value'] + + +class ConnectionStateSnapshot(msrest.serialization.Model): + """Connection state snapshot. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param connection_state: The connection state. Possible values include: "Reachable", + "Unreachable", "Unknown". + :type connection_state: str or ~azure.mgmt.network.v2021_05_01.models.ConnectionState + :param start_time: The start time of the connection snapshot. + :type start_time: ~datetime.datetime + :param end_time: The end time of the connection snapshot. + :type end_time: ~datetime.datetime + :param evaluation_state: Connectivity analysis evaluation state. Possible values include: + "NotStarted", "InProgress", "Completed". + :type evaluation_state: str or ~azure.mgmt.network.v2021_05_01.models.EvaluationState + :param avg_latency_in_ms: Average latency in ms. + :type avg_latency_in_ms: long + :param min_latency_in_ms: Minimum latency in ms. + :type min_latency_in_ms: long + :param max_latency_in_ms: Maximum latency in ms. + :type max_latency_in_ms: long + :param probes_sent: The number of sent probes. + :type probes_sent: long + :param probes_failed: The number of failed probes. + :type probes_failed: long + :ivar hops: List of hops between the source and the destination. + :vartype hops: list[~azure.mgmt.network.v2021_05_01.models.ConnectivityHop] + """ + + _validation = { + 'avg_latency_in_ms': {'maximum': 4294967295, 'minimum': 0}, + 'min_latency_in_ms': {'maximum': 4294967295, 'minimum': 0}, + 'max_latency_in_ms': {'maximum': 4294967295, 'minimum': 0}, + 'probes_sent': {'maximum': 4294967295, 'minimum': 0}, + 'probes_failed': {'maximum': 4294967295, 'minimum': 0}, + 'hops': {'readonly': True}, + } + + _attribute_map = { + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'evaluation_state': {'key': 'evaluationState', 'type': 'str'}, + 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'long'}, + 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'long'}, + 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'long'}, + 'probes_sent': {'key': 'probesSent', 'type': 'long'}, + 'probes_failed': {'key': 'probesFailed', 'type': 'long'}, + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectionStateSnapshot, self).__init__(**kwargs) + self.connection_state = kwargs.get('connection_state', None) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.evaluation_state = kwargs.get('evaluation_state', None) + self.avg_latency_in_ms = kwargs.get('avg_latency_in_ms', None) + self.min_latency_in_ms = kwargs.get('min_latency_in_ms', None) + self.max_latency_in_ms = kwargs.get('max_latency_in_ms', None) + self.probes_sent = kwargs.get('probes_sent', None) + self.probes_failed = kwargs.get('probes_failed', None) + self.hops = None + + +class ConnectivityDestination(msrest.serialization.Model): + """Parameters that define destination of connection. + + :param resource_id: The ID of the resource to which a connection attempt will be made. + :type resource_id: str + :param address: The IP address or URI the resource to which a connection attempt will be made. + :type address: str + :param port: Port on which check connectivity will be performed. + :type port: int + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityDestination, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.address = kwargs.get('address', None) + self.port = kwargs.get('port', None) + + +class ConnectivityHop(msrest.serialization.Model): + """Information about a hop between the source and the destination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of the hop. + :vartype type: str + :ivar id: The ID of the hop. + :vartype id: str + :ivar address: The IP address of the hop. + :vartype address: str + :ivar resource_id: The ID of the resource corresponding to this hop. + :vartype resource_id: str + :ivar next_hop_ids: List of next hop identifiers. + :vartype next_hop_ids: list[str] + :ivar previous_hop_ids: List of previous hop identifiers. + :vartype previous_hop_ids: list[str] + :ivar links: List of hop links. + :vartype links: list[~azure.mgmt.network.v2021_05_01.models.HopLink] + :ivar previous_links: List of previous hop links. + :vartype previous_links: list[~azure.mgmt.network.v2021_05_01.models.HopLink] + :ivar issues: List of issues. + :vartype issues: list[~azure.mgmt.network.v2021_05_01.models.ConnectivityIssue] + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'address': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'next_hop_ids': {'readonly': True}, + 'previous_hop_ids': {'readonly': True}, + 'links': {'readonly': True}, + 'previous_links': {'readonly': True}, + 'issues': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, + 'previous_hop_ids': {'key': 'previousHopIds', 'type': '[str]'}, + 'links': {'key': 'links', 'type': '[HopLink]'}, + 'previous_links': {'key': 'previousLinks', 'type': '[HopLink]'}, + 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityHop, self).__init__(**kwargs) + self.type = None + self.id = None + self.address = None + self.resource_id = None + self.next_hop_ids = None + self.previous_hop_ids = None + self.links = None + self.previous_links = None + self.issues = None + + +class ConnectivityInformation(msrest.serialization.Model): + """Information on the connectivity status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hops: List of hops between the source and the destination. + :vartype hops: list[~azure.mgmt.network.v2021_05_01.models.ConnectivityHop] + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connected", "Disconnected", "Degraded". + :vartype connection_status: str or ~azure.mgmt.network.v2021_05_01.models.ConnectionStatus + :ivar avg_latency_in_ms: Average latency in milliseconds. + :vartype avg_latency_in_ms: int + :ivar min_latency_in_ms: Minimum latency in milliseconds. + :vartype min_latency_in_ms: int + :ivar max_latency_in_ms: Maximum latency in milliseconds. + :vartype max_latency_in_ms: int + :ivar probes_sent: Total number of probes sent. + :vartype probes_sent: int + :ivar probes_failed: Number of failed probes. + :vartype probes_failed: int + """ + + _validation = { + 'hops': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'avg_latency_in_ms': {'readonly': True}, + 'min_latency_in_ms': {'readonly': True}, + 'max_latency_in_ms': {'readonly': True}, + 'probes_sent': {'readonly': True}, + 'probes_failed': {'readonly': True}, + } + + _attribute_map = { + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, + 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'int'}, + 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'int'}, + 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'int'}, + 'probes_sent': {'key': 'probesSent', 'type': 'int'}, + 'probes_failed': {'key': 'probesFailed', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityInformation, self).__init__(**kwargs) + self.hops = None + self.connection_status = None + self.avg_latency_in_ms = None + self.min_latency_in_ms = None + self.max_latency_in_ms = None + self.probes_sent = None + self.probes_failed = None + + +class ConnectivityIssue(msrest.serialization.Model): + """Information about an issue encountered in the process of checking for connectivity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". + :vartype origin: str or ~azure.mgmt.network.v2021_05_01.models.Origin + :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". + :vartype severity: str or ~azure.mgmt.network.v2021_05_01.models.Severity + :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", + "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", + "PortThrottled", "Platform". + :vartype type: str or ~azure.mgmt.network.v2021_05_01.models.IssueType + :ivar context: Provides additional context on the issue. + :vartype context: list[dict[str, str]] + """ + + _validation = { + 'origin': {'readonly': True}, + 'severity': {'readonly': True}, + 'type': {'readonly': True}, + 'context': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'context': {'key': 'context', 'type': '[{str}]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityIssue, self).__init__(**kwargs) + self.origin = None + self.severity = None + self.type = None + self.context = None + + +class ConnectivityParameters(msrest.serialization.Model): + """Parameters that determine how the connectivity check will be performed. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The source of the connection. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectivitySource + :param destination: Required. The destination of connection. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectivityDestination + :param protocol: Network protocol. Possible values include: "Tcp", "Http", "Https", "Icmp". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.Protocol + :param protocol_configuration: Configuration of the protocol. + :type protocol_configuration: ~azure.mgmt.network.v2021_05_01.models.ProtocolConfiguration + :param preferred_ip_version: Preferred IP version of the connection. Possible values include: + "IPv4", "IPv6". + :type preferred_ip_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + """ + + _validation = { + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectivitySource'}, + 'destination': {'key': 'destination', 'type': 'ConnectivityDestination'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'protocol_configuration': {'key': 'protocolConfiguration', 'type': 'ProtocolConfiguration'}, + 'preferred_ip_version': {'key': 'preferredIPVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityParameters, self).__init__(**kwargs) + self.source = kwargs['source'] + self.destination = kwargs['destination'] + self.protocol = kwargs.get('protocol', None) + self.protocol_configuration = kwargs.get('protocol_configuration', None) + self.preferred_ip_version = kwargs.get('preferred_ip_version', None) + + +class ConnectivitySource(msrest.serialization.Model): + """Parameters that define the source of the connection. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The ID of the resource from which a connectivity check will be + initiated. + :type resource_id: str + :param port: The source port from which a connectivity check will be performed. + :type port: int + """ + + _validation = { + 'resource_id': {'required': True}, + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivitySource, self).__init__(**kwargs) + self.resource_id = kwargs['resource_id'] + self.port = kwargs.get('port', None) + + +class Container(SubResource): + """Reference to container resource in remote resource provider. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Container, self).__init__(**kwargs) + + +class ContainerNetworkInterface(SubResource): + """Container network interface child resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource. This name can be used to access the resource. + :type name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar container_network_interface_configuration: Container network interface configuration from + which this container network interface is created. + :vartype container_network_interface_configuration: + ~azure.mgmt.network.v2021_05_01.models.ContainerNetworkInterfaceConfiguration + :param container: Reference to the container to which this container network interface is + attached. + :type container: ~azure.mgmt.network.v2021_05_01.models.Container + :ivar ip_configurations: Reference to the ip configuration on this container nic. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ContainerNetworkInterfaceIpConfiguration] + :ivar provisioning_state: The provisioning state of the container network interface resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'container_network_interface_configuration': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'container_network_interface_configuration': {'key': 'properties.containerNetworkInterfaceConfiguration', 'type': 'ContainerNetworkInterfaceConfiguration'}, + 'container': {'key': 'properties.container', 'type': 'Container'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[ContainerNetworkInterfaceIpConfiguration]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerNetworkInterface, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None + self.etag = None + self.container_network_interface_configuration = None + self.container = kwargs.get('container', None) + self.ip_configurations = None + self.provisioning_state = None + + +class ContainerNetworkInterfaceConfiguration(SubResource): + """Container network interface configuration child resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource. This name can be used to access the resource. + :type name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param ip_configurations: A list of ip configurations of the container network interface + configuration. + :type ip_configurations: list[~azure.mgmt.network.v2021_05_01.models.IPConfigurationProfile] + :param container_network_interfaces: A list of container network interfaces created from this + container network interface configuration. + :type container_network_interfaces: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the container network interface + configuration resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfigurationProfile]'}, + 'container_network_interfaces': {'key': 'properties.containerNetworkInterfaces', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerNetworkInterfaceConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None + self.etag = None + self.ip_configurations = kwargs.get('ip_configurations', None) + self.container_network_interfaces = kwargs.get('container_network_interfaces', None) + self.provisioning_state = None + + +class ContainerNetworkInterfaceIpConfiguration(msrest.serialization.Model): + """The ip configuration for a container network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: The name of the resource. This name can be used to access the resource. + :type name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the container network interface IP + configuration resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ContainerNetworkInterfaceIpConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None + self.etag = None + self.provisioning_state = None + + +class CustomDnsConfigPropertiesFormat(msrest.serialization.Model): + """Contains custom Dns resolution configuration from customer. + + :param fqdn: Fqdn that resolves to private endpoint ip address. + :type fqdn: str + :param ip_addresses: A list of private ip addresses of the private endpoint. + :type ip_addresses: list[str] + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomDnsConfigPropertiesFormat, self).__init__(**kwargs) + self.fqdn = kwargs.get('fqdn', None) + self.ip_addresses = kwargs.get('ip_addresses', None) + + +class CustomIpPrefix(Resource): + """Custom IP prefix resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the custom IP prefix. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :type zones: list[str] + :param cidr: The prefix range in CIDR notation. Should include the start address and the prefix + length. + :type cidr: str + :param signed_message: Signed message for WAN validation. + :type signed_message: str + :param authorization_message: Authorization message for WAN validation. + :type authorization_message: str + :param custom_ip_prefix_parent: The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. + :type custom_ip_prefix_parent: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar child_custom_ip_prefixes: The list of all Children for IPv6 /48 CustomIpPrefix. + :vartype child_custom_ip_prefixes: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param commissioned_state: The commissioned state of the Custom IP Prefix. Possible values + include: "Provisioning", "Provisioned", "Commissioning", "Commissioned", "Decommissioning", + "Deprovisioning". + :type commissioned_state: str or ~azure.mgmt.network.v2021_05_01.models.CommissionedState + :ivar public_ip_prefixes: The list of all referenced PublicIpPrefixes. + :vartype public_ip_prefixes: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar resource_guid: The resource GUID property of the custom IP prefix resource. + :vartype resource_guid: str + :ivar failed_reason: The reason why resource is in failed state. + :vartype failed_reason: str + :ivar provisioning_state: The provisioning state of the custom IP prefix resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'child_custom_ip_prefixes': {'readonly': True}, + 'public_ip_prefixes': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'failed_reason': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'cidr': {'key': 'properties.cidr', 'type': 'str'}, + 'signed_message': {'key': 'properties.signedMessage', 'type': 'str'}, + 'authorization_message': {'key': 'properties.authorizationMessage', 'type': 'str'}, + 'custom_ip_prefix_parent': {'key': 'properties.customIpPrefixParent', 'type': 'SubResource'}, + 'child_custom_ip_prefixes': {'key': 'properties.childCustomIpPrefixes', 'type': '[SubResource]'}, + 'commissioned_state': {'key': 'properties.commissionedState', 'type': 'str'}, + 'public_ip_prefixes': {'key': 'properties.publicIpPrefixes', 'type': '[SubResource]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'failed_reason': {'key': 'properties.failedReason', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomIpPrefix, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.etag = None + self.zones = kwargs.get('zones', None) + self.cidr = kwargs.get('cidr', None) + self.signed_message = kwargs.get('signed_message', None) + self.authorization_message = kwargs.get('authorization_message', None) + self.custom_ip_prefix_parent = kwargs.get('custom_ip_prefix_parent', None) + self.child_custom_ip_prefixes = None + self.commissioned_state = kwargs.get('commissioned_state', None) + self.public_ip_prefixes = None + self.resource_guid = None + self.failed_reason = None + self.provisioning_state = None + + +class CustomIpPrefixListResult(msrest.serialization.Model): + """Response for ListCustomIpPrefixes API service call. + + :param value: A list of Custom IP prefixes that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CustomIpPrefix]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CustomIpPrefixListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class DdosCustomPolicy(Resource): + """A DDoS custom policy in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar resource_guid: The resource GUID property of the DDoS custom policy resource. It uniquely + identifies the resource, even if the user changes its name or migrate the resource across + subscriptions or resource groups. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the DDoS custom policy resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar public_ip_addresses: The list of public IPs associated with the DDoS custom policy + resource. This list is read-only. + :vartype public_ip_addresses: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param protocol_custom_settings: The protocol-specific DDoS policy customization parameters. + :type protocol_custom_settings: + list[~azure.mgmt.network.v2021_05_01.models.ProtocolCustomSettingsFormat] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[SubResource]'}, + 'protocol_custom_settings': {'key': 'properties.protocolCustomSettings', 'type': '[ProtocolCustomSettingsFormat]'}, + } + + def __init__( + self, + **kwargs + ): + super(DdosCustomPolicy, self).__init__(**kwargs) + self.etag = None + self.resource_guid = None + self.provisioning_state = None + self.public_ip_addresses = None + self.protocol_custom_settings = kwargs.get('protocol_custom_settings', None) + + +class DdosProtectionPlan(msrest.serialization.Model): + """A DDoS protection plan in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar resource_guid: The resource GUID property of the DDoS protection plan resource. It + uniquely identifies the resource, even if the user changes its name or migrate the resource + across subscriptions or resource groups. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the DDoS protection plan resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar virtual_networks: The list of virtual networks associated with the DDoS protection plan + resource. This list is read-only. + :vartype virtual_networks: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'virtual_networks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[SubResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(DdosProtectionPlan, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.etag = None + self.resource_guid = None + self.provisioning_state = None + self.virtual_networks = None + + +class DdosProtectionPlanListResult(msrest.serialization.Model): + """A list of DDoS protection plans. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of DDoS protection plans. + :type value: list[~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DdosProtectionPlan]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DdosProtectionPlanListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class DdosSettings(msrest.serialization.Model): + """Contains the DDoS protection settings of the public IP. + + :param ddos_custom_policy: The DDoS custom policy associated with the public IP. + :type ddos_custom_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param protection_coverage: The DDoS protection policy customizability of the public IP. Only + standard coverage will have the ability to be customized. Possible values include: "Basic", + "Standard". + :type protection_coverage: str or + ~azure.mgmt.network.v2021_05_01.models.DdosSettingsProtectionCoverage + :param protected_ip: Enables DDoS protection on the public IP. + :type protected_ip: bool + """ + + _attribute_map = { + 'ddos_custom_policy': {'key': 'ddosCustomPolicy', 'type': 'SubResource'}, + 'protection_coverage': {'key': 'protectionCoverage', 'type': 'str'}, + 'protected_ip': {'key': 'protectedIP', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DdosSettings, self).__init__(**kwargs) + self.ddos_custom_policy = kwargs.get('ddos_custom_policy', None) + self.protection_coverage = kwargs.get('protection_coverage', None) + self.protected_ip = kwargs.get('protected_ip', None) + + +class Delegation(SubResource): + """Details the service to which the subnet is delegated. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a subnet. This name can be used to + access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: Resource type. + :type type: str + :param service_name: The name of the service to whom the subnet should be delegated (e.g. + Microsoft.Sql/servers). + :type service_name: str + :ivar actions: The actions permitted to the service upon delegation. + :vartype actions: list[str] + :ivar provisioning_state: The provisioning state of the service delegation resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'actions': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Delegation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = kwargs.get('type', None) + self.service_name = kwargs.get('service_name', None) + self.actions = None + self.provisioning_state = None + + +class DeviceProperties(msrest.serialization.Model): + """List of properties of the device. + + :param device_vendor: Name of the device Vendor. + :type device_vendor: str + :param device_model: Model of the device. + :type device_model: str + :param link_speed_in_mbps: Link speed. + :type link_speed_in_mbps: int + """ + + _attribute_map = { + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_model': {'key': 'deviceModel', 'type': 'str'}, + 'link_speed_in_mbps': {'key': 'linkSpeedInMbps', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(DeviceProperties, self).__init__(**kwargs) + self.device_vendor = kwargs.get('device_vendor', None) + self.device_model = kwargs.get('device_model', None) + self.link_speed_in_mbps = kwargs.get('link_speed_in_mbps', None) + + +class DhcpOptions(msrest.serialization.Model): + """DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. + + :param dns_servers: The list of DNS servers IP addresses. + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(DhcpOptions, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) + + +class Dimension(msrest.serialization.Model): + """Dimension of the metric. + + :param name: The name of the dimension. + :type name: str + :param display_name: The display name of the dimension. + :type display_name: str + :param internal_name: The internal name of the dimension. + :type internal_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Dimension, 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) + + +class DnsNameAvailabilityResult(msrest.serialization.Model): + """Response for the CheckDnsNameAvailability API service call. + + :param available: Domain availability (True/False). + :type available: bool + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DnsNameAvailabilityResult, self).__init__(**kwargs) + self.available = kwargs.get('available', None) + + +class DnsSettings(msrest.serialization.Model): + """DNS Proxy Settings in Firewall Policy. + + :param servers: List of Custom DNS Servers. + :type servers: list[str] + :param enable_proxy: Enable DNS Proxy on Firewalls attached to the Firewall Policy. + :type enable_proxy: bool + :param require_proxy_for_network_rules: FQDNs in Network Rules are supported when set to true. + :type require_proxy_for_network_rules: bool + """ + + _attribute_map = { + 'servers': {'key': 'servers', 'type': '[str]'}, + 'enable_proxy': {'key': 'enableProxy', 'type': 'bool'}, + 'require_proxy_for_network_rules': {'key': 'requireProxyForNetworkRules', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DnsSettings, self).__init__(**kwargs) + self.servers = kwargs.get('servers', None) + self.enable_proxy = kwargs.get('enable_proxy', None) + self.require_proxy_for_network_rules = kwargs.get('require_proxy_for_network_rules', None) + + +class DscpConfiguration(Resource): + """Differentiated Services Code Point configuration for any given network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param markings: List of markings to be used in the configuration. + :type markings: list[int] + :param source_ip_ranges: Source IP ranges. + :type source_ip_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosIpRange] + :param destination_ip_ranges: Destination IP ranges. + :type destination_ip_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosIpRange] + :param source_port_ranges: Sources port ranges. + :type source_port_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosPortRange] + :param destination_port_ranges: Destination port ranges. + :type destination_port_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosPortRange] + :param protocol: RNM supported protocol types. Possible values include: "DoNotUse", "Icmp", + "Tcp", "Udp", "Gre", "Esp", "Ah", "Vxlan", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ProtocolType + :param qos_definition_collection: QoS object definitions. + :type qos_definition_collection: list[~azure.mgmt.network.v2021_05_01.models.QosDefinition] + :ivar qos_collection_id: Qos Collection ID generated by RNM. + :vartype qos_collection_id: str + :ivar associated_network_interfaces: Associated Network Interfaces to the DSCP Configuration. + :vartype associated_network_interfaces: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar resource_guid: The resource GUID property of the DSCP Configuration resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the DSCP Configuration resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'qos_collection_id': {'readonly': True}, + 'associated_network_interfaces': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'markings': {'key': 'properties.markings', 'type': '[int]'}, + 'source_ip_ranges': {'key': 'properties.sourceIpRanges', 'type': '[QosIpRange]'}, + 'destination_ip_ranges': {'key': 'properties.destinationIpRanges', 'type': '[QosIpRange]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[QosPortRange]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[QosPortRange]'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'qos_definition_collection': {'key': 'properties.qosDefinitionCollection', 'type': '[QosDefinition]'}, + 'qos_collection_id': {'key': 'properties.qosCollectionId', 'type': 'str'}, + 'associated_network_interfaces': {'key': 'properties.associatedNetworkInterfaces', 'type': '[NetworkInterface]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DscpConfiguration, self).__init__(**kwargs) + self.etag = None + self.markings = kwargs.get('markings', None) + self.source_ip_ranges = kwargs.get('source_ip_ranges', None) + self.destination_ip_ranges = kwargs.get('destination_ip_ranges', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.protocol = kwargs.get('protocol', None) + self.qos_definition_collection = kwargs.get('qos_definition_collection', None) + self.qos_collection_id = None + self.associated_network_interfaces = None + self.resource_guid = None + self.provisioning_state = None + + +class DscpConfigurationListResult(msrest.serialization.Model): + """Response for the DscpConfigurationList API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of dscp configurations in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.DscpConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DscpConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(DscpConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class EffectiveNetworkSecurityGroup(msrest.serialization.Model): + """Effective network security group. + + :param network_security_group: The ID of network security group that is applied. + :type network_security_group: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param association: Associated resources. + :type association: + ~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityGroupAssociation + :param effective_security_rules: A collection of effective security rules. + :type effective_security_rules: + list[~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityRule] + :param tag_map: Mapping of tags to list of IP Addresses included within the tag. + :type tag_map: str + """ + + _attribute_map = { + 'network_security_group': {'key': 'networkSecurityGroup', 'type': 'SubResource'}, + 'association': {'key': 'association', 'type': 'EffectiveNetworkSecurityGroupAssociation'}, + 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, + 'tag_map': {'key': 'tagMap', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveNetworkSecurityGroup, self).__init__(**kwargs) + self.network_security_group = kwargs.get('network_security_group', None) + self.association = kwargs.get('association', None) + self.effective_security_rules = kwargs.get('effective_security_rules', None) + self.tag_map = kwargs.get('tag_map', None) + + +class EffectiveNetworkSecurityGroupAssociation(msrest.serialization.Model): + """The effective network security group association. + + :param network_manager: The ID of the Azure network manager if assigned. + :type network_manager: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param subnet: The ID of the subnet if assigned. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param network_interface: The ID of the network interface if assigned. + :type network_interface: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'network_manager': {'key': 'networkManager', 'type': 'SubResource'}, + 'subnet': {'key': 'subnet', 'type': 'SubResource'}, + 'network_interface': {'key': 'networkInterface', 'type': 'SubResource'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveNetworkSecurityGroupAssociation, self).__init__(**kwargs) + self.network_manager = kwargs.get('network_manager', None) + self.subnet = kwargs.get('subnet', None) + self.network_interface = kwargs.get('network_interface', None) + + +class EffectiveNetworkSecurityGroupListResult(msrest.serialization.Model): + """Response for list effective network security groups API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of effective network security groups. + :type value: list[~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveNetworkSecurityGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class EffectiveNetworkSecurityRule(msrest.serialization.Model): + """Effective network security rules. + + :param name: The name of the security rule specified by the user (if created by the user). + :type name: str + :param protocol: The network protocol this rule applies to. Possible values include: "Tcp", + "Udp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.EffectiveSecurityRuleProtocol + :param source_port_range: The source port or range. + :type source_port_range: str + :param destination_port_range: The destination port or range. + :type destination_port_range: str + :param source_port_ranges: The source port ranges. Expected values include a single integer + between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. Expected values include a single + integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + :type destination_port_ranges: list[str] + :param source_address_prefix: The source address prefix. + :type source_address_prefix: str + :param destination_address_prefix: The destination address prefix. + :type destination_address_prefix: str + :param source_address_prefixes: The source address prefixes. Expected values include CIDR IP + ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the + asterisk (*). + :type source_address_prefixes: list[str] + :param destination_address_prefixes: The destination address prefixes. Expected values include + CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and + the asterisk (*). + :type destination_address_prefixes: list[str] + :param expanded_source_address_prefix: The expanded source address prefix. + :type expanded_source_address_prefix: list[str] + :param expanded_destination_address_prefix: Expanded destination address prefix. + :type expanded_destination_address_prefix: list[str] + :param access: Whether network traffic is allowed or denied. Possible values include: "Allow", + "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleAccess + :param priority: The priority of the rule. + :type priority: int + :param direction: The direction of the rule. Possible values include: "Inbound", "Outbound". + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleDirection + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, + 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[str]'}, + 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, + 'source_address_prefixes': {'key': 'sourceAddressPrefixes', 'type': '[str]'}, + 'destination_address_prefixes': {'key': 'destinationAddressPrefixes', 'type': '[str]'}, + 'expanded_source_address_prefix': {'key': 'expandedSourceAddressPrefix', 'type': '[str]'}, + 'expanded_destination_address_prefix': {'key': 'expandedDestinationAddressPrefix', 'type': '[str]'}, + 'access': {'key': 'access', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveNetworkSecurityRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.protocol = kwargs.get('protocol', None) + self.source_port_range = kwargs.get('source_port_range', None) + self.destination_port_range = kwargs.get('destination_port_range', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.source_address_prefix = kwargs.get('source_address_prefix', None) + self.destination_address_prefix = kwargs.get('destination_address_prefix', None) + self.source_address_prefixes = kwargs.get('source_address_prefixes', None) + self.destination_address_prefixes = kwargs.get('destination_address_prefixes', None) + self.expanded_source_address_prefix = kwargs.get('expanded_source_address_prefix', None) + self.expanded_destination_address_prefix = kwargs.get('expanded_destination_address_prefix', None) + self.access = kwargs.get('access', None) + self.priority = kwargs.get('priority', None) + self.direction = kwargs.get('direction', None) + + +class EffectiveRoute(msrest.serialization.Model): + """Effective Route. + + :param name: The name of the user defined route. This is optional. + :type name: str + :param disable_bgp_route_propagation: If true, on-premises routes are not propagated to the + network interfaces in the subnet. + :type disable_bgp_route_propagation: bool + :param source: Who created the route. Possible values include: "Unknown", "User", + "VirtualNetworkGateway", "Default". + :type source: str or ~azure.mgmt.network.v2021_05_01.models.EffectiveRouteSource + :param state: The value of effective route. Possible values include: "Active", "Invalid". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.EffectiveRouteState + :param address_prefix: The address prefixes of the effective routes in CIDR notation. + :type address_prefix: list[str] + :param next_hop_ip_address: The IP address of the next hop of the effective route. + :type next_hop_ip_address: list[str] + :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values + include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". + :type next_hop_type: str or ~azure.mgmt.network.v2021_05_01.models.RouteNextHopType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disable_bgp_route_propagation': {'key': 'disableBgpRoutePropagation', 'type': 'bool'}, + 'source': {'key': 'source', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'address_prefix': {'key': 'addressPrefix', 'type': '[str]'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveRoute, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.disable_bgp_route_propagation = kwargs.get('disable_bgp_route_propagation', None) + self.source = kwargs.get('source', None) + self.state = kwargs.get('state', None) + self.address_prefix = kwargs.get('address_prefix', None) + self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) + self.next_hop_type = kwargs.get('next_hop_type', None) + + +class EffectiveRouteListResult(msrest.serialization.Model): + """Response for list effective route API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of effective routes. + :type value: list[~azure.mgmt.network.v2021_05_01.models.EffectiveRoute] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveRoute]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveRouteListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class EffectiveRoutesParameters(msrest.serialization.Model): + """The parameters specifying the resource whose effective routes are being requested. + + :param resource_id: The resource whose effective routes are being requested. + :type resource_id: str + :param virtual_wan_resource_type: The type of the specified resource like RouteTable, + ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. + :type virtual_wan_resource_type: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'virtual_wan_resource_type': {'key': 'virtualWanResourceType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EffectiveRoutesParameters, self).__init__(**kwargs) + self.resource_id = kwargs.get('resource_id', None) + self.virtual_wan_resource_type = kwargs.get('virtual_wan_resource_type', None) + + +class EndpointServiceResult(SubResource): + """Endpoint service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Name of the endpoint service. + :vartype name: str + :ivar type: Type of the endpoint service. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointServiceResult, self).__init__(**kwargs) + self.name = None + self.type = None + + +class EndpointServicesListResult(msrest.serialization.Model): + """Response for the ListAvailableEndpointServices API service call. + + :param value: List of available endpoint services in a region. + :type value: list[~azure.mgmt.network.v2021_05_01.models.EndpointServiceResult] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EndpointServiceResult]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointServicesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class Error(msrest.serialization.Model): + """Common error representation. + + :param code: Error code. + :type code: str + :param message: Error message. + :type message: str + :param target: Error target. + :type target: str + :param details: Error details. + :type details: list[~azure.mgmt.network.v2021_05_01.models.ErrorDetails] + :param inner_error: Inner error message. + :type inner_error: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetails]'}, + 'inner_error': {'key': 'innerError', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + self.target = kwargs.get('target', None) + self.details = kwargs.get('details', None) + self.inner_error = kwargs.get('inner_error', None) + + +class ErrorDetails(msrest.serialization.Model): + """Common error details representation. + + :param code: Error code. + :type code: str + :param target: Error target. + :type target: str + :param message: Error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetails, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.target = kwargs.get('target', None) + self.message = kwargs.get('message', None) + + +class ErrorResponse(msrest.serialization.Model): + """The error object. + + :param error: The error details object. + :type error: ~azure.mgmt.network.v2021_05_01.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class EvaluatedNetworkSecurityGroup(msrest.serialization.Model): + """Results of network security group evaluation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param network_security_group_id: Network security group ID. + :type network_security_group_id: str + :param applied_to: Resource ID of nic or subnet to which network security group is applied. + :type applied_to: str + :param matched_rule: Matched network security rule. + :type matched_rule: ~azure.mgmt.network.v2021_05_01.models.MatchedRule + :ivar rules_evaluation_result: List of network security rules evaluation results. + :vartype rules_evaluation_result: + list[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityRulesEvaluationResult] + """ + + _validation = { + 'rules_evaluation_result': {'readonly': True}, + } + + _attribute_map = { + 'network_security_group_id': {'key': 'networkSecurityGroupId', 'type': 'str'}, + 'applied_to': {'key': 'appliedTo', 'type': 'str'}, + 'matched_rule': {'key': 'matchedRule', 'type': 'MatchedRule'}, + 'rules_evaluation_result': {'key': 'rulesEvaluationResult', 'type': '[NetworkSecurityRulesEvaluationResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(EvaluatedNetworkSecurityGroup, self).__init__(**kwargs) + self.network_security_group_id = kwargs.get('network_security_group_id', None) + self.applied_to = kwargs.get('applied_to', None) + self.matched_rule = kwargs.get('matched_rule', None) + self.rules_evaluation_result = None + + +class ExclusionManagedRule(msrest.serialization.Model): + """Defines a managed rule to use for exclusion. + + All required parameters must be populated in order to send to Azure. + + :param rule_id: Required. Identifier for the managed rule. + :type rule_id: str + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExclusionManagedRule, self).__init__(**kwargs) + self.rule_id = kwargs['rule_id'] + + +class ExclusionManagedRuleGroup(msrest.serialization.Model): + """Defines a managed rule group to use for exclusion. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. The managed rule group for exclusion. + :type rule_group_name: str + :param rules: List of rules that will be excluded. If none specified, all rules in the group + will be excluded. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.ExclusionManagedRule] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ExclusionManagedRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExclusionManagedRuleGroup, self).__init__(**kwargs) + self.rule_group_name = kwargs['rule_group_name'] + self.rules = kwargs.get('rules', None) + + +class ExclusionManagedRuleSet(msrest.serialization.Model): + """Defines a managed rule set for Exclusions. + + All required parameters must be populated in order to send to Azure. + + :param rule_set_type: Required. Defines the rule set type to use. + :type rule_set_type: str + :param rule_set_version: Required. Defines the version of the rule set to use. + :type rule_set_version: str + :param rule_groups: Defines the rule groups to apply to the rule set. + :type rule_groups: list[~azure.mgmt.network.v2021_05_01.models.ExclusionManagedRuleGroup] + """ + + _validation = { + 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, + } + + _attribute_map = { + 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ExclusionManagedRuleGroup]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExclusionManagedRuleSet, self).__init__(**kwargs) + self.rule_set_type = kwargs['rule_set_type'] + self.rule_set_version = kwargs['rule_set_version'] + self.rule_groups = kwargs.get('rule_groups', None) + + +class ExplicitProxySettings(msrest.serialization.Model): + """Explicit Proxy Settings in Firewall Policy. + + :param enable_explicit_proxy: When set to true, explicit proxy mode is enabled. + :type enable_explicit_proxy: bool + :param http_port: Port number for explicit proxy http protocol, cannot be greater than 64000. + :type http_port: int + :param https_port: Port number for explicit proxy https protocol, cannot be greater than 64000. + :type https_port: int + :param pac_file_port: Port number for firewall to serve PAC file. + :type pac_file_port: int + :param pac_file: SAS URL for PAC file. + :type pac_file: str + """ + + _validation = { + 'http_port': {'maximum': 64000, 'minimum': 0}, + 'https_port': {'maximum': 64000, 'minimum': 0}, + 'pac_file_port': {'maximum': 64000, 'minimum': 0}, + } + + _attribute_map = { + 'enable_explicit_proxy': {'key': 'enableExplicitProxy', 'type': 'bool'}, + 'http_port': {'key': 'httpPort', 'type': 'int'}, + 'https_port': {'key': 'httpsPort', 'type': 'int'}, + 'pac_file_port': {'key': 'pacFilePort', 'type': 'int'}, + 'pac_file': {'key': 'pacFile', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExplicitProxySettings, self).__init__(**kwargs) + self.enable_explicit_proxy = kwargs.get('enable_explicit_proxy', None) + self.http_port = kwargs.get('http_port', None) + self.https_port = kwargs.get('https_port', None) + self.pac_file_port = kwargs.get('pac_file_port', None) + self.pac_file = kwargs.get('pac_file', None) + + +class ExpressRouteCircuit(Resource): + """ExpressRouteCircuit resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param allow_classic_operations: Allow classic operations. + :type allow_classic_operations: bool + :param circuit_provisioning_state: The CircuitProvisioningState state of the resource. + :type circuit_provisioning_state: str + :param service_provider_provisioning_state: The ServiceProviderProvisioningState state of the + resource. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", + "Deprovisioning". + :type service_provider_provisioning_state: str or + ~azure.mgmt.network.v2021_05_01.models.ServiceProviderProvisioningState + :param authorizations: The list of authorizations. + :type authorizations: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization] + :param peerings: The list of peerings. + :type peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :param service_key: The ServiceKey. + :type service_key: str + :param service_provider_notes: The ServiceProviderNotes. + :type service_provider_notes: str + :param service_provider_properties: The ServiceProviderProperties. + :type service_provider_properties: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitServiceProviderProperties + :param express_route_port: The reference to the ExpressRoutePort resource when the circuit is + provisioned on an ExpressRoutePort resource. + :type express_route_port: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param bandwidth_in_gbps: The bandwidth of the circuit when the circuit is provisioned on an + ExpressRoutePort resource. + :type bandwidth_in_gbps: float + :ivar stag: The identifier of the circuit traffic. Outer tag for QinQ encapsulation. + :vartype stag: int + :ivar provisioning_state: The provisioning state of the express route circuit resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param gateway_manager_etag: The GatewayManager Etag. + :type gateway_manager_etag: str + :param global_reach_enabled: Flag denoting global reach status. + :type global_reach_enabled: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'stag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ExpressRouteCircuitSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'allow_classic_operations': {'key': 'properties.allowClassicOperations', 'type': 'bool'}, + 'circuit_provisioning_state': {'key': 'properties.circuitProvisioningState', 'type': 'str'}, + 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, + 'authorizations': {'key': 'properties.authorizations', 'type': '[ExpressRouteCircuitAuthorization]'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, + 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, + 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, + 'express_route_port': {'key': 'properties.expressRoutePort', 'type': 'SubResource'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'float'}, + 'stag': {'key': 'properties.stag', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, + 'global_reach_enabled': {'key': 'properties.globalReachEnabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuit, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.etag = None + self.allow_classic_operations = kwargs.get('allow_classic_operations', None) + self.circuit_provisioning_state = kwargs.get('circuit_provisioning_state', None) + self.service_provider_provisioning_state = kwargs.get('service_provider_provisioning_state', None) + self.authorizations = kwargs.get('authorizations', None) + self.peerings = kwargs.get('peerings', None) + self.service_key = kwargs.get('service_key', None) + self.service_provider_notes = kwargs.get('service_provider_notes', None) + self.service_provider_properties = kwargs.get('service_provider_properties', None) + self.express_route_port = kwargs.get('express_route_port', None) + self.bandwidth_in_gbps = kwargs.get('bandwidth_in_gbps', None) + self.stag = None + self.provisioning_state = None + self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) + self.global_reach_enabled = kwargs.get('global_reach_enabled', None) + + +class ExpressRouteCircuitArpTable(msrest.serialization.Model): + """The ARP table associated with the ExpressRouteCircuit. + + :param age: Entry age in minutes. + :type age: int + :param interface: Interface address. + :type interface: str + :param ip_address: The IP address. + :type ip_address: str + :param mac_address: The MAC address. + :type mac_address: str + """ + + _attribute_map = { + 'age': {'key': 'age', 'type': 'int'}, + 'interface': {'key': 'interface', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitArpTable, self).__init__(**kwargs) + self.age = kwargs.get('age', None) + self.interface = kwargs.get('interface', None) + self.ip_address = kwargs.get('ip_address', None) + self.mac_address = kwargs.get('mac_address', None) + + +class ExpressRouteCircuitAuthorization(SubResource): + """Authorization in an ExpressRouteCircuit resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param authorization_key: The authorization key. + :type authorization_key: str + :param authorization_use_status: The authorization use status. Possible values include: + "Available", "InUse". + :type authorization_use_status: str or + ~azure.mgmt.network.v2021_05_01.models.AuthorizationUseStatus + :ivar provisioning_state: The provisioning state of the authorization resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitAuthorization, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.authorization_key = kwargs.get('authorization_key', None) + self.authorization_use_status = kwargs.get('authorization_use_status', None) + self.provisioning_state = None + + +class ExpressRouteCircuitConnection(SubResource): + """Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the circuit initiating connection. + :type express_route_circuit_peering: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param peer_express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the peered circuit. + :type peer_express_route_circuit_peering: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param address_prefix: /29 IP address space to carve out Customer addresses for tunnels. + :type address_prefix: str + :param authorization_key: The authorization key. + :type authorization_key: str + :param ipv6_circuit_connection_config: IPv6 Address PrefixProperties of the express route + circuit connection. + :type ipv6_circuit_connection_config: + ~azure.mgmt.network.v2021_05_01.models.Ipv6CircuitConnectionConfig + :ivar circuit_connection_status: Express Route Circuit connection state. Possible values + include: "Connected", "Connecting", "Disconnected". + :vartype circuit_connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.CircuitConnectionStatus + :ivar provisioning_state: The provisioning state of the express route circuit connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'circuit_connection_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'express_route_circuit_peering': {'key': 'properties.expressRouteCircuitPeering', 'type': 'SubResource'}, + 'peer_express_route_circuit_peering': {'key': 'properties.peerExpressRouteCircuitPeering', 'type': 'SubResource'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'ipv6_circuit_connection_config': {'key': 'properties.ipv6CircuitConnectionConfig', 'type': 'Ipv6CircuitConnectionConfig'}, + 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitConnection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.express_route_circuit_peering = kwargs.get('express_route_circuit_peering', None) + self.peer_express_route_circuit_peering = kwargs.get('peer_express_route_circuit_peering', None) + self.address_prefix = kwargs.get('address_prefix', None) + self.authorization_key = kwargs.get('authorization_key', None) + self.ipv6_circuit_connection_config = kwargs.get('ipv6_circuit_connection_config', None) + self.circuit_connection_status = None + self.provisioning_state = None + + +class ExpressRouteCircuitConnectionListResult(msrest.serialization.Model): + """Response for ListConnections API service call retrieves all global reach connections that belongs to a Private Peering for an ExpressRouteCircuit. + + :param value: The global reach connection associated with Private Peering in an ExpressRoute + Circuit. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExpressRouteCircuitListResult(msrest.serialization.Model): + """Response for ListExpressRouteCircuit API service call. + + :param value: A list of ExpressRouteCircuits in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuit]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExpressRouteCircuitPeering(SubResource): + """Peering in an ExpressRouteCircuit resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param peering_type: The peering type. Possible values include: "AzurePublicPeering", + "AzurePrivatePeering", "MicrosoftPeering". + :type peering_type: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePeeringType + :param state: The peering state. Possible values include: "Disabled", "Enabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePeeringState + :param azure_asn: The Azure ASN. + :type azure_asn: int + :param peer_asn: The peer ASN. + :type peer_asn: long + :param primary_peer_address_prefix: The primary address prefix. + :type primary_peer_address_prefix: str + :param secondary_peer_address_prefix: The secondary address prefix. + :type secondary_peer_address_prefix: str + :param primary_azure_port: The primary port. + :type primary_azure_port: str + :param secondary_azure_port: The secondary port. + :type secondary_azure_port: str + :param shared_key: The shared key. + :type shared_key: str + :param vlan_id: The VLAN ID. + :type vlan_id: int + :param microsoft_peering_config: The Microsoft peering configuration. + :type microsoft_peering_config: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringConfig + :param stats: The peering stats of express route circuit. + :type stats: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitStats + :ivar provisioning_state: The provisioning state of the express route circuit peering resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param gateway_manager_etag: The GatewayManager Etag. + :type gateway_manager_etag: str + :ivar last_modified_by: Who was the last to modify the peering. + :vartype last_modified_by: str + :param route_filter: The reference to the RouteFilter resource. + :type route_filter: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param ipv6_peering_config: The IPv6 peering configuration. + :type ipv6_peering_config: + ~azure.mgmt.network.v2021_05_01.models.Ipv6ExpressRouteCircuitPeeringConfig + :param express_route_connection: The ExpressRoute connection. + :type express_route_connection: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnectionId + :param connections: The list of circuit connections associated with Azure Private Peering for + this circuit. + :type connections: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection] + :ivar peered_connections: The list of peered circuit connections associated with Azure Private + Peering for this circuit. + :vartype peered_connections: + list[~azure.mgmt.network.v2021_05_01.models.PeerExpressRouteCircuitConnection] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'peered_connections': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, + 'peer_asn': {'key': 'properties.peerASN', 'type': 'long'}, + 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, + 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, + 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, + 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, + 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, + 'stats': {'key': 'properties.stats', 'type': 'ExpressRouteCircuitStats'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'route_filter': {'key': 'properties.routeFilter', 'type': 'SubResource'}, + 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, + 'express_route_connection': {'key': 'properties.expressRouteConnection', 'type': 'ExpressRouteConnectionId'}, + 'connections': {'key': 'properties.connections', 'type': '[ExpressRouteCircuitConnection]'}, + 'peered_connections': {'key': 'properties.peeredConnections', 'type': '[PeerExpressRouteCircuitConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitPeering, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.peering_type = kwargs.get('peering_type', None) + self.state = kwargs.get('state', None) + self.azure_asn = kwargs.get('azure_asn', None) + self.peer_asn = kwargs.get('peer_asn', None) + self.primary_peer_address_prefix = kwargs.get('primary_peer_address_prefix', None) + self.secondary_peer_address_prefix = kwargs.get('secondary_peer_address_prefix', None) + self.primary_azure_port = kwargs.get('primary_azure_port', None) + self.secondary_azure_port = kwargs.get('secondary_azure_port', None) + self.shared_key = kwargs.get('shared_key', None) + self.vlan_id = kwargs.get('vlan_id', None) + self.microsoft_peering_config = kwargs.get('microsoft_peering_config', None) + self.stats = kwargs.get('stats', None) + self.provisioning_state = None + self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) + self.last_modified_by = None + self.route_filter = kwargs.get('route_filter', None) + self.ipv6_peering_config = kwargs.get('ipv6_peering_config', None) + self.express_route_connection = kwargs.get('express_route_connection', None) + self.connections = kwargs.get('connections', None) + self.peered_connections = None + + +class ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): + """Specifies the peering configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param advertised_public_prefixes: The reference to AdvertisedPublicPrefixes. + :type advertised_public_prefixes: list[str] + :param advertised_communities: The communities of bgp peering. Specified for microsoft peering. + :type advertised_communities: list[str] + :ivar advertised_public_prefixes_state: The advertised public prefix state of the Peering + resource. Possible values include: "NotConfigured", "Configuring", "Configured", + "ValidationNeeded". + :vartype advertised_public_prefixes_state: str or + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState + :param legacy_mode: The legacy mode of the peering. + :type legacy_mode: int + :param customer_asn: The CustomerASN of the peering. + :type customer_asn: int + :param routing_registry_name: The RoutingRegistryName of the configuration. + :type routing_registry_name: str + """ + + _validation = { + 'advertised_public_prefixes_state': {'readonly': True}, + } + + _attribute_map = { + 'advertised_public_prefixes': {'key': 'advertisedPublicPrefixes', 'type': '[str]'}, + 'advertised_communities': {'key': 'advertisedCommunities', 'type': '[str]'}, + 'advertised_public_prefixes_state': {'key': 'advertisedPublicPrefixesState', 'type': 'str'}, + 'legacy_mode': {'key': 'legacyMode', 'type': 'int'}, + 'customer_asn': {'key': 'customerASN', 'type': 'int'}, + 'routing_registry_name': {'key': 'routingRegistryName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) + self.advertised_public_prefixes = kwargs.get('advertised_public_prefixes', None) + self.advertised_communities = kwargs.get('advertised_communities', None) + self.advertised_public_prefixes_state = None + self.legacy_mode = kwargs.get('legacy_mode', None) + self.customer_asn = kwargs.get('customer_asn', None) + self.routing_registry_name = kwargs.get('routing_registry_name', None) + + +class ExpressRouteCircuitPeeringId(msrest.serialization.Model): + """ExpressRoute circuit peering identifier. + + :param id: The ID of the ExpressRoute circuit peering. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitPeeringId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): + """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. + + :param value: The peerings in an express route circuit. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitPeeringListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExpressRouteCircuitReference(msrest.serialization.Model): + """Reference to an express route circuit. + + :param id: Corresponding Express Route Circuit Id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitReference, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ExpressRouteCircuitRoutesTable(msrest.serialization.Model): + """The routes table associated with the ExpressRouteCircuit. + + :param network: IP address of a network entity. + :type network: str + :param next_hop: NextHop address. + :type next_hop: str + :param loc_prf: Local preference value as set with the set local-preference route-map + configuration command. + :type loc_prf: str + :param weight: Route Weight. + :type weight: int + :param path: Autonomous system paths to the destination network. + :type path: str + """ + + _attribute_map = { + 'network': {'key': 'network', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + 'loc_prf': {'key': 'locPrf', 'type': 'str'}, + 'weight': {'key': 'weight', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitRoutesTable, self).__init__(**kwargs) + self.network = kwargs.get('network', None) + self.next_hop = kwargs.get('next_hop', None) + self.loc_prf = kwargs.get('loc_prf', None) + self.weight = kwargs.get('weight', None) + self.path = kwargs.get('path', None) + + +class ExpressRouteCircuitRoutesTableSummary(msrest.serialization.Model): + """The routes table associated with the ExpressRouteCircuit. + + :param neighbor: IP address of the neighbor. + :type neighbor: str + :param v: BGP version number spoken to the neighbor. + :type v: int + :param as_property: Autonomous system number. + :type as_property: int + :param up_down: The length of time that the BGP session has been in the Established state, or + the current status if not in the Established state. + :type up_down: str + :param state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have + been received from a neighbor or peer group. + :type state_pfx_rcd: str + """ + + _attribute_map = { + 'neighbor': {'key': 'neighbor', 'type': 'str'}, + 'v': {'key': 'v', 'type': 'int'}, + 'as_property': {'key': 'as', 'type': 'int'}, + 'up_down': {'key': 'upDown', 'type': 'str'}, + 'state_pfx_rcd': {'key': 'statePfxRcd', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitRoutesTableSummary, self).__init__(**kwargs) + self.neighbor = kwargs.get('neighbor', None) + self.v = kwargs.get('v', None) + self.as_property = kwargs.get('as_property', None) + self.up_down = kwargs.get('up_down', None) + self.state_pfx_rcd = kwargs.get('state_pfx_rcd', None) + + +class ExpressRouteCircuitsArpTableListResult(msrest.serialization.Model): + """Response for ListArpTable associated with the Express Route Circuits API. + + :param value: A list of the ARP tables. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitArpTable] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitArpTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitsArpTableListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExpressRouteCircuitServiceProviderProperties(msrest.serialization.Model): + """Contains ServiceProviderProperties in an ExpressRouteCircuit. + + :param service_provider_name: The serviceProviderName. + :type service_provider_name: str + :param peering_location: The peering location. + :type peering_location: str + :param bandwidth_in_mbps: The BandwidthInMbps. + :type bandwidth_in_mbps: int + """ + + _attribute_map = { + 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, + 'peering_location': {'key': 'peeringLocation', 'type': 'str'}, + 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitServiceProviderProperties, self).__init__(**kwargs) + self.service_provider_name = kwargs.get('service_provider_name', None) + self.peering_location = kwargs.get('peering_location', None) + self.bandwidth_in_mbps = kwargs.get('bandwidth_in_mbps', None) + + +class ExpressRouteCircuitSku(msrest.serialization.Model): + """Contains SKU in an ExpressRouteCircuit. + + :param name: The name of the SKU. + :type name: str + :param tier: The tier of the SKU. Possible values include: "Standard", "Premium", "Basic", + "Local". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitSkuTier + :param family: The family of the SKU. Possible values include: "UnlimitedData", "MeteredData". + :type family: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitSkuFamily + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.family = kwargs.get('family', None) + + +class ExpressRouteCircuitsRoutesTableListResult(msrest.serialization.Model): + """Response for ListRoutesTable associated with the Express Route Circuits API. + + :param value: The list of routes table. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitRoutesTable] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitsRoutesTableListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExpressRouteCircuitsRoutesTableSummaryListResult(msrest.serialization.Model): + """Response for ListRoutesTable associated with the Express Route Circuits API. + + :param value: A list of the routes table. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitRoutesTableSummary] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitsRoutesTableSummaryListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExpressRouteCircuitStats(msrest.serialization.Model): + """Contains stats associated with the peering. + + :param primarybytes_in: The Primary BytesIn of the peering. + :type primarybytes_in: long + :param primarybytes_out: The primary BytesOut of the peering. + :type primarybytes_out: long + :param secondarybytes_in: The secondary BytesIn of the peering. + :type secondarybytes_in: long + :param secondarybytes_out: The secondary BytesOut of the peering. + :type secondarybytes_out: long + """ + + _attribute_map = { + 'primarybytes_in': {'key': 'primarybytesIn', 'type': 'long'}, + 'primarybytes_out': {'key': 'primarybytesOut', 'type': 'long'}, + 'secondarybytes_in': {'key': 'secondarybytesIn', 'type': 'long'}, + 'secondarybytes_out': {'key': 'secondarybytesOut', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCircuitStats, self).__init__(**kwargs) + self.primarybytes_in = kwargs.get('primarybytes_in', None) + self.primarybytes_out = kwargs.get('primarybytes_out', None) + self.secondarybytes_in = kwargs.get('secondarybytes_in', None) + self.secondarybytes_out = kwargs.get('secondarybytes_out', None) + + +class ExpressRouteConnection(SubResource): + """ExpressRouteConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param name: Required. The name of the resource. + :type name: str + :ivar provisioning_state: The provisioning state of the express route connection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param express_route_circuit_peering: The ExpressRoute circuit peering. + :type express_route_circuit_peering: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringId + :param authorization_key: Authorization key to establish the connection. + :type authorization_key: str + :param routing_weight: The routing weight associated to the connection. + :type routing_weight: int + :param enable_internet_security: Enable internet security. + :type enable_internet_security: bool + :param express_route_gateway_bypass: Enable FastPath to vWan Firewall hub. + :type express_route_gateway_bypass: bool + :param routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :type routing_configuration: ~azure.mgmt.network.v2021_05_01.models.RoutingConfiguration + """ + + _validation = { + 'name': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_circuit_peering': {'key': 'properties.expressRouteCircuitPeering', 'type': 'ExpressRouteCircuitPeeringId'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteConnection, self).__init__(**kwargs) + self.name = kwargs['name'] + self.provisioning_state = None + self.express_route_circuit_peering = kwargs.get('express_route_circuit_peering', None) + self.authorization_key = kwargs.get('authorization_key', None) + self.routing_weight = kwargs.get('routing_weight', None) + self.enable_internet_security = kwargs.get('enable_internet_security', None) + self.express_route_gateway_bypass = kwargs.get('express_route_gateway_bypass', None) + self.routing_configuration = kwargs.get('routing_configuration', None) + + +class ExpressRouteConnectionId(msrest.serialization.Model): + """The ID of the ExpressRouteConnection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the ExpressRouteConnection. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteConnectionId, self).__init__(**kwargs) + self.id = None + + +class ExpressRouteConnectionList(msrest.serialization.Model): + """ExpressRouteConnection list. + + :param value: The list of ExpressRoute connections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteConnectionList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ExpressRouteCrossConnection(Resource): + """ExpressRouteCrossConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar primary_azure_port: The name of the primary port. + :vartype primary_azure_port: str + :ivar secondary_azure_port: The name of the secondary port. + :vartype secondary_azure_port: str + :ivar s_tag: The identifier of the circuit traffic. + :vartype s_tag: int + :ivar peering_location: The peering location of the ExpressRoute circuit. + :vartype peering_location: str + :ivar bandwidth_in_mbps: The circuit bandwidth In Mbps. + :vartype bandwidth_in_mbps: int + :param express_route_circuit: The ExpressRouteCircuit. + :type express_route_circuit: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitReference + :param service_provider_provisioning_state: The provisioning state of the circuit in the + connectivity provider system. Possible values include: "NotProvisioned", "Provisioning", + "Provisioned", "Deprovisioning". + :type service_provider_provisioning_state: str or + ~azure.mgmt.network.v2021_05_01.models.ServiceProviderProvisioningState + :param service_provider_notes: Additional read only notes set by the connectivity provider. + :type service_provider_notes: str + :ivar provisioning_state: The provisioning state of the express route cross connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param peerings: The list of peerings. + :type peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'primary_azure_port': {'readonly': True}, + 'secondary_azure_port': {'readonly': True}, + 's_tag': {'readonly': True}, + 'peering_location': {'readonly': True}, + 'bandwidth_in_mbps': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, + 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, + 's_tag': {'key': 'properties.sTag', 'type': 'int'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'bandwidth_in_mbps': {'key': 'properties.bandwidthInMbps', 'type': 'int'}, + 'express_route_circuit': {'key': 'properties.expressRouteCircuit', 'type': 'ExpressRouteCircuitReference'}, + 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, + 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCrossConnectionPeering]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCrossConnection, self).__init__(**kwargs) + self.etag = None + self.primary_azure_port = None + self.secondary_azure_port = None + self.s_tag = None + self.peering_location = None + self.bandwidth_in_mbps = None + self.express_route_circuit = kwargs.get('express_route_circuit', None) + self.service_provider_provisioning_state = kwargs.get('service_provider_provisioning_state', None) + self.service_provider_notes = kwargs.get('service_provider_notes', None) + self.provisioning_state = None + self.peerings = kwargs.get('peerings', None) + + +class ExpressRouteCrossConnectionListResult(msrest.serialization.Model): + """Response for ListExpressRouteCrossConnection API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of ExpressRouteCrossConnection resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCrossConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ExpressRouteCrossConnectionPeering(SubResource): + """Peering in an ExpressRoute Cross Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param peering_type: The peering type. Possible values include: "AzurePublicPeering", + "AzurePrivatePeering", "MicrosoftPeering". + :type peering_type: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePeeringType + :param state: The peering state. Possible values include: "Disabled", "Enabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePeeringState + :ivar azure_asn: The Azure ASN. + :vartype azure_asn: int + :param peer_asn: The peer ASN. + :type peer_asn: long + :param primary_peer_address_prefix: The primary address prefix. + :type primary_peer_address_prefix: str + :param secondary_peer_address_prefix: The secondary address prefix. + :type secondary_peer_address_prefix: str + :ivar primary_azure_port: The primary port. + :vartype primary_azure_port: str + :ivar secondary_azure_port: The secondary port. + :vartype secondary_azure_port: str + :param shared_key: The shared key. + :type shared_key: str + :param vlan_id: The VLAN ID. + :type vlan_id: int + :param microsoft_peering_config: The Microsoft peering configuration. + :type microsoft_peering_config: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringConfig + :ivar provisioning_state: The provisioning state of the express route cross connection peering + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param gateway_manager_etag: The GatewayManager Etag. + :type gateway_manager_etag: str + :ivar last_modified_by: Who was the last to modify the peering. + :vartype last_modified_by: str + :param ipv6_peering_config: The IPv6 peering configuration. + :type ipv6_peering_config: + ~azure.mgmt.network.v2021_05_01.models.Ipv6ExpressRouteCircuitPeeringConfig + """ + + _validation = { + 'etag': {'readonly': True}, + 'azure_asn': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 1}, + 'primary_azure_port': {'readonly': True}, + 'secondary_azure_port': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, + 'peer_asn': {'key': 'properties.peerASN', 'type': 'long'}, + 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, + 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, + 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, + 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, + 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCrossConnectionPeering, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.peering_type = kwargs.get('peering_type', None) + self.state = kwargs.get('state', None) + self.azure_asn = None + self.peer_asn = kwargs.get('peer_asn', None) + self.primary_peer_address_prefix = kwargs.get('primary_peer_address_prefix', None) + self.secondary_peer_address_prefix = kwargs.get('secondary_peer_address_prefix', None) + self.primary_azure_port = None + self.secondary_azure_port = None + self.shared_key = kwargs.get('shared_key', None) + self.vlan_id = kwargs.get('vlan_id', None) + self.microsoft_peering_config = kwargs.get('microsoft_peering_config', None) + self.provisioning_state = None + self.gateway_manager_etag = kwargs.get('gateway_manager_etag', None) + self.last_modified_by = None + self.ipv6_peering_config = kwargs.get('ipv6_peering_config', None) + + +class ExpressRouteCrossConnectionPeeringList(msrest.serialization.Model): + """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCrossConnection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The peerings in an express route cross connection. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnectionPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCrossConnectionPeeringList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ExpressRouteCrossConnectionRoutesTableSummary(msrest.serialization.Model): + """The routes table associated with the ExpressRouteCircuit. + + :param neighbor: IP address of Neighbor router. + :type neighbor: str + :param asn: Autonomous system number. + :type asn: int + :param up_down: The length of time that the BGP session has been in the Established state, or + the current status if not in the Established state. + :type up_down: str + :param state_or_prefixes_received: Current state of the BGP session, and the number of prefixes + that have been received from a neighbor or peer group. + :type state_or_prefixes_received: str + """ + + _attribute_map = { + 'neighbor': {'key': 'neighbor', 'type': 'str'}, + 'asn': {'key': 'asn', 'type': 'int'}, + 'up_down': {'key': 'upDown', 'type': 'str'}, + 'state_or_prefixes_received': {'key': 'stateOrPrefixesReceived', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCrossConnectionRoutesTableSummary, self).__init__(**kwargs) + self.neighbor = kwargs.get('neighbor', None) + self.asn = kwargs.get('asn', None) + self.up_down = kwargs.get('up_down', None) + self.state_or_prefixes_received = kwargs.get('state_or_prefixes_received', None) + + +class ExpressRouteCrossConnectionsRoutesTableSummaryListResult(msrest.serialization.Model): + """Response for ListRoutesTable associated with the Express Route Cross Connections. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of the routes table. + :type value: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionRoutesTableSummary] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnectionRoutesTableSummary]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteCrossConnectionsRoutesTableSummaryListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ExpressRouteGateway(Resource): + """ExpressRoute gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param auto_scale_configuration: Configuration for auto scaling. + :type auto_scale_configuration: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGatewayPropertiesAutoScaleConfiguration + :ivar express_route_connections: List of ExpressRoute connections to the ExpressRoute gateway. + :vartype express_route_connections: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection] + :ivar provisioning_state: The provisioning state of the express route gateway resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param virtual_hub: The Virtual Hub where the ExpressRoute gateway is or will be deployed. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.VirtualHubId + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'express_route_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'auto_scale_configuration': {'key': 'properties.autoScaleConfiguration', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfiguration'}, + 'express_route_connections': {'key': 'properties.expressRouteConnections', 'type': '[ExpressRouteConnection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'VirtualHubId'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteGateway, self).__init__(**kwargs) + self.etag = None + self.auto_scale_configuration = kwargs.get('auto_scale_configuration', None) + self.express_route_connections = None + self.provisioning_state = None + self.virtual_hub = kwargs.get('virtual_hub', None) + + +class ExpressRouteGatewayList(msrest.serialization.Model): + """List of ExpressRoute gateways. + + :param value: List of ExpressRoute gateways. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteGateway]'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteGatewayList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class ExpressRouteGatewayPropertiesAutoScaleConfiguration(msrest.serialization.Model): + """Configuration for auto scaling. + + :param bounds: Minimum and maximum number of scale units to deploy. + :type bounds: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds + """ + + _attribute_map = { + 'bounds': {'key': 'bounds', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteGatewayPropertiesAutoScaleConfiguration, self).__init__(**kwargs) + self.bounds = kwargs.get('bounds', None) + + +class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds(msrest.serialization.Model): + """Minimum and maximum number of scale units to deploy. + + :param min: Minimum number of scale units deployed for ExpressRoute gateway. + :type min: int + :param max: Maximum number of scale units deployed for ExpressRoute gateway. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds, self).__init__(**kwargs) + self.min = kwargs.get('min', None) + self.max = kwargs.get('max', None) + + +class ExpressRouteLink(SubResource): + """ExpressRouteLink child resource definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of child port resource that is unique among child port resources of the + parent. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar router_name: Name of Azure router associated with physical port. + :vartype router_name: str + :ivar interface_name: Name of Azure router interface. + :vartype interface_name: str + :ivar patch_panel_id: Mapping between physical port to patch panel port. + :vartype patch_panel_id: str + :ivar rack_id: Mapping of physical patch panel to rack. + :vartype rack_id: str + :ivar connector_type: Physical fiber port type. Possible values include: "LC", "SC". + :vartype connector_type: str or + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkConnectorType + :param admin_state: Administrative state of the physical port. Possible values include: + "Enabled", "Disabled". + :type admin_state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkAdminState + :ivar provisioning_state: The provisioning state of the express route link resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param mac_sec_config: MacSec configuration. + :type mac_sec_config: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkMacSecConfig + """ + + _validation = { + 'etag': {'readonly': True}, + 'router_name': {'readonly': True}, + 'interface_name': {'readonly': True}, + 'patch_panel_id': {'readonly': True}, + 'rack_id': {'readonly': True}, + 'connector_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'router_name': {'key': 'properties.routerName', 'type': 'str'}, + 'interface_name': {'key': 'properties.interfaceName', 'type': 'str'}, + 'patch_panel_id': {'key': 'properties.patchPanelId', 'type': 'str'}, + 'rack_id': {'key': 'properties.rackId', 'type': 'str'}, + 'connector_type': {'key': 'properties.connectorType', 'type': 'str'}, + 'admin_state': {'key': 'properties.adminState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'mac_sec_config': {'key': 'properties.macSecConfig', 'type': 'ExpressRouteLinkMacSecConfig'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteLink, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.router_name = None + self.interface_name = None + self.patch_panel_id = None + self.rack_id = None + self.connector_type = None + self.admin_state = kwargs.get('admin_state', None) + self.provisioning_state = None + self.mac_sec_config = kwargs.get('mac_sec_config', None) + + +class ExpressRouteLinkListResult(msrest.serialization.Model): + """Response for ListExpressRouteLinks API service call. + + :param value: The list of ExpressRouteLink sub-resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteLink] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteLinkListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExpressRouteLinkMacSecConfig(msrest.serialization.Model): + """ExpressRouteLink Mac Security Configuration. + + :param ckn_secret_identifier: Keyvault Secret Identifier URL containing Mac security CKN key. + :type ckn_secret_identifier: str + :param cak_secret_identifier: Keyvault Secret Identifier URL containing Mac security CAK key. + :type cak_secret_identifier: str + :param cipher: Mac security cipher. Possible values include: "GcmAes256", "GcmAes128", + "GcmAesXpn128", "GcmAesXpn256". + :type cipher: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkMacSecCipher + :param sci_state: Sci mode enabled/disabled. Possible values include: "Disabled", "Enabled". + :type sci_state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkMacSecSciState + """ + + _attribute_map = { + 'ckn_secret_identifier': {'key': 'cknSecretIdentifier', 'type': 'str'}, + 'cak_secret_identifier': {'key': 'cakSecretIdentifier', 'type': 'str'}, + 'cipher': {'key': 'cipher', 'type': 'str'}, + 'sci_state': {'key': 'sciState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteLinkMacSecConfig, self).__init__(**kwargs) + self.ckn_secret_identifier = kwargs.get('ckn_secret_identifier', None) + self.cak_secret_identifier = kwargs.get('cak_secret_identifier', None) + self.cipher = kwargs.get('cipher', None) + self.sci_state = kwargs.get('sci_state', None) + + +class ExpressRoutePort(Resource): + """ExpressRoutePort resource definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param identity: The identity of ExpressRoutePort, if configured. + :type identity: ~azure.mgmt.network.v2021_05_01.models.ManagedServiceIdentity + :param peering_location: The name of the peering location that the ExpressRoutePort is mapped + to physically. + :type peering_location: str + :param bandwidth_in_gbps: Bandwidth of procured ports in Gbps. + :type bandwidth_in_gbps: int + :ivar provisioned_bandwidth_in_gbps: Aggregate Gbps of associated circuit bandwidths. + :vartype provisioned_bandwidth_in_gbps: float + :ivar mtu: Maximum transmission unit of the physical port pair(s). + :vartype mtu: str + :param encapsulation: Encapsulation method on physical ports. Possible values include: "Dot1Q", + "QinQ". + :type encapsulation: str or + ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsEncapsulation + :ivar ether_type: Ether type of the physical port. + :vartype ether_type: str + :ivar allocation_date: Date of the physical port allocation to be used in Letter of + Authorization. + :vartype allocation_date: str + :param links: The set of physical links of the ExpressRoutePort resource. + :type links: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteLink] + :ivar circuits: Reference the ExpressRoute circuit(s) that are provisioned on this + ExpressRoutePort resource. + :vartype circuits: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the express route port resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar resource_guid: The resource GUID property of the express route port resource. + :vartype resource_guid: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioned_bandwidth_in_gbps': {'readonly': True}, + 'mtu': {'readonly': True}, + 'ether_type': {'readonly': True}, + 'allocation_date': {'readonly': True}, + 'circuits': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_guid': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'int'}, + 'provisioned_bandwidth_in_gbps': {'key': 'properties.provisionedBandwidthInGbps', 'type': 'float'}, + 'mtu': {'key': 'properties.mtu', 'type': 'str'}, + 'encapsulation': {'key': 'properties.encapsulation', 'type': 'str'}, + 'ether_type': {'key': 'properties.etherType', 'type': 'str'}, + 'allocation_date': {'key': 'properties.allocationDate', 'type': 'str'}, + 'links': {'key': 'properties.links', 'type': '[ExpressRouteLink]'}, + 'circuits': {'key': 'properties.circuits', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRoutePort, self).__init__(**kwargs) + self.etag = None + self.identity = kwargs.get('identity', None) + self.peering_location = kwargs.get('peering_location', None) + self.bandwidth_in_gbps = kwargs.get('bandwidth_in_gbps', None) + self.provisioned_bandwidth_in_gbps = None + self.mtu = None + self.encapsulation = kwargs.get('encapsulation', None) + self.ether_type = None + self.allocation_date = None + self.links = kwargs.get('links', None) + self.circuits = None + self.provisioning_state = None + self.resource_guid = None + + +class ExpressRoutePortListResult(msrest.serialization.Model): + """Response for ListExpressRoutePorts API service call. + + :param value: A list of ExpressRoutePort resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRoutePort]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRoutePortListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExpressRoutePortsLocation(Resource): + """Definition of the ExpressRoutePorts peering location resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar address: Address of peering location. + :vartype address: str + :ivar contact: Contact details of peering locations. + :vartype contact: str + :param available_bandwidths: The inventory of available ExpressRoutePort bandwidths. + :type available_bandwidths: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsLocationBandwidths] + :ivar provisioning_state: The provisioning state of the express route port location resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'address': {'readonly': True}, + 'contact': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'address': {'key': 'properties.address', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'str'}, + 'available_bandwidths': {'key': 'properties.availableBandwidths', 'type': '[ExpressRoutePortsLocationBandwidths]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRoutePortsLocation, self).__init__(**kwargs) + self.address = None + self.contact = None + self.available_bandwidths = kwargs.get('available_bandwidths', None) + self.provisioning_state = None + + +class ExpressRoutePortsLocationBandwidths(msrest.serialization.Model): + """Real-time inventory of available ExpressRoute port bandwidths. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar offer_name: Bandwidth descriptive name. + :vartype offer_name: str + :ivar value_in_gbps: Bandwidth value in Gbps. + :vartype value_in_gbps: int + """ + + _validation = { + 'offer_name': {'readonly': True}, + 'value_in_gbps': {'readonly': True}, + } + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_gbps': {'key': 'valueInGbps', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRoutePortsLocationBandwidths, self).__init__(**kwargs) + self.offer_name = None + self.value_in_gbps = None + + +class ExpressRoutePortsLocationListResult(msrest.serialization.Model): + """Response for ListExpressRoutePortsLocations API service call. + + :param value: The list of all ExpressRoutePort peering locations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsLocation] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRoutePortsLocation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRoutePortsLocationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExpressRouteServiceProvider(Resource): + """A ExpressRouteResourceProvider object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param peering_locations: A list of peering locations. + :type peering_locations: list[str] + :param bandwidths_offered: A list of bandwidths offered. + :type bandwidths_offered: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteServiceProviderBandwidthsOffered] + :ivar provisioning_state: The provisioning state of the express route service provider + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, + 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteServiceProvider, self).__init__(**kwargs) + self.peering_locations = kwargs.get('peering_locations', None) + self.bandwidths_offered = kwargs.get('bandwidths_offered', None) + self.provisioning_state = None + + +class ExpressRouteServiceProviderBandwidthsOffered(msrest.serialization.Model): + """Contains bandwidths offered in ExpressRouteServiceProvider resources. + + :param offer_name: The OfferName. + :type offer_name: str + :param value_in_mbps: The ValueInMbps. + :type value_in_mbps: int + """ + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs) + self.offer_name = kwargs.get('offer_name', None) + self.value_in_mbps = kwargs.get('value_in_mbps', None) + + +class ExpressRouteServiceProviderListResult(msrest.serialization.Model): + """Response for the ListExpressRouteServiceProvider API service call. + + :param value: A list of ExpressRouteResourceProvider resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteServiceProvider] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteServiceProviderListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ExtendedLocation(msrest.serialization.Model): + """ExtendedLocation complex type. + + :param name: The name of the extended location. + :type name: str + :param type: The type of the extended location. Possible values include: "EdgeZone". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.ExtendedLocationTypes + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExtendedLocation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = kwargs.get('type', None) + + +class FilterItems(msrest.serialization.Model): + """Will contain the filter name and values to operate on. + + :param field: The name of the field we would like to filter. + :type field: str + :param values: List of values to filter the current field by. + :type values: list[str] + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(FilterItems, self).__init__(**kwargs) + self.field = kwargs.get('field', None) + self.values = kwargs.get('values', None) + + +class FirewallPolicy(Resource): + """FirewallPolicy Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param identity: The identity of the firewall policy. + :type identity: ~azure.mgmt.network.v2021_05_01.models.ManagedServiceIdentity + :ivar rule_collection_groups: List of references to FirewallPolicyRuleCollectionGroups. + :vartype rule_collection_groups: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the firewall policy resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param base_policy: The parent firewall policy from which rules are inherited. + :type base_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar firewalls: List of references to Azure Firewalls that this Firewall Policy is associated + with. + :vartype firewalls: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar child_policies: List of references to Child Firewall Policies. + :vartype child_policies: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param threat_intel_mode: The operation mode for Threat Intelligence. Possible values include: + "Alert", "Deny", "Off". + :type threat_intel_mode: str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallThreatIntelMode + :param threat_intel_whitelist: ThreatIntel Whitelist for Firewall Policy. + :type threat_intel_whitelist: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyThreatIntelWhitelist + :param insights: Insights on Firewall Policy. + :type insights: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyInsights + :param snat: The private IP addresses/IP ranges to which traffic will not be SNAT. + :type snat: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicySNAT + :param sql: SQL Settings definition. + :type sql: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicySQL + :param dns_settings: DNS Proxy Settings definition. + :type dns_settings: ~azure.mgmt.network.v2021_05_01.models.DnsSettings + :param explicit_proxy_settings: Explicit Proxy Settings definition. + :type explicit_proxy_settings: ~azure.mgmt.network.v2021_05_01.models.ExplicitProxySettings + :param intrusion_detection: The configuration for Intrusion detection. + :type intrusion_detection: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetection + :param transport_security: TLS Configuration definition. + :type transport_security: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyTransportSecurity + :param sku: The Firewall Policy SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicySku + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'rule_collection_groups': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'firewalls': {'readonly': True}, + 'child_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'rule_collection_groups': {'key': 'properties.ruleCollectionGroups', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'base_policy': {'key': 'properties.basePolicy', 'type': 'SubResource'}, + 'firewalls': {'key': 'properties.firewalls', 'type': '[SubResource]'}, + 'child_policies': {'key': 'properties.childPolicies', 'type': '[SubResource]'}, + 'threat_intel_mode': {'key': 'properties.threatIntelMode', 'type': 'str'}, + 'threat_intel_whitelist': {'key': 'properties.threatIntelWhitelist', 'type': 'FirewallPolicyThreatIntelWhitelist'}, + 'insights': {'key': 'properties.insights', 'type': 'FirewallPolicyInsights'}, + 'snat': {'key': 'properties.snat', 'type': 'FirewallPolicySNAT'}, + 'sql': {'key': 'properties.sql', 'type': 'FirewallPolicySQL'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'DnsSettings'}, + 'explicit_proxy_settings': {'key': 'properties.explicitProxySettings', 'type': 'ExplicitProxySettings'}, + 'intrusion_detection': {'key': 'properties.intrusionDetection', 'type': 'FirewallPolicyIntrusionDetection'}, + 'transport_security': {'key': 'properties.transportSecurity', 'type': 'FirewallPolicyTransportSecurity'}, + 'sku': {'key': 'properties.sku', 'type': 'FirewallPolicySku'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicy, self).__init__(**kwargs) + self.etag = None + self.identity = kwargs.get('identity', None) + self.rule_collection_groups = None + self.provisioning_state = None + self.base_policy = kwargs.get('base_policy', None) + self.firewalls = None + self.child_policies = None + self.threat_intel_mode = kwargs.get('threat_intel_mode', None) + self.threat_intel_whitelist = kwargs.get('threat_intel_whitelist', None) + self.insights = kwargs.get('insights', None) + self.snat = kwargs.get('snat', None) + self.sql = kwargs.get('sql', None) + self.dns_settings = kwargs.get('dns_settings', None) + self.explicit_proxy_settings = kwargs.get('explicit_proxy_settings', None) + self.intrusion_detection = kwargs.get('intrusion_detection', None) + self.transport_security = kwargs.get('transport_security', None) + self.sku = kwargs.get('sku', None) + + +class FirewallPolicyCertificateAuthority(msrest.serialization.Model): + """Trusted Root certificates properties for tls. + + :param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :type key_vault_secret_id: str + :param name: Name of the CA certificate. + :type name: str + """ + + _attribute_map = { + 'key_vault_secret_id': {'key': 'keyVaultSecretId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyCertificateAuthority, self).__init__(**kwargs) + self.key_vault_secret_id = kwargs.get('key_vault_secret_id', None) + self.name = kwargs.get('name', None) + + +class FirewallPolicyRuleCollection(msrest.serialization.Model): + """Properties of the rule collection. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FirewallPolicyFilterRuleCollection, FirewallPolicyNatRuleCollection. + + All required parameters must be populated in order to send to Azure. + + :param rule_collection_type: Required. The type of the rule collection.Constant filled by + server. Possible values include: "FirewallPolicyNatRuleCollection", + "FirewallPolicyFilterRuleCollection". + :type rule_collection_type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionType + :param name: The name of the rule collection. + :type name: str + :param priority: Priority of the Firewall Policy Rule Collection resource. + :type priority: int + """ + + _validation = { + 'rule_collection_type': {'required': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + } + + _attribute_map = { + 'rule_collection_type': {'key': 'ruleCollectionType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + } + + _subtype_map = { + 'rule_collection_type': {'FirewallPolicyFilterRuleCollection': 'FirewallPolicyFilterRuleCollection', 'FirewallPolicyNatRuleCollection': 'FirewallPolicyNatRuleCollection'} + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyRuleCollection, self).__init__(**kwargs) + self.rule_collection_type = None # type: Optional[str] + self.name = kwargs.get('name', None) + self.priority = kwargs.get('priority', None) + + +class FirewallPolicyFilterRuleCollection(FirewallPolicyRuleCollection): + """Firewall Policy Filter Rule Collection. + + All required parameters must be populated in order to send to Azure. + + :param rule_collection_type: Required. The type of the rule collection.Constant filled by + server. Possible values include: "FirewallPolicyNatRuleCollection", + "FirewallPolicyFilterRuleCollection". + :type rule_collection_type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionType + :param name: The name of the rule collection. + :type name: str + :param priority: Priority of the Firewall Policy Rule Collection resource. + :type priority: int + :param action: The action type of a Filter rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyFilterRuleCollectionAction + :param rules: List of rules included in a rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRule] + """ + + _validation = { + 'rule_collection_type': {'required': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + } + + _attribute_map = { + 'rule_collection_type': {'key': 'ruleCollectionType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'FirewallPolicyFilterRuleCollectionAction'}, + 'rules': {'key': 'rules', 'type': '[FirewallPolicyRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyFilterRuleCollection, self).__init__(**kwargs) + self.rule_collection_type = 'FirewallPolicyFilterRuleCollection' # type: str + self.action = kwargs.get('action', None) + self.rules = kwargs.get('rules', None) + + +class FirewallPolicyFilterRuleCollectionAction(msrest.serialization.Model): + """Properties of the FirewallPolicyFilterRuleCollectionAction. + + :param type: The type of action. Possible values include: "Allow", "Deny". + :type type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyFilterRuleCollectionActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyFilterRuleCollectionAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + + +class FirewallPolicyInsights(msrest.serialization.Model): + """Firewall Policy Insights. + + :param is_enabled: A flag to indicate if the insights are enabled on the policy. + :type is_enabled: bool + :param retention_days: Number of days the insights should be enabled on the policy. + :type retention_days: int + :param log_analytics_resources: Workspaces needed to configure the Firewall Policy Insights. + :type log_analytics_resources: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyLogAnalyticsResources + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'retention_days': {'key': 'retentionDays', 'type': 'int'}, + 'log_analytics_resources': {'key': 'logAnalyticsResources', 'type': 'FirewallPolicyLogAnalyticsResources'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyInsights, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.retention_days = kwargs.get('retention_days', None) + self.log_analytics_resources = kwargs.get('log_analytics_resources', None) + + +class FirewallPolicyIntrusionDetection(msrest.serialization.Model): + """Configuration for intrusion detection mode and rules. + + :param mode: Intrusion detection general state. Possible values include: "Off", "Alert", + "Deny". + :type mode: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionStateType + :param configuration: Intrusion detection configuration properties. + :type configuration: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionConfiguration + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'FirewallPolicyIntrusionDetectionConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyIntrusionDetection, self).__init__(**kwargs) + self.mode = kwargs.get('mode', None) + self.configuration = kwargs.get('configuration', None) + + +class FirewallPolicyIntrusionDetectionBypassTrafficSpecifications(msrest.serialization.Model): + """Intrusion detection bypass traffic specification. + + :param name: Name of the bypass traffic rule. + :type name: str + :param description: Description of the bypass traffic rule. + :type description: str + :param protocol: The rule bypass protocol. Possible values include: "TCP", "UDP", "ICMP", + "ANY". + :type protocol: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionProtocol + :param source_addresses: List of source IP addresses or ranges for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses or ranges for this rule. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports or ranges. + :type destination_ports: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param destination_ip_groups: List of destination IpGroups for this rule. + :type destination_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'destination_ip_groups': {'key': 'destinationIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyIntrusionDetectionBypassTrafficSpecifications, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.source_addresses = kwargs.get('source_addresses', None) + self.destination_addresses = kwargs.get('destination_addresses', None) + self.destination_ports = kwargs.get('destination_ports', None) + self.source_ip_groups = kwargs.get('source_ip_groups', None) + self.destination_ip_groups = kwargs.get('destination_ip_groups', None) + + +class FirewallPolicyIntrusionDetectionConfiguration(msrest.serialization.Model): + """The operation for configuring intrusion detection. + + :param signature_overrides: List of specific signatures states. + :type signature_overrides: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionSignatureSpecification] + :param bypass_traffic_settings: List of rules for traffic to bypass. + :type bypass_traffic_settings: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications] + """ + + _attribute_map = { + 'signature_overrides': {'key': 'signatureOverrides', 'type': '[FirewallPolicyIntrusionDetectionSignatureSpecification]'}, + 'bypass_traffic_settings': {'key': 'bypassTrafficSettings', 'type': '[FirewallPolicyIntrusionDetectionBypassTrafficSpecifications]'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyIntrusionDetectionConfiguration, self).__init__(**kwargs) + self.signature_overrides = kwargs.get('signature_overrides', None) + self.bypass_traffic_settings = kwargs.get('bypass_traffic_settings', None) + + +class FirewallPolicyIntrusionDetectionSignatureSpecification(msrest.serialization.Model): + """Intrusion detection signatures specification states. + + :param id: Signature id. + :type id: str + :param mode: The signature state. Possible values include: "Off", "Alert", "Deny". + :type mode: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionStateType + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyIntrusionDetectionSignatureSpecification, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.mode = kwargs.get('mode', None) + + +class FirewallPolicyListResult(msrest.serialization.Model): + """Response for ListFirewallPolicies API service call. + + :param value: List of Firewall Policies in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicy] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FirewallPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class FirewallPolicyLogAnalyticsResources(msrest.serialization.Model): + """Log Analytics Resources for Firewall Policy Insights. + + :param workspaces: List of workspaces for Firewall Policy Insights. + :type workspaces: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyLogAnalyticsWorkspace] + :param default_workspace_id: The default workspace Id for Firewall Policy Insights. + :type default_workspace_id: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'workspaces': {'key': 'workspaces', 'type': '[FirewallPolicyLogAnalyticsWorkspace]'}, + 'default_workspace_id': {'key': 'defaultWorkspaceId', 'type': 'SubResource'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyLogAnalyticsResources, self).__init__(**kwargs) + self.workspaces = kwargs.get('workspaces', None) + self.default_workspace_id = kwargs.get('default_workspace_id', None) + + +class FirewallPolicyLogAnalyticsWorkspace(msrest.serialization.Model): + """Log Analytics Workspace for Firewall Policy Insights. + + :param region: Region to configure the Workspace. + :type region: str + :param workspace_id: The workspace Id for Firewall Policy Insights. + :type workspace_id: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'SubResource'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyLogAnalyticsWorkspace, self).__init__(**kwargs) + self.region = kwargs.get('region', None) + self.workspace_id = kwargs.get('workspace_id', None) + + +class FirewallPolicyNatRuleCollection(FirewallPolicyRuleCollection): + """Firewall Policy NAT Rule Collection. + + All required parameters must be populated in order to send to Azure. + + :param rule_collection_type: Required. The type of the rule collection.Constant filled by + server. Possible values include: "FirewallPolicyNatRuleCollection", + "FirewallPolicyFilterRuleCollection". + :type rule_collection_type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionType + :param name: The name of the rule collection. + :type name: str + :param priority: Priority of the Firewall Policy Rule Collection resource. + :type priority: int + :param action: The action type of a Nat rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyNatRuleCollectionAction + :param rules: List of rules included in a rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRule] + """ + + _validation = { + 'rule_collection_type': {'required': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + } + + _attribute_map = { + 'rule_collection_type': {'key': 'ruleCollectionType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'FirewallPolicyNatRuleCollectionAction'}, + 'rules': {'key': 'rules', 'type': '[FirewallPolicyRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyNatRuleCollection, self).__init__(**kwargs) + self.rule_collection_type = 'FirewallPolicyNatRuleCollection' # type: str + self.action = kwargs.get('action', None) + self.rules = kwargs.get('rules', None) + + +class FirewallPolicyNatRuleCollectionAction(msrest.serialization.Model): + """Properties of the FirewallPolicyNatRuleCollectionAction. + + :param type: The type of action. Possible values include: "DNAT". + :type type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyNatRuleCollectionActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyNatRuleCollectionAction, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + + +class FirewallPolicyRuleApplicationProtocol(msrest.serialization.Model): + """Properties of the application rule protocol. + + :param protocol_type: Protocol type. Possible values include: "Http", "Https". + :type protocol_type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleApplicationProtocolType + :param port: Port number for the protocol, cannot be greater than 64000. + :type port: int + """ + + _validation = { + 'port': {'maximum': 64000, 'minimum': 0}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyRuleApplicationProtocol, self).__init__(**kwargs) + self.protocol_type = kwargs.get('protocol_type', None) + self.port = kwargs.get('port', None) + + +class FirewallPolicyRuleCollectionGroup(SubResource): + """Rule Collection Group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Rule Group type. + :vartype type: str + :param priority: Priority of the Firewall Policy Rule Collection Group resource. + :type priority: int + :param rule_collections: Group of Firewall Policy rule collections. + :type rule_collections: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollection] + :ivar provisioning_state: The provisioning state of the firewall policy rule collection group + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'rule_collections': {'key': 'properties.ruleCollections', 'type': '[FirewallPolicyRuleCollection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyRuleCollectionGroup, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.priority = kwargs.get('priority', None) + self.rule_collections = kwargs.get('rule_collections', None) + self.provisioning_state = None + + +class FirewallPolicyRuleCollectionGroupListResult(msrest.serialization.Model): + """Response for ListFirewallPolicyRuleCollectionGroups API service call. + + :param value: List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy. + :type value: list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroup] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FirewallPolicyRuleCollectionGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyRuleCollectionGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class FirewallPolicySku(msrest.serialization.Model): + """SKU of Firewall policy. + + :param tier: Tier of Firewall Policy. Possible values include: "Standard", "Premium", "Basic". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicySkuTier + """ + + _attribute_map = { + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicySku, self).__init__(**kwargs) + self.tier = kwargs.get('tier', None) + + +class FirewallPolicySNAT(msrest.serialization.Model): + """The private IP addresses/IP ranges to which traffic will not be SNAT. + + :param private_ranges: List of private IP addresses/IP address ranges to not be SNAT. + :type private_ranges: list[str] + """ + + _attribute_map = { + 'private_ranges': {'key': 'privateRanges', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicySNAT, self).__init__(**kwargs) + self.private_ranges = kwargs.get('private_ranges', None) + + +class FirewallPolicySQL(msrest.serialization.Model): + """SQL Settings in Firewall Policy. + + :param allow_sql_redirect: A flag to indicate if SQL Redirect traffic filtering is enabled. + Turning on the flag requires no rule using port 11000-11999. + :type allow_sql_redirect: bool + """ + + _attribute_map = { + 'allow_sql_redirect': {'key': 'allowSqlRedirect', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicySQL, self).__init__(**kwargs) + self.allow_sql_redirect = kwargs.get('allow_sql_redirect', None) + + +class FirewallPolicyThreatIntelWhitelist(msrest.serialization.Model): + """ThreatIntel Whitelist for Firewall Policy. + + :param ip_addresses: List of IP addresses for the ThreatIntel Whitelist. + :type ip_addresses: list[str] + :param fqdns: List of FQDNs for the ThreatIntel Whitelist. + :type fqdns: list[str] + """ + + _attribute_map = { + 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyThreatIntelWhitelist, self).__init__(**kwargs) + self.ip_addresses = kwargs.get('ip_addresses', None) + self.fqdns = kwargs.get('fqdns', None) + + +class FirewallPolicyTransportSecurity(msrest.serialization.Model): + """Configuration needed to perform TLS termination & initiation. + + :param certificate_authority: The CA used for intermediate CA generation. + :type certificate_authority: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyCertificateAuthority + """ + + _attribute_map = { + 'certificate_authority': {'key': 'certificateAuthority', 'type': 'FirewallPolicyCertificateAuthority'}, + } + + def __init__( + self, + **kwargs + ): + super(FirewallPolicyTransportSecurity, self).__init__(**kwargs) + self.certificate_authority = kwargs.get('certificate_authority', None) + + +class FlowLog(Resource): + """A flow log resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param target_resource_id: ID of network security group to which flow log will be applied. + :type target_resource_id: str + :ivar target_resource_guid: Guid of network security group to which flow log will be applied. + :vartype target_resource_guid: str + :param storage_id: ID of the storage account which is used to store the flow log. + :type storage_id: str + :param enabled: Flag to enable/disable flow logging. + :type enabled: bool + :param retention_policy: Parameters that define the retention policy for flow log. + :type retention_policy: ~azure.mgmt.network.v2021_05_01.models.RetentionPolicyParameters + :param format: Parameters that define the flow log format. + :type format: ~azure.mgmt.network.v2021_05_01.models.FlowLogFormatParameters + :param flow_analytics_configuration: Parameters that define the configuration of traffic + analytics. + :type flow_analytics_configuration: + ~azure.mgmt.network.v2021_05_01.models.TrafficAnalyticsProperties + :ivar provisioning_state: The provisioning state of the flow log. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'target_resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'target_resource_guid': {'key': 'properties.targetResourceGuid', 'type': 'str'}, + 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, + 'format': {'key': 'properties.format', 'type': 'FlowLogFormatParameters'}, + 'flow_analytics_configuration': {'key': 'properties.flowAnalyticsConfiguration', 'type': 'TrafficAnalyticsProperties'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FlowLog, self).__init__(**kwargs) + self.etag = None + self.target_resource_id = kwargs.get('target_resource_id', None) + self.target_resource_guid = None + self.storage_id = kwargs.get('storage_id', None) + self.enabled = kwargs.get('enabled', None) + self.retention_policy = kwargs.get('retention_policy', None) + self.format = kwargs.get('format', None) + self.flow_analytics_configuration = kwargs.get('flow_analytics_configuration', None) + self.provisioning_state = None + + +class FlowLogFormatParameters(msrest.serialization.Model): + """Parameters that define the flow log format. + + :param type: The file type of flow log. Possible values include: "JSON". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.FlowLogFormatType + :param version: The version (revision) of the flow log. + :type version: int + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(FlowLogFormatParameters, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.version = kwargs.get('version', 0) + + +class FlowLogInformation(msrest.serialization.Model): + """Information on the configuration of flow log and traffic analytics (optional) . + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The ID of the resource to configure for flow log and + traffic analytics (optional) . + :type target_resource_id: str + :param flow_analytics_configuration: Parameters that define the configuration of traffic + analytics. + :type flow_analytics_configuration: + ~azure.mgmt.network.v2021_05_01.models.TrafficAnalyticsProperties + :param storage_id: Required. ID of the storage account which is used to store the flow log. + :type storage_id: str + :param enabled: Required. Flag to enable/disable flow logging. + :type enabled: bool + :param retention_policy: Parameters that define the retention policy for flow log. + :type retention_policy: ~azure.mgmt.network.v2021_05_01.models.RetentionPolicyParameters + :param format: Parameters that define the flow log format. + :type format: ~azure.mgmt.network.v2021_05_01.models.FlowLogFormatParameters + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'storage_id': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'flow_analytics_configuration': {'key': 'flowAnalyticsConfiguration', 'type': 'TrafficAnalyticsProperties'}, + 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, + 'format': {'key': 'properties.format', 'type': 'FlowLogFormatParameters'}, + } + + def __init__( + self, + **kwargs + ): + super(FlowLogInformation, self).__init__(**kwargs) + self.target_resource_id = kwargs['target_resource_id'] + self.flow_analytics_configuration = kwargs.get('flow_analytics_configuration', None) + self.storage_id = kwargs['storage_id'] + self.enabled = kwargs['enabled'] + self.retention_policy = kwargs.get('retention_policy', None) + self.format = kwargs.get('format', None) + + +class FlowLogListResult(msrest.serialization.Model): + """List of flow logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: Information about flow log resource. + :type value: list[~azure.mgmt.network.v2021_05_01.models.FlowLog] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FlowLog]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FlowLogListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class FlowLogStatusParameters(msrest.serialization.Model): + """Parameters that define a resource to query flow log and traffic analytics (optional) status. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The target resource where getting the flow log and traffic + analytics (optional) status. + :type target_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FlowLogStatusParameters, self).__init__(**kwargs) + self.target_resource_id = kwargs['target_resource_id'] + + +class FrontendIPConfiguration(SubResource): + """Frontend IP address of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of frontend IP + configurations used by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :type zones: list[str] + :ivar inbound_nat_rules: An array of references to inbound rules that use this frontend IP. + :vartype inbound_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar inbound_nat_pools: An array of references to inbound pools that use this frontend IP. + :vartype inbound_nat_pools: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar outbound_rules: An array of references to outbound rules that use this frontend IP. + :vartype outbound_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar load_balancing_rules: An array of references to load balancing rules that use this + frontend IP. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The Private IP allocation method. Possible values include: + "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param private_ip_address_version: Whether the specific ipconfiguration is IPv4 or IPv6. + Default is taken as IPv4. Possible values include: "IPv4", "IPv6". + :type private_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param public_ip_address: The reference to the Public IP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :param public_ip_prefix: The reference to the Public IP Prefix resource. + :type public_ip_prefix: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param gateway_load_balancer: The reference to gateway load balancer frontend IP. + :type gateway_load_balancer: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the frontend IP configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'inbound_nat_rules': {'readonly': True}, + 'inbound_nat_pools': {'readonly': True}, + 'outbound_rules': {'readonly': True}, + 'load_balancing_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, + 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[SubResource]'}, + 'outbound_rules': {'key': 'properties.outboundRules', 'type': '[SubResource]'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + 'gateway_load_balancer': {'key': 'properties.gatewayLoadBalancer', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(FrontendIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.zones = kwargs.get('zones', None) + self.inbound_nat_rules = None + self.inbound_nat_pools = None + self.outbound_rules = None + self.load_balancing_rules = None + self.private_ip_address = kwargs.get('private_ip_address', None) + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.subnet = kwargs.get('subnet', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.public_ip_prefix = kwargs.get('public_ip_prefix', None) + self.gateway_load_balancer = kwargs.get('gateway_load_balancer', None) + self.provisioning_state = None + + +class GatewayLoadBalancerTunnelInterface(msrest.serialization.Model): + """Gateway load balancer tunnel interface of a load balancer backend address pool. + + :param port: Port of gateway load balancer tunnel interface. + :type port: int + :param identifier: Identifier of gateway load balancer tunnel interface. + :type identifier: int + :param protocol: Protocol of gateway load balancer tunnel interface. Possible values include: + "None", "Native", "VXLAN". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.GatewayLoadBalancerTunnelProtocol + :param type: Traffic type of gateway load balancer tunnel interface. Possible values include: + "None", "Internal", "External". + :type type: str or + ~azure.mgmt.network.v2021_05_01.models.GatewayLoadBalancerTunnelInterfaceType + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'identifier': {'key': 'identifier', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GatewayLoadBalancerTunnelInterface, self).__init__(**kwargs) + self.port = kwargs.get('port', None) + self.identifier = kwargs.get('identifier', None) + self.protocol = kwargs.get('protocol', None) + self.type = kwargs.get('type', None) + + +class GatewayRoute(msrest.serialization.Model): + """Gateway routing details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar local_address: The gateway's local address. + :vartype local_address: str + :ivar network: The route's network prefix. + :vartype network: str + :ivar next_hop: The route's next hop. + :vartype next_hop: str + :ivar source_peer: The peer this route was learned from. + :vartype source_peer: str + :ivar origin: The source this route was learned from. + :vartype origin: str + :ivar as_path: The route's AS path sequence. + :vartype as_path: str + :ivar weight: The route's weight. + :vartype weight: int + """ + + _validation = { + 'local_address': {'readonly': True}, + 'network': {'readonly': True}, + 'next_hop': {'readonly': True}, + 'source_peer': {'readonly': True}, + 'origin': {'readonly': True}, + 'as_path': {'readonly': True}, + 'weight': {'readonly': True}, + } + + _attribute_map = { + 'local_address': {'key': 'localAddress', 'type': 'str'}, + 'network': {'key': 'network', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'as_path': {'key': 'asPath', 'type': 'str'}, + 'weight': {'key': 'weight', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(GatewayRoute, self).__init__(**kwargs) + self.local_address = None + self.network = None + self.next_hop = None + self.source_peer = None + self.origin = None + self.as_path = None + self.weight = None + + +class GatewayRouteListResult(msrest.serialization.Model): + """List of virtual network gateway routes. + + :param value: List of gateway routes. + :type value: list[~azure.mgmt.network.v2021_05_01.models.GatewayRoute] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[GatewayRoute]'}, + } + + def __init__( + self, + **kwargs + ): + super(GatewayRouteListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class GenerateExpressRoutePortsLOARequest(msrest.serialization.Model): + """The customer name to be printed on a letter of authorization. + + All required parameters must be populated in order to send to Azure. + + :param customer_name: Required. The customer name. + :type customer_name: str + """ + + _validation = { + 'customer_name': {'required': True}, + } + + _attribute_map = { + 'customer_name': {'key': 'customerName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GenerateExpressRoutePortsLOARequest, self).__init__(**kwargs) + self.customer_name = kwargs['customer_name'] + + +class GenerateExpressRoutePortsLOAResult(msrest.serialization.Model): + """Response for GenerateExpressRoutePortsLOA API service call. + + :param encoded_content: The content as a base64 encoded string. + :type encoded_content: str + """ + + _attribute_map = { + 'encoded_content': {'key': 'encodedContent', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GenerateExpressRoutePortsLOAResult, self).__init__(**kwargs) + self.encoded_content = kwargs.get('encoded_content', None) + + +class GetVpnSitesConfigurationRequest(msrest.serialization.Model): + """List of Vpn-Sites. + + All required parameters must be populated in order to send to Azure. + + :param vpn_sites: List of resource-ids of the vpn-sites for which config is to be downloaded. + :type vpn_sites: list[str] + :param output_blob_sas_url: Required. The sas-url to download the configurations for vpn-sites. + :type output_blob_sas_url: str + """ + + _validation = { + 'output_blob_sas_url': {'required': True}, + } + + _attribute_map = { + 'vpn_sites': {'key': 'vpnSites', 'type': '[str]'}, + 'output_blob_sas_url': {'key': 'outputBlobSasUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(GetVpnSitesConfigurationRequest, self).__init__(**kwargs) + self.vpn_sites = kwargs.get('vpn_sites', None) + self.output_blob_sas_url = kwargs['output_blob_sas_url'] + + +class HopLink(msrest.serialization.Model): + """Hop link. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar next_hop_id: The ID of the next hop. + :vartype next_hop_id: str + :ivar link_type: Link type. + :vartype link_type: str + :ivar issues: List of issues. + :vartype issues: list[~azure.mgmt.network.v2021_05_01.models.ConnectivityIssue] + :ivar context: Provides additional context on links. + :vartype context: dict[str, str] + :ivar resource_id: Resource ID. + :vartype resource_id: str + :ivar round_trip_time_min: Minimum roundtrip time in milliseconds. + :vartype round_trip_time_min: long + :ivar round_trip_time_avg: Average roundtrip time in milliseconds. + :vartype round_trip_time_avg: long + :ivar round_trip_time_max: Maximum roundtrip time in milliseconds. + :vartype round_trip_time_max: long + """ + + _validation = { + 'next_hop_id': {'readonly': True}, + 'link_type': {'readonly': True}, + 'issues': {'readonly': True}, + 'context': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'round_trip_time_min': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + 'round_trip_time_avg': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + 'round_trip_time_max': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'next_hop_id': {'key': 'nextHopId', 'type': 'str'}, + 'link_type': {'key': 'linkType', 'type': 'str'}, + 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, + 'context': {'key': 'context', 'type': '{str}'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'round_trip_time_min': {'key': 'properties.roundTripTimeMin', 'type': 'long'}, + 'round_trip_time_avg': {'key': 'properties.roundTripTimeAvg', 'type': 'long'}, + 'round_trip_time_max': {'key': 'properties.roundTripTimeMax', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(HopLink, self).__init__(**kwargs) + self.next_hop_id = None + self.link_type = None + self.issues = None + self.context = None + self.resource_id = None + self.round_trip_time_min = None + self.round_trip_time_avg = None + self.round_trip_time_max = None + + +class HTTPConfiguration(msrest.serialization.Model): + """HTTP configuration of the connectivity check. + + :param method: HTTP method. Possible values include: "Get". + :type method: str or ~azure.mgmt.network.v2021_05_01.models.HTTPMethod + :param headers: List of HTTP headers. + :type headers: list[~azure.mgmt.network.v2021_05_01.models.HTTPHeader] + :param valid_status_codes: Valid status codes. + :type valid_status_codes: list[int] + """ + + _attribute_map = { + 'method': {'key': 'method', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '[HTTPHeader]'}, + 'valid_status_codes': {'key': 'validStatusCodes', 'type': '[int]'}, + } + + def __init__( + self, + **kwargs + ): + super(HTTPConfiguration, self).__init__(**kwargs) + self.method = kwargs.get('method', None) + self.headers = kwargs.get('headers', None) + self.valid_status_codes = kwargs.get('valid_status_codes', None) + + +class HTTPHeader(msrest.serialization.Model): + """The HTTP header. + + :param name: The name in HTTP header. + :type name: str + :param value: The value in HTTP header. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HTTPHeader, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.value = kwargs.get('value', None) + + +class HubIPAddresses(msrest.serialization.Model): + """IP addresses associated with azure firewall. + + :param public_i_ps: Public IP addresses associated with azure firewall. + :type public_i_ps: ~azure.mgmt.network.v2021_05_01.models.HubPublicIPAddresses + :param private_ip_address: Private IP Address associated with azure firewall. + :type private_ip_address: str + """ + + _attribute_map = { + 'public_i_ps': {'key': 'publicIPs', 'type': 'HubPublicIPAddresses'}, + 'private_ip_address': {'key': 'privateIPAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HubIPAddresses, self).__init__(**kwargs) + self.public_i_ps = kwargs.get('public_i_ps', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + + +class HubIpConfiguration(SubResource): + """IpConfigurations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the Ip Configuration. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Ipconfiguration type. + :vartype type: str + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param public_ip_address: The reference to the public IP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :ivar provisioning_state: The provisioning state of the IP configuration resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HubIpConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.private_ip_address = kwargs.get('private_ip_address', None) + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.subnet = kwargs.get('subnet', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.provisioning_state = None + + +class HubPublicIPAddresses(msrest.serialization.Model): + """Public IP addresses associated with azure firewall. + + :param addresses: The list of Public IP addresses associated with azure firewall or IP + addresses to be retained. + :type addresses: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallPublicIPAddress] + :param count: The number of Public IP addresses associated with azure firewall. + :type count: int + """ + + _attribute_map = { + 'addresses': {'key': 'addresses', 'type': '[AzureFirewallPublicIPAddress]'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(HubPublicIPAddresses, self).__init__(**kwargs) + self.addresses = kwargs.get('addresses', None) + self.count = kwargs.get('count', None) + + +class HubRoute(msrest.serialization.Model): + """RouteTable route. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Route that is unique within a RouteTable. This name can + be used to access this route. + :type name: str + :param destination_type: Required. The type of destinations (eg: CIDR, ResourceId, Service). + :type destination_type: str + :param destinations: Required. List of all destinations. + :type destinations: list[str] + :param next_hop_type: Required. The type of next hop (eg: ResourceId). + :type next_hop_type: str + :param next_hop: Required. NextHop resource ID. + :type next_hop: str + """ + + _validation = { + 'name': {'required': True}, + 'destination_type': {'required': True}, + 'destinations': {'required': True}, + 'next_hop_type': {'required': True}, + 'next_hop': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'destination_type': {'key': 'destinationType', 'type': 'str'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HubRoute, self).__init__(**kwargs) + self.name = kwargs['name'] + self.destination_type = kwargs['destination_type'] + self.destinations = kwargs['destinations'] + self.next_hop_type = kwargs['next_hop_type'] + self.next_hop = kwargs['next_hop'] + + +class HubRouteTable(SubResource): + """RouteTable resource in a virtual hub. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param routes: List of all routes. + :type routes: list[~azure.mgmt.network.v2021_05_01.models.HubRoute] + :param labels: List of labels associated with this route table. + :type labels: list[str] + :ivar associated_connections: List of all connections associated with this route table. + :vartype associated_connections: list[str] + :ivar propagating_connections: List of all connections that advertise to this route table. + :vartype propagating_connections: list[str] + :ivar provisioning_state: The provisioning state of the RouteTable resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'associated_connections': {'readonly': True}, + 'propagating_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[HubRoute]'}, + 'labels': {'key': 'properties.labels', 'type': '[str]'}, + 'associated_connections': {'key': 'properties.associatedConnections', 'type': '[str]'}, + 'propagating_connections': {'key': 'properties.propagatingConnections', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HubRouteTable, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.routes = kwargs.get('routes', None) + self.labels = kwargs.get('labels', None) + self.associated_connections = None + self.propagating_connections = None + self.provisioning_state = None + + +class HubVirtualNetworkConnection(SubResource): + """HubVirtualNetworkConnection Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param remote_virtual_network: Reference to the remote virtual network. + :type remote_virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param allow_hub_to_remote_vnet_transit: Deprecated: VirtualHub to RemoteVnet transit to + enabled or not. + :type allow_hub_to_remote_vnet_transit: bool + :param allow_remote_vnet_to_use_hub_vnet_gateways: Deprecated: Allow RemoteVnet to use Virtual + Hub's gateways. + :type allow_remote_vnet_to_use_hub_vnet_gateways: bool + :param enable_internet_security: Enable internet security. + :type enable_internet_security: bool + :param routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :type routing_configuration: ~azure.mgmt.network.v2021_05_01.models.RoutingConfiguration + :ivar provisioning_state: The provisioning state of the hub virtual network connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, + 'allow_hub_to_remote_vnet_transit': {'key': 'properties.allowHubToRemoteVnetTransit', 'type': 'bool'}, + 'allow_remote_vnet_to_use_hub_vnet_gateways': {'key': 'properties.allowRemoteVnetToUseHubVnetGateways', 'type': 'bool'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HubVirtualNetworkConnection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.remote_virtual_network = kwargs.get('remote_virtual_network', None) + self.allow_hub_to_remote_vnet_transit = kwargs.get('allow_hub_to_remote_vnet_transit', None) + self.allow_remote_vnet_to_use_hub_vnet_gateways = kwargs.get('allow_remote_vnet_to_use_hub_vnet_gateways', None) + self.enable_internet_security = kwargs.get('enable_internet_security', None) + self.routing_configuration = kwargs.get('routing_configuration', None) + self.provisioning_state = None + + +class IDPSQueryObject(msrest.serialization.Model): + """Will describe the query to run against the IDPS signatures DB. + + :param filters: Contain all filters names and values. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.FilterItems] + :param search: Search term in all columns. + :type search: str + :param order_by: Column to sort response by. + :type order_by: ~azure.mgmt.network.v2021_05_01.models.OrderBy + :param results_per_page: The number of the results to return in each page. + :type results_per_page: int + :param skip: The number of records matching the filter to skip. + :type skip: int + """ + + _validation = { + 'results_per_page': {'maximum': 1000, 'minimum': 1}, + } + + _attribute_map = { + 'filters': {'key': 'filters', 'type': '[FilterItems]'}, + 'search': {'key': 'search', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'OrderBy'}, + 'results_per_page': {'key': 'resultsPerPage', 'type': 'int'}, + 'skip': {'key': 'skip', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(IDPSQueryObject, self).__init__(**kwargs) + self.filters = kwargs.get('filters', None) + self.search = kwargs.get('search', None) + self.order_by = kwargs.get('order_by', None) + self.results_per_page = kwargs.get('results_per_page', None) + self.skip = kwargs.get('skip', None) + + +class InboundNatPool(SubResource): + """Inbound NAT pool of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of inbound NAT pools used + by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param frontend_ip_configuration: A reference to frontend IP addresses. + :type frontend_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param protocol: The reference to the transport protocol used by the inbound NAT pool. Possible + values include: "Udp", "Tcp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.TransportProtocol + :param frontend_port_range_start: The first port number in the range of external ports that + will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values + range between 1 and 65534. + :type frontend_port_range_start: int + :param frontend_port_range_end: The last port number in the range of external ports that will + be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range + between 1 and 65535. + :type frontend_port_range_end: int + :param backend_port: The port used for internal connections on the endpoint. Acceptable values + are between 1 and 65535. + :type backend_port: int + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :type idle_timeout_in_minutes: int + :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :type enable_floating_ip: bool + :param enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :type enable_tcp_reset: bool + :ivar provisioning_state: The provisioning state of the inbound NAT pool resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, + 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, + 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(InboundNatPool, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) + self.protocol = kwargs.get('protocol', None) + self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) + self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) + self.backend_port = kwargs.get('backend_port', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.enable_floating_ip = kwargs.get('enable_floating_ip', None) + self.enable_tcp_reset = kwargs.get('enable_tcp_reset', None) + self.provisioning_state = None + + +class InboundNatRule(SubResource): + """Inbound NAT rule of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of inbound NAT rules used + by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param frontend_ip_configuration: A reference to frontend IP addresses. + :type frontend_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar backend_ip_configuration: A reference to a private IP address defined on a network + interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations + is forwarded to the backend IP. + :vartype backend_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration + :param protocol: The reference to the transport protocol used by the load balancing rule. + Possible values include: "Udp", "Tcp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.TransportProtocol + :param frontend_port: The port for the external endpoint. Port numbers for each rule must be + unique within the Load Balancer. Acceptable values range from 1 to 65534. + :type frontend_port: int + :param backend_port: The port used for the internal endpoint. Acceptable values range from 1 to + 65535. + :type backend_port: int + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :type idle_timeout_in_minutes: int + :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :type enable_floating_ip: bool + :param enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :type enable_tcp_reset: bool + :param frontend_port_range_start: The port range start for the external endpoint. This property + is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule + port mappings will be created for each backend address from BackendAddressPool. Acceptable + values range from 1 to 65534. + :type frontend_port_range_start: int + :param frontend_port_range_end: The port range end for the external endpoint. This property is + used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule + port mappings will be created for each backend address from BackendAddressPool. Acceptable + values range from 1 to 65534. + :type frontend_port_range_end: int + :param backend_address_pool: A reference to backendAddressPool resource. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the inbound NAT rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'backend_ip_configuration': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'backend_ip_configuration': {'key': 'properties.backendIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, + 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(InboundNatRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) + self.backend_ip_configuration = None + self.protocol = kwargs.get('protocol', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.enable_floating_ip = kwargs.get('enable_floating_ip', None) + self.enable_tcp_reset = kwargs.get('enable_tcp_reset', None) + self.frontend_port_range_start = kwargs.get('frontend_port_range_start', None) + self.frontend_port_range_end = kwargs.get('frontend_port_range_end', None) + self.backend_address_pool = kwargs.get('backend_address_pool', None) + self.provisioning_state = None + + +class InboundNatRuleListResult(msrest.serialization.Model): + """Response for ListInboundNatRule API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of inbound NAT rules in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.InboundNatRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InboundNatRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(InboundNatRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class InboundNatRulePortMapping(msrest.serialization.Model): + """Individual port mappings for inbound NAT rule created for backend pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar inbound_nat_rule_name: Name of inbound NAT rule. + :vartype inbound_nat_rule_name: str + :ivar protocol: The reference to the transport protocol used by the inbound NAT rule. Possible + values include: "Udp", "Tcp", "All". + :vartype protocol: str or ~azure.mgmt.network.v2021_05_01.models.TransportProtocol + :ivar frontend_port: Frontend port. + :vartype frontend_port: int + :ivar backend_port: Backend port. + :vartype backend_port: int + """ + + _validation = { + 'inbound_nat_rule_name': {'readonly': True}, + 'protocol': {'readonly': True}, + 'frontend_port': {'readonly': True}, + 'backend_port': {'readonly': True}, + } + + _attribute_map = { + 'inbound_nat_rule_name': {'key': 'inboundNatRuleName', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(InboundNatRulePortMapping, self).__init__(**kwargs) + self.inbound_nat_rule_name = None + self.protocol = None + self.frontend_port = None + self.backend_port = None + + +class InboundSecurityRule(SubResource): + """NVA Inbound Security Rule resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of security rule collection. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: NVA inbound security rule type. + :vartype type: str + :param rules: List of allowed rules. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.InboundSecurityRules] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rules': {'key': 'properties.rules', 'type': '[InboundSecurityRules]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(InboundSecurityRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.rules = kwargs.get('rules', None) + self.provisioning_state = None + + +class InboundSecurityRules(msrest.serialization.Model): + """Properties of the Inbound Security Rules resource. + + :param protocol: Protocol. This should be either TCP or UDP. Possible values include: "TCP", + "UDP". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.InboundSecurityRulesProtocol + :param source_address_prefix: The CIDR or source IP range. Only /30, /31 and /32 Ip ranges are + allowed. + :type source_address_prefix: str + :param destination_port_range: NVA port ranges to be opened up. One needs to provide specific + ports. + :type destination_port_range: int + """ + + _validation = { + 'destination_port_range': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'destination_port_range': {'key': 'destinationPortRange', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(InboundSecurityRules, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.source_address_prefix = kwargs.get('source_address_prefix', None) + self.destination_port_range = kwargs.get('destination_port_range', None) + + +class IPAddressAvailabilityResult(msrest.serialization.Model): + """Response for CheckIPAddressAvailability API service call. + + :param available: Private IP address availability. + :type available: bool + :param available_ip_addresses: Contains other available private IP addresses if the asked for + address is taken. + :type available_ip_addresses: list[str] + :param is_platform_reserved: Private IP address platform reserved. + :type is_platform_reserved: bool + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'available_ip_addresses': {'key': 'availableIPAddresses', 'type': '[str]'}, + 'is_platform_reserved': {'key': 'isPlatformReserved', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(IPAddressAvailabilityResult, self).__init__(**kwargs) + self.available = kwargs.get('available', None) + self.available_ip_addresses = kwargs.get('available_ip_addresses', None) + self.is_platform_reserved = kwargs.get('is_platform_reserved', None) + + +class IpAllocation(Resource): + """IpAllocation resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar subnet: The Subnet that using the prefix of this IpAllocation resource. + :vartype subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar virtual_network: The VirtualNetwork that using the prefix of this IpAllocation resource. + :vartype virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param type_properties_type: The type for the IpAllocation. Possible values include: + "Undefined", "Hypernet". + :type type_properties_type: str or ~azure.mgmt.network.v2021_05_01.models.IpAllocationType + :param prefix: The address prefix for the IpAllocation. + :type prefix: str + :param prefix_length: The address prefix length for the IpAllocation. + :type prefix_length: int + :param prefix_type: The address prefix Type for the IpAllocation. Possible values include: + "IPv4", "IPv6". + :type prefix_type: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :param ipam_allocation_id: The IPAM allocation ID. + :type ipam_allocation_id: str + :param allocation_tags: IpAllocation tags. + :type allocation_tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'subnet': {'readonly': True}, + 'virtual_network': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'prefix': {'key': 'properties.prefix', 'type': 'str'}, + 'prefix_length': {'key': 'properties.prefixLength', 'type': 'int'}, + 'prefix_type': {'key': 'properties.prefixType', 'type': 'str'}, + 'ipam_allocation_id': {'key': 'properties.ipamAllocationId', 'type': 'str'}, + 'allocation_tags': {'key': 'properties.allocationTags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(IpAllocation, self).__init__(**kwargs) + self.etag = None + self.subnet = None + self.virtual_network = None + self.type_properties_type = kwargs.get('type_properties_type', None) + self.prefix = kwargs.get('prefix', None) + self.prefix_length = kwargs.get('prefix_length', 0) + self.prefix_type = kwargs.get('prefix_type', None) + self.ipam_allocation_id = kwargs.get('ipam_allocation_id', None) + self.allocation_tags = kwargs.get('allocation_tags', None) + + +class IpAllocationListResult(msrest.serialization.Model): + """Response for the ListIpAllocations API service call. + + :param value: A list of IpAllocation resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.IpAllocation] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IpAllocation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IpAllocationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class IPConfiguration(SubResource): + """IP configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param public_ip_address: The reference to the public IP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :ivar provisioning_state: The provisioning state of the IP configuration resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.private_ip_address = kwargs.get('private_ip_address', None) + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.subnet = kwargs.get('subnet', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.provisioning_state = None + + +class IPConfigurationBgpPeeringAddress(msrest.serialization.Model): + """Properties of IPConfigurationBgpPeeringAddress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param ipconfiguration_id: The ID of IP configuration which belongs to gateway. + :type ipconfiguration_id: str + :ivar default_bgp_ip_addresses: The list of default BGP peering addresses which belong to IP + configuration. + :vartype default_bgp_ip_addresses: list[str] + :param custom_bgp_ip_addresses: The list of custom BGP peering addresses which belong to IP + configuration. + :type custom_bgp_ip_addresses: list[str] + :ivar tunnel_ip_addresses: The list of tunnel public IP addresses which belong to IP + configuration. + :vartype tunnel_ip_addresses: list[str] + """ + + _validation = { + 'default_bgp_ip_addresses': {'readonly': True}, + 'tunnel_ip_addresses': {'readonly': True}, + } + + _attribute_map = { + 'ipconfiguration_id': {'key': 'ipconfigurationId', 'type': 'str'}, + 'default_bgp_ip_addresses': {'key': 'defaultBgpIpAddresses', 'type': '[str]'}, + 'custom_bgp_ip_addresses': {'key': 'customBgpIpAddresses', 'type': '[str]'}, + 'tunnel_ip_addresses': {'key': 'tunnelIpAddresses', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(IPConfigurationBgpPeeringAddress, self).__init__(**kwargs) + self.ipconfiguration_id = kwargs.get('ipconfiguration_id', None) + self.default_bgp_ip_addresses = None + self.custom_bgp_ip_addresses = kwargs.get('custom_bgp_ip_addresses', None) + self.tunnel_ip_addresses = None + + +class IPConfigurationProfile(SubResource): + """IP configuration profile child resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource. This name can be used to access the resource. + :type name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param subnet: The reference to the subnet resource to create a container network interface ip + configuration. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :ivar provisioning_state: The provisioning state of the IP configuration profile resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IPConfigurationProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None + self.etag = None + self.subnet = kwargs.get('subnet', None) + self.provisioning_state = None + + +class IpGroup(Resource): + """The IpGroups resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the IpGroups resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param ip_addresses: IpAddresses/IpAddressPrefixes in the IpGroups resource. + :type ip_addresses: list[str] + :ivar firewalls: List of references to Firewall resources that this IpGroups is associated + with. + :vartype firewalls: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar firewall_policies: List of references to Firewall Policies resources that this IpGroups + is associated with. + :vartype firewall_policies: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'firewalls': {'readonly': True}, + 'firewall_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'ip_addresses': {'key': 'properties.ipAddresses', 'type': '[str]'}, + 'firewalls': {'key': 'properties.firewalls', 'type': '[SubResource]'}, + 'firewall_policies': {'key': 'properties.firewallPolicies', 'type': '[SubResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(IpGroup, self).__init__(**kwargs) + self.etag = None + self.provisioning_state = None + self.ip_addresses = kwargs.get('ip_addresses', None) + self.firewalls = None + self.firewall_policies = None + + +class IpGroupListResult(msrest.serialization.Model): + """Response for the ListIpGroups API service call. + + :param value: The list of IpGroups information resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.IpGroup] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IpGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IpGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class IpsecPolicy(msrest.serialization.Model): + """An IPSec Policy configuration for a virtual network gateway connection. + + All required parameters must be populated in order to send to Azure. + + :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + :type sa_life_time_seconds: int + :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + :type sa_data_size_kilobytes: int + :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible + values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", + "GCMAES256". + :type ipsec_encryption: str or ~azure.mgmt.network.v2021_05_01.models.IpsecEncryption + :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values + include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". + :type ipsec_integrity: str or ~azure.mgmt.network.v2021_05_01.models.IpsecIntegrity + :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values + include: "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES256", "GCMAES128". + :type ike_encryption: str or ~azure.mgmt.network.v2021_05_01.models.IkeEncryption + :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values + include: "MD5", "SHA1", "SHA256", "SHA384", "GCMAES256", "GCMAES128". + :type ike_integrity: str or ~azure.mgmt.network.v2021_05_01.models.IkeIntegrity + :param dh_group: Required. The DH Group used in IKE Phase 1 for initial SA. Possible values + include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", + "DHGroup24". + :type dh_group: str or ~azure.mgmt.network.v2021_05_01.models.DhGroup + :param pfs_group: Required. The Pfs Group used in IKE Phase 2 for new child SA. Possible values + include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24", "PFS14", "PFSMM". + :type pfs_group: str or ~azure.mgmt.network.v2021_05_01.models.PfsGroup + """ + + _validation = { + 'sa_life_time_seconds': {'required': True}, + 'sa_data_size_kilobytes': {'required': True}, + 'ipsec_encryption': {'required': True}, + 'ipsec_integrity': {'required': True}, + 'ike_encryption': {'required': True}, + 'ike_integrity': {'required': True}, + 'dh_group': {'required': True}, + 'pfs_group': {'required': True}, + } + + _attribute_map = { + 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, + 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, + 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, + 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, + 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, + 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, + 'dh_group': {'key': 'dhGroup', 'type': 'str'}, + 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IpsecPolicy, self).__init__(**kwargs) + self.sa_life_time_seconds = kwargs['sa_life_time_seconds'] + self.sa_data_size_kilobytes = kwargs['sa_data_size_kilobytes'] + self.ipsec_encryption = kwargs['ipsec_encryption'] + self.ipsec_integrity = kwargs['ipsec_integrity'] + self.ike_encryption = kwargs['ike_encryption'] + self.ike_integrity = kwargs['ike_integrity'] + self.dh_group = kwargs['dh_group'] + self.pfs_group = kwargs['pfs_group'] + + +class IpTag(msrest.serialization.Model): + """Contains the IpTag associated with the object. + + :param ip_tag_type: The IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: The value of the IP tag associated with the public IP. Example: SQL. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IpTag, self).__init__(**kwargs) + self.ip_tag_type = kwargs.get('ip_tag_type', None) + self.tag = kwargs.get('tag', None) + + +class Ipv6CircuitConnectionConfig(msrest.serialization.Model): + """IPv6 Circuit Connection properties for global reach. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param address_prefix: /125 IP address space to carve out customer addresses for global reach. + :type address_prefix: str + :ivar circuit_connection_status: Express Route Circuit connection state. Possible values + include: "Connected", "Connecting", "Disconnected". + :vartype circuit_connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.CircuitConnectionStatus + """ + + _validation = { + 'circuit_connection_status': {'readonly': True}, + } + + _attribute_map = { + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + 'circuit_connection_status': {'key': 'circuitConnectionStatus', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Ipv6CircuitConnectionConfig, self).__init__(**kwargs) + self.address_prefix = kwargs.get('address_prefix', None) + self.circuit_connection_status = None + + +class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): + """Contains IPv6 peering config. + + :param primary_peer_address_prefix: The primary address prefix. + :type primary_peer_address_prefix: str + :param secondary_peer_address_prefix: The secondary address prefix. + :type secondary_peer_address_prefix: str + :param microsoft_peering_config: The Microsoft peering configuration. + :type microsoft_peering_config: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringConfig + :param route_filter: The reference to the RouteFilter resource. + :type route_filter: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param state: The state of peering. Possible values include: "Disabled", "Enabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringState + """ + + _attribute_map = { + 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, + 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, + 'microsoft_peering_config': {'key': 'microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, + 'route_filter': {'key': 'routeFilter', 'type': 'SubResource'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Ipv6ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) + self.primary_peer_address_prefix = kwargs.get('primary_peer_address_prefix', None) + self.secondary_peer_address_prefix = kwargs.get('secondary_peer_address_prefix', None) + self.microsoft_peering_config = kwargs.get('microsoft_peering_config', None) + self.route_filter = kwargs.get('route_filter', None) + self.state = kwargs.get('state', None) + + +class ListHubRouteTablesResult(msrest.serialization.Model): + """List of RouteTables and a URL nextLink to get the next set of results. + + :param value: List of RouteTables. + :type value: list[~azure.mgmt.network.v2021_05_01.models.HubRouteTable] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HubRouteTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListHubRouteTablesResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListHubVirtualNetworkConnectionsResult(msrest.serialization.Model): + """List of HubVirtualNetworkConnections and a URL nextLink to get the next set of results. + + :param value: List of HubVirtualNetworkConnections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.HubVirtualNetworkConnection] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HubVirtualNetworkConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListHubVirtualNetworkConnectionsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListP2SVpnGatewaysResult(msrest.serialization.Model): + """Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL nextLink to get the next set of results. + + :param value: List of P2SVpnGateways. + :type value: list[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[P2SVpnGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListP2SVpnGatewaysResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListRoutingIntentResult(msrest.serialization.Model): + """List of the routing intent result and a URL nextLink to get the next set of results. + + :param value: List of RoutingIntent resource. + :type value: list[~azure.mgmt.network.v2021_05_01.models.RoutingIntent] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoutingIntent]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListRoutingIntentResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVirtualHubBgpConnectionResults(msrest.serialization.Model): + """VirtualHubBgpConnections list. + + :param value: The list of VirtualHubBgpConnections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BgpConnection] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BgpConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVirtualHubBgpConnectionResults, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVirtualHubIpConfigurationResults(msrest.serialization.Model): + """VirtualHubIpConfigurations list. + + :param value: The list of VirtualHubIpConfigurations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.HubIpConfiguration] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HubIpConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVirtualHubIpConfigurationResults, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVirtualHubRouteTableV2SResult(msrest.serialization.Model): + """List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. + + :param value: List of VirtualHubRouteTableV2s. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualHubRouteTableV2]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVirtualHubRouteTableV2SResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVirtualHubsResult(msrest.serialization.Model): + """Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of results. + + :param value: List of VirtualHubs. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualHub] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualHub]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVirtualHubsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVirtualNetworkGatewayNatRulesResult(msrest.serialization.Model): + """Result of the request to list all nat rules to a virtual network gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. + + :param value: List of Nat Rules. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayNatRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVirtualNetworkGatewayNatRulesResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVirtualWANsResult(msrest.serialization.Model): + """Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink to get the next set of results. + + :param value: List of VirtualWANs. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualWAN] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualWAN]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVirtualWANsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVpnConnectionsResult(msrest.serialization.Model): + """Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. + + :param value: List of Vpn Connections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnConnection] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVpnConnectionsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVpnGatewayNatRulesResult(msrest.serialization.Model): + """Result of the request to list all nat rules to a virtual wan vpn gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. + + :param value: List of Nat Rules. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnGatewayNatRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVpnGatewayNatRulesResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVpnGatewaysResult(msrest.serialization.Model): + """Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink to get the next set of results. + + :param value: List of VpnGateways. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnGateway] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVpnGatewaysResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVpnServerConfigurationsResult(msrest.serialization.Model): + """Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations and a URL nextLink to get the next set of results. + + :param value: List of VpnServerConfigurations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnServerConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVpnServerConfigurationsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVpnSiteLinkConnectionsResult(msrest.serialization.Model): + """Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. + + :param value: List of VpnSiteLinkConnections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnSiteLinkConnection] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnSiteLinkConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVpnSiteLinkConnectionsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVpnSiteLinksResult(msrest.serialization.Model): + """Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink to get the next set of results. + + :param value: List of VpnSitesLinks. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnSiteLink] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnSiteLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVpnSiteLinksResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ListVpnSitesResult(msrest.serialization.Model): + """Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. + + :param value: List of VpnSites. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnSite] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnSite]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ListVpnSitesResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class LoadBalancer(Resource): + """LoadBalancer resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the load balancer. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :param sku: The load balancer SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.LoadBalancerSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param frontend_ip_configurations: Object representing the frontend IPs to be used for the load + balancer. + :type frontend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration] + :param backend_address_pools: Collection of backend address pools used by a load balancer. + :type backend_address_pools: list[~azure.mgmt.network.v2021_05_01.models.BackendAddressPool] + :param load_balancing_rules: Object collection representing the load balancing rules Gets the + provisioning. + :type load_balancing_rules: list[~azure.mgmt.network.v2021_05_01.models.LoadBalancingRule] + :param probes: Collection of probe objects used in the load balancer. + :type probes: list[~azure.mgmt.network.v2021_05_01.models.Probe] + :param inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining + inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT + pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are + associated with individual virtual machines cannot reference an Inbound NAT pool. They have to + reference individual inbound NAT rules. + :type inbound_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.InboundNatRule] + :param inbound_nat_pools: Defines an external port range for inbound NAT to a single backend + port on NICs associated with a load balancer. Inbound NAT rules are created automatically for + each NIC associated with the Load Balancer using an external port from this range. Defining an + Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. + Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with + individual virtual machines cannot reference an inbound NAT pool. They have to reference + individual inbound NAT rules. + :type inbound_nat_pools: list[~azure.mgmt.network.v2021_05_01.models.InboundNatPool] + :param outbound_rules: The outbound rules. + :type outbound_rules: list[~azure.mgmt.network.v2021_05_01.models.OutboundRule] + :ivar resource_guid: The resource GUID property of the load balancer resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the load balancer resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'sku': {'key': 'sku', 'type': 'LoadBalancerSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[FrontendIPConfiguration]'}, + 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[BackendAddressPool]'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, + 'probes': {'key': 'properties.probes', 'type': '[Probe]'}, + 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[InboundNatRule]'}, + 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[InboundNatPool]'}, + 'outbound_rules': {'key': 'properties.outboundRules', 'type': '[OutboundRule]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancer, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.sku = kwargs.get('sku', None) + self.etag = None + self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) + self.backend_address_pools = kwargs.get('backend_address_pools', None) + self.load_balancing_rules = kwargs.get('load_balancing_rules', None) + self.probes = kwargs.get('probes', None) + self.inbound_nat_rules = kwargs.get('inbound_nat_rules', None) + self.inbound_nat_pools = kwargs.get('inbound_nat_pools', None) + self.outbound_rules = kwargs.get('outbound_rules', None) + self.resource_guid = None + self.provisioning_state = None + + +class LoadBalancerBackendAddress(msrest.serialization.Model): + """Load balancer backend addresses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: Name of the backend address. + :type name: str + :param virtual_network: Reference to an existing virtual network. + :type virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param subnet: Reference to an existing subnet. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param ip_address: IP Address belonging to the referenced virtual network. + :type ip_address: str + :ivar network_interface_ip_configuration: Reference to IP address defined in network + interfaces. + :vartype network_interface_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param load_balancer_frontend_ip_configuration: Reference to the frontend ip address + configuration defined in regional loadbalancer. + :type load_balancer_frontend_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar inbound_nat_rules_port_mapping: Collection of inbound NAT rule port mappings. + :vartype inbound_nat_rules_port_mapping: + list[~azure.mgmt.network.v2021_05_01.models.NatRulePortMapping] + """ + + _validation = { + 'network_interface_ip_configuration': {'readonly': True}, + 'inbound_nat_rules_port_mapping': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'network_interface_ip_configuration': {'key': 'properties.networkInterfaceIPConfiguration', 'type': 'SubResource'}, + 'load_balancer_frontend_ip_configuration': {'key': 'properties.loadBalancerFrontendIPConfiguration', 'type': 'SubResource'}, + 'inbound_nat_rules_port_mapping': {'key': 'properties.inboundNatRulesPortMapping', 'type': '[NatRulePortMapping]'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerBackendAddress, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.virtual_network = kwargs.get('virtual_network', None) + self.subnet = kwargs.get('subnet', None) + self.ip_address = kwargs.get('ip_address', None) + self.network_interface_ip_configuration = None + self.load_balancer_frontend_ip_configuration = kwargs.get('load_balancer_frontend_ip_configuration', None) + self.inbound_nat_rules_port_mapping = None + + +class LoadBalancerBackendAddressPoolListResult(msrest.serialization.Model): + """Response for ListBackendAddressPool API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of backend address pools in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BackendAddressPool] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BackendAddressPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerBackendAddressPoolListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): + """Response for ListFrontendIPConfiguration API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of frontend IP configurations in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerFrontendIPConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class LoadBalancerListResult(msrest.serialization.Model): + """Response for ListLoadBalancers API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of load balancers in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.LoadBalancer] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancer]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class LoadBalancerLoadBalancingRuleListResult(msrest.serialization.Model): + """Response for ListLoadBalancingRule API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of load balancing rules in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.LoadBalancingRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancingRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerLoadBalancingRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class LoadBalancerOutboundRuleListResult(msrest.serialization.Model): + """Response for ListOutboundRule API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of outbound rules in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.OutboundRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerOutboundRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class LoadBalancerProbeListResult(msrest.serialization.Model): + """Response for ListProbe API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of probes in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Probe] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Probe]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerProbeListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class LoadBalancerSku(msrest.serialization.Model): + """SKU of a load balancer. + + :param name: Name of a load balancer SKU. Possible values include: "Basic", "Standard", + "Gateway". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.LoadBalancerSkuName + :param tier: Tier of a load balancer SKU. Possible values include: "Regional", "Global". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.LoadBalancerSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class LoadBalancerVipSwapRequest(msrest.serialization.Model): + """The request for a VIP swap. + + :param frontend_ip_configurations: A list of frontend IP configuration resources that should + swap VIPs. + :type frontend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.LoadBalancerVipSwapRequestFrontendIPConfiguration] + """ + + _attribute_map = { + 'frontend_ip_configurations': {'key': 'frontendIPConfigurations', 'type': '[LoadBalancerVipSwapRequestFrontendIPConfiguration]'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerVipSwapRequest, self).__init__(**kwargs) + self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) + + +class LoadBalancerVipSwapRequestFrontendIPConfiguration(msrest.serialization.Model): + """VIP swap request's frontend IP configuration object. + + :param id: The ID of frontend IP configuration resource. + :type id: str + :param public_ip_address: A reference to public IP address resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancerVipSwapRequestFrontendIPConfiguration, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + + +class LoadBalancingRule(SubResource): + """A load balancing rule for a load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of load balancing rules + used by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param frontend_ip_configuration: A reference to frontend IP addresses. + :type frontend_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load + balanced across IPs in the backend IPs. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_address_pools: An array of references to pool of DIPs. + :type backend_address_pools: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param probe: The reference to the load balancer probe used by the load balancing rule. + :type probe: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param protocol: The reference to the transport protocol used by the load balancing rule. + Possible values include: "Udp", "Tcp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.TransportProtocol + :param load_distribution: The load distribution policy for this rule. Possible values include: + "Default", "SourceIP", "SourceIPProtocol". + :type load_distribution: str or ~azure.mgmt.network.v2021_05_01.models.LoadDistribution + :param frontend_port: The port for the external endpoint. Port numbers for each rule must be + unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 + enables "Any Port". + :type frontend_port: int + :param backend_port: The port used for internal connections on the endpoint. Acceptable values + are between 0 and 65535. Note that value 0 enables "Any Port". + :type backend_port: int + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :type idle_timeout_in_minutes: int + :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :type enable_floating_ip: bool + :param enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :type enable_tcp_reset: bool + :param disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the + publicIP address specified in the frontend of the load balancing rule. + :type disable_outbound_snat: bool + :ivar provisioning_state: The provisioning state of the load balancing rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[SubResource]'}, + 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'load_distribution': {'key': 'properties.loadDistribution', 'type': 'str'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'disable_outbound_snat': {'key': 'properties.disableOutboundSnat', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LoadBalancingRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.frontend_ip_configuration = kwargs.get('frontend_ip_configuration', None) + self.backend_address_pool = kwargs.get('backend_address_pool', None) + self.backend_address_pools = kwargs.get('backend_address_pools', None) + self.probe = kwargs.get('probe', None) + self.protocol = kwargs.get('protocol', None) + self.load_distribution = kwargs.get('load_distribution', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.enable_floating_ip = kwargs.get('enable_floating_ip', None) + self.enable_tcp_reset = kwargs.get('enable_tcp_reset', None) + self.disable_outbound_snat = kwargs.get('disable_outbound_snat', None) + self.provisioning_state = None + + +class LocalNetworkGateway(Resource): + """A common class for general resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param local_network_address_space: Local network site address space. + :type local_network_address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param gateway_ip_address: IP address of local network gateway. + :type gateway_ip_address: str + :param fqdn: FQDN of local network gateway. + :type fqdn: str + :param bgp_settings: Local network gateway's BGP speaker settings. + :type bgp_settings: ~azure.mgmt.network.v2021_05_01.models.BgpSettings + :ivar resource_guid: The resource GUID property of the local network gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the local network gateway resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'local_network_address_space': {'key': 'properties.localNetworkAddressSpace', 'type': 'AddressSpace'}, + 'gateway_ip_address': {'key': 'properties.gatewayIpAddress', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LocalNetworkGateway, self).__init__(**kwargs) + self.etag = None + self.local_network_address_space = kwargs.get('local_network_address_space', None) + self.gateway_ip_address = kwargs.get('gateway_ip_address', None) + self.fqdn = kwargs.get('fqdn', None) + self.bgp_settings = kwargs.get('bgp_settings', None) + self.resource_guid = None + self.provisioning_state = None + + +class LocalNetworkGatewayListResult(msrest.serialization.Model): + """Response for ListLocalNetworkGateways API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of local network gateways that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LocalNetworkGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LocalNetworkGatewayListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class LogSpecification(msrest.serialization.Model): + """Description of logging specification. + + :param name: The name of the specification. + :type name: str + :param display_name: The display name of the specification. + :type display_name: str + :param blob_duration: Duration of the blob. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) + + +class ManagedRuleGroupOverride(msrest.serialization.Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. The managed rule group to override. + :type rule_group_name: str + :param rules: List of rules that will be disabled. If none specified, all rules in the group + will be disabled. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.ManagedRuleOverride] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ManagedRuleOverride]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedRuleGroupOverride, self).__init__(**kwargs) + self.rule_group_name = kwargs['rule_group_name'] + self.rules = kwargs.get('rules', None) + + +class ManagedRuleOverride(msrest.serialization.Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :param rule_id: Required. Identifier for the managed rule. + :type rule_id: str + :param state: The state of the managed rule. Defaults to Disabled if not specified. Possible + values include: "Disabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.ManagedRuleEnabledState + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedRuleOverride, self).__init__(**kwargs) + self.rule_id = kwargs['rule_id'] + self.state = kwargs.get('state', None) + + +class ManagedRulesDefinition(msrest.serialization.Model): + """Allow to exclude some variable satisfy the condition for the WAF check. + + All required parameters must be populated in order to send to Azure. + + :param exclusions: The Exclusions that are applied on the policy. + :type exclusions: list[~azure.mgmt.network.v2021_05_01.models.OwaspCrsExclusionEntry] + :param managed_rule_sets: Required. The managed rule sets that are associated with the policy. + :type managed_rule_sets: list[~azure.mgmt.network.v2021_05_01.models.ManagedRuleSet] + """ + + _validation = { + 'managed_rule_sets': {'required': True}, + } + + _attribute_map = { + 'exclusions': {'key': 'exclusions', 'type': '[OwaspCrsExclusionEntry]'}, + 'managed_rule_sets': {'key': 'managedRuleSets', 'type': '[ManagedRuleSet]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedRulesDefinition, self).__init__(**kwargs) + self.exclusions = kwargs.get('exclusions', None) + self.managed_rule_sets = kwargs['managed_rule_sets'] + + +class ManagedRuleSet(msrest.serialization.Model): + """Defines a managed rule set. + + All required parameters must be populated in order to send to Azure. + + :param rule_set_type: Required. Defines the rule set type to use. + :type rule_set_type: str + :param rule_set_version: Required. Defines the version of the rule set to use. + :type rule_set_version: str + :param rule_group_overrides: Defines the rule group overrides to apply to the rule set. + :type rule_group_overrides: + list[~azure.mgmt.network.v2021_05_01.models.ManagedRuleGroupOverride] + """ + + _validation = { + 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, + } + + _attribute_map = { + 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedRuleSet, self).__init__(**kwargs) + self.rule_set_type = kwargs['rule_set_type'] + self.rule_set_version = kwargs['rule_set_version'] + self.rule_group_overrides = kwargs.get('rule_group_overrides', None) + + +class ManagedServiceIdentity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity. This property will only + be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the resource. The type 'SystemAssigned, + UserAssigned' includes both an implicitly created identity and a set of user assigned + identities. The type 'None' will remove any identities from the virtual machine. Possible + values include: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated with resource. The user + identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.network.v2021_05_01.models.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + } + + def __init__( + self, + **kwargs + ): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) + + +class MatchCondition(msrest.serialization.Model): + """Define match conditions. + + All required parameters must be populated in order to send to Azure. + + :param match_variables: Required. List of match variables. + :type match_variables: list[~azure.mgmt.network.v2021_05_01.models.MatchVariable] + :param operator: Required. The operator to be matched. Possible values include: "IPMatch", + "Equal", "Contains", "LessThan", "GreaterThan", "LessThanOrEqual", "GreaterThanOrEqual", + "BeginsWith", "EndsWith", "Regex", "GeoMatch". + :type operator: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallOperator + :param negation_conditon: Whether this is negate condition or not. + :type negation_conditon: bool + :param match_values: Required. Match value. + :type match_values: list[str] + :param transforms: List of transforms. + :type transforms: list[str or + ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallTransform] + """ + + _validation = { + 'match_variables': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'match_variables': {'key': 'matchVariables', 'type': '[MatchVariable]'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negation_conditon': {'key': 'negationConditon', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(MatchCondition, self).__init__(**kwargs) + self.match_variables = kwargs['match_variables'] + self.operator = kwargs['operator'] + self.negation_conditon = kwargs.get('negation_conditon', None) + self.match_values = kwargs['match_values'] + self.transforms = kwargs.get('transforms', None) + + +class MatchedRule(msrest.serialization.Model): + """Matched rule. + + :param rule_name: Name of the matched network security rule. + :type rule_name: str + :param action: The network traffic is allowed or denied. Possible values are 'Allow' and + 'Deny'. + :type action: str + """ + + _attribute_map = { + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MatchedRule, self).__init__(**kwargs) + self.rule_name = kwargs.get('rule_name', None) + self.action = kwargs.get('action', None) + + +class MatchVariable(msrest.serialization.Model): + """Define match variables. + + All required parameters must be populated in order to send to Azure. + + :param variable_name: Required. Match Variable. Possible values include: "RemoteAddr", + "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeaders", "RequestBody", + "RequestCookies". + :type variable_name: str or + ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallMatchVariable + :param selector: The selector of match variable. + :type selector: str + """ + + _validation = { + 'variable_name': {'required': True}, + } + + _attribute_map = { + 'variable_name': {'key': 'variableName', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MatchVariable, self).__init__(**kwargs) + self.variable_name = kwargs['variable_name'] + self.selector = kwargs.get('selector', None) + + +class MetricSpecification(msrest.serialization.Model): + """Description of metrics specification. + + :param name: The name of the metric. + :type name: str + :param display_name: The display name of the metric. + :type display_name: str + :param display_description: The description of the metric. + :type display_description: str + :param unit: Units the metric to be displayed in. + :type unit: str + :param aggregation_type: The aggregation type. + :type aggregation_type: str + :param availabilities: List of availability. + :type availabilities: list[~azure.mgmt.network.v2021_05_01.models.Availability] + :param enable_regional_mdm_account: Whether regional MDM account enabled. + :type enable_regional_mdm_account: bool + :param fill_gap_with_zero: Whether gaps would be filled with zeros. + :type fill_gap_with_zero: bool + :param metric_filter_pattern: Pattern for the filter of the metric. + :type metric_filter_pattern: str + :param dimensions: List of dimensions. + :type dimensions: list[~azure.mgmt.network.v2021_05_01.models.Dimension] + :param is_internal: Whether the metric is internal. + :type is_internal: bool + :param source_mdm_account: The source MDM account. + :type source_mdm_account: str + :param source_mdm_namespace: The source MDM namespace. + :type source_mdm_namespace: str + :param resource_id_dimension_name_override: The resource Id dimension name override. + :type resource_id_dimension_name_override: str + """ + + _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'}, + 'availabilities': {'key': 'availabilities', 'type': '[Availability]'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'is_internal': {'key': 'isInternal', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + } + + 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.availabilities = kwargs.get('availabilities', None) + self.enable_regional_mdm_account = kwargs.get('enable_regional_mdm_account', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.metric_filter_pattern = kwargs.get('metric_filter_pattern', None) + self.dimensions = kwargs.get('dimensions', None) + self.is_internal = kwargs.get('is_internal', None) + self.source_mdm_account = kwargs.get('source_mdm_account', None) + self.source_mdm_namespace = kwargs.get('source_mdm_namespace', None) + self.resource_id_dimension_name_override = kwargs.get('resource_id_dimension_name_override', None) + + +class NatGateway(Resource): + """Nat Gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The nat gateway SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.NatGatewaySku + :param zones: A list of availability zones denoting the zone in which Nat Gateway should be + deployed. + :type zones: list[str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param idle_timeout_in_minutes: The idle timeout of the nat gateway. + :type idle_timeout_in_minutes: int + :param public_ip_addresses: An array of public ip addresses associated with the nat gateway + resource. + :type public_ip_addresses: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param public_ip_prefixes: An array of public ip prefixes associated with the nat gateway + resource. + :type public_ip_prefixes: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar subnets: An array of references to the subnets using this nat gateway resource. + :vartype subnets: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar resource_guid: The resource GUID property of the NAT gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the NAT gateway resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'subnets': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'NatGatewaySku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'public_ip_addresses': {'key': 'properties.publicIpAddresses', 'type': '[SubResource]'}, + 'public_ip_prefixes': {'key': 'properties.publicIpPrefixes', 'type': '[SubResource]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[SubResource]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NatGateway, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.zones = kwargs.get('zones', None) + self.etag = None + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.public_ip_addresses = kwargs.get('public_ip_addresses', None) + self.public_ip_prefixes = kwargs.get('public_ip_prefixes', None) + self.subnets = None + self.resource_guid = None + self.provisioning_state = None + + +class NatGatewayListResult(msrest.serialization.Model): + """Response for ListNatGateways API service call. + + :param value: A list of Nat Gateways that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NatGateway] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NatGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NatGatewayListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NatGatewaySku(msrest.serialization.Model): + """SKU of nat gateway. + + :param name: Name of Nat Gateway SKU. Possible values include: "Standard". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.NatGatewaySkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NatGatewaySku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + + +class NatRule(FirewallPolicyRule): + """Rule of type nat. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleType + :param ip_protocols: Array of FirewallPolicyRuleNetworkProtocols. + :type ip_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleNetworkProtocol] + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses or Service Tags. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param translated_address: The translated address for this NAT rule. + :type translated_address: str + :param translated_port: The translated port for this NAT rule. + :type translated_port: str + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param translated_fqdn: The translated FQDN for this NAT rule. + :type translated_fqdn: str + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'ip_protocols': {'key': 'ipProtocols', 'type': '[str]'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'translated_address': {'key': 'translatedAddress', 'type': 'str'}, + 'translated_port': {'key': 'translatedPort', 'type': 'str'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'translated_fqdn': {'key': 'translatedFqdn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NatRule, self).__init__(**kwargs) + self.rule_type = 'NatRule' # type: str + self.ip_protocols = kwargs.get('ip_protocols', None) + self.source_addresses = kwargs.get('source_addresses', None) + self.destination_addresses = kwargs.get('destination_addresses', None) + self.destination_ports = kwargs.get('destination_ports', None) + self.translated_address = kwargs.get('translated_address', None) + self.translated_port = kwargs.get('translated_port', None) + self.source_ip_groups = kwargs.get('source_ip_groups', None) + self.translated_fqdn = kwargs.get('translated_fqdn', None) + + +class NatRulePortMapping(msrest.serialization.Model): + """Individual port mappings for inbound NAT rule created for backend pool. + + :param inbound_nat_rule_name: Name of inbound NAT rule. + :type inbound_nat_rule_name: str + :param frontend_port: Frontend port. + :type frontend_port: int + :param backend_port: Backend port. + :type backend_port: int + """ + + _attribute_map = { + 'inbound_nat_rule_name': {'key': 'inboundNatRuleName', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(NatRulePortMapping, self).__init__(**kwargs) + self.inbound_nat_rule_name = kwargs.get('inbound_nat_rule_name', None) + self.frontend_port = kwargs.get('frontend_port', None) + self.backend_port = kwargs.get('backend_port', None) + + +class NetworkConfigurationDiagnosticParameters(msrest.serialization.Model): + """Parameters to get network configuration diagnostic. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The ID of the target resource to perform network + configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and + Application Gateway. + :type target_resource_id: str + :param verbosity_level: Verbosity level. Possible values include: "Normal", "Minimum", "Full". + :type verbosity_level: str or ~azure.mgmt.network.v2021_05_01.models.VerbosityLevel + :param profiles: Required. List of network configuration diagnostic profiles. + :type profiles: + list[~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticProfile] + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'profiles': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'verbosity_level': {'key': 'verbosityLevel', 'type': 'str'}, + 'profiles': {'key': 'profiles', 'type': '[NetworkConfigurationDiagnosticProfile]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkConfigurationDiagnosticParameters, self).__init__(**kwargs) + self.target_resource_id = kwargs['target_resource_id'] + self.verbosity_level = kwargs.get('verbosity_level', None) + self.profiles = kwargs['profiles'] + + +class NetworkConfigurationDiagnosticProfile(msrest.serialization.Model): + """Parameters to compare with network configuration. + + All required parameters must be populated in order to send to Azure. + + :param direction: Required. The direction of the traffic. Possible values include: "Inbound", + "Outbound". + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.Direction + :param protocol: Required. Protocol to be verified on. Accepted values are '*', TCP, UDP. + :type protocol: str + :param source: Required. Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + :type source: str + :param destination: Required. Traffic destination. Accepted values are: '*', IP Address/CIDR, + Service Tag. + :type destination: str + :param destination_port: Required. Traffic destination port. Accepted values are '*' and a + single port in the range (0 - 65535). + :type destination_port: str + """ + + _validation = { + 'direction': {'required': True}, + 'protocol': {'required': True}, + 'source': {'required': True}, + 'destination': {'required': True}, + 'destination_port': {'required': True}, + } + + _attribute_map = { + 'direction': {'key': 'direction', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'destination': {'key': 'destination', 'type': 'str'}, + 'destination_port': {'key': 'destinationPort', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkConfigurationDiagnosticProfile, self).__init__(**kwargs) + self.direction = kwargs['direction'] + self.protocol = kwargs['protocol'] + self.source = kwargs['source'] + self.destination = kwargs['destination'] + self.destination_port = kwargs['destination_port'] + + +class NetworkConfigurationDiagnosticResponse(msrest.serialization.Model): + """Results of network configuration diagnostic on the target resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar results: List of network configuration diagnostic results. + :vartype results: + list[~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticResult] + """ + + _validation = { + 'results': {'readonly': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': '[NetworkConfigurationDiagnosticResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkConfigurationDiagnosticResponse, self).__init__(**kwargs) + self.results = None + + +class NetworkConfigurationDiagnosticResult(msrest.serialization.Model): + """Network configuration diagnostic result corresponded to provided traffic query. + + :param profile: Network configuration diagnostic profile. + :type profile: ~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticProfile + :param network_security_group_result: Network security group result. + :type network_security_group_result: + ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroupResult + """ + + _attribute_map = { + 'profile': {'key': 'profile', 'type': 'NetworkConfigurationDiagnosticProfile'}, + 'network_security_group_result': {'key': 'networkSecurityGroupResult', 'type': 'NetworkSecurityGroupResult'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkConfigurationDiagnosticResult, self).__init__(**kwargs) + self.profile = kwargs.get('profile', None) + self.network_security_group_result = kwargs.get('network_security_group_result', None) + + +class NetworkIntentPolicy(Resource): + """Network Intent Policy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkIntentPolicy, self).__init__(**kwargs) + self.etag = None + + +class NetworkIntentPolicyConfiguration(msrest.serialization.Model): + """Details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. + + :param network_intent_policy_name: The name of the Network Intent Policy for storing in target + subscription. + :type network_intent_policy_name: str + :param source_network_intent_policy: Source network intent policy. + :type source_network_intent_policy: ~azure.mgmt.network.v2021_05_01.models.NetworkIntentPolicy + """ + + _attribute_map = { + 'network_intent_policy_name': {'key': 'networkIntentPolicyName', 'type': 'str'}, + 'source_network_intent_policy': {'key': 'sourceNetworkIntentPolicy', 'type': 'NetworkIntentPolicy'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkIntentPolicyConfiguration, self).__init__(**kwargs) + self.network_intent_policy_name = kwargs.get('network_intent_policy_name', None) + self.source_network_intent_policy = kwargs.get('source_network_intent_policy', None) + + +class NetworkInterface(Resource): + """A network interface in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the network interface. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar virtual_machine: The reference to a virtual machine. + :vartype virtual_machine: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param network_security_group: The reference to the NetworkSecurityGroup resource. + :type network_security_group: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup + :ivar private_endpoint: A reference to the private endpoint to which the network interface is + linked. + :vartype private_endpoint: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :param ip_configurations: A list of IPConfigurations of the network interface. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration] + :ivar tap_configurations: A list of TapConfigurations of the network interface. + :vartype tap_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration] + :param dns_settings: The DNS settings in network interface. + :type dns_settings: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceDnsSettings + :ivar mac_address: The MAC address of the network interface. + :vartype mac_address: str + :ivar primary: Whether this is a primary network interface on a virtual machine. + :vartype primary: bool + :ivar vnet_encryption_supported: Whether the virtual machine this nic is attached to supports + encryption. + :vartype vnet_encryption_supported: bool + :param enable_accelerated_networking: If the network interface is accelerated networking + enabled. + :type enable_accelerated_networking: bool + :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network + interface. + :type enable_ip_forwarding: bool + :ivar hosted_workloads: A list of references to linked BareMetal resources. + :vartype hosted_workloads: list[str] + :ivar dscp_configuration: A reference to the dscp configuration to which the network interface + is linked. + :vartype dscp_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar resource_guid: The resource GUID property of the network interface resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the network interface resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param workload_type: WorkloadType of the NetworkInterface for BareMetal resources. + :type workload_type: str + :param nic_type: Type of Network Interface resource. Possible values include: "Standard", + "Elastic". + :type nic_type: str or ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceNicType + :param private_link_service: Privatelinkservice of the network interface resource. + :type private_link_service: ~azure.mgmt.network.v2021_05_01.models.PrivateLinkService + :param migration_phase: Migration phase of Network Interface resource. Possible values include: + "None", "Prepare", "Commit", "Abort", "Committed". + :type migration_phase: str or + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceMigrationPhase + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_machine': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'tap_configurations': {'readonly': True}, + 'mac_address': {'readonly': True}, + 'primary': {'readonly': True}, + 'vnet_encryption_supported': {'readonly': True}, + 'hosted_workloads': {'readonly': True}, + 'dscp_configuration': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'tap_configurations': {'key': 'properties.tapConfigurations', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, + 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'vnet_encryption_supported': {'key': 'properties.vnetEncryptionSupported', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + 'hosted_workloads': {'key': 'properties.hostedWorkloads', 'type': '[str]'}, + 'dscp_configuration': {'key': 'properties.dscpConfiguration', 'type': 'SubResource'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'workload_type': {'key': 'properties.workloadType', 'type': 'str'}, + 'nic_type': {'key': 'properties.nicType', 'type': 'str'}, + 'private_link_service': {'key': 'properties.privateLinkService', 'type': 'PrivateLinkService'}, + 'migration_phase': {'key': 'properties.migrationPhase', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterface, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.etag = None + self.virtual_machine = None + self.network_security_group = kwargs.get('network_security_group', None) + self.private_endpoint = None + self.ip_configurations = kwargs.get('ip_configurations', None) + self.tap_configurations = None + self.dns_settings = kwargs.get('dns_settings', None) + self.mac_address = None + self.primary = None + self.vnet_encryption_supported = None + self.enable_accelerated_networking = kwargs.get('enable_accelerated_networking', None) + self.enable_ip_forwarding = kwargs.get('enable_ip_forwarding', None) + self.hosted_workloads = None + self.dscp_configuration = None + self.resource_guid = None + self.provisioning_state = None + self.workload_type = kwargs.get('workload_type', None) + self.nic_type = kwargs.get('nic_type', None) + self.private_link_service = kwargs.get('private_link_service', None) + self.migration_phase = kwargs.get('migration_phase', None) + + +class NetworkInterfaceAssociation(msrest.serialization.Model): + """Network interface and its custom security rules. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Network interface ID. + :vartype id: str + :param security_rules: Collection of custom security rules. + :type security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceAssociation, self).__init__(**kwargs) + self.id = None + self.security_rules = kwargs.get('security_rules', None) + + +class NetworkInterfaceDnsSettings(msrest.serialization.Model): + """DNS settings of a network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure + provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be + the only value in dnsServers collection. + :type dns_servers: list[str] + :ivar applied_dns_servers: If the VM that uses this NIC is part of an Availability Set, then + this list will have the union of all DNS servers from all NICs that are part of the + Availability Set. This property is what is configured on each of those VMs. + :vartype applied_dns_servers: list[str] + :param internal_dns_name_label: Relative DNS name for this NIC used for internal communications + between VMs in the same virtual network. + :type internal_dns_name_label: str + :ivar internal_fqdn: Fully qualified DNS name supporting internal communications between VMs in + the same virtual network. + :vartype internal_fqdn: str + :ivar internal_domain_name_suffix: Even if internalDnsNameLabel is not specified, a DNS entry + is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the + VM name with the value of internalDomainNameSuffix. + :vartype internal_domain_name_suffix: str + """ + + _validation = { + 'applied_dns_servers': {'readonly': True}, + 'internal_fqdn': {'readonly': True}, + 'internal_domain_name_suffix': {'readonly': True}, + } + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, + 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, + 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'}, + 'internal_domain_name_suffix': {'key': 'internalDomainNameSuffix', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceDnsSettings, self).__init__(**kwargs) + self.dns_servers = kwargs.get('dns_servers', None) + self.applied_dns_servers = None + self.internal_dns_name_label = kwargs.get('internal_dns_name_label', None) + self.internal_fqdn = None + self.internal_domain_name_suffix = None + + +class NetworkInterfaceIPConfiguration(SubResource): + """IPConfiguration in a network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: Resource type. + :type type: str + :param gateway_load_balancer: The reference to gateway load balancer frontend IP. + :type gateway_load_balancer: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param virtual_network_taps: The reference to Virtual Network Taps. + :type virtual_network_taps: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap] + :param application_gateway_backend_address_pools: The reference to + ApplicationGatewayBackendAddressPool resource. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddressPool] + :param load_balancer_backend_address_pools: The reference to LoadBalancerBackendAddressPool + resource. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.network.v2021_05_01.models.BackendAddressPool] + :param load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. + :type load_balancer_inbound_nat_rules: + list[~azure.mgmt.network.v2021_05_01.models.InboundNatRule] + :param private_ip_address: Private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param private_ip_address_version: Whether the specific IP configuration is IPv4 or IPv6. + Default is IPv4. Possible values include: "IPv4", "IPv6". + :type private_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :param subnet: Subnet bound to the IP configuration. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param primary: Whether this is a primary customer address on the network interface. + :type primary: bool + :param public_ip_address: Public IP address bound to the IP configuration. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :param application_security_groups: Application security groups in which the IP configuration + is included. + :type application_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :ivar provisioning_state: The provisioning state of the network interface IP configuration. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar private_link_connection_properties: PrivateLinkConnection properties for the network + interface. + :vartype private_link_connection_properties: + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_link_connection_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'gateway_load_balancer': {'key': 'properties.gatewayLoadBalancer', 'type': 'SubResource'}, + 'virtual_network_taps': {'key': 'properties.virtualNetworkTaps', 'type': '[VirtualNetworkTap]'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, + 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_link_connection_properties': {'key': 'properties.privateLinkConnectionProperties', 'type': 'NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = kwargs.get('type', None) + self.gateway_load_balancer = kwargs.get('gateway_load_balancer', None) + self.virtual_network_taps = kwargs.get('virtual_network_taps', None) + self.application_gateway_backend_address_pools = kwargs.get('application_gateway_backend_address_pools', None) + self.load_balancer_backend_address_pools = kwargs.get('load_balancer_backend_address_pools', None) + self.load_balancer_inbound_nat_rules = kwargs.get('load_balancer_inbound_nat_rules', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.provisioning_state = None + self.private_link_connection_properties = None + + +class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): + """Response for list ip configurations API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of ip configurations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceIPConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties(msrest.serialization.Model): + """PrivateLinkConnection properties for the network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The group ID for current private link connection. + :vartype group_id: str + :ivar required_member_name: The required member name for current private link connection. + :vartype required_member_name: str + :ivar fqdns: List of FQDNs for current private link connection. + :vartype fqdns: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_member_name': {'readonly': True}, + 'fqdns': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_member_name': {'key': 'requiredMemberName', 'type': 'str'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties, self).__init__(**kwargs) + self.group_id = None + self.required_member_name = None + self.fqdns = None + + +class NetworkInterfaceListResult(msrest.serialization.Model): + """Response for the ListNetworkInterface API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of network interfaces in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkInterface]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class NetworkInterfaceLoadBalancerListResult(msrest.serialization.Model): + """Response for list ip configurations API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of load balancers. + :type value: list[~azure.mgmt.network.v2021_05_01.models.LoadBalancer] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancer]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceLoadBalancerListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class NetworkInterfaceTapConfiguration(SubResource): + """Tap configuration in a Network Interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Sub Resource type. + :vartype type: str + :param virtual_network_tap: The reference to the Virtual Network Tap resource. + :type virtual_network_tap: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap + :ivar provisioning_state: The provisioning state of the network interface tap configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_tap': {'key': 'properties.virtualNetworkTap', 'type': 'VirtualNetworkTap'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceTapConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.virtual_network_tap = kwargs.get('virtual_network_tap', None) + self.provisioning_state = None + + +class NetworkInterfaceTapConfigurationListResult(msrest.serialization.Model): + """Response for list tap configurations API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of tap configurations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceTapConfigurationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class NetworkProfile(Resource): + """Network profile resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar container_network_interfaces: List of child container network interfaces. + :vartype container_network_interfaces: + list[~azure.mgmt.network.v2021_05_01.models.ContainerNetworkInterface] + :param container_network_interface_configurations: List of chid container network interface + configurations. + :type container_network_interface_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ContainerNetworkInterfaceConfiguration] + :ivar resource_guid: The resource GUID property of the network profile resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the network profile resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'container_network_interfaces': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'container_network_interfaces': {'key': 'properties.containerNetworkInterfaces', 'type': '[ContainerNetworkInterface]'}, + 'container_network_interface_configurations': {'key': 'properties.containerNetworkInterfaceConfigurations', 'type': '[ContainerNetworkInterfaceConfiguration]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkProfile, self).__init__(**kwargs) + self.etag = None + self.container_network_interfaces = None + self.container_network_interface_configurations = kwargs.get('container_network_interface_configurations', None) + self.resource_guid = None + self.provisioning_state = None + + +class NetworkProfileListResult(msrest.serialization.Model): + """Response for ListNetworkProfiles API service call. + + :param value: A list of network profiles that exist in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkProfile] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkProfile]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkProfileListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NetworkRule(FirewallPolicyRule): + """Rule of type network. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleType + :param ip_protocols: Array of FirewallPolicyRuleNetworkProtocols. + :type ip_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleNetworkProtocol] + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses or Service Tags. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param destination_ip_groups: List of destination IpGroups for this rule. + :type destination_ip_groups: list[str] + :param destination_fqdns: List of destination FQDNs. + :type destination_fqdns: list[str] + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'ip_protocols': {'key': 'ipProtocols', 'type': '[str]'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'destination_ip_groups': {'key': 'destinationIpGroups', 'type': '[str]'}, + 'destination_fqdns': {'key': 'destinationFqdns', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkRule, self).__init__(**kwargs) + self.rule_type = 'NetworkRule' # type: str + self.ip_protocols = kwargs.get('ip_protocols', None) + self.source_addresses = kwargs.get('source_addresses', None) + self.destination_addresses = kwargs.get('destination_addresses', None) + self.destination_ports = kwargs.get('destination_ports', None) + self.source_ip_groups = kwargs.get('source_ip_groups', None) + self.destination_ip_groups = kwargs.get('destination_ip_groups', None) + self.destination_fqdns = kwargs.get('destination_fqdns', None) + + +class NetworkSecurityGroup(Resource): + """NetworkSecurityGroup resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param security_rules: A collection of security rules of the network security group. + :type security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + :ivar default_security_rules: The default security rules of network security group. + :vartype default_security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + :ivar network_interfaces: A collection of references to network interfaces. + :vartype network_interfaces: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar subnets: A collection of references to subnets. + :vartype subnets: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :ivar flow_logs: A collection of references to flow log resources. + :vartype flow_logs: list[~azure.mgmt.network.v2021_05_01.models.FlowLog] + :ivar resource_guid: The resource GUID property of the network security group resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the network security group resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'default_security_rules': {'readonly': True}, + 'network_interfaces': {'readonly': True}, + 'subnets': {'readonly': True}, + 'flow_logs': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'security_rules': {'key': 'properties.securityRules', 'type': '[SecurityRule]'}, + 'default_security_rules': {'key': 'properties.defaultSecurityRules', 'type': '[SecurityRule]'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'flow_logs': {'key': 'properties.flowLogs', 'type': '[FlowLog]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkSecurityGroup, self).__init__(**kwargs) + self.etag = None + self.security_rules = kwargs.get('security_rules', None) + self.default_security_rules = None + self.network_interfaces = None + self.subnets = None + self.flow_logs = None + self.resource_guid = None + self.provisioning_state = None + + +class NetworkSecurityGroupListResult(msrest.serialization.Model): + """Response for ListNetworkSecurityGroups API service call. + + :param value: A list of NetworkSecurityGroup resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkSecurityGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkSecurityGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NetworkSecurityGroupResult(msrest.serialization.Model): + """Network configuration diagnostic result corresponded provided traffic query. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param security_rule_access_result: The network traffic is allowed or denied. Possible values + include: "Allow", "Deny". + :type security_rule_access_result: str or + ~azure.mgmt.network.v2021_05_01.models.SecurityRuleAccess + :ivar evaluated_network_security_groups: List of results network security groups diagnostic. + :vartype evaluated_network_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.EvaluatedNetworkSecurityGroup] + """ + + _validation = { + 'evaluated_network_security_groups': {'readonly': True}, + } + + _attribute_map = { + 'security_rule_access_result': {'key': 'securityRuleAccessResult', 'type': 'str'}, + 'evaluated_network_security_groups': {'key': 'evaluatedNetworkSecurityGroups', 'type': '[EvaluatedNetworkSecurityGroup]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkSecurityGroupResult, self).__init__(**kwargs) + self.security_rule_access_result = kwargs.get('security_rule_access_result', None) + self.evaluated_network_security_groups = None + + +class NetworkSecurityRulesEvaluationResult(msrest.serialization.Model): + """Network security rules evaluation result. + + :param name: Name of the network security rule. + :type name: str + :param protocol_matched: Value indicating whether protocol is matched. + :type protocol_matched: bool + :param source_matched: Value indicating whether source is matched. + :type source_matched: bool + :param source_port_matched: Value indicating whether source port is matched. + :type source_port_matched: bool + :param destination_matched: Value indicating whether destination is matched. + :type destination_matched: bool + :param destination_port_matched: Value indicating whether destination port is matched. + :type destination_port_matched: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'protocol_matched': {'key': 'protocolMatched', 'type': 'bool'}, + 'source_matched': {'key': 'sourceMatched', 'type': 'bool'}, + 'source_port_matched': {'key': 'sourcePortMatched', 'type': 'bool'}, + 'destination_matched': {'key': 'destinationMatched', 'type': 'bool'}, + 'destination_port_matched': {'key': 'destinationPortMatched', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkSecurityRulesEvaluationResult, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.protocol_matched = kwargs.get('protocol_matched', None) + self.source_matched = kwargs.get('source_matched', None) + self.source_port_matched = kwargs.get('source_port_matched', None) + self.destination_matched = kwargs.get('destination_matched', None) + self.destination_port_matched = kwargs.get('destination_port_matched', None) + + +class NetworkVirtualAppliance(Resource): + """NetworkVirtualAppliance Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The service principal that has read access to cloud-init and config blob. + :type identity: ~azure.mgmt.network.v2021_05_01.models.ManagedServiceIdentity + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param nva_sku: Network Virtual Appliance SKU. + :type nva_sku: ~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSkuProperties + :ivar address_prefix: Address Prefix. + :vartype address_prefix: str + :param boot_strap_configuration_blobs: BootStrapConfigurationBlobs storage URLs. + :type boot_strap_configuration_blobs: list[str] + :param virtual_hub: The Virtual Hub where Network Virtual Appliance is being deployed. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param cloud_init_configuration_blobs: CloudInitConfigurationBlob storage URLs. + :type cloud_init_configuration_blobs: list[str] + :param cloud_init_configuration: CloudInitConfiguration string in plain text. + :type cloud_init_configuration: str + :param virtual_appliance_asn: VirtualAppliance ASN. + :type virtual_appliance_asn: long + :param ssh_public_key: Public key for SSH login. + :type ssh_public_key: str + :ivar virtual_appliance_nics: List of Virtual Appliance Network Interfaces. + :vartype virtual_appliance_nics: + list[~azure.mgmt.network.v2021_05_01.models.VirtualApplianceNicProperties] + :ivar virtual_appliance_sites: List of references to VirtualApplianceSite. + :vartype virtual_appliance_sites: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar inbound_security_rules: List of references to InboundSecurityRules. + :vartype inbound_security_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'address_prefix': {'readonly': True}, + 'virtual_appliance_asn': {'maximum': 4294967295, 'minimum': 0}, + 'virtual_appliance_nics': {'readonly': True}, + 'virtual_appliance_sites': {'readonly': True}, + 'inbound_security_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'nva_sku': {'key': 'properties.nvaSku', 'type': 'VirtualApplianceSkuProperties'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'boot_strap_configuration_blobs': {'key': 'properties.bootStrapConfigurationBlobs', 'type': '[str]'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'cloud_init_configuration_blobs': {'key': 'properties.cloudInitConfigurationBlobs', 'type': '[str]'}, + 'cloud_init_configuration': {'key': 'properties.cloudInitConfiguration', 'type': 'str'}, + 'virtual_appliance_asn': {'key': 'properties.virtualApplianceAsn', 'type': 'long'}, + 'ssh_public_key': {'key': 'properties.sshPublicKey', 'type': 'str'}, + 'virtual_appliance_nics': {'key': 'properties.virtualApplianceNics', 'type': '[VirtualApplianceNicProperties]'}, + 'virtual_appliance_sites': {'key': 'properties.virtualApplianceSites', 'type': '[SubResource]'}, + 'inbound_security_rules': {'key': 'properties.inboundSecurityRules', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkVirtualAppliance, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.etag = None + self.nva_sku = kwargs.get('nva_sku', None) + self.address_prefix = None + self.boot_strap_configuration_blobs = kwargs.get('boot_strap_configuration_blobs', None) + self.virtual_hub = kwargs.get('virtual_hub', None) + self.cloud_init_configuration_blobs = kwargs.get('cloud_init_configuration_blobs', None) + self.cloud_init_configuration = kwargs.get('cloud_init_configuration', None) + self.virtual_appliance_asn = kwargs.get('virtual_appliance_asn', None) + self.ssh_public_key = kwargs.get('ssh_public_key', None) + self.virtual_appliance_nics = None + self.virtual_appliance_sites = None + self.inbound_security_rules = None + self.provisioning_state = None + + +class NetworkVirtualApplianceListResult(msrest.serialization.Model): + """Response for ListNetworkVirtualAppliances API service call. + + :param value: List of Network Virtual Appliances. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkVirtualAppliance]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkVirtualApplianceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NetworkVirtualApplianceSiteListResult(msrest.serialization.Model): + """Response for ListNetworkVirtualApplianceSites API service call. + + :param value: List of Network Virtual Appliance sites. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSite] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualApplianceSite]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkVirtualApplianceSiteListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NetworkVirtualApplianceSku(Resource): + """Definition of the NetworkVirtualApplianceSkus resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar vendor: Network Virtual Appliance Sku vendor. + :vartype vendor: str + :ivar available_versions: Available Network Virtual Appliance versions. + :vartype available_versions: list[str] + :param available_scale_units: The list of scale units available. + :type available_scale_units: + list[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSkuInstances] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'vendor': {'readonly': True}, + 'available_versions': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'available_versions': {'key': 'properties.availableVersions', 'type': '[str]'}, + 'available_scale_units': {'key': 'properties.availableScaleUnits', 'type': '[NetworkVirtualApplianceSkuInstances]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkVirtualApplianceSku, self).__init__(**kwargs) + self.etag = None + self.vendor = None + self.available_versions = None + self.available_scale_units = kwargs.get('available_scale_units', None) + + +class NetworkVirtualApplianceSkuInstances(msrest.serialization.Model): + """List of available Sku and instances. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar scale_unit: Scale Unit. + :vartype scale_unit: str + :ivar instance_count: Instance Count. + :vartype instance_count: int + """ + + _validation = { + 'scale_unit': {'readonly': True}, + 'instance_count': {'readonly': True}, + } + + _attribute_map = { + 'scale_unit': {'key': 'scaleUnit', 'type': 'str'}, + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkVirtualApplianceSkuInstances, self).__init__(**kwargs) + self.scale_unit = None + self.instance_count = None + + +class NetworkVirtualApplianceSkuListResult(msrest.serialization.Model): + """Response for ListNetworkVirtualApplianceSkus API service call. + + :param value: List of Network Virtual Appliance Skus that are available. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSku] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkVirtualApplianceSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkVirtualApplianceSkuListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class NetworkWatcher(Resource): + """Network watcher in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the network watcher resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkWatcher, self).__init__(**kwargs) + self.etag = None + self.provisioning_state = None + + +class NetworkWatcherListResult(msrest.serialization.Model): + """Response for ListNetworkWatchers API service call. + + :param value: List of network watcher resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkWatcher] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkWatcher]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkWatcherListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class NextHopParameters(msrest.serialization.Model): + """Parameters that define the source and destination endpoint. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The resource identifier of the target resource against + which the action is to be performed. + :type target_resource_id: str + :param source_ip_address: Required. The source IP address. + :type source_ip_address: str + :param destination_ip_address: Required. The destination IP address. + :type destination_ip_address: str + :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is + enabled on any of the nics, then this parameter must be specified. Otherwise optional). + :type target_nic_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'source_ip_address': {'required': True}, + 'destination_ip_address': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'source_ip_address': {'key': 'sourceIPAddress', 'type': 'str'}, + 'destination_ip_address': {'key': 'destinationIPAddress', 'type': 'str'}, + 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NextHopParameters, self).__init__(**kwargs) + self.target_resource_id = kwargs['target_resource_id'] + self.source_ip_address = kwargs['source_ip_address'] + self.destination_ip_address = kwargs['destination_ip_address'] + self.target_nic_resource_id = kwargs.get('target_nic_resource_id', None) + + +class NextHopResult(msrest.serialization.Model): + """The information about next hop from the specified VM. + + :param next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", + "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". + :type next_hop_type: str or ~azure.mgmt.network.v2021_05_01.models.NextHopType + :param next_hop_ip_address: Next hop IP Address. + :type next_hop_ip_address: str + :param route_table_id: The resource identifier for the route table associated with the route + being returned. If the route being returned does not correspond to any user created routes then + this field will be the string 'System Route'. + :type route_table_id: str + """ + + _attribute_map = { + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, + 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NextHopResult, self).__init__(**kwargs) + self.next_hop_type = kwargs.get('next_hop_type', None) + self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) + self.route_table_id = kwargs.get('route_table_id', None) + + +class O365BreakOutCategoryPolicies(msrest.serialization.Model): + """Office365 breakout categories. + + :param allow: Flag to control allow category. + :type allow: bool + :param optimize: Flag to control optimize category. + :type optimize: bool + :param default: Flag to control default category. + :type default: bool + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': 'bool'}, + 'optimize': {'key': 'optimize', 'type': 'bool'}, + 'default': {'key': 'default', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(O365BreakOutCategoryPolicies, self).__init__(**kwargs) + self.allow = kwargs.get('allow', None) + self.optimize = kwargs.get('optimize', None) + self.default = kwargs.get('default', None) + + +class O365PolicyProperties(msrest.serialization.Model): + """The Office365 breakout policy. + + :param break_out_categories: Office365 breakout categories. + :type break_out_categories: ~azure.mgmt.network.v2021_05_01.models.O365BreakOutCategoryPolicies + """ + + _attribute_map = { + 'break_out_categories': {'key': 'breakOutCategories', 'type': 'O365BreakOutCategoryPolicies'}, + } + + def __init__( + self, + **kwargs + ): + super(O365PolicyProperties, self).__init__(**kwargs) + self.break_out_categories = kwargs.get('break_out_categories', None) + + +class Office365PolicyProperties(msrest.serialization.Model): + """Network Virtual Appliance Sku Properties. + + :param break_out_categories: Office 365 breakout categories. + :type break_out_categories: ~azure.mgmt.network.v2021_05_01.models.BreakOutCategoryPolicies + """ + + _attribute_map = { + 'break_out_categories': {'key': 'breakOutCategories', 'type': 'BreakOutCategoryPolicies'}, + } + + def __init__( + self, + **kwargs + ): + super(Office365PolicyProperties, self).__init__(**kwargs) + self.break_out_categories = kwargs.get('break_out_categories', None) + + +class Operation(msrest.serialization.Model): + """Network REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.network.v2021_05_01.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param service_specification: Specification of the service. + :type service_specification: + ~azure.mgmt.network.v2021_05_01.models.OperationPropertiesFormatServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationPropertiesFormatServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.service_specification = kwargs.get('service_specification', None) + + +class OperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Network. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Type of the operation: get, read, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of results. + + :param value: List of Network operations supported by the Network resource provider. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Operation] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class OperationPropertiesFormatServiceSpecification(msrest.serialization.Model): + """Specification of the service. + + :param metric_specifications: Operation service specification. + :type metric_specifications: list[~azure.mgmt.network.v2021_05_01.models.MetricSpecification] + :param log_specifications: Operation log specification. + :type log_specifications: list[~azure.mgmt.network.v2021_05_01.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationPropertiesFormatServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = kwargs.get('metric_specifications', None) + self.log_specifications = kwargs.get('log_specifications', None) + + +class OrderBy(msrest.serialization.Model): + """Describes a column to sort. + + :param field: Describes the actual column name to sort by. + :type field: str + :param order: Describes if results should be in ascending/descending order. Possible values + include: "Ascending", "Descending". + :type order: str or ~azure.mgmt.network.v2021_05_01.models.OrderByOrder + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OrderBy, self).__init__(**kwargs) + self.field = kwargs.get('field', None) + self.order = kwargs.get('order', None) + + +class OutboundRule(SubResource): + """Outbound rule of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of outbound rules used by + the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param allocated_outbound_ports: The number of outbound ports to be used for NAT. + :type allocated_outbound_ports: int + :param frontend_ip_configurations: The Frontend IP addresses of the load balancer. + :type frontend_ip_configurations: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load + balanced across IPs in the backend IPs. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the outbound rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param protocol: The protocol for the outbound rule in load balancer. Possible values include: + "Tcp", "Udp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.LoadBalancerOutboundRuleProtocol + :param enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :type enable_tcp_reset: bool + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. + :type idle_timeout_in_minutes: int + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, + 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[SubResource]'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.allocated_outbound_ports = kwargs.get('allocated_outbound_ports', None) + self.frontend_ip_configurations = kwargs.get('frontend_ip_configurations', None) + self.backend_address_pool = kwargs.get('backend_address_pool', None) + self.provisioning_state = None + self.protocol = kwargs.get('protocol', None) + self.enable_tcp_reset = kwargs.get('enable_tcp_reset', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + + +class OwaspCrsExclusionEntry(msrest.serialization.Model): + """Allow to exclude some variable satisfy the condition for the WAF check. + + All required parameters must be populated in order to send to Azure. + + :param match_variable: Required. The variable to be excluded. Possible values include: + "RequestHeaderNames", "RequestCookieNames", "RequestArgNames", "RequestHeaderKeys", + "RequestHeaderValues", "RequestCookieKeys", "RequestCookieValues", "RequestArgKeys", + "RequestArgValues". + :type match_variable: str or + ~azure.mgmt.network.v2021_05_01.models.OwaspCrsExclusionEntryMatchVariable + :param selector_match_operator: Required. When matchVariable is a collection, operate on the + selector to specify which elements in the collection this exclusion applies to. Possible values + include: "Equals", "Contains", "StartsWith", "EndsWith", "EqualsAny". + :type selector_match_operator: str or + ~azure.mgmt.network.v2021_05_01.models.OwaspCrsExclusionEntrySelectorMatchOperator + :param selector: Required. When matchVariable is a collection, operator used to specify which + elements in the collection this exclusion applies to. + :type selector: str + :param exclusion_managed_rule_sets: The managed rule sets that are associated with the + exclusion. + :type exclusion_managed_rule_sets: + list[~azure.mgmt.network.v2021_05_01.models.ExclusionManagedRuleSet] + """ + + _validation = { + 'match_variable': {'required': True}, + 'selector_match_operator': {'required': True}, + 'selector': {'required': True}, + } + + _attribute_map = { + 'match_variable': {'key': 'matchVariable', 'type': 'str'}, + 'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'exclusion_managed_rule_sets': {'key': 'exclusionManagedRuleSets', 'type': '[ExclusionManagedRuleSet]'}, + } + + def __init__( + self, + **kwargs + ): + super(OwaspCrsExclusionEntry, self).__init__(**kwargs) + self.match_variable = kwargs['match_variable'] + self.selector_match_operator = kwargs['selector_match_operator'] + self.selector = kwargs['selector'] + self.exclusion_managed_rule_sets = kwargs.get('exclusion_managed_rule_sets', None) + + +class P2SConnectionConfiguration(SubResource): + """P2SConnectionConfiguration Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param vpn_client_address_pool: The reference to the address space resource which represents + Address space for P2S VpnClient. + :type vpn_client_address_pool: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :type routing_configuration: ~azure.mgmt.network.v2021_05_01.models.RoutingConfiguration + :param enable_internet_security: Flag indicating whether the enable internet security flag is + turned on for the P2S Connections or not. + :type enable_internet_security: bool + :ivar provisioning_state: The provisioning state of the P2SConnectionConfiguration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'vpn_client_address_pool': {'key': 'properties.vpnClientAddressPool', 'type': 'AddressSpace'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(P2SConnectionConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.vpn_client_address_pool = kwargs.get('vpn_client_address_pool', None) + self.routing_configuration = kwargs.get('routing_configuration', None) + self.enable_internet_security = kwargs.get('enable_internet_security', None) + self.provisioning_state = None + + +class P2SVpnConnectionHealth(msrest.serialization.Model): + """P2S Vpn connection detailed health written to sas url. + + :param sas_url: Returned sas url of the blob to which the p2s vpn connection detailed health + will be written. + :type sas_url: str + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(P2SVpnConnectionHealth, self).__init__(**kwargs) + self.sas_url = kwargs.get('sas_url', None) + + +class P2SVpnConnectionHealthRequest(msrest.serialization.Model): + """List of P2S Vpn connection health request. + + :param vpn_user_names_filter: The list of p2s vpn user names whose p2s vpn connection detailed + health to retrieve for. + :type vpn_user_names_filter: list[str] + :param output_blob_sas_url: The sas-url to download the P2S Vpn connection health detail. + :type output_blob_sas_url: str + """ + + _attribute_map = { + 'vpn_user_names_filter': {'key': 'vpnUserNamesFilter', 'type': '[str]'}, + 'output_blob_sas_url': {'key': 'outputBlobSasUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(P2SVpnConnectionHealthRequest, self).__init__(**kwargs) + self.vpn_user_names_filter = kwargs.get('vpn_user_names_filter', None) + self.output_blob_sas_url = kwargs.get('output_blob_sas_url', None) + + +class P2SVpnConnectionRequest(msrest.serialization.Model): + """List of p2s vpn connections to be disconnected. + + :param vpn_connection_ids: List of p2s vpn connection Ids. + :type vpn_connection_ids: list[str] + """ + + _attribute_map = { + 'vpn_connection_ids': {'key': 'vpnConnectionIds', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(P2SVpnConnectionRequest, self).__init__(**kwargs) + self.vpn_connection_ids = kwargs.get('vpn_connection_ids', None) + + +class P2SVpnGateway(Resource): + """P2SVpnGateway Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param virtual_hub: The VirtualHub to which the gateway belongs. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param p2_s_connection_configurations: List of all p2s connection configurations of the + gateway. + :type p2_s_connection_configurations: + list[~azure.mgmt.network.v2021_05_01.models.P2SConnectionConfiguration] + :ivar provisioning_state: The provisioning state of the P2S VPN gateway resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param vpn_gateway_scale_unit: The scale unit for this p2s vpn gateway. + :type vpn_gateway_scale_unit: int + :param vpn_server_configuration: The VpnServerConfiguration to which the p2sVpnGateway is + attached to. + :type vpn_server_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar vpn_client_connection_health: All P2S VPN clients' connection health status. + :vartype vpn_client_connection_health: + ~azure.mgmt.network.v2021_05_01.models.VpnClientConnectionHealth + :param custom_dns_servers: List of all customer specified DNS servers IP addresses. + :type custom_dns_servers: list[str] + :param is_routing_preference_internet: Enable Routing Preference property for the Public IP + Interface of the P2SVpnGateway. + :type is_routing_preference_internet: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'vpn_client_connection_health': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'p2_s_connection_configurations': {'key': 'properties.p2SConnectionConfigurations', 'type': '[P2SConnectionConfiguration]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'vpn_gateway_scale_unit': {'key': 'properties.vpnGatewayScaleUnit', 'type': 'int'}, + 'vpn_server_configuration': {'key': 'properties.vpnServerConfiguration', 'type': 'SubResource'}, + 'vpn_client_connection_health': {'key': 'properties.vpnClientConnectionHealth', 'type': 'VpnClientConnectionHealth'}, + 'custom_dns_servers': {'key': 'properties.customDnsServers', 'type': '[str]'}, + 'is_routing_preference_internet': {'key': 'properties.isRoutingPreferenceInternet', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(P2SVpnGateway, self).__init__(**kwargs) + self.etag = None + self.virtual_hub = kwargs.get('virtual_hub', None) + self.p2_s_connection_configurations = kwargs.get('p2_s_connection_configurations', None) + self.provisioning_state = None + self.vpn_gateway_scale_unit = kwargs.get('vpn_gateway_scale_unit', None) + self.vpn_server_configuration = kwargs.get('vpn_server_configuration', None) + self.vpn_client_connection_health = None + self.custom_dns_servers = kwargs.get('custom_dns_servers', None) + self.is_routing_preference_internet = kwargs.get('is_routing_preference_internet', None) + + +class P2SVpnProfileParameters(msrest.serialization.Model): + """Vpn Client Parameters for package generation. + + :param authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :type authentication_method: str or ~azure.mgmt.network.v2021_05_01.models.AuthenticationMethod + """ + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(P2SVpnProfileParameters, self).__init__(**kwargs) + self.authentication_method = kwargs.get('authentication_method', None) + + +class PacketCapture(msrest.serialization.Model): + """Parameters that define the create packet capture operation. + + All required parameters must be populated in order to send to Azure. + + :param target: Required. The ID of the targeted resource, only VM is currently supported. + :type target: str + :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :type bytes_to_capture_per_packet: long + :param total_bytes_per_session: Maximum size of the capture output. + :type total_bytes_per_session: long + :param time_limit_in_seconds: Maximum duration of the capture session in seconds. + :type time_limit_in_seconds: int + :param storage_location: Required. The storage location for a packet capture session. + :type storage_location: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureStorageLocation + :param filters: A list of packet capture filters. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureFilter] + """ + + _validation = { + 'target': {'required': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'storage_location': {'required': True}, + } + + _attribute_map = { + 'target': {'key': 'properties.target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, + } + + def __init__( + self, + **kwargs + ): + super(PacketCapture, self).__init__(**kwargs) + self.target = kwargs['target'] + self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) + self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) + self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) + self.storage_location = kwargs['storage_location'] + self.filters = kwargs.get('filters', None) + + +class PacketCaptureFilter(msrest.serialization.Model): + """Filter that is applied to packet capture request. Multiple filters can be applied. + + :param protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". + Default value: "Any". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.PcProtocol + :param local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single + address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. + Multiple ranges not currently supported. Mixing ranges with multiple entries not currently + supported. Default = null. + :type local_ip_address: str + :param remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single + address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. + Multiple ranges not currently supported. Mixing ranges with multiple entries not currently + supported. Default = null. + :type remote_ip_address: str + :param local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" + for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing + ranges with multiple entries not currently supported. Default = null. + :type local_port: str + :param remote_port: Remote port to be filtered on. Notation: "80" for single port entry."80-85" + for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing + ranges with multiple entries not currently supported. Default = null. + :type remote_port: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, + 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, + 'local_port': {'key': 'localPort', 'type': 'str'}, + 'remote_port': {'key': 'remotePort', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PacketCaptureFilter, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', "Any") + self.local_ip_address = kwargs.get('local_ip_address', None) + self.remote_ip_address = kwargs.get('remote_ip_address', None) + self.local_port = kwargs.get('local_port', None) + self.remote_port = kwargs.get('remote_port', None) + + +class PacketCaptureListResult(msrest.serialization.Model): + """List of packet capture sessions. + + :param value: Information about packet capture sessions. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(PacketCaptureListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PacketCaptureParameters(msrest.serialization.Model): + """Parameters that define the create packet capture operation. + + All required parameters must be populated in order to send to Azure. + + :param target: Required. The ID of the targeted resource, only VM is currently supported. + :type target: str + :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :type bytes_to_capture_per_packet: long + :param total_bytes_per_session: Maximum size of the capture output. + :type total_bytes_per_session: long + :param time_limit_in_seconds: Maximum duration of the capture session in seconds. + :type time_limit_in_seconds: int + :param storage_location: Required. The storage location for a packet capture session. + :type storage_location: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureStorageLocation + :param filters: A list of packet capture filters. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureFilter] + """ + + _validation = { + 'target': {'required': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'storage_location': {'required': True}, + } + + _attribute_map = { + 'target': {'key': 'target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, + } + + def __init__( + self, + **kwargs + ): + super(PacketCaptureParameters, self).__init__(**kwargs) + self.target = kwargs['target'] + self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) + self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) + self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) + self.storage_location = kwargs['storage_location'] + self.filters = kwargs.get('filters', None) + + +class PacketCaptureQueryStatusResult(msrest.serialization.Model): + """Status of packet capture session. + + :param name: The name of the packet capture resource. + :type name: str + :param id: The ID of the packet capture resource. + :type id: str + :param capture_start_time: The start time of the packet capture session. + :type capture_start_time: ~datetime.datetime + :param packet_capture_status: The status of the packet capture session. Possible values + include: "NotStarted", "Running", "Stopped", "Error", "Unknown". + :type packet_capture_status: str or ~azure.mgmt.network.v2021_05_01.models.PcStatus + :param stop_reason: The reason the current packet capture session was stopped. + :type stop_reason: str + :param packet_capture_error: List of errors of packet capture session. + :type packet_capture_error: list[str or ~azure.mgmt.network.v2021_05_01.models.PcError] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'capture_start_time': {'key': 'captureStartTime', 'type': 'iso-8601'}, + 'packet_capture_status': {'key': 'packetCaptureStatus', 'type': 'str'}, + 'stop_reason': {'key': 'stopReason', 'type': 'str'}, + 'packet_capture_error': {'key': 'packetCaptureError', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PacketCaptureQueryStatusResult, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.capture_start_time = kwargs.get('capture_start_time', None) + self.packet_capture_status = kwargs.get('packet_capture_status', None) + self.stop_reason = kwargs.get('stop_reason', None) + self.packet_capture_error = kwargs.get('packet_capture_error', None) + + +class PacketCaptureResult(msrest.serialization.Model): + """Information about packet capture session. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the packet capture session. + :vartype name: str + :ivar id: ID of the packet capture operation. + :vartype id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param target: The ID of the targeted resource, only VM is currently supported. + :type target: str + :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :type bytes_to_capture_per_packet: long + :param total_bytes_per_session: Maximum size of the capture output. + :type total_bytes_per_session: long + :param time_limit_in_seconds: Maximum duration of the capture session in seconds. + :type time_limit_in_seconds: int + :param storage_location: The storage location for a packet capture session. + :type storage_location: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureStorageLocation + :param filters: A list of packet capture filters. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureFilter] + :ivar provisioning_state: The provisioning state of the packet capture session. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'etag': {'readonly': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PacketCaptureResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.etag = None + self.target = kwargs.get('target', None) + self.bytes_to_capture_per_packet = kwargs.get('bytes_to_capture_per_packet', 0) + self.total_bytes_per_session = kwargs.get('total_bytes_per_session', 1073741824) + self.time_limit_in_seconds = kwargs.get('time_limit_in_seconds', 18000) + self.storage_location = kwargs.get('storage_location', None) + self.filters = kwargs.get('filters', None) + self.provisioning_state = None + + +class PacketCaptureResultProperties(PacketCaptureParameters): + """The properties of a packet capture session. + + 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 target: Required. The ID of the targeted resource, only VM is currently supported. + :type target: str + :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :type bytes_to_capture_per_packet: long + :param total_bytes_per_session: Maximum size of the capture output. + :type total_bytes_per_session: long + :param time_limit_in_seconds: Maximum duration of the capture session in seconds. + :type time_limit_in_seconds: int + :param storage_location: Required. The storage location for a packet capture session. + :type storage_location: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureStorageLocation + :param filters: A list of packet capture filters. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureFilter] + :ivar provisioning_state: The provisioning state of the packet capture session. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'target': {'required': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'storage_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'target': {'key': 'target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PacketCaptureResultProperties, self).__init__(**kwargs) + self.provisioning_state = None + + +class PacketCaptureStorageLocation(msrest.serialization.Model): + """The storage location for a packet capture session. + + :param storage_id: The ID of the storage account to save the packet capture session. Required + if no local file path is provided. + :type storage_id: str + :param storage_path: The URI of the storage path to save the packet capture. Must be a + well-formed URI describing the location to save the packet capture. + :type storage_path: str + :param file_path: A valid local path on the targeting VM. Must include the name of the capture + file (*.cap). For linux virtual machine it must start with /var/captures. Required if no + storage ID is provided, otherwise optional. + :type file_path: str + """ + + _attribute_map = { + 'storage_id': {'key': 'storageId', 'type': 'str'}, + 'storage_path': {'key': 'storagePath', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PacketCaptureStorageLocation, self).__init__(**kwargs) + self.storage_id = kwargs.get('storage_id', None) + self.storage_path = kwargs.get('storage_path', None) + self.file_path = kwargs.get('file_path', None) + + +class PatchRouteFilter(SubResource): + """Route Filter Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param rules: Collection of RouteFilterRules contained within a route filter. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.RouteFilterRule] + :ivar peerings: A collection of references to express route circuit peerings. + :vartype peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :ivar ipv6_peerings: A collection of references to express route circuit ipv6 peerings. + :vartype ipv6_peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :ivar provisioning_state: The provisioning state of the route filter resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peerings': {'readonly': True}, + 'ipv6_peerings': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'ipv6_peerings': {'key': 'properties.ipv6Peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PatchRouteFilter, self).__init__(**kwargs) + self.name = None + self.etag = None + self.type = None + self.tags = kwargs.get('tags', None) + self.rules = kwargs.get('rules', None) + self.peerings = None + self.ipv6_peerings = None + self.provisioning_state = None + + +class PatchRouteFilterRule(SubResource): + """Route Filter Rule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param access: The access type of the rule. Possible values include: "Allow", "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.Access + :param route_filter_rule_type: The rule type of the rule. Possible values include: "Community". + :type route_filter_rule_type: str or ~azure.mgmt.network.v2021_05_01.models.RouteFilterRuleType + :param communities: The collection for bgp community values to filter on. e.g. + ['12076:5010','12076:5020']. + :type communities: list[str] + :ivar provisioning_state: The provisioning state of the route filter rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, + 'communities': {'key': 'properties.communities', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PatchRouteFilterRule, self).__init__(**kwargs) + self.name = None + self.etag = None + self.access = kwargs.get('access', None) + self.route_filter_rule_type = kwargs.get('route_filter_rule_type', None) + self.communities = kwargs.get('communities', None) + self.provisioning_state = None + + +class PeerExpressRouteCircuitConnection(SubResource): + """Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the circuit. + :type express_route_circuit_peering: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param peer_express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the peered circuit. + :type peer_express_route_circuit_peering: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param address_prefix: /29 IP address space to carve out Customer addresses for tunnels. + :type address_prefix: str + :ivar circuit_connection_status: Express Route Circuit connection state. Possible values + include: "Connected", "Connecting", "Disconnected". + :vartype circuit_connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.CircuitConnectionStatus + :param connection_name: The name of the express route circuit connection resource. + :type connection_name: str + :param auth_resource_guid: The resource guid of the authorization used for the express route + circuit connection. + :type auth_resource_guid: str + :ivar provisioning_state: The provisioning state of the peer express route circuit connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'circuit_connection_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'express_route_circuit_peering': {'key': 'properties.expressRouteCircuitPeering', 'type': 'SubResource'}, + 'peer_express_route_circuit_peering': {'key': 'properties.peerExpressRouteCircuitPeering', 'type': 'SubResource'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, + 'connection_name': {'key': 'properties.connectionName', 'type': 'str'}, + 'auth_resource_guid': {'key': 'properties.authResourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PeerExpressRouteCircuitConnection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.express_route_circuit_peering = kwargs.get('express_route_circuit_peering', None) + self.peer_express_route_circuit_peering = kwargs.get('peer_express_route_circuit_peering', None) + self.address_prefix = kwargs.get('address_prefix', None) + self.circuit_connection_status = None + self.connection_name = kwargs.get('connection_name', None) + self.auth_resource_guid = kwargs.get('auth_resource_guid', None) + self.provisioning_state = None + + +class PeerExpressRouteCircuitConnectionListResult(msrest.serialization.Model): + """Response for ListPeeredConnections API service call retrieves all global reach peer circuit connections that belongs to a Private Peering for an ExpressRouteCircuit. + + :param value: The global reach peer circuit connection associated with Private Peering in an + ExpressRoute Circuit. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PeerExpressRouteCircuitConnection] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PeerExpressRouteCircuitConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PeerExpressRouteCircuitConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PeerRoute(msrest.serialization.Model): + """Peer routing details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar local_address: The peer's local address. + :vartype local_address: str + :ivar network: The route's network prefix. + :vartype network: str + :ivar next_hop: The route's next hop. + :vartype next_hop: str + :ivar source_peer: The peer this route was learned from. + :vartype source_peer: str + :ivar origin: The source this route was learned from. + :vartype origin: str + :ivar as_path: The route's AS path sequence. + :vartype as_path: str + :ivar weight: The route's weight. + :vartype weight: int + """ + + _validation = { + 'local_address': {'readonly': True}, + 'network': {'readonly': True}, + 'next_hop': {'readonly': True}, + 'source_peer': {'readonly': True}, + 'origin': {'readonly': True}, + 'as_path': {'readonly': True}, + 'weight': {'readonly': True}, + } + + _attribute_map = { + 'local_address': {'key': 'localAddress', 'type': 'str'}, + 'network': {'key': 'network', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'as_path': {'key': 'asPath', 'type': 'str'}, + 'weight': {'key': 'weight', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(PeerRoute, self).__init__(**kwargs) + self.local_address = None + self.network = None + self.next_hop = None + self.source_peer = None + self.origin = None + self.as_path = None + self.weight = None + + +class PeerRouteList(msrest.serialization.Model): + """List of virtual router peer routes. + + :param value: List of peer routes. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PeerRoute] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PeerRoute]'}, + } + + def __init__( + self, + **kwargs + ): + super(PeerRouteList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PolicySettings(msrest.serialization.Model): + """Defines contents of a web application firewall global configuration. + + :param state: The state of the policy. Possible values include: "Disabled", "Enabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallEnabledState + :param mode: The mode of the policy. Possible values include: "Prevention", "Detection". + :type mode: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallMode + :param request_body_check: Whether to allow WAF to check request Body. + :type request_body_check: bool + :param max_request_body_size_in_kb: Maximum request body size in Kb for WAF. + :type max_request_body_size_in_kb: int + :param file_upload_limit_in_mb: Maximum file upload size in Mb for WAF. + :type file_upload_limit_in_mb: int + """ + + _validation = { + 'max_request_body_size_in_kb': {'minimum': 8}, + 'file_upload_limit_in_mb': {'minimum': 0}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'request_body_check': {'key': 'requestBodyCheck', 'type': 'bool'}, + 'max_request_body_size_in_kb': {'key': 'maxRequestBodySizeInKb', 'type': 'int'}, + 'file_upload_limit_in_mb': {'key': 'fileUploadLimitInMb', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(PolicySettings, self).__init__(**kwargs) + self.state = kwargs.get('state', None) + self.mode = kwargs.get('mode', None) + self.request_body_check = kwargs.get('request_body_check', None) + self.max_request_body_size_in_kb = kwargs.get('max_request_body_size_in_kb', None) + self.file_upload_limit_in_mb = kwargs.get('file_upload_limit_in_mb', None) + + +class PrepareNetworkPoliciesRequest(msrest.serialization.Model): + """Details of PrepareNetworkPolicies for Subnet. + + :param service_name: The name of the service for which subnet is being prepared for. + :type service_name: str + :param network_intent_policy_configurations: A list of NetworkIntentPolicyConfiguration. + :type network_intent_policy_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkIntentPolicyConfiguration] + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'network_intent_policy_configurations': {'key': 'networkIntentPolicyConfigurations', 'type': '[NetworkIntentPolicyConfiguration]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrepareNetworkPoliciesRequest, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.network_intent_policy_configurations = kwargs.get('network_intent_policy_configurations', None) + + +class PrivateDnsZoneConfig(msrest.serialization.Model): + """PrivateDnsZoneConfig resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :param private_dns_zone_id: The resource id of the private dns zone. + :type private_dns_zone_id: str + :ivar record_sets: A collection of information regarding a recordSet, holding information to + identify private resources. + :vartype record_sets: list[~azure.mgmt.network.v2021_05_01.models.RecordSet] + """ + + _validation = { + 'record_sets': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_dns_zone_id': {'key': 'properties.privateDnsZoneId', 'type': 'str'}, + 'record_sets': {'key': 'properties.recordSets', 'type': '[RecordSet]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateDnsZoneConfig, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.private_dns_zone_id = kwargs.get('private_dns_zone_id', None) + self.record_sets = None + + +class PrivateDnsZoneGroup(SubResource): + """Private dns zone group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the private dns zone group resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_dns_zone_configs: A collection of private dns zone configurations of the private + dns zone group. + :type private_dns_zone_configs: + list[~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneConfig] + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_dns_zone_configs': {'key': 'properties.privateDnsZoneConfigs', 'type': '[PrivateDnsZoneConfig]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateDnsZoneGroup, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.provisioning_state = None + self.private_dns_zone_configs = kwargs.get('private_dns_zone_configs', None) + + +class PrivateDnsZoneGroupListResult(msrest.serialization.Model): + """Response for the ListPrivateDnsZoneGroups API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of private dns zone group resources in a private endpoint. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateDnsZoneGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateDnsZoneGroupListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class PrivateEndpoint(Resource): + """Private endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the load balancer. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param subnet: The ID of the subnet from which the private IP will be allocated. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :ivar network_interfaces: An array of references to the network interfaces created for this + private endpoint. + :vartype network_interfaces: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar provisioning_state: The provisioning state of the private endpoint resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_link_service_connections: A grouping of information about the connection to the + remote resource. + :type private_link_service_connections: + list[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnection] + :param manual_private_link_service_connections: A grouping of information about the connection + to the remote resource. Used when the network admin does not have access to approve connections + to the remote resource. + :type manual_private_link_service_connections: + list[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnection] + :param custom_dns_configs: An array of custom dns configurations. + :type custom_dns_configs: + list[~azure.mgmt.network.v2021_05_01.models.CustomDnsConfigPropertiesFormat] + :param application_security_groups: Application security groups in which the private endpoint + IP configuration is included. + :type application_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :param ip_configurations: A list of IP configurations of the private endpoint. This will be + used to map to the First Party Service's endpoints. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointIPConfiguration] + :param custom_network_interface_name: The custom name of the network interface attached to the + private endpoint. + :type custom_network_interface_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'network_interfaces': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_link_service_connections': {'key': 'properties.privateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'}, + 'manual_private_link_service_connections': {'key': 'properties.manualPrivateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'}, + 'custom_dns_configs': {'key': 'properties.customDnsConfigs', 'type': '[CustomDnsConfigPropertiesFormat]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[PrivateEndpointIPConfiguration]'}, + 'custom_network_interface_name': {'key': 'properties.customNetworkInterfaceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.etag = None + self.subnet = kwargs.get('subnet', None) + self.network_interfaces = None + self.provisioning_state = None + self.private_link_service_connections = kwargs.get('private_link_service_connections', None) + self.manual_private_link_service_connections = kwargs.get('manual_private_link_service_connections', None) + self.custom_dns_configs = kwargs.get('custom_dns_configs', None) + self.application_security_groups = kwargs.get('application_security_groups', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.custom_network_interface_name = kwargs.get('custom_network_interface_name', None) + + +class PrivateEndpointConnection(SubResource): + """PrivateEndpointConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar link_identifier: The consumer link id. + :vartype link_identifier: str + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'link_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'link_identifier': {'key': 'properties.linkIdentifier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None + self.etag = None + self.private_endpoint = None + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + self.link_identifier = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """Response for the ListPrivateEndpointConnection API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of PrivateEndpointConnection resources for a specific private link + service. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class PrivateEndpointIPConfiguration(msrest.serialization.Model): + """An IP Configuration of the private endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: The name of the resource that is unique within a resource group. + :type name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param group_id: The ID of a group obtained from the remote resource that this private endpoint + should connect to. + :type group_id: str + :param member_name: The member name of a group obtained from the remote resource that this + private endpoint should connect to. + :type member_name: str + :param private_ip_address: A private ip address obtained from the private endpoint's subnet. + :type private_ip_address: str + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'member_name': {'key': 'properties.memberName', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None + self.etag = None + self.group_id = kwargs.get('group_id', None) + self.member_name = kwargs.get('member_name', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + + +class PrivateEndpointListResult(msrest.serialization.Model): + """Response for the ListPrivateEndpoints API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of private endpoint resources in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class PrivateLinkService(Resource): + """Private link service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the load balancer. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param load_balancer_frontend_ip_configurations: An array of references to the load balancer IP + configurations. + :type load_balancer_frontend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration] + :param ip_configurations: An array of private link service IP configurations. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceIpConfiguration] + :ivar network_interfaces: An array of references to the network interfaces created for this + private link service. + :vartype network_interfaces: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar provisioning_state: The provisioning state of the private link service resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar private_endpoint_connections: An array of list about connections to the private endpoint. + :vartype private_endpoint_connections: + list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection] + :param visibility: The visibility list of the private link service. + :type visibility: ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServicePropertiesVisibility + :param auto_approval: The auto-approval list of the private link service. + :type auto_approval: + ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServicePropertiesAutoApproval + :param fqdns: The list of Fqdn. + :type fqdns: list[str] + :ivar alias: The alias of the private link service. + :vartype alias: str + :param enable_proxy_protocol: Whether the private link service is enabled for proxy protocol or + not. + :type enable_proxy_protocol: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'network_interfaces': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'alias': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'load_balancer_frontend_ip_configurations': {'key': 'properties.loadBalancerFrontendIpConfigurations', 'type': '[FrontendIPConfiguration]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[PrivateLinkServiceIpConfiguration]'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'visibility': {'key': 'properties.visibility', 'type': 'PrivateLinkServicePropertiesVisibility'}, + 'auto_approval': {'key': 'properties.autoApproval', 'type': 'PrivateLinkServicePropertiesAutoApproval'}, + 'fqdns': {'key': 'properties.fqdns', 'type': '[str]'}, + 'alias': {'key': 'properties.alias', 'type': 'str'}, + 'enable_proxy_protocol': {'key': 'properties.enableProxyProtocol', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkService, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.etag = None + self.load_balancer_frontend_ip_configurations = kwargs.get('load_balancer_frontend_ip_configurations', None) + self.ip_configurations = kwargs.get('ip_configurations', None) + self.network_interfaces = None + self.provisioning_state = None + self.private_endpoint_connections = None + self.visibility = kwargs.get('visibility', None) + self.auto_approval = kwargs.get('auto_approval', None) + self.fqdns = kwargs.get('fqdns', None) + self.alias = None + self.enable_proxy_protocol = kwargs.get('enable_proxy_protocol', None) + + +class PrivateLinkServiceConnection(SubResource): + """PrivateLinkServiceConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the private link service connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_link_service_id: The resource id of private link service. + :type private_link_service_id: str + :param group_ids: The ID(s) of the group(s) obtained from the remote resource that this private + endpoint should connect to. + :type group_ids: list[str] + :param request_message: A message passed to the owner of the remote resource with this + connection request. Restricted to 140 chars. + :type request_message: str + :param private_link_service_connection_state: A collection of read-only information about the + state of the connection to the remote resource. + :type private_link_service_connection_state: + ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_link_service_id': {'key': 'properties.privateLinkServiceId', 'type': 'str'}, + 'group_ids': {'key': 'properties.groupIds', 'type': '[str]'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.type = None + self.etag = None + self.provisioning_state = None + self.private_link_service_id = kwargs.get('private_link_service_id', None) + self.group_ids = kwargs.get('group_ids', None) + self.request_message = kwargs.get('request_message', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. + :type status: str + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class PrivateLinkServiceIpConfiguration(SubResource): + """The private link service ip configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of private link service ip configuration. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param primary: Whether the ip configuration is primary or not. + :type primary: bool + :ivar provisioning_state: The provisioning state of the private link service IP configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_ip_address_version: Whether the specific IP configuration is IPv4 or IPv6. + Default is IPv4. Possible values include: "IPv4", "IPv6". + :type private_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceIpConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.private_ip_address = kwargs.get('private_ip_address', None) + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.subnet = kwargs.get('subnet', None) + self.primary = kwargs.get('primary', None) + self.provisioning_state = None + self.private_ip_address_version = kwargs.get('private_ip_address_version', None) + + +class PrivateLinkServiceListResult(msrest.serialization.Model): + """Response for the ListPrivateLinkService API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of PrivateLinkService resources in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PrivateLinkService] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ResourceSet(msrest.serialization.Model): + """The base resource set for visibility and auto-approval. + + :param subscriptions: The list of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSet, self).__init__(**kwargs) + self.subscriptions = kwargs.get('subscriptions', None) + + +class PrivateLinkServicePropertiesAutoApproval(ResourceSet): + """The auto-approval list of the private link service. + + :param subscriptions: The list of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServicePropertiesAutoApproval, self).__init__(**kwargs) + + +class PrivateLinkServicePropertiesVisibility(ResourceSet): + """The visibility list of the private link service. + + :param subscriptions: The list of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServicePropertiesVisibility, self).__init__(**kwargs) + + +class PrivateLinkServiceVisibility(msrest.serialization.Model): + """Response for the CheckPrivateLinkServiceVisibility API service call. + + :param visible: Private Link Service Visibility (True/False). + :type visible: bool + """ + + _attribute_map = { + 'visible': {'key': 'visible', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceVisibility, self).__init__(**kwargs) + self.visible = kwargs.get('visible', None) + + +class Probe(SubResource): + """A load balancer probe. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of probes used by the load + balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar load_balancing_rules: The load balancer rules that use this probe. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param protocol: The protocol of the end point. If 'Tcp' is specified, a received ACK is + required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response + from the specifies URI is required for the probe to be successful. Possible values include: + "Http", "Tcp", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ProbeProtocol + :param port: The port for communicating the probe. Possible values range from 1 to 65535, + inclusive. + :type port: int + :param interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint + for health status. Typically, the interval is slightly less than half the allocated timeout + period (in seconds) which allows two full probes before taking the instance out of rotation. + The default value is 15, the minimum value is 5. + :type interval_in_seconds: int + :param number_of_probes: The number of probes where if no response, will result in stopping + further traffic from being delivered to the endpoint. This values allows endpoints to be taken + out of rotation faster or slower than the typical times used in Azure. + :type number_of_probes: int + :param request_path: The URI used for requesting health status from the VM. Path is required if + a protocol is set to http. Otherwise, it is not allowed. There is no default value. + :type request_path: str + :ivar provisioning_state: The provisioning state of the probe resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'load_balancing_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, + 'number_of_probes': {'key': 'properties.numberOfProbes', 'type': 'int'}, + 'request_path': {'key': 'properties.requestPath', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Probe, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.load_balancing_rules = None + self.protocol = kwargs.get('protocol', None) + self.port = kwargs.get('port', None) + self.interval_in_seconds = kwargs.get('interval_in_seconds', None) + self.number_of_probes = kwargs.get('number_of_probes', None) + self.request_path = kwargs.get('request_path', None) + self.provisioning_state = None + + +class PropagatedRouteTable(msrest.serialization.Model): + """The list of RouteTables to advertise the routes to. + + :param labels: The list of labels. + :type labels: list[str] + :param ids: The list of resource ids of all the RouteTables. + :type ids: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _attribute_map = { + 'labels': {'key': 'labels', 'type': '[str]'}, + 'ids': {'key': 'ids', 'type': '[SubResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PropagatedRouteTable, self).__init__(**kwargs) + self.labels = kwargs.get('labels', None) + self.ids = kwargs.get('ids', None) + + +class ProtocolConfiguration(msrest.serialization.Model): + """Configuration of the protocol. + + :param http_configuration: HTTP configuration of the connectivity check. + :type http_configuration: ~azure.mgmt.network.v2021_05_01.models.HTTPConfiguration + """ + + _attribute_map = { + 'http_configuration': {'key': 'HTTPConfiguration', 'type': 'HTTPConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ProtocolConfiguration, self).__init__(**kwargs) + self.http_configuration = kwargs.get('http_configuration', None) + + +class ProtocolCustomSettingsFormat(msrest.serialization.Model): + """DDoS custom policy properties. + + :param protocol: The protocol for which the DDoS protection policy is being customized. + Possible values include: "Tcp", "Udp", "Syn". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicyProtocol + :param trigger_rate_override: The customized DDoS protection trigger rate. + :type trigger_rate_override: str + :param source_rate_override: The customized DDoS protection source rate. + :type source_rate_override: str + :param trigger_sensitivity_override: The customized DDoS protection trigger rate sensitivity + degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger + rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less + sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. + normal traffic. Possible values include: "Relaxed", "Low", "Default", "High". + :type trigger_sensitivity_override: str or + ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicyTriggerSensitivityOverride + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'trigger_rate_override': {'key': 'triggerRateOverride', 'type': 'str'}, + 'source_rate_override': {'key': 'sourceRateOverride', 'type': 'str'}, + 'trigger_sensitivity_override': {'key': 'triggerSensitivityOverride', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ProtocolCustomSettingsFormat, self).__init__(**kwargs) + self.protocol = kwargs.get('protocol', None) + self.trigger_rate_override = kwargs.get('trigger_rate_override', None) + self.source_rate_override = kwargs.get('source_rate_override', None) + self.trigger_sensitivity_override = kwargs.get('trigger_sensitivity_override', None) + + +class PublicIPAddress(Resource): + """Public IP address resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the public ip address. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :param sku: The public IP address SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :type zones: list[str] + :param public_ip_allocation_method: The public IP address allocation method. Possible values + include: "Static", "Dynamic". + :type public_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param public_ip_address_version: The public IP address version. Possible values include: + "IPv4", "IPv6". + :type public_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :ivar ip_configuration: The IP configuration associated with the public IP address. + :vartype ip_configuration: ~azure.mgmt.network.v2021_05_01.models.IPConfiguration + :param dns_settings: The FQDN of the DNS record associated with the public IP address. + :type dns_settings: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressDnsSettings + :param ddos_settings: The DDoS protection custom policy associated with the public IP address. + :type ddos_settings: ~azure.mgmt.network.v2021_05_01.models.DdosSettings + :param ip_tags: The list of tags associated with the public IP address. + :type ip_tags: list[~azure.mgmt.network.v2021_05_01.models.IpTag] + :param ip_address: The IP address associated with the public IP address resource. + :type ip_address: str + :param public_ip_prefix: The Public IP Prefix this Public IP Address should be allocated from. + :type public_ip_prefix: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :ivar resource_guid: The resource GUID property of the public IP address resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the public IP address resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param service_public_ip_address: The service public IP address of the public IP address + resource. + :type service_public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :param nat_gateway: The NatGateway for the Public IP address. + :type nat_gateway: ~azure.mgmt.network.v2021_05_01.models.NatGateway + :param migration_phase: Migration phase of Public IP Address. Possible values include: "None", + "Prepare", "Commit", "Abort", "Committed". + :type migration_phase: str or + ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressMigrationPhase + :param linked_public_ip_address: The linked public IP address of the public IP address + resource. + :type linked_public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :param delete_option: Specify what happens to the public IP address when the VM using it is + deleted. Possible values include: "Delete", "Detach". + :type delete_option: str or ~azure.mgmt.network.v2021_05_01.models.DeleteOptions + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'ip_configuration': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'sku': {'key': 'sku', 'type': 'PublicIPAddressSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'public_ip_allocation_method': {'key': 'properties.publicIPAllocationMethod', 'type': 'str'}, + 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, + 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, + 'ddos_settings': {'key': 'properties.ddosSettings', 'type': 'DdosSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'service_public_ip_address': {'key': 'properties.servicePublicIPAddress', 'type': 'PublicIPAddress'}, + 'nat_gateway': {'key': 'properties.natGateway', 'type': 'NatGateway'}, + 'migration_phase': {'key': 'properties.migrationPhase', 'type': 'str'}, + 'linked_public_ip_address': {'key': 'properties.linkedPublicIPAddress', 'type': 'PublicIPAddress'}, + 'delete_option': {'key': 'properties.deleteOption', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicIPAddress, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.sku = kwargs.get('sku', None) + self.etag = None + self.zones = kwargs.get('zones', None) + self.public_ip_allocation_method = kwargs.get('public_ip_allocation_method', None) + self.public_ip_address_version = kwargs.get('public_ip_address_version', None) + self.ip_configuration = None + self.dns_settings = kwargs.get('dns_settings', None) + self.ddos_settings = kwargs.get('ddos_settings', None) + self.ip_tags = kwargs.get('ip_tags', None) + self.ip_address = kwargs.get('ip_address', None) + self.public_ip_prefix = kwargs.get('public_ip_prefix', None) + self.idle_timeout_in_minutes = kwargs.get('idle_timeout_in_minutes', None) + self.resource_guid = None + self.provisioning_state = None + self.service_public_ip_address = kwargs.get('service_public_ip_address', None) + self.nat_gateway = kwargs.get('nat_gateway', None) + self.migration_phase = kwargs.get('migration_phase', None) + self.linked_public_ip_address = kwargs.get('linked_public_ip_address', None) + self.delete_option = kwargs.get('delete_option', None) + + +class PublicIPAddressDnsSettings(msrest.serialization.Model): + """Contains FQDN of the DNS record associated with the public IP address. + + :param domain_name_label: The domain name label. The concatenation of the domain name label and + the regionalized DNS zone make up the fully qualified domain name associated with the public IP + address. If a domain name label is specified, an A DNS record is created for the public IP in + the Microsoft Azure DNS system. + :type domain_name_label: str + :param fqdn: The Fully Qualified Domain Name of the A DNS record associated with the public IP. + This is the concatenation of the domainNameLabel and the regionalized DNS zone. + :type fqdn: str + :param reverse_fqdn: The reverse FQDN. A user-visible, fully qualified domain name that + resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is + created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. + :type reverse_fqdn: str + """ + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'reverse_fqdn': {'key': 'reverseFqdn', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicIPAddressDnsSettings, self).__init__(**kwargs) + self.domain_name_label = kwargs.get('domain_name_label', None) + self.fqdn = kwargs.get('fqdn', None) + self.reverse_fqdn = kwargs.get('reverse_fqdn', None) + + +class PublicIPAddressListResult(msrest.serialization.Model): + """Response for ListPublicIpAddresses API service call. + + :param value: A list of public IP addresses that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PublicIPAddress] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicIPAddressListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PublicIPAddressSku(msrest.serialization.Model): + """SKU of a public IP address. + + :param name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressSkuName + :param tier: Tier of a public IP address SKU. Possible values include: "Regional", "Global". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicIPAddressSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class PublicIPPrefix(Resource): + """Public IP prefix resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the public ip address. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :param sku: The public IP prefix SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :type zones: list[str] + :param public_ip_address_version: The public IP address version. Possible values include: + "IPv4", "IPv6". + :type public_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :param ip_tags: The list of tags associated with the public IP prefix. + :type ip_tags: list[~azure.mgmt.network.v2021_05_01.models.IpTag] + :param prefix_length: The Length of the Public IP Prefix. + :type prefix_length: int + :ivar ip_prefix: The allocated Prefix. + :vartype ip_prefix: str + :ivar public_ip_addresses: The list of all referenced PublicIPAddresses. + :vartype public_ip_addresses: + list[~azure.mgmt.network.v2021_05_01.models.ReferencedPublicIpAddress] + :ivar load_balancer_frontend_ip_configuration: The reference to load balancer frontend IP + configuration associated with the public IP prefix. + :vartype load_balancer_frontend_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.SubResource + :param custom_ip_prefix: The customIpPrefix that this prefix is associated with. + :type custom_ip_prefix: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar resource_guid: The resource GUID property of the public IP prefix resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the public IP prefix resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param nat_gateway: NatGateway of Public IP Prefix. + :type nat_gateway: ~azure.mgmt.network.v2021_05_01.models.NatGateway + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'ip_prefix': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + 'load_balancer_frontend_ip_configuration': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'sku': {'key': 'sku', 'type': 'PublicIPPrefixSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, + 'prefix_length': {'key': 'properties.prefixLength', 'type': 'int'}, + 'ip_prefix': {'key': 'properties.ipPrefix', 'type': 'str'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[ReferencedPublicIpAddress]'}, + 'load_balancer_frontend_ip_configuration': {'key': 'properties.loadBalancerFrontendIpConfiguration', 'type': 'SubResource'}, + 'custom_ip_prefix': {'key': 'properties.customIPPrefix', 'type': 'SubResource'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'nat_gateway': {'key': 'properties.natGateway', 'type': 'NatGateway'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicIPPrefix, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.sku = kwargs.get('sku', None) + self.etag = None + self.zones = kwargs.get('zones', None) + self.public_ip_address_version = kwargs.get('public_ip_address_version', None) + self.ip_tags = kwargs.get('ip_tags', None) + self.prefix_length = kwargs.get('prefix_length', None) + self.ip_prefix = None + self.public_ip_addresses = None + self.load_balancer_frontend_ip_configuration = None + self.custom_ip_prefix = kwargs.get('custom_ip_prefix', None) + self.resource_guid = None + self.provisioning_state = None + self.nat_gateway = kwargs.get('nat_gateway', None) + + +class PublicIPPrefixListResult(msrest.serialization.Model): + """Response for ListPublicIpPrefixes API service call. + + :param value: A list of public IP prefixes that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PublicIPPrefix]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicIPPrefixListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PublicIPPrefixSku(msrest.serialization.Model): + """SKU of a public IP prefix. + + :param name: Name of a public IP prefix SKU. Possible values include: "Standard". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixSkuName + :param tier: Tier of a public IP prefix SKU. Possible values include: "Regional", "Global". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PublicIPPrefixSku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + + +class QosDefinition(msrest.serialization.Model): + """Quality of Service defines the traffic configuration between endpoints. Mandatory to have one marking. + + :param markings: List of markings to be used in the configuration. + :type markings: list[int] + :param source_ip_ranges: Source IP ranges. + :type source_ip_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosIpRange] + :param destination_ip_ranges: Destination IP ranges. + :type destination_ip_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosIpRange] + :param source_port_ranges: Sources port ranges. + :type source_port_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosPortRange] + :param destination_port_ranges: Destination port ranges. + :type destination_port_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosPortRange] + :param protocol: RNM supported protocol types. Possible values include: "DoNotUse", "Icmp", + "Tcp", "Udp", "Gre", "Esp", "Ah", "Vxlan", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ProtocolType + """ + + _attribute_map = { + 'markings': {'key': 'markings', 'type': '[int]'}, + 'source_ip_ranges': {'key': 'sourceIpRanges', 'type': '[QosIpRange]'}, + 'destination_ip_ranges': {'key': 'destinationIpRanges', 'type': '[QosIpRange]'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[QosPortRange]'}, + 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[QosPortRange]'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QosDefinition, self).__init__(**kwargs) + self.markings = kwargs.get('markings', None) + self.source_ip_ranges = kwargs.get('source_ip_ranges', None) + self.destination_ip_ranges = kwargs.get('destination_ip_ranges', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.protocol = kwargs.get('protocol', None) + + +class QosIpRange(msrest.serialization.Model): + """Qos Traffic Profiler IP Range properties. + + :param start_ip: Start IP Address. + :type start_ip: str + :param end_ip: End IP Address. + :type end_ip: str + """ + + _attribute_map = { + 'start_ip': {'key': 'startIP', 'type': 'str'}, + 'end_ip': {'key': 'endIP', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QosIpRange, self).__init__(**kwargs) + self.start_ip = kwargs.get('start_ip', None) + self.end_ip = kwargs.get('end_ip', None) + + +class QosPortRange(msrest.serialization.Model): + """Qos Traffic Profiler Port range properties. + + :param start: Qos Port Range start. + :type start: int + :param end: Qos Port Range end. + :type end: int + """ + + _attribute_map = { + 'start': {'key': 'start', 'type': 'int'}, + 'end': {'key': 'end', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(QosPortRange, self).__init__(**kwargs) + self.start = kwargs.get('start', None) + self.end = kwargs.get('end', None) + + +class QueryInboundNatRulePortMappingRequest(msrest.serialization.Model): + """The request for a QueryInboundNatRulePortMapping API. Either IpConfiguration or IpAddress should be set. + + :param ip_configuration: NetworkInterfaceIPConfiguration set in load balancer backend address. + :type ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param ip_address: IP address set in load balancer backend address. + :type ip_address: str + """ + + _attribute_map = { + 'ip_configuration': {'key': 'ipConfiguration', 'type': 'SubResource'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryInboundNatRulePortMappingRequest, self).__init__(**kwargs) + self.ip_configuration = kwargs.get('ip_configuration', None) + self.ip_address = kwargs.get('ip_address', None) + + +class QueryResults(msrest.serialization.Model): + """Query result. + + :param matching_records_count: Number of total records matching the query. + :type matching_records_count: long + :param signatures: Array containing the results of the query. + :type signatures: list[~azure.mgmt.network.v2021_05_01.models.SingleQueryResult] + """ + + _attribute_map = { + 'matching_records_count': {'key': 'matchingRecordsCount', 'type': 'long'}, + 'signatures': {'key': 'signatures', 'type': '[SingleQueryResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryResults, self).__init__(**kwargs) + self.matching_records_count = kwargs.get('matching_records_count', None) + self.signatures = kwargs.get('signatures', None) + + +class QueryTroubleshootingParameters(msrest.serialization.Model): + """Parameters that define the resource to query the troubleshooting result. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The target resource ID to query the troubleshooting + result. + :type target_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(QueryTroubleshootingParameters, self).__init__(**kwargs) + self.target_resource_id = kwargs['target_resource_id'] + + +class RadiusServer(msrest.serialization.Model): + """Radius Server Settings. + + All required parameters must be populated in order to send to Azure. + + :param radius_server_address: Required. The address of this radius server. + :type radius_server_address: str + :param radius_server_score: The initial score assigned to this radius server. + :type radius_server_score: long + :param radius_server_secret: The secret used for this radius server. + :type radius_server_secret: str + """ + + _validation = { + 'radius_server_address': {'required': True}, + } + + _attribute_map = { + 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, + 'radius_server_score': {'key': 'radiusServerScore', 'type': 'long'}, + 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RadiusServer, self).__init__(**kwargs) + self.radius_server_address = kwargs['radius_server_address'] + self.radius_server_score = kwargs.get('radius_server_score', None) + self.radius_server_secret = kwargs.get('radius_server_secret', None) + + +class RecordSet(msrest.serialization.Model): + """A collective group of information about the record set information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param record_type: Resource record type. + :type record_type: str + :param record_set_name: Recordset name. + :type record_set_name: str + :param fqdn: Fqdn that resolves to private endpoint ip address. + :type fqdn: str + :ivar provisioning_state: The provisioning state of the recordset. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param ttl: Recordset time to live. + :type ttl: int + :param ip_addresses: The private ip address of the private endpoint. + :type ip_addresses: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'record_type': {'key': 'recordType', 'type': 'str'}, + 'record_set_name': {'key': 'recordSetName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'ttl': {'key': 'ttl', 'type': 'int'}, + 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(RecordSet, self).__init__(**kwargs) + self.record_type = kwargs.get('record_type', None) + self.record_set_name = kwargs.get('record_set_name', None) + self.fqdn = kwargs.get('fqdn', None) + self.provisioning_state = None + self.ttl = kwargs.get('ttl', None) + self.ip_addresses = kwargs.get('ip_addresses', None) + + +class ReferencedPublicIpAddress(msrest.serialization.Model): + """Reference to a public IP address. + + :param id: The PublicIPAddress Reference. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ReferencedPublicIpAddress, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class ResourceNavigationLink(SubResource): + """ResourceNavigationLink resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param linked_resource_type: Resource type of the linked resource. + :type linked_resource_type: str + :param link: Link to the external resource. + :type link: str + :ivar provisioning_state: The provisioning state of the resource navigation link resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, + 'link': {'key': 'properties.link', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceNavigationLink, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.linked_resource_type = kwargs.get('linked_resource_type', None) + self.link = kwargs.get('link', None) + self.provisioning_state = None + + +class ResourceNavigationLinksListResult(msrest.serialization.Model): + """Response for ResourceNavigationLinks_List operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The resource navigation links in a subnet. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ResourceNavigationLink] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceNavigationLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceNavigationLinksListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class RetentionPolicyParameters(msrest.serialization.Model): + """Parameters that define the retention policy for flow log. + + :param days: Number of days to retain flow log records. + :type days: int + :param enabled: Flag to enable/disable retention. + :type enabled: bool + """ + + _attribute_map = { + 'days': {'key': 'days', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(RetentionPolicyParameters, self).__init__(**kwargs) + self.days = kwargs.get('days', 0) + self.enabled = kwargs.get('enabled', False) + + +class Route(SubResource): + """Route resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: The type of the resource. + :type type: str + :param address_prefix: The destination CIDR to which the route applies. + :type address_prefix: str + :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values + include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". + :type next_hop_type: str or ~azure.mgmt.network.v2021_05_01.models.RouteNextHopType + :param next_hop_ip_address: The IP address packets should be forwarded to. Next hop values are + only allowed in routes where the next hop type is VirtualAppliance. + :type next_hop_ip_address: str + :ivar provisioning_state: The provisioning state of the route resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param has_bgp_override: A value indicating whether this route overrides overlapping BGP routes + regardless of LPM. + :type has_bgp_override: bool + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'next_hop_type': {'key': 'properties.nextHopType', 'type': 'str'}, + 'next_hop_ip_address': {'key': 'properties.nextHopIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'has_bgp_override': {'key': 'properties.hasBgpOverride', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(Route, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = kwargs.get('type', None) + self.address_prefix = kwargs.get('address_prefix', None) + self.next_hop_type = kwargs.get('next_hop_type', None) + self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) + self.provisioning_state = None + self.has_bgp_override = kwargs.get('has_bgp_override', None) + + +class RouteFilter(Resource): + """Route Filter Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param rules: Collection of RouteFilterRules contained within a route filter. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.RouteFilterRule] + :ivar peerings: A collection of references to express route circuit peerings. + :vartype peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :ivar ipv6_peerings: A collection of references to express route circuit ipv6 peerings. + :vartype ipv6_peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :ivar provisioning_state: The provisioning state of the route filter resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'peerings': {'readonly': True}, + 'ipv6_peerings': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'ipv6_peerings': {'key': 'properties.ipv6Peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RouteFilter, self).__init__(**kwargs) + self.etag = None + self.rules = kwargs.get('rules', None) + self.peerings = None + self.ipv6_peerings = None + self.provisioning_state = None + + +class RouteFilterListResult(msrest.serialization.Model): + """Response for the ListRouteFilters API service call. + + :param value: A list of route filters in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.RouteFilter] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RouteFilter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RouteFilterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RouteFilterRule(SubResource): + """Route Filter Rule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :param location: Resource location. + :type location: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param access: The access type of the rule. Possible values include: "Allow", "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.Access + :param route_filter_rule_type: The rule type of the rule. Possible values include: "Community". + :type route_filter_rule_type: str or ~azure.mgmt.network.v2021_05_01.models.RouteFilterRuleType + :param communities: The collection for bgp community values to filter on. e.g. + ['12076:5010','12076:5020']. + :type communities: list[str] + :ivar provisioning_state: The provisioning state of the route filter rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, + 'communities': {'key': 'properties.communities', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RouteFilterRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.location = kwargs.get('location', None) + self.etag = None + self.access = kwargs.get('access', None) + self.route_filter_rule_type = kwargs.get('route_filter_rule_type', None) + self.communities = kwargs.get('communities', None) + self.provisioning_state = None + + +class RouteFilterRuleListResult(msrest.serialization.Model): + """Response for the ListRouteFilterRules API service call. + + :param value: A list of RouteFilterRules in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.RouteFilterRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RouteFilterRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RouteFilterRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RouteListResult(msrest.serialization.Model): + """Response for the ListRoute API service call. + + :param value: A list of routes in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Route] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Route]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RouteListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RouteTable(Resource): + """Route table resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param routes: Collection of routes contained within a route table. + :type routes: list[~azure.mgmt.network.v2021_05_01.models.Route] + :ivar subnets: A collection of references to subnets. + :vartype subnets: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :param disable_bgp_route_propagation: Whether to disable the routes learned by BGP on that + route table. True means disable. + :type disable_bgp_route_propagation: bool + :ivar provisioning_state: The provisioning state of the route table resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar resource_guid: The resource GUID property of the route table. + :vartype resource_guid: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'subnets': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_guid': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[Route]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'disable_bgp_route_propagation': {'key': 'properties.disableBgpRoutePropagation', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RouteTable, self).__init__(**kwargs) + self.etag = None + self.routes = kwargs.get('routes', None) + self.subnets = None + self.disable_bgp_route_propagation = kwargs.get('disable_bgp_route_propagation', None) + self.provisioning_state = None + self.resource_guid = None + + +class RouteTableListResult(msrest.serialization.Model): + """Response for the ListRouteTable API service call. + + :param value: A list of route tables in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.RouteTable] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RouteTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RouteTableListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class RoutingConfiguration(msrest.serialization.Model): + """Routing Configuration indicating the associated and propagated route tables for this connection. + + :param associated_route_table: The resource id RouteTable associated with this + RoutingConfiguration. + :type associated_route_table: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param propagated_route_tables: The list of RouteTables to advertise the routes to. + :type propagated_route_tables: ~azure.mgmt.network.v2021_05_01.models.PropagatedRouteTable + :param vnet_routes: List of routes that control routing from VirtualHub into a virtual network + connection. + :type vnet_routes: ~azure.mgmt.network.v2021_05_01.models.VnetRoute + """ + + _attribute_map = { + 'associated_route_table': {'key': 'associatedRouteTable', 'type': 'SubResource'}, + 'propagated_route_tables': {'key': 'propagatedRouteTables', 'type': 'PropagatedRouteTable'}, + 'vnet_routes': {'key': 'vnetRoutes', 'type': 'VnetRoute'}, + } + + def __init__( + self, + **kwargs + ): + super(RoutingConfiguration, self).__init__(**kwargs) + self.associated_route_table = kwargs.get('associated_route_table', None) + self.propagated_route_tables = kwargs.get('propagated_route_tables', None) + self.vnet_routes = kwargs.get('vnet_routes', None) + + +class RoutingIntent(SubResource): + """The routing intent child resource of a Virtual hub. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param routing_policies: List of routing policies. + :type routing_policies: list[~azure.mgmt.network.v2021_05_01.models.RoutingPolicy] + :ivar provisioning_state: The provisioning state of the RoutingIntent resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'routing_policies': {'key': 'properties.routingPolicies', 'type': '[RoutingPolicy]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoutingIntent, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.routing_policies = kwargs.get('routing_policies', None) + self.provisioning_state = None + + +class RoutingPolicy(msrest.serialization.Model): + """The routing policy object used in a RoutingIntent resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name for the routing policy. + :type name: str + :param destinations: Required. List of all destinations which this routing policy is applicable + to (for example: Internet, PrivateTraffic). + :type destinations: list[str] + :param next_hop: Required. The next hop resource id on which this routing policy is applicable + to. + :type next_hop: str + """ + + _validation = { + 'name': {'required': True}, + 'destinations': {'required': True}, + 'next_hop': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RoutingPolicy, self).__init__(**kwargs) + self.name = kwargs['name'] + self.destinations = kwargs['destinations'] + self.next_hop = kwargs['next_hop'] + + +class SecurityGroupNetworkInterface(msrest.serialization.Model): + """Network interface and all its associated security rules. + + :param id: ID of the network interface. + :type id: str + :param security_rule_associations: All security rules associated with the network interface. + :type security_rule_associations: + ~azure.mgmt.network.v2021_05_01.models.SecurityRuleAssociations + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'security_rule_associations': {'key': 'securityRuleAssociations', 'type': 'SecurityRuleAssociations'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityGroupNetworkInterface, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.security_rule_associations = kwargs.get('security_rule_associations', None) + + +class SecurityGroupViewParameters(msrest.serialization.Model): + """Parameters that define the VM to check security groups for. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. ID of the target VM. + :type target_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityGroupViewParameters, self).__init__(**kwargs) + self.target_resource_id = kwargs['target_resource_id'] + + +class SecurityGroupViewResult(msrest.serialization.Model): + """The information about security rules applied to the specified VM. + + :param network_interfaces: List of network interfaces on the specified VM. + :type network_interfaces: + list[~azure.mgmt.network.v2021_05_01.models.SecurityGroupNetworkInterface] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityGroupViewResult, self).__init__(**kwargs) + self.network_interfaces = kwargs.get('network_interfaces', None) + + +class SecurityPartnerProvider(Resource): + """Security Partner Provider resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the Security Partner Provider resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param security_provider_name: The security provider name. Possible values include: "ZScaler", + "IBoss", "Checkpoint". + :type security_provider_name: str or + ~azure.mgmt.network.v2021_05_01.models.SecurityProviderName + :ivar connection_status: The connection status with the Security Partner Provider. Possible + values include: "Unknown", "PartiallyConnected", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProviderConnectionStatus + :param virtual_hub: The virtualHub to which the Security Partner Provider belongs. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'connection_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'security_provider_name': {'key': 'properties.securityProviderName', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityPartnerProvider, self).__init__(**kwargs) + self.etag = None + self.provisioning_state = None + self.security_provider_name = kwargs.get('security_provider_name', None) + self.connection_status = None + self.virtual_hub = kwargs.get('virtual_hub', None) + + +class SecurityPartnerProviderListResult(msrest.serialization.Model): + """Response for ListSecurityPartnerProviders API service call. + + :param value: List of Security Partner Providers in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityPartnerProvider]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityPartnerProviderListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class SecurityRule(SubResource): + """Network security rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: The type of the resource. + :type type: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "*", "Ah". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleProtocol + :param source_port_range: The source port or range. Integer or range between 0 and 65535. + Asterisk '*' can also be used to match all ports. + :type source_port_range: str + :param destination_port_range: The destination port or range. Integer or range between 0 and + 65535. Asterisk '*' can also be used to match all ports. + :type destination_port_range: str + :param source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to + match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' + can also be used. If this is an ingress rule, specifies where network traffic originates from. + :type source_address_prefix: str + :param source_address_prefixes: The CIDR or source IP ranges. + :type source_address_prefixes: list[str] + :param source_application_security_groups: The application security group specified as source. + :type source_application_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :param destination_address_prefix: The destination address prefix. CIDR or destination IP + range. Asterisk '*' can also be used to match all source IPs. Default tags such as + 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. + :type destination_address_prefix: str + :param destination_address_prefixes: The destination address prefixes. CIDR or destination IP + ranges. + :type destination_address_prefixes: list[str] + :param destination_application_security_groups: The application security group specified as + destination. + :type destination_application_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: The network traffic is allowed or denied. Possible values include: "Allow", + "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleAccess + :param priority: The priority of the rule. The value can be between 100 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: The direction of the rule. The direction specifies if rule will be evaluated + on incoming or outgoing traffic. Possible values include: "Inbound", "Outbound". + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleDirection + :ivar provisioning_state: The provisioning state of the security rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'source_port_range': {'key': 'properties.sourcePortRange', 'type': 'str'}, + 'destination_port_range': {'key': 'properties.destinationPortRange', 'type': 'str'}, + 'source_address_prefix': {'key': 'properties.sourceAddressPrefix', 'type': 'str'}, + 'source_address_prefixes': {'key': 'properties.sourceAddressPrefixes', 'type': '[str]'}, + 'source_application_security_groups': {'key': 'properties.sourceApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'destination_address_prefix': {'key': 'properties.destinationAddressPrefix', 'type': 'str'}, + 'destination_address_prefixes': {'key': 'properties.destinationAddressPrefixes', 'type': '[str]'}, + 'destination_application_security_groups': {'key': 'properties.destinationApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = kwargs.get('type', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.source_port_range = kwargs.get('source_port_range', None) + self.destination_port_range = kwargs.get('destination_port_range', None) + self.source_address_prefix = kwargs.get('source_address_prefix', None) + self.source_address_prefixes = kwargs.get('source_address_prefixes', None) + self.source_application_security_groups = kwargs.get('source_application_security_groups', None) + self.destination_address_prefix = kwargs.get('destination_address_prefix', None) + self.destination_address_prefixes = kwargs.get('destination_address_prefixes', None) + self.destination_application_security_groups = kwargs.get('destination_application_security_groups', None) + self.source_port_ranges = kwargs.get('source_port_ranges', None) + self.destination_port_ranges = kwargs.get('destination_port_ranges', None) + self.access = kwargs.get('access', None) + self.priority = kwargs.get('priority', None) + self.direction = kwargs.get('direction', None) + self.provisioning_state = None + + +class SecurityRuleAssociations(msrest.serialization.Model): + """All security rules associated with the network interface. + + :param network_interface_association: Network interface and it's custom security rules. + :type network_interface_association: + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceAssociation + :param subnet_association: Subnet and it's custom security rules. + :type subnet_association: ~azure.mgmt.network.v2021_05_01.models.SubnetAssociation + :param default_security_rules: Collection of default security rules of the network security + group. + :type default_security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + :param effective_security_rules: Collection of effective security rules. + :type effective_security_rules: + list[~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityRule] + """ + + _attribute_map = { + 'network_interface_association': {'key': 'networkInterfaceAssociation', 'type': 'NetworkInterfaceAssociation'}, + 'subnet_association': {'key': 'subnetAssociation', 'type': 'SubnetAssociation'}, + 'default_security_rules': {'key': 'defaultSecurityRules', 'type': '[SecurityRule]'}, + 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityRuleAssociations, self).__init__(**kwargs) + self.network_interface_association = kwargs.get('network_interface_association', None) + self.subnet_association = kwargs.get('subnet_association', None) + self.default_security_rules = kwargs.get('default_security_rules', None) + self.effective_security_rules = kwargs.get('effective_security_rules', None) + + +class SecurityRuleListResult(msrest.serialization.Model): + """Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. + + :param value: The security rules in a network security group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityRuleListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ServiceAssociationLink(SubResource): + """ServiceAssociationLink resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param linked_resource_type: Resource type of the linked resource. + :type linked_resource_type: str + :param link: Link to the external resource. + :type link: str + :ivar provisioning_state: The provisioning state of the service association link resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param allow_delete: If true, the resource can be deleted. + :type allow_delete: bool + :param locations: A list of locations. + :type locations: list[str] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, + 'link': {'key': 'properties.link', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'allow_delete': {'key': 'properties.allowDelete', 'type': 'bool'}, + 'locations': {'key': 'properties.locations', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceAssociationLink, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.linked_resource_type = kwargs.get('linked_resource_type', None) + self.link = kwargs.get('link', None) + self.provisioning_state = None + self.allow_delete = kwargs.get('allow_delete', None) + self.locations = kwargs.get('locations', None) + + +class ServiceAssociationLinksListResult(msrest.serialization.Model): + """Response for ServiceAssociationLinks_List operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The service association links in a subnet. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ServiceAssociationLink] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceAssociationLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceAssociationLinksListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ServiceEndpointPolicy(Resource): + """Service End point policy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar kind: Kind of service endpoint policy. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param service_endpoint_policy_definitions: A collection of service endpoint policy definitions + of the service endpoint policy. + :type service_endpoint_policy_definitions: + list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition] + :ivar subnets: A collection of references to subnets. + :vartype subnets: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :ivar resource_guid: The resource GUID property of the service endpoint policy resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the service endpoint policy resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param service_alias: The alias indicating if the policy belongs to a service. + :type service_alias: str + :param contextual_service_endpoint_policies: A collection of contextual service endpoint + policy. + :type contextual_service_endpoint_policies: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'readonly': True}, + 'subnets': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'service_endpoint_policy_definitions': {'key': 'properties.serviceEndpointPolicyDefinitions', 'type': '[ServiceEndpointPolicyDefinition]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'service_alias': {'key': 'properties.serviceAlias', 'type': 'str'}, + 'contextual_service_endpoint_policies': {'key': 'properties.contextualServiceEndpointPolicies', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceEndpointPolicy, self).__init__(**kwargs) + self.etag = None + self.kind = None + self.service_endpoint_policy_definitions = kwargs.get('service_endpoint_policy_definitions', None) + self.subnets = None + self.resource_guid = None + self.provisioning_state = None + self.service_alias = kwargs.get('service_alias', None) + self.contextual_service_endpoint_policies = kwargs.get('contextual_service_endpoint_policies', None) + + +class ServiceEndpointPolicyDefinition(SubResource): + """Service Endpoint policy definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: The type of the resource. + :type type: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param service: Service endpoint name. + :type service: str + :param service_resources: A list of service resources. + :type service_resources: list[str] + :ivar provisioning_state: The provisioning state of the service endpoint policy definition + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'service': {'key': 'properties.service', 'type': 'str'}, + 'service_resources': {'key': 'properties.serviceResources', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceEndpointPolicyDefinition, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = kwargs.get('type', None) + self.description = kwargs.get('description', None) + self.service = kwargs.get('service', None) + self.service_resources = kwargs.get('service_resources', None) + self.provisioning_state = None + + +class ServiceEndpointPolicyDefinitionListResult(msrest.serialization.Model): + """Response for ListServiceEndpointPolicyDefinition API service call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy. + + :param value: The service endpoint policy definition in a service endpoint policy. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceEndpointPolicyDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceEndpointPolicyDefinitionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ServiceEndpointPolicyListResult(msrest.serialization.Model): + """Response for ListServiceEndpointPolicies API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of ServiceEndpointPolicy resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceEndpointPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceEndpointPolicyListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ServiceEndpointPropertiesFormat(msrest.serialization.Model): + """The service endpoint properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param service: The type of the endpoint service. + :type service: str + :param locations: A list of locations. + :type locations: list[str] + :ivar provisioning_state: The provisioning state of the service endpoint resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'service': {'key': 'service', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceEndpointPropertiesFormat, self).__init__(**kwargs) + self.service = kwargs.get('service', None) + self.locations = kwargs.get('locations', None) + self.provisioning_state = None + + +class ServiceTagInformation(msrest.serialization.Model): + """The service tag information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar properties: Properties of the service tag information. + :vartype properties: + ~azure.mgmt.network.v2021_05_01.models.ServiceTagInformationPropertiesFormat + :ivar name: The name of service tag. + :vartype name: str + :ivar id: The ID of service tag. + :vartype id: str + :ivar service_tag_change_number: The iteration number of service tag object for region. + :vartype service_tag_change_number: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'service_tag_change_number': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ServiceTagInformationPropertiesFormat'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'service_tag_change_number': {'key': 'serviceTagChangeNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceTagInformation, self).__init__(**kwargs) + self.properties = None + self.name = None + self.id = None + self.service_tag_change_number = None + + +class ServiceTagInformationListResult(msrest.serialization.Model): + """Response for Get ServiceTagInformation API service call. Retrieves the list of service tag information resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of service tag information resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ServiceTagInformation] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceTagInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceTagInformationListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class ServiceTagInformationPropertiesFormat(msrest.serialization.Model): + """Properties of the service tag information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar change_number: The iteration number of service tag. + :vartype change_number: str + :ivar region: The region of service tag. + :vartype region: str + :ivar system_service: The name of system service. + :vartype system_service: str + :ivar address_prefixes: The list of IP address prefixes. + :vartype address_prefixes: list[str] + :ivar state: The state of the service tag. + :vartype state: str + """ + + _validation = { + 'change_number': {'readonly': True}, + 'region': {'readonly': True}, + 'system_service': {'readonly': True}, + 'address_prefixes': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'change_number': {'key': 'changeNumber', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'system_service': {'key': 'systemService', 'type': 'str'}, + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceTagInformationPropertiesFormat, self).__init__(**kwargs) + self.change_number = None + self.region = None + self.system_service = None + self.address_prefixes = None + self.state = None + + +class ServiceTagsListResult(msrest.serialization.Model): + """Response for the ListServiceTags API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the cloud. + :vartype name: str + :ivar id: The ID of the cloud. + :vartype id: str + :ivar type: The azure resource type. + :vartype type: str + :ivar change_number: The iteration number. + :vartype change_number: str + :ivar cloud: The name of the cloud. + :vartype cloud: str + :ivar values: The list of service tag information resources. + :vartype values: list[~azure.mgmt.network.v2021_05_01.models.ServiceTagInformation] + :ivar next_link: The URL to get next page of service tag information resources. + :vartype next_link: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'change_number': {'readonly': True}, + 'cloud': {'readonly': True}, + 'values': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'change_number': {'key': 'changeNumber', 'type': 'str'}, + 'cloud': {'key': 'cloud', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[ServiceTagInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceTagsListResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + self.change_number = None + self.cloud = None + self.values = None + self.next_link = None + + +class SessionIds(msrest.serialization.Model): + """List of session IDs. + + :param session_ids: List of session IDs. + :type session_ids: list[str] + """ + + _attribute_map = { + 'session_ids': {'key': 'sessionIds', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SessionIds, self).__init__(**kwargs) + self.session_ids = kwargs.get('session_ids', None) + + +class SignatureOverridesFilterValuesQuery(msrest.serialization.Model): + """Describes the filter values possibles for a given column. + + :param filter_name: Describes the name of the column which values will be returned. + :type filter_name: str + """ + + _attribute_map = { + 'filter_name': {'key': 'filterName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SignatureOverridesFilterValuesQuery, self).__init__(**kwargs) + self.filter_name = kwargs.get('filter_name', None) + + +class SignatureOverridesFilterValuesResponse(msrest.serialization.Model): + """Describes the list of all possible values for a specific filter value. + + :param filter_values: Describes the possible values. + :type filter_values: list[str] + """ + + _attribute_map = { + 'filter_values': {'key': 'filterValues', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SignatureOverridesFilterValuesResponse, self).__init__(**kwargs) + self.filter_values = kwargs.get('filter_values', None) + + +class SignaturesOverrides(msrest.serialization.Model): + """Contains all specific policy signatures overrides for the IDPS. + + :param name: Contains the name of the resource (default). + :type name: str + :param id: Will contain the resource id of the signature override resource. + :type id: str + :param type: Will contain the type of the resource: + Microsoft.Network/firewallPolicies/intrusionDetectionSignaturesOverrides. + :type type: str + :param properties: Will contain the properties of the resource (the actual signature + overrides). + :type properties: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverridesProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SignaturesOverridesProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(SignaturesOverrides, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.type = kwargs.get('type', None) + self.properties = kwargs.get('properties', None) + + +class SignaturesOverridesList(msrest.serialization.Model): + """Describes an object containing an array with a single item. + + :param value: Describes a list consisting exactly one item describing the policy's signature + override status. + :type value: list[~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SignaturesOverrides]'}, + } + + def __init__( + self, + **kwargs + ): + super(SignaturesOverridesList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class SignaturesOverridesProperties(msrest.serialization.Model): + """Will contain the properties of the resource (the actual signature overrides). + + :param signatures: Dictionary of :code:``. + :type signatures: dict[str, str] + """ + + _attribute_map = { + 'signatures': {'key': 'signatures', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(SignaturesOverridesProperties, self).__init__(**kwargs) + self.signatures = kwargs.get('signatures', None) + + +class SingleQueryResult(msrest.serialization.Model): + """SingleQueryResult. + + :param signature_id: The ID of the signature. + :type signature_id: int + :param mode: The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny. Possible values + include: 0, 1, 2. + :type mode: str or ~azure.mgmt.network.v2021_05_01.models.SingleQueryResultMode + :param severity: Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High. Possible + values include: 1, 2, 3. + :type severity: str or ~azure.mgmt.network.v2021_05_01.models.SingleQueryResultSeverity + :param direction: Describes in which direction signature is being enforced: 0 - Inbound, 1 - + OutBound, 2 - Bidirectional. Possible values include: 0, 1, 2. + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.SingleQueryResultDirection + :param group: Describes the groups the signature belongs to. + :type group: str + :param description: Describes what is the signature enforces. + :type description: str + :param protocol: Describes the protocol the signatures is being enforced in. + :type protocol: str + :param source_ports: Describes the list of source ports related to this signature. + :type source_ports: list[str] + :param destination_ports: Describes the list of destination ports related to this signature. + :type destination_ports: list[str] + :param last_updated: Describes the last updated time of the signature (provided from 3rd party + vendor). + :type last_updated: str + :param inherited_from_parent_policy: Describes if this override is inherited from base policy + or not. + :type inherited_from_parent_policy: bool + """ + + _attribute_map = { + 'signature_id': {'key': 'signatureId', 'type': 'int'}, + 'mode': {'key': 'mode', 'type': 'int'}, + 'severity': {'key': 'severity', 'type': 'int'}, + 'direction': {'key': 'direction', 'type': 'int'}, + 'group': {'key': 'group', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_ports': {'key': 'sourcePorts', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + 'inherited_from_parent_policy': {'key': 'inheritedFromParentPolicy', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(SingleQueryResult, self).__init__(**kwargs) + self.signature_id = kwargs.get('signature_id', None) + self.mode = kwargs.get('mode', None) + self.severity = kwargs.get('severity', None) + self.direction = kwargs.get('direction', None) + self.group = kwargs.get('group', None) + self.description = kwargs.get('description', None) + self.protocol = kwargs.get('protocol', None) + self.source_ports = kwargs.get('source_ports', None) + self.destination_ports = kwargs.get('destination_ports', None) + self.last_updated = kwargs.get('last_updated', None) + self.inherited_from_parent_policy = kwargs.get('inherited_from_parent_policy', None) + + +class Sku(msrest.serialization.Model): + """The sku of this Bastion Host. + + :param name: The name of this Bastion Host. Possible values include: "Basic", "Standard". + Default value: "Standard". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.BastionHostSkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs.get('name', "Standard") + + +class StaticRoute(msrest.serialization.Model): + """List of all Static Routes. + + :param name: The name of the StaticRoute that is unique within a VnetRoute. + :type name: str + :param address_prefixes: List of all address prefixes. + :type address_prefixes: list[str] + :param next_hop_ip_address: The ip address of the next hop. + :type next_hop_ip_address: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(StaticRoute, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.address_prefixes = kwargs.get('address_prefixes', None) + self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) + + +class Subnet(SubResource): + """Subnet in a virtual network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: Resource type. + :type type: str + :param address_prefix: The address prefix for the subnet. + :type address_prefix: str + :param address_prefixes: List of address prefixes for the subnet. + :type address_prefixes: list[str] + :param network_security_group: The reference to the NetworkSecurityGroup resource. + :type network_security_group: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup + :param route_table: The reference to the RouteTable resource. + :type route_table: ~azure.mgmt.network.v2021_05_01.models.RouteTable + :param nat_gateway: Nat gateway associated with this subnet. + :type nat_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param service_endpoints: An array of service endpoints. + :type service_endpoints: + list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPropertiesFormat] + :param service_endpoint_policies: An array of service endpoint policies. + :type service_endpoint_policies: + list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy] + :ivar private_endpoints: An array of references to private endpoints. + :vartype private_endpoints: list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint] + :ivar ip_configurations: An array of references to the network interface IP configurations + using subnet. + :vartype ip_configurations: list[~azure.mgmt.network.v2021_05_01.models.IPConfiguration] + :ivar ip_configuration_profiles: Array of IP configuration profiles which reference this + subnet. + :vartype ip_configuration_profiles: + list[~azure.mgmt.network.v2021_05_01.models.IPConfigurationProfile] + :param ip_allocations: Array of IpAllocation which reference this subnet. + :type ip_allocations: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar resource_navigation_links: An array of references to the external resources using subnet. + :vartype resource_navigation_links: + list[~azure.mgmt.network.v2021_05_01.models.ResourceNavigationLink] + :ivar service_association_links: An array of references to services injecting into this subnet. + :vartype service_association_links: + list[~azure.mgmt.network.v2021_05_01.models.ServiceAssociationLink] + :param delegations: An array of references to the delegations on the subnet. + :type delegations: list[~azure.mgmt.network.v2021_05_01.models.Delegation] + :ivar purpose: A read-only string identifying the intention of use for this subnet based on + delegations and other user-defined properties. + :vartype purpose: str + :ivar provisioning_state: The provisioning state of the subnet resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_endpoint_network_policies: Enable or Disable apply network policies on private + end point in the subnet. Possible values include: "Enabled", "Disabled". Default value: + "Enabled". + :type private_endpoint_network_policies: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPrivateEndpointNetworkPolicies + :param private_link_service_network_policies: Enable or Disable apply network policies on + private link service in the subnet. Possible values include: "Enabled", "Disabled". Default + value: "Enabled". + :type private_link_service_network_policies: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPrivateLinkServiceNetworkPolicies + :param application_gateway_ip_configurations: Application gateway IP configurations of virtual + network resource. + :type application_gateway_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayIPConfiguration] + """ + + _validation = { + 'etag': {'readonly': True}, + 'private_endpoints': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + 'ip_configuration_profiles': {'readonly': True}, + 'resource_navigation_links': {'readonly': True}, + 'service_association_links': {'readonly': True}, + 'purpose': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'address_prefixes': {'key': 'properties.addressPrefixes', 'type': '[str]'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, + 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, + 'nat_gateway': {'key': 'properties.natGateway', 'type': 'SubResource'}, + 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, + 'service_endpoint_policies': {'key': 'properties.serviceEndpointPolicies', 'type': '[ServiceEndpointPolicy]'}, + 'private_endpoints': {'key': 'properties.privateEndpoints', 'type': '[PrivateEndpoint]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, + 'ip_configuration_profiles': {'key': 'properties.ipConfigurationProfiles', 'type': '[IPConfigurationProfile]'}, + 'ip_allocations': {'key': 'properties.ipAllocations', 'type': '[SubResource]'}, + 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, + 'service_association_links': {'key': 'properties.serviceAssociationLinks', 'type': '[ServiceAssociationLink]'}, + 'delegations': {'key': 'properties.delegations', 'type': '[Delegation]'}, + 'purpose': {'key': 'properties.purpose', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_network_policies': {'key': 'properties.privateEndpointNetworkPolicies', 'type': 'str'}, + 'private_link_service_network_policies': {'key': 'properties.privateLinkServiceNetworkPolicies', 'type': 'str'}, + 'application_gateway_ip_configurations': {'key': 'properties.applicationGatewayIpConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, + } + + def __init__( + self, + **kwargs + ): + super(Subnet, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = kwargs.get('type', None) + self.address_prefix = kwargs.get('address_prefix', None) + self.address_prefixes = kwargs.get('address_prefixes', None) + self.network_security_group = kwargs.get('network_security_group', None) + self.route_table = kwargs.get('route_table', None) + self.nat_gateway = kwargs.get('nat_gateway', None) + self.service_endpoints = kwargs.get('service_endpoints', None) + self.service_endpoint_policies = kwargs.get('service_endpoint_policies', None) + self.private_endpoints = None + self.ip_configurations = None + self.ip_configuration_profiles = None + self.ip_allocations = kwargs.get('ip_allocations', None) + self.resource_navigation_links = None + self.service_association_links = None + self.delegations = kwargs.get('delegations', None) + self.purpose = None + self.provisioning_state = None + self.private_endpoint_network_policies = kwargs.get('private_endpoint_network_policies', "Enabled") + self.private_link_service_network_policies = kwargs.get('private_link_service_network_policies', "Enabled") + self.application_gateway_ip_configurations = kwargs.get('application_gateway_ip_configurations', None) + + +class SubnetAssociation(msrest.serialization.Model): + """Subnet and it's custom security rules. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Subnet ID. + :vartype id: str + :param security_rules: Collection of custom security rules. + :type security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(SubnetAssociation, self).__init__(**kwargs) + self.id = None + self.security_rules = kwargs.get('security_rules', None) + + +class SubnetListResult(msrest.serialization.Model): + """Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. + + :param value: The subnets in a virtual network. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Subnet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SubnetListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class Topology(msrest.serialization.Model): + """Topology of the specified resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: GUID representing the operation id. + :vartype id: str + :ivar created_date_time: The datetime when the topology was initially created for the resource + group. + :vartype created_date_time: ~datetime.datetime + :ivar last_modified: The datetime when the topology was last modified. + :vartype last_modified: ~datetime.datetime + :param resources: A list of topology resources. + :type resources: list[~azure.mgmt.network.v2021_05_01.models.TopologyResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'created_date_time': {'readonly': True}, + 'last_modified': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, + 'resources': {'key': 'resources', 'type': '[TopologyResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(Topology, self).__init__(**kwargs) + self.id = None + self.created_date_time = None + self.last_modified = None + self.resources = kwargs.get('resources', None) + + +class TopologyAssociation(msrest.serialization.Model): + """Resources that have an association with the parent resource. + + :param name: The name of the resource that is associated with the parent resource. + :type name: str + :param resource_id: The ID of the resource that is associated with the parent resource. + :type resource_id: str + :param association_type: The association type of the child resource to the parent resource. + Possible values include: "Associated", "Contains". + :type association_type: str or ~azure.mgmt.network.v2021_05_01.models.AssociationType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'association_type': {'key': 'associationType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TopologyAssociation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.resource_id = kwargs.get('resource_id', None) + self.association_type = kwargs.get('association_type', None) + + +class TopologyParameters(msrest.serialization.Model): + """Parameters that define the representation of topology. + + :param target_resource_group_name: The name of the target resource group to perform topology + on. + :type target_resource_group_name: str + :param target_virtual_network: The reference to the Virtual Network resource. + :type target_virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param target_subnet: The reference to the Subnet resource. + :type target_subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, + 'target_virtual_network': {'key': 'targetVirtualNetwork', 'type': 'SubResource'}, + 'target_subnet': {'key': 'targetSubnet', 'type': 'SubResource'}, + } + + def __init__( + self, + **kwargs + ): + super(TopologyParameters, self).__init__(**kwargs) + self.target_resource_group_name = kwargs.get('target_resource_group_name', None) + self.target_virtual_network = kwargs.get('target_virtual_network', None) + self.target_subnet = kwargs.get('target_subnet', None) + + +class TopologyResource(msrest.serialization.Model): + """The network resource topology information for the given resource group. + + :param name: Name of the resource. + :type name: str + :param id: ID of the resource. + :type id: str + :param location: Resource location. + :type location: str + :param associations: Holds the associations the resource has with other resources in the + resource group. + :type associations: list[~azure.mgmt.network.v2021_05_01.models.TopologyAssociation] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, + } + + def __init__( + self, + **kwargs + ): + super(TopologyResource, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.id = kwargs.get('id', None) + self.location = kwargs.get('location', None) + self.associations = kwargs.get('associations', None) + + +class TrafficAnalyticsConfigurationProperties(msrest.serialization.Model): + """Parameters that define the configuration of traffic analytics. + + :param enabled: Flag to enable/disable traffic analytics. + :type enabled: bool + :param workspace_id: The resource guid of the attached workspace. + :type workspace_id: str + :param workspace_region: The location of the attached workspace. + :type workspace_region: str + :param workspace_resource_id: Resource Id of the attached workspace. + :type workspace_resource_id: str + :param traffic_analytics_interval: The interval in minutes which would decide how frequently TA + service should do flow analytics. + :type traffic_analytics_interval: int + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'workspace_region': {'key': 'workspaceRegion', 'type': 'str'}, + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + 'traffic_analytics_interval': {'key': 'trafficAnalyticsInterval', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(TrafficAnalyticsConfigurationProperties, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.workspace_id = kwargs.get('workspace_id', None) + self.workspace_region = kwargs.get('workspace_region', None) + self.workspace_resource_id = kwargs.get('workspace_resource_id', None) + self.traffic_analytics_interval = kwargs.get('traffic_analytics_interval', None) + + +class TrafficAnalyticsProperties(msrest.serialization.Model): + """Parameters that define the configuration of traffic analytics. + + :param network_watcher_flow_analytics_configuration: Parameters that define the configuration + of traffic analytics. + :type network_watcher_flow_analytics_configuration: + ~azure.mgmt.network.v2021_05_01.models.TrafficAnalyticsConfigurationProperties + """ + + _attribute_map = { + 'network_watcher_flow_analytics_configuration': {'key': 'networkWatcherFlowAnalyticsConfiguration', 'type': 'TrafficAnalyticsConfigurationProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(TrafficAnalyticsProperties, self).__init__(**kwargs) + self.network_watcher_flow_analytics_configuration = kwargs.get('network_watcher_flow_analytics_configuration', None) + + +class TrafficSelectorPolicy(msrest.serialization.Model): + """An traffic selector policy for a virtual network gateway connection. + + All required parameters must be populated in order to send to Azure. + + :param local_address_ranges: Required. A collection of local address spaces in CIDR format. + :type local_address_ranges: list[str] + :param remote_address_ranges: Required. A collection of remote address spaces in CIDR format. + :type remote_address_ranges: list[str] + """ + + _validation = { + 'local_address_ranges': {'required': True}, + 'remote_address_ranges': {'required': True}, + } + + _attribute_map = { + 'local_address_ranges': {'key': 'localAddressRanges', 'type': '[str]'}, + 'remote_address_ranges': {'key': 'remoteAddressRanges', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(TrafficSelectorPolicy, self).__init__(**kwargs) + self.local_address_ranges = kwargs['local_address_ranges'] + self.remote_address_ranges = kwargs['remote_address_ranges'] + + +class TroubleshootingDetails(msrest.serialization.Model): + """Information gained from troubleshooting of specified resource. + + :param id: The id of the get troubleshoot operation. + :type id: str + :param reason_type: Reason type of failure. + :type reason_type: str + :param summary: A summary of troubleshooting. + :type summary: str + :param detail: Details on troubleshooting results. + :type detail: str + :param recommended_actions: List of recommended actions. + :type recommended_actions: + list[~azure.mgmt.network.v2021_05_01.models.TroubleshootingRecommendedActions] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'reason_type': {'key': 'reasonType', 'type': 'str'}, + 'summary': {'key': 'summary', 'type': 'str'}, + 'detail': {'key': 'detail', 'type': 'str'}, + 'recommended_actions': {'key': 'recommendedActions', 'type': '[TroubleshootingRecommendedActions]'}, + } + + def __init__( + self, + **kwargs + ): + super(TroubleshootingDetails, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.reason_type = kwargs.get('reason_type', None) + self.summary = kwargs.get('summary', None) + self.detail = kwargs.get('detail', None) + self.recommended_actions = kwargs.get('recommended_actions', None) + + +class TroubleshootingParameters(msrest.serialization.Model): + """Parameters that define the resource to troubleshoot. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The target resource to troubleshoot. + :type target_resource_id: str + :param storage_id: Required. The ID for the storage account to save the troubleshoot result. + :type storage_id: str + :param storage_path: Required. The path to the blob to save the troubleshoot result in. + :type storage_path: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'storage_id': {'required': True}, + 'storage_path': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, + 'storage_path': {'key': 'properties.storagePath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TroubleshootingParameters, self).__init__(**kwargs) + self.target_resource_id = kwargs['target_resource_id'] + self.storage_id = kwargs['storage_id'] + self.storage_path = kwargs['storage_path'] + + +class TroubleshootingRecommendedActions(msrest.serialization.Model): + """Recommended actions based on discovered issues. + + :param action_id: ID of the recommended action. + :type action_id: str + :param action_text: Description of recommended actions. + :type action_text: str + :param action_uri: The uri linking to a documentation for the recommended troubleshooting + actions. + :type action_uri: str + :param action_uri_text: The information from the URI for the recommended troubleshooting + actions. + :type action_uri_text: str + """ + + _attribute_map = { + 'action_id': {'key': 'actionId', 'type': 'str'}, + 'action_text': {'key': 'actionText', 'type': 'str'}, + 'action_uri': {'key': 'actionUri', 'type': 'str'}, + 'action_uri_text': {'key': 'actionUriText', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TroubleshootingRecommendedActions, self).__init__(**kwargs) + self.action_id = kwargs.get('action_id', None) + self.action_text = kwargs.get('action_text', None) + self.action_uri = kwargs.get('action_uri', None) + self.action_uri_text = kwargs.get('action_uri_text', None) + + +class TroubleshootingResult(msrest.serialization.Model): + """Troubleshooting information gained from specified resource. + + :param start_time: The start time of the troubleshooting. + :type start_time: ~datetime.datetime + :param end_time: The end time of the troubleshooting. + :type end_time: ~datetime.datetime + :param code: The result code of the troubleshooting. + :type code: str + :param results: Information from troubleshooting. + :type results: list[~azure.mgmt.network.v2021_05_01.models.TroubleshootingDetails] + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(TroubleshootingResult, self).__init__(**kwargs) + self.start_time = kwargs.get('start_time', None) + self.end_time = kwargs.get('end_time', None) + self.code = kwargs.get('code', None) + self.results = kwargs.get('results', None) + + +class TunnelConnectionHealth(msrest.serialization.Model): + """VirtualNetworkGatewayConnection properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar tunnel: Tunnel name. + :vartype tunnel: str + :ivar connection_status: Virtual Network Gateway connection status. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionStatus + :ivar ingress_bytes_transferred: The Ingress Bytes Transferred in this connection. + :vartype ingress_bytes_transferred: long + :ivar egress_bytes_transferred: The Egress Bytes Transferred in this connection. + :vartype egress_bytes_transferred: long + :ivar last_connection_established_utc_time: The time at which connection was established in Utc + format. + :vartype last_connection_established_utc_time: str + """ + + _validation = { + 'tunnel': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'last_connection_established_utc_time': {'readonly': True}, + } + + _attribute_map = { + 'tunnel': {'key': 'tunnel', 'type': 'str'}, + 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, + 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, + 'last_connection_established_utc_time': {'key': 'lastConnectionEstablishedUtcTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TunnelConnectionHealth, self).__init__(**kwargs) + self.tunnel = None + self.connection_status = None + self.ingress_bytes_transferred = None + self.egress_bytes_transferred = None + self.last_connection_established_utc_time = None + + +class UnprepareNetworkPoliciesRequest(msrest.serialization.Model): + """Details of UnprepareNetworkPolicies for Subnet. + + :param service_name: The name of the service for which subnet is being unprepared for. + :type service_name: str + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UnprepareNetworkPoliciesRequest, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + + +class Usage(msrest.serialization.Model): + """The network resource usage. + + 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. + + :ivar id: Resource identifier. + :vartype id: str + :param unit: Required. An enum describing the unit of measurement. Possible values include: + "Count". + :type unit: str or ~azure.mgmt.network.v2021_05_01.models.UsageUnit + :param current_value: Required. The current value of the usage. + :type current_value: long + :param limit: Required. The limit of usage. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.network.v2021_05_01.models.UsageName + """ + + _validation = { + 'id': {'readonly': True}, + 'unit': {'required': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__( + self, + **kwargs + ): + super(Usage, self).__init__(**kwargs) + self.id = None + self.unit = kwargs['unit'] + self.current_value = kwargs['current_value'] + self.limit = kwargs['limit'] + self.name = kwargs['name'] + + +class UsageName(msrest.serialization.Model): + """The usage names. + + :param value: A string describing the resource name. + :type value: str + :param localized_value: A localized string describing the resource name. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UsageName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) + + +class UsagesListResult(msrest.serialization.Model): + """The list usages operation response. + + :param value: The list network resource usages. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Usage] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UsagesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class VerificationIPFlowParameters(msrest.serialization.Model): + """Parameters that define the IP flow to be verified. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The ID of the target resource to perform next-hop on. + :type target_resource_id: str + :param direction: Required. The direction of the packet represented as a 5-tuple. Possible + values include: "Inbound", "Outbound". + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.Direction + :param protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.IpFlowProtocol + :param local_port: Required. The local port. Acceptable values are a single integer in the + range (0-65535). Support for * for the source port, which depends on the direction. + :type local_port: str + :param remote_port: Required. The remote port. Acceptable values are a single integer in the + range (0-65535). Support for * for the source port, which depends on the direction. + :type remote_port: str + :param local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 + addresses. + :type local_ip_address: str + :param remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 + addresses. + :type remote_ip_address: str + :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is + enabled on any of them, then this parameter must be specified. Otherwise optional). + :type target_nic_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'direction': {'required': True}, + 'protocol': {'required': True}, + 'local_port': {'required': True}, + 'remote_port': {'required': True}, + 'local_ip_address': {'required': True}, + 'remote_ip_address': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'direction': {'key': 'direction', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'local_port': {'key': 'localPort', 'type': 'str'}, + 'remote_port': {'key': 'remotePort', 'type': 'str'}, + 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, + 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, + 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VerificationIPFlowParameters, self).__init__(**kwargs) + self.target_resource_id = kwargs['target_resource_id'] + self.direction = kwargs['direction'] + self.protocol = kwargs['protocol'] + self.local_port = kwargs['local_port'] + self.remote_port = kwargs['remote_port'] + self.local_ip_address = kwargs['local_ip_address'] + self.remote_ip_address = kwargs['remote_ip_address'] + self.target_nic_resource_id = kwargs.get('target_nic_resource_id', None) + + +class VerificationIPFlowResult(msrest.serialization.Model): + """Results of IP flow verification on the target resource. + + :param access: Indicates whether the traffic is allowed or denied. Possible values include: + "Allow", "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.Access + :param rule_name: Name of the rule. If input is not matched against any security rule, it is + not displayed. + :type rule_name: str + """ + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VerificationIPFlowResult, self).__init__(**kwargs) + self.access = kwargs.get('access', None) + self.rule_name = kwargs.get('rule_name', None) + + +class VirtualApplianceNicProperties(msrest.serialization.Model): + """Network Virtual Appliance NIC properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: NIC name. + :vartype name: str + :ivar public_ip_address: Public IP address. + :vartype public_ip_address: str + :ivar private_ip_address: Private IP address. + :vartype private_ip_address: str + """ + + _validation = { + 'name': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualApplianceNicProperties, self).__init__(**kwargs) + self.name = None + self.public_ip_address = None + self.private_ip_address = None + + +class VirtualApplianceSite(SubResource): + """Virtual Appliance Site resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the virtual appliance site. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Site type. + :vartype type: str + :param address_prefix: Address Prefix. + :type address_prefix: str + :param o365_policy: Office 365 Policy. + :type o365_policy: ~azure.mgmt.network.v2021_05_01.models.Office365PolicyProperties + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'o365_policy': {'key': 'properties.o365Policy', 'type': 'Office365PolicyProperties'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualApplianceSite, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.address_prefix = kwargs.get('address_prefix', None) + self.o365_policy = kwargs.get('o365_policy', None) + self.provisioning_state = None + + +class VirtualApplianceSkuProperties(msrest.serialization.Model): + """Network Virtual Appliance Sku Properties. + + :param vendor: Virtual Appliance Vendor. + :type vendor: str + :param bundled_scale_unit: Virtual Appliance Scale Unit. + :type bundled_scale_unit: str + :param market_place_version: Virtual Appliance Version. + :type market_place_version: str + """ + + _attribute_map = { + 'vendor': {'key': 'vendor', 'type': 'str'}, + 'bundled_scale_unit': {'key': 'bundledScaleUnit', 'type': 'str'}, + 'market_place_version': {'key': 'marketPlaceVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualApplianceSkuProperties, self).__init__(**kwargs) + self.vendor = kwargs.get('vendor', None) + self.bundled_scale_unit = kwargs.get('bundled_scale_unit', None) + self.market_place_version = kwargs.get('market_place_version', None) + + +class VirtualHub(Resource): + """VirtualHub Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar kind: Kind of service virtual hub. This is metadata used for the Azure portal experience + for Route Server. + :vartype kind: str + :param virtual_wan: The VirtualWAN to which the VirtualHub belongs. + :type virtual_wan: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param vpn_gateway: The VpnGateway associated with this VirtualHub. + :type vpn_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param p2_s_vpn_gateway: The P2SVpnGateway associated with this VirtualHub. + :type p2_s_vpn_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param express_route_gateway: The expressRouteGateway associated with this VirtualHub. + :type express_route_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param azure_firewall: The azureFirewall associated with this VirtualHub. + :type azure_firewall: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param security_partner_provider: The securityPartnerProvider associated with this VirtualHub. + :type security_partner_provider: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param address_prefix: Address-prefix for this VirtualHub. + :type address_prefix: str + :param route_table: The routeTable associated with this virtual hub. + :type route_table: ~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTable + :ivar provisioning_state: The provisioning state of the virtual hub resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param security_provider_name: The Security Provider name. + :type security_provider_name: str + :param virtual_hub_route_table_v2_s: List of all virtual hub route table v2s associated with + this VirtualHub. + :type virtual_hub_route_table_v2_s: + list[~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2] + :param sku: The sku of this VirtualHub. + :type sku: str + :ivar routing_state: The routing state. Possible values include: "None", "Provisioned", + "Provisioning", "Failed". + :vartype routing_state: str or ~azure.mgmt.network.v2021_05_01.models.RoutingState + :ivar bgp_connections: List of references to Bgp Connections. + :vartype bgp_connections: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar ip_configurations: List of references to IpConfigurations. + :vartype ip_configurations: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param virtual_router_asn: VirtualRouter ASN. + :type virtual_router_asn: long + :param virtual_router_ips: VirtualRouter IPs. + :type virtual_router_ips: list[str] + :param allow_branch_to_branch_traffic: Flag to control transit for VirtualRouter hub. + :type allow_branch_to_branch_traffic: bool + :param preferred_routing_gateway: The preferred gateway to route on-prem traffic. Possible + values include: "ExpressRoute", "VpnGateway", "None". + :type preferred_routing_gateway: str or + ~azure.mgmt.network.v2021_05_01.models.PreferredRoutingGateway + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'routing_state': {'readonly': True}, + 'bgp_connections': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + 'virtual_router_asn': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'virtual_wan': {'key': 'properties.virtualWan', 'type': 'SubResource'}, + 'vpn_gateway': {'key': 'properties.vpnGateway', 'type': 'SubResource'}, + 'p2_s_vpn_gateway': {'key': 'properties.p2SVpnGateway', 'type': 'SubResource'}, + 'express_route_gateway': {'key': 'properties.expressRouteGateway', 'type': 'SubResource'}, + 'azure_firewall': {'key': 'properties.azureFirewall', 'type': 'SubResource'}, + 'security_partner_provider': {'key': 'properties.securityPartnerProvider', 'type': 'SubResource'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'route_table': {'key': 'properties.routeTable', 'type': 'VirtualHubRouteTable'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'security_provider_name': {'key': 'properties.securityProviderName', 'type': 'str'}, + 'virtual_hub_route_table_v2_s': {'key': 'properties.virtualHubRouteTableV2s', 'type': '[VirtualHubRouteTableV2]'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'routing_state': {'key': 'properties.routingState', 'type': 'str'}, + 'bgp_connections': {'key': 'properties.bgpConnections', 'type': '[SubResource]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[SubResource]'}, + 'virtual_router_asn': {'key': 'properties.virtualRouterAsn', 'type': 'long'}, + 'virtual_router_ips': {'key': 'properties.virtualRouterIps', 'type': '[str]'}, + 'allow_branch_to_branch_traffic': {'key': 'properties.allowBranchToBranchTraffic', 'type': 'bool'}, + 'preferred_routing_gateway': {'key': 'properties.preferredRoutingGateway', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualHub, self).__init__(**kwargs) + self.etag = None + self.kind = None + self.virtual_wan = kwargs.get('virtual_wan', None) + self.vpn_gateway = kwargs.get('vpn_gateway', None) + self.p2_s_vpn_gateway = kwargs.get('p2_s_vpn_gateway', None) + self.express_route_gateway = kwargs.get('express_route_gateway', None) + self.azure_firewall = kwargs.get('azure_firewall', None) + self.security_partner_provider = kwargs.get('security_partner_provider', None) + self.address_prefix = kwargs.get('address_prefix', None) + self.route_table = kwargs.get('route_table', None) + self.provisioning_state = None + self.security_provider_name = kwargs.get('security_provider_name', None) + self.virtual_hub_route_table_v2_s = kwargs.get('virtual_hub_route_table_v2_s', None) + self.sku = kwargs.get('sku', None) + self.routing_state = None + self.bgp_connections = None + self.ip_configurations = None + self.virtual_router_asn = kwargs.get('virtual_router_asn', None) + self.virtual_router_ips = kwargs.get('virtual_router_ips', None) + self.allow_branch_to_branch_traffic = kwargs.get('allow_branch_to_branch_traffic', None) + self.preferred_routing_gateway = kwargs.get('preferred_routing_gateway', None) + + +class VirtualHubEffectiveRoute(msrest.serialization.Model): + """The effective route configured on the virtual hub or specified resource. + + :param address_prefixes: The list of address prefixes. + :type address_prefixes: list[str] + :param next_hops: The list of next hops. + :type next_hops: list[str] + :param next_hop_type: The type of the next hop. + :type next_hop_type: str + :param as_path: The ASPath of this route. + :type as_path: str + :param route_origin: The origin of this route. + :type route_origin: str + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'next_hops': {'key': 'nextHops', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'as_path': {'key': 'asPath', 'type': 'str'}, + 'route_origin': {'key': 'routeOrigin', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualHubEffectiveRoute, self).__init__(**kwargs) + self.address_prefixes = kwargs.get('address_prefixes', None) + self.next_hops = kwargs.get('next_hops', None) + self.next_hop_type = kwargs.get('next_hop_type', None) + self.as_path = kwargs.get('as_path', None) + self.route_origin = kwargs.get('route_origin', None) + + +class VirtualHubEffectiveRouteList(msrest.serialization.Model): + """EffectiveRoutes List. + + :param value: The list of effective routes configured on the virtual hub or the specified + resource. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualHubEffectiveRoute] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualHubEffectiveRoute]'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualHubEffectiveRouteList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VirtualHubId(msrest.serialization.Model): + """Virtual Hub identifier. + + :param id: The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be + deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same + subscription. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualHubId, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + + +class VirtualHubRoute(msrest.serialization.Model): + """VirtualHub route. + + :param address_prefixes: List of all addressPrefixes. + :type address_prefixes: list[str] + :param next_hop_ip_address: NextHop ip address. + :type next_hop_ip_address: str + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualHubRoute, self).__init__(**kwargs) + self.address_prefixes = kwargs.get('address_prefixes', None) + self.next_hop_ip_address = kwargs.get('next_hop_ip_address', None) + + +class VirtualHubRouteTable(msrest.serialization.Model): + """VirtualHub route table. + + :param routes: List of all routes. + :type routes: list[~azure.mgmt.network.v2021_05_01.models.VirtualHubRoute] + """ + + _attribute_map = { + 'routes': {'key': 'routes', 'type': '[VirtualHubRoute]'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualHubRouteTable, self).__init__(**kwargs) + self.routes = kwargs.get('routes', None) + + +class VirtualHubRouteTableV2(SubResource): + """VirtualHubRouteTableV2 Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param routes: List of all routes. + :type routes: list[~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteV2] + :param attached_connections: List of all connections attached to this route table v2. + :type attached_connections: list[str] + :ivar provisioning_state: The provisioning state of the virtual hub route table v2 resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[VirtualHubRouteV2]'}, + 'attached_connections': {'key': 'properties.attachedConnections', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualHubRouteTableV2, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.routes = kwargs.get('routes', None) + self.attached_connections = kwargs.get('attached_connections', None) + self.provisioning_state = None + + +class VirtualHubRouteV2(msrest.serialization.Model): + """VirtualHubRouteTableV2 route. + + :param destination_type: The type of destinations. + :type destination_type: str + :param destinations: List of all destinations. + :type destinations: list[str] + :param next_hop_type: The type of next hops. + :type next_hop_type: str + :param next_hops: NextHops ip address. + :type next_hops: list[str] + """ + + _attribute_map = { + 'destination_type': {'key': 'destinationType', 'type': 'str'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'next_hops': {'key': 'nextHops', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualHubRouteV2, self).__init__(**kwargs) + self.destination_type = kwargs.get('destination_type', None) + self.destinations = kwargs.get('destinations', None) + self.next_hop_type = kwargs.get('next_hop_type', None) + self.next_hops = kwargs.get('next_hops', None) + + +class VirtualNetwork(Resource): + """Virtual Network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the virtual network. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param address_space: The AddressSpace that contains an array of IP address ranges that can be + used by subnets. + :type address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs + deployed in the virtual network. + :type dhcp_options: ~azure.mgmt.network.v2021_05_01.models.DhcpOptions + :param flow_timeout_in_minutes: The FlowTimeout value (in minutes) for the Virtual Network. + :type flow_timeout_in_minutes: int + :param subnets: A list of subnets in a Virtual Network. + :type subnets: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :param virtual_network_peerings: A list of peerings in a Virtual Network. + :type virtual_network_peerings: + list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering] + :ivar resource_guid: The resourceGuid property of the Virtual Network resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param enable_ddos_protection: Indicates if DDoS protection is enabled for all the protected + resources in the virtual network. It requires a DDoS protection plan associated with the + resource. + :type enable_ddos_protection: bool + :param enable_vm_protection: Indicates if VM protection is enabled for all the subnets in the + virtual network. + :type enable_vm_protection: bool + :param ddos_protection_plan: The DDoS protection plan associated with the virtual network. + :type ddos_protection_plan: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param bgp_communities: Bgp Communities sent over ExpressRoute with each route corresponding to + a prefix in this VNET. + :type bgp_communities: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkBgpCommunities + :param encryption: Indicates if encryption is enabled on virtual network and if VM without + encryption is allowed in encrypted VNet. + :type encryption: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkEncryption + :param ip_allocations: Array of IpAllocation which reference this VNET. + :type ip_allocations: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, + 'dhcp_options': {'key': 'properties.dhcpOptions', 'type': 'DhcpOptions'}, + 'flow_timeout_in_minutes': {'key': 'properties.flowTimeoutInMinutes', 'type': 'int'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'virtual_network_peerings': {'key': 'properties.virtualNetworkPeerings', 'type': '[VirtualNetworkPeering]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'enable_ddos_protection': {'key': 'properties.enableDdosProtection', 'type': 'bool'}, + 'enable_vm_protection': {'key': 'properties.enableVmProtection', 'type': 'bool'}, + 'ddos_protection_plan': {'key': 'properties.ddosProtectionPlan', 'type': 'SubResource'}, + 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': 'VirtualNetworkBgpCommunities'}, + 'encryption': {'key': 'properties.encryption', 'type': 'VirtualNetworkEncryption'}, + 'ip_allocations': {'key': 'properties.ipAllocations', 'type': '[SubResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetwork, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.etag = None + self.address_space = kwargs.get('address_space', None) + self.dhcp_options = kwargs.get('dhcp_options', None) + self.flow_timeout_in_minutes = kwargs.get('flow_timeout_in_minutes', None) + self.subnets = kwargs.get('subnets', None) + self.virtual_network_peerings = kwargs.get('virtual_network_peerings', None) + self.resource_guid = None + self.provisioning_state = None + self.enable_ddos_protection = kwargs.get('enable_ddos_protection', False) + self.enable_vm_protection = kwargs.get('enable_vm_protection', False) + self.ddos_protection_plan = kwargs.get('ddos_protection_plan', None) + self.bgp_communities = kwargs.get('bgp_communities', None) + self.encryption = kwargs.get('encryption', None) + self.ip_allocations = kwargs.get('ip_allocations', None) + + +class VirtualNetworkBgpCommunities(msrest.serialization.Model): + """Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. + + 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 virtual_network_community: Required. The BGP community associated with the virtual + network. + :type virtual_network_community: str + :ivar regional_community: The BGP community associated with the region of the virtual network. + :vartype regional_community: str + """ + + _validation = { + 'virtual_network_community': {'required': True}, + 'regional_community': {'readonly': True}, + } + + _attribute_map = { + 'virtual_network_community': {'key': 'virtualNetworkCommunity', 'type': 'str'}, + 'regional_community': {'key': 'regionalCommunity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkBgpCommunities, self).__init__(**kwargs) + self.virtual_network_community = kwargs['virtual_network_community'] + self.regional_community = None + + +class VirtualNetworkConnectionGatewayReference(msrest.serialization.Model): + """A reference to VirtualNetworkGateway or LocalNetworkGateway resource. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkConnectionGatewayReference, self).__init__(**kwargs) + self.id = kwargs['id'] + + +class VirtualNetworkEncryption(msrest.serialization.Model): + """Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Indicates if encryption is enabled on the virtual network. + :type enabled: bool + :param enforcement: If the encrypted VNet allows VM that does not support encryption. Possible + values include: "DropUnencrypted", "AllowUnencrypted". + :type enforcement: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkEncryptionEnforcement + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'enforcement': {'key': 'enforcement', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkEncryption, self).__init__(**kwargs) + self.enabled = kwargs['enabled'] + self.enforcement = kwargs.get('enforcement', None) + + +class VirtualNetworkGateway(Resource): + """A common class for general resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of type local virtual network gateway. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param ip_configurations: IP configurations for virtual network gateway. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayIPConfiguration] + :param gateway_type: The type of this virtual network gateway. Possible values include: "Vpn", + "ExpressRoute", "LocalGateway". + :type gateway_type: str or ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayType + :param vpn_type: The type of this virtual network gateway. Possible values include: + "PolicyBased", "RouteBased". + :type vpn_type: str or ~azure.mgmt.network.v2021_05_01.models.VpnType + :param vpn_gateway_generation: The generation for this VirtualNetworkGateway. Must be None if + gatewayType is not VPN. Possible values include: "None", "Generation1", "Generation2". + :type vpn_gateway_generation: str or + ~azure.mgmt.network.v2021_05_01.models.VpnGatewayGeneration + :param enable_bgp: Whether BGP is enabled for this virtual network gateway or not. + :type enable_bgp: bool + :param enable_private_ip_address: Whether private IP needs to be enabled on this gateway for + connections or not. + :type enable_private_ip_address: bool + :param active: ActiveActive flag. + :type active: bool + :param disable_ip_sec_replay_protection: disableIPSecReplayProtection flag. + :type disable_ip_sec_replay_protection: bool + :param gateway_default_site: The reference to the LocalNetworkGateway resource which represents + local network site having default routes. Assign Null value in case of removing existing + default site setting. + :type gateway_default_site: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param sku: The reference to the VirtualNetworkGatewaySku resource which represents the SKU + selected for Virtual network gateway. + :type sku: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewaySku + :param vpn_client_configuration: The reference to the VpnClientConfiguration resource which + represents the P2S VpnClient configurations. + :type vpn_client_configuration: ~azure.mgmt.network.v2021_05_01.models.VpnClientConfiguration + :param bgp_settings: Virtual network gateway's BGP speaker settings. + :type bgp_settings: ~azure.mgmt.network.v2021_05_01.models.BgpSettings + :param custom_routes: The reference to the address space resource which represents the custom + routes address space specified by the customer for virtual network gateway and VpnClient. + :type custom_routes: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :ivar resource_guid: The resource GUID property of the virtual network gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network gateway resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param enable_dns_forwarding: Whether dns forwarding is enabled or not. + :type enable_dns_forwarding: bool + :ivar inbound_dns_forwarding_endpoint: The IP address allocated by the gateway to which dns + requests can be sent. + :vartype inbound_dns_forwarding_endpoint: str + :param v_net_extended_location_resource_id: Customer vnet resource id. VirtualNetworkGateway of + type local gateway is associated with the customer vnet. + :type v_net_extended_location_resource_id: str + :param nat_rules: NatRules for virtual network gateway. + :type nat_rules: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule] + :param enable_bgp_route_translation_for_nat: EnableBgpRouteTranslationForNat flag. + :type enable_bgp_route_translation_for_nat: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'inbound_dns_forwarding_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualNetworkGatewayIPConfiguration]'}, + 'gateway_type': {'key': 'properties.gatewayType', 'type': 'str'}, + 'vpn_type': {'key': 'properties.vpnType', 'type': 'str'}, + 'vpn_gateway_generation': {'key': 'properties.vpnGatewayGeneration', 'type': 'str'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'enable_private_ip_address': {'key': 'properties.enablePrivateIpAddress', 'type': 'bool'}, + 'active': {'key': 'properties.activeActive', 'type': 'bool'}, + 'disable_ip_sec_replay_protection': {'key': 'properties.disableIPSecReplayProtection', 'type': 'bool'}, + 'gateway_default_site': {'key': 'properties.gatewayDefaultSite', 'type': 'SubResource'}, + 'sku': {'key': 'properties.sku', 'type': 'VirtualNetworkGatewaySku'}, + 'vpn_client_configuration': {'key': 'properties.vpnClientConfiguration', 'type': 'VpnClientConfiguration'}, + 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, + 'custom_routes': {'key': 'properties.customRoutes', 'type': 'AddressSpace'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'enable_dns_forwarding': {'key': 'properties.enableDnsForwarding', 'type': 'bool'}, + 'inbound_dns_forwarding_endpoint': {'key': 'properties.inboundDnsForwardingEndpoint', 'type': 'str'}, + 'v_net_extended_location_resource_id': {'key': 'properties.vNetExtendedLocationResourceId', 'type': 'str'}, + 'nat_rules': {'key': 'properties.natRules', 'type': '[VirtualNetworkGatewayNatRule]'}, + 'enable_bgp_route_translation_for_nat': {'key': 'properties.enableBgpRouteTranslationForNat', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkGateway, self).__init__(**kwargs) + self.extended_location = kwargs.get('extended_location', None) + self.etag = None + self.ip_configurations = kwargs.get('ip_configurations', None) + self.gateway_type = kwargs.get('gateway_type', None) + self.vpn_type = kwargs.get('vpn_type', None) + self.vpn_gateway_generation = kwargs.get('vpn_gateway_generation', None) + self.enable_bgp = kwargs.get('enable_bgp', None) + self.enable_private_ip_address = kwargs.get('enable_private_ip_address', None) + self.active = kwargs.get('active', None) + self.disable_ip_sec_replay_protection = kwargs.get('disable_ip_sec_replay_protection', None) + self.gateway_default_site = kwargs.get('gateway_default_site', None) + self.sku = kwargs.get('sku', None) + self.vpn_client_configuration = kwargs.get('vpn_client_configuration', None) + self.bgp_settings = kwargs.get('bgp_settings', None) + self.custom_routes = kwargs.get('custom_routes', None) + self.resource_guid = None + self.provisioning_state = None + self.enable_dns_forwarding = kwargs.get('enable_dns_forwarding', None) + self.inbound_dns_forwarding_endpoint = None + self.v_net_extended_location_resource_id = kwargs.get('v_net_extended_location_resource_id', None) + self.nat_rules = kwargs.get('nat_rules', None) + self.enable_bgp_route_translation_for_nat = kwargs.get('enable_bgp_route_translation_for_nat', None) + + +class VirtualNetworkGatewayConnection(Resource): + """A common class for general resource information. + + 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 id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param authorization_key: The authorizationKey. + :type authorization_key: str + :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. + :type virtual_network_gateway1: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway + :param virtual_network_gateway2: The reference to virtual network gateway resource. + :type virtual_network_gateway2: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway + :param local_network_gateway2: The reference to local network gateway resource. + :type local_network_gateway2: ~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway + :param ingress_nat_rules: List of ingress NatRules. + :type ingress_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param egress_nat_rules: List of egress NatRules. + :type egress_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param connection_type: Required. Gateway connection type. Possible values include: "IPsec", + "Vnet2Vnet", "ExpressRoute", "VPNClient". + :type connection_type: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionType + :param connection_protocol: Connection protocol used for this connection. Possible values + include: "IKEv2", "IKEv1". + :type connection_protocol: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionProtocol + :param routing_weight: The routing weight. + :type routing_weight: int + :param dpd_timeout_seconds: The dead peer detection timeout of this connection in seconds. + :type dpd_timeout_seconds: int + :param connection_mode: The connection mode for this connection. Possible values include: + "Default", "ResponderOnly", "InitiatorOnly". + :type connection_mode: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionMode + :param shared_key: The IPSec shared key. + :type shared_key: str + :ivar connection_status: Virtual Network Gateway connection status. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionStatus + :ivar tunnel_connection_status: Collection of all tunnels' connection health status. + :vartype tunnel_connection_status: + list[~azure.mgmt.network.v2021_05_01.models.TunnelConnectionHealth] + :ivar egress_bytes_transferred: The egress bytes transferred in this connection. + :vartype egress_bytes_transferred: long + :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. + :vartype ingress_bytes_transferred: long + :param peer: The reference to peerings resource. + :type peer: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param enable_bgp: EnableBgp flag. + :type enable_bgp: bool + :param use_local_azure_ip_address: Use private local Azure IP for the connection. + :type use_local_azure_ip_address: bool + :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :type use_policy_based_traffic_selectors: bool + :param ipsec_policies: The IPSec Policies to be considered by this connection. + :type ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :type traffic_selector_policies: + list[~azure.mgmt.network.v2021_05_01.models.TrafficSelectorPolicy] + :ivar resource_guid: The resource GUID property of the virtual network gateway connection + resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network gateway connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. + :type express_route_gateway_bypass: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_network_gateway1': {'required': True}, + 'connection_type': {'required': True}, + 'connection_status': {'readonly': True}, + 'tunnel_connection_status': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkGateway'}, + 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkGateway'}, + 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'LocalNetworkGateway'}, + 'ingress_nat_rules': {'key': 'properties.ingressNatRules', 'type': '[SubResource]'}, + 'egress_nat_rules': {'key': 'properties.egressNatRules', 'type': '[SubResource]'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, + 'connection_protocol': {'key': 'properties.connectionProtocol', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'dpd_timeout_seconds': {'key': 'properties.dpdTimeoutSeconds', 'type': 'int'}, + 'connection_mode': {'key': 'properties.connectionMode', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'use_local_azure_ip_address': {'key': 'properties.useLocalAzureIpAddress', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'traffic_selector_policies': {'key': 'properties.trafficSelectorPolicies', 'type': '[TrafficSelectorPolicy]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkGatewayConnection, self).__init__(**kwargs) + self.etag = None + self.authorization_key = kwargs.get('authorization_key', None) + self.virtual_network_gateway1 = kwargs['virtual_network_gateway1'] + self.virtual_network_gateway2 = kwargs.get('virtual_network_gateway2', None) + self.local_network_gateway2 = kwargs.get('local_network_gateway2', None) + self.ingress_nat_rules = kwargs.get('ingress_nat_rules', None) + self.egress_nat_rules = kwargs.get('egress_nat_rules', None) + self.connection_type = kwargs['connection_type'] + self.connection_protocol = kwargs.get('connection_protocol', None) + self.routing_weight = kwargs.get('routing_weight', None) + self.dpd_timeout_seconds = kwargs.get('dpd_timeout_seconds', None) + self.connection_mode = kwargs.get('connection_mode', None) + self.shared_key = kwargs.get('shared_key', None) + self.connection_status = None + self.tunnel_connection_status = None + self.egress_bytes_transferred = None + self.ingress_bytes_transferred = None + self.peer = kwargs.get('peer', None) + self.enable_bgp = kwargs.get('enable_bgp', None) + self.use_local_azure_ip_address = kwargs.get('use_local_azure_ip_address', None) + self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) + self.ipsec_policies = kwargs.get('ipsec_policies', None) + self.traffic_selector_policies = kwargs.get('traffic_selector_policies', None) + self.resource_guid = None + self.provisioning_state = None + self.express_route_gateway_bypass = kwargs.get('express_route_gateway_bypass', None) + + +class VirtualNetworkGatewayConnectionListEntity(Resource): + """A common class for general resource information. + + 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 id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param authorization_key: The authorizationKey. + :type authorization_key: str + :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. + :type virtual_network_gateway1: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkConnectionGatewayReference + :param virtual_network_gateway2: The reference to virtual network gateway resource. + :type virtual_network_gateway2: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkConnectionGatewayReference + :param local_network_gateway2: The reference to local network gateway resource. + :type local_network_gateway2: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkConnectionGatewayReference + :param connection_type: Required. Gateway connection type. Possible values include: "IPsec", + "Vnet2Vnet", "ExpressRoute", "VPNClient". + :type connection_type: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionType + :param connection_protocol: Connection protocol used for this connection. Possible values + include: "IKEv2", "IKEv1". + :type connection_protocol: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionProtocol + :param routing_weight: The routing weight. + :type routing_weight: int + :param connection_mode: The connection mode for this connection. Possible values include: + "Default", "ResponderOnly", "InitiatorOnly". + :type connection_mode: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionMode + :param shared_key: The IPSec shared key. + :type shared_key: str + :ivar connection_status: Virtual Network Gateway connection status. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionStatus + :ivar tunnel_connection_status: Collection of all tunnels' connection health status. + :vartype tunnel_connection_status: + list[~azure.mgmt.network.v2021_05_01.models.TunnelConnectionHealth] + :ivar egress_bytes_transferred: The egress bytes transferred in this connection. + :vartype egress_bytes_transferred: long + :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. + :vartype ingress_bytes_transferred: long + :param peer: The reference to peerings resource. + :type peer: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param enable_bgp: EnableBgp flag. + :type enable_bgp: bool + :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :type use_policy_based_traffic_selectors: bool + :param ipsec_policies: The IPSec Policies to be considered by this connection. + :type ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :type traffic_selector_policies: + list[~azure.mgmt.network.v2021_05_01.models.TrafficSelectorPolicy] + :ivar resource_guid: The resource GUID property of the virtual network gateway connection + resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network gateway connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. + :type express_route_gateway_bypass: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_network_gateway1': {'required': True}, + 'connection_type': {'required': True}, + 'connection_status': {'readonly': True}, + 'tunnel_connection_status': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkConnectionGatewayReference'}, + 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, + 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, + 'connection_protocol': {'key': 'properties.connectionProtocol', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'connection_mode': {'key': 'properties.connectionMode', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'traffic_selector_policies': {'key': 'properties.trafficSelectorPolicies', 'type': '[TrafficSelectorPolicy]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkGatewayConnectionListEntity, self).__init__(**kwargs) + self.etag = None + self.authorization_key = kwargs.get('authorization_key', None) + self.virtual_network_gateway1 = kwargs['virtual_network_gateway1'] + self.virtual_network_gateway2 = kwargs.get('virtual_network_gateway2', None) + self.local_network_gateway2 = kwargs.get('local_network_gateway2', None) + self.connection_type = kwargs['connection_type'] + self.connection_protocol = kwargs.get('connection_protocol', None) + self.routing_weight = kwargs.get('routing_weight', None) + self.connection_mode = kwargs.get('connection_mode', None) + self.shared_key = kwargs.get('shared_key', None) + self.connection_status = None + self.tunnel_connection_status = None + self.egress_bytes_transferred = None + self.ingress_bytes_transferred = None + self.peer = kwargs.get('peer', None) + self.enable_bgp = kwargs.get('enable_bgp', None) + self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) + self.ipsec_policies = kwargs.get('ipsec_policies', None) + self.traffic_selector_policies = kwargs.get('traffic_selector_policies', None) + self.resource_guid = None + self.provisioning_state = None + self.express_route_gateway_bypass = kwargs.get('express_route_gateway_bypass', None) + + +class VirtualNetworkGatewayConnectionListResult(msrest.serialization.Model): + """Response for the ListVirtualNetworkGatewayConnections API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of VirtualNetworkGatewayConnection resources that exists in a resource + group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkGatewayConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class VirtualNetworkGatewayIPConfiguration(SubResource): + """IP configuration for virtual network gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param public_ip_address: The reference to the public IP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar private_ip_address: Private IP Address for this gateway. + :vartype private_ip_address: str + :ivar provisioning_state: The provisioning state of the virtual network gateway IP + configuration resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkGatewayIPConfiguration, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.private_ip_allocation_method = kwargs.get('private_ip_allocation_method', None) + self.subnet = kwargs.get('subnet', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = None + self.provisioning_state = None + + +class VirtualNetworkGatewayListConnectionsResult(msrest.serialization.Model): + """Response for the VirtualNetworkGatewayListConnections API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of VirtualNetworkGatewayConnection resources that exists in a resource + group. + :type value: + list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionListEntity] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnectionListEntity]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkGatewayListConnectionsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class VirtualNetworkGatewayListResult(msrest.serialization.Model): + """Response for the ListVirtualNetworkGateways API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of VirtualNetworkGateway resources that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkGatewayListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class VirtualNetworkGatewayNatRule(SubResource): + """VirtualNetworkGatewayNatRule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: The provisioning state of the NAT Rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param type_properties_type: The type of NAT rule for VPN NAT. Possible values include: + "Static", "Dynamic". + :type type_properties_type: str or ~azure.mgmt.network.v2021_05_01.models.VpnNatRuleType + :param mode: The Source NAT direction of a VPN NAT. Possible values include: "EgressSnat", + "IngressSnat". + :type mode: str or ~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMode + :param internal_mappings: The private IP address internal mapping for NAT. + :type internal_mappings: list[~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMapping] + :param external_mappings: The private IP address external mapping for NAT. + :type external_mappings: list[~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMapping] + :param ip_configuration_id: The IP Configuration ID this NAT rule applies to. + :type ip_configuration_id: str + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'internal_mappings': {'key': 'properties.internalMappings', 'type': '[VpnNatRuleMapping]'}, + 'external_mappings': {'key': 'properties.externalMappings', 'type': '[VpnNatRuleMapping]'}, + 'ip_configuration_id': {'key': 'properties.ipConfigurationId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkGatewayNatRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.provisioning_state = None + self.type_properties_type = kwargs.get('type_properties_type', None) + self.mode = kwargs.get('mode', None) + self.internal_mappings = kwargs.get('internal_mappings', None) + self.external_mappings = kwargs.get('external_mappings', None) + self.ip_configuration_id = kwargs.get('ip_configuration_id', None) + + +class VirtualNetworkGatewaySku(msrest.serialization.Model): + """VirtualNetworkGatewaySku details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", "Standard", + "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3", "VpnGw4", "VpnGw5", "VpnGw1AZ", "VpnGw2AZ", + "VpnGw3AZ", "VpnGw4AZ", "VpnGw5AZ", "ErGw1AZ", "ErGw2AZ", "ErGw3AZ". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewaySkuName + :param tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", "Standard", + "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3", "VpnGw4", "VpnGw5", "VpnGw1AZ", "VpnGw2AZ", + "VpnGw3AZ", "VpnGw4AZ", "VpnGw5AZ", "ErGw1AZ", "ErGw2AZ", "ErGw3AZ". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewaySkuTier + :ivar capacity: The capacity. + :vartype capacity: int + """ + + _validation = { + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkGatewaySku, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.tier = kwargs.get('tier', None) + self.capacity = None + + +class VirtualNetworkListResult(msrest.serialization.Model): + """Response for the ListVirtualNetworks API service call. + + :param value: A list of VirtualNetwork resources in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetwork] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class VirtualNetworkListUsageResult(msrest.serialization.Model): + """Response for the virtual networks GetUsage API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: VirtualNetwork usage stats. + :vartype value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkUsage] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkListUsageResult, self).__init__(**kwargs) + self.value = None + self.next_link = kwargs.get('next_link', None) + + +class VirtualNetworkPeering(SubResource): + """Peerings in a virtual network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: Resource type. + :type type: str + :param allow_virtual_network_access: Whether the VMs in the local virtual network space would + be able to access the VMs in remote virtual network space. + :type allow_virtual_network_access: bool + :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the local virtual + network will be allowed/disallowed in remote virtual network. + :type allow_forwarded_traffic: bool + :param allow_gateway_transit: If gateway links can be used in remote virtual networking to link + to this virtual network. + :type allow_gateway_transit: bool + :param use_remote_gateways: If remote gateways can be used on this virtual network. If the flag + is set to true, and allowGatewayTransit on remote peering is also true, virtual network will + use gateways of remote virtual network for transit. Only one peering can have this flag set to + true. This flag cannot be set if virtual network already has a gateway. + :type use_remote_gateways: bool + :param remote_virtual_network: The reference to the remote virtual network. The remote virtual + network can be in the same or different region (preview). See here to register for the preview + and learn more + (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + :type remote_virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param remote_address_space: The reference to the address space peered with the remote virtual + network. + :type remote_address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param remote_virtual_network_address_space: The reference to the current address space of the + remote virtual network. + :type remote_virtual_network_address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param remote_bgp_communities: The reference to the remote virtual network's Bgp Communities. + :type remote_bgp_communities: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkBgpCommunities + :ivar remote_virtual_network_encryption: The reference to the remote virtual network's + encryption. + :vartype remote_virtual_network_encryption: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkEncryption + :param peering_state: The status of the virtual network peering. Possible values include: + "Initiated", "Connected", "Disconnected". + :type peering_state: str or ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeeringState + :param peering_sync_level: The peering sync status of the virtual network peering. Possible + values include: "FullyInSync", "RemoteNotInSync", "LocalNotInSync", "LocalAndRemoteNotInSync". + :type peering_sync_level: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeeringLevel + :ivar provisioning_state: The provisioning state of the virtual network peering resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param do_not_verify_remote_gateways: If we need to verify the provisioning state of the remote + gateway. + :type do_not_verify_remote_gateways: bool + :ivar resource_guid: The resourceGuid property of the Virtual Network peering resource. + :vartype resource_guid: str + """ + + _validation = { + 'etag': {'readonly': True}, + 'remote_virtual_network_encryption': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_guid': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, + 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, + 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, + 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, + 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, + 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, + 'remote_virtual_network_address_space': {'key': 'properties.remoteVirtualNetworkAddressSpace', 'type': 'AddressSpace'}, + 'remote_bgp_communities': {'key': 'properties.remoteBgpCommunities', 'type': 'VirtualNetworkBgpCommunities'}, + 'remote_virtual_network_encryption': {'key': 'properties.remoteVirtualNetworkEncryption', 'type': 'VirtualNetworkEncryption'}, + 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, + 'peering_sync_level': {'key': 'properties.peeringSyncLevel', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'do_not_verify_remote_gateways': {'key': 'properties.doNotVerifyRemoteGateways', 'type': 'bool'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkPeering, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = kwargs.get('type', None) + self.allow_virtual_network_access = kwargs.get('allow_virtual_network_access', None) + self.allow_forwarded_traffic = kwargs.get('allow_forwarded_traffic', None) + self.allow_gateway_transit = kwargs.get('allow_gateway_transit', None) + self.use_remote_gateways = kwargs.get('use_remote_gateways', None) + self.remote_virtual_network = kwargs.get('remote_virtual_network', None) + self.remote_address_space = kwargs.get('remote_address_space', None) + self.remote_virtual_network_address_space = kwargs.get('remote_virtual_network_address_space', None) + self.remote_bgp_communities = kwargs.get('remote_bgp_communities', None) + self.remote_virtual_network_encryption = None + self.peering_state = kwargs.get('peering_state', None) + self.peering_sync_level = kwargs.get('peering_sync_level', None) + self.provisioning_state = None + self.do_not_verify_remote_gateways = kwargs.get('do_not_verify_remote_gateways', None) + self.resource_guid = None + + +class VirtualNetworkPeeringListResult(msrest.serialization.Model): + """Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. + + :param value: The peerings in a virtual network. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkPeeringListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class VirtualNetworkTap(Resource): + """Virtual Network Tap resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar network_interface_tap_configurations: Specifies the list of resource IDs for the network + interface IP configuration that needs to be tapped. + :vartype network_interface_tap_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration] + :ivar resource_guid: The resource GUID property of the virtual network tap resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network tap resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param destination_network_interface_ip_configuration: The reference to the private IP Address + of the collector nic that will receive the tap. + :type destination_network_interface_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration + :param destination_load_balancer_front_end_ip_configuration: The reference to the private IP + address on the internal Load Balancer that will receive the tap. + :type destination_load_balancer_front_end_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration + :param destination_port: The VXLAN destination port that will receive the tapped traffic. + :type destination_port: int + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'network_interface_tap_configurations': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'network_interface_tap_configurations': {'key': 'properties.networkInterfaceTapConfigurations', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'destination_network_interface_ip_configuration': {'key': 'properties.destinationNetworkInterfaceIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'destination_load_balancer_front_end_ip_configuration': {'key': 'properties.destinationLoadBalancerFrontEndIPConfiguration', 'type': 'FrontendIPConfiguration'}, + 'destination_port': {'key': 'properties.destinationPort', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkTap, self).__init__(**kwargs) + self.etag = None + self.network_interface_tap_configurations = None + self.resource_guid = None + self.provisioning_state = None + self.destination_network_interface_ip_configuration = kwargs.get('destination_network_interface_ip_configuration', None) + self.destination_load_balancer_front_end_ip_configuration = kwargs.get('destination_load_balancer_front_end_ip_configuration', None) + self.destination_port = kwargs.get('destination_port', None) + + +class VirtualNetworkTapListResult(msrest.serialization.Model): + """Response for ListVirtualNetworkTap API service call. + + :param value: A list of VirtualNetworkTaps in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkTap]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkTapListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class VirtualNetworkUsage(msrest.serialization.Model): + """Usage details for subnet. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar current_value: Indicates number of IPs used from the Subnet. + :vartype current_value: float + :ivar id: Subnet identifier. + :vartype id: str + :ivar limit: Indicates the size of the subnet. + :vartype limit: float + :ivar name: The name containing common and localized value for usage. + :vartype name: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkUsageName + :ivar unit: Usage units. Returns 'Count'. + :vartype unit: str + """ + + _validation = { + 'current_value': {'readonly': True}, + 'id': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'id': {'key': 'id', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'name': {'key': 'name', 'type': 'VirtualNetworkUsageName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkUsage, self).__init__(**kwargs) + self.current_value = None + self.id = None + self.limit = None + self.name = None + self.unit = None + + +class VirtualNetworkUsageName(msrest.serialization.Model): + """Usage strings container. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar localized_value: Localized subnet size and usage string. + :vartype localized_value: str + :ivar value: Subnet size and usage string. + :vartype value: str + """ + + _validation = { + 'localized_value': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkUsageName, self).__init__(**kwargs) + self.localized_value = None + self.value = None + + +class VirtualRouter(Resource): + """VirtualRouter Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param virtual_router_asn: VirtualRouter ASN. + :type virtual_router_asn: long + :param virtual_router_ips: VirtualRouter IPs. + :type virtual_router_ips: list[str] + :param hosted_subnet: The Subnet on which VirtualRouter is hosted. + :type hosted_subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param hosted_gateway: The Gateway on which VirtualRouter is hosted. + :type hosted_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar peerings: List of references to VirtualRouterPeerings. + :vartype peerings: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_router_asn': {'maximum': 4294967295, 'minimum': 0}, + 'peerings': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_router_asn': {'key': 'properties.virtualRouterAsn', 'type': 'long'}, + 'virtual_router_ips': {'key': 'properties.virtualRouterIps', 'type': '[str]'}, + 'hosted_subnet': {'key': 'properties.hostedSubnet', 'type': 'SubResource'}, + 'hosted_gateway': {'key': 'properties.hostedGateway', 'type': 'SubResource'}, + 'peerings': {'key': 'properties.peerings', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualRouter, self).__init__(**kwargs) + self.etag = None + self.virtual_router_asn = kwargs.get('virtual_router_asn', None) + self.virtual_router_ips = kwargs.get('virtual_router_ips', None) + self.hosted_subnet = kwargs.get('hosted_subnet', None) + self.hosted_gateway = kwargs.get('hosted_gateway', None) + self.peerings = None + self.provisioning_state = None + + +class VirtualRouterListResult(msrest.serialization.Model): + """Response for ListVirtualRouters API service call. + + :param value: List of Virtual Routers. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualRouter] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualRouter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualRouterListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class VirtualRouterPeering(SubResource): + """Virtual Router Peering resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the virtual router peering that is unique within a virtual router. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Peering type. + :vartype type: str + :param peer_asn: Peer ASN. + :type peer_asn: long + :param peer_ip: Peer IP. + :type peer_ip: str + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peer_asn': {'key': 'properties.peerAsn', 'type': 'long'}, + 'peer_ip': {'key': 'properties.peerIp', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualRouterPeering, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.peer_asn = kwargs.get('peer_asn', None) + self.peer_ip = kwargs.get('peer_ip', None) + self.provisioning_state = None + + +class VirtualRouterPeeringListResult(msrest.serialization.Model): + """Response for ListVirtualRouterPeerings API service call. + + :param value: List of VirtualRouterPeerings in a VirtualRouter. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeering] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualRouterPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualRouterPeeringListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class VirtualWAN(Resource): + """VirtualWAN Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param disable_vpn_encryption: Vpn encryption to be disabled or not. + :type disable_vpn_encryption: bool + :ivar virtual_hubs: List of VirtualHubs in the VirtualWAN. + :vartype virtual_hubs: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar vpn_sites: List of VpnSites in the VirtualWAN. + :vartype vpn_sites: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param allow_branch_to_branch_traffic: True if branch to branch traffic is allowed. + :type allow_branch_to_branch_traffic: bool + :param allow_vnet_to_vnet_traffic: True if Vnet to Vnet traffic is allowed. + :type allow_vnet_to_vnet_traffic: bool + :ivar office365_local_breakout_category: The office local breakout category. Possible values + include: "Optimize", "OptimizeAndAllow", "All", "None". + :vartype office365_local_breakout_category: str or + ~azure.mgmt.network.v2021_05_01.models.OfficeTrafficCategory + :ivar provisioning_state: The provisioning state of the virtual WAN resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param type_properties_type: The type of the VirtualWAN. + :type type_properties_type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_hubs': {'readonly': True}, + 'vpn_sites': {'readonly': True}, + 'office365_local_breakout_category': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'disable_vpn_encryption': {'key': 'properties.disableVpnEncryption', 'type': 'bool'}, + 'virtual_hubs': {'key': 'properties.virtualHubs', 'type': '[SubResource]'}, + 'vpn_sites': {'key': 'properties.vpnSites', 'type': '[SubResource]'}, + 'allow_branch_to_branch_traffic': {'key': 'properties.allowBranchToBranchTraffic', 'type': 'bool'}, + 'allow_vnet_to_vnet_traffic': {'key': 'properties.allowVnetToVnetTraffic', 'type': 'bool'}, + 'office365_local_breakout_category': {'key': 'properties.office365LocalBreakoutCategory', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualWAN, self).__init__(**kwargs) + self.etag = None + self.disable_vpn_encryption = kwargs.get('disable_vpn_encryption', None) + self.virtual_hubs = None + self.vpn_sites = None + self.allow_branch_to_branch_traffic = kwargs.get('allow_branch_to_branch_traffic', None) + self.allow_vnet_to_vnet_traffic = kwargs.get('allow_vnet_to_vnet_traffic', None) + self.office365_local_breakout_category = None + self.provisioning_state = None + self.type_properties_type = kwargs.get('type_properties_type', None) + + +class VirtualWanSecurityProvider(msrest.serialization.Model): + """Collection of SecurityProviders. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: Name of the security provider. + :type name: str + :param url: Url of the security provider. + :type url: str + :ivar type: Name of the security provider. Possible values include: "External", "Native". + :vartype type: str or ~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProviderType + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualWanSecurityProvider, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.url = kwargs.get('url', None) + self.type = None + + +class VirtualWanSecurityProviders(msrest.serialization.Model): + """Collection of SecurityProviders. + + :param supported_providers: List of VirtualWAN security providers. + :type supported_providers: + list[~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProvider] + """ + + _attribute_map = { + 'supported_providers': {'key': 'supportedProviders', 'type': '[VirtualWanSecurityProvider]'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualWanSecurityProviders, self).__init__(**kwargs) + self.supported_providers = kwargs.get('supported_providers', None) + + +class VirtualWanVpnProfileParameters(msrest.serialization.Model): + """Virtual Wan Vpn profile parameters Vpn profile generation. + + :param vpn_server_configuration_resource_id: VpnServerConfiguration partial resource uri with + which VirtualWan is associated to. + :type vpn_server_configuration_resource_id: str + :param authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :type authentication_method: str or ~azure.mgmt.network.v2021_05_01.models.AuthenticationMethod + """ + + _attribute_map = { + 'vpn_server_configuration_resource_id': {'key': 'vpnServerConfigurationResourceId', 'type': 'str'}, + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualWanVpnProfileParameters, self).__init__(**kwargs) + self.vpn_server_configuration_resource_id = kwargs.get('vpn_server_configuration_resource_id', None) + self.authentication_method = kwargs.get('authentication_method', None) + + +class VM(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(VM, self).__init__(**kwargs) + + +class VnetRoute(msrest.serialization.Model): + """List of routes that control routing from VirtualHub into a virtual network connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param static_routes: List of all Static Routes. + :type static_routes: list[~azure.mgmt.network.v2021_05_01.models.StaticRoute] + :ivar bgp_connections: The list of references to HubBgpConnection objects. + :vartype bgp_connections: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'bgp_connections': {'readonly': True}, + } + + _attribute_map = { + 'static_routes': {'key': 'staticRoutes', 'type': '[StaticRoute]'}, + 'bgp_connections': {'key': 'bgpConnections', 'type': '[SubResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(VnetRoute, self).__init__(**kwargs) + self.static_routes = kwargs.get('static_routes', None) + self.bgp_connections = None + + +class VpnClientConfiguration(msrest.serialization.Model): + """VpnClientConfiguration for P2S client. + + :param vpn_client_address_pool: The reference to the address space resource which represents + Address space for P2S VpnClient. + :type vpn_client_address_pool: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. + :type vpn_client_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnClientRootCertificate] + :param vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network + gateway. + :type vpn_client_revoked_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnClientRevokedCertificate] + :param vpn_client_protocols: VpnClientProtocols for Virtual network gateway. + :type vpn_client_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.VpnClientProtocol] + :param vpn_authentication_types: VPN authentication types for the virtual network gateway.. + :type vpn_authentication_types: list[str or + ~azure.mgmt.network.v2021_05_01.models.VpnAuthenticationType] + :param vpn_client_ipsec_policies: VpnClientIpsecPolicies for virtual network gateway P2S + client. + :type vpn_client_ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param radius_server_address: The radius server address property of the VirtualNetworkGateway + resource for vpn client connection. + :type radius_server_address: str + :param radius_server_secret: The radius secret property of the VirtualNetworkGateway resource + for vpn client connection. + :type radius_server_secret: str + :param radius_servers: The radiusServers property for multiple radius server configuration. + :type radius_servers: list[~azure.mgmt.network.v2021_05_01.models.RadiusServer] + :param aad_tenant: The AADTenant property of the VirtualNetworkGateway resource for vpn client + connection used for AAD authentication. + :type aad_tenant: str + :param aad_audience: The AADAudience property of the VirtualNetworkGateway resource for vpn + client connection used for AAD authentication. + :type aad_audience: str + :param aad_issuer: The AADIssuer property of the VirtualNetworkGateway resource for vpn client + connection used for AAD authentication. + :type aad_issuer: str + """ + + _attribute_map = { + 'vpn_client_address_pool': {'key': 'vpnClientAddressPool', 'type': 'AddressSpace'}, + 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, + 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, + 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, + 'vpn_authentication_types': {'key': 'vpnAuthenticationTypes', 'type': '[str]'}, + 'vpn_client_ipsec_policies': {'key': 'vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, + 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, + 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, + 'radius_servers': {'key': 'radiusServers', 'type': '[RadiusServer]'}, + 'aad_tenant': {'key': 'aadTenant', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + 'aad_issuer': {'key': 'aadIssuer', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnClientConfiguration, self).__init__(**kwargs) + self.vpn_client_address_pool = kwargs.get('vpn_client_address_pool', None) + self.vpn_client_root_certificates = kwargs.get('vpn_client_root_certificates', None) + self.vpn_client_revoked_certificates = kwargs.get('vpn_client_revoked_certificates', None) + self.vpn_client_protocols = kwargs.get('vpn_client_protocols', None) + self.vpn_authentication_types = kwargs.get('vpn_authentication_types', None) + self.vpn_client_ipsec_policies = kwargs.get('vpn_client_ipsec_policies', None) + self.radius_server_address = kwargs.get('radius_server_address', None) + self.radius_server_secret = kwargs.get('radius_server_secret', None) + self.radius_servers = kwargs.get('radius_servers', None) + self.aad_tenant = kwargs.get('aad_tenant', None) + self.aad_audience = kwargs.get('aad_audience', None) + self.aad_issuer = kwargs.get('aad_issuer', None) + + +class VpnClientConnectionHealth(msrest.serialization.Model): + """VpnClientConnectionHealth properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar total_ingress_bytes_transferred: Total of the Ingress Bytes Transferred in this P2S Vpn + connection. + :vartype total_ingress_bytes_transferred: long + :ivar total_egress_bytes_transferred: Total of the Egress Bytes Transferred in this connection. + :vartype total_egress_bytes_transferred: long + :param vpn_client_connections_count: The total of p2s vpn clients connected at this time to + this P2SVpnGateway. + :type vpn_client_connections_count: int + :param allocated_ip_addresses: List of allocated ip addresses to the connected p2s vpn clients. + :type allocated_ip_addresses: list[str] + """ + + _validation = { + 'total_ingress_bytes_transferred': {'readonly': True}, + 'total_egress_bytes_transferred': {'readonly': True}, + } + + _attribute_map = { + 'total_ingress_bytes_transferred': {'key': 'totalIngressBytesTransferred', 'type': 'long'}, + 'total_egress_bytes_transferred': {'key': 'totalEgressBytesTransferred', 'type': 'long'}, + 'vpn_client_connections_count': {'key': 'vpnClientConnectionsCount', 'type': 'int'}, + 'allocated_ip_addresses': {'key': 'allocatedIpAddresses', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnClientConnectionHealth, self).__init__(**kwargs) + self.total_ingress_bytes_transferred = None + self.total_egress_bytes_transferred = None + self.vpn_client_connections_count = kwargs.get('vpn_client_connections_count', None) + self.allocated_ip_addresses = kwargs.get('allocated_ip_addresses', None) + + +class VpnClientConnectionHealthDetail(msrest.serialization.Model): + """VPN client connection health detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vpn_connection_id: The vpn client Id. + :vartype vpn_connection_id: str + :ivar vpn_connection_duration: The duration time of a connected vpn client. + :vartype vpn_connection_duration: long + :ivar vpn_connection_time: The start time of a connected vpn client. + :vartype vpn_connection_time: str + :ivar public_ip_address: The public Ip of a connected vpn client. + :vartype public_ip_address: str + :ivar private_ip_address: The assigned private Ip of a connected vpn client. + :vartype private_ip_address: str + :ivar vpn_user_name: The user name of a connected vpn client. + :vartype vpn_user_name: str + :ivar max_bandwidth: The max band width. + :vartype max_bandwidth: long + :ivar egress_packets_transferred: The egress packets per second. + :vartype egress_packets_transferred: long + :ivar egress_bytes_transferred: The egress bytes per second. + :vartype egress_bytes_transferred: long + :ivar ingress_packets_transferred: The ingress packets per second. + :vartype ingress_packets_transferred: long + :ivar ingress_bytes_transferred: The ingress bytes per second. + :vartype ingress_bytes_transferred: long + :ivar max_packets_per_second: The max packets transferred per second. + :vartype max_packets_per_second: long + """ + + _validation = { + 'vpn_connection_id': {'readonly': True}, + 'vpn_connection_duration': {'readonly': True}, + 'vpn_connection_time': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'vpn_user_name': {'readonly': True}, + 'max_bandwidth': {'readonly': True}, + 'egress_packets_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'ingress_packets_transferred': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'max_packets_per_second': {'readonly': True}, + } + + _attribute_map = { + 'vpn_connection_id': {'key': 'vpnConnectionId', 'type': 'str'}, + 'vpn_connection_duration': {'key': 'vpnConnectionDuration', 'type': 'long'}, + 'vpn_connection_time': {'key': 'vpnConnectionTime', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'vpn_user_name': {'key': 'vpnUserName', 'type': 'str'}, + 'max_bandwidth': {'key': 'maxBandwidth', 'type': 'long'}, + 'egress_packets_transferred': {'key': 'egressPacketsTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, + 'ingress_packets_transferred': {'key': 'ingressPacketsTransferred', 'type': 'long'}, + 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, + 'max_packets_per_second': {'key': 'maxPacketsPerSecond', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnClientConnectionHealthDetail, self).__init__(**kwargs) + self.vpn_connection_id = None + self.vpn_connection_duration = None + self.vpn_connection_time = None + self.public_ip_address = None + self.private_ip_address = None + self.vpn_user_name = None + self.max_bandwidth = None + self.egress_packets_transferred = None + self.egress_bytes_transferred = None + self.ingress_packets_transferred = None + self.ingress_bytes_transferred = None + self.max_packets_per_second = None + + +class VpnClientConnectionHealthDetailListResult(msrest.serialization.Model): + """List of virtual network gateway vpn client connection health. + + :param value: List of vpn client connection health. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnClientConnectionHealthDetail] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnClientConnectionHealthDetail]'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnClientConnectionHealthDetailListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class VpnClientIPsecParameters(msrest.serialization.Model): + """An IPSec parameters for a virtual network gateway P2S connection. + + All required parameters must be populated in order to send to Azure. + + :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) lifetime in seconds for P2S client. + :type sa_life_time_seconds: int + :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) payload size in KB for P2S client.. + :type sa_data_size_kilobytes: int + :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible + values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", + "GCMAES256". + :type ipsec_encryption: str or ~azure.mgmt.network.v2021_05_01.models.IpsecEncryption + :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values + include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". + :type ipsec_integrity: str or ~azure.mgmt.network.v2021_05_01.models.IpsecIntegrity + :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values + include: "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES256", "GCMAES128". + :type ike_encryption: str or ~azure.mgmt.network.v2021_05_01.models.IkeEncryption + :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values + include: "MD5", "SHA1", "SHA256", "SHA384", "GCMAES256", "GCMAES128". + :type ike_integrity: str or ~azure.mgmt.network.v2021_05_01.models.IkeIntegrity + :param dh_group: Required. The DH Group used in IKE Phase 1 for initial SA. Possible values + include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", + "DHGroup24". + :type dh_group: str or ~azure.mgmt.network.v2021_05_01.models.DhGroup + :param pfs_group: Required. The Pfs Group used in IKE Phase 2 for new child SA. Possible values + include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24", "PFS14", "PFSMM". + :type pfs_group: str or ~azure.mgmt.network.v2021_05_01.models.PfsGroup + """ + + _validation = { + 'sa_life_time_seconds': {'required': True}, + 'sa_data_size_kilobytes': {'required': True}, + 'ipsec_encryption': {'required': True}, + 'ipsec_integrity': {'required': True}, + 'ike_encryption': {'required': True}, + 'ike_integrity': {'required': True}, + 'dh_group': {'required': True}, + 'pfs_group': {'required': True}, + } + + _attribute_map = { + 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, + 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, + 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, + 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, + 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, + 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, + 'dh_group': {'key': 'dhGroup', 'type': 'str'}, + 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnClientIPsecParameters, self).__init__(**kwargs) + self.sa_life_time_seconds = kwargs['sa_life_time_seconds'] + self.sa_data_size_kilobytes = kwargs['sa_data_size_kilobytes'] + self.ipsec_encryption = kwargs['ipsec_encryption'] + self.ipsec_integrity = kwargs['ipsec_integrity'] + self.ike_encryption = kwargs['ike_encryption'] + self.ike_integrity = kwargs['ike_integrity'] + self.dh_group = kwargs['dh_group'] + self.pfs_group = kwargs['pfs_group'] + + +class VpnClientParameters(msrest.serialization.Model): + """Vpn Client Parameters for package generation. + + :param processor_architecture: VPN client Processor Architecture. Possible values include: + "Amd64", "X86". + :type processor_architecture: str or + ~azure.mgmt.network.v2021_05_01.models.ProcessorArchitecture + :param authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :type authentication_method: str or ~azure.mgmt.network.v2021_05_01.models.AuthenticationMethod + :param radius_server_auth_certificate: The public certificate data for the radius server + authentication certificate as a Base-64 encoded string. Required only if external radius + authentication has been configured with EAPTLS authentication. + :type radius_server_auth_certificate: str + :param client_root_certificates: A list of client root certificates public certificate data + encoded as Base-64 strings. Optional parameter for external radius based authentication with + EAPTLS. + :type client_root_certificates: list[str] + """ + + _attribute_map = { + 'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'}, + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'radius_server_auth_certificate': {'key': 'radiusServerAuthCertificate', 'type': 'str'}, + 'client_root_certificates': {'key': 'clientRootCertificates', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnClientParameters, self).__init__(**kwargs) + self.processor_architecture = kwargs.get('processor_architecture', None) + self.authentication_method = kwargs.get('authentication_method', None) + self.radius_server_auth_certificate = kwargs.get('radius_server_auth_certificate', None) + self.client_root_certificates = kwargs.get('client_root_certificates', None) + + +class VpnClientRevokedCertificate(SubResource): + """VPN client revoked certificate of virtual network gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param thumbprint: The revoked VPN client certificate thumbprint. + :type thumbprint: str + :ivar provisioning_state: The provisioning state of the VPN client revoked certificate + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnClientRevokedCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.thumbprint = kwargs.get('thumbprint', None) + self.provisioning_state = None + + +class VpnClientRootCertificate(SubResource): + """VPN client root certificate of virtual network gateway. + + 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 id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param public_cert_data: Required. The certificate public data. + :type public_cert_data: str + :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'public_cert_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnClientRootCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.public_cert_data = kwargs['public_cert_data'] + self.provisioning_state = None + + +class VpnConnection(SubResource): + """VpnConnection Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param remote_vpn_site: Id of the connected vpn site. + :type remote_vpn_site: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param routing_weight: Routing weight for vpn connection. + :type routing_weight: int + :param dpd_timeout_seconds: DPD timeout in seconds for vpn connection. + :type dpd_timeout_seconds: int + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or ~azure.mgmt.network.v2021_05_01.models.VpnConnectionStatus + :param vpn_connection_protocol_type: Connection protocol used for this connection. Possible + values include: "IKEv2", "IKEv1". + :type vpn_connection_protocol_type: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionProtocol + :ivar ingress_bytes_transferred: Ingress bytes transferred. + :vartype ingress_bytes_transferred: long + :ivar egress_bytes_transferred: Egress bytes transferred. + :vartype egress_bytes_transferred: long + :param connection_bandwidth: Expected bandwidth in MBPS. + :type connection_bandwidth: int + :param shared_key: SharedKey for the vpn connection. + :type shared_key: str + :param enable_bgp: EnableBgp flag. + :type enable_bgp: bool + :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :type use_policy_based_traffic_selectors: bool + :param ipsec_policies: The IPSec Policies to be considered by this connection. + :type ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :type traffic_selector_policies: + list[~azure.mgmt.network.v2021_05_01.models.TrafficSelectorPolicy] + :param enable_rate_limiting: EnableBgp flag. + :type enable_rate_limiting: bool + :param enable_internet_security: Enable internet security. + :type enable_internet_security: bool + :param use_local_azure_ip_address: Use local azure ip to initiate connection. + :type use_local_azure_ip_address: bool + :ivar provisioning_state: The provisioning state of the VPN connection resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param vpn_link_connections: List of all vpn site link connections to the gateway. + :type vpn_link_connections: list[~azure.mgmt.network.v2021_05_01.models.VpnSiteLinkConnection] + :param routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :type routing_configuration: ~azure.mgmt.network.v2021_05_01.models.RoutingConfiguration + """ + + _validation = { + 'etag': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'remote_vpn_site': {'key': 'properties.remoteVpnSite', 'type': 'SubResource'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'dpd_timeout_seconds': {'key': 'properties.dpdTimeoutSeconds', 'type': 'int'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'vpn_connection_protocol_type': {'key': 'properties.vpnConnectionProtocolType', 'type': 'str'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'connection_bandwidth': {'key': 'properties.connectionBandwidth', 'type': 'int'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'traffic_selector_policies': {'key': 'properties.trafficSelectorPolicies', 'type': '[TrafficSelectorPolicy]'}, + 'enable_rate_limiting': {'key': 'properties.enableRateLimiting', 'type': 'bool'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'use_local_azure_ip_address': {'key': 'properties.useLocalAzureIpAddress', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'vpn_link_connections': {'key': 'properties.vpnLinkConnections', 'type': '[VpnSiteLinkConnection]'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnConnection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.remote_vpn_site = kwargs.get('remote_vpn_site', None) + self.routing_weight = kwargs.get('routing_weight', None) + self.dpd_timeout_seconds = kwargs.get('dpd_timeout_seconds', None) + self.connection_status = None + self.vpn_connection_protocol_type = kwargs.get('vpn_connection_protocol_type', None) + self.ingress_bytes_transferred = None + self.egress_bytes_transferred = None + self.connection_bandwidth = kwargs.get('connection_bandwidth', None) + self.shared_key = kwargs.get('shared_key', None) + self.enable_bgp = kwargs.get('enable_bgp', None) + self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) + self.ipsec_policies = kwargs.get('ipsec_policies', None) + self.traffic_selector_policies = kwargs.get('traffic_selector_policies', None) + self.enable_rate_limiting = kwargs.get('enable_rate_limiting', None) + self.enable_internet_security = kwargs.get('enable_internet_security', None) + self.use_local_azure_ip_address = kwargs.get('use_local_azure_ip_address', None) + self.provisioning_state = None + self.vpn_link_connections = kwargs.get('vpn_link_connections', None) + self.routing_configuration = kwargs.get('routing_configuration', None) + + +class VpnConnectionPacketCaptureStartParameters(msrest.serialization.Model): + """Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. + + :param filter_data: Start Packet capture parameters on vpn connection. + :type filter_data: str + :param link_connection_names: List of site link connection names. + :type link_connection_names: list[str] + """ + + _attribute_map = { + 'filter_data': {'key': 'filterData', 'type': 'str'}, + 'link_connection_names': {'key': 'linkConnectionNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnConnectionPacketCaptureStartParameters, self).__init__(**kwargs) + self.filter_data = kwargs.get('filter_data', None) + self.link_connection_names = kwargs.get('link_connection_names', None) + + +class VpnConnectionPacketCaptureStopParameters(msrest.serialization.Model): + """Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. + + :param sas_url: SAS url for packet capture on vpn connection. + :type sas_url: str + :param link_connection_names: List of site link connection names. + :type link_connection_names: list[str] + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'link_connection_names': {'key': 'linkConnectionNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnConnectionPacketCaptureStopParameters, self).__init__(**kwargs) + self.sas_url = kwargs.get('sas_url', None) + self.link_connection_names = kwargs.get('link_connection_names', None) + + +class VpnDeviceScriptParameters(msrest.serialization.Model): + """Vpn device configuration script generation parameters. + + :param vendor: The vendor for the vpn device. + :type vendor: str + :param device_family: The device family for the vpn device. + :type device_family: str + :param firmware_version: The firmware version for the vpn device. + :type firmware_version: str + """ + + _attribute_map = { + 'vendor': {'key': 'vendor', 'type': 'str'}, + 'device_family': {'key': 'deviceFamily', 'type': 'str'}, + 'firmware_version': {'key': 'firmwareVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnDeviceScriptParameters, self).__init__(**kwargs) + self.vendor = kwargs.get('vendor', None) + self.device_family = kwargs.get('device_family', None) + self.firmware_version = kwargs.get('firmware_version', None) + + +class VpnGateway(Resource): + """VpnGateway Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param virtual_hub: The VirtualHub to which the gateway belongs. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param connections: List of all vpn connections to the gateway. + :type connections: list[~azure.mgmt.network.v2021_05_01.models.VpnConnection] + :param bgp_settings: Local network gateway's BGP speaker settings. + :type bgp_settings: ~azure.mgmt.network.v2021_05_01.models.BgpSettings + :ivar provisioning_state: The provisioning state of the VPN gateway resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param vpn_gateway_scale_unit: The scale unit for this vpn gateway. + :type vpn_gateway_scale_unit: int + :ivar ip_configurations: List of all IPs configured on the gateway. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.VpnGatewayIpConfiguration] + :param enable_bgp_route_translation_for_nat: Enable BGP routes translation for NAT on this + VpnGateway. + :type enable_bgp_route_translation_for_nat: bool + :param is_routing_preference_internet: Enable Routing Preference property for the Public IP + Interface of the VpnGateway. + :type is_routing_preference_internet: bool + :param nat_rules: List of all the nat Rules associated with the gateway. + :type nat_rules: list[~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'connections': {'key': 'properties.connections', 'type': '[VpnConnection]'}, + 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'vpn_gateway_scale_unit': {'key': 'properties.vpnGatewayScaleUnit', 'type': 'int'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VpnGatewayIpConfiguration]'}, + 'enable_bgp_route_translation_for_nat': {'key': 'properties.enableBgpRouteTranslationForNat', 'type': 'bool'}, + 'is_routing_preference_internet': {'key': 'properties.isRoutingPreferenceInternet', 'type': 'bool'}, + 'nat_rules': {'key': 'properties.natRules', 'type': '[VpnGatewayNatRule]'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnGateway, self).__init__(**kwargs) + self.etag = None + self.virtual_hub = kwargs.get('virtual_hub', None) + self.connections = kwargs.get('connections', None) + self.bgp_settings = kwargs.get('bgp_settings', None) + self.provisioning_state = None + self.vpn_gateway_scale_unit = kwargs.get('vpn_gateway_scale_unit', None) + self.ip_configurations = None + self.enable_bgp_route_translation_for_nat = kwargs.get('enable_bgp_route_translation_for_nat', None) + self.is_routing_preference_internet = kwargs.get('is_routing_preference_internet', None) + self.nat_rules = kwargs.get('nat_rules', None) + + +class VpnGatewayIpConfiguration(msrest.serialization.Model): + """IP Configuration of a VPN Gateway Resource. + + :param id: The identifier of the IP configuration for a VPN Gateway. + :type id: str + :param public_ip_address: The public IP address of this IP configuration. + :type public_ip_address: str + :param private_ip_address: The private IP address of this IP configuration. + :type private_ip_address: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnGatewayIpConfiguration, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.public_ip_address = kwargs.get('public_ip_address', None) + self.private_ip_address = kwargs.get('private_ip_address', None) + + +class VpnGatewayNatRule(SubResource): + """VpnGatewayNatRule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: The provisioning state of the NAT Rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param type_properties_type: The type of NAT rule for VPN NAT. Possible values include: + "Static", "Dynamic". + :type type_properties_type: str or ~azure.mgmt.network.v2021_05_01.models.VpnNatRuleType + :param mode: The Source NAT direction of a VPN NAT. Possible values include: "EgressSnat", + "IngressSnat". + :type mode: str or ~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMode + :param internal_mappings: The private IP address internal mapping for NAT. + :type internal_mappings: list[~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMapping] + :param external_mappings: The private IP address external mapping for NAT. + :type external_mappings: list[~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMapping] + :param ip_configuration_id: The IP Configuration ID this NAT rule applies to. + :type ip_configuration_id: str + :ivar egress_vpn_site_link_connections: List of egress VpnSiteLinkConnections. + :vartype egress_vpn_site_link_connections: + list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar ingress_vpn_site_link_connections: List of ingress VpnSiteLinkConnections. + :vartype ingress_vpn_site_link_connections: + list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'egress_vpn_site_link_connections': {'readonly': True}, + 'ingress_vpn_site_link_connections': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'internal_mappings': {'key': 'properties.internalMappings', 'type': '[VpnNatRuleMapping]'}, + 'external_mappings': {'key': 'properties.externalMappings', 'type': '[VpnNatRuleMapping]'}, + 'ip_configuration_id': {'key': 'properties.ipConfigurationId', 'type': 'str'}, + 'egress_vpn_site_link_connections': {'key': 'properties.egressVpnSiteLinkConnections', 'type': '[SubResource]'}, + 'ingress_vpn_site_link_connections': {'key': 'properties.ingressVpnSiteLinkConnections', 'type': '[SubResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnGatewayNatRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.provisioning_state = None + self.type_properties_type = kwargs.get('type_properties_type', None) + self.mode = kwargs.get('mode', None) + self.internal_mappings = kwargs.get('internal_mappings', None) + self.external_mappings = kwargs.get('external_mappings', None) + self.ip_configuration_id = kwargs.get('ip_configuration_id', None) + self.egress_vpn_site_link_connections = None + self.ingress_vpn_site_link_connections = None + + +class VpnGatewayPacketCaptureStartParameters(msrest.serialization.Model): + """Start packet capture parameters. + + :param filter_data: Start Packet capture parameters on vpn gateway. + :type filter_data: str + """ + + _attribute_map = { + 'filter_data': {'key': 'filterData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnGatewayPacketCaptureStartParameters, self).__init__(**kwargs) + self.filter_data = kwargs.get('filter_data', None) + + +class VpnGatewayPacketCaptureStopParameters(msrest.serialization.Model): + """Stop packet capture parameters. + + :param sas_url: SAS url for packet capture on vpn gateway. + :type sas_url: str + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnGatewayPacketCaptureStopParameters, self).__init__(**kwargs) + self.sas_url = kwargs.get('sas_url', None) + + +class VpnLinkBgpSettings(msrest.serialization.Model): + """BGP settings details for a link. + + :param asn: The BGP speaker's ASN. + :type asn: long + :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. + :type bgp_peering_address: str + """ + + _attribute_map = { + 'asn': {'key': 'asn', 'type': 'long'}, + 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnLinkBgpSettings, self).__init__(**kwargs) + self.asn = kwargs.get('asn', None) + self.bgp_peering_address = kwargs.get('bgp_peering_address', None) + + +class VpnLinkProviderProperties(msrest.serialization.Model): + """List of properties of a link provider. + + :param link_provider_name: Name of the link provider. + :type link_provider_name: str + :param link_speed_in_mbps: Link speed. + :type link_speed_in_mbps: int + """ + + _attribute_map = { + 'link_provider_name': {'key': 'linkProviderName', 'type': 'str'}, + 'link_speed_in_mbps': {'key': 'linkSpeedInMbps', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnLinkProviderProperties, self).__init__(**kwargs) + self.link_provider_name = kwargs.get('link_provider_name', None) + self.link_speed_in_mbps = kwargs.get('link_speed_in_mbps', None) + + +class VpnNatRuleMapping(msrest.serialization.Model): + """Vpn NatRule mapping. + + :param address_space: Address space for Vpn NatRule mapping. + :type address_space: str + :param port_range: Port range for Vpn NatRule mapping. + :type port_range: str + """ + + _attribute_map = { + 'address_space': {'key': 'addressSpace', 'type': 'str'}, + 'port_range': {'key': 'portRange', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnNatRuleMapping, self).__init__(**kwargs) + self.address_space = kwargs.get('address_space', None) + self.port_range = kwargs.get('port_range', None) + + +class VpnPacketCaptureStartParameters(msrest.serialization.Model): + """Start packet capture parameters on virtual network gateway. + + :param filter_data: Start Packet capture parameters. + :type filter_data: str + """ + + _attribute_map = { + 'filter_data': {'key': 'filterData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnPacketCaptureStartParameters, self).__init__(**kwargs) + self.filter_data = kwargs.get('filter_data', None) + + +class VpnPacketCaptureStopParameters(msrest.serialization.Model): + """Stop packet capture parameters. + + :param sas_url: SAS url for packet capture on virtual network gateway. + :type sas_url: str + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnPacketCaptureStopParameters, self).__init__(**kwargs) + self.sas_url = kwargs.get('sas_url', None) + + +class VpnProfileResponse(msrest.serialization.Model): + """Vpn Profile Response for package generation. + + :param profile_url: URL to the VPN profile. + :type profile_url: str + """ + + _attribute_map = { + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnProfileResponse, self).__init__(**kwargs) + self.profile_url = kwargs.get('profile_url', None) + + +class VpnServerConfigRadiusClientRootCertificate(msrest.serialization.Model): + """Properties of the Radius client root certificate of VpnServerConfiguration. + + :param name: The certificate name. + :type name: str + :param thumbprint: The Radius client root certificate thumbprint. + :type thumbprint: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnServerConfigRadiusClientRootCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.thumbprint = kwargs.get('thumbprint', None) + + +class VpnServerConfigRadiusServerRootCertificate(msrest.serialization.Model): + """Properties of Radius Server root certificate of VpnServerConfiguration. + + :param name: The certificate name. + :type name: str + :param public_cert_data: The certificate public data. + :type public_cert_data: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_cert_data': {'key': 'publicCertData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnServerConfigRadiusServerRootCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.public_cert_data = kwargs.get('public_cert_data', None) + + +class VpnServerConfiguration(Resource): + """VpnServerConfiguration Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param name_properties_name: The name of the VpnServerConfiguration that is unique within a + resource group. + :type name_properties_name: str + :param vpn_protocols: VPN protocols for the VpnServerConfiguration. + :type vpn_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.VpnGatewayTunnelingProtocol] + :param vpn_authentication_types: VPN authentication types for the VpnServerConfiguration. + :type vpn_authentication_types: list[str or + ~azure.mgmt.network.v2021_05_01.models.VpnAuthenticationType] + :param vpn_client_root_certificates: VPN client root certificate of VpnServerConfiguration. + :type vpn_client_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigVpnClientRootCertificate] + :param vpn_client_revoked_certificates: VPN client revoked certificate of + VpnServerConfiguration. + :type vpn_client_revoked_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigVpnClientRevokedCertificate] + :param radius_server_root_certificates: Radius Server root certificate of + VpnServerConfiguration. + :type radius_server_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigRadiusServerRootCertificate] + :param radius_client_root_certificates: Radius client root certificate of + VpnServerConfiguration. + :type radius_client_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigRadiusClientRootCertificate] + :param vpn_client_ipsec_policies: VpnClientIpsecPolicies for VpnServerConfiguration. + :type vpn_client_ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param radius_server_address: The radius server address property of the VpnServerConfiguration + resource for point to site client connection. + :type radius_server_address: str + :param radius_server_secret: The radius secret property of the VpnServerConfiguration resource + for point to site client connection. + :type radius_server_secret: str + :param radius_servers: Multiple Radius Server configuration for VpnServerConfiguration. + :type radius_servers: list[~azure.mgmt.network.v2021_05_01.models.RadiusServer] + :param aad_authentication_parameters: The set of aad vpn authentication parameters. + :type aad_authentication_parameters: + ~azure.mgmt.network.v2021_05_01.models.AadAuthenticationParameters + :ivar provisioning_state: The provisioning state of the VpnServerConfiguration resource. + Possible values are: 'Updating', 'Deleting', and 'Failed'. + :vartype provisioning_state: str + :ivar p2_s_vpn_gateways: List of references to P2SVpnGateways. + :vartype p2_s_vpn_gateways: list[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :ivar etag_properties_etag: A unique read-only string that changes whenever the resource is + updated. + :vartype etag_properties_etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'p2_s_vpn_gateways': {'readonly': True}, + 'etag_properties_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'vpn_protocols': {'key': 'properties.vpnProtocols', 'type': '[str]'}, + 'vpn_authentication_types': {'key': 'properties.vpnAuthenticationTypes', 'type': '[str]'}, + 'vpn_client_root_certificates': {'key': 'properties.vpnClientRootCertificates', 'type': '[VpnServerConfigVpnClientRootCertificate]'}, + 'vpn_client_revoked_certificates': {'key': 'properties.vpnClientRevokedCertificates', 'type': '[VpnServerConfigVpnClientRevokedCertificate]'}, + 'radius_server_root_certificates': {'key': 'properties.radiusServerRootCertificates', 'type': '[VpnServerConfigRadiusServerRootCertificate]'}, + 'radius_client_root_certificates': {'key': 'properties.radiusClientRootCertificates', 'type': '[VpnServerConfigRadiusClientRootCertificate]'}, + 'vpn_client_ipsec_policies': {'key': 'properties.vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, + 'radius_server_address': {'key': 'properties.radiusServerAddress', 'type': 'str'}, + 'radius_server_secret': {'key': 'properties.radiusServerSecret', 'type': 'str'}, + 'radius_servers': {'key': 'properties.radiusServers', 'type': '[RadiusServer]'}, + 'aad_authentication_parameters': {'key': 'properties.aadAuthenticationParameters', 'type': 'AadAuthenticationParameters'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'p2_s_vpn_gateways': {'key': 'properties.p2SVpnGateways', 'type': '[P2SVpnGateway]'}, + 'etag_properties_etag': {'key': 'properties.etag', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnServerConfiguration, self).__init__(**kwargs) + self.etag = None + self.name_properties_name = kwargs.get('name_properties_name', None) + self.vpn_protocols = kwargs.get('vpn_protocols', None) + self.vpn_authentication_types = kwargs.get('vpn_authentication_types', None) + self.vpn_client_root_certificates = kwargs.get('vpn_client_root_certificates', None) + self.vpn_client_revoked_certificates = kwargs.get('vpn_client_revoked_certificates', None) + self.radius_server_root_certificates = kwargs.get('radius_server_root_certificates', None) + self.radius_client_root_certificates = kwargs.get('radius_client_root_certificates', None) + self.vpn_client_ipsec_policies = kwargs.get('vpn_client_ipsec_policies', None) + self.radius_server_address = kwargs.get('radius_server_address', None) + self.radius_server_secret = kwargs.get('radius_server_secret', None) + self.radius_servers = kwargs.get('radius_servers', None) + self.aad_authentication_parameters = kwargs.get('aad_authentication_parameters', None) + self.provisioning_state = None + self.p2_s_vpn_gateways = None + self.etag_properties_etag = None + + +class VpnServerConfigurationsResponse(msrest.serialization.Model): + """VpnServerConfigurations list associated with VirtualWan Response. + + :param vpn_server_configuration_resource_ids: List of VpnServerConfigurations associated with + VirtualWan. + :type vpn_server_configuration_resource_ids: list[str] + """ + + _attribute_map = { + 'vpn_server_configuration_resource_ids': {'key': 'vpnServerConfigurationResourceIds', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnServerConfigurationsResponse, self).__init__(**kwargs) + self.vpn_server_configuration_resource_ids = kwargs.get('vpn_server_configuration_resource_ids', None) + + +class VpnServerConfigVpnClientRevokedCertificate(msrest.serialization.Model): + """Properties of the revoked VPN client certificate of VpnServerConfiguration. + + :param name: The certificate name. + :type name: str + :param thumbprint: The revoked VPN client certificate thumbprint. + :type thumbprint: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnServerConfigVpnClientRevokedCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.thumbprint = kwargs.get('thumbprint', None) + + +class VpnServerConfigVpnClientRootCertificate(msrest.serialization.Model): + """Properties of VPN client root certificate of VpnServerConfiguration. + + :param name: The certificate name. + :type name: str + :param public_cert_data: The certificate public data. + :type public_cert_data: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_cert_data': {'key': 'publicCertData', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnServerConfigVpnClientRootCertificate, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.public_cert_data = kwargs.get('public_cert_data', None) + + +class VpnSite(Resource): + """VpnSite Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param virtual_wan: The VirtualWAN to which the vpnSite belongs. + :type virtual_wan: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param device_properties: The device properties. + :type device_properties: ~azure.mgmt.network.v2021_05_01.models.DeviceProperties + :param ip_address: The ip-address for the vpn-site. + :type ip_address: str + :param site_key: The key for vpn-site that can be used for connections. + :type site_key: str + :param address_space: The AddressSpace that contains an array of IP address ranges. + :type address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param bgp_properties: The set of bgp properties. + :type bgp_properties: ~azure.mgmt.network.v2021_05_01.models.BgpSettings + :ivar provisioning_state: The provisioning state of the VPN site resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param is_security_site: IsSecuritySite flag. + :type is_security_site: bool + :param vpn_site_links: List of all vpn site links. + :type vpn_site_links: list[~azure.mgmt.network.v2021_05_01.models.VpnSiteLink] + :param o365_policy: Office365 Policy. + :type o365_policy: ~azure.mgmt.network.v2021_05_01.models.O365PolicyProperties + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_wan': {'key': 'properties.virtualWan', 'type': 'SubResource'}, + 'device_properties': {'key': 'properties.deviceProperties', 'type': 'DeviceProperties'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'site_key': {'key': 'properties.siteKey', 'type': 'str'}, + 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, + 'bgp_properties': {'key': 'properties.bgpProperties', 'type': 'BgpSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_security_site': {'key': 'properties.isSecuritySite', 'type': 'bool'}, + 'vpn_site_links': {'key': 'properties.vpnSiteLinks', 'type': '[VpnSiteLink]'}, + 'o365_policy': {'key': 'properties.o365Policy', 'type': 'O365PolicyProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnSite, self).__init__(**kwargs) + self.etag = None + self.virtual_wan = kwargs.get('virtual_wan', None) + self.device_properties = kwargs.get('device_properties', None) + self.ip_address = kwargs.get('ip_address', None) + self.site_key = kwargs.get('site_key', None) + self.address_space = kwargs.get('address_space', None) + self.bgp_properties = kwargs.get('bgp_properties', None) + self.provisioning_state = None + self.is_security_site = kwargs.get('is_security_site', None) + self.vpn_site_links = kwargs.get('vpn_site_links', None) + self.o365_policy = kwargs.get('o365_policy', None) + + +class VpnSiteId(msrest.serialization.Model): + """VpnSite Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vpn_site: The resource-uri of the vpn-site for which config is to be fetched. + :vartype vpn_site: str + """ + + _validation = { + 'vpn_site': {'readonly': True}, + } + + _attribute_map = { + 'vpn_site': {'key': 'vpnSite', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnSiteId, self).__init__(**kwargs) + self.vpn_site = None + + +class VpnSiteLink(SubResource): + """VpnSiteLink Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar type: Resource type. + :vartype type: str + :param link_properties: The link provider properties. + :type link_properties: ~azure.mgmt.network.v2021_05_01.models.VpnLinkProviderProperties + :param ip_address: The ip-address for the vpn-site-link. + :type ip_address: str + :param fqdn: FQDN of vpn-site-link. + :type fqdn: str + :param bgp_properties: The set of bgp properties. + :type bgp_properties: ~azure.mgmt.network.v2021_05_01.models.VpnLinkBgpSettings + :ivar provisioning_state: The provisioning state of the VPN site link resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'link_properties': {'key': 'properties.linkProperties', 'type': 'VpnLinkProviderProperties'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'bgp_properties': {'key': 'properties.bgpProperties', 'type': 'VpnLinkBgpSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnSiteLink, self).__init__(**kwargs) + self.etag = None + self.name = kwargs.get('name', None) + self.type = None + self.link_properties = kwargs.get('link_properties', None) + self.ip_address = kwargs.get('ip_address', None) + self.fqdn = kwargs.get('fqdn', None) + self.bgp_properties = kwargs.get('bgp_properties', None) + self.provisioning_state = None + + +class VpnSiteLinkConnection(SubResource): + """VpnSiteLinkConnection Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param vpn_site_link: Id of the connected vpn site link. + :type vpn_site_link: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param routing_weight: Routing weight for vpn connection. + :type routing_weight: int + :param vpn_link_connection_mode: Vpn link connection mode. Possible values include: "Default", + "ResponderOnly", "InitiatorOnly". + :type vpn_link_connection_mode: str or + ~azure.mgmt.network.v2021_05_01.models.VpnLinkConnectionMode + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or ~azure.mgmt.network.v2021_05_01.models.VpnConnectionStatus + :param vpn_connection_protocol_type: Connection protocol used for this connection. Possible + values include: "IKEv2", "IKEv1". + :type vpn_connection_protocol_type: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionProtocol + :ivar ingress_bytes_transferred: Ingress bytes transferred. + :vartype ingress_bytes_transferred: long + :ivar egress_bytes_transferred: Egress bytes transferred. + :vartype egress_bytes_transferred: long + :param connection_bandwidth: Expected bandwidth in MBPS. + :type connection_bandwidth: int + :param shared_key: SharedKey for the vpn connection. + :type shared_key: str + :param enable_bgp: EnableBgp flag. + :type enable_bgp: bool + :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :type use_policy_based_traffic_selectors: bool + :param ipsec_policies: The IPSec Policies to be considered by this connection. + :type ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param enable_rate_limiting: EnableBgp flag. + :type enable_rate_limiting: bool + :param use_local_azure_ip_address: Use local azure ip to initiate connection. + :type use_local_azure_ip_address: bool + :ivar provisioning_state: The provisioning state of the VPN site link connection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param ingress_nat_rules: List of ingress NatRules. + :type ingress_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param egress_nat_rules: List of egress NatRules. + :type egress_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vpn_site_link': {'key': 'properties.vpnSiteLink', 'type': 'SubResource'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'vpn_link_connection_mode': {'key': 'properties.vpnLinkConnectionMode', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'vpn_connection_protocol_type': {'key': 'properties.vpnConnectionProtocolType', 'type': 'str'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'connection_bandwidth': {'key': 'properties.connectionBandwidth', 'type': 'int'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'enable_rate_limiting': {'key': 'properties.enableRateLimiting', 'type': 'bool'}, + 'use_local_azure_ip_address': {'key': 'properties.useLocalAzureIpAddress', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'ingress_nat_rules': {'key': 'properties.ingressNatRules', 'type': '[SubResource]'}, + 'egress_nat_rules': {'key': 'properties.egressNatRules', 'type': '[SubResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnSiteLinkConnection, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.type = None + self.vpn_site_link = kwargs.get('vpn_site_link', None) + self.routing_weight = kwargs.get('routing_weight', None) + self.vpn_link_connection_mode = kwargs.get('vpn_link_connection_mode', None) + self.connection_status = None + self.vpn_connection_protocol_type = kwargs.get('vpn_connection_protocol_type', None) + self.ingress_bytes_transferred = None + self.egress_bytes_transferred = None + self.connection_bandwidth = kwargs.get('connection_bandwidth', None) + self.shared_key = kwargs.get('shared_key', None) + self.enable_bgp = kwargs.get('enable_bgp', None) + self.use_policy_based_traffic_selectors = kwargs.get('use_policy_based_traffic_selectors', None) + self.ipsec_policies = kwargs.get('ipsec_policies', None) + self.enable_rate_limiting = kwargs.get('enable_rate_limiting', None) + self.use_local_azure_ip_address = kwargs.get('use_local_azure_ip_address', None) + self.provisioning_state = None + self.ingress_nat_rules = kwargs.get('ingress_nat_rules', None) + self.egress_nat_rules = kwargs.get('egress_nat_rules', None) + + +class WebApplicationFirewallCustomRule(msrest.serialization.Model): + """Defines contents of a web application rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the resource that is unique within a policy. This name can be used to + access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param priority: Required. Priority of the rule. Rules with a lower value will be evaluated + before rules with a higher value. + :type priority: int + :param rule_type: Required. The rule type. Possible values include: "MatchRule", "Invalid". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallRuleType + :param match_conditions: Required. List of match conditions. + :type match_conditions: list[~azure.mgmt.network.v2021_05_01.models.MatchCondition] + :param action: Required. Type of Actions. Possible values include: "Allow", "Block", "Log". + :type action: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallAction + """ + + _validation = { + 'name': {'max_length': 128, 'min_length': 0}, + 'etag': {'readonly': True}, + 'priority': {'required': True}, + 'rule_type': {'required': True}, + 'match_conditions': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'match_conditions': {'key': 'matchConditions', 'type': '[MatchCondition]'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebApplicationFirewallCustomRule, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.etag = None + self.priority = kwargs['priority'] + self.rule_type = kwargs['rule_type'] + self.match_conditions = kwargs['match_conditions'] + self.action = kwargs['action'] + + +class WebApplicationFirewallPolicy(Resource): + """Defines web application firewall policy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param policy_settings: The PolicySettings for policy. + :type policy_settings: ~azure.mgmt.network.v2021_05_01.models.PolicySettings + :param custom_rules: The custom rules inside the policy. + :type custom_rules: + list[~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallCustomRule] + :ivar application_gateways: A collection of references to application gateways. + :vartype application_gateways: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGateway] + :ivar provisioning_state: The provisioning state of the web application firewall policy + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar resource_state: Resource status of the policy. Possible values include: "Creating", + "Enabling", "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or + ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicyResourceState + :param managed_rules: Describes the managedRules structure. + :type managed_rules: ~azure.mgmt.network.v2021_05_01.models.ManagedRulesDefinition + :ivar http_listeners: A collection of references to application gateway http listeners. + :vartype http_listeners: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar path_based_rules: A collection of references to application gateway path rules. + :vartype path_based_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'application_gateways': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_state': {'readonly': True}, + 'http_listeners': {'readonly': True}, + 'path_based_rules': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'policy_settings': {'key': 'properties.policySettings', 'type': 'PolicySettings'}, + 'custom_rules': {'key': 'properties.customRules', 'type': '[WebApplicationFirewallCustomRule]'}, + 'application_gateways': {'key': 'properties.applicationGateways', 'type': '[ApplicationGateway]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRulesDefinition'}, + 'http_listeners': {'key': 'properties.httpListeners', 'type': '[SubResource]'}, + 'path_based_rules': {'key': 'properties.pathBasedRules', 'type': '[SubResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(WebApplicationFirewallPolicy, self).__init__(**kwargs) + self.etag = None + self.policy_settings = kwargs.get('policy_settings', None) + self.custom_rules = kwargs.get('custom_rules', None) + self.application_gateways = None + self.provisioning_state = None + self.resource_state = None + self.managed_rules = kwargs.get('managed_rules', None) + self.http_listeners = None + self.path_based_rules = None + + +class WebApplicationFirewallPolicyListResult(msrest.serialization.Model): + """Result of the request to list WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of WebApplicationFirewallPolicies within a resource group. + :vartype value: list[~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicy] + :ivar next_link: URL to get the next set of WebApplicationFirewallPolicy objects if there are + any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebApplicationFirewallPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebApplicationFirewallPolicyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_models_py3.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_models_py3.py new file mode 100644 index 000000000000..096418f64cca --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_models_py3.py @@ -0,0 +1,26986 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._network_management_client_enums import * + + +class AadAuthenticationParameters(msrest.serialization.Model): + """AAD Vpn authentication type related parameters. + + :param aad_tenant: AAD Vpn authentication parameter AAD tenant. + :type aad_tenant: str + :param aad_audience: AAD Vpn authentication parameter AAD audience. + :type aad_audience: str + :param aad_issuer: AAD Vpn authentication parameter AAD issuer. + :type aad_issuer: str + """ + + _attribute_map = { + 'aad_tenant': {'key': 'aadTenant', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + 'aad_issuer': {'key': 'aadIssuer', 'type': 'str'}, + } + + def __init__( + self, + *, + aad_tenant: Optional[str] = None, + aad_audience: Optional[str] = None, + aad_issuer: Optional[str] = None, + **kwargs + ): + super(AadAuthenticationParameters, self).__init__(**kwargs) + self.aad_tenant = aad_tenant + self.aad_audience = aad_audience + self.aad_issuer = aad_issuer + + +class AddressSpace(msrest.serialization.Model): + """AddressSpace contains an array of IP address ranges that can be used by subnets of the virtual network. + + :param address_prefixes: A list of address blocks reserved for this virtual network in CIDR + notation. + :type address_prefixes: list[str] + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + } + + def __init__( + self, + *, + address_prefixes: Optional[List[str]] = None, + **kwargs + ): + super(AddressSpace, self).__init__(**kwargs) + self.address_prefixes = address_prefixes + + +class Resource(msrest.serialization.Model): + """Common resource representation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + self.location = location + self.tags = tags + + +class ApplicationGateway(Resource): + """Application gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param zones: A list of availability zones denoting where the resource needs to come from. + :type zones: list[str] + :param identity: The identity of the application gateway, if configured. + :type identity: ~azure.mgmt.network.v2021_05_01.models.ManagedServiceIdentity + :param sku: SKU of the application gateway resource. + :type sku: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySku + :param ssl_policy: SSL policy of the application gateway resource. + :type ssl_policy: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicy + :ivar operational_state: Operational state of the application gateway resource. Possible values + include: "Stopped", "Starting", "Running", "Stopping". + :vartype operational_state: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayOperationalState + :param gateway_ip_configurations: Subnets of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :type gateway_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayIPConfiguration] + :param authentication_certificates: Authentication certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :type authentication_certificates: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAuthenticationCertificate] + :param trusted_root_certificates: Trusted Root certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :type trusted_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayTrustedRootCertificate] + :param trusted_client_certificates: Trusted client certificates of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :type trusted_client_certificates: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayTrustedClientCertificate] + :param ssl_certificates: SSL certificates of the application gateway resource. For default + limits, see `Application Gateway limits + `_. + :type ssl_certificates: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslCertificate] + :param frontend_ip_configurations: Frontend IP addresses of the application gateway resource. + For default limits, see `Application Gateway limits + `_. + :type frontend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFrontendIPConfiguration] + :param frontend_ports: Frontend ports of the application gateway resource. For default limits, + see `Application Gateway limits + `_. + :type frontend_ports: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFrontendPort] + :param probes: Probes of the application gateway resource. + :type probes: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProbe] + :param backend_address_pools: Backend address pool of the application gateway resource. For + default limits, see `Application Gateway limits + `_. + :type backend_address_pools: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddressPool] + :param backend_http_settings_collection: Backend http settings of the application gateway + resource. For default limits, see `Application Gateway limits + `_. + :type backend_http_settings_collection: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHttpSettings] + :param http_listeners: Http listeners of the application gateway resource. For default limits, + see `Application Gateway limits + `_. + :type http_listeners: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayHttpListener] + :param ssl_profiles: SSL profiles of the application gateway resource. For default limits, see + `Application Gateway limits + `_. + :type ssl_profiles: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProfile] + :param url_path_maps: URL path map of the application gateway resource. For default limits, see + `Application Gateway limits + `_. + :type url_path_maps: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayUrlPathMap] + :param request_routing_rules: Request routing rules of the application gateway resource. + :type request_routing_rules: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRequestRoutingRule] + :param rewrite_rule_sets: Rewrite rules for the application gateway resource. + :type rewrite_rule_sets: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRewriteRuleSet] + :param redirect_configurations: Redirect configurations of the application gateway resource. + For default limits, see `Application Gateway limits + `_. + :type redirect_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRedirectConfiguration] + :param web_application_firewall_configuration: Web application firewall configuration. + :type web_application_firewall_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayWebApplicationFirewallConfiguration + :param firewall_policy: Reference to the FirewallPolicy resource. + :type firewall_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param enable_http2: Whether HTTP2 is enabled on the application gateway resource. + :type enable_http2: bool + :param enable_fips: Whether FIPS is enabled on the application gateway resource. + :type enable_fips: bool + :param autoscale_configuration: Autoscale Configuration. + :type autoscale_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAutoscaleConfiguration + :param private_link_configurations: PrivateLink configurations on application gateway. + :type private_link_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateLinkConfiguration] + :ivar private_endpoint_connections: Private Endpoint connections on application gateway. + :vartype private_endpoint_connections: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection] + :ivar resource_guid: The resource GUID property of the application gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the application gateway resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param custom_error_configurations: Custom error configurations of the application gateway + resource. + :type custom_error_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayCustomError] + :param force_firewall_policy_association: If true, associates a firewall policy with an + application gateway regardless whether the policy differs from the WAF Config. + :type force_firewall_policy_association: bool + :param load_distribution_policies: Load distribution policies of the application gateway + resource. + :type load_distribution_policies: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayLoadDistributionPolicy] + :param global_configuration: Global Configuration. + :type global_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayGlobalConfiguration + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'operational_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'sku': {'key': 'properties.sku', 'type': 'ApplicationGatewaySku'}, + 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, + 'operational_state': {'key': 'properties.operationalState', 'type': 'str'}, + 'gateway_ip_configurations': {'key': 'properties.gatewayIPConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, + 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[ApplicationGatewayAuthenticationCertificate]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[ApplicationGatewayTrustedRootCertificate]'}, + 'trusted_client_certificates': {'key': 'properties.trustedClientCertificates', 'type': '[ApplicationGatewayTrustedClientCertificate]'}, + 'ssl_certificates': {'key': 'properties.sslCertificates', 'type': '[ApplicationGatewaySslCertificate]'}, + 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[ApplicationGatewayFrontendIPConfiguration]'}, + 'frontend_ports': {'key': 'properties.frontendPorts', 'type': '[ApplicationGatewayFrontendPort]'}, + 'probes': {'key': 'properties.probes', 'type': '[ApplicationGatewayProbe]'}, + 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, + 'backend_http_settings_collection': {'key': 'properties.backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHttpSettings]'}, + 'http_listeners': {'key': 'properties.httpListeners', 'type': '[ApplicationGatewayHttpListener]'}, + 'ssl_profiles': {'key': 'properties.sslProfiles', 'type': '[ApplicationGatewaySslProfile]'}, + 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[ApplicationGatewayUrlPathMap]'}, + 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[ApplicationGatewayRequestRoutingRule]'}, + 'rewrite_rule_sets': {'key': 'properties.rewriteRuleSets', 'type': '[ApplicationGatewayRewriteRuleSet]'}, + 'redirect_configurations': {'key': 'properties.redirectConfigurations', 'type': '[ApplicationGatewayRedirectConfiguration]'}, + 'web_application_firewall_configuration': {'key': 'properties.webApplicationFirewallConfiguration', 'type': 'ApplicationGatewayWebApplicationFirewallConfiguration'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + 'enable_http2': {'key': 'properties.enableHttp2', 'type': 'bool'}, + 'enable_fips': {'key': 'properties.enableFips', 'type': 'bool'}, + 'autoscale_configuration': {'key': 'properties.autoscaleConfiguration', 'type': 'ApplicationGatewayAutoscaleConfiguration'}, + 'private_link_configurations': {'key': 'properties.privateLinkConfigurations', 'type': '[ApplicationGatewayPrivateLinkConfiguration]'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[ApplicationGatewayPrivateEndpointConnection]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'custom_error_configurations': {'key': 'properties.customErrorConfigurations', 'type': '[ApplicationGatewayCustomError]'}, + 'force_firewall_policy_association': {'key': 'properties.forceFirewallPolicyAssociation', 'type': 'bool'}, + 'load_distribution_policies': {'key': 'properties.loadDistributionPolicies', 'type': '[ApplicationGatewayLoadDistributionPolicy]'}, + 'global_configuration': {'key': 'properties.globalConfiguration', 'type': 'ApplicationGatewayGlobalConfiguration'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + zones: Optional[List[str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + sku: Optional["ApplicationGatewaySku"] = None, + ssl_policy: Optional["ApplicationGatewaySslPolicy"] = None, + gateway_ip_configurations: Optional[List["ApplicationGatewayIPConfiguration"]] = None, + authentication_certificates: Optional[List["ApplicationGatewayAuthenticationCertificate"]] = None, + trusted_root_certificates: Optional[List["ApplicationGatewayTrustedRootCertificate"]] = None, + trusted_client_certificates: Optional[List["ApplicationGatewayTrustedClientCertificate"]] = None, + ssl_certificates: Optional[List["ApplicationGatewaySslCertificate"]] = None, + frontend_ip_configurations: Optional[List["ApplicationGatewayFrontendIPConfiguration"]] = None, + frontend_ports: Optional[List["ApplicationGatewayFrontendPort"]] = None, + probes: Optional[List["ApplicationGatewayProbe"]] = None, + backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, + backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHttpSettings"]] = None, + http_listeners: Optional[List["ApplicationGatewayHttpListener"]] = None, + ssl_profiles: Optional[List["ApplicationGatewaySslProfile"]] = None, + url_path_maps: Optional[List["ApplicationGatewayUrlPathMap"]] = None, + request_routing_rules: Optional[List["ApplicationGatewayRequestRoutingRule"]] = None, + rewrite_rule_sets: Optional[List["ApplicationGatewayRewriteRuleSet"]] = None, + redirect_configurations: Optional[List["ApplicationGatewayRedirectConfiguration"]] = None, + web_application_firewall_configuration: Optional["ApplicationGatewayWebApplicationFirewallConfiguration"] = None, + firewall_policy: Optional["SubResource"] = None, + enable_http2: Optional[bool] = None, + enable_fips: Optional[bool] = None, + autoscale_configuration: Optional["ApplicationGatewayAutoscaleConfiguration"] = None, + private_link_configurations: Optional[List["ApplicationGatewayPrivateLinkConfiguration"]] = None, + custom_error_configurations: Optional[List["ApplicationGatewayCustomError"]] = None, + force_firewall_policy_association: Optional[bool] = None, + load_distribution_policies: Optional[List["ApplicationGatewayLoadDistributionPolicy"]] = None, + global_configuration: Optional["ApplicationGatewayGlobalConfiguration"] = None, + **kwargs + ): + super(ApplicationGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.zones = zones + self.identity = identity + self.sku = sku + self.ssl_policy = ssl_policy + self.operational_state = None + self.gateway_ip_configurations = gateway_ip_configurations + self.authentication_certificates = authentication_certificates + self.trusted_root_certificates = trusted_root_certificates + self.trusted_client_certificates = trusted_client_certificates + self.ssl_certificates = ssl_certificates + self.frontend_ip_configurations = frontend_ip_configurations + self.frontend_ports = frontend_ports + self.probes = probes + self.backend_address_pools = backend_address_pools + self.backend_http_settings_collection = backend_http_settings_collection + self.http_listeners = http_listeners + self.ssl_profiles = ssl_profiles + self.url_path_maps = url_path_maps + self.request_routing_rules = request_routing_rules + self.rewrite_rule_sets = rewrite_rule_sets + self.redirect_configurations = redirect_configurations + self.web_application_firewall_configuration = web_application_firewall_configuration + self.firewall_policy = firewall_policy + self.enable_http2 = enable_http2 + self.enable_fips = enable_fips + self.autoscale_configuration = autoscale_configuration + self.private_link_configurations = private_link_configurations + self.private_endpoint_connections = None + self.resource_guid = None + self.provisioning_state = None + self.custom_error_configurations = custom_error_configurations + self.force_firewall_policy_association = force_firewall_policy_association + self.load_distribution_policies = load_distribution_policies + self.global_configuration = global_configuration + + +class SubResource(msrest.serialization.Model): + """Reference to another subresource. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(SubResource, self).__init__(**kwargs) + self.id = id + + +class ApplicationGatewayAuthenticationCertificate(SubResource): + """Authentication certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the authentication certificate that is unique within an Application + Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param data: Certificate public data. + :type data: str + :ivar provisioning_state: The provisioning state of the authentication certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + data: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayAuthenticationCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.data = data + self.provisioning_state = None + + +class ApplicationGatewayAutoscaleConfiguration(msrest.serialization.Model): + """Application Gateway autoscale configuration. + + All required parameters must be populated in order to send to Azure. + + :param min_capacity: Required. Lower bound on number of Application Gateway capacity. + :type min_capacity: int + :param max_capacity: Upper bound on number of Application Gateway capacity. + :type max_capacity: int + """ + + _validation = { + 'min_capacity': {'required': True, 'minimum': 0}, + 'max_capacity': {'minimum': 2}, + } + + _attribute_map = { + 'min_capacity': {'key': 'minCapacity', 'type': 'int'}, + 'max_capacity': {'key': 'maxCapacity', 'type': 'int'}, + } + + def __init__( + self, + *, + min_capacity: int, + max_capacity: Optional[int] = None, + **kwargs + ): + super(ApplicationGatewayAutoscaleConfiguration, self).__init__(**kwargs) + self.min_capacity = min_capacity + self.max_capacity = max_capacity + + +class ApplicationGatewayAvailableSslOptions(Resource): + """Response for ApplicationGatewayAvailableSslOptions API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param predefined_policies: List of available Ssl predefined policy. + :type predefined_policies: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param default_policy: Name of the Ssl predefined policy applied by default to application + gateway. Possible values include: "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", + "AppGwSslPolicy20170401S". + :type default_policy: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicyName + :param available_cipher_suites: List of available Ssl cipher suites. + :type available_cipher_suites: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslCipherSuite] + :param available_protocols: List of available Ssl protocols. + :type available_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProtocol] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'predefined_policies': {'key': 'properties.predefinedPolicies', 'type': '[SubResource]'}, + 'default_policy': {'key': 'properties.defaultPolicy', 'type': 'str'}, + 'available_cipher_suites': {'key': 'properties.availableCipherSuites', 'type': '[str]'}, + 'available_protocols': {'key': 'properties.availableProtocols', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + predefined_policies: Optional[List["SubResource"]] = None, + default_policy: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, + available_cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, + available_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, + **kwargs + ): + super(ApplicationGatewayAvailableSslOptions, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.predefined_policies = predefined_policies + self.default_policy = default_policy + self.available_cipher_suites = available_cipher_suites + self.available_protocols = available_protocols + + +class ApplicationGatewayAvailableSslPredefinedPolicies(msrest.serialization.Model): + """Response for ApplicationGatewayAvailableSslOptions API service call. + + :param value: List of available Ssl predefined policy. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPredefinedPolicy] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewaySslPredefinedPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGatewaySslPredefinedPolicy"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayAvailableSslPredefinedPolicies, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ApplicationGatewayAvailableWafRuleSetsResult(msrest.serialization.Model): + """Response for ApplicationGatewayAvailableWafRuleSets API service call. + + :param value: The list of application gateway rule sets. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallRuleSet] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewayFirewallRuleSet]'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGatewayFirewallRuleSet"]] = None, + **kwargs + ): + super(ApplicationGatewayAvailableWafRuleSetsResult, self).__init__(**kwargs) + self.value = value + + +class ApplicationGatewayBackendAddress(msrest.serialization.Model): + """Backend address of an application gateway. + + :param fqdn: Fully qualified domain name (FQDN). + :type fqdn: str + :param ip_address: IP address. + :type ip_address: str + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + fqdn: Optional[str] = None, + ip_address: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayBackendAddress, self).__init__(**kwargs) + self.fqdn = fqdn + self.ip_address = ip_address + + +class ApplicationGatewayBackendAddressPool(SubResource): + """Backend Address Pool of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the backend address pool that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar backend_ip_configurations: Collection of references to IPs defined in network interfaces. + :vartype backend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration] + :param backend_addresses: Backend addresses. + :type backend_addresses: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddress] + :ivar provisioning_state: The provisioning state of the backend address pool resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'backend_ip_configurations': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'backend_addresses': {'key': 'properties.backendAddresses', 'type': '[ApplicationGatewayBackendAddress]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + backend_addresses: Optional[List["ApplicationGatewayBackendAddress"]] = None, + **kwargs + ): + super(ApplicationGatewayBackendAddressPool, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.backend_ip_configurations = None + self.backend_addresses = backend_addresses + self.provisioning_state = None + + +class ApplicationGatewayBackendHealth(msrest.serialization.Model): + """Response for ApplicationGatewayBackendHealth API service call. + + :param backend_address_pools: A list of ApplicationGatewayBackendHealthPool resources. + :type backend_address_pools: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthPool] + """ + + _attribute_map = { + 'backend_address_pools': {'key': 'backendAddressPools', 'type': '[ApplicationGatewayBackendHealthPool]'}, + } + + def __init__( + self, + *, + backend_address_pools: Optional[List["ApplicationGatewayBackendHealthPool"]] = None, + **kwargs + ): + super(ApplicationGatewayBackendHealth, self).__init__(**kwargs) + self.backend_address_pools = backend_address_pools + + +class ApplicationGatewayBackendHealthHttpSettings(msrest.serialization.Model): + """Application gateway BackendHealthHttp settings. + + :param backend_http_settings: Reference to an ApplicationGatewayBackendHttpSettings resource. + :type backend_http_settings: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHttpSettings + :param servers: List of ApplicationGatewayBackendHealthServer resources. + :type servers: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthServer] + """ + + _attribute_map = { + 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'ApplicationGatewayBackendHttpSettings'}, + 'servers': {'key': 'servers', 'type': '[ApplicationGatewayBackendHealthServer]'}, + } + + def __init__( + self, + *, + backend_http_settings: Optional["ApplicationGatewayBackendHttpSettings"] = None, + servers: Optional[List["ApplicationGatewayBackendHealthServer"]] = None, + **kwargs + ): + super(ApplicationGatewayBackendHealthHttpSettings, self).__init__(**kwargs) + self.backend_http_settings = backend_http_settings + self.servers = servers + + +class ApplicationGatewayBackendHealthOnDemand(msrest.serialization.Model): + """Result of on demand test probe. + + :param backend_address_pool: Reference to an ApplicationGatewayBackendAddressPool resource. + :type backend_address_pool: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddressPool + :param backend_health_http_settings: Application gateway BackendHealthHttp settings. + :type backend_health_http_settings: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthHttpSettings + """ + + _attribute_map = { + 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, + 'backend_health_http_settings': {'key': 'backendHealthHttpSettings', 'type': 'ApplicationGatewayBackendHealthHttpSettings'}, + } + + def __init__( + self, + *, + backend_address_pool: Optional["ApplicationGatewayBackendAddressPool"] = None, + backend_health_http_settings: Optional["ApplicationGatewayBackendHealthHttpSettings"] = None, + **kwargs + ): + super(ApplicationGatewayBackendHealthOnDemand, self).__init__(**kwargs) + self.backend_address_pool = backend_address_pool + self.backend_health_http_settings = backend_health_http_settings + + +class ApplicationGatewayBackendHealthPool(msrest.serialization.Model): + """Application gateway BackendHealth pool. + + :param backend_address_pool: Reference to an ApplicationGatewayBackendAddressPool resource. + :type backend_address_pool: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddressPool + :param backend_http_settings_collection: List of ApplicationGatewayBackendHealthHttpSettings + resources. + :type backend_http_settings_collection: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthHttpSettings] + """ + + _attribute_map = { + 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'ApplicationGatewayBackendAddressPool'}, + 'backend_http_settings_collection': {'key': 'backendHttpSettingsCollection', 'type': '[ApplicationGatewayBackendHealthHttpSettings]'}, + } + + def __init__( + self, + *, + backend_address_pool: Optional["ApplicationGatewayBackendAddressPool"] = None, + backend_http_settings_collection: Optional[List["ApplicationGatewayBackendHealthHttpSettings"]] = None, + **kwargs + ): + super(ApplicationGatewayBackendHealthPool, self).__init__(**kwargs) + self.backend_address_pool = backend_address_pool + self.backend_http_settings_collection = backend_http_settings_collection + + +class ApplicationGatewayBackendHealthServer(msrest.serialization.Model): + """Application gateway backendhealth http settings. + + :param address: IP address or FQDN of backend server. + :type address: str + :param ip_configuration: Reference to IP configuration of backend server. + :type ip_configuration: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration + :param health: Health of backend server. Possible values include: "Unknown", "Up", "Down", + "Partial", "Draining". + :type health: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthServerHealth + :param health_probe_log: Health Probe Log. + :type health_probe_log: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'ip_configuration': {'key': 'ipConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'health': {'key': 'health', 'type': 'str'}, + 'health_probe_log': {'key': 'healthProbeLog', 'type': 'str'}, + } + + def __init__( + self, + *, + address: Optional[str] = None, + ip_configuration: Optional["NetworkInterfaceIPConfiguration"] = None, + health: Optional[Union[str, "ApplicationGatewayBackendHealthServerHealth"]] = None, + health_probe_log: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayBackendHealthServer, self).__init__(**kwargs) + self.address = address + self.ip_configuration = ip_configuration + self.health = health + self.health_probe_log = health_probe_log + + +class ApplicationGatewayBackendHttpSettings(SubResource): + """Backend address pool settings of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the backend http settings that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param port: The destination port on the backend. + :type port: int + :param protocol: The protocol used to communicate with the backend. Possible values include: + "Http", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProtocol + :param cookie_based_affinity: Cookie based affinity. Possible values include: "Enabled", + "Disabled". + :type cookie_based_affinity: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayCookieBasedAffinity + :param request_timeout: Request timeout in seconds. Application Gateway will fail the request + if response is not received within RequestTimeout. Acceptable values are from 1 second to 86400 + seconds. + :type request_timeout: int + :param probe: Probe resource of an application gateway. + :type probe: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param authentication_certificates: Array of references to application gateway authentication + certificates. + :type authentication_certificates: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param trusted_root_certificates: Array of references to application gateway trusted root + certificates. + :type trusted_root_certificates: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param connection_draining: Connection draining of the backend http settings resource. + :type connection_draining: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayConnectionDraining + :param host_name: Host header to be sent to the backend servers. + :type host_name: str + :param pick_host_name_from_backend_address: Whether to pick host header should be picked from + the host name of the backend server. Default value is false. + :type pick_host_name_from_backend_address: bool + :param affinity_cookie_name: Cookie name to use for the affinity cookie. + :type affinity_cookie_name: str + :param probe_enabled: Whether the probe is enabled. Default value is false. + :type probe_enabled: bool + :param path: Path which should be used as a prefix for all HTTP requests. Null means no path + will be prefixed. Default value is null. + :type path: str + :ivar provisioning_state: The provisioning state of the backend HTTP settings resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'cookie_based_affinity': {'key': 'properties.cookieBasedAffinity', 'type': 'str'}, + 'request_timeout': {'key': 'properties.requestTimeout', 'type': 'int'}, + 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, + 'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'}, + 'trusted_root_certificates': {'key': 'properties.trustedRootCertificates', 'type': '[SubResource]'}, + 'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'pick_host_name_from_backend_address': {'key': 'properties.pickHostNameFromBackendAddress', 'type': 'bool'}, + 'affinity_cookie_name': {'key': 'properties.affinityCookieName', 'type': 'str'}, + 'probe_enabled': {'key': 'properties.probeEnabled', 'type': 'bool'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + port: Optional[int] = None, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + cookie_based_affinity: Optional[Union[str, "ApplicationGatewayCookieBasedAffinity"]] = None, + request_timeout: Optional[int] = None, + probe: Optional["SubResource"] = None, + authentication_certificates: Optional[List["SubResource"]] = None, + trusted_root_certificates: Optional[List["SubResource"]] = None, + connection_draining: Optional["ApplicationGatewayConnectionDraining"] = None, + host_name: Optional[str] = None, + pick_host_name_from_backend_address: Optional[bool] = None, + affinity_cookie_name: Optional[str] = None, + probe_enabled: Optional[bool] = None, + path: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayBackendHttpSettings, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.port = port + self.protocol = protocol + self.cookie_based_affinity = cookie_based_affinity + self.request_timeout = request_timeout + self.probe = probe + self.authentication_certificates = authentication_certificates + self.trusted_root_certificates = trusted_root_certificates + self.connection_draining = connection_draining + self.host_name = host_name + self.pick_host_name_from_backend_address = pick_host_name_from_backend_address + self.affinity_cookie_name = affinity_cookie_name + self.probe_enabled = probe_enabled + self.path = path + self.provisioning_state = None + + +class ApplicationGatewayClientAuthConfiguration(msrest.serialization.Model): + """Application gateway client authentication configuration. + + :param verify_client_cert_issuer_dn: Verify client certificate issuer name on the application + gateway. + :type verify_client_cert_issuer_dn: bool + """ + + _attribute_map = { + 'verify_client_cert_issuer_dn': {'key': 'verifyClientCertIssuerDN', 'type': 'bool'}, + } + + def __init__( + self, + *, + verify_client_cert_issuer_dn: Optional[bool] = None, + **kwargs + ): + super(ApplicationGatewayClientAuthConfiguration, self).__init__(**kwargs) + self.verify_client_cert_issuer_dn = verify_client_cert_issuer_dn + + +class ApplicationGatewayConnectionDraining(msrest.serialization.Model): + """Connection draining allows open connections to a backend server to be active for a specified time after the backend server got removed from the configuration. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether connection draining is enabled or not. + :type enabled: bool + :param drain_timeout_in_sec: Required. The number of seconds connection draining is active. + Acceptable values are from 1 second to 3600 seconds. + :type drain_timeout_in_sec: int + """ + + _validation = { + 'enabled': {'required': True}, + 'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'}, + } + + def __init__( + self, + *, + enabled: bool, + drain_timeout_in_sec: int, + **kwargs + ): + super(ApplicationGatewayConnectionDraining, self).__init__(**kwargs) + self.enabled = enabled + self.drain_timeout_in_sec = drain_timeout_in_sec + + +class ApplicationGatewayCustomError(msrest.serialization.Model): + """Customer error of an application gateway. + + :param status_code: Status code of the application gateway customer error. Possible values + include: "HttpStatus403", "HttpStatus502". + :type status_code: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayCustomErrorStatusCode + :param custom_error_page_url: Error page URL of the application gateway customer error. + :type custom_error_page_url: str + """ + + _attribute_map = { + 'status_code': {'key': 'statusCode', 'type': 'str'}, + 'custom_error_page_url': {'key': 'customErrorPageUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + status_code: Optional[Union[str, "ApplicationGatewayCustomErrorStatusCode"]] = None, + custom_error_page_url: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayCustomError, self).__init__(**kwargs) + self.status_code = status_code + self.custom_error_page_url = custom_error_page_url + + +class ApplicationGatewayFirewallDisabledRuleGroup(msrest.serialization.Model): + """Allows to disable rules within a rule group or an entire rule group. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. The name of the rule group that will be disabled. + :type rule_group_name: str + :param rules: The list of rules that will be disabled. If null, all rules of the rule group + will be disabled. + :type rules: list[int] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[int]'}, + } + + def __init__( + self, + *, + rule_group_name: str, + rules: Optional[List[int]] = None, + **kwargs + ): + super(ApplicationGatewayFirewallDisabledRuleGroup, self).__init__(**kwargs) + self.rule_group_name = rule_group_name + self.rules = rules + + +class ApplicationGatewayFirewallExclusion(msrest.serialization.Model): + """Allow to exclude some variable satisfy the condition for the WAF check. + + All required parameters must be populated in order to send to Azure. + + :param match_variable: Required. The variable to be excluded. + :type match_variable: str + :param selector_match_operator: Required. When matchVariable is a collection, operate on the + selector to specify which elements in the collection this exclusion applies to. + :type selector_match_operator: str + :param selector: Required. When matchVariable is a collection, operator used to specify which + elements in the collection this exclusion applies to. + :type selector: str + """ + + _validation = { + 'match_variable': {'required': True}, + 'selector_match_operator': {'required': True}, + 'selector': {'required': True}, + } + + _attribute_map = { + 'match_variable': {'key': 'matchVariable', 'type': 'str'}, + 'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + } + + def __init__( + self, + *, + match_variable: str, + selector_match_operator: str, + selector: str, + **kwargs + ): + super(ApplicationGatewayFirewallExclusion, self).__init__(**kwargs) + self.match_variable = match_variable + self.selector_match_operator = selector_match_operator + self.selector = selector + + +class ApplicationGatewayFirewallRule(msrest.serialization.Model): + """A web application firewall rule. + + All required parameters must be populated in order to send to Azure. + + :param rule_id: Required. The identifier of the web application firewall rule. + :type rule_id: int + :param description: The description of the web application firewall rule. + :type description: str + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'int'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + rule_id: int, + description: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayFirewallRule, self).__init__(**kwargs) + self.rule_id = rule_id + self.description = description + + +class ApplicationGatewayFirewallRuleGroup(msrest.serialization.Model): + """A web application firewall rule group. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. The name of the web application firewall rule group. + :type rule_group_name: str + :param description: The description of the web application firewall rule group. + :type description: str + :param rules: Required. The rules of the web application firewall rule group. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallRule] + """ + + _validation = { + 'rule_group_name': {'required': True}, + 'rules': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ApplicationGatewayFirewallRule]'}, + } + + def __init__( + self, + *, + rule_group_name: str, + rules: List["ApplicationGatewayFirewallRule"], + description: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayFirewallRuleGroup, self).__init__(**kwargs) + self.rule_group_name = rule_group_name + self.description = description + self.rules = rules + + +class ApplicationGatewayFirewallRuleSet(Resource): + """A web application firewall rule set. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar provisioning_state: The provisioning state of the web application firewall rule set. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param rule_set_type: The type of the web application firewall rule set. + :type rule_set_type: str + :param rule_set_version: The version of the web application firewall rule set type. + :type rule_set_version: str + :param rule_groups: The rule groups of the web application firewall rule set. + :type rule_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallRuleGroup] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'rule_set_type': {'key': 'properties.ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'properties.ruleSetVersion', 'type': 'str'}, + 'rule_groups': {'key': 'properties.ruleGroups', 'type': '[ApplicationGatewayFirewallRuleGroup]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + rule_set_type: Optional[str] = None, + rule_set_version: Optional[str] = None, + rule_groups: Optional[List["ApplicationGatewayFirewallRuleGroup"]] = None, + **kwargs + ): + super(ApplicationGatewayFirewallRuleSet, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.provisioning_state = None + self.rule_set_type = rule_set_type + self.rule_set_version = rule_set_version + self.rule_groups = rule_groups + + +class ApplicationGatewayFrontendIPConfiguration(SubResource): + """Frontend IP configuration of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the frontend IP configuration that is unique within an Application + Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param private_ip_address: PrivateIPAddress of the network interface IP Configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: Reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param public_ip_address: Reference to the PublicIP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param private_link_configuration: Reference to the application gateway private link + configuration. + :type private_link_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the frontend IP configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'private_link_configuration': {'key': 'properties.privateLinkConfiguration', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["SubResource"] = None, + public_ip_address: Optional["SubResource"] = None, + private_link_configuration: Optional["SubResource"] = None, + **kwargs + ): + super(ApplicationGatewayFrontendIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.public_ip_address = public_ip_address + self.private_link_configuration = private_link_configuration + self.provisioning_state = None + + +class ApplicationGatewayFrontendPort(SubResource): + """Frontend port of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the frontend port that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param port: Frontend port. + :type port: int + :ivar provisioning_state: The provisioning state of the frontend port resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + port: Optional[int] = None, + **kwargs + ): + super(ApplicationGatewayFrontendPort, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.port = port + self.provisioning_state = None + + +class ApplicationGatewayGlobalConfiguration(msrest.serialization.Model): + """Application Gateway global configuration. + + :param enable_request_buffering: Enable request buffering. + :type enable_request_buffering: bool + :param enable_response_buffering: Enable response buffering. + :type enable_response_buffering: bool + """ + + _attribute_map = { + 'enable_request_buffering': {'key': 'enableRequestBuffering', 'type': 'bool'}, + 'enable_response_buffering': {'key': 'enableResponseBuffering', 'type': 'bool'}, + } + + def __init__( + self, + *, + enable_request_buffering: Optional[bool] = None, + enable_response_buffering: Optional[bool] = None, + **kwargs + ): + super(ApplicationGatewayGlobalConfiguration, self).__init__(**kwargs) + self.enable_request_buffering = enable_request_buffering + self.enable_response_buffering = enable_response_buffering + + +class ApplicationGatewayHeaderConfiguration(msrest.serialization.Model): + """Header configuration of the Actions set in Application Gateway. + + :param header_name: Header name of the header configuration. + :type header_name: str + :param header_value: Header value of the header configuration. + :type header_value: str + """ + + _attribute_map = { + 'header_name': {'key': 'headerName', 'type': 'str'}, + 'header_value': {'key': 'headerValue', 'type': 'str'}, + } + + def __init__( + self, + *, + header_name: Optional[str] = None, + header_value: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayHeaderConfiguration, self).__init__(**kwargs) + self.header_name = header_name + self.header_value = header_value + + +class ApplicationGatewayHttpListener(SubResource): + """Http listener of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the HTTP listener that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param frontend_ip_configuration: Frontend IP configuration resource of an application gateway. + :type frontend_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param frontend_port: Frontend port resource of an application gateway. + :type frontend_port: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param protocol: Protocol of the HTTP listener. Possible values include: "Http", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProtocol + :param host_name: Host name of HTTP listener. + :type host_name: str + :param ssl_certificate: SSL certificate resource of an application gateway. + :type ssl_certificate: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param ssl_profile: SSL profile resource of the application gateway. + :type ssl_profile: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param require_server_name_indication: Applicable only if protocol is https. Enables SNI for + multi-hosting. + :type require_server_name_indication: bool + :ivar provisioning_state: The provisioning state of the HTTP listener resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param custom_error_configurations: Custom error configurations of the HTTP listener. + :type custom_error_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayCustomError] + :param firewall_policy: Reference to the FirewallPolicy resource. + :type firewall_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param host_names: List of Host names for HTTP Listener that allows special wildcard characters + as well. + :type host_names: list[str] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'host_name': {'key': 'properties.hostName', 'type': 'str'}, + 'ssl_certificate': {'key': 'properties.sslCertificate', 'type': 'SubResource'}, + 'ssl_profile': {'key': 'properties.sslProfile', 'type': 'SubResource'}, + 'require_server_name_indication': {'key': 'properties.requireServerNameIndication', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'custom_error_configurations': {'key': 'properties.customErrorConfigurations', 'type': '[ApplicationGatewayCustomError]'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_ip_configuration: Optional["SubResource"] = None, + frontend_port: Optional["SubResource"] = None, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + host_name: Optional[str] = None, + ssl_certificate: Optional["SubResource"] = None, + ssl_profile: Optional["SubResource"] = None, + require_server_name_indication: Optional[bool] = None, + custom_error_configurations: Optional[List["ApplicationGatewayCustomError"]] = None, + firewall_policy: Optional["SubResource"] = None, + host_names: Optional[List[str]] = None, + **kwargs + ): + super(ApplicationGatewayHttpListener, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.frontend_ip_configuration = frontend_ip_configuration + self.frontend_port = frontend_port + self.protocol = protocol + self.host_name = host_name + self.ssl_certificate = ssl_certificate + self.ssl_profile = ssl_profile + self.require_server_name_indication = require_server_name_indication + self.provisioning_state = None + self.custom_error_configurations = custom_error_configurations + self.firewall_policy = firewall_policy + self.host_names = host_names + + +class ApplicationGatewayIPConfiguration(SubResource): + """IP configuration of an application gateway. Currently 1 public and 1 private IP configuration is allowed. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the IP configuration that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param subnet: Reference to the subnet resource. A subnet from where application gateway gets + its private address. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the application gateway IP configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + subnet: Optional["SubResource"] = None, + **kwargs + ): + super(ApplicationGatewayIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.subnet = subnet + self.provisioning_state = None + + +class ApplicationGatewayListResult(msrest.serialization.Model): + """Response for ListApplicationGateways API service call. + + :param value: List of an application gateways in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGateway] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGateway"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ApplicationGatewayLoadDistributionPolicy(SubResource): + """Load Distribution Policy of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the load distribution policy that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param load_distribution_targets: Load Distribution Targets resource of an application gateway. + :type load_distribution_targets: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayLoadDistributionTarget] + :param load_distribution_algorithm: Load Distribution Targets resource of an application + gateway. Possible values include: "RoundRobin", "LeastConnections", "IpHash". + :type load_distribution_algorithm: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayLoadDistributionAlgorithm + :ivar provisioning_state: The provisioning state of the Load Distribution Policy resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'load_distribution_targets': {'key': 'properties.loadDistributionTargets', 'type': '[ApplicationGatewayLoadDistributionTarget]'}, + 'load_distribution_algorithm': {'key': 'properties.loadDistributionAlgorithm', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + load_distribution_targets: Optional[List["ApplicationGatewayLoadDistributionTarget"]] = None, + load_distribution_algorithm: Optional[Union[str, "ApplicationGatewayLoadDistributionAlgorithm"]] = None, + **kwargs + ): + super(ApplicationGatewayLoadDistributionPolicy, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.load_distribution_targets = load_distribution_targets + self.load_distribution_algorithm = load_distribution_algorithm + self.provisioning_state = None + + +class ApplicationGatewayLoadDistributionTarget(SubResource): + """Load Distribution Target of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the load distribution policy that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param weight_per_server: Weight per server. Range between 1 and 100. + :type weight_per_server: int + :param backend_address_pool: Backend address pool resource of the application gateway. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'weight_per_server': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'weight_per_server': {'key': 'properties.weightPerServer', 'type': 'int'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + weight_per_server: Optional[int] = None, + backend_address_pool: Optional["SubResource"] = None, + **kwargs + ): + super(ApplicationGatewayLoadDistributionTarget, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.weight_per_server = weight_per_server + self.backend_address_pool = backend_address_pool + + +class ApplicationGatewayOnDemandProbe(msrest.serialization.Model): + """Details of on demand test probe request. + + :param protocol: The protocol used for the probe. Possible values include: "Http", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProtocol + :param host: Host name to send the probe to. + :type host: str + :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to + :code:``://:code:``::code:``:code:``. + :type path: str + :param timeout: The probe timeout in seconds. Probe marked as failed if valid response is not + received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + :type timeout: int + :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from + the backend http settings. Default value is false. + :type pick_host_name_from_backend_http_settings: bool + :param match: Criterion for classifying a healthy probe response. + :type match: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProbeHealthResponseMatch + :param backend_address_pool: Reference to backend pool of application gateway to which probe + request will be sent. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_http_settings: Reference to backend http setting of application gateway to be + used for test probe. + :type backend_http_settings: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'host': {'key': 'host', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'timeout': {'key': 'timeout', 'type': 'int'}, + 'pick_host_name_from_backend_http_settings': {'key': 'pickHostNameFromBackendHttpSettings', 'type': 'bool'}, + 'match': {'key': 'match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, + 'backend_address_pool': {'key': 'backendAddressPool', 'type': 'SubResource'}, + 'backend_http_settings': {'key': 'backendHttpSettings', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + host: Optional[str] = None, + path: Optional[str] = None, + timeout: Optional[int] = None, + pick_host_name_from_backend_http_settings: Optional[bool] = None, + match: Optional["ApplicationGatewayProbeHealthResponseMatch"] = None, + backend_address_pool: Optional["SubResource"] = None, + backend_http_settings: Optional["SubResource"] = None, + **kwargs + ): + super(ApplicationGatewayOnDemandProbe, self).__init__(**kwargs) + self.protocol = protocol + self.host = host + self.path = path + self.timeout = timeout + self.pick_host_name_from_backend_http_settings = pick_host_name_from_backend_http_settings + self.match = match + self.backend_address_pool = backend_address_pool + self.backend_http_settings = backend_http_settings + + +class ApplicationGatewayPathRule(SubResource): + """Path rule of URL path map of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the path rule that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param paths: Path rules of URL path map. + :type paths: list[str] + :param backend_address_pool: Backend address pool resource of URL path map path rule. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_http_settings: Backend http settings resource of URL path map path rule. + :type backend_http_settings: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param redirect_configuration: Redirect configuration resource of URL path map path rule. + :type redirect_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param rewrite_rule_set: Rewrite rule set resource of URL path map path rule. + :type rewrite_rule_set: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param load_distribution_policy: Load Distribution Policy resource of URL path map path rule. + :type load_distribution_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the path rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param firewall_policy: Reference to the FirewallPolicy resource. + :type firewall_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'paths': {'key': 'properties.paths', 'type': '[str]'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, + 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, + 'rewrite_rule_set': {'key': 'properties.rewriteRuleSet', 'type': 'SubResource'}, + 'load_distribution_policy': {'key': 'properties.loadDistributionPolicy', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + paths: Optional[List[str]] = None, + backend_address_pool: Optional["SubResource"] = None, + backend_http_settings: Optional["SubResource"] = None, + redirect_configuration: Optional["SubResource"] = None, + rewrite_rule_set: Optional["SubResource"] = None, + load_distribution_policy: Optional["SubResource"] = None, + firewall_policy: Optional["SubResource"] = None, + **kwargs + ): + super(ApplicationGatewayPathRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.paths = paths + self.backend_address_pool = backend_address_pool + self.backend_http_settings = backend_http_settings + self.redirect_configuration = redirect_configuration + self.rewrite_rule_set = rewrite_rule_set + self.load_distribution_policy = load_distribution_policy + self.provisioning_state = None + self.firewall_policy = firewall_policy + + +class ApplicationGatewayPrivateEndpointConnection(SubResource): + """Private Endpoint connection on an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the private endpoint connection on an application gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the application gateway private endpoint + connection resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar link_identifier: The consumer link id. + :vartype link_identifier: str + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'link_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'link_identifier': {'key': 'properties.linkIdentifier', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(ApplicationGatewayPrivateEndpointConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_endpoint = None + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + self.link_identifier = None + + +class ApplicationGatewayPrivateEndpointConnectionListResult(msrest.serialization.Model): + """Response for ListApplicationGatewayPrivateEndpointConnection API service call. Gets all private endpoint connections for an application gateway. + + :param value: List of private endpoint connections on an application gateway. + :type value: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewayPrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGatewayPrivateEndpointConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayPrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ApplicationGatewayPrivateLinkConfiguration(SubResource): + """Private Link Configuration on an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the private link configuration that is unique within an Application + Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param ip_configurations: An array of application gateway private link ip configurations. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateLinkIpConfiguration] + :ivar provisioning_state: The provisioning state of the application gateway private link + configuration. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[ApplicationGatewayPrivateLinkIpConfiguration]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + ip_configurations: Optional[List["ApplicationGatewayPrivateLinkIpConfiguration"]] = None, + **kwargs + ): + super(ApplicationGatewayPrivateLinkConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.ip_configurations = ip_configurations + self.provisioning_state = None + + +class ApplicationGatewayPrivateLinkIpConfiguration(SubResource): + """The application gateway private link ip configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of application gateway private link ip configuration. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: Reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param primary: Whether the ip configuration is primary or not. + :type primary: bool + :ivar provisioning_state: The provisioning state of the application gateway private link IP + configuration. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["SubResource"] = None, + primary: Optional[bool] = None, + **kwargs + ): + super(ApplicationGatewayPrivateLinkIpConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.primary = primary + self.provisioning_state = None + + +class ApplicationGatewayPrivateLinkResource(SubResource): + """PrivateLink Resource of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the private link resource that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar group_id: Group identifier of private link resource. + :vartype group_id: str + :ivar required_members: Required member names of private link resource. + :vartype required_members: list[str] + :param required_zone_names: Required DNS zone names of the the private link resource. + :type required_zone_names: list[str] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + required_zone_names: Optional[List[str]] = None, + **kwargs + ): + super(ApplicationGatewayPrivateLinkResource, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names + + +class ApplicationGatewayPrivateLinkResourceListResult(msrest.serialization.Model): + """Response for ListApplicationGatewayPrivateLinkResources API service call. Gets all private link resources for an application gateway. + + :param value: List of private link resources of an application gateway. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateLinkResource] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationGatewayPrivateLinkResource]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationGatewayPrivateLinkResource"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayPrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ApplicationGatewayProbe(SubResource): + """Probe of the application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the probe that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param protocol: The protocol used for the probe. Possible values include: "Http", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProtocol + :param host: Host name to send the probe to. + :type host: str + :param path: Relative path of probe. Valid path starts from '/'. Probe is sent to + :code:``://:code:``::code:``:code:``. + :type path: str + :param interval: The probing interval in seconds. This is the time interval between two + consecutive probes. Acceptable values are from 1 second to 86400 seconds. + :type interval: int + :param timeout: The probe timeout in seconds. Probe marked as failed if valid response is not + received with this timeout period. Acceptable values are from 1 second to 86400 seconds. + :type timeout: int + :param unhealthy_threshold: The probe retry count. Backend server is marked down after + consecutive probe failure count reaches UnhealthyThreshold. Acceptable values are from 1 second + to 20. + :type unhealthy_threshold: int + :param pick_host_name_from_backend_http_settings: Whether the host header should be picked from + the backend http settings. Default value is false. + :type pick_host_name_from_backend_http_settings: bool + :param min_servers: Minimum number of servers that are always marked healthy. Default value is + 0. + :type min_servers: int + :param match: Criterion for classifying a healthy probe response. + :type match: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayProbeHealthResponseMatch + :ivar provisioning_state: The provisioning state of the probe resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param port: Custom port which will be used for probing the backend servers. The valid value + ranges from 1 to 65535. In case not set, port from http settings will be used. This property is + valid for Standard_v2 and WAF_v2 only. + :type port: int + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'port': {'maximum': 65535, 'minimum': 1}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'host': {'key': 'properties.host', 'type': 'str'}, + 'path': {'key': 'properties.path', 'type': 'str'}, + 'interval': {'key': 'properties.interval', 'type': 'int'}, + 'timeout': {'key': 'properties.timeout', 'type': 'int'}, + 'unhealthy_threshold': {'key': 'properties.unhealthyThreshold', 'type': 'int'}, + 'pick_host_name_from_backend_http_settings': {'key': 'properties.pickHostNameFromBackendHttpSettings', 'type': 'bool'}, + 'min_servers': {'key': 'properties.minServers', 'type': 'int'}, + 'match': {'key': 'properties.match', 'type': 'ApplicationGatewayProbeHealthResponseMatch'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + protocol: Optional[Union[str, "ApplicationGatewayProtocol"]] = None, + host: Optional[str] = None, + path: Optional[str] = None, + interval: Optional[int] = None, + timeout: Optional[int] = None, + unhealthy_threshold: Optional[int] = None, + pick_host_name_from_backend_http_settings: Optional[bool] = None, + min_servers: Optional[int] = None, + match: Optional["ApplicationGatewayProbeHealthResponseMatch"] = None, + port: Optional[int] = None, + **kwargs + ): + super(ApplicationGatewayProbe, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.protocol = protocol + self.host = host + self.path = path + self.interval = interval + self.timeout = timeout + self.unhealthy_threshold = unhealthy_threshold + self.pick_host_name_from_backend_http_settings = pick_host_name_from_backend_http_settings + self.min_servers = min_servers + self.match = match + self.provisioning_state = None + self.port = port + + +class ApplicationGatewayProbeHealthResponseMatch(msrest.serialization.Model): + """Application gateway probe health response match. + + :param body: Body that must be contained in the health response. Default value is empty. + :type body: str + :param status_codes: Allowed ranges of healthy status codes. Default range of healthy status + codes is 200-399. + :type status_codes: list[str] + """ + + _attribute_map = { + 'body': {'key': 'body', 'type': 'str'}, + 'status_codes': {'key': 'statusCodes', 'type': '[str]'}, + } + + def __init__( + self, + *, + body: Optional[str] = None, + status_codes: Optional[List[str]] = None, + **kwargs + ): + super(ApplicationGatewayProbeHealthResponseMatch, self).__init__(**kwargs) + self.body = body + self.status_codes = status_codes + + +class ApplicationGatewayRedirectConfiguration(SubResource): + """Redirect configuration of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the redirect configuration that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param redirect_type: HTTP redirection type. Possible values include: "Permanent", "Found", + "SeeOther", "Temporary". + :type redirect_type: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRedirectType + :param target_listener: Reference to a listener to redirect the request to. + :type target_listener: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param target_url: Url to redirect the request to. + :type target_url: str + :param include_path: Include path in the redirected url. + :type include_path: bool + :param include_query_string: Include query string in the redirected url. + :type include_query_string: bool + :param request_routing_rules: Request routing specifying redirect configuration. + :type request_routing_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param url_path_maps: Url path maps specifying default redirect configuration. + :type url_path_maps: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param path_rules: Path rules specifying redirect configuration. + :type path_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'redirect_type': {'key': 'properties.redirectType', 'type': 'str'}, + 'target_listener': {'key': 'properties.targetListener', 'type': 'SubResource'}, + 'target_url': {'key': 'properties.targetUrl', 'type': 'str'}, + 'include_path': {'key': 'properties.includePath', 'type': 'bool'}, + 'include_query_string': {'key': 'properties.includeQueryString', 'type': 'bool'}, + 'request_routing_rules': {'key': 'properties.requestRoutingRules', 'type': '[SubResource]'}, + 'url_path_maps': {'key': 'properties.urlPathMaps', 'type': '[SubResource]'}, + 'path_rules': {'key': 'properties.pathRules', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + redirect_type: Optional[Union[str, "ApplicationGatewayRedirectType"]] = None, + target_listener: Optional["SubResource"] = None, + target_url: Optional[str] = None, + include_path: Optional[bool] = None, + include_query_string: Optional[bool] = None, + request_routing_rules: Optional[List["SubResource"]] = None, + url_path_maps: Optional[List["SubResource"]] = None, + path_rules: Optional[List["SubResource"]] = None, + **kwargs + ): + super(ApplicationGatewayRedirectConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.redirect_type = redirect_type + self.target_listener = target_listener + self.target_url = target_url + self.include_path = include_path + self.include_query_string = include_query_string + self.request_routing_rules = request_routing_rules + self.url_path_maps = url_path_maps + self.path_rules = path_rules + + +class ApplicationGatewayRequestRoutingRule(SubResource): + """Request routing rule of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the request routing rule that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param rule_type: Rule type. Possible values include: "Basic", "PathBasedRouting". + :type rule_type: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRequestRoutingRuleType + :param priority: Priority of the request routing rule. + :type priority: int + :param backend_address_pool: Backend address pool resource of the application gateway. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_http_settings: Backend http settings resource of the application gateway. + :type backend_http_settings: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param http_listener: Http listener resource of the application gateway. + :type http_listener: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param url_path_map: URL path map resource of the application gateway. + :type url_path_map: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param rewrite_rule_set: Rewrite Rule Set resource in Basic rule of the application gateway. + :type rewrite_rule_set: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param redirect_configuration: Redirect configuration resource of the application gateway. + :type redirect_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param load_distribution_policy: Load Distribution Policy resource of the application gateway. + :type load_distribution_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the request routing rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'priority': {'maximum': 20000, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rule_type': {'key': 'properties.ruleType', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_http_settings': {'key': 'properties.backendHttpSettings', 'type': 'SubResource'}, + 'http_listener': {'key': 'properties.httpListener', 'type': 'SubResource'}, + 'url_path_map': {'key': 'properties.urlPathMap', 'type': 'SubResource'}, + 'rewrite_rule_set': {'key': 'properties.rewriteRuleSet', 'type': 'SubResource'}, + 'redirect_configuration': {'key': 'properties.redirectConfiguration', 'type': 'SubResource'}, + 'load_distribution_policy': {'key': 'properties.loadDistributionPolicy', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + rule_type: Optional[Union[str, "ApplicationGatewayRequestRoutingRuleType"]] = None, + priority: Optional[int] = None, + backend_address_pool: Optional["SubResource"] = None, + backend_http_settings: Optional["SubResource"] = None, + http_listener: Optional["SubResource"] = None, + url_path_map: Optional["SubResource"] = None, + rewrite_rule_set: Optional["SubResource"] = None, + redirect_configuration: Optional["SubResource"] = None, + load_distribution_policy: Optional["SubResource"] = None, + **kwargs + ): + super(ApplicationGatewayRequestRoutingRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.rule_type = rule_type + self.priority = priority + self.backend_address_pool = backend_address_pool + self.backend_http_settings = backend_http_settings + self.http_listener = http_listener + self.url_path_map = url_path_map + self.rewrite_rule_set = rewrite_rule_set + self.redirect_configuration = redirect_configuration + self.load_distribution_policy = load_distribution_policy + self.provisioning_state = None + + +class ApplicationGatewayRewriteRule(msrest.serialization.Model): + """Rewrite rule of an application gateway. + + :param name: Name of the rewrite rule that is unique within an Application Gateway. + :type name: str + :param rule_sequence: Rule Sequence of the rewrite rule that determines the order of execution + of a particular rule in a RewriteRuleSet. + :type rule_sequence: int + :param conditions: Conditions based on which the action set execution will be evaluated. + :type conditions: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRewriteRuleCondition] + :param action_set: Set of actions to be done as part of the rewrite Rule. + :type action_set: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRewriteRuleActionSet + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'rule_sequence': {'key': 'ruleSequence', 'type': 'int'}, + 'conditions': {'key': 'conditions', 'type': '[ApplicationGatewayRewriteRuleCondition]'}, + 'action_set': {'key': 'actionSet', 'type': 'ApplicationGatewayRewriteRuleActionSet'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + rule_sequence: Optional[int] = None, + conditions: Optional[List["ApplicationGatewayRewriteRuleCondition"]] = None, + action_set: Optional["ApplicationGatewayRewriteRuleActionSet"] = None, + **kwargs + ): + super(ApplicationGatewayRewriteRule, self).__init__(**kwargs) + self.name = name + self.rule_sequence = rule_sequence + self.conditions = conditions + self.action_set = action_set + + +class ApplicationGatewayRewriteRuleActionSet(msrest.serialization.Model): + """Set of actions in the Rewrite Rule in Application Gateway. + + :param request_header_configurations: Request Header Actions in the Action Set. + :type request_header_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayHeaderConfiguration] + :param response_header_configurations: Response Header Actions in the Action Set. + :type response_header_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayHeaderConfiguration] + :param url_configuration: Url Configuration Action in the Action Set. + :type url_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayUrlConfiguration + """ + + _attribute_map = { + 'request_header_configurations': {'key': 'requestHeaderConfigurations', 'type': '[ApplicationGatewayHeaderConfiguration]'}, + 'response_header_configurations': {'key': 'responseHeaderConfigurations', 'type': '[ApplicationGatewayHeaderConfiguration]'}, + 'url_configuration': {'key': 'urlConfiguration', 'type': 'ApplicationGatewayUrlConfiguration'}, + } + + def __init__( + self, + *, + request_header_configurations: Optional[List["ApplicationGatewayHeaderConfiguration"]] = None, + response_header_configurations: Optional[List["ApplicationGatewayHeaderConfiguration"]] = None, + url_configuration: Optional["ApplicationGatewayUrlConfiguration"] = None, + **kwargs + ): + super(ApplicationGatewayRewriteRuleActionSet, self).__init__(**kwargs) + self.request_header_configurations = request_header_configurations + self.response_header_configurations = response_header_configurations + self.url_configuration = url_configuration + + +class ApplicationGatewayRewriteRuleCondition(msrest.serialization.Model): + """Set of conditions in the Rewrite Rule in Application Gateway. + + :param variable: The condition parameter of the RewriteRuleCondition. + :type variable: str + :param pattern: The pattern, either fixed string or regular expression, that evaluates the + truthfulness of the condition. + :type pattern: str + :param ignore_case: Setting this parameter to truth value with force the pattern to do a case + in-sensitive comparison. + :type ignore_case: bool + :param negate: Setting this value as truth will force to check the negation of the condition + given by the user. + :type negate: bool + """ + + _attribute_map = { + 'variable': {'key': 'variable', 'type': 'str'}, + 'pattern': {'key': 'pattern', 'type': 'str'}, + 'ignore_case': {'key': 'ignoreCase', 'type': 'bool'}, + 'negate': {'key': 'negate', 'type': 'bool'}, + } + + def __init__( + self, + *, + variable: Optional[str] = None, + pattern: Optional[str] = None, + ignore_case: Optional[bool] = None, + negate: Optional[bool] = None, + **kwargs + ): + super(ApplicationGatewayRewriteRuleCondition, self).__init__(**kwargs) + self.variable = variable + self.pattern = pattern + self.ignore_case = ignore_case + self.negate = negate + + +class ApplicationGatewayRewriteRuleSet(SubResource): + """Rewrite rule set of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the rewrite rule set that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param rewrite_rules: Rewrite rules in the rewrite rule set. + :type rewrite_rules: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayRewriteRule] + :ivar provisioning_state: The provisioning state of the rewrite rule set resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'rewrite_rules': {'key': 'properties.rewriteRules', 'type': '[ApplicationGatewayRewriteRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + rewrite_rules: Optional[List["ApplicationGatewayRewriteRule"]] = None, + **kwargs + ): + super(ApplicationGatewayRewriteRuleSet, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.rewrite_rules = rewrite_rules + self.provisioning_state = None + + +class ApplicationGatewaySku(msrest.serialization.Model): + """SKU of an application gateway. + + :param name: Name of an application gateway SKU. Possible values include: "Standard_Small", + "Standard_Medium", "Standard_Large", "WAF_Medium", "WAF_Large", "Standard_v2", "WAF_v2". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySkuName + :param tier: Tier of an application gateway. Possible values include: "Standard", "WAF", + "Standard_v2", "WAF_v2". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayTier + :param capacity: Capacity (instance count) of an application gateway. + :type capacity: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "ApplicationGatewaySkuName"]] = None, + tier: Optional[Union[str, "ApplicationGatewayTier"]] = None, + capacity: Optional[int] = None, + **kwargs + ): + super(ApplicationGatewaySku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = capacity + + +class ApplicationGatewaySslCertificate(SubResource): + """SSL certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the SSL certificate that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param data: Base-64 encoded pfx certificate. Only applicable in PUT Request. + :type data: str + :param password: Password for the pfx file specified in data. Only applicable in PUT request. + :type password: str + :ivar public_cert_data: Base-64 encoded Public cert data corresponding to pfx specified in + data. Only applicable in GET request. + :vartype public_cert_data: str + :param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :type key_vault_secret_id: str + :ivar provisioning_state: The provisioning state of the SSL certificate resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'public_cert_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'password': {'key': 'properties.password', 'type': 'str'}, + 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, + 'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + data: Optional[str] = None, + password: Optional[str] = None, + key_vault_secret_id: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewaySslCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.data = data + self.password = password + self.public_cert_data = None + self.key_vault_secret_id = key_vault_secret_id + self.provisioning_state = None + + +class ApplicationGatewaySslPolicy(msrest.serialization.Model): + """Application Gateway Ssl policy. + + :param disabled_ssl_protocols: Ssl protocols to be disabled on application gateway. + :type disabled_ssl_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProtocol] + :param policy_type: Type of Ssl Policy. Possible values include: "Predefined", "Custom". + :type policy_type: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicyType + :param policy_name: Name of Ssl predefined policy. Possible values include: + "AppGwSslPolicy20150501", "AppGwSslPolicy20170401", "AppGwSslPolicy20170401S". + :type policy_name: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicyName + :param cipher_suites: Ssl cipher suites to be enabled in the specified order to application + gateway. + :type cipher_suites: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslCipherSuite] + :param min_protocol_version: Minimum version of Ssl protocol to be supported on application + gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". + :type min_protocol_version: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProtocol + """ + + _attribute_map = { + 'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'}, + 'policy_type': {'key': 'policyType', 'type': 'str'}, + 'policy_name': {'key': 'policyName', 'type': 'str'}, + 'cipher_suites': {'key': 'cipherSuites', 'type': '[str]'}, + 'min_protocol_version': {'key': 'minProtocolVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + disabled_ssl_protocols: Optional[List[Union[str, "ApplicationGatewaySslProtocol"]]] = None, + policy_type: Optional[Union[str, "ApplicationGatewaySslPolicyType"]] = None, + policy_name: Optional[Union[str, "ApplicationGatewaySslPolicyName"]] = None, + cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, + min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, + **kwargs + ): + super(ApplicationGatewaySslPolicy, self).__init__(**kwargs) + self.disabled_ssl_protocols = disabled_ssl_protocols + self.policy_type = policy_type + self.policy_name = policy_name + self.cipher_suites = cipher_suites + self.min_protocol_version = min_protocol_version + + +class ApplicationGatewaySslPredefinedPolicy(SubResource): + """An Ssl predefined policy. + + :param id: Resource ID. + :type id: str + :param name: Name of the Ssl predefined policy. + :type name: str + :param cipher_suites: Ssl cipher suites to be enabled in the specified order for application + gateway. + :type cipher_suites: list[str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslCipherSuite] + :param min_protocol_version: Minimum version of Ssl protocol to be supported on application + gateway. Possible values include: "TLSv1_0", "TLSv1_1", "TLSv1_2". + :type min_protocol_version: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslProtocol + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'cipher_suites': {'key': 'properties.cipherSuites', 'type': '[str]'}, + 'min_protocol_version': {'key': 'properties.minProtocolVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + cipher_suites: Optional[List[Union[str, "ApplicationGatewaySslCipherSuite"]]] = None, + min_protocol_version: Optional[Union[str, "ApplicationGatewaySslProtocol"]] = None, + **kwargs + ): + super(ApplicationGatewaySslPredefinedPolicy, self).__init__(id=id, **kwargs) + self.name = name + self.cipher_suites = cipher_suites + self.min_protocol_version = min_protocol_version + + +class ApplicationGatewaySslProfile(SubResource): + """SSL profile of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the SSL profile that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param trusted_client_certificates: Array of references to application gateway trusted client + certificates. + :type trusted_client_certificates: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param ssl_policy: SSL policy of the application gateway resource. + :type ssl_policy: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPolicy + :param client_auth_configuration: Client authentication configuration of the application + gateway resource. + :type client_auth_configuration: + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayClientAuthConfiguration + :ivar provisioning_state: The provisioning state of the HTTP listener resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'trusted_client_certificates': {'key': 'properties.trustedClientCertificates', 'type': '[SubResource]'}, + 'ssl_policy': {'key': 'properties.sslPolicy', 'type': 'ApplicationGatewaySslPolicy'}, + 'client_auth_configuration': {'key': 'properties.clientAuthConfiguration', 'type': 'ApplicationGatewayClientAuthConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + trusted_client_certificates: Optional[List["SubResource"]] = None, + ssl_policy: Optional["ApplicationGatewaySslPolicy"] = None, + client_auth_configuration: Optional["ApplicationGatewayClientAuthConfiguration"] = None, + **kwargs + ): + super(ApplicationGatewaySslProfile, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.trusted_client_certificates = trusted_client_certificates + self.ssl_policy = ssl_policy + self.client_auth_configuration = client_auth_configuration + self.provisioning_state = None + + +class ApplicationGatewayTrustedClientCertificate(SubResource): + """Trusted client certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the trusted client certificate that is unique within an Application + Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param data: Certificate public data. + :type data: str + :ivar validated_cert_data: Validated certificate data. + :vartype validated_cert_data: str + :ivar client_cert_issuer_dn: Distinguished name of client certificate issuer. + :vartype client_cert_issuer_dn: str + :ivar provisioning_state: The provisioning state of the trusted client certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'validated_cert_data': {'readonly': True}, + 'client_cert_issuer_dn': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'validated_cert_data': {'key': 'properties.validatedCertData', 'type': 'str'}, + 'client_cert_issuer_dn': {'key': 'properties.clientCertIssuerDN', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + data: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayTrustedClientCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.data = data + self.validated_cert_data = None + self.client_cert_issuer_dn = None + self.provisioning_state = None + + +class ApplicationGatewayTrustedRootCertificate(SubResource): + """Trusted Root certificates of an application gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the trusted root certificate that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param data: Certificate public data. + :type data: str + :param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :type key_vault_secret_id: str + :ivar provisioning_state: The provisioning state of the trusted root certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'data': {'key': 'properties.data', 'type': 'str'}, + 'key_vault_secret_id': {'key': 'properties.keyVaultSecretId', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + data: Optional[str] = None, + key_vault_secret_id: Optional[str] = None, + **kwargs + ): + super(ApplicationGatewayTrustedRootCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.data = data + self.key_vault_secret_id = key_vault_secret_id + self.provisioning_state = None + + +class ApplicationGatewayUrlConfiguration(msrest.serialization.Model): + """Url configuration of the Actions set in Application Gateway. + + :param modified_path: Url path which user has provided for url rewrite. Null means no path will + be updated. Default value is null. + :type modified_path: str + :param modified_query_string: Query string which user has provided for url rewrite. Null means + no query string will be updated. Default value is null. + :type modified_query_string: str + :param reroute: If set as true, it will re-evaluate the url path map provided in path based + request routing rules using modified path. Default value is false. + :type reroute: bool + """ + + _attribute_map = { + 'modified_path': {'key': 'modifiedPath', 'type': 'str'}, + 'modified_query_string': {'key': 'modifiedQueryString', 'type': 'str'}, + 'reroute': {'key': 'reroute', 'type': 'bool'}, + } + + def __init__( + self, + *, + modified_path: Optional[str] = None, + modified_query_string: Optional[str] = None, + reroute: Optional[bool] = None, + **kwargs + ): + super(ApplicationGatewayUrlConfiguration, self).__init__(**kwargs) + self.modified_path = modified_path + self.modified_query_string = modified_query_string + self.reroute = reroute + + +class ApplicationGatewayUrlPathMap(SubResource): + """UrlPathMaps give a url path to the backend mapping information for PathBasedRouting. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the URL path map that is unique within an Application Gateway. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param default_backend_address_pool: Default backend address pool resource of URL path map. + :type default_backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param default_backend_http_settings: Default backend http settings resource of URL path map. + :type default_backend_http_settings: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param default_rewrite_rule_set: Default Rewrite rule set resource of URL path map. + :type default_rewrite_rule_set: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param default_redirect_configuration: Default redirect configuration resource of URL path map. + :type default_redirect_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param default_load_distribution_policy: Default Load Distribution Policy resource of URL path + map. + :type default_load_distribution_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param path_rules: Path rule of URL path map resource. + :type path_rules: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPathRule] + :ivar provisioning_state: The provisioning state of the URL path map resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'default_backend_address_pool': {'key': 'properties.defaultBackendAddressPool', 'type': 'SubResource'}, + 'default_backend_http_settings': {'key': 'properties.defaultBackendHttpSettings', 'type': 'SubResource'}, + 'default_rewrite_rule_set': {'key': 'properties.defaultRewriteRuleSet', 'type': 'SubResource'}, + 'default_redirect_configuration': {'key': 'properties.defaultRedirectConfiguration', 'type': 'SubResource'}, + 'default_load_distribution_policy': {'key': 'properties.defaultLoadDistributionPolicy', 'type': 'SubResource'}, + 'path_rules': {'key': 'properties.pathRules', 'type': '[ApplicationGatewayPathRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + default_backend_address_pool: Optional["SubResource"] = None, + default_backend_http_settings: Optional["SubResource"] = None, + default_rewrite_rule_set: Optional["SubResource"] = None, + default_redirect_configuration: Optional["SubResource"] = None, + default_load_distribution_policy: Optional["SubResource"] = None, + path_rules: Optional[List["ApplicationGatewayPathRule"]] = None, + **kwargs + ): + super(ApplicationGatewayUrlPathMap, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.default_backend_address_pool = default_backend_address_pool + self.default_backend_http_settings = default_backend_http_settings + self.default_rewrite_rule_set = default_rewrite_rule_set + self.default_redirect_configuration = default_redirect_configuration + self.default_load_distribution_policy = default_load_distribution_policy + self.path_rules = path_rules + self.provisioning_state = None + + +class ApplicationGatewayWebApplicationFirewallConfiguration(msrest.serialization.Model): + """Application gateway web application firewall configuration. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Whether the web application firewall is enabled or not. + :type enabled: bool + :param firewall_mode: Required. Web application firewall mode. Possible values include: + "Detection", "Prevention". + :type firewall_mode: str or + ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallMode + :param rule_set_type: Required. The type of the web application firewall rule set. Possible + values are: 'OWASP'. + :type rule_set_type: str + :param rule_set_version: Required. The version of the rule set type. + :type rule_set_version: str + :param disabled_rule_groups: The disabled rule groups. + :type disabled_rule_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallDisabledRuleGroup] + :param request_body_check: Whether allow WAF to check request Body. + :type request_body_check: bool + :param max_request_body_size: Maximum request body size for WAF. + :type max_request_body_size: int + :param max_request_body_size_in_kb: Maximum request body size in Kb for WAF. + :type max_request_body_size_in_kb: int + :param file_upload_limit_in_mb: Maximum file upload size in Mb for WAF. + :type file_upload_limit_in_mb: int + :param exclusions: The exclusion list. + :type exclusions: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayFirewallExclusion] + """ + + _validation = { + 'enabled': {'required': True}, + 'firewall_mode': {'required': True}, + 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, + 'max_request_body_size': {'maximum': 128, 'minimum': 8}, + 'max_request_body_size_in_kb': {'maximum': 128, 'minimum': 8}, + 'file_upload_limit_in_mb': {'minimum': 0}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'firewall_mode': {'key': 'firewallMode', 'type': 'str'}, + 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'disabled_rule_groups': {'key': 'disabledRuleGroups', 'type': '[ApplicationGatewayFirewallDisabledRuleGroup]'}, + 'request_body_check': {'key': 'requestBodyCheck', 'type': 'bool'}, + 'max_request_body_size': {'key': 'maxRequestBodySize', 'type': 'int'}, + 'max_request_body_size_in_kb': {'key': 'maxRequestBodySizeInKb', 'type': 'int'}, + 'file_upload_limit_in_mb': {'key': 'fileUploadLimitInMb', 'type': 'int'}, + 'exclusions': {'key': 'exclusions', 'type': '[ApplicationGatewayFirewallExclusion]'}, + } + + def __init__( + self, + *, + enabled: bool, + firewall_mode: Union[str, "ApplicationGatewayFirewallMode"], + rule_set_type: str, + rule_set_version: str, + disabled_rule_groups: Optional[List["ApplicationGatewayFirewallDisabledRuleGroup"]] = None, + request_body_check: Optional[bool] = None, + max_request_body_size: Optional[int] = None, + max_request_body_size_in_kb: Optional[int] = None, + file_upload_limit_in_mb: Optional[int] = None, + exclusions: Optional[List["ApplicationGatewayFirewallExclusion"]] = None, + **kwargs + ): + super(ApplicationGatewayWebApplicationFirewallConfiguration, self).__init__(**kwargs) + self.enabled = enabled + self.firewall_mode = firewall_mode + self.rule_set_type = rule_set_type + self.rule_set_version = rule_set_version + self.disabled_rule_groups = disabled_rule_groups + self.request_body_check = request_body_check + self.max_request_body_size = max_request_body_size + self.max_request_body_size_in_kb = max_request_body_size_in_kb + self.file_upload_limit_in_mb = file_upload_limit_in_mb + self.exclusions = exclusions + + +class FirewallPolicyRule(msrest.serialization.Model): + """Properties of a rule. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ApplicationRule, NatRule, NetworkRule. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleType + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + } + + _subtype_map = { + 'rule_type': {'ApplicationRule': 'ApplicationRule', 'NatRule': 'NatRule', 'NetworkRule': 'NetworkRule'} + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(FirewallPolicyRule, self).__init__(**kwargs) + self.name = name + self.description = description + self.rule_type = None # type: Optional[str] + + +class ApplicationRule(FirewallPolicyRule): + """Rule of type application. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleType + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses or Service Tags. + :type destination_addresses: list[str] + :param protocols: Array of Application Protocols. + :type protocols: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleApplicationProtocol] + :param target_fqdns: List of FQDNs for this rule. + :type target_fqdns: list[str] + :param target_urls: List of Urls for this rule condition. + :type target_urls: list[str] + :param fqdn_tags: List of FQDN Tags for this rule. + :type fqdn_tags: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param terminate_tls: Terminate TLS connections for this rule. + :type terminate_tls: bool + :param web_categories: List of destination azure web categories. + :type web_categories: list[str] + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[FirewallPolicyRuleApplicationProtocol]'}, + 'target_fqdns': {'key': 'targetFqdns', 'type': '[str]'}, + 'target_urls': {'key': 'targetUrls', 'type': '[str]'}, + 'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'terminate_tls': {'key': 'terminateTLS', 'type': 'bool'}, + 'web_categories': {'key': 'webCategories', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + protocols: Optional[List["FirewallPolicyRuleApplicationProtocol"]] = None, + target_fqdns: Optional[List[str]] = None, + target_urls: Optional[List[str]] = None, + fqdn_tags: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + terminate_tls: Optional[bool] = None, + web_categories: Optional[List[str]] = None, + **kwargs + ): + super(ApplicationRule, self).__init__(name=name, description=description, **kwargs) + self.rule_type = 'ApplicationRule' # type: str + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.protocols = protocols + self.target_fqdns = target_fqdns + self.target_urls = target_urls + self.fqdn_tags = fqdn_tags + self.source_ip_groups = source_ip_groups + self.terminate_tls = terminate_tls + self.web_categories = web_categories + + +class ApplicationSecurityGroup(Resource): + """An application security group in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar resource_guid: The resource GUID property of the application security group resource. It + uniquely identifies a resource, even if the user changes its name or migrate the resource + across subscriptions or resource groups. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the application security group resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(ApplicationSecurityGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.resource_guid = None + self.provisioning_state = None + + +class ApplicationSecurityGroupListResult(msrest.serialization.Model): + """A list of application security groups. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of application security groups. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ApplicationSecurityGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ApplicationSecurityGroup"]] = None, + **kwargs + ): + super(ApplicationSecurityGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AuthorizationListResult(msrest.serialization.Model): + """Response for ListAuthorizations API service call retrieves all authorizations that belongs to an ExpressRouteCircuit. + + :param value: The authorizations in an ExpressRoute Circuit. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitAuthorization]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitAuthorization"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AuthorizationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AutoApprovedPrivateLinkService(msrest.serialization.Model): + """The information of an AutoApprovedPrivateLinkService. + + :param private_link_service: The id of the private link service resource. + :type private_link_service: str + """ + + _attribute_map = { + 'private_link_service': {'key': 'privateLinkService', 'type': 'str'}, + } + + def __init__( + self, + *, + private_link_service: Optional[str] = None, + **kwargs + ): + super(AutoApprovedPrivateLinkService, self).__init__(**kwargs) + self.private_link_service = private_link_service + + +class AutoApprovedPrivateLinkServicesResult(msrest.serialization.Model): + """An array of private link service id that can be linked to a private end point with auto approved. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: An array of auto approved private link service. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AutoApprovedPrivateLinkService] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AutoApprovedPrivateLinkService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AutoApprovedPrivateLinkService"]] = None, + **kwargs + ): + super(AutoApprovedPrivateLinkServicesResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class Availability(msrest.serialization.Model): + """Availability of the metric. + + :param time_grain: The time grain of the availability. + :type time_grain: str + :param retention: The retention of the availability. + :type retention: str + :param blob_duration: Duration of the availability blob. + :type blob_duration: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'retention': {'key': 'retention', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + time_grain: Optional[str] = None, + retention: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + super(Availability, self).__init__(**kwargs) + self.time_grain = time_grain + self.retention = retention + self.blob_duration = blob_duration + + +class AvailableDelegation(msrest.serialization.Model): + """The serviceName of an AvailableDelegation indicates a possible delegation for a subnet. + + :param name: The name of the AvailableDelegation resource. + :type name: str + :param id: A unique identifier of the AvailableDelegation resource. + :type id: str + :param type: Resource type. + :type type: str + :param service_name: The name of the service and resource. + :type service_name: str + :param actions: The actions permitted to the service upon delegation. + :type actions: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'actions': {'key': 'actions', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None, + service_name: Optional[str] = None, + actions: Optional[List[str]] = None, + **kwargs + ): + super(AvailableDelegation, self).__init__(**kwargs) + self.name = name + self.id = id + self.type = type + self.service_name = service_name + self.actions = actions + + +class AvailableDelegationsResult(msrest.serialization.Model): + """An array of available delegations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: An array of available delegations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AvailableDelegation] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableDelegation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AvailableDelegation"]] = None, + **kwargs + ): + super(AvailableDelegationsResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AvailablePrivateEndpointType(msrest.serialization.Model): + """The information of an AvailablePrivateEndpointType. + + :param name: The name of the service and resource. + :type name: str + :param id: A unique identifier of the AvailablePrivateEndpoint Type resource. + :type id: str + :param type: Resource type. + :type type: str + :param resource_name: The name of the service and resource. + :type resource_name: str + :param display_name: Display name of the resource. + :type display_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None, + resource_name: Optional[str] = None, + display_name: Optional[str] = None, + **kwargs + ): + super(AvailablePrivateEndpointType, self).__init__(**kwargs) + self.name = name + self.id = id + self.type = type + self.resource_name = resource_name + self.display_name = display_name + + +class AvailablePrivateEndpointTypesResult(msrest.serialization.Model): + """An array of available PrivateEndpoint types. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: An array of available privateEndpoint type. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AvailablePrivateEndpointType] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailablePrivateEndpointType]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AvailablePrivateEndpointType"]] = None, + **kwargs + ): + super(AvailablePrivateEndpointTypesResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AvailableProvidersList(msrest.serialization.Model): + """List of available countries with details. + + All required parameters must be populated in order to send to Azure. + + :param countries: Required. List of available countries. + :type countries: list[~azure.mgmt.network.v2021_05_01.models.AvailableProvidersListCountry] + """ + + _validation = { + 'countries': {'required': True}, + } + + _attribute_map = { + 'countries': {'key': 'countries', 'type': '[AvailableProvidersListCountry]'}, + } + + def __init__( + self, + *, + countries: List["AvailableProvidersListCountry"], + **kwargs + ): + super(AvailableProvidersList, self).__init__(**kwargs) + self.countries = countries + + +class AvailableProvidersListCity(msrest.serialization.Model): + """City or town details. + + :param city_name: The city or town name. + :type city_name: str + :param providers: A list of Internet service providers. + :type providers: list[str] + """ + + _attribute_map = { + 'city_name': {'key': 'cityName', 'type': 'str'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + } + + def __init__( + self, + *, + city_name: Optional[str] = None, + providers: Optional[List[str]] = None, + **kwargs + ): + super(AvailableProvidersListCity, self).__init__(**kwargs) + self.city_name = city_name + self.providers = providers + + +class AvailableProvidersListCountry(msrest.serialization.Model): + """Country details. + + :param country_name: The country name. + :type country_name: str + :param providers: A list of Internet service providers. + :type providers: list[str] + :param states: List of available states in the country. + :type states: list[~azure.mgmt.network.v2021_05_01.models.AvailableProvidersListState] + """ + + _attribute_map = { + 'country_name': {'key': 'countryName', 'type': 'str'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + 'states': {'key': 'states', 'type': '[AvailableProvidersListState]'}, + } + + def __init__( + self, + *, + country_name: Optional[str] = None, + providers: Optional[List[str]] = None, + states: Optional[List["AvailableProvidersListState"]] = None, + **kwargs + ): + super(AvailableProvidersListCountry, self).__init__(**kwargs) + self.country_name = country_name + self.providers = providers + self.states = states + + +class AvailableProvidersListParameters(msrest.serialization.Model): + """Constraints that determine the list of available Internet service providers. + + :param azure_locations: A list of Azure regions. + :type azure_locations: list[str] + :param country: The country for available providers list. + :type country: str + :param state: The state for available providers list. + :type state: str + :param city: The city or town for available providers list. + :type city: str + """ + + _attribute_map = { + 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, + 'country': {'key': 'country', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + } + + def __init__( + self, + *, + azure_locations: Optional[List[str]] = None, + country: Optional[str] = None, + state: Optional[str] = None, + city: Optional[str] = None, + **kwargs + ): + super(AvailableProvidersListParameters, self).__init__(**kwargs) + self.azure_locations = azure_locations + self.country = country + self.state = state + self.city = city + + +class AvailableProvidersListState(msrest.serialization.Model): + """State details. + + :param state_name: The state name. + :type state_name: str + :param providers: A list of Internet service providers. + :type providers: list[str] + :param cities: List of available cities or towns in the state. + :type cities: list[~azure.mgmt.network.v2021_05_01.models.AvailableProvidersListCity] + """ + + _attribute_map = { + 'state_name': {'key': 'stateName', 'type': 'str'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + 'cities': {'key': 'cities', 'type': '[AvailableProvidersListCity]'}, + } + + def __init__( + self, + *, + state_name: Optional[str] = None, + providers: Optional[List[str]] = None, + cities: Optional[List["AvailableProvidersListCity"]] = None, + **kwargs + ): + super(AvailableProvidersListState, self).__init__(**kwargs) + self.state_name = state_name + self.providers = providers + self.cities = cities + + +class AvailableServiceAlias(msrest.serialization.Model): + """The available service alias. + + :param name: The name of the service alias. + :type name: str + :param id: The ID of the service alias. + :type id: str + :param type: The type of the resource. + :type type: str + :param resource_name: The resource name of the service alias. + :type resource_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_name': {'key': 'resourceName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None, + resource_name: Optional[str] = None, + **kwargs + ): + super(AvailableServiceAlias, self).__init__(**kwargs) + self.name = name + self.id = id + self.type = type + self.resource_name = resource_name + + +class AvailableServiceAliasesResult(msrest.serialization.Model): + """An array of available service aliases. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: An array of available service aliases. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AvailableServiceAlias] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AvailableServiceAlias]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AvailableServiceAlias"]] = None, + **kwargs + ): + super(AvailableServiceAliasesResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class AzureAsyncOperationResult(msrest.serialization.Model): + """The response body contains the status of the specified asynchronous operation, indicating whether it has succeeded, is in progress, or has failed. Note that this status is distinct from the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous operation succeeded, the response body includes the HTTP status code for the successful request. If the asynchronous operation failed, the response body includes the HTTP status code for the failed request and error information regarding the failure. + + :param status: Status of the Azure async operation. Possible values include: "InProgress", + "Succeeded", "Failed". + :type status: str or ~azure.mgmt.network.v2021_05_01.models.NetworkOperationStatus + :param error: Details of the error occurred during specified asynchronous operation. + :type error: ~azure.mgmt.network.v2021_05_01.models.Error + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'Error'}, + } + + def __init__( + self, + *, + status: Optional[Union[str, "NetworkOperationStatus"]] = None, + error: Optional["Error"] = None, + **kwargs + ): + super(AzureAsyncOperationResult, self).__init__(**kwargs) + self.status = status + self.error = error + + +class AzureFirewall(Resource): + """Azure Firewall resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param zones: A list of availability zones denoting where the resource needs to come from. + :type zones: list[str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param application_rule_collections: Collection of application rule collections used by Azure + Firewall. + :type application_rule_collections: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallApplicationRuleCollection] + :param nat_rule_collections: Collection of NAT rule collections used by Azure Firewall. + :type nat_rule_collections: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallNatRuleCollection] + :param network_rule_collections: Collection of network rule collections used by Azure Firewall. + :type network_rule_collections: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallNetworkRuleCollection] + :param ip_configurations: IP configuration of the Azure Firewall resource. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallIPConfiguration] + :param management_ip_configuration: IP configuration of the Azure Firewall used for management + traffic. + :type management_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallIPConfiguration + :ivar provisioning_state: The provisioning state of the Azure firewall resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param threat_intel_mode: The operation mode for Threat Intelligence. Possible values include: + "Alert", "Deny", "Off". + :type threat_intel_mode: str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallThreatIntelMode + :param virtual_hub: The virtualHub to which the firewall belongs. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param firewall_policy: The firewallPolicy associated with this azure firewall. + :type firewall_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param hub_ip_addresses: IP addresses associated with AzureFirewall. + :type hub_ip_addresses: ~azure.mgmt.network.v2021_05_01.models.HubIPAddresses + :ivar ip_groups: IpGroups associated with AzureFirewall. + :vartype ip_groups: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallIpGroups] + :param sku: The Azure Firewall Resource SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.AzureFirewallSku + :param additional_properties: The additional properties used to further config this azure + firewall. + :type additional_properties: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'ip_groups': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'application_rule_collections': {'key': 'properties.applicationRuleCollections', 'type': '[AzureFirewallApplicationRuleCollection]'}, + 'nat_rule_collections': {'key': 'properties.natRuleCollections', 'type': '[AzureFirewallNatRuleCollection]'}, + 'network_rule_collections': {'key': 'properties.networkRuleCollections', 'type': '[AzureFirewallNetworkRuleCollection]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[AzureFirewallIPConfiguration]'}, + 'management_ip_configuration': {'key': 'properties.managementIpConfiguration', 'type': 'AzureFirewallIPConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'threat_intel_mode': {'key': 'properties.threatIntelMode', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'firewall_policy': {'key': 'properties.firewallPolicy', 'type': 'SubResource'}, + 'hub_ip_addresses': {'key': 'properties.hubIPAddresses', 'type': 'HubIPAddresses'}, + 'ip_groups': {'key': 'properties.ipGroups', 'type': '[AzureFirewallIpGroups]'}, + 'sku': {'key': 'properties.sku', 'type': 'AzureFirewallSku'}, + 'additional_properties': {'key': 'properties.additionalProperties', 'type': '{str}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + zones: Optional[List[str]] = None, + application_rule_collections: Optional[List["AzureFirewallApplicationRuleCollection"]] = None, + nat_rule_collections: Optional[List["AzureFirewallNatRuleCollection"]] = None, + network_rule_collections: Optional[List["AzureFirewallNetworkRuleCollection"]] = None, + ip_configurations: Optional[List["AzureFirewallIPConfiguration"]] = None, + management_ip_configuration: Optional["AzureFirewallIPConfiguration"] = None, + threat_intel_mode: Optional[Union[str, "AzureFirewallThreatIntelMode"]] = None, + virtual_hub: Optional["SubResource"] = None, + firewall_policy: Optional["SubResource"] = None, + hub_ip_addresses: Optional["HubIPAddresses"] = None, + sku: Optional["AzureFirewallSku"] = None, + additional_properties: Optional[Dict[str, str]] = None, + **kwargs + ): + super(AzureFirewall, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.zones = zones + self.etag = None + self.application_rule_collections = application_rule_collections + self.nat_rule_collections = nat_rule_collections + self.network_rule_collections = network_rule_collections + self.ip_configurations = ip_configurations + self.management_ip_configuration = management_ip_configuration + self.provisioning_state = None + self.threat_intel_mode = threat_intel_mode + self.virtual_hub = virtual_hub + self.firewall_policy = firewall_policy + self.hub_ip_addresses = hub_ip_addresses + self.ip_groups = None + self.sku = sku + self.additional_properties = additional_properties + + +class AzureFirewallApplicationRule(msrest.serialization.Model): + """Properties of an application rule. + + :param name: Name of the application rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param protocols: Array of ApplicationRuleProtocols. + :type protocols: + list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallApplicationRuleProtocol] + :param target_fqdns: List of FQDNs for this rule. + :type target_fqdns: list[str] + :param fqdn_tags: List of FQDN Tags for this rule. + :type fqdn_tags: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[AzureFirewallApplicationRuleProtocol]'}, + 'target_fqdns': {'key': 'targetFqdns', 'type': '[str]'}, + 'fqdn_tags': {'key': 'fqdnTags', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + source_addresses: Optional[List[str]] = None, + protocols: Optional[List["AzureFirewallApplicationRuleProtocol"]] = None, + target_fqdns: Optional[List[str]] = None, + fqdn_tags: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + **kwargs + ): + super(AzureFirewallApplicationRule, self).__init__(**kwargs) + self.name = name + self.description = description + self.source_addresses = source_addresses + self.protocols = protocols + self.target_fqdns = target_fqdns + self.fqdn_tags = fqdn_tags + self.source_ip_groups = source_ip_groups + + +class AzureFirewallApplicationRuleCollection(SubResource): + """Application rule collection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the Azure firewall. This name can + be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param priority: Priority of the application rule collection resource. + :type priority: int + :param action: The action type of a rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.AzureFirewallRCAction + :param rules: Collection of rules used by a application rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallApplicationRule] + :ivar provisioning_state: The provisioning state of the application rule collection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallApplicationRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["AzureFirewallRCAction"] = None, + rules: Optional[List["AzureFirewallApplicationRule"]] = None, + **kwargs + ): + super(AzureFirewallApplicationRuleCollection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.priority = priority + self.action = action + self.rules = rules + self.provisioning_state = None + + +class AzureFirewallApplicationRuleProtocol(msrest.serialization.Model): + """Properties of the application rule protocol. + + :param protocol_type: Protocol type. Possible values include: "Http", "Https", "Mssql". + :type protocol_type: str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallApplicationRuleProtocolType + :param port: Port number for the protocol, cannot be greater than 64000. This field is + optional. + :type port: int + """ + + _validation = { + 'port': {'maximum': 64000, 'minimum': 0}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + protocol_type: Optional[Union[str, "AzureFirewallApplicationRuleProtocolType"]] = None, + port: Optional[int] = None, + **kwargs + ): + super(AzureFirewallApplicationRuleProtocol, self).__init__(**kwargs) + self.protocol_type = protocol_type + self.port = port + + +class AzureFirewallFqdnTag(Resource): + """Azure Firewall FQDN Tag Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the Azure firewall FQDN tag resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar fqdn_tag_name: The name of this FQDN Tag. + :vartype fqdn_tag_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'fqdn_tag_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'fqdn_tag_name': {'key': 'properties.fqdnTagName', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(AzureFirewallFqdnTag, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.provisioning_state = None + self.fqdn_tag_name = None + + +class AzureFirewallFqdnTagListResult(msrest.serialization.Model): + """Response for ListAzureFirewallFqdnTags API service call. + + :param value: List of Azure Firewall FQDN Tags in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallFqdnTag] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AzureFirewallFqdnTag]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AzureFirewallFqdnTag"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AzureFirewallFqdnTagListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AzureFirewallIPConfiguration(SubResource): + """IP configuration of an Azure Firewall. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar private_ip_address: The Firewall Internal Load Balancer IP to be used as the next hop in + User Defined Routes. + :vartype private_ip_address: str + :param subnet: Reference to the subnet resource. This resource must be named + 'AzureFirewallSubnet' or 'AzureFirewallManagementSubnet'. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param public_ip_address: Reference to the PublicIP resource. This field is a mandatory input + if subnet is not null. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the Azure firewall IP configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + subnet: Optional["SubResource"] = None, + public_ip_address: Optional["SubResource"] = None, + **kwargs + ): + super(AzureFirewallIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = None + self.subnet = subnet + self.public_ip_address = public_ip_address + self.provisioning_state = None + + +class AzureFirewallIpGroups(msrest.serialization.Model): + """IpGroups associated with azure firewall. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar change_number: The iteration number. + :vartype change_number: str + """ + + _validation = { + 'id': {'readonly': True}, + 'change_number': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'change_number': {'key': 'changeNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AzureFirewallIpGroups, self).__init__(**kwargs) + self.id = None + self.change_number = None + + +class AzureFirewallListResult(msrest.serialization.Model): + """Response for ListAzureFirewalls API service call. + + :param value: List of Azure Firewalls in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewall] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AzureFirewall]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AzureFirewall"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AzureFirewallListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class AzureFirewallNatRCAction(msrest.serialization.Model): + """AzureFirewall NAT Rule Collection Action. + + :param type: The type of action. Possible values include: "Snat", "Dnat". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.AzureFirewallNatRCActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "AzureFirewallNatRCActionType"]] = None, + **kwargs + ): + super(AzureFirewallNatRCAction, self).__init__(**kwargs) + self.type = type + + +class AzureFirewallNatRule(msrest.serialization.Model): + """Properties of a NAT rule. + + :param name: Name of the NAT rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses for this rule. Supports IP + ranges, prefixes, and service tags. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param protocols: Array of AzureFirewallNetworkRuleProtocols applicable to this NAT rule. + :type protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallNetworkRuleProtocol] + :param translated_address: The translated address for this NAT rule. + :type translated_address: str + :param translated_port: The translated port for this NAT rule. + :type translated_port: str + :param translated_fqdn: The translated FQDN for this NAT rule. + :type translated_fqdn: str + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'protocols': {'key': 'protocols', 'type': '[str]'}, + 'translated_address': {'key': 'translatedAddress', 'type': 'str'}, + 'translated_port': {'key': 'translatedPort', 'type': 'str'}, + 'translated_fqdn': {'key': 'translatedFqdn', 'type': 'str'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + protocols: Optional[List[Union[str, "AzureFirewallNetworkRuleProtocol"]]] = None, + translated_address: Optional[str] = None, + translated_port: Optional[str] = None, + translated_fqdn: Optional[str] = None, + source_ip_groups: Optional[List[str]] = None, + **kwargs + ): + super(AzureFirewallNatRule, self).__init__(**kwargs) + self.name = name + self.description = description + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.protocols = protocols + self.translated_address = translated_address + self.translated_port = translated_port + self.translated_fqdn = translated_fqdn + self.source_ip_groups = source_ip_groups + + +class AzureFirewallNatRuleCollection(SubResource): + """NAT rule collection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the Azure firewall. This name can + be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param priority: Priority of the NAT rule collection resource. + :type priority: int + :param action: The action type of a NAT rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.AzureFirewallNatRCAction + :param rules: Collection of rules used by a NAT rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallNatRule] + :ivar provisioning_state: The provisioning state of the NAT rule collection resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallNatRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallNatRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["AzureFirewallNatRCAction"] = None, + rules: Optional[List["AzureFirewallNatRule"]] = None, + **kwargs + ): + super(AzureFirewallNatRuleCollection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.priority = priority + self.action = action + self.rules = rules + self.provisioning_state = None + + +class AzureFirewallNetworkRule(msrest.serialization.Model): + """Properties of the network rule. + + :param name: Name of the network rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param protocols: Array of AzureFirewallNetworkRuleProtocols. + :type protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallNetworkRuleProtocol] + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param destination_fqdns: List of destination FQDNs. + :type destination_fqdns: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param destination_ip_groups: List of destination IpGroups for this rule. + :type destination_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'protocols': {'key': 'protocols', 'type': '[str]'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'destination_fqdns': {'key': 'destinationFqdns', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'destination_ip_groups': {'key': 'destinationIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + protocols: Optional[List[Union[str, "AzureFirewallNetworkRuleProtocol"]]] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + destination_fqdns: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + destination_ip_groups: Optional[List[str]] = None, + **kwargs + ): + super(AzureFirewallNetworkRule, self).__init__(**kwargs) + self.name = name + self.description = description + self.protocols = protocols + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.destination_fqdns = destination_fqdns + self.source_ip_groups = source_ip_groups + self.destination_ip_groups = destination_ip_groups + + +class AzureFirewallNetworkRuleCollection(SubResource): + """Network rule collection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the Azure firewall. This name can + be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param priority: Priority of the network rule collection resource. + :type priority: int + :param action: The action type of a rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.AzureFirewallRCAction + :param rules: Collection of rules used by a network rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallNetworkRule] + :ivar provisioning_state: The provisioning state of the network rule collection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'action': {'key': 'properties.action', 'type': 'AzureFirewallRCAction'}, + 'rules': {'key': 'properties.rules', 'type': '[AzureFirewallNetworkRule]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["AzureFirewallRCAction"] = None, + rules: Optional[List["AzureFirewallNetworkRule"]] = None, + **kwargs + ): + super(AzureFirewallNetworkRuleCollection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.priority = priority + self.action = action + self.rules = rules + self.provisioning_state = None + + +class AzureFirewallPublicIPAddress(msrest.serialization.Model): + """Public IP Address associated with azure firewall. + + :param address: Public IP Address value. + :type address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__( + self, + *, + address: Optional[str] = None, + **kwargs + ): + super(AzureFirewallPublicIPAddress, self).__init__(**kwargs) + self.address = address + + +class AzureFirewallRCAction(msrest.serialization.Model): + """Properties of the AzureFirewallRCAction. + + :param type: The type of action. Possible values include: "Allow", "Deny". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.AzureFirewallRCActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "AzureFirewallRCActionType"]] = None, + **kwargs + ): + super(AzureFirewallRCAction, self).__init__(**kwargs) + self.type = type + + +class AzureFirewallSku(msrest.serialization.Model): + """SKU of an Azure Firewall. + + :param name: Name of an Azure Firewall SKU. Possible values include: "AZFW_VNet", "AZFW_Hub". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.AzureFirewallSkuName + :param tier: Tier of an Azure Firewall. Possible values include: "Standard", "Premium", + "Basic". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.AzureFirewallSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "AzureFirewallSkuName"]] = None, + tier: Optional[Union[str, "AzureFirewallSkuTier"]] = None, + **kwargs + ): + super(AzureFirewallSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class AzureReachabilityReport(msrest.serialization.Model): + """Azure reachability report details. + + All required parameters must be populated in order to send to Azure. + + :param aggregation_level: Required. The aggregation level of Azure reachability report. Can be + Country, State or City. + :type aggregation_level: str + :param provider_location: Required. Parameters that define a geographic location. + :type provider_location: ~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportLocation + :param reachability_report: Required. List of Azure reachability report items. + :type reachability_report: + list[~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportItem] + """ + + _validation = { + 'aggregation_level': {'required': True}, + 'provider_location': {'required': True}, + 'reachability_report': {'required': True}, + } + + _attribute_map = { + 'aggregation_level': {'key': 'aggregationLevel', 'type': 'str'}, + 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, + 'reachability_report': {'key': 'reachabilityReport', 'type': '[AzureReachabilityReportItem]'}, + } + + def __init__( + self, + *, + aggregation_level: str, + provider_location: "AzureReachabilityReportLocation", + reachability_report: List["AzureReachabilityReportItem"], + **kwargs + ): + super(AzureReachabilityReport, self).__init__(**kwargs) + self.aggregation_level = aggregation_level + self.provider_location = provider_location + self.reachability_report = reachability_report + + +class AzureReachabilityReportItem(msrest.serialization.Model): + """Azure reachability report details for a given provider location. + + :param provider: The Internet service provider. + :type provider: str + :param azure_location: The Azure region. + :type azure_location: str + :param latencies: List of latency details for each of the time series. + :type latencies: + list[~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportLatencyInfo] + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'azure_location': {'key': 'azureLocation', 'type': 'str'}, + 'latencies': {'key': 'latencies', 'type': '[AzureReachabilityReportLatencyInfo]'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + azure_location: Optional[str] = None, + latencies: Optional[List["AzureReachabilityReportLatencyInfo"]] = None, + **kwargs + ): + super(AzureReachabilityReportItem, self).__init__(**kwargs) + self.provider = provider + self.azure_location = azure_location + self.latencies = latencies + + +class AzureReachabilityReportLatencyInfo(msrest.serialization.Model): + """Details on latency for a time series. + + :param time_stamp: The time stamp. + :type time_stamp: ~datetime.datetime + :param score: The relative latency score between 1 and 100, higher values indicating a faster + connection. + :type score: int + """ + + _validation = { + 'score': {'maximum': 100, 'minimum': 1}, + } + + _attribute_map = { + 'time_stamp': {'key': 'timeStamp', 'type': 'iso-8601'}, + 'score': {'key': 'score', 'type': 'int'}, + } + + def __init__( + self, + *, + time_stamp: Optional[datetime.datetime] = None, + score: Optional[int] = None, + **kwargs + ): + super(AzureReachabilityReportLatencyInfo, self).__init__(**kwargs) + self.time_stamp = time_stamp + self.score = score + + +class AzureReachabilityReportLocation(msrest.serialization.Model): + """Parameters that define a geographic location. + + All required parameters must be populated in order to send to Azure. + + :param country: Required. The name of the country. + :type country: str + :param state: The name of the state. + :type state: str + :param city: The name of the city or town. + :type city: str + """ + + _validation = { + 'country': {'required': True}, + } + + _attribute_map = { + 'country': {'key': 'country', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'city': {'key': 'city', 'type': 'str'}, + } + + def __init__( + self, + *, + country: str, + state: Optional[str] = None, + city: Optional[str] = None, + **kwargs + ): + super(AzureReachabilityReportLocation, self).__init__(**kwargs) + self.country = country + self.state = state + self.city = city + + +class AzureReachabilityReportParameters(msrest.serialization.Model): + """Geographic and time constraints for Azure reachability report. + + All required parameters must be populated in order to send to Azure. + + :param provider_location: Required. Parameters that define a geographic location. + :type provider_location: ~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportLocation + :param providers: List of Internet service providers. + :type providers: list[str] + :param azure_locations: Optional Azure regions to scope the query to. + :type azure_locations: list[str] + :param start_time: Required. The start time for the Azure reachability report. + :type start_time: ~datetime.datetime + :param end_time: Required. The end time for the Azure reachability report. + :type end_time: ~datetime.datetime + """ + + _validation = { + 'provider_location': {'required': True}, + 'start_time': {'required': True}, + 'end_time': {'required': True}, + } + + _attribute_map = { + 'provider_location': {'key': 'providerLocation', 'type': 'AzureReachabilityReportLocation'}, + 'providers': {'key': 'providers', 'type': '[str]'}, + 'azure_locations': {'key': 'azureLocations', 'type': '[str]'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + provider_location: "AzureReachabilityReportLocation", + start_time: datetime.datetime, + end_time: datetime.datetime, + providers: Optional[List[str]] = None, + azure_locations: Optional[List[str]] = None, + **kwargs + ): + super(AzureReachabilityReportParameters, self).__init__(**kwargs) + self.provider_location = provider_location + self.providers = providers + self.azure_locations = azure_locations + self.start_time = start_time + self.end_time = end_time + + +class AzureWebCategory(msrest.serialization.Model): + """Azure Web Category Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar group: The name of the group that the category belongs to. + :vartype group: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'group': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'group': {'key': 'properties.group', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(AzureWebCategory, self).__init__(**kwargs) + self.id = id + self.name = None + self.type = None + self.etag = None + self.group = None + + +class AzureWebCategoryListResult(msrest.serialization.Model): + """Response for ListAzureWebCategories API service call. + + :param value: List of Azure Web Categories for a given Subscription. + :type value: list[~azure.mgmt.network.v2021_05_01.models.AzureWebCategory] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[AzureWebCategory]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["AzureWebCategory"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(AzureWebCategoryListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BackendAddressInboundNatRulePortMappings(msrest.serialization.Model): + """The response for a QueryInboundNatRulePortMapping API. + + :param inbound_nat_rule_port_mappings: Collection of inbound NAT rule port mappings. + :type inbound_nat_rule_port_mappings: + list[~azure.mgmt.network.v2021_05_01.models.InboundNatRulePortMapping] + """ + + _attribute_map = { + 'inbound_nat_rule_port_mappings': {'key': 'inboundNatRulePortMappings', 'type': '[InboundNatRulePortMapping]'}, + } + + def __init__( + self, + *, + inbound_nat_rule_port_mappings: Optional[List["InboundNatRulePortMapping"]] = None, + **kwargs + ): + super(BackendAddressInboundNatRulePortMappings, self).__init__(**kwargs) + self.inbound_nat_rule_port_mappings = inbound_nat_rule_port_mappings + + +class BackendAddressPool(SubResource): + """Pool of backend IP addresses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of backend address pools + used by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param location: The location of the backend address pool. + :type location: str + :param tunnel_interfaces: An array of gateway load balancer tunnel interfaces. + :type tunnel_interfaces: + list[~azure.mgmt.network.v2021_05_01.models.GatewayLoadBalancerTunnelInterface] + :param load_balancer_backend_addresses: An array of backend addresses. + :type load_balancer_backend_addresses: + list[~azure.mgmt.network.v2021_05_01.models.LoadBalancerBackendAddress] + :ivar backend_ip_configurations: An array of references to IP addresses defined in network + interfaces. + :vartype backend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration] + :ivar load_balancing_rules: An array of references to load balancing rules that use this + backend address pool. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar outbound_rule: A reference to an outbound rule that uses this backend address pool. + :vartype outbound_rule: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar outbound_rules: An array of references to outbound rules that use this backend address + pool. + :vartype outbound_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar inbound_nat_rules: An array of references to inbound NAT rules that use this backend + address pool. + :vartype inbound_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the backend address pool resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'backend_ip_configurations': {'readonly': True}, + 'load_balancing_rules': {'readonly': True}, + 'outbound_rule': {'readonly': True}, + 'outbound_rules': {'readonly': True}, + 'inbound_nat_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'properties.location', 'type': 'str'}, + 'tunnel_interfaces': {'key': 'properties.tunnelInterfaces', 'type': '[GatewayLoadBalancerTunnelInterface]'}, + 'load_balancer_backend_addresses': {'key': 'properties.loadBalancerBackendAddresses', 'type': '[LoadBalancerBackendAddress]'}, + 'backend_ip_configurations': {'key': 'properties.backendIPConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, + 'outbound_rule': {'key': 'properties.outboundRule', 'type': 'SubResource'}, + 'outbound_rules': {'key': 'properties.outboundRules', 'type': '[SubResource]'}, + 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + location: Optional[str] = None, + tunnel_interfaces: Optional[List["GatewayLoadBalancerTunnelInterface"]] = None, + load_balancer_backend_addresses: Optional[List["LoadBalancerBackendAddress"]] = None, + **kwargs + ): + super(BackendAddressPool, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.location = location + self.tunnel_interfaces = tunnel_interfaces + self.load_balancer_backend_addresses = load_balancer_backend_addresses + self.backend_ip_configurations = None + self.load_balancing_rules = None + self.outbound_rule = None + self.outbound_rules = None + self.inbound_nat_rules = None + self.provisioning_state = None + + +class BastionActiveSession(msrest.serialization.Model): + """The session detail for a target. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar session_id: A unique id for the session. + :vartype session_id: str + :ivar start_time: The time when the session started. + :vartype start_time: any + :ivar target_subscription_id: The subscription id for the target virtual machine. + :vartype target_subscription_id: str + :ivar resource_type: The type of the resource. + :vartype resource_type: str + :ivar target_host_name: The host name of the target. + :vartype target_host_name: str + :ivar target_resource_group: The resource group of the target. + :vartype target_resource_group: str + :ivar user_name: The user name who is active on this session. + :vartype user_name: str + :ivar target_ip_address: The IP Address of the target. + :vartype target_ip_address: str + :ivar protocol: The protocol used to connect to the target. Possible values include: "SSH", + "RDP". + :vartype protocol: str or ~azure.mgmt.network.v2021_05_01.models.BastionConnectProtocol + :ivar target_resource_id: The resource id of the target. + :vartype target_resource_id: str + :ivar session_duration_in_mins: Duration in mins the session has been active. + :vartype session_duration_in_mins: float + """ + + _validation = { + 'session_id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'target_subscription_id': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'target_host_name': {'readonly': True}, + 'target_resource_group': {'readonly': True}, + 'user_name': {'readonly': True}, + 'target_ip_address': {'readonly': True}, + 'protocol': {'readonly': True}, + 'target_resource_id': {'readonly': True}, + 'session_duration_in_mins': {'readonly': True}, + } + + _attribute_map = { + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'object'}, + 'target_subscription_id': {'key': 'targetSubscriptionId', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'target_host_name': {'key': 'targetHostName', 'type': 'str'}, + 'target_resource_group': {'key': 'targetResourceGroup', 'type': 'str'}, + 'user_name': {'key': 'userName', 'type': 'str'}, + 'target_ip_address': {'key': 'targetIpAddress', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'session_duration_in_mins': {'key': 'sessionDurationInMins', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionActiveSession, self).__init__(**kwargs) + self.session_id = None + self.start_time = None + self.target_subscription_id = None + self.resource_type = None + self.target_host_name = None + self.target_resource_group = None + self.user_name = None + self.target_ip_address = None + self.protocol = None + self.target_resource_id = None + self.session_duration_in_mins = None + + +class BastionActiveSessionListResult(msrest.serialization.Model): + """Response for GetActiveSessions. + + :param value: List of active sessions on the bastion. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BastionActiveSession] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionActiveSession]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BastionActiveSession"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(BastionActiveSessionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BastionHost(Resource): + """Bastion Host resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param sku: The sku of this Bastion Host. + :type sku: ~azure.mgmt.network.v2021_05_01.models.Sku + :param ip_configurations: IP configuration of the Bastion Host resource. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.BastionHostIPConfiguration] + :param dns_name: FQDN for the endpoint on which bastion host is accessible. + :type dns_name: str + :ivar provisioning_state: The provisioning state of the bastion host resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param scale_units: The scale units for the Bastion Host resource. + :type scale_units: int + :param disable_copy_paste: Enable/Disable Copy/Paste feature of the Bastion Host resource. + :type disable_copy_paste: bool + :param enable_file_copy: Enable/Disable File Copy feature of the Bastion Host resource. + :type enable_file_copy: bool + :param enable_ip_connect: Enable/Disable IP Connect feature of the Bastion Host resource. + :type enable_ip_connect: bool + :param enable_shareable_link: Enable/Disable Shareable Link of the Bastion Host resource. + :type enable_shareable_link: bool + :param enable_tunneling: Enable/Disable Tunneling feature of the Bastion Host resource. + :type enable_tunneling: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'scale_units': {'maximum': 50, 'minimum': 2}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[BastionHostIPConfiguration]'}, + 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'scale_units': {'key': 'properties.scaleUnits', 'type': 'int'}, + 'disable_copy_paste': {'key': 'properties.disableCopyPaste', 'type': 'bool'}, + 'enable_file_copy': {'key': 'properties.enableFileCopy', 'type': 'bool'}, + 'enable_ip_connect': {'key': 'properties.enableIpConnect', 'type': 'bool'}, + 'enable_shareable_link': {'key': 'properties.enableShareableLink', 'type': 'bool'}, + 'enable_tunneling': {'key': 'properties.enableTunneling', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["Sku"] = None, + ip_configurations: Optional[List["BastionHostIPConfiguration"]] = None, + dns_name: Optional[str] = None, + scale_units: Optional[int] = None, + disable_copy_paste: Optional[bool] = False, + enable_file_copy: Optional[bool] = False, + enable_ip_connect: Optional[bool] = False, + enable_shareable_link: Optional[bool] = False, + enable_tunneling: Optional[bool] = False, + **kwargs + ): + super(BastionHost, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.sku = sku + self.ip_configurations = ip_configurations + self.dns_name = dns_name + self.provisioning_state = None + self.scale_units = scale_units + self.disable_copy_paste = disable_copy_paste + self.enable_file_copy = enable_file_copy + self.enable_ip_connect = enable_ip_connect + self.enable_shareable_link = enable_shareable_link + self.enable_tunneling = enable_tunneling + + +class BastionHostIPConfiguration(SubResource): + """IP configuration of an Bastion Host. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Ip configuration type. + :vartype type: str + :param subnet: Reference of the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param public_ip_address: Reference of the PublicIP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the bastion host IP configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_ip_allocation_method: Private IP allocation method. Possible values include: + "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + subnet: Optional["SubResource"] = None, + public_ip_address: Optional["SubResource"] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + **kwargs + ): + super(BastionHostIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.subnet = subnet + self.public_ip_address = public_ip_address + self.provisioning_state = None + self.private_ip_allocation_method = private_ip_allocation_method + + +class BastionHostListResult(msrest.serialization.Model): + """Response for ListBastionHosts API service call. + + :param value: List of Bastion Hosts in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BastionHost] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionHost]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BastionHost"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(BastionHostListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BastionSessionDeleteResult(msrest.serialization.Model): + """Response for DisconnectActiveSessions. + + :param value: List of sessions with their corresponding state. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BastionSessionState] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionSessionState]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BastionSessionState"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(BastionSessionDeleteResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BastionSessionState(msrest.serialization.Model): + """The session state detail for a target. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar session_id: A unique id for the session. + :vartype session_id: str + :ivar message: Used for extra information. + :vartype message: str + :ivar state: The state of the session. Disconnected/Failed/NotFound. + :vartype state: str + """ + + _validation = { + 'session_id': {'readonly': True}, + 'message': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'session_id': {'key': 'sessionId', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(BastionSessionState, self).__init__(**kwargs) + self.session_id = None + self.message = None + self.state = None + + +class BastionShareableLink(msrest.serialization.Model): + """Bastion Shareable Link. + + 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 vm: Required. Reference of the virtual machine resource. + :type vm: ~azure.mgmt.network.v2021_05_01.models.VM + :ivar bsl: The unique Bastion Shareable Link to the virtual machine. + :vartype bsl: str + :ivar created_at: The time when the link was created. + :vartype created_at: str + :ivar message: Optional field indicating the warning or error message related to the vm in case + of partial failure. + :vartype message: str + """ + + _validation = { + 'vm': {'required': True}, + 'bsl': {'readonly': True}, + 'created_at': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'vm': {'key': 'vm', 'type': 'VM'}, + 'bsl': {'key': 'bsl', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + vm: "VM", + **kwargs + ): + super(BastionShareableLink, self).__init__(**kwargs) + self.vm = vm + self.bsl = None + self.created_at = None + self.message = None + + +class BastionShareableLinkListRequest(msrest.serialization.Model): + """Post request for all the Bastion Shareable Link endpoints. + + :param vms: List of VM references. + :type vms: list[~azure.mgmt.network.v2021_05_01.models.BastionShareableLink] + """ + + _attribute_map = { + 'vms': {'key': 'vms', 'type': '[BastionShareableLink]'}, + } + + def __init__( + self, + *, + vms: Optional[List["BastionShareableLink"]] = None, + **kwargs + ): + super(BastionShareableLinkListRequest, self).__init__(**kwargs) + self.vms = vms + + +class BastionShareableLinkListResult(msrest.serialization.Model): + """Response for all the Bastion Shareable Link endpoints. + + :param value: List of Bastion Shareable Links for the request. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BastionShareableLink] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BastionShareableLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BastionShareableLink"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(BastionShareableLinkListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BGPCommunity(msrest.serialization.Model): + """Contains bgp community information offered in Service Community resources. + + :param service_supported_region: The region which the service support. e.g. For O365, region is + Global. + :type service_supported_region: str + :param community_name: The name of the bgp community. e.g. Skype. + :type community_name: str + :param community_value: The value of the bgp community. For more information: + https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing. + :type community_value: str + :param community_prefixes: The prefixes that the bgp community contains. + :type community_prefixes: list[str] + :param is_authorized_to_use: Customer is authorized to use bgp community or not. + :type is_authorized_to_use: bool + :param service_group: The service group of the bgp community contains. + :type service_group: str + """ + + _attribute_map = { + 'service_supported_region': {'key': 'serviceSupportedRegion', 'type': 'str'}, + 'community_name': {'key': 'communityName', 'type': 'str'}, + 'community_value': {'key': 'communityValue', 'type': 'str'}, + 'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'}, + 'is_authorized_to_use': {'key': 'isAuthorizedToUse', 'type': 'bool'}, + 'service_group': {'key': 'serviceGroup', 'type': 'str'}, + } + + def __init__( + self, + *, + service_supported_region: Optional[str] = None, + community_name: Optional[str] = None, + community_value: Optional[str] = None, + community_prefixes: Optional[List[str]] = None, + is_authorized_to_use: Optional[bool] = None, + service_group: Optional[str] = None, + **kwargs + ): + super(BGPCommunity, self).__init__(**kwargs) + self.service_supported_region = service_supported_region + self.community_name = community_name + self.community_value = community_value + self.community_prefixes = community_prefixes + self.is_authorized_to_use = is_authorized_to_use + self.service_group = service_group + + +class BgpConnection(SubResource): + """Virtual Appliance Site resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the connection. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Connection type. + :vartype type: str + :param peer_asn: Peer ASN. + :type peer_asn: long + :param peer_ip: Peer IP. + :type peer_ip: str + :param hub_virtual_network_connection: The reference to the HubVirtualNetworkConnection + resource. + :type hub_virtual_network_connection: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar connection_state: The current state of the VirtualHub to Peer. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_state: str or ~azure.mgmt.network.v2021_05_01.models.HubBgpConnectionStatus + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + 'connection_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peer_asn': {'key': 'properties.peerAsn', 'type': 'long'}, + 'peer_ip': {'key': 'properties.peerIp', 'type': 'str'}, + 'hub_virtual_network_connection': {'key': 'properties.hubVirtualNetworkConnection', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'connection_state': {'key': 'properties.connectionState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + peer_asn: Optional[int] = None, + peer_ip: Optional[str] = None, + hub_virtual_network_connection: Optional["SubResource"] = None, + **kwargs + ): + super(BgpConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.peer_asn = peer_asn + self.peer_ip = peer_ip + self.hub_virtual_network_connection = hub_virtual_network_connection + self.provisioning_state = None + self.connection_state = None + + +class BgpPeerStatus(msrest.serialization.Model): + """BGP peer status details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar local_address: The virtual network gateway's local address. + :vartype local_address: str + :ivar neighbor: The remote BGP peer. + :vartype neighbor: str + :ivar asn: The autonomous system number of the remote BGP peer. + :vartype asn: long + :ivar state: The BGP peer state. Possible values include: "Unknown", "Stopped", "Idle", + "Connecting", "Connected". + :vartype state: str or ~azure.mgmt.network.v2021_05_01.models.BgpPeerState + :ivar connected_duration: For how long the peering has been up. + :vartype connected_duration: str + :ivar routes_received: The number of routes learned from this peer. + :vartype routes_received: long + :ivar messages_sent: The number of BGP messages sent. + :vartype messages_sent: long + :ivar messages_received: The number of BGP messages received. + :vartype messages_received: long + """ + + _validation = { + 'local_address': {'readonly': True}, + 'neighbor': {'readonly': True}, + 'asn': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + 'state': {'readonly': True}, + 'connected_duration': {'readonly': True}, + 'routes_received': {'readonly': True}, + 'messages_sent': {'readonly': True}, + 'messages_received': {'readonly': True}, + } + + _attribute_map = { + 'local_address': {'key': 'localAddress', 'type': 'str'}, + 'neighbor': {'key': 'neighbor', 'type': 'str'}, + 'asn': {'key': 'asn', 'type': 'long'}, + 'state': {'key': 'state', 'type': 'str'}, + 'connected_duration': {'key': 'connectedDuration', 'type': 'str'}, + 'routes_received': {'key': 'routesReceived', 'type': 'long'}, + 'messages_sent': {'key': 'messagesSent', 'type': 'long'}, + 'messages_received': {'key': 'messagesReceived', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(BgpPeerStatus, self).__init__(**kwargs) + self.local_address = None + self.neighbor = None + self.asn = None + self.state = None + self.connected_duration = None + self.routes_received = None + self.messages_sent = None + self.messages_received = None + + +class BgpPeerStatusListResult(msrest.serialization.Model): + """Response for list BGP peer status API service call. + + :param value: List of BGP peers. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BgpPeerStatus] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BgpPeerStatus]'}, + } + + def __init__( + self, + *, + value: Optional[List["BgpPeerStatus"]] = None, + **kwargs + ): + super(BgpPeerStatusListResult, self).__init__(**kwargs) + self.value = value + + +class BgpServiceCommunity(Resource): + """Service Community Properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param service_name: The name of the bgp community. e.g. Skype. + :type service_name: str + :param bgp_communities: A list of bgp communities. + :type bgp_communities: list[~azure.mgmt.network.v2021_05_01.models.BGPCommunity] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, + 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': '[BGPCommunity]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + service_name: Optional[str] = None, + bgp_communities: Optional[List["BGPCommunity"]] = None, + **kwargs + ): + super(BgpServiceCommunity, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.service_name = service_name + self.bgp_communities = bgp_communities + + +class BgpServiceCommunityListResult(msrest.serialization.Model): + """Response for the ListServiceCommunity API service call. + + :param value: A list of service community resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BgpServiceCommunity] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BgpServiceCommunity]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BgpServiceCommunity"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(BgpServiceCommunityListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class BgpSettings(msrest.serialization.Model): + """BGP settings details. + + :param asn: The BGP speaker's ASN. + :type asn: long + :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. + :type bgp_peering_address: str + :param peer_weight: The weight added to routes learned from this BGP speaker. + :type peer_weight: int + :param bgp_peering_addresses: BGP peering address with IP configuration ID for virtual network + gateway. + :type bgp_peering_addresses: + list[~azure.mgmt.network.v2021_05_01.models.IPConfigurationBgpPeeringAddress] + """ + + _validation = { + 'asn': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'asn': {'key': 'asn', 'type': 'long'}, + 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, + 'peer_weight': {'key': 'peerWeight', 'type': 'int'}, + 'bgp_peering_addresses': {'key': 'bgpPeeringAddresses', 'type': '[IPConfigurationBgpPeeringAddress]'}, + } + + def __init__( + self, + *, + asn: Optional[int] = None, + bgp_peering_address: Optional[str] = None, + peer_weight: Optional[int] = None, + bgp_peering_addresses: Optional[List["IPConfigurationBgpPeeringAddress"]] = None, + **kwargs + ): + super(BgpSettings, self).__init__(**kwargs) + self.asn = asn + self.bgp_peering_address = bgp_peering_address + self.peer_weight = peer_weight + self.bgp_peering_addresses = bgp_peering_addresses + + +class BreakOutCategoryPolicies(msrest.serialization.Model): + """Network Virtual Appliance Sku Properties. + + :param allow: Flag to control breakout of o365 allow category. + :type allow: bool + :param optimize: Flag to control breakout of o365 optimize category. + :type optimize: bool + :param default: Flag to control breakout of o365 default category. + :type default: bool + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': 'bool'}, + 'optimize': {'key': 'optimize', 'type': 'bool'}, + 'default': {'key': 'default', 'type': 'bool'}, + } + + def __init__( + self, + *, + allow: Optional[bool] = None, + optimize: Optional[bool] = None, + default: Optional[bool] = None, + **kwargs + ): + super(BreakOutCategoryPolicies, self).__init__(**kwargs) + self.allow = allow + self.optimize = optimize + self.default = default + + +class CheckPrivateLinkServiceVisibilityRequest(msrest.serialization.Model): + """Request body of the CheckPrivateLinkServiceVisibility API service call. + + :param private_link_service_alias: The alias of the private link service. + :type private_link_service_alias: str + """ + + _attribute_map = { + 'private_link_service_alias': {'key': 'privateLinkServiceAlias', 'type': 'str'}, + } + + def __init__( + self, + *, + private_link_service_alias: Optional[str] = None, + **kwargs + ): + super(CheckPrivateLinkServiceVisibilityRequest, self).__init__(**kwargs) + self.private_link_service_alias = private_link_service_alias + + +class CloudErrorBody(msrest.serialization.Model): + """An error response from the service. + + :param code: An identifier for the error. Codes are invariant and are intended to be consumed + programmatically. + :type code: str + :param message: A message describing the error, intended to be suitable for display in a user + interface. + :type message: str + :param target: The target of the particular error. For example, the name of the property in + error. + :type target: str + :param details: A list of additional details about the error. + :type details: list[~azure.mgmt.network.v2021_05_01.models.CloudErrorBody] + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[CloudErrorBody]'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["CloudErrorBody"]] = None, + **kwargs + ): + super(CloudErrorBody, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + + +class Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties(msrest.serialization.Model): + """Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None + + +class ConnectionMonitor(msrest.serialization.Model): + """Parameters that define the operation to create a connection monitor. + + :param location: Connection monitor location. + :type location: str + :param tags: A set of tags. Connection monitor tags. + :type tags: dict[str, str] + :param source: Describes the source of connection monitor. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSource + :param destination: Describes the destination of connection monitor. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start automatically once created. + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + :type monitoring_interval_in_seconds: int + :param endpoints: List of connection monitor endpoints. + :type endpoints: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpoint] + :param test_configurations: List of connection monitor test configurations. + :type test_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfiguration] + :param test_groups: List of connection monitor test groups. + :type test_groups: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestGroup] + :param outputs: List of connection monitor outputs. + :type outputs: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorOutput] + :param notes: Optional notes to be associated with the connection monitor. + :type notes: str + """ + + _validation = { + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'properties.testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'properties.testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'properties.outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + source: Optional["ConnectionMonitorSource"] = None, + destination: Optional["ConnectionMonitorDestination"] = None, + auto_start: Optional[bool] = True, + monitoring_interval_in_seconds: Optional[int] = 60, + endpoints: Optional[List["ConnectionMonitorEndpoint"]] = None, + test_configurations: Optional[List["ConnectionMonitorTestConfiguration"]] = None, + test_groups: Optional[List["ConnectionMonitorTestGroup"]] = None, + outputs: Optional[List["ConnectionMonitorOutput"]] = None, + notes: Optional[str] = None, + **kwargs + ): + super(ConnectionMonitor, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.source = source + self.destination = destination + self.auto_start = auto_start + self.monitoring_interval_in_seconds = monitoring_interval_in_seconds + self.endpoints = endpoints + self.test_configurations = test_configurations + self.test_groups = test_groups + self.outputs = outputs + self.notes = notes + + +class ConnectionMonitorDestination(msrest.serialization.Model): + """Describes the destination of connection monitor. + + :param resource_id: The ID of the resource used as the destination by connection monitor. + :type resource_id: str + :param address: Address of the connection monitor destination (IP or domain name). + :type address: str + :param port: The destination port used by connection monitor. + :type port: int + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + address: Optional[str] = None, + port: Optional[int] = None, + **kwargs + ): + super(ConnectionMonitorDestination, self).__init__(**kwargs) + self.resource_id = resource_id + self.address = address + self.port = port + + +class ConnectionMonitorEndpoint(msrest.serialization.Model): + """Describes the connection monitor endpoint. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the connection monitor endpoint. + :type name: str + :param type: The endpoint type. Possible values include: "AzureVM", "AzureVNet", "AzureSubnet", + "ExternalAddress", "MMAWorkspaceMachine", "MMAWorkspaceNetwork". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.EndpointType + :param resource_id: Resource ID of the connection monitor endpoint. + :type resource_id: str + :param address: Address of the connection monitor endpoint (IP or domain name). + :type address: str + :param filter: Filter for sub-items within the endpoint. + :type filter: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointFilter + :param scope: Endpoint scope. + :type scope: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointScope + :param coverage_level: Test coverage for the endpoint. Possible values include: "Default", + "Low", "BelowAverage", "Average", "AboveAverage", "Full". + :type coverage_level: str or ~azure.mgmt.network.v2021_05_01.models.CoverageLevel + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'filter': {'key': 'filter', 'type': 'ConnectionMonitorEndpointFilter'}, + 'scope': {'key': 'scope', 'type': 'ConnectionMonitorEndpointScope'}, + 'coverage_level': {'key': 'coverageLevel', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + type: Optional[Union[str, "EndpointType"]] = None, + resource_id: Optional[str] = None, + address: Optional[str] = None, + filter: Optional["ConnectionMonitorEndpointFilter"] = None, + scope: Optional["ConnectionMonitorEndpointScope"] = None, + coverage_level: Optional[Union[str, "CoverageLevel"]] = None, + **kwargs + ): + super(ConnectionMonitorEndpoint, self).__init__(**kwargs) + self.name = name + self.type = type + self.resource_id = resource_id + self.address = address + self.filter = filter + self.scope = scope + self.coverage_level = coverage_level + + +class ConnectionMonitorEndpointFilter(msrest.serialization.Model): + """Describes the connection monitor endpoint filter. + + :param type: The behavior of the endpoint filter. Currently only 'Include' is supported. + Possible values include: "Include". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointFilterType + :param items: List of items in the filter. + :type items: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointFilterItem] + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'items': {'key': 'items', 'type': '[ConnectionMonitorEndpointFilterItem]'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ConnectionMonitorEndpointFilterType"]] = None, + items: Optional[List["ConnectionMonitorEndpointFilterItem"]] = None, + **kwargs + ): + super(ConnectionMonitorEndpointFilter, self).__init__(**kwargs) + self.type = type + self.items = items + + +class ConnectionMonitorEndpointFilterItem(msrest.serialization.Model): + """Describes the connection monitor endpoint filter item. + + :param type: The type of item included in the filter. Currently only 'AgentAddress' is + supported. Possible values include: "AgentAddress". + :type type: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointFilterItemType + :param address: The address of the filter item. + :type address: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ConnectionMonitorEndpointFilterItemType"]] = None, + address: Optional[str] = None, + **kwargs + ): + super(ConnectionMonitorEndpointFilterItem, self).__init__(**kwargs) + self.type = type + self.address = address + + +class ConnectionMonitorEndpointScope(msrest.serialization.Model): + """Describes the connection monitor endpoint scope. + + :param include: List of items which needs to be included to the endpoint scope. + :type include: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointScopeItem] + :param exclude: List of items which needs to be excluded from the endpoint scope. + :type exclude: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpointScopeItem] + """ + + _attribute_map = { + 'include': {'key': 'include', 'type': '[ConnectionMonitorEndpointScopeItem]'}, + 'exclude': {'key': 'exclude', 'type': '[ConnectionMonitorEndpointScopeItem]'}, + } + + def __init__( + self, + *, + include: Optional[List["ConnectionMonitorEndpointScopeItem"]] = None, + exclude: Optional[List["ConnectionMonitorEndpointScopeItem"]] = None, + **kwargs + ): + super(ConnectionMonitorEndpointScope, self).__init__(**kwargs) + self.include = include + self.exclude = exclude + + +class ConnectionMonitorEndpointScopeItem(msrest.serialization.Model): + """Describes the connection monitor endpoint scope item. + + :param address: The address of the endpoint item. Supported types are IPv4/IPv6 subnet mask or + IPv4/IPv6 IP address. + :type address: str + """ + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + } + + def __init__( + self, + *, + address: Optional[str] = None, + **kwargs + ): + super(ConnectionMonitorEndpointScopeItem, self).__init__(**kwargs) + self.address = address + + +class ConnectionMonitorHttpConfiguration(msrest.serialization.Model): + """Describes the HTTP configuration. + + :param port: The port to connect to. + :type port: int + :param method: The HTTP method to use. Possible values include: "Get", "Post". + :type method: str or ~azure.mgmt.network.v2021_05_01.models.HTTPConfigurationMethod + :param path: The path component of the URI. For instance, "/dir1/dir2". + :type path: str + :param request_headers: The HTTP headers to transmit with the request. + :type request_headers: list[~azure.mgmt.network.v2021_05_01.models.HTTPHeader] + :param valid_status_code_ranges: HTTP status codes to consider successful. For instance, + "2xx,301-304,418". + :type valid_status_code_ranges: list[str] + :param prefer_https: Value indicating whether HTTPS is preferred over HTTP in cases where the + choice is not explicit. + :type prefer_https: bool + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'method': {'key': 'method', 'type': 'str'}, + 'path': {'key': 'path', 'type': 'str'}, + 'request_headers': {'key': 'requestHeaders', 'type': '[HTTPHeader]'}, + 'valid_status_code_ranges': {'key': 'validStatusCodeRanges', 'type': '[str]'}, + 'prefer_https': {'key': 'preferHTTPS', 'type': 'bool'}, + } + + def __init__( + self, + *, + port: Optional[int] = None, + method: Optional[Union[str, "HTTPConfigurationMethod"]] = None, + path: Optional[str] = None, + request_headers: Optional[List["HTTPHeader"]] = None, + valid_status_code_ranges: Optional[List[str]] = None, + prefer_https: Optional[bool] = None, + **kwargs + ): + super(ConnectionMonitorHttpConfiguration, self).__init__(**kwargs) + self.port = port + self.method = method + self.path = path + self.request_headers = request_headers + self.valid_status_code_ranges = valid_status_code_ranges + self.prefer_https = prefer_https + + +class ConnectionMonitorIcmpConfiguration(msrest.serialization.Model): + """Describes the ICMP configuration. + + :param disable_trace_route: Value indicating whether path evaluation with trace route should be + disabled. + :type disable_trace_route: bool + """ + + _attribute_map = { + 'disable_trace_route': {'key': 'disableTraceRoute', 'type': 'bool'}, + } + + def __init__( + self, + *, + disable_trace_route: Optional[bool] = None, + **kwargs + ): + super(ConnectionMonitorIcmpConfiguration, self).__init__(**kwargs) + self.disable_trace_route = disable_trace_route + + +class ConnectionMonitorListResult(msrest.serialization.Model): + """List of connection monitors. + + :param value: Information about connection monitors. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ConnectionMonitorResult]'}, + } + + def __init__( + self, + *, + value: Optional[List["ConnectionMonitorResult"]] = None, + **kwargs + ): + super(ConnectionMonitorListResult, self).__init__(**kwargs) + self.value = value + + +class ConnectionMonitorOutput(msrest.serialization.Model): + """Describes a connection monitor output destination. + + :param type: Connection monitor output destination type. Currently, only "Workspace" is + supported. Possible values include: "Workspace". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.OutputType + :param workspace_settings: Describes the settings for producing output into a log analytics + workspace. + :type workspace_settings: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorWorkspaceSettings + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'workspace_settings': {'key': 'workspaceSettings', 'type': 'ConnectionMonitorWorkspaceSettings'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "OutputType"]] = None, + workspace_settings: Optional["ConnectionMonitorWorkspaceSettings"] = None, + **kwargs + ): + super(ConnectionMonitorOutput, self).__init__(**kwargs) + self.type = type + self.workspace_settings = workspace_settings + + +class ConnectionMonitorParameters(msrest.serialization.Model): + """Parameters that define the operation to create a connection monitor. + + :param source: Describes the source of connection monitor. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSource + :param destination: Describes the destination of connection monitor. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start automatically once created. + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + :type monitoring_interval_in_seconds: int + :param endpoints: List of connection monitor endpoints. + :type endpoints: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpoint] + :param test_configurations: List of connection monitor test configurations. + :type test_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfiguration] + :param test_groups: List of connection monitor test groups. + :type test_groups: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestGroup] + :param outputs: List of connection monitor outputs. + :type outputs: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorOutput] + :param notes: Optional notes to be associated with the connection monitor. + :type notes: str + """ + + _validation = { + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'notes', 'type': 'str'}, + } + + def __init__( + self, + *, + source: Optional["ConnectionMonitorSource"] = None, + destination: Optional["ConnectionMonitorDestination"] = None, + auto_start: Optional[bool] = True, + monitoring_interval_in_seconds: Optional[int] = 60, + endpoints: Optional[List["ConnectionMonitorEndpoint"]] = None, + test_configurations: Optional[List["ConnectionMonitorTestConfiguration"]] = None, + test_groups: Optional[List["ConnectionMonitorTestGroup"]] = None, + outputs: Optional[List["ConnectionMonitorOutput"]] = None, + notes: Optional[str] = None, + **kwargs + ): + super(ConnectionMonitorParameters, self).__init__(**kwargs) + self.source = source + self.destination = destination + self.auto_start = auto_start + self.monitoring_interval_in_seconds = monitoring_interval_in_seconds + self.endpoints = endpoints + self.test_configurations = test_configurations + self.test_groups = test_groups + self.outputs = outputs + self.notes = notes + + +class ConnectionMonitorQueryResult(msrest.serialization.Model): + """List of connection states snapshots. + + :param source_status: Status of connection monitor source. Possible values include: "Unknown", + "Active", "Inactive". + :type source_status: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSourceStatus + :param states: Information about connection states. + :type states: list[~azure.mgmt.network.v2021_05_01.models.ConnectionStateSnapshot] + """ + + _attribute_map = { + 'source_status': {'key': 'sourceStatus', 'type': 'str'}, + 'states': {'key': 'states', 'type': '[ConnectionStateSnapshot]'}, + } + + def __init__( + self, + *, + source_status: Optional[Union[str, "ConnectionMonitorSourceStatus"]] = None, + states: Optional[List["ConnectionStateSnapshot"]] = None, + **kwargs + ): + super(ConnectionMonitorQueryResult, self).__init__(**kwargs) + self.source_status = source_status + self.states = states + + +class ConnectionMonitorResult(msrest.serialization.Model): + """Information about the connection monitor. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the connection monitor. + :vartype name: str + :ivar id: ID of the connection monitor. + :vartype id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Connection monitor type. + :vartype type: str + :param location: Connection monitor location. + :type location: str + :param tags: A set of tags. Connection monitor tags. + :type tags: dict[str, str] + :param source: Describes the source of connection monitor. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSource + :param destination: Describes the destination of connection monitor. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start automatically once created. + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + :type monitoring_interval_in_seconds: int + :param endpoints: List of connection monitor endpoints. + :type endpoints: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpoint] + :param test_configurations: List of connection monitor test configurations. + :type test_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfiguration] + :param test_groups: List of connection monitor test groups. + :type test_groups: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestGroup] + :param outputs: List of connection monitor outputs. + :type outputs: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorOutput] + :param notes: Optional notes to be associated with the connection monitor. + :type notes: str + :ivar provisioning_state: The provisioning state of the connection monitor. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar start_time: The date and time when the connection monitor was started. + :vartype start_time: ~datetime.datetime + :ivar monitoring_status: The monitoring status of the connection monitor. + :vartype monitoring_status: str + :ivar connection_monitor_type: Type of connection monitor. Possible values include: + "MultiEndpoint", "SingleSourceDestination". + :vartype connection_monitor_type: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorType + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + 'provisioning_state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'monitoring_status': {'readonly': True}, + 'connection_monitor_type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'source': {'key': 'properties.source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'properties.destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'properties.autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'properties.monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'properties.testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'properties.testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'properties.outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'properties.notes', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'monitoring_status': {'key': 'properties.monitoringStatus', 'type': 'str'}, + 'connection_monitor_type': {'key': 'properties.connectionMonitorType', 'type': 'str'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + source: Optional["ConnectionMonitorSource"] = None, + destination: Optional["ConnectionMonitorDestination"] = None, + auto_start: Optional[bool] = True, + monitoring_interval_in_seconds: Optional[int] = 60, + endpoints: Optional[List["ConnectionMonitorEndpoint"]] = None, + test_configurations: Optional[List["ConnectionMonitorTestConfiguration"]] = None, + test_groups: Optional[List["ConnectionMonitorTestGroup"]] = None, + outputs: Optional[List["ConnectionMonitorOutput"]] = None, + notes: Optional[str] = None, + **kwargs + ): + super(ConnectionMonitorResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.etag = None + self.type = None + self.location = location + self.tags = tags + self.source = source + self.destination = destination + self.auto_start = auto_start + self.monitoring_interval_in_seconds = monitoring_interval_in_seconds + self.endpoints = endpoints + self.test_configurations = test_configurations + self.test_groups = test_groups + self.outputs = outputs + self.notes = notes + self.provisioning_state = None + self.start_time = None + self.monitoring_status = None + self.connection_monitor_type = None + + +class ConnectionMonitorResultProperties(ConnectionMonitorParameters): + """Describes the properties of a connection monitor. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param source: Describes the source of connection monitor. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSource + :param destination: Describes the destination of connection monitor. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorDestination + :param auto_start: Determines if the connection monitor will start automatically once created. + :type auto_start: bool + :param monitoring_interval_in_seconds: Monitoring interval in seconds. + :type monitoring_interval_in_seconds: int + :param endpoints: List of connection monitor endpoints. + :type endpoints: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorEndpoint] + :param test_configurations: List of connection monitor test configurations. + :type test_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfiguration] + :param test_groups: List of connection monitor test groups. + :type test_groups: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestGroup] + :param outputs: List of connection monitor outputs. + :type outputs: list[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorOutput] + :param notes: Optional notes to be associated with the connection monitor. + :type notes: str + :ivar provisioning_state: The provisioning state of the connection monitor. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar start_time: The date and time when the connection monitor was started. + :vartype start_time: ~datetime.datetime + :ivar monitoring_status: The monitoring status of the connection monitor. + :vartype monitoring_status: str + :ivar connection_monitor_type: Type of connection monitor. Possible values include: + "MultiEndpoint", "SingleSourceDestination". + :vartype connection_monitor_type: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorType + """ + + _validation = { + 'monitoring_interval_in_seconds': {'maximum': 1800, 'minimum': 30}, + 'provisioning_state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'monitoring_status': {'readonly': True}, + 'connection_monitor_type': {'readonly': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectionMonitorSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectionMonitorDestination'}, + 'auto_start': {'key': 'autoStart', 'type': 'bool'}, + 'monitoring_interval_in_seconds': {'key': 'monitoringIntervalInSeconds', 'type': 'int'}, + 'endpoints': {'key': 'endpoints', 'type': '[ConnectionMonitorEndpoint]'}, + 'test_configurations': {'key': 'testConfigurations', 'type': '[ConnectionMonitorTestConfiguration]'}, + 'test_groups': {'key': 'testGroups', 'type': '[ConnectionMonitorTestGroup]'}, + 'outputs': {'key': 'outputs', 'type': '[ConnectionMonitorOutput]'}, + 'notes': {'key': 'notes', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'monitoring_status': {'key': 'monitoringStatus', 'type': 'str'}, + 'connection_monitor_type': {'key': 'connectionMonitorType', 'type': 'str'}, + } + + def __init__( + self, + *, + source: Optional["ConnectionMonitorSource"] = None, + destination: Optional["ConnectionMonitorDestination"] = None, + auto_start: Optional[bool] = True, + monitoring_interval_in_seconds: Optional[int] = 60, + endpoints: Optional[List["ConnectionMonitorEndpoint"]] = None, + test_configurations: Optional[List["ConnectionMonitorTestConfiguration"]] = None, + test_groups: Optional[List["ConnectionMonitorTestGroup"]] = None, + outputs: Optional[List["ConnectionMonitorOutput"]] = None, + notes: Optional[str] = None, + **kwargs + ): + super(ConnectionMonitorResultProperties, self).__init__(source=source, destination=destination, auto_start=auto_start, monitoring_interval_in_seconds=monitoring_interval_in_seconds, endpoints=endpoints, test_configurations=test_configurations, test_groups=test_groups, outputs=outputs, notes=notes, **kwargs) + self.provisioning_state = None + self.start_time = None + self.monitoring_status = None + self.connection_monitor_type = None + + +class ConnectionMonitorSource(msrest.serialization.Model): + """Describes the source of connection monitor. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The ID of the resource used as the source by connection monitor. + :type resource_id: str + :param port: The source port used by connection monitor. + :type port: int + """ + + _validation = { + 'resource_id': {'required': True}, + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + resource_id: str, + port: Optional[int] = None, + **kwargs + ): + super(ConnectionMonitorSource, self).__init__(**kwargs) + self.resource_id = resource_id + self.port = port + + +class ConnectionMonitorSuccessThreshold(msrest.serialization.Model): + """Describes the threshold for declaring a test successful. + + :param checks_failed_percent: The maximum percentage of failed checks permitted for a test to + evaluate as successful. + :type checks_failed_percent: int + :param round_trip_time_ms: The maximum round-trip time in milliseconds permitted for a test to + evaluate as successful. + :type round_trip_time_ms: float + """ + + _attribute_map = { + 'checks_failed_percent': {'key': 'checksFailedPercent', 'type': 'int'}, + 'round_trip_time_ms': {'key': 'roundTripTimeMs', 'type': 'float'}, + } + + def __init__( + self, + *, + checks_failed_percent: Optional[int] = None, + round_trip_time_ms: Optional[float] = None, + **kwargs + ): + super(ConnectionMonitorSuccessThreshold, self).__init__(**kwargs) + self.checks_failed_percent = checks_failed_percent + self.round_trip_time_ms = round_trip_time_ms + + +class ConnectionMonitorTcpConfiguration(msrest.serialization.Model): + """Describes the TCP configuration. + + :param port: The port to connect to. + :type port: int + :param disable_trace_route: Value indicating whether path evaluation with trace route should be + disabled. + :type disable_trace_route: bool + :param destination_port_behavior: Destination port behavior. Possible values include: "None", + "ListenIfAvailable". + :type destination_port_behavior: str or + ~azure.mgmt.network.v2021_05_01.models.DestinationPortBehavior + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'disable_trace_route': {'key': 'disableTraceRoute', 'type': 'bool'}, + 'destination_port_behavior': {'key': 'destinationPortBehavior', 'type': 'str'}, + } + + def __init__( + self, + *, + port: Optional[int] = None, + disable_trace_route: Optional[bool] = None, + destination_port_behavior: Optional[Union[str, "DestinationPortBehavior"]] = None, + **kwargs + ): + super(ConnectionMonitorTcpConfiguration, self).__init__(**kwargs) + self.port = port + self.disable_trace_route = disable_trace_route + self.destination_port_behavior = destination_port_behavior + + +class ConnectionMonitorTestConfiguration(msrest.serialization.Model): + """Describes a connection monitor test configuration. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the connection monitor test configuration. + :type name: str + :param test_frequency_sec: The frequency of test evaluation, in seconds. + :type test_frequency_sec: int + :param protocol: Required. The protocol to use in test evaluation. Possible values include: + "Tcp", "Http", "Icmp". + :type protocol: str or + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTestConfigurationProtocol + :param preferred_ip_version: The preferred IP version to use in test evaluation. The connection + monitor may choose to use a different version depending on other parameters. Possible values + include: "IPv4", "IPv6". + :type preferred_ip_version: str or ~azure.mgmt.network.v2021_05_01.models.PreferredIPVersion + :param http_configuration: The parameters used to perform test evaluation over HTTP. + :type http_configuration: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorHttpConfiguration + :param tcp_configuration: The parameters used to perform test evaluation over TCP. + :type tcp_configuration: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorTcpConfiguration + :param icmp_configuration: The parameters used to perform test evaluation over ICMP. + :type icmp_configuration: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorIcmpConfiguration + :param success_threshold: The threshold for declaring a test successful. + :type success_threshold: + ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorSuccessThreshold + """ + + _validation = { + 'name': {'required': True}, + 'protocol': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'test_frequency_sec': {'key': 'testFrequencySec', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'preferred_ip_version': {'key': 'preferredIPVersion', 'type': 'str'}, + 'http_configuration': {'key': 'httpConfiguration', 'type': 'ConnectionMonitorHttpConfiguration'}, + 'tcp_configuration': {'key': 'tcpConfiguration', 'type': 'ConnectionMonitorTcpConfiguration'}, + 'icmp_configuration': {'key': 'icmpConfiguration', 'type': 'ConnectionMonitorIcmpConfiguration'}, + 'success_threshold': {'key': 'successThreshold', 'type': 'ConnectionMonitorSuccessThreshold'}, + } + + def __init__( + self, + *, + name: str, + protocol: Union[str, "ConnectionMonitorTestConfigurationProtocol"], + test_frequency_sec: Optional[int] = None, + preferred_ip_version: Optional[Union[str, "PreferredIPVersion"]] = None, + http_configuration: Optional["ConnectionMonitorHttpConfiguration"] = None, + tcp_configuration: Optional["ConnectionMonitorTcpConfiguration"] = None, + icmp_configuration: Optional["ConnectionMonitorIcmpConfiguration"] = None, + success_threshold: Optional["ConnectionMonitorSuccessThreshold"] = None, + **kwargs + ): + super(ConnectionMonitorTestConfiguration, self).__init__(**kwargs) + self.name = name + self.test_frequency_sec = test_frequency_sec + self.protocol = protocol + self.preferred_ip_version = preferred_ip_version + self.http_configuration = http_configuration + self.tcp_configuration = tcp_configuration + self.icmp_configuration = icmp_configuration + self.success_threshold = success_threshold + + +class ConnectionMonitorTestGroup(msrest.serialization.Model): + """Describes the connection monitor test group. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the connection monitor test group. + :type name: str + :param disable: Value indicating whether test group is disabled. + :type disable: bool + :param test_configurations: Required. List of test configuration names. + :type test_configurations: list[str] + :param sources: Required. List of source endpoint names. + :type sources: list[str] + :param destinations: Required. List of destination endpoint names. + :type destinations: list[str] + """ + + _validation = { + 'name': {'required': True}, + 'test_configurations': {'required': True}, + 'sources': {'required': True}, + 'destinations': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disable': {'key': 'disable', 'type': 'bool'}, + 'test_configurations': {'key': 'testConfigurations', 'type': '[str]'}, + 'sources': {'key': 'sources', 'type': '[str]'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: str, + test_configurations: List[str], + sources: List[str], + destinations: List[str], + disable: Optional[bool] = None, + **kwargs + ): + super(ConnectionMonitorTestGroup, self).__init__(**kwargs) + self.name = name + self.disable = disable + self.test_configurations = test_configurations + self.sources = sources + self.destinations = destinations + + +class ConnectionMonitorWorkspaceSettings(msrest.serialization.Model): + """Describes the settings for producing output into a log analytics workspace. + + :param workspace_resource_id: Log analytics workspace resource ID. + :type workspace_resource_id: str + """ + + _attribute_map = { + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + workspace_resource_id: Optional[str] = None, + **kwargs + ): + super(ConnectionMonitorWorkspaceSettings, self).__init__(**kwargs) + self.workspace_resource_id = workspace_resource_id + + +class ConnectionResetSharedKey(msrest.serialization.Model): + """The virtual network connection reset shared key. + + All required parameters must be populated in order to send to Azure. + + :param key_length: Required. The virtual network connection reset shared key length, should + between 1 and 128. + :type key_length: int + """ + + _validation = { + 'key_length': {'required': True, 'maximum': 128, 'minimum': 1}, + } + + _attribute_map = { + 'key_length': {'key': 'keyLength', 'type': 'int'}, + } + + def __init__( + self, + *, + key_length: int, + **kwargs + ): + super(ConnectionResetSharedKey, self).__init__(**kwargs) + self.key_length = key_length + + +class ConnectionSharedKey(SubResource): + """Response for GetConnectionSharedKey API service call. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param value: Required. The virtual network connection shared key value. + :type value: str + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + value: str, + id: Optional[str] = None, + **kwargs + ): + super(ConnectionSharedKey, self).__init__(id=id, **kwargs) + self.value = value + + +class ConnectionStateSnapshot(msrest.serialization.Model): + """Connection state snapshot. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param connection_state: The connection state. Possible values include: "Reachable", + "Unreachable", "Unknown". + :type connection_state: str or ~azure.mgmt.network.v2021_05_01.models.ConnectionState + :param start_time: The start time of the connection snapshot. + :type start_time: ~datetime.datetime + :param end_time: The end time of the connection snapshot. + :type end_time: ~datetime.datetime + :param evaluation_state: Connectivity analysis evaluation state. Possible values include: + "NotStarted", "InProgress", "Completed". + :type evaluation_state: str or ~azure.mgmt.network.v2021_05_01.models.EvaluationState + :param avg_latency_in_ms: Average latency in ms. + :type avg_latency_in_ms: long + :param min_latency_in_ms: Minimum latency in ms. + :type min_latency_in_ms: long + :param max_latency_in_ms: Maximum latency in ms. + :type max_latency_in_ms: long + :param probes_sent: The number of sent probes. + :type probes_sent: long + :param probes_failed: The number of failed probes. + :type probes_failed: long + :ivar hops: List of hops between the source and the destination. + :vartype hops: list[~azure.mgmt.network.v2021_05_01.models.ConnectivityHop] + """ + + _validation = { + 'avg_latency_in_ms': {'maximum': 4294967295, 'minimum': 0}, + 'min_latency_in_ms': {'maximum': 4294967295, 'minimum': 0}, + 'max_latency_in_ms': {'maximum': 4294967295, 'minimum': 0}, + 'probes_sent': {'maximum': 4294967295, 'minimum': 0}, + 'probes_failed': {'maximum': 4294967295, 'minimum': 0}, + 'hops': {'readonly': True}, + } + + _attribute_map = { + 'connection_state': {'key': 'connectionState', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'evaluation_state': {'key': 'evaluationState', 'type': 'str'}, + 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'long'}, + 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'long'}, + 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'long'}, + 'probes_sent': {'key': 'probesSent', 'type': 'long'}, + 'probes_failed': {'key': 'probesFailed', 'type': 'long'}, + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + } + + def __init__( + self, + *, + connection_state: Optional[Union[str, "ConnectionState"]] = None, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + evaluation_state: Optional[Union[str, "EvaluationState"]] = None, + avg_latency_in_ms: Optional[int] = None, + min_latency_in_ms: Optional[int] = None, + max_latency_in_ms: Optional[int] = None, + probes_sent: Optional[int] = None, + probes_failed: Optional[int] = None, + **kwargs + ): + super(ConnectionStateSnapshot, self).__init__(**kwargs) + self.connection_state = connection_state + self.start_time = start_time + self.end_time = end_time + self.evaluation_state = evaluation_state + self.avg_latency_in_ms = avg_latency_in_ms + self.min_latency_in_ms = min_latency_in_ms + self.max_latency_in_ms = max_latency_in_ms + self.probes_sent = probes_sent + self.probes_failed = probes_failed + self.hops = None + + +class ConnectivityDestination(msrest.serialization.Model): + """Parameters that define destination of connection. + + :param resource_id: The ID of the resource to which a connection attempt will be made. + :type resource_id: str + :param address: The IP address or URI the resource to which a connection attempt will be made. + :type address: str + :param port: Port on which check connectivity will be performed. + :type port: int + """ + + _validation = { + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + address: Optional[str] = None, + port: Optional[int] = None, + **kwargs + ): + super(ConnectivityDestination, self).__init__(**kwargs) + self.resource_id = resource_id + self.address = address + self.port = port + + +class ConnectivityHop(msrest.serialization.Model): + """Information about a hop between the source and the destination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of the hop. + :vartype type: str + :ivar id: The ID of the hop. + :vartype id: str + :ivar address: The IP address of the hop. + :vartype address: str + :ivar resource_id: The ID of the resource corresponding to this hop. + :vartype resource_id: str + :ivar next_hop_ids: List of next hop identifiers. + :vartype next_hop_ids: list[str] + :ivar previous_hop_ids: List of previous hop identifiers. + :vartype previous_hop_ids: list[str] + :ivar links: List of hop links. + :vartype links: list[~azure.mgmt.network.v2021_05_01.models.HopLink] + :ivar previous_links: List of previous hop links. + :vartype previous_links: list[~azure.mgmt.network.v2021_05_01.models.HopLink] + :ivar issues: List of issues. + :vartype issues: list[~azure.mgmt.network.v2021_05_01.models.ConnectivityIssue] + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'address': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'next_hop_ids': {'readonly': True}, + 'previous_hop_ids': {'readonly': True}, + 'links': {'readonly': True}, + 'previous_links': {'readonly': True}, + 'issues': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, + 'previous_hop_ids': {'key': 'previousHopIds', 'type': '[str]'}, + 'links': {'key': 'links', 'type': '[HopLink]'}, + 'previous_links': {'key': 'previousLinks', 'type': '[HopLink]'}, + 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityHop, self).__init__(**kwargs) + self.type = None + self.id = None + self.address = None + self.resource_id = None + self.next_hop_ids = None + self.previous_hop_ids = None + self.links = None + self.previous_links = None + self.issues = None + + +class ConnectivityInformation(msrest.serialization.Model): + """Information on the connectivity status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hops: List of hops between the source and the destination. + :vartype hops: list[~azure.mgmt.network.v2021_05_01.models.ConnectivityHop] + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connected", "Disconnected", "Degraded". + :vartype connection_status: str or ~azure.mgmt.network.v2021_05_01.models.ConnectionStatus + :ivar avg_latency_in_ms: Average latency in milliseconds. + :vartype avg_latency_in_ms: int + :ivar min_latency_in_ms: Minimum latency in milliseconds. + :vartype min_latency_in_ms: int + :ivar max_latency_in_ms: Maximum latency in milliseconds. + :vartype max_latency_in_ms: int + :ivar probes_sent: Total number of probes sent. + :vartype probes_sent: int + :ivar probes_failed: Number of failed probes. + :vartype probes_failed: int + """ + + _validation = { + 'hops': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'avg_latency_in_ms': {'readonly': True}, + 'min_latency_in_ms': {'readonly': True}, + 'max_latency_in_ms': {'readonly': True}, + 'probes_sent': {'readonly': True}, + 'probes_failed': {'readonly': True}, + } + + _attribute_map = { + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, + 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'int'}, + 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'int'}, + 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'int'}, + 'probes_sent': {'key': 'probesSent', 'type': 'int'}, + 'probes_failed': {'key': 'probesFailed', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityInformation, self).__init__(**kwargs) + self.hops = None + self.connection_status = None + self.avg_latency_in_ms = None + self.min_latency_in_ms = None + self.max_latency_in_ms = None + self.probes_sent = None + self.probes_failed = None + + +class ConnectivityIssue(msrest.serialization.Model): + """Information about an issue encountered in the process of checking for connectivity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". + :vartype origin: str or ~azure.mgmt.network.v2021_05_01.models.Origin + :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". + :vartype severity: str or ~azure.mgmt.network.v2021_05_01.models.Severity + :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", + "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", + "PortThrottled", "Platform". + :vartype type: str or ~azure.mgmt.network.v2021_05_01.models.IssueType + :ivar context: Provides additional context on the issue. + :vartype context: list[dict[str, str]] + """ + + _validation = { + 'origin': {'readonly': True}, + 'severity': {'readonly': True}, + 'type': {'readonly': True}, + 'context': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'context': {'key': 'context', 'type': '[{str}]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityIssue, self).__init__(**kwargs) + self.origin = None + self.severity = None + self.type = None + self.context = None + + +class ConnectivityParameters(msrest.serialization.Model): + """Parameters that determine how the connectivity check will be performed. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. The source of the connection. + :type source: ~azure.mgmt.network.v2021_05_01.models.ConnectivitySource + :param destination: Required. The destination of connection. + :type destination: ~azure.mgmt.network.v2021_05_01.models.ConnectivityDestination + :param protocol: Network protocol. Possible values include: "Tcp", "Http", "Https", "Icmp". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.Protocol + :param protocol_configuration: Configuration of the protocol. + :type protocol_configuration: ~azure.mgmt.network.v2021_05_01.models.ProtocolConfiguration + :param preferred_ip_version: Preferred IP version of the connection. Possible values include: + "IPv4", "IPv6". + :type preferred_ip_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + """ + + _validation = { + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectivitySource'}, + 'destination': {'key': 'destination', 'type': 'ConnectivityDestination'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'protocol_configuration': {'key': 'protocolConfiguration', 'type': 'ProtocolConfiguration'}, + 'preferred_ip_version': {'key': 'preferredIPVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + source: "ConnectivitySource", + destination: "ConnectivityDestination", + protocol: Optional[Union[str, "Protocol"]] = None, + protocol_configuration: Optional["ProtocolConfiguration"] = None, + preferred_ip_version: Optional[Union[str, "IPVersion"]] = None, + **kwargs + ): + super(ConnectivityParameters, self).__init__(**kwargs) + self.source = source + self.destination = destination + self.protocol = protocol + self.protocol_configuration = protocol_configuration + self.preferred_ip_version = preferred_ip_version + + +class ConnectivitySource(msrest.serialization.Model): + """Parameters that define the source of the connection. + + All required parameters must be populated in order to send to Azure. + + :param resource_id: Required. The ID of the resource from which a connectivity check will be + initiated. + :type resource_id: str + :param port: The source port from which a connectivity check will be performed. + :type port: int + """ + + _validation = { + 'resource_id': {'required': True}, + 'port': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + resource_id: str, + port: Optional[int] = None, + **kwargs + ): + super(ConnectivitySource, self).__init__(**kwargs) + self.resource_id = resource_id + self.port = port + + +class Container(SubResource): + """Reference to container resource in remote resource provider. + + :param id: Resource ID. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(Container, self).__init__(id=id, **kwargs) + + +class ContainerNetworkInterface(SubResource): + """Container network interface child resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource. This name can be used to access the resource. + :type name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar container_network_interface_configuration: Container network interface configuration from + which this container network interface is created. + :vartype container_network_interface_configuration: + ~azure.mgmt.network.v2021_05_01.models.ContainerNetworkInterfaceConfiguration + :param container: Reference to the container to which this container network interface is + attached. + :type container: ~azure.mgmt.network.v2021_05_01.models.Container + :ivar ip_configurations: Reference to the ip configuration on this container nic. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ContainerNetworkInterfaceIpConfiguration] + :ivar provisioning_state: The provisioning state of the container network interface resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'container_network_interface_configuration': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'container_network_interface_configuration': {'key': 'properties.containerNetworkInterfaceConfiguration', 'type': 'ContainerNetworkInterfaceConfiguration'}, + 'container': {'key': 'properties.container', 'type': 'Container'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[ContainerNetworkInterfaceIpConfiguration]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + container: Optional["Container"] = None, + **kwargs + ): + super(ContainerNetworkInterface, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.container_network_interface_configuration = None + self.container = container + self.ip_configurations = None + self.provisioning_state = None + + +class ContainerNetworkInterfaceConfiguration(SubResource): + """Container network interface configuration child resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource. This name can be used to access the resource. + :type name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param ip_configurations: A list of ip configurations of the container network interface + configuration. + :type ip_configurations: list[~azure.mgmt.network.v2021_05_01.models.IPConfigurationProfile] + :param container_network_interfaces: A list of container network interfaces created from this + container network interface configuration. + :type container_network_interfaces: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the container network interface + configuration resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfigurationProfile]'}, + 'container_network_interfaces': {'key': 'properties.containerNetworkInterfaces', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + ip_configurations: Optional[List["IPConfigurationProfile"]] = None, + container_network_interfaces: Optional[List["SubResource"]] = None, + **kwargs + ): + super(ContainerNetworkInterfaceConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.ip_configurations = ip_configurations + self.container_network_interfaces = container_network_interfaces + self.provisioning_state = None + + +class ContainerNetworkInterfaceIpConfiguration(msrest.serialization.Model): + """The ip configuration for a container network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: The name of the resource. This name can be used to access the resource. + :type name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the container network interface IP + configuration resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + **kwargs + ): + super(ContainerNetworkInterfaceIpConfiguration, self).__init__(**kwargs) + self.name = name + self.type = None + self.etag = None + self.provisioning_state = None + + +class CustomDnsConfigPropertiesFormat(msrest.serialization.Model): + """Contains custom Dns resolution configuration from customer. + + :param fqdn: Fqdn that resolves to private endpoint ip address. + :type fqdn: str + :param ip_addresses: A list of private ip addresses of the private endpoint. + :type ip_addresses: list[str] + """ + + _attribute_map = { + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, + } + + def __init__( + self, + *, + fqdn: Optional[str] = None, + ip_addresses: Optional[List[str]] = None, + **kwargs + ): + super(CustomDnsConfigPropertiesFormat, self).__init__(**kwargs) + self.fqdn = fqdn + self.ip_addresses = ip_addresses + + +class CustomIpPrefix(Resource): + """Custom IP prefix resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the custom IP prefix. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :type zones: list[str] + :param cidr: The prefix range in CIDR notation. Should include the start address and the prefix + length. + :type cidr: str + :param signed_message: Signed message for WAN validation. + :type signed_message: str + :param authorization_message: Authorization message for WAN validation. + :type authorization_message: str + :param custom_ip_prefix_parent: The Parent CustomIpPrefix for IPv6 /64 CustomIpPrefix. + :type custom_ip_prefix_parent: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar child_custom_ip_prefixes: The list of all Children for IPv6 /48 CustomIpPrefix. + :vartype child_custom_ip_prefixes: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param commissioned_state: The commissioned state of the Custom IP Prefix. Possible values + include: "Provisioning", "Provisioned", "Commissioning", "Commissioned", "Decommissioning", + "Deprovisioning". + :type commissioned_state: str or ~azure.mgmt.network.v2021_05_01.models.CommissionedState + :ivar public_ip_prefixes: The list of all referenced PublicIpPrefixes. + :vartype public_ip_prefixes: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar resource_guid: The resource GUID property of the custom IP prefix resource. + :vartype resource_guid: str + :ivar failed_reason: The reason why resource is in failed state. + :vartype failed_reason: str + :ivar provisioning_state: The provisioning state of the custom IP prefix resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'child_custom_ip_prefixes': {'readonly': True}, + 'public_ip_prefixes': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'failed_reason': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'cidr': {'key': 'properties.cidr', 'type': 'str'}, + 'signed_message': {'key': 'properties.signedMessage', 'type': 'str'}, + 'authorization_message': {'key': 'properties.authorizationMessage', 'type': 'str'}, + 'custom_ip_prefix_parent': {'key': 'properties.customIpPrefixParent', 'type': 'SubResource'}, + 'child_custom_ip_prefixes': {'key': 'properties.childCustomIpPrefixes', 'type': '[SubResource]'}, + 'commissioned_state': {'key': 'properties.commissionedState', 'type': 'str'}, + 'public_ip_prefixes': {'key': 'properties.publicIpPrefixes', 'type': '[SubResource]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'failed_reason': {'key': 'properties.failedReason', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + zones: Optional[List[str]] = None, + cidr: Optional[str] = None, + signed_message: Optional[str] = None, + authorization_message: Optional[str] = None, + custom_ip_prefix_parent: Optional["SubResource"] = None, + commissioned_state: Optional[Union[str, "CommissionedState"]] = None, + **kwargs + ): + super(CustomIpPrefix, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.zones = zones + self.cidr = cidr + self.signed_message = signed_message + self.authorization_message = authorization_message + self.custom_ip_prefix_parent = custom_ip_prefix_parent + self.child_custom_ip_prefixes = None + self.commissioned_state = commissioned_state + self.public_ip_prefixes = None + self.resource_guid = None + self.failed_reason = None + self.provisioning_state = None + + +class CustomIpPrefixListResult(msrest.serialization.Model): + """Response for ListCustomIpPrefixes API service call. + + :param value: A list of Custom IP prefixes that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[CustomIpPrefix]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["CustomIpPrefix"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(CustomIpPrefixListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class DdosCustomPolicy(Resource): + """A DDoS custom policy in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar resource_guid: The resource GUID property of the DDoS custom policy resource. It uniquely + identifies the resource, even if the user changes its name or migrate the resource across + subscriptions or resource groups. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the DDoS custom policy resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar public_ip_addresses: The list of public IPs associated with the DDoS custom policy + resource. This list is read-only. + :vartype public_ip_addresses: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param protocol_custom_settings: The protocol-specific DDoS policy customization parameters. + :type protocol_custom_settings: + list[~azure.mgmt.network.v2021_05_01.models.ProtocolCustomSettingsFormat] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[SubResource]'}, + 'protocol_custom_settings': {'key': 'properties.protocolCustomSettings', 'type': '[ProtocolCustomSettingsFormat]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + protocol_custom_settings: Optional[List["ProtocolCustomSettingsFormat"]] = None, + **kwargs + ): + super(DdosCustomPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.resource_guid = None + self.provisioning_state = None + self.public_ip_addresses = None + self.protocol_custom_settings = protocol_custom_settings + + +class DdosProtectionPlan(msrest.serialization.Model): + """A DDoS protection plan in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar resource_guid: The resource GUID property of the DDoS protection plan resource. It + uniquely identifies the resource, even if the user changes its name or migrate the resource + across subscriptions or resource groups. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the DDoS protection plan resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar virtual_networks: The list of virtual networks associated with the DDoS protection plan + resource. This list is read-only. + :vartype virtual_networks: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'virtual_networks': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(DdosProtectionPlan, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = location + self.tags = tags + self.etag = None + self.resource_guid = None + self.provisioning_state = None + self.virtual_networks = None + + +class DdosProtectionPlanListResult(msrest.serialization.Model): + """A list of DDoS protection plans. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of DDoS protection plans. + :type value: list[~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DdosProtectionPlan]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["DdosProtectionPlan"]] = None, + **kwargs + ): + super(DdosProtectionPlanListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class DdosSettings(msrest.serialization.Model): + """Contains the DDoS protection settings of the public IP. + + :param ddos_custom_policy: The DDoS custom policy associated with the public IP. + :type ddos_custom_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param protection_coverage: The DDoS protection policy customizability of the public IP. Only + standard coverage will have the ability to be customized. Possible values include: "Basic", + "Standard". + :type protection_coverage: str or + ~azure.mgmt.network.v2021_05_01.models.DdosSettingsProtectionCoverage + :param protected_ip: Enables DDoS protection on the public IP. + :type protected_ip: bool + """ + + _attribute_map = { + 'ddos_custom_policy': {'key': 'ddosCustomPolicy', 'type': 'SubResource'}, + 'protection_coverage': {'key': 'protectionCoverage', 'type': 'str'}, + 'protected_ip': {'key': 'protectedIP', 'type': 'bool'}, + } + + def __init__( + self, + *, + ddos_custom_policy: Optional["SubResource"] = None, + protection_coverage: Optional[Union[str, "DdosSettingsProtectionCoverage"]] = None, + protected_ip: Optional[bool] = None, + **kwargs + ): + super(DdosSettings, self).__init__(**kwargs) + self.ddos_custom_policy = ddos_custom_policy + self.protection_coverage = protection_coverage + self.protected_ip = protected_ip + + +class Delegation(SubResource): + """Details the service to which the subnet is delegated. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a subnet. This name can be used to + access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: Resource type. + :type type: str + :param service_name: The name of the service to whom the subnet should be delegated (e.g. + Microsoft.Sql/servers). + :type service_name: str + :ivar actions: The actions permitted to the service upon delegation. + :vartype actions: list[str] + :ivar provisioning_state: The provisioning state of the service delegation resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'actions': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'service_name': {'key': 'properties.serviceName', 'type': 'str'}, + 'actions': {'key': 'properties.actions', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + service_name: Optional[str] = None, + **kwargs + ): + super(Delegation, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.service_name = service_name + self.actions = None + self.provisioning_state = None + + +class DeviceProperties(msrest.serialization.Model): + """List of properties of the device. + + :param device_vendor: Name of the device Vendor. + :type device_vendor: str + :param device_model: Model of the device. + :type device_model: str + :param link_speed_in_mbps: Link speed. + :type link_speed_in_mbps: int + """ + + _attribute_map = { + 'device_vendor': {'key': 'deviceVendor', 'type': 'str'}, + 'device_model': {'key': 'deviceModel', 'type': 'str'}, + 'link_speed_in_mbps': {'key': 'linkSpeedInMbps', 'type': 'int'}, + } + + def __init__( + self, + *, + device_vendor: Optional[str] = None, + device_model: Optional[str] = None, + link_speed_in_mbps: Optional[int] = None, + **kwargs + ): + super(DeviceProperties, self).__init__(**kwargs) + self.device_vendor = device_vendor + self.device_model = device_model + self.link_speed_in_mbps = link_speed_in_mbps + + +class DhcpOptions(msrest.serialization.Model): + """DhcpOptions contains an array of DNS servers available to VMs deployed in the virtual network. Standard DHCP option for a subnet overrides VNET DHCP options. + + :param dns_servers: The list of DNS servers IP addresses. + :type dns_servers: list[str] + """ + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + } + + def __init__( + self, + *, + dns_servers: Optional[List[str]] = None, + **kwargs + ): + super(DhcpOptions, self).__init__(**kwargs) + self.dns_servers = dns_servers + + +class Dimension(msrest.serialization.Model): + """Dimension of the metric. + + :param name: The name of the dimension. + :type name: str + :param display_name: The display name of the dimension. + :type display_name: str + :param internal_name: The internal name of the dimension. + :type internal_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + internal_name: Optional[str] = None, + **kwargs + ): + super(Dimension, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.internal_name = internal_name + + +class DnsNameAvailabilityResult(msrest.serialization.Model): + """Response for the CheckDnsNameAvailability API service call. + + :param available: Domain availability (True/False). + :type available: bool + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + } + + def __init__( + self, + *, + available: Optional[bool] = None, + **kwargs + ): + super(DnsNameAvailabilityResult, self).__init__(**kwargs) + self.available = available + + +class DnsSettings(msrest.serialization.Model): + """DNS Proxy Settings in Firewall Policy. + + :param servers: List of Custom DNS Servers. + :type servers: list[str] + :param enable_proxy: Enable DNS Proxy on Firewalls attached to the Firewall Policy. + :type enable_proxy: bool + :param require_proxy_for_network_rules: FQDNs in Network Rules are supported when set to true. + :type require_proxy_for_network_rules: bool + """ + + _attribute_map = { + 'servers': {'key': 'servers', 'type': '[str]'}, + 'enable_proxy': {'key': 'enableProxy', 'type': 'bool'}, + 'require_proxy_for_network_rules': {'key': 'requireProxyForNetworkRules', 'type': 'bool'}, + } + + def __init__( + self, + *, + servers: Optional[List[str]] = None, + enable_proxy: Optional[bool] = None, + require_proxy_for_network_rules: Optional[bool] = None, + **kwargs + ): + super(DnsSettings, self).__init__(**kwargs) + self.servers = servers + self.enable_proxy = enable_proxy + self.require_proxy_for_network_rules = require_proxy_for_network_rules + + +class DscpConfiguration(Resource): + """Differentiated Services Code Point configuration for any given network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param markings: List of markings to be used in the configuration. + :type markings: list[int] + :param source_ip_ranges: Source IP ranges. + :type source_ip_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosIpRange] + :param destination_ip_ranges: Destination IP ranges. + :type destination_ip_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosIpRange] + :param source_port_ranges: Sources port ranges. + :type source_port_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosPortRange] + :param destination_port_ranges: Destination port ranges. + :type destination_port_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosPortRange] + :param protocol: RNM supported protocol types. Possible values include: "DoNotUse", "Icmp", + "Tcp", "Udp", "Gre", "Esp", "Ah", "Vxlan", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ProtocolType + :param qos_definition_collection: QoS object definitions. + :type qos_definition_collection: list[~azure.mgmt.network.v2021_05_01.models.QosDefinition] + :ivar qos_collection_id: Qos Collection ID generated by RNM. + :vartype qos_collection_id: str + :ivar associated_network_interfaces: Associated Network Interfaces to the DSCP Configuration. + :vartype associated_network_interfaces: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar resource_guid: The resource GUID property of the DSCP Configuration resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the DSCP Configuration resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'qos_collection_id': {'readonly': True}, + 'associated_network_interfaces': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'markings': {'key': 'properties.markings', 'type': '[int]'}, + 'source_ip_ranges': {'key': 'properties.sourceIpRanges', 'type': '[QosIpRange]'}, + 'destination_ip_ranges': {'key': 'properties.destinationIpRanges', 'type': '[QosIpRange]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[QosPortRange]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[QosPortRange]'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'qos_definition_collection': {'key': 'properties.qosDefinitionCollection', 'type': '[QosDefinition]'}, + 'qos_collection_id': {'key': 'properties.qosCollectionId', 'type': 'str'}, + 'associated_network_interfaces': {'key': 'properties.associatedNetworkInterfaces', 'type': '[NetworkInterface]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + markings: Optional[List[int]] = None, + source_ip_ranges: Optional[List["QosIpRange"]] = None, + destination_ip_ranges: Optional[List["QosIpRange"]] = None, + source_port_ranges: Optional[List["QosPortRange"]] = None, + destination_port_ranges: Optional[List["QosPortRange"]] = None, + protocol: Optional[Union[str, "ProtocolType"]] = None, + qos_definition_collection: Optional[List["QosDefinition"]] = None, + **kwargs + ): + super(DscpConfiguration, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.markings = markings + self.source_ip_ranges = source_ip_ranges + self.destination_ip_ranges = destination_ip_ranges + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.protocol = protocol + self.qos_definition_collection = qos_definition_collection + self.qos_collection_id = None + self.associated_network_interfaces = None + self.resource_guid = None + self.provisioning_state = None + + +class DscpConfigurationListResult(msrest.serialization.Model): + """Response for the DscpConfigurationList API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of dscp configurations in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.DscpConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DscpConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["DscpConfiguration"]] = None, + **kwargs + ): + super(DscpConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class EffectiveNetworkSecurityGroup(msrest.serialization.Model): + """Effective network security group. + + :param network_security_group: The ID of network security group that is applied. + :type network_security_group: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param association: Associated resources. + :type association: + ~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityGroupAssociation + :param effective_security_rules: A collection of effective security rules. + :type effective_security_rules: + list[~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityRule] + :param tag_map: Mapping of tags to list of IP Addresses included within the tag. + :type tag_map: str + """ + + _attribute_map = { + 'network_security_group': {'key': 'networkSecurityGroup', 'type': 'SubResource'}, + 'association': {'key': 'association', 'type': 'EffectiveNetworkSecurityGroupAssociation'}, + 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, + 'tag_map': {'key': 'tagMap', 'type': 'str'}, + } + + def __init__( + self, + *, + network_security_group: Optional["SubResource"] = None, + association: Optional["EffectiveNetworkSecurityGroupAssociation"] = None, + effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, + tag_map: Optional[str] = None, + **kwargs + ): + super(EffectiveNetworkSecurityGroup, self).__init__(**kwargs) + self.network_security_group = network_security_group + self.association = association + self.effective_security_rules = effective_security_rules + self.tag_map = tag_map + + +class EffectiveNetworkSecurityGroupAssociation(msrest.serialization.Model): + """The effective network security group association. + + :param network_manager: The ID of the Azure network manager if assigned. + :type network_manager: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param subnet: The ID of the subnet if assigned. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param network_interface: The ID of the network interface if assigned. + :type network_interface: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'network_manager': {'key': 'networkManager', 'type': 'SubResource'}, + 'subnet': {'key': 'subnet', 'type': 'SubResource'}, + 'network_interface': {'key': 'networkInterface', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + network_manager: Optional["SubResource"] = None, + subnet: Optional["SubResource"] = None, + network_interface: Optional["SubResource"] = None, + **kwargs + ): + super(EffectiveNetworkSecurityGroupAssociation, self).__init__(**kwargs) + self.network_manager = network_manager + self.subnet = subnet + self.network_interface = network_interface + + +class EffectiveNetworkSecurityGroupListResult(msrest.serialization.Model): + """Response for list effective network security groups API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of effective network security groups. + :type value: list[~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveNetworkSecurityGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveNetworkSecurityGroup"]] = None, + **kwargs + ): + super(EffectiveNetworkSecurityGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class EffectiveNetworkSecurityRule(msrest.serialization.Model): + """Effective network security rules. + + :param name: The name of the security rule specified by the user (if created by the user). + :type name: str + :param protocol: The network protocol this rule applies to. Possible values include: "Tcp", + "Udp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.EffectiveSecurityRuleProtocol + :param source_port_range: The source port or range. + :type source_port_range: str + :param destination_port_range: The destination port or range. + :type destination_port_range: str + :param source_port_ranges: The source port ranges. Expected values include a single integer + between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. Expected values include a single + integer between 0 and 65535, a range using '-' as separator (e.g. 100-400), or an asterisk (*). + :type destination_port_ranges: list[str] + :param source_address_prefix: The source address prefix. + :type source_address_prefix: str + :param destination_address_prefix: The destination address prefix. + :type destination_address_prefix: str + :param source_address_prefixes: The source address prefixes. Expected values include CIDR IP + ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the + asterisk (*). + :type source_address_prefixes: list[str] + :param destination_address_prefixes: The destination address prefixes. Expected values include + CIDR IP ranges, Default Tags (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and + the asterisk (*). + :type destination_address_prefixes: list[str] + :param expanded_source_address_prefix: The expanded source address prefix. + :type expanded_source_address_prefix: list[str] + :param expanded_destination_address_prefix: Expanded destination address prefix. + :type expanded_destination_address_prefix: list[str] + :param access: Whether network traffic is allowed or denied. Possible values include: "Allow", + "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleAccess + :param priority: The priority of the rule. + :type priority: int + :param direction: The direction of the rule. Possible values include: "Inbound", "Outbound". + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleDirection + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_port_range': {'key': 'sourcePortRange', 'type': 'str'}, + 'destination_port_range': {'key': 'destinationPortRange', 'type': 'str'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[str]'}, + 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'destination_address_prefix': {'key': 'destinationAddressPrefix', 'type': 'str'}, + 'source_address_prefixes': {'key': 'sourceAddressPrefixes', 'type': '[str]'}, + 'destination_address_prefixes': {'key': 'destinationAddressPrefixes', 'type': '[str]'}, + 'expanded_source_address_prefix': {'key': 'expandedSourceAddressPrefix', 'type': '[str]'}, + 'expanded_destination_address_prefix': {'key': 'expandedDestinationAddressPrefix', 'type': '[str]'}, + 'access': {'key': 'access', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'direction': {'key': 'direction', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + protocol: Optional[Union[str, "EffectiveSecurityRuleProtocol"]] = None, + source_port_range: Optional[str] = None, + destination_port_range: Optional[str] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + source_address_prefix: Optional[str] = None, + destination_address_prefix: Optional[str] = None, + source_address_prefixes: Optional[List[str]] = None, + destination_address_prefixes: Optional[List[str]] = None, + expanded_source_address_prefix: Optional[List[str]] = None, + expanded_destination_address_prefix: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityRuleDirection"]] = None, + **kwargs + ): + super(EffectiveNetworkSecurityRule, self).__init__(**kwargs) + self.name = name + self.protocol = protocol + self.source_port_range = source_port_range + self.destination_port_range = destination_port_range + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.source_address_prefix = source_address_prefix + self.destination_address_prefix = destination_address_prefix + self.source_address_prefixes = source_address_prefixes + self.destination_address_prefixes = destination_address_prefixes + self.expanded_source_address_prefix = expanded_source_address_prefix + self.expanded_destination_address_prefix = expanded_destination_address_prefix + self.access = access + self.priority = priority + self.direction = direction + + +class EffectiveRoute(msrest.serialization.Model): + """Effective Route. + + :param name: The name of the user defined route. This is optional. + :type name: str + :param disable_bgp_route_propagation: If true, on-premises routes are not propagated to the + network interfaces in the subnet. + :type disable_bgp_route_propagation: bool + :param source: Who created the route. Possible values include: "Unknown", "User", + "VirtualNetworkGateway", "Default". + :type source: str or ~azure.mgmt.network.v2021_05_01.models.EffectiveRouteSource + :param state: The value of effective route. Possible values include: "Active", "Invalid". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.EffectiveRouteState + :param address_prefix: The address prefixes of the effective routes in CIDR notation. + :type address_prefix: list[str] + :param next_hop_ip_address: The IP address of the next hop of the effective route. + :type next_hop_ip_address: list[str] + :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values + include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". + :type next_hop_type: str or ~azure.mgmt.network.v2021_05_01.models.RouteNextHopType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'disable_bgp_route_propagation': {'key': 'disableBgpRoutePropagation', 'type': 'bool'}, + 'source': {'key': 'source', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + 'address_prefix': {'key': 'addressPrefix', 'type': '[str]'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + disable_bgp_route_propagation: Optional[bool] = None, + source: Optional[Union[str, "EffectiveRouteSource"]] = None, + state: Optional[Union[str, "EffectiveRouteState"]] = None, + address_prefix: Optional[List[str]] = None, + next_hop_ip_address: Optional[List[str]] = None, + next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, + **kwargs + ): + super(EffectiveRoute, self).__init__(**kwargs) + self.name = name + self.disable_bgp_route_propagation = disable_bgp_route_propagation + self.source = source + self.state = state + self.address_prefix = address_prefix + self.next_hop_ip_address = next_hop_ip_address + self.next_hop_type = next_hop_type + + +class EffectiveRouteListResult(msrest.serialization.Model): + """Response for list effective route API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of effective routes. + :type value: list[~azure.mgmt.network.v2021_05_01.models.EffectiveRoute] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EffectiveRoute]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EffectiveRoute"]] = None, + **kwargs + ): + super(EffectiveRouteListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class EffectiveRoutesParameters(msrest.serialization.Model): + """The parameters specifying the resource whose effective routes are being requested. + + :param resource_id: The resource whose effective routes are being requested. + :type resource_id: str + :param virtual_wan_resource_type: The type of the specified resource like RouteTable, + ExpressRouteConnection, HubVirtualNetworkConnection, VpnConnection and P2SConnection. + :type virtual_wan_resource_type: str + """ + + _attribute_map = { + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'virtual_wan_resource_type': {'key': 'virtualWanResourceType', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_id: Optional[str] = None, + virtual_wan_resource_type: Optional[str] = None, + **kwargs + ): + super(EffectiveRoutesParameters, self).__init__(**kwargs) + self.resource_id = resource_id + self.virtual_wan_resource_type = virtual_wan_resource_type + + +class EndpointServiceResult(SubResource): + """Endpoint service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Name of the endpoint service. + :vartype name: str + :ivar type: Type of the endpoint service. + :vartype type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(EndpointServiceResult, self).__init__(id=id, **kwargs) + self.name = None + self.type = None + + +class EndpointServicesListResult(msrest.serialization.Model): + """Response for the ListAvailableEndpointServices API service call. + + :param value: List of available endpoint services in a region. + :type value: list[~azure.mgmt.network.v2021_05_01.models.EndpointServiceResult] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[EndpointServiceResult]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["EndpointServiceResult"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(EndpointServicesListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class Error(msrest.serialization.Model): + """Common error representation. + + :param code: Error code. + :type code: str + :param message: Error message. + :type message: str + :param target: Error target. + :type target: str + :param details: Error details. + :type details: list[~azure.mgmt.network.v2021_05_01.models.ErrorDetails] + :param inner_error: Inner error message. + :type inner_error: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetails]'}, + 'inner_error': {'key': 'innerError', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + target: Optional[str] = None, + details: Optional[List["ErrorDetails"]] = None, + inner_error: Optional[str] = None, + **kwargs + ): + super(Error, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.details = details + self.inner_error = inner_error + + +class ErrorDetails(msrest.serialization.Model): + """Common error details representation. + + :param code: Error code. + :type code: str + :param target: Error target. + :type target: str + :param message: Error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + target: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(ErrorDetails, self).__init__(**kwargs) + self.code = code + self.target = target + self.message = message + + +class ErrorResponse(msrest.serialization.Model): + """The error object. + + :param error: The error details object. + :type error: ~azure.mgmt.network.v2021_05_01.models.ErrorDetails + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetails'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetails"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class EvaluatedNetworkSecurityGroup(msrest.serialization.Model): + """Results of network security group evaluation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param network_security_group_id: Network security group ID. + :type network_security_group_id: str + :param applied_to: Resource ID of nic or subnet to which network security group is applied. + :type applied_to: str + :param matched_rule: Matched network security rule. + :type matched_rule: ~azure.mgmt.network.v2021_05_01.models.MatchedRule + :ivar rules_evaluation_result: List of network security rules evaluation results. + :vartype rules_evaluation_result: + list[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityRulesEvaluationResult] + """ + + _validation = { + 'rules_evaluation_result': {'readonly': True}, + } + + _attribute_map = { + 'network_security_group_id': {'key': 'networkSecurityGroupId', 'type': 'str'}, + 'applied_to': {'key': 'appliedTo', 'type': 'str'}, + 'matched_rule': {'key': 'matchedRule', 'type': 'MatchedRule'}, + 'rules_evaluation_result': {'key': 'rulesEvaluationResult', 'type': '[NetworkSecurityRulesEvaluationResult]'}, + } + + def __init__( + self, + *, + network_security_group_id: Optional[str] = None, + applied_to: Optional[str] = None, + matched_rule: Optional["MatchedRule"] = None, + **kwargs + ): + super(EvaluatedNetworkSecurityGroup, self).__init__(**kwargs) + self.network_security_group_id = network_security_group_id + self.applied_to = applied_to + self.matched_rule = matched_rule + self.rules_evaluation_result = None + + +class ExclusionManagedRule(msrest.serialization.Model): + """Defines a managed rule to use for exclusion. + + All required parameters must be populated in order to send to Azure. + + :param rule_id: Required. Identifier for the managed rule. + :type rule_id: str + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + } + + def __init__( + self, + *, + rule_id: str, + **kwargs + ): + super(ExclusionManagedRule, self).__init__(**kwargs) + self.rule_id = rule_id + + +class ExclusionManagedRuleGroup(msrest.serialization.Model): + """Defines a managed rule group to use for exclusion. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. The managed rule group for exclusion. + :type rule_group_name: str + :param rules: List of rules that will be excluded. If none specified, all rules in the group + will be excluded. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.ExclusionManagedRule] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ExclusionManagedRule]'}, + } + + def __init__( + self, + *, + rule_group_name: str, + rules: Optional[List["ExclusionManagedRule"]] = None, + **kwargs + ): + super(ExclusionManagedRuleGroup, self).__init__(**kwargs) + self.rule_group_name = rule_group_name + self.rules = rules + + +class ExclusionManagedRuleSet(msrest.serialization.Model): + """Defines a managed rule set for Exclusions. + + All required parameters must be populated in order to send to Azure. + + :param rule_set_type: Required. Defines the rule set type to use. + :type rule_set_type: str + :param rule_set_version: Required. Defines the version of the rule set to use. + :type rule_set_version: str + :param rule_groups: Defines the rule groups to apply to the rule set. + :type rule_groups: list[~azure.mgmt.network.v2021_05_01.models.ExclusionManagedRuleGroup] + """ + + _validation = { + 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, + } + + _attribute_map = { + 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_groups': {'key': 'ruleGroups', 'type': '[ExclusionManagedRuleGroup]'}, + } + + def __init__( + self, + *, + rule_set_type: str, + rule_set_version: str, + rule_groups: Optional[List["ExclusionManagedRuleGroup"]] = None, + **kwargs + ): + super(ExclusionManagedRuleSet, self).__init__(**kwargs) + self.rule_set_type = rule_set_type + self.rule_set_version = rule_set_version + self.rule_groups = rule_groups + + +class ExplicitProxySettings(msrest.serialization.Model): + """Explicit Proxy Settings in Firewall Policy. + + :param enable_explicit_proxy: When set to true, explicit proxy mode is enabled. + :type enable_explicit_proxy: bool + :param http_port: Port number for explicit proxy http protocol, cannot be greater than 64000. + :type http_port: int + :param https_port: Port number for explicit proxy https protocol, cannot be greater than 64000. + :type https_port: int + :param pac_file_port: Port number for firewall to serve PAC file. + :type pac_file_port: int + :param pac_file: SAS URL for PAC file. + :type pac_file: str + """ + + _validation = { + 'http_port': {'maximum': 64000, 'minimum': 0}, + 'https_port': {'maximum': 64000, 'minimum': 0}, + 'pac_file_port': {'maximum': 64000, 'minimum': 0}, + } + + _attribute_map = { + 'enable_explicit_proxy': {'key': 'enableExplicitProxy', 'type': 'bool'}, + 'http_port': {'key': 'httpPort', 'type': 'int'}, + 'https_port': {'key': 'httpsPort', 'type': 'int'}, + 'pac_file_port': {'key': 'pacFilePort', 'type': 'int'}, + 'pac_file': {'key': 'pacFile', 'type': 'str'}, + } + + def __init__( + self, + *, + enable_explicit_proxy: Optional[bool] = None, + http_port: Optional[int] = None, + https_port: Optional[int] = None, + pac_file_port: Optional[int] = None, + pac_file: Optional[str] = None, + **kwargs + ): + super(ExplicitProxySettings, self).__init__(**kwargs) + self.enable_explicit_proxy = enable_explicit_proxy + self.http_port = http_port + self.https_port = https_port + self.pac_file_port = pac_file_port + self.pac_file = pac_file + + +class ExpressRouteCircuit(Resource): + """ExpressRouteCircuit resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param allow_classic_operations: Allow classic operations. + :type allow_classic_operations: bool + :param circuit_provisioning_state: The CircuitProvisioningState state of the resource. + :type circuit_provisioning_state: str + :param service_provider_provisioning_state: The ServiceProviderProvisioningState state of the + resource. Possible values include: "NotProvisioned", "Provisioning", "Provisioned", + "Deprovisioning". + :type service_provider_provisioning_state: str or + ~azure.mgmt.network.v2021_05_01.models.ServiceProviderProvisioningState + :param authorizations: The list of authorizations. + :type authorizations: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization] + :param peerings: The list of peerings. + :type peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :param service_key: The ServiceKey. + :type service_key: str + :param service_provider_notes: The ServiceProviderNotes. + :type service_provider_notes: str + :param service_provider_properties: The ServiceProviderProperties. + :type service_provider_properties: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitServiceProviderProperties + :param express_route_port: The reference to the ExpressRoutePort resource when the circuit is + provisioned on an ExpressRoutePort resource. + :type express_route_port: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param bandwidth_in_gbps: The bandwidth of the circuit when the circuit is provisioned on an + ExpressRoutePort resource. + :type bandwidth_in_gbps: float + :ivar stag: The identifier of the circuit traffic. Outer tag for QinQ encapsulation. + :vartype stag: int + :ivar provisioning_state: The provisioning state of the express route circuit resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param gateway_manager_etag: The GatewayManager Etag. + :type gateway_manager_etag: str + :param global_reach_enabled: Flag denoting global reach status. + :type global_reach_enabled: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'stag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'ExpressRouteCircuitSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'allow_classic_operations': {'key': 'properties.allowClassicOperations', 'type': 'bool'}, + 'circuit_provisioning_state': {'key': 'properties.circuitProvisioningState', 'type': 'str'}, + 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, + 'authorizations': {'key': 'properties.authorizations', 'type': '[ExpressRouteCircuitAuthorization]'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'service_key': {'key': 'properties.serviceKey', 'type': 'str'}, + 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, + 'service_provider_properties': {'key': 'properties.serviceProviderProperties', 'type': 'ExpressRouteCircuitServiceProviderProperties'}, + 'express_route_port': {'key': 'properties.expressRoutePort', 'type': 'SubResource'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'float'}, + 'stag': {'key': 'properties.stag', 'type': 'int'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, + 'global_reach_enabled': {'key': 'properties.globalReachEnabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["ExpressRouteCircuitSku"] = None, + allow_classic_operations: Optional[bool] = None, + circuit_provisioning_state: Optional[str] = None, + service_provider_provisioning_state: Optional[Union[str, "ServiceProviderProvisioningState"]] = None, + authorizations: Optional[List["ExpressRouteCircuitAuthorization"]] = None, + peerings: Optional[List["ExpressRouteCircuitPeering"]] = None, + service_key: Optional[str] = None, + service_provider_notes: Optional[str] = None, + service_provider_properties: Optional["ExpressRouteCircuitServiceProviderProperties"] = None, + express_route_port: Optional["SubResource"] = None, + bandwidth_in_gbps: Optional[float] = None, + gateway_manager_etag: Optional[str] = None, + global_reach_enabled: Optional[bool] = None, + **kwargs + ): + super(ExpressRouteCircuit, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.sku = sku + self.etag = None + self.allow_classic_operations = allow_classic_operations + self.circuit_provisioning_state = circuit_provisioning_state + self.service_provider_provisioning_state = service_provider_provisioning_state + self.authorizations = authorizations + self.peerings = peerings + self.service_key = service_key + self.service_provider_notes = service_provider_notes + self.service_provider_properties = service_provider_properties + self.express_route_port = express_route_port + self.bandwidth_in_gbps = bandwidth_in_gbps + self.stag = None + self.provisioning_state = None + self.gateway_manager_etag = gateway_manager_etag + self.global_reach_enabled = global_reach_enabled + + +class ExpressRouteCircuitArpTable(msrest.serialization.Model): + """The ARP table associated with the ExpressRouteCircuit. + + :param age: Entry age in minutes. + :type age: int + :param interface: Interface address. + :type interface: str + :param ip_address: The IP address. + :type ip_address: str + :param mac_address: The MAC address. + :type mac_address: str + """ + + _attribute_map = { + 'age': {'key': 'age', 'type': 'int'}, + 'interface': {'key': 'interface', 'type': 'str'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + 'mac_address': {'key': 'macAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + age: Optional[int] = None, + interface: Optional[str] = None, + ip_address: Optional[str] = None, + mac_address: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitArpTable, self).__init__(**kwargs) + self.age = age + self.interface = interface + self.ip_address = ip_address + self.mac_address = mac_address + + +class ExpressRouteCircuitAuthorization(SubResource): + """Authorization in an ExpressRouteCircuit resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param authorization_key: The authorization key. + :type authorization_key: str + :param authorization_use_status: The authorization use status. Possible values include: + "Available", "InUse". + :type authorization_use_status: str or + ~azure.mgmt.network.v2021_05_01.models.AuthorizationUseStatus + :ivar provisioning_state: The provisioning state of the authorization resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'authorization_use_status': {'key': 'properties.authorizationUseStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + authorization_key: Optional[str] = None, + authorization_use_status: Optional[Union[str, "AuthorizationUseStatus"]] = None, + **kwargs + ): + super(ExpressRouteCircuitAuthorization, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.authorization_key = authorization_key + self.authorization_use_status = authorization_use_status + self.provisioning_state = None + + +class ExpressRouteCircuitConnection(SubResource): + """Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the circuit initiating connection. + :type express_route_circuit_peering: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param peer_express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the peered circuit. + :type peer_express_route_circuit_peering: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param address_prefix: /29 IP address space to carve out Customer addresses for tunnels. + :type address_prefix: str + :param authorization_key: The authorization key. + :type authorization_key: str + :param ipv6_circuit_connection_config: IPv6 Address PrefixProperties of the express route + circuit connection. + :type ipv6_circuit_connection_config: + ~azure.mgmt.network.v2021_05_01.models.Ipv6CircuitConnectionConfig + :ivar circuit_connection_status: Express Route Circuit connection state. Possible values + include: "Connected", "Connecting", "Disconnected". + :vartype circuit_connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.CircuitConnectionStatus + :ivar provisioning_state: The provisioning state of the express route circuit connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'circuit_connection_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'express_route_circuit_peering': {'key': 'properties.expressRouteCircuitPeering', 'type': 'SubResource'}, + 'peer_express_route_circuit_peering': {'key': 'properties.peerExpressRouteCircuitPeering', 'type': 'SubResource'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'ipv6_circuit_connection_config': {'key': 'properties.ipv6CircuitConnectionConfig', 'type': 'Ipv6CircuitConnectionConfig'}, + 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + express_route_circuit_peering: Optional["SubResource"] = None, + peer_express_route_circuit_peering: Optional["SubResource"] = None, + address_prefix: Optional[str] = None, + authorization_key: Optional[str] = None, + ipv6_circuit_connection_config: Optional["Ipv6CircuitConnectionConfig"] = None, + **kwargs + ): + super(ExpressRouteCircuitConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.express_route_circuit_peering = express_route_circuit_peering + self.peer_express_route_circuit_peering = peer_express_route_circuit_peering + self.address_prefix = address_prefix + self.authorization_key = authorization_key + self.ipv6_circuit_connection_config = ipv6_circuit_connection_config + self.circuit_connection_status = None + self.provisioning_state = None + + +class ExpressRouteCircuitConnectionListResult(msrest.serialization.Model): + """Response for ListConnections API service call retrieves all global reach connections that belongs to a Private Peering for an ExpressRouteCircuit. + + :param value: The global reach connection associated with Private Peering in an ExpressRoute + Circuit. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitListResult(msrest.serialization.Model): + """Response for ListExpressRouteCircuit API service call. + + :param value: A list of ExpressRouteCircuits in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuit]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuit"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitPeering(SubResource): + """Peering in an ExpressRouteCircuit resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param peering_type: The peering type. Possible values include: "AzurePublicPeering", + "AzurePrivatePeering", "MicrosoftPeering". + :type peering_type: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePeeringType + :param state: The peering state. Possible values include: "Disabled", "Enabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePeeringState + :param azure_asn: The Azure ASN. + :type azure_asn: int + :param peer_asn: The peer ASN. + :type peer_asn: long + :param primary_peer_address_prefix: The primary address prefix. + :type primary_peer_address_prefix: str + :param secondary_peer_address_prefix: The secondary address prefix. + :type secondary_peer_address_prefix: str + :param primary_azure_port: The primary port. + :type primary_azure_port: str + :param secondary_azure_port: The secondary port. + :type secondary_azure_port: str + :param shared_key: The shared key. + :type shared_key: str + :param vlan_id: The VLAN ID. + :type vlan_id: int + :param microsoft_peering_config: The Microsoft peering configuration. + :type microsoft_peering_config: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringConfig + :param stats: The peering stats of express route circuit. + :type stats: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitStats + :ivar provisioning_state: The provisioning state of the express route circuit peering resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param gateway_manager_etag: The GatewayManager Etag. + :type gateway_manager_etag: str + :ivar last_modified_by: Who was the last to modify the peering. + :vartype last_modified_by: str + :param route_filter: The reference to the RouteFilter resource. + :type route_filter: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param ipv6_peering_config: The IPv6 peering configuration. + :type ipv6_peering_config: + ~azure.mgmt.network.v2021_05_01.models.Ipv6ExpressRouteCircuitPeeringConfig + :param express_route_connection: The ExpressRoute connection. + :type express_route_connection: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnectionId + :param connections: The list of circuit connections associated with Azure Private Peering for + this circuit. + :type connections: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection] + :ivar peered_connections: The list of peered circuit connections associated with Azure Private + Peering for this circuit. + :vartype peered_connections: + list[~azure.mgmt.network.v2021_05_01.models.PeerExpressRouteCircuitConnection] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 1}, + 'provisioning_state': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + 'peered_connections': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, + 'peer_asn': {'key': 'properties.peerASN', 'type': 'long'}, + 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, + 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, + 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, + 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, + 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, + 'stats': {'key': 'properties.stats', 'type': 'ExpressRouteCircuitStats'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'route_filter': {'key': 'properties.routeFilter', 'type': 'SubResource'}, + 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, + 'express_route_connection': {'key': 'properties.expressRouteConnection', 'type': 'ExpressRouteConnectionId'}, + 'connections': {'key': 'properties.connections', 'type': '[ExpressRouteCircuitConnection]'}, + 'peered_connections': {'key': 'properties.peeredConnections', 'type': '[PeerExpressRouteCircuitConnection]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + peering_type: Optional[Union[str, "ExpressRoutePeeringType"]] = None, + state: Optional[Union[str, "ExpressRoutePeeringState"]] = None, + azure_asn: Optional[int] = None, + peer_asn: Optional[int] = None, + primary_peer_address_prefix: Optional[str] = None, + secondary_peer_address_prefix: Optional[str] = None, + primary_azure_port: Optional[str] = None, + secondary_azure_port: Optional[str] = None, + shared_key: Optional[str] = None, + vlan_id: Optional[int] = None, + microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, + stats: Optional["ExpressRouteCircuitStats"] = None, + gateway_manager_etag: Optional[str] = None, + route_filter: Optional["SubResource"] = None, + ipv6_peering_config: Optional["Ipv6ExpressRouteCircuitPeeringConfig"] = None, + express_route_connection: Optional["ExpressRouteConnectionId"] = None, + connections: Optional[List["ExpressRouteCircuitConnection"]] = None, + **kwargs + ): + super(ExpressRouteCircuitPeering, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.peering_type = peering_type + self.state = state + self.azure_asn = azure_asn + self.peer_asn = peer_asn + self.primary_peer_address_prefix = primary_peer_address_prefix + self.secondary_peer_address_prefix = secondary_peer_address_prefix + self.primary_azure_port = primary_azure_port + self.secondary_azure_port = secondary_azure_port + self.shared_key = shared_key + self.vlan_id = vlan_id + self.microsoft_peering_config = microsoft_peering_config + self.stats = stats + self.provisioning_state = None + self.gateway_manager_etag = gateway_manager_etag + self.last_modified_by = None + self.route_filter = route_filter + self.ipv6_peering_config = ipv6_peering_config + self.express_route_connection = express_route_connection + self.connections = connections + self.peered_connections = None + + +class ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): + """Specifies the peering configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param advertised_public_prefixes: The reference to AdvertisedPublicPrefixes. + :type advertised_public_prefixes: list[str] + :param advertised_communities: The communities of bgp peering. Specified for microsoft peering. + :type advertised_communities: list[str] + :ivar advertised_public_prefixes_state: The advertised public prefix state of the Peering + resource. Possible values include: "NotConfigured", "Configuring", "Configured", + "ValidationNeeded". + :vartype advertised_public_prefixes_state: str or + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringAdvertisedPublicPrefixState + :param legacy_mode: The legacy mode of the peering. + :type legacy_mode: int + :param customer_asn: The CustomerASN of the peering. + :type customer_asn: int + :param routing_registry_name: The RoutingRegistryName of the configuration. + :type routing_registry_name: str + """ + + _validation = { + 'advertised_public_prefixes_state': {'readonly': True}, + } + + _attribute_map = { + 'advertised_public_prefixes': {'key': 'advertisedPublicPrefixes', 'type': '[str]'}, + 'advertised_communities': {'key': 'advertisedCommunities', 'type': '[str]'}, + 'advertised_public_prefixes_state': {'key': 'advertisedPublicPrefixesState', 'type': 'str'}, + 'legacy_mode': {'key': 'legacyMode', 'type': 'int'}, + 'customer_asn': {'key': 'customerASN', 'type': 'int'}, + 'routing_registry_name': {'key': 'routingRegistryName', 'type': 'str'}, + } + + def __init__( + self, + *, + advertised_public_prefixes: Optional[List[str]] = None, + advertised_communities: Optional[List[str]] = None, + legacy_mode: Optional[int] = None, + customer_asn: Optional[int] = None, + routing_registry_name: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) + self.advertised_public_prefixes = advertised_public_prefixes + self.advertised_communities = advertised_communities + self.advertised_public_prefixes_state = None + self.legacy_mode = legacy_mode + self.customer_asn = customer_asn + self.routing_registry_name = routing_registry_name + + +class ExpressRouteCircuitPeeringId(msrest.serialization.Model): + """ExpressRoute circuit peering identifier. + + :param id: The ID of the ExpressRoute circuit peering. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitPeeringId, self).__init__(**kwargs) + self.id = id + + +class ExpressRouteCircuitPeeringListResult(msrest.serialization.Model): + """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCircuit. + + :param value: The peerings in an express route circuit. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitPeering"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitPeeringListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitReference(msrest.serialization.Model): + """Reference to an express route circuit. + + :param id: Corresponding Express Route Circuit Id. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitReference, self).__init__(**kwargs) + self.id = id + + +class ExpressRouteCircuitRoutesTable(msrest.serialization.Model): + """The routes table associated with the ExpressRouteCircuit. + + :param network: IP address of a network entity. + :type network: str + :param next_hop: NextHop address. + :type next_hop: str + :param loc_prf: Local preference value as set with the set local-preference route-map + configuration command. + :type loc_prf: str + :param weight: Route Weight. + :type weight: int + :param path: Autonomous system paths to the destination network. + :type path: str + """ + + _attribute_map = { + 'network': {'key': 'network', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + 'loc_prf': {'key': 'locPrf', 'type': 'str'}, + 'weight': {'key': 'weight', 'type': 'int'}, + 'path': {'key': 'path', 'type': 'str'}, + } + + def __init__( + self, + *, + network: Optional[str] = None, + next_hop: Optional[str] = None, + loc_prf: Optional[str] = None, + weight: Optional[int] = None, + path: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitRoutesTable, self).__init__(**kwargs) + self.network = network + self.next_hop = next_hop + self.loc_prf = loc_prf + self.weight = weight + self.path = path + + +class ExpressRouteCircuitRoutesTableSummary(msrest.serialization.Model): + """The routes table associated with the ExpressRouteCircuit. + + :param neighbor: IP address of the neighbor. + :type neighbor: str + :param v: BGP version number spoken to the neighbor. + :type v: int + :param as_property: Autonomous system number. + :type as_property: int + :param up_down: The length of time that the BGP session has been in the Established state, or + the current status if not in the Established state. + :type up_down: str + :param state_pfx_rcd: Current state of the BGP session, and the number of prefixes that have + been received from a neighbor or peer group. + :type state_pfx_rcd: str + """ + + _attribute_map = { + 'neighbor': {'key': 'neighbor', 'type': 'str'}, + 'v': {'key': 'v', 'type': 'int'}, + 'as_property': {'key': 'as', 'type': 'int'}, + 'up_down': {'key': 'upDown', 'type': 'str'}, + 'state_pfx_rcd': {'key': 'statePfxRcd', 'type': 'str'}, + } + + def __init__( + self, + *, + neighbor: Optional[str] = None, + v: Optional[int] = None, + as_property: Optional[int] = None, + up_down: Optional[str] = None, + state_pfx_rcd: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitRoutesTableSummary, self).__init__(**kwargs) + self.neighbor = neighbor + self.v = v + self.as_property = as_property + self.up_down = up_down + self.state_pfx_rcd = state_pfx_rcd + + +class ExpressRouteCircuitsArpTableListResult(msrest.serialization.Model): + """Response for ListArpTable associated with the Express Route Circuits API. + + :param value: A list of the ARP tables. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitArpTable] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitArpTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitArpTable"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitsArpTableListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitServiceProviderProperties(msrest.serialization.Model): + """Contains ServiceProviderProperties in an ExpressRouteCircuit. + + :param service_provider_name: The serviceProviderName. + :type service_provider_name: str + :param peering_location: The peering location. + :type peering_location: str + :param bandwidth_in_mbps: The BandwidthInMbps. + :type bandwidth_in_mbps: int + """ + + _attribute_map = { + 'service_provider_name': {'key': 'serviceProviderName', 'type': 'str'}, + 'peering_location': {'key': 'peeringLocation', 'type': 'str'}, + 'bandwidth_in_mbps': {'key': 'bandwidthInMbps', 'type': 'int'}, + } + + def __init__( + self, + *, + service_provider_name: Optional[str] = None, + peering_location: Optional[str] = None, + bandwidth_in_mbps: Optional[int] = None, + **kwargs + ): + super(ExpressRouteCircuitServiceProviderProperties, self).__init__(**kwargs) + self.service_provider_name = service_provider_name + self.peering_location = peering_location + self.bandwidth_in_mbps = bandwidth_in_mbps + + +class ExpressRouteCircuitSku(msrest.serialization.Model): + """Contains SKU in an ExpressRouteCircuit. + + :param name: The name of the SKU. + :type name: str + :param tier: The tier of the SKU. Possible values include: "Standard", "Premium", "Basic", + "Local". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitSkuTier + :param family: The family of the SKU. Possible values include: "UnlimitedData", "MeteredData". + :type family: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitSkuFamily + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'family': {'key': 'family', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + tier: Optional[Union[str, "ExpressRouteCircuitSkuTier"]] = None, + family: Optional[Union[str, "ExpressRouteCircuitSkuFamily"]] = None, + **kwargs + ): + super(ExpressRouteCircuitSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.family = family + + +class ExpressRouteCircuitsRoutesTableListResult(msrest.serialization.Model): + """Response for ListRoutesTable associated with the Express Route Circuits API. + + :param value: The list of routes table. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitRoutesTable] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitRoutesTable"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitsRoutesTableListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitsRoutesTableSummaryListResult(msrest.serialization.Model): + """Response for ListRoutesTable associated with the Express Route Circuits API. + + :param value: A list of the routes table. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitRoutesTableSummary] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCircuitRoutesTableSummary]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCircuitRoutesTableSummary"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCircuitsRoutesTableSummaryListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteCircuitStats(msrest.serialization.Model): + """Contains stats associated with the peering. + + :param primarybytes_in: The Primary BytesIn of the peering. + :type primarybytes_in: long + :param primarybytes_out: The primary BytesOut of the peering. + :type primarybytes_out: long + :param secondarybytes_in: The secondary BytesIn of the peering. + :type secondarybytes_in: long + :param secondarybytes_out: The secondary BytesOut of the peering. + :type secondarybytes_out: long + """ + + _attribute_map = { + 'primarybytes_in': {'key': 'primarybytesIn', 'type': 'long'}, + 'primarybytes_out': {'key': 'primarybytesOut', 'type': 'long'}, + 'secondarybytes_in': {'key': 'secondarybytesIn', 'type': 'long'}, + 'secondarybytes_out': {'key': 'secondarybytesOut', 'type': 'long'}, + } + + def __init__( + self, + *, + primarybytes_in: Optional[int] = None, + primarybytes_out: Optional[int] = None, + secondarybytes_in: Optional[int] = None, + secondarybytes_out: Optional[int] = None, + **kwargs + ): + super(ExpressRouteCircuitStats, self).__init__(**kwargs) + self.primarybytes_in = primarybytes_in + self.primarybytes_out = primarybytes_out + self.secondarybytes_in = secondarybytes_in + self.secondarybytes_out = secondarybytes_out + + +class ExpressRouteConnection(SubResource): + """ExpressRouteConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param id: Resource ID. + :type id: str + :param name: Required. The name of the resource. + :type name: str + :ivar provisioning_state: The provisioning state of the express route connection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param express_route_circuit_peering: The ExpressRoute circuit peering. + :type express_route_circuit_peering: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringId + :param authorization_key: Authorization key to establish the connection. + :type authorization_key: str + :param routing_weight: The routing weight associated to the connection. + :type routing_weight: int + :param enable_internet_security: Enable internet security. + :type enable_internet_security: bool + :param express_route_gateway_bypass: Enable FastPath to vWan Firewall hub. + :type express_route_gateway_bypass: bool + :param routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :type routing_configuration: ~azure.mgmt.network.v2021_05_01.models.RoutingConfiguration + """ + + _validation = { + 'name': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_circuit_peering': {'key': 'properties.expressRouteCircuitPeering', 'type': 'ExpressRouteCircuitPeeringId'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + } + + def __init__( + self, + *, + name: str, + id: Optional[str] = None, + express_route_circuit_peering: Optional["ExpressRouteCircuitPeeringId"] = None, + authorization_key: Optional[str] = None, + routing_weight: Optional[int] = None, + enable_internet_security: Optional[bool] = None, + express_route_gateway_bypass: Optional[bool] = None, + routing_configuration: Optional["RoutingConfiguration"] = None, + **kwargs + ): + super(ExpressRouteConnection, self).__init__(id=id, **kwargs) + self.name = name + self.provisioning_state = None + self.express_route_circuit_peering = express_route_circuit_peering + self.authorization_key = authorization_key + self.routing_weight = routing_weight + self.enable_internet_security = enable_internet_security + self.express_route_gateway_bypass = express_route_gateway_bypass + self.routing_configuration = routing_configuration + + +class ExpressRouteConnectionId(msrest.serialization.Model): + """The ID of the ExpressRouteConnection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ID of the ExpressRouteConnection. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRouteConnectionId, self).__init__(**kwargs) + self.id = None + + +class ExpressRouteConnectionList(msrest.serialization.Model): + """ExpressRouteConnection list. + + :param value: The list of ExpressRoute connections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteConnection"]] = None, + **kwargs + ): + super(ExpressRouteConnectionList, self).__init__(**kwargs) + self.value = value + + +class ExpressRouteCrossConnection(Resource): + """ExpressRouteCrossConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar primary_azure_port: The name of the primary port. + :vartype primary_azure_port: str + :ivar secondary_azure_port: The name of the secondary port. + :vartype secondary_azure_port: str + :ivar s_tag: The identifier of the circuit traffic. + :vartype s_tag: int + :ivar peering_location: The peering location of the ExpressRoute circuit. + :vartype peering_location: str + :ivar bandwidth_in_mbps: The circuit bandwidth In Mbps. + :vartype bandwidth_in_mbps: int + :param express_route_circuit: The ExpressRouteCircuit. + :type express_route_circuit: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitReference + :param service_provider_provisioning_state: The provisioning state of the circuit in the + connectivity provider system. Possible values include: "NotProvisioned", "Provisioning", + "Provisioned", "Deprovisioning". + :type service_provider_provisioning_state: str or + ~azure.mgmt.network.v2021_05_01.models.ServiceProviderProvisioningState + :param service_provider_notes: Additional read only notes set by the connectivity provider. + :type service_provider_notes: str + :ivar provisioning_state: The provisioning state of the express route cross connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param peerings: The list of peerings. + :type peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'primary_azure_port': {'readonly': True}, + 'secondary_azure_port': {'readonly': True}, + 's_tag': {'readonly': True}, + 'peering_location': {'readonly': True}, + 'bandwidth_in_mbps': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, + 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, + 's_tag': {'key': 'properties.sTag', 'type': 'int'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'bandwidth_in_mbps': {'key': 'properties.bandwidthInMbps', 'type': 'int'}, + 'express_route_circuit': {'key': 'properties.expressRouteCircuit', 'type': 'ExpressRouteCircuitReference'}, + 'service_provider_provisioning_state': {'key': 'properties.serviceProviderProvisioningState', 'type': 'str'}, + 'service_provider_notes': {'key': 'properties.serviceProviderNotes', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCrossConnectionPeering]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + express_route_circuit: Optional["ExpressRouteCircuitReference"] = None, + service_provider_provisioning_state: Optional[Union[str, "ServiceProviderProvisioningState"]] = None, + service_provider_notes: Optional[str] = None, + peerings: Optional[List["ExpressRouteCrossConnectionPeering"]] = None, + **kwargs + ): + super(ExpressRouteCrossConnection, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.primary_azure_port = None + self.secondary_azure_port = None + self.s_tag = None + self.peering_location = None + self.bandwidth_in_mbps = None + self.express_route_circuit = express_route_circuit + self.service_provider_provisioning_state = service_provider_provisioning_state + self.service_provider_notes = service_provider_notes + self.provisioning_state = None + self.peerings = peerings + + +class ExpressRouteCrossConnectionListResult(msrest.serialization.Model): + """Response for ListExpressRouteCrossConnection API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of ExpressRouteCrossConnection resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCrossConnection"]] = None, + **kwargs + ): + super(ExpressRouteCrossConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ExpressRouteCrossConnectionPeering(SubResource): + """Peering in an ExpressRoute Cross Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param peering_type: The peering type. Possible values include: "AzurePublicPeering", + "AzurePrivatePeering", "MicrosoftPeering". + :type peering_type: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePeeringType + :param state: The peering state. Possible values include: "Disabled", "Enabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePeeringState + :ivar azure_asn: The Azure ASN. + :vartype azure_asn: int + :param peer_asn: The peer ASN. + :type peer_asn: long + :param primary_peer_address_prefix: The primary address prefix. + :type primary_peer_address_prefix: str + :param secondary_peer_address_prefix: The secondary address prefix. + :type secondary_peer_address_prefix: str + :ivar primary_azure_port: The primary port. + :vartype primary_azure_port: str + :ivar secondary_azure_port: The secondary port. + :vartype secondary_azure_port: str + :param shared_key: The shared key. + :type shared_key: str + :param vlan_id: The VLAN ID. + :type vlan_id: int + :param microsoft_peering_config: The Microsoft peering configuration. + :type microsoft_peering_config: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringConfig + :ivar provisioning_state: The provisioning state of the express route cross connection peering + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param gateway_manager_etag: The GatewayManager Etag. + :type gateway_manager_etag: str + :ivar last_modified_by: Who was the last to modify the peering. + :vartype last_modified_by: str + :param ipv6_peering_config: The IPv6 peering configuration. + :type ipv6_peering_config: + ~azure.mgmt.network.v2021_05_01.models.Ipv6ExpressRouteCircuitPeeringConfig + """ + + _validation = { + 'etag': {'readonly': True}, + 'azure_asn': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 1}, + 'primary_azure_port': {'readonly': True}, + 'secondary_azure_port': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'last_modified_by': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'peering_type': {'key': 'properties.peeringType', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'azure_asn': {'key': 'properties.azureASN', 'type': 'int'}, + 'peer_asn': {'key': 'properties.peerASN', 'type': 'long'}, + 'primary_peer_address_prefix': {'key': 'properties.primaryPeerAddressPrefix', 'type': 'str'}, + 'secondary_peer_address_prefix': {'key': 'properties.secondaryPeerAddressPrefix', 'type': 'str'}, + 'primary_azure_port': {'key': 'properties.primaryAzurePort', 'type': 'str'}, + 'secondary_azure_port': {'key': 'properties.secondaryAzurePort', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'vlan_id': {'key': 'properties.vlanId', 'type': 'int'}, + 'microsoft_peering_config': {'key': 'properties.microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'gateway_manager_etag': {'key': 'properties.gatewayManagerEtag', 'type': 'str'}, + 'last_modified_by': {'key': 'properties.lastModifiedBy', 'type': 'str'}, + 'ipv6_peering_config': {'key': 'properties.ipv6PeeringConfig', 'type': 'Ipv6ExpressRouteCircuitPeeringConfig'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + peering_type: Optional[Union[str, "ExpressRoutePeeringType"]] = None, + state: Optional[Union[str, "ExpressRoutePeeringState"]] = None, + peer_asn: Optional[int] = None, + primary_peer_address_prefix: Optional[str] = None, + secondary_peer_address_prefix: Optional[str] = None, + shared_key: Optional[str] = None, + vlan_id: Optional[int] = None, + microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, + gateway_manager_etag: Optional[str] = None, + ipv6_peering_config: Optional["Ipv6ExpressRouteCircuitPeeringConfig"] = None, + **kwargs + ): + super(ExpressRouteCrossConnectionPeering, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.peering_type = peering_type + self.state = state + self.azure_asn = None + self.peer_asn = peer_asn + self.primary_peer_address_prefix = primary_peer_address_prefix + self.secondary_peer_address_prefix = secondary_peer_address_prefix + self.primary_azure_port = None + self.secondary_azure_port = None + self.shared_key = shared_key + self.vlan_id = vlan_id + self.microsoft_peering_config = microsoft_peering_config + self.provisioning_state = None + self.gateway_manager_etag = gateway_manager_etag + self.last_modified_by = None + self.ipv6_peering_config = ipv6_peering_config + + +class ExpressRouteCrossConnectionPeeringList(msrest.serialization.Model): + """Response for ListPeering API service call retrieves all peerings that belong to an ExpressRouteCrossConnection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The peerings in an express route cross connection. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnectionPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCrossConnectionPeering"]] = None, + **kwargs + ): + super(ExpressRouteCrossConnectionPeeringList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ExpressRouteCrossConnectionRoutesTableSummary(msrest.serialization.Model): + """The routes table associated with the ExpressRouteCircuit. + + :param neighbor: IP address of Neighbor router. + :type neighbor: str + :param asn: Autonomous system number. + :type asn: int + :param up_down: The length of time that the BGP session has been in the Established state, or + the current status if not in the Established state. + :type up_down: str + :param state_or_prefixes_received: Current state of the BGP session, and the number of prefixes + that have been received from a neighbor or peer group. + :type state_or_prefixes_received: str + """ + + _attribute_map = { + 'neighbor': {'key': 'neighbor', 'type': 'str'}, + 'asn': {'key': 'asn', 'type': 'int'}, + 'up_down': {'key': 'upDown', 'type': 'str'}, + 'state_or_prefixes_received': {'key': 'stateOrPrefixesReceived', 'type': 'str'}, + } + + def __init__( + self, + *, + neighbor: Optional[str] = None, + asn: Optional[int] = None, + up_down: Optional[str] = None, + state_or_prefixes_received: Optional[str] = None, + **kwargs + ): + super(ExpressRouteCrossConnectionRoutesTableSummary, self).__init__(**kwargs) + self.neighbor = neighbor + self.asn = asn + self.up_down = up_down + self.state_or_prefixes_received = state_or_prefixes_received + + +class ExpressRouteCrossConnectionsRoutesTableSummaryListResult(msrest.serialization.Model): + """Response for ListRoutesTable associated with the Express Route Cross Connections. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of the routes table. + :type value: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionRoutesTableSummary] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteCrossConnectionRoutesTableSummary]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteCrossConnectionRoutesTableSummary"]] = None, + **kwargs + ): + super(ExpressRouteCrossConnectionsRoutesTableSummaryListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ExpressRouteGateway(Resource): + """ExpressRoute gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param auto_scale_configuration: Configuration for auto scaling. + :type auto_scale_configuration: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGatewayPropertiesAutoScaleConfiguration + :ivar express_route_connections: List of ExpressRoute connections to the ExpressRoute gateway. + :vartype express_route_connections: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection] + :ivar provisioning_state: The provisioning state of the express route gateway resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param virtual_hub: The Virtual Hub where the ExpressRoute gateway is or will be deployed. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.VirtualHubId + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'express_route_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'auto_scale_configuration': {'key': 'properties.autoScaleConfiguration', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfiguration'}, + 'express_route_connections': {'key': 'properties.expressRouteConnections', 'type': '[ExpressRouteConnection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'VirtualHubId'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + auto_scale_configuration: Optional["ExpressRouteGatewayPropertiesAutoScaleConfiguration"] = None, + virtual_hub: Optional["VirtualHubId"] = None, + **kwargs + ): + super(ExpressRouteGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.auto_scale_configuration = auto_scale_configuration + self.express_route_connections = None + self.provisioning_state = None + self.virtual_hub = virtual_hub + + +class ExpressRouteGatewayList(msrest.serialization.Model): + """List of ExpressRoute gateways. + + :param value: List of ExpressRoute gateways. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteGateway]'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteGateway"]] = None, + **kwargs + ): + super(ExpressRouteGatewayList, self).__init__(**kwargs) + self.value = value + + +class ExpressRouteGatewayPropertiesAutoScaleConfiguration(msrest.serialization.Model): + """Configuration for auto scaling. + + :param bounds: Minimum and maximum number of scale units to deploy. + :type bounds: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds + """ + + _attribute_map = { + 'bounds': {'key': 'bounds', 'type': 'ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds'}, + } + + def __init__( + self, + *, + bounds: Optional["ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds"] = None, + **kwargs + ): + super(ExpressRouteGatewayPropertiesAutoScaleConfiguration, self).__init__(**kwargs) + self.bounds = bounds + + +class ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds(msrest.serialization.Model): + """Minimum and maximum number of scale units to deploy. + + :param min: Minimum number of scale units deployed for ExpressRoute gateway. + :type min: int + :param max: Maximum number of scale units deployed for ExpressRoute gateway. + :type max: int + """ + + _attribute_map = { + 'min': {'key': 'min', 'type': 'int'}, + 'max': {'key': 'max', 'type': 'int'}, + } + + def __init__( + self, + *, + min: Optional[int] = None, + max: Optional[int] = None, + **kwargs + ): + super(ExpressRouteGatewayPropertiesAutoScaleConfigurationBounds, self).__init__(**kwargs) + self.min = min + self.max = max + + +class ExpressRouteLink(SubResource): + """ExpressRouteLink child resource definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of child port resource that is unique among child port resources of the + parent. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar router_name: Name of Azure router associated with physical port. + :vartype router_name: str + :ivar interface_name: Name of Azure router interface. + :vartype interface_name: str + :ivar patch_panel_id: Mapping between physical port to patch panel port. + :vartype patch_panel_id: str + :ivar rack_id: Mapping of physical patch panel to rack. + :vartype rack_id: str + :ivar connector_type: Physical fiber port type. Possible values include: "LC", "SC". + :vartype connector_type: str or + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkConnectorType + :param admin_state: Administrative state of the physical port. Possible values include: + "Enabled", "Disabled". + :type admin_state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkAdminState + :ivar provisioning_state: The provisioning state of the express route link resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param mac_sec_config: MacSec configuration. + :type mac_sec_config: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkMacSecConfig + """ + + _validation = { + 'etag': {'readonly': True}, + 'router_name': {'readonly': True}, + 'interface_name': {'readonly': True}, + 'patch_panel_id': {'readonly': True}, + 'rack_id': {'readonly': True}, + 'connector_type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'router_name': {'key': 'properties.routerName', 'type': 'str'}, + 'interface_name': {'key': 'properties.interfaceName', 'type': 'str'}, + 'patch_panel_id': {'key': 'properties.patchPanelId', 'type': 'str'}, + 'rack_id': {'key': 'properties.rackId', 'type': 'str'}, + 'connector_type': {'key': 'properties.connectorType', 'type': 'str'}, + 'admin_state': {'key': 'properties.adminState', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'mac_sec_config': {'key': 'properties.macSecConfig', 'type': 'ExpressRouteLinkMacSecConfig'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + admin_state: Optional[Union[str, "ExpressRouteLinkAdminState"]] = None, + mac_sec_config: Optional["ExpressRouteLinkMacSecConfig"] = None, + **kwargs + ): + super(ExpressRouteLink, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.router_name = None + self.interface_name = None + self.patch_panel_id = None + self.rack_id = None + self.connector_type = None + self.admin_state = admin_state + self.provisioning_state = None + self.mac_sec_config = mac_sec_config + + +class ExpressRouteLinkListResult(msrest.serialization.Model): + """Response for ListExpressRouteLinks API service call. + + :param value: The list of ExpressRouteLink sub-resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteLink] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteLink"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRouteLinkListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteLinkMacSecConfig(msrest.serialization.Model): + """ExpressRouteLink Mac Security Configuration. + + :param ckn_secret_identifier: Keyvault Secret Identifier URL containing Mac security CKN key. + :type ckn_secret_identifier: str + :param cak_secret_identifier: Keyvault Secret Identifier URL containing Mac security CAK key. + :type cak_secret_identifier: str + :param cipher: Mac security cipher. Possible values include: "GcmAes256", "GcmAes128", + "GcmAesXpn128", "GcmAesXpn256". + :type cipher: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkMacSecCipher + :param sci_state: Sci mode enabled/disabled. Possible values include: "Disabled", "Enabled". + :type sci_state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkMacSecSciState + """ + + _attribute_map = { + 'ckn_secret_identifier': {'key': 'cknSecretIdentifier', 'type': 'str'}, + 'cak_secret_identifier': {'key': 'cakSecretIdentifier', 'type': 'str'}, + 'cipher': {'key': 'cipher', 'type': 'str'}, + 'sci_state': {'key': 'sciState', 'type': 'str'}, + } + + def __init__( + self, + *, + ckn_secret_identifier: Optional[str] = None, + cak_secret_identifier: Optional[str] = None, + cipher: Optional[Union[str, "ExpressRouteLinkMacSecCipher"]] = None, + sci_state: Optional[Union[str, "ExpressRouteLinkMacSecSciState"]] = None, + **kwargs + ): + super(ExpressRouteLinkMacSecConfig, self).__init__(**kwargs) + self.ckn_secret_identifier = ckn_secret_identifier + self.cak_secret_identifier = cak_secret_identifier + self.cipher = cipher + self.sci_state = sci_state + + +class ExpressRoutePort(Resource): + """ExpressRoutePort resource definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param identity: The identity of ExpressRoutePort, if configured. + :type identity: ~azure.mgmt.network.v2021_05_01.models.ManagedServiceIdentity + :param peering_location: The name of the peering location that the ExpressRoutePort is mapped + to physically. + :type peering_location: str + :param bandwidth_in_gbps: Bandwidth of procured ports in Gbps. + :type bandwidth_in_gbps: int + :ivar provisioned_bandwidth_in_gbps: Aggregate Gbps of associated circuit bandwidths. + :vartype provisioned_bandwidth_in_gbps: float + :ivar mtu: Maximum transmission unit of the physical port pair(s). + :vartype mtu: str + :param encapsulation: Encapsulation method on physical ports. Possible values include: "Dot1Q", + "QinQ". + :type encapsulation: str or + ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsEncapsulation + :ivar ether_type: Ether type of the physical port. + :vartype ether_type: str + :ivar allocation_date: Date of the physical port allocation to be used in Letter of + Authorization. + :vartype allocation_date: str + :param links: The set of physical links of the ExpressRoutePort resource. + :type links: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteLink] + :ivar circuits: Reference the ExpressRoute circuit(s) that are provisioned on this + ExpressRoutePort resource. + :vartype circuits: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the express route port resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar resource_guid: The resource GUID property of the express route port resource. + :vartype resource_guid: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioned_bandwidth_in_gbps': {'readonly': True}, + 'mtu': {'readonly': True}, + 'ether_type': {'readonly': True}, + 'allocation_date': {'readonly': True}, + 'circuits': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_guid': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'peering_location': {'key': 'properties.peeringLocation', 'type': 'str'}, + 'bandwidth_in_gbps': {'key': 'properties.bandwidthInGbps', 'type': 'int'}, + 'provisioned_bandwidth_in_gbps': {'key': 'properties.provisionedBandwidthInGbps', 'type': 'float'}, + 'mtu': {'key': 'properties.mtu', 'type': 'str'}, + 'encapsulation': {'key': 'properties.encapsulation', 'type': 'str'}, + 'ether_type': {'key': 'properties.etherType', 'type': 'str'}, + 'allocation_date': {'key': 'properties.allocationDate', 'type': 'str'}, + 'links': {'key': 'properties.links', 'type': '[ExpressRouteLink]'}, + 'circuits': {'key': 'properties.circuits', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + peering_location: Optional[str] = None, + bandwidth_in_gbps: Optional[int] = None, + encapsulation: Optional[Union[str, "ExpressRoutePortsEncapsulation"]] = None, + links: Optional[List["ExpressRouteLink"]] = None, + **kwargs + ): + super(ExpressRoutePort, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.identity = identity + self.peering_location = peering_location + self.bandwidth_in_gbps = bandwidth_in_gbps + self.provisioned_bandwidth_in_gbps = None + self.mtu = None + self.encapsulation = encapsulation + self.ether_type = None + self.allocation_date = None + self.links = links + self.circuits = None + self.provisioning_state = None + self.resource_guid = None + + +class ExpressRoutePortListResult(msrest.serialization.Model): + """Response for ListExpressRoutePorts API service call. + + :param value: A list of ExpressRoutePort resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRoutePort]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRoutePort"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRoutePortListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRoutePortsLocation(Resource): + """Definition of the ExpressRoutePorts peering location resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar address: Address of peering location. + :vartype address: str + :ivar contact: Contact details of peering locations. + :vartype contact: str + :param available_bandwidths: The inventory of available ExpressRoutePort bandwidths. + :type available_bandwidths: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsLocationBandwidths] + :ivar provisioning_state: The provisioning state of the express route port location resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'address': {'readonly': True}, + 'contact': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'address': {'key': 'properties.address', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'str'}, + 'available_bandwidths': {'key': 'properties.availableBandwidths', 'type': '[ExpressRoutePortsLocationBandwidths]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + available_bandwidths: Optional[List["ExpressRoutePortsLocationBandwidths"]] = None, + **kwargs + ): + super(ExpressRoutePortsLocation, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.address = None + self.contact = None + self.available_bandwidths = available_bandwidths + self.provisioning_state = None + + +class ExpressRoutePortsLocationBandwidths(msrest.serialization.Model): + """Real-time inventory of available ExpressRoute port bandwidths. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar offer_name: Bandwidth descriptive name. + :vartype offer_name: str + :ivar value_in_gbps: Bandwidth value in Gbps. + :vartype value_in_gbps: int + """ + + _validation = { + 'offer_name': {'readonly': True}, + 'value_in_gbps': {'readonly': True}, + } + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_gbps': {'key': 'valueInGbps', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(ExpressRoutePortsLocationBandwidths, self).__init__(**kwargs) + self.offer_name = None + self.value_in_gbps = None + + +class ExpressRoutePortsLocationListResult(msrest.serialization.Model): + """Response for ListExpressRoutePortsLocations API service call. + + :param value: The list of all ExpressRoutePort peering locations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsLocation] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRoutePortsLocation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRoutePortsLocation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRoutePortsLocationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExpressRouteServiceProvider(Resource): + """A ExpressRouteResourceProvider object. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param peering_locations: A list of peering locations. + :type peering_locations: list[str] + :param bandwidths_offered: A list of bandwidths offered. + :type bandwidths_offered: + list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteServiceProviderBandwidthsOffered] + :ivar provisioning_state: The provisioning state of the express route service provider + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'peering_locations': {'key': 'properties.peeringLocations', 'type': '[str]'}, + 'bandwidths_offered': {'key': 'properties.bandwidthsOffered', 'type': '[ExpressRouteServiceProviderBandwidthsOffered]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + peering_locations: Optional[List[str]] = None, + bandwidths_offered: Optional[List["ExpressRouteServiceProviderBandwidthsOffered"]] = None, + **kwargs + ): + super(ExpressRouteServiceProvider, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.peering_locations = peering_locations + self.bandwidths_offered = bandwidths_offered + self.provisioning_state = None + + +class ExpressRouteServiceProviderBandwidthsOffered(msrest.serialization.Model): + """Contains bandwidths offered in ExpressRouteServiceProvider resources. + + :param offer_name: The OfferName. + :type offer_name: str + :param value_in_mbps: The ValueInMbps. + :type value_in_mbps: int + """ + + _attribute_map = { + 'offer_name': {'key': 'offerName', 'type': 'str'}, + 'value_in_mbps': {'key': 'valueInMbps', 'type': 'int'}, + } + + def __init__( + self, + *, + offer_name: Optional[str] = None, + value_in_mbps: Optional[int] = None, + **kwargs + ): + super(ExpressRouteServiceProviderBandwidthsOffered, self).__init__(**kwargs) + self.offer_name = offer_name + self.value_in_mbps = value_in_mbps + + +class ExpressRouteServiceProviderListResult(msrest.serialization.Model): + """Response for the ListExpressRouteServiceProvider API service call. + + :param value: A list of ExpressRouteResourceProvider resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteServiceProvider] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ExpressRouteServiceProvider]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ExpressRouteServiceProvider"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ExpressRouteServiceProviderListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ExtendedLocation(msrest.serialization.Model): + """ExtendedLocation complex type. + + :param name: The name of the extended location. + :type name: str + :param type: The type of the extended location. Possible values include: "EdgeZone". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.ExtendedLocationTypes + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + type: Optional[Union[str, "ExtendedLocationTypes"]] = None, + **kwargs + ): + super(ExtendedLocation, self).__init__(**kwargs) + self.name = name + self.type = type + + +class FilterItems(msrest.serialization.Model): + """Will contain the filter name and values to operate on. + + :param field: The name of the field we would like to filter. + :type field: str + :param values: List of values to filter the current field by. + :type values: list[str] + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + } + + def __init__( + self, + *, + field: Optional[str] = None, + values: Optional[List[str]] = None, + **kwargs + ): + super(FilterItems, self).__init__(**kwargs) + self.field = field + self.values = values + + +class FirewallPolicy(Resource): + """FirewallPolicy Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param identity: The identity of the firewall policy. + :type identity: ~azure.mgmt.network.v2021_05_01.models.ManagedServiceIdentity + :ivar rule_collection_groups: List of references to FirewallPolicyRuleCollectionGroups. + :vartype rule_collection_groups: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the firewall policy resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param base_policy: The parent firewall policy from which rules are inherited. + :type base_policy: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar firewalls: List of references to Azure Firewalls that this Firewall Policy is associated + with. + :vartype firewalls: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar child_policies: List of references to Child Firewall Policies. + :vartype child_policies: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param threat_intel_mode: The operation mode for Threat Intelligence. Possible values include: + "Alert", "Deny", "Off". + :type threat_intel_mode: str or + ~azure.mgmt.network.v2021_05_01.models.AzureFirewallThreatIntelMode + :param threat_intel_whitelist: ThreatIntel Whitelist for Firewall Policy. + :type threat_intel_whitelist: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyThreatIntelWhitelist + :param insights: Insights on Firewall Policy. + :type insights: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyInsights + :param snat: The private IP addresses/IP ranges to which traffic will not be SNAT. + :type snat: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicySNAT + :param sql: SQL Settings definition. + :type sql: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicySQL + :param dns_settings: DNS Proxy Settings definition. + :type dns_settings: ~azure.mgmt.network.v2021_05_01.models.DnsSettings + :param explicit_proxy_settings: Explicit Proxy Settings definition. + :type explicit_proxy_settings: ~azure.mgmt.network.v2021_05_01.models.ExplicitProxySettings + :param intrusion_detection: The configuration for Intrusion detection. + :type intrusion_detection: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetection + :param transport_security: TLS Configuration definition. + :type transport_security: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyTransportSecurity + :param sku: The Firewall Policy SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicySku + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'rule_collection_groups': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'firewalls': {'readonly': True}, + 'child_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'rule_collection_groups': {'key': 'properties.ruleCollectionGroups', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'base_policy': {'key': 'properties.basePolicy', 'type': 'SubResource'}, + 'firewalls': {'key': 'properties.firewalls', 'type': '[SubResource]'}, + 'child_policies': {'key': 'properties.childPolicies', 'type': '[SubResource]'}, + 'threat_intel_mode': {'key': 'properties.threatIntelMode', 'type': 'str'}, + 'threat_intel_whitelist': {'key': 'properties.threatIntelWhitelist', 'type': 'FirewallPolicyThreatIntelWhitelist'}, + 'insights': {'key': 'properties.insights', 'type': 'FirewallPolicyInsights'}, + 'snat': {'key': 'properties.snat', 'type': 'FirewallPolicySNAT'}, + 'sql': {'key': 'properties.sql', 'type': 'FirewallPolicySQL'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'DnsSettings'}, + 'explicit_proxy_settings': {'key': 'properties.explicitProxySettings', 'type': 'ExplicitProxySettings'}, + 'intrusion_detection': {'key': 'properties.intrusionDetection', 'type': 'FirewallPolicyIntrusionDetection'}, + 'transport_security': {'key': 'properties.transportSecurity', 'type': 'FirewallPolicyTransportSecurity'}, + 'sku': {'key': 'properties.sku', 'type': 'FirewallPolicySku'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + base_policy: Optional["SubResource"] = None, + threat_intel_mode: Optional[Union[str, "AzureFirewallThreatIntelMode"]] = None, + threat_intel_whitelist: Optional["FirewallPolicyThreatIntelWhitelist"] = None, + insights: Optional["FirewallPolicyInsights"] = None, + snat: Optional["FirewallPolicySNAT"] = None, + sql: Optional["FirewallPolicySQL"] = None, + dns_settings: Optional["DnsSettings"] = None, + explicit_proxy_settings: Optional["ExplicitProxySettings"] = None, + intrusion_detection: Optional["FirewallPolicyIntrusionDetection"] = None, + transport_security: Optional["FirewallPolicyTransportSecurity"] = None, + sku: Optional["FirewallPolicySku"] = None, + **kwargs + ): + super(FirewallPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.identity = identity + self.rule_collection_groups = None + self.provisioning_state = None + self.base_policy = base_policy + self.firewalls = None + self.child_policies = None + self.threat_intel_mode = threat_intel_mode + self.threat_intel_whitelist = threat_intel_whitelist + self.insights = insights + self.snat = snat + self.sql = sql + self.dns_settings = dns_settings + self.explicit_proxy_settings = explicit_proxy_settings + self.intrusion_detection = intrusion_detection + self.transport_security = transport_security + self.sku = sku + + +class FirewallPolicyCertificateAuthority(msrest.serialization.Model): + """Trusted Root certificates properties for tls. + + :param key_vault_secret_id: Secret Id of (base-64 encoded unencrypted pfx) 'Secret' or + 'Certificate' object stored in KeyVault. + :type key_vault_secret_id: str + :param name: Name of the CA certificate. + :type name: str + """ + + _attribute_map = { + 'key_vault_secret_id': {'key': 'keyVaultSecretId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + key_vault_secret_id: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + super(FirewallPolicyCertificateAuthority, self).__init__(**kwargs) + self.key_vault_secret_id = key_vault_secret_id + self.name = name + + +class FirewallPolicyRuleCollection(msrest.serialization.Model): + """Properties of the rule collection. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: FirewallPolicyFilterRuleCollection, FirewallPolicyNatRuleCollection. + + All required parameters must be populated in order to send to Azure. + + :param rule_collection_type: Required. The type of the rule collection.Constant filled by + server. Possible values include: "FirewallPolicyNatRuleCollection", + "FirewallPolicyFilterRuleCollection". + :type rule_collection_type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionType + :param name: The name of the rule collection. + :type name: str + :param priority: Priority of the Firewall Policy Rule Collection resource. + :type priority: int + """ + + _validation = { + 'rule_collection_type': {'required': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + } + + _attribute_map = { + 'rule_collection_type': {'key': 'ruleCollectionType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + } + + _subtype_map = { + 'rule_collection_type': {'FirewallPolicyFilterRuleCollection': 'FirewallPolicyFilterRuleCollection', 'FirewallPolicyNatRuleCollection': 'FirewallPolicyNatRuleCollection'} + } + + def __init__( + self, + *, + name: Optional[str] = None, + priority: Optional[int] = None, + **kwargs + ): + super(FirewallPolicyRuleCollection, self).__init__(**kwargs) + self.rule_collection_type = None # type: Optional[str] + self.name = name + self.priority = priority + + +class FirewallPolicyFilterRuleCollection(FirewallPolicyRuleCollection): + """Firewall Policy Filter Rule Collection. + + All required parameters must be populated in order to send to Azure. + + :param rule_collection_type: Required. The type of the rule collection.Constant filled by + server. Possible values include: "FirewallPolicyNatRuleCollection", + "FirewallPolicyFilterRuleCollection". + :type rule_collection_type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionType + :param name: The name of the rule collection. + :type name: str + :param priority: Priority of the Firewall Policy Rule Collection resource. + :type priority: int + :param action: The action type of a Filter rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyFilterRuleCollectionAction + :param rules: List of rules included in a rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRule] + """ + + _validation = { + 'rule_collection_type': {'required': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + } + + _attribute_map = { + 'rule_collection_type': {'key': 'ruleCollectionType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'FirewallPolicyFilterRuleCollectionAction'}, + 'rules': {'key': 'rules', 'type': '[FirewallPolicyRule]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["FirewallPolicyFilterRuleCollectionAction"] = None, + rules: Optional[List["FirewallPolicyRule"]] = None, + **kwargs + ): + super(FirewallPolicyFilterRuleCollection, self).__init__(name=name, priority=priority, **kwargs) + self.rule_collection_type = 'FirewallPolicyFilterRuleCollection' # type: str + self.action = action + self.rules = rules + + +class FirewallPolicyFilterRuleCollectionAction(msrest.serialization.Model): + """Properties of the FirewallPolicyFilterRuleCollectionAction. + + :param type: The type of action. Possible values include: "Allow", "Deny". + :type type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyFilterRuleCollectionActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "FirewallPolicyFilterRuleCollectionActionType"]] = None, + **kwargs + ): + super(FirewallPolicyFilterRuleCollectionAction, self).__init__(**kwargs) + self.type = type + + +class FirewallPolicyInsights(msrest.serialization.Model): + """Firewall Policy Insights. + + :param is_enabled: A flag to indicate if the insights are enabled on the policy. + :type is_enabled: bool + :param retention_days: Number of days the insights should be enabled on the policy. + :type retention_days: int + :param log_analytics_resources: Workspaces needed to configure the Firewall Policy Insights. + :type log_analytics_resources: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyLogAnalyticsResources + """ + + _attribute_map = { + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'retention_days': {'key': 'retentionDays', 'type': 'int'}, + 'log_analytics_resources': {'key': 'logAnalyticsResources', 'type': 'FirewallPolicyLogAnalyticsResources'}, + } + + def __init__( + self, + *, + is_enabled: Optional[bool] = None, + retention_days: Optional[int] = None, + log_analytics_resources: Optional["FirewallPolicyLogAnalyticsResources"] = None, + **kwargs + ): + super(FirewallPolicyInsights, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.retention_days = retention_days + self.log_analytics_resources = log_analytics_resources + + +class FirewallPolicyIntrusionDetection(msrest.serialization.Model): + """Configuration for intrusion detection mode and rules. + + :param mode: Intrusion detection general state. Possible values include: "Off", "Alert", + "Deny". + :type mode: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionStateType + :param configuration: Intrusion detection configuration properties. + :type configuration: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionConfiguration + """ + + _attribute_map = { + 'mode': {'key': 'mode', 'type': 'str'}, + 'configuration': {'key': 'configuration', 'type': 'FirewallPolicyIntrusionDetectionConfiguration'}, + } + + def __init__( + self, + *, + mode: Optional[Union[str, "FirewallPolicyIntrusionDetectionStateType"]] = None, + configuration: Optional["FirewallPolicyIntrusionDetectionConfiguration"] = None, + **kwargs + ): + super(FirewallPolicyIntrusionDetection, self).__init__(**kwargs) + self.mode = mode + self.configuration = configuration + + +class FirewallPolicyIntrusionDetectionBypassTrafficSpecifications(msrest.serialization.Model): + """Intrusion detection bypass traffic specification. + + :param name: Name of the bypass traffic rule. + :type name: str + :param description: Description of the bypass traffic rule. + :type description: str + :param protocol: The rule bypass protocol. Possible values include: "TCP", "UDP", "ICMP", + "ANY". + :type protocol: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionProtocol + :param source_addresses: List of source IP addresses or ranges for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses or ranges for this rule. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports or ranges. + :type destination_ports: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param destination_ip_groups: List of destination IpGroups for this rule. + :type destination_ip_groups: list[str] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'destination_ip_groups': {'key': 'destinationIpGroups', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "FirewallPolicyIntrusionDetectionProtocol"]] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + destination_ip_groups: Optional[List[str]] = None, + **kwargs + ): + super(FirewallPolicyIntrusionDetectionBypassTrafficSpecifications, self).__init__(**kwargs) + self.name = name + self.description = description + self.protocol = protocol + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.source_ip_groups = source_ip_groups + self.destination_ip_groups = destination_ip_groups + + +class FirewallPolicyIntrusionDetectionConfiguration(msrest.serialization.Model): + """The operation for configuring intrusion detection. + + :param signature_overrides: List of specific signatures states. + :type signature_overrides: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionSignatureSpecification] + :param bypass_traffic_settings: List of rules for traffic to bypass. + :type bypass_traffic_settings: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionBypassTrafficSpecifications] + """ + + _attribute_map = { + 'signature_overrides': {'key': 'signatureOverrides', 'type': '[FirewallPolicyIntrusionDetectionSignatureSpecification]'}, + 'bypass_traffic_settings': {'key': 'bypassTrafficSettings', 'type': '[FirewallPolicyIntrusionDetectionBypassTrafficSpecifications]'}, + } + + def __init__( + self, + *, + signature_overrides: Optional[List["FirewallPolicyIntrusionDetectionSignatureSpecification"]] = None, + bypass_traffic_settings: Optional[List["FirewallPolicyIntrusionDetectionBypassTrafficSpecifications"]] = None, + **kwargs + ): + super(FirewallPolicyIntrusionDetectionConfiguration, self).__init__(**kwargs) + self.signature_overrides = signature_overrides + self.bypass_traffic_settings = bypass_traffic_settings + + +class FirewallPolicyIntrusionDetectionSignatureSpecification(msrest.serialization.Model): + """Intrusion detection signatures specification states. + + :param id: Signature id. + :type id: str + :param mode: The signature state. Possible values include: "Off", "Alert", "Deny". + :type mode: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyIntrusionDetectionStateType + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + mode: Optional[Union[str, "FirewallPolicyIntrusionDetectionStateType"]] = None, + **kwargs + ): + super(FirewallPolicyIntrusionDetectionSignatureSpecification, self).__init__(**kwargs) + self.id = id + self.mode = mode + + +class FirewallPolicyListResult(msrest.serialization.Model): + """Response for ListFirewallPolicies API service call. + + :param value: List of Firewall Policies in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicy] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FirewallPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["FirewallPolicy"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(FirewallPolicyListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class FirewallPolicyLogAnalyticsResources(msrest.serialization.Model): + """Log Analytics Resources for Firewall Policy Insights. + + :param workspaces: List of workspaces for Firewall Policy Insights. + :type workspaces: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyLogAnalyticsWorkspace] + :param default_workspace_id: The default workspace Id for Firewall Policy Insights. + :type default_workspace_id: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'workspaces': {'key': 'workspaces', 'type': '[FirewallPolicyLogAnalyticsWorkspace]'}, + 'default_workspace_id': {'key': 'defaultWorkspaceId', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + workspaces: Optional[List["FirewallPolicyLogAnalyticsWorkspace"]] = None, + default_workspace_id: Optional["SubResource"] = None, + **kwargs + ): + super(FirewallPolicyLogAnalyticsResources, self).__init__(**kwargs) + self.workspaces = workspaces + self.default_workspace_id = default_workspace_id + + +class FirewallPolicyLogAnalyticsWorkspace(msrest.serialization.Model): + """Log Analytics Workspace for Firewall Policy Insights. + + :param region: Region to configure the Workspace. + :type region: str + :param workspace_id: The workspace Id for Firewall Policy Insights. + :type workspace_id: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + region: Optional[str] = None, + workspace_id: Optional["SubResource"] = None, + **kwargs + ): + super(FirewallPolicyLogAnalyticsWorkspace, self).__init__(**kwargs) + self.region = region + self.workspace_id = workspace_id + + +class FirewallPolicyNatRuleCollection(FirewallPolicyRuleCollection): + """Firewall Policy NAT Rule Collection. + + All required parameters must be populated in order to send to Azure. + + :param rule_collection_type: Required. The type of the rule collection.Constant filled by + server. Possible values include: "FirewallPolicyNatRuleCollection", + "FirewallPolicyFilterRuleCollection". + :type rule_collection_type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionType + :param name: The name of the rule collection. + :type name: str + :param priority: Priority of the Firewall Policy Rule Collection resource. + :type priority: int + :param action: The action type of a Nat rule collection. + :type action: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyNatRuleCollectionAction + :param rules: List of rules included in a rule collection. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRule] + """ + + _validation = { + 'rule_collection_type': {'required': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + } + + _attribute_map = { + 'rule_collection_type': {'key': 'ruleCollectionType', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'action': {'key': 'action', 'type': 'FirewallPolicyNatRuleCollectionAction'}, + 'rules': {'key': 'rules', 'type': '[FirewallPolicyRule]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + priority: Optional[int] = None, + action: Optional["FirewallPolicyNatRuleCollectionAction"] = None, + rules: Optional[List["FirewallPolicyRule"]] = None, + **kwargs + ): + super(FirewallPolicyNatRuleCollection, self).__init__(name=name, priority=priority, **kwargs) + self.rule_collection_type = 'FirewallPolicyNatRuleCollection' # type: str + self.action = action + self.rules = rules + + +class FirewallPolicyNatRuleCollectionAction(msrest.serialization.Model): + """Properties of the FirewallPolicyNatRuleCollectionAction. + + :param type: The type of action. Possible values include: "DNAT". + :type type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyNatRuleCollectionActionType + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "FirewallPolicyNatRuleCollectionActionType"]] = None, + **kwargs + ): + super(FirewallPolicyNatRuleCollectionAction, self).__init__(**kwargs) + self.type = type + + +class FirewallPolicyRuleApplicationProtocol(msrest.serialization.Model): + """Properties of the application rule protocol. + + :param protocol_type: Protocol type. Possible values include: "Http", "Https". + :type protocol_type: str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleApplicationProtocolType + :param port: Port number for the protocol, cannot be greater than 64000. + :type port: int + """ + + _validation = { + 'port': {'maximum': 64000, 'minimum': 0}, + } + + _attribute_map = { + 'protocol_type': {'key': 'protocolType', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__( + self, + *, + protocol_type: Optional[Union[str, "FirewallPolicyRuleApplicationProtocolType"]] = None, + port: Optional[int] = None, + **kwargs + ): + super(FirewallPolicyRuleApplicationProtocol, self).__init__(**kwargs) + self.protocol_type = protocol_type + self.port = port + + +class FirewallPolicyRuleCollectionGroup(SubResource): + """Rule Collection Group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Rule Group type. + :vartype type: str + :param priority: Priority of the Firewall Policy Rule Collection Group resource. + :type priority: int + :param rule_collections: Group of Firewall Policy rule collections. + :type rule_collections: + list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollection] + :ivar provisioning_state: The provisioning state of the firewall policy rule collection group + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'priority': {'maximum': 65000, 'minimum': 100}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'rule_collections': {'key': 'properties.ruleCollections', 'type': '[FirewallPolicyRuleCollection]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + priority: Optional[int] = None, + rule_collections: Optional[List["FirewallPolicyRuleCollection"]] = None, + **kwargs + ): + super(FirewallPolicyRuleCollectionGroup, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.priority = priority + self.rule_collections = rule_collections + self.provisioning_state = None + + +class FirewallPolicyRuleCollectionGroupListResult(msrest.serialization.Model): + """Response for ListFirewallPolicyRuleCollectionGroups API service call. + + :param value: List of FirewallPolicyRuleCollectionGroups in a FirewallPolicy. + :type value: list[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroup] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FirewallPolicyRuleCollectionGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["FirewallPolicyRuleCollectionGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(FirewallPolicyRuleCollectionGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class FirewallPolicySku(msrest.serialization.Model): + """SKU of Firewall policy. + + :param tier: Tier of Firewall Policy. Possible values include: "Standard", "Premium", "Basic". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicySkuTier + """ + + _attribute_map = { + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + tier: Optional[Union[str, "FirewallPolicySkuTier"]] = None, + **kwargs + ): + super(FirewallPolicySku, self).__init__(**kwargs) + self.tier = tier + + +class FirewallPolicySNAT(msrest.serialization.Model): + """The private IP addresses/IP ranges to which traffic will not be SNAT. + + :param private_ranges: List of private IP addresses/IP address ranges to not be SNAT. + :type private_ranges: list[str] + """ + + _attribute_map = { + 'private_ranges': {'key': 'privateRanges', 'type': '[str]'}, + } + + def __init__( + self, + *, + private_ranges: Optional[List[str]] = None, + **kwargs + ): + super(FirewallPolicySNAT, self).__init__(**kwargs) + self.private_ranges = private_ranges + + +class FirewallPolicySQL(msrest.serialization.Model): + """SQL Settings in Firewall Policy. + + :param allow_sql_redirect: A flag to indicate if SQL Redirect traffic filtering is enabled. + Turning on the flag requires no rule using port 11000-11999. + :type allow_sql_redirect: bool + """ + + _attribute_map = { + 'allow_sql_redirect': {'key': 'allowSqlRedirect', 'type': 'bool'}, + } + + def __init__( + self, + *, + allow_sql_redirect: Optional[bool] = None, + **kwargs + ): + super(FirewallPolicySQL, self).__init__(**kwargs) + self.allow_sql_redirect = allow_sql_redirect + + +class FirewallPolicyThreatIntelWhitelist(msrest.serialization.Model): + """ThreatIntel Whitelist for Firewall Policy. + + :param ip_addresses: List of IP addresses for the ThreatIntel Whitelist. + :type ip_addresses: list[str] + :param fqdns: List of FQDNs for the ThreatIntel Whitelist. + :type fqdns: list[str] + """ + + _attribute_map = { + 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + } + + def __init__( + self, + *, + ip_addresses: Optional[List[str]] = None, + fqdns: Optional[List[str]] = None, + **kwargs + ): + super(FirewallPolicyThreatIntelWhitelist, self).__init__(**kwargs) + self.ip_addresses = ip_addresses + self.fqdns = fqdns + + +class FirewallPolicyTransportSecurity(msrest.serialization.Model): + """Configuration needed to perform TLS termination & initiation. + + :param certificate_authority: The CA used for intermediate CA generation. + :type certificate_authority: + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyCertificateAuthority + """ + + _attribute_map = { + 'certificate_authority': {'key': 'certificateAuthority', 'type': 'FirewallPolicyCertificateAuthority'}, + } + + def __init__( + self, + *, + certificate_authority: Optional["FirewallPolicyCertificateAuthority"] = None, + **kwargs + ): + super(FirewallPolicyTransportSecurity, self).__init__(**kwargs) + self.certificate_authority = certificate_authority + + +class FlowLog(Resource): + """A flow log resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param target_resource_id: ID of network security group to which flow log will be applied. + :type target_resource_id: str + :ivar target_resource_guid: Guid of network security group to which flow log will be applied. + :vartype target_resource_guid: str + :param storage_id: ID of the storage account which is used to store the flow log. + :type storage_id: str + :param enabled: Flag to enable/disable flow logging. + :type enabled: bool + :param retention_policy: Parameters that define the retention policy for flow log. + :type retention_policy: ~azure.mgmt.network.v2021_05_01.models.RetentionPolicyParameters + :param format: Parameters that define the flow log format. + :type format: ~azure.mgmt.network.v2021_05_01.models.FlowLogFormatParameters + :param flow_analytics_configuration: Parameters that define the configuration of traffic + analytics. + :type flow_analytics_configuration: + ~azure.mgmt.network.v2021_05_01.models.TrafficAnalyticsProperties + :ivar provisioning_state: The provisioning state of the flow log. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'target_resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'target_resource_id': {'key': 'properties.targetResourceId', 'type': 'str'}, + 'target_resource_guid': {'key': 'properties.targetResourceGuid', 'type': 'str'}, + 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, + 'format': {'key': 'properties.format', 'type': 'FlowLogFormatParameters'}, + 'flow_analytics_configuration': {'key': 'properties.flowAnalyticsConfiguration', 'type': 'TrafficAnalyticsProperties'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + target_resource_id: Optional[str] = None, + storage_id: Optional[str] = None, + enabled: Optional[bool] = None, + retention_policy: Optional["RetentionPolicyParameters"] = None, + format: Optional["FlowLogFormatParameters"] = None, + flow_analytics_configuration: Optional["TrafficAnalyticsProperties"] = None, + **kwargs + ): + super(FlowLog, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.target_resource_id = target_resource_id + self.target_resource_guid = None + self.storage_id = storage_id + self.enabled = enabled + self.retention_policy = retention_policy + self.format = format + self.flow_analytics_configuration = flow_analytics_configuration + self.provisioning_state = None + + +class FlowLogFormatParameters(msrest.serialization.Model): + """Parameters that define the flow log format. + + :param type: The file type of flow log. Possible values include: "JSON". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.FlowLogFormatType + :param version: The version (revision) of the flow log. + :type version: int + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'version': {'key': 'version', 'type': 'int'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "FlowLogFormatType"]] = None, + version: Optional[int] = 0, + **kwargs + ): + super(FlowLogFormatParameters, self).__init__(**kwargs) + self.type = type + self.version = version + + +class FlowLogInformation(msrest.serialization.Model): + """Information on the configuration of flow log and traffic analytics (optional) . + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The ID of the resource to configure for flow log and + traffic analytics (optional) . + :type target_resource_id: str + :param flow_analytics_configuration: Parameters that define the configuration of traffic + analytics. + :type flow_analytics_configuration: + ~azure.mgmt.network.v2021_05_01.models.TrafficAnalyticsProperties + :param storage_id: Required. ID of the storage account which is used to store the flow log. + :type storage_id: str + :param enabled: Required. Flag to enable/disable flow logging. + :type enabled: bool + :param retention_policy: Parameters that define the retention policy for flow log. + :type retention_policy: ~azure.mgmt.network.v2021_05_01.models.RetentionPolicyParameters + :param format: Parameters that define the flow log format. + :type format: ~azure.mgmt.network.v2021_05_01.models.FlowLogFormatParameters + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'storage_id': {'required': True}, + 'enabled': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'flow_analytics_configuration': {'key': 'flowAnalyticsConfiguration', 'type': 'TrafficAnalyticsProperties'}, + 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'retention_policy': {'key': 'properties.retentionPolicy', 'type': 'RetentionPolicyParameters'}, + 'format': {'key': 'properties.format', 'type': 'FlowLogFormatParameters'}, + } + + def __init__( + self, + *, + target_resource_id: str, + storage_id: str, + enabled: bool, + flow_analytics_configuration: Optional["TrafficAnalyticsProperties"] = None, + retention_policy: Optional["RetentionPolicyParameters"] = None, + format: Optional["FlowLogFormatParameters"] = None, + **kwargs + ): + super(FlowLogInformation, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.flow_analytics_configuration = flow_analytics_configuration + self.storage_id = storage_id + self.enabled = enabled + self.retention_policy = retention_policy + self.format = format + + +class FlowLogListResult(msrest.serialization.Model): + """List of flow logs. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: Information about flow log resource. + :type value: list[~azure.mgmt.network.v2021_05_01.models.FlowLog] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FlowLog]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["FlowLog"]] = None, + **kwargs + ): + super(FlowLogListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class FlowLogStatusParameters(msrest.serialization.Model): + """Parameters that define a resource to query flow log and traffic analytics (optional) status. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The target resource where getting the flow log and traffic + analytics (optional) status. + :type target_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + **kwargs + ): + super(FlowLogStatusParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + + +class FrontendIPConfiguration(SubResource): + """Frontend IP address of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of frontend IP + configurations used by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :type zones: list[str] + :ivar inbound_nat_rules: An array of references to inbound rules that use this frontend IP. + :vartype inbound_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar inbound_nat_pools: An array of references to inbound pools that use this frontend IP. + :vartype inbound_nat_pools: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar outbound_rules: An array of references to outbound rules that use this frontend IP. + :vartype outbound_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar load_balancing_rules: An array of references to load balancing rules that use this + frontend IP. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The Private IP allocation method. Possible values include: + "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param private_ip_address_version: Whether the specific ipconfiguration is IPv4 or IPv6. + Default is taken as IPv4. Possible values include: "IPv4", "IPv6". + :type private_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param public_ip_address: The reference to the Public IP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :param public_ip_prefix: The reference to the Public IP Prefix resource. + :type public_ip_prefix: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param gateway_load_balancer: The reference to gateway load balancer frontend IP. + :type gateway_load_balancer: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the frontend IP configuration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'inbound_nat_rules': {'readonly': True}, + 'inbound_nat_pools': {'readonly': True}, + 'outbound_rules': {'readonly': True}, + 'load_balancing_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[SubResource]'}, + 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[SubResource]'}, + 'outbound_rules': {'key': 'properties.outboundRules', 'type': '[SubResource]'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + 'gateway_load_balancer': {'key': 'properties.gatewayLoadBalancer', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + zones: Optional[List[str]] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + private_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + subnet: Optional["Subnet"] = None, + public_ip_address: Optional["PublicIPAddress"] = None, + public_ip_prefix: Optional["SubResource"] = None, + gateway_load_balancer: Optional["SubResource"] = None, + **kwargs + ): + super(FrontendIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.zones = zones + self.inbound_nat_rules = None + self.inbound_nat_pools = None + self.outbound_rules = None + self.load_balancing_rules = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.private_ip_address_version = private_ip_address_version + self.subnet = subnet + self.public_ip_address = public_ip_address + self.public_ip_prefix = public_ip_prefix + self.gateway_load_balancer = gateway_load_balancer + self.provisioning_state = None + + +class GatewayLoadBalancerTunnelInterface(msrest.serialization.Model): + """Gateway load balancer tunnel interface of a load balancer backend address pool. + + :param port: Port of gateway load balancer tunnel interface. + :type port: int + :param identifier: Identifier of gateway load balancer tunnel interface. + :type identifier: int + :param protocol: Protocol of gateway load balancer tunnel interface. Possible values include: + "None", "Native", "VXLAN". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.GatewayLoadBalancerTunnelProtocol + :param type: Traffic type of gateway load balancer tunnel interface. Possible values include: + "None", "Internal", "External". + :type type: str or + ~azure.mgmt.network.v2021_05_01.models.GatewayLoadBalancerTunnelInterfaceType + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'identifier': {'key': 'identifier', 'type': 'int'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + port: Optional[int] = None, + identifier: Optional[int] = None, + protocol: Optional[Union[str, "GatewayLoadBalancerTunnelProtocol"]] = None, + type: Optional[Union[str, "GatewayLoadBalancerTunnelInterfaceType"]] = None, + **kwargs + ): + super(GatewayLoadBalancerTunnelInterface, self).__init__(**kwargs) + self.port = port + self.identifier = identifier + self.protocol = protocol + self.type = type + + +class GatewayRoute(msrest.serialization.Model): + """Gateway routing details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar local_address: The gateway's local address. + :vartype local_address: str + :ivar network: The route's network prefix. + :vartype network: str + :ivar next_hop: The route's next hop. + :vartype next_hop: str + :ivar source_peer: The peer this route was learned from. + :vartype source_peer: str + :ivar origin: The source this route was learned from. + :vartype origin: str + :ivar as_path: The route's AS path sequence. + :vartype as_path: str + :ivar weight: The route's weight. + :vartype weight: int + """ + + _validation = { + 'local_address': {'readonly': True}, + 'network': {'readonly': True}, + 'next_hop': {'readonly': True}, + 'source_peer': {'readonly': True}, + 'origin': {'readonly': True}, + 'as_path': {'readonly': True}, + 'weight': {'readonly': True}, + } + + _attribute_map = { + 'local_address': {'key': 'localAddress', 'type': 'str'}, + 'network': {'key': 'network', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'as_path': {'key': 'asPath', 'type': 'str'}, + 'weight': {'key': 'weight', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(GatewayRoute, self).__init__(**kwargs) + self.local_address = None + self.network = None + self.next_hop = None + self.source_peer = None + self.origin = None + self.as_path = None + self.weight = None + + +class GatewayRouteListResult(msrest.serialization.Model): + """List of virtual network gateway routes. + + :param value: List of gateway routes. + :type value: list[~azure.mgmt.network.v2021_05_01.models.GatewayRoute] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[GatewayRoute]'}, + } + + def __init__( + self, + *, + value: Optional[List["GatewayRoute"]] = None, + **kwargs + ): + super(GatewayRouteListResult, self).__init__(**kwargs) + self.value = value + + +class GenerateExpressRoutePortsLOARequest(msrest.serialization.Model): + """The customer name to be printed on a letter of authorization. + + All required parameters must be populated in order to send to Azure. + + :param customer_name: Required. The customer name. + :type customer_name: str + """ + + _validation = { + 'customer_name': {'required': True}, + } + + _attribute_map = { + 'customer_name': {'key': 'customerName', 'type': 'str'}, + } + + def __init__( + self, + *, + customer_name: str, + **kwargs + ): + super(GenerateExpressRoutePortsLOARequest, self).__init__(**kwargs) + self.customer_name = customer_name + + +class GenerateExpressRoutePortsLOAResult(msrest.serialization.Model): + """Response for GenerateExpressRoutePortsLOA API service call. + + :param encoded_content: The content as a base64 encoded string. + :type encoded_content: str + """ + + _attribute_map = { + 'encoded_content': {'key': 'encodedContent', 'type': 'str'}, + } + + def __init__( + self, + *, + encoded_content: Optional[str] = None, + **kwargs + ): + super(GenerateExpressRoutePortsLOAResult, self).__init__(**kwargs) + self.encoded_content = encoded_content + + +class GetVpnSitesConfigurationRequest(msrest.serialization.Model): + """List of Vpn-Sites. + + All required parameters must be populated in order to send to Azure. + + :param vpn_sites: List of resource-ids of the vpn-sites for which config is to be downloaded. + :type vpn_sites: list[str] + :param output_blob_sas_url: Required. The sas-url to download the configurations for vpn-sites. + :type output_blob_sas_url: str + """ + + _validation = { + 'output_blob_sas_url': {'required': True}, + } + + _attribute_map = { + 'vpn_sites': {'key': 'vpnSites', 'type': '[str]'}, + 'output_blob_sas_url': {'key': 'outputBlobSasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + output_blob_sas_url: str, + vpn_sites: Optional[List[str]] = None, + **kwargs + ): + super(GetVpnSitesConfigurationRequest, self).__init__(**kwargs) + self.vpn_sites = vpn_sites + self.output_blob_sas_url = output_blob_sas_url + + +class HopLink(msrest.serialization.Model): + """Hop link. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar next_hop_id: The ID of the next hop. + :vartype next_hop_id: str + :ivar link_type: Link type. + :vartype link_type: str + :ivar issues: List of issues. + :vartype issues: list[~azure.mgmt.network.v2021_05_01.models.ConnectivityIssue] + :ivar context: Provides additional context on links. + :vartype context: dict[str, str] + :ivar resource_id: Resource ID. + :vartype resource_id: str + :ivar round_trip_time_min: Minimum roundtrip time in milliseconds. + :vartype round_trip_time_min: long + :ivar round_trip_time_avg: Average roundtrip time in milliseconds. + :vartype round_trip_time_avg: long + :ivar round_trip_time_max: Maximum roundtrip time in milliseconds. + :vartype round_trip_time_max: long + """ + + _validation = { + 'next_hop_id': {'readonly': True}, + 'link_type': {'readonly': True}, + 'issues': {'readonly': True}, + 'context': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'round_trip_time_min': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + 'round_trip_time_avg': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + 'round_trip_time_max': {'readonly': True, 'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'next_hop_id': {'key': 'nextHopId', 'type': 'str'}, + 'link_type': {'key': 'linkType', 'type': 'str'}, + 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, + 'context': {'key': 'context', 'type': '{str}'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'round_trip_time_min': {'key': 'properties.roundTripTimeMin', 'type': 'long'}, + 'round_trip_time_avg': {'key': 'properties.roundTripTimeAvg', 'type': 'long'}, + 'round_trip_time_max': {'key': 'properties.roundTripTimeMax', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(HopLink, self).__init__(**kwargs) + self.next_hop_id = None + self.link_type = None + self.issues = None + self.context = None + self.resource_id = None + self.round_trip_time_min = None + self.round_trip_time_avg = None + self.round_trip_time_max = None + + +class HTTPConfiguration(msrest.serialization.Model): + """HTTP configuration of the connectivity check. + + :param method: HTTP method. Possible values include: "Get". + :type method: str or ~azure.mgmt.network.v2021_05_01.models.HTTPMethod + :param headers: List of HTTP headers. + :type headers: list[~azure.mgmt.network.v2021_05_01.models.HTTPHeader] + :param valid_status_codes: Valid status codes. + :type valid_status_codes: list[int] + """ + + _attribute_map = { + 'method': {'key': 'method', 'type': 'str'}, + 'headers': {'key': 'headers', 'type': '[HTTPHeader]'}, + 'valid_status_codes': {'key': 'validStatusCodes', 'type': '[int]'}, + } + + def __init__( + self, + *, + method: Optional[Union[str, "HTTPMethod"]] = None, + headers: Optional[List["HTTPHeader"]] = None, + valid_status_codes: Optional[List[int]] = None, + **kwargs + ): + super(HTTPConfiguration, self).__init__(**kwargs) + self.method = method + self.headers = headers + self.valid_status_codes = valid_status_codes + + +class HTTPHeader(msrest.serialization.Model): + """The HTTP header. + + :param name: The name in HTTP header. + :type name: str + :param value: The value in HTTP header. + :type value: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + value: Optional[str] = None, + **kwargs + ): + super(HTTPHeader, self).__init__(**kwargs) + self.name = name + self.value = value + + +class HubIPAddresses(msrest.serialization.Model): + """IP addresses associated with azure firewall. + + :param public_i_ps: Public IP addresses associated with azure firewall. + :type public_i_ps: ~azure.mgmt.network.v2021_05_01.models.HubPublicIPAddresses + :param private_ip_address: Private IP Address associated with azure firewall. + :type private_ip_address: str + """ + + _attribute_map = { + 'public_i_ps': {'key': 'publicIPs', 'type': 'HubPublicIPAddresses'}, + 'private_ip_address': {'key': 'privateIPAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + public_i_ps: Optional["HubPublicIPAddresses"] = None, + private_ip_address: Optional[str] = None, + **kwargs + ): + super(HubIPAddresses, self).__init__(**kwargs) + self.public_i_ps = public_i_ps + self.private_ip_address = private_ip_address + + +class HubIpConfiguration(SubResource): + """IpConfigurations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the Ip Configuration. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Ipconfiguration type. + :vartype type: str + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param public_ip_address: The reference to the public IP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :ivar provisioning_state: The provisioning state of the IP configuration resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["Subnet"] = None, + public_ip_address: Optional["PublicIPAddress"] = None, + **kwargs + ): + super(HubIpConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.public_ip_address = public_ip_address + self.provisioning_state = None + + +class HubPublicIPAddresses(msrest.serialization.Model): + """Public IP addresses associated with azure firewall. + + :param addresses: The list of Public IP addresses associated with azure firewall or IP + addresses to be retained. + :type addresses: list[~azure.mgmt.network.v2021_05_01.models.AzureFirewallPublicIPAddress] + :param count: The number of Public IP addresses associated with azure firewall. + :type count: int + """ + + _attribute_map = { + 'addresses': {'key': 'addresses', 'type': '[AzureFirewallPublicIPAddress]'}, + 'count': {'key': 'count', 'type': 'int'}, + } + + def __init__( + self, + *, + addresses: Optional[List["AzureFirewallPublicIPAddress"]] = None, + count: Optional[int] = None, + **kwargs + ): + super(HubPublicIPAddresses, self).__init__(**kwargs) + self.addresses = addresses + self.count = count + + +class HubRoute(msrest.serialization.Model): + """RouteTable route. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the Route that is unique within a RouteTable. This name can + be used to access this route. + :type name: str + :param destination_type: Required. The type of destinations (eg: CIDR, ResourceId, Service). + :type destination_type: str + :param destinations: Required. List of all destinations. + :type destinations: list[str] + :param next_hop_type: Required. The type of next hop (eg: ResourceId). + :type next_hop_type: str + :param next_hop: Required. NextHop resource ID. + :type next_hop: str + """ + + _validation = { + 'name': {'required': True}, + 'destination_type': {'required': True}, + 'destinations': {'required': True}, + 'next_hop_type': {'required': True}, + 'next_hop': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'destination_type': {'key': 'destinationType', 'type': 'str'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + destination_type: str, + destinations: List[str], + next_hop_type: str, + next_hop: str, + **kwargs + ): + super(HubRoute, self).__init__(**kwargs) + self.name = name + self.destination_type = destination_type + self.destinations = destinations + self.next_hop_type = next_hop_type + self.next_hop = next_hop + + +class HubRouteTable(SubResource): + """RouteTable resource in a virtual hub. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param routes: List of all routes. + :type routes: list[~azure.mgmt.network.v2021_05_01.models.HubRoute] + :param labels: List of labels associated with this route table. + :type labels: list[str] + :ivar associated_connections: List of all connections associated with this route table. + :vartype associated_connections: list[str] + :ivar propagating_connections: List of all connections that advertise to this route table. + :vartype propagating_connections: list[str] + :ivar provisioning_state: The provisioning state of the RouteTable resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'associated_connections': {'readonly': True}, + 'propagating_connections': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[HubRoute]'}, + 'labels': {'key': 'properties.labels', 'type': '[str]'}, + 'associated_connections': {'key': 'properties.associatedConnections', 'type': '[str]'}, + 'propagating_connections': {'key': 'properties.propagatingConnections', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + routes: Optional[List["HubRoute"]] = None, + labels: Optional[List[str]] = None, + **kwargs + ): + super(HubRouteTable, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.routes = routes + self.labels = labels + self.associated_connections = None + self.propagating_connections = None + self.provisioning_state = None + + +class HubVirtualNetworkConnection(SubResource): + """HubVirtualNetworkConnection Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param remote_virtual_network: Reference to the remote virtual network. + :type remote_virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param allow_hub_to_remote_vnet_transit: Deprecated: VirtualHub to RemoteVnet transit to + enabled or not. + :type allow_hub_to_remote_vnet_transit: bool + :param allow_remote_vnet_to_use_hub_vnet_gateways: Deprecated: Allow RemoteVnet to use Virtual + Hub's gateways. + :type allow_remote_vnet_to_use_hub_vnet_gateways: bool + :param enable_internet_security: Enable internet security. + :type enable_internet_security: bool + :param routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :type routing_configuration: ~azure.mgmt.network.v2021_05_01.models.RoutingConfiguration + :ivar provisioning_state: The provisioning state of the hub virtual network connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, + 'allow_hub_to_remote_vnet_transit': {'key': 'properties.allowHubToRemoteVnetTransit', 'type': 'bool'}, + 'allow_remote_vnet_to_use_hub_vnet_gateways': {'key': 'properties.allowRemoteVnetToUseHubVnetGateways', 'type': 'bool'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + remote_virtual_network: Optional["SubResource"] = None, + allow_hub_to_remote_vnet_transit: Optional[bool] = None, + allow_remote_vnet_to_use_hub_vnet_gateways: Optional[bool] = None, + enable_internet_security: Optional[bool] = None, + routing_configuration: Optional["RoutingConfiguration"] = None, + **kwargs + ): + super(HubVirtualNetworkConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.remote_virtual_network = remote_virtual_network + self.allow_hub_to_remote_vnet_transit = allow_hub_to_remote_vnet_transit + self.allow_remote_vnet_to_use_hub_vnet_gateways = allow_remote_vnet_to_use_hub_vnet_gateways + self.enable_internet_security = enable_internet_security + self.routing_configuration = routing_configuration + self.provisioning_state = None + + +class IDPSQueryObject(msrest.serialization.Model): + """Will describe the query to run against the IDPS signatures DB. + + :param filters: Contain all filters names and values. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.FilterItems] + :param search: Search term in all columns. + :type search: str + :param order_by: Column to sort response by. + :type order_by: ~azure.mgmt.network.v2021_05_01.models.OrderBy + :param results_per_page: The number of the results to return in each page. + :type results_per_page: int + :param skip: The number of records matching the filter to skip. + :type skip: int + """ + + _validation = { + 'results_per_page': {'maximum': 1000, 'minimum': 1}, + } + + _attribute_map = { + 'filters': {'key': 'filters', 'type': '[FilterItems]'}, + 'search': {'key': 'search', 'type': 'str'}, + 'order_by': {'key': 'orderBy', 'type': 'OrderBy'}, + 'results_per_page': {'key': 'resultsPerPage', 'type': 'int'}, + 'skip': {'key': 'skip', 'type': 'int'}, + } + + def __init__( + self, + *, + filters: Optional[List["FilterItems"]] = None, + search: Optional[str] = None, + order_by: Optional["OrderBy"] = None, + results_per_page: Optional[int] = None, + skip: Optional[int] = None, + **kwargs + ): + super(IDPSQueryObject, self).__init__(**kwargs) + self.filters = filters + self.search = search + self.order_by = order_by + self.results_per_page = results_per_page + self.skip = skip + + +class InboundNatPool(SubResource): + """Inbound NAT pool of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of inbound NAT pools used + by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param frontend_ip_configuration: A reference to frontend IP addresses. + :type frontend_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param protocol: The reference to the transport protocol used by the inbound NAT pool. Possible + values include: "Udp", "Tcp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.TransportProtocol + :param frontend_port_range_start: The first port number in the range of external ports that + will be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values + range between 1 and 65534. + :type frontend_port_range_start: int + :param frontend_port_range_end: The last port number in the range of external ports that will + be used to provide Inbound Nat to NICs associated with a load balancer. Acceptable values range + between 1 and 65535. + :type frontend_port_range_end: int + :param backend_port: The port used for internal connections on the endpoint. Acceptable values + are between 1 and 65535. + :type backend_port: int + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :type idle_timeout_in_minutes: int + :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :type enable_floating_ip: bool + :param enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :type enable_tcp_reset: bool + :ivar provisioning_state: The provisioning state of the inbound NAT pool resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, + 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, + 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_ip_configuration: Optional["SubResource"] = None, + protocol: Optional[Union[str, "TransportProtocol"]] = None, + frontend_port_range_start: Optional[int] = None, + frontend_port_range_end: Optional[int] = None, + backend_port: Optional[int] = None, + idle_timeout_in_minutes: Optional[int] = None, + enable_floating_ip: Optional[bool] = None, + enable_tcp_reset: Optional[bool] = None, + **kwargs + ): + super(InboundNatPool, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.frontend_ip_configuration = frontend_ip_configuration + self.protocol = protocol + self.frontend_port_range_start = frontend_port_range_start + self.frontend_port_range_end = frontend_port_range_end + self.backend_port = backend_port + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_floating_ip = enable_floating_ip + self.enable_tcp_reset = enable_tcp_reset + self.provisioning_state = None + + +class InboundNatRule(SubResource): + """Inbound NAT rule of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of inbound NAT rules used + by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param frontend_ip_configuration: A reference to frontend IP addresses. + :type frontend_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar backend_ip_configuration: A reference to a private IP address defined on a network + interface of a VM. Traffic sent to the frontend port of each of the frontend IP configurations + is forwarded to the backend IP. + :vartype backend_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration + :param protocol: The reference to the transport protocol used by the load balancing rule. + Possible values include: "Udp", "Tcp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.TransportProtocol + :param frontend_port: The port for the external endpoint. Port numbers for each rule must be + unique within the Load Balancer. Acceptable values range from 1 to 65534. + :type frontend_port: int + :param backend_port: The port used for the internal endpoint. Acceptable values range from 1 to + 65535. + :type backend_port: int + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :type idle_timeout_in_minutes: int + :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :type enable_floating_ip: bool + :param enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :type enable_tcp_reset: bool + :param frontend_port_range_start: The port range start for the external endpoint. This property + is used together with BackendAddressPool and FrontendPortRangeEnd. Individual inbound NAT rule + port mappings will be created for each backend address from BackendAddressPool. Acceptable + values range from 1 to 65534. + :type frontend_port_range_start: int + :param frontend_port_range_end: The port range end for the external endpoint. This property is + used together with BackendAddressPool and FrontendPortRangeStart. Individual inbound NAT rule + port mappings will be created for each backend address from BackendAddressPool. Acceptable + values range from 1 to 65534. + :type frontend_port_range_end: int + :param backend_address_pool: A reference to backendAddressPool resource. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the inbound NAT rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'backend_ip_configuration': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'backend_ip_configuration': {'key': 'properties.backendIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'frontend_port_range_start': {'key': 'properties.frontendPortRangeStart', 'type': 'int'}, + 'frontend_port_range_end': {'key': 'properties.frontendPortRangeEnd', 'type': 'int'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_ip_configuration: Optional["SubResource"] = None, + protocol: Optional[Union[str, "TransportProtocol"]] = None, + frontend_port: Optional[int] = None, + backend_port: Optional[int] = None, + idle_timeout_in_minutes: Optional[int] = None, + enable_floating_ip: Optional[bool] = None, + enable_tcp_reset: Optional[bool] = None, + frontend_port_range_start: Optional[int] = None, + frontend_port_range_end: Optional[int] = None, + backend_address_pool: Optional["SubResource"] = None, + **kwargs + ): + super(InboundNatRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.frontend_ip_configuration = frontend_ip_configuration + self.backend_ip_configuration = None + self.protocol = protocol + self.frontend_port = frontend_port + self.backend_port = backend_port + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_floating_ip = enable_floating_ip + self.enable_tcp_reset = enable_tcp_reset + self.frontend_port_range_start = frontend_port_range_start + self.frontend_port_range_end = frontend_port_range_end + self.backend_address_pool = backend_address_pool + self.provisioning_state = None + + +class InboundNatRuleListResult(msrest.serialization.Model): + """Response for ListInboundNatRule API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of inbound NAT rules in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.InboundNatRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[InboundNatRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["InboundNatRule"]] = None, + **kwargs + ): + super(InboundNatRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class InboundNatRulePortMapping(msrest.serialization.Model): + """Individual port mappings for inbound NAT rule created for backend pool. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar inbound_nat_rule_name: Name of inbound NAT rule. + :vartype inbound_nat_rule_name: str + :ivar protocol: The reference to the transport protocol used by the inbound NAT rule. Possible + values include: "Udp", "Tcp", "All". + :vartype protocol: str or ~azure.mgmt.network.v2021_05_01.models.TransportProtocol + :ivar frontend_port: Frontend port. + :vartype frontend_port: int + :ivar backend_port: Backend port. + :vartype backend_port: int + """ + + _validation = { + 'inbound_nat_rule_name': {'readonly': True}, + 'protocol': {'readonly': True}, + 'frontend_port': {'readonly': True}, + 'backend_port': {'readonly': True}, + } + + _attribute_map = { + 'inbound_nat_rule_name': {'key': 'inboundNatRuleName', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(InboundNatRulePortMapping, self).__init__(**kwargs) + self.inbound_nat_rule_name = None + self.protocol = None + self.frontend_port = None + self.backend_port = None + + +class InboundSecurityRule(SubResource): + """NVA Inbound Security Rule resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of security rule collection. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: NVA inbound security rule type. + :vartype type: str + :param rules: List of allowed rules. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.InboundSecurityRules] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'rules': {'key': 'properties.rules', 'type': '[InboundSecurityRules]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + rules: Optional[List["InboundSecurityRules"]] = None, + **kwargs + ): + super(InboundSecurityRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.rules = rules + self.provisioning_state = None + + +class InboundSecurityRules(msrest.serialization.Model): + """Properties of the Inbound Security Rules resource. + + :param protocol: Protocol. This should be either TCP or UDP. Possible values include: "TCP", + "UDP". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.InboundSecurityRulesProtocol + :param source_address_prefix: The CIDR or source IP range. Only /30, /31 and /32 Ip ranges are + allowed. + :type source_address_prefix: str + :param destination_port_range: NVA port ranges to be opened up. One needs to provide specific + ports. + :type destination_port_range: int + """ + + _validation = { + 'destination_port_range': {'maximum': 65535, 'minimum': 0}, + } + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_address_prefix': {'key': 'sourceAddressPrefix', 'type': 'str'}, + 'destination_port_range': {'key': 'destinationPortRange', 'type': 'int'}, + } + + def __init__( + self, + *, + protocol: Optional[Union[str, "InboundSecurityRulesProtocol"]] = None, + source_address_prefix: Optional[str] = None, + destination_port_range: Optional[int] = None, + **kwargs + ): + super(InboundSecurityRules, self).__init__(**kwargs) + self.protocol = protocol + self.source_address_prefix = source_address_prefix + self.destination_port_range = destination_port_range + + +class IPAddressAvailabilityResult(msrest.serialization.Model): + """Response for CheckIPAddressAvailability API service call. + + :param available: Private IP address availability. + :type available: bool + :param available_ip_addresses: Contains other available private IP addresses if the asked for + address is taken. + :type available_ip_addresses: list[str] + :param is_platform_reserved: Private IP address platform reserved. + :type is_platform_reserved: bool + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': 'bool'}, + 'available_ip_addresses': {'key': 'availableIPAddresses', 'type': '[str]'}, + 'is_platform_reserved': {'key': 'isPlatformReserved', 'type': 'bool'}, + } + + def __init__( + self, + *, + available: Optional[bool] = None, + available_ip_addresses: Optional[List[str]] = None, + is_platform_reserved: Optional[bool] = None, + **kwargs + ): + super(IPAddressAvailabilityResult, self).__init__(**kwargs) + self.available = available + self.available_ip_addresses = available_ip_addresses + self.is_platform_reserved = is_platform_reserved + + +class IpAllocation(Resource): + """IpAllocation resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar subnet: The Subnet that using the prefix of this IpAllocation resource. + :vartype subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar virtual_network: The VirtualNetwork that using the prefix of this IpAllocation resource. + :vartype virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param type_properties_type: The type for the IpAllocation. Possible values include: + "Undefined", "Hypernet". + :type type_properties_type: str or ~azure.mgmt.network.v2021_05_01.models.IpAllocationType + :param prefix: The address prefix for the IpAllocation. + :type prefix: str + :param prefix_length: The address prefix length for the IpAllocation. + :type prefix_length: int + :param prefix_type: The address prefix Type for the IpAllocation. Possible values include: + "IPv4", "IPv6". + :type prefix_type: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :param ipam_allocation_id: The IPAM allocation ID. + :type ipam_allocation_id: str + :param allocation_tags: IpAllocation tags. + :type allocation_tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'subnet': {'readonly': True}, + 'virtual_network': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'prefix': {'key': 'properties.prefix', 'type': 'str'}, + 'prefix_length': {'key': 'properties.prefixLength', 'type': 'int'}, + 'prefix_type': {'key': 'properties.prefixType', 'type': 'str'}, + 'ipam_allocation_id': {'key': 'properties.ipamAllocationId', 'type': 'str'}, + 'allocation_tags': {'key': 'properties.allocationTags', 'type': '{str}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + type_properties_type: Optional[Union[str, "IpAllocationType"]] = None, + prefix: Optional[str] = None, + prefix_length: Optional[int] = 0, + prefix_type: Optional[Union[str, "IPVersion"]] = None, + ipam_allocation_id: Optional[str] = None, + allocation_tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(IpAllocation, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.subnet = None + self.virtual_network = None + self.type_properties_type = type_properties_type + self.prefix = prefix + self.prefix_length = prefix_length + self.prefix_type = prefix_type + self.ipam_allocation_id = ipam_allocation_id + self.allocation_tags = allocation_tags + + +class IpAllocationListResult(msrest.serialization.Model): + """Response for the ListIpAllocations API service call. + + :param value: A list of IpAllocation resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.IpAllocation] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IpAllocation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["IpAllocation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(IpAllocationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class IPConfiguration(SubResource): + """IP configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param public_ip_address: The reference to the public IP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :ivar provisioning_state: The provisioning state of the IP configuration resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["Subnet"] = None, + public_ip_address: Optional["PublicIPAddress"] = None, + **kwargs + ): + super(IPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.public_ip_address = public_ip_address + self.provisioning_state = None + + +class IPConfigurationBgpPeeringAddress(msrest.serialization.Model): + """Properties of IPConfigurationBgpPeeringAddress. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param ipconfiguration_id: The ID of IP configuration which belongs to gateway. + :type ipconfiguration_id: str + :ivar default_bgp_ip_addresses: The list of default BGP peering addresses which belong to IP + configuration. + :vartype default_bgp_ip_addresses: list[str] + :param custom_bgp_ip_addresses: The list of custom BGP peering addresses which belong to IP + configuration. + :type custom_bgp_ip_addresses: list[str] + :ivar tunnel_ip_addresses: The list of tunnel public IP addresses which belong to IP + configuration. + :vartype tunnel_ip_addresses: list[str] + """ + + _validation = { + 'default_bgp_ip_addresses': {'readonly': True}, + 'tunnel_ip_addresses': {'readonly': True}, + } + + _attribute_map = { + 'ipconfiguration_id': {'key': 'ipconfigurationId', 'type': 'str'}, + 'default_bgp_ip_addresses': {'key': 'defaultBgpIpAddresses', 'type': '[str]'}, + 'custom_bgp_ip_addresses': {'key': 'customBgpIpAddresses', 'type': '[str]'}, + 'tunnel_ip_addresses': {'key': 'tunnelIpAddresses', 'type': '[str]'}, + } + + def __init__( + self, + *, + ipconfiguration_id: Optional[str] = None, + custom_bgp_ip_addresses: Optional[List[str]] = None, + **kwargs + ): + super(IPConfigurationBgpPeeringAddress, self).__init__(**kwargs) + self.ipconfiguration_id = ipconfiguration_id + self.default_bgp_ip_addresses = None + self.custom_bgp_ip_addresses = custom_bgp_ip_addresses + self.tunnel_ip_addresses = None + + +class IPConfigurationProfile(SubResource): + """IP configuration profile child resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource. This name can be used to access the resource. + :type name: str + :ivar type: Sub Resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param subnet: The reference to the subnet resource to create a container network interface ip + configuration. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :ivar provisioning_state: The provisioning state of the IP configuration profile resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + subnet: Optional["Subnet"] = None, + **kwargs + ): + super(IPConfigurationProfile, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.subnet = subnet + self.provisioning_state = None + + +class IpGroup(Resource): + """The IpGroups resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the IpGroups resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param ip_addresses: IpAddresses/IpAddressPrefixes in the IpGroups resource. + :type ip_addresses: list[str] + :ivar firewalls: List of references to Firewall resources that this IpGroups is associated + with. + :vartype firewalls: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar firewall_policies: List of references to Firewall Policies resources that this IpGroups + is associated with. + :vartype firewall_policies: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'firewalls': {'readonly': True}, + 'firewall_policies': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'ip_addresses': {'key': 'properties.ipAddresses', 'type': '[str]'}, + 'firewalls': {'key': 'properties.firewalls', 'type': '[SubResource]'}, + 'firewall_policies': {'key': 'properties.firewallPolicies', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + ip_addresses: Optional[List[str]] = None, + **kwargs + ): + super(IpGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.provisioning_state = None + self.ip_addresses = ip_addresses + self.firewalls = None + self.firewall_policies = None + + +class IpGroupListResult(msrest.serialization.Model): + """Response for the ListIpGroups API service call. + + :param value: The list of IpGroups information resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.IpGroup] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[IpGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["IpGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(IpGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class IpsecPolicy(msrest.serialization.Model): + """An IPSec Policy configuration for a virtual network gateway connection. + + All required parameters must be populated in order to send to Azure. + + :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) lifetime in seconds for a site to site VPN tunnel. + :type sa_life_time_seconds: int + :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) payload size in KB for a site to site VPN tunnel. + :type sa_data_size_kilobytes: int + :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible + values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", + "GCMAES256". + :type ipsec_encryption: str or ~azure.mgmt.network.v2021_05_01.models.IpsecEncryption + :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values + include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". + :type ipsec_integrity: str or ~azure.mgmt.network.v2021_05_01.models.IpsecIntegrity + :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values + include: "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES256", "GCMAES128". + :type ike_encryption: str or ~azure.mgmt.network.v2021_05_01.models.IkeEncryption + :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values + include: "MD5", "SHA1", "SHA256", "SHA384", "GCMAES256", "GCMAES128". + :type ike_integrity: str or ~azure.mgmt.network.v2021_05_01.models.IkeIntegrity + :param dh_group: Required. The DH Group used in IKE Phase 1 for initial SA. Possible values + include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", + "DHGroup24". + :type dh_group: str or ~azure.mgmt.network.v2021_05_01.models.DhGroup + :param pfs_group: Required. The Pfs Group used in IKE Phase 2 for new child SA. Possible values + include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24", "PFS14", "PFSMM". + :type pfs_group: str or ~azure.mgmt.network.v2021_05_01.models.PfsGroup + """ + + _validation = { + 'sa_life_time_seconds': {'required': True}, + 'sa_data_size_kilobytes': {'required': True}, + 'ipsec_encryption': {'required': True}, + 'ipsec_integrity': {'required': True}, + 'ike_encryption': {'required': True}, + 'ike_integrity': {'required': True}, + 'dh_group': {'required': True}, + 'pfs_group': {'required': True}, + } + + _attribute_map = { + 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, + 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, + 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, + 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, + 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, + 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, + 'dh_group': {'key': 'dhGroup', 'type': 'str'}, + 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, + } + + def __init__( + self, + *, + sa_life_time_seconds: int, + sa_data_size_kilobytes: int, + ipsec_encryption: Union[str, "IpsecEncryption"], + ipsec_integrity: Union[str, "IpsecIntegrity"], + ike_encryption: Union[str, "IkeEncryption"], + ike_integrity: Union[str, "IkeIntegrity"], + dh_group: Union[str, "DhGroup"], + pfs_group: Union[str, "PfsGroup"], + **kwargs + ): + super(IpsecPolicy, self).__init__(**kwargs) + self.sa_life_time_seconds = sa_life_time_seconds + self.sa_data_size_kilobytes = sa_data_size_kilobytes + self.ipsec_encryption = ipsec_encryption + self.ipsec_integrity = ipsec_integrity + self.ike_encryption = ike_encryption + self.ike_integrity = ike_integrity + self.dh_group = dh_group + self.pfs_group = pfs_group + + +class IpTag(msrest.serialization.Model): + """Contains the IpTag associated with the object. + + :param ip_tag_type: The IP tag type. Example: FirstPartyUsage. + :type ip_tag_type: str + :param tag: The value of the IP tag associated with the public IP. Example: SQL. + :type tag: str + """ + + _attribute_map = { + 'ip_tag_type': {'key': 'ipTagType', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_tag_type: Optional[str] = None, + tag: Optional[str] = None, + **kwargs + ): + super(IpTag, self).__init__(**kwargs) + self.ip_tag_type = ip_tag_type + self.tag = tag + + +class Ipv6CircuitConnectionConfig(msrest.serialization.Model): + """IPv6 Circuit Connection properties for global reach. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param address_prefix: /125 IP address space to carve out customer addresses for global reach. + :type address_prefix: str + :ivar circuit_connection_status: Express Route Circuit connection state. Possible values + include: "Connected", "Connecting", "Disconnected". + :vartype circuit_connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.CircuitConnectionStatus + """ + + _validation = { + 'circuit_connection_status': {'readonly': True}, + } + + _attribute_map = { + 'address_prefix': {'key': 'addressPrefix', 'type': 'str'}, + 'circuit_connection_status': {'key': 'circuitConnectionStatus', 'type': 'str'}, + } + + def __init__( + self, + *, + address_prefix: Optional[str] = None, + **kwargs + ): + super(Ipv6CircuitConnectionConfig, self).__init__(**kwargs) + self.address_prefix = address_prefix + self.circuit_connection_status = None + + +class Ipv6ExpressRouteCircuitPeeringConfig(msrest.serialization.Model): + """Contains IPv6 peering config. + + :param primary_peer_address_prefix: The primary address prefix. + :type primary_peer_address_prefix: str + :param secondary_peer_address_prefix: The secondary address prefix. + :type secondary_peer_address_prefix: str + :param microsoft_peering_config: The Microsoft peering configuration. + :type microsoft_peering_config: + ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringConfig + :param route_filter: The reference to the RouteFilter resource. + :type route_filter: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param state: The state of peering. Possible values include: "Disabled", "Enabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringState + """ + + _attribute_map = { + 'primary_peer_address_prefix': {'key': 'primaryPeerAddressPrefix', 'type': 'str'}, + 'secondary_peer_address_prefix': {'key': 'secondaryPeerAddressPrefix', 'type': 'str'}, + 'microsoft_peering_config': {'key': 'microsoftPeeringConfig', 'type': 'ExpressRouteCircuitPeeringConfig'}, + 'route_filter': {'key': 'routeFilter', 'type': 'SubResource'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + *, + primary_peer_address_prefix: Optional[str] = None, + secondary_peer_address_prefix: Optional[str] = None, + microsoft_peering_config: Optional["ExpressRouteCircuitPeeringConfig"] = None, + route_filter: Optional["SubResource"] = None, + state: Optional[Union[str, "ExpressRouteCircuitPeeringState"]] = None, + **kwargs + ): + super(Ipv6ExpressRouteCircuitPeeringConfig, self).__init__(**kwargs) + self.primary_peer_address_prefix = primary_peer_address_prefix + self.secondary_peer_address_prefix = secondary_peer_address_prefix + self.microsoft_peering_config = microsoft_peering_config + self.route_filter = route_filter + self.state = state + + +class ListHubRouteTablesResult(msrest.serialization.Model): + """List of RouteTables and a URL nextLink to get the next set of results. + + :param value: List of RouteTables. + :type value: list[~azure.mgmt.network.v2021_05_01.models.HubRouteTable] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HubRouteTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["HubRouteTable"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListHubRouteTablesResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListHubVirtualNetworkConnectionsResult(msrest.serialization.Model): + """List of HubVirtualNetworkConnections and a URL nextLink to get the next set of results. + + :param value: List of HubVirtualNetworkConnections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.HubVirtualNetworkConnection] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HubVirtualNetworkConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["HubVirtualNetworkConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListHubVirtualNetworkConnectionsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListP2SVpnGatewaysResult(msrest.serialization.Model): + """Result of the request to list P2SVpnGateways. It contains a list of P2SVpnGateways and a URL nextLink to get the next set of results. + + :param value: List of P2SVpnGateways. + :type value: list[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[P2SVpnGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["P2SVpnGateway"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListP2SVpnGatewaysResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListRoutingIntentResult(msrest.serialization.Model): + """List of the routing intent result and a URL nextLink to get the next set of results. + + :param value: List of RoutingIntent resource. + :type value: list[~azure.mgmt.network.v2021_05_01.models.RoutingIntent] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RoutingIntent]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RoutingIntent"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListRoutingIntentResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualHubBgpConnectionResults(msrest.serialization.Model): + """VirtualHubBgpConnections list. + + :param value: The list of VirtualHubBgpConnections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BgpConnection] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BgpConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BgpConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVirtualHubBgpConnectionResults, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualHubIpConfigurationResults(msrest.serialization.Model): + """VirtualHubIpConfigurations list. + + :param value: The list of VirtualHubIpConfigurations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.HubIpConfiguration] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[HubIpConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["HubIpConfiguration"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVirtualHubIpConfigurationResults, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualHubRouteTableV2SResult(msrest.serialization.Model): + """List of VirtualHubRouteTableV2s and a URL nextLink to get the next set of results. + + :param value: List of VirtualHubRouteTableV2s. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualHubRouteTableV2]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualHubRouteTableV2"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVirtualHubRouteTableV2SResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualHubsResult(msrest.serialization.Model): + """Result of the request to list VirtualHubs. It contains a list of VirtualHubs and a URL nextLink to get the next set of results. + + :param value: List of VirtualHubs. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualHub] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualHub]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualHub"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVirtualHubsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualNetworkGatewayNatRulesResult(msrest.serialization.Model): + """Result of the request to list all nat rules to a virtual network gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. + + :param value: List of Nat Rules. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayNatRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkGatewayNatRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVirtualNetworkGatewayNatRulesResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVirtualWANsResult(msrest.serialization.Model): + """Result of the request to list VirtualWANs. It contains a list of VirtualWANs and a URL nextLink to get the next set of results. + + :param value: List of VirtualWANs. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualWAN] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualWAN]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualWAN"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVirtualWANsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnConnectionsResult(msrest.serialization.Model): + """Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. + + :param value: List of Vpn Connections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnConnection] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVpnConnectionsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnGatewayNatRulesResult(msrest.serialization.Model): + """Result of the request to list all nat rules to a virtual wan vpn gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results. + + :param value: List of Nat Rules. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnGatewayNatRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnGatewayNatRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVpnGatewayNatRulesResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnGatewaysResult(msrest.serialization.Model): + """Result of the request to list VpnGateways. It contains a list of VpnGateways and a URL nextLink to get the next set of results. + + :param value: List of VpnGateways. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnGateway] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnGateway"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVpnGatewaysResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnServerConfigurationsResult(msrest.serialization.Model): + """Result of the request to list all VpnServerConfigurations. It contains a list of VpnServerConfigurations and a URL nextLink to get the next set of results. + + :param value: List of VpnServerConfigurations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnServerConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnServerConfiguration"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVpnServerConfigurationsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnSiteLinkConnectionsResult(msrest.serialization.Model): + """Result of the request to list all vpn connections to a virtual wan vpn gateway. It contains a list of Vpn Connections and a URL nextLink to get the next set of results. + + :param value: List of VpnSiteLinkConnections. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnSiteLinkConnection] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnSiteLinkConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnSiteLinkConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVpnSiteLinkConnectionsResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnSiteLinksResult(msrest.serialization.Model): + """Result of the request to list VpnSiteLinks. It contains a list of VpnSiteLinks and a URL nextLink to get the next set of results. + + :param value: List of VpnSitesLinks. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnSiteLink] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnSiteLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnSiteLink"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVpnSiteLinksResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ListVpnSitesResult(msrest.serialization.Model): + """Result of the request to list VpnSites. It contains a list of VpnSites and a URL nextLink to get the next set of results. + + :param value: List of VpnSites. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnSite] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnSite]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnSite"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ListVpnSitesResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class LoadBalancer(Resource): + """LoadBalancer resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the load balancer. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :param sku: The load balancer SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.LoadBalancerSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param frontend_ip_configurations: Object representing the frontend IPs to be used for the load + balancer. + :type frontend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration] + :param backend_address_pools: Collection of backend address pools used by a load balancer. + :type backend_address_pools: list[~azure.mgmt.network.v2021_05_01.models.BackendAddressPool] + :param load_balancing_rules: Object collection representing the load balancing rules Gets the + provisioning. + :type load_balancing_rules: list[~azure.mgmt.network.v2021_05_01.models.LoadBalancingRule] + :param probes: Collection of probe objects used in the load balancer. + :type probes: list[~azure.mgmt.network.v2021_05_01.models.Probe] + :param inbound_nat_rules: Collection of inbound NAT Rules used by a load balancer. Defining + inbound NAT rules on your load balancer is mutually exclusive with defining an inbound NAT + pool. Inbound NAT pools are referenced from virtual machine scale sets. NICs that are + associated with individual virtual machines cannot reference an Inbound NAT pool. They have to + reference individual inbound NAT rules. + :type inbound_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.InboundNatRule] + :param inbound_nat_pools: Defines an external port range for inbound NAT to a single backend + port on NICs associated with a load balancer. Inbound NAT rules are created automatically for + each NIC associated with the Load Balancer using an external port from this range. Defining an + Inbound NAT pool on your Load Balancer is mutually exclusive with defining inbound NAT rules. + Inbound NAT pools are referenced from virtual machine scale sets. NICs that are associated with + individual virtual machines cannot reference an inbound NAT pool. They have to reference + individual inbound NAT rules. + :type inbound_nat_pools: list[~azure.mgmt.network.v2021_05_01.models.InboundNatPool] + :param outbound_rules: The outbound rules. + :type outbound_rules: list[~azure.mgmt.network.v2021_05_01.models.OutboundRule] + :ivar resource_guid: The resource GUID property of the load balancer resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the load balancer resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'sku': {'key': 'sku', 'type': 'LoadBalancerSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[FrontendIPConfiguration]'}, + 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[BackendAddressPool]'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, + 'probes': {'key': 'properties.probes', 'type': '[Probe]'}, + 'inbound_nat_rules': {'key': 'properties.inboundNatRules', 'type': '[InboundNatRule]'}, + 'inbound_nat_pools': {'key': 'properties.inboundNatPools', 'type': '[InboundNatPool]'}, + 'outbound_rules': {'key': 'properties.outboundRules', 'type': '[OutboundRule]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + sku: Optional["LoadBalancerSku"] = None, + frontend_ip_configurations: Optional[List["FrontendIPConfiguration"]] = None, + backend_address_pools: Optional[List["BackendAddressPool"]] = None, + load_balancing_rules: Optional[List["LoadBalancingRule"]] = None, + probes: Optional[List["Probe"]] = None, + inbound_nat_rules: Optional[List["InboundNatRule"]] = None, + inbound_nat_pools: Optional[List["InboundNatPool"]] = None, + outbound_rules: Optional[List["OutboundRule"]] = None, + **kwargs + ): + super(LoadBalancer, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.sku = sku + self.etag = None + self.frontend_ip_configurations = frontend_ip_configurations + self.backend_address_pools = backend_address_pools + self.load_balancing_rules = load_balancing_rules + self.probes = probes + self.inbound_nat_rules = inbound_nat_rules + self.inbound_nat_pools = inbound_nat_pools + self.outbound_rules = outbound_rules + self.resource_guid = None + self.provisioning_state = None + + +class LoadBalancerBackendAddress(msrest.serialization.Model): + """Load balancer backend addresses. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: Name of the backend address. + :type name: str + :param virtual_network: Reference to an existing virtual network. + :type virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param subnet: Reference to an existing subnet. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param ip_address: IP Address belonging to the referenced virtual network. + :type ip_address: str + :ivar network_interface_ip_configuration: Reference to IP address defined in network + interfaces. + :vartype network_interface_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param load_balancer_frontend_ip_configuration: Reference to the frontend ip address + configuration defined in regional loadbalancer. + :type load_balancer_frontend_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar inbound_nat_rules_port_mapping: Collection of inbound NAT rule port mappings. + :vartype inbound_nat_rules_port_mapping: + list[~azure.mgmt.network.v2021_05_01.models.NatRulePortMapping] + """ + + _validation = { + 'network_interface_ip_configuration': {'readonly': True}, + 'inbound_nat_rules_port_mapping': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'virtual_network': {'key': 'properties.virtualNetwork', 'type': 'SubResource'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'network_interface_ip_configuration': {'key': 'properties.networkInterfaceIPConfiguration', 'type': 'SubResource'}, + 'load_balancer_frontend_ip_configuration': {'key': 'properties.loadBalancerFrontendIPConfiguration', 'type': 'SubResource'}, + 'inbound_nat_rules_port_mapping': {'key': 'properties.inboundNatRulesPortMapping', 'type': '[NatRulePortMapping]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + virtual_network: Optional["SubResource"] = None, + subnet: Optional["SubResource"] = None, + ip_address: Optional[str] = None, + load_balancer_frontend_ip_configuration: Optional["SubResource"] = None, + **kwargs + ): + super(LoadBalancerBackendAddress, self).__init__(**kwargs) + self.name = name + self.virtual_network = virtual_network + self.subnet = subnet + self.ip_address = ip_address + self.network_interface_ip_configuration = None + self.load_balancer_frontend_ip_configuration = load_balancer_frontend_ip_configuration + self.inbound_nat_rules_port_mapping = None + + +class LoadBalancerBackendAddressPoolListResult(msrest.serialization.Model): + """Response for ListBackendAddressPool API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of backend address pools in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.BackendAddressPool] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[BackendAddressPool]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["BackendAddressPool"]] = None, + **kwargs + ): + super(LoadBalancerBackendAddressPoolListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerFrontendIPConfigurationListResult(msrest.serialization.Model): + """Response for ListFrontendIPConfiguration API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of frontend IP configurations in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[FrontendIPConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["FrontendIPConfiguration"]] = None, + **kwargs + ): + super(LoadBalancerFrontendIPConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerListResult(msrest.serialization.Model): + """Response for ListLoadBalancers API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of load balancers in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.LoadBalancer] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancer]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["LoadBalancer"]] = None, + **kwargs + ): + super(LoadBalancerListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerLoadBalancingRuleListResult(msrest.serialization.Model): + """Response for ListLoadBalancingRule API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of load balancing rules in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.LoadBalancingRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancingRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["LoadBalancingRule"]] = None, + **kwargs + ): + super(LoadBalancerLoadBalancingRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerOutboundRuleListResult(msrest.serialization.Model): + """Response for ListOutboundRule API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of outbound rules in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.OutboundRule] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["OutboundRule"]] = None, + **kwargs + ): + super(LoadBalancerOutboundRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerProbeListResult(msrest.serialization.Model): + """Response for ListProbe API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of probes in a load balancer. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Probe] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Probe]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Probe"]] = None, + **kwargs + ): + super(LoadBalancerProbeListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LoadBalancerSku(msrest.serialization.Model): + """SKU of a load balancer. + + :param name: Name of a load balancer SKU. Possible values include: "Basic", "Standard", + "Gateway". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.LoadBalancerSkuName + :param tier: Tier of a load balancer SKU. Possible values include: "Regional", "Global". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.LoadBalancerSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "LoadBalancerSkuName"]] = None, + tier: Optional[Union[str, "LoadBalancerSkuTier"]] = None, + **kwargs + ): + super(LoadBalancerSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class LoadBalancerVipSwapRequest(msrest.serialization.Model): + """The request for a VIP swap. + + :param frontend_ip_configurations: A list of frontend IP configuration resources that should + swap VIPs. + :type frontend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.LoadBalancerVipSwapRequestFrontendIPConfiguration] + """ + + _attribute_map = { + 'frontend_ip_configurations': {'key': 'frontendIPConfigurations', 'type': '[LoadBalancerVipSwapRequestFrontendIPConfiguration]'}, + } + + def __init__( + self, + *, + frontend_ip_configurations: Optional[List["LoadBalancerVipSwapRequestFrontendIPConfiguration"]] = None, + **kwargs + ): + super(LoadBalancerVipSwapRequest, self).__init__(**kwargs) + self.frontend_ip_configurations = frontend_ip_configurations + + +class LoadBalancerVipSwapRequestFrontendIPConfiguration(msrest.serialization.Model): + """VIP swap request's frontend IP configuration object. + + :param id: The ID of frontend IP configuration resource. + :type id: str + :param public_ip_address: A reference to public IP address resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + public_ip_address: Optional["SubResource"] = None, + **kwargs + ): + super(LoadBalancerVipSwapRequestFrontendIPConfiguration, self).__init__(**kwargs) + self.id = id + self.public_ip_address = public_ip_address + + +class LoadBalancingRule(SubResource): + """A load balancing rule for a load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of load balancing rules + used by the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param frontend_ip_configuration: A reference to frontend IP addresses. + :type frontend_ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_address_pool: A reference to a pool of DIPs. Inbound traffic is randomly load + balanced across IPs in the backend IPs. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param backend_address_pools: An array of references to pool of DIPs. + :type backend_address_pools: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param probe: The reference to the load balancer probe used by the load balancing rule. + :type probe: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param protocol: The reference to the transport protocol used by the load balancing rule. + Possible values include: "Udp", "Tcp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.TransportProtocol + :param load_distribution: The load distribution policy for this rule. Possible values include: + "Default", "SourceIP", "SourceIPProtocol". + :type load_distribution: str or ~azure.mgmt.network.v2021_05_01.models.LoadDistribution + :param frontend_port: The port for the external endpoint. Port numbers for each rule must be + unique within the Load Balancer. Acceptable values are between 0 and 65534. Note that value 0 + enables "Any Port". + :type frontend_port: int + :param backend_port: The port used for internal connections on the endpoint. Acceptable values + are between 0 and 65535. Note that value 0 enables "Any Port". + :type backend_port: int + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. The value can be set + between 4 and 30 minutes. The default value is 4 minutes. This element is only used when the + protocol is set to TCP. + :type idle_timeout_in_minutes: int + :param enable_floating_ip: Configures a virtual machine's endpoint for the floating IP + capability required to configure a SQL AlwaysOn Availability Group. This setting is required + when using the SQL AlwaysOn Availability Groups in SQL server. This setting can't be changed + after you create the endpoint. + :type enable_floating_ip: bool + :param enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :type enable_tcp_reset: bool + :param disable_outbound_snat: Configures SNAT for the VMs in the backend pool to use the + publicIP address specified in the frontend of the load balancing rule. + :type disable_outbound_snat: bool + :ivar provisioning_state: The provisioning state of the load balancing rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'frontend_ip_configuration': {'key': 'properties.frontendIPConfiguration', 'type': 'SubResource'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'backend_address_pools': {'key': 'properties.backendAddressPools', 'type': '[SubResource]'}, + 'probe': {'key': 'properties.probe', 'type': 'SubResource'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'load_distribution': {'key': 'properties.loadDistribution', 'type': 'str'}, + 'frontend_port': {'key': 'properties.frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'properties.backendPort', 'type': 'int'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'enable_floating_ip': {'key': 'properties.enableFloatingIP', 'type': 'bool'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'disable_outbound_snat': {'key': 'properties.disableOutboundSnat', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + frontend_ip_configuration: Optional["SubResource"] = None, + backend_address_pool: Optional["SubResource"] = None, + backend_address_pools: Optional[List["SubResource"]] = None, + probe: Optional["SubResource"] = None, + protocol: Optional[Union[str, "TransportProtocol"]] = None, + load_distribution: Optional[Union[str, "LoadDistribution"]] = None, + frontend_port: Optional[int] = None, + backend_port: Optional[int] = None, + idle_timeout_in_minutes: Optional[int] = None, + enable_floating_ip: Optional[bool] = None, + enable_tcp_reset: Optional[bool] = None, + disable_outbound_snat: Optional[bool] = None, + **kwargs + ): + super(LoadBalancingRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.frontend_ip_configuration = frontend_ip_configuration + self.backend_address_pool = backend_address_pool + self.backend_address_pools = backend_address_pools + self.probe = probe + self.protocol = protocol + self.load_distribution = load_distribution + self.frontend_port = frontend_port + self.backend_port = backend_port + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.enable_floating_ip = enable_floating_ip + self.enable_tcp_reset = enable_tcp_reset + self.disable_outbound_snat = disable_outbound_snat + self.provisioning_state = None + + +class LocalNetworkGateway(Resource): + """A common class for general resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param local_network_address_space: Local network site address space. + :type local_network_address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param gateway_ip_address: IP address of local network gateway. + :type gateway_ip_address: str + :param fqdn: FQDN of local network gateway. + :type fqdn: str + :param bgp_settings: Local network gateway's BGP speaker settings. + :type bgp_settings: ~azure.mgmt.network.v2021_05_01.models.BgpSettings + :ivar resource_guid: The resource GUID property of the local network gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the local network gateway resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'local_network_address_space': {'key': 'properties.localNetworkAddressSpace', 'type': 'AddressSpace'}, + 'gateway_ip_address': {'key': 'properties.gatewayIpAddress', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + local_network_address_space: Optional["AddressSpace"] = None, + gateway_ip_address: Optional[str] = None, + fqdn: Optional[str] = None, + bgp_settings: Optional["BgpSettings"] = None, + **kwargs + ): + super(LocalNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.local_network_address_space = local_network_address_space + self.gateway_ip_address = gateway_ip_address + self.fqdn = fqdn + self.bgp_settings = bgp_settings + self.resource_guid = None + self.provisioning_state = None + + +class LocalNetworkGatewayListResult(msrest.serialization.Model): + """Response for ListLocalNetworkGateways API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of local network gateways that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LocalNetworkGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["LocalNetworkGateway"]] = None, + **kwargs + ): + super(LocalNetworkGatewayListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class LogSpecification(msrest.serialization.Model): + """Description of logging specification. + + :param name: The name of the specification. + :type name: str + :param display_name: The display name of the specification. + :type display_name: str + :param blob_duration: Duration of the blob. + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + blob_duration: Optional[str] = None, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration + + +class ManagedRuleGroupOverride(msrest.serialization.Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :param rule_group_name: Required. The managed rule group to override. + :type rule_group_name: str + :param rules: List of rules that will be disabled. If none specified, all rules in the group + will be disabled. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.ManagedRuleOverride] + """ + + _validation = { + 'rule_group_name': {'required': True}, + } + + _attribute_map = { + 'rule_group_name': {'key': 'ruleGroupName', 'type': 'str'}, + 'rules': {'key': 'rules', 'type': '[ManagedRuleOverride]'}, + } + + def __init__( + self, + *, + rule_group_name: str, + rules: Optional[List["ManagedRuleOverride"]] = None, + **kwargs + ): + super(ManagedRuleGroupOverride, self).__init__(**kwargs) + self.rule_group_name = rule_group_name + self.rules = rules + + +class ManagedRuleOverride(msrest.serialization.Model): + """Defines a managed rule group override setting. + + All required parameters must be populated in order to send to Azure. + + :param rule_id: Required. Identifier for the managed rule. + :type rule_id: str + :param state: The state of the managed rule. Defaults to Disabled if not specified. Possible + values include: "Disabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.ManagedRuleEnabledState + """ + + _validation = { + 'rule_id': {'required': True}, + } + + _attribute_map = { + 'rule_id': {'key': 'ruleId', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + *, + rule_id: str, + state: Optional[Union[str, "ManagedRuleEnabledState"]] = None, + **kwargs + ): + super(ManagedRuleOverride, self).__init__(**kwargs) + self.rule_id = rule_id + self.state = state + + +class ManagedRulesDefinition(msrest.serialization.Model): + """Allow to exclude some variable satisfy the condition for the WAF check. + + All required parameters must be populated in order to send to Azure. + + :param exclusions: The Exclusions that are applied on the policy. + :type exclusions: list[~azure.mgmt.network.v2021_05_01.models.OwaspCrsExclusionEntry] + :param managed_rule_sets: Required. The managed rule sets that are associated with the policy. + :type managed_rule_sets: list[~azure.mgmt.network.v2021_05_01.models.ManagedRuleSet] + """ + + _validation = { + 'managed_rule_sets': {'required': True}, + } + + _attribute_map = { + 'exclusions': {'key': 'exclusions', 'type': '[OwaspCrsExclusionEntry]'}, + 'managed_rule_sets': {'key': 'managedRuleSets', 'type': '[ManagedRuleSet]'}, + } + + def __init__( + self, + *, + managed_rule_sets: List["ManagedRuleSet"], + exclusions: Optional[List["OwaspCrsExclusionEntry"]] = None, + **kwargs + ): + super(ManagedRulesDefinition, self).__init__(**kwargs) + self.exclusions = exclusions + self.managed_rule_sets = managed_rule_sets + + +class ManagedRuleSet(msrest.serialization.Model): + """Defines a managed rule set. + + All required parameters must be populated in order to send to Azure. + + :param rule_set_type: Required. Defines the rule set type to use. + :type rule_set_type: str + :param rule_set_version: Required. Defines the version of the rule set to use. + :type rule_set_version: str + :param rule_group_overrides: Defines the rule group overrides to apply to the rule set. + :type rule_group_overrides: + list[~azure.mgmt.network.v2021_05_01.models.ManagedRuleGroupOverride] + """ + + _validation = { + 'rule_set_type': {'required': True}, + 'rule_set_version': {'required': True}, + } + + _attribute_map = { + 'rule_set_type': {'key': 'ruleSetType', 'type': 'str'}, + 'rule_set_version': {'key': 'ruleSetVersion', 'type': 'str'}, + 'rule_group_overrides': {'key': 'ruleGroupOverrides', 'type': '[ManagedRuleGroupOverride]'}, + } + + def __init__( + self, + *, + rule_set_type: str, + rule_set_version: str, + rule_group_overrides: Optional[List["ManagedRuleGroupOverride"]] = None, + **kwargs + ): + super(ManagedRuleSet, self).__init__(**kwargs) + self.rule_set_type = rule_set_type + self.rule_set_version = rule_set_version + self.rule_group_overrides = rule_group_overrides + + +class ManagedServiceIdentity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal id of the system assigned identity. This property will only + be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the system assigned identity. This property will only be + provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the resource. The type 'SystemAssigned, + UserAssigned' includes both an implicitly created identity and a set of user assigned + identities. The type 'None' will remove any identities from the virtual machine. Possible + values include: "SystemAssigned", "UserAssigned", "SystemAssigned, UserAssigned", "None". + :type type: str or ~azure.mgmt.network.v2021_05_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated with resource. The user + identity dictionary key references will be ARM resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.network.v2021_05_01.models.Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties}'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + user_assigned_identities: Optional[Dict[str, "Components1Jq1T4ISchemasManagedserviceidentityPropertiesUserassignedidentitiesAdditionalproperties"]] = None, + **kwargs + ): + super(ManagedServiceIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class MatchCondition(msrest.serialization.Model): + """Define match conditions. + + All required parameters must be populated in order to send to Azure. + + :param match_variables: Required. List of match variables. + :type match_variables: list[~azure.mgmt.network.v2021_05_01.models.MatchVariable] + :param operator: Required. The operator to be matched. Possible values include: "IPMatch", + "Equal", "Contains", "LessThan", "GreaterThan", "LessThanOrEqual", "GreaterThanOrEqual", + "BeginsWith", "EndsWith", "Regex", "GeoMatch". + :type operator: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallOperator + :param negation_conditon: Whether this is negate condition or not. + :type negation_conditon: bool + :param match_values: Required. Match value. + :type match_values: list[str] + :param transforms: List of transforms. + :type transforms: list[str or + ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallTransform] + """ + + _validation = { + 'match_variables': {'required': True}, + 'operator': {'required': True}, + 'match_values': {'required': True}, + } + + _attribute_map = { + 'match_variables': {'key': 'matchVariables', 'type': '[MatchVariable]'}, + 'operator': {'key': 'operator', 'type': 'str'}, + 'negation_conditon': {'key': 'negationConditon', 'type': 'bool'}, + 'match_values': {'key': 'matchValues', 'type': '[str]'}, + 'transforms': {'key': 'transforms', 'type': '[str]'}, + } + + def __init__( + self, + *, + match_variables: List["MatchVariable"], + operator: Union[str, "WebApplicationFirewallOperator"], + match_values: List[str], + negation_conditon: Optional[bool] = None, + transforms: Optional[List[Union[str, "WebApplicationFirewallTransform"]]] = None, + **kwargs + ): + super(MatchCondition, self).__init__(**kwargs) + self.match_variables = match_variables + self.operator = operator + self.negation_conditon = negation_conditon + self.match_values = match_values + self.transforms = transforms + + +class MatchedRule(msrest.serialization.Model): + """Matched rule. + + :param rule_name: Name of the matched network security rule. + :type rule_name: str + :param action: The network traffic is allowed or denied. Possible values are 'Allow' and + 'Deny'. + :type action: str + """ + + _attribute_map = { + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + *, + rule_name: Optional[str] = None, + action: Optional[str] = None, + **kwargs + ): + super(MatchedRule, self).__init__(**kwargs) + self.rule_name = rule_name + self.action = action + + +class MatchVariable(msrest.serialization.Model): + """Define match variables. + + All required parameters must be populated in order to send to Azure. + + :param variable_name: Required. Match Variable. Possible values include: "RemoteAddr", + "RequestMethod", "QueryString", "PostArgs", "RequestUri", "RequestHeaders", "RequestBody", + "RequestCookies". + :type variable_name: str or + ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallMatchVariable + :param selector: The selector of match variable. + :type selector: str + """ + + _validation = { + 'variable_name': {'required': True}, + } + + _attribute_map = { + 'variable_name': {'key': 'variableName', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + } + + def __init__( + self, + *, + variable_name: Union[str, "WebApplicationFirewallMatchVariable"], + selector: Optional[str] = None, + **kwargs + ): + super(MatchVariable, self).__init__(**kwargs) + self.variable_name = variable_name + self.selector = selector + + +class MetricSpecification(msrest.serialization.Model): + """Description of metrics specification. + + :param name: The name of the metric. + :type name: str + :param display_name: The display name of the metric. + :type display_name: str + :param display_description: The description of the metric. + :type display_description: str + :param unit: Units the metric to be displayed in. + :type unit: str + :param aggregation_type: The aggregation type. + :type aggregation_type: str + :param availabilities: List of availability. + :type availabilities: list[~azure.mgmt.network.v2021_05_01.models.Availability] + :param enable_regional_mdm_account: Whether regional MDM account enabled. + :type enable_regional_mdm_account: bool + :param fill_gap_with_zero: Whether gaps would be filled with zeros. + :type fill_gap_with_zero: bool + :param metric_filter_pattern: Pattern for the filter of the metric. + :type metric_filter_pattern: str + :param dimensions: List of dimensions. + :type dimensions: list[~azure.mgmt.network.v2021_05_01.models.Dimension] + :param is_internal: Whether the metric is internal. + :type is_internal: bool + :param source_mdm_account: The source MDM account. + :type source_mdm_account: str + :param source_mdm_namespace: The source MDM namespace. + :type source_mdm_namespace: str + :param resource_id_dimension_name_override: The resource Id dimension name override. + :type resource_id_dimension_name_override: str + """ + + _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'}, + 'availabilities': {'key': 'availabilities', 'type': '[Availability]'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'is_internal': {'key': 'isInternal', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'resource_id_dimension_name_override': {'key': 'resourceIdDimensionNameOverride', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + aggregation_type: Optional[str] = None, + availabilities: Optional[List["Availability"]] = None, + enable_regional_mdm_account: Optional[bool] = None, + fill_gap_with_zero: Optional[bool] = None, + metric_filter_pattern: Optional[str] = None, + dimensions: Optional[List["Dimension"]] = None, + is_internal: Optional[bool] = None, + source_mdm_account: Optional[str] = None, + source_mdm_namespace: Optional[str] = None, + resource_id_dimension_name_override: Optional[str] = None, + **kwargs + ): + 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.availabilities = availabilities + self.enable_regional_mdm_account = enable_regional_mdm_account + self.fill_gap_with_zero = fill_gap_with_zero + self.metric_filter_pattern = metric_filter_pattern + self.dimensions = dimensions + self.is_internal = is_internal + self.source_mdm_account = source_mdm_account + self.source_mdm_namespace = source_mdm_namespace + self.resource_id_dimension_name_override = resource_id_dimension_name_override + + +class NatGateway(Resource): + """Nat Gateway resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param sku: The nat gateway SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.NatGatewaySku + :param zones: A list of availability zones denoting the zone in which Nat Gateway should be + deployed. + :type zones: list[str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param idle_timeout_in_minutes: The idle timeout of the nat gateway. + :type idle_timeout_in_minutes: int + :param public_ip_addresses: An array of public ip addresses associated with the nat gateway + resource. + :type public_ip_addresses: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param public_ip_prefixes: An array of public ip prefixes associated with the nat gateway + resource. + :type public_ip_prefixes: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar subnets: An array of references to the subnets using this nat gateway resource. + :vartype subnets: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar resource_guid: The resource GUID property of the NAT gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the NAT gateway resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'subnets': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'sku': {'key': 'sku', 'type': 'NatGatewaySku'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'public_ip_addresses': {'key': 'properties.publicIpAddresses', 'type': '[SubResource]'}, + 'public_ip_prefixes': {'key': 'properties.publicIpPrefixes', 'type': '[SubResource]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[SubResource]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + sku: Optional["NatGatewaySku"] = None, + zones: Optional[List[str]] = None, + idle_timeout_in_minutes: Optional[int] = None, + public_ip_addresses: Optional[List["SubResource"]] = None, + public_ip_prefixes: Optional[List["SubResource"]] = None, + **kwargs + ): + super(NatGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.sku = sku + self.zones = zones + self.etag = None + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.public_ip_addresses = public_ip_addresses + self.public_ip_prefixes = public_ip_prefixes + self.subnets = None + self.resource_guid = None + self.provisioning_state = None + + +class NatGatewayListResult(msrest.serialization.Model): + """Response for ListNatGateways API service call. + + :param value: A list of Nat Gateways that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NatGateway] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NatGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NatGateway"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NatGatewayListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NatGatewaySku(msrest.serialization.Model): + """SKU of nat gateway. + + :param name: Name of Nat Gateway SKU. Possible values include: "Standard". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.NatGatewaySkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "NatGatewaySkuName"]] = None, + **kwargs + ): + super(NatGatewaySku, self).__init__(**kwargs) + self.name = name + + +class NatRule(FirewallPolicyRule): + """Rule of type nat. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleType + :param ip_protocols: Array of FirewallPolicyRuleNetworkProtocols. + :type ip_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleNetworkProtocol] + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses or Service Tags. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param translated_address: The translated address for this NAT rule. + :type translated_address: str + :param translated_port: The translated port for this NAT rule. + :type translated_port: str + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param translated_fqdn: The translated FQDN for this NAT rule. + :type translated_fqdn: str + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'ip_protocols': {'key': 'ipProtocols', 'type': '[str]'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'translated_address': {'key': 'translatedAddress', 'type': 'str'}, + 'translated_port': {'key': 'translatedPort', 'type': 'str'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'translated_fqdn': {'key': 'translatedFqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + ip_protocols: Optional[List[Union[str, "FirewallPolicyRuleNetworkProtocol"]]] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + translated_address: Optional[str] = None, + translated_port: Optional[str] = None, + source_ip_groups: Optional[List[str]] = None, + translated_fqdn: Optional[str] = None, + **kwargs + ): + super(NatRule, self).__init__(name=name, description=description, **kwargs) + self.rule_type = 'NatRule' # type: str + self.ip_protocols = ip_protocols + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.translated_address = translated_address + self.translated_port = translated_port + self.source_ip_groups = source_ip_groups + self.translated_fqdn = translated_fqdn + + +class NatRulePortMapping(msrest.serialization.Model): + """Individual port mappings for inbound NAT rule created for backend pool. + + :param inbound_nat_rule_name: Name of inbound NAT rule. + :type inbound_nat_rule_name: str + :param frontend_port: Frontend port. + :type frontend_port: int + :param backend_port: Backend port. + :type backend_port: int + """ + + _attribute_map = { + 'inbound_nat_rule_name': {'key': 'inboundNatRuleName', 'type': 'str'}, + 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, + 'backend_port': {'key': 'backendPort', 'type': 'int'}, + } + + def __init__( + self, + *, + inbound_nat_rule_name: Optional[str] = None, + frontend_port: Optional[int] = None, + backend_port: Optional[int] = None, + **kwargs + ): + super(NatRulePortMapping, self).__init__(**kwargs) + self.inbound_nat_rule_name = inbound_nat_rule_name + self.frontend_port = frontend_port + self.backend_port = backend_port + + +class NetworkConfigurationDiagnosticParameters(msrest.serialization.Model): + """Parameters to get network configuration diagnostic. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The ID of the target resource to perform network + configuration diagnostic. Valid options are VM, NetworkInterface, VMSS/NetworkInterface and + Application Gateway. + :type target_resource_id: str + :param verbosity_level: Verbosity level. Possible values include: "Normal", "Minimum", "Full". + :type verbosity_level: str or ~azure.mgmt.network.v2021_05_01.models.VerbosityLevel + :param profiles: Required. List of network configuration diagnostic profiles. + :type profiles: + list[~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticProfile] + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'profiles': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'verbosity_level': {'key': 'verbosityLevel', 'type': 'str'}, + 'profiles': {'key': 'profiles', 'type': '[NetworkConfigurationDiagnosticProfile]'}, + } + + def __init__( + self, + *, + target_resource_id: str, + profiles: List["NetworkConfigurationDiagnosticProfile"], + verbosity_level: Optional[Union[str, "VerbosityLevel"]] = None, + **kwargs + ): + super(NetworkConfigurationDiagnosticParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.verbosity_level = verbosity_level + self.profiles = profiles + + +class NetworkConfigurationDiagnosticProfile(msrest.serialization.Model): + """Parameters to compare with network configuration. + + All required parameters must be populated in order to send to Azure. + + :param direction: Required. The direction of the traffic. Possible values include: "Inbound", + "Outbound". + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.Direction + :param protocol: Required. Protocol to be verified on. Accepted values are '*', TCP, UDP. + :type protocol: str + :param source: Required. Traffic source. Accepted values are '*', IP Address/CIDR, Service Tag. + :type source: str + :param destination: Required. Traffic destination. Accepted values are: '*', IP Address/CIDR, + Service Tag. + :type destination: str + :param destination_port: Required. Traffic destination port. Accepted values are '*' and a + single port in the range (0 - 65535). + :type destination_port: str + """ + + _validation = { + 'direction': {'required': True}, + 'protocol': {'required': True}, + 'source': {'required': True}, + 'destination': {'required': True}, + 'destination_port': {'required': True}, + } + + _attribute_map = { + 'direction': {'key': 'direction', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'destination': {'key': 'destination', 'type': 'str'}, + 'destination_port': {'key': 'destinationPort', 'type': 'str'}, + } + + def __init__( + self, + *, + direction: Union[str, "Direction"], + protocol: str, + source: str, + destination: str, + destination_port: str, + **kwargs + ): + super(NetworkConfigurationDiagnosticProfile, self).__init__(**kwargs) + self.direction = direction + self.protocol = protocol + self.source = source + self.destination = destination + self.destination_port = destination_port + + +class NetworkConfigurationDiagnosticResponse(msrest.serialization.Model): + """Results of network configuration diagnostic on the target resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar results: List of network configuration diagnostic results. + :vartype results: + list[~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticResult] + """ + + _validation = { + 'results': {'readonly': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': '[NetworkConfigurationDiagnosticResult]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkConfigurationDiagnosticResponse, self).__init__(**kwargs) + self.results = None + + +class NetworkConfigurationDiagnosticResult(msrest.serialization.Model): + """Network configuration diagnostic result corresponded to provided traffic query. + + :param profile: Network configuration diagnostic profile. + :type profile: ~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticProfile + :param network_security_group_result: Network security group result. + :type network_security_group_result: + ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroupResult + """ + + _attribute_map = { + 'profile': {'key': 'profile', 'type': 'NetworkConfigurationDiagnosticProfile'}, + 'network_security_group_result': {'key': 'networkSecurityGroupResult', 'type': 'NetworkSecurityGroupResult'}, + } + + def __init__( + self, + *, + profile: Optional["NetworkConfigurationDiagnosticProfile"] = None, + network_security_group_result: Optional["NetworkSecurityGroupResult"] = None, + **kwargs + ): + super(NetworkConfigurationDiagnosticResult, self).__init__(**kwargs) + self.profile = profile + self.network_security_group_result = network_security_group_result + + +class NetworkIntentPolicy(Resource): + """Network Intent Policy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(NetworkIntentPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + + +class NetworkIntentPolicyConfiguration(msrest.serialization.Model): + """Details of NetworkIntentPolicyConfiguration for PrepareNetworkPoliciesRequest. + + :param network_intent_policy_name: The name of the Network Intent Policy for storing in target + subscription. + :type network_intent_policy_name: str + :param source_network_intent_policy: Source network intent policy. + :type source_network_intent_policy: ~azure.mgmt.network.v2021_05_01.models.NetworkIntentPolicy + """ + + _attribute_map = { + 'network_intent_policy_name': {'key': 'networkIntentPolicyName', 'type': 'str'}, + 'source_network_intent_policy': {'key': 'sourceNetworkIntentPolicy', 'type': 'NetworkIntentPolicy'}, + } + + def __init__( + self, + *, + network_intent_policy_name: Optional[str] = None, + source_network_intent_policy: Optional["NetworkIntentPolicy"] = None, + **kwargs + ): + super(NetworkIntentPolicyConfiguration, self).__init__(**kwargs) + self.network_intent_policy_name = network_intent_policy_name + self.source_network_intent_policy = source_network_intent_policy + + +class NetworkInterface(Resource): + """A network interface in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the network interface. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar virtual_machine: The reference to a virtual machine. + :vartype virtual_machine: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param network_security_group: The reference to the NetworkSecurityGroup resource. + :type network_security_group: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup + :ivar private_endpoint: A reference to the private endpoint to which the network interface is + linked. + :vartype private_endpoint: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :param ip_configurations: A list of IPConfigurations of the network interface. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration] + :ivar tap_configurations: A list of TapConfigurations of the network interface. + :vartype tap_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration] + :param dns_settings: The DNS settings in network interface. + :type dns_settings: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceDnsSettings + :ivar mac_address: The MAC address of the network interface. + :vartype mac_address: str + :ivar primary: Whether this is a primary network interface on a virtual machine. + :vartype primary: bool + :ivar vnet_encryption_supported: Whether the virtual machine this nic is attached to supports + encryption. + :vartype vnet_encryption_supported: bool + :param enable_accelerated_networking: If the network interface is accelerated networking + enabled. + :type enable_accelerated_networking: bool + :param enable_ip_forwarding: Indicates whether IP forwarding is enabled on this network + interface. + :type enable_ip_forwarding: bool + :ivar hosted_workloads: A list of references to linked BareMetal resources. + :vartype hosted_workloads: list[str] + :ivar dscp_configuration: A reference to the dscp configuration to which the network interface + is linked. + :vartype dscp_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar resource_guid: The resource GUID property of the network interface resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the network interface resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param workload_type: WorkloadType of the NetworkInterface for BareMetal resources. + :type workload_type: str + :param nic_type: Type of Network Interface resource. Possible values include: "Standard", + "Elastic". + :type nic_type: str or ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceNicType + :param private_link_service: Privatelinkservice of the network interface resource. + :type private_link_service: ~azure.mgmt.network.v2021_05_01.models.PrivateLinkService + :param migration_phase: Migration phase of Network Interface resource. Possible values include: + "None", "Prepare", "Commit", "Abort", "Committed". + :type migration_phase: str or + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceMigrationPhase + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_machine': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'tap_configurations': {'readonly': True}, + 'mac_address': {'readonly': True}, + 'primary': {'readonly': True}, + 'vnet_encryption_supported': {'readonly': True}, + 'hosted_workloads': {'readonly': True}, + 'dscp_configuration': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_machine': {'key': 'properties.virtualMachine', 'type': 'SubResource'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'tap_configurations': {'key': 'properties.tapConfigurations', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'NetworkInterfaceDnsSettings'}, + 'mac_address': {'key': 'properties.macAddress', 'type': 'str'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'vnet_encryption_supported': {'key': 'properties.vnetEncryptionSupported', 'type': 'bool'}, + 'enable_accelerated_networking': {'key': 'properties.enableAcceleratedNetworking', 'type': 'bool'}, + 'enable_ip_forwarding': {'key': 'properties.enableIPForwarding', 'type': 'bool'}, + 'hosted_workloads': {'key': 'properties.hostedWorkloads', 'type': '[str]'}, + 'dscp_configuration': {'key': 'properties.dscpConfiguration', 'type': 'SubResource'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'workload_type': {'key': 'properties.workloadType', 'type': 'str'}, + 'nic_type': {'key': 'properties.nicType', 'type': 'str'}, + 'private_link_service': {'key': 'properties.privateLinkService', 'type': 'PrivateLinkService'}, + 'migration_phase': {'key': 'properties.migrationPhase', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + network_security_group: Optional["NetworkSecurityGroup"] = None, + ip_configurations: Optional[List["NetworkInterfaceIPConfiguration"]] = None, + dns_settings: Optional["NetworkInterfaceDnsSettings"] = None, + enable_accelerated_networking: Optional[bool] = None, + enable_ip_forwarding: Optional[bool] = None, + workload_type: Optional[str] = None, + nic_type: Optional[Union[str, "NetworkInterfaceNicType"]] = None, + private_link_service: Optional["PrivateLinkService"] = None, + migration_phase: Optional[Union[str, "NetworkInterfaceMigrationPhase"]] = None, + **kwargs + ): + super(NetworkInterface, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.virtual_machine = None + self.network_security_group = network_security_group + self.private_endpoint = None + self.ip_configurations = ip_configurations + self.tap_configurations = None + self.dns_settings = dns_settings + self.mac_address = None + self.primary = None + self.vnet_encryption_supported = None + self.enable_accelerated_networking = enable_accelerated_networking + self.enable_ip_forwarding = enable_ip_forwarding + self.hosted_workloads = None + self.dscp_configuration = None + self.resource_guid = None + self.provisioning_state = None + self.workload_type = workload_type + self.nic_type = nic_type + self.private_link_service = private_link_service + self.migration_phase = migration_phase + + +class NetworkInterfaceAssociation(msrest.serialization.Model): + """Network interface and its custom security rules. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Network interface ID. + :vartype id: str + :param security_rules: Collection of custom security rules. + :type security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, + } + + def __init__( + self, + *, + security_rules: Optional[List["SecurityRule"]] = None, + **kwargs + ): + super(NetworkInterfaceAssociation, self).__init__(**kwargs) + self.id = None + self.security_rules = security_rules + + +class NetworkInterfaceDnsSettings(msrest.serialization.Model): + """DNS settings of a network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param dns_servers: List of DNS servers IP addresses. Use 'AzureProvidedDNS' to switch to azure + provided DNS resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it must be + the only value in dnsServers collection. + :type dns_servers: list[str] + :ivar applied_dns_servers: If the VM that uses this NIC is part of an Availability Set, then + this list will have the union of all DNS servers from all NICs that are part of the + Availability Set. This property is what is configured on each of those VMs. + :vartype applied_dns_servers: list[str] + :param internal_dns_name_label: Relative DNS name for this NIC used for internal communications + between VMs in the same virtual network. + :type internal_dns_name_label: str + :ivar internal_fqdn: Fully qualified DNS name supporting internal communications between VMs in + the same virtual network. + :vartype internal_fqdn: str + :ivar internal_domain_name_suffix: Even if internalDnsNameLabel is not specified, a DNS entry + is created for the primary NIC of the VM. This DNS name can be constructed by concatenating the + VM name with the value of internalDomainNameSuffix. + :vartype internal_domain_name_suffix: str + """ + + _validation = { + 'applied_dns_servers': {'readonly': True}, + 'internal_fqdn': {'readonly': True}, + 'internal_domain_name_suffix': {'readonly': True}, + } + + _attribute_map = { + 'dns_servers': {'key': 'dnsServers', 'type': '[str]'}, + 'applied_dns_servers': {'key': 'appliedDnsServers', 'type': '[str]'}, + 'internal_dns_name_label': {'key': 'internalDnsNameLabel', 'type': 'str'}, + 'internal_fqdn': {'key': 'internalFqdn', 'type': 'str'}, + 'internal_domain_name_suffix': {'key': 'internalDomainNameSuffix', 'type': 'str'}, + } + + def __init__( + self, + *, + dns_servers: Optional[List[str]] = None, + internal_dns_name_label: Optional[str] = None, + **kwargs + ): + super(NetworkInterfaceDnsSettings, self).__init__(**kwargs) + self.dns_servers = dns_servers + self.applied_dns_servers = None + self.internal_dns_name_label = internal_dns_name_label + self.internal_fqdn = None + self.internal_domain_name_suffix = None + + +class NetworkInterfaceIPConfiguration(SubResource): + """IPConfiguration in a network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: Resource type. + :type type: str + :param gateway_load_balancer: The reference to gateway load balancer frontend IP. + :type gateway_load_balancer: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param virtual_network_taps: The reference to Virtual Network Taps. + :type virtual_network_taps: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap] + :param application_gateway_backend_address_pools: The reference to + ApplicationGatewayBackendAddressPool resource. + :type application_gateway_backend_address_pools: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendAddressPool] + :param load_balancer_backend_address_pools: The reference to LoadBalancerBackendAddressPool + resource. + :type load_balancer_backend_address_pools: + list[~azure.mgmt.network.v2021_05_01.models.BackendAddressPool] + :param load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules. + :type load_balancer_inbound_nat_rules: + list[~azure.mgmt.network.v2021_05_01.models.InboundNatRule] + :param private_ip_address: Private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param private_ip_address_version: Whether the specific IP configuration is IPv4 or IPv6. + Default is IPv4. Possible values include: "IPv4", "IPv6". + :type private_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :param subnet: Subnet bound to the IP configuration. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param primary: Whether this is a primary customer address on the network interface. + :type primary: bool + :param public_ip_address: Public IP address bound to the IP configuration. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :param application_security_groups: Application security groups in which the IP configuration + is included. + :type application_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :ivar provisioning_state: The provisioning state of the network interface IP configuration. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar private_link_connection_properties: PrivateLinkConnection properties for the network + interface. + :vartype private_link_connection_properties: + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_link_connection_properties': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'gateway_load_balancer': {'key': 'properties.gatewayLoadBalancer', 'type': 'SubResource'}, + 'virtual_network_taps': {'key': 'properties.virtualNetworkTaps', 'type': '[VirtualNetworkTap]'}, + 'application_gateway_backend_address_pools': {'key': 'properties.applicationGatewayBackendAddressPools', 'type': '[ApplicationGatewayBackendAddressPool]'}, + 'load_balancer_backend_address_pools': {'key': 'properties.loadBalancerBackendAddressPools', 'type': '[BackendAddressPool]'}, + 'load_balancer_inbound_nat_rules': {'key': 'properties.loadBalancerInboundNatRules', 'type': '[InboundNatRule]'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'PublicIPAddress'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_link_connection_properties': {'key': 'properties.privateLinkConnectionProperties', 'type': 'NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + gateway_load_balancer: Optional["SubResource"] = None, + virtual_network_taps: Optional[List["VirtualNetworkTap"]] = None, + application_gateway_backend_address_pools: Optional[List["ApplicationGatewayBackendAddressPool"]] = None, + load_balancer_backend_address_pools: Optional[List["BackendAddressPool"]] = None, + load_balancer_inbound_nat_rules: Optional[List["InboundNatRule"]] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + private_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + subnet: Optional["Subnet"] = None, + primary: Optional[bool] = None, + public_ip_address: Optional["PublicIPAddress"] = None, + application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, + **kwargs + ): + super(NetworkInterfaceIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.gateway_load_balancer = gateway_load_balancer + self.virtual_network_taps = virtual_network_taps + self.application_gateway_backend_address_pools = application_gateway_backend_address_pools + self.load_balancer_backend_address_pools = load_balancer_backend_address_pools + self.load_balancer_inbound_nat_rules = load_balancer_inbound_nat_rules + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.private_ip_address_version = private_ip_address_version + self.subnet = subnet + self.primary = primary + self.public_ip_address = public_ip_address + self.application_security_groups = application_security_groups + self.provisioning_state = None + self.private_link_connection_properties = None + + +class NetworkInterfaceIPConfigurationListResult(msrest.serialization.Model): + """Response for list ip configurations API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of ip configurations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkInterfaceIPConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkInterfaceIPConfiguration"]] = None, + **kwargs + ): + super(NetworkInterfaceIPConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties(msrest.serialization.Model): + """PrivateLinkConnection properties for the network interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar group_id: The group ID for current private link connection. + :vartype group_id: str + :ivar required_member_name: The required member name for current private link connection. + :vartype required_member_name: str + :ivar fqdns: List of FQDNs for current private link connection. + :vartype fqdns: list[str] + """ + + _validation = { + 'group_id': {'readonly': True}, + 'required_member_name': {'readonly': True}, + 'fqdns': {'readonly': True}, + } + + _attribute_map = { + 'group_id': {'key': 'groupId', 'type': 'str'}, + 'required_member_name': {'key': 'requiredMemberName', 'type': 'str'}, + 'fqdns': {'key': 'fqdns', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkInterfaceIPConfigurationPrivateLinkConnectionProperties, self).__init__(**kwargs) + self.group_id = None + self.required_member_name = None + self.fqdns = None + + +class NetworkInterfaceListResult(msrest.serialization.Model): + """Response for the ListNetworkInterface API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of network interfaces in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkInterface]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkInterface"]] = None, + **kwargs + ): + super(NetworkInterfaceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class NetworkInterfaceLoadBalancerListResult(msrest.serialization.Model): + """Response for list ip configurations API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of load balancers. + :type value: list[~azure.mgmt.network.v2021_05_01.models.LoadBalancer] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LoadBalancer]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["LoadBalancer"]] = None, + **kwargs + ): + super(NetworkInterfaceLoadBalancerListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class NetworkInterfaceTapConfiguration(SubResource): + """Tap configuration in a Network Interface. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Sub Resource type. + :vartype type: str + :param virtual_network_tap: The reference to the Virtual Network Tap resource. + :type virtual_network_tap: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap + :ivar provisioning_state: The provisioning state of the network interface tap configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'virtual_network_tap': {'key': 'properties.virtualNetworkTap', 'type': 'VirtualNetworkTap'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + virtual_network_tap: Optional["VirtualNetworkTap"] = None, + **kwargs + ): + super(NetworkInterfaceTapConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.virtual_network_tap = virtual_network_tap + self.provisioning_state = None + + +class NetworkInterfaceTapConfigurationListResult(msrest.serialization.Model): + """Response for list tap configurations API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of tap configurations. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkInterfaceTapConfiguration"]] = None, + **kwargs + ): + super(NetworkInterfaceTapConfigurationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class NetworkProfile(Resource): + """Network profile resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar container_network_interfaces: List of child container network interfaces. + :vartype container_network_interfaces: + list[~azure.mgmt.network.v2021_05_01.models.ContainerNetworkInterface] + :param container_network_interface_configurations: List of chid container network interface + configurations. + :type container_network_interface_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ContainerNetworkInterfaceConfiguration] + :ivar resource_guid: The resource GUID property of the network profile resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the network profile resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'container_network_interfaces': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'container_network_interfaces': {'key': 'properties.containerNetworkInterfaces', 'type': '[ContainerNetworkInterface]'}, + 'container_network_interface_configurations': {'key': 'properties.containerNetworkInterfaceConfigurations', 'type': '[ContainerNetworkInterfaceConfiguration]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + container_network_interface_configurations: Optional[List["ContainerNetworkInterfaceConfiguration"]] = None, + **kwargs + ): + super(NetworkProfile, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.container_network_interfaces = None + self.container_network_interface_configurations = container_network_interface_configurations + self.resource_guid = None + self.provisioning_state = None + + +class NetworkProfileListResult(msrest.serialization.Model): + """Response for ListNetworkProfiles API service call. + + :param value: A list of network profiles that exist in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkProfile] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkProfile]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkProfile"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkProfileListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkRule(FirewallPolicyRule): + """Rule of type network. + + All required parameters must be populated in order to send to Azure. + + :param name: Name of the rule. + :type name: str + :param description: Description of the rule. + :type description: str + :param rule_type: Required. Rule Type.Constant filled by server. Possible values include: + "ApplicationRule", "NetworkRule", "NatRule". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleType + :param ip_protocols: Array of FirewallPolicyRuleNetworkProtocols. + :type ip_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleNetworkProtocol] + :param source_addresses: List of source IP addresses for this rule. + :type source_addresses: list[str] + :param destination_addresses: List of destination IP addresses or Service Tags. + :type destination_addresses: list[str] + :param destination_ports: List of destination ports. + :type destination_ports: list[str] + :param source_ip_groups: List of source IpGroups for this rule. + :type source_ip_groups: list[str] + :param destination_ip_groups: List of destination IpGroups for this rule. + :type destination_ip_groups: list[str] + :param destination_fqdns: List of destination FQDNs. + :type destination_fqdns: list[str] + """ + + _validation = { + 'rule_type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'ip_protocols': {'key': 'ipProtocols', 'type': '[str]'}, + 'source_addresses': {'key': 'sourceAddresses', 'type': '[str]'}, + 'destination_addresses': {'key': 'destinationAddresses', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'source_ip_groups': {'key': 'sourceIpGroups', 'type': '[str]'}, + 'destination_ip_groups': {'key': 'destinationIpGroups', 'type': '[str]'}, + 'destination_fqdns': {'key': 'destinationFqdns', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + description: Optional[str] = None, + ip_protocols: Optional[List[Union[str, "FirewallPolicyRuleNetworkProtocol"]]] = None, + source_addresses: Optional[List[str]] = None, + destination_addresses: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + source_ip_groups: Optional[List[str]] = None, + destination_ip_groups: Optional[List[str]] = None, + destination_fqdns: Optional[List[str]] = None, + **kwargs + ): + super(NetworkRule, self).__init__(name=name, description=description, **kwargs) + self.rule_type = 'NetworkRule' # type: str + self.ip_protocols = ip_protocols + self.source_addresses = source_addresses + self.destination_addresses = destination_addresses + self.destination_ports = destination_ports + self.source_ip_groups = source_ip_groups + self.destination_ip_groups = destination_ip_groups + self.destination_fqdns = destination_fqdns + + +class NetworkSecurityGroup(Resource): + """NetworkSecurityGroup resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param security_rules: A collection of security rules of the network security group. + :type security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + :ivar default_security_rules: The default security rules of network security group. + :vartype default_security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + :ivar network_interfaces: A collection of references to network interfaces. + :vartype network_interfaces: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar subnets: A collection of references to subnets. + :vartype subnets: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :ivar flow_logs: A collection of references to flow log resources. + :vartype flow_logs: list[~azure.mgmt.network.v2021_05_01.models.FlowLog] + :ivar resource_guid: The resource GUID property of the network security group resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the network security group resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'default_security_rules': {'readonly': True}, + 'network_interfaces': {'readonly': True}, + 'subnets': {'readonly': True}, + 'flow_logs': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'security_rules': {'key': 'properties.securityRules', 'type': '[SecurityRule]'}, + 'default_security_rules': {'key': 'properties.defaultSecurityRules', 'type': '[SecurityRule]'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'flow_logs': {'key': 'properties.flowLogs', 'type': '[FlowLog]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + security_rules: Optional[List["SecurityRule"]] = None, + **kwargs + ): + super(NetworkSecurityGroup, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.security_rules = security_rules + self.default_security_rules = None + self.network_interfaces = None + self.subnets = None + self.flow_logs = None + self.resource_guid = None + self.provisioning_state = None + + +class NetworkSecurityGroupListResult(msrest.serialization.Model): + """Response for ListNetworkSecurityGroups API service call. + + :param value: A list of NetworkSecurityGroup resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkSecurityGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkSecurityGroup"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkSecurityGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkSecurityGroupResult(msrest.serialization.Model): + """Network configuration diagnostic result corresponded provided traffic query. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param security_rule_access_result: The network traffic is allowed or denied. Possible values + include: "Allow", "Deny". + :type security_rule_access_result: str or + ~azure.mgmt.network.v2021_05_01.models.SecurityRuleAccess + :ivar evaluated_network_security_groups: List of results network security groups diagnostic. + :vartype evaluated_network_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.EvaluatedNetworkSecurityGroup] + """ + + _validation = { + 'evaluated_network_security_groups': {'readonly': True}, + } + + _attribute_map = { + 'security_rule_access_result': {'key': 'securityRuleAccessResult', 'type': 'str'}, + 'evaluated_network_security_groups': {'key': 'evaluatedNetworkSecurityGroups', 'type': '[EvaluatedNetworkSecurityGroup]'}, + } + + def __init__( + self, + *, + security_rule_access_result: Optional[Union[str, "SecurityRuleAccess"]] = None, + **kwargs + ): + super(NetworkSecurityGroupResult, self).__init__(**kwargs) + self.security_rule_access_result = security_rule_access_result + self.evaluated_network_security_groups = None + + +class NetworkSecurityRulesEvaluationResult(msrest.serialization.Model): + """Network security rules evaluation result. + + :param name: Name of the network security rule. + :type name: str + :param protocol_matched: Value indicating whether protocol is matched. + :type protocol_matched: bool + :param source_matched: Value indicating whether source is matched. + :type source_matched: bool + :param source_port_matched: Value indicating whether source port is matched. + :type source_port_matched: bool + :param destination_matched: Value indicating whether destination is matched. + :type destination_matched: bool + :param destination_port_matched: Value indicating whether destination port is matched. + :type destination_port_matched: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'protocol_matched': {'key': 'protocolMatched', 'type': 'bool'}, + 'source_matched': {'key': 'sourceMatched', 'type': 'bool'}, + 'source_port_matched': {'key': 'sourcePortMatched', 'type': 'bool'}, + 'destination_matched': {'key': 'destinationMatched', 'type': 'bool'}, + 'destination_port_matched': {'key': 'destinationPortMatched', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + protocol_matched: Optional[bool] = None, + source_matched: Optional[bool] = None, + source_port_matched: Optional[bool] = None, + destination_matched: Optional[bool] = None, + destination_port_matched: Optional[bool] = None, + **kwargs + ): + super(NetworkSecurityRulesEvaluationResult, self).__init__(**kwargs) + self.name = name + self.protocol_matched = protocol_matched + self.source_matched = source_matched + self.source_port_matched = source_port_matched + self.destination_matched = destination_matched + self.destination_port_matched = destination_port_matched + + +class NetworkVirtualAppliance(Resource): + """NetworkVirtualAppliance Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param identity: The service principal that has read access to cloud-init and config blob. + :type identity: ~azure.mgmt.network.v2021_05_01.models.ManagedServiceIdentity + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param nva_sku: Network Virtual Appliance SKU. + :type nva_sku: ~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSkuProperties + :ivar address_prefix: Address Prefix. + :vartype address_prefix: str + :param boot_strap_configuration_blobs: BootStrapConfigurationBlobs storage URLs. + :type boot_strap_configuration_blobs: list[str] + :param virtual_hub: The Virtual Hub where Network Virtual Appliance is being deployed. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param cloud_init_configuration_blobs: CloudInitConfigurationBlob storage URLs. + :type cloud_init_configuration_blobs: list[str] + :param cloud_init_configuration: CloudInitConfiguration string in plain text. + :type cloud_init_configuration: str + :param virtual_appliance_asn: VirtualAppliance ASN. + :type virtual_appliance_asn: long + :param ssh_public_key: Public key for SSH login. + :type ssh_public_key: str + :ivar virtual_appliance_nics: List of Virtual Appliance Network Interfaces. + :vartype virtual_appliance_nics: + list[~azure.mgmt.network.v2021_05_01.models.VirtualApplianceNicProperties] + :ivar virtual_appliance_sites: List of references to VirtualApplianceSite. + :vartype virtual_appliance_sites: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar inbound_security_rules: List of references to InboundSecurityRules. + :vartype inbound_security_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'address_prefix': {'readonly': True}, + 'virtual_appliance_asn': {'maximum': 4294967295, 'minimum': 0}, + 'virtual_appliance_nics': {'readonly': True}, + 'virtual_appliance_sites': {'readonly': True}, + 'inbound_security_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'nva_sku': {'key': 'properties.nvaSku', 'type': 'VirtualApplianceSkuProperties'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'boot_strap_configuration_blobs': {'key': 'properties.bootStrapConfigurationBlobs', 'type': '[str]'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'cloud_init_configuration_blobs': {'key': 'properties.cloudInitConfigurationBlobs', 'type': '[str]'}, + 'cloud_init_configuration': {'key': 'properties.cloudInitConfiguration', 'type': 'str'}, + 'virtual_appliance_asn': {'key': 'properties.virtualApplianceAsn', 'type': 'long'}, + 'ssh_public_key': {'key': 'properties.sshPublicKey', 'type': 'str'}, + 'virtual_appliance_nics': {'key': 'properties.virtualApplianceNics', 'type': '[VirtualApplianceNicProperties]'}, + 'virtual_appliance_sites': {'key': 'properties.virtualApplianceSites', 'type': '[SubResource]'}, + 'inbound_security_rules': {'key': 'properties.inboundSecurityRules', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + identity: Optional["ManagedServiceIdentity"] = None, + nva_sku: Optional["VirtualApplianceSkuProperties"] = None, + boot_strap_configuration_blobs: Optional[List[str]] = None, + virtual_hub: Optional["SubResource"] = None, + cloud_init_configuration_blobs: Optional[List[str]] = None, + cloud_init_configuration: Optional[str] = None, + virtual_appliance_asn: Optional[int] = None, + ssh_public_key: Optional[str] = None, + **kwargs + ): + super(NetworkVirtualAppliance, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.identity = identity + self.etag = None + self.nva_sku = nva_sku + self.address_prefix = None + self.boot_strap_configuration_blobs = boot_strap_configuration_blobs + self.virtual_hub = virtual_hub + self.cloud_init_configuration_blobs = cloud_init_configuration_blobs + self.cloud_init_configuration = cloud_init_configuration + self.virtual_appliance_asn = virtual_appliance_asn + self.ssh_public_key = ssh_public_key + self.virtual_appliance_nics = None + self.virtual_appliance_sites = None + self.inbound_security_rules = None + self.provisioning_state = None + + +class NetworkVirtualApplianceListResult(msrest.serialization.Model): + """Response for ListNetworkVirtualAppliances API service call. + + :param value: List of Network Virtual Appliances. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkVirtualAppliance]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkVirtualAppliance"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkVirtualApplianceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkVirtualApplianceSiteListResult(msrest.serialization.Model): + """Response for ListNetworkVirtualApplianceSites API service call. + + :param value: List of Network Virtual Appliance sites. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSite] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualApplianceSite]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualApplianceSite"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkVirtualApplianceSiteListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkVirtualApplianceSku(Resource): + """Definition of the NetworkVirtualApplianceSkus resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar vendor: Network Virtual Appliance Sku vendor. + :vartype vendor: str + :ivar available_versions: Available Network Virtual Appliance versions. + :vartype available_versions: list[str] + :param available_scale_units: The list of scale units available. + :type available_scale_units: + list[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSkuInstances] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'vendor': {'readonly': True}, + 'available_versions': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'available_versions': {'key': 'properties.availableVersions', 'type': '[str]'}, + 'available_scale_units': {'key': 'properties.availableScaleUnits', 'type': '[NetworkVirtualApplianceSkuInstances]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + available_scale_units: Optional[List["NetworkVirtualApplianceSkuInstances"]] = None, + **kwargs + ): + super(NetworkVirtualApplianceSku, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.vendor = None + self.available_versions = None + self.available_scale_units = available_scale_units + + +class NetworkVirtualApplianceSkuInstances(msrest.serialization.Model): + """List of available Sku and instances. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar scale_unit: Scale Unit. + :vartype scale_unit: str + :ivar instance_count: Instance Count. + :vartype instance_count: int + """ + + _validation = { + 'scale_unit': {'readonly': True}, + 'instance_count': {'readonly': True}, + } + + _attribute_map = { + 'scale_unit': {'key': 'scaleUnit', 'type': 'str'}, + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkVirtualApplianceSkuInstances, self).__init__(**kwargs) + self.scale_unit = None + self.instance_count = None + + +class NetworkVirtualApplianceSkuListResult(msrest.serialization.Model): + """Response for ListNetworkVirtualApplianceSkus API service call. + + :param value: List of Network Virtual Appliance Skus that are available. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSku] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkVirtualApplianceSku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkVirtualApplianceSku"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(NetworkVirtualApplianceSkuListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class NetworkWatcher(Resource): + """Network watcher in a resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the network watcher resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(NetworkWatcher, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.provisioning_state = None + + +class NetworkWatcherListResult(msrest.serialization.Model): + """Response for ListNetworkWatchers API service call. + + :param value: List of network watcher resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.NetworkWatcher] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[NetworkWatcher]'}, + } + + def __init__( + self, + *, + value: Optional[List["NetworkWatcher"]] = None, + **kwargs + ): + super(NetworkWatcherListResult, self).__init__(**kwargs) + self.value = value + + +class NextHopParameters(msrest.serialization.Model): + """Parameters that define the source and destination endpoint. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The resource identifier of the target resource against + which the action is to be performed. + :type target_resource_id: str + :param source_ip_address: Required. The source IP address. + :type source_ip_address: str + :param destination_ip_address: Required. The destination IP address. + :type destination_ip_address: str + :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is + enabled on any of the nics, then this parameter must be specified. Otherwise optional). + :type target_nic_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'source_ip_address': {'required': True}, + 'destination_ip_address': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'source_ip_address': {'key': 'sourceIPAddress', 'type': 'str'}, + 'destination_ip_address': {'key': 'destinationIPAddress', 'type': 'str'}, + 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + source_ip_address: str, + destination_ip_address: str, + target_nic_resource_id: Optional[str] = None, + **kwargs + ): + super(NextHopParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.source_ip_address = source_ip_address + self.destination_ip_address = destination_ip_address + self.target_nic_resource_id = target_nic_resource_id + + +class NextHopResult(msrest.serialization.Model): + """The information about next hop from the specified VM. + + :param next_hop_type: Next hop type. Possible values include: "Internet", "VirtualAppliance", + "VirtualNetworkGateway", "VnetLocal", "HyperNetGateway", "None". + :type next_hop_type: str or ~azure.mgmt.network.v2021_05_01.models.NextHopType + :param next_hop_ip_address: Next hop IP Address. + :type next_hop_ip_address: str + :param route_table_id: The resource identifier for the route table associated with the route + being returned. If the route being returned does not correspond to any user created routes then + this field will be the string 'System Route'. + :type route_table_id: str + """ + + _attribute_map = { + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, + 'route_table_id': {'key': 'routeTableId', 'type': 'str'}, + } + + def __init__( + self, + *, + next_hop_type: Optional[Union[str, "NextHopType"]] = None, + next_hop_ip_address: Optional[str] = None, + route_table_id: Optional[str] = None, + **kwargs + ): + super(NextHopResult, self).__init__(**kwargs) + self.next_hop_type = next_hop_type + self.next_hop_ip_address = next_hop_ip_address + self.route_table_id = route_table_id + + +class O365BreakOutCategoryPolicies(msrest.serialization.Model): + """Office365 breakout categories. + + :param allow: Flag to control allow category. + :type allow: bool + :param optimize: Flag to control optimize category. + :type optimize: bool + :param default: Flag to control default category. + :type default: bool + """ + + _attribute_map = { + 'allow': {'key': 'allow', 'type': 'bool'}, + 'optimize': {'key': 'optimize', 'type': 'bool'}, + 'default': {'key': 'default', 'type': 'bool'}, + } + + def __init__( + self, + *, + allow: Optional[bool] = None, + optimize: Optional[bool] = None, + default: Optional[bool] = None, + **kwargs + ): + super(O365BreakOutCategoryPolicies, self).__init__(**kwargs) + self.allow = allow + self.optimize = optimize + self.default = default + + +class O365PolicyProperties(msrest.serialization.Model): + """The Office365 breakout policy. + + :param break_out_categories: Office365 breakout categories. + :type break_out_categories: ~azure.mgmt.network.v2021_05_01.models.O365BreakOutCategoryPolicies + """ + + _attribute_map = { + 'break_out_categories': {'key': 'breakOutCategories', 'type': 'O365BreakOutCategoryPolicies'}, + } + + def __init__( + self, + *, + break_out_categories: Optional["O365BreakOutCategoryPolicies"] = None, + **kwargs + ): + super(O365PolicyProperties, self).__init__(**kwargs) + self.break_out_categories = break_out_categories + + +class Office365PolicyProperties(msrest.serialization.Model): + """Network Virtual Appliance Sku Properties. + + :param break_out_categories: Office 365 breakout categories. + :type break_out_categories: ~azure.mgmt.network.v2021_05_01.models.BreakOutCategoryPolicies + """ + + _attribute_map = { + 'break_out_categories': {'key': 'breakOutCategories', 'type': 'BreakOutCategoryPolicies'}, + } + + def __init__( + self, + *, + break_out_categories: Optional["BreakOutCategoryPolicies"] = None, + **kwargs + ): + super(Office365PolicyProperties, self).__init__(**kwargs) + self.break_out_categories = break_out_categories + + +class Operation(msrest.serialization.Model): + """Network REST API operation definition. + + :param name: Operation name: {provider}/{resource}/{operation}. + :type name: str + :param display: Display metadata associated with the operation. + :type display: ~azure.mgmt.network.v2021_05_01.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param service_specification: Specification of the service. + :type service_specification: + ~azure.mgmt.network.v2021_05_01.models.OperationPropertiesFormatServiceSpecification + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'service_specification': {'key': 'properties.serviceSpecification', 'type': 'OperationPropertiesFormatServiceSpecification'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display: Optional["OperationDisplay"] = None, + origin: Optional[str] = None, + service_specification: Optional["OperationPropertiesFormatServiceSpecification"] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.service_specification = service_specification + + +class OperationDisplay(msrest.serialization.Model): + """Display metadata associated with the operation. + + :param provider: Service provider: Microsoft Network. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: Type of the operation: get, read, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class OperationListResult(msrest.serialization.Model): + """Result of the request to list Network operations. It contains a list of operations and a URL link to get the next set of results. + + :param value: List of Network operations supported by the Network resource provider. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Operation] + :param next_link: URL to get the next set of operation list results if there are any. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Operation"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(OperationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class OperationPropertiesFormatServiceSpecification(msrest.serialization.Model): + """Specification of the service. + + :param metric_specifications: Operation service specification. + :type metric_specifications: list[~azure.mgmt.network.v2021_05_01.models.MetricSpecification] + :param log_specifications: Operation log specification. + :type log_specifications: list[~azure.mgmt.network.v2021_05_01.models.LogSpecification] + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + } + + def __init__( + self, + *, + metric_specifications: Optional[List["MetricSpecification"]] = None, + log_specifications: Optional[List["LogSpecification"]] = None, + **kwargs + ): + super(OperationPropertiesFormatServiceSpecification, self).__init__(**kwargs) + self.metric_specifications = metric_specifications + self.log_specifications = log_specifications + + +class OrderBy(msrest.serialization.Model): + """Describes a column to sort. + + :param field: Describes the actual column name to sort by. + :type field: str + :param order: Describes if results should be in ascending/descending order. Possible values + include: "Ascending", "Descending". + :type order: str or ~azure.mgmt.network.v2021_05_01.models.OrderByOrder + """ + + _attribute_map = { + 'field': {'key': 'field', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'str'}, + } + + def __init__( + self, + *, + field: Optional[str] = None, + order: Optional[Union[str, "OrderByOrder"]] = None, + **kwargs + ): + super(OrderBy, self).__init__(**kwargs) + self.field = field + self.order = order + + +class OutboundRule(SubResource): + """Outbound rule of the load balancer. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of outbound rules used by + the load balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param allocated_outbound_ports: The number of outbound ports to be used for NAT. + :type allocated_outbound_ports: int + :param frontend_ip_configurations: The Frontend IP addresses of the load balancer. + :type frontend_ip_configurations: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param backend_address_pool: A reference to a pool of DIPs. Outbound traffic is randomly load + balanced across IPs in the backend IPs. + :type backend_address_pool: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar provisioning_state: The provisioning state of the outbound rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param protocol: The protocol for the outbound rule in load balancer. Possible values include: + "Tcp", "Udp", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.LoadBalancerOutboundRuleProtocol + :param enable_tcp_reset: Receive bidirectional TCP Reset on TCP flow idle timeout or unexpected + connection termination. This element is only used when the protocol is set to TCP. + :type enable_tcp_reset: bool + :param idle_timeout_in_minutes: The timeout for the TCP idle connection. + :type idle_timeout_in_minutes: int + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allocated_outbound_ports': {'key': 'properties.allocatedOutboundPorts', 'type': 'int'}, + 'frontend_ip_configurations': {'key': 'properties.frontendIPConfigurations', 'type': '[SubResource]'}, + 'backend_address_pool': {'key': 'properties.backendAddressPool', 'type': 'SubResource'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'enable_tcp_reset': {'key': 'properties.enableTcpReset', 'type': 'bool'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + allocated_outbound_ports: Optional[int] = None, + frontend_ip_configurations: Optional[List["SubResource"]] = None, + backend_address_pool: Optional["SubResource"] = None, + protocol: Optional[Union[str, "LoadBalancerOutboundRuleProtocol"]] = None, + enable_tcp_reset: Optional[bool] = None, + idle_timeout_in_minutes: Optional[int] = None, + **kwargs + ): + super(OutboundRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.allocated_outbound_ports = allocated_outbound_ports + self.frontend_ip_configurations = frontend_ip_configurations + self.backend_address_pool = backend_address_pool + self.provisioning_state = None + self.protocol = protocol + self.enable_tcp_reset = enable_tcp_reset + self.idle_timeout_in_minutes = idle_timeout_in_minutes + + +class OwaspCrsExclusionEntry(msrest.serialization.Model): + """Allow to exclude some variable satisfy the condition for the WAF check. + + All required parameters must be populated in order to send to Azure. + + :param match_variable: Required. The variable to be excluded. Possible values include: + "RequestHeaderNames", "RequestCookieNames", "RequestArgNames", "RequestHeaderKeys", + "RequestHeaderValues", "RequestCookieKeys", "RequestCookieValues", "RequestArgKeys", + "RequestArgValues". + :type match_variable: str or + ~azure.mgmt.network.v2021_05_01.models.OwaspCrsExclusionEntryMatchVariable + :param selector_match_operator: Required. When matchVariable is a collection, operate on the + selector to specify which elements in the collection this exclusion applies to. Possible values + include: "Equals", "Contains", "StartsWith", "EndsWith", "EqualsAny". + :type selector_match_operator: str or + ~azure.mgmt.network.v2021_05_01.models.OwaspCrsExclusionEntrySelectorMatchOperator + :param selector: Required. When matchVariable is a collection, operator used to specify which + elements in the collection this exclusion applies to. + :type selector: str + :param exclusion_managed_rule_sets: The managed rule sets that are associated with the + exclusion. + :type exclusion_managed_rule_sets: + list[~azure.mgmt.network.v2021_05_01.models.ExclusionManagedRuleSet] + """ + + _validation = { + 'match_variable': {'required': True}, + 'selector_match_operator': {'required': True}, + 'selector': {'required': True}, + } + + _attribute_map = { + 'match_variable': {'key': 'matchVariable', 'type': 'str'}, + 'selector_match_operator': {'key': 'selectorMatchOperator', 'type': 'str'}, + 'selector': {'key': 'selector', 'type': 'str'}, + 'exclusion_managed_rule_sets': {'key': 'exclusionManagedRuleSets', 'type': '[ExclusionManagedRuleSet]'}, + } + + def __init__( + self, + *, + match_variable: Union[str, "OwaspCrsExclusionEntryMatchVariable"], + selector_match_operator: Union[str, "OwaspCrsExclusionEntrySelectorMatchOperator"], + selector: str, + exclusion_managed_rule_sets: Optional[List["ExclusionManagedRuleSet"]] = None, + **kwargs + ): + super(OwaspCrsExclusionEntry, self).__init__(**kwargs) + self.match_variable = match_variable + self.selector_match_operator = selector_match_operator + self.selector = selector + self.exclusion_managed_rule_sets = exclusion_managed_rule_sets + + +class P2SConnectionConfiguration(SubResource): + """P2SConnectionConfiguration Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param vpn_client_address_pool: The reference to the address space resource which represents + Address space for P2S VpnClient. + :type vpn_client_address_pool: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :type routing_configuration: ~azure.mgmt.network.v2021_05_01.models.RoutingConfiguration + :param enable_internet_security: Flag indicating whether the enable internet security flag is + turned on for the P2S Connections or not. + :type enable_internet_security: bool + :ivar provisioning_state: The provisioning state of the P2SConnectionConfiguration resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'vpn_client_address_pool': {'key': 'properties.vpnClientAddressPool', 'type': 'AddressSpace'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + vpn_client_address_pool: Optional["AddressSpace"] = None, + routing_configuration: Optional["RoutingConfiguration"] = None, + enable_internet_security: Optional[bool] = None, + **kwargs + ): + super(P2SConnectionConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.vpn_client_address_pool = vpn_client_address_pool + self.routing_configuration = routing_configuration + self.enable_internet_security = enable_internet_security + self.provisioning_state = None + + +class P2SVpnConnectionHealth(msrest.serialization.Model): + """P2S Vpn connection detailed health written to sas url. + + :param sas_url: Returned sas url of the blob to which the p2s vpn connection detailed health + will be written. + :type sas_url: str + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_url: Optional[str] = None, + **kwargs + ): + super(P2SVpnConnectionHealth, self).__init__(**kwargs) + self.sas_url = sas_url + + +class P2SVpnConnectionHealthRequest(msrest.serialization.Model): + """List of P2S Vpn connection health request. + + :param vpn_user_names_filter: The list of p2s vpn user names whose p2s vpn connection detailed + health to retrieve for. + :type vpn_user_names_filter: list[str] + :param output_blob_sas_url: The sas-url to download the P2S Vpn connection health detail. + :type output_blob_sas_url: str + """ + + _attribute_map = { + 'vpn_user_names_filter': {'key': 'vpnUserNamesFilter', 'type': '[str]'}, + 'output_blob_sas_url': {'key': 'outputBlobSasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + vpn_user_names_filter: Optional[List[str]] = None, + output_blob_sas_url: Optional[str] = None, + **kwargs + ): + super(P2SVpnConnectionHealthRequest, self).__init__(**kwargs) + self.vpn_user_names_filter = vpn_user_names_filter + self.output_blob_sas_url = output_blob_sas_url + + +class P2SVpnConnectionRequest(msrest.serialization.Model): + """List of p2s vpn connections to be disconnected. + + :param vpn_connection_ids: List of p2s vpn connection Ids. + :type vpn_connection_ids: list[str] + """ + + _attribute_map = { + 'vpn_connection_ids': {'key': 'vpnConnectionIds', 'type': '[str]'}, + } + + def __init__( + self, + *, + vpn_connection_ids: Optional[List[str]] = None, + **kwargs + ): + super(P2SVpnConnectionRequest, self).__init__(**kwargs) + self.vpn_connection_ids = vpn_connection_ids + + +class P2SVpnGateway(Resource): + """P2SVpnGateway Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param virtual_hub: The VirtualHub to which the gateway belongs. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param p2_s_connection_configurations: List of all p2s connection configurations of the + gateway. + :type p2_s_connection_configurations: + list[~azure.mgmt.network.v2021_05_01.models.P2SConnectionConfiguration] + :ivar provisioning_state: The provisioning state of the P2S VPN gateway resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param vpn_gateway_scale_unit: The scale unit for this p2s vpn gateway. + :type vpn_gateway_scale_unit: int + :param vpn_server_configuration: The VpnServerConfiguration to which the p2sVpnGateway is + attached to. + :type vpn_server_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar vpn_client_connection_health: All P2S VPN clients' connection health status. + :vartype vpn_client_connection_health: + ~azure.mgmt.network.v2021_05_01.models.VpnClientConnectionHealth + :param custom_dns_servers: List of all customer specified DNS servers IP addresses. + :type custom_dns_servers: list[str] + :param is_routing_preference_internet: Enable Routing Preference property for the Public IP + Interface of the P2SVpnGateway. + :type is_routing_preference_internet: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'vpn_client_connection_health': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'p2_s_connection_configurations': {'key': 'properties.p2SConnectionConfigurations', 'type': '[P2SConnectionConfiguration]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'vpn_gateway_scale_unit': {'key': 'properties.vpnGatewayScaleUnit', 'type': 'int'}, + 'vpn_server_configuration': {'key': 'properties.vpnServerConfiguration', 'type': 'SubResource'}, + 'vpn_client_connection_health': {'key': 'properties.vpnClientConnectionHealth', 'type': 'VpnClientConnectionHealth'}, + 'custom_dns_servers': {'key': 'properties.customDnsServers', 'type': '[str]'}, + 'is_routing_preference_internet': {'key': 'properties.isRoutingPreferenceInternet', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_hub: Optional["SubResource"] = None, + p2_s_connection_configurations: Optional[List["P2SConnectionConfiguration"]] = None, + vpn_gateway_scale_unit: Optional[int] = None, + vpn_server_configuration: Optional["SubResource"] = None, + custom_dns_servers: Optional[List[str]] = None, + is_routing_preference_internet: Optional[bool] = None, + **kwargs + ): + super(P2SVpnGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.virtual_hub = virtual_hub + self.p2_s_connection_configurations = p2_s_connection_configurations + self.provisioning_state = None + self.vpn_gateway_scale_unit = vpn_gateway_scale_unit + self.vpn_server_configuration = vpn_server_configuration + self.vpn_client_connection_health = None + self.custom_dns_servers = custom_dns_servers + self.is_routing_preference_internet = is_routing_preference_internet + + +class P2SVpnProfileParameters(msrest.serialization.Model): + """Vpn Client Parameters for package generation. + + :param authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :type authentication_method: str or ~azure.mgmt.network.v2021_05_01.models.AuthenticationMethod + """ + + _attribute_map = { + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, + **kwargs + ): + super(P2SVpnProfileParameters, self).__init__(**kwargs) + self.authentication_method = authentication_method + + +class PacketCapture(msrest.serialization.Model): + """Parameters that define the create packet capture operation. + + All required parameters must be populated in order to send to Azure. + + :param target: Required. The ID of the targeted resource, only VM is currently supported. + :type target: str + :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :type bytes_to_capture_per_packet: long + :param total_bytes_per_session: Maximum size of the capture output. + :type total_bytes_per_session: long + :param time_limit_in_seconds: Maximum duration of the capture session in seconds. + :type time_limit_in_seconds: int + :param storage_location: Required. The storage location for a packet capture session. + :type storage_location: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureStorageLocation + :param filters: A list of packet capture filters. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureFilter] + """ + + _validation = { + 'target': {'required': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'storage_location': {'required': True}, + } + + _attribute_map = { + 'target': {'key': 'properties.target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, + } + + def __init__( + self, + *, + target: str, + storage_location: "PacketCaptureStorageLocation", + bytes_to_capture_per_packet: Optional[int] = 0, + total_bytes_per_session: Optional[int] = 1073741824, + time_limit_in_seconds: Optional[int] = 18000, + filters: Optional[List["PacketCaptureFilter"]] = None, + **kwargs + ): + super(PacketCapture, self).__init__(**kwargs) + self.target = target + self.bytes_to_capture_per_packet = bytes_to_capture_per_packet + self.total_bytes_per_session = total_bytes_per_session + self.time_limit_in_seconds = time_limit_in_seconds + self.storage_location = storage_location + self.filters = filters + + +class PacketCaptureFilter(msrest.serialization.Model): + """Filter that is applied to packet capture request. Multiple filters can be applied. + + :param protocol: Protocol to be filtered on. Possible values include: "TCP", "UDP", "Any". + Default value: "Any". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.PcProtocol + :param local_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single + address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5"? for multiple entries. + Multiple ranges not currently supported. Mixing ranges with multiple entries not currently + supported. Default = null. + :type local_ip_address: str + :param remote_ip_address: Local IP Address to be filtered on. Notation: "127.0.0.1" for single + address entry. "127.0.0.1-127.0.0.255" for range. "127.0.0.1;127.0.0.5;" for multiple entries. + Multiple ranges not currently supported. Mixing ranges with multiple entries not currently + supported. Default = null. + :type remote_ip_address: str + :param local_port: Local port to be filtered on. Notation: "80" for single port entry."80-85" + for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing + ranges with multiple entries not currently supported. Default = null. + :type local_port: str + :param remote_port: Remote port to be filtered on. Notation: "80" for single port entry."80-85" + for range. "80;443;" for multiple entries. Multiple ranges not currently supported. Mixing + ranges with multiple entries not currently supported. Default = null. + :type remote_port: str + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, + 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, + 'local_port': {'key': 'localPort', 'type': 'str'}, + 'remote_port': {'key': 'remotePort', 'type': 'str'}, + } + + def __init__( + self, + *, + protocol: Optional[Union[str, "PcProtocol"]] = "Any", + local_ip_address: Optional[str] = None, + remote_ip_address: Optional[str] = None, + local_port: Optional[str] = None, + remote_port: Optional[str] = None, + **kwargs + ): + super(PacketCaptureFilter, self).__init__(**kwargs) + self.protocol = protocol + self.local_ip_address = local_ip_address + self.remote_ip_address = remote_ip_address + self.local_port = local_port + self.remote_port = remote_port + + +class PacketCaptureListResult(msrest.serialization.Model): + """List of packet capture sessions. + + :param value: Information about packet capture sessions. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureResult] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PacketCaptureResult]'}, + } + + def __init__( + self, + *, + value: Optional[List["PacketCaptureResult"]] = None, + **kwargs + ): + super(PacketCaptureListResult, self).__init__(**kwargs) + self.value = value + + +class PacketCaptureParameters(msrest.serialization.Model): + """Parameters that define the create packet capture operation. + + All required parameters must be populated in order to send to Azure. + + :param target: Required. The ID of the targeted resource, only VM is currently supported. + :type target: str + :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :type bytes_to_capture_per_packet: long + :param total_bytes_per_session: Maximum size of the capture output. + :type total_bytes_per_session: long + :param time_limit_in_seconds: Maximum duration of the capture session in seconds. + :type time_limit_in_seconds: int + :param storage_location: Required. The storage location for a packet capture session. + :type storage_location: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureStorageLocation + :param filters: A list of packet capture filters. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureFilter] + """ + + _validation = { + 'target': {'required': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'storage_location': {'required': True}, + } + + _attribute_map = { + 'target': {'key': 'target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, + } + + def __init__( + self, + *, + target: str, + storage_location: "PacketCaptureStorageLocation", + bytes_to_capture_per_packet: Optional[int] = 0, + total_bytes_per_session: Optional[int] = 1073741824, + time_limit_in_seconds: Optional[int] = 18000, + filters: Optional[List["PacketCaptureFilter"]] = None, + **kwargs + ): + super(PacketCaptureParameters, self).__init__(**kwargs) + self.target = target + self.bytes_to_capture_per_packet = bytes_to_capture_per_packet + self.total_bytes_per_session = total_bytes_per_session + self.time_limit_in_seconds = time_limit_in_seconds + self.storage_location = storage_location + self.filters = filters + + +class PacketCaptureQueryStatusResult(msrest.serialization.Model): + """Status of packet capture session. + + :param name: The name of the packet capture resource. + :type name: str + :param id: The ID of the packet capture resource. + :type id: str + :param capture_start_time: The start time of the packet capture session. + :type capture_start_time: ~datetime.datetime + :param packet_capture_status: The status of the packet capture session. Possible values + include: "NotStarted", "Running", "Stopped", "Error", "Unknown". + :type packet_capture_status: str or ~azure.mgmt.network.v2021_05_01.models.PcStatus + :param stop_reason: The reason the current packet capture session was stopped. + :type stop_reason: str + :param packet_capture_error: List of errors of packet capture session. + :type packet_capture_error: list[str or ~azure.mgmt.network.v2021_05_01.models.PcError] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'capture_start_time': {'key': 'captureStartTime', 'type': 'iso-8601'}, + 'packet_capture_status': {'key': 'packetCaptureStatus', 'type': 'str'}, + 'stop_reason': {'key': 'stopReason', 'type': 'str'}, + 'packet_capture_error': {'key': 'packetCaptureError', 'type': '[str]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + capture_start_time: Optional[datetime.datetime] = None, + packet_capture_status: Optional[Union[str, "PcStatus"]] = None, + stop_reason: Optional[str] = None, + packet_capture_error: Optional[List[Union[str, "PcError"]]] = None, + **kwargs + ): + super(PacketCaptureQueryStatusResult, self).__init__(**kwargs) + self.name = name + self.id = id + self.capture_start_time = capture_start_time + self.packet_capture_status = packet_capture_status + self.stop_reason = stop_reason + self.packet_capture_error = packet_capture_error + + +class PacketCaptureResult(msrest.serialization.Model): + """Information about packet capture session. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name of the packet capture session. + :vartype name: str + :ivar id: ID of the packet capture operation. + :vartype id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param target: The ID of the targeted resource, only VM is currently supported. + :type target: str + :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :type bytes_to_capture_per_packet: long + :param total_bytes_per_session: Maximum size of the capture output. + :type total_bytes_per_session: long + :param time_limit_in_seconds: Maximum duration of the capture session in seconds. + :type time_limit_in_seconds: int + :param storage_location: The storage location for a packet capture session. + :type storage_location: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureStorageLocation + :param filters: A list of packet capture filters. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureFilter] + :ivar provisioning_state: The provisioning state of the packet capture session. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'etag': {'readonly': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'target': {'key': 'properties.target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'properties.bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'properties.totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'properties.timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'properties.storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'properties.filters', 'type': '[PacketCaptureFilter]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + target: Optional[str] = None, + bytes_to_capture_per_packet: Optional[int] = 0, + total_bytes_per_session: Optional[int] = 1073741824, + time_limit_in_seconds: Optional[int] = 18000, + storage_location: Optional["PacketCaptureStorageLocation"] = None, + filters: Optional[List["PacketCaptureFilter"]] = None, + **kwargs + ): + super(PacketCaptureResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.etag = None + self.target = target + self.bytes_to_capture_per_packet = bytes_to_capture_per_packet + self.total_bytes_per_session = total_bytes_per_session + self.time_limit_in_seconds = time_limit_in_seconds + self.storage_location = storage_location + self.filters = filters + self.provisioning_state = None + + +class PacketCaptureResultProperties(PacketCaptureParameters): + """The properties of a packet capture session. + + 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 target: Required. The ID of the targeted resource, only VM is currently supported. + :type target: str + :param bytes_to_capture_per_packet: Number of bytes captured per packet, the remaining bytes + are truncated. + :type bytes_to_capture_per_packet: long + :param total_bytes_per_session: Maximum size of the capture output. + :type total_bytes_per_session: long + :param time_limit_in_seconds: Maximum duration of the capture session in seconds. + :type time_limit_in_seconds: int + :param storage_location: Required. The storage location for a packet capture session. + :type storage_location: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureStorageLocation + :param filters: A list of packet capture filters. + :type filters: list[~azure.mgmt.network.v2021_05_01.models.PacketCaptureFilter] + :ivar provisioning_state: The provisioning state of the packet capture session. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'target': {'required': True}, + 'bytes_to_capture_per_packet': {'maximum': 4294967295, 'minimum': 0}, + 'total_bytes_per_session': {'maximum': 4294967295, 'minimum': 0}, + 'time_limit_in_seconds': {'maximum': 18000, 'minimum': 0}, + 'storage_location': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'target': {'key': 'target', 'type': 'str'}, + 'bytes_to_capture_per_packet': {'key': 'bytesToCapturePerPacket', 'type': 'long'}, + 'total_bytes_per_session': {'key': 'totalBytesPerSession', 'type': 'long'}, + 'time_limit_in_seconds': {'key': 'timeLimitInSeconds', 'type': 'int'}, + 'storage_location': {'key': 'storageLocation', 'type': 'PacketCaptureStorageLocation'}, + 'filters': {'key': 'filters', 'type': '[PacketCaptureFilter]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + target: str, + storage_location: "PacketCaptureStorageLocation", + bytes_to_capture_per_packet: Optional[int] = 0, + total_bytes_per_session: Optional[int] = 1073741824, + time_limit_in_seconds: Optional[int] = 18000, + filters: Optional[List["PacketCaptureFilter"]] = None, + **kwargs + ): + super(PacketCaptureResultProperties, self).__init__(target=target, bytes_to_capture_per_packet=bytes_to_capture_per_packet, total_bytes_per_session=total_bytes_per_session, time_limit_in_seconds=time_limit_in_seconds, storage_location=storage_location, filters=filters, **kwargs) + self.provisioning_state = None + + +class PacketCaptureStorageLocation(msrest.serialization.Model): + """The storage location for a packet capture session. + + :param storage_id: The ID of the storage account to save the packet capture session. Required + if no local file path is provided. + :type storage_id: str + :param storage_path: The URI of the storage path to save the packet capture. Must be a + well-formed URI describing the location to save the packet capture. + :type storage_path: str + :param file_path: A valid local path on the targeting VM. Must include the name of the capture + file (*.cap). For linux virtual machine it must start with /var/captures. Required if no + storage ID is provided, otherwise optional. + :type file_path: str + """ + + _attribute_map = { + 'storage_id': {'key': 'storageId', 'type': 'str'}, + 'storage_path': {'key': 'storagePath', 'type': 'str'}, + 'file_path': {'key': 'filePath', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_id: Optional[str] = None, + storage_path: Optional[str] = None, + file_path: Optional[str] = None, + **kwargs + ): + super(PacketCaptureStorageLocation, self).__init__(**kwargs) + self.storage_id = storage_id + self.storage_path = storage_path + self.file_path = file_path + + +class PatchRouteFilter(SubResource): + """Route Filter Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param rules: Collection of RouteFilterRules contained within a route filter. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.RouteFilterRule] + :ivar peerings: A collection of references to express route circuit peerings. + :vartype peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :ivar ipv6_peerings: A collection of references to express route circuit ipv6 peerings. + :vartype ipv6_peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :ivar provisioning_state: The provisioning state of the route filter resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peerings': {'readonly': True}, + 'ipv6_peerings': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'ipv6_peerings': {'key': 'properties.ipv6Peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + rules: Optional[List["RouteFilterRule"]] = None, + **kwargs + ): + super(PatchRouteFilter, self).__init__(id=id, **kwargs) + self.name = None + self.etag = None + self.type = None + self.tags = tags + self.rules = rules + self.peerings = None + self.ipv6_peerings = None + self.provisioning_state = None + + +class PatchRouteFilterRule(SubResource): + """Route Filter Rule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :vartype name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param access: The access type of the rule. Possible values include: "Allow", "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.Access + :param route_filter_rule_type: The rule type of the rule. Possible values include: "Community". + :type route_filter_rule_type: str or ~azure.mgmt.network.v2021_05_01.models.RouteFilterRuleType + :param communities: The collection for bgp community values to filter on. e.g. + ['12076:5010','12076:5020']. + :type communities: list[str] + :ivar provisioning_state: The provisioning state of the route filter rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, + 'communities': {'key': 'properties.communities', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + access: Optional[Union[str, "Access"]] = None, + route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, + communities: Optional[List[str]] = None, + **kwargs + ): + super(PatchRouteFilterRule, self).__init__(id=id, **kwargs) + self.name = None + self.etag = None + self.access = access + self.route_filter_rule_type = route_filter_rule_type + self.communities = communities + self.provisioning_state = None + + +class PeerExpressRouteCircuitConnection(SubResource): + """Peer Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :param express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the circuit. + :type express_route_circuit_peering: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param peer_express_route_circuit_peering: Reference to Express Route Circuit Private Peering + Resource of the peered circuit. + :type peer_express_route_circuit_peering: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param address_prefix: /29 IP address space to carve out Customer addresses for tunnels. + :type address_prefix: str + :ivar circuit_connection_status: Express Route Circuit connection state. Possible values + include: "Connected", "Connecting", "Disconnected". + :vartype circuit_connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.CircuitConnectionStatus + :param connection_name: The name of the express route circuit connection resource. + :type connection_name: str + :param auth_resource_guid: The resource guid of the authorization used for the express route + circuit connection. + :type auth_resource_guid: str + :ivar provisioning_state: The provisioning state of the peer express route circuit connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'circuit_connection_status': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'express_route_circuit_peering': {'key': 'properties.expressRouteCircuitPeering', 'type': 'SubResource'}, + 'peer_express_route_circuit_peering': {'key': 'properties.peerExpressRouteCircuitPeering', 'type': 'SubResource'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'circuit_connection_status': {'key': 'properties.circuitConnectionStatus', 'type': 'str'}, + 'connection_name': {'key': 'properties.connectionName', 'type': 'str'}, + 'auth_resource_guid': {'key': 'properties.authResourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + express_route_circuit_peering: Optional["SubResource"] = None, + peer_express_route_circuit_peering: Optional["SubResource"] = None, + address_prefix: Optional[str] = None, + connection_name: Optional[str] = None, + auth_resource_guid: Optional[str] = None, + **kwargs + ): + super(PeerExpressRouteCircuitConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.express_route_circuit_peering = express_route_circuit_peering + self.peer_express_route_circuit_peering = peer_express_route_circuit_peering + self.address_prefix = address_prefix + self.circuit_connection_status = None + self.connection_name = connection_name + self.auth_resource_guid = auth_resource_guid + self.provisioning_state = None + + +class PeerExpressRouteCircuitConnectionListResult(msrest.serialization.Model): + """Response for ListPeeredConnections API service call retrieves all global reach peer circuit connections that belongs to a Private Peering for an ExpressRouteCircuit. + + :param value: The global reach peer circuit connection associated with Private Peering in an + ExpressRoute Circuit. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PeerExpressRouteCircuitConnection] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PeerExpressRouteCircuitConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PeerExpressRouteCircuitConnection"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PeerExpressRouteCircuitConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PeerRoute(msrest.serialization.Model): + """Peer routing details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar local_address: The peer's local address. + :vartype local_address: str + :ivar network: The route's network prefix. + :vartype network: str + :ivar next_hop: The route's next hop. + :vartype next_hop: str + :ivar source_peer: The peer this route was learned from. + :vartype source_peer: str + :ivar origin: The source this route was learned from. + :vartype origin: str + :ivar as_path: The route's AS path sequence. + :vartype as_path: str + :ivar weight: The route's weight. + :vartype weight: int + """ + + _validation = { + 'local_address': {'readonly': True}, + 'network': {'readonly': True}, + 'next_hop': {'readonly': True}, + 'source_peer': {'readonly': True}, + 'origin': {'readonly': True}, + 'as_path': {'readonly': True}, + 'weight': {'readonly': True}, + } + + _attribute_map = { + 'local_address': {'key': 'localAddress', 'type': 'str'}, + 'network': {'key': 'network', 'type': 'str'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + 'source_peer': {'key': 'sourcePeer', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'as_path': {'key': 'asPath', 'type': 'str'}, + 'weight': {'key': 'weight', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(PeerRoute, self).__init__(**kwargs) + self.local_address = None + self.network = None + self.next_hop = None + self.source_peer = None + self.origin = None + self.as_path = None + self.weight = None + + +class PeerRouteList(msrest.serialization.Model): + """List of virtual router peer routes. + + :param value: List of peer routes. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PeerRoute] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PeerRoute]'}, + } + + def __init__( + self, + *, + value: Optional[List["PeerRoute"]] = None, + **kwargs + ): + super(PeerRouteList, self).__init__(**kwargs) + self.value = value + + +class PolicySettings(msrest.serialization.Model): + """Defines contents of a web application firewall global configuration. + + :param state: The state of the policy. Possible values include: "Disabled", "Enabled". + :type state: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallEnabledState + :param mode: The mode of the policy. Possible values include: "Prevention", "Detection". + :type mode: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallMode + :param request_body_check: Whether to allow WAF to check request Body. + :type request_body_check: bool + :param max_request_body_size_in_kb: Maximum request body size in Kb for WAF. + :type max_request_body_size_in_kb: int + :param file_upload_limit_in_mb: Maximum file upload size in Mb for WAF. + :type file_upload_limit_in_mb: int + """ + + _validation = { + 'max_request_body_size_in_kb': {'minimum': 8}, + 'file_upload_limit_in_mb': {'minimum': 0}, + } + + _attribute_map = { + 'state': {'key': 'state', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + 'request_body_check': {'key': 'requestBodyCheck', 'type': 'bool'}, + 'max_request_body_size_in_kb': {'key': 'maxRequestBodySizeInKb', 'type': 'int'}, + 'file_upload_limit_in_mb': {'key': 'fileUploadLimitInMb', 'type': 'int'}, + } + + def __init__( + self, + *, + state: Optional[Union[str, "WebApplicationFirewallEnabledState"]] = None, + mode: Optional[Union[str, "WebApplicationFirewallMode"]] = None, + request_body_check: Optional[bool] = None, + max_request_body_size_in_kb: Optional[int] = None, + file_upload_limit_in_mb: Optional[int] = None, + **kwargs + ): + super(PolicySettings, self).__init__(**kwargs) + self.state = state + self.mode = mode + self.request_body_check = request_body_check + self.max_request_body_size_in_kb = max_request_body_size_in_kb + self.file_upload_limit_in_mb = file_upload_limit_in_mb + + +class PrepareNetworkPoliciesRequest(msrest.serialization.Model): + """Details of PrepareNetworkPolicies for Subnet. + + :param service_name: The name of the service for which subnet is being prepared for. + :type service_name: str + :param network_intent_policy_configurations: A list of NetworkIntentPolicyConfiguration. + :type network_intent_policy_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkIntentPolicyConfiguration] + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + 'network_intent_policy_configurations': {'key': 'networkIntentPolicyConfigurations', 'type': '[NetworkIntentPolicyConfiguration]'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + network_intent_policy_configurations: Optional[List["NetworkIntentPolicyConfiguration"]] = None, + **kwargs + ): + super(PrepareNetworkPoliciesRequest, self).__init__(**kwargs) + self.service_name = service_name + self.network_intent_policy_configurations = network_intent_policy_configurations + + +class PrivateDnsZoneConfig(msrest.serialization.Model): + """PrivateDnsZoneConfig resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :param private_dns_zone_id: The resource id of the private dns zone. + :type private_dns_zone_id: str + :ivar record_sets: A collection of information regarding a recordSet, holding information to + identify private resources. + :vartype record_sets: list[~azure.mgmt.network.v2021_05_01.models.RecordSet] + """ + + _validation = { + 'record_sets': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'private_dns_zone_id': {'key': 'properties.privateDnsZoneId', 'type': 'str'}, + 'record_sets': {'key': 'properties.recordSets', 'type': '[RecordSet]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + private_dns_zone_id: Optional[str] = None, + **kwargs + ): + super(PrivateDnsZoneConfig, self).__init__(**kwargs) + self.name = name + self.private_dns_zone_id = private_dns_zone_id + self.record_sets = None + + +class PrivateDnsZoneGroup(SubResource): + """Private dns zone group resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the private dns zone group resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_dns_zone_configs: A collection of private dns zone configurations of the private + dns zone group. + :type private_dns_zone_configs: + list[~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneConfig] + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_dns_zone_configs': {'key': 'properties.privateDnsZoneConfigs', 'type': '[PrivateDnsZoneConfig]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_dns_zone_configs: Optional[List["PrivateDnsZoneConfig"]] = None, + **kwargs + ): + super(PrivateDnsZoneGroup, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.provisioning_state = None + self.private_dns_zone_configs = private_dns_zone_configs + + +class PrivateDnsZoneGroupListResult(msrest.serialization.Model): + """Response for the ListPrivateDnsZoneGroups API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of private dns zone group resources in a private endpoint. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroup] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateDnsZoneGroup]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateDnsZoneGroup"]] = None, + **kwargs + ): + super(PrivateDnsZoneGroupListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateEndpoint(Resource): + """Private endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the load balancer. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param subnet: The ID of the subnet from which the private IP will be allocated. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :ivar network_interfaces: An array of references to the network interfaces created for this + private endpoint. + :vartype network_interfaces: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar provisioning_state: The provisioning state of the private endpoint resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_link_service_connections: A grouping of information about the connection to the + remote resource. + :type private_link_service_connections: + list[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnection] + :param manual_private_link_service_connections: A grouping of information about the connection + to the remote resource. Used when the network admin does not have access to approve connections + to the remote resource. + :type manual_private_link_service_connections: + list[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnection] + :param custom_dns_configs: An array of custom dns configurations. + :type custom_dns_configs: + list[~azure.mgmt.network.v2021_05_01.models.CustomDnsConfigPropertiesFormat] + :param application_security_groups: Application security groups in which the private endpoint + IP configuration is included. + :type application_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :param ip_configurations: A list of IP configurations of the private endpoint. This will be + used to map to the First Party Service's endpoints. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointIPConfiguration] + :param custom_network_interface_name: The custom name of the network interface attached to the + private endpoint. + :type custom_network_interface_name: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'network_interfaces': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_link_service_connections': {'key': 'properties.privateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'}, + 'manual_private_link_service_connections': {'key': 'properties.manualPrivateLinkServiceConnections', 'type': '[PrivateLinkServiceConnection]'}, + 'custom_dns_configs': {'key': 'properties.customDnsConfigs', 'type': '[CustomDnsConfigPropertiesFormat]'}, + 'application_security_groups': {'key': 'properties.applicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[PrivateEndpointIPConfiguration]'}, + 'custom_network_interface_name': {'key': 'properties.customNetworkInterfaceName', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + subnet: Optional["Subnet"] = None, + private_link_service_connections: Optional[List["PrivateLinkServiceConnection"]] = None, + manual_private_link_service_connections: Optional[List["PrivateLinkServiceConnection"]] = None, + custom_dns_configs: Optional[List["CustomDnsConfigPropertiesFormat"]] = None, + application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, + ip_configurations: Optional[List["PrivateEndpointIPConfiguration"]] = None, + custom_network_interface_name: Optional[str] = None, + **kwargs + ): + super(PrivateEndpoint, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.subnet = subnet + self.network_interfaces = None + self.provisioning_state = None + self.private_link_service_connections = private_link_service_connections + self.manual_private_link_service_connections = manual_private_link_service_connections + self.custom_dns_configs = custom_dns_configs + self.application_security_groups = application_security_groups + self.ip_configurations = ip_configurations + self.custom_network_interface_name = custom_network_interface_name + + +class PrivateEndpointConnection(SubResource): + """PrivateEndpointConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar private_endpoint: The resource of private end point. + :vartype private_endpoint: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar link_identifier: The consumer link id. + :vartype link_identifier: str + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'private_endpoint': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'link_identifier': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'link_identifier': {'key': 'properties.linkIdentifier', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.private_endpoint = None + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None + self.link_identifier = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """Response for the ListPrivateEndpointConnection API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of PrivateEndpointConnection resources for a specific private link + service. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateEndpointIPConfiguration(msrest.serialization.Model): + """An IP Configuration of the private endpoint. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: The name of the resource that is unique within a resource group. + :type name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param group_id: The ID of a group obtained from the remote resource that this private endpoint + should connect to. + :type group_id: str + :param member_name: The member name of a group obtained from the remote resource that this + private endpoint should connect to. + :type member_name: str + :param private_ip_address: A private ip address obtained from the private endpoint's subnet. + :type private_ip_address: str + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'member_name': {'key': 'properties.memberName', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + group_id: Optional[str] = None, + member_name: Optional[str] = None, + private_ip_address: Optional[str] = None, + **kwargs + ): + super(PrivateEndpointIPConfiguration, self).__init__(**kwargs) + self.name = name + self.type = None + self.etag = None + self.group_id = group_id + self.member_name = member_name + self.private_ip_address = private_ip_address + + +class PrivateEndpointListResult(msrest.serialization.Model): + """Response for the ListPrivateEndpoints API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of private endpoint resources in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpoint"]] = None, + **kwargs + ): + super(PrivateEndpointListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class PrivateLinkService(Resource): + """Private link service resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the load balancer. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param load_balancer_frontend_ip_configurations: An array of references to the load balancer IP + configurations. + :type load_balancer_frontend_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration] + :param ip_configurations: An array of private link service IP configurations. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceIpConfiguration] + :ivar network_interfaces: An array of references to the network interfaces created for this + private link service. + :vartype network_interfaces: list[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] + :ivar provisioning_state: The provisioning state of the private link service resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar private_endpoint_connections: An array of list about connections to the private endpoint. + :vartype private_endpoint_connections: + list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection] + :param visibility: The visibility list of the private link service. + :type visibility: ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServicePropertiesVisibility + :param auto_approval: The auto-approval list of the private link service. + :type auto_approval: + ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServicePropertiesAutoApproval + :param fqdns: The list of Fqdn. + :type fqdns: list[str] + :ivar alias: The alias of the private link service. + :vartype alias: str + :param enable_proxy_protocol: Whether the private link service is enabled for proxy protocol or + not. + :type enable_proxy_protocol: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'network_interfaces': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + 'alias': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'load_balancer_frontend_ip_configurations': {'key': 'properties.loadBalancerFrontendIpConfigurations', 'type': '[FrontendIPConfiguration]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[PrivateLinkServiceIpConfiguration]'}, + 'network_interfaces': {'key': 'properties.networkInterfaces', 'type': '[NetworkInterface]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + 'visibility': {'key': 'properties.visibility', 'type': 'PrivateLinkServicePropertiesVisibility'}, + 'auto_approval': {'key': 'properties.autoApproval', 'type': 'PrivateLinkServicePropertiesAutoApproval'}, + 'fqdns': {'key': 'properties.fqdns', 'type': '[str]'}, + 'alias': {'key': 'properties.alias', 'type': 'str'}, + 'enable_proxy_protocol': {'key': 'properties.enableProxyProtocol', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + load_balancer_frontend_ip_configurations: Optional[List["FrontendIPConfiguration"]] = None, + ip_configurations: Optional[List["PrivateLinkServiceIpConfiguration"]] = None, + visibility: Optional["PrivateLinkServicePropertiesVisibility"] = None, + auto_approval: Optional["PrivateLinkServicePropertiesAutoApproval"] = None, + fqdns: Optional[List[str]] = None, + enable_proxy_protocol: Optional[bool] = None, + **kwargs + ): + super(PrivateLinkService, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.load_balancer_frontend_ip_configurations = load_balancer_frontend_ip_configurations + self.ip_configurations = ip_configurations + self.network_interfaces = None + self.provisioning_state = None + self.private_endpoint_connections = None + self.visibility = visibility + self.auto_approval = auto_approval + self.fqdns = fqdns + self.alias = None + self.enable_proxy_protocol = enable_proxy_protocol + + +class PrivateLinkServiceConnection(SubResource): + """PrivateLinkServiceConnection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar type: The resource type. + :vartype type: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the private link service connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_link_service_id: The resource id of private link service. + :type private_link_service_id: str + :param group_ids: The ID(s) of the group(s) obtained from the remote resource that this private + endpoint should connect to. + :type group_ids: list[str] + :param request_message: A message passed to the owner of the remote resource with this + connection request. Restricted to 140 chars. + :type request_message: str + :param private_link_service_connection_state: A collection of read-only information about the + state of the connection to the remote resource. + :type private_link_service_connection_state: + ~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceConnectionState + """ + + _validation = { + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_link_service_id': {'key': 'properties.privateLinkServiceId', 'type': 'str'}, + 'group_ids': {'key': 'properties.groupIds', 'type': '[str]'}, + 'request_message': {'key': 'properties.requestMessage', 'type': 'str'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_link_service_id: Optional[str] = None, + group_ids: Optional[List[str]] = None, + request_message: Optional[str] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, + **kwargs + ): + super(PrivateLinkServiceConnection, self).__init__(id=id, **kwargs) + self.name = name + self.type = None + self.etag = None + self.provisioning_state = None + self.private_link_service_id = private_link_service_id + self.group_ids = group_ids + self.request_message = request_message + self.private_link_service_connection_state = private_link_service_connection_state + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. + :type status: str + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + *, + status: Optional[str] = None, + description: Optional[str] = None, + actions_required: Optional[str] = None, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status + self.description = description + self.actions_required = actions_required + + +class PrivateLinkServiceIpConfiguration(SubResource): + """The private link service ip configuration. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of private link service ip configuration. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: The resource type. + :vartype type: str + :param private_ip_address: The private IP address of the IP configuration. + :type private_ip_address: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.Subnet + :param primary: Whether the ip configuration is primary or not. + :type primary: bool + :ivar provisioning_state: The provisioning state of the private link service IP configuration + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_ip_address_version: Whether the specific IP configuration is IPv4 or IPv6. + Default is IPv4. Possible values include: "IPv4", "IPv6". + :type private_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'Subnet'}, + 'primary': {'key': 'properties.primary', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_ip_address_version': {'key': 'properties.privateIPAddressVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_address: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["Subnet"] = None, + primary: Optional[bool] = None, + private_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + **kwargs + ): + super(PrivateLinkServiceIpConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.private_ip_address = private_ip_address + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.primary = primary + self.provisioning_state = None + self.private_ip_address_version = private_ip_address_version + + +class PrivateLinkServiceListResult(msrest.serialization.Model): + """Response for the ListPrivateLinkService API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of PrivateLinkService resources in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PrivateLinkService] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkService]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateLinkService"]] = None, + **kwargs + ): + super(PrivateLinkServiceListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ResourceSet(msrest.serialization.Model): + """The base resource set for visibility and auto-approval. + + :param subscriptions: The list of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + *, + subscriptions: Optional[List[str]] = None, + **kwargs + ): + super(ResourceSet, self).__init__(**kwargs) + self.subscriptions = subscriptions + + +class PrivateLinkServicePropertiesAutoApproval(ResourceSet): + """The auto-approval list of the private link service. + + :param subscriptions: The list of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + *, + subscriptions: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkServicePropertiesAutoApproval, self).__init__(subscriptions=subscriptions, **kwargs) + + +class PrivateLinkServicePropertiesVisibility(ResourceSet): + """The visibility list of the private link service. + + :param subscriptions: The list of subscriptions. + :type subscriptions: list[str] + """ + + _attribute_map = { + 'subscriptions': {'key': 'subscriptions', 'type': '[str]'}, + } + + def __init__( + self, + *, + subscriptions: Optional[List[str]] = None, + **kwargs + ): + super(PrivateLinkServicePropertiesVisibility, self).__init__(subscriptions=subscriptions, **kwargs) + + +class PrivateLinkServiceVisibility(msrest.serialization.Model): + """Response for the CheckPrivateLinkServiceVisibility API service call. + + :param visible: Private Link Service Visibility (True/False). + :type visible: bool + """ + + _attribute_map = { + 'visible': {'key': 'visible', 'type': 'bool'}, + } + + def __init__( + self, + *, + visible: Optional[bool] = None, + **kwargs + ): + super(PrivateLinkServiceVisibility, self).__init__(**kwargs) + self.visible = visible + + +class Probe(SubResource): + """A load balancer probe. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within the set of probes used by the load + balancer. This name can be used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Type of the resource. + :vartype type: str + :ivar load_balancing_rules: The load balancer rules that use this probe. + :vartype load_balancing_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param protocol: The protocol of the end point. If 'Tcp' is specified, a received ACK is + required for the probe to be successful. If 'Http' or 'Https' is specified, a 200 OK response + from the specifies URI is required for the probe to be successful. Possible values include: + "Http", "Tcp", "Https". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ProbeProtocol + :param port: The port for communicating the probe. Possible values range from 1 to 65535, + inclusive. + :type port: int + :param interval_in_seconds: The interval, in seconds, for how frequently to probe the endpoint + for health status. Typically, the interval is slightly less than half the allocated timeout + period (in seconds) which allows two full probes before taking the instance out of rotation. + The default value is 15, the minimum value is 5. + :type interval_in_seconds: int + :param number_of_probes: The number of probes where if no response, will result in stopping + further traffic from being delivered to the endpoint. This values allows endpoints to be taken + out of rotation faster or slower than the typical times used in Azure. + :type number_of_probes: int + :param request_path: The URI used for requesting health status from the VM. Path is required if + a protocol is set to http. Otherwise, it is not allowed. There is no default value. + :type request_path: str + :ivar provisioning_state: The provisioning state of the probe resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'load_balancing_rules': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[SubResource]'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'port': {'key': 'properties.port', 'type': 'int'}, + 'interval_in_seconds': {'key': 'properties.intervalInSeconds', 'type': 'int'}, + 'number_of_probes': {'key': 'properties.numberOfProbes', 'type': 'int'}, + 'request_path': {'key': 'properties.requestPath', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + protocol: Optional[Union[str, "ProbeProtocol"]] = None, + port: Optional[int] = None, + interval_in_seconds: Optional[int] = None, + number_of_probes: Optional[int] = None, + request_path: Optional[str] = None, + **kwargs + ): + super(Probe, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.load_balancing_rules = None + self.protocol = protocol + self.port = port + self.interval_in_seconds = interval_in_seconds + self.number_of_probes = number_of_probes + self.request_path = request_path + self.provisioning_state = None + + +class PropagatedRouteTable(msrest.serialization.Model): + """The list of RouteTables to advertise the routes to. + + :param labels: The list of labels. + :type labels: list[str] + :param ids: The list of resource ids of all the RouteTables. + :type ids: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _attribute_map = { + 'labels': {'key': 'labels', 'type': '[str]'}, + 'ids': {'key': 'ids', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + labels: Optional[List[str]] = None, + ids: Optional[List["SubResource"]] = None, + **kwargs + ): + super(PropagatedRouteTable, self).__init__(**kwargs) + self.labels = labels + self.ids = ids + + +class ProtocolConfiguration(msrest.serialization.Model): + """Configuration of the protocol. + + :param http_configuration: HTTP configuration of the connectivity check. + :type http_configuration: ~azure.mgmt.network.v2021_05_01.models.HTTPConfiguration + """ + + _attribute_map = { + 'http_configuration': {'key': 'HTTPConfiguration', 'type': 'HTTPConfiguration'}, + } + + def __init__( + self, + *, + http_configuration: Optional["HTTPConfiguration"] = None, + **kwargs + ): + super(ProtocolConfiguration, self).__init__(**kwargs) + self.http_configuration = http_configuration + + +class ProtocolCustomSettingsFormat(msrest.serialization.Model): + """DDoS custom policy properties. + + :param protocol: The protocol for which the DDoS protection policy is being customized. + Possible values include: "Tcp", "Udp", "Syn". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicyProtocol + :param trigger_rate_override: The customized DDoS protection trigger rate. + :type trigger_rate_override: str + :param source_rate_override: The customized DDoS protection source rate. + :type source_rate_override: str + :param trigger_sensitivity_override: The customized DDoS protection trigger rate sensitivity + degrees. High: Trigger rate set with most sensitivity w.r.t. normal traffic. Default: Trigger + rate set with moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with less + sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with least sensitivity w.r.t. + normal traffic. Possible values include: "Relaxed", "Low", "Default", "High". + :type trigger_sensitivity_override: str or + ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicyTriggerSensitivityOverride + """ + + _attribute_map = { + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'trigger_rate_override': {'key': 'triggerRateOverride', 'type': 'str'}, + 'source_rate_override': {'key': 'sourceRateOverride', 'type': 'str'}, + 'trigger_sensitivity_override': {'key': 'triggerSensitivityOverride', 'type': 'str'}, + } + + def __init__( + self, + *, + protocol: Optional[Union[str, "DdosCustomPolicyProtocol"]] = None, + trigger_rate_override: Optional[str] = None, + source_rate_override: Optional[str] = None, + trigger_sensitivity_override: Optional[Union[str, "DdosCustomPolicyTriggerSensitivityOverride"]] = None, + **kwargs + ): + super(ProtocolCustomSettingsFormat, self).__init__(**kwargs) + self.protocol = protocol + self.trigger_rate_override = trigger_rate_override + self.source_rate_override = source_rate_override + self.trigger_sensitivity_override = trigger_sensitivity_override + + +class PublicIPAddress(Resource): + """Public IP address resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the public ip address. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :param sku: The public IP address SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :type zones: list[str] + :param public_ip_allocation_method: The public IP address allocation method. Possible values + include: "Static", "Dynamic". + :type public_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param public_ip_address_version: The public IP address version. Possible values include: + "IPv4", "IPv6". + :type public_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :ivar ip_configuration: The IP configuration associated with the public IP address. + :vartype ip_configuration: ~azure.mgmt.network.v2021_05_01.models.IPConfiguration + :param dns_settings: The FQDN of the DNS record associated with the public IP address. + :type dns_settings: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressDnsSettings + :param ddos_settings: The DDoS protection custom policy associated with the public IP address. + :type ddos_settings: ~azure.mgmt.network.v2021_05_01.models.DdosSettings + :param ip_tags: The list of tags associated with the public IP address. + :type ip_tags: list[~azure.mgmt.network.v2021_05_01.models.IpTag] + :param ip_address: The IP address associated with the public IP address resource. + :type ip_address: str + :param public_ip_prefix: The Public IP Prefix this Public IP Address should be allocated from. + :type public_ip_prefix: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param idle_timeout_in_minutes: The idle timeout of the public IP address. + :type idle_timeout_in_minutes: int + :ivar resource_guid: The resource GUID property of the public IP address resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the public IP address resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param service_public_ip_address: The service public IP address of the public IP address + resource. + :type service_public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :param nat_gateway: The NatGateway for the Public IP address. + :type nat_gateway: ~azure.mgmt.network.v2021_05_01.models.NatGateway + :param migration_phase: Migration phase of Public IP Address. Possible values include: "None", + "Prepare", "Commit", "Abort", "Committed". + :type migration_phase: str or + ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressMigrationPhase + :param linked_public_ip_address: The linked public IP address of the public IP address + resource. + :type linked_public_ip_address: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :param delete_option: Specify what happens to the public IP address when the VM using it is + deleted. Possible values include: "Delete", "Detach". + :type delete_option: str or ~azure.mgmt.network.v2021_05_01.models.DeleteOptions + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'ip_configuration': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'sku': {'key': 'sku', 'type': 'PublicIPAddressSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'public_ip_allocation_method': {'key': 'properties.publicIPAllocationMethod', 'type': 'str'}, + 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, + 'ip_configuration': {'key': 'properties.ipConfiguration', 'type': 'IPConfiguration'}, + 'dns_settings': {'key': 'properties.dnsSettings', 'type': 'PublicIPAddressDnsSettings'}, + 'ddos_settings': {'key': 'properties.ddosSettings', 'type': 'DdosSettings'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'public_ip_prefix': {'key': 'properties.publicIPPrefix', 'type': 'SubResource'}, + 'idle_timeout_in_minutes': {'key': 'properties.idleTimeoutInMinutes', 'type': 'int'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'service_public_ip_address': {'key': 'properties.servicePublicIPAddress', 'type': 'PublicIPAddress'}, + 'nat_gateway': {'key': 'properties.natGateway', 'type': 'NatGateway'}, + 'migration_phase': {'key': 'properties.migrationPhase', 'type': 'str'}, + 'linked_public_ip_address': {'key': 'properties.linkedPublicIPAddress', 'type': 'PublicIPAddress'}, + 'delete_option': {'key': 'properties.deleteOption', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + sku: Optional["PublicIPAddressSku"] = None, + zones: Optional[List[str]] = None, + public_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + public_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + dns_settings: Optional["PublicIPAddressDnsSettings"] = None, + ddos_settings: Optional["DdosSettings"] = None, + ip_tags: Optional[List["IpTag"]] = None, + ip_address: Optional[str] = None, + public_ip_prefix: Optional["SubResource"] = None, + idle_timeout_in_minutes: Optional[int] = None, + service_public_ip_address: Optional["PublicIPAddress"] = None, + nat_gateway: Optional["NatGateway"] = None, + migration_phase: Optional[Union[str, "PublicIPAddressMigrationPhase"]] = None, + linked_public_ip_address: Optional["PublicIPAddress"] = None, + delete_option: Optional[Union[str, "DeleteOptions"]] = None, + **kwargs + ): + super(PublicIPAddress, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.sku = sku + self.etag = None + self.zones = zones + self.public_ip_allocation_method = public_ip_allocation_method + self.public_ip_address_version = public_ip_address_version + self.ip_configuration = None + self.dns_settings = dns_settings + self.ddos_settings = ddos_settings + self.ip_tags = ip_tags + self.ip_address = ip_address + self.public_ip_prefix = public_ip_prefix + self.idle_timeout_in_minutes = idle_timeout_in_minutes + self.resource_guid = None + self.provisioning_state = None + self.service_public_ip_address = service_public_ip_address + self.nat_gateway = nat_gateway + self.migration_phase = migration_phase + self.linked_public_ip_address = linked_public_ip_address + self.delete_option = delete_option + + +class PublicIPAddressDnsSettings(msrest.serialization.Model): + """Contains FQDN of the DNS record associated with the public IP address. + + :param domain_name_label: The domain name label. The concatenation of the domain name label and + the regionalized DNS zone make up the fully qualified domain name associated with the public IP + address. If a domain name label is specified, an A DNS record is created for the public IP in + the Microsoft Azure DNS system. + :type domain_name_label: str + :param fqdn: The Fully Qualified Domain Name of the A DNS record associated with the public IP. + This is the concatenation of the domainNameLabel and the regionalized DNS zone. + :type fqdn: str + :param reverse_fqdn: The reverse FQDN. A user-visible, fully qualified domain name that + resolves to this public IP address. If the reverseFqdn is specified, then a PTR DNS record is + created pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. + :type reverse_fqdn: str + """ + + _attribute_map = { + 'domain_name_label': {'key': 'domainNameLabel', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'reverse_fqdn': {'key': 'reverseFqdn', 'type': 'str'}, + } + + def __init__( + self, + *, + domain_name_label: Optional[str] = None, + fqdn: Optional[str] = None, + reverse_fqdn: Optional[str] = None, + **kwargs + ): + super(PublicIPAddressDnsSettings, self).__init__(**kwargs) + self.domain_name_label = domain_name_label + self.fqdn = fqdn + self.reverse_fqdn = reverse_fqdn + + +class PublicIPAddressListResult(msrest.serialization.Model): + """Response for ListPublicIpAddresses API service call. + + :param value: A list of public IP addresses that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PublicIPAddress] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PublicIPAddress]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PublicIPAddress"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PublicIPAddressListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PublicIPAddressSku(msrest.serialization.Model): + """SKU of a public IP address. + + :param name: Name of a public IP address SKU. Possible values include: "Basic", "Standard". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressSkuName + :param tier: Tier of a public IP address SKU. Possible values include: "Regional", "Global". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.PublicIPAddressSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "PublicIPAddressSkuName"]] = None, + tier: Optional[Union[str, "PublicIPAddressSkuTier"]] = None, + **kwargs + ): + super(PublicIPAddressSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class PublicIPPrefix(Resource): + """Public IP prefix resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the public ip address. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :param sku: The public IP prefix SKU. + :type sku: ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixSku + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param zones: A list of availability zones denoting the IP allocated for the resource needs to + come from. + :type zones: list[str] + :param public_ip_address_version: The public IP address version. Possible values include: + "IPv4", "IPv6". + :type public_ip_address_version: str or ~azure.mgmt.network.v2021_05_01.models.IPVersion + :param ip_tags: The list of tags associated with the public IP prefix. + :type ip_tags: list[~azure.mgmt.network.v2021_05_01.models.IpTag] + :param prefix_length: The Length of the Public IP Prefix. + :type prefix_length: int + :ivar ip_prefix: The allocated Prefix. + :vartype ip_prefix: str + :ivar public_ip_addresses: The list of all referenced PublicIPAddresses. + :vartype public_ip_addresses: + list[~azure.mgmt.network.v2021_05_01.models.ReferencedPublicIpAddress] + :ivar load_balancer_frontend_ip_configuration: The reference to load balancer frontend IP + configuration associated with the public IP prefix. + :vartype load_balancer_frontend_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.SubResource + :param custom_ip_prefix: The customIpPrefix that this prefix is associated with. + :type custom_ip_prefix: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar resource_guid: The resource GUID property of the public IP prefix resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the public IP prefix resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param nat_gateway: NatGateway of Public IP Prefix. + :type nat_gateway: ~azure.mgmt.network.v2021_05_01.models.NatGateway + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'ip_prefix': {'readonly': True}, + 'public_ip_addresses': {'readonly': True}, + 'load_balancer_frontend_ip_configuration': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'sku': {'key': 'sku', 'type': 'PublicIPPrefixSku'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'public_ip_address_version': {'key': 'properties.publicIPAddressVersion', 'type': 'str'}, + 'ip_tags': {'key': 'properties.ipTags', 'type': '[IpTag]'}, + 'prefix_length': {'key': 'properties.prefixLength', 'type': 'int'}, + 'ip_prefix': {'key': 'properties.ipPrefix', 'type': 'str'}, + 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[ReferencedPublicIpAddress]'}, + 'load_balancer_frontend_ip_configuration': {'key': 'properties.loadBalancerFrontendIpConfiguration', 'type': 'SubResource'}, + 'custom_ip_prefix': {'key': 'properties.customIPPrefix', 'type': 'SubResource'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'nat_gateway': {'key': 'properties.natGateway', 'type': 'NatGateway'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + sku: Optional["PublicIPPrefixSku"] = None, + zones: Optional[List[str]] = None, + public_ip_address_version: Optional[Union[str, "IPVersion"]] = None, + ip_tags: Optional[List["IpTag"]] = None, + prefix_length: Optional[int] = None, + custom_ip_prefix: Optional["SubResource"] = None, + nat_gateway: Optional["NatGateway"] = None, + **kwargs + ): + super(PublicIPPrefix, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.sku = sku + self.etag = None + self.zones = zones + self.public_ip_address_version = public_ip_address_version + self.ip_tags = ip_tags + self.prefix_length = prefix_length + self.ip_prefix = None + self.public_ip_addresses = None + self.load_balancer_frontend_ip_configuration = None + self.custom_ip_prefix = custom_ip_prefix + self.resource_guid = None + self.provisioning_state = None + self.nat_gateway = nat_gateway + + +class PublicIPPrefixListResult(msrest.serialization.Model): + """Response for ListPublicIpPrefixes API service call. + + :param value: A list of public IP prefixes that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PublicIPPrefix]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PublicIPPrefix"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PublicIPPrefixListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PublicIPPrefixSku(msrest.serialization.Model): + """SKU of a public IP prefix. + + :param name: Name of a public IP prefix SKU. Possible values include: "Standard". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixSkuName + :param tier: Tier of a public IP prefix SKU. Possible values include: "Regional", "Global". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixSkuTier + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "PublicIPPrefixSkuName"]] = None, + tier: Optional[Union[str, "PublicIPPrefixSkuTier"]] = None, + **kwargs + ): + super(PublicIPPrefixSku, self).__init__(**kwargs) + self.name = name + self.tier = tier + + +class QosDefinition(msrest.serialization.Model): + """Quality of Service defines the traffic configuration between endpoints. Mandatory to have one marking. + + :param markings: List of markings to be used in the configuration. + :type markings: list[int] + :param source_ip_ranges: Source IP ranges. + :type source_ip_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosIpRange] + :param destination_ip_ranges: Destination IP ranges. + :type destination_ip_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosIpRange] + :param source_port_ranges: Sources port ranges. + :type source_port_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosPortRange] + :param destination_port_ranges: Destination port ranges. + :type destination_port_ranges: list[~azure.mgmt.network.v2021_05_01.models.QosPortRange] + :param protocol: RNM supported protocol types. Possible values include: "DoNotUse", "Icmp", + "Tcp", "Udp", "Gre", "Esp", "Ah", "Vxlan", "All". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.ProtocolType + """ + + _attribute_map = { + 'markings': {'key': 'markings', 'type': '[int]'}, + 'source_ip_ranges': {'key': 'sourceIpRanges', 'type': '[QosIpRange]'}, + 'destination_ip_ranges': {'key': 'destinationIpRanges', 'type': '[QosIpRange]'}, + 'source_port_ranges': {'key': 'sourcePortRanges', 'type': '[QosPortRange]'}, + 'destination_port_ranges': {'key': 'destinationPortRanges', 'type': '[QosPortRange]'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + } + + def __init__( + self, + *, + markings: Optional[List[int]] = None, + source_ip_ranges: Optional[List["QosIpRange"]] = None, + destination_ip_ranges: Optional[List["QosIpRange"]] = None, + source_port_ranges: Optional[List["QosPortRange"]] = None, + destination_port_ranges: Optional[List["QosPortRange"]] = None, + protocol: Optional[Union[str, "ProtocolType"]] = None, + **kwargs + ): + super(QosDefinition, self).__init__(**kwargs) + self.markings = markings + self.source_ip_ranges = source_ip_ranges + self.destination_ip_ranges = destination_ip_ranges + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.protocol = protocol + + +class QosIpRange(msrest.serialization.Model): + """Qos Traffic Profiler IP Range properties. + + :param start_ip: Start IP Address. + :type start_ip: str + :param end_ip: End IP Address. + :type end_ip: str + """ + + _attribute_map = { + 'start_ip': {'key': 'startIP', 'type': 'str'}, + 'end_ip': {'key': 'endIP', 'type': 'str'}, + } + + def __init__( + self, + *, + start_ip: Optional[str] = None, + end_ip: Optional[str] = None, + **kwargs + ): + super(QosIpRange, self).__init__(**kwargs) + self.start_ip = start_ip + self.end_ip = end_ip + + +class QosPortRange(msrest.serialization.Model): + """Qos Traffic Profiler Port range properties. + + :param start: Qos Port Range start. + :type start: int + :param end: Qos Port Range end. + :type end: int + """ + + _attribute_map = { + 'start': {'key': 'start', 'type': 'int'}, + 'end': {'key': 'end', 'type': 'int'}, + } + + def __init__( + self, + *, + start: Optional[int] = None, + end: Optional[int] = None, + **kwargs + ): + super(QosPortRange, self).__init__(**kwargs) + self.start = start + self.end = end + + +class QueryInboundNatRulePortMappingRequest(msrest.serialization.Model): + """The request for a QueryInboundNatRulePortMapping API. Either IpConfiguration or IpAddress should be set. + + :param ip_configuration: NetworkInterfaceIPConfiguration set in load balancer backend address. + :type ip_configuration: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param ip_address: IP address set in load balancer backend address. + :type ip_address: str + """ + + _attribute_map = { + 'ip_configuration': {'key': 'ipConfiguration', 'type': 'SubResource'}, + 'ip_address': {'key': 'ipAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + ip_configuration: Optional["SubResource"] = None, + ip_address: Optional[str] = None, + **kwargs + ): + super(QueryInboundNatRulePortMappingRequest, self).__init__(**kwargs) + self.ip_configuration = ip_configuration + self.ip_address = ip_address + + +class QueryResults(msrest.serialization.Model): + """Query result. + + :param matching_records_count: Number of total records matching the query. + :type matching_records_count: long + :param signatures: Array containing the results of the query. + :type signatures: list[~azure.mgmt.network.v2021_05_01.models.SingleQueryResult] + """ + + _attribute_map = { + 'matching_records_count': {'key': 'matchingRecordsCount', 'type': 'long'}, + 'signatures': {'key': 'signatures', 'type': '[SingleQueryResult]'}, + } + + def __init__( + self, + *, + matching_records_count: Optional[int] = None, + signatures: Optional[List["SingleQueryResult"]] = None, + **kwargs + ): + super(QueryResults, self).__init__(**kwargs) + self.matching_records_count = matching_records_count + self.signatures = signatures + + +class QueryTroubleshootingParameters(msrest.serialization.Model): + """Parameters that define the resource to query the troubleshooting result. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The target resource ID to query the troubleshooting + result. + :type target_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + **kwargs + ): + super(QueryTroubleshootingParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + + +class RadiusServer(msrest.serialization.Model): + """Radius Server Settings. + + All required parameters must be populated in order to send to Azure. + + :param radius_server_address: Required. The address of this radius server. + :type radius_server_address: str + :param radius_server_score: The initial score assigned to this radius server. + :type radius_server_score: long + :param radius_server_secret: The secret used for this radius server. + :type radius_server_secret: str + """ + + _validation = { + 'radius_server_address': {'required': True}, + } + + _attribute_map = { + 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, + 'radius_server_score': {'key': 'radiusServerScore', 'type': 'long'}, + 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, + } + + def __init__( + self, + *, + radius_server_address: str, + radius_server_score: Optional[int] = None, + radius_server_secret: Optional[str] = None, + **kwargs + ): + super(RadiusServer, self).__init__(**kwargs) + self.radius_server_address = radius_server_address + self.radius_server_score = radius_server_score + self.radius_server_secret = radius_server_secret + + +class RecordSet(msrest.serialization.Model): + """A collective group of information about the record set information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param record_type: Resource record type. + :type record_type: str + :param record_set_name: Recordset name. + :type record_set_name: str + :param fqdn: Fqdn that resolves to private endpoint ip address. + :type fqdn: str + :ivar provisioning_state: The provisioning state of the recordset. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param ttl: Recordset time to live. + :type ttl: int + :param ip_addresses: The private ip address of the private endpoint. + :type ip_addresses: list[str] + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'record_type': {'key': 'recordType', 'type': 'str'}, + 'record_set_name': {'key': 'recordSetName', 'type': 'str'}, + 'fqdn': {'key': 'fqdn', 'type': 'str'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'ttl': {'key': 'ttl', 'type': 'int'}, + 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, + } + + def __init__( + self, + *, + record_type: Optional[str] = None, + record_set_name: Optional[str] = None, + fqdn: Optional[str] = None, + ttl: Optional[int] = None, + ip_addresses: Optional[List[str]] = None, + **kwargs + ): + super(RecordSet, self).__init__(**kwargs) + self.record_type = record_type + self.record_set_name = record_set_name + self.fqdn = fqdn + self.provisioning_state = None + self.ttl = ttl + self.ip_addresses = ip_addresses + + +class ReferencedPublicIpAddress(msrest.serialization.Model): + """Reference to a public IP address. + + :param id: The PublicIPAddress Reference. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(ReferencedPublicIpAddress, self).__init__(**kwargs) + self.id = id + + +class ResourceNavigationLink(SubResource): + """ResourceNavigationLink resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param linked_resource_type: Resource type of the linked resource. + :type linked_resource_type: str + :param link: Link to the external resource. + :type link: str + :ivar provisioning_state: The provisioning state of the resource navigation link resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, + 'link': {'key': 'properties.link', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + linked_resource_type: Optional[str] = None, + link: Optional[str] = None, + **kwargs + ): + super(ResourceNavigationLink, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.linked_resource_type = linked_resource_type + self.link = link + self.provisioning_state = None + + +class ResourceNavigationLinksListResult(msrest.serialization.Model): + """Response for ResourceNavigationLinks_List operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The resource navigation links in a subnet. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ResourceNavigationLink] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceNavigationLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ResourceNavigationLink"]] = None, + **kwargs + ): + super(ResourceNavigationLinksListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class RetentionPolicyParameters(msrest.serialization.Model): + """Parameters that define the retention policy for flow log. + + :param days: Number of days to retain flow log records. + :type days: int + :param enabled: Flag to enable/disable retention. + :type enabled: bool + """ + + _attribute_map = { + 'days': {'key': 'days', 'type': 'int'}, + 'enabled': {'key': 'enabled', 'type': 'bool'}, + } + + def __init__( + self, + *, + days: Optional[int] = 0, + enabled: Optional[bool] = False, + **kwargs + ): + super(RetentionPolicyParameters, self).__init__(**kwargs) + self.days = days + self.enabled = enabled + + +class Route(SubResource): + """Route resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: The type of the resource. + :type type: str + :param address_prefix: The destination CIDR to which the route applies. + :type address_prefix: str + :param next_hop_type: The type of Azure hop the packet should be sent to. Possible values + include: "VirtualNetworkGateway", "VnetLocal", "Internet", "VirtualAppliance", "None". + :type next_hop_type: str or ~azure.mgmt.network.v2021_05_01.models.RouteNextHopType + :param next_hop_ip_address: The IP address packets should be forwarded to. Next hop values are + only allowed in routes where the next hop type is VirtualAppliance. + :type next_hop_ip_address: str + :ivar provisioning_state: The provisioning state of the route resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param has_bgp_override: A value indicating whether this route overrides overlapping BGP routes + regardless of LPM. + :type has_bgp_override: bool + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'next_hop_type': {'key': 'properties.nextHopType', 'type': 'str'}, + 'next_hop_ip_address': {'key': 'properties.nextHopIpAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'has_bgp_override': {'key': 'properties.hasBgpOverride', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + address_prefix: Optional[str] = None, + next_hop_type: Optional[Union[str, "RouteNextHopType"]] = None, + next_hop_ip_address: Optional[str] = None, + has_bgp_override: Optional[bool] = None, + **kwargs + ): + super(Route, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.address_prefix = address_prefix + self.next_hop_type = next_hop_type + self.next_hop_ip_address = next_hop_ip_address + self.provisioning_state = None + self.has_bgp_override = has_bgp_override + + +class RouteFilter(Resource): + """Route Filter Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param rules: Collection of RouteFilterRules contained within a route filter. + :type rules: list[~azure.mgmt.network.v2021_05_01.models.RouteFilterRule] + :ivar peerings: A collection of references to express route circuit peerings. + :vartype peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :ivar ipv6_peerings: A collection of references to express route circuit ipv6 peerings. + :vartype ipv6_peerings: list[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] + :ivar provisioning_state: The provisioning state of the route filter resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'peerings': {'readonly': True}, + 'ipv6_peerings': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'rules': {'key': 'properties.rules', 'type': '[RouteFilterRule]'}, + 'peerings': {'key': 'properties.peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'ipv6_peerings': {'key': 'properties.ipv6Peerings', 'type': '[ExpressRouteCircuitPeering]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + rules: Optional[List["RouteFilterRule"]] = None, + **kwargs + ): + super(RouteFilter, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.rules = rules + self.peerings = None + self.ipv6_peerings = None + self.provisioning_state = None + + +class RouteFilterListResult(msrest.serialization.Model): + """Response for the ListRouteFilters API service call. + + :param value: A list of route filters in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.RouteFilter] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RouteFilter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RouteFilter"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RouteFilterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RouteFilterRule(SubResource): + """Route Filter Rule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :param location: Resource location. + :type location: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param access: The access type of the rule. Possible values include: "Allow", "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.Access + :param route_filter_rule_type: The rule type of the rule. Possible values include: "Community". + :type route_filter_rule_type: str or ~azure.mgmt.network.v2021_05_01.models.RouteFilterRuleType + :param communities: The collection for bgp community values to filter on. e.g. + ['12076:5010','12076:5020']. + :type communities: list[str] + :ivar provisioning_state: The provisioning state of the route filter rule resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'route_filter_rule_type': {'key': 'properties.routeFilterRuleType', 'type': 'str'}, + 'communities': {'key': 'properties.communities', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + location: Optional[str] = None, + access: Optional[Union[str, "Access"]] = None, + route_filter_rule_type: Optional[Union[str, "RouteFilterRuleType"]] = None, + communities: Optional[List[str]] = None, + **kwargs + ): + super(RouteFilterRule, self).__init__(id=id, **kwargs) + self.name = name + self.location = location + self.etag = None + self.access = access + self.route_filter_rule_type = route_filter_rule_type + self.communities = communities + self.provisioning_state = None + + +class RouteFilterRuleListResult(msrest.serialization.Model): + """Response for the ListRouteFilterRules API service call. + + :param value: A list of RouteFilterRules in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.RouteFilterRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RouteFilterRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RouteFilterRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RouteFilterRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RouteListResult(msrest.serialization.Model): + """Response for the ListRoute API service call. + + :param value: A list of routes in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Route] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Route]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Route"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RouteListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RouteTable(Resource): + """Route table resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param routes: Collection of routes contained within a route table. + :type routes: list[~azure.mgmt.network.v2021_05_01.models.Route] + :ivar subnets: A collection of references to subnets. + :vartype subnets: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :param disable_bgp_route_propagation: Whether to disable the routes learned by BGP on that + route table. True means disable. + :type disable_bgp_route_propagation: bool + :ivar provisioning_state: The provisioning state of the route table resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar resource_guid: The resource GUID property of the route table. + :vartype resource_guid: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'subnets': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_guid': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[Route]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'disable_bgp_route_propagation': {'key': 'properties.disableBgpRoutePropagation', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + routes: Optional[List["Route"]] = None, + disable_bgp_route_propagation: Optional[bool] = None, + **kwargs + ): + super(RouteTable, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.routes = routes + self.subnets = None + self.disable_bgp_route_propagation = disable_bgp_route_propagation + self.provisioning_state = None + self.resource_guid = None + + +class RouteTableListResult(msrest.serialization.Model): + """Response for the ListRouteTable API service call. + + :param value: A list of route tables in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.RouteTable] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RouteTable]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RouteTable"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(RouteTableListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class RoutingConfiguration(msrest.serialization.Model): + """Routing Configuration indicating the associated and propagated route tables for this connection. + + :param associated_route_table: The resource id RouteTable associated with this + RoutingConfiguration. + :type associated_route_table: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param propagated_route_tables: The list of RouteTables to advertise the routes to. + :type propagated_route_tables: ~azure.mgmt.network.v2021_05_01.models.PropagatedRouteTable + :param vnet_routes: List of routes that control routing from VirtualHub into a virtual network + connection. + :type vnet_routes: ~azure.mgmt.network.v2021_05_01.models.VnetRoute + """ + + _attribute_map = { + 'associated_route_table': {'key': 'associatedRouteTable', 'type': 'SubResource'}, + 'propagated_route_tables': {'key': 'propagatedRouteTables', 'type': 'PropagatedRouteTable'}, + 'vnet_routes': {'key': 'vnetRoutes', 'type': 'VnetRoute'}, + } + + def __init__( + self, + *, + associated_route_table: Optional["SubResource"] = None, + propagated_route_tables: Optional["PropagatedRouteTable"] = None, + vnet_routes: Optional["VnetRoute"] = None, + **kwargs + ): + super(RoutingConfiguration, self).__init__(**kwargs) + self.associated_route_table = associated_route_table + self.propagated_route_tables = propagated_route_tables + self.vnet_routes = vnet_routes + + +class RoutingIntent(SubResource): + """The routing intent child resource of a Virtual hub. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param routing_policies: List of routing policies. + :type routing_policies: list[~azure.mgmt.network.v2021_05_01.models.RoutingPolicy] + :ivar provisioning_state: The provisioning state of the RoutingIntent resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'routing_policies': {'key': 'properties.routingPolicies', 'type': '[RoutingPolicy]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + routing_policies: Optional[List["RoutingPolicy"]] = None, + **kwargs + ): + super(RoutingIntent, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.routing_policies = routing_policies + self.provisioning_state = None + + +class RoutingPolicy(msrest.serialization.Model): + """The routing policy object used in a RoutingIntent resource. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The unique name for the routing policy. + :type name: str + :param destinations: Required. List of all destinations which this routing policy is applicable + to (for example: Internet, PrivateTraffic). + :type destinations: list[str] + :param next_hop: Required. The next hop resource id on which this routing policy is applicable + to. + :type next_hop: str + """ + + _validation = { + 'name': {'required': True}, + 'destinations': {'required': True}, + 'next_hop': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + 'next_hop': {'key': 'nextHop', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + destinations: List[str], + next_hop: str, + **kwargs + ): + super(RoutingPolicy, self).__init__(**kwargs) + self.name = name + self.destinations = destinations + self.next_hop = next_hop + + +class SecurityGroupNetworkInterface(msrest.serialization.Model): + """Network interface and all its associated security rules. + + :param id: ID of the network interface. + :type id: str + :param security_rule_associations: All security rules associated with the network interface. + :type security_rule_associations: + ~azure.mgmt.network.v2021_05_01.models.SecurityRuleAssociations + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'security_rule_associations': {'key': 'securityRuleAssociations', 'type': 'SecurityRuleAssociations'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + security_rule_associations: Optional["SecurityRuleAssociations"] = None, + **kwargs + ): + super(SecurityGroupNetworkInterface, self).__init__(**kwargs) + self.id = id + self.security_rule_associations = security_rule_associations + + +class SecurityGroupViewParameters(msrest.serialization.Model): + """Parameters that define the VM to check security groups for. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. ID of the target VM. + :type target_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + **kwargs + ): + super(SecurityGroupViewParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + + +class SecurityGroupViewResult(msrest.serialization.Model): + """The information about security rules applied to the specified VM. + + :param network_interfaces: List of network interfaces on the specified VM. + :type network_interfaces: + list[~azure.mgmt.network.v2021_05_01.models.SecurityGroupNetworkInterface] + """ + + _attribute_map = { + 'network_interfaces': {'key': 'networkInterfaces', 'type': '[SecurityGroupNetworkInterface]'}, + } + + def __init__( + self, + *, + network_interfaces: Optional[List["SecurityGroupNetworkInterface"]] = None, + **kwargs + ): + super(SecurityGroupViewResult, self).__init__(**kwargs) + self.network_interfaces = network_interfaces + + +class SecurityPartnerProvider(Resource): + """Security Partner Provider resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar provisioning_state: The provisioning state of the Security Partner Provider resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param security_provider_name: The security provider name. Possible values include: "ZScaler", + "IBoss", "Checkpoint". + :type security_provider_name: str or + ~azure.mgmt.network.v2021_05_01.models.SecurityProviderName + :ivar connection_status: The connection status with the Security Partner Provider. Possible + values include: "Unknown", "PartiallyConnected", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProviderConnectionStatus + :param virtual_hub: The virtualHub to which the Security Partner Provider belongs. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'connection_status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'security_provider_name': {'key': 'properties.securityProviderName', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + security_provider_name: Optional[Union[str, "SecurityProviderName"]] = None, + virtual_hub: Optional["SubResource"] = None, + **kwargs + ): + super(SecurityPartnerProvider, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.provisioning_state = None + self.security_provider_name = security_provider_name + self.connection_status = None + self.virtual_hub = virtual_hub + + +class SecurityPartnerProviderListResult(msrest.serialization.Model): + """Response for ListSecurityPartnerProviders API service call. + + :param value: List of Security Partner Providers in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityPartnerProvider]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["SecurityPartnerProvider"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(SecurityPartnerProviderListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class SecurityRule(SubResource): + """Network security rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: The type of the resource. + :type type: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param protocol: Network protocol this rule applies to. Possible values include: "Tcp", "Udp", + "Icmp", "Esp", "*", "Ah". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleProtocol + :param source_port_range: The source port or range. Integer or range between 0 and 65535. + Asterisk '*' can also be used to match all ports. + :type source_port_range: str + :param destination_port_range: The destination port or range. Integer or range between 0 and + 65535. Asterisk '*' can also be used to match all ports. + :type destination_port_range: str + :param source_address_prefix: The CIDR or source IP range. Asterisk '*' can also be used to + match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' + can also be used. If this is an ingress rule, specifies where network traffic originates from. + :type source_address_prefix: str + :param source_address_prefixes: The CIDR or source IP ranges. + :type source_address_prefixes: list[str] + :param source_application_security_groups: The application security group specified as source. + :type source_application_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :param destination_address_prefix: The destination address prefix. CIDR or destination IP + range. Asterisk '*' can also be used to match all source IPs. Default tags such as + 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' can also be used. + :type destination_address_prefix: str + :param destination_address_prefixes: The destination address prefixes. CIDR or destination IP + ranges. + :type destination_address_prefixes: list[str] + :param destination_application_security_groups: The application security group specified as + destination. + :type destination_application_security_groups: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] + :param source_port_ranges: The source port ranges. + :type source_port_ranges: list[str] + :param destination_port_ranges: The destination port ranges. + :type destination_port_ranges: list[str] + :param access: The network traffic is allowed or denied. Possible values include: "Allow", + "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleAccess + :param priority: The priority of the rule. The value can be between 100 and 4096. The priority + number must be unique for each rule in the collection. The lower the priority number, the + higher the priority of the rule. + :type priority: int + :param direction: The direction of the rule. The direction specifies if rule will be evaluated + on incoming or outgoing traffic. Possible values include: "Inbound", "Outbound". + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.SecurityRuleDirection + :ivar provisioning_state: The provisioning state of the security rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'protocol': {'key': 'properties.protocol', 'type': 'str'}, + 'source_port_range': {'key': 'properties.sourcePortRange', 'type': 'str'}, + 'destination_port_range': {'key': 'properties.destinationPortRange', 'type': 'str'}, + 'source_address_prefix': {'key': 'properties.sourceAddressPrefix', 'type': 'str'}, + 'source_address_prefixes': {'key': 'properties.sourceAddressPrefixes', 'type': '[str]'}, + 'source_application_security_groups': {'key': 'properties.sourceApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'destination_address_prefix': {'key': 'properties.destinationAddressPrefix', 'type': 'str'}, + 'destination_address_prefixes': {'key': 'properties.destinationAddressPrefixes', 'type': '[str]'}, + 'destination_application_security_groups': {'key': 'properties.destinationApplicationSecurityGroups', 'type': '[ApplicationSecurityGroup]'}, + 'source_port_ranges': {'key': 'properties.sourcePortRanges', 'type': '[str]'}, + 'destination_port_ranges': {'key': 'properties.destinationPortRanges', 'type': '[str]'}, + 'access': {'key': 'properties.access', 'type': 'str'}, + 'priority': {'key': 'properties.priority', 'type': 'int'}, + 'direction': {'key': 'properties.direction', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[Union[str, "SecurityRuleProtocol"]] = None, + source_port_range: Optional[str] = None, + destination_port_range: Optional[str] = None, + source_address_prefix: Optional[str] = None, + source_address_prefixes: Optional[List[str]] = None, + source_application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, + destination_address_prefix: Optional[str] = None, + destination_address_prefixes: Optional[List[str]] = None, + destination_application_security_groups: Optional[List["ApplicationSecurityGroup"]] = None, + source_port_ranges: Optional[List[str]] = None, + destination_port_ranges: Optional[List[str]] = None, + access: Optional[Union[str, "SecurityRuleAccess"]] = None, + priority: Optional[int] = None, + direction: Optional[Union[str, "SecurityRuleDirection"]] = None, + **kwargs + ): + super(SecurityRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.description = description + self.protocol = protocol + self.source_port_range = source_port_range + self.destination_port_range = destination_port_range + self.source_address_prefix = source_address_prefix + self.source_address_prefixes = source_address_prefixes + self.source_application_security_groups = source_application_security_groups + self.destination_address_prefix = destination_address_prefix + self.destination_address_prefixes = destination_address_prefixes + self.destination_application_security_groups = destination_application_security_groups + self.source_port_ranges = source_port_ranges + self.destination_port_ranges = destination_port_ranges + self.access = access + self.priority = priority + self.direction = direction + self.provisioning_state = None + + +class SecurityRuleAssociations(msrest.serialization.Model): + """All security rules associated with the network interface. + + :param network_interface_association: Network interface and it's custom security rules. + :type network_interface_association: + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceAssociation + :param subnet_association: Subnet and it's custom security rules. + :type subnet_association: ~azure.mgmt.network.v2021_05_01.models.SubnetAssociation + :param default_security_rules: Collection of default security rules of the network security + group. + :type default_security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + :param effective_security_rules: Collection of effective security rules. + :type effective_security_rules: + list[~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityRule] + """ + + _attribute_map = { + 'network_interface_association': {'key': 'networkInterfaceAssociation', 'type': 'NetworkInterfaceAssociation'}, + 'subnet_association': {'key': 'subnetAssociation', 'type': 'SubnetAssociation'}, + 'default_security_rules': {'key': 'defaultSecurityRules', 'type': '[SecurityRule]'}, + 'effective_security_rules': {'key': 'effectiveSecurityRules', 'type': '[EffectiveNetworkSecurityRule]'}, + } + + def __init__( + self, + *, + network_interface_association: Optional["NetworkInterfaceAssociation"] = None, + subnet_association: Optional["SubnetAssociation"] = None, + default_security_rules: Optional[List["SecurityRule"]] = None, + effective_security_rules: Optional[List["EffectiveNetworkSecurityRule"]] = None, + **kwargs + ): + super(SecurityRuleAssociations, self).__init__(**kwargs) + self.network_interface_association = network_interface_association + self.subnet_association = subnet_association + self.default_security_rules = default_security_rules + self.effective_security_rules = effective_security_rules + + +class SecurityRuleListResult(msrest.serialization.Model): + """Response for ListSecurityRule API service call. Retrieves all security rules that belongs to a network security group. + + :param value: The security rules in a network security group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SecurityRule]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["SecurityRule"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(SecurityRuleListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ServiceAssociationLink(SubResource): + """ServiceAssociationLink resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the resource that is unique within a resource group. This name can be used + to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param linked_resource_type: Resource type of the linked resource. + :type linked_resource_type: str + :param link: Link to the external resource. + :type link: str + :ivar provisioning_state: The provisioning state of the service association link resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param allow_delete: If true, the resource can be deleted. + :type allow_delete: bool + :param locations: A list of locations. + :type locations: list[str] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'linked_resource_type': {'key': 'properties.linkedResourceType', 'type': 'str'}, + 'link': {'key': 'properties.link', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'allow_delete': {'key': 'properties.allowDelete', 'type': 'bool'}, + 'locations': {'key': 'properties.locations', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + linked_resource_type: Optional[str] = None, + link: Optional[str] = None, + allow_delete: Optional[bool] = None, + locations: Optional[List[str]] = None, + **kwargs + ): + super(ServiceAssociationLink, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.linked_resource_type = linked_resource_type + self.link = link + self.provisioning_state = None + self.allow_delete = allow_delete + self.locations = locations + + +class ServiceAssociationLinksListResult(msrest.serialization.Model): + """Response for ServiceAssociationLinks_List operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The service association links in a subnet. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ServiceAssociationLink] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceAssociationLink]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceAssociationLink"]] = None, + **kwargs + ): + super(ServiceAssociationLinksListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ServiceEndpointPolicy(Resource): + """Service End point policy resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar kind: Kind of service endpoint policy. This is metadata used for the Azure portal + experience. + :vartype kind: str + :param service_endpoint_policy_definitions: A collection of service endpoint policy definitions + of the service endpoint policy. + :type service_endpoint_policy_definitions: + list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition] + :ivar subnets: A collection of references to subnets. + :vartype subnets: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :ivar resource_guid: The resource GUID property of the service endpoint policy resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the service endpoint policy resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param service_alias: The alias indicating if the policy belongs to a service. + :type service_alias: str + :param contextual_service_endpoint_policies: A collection of contextual service endpoint + policy. + :type contextual_service_endpoint_policies: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'readonly': True}, + 'subnets': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'service_endpoint_policy_definitions': {'key': 'properties.serviceEndpointPolicyDefinitions', 'type': '[ServiceEndpointPolicyDefinition]'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'service_alias': {'key': 'properties.serviceAlias', 'type': 'str'}, + 'contextual_service_endpoint_policies': {'key': 'properties.contextualServiceEndpointPolicies', 'type': '[str]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + service_endpoint_policy_definitions: Optional[List["ServiceEndpointPolicyDefinition"]] = None, + service_alias: Optional[str] = None, + contextual_service_endpoint_policies: Optional[List[str]] = None, + **kwargs + ): + super(ServiceEndpointPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.kind = None + self.service_endpoint_policy_definitions = service_endpoint_policy_definitions + self.subnets = None + self.resource_guid = None + self.provisioning_state = None + self.service_alias = service_alias + self.contextual_service_endpoint_policies = contextual_service_endpoint_policies + + +class ServiceEndpointPolicyDefinition(SubResource): + """Service Endpoint policy definitions. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: The type of the resource. + :type type: str + :param description: A description for this rule. Restricted to 140 chars. + :type description: str + :param service: Service endpoint name. + :type service: str + :param service_resources: A list of service resources. + :type service_resources: list[str] + :ivar provisioning_state: The provisioning state of the service endpoint policy definition + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'service': {'key': 'properties.service', 'type': 'str'}, + 'service_resources': {'key': 'properties.serviceResources', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + description: Optional[str] = None, + service: Optional[str] = None, + service_resources: Optional[List[str]] = None, + **kwargs + ): + super(ServiceEndpointPolicyDefinition, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.description = description + self.service = service + self.service_resources = service_resources + self.provisioning_state = None + + +class ServiceEndpointPolicyDefinitionListResult(msrest.serialization.Model): + """Response for ListServiceEndpointPolicyDefinition API service call. Retrieves all service endpoint policy definition that belongs to a service endpoint policy. + + :param value: The service endpoint policy definition in a service endpoint policy. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceEndpointPolicyDefinition]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceEndpointPolicyDefinition"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ServiceEndpointPolicyDefinitionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ServiceEndpointPolicyListResult(msrest.serialization.Model): + """Response for ListServiceEndpointPolicies API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of ServiceEndpointPolicy resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceEndpointPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceEndpointPolicy"]] = None, + **kwargs + ): + super(ServiceEndpointPolicyListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ServiceEndpointPropertiesFormat(msrest.serialization.Model): + """The service endpoint properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param service: The type of the endpoint service. + :type service: str + :param locations: A list of locations. + :type locations: list[str] + :ivar provisioning_state: The provisioning state of the service endpoint resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'service': {'key': 'service', 'type': 'str'}, + 'locations': {'key': 'locations', 'type': '[str]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + service: Optional[str] = None, + locations: Optional[List[str]] = None, + **kwargs + ): + super(ServiceEndpointPropertiesFormat, self).__init__(**kwargs) + self.service = service + self.locations = locations + self.provisioning_state = None + + +class ServiceTagInformation(msrest.serialization.Model): + """The service tag information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar properties: Properties of the service tag information. + :vartype properties: + ~azure.mgmt.network.v2021_05_01.models.ServiceTagInformationPropertiesFormat + :ivar name: The name of service tag. + :vartype name: str + :ivar id: The ID of service tag. + :vartype id: str + :ivar service_tag_change_number: The iteration number of service tag object for region. + :vartype service_tag_change_number: str + """ + + _validation = { + 'properties': {'readonly': True}, + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'service_tag_change_number': {'readonly': True}, + } + + _attribute_map = { + 'properties': {'key': 'properties', 'type': 'ServiceTagInformationPropertiesFormat'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'service_tag_change_number': {'key': 'serviceTagChangeNumber', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceTagInformation, self).__init__(**kwargs) + self.properties = None + self.name = None + self.id = None + self.service_tag_change_number = None + + +class ServiceTagInformationListResult(msrest.serialization.Model): + """Response for Get ServiceTagInformation API service call. Retrieves the list of service tag information resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: The list of service tag information resources. + :type value: list[~azure.mgmt.network.v2021_05_01.models.ServiceTagInformation] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ServiceTagInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ServiceTagInformation"]] = None, + **kwargs + ): + super(ServiceTagInformationListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class ServiceTagInformationPropertiesFormat(msrest.serialization.Model): + """Properties of the service tag information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar change_number: The iteration number of service tag. + :vartype change_number: str + :ivar region: The region of service tag. + :vartype region: str + :ivar system_service: The name of system service. + :vartype system_service: str + :ivar address_prefixes: The list of IP address prefixes. + :vartype address_prefixes: list[str] + :ivar state: The state of the service tag. + :vartype state: str + """ + + _validation = { + 'change_number': {'readonly': True}, + 'region': {'readonly': True}, + 'system_service': {'readonly': True}, + 'address_prefixes': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'change_number': {'key': 'changeNumber', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'system_service': {'key': 'systemService', 'type': 'str'}, + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'state': {'key': 'state', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceTagInformationPropertiesFormat, self).__init__(**kwargs) + self.change_number = None + self.region = None + self.system_service = None + self.address_prefixes = None + self.state = None + + +class ServiceTagsListResult(msrest.serialization.Model): + """Response for the ListServiceTags API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the cloud. + :vartype name: str + :ivar id: The ID of the cloud. + :vartype id: str + :ivar type: The azure resource type. + :vartype type: str + :ivar change_number: The iteration number. + :vartype change_number: str + :ivar cloud: The name of the cloud. + :vartype cloud: str + :ivar values: The list of service tag information resources. + :vartype values: list[~azure.mgmt.network.v2021_05_01.models.ServiceTagInformation] + :ivar next_link: The URL to get next page of service tag information resources. + :vartype next_link: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'type': {'readonly': True}, + 'change_number': {'readonly': True}, + 'cloud': {'readonly': True}, + 'values': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'change_number': {'key': 'changeNumber', 'type': 'str'}, + 'cloud': {'key': 'cloud', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[ServiceTagInformation]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ServiceTagsListResult, self).__init__(**kwargs) + self.name = None + self.id = None + self.type = None + self.change_number = None + self.cloud = None + self.values = None + self.next_link = None + + +class SessionIds(msrest.serialization.Model): + """List of session IDs. + + :param session_ids: List of session IDs. + :type session_ids: list[str] + """ + + _attribute_map = { + 'session_ids': {'key': 'sessionIds', 'type': '[str]'}, + } + + def __init__( + self, + *, + session_ids: Optional[List[str]] = None, + **kwargs + ): + super(SessionIds, self).__init__(**kwargs) + self.session_ids = session_ids + + +class SignatureOverridesFilterValuesQuery(msrest.serialization.Model): + """Describes the filter values possibles for a given column. + + :param filter_name: Describes the name of the column which values will be returned. + :type filter_name: str + """ + + _attribute_map = { + 'filter_name': {'key': 'filterName', 'type': 'str'}, + } + + def __init__( + self, + *, + filter_name: Optional[str] = None, + **kwargs + ): + super(SignatureOverridesFilterValuesQuery, self).__init__(**kwargs) + self.filter_name = filter_name + + +class SignatureOverridesFilterValuesResponse(msrest.serialization.Model): + """Describes the list of all possible values for a specific filter value. + + :param filter_values: Describes the possible values. + :type filter_values: list[str] + """ + + _attribute_map = { + 'filter_values': {'key': 'filterValues', 'type': '[str]'}, + } + + def __init__( + self, + *, + filter_values: Optional[List[str]] = None, + **kwargs + ): + super(SignatureOverridesFilterValuesResponse, self).__init__(**kwargs) + self.filter_values = filter_values + + +class SignaturesOverrides(msrest.serialization.Model): + """Contains all specific policy signatures overrides for the IDPS. + + :param name: Contains the name of the resource (default). + :type name: str + :param id: Will contain the resource id of the signature override resource. + :type id: str + :param type: Will contain the type of the resource: + Microsoft.Network/firewallPolicies/intrusionDetectionSignaturesOverrides. + :type type: str + :param properties: Will contain the properties of the resource (the actual signature + overrides). + :type properties: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverridesProperties + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'SignaturesOverridesProperties'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + type: Optional[str] = None, + properties: Optional["SignaturesOverridesProperties"] = None, + **kwargs + ): + super(SignaturesOverrides, self).__init__(**kwargs) + self.name = name + self.id = id + self.type = type + self.properties = properties + + +class SignaturesOverridesList(msrest.serialization.Model): + """Describes an object containing an array with a single item. + + :param value: Describes a list consisting exactly one item describing the policy's signature + override status. + :type value: list[~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[SignaturesOverrides]'}, + } + + def __init__( + self, + *, + value: Optional[List["SignaturesOverrides"]] = None, + **kwargs + ): + super(SignaturesOverridesList, self).__init__(**kwargs) + self.value = value + + +class SignaturesOverridesProperties(msrest.serialization.Model): + """Will contain the properties of the resource (the actual signature overrides). + + :param signatures: Dictionary of :code:``. + :type signatures: dict[str, str] + """ + + _attribute_map = { + 'signatures': {'key': 'signatures', 'type': '{str}'}, + } + + def __init__( + self, + *, + signatures: Optional[Dict[str, str]] = None, + **kwargs + ): + super(SignaturesOverridesProperties, self).__init__(**kwargs) + self.signatures = signatures + + +class SingleQueryResult(msrest.serialization.Model): + """SingleQueryResult. + + :param signature_id: The ID of the signature. + :type signature_id: int + :param mode: The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny. Possible values + include: 0, 1, 2. + :type mode: str or ~azure.mgmt.network.v2021_05_01.models.SingleQueryResultMode + :param severity: Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High. Possible + values include: 1, 2, 3. + :type severity: str or ~azure.mgmt.network.v2021_05_01.models.SingleQueryResultSeverity + :param direction: Describes in which direction signature is being enforced: 0 - Inbound, 1 - + OutBound, 2 - Bidirectional. Possible values include: 0, 1, 2. + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.SingleQueryResultDirection + :param group: Describes the groups the signature belongs to. + :type group: str + :param description: Describes what is the signature enforces. + :type description: str + :param protocol: Describes the protocol the signatures is being enforced in. + :type protocol: str + :param source_ports: Describes the list of source ports related to this signature. + :type source_ports: list[str] + :param destination_ports: Describes the list of destination ports related to this signature. + :type destination_ports: list[str] + :param last_updated: Describes the last updated time of the signature (provided from 3rd party + vendor). + :type last_updated: str + :param inherited_from_parent_policy: Describes if this override is inherited from base policy + or not. + :type inherited_from_parent_policy: bool + """ + + _attribute_map = { + 'signature_id': {'key': 'signatureId', 'type': 'int'}, + 'mode': {'key': 'mode', 'type': 'int'}, + 'severity': {'key': 'severity', 'type': 'int'}, + 'direction': {'key': 'direction', 'type': 'int'}, + 'group': {'key': 'group', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'source_ports': {'key': 'sourcePorts', 'type': '[str]'}, + 'destination_ports': {'key': 'destinationPorts', 'type': '[str]'}, + 'last_updated': {'key': 'lastUpdated', 'type': 'str'}, + 'inherited_from_parent_policy': {'key': 'inheritedFromParentPolicy', 'type': 'bool'}, + } + + def __init__( + self, + *, + signature_id: Optional[int] = None, + mode: Optional[Union[int, "SingleQueryResultMode"]] = None, + severity: Optional[Union[int, "SingleQueryResultSeverity"]] = None, + direction: Optional[Union[int, "SingleQueryResultDirection"]] = None, + group: Optional[str] = None, + description: Optional[str] = None, + protocol: Optional[str] = None, + source_ports: Optional[List[str]] = None, + destination_ports: Optional[List[str]] = None, + last_updated: Optional[str] = None, + inherited_from_parent_policy: Optional[bool] = None, + **kwargs + ): + super(SingleQueryResult, self).__init__(**kwargs) + self.signature_id = signature_id + self.mode = mode + self.severity = severity + self.direction = direction + self.group = group + self.description = description + self.protocol = protocol + self.source_ports = source_ports + self.destination_ports = destination_ports + self.last_updated = last_updated + self.inherited_from_parent_policy = inherited_from_parent_policy + + +class Sku(msrest.serialization.Model): + """The sku of this Bastion Host. + + :param name: The name of this Bastion Host. Possible values include: "Basic", "Standard". + Default value: "Standard". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.BastionHostSkuName + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "BastionHostSkuName"]] = "Standard", + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + + +class StaticRoute(msrest.serialization.Model): + """List of all Static Routes. + + :param name: The name of the StaticRoute that is unique within a VnetRoute. + :type name: str + :param address_prefixes: List of all address prefixes. + :type address_prefixes: list[str] + :param next_hop_ip_address: The ip address of the next hop. + :type next_hop_ip_address: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + address_prefixes: Optional[List[str]] = None, + next_hop_ip_address: Optional[str] = None, + **kwargs + ): + super(StaticRoute, self).__init__(**kwargs) + self.name = name + self.address_prefixes = address_prefixes + self.next_hop_ip_address = next_hop_ip_address + + +class Subnet(SubResource): + """Subnet in a virtual network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: Resource type. + :type type: str + :param address_prefix: The address prefix for the subnet. + :type address_prefix: str + :param address_prefixes: List of address prefixes for the subnet. + :type address_prefixes: list[str] + :param network_security_group: The reference to the NetworkSecurityGroup resource. + :type network_security_group: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup + :param route_table: The reference to the RouteTable resource. + :type route_table: ~azure.mgmt.network.v2021_05_01.models.RouteTable + :param nat_gateway: Nat gateway associated with this subnet. + :type nat_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param service_endpoints: An array of service endpoints. + :type service_endpoints: + list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPropertiesFormat] + :param service_endpoint_policies: An array of service endpoint policies. + :type service_endpoint_policies: + list[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy] + :ivar private_endpoints: An array of references to private endpoints. + :vartype private_endpoints: list[~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint] + :ivar ip_configurations: An array of references to the network interface IP configurations + using subnet. + :vartype ip_configurations: list[~azure.mgmt.network.v2021_05_01.models.IPConfiguration] + :ivar ip_configuration_profiles: Array of IP configuration profiles which reference this + subnet. + :vartype ip_configuration_profiles: + list[~azure.mgmt.network.v2021_05_01.models.IPConfigurationProfile] + :param ip_allocations: Array of IpAllocation which reference this subnet. + :type ip_allocations: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar resource_navigation_links: An array of references to the external resources using subnet. + :vartype resource_navigation_links: + list[~azure.mgmt.network.v2021_05_01.models.ResourceNavigationLink] + :ivar service_association_links: An array of references to services injecting into this subnet. + :vartype service_association_links: + list[~azure.mgmt.network.v2021_05_01.models.ServiceAssociationLink] + :param delegations: An array of references to the delegations on the subnet. + :type delegations: list[~azure.mgmt.network.v2021_05_01.models.Delegation] + :ivar purpose: A read-only string identifying the intention of use for this subnet based on + delegations and other user-defined properties. + :vartype purpose: str + :ivar provisioning_state: The provisioning state of the subnet resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param private_endpoint_network_policies: Enable or Disable apply network policies on private + end point in the subnet. Possible values include: "Enabled", "Disabled". Default value: + "Enabled". + :type private_endpoint_network_policies: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPrivateEndpointNetworkPolicies + :param private_link_service_network_policies: Enable or Disable apply network policies on + private link service in the subnet. Possible values include: "Enabled", "Disabled". Default + value: "Enabled". + :type private_link_service_network_policies: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPrivateLinkServiceNetworkPolicies + :param application_gateway_ip_configurations: Application gateway IP configurations of virtual + network resource. + :type application_gateway_ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayIPConfiguration] + """ + + _validation = { + 'etag': {'readonly': True}, + 'private_endpoints': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + 'ip_configuration_profiles': {'readonly': True}, + 'resource_navigation_links': {'readonly': True}, + 'service_association_links': {'readonly': True}, + 'purpose': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'address_prefixes': {'key': 'properties.addressPrefixes', 'type': '[str]'}, + 'network_security_group': {'key': 'properties.networkSecurityGroup', 'type': 'NetworkSecurityGroup'}, + 'route_table': {'key': 'properties.routeTable', 'type': 'RouteTable'}, + 'nat_gateway': {'key': 'properties.natGateway', 'type': 'SubResource'}, + 'service_endpoints': {'key': 'properties.serviceEndpoints', 'type': '[ServiceEndpointPropertiesFormat]'}, + 'service_endpoint_policies': {'key': 'properties.serviceEndpointPolicies', 'type': '[ServiceEndpointPolicy]'}, + 'private_endpoints': {'key': 'properties.privateEndpoints', 'type': '[PrivateEndpoint]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[IPConfiguration]'}, + 'ip_configuration_profiles': {'key': 'properties.ipConfigurationProfiles', 'type': '[IPConfigurationProfile]'}, + 'ip_allocations': {'key': 'properties.ipAllocations', 'type': '[SubResource]'}, + 'resource_navigation_links': {'key': 'properties.resourceNavigationLinks', 'type': '[ResourceNavigationLink]'}, + 'service_association_links': {'key': 'properties.serviceAssociationLinks', 'type': '[ServiceAssociationLink]'}, + 'delegations': {'key': 'properties.delegations', 'type': '[Delegation]'}, + 'purpose': {'key': 'properties.purpose', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_network_policies': {'key': 'properties.privateEndpointNetworkPolicies', 'type': 'str'}, + 'private_link_service_network_policies': {'key': 'properties.privateLinkServiceNetworkPolicies', 'type': 'str'}, + 'application_gateway_ip_configurations': {'key': 'properties.applicationGatewayIpConfigurations', 'type': '[ApplicationGatewayIPConfiguration]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + address_prefix: Optional[str] = None, + address_prefixes: Optional[List[str]] = None, + network_security_group: Optional["NetworkSecurityGroup"] = None, + route_table: Optional["RouteTable"] = None, + nat_gateway: Optional["SubResource"] = None, + service_endpoints: Optional[List["ServiceEndpointPropertiesFormat"]] = None, + service_endpoint_policies: Optional[List["ServiceEndpointPolicy"]] = None, + ip_allocations: Optional[List["SubResource"]] = None, + delegations: Optional[List["Delegation"]] = None, + private_endpoint_network_policies: Optional[Union[str, "VirtualNetworkPrivateEndpointNetworkPolicies"]] = "Enabled", + private_link_service_network_policies: Optional[Union[str, "VirtualNetworkPrivateLinkServiceNetworkPolicies"]] = "Enabled", + application_gateway_ip_configurations: Optional[List["ApplicationGatewayIPConfiguration"]] = None, + **kwargs + ): + super(Subnet, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.address_prefix = address_prefix + self.address_prefixes = address_prefixes + self.network_security_group = network_security_group + self.route_table = route_table + self.nat_gateway = nat_gateway + self.service_endpoints = service_endpoints + self.service_endpoint_policies = service_endpoint_policies + self.private_endpoints = None + self.ip_configurations = None + self.ip_configuration_profiles = None + self.ip_allocations = ip_allocations + self.resource_navigation_links = None + self.service_association_links = None + self.delegations = delegations + self.purpose = None + self.provisioning_state = None + self.private_endpoint_network_policies = private_endpoint_network_policies + self.private_link_service_network_policies = private_link_service_network_policies + self.application_gateway_ip_configurations = application_gateway_ip_configurations + + +class SubnetAssociation(msrest.serialization.Model): + """Subnet and it's custom security rules. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Subnet ID. + :vartype id: str + :param security_rules: Collection of custom security rules. + :type security_rules: list[~azure.mgmt.network.v2021_05_01.models.SecurityRule] + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'security_rules': {'key': 'securityRules', 'type': '[SecurityRule]'}, + } + + def __init__( + self, + *, + security_rules: Optional[List["SecurityRule"]] = None, + **kwargs + ): + super(SubnetAssociation, self).__init__(**kwargs) + self.id = None + self.security_rules = security_rules + + +class SubnetListResult(msrest.serialization.Model): + """Response for ListSubnets API service callRetrieves all subnet that belongs to a virtual network. + + :param value: The subnets in a virtual network. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Subnet]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Subnet"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(SubnetListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class TagsObject(msrest.serialization.Model): + """Tags object for patch operations. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TagsObject, self).__init__(**kwargs) + self.tags = tags + + +class Topology(msrest.serialization.Model): + """Topology of the specified resource group. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: GUID representing the operation id. + :vartype id: str + :ivar created_date_time: The datetime when the topology was initially created for the resource + group. + :vartype created_date_time: ~datetime.datetime + :ivar last_modified: The datetime when the topology was last modified. + :vartype last_modified: ~datetime.datetime + :param resources: A list of topology resources. + :type resources: list[~azure.mgmt.network.v2021_05_01.models.TopologyResource] + """ + + _validation = { + 'id': {'readonly': True}, + 'created_date_time': {'readonly': True}, + 'last_modified': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'last_modified': {'key': 'lastModified', 'type': 'iso-8601'}, + 'resources': {'key': 'resources', 'type': '[TopologyResource]'}, + } + + def __init__( + self, + *, + resources: Optional[List["TopologyResource"]] = None, + **kwargs + ): + super(Topology, self).__init__(**kwargs) + self.id = None + self.created_date_time = None + self.last_modified = None + self.resources = resources + + +class TopologyAssociation(msrest.serialization.Model): + """Resources that have an association with the parent resource. + + :param name: The name of the resource that is associated with the parent resource. + :type name: str + :param resource_id: The ID of the resource that is associated with the parent resource. + :type resource_id: str + :param association_type: The association type of the child resource to the parent resource. + Possible values include: "Associated", "Contains". + :type association_type: str or ~azure.mgmt.network.v2021_05_01.models.AssociationType + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'association_type': {'key': 'associationType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + resource_id: Optional[str] = None, + association_type: Optional[Union[str, "AssociationType"]] = None, + **kwargs + ): + super(TopologyAssociation, self).__init__(**kwargs) + self.name = name + self.resource_id = resource_id + self.association_type = association_type + + +class TopologyParameters(msrest.serialization.Model): + """Parameters that define the representation of topology. + + :param target_resource_group_name: The name of the target resource group to perform topology + on. + :type target_resource_group_name: str + :param target_virtual_network: The reference to the Virtual Network resource. + :type target_virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param target_subnet: The reference to the Subnet resource. + :type target_subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + """ + + _attribute_map = { + 'target_resource_group_name': {'key': 'targetResourceGroupName', 'type': 'str'}, + 'target_virtual_network': {'key': 'targetVirtualNetwork', 'type': 'SubResource'}, + 'target_subnet': {'key': 'targetSubnet', 'type': 'SubResource'}, + } + + def __init__( + self, + *, + target_resource_group_name: Optional[str] = None, + target_virtual_network: Optional["SubResource"] = None, + target_subnet: Optional["SubResource"] = None, + **kwargs + ): + super(TopologyParameters, self).__init__(**kwargs) + self.target_resource_group_name = target_resource_group_name + self.target_virtual_network = target_virtual_network + self.target_subnet = target_subnet + + +class TopologyResource(msrest.serialization.Model): + """The network resource topology information for the given resource group. + + :param name: Name of the resource. + :type name: str + :param id: ID of the resource. + :type id: str + :param location: Resource location. + :type location: str + :param associations: Holds the associations the resource has with other resources in the + resource group. + :type associations: list[~azure.mgmt.network.v2021_05_01.models.TopologyAssociation] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'associations': {'key': 'associations', 'type': '[TopologyAssociation]'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + id: Optional[str] = None, + location: Optional[str] = None, + associations: Optional[List["TopologyAssociation"]] = None, + **kwargs + ): + super(TopologyResource, self).__init__(**kwargs) + self.name = name + self.id = id + self.location = location + self.associations = associations + + +class TrafficAnalyticsConfigurationProperties(msrest.serialization.Model): + """Parameters that define the configuration of traffic analytics. + + :param enabled: Flag to enable/disable traffic analytics. + :type enabled: bool + :param workspace_id: The resource guid of the attached workspace. + :type workspace_id: str + :param workspace_region: The location of the attached workspace. + :type workspace_region: str + :param workspace_resource_id: Resource Id of the attached workspace. + :type workspace_resource_id: str + :param traffic_analytics_interval: The interval in minutes which would decide how frequently TA + service should do flow analytics. + :type traffic_analytics_interval: int + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'workspace_region': {'key': 'workspaceRegion', 'type': 'str'}, + 'workspace_resource_id': {'key': 'workspaceResourceId', 'type': 'str'}, + 'traffic_analytics_interval': {'key': 'trafficAnalyticsInterval', 'type': 'int'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + workspace_id: Optional[str] = None, + workspace_region: Optional[str] = None, + workspace_resource_id: Optional[str] = None, + traffic_analytics_interval: Optional[int] = None, + **kwargs + ): + super(TrafficAnalyticsConfigurationProperties, self).__init__(**kwargs) + self.enabled = enabled + self.workspace_id = workspace_id + self.workspace_region = workspace_region + self.workspace_resource_id = workspace_resource_id + self.traffic_analytics_interval = traffic_analytics_interval + + +class TrafficAnalyticsProperties(msrest.serialization.Model): + """Parameters that define the configuration of traffic analytics. + + :param network_watcher_flow_analytics_configuration: Parameters that define the configuration + of traffic analytics. + :type network_watcher_flow_analytics_configuration: + ~azure.mgmt.network.v2021_05_01.models.TrafficAnalyticsConfigurationProperties + """ + + _attribute_map = { + 'network_watcher_flow_analytics_configuration': {'key': 'networkWatcherFlowAnalyticsConfiguration', 'type': 'TrafficAnalyticsConfigurationProperties'}, + } + + def __init__( + self, + *, + network_watcher_flow_analytics_configuration: Optional["TrafficAnalyticsConfigurationProperties"] = None, + **kwargs + ): + super(TrafficAnalyticsProperties, self).__init__(**kwargs) + self.network_watcher_flow_analytics_configuration = network_watcher_flow_analytics_configuration + + +class TrafficSelectorPolicy(msrest.serialization.Model): + """An traffic selector policy for a virtual network gateway connection. + + All required parameters must be populated in order to send to Azure. + + :param local_address_ranges: Required. A collection of local address spaces in CIDR format. + :type local_address_ranges: list[str] + :param remote_address_ranges: Required. A collection of remote address spaces in CIDR format. + :type remote_address_ranges: list[str] + """ + + _validation = { + 'local_address_ranges': {'required': True}, + 'remote_address_ranges': {'required': True}, + } + + _attribute_map = { + 'local_address_ranges': {'key': 'localAddressRanges', 'type': '[str]'}, + 'remote_address_ranges': {'key': 'remoteAddressRanges', 'type': '[str]'}, + } + + def __init__( + self, + *, + local_address_ranges: List[str], + remote_address_ranges: List[str], + **kwargs + ): + super(TrafficSelectorPolicy, self).__init__(**kwargs) + self.local_address_ranges = local_address_ranges + self.remote_address_ranges = remote_address_ranges + + +class TroubleshootingDetails(msrest.serialization.Model): + """Information gained from troubleshooting of specified resource. + + :param id: The id of the get troubleshoot operation. + :type id: str + :param reason_type: Reason type of failure. + :type reason_type: str + :param summary: A summary of troubleshooting. + :type summary: str + :param detail: Details on troubleshooting results. + :type detail: str + :param recommended_actions: List of recommended actions. + :type recommended_actions: + list[~azure.mgmt.network.v2021_05_01.models.TroubleshootingRecommendedActions] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'reason_type': {'key': 'reasonType', 'type': 'str'}, + 'summary': {'key': 'summary', 'type': 'str'}, + 'detail': {'key': 'detail', 'type': 'str'}, + 'recommended_actions': {'key': 'recommendedActions', 'type': '[TroubleshootingRecommendedActions]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + reason_type: Optional[str] = None, + summary: Optional[str] = None, + detail: Optional[str] = None, + recommended_actions: Optional[List["TroubleshootingRecommendedActions"]] = None, + **kwargs + ): + super(TroubleshootingDetails, self).__init__(**kwargs) + self.id = id + self.reason_type = reason_type + self.summary = summary + self.detail = detail + self.recommended_actions = recommended_actions + + +class TroubleshootingParameters(msrest.serialization.Model): + """Parameters that define the resource to troubleshoot. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The target resource to troubleshoot. + :type target_resource_id: str + :param storage_id: Required. The ID for the storage account to save the troubleshoot result. + :type storage_id: str + :param storage_path: Required. The path to the blob to save the troubleshoot result in. + :type storage_path: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'storage_id': {'required': True}, + 'storage_path': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'storage_id': {'key': 'properties.storageId', 'type': 'str'}, + 'storage_path': {'key': 'properties.storagePath', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + storage_id: str, + storage_path: str, + **kwargs + ): + super(TroubleshootingParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.storage_id = storage_id + self.storage_path = storage_path + + +class TroubleshootingRecommendedActions(msrest.serialization.Model): + """Recommended actions based on discovered issues. + + :param action_id: ID of the recommended action. + :type action_id: str + :param action_text: Description of recommended actions. + :type action_text: str + :param action_uri: The uri linking to a documentation for the recommended troubleshooting + actions. + :type action_uri: str + :param action_uri_text: The information from the URI for the recommended troubleshooting + actions. + :type action_uri_text: str + """ + + _attribute_map = { + 'action_id': {'key': 'actionId', 'type': 'str'}, + 'action_text': {'key': 'actionText', 'type': 'str'}, + 'action_uri': {'key': 'actionUri', 'type': 'str'}, + 'action_uri_text': {'key': 'actionUriText', 'type': 'str'}, + } + + def __init__( + self, + *, + action_id: Optional[str] = None, + action_text: Optional[str] = None, + action_uri: Optional[str] = None, + action_uri_text: Optional[str] = None, + **kwargs + ): + super(TroubleshootingRecommendedActions, self).__init__(**kwargs) + self.action_id = action_id + self.action_text = action_text + self.action_uri = action_uri + self.action_uri_text = action_uri_text + + +class TroubleshootingResult(msrest.serialization.Model): + """Troubleshooting information gained from specified resource. + + :param start_time: The start time of the troubleshooting. + :type start_time: ~datetime.datetime + :param end_time: The end time of the troubleshooting. + :type end_time: ~datetime.datetime + :param code: The result code of the troubleshooting. + :type code: str + :param results: Information from troubleshooting. + :type results: list[~azure.mgmt.network.v2021_05_01.models.TroubleshootingDetails] + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'code': {'key': 'code', 'type': 'str'}, + 'results': {'key': 'results', 'type': '[TroubleshootingDetails]'}, + } + + def __init__( + self, + *, + start_time: Optional[datetime.datetime] = None, + end_time: Optional[datetime.datetime] = None, + code: Optional[str] = None, + results: Optional[List["TroubleshootingDetails"]] = None, + **kwargs + ): + super(TroubleshootingResult, self).__init__(**kwargs) + self.start_time = start_time + self.end_time = end_time + self.code = code + self.results = results + + +class TunnelConnectionHealth(msrest.serialization.Model): + """VirtualNetworkGatewayConnection properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar tunnel: Tunnel name. + :vartype tunnel: str + :ivar connection_status: Virtual Network Gateway connection status. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionStatus + :ivar ingress_bytes_transferred: The Ingress Bytes Transferred in this connection. + :vartype ingress_bytes_transferred: long + :ivar egress_bytes_transferred: The Egress Bytes Transferred in this connection. + :vartype egress_bytes_transferred: long + :ivar last_connection_established_utc_time: The time at which connection was established in Utc + format. + :vartype last_connection_established_utc_time: str + """ + + _validation = { + 'tunnel': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'last_connection_established_utc_time': {'readonly': True}, + } + + _attribute_map = { + 'tunnel': {'key': 'tunnel', 'type': 'str'}, + 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, + 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, + 'last_connection_established_utc_time': {'key': 'lastConnectionEstablishedUtcTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TunnelConnectionHealth, self).__init__(**kwargs) + self.tunnel = None + self.connection_status = None + self.ingress_bytes_transferred = None + self.egress_bytes_transferred = None + self.last_connection_established_utc_time = None + + +class UnprepareNetworkPoliciesRequest(msrest.serialization.Model): + """Details of UnprepareNetworkPolicies for Subnet. + + :param service_name: The name of the service for which subnet is being unprepared for. + :type service_name: str + """ + + _attribute_map = { + 'service_name': {'key': 'serviceName', 'type': 'str'}, + } + + def __init__( + self, + *, + service_name: Optional[str] = None, + **kwargs + ): + super(UnprepareNetworkPoliciesRequest, self).__init__(**kwargs) + self.service_name = service_name + + +class Usage(msrest.serialization.Model): + """The network resource usage. + + 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. + + :ivar id: Resource identifier. + :vartype id: str + :param unit: Required. An enum describing the unit of measurement. Possible values include: + "Count". + :type unit: str or ~azure.mgmt.network.v2021_05_01.models.UsageUnit + :param current_value: Required. The current value of the usage. + :type current_value: long + :param limit: Required. The limit of usage. + :type limit: long + :param name: Required. The name of the type of usage. + :type name: ~azure.mgmt.network.v2021_05_01.models.UsageName + """ + + _validation = { + 'id': {'readonly': True}, + 'unit': {'required': True}, + 'current_value': {'required': True}, + 'limit': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'long'}, + 'limit': {'key': 'limit', 'type': 'long'}, + 'name': {'key': 'name', 'type': 'UsageName'}, + } + + def __init__( + self, + *, + unit: Union[str, "UsageUnit"], + current_value: int, + limit: int, + name: "UsageName", + **kwargs + ): + super(Usage, self).__init__(**kwargs) + self.id = None + self.unit = unit + self.current_value = current_value + self.limit = limit + self.name = name + + +class UsageName(msrest.serialization.Model): + """The usage names. + + :param value: A string describing the resource name. + :type value: str + :param localized_value: A localized string describing the resource name. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[str] = None, + localized_value: Optional[str] = None, + **kwargs + ): + super(UsageName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value + + +class UsagesListResult(msrest.serialization.Model): + """The list usages operation response. + + :param value: The list network resource usages. + :type value: list[~azure.mgmt.network.v2021_05_01.models.Usage] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Usage"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(UsagesListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VerificationIPFlowParameters(msrest.serialization.Model): + """Parameters that define the IP flow to be verified. + + All required parameters must be populated in order to send to Azure. + + :param target_resource_id: Required. The ID of the target resource to perform next-hop on. + :type target_resource_id: str + :param direction: Required. The direction of the packet represented as a 5-tuple. Possible + values include: "Inbound", "Outbound". + :type direction: str or ~azure.mgmt.network.v2021_05_01.models.Direction + :param protocol: Required. Protocol to be verified on. Possible values include: "TCP", "UDP". + :type protocol: str or ~azure.mgmt.network.v2021_05_01.models.IpFlowProtocol + :param local_port: Required. The local port. Acceptable values are a single integer in the + range (0-65535). Support for * for the source port, which depends on the direction. + :type local_port: str + :param remote_port: Required. The remote port. Acceptable values are a single integer in the + range (0-65535). Support for * for the source port, which depends on the direction. + :type remote_port: str + :param local_ip_address: Required. The local IP address. Acceptable values are valid IPv4 + addresses. + :type local_ip_address: str + :param remote_ip_address: Required. The remote IP address. Acceptable values are valid IPv4 + addresses. + :type remote_ip_address: str + :param target_nic_resource_id: The NIC ID. (If VM has multiple NICs and IP forwarding is + enabled on any of them, then this parameter must be specified. Otherwise optional). + :type target_nic_resource_id: str + """ + + _validation = { + 'target_resource_id': {'required': True}, + 'direction': {'required': True}, + 'protocol': {'required': True}, + 'local_port': {'required': True}, + 'remote_port': {'required': True}, + 'local_ip_address': {'required': True}, + 'remote_ip_address': {'required': True}, + } + + _attribute_map = { + 'target_resource_id': {'key': 'targetResourceId', 'type': 'str'}, + 'direction': {'key': 'direction', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'local_port': {'key': 'localPort', 'type': 'str'}, + 'remote_port': {'key': 'remotePort', 'type': 'str'}, + 'local_ip_address': {'key': 'localIPAddress', 'type': 'str'}, + 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, + 'target_nic_resource_id': {'key': 'targetNicResourceId', 'type': 'str'}, + } + + def __init__( + self, + *, + target_resource_id: str, + direction: Union[str, "Direction"], + protocol: Union[str, "IpFlowProtocol"], + local_port: str, + remote_port: str, + local_ip_address: str, + remote_ip_address: str, + target_nic_resource_id: Optional[str] = None, + **kwargs + ): + super(VerificationIPFlowParameters, self).__init__(**kwargs) + self.target_resource_id = target_resource_id + self.direction = direction + self.protocol = protocol + self.local_port = local_port + self.remote_port = remote_port + self.local_ip_address = local_ip_address + self.remote_ip_address = remote_ip_address + self.target_nic_resource_id = target_nic_resource_id + + +class VerificationIPFlowResult(msrest.serialization.Model): + """Results of IP flow verification on the target resource. + + :param access: Indicates whether the traffic is allowed or denied. Possible values include: + "Allow", "Deny". + :type access: str or ~azure.mgmt.network.v2021_05_01.models.Access + :param rule_name: Name of the rule. If input is not matched against any security rule, it is + not displayed. + :type rule_name: str + """ + + _attribute_map = { + 'access': {'key': 'access', 'type': 'str'}, + 'rule_name': {'key': 'ruleName', 'type': 'str'}, + } + + def __init__( + self, + *, + access: Optional[Union[str, "Access"]] = None, + rule_name: Optional[str] = None, + **kwargs + ): + super(VerificationIPFlowResult, self).__init__(**kwargs) + self.access = access + self.rule_name = rule_name + + +class VirtualApplianceNicProperties(msrest.serialization.Model): + """Network Virtual Appliance NIC properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: NIC name. + :vartype name: str + :ivar public_ip_address: Public IP address. + :vartype public_ip_address: str + :ivar private_ip_address: Private IP address. + :vartype private_ip_address: str + """ + + _validation = { + 'name': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualApplianceNicProperties, self).__init__(**kwargs) + self.name = None + self.public_ip_address = None + self.private_ip_address = None + + +class VirtualApplianceSite(SubResource): + """Virtual Appliance Site resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the virtual appliance site. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Site type. + :vartype type: str + :param address_prefix: Address Prefix. + :type address_prefix: str + :param o365_policy: Office 365 Policy. + :type o365_policy: ~azure.mgmt.network.v2021_05_01.models.Office365PolicyProperties + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'o365_policy': {'key': 'properties.o365Policy', 'type': 'Office365PolicyProperties'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + address_prefix: Optional[str] = None, + o365_policy: Optional["Office365PolicyProperties"] = None, + **kwargs + ): + super(VirtualApplianceSite, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.address_prefix = address_prefix + self.o365_policy = o365_policy + self.provisioning_state = None + + +class VirtualApplianceSkuProperties(msrest.serialization.Model): + """Network Virtual Appliance Sku Properties. + + :param vendor: Virtual Appliance Vendor. + :type vendor: str + :param bundled_scale_unit: Virtual Appliance Scale Unit. + :type bundled_scale_unit: str + :param market_place_version: Virtual Appliance Version. + :type market_place_version: str + """ + + _attribute_map = { + 'vendor': {'key': 'vendor', 'type': 'str'}, + 'bundled_scale_unit': {'key': 'bundledScaleUnit', 'type': 'str'}, + 'market_place_version': {'key': 'marketPlaceVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + vendor: Optional[str] = None, + bundled_scale_unit: Optional[str] = None, + market_place_version: Optional[str] = None, + **kwargs + ): + super(VirtualApplianceSkuProperties, self).__init__(**kwargs) + self.vendor = vendor + self.bundled_scale_unit = bundled_scale_unit + self.market_place_version = market_place_version + + +class VirtualHub(Resource): + """VirtualHub Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar kind: Kind of service virtual hub. This is metadata used for the Azure portal experience + for Route Server. + :vartype kind: str + :param virtual_wan: The VirtualWAN to which the VirtualHub belongs. + :type virtual_wan: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param vpn_gateway: The VpnGateway associated with this VirtualHub. + :type vpn_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param p2_s_vpn_gateway: The P2SVpnGateway associated with this VirtualHub. + :type p2_s_vpn_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param express_route_gateway: The expressRouteGateway associated with this VirtualHub. + :type express_route_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param azure_firewall: The azureFirewall associated with this VirtualHub. + :type azure_firewall: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param security_partner_provider: The securityPartnerProvider associated with this VirtualHub. + :type security_partner_provider: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param address_prefix: Address-prefix for this VirtualHub. + :type address_prefix: str + :param route_table: The routeTable associated with this virtual hub. + :type route_table: ~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTable + :ivar provisioning_state: The provisioning state of the virtual hub resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param security_provider_name: The Security Provider name. + :type security_provider_name: str + :param virtual_hub_route_table_v2_s: List of all virtual hub route table v2s associated with + this VirtualHub. + :type virtual_hub_route_table_v2_s: + list[~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2] + :param sku: The sku of this VirtualHub. + :type sku: str + :ivar routing_state: The routing state. Possible values include: "None", "Provisioned", + "Provisioning", "Failed". + :vartype routing_state: str or ~azure.mgmt.network.v2021_05_01.models.RoutingState + :ivar bgp_connections: List of references to Bgp Connections. + :vartype bgp_connections: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar ip_configurations: List of references to IpConfigurations. + :vartype ip_configurations: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param virtual_router_asn: VirtualRouter ASN. + :type virtual_router_asn: long + :param virtual_router_ips: VirtualRouter IPs. + :type virtual_router_ips: list[str] + :param allow_branch_to_branch_traffic: Flag to control transit for VirtualRouter hub. + :type allow_branch_to_branch_traffic: bool + :param preferred_routing_gateway: The preferred gateway to route on-prem traffic. Possible + values include: "ExpressRoute", "VpnGateway", "None". + :type preferred_routing_gateway: str or + ~azure.mgmt.network.v2021_05_01.models.PreferredRoutingGateway + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'kind': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'routing_state': {'readonly': True}, + 'bgp_connections': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + 'virtual_router_asn': {'maximum': 4294967295, 'minimum': 0}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'virtual_wan': {'key': 'properties.virtualWan', 'type': 'SubResource'}, + 'vpn_gateway': {'key': 'properties.vpnGateway', 'type': 'SubResource'}, + 'p2_s_vpn_gateway': {'key': 'properties.p2SVpnGateway', 'type': 'SubResource'}, + 'express_route_gateway': {'key': 'properties.expressRouteGateway', 'type': 'SubResource'}, + 'azure_firewall': {'key': 'properties.azureFirewall', 'type': 'SubResource'}, + 'security_partner_provider': {'key': 'properties.securityPartnerProvider', 'type': 'SubResource'}, + 'address_prefix': {'key': 'properties.addressPrefix', 'type': 'str'}, + 'route_table': {'key': 'properties.routeTable', 'type': 'VirtualHubRouteTable'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'security_provider_name': {'key': 'properties.securityProviderName', 'type': 'str'}, + 'virtual_hub_route_table_v2_s': {'key': 'properties.virtualHubRouteTableV2s', 'type': '[VirtualHubRouteTableV2]'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'routing_state': {'key': 'properties.routingState', 'type': 'str'}, + 'bgp_connections': {'key': 'properties.bgpConnections', 'type': '[SubResource]'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[SubResource]'}, + 'virtual_router_asn': {'key': 'properties.virtualRouterAsn', 'type': 'long'}, + 'virtual_router_ips': {'key': 'properties.virtualRouterIps', 'type': '[str]'}, + 'allow_branch_to_branch_traffic': {'key': 'properties.allowBranchToBranchTraffic', 'type': 'bool'}, + 'preferred_routing_gateway': {'key': 'properties.preferredRoutingGateway', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_wan: Optional["SubResource"] = None, + vpn_gateway: Optional["SubResource"] = None, + p2_s_vpn_gateway: Optional["SubResource"] = None, + express_route_gateway: Optional["SubResource"] = None, + azure_firewall: Optional["SubResource"] = None, + security_partner_provider: Optional["SubResource"] = None, + address_prefix: Optional[str] = None, + route_table: Optional["VirtualHubRouteTable"] = None, + security_provider_name: Optional[str] = None, + virtual_hub_route_table_v2_s: Optional[List["VirtualHubRouteTableV2"]] = None, + sku: Optional[str] = None, + virtual_router_asn: Optional[int] = None, + virtual_router_ips: Optional[List[str]] = None, + allow_branch_to_branch_traffic: Optional[bool] = None, + preferred_routing_gateway: Optional[Union[str, "PreferredRoutingGateway"]] = None, + **kwargs + ): + super(VirtualHub, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.kind = None + self.virtual_wan = virtual_wan + self.vpn_gateway = vpn_gateway + self.p2_s_vpn_gateway = p2_s_vpn_gateway + self.express_route_gateway = express_route_gateway + self.azure_firewall = azure_firewall + self.security_partner_provider = security_partner_provider + self.address_prefix = address_prefix + self.route_table = route_table + self.provisioning_state = None + self.security_provider_name = security_provider_name + self.virtual_hub_route_table_v2_s = virtual_hub_route_table_v2_s + self.sku = sku + self.routing_state = None + self.bgp_connections = None + self.ip_configurations = None + self.virtual_router_asn = virtual_router_asn + self.virtual_router_ips = virtual_router_ips + self.allow_branch_to_branch_traffic = allow_branch_to_branch_traffic + self.preferred_routing_gateway = preferred_routing_gateway + + +class VirtualHubEffectiveRoute(msrest.serialization.Model): + """The effective route configured on the virtual hub or specified resource. + + :param address_prefixes: The list of address prefixes. + :type address_prefixes: list[str] + :param next_hops: The list of next hops. + :type next_hops: list[str] + :param next_hop_type: The type of the next hop. + :type next_hop_type: str + :param as_path: The ASPath of this route. + :type as_path: str + :param route_origin: The origin of this route. + :type route_origin: str + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'next_hops': {'key': 'nextHops', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'as_path': {'key': 'asPath', 'type': 'str'}, + 'route_origin': {'key': 'routeOrigin', 'type': 'str'}, + } + + def __init__( + self, + *, + address_prefixes: Optional[List[str]] = None, + next_hops: Optional[List[str]] = None, + next_hop_type: Optional[str] = None, + as_path: Optional[str] = None, + route_origin: Optional[str] = None, + **kwargs + ): + super(VirtualHubEffectiveRoute, self).__init__(**kwargs) + self.address_prefixes = address_prefixes + self.next_hops = next_hops + self.next_hop_type = next_hop_type + self.as_path = as_path + self.route_origin = route_origin + + +class VirtualHubEffectiveRouteList(msrest.serialization.Model): + """EffectiveRoutes List. + + :param value: The list of effective routes configured on the virtual hub or the specified + resource. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualHubEffectiveRoute] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualHubEffectiveRoute]'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualHubEffectiveRoute"]] = None, + **kwargs + ): + super(VirtualHubEffectiveRouteList, self).__init__(**kwargs) + self.value = value + + +class VirtualHubId(msrest.serialization.Model): + """Virtual Hub identifier. + + :param id: The resource URI for the Virtual Hub where the ExpressRoute gateway is or will be + deployed. The Virtual Hub resource and the ExpressRoute gateway resource reside in the same + subscription. + :type id: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + **kwargs + ): + super(VirtualHubId, self).__init__(**kwargs) + self.id = id + + +class VirtualHubRoute(msrest.serialization.Model): + """VirtualHub route. + + :param address_prefixes: List of all addressPrefixes. + :type address_prefixes: list[str] + :param next_hop_ip_address: NextHop ip address. + :type next_hop_ip_address: str + """ + + _attribute_map = { + 'address_prefixes': {'key': 'addressPrefixes', 'type': '[str]'}, + 'next_hop_ip_address': {'key': 'nextHopIpAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + address_prefixes: Optional[List[str]] = None, + next_hop_ip_address: Optional[str] = None, + **kwargs + ): + super(VirtualHubRoute, self).__init__(**kwargs) + self.address_prefixes = address_prefixes + self.next_hop_ip_address = next_hop_ip_address + + +class VirtualHubRouteTable(msrest.serialization.Model): + """VirtualHub route table. + + :param routes: List of all routes. + :type routes: list[~azure.mgmt.network.v2021_05_01.models.VirtualHubRoute] + """ + + _attribute_map = { + 'routes': {'key': 'routes', 'type': '[VirtualHubRoute]'}, + } + + def __init__( + self, + *, + routes: Optional[List["VirtualHubRoute"]] = None, + **kwargs + ): + super(VirtualHubRouteTable, self).__init__(**kwargs) + self.routes = routes + + +class VirtualHubRouteTableV2(SubResource): + """VirtualHubRouteTableV2 Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param routes: List of all routes. + :type routes: list[~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteV2] + :param attached_connections: List of all connections attached to this route table v2. + :type attached_connections: list[str] + :ivar provisioning_state: The provisioning state of the virtual hub route table v2 resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[VirtualHubRouteV2]'}, + 'attached_connections': {'key': 'properties.attachedConnections', 'type': '[str]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + routes: Optional[List["VirtualHubRouteV2"]] = None, + attached_connections: Optional[List[str]] = None, + **kwargs + ): + super(VirtualHubRouteTableV2, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.routes = routes + self.attached_connections = attached_connections + self.provisioning_state = None + + +class VirtualHubRouteV2(msrest.serialization.Model): + """VirtualHubRouteTableV2 route. + + :param destination_type: The type of destinations. + :type destination_type: str + :param destinations: List of all destinations. + :type destinations: list[str] + :param next_hop_type: The type of next hops. + :type next_hop_type: str + :param next_hops: NextHops ip address. + :type next_hops: list[str] + """ + + _attribute_map = { + 'destination_type': {'key': 'destinationType', 'type': 'str'}, + 'destinations': {'key': 'destinations', 'type': '[str]'}, + 'next_hop_type': {'key': 'nextHopType', 'type': 'str'}, + 'next_hops': {'key': 'nextHops', 'type': '[str]'}, + } + + def __init__( + self, + *, + destination_type: Optional[str] = None, + destinations: Optional[List[str]] = None, + next_hop_type: Optional[str] = None, + next_hops: Optional[List[str]] = None, + **kwargs + ): + super(VirtualHubRouteV2, self).__init__(**kwargs) + self.destination_type = destination_type + self.destinations = destinations + self.next_hop_type = next_hop_type + self.next_hops = next_hops + + +class VirtualNetwork(Resource): + """Virtual Network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of the virtual network. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param address_space: The AddressSpace that contains an array of IP address ranges that can be + used by subnets. + :type address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param dhcp_options: The dhcpOptions that contains an array of DNS servers available to VMs + deployed in the virtual network. + :type dhcp_options: ~azure.mgmt.network.v2021_05_01.models.DhcpOptions + :param flow_timeout_in_minutes: The FlowTimeout value (in minutes) for the Virtual Network. + :type flow_timeout_in_minutes: int + :param subnets: A list of subnets in a Virtual Network. + :type subnets: list[~azure.mgmt.network.v2021_05_01.models.Subnet] + :param virtual_network_peerings: A list of peerings in a Virtual Network. + :type virtual_network_peerings: + list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering] + :ivar resource_guid: The resourceGuid property of the Virtual Network resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param enable_ddos_protection: Indicates if DDoS protection is enabled for all the protected + resources in the virtual network. It requires a DDoS protection plan associated with the + resource. + :type enable_ddos_protection: bool + :param enable_vm_protection: Indicates if VM protection is enabled for all the subnets in the + virtual network. + :type enable_vm_protection: bool + :param ddos_protection_plan: The DDoS protection plan associated with the virtual network. + :type ddos_protection_plan: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param bgp_communities: Bgp Communities sent over ExpressRoute with each route corresponding to + a prefix in this VNET. + :type bgp_communities: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkBgpCommunities + :param encryption: Indicates if encryption is enabled on virtual network and if VM without + encryption is allowed in encrypted VNet. + :type encryption: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkEncryption + :param ip_allocations: Array of IpAllocation which reference this VNET. + :type ip_allocations: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, + 'dhcp_options': {'key': 'properties.dhcpOptions', 'type': 'DhcpOptions'}, + 'flow_timeout_in_minutes': {'key': 'properties.flowTimeoutInMinutes', 'type': 'int'}, + 'subnets': {'key': 'properties.subnets', 'type': '[Subnet]'}, + 'virtual_network_peerings': {'key': 'properties.virtualNetworkPeerings', 'type': '[VirtualNetworkPeering]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'enable_ddos_protection': {'key': 'properties.enableDdosProtection', 'type': 'bool'}, + 'enable_vm_protection': {'key': 'properties.enableVmProtection', 'type': 'bool'}, + 'ddos_protection_plan': {'key': 'properties.ddosProtectionPlan', 'type': 'SubResource'}, + 'bgp_communities': {'key': 'properties.bgpCommunities', 'type': 'VirtualNetworkBgpCommunities'}, + 'encryption': {'key': 'properties.encryption', 'type': 'VirtualNetworkEncryption'}, + 'ip_allocations': {'key': 'properties.ipAllocations', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + address_space: Optional["AddressSpace"] = None, + dhcp_options: Optional["DhcpOptions"] = None, + flow_timeout_in_minutes: Optional[int] = None, + subnets: Optional[List["Subnet"]] = None, + virtual_network_peerings: Optional[List["VirtualNetworkPeering"]] = None, + enable_ddos_protection: Optional[bool] = False, + enable_vm_protection: Optional[bool] = False, + ddos_protection_plan: Optional["SubResource"] = None, + bgp_communities: Optional["VirtualNetworkBgpCommunities"] = None, + encryption: Optional["VirtualNetworkEncryption"] = None, + ip_allocations: Optional[List["SubResource"]] = None, + **kwargs + ): + super(VirtualNetwork, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.address_space = address_space + self.dhcp_options = dhcp_options + self.flow_timeout_in_minutes = flow_timeout_in_minutes + self.subnets = subnets + self.virtual_network_peerings = virtual_network_peerings + self.resource_guid = None + self.provisioning_state = None + self.enable_ddos_protection = enable_ddos_protection + self.enable_vm_protection = enable_vm_protection + self.ddos_protection_plan = ddos_protection_plan + self.bgp_communities = bgp_communities + self.encryption = encryption + self.ip_allocations = ip_allocations + + +class VirtualNetworkBgpCommunities(msrest.serialization.Model): + """Bgp Communities sent over ExpressRoute with each route corresponding to a prefix in this VNET. + + 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 virtual_network_community: Required. The BGP community associated with the virtual + network. + :type virtual_network_community: str + :ivar regional_community: The BGP community associated with the region of the virtual network. + :vartype regional_community: str + """ + + _validation = { + 'virtual_network_community': {'required': True}, + 'regional_community': {'readonly': True}, + } + + _attribute_map = { + 'virtual_network_community': {'key': 'virtualNetworkCommunity', 'type': 'str'}, + 'regional_community': {'key': 'regionalCommunity', 'type': 'str'}, + } + + def __init__( + self, + *, + virtual_network_community: str, + **kwargs + ): + super(VirtualNetworkBgpCommunities, self).__init__(**kwargs) + self.virtual_network_community = virtual_network_community + self.regional_community = None + + +class VirtualNetworkConnectionGatewayReference(msrest.serialization.Model): + """A reference to VirtualNetworkGateway or LocalNetworkGateway resource. + + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of VirtualNetworkGateway or LocalNetworkGateway resource. + :type id: str + """ + + _validation = { + 'id': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + **kwargs + ): + super(VirtualNetworkConnectionGatewayReference, self).__init__(**kwargs) + self.id = id + + +class VirtualNetworkEncryption(msrest.serialization.Model): + """Indicates if encryption is enabled on virtual network and if VM without encryption is allowed in encrypted VNet. + + All required parameters must be populated in order to send to Azure. + + :param enabled: Required. Indicates if encryption is enabled on the virtual network. + :type enabled: bool + :param enforcement: If the encrypted VNet allows VM that does not support encryption. Possible + values include: "DropUnencrypted", "AllowUnencrypted". + :type enforcement: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkEncryptionEnforcement + """ + + _validation = { + 'enabled': {'required': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'enforcement': {'key': 'enforcement', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: bool, + enforcement: Optional[Union[str, "VirtualNetworkEncryptionEnforcement"]] = None, + **kwargs + ): + super(VirtualNetworkEncryption, self).__init__(**kwargs) + self.enabled = enabled + self.enforcement = enforcement + + +class VirtualNetworkGateway(Resource): + """A common class for general resource information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param extended_location: The extended location of type local virtual network gateway. + :type extended_location: ~azure.mgmt.network.v2021_05_01.models.ExtendedLocation + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param ip_configurations: IP configurations for virtual network gateway. + :type ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayIPConfiguration] + :param gateway_type: The type of this virtual network gateway. Possible values include: "Vpn", + "ExpressRoute", "LocalGateway". + :type gateway_type: str or ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayType + :param vpn_type: The type of this virtual network gateway. Possible values include: + "PolicyBased", "RouteBased". + :type vpn_type: str or ~azure.mgmt.network.v2021_05_01.models.VpnType + :param vpn_gateway_generation: The generation for this VirtualNetworkGateway. Must be None if + gatewayType is not VPN. Possible values include: "None", "Generation1", "Generation2". + :type vpn_gateway_generation: str or + ~azure.mgmt.network.v2021_05_01.models.VpnGatewayGeneration + :param enable_bgp: Whether BGP is enabled for this virtual network gateway or not. + :type enable_bgp: bool + :param enable_private_ip_address: Whether private IP needs to be enabled on this gateway for + connections or not. + :type enable_private_ip_address: bool + :param active: ActiveActive flag. + :type active: bool + :param disable_ip_sec_replay_protection: disableIPSecReplayProtection flag. + :type disable_ip_sec_replay_protection: bool + :param gateway_default_site: The reference to the LocalNetworkGateway resource which represents + local network site having default routes. Assign Null value in case of removing existing + default site setting. + :type gateway_default_site: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param sku: The reference to the VirtualNetworkGatewaySku resource which represents the SKU + selected for Virtual network gateway. + :type sku: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewaySku + :param vpn_client_configuration: The reference to the VpnClientConfiguration resource which + represents the P2S VpnClient configurations. + :type vpn_client_configuration: ~azure.mgmt.network.v2021_05_01.models.VpnClientConfiguration + :param bgp_settings: Virtual network gateway's BGP speaker settings. + :type bgp_settings: ~azure.mgmt.network.v2021_05_01.models.BgpSettings + :param custom_routes: The reference to the address space resource which represents the custom + routes address space specified by the customer for virtual network gateway and VpnClient. + :type custom_routes: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :ivar resource_guid: The resource GUID property of the virtual network gateway resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network gateway resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param enable_dns_forwarding: Whether dns forwarding is enabled or not. + :type enable_dns_forwarding: bool + :ivar inbound_dns_forwarding_endpoint: The IP address allocated by the gateway to which dns + requests can be sent. + :vartype inbound_dns_forwarding_endpoint: str + :param v_net_extended_location_resource_id: Customer vnet resource id. VirtualNetworkGateway of + type local gateway is associated with the customer vnet. + :type v_net_extended_location_resource_id: str + :param nat_rules: NatRules for virtual network gateway. + :type nat_rules: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule] + :param enable_bgp_route_translation_for_nat: EnableBgpRouteTranslationForNat flag. + :type enable_bgp_route_translation_for_nat: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'inbound_dns_forwarding_endpoint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'extended_location': {'key': 'extendedLocation', 'type': 'ExtendedLocation'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VirtualNetworkGatewayIPConfiguration]'}, + 'gateway_type': {'key': 'properties.gatewayType', 'type': 'str'}, + 'vpn_type': {'key': 'properties.vpnType', 'type': 'str'}, + 'vpn_gateway_generation': {'key': 'properties.vpnGatewayGeneration', 'type': 'str'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'enable_private_ip_address': {'key': 'properties.enablePrivateIpAddress', 'type': 'bool'}, + 'active': {'key': 'properties.activeActive', 'type': 'bool'}, + 'disable_ip_sec_replay_protection': {'key': 'properties.disableIPSecReplayProtection', 'type': 'bool'}, + 'gateway_default_site': {'key': 'properties.gatewayDefaultSite', 'type': 'SubResource'}, + 'sku': {'key': 'properties.sku', 'type': 'VirtualNetworkGatewaySku'}, + 'vpn_client_configuration': {'key': 'properties.vpnClientConfiguration', 'type': 'VpnClientConfiguration'}, + 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, + 'custom_routes': {'key': 'properties.customRoutes', 'type': 'AddressSpace'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'enable_dns_forwarding': {'key': 'properties.enableDnsForwarding', 'type': 'bool'}, + 'inbound_dns_forwarding_endpoint': {'key': 'properties.inboundDnsForwardingEndpoint', 'type': 'str'}, + 'v_net_extended_location_resource_id': {'key': 'properties.vNetExtendedLocationResourceId', 'type': 'str'}, + 'nat_rules': {'key': 'properties.natRules', 'type': '[VirtualNetworkGatewayNatRule]'}, + 'enable_bgp_route_translation_for_nat': {'key': 'properties.enableBgpRouteTranslationForNat', 'type': 'bool'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + extended_location: Optional["ExtendedLocation"] = None, + ip_configurations: Optional[List["VirtualNetworkGatewayIPConfiguration"]] = None, + gateway_type: Optional[Union[str, "VirtualNetworkGatewayType"]] = None, + vpn_type: Optional[Union[str, "VpnType"]] = None, + vpn_gateway_generation: Optional[Union[str, "VpnGatewayGeneration"]] = None, + enable_bgp: Optional[bool] = None, + enable_private_ip_address: Optional[bool] = None, + active: Optional[bool] = None, + disable_ip_sec_replay_protection: Optional[bool] = None, + gateway_default_site: Optional["SubResource"] = None, + sku: Optional["VirtualNetworkGatewaySku"] = None, + vpn_client_configuration: Optional["VpnClientConfiguration"] = None, + bgp_settings: Optional["BgpSettings"] = None, + custom_routes: Optional["AddressSpace"] = None, + enable_dns_forwarding: Optional[bool] = None, + v_net_extended_location_resource_id: Optional[str] = None, + nat_rules: Optional[List["VirtualNetworkGatewayNatRule"]] = None, + enable_bgp_route_translation_for_nat: Optional[bool] = None, + **kwargs + ): + super(VirtualNetworkGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.extended_location = extended_location + self.etag = None + self.ip_configurations = ip_configurations + self.gateway_type = gateway_type + self.vpn_type = vpn_type + self.vpn_gateway_generation = vpn_gateway_generation + self.enable_bgp = enable_bgp + self.enable_private_ip_address = enable_private_ip_address + self.active = active + self.disable_ip_sec_replay_protection = disable_ip_sec_replay_protection + self.gateway_default_site = gateway_default_site + self.sku = sku + self.vpn_client_configuration = vpn_client_configuration + self.bgp_settings = bgp_settings + self.custom_routes = custom_routes + self.resource_guid = None + self.provisioning_state = None + self.enable_dns_forwarding = enable_dns_forwarding + self.inbound_dns_forwarding_endpoint = None + self.v_net_extended_location_resource_id = v_net_extended_location_resource_id + self.nat_rules = nat_rules + self.enable_bgp_route_translation_for_nat = enable_bgp_route_translation_for_nat + + +class VirtualNetworkGatewayConnection(Resource): + """A common class for general resource information. + + 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 id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param authorization_key: The authorizationKey. + :type authorization_key: str + :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. + :type virtual_network_gateway1: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway + :param virtual_network_gateway2: The reference to virtual network gateway resource. + :type virtual_network_gateway2: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway + :param local_network_gateway2: The reference to local network gateway resource. + :type local_network_gateway2: ~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway + :param ingress_nat_rules: List of ingress NatRules. + :type ingress_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param egress_nat_rules: List of egress NatRules. + :type egress_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param connection_type: Required. Gateway connection type. Possible values include: "IPsec", + "Vnet2Vnet", "ExpressRoute", "VPNClient". + :type connection_type: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionType + :param connection_protocol: Connection protocol used for this connection. Possible values + include: "IKEv2", "IKEv1". + :type connection_protocol: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionProtocol + :param routing_weight: The routing weight. + :type routing_weight: int + :param dpd_timeout_seconds: The dead peer detection timeout of this connection in seconds. + :type dpd_timeout_seconds: int + :param connection_mode: The connection mode for this connection. Possible values include: + "Default", "ResponderOnly", "InitiatorOnly". + :type connection_mode: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionMode + :param shared_key: The IPSec shared key. + :type shared_key: str + :ivar connection_status: Virtual Network Gateway connection status. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionStatus + :ivar tunnel_connection_status: Collection of all tunnels' connection health status. + :vartype tunnel_connection_status: + list[~azure.mgmt.network.v2021_05_01.models.TunnelConnectionHealth] + :ivar egress_bytes_transferred: The egress bytes transferred in this connection. + :vartype egress_bytes_transferred: long + :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. + :vartype ingress_bytes_transferred: long + :param peer: The reference to peerings resource. + :type peer: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param enable_bgp: EnableBgp flag. + :type enable_bgp: bool + :param use_local_azure_ip_address: Use private local Azure IP for the connection. + :type use_local_azure_ip_address: bool + :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :type use_policy_based_traffic_selectors: bool + :param ipsec_policies: The IPSec Policies to be considered by this connection. + :type ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :type traffic_selector_policies: + list[~azure.mgmt.network.v2021_05_01.models.TrafficSelectorPolicy] + :ivar resource_guid: The resource GUID property of the virtual network gateway connection + resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network gateway connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. + :type express_route_gateway_bypass: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_network_gateway1': {'required': True}, + 'connection_type': {'required': True}, + 'connection_status': {'readonly': True}, + 'tunnel_connection_status': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkGateway'}, + 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkGateway'}, + 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'LocalNetworkGateway'}, + 'ingress_nat_rules': {'key': 'properties.ingressNatRules', 'type': '[SubResource]'}, + 'egress_nat_rules': {'key': 'properties.egressNatRules', 'type': '[SubResource]'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, + 'connection_protocol': {'key': 'properties.connectionProtocol', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'dpd_timeout_seconds': {'key': 'properties.dpdTimeoutSeconds', 'type': 'int'}, + 'connection_mode': {'key': 'properties.connectionMode', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'use_local_azure_ip_address': {'key': 'properties.useLocalAzureIpAddress', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'traffic_selector_policies': {'key': 'properties.trafficSelectorPolicies', 'type': '[TrafficSelectorPolicy]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, + } + + def __init__( + self, + *, + virtual_network_gateway1: "VirtualNetworkGateway", + connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + authorization_key: Optional[str] = None, + virtual_network_gateway2: Optional["VirtualNetworkGateway"] = None, + local_network_gateway2: Optional["LocalNetworkGateway"] = None, + ingress_nat_rules: Optional[List["SubResource"]] = None, + egress_nat_rules: Optional[List["SubResource"]] = None, + connection_protocol: Optional[Union[str, "VirtualNetworkGatewayConnectionProtocol"]] = None, + routing_weight: Optional[int] = None, + dpd_timeout_seconds: Optional[int] = None, + connection_mode: Optional[Union[str, "VirtualNetworkGatewayConnectionMode"]] = None, + shared_key: Optional[str] = None, + peer: Optional["SubResource"] = None, + enable_bgp: Optional[bool] = None, + use_local_azure_ip_address: Optional[bool] = None, + use_policy_based_traffic_selectors: Optional[bool] = None, + ipsec_policies: Optional[List["IpsecPolicy"]] = None, + traffic_selector_policies: Optional[List["TrafficSelectorPolicy"]] = None, + express_route_gateway_bypass: Optional[bool] = None, + **kwargs + ): + super(VirtualNetworkGatewayConnection, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.authorization_key = authorization_key + self.virtual_network_gateway1 = virtual_network_gateway1 + self.virtual_network_gateway2 = virtual_network_gateway2 + self.local_network_gateway2 = local_network_gateway2 + self.ingress_nat_rules = ingress_nat_rules + self.egress_nat_rules = egress_nat_rules + self.connection_type = connection_type + self.connection_protocol = connection_protocol + self.routing_weight = routing_weight + self.dpd_timeout_seconds = dpd_timeout_seconds + self.connection_mode = connection_mode + self.shared_key = shared_key + self.connection_status = None + self.tunnel_connection_status = None + self.egress_bytes_transferred = None + self.ingress_bytes_transferred = None + self.peer = peer + self.enable_bgp = enable_bgp + self.use_local_azure_ip_address = use_local_azure_ip_address + self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors + self.ipsec_policies = ipsec_policies + self.traffic_selector_policies = traffic_selector_policies + self.resource_guid = None + self.provisioning_state = None + self.express_route_gateway_bypass = express_route_gateway_bypass + + +class VirtualNetworkGatewayConnectionListEntity(Resource): + """A common class for general resource information. + + 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 id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param authorization_key: The authorizationKey. + :type authorization_key: str + :param virtual_network_gateway1: Required. The reference to virtual network gateway resource. + :type virtual_network_gateway1: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkConnectionGatewayReference + :param virtual_network_gateway2: The reference to virtual network gateway resource. + :type virtual_network_gateway2: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkConnectionGatewayReference + :param local_network_gateway2: The reference to local network gateway resource. + :type local_network_gateway2: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkConnectionGatewayReference + :param connection_type: Required. Gateway connection type. Possible values include: "IPsec", + "Vnet2Vnet", "ExpressRoute", "VPNClient". + :type connection_type: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionType + :param connection_protocol: Connection protocol used for this connection. Possible values + include: "IKEv2", "IKEv1". + :type connection_protocol: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionProtocol + :param routing_weight: The routing weight. + :type routing_weight: int + :param connection_mode: The connection mode for this connection. Possible values include: + "Default", "ResponderOnly", "InitiatorOnly". + :type connection_mode: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionMode + :param shared_key: The IPSec shared key. + :type shared_key: str + :ivar connection_status: Virtual Network Gateway connection status. Possible values include: + "Unknown", "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionStatus + :ivar tunnel_connection_status: Collection of all tunnels' connection health status. + :vartype tunnel_connection_status: + list[~azure.mgmt.network.v2021_05_01.models.TunnelConnectionHealth] + :ivar egress_bytes_transferred: The egress bytes transferred in this connection. + :vartype egress_bytes_transferred: long + :ivar ingress_bytes_transferred: The ingress bytes transferred in this connection. + :vartype ingress_bytes_transferred: long + :param peer: The reference to peerings resource. + :type peer: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param enable_bgp: EnableBgp flag. + :type enable_bgp: bool + :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :type use_policy_based_traffic_selectors: bool + :param ipsec_policies: The IPSec Policies to be considered by this connection. + :type ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :type traffic_selector_policies: + list[~azure.mgmt.network.v2021_05_01.models.TrafficSelectorPolicy] + :ivar resource_guid: The resource GUID property of the virtual network gateway connection + resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network gateway connection + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param express_route_gateway_bypass: Bypass ExpressRoute Gateway for data forwarding. + :type express_route_gateway_bypass: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_network_gateway1': {'required': True}, + 'connection_type': {'required': True}, + 'connection_status': {'readonly': True}, + 'tunnel_connection_status': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'}, + 'virtual_network_gateway1': {'key': 'properties.virtualNetworkGateway1', 'type': 'VirtualNetworkConnectionGatewayReference'}, + 'virtual_network_gateway2': {'key': 'properties.virtualNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, + 'local_network_gateway2': {'key': 'properties.localNetworkGateway2', 'type': 'VirtualNetworkConnectionGatewayReference'}, + 'connection_type': {'key': 'properties.connectionType', 'type': 'str'}, + 'connection_protocol': {'key': 'properties.connectionProtocol', 'type': 'str'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'connection_mode': {'key': 'properties.connectionMode', 'type': 'str'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'tunnel_connection_status': {'key': 'properties.tunnelConnectionStatus', 'type': '[TunnelConnectionHealth]'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'peer': {'key': 'properties.peer', 'type': 'SubResource'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'traffic_selector_policies': {'key': 'properties.trafficSelectorPolicies', 'type': '[TrafficSelectorPolicy]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'express_route_gateway_bypass': {'key': 'properties.expressRouteGatewayBypass', 'type': 'bool'}, + } + + def __init__( + self, + *, + virtual_network_gateway1: "VirtualNetworkConnectionGatewayReference", + connection_type: Union[str, "VirtualNetworkGatewayConnectionType"], + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + authorization_key: Optional[str] = None, + virtual_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, + local_network_gateway2: Optional["VirtualNetworkConnectionGatewayReference"] = None, + connection_protocol: Optional[Union[str, "VirtualNetworkGatewayConnectionProtocol"]] = None, + routing_weight: Optional[int] = None, + connection_mode: Optional[Union[str, "VirtualNetworkGatewayConnectionMode"]] = None, + shared_key: Optional[str] = None, + peer: Optional["SubResource"] = None, + enable_bgp: Optional[bool] = None, + use_policy_based_traffic_selectors: Optional[bool] = None, + ipsec_policies: Optional[List["IpsecPolicy"]] = None, + traffic_selector_policies: Optional[List["TrafficSelectorPolicy"]] = None, + express_route_gateway_bypass: Optional[bool] = None, + **kwargs + ): + super(VirtualNetworkGatewayConnectionListEntity, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.authorization_key = authorization_key + self.virtual_network_gateway1 = virtual_network_gateway1 + self.virtual_network_gateway2 = virtual_network_gateway2 + self.local_network_gateway2 = local_network_gateway2 + self.connection_type = connection_type + self.connection_protocol = connection_protocol + self.routing_weight = routing_weight + self.connection_mode = connection_mode + self.shared_key = shared_key + self.connection_status = None + self.tunnel_connection_status = None + self.egress_bytes_transferred = None + self.ingress_bytes_transferred = None + self.peer = peer + self.enable_bgp = enable_bgp + self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors + self.ipsec_policies = ipsec_policies + self.traffic_selector_policies = traffic_selector_policies + self.resource_guid = None + self.provisioning_state = None + self.express_route_gateway_bypass = express_route_gateway_bypass + + +class VirtualNetworkGatewayConnectionListResult(msrest.serialization.Model): + """Response for the ListVirtualNetworkGatewayConnections API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of VirtualNetworkGatewayConnection resources that exists in a resource + group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnection]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkGatewayConnection"]] = None, + **kwargs + ): + super(VirtualNetworkGatewayConnectionListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class VirtualNetworkGatewayIPConfiguration(SubResource): + """IP configuration for virtual network gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param private_ip_allocation_method: The private IP address allocation method. Possible values + include: "Static", "Dynamic". + :type private_ip_allocation_method: str or + ~azure.mgmt.network.v2021_05_01.models.IPAllocationMethod + :param subnet: The reference to the subnet resource. + :type subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param public_ip_address: The reference to the public IP resource. + :type public_ip_address: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar private_ip_address: Private IP Address for this gateway. + :vartype private_ip_address: str + :ivar provisioning_state: The provisioning state of the virtual network gateway IP + configuration resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'private_ip_allocation_method': {'key': 'properties.privateIPAllocationMethod', 'type': 'str'}, + 'subnet': {'key': 'properties.subnet', 'type': 'SubResource'}, + 'public_ip_address': {'key': 'properties.publicIPAddress', 'type': 'SubResource'}, + 'private_ip_address': {'key': 'properties.privateIPAddress', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + private_ip_allocation_method: Optional[Union[str, "IPAllocationMethod"]] = None, + subnet: Optional["SubResource"] = None, + public_ip_address: Optional["SubResource"] = None, + **kwargs + ): + super(VirtualNetworkGatewayIPConfiguration, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.private_ip_allocation_method = private_ip_allocation_method + self.subnet = subnet + self.public_ip_address = public_ip_address + self.private_ip_address = None + self.provisioning_state = None + + +class VirtualNetworkGatewayListConnectionsResult(msrest.serialization.Model): + """Response for the VirtualNetworkGatewayListConnections API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of VirtualNetworkGatewayConnection resources that exists in a resource + group. + :type value: + list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionListEntity] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGatewayConnectionListEntity]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkGatewayConnectionListEntity"]] = None, + **kwargs + ): + super(VirtualNetworkGatewayListConnectionsResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class VirtualNetworkGatewayListResult(msrest.serialization.Model): + """Response for the ListVirtualNetworkGateways API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: A list of VirtualNetworkGateway resources that exists in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway] + :ivar next_link: The URL to get the next set of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkGateway]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkGateway"]] = None, + **kwargs + ): + super(VirtualNetworkGatewayListResult, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class VirtualNetworkGatewayNatRule(SubResource): + """VirtualNetworkGatewayNatRule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: The provisioning state of the NAT Rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param type_properties_type: The type of NAT rule for VPN NAT. Possible values include: + "Static", "Dynamic". + :type type_properties_type: str or ~azure.mgmt.network.v2021_05_01.models.VpnNatRuleType + :param mode: The Source NAT direction of a VPN NAT. Possible values include: "EgressSnat", + "IngressSnat". + :type mode: str or ~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMode + :param internal_mappings: The private IP address internal mapping for NAT. + :type internal_mappings: list[~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMapping] + :param external_mappings: The private IP address external mapping for NAT. + :type external_mappings: list[~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMapping] + :param ip_configuration_id: The IP Configuration ID this NAT rule applies to. + :type ip_configuration_id: str + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'internal_mappings': {'key': 'properties.internalMappings', 'type': '[VpnNatRuleMapping]'}, + 'external_mappings': {'key': 'properties.externalMappings', 'type': '[VpnNatRuleMapping]'}, + 'ip_configuration_id': {'key': 'properties.ipConfigurationId', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type_properties_type: Optional[Union[str, "VpnNatRuleType"]] = None, + mode: Optional[Union[str, "VpnNatRuleMode"]] = None, + internal_mappings: Optional[List["VpnNatRuleMapping"]] = None, + external_mappings: Optional[List["VpnNatRuleMapping"]] = None, + ip_configuration_id: Optional[str] = None, + **kwargs + ): + super(VirtualNetworkGatewayNatRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.provisioning_state = None + self.type_properties_type = type_properties_type + self.mode = mode + self.internal_mappings = internal_mappings + self.external_mappings = external_mappings + self.ip_configuration_id = ip_configuration_id + + +class VirtualNetworkGatewaySku(msrest.serialization.Model): + """VirtualNetworkGatewaySku details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: Gateway SKU name. Possible values include: "Basic", "HighPerformance", "Standard", + "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3", "VpnGw4", "VpnGw5", "VpnGw1AZ", "VpnGw2AZ", + "VpnGw3AZ", "VpnGw4AZ", "VpnGw5AZ", "ErGw1AZ", "ErGw2AZ", "ErGw3AZ". + :type name: str or ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewaySkuName + :param tier: Gateway SKU tier. Possible values include: "Basic", "HighPerformance", "Standard", + "UltraPerformance", "VpnGw1", "VpnGw2", "VpnGw3", "VpnGw4", "VpnGw5", "VpnGw1AZ", "VpnGw2AZ", + "VpnGw3AZ", "VpnGw4AZ", "VpnGw5AZ", "ErGw1AZ", "ErGw2AZ", "ErGw3AZ". + :type tier: str or ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewaySkuTier + :ivar capacity: The capacity. + :vartype capacity: int + """ + + _validation = { + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'capacity': {'key': 'capacity', 'type': 'int'}, + } + + def __init__( + self, + *, + name: Optional[Union[str, "VirtualNetworkGatewaySkuName"]] = None, + tier: Optional[Union[str, "VirtualNetworkGatewaySkuTier"]] = None, + **kwargs + ): + super(VirtualNetworkGatewaySku, self).__init__(**kwargs) + self.name = name + self.tier = tier + self.capacity = None + + +class VirtualNetworkListResult(msrest.serialization.Model): + """Response for the ListVirtualNetworks API service call. + + :param value: A list of VirtualNetwork resources in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetwork] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetwork]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetwork"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(VirtualNetworkListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualNetworkListUsageResult(msrest.serialization.Model): + """Response for the virtual networks GetUsage API service call. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: VirtualNetwork usage stats. + :vartype value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkUsage] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkUsage]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + super(VirtualNetworkListUsageResult, self).__init__(**kwargs) + self.value = None + self.next_link = next_link + + +class VirtualNetworkPeering(SubResource): + """Peerings in a virtual network resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param type: Resource type. + :type type: str + :param allow_virtual_network_access: Whether the VMs in the local virtual network space would + be able to access the VMs in remote virtual network space. + :type allow_virtual_network_access: bool + :param allow_forwarded_traffic: Whether the forwarded traffic from the VMs in the local virtual + network will be allowed/disallowed in remote virtual network. + :type allow_forwarded_traffic: bool + :param allow_gateway_transit: If gateway links can be used in remote virtual networking to link + to this virtual network. + :type allow_gateway_transit: bool + :param use_remote_gateways: If remote gateways can be used on this virtual network. If the flag + is set to true, and allowGatewayTransit on remote peering is also true, virtual network will + use gateways of remote virtual network for transit. Only one peering can have this flag set to + true. This flag cannot be set if virtual network already has a gateway. + :type use_remote_gateways: bool + :param remote_virtual_network: The reference to the remote virtual network. The remote virtual + network can be in the same or different region (preview). See here to register for the preview + and learn more + (https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-create-peering). + :type remote_virtual_network: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param remote_address_space: The reference to the address space peered with the remote virtual + network. + :type remote_address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param remote_virtual_network_address_space: The reference to the current address space of the + remote virtual network. + :type remote_virtual_network_address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param remote_bgp_communities: The reference to the remote virtual network's Bgp Communities. + :type remote_bgp_communities: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkBgpCommunities + :ivar remote_virtual_network_encryption: The reference to the remote virtual network's + encryption. + :vartype remote_virtual_network_encryption: + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkEncryption + :param peering_state: The status of the virtual network peering. Possible values include: + "Initiated", "Connected", "Disconnected". + :type peering_state: str or ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeeringState + :param peering_sync_level: The peering sync status of the virtual network peering. Possible + values include: "FullyInSync", "RemoteNotInSync", "LocalNotInSync", "LocalAndRemoteNotInSync". + :type peering_sync_level: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeeringLevel + :ivar provisioning_state: The provisioning state of the virtual network peering resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param do_not_verify_remote_gateways: If we need to verify the provisioning state of the remote + gateway. + :type do_not_verify_remote_gateways: bool + :ivar resource_guid: The resourceGuid property of the Virtual Network peering resource. + :vartype resource_guid: str + """ + + _validation = { + 'etag': {'readonly': True}, + 'remote_virtual_network_encryption': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_guid': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'allow_virtual_network_access': {'key': 'properties.allowVirtualNetworkAccess', 'type': 'bool'}, + 'allow_forwarded_traffic': {'key': 'properties.allowForwardedTraffic', 'type': 'bool'}, + 'allow_gateway_transit': {'key': 'properties.allowGatewayTransit', 'type': 'bool'}, + 'use_remote_gateways': {'key': 'properties.useRemoteGateways', 'type': 'bool'}, + 'remote_virtual_network': {'key': 'properties.remoteVirtualNetwork', 'type': 'SubResource'}, + 'remote_address_space': {'key': 'properties.remoteAddressSpace', 'type': 'AddressSpace'}, + 'remote_virtual_network_address_space': {'key': 'properties.remoteVirtualNetworkAddressSpace', 'type': 'AddressSpace'}, + 'remote_bgp_communities': {'key': 'properties.remoteBgpCommunities', 'type': 'VirtualNetworkBgpCommunities'}, + 'remote_virtual_network_encryption': {'key': 'properties.remoteVirtualNetworkEncryption', 'type': 'VirtualNetworkEncryption'}, + 'peering_state': {'key': 'properties.peeringState', 'type': 'str'}, + 'peering_sync_level': {'key': 'properties.peeringSyncLevel', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'do_not_verify_remote_gateways': {'key': 'properties.doNotVerifyRemoteGateways', 'type': 'bool'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type: Optional[str] = None, + allow_virtual_network_access: Optional[bool] = None, + allow_forwarded_traffic: Optional[bool] = None, + allow_gateway_transit: Optional[bool] = None, + use_remote_gateways: Optional[bool] = None, + remote_virtual_network: Optional["SubResource"] = None, + remote_address_space: Optional["AddressSpace"] = None, + remote_virtual_network_address_space: Optional["AddressSpace"] = None, + remote_bgp_communities: Optional["VirtualNetworkBgpCommunities"] = None, + peering_state: Optional[Union[str, "VirtualNetworkPeeringState"]] = None, + peering_sync_level: Optional[Union[str, "VirtualNetworkPeeringLevel"]] = None, + do_not_verify_remote_gateways: Optional[bool] = None, + **kwargs + ): + super(VirtualNetworkPeering, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = type + self.allow_virtual_network_access = allow_virtual_network_access + self.allow_forwarded_traffic = allow_forwarded_traffic + self.allow_gateway_transit = allow_gateway_transit + self.use_remote_gateways = use_remote_gateways + self.remote_virtual_network = remote_virtual_network + self.remote_address_space = remote_address_space + self.remote_virtual_network_address_space = remote_virtual_network_address_space + self.remote_bgp_communities = remote_bgp_communities + self.remote_virtual_network_encryption = None + self.peering_state = peering_state + self.peering_sync_level = peering_sync_level + self.provisioning_state = None + self.do_not_verify_remote_gateways = do_not_verify_remote_gateways + self.resource_guid = None + + +class VirtualNetworkPeeringListResult(msrest.serialization.Model): + """Response for ListSubnets API service call. Retrieves all subnets that belong to a virtual network. + + :param value: The peerings in a virtual network. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkPeering"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(VirtualNetworkPeeringListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualNetworkTap(Resource): + """Virtual Network Tap resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar network_interface_tap_configurations: Specifies the list of resource IDs for the network + interface IP configuration that needs to be tapped. + :vartype network_interface_tap_configurations: + list[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration] + :ivar resource_guid: The resource GUID property of the virtual network tap resource. + :vartype resource_guid: str + :ivar provisioning_state: The provisioning state of the virtual network tap resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param destination_network_interface_ip_configuration: The reference to the private IP Address + of the collector nic that will receive the tap. + :type destination_network_interface_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration + :param destination_load_balancer_front_end_ip_configuration: The reference to the private IP + address on the internal Load Balancer that will receive the tap. + :type destination_load_balancer_front_end_ip_configuration: + ~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration + :param destination_port: The VXLAN destination port that will receive the tapped traffic. + :type destination_port: int + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'network_interface_tap_configurations': {'readonly': True}, + 'resource_guid': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'network_interface_tap_configurations': {'key': 'properties.networkInterfaceTapConfigurations', 'type': '[NetworkInterfaceTapConfiguration]'}, + 'resource_guid': {'key': 'properties.resourceGuid', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'destination_network_interface_ip_configuration': {'key': 'properties.destinationNetworkInterfaceIPConfiguration', 'type': 'NetworkInterfaceIPConfiguration'}, + 'destination_load_balancer_front_end_ip_configuration': {'key': 'properties.destinationLoadBalancerFrontEndIPConfiguration', 'type': 'FrontendIPConfiguration'}, + 'destination_port': {'key': 'properties.destinationPort', 'type': 'int'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + destination_network_interface_ip_configuration: Optional["NetworkInterfaceIPConfiguration"] = None, + destination_load_balancer_front_end_ip_configuration: Optional["FrontendIPConfiguration"] = None, + destination_port: Optional[int] = None, + **kwargs + ): + super(VirtualNetworkTap, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.network_interface_tap_configurations = None + self.resource_guid = None + self.provisioning_state = None + self.destination_network_interface_ip_configuration = destination_network_interface_ip_configuration + self.destination_load_balancer_front_end_ip_configuration = destination_load_balancer_front_end_ip_configuration + self.destination_port = destination_port + + +class VirtualNetworkTapListResult(msrest.serialization.Model): + """Response for ListVirtualNetworkTap API service call. + + :param value: A list of VirtualNetworkTaps in a resource group. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap] + :param next_link: The URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualNetworkTap]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualNetworkTap"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(VirtualNetworkTapListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualNetworkUsage(msrest.serialization.Model): + """Usage details for subnet. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar current_value: Indicates number of IPs used from the Subnet. + :vartype current_value: float + :ivar id: Subnet identifier. + :vartype id: str + :ivar limit: Indicates the size of the subnet. + :vartype limit: float + :ivar name: The name containing common and localized value for usage. + :vartype name: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkUsageName + :ivar unit: Usage units. Returns 'Count'. + :vartype unit: str + """ + + _validation = { + 'current_value': {'readonly': True}, + 'id': {'readonly': True}, + 'limit': {'readonly': True}, + 'name': {'readonly': True}, + 'unit': {'readonly': True}, + } + + _attribute_map = { + 'current_value': {'key': 'currentValue', 'type': 'float'}, + 'id': {'key': 'id', 'type': 'str'}, + 'limit': {'key': 'limit', 'type': 'float'}, + 'name': {'key': 'name', 'type': 'VirtualNetworkUsageName'}, + 'unit': {'key': 'unit', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkUsage, self).__init__(**kwargs) + self.current_value = None + self.id = None + self.limit = None + self.name = None + self.unit = None + + +class VirtualNetworkUsageName(msrest.serialization.Model): + """Usage strings container. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar localized_value: Localized subnet size and usage string. + :vartype localized_value: str + :ivar value: Subnet size and usage string. + :vartype value: str + """ + + _validation = { + 'localized_value': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VirtualNetworkUsageName, self).__init__(**kwargs) + self.localized_value = None + self.value = None + + +class VirtualRouter(Resource): + """VirtualRouter Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param virtual_router_asn: VirtualRouter ASN. + :type virtual_router_asn: long + :param virtual_router_ips: VirtualRouter IPs. + :type virtual_router_ips: list[str] + :param hosted_subnet: The Subnet on which VirtualRouter is hosted. + :type hosted_subnet: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param hosted_gateway: The Gateway on which VirtualRouter is hosted. + :type hosted_gateway: ~azure.mgmt.network.v2021_05_01.models.SubResource + :ivar peerings: List of references to VirtualRouterPeerings. + :vartype peerings: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_router_asn': {'maximum': 4294967295, 'minimum': 0}, + 'peerings': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_router_asn': {'key': 'properties.virtualRouterAsn', 'type': 'long'}, + 'virtual_router_ips': {'key': 'properties.virtualRouterIps', 'type': '[str]'}, + 'hosted_subnet': {'key': 'properties.hostedSubnet', 'type': 'SubResource'}, + 'hosted_gateway': {'key': 'properties.hostedGateway', 'type': 'SubResource'}, + 'peerings': {'key': 'properties.peerings', 'type': '[SubResource]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_router_asn: Optional[int] = None, + virtual_router_ips: Optional[List[str]] = None, + hosted_subnet: Optional["SubResource"] = None, + hosted_gateway: Optional["SubResource"] = None, + **kwargs + ): + super(VirtualRouter, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.virtual_router_asn = virtual_router_asn + self.virtual_router_ips = virtual_router_ips + self.hosted_subnet = hosted_subnet + self.hosted_gateway = hosted_gateway + self.peerings = None + self.provisioning_state = None + + +class VirtualRouterListResult(msrest.serialization.Model): + """Response for ListVirtualRouters API service call. + + :param value: List of Virtual Routers. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualRouter] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualRouter]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualRouter"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(VirtualRouterListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualRouterPeering(SubResource): + """Virtual Router Peering resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: Name of the virtual router peering that is unique within a virtual router. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Peering type. + :vartype type: str + :param peer_asn: Peer ASN. + :type peer_asn: long + :param peer_ip: Peer IP. + :type peer_ip: str + :ivar provisioning_state: The provisioning state of the resource. Possible values include: + "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'peer_asn': {'maximum': 4294967295, 'minimum': 0}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'peer_asn': {'key': 'properties.peerAsn', 'type': 'long'}, + 'peer_ip': {'key': 'properties.peerIp', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + peer_asn: Optional[int] = None, + peer_ip: Optional[str] = None, + **kwargs + ): + super(VirtualRouterPeering, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.peer_asn = peer_asn + self.peer_ip = peer_ip + self.provisioning_state = None + + +class VirtualRouterPeeringListResult(msrest.serialization.Model): + """Response for ListVirtualRouterPeerings API service call. + + :param value: List of VirtualRouterPeerings in a VirtualRouter. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeering] + :param next_link: URL to get the next set of results. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VirtualRouterPeering]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["VirtualRouterPeering"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(VirtualRouterPeeringListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class VirtualWAN(Resource): + """VirtualWAN Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param disable_vpn_encryption: Vpn encryption to be disabled or not. + :type disable_vpn_encryption: bool + :ivar virtual_hubs: List of VirtualHubs in the VirtualWAN. + :vartype virtual_hubs: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar vpn_sites: List of VpnSites in the VirtualWAN. + :vartype vpn_sites: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param allow_branch_to_branch_traffic: True if branch to branch traffic is allowed. + :type allow_branch_to_branch_traffic: bool + :param allow_vnet_to_vnet_traffic: True if Vnet to Vnet traffic is allowed. + :type allow_vnet_to_vnet_traffic: bool + :ivar office365_local_breakout_category: The office local breakout category. Possible values + include: "Optimize", "OptimizeAndAllow", "All", "None". + :vartype office365_local_breakout_category: str or + ~azure.mgmt.network.v2021_05_01.models.OfficeTrafficCategory + :ivar provisioning_state: The provisioning state of the virtual WAN resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param type_properties_type: The type of the VirtualWAN. + :type type_properties_type: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'virtual_hubs': {'readonly': True}, + 'vpn_sites': {'readonly': True}, + 'office365_local_breakout_category': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'disable_vpn_encryption': {'key': 'properties.disableVpnEncryption', 'type': 'bool'}, + 'virtual_hubs': {'key': 'properties.virtualHubs', 'type': '[SubResource]'}, + 'vpn_sites': {'key': 'properties.vpnSites', 'type': '[SubResource]'}, + 'allow_branch_to_branch_traffic': {'key': 'properties.allowBranchToBranchTraffic', 'type': 'bool'}, + 'allow_vnet_to_vnet_traffic': {'key': 'properties.allowVnetToVnetTraffic', 'type': 'bool'}, + 'office365_local_breakout_category': {'key': 'properties.office365LocalBreakoutCategory', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + disable_vpn_encryption: Optional[bool] = None, + allow_branch_to_branch_traffic: Optional[bool] = None, + allow_vnet_to_vnet_traffic: Optional[bool] = None, + type_properties_type: Optional[str] = None, + **kwargs + ): + super(VirtualWAN, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.disable_vpn_encryption = disable_vpn_encryption + self.virtual_hubs = None + self.vpn_sites = None + self.allow_branch_to_branch_traffic = allow_branch_to_branch_traffic + self.allow_vnet_to_vnet_traffic = allow_vnet_to_vnet_traffic + self.office365_local_breakout_category = None + self.provisioning_state = None + self.type_properties_type = type_properties_type + + +class VirtualWanSecurityProvider(msrest.serialization.Model): + """Collection of SecurityProviders. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param name: Name of the security provider. + :type name: str + :param url: Url of the security provider. + :type url: str + :ivar type: Name of the security provider. Possible values include: "External", "Native". + :vartype type: str or ~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProviderType + """ + + _validation = { + 'type': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + url: Optional[str] = None, + **kwargs + ): + super(VirtualWanSecurityProvider, self).__init__(**kwargs) + self.name = name + self.url = url + self.type = None + + +class VirtualWanSecurityProviders(msrest.serialization.Model): + """Collection of SecurityProviders. + + :param supported_providers: List of VirtualWAN security providers. + :type supported_providers: + list[~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProvider] + """ + + _attribute_map = { + 'supported_providers': {'key': 'supportedProviders', 'type': '[VirtualWanSecurityProvider]'}, + } + + def __init__( + self, + *, + supported_providers: Optional[List["VirtualWanSecurityProvider"]] = None, + **kwargs + ): + super(VirtualWanSecurityProviders, self).__init__(**kwargs) + self.supported_providers = supported_providers + + +class VirtualWanVpnProfileParameters(msrest.serialization.Model): + """Virtual Wan Vpn profile parameters Vpn profile generation. + + :param vpn_server_configuration_resource_id: VpnServerConfiguration partial resource uri with + which VirtualWan is associated to. + :type vpn_server_configuration_resource_id: str + :param authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :type authentication_method: str or ~azure.mgmt.network.v2021_05_01.models.AuthenticationMethod + """ + + _attribute_map = { + 'vpn_server_configuration_resource_id': {'key': 'vpnServerConfigurationResourceId', 'type': 'str'}, + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + } + + def __init__( + self, + *, + vpn_server_configuration_resource_id: Optional[str] = None, + authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, + **kwargs + ): + super(VirtualWanVpnProfileParameters, self).__init__(**kwargs) + self.vpn_server_configuration_resource_id = vpn_server_configuration_resource_id + self.authentication_method = authentication_method + + +class VM(Resource): + """Describes a Virtual Machine. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(VM, self).__init__(id=id, location=location, tags=tags, **kwargs) + + +class VnetRoute(msrest.serialization.Model): + """List of routes that control routing from VirtualHub into a virtual network connection. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param static_routes: List of all Static Routes. + :type static_routes: list[~azure.mgmt.network.v2021_05_01.models.StaticRoute] + :ivar bgp_connections: The list of references to HubBgpConnection objects. + :vartype bgp_connections: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'bgp_connections': {'readonly': True}, + } + + _attribute_map = { + 'static_routes': {'key': 'staticRoutes', 'type': '[StaticRoute]'}, + 'bgp_connections': {'key': 'bgpConnections', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + static_routes: Optional[List["StaticRoute"]] = None, + **kwargs + ): + super(VnetRoute, self).__init__(**kwargs) + self.static_routes = static_routes + self.bgp_connections = None + + +class VpnClientConfiguration(msrest.serialization.Model): + """VpnClientConfiguration for P2S client. + + :param vpn_client_address_pool: The reference to the address space resource which represents + Address space for P2S VpnClient. + :type vpn_client_address_pool: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param vpn_client_root_certificates: VpnClientRootCertificate for virtual network gateway. + :type vpn_client_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnClientRootCertificate] + :param vpn_client_revoked_certificates: VpnClientRevokedCertificate for Virtual network + gateway. + :type vpn_client_revoked_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnClientRevokedCertificate] + :param vpn_client_protocols: VpnClientProtocols for Virtual network gateway. + :type vpn_client_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.VpnClientProtocol] + :param vpn_authentication_types: VPN authentication types for the virtual network gateway.. + :type vpn_authentication_types: list[str or + ~azure.mgmt.network.v2021_05_01.models.VpnAuthenticationType] + :param vpn_client_ipsec_policies: VpnClientIpsecPolicies for virtual network gateway P2S + client. + :type vpn_client_ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param radius_server_address: The radius server address property of the VirtualNetworkGateway + resource for vpn client connection. + :type radius_server_address: str + :param radius_server_secret: The radius secret property of the VirtualNetworkGateway resource + for vpn client connection. + :type radius_server_secret: str + :param radius_servers: The radiusServers property for multiple radius server configuration. + :type radius_servers: list[~azure.mgmt.network.v2021_05_01.models.RadiusServer] + :param aad_tenant: The AADTenant property of the VirtualNetworkGateway resource for vpn client + connection used for AAD authentication. + :type aad_tenant: str + :param aad_audience: The AADAudience property of the VirtualNetworkGateway resource for vpn + client connection used for AAD authentication. + :type aad_audience: str + :param aad_issuer: The AADIssuer property of the VirtualNetworkGateway resource for vpn client + connection used for AAD authentication. + :type aad_issuer: str + """ + + _attribute_map = { + 'vpn_client_address_pool': {'key': 'vpnClientAddressPool', 'type': 'AddressSpace'}, + 'vpn_client_root_certificates': {'key': 'vpnClientRootCertificates', 'type': '[VpnClientRootCertificate]'}, + 'vpn_client_revoked_certificates': {'key': 'vpnClientRevokedCertificates', 'type': '[VpnClientRevokedCertificate]'}, + 'vpn_client_protocols': {'key': 'vpnClientProtocols', 'type': '[str]'}, + 'vpn_authentication_types': {'key': 'vpnAuthenticationTypes', 'type': '[str]'}, + 'vpn_client_ipsec_policies': {'key': 'vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, + 'radius_server_address': {'key': 'radiusServerAddress', 'type': 'str'}, + 'radius_server_secret': {'key': 'radiusServerSecret', 'type': 'str'}, + 'radius_servers': {'key': 'radiusServers', 'type': '[RadiusServer]'}, + 'aad_tenant': {'key': 'aadTenant', 'type': 'str'}, + 'aad_audience': {'key': 'aadAudience', 'type': 'str'}, + 'aad_issuer': {'key': 'aadIssuer', 'type': 'str'}, + } + + def __init__( + self, + *, + vpn_client_address_pool: Optional["AddressSpace"] = None, + vpn_client_root_certificates: Optional[List["VpnClientRootCertificate"]] = None, + vpn_client_revoked_certificates: Optional[List["VpnClientRevokedCertificate"]] = None, + vpn_client_protocols: Optional[List[Union[str, "VpnClientProtocol"]]] = None, + vpn_authentication_types: Optional[List[Union[str, "VpnAuthenticationType"]]] = None, + vpn_client_ipsec_policies: Optional[List["IpsecPolicy"]] = None, + radius_server_address: Optional[str] = None, + radius_server_secret: Optional[str] = None, + radius_servers: Optional[List["RadiusServer"]] = None, + aad_tenant: Optional[str] = None, + aad_audience: Optional[str] = None, + aad_issuer: Optional[str] = None, + **kwargs + ): + super(VpnClientConfiguration, self).__init__(**kwargs) + self.vpn_client_address_pool = vpn_client_address_pool + self.vpn_client_root_certificates = vpn_client_root_certificates + self.vpn_client_revoked_certificates = vpn_client_revoked_certificates + self.vpn_client_protocols = vpn_client_protocols + self.vpn_authentication_types = vpn_authentication_types + self.vpn_client_ipsec_policies = vpn_client_ipsec_policies + self.radius_server_address = radius_server_address + self.radius_server_secret = radius_server_secret + self.radius_servers = radius_servers + self.aad_tenant = aad_tenant + self.aad_audience = aad_audience + self.aad_issuer = aad_issuer + + +class VpnClientConnectionHealth(msrest.serialization.Model): + """VpnClientConnectionHealth properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar total_ingress_bytes_transferred: Total of the Ingress Bytes Transferred in this P2S Vpn + connection. + :vartype total_ingress_bytes_transferred: long + :ivar total_egress_bytes_transferred: Total of the Egress Bytes Transferred in this connection. + :vartype total_egress_bytes_transferred: long + :param vpn_client_connections_count: The total of p2s vpn clients connected at this time to + this P2SVpnGateway. + :type vpn_client_connections_count: int + :param allocated_ip_addresses: List of allocated ip addresses to the connected p2s vpn clients. + :type allocated_ip_addresses: list[str] + """ + + _validation = { + 'total_ingress_bytes_transferred': {'readonly': True}, + 'total_egress_bytes_transferred': {'readonly': True}, + } + + _attribute_map = { + 'total_ingress_bytes_transferred': {'key': 'totalIngressBytesTransferred', 'type': 'long'}, + 'total_egress_bytes_transferred': {'key': 'totalEgressBytesTransferred', 'type': 'long'}, + 'vpn_client_connections_count': {'key': 'vpnClientConnectionsCount', 'type': 'int'}, + 'allocated_ip_addresses': {'key': 'allocatedIpAddresses', 'type': '[str]'}, + } + + def __init__( + self, + *, + vpn_client_connections_count: Optional[int] = None, + allocated_ip_addresses: Optional[List[str]] = None, + **kwargs + ): + super(VpnClientConnectionHealth, self).__init__(**kwargs) + self.total_ingress_bytes_transferred = None + self.total_egress_bytes_transferred = None + self.vpn_client_connections_count = vpn_client_connections_count + self.allocated_ip_addresses = allocated_ip_addresses + + +class VpnClientConnectionHealthDetail(msrest.serialization.Model): + """VPN client connection health detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vpn_connection_id: The vpn client Id. + :vartype vpn_connection_id: str + :ivar vpn_connection_duration: The duration time of a connected vpn client. + :vartype vpn_connection_duration: long + :ivar vpn_connection_time: The start time of a connected vpn client. + :vartype vpn_connection_time: str + :ivar public_ip_address: The public Ip of a connected vpn client. + :vartype public_ip_address: str + :ivar private_ip_address: The assigned private Ip of a connected vpn client. + :vartype private_ip_address: str + :ivar vpn_user_name: The user name of a connected vpn client. + :vartype vpn_user_name: str + :ivar max_bandwidth: The max band width. + :vartype max_bandwidth: long + :ivar egress_packets_transferred: The egress packets per second. + :vartype egress_packets_transferred: long + :ivar egress_bytes_transferred: The egress bytes per second. + :vartype egress_bytes_transferred: long + :ivar ingress_packets_transferred: The ingress packets per second. + :vartype ingress_packets_transferred: long + :ivar ingress_bytes_transferred: The ingress bytes per second. + :vartype ingress_bytes_transferred: long + :ivar max_packets_per_second: The max packets transferred per second. + :vartype max_packets_per_second: long + """ + + _validation = { + 'vpn_connection_id': {'readonly': True}, + 'vpn_connection_duration': {'readonly': True}, + 'vpn_connection_time': {'readonly': True}, + 'public_ip_address': {'readonly': True}, + 'private_ip_address': {'readonly': True}, + 'vpn_user_name': {'readonly': True}, + 'max_bandwidth': {'readonly': True}, + 'egress_packets_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'ingress_packets_transferred': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'max_packets_per_second': {'readonly': True}, + } + + _attribute_map = { + 'vpn_connection_id': {'key': 'vpnConnectionId', 'type': 'str'}, + 'vpn_connection_duration': {'key': 'vpnConnectionDuration', 'type': 'long'}, + 'vpn_connection_time': {'key': 'vpnConnectionTime', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + 'vpn_user_name': {'key': 'vpnUserName', 'type': 'str'}, + 'max_bandwidth': {'key': 'maxBandwidth', 'type': 'long'}, + 'egress_packets_transferred': {'key': 'egressPacketsTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'egressBytesTransferred', 'type': 'long'}, + 'ingress_packets_transferred': {'key': 'ingressPacketsTransferred', 'type': 'long'}, + 'ingress_bytes_transferred': {'key': 'ingressBytesTransferred', 'type': 'long'}, + 'max_packets_per_second': {'key': 'maxPacketsPerSecond', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnClientConnectionHealthDetail, self).__init__(**kwargs) + self.vpn_connection_id = None + self.vpn_connection_duration = None + self.vpn_connection_time = None + self.public_ip_address = None + self.private_ip_address = None + self.vpn_user_name = None + self.max_bandwidth = None + self.egress_packets_transferred = None + self.egress_bytes_transferred = None + self.ingress_packets_transferred = None + self.ingress_bytes_transferred = None + self.max_packets_per_second = None + + +class VpnClientConnectionHealthDetailListResult(msrest.serialization.Model): + """List of virtual network gateway vpn client connection health. + + :param value: List of vpn client connection health. + :type value: list[~azure.mgmt.network.v2021_05_01.models.VpnClientConnectionHealthDetail] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VpnClientConnectionHealthDetail]'}, + } + + def __init__( + self, + *, + value: Optional[List["VpnClientConnectionHealthDetail"]] = None, + **kwargs + ): + super(VpnClientConnectionHealthDetailListResult, self).__init__(**kwargs) + self.value = value + + +class VpnClientIPsecParameters(msrest.serialization.Model): + """An IPSec parameters for a virtual network gateway P2S connection. + + All required parameters must be populated in order to send to Azure. + + :param sa_life_time_seconds: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) lifetime in seconds for P2S client. + :type sa_life_time_seconds: int + :param sa_data_size_kilobytes: Required. The IPSec Security Association (also called Quick Mode + or Phase 2 SA) payload size in KB for P2S client.. + :type sa_data_size_kilobytes: int + :param ipsec_encryption: Required. The IPSec encryption algorithm (IKE phase 1). Possible + values include: "None", "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES128", "GCMAES192", + "GCMAES256". + :type ipsec_encryption: str or ~azure.mgmt.network.v2021_05_01.models.IpsecEncryption + :param ipsec_integrity: Required. The IPSec integrity algorithm (IKE phase 1). Possible values + include: "MD5", "SHA1", "SHA256", "GCMAES128", "GCMAES192", "GCMAES256". + :type ipsec_integrity: str or ~azure.mgmt.network.v2021_05_01.models.IpsecIntegrity + :param ike_encryption: Required. The IKE encryption algorithm (IKE phase 2). Possible values + include: "DES", "DES3", "AES128", "AES192", "AES256", "GCMAES256", "GCMAES128". + :type ike_encryption: str or ~azure.mgmt.network.v2021_05_01.models.IkeEncryption + :param ike_integrity: Required. The IKE integrity algorithm (IKE phase 2). Possible values + include: "MD5", "SHA1", "SHA256", "SHA384", "GCMAES256", "GCMAES128". + :type ike_integrity: str or ~azure.mgmt.network.v2021_05_01.models.IkeIntegrity + :param dh_group: Required. The DH Group used in IKE Phase 1 for initial SA. Possible values + include: "None", "DHGroup1", "DHGroup2", "DHGroup14", "DHGroup2048", "ECP256", "ECP384", + "DHGroup24". + :type dh_group: str or ~azure.mgmt.network.v2021_05_01.models.DhGroup + :param pfs_group: Required. The Pfs Group used in IKE Phase 2 for new child SA. Possible values + include: "None", "PFS1", "PFS2", "PFS2048", "ECP256", "ECP384", "PFS24", "PFS14", "PFSMM". + :type pfs_group: str or ~azure.mgmt.network.v2021_05_01.models.PfsGroup + """ + + _validation = { + 'sa_life_time_seconds': {'required': True}, + 'sa_data_size_kilobytes': {'required': True}, + 'ipsec_encryption': {'required': True}, + 'ipsec_integrity': {'required': True}, + 'ike_encryption': {'required': True}, + 'ike_integrity': {'required': True}, + 'dh_group': {'required': True}, + 'pfs_group': {'required': True}, + } + + _attribute_map = { + 'sa_life_time_seconds': {'key': 'saLifeTimeSeconds', 'type': 'int'}, + 'sa_data_size_kilobytes': {'key': 'saDataSizeKilobytes', 'type': 'int'}, + 'ipsec_encryption': {'key': 'ipsecEncryption', 'type': 'str'}, + 'ipsec_integrity': {'key': 'ipsecIntegrity', 'type': 'str'}, + 'ike_encryption': {'key': 'ikeEncryption', 'type': 'str'}, + 'ike_integrity': {'key': 'ikeIntegrity', 'type': 'str'}, + 'dh_group': {'key': 'dhGroup', 'type': 'str'}, + 'pfs_group': {'key': 'pfsGroup', 'type': 'str'}, + } + + def __init__( + self, + *, + sa_life_time_seconds: int, + sa_data_size_kilobytes: int, + ipsec_encryption: Union[str, "IpsecEncryption"], + ipsec_integrity: Union[str, "IpsecIntegrity"], + ike_encryption: Union[str, "IkeEncryption"], + ike_integrity: Union[str, "IkeIntegrity"], + dh_group: Union[str, "DhGroup"], + pfs_group: Union[str, "PfsGroup"], + **kwargs + ): + super(VpnClientIPsecParameters, self).__init__(**kwargs) + self.sa_life_time_seconds = sa_life_time_seconds + self.sa_data_size_kilobytes = sa_data_size_kilobytes + self.ipsec_encryption = ipsec_encryption + self.ipsec_integrity = ipsec_integrity + self.ike_encryption = ike_encryption + self.ike_integrity = ike_integrity + self.dh_group = dh_group + self.pfs_group = pfs_group + + +class VpnClientParameters(msrest.serialization.Model): + """Vpn Client Parameters for package generation. + + :param processor_architecture: VPN client Processor Architecture. Possible values include: + "Amd64", "X86". + :type processor_architecture: str or + ~azure.mgmt.network.v2021_05_01.models.ProcessorArchitecture + :param authentication_method: VPN client authentication method. Possible values include: + "EAPTLS", "EAPMSCHAPv2". + :type authentication_method: str or ~azure.mgmt.network.v2021_05_01.models.AuthenticationMethod + :param radius_server_auth_certificate: The public certificate data for the radius server + authentication certificate as a Base-64 encoded string. Required only if external radius + authentication has been configured with EAPTLS authentication. + :type radius_server_auth_certificate: str + :param client_root_certificates: A list of client root certificates public certificate data + encoded as Base-64 strings. Optional parameter for external radius based authentication with + EAPTLS. + :type client_root_certificates: list[str] + """ + + _attribute_map = { + 'processor_architecture': {'key': 'processorArchitecture', 'type': 'str'}, + 'authentication_method': {'key': 'authenticationMethod', 'type': 'str'}, + 'radius_server_auth_certificate': {'key': 'radiusServerAuthCertificate', 'type': 'str'}, + 'client_root_certificates': {'key': 'clientRootCertificates', 'type': '[str]'}, + } + + def __init__( + self, + *, + processor_architecture: Optional[Union[str, "ProcessorArchitecture"]] = None, + authentication_method: Optional[Union[str, "AuthenticationMethod"]] = None, + radius_server_auth_certificate: Optional[str] = None, + client_root_certificates: Optional[List[str]] = None, + **kwargs + ): + super(VpnClientParameters, self).__init__(**kwargs) + self.processor_architecture = processor_architecture + self.authentication_method = authentication_method + self.radius_server_auth_certificate = radius_server_auth_certificate + self.client_root_certificates = client_root_certificates + + +class VpnClientRevokedCertificate(SubResource): + """VPN client revoked certificate of virtual network gateway. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param thumbprint: The revoked VPN client certificate thumbprint. + :type thumbprint: str + :ivar provisioning_state: The provisioning state of the VPN client revoked certificate + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + thumbprint: Optional[str] = None, + **kwargs + ): + super(VpnClientRevokedCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.thumbprint = thumbprint + self.provisioning_state = None + + +class VpnClientRootCertificate(SubResource): + """VPN client root certificate of virtual network gateway. + + 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 id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param public_cert_data: Required. The certificate public data. + :type public_cert_data: str + :ivar provisioning_state: The provisioning state of the VPN client root certificate resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'public_cert_data': {'required': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'public_cert_data': {'key': 'properties.publicCertData', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + public_cert_data: str, + id: Optional[str] = None, + name: Optional[str] = None, + **kwargs + ): + super(VpnClientRootCertificate, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.public_cert_data = public_cert_data + self.provisioning_state = None + + +class VpnConnection(SubResource): + """VpnConnection Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param remote_vpn_site: Id of the connected vpn site. + :type remote_vpn_site: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param routing_weight: Routing weight for vpn connection. + :type routing_weight: int + :param dpd_timeout_seconds: DPD timeout in seconds for vpn connection. + :type dpd_timeout_seconds: int + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or ~azure.mgmt.network.v2021_05_01.models.VpnConnectionStatus + :param vpn_connection_protocol_type: Connection protocol used for this connection. Possible + values include: "IKEv2", "IKEv1". + :type vpn_connection_protocol_type: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionProtocol + :ivar ingress_bytes_transferred: Ingress bytes transferred. + :vartype ingress_bytes_transferred: long + :ivar egress_bytes_transferred: Egress bytes transferred. + :vartype egress_bytes_transferred: long + :param connection_bandwidth: Expected bandwidth in MBPS. + :type connection_bandwidth: int + :param shared_key: SharedKey for the vpn connection. + :type shared_key: str + :param enable_bgp: EnableBgp flag. + :type enable_bgp: bool + :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :type use_policy_based_traffic_selectors: bool + :param ipsec_policies: The IPSec Policies to be considered by this connection. + :type ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param traffic_selector_policies: The Traffic Selector Policies to be considered by this + connection. + :type traffic_selector_policies: + list[~azure.mgmt.network.v2021_05_01.models.TrafficSelectorPolicy] + :param enable_rate_limiting: EnableBgp flag. + :type enable_rate_limiting: bool + :param enable_internet_security: Enable internet security. + :type enable_internet_security: bool + :param use_local_azure_ip_address: Use local azure ip to initiate connection. + :type use_local_azure_ip_address: bool + :ivar provisioning_state: The provisioning state of the VPN connection resource. Possible + values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param vpn_link_connections: List of all vpn site link connections to the gateway. + :type vpn_link_connections: list[~azure.mgmt.network.v2021_05_01.models.VpnSiteLinkConnection] + :param routing_configuration: The Routing Configuration indicating the associated and + propagated route tables on this connection. + :type routing_configuration: ~azure.mgmt.network.v2021_05_01.models.RoutingConfiguration + """ + + _validation = { + 'etag': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'remote_vpn_site': {'key': 'properties.remoteVpnSite', 'type': 'SubResource'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'dpd_timeout_seconds': {'key': 'properties.dpdTimeoutSeconds', 'type': 'int'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'vpn_connection_protocol_type': {'key': 'properties.vpnConnectionProtocolType', 'type': 'str'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'connection_bandwidth': {'key': 'properties.connectionBandwidth', 'type': 'int'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'traffic_selector_policies': {'key': 'properties.trafficSelectorPolicies', 'type': '[TrafficSelectorPolicy]'}, + 'enable_rate_limiting': {'key': 'properties.enableRateLimiting', 'type': 'bool'}, + 'enable_internet_security': {'key': 'properties.enableInternetSecurity', 'type': 'bool'}, + 'use_local_azure_ip_address': {'key': 'properties.useLocalAzureIpAddress', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'vpn_link_connections': {'key': 'properties.vpnLinkConnections', 'type': '[VpnSiteLinkConnection]'}, + 'routing_configuration': {'key': 'properties.routingConfiguration', 'type': 'RoutingConfiguration'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + remote_vpn_site: Optional["SubResource"] = None, + routing_weight: Optional[int] = None, + dpd_timeout_seconds: Optional[int] = None, + vpn_connection_protocol_type: Optional[Union[str, "VirtualNetworkGatewayConnectionProtocol"]] = None, + connection_bandwidth: Optional[int] = None, + shared_key: Optional[str] = None, + enable_bgp: Optional[bool] = None, + use_policy_based_traffic_selectors: Optional[bool] = None, + ipsec_policies: Optional[List["IpsecPolicy"]] = None, + traffic_selector_policies: Optional[List["TrafficSelectorPolicy"]] = None, + enable_rate_limiting: Optional[bool] = None, + enable_internet_security: Optional[bool] = None, + use_local_azure_ip_address: Optional[bool] = None, + vpn_link_connections: Optional[List["VpnSiteLinkConnection"]] = None, + routing_configuration: Optional["RoutingConfiguration"] = None, + **kwargs + ): + super(VpnConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.remote_vpn_site = remote_vpn_site + self.routing_weight = routing_weight + self.dpd_timeout_seconds = dpd_timeout_seconds + self.connection_status = None + self.vpn_connection_protocol_type = vpn_connection_protocol_type + self.ingress_bytes_transferred = None + self.egress_bytes_transferred = None + self.connection_bandwidth = connection_bandwidth + self.shared_key = shared_key + self.enable_bgp = enable_bgp + self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors + self.ipsec_policies = ipsec_policies + self.traffic_selector_policies = traffic_selector_policies + self.enable_rate_limiting = enable_rate_limiting + self.enable_internet_security = enable_internet_security + self.use_local_azure_ip_address = use_local_azure_ip_address + self.provisioning_state = None + self.vpn_link_connections = vpn_link_connections + self.routing_configuration = routing_configuration + + +class VpnConnectionPacketCaptureStartParameters(msrest.serialization.Model): + """Vpn Connection packet capture parameters supplied to start packet capture on gateway connection. + + :param filter_data: Start Packet capture parameters on vpn connection. + :type filter_data: str + :param link_connection_names: List of site link connection names. + :type link_connection_names: list[str] + """ + + _attribute_map = { + 'filter_data': {'key': 'filterData', 'type': 'str'}, + 'link_connection_names': {'key': 'linkConnectionNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + filter_data: Optional[str] = None, + link_connection_names: Optional[List[str]] = None, + **kwargs + ): + super(VpnConnectionPacketCaptureStartParameters, self).__init__(**kwargs) + self.filter_data = filter_data + self.link_connection_names = link_connection_names + + +class VpnConnectionPacketCaptureStopParameters(msrest.serialization.Model): + """Vpn Connection packet capture parameters supplied to stop packet capture on gateway connection. + + :param sas_url: SAS url for packet capture on vpn connection. + :type sas_url: str + :param link_connection_names: List of site link connection names. + :type link_connection_names: list[str] + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + 'link_connection_names': {'key': 'linkConnectionNames', 'type': '[str]'}, + } + + def __init__( + self, + *, + sas_url: Optional[str] = None, + link_connection_names: Optional[List[str]] = None, + **kwargs + ): + super(VpnConnectionPacketCaptureStopParameters, self).__init__(**kwargs) + self.sas_url = sas_url + self.link_connection_names = link_connection_names + + +class VpnDeviceScriptParameters(msrest.serialization.Model): + """Vpn device configuration script generation parameters. + + :param vendor: The vendor for the vpn device. + :type vendor: str + :param device_family: The device family for the vpn device. + :type device_family: str + :param firmware_version: The firmware version for the vpn device. + :type firmware_version: str + """ + + _attribute_map = { + 'vendor': {'key': 'vendor', 'type': 'str'}, + 'device_family': {'key': 'deviceFamily', 'type': 'str'}, + 'firmware_version': {'key': 'firmwareVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + vendor: Optional[str] = None, + device_family: Optional[str] = None, + firmware_version: Optional[str] = None, + **kwargs + ): + super(VpnDeviceScriptParameters, self).__init__(**kwargs) + self.vendor = vendor + self.device_family = device_family + self.firmware_version = firmware_version + + +class VpnGateway(Resource): + """VpnGateway Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param virtual_hub: The VirtualHub to which the gateway belongs. + :type virtual_hub: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param connections: List of all vpn connections to the gateway. + :type connections: list[~azure.mgmt.network.v2021_05_01.models.VpnConnection] + :param bgp_settings: Local network gateway's BGP speaker settings. + :type bgp_settings: ~azure.mgmt.network.v2021_05_01.models.BgpSettings + :ivar provisioning_state: The provisioning state of the VPN gateway resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param vpn_gateway_scale_unit: The scale unit for this vpn gateway. + :type vpn_gateway_scale_unit: int + :ivar ip_configurations: List of all IPs configured on the gateway. + :vartype ip_configurations: + list[~azure.mgmt.network.v2021_05_01.models.VpnGatewayIpConfiguration] + :param enable_bgp_route_translation_for_nat: Enable BGP routes translation for NAT on this + VpnGateway. + :type enable_bgp_route_translation_for_nat: bool + :param is_routing_preference_internet: Enable Routing Preference property for the Public IP + Interface of the VpnGateway. + :type is_routing_preference_internet: bool + :param nat_rules: List of all the nat Rules associated with the gateway. + :type nat_rules: list[~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'ip_configurations': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_hub': {'key': 'properties.virtualHub', 'type': 'SubResource'}, + 'connections': {'key': 'properties.connections', 'type': '[VpnConnection]'}, + 'bgp_settings': {'key': 'properties.bgpSettings', 'type': 'BgpSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'vpn_gateway_scale_unit': {'key': 'properties.vpnGatewayScaleUnit', 'type': 'int'}, + 'ip_configurations': {'key': 'properties.ipConfigurations', 'type': '[VpnGatewayIpConfiguration]'}, + 'enable_bgp_route_translation_for_nat': {'key': 'properties.enableBgpRouteTranslationForNat', 'type': 'bool'}, + 'is_routing_preference_internet': {'key': 'properties.isRoutingPreferenceInternet', 'type': 'bool'}, + 'nat_rules': {'key': 'properties.natRules', 'type': '[VpnGatewayNatRule]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_hub: Optional["SubResource"] = None, + connections: Optional[List["VpnConnection"]] = None, + bgp_settings: Optional["BgpSettings"] = None, + vpn_gateway_scale_unit: Optional[int] = None, + enable_bgp_route_translation_for_nat: Optional[bool] = None, + is_routing_preference_internet: Optional[bool] = None, + nat_rules: Optional[List["VpnGatewayNatRule"]] = None, + **kwargs + ): + super(VpnGateway, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.virtual_hub = virtual_hub + self.connections = connections + self.bgp_settings = bgp_settings + self.provisioning_state = None + self.vpn_gateway_scale_unit = vpn_gateway_scale_unit + self.ip_configurations = None + self.enable_bgp_route_translation_for_nat = enable_bgp_route_translation_for_nat + self.is_routing_preference_internet = is_routing_preference_internet + self.nat_rules = nat_rules + + +class VpnGatewayIpConfiguration(msrest.serialization.Model): + """IP Configuration of a VPN Gateway Resource. + + :param id: The identifier of the IP configuration for a VPN Gateway. + :type id: str + :param public_ip_address: The public IP address of this IP configuration. + :type public_ip_address: str + :param private_ip_address: The private IP address of this IP configuration. + :type private_ip_address: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'public_ip_address': {'key': 'publicIpAddress', 'type': 'str'}, + 'private_ip_address': {'key': 'privateIpAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + public_ip_address: Optional[str] = None, + private_ip_address: Optional[str] = None, + **kwargs + ): + super(VpnGatewayIpConfiguration, self).__init__(**kwargs) + self.id = id + self.public_ip_address = public_ip_address + self.private_ip_address = private_ip_address + + +class VpnGatewayNatRule(SubResource): + """VpnGatewayNatRule Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :ivar provisioning_state: The provisioning state of the NAT Rule resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param type_properties_type: The type of NAT rule for VPN NAT. Possible values include: + "Static", "Dynamic". + :type type_properties_type: str or ~azure.mgmt.network.v2021_05_01.models.VpnNatRuleType + :param mode: The Source NAT direction of a VPN NAT. Possible values include: "EgressSnat", + "IngressSnat". + :type mode: str or ~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMode + :param internal_mappings: The private IP address internal mapping for NAT. + :type internal_mappings: list[~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMapping] + :param external_mappings: The private IP address external mapping for NAT. + :type external_mappings: list[~azure.mgmt.network.v2021_05_01.models.VpnNatRuleMapping] + :param ip_configuration_id: The IP Configuration ID this NAT rule applies to. + :type ip_configuration_id: str + :ivar egress_vpn_site_link_connections: List of egress VpnSiteLinkConnections. + :vartype egress_vpn_site_link_connections: + list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar ingress_vpn_site_link_connections: List of ingress VpnSiteLinkConnections. + :vartype ingress_vpn_site_link_connections: + list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'egress_vpn_site_link_connections': {'readonly': True}, + 'ingress_vpn_site_link_connections': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, + 'mode': {'key': 'properties.mode', 'type': 'str'}, + 'internal_mappings': {'key': 'properties.internalMappings', 'type': '[VpnNatRuleMapping]'}, + 'external_mappings': {'key': 'properties.externalMappings', 'type': '[VpnNatRuleMapping]'}, + 'ip_configuration_id': {'key': 'properties.ipConfigurationId', 'type': 'str'}, + 'egress_vpn_site_link_connections': {'key': 'properties.egressVpnSiteLinkConnections', 'type': '[SubResource]'}, + 'ingress_vpn_site_link_connections': {'key': 'properties.ingressVpnSiteLinkConnections', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + type_properties_type: Optional[Union[str, "VpnNatRuleType"]] = None, + mode: Optional[Union[str, "VpnNatRuleMode"]] = None, + internal_mappings: Optional[List["VpnNatRuleMapping"]] = None, + external_mappings: Optional[List["VpnNatRuleMapping"]] = None, + ip_configuration_id: Optional[str] = None, + **kwargs + ): + super(VpnGatewayNatRule, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.provisioning_state = None + self.type_properties_type = type_properties_type + self.mode = mode + self.internal_mappings = internal_mappings + self.external_mappings = external_mappings + self.ip_configuration_id = ip_configuration_id + self.egress_vpn_site_link_connections = None + self.ingress_vpn_site_link_connections = None + + +class VpnGatewayPacketCaptureStartParameters(msrest.serialization.Model): + """Start packet capture parameters. + + :param filter_data: Start Packet capture parameters on vpn gateway. + :type filter_data: str + """ + + _attribute_map = { + 'filter_data': {'key': 'filterData', 'type': 'str'}, + } + + def __init__( + self, + *, + filter_data: Optional[str] = None, + **kwargs + ): + super(VpnGatewayPacketCaptureStartParameters, self).__init__(**kwargs) + self.filter_data = filter_data + + +class VpnGatewayPacketCaptureStopParameters(msrest.serialization.Model): + """Stop packet capture parameters. + + :param sas_url: SAS url for packet capture on vpn gateway. + :type sas_url: str + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_url: Optional[str] = None, + **kwargs + ): + super(VpnGatewayPacketCaptureStopParameters, self).__init__(**kwargs) + self.sas_url = sas_url + + +class VpnLinkBgpSettings(msrest.serialization.Model): + """BGP settings details for a link. + + :param asn: The BGP speaker's ASN. + :type asn: long + :param bgp_peering_address: The BGP peering address and BGP identifier of this BGP speaker. + :type bgp_peering_address: str + """ + + _attribute_map = { + 'asn': {'key': 'asn', 'type': 'long'}, + 'bgp_peering_address': {'key': 'bgpPeeringAddress', 'type': 'str'}, + } + + def __init__( + self, + *, + asn: Optional[int] = None, + bgp_peering_address: Optional[str] = None, + **kwargs + ): + super(VpnLinkBgpSettings, self).__init__(**kwargs) + self.asn = asn + self.bgp_peering_address = bgp_peering_address + + +class VpnLinkProviderProperties(msrest.serialization.Model): + """List of properties of a link provider. + + :param link_provider_name: Name of the link provider. + :type link_provider_name: str + :param link_speed_in_mbps: Link speed. + :type link_speed_in_mbps: int + """ + + _attribute_map = { + 'link_provider_name': {'key': 'linkProviderName', 'type': 'str'}, + 'link_speed_in_mbps': {'key': 'linkSpeedInMbps', 'type': 'int'}, + } + + def __init__( + self, + *, + link_provider_name: Optional[str] = None, + link_speed_in_mbps: Optional[int] = None, + **kwargs + ): + super(VpnLinkProviderProperties, self).__init__(**kwargs) + self.link_provider_name = link_provider_name + self.link_speed_in_mbps = link_speed_in_mbps + + +class VpnNatRuleMapping(msrest.serialization.Model): + """Vpn NatRule mapping. + + :param address_space: Address space for Vpn NatRule mapping. + :type address_space: str + :param port_range: Port range for Vpn NatRule mapping. + :type port_range: str + """ + + _attribute_map = { + 'address_space': {'key': 'addressSpace', 'type': 'str'}, + 'port_range': {'key': 'portRange', 'type': 'str'}, + } + + def __init__( + self, + *, + address_space: Optional[str] = None, + port_range: Optional[str] = None, + **kwargs + ): + super(VpnNatRuleMapping, self).__init__(**kwargs) + self.address_space = address_space + self.port_range = port_range + + +class VpnPacketCaptureStartParameters(msrest.serialization.Model): + """Start packet capture parameters on virtual network gateway. + + :param filter_data: Start Packet capture parameters. + :type filter_data: str + """ + + _attribute_map = { + 'filter_data': {'key': 'filterData', 'type': 'str'}, + } + + def __init__( + self, + *, + filter_data: Optional[str] = None, + **kwargs + ): + super(VpnPacketCaptureStartParameters, self).__init__(**kwargs) + self.filter_data = filter_data + + +class VpnPacketCaptureStopParameters(msrest.serialization.Model): + """Stop packet capture parameters. + + :param sas_url: SAS url for packet capture on virtual network gateway. + :type sas_url: str + """ + + _attribute_map = { + 'sas_url': {'key': 'sasUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + sas_url: Optional[str] = None, + **kwargs + ): + super(VpnPacketCaptureStopParameters, self).__init__(**kwargs) + self.sas_url = sas_url + + +class VpnProfileResponse(msrest.serialization.Model): + """Vpn Profile Response for package generation. + + :param profile_url: URL to the VPN profile. + :type profile_url: str + """ + + _attribute_map = { + 'profile_url': {'key': 'profileUrl', 'type': 'str'}, + } + + def __init__( + self, + *, + profile_url: Optional[str] = None, + **kwargs + ): + super(VpnProfileResponse, self).__init__(**kwargs) + self.profile_url = profile_url + + +class VpnServerConfigRadiusClientRootCertificate(msrest.serialization.Model): + """Properties of the Radius client root certificate of VpnServerConfiguration. + + :param name: The certificate name. + :type name: str + :param thumbprint: The Radius client root certificate thumbprint. + :type thumbprint: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + thumbprint: Optional[str] = None, + **kwargs + ): + super(VpnServerConfigRadiusClientRootCertificate, self).__init__(**kwargs) + self.name = name + self.thumbprint = thumbprint + + +class VpnServerConfigRadiusServerRootCertificate(msrest.serialization.Model): + """Properties of Radius Server root certificate of VpnServerConfiguration. + + :param name: The certificate name. + :type name: str + :param public_cert_data: The certificate public data. + :type public_cert_data: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_cert_data': {'key': 'publicCertData', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + public_cert_data: Optional[str] = None, + **kwargs + ): + super(VpnServerConfigRadiusServerRootCertificate, self).__init__(**kwargs) + self.name = name + self.public_cert_data = public_cert_data + + +class VpnServerConfiguration(Resource): + """VpnServerConfiguration Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param name_properties_name: The name of the VpnServerConfiguration that is unique within a + resource group. + :type name_properties_name: str + :param vpn_protocols: VPN protocols for the VpnServerConfiguration. + :type vpn_protocols: list[str or + ~azure.mgmt.network.v2021_05_01.models.VpnGatewayTunnelingProtocol] + :param vpn_authentication_types: VPN authentication types for the VpnServerConfiguration. + :type vpn_authentication_types: list[str or + ~azure.mgmt.network.v2021_05_01.models.VpnAuthenticationType] + :param vpn_client_root_certificates: VPN client root certificate of VpnServerConfiguration. + :type vpn_client_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigVpnClientRootCertificate] + :param vpn_client_revoked_certificates: VPN client revoked certificate of + VpnServerConfiguration. + :type vpn_client_revoked_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigVpnClientRevokedCertificate] + :param radius_server_root_certificates: Radius Server root certificate of + VpnServerConfiguration. + :type radius_server_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigRadiusServerRootCertificate] + :param radius_client_root_certificates: Radius client root certificate of + VpnServerConfiguration. + :type radius_client_root_certificates: + list[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigRadiusClientRootCertificate] + :param vpn_client_ipsec_policies: VpnClientIpsecPolicies for VpnServerConfiguration. + :type vpn_client_ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param radius_server_address: The radius server address property of the VpnServerConfiguration + resource for point to site client connection. + :type radius_server_address: str + :param radius_server_secret: The radius secret property of the VpnServerConfiguration resource + for point to site client connection. + :type radius_server_secret: str + :param radius_servers: Multiple Radius Server configuration for VpnServerConfiguration. + :type radius_servers: list[~azure.mgmt.network.v2021_05_01.models.RadiusServer] + :param aad_authentication_parameters: The set of aad vpn authentication parameters. + :type aad_authentication_parameters: + ~azure.mgmt.network.v2021_05_01.models.AadAuthenticationParameters + :ivar provisioning_state: The provisioning state of the VpnServerConfiguration resource. + Possible values are: 'Updating', 'Deleting', and 'Failed'. + :vartype provisioning_state: str + :ivar p2_s_vpn_gateways: List of references to P2SVpnGateways. + :vartype p2_s_vpn_gateways: list[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :ivar etag_properties_etag: A unique read-only string that changes whenever the resource is + updated. + :vartype etag_properties_etag: str + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'p2_s_vpn_gateways': {'readonly': True}, + 'etag_properties_etag': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'name_properties_name': {'key': 'properties.name', 'type': 'str'}, + 'vpn_protocols': {'key': 'properties.vpnProtocols', 'type': '[str]'}, + 'vpn_authentication_types': {'key': 'properties.vpnAuthenticationTypes', 'type': '[str]'}, + 'vpn_client_root_certificates': {'key': 'properties.vpnClientRootCertificates', 'type': '[VpnServerConfigVpnClientRootCertificate]'}, + 'vpn_client_revoked_certificates': {'key': 'properties.vpnClientRevokedCertificates', 'type': '[VpnServerConfigVpnClientRevokedCertificate]'}, + 'radius_server_root_certificates': {'key': 'properties.radiusServerRootCertificates', 'type': '[VpnServerConfigRadiusServerRootCertificate]'}, + 'radius_client_root_certificates': {'key': 'properties.radiusClientRootCertificates', 'type': '[VpnServerConfigRadiusClientRootCertificate]'}, + 'vpn_client_ipsec_policies': {'key': 'properties.vpnClientIpsecPolicies', 'type': '[IpsecPolicy]'}, + 'radius_server_address': {'key': 'properties.radiusServerAddress', 'type': 'str'}, + 'radius_server_secret': {'key': 'properties.radiusServerSecret', 'type': 'str'}, + 'radius_servers': {'key': 'properties.radiusServers', 'type': '[RadiusServer]'}, + 'aad_authentication_parameters': {'key': 'properties.aadAuthenticationParameters', 'type': 'AadAuthenticationParameters'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'p2_s_vpn_gateways': {'key': 'properties.p2SVpnGateways', 'type': '[P2SVpnGateway]'}, + 'etag_properties_etag': {'key': 'properties.etag', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + name_properties_name: Optional[str] = None, + vpn_protocols: Optional[List[Union[str, "VpnGatewayTunnelingProtocol"]]] = None, + vpn_authentication_types: Optional[List[Union[str, "VpnAuthenticationType"]]] = None, + vpn_client_root_certificates: Optional[List["VpnServerConfigVpnClientRootCertificate"]] = None, + vpn_client_revoked_certificates: Optional[List["VpnServerConfigVpnClientRevokedCertificate"]] = None, + radius_server_root_certificates: Optional[List["VpnServerConfigRadiusServerRootCertificate"]] = None, + radius_client_root_certificates: Optional[List["VpnServerConfigRadiusClientRootCertificate"]] = None, + vpn_client_ipsec_policies: Optional[List["IpsecPolicy"]] = None, + radius_server_address: Optional[str] = None, + radius_server_secret: Optional[str] = None, + radius_servers: Optional[List["RadiusServer"]] = None, + aad_authentication_parameters: Optional["AadAuthenticationParameters"] = None, + **kwargs + ): + super(VpnServerConfiguration, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.name_properties_name = name_properties_name + self.vpn_protocols = vpn_protocols + self.vpn_authentication_types = vpn_authentication_types + self.vpn_client_root_certificates = vpn_client_root_certificates + self.vpn_client_revoked_certificates = vpn_client_revoked_certificates + self.radius_server_root_certificates = radius_server_root_certificates + self.radius_client_root_certificates = radius_client_root_certificates + self.vpn_client_ipsec_policies = vpn_client_ipsec_policies + self.radius_server_address = radius_server_address + self.radius_server_secret = radius_server_secret + self.radius_servers = radius_servers + self.aad_authentication_parameters = aad_authentication_parameters + self.provisioning_state = None + self.p2_s_vpn_gateways = None + self.etag_properties_etag = None + + +class VpnServerConfigurationsResponse(msrest.serialization.Model): + """VpnServerConfigurations list associated with VirtualWan Response. + + :param vpn_server_configuration_resource_ids: List of VpnServerConfigurations associated with + VirtualWan. + :type vpn_server_configuration_resource_ids: list[str] + """ + + _attribute_map = { + 'vpn_server_configuration_resource_ids': {'key': 'vpnServerConfigurationResourceIds', 'type': '[str]'}, + } + + def __init__( + self, + *, + vpn_server_configuration_resource_ids: Optional[List[str]] = None, + **kwargs + ): + super(VpnServerConfigurationsResponse, self).__init__(**kwargs) + self.vpn_server_configuration_resource_ids = vpn_server_configuration_resource_ids + + +class VpnServerConfigVpnClientRevokedCertificate(msrest.serialization.Model): + """Properties of the revoked VPN client certificate of VpnServerConfiguration. + + :param name: The certificate name. + :type name: str + :param thumbprint: The revoked VPN client certificate thumbprint. + :type thumbprint: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + thumbprint: Optional[str] = None, + **kwargs + ): + super(VpnServerConfigVpnClientRevokedCertificate, self).__init__(**kwargs) + self.name = name + self.thumbprint = thumbprint + + +class VpnServerConfigVpnClientRootCertificate(msrest.serialization.Model): + """Properties of VPN client root certificate of VpnServerConfiguration. + + :param name: The certificate name. + :type name: str + :param public_cert_data: The certificate public data. + :type public_cert_data: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'public_cert_data': {'key': 'publicCertData', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + public_cert_data: Optional[str] = None, + **kwargs + ): + super(VpnServerConfigVpnClientRootCertificate, self).__init__(**kwargs) + self.name = name + self.public_cert_data = public_cert_data + + +class VpnSite(Resource): + """VpnSite Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param virtual_wan: The VirtualWAN to which the vpnSite belongs. + :type virtual_wan: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param device_properties: The device properties. + :type device_properties: ~azure.mgmt.network.v2021_05_01.models.DeviceProperties + :param ip_address: The ip-address for the vpn-site. + :type ip_address: str + :param site_key: The key for vpn-site that can be used for connections. + :type site_key: str + :param address_space: The AddressSpace that contains an array of IP address ranges. + :type address_space: ~azure.mgmt.network.v2021_05_01.models.AddressSpace + :param bgp_properties: The set of bgp properties. + :type bgp_properties: ~azure.mgmt.network.v2021_05_01.models.BgpSettings + :ivar provisioning_state: The provisioning state of the VPN site resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param is_security_site: IsSecuritySite flag. + :type is_security_site: bool + :param vpn_site_links: List of all vpn site links. + :type vpn_site_links: list[~azure.mgmt.network.v2021_05_01.models.VpnSiteLink] + :param o365_policy: Office365 Policy. + :type o365_policy: ~azure.mgmt.network.v2021_05_01.models.O365PolicyProperties + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'virtual_wan': {'key': 'properties.virtualWan', 'type': 'SubResource'}, + 'device_properties': {'key': 'properties.deviceProperties', 'type': 'DeviceProperties'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'site_key': {'key': 'properties.siteKey', 'type': 'str'}, + 'address_space': {'key': 'properties.addressSpace', 'type': 'AddressSpace'}, + 'bgp_properties': {'key': 'properties.bgpProperties', 'type': 'BgpSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'is_security_site': {'key': 'properties.isSecuritySite', 'type': 'bool'}, + 'vpn_site_links': {'key': 'properties.vpnSiteLinks', 'type': '[VpnSiteLink]'}, + 'o365_policy': {'key': 'properties.o365Policy', 'type': 'O365PolicyProperties'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + virtual_wan: Optional["SubResource"] = None, + device_properties: Optional["DeviceProperties"] = None, + ip_address: Optional[str] = None, + site_key: Optional[str] = None, + address_space: Optional["AddressSpace"] = None, + bgp_properties: Optional["BgpSettings"] = None, + is_security_site: Optional[bool] = None, + vpn_site_links: Optional[List["VpnSiteLink"]] = None, + o365_policy: Optional["O365PolicyProperties"] = None, + **kwargs + ): + super(VpnSite, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.virtual_wan = virtual_wan + self.device_properties = device_properties + self.ip_address = ip_address + self.site_key = site_key + self.address_space = address_space + self.bgp_properties = bgp_properties + self.provisioning_state = None + self.is_security_site = is_security_site + self.vpn_site_links = vpn_site_links + self.o365_policy = o365_policy + + +class VpnSiteId(msrest.serialization.Model): + """VpnSite Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar vpn_site: The resource-uri of the vpn-site for which config is to be fetched. + :vartype vpn_site: str + """ + + _validation = { + 'vpn_site': {'readonly': True}, + } + + _attribute_map = { + 'vpn_site': {'key': 'vpnSite', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VpnSiteId, self).__init__(**kwargs) + self.vpn_site = None + + +class VpnSiteLink(SubResource): + """VpnSiteLink Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar type: Resource type. + :vartype type: str + :param link_properties: The link provider properties. + :type link_properties: ~azure.mgmt.network.v2021_05_01.models.VpnLinkProviderProperties + :param ip_address: The ip-address for the vpn-site-link. + :type ip_address: str + :param fqdn: FQDN of vpn-site-link. + :type fqdn: str + :param bgp_properties: The set of bgp properties. + :type bgp_properties: ~azure.mgmt.network.v2021_05_01.models.VpnLinkBgpSettings + :ivar provisioning_state: The provisioning state of the VPN site link resource. Possible values + include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'link_properties': {'key': 'properties.linkProperties', 'type': 'VpnLinkProviderProperties'}, + 'ip_address': {'key': 'properties.ipAddress', 'type': 'str'}, + 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, + 'bgp_properties': {'key': 'properties.bgpProperties', 'type': 'VpnLinkBgpSettings'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + link_properties: Optional["VpnLinkProviderProperties"] = None, + ip_address: Optional[str] = None, + fqdn: Optional[str] = None, + bgp_properties: Optional["VpnLinkBgpSettings"] = None, + **kwargs + ): + super(VpnSiteLink, self).__init__(id=id, **kwargs) + self.etag = None + self.name = name + self.type = None + self.link_properties = link_properties + self.ip_address = ip_address + self.fqdn = fqdn + self.bgp_properties = bgp_properties + self.provisioning_state = None + + +class VpnSiteLinkConnection(SubResource): + """VpnSiteLinkConnection Resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :param name: The name of the resource that is unique within a resource group. This name can be + used to access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :ivar type: Resource type. + :vartype type: str + :param vpn_site_link: Id of the connected vpn site link. + :type vpn_site_link: ~azure.mgmt.network.v2021_05_01.models.SubResource + :param routing_weight: Routing weight for vpn connection. + :type routing_weight: int + :param vpn_link_connection_mode: Vpn link connection mode. Possible values include: "Default", + "ResponderOnly", "InitiatorOnly". + :type vpn_link_connection_mode: str or + ~azure.mgmt.network.v2021_05_01.models.VpnLinkConnectionMode + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connecting", "Connected", "NotConnected". + :vartype connection_status: str or ~azure.mgmt.network.v2021_05_01.models.VpnConnectionStatus + :param vpn_connection_protocol_type: Connection protocol used for this connection. Possible + values include: "IKEv2", "IKEv1". + :type vpn_connection_protocol_type: str or + ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionProtocol + :ivar ingress_bytes_transferred: Ingress bytes transferred. + :vartype ingress_bytes_transferred: long + :ivar egress_bytes_transferred: Egress bytes transferred. + :vartype egress_bytes_transferred: long + :param connection_bandwidth: Expected bandwidth in MBPS. + :type connection_bandwidth: int + :param shared_key: SharedKey for the vpn connection. + :type shared_key: str + :param enable_bgp: EnableBgp flag. + :type enable_bgp: bool + :param use_policy_based_traffic_selectors: Enable policy-based traffic selectors. + :type use_policy_based_traffic_selectors: bool + :param ipsec_policies: The IPSec Policies to be considered by this connection. + :type ipsec_policies: list[~azure.mgmt.network.v2021_05_01.models.IpsecPolicy] + :param enable_rate_limiting: EnableBgp flag. + :type enable_rate_limiting: bool + :param use_local_azure_ip_address: Use local azure ip to initiate connection. + :type use_local_azure_ip_address: bool + :ivar provisioning_state: The provisioning state of the VPN site link connection resource. + Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :param ingress_nat_rules: List of ingress NatRules. + :type ingress_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :param egress_nat_rules: List of egress NatRules. + :type egress_nat_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'etag': {'readonly': True}, + 'type': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'ingress_bytes_transferred': {'readonly': True}, + 'egress_bytes_transferred': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vpn_site_link': {'key': 'properties.vpnSiteLink', 'type': 'SubResource'}, + 'routing_weight': {'key': 'properties.routingWeight', 'type': 'int'}, + 'vpn_link_connection_mode': {'key': 'properties.vpnLinkConnectionMode', 'type': 'str'}, + 'connection_status': {'key': 'properties.connectionStatus', 'type': 'str'}, + 'vpn_connection_protocol_type': {'key': 'properties.vpnConnectionProtocolType', 'type': 'str'}, + 'ingress_bytes_transferred': {'key': 'properties.ingressBytesTransferred', 'type': 'long'}, + 'egress_bytes_transferred': {'key': 'properties.egressBytesTransferred', 'type': 'long'}, + 'connection_bandwidth': {'key': 'properties.connectionBandwidth', 'type': 'int'}, + 'shared_key': {'key': 'properties.sharedKey', 'type': 'str'}, + 'enable_bgp': {'key': 'properties.enableBgp', 'type': 'bool'}, + 'use_policy_based_traffic_selectors': {'key': 'properties.usePolicyBasedTrafficSelectors', 'type': 'bool'}, + 'ipsec_policies': {'key': 'properties.ipsecPolicies', 'type': '[IpsecPolicy]'}, + 'enable_rate_limiting': {'key': 'properties.enableRateLimiting', 'type': 'bool'}, + 'use_local_azure_ip_address': {'key': 'properties.useLocalAzureIpAddress', 'type': 'bool'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'ingress_nat_rules': {'key': 'properties.ingressNatRules', 'type': '[SubResource]'}, + 'egress_nat_rules': {'key': 'properties.egressNatRules', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + name: Optional[str] = None, + vpn_site_link: Optional["SubResource"] = None, + routing_weight: Optional[int] = None, + vpn_link_connection_mode: Optional[Union[str, "VpnLinkConnectionMode"]] = None, + vpn_connection_protocol_type: Optional[Union[str, "VirtualNetworkGatewayConnectionProtocol"]] = None, + connection_bandwidth: Optional[int] = None, + shared_key: Optional[str] = None, + enable_bgp: Optional[bool] = None, + use_policy_based_traffic_selectors: Optional[bool] = None, + ipsec_policies: Optional[List["IpsecPolicy"]] = None, + enable_rate_limiting: Optional[bool] = None, + use_local_azure_ip_address: Optional[bool] = None, + ingress_nat_rules: Optional[List["SubResource"]] = None, + egress_nat_rules: Optional[List["SubResource"]] = None, + **kwargs + ): + super(VpnSiteLinkConnection, self).__init__(id=id, **kwargs) + self.name = name + self.etag = None + self.type = None + self.vpn_site_link = vpn_site_link + self.routing_weight = routing_weight + self.vpn_link_connection_mode = vpn_link_connection_mode + self.connection_status = None + self.vpn_connection_protocol_type = vpn_connection_protocol_type + self.ingress_bytes_transferred = None + self.egress_bytes_transferred = None + self.connection_bandwidth = connection_bandwidth + self.shared_key = shared_key + self.enable_bgp = enable_bgp + self.use_policy_based_traffic_selectors = use_policy_based_traffic_selectors + self.ipsec_policies = ipsec_policies + self.enable_rate_limiting = enable_rate_limiting + self.use_local_azure_ip_address = use_local_azure_ip_address + self.provisioning_state = None + self.ingress_nat_rules = ingress_nat_rules + self.egress_nat_rules = egress_nat_rules + + +class WebApplicationFirewallCustomRule(msrest.serialization.Model): + """Defines contents of a web application rule. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: The name of the resource that is unique within a policy. This name can be used to + access the resource. + :type name: str + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param priority: Required. Priority of the rule. Rules with a lower value will be evaluated + before rules with a higher value. + :type priority: int + :param rule_type: Required. The rule type. Possible values include: "MatchRule", "Invalid". + :type rule_type: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallRuleType + :param match_conditions: Required. List of match conditions. + :type match_conditions: list[~azure.mgmt.network.v2021_05_01.models.MatchCondition] + :param action: Required. Type of Actions. Possible values include: "Allow", "Block", "Log". + :type action: str or ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallAction + """ + + _validation = { + 'name': {'max_length': 128, 'min_length': 0}, + 'etag': {'readonly': True}, + 'priority': {'required': True}, + 'rule_type': {'required': True}, + 'match_conditions': {'required': True}, + 'action': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'rule_type': {'key': 'ruleType', 'type': 'str'}, + 'match_conditions': {'key': 'matchConditions', 'type': '[MatchCondition]'}, + 'action': {'key': 'action', 'type': 'str'}, + } + + def __init__( + self, + *, + priority: int, + rule_type: Union[str, "WebApplicationFirewallRuleType"], + match_conditions: List["MatchCondition"], + action: Union[str, "WebApplicationFirewallAction"], + name: Optional[str] = None, + **kwargs + ): + super(WebApplicationFirewallCustomRule, self).__init__(**kwargs) + self.name = name + self.etag = None + self.priority = priority + self.rule_type = rule_type + self.match_conditions = match_conditions + self.action = action + + +class WebApplicationFirewallPolicy(Resource): + """Defines web application firewall policy. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param id: Resource ID. + :type id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :ivar etag: A unique read-only string that changes whenever the resource is updated. + :vartype etag: str + :param policy_settings: The PolicySettings for policy. + :type policy_settings: ~azure.mgmt.network.v2021_05_01.models.PolicySettings + :param custom_rules: The custom rules inside the policy. + :type custom_rules: + list[~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallCustomRule] + :ivar application_gateways: A collection of references to application gateways. + :vartype application_gateways: list[~azure.mgmt.network.v2021_05_01.models.ApplicationGateway] + :ivar provisioning_state: The provisioning state of the web application firewall policy + resource. Possible values include: "Succeeded", "Updating", "Deleting", "Failed". + :vartype provisioning_state: str or ~azure.mgmt.network.v2021_05_01.models.ProvisioningState + :ivar resource_state: Resource status of the policy. Possible values include: "Creating", + "Enabling", "Enabled", "Disabling", "Disabled", "Deleting". + :vartype resource_state: str or + ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicyResourceState + :param managed_rules: Describes the managedRules structure. + :type managed_rules: ~azure.mgmt.network.v2021_05_01.models.ManagedRulesDefinition + :ivar http_listeners: A collection of references to application gateway http listeners. + :vartype http_listeners: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + :ivar path_based_rules: A collection of references to application gateway path rules. + :vartype path_based_rules: list[~azure.mgmt.network.v2021_05_01.models.SubResource] + """ + + _validation = { + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'etag': {'readonly': True}, + 'application_gateways': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'resource_state': {'readonly': True}, + 'http_listeners': {'readonly': True}, + 'path_based_rules': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'policy_settings': {'key': 'properties.policySettings', 'type': 'PolicySettings'}, + 'custom_rules': {'key': 'properties.customRules', 'type': '[WebApplicationFirewallCustomRule]'}, + 'application_gateways': {'key': 'properties.applicationGateways', 'type': '[ApplicationGateway]'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'resource_state': {'key': 'properties.resourceState', 'type': 'str'}, + 'managed_rules': {'key': 'properties.managedRules', 'type': 'ManagedRulesDefinition'}, + 'http_listeners': {'key': 'properties.httpListeners', 'type': '[SubResource]'}, + 'path_based_rules': {'key': 'properties.pathBasedRules', 'type': '[SubResource]'}, + } + + def __init__( + self, + *, + id: Optional[str] = None, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + policy_settings: Optional["PolicySettings"] = None, + custom_rules: Optional[List["WebApplicationFirewallCustomRule"]] = None, + managed_rules: Optional["ManagedRulesDefinition"] = None, + **kwargs + ): + super(WebApplicationFirewallPolicy, self).__init__(id=id, location=location, tags=tags, **kwargs) + self.etag = None + self.policy_settings = policy_settings + self.custom_rules = custom_rules + self.application_gateways = None + self.provisioning_state = None + self.resource_state = None + self.managed_rules = managed_rules + self.http_listeners = None + self.path_based_rules = None + + +class WebApplicationFirewallPolicyListResult(msrest.serialization.Model): + """Result of the request to list WebApplicationFirewallPolicies. It contains a list of WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: List of WebApplicationFirewallPolicies within a resource group. + :vartype value: list[~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicy] + :ivar next_link: URL to get the next set of WebApplicationFirewallPolicy objects if there are + any. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebApplicationFirewallPolicy]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebApplicationFirewallPolicyListResult, self).__init__(**kwargs) + self.value = None + self.next_link = None diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_network_management_client_enums.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_network_management_client_enums.py new file mode 100644 index 000000000000..b63d9440cdb3 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/models/_network_management_client_enums.py @@ -0,0 +1,1488 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class Access(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Access to be allowed or denied. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class ApplicationGatewayBackendHealthServerHealth(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Health of backend server. + """ + + UNKNOWN = "Unknown" + UP = "Up" + DOWN = "Down" + PARTIAL = "Partial" + DRAINING = "Draining" + +class ApplicationGatewayCookieBasedAffinity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Cookie based affinity. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class ApplicationGatewayCustomErrorStatusCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status code of the application gateway customer error. + """ + + HTTP_STATUS403 = "HttpStatus403" + HTTP_STATUS502 = "HttpStatus502" + +class ApplicationGatewayFirewallMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Web application firewall mode. + """ + + DETECTION = "Detection" + PREVENTION = "Prevention" + +class ApplicationGatewayLoadDistributionAlgorithm(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Load Distribution Algorithm enums. + """ + + ROUND_ROBIN = "RoundRobin" + LEAST_CONNECTIONS = "LeastConnections" + IP_HASH = "IpHash" + +class ApplicationGatewayOperationalState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Operational state of the application gateway resource. + """ + + STOPPED = "Stopped" + STARTING = "Starting" + RUNNING = "Running" + STOPPING = "Stopping" + +class ApplicationGatewayProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Application Gateway protocol. + """ + + HTTP = "Http" + HTTPS = "Https" + +class ApplicationGatewayRedirectType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Redirect type enum. + """ + + PERMANENT = "Permanent" + FOUND = "Found" + SEE_OTHER = "SeeOther" + TEMPORARY = "Temporary" + +class ApplicationGatewayRequestRoutingRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Rule type. + """ + + BASIC = "Basic" + PATH_BASED_ROUTING = "PathBasedRouting" + +class ApplicationGatewaySkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of an application gateway SKU. + """ + + STANDARD_SMALL = "Standard_Small" + STANDARD_MEDIUM = "Standard_Medium" + STANDARD_LARGE = "Standard_Large" + WAF_MEDIUM = "WAF_Medium" + WAF_LARGE = "WAF_Large" + STANDARD_V2 = "Standard_v2" + WAF_V2 = "WAF_v2" + +class ApplicationGatewaySslCipherSuite(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Ssl cipher suites enums. + """ + + TLS_ECDHE_RSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384" + TLS_ECDHE_RSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256" + TLS_ECDHE_RSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA" + TLS_ECDHE_RSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA" + TLS_DHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384" + TLS_DHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256" + TLS_DHE_RSA_WITH_AES256_CBC_SHA = "TLS_DHE_RSA_WITH_AES_256_CBC_SHA" + TLS_DHE_RSA_WITH_AES128_CBC_SHA = "TLS_DHE_RSA_WITH_AES_128_CBC_SHA" + TLS_RSA_WITH_AES256_GCM_SHA384 = "TLS_RSA_WITH_AES_256_GCM_SHA384" + TLS_RSA_WITH_AES128_GCM_SHA256 = "TLS_RSA_WITH_AES_128_GCM_SHA256" + TLS_RSA_WITH_AES256_CBC_SHA256 = "TLS_RSA_WITH_AES_256_CBC_SHA256" + TLS_RSA_WITH_AES128_CBC_SHA256 = "TLS_RSA_WITH_AES_128_CBC_SHA256" + TLS_RSA_WITH_AES256_CBC_SHA = "TLS_RSA_WITH_AES_256_CBC_SHA" + TLS_RSA_WITH_AES128_CBC_SHA = "TLS_RSA_WITH_AES_128_CBC_SHA" + TLS_ECDHE_ECDSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384" + TLS_ECDHE_ECDSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256" + TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA384 = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384" + TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA256 = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256" + TLS_ECDHE_ECDSA_WITH_AES256_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA" + TLS_ECDHE_ECDSA_WITH_AES128_CBC_SHA = "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA" + TLS_DHE_DSS_WITH_AES256_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256" + TLS_DHE_DSS_WITH_AES128_CBC_SHA256 = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256" + TLS_DHE_DSS_WITH_AES256_CBC_SHA = "TLS_DHE_DSS_WITH_AES_256_CBC_SHA" + TLS_DHE_DSS_WITH_AES128_CBC_SHA = "TLS_DHE_DSS_WITH_AES_128_CBC_SHA" + TLS_RSA_WITH3_DES_EDE_CBC_SHA = "TLS_RSA_WITH_3DES_EDE_CBC_SHA" + TLS_DHE_DSS_WITH3_DES_EDE_CBC_SHA = "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA" + TLS_ECDHE_RSA_WITH_AES128_GCM_SHA256 = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" + TLS_ECDHE_RSA_WITH_AES256_GCM_SHA384 = "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384" + +class ApplicationGatewaySslPolicyName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Ssl predefined policy name enums. + """ + + APP_GW_SSL_POLICY20150501 = "AppGwSslPolicy20150501" + APP_GW_SSL_POLICY20170401 = "AppGwSslPolicy20170401" + APP_GW_SSL_POLICY20170401_S = "AppGwSslPolicy20170401S" + +class ApplicationGatewaySslPolicyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of Ssl Policy. + """ + + PREDEFINED = "Predefined" + CUSTOM = "Custom" + +class ApplicationGatewaySslProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Ssl protocol enums. + """ + + TL_SV1_0 = "TLSv1_0" + TL_SV1_1 = "TLSv1_1" + TL_SV1_2 = "TLSv1_2" + +class ApplicationGatewayTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of an application gateway. + """ + + STANDARD = "Standard" + WAF = "WAF" + STANDARD_V2 = "Standard_v2" + WAF_V2 = "WAF_v2" + +class AssociationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The association type of the child resource to the parent resource. + """ + + ASSOCIATED = "Associated" + CONTAINS = "Contains" + +class AuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """VPN client authentication method. + """ + + EAPTLS = "EAPTLS" + EAPMSCHA_PV2 = "EAPMSCHAPv2" + +class AuthorizationUseStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The authorization use status. + """ + + AVAILABLE = "Available" + IN_USE = "InUse" + +class AzureFirewallApplicationRuleProtocolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The protocol type of a Application Rule resource. + """ + + HTTP = "Http" + HTTPS = "Https" + MSSQL = "Mssql" + +class AzureFirewallNatRCActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The action type of a NAT rule collection. + """ + + SNAT = "Snat" + DNAT = "Dnat" + +class AzureFirewallNetworkRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The protocol of a Network Rule resource. + """ + + TCP = "TCP" + UDP = "UDP" + ANY = "Any" + ICMP = "ICMP" + +class AzureFirewallRCActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The action type of a rule collection. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class AzureFirewallSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of an Azure Firewall SKU. + """ + + AZFW_VNET = "AZFW_VNet" + AZFW_HUB = "AZFW_Hub" + +class AzureFirewallSkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of an Azure Firewall. + """ + + STANDARD = "Standard" + PREMIUM = "Premium" + BASIC = "Basic" + +class AzureFirewallThreatIntelMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The operation mode for Threat Intel. + """ + + ALERT = "Alert" + DENY = "Deny" + OFF = "Off" + +class BastionConnectProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The protocol used to connect to the target. + """ + + SSH = "SSH" + RDP = "RDP" + +class BastionHostSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The name of this Bastion Host. + """ + + BASIC = "Basic" + STANDARD = "Standard" + +class BgpPeerState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The BGP peer state. + """ + + UNKNOWN = "Unknown" + STOPPED = "Stopped" + IDLE = "Idle" + CONNECTING = "Connecting" + CONNECTED = "Connected" + +class CircuitConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Express Route Circuit connection state. + """ + + CONNECTED = "Connected" + CONNECTING = "Connecting" + DISCONNECTED = "Disconnected" + +class CommissionedState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The commissioned state of the Custom IP Prefix. + """ + + PROVISIONING = "Provisioning" + PROVISIONED = "Provisioned" + COMMISSIONING = "Commissioning" + COMMISSIONED = "Commissioned" + DECOMMISSIONING = "Decommissioning" + DEPROVISIONING = "Deprovisioning" + +class ConnectionMonitorEndpointFilterItemType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of item included in the filter. Currently only 'AgentAddress' is supported. + """ + + AGENT_ADDRESS = "AgentAddress" + +class ConnectionMonitorEndpointFilterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The behavior of the endpoint filter. Currently only 'Include' is supported. + """ + + INCLUDE = "Include" + +class ConnectionMonitorSourceStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of connection monitor source. + """ + + UNKNOWN = "Unknown" + ACTIVE = "Active" + INACTIVE = "Inactive" + +class ConnectionMonitorTestConfigurationProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The protocol to use in test evaluation. + """ + + TCP = "Tcp" + HTTP = "Http" + ICMP = "Icmp" + +class ConnectionMonitorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of connection monitor. + """ + + MULTI_ENDPOINT = "MultiEndpoint" + SINGLE_SOURCE_DESTINATION = "SingleSourceDestination" + +class ConnectionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The connection state. + """ + + REACHABLE = "Reachable" + UNREACHABLE = "Unreachable" + UNKNOWN = "Unknown" + +class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The connection status. + """ + + UNKNOWN = "Unknown" + CONNECTED = "Connected" + DISCONNECTED = "Disconnected" + DEGRADED = "Degraded" + +class CoverageLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Test coverage for the endpoint. + """ + + DEFAULT = "Default" + LOW = "Low" + BELOW_AVERAGE = "BelowAverage" + AVERAGE = "Average" + ABOVE_AVERAGE = "AboveAverage" + FULL = "Full" + +class DdosCustomPolicyProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The protocol for which the DDoS protection policy is being customized. + """ + + TCP = "Tcp" + UDP = "Udp" + SYN = "Syn" + +class DdosCustomPolicyTriggerSensitivityOverride(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with + most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity + w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. + Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. + """ + + RELAXED = "Relaxed" + LOW = "Low" + DEFAULT = "Default" + HIGH = "High" + +class DdosSettingsProtectionCoverage(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The DDoS protection policy customizability of the public IP. Only standard coverage will have + the ability to be customized. + """ + + BASIC = "Basic" + STANDARD = "Standard" + +class DeleteOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Specify what happens to the public IP address when the VM using it is deleted + """ + + DELETE = "Delete" + DETACH = "Detach" + +class DestinationPortBehavior(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Destination port behavior. + """ + + NONE = "None" + LISTEN_IF_AVAILABLE = "ListenIfAvailable" + +class DhGroup(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The DH Groups used in IKE Phase 1 for initial SA. + """ + + NONE = "None" + DH_GROUP1 = "DHGroup1" + DH_GROUP2 = "DHGroup2" + DH_GROUP14 = "DHGroup14" + DH_GROUP2048 = "DHGroup2048" + ECP256 = "ECP256" + ECP384 = "ECP384" + DH_GROUP24 = "DHGroup24" + +class Direction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The direction of the traffic. + """ + + INBOUND = "Inbound" + OUTBOUND = "Outbound" + +class EffectiveRouteSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Who created the route. + """ + + UNKNOWN = "Unknown" + USER = "User" + VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" + DEFAULT = "Default" + +class EffectiveRouteState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The value of effective route. + """ + + ACTIVE = "Active" + INVALID = "Invalid" + +class EffectiveSecurityRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The network protocol this rule applies to. + """ + + TCP = "Tcp" + UDP = "Udp" + ALL = "All" + +class EndpointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The endpoint type. + """ + + AZURE_VM = "AzureVM" + AZURE_V_NET = "AzureVNet" + AZURE_SUBNET = "AzureSubnet" + EXTERNAL_ADDRESS = "ExternalAddress" + MMA_WORKSPACE_MACHINE = "MMAWorkspaceMachine" + MMA_WORKSPACE_NETWORK = "MMAWorkspaceNetwork" + +class EvaluationState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Connectivity analysis evaluation state. + """ + + NOT_STARTED = "NotStarted" + IN_PROGRESS = "InProgress" + COMPLETED = "Completed" + +class ExpressRouteCircuitPeeringAdvertisedPublicPrefixState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The advertised public prefix state of the Peering resource. + """ + + NOT_CONFIGURED = "NotConfigured" + CONFIGURING = "Configuring" + CONFIGURED = "Configured" + VALIDATION_NEEDED = "ValidationNeeded" + +class ExpressRouteCircuitPeeringState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of peering. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class ExpressRouteCircuitSkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The family of the SKU. + """ + + UNLIMITED_DATA = "UnlimitedData" + METERED_DATA = "MeteredData" + +class ExpressRouteCircuitSkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The tier of the SKU. + """ + + STANDARD = "Standard" + PREMIUM = "Premium" + BASIC = "Basic" + LOCAL = "Local" + +class ExpressRouteLinkAdminState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Administrative state of the physical port. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class ExpressRouteLinkConnectorType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Physical fiber port type. + """ + + LC = "LC" + SC = "SC" + +class ExpressRouteLinkMacSecCipher(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Mac security cipher. + """ + + GCM_AES256 = "GcmAes256" + GCM_AES128 = "GcmAes128" + GCM_AES_XPN128 = "GcmAesXpn128" + GCM_AES_XPN256 = "GcmAesXpn256" + +class ExpressRouteLinkMacSecSciState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Sci mode enabled/disabled. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class ExpressRoutePeeringState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of peering. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class ExpressRoutePeeringType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The peering type. + """ + + AZURE_PUBLIC_PEERING = "AzurePublicPeering" + AZURE_PRIVATE_PEERING = "AzurePrivatePeering" + MICROSOFT_PEERING = "MicrosoftPeering" + +class ExpressRoutePortsEncapsulation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Encapsulation method on physical ports. + """ + + DOT1_Q = "Dot1Q" + QIN_Q = "QinQ" + +class ExtendedLocationTypes(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The supported ExtendedLocation types. Currently only EdgeZone is supported in Microsoft.Network + resources. + """ + + EDGE_ZONE = "EdgeZone" + +class FirewallPolicyFilterRuleCollectionActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The action type of a rule. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class FirewallPolicyIntrusionDetectionProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Possible intrusion detection bypass traffic protocols. + """ + + TCP = "TCP" + UDP = "UDP" + ICMP = "ICMP" + ANY = "ANY" + +class FirewallPolicyIntrusionDetectionStateType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Possible state values. + """ + + OFF = "Off" + ALERT = "Alert" + DENY = "Deny" + +class FirewallPolicyNatRuleCollectionActionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The action type of a rule. + """ + + DNAT = "DNAT" + +class FirewallPolicyRuleApplicationProtocolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The application protocol type of a Rule. + """ + + HTTP = "Http" + HTTPS = "Https" + +class FirewallPolicyRuleCollectionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the rule collection. + """ + + FIREWALL_POLICY_NAT_RULE_COLLECTION = "FirewallPolicyNatRuleCollection" + FIREWALL_POLICY_FILTER_RULE_COLLECTION = "FirewallPolicyFilterRuleCollection" + +class FirewallPolicyRuleNetworkProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Network protocol of a Rule. + """ + + TCP = "TCP" + UDP = "UDP" + ANY = "Any" + ICMP = "ICMP" + +class FirewallPolicyRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Rule Type. + """ + + APPLICATION_RULE = "ApplicationRule" + NETWORK_RULE = "NetworkRule" + NAT_RULE = "NatRule" + +class FirewallPolicySkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of Firewall Policy. + """ + + STANDARD = "Standard" + PREMIUM = "Premium" + BASIC = "Basic" + +class FlowLogFormatType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The file type of flow log. + """ + + JSON = "JSON" + +class GatewayLoadBalancerTunnelInterfaceType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Traffic type of gateway load balancer tunnel interface. + """ + + NONE = "None" + INTERNAL = "Internal" + EXTERNAL = "External" + +class GatewayLoadBalancerTunnelProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Protocol of gateway load balancer tunnel interface. + """ + + NONE = "None" + NATIVE = "Native" + VXLAN = "VXLAN" + +class HTTPConfigurationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The HTTP method to use. + """ + + GET = "Get" + POST = "Post" + +class HTTPMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """HTTP method. + """ + + GET = "Get" + +class HubBgpConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the VirtualHub to Peer. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class HubVirtualNetworkConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the VirtualHub to vnet connection. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class IkeEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The IKE encryption algorithm (IKE phase 2). + """ + + DES = "DES" + DES3 = "DES3" + AES128 = "AES128" + AES192 = "AES192" + AES256 = "AES256" + GCMAES256 = "GCMAES256" + GCMAES128 = "GCMAES128" + +class IkeIntegrity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The IKE integrity algorithm (IKE phase 2). + """ + + MD5 = "MD5" + SHA1 = "SHA1" + SHA256 = "SHA256" + SHA384 = "SHA384" + GCMAES256 = "GCMAES256" + GCMAES128 = "GCMAES128" + +class InboundSecurityRulesProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Protocol. This should be either TCP or UDP. + """ + + TCP = "TCP" + UDP = "UDP" + +class IPAllocationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """IP address allocation method. + """ + + STATIC = "Static" + DYNAMIC = "Dynamic" + +class IpAllocationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """IpAllocation type. + """ + + UNDEFINED = "Undefined" + HYPERNET = "Hypernet" + +class IpFlowProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Protocol to be verified on. + """ + + TCP = "TCP" + UDP = "UDP" + +class IpsecEncryption(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The IPSec encryption algorithm (IKE phase 1). + """ + + NONE = "None" + DES = "DES" + DES3 = "DES3" + AES128 = "AES128" + AES192 = "AES192" + AES256 = "AES256" + GCMAES128 = "GCMAES128" + GCMAES192 = "GCMAES192" + GCMAES256 = "GCMAES256" + +class IpsecIntegrity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The IPSec integrity algorithm (IKE phase 1). + """ + + MD5 = "MD5" + SHA1 = "SHA1" + SHA256 = "SHA256" + GCMAES128 = "GCMAES128" + GCMAES192 = "GCMAES192" + GCMAES256 = "GCMAES256" + +class IPVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """IP address version. + """ + + I_PV4 = "IPv4" + I_PV6 = "IPv6" + +class IssueType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of issue. + """ + + UNKNOWN = "Unknown" + AGENT_STOPPED = "AgentStopped" + GUEST_FIREWALL = "GuestFirewall" + DNS_RESOLUTION = "DnsResolution" + SOCKET_BIND = "SocketBind" + NETWORK_SECURITY_RULE = "NetworkSecurityRule" + USER_DEFINED_ROUTE = "UserDefinedRoute" + PORT_THROTTLED = "PortThrottled" + PLATFORM = "Platform" + +class LoadBalancerOutboundRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The protocol for the outbound rule in load balancer. + """ + + TCP = "Tcp" + UDP = "Udp" + ALL = "All" + +class LoadBalancerSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of a load balancer SKU. + """ + + BASIC = "Basic" + STANDARD = "Standard" + GATEWAY = "Gateway" + +class LoadBalancerSkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a load balancer SKU. + """ + + REGIONAL = "Regional" + GLOBAL_ENUM = "Global" + +class LoadDistribution(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The load distribution policy for this rule. + """ + + DEFAULT = "Default" + SOURCE_IP = "SourceIP" + SOURCE_IP_PROTOCOL = "SourceIPProtocol" + +class ManagedRuleEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of the managed rule. Defaults to Disabled if not specified. + """ + + DISABLED = "Disabled" + +class NatGatewaySkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of Nat Gateway SKU. + """ + + STANDARD = "Standard" + +class NetworkInterfaceMigrationPhase(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Migration phase of Network Interface resource. + """ + + NONE = "None" + PREPARE = "Prepare" + COMMIT = "Commit" + ABORT = "Abort" + COMMITTED = "Committed" + +class NetworkInterfaceNicType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of Network Interface resource. + """ + + STANDARD = "Standard" + ELASTIC = "Elastic" + +class NetworkOperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Status of the Azure async operation. + """ + + IN_PROGRESS = "InProgress" + SUCCEEDED = "Succeeded" + FAILED = "Failed" + +class NextHopType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Next hop type. + """ + + INTERNET = "Internet" + VIRTUAL_APPLIANCE = "VirtualAppliance" + VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" + VNET_LOCAL = "VnetLocal" + HYPER_NET_GATEWAY = "HyperNetGateway" + NONE = "None" + +class OfficeTrafficCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The office traffic category. + """ + + OPTIMIZE = "Optimize" + OPTIMIZE_AND_ALLOW = "OptimizeAndAllow" + ALL = "All" + NONE = "None" + +class OrderByOrder(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes if results should be in ascending/descending order + """ + + ASCENDING = "Ascending" + DESCENDING = "Descending" + +class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The origin of the issue. + """ + + LOCAL = "Local" + INBOUND = "Inbound" + OUTBOUND = "Outbound" + +class OutputType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Connection monitor output destination type. Currently, only "Workspace" is supported. + """ + + WORKSPACE = "Workspace" + +class OwaspCrsExclusionEntryMatchVariable(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The variable to be excluded. + """ + + REQUEST_HEADER_NAMES = "RequestHeaderNames" + REQUEST_COOKIE_NAMES = "RequestCookieNames" + REQUEST_ARG_NAMES = "RequestArgNames" + REQUEST_HEADER_KEYS = "RequestHeaderKeys" + REQUEST_HEADER_VALUES = "RequestHeaderValues" + REQUEST_COOKIE_KEYS = "RequestCookieKeys" + REQUEST_COOKIE_VALUES = "RequestCookieValues" + REQUEST_ARG_KEYS = "RequestArgKeys" + REQUEST_ARG_VALUES = "RequestArgValues" + +class OwaspCrsExclusionEntrySelectorMatchOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """When matchVariable is a collection, operate on the selector to specify which elements in the + collection this exclusion applies to. + """ + + EQUALS = "Equals" + CONTAINS = "Contains" + STARTS_WITH = "StartsWith" + ENDS_WITH = "EndsWith" + EQUALS_ANY = "EqualsAny" + +class PcError(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + INTERNAL_ERROR = "InternalError" + AGENT_STOPPED = "AgentStopped" + CAPTURE_FAILED = "CaptureFailed" + LOCAL_FILE_FAILED = "LocalFileFailed" + STORAGE_FAILED = "StorageFailed" + +class PcProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Protocol to be filtered on. + """ + + TCP = "TCP" + UDP = "UDP" + ANY = "Any" + +class PcStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of the packet capture session. + """ + + NOT_STARTED = "NotStarted" + RUNNING = "Running" + STOPPED = "Stopped" + ERROR = "Error" + UNKNOWN = "Unknown" + +class PfsGroup(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Pfs Groups used in IKE Phase 2 for new child SA. + """ + + NONE = "None" + PFS1 = "PFS1" + PFS2 = "PFS2" + PFS2048 = "PFS2048" + ECP256 = "ECP256" + ECP384 = "ECP384" + PFS24 = "PFS24" + PFS14 = "PFS14" + PFSMM = "PFSMM" + +class PreferredIPVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The preferred IP version to use in test evaluation. The connection monitor may choose to use a + different version depending on other parameters. + """ + + I_PV4 = "IPv4" + I_PV6 = "IPv6" + +class PreferredRoutingGateway(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The preferred routing gateway types + """ + + EXPRESS_ROUTE = "ExpressRoute" + VPN_GATEWAY = "VpnGateway" + NONE = "None" + +class ProbeProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The protocol of the end point. If 'Tcp' is specified, a received ACK is required for the probe + to be successful. If 'Http' or 'Https' is specified, a 200 OK response from the specifies URI + is required for the probe to be successful. + """ + + HTTP = "Http" + TCP = "Tcp" + HTTPS = "Https" + +class ProcessorArchitecture(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """VPN client Processor Architecture. + """ + + AMD64 = "Amd64" + X86 = "X86" + +class Protocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network protocol. + """ + + TCP = "Tcp" + HTTP = "Http" + HTTPS = "Https" + ICMP = "Icmp" + +class ProtocolType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """RNM supported protocol types. + """ + + DO_NOT_USE = "DoNotUse" + ICMP = "Icmp" + TCP = "Tcp" + UDP = "Udp" + GRE = "Gre" + ESP = "Esp" + AH = "Ah" + VXLAN = "Vxlan" + ALL = "All" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + +class PublicIPAddressMigrationPhase(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Migration phase of Public IP Address. + """ + + NONE = "None" + PREPARE = "Prepare" + COMMIT = "Commit" + ABORT = "Abort" + COMMITTED = "Committed" + +class PublicIPAddressSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of a public IP address SKU. + """ + + BASIC = "Basic" + STANDARD = "Standard" + +class PublicIPAddressSkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a public IP address SKU. + """ + + REGIONAL = "Regional" + GLOBAL_ENUM = "Global" + +class PublicIPPrefixSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of a public IP prefix SKU. + """ + + STANDARD = "Standard" + +class PublicIPPrefixSkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Tier of a public IP prefix SKU. + """ + + REGIONAL = "Regional" + GLOBAL_ENUM = "Global" + +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity used for the resource. The type 'SystemAssigned, UserAssigned' includes + both an implicitly created identity and a set of user assigned identities. The type 'None' will + remove any identities from the virtual machine. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + USER_ASSIGNED = "UserAssigned" + SYSTEM_ASSIGNED_USER_ASSIGNED = "SystemAssigned, UserAssigned" + NONE = "None" + +class RouteFilterRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The rule type of the rule. + """ + + COMMUNITY = "Community" + +class RouteNextHopType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of Azure hop the packet should be sent to. + """ + + VIRTUAL_NETWORK_GATEWAY = "VirtualNetworkGateway" + VNET_LOCAL = "VnetLocal" + INTERNET = "Internet" + VIRTUAL_APPLIANCE = "VirtualAppliance" + NONE = "None" + +class RoutingState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current routing state of the VirtualHub. + """ + + NONE = "None" + PROVISIONED = "Provisioned" + PROVISIONING = "Provisioning" + FAILED = "Failed" + +class SecurityPartnerProviderConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the connection with Security Partner Provider. + """ + + UNKNOWN = "Unknown" + PARTIALLY_CONNECTED = "PartiallyConnected" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class SecurityProviderName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Security Providers. + """ + + Z_SCALER = "ZScaler" + I_BOSS = "IBoss" + CHECKPOINT = "Checkpoint" + +class SecurityRuleAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether network traffic is allowed or denied. + """ + + ALLOW = "Allow" + DENY = "Deny" + +class SecurityRuleDirection(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The direction of the rule. The direction specifies if rule will be evaluated on incoming or + outgoing traffic. + """ + + INBOUND = "Inbound" + OUTBOUND = "Outbound" + +class SecurityRuleProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network protocol this rule applies to. + """ + + TCP = "Tcp" + UDP = "Udp" + ICMP = "Icmp" + ESP = "Esp" + ASTERISK = "*" + AH = "Ah" + +class ServiceProviderProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The ServiceProviderProvisioningState state of the resource. + """ + + NOT_PROVISIONED = "NotProvisioned" + PROVISIONING = "Provisioning" + PROVISIONED = "Provisioned" + DEPROVISIONING = "Deprovisioning" + +class Severity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The severity of the issue. + """ + + ERROR = "Error" + WARNING = "Warning" + +class SingleQueryResultDirection(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Describes in which direction signature is being enforced: 0 - Inbound, 1 - OutBound, 2 - + Bidirectional + """ + + ZERO = 0 + ONE = 1 + TWO = 2 + +class SingleQueryResultMode(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """The current mode enforced, 0 - Disabled, 1 - Alert, 2 -Deny + """ + + ZERO = 0 + ONE = 1 + TWO = 2 + +class SingleQueryResultSeverity(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """Describes the severity of signature: 1 - Low, 2 - Medium, 3 - High + """ + + ONE = 1 + TWO = 2 + THREE = 3 + +class SyncRemoteAddressSpace(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + TRUE = "true" + +class TransportProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The transport protocol for the endpoint. + """ + + UDP = "Udp" + TCP = "Tcp" + ALL = "All" + +class TunnelConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the tunnel. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class UsageUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """An enum describing the unit of measurement. + """ + + COUNT = "Count" + +class VerbosityLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Verbosity level. + """ + + NORMAL = "Normal" + MINIMUM = "Minimum" + FULL = "Full" + +class VirtualNetworkEncryptionEnforcement(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """If the encrypted VNet allows VM that does not support encryption + """ + + DROP_UNENCRYPTED = "DropUnencrypted" + ALLOW_UNENCRYPTED = "AllowUnencrypted" + +class VirtualNetworkGatewayConnectionMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gateway connection type. + """ + + DEFAULT = "Default" + RESPONDER_ONLY = "ResponderOnly" + INITIATOR_ONLY = "InitiatorOnly" + +class VirtualNetworkGatewayConnectionProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gateway connection protocol. + """ + + IK_EV2 = "IKEv2" + IK_EV1 = "IKEv1" + +class VirtualNetworkGatewayConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Virtual Network Gateway connection status. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class VirtualNetworkGatewayConnectionType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gateway connection type. + """ + + I_PSEC = "IPsec" + VNET2_VNET = "Vnet2Vnet" + EXPRESS_ROUTE = "ExpressRoute" + VPN_CLIENT = "VPNClient" + +class VirtualNetworkGatewaySkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gateway SKU name. + """ + + BASIC = "Basic" + HIGH_PERFORMANCE = "HighPerformance" + STANDARD = "Standard" + ULTRA_PERFORMANCE = "UltraPerformance" + VPN_GW1 = "VpnGw1" + VPN_GW2 = "VpnGw2" + VPN_GW3 = "VpnGw3" + VPN_GW4 = "VpnGw4" + VPN_GW5 = "VpnGw5" + VPN_GW1_AZ = "VpnGw1AZ" + VPN_GW2_AZ = "VpnGw2AZ" + VPN_GW3_AZ = "VpnGw3AZ" + VPN_GW4_AZ = "VpnGw4AZ" + VPN_GW5_AZ = "VpnGw5AZ" + ER_GW1_AZ = "ErGw1AZ" + ER_GW2_AZ = "ErGw2AZ" + ER_GW3_AZ = "ErGw3AZ" + +class VirtualNetworkGatewaySkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Gateway SKU tier. + """ + + BASIC = "Basic" + HIGH_PERFORMANCE = "HighPerformance" + STANDARD = "Standard" + ULTRA_PERFORMANCE = "UltraPerformance" + VPN_GW1 = "VpnGw1" + VPN_GW2 = "VpnGw2" + VPN_GW3 = "VpnGw3" + VPN_GW4 = "VpnGw4" + VPN_GW5 = "VpnGw5" + VPN_GW1_AZ = "VpnGw1AZ" + VPN_GW2_AZ = "VpnGw2AZ" + VPN_GW3_AZ = "VpnGw3AZ" + VPN_GW4_AZ = "VpnGw4AZ" + VPN_GW5_AZ = "VpnGw5AZ" + ER_GW1_AZ = "ErGw1AZ" + ER_GW2_AZ = "ErGw2AZ" + ER_GW3_AZ = "ErGw3AZ" + +class VirtualNetworkGatewayType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of this virtual network gateway. + """ + + VPN = "Vpn" + EXPRESS_ROUTE = "ExpressRoute" + LOCAL_GATEWAY = "LocalGateway" + +class VirtualNetworkPeeringLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The peering sync status of the virtual network peering. + """ + + FULLY_IN_SYNC = "FullyInSync" + REMOTE_NOT_IN_SYNC = "RemoteNotInSync" + LOCAL_NOT_IN_SYNC = "LocalNotInSync" + LOCAL_AND_REMOTE_NOT_IN_SYNC = "LocalAndRemoteNotInSync" + +class VirtualNetworkPeeringState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of the virtual network peering. + """ + + INITIATED = "Initiated" + CONNECTED = "Connected" + DISCONNECTED = "Disconnected" + +class VirtualNetworkPrivateEndpointNetworkPolicies(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enable or Disable apply network policies on private end point in the subnet. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class VirtualNetworkPrivateLinkServiceNetworkPolicies(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Enable or Disable apply network policies on private link service in the subnet. + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" + +class VirtualWanSecurityProviderType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The virtual wan security provider type. + """ + + EXTERNAL = "External" + NATIVE = "Native" + +class VpnAuthenticationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """VPN authentication types enabled for the virtual network gateway. + """ + + CERTIFICATE = "Certificate" + RADIUS = "Radius" + AAD = "AAD" + +class VpnClientProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """VPN client protocol enabled for the virtual network gateway. + """ + + IKE_V2 = "IkeV2" + SSTP = "SSTP" + OPEN_VPN = "OpenVPN" + +class VpnConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current state of the vpn connection. + """ + + UNKNOWN = "Unknown" + CONNECTING = "Connecting" + CONNECTED = "Connected" + NOT_CONNECTED = "NotConnected" + +class VpnGatewayGeneration(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The generation for this VirtualNetworkGateway. Must be None if gatewayType is not VPN. + """ + + NONE = "None" + GENERATION1 = "Generation1" + GENERATION2 = "Generation2" + +class VpnGatewayTunnelingProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """VPN protocol enabled for the VpnServerConfiguration. + """ + + IKE_V2 = "IkeV2" + OPEN_VPN = "OpenVPN" + +class VpnLinkConnectionMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Vpn link connection mode. + """ + + DEFAULT = "Default" + RESPONDER_ONLY = "ResponderOnly" + INITIATOR_ONLY = "InitiatorOnly" + +class VpnNatRuleMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The Source NAT direction of a VPN NAT. + """ + + EGRESS_SNAT = "EgressSnat" + INGRESS_SNAT = "IngressSnat" + +class VpnNatRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of NAT rule for VPN NAT. + """ + + STATIC = "Static" + DYNAMIC = "Dynamic" + +class VpnType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of this virtual network gateway. + """ + + POLICY_BASED = "PolicyBased" + ROUTE_BASED = "RouteBased" + +class WebApplicationFirewallAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of Actions. + """ + + ALLOW = "Allow" + BLOCK = "Block" + LOG = "Log" + +class WebApplicationFirewallEnabledState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The state of the policy. + """ + + DISABLED = "Disabled" + ENABLED = "Enabled" + +class WebApplicationFirewallMatchVariable(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Match Variable. + """ + + REMOTE_ADDR = "RemoteAddr" + REQUEST_METHOD = "RequestMethod" + QUERY_STRING = "QueryString" + POST_ARGS = "PostArgs" + REQUEST_URI = "RequestUri" + REQUEST_HEADERS = "RequestHeaders" + REQUEST_BODY = "RequestBody" + REQUEST_COOKIES = "RequestCookies" + +class WebApplicationFirewallMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The mode of the policy. + """ + + PREVENTION = "Prevention" + DETECTION = "Detection" + +class WebApplicationFirewallOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The operator to be matched. + """ + + IP_MATCH = "IPMatch" + EQUAL = "Equal" + CONTAINS = "Contains" + LESS_THAN = "LessThan" + GREATER_THAN = "GreaterThan" + LESS_THAN_OR_EQUAL = "LessThanOrEqual" + GREATER_THAN_OR_EQUAL = "GreaterThanOrEqual" + BEGINS_WITH = "BeginsWith" + ENDS_WITH = "EndsWith" + REGEX = "Regex" + GEO_MATCH = "GeoMatch" + +class WebApplicationFirewallPolicyResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Resource status of the policy. + """ + + CREATING = "Creating" + ENABLING = "Enabling" + ENABLED = "Enabled" + DISABLING = "Disabling" + DISABLED = "Disabled" + DELETING = "Deleting" + +class WebApplicationFirewallRuleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The rule type. + """ + + MATCH_RULE = "MatchRule" + INVALID = "Invalid" + +class WebApplicationFirewallTransform(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Transforms applied before matching. + """ + + LOWERCASE = "Lowercase" + TRIM = "Trim" + URL_DECODE = "UrlDecode" + URL_ENCODE = "UrlEncode" + REMOVE_NULLS = "RemoveNulls" + HTML_ENTITY_DECODE = "HtmlEntityDecode" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/__init__.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/__init__.py new file mode 100644 index 000000000000..aa657a943504 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/__init__.py @@ -0,0 +1,237 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._application_gateways_operations import ApplicationGatewaysOperations +from ._application_gateway_private_link_resources_operations import ApplicationGatewayPrivateLinkResourcesOperations +from ._application_gateway_private_endpoint_connections_operations import ApplicationGatewayPrivateEndpointConnectionsOperations +from ._application_security_groups_operations import ApplicationSecurityGroupsOperations +from ._available_delegations_operations import AvailableDelegationsOperations +from ._available_resource_group_delegations_operations import AvailableResourceGroupDelegationsOperations +from ._available_service_aliases_operations import AvailableServiceAliasesOperations +from ._azure_firewalls_operations import AzureFirewallsOperations +from ._azure_firewall_fqdn_tags_operations import AzureFirewallFqdnTagsOperations +from ._web_categories_operations import WebCategoriesOperations +from ._bastion_hosts_operations import BastionHostsOperations +from ._network_management_client_operations import NetworkManagementClientOperationsMixin +from ._network_interfaces_operations import NetworkInterfacesOperations +from ._public_ip_addresses_operations import PublicIPAddressesOperations +from ._custom_ip_prefixes_operations import CustomIPPrefixesOperations +from ._ddos_custom_policies_operations import DdosCustomPoliciesOperations +from ._ddos_protection_plans_operations import DdosProtectionPlansOperations +from ._dscp_configuration_operations import DscpConfigurationOperations +from ._available_endpoint_services_operations import AvailableEndpointServicesOperations +from ._express_route_circuit_authorizations_operations import ExpressRouteCircuitAuthorizationsOperations +from ._express_route_circuit_peerings_operations import ExpressRouteCircuitPeeringsOperations +from ._express_route_circuit_connections_operations import ExpressRouteCircuitConnectionsOperations +from ._peer_express_route_circuit_connections_operations import PeerExpressRouteCircuitConnectionsOperations +from ._express_route_circuits_operations import ExpressRouteCircuitsOperations +from ._express_route_service_providers_operations import ExpressRouteServiceProvidersOperations +from ._express_route_cross_connections_operations import ExpressRouteCrossConnectionsOperations +from ._express_route_cross_connection_peerings_operations import ExpressRouteCrossConnectionPeeringsOperations +from ._express_route_ports_locations_operations import ExpressRoutePortsLocationsOperations +from ._express_route_ports_operations import ExpressRoutePortsOperations +from ._express_route_links_operations import ExpressRouteLinksOperations +from ._firewall_policies_operations import FirewallPoliciesOperations +from ._firewall_policy_rule_collection_groups_operations import FirewallPolicyRuleCollectionGroupsOperations +from ._firewall_policy_idps_signatures_operations import FirewallPolicyIdpsSignaturesOperations +from ._firewall_policy_idps_signatures_overrides_operations import FirewallPolicyIdpsSignaturesOverridesOperations +from ._firewall_policy_idps_signatures_filter_values_operations import FirewallPolicyIdpsSignaturesFilterValuesOperations +from ._ip_allocations_operations import IpAllocationsOperations +from ._ip_groups_operations import IpGroupsOperations +from ._load_balancers_operations import LoadBalancersOperations +from ._load_balancer_backend_address_pools_operations import LoadBalancerBackendAddressPoolsOperations +from ._load_balancer_frontend_ip_configurations_operations import LoadBalancerFrontendIPConfigurationsOperations +from ._inbound_nat_rules_operations import InboundNatRulesOperations +from ._load_balancer_load_balancing_rules_operations import LoadBalancerLoadBalancingRulesOperations +from ._load_balancer_outbound_rules_operations import LoadBalancerOutboundRulesOperations +from ._load_balancer_network_interfaces_operations import LoadBalancerNetworkInterfacesOperations +from ._load_balancer_probes_operations import LoadBalancerProbesOperations +from ._nat_gateways_operations import NatGatewaysOperations +from ._network_interface_ip_configurations_operations import NetworkInterfaceIPConfigurationsOperations +from ._network_interface_load_balancers_operations import NetworkInterfaceLoadBalancersOperations +from ._network_interface_tap_configurations_operations import NetworkInterfaceTapConfigurationsOperations +from ._network_profiles_operations import NetworkProfilesOperations +from ._network_security_groups_operations import NetworkSecurityGroupsOperations +from ._security_rules_operations import SecurityRulesOperations +from ._default_security_rules_operations import DefaultSecurityRulesOperations +from ._network_virtual_appliances_operations import NetworkVirtualAppliancesOperations +from ._virtual_appliance_sites_operations import VirtualApplianceSitesOperations +from ._virtual_appliance_skus_operations import VirtualApplianceSkusOperations +from ._inbound_security_rule_operations import InboundSecurityRuleOperations +from ._network_watchers_operations import NetworkWatchersOperations +from ._packet_captures_operations import PacketCapturesOperations +from ._connection_monitors_operations import ConnectionMonitorsOperations +from ._flow_logs_operations import FlowLogsOperations +from ._operations import Operations +from ._private_endpoints_operations import PrivateEndpointsOperations +from ._available_private_endpoint_types_operations import AvailablePrivateEndpointTypesOperations +from ._private_dns_zone_groups_operations import PrivateDnsZoneGroupsOperations +from ._private_link_services_operations import PrivateLinkServicesOperations +from ._public_ip_prefixes_operations import PublicIPPrefixesOperations +from ._route_filters_operations import RouteFiltersOperations +from ._route_filter_rules_operations import RouteFilterRulesOperations +from ._route_tables_operations import RouteTablesOperations +from ._routes_operations import RoutesOperations +from ._security_partner_providers_operations import SecurityPartnerProvidersOperations +from ._bgp_service_communities_operations import BgpServiceCommunitiesOperations +from ._service_endpoint_policies_operations import ServiceEndpointPoliciesOperations +from ._service_endpoint_policy_definitions_operations import ServiceEndpointPolicyDefinitionsOperations +from ._service_tags_operations import ServiceTagsOperations +from ._service_tag_information_operations import ServiceTagInformationOperations +from ._usages_operations import UsagesOperations +from ._virtual_networks_operations import VirtualNetworksOperations +from ._subnets_operations import SubnetsOperations +from ._resource_navigation_links_operations import ResourceNavigationLinksOperations +from ._service_association_links_operations import ServiceAssociationLinksOperations +from ._virtual_network_peerings_operations import VirtualNetworkPeeringsOperations +from ._virtual_network_gateways_operations import VirtualNetworkGatewaysOperations +from ._virtual_network_gateway_connections_operations import VirtualNetworkGatewayConnectionsOperations +from ._local_network_gateways_operations import LocalNetworkGatewaysOperations +from ._virtual_network_gateway_nat_rules_operations import VirtualNetworkGatewayNatRulesOperations +from ._virtual_network_taps_operations import VirtualNetworkTapsOperations +from ._virtual_routers_operations import VirtualRoutersOperations +from ._virtual_router_peerings_operations import VirtualRouterPeeringsOperations +from ._virtual_wans_operations import VirtualWansOperations +from ._vpn_sites_operations import VpnSitesOperations +from ._vpn_site_links_operations import VpnSiteLinksOperations +from ._vpn_sites_configuration_operations import VpnSitesConfigurationOperations +from ._vpn_server_configurations_operations import VpnServerConfigurationsOperations +from ._virtual_hubs_operations import VirtualHubsOperations +from ._hub_virtual_network_connections_operations import HubVirtualNetworkConnectionsOperations +from ._vpn_gateways_operations import VpnGatewaysOperations +from ._vpn_link_connections_operations import VpnLinkConnectionsOperations +from ._vpn_connections_operations import VpnConnectionsOperations +from ._vpn_site_link_connections_operations import VpnSiteLinkConnectionsOperations +from ._nat_rules_operations import NatRulesOperations +from ._p2_svpn_gateways_operations import P2SVpnGatewaysOperations +from ._vpn_server_configurations_associated_with_virtual_wan_operations import VpnServerConfigurationsAssociatedWithVirtualWanOperations +from ._virtual_hub_route_table_v2_s_operations import VirtualHubRouteTableV2SOperations +from ._express_route_gateways_operations import ExpressRouteGatewaysOperations +from ._express_route_connections_operations import ExpressRouteConnectionsOperations +from ._virtual_hub_bgp_connection_operations import VirtualHubBgpConnectionOperations +from ._virtual_hub_bgp_connections_operations import VirtualHubBgpConnectionsOperations +from ._virtual_hub_ip_configuration_operations import VirtualHubIpConfigurationOperations +from ._hub_route_tables_operations import HubRouteTablesOperations +from ._routing_intent_operations import RoutingIntentOperations +from ._web_application_firewall_policies_operations import WebApplicationFirewallPoliciesOperations + +__all__ = [ + 'ApplicationGatewaysOperations', + 'ApplicationGatewayPrivateLinkResourcesOperations', + 'ApplicationGatewayPrivateEndpointConnectionsOperations', + 'ApplicationSecurityGroupsOperations', + 'AvailableDelegationsOperations', + 'AvailableResourceGroupDelegationsOperations', + 'AvailableServiceAliasesOperations', + 'AzureFirewallsOperations', + 'AzureFirewallFqdnTagsOperations', + 'WebCategoriesOperations', + 'BastionHostsOperations', + 'NetworkManagementClientOperationsMixin', + 'NetworkInterfacesOperations', + 'PublicIPAddressesOperations', + 'CustomIPPrefixesOperations', + 'DdosCustomPoliciesOperations', + 'DdosProtectionPlansOperations', + 'DscpConfigurationOperations', + 'AvailableEndpointServicesOperations', + 'ExpressRouteCircuitAuthorizationsOperations', + 'ExpressRouteCircuitPeeringsOperations', + 'ExpressRouteCircuitConnectionsOperations', + 'PeerExpressRouteCircuitConnectionsOperations', + 'ExpressRouteCircuitsOperations', + 'ExpressRouteServiceProvidersOperations', + 'ExpressRouteCrossConnectionsOperations', + 'ExpressRouteCrossConnectionPeeringsOperations', + 'ExpressRoutePortsLocationsOperations', + 'ExpressRoutePortsOperations', + 'ExpressRouteLinksOperations', + 'FirewallPoliciesOperations', + 'FirewallPolicyRuleCollectionGroupsOperations', + 'FirewallPolicyIdpsSignaturesOperations', + 'FirewallPolicyIdpsSignaturesOverridesOperations', + 'FirewallPolicyIdpsSignaturesFilterValuesOperations', + 'IpAllocationsOperations', + 'IpGroupsOperations', + 'LoadBalancersOperations', + 'LoadBalancerBackendAddressPoolsOperations', + 'LoadBalancerFrontendIPConfigurationsOperations', + 'InboundNatRulesOperations', + 'LoadBalancerLoadBalancingRulesOperations', + 'LoadBalancerOutboundRulesOperations', + 'LoadBalancerNetworkInterfacesOperations', + 'LoadBalancerProbesOperations', + 'NatGatewaysOperations', + 'NetworkInterfaceIPConfigurationsOperations', + 'NetworkInterfaceLoadBalancersOperations', + 'NetworkInterfaceTapConfigurationsOperations', + 'NetworkProfilesOperations', + 'NetworkSecurityGroupsOperations', + 'SecurityRulesOperations', + 'DefaultSecurityRulesOperations', + 'NetworkVirtualAppliancesOperations', + 'VirtualApplianceSitesOperations', + 'VirtualApplianceSkusOperations', + 'InboundSecurityRuleOperations', + 'NetworkWatchersOperations', + 'PacketCapturesOperations', + 'ConnectionMonitorsOperations', + 'FlowLogsOperations', + 'Operations', + 'PrivateEndpointsOperations', + 'AvailablePrivateEndpointTypesOperations', + 'PrivateDnsZoneGroupsOperations', + 'PrivateLinkServicesOperations', + 'PublicIPPrefixesOperations', + 'RouteFiltersOperations', + 'RouteFilterRulesOperations', + 'RouteTablesOperations', + 'RoutesOperations', + 'SecurityPartnerProvidersOperations', + 'BgpServiceCommunitiesOperations', + 'ServiceEndpointPoliciesOperations', + 'ServiceEndpointPolicyDefinitionsOperations', + 'ServiceTagsOperations', + 'ServiceTagInformationOperations', + 'UsagesOperations', + 'VirtualNetworksOperations', + 'SubnetsOperations', + 'ResourceNavigationLinksOperations', + 'ServiceAssociationLinksOperations', + 'VirtualNetworkPeeringsOperations', + 'VirtualNetworkGatewaysOperations', + 'VirtualNetworkGatewayConnectionsOperations', + 'LocalNetworkGatewaysOperations', + 'VirtualNetworkGatewayNatRulesOperations', + 'VirtualNetworkTapsOperations', + 'VirtualRoutersOperations', + 'VirtualRouterPeeringsOperations', + 'VirtualWansOperations', + 'VpnSitesOperations', + 'VpnSiteLinksOperations', + 'VpnSitesConfigurationOperations', + 'VpnServerConfigurationsOperations', + 'VirtualHubsOperations', + 'HubVirtualNetworkConnectionsOperations', + 'VpnGatewaysOperations', + 'VpnLinkConnectionsOperations', + 'VpnConnectionsOperations', + 'VpnSiteLinkConnectionsOperations', + 'NatRulesOperations', + 'P2SVpnGatewaysOperations', + 'VpnServerConfigurationsAssociatedWithVirtualWanOperations', + 'VirtualHubRouteTableV2SOperations', + 'ExpressRouteGatewaysOperations', + 'ExpressRouteConnectionsOperations', + 'VirtualHubBgpConnectionOperations', + 'VirtualHubBgpConnectionsOperations', + 'VirtualHubIpConfigurationOperations', + 'HubRouteTablesOperations', + 'RoutingIntentOperations', + 'WebApplicationFirewallPoliciesOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateway_private_endpoint_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateway_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..15ac3b213a2c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateway_private_endpoint_connections_operations.py @@ -0,0 +1,439 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ApplicationGatewayPrivateEndpointConnectionsOperations(object): + """ApplicationGatewayPrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + application_gateway_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + application_gateway_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + def _update_initial( + self, + resource_group_name, # type: str + application_gateway_name, # type: str + connection_name, # type: str + parameters, # type: "_models.ApplicationGatewayPrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ApplicationGatewayPrivateEndpointConnection"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayPrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ApplicationGatewayPrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + def begin_update( + self, + resource_group_name, # type: str + application_gateway_name, # type: str + connection_name, # type: str + parameters, # type: "_models.ApplicationGatewayPrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ApplicationGatewayPrivateEndpointConnection"] + """Updates the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :param parameters: Parameters supplied to update application gateway private endpoint + connection operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ApplicationGatewayPrivateEndpointConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + connection_name=connection_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + application_gateway_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationGatewayPrivateEndpointConnection" + """Gets the specified private endpoint connection on application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param connection_name: The name of the application gateway private endpoint connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGatewayPrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections/{connectionName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + application_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApplicationGatewayPrivateEndpointConnectionListResult"] + """Lists all private endpoint connections on an application gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplicationGatewayPrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateEndpointConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApplicationGatewayPrivateEndpointConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateEndpointConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_interface_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateway_private_link_resources_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_interface_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateway_private_link_resources_operations.py index 195642500ea4..9b95ab3fb16c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_interface_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateway_private_link_resources_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class NetworkInterfaceLoadBalancersOperations(object): - """NetworkInterfaceLoadBalancersOperations operations. +class ApplicationGatewayPrivateLinkResourcesOperations(object): + """ApplicationGatewayPrivateLinkResourcesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -48,28 +48,28 @@ def __init__(self, client, config, serializer, deserializer): def list( self, resource_group_name, # type: str - network_interface_name, # type: str + application_gateway_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceLoadBalancerListResult"] - """List all load balancers in a network interface. + # type: (...) -> Iterable["_models.ApplicationGatewayPrivateLinkResourceListResult"] + """Lists all private link resources on an application gateway. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceLoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceLoadBalancerListResult] + :return: An iterator like instance of either ApplicationGatewayPrivateLinkResourceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayPrivateLinkResourceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceLoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayPrivateLinkResourceListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -81,7 +81,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +97,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceLoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('ApplicationGatewayPrivateLinkResourceListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,4 +118,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/loadBalancers'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/privateLinkResources'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_application_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateways_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_application_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateways_operations.py index 35ca721fe907..06d94d854440 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_application_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_gateways_operations.py @@ -20,7 +20,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -32,7 +32,7 @@ class ApplicationGatewaysOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -141,7 +143,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -170,7 +172,7 @@ def get( :type application_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationGateway + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGateway :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] @@ -178,7 +180,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -227,7 +229,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -287,7 +289,7 @@ def begin_create_or_update( :param application_gateway_name: The name of the application gateway. :type application_gateway_name: str :param parameters: Parameters supplied to the create or update application gateway operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ApplicationGateway + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ApplicationGateway :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -295,7 +297,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ApplicationGateway] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -330,7 +332,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -344,7 +346,7 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - def _update_tags_initial( + def update_tags( self, resource_group_name, # type: str application_gateway_name, # type: str @@ -352,17 +354,30 @@ def _update_tags_initial( **kwargs # type: Any ): # type: (...) -> "_models.ApplicationGateway" + """Updates the specified application gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param parameters: Parameters supplied to update application gateway tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), @@ -396,79 +411,7 @@ def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - application_gateway_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ApplicationGateway"] - """Updates the specified application gateway tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param application_gateway_name: The name of the application gateway. - :type application_gateway_name: str - :param parameters: Parameters supplied to update application gateway tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ApplicationGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ApplicationGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - application_gateway_name=application_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}'} # type: ignore def list( self, @@ -482,7 +425,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] @@ -490,7 +433,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -550,7 +493,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayListResult"] @@ -558,7 +501,7 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -620,7 +563,8 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._start_initial.metadata['url'] # type: ignore @@ -637,6 +581,7 @@ def _start_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -702,7 +647,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -728,7 +673,8 @@ def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._stop_initial.metadata['url'] # type: ignore @@ -745,6 +691,7 @@ def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -810,7 +757,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -837,7 +784,7 @@ def _backend_health_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -900,7 +847,7 @@ def begin_backend_health( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ApplicationGatewayBackendHealth or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayBackendHealth] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealth] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -935,7 +882,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -949,6 +896,298 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_backend_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/backendhealth'} # type: ignore + def _backend_health_on_demand_initial( + self, + resource_group_name, # type: str + application_gateway_name, # type: str + probe_request, # type: "_models.ApplicationGatewayOnDemandProbe" + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ApplicationGatewayBackendHealthOnDemand"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApplicationGatewayBackendHealthOnDemand"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._backend_health_on_demand_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(probe_request, 'ApplicationGatewayOnDemandProbe') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ApplicationGatewayBackendHealthOnDemand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _backend_health_on_demand_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand'} # type: ignore + + def begin_backend_health_on_demand( + self, + resource_group_name, # type: str + application_gateway_name, # type: str + probe_request, # type: "_models.ApplicationGatewayOnDemandProbe" + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ApplicationGatewayBackendHealthOnDemand"] + """Gets the backend health for given combination of backend pool and http setting of the specified + application gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_gateway_name: The name of the application gateway. + :type application_gateway_name: str + :param probe_request: Request body for on-demand test probe operation. + :type probe_request: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayOnDemandProbe + :param expand: Expands BackendAddressPool and BackendHttpSettings referenced in backend health. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ApplicationGatewayBackendHealthOnDemand or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayBackendHealthOnDemand] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayBackendHealthOnDemand"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._backend_health_on_demand_initial( + resource_group_name=resource_group_name, + application_gateway_name=application_gateway_name, + probe_request=probe_request, + expand=expand, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ApplicationGatewayBackendHealthOnDemand', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationGatewayName': self._serialize.url("application_gateway_name", application_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_backend_health_on_demand.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationGateways/{applicationGatewayName}/getBackendHealthOnDemand'} # type: ignore + + def list_available_server_variables( + self, + **kwargs # type: Any + ): + # type: (...) -> List[str] + """Lists all available server variables. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_available_server_variables.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_available_server_variables.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableServerVariables'} # type: ignore + + def list_available_request_headers( + self, + **kwargs # type: Any + ): + # type: (...) -> List[str] + """Lists all available request headers. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_available_request_headers.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_available_request_headers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableRequestHeaders'} # type: ignore + + def list_available_response_headers( + self, + **kwargs # type: Any + ): + # type: (...) -> List[str] + """Lists all available response headers. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: list of str, or the result of cls(response) + :rtype: list[str] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[List[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_available_response_headers.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('[str]', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_available_response_headers.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationGatewayAvailableResponseHeaders'} # type: ignore + def list_available_waf_rule_sets( self, **kwargs # type: Any @@ -958,7 +1197,7 @@ def list_available_waf_rule_sets( :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationGatewayAvailableWafRuleSetsResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayAvailableWafRuleSetsResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAvailableWafRuleSetsResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableWafRuleSetsResult"] @@ -966,7 +1205,7 @@ def list_available_waf_rule_sets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -1009,7 +1248,7 @@ def list_available_ssl_options( :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationGatewayAvailableSslOptions, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayAvailableSslOptions + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAvailableSslOptions :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslOptions"] @@ -1017,7 +1256,7 @@ def list_available_ssl_options( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -1060,7 +1299,7 @@ def list_available_ssl_predefined_policies( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationGatewayAvailableSslPredefinedPolicies or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationGatewayAvailableSslPredefinedPolicies] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewayAvailableSslPredefinedPolicies"] @@ -1068,7 +1307,7 @@ def list_available_ssl_predefined_policies( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -1130,7 +1369,7 @@ def get_ssl_predefined_policy( :type predefined_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationGatewaySslPredefinedPolicy, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationGatewaySslPredefinedPolicy + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationGatewaySslPredefinedPolicy :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationGatewaySslPredefinedPolicy"] @@ -1138,7 +1377,7 @@ def get_ssl_predefined_policy( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_application_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_security_groups_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_application_security_groups_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_security_groups_operations.py index 21f2b2b19ca0..99ee9a338254 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_application_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_application_security_groups_operations.py @@ -32,7 +32,7 @@ class ApplicationSecurityGroupsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -141,7 +143,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -170,7 +172,7 @@ def get( :type application_security_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ApplicationSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] @@ -178,7 +180,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -227,7 +229,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -288,7 +290,7 @@ def begin_create_or_update( :type application_security_group_name: str :param parameters: Parameters supplied to the create or update ApplicationSecurityGroup operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -296,7 +298,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ApplicationSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroup] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -331,7 +333,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -345,6 +347,73 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + def update_tags( + self, + resource_group_name, # type: str + application_security_group_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ApplicationSecurityGroup" + """Updates an application security group's tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param application_security_group_name: The name of the application security group. + :type application_security_group_name: str + :param parameters: Parameters supplied to update application security group tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ApplicationSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + def list_all( self, **kwargs # type: Any @@ -354,7 +423,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroupListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] @@ -362,7 +431,7 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -424,7 +493,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.ApplicationSecurityGroupListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ApplicationSecurityGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] @@ -432,7 +501,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_available_endpoint_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_delegations_operations.py similarity index 85% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_available_endpoint_services_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_delegations_operations.py index e57329fffbd4..13179a980487 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_available_endpoint_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_delegations_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class AvailableEndpointServicesOperations(object): - """AvailableEndpointServicesOperations operations. +class AvailableDelegationsOperations(object): + """AvailableDelegationsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,22 +50,22 @@ def list( location, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.EndpointServicesListResult"] - """List what values of endpoint services are available for use. + # type: (...) -> Iterable["_models.AvailableDelegationsResult"] + """Gets all of the available subnet delegations for this subscription in this region. - :param location: The location to check available endpoint services. + :param location: The location of the subnet. :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either EndpointServicesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.EndpointServicesListResult] + :return: An iterator like instance of either AvailableDelegationsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailableDelegationsResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointServicesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableDelegationsResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -93,7 +93,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('EndpointServicesListResult', pipeline_response) + deserialized = self._deserialize('AvailableDelegationsResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -114,4 +114,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/virtualNetworkAvailableEndpointServices'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableDelegations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_available_endpoint_services_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_endpoint_services_operations.py similarity index 97% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_available_endpoint_services_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_endpoint_services_operations.py index c4171bf78c42..f2986bf30d73 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_available_endpoint_services_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_endpoint_services_operations.py @@ -30,7 +30,7 @@ class AvailableEndpointServicesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,7 +57,7 @@ def list( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either EndpointServicesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.EndpointServicesListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.EndpointServicesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EndpointServicesListResult"] @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_private_endpoint_types_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_private_endpoint_types_operations.py new file mode 100644 index 000000000000..d461eb36e1a2 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_private_endpoint_types_operations.py @@ -0,0 +1,194 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AvailablePrivateEndpointTypesOperations(object): + """AvailablePrivateEndpointTypesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailablePrivateEndpointTypesResult"] + """Returns all of the resource types that can be linked to a Private Endpoint in this subscription + in this region. + + :param location: The location of the domain name. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailablePrivateEndpointTypesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailablePrivateEndpointTypesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailablePrivateEndpointTypesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailablePrivateEndpointTypesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes'} # type: ignore + + def list_by_resource_group( + self, + location, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailablePrivateEndpointTypesResult"] + """Returns all of the resource types that can be linked to a Private Endpoint in this subscription + in this region. + + :param location: The location of the domain name. + :type location: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailablePrivateEndpointTypesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailablePrivateEndpointTypesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailablePrivateEndpointTypesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailablePrivateEndpointTypesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availablePrivateEndpointTypes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_resource_group_delegations_operations.py similarity index 81% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_resource_group_delegations_operations.py index 8bc9432439ac..5c90b6ab9c0b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_resource_group_delegations_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerNetworkInterfacesOperations(object): - """LoadBalancerNetworkInterfacesOperations operations. +class AvailableResourceGroupDelegationsOperations(object): + """AvailableResourceGroupDelegationsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,29 +47,29 @@ def __init__(self, client, config, serializer, deserializer): def list( self, + location, # type: str resource_group_name, # type: str - load_balancer_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets associated load balancer network interfaces. + # type: (...) -> Iterable["_models.AvailableDelegationsResult"] + """Gets all of the available subnet delegations for this resource group in this region. + :param location: The location of the domain name. + :type location: str :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either AvailableDelegationsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailableDelegationsResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableDelegationsResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -80,8 +80,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +97,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('AvailableDelegationsResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,4 +118,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableDelegations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_service_aliases_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_service_aliases_operations.py new file mode 100644 index 000000000000..8b18a5a89c63 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_available_service_aliases_operations.py @@ -0,0 +1,192 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class AvailableServiceAliasesOperations(object): + """AvailableServiceAliasesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailableServiceAliasesResult"] + """Gets all available service aliases for this subscription in this region. + + :param location: The location. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableServiceAliasesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailableServiceAliasesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableServiceAliasesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableServiceAliasesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/availableServiceAliases'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AvailableServiceAliasesResult"] + """Gets all available service aliases for this resource group in this region. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param location: The location. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AvailableServiceAliasesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AvailableServiceAliasesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailableServiceAliasesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AvailableServiceAliasesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/availableServiceAliases'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_bgp_service_communities_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_azure_firewall_fqdn_tags_operations.py similarity index 83% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_bgp_service_communities_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_azure_firewall_fqdn_tags_operations.py index 862ba9d423b6..38e0d15cea2d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_bgp_service_communities_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_azure_firewall_fqdn_tags_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class BgpServiceCommunitiesOperations(object): - """BgpServiceCommunitiesOperations operations. +class AzureFirewallFqdnTagsOperations(object): + """AzureFirewallFqdnTagsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,24 +45,24 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def list( + def list_all( self, **kwargs # type: Any ): - # type: (...) -> Iterable["_models.BgpServiceCommunityListResult"] - """Gets all the available bgp service communities. + # type: (...) -> Iterable["_models.AzureFirewallFqdnTagListResult"] + """Gets all the Azure Firewall FQDN Tags in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either BgpServiceCommunityListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.BgpServiceCommunityListResult] + :return: An iterator like instance of either AzureFirewallFqdnTagListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AzureFirewallFqdnTagListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpServiceCommunityListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallFqdnTagListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -72,7 +72,7 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_all.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -89,7 +89,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('BgpServiceCommunityListResult', pipeline_response) + deserialized = self._deserialize('AzureFirewallFqdnTagListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -110,4 +110,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/bgpServiceCommunities'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewallFqdnTags'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_azure_firewalls_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_azure_firewalls_operations.py index ff877beaaa8c..1c149d65f843 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_azure_firewalls_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancersOperations(object): - """LoadBalancersOperations operations. +class AzureFirewallsOperations(object): + """AzureFirewallsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - load_balancer_name, # type: str + azure_firewall_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -59,13 +59,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -88,21 +90,21 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - load_balancer_name, # type: str + azure_firewall_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified load balancer. + """Deletes the specified Azure Firewall. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -123,7 +125,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + azure_firewall_name=azure_firewall_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,11 +139,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,42 +155,39 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore def get( self, resource_group_name, # type: str - load_balancer_name, # type: str - expand=None, # type: Optional[str] + azure_firewall_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.LoadBalancer" - """Gets the specified load balancer. + # type: (...) -> "_models.AzureFirewall" + """Gets the specified Azure Firewall. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param expand: Expands referenced resources. - :type expand: str + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancer, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.LoadBalancer + :return: AzureFirewall, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.AzureFirewall :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -196,8 +195,6 @@ def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -211,36 +208,36 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - load_balancer_name, # type: str - parameters, # type: "_models.LoadBalancer" + azure_firewall_name, # type: str + parameters, # type: "_models.AzureFirewall" **kwargs # type: Any ): - # type: (...) -> "_models.LoadBalancer" - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + # type: (...) -> "_models.AzureFirewall" + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str', max_length=56, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +252,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LoadBalancer') + body_content = self._serialize.body(parameters, 'AzureFirewall') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,45 +263,45 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - load_balancer_name, # type: str - parameters, # type: "_models.LoadBalancer" + azure_firewall_name, # type: str + parameters, # type: "_models.AzureFirewall" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.LoadBalancer"] - """Creates or updates a load balancer. + # type: (...) -> LROPoller["_models.AzureFirewall"] + """Creates or updates the specified Azure Firewall. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.LoadBalancer + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :param parameters: Parameters supplied to the create or update Azure Firewall operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.AzureFirewall :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.LoadBalancer] + :return: An instance of LROPoller that returns either AzureFirewall or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.AzureFirewall] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -313,7 +310,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + azure_firewall_name=azure_firewall_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -323,7 +320,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -331,11 +328,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str', max_length=56, min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -347,30 +344,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore def _update_tags_initial( self, resource_group_name, # type: str - load_balancer_name, # type: str + azure_firewall_name, # type: str parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.LoadBalancer" - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + # type: (...) -> Optional["_models.AzureFirewall"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.AzureFirewall"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -391,46 +388,48 @@ def _update_tags_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore def begin_update_tags( self, resource_group_name, # type: str - load_balancer_name, # type: str + azure_firewall_name, # type: str parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.LoadBalancer"] - """Updates a load balancer tags. + # type: (...) -> LROPoller["_models.AzureFirewall"] + """Updates tags of an Azure Firewall resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject + :param azure_firewall_name: The name of the Azure Firewall. + :type azure_firewall_name: str + :param parameters: Parameters supplied to update azure firewall tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.LoadBalancer] + :return: An instance of LROPoller that returns either AzureFirewall or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.AzureFirewall] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewall"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -439,7 +438,7 @@ def begin_update_tags( if cont_token is None: raw_result = self._update_tags_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + azure_firewall_name=azure_firewall_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -449,7 +448,7 @@ def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('AzureFirewall', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -457,11 +456,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'azureFirewallName': self._serialize.url("azure_firewall_name", azure_firewall_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -473,27 +472,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls/{azureFirewallName}'} # type: ignore - def list_all( + def list( self, + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerListResult"] - """Gets all the load balancers in a subscription. + # type: (...) -> Iterable["_models.AzureFirewallListResult"] + """Lists all Azure Firewalls in a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerListResult] + :return: An iterator like instance of either AzureFirewallListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AzureFirewallListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -502,8 +504,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -519,7 +522,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('AzureFirewallListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -540,30 +543,27 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/azureFirewalls'} # type: ignore - def list( + def list_all( self, - resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerListResult"] - """Gets all the load balancers in a resource group. + # type: (...) -> Iterable["_models.AzureFirewallListResult"] + """Gets all the Azure Firewalls in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerListResult] + :return: An iterator like instance of either AzureFirewallListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AzureFirewallListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureFirewallListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -572,9 +572,8 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_all.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -590,7 +589,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('AzureFirewallListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -611,4 +610,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureFirewalls'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_tables_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_bastion_hosts_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_tables_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_bastion_hosts_operations.py index 88fb3f6bb4c2..41674566800c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_tables_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_bastion_hosts_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class RouteTablesOperations(object): - """RouteTablesOperations operations. +class BastionHostsOperations(object): + """BastionHostsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - route_table_name, # type: str + bastion_host_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -59,13 +59,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -88,21 +90,21 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - route_table_name, # type: str + bastion_host_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified route table. + """Deletes the specified Bastion Host. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -123,7 +125,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + bastion_host_name=bastion_host_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,11 +139,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,42 +155,39 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore def get( self, resource_group_name, # type: str - route_table_name, # type: str - expand=None, # type: Optional[str] + bastion_host_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.RouteTable" - """Gets the specified route table. + # type: (...) -> "_models.BastionHost" + """Gets the specified Bastion Host. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param expand: Expands referenced resources. - :type expand: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteTable, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.RouteTable + :return: BastionHost, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.BastionHost :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -196,8 +195,6 @@ def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -211,36 +208,36 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - route_table_name, # type: str - parameters, # type: "_models.RouteTable" + bastion_host_name, # type: str + parameters, # type: "_models.BastionHost" **kwargs # type: Any ): - # type: (...) -> "_models.RouteTable" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + # type: (...) -> "_models.BastionHost" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +252,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'RouteTable') + body_content = self._serialize.body(parameters, 'BastionHost') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,45 +263,45 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - route_table_name, # type: str - parameters, # type: "_models.RouteTable" + bastion_host_name, # type: str + parameters, # type: "_models.BastionHost" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.RouteTable"] - """Create or updates a route table in a specified resource group. + # type: (...) -> LROPoller["_models.BastionHost"] + """Creates or updates the specified Bastion Host. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param parameters: Parameters supplied to the create or update route table operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.RouteTable + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param parameters: Parameters supplied to the create or update Bastion Host operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.BastionHost :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.RouteTable] + :return: An instance of LROPoller that returns either BastionHost or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.BastionHost] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -313,7 +310,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + bastion_host_name=bastion_host_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -323,7 +320,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -331,11 +328,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -347,31 +344,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore def _update_tags_initial( self, resource_group_name, # type: str - route_table_name, # type: str + bastion_host_name, # type: str parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.RouteTable" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + # type: (...) -> Optional["_models.BastionHost"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionHost"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -391,46 +388,48 @@ def _update_tags_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore def begin_update_tags( self, resource_group_name, # type: str - route_table_name, # type: str + bastion_host_name, # type: str parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.RouteTable"] - """Updates a route table tags. + # type: (...) -> LROPoller["_models.BastionHost"] + """Updates Tags for BastionHost resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param parameters: Parameters supplied to update route table tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param parameters: Parameters supplied to update BastionHost tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.RouteTable] + :return: An instance of LROPoller that returns either BastionHost or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.BastionHost] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHost"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -439,7 +438,7 @@ def begin_update_tags( if cont_token is None: raw_result = self._update_tags_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + bastion_host_name=bastion_host_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -449,19 +448,19 @@ def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('BastionHost', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -473,30 +472,27 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}'} # type: ignore def list( self, - resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteTableListResult"] - """Gets all route tables in a resource group. + # type: (...) -> Iterable["_models.BastionHostListResult"] + """Lists all Bastion Hosts in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteTableListResult] + :return: An iterator like instance of either BastionHostListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionHostListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHostListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -507,7 +503,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -523,7 +518,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteTableListResult', pipeline_response) + deserialized = self._deserialize('BastionHostListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -544,27 +539,30 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/bastionHosts'} # type: ignore - def list_all( + def list_by_resource_group( self, + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteTableListResult"] - """Gets all route tables in a subscription. + # type: (...) -> Iterable["_models.BastionHostListResult"] + """Lists all Bastion Hosts in a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteTableListResult] + :return: An iterator like instance of either BastionHostListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionHostListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionHostListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -573,8 +571,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -590,7 +589,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteTableListResult', pipeline_response) + deserialized = self._deserialize('BastionHostListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -611,4 +610,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_bgp_service_communities_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_bgp_service_communities_operations.py similarity index 97% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_bgp_service_communities_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_bgp_service_communities_operations.py index 2c3c45d090ee..24b9cb86fe95 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_bgp_service_communities_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_bgp_service_communities_operations.py @@ -30,7 +30,7 @@ class BgpServiceCommunitiesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either BgpServiceCommunityListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.BgpServiceCommunityListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BgpServiceCommunityListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpServiceCommunityListResult"] @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_connection_monitors_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_connection_monitors_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_connection_monitors_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_connection_monitors_operations.py index 3b856d7164dc..aabac7d6a97f 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_connection_monitors_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_connection_monitors_operations.py @@ -32,7 +32,7 @@ class ConnectionMonitorsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,6 +53,7 @@ def _create_or_update_initial( network_watcher_name, # type: str connection_monitor_name, # type: str parameters, # type: "_models.ConnectionMonitor" + migrate=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> "_models.ConnectionMonitorResult" @@ -61,9 +62,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -78,6 +79,8 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if migrate is not None: + query_parameters['migrate'] = self._serialize.query("migrate", migrate, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -93,7 +96,8 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) @@ -113,6 +117,7 @@ def begin_create_or_update( network_watcher_name, # type: str connection_monitor_name, # type: str parameters, # type: "_models.ConnectionMonitor" + migrate=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.ConnectionMonitorResult"] @@ -125,7 +130,9 @@ def begin_create_or_update( :param connection_monitor_name: The name of the connection monitor. :type connection_monitor_name: str :param parameters: Parameters that define the operation to create a connection monitor. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitor + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitor + :param migrate: Value indicating whether connection monitor V1 should be migrated to V2 format. + :type migrate: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -133,7 +140,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ConnectionMonitorResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -149,6 +156,7 @@ def begin_create_or_update( network_watcher_name=network_watcher_name, connection_monitor_name=connection_monitor_name, parameters=parameters, + migrate=migrate, cls=lambda x,y,z: x, **kwargs ) @@ -170,7 +178,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -202,7 +210,7 @@ def get( :type connection_monitor_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ConnectionMonitorResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] @@ -210,8 +218,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -237,7 +245,8 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) @@ -260,7 +269,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -278,6 +288,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -285,7 +296,8 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -348,7 +360,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -362,6 +374,78 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'} # type: ignore + def update_tags( + self, + resource_group_name, # type: str + network_watcher_name, # type: str + connection_monitor_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ConnectionMonitorResult" + """Update tags of the specified connection monitor. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param connection_monitor_name: The name of the connection monitor. + :type connection_monitor_name: str + :param parameters: Parameters supplied to update connection monitor tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionMonitorResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'connectionMonitorName': self._serialize.url("connection_monitor_name", connection_monitor_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionMonitorResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'} # type: ignore + def _stop_initial( self, resource_group_name, # type: str @@ -375,7 +459,8 @@ def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._stop_initial.metadata['url'] # type: ignore @@ -393,6 +478,7 @@ def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -400,7 +486,8 @@ def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -463,7 +550,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -490,7 +577,8 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._start_initial.metadata['url'] # type: ignore @@ -508,6 +596,7 @@ def _start_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -515,7 +604,8 @@ def _start_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -578,7 +668,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -605,8 +695,8 @@ def _query_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._query_initial.metadata['url'] # type: ignore @@ -632,7 +722,8 @@ def _query_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('ConnectionMonitorQueryResult', pipeline_response) @@ -669,7 +760,7 @@ def begin_query( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ConnectionMonitorQueryResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorQueryResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorQueryResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -705,7 +796,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -734,7 +825,7 @@ def list( :type network_watcher_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ConnectionMonitorListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ConnectionMonitorListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ConnectionMonitorListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionMonitorListResult"] @@ -742,8 +833,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -784,8 +875,9 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_custom_ip_prefixes_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_custom_ip_prefixes_operations.py index 3b2d0f2d03e0..17dd5431592e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_custom_ip_prefixes_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancersOperations(object): - """LoadBalancersOperations operations. +class CustomIPPrefixesOperations(object): + """CustomIPPrefixesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - load_balancer_name, # type: str + custom_ip_prefix_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -59,13 +59,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -88,21 +90,21 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - load_balancer_name, # type: str + custom_ip_prefix_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified load balancer. + """Deletes the specified custom IP prefix. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param custom_ip_prefix_name: The name of the CustomIpPrefix. + :type custom_ip_prefix_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -123,7 +125,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + custom_ip_prefix_name=custom_ip_prefix_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,11 +139,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,42 +155,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore def get( self, resource_group_name, # type: str - load_balancer_name, # type: str + custom_ip_prefix_name, # type: str expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "_models.LoadBalancer" - """Gets the specified load balancer. + # type: (...) -> "_models.CustomIpPrefix" + """Gets the specified custom IP prefix in a specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancer, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.LoadBalancer + :return: CustomIpPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -211,36 +213,36 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - load_balancer_name, # type: str - parameters, # type: "_models.LoadBalancer" + custom_ip_prefix_name, # type: str + parameters, # type: "_models.CustomIpPrefix" **kwargs # type: Any ): - # type: (...) -> "_models.LoadBalancer" - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + # type: (...) -> "_models.CustomIpPrefix" + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +257,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LoadBalancer') + body_content = self._serialize.body(parameters, 'CustomIpPrefix') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,45 +268,45 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - load_balancer_name, # type: str - parameters, # type: "_models.LoadBalancer" + custom_ip_prefix_name, # type: str + parameters, # type: "_models.CustomIpPrefix" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.LoadBalancer"] - """Creates or updates a load balancer. + # type: (...) -> LROPoller["_models.CustomIpPrefix"] + """Creates or updates a custom IP prefix. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.LoadBalancer + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param parameters: Parameters supplied to the create or update custom IP prefix operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.LoadBalancer] + :return: An instance of LROPoller that returns either CustomIpPrefix or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -313,7 +315,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + custom_ip_prefix_name=custom_ip_prefix_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -323,7 +325,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -331,11 +333,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -347,30 +349,43 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore - def _update_tags_initial( + def update_tags( self, resource_group_name, # type: str - load_balancer_name, # type: str + custom_ip_prefix_name, # type: str parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.LoadBalancer" - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + # type: (...) -> "_models.CustomIpPrefix" + """Updates custom IP prefix tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param custom_ip_prefix_name: The name of the custom IP prefix. + :type custom_ip_prefix_name: str + :param parameters: Parameters supplied to update custom IP prefix tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: CustomIpPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.CustomIpPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefix"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'customIpPrefixName': self._serialize.url("custom_ip_prefix_name", custom_ip_prefix_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -395,105 +410,33 @@ def _update_tags_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('LoadBalancer', pipeline_response) + deserialized = self._deserialize('CustomIpPrefix', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - load_balancer_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.LoadBalancer"] - """Updates a load balancer tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to update load balancer tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.LoadBalancer] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes/{customIpPrefixName}'} # type: ignore def list_all( self, **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerListResult"] - """Gets all the load balancers in a subscription. + # type: (...) -> Iterable["_models.CustomIpPrefixListResult"] + """Gets all the custom IP prefixes in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerListResult] + :return: An iterator like instance of either CustomIpPrefixListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.CustomIpPrefixListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefixListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -519,7 +462,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('CustomIpPrefixListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -540,30 +483,30 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/customIpPrefixes'} # type: ignore def list( self, resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerListResult"] - """Gets all the load balancers in a resource group. + # type: (...) -> Iterable["_models.CustomIpPrefixListResult"] + """Gets all custom IP prefixes in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerListResult] + :return: An iterator like instance of either CustomIpPrefixListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.CustomIpPrefixListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomIpPrefixListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -590,7 +533,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('CustomIpPrefixListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -611,4 +554,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/customIpPrefixes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ddos_custom_policies_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ddos_custom_policies_operations.py new file mode 100644 index 000000000000..85b50f4a4cf0 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ddos_custom_policies_operations.py @@ -0,0 +1,413 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DdosCustomPoliciesOperations(object): + """DdosCustomPoliciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + ddos_custom_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + ddos_custom_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + ddos_custom_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DdosCustomPolicy" + """Gets information about the specified DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosCustomPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + ddos_custom_policy_name, # type: str + parameters, # type: "_models.DdosCustomPolicy" + **kwargs # type: Any + ): + # type: (...) -> "_models.DdosCustomPolicy" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DdosCustomPolicy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + ddos_custom_policy_name, # type: str + parameters, # type: "_models.DdosCustomPolicy" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DdosCustomPolicy"] + """Creates or updates a DDoS custom policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :param parameters: Parameters supplied to the create or update operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DdosCustomPolicy or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicy] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + ddos_custom_policy_name=ddos_custom_policy_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + ddos_custom_policy_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.DdosCustomPolicy" + """Update a DDoS custom policy tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_custom_policy_name: The name of the DDoS custom policy. + :type ddos_custom_policy_name: str + :param parameters: Parameters supplied to update DDoS custom policy resource tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosCustomPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DdosCustomPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosCustomPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosCustomPolicyName': self._serialize.url("ddos_custom_policy_name", ddos_custom_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosCustomPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosCustomPolicies/{ddosCustomPolicyName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ddos_protection_plans_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ddos_protection_plans_operations.py new file mode 100644 index 000000000000..52da9763677e --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ddos_protection_plans_operations.py @@ -0,0 +1,552 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class DdosProtectionPlansOperations(object): + """DdosProtectionPlansOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + ddos_protection_plan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + ddos_protection_plan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + ddos_protection_plan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DdosProtectionPlan" + """Gets information about the specified DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosProtectionPlan, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + ddos_protection_plan_name, # type: str + parameters, # type: "_models.DdosProtectionPlan" + **kwargs # type: Any + ): + # type: (...) -> "_models.DdosProtectionPlan" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DdosProtectionPlan') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + ddos_protection_plan_name, # type: str + parameters, # type: "_models.DdosProtectionPlan" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.DdosProtectionPlan"] + """Creates or updates a DDoS protection plan. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :param parameters: Parameters supplied to the create or update operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either DdosProtectionPlan or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + ddos_protection_plan_name=ddos_protection_plan_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + ddos_protection_plan_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.DdosProtectionPlan" + """Update a DDoS protection plan tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ddos_protection_plan_name: The name of the DDoS protection plan. + :type ddos_protection_plan_name: str + :param parameters: Parameters supplied to the update DDoS protection plan resource tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DdosProtectionPlan, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlan + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlan"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ddosProtectionPlanName': self._serialize.url("ddos_protection_plan_name", ddos_protection_plan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DdosProtectionPlan', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DdosProtectionPlanListResult"] + """Gets all DDoS protection plans in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DdosProtectionPlanListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DdosProtectionPlanListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.DdosProtectionPlanListResult"] + """Gets all the DDoS protection plans in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either DdosProtectionPlanListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.DdosProtectionPlanListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DdosProtectionPlanListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('DdosProtectionPlanListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_default_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_default_security_rules_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_default_security_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_default_security_rules_operations.py index 635960a5088e..76c919368b17 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_default_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_default_security_rules_operations.py @@ -30,7 +30,7 @@ class DefaultSecurityRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type network_security_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.SecurityRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.SecurityRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] @@ -68,8 +68,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -138,7 +138,7 @@ def get( :type default_security_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.SecurityRule + :rtype: ~azure.mgmt.network.v2021_05_01.models.SecurityRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] @@ -146,8 +146,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_dscp_configuration_operations.py similarity index 80% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_dscp_configuration_operations.py index 198461d9c69f..9fc471f72349 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_dscp_configuration_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancersOperations(object): - """LoadBalancersOperations operations. +class DscpConfigurationOperations(object): + """DscpConfigurationOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,25 +47,28 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def _create_or_update_initial( self, resource_group_name, # type: str - load_balancer_name, # type: str + dscp_configuration_name, # type: str + parameters, # type: "_models.DscpConfiguration" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.DscpConfiguration" + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,54 +79,70 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'DscpConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore - def begin_delete( + def begin_create_or_update( self, resource_group_name, # type: str - load_balancer_name, # type: str + dscp_configuration_name, # type: str + parameters, # type: "_models.DscpConfiguration" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified load balancer. + # type: (...) -> LROPoller["_models.DscpConfiguration"] + """Creates or updates a DSCP Configuration. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str + :param parameters: Parameters supplied to the create or update dscp configuration operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.DscpConfiguration :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either DscpConfiguration or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.DscpConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, + dscp_configuration_name=dscp_configuration_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -132,16 +151,19 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,94 +175,28 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore - def get( - self, - resource_group_name, # type: str - load_balancer_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.LoadBalancer" - """Gets the specified load balancer. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancer, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.LoadBalancer - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('LoadBalancer', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - - def _create_or_update_initial( + def _delete_initial( self, resource_group_name, # type: str - load_balancer_name, # type: str - parameters, # type: "_models.LoadBalancer" + dscp_configuration_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.LoadBalancer" - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -251,70 +207,55 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LoadBalancer') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('LoadBalancer', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('LoadBalancer', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore - def begin_create_or_update( + def begin_delete( self, resource_group_name, # type: str - load_balancer_name, # type: str - parameters, # type: "_models.LoadBalancer" + dscp_configuration_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.LoadBalancer"] - """Creates or updates a load balancer. + # type: (...) -> LROPoller[None] + """Deletes a DSCP Configuration. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param parameters: Parameters supplied to the create or update load balancer operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.LoadBalancer + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either LoadBalancer or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.LoadBalancer] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - load_balancer_name=load_balancer_name, - parameters=parameters, + dscp_configuration_name=dscp_configuration_name, cls=lambda x,y,z: x, **kwargs ) @@ -323,19 +264,16 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LoadBalancer', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -347,27 +285,89 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore - def list_all( + def get( + self, + resource_group_name, # type: str + dscp_configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.DscpConfiguration" + """Gets a DSCP Configuration. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dscp_configuration_name: The name of the resource. + :type dscp_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: DscpConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DscpConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'dscpConfigurationName': self._serialize.url("dscp_configuration_name", dscp_configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('DscpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations/{dscpConfigurationName}'} # type: ignore + + def list( self, + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerListResult"] - """Gets all the load balancers in a subscription. + # type: (...) -> Iterable["_models.DscpConfigurationListResult"] + """Gets a DSCP Configuration. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerListResult] + :return: An iterator like instance of either DscpConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.DscpConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -376,8 +376,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -393,7 +394,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('DscpConfigurationListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -414,30 +415,27 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dscpConfigurations'} # type: ignore - def list( + def list_all( self, - resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerListResult"] - """Gets all the load balancers in a resource group. + # type: (...) -> Iterable["_models.DscpConfigurationListResult"] + """Gets all dscp configurations in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerListResult] + :return: An iterator like instance of either DscpConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.DscpConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DscpConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -446,9 +444,8 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_all.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -464,7 +461,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + deserialized = self._deserialize('DscpConfigurationListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -485,4 +482,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/dscpConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuit_authorizations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuit_authorizations_operations.py similarity index 95% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuit_authorizations_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuit_authorizations_operations.py index b4700138ba1b..6e01e3aa8c63 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuit_authorizations_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuit_authorizations_operations.py @@ -32,7 +32,7 @@ class ExpressRouteCircuitAuthorizationsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -78,6 +79,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -148,7 +150,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -180,7 +182,7 @@ def get( :type authorization_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuitAuthorization, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] @@ -188,8 +190,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -239,9 +241,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -304,7 +306,7 @@ def begin_create_or_update( :type authorization_name: str :param authorization_parameters: Parameters supplied to the create or update express route circuit authorization operation. - :type authorization_parameters: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization + :type authorization_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -312,7 +314,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ExpressRouteCircuitAuthorization or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitAuthorization] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitAuthorization] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -349,7 +351,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -378,7 +380,7 @@ def list( :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AuthorizationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.AuthorizationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AuthorizationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationListResult"] @@ -386,8 +388,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuit_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuit_connections_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuit_peerings_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuit_connections_operations.py index 2856d9cdd210..a2fd42358548 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_express_route_circuit_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuit_connections_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitPeeringsOperations(object): - """ExpressRouteCircuitPeeringsOperations operations. +class ExpressRouteCircuitConnectionsOperations(object): + """ExpressRouteCircuitConnectionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -52,6 +52,7 @@ def _delete_initial( resource_group_name, # type: str circuit_name, # type: str peering_name, # type: str + connection_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -60,7 +61,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -68,6 +70,7 @@ def _delete_initial( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,6 +81,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -90,17 +94,19 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str circuit_name, # type: str peering_name, # type: str + connection_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified peering from the specified express route circuit. + """Deletes the specified Express Route Circuit Connection from the specified express route + circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -108,6 +114,8 @@ def begin_delete( :type circuit_name: str :param peering_name: The name of the peering. :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -130,6 +138,7 @@ def begin_delete( resource_group_name=resource_group_name, circuit_name=circuit_name, peering_name=peering_name, + connection_name=connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -145,10 +154,11 @@ def get_long_running_output(pipeline_response): 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,17 +170,18 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore def get( self, resource_group_name, # type: str circuit_name, # type: str peering_name, # type: str + connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuitPeering" - """Gets the specified authorization from the specified express route circuit. + # type: (...) -> "_models.ExpressRouteCircuitConnection" + """Gets the specified Express Route Circuit Connection from the specified express route circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -178,18 +189,20 @@ def get( :type circuit_name: str :param peering_name: The name of the peering. :type peering_name: str + :param connection_name: The name of the express route circuit connection. + :type connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering + :return: ExpressRouteCircuitConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -197,6 +210,7 @@ def get( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -217,31 +231,32 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str circuit_name, # type: str peering_name, # type: str - peering_parameters, # type: "_models.ExpressRouteCircuitPeering" + connection_name, # type: str + express_route_circuit_connection_parameters, # type: "_models.ExpressRouteCircuitConnection" **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuitPeering" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + # type: (...) -> "_models.ExpressRouteCircuitConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -249,6 +264,7 @@ def _create_or_update_initial( 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -263,7 +279,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(peering_parameters, 'ExpressRouteCircuitPeering') + body_content = self._serialize.body(express_route_circuit_connection_parameters, 'ExpressRouteCircuitConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -274,27 +290,28 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str circuit_name, # type: str peering_name, # type: str - peering_parameters, # type: "_models.ExpressRouteCircuitPeering" + connection_name, # type: str + express_route_circuit_connection_parameters, # type: "_models.ExpressRouteCircuitConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuitPeering"] - """Creates or updates a peering in the specified express route circuits. + # type: (...) -> LROPoller["_models.ExpressRouteCircuitConnection"] + """Creates or updates a Express Route Circuit Connection in the specified express route circuits. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -302,21 +319,23 @@ def begin_create_or_update( :type circuit_name: str :param peering_name: The name of the peering. :type peering_name: str - :param peering_parameters: Parameters supplied to the create or update express route circuit - peering operation. - :type peering_parameters: ~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering + :param connection_name: The name of the express route circuit connection. + :type connection_name: str + :param express_route_circuit_connection_parameters: Parameters supplied to the create or update + express route circuit connection operation. + :type express_route_circuit_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuitPeering or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeering] + :return: An instance of LROPoller that returns either ExpressRouteCircuitConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -327,7 +346,8 @@ def begin_create_or_update( resource_group_name=resource_group_name, circuit_name=circuit_name, peering_name=peering_name, - peering_parameters=peering_parameters, + connection_name=connection_name, + express_route_circuit_connection_parameters=express_route_circuit_connection_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -336,7 +356,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -346,10 +366,11 @@ def get_long_running_output(pipeline_response): 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -361,33 +382,37 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'} # type: ignore def list( self, resource_group_name, # type: str circuit_name, # type: str + peering_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ExpressRouteCircuitPeeringListResult"] - """Gets all peerings in a specified express route circuit. + # type: (...) -> Iterable["_models.ExpressRouteCircuitConnectionListResult"] + """Gets all global reach connections associated with a private peering in an express route + circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. + :param circuit_name: The name of the circuit. :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitPeeringListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ExpressRouteCircuitPeeringListResult] + :return: An iterator like instance of either ExpressRouteCircuitConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeeringListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -400,6 +425,7 @@ def prepare_request(next_link=None): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -415,7 +441,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitPeeringListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitConnectionListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -436,4 +462,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuit_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuit_peerings_operations.py similarity index 95% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuit_peerings_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuit_peerings_operations.py index 3bd1fb53d0a4..961cbf07441d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuit_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuit_peerings_operations.py @@ -32,7 +32,7 @@ class ExpressRouteCircuitPeeringsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -78,6 +79,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -148,7 +150,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -170,7 +172,7 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.ExpressRouteCircuitPeering" - """Gets the specified authorization from the specified express route circuit. + """Gets the specified peering for the express route circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -180,7 +182,7 @@ def get( :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuitPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] @@ -188,8 +190,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -239,9 +241,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -304,7 +306,7 @@ def begin_create_or_update( :type peering_name: str :param peering_parameters: Parameters supplied to the create or update express route circuit peering operation. - :type peering_parameters: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering + :type peering_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -312,7 +314,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ExpressRouteCircuitPeering or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeering] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeering] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -349,7 +351,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -378,7 +380,7 @@ def list( :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExpressRouteCircuitPeeringListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitPeeringListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitPeeringListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeeringListResult"] @@ -386,8 +388,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_circuits_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuits_operations.py similarity index 90% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_circuits_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuits_operations.py index f365cd7cb7c8..ca45610aa2ca 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_circuits_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_circuits_operations.py @@ -32,7 +32,7 @@ class ExpressRouteCircuitsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -141,7 +143,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -170,7 +172,7 @@ def get( :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuit, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] @@ -178,8 +180,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -227,9 +229,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -287,7 +289,7 @@ def begin_create_or_update( :param circuit_name: The name of the circuit. :type circuit_name: str :param parameters: Parameters supplied to the create or update express route circuit operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -295,7 +297,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -330,7 +332,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -344,7 +346,7 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore - def _update_tags_initial( + def update_tags( self, resource_group_name, # type: str circuit_name, # type: str @@ -352,17 +354,30 @@ def _update_tags_initial( **kwargs # type: Any ): # type: (...) -> "_models.ExpressRouteCircuit" + """Updates an express route circuit tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param parameters: Parameters supplied to update express route circuit tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCircuit, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuit + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), @@ -396,79 +411,7 @@ def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - circuit_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuit"] - """Updates an express route circuit tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :param parameters: Parameters supplied to update express route circuit tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuit] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore def _list_arp_table_initial( self, @@ -484,8 +427,8 @@ def _list_arp_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_arp_table_initial.metadata['url'] # type: ignore @@ -551,7 +494,7 @@ def begin_list_arp_table( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ExpressRouteCircuitsArpTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitsArpTableListResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsArpTableListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -589,7 +532,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -617,8 +560,8 @@ def _list_routes_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_routes_table_initial.metadata['url'] # type: ignore @@ -684,7 +627,7 @@ def begin_list_routes_table( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitsRoutesTableListResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsRoutesTableListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -722,7 +665,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -750,8 +693,8 @@ def _list_routes_table_summary_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_routes_table_summary_initial.metadata['url'] # type: ignore @@ -817,7 +760,7 @@ def begin_list_routes_table_summary( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ExpressRouteCircuitsRoutesTableSummaryListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -855,7 +798,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -884,7 +827,7 @@ def get_stats( :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitStats + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitStats :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] @@ -892,8 +835,8 @@ def get_stats( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get_stats.metadata['url'] # type: ignore @@ -946,7 +889,7 @@ def get_peering_stats( :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitStats + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitStats :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] @@ -954,8 +897,8 @@ def get_peering_stats( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get_peering_stats.metadata['url'] # type: ignore @@ -1003,7 +946,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] @@ -1011,8 +954,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -1071,7 +1014,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] @@ -1079,8 +1022,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_connections_operations.py new file mode 100644 index 000000000000..e1d1fed7504b --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_connections_operations.py @@ -0,0 +1,424 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExpressRouteConnectionsOperations(object): + """ExpressRouteConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + connection_name, # type: str + put_express_route_connection_parameters, # type: "_models.ExpressRouteConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRouteConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(put_express_route_connection_parameters, 'ExpressRouteConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + connection_name, # type: str + put_express_route_connection_parameters, # type: "_models.ExpressRouteConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ExpressRouteConnection"] + """Creates a connection between an ExpressRoute gateway and an ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_name: str + :param put_express_route_connection_parameters: Parameters required in an + ExpressRouteConnection PUT operation. + :type put_express_route_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + put_express_route_connection_parameters=put_express_route_connection_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRouteConnection" + """Gets the specified ExpressRouteConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the ExpressRoute connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a connection to a ExpressRoute circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param connection_name: The name of the connection subresource. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections/{connectionName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRouteConnectionList" + """Lists ExpressRouteConnections. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteConnectionList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteConnectionList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteConnectionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteConnectionList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}/expressRouteConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_circuit_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_cross_connection_peerings_operations.py similarity index 78% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_circuit_peerings_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_cross_connection_peerings_operations.py index b23063c86edb..2e4e34da607d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_circuit_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_cross_connection_peerings_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitPeeringsOperations(object): - """ExpressRouteCircuitPeeringsOperations operations. +class ExpressRouteCrossConnectionPeeringsOperations(object): + """ExpressRouteCrossConnectionPeeringsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,10 +47,85 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def list( + self, + resource_group_name, # type: str + cross_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExpressRouteCrossConnectionPeeringList"] + """Gets all peerings in a specified ExpressRouteCrossConnection. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionPeeringList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeeringList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeeringList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRouteCrossConnectionPeeringList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings'} # type: ignore + def _delete_initial( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str **kwargs # type: Any ): @@ -60,13 +135,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -78,6 +154,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -90,22 +167,22 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified peering from the specified express route circuit. + """Deletes the specified peering from the ExpressRouteCrossConnection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response @@ -128,7 +205,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, cls=lambda x,y,z: x, **kwargs @@ -143,12 +220,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,42 +237,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore def get( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuitPeering" - """Gets the specified authorization from the specified express route circuit. + # type: (...) -> "_models.ExpressRouteCrossConnectionPeering" + """Gets the specified peering for the ExpressRouteCrossConnection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering + :return: ExpressRouteCrossConnectionPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -217,37 +294,37 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str - peering_parameters, # type: "_models.ExpressRouteCircuitPeering" + peering_parameters, # type: "_models.ExpressRouteCrossConnectionPeering" **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuitPeering" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + # type: (...) -> "_models.ExpressRouteCrossConnectionPeering" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -263,7 +340,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(peering_parameters, 'ExpressRouteCircuitPeering') + body_content = self._serialize.body(peering_parameters, 'ExpressRouteCrossConnectionPeering') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -274,49 +351,49 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str - peering_parameters, # type: "_models.ExpressRouteCircuitPeering" + peering_parameters, # type: "_models.ExpressRouteCrossConnectionPeering" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuitPeering"] - """Creates or updates a peering in the specified express route circuits. + # type: (...) -> LROPoller["_models.ExpressRouteCrossConnectionPeering"] + """Creates or updates a peering in the specified ExpressRouteCrossConnection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str - :param peering_parameters: Parameters supplied to the create or update express route circuit - peering operation. - :type peering_parameters: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering + :param peering_parameters: Parameters supplied to the create or update + ExpressRouteCrossConnection peering operation. + :type peering_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuitPeering or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeering] + :return: An instance of LROPoller that returns either ExpressRouteCrossConnectionPeering or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionPeering] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeering"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionPeering"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -325,7 +402,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, peering_parameters=peering_parameters, cls=lambda x,y,z: x, @@ -336,7 +413,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitPeering', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionPeering', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -344,12 +421,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -361,79 +438,4 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}'} # type: ignore - - def list( - self, - resource_group_name, # type: str - circuit_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ExpressRouteCircuitPeeringListResult"] - """Gets all peerings in a specified express route circuit. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitPeeringListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitPeeringListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitPeeringListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitPeeringListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuits_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_cross_connections_operations.py similarity index 67% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuits_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_cross_connections_operations.py index d6dc663a189c..2a88ce93ad4e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_express_route_circuits_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_cross_connections_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitsOperations(object): - """ExpressRouteCircuitsOperations operations. +class ExpressRouteCrossConnectionsOperations(object): + """ExpressRouteCrossConnectionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,145 +47,176 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def list( self, - resource_group_name, # type: str - circuit_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Iterable["_models.ExpressRouteCrossConnectionListResult"] + """Retrieves all the ExpressRouteCrossConnections in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteCrossConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRouteCrossConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - def begin_delete( + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections'} # type: ignore + + def list_by_resource_group( self, resource_group_name, # type: str - circuit_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified express route circuit. + # type: (...) -> Iterable["_models.ExpressRouteCrossConnectionListResult"] + """Retrieves all the ExpressRouteCrossConnections in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :return: An iterator like instance of either ExpressRouteCrossConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - circuit_name=circuit_name, - cls=lambda x,y,z: x, - **kwargs - ) + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_long_running_output(pipeline_response): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRouteCrossConnectionListResult', pipeline_response) + list_of_elem = deserialized.value if cls: - return cls(pipeline_response, None, {}) + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } + def get_next(next_link=None): + request = prepare_request(next_link) - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections'} # type: ignore def get( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuit" - """Gets information about the specified express route circuit. + # type: (...) -> "_models.ExpressRouteCrossConnection" + """Gets details about the specified ExpressRouteCrossConnection. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group (peering location of the circuit). :type resource_group_name: str - :param circuit_name: The name of express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection (service key of the + circuit). + :type cross_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuit, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuit + :return: ExpressRouteCrossConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -206,36 +237,36 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - circuit_name, # type: str - parameters, # type: "_models.ExpressRouteCircuit" + cross_connection_name, # type: str + parameters, # type: "_models.ExpressRouteCrossConnection" **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuit" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + # type: (...) -> "_models.ExpressRouteCrossConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -250,56 +281,52 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ExpressRouteCircuit') + body_content = self._serialize.body(parameters, 'ExpressRouteCrossConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - circuit_name, # type: str - parameters, # type: "_models.ExpressRouteCircuit" + cross_connection_name, # type: str + parameters, # type: "_models.ExpressRouteCrossConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuit"] - """Creates or updates an express route circuit. + # type: (...) -> LROPoller["_models.ExpressRouteCrossConnection"] + """Update the specified ExpressRouteCrossConnection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str - :param parameters: Parameters supplied to the create or update express route circuit operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuit + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str + :param parameters: Parameters supplied to the update express route crossConnection operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuit or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuit] + :return: An instance of LROPoller that returns either ExpressRouteCrossConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuit"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -308,7 +335,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -318,7 +345,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuit', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -326,11 +353,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -342,12 +369,80 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + cross_connection_name, # type: str + cross_connection_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRouteCrossConnection" + """Updates an express route cross connection tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cross_connection_name: The name of the cross connection. + :type cross_connection_name: str + :param cross_connection_parameters: Parameters supplied to update express route cross + connection tags. + :type cross_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteCrossConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(cross_connection_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteCrossConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'} # type: ignore def _list_arp_table_initial( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str device_path, # type: str **kwargs # type: Any @@ -358,14 +453,14 @@ def _list_arp_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_arp_table_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -396,24 +491,24 @@ def _list_arp_table_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _list_arp_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore + _list_arp_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore def begin_list_arp_table( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str device_path, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller["_models.ExpressRouteCircuitsArpTableListResult"] - """Gets the currently advertised ARP table associated with the express route circuit in a resource - group. + """Gets the currently advertised ARP table associated with the express route cross connection in a + resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :param device_path: The path of the device. @@ -425,7 +520,7 @@ def begin_list_arp_table( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ExpressRouteCircuitsArpTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitsArpTableListResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsArpTableListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -438,7 +533,7 @@ def begin_list_arp_table( if cont_token is None: raw_result = self._list_arp_table_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, device_path=device_path, cls=lambda x,y,z: x, @@ -457,13 +552,13 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -475,30 +570,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_arp_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore + begin_list_arp_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}'} # type: ignore - def _list_routes_table_initial( + def _list_routes_table_summary_initial( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str device_path, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] + # type: (...) -> Optional["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._list_routes_table_initial.metadata['url'] # type: ignore + url = self._list_routes_table_summary_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -523,30 +618,30 @@ def _list_routes_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionsRoutesTableSummaryListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_routes_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore + _list_routes_table_summary_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore - def begin_list_routes_table( + def begin_list_routes_table_summary( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str device_path, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"] - """Gets the currently advertised routes table associated with the express route circuit in a - resource group. + # type: (...) -> LROPoller["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"] + """Gets the route table summary associated with the express route cross connection in a resource + group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :param device_path: The path of the device. @@ -557,21 +652,21 @@ def begin_list_routes_table( Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitsRoutesTableListResult] + :return: An instance of LROPoller that returns either ExpressRouteCrossConnectionsRoutesTableSummaryListResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCrossConnectionsRoutesTableSummaryListResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._list_routes_table_initial( + raw_result = self._list_routes_table_summary_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, device_path=device_path, cls=lambda x,y,z: x, @@ -582,7 +677,7 @@ def begin_list_routes_table( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCrossConnectionsRoutesTableSummaryListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -590,13 +685,13 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -608,30 +703,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_routes_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore + begin_list_routes_table_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore - def _list_routes_table_summary_initial( + def _list_routes_table_initial( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str device_path, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"]] + # type: (...) -> Optional["_models.ExpressRouteCircuitsRoutesTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteCircuitsRoutesTableListResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._list_routes_table_summary_initial.metadata['url'] # type: ignore + url = self._list_routes_table_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -656,30 +751,30 @@ def _list_routes_table_summary_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_routes_table_summary_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore + _list_routes_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore - def begin_list_routes_table_summary( + def begin_list_routes_table( self, resource_group_name, # type: str - circuit_name, # type: str + cross_connection_name, # type: str peering_name, # type: str device_path, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] - """Gets the currently advertised routes table summary associated with the express route circuit in - a resource group. + # type: (...) -> LROPoller["_models.ExpressRouteCircuitsRoutesTableListResult"] + """Gets the currently advertised routes table associated with the express route cross connection + in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str + :param cross_connection_name: The name of the ExpressRouteCrossConnection. + :type cross_connection_name: str :param peering_name: The name of the peering. :type peering_name: str :param device_path: The path of the device. @@ -690,21 +785,21 @@ def begin_list_routes_table_summary( Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuitsRoutesTableSummaryListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitsRoutesTableSummaryListResult] + :return: An instance of LROPoller that returns either ExpressRouteCircuitsRoutesTableListResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteCircuitsRoutesTableListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableSummaryListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitsRoutesTableListResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._list_routes_table_summary_initial( + raw_result = self._list_routes_table_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, + cross_connection_name=cross_connection_name, peering_name=peering_name, device_path=device_path, cls=lambda x,y,z: x, @@ -715,7 +810,7 @@ def begin_list_routes_table_summary( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableSummaryListResult', pipeline_response) + deserialized = self._deserialize('ExpressRouteCircuitsRoutesTableListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -723,13 +818,13 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'crossConnectionName': self._serialize.url("cross_connection_name", cross_connection_name, 'str'), 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'devicePath': self._serialize.url("device_path", device_path, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -741,264 +836,4 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_routes_table_summary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'} # type: ignore - - def get_stats( - self, - resource_group_name, # type: str - circuit_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ExpressRouteCircuitStats" - """Gets all the stats from an express route circuit in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitStats - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get_stats.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/stats'} # type: ignore - - def get_peering_stats( - self, - resource_group_name, # type: str - circuit_name, # type: str - peering_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.ExpressRouteCircuitStats" - """Gets all stats from an express route circuit in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param peering_name: The name of the peering. - :type peering_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitStats, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitStats - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitStats"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get_peering_stats.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('ExpressRouteCircuitStats', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_peering_stats.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/stats'} # type: ignore - - def list( - self, - resource_group_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ExpressRouteCircuitListResult"] - """Gets all the express route circuits in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits'} # type: ignore - - def list_all( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.ExpressRouteCircuitListResult"] - """Gets all the express route circuits in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ExpressRouteCircuitListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.ExpressRouteCircuitListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCircuits'} # type: ignore + begin_list_routes_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_gateways_operations.py new file mode 100644 index 000000000000..c4e8c0be5976 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_gateways_operations.py @@ -0,0 +1,583 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExpressRouteGatewaysOperations(object): + """ExpressRouteGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRouteGatewayList" + """Lists ExpressRoute gateways under a given subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGatewayList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGatewayList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGatewayList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGatewayList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteGateways'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRouteGatewayList" + """Lists ExpressRoute gateways in a given resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGatewayList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGatewayList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGatewayList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGatewayList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + put_express_route_gateway_parameters, # type: "_models.ExpressRouteGateway" + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRouteGateway" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(put_express_route_gateway_parameters, 'ExpressRouteGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + put_express_route_gateway_parameters, # type: "_models.ExpressRouteGateway" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ExpressRouteGateway"] + """Creates or updates a ExpressRoute gateway in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :param put_express_route_gateway_parameters: Parameters required in an ExpressRoute gateway PUT + operation. + :type put_express_route_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + put_express_route_gateway_parameters=put_express_route_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + def _update_tags_initial( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + express_route_gateway_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ExpressRouteGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ExpressRouteGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(express_route_gateway_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + express_route_gateway_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ExpressRouteGateway"] + """Updates express route gateway tags. + + :param resource_group_name: The resource group name of the ExpressRouteGateway. + :type resource_group_name: str + :param express_route_gateway_name: The name of the gateway. + :type express_route_gateway_name: str + :param express_route_gateway_parameters: Parameters supplied to update a virtual wan express + route gateway tags. + :type express_route_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRouteGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + express_route_gateway_parameters=express_route_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRouteGateway" + """Fetches the details of a ExpressRoute gateway in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + express_route_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified ExpressRoute gateway in a resource group. An ExpressRoute gateway + resource can only be deleted when there are no connection subresources. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_gateway_name: The name of the ExpressRoute gateway. + :type express_route_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + express_route_gateway_name=express_route_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRouteGatewayName': self._serialize.url("express_route_gateway_name", express_route_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteGateways/{expressRouteGatewayName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_links_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_links_operations.py new file mode 100644 index 000000000000..dbe5c1acf53c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_links_operations.py @@ -0,0 +1,184 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExpressRouteLinksOperations(object): + """ExpressRouteLinksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + express_route_port_name, # type: str + link_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRouteLink" + """Retrieves the specified ExpressRouteLink resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param link_name: The name of the ExpressRouteLink resource. + :type link_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRouteLink, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRouteLink + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + 'linkName': self._serialize.url("link_name", link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRouteLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links/{linkName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + express_route_port_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExpressRouteLinkListResult"] + """Retrieve the ExpressRouteLink sub-resources of the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRouteLinkListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteLinkListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRouteLinkListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}/links'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_ports_locations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_ports_locations_operations.py new file mode 100644 index 000000000000..d4260c1f4e91 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_ports_locations_operations.py @@ -0,0 +1,171 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExpressRoutePortsLocationsOperations(object): + """ExpressRoutePortsLocationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExpressRoutePortsLocationListResult"] + """Retrieves all ExpressRoutePort peering locations. Does not return available bandwidths for each + location. Available bandwidths can only be obtained when retrieving a specific peering + location. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortsLocationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsLocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortsLocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRoutePortsLocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations'} # type: ignore + + def get( + self, + location_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRoutePortsLocation" + """Retrieves a single ExpressRoutePort peering location, including the list of available + bandwidths available at said peering location. + + :param location_name: Name of the requested ExpressRoutePort peering location. + :type location_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePortsLocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortsLocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortsLocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePortsLocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePortsLocations/{locationName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_ports_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_ports_operations.py new file mode 100644 index 000000000000..62d2675c4c76 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_ports_operations.py @@ -0,0 +1,619 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ExpressRoutePortsOperations(object): + """ExpressRoutePortsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + express_route_port_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + express_route_port_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + express_route_port_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRoutePort" + """Retrieves the requested ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of ExpressRoutePort. + :type express_route_port_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePort, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + express_route_port_name, # type: str + parameters, # type: "_models.ExpressRoutePort" + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRoutePort" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'ExpressRoutePort') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + express_route_port_name, # type: str + parameters, # type: "_models.ExpressRoutePort" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ExpressRoutePort"] + """Creates or updates the specified ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param parameters: Parameters supplied to the create ExpressRoutePort operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ExpressRoutePort or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + express_route_port_name=express_route_port_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + express_route_port_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.ExpressRoutePort" + """Update ExpressRoutePort tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of the ExpressRoutePort resource. + :type express_route_port_name: str + :param parameters: Parameters supplied to update ExpressRoutePort resource tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ExpressRoutePort, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ExpressRoutePort + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePort"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ExpressRoutePort', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts/{expressRoutePortName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExpressRoutePortListResult"] + """List all the ExpressRoutePort resources in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRoutePortListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ExpressRoutePorts'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ExpressRoutePortListResult"] + """List all the ExpressRoutePort resources in the specified subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ExpressRoutePortListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRoutePortListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRoutePortListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ExpressRoutePortListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ExpressRoutePorts'} # type: ignore + + def generate_loa( + self, + resource_group_name, # type: str + express_route_port_name, # type: str + request, # type: "_models.GenerateExpressRoutePortsLOARequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.GenerateExpressRoutePortsLOAResult" + """Generate a letter of authorization for the requested ExpressRoutePort resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param express_route_port_name: The name of ExpressRoutePort. + :type express_route_port_name: str + :param request: Request parameters supplied to generate a letter of authorization. + :type request: ~azure.mgmt.network.v2021_05_01.models.GenerateExpressRoutePortsLOARequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: GenerateExpressRoutePortsLOAResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.GenerateExpressRoutePortsLOAResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.GenerateExpressRoutePortsLOAResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.generate_loa.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'expressRoutePortName': self._serialize.url("express_route_port_name", express_route_port_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'GenerateExpressRoutePortsLOARequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('GenerateExpressRoutePortsLOAResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + generate_loa.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRoutePorts/{expressRoutePortName}/generateLoa'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_service_providers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_service_providers_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_service_providers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_service_providers_operations.py index 55d5c60ffb1c..d497eda0a2dd 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_service_providers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_express_route_service_providers_operations.py @@ -30,7 +30,7 @@ class ExpressRouteServiceProvidersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either ExpressRouteServiceProviderListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.ExpressRouteServiceProviderListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ExpressRouteServiceProviderListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteServiceProviderListResult"] @@ -62,8 +62,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_tables_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policies_operations.py similarity index 80% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_tables_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policies_operations.py index 68b02d21f1e5..371ac8d3f00b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_tables_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policies_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class RouteTablesOperations(object): - """RouteTablesOperations operations. +class FirewallPoliciesOperations(object): + """FirewallPoliciesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - route_table_name, # type: str + firewall_policy_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -59,13 +59,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -88,21 +90,21 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - route_table_name, # type: str + firewall_policy_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified route table. + """Deletes the specified Firewall Policy. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -123,7 +125,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + firewall_policy_name=firewall_policy_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,11 +139,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,42 +155,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore def get( self, resource_group_name, # type: str - route_table_name, # type: str + firewall_policy_name, # type: str expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "_models.RouteTable" - """Gets the specified route table. + # type: (...) -> "_models.FirewallPolicy" + """Gets the specified Firewall Policy. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteTable, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.RouteTable + :return: FirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicy :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -211,36 +213,36 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('FirewallPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - route_table_name, # type: str - parameters, # type: "_models.RouteTable" + firewall_policy_name, # type: str + parameters, # type: "_models.FirewallPolicy" **kwargs # type: Any ): - # type: (...) -> "_models.RouteTable" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + # type: (...) -> "_models.FirewallPolicy" + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +257,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'RouteTable') + body_content = self._serialize.body(parameters, 'FirewallPolicy') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,45 +268,45 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('FirewallPolicy', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('FirewallPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - route_table_name, # type: str - parameters, # type: "_models.RouteTable" + firewall_policy_name, # type: str + parameters, # type: "_models.FirewallPolicy" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.RouteTable"] - """Create or updates a route table in a specified resource group. + # type: (...) -> LROPoller["_models.FirewallPolicy"] + """Creates or updates the specified Firewall Policy. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param parameters: Parameters supplied to the create or update route table operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.RouteTable + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Parameters supplied to the create or update Firewall Policy operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.RouteTable] + :return: An instance of LROPoller that returns either FirewallPolicy or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.FirewallPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -313,7 +315,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, + firewall_policy_name=firewall_policy_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -323,7 +325,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteTable', pipeline_response) + deserialized = self._deserialize('FirewallPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -331,11 +333,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -347,30 +349,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}'} # type: ignore def list( self, resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteTableListResult"] - """Gets all route tables in a resource group. + # type: (...) -> Iterable["_models.FirewallPolicyListResult"] + """Lists all Firewall Policies in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteTableListResult] + :return: An iterator like instance of either FirewallPolicyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -397,7 +399,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteTableListResult', pipeline_response) + deserialized = self._deserialize('FirewallPolicyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -418,27 +420,27 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies'} # type: ignore def list_all( self, **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteTableListResult"] - """Gets all route tables in a subscription. + # type: (...) -> Iterable["_models.FirewallPolicyListResult"] + """Gets all the Firewall Policies in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteTableListResult] + :return: An iterator like instance of either FirewallPolicyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -464,7 +466,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteTableListResult', pipeline_response) + deserialized = self._deserialize('FirewallPolicyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -485,4 +487,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeTables'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/firewallPolicies'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_filter_values_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_filter_values_operations.py new file mode 100644 index 000000000000..c92e58f8b8b5 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_filter_values_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class FirewallPolicyIdpsSignaturesFilterValuesOperations(object): + """FirewallPolicyIdpsSignaturesFilterValuesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + firewall_policy_name, # type: str + parameters, # type: "_models.SignatureOverridesFilterValuesQuery" + **kwargs # type: Any + ): + # type: (...) -> "_models.SignatureOverridesFilterValuesResponse" + """Retrieves the current filter values for the signatures overrides. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SignatureOverridesFilterValuesQuery + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignatureOverridesFilterValuesResponse, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignatureOverridesFilterValuesResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignatureOverridesFilterValuesResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SignatureOverridesFilterValuesQuery') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignatureOverridesFilterValuesResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsFilterOptions'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_operations.py new file mode 100644 index 000000000000..93247d3aefce --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class FirewallPolicyIdpsSignaturesOperations(object): + """FirewallPolicyIdpsSignaturesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + firewall_policy_name, # type: str + parameters, # type: "_models.IDPSQueryObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.QueryResults" + """Retrieves the current status of IDPS signatures for the relevant policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: + :type parameters: ~azure.mgmt.network.v2021_05_01.models.IDPSQueryObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: QueryResults, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.QueryResults + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.QueryResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'IDPSQueryObject') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('QueryResults', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/listIdpsSignatures'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_overrides_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_overrides_operations.py new file mode 100644 index 000000000000..573849af4c10 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_idps_signatures_overrides_operations.py @@ -0,0 +1,290 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class FirewallPolicyIdpsSignaturesOverridesOperations(object): + """FirewallPolicyIdpsSignaturesOverridesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def patch( + self, + resource_group_name, # type: str + firewall_policy_name, # type: str + parameters, # type: "_models.SignaturesOverrides" + **kwargs # type: Any + ): + # type: (...) -> "_models.SignaturesOverrides" + """Will update the status of policy's signature overrides for IDPS. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Will contain all properties of the object to put. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SignaturesOverrides') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + patch.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default'} # type: ignore + + def put( + self, + resource_group_name, # type: str + firewall_policy_name, # type: str + parameters, # type: "_models.SignaturesOverrides" + **kwargs # type: Any + ): + # type: (...) -> "_models.SignaturesOverrides" + """Will override/create a new signature overrides for the policy's IDPS. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param parameters: Will contain all properties of the object to put. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'SignaturesOverrides') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default'} # type: ignore + + def get( + self, + resource_group_name, # type: str + firewall_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SignaturesOverrides" + """Returns all signatures overrides for a specific policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverrides, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverrides + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverrides"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverrides', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides/default'} # type: ignore + + def list( + self, + resource_group_name, # type: str + firewall_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SignaturesOverridesList" + """Returns all signatures overrides objects for a specific policy as a list containing a single + value. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SignaturesOverridesList, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SignaturesOverridesList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SignaturesOverridesList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SignaturesOverridesList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/signatureOverrides'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_circuit_authorizations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_rule_collection_groups_operations.py similarity index 70% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_circuit_authorizations_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_rule_collection_groups_operations.py index 56d7c745cd65..964b254657a7 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_express_route_circuit_authorizations_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_firewall_policy_rule_collection_groups_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class ExpressRouteCircuitAuthorizationsOperations(object): - """ExpressRouteCircuitAuthorizationsOperations operations. +class FirewallPolicyRuleCollectionGroupsOperations(object): + """FirewallPolicyRuleCollectionGroupsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,8 +50,8 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str + firewall_policy_name, # type: str + rule_collection_group_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -60,14 +60,15 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,6 +79,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -90,24 +92,24 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str + firewall_policy_name, # type: str + rule_collection_group_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified authorization from the specified express route circuit. + """Deletes the specified FirewallPolicyRuleCollectionGroup. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -128,8 +130,8 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, - authorization_name=authorization_name, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, cls=lambda x,y,z: x, **kwargs ) @@ -143,12 +145,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,43 +162,43 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore def get( self, resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str + firewall_policy_name, # type: str + rule_collection_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuitAuthorization" - """Gets the specified authorization from the specified express route circuit. + # type: (...) -> "_models.FirewallPolicyRuleCollectionGroup" + """Gets the specified FirewallPolicyRuleCollectionGroup. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ExpressRouteCircuitAuthorization, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization + :return: FirewallPolicyRuleCollectionGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroup :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -217,38 +219,38 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str - authorization_parameters, # type: "_models.ExpressRouteCircuitAuthorization" + firewall_policy_name, # type: str + rule_collection_group_name, # type: str + parameters, # type: "_models.FirewallPolicyRuleCollectionGroup" **kwargs # type: Any ): - # type: (...) -> "_models.ExpressRouteCircuitAuthorization" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + # type: (...) -> "_models.FirewallPolicyRuleCollectionGroup" + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -263,7 +265,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(authorization_parameters, 'ExpressRouteCircuitAuthorization') + body_content = self._serialize.body(parameters, 'FirewallPolicyRuleCollectionGroup') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -274,49 +276,49 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - circuit_name, # type: str - authorization_name, # type: str - authorization_parameters, # type: "_models.ExpressRouteCircuitAuthorization" + firewall_policy_name, # type: str + rule_collection_group_name, # type: str + parameters, # type: "_models.FirewallPolicyRuleCollectionGroup" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ExpressRouteCircuitAuthorization"] - """Creates or updates an authorization in the specified express route circuit. + # type: (...) -> LROPoller["_models.FirewallPolicyRuleCollectionGroup"] + """Creates or updates the specified FirewallPolicyRuleCollectionGroup. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the express route circuit. - :type circuit_name: str - :param authorization_name: The name of the authorization. - :type authorization_name: str - :param authorization_parameters: Parameters supplied to the create or update express route - circuit authorization operation. - :type authorization_parameters: ~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str + :param rule_collection_group_name: The name of the FirewallPolicyRuleCollectionGroup. + :type rule_collection_group_name: str + :param parameters: Parameters supplied to the create or update + FirewallPolicyRuleCollectionGroup operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ExpressRouteCircuitAuthorization or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ExpressRouteCircuitAuthorization] + :return: An instance of LROPoller that returns either FirewallPolicyRuleCollectionGroup or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroup] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ExpressRouteCircuitAuthorization"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroup"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -325,9 +327,9 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - circuit_name=circuit_name, - authorization_name=authorization_name, - authorization_parameters=authorization_parameters, + firewall_policy_name=firewall_policy_name, + rule_collection_group_name=rule_collection_group_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -336,7 +338,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ExpressRouteCircuitAuthorization', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroup', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -344,12 +346,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), - 'authorizationName': self._serialize.url("authorization_name", authorization_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), + 'ruleCollectionGroupName': self._serialize.url("rule_collection_group_name", rule_collection_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -361,33 +363,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations/{authorizationName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups/{ruleCollectionGroupName}'} # type: ignore def list( self, resource_group_name, # type: str - circuit_name, # type: str + firewall_policy_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.AuthorizationListResult"] - """Gets all authorizations in an express route circuit. + # type: (...) -> Iterable["_models.FirewallPolicyRuleCollectionGroupListResult"] + """Lists all FirewallPolicyRuleCollectionGroups in a FirewallPolicy resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param circuit_name: The name of the circuit. - :type circuit_name: str + :param firewall_policy_name: The name of the Firewall Policy. + :type firewall_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either AuthorizationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.AuthorizationListResult] + :return: An iterator like instance of either FirewallPolicyRuleCollectionGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.FirewallPolicyRuleCollectionGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.AuthorizationListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FirewallPolicyRuleCollectionGroupListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -399,7 +401,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'firewallPolicyName': self._serialize.url("firewall_policy_name", firewall_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -415,7 +417,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('AuthorizationListResult', pipeline_response) + deserialized = self._deserialize('FirewallPolicyRuleCollectionGroupListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -436,4 +438,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/authorizations'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/firewallPolicies/{firewallPolicyName}/ruleCollectionGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_local_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_flow_logs_operations.py similarity index 66% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_local_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_flow_logs_operations.py index 169ffa20c7c0..29180b55c93e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_local_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_flow_logs_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LocalNetworkGatewaysOperations(object): - """LocalNetworkGatewaysOperations operations. +class FlowLogsOperations(object): + """FlowLogsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,25 +50,27 @@ def __init__(self, client, config, serializer, deserializer): def _create_or_update_initial( self, resource_group_name, # type: str - local_network_gateway_name, # type: str - parameters, # type: "_models.LocalNetworkGateway" + network_watcher_name, # type: str + flow_log_name, # type: str + parameters, # type: "_models.FlowLog" **kwargs # type: Any ): - # type: (...) -> "_models.LocalNetworkGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + # type: (...) -> "_models.FlowLog" + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -83,7 +85,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LocalNetworkGateway') + body_content = self._serialize.body(parameters, 'FlowLog') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -91,48 +93,52 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('FlowLog', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('FlowLog', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - local_network_gateway_name, # type: str - parameters, # type: "_models.LocalNetworkGateway" + network_watcher_name, # type: str + flow_log_name, # type: str + parameters, # type: "_models.FlowLog" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.LocalNetworkGateway"] - """Creates or updates a local network gateway in the specified resource group. + # type: (...) -> LROPoller["_models.FlowLog"] + """Create or update a flow log for the specified network security group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :param parameters: Parameters supplied to the create or update local network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log. + :type flow_log_name: str + :param parameters: Parameters that define the create or update flow log resource. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FlowLog :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway] + :return: An instance of LROPoller that returns either FlowLog or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.FlowLog] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -141,7 +147,8 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -151,7 +158,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('FlowLog', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -159,11 +166,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -175,39 +183,47 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore - def get( + def update_tags( self, resource_group_name, # type: str - local_network_gateway_name, # type: str + network_watcher_name, # type: str + flow_log_name, # type: str + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.LocalNetworkGateway" - """Gets the specified local network gateway in a resource group. + # type: (...) -> "_models.FlowLog" + """Update tags of the specified flow log. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log. + :type flow_log_name: str + :param parameters: Parameters supplied to update flow log tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response - :return: LocalNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway + :return: FlowLog, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.FlowLog :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -218,43 +234,64 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('FlowLog', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore - def _delete_initial( + def get( self, resource_group_name, # type: str - local_network_gateway_name, # type: str + network_watcher_name, # type: str + flow_log_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.FlowLog" + """Gets a flow log resource by name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log resource. + :type flow_log_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: FlowLog, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.FlowLog + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLog"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -265,107 +302,47 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('FlowLog', pipeline_response) if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore - def begin_delete( + def _delete_initial( self, resource_group_name, # type: str - local_network_gateway_name, # type: str + network_watcher_name, # type: str + flow_log_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified local network gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore - - def _update_tags_initial( - self, - resource_group_name, # type: str - local_network_gateway_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> "_models.LocalNetworkGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -376,66 +353,60 @@ def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore - def begin_update_tags( + def begin_delete( self, resource_group_name, # type: str - local_network_gateway_name, # type: str - parameters, # type: "_models.TagsObject" + network_watcher_name, # type: str + flow_log_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.LocalNetworkGateway"] - """Updates a local network gateway tags. + # type: (...) -> LROPoller[None] + """Deletes the specified flow log resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :param parameters: Parameters supplied to update local network gateway tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param flow_log_name: The name of the flow log resource. + :type flow_log_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.LocalNetworkGateway] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._update_tags_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, - parameters=parameters, + network_watcher_name=network_watcher_name, + flow_log_name=flow_log_name, cls=lambda x,y,z: x, **kwargs ) @@ -444,19 +415,17 @@ def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'flowLogName': self._serialize.url("flow_log_name", flow_log_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -468,30 +437,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs/{flowLogName}'} # type: ignore def list( self, resource_group_name, # type: str + network_watcher_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LocalNetworkGatewayListResult"] - """Gets all the local network gateways in a resource group. + # type: (...) -> Iterable["_models.FlowLogListResult"] + """Lists all flow log resources for the specified Network Watcher. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group containing Network Watcher. :type resource_group_name: str + :param network_watcher_name: The name of the Network Watcher resource. + :type network_watcher_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LocalNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.LocalNetworkGatewayListResult] + :return: An iterator like instance of either FlowLogListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.FlowLogListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.FlowLogListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -503,6 +475,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -518,7 +491,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LocalNetworkGatewayListResult', pipeline_response) + deserialized = self._deserialize('FlowLogListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -531,12 +504,13 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/flowLogs'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_routes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_hub_route_tables_operations.py similarity index 77% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_routes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_hub_route_tables_operations.py index 8ce0df977505..6b3347a3343a 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_routes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_hub_route_tables_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class RoutesOperations(object): - """RoutesOperations operations. +class HubRouteTablesOperations(object): + """HubRouteTablesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,28 +47,31 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def _create_or_update_initial( self, resource_group_name, # type: str + virtual_hub_name, # type: str route_table_name, # type: str - route_name, # type: str + route_table_parameters, # type: "_models.HubRouteTable" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.HubRouteTable" + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,58 +81,74 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(route_table_parameters, 'HubRouteTable') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('HubRouteTable', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubRouteTable', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore - def begin_delete( + def begin_create_or_update( self, resource_group_name, # type: str + virtual_hub_name, # type: str route_table_name, # type: str - route_name, # type: str + route_table_parameters, # type: "_models.HubRouteTable" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified route from a route table. + # type: (...) -> LROPoller["_models.HubRouteTable"] + """Creates a RouteTable resource if it doesn't exist else updates the existing RouteTable. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param route_table_name: The name of the route table. + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str + :param route_table_parameters: Parameters supplied to create or update RouteTable. + :type route_table_parameters: ~azure.mgmt.network.v2021_05_01.models.HubRouteTable :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either HubRouteTable or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.HubRouteTable] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, route_table_name=route_table_name, - route_name=route_name, + route_table_parameters=route_table_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -138,17 +157,20 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('HubRouteTable', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,44 +182,44 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore def get( self, resource_group_name, # type: str + virtual_hub_name, # type: str route_table_name, # type: str - route_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.Route" - """Gets the specified route from a route table. + # type: (...) -> "_models.HubRouteTable" + """Retrieves the details of a RouteTable. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param route_table_name: The name of the route table. + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Route, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.Route + :return: HubRouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.HubRouteTable :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubRouteTable"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -217,39 +239,37 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Route', pipeline_response) + deserialized = self._deserialize('HubRouteTable', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore - def _create_or_update_initial( + def _delete_initial( self, resource_group_name, # type: str + virtual_hub_name, # type: str route_table_name, # type: str - route_name, # type: str - route_parameters, # type: "_models.Route" **kwargs # type: Any ): - # type: (...) -> "_models.Route" - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -259,74 +279,59 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_parameters, 'Route') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('Route', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Route', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore - def begin_create_or_update( + def begin_delete( self, resource_group_name, # type: str + virtual_hub_name, # type: str route_table_name, # type: str - route_name, # type: str - route_parameters, # type: "_models.Route" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.Route"] - """Creates or updates a route in the specified route table. + # type: (...) -> LROPoller[None] + """Deletes a RouteTable. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the RouteTable. :type resource_group_name: str - :param route_table_name: The name of the route table. + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the RouteTable. :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str - :param route_parameters: Parameters supplied to the create or update route operation. - :type route_parameters: ~azure.mgmt.network.v2017_08_01.models.Route :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.Route] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, route_table_name=route_table_name, - route_name=route_name, - route_parameters=route_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -335,20 +340,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Route', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -360,33 +362,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables/{routeTableName}'} # type: ignore def list( self, resource_group_name, # type: str - route_table_name, # type: str + virtual_hub_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteListResult"] - """Gets all routes in a route table. + # type: (...) -> Iterable["_models.ListHubRouteTablesResult"] + """Retrieves the details of all RouteTables. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteListResult] + :return: An iterator like instance of either ListHubRouteTablesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListHubRouteTablesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListHubRouteTablesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -397,9 +399,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -414,7 +416,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteListResult', pipeline_response) + deserialized = self._deserialize('ListHubRouteTablesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -435,4 +437,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubRouteTables'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_hub_virtual_network_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_hub_virtual_network_connections_operations.py new file mode 100644 index 000000000000..aabc5d1a39fe --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_hub_virtual_network_connections_operations.py @@ -0,0 +1,441 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class HubVirtualNetworkConnectionsOperations(object): + """HubVirtualNetworkConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + hub_virtual_network_connection_parameters, # type: "_models.HubVirtualNetworkConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.HubVirtualNetworkConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(hub_virtual_network_connection_parameters, 'HubVirtualNetworkConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + hub_virtual_network_connection_parameters, # type: "_models.HubVirtualNetworkConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.HubVirtualNetworkConnection"] + """Creates a hub virtual network connection if it doesn't exist else updates the existing one. + + :param resource_group_name: The resource group name of the HubVirtualNetworkConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the HubVirtualNetworkConnection. + :type connection_name: str + :param hub_virtual_network_connection_parameters: Parameters supplied to create or update a hub + virtual network connection. + :type hub_virtual_network_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.HubVirtualNetworkConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either HubVirtualNetworkConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.HubVirtualNetworkConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + hub_virtual_network_connection_parameters=hub_virtual_network_connection_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a HubVirtualNetworkConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the HubVirtualNetworkConnection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.HubVirtualNetworkConnection" + """Retrieves the details of a HubVirtualNetworkConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubVirtualNetworkConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.HubVirtualNetworkConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubVirtualNetworkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubVirtualNetworkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections/{connectionName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListHubVirtualNetworkConnectionsResult"] + """Retrieves the details of all HubVirtualNetworkConnections. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListHubVirtualNetworkConnectionsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListHubVirtualNetworkConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListHubVirtualNetworkConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListHubVirtualNetworkConnectionsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/hubVirtualNetworkConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_inbound_nat_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_inbound_nat_rules_operations.py similarity index 94% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_inbound_nat_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_inbound_nat_rules_operations.py index f6e9b94a4e5b..a5254624f00f 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_inbound_nat_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_inbound_nat_rules_operations.py @@ -32,7 +32,7 @@ class InboundNatRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.InboundNatRuleListResult"] - """Gets all the inbound nat rules in a load balancer. + """Gets all the inbound NAT rules in a load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -62,7 +62,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InboundNatRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.InboundNatRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.InboundNatRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRuleListResult"] @@ -70,8 +70,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -135,7 +135,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -153,6 +154,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -175,13 +177,13 @@ def begin_delete( **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified load balancer inbound nat rule. + """Deletes the specified load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. + :param inbound_nat_rule_name: The name of the inbound NAT rule. :type inbound_nat_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -223,7 +225,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -246,19 +248,19 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.InboundNatRule" - """Gets the specified load balancer inbound nat rule. + """Gets the specified load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. + :param inbound_nat_rule_name: The name of the inbound NAT rule. :type inbound_nat_rule_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: InboundNatRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.InboundNatRule + :rtype: ~azure.mgmt.network.v2021_05_01.models.InboundNatRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] @@ -266,8 +268,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -319,9 +321,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -374,17 +376,17 @@ def begin_create_or_update( **kwargs # type: Any ): # type: (...) -> LROPoller["_models.InboundNatRule"] - """Creates or updates a load balancer inbound nat rule. + """Creates or updates a load balancer inbound NAT rule. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. + :param inbound_nat_rule_name: The name of the inbound NAT rule. :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound nat + :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound NAT rule operation. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2017_08_01.models.InboundNatRule + :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.InboundNatRule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -392,7 +394,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.InboundNatRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.InboundNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -429,7 +431,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_inbound_security_rule_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_inbound_security_rule_operations.py new file mode 100644 index 000000000000..73ea707b1736 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_inbound_security_rule_operations.py @@ -0,0 +1,185 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class InboundSecurityRuleOperations(object): + """InboundSecurityRuleOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _create_or_update_initial( + self, + resource_group_name, # type: str + network_virtual_appliance_name, # type: str + rule_collection_name, # type: str + parameters, # type: "_models.InboundSecurityRule" + **kwargs # type: Any + ): + # type: (...) -> "_models.InboundSecurityRule" + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundSecurityRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'InboundSecurityRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + network_virtual_appliance_name, # type: str + rule_collection_name, # type: str + parameters, # type: "_models.InboundSecurityRule" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.InboundSecurityRule"] + """Creates or updates the specified Network Virtual Appliance Inbound Security Rules. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param rule_collection_name: The name of security rule collection. + :type rule_collection_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance + Inbound Security Rules operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.InboundSecurityRule + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either InboundSecurityRule or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.InboundSecurityRule] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundSecurityRule"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + rule_collection_name=rule_collection_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('InboundSecurityRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'ruleCollectionName': self._serialize.url("rule_collection_name", rule_collection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/inboundSecurityRules/{ruleCollectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ip_allocations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ip_allocations_operations.py new file mode 100644 index 000000000000..4a1d43072806 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ip_allocations_operations.py @@ -0,0 +1,557 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IpAllocationsOperations(object): + """IpAllocationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + ip_allocation_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + ip_allocation_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified IpAllocation. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + ip_allocation_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.IpAllocation" + """Gets the specified IpAllocation by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpAllocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.IpAllocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + ip_allocation_name, # type: str + parameters, # type: "_models.IpAllocation" + **kwargs # type: Any + ): + # type: (...) -> "_models.IpAllocation" + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'IpAllocation') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + ip_allocation_name, # type: str + parameters, # type: "_models.IpAllocation" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.IpAllocation"] + """Creates or updates an IpAllocation in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param parameters: Parameters supplied to the create or update virtual network operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.IpAllocation + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either IpAllocation or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.IpAllocation] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + ip_allocation_name=ip_allocation_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + ip_allocation_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.IpAllocation" + """Updates a IpAllocation tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_allocation_name: The name of the IpAllocation. + :type ip_allocation_name: str + :param parameters: Parameters supplied to update IpAllocation tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpAllocation, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.IpAllocation + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocation"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipAllocationName': self._serialize.url("ip_allocation_name", ip_allocation_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpAllocation', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations/{ipAllocationName}'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.IpAllocationListResult"] + """Gets all IpAllocations in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpAllocationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.IpAllocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('IpAllocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/IpAllocations'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.IpAllocationListResult"] + """Gets all IpAllocations in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpAllocationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.IpAllocationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpAllocationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('IpAllocationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/IpAllocations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ip_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ip_groups_operations.py new file mode 100644 index 000000000000..b548f906a050 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_ip_groups_operations.py @@ -0,0 +1,564 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class IpGroupsOperations(object): + """IpGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + ip_groups_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.IpGroup" + """Gets the specified ipGroups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param expand: Expands resourceIds (of Firewalls/Network Security Groups etc.) back referenced + by the IpGroups resource. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.IpGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + ip_groups_name, # type: str + parameters, # type: "_models.IpGroup" + **kwargs # type: Any + ): + # type: (...) -> "_models.IpGroup" + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'IpGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('IpGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + ip_groups_name, # type: str + parameters, # type: "_models.IpGroup" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.IpGroup"] + """Creates or updates an ipGroups in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param parameters: Parameters supplied to the create or update IpGroups operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.IpGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either IpGroup or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.IpGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + def update_groups( + self, + resource_group_name, # type: str + ip_groups_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.IpGroup" + """Updates tags of an IpGroups resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :param parameters: Parameters supplied to the update ipGroups operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: IpGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.IpGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_groups.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('IpGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + ip_groups_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + ip_groups_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified ipGroups. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param ip_groups_name: The name of the ipGroups. + :type ip_groups_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + ip_groups_name=ip_groups_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'ipGroupsName': self._serialize.url("ip_groups_name", ip_groups_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups/{ipGroupsName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.IpGroupListResult"] + """Gets all IpGroups in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.IpGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('IpGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ipGroups'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.IpGroupListResult"] + """Gets all IpGroups in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either IpGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.IpGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.IpGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('IpGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ipGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_inbound_nat_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_backend_address_pools_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_inbound_nat_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_backend_address_pools_operations.py index dabbf303e49e..e317eeca229f 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_inbound_nat_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_backend_address_pools_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class InboundNatRulesOperations(object): - """InboundNatRulesOperations operations. +class LoadBalancerBackendAddressPoolsOperations(object): + """LoadBalancerBackendAddressPoolsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -53,25 +53,25 @@ def list( load_balancer_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.InboundNatRuleListResult"] - """Gets all the inbound nat rules in a load balancer. + # type: (...) -> Iterable["_models.LoadBalancerBackendAddressPoolListResult"] + """Gets all the load balancer backed address pools. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either InboundNatRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.InboundNatRuleListResult] + :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerBackendAddressPoolListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -99,7 +99,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('InboundNatRuleListResult', pipeline_response) + deserialized = self._deserialize('LoadBalancerBackendAddressPoolListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -120,29 +120,43 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools'} # type: ignore - def _delete_initial( + def get( self, resource_group_name, # type: str load_balancer_name, # type: str - inbound_nat_rule_name, # type: str + backend_address_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.BackendAddressPool" + """Gets load balancer backend address pool. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackendAddressPool, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.BackendAddressPool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -153,58 +167,127 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore - def begin_delete( + def _create_or_update_initial( self, resource_group_name, # type: str load_balancer_name, # type: str - inbound_nat_rule_name, # type: str + backend_address_pool_name, # type: str + parameters, # type: "_models.BackendAddressPool" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified load balancer inbound nat rule. + # type: (...) -> "_models.BackendAddressPool" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackendAddressPool') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + load_balancer_name, # type: str + backend_address_pool_name, # type: str + parameters, # type: "_models.BackendAddressPool" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BackendAddressPool"] + """Creates or updates a load balancer backend address pool. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str + :param parameters: Parameters supplied to the create or update load balancer backend address + pool operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.BackendAddressPool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either BackendAddressPool or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.BackendAddressPool] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, + backend_address_pool_name=backend_address_pool_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -213,17 +296,20 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BackendAddressPool', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -235,100 +321,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore - def get( - self, - resource_group_name, # type: str - load_balancer_name, # type: str - inbound_nat_rule_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.InboundNatRule" - """Gets the specified load balancer inbound nat rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: InboundNatRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.InboundNatRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('InboundNatRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore - - def _create_or_update_initial( + def _delete_initial( self, resource_group_name, # type: str load_balancer_name, # type: str - inbound_nat_rule_name, # type: str - inbound_nat_rule_parameters, # type: "_models.InboundNatRule" + backend_address_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.InboundNatRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -339,75 +355,59 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(inbound_nat_rule_parameters, 'InboundNatRule') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('InboundNatRule', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('InboundNatRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore - def begin_create_or_update( + def begin_delete( self, resource_group_name, # type: str load_balancer_name, # type: str - inbound_nat_rule_name, # type: str - inbound_nat_rule_parameters, # type: "_models.InboundNatRule" + backend_address_pool_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.InboundNatRule"] - """Creates or updates a load balancer inbound nat rule. + # type: (...) -> LROPoller[None] + """Deletes the specified load balancer backend address pool. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param inbound_nat_rule_name: The name of the inbound nat rule. - :type inbound_nat_rule_name: str - :param inbound_nat_rule_parameters: Parameters supplied to the create or update inbound nat - rule operation. - :type inbound_nat_rule_parameters: ~azure.mgmt.network.v2017_11_01.models.InboundNatRule + :param backend_address_pool_name: The name of the backend address pool. + :type backend_address_pool_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either InboundNatRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.InboundNatRule] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.InboundNatRule"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, load_balancer_name=load_balancer_name, - inbound_nat_rule_name=inbound_nat_rule_name, - inbound_nat_rule_parameters=inbound_nat_rule_parameters, + backend_address_pool_name=backend_address_pool_name, cls=lambda x,y,z: x, **kwargs ) @@ -416,20 +416,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('InboundNatRule', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'inboundNatRuleName': self._serialize.url("inbound_nat_rule_name", inbound_nat_rule_name, 'str'), + 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -441,4 +438,4 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/inboundNatRules/{inboundNatRuleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_frontend_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_frontend_ip_configurations_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_frontend_ip_configurations_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_frontend_ip_configurations_operations.py index a0f0bcd71712..be7b0ac5d709 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_frontend_ip_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_frontend_ip_configurations_operations.py @@ -30,7 +30,7 @@ class LoadBalancerFrontendIPConfigurationsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LoadBalancerFrontendIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerFrontendIPConfigurationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerFrontendIPConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerFrontendIPConfigurationListResult"] @@ -68,8 +68,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -138,7 +138,7 @@ def get( :type frontend_ip_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: FrontendIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.FrontendIPConfiguration + :rtype: ~azure.mgmt.network.v2021_05_01.models.FrontendIPConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.FrontendIPConfiguration"] @@ -146,8 +146,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_load_balancing_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_load_balancing_rules_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_load_balancing_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_load_balancing_rules_operations.py index 04f974eb0bee..201ccd04d932 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_load_balancing_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_load_balancing_rules_operations.py @@ -30,7 +30,7 @@ class LoadBalancerLoadBalancingRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LoadBalancerLoadBalancingRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerLoadBalancingRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerLoadBalancingRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerLoadBalancingRuleListResult"] @@ -68,8 +68,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -138,7 +138,7 @@ def get( :type load_balancing_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LoadBalancingRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.LoadBalancingRule + :rtype: ~azure.mgmt.network.v2021_05_01.models.LoadBalancingRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancingRule"] @@ -146,8 +146,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_network_interfaces_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_network_interfaces_operations.py index efdc13f1dd7a..a407acb084c4 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_network_interfaces_operations.py @@ -30,7 +30,7 @@ class LoadBalancerNetworkInterfacesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -68,8 +68,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_probes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_outbound_rules_operations.py similarity index 83% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_probes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_outbound_rules_operations.py index 7e7d2d5e65c7..885fc696a107 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_probes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_outbound_rules_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerProbesOperations(object): - """LoadBalancerProbesOperations operations. +class LoadBalancerOutboundRulesOperations(object): + """LoadBalancerOutboundRulesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -51,25 +51,25 @@ def list( load_balancer_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerProbeListResult"] - """Gets all the load balancer probes. + # type: (...) -> Iterable["_models.LoadBalancerOutboundRuleListResult"] + """Gets all the outbound rules in a load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerProbeListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerProbeListResult] + :return: An iterator like instance of either LoadBalancerOutboundRuleListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerOutboundRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerProbeListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerOutboundRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -97,7 +97,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerProbeListResult', pipeline_response) + deserialized = self._deserialize('LoadBalancerOutboundRuleListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,43 +118,43 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules'} # type: ignore def get( self, resource_group_name, # type: str load_balancer_name, # type: str - probe_name, # type: str + outbound_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.Probe" - """Gets load balancer probe. + # type: (...) -> "_models.OutboundRule" + """Gets the specified load balancer outbound rule. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param load_balancer_name: The name of the load balancer. :type load_balancer_name: str - :param probe_name: The name of the probe. - :type probe_name: str + :param outbound_rule_name: The name of the outbound rule. + :type outbound_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Probe, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.Probe + :return: OutboundRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.OutboundRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Probe"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'probeName': self._serialize.url("probe_name", probe_name, 'str'), + 'outboundRuleName': self._serialize.url("outbound_rule_name", outbound_rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -175,10 +175,10 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Probe', pipeline_response) + deserialized = self._deserialize('OutboundRule', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/probes/{probeName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/outboundRules/{outboundRuleName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_probes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_probes_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_probes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_probes_operations.py index da1c43afa00d..e1686cf70119 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_load_balancer_probes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancer_probes_operations.py @@ -30,7 +30,7 @@ class LoadBalancerProbesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LoadBalancerProbeListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.LoadBalancerProbeListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerProbeListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerProbeListResult"] @@ -68,8 +68,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -138,7 +138,7 @@ def get( :type probe_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Probe, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.Probe + :rtype: ~azure.mgmt.network.v2021_05_01.models.Probe :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Probe"] @@ -146,8 +146,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_gateway_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancers_operations.py similarity index 64% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_gateway_connections_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancers_operations.py index 29e3fa9bd02a..51ad7e3d345b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_gateway_connections_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_load_balancers_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkGatewayConnectionsOperations(object): - """VirtualNetworkGatewayConnectionsOperations operations. +class LoadBalancersOperations(object): + """LoadBalancersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,28 +47,26 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _create_or_update_initial( + def _delete_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.VirtualNetworkGatewayConnection" + load_balancer_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGatewayConnection" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -79,72 +77,55 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - def begin_create_or_update( + def begin_delete( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.VirtualNetworkGatewayConnection" + load_balancer_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetworkGatewayConnection"] - """Creates or updates a virtual network gateway connection in the specified resource group. + # type: (...) -> LROPoller[None] + """Deletes the specified load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the create or update virtual network gateway - connection operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnection + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnection] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + load_balancer_name=load_balancer_name, cls=lambda x,y,z: x, **kwargs ) @@ -153,19 +134,16 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -177,40 +155,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore def get( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str + load_balancer_name, # type: str + expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGatewayConnection" - """Gets the specified virtual network gateway connection by resource group. + # type: (...) -> "_models.LoadBalancer" + """Gets the specified load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param expand: Expands referenced resources. + :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGatewayConnection, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnection + :return: LoadBalancer, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.LoadBalancer :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -218,6 +198,8 @@ def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -231,145 +213,36 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - def _delete_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - def begin_delete( - self, - resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified virtual network Gateway connection. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - - def _set_shared_key_initial( + def _create_or_update_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionSharedKey" + load_balancer_name, # type: str + parameters, # type: "_models.LoadBalancer" **kwargs # type: Any ): - # type: (...) -> "_models.ConnectionSharedKey" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + # type: (...) -> "_models.LoadBalancer" + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._set_shared_key_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -384,7 +257,7 @@ def _set_shared_key_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionSharedKey') + body_content = self._serialize.body(parameters, 'LoadBalancer') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -395,57 +268,54 @@ def _set_shared_key_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _set_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - def begin_set_shared_key( + def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionSharedKey" + load_balancer_name, # type: str + parameters, # type: "_models.LoadBalancer" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ConnectionSharedKey"] - """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + # type: (...) -> LROPoller["_models.LoadBalancer"] + """Creates or updates a load balancer. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection - Shared key operation throughNetwork resource provider. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ConnectionSharedKey + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param parameters: Parameters supplied to the create or update load balancer operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.LoadBalancer :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ConnectionSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ConnectionSharedKey] + :return: An instance of LROPoller that returns either LoadBalancer or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.LoadBalancer] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._set_shared_key_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + load_balancer_name=load_balancer_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -455,7 +325,7 @@ def begin_set_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -463,11 +333,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -479,41 +349,43 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore - def get_shared_key( + def update_tags( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str + load_balancer_name, # type: str + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.ConnectionSharedKey" - """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the - specified virtual network gateway connection shared key through Network resource provider. + # type: (...) -> "_models.LoadBalancer" + """Updates a load balancer tags. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection shared - key name. - :type virtual_network_gateway_connection_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param parameters: Parameters supplied to update load balancer tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConnectionSharedKey, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.ConnectionSharedKey + :return: LoadBalancer, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.LoadBalancer :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_shared_key.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -524,9 +396,13 @@ def get_shared_key( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -534,37 +410,103 @@ def get_shared_key( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('LoadBalancer', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}'} # type: ignore + + def list_all( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.LoadBalancerListResult"] + """Gets all the load balancers in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/loadBalancers'} # type: ignore def list( self, resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkGatewayConnectionListResult"] - """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways - connections created. + # type: (...) -> Iterable["_models.LoadBalancerListResult"] + """Gets all the load balancers in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayConnectionListResult] + :return: An iterator like instance of either LoadBalancerListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.LoadBalancerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -591,7 +533,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListResult', pipeline_response) + deserialized = self._deserialize('LoadBalancerListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -612,30 +554,28 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers'} # type: ignore - def _reset_shared_key_initial( + def _swap_public_ip_addresses_initial( self, - resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionResetSharedKey" + location, # type: str + parameters, # type: "_models.LoadBalancerVipSwapRequest" **kwargs # type: Any ): - # type: (...) -> Optional["_models.ConnectionResetSharedKey"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._reset_shared_key_initial.metadata['url'] # type: ignore + url = self._swap_public_ip_addresses_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -650,7 +590,124 @@ def _reset_shared_key_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionResetSharedKey') + body_content = self._serialize.body(parameters, 'LoadBalancerVipSwapRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _swap_public_ip_addresses_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses'} # type: ignore + + def begin_swap_public_ip_addresses( + self, + location, # type: str + parameters, # type: "_models.LoadBalancerVipSwapRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Swaps VIPs between two load balancers. + + :param location: The region where load balancers are located at. + :type location: str + :param parameters: Parameters that define which VIPs should be swapped. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.LoadBalancerVipSwapRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._swap_public_ip_addresses_initial( + location=location, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_swap_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/setLoadBalancerFrontendPublicIpAddresses'} # type: ignore + + def _list_inbound_nat_rule_port_mappings_initial( + self, + group_name, # type: str + load_balancer_name, # type: str + backend_pool_name, # type: str + parameters, # type: "_models.QueryInboundNatRulePortMappingRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackendAddressInboundNatRulePortMappings" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressInboundNatRulePortMappings"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._list_inbound_nat_rule_port_mappings_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'backendPoolName': self._serialize.url("backend_pool_name", backend_pool_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'QueryInboundNatRulePortMappingRequest') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -660,57 +717,59 @@ def _reset_shared_key_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _reset_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + _list_inbound_nat_rule_port_mappings_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping'} # type: ignore - def begin_reset_shared_key( + def begin_list_inbound_nat_rule_port_mappings( self, - resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionResetSharedKey" + group_name, # type: str + load_balancer_name, # type: str + backend_pool_name, # type: str + parameters, # type: "_models.QueryInboundNatRulePortMappingRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ConnectionResetSharedKey"] - """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection reset - shared key Name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the begin reset virtual network gateway connection - shared key operation through network resource provider. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.ConnectionResetSharedKey + # type: (...) -> LROPoller["_models.BackendAddressInboundNatRulePortMappings"] + """List of inbound NAT rule port mappings. + + :param group_name: The name of the resource group. + :type group_name: str + :param load_balancer_name: The name of the load balancer. + :type load_balancer_name: str + :param backend_pool_name: The name of the load balancer backend address pool. + :type backend_pool_name: str + :param parameters: Query inbound NAT rule port mapping request. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.QueryInboundNatRulePortMappingRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ConnectionResetSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.ConnectionResetSharedKey] + :return: An instance of LROPoller that returns either BackendAddressInboundNatRulePortMappings or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.BackendAddressInboundNatRulePortMappings] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressInboundNatRulePortMappings"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._reset_shared_key_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + raw_result = self._list_inbound_nat_rule_port_mappings_initial( + group_name=group_name, + load_balancer_name=load_balancer_name, + backend_pool_name=backend_pool_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -720,15 +779,16 @@ def begin_reset_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + deserialized = self._deserialize('BackendAddressInboundNatRulePortMappings', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'groupName': self._serialize.url("group_name", group_name, 'str'), + 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'backendPoolName': self._serialize.url("backend_pool_name", backend_pool_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -744,4 +804,4 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + begin_list_inbound_nat_rule_port_mappings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{groupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendPoolName}/queryInboundNatRulePortMapping'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_local_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_local_network_gateways_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_local_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_local_network_gateways_operations.py index bee7862bc132..ea29b5b59263 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_local_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_local_network_gateways_operations.py @@ -32,7 +32,7 @@ class LocalNetworkGatewaysOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,9 +60,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -120,7 +120,7 @@ def begin_create_or_update( :param local_network_gateway_name: The name of the local network gateway. :type local_network_gateway_name: str :param parameters: Parameters supplied to the create or update local network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway + :type parameters: ~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -128,7 +128,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -163,7 +163,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -192,7 +192,7 @@ def get( :type local_network_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: LocalNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway + :rtype: ~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] @@ -200,8 +200,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -248,7 +248,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -265,6 +266,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -344,7 +346,7 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore - def _update_tags_initial( + def update_tags( self, resource_group_name, # type: str local_network_gateway_name, # type: str @@ -352,17 +354,30 @@ def _update_tags_initial( **kwargs # type: Any ): # type: (...) -> "_models.LocalNetworkGateway" + """Updates a local network gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param local_network_gateway_name: The name of the local network gateway. + :type local_network_gateway_name: str + :param parameters: Parameters supplied to update local network gateway tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LocalNetworkGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.LocalNetworkGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), @@ -396,79 +411,7 @@ def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - local_network_gateway_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.LocalNetworkGateway"] - """Updates a local network gateway tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :param parameters: Parameters supplied to update local network gateway tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.LocalNetworkGateway] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore def list( self, @@ -482,7 +425,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either LocalNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.LocalNetworkGatewayListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.LocalNetworkGatewayListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGatewayListResult"] @@ -490,8 +433,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_nat_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_nat_gateways_operations.py new file mode 100644 index 000000000000..20be3cdfbb5a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_nat_gateways_operations.py @@ -0,0 +1,558 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NatGatewaysOperations(object): + """NatGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + nat_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + nat_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified nat gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + nat_gateway_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.NatGateway" + """Gets the specified nat gateway in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NatGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NatGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + nat_gateway_name, # type: str + parameters, # type: "_models.NatGateway" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.NatGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NatGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NatGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('NatGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + nat_gateway_name, # type: str + parameters, # type: "_models.NatGateway" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.NatGateway"] + """Creates or updates a nat gateway. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param parameters: Parameters supplied to the create or update nat gateway operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NatGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either NatGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.NatGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + nat_gateway_name=nat_gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + nat_gateway_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.NatGateway" + """Updates nat gateway tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param nat_gateway_name: The name of the nat gateway. + :type nat_gateway_name: str + :param parameters: Parameters supplied to update nat gateway tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NatGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NatGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'natGatewayName': self._serialize.url("nat_gateway_name", nat_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NatGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways/{natGatewayName}'} # type: ignore + + def list_all( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NatGatewayListResult"] + """Gets all the Nat Gateways in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NatGatewayListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NatGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NatGatewayListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/natGateways'} # type: ignore + + def list( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NatGatewayListResult"] + """Gets all nat gateways in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NatGatewayListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NatGatewayListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NatGatewayListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NatGatewayListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/natGateways'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_local_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_nat_rules_operations.py similarity index 73% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_local_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_nat_rules_operations.py index eac9a1a09b98..5d94ceef6351 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_local_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_nat_rules_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LocalNetworkGatewaysOperations(object): - """LocalNetworkGatewaysOperations operations. +class NatRulesOperations(object): + """NatRulesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,29 +47,94 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def get( + self, + resource_group_name, # type: str + gateway_name, # type: str + nat_rule_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnGatewayNatRule" + """Retrieves the details of a nat ruleGet. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnGatewayNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore + def _create_or_update_initial( self, resource_group_name, # type: str - local_network_gateway_name, # type: str - parameters, # type: "_models.LocalNetworkGateway" + gateway_name, # type: str + nat_rule_name, # type: str + nat_rule_parameters, # type: "_models.VpnGatewayNatRule" **kwargs # type: Any ): - # type: (...) -> "_models.LocalNetworkGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + # type: (...) -> "_models.VpnGatewayNatRule" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -83,7 +148,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'LocalNetworkGateway') + body_content = self._serialize.body(nat_rule_parameters, 'VpnGatewayNatRule') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -94,45 +159,49 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - local_network_gateway_name, # type: str - parameters, # type: "_models.LocalNetworkGateway" + gateway_name, # type: str + nat_rule_name, # type: str + nat_rule_parameters, # type: "_models.VpnGatewayNatRule" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.LocalNetworkGateway"] - """Creates or updates a local network gateway in the specified resource group. + # type: (...) -> LROPoller["_models.VpnGatewayNatRule"] + """Creates a nat rule to a scalable vpn gateway if it doesn't exist else updates the existing nat + rules. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :param parameters: Parameters supplied to the create or update local network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :param nat_rule_parameters: Parameters supplied to create or Update a Nat Rule. + :type nat_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either LocalNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway] + :return: An instance of LROPoller that returns either VpnGatewayNatRule or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnGatewayNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGatewayNatRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -141,8 +210,9 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, - parameters=parameters, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, + nat_rule_parameters=nat_rule_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -151,19 +221,20 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) + deserialized = self._deserialize('VpnGatewayNatRule', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -175,71 +246,13 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - local_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.LocalNetworkGateway" - """Gets the specified local network gateway in a resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LocalNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.LocalNetworkGateway - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGateway"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('LocalNetworkGateway', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore def _delete_initial( self, resource_group_name, # type: str - local_network_gateway_name, # type: str + gateway_name, # type: str + nat_rule_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -248,14 +261,16 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -265,6 +280,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -277,21 +293,24 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - local_network_gateway_name, # type: str + gateway_name, # type: str + nat_rule_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified local network gateway. + """Deletes a nat rule. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param local_network_gateway_name: The name of the local network gateway. - :type local_network_gateway_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -312,7 +331,8 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - local_network_gateway_name=local_network_gateway_name, + gateway_name=gateway_name, + nat_rule_name=nat_rule_name, cls=lambda x,y,z: x, **kwargs ) @@ -325,9 +345,10 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'localNetworkGatewayName': self._serialize.url("local_network_gateway_name", local_network_gateway_name, 'str', min_length=1), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -342,30 +363,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways/{localNetworkGatewayName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules/{natRuleName}'} # type: ignore - def list( + def list_by_vpn_gateway( self, resource_group_name, # type: str + gateway_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LocalNetworkGatewayListResult"] - """Gets all the local network gateways in a resource group. + # type: (...) -> Iterable["_models.ListVpnGatewayNatRulesResult"] + """Retrieves all nat rules for a particular virtual wan vpn gateway. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LocalNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.LocalNetworkGatewayListResult] + :return: An iterator like instance of either ListVpnGatewayNatRulesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnGatewayNatRulesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LocalNetworkGatewayListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewayNatRulesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -374,10 +398,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_vpn_gateway.metadata['url'] # type: ignore 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -392,7 +417,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LocalNetworkGatewayListResult', pipeline_response) + deserialized = self._deserialize('ListVpnGatewayNatRulesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -413,4 +438,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/localNetworkGateways'} # type: ignore + list_by_vpn_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/natRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_interface_ip_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interface_ip_configurations_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_interface_ip_configurations_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interface_ip_configurations_operations.py index 0c4fb9028662..f211df57cdc9 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_interface_ip_configurations_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interface_ip_configurations_operations.py @@ -30,7 +30,7 @@ class NetworkInterfaceIPConfigurationsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type network_interface_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfigurationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] @@ -68,8 +68,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -138,7 +138,7 @@ def get( :type ip_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceIPConfiguration + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] @@ -146,8 +146,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interface_load_balancers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interface_load_balancers_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interface_load_balancers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interface_load_balancers_operations.py index 422cdc50c11d..a909106bee77 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interface_load_balancers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interface_load_balancers_operations.py @@ -30,7 +30,7 @@ class NetworkInterfaceLoadBalancersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,7 @@ def list( :type network_interface_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceLoadBalancerListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceLoadBalancerListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceLoadBalancerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceLoadBalancerListResult"] @@ -68,8 +68,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interface_tap_configurations_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_security_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interface_tap_configurations_operations.py index ed4eeb9e76ff..36076d03f4c3 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interface_tap_configurations_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class SecurityRulesOperations(object): - """SecurityRulesOperations operations. +class NetworkInterfaceTapConfigurationsOperations(object): + """NetworkInterfaceTapConfigurationsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,8 +50,8 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str + network_interface_name, # type: str + tap_configuration_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -60,14 +60,15 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,6 +79,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -90,24 +92,24 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str + network_interface_name, # type: str + tap_configuration_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified network security rule. + """Deletes the specified tap configuration from the NetworkInterface. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -128,8 +130,8 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, cls=lambda x,y,z: x, **kwargs ) @@ -143,12 +145,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,43 +162,43 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore def get( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str + network_interface_name, # type: str + tap_configuration_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.SecurityRule" - """Get the specified network security rule. + # type: (...) -> "_models.NetworkInterfaceTapConfiguration" + """Get the specified tap configuration on a network interface. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.SecurityRule + :return: NetworkInterfaceTapConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -217,38 +219,38 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str - security_rule_parameters, # type: "_models.SecurityRule" + network_interface_name, # type: str + tap_configuration_name, # type: str + tap_configuration_parameters, # type: "_models.NetworkInterfaceTapConfiguration" **kwargs # type: Any ): - # type: (...) -> "_models.SecurityRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + # type: (...) -> "_models.NetworkInterfaceTapConfiguration" + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -263,7 +265,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(security_rule_parameters, 'SecurityRule') + body_content = self._serialize.body(tap_configuration_parameters, 'NetworkInterfaceTapConfiguration') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -274,49 +276,49 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str - security_rule_parameters, # type: "_models.SecurityRule" + network_interface_name, # type: str + tap_configuration_name, # type: str + tap_configuration_parameters, # type: "_models.NetworkInterfaceTapConfiguration" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.SecurityRule"] - """Creates or updates a security rule in the specified network security group. + # type: (...) -> LROPoller["_models.NetworkInterfaceTapConfiguration"] + """Creates or updates a Tap configuration in the specified NetworkInterface. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. - :type security_rule_parameters: ~azure.mgmt.network.v2017_09_01.models.SecurityRule + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param tap_configuration_name: The name of the tap configuration. + :type tap_configuration_name: str + :param tap_configuration_parameters: Parameters supplied to the create or update tap + configuration operation. + :type tap_configuration_parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either SecurityRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.SecurityRule] + :return: An instance of LROPoller that returns either NetworkInterfaceTapConfiguration or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfiguration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -325,9 +327,9 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, - security_rule_parameters=security_rule_parameters, + network_interface_name=network_interface_name, + tap_configuration_name=tap_configuration_name, + tap_configuration_parameters=tap_configuration_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -336,7 +338,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfiguration', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -344,12 +346,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'tapConfigurationName': self._serialize.url("tap_configuration_name", tap_configuration_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -361,33 +363,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations/{tapConfigurationName}'} # type: ignore def list( self, resource_group_name, # type: str - network_security_group_name, # type: str + network_interface_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.SecurityRuleListResult"] - """Gets all security rules in a network security group. + # type: (...) -> Iterable["_models.NetworkInterfaceTapConfigurationListResult"] + """Get all Tap configurations in a network interface. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.SecurityRuleListResult] + :return: An iterator like instance of either NetworkInterfaceTapConfigurationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceTapConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceTapConfigurationListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -399,7 +401,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -415,7 +417,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityRuleListResult', pipeline_response) + deserialized = self._deserialize('NetworkInterfaceTapConfigurationListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -436,4 +438,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/tapConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interfaces_operations.py similarity index 81% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interfaces_operations.py index 46418d753390..9a80fc38ebe5 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_interfaces_operations.py @@ -32,7 +32,7 @@ class NetworkInterfacesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,6 +47,232 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def list_cloud_service_role_instance_network_interfaces( + self, + resource_group_name, # type: str + cloud_service_name, # type: str + role_instance_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] + """Gets information about all network interfaces in a role instance in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_cloud_service_role_instance_network_interfaces.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_cloud_service_role_instance_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces'} # type: ignore + + def list_cloud_service_network_interfaces( + self, + resource_group_name, # type: str + cloud_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] + """Gets all network interfaces in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_cloud_service_network_interfaces.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_cloud_service_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/networkInterfaces'} # type: ignore + + def get_cloud_service_network_interface( + self, + resource_group_name, # type: str + cloud_service_name, # type: str + role_instance_name, # type: str + network_interface_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkInterface" + """Get the specified network interface in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_cloud_service_network_interface.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkInterface', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_cloud_service_network_interface.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}'} # type: ignore + def _delete_initial( self, resource_group_name, # type: str @@ -59,7 +285,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -76,6 +303,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -141,7 +369,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -173,7 +401,7 @@ def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkInterface + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] @@ -181,8 +409,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -232,9 +460,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -292,7 +520,7 @@ def begin_create_or_update( :param network_interface_name: The name of the network interface. :type network_interface_name: str :param parameters: Parameters supplied to the create or update network interface operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.NetworkInterface + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -300,7 +528,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.NetworkInterface] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkInterface] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -335,7 +563,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -349,7 +577,7 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore - def _update_tags_initial( + def update_tags( self, resource_group_name, # type: str network_interface_name, # type: str @@ -357,17 +585,30 @@ def _update_tags_initial( **kwargs # type: Any ): # type: (...) -> "_models.NetworkInterface" + """Updates a network interface tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param parameters: Parameters supplied to update network interface tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkInterface, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), @@ -401,79 +642,7 @@ def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - network_interface_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.NetworkInterface"] - """Updates a network interface tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param parameters: Parameters supplied to update network interface tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.NetworkInterface] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore def list_all( self, @@ -484,7 +653,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -492,8 +661,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -554,7 +723,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -562,8 +731,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -625,8 +794,8 @@ def _get_effective_route_table_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_effective_route_table_initial.metadata['url'] # type: ignore @@ -683,7 +852,7 @@ def begin_get_effective_route_table( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either EffectiveRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.EffectiveRouteListResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.EffectiveRouteListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -717,7 +886,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -743,8 +912,8 @@ def _list_effective_network_security_groups_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._list_effective_network_security_groups_initial.metadata['url'] # type: ignore @@ -801,7 +970,7 @@ def begin_list_effective_network_security_groups( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either EffectiveNetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.EffectiveNetworkSecurityGroupListResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.EffectiveNetworkSecurityGroupListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -835,7 +1004,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -868,7 +1037,7 @@ def list_virtual_machine_scale_set_vm_network_interfaces( :type virtualmachine_index: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -876,8 +1045,8 @@ def list_virtual_machine_scale_set_vm_network_interfaces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -944,7 +1113,7 @@ def list_virtual_machine_scale_set_network_interfaces( :type virtual_machine_scale_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] @@ -952,8 +1121,8 @@ def list_virtual_machine_scale_set_network_interfaces( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -1028,7 +1197,7 @@ def get_virtual_machine_scale_set_network_interface( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkInterface + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterface :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] @@ -1036,8 +1205,8 @@ def get_virtual_machine_scale_set_network_interface( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" # Construct URL url = self.get_virtual_machine_scale_set_network_interface.metadata['url'] # type: ignore @@ -1100,7 +1269,7 @@ def list_virtual_machine_scale_set_ip_configurations( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfigurationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfigurationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] @@ -1108,8 +1277,8 @@ def list_virtual_machine_scale_set_ip_configurations( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -1191,7 +1360,7 @@ def get_virtual_machine_scale_set_ip_configuration( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkInterfaceIPConfiguration + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkInterfaceIPConfiguration :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] @@ -1199,8 +1368,8 @@ def get_virtual_machine_scale_set_ip_configuration( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" # Construct URL url = self.get_virtual_machine_scale_set_ip_configuration.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_management_client_operations.py similarity index 61% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_management_client_operations.py index c0c9e6734578..59fbf44e1d27 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_management_client_operations.py @@ -25,47 +25,30 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class NetworkInterfacesOperations(object): - """NetworkInterfacesOperations operations. +class NetworkManagementClientOperationsMixin(object): - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def _delete_initial( + def _put_bastion_shareable_link_initial( self, resource_group_name, # type: str - network_interface_name, # type: str + bastion_host_name, # type: str + bsl_request, # type: "_models.BastionShareableLinkListRequest" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Optional["_models.BastionShareableLinkListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionShareableLinkListResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._put_bastion_shareable_link_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,72 +59,151 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('BastionShareableLinkListResult', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + return deserialized + _put_bastion_shareable_link_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks'} # type: ignore - def begin_delete( + def begin_put_bastion_shareable_link( self, resource_group_name, # type: str - network_interface_name, # type: str + bastion_host_name, # type: str + bsl_request, # type: "_models.BastionShareableLinkListRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified network interface. + # type: (...) -> LROPoller[ItemPaged["_models.BastionShareableLinkListResult"]] + """Creates a Bastion Shareable Links for all the VMs specified in the request. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns an iterator like instance of either BastionShareableLinkListResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult]] :raises ~azure.core.exceptions.HttpResponseError: """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = "application/json" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.put_bastion_shareable_link.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('BastionShareableLinkListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._put_bastion_shareable_link_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + bastion_host_name=bastion_host_name, + bsl_request=bsl_request, cls=lambda x,y,z: x, **kwargs ) kwargs.pop('error_map', None) kwargs.pop('content_type', None) - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return get_next(next_link) + + return ItemPaged( + internal_get_next, extract_data + ) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,94 +215,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + begin_put_bastion_shareable_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/createShareableLinks'} # type: ignore - def get( + def _delete_bastion_shareable_link_initial( self, resource_group_name, # type: str - network_interface_name, # type: str - expand=None, # type: Optional[str] + bastion_host_name, # type: str + bsl_request, # type: "_models.BastionShareableLinkListRequest" **kwargs # type: Any ): - # type: (...) -> "_models.NetworkInterface" - """Gets information about the specified network interface. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkInterface - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - network_interface_name, # type: str - parameters, # type: "_models.NetworkInterface" - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkInterface" - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_bastion_shareable_link_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,66 +253,59 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkInterface') + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('NetworkInterface', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + _delete_bastion_shareable_link_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks'} # type: ignore - def begin_create_or_update( + def begin_delete_bastion_shareable_link( self, resource_group_name, # type: str - network_interface_name, # type: str - parameters, # type: "_models.NetworkInterface" + bastion_host_name, # type: str + bsl_request, # type: "_models.BastionShareableLinkListRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.NetworkInterface"] - """Creates or updates a network interface. + # type: (...) -> LROPoller[None] + """Deletes the Bastion Shareable Links for all the VMs specified in the request. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param parameters: Parameters supplied to the create or update network interface operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.NetworkInterface + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.NetworkInterface] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_bastion_shareable_link_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - parameters=parameters, + bastion_host_name=bastion_host_name, + bsl_request=bsl_request, cls=lambda x,y,z: x, **kwargs ) @@ -323,19 +314,16 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkInterface', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -347,108 +335,50 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + begin_delete_bastion_shareable_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/deleteShareableLinks'} # type: ignore - def list_all( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets all network interfaces in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces'} # type: ignore - - def list( + def get_bastion_shareable_link( self, resource_group_name, # type: str + bastion_host_name, # type: str + bsl_request, # type: "_models.BastionShareableLinkListRequest" **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets all network interfaces in a resource group. + # type: (...) -> Iterable["_models.BastionShareableLinkListResult"] + """Return the Bastion Shareable Links for all the VMs specified in the request. :param resource_group_name: The name of the resource group. :type resource_group_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param bsl_request: Post request for all the Bastion Shareable Link endpoints. + :type bsl_request: ~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListRequest :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either BastionShareableLinkListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionShareableLinkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionShareableLinkListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = "application/json" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.get_bastion_shareable_link.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -456,15 +386,21 @@ def prepare_request(next_link=None): query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) else: url = next_link query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(bsl_request, 'BastionShareableLinkListRequest') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('BastionShareableLinkListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -485,28 +421,28 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces'} # type: ignore + get_bastion_shareable_link.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getShareableLinks'} # type: ignore - def _get_effective_route_table_initial( + def _get_active_sessions_initial( self, resource_group_name, # type: str - network_interface_name, # type: str + bastion_host_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["_models.EffectiveRouteListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveRouteListResult"]] + # type: (...) -> Optional["_models.BastionActiveSessionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BastionActiveSessionListResult"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._get_effective_route_table_initial.metadata['url'] # type: ignore + url = self._get_active_sessions_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -529,187 +465,123 @@ def _get_effective_route_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + deserialized = self._deserialize('BastionActiveSessionListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_effective_route_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'} # type: ignore + _get_active_sessions_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions'} # type: ignore - def begin_get_effective_route_table( + def begin_get_active_sessions( self, resource_group_name, # type: str - network_interface_name, # type: str + bastion_host_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.EffectiveRouteListResult"] - """Gets all route tables applied to a network interface. + # type: (...) -> LROPoller[ItemPaged["_models.BastionActiveSessionListResult"]] + """Returns the list of currently active sessions on the Bastion. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either EffectiveRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.EffectiveRouteListResult] + :return: An instance of LROPoller that returns an iterator like instance of either BastionActiveSessionListResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionActiveSessionListResult]] :raises ~azure.core.exceptions.HttpResponseError: """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveRouteListResult"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._get_effective_route_table_initial( - resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_effective_route_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'} # type: ignore - - def _list_effective_network_security_groups_initial( - self, - resource_group_name, # type: str - network_interface_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.EffectiveNetworkSecurityGroupListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveNetworkSecurityGroupListResult"]] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionActiveSessionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self._list_effective_network_security_groups_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + api_version = "2021-05-01" + accept = "application/json" - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: + # Construct URL + url = self.get_active_sessions.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.post(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + request = self._client.post(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def extract_data(pipeline_response): + deserialized = self._deserialize('BastionActiveSessionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, deserialized, {}) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - return deserialized - _list_effective_network_security_groups_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - def begin_list_effective_network_security_groups( - self, - resource_group_name, # type: str - network_interface_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.EffectiveNetworkSecurityGroupListResult"] - """Gets all network security groups applied to a network interface. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either EffectiveNetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.EffectiveNetworkSecurityGroupListResult] - :raises ~azure.core.exceptions.HttpResponseError: - """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveNetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionActiveSessionListResult"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._list_effective_network_security_groups_initial( + raw_result = self._get_active_sessions_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + bastion_host_name=bastion_host_name, cls=lambda x,y,z: x, **kwargs ) kwargs.pop('error_map', None) kwargs.pop('content_type', None) - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - + def internal_get_next(next_link=None): + if next_link is None: + return pipeline_response + else: + return get_next(next_link) + + return ItemPaged( + internal_get_next, extract_data + ) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -721,50 +593,50 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_effective_network_security_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'} # type: ignore + begin_get_active_sessions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/getActiveSessions'} # type: ignore - def list_virtual_machine_scale_set_vm_network_interfaces( + def disconnect_active_sessions( self, resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str + bastion_host_name, # type: str + session_ids, # type: "_models.SessionIds" **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets information about all network interfaces in a virtual machine in a virtual machine scale - set. + # type: (...) -> Iterable["_models.BastionSessionDeleteResult"] + """Returns the list of currently active sessions on the Bastion. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str + :param bastion_host_name: The name of the Bastion Host. + :type bastion_host_name: str + :param session_ids: The list of sessionids to disconnect. + :type session_ids: ~azure.mgmt.network.v2021_05_01.models.SessionIds :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either BastionSessionDeleteResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.BastionSessionDeleteResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BastionSessionDeleteResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = "application/json" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_vm_network_interfaces.metadata['url'] # type: ignore + url = self.disconnect_active_sessions.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), + 'bastionHostName': self._serialize.url("bastion_host_name", bastion_host_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -772,15 +644,21 @@ def prepare_request(next_link=None): query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(session_ids, 'SessionIds') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) else: url = next_link query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(session_ids, 'SessionIds') + body_content_kwargs['content'] = body_content + request = self._client.get(url, query_parameters, header_parameters, **body_content_kwargs) return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('BastionSessionDeleteResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -801,134 +679,107 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_vm_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces'} # type: ignore + disconnect_active_sessions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/bastionHosts/{bastionHostName}/disconnectActiveSessions'} # type: ignore - def list_virtual_machine_scale_set_network_interfaces( + def check_dns_name_availability( self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str + location, # type: str + domain_name_label, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets all network interfaces in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str + # type: (...) -> "_models.DnsNameAvailabilityResult" + """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + + :param location: The location of the domain name. + :type location: str + :param domain_name_label: The domain name to be verified. It must conform to the following + regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. + :type domain_name_label: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] + :return: DnsNameAvailabilityResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.DnsNameAvailabilityResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_virtual_machine_scale_set_network_interfaces.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.check_dns_name_availability.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str') + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return ItemPaged( - get_next, extract_data - ) - list_virtual_machine_scale_set_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces'} # type: ignore + return deserialized + check_dns_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'} # type: ignore - def get_virtual_machine_scale_set_network_interface( + def supported_security_providers( self, resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str - network_interface_name, # type: str - expand=None, # type: Optional[str] + virtual_wan_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.NetworkInterface" - """Get the specified network interface in a virtual machine scale set. + # type: (...) -> "_models.VirtualWanSecurityProviders" + """Gives the supported security providers for the virtual wan. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name. :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str + :param virtual_wan_name: The name of the VirtualWAN for which supported security providers are + needed. + :type virtual_wan_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkInterface + :return: VirtualWanSecurityProviders, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWanSecurityProviders :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWanSecurityProviders"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self.get_virtual_machine_scale_set_network_interface.metadata['url'] # type: ignore + url = self.supported_security_providers.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -942,10 +793,141 @@ def get_virtual_machine_scale_set_network_interface( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('VirtualWanSecurityProviders', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_virtual_machine_scale_set_network_interface.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}'} # type: ignore + supported_security_providers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/supportedSecurityProviders'} # type: ignore + + def _generatevirtualwanvpnserverconfigurationvpnprofile_initial( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + vpn_client_params, # type: "_models.VirtualWanVpnProfileParameters" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VpnProfileResponse"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnProfileResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._generatevirtualwanvpnserverconfigurationvpnprofile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_client_params, 'VirtualWanVpnProfileParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _generatevirtualwanvpnserverconfigurationvpnprofile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile'} # type: ignore + + def begin_generatevirtualwanvpnserverconfigurationvpnprofile( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + vpn_client_params, # type: "_models.VirtualWanVpnProfileParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnProfileResponse"] + """Generates a unique VPN profile for P2S clients for VirtualWan and associated + VpnServerConfiguration combination in the specified resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :param vpn_client_params: Parameters supplied to the generate VirtualWan VPN profile generation + operation. + :type vpn_client_params: ~azure.mgmt.network.v2021_05_01.models.VirtualWanVpnProfileParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VpnProfileResponse or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnProfileResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._generatevirtualwanvpnserverconfigurationvpnprofile_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + vpn_client_params=vpn_client_params, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_generatevirtualwanvpnserverconfigurationvpnprofile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/GenerateVpnProfile'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_profiles_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_profiles_operations.py new file mode 100644 index 000000000000..e4a438975610 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_profiles_operations.py @@ -0,0 +1,498 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkProfilesOperations(object): + """NetworkProfilesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + network_profile_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + network_profile_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified network profile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the NetworkProfile. + :type network_profile_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_profile_name=network_profile_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_profile_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkProfile" + """Gets the specified network profile in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the public IP prefix. + :type network_profile_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + network_profile_name, # type: str + parameters, # type: "_models.NetworkProfile" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkProfile" + """Creates or updates a network profile. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. + :type network_profile_name: str + :param parameters: Parameters supplied to the create or update network profile operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkProfile + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkProfile') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + network_profile_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkProfile" + """Updates network profile tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_profile_name: The name of the network profile. + :type network_profile_name: str + :param parameters: Parameters supplied to update network profile tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkProfile, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkProfile + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfile"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkProfileName': self._serialize.url("network_profile_name", network_profile_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkProfile', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles/{networkProfileName}'} # type: ignore + + def list_all( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkProfileListResult"] + """Gets all the network profiles in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkProfileListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkProfileListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkProfileListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkProfiles'} # type: ignore + + def list( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkProfileListResult"] + """Gets all network profiles in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkProfileListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkProfileListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkProfileListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkProfileListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkProfiles'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_security_groups_operations.py similarity index 85% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_security_groups_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_security_groups_operations.py index 327a3ab467f6..527b97ec7c6b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_security_groups_operations.py @@ -32,7 +32,7 @@ class NetworkSecurityGroupsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -141,7 +143,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -173,7 +175,7 @@ def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] @@ -181,8 +183,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -232,9 +234,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -293,7 +295,7 @@ def begin_create_or_update( :type network_security_group_name: str :param parameters: Parameters supplied to the create or update network security group operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -301,7 +303,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -336,7 +338,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -350,7 +352,7 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - def _update_tags_initial( + def update_tags( self, resource_group_name, # type: str network_security_group_name, # type: str @@ -358,17 +360,30 @@ def _update_tags_initial( **kwargs # type: Any ): # type: (...) -> "_models.NetworkSecurityGroup" + """Updates a network security group tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_security_group_name: The name of the network security group. + :type network_security_group_name: str + :param parameters: Parameters supplied to update network security group tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkSecurityGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), @@ -402,79 +417,7 @@ def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - network_security_group_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.NetworkSecurityGroup"] - """Updates a network security group tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param parameters: Parameters supplied to update network security group tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroup] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore def list_all( self, @@ -485,7 +428,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroupListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] @@ -493,8 +436,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -555,7 +498,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.NetworkSecurityGroupListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkSecurityGroupListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] @@ -563,8 +506,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_virtual_appliances_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_virtual_appliances_operations.py new file mode 100644 index 000000000000..fc099dd18e44 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_virtual_appliances_operations.py @@ -0,0 +1,557 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class NetworkVirtualAppliancesOperations(object): + """NetworkVirtualAppliancesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + network_virtual_appliance_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + network_virtual_appliance_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + network_virtual_appliance_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkVirtualAppliance" + """Gets the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualAppliance, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + network_virtual_appliance_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkVirtualAppliance" + """Updates a Network Virtual Appliance. + + :param resource_group_name: The resource group name of Network Virtual Appliance. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance being updated. + :type network_virtual_appliance_name: str + :param parameters: Parameters supplied to Update Network Virtual Appliance Tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualAppliance, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + network_virtual_appliance_name, # type: str + parameters, # type: "_models.NetworkVirtualAppliance" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkVirtualAppliance" + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkVirtualAppliance') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + network_virtual_appliance_name, # type: str + parameters, # type: "_models.NetworkVirtualAppliance" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.NetworkVirtualAppliance"] + """Creates or updates the specified Network Virtual Appliance. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_virtual_appliance_name: The name of Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either NetworkVirtualAppliance or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualAppliance] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualAppliance"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + network_virtual_appliance_name=network_virtual_appliance_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('NetworkVirtualAppliance', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkVirtualApplianceListResult"] + """Lists all Network Virtual Appliances in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkVirtualApplianceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkVirtualApplianceListResult"] + """Gets all Network Virtual Appliances in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkVirtualApplianceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualAppliances'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_watchers_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_watchers_operations.py similarity index 85% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_watchers_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_watchers_operations.py index 89f94293c5dd..1198709232d5 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_watchers_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_network_watchers_operations.py @@ -32,7 +32,7 @@ class NetworkWatchersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -62,10 +62,10 @@ def create_or_update( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the network watcher resource. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.NetworkWatcher + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkWatcher :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkWatcher + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkWatcher :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] @@ -73,9 +73,9 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore @@ -104,7 +104,8 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('NetworkWatcher', pipeline_response) @@ -133,7 +134,7 @@ def get( :type network_watcher_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkWatcher + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkWatcher :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] @@ -141,8 +142,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -167,7 +168,8 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NetworkWatcher', pipeline_response) @@ -189,7 +191,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -206,6 +209,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -213,7 +217,8 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -271,7 +276,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -300,10 +305,10 @@ def update_tags( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters supplied to update network watcher tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :return: NetworkWatcher, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkWatcher + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkWatcher :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcher"] @@ -311,9 +316,9 @@ def update_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self.update_tags.metadata['url'] # type: ignore @@ -342,7 +347,8 @@ def update_tags( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NetworkWatcher', pipeline_response) @@ -364,7 +370,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkWatcherListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkWatcherListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] @@ -372,8 +378,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -413,8 +419,9 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -432,7 +439,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either NetworkWatcherListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkWatcherListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkWatcherListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkWatcherListResult"] @@ -440,8 +447,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -480,8 +487,9 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response @@ -505,10 +513,10 @@ def get_topology( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the representation of topology. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TopologyParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TopologyParameters :keyword callable cls: A custom type or function that will be passed the direct response :return: Topology, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.Topology + :rtype: ~azure.mgmt.network.v2021_05_01.models.Topology :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Topology"] @@ -516,9 +524,9 @@ def get_topology( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self.get_topology.metadata['url'] # type: ignore @@ -547,7 +555,8 @@ def get_topology( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Topology', pipeline_response) @@ -570,9 +579,9 @@ def _verify_ip_flow_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._verify_ip_flow_initial.metadata['url'] # type: ignore @@ -601,7 +610,8 @@ def _verify_ip_flow_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('VerificationIPFlowResult', pipeline_response) @@ -630,7 +640,7 @@ def begin_verify_ip_flow( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the IP flow to be verified. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VerificationIPFlowParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VerificationIPFlowParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -638,7 +648,7 @@ def begin_verify_ip_flow( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VerificationIPFlowResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.VerificationIPFlowResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VerificationIPFlowResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -673,7 +683,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -700,9 +710,9 @@ def _get_next_hop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_next_hop_initial.metadata['url'] # type: ignore @@ -731,7 +741,8 @@ def _get_next_hop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('NextHopResult', pipeline_response) @@ -760,7 +771,7 @@ def begin_get_next_hop( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the source and destination endpoint. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.NextHopParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NextHopParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -768,7 +779,7 @@ def begin_get_next_hop( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either NextHopResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.NextHopResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.NextHopResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -803,7 +814,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -830,9 +841,9 @@ def _get_vm_security_rules_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_vm_security_rules_initial.metadata['url'] # type: ignore @@ -861,7 +872,8 @@ def _get_vm_security_rules_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('SecurityGroupViewResult', pipeline_response) @@ -890,7 +902,7 @@ def begin_get_vm_security_rules( :param network_watcher_name: The name of the network watcher. :type network_watcher_name: str :param parameters: Parameters that define the VM to check security groups for. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.SecurityGroupViewParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SecurityGroupViewParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -898,7 +910,7 @@ def begin_get_vm_security_rules( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SecurityGroupViewResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.SecurityGroupViewResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.SecurityGroupViewResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -933,7 +945,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -960,9 +972,9 @@ def _get_troubleshooting_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_troubleshooting_initial.metadata['url'] # type: ignore @@ -991,7 +1003,8 @@ def _get_troubleshooting_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('TroubleshootingResult', pipeline_response) @@ -1020,7 +1033,7 @@ def begin_get_troubleshooting( :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that define the resource to troubleshoot. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TroubleshootingParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TroubleshootingParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -1028,7 +1041,7 @@ def begin_get_troubleshooting( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.TroubleshootingResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.TroubleshootingResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1063,7 +1076,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1090,9 +1103,9 @@ def _get_troubleshooting_result_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_troubleshooting_result_initial.metadata['url'] # type: ignore @@ -1121,7 +1134,8 @@ def _get_troubleshooting_result_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('TroubleshootingResult', pipeline_response) @@ -1150,7 +1164,7 @@ def begin_get_troubleshooting_result( :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that define the resource to query the troubleshooting result. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.QueryTroubleshootingParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.QueryTroubleshootingParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -1158,7 +1172,7 @@ def begin_get_troubleshooting_result( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either TroubleshootingResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.TroubleshootingResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.TroubleshootingResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1193,7 +1207,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1220,9 +1234,9 @@ def _set_flow_log_configuration_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._set_flow_log_configuration_initial.metadata['url'] # type: ignore @@ -1251,7 +1265,8 @@ def _set_flow_log_configuration_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('FlowLogInformation', pipeline_response) @@ -1273,14 +1288,14 @@ def begin_set_flow_log_configuration( **kwargs # type: Any ): # type: (...) -> LROPoller["_models.FlowLogInformation"] - """Configures flow log on a specified resource. + """Configures flow log and traffic analytics (optional) on a specified resource. :param resource_group_name: The name of the network watcher resource group. :type resource_group_name: str :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that define the configuration of flow log. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.FlowLogInformation + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FlowLogInformation :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -1288,7 +1303,7 @@ def begin_set_flow_log_configuration( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.FlowLogInformation] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.FlowLogInformation] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1323,7 +1338,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1350,9 +1365,9 @@ def _get_flow_log_status_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_flow_log_status_initial.metadata['url'] # type: ignore @@ -1381,7 +1396,8 @@ def _get_flow_log_status_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('FlowLogInformation', pipeline_response) @@ -1403,14 +1419,15 @@ def begin_get_flow_log_status( **kwargs # type: Any ): # type: (...) -> LROPoller["_models.FlowLogInformation"] - """Queries status of flow log on a specified resource. + """Queries status of flow log and traffic analytics (optional) on a specified resource. :param resource_group_name: The name of the network watcher resource group. :type resource_group_name: str :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str - :param parameters: Parameters that define a resource to query flow log status. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.FlowLogStatusParameters + :param parameters: Parameters that define a resource to query flow log and traffic analytics + (optional) status. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.FlowLogStatusParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -1418,7 +1435,7 @@ def begin_get_flow_log_status( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either FlowLogInformation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.FlowLogInformation] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.FlowLogInformation] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1453,7 +1470,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1480,9 +1497,9 @@ def _check_connectivity_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._check_connectivity_initial.metadata['url'] # type: ignore @@ -1511,7 +1528,8 @@ def _check_connectivity_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('ConnectivityInformation', pipeline_response) @@ -1541,7 +1559,7 @@ def begin_check_connectivity( :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that determine how the connectivity check will be performed. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.ConnectivityParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ConnectivityParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -1549,7 +1567,7 @@ def begin_check_connectivity( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ConnectivityInformation or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.ConnectivityInformation] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectivityInformation] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1584,7 +1602,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1611,9 +1629,9 @@ def _get_azure_reachability_report_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._get_azure_reachability_report_initial.metadata['url'] # type: ignore @@ -1642,7 +1660,8 @@ def _get_azure_reachability_report_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('AzureReachabilityReport', pipeline_response) @@ -1664,15 +1683,16 @@ def begin_get_azure_reachability_report( **kwargs # type: Any ): # type: (...) -> LROPoller["_models.AzureReachabilityReport"] - """Gets the relative latency score for internet service providers from a specified location to - Azure regions. + """NOTE: This feature is currently in preview and still being tested for stability. Gets the + relative latency score for internet service providers from a specified location to Azure + regions. :param resource_group_name: The name of the network watcher resource group. :type resource_group_name: str :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that determine Azure reachability report configuration. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReportParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReportParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -1680,7 +1700,7 @@ def begin_get_azure_reachability_report( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AzureReachabilityReport or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.AzureReachabilityReport] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.AzureReachabilityReport] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1715,7 +1735,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1742,9 +1762,9 @@ def _list_available_providers_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._list_available_providers_initial.metadata['url'] # type: ignore @@ -1773,7 +1793,8 @@ def _list_available_providers_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('AvailableProvidersList', pipeline_response) @@ -1795,14 +1816,15 @@ def begin_list_available_providers( **kwargs # type: Any ): # type: (...) -> LROPoller["_models.AvailableProvidersList"] - """Lists all available internet service providers for a specified Azure region. + """NOTE: This feature is currently in preview and still being tested for stability. Lists all + available internet service providers for a specified Azure region. :param resource_group_name: The name of the network watcher resource group. :type resource_group_name: str :param network_watcher_name: The name of the network watcher resource. :type network_watcher_name: str :param parameters: Parameters that scope the list of available providers. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.AvailableProvidersListParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.AvailableProvidersListParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -1810,7 +1832,7 @@ def begin_list_available_providers( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AvailableProvidersList or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.AvailableProvidersList] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.AvailableProvidersList] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1845,7 +1867,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -1858,3 +1880,138 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_list_available_providers.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/availableProvidersList'} # type: ignore + + def _get_network_configuration_diagnostic_initial( + self, + resource_group_name, # type: str + network_watcher_name, # type: str + parameters, # type: "_models.NetworkConfigurationDiagnosticParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkConfigurationDiagnosticResponse" + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkConfigurationDiagnosticResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._get_network_configuration_diagnostic_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'NetworkConfigurationDiagnosticParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if response.status_code == 202: + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_network_configuration_diagnostic_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic'} # type: ignore + + def begin_get_network_configuration_diagnostic( + self, + resource_group_name, # type: str + network_watcher_name, # type: str + parameters, # type: "_models.NetworkConfigurationDiagnosticParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.NetworkConfigurationDiagnosticResponse"] + """Gets Network Configuration Diagnostic data to help customers understand and debug network + behavior. It provides detailed information on what security rules were applied to a specified + traffic flow and the result of evaluating these rules. Customers must provide details of a flow + like source, destination, protocol, etc. The API returns whether traffic was allowed or denied, + the rules evaluated for the specified flow and the evaluation results. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param network_watcher_name: The name of the network watcher. + :type network_watcher_name: str + :param parameters: Parameters to get network configuration diagnostic. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either NetworkConfigurationDiagnosticResponse or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.NetworkConfigurationDiagnosticResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkConfigurationDiagnosticResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_network_configuration_diagnostic_initial( + resource_group_name=resource_group_name, + network_watcher_name=network_watcher_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('NetworkConfigurationDiagnosticResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_network_configuration_diagnostic.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/networkConfigurationDiagnostic'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_operations.py similarity index 97% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_operations.py index 3497c3b9a6b1..3c631dd9eef9 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_operations.py @@ -30,7 +30,7 @@ class Operations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -54,7 +54,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.OperationListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_p2_svpn_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_p2_svpn_gateways_operations.py new file mode 100644 index 000000000000..267bde47a1dc --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_p2_svpn_gateways_operations.py @@ -0,0 +1,1231 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class P2SVpnGatewaysOperations(object): + """P2SVpnGatewaysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.P2SVpnGateway" + """Retrieves the details of a virtual wan p2s vpn gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: P2SVpnGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + p2_s_vpn_gateway_parameters, # type: "_models.P2SVpnGateway" + **kwargs # type: Any + ): + # type: (...) -> "_models.P2SVpnGateway" + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(p2_s_vpn_gateway_parameters, 'P2SVpnGateway') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + gateway_name, # type: str + p2_s_vpn_gateway_parameters, # type: "_models.P2SVpnGateway" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.P2SVpnGateway"] + """Creates a virtual wan p2s vpn gateway if it doesn't exist else updates the existing gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param p2_s_vpn_gateway_parameters: Parameters supplied to create or Update a virtual wan p2s + vpn gateway. + :type p2_s_vpn_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + p2_s_vpn_gateway_parameters=p2_s_vpn_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + def _update_tags_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + p2_s_vpn_gateway_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.P2SVpnGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._update_tags_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(p2_s_vpn_gateway_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + gateway_name, # type: str + p2_s_vpn_gateway_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.P2SVpnGateway"] + """Updates virtual wan p2s vpn gateway tags. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param p2_s_vpn_gateway_parameters: Parameters supplied to update a virtual wan p2s vpn gateway + tags. + :type p2_s_vpn_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + p2_s_vpn_gateway_parameters=p2_s_vpn_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a virtual wan p2s vpn gateway. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListP2SVpnGatewaysResult"] + """Lists all the P2SVpnGateways in a resource group. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListP2SVpnGatewaysResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListP2SVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListP2SVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListP2SVpnGatewaysResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListP2SVpnGatewaysResult"] + """Lists all the P2SVpnGateways in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListP2SVpnGatewaysResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListP2SVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListP2SVpnGatewaysResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListP2SVpnGatewaysResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/p2svpnGateways'} # type: ignore + + def _reset_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.P2SVpnGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._reset_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _reset_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset'} # type: ignore + + def begin_reset( + self, + resource_group_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.P2SVpnGateway"] + """Resets the primary of the p2s vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the P2SVpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/reset'} # type: ignore + + def _generate_vpn_profile_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + parameters, # type: "_models.P2SVpnProfileParameters" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VpnProfileResponse"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnProfileResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._generate_vpn_profile_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'P2SVpnProfileParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _generate_vpn_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile'} # type: ignore + + def begin_generate_vpn_profile( + self, + resource_group_name, # type: str + gateway_name, # type: str + parameters, # type: "_models.P2SVpnProfileParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnProfileResponse"] + """Generates VPN profile for P2S client of the P2SVpnGateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :param parameters: Parameters supplied to the generate P2SVpnGateway VPN client package + operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.P2SVpnProfileParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VpnProfileResponse or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnProfileResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnProfileResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._generate_vpn_profile_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnProfileResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_generate_vpn_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/generatevpnprofile'} # type: ignore + + def _get_p2_s_vpn_connection_health_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.P2SVpnGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnGateway"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._get_p2_s_vpn_connection_health_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_p2_s_vpn_connection_health_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth'} # type: ignore + + def begin_get_p2_s_vpn_connection_health( + self, + resource_group_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.P2SVpnGateway"] + """Gets the connection health of P2S clients of the virtual wan P2SVpnGateway in the specified + resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_p2_s_vpn_connection_health_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_p2_s_vpn_connection_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealth'} # type: ignore + + def _get_p2_s_vpn_connection_health_detailed_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + request, # type: "_models.P2SVpnConnectionHealthRequest" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.P2SVpnConnectionHealth"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.P2SVpnConnectionHealth"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._get_p2_s_vpn_connection_health_detailed_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'P2SVpnConnectionHealthRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('P2SVpnConnectionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_p2_s_vpn_connection_health_detailed_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed'} # type: ignore + + def begin_get_p2_s_vpn_connection_health_detailed( + self, + resource_group_name, # type: str + gateway_name, # type: str + request, # type: "_models.P2SVpnConnectionHealthRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.P2SVpnConnectionHealth"] + """Gets the sas url to get the connection health detail of P2S clients of the virtual wan + P2SVpnGateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the P2SVpnGateway. + :type gateway_name: str + :param request: Request parameters supplied to get p2s vpn connections detailed health. + :type request: ~azure.mgmt.network.v2021_05_01.models.P2SVpnConnectionHealthRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either P2SVpnConnectionHealth or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.P2SVpnConnectionHealth] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.P2SVpnConnectionHealth"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_p2_s_vpn_connection_health_detailed_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('P2SVpnConnectionHealth', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_p2_s_vpn_connection_health_detailed.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{gatewayName}/getP2sVpnConnectionHealthDetailed'} # type: ignore + + def _disconnect_p2_s_vpn_connections_initial( + self, + resource_group_name, # type: str + p2_s_vpn_gateway_name, # type: str + request, # type: "_models.P2SVpnConnectionRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._disconnect_p2_s_vpn_connections_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'p2sVpnGatewayName': self._serialize.url("p2_s_vpn_gateway_name", p2_s_vpn_gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'P2SVpnConnectionRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disconnect_p2_s_vpn_connections_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections'} # type: ignore + + def begin_disconnect_p2_s_vpn_connections( + self, + resource_group_name, # type: str + p2_s_vpn_gateway_name, # type: str + request, # type: "_models.P2SVpnConnectionRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Disconnect P2S vpn connections of the virtual wan P2SVpnGateway in the specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param p2_s_vpn_gateway_name: The name of the P2S Vpn Gateway. + :type p2_s_vpn_gateway_name: str + :param request: The parameters are supplied to disconnect p2s vpn connections. + :type request: ~azure.mgmt.network.v2021_05_01.models.P2SVpnConnectionRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._disconnect_p2_s_vpn_connections_initial( + resource_group_name=resource_group_name, + p2_s_vpn_gateway_name=p2_s_vpn_gateway_name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'p2sVpnGatewayName': self._serialize.url("p2_s_vpn_gateway_name", p2_s_vpn_gateway_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_disconnect_p2_s_vpn_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/p2svpnGateways/{p2sVpnGatewayName}/disconnectP2sVpnConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_packet_captures_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_packet_captures_operations.py similarity index 93% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_packet_captures_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_packet_captures_operations.py index 062ef06cc32a..78d84a7886a8 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_packet_captures_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_packet_captures_operations.py @@ -32,7 +32,7 @@ class PacketCapturesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -61,9 +61,9 @@ def _create_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_initial.metadata['url'] # type: ignore @@ -93,7 +93,8 @@ def _create_initial( if response.status_code not in [201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PacketCaptureResult', pipeline_response) @@ -121,7 +122,7 @@ def begin_create( :param packet_capture_name: The name of the packet capture session. :type packet_capture_name: str :param parameters: Parameters that define the create packet capture operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.PacketCapture + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PacketCapture :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -129,7 +130,7 @@ def begin_create( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PacketCaptureResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.PacketCaptureResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PacketCaptureResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -166,7 +167,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -198,7 +199,7 @@ def get( :type packet_capture_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PacketCaptureResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.PacketCaptureResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.PacketCaptureResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] @@ -206,8 +207,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -233,7 +234,8 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PacketCaptureResult', pipeline_response) @@ -256,7 +258,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -274,6 +277,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -281,7 +285,8 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -344,7 +349,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -371,7 +376,8 @@ def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._stop_initial.metadata['url'] # type: ignore @@ -389,6 +395,7 @@ def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -396,7 +403,8 @@ def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) @@ -459,7 +467,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -486,8 +494,8 @@ def _get_status_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_status_initial.metadata['url'] # type: ignore @@ -513,7 +521,8 @@ def _get_status_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) @@ -550,7 +559,7 @@ def begin_get_status( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PacketCaptureQueryStatusResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.PacketCaptureQueryStatusResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PacketCaptureQueryStatusResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -615,7 +624,7 @@ def list( :type network_watcher_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PacketCaptureListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.PacketCaptureListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PacketCaptureListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureListResult"] @@ -623,8 +632,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -665,8 +674,9 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_load_balancing_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_peer_express_route_circuit_connections_operations.py similarity index 70% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_load_balancing_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_peer_express_route_circuit_connections_operations.py index 3584a9ce9bbd..de6b49ae7301 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_load_balancing_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_peer_express_route_circuit_connections_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerLoadBalancingRulesOperations(object): - """LoadBalancerLoadBalancingRulesOperations operations. +class PeerExpressRouteCircuitConnectionsOperations(object): + """PeerExpressRouteCircuitConnectionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,31 +45,103 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def get( + self, + resource_group_name, # type: str + circuit_name, # type: str + peering_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PeerExpressRouteCircuitConnection" + """Gets the specified Peer Express Route Circuit Connection from the specified express route + circuit. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param circuit_name: The name of the express route circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :param connection_name: The name of the peer express route circuit connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PeerExpressRouteCircuitConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PeerExpressRouteCircuitConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerExpressRouteCircuitConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PeerExpressRouteCircuitConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections/{connectionName}'} # type: ignore + def list( self, resource_group_name, # type: str - load_balancer_name, # type: str + circuit_name, # type: str + peering_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerLoadBalancingRuleListResult"] - """Gets all the load balancing rules in a load balancer. + # type: (...) -> Iterable["_models.PeerExpressRouteCircuitConnectionListResult"] + """Gets all global reach peer connections associated with a private peering in an express route + circuit. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param circuit_name: The name of the circuit. + :type circuit_name: str + :param peering_name: The name of the peering. + :type peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerLoadBalancingRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.LoadBalancerLoadBalancingRuleListResult] + :return: An iterator like instance of either PeerExpressRouteCircuitConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PeerExpressRouteCircuitConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerLoadBalancingRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerExpressRouteCircuitConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -81,7 +153,8 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), + 'circuitName': self._serialize.url("circuit_name", circuit_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +170,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerLoadBalancingRuleListResult', pipeline_response) + deserialized = self._deserialize('PeerExpressRouteCircuitConnectionListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,67 +191,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules'} # type: ignore - - def get( - self, - resource_group_name, # type: str - load_balancer_name, # type: str - load_balancing_rule_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.LoadBalancingRule" - """Gets the specified load balancer load balancing rule. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param load_balancing_rule_name: The name of the load balancing rule. - :type load_balancing_rule_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: LoadBalancingRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.LoadBalancingRule - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancingRule"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'loadBalancingRuleName': self._serialize.url("load_balancing_rule_name", load_balancing_rule_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('LoadBalancingRule', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/loadBalancingRules/{loadBalancingRuleName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/peerConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_dns_zone_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_dns_zone_groups_operations.py new file mode 100644 index 000000000000..5b22d006ae74 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_dns_zone_groups_operations.py @@ -0,0 +1,442 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateDnsZoneGroupsOperations(object): + """PrivateDnsZoneGroupsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + private_dns_zone_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + private_dns_zone_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified private dns zone group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + private_dns_zone_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateDnsZoneGroup" + """Gets the private dns zone group resource by specified private dns zone group name. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateDnsZoneGroup, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroup + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + private_dns_zone_group_name, # type: str + parameters, # type: "_models.PrivateDnsZoneGroup" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateDnsZoneGroup" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateDnsZoneGroup') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + private_dns_zone_group_name, # type: str + parameters, # type: "_models.PrivateDnsZoneGroup" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PrivateDnsZoneGroup"] + """Creates or updates a private dns zone group in the specified private endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param private_dns_zone_group_name: The name of the private dns zone group. + :type private_dns_zone_group_name: str + :param parameters: Parameters supplied to the create or update private dns zone group + operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroup + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateDnsZoneGroup or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroup] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroup"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + private_dns_zone_group_name=private_dns_zone_group_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PrivateDnsZoneGroup', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'privateDnsZoneGroupName': self._serialize.url("private_dns_zone_group_name", private_dns_zone_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups/{privateDnsZoneGroupName}'} # type: ignore + + def list( + self, + private_endpoint_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateDnsZoneGroupListResult"] + """Gets all private dns zone groups in a private endpoint. + + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateDnsZoneGroupListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateDnsZoneGroupListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateDnsZoneGroupListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateDnsZoneGroupListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}/privateDnsZoneGroups'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_endpoints_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_endpoints_operations.py new file mode 100644 index 000000000000..6e986af70836 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_endpoints_operations.py @@ -0,0 +1,495 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointsOperations(object): + """PrivateEndpointsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified private endpoint. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpoint" + """Gets the specified private endpoint by resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpoint, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + parameters, # type: "_models.PrivateEndpoint" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpoint" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpoint') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + private_endpoint_name, # type: str + parameters, # type: "_models.PrivateEndpoint" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PrivateEndpoint"] + """Creates or updates an private endpoint in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param private_endpoint_name: The name of the private endpoint. + :type private_endpoint_name: str + :param parameters: Parameters supplied to the create or update private endpoint operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PrivateEndpoint or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateEndpoint] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpoint"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + private_endpoint_name=private_endpoint_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PrivateEndpoint', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'privateEndpointName': self._serialize.url("private_endpoint_name", private_endpoint_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints/{privateEndpointName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointListResult"] + """Gets all private endpoints in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateEndpoints'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateEndpointListResult"] + """Gets all private endpoints in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateEndpointListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateEndpointListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateEndpoints'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interfaces_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_link_services_operations.py similarity index 65% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interfaces_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_link_services_operations.py index f9781dc5fafa..2c5e52b835b2 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interfaces_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_private_link_services_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class NetworkInterfacesOperations(object): - """NetworkInterfacesOperations operations. +class PrivateLinkServicesOperations(object): + """PrivateLinkServicesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - network_interface_name, # type: str + service_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -59,13 +59,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,26 +85,27 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - network_interface_name, # type: str + service_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified network interface. + """Deletes the specified private link service. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param service_name: The name of the private link service. + :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -123,7 +126,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + service_name=service_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,11 +140,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,42 +156,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore def get( self, resource_group_name, # type: str - network_interface_name, # type: str + service_name, # type: str expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "_models.NetworkInterface" - """Gets information about the specified network interface. + # type: (...) -> "_models.PrivateLinkService" + """Gets the specified private link service by resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param service_name: The name of the private link service. + :type service_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkInterface + :return: PrivateLinkService, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateLinkService :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -209,38 +212,39 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateLinkService', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - network_interface_name, # type: str - parameters, # type: "_models.NetworkInterface" + service_name, # type: str + parameters, # type: "_models.PrivateLinkService" **kwargs # type: Any ): - # type: (...) -> "_models.NetworkInterface" - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + # type: (...) -> "_models.PrivateLinkService" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +259,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkInterface') + body_content = self._serialize.body(parameters, 'PrivateLinkService') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -263,48 +267,49 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateLinkService', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateLinkService', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - network_interface_name, # type: str - parameters, # type: "_models.NetworkInterface" + service_name, # type: str + parameters, # type: "_models.PrivateLinkService" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.NetworkInterface"] - """Creates or updates a network interface. + # type: (...) -> LROPoller["_models.PrivateLinkService"] + """Creates or updates an private link service in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param parameters: Parameters supplied to the create or update network interface operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.NetworkInterface + :param service_name: The name of the private link service. + :type service_name: str + :param parameters: Parameters supplied to the create or update private link service operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PrivateLinkService :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.NetworkInterface] + :return: An instance of LROPoller that returns either PrivateLinkService or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateLinkService] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkService"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -313,7 +318,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + service_name=service_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -323,7 +328,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateLinkService', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -331,11 +336,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -347,30 +352,257 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateLinkServiceListResult"] + """Gets all private link services in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkServiceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateLinkServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PrivateLinkServiceListResult"] + """Gets all private link service in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PrivateLinkServiceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PrivateLinkServiceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response - def _update_tags_initial( + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/privateLinkServices'} # type: ignore + + def get_private_endpoint_connection( + self, + resource_group_name, # type: str + service_name, # type: str + pe_connection_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Get the specific private end point connection by specific private link service in the resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_private_endpoint_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'peConnectionName': self._serialize.url("pe_connection_name", pe_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} # type: ignore + + def update_private_endpoint_connection( self, resource_group_name, # type: str - network_interface_name, # type: str - parameters, # type: "_models.TagsObject" + service_name, # type: str + pe_connection_name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" **kwargs # type: Any ): - # type: (...) -> "_models.NetworkInterface" - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + # type: (...) -> "_models.PrivateEndpointConnection" + """Approve or reject private end point connection for a private link service in a subscription. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str + :param parameters: Parameters supplied to approve or reject the private end point connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_private_endpoint_connection.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'peConnectionName': self._serialize.url("pe_connection_name", pe_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -385,62 +617,111 @@ def _update_tags_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkInterface', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + update_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} # type: ignore + + def _delete_private_endpoint_connection_initial( + self, + resource_group_name, # type: str + service_name, # type: str + pe_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_private_endpoint_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'peConnectionName': self._serialize.url("pe_connection_name", pe_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - def begin_update_tags( + if cls: + return cls(pipeline_response, None, {}) + + _delete_private_endpoint_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} # type: ignore + + def begin_delete_private_endpoint_connection( self, resource_group_name, # type: str - network_interface_name, # type: str - parameters, # type: "_models.TagsObject" + service_name, # type: str + pe_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.NetworkInterface"] - """Updates a network interface tags. + # type: (...) -> LROPoller[None] + """Delete private end point connection for a private link service in a subscription. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param parameters: Parameters supplied to update network interface tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject + :param service_name: The name of the private link service. + :type service_name: str + :param pe_connection_name: The name of the private end point connection. + :type pe_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NetworkInterface or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.NetworkInterface] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._update_tags_initial( + raw_result = self._delete_private_endpoint_connection_initial( resource_group_name=resource_group_name, - network_interface_name=network_interface_name, - parameters=parameters, + service_name=service_name, + pe_connection_name=pe_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -449,19 +730,17 @@ def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkInterface', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), + 'peConnectionName': self._serialize.url("pe_connection_name", pe_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -473,97 +752,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}'} # type: ignore + begin_delete_private_endpoint_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections/{peConnectionName}'} # type: ignore - def list_all( - self, - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets all network interfaces in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkInterfaces'} # type: ignore - - def list( + def list_private_endpoint_connections( self, resource_group_name, # type: str + service_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets all network interfaces in a resource group. + # type: (...) -> Iterable["_models.PrivateEndpointConnectionListResult"] + """Gets all private end point connections for a specific private link service. :param resource_group_name: The name of the resource group. :type resource_group_name: str + :param service_name: The name of the private link service. + :type service_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either PrivateEndpointConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PrivateEndpointConnectionListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -572,9 +787,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_private_endpoint_connections.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -590,7 +806,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -603,36 +819,37 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces'} # type: ignore + list_private_endpoint_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateLinkServices/{serviceName}/privateEndpointConnections'} # type: ignore - def _get_effective_route_table_initial( + def _check_private_link_service_visibility_initial( self, - resource_group_name, # type: str - network_interface_name, # type: str + location, # type: str + parameters, # type: "_models.CheckPrivateLinkServiceVisibilityRequest" **kwargs # type: Any ): - # type: (...) -> Optional["_models.EffectiveRouteListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveRouteListResult"]] + # type: (...) -> Optional["_models.PrivateLinkServiceVisibility"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateLinkServiceVisibility"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_effective_route_table_initial.metadata['url'] # type: ignore + url = self._check_private_link_service_visibility_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -643,9 +860,13 @@ def _get_effective_route_table_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckPrivateLinkServiceVisibilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -655,48 +876,48 @@ def _get_effective_route_table_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_effective_route_table_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'} # type: ignore + _check_private_link_service_visibility_initial.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} # type: ignore - def begin_get_effective_route_table( + def begin_check_private_link_service_visibility( self, - resource_group_name, # type: str - network_interface_name, # type: str + location, # type: str + parameters, # type: "_models.CheckPrivateLinkServiceVisibilityRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.EffectiveRouteListResult"] - """Gets all route tables applied to a network interface. + # type: (...) -> LROPoller["_models.PrivateLinkServiceVisibility"] + """Checks whether the subscription is visible to private link service. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param location: The location of the domain name. + :type location: str + :param parameters: The request body of CheckPrivateLinkService API call. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.CheckPrivateLinkServiceVisibilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either EffectiveRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.EffectiveRouteListResult] + :return: An instance of LROPoller that returns either PrivateLinkServiceVisibility or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceVisibility] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveRouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceVisibility"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_effective_route_table_initial( - resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + raw_result = self._check_private_link_service_visibility_initial( + location=location, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -705,19 +926,18 @@ def begin_get_effective_route_table( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EffectiveRouteListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -729,28 +949,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_effective_route_table.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveRouteTable'} # type: ignore + begin_check_private_link_service_visibility.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} # type: ignore - def _list_effective_network_security_groups_initial( + def _check_private_link_service_visibility_by_resource_group_initial( self, + location, # type: str resource_group_name, # type: str - network_interface_name, # type: str + parameters, # type: "_models.CheckPrivateLinkServiceVisibilityRequest" **kwargs # type: Any ): - # type: (...) -> Optional["_models.EffectiveNetworkSecurityGroupListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.EffectiveNetworkSecurityGroupListResult"]] + # type: (...) -> Optional["_models.PrivateLinkServiceVisibility"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateLinkServiceVisibility"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._list_effective_network_security_groups_initial.metadata['url'] # type: ignore + url = self._check_private_link_service_visibility_by_resource_group_initial.metadata['url'] # type: ignore path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -761,9 +983,13 @@ def _list_effective_network_security_groups_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'CheckPrivateLinkServiceVisibilityRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -773,48 +999,53 @@ def _list_effective_network_security_groups_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _list_effective_network_security_groups_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'} # type: ignore + _check_private_link_service_visibility_by_resource_group_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} # type: ignore - def begin_list_effective_network_security_groups( + def begin_check_private_link_service_visibility_by_resource_group( self, + location, # type: str resource_group_name, # type: str - network_interface_name, # type: str + parameters, # type: "_models.CheckPrivateLinkServiceVisibilityRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.EffectiveNetworkSecurityGroupListResult"] - """Gets all network security groups applied to a network interface. + # type: (...) -> LROPoller["_models.PrivateLinkServiceVisibility"] + """Checks whether the subscription is visible to private link service in the specified resource + group. + :param location: The location of the domain name. + :type location: str :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str + :param parameters: The request body of CheckPrivateLinkService API call. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.CheckPrivateLinkServiceVisibilityRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either EffectiveNetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.EffectiveNetworkSecurityGroupListResult] + :return: An instance of LROPoller that returns either PrivateLinkServiceVisibility or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PrivateLinkServiceVisibility] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.EffectiveNetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkServiceVisibility"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._list_effective_network_security_groups_initial( + raw_result = self._check_private_link_service_visibility_by_resource_group_initial( + location=location, resource_group_name=resource_group_name, - network_interface_name=network_interface_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -823,19 +1054,19 @@ def begin_list_effective_network_security_groups( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('EffectiveNetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('PrivateLinkServiceVisibility', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -847,37 +1078,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_list_effective_network_security_groups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkInterfaces/{networkInterfaceName}/effectiveNetworkSecurityGroups'} # type: ignore + begin_check_private_link_service_visibility_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/checkPrivateLinkServiceVisibility'} # type: ignore - def list_virtual_machine_scale_set_vm_network_interfaces( + def list_auto_approved_private_link_services( self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str + location, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets information about all network interfaces in a virtual machine in a virtual machine scale - set. + # type: (...) -> Iterable["_models.AutoApprovedPrivateLinkServicesResult"] + """Returns all of the private link service ids that can be linked to a Private Endpoint with auto + approved in this subscription in this region. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str + :param location: The location of the domain name. + :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either AutoApprovedPrivateLinkServicesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AutoApprovedPrivateLinkServicesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoApprovedPrivateLinkServicesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -886,11 +1111,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_vm_network_interfaces.metadata['url'] # type: ignore + url = self.list_auto_approved_private_link_services.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), + 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -906,7 +1129,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('AutoApprovedPrivateLinkServicesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -927,33 +1150,34 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_vm_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces'} # type: ignore + list_auto_approved_private_link_services.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices'} # type: ignore - def list_virtual_machine_scale_set_network_interfaces( + def list_auto_approved_private_link_services_by_resource_group( self, + location, # type: str resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets all network interfaces in a virtual machine scale set. + # type: (...) -> Iterable["_models.AutoApprovedPrivateLinkServicesResult"] + """Returns all of the private link service ids that can be linked to a Private Endpoint with auto + approved in this subscription in this region. + :param location: The location of the domain name. + :type location: str :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either AutoApprovedPrivateLinkServicesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AutoApprovedPrivateLinkServicesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.AutoApprovedPrivateLinkServicesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -962,10 +1186,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_virtual_machine_scale_set_network_interfaces.metadata['url'] # type: ignore + url = self.list_auto_approved_private_link_services_by_resource_group.metadata['url'] # type: ignore path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -981,7 +1205,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('AutoApprovedPrivateLinkServicesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -1002,240 +1226,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_virtual_machine_scale_set_network_interfaces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/networkInterfaces'} # type: ignore - - def get_virtual_machine_scale_set_network_interface( - self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str - network_interface_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkInterface" - """Get the specified network interface in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterface, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkInterface - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterface"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - # Construct URL - url = self.get_virtual_machine_scale_set_network_interface.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterface', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_virtual_machine_scale_set_network_interface.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}'} # type: ignore - - def list_virtual_machine_scale_set_ip_configurations( - self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str - network_interface_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.NetworkInterfaceIPConfigurationListResult"] - """Get the specified network interface ip configuration in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceIPConfigurationListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfigurationListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfigurationListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_virtual_machine_scale_set_ip_configurations.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceIPConfigurationListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_virtual_machine_scale_set_ip_configurations.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations'} # type: ignore - - def get_virtual_machine_scale_set_ip_configuration( - self, - resource_group_name, # type: str - virtual_machine_scale_set_name, # type: str - virtualmachine_index, # type: str - network_interface_name, # type: str - ip_configuration_name, # type: str - expand=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> "_models.NetworkInterfaceIPConfiguration" - """Get the specified network interface ip configuration in a virtual machine scale set. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_machine_scale_set_name: The name of the virtual machine scale set. - :type virtual_machine_scale_set_name: str - :param virtualmachine_index: The virtual machine index. - :type virtualmachine_index: str - :param network_interface_name: The name of the network interface. - :type network_interface_name: str - :param ip_configuration_name: The name of the ip configuration. - :type ip_configuration_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkInterfaceIPConfiguration, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceIPConfiguration - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceIPConfiguration"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" - - # Construct URL - url = self.get_virtual_machine_scale_set_ip_configuration.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualMachineScaleSetName': self._serialize.url("virtual_machine_scale_set_name", virtual_machine_scale_set_name, 'str'), - 'virtualmachineIndex': self._serialize.url("virtualmachine_index", virtualmachine_index, 'str'), - 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), - 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('NetworkInterfaceIPConfiguration', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get_virtual_machine_scale_set_ip_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.Compute/virtualMachineScaleSets/{virtualMachineScaleSetName}/virtualMachines/{virtualmachineIndex}/networkInterfaces/{networkInterfaceName}/ipConfigurations/{ipConfigurationName}'} # type: ignore + list_auto_approved_private_link_services_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/locations/{location}/autoApprovedPrivateLinkServices'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_public_ip_addresses_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_public_ip_addresses_operations.py similarity index 73% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_public_ip_addresses_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_public_ip_addresses_operations.py index 0f90a9b84385..f1ebe82dd0b6 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_public_ip_addresses_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_public_ip_addresses_operations.py @@ -32,7 +32,7 @@ class PublicIPAddressesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,6 +47,249 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def list_cloud_service_public_ip_addresses( + self, + resource_group_name, # type: str + cloud_service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PublicIPAddressListResult"] + """Gets information about all public IP addresses on a cloud service level. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_cloud_service_public_ip_addresses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_cloud_service_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/publicipaddresses'} # type: ignore + + def list_cloud_service_role_instance_public_ip_addresses( + self, + resource_group_name, # type: str + cloud_service_name, # type: str + role_instance_name, # type: str + network_interface_name, # type: str + ip_configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PublicIPAddressListResult"] + """Gets information about all public IP addresses in a role instance IP configuration in a cloud + service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The name of role instance. + :type role_instance_name: str + :param network_interface_name: The network interface name. + :type network_interface_name: str + :param ip_configuration_name: The IP configuration name. + :type ip_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_cloud_service_role_instance_public_ip_addresses.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PublicIPAddressListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_cloud_service_role_instance_public_ip_addresses.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses'} # type: ignore + + def get_cloud_service_public_ip_address( + self, + resource_group_name, # type: str + cloud_service_name, # type: str + role_instance_name, # type: str + network_interface_name, # type: str + ip_configuration_name, # type: str + public_ip_address_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.PublicIPAddress" + """Get the specified public IP address in a cloud service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cloud_service_name: The name of the cloud service. + :type cloud_service_name: str + :param role_instance_name: The role instance name. + :type role_instance_name: str + :param network_interface_name: The name of the network interface. + :type network_interface_name: str + :param ip_configuration_name: The name of the IP configuration. + :type ip_configuration_name: str + :param public_ip_address_name: The name of the public IP Address. + :type public_ip_address_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_cloud_service_public_ip_address.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'cloudServiceName': self._serialize.url("cloud_service_name", cloud_service_name, 'str'), + 'roleInstanceName': self._serialize.url("role_instance_name", role_instance_name, 'str'), + 'networkInterfaceName': self._serialize.url("network_interface_name", network_interface_name, 'str'), + 'ipConfigurationName': self._serialize.url("ip_configuration_name", ip_configuration_name, 'str'), + 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPAddress', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_cloud_service_public_ip_address.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/cloudServices/{cloudServiceName}/roleInstances/{roleInstanceName}/networkInterfaces/{networkInterfaceName}/ipconfigurations/{ipConfigurationName}/publicipaddresses/{publicIpAddressName}'} # type: ignore + def _delete_initial( self, resource_group_name, # type: str @@ -59,7 +302,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -76,6 +320,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -101,7 +346,7 @@ def begin_delete( :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. + :param public_ip_address_name: The name of the public IP address. :type public_ip_address_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. @@ -141,7 +386,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -167,13 +412,13 @@ def get( :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param public_ip_address_name: The name of the subnet. + :param public_ip_address_name: The name of the public IP address. :type public_ip_address_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] @@ -181,8 +426,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -232,9 +477,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -292,7 +537,7 @@ def begin_create_or_update( :param public_ip_address_name: The name of the public IP address. :type public_ip_address_name: str :param parameters: Parameters supplied to the create or update public IP address operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -300,7 +545,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.PublicIPAddress] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PublicIPAddress] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -335,7 +580,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -349,7 +594,7 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - def _update_tags_initial( + def update_tags( self, resource_group_name, # type: str public_ip_address_name, # type: str @@ -357,17 +602,30 @@ def _update_tags_initial( **kwargs # type: Any ): # type: (...) -> "_models.PublicIPAddress" + """Updates public IP address tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_address_name: The name of the public IP address. + :type public_ip_address_name: str + :param parameters: Parameters supplied to update public IP address tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPAddress, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), @@ -401,79 +659,7 @@ def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - public_ip_address_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.PublicIPAddress"] - """Updates public IP address tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param public_ip_address_name: The name of the public IP address. - :type public_ip_address_name: str - :param parameters: Parameters supplied to update public IP address tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PublicIPAddress or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.PublicIPAddress] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - public_ip_address_name=public_ip_address_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PublicIPAddress', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'publicIpAddressName': self._serialize.url("public_ip_address_name", public_ip_address_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPAddresses/{publicIpAddressName}'} # type: ignore def list_all( self, @@ -484,7 +670,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.PublicIPAddressListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] @@ -492,8 +678,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -554,7 +740,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.PublicIPAddressListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] @@ -562,8 +748,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -628,7 +814,7 @@ def list_virtual_machine_scale_set_public_ip_addresses( :type virtual_machine_scale_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.PublicIPAddressListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] @@ -636,8 +822,8 @@ def list_virtual_machine_scale_set_public_ip_addresses( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -713,7 +899,7 @@ def list_virtual_machine_scale_set_vm_public_ip_addresses( :type ip_configuration_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either PublicIPAddressListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.PublicIPAddressListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPAddressListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddressListResult"] @@ -721,8 +907,8 @@ def list_virtual_machine_scale_set_vm_public_ip_addresses( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -806,7 +992,7 @@ def get_virtual_machine_scale_set_public_ip_address( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: PublicIPAddress, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.PublicIPAddress + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPAddress :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPAddress"] @@ -814,8 +1000,8 @@ def get_virtual_machine_scale_set_public_ip_address( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-03-30" - accept = "application/json, text/json" + api_version = "2018-10-01" + accept = "application/json" # Construct URL url = self.get_virtual_machine_scale_set_public_ip_address.metadata['url'] # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_public_ip_prefixes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_public_ip_prefixes_operations.py new file mode 100644 index 000000000000..1a6e6eccb375 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_public_ip_prefixes_operations.py @@ -0,0 +1,557 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PublicIPPrefixesOperations(object): + """PublicIPPrefixesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + public_ip_prefix_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + public_ip_prefix_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified public IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the PublicIpPrefix. + :type public_ip_prefix_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + public_ip_prefix_name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.PublicIPPrefix" + """Gets the specified public IP prefix in a specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param expand: Expands referenced resources. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + public_ip_prefix_name, # type: str + parameters, # type: "_models.PublicIPPrefix" + **kwargs # type: Any + ): + # type: (...) -> "_models.PublicIPPrefix" + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PublicIPPrefix') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + public_ip_prefix_name, # type: str + parameters, # type: "_models.PublicIPPrefix" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PublicIPPrefix"] + """Creates or updates a static or dynamic public IP prefix. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param parameters: Parameters supplied to the create or update public IP prefix operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PublicIPPrefix or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + public_ip_prefix_name=public_ip_prefix_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + public_ip_prefix_name, # type: str + parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.PublicIPPrefix" + """Updates public IP prefix tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param public_ip_prefix_name: The name of the public IP prefix. + :type public_ip_prefix_name: str + :param parameters: Parameters supplied to update public IP prefix tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PublicIPPrefix, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.PublicIPPrefix + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefix"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'publicIpPrefixName': self._serialize.url("public_ip_prefix_name", public_ip_prefix_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PublicIPPrefix', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIpPrefixName}'} # type: ignore + + def list_all( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PublicIPPrefixListResult"] + """Gets all the public IP prefixes in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPPrefixListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PublicIPPrefixListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/publicIPPrefixes'} # type: ignore + + def list( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PublicIPPrefixListResult"] + """Gets all public IP prefixes in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PublicIPPrefixListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.PublicIPPrefixListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PublicIPPrefixListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PublicIPPrefixListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_resource_navigation_links_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_resource_navigation_links_operations.py new file mode 100644 index 000000000000..67fc235a52d0 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_resource_navigation_links_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ResourceNavigationLinksOperations(object): + """ResourceNavigationLinksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + virtual_network_name, # type: str + subnet_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceNavigationLinksListResult" + """Gets a list of resource navigation links for a subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceNavigationLinksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ResourceNavigationLinksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceNavigationLinksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceNavigationLinksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ResourceNavigationLinks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_routes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_route_filter_rules_operations.py similarity index 74% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_routes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_route_filter_rules_operations.py index f0f059caaf4d..261362e82d2e 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_routes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_route_filter_rules_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class RoutesOperations(object): - """RoutesOperations operations. +class RouteFilterRulesOperations(object): + """RouteFilterRulesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,8 +50,8 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - route_table_name, # type: str - route_name, # type: str + route_filter_name, # type: str + rule_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -60,14 +60,15 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,6 +79,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -90,24 +92,24 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - route_table_name, # type: str - route_name, # type: str + route_filter_name, # type: str + rule_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified route from a route table. + """Deletes the specified rule from a route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the rule. + :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -128,8 +130,8 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, - route_name=route_name, + route_filter_name=route_filter_name, + rule_name=rule_name, cls=lambda x,y,z: x, **kwargs ) @@ -143,12 +145,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,43 +162,43 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore def get( self, resource_group_name, # type: str - route_table_name, # type: str - route_name, # type: str + route_filter_name, # type: str + rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.Route" - """Gets the specified route from a route table. + # type: (...) -> "_models.RouteFilterRule" + """Gets the specified rule from a route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the rule. + :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Route, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.Route + :return: RouteFilterRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteFilterRule :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -217,38 +219,38 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Route', pipeline_response) + deserialized = self._deserialize('RouteFilterRule', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - route_table_name, # type: str - route_name, # type: str - route_parameters, # type: "_models.Route" + route_filter_name, # type: str + rule_name, # type: str + route_filter_rule_parameters, # type: "_models.RouteFilterRule" **kwargs # type: Any ): - # type: (...) -> "_models.Route" - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + # type: (...) -> "_models.RouteFilterRule" + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -263,7 +265,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_parameters, 'Route') + body_content = self._serialize.body(route_filter_rule_parameters, 'RouteFilterRule') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -274,48 +276,49 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('Route', pipeline_response) + deserialized = self._deserialize('RouteFilterRule', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('Route', pipeline_response) + deserialized = self._deserialize('RouteFilterRule', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - route_table_name, # type: str - route_name, # type: str - route_parameters, # type: "_models.Route" + route_filter_name, # type: str + rule_name, # type: str + route_filter_rule_parameters, # type: "_models.RouteFilterRule" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.Route"] - """Creates or updates a route in the specified route table. + # type: (...) -> LROPoller["_models.RouteFilterRule"] + """Creates or updates a route in the specified route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param route_name: The name of the route. - :type route_name: str - :param route_parameters: Parameters supplied to the create or update route operation. - :type route_parameters: ~azure.mgmt.network.v2017_09_01.models.Route + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param rule_name: The name of the route filter rule. + :type rule_name: str + :param route_filter_rule_parameters: Parameters supplied to the create or update route filter + rule operation. + :type route_filter_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.RouteFilterRule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.Route] + :return: An instance of LROPoller that returns either RouteFilterRule or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.RouteFilterRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -324,9 +327,9 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - route_table_name=route_table_name, - route_name=route_name, - route_parameters=route_parameters, + route_filter_name=route_filter_name, + rule_name=rule_name, + route_filter_rule_parameters=route_filter_rule_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -335,7 +338,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Route', pipeline_response) + deserialized = self._deserialize('RouteFilterRule', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -343,12 +346,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'routeName': self._serialize.url("route_name", route_name, 'str'), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'ruleName': self._serialize.url("rule_name", rule_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -360,33 +363,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes/{routeName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules/{ruleName}'} # type: ignore - def list( + def list_by_route_filter( self, resource_group_name, # type: str - route_table_name, # type: str + route_filter_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteListResult"] - """Gets all routes in a route table. + # type: (...) -> Iterable["_models.RouteFilterRuleListResult"] + """Gets all RouteFilterRules in a route filter. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteListResult] + :return: An iterator like instance of either RouteFilterRuleListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteFilterRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterRuleListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -395,10 +398,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_route_filter.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -414,7 +417,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteListResult', pipeline_response) + deserialized = self._deserialize('RouteFilterRuleListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -435,4 +438,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}/routes'} # type: ignore + list_by_route_filter.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}/routeFilterRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_filters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_route_filters_operations.py similarity index 84% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_filters_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_route_filters_operations.py index b1b43188d2a4..7fe0d458100d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_route_filters_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_route_filters_operations.py @@ -32,7 +32,7 @@ class RouteFiltersOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -141,7 +143,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -173,7 +175,7 @@ def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RouteFilter, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.RouteFilter + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteFilter :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] @@ -181,7 +183,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL @@ -232,7 +234,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -293,7 +295,7 @@ def begin_create_or_update( :type route_filter_name: str :param route_filter_parameters: Parameters supplied to the create or update route filter operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_11_01.models.RouteFilter + :type route_filter_parameters: ~azure.mgmt.network.v2021_05_01.models.RouteFilter :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -301,7 +303,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.RouteFilter] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.RouteFilter] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -336,7 +338,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -350,25 +352,38 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore - def _update_initial( + def update_tags( self, resource_group_name, # type: str route_filter_name, # type: str - route_filter_parameters, # type: "_models.PatchRouteFilter" + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): # type: (...) -> "_models.RouteFilter" + """Updates tags of a route filter. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_filter_name: The name of the route filter. + :type route_filter_name: str + :param parameters: Parameters supplied to update route filter tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteFilter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteFilter + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), @@ -386,7 +401,7 @@ def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'PatchRouteFilter') + body_content = self._serialize.body(parameters, 'TagsObject') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -402,79 +417,7 @@ def _update_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore - - def begin_update( - self, - resource_group_name, # type: str - route_filter_name, # type: str - route_filter_parameters, # type: "_models.PatchRouteFilter" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.RouteFilter"] - """Updates a route filter in a specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the update route filter operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_11_01.models.PatchRouteFilter - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.RouteFilter] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore def list_by_resource_group( self, @@ -488,7 +431,7 @@ def list_by_resource_group( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteFilterListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteFilterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] @@ -496,7 +439,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -556,7 +499,7 @@ def list( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteFilterListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteFilterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] @@ -564,7 +507,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_tables_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_route_tables_operations.py similarity index 85% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_tables_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_route_tables_operations.py index 753bc3ac1be9..8aa1ffeec2c7 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_tables_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_route_tables_operations.py @@ -32,7 +32,7 @@ class RouteTablesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -141,7 +143,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -173,7 +175,7 @@ def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: RouteTable, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.RouteTable + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteTable :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] @@ -181,8 +183,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -232,9 +234,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -292,7 +294,7 @@ def begin_create_or_update( :param route_table_name: The name of the route table. :type route_table_name: str :param parameters: Parameters supplied to the create or update route table operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.RouteTable + :type parameters: ~azure.mgmt.network.v2021_05_01.models.RouteTable :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -300,7 +302,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.RouteTable] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.RouteTable] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -335,7 +337,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -349,7 +351,7 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore - def _update_tags_initial( + def update_tags( self, resource_group_name, # type: str route_table_name, # type: str @@ -357,17 +359,30 @@ def _update_tags_initial( **kwargs # type: Any ): # type: (...) -> "_models.RouteTable" + """Updates a route table tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param route_table_name: The name of the route table. + :type route_table_name: str + :param parameters: Parameters supplied to update route table tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RouteTable, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.RouteTable + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), @@ -401,79 +416,7 @@ def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - route_table_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.RouteTable"] - """Updates a route table tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_table_name: The name of the route table. - :type route_table_name: str - :param parameters: Parameters supplied to update route table tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteTable or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.RouteTable] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTable"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - route_table_name=route_table_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteTable', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeTables/{routeTableName}'} # type: ignore def list( self, @@ -487,7 +430,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteTableListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteTableListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] @@ -495,8 +438,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -555,7 +498,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteTableListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteTableListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteTableListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteTableListResult"] @@ -563,8 +506,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_routes_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_routes_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_routes_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_routes_operations.py index fdad0df5e908..6d1b6482faff 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_routes_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_routes_operations.py @@ -32,7 +32,7 @@ class RoutesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -78,6 +79,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -148,7 +150,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -180,7 +182,7 @@ def get( :type route_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Route, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.Route + :rtype: ~azure.mgmt.network.v2021_05_01.models.Route :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] @@ -188,8 +190,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -239,9 +241,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -303,7 +305,7 @@ def begin_create_or_update( :param route_name: The name of the route. :type route_name: str :param route_parameters: Parameters supplied to the create or update route operation. - :type route_parameters: ~azure.mgmt.network.v2017_11_01.models.Route + :type route_parameters: ~azure.mgmt.network.v2021_05_01.models.Route :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -311,7 +313,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Route or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.Route] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.Route] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -348,7 +350,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -377,7 +379,7 @@ def list( :type route_table_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either RouteListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.RouteListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.RouteListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteListResult"] @@ -385,8 +387,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_subnets_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_routing_intent_operations.py similarity index 73% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_subnets_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_routing_intent_operations.py index 514d138b2e75..05aceb499d0d 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_subnets_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_routing_intent_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class SubnetsOperations(object): - """SubnetsOperations operations. +class RoutingIntentOperations(object): + """RoutingIntentOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,28 +47,31 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def _create_or_update_initial( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str + virtual_hub_name, # type: str + routing_intent_name, # type: str + routing_intent_parameters, # type: "_models.RoutingIntent" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.RoutingIntent" + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,58 +81,74 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(routing_intent_parameters, 'RoutingIntent') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('RoutingIntent', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('RoutingIntent', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore - def begin_delete( + def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str + virtual_hub_name, # type: str + routing_intent_name, # type: str + routing_intent_parameters, # type: "_models.RoutingIntent" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified subnet. + # type: (...) -> LROPoller["_models.RoutingIntent"] + """Creates a RoutingIntent resource if it doesn't exist else updates the existing RoutingIntent. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the RoutingIntent. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the per VirtualHub singleton Routing Intent resource. + :type routing_intent_name: str + :param routing_intent_parameters: Parameters supplied to create or update RoutingIntent. + :type routing_intent_parameters: ~azure.mgmt.network.v2021_05_01.models.RoutingIntent :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either RoutingIntent or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.RoutingIntent] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, + routing_intent_parameters=routing_intent_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -138,17 +157,20 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('RoutingIntent', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,55 +182,50 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore def get( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - expand=None, # type: Optional[str] + virtual_hub_name, # type: str + routing_intent_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.Subnet" - """Gets the specified subnet by virtual network and resource group. + # type: (...) -> "_models.RoutingIntent" + """Retrieves the details of a RoutingIntent. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the RoutingIntent. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param expand: Expands referenced resources. - :type expand: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the RoutingIntent. + :type routing_intent_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Subnet, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.Subnet + :return: RoutingIntent, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.RoutingIntent :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.RoutingIntent"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -222,39 +239,37 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Subnet', pipeline_response) + deserialized = self._deserialize('RoutingIntent', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore - def _create_or_update_initial( + def _delete_initial( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - subnet_parameters, # type: "_models.Subnet" + virtual_hub_name, # type: str + routing_intent_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.Subnet" - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -264,74 +279,59 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(subnet_parameters, 'Subnet') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('Subnet', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore - def begin_create_or_update( + def begin_delete( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - subnet_parameters, # type: "_models.Subnet" + virtual_hub_name, # type: str + routing_intent_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.Subnet"] - """Creates or updates a subnet in the specified virtual network. + # type: (...) -> LROPoller[None] + """Deletes a RoutingIntent. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the RoutingIntent. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param subnet_parameters: Parameters supplied to the create or update subnet operation. - :type subnet_parameters: ~azure.mgmt.network.v2017_08_01.models.Subnet + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param routing_intent_name: The name of the RoutingIntent. + :type routing_intent_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either Subnet or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.Subnet] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, - subnet_parameters=subnet_parameters, + virtual_hub_name=virtual_hub_name, + routing_intent_name=routing_intent_name, cls=lambda x,y,z: x, **kwargs ) @@ -340,20 +340,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routingIntentName': self._serialize.url("routing_intent_name", routing_intent_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -365,33 +362,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent/{routingIntentName}'} # type: ignore def list( self, resource_group_name, # type: str - virtual_network_name, # type: str + virtual_hub_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.SubnetListResult"] - """Gets all subnets in a virtual network. + # type: (...) -> Iterable["_models.ListRoutingIntentResult"] + """Retrieves the details of all RoutingIntent child resources of the VirtualHub. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SubnetListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.SubnetListResult] + :return: An iterator like instance of either ListRoutingIntentResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListRoutingIntentResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListRoutingIntentResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -402,9 +399,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -419,7 +416,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('SubnetListResult', pipeline_response) + deserialized = self._deserialize('ListRoutingIntentResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -440,4 +437,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routingIntent'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_filters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_security_partner_providers_operations.py similarity index 70% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_filters_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_security_partner_providers_operations.py index 72827e48968b..d8b9667d2f30 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_route_filters_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_security_partner_providers_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class RouteFiltersOperations(object): - """RouteFiltersOperations operations. +class SecurityPartnerProvidersOperations(object): + """SecurityPartnerProvidersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - route_filter_name, # type: str + security_partner_provider_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -59,13 +59,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -88,21 +90,21 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - route_filter_name, # type: str + security_partner_provider_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified route filter. + """Deletes the specified Security Partner Provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -123,7 +125,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, + security_partner_provider_name=security_partner_provider_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,11 +139,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,42 +155,39 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore def get( self, resource_group_name, # type: str - route_filter_name, # type: str - expand=None, # type: Optional[str] + security_partner_provider_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilter" - """Gets the specified route filter. + # type: (...) -> "_models.SecurityPartnerProvider" + """Gets the specified Security Partner Provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param expand: Expands referenced express route bgp peering resources. - :type expand: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilter, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.RouteFilter + :return: SecurityPartnerProvider, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -196,8 +195,6 @@ def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -211,28 +208,28 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - route_filter_name, # type: str - route_filter_parameters, # type: "_models.RouteFilter" + security_partner_provider_name, # type: str + parameters, # type: "_models.SecurityPartnerProvider" **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilter" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + # type: (...) -> "_models.SecurityPartnerProvider" + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -240,7 +237,7 @@ def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +252,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'RouteFilter') + body_content = self._serialize.body(parameters, 'SecurityPartnerProvider') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,46 +263,46 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - route_filter_name, # type: str - route_filter_parameters, # type: "_models.RouteFilter" + security_partner_provider_name, # type: str + parameters, # type: "_models.SecurityPartnerProvider" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.RouteFilter"] - """Creates or updates a route filter in a specified resource group. + # type: (...) -> LROPoller["_models.SecurityPartnerProvider"] + """Creates or updates the specified Security Partner Provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the create or update route filter + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :param parameters: Parameters supplied to the create or update Security Partner Provider operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_09_01.models.RouteFilter + :type parameters: ~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.RouteFilter] + :return: An instance of LROPoller that returns either SecurityPartnerProvider or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -314,8 +311,8 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, + security_partner_provider_name=security_partner_provider_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -324,7 +321,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -332,11 +329,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -348,30 +345,43 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore - def _update_initial( + def update_tags( self, resource_group_name, # type: str - route_filter_name, # type: str - route_filter_parameters, # type: "_models.PatchRouteFilter" + security_partner_provider_name, # type: str + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilter" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + # type: (...) -> "_models.SecurityPartnerProvider" + """Updates tags of a Security Partner Provider resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param security_partner_provider_name: The name of the Security Partner Provider. + :type security_partner_provider_name: str + :param parameters: Parameters supplied to update Security Partner Provider tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SecurityPartnerProvider, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProvider + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProvider"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'securityPartnerProviderName': self._serialize.url("security_partner_provider_name", security_partner_provider_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -386,7 +396,7 @@ def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'PatchRouteFilter') + body_content = self._serialize.body(parameters, 'TagsObject') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -396,107 +406,35 @@ def _update_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProvider', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore - - def begin_update( - self, - resource_group_name, # type: str - route_filter_name, # type: str - route_filter_parameters, # type: "_models.PatchRouteFilter" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.RouteFilter"] - """Updates a route filter in a specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the update route filter operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_09_01.models.PatchRouteFilter - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.RouteFilter] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders/{securityPartnerProviderName}'} # type: ignore def list_by_resource_group( self, resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteFilterListResult"] - """Gets all route filters in a resource group. + # type: (...) -> Iterable["_models.SecurityPartnerProviderListResult"] + """Lists all Security Partner Providers in a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteFilterListResult] + :return: An iterator like instance of either SecurityPartnerProviderListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProviderListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProviderListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -524,7 +462,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterListResult', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProviderListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -545,26 +483,26 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/securityPartnerProviders'} # type: ignore def list( self, **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteFilterListResult"] - """Gets all route filters in a subscription. + # type: (...) -> Iterable["_models.SecurityPartnerProviderListResult"] + """Gets all the Security Partner Providers in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.RouteFilterListResult] + :return: An iterator like instance of either SecurityPartnerProviderListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.SecurityPartnerProviderListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPartnerProviderListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -591,7 +529,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterListResult', pipeline_response) + deserialized = self._deserialize('SecurityPartnerProviderListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -612,4 +550,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/securityPartnerProviders'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_security_rules_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_security_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_security_rules_operations.py index 77a7dfe76af2..fc5245d11018 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_security_rules_operations.py @@ -32,7 +32,7 @@ class SecurityRulesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -78,6 +79,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -148,7 +150,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -180,7 +182,7 @@ def get( :type security_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.SecurityRule + :rtype: ~azure.mgmt.network.v2021_05_01.models.SecurityRule :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] @@ -188,8 +190,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -239,9 +241,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -304,7 +306,7 @@ def begin_create_or_update( :type security_rule_name: str :param security_rule_parameters: Parameters supplied to the create or update network security rule operation. - :type security_rule_parameters: ~azure.mgmt.network.v2017_08_01.models.SecurityRule + :type security_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.SecurityRule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -312,7 +314,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SecurityRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.SecurityRule] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.SecurityRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -349,7 +351,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -378,7 +380,7 @@ def list( :type network_security_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.SecurityRuleListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.SecurityRuleListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] @@ -386,8 +388,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_association_links_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_association_links_operations.py new file mode 100644 index 000000000000..cea15c02e119 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_association_links_operations.py @@ -0,0 +1,108 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServiceAssociationLinksOperations(object): + """ServiceAssociationLinksOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + virtual_network_name, # type: str + subnet_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceAssociationLinksListResult" + """Gets a list of service association links for a subnet. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceAssociationLinksListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceAssociationLinksListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceAssociationLinksListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceAssociationLinksListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/ServiceAssociationLinks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_filters_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_endpoint_policies_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_filters_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_endpoint_policies_operations.py index 8c71f1b2dae3..455a7e936e2c 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_route_filters_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_endpoint_policies_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class RouteFiltersOperations(object): - """RouteFiltersOperations operations. +class ServiceEndpointPoliciesOperations(object): + """ServiceEndpointPoliciesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - route_filter_name, # type: str + service_endpoint_policy_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -59,13 +59,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -88,21 +90,21 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - route_filter_name, # type: str + service_endpoint_policy_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified route filter. + """Deletes the specified service endpoint policy. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -123,7 +125,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, + service_endpoint_policy_name=service_endpoint_policy_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,11 +139,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,42 +155,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore def get( self, resource_group_name, # type: str - route_filter_name, # type: str + service_endpoint_policy_name, # type: str expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilter" - """Gets the specified route filter. + # type: (...) -> "_models.ServiceEndpointPolicy" + """Gets the specified service Endpoint Policies in a specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param expand: Expands referenced express route bgp peering resources. + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: RouteFilter, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.RouteFilter + :return: ServiceEndpointPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -211,28 +213,28 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - route_filter_name, # type: str - route_filter_parameters, # type: "_models.RouteFilter" + service_endpoint_policy_name, # type: str + parameters, # type: "_models.ServiceEndpointPolicy" **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilter" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + # type: (...) -> "_models.ServiceEndpointPolicy" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -240,7 +242,7 @@ def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +257,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'RouteFilter') + body_content = self._serialize.body(parameters, 'ServiceEndpointPolicy') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -266,46 +268,46 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - route_filter_name, # type: str - route_filter_parameters, # type: "_models.RouteFilter" + service_endpoint_policy_name, # type: str + parameters, # type: "_models.ServiceEndpointPolicy" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.RouteFilter"] - """Creates or updates a route filter in a specified resource group. + # type: (...) -> LROPoller["_models.ServiceEndpointPolicy"] + """Creates or updates a service Endpoint Policies. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the create or update route filter + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param parameters: Parameters supplied to the create or update service endpoint policy operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_08_01.models.RouteFilter + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.RouteFilter] + :return: An instance of LROPoller that returns either ServiceEndpointPolicy or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -314,8 +316,8 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, + service_endpoint_policy_name=service_endpoint_policy_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -324,7 +326,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -332,11 +334,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -348,30 +350,43 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore - def _update_initial( + def update_tags( self, resource_group_name, # type: str - route_filter_name, # type: str - route_filter_parameters, # type: "_models.PatchRouteFilter" + service_endpoint_policy_name, # type: str + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.RouteFilter" - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] + # type: (...) -> "_models.ServiceEndpointPolicy" + """Updates tags of a service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param parameters: Parameters supplied to update service endpoint policy tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicy"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self._update_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -386,7 +401,7 @@ def _update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(route_filter_parameters, 'PatchRouteFilter') + body_content = self._serialize.body(parameters, 'TagsObject') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -396,107 +411,32 @@ def _update_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('RouteFilter', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicy', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore - - def begin_update( - self, - resource_group_name, # type: str - route_filter_name, # type: str - route_filter_parameters, # type: "_models.PatchRouteFilter" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.RouteFilter"] - """Updates a route filter in a specified resource group. + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}'} # type: ignore - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param route_filter_name: The name of the route filter. - :type route_filter_name: str - :param route_filter_parameters: Parameters supplied to the update route filter operation. - :type route_filter_parameters: ~azure.mgmt.network.v2017_08_01.models.PatchRouteFilter - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either RouteFilter or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.RouteFilter] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilter"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_initial( - resource_group_name=resource_group_name, - route_filter_name=route_filter_name, - route_filter_parameters=route_filter_parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('RouteFilter', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'routeFilterName': self._serialize.url("route_filter_name", route_filter_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters/{routeFilterName}'} # type: ignore - - def list_by_resource_group( + def list( self, - resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteFilterListResult"] - """Gets all route filters in a resource group. + # type: (...) -> Iterable["_models.ServiceEndpointPolicyListResult"] + """Gets all the service endpoint policies in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteFilterListResult] + :return: An iterator like instance of either ServiceEndpointPolicyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -506,9 +446,8 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_by_resource_group.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -524,7 +463,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterListResult', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -545,26 +484,29 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/routeFilters'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ServiceEndpointPolicies'} # type: ignore - def list( + def list_by_resource_group( self, + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.RouteFilterListResult"] - """Gets all route filters in a subscription. + # type: (...) -> Iterable["_models.ServiceEndpointPolicyListResult"] + """Gets all service endpoint Policies in a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either RouteFilterListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.RouteFilterListResult] + :return: An iterator like instance of either ServiceEndpointPolicyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.RouteFilterListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -574,8 +516,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -591,7 +534,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('RouteFilterListResult', pipeline_response) + deserialized = self._deserialize('ServiceEndpointPolicyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -612,4 +555,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/routeFilters'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_endpoint_policy_definitions_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_endpoint_policy_definitions_operations.py new file mode 100644 index 000000000000..f4af07ae57b6 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_endpoint_policy_definitions_operations.py @@ -0,0 +1,445 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServiceEndpointPolicyDefinitionsOperations(object): + """ServiceEndpointPolicyDefinitionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + service_endpoint_policy_name, # type: str + service_endpoint_policy_definition_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + service_endpoint_policy_name, # type: str + service_endpoint_policy_definition_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified ServiceEndpoint policy definitions. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the Service Endpoint Policy. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition. + :type service_endpoint_policy_definition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + service_endpoint_policy_name, # type: str + service_endpoint_policy_definition_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceEndpointPolicyDefinition" + """Get the specified service endpoint policy definitions from service endpoint policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy name. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition name. + :type service_endpoint_policy_definition_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ServiceEndpointPolicyDefinition, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + service_endpoint_policy_name, # type: str + service_endpoint_policy_definition_name, # type: str + service_endpoint_policy_definitions, # type: "_models.ServiceEndpointPolicyDefinition" + **kwargs # type: Any + ): + # type: (...) -> "_models.ServiceEndpointPolicyDefinition" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(service_endpoint_policy_definitions, 'ServiceEndpointPolicyDefinition') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + service_endpoint_policy_name, # type: str + service_endpoint_policy_definition_name, # type: str + service_endpoint_policy_definitions, # type: "_models.ServiceEndpointPolicyDefinition" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ServiceEndpointPolicyDefinition"] + """Creates or updates a service endpoint policy definition in the specified service endpoint + policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy. + :type service_endpoint_policy_name: str + :param service_endpoint_policy_definition_name: The name of the service endpoint policy + definition name. + :type service_endpoint_policy_definition_name: str + :param service_endpoint_policy_definitions: Parameters supplied to the create or update service + endpoint policy operation. + :type service_endpoint_policy_definitions: ~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either ServiceEndpointPolicyDefinition or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinition] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinition"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + service_endpoint_policy_name=service_endpoint_policy_name, + service_endpoint_policy_definition_name=service_endpoint_policy_definition_name, + service_endpoint_policy_definitions=service_endpoint_policy_definitions, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('ServiceEndpointPolicyDefinition', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'serviceEndpointPolicyDefinitionName': self._serialize.url("service_endpoint_policy_definition_name", service_endpoint_policy_definition_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions/{serviceEndpointPolicyDefinitionName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + service_endpoint_policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ServiceEndpointPolicyDefinitionListResult"] + """Gets all service endpoint policy definitions in a service end point policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_endpoint_policy_name: The name of the service endpoint policy name. + :type service_endpoint_policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceEndpointPolicyDefinitionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ServiceEndpointPolicyDefinitionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceEndpointPolicyDefinitionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceEndpointPolicyName': self._serialize.url("service_endpoint_policy_name", service_endpoint_policy_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceEndpointPolicyDefinitionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/serviceEndpointPolicies/{serviceEndpointPolicyName}/serviceEndpointPolicyDefinitions'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_tag_information_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_tag_information_operations.py new file mode 100644 index 000000000000..8b2c60115ba9 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_tag_information_operations.py @@ -0,0 +1,129 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ServiceTagInformationOperations(object): + """ServiceTagInformationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location, # type: str + no_address_prefixes=None, # type: Optional[bool] + tag_name=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ServiceTagInformationListResult"] + """Gets a list of service tag information resources with pagination. + + :param location: The location that will be used as a reference for cloud (not as a filter based + on location, you will get the list of service tags with prefix details across all regions but + limited to the cloud that your subscription belongs to). + :type location: str + :param no_address_prefixes: Do not return address prefixes for the tag(s). + :type no_address_prefixes: bool + :param tag_name: Return tag information for a particular tag. + :type tag_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ServiceTagInformationListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ServiceTagInformationListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTagInformationListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'location': self._serialize.url("location", location, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if no_address_prefixes is not None: + query_parameters['noAddressPrefixes'] = self._serialize.query("no_address_prefixes", no_address_prefixes, 'bool') + if tag_name is not None: + query_parameters['tagName'] = self._serialize.query("tag_name", tag_name, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ServiceTagInformationListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTagDetails'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_management_client_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_tags_operations.py similarity index 62% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_management_client_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_tags_operations.py index 3b7d80dc4f47..538cb7e092b9 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_network_management_client_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_service_tags_operations.py @@ -22,37 +22,55 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class NetworkManagementClientOperationsMixin(object): +class ServiceTagsOperations(object): + """ServiceTagsOperations operations. - def check_dns_name_availability( + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( self, location, # type: str - domain_name_label, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.DnsNameAvailabilityResult" - """Checks whether a domain name in the cloudapp.azure.com zone is available for use. + # type: (...) -> "_models.ServiceTagsListResult" + """Gets a list of service tag information resources. - :param location: The location of the domain name. + :param location: The location that will be used as a reference for version (not as a filter + based on location, you will get the list of service tags with prefix details across all regions + but limited to the cloud that your subscription belongs to). :type location: str - :param domain_name_label: The domain name to be verified. It must conform to the following - regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. - :type domain_name_label: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: DnsNameAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.DnsNameAvailabilityResult + :return: ServiceTagsListResult, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ServiceTagsListResult :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.DnsNameAvailabilityResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ServiceTagsListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self.check_dns_name_availability.metadata['url'] # type: ignore + url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'location': self._serialize.url("location", location, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), @@ -61,7 +79,6 @@ def check_dns_name_availability( # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -76,10 +93,10 @@ def check_dns_name_availability( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('DnsNameAvailabilityResult', pipeline_response) + deserialized = self._deserialize('ServiceTagsListResult', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_dns_name_availability.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/CheckDnsNameAvailability'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/serviceTags'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_packet_captures_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_subnets_operations.py similarity index 65% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_packet_captures_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_subnets_operations.py index 9b3eb3bed53a..548776f7e076 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_packet_captures_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_subnets_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class PacketCapturesOperations(object): - """PacketCapturesOperations operations. +class SubnetsOperations(object): + """SubnetsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,30 +47,28 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _create_initial( + def _delete_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str - parameters, # type: "_models.PacketCapture" + virtual_network_name, # type: str + subnet_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.PacketCaptureResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_initial.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -81,70 +79,59 @@ def _create_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PacketCapture') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - def begin_create( + def begin_delete( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str - parameters, # type: "_models.PacketCapture" + virtual_network_name, # type: str + subnet_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.PacketCaptureResult"] - """Create and start a packet capture on the specified VM. + # type: (...) -> LROPoller[None] + """Deletes the specified subnet. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str - :param parameters: Parameters that define the create packet capture operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.PacketCapture + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PacketCaptureResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.PacketCaptureResult] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, - parameters=parameters, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, cls=lambda x,y,z: x, **kwargs ) @@ -153,20 +140,17 @@ def begin_create( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -178,43 +162,46 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore def get( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + virtual_network_name, # type: str + subnet_name, # type: str + expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "_models.PacketCaptureResult" - """Gets a packet capture session by name. + # type: (...) -> "_models.Subnet" + """Gets the specified subnet by virtual network and resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param expand: Expands referenced resources. + :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: PacketCaptureResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.PacketCaptureResult + :return: Subnet, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.Subnet :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -222,6 +209,8 @@ def get( # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -235,35 +224,38 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + deserialized = self._deserialize('Subnet', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - def _delete_initial( + def _create_or_update_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + virtual_network_name, # type: str + subnet_name, # type: str + subnet_parameters, # type: "_models.Subnet" **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.Subnet" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -274,58 +266,74 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(subnet_parameters, 'Subnet') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('Subnet', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('Subnet', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - def begin_delete( + def begin_create_or_update( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + virtual_network_name, # type: str + subnet_name, # type: str + subnet_parameters, # type: "_models.Subnet" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified packet capture session. + # type: (...) -> LROPoller["_models.Subnet"] + """Creates or updates a subnet in the specified virtual network. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param subnet_parameters: Parameters supplied to the create or update subnet operation. + :type subnet_parameters: ~azure.mgmt.network.v2021_05_01.models.Subnet :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either Subnet or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.Subnet] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + subnet_parameters=subnet_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -334,17 +342,20 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('Subnet', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -356,13 +367,14 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - def _stop_initial( + def _prepare_network_policies_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + virtual_network_name, # type: str + subnet_name, # type: str + prepare_network_policies_request_parameters, # type: "_models.PrepareNetworkPoliciesRequest" **kwargs # type: Any ): # type: (...) -> None @@ -371,14 +383,16 @@ def _stop_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._stop_initial.metadata['url'] # type: ignore + url = self._prepare_network_policies_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -389,8 +403,13 @@ def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(prepare_network_policies_request_parameters, 'PrepareNetworkPoliciesRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -401,24 +420,28 @@ def _stop_initial( if cls: return cls(pipeline_response, None, {}) - _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop'} # type: ignore + _prepare_network_policies_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies'} # type: ignore - def begin_stop( + def begin_prepare_network_policies( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + virtual_network_name, # type: str + subnet_name, # type: str + prepare_network_policies_request_parameters, # type: "_models.PrepareNetworkPoliciesRequest" **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Stops a specified packet capture session. + """Prepares a subnet by applying network intent policies. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param prepare_network_policies_request_parameters: Parameters supplied to prepare subnet by + applying network intent policies. + :type prepare_network_policies_request_parameters: ~azure.mgmt.network.v2021_05_01.models.PrepareNetworkPoliciesRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -437,10 +460,11 @@ def begin_stop( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._stop_initial( + raw_result = self._prepare_network_policies_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + prepare_network_policies_request_parameters=prepare_network_policies_request_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -454,12 +478,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -471,30 +495,32 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop'} # type: ignore + begin_prepare_network_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/PrepareNetworkPolicies'} # type: ignore - def _get_status_initial( + def _unprepare_network_policies_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + virtual_network_name, # type: str + subnet_name, # type: str + unprepare_network_policies_request_parameters, # type: "_models.UnprepareNetworkPoliciesRequest" **kwargs # type: Any ): - # type: (...) -> "_models.PacketCaptureQueryStatusResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_status_initial.metadata['url'] # type: ignore + url = self._unprepare_network_policies_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -505,9 +531,13 @@ def _get_status_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(unprepare_network_policies_request_parameters, 'UnprepareNetworkPoliciesRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -515,56 +545,54 @@ def _get_status_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus'} # type: ignore + _unprepare_network_policies_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies'} # type: ignore - def begin_get_status( + def begin_unprepare_network_policies( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + virtual_network_name, # type: str + subnet_name, # type: str + unprepare_network_policies_request_parameters, # type: "_models.UnprepareNetworkPoliciesRequest" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.PacketCaptureQueryStatusResult"] - """Query the status of a running packet capture session. + # type: (...) -> LROPoller[None] + """Unprepares a subnet by removing network intent policies. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the Network Watcher resource. - :type network_watcher_name: str - :param packet_capture_name: The name given to the packet capture session. - :type packet_capture_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param subnet_name: The name of the subnet. + :type subnet_name: str + :param unprepare_network_policies_request_parameters: Parameters supplied to unprepare subnet + to remove network intent policies. + :type unprepare_network_policies_request_parameters: ~azure.mgmt.network.v2021_05_01.models.UnprepareNetworkPoliciesRequest :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PacketCaptureQueryStatusResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.PacketCaptureQueryStatusResult] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_status_initial( + raw_result = self._unprepare_network_policies_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + virtual_network_name=virtual_network_name, + subnet_name=subnet_name, + unprepare_network_policies_request_parameters=unprepare_network_policies_request_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -573,16 +601,13 @@ def begin_get_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), + 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -598,33 +623,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus'} # type: ignore + begin_unprepare_network_policies.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}/UnprepareNetworkPolicies'} # type: ignore def list( self, resource_group_name, # type: str - network_watcher_name, # type: str + virtual_network_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PacketCaptureListResult"] - """Lists all packet capture sessions within the specified resource group. + # type: (...) -> Iterable["_models.SubnetListResult"] + """Gets all subnets in a virtual network. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the Network Watcher resource. - :type network_watcher_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PacketCaptureListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.PacketCaptureListResult] + :return: An iterator like instance of either SubnetListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.SubnetListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -636,7 +661,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), + 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -652,11 +677,11 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PacketCaptureListResult', pipeline_response) + deserialized = self._deserialize('SubnetListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -673,4 +698,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_usages_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_usages_operations.py similarity index 96% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_usages_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_usages_operations.py index 726c4880c944..07e967eab6cc 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_usages_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_usages_operations.py @@ -30,7 +30,7 @@ class UsagesOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -57,7 +57,7 @@ def list( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either UsagesListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.UsagesListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.UsagesListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesListResult"] @@ -65,8 +65,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_security_rules_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_appliance_sites_operations.py similarity index 72% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_security_rules_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_appliance_sites_operations.py index 0e58128ec95c..b01a1643f7ae 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_security_rules_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_appliance_sites_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class SecurityRulesOperations(object): - """SecurityRulesOperations operations. +class VirtualApplianceSitesOperations(object): + """VirtualApplianceSitesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,8 +50,8 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str + network_virtual_appliance_name, # type: str + site_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -60,14 +60,15 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,6 +79,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -90,24 +92,24 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str + network_virtual_appliance_name, # type: str + site_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified network security rule. + """Deletes the specified site from a Virtual Appliance. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -128,8 +130,8 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, cls=lambda x,y,z: x, **kwargs ) @@ -143,12 +145,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,43 +162,43 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore def get( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str + network_virtual_appliance_name, # type: str + site_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.SecurityRule" - """Get the specified network security rule. + # type: (...) -> "_models.VirtualApplianceSite" + """Gets the specified Virtual Appliance Site. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: SecurityRule, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.SecurityRule + :return: VirtualApplianceSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSite :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -217,38 +219,38 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str - security_rule_parameters, # type: "_models.SecurityRule" + network_virtual_appliance_name, # type: str + site_name, # type: str + parameters, # type: "_models.VirtualApplianceSite" **kwargs # type: Any ): - # type: (...) -> "_models.SecurityRule" - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + # type: (...) -> "_models.VirtualApplianceSite" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -263,7 +265,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(security_rule_parameters, 'SecurityRule') + body_content = self._serialize.body(parameters, 'VirtualApplianceSite') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -274,49 +276,49 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - network_security_group_name, # type: str - security_rule_name, # type: str - security_rule_parameters, # type: "_models.SecurityRule" + network_virtual_appliance_name, # type: str + site_name, # type: str + parameters, # type: "_models.VirtualApplianceSite" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.SecurityRule"] - """Creates or updates a security rule in the specified network security group. + # type: (...) -> LROPoller["_models.VirtualApplianceSite"] + """Creates or updates the specified Network Virtual Appliance Site. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param security_rule_name: The name of the security rule. - :type security_rule_name: str - :param security_rule_parameters: Parameters supplied to the create or update network security - rule operation. - :type security_rule_parameters: ~azure.mgmt.network.v2017_11_01.models.SecurityRule + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str + :param site_name: The name of the site. + :type site_name: str + :param parameters: Parameters supplied to the create or update Network Virtual Appliance Site + operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSite :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either SecurityRule or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.SecurityRule] + :return: An instance of LROPoller that returns either VirtualApplianceSite or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualApplianceSite] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRule"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualApplianceSite"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -325,9 +327,9 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, - security_rule_name=security_rule_name, - security_rule_parameters=security_rule_parameters, + network_virtual_appliance_name=network_virtual_appliance_name, + site_name=site_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -336,7 +338,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('SecurityRule', pipeline_response) + deserialized = self._deserialize('VirtualApplianceSite', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -344,12 +346,12 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), - 'securityRuleName': self._serialize.url("security_rule_name", security_rule_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -361,33 +363,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules/{securityRuleName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites/{siteName}'} # type: ignore def list( self, resource_group_name, # type: str - network_security_group_name, # type: str + network_virtual_appliance_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.SecurityRuleListResult"] - """Gets all security rules in a network security group. + # type: (...) -> Iterable["_models.NetworkVirtualApplianceSiteListResult"] + """Lists all Network Virtual Appliance Sites in a Network Virtual Appliance resource. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str + :param network_virtual_appliance_name: The name of the Network Virtual Appliance. + :type network_virtual_appliance_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SecurityRuleListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.SecurityRuleListResult] + :return: An iterator like instance of either NetworkVirtualApplianceSiteListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSiteListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityRuleListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSiteListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -399,7 +401,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'networkVirtualApplianceName': self._serialize.url("network_virtual_appliance_name", network_virtual_appliance_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -415,7 +417,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('SecurityRuleListResult', pipeline_response) + deserialized = self._deserialize('NetworkVirtualApplianceSiteListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -436,4 +438,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}/securityRules'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkVirtualAppliances/{networkVirtualApplianceName}/virtualApplianceSites'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_appliance_skus_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_appliance_skus_operations.py new file mode 100644 index 000000000000..aa5a77329cdd --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_appliance_skus_operations.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VirtualApplianceSkusOperations(object): + """VirtualApplianceSkusOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.NetworkVirtualApplianceSkuListResult"] + """List all SKUs available for a virtual appliance. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either NetworkVirtualApplianceSkuListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSkuListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSkuListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('NetworkVirtualApplianceSkuListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus'} # type: ignore + + def get( + self, + sku_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.NetworkVirtualApplianceSku" + """Retrieves a single available sku for network virtual appliance. + + :param sku_name: Name of the Sku. + :type sku_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: NetworkVirtualApplianceSku, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.NetworkVirtualApplianceSku + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkVirtualApplianceSku"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'skuName': self._serialize.url("sku_name", sku_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('NetworkVirtualApplianceSku', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkVirtualApplianceSkus/{skuName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_bgp_connection_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_bgp_connection_operations.py new file mode 100644 index 000000000000..2d4c04091e0a --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_bgp_connection_operations.py @@ -0,0 +1,365 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VirtualHubBgpConnectionOperations(object): + """VirtualHubBgpConnectionOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BgpConnection" + """Retrieves the details of a Virtual Hub Bgp Connection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BgpConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.BgpConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + parameters, # type: "_models.BgpConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.BgpConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BgpConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + parameters, # type: "_models.BgpConnection" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.BgpConnection"] + """Creates a VirtualHubBgpConnection resource if it doesn't exist else updates the existing + VirtualHubBgpConnection. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :param parameters: Parameters of Bgp connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.BgpConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either BgpConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.BgpConnection] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpConnection"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('BgpConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a VirtualHubBgpConnection. + + :param resource_group_name: The resource group name of the VirtualHubBgpConnection. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections/{connectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_bgp_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_bgp_connections_operations.py new file mode 100644 index 000000000000..3f8739149bab --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_bgp_connections_operations.py @@ -0,0 +1,373 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VirtualHubBgpConnectionsOperations(object): + """VirtualHubBgpConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVirtualHubBgpConnectionResults"] + """Retrieves the details of all VirtualHubBgpConnections. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubBgpConnectionResults or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubBgpConnectionResults] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubBgpConnectionResults"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualHubBgpConnectionResults', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/bgpConnections'} # type: ignore + + def _list_learned_routes_initial( + self, + resource_group_name, # type: str + hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.PeerRouteList"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PeerRouteList"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._list_learned_routes_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_learned_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes'} # type: ignore + + def begin_list_learned_routes( + self, + resource_group_name, # type: str + hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PeerRouteList"] + """Retrieves a list of routes the virtual hub bgp connection has learned. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param hub_name: The name of the virtual hub. + :type hub_name: str + :param connection_name: The name of the virtual hub bgp connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PeerRouteList or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PeerRouteList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerRouteList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_learned_routes_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_learned_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/learnedRoutes'} # type: ignore + + def _list_advertised_routes_initial( + self, + resource_group_name, # type: str + hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.PeerRouteList"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PeerRouteList"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._list_advertised_routes_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_advertised_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes'} # type: ignore + + def begin_list_advertised_routes( + self, + resource_group_name, # type: str + hub_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.PeerRouteList"] + """Retrieves a list of routes the virtual hub bgp connection is advertising to the specified peer. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param hub_name: The name of the virtual hub. + :type hub_name: str + :param connection_name: The name of the virtual hub bgp connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either PeerRouteList or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.PeerRouteList] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.PeerRouteList"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_advertised_routes_initial( + resource_group_name=resource_group_name, + hub_name=hub_name, + connection_name=connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('PeerRouteList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{hubName}/bgpConnections/{connectionName}/advertisedRoutes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_subnets_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_ip_configuration_operations.py similarity index 73% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_subnets_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_ip_configuration_operations.py index 0fb8fffef958..7c703f98fe0a 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_subnets_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_ip_configuration_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class SubnetsOperations(object): - """SubnetsOperations operations. +class VirtualHubIpConfigurationOperations(object): + """VirtualHubIpConfigurationOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,28 +47,94 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def get( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str + virtual_hub_name, # type: str + ip_config_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.HubIpConfiguration" + """Retrieves the details of a Virtual Hub Ip configuration. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: HubIpConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.HubIpConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + ip_config_name, # type: str + parameters, # type: "_models.HubIpConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.HubIpConfiguration" + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,58 +144,75 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'HubIpConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore - def begin_delete( + def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str + virtual_hub_name, # type: str + ip_config_name, # type: str + parameters, # type: "_models.HubIpConfiguration" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified subnet. + # type: (...) -> LROPoller["_models.HubIpConfiguration"] + """Creates a VirtualHubIpConfiguration resource if it doesn't exist else updates the existing + VirtualHubIpConfiguration. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str + :param parameters: Hub Ip Configuration parameters. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.HubIpConfiguration :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either HubIpConfiguration or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.HubIpConfiguration] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.HubIpConfiguration"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -138,17 +221,20 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('HubIpConfiguration', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,101 +246,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore - def get( + def _delete_initial( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - expand=None, # type: Optional[str] + virtual_hub_name, # type: str + ip_config_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.Subnet" - """Gets the specified subnet by virtual network and resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param expand: Expands referenced resources. - :type expand: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: Subnet, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.Subnet - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('Subnet', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - subnet_parameters, # type: "_models.Subnet" - **kwargs # type: Any - ): - # type: (...) -> "_models.Subnet" - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -264,74 +280,59 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(subnet_parameters, 'Subnet') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('Subnet', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore - def begin_create_or_update( + def begin_delete( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - subnet_parameters, # type: "_models.Subnet" + virtual_hub_name, # type: str + ip_config_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.Subnet"] - """Creates or updates a subnet in the specified virtual network. + # type: (...) -> LROPoller[None] + """Deletes a VirtualHubIpConfiguration. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHubBgpConnection. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param subnet_parameters: Parameters supplied to the create or update subnet operation. - :type subnet_parameters: ~azure.mgmt.network.v2017_09_01.models.Subnet + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param ip_config_name: The name of the ipconfig. + :type ip_config_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either Subnet or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.Subnet] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, - subnet_parameters=subnet_parameters, + virtual_hub_name=virtual_hub_name, + ip_config_name=ip_config_name, cls=lambda x,y,z: x, **kwargs ) @@ -340,20 +341,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Subnet', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'ipConfigName': self._serialize.url("ip_config_name", ip_config_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -365,33 +363,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations/{ipConfigName}'} # type: ignore def list( self, resource_group_name, # type: str - virtual_network_name, # type: str + virtual_hub_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.SubnetListResult"] - """Gets all subnets in a virtual network. + # type: (...) -> Iterable["_models.ListVirtualHubIpConfigurationResults"] + """Retrieves the details of all VirtualHubIpConfigurations. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VirtualHub. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SubnetListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.SubnetListResult] + :return: An iterator like instance of either ListVirtualHubIpConfigurationResults or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubIpConfigurationResults] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubIpConfigurationResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -402,9 +400,9 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -419,7 +417,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('SubnetListResult', pipeline_response) + deserialized = self._deserialize('ListVirtualHubIpConfigurationResults', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -440,4 +438,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/ipConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_route_table_v2_s_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_route_table_v2_s_operations.py new file mode 100644 index 000000000000..eb09de4d0eaa --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hub_route_table_v2_s_operations.py @@ -0,0 +1,445 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VirtualHubRouteTableV2SOperations(object): + """VirtualHubRouteTableV2SOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + route_table_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualHubRouteTableV2" + """Retrieves the details of a VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHubRouteTableV2. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHubRouteTableV2, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2 + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + route_table_name, # type: str + virtual_hub_route_table_v2_parameters, # type: "_models.VirtualHubRouteTableV2" + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualHubRouteTableV2" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(virtual_hub_route_table_v2_parameters, 'VirtualHubRouteTableV2') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + route_table_name, # type: str + virtual_hub_route_table_v2_parameters, # type: "_models.VirtualHubRouteTableV2" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VirtualHubRouteTableV2"] + """Creates a VirtualHubRouteTableV2 resource if it doesn't exist else updates the existing + VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :param virtual_hub_route_table_v2_parameters: Parameters supplied to create or update + VirtualHubRouteTableV2. + :type virtual_hub_route_table_v2_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2 + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualHubRouteTableV2 or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualHubRouteTableV2] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHubRouteTableV2"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + virtual_hub_route_table_v2_parameters=virtual_hub_route_table_v2_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualHubRouteTableV2', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + route_table_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + route_table_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a VirtualHubRouteTableV2. + + :param resource_group_name: The resource group name of the VirtualHubRouteTableV2. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param route_table_name: The name of the VirtualHubRouteTableV2. + :type route_table_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + route_table_name=route_table_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + 'routeTableName': self._serialize.url("route_table_name", route_table_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables/{routeTableName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVirtualHubRouteTableV2SResult"] + """Retrieves the details of all VirtualHubRouteTableV2s. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubRouteTableV2SResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubRouteTableV2SResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubRouteTableV2SResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualHubRouteTableV2SResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/routeTables'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hubs_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hubs_operations.py new file mode 100644 index 000000000000..5aaf116ce3b3 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_hubs_operations.py @@ -0,0 +1,676 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VirtualHubsOperations(object): + """VirtualHubsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualHub" + """Retrieves the details of a VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHub, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + virtual_hub_parameters, # type: "_models.VirtualHub" + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualHub" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(virtual_hub_parameters, 'VirtualHub') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + virtual_hub_parameters, # type: "_models.VirtualHub" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VirtualHub"] + """Creates a VirtualHub resource if it doesn't exist else updates the existing VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param virtual_hub_parameters: Parameters supplied to create or update VirtualHub. + :type virtual_hub_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualHub + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualHub or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualHub] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + virtual_hub_parameters=virtual_hub_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + virtual_hub_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualHub" + """Updates VirtualHub tags. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param virtual_hub_parameters: Parameters supplied to update VirtualHub tags. + :type virtual_hub_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualHub, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(virtual_hub_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a VirtualHub. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVirtualHubsResult"] + """Lists all the VirtualHubs in a resource group. + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualHubsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVirtualHubsResult"] + """Lists all the VirtualHubs in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualHubsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualHubsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualHubsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualHubsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs'} # type: ignore + + def _get_effective_virtual_hub_routes_initial( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + effective_routes_parameters=None, # type: Optional["_models.EffectiveRoutesParameters"] + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._get_effective_virtual_hub_routes_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if effective_routes_parameters is not None: + body_content = self._serialize.body(effective_routes_parameters, 'EffectiveRoutesParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _get_effective_virtual_hub_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes'} # type: ignore + + def begin_get_effective_virtual_hub_routes( + self, + resource_group_name, # type: str + virtual_hub_name, # type: str + effective_routes_parameters=None, # type: Optional["_models.EffectiveRoutesParameters"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Gets the effective routes configured for the Virtual Hub resource or the specified resource . + + :param resource_group_name: The resource group name of the VirtualHub. + :type resource_group_name: str + :param virtual_hub_name: The name of the VirtualHub. + :type virtual_hub_name: str + :param effective_routes_parameters: Parameters supplied to get the effective routes for a + specific resource. + :type effective_routes_parameters: ~azure.mgmt.network.v2021_05_01.models.EffectiveRoutesParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_effective_virtual_hub_routes_initial( + resource_group_name=resource_group_name, + virtual_hub_name=virtual_hub_name, + effective_routes_parameters=effective_routes_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualHubName': self._serialize.url("virtual_hub_name", virtual_hub_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_effective_virtual_hub_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualHubs/{virtualHubName}/effectiveRoutes'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_gateway_connections_operations.py similarity index 66% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_gateway_connections_operations.py index 3e1647c43a3f..465fa345dfe8 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_gateway_connections_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkGatewaysOperations(object): - """VirtualNetworkGatewaysOperations operations. +class VirtualNetworkGatewayConnectionsOperations(object): + """VirtualNetworkGatewayConnectionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,25 +50,25 @@ def __init__(self, client, config, serializer, deserializer): def _create_or_update_initial( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VirtualNetworkGateway" + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.VirtualNetworkGatewayConnection" **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + # type: (...) -> "_models.VirtualNetworkGatewayConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -83,7 +83,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGateway') + body_content = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -94,45 +94,47 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VirtualNetworkGateway" + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.VirtualNetworkGatewayConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetworkGateway"] - """Creates or updates a virtual network gateway in the specified resource group. + # type: (...) -> LROPoller["_models.VirtualNetworkGatewayConnection"] + """Creates or updates a virtual network gateway connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to create or update virtual network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the create or update virtual network gateway + connection operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway] + :return: An instance of LROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -141,7 +143,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -151,7 +153,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -159,11 +161,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -175,39 +177,40 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore def get( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str + virtual_network_gateway_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGateway" - """Gets the specified virtual network gateway by resource group. + # type: (...) -> "_models.VirtualNetworkGatewayConnection" + """Gets the specified virtual network gateway connection by resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway + :return: VirtualNetworkGatewayConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -228,18 +231,18 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore def _delete_initial( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str + virtual_network_gateway_connection_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -248,13 +251,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -265,6 +269,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -277,21 +282,22 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str + virtual_network_gateway_connection_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified virtual network gateway. + """Deletes the specified virtual network Gateway connection. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -312,7 +318,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -326,7 +332,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -342,190 +348,47 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - def list( + def _update_tags_initial( self, resource_group_name, # type: str + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkGatewayListResult"] - """Gets all virtual network gateways by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListResult"] + # type: (...) -> Optional["_models.VirtualNetworkGatewayConnection"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGatewayConnection"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways'} # type: ignore - - def list_connections( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> Iterable["_models.VirtualNetworkGatewayListConnectionsResult"] - """Gets all the connections in a virtual network gateway. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayListConnectionsResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGatewayListConnectionsResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListConnectionsResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_connections.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayListConnectionsResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) - list_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/connections'} # type: ignore - - def _reset_initial( - self, - resource_group_name, # type: str - virtual_network_gateway_name, # type: str - gateway_vip=None, # type: Optional[str] - **kwargs # type: Any - ): - # type: (...) -> Optional["_models.VirtualNetworkGateway"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._reset_initial.metadata['url'] # type: ignore + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - if gateway_vip is not None: - query_parameters['gatewayVip'] = self._serialize.query("gateway_vip", gateway_vip, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -535,53 +398,53 @@ def _reset_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _reset_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - def begin_reset( + def begin_update_tags( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - gateway_vip=None, # type: Optional[str] + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetworkGateway"] - """Resets the primary of the virtual network gateway in the specified resource group. + # type: (...) -> LROPoller["_models.VirtualNetworkGatewayConnection"] + """Updates a virtual network gateway connection tags. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param gateway_vip: Virtual network gateway vip address supplied to the begin reset of the - active-active feature enabled gateway. - :type gateway_vip: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to update virtual network gateway connection tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkGateway] + :return: An instance of LROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._reset_initial( + raw_result = self._update_tags_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - gateway_vip=gateway_vip, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -590,7 +453,7 @@ def begin_reset( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -598,11 +461,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -614,30 +477,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore - def _generatevpnclientpackage_initial( + def _set_shared_key_initial( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VpnClientParameters" + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.ConnectionSharedKey" **kwargs # type: Any ): - # type: (...) -> Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + # type: (...) -> "_models.ConnectionSharedKey" + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._generatevpnclientpackage_initial.metadata['url'] # type: ignore + url = self._set_shared_key_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -652,65 +515,68 @@ def _generatevpnclientpackage_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnClientParameters') + body_content = self._serialize.body(parameters, 'ConnectionSharedKey') body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _generatevpnclientpackage_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'} # type: ignore + _set_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore - def begin_generatevpnclientpackage( + def begin_set_shared_key( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VpnClientParameters" + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.ConnectionSharedKey" **kwargs # type: Any ): - # type: (...) -> LROPoller[str] - """Generates VPN client package for P2S client of the virtual network gateway in the specified - resource group. + # type: (...) -> LROPoller["_models.ConnectionSharedKey"] + """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway + connection shared key for passed virtual network gateway connection in the specified resource + group through Network resource provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to the generate virtual network gateway VPN client - package operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VpnClientParameters + :param virtual_network_gateway_connection_name: The virtual network gateway connection name. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection + Shared key operation throughNetwork resource provider. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ConnectionSharedKey :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[str] + :return: An instance of LROPoller that returns either ConnectionSharedKey or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectionSharedKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._generatevpnclientpackage_initial( + raw_result = self._set_shared_key_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -720,7 +586,7 @@ def begin_generatevpnclientpackage( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -728,11 +594,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -744,30 +610,163 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_generatevpnclientpackage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnclientpackage'} # type: ignore + begin_set_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore - def _generate_vpn_profile_initial( + def get_shared_key( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VpnClientParameters" + virtual_network_gateway_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional[str] - cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + # type: (...) -> "_models.ConnectionSharedKey" + """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the + specified virtual network gateway connection shared key through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The virtual network gateway connection shared + key name. + :type virtual_network_gateway_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ConnectionSharedKey, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.ConnectionSharedKey + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get_shared_key.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + + def list( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.VirtualNetworkGatewayConnectionListResult"] + """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways + connections created. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayConnectionListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('VirtualNetworkGatewayConnectionListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections'} # type: ignore + + def _reset_shared_key_initial( + self, + resource_group_name, # type: str + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.ConnectionResetSharedKey" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ConnectionResetSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._generate_vpn_profile_initial.metadata['url'] # type: ignore + url = self._reset_shared_key_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -782,7 +781,7 @@ def _generate_vpn_profile_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnClientParameters') + body_content = self._serialize.body(parameters, 'ConnectionResetSharedKey') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -794,53 +793,55 @@ def _generate_vpn_profile_initial( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _generate_vpn_profile_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile'} # type: ignore + _reset_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore - def begin_generate_vpn_profile( + def begin_reset_shared_key( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - parameters, # type: "_models.VpnClientParameters" + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.ConnectionResetSharedKey" **kwargs # type: Any ): - # type: (...) -> LROPoller[str] - """Generates VPN profile for P2S client of the virtual network gateway in the specified resource - group. Used for IKEV2 and radius based authentication. + # type: (...) -> LROPoller["_models.ConnectionResetSharedKey"] + """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway + connection shared key for passed virtual network gateway connection in the specified resource + group through Network resource provider. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param parameters: Parameters supplied to the generate virtual network gateway VPN client - package operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VpnClientParameters + :param virtual_network_gateway_connection_name: The virtual network gateway connection reset + shared key Name. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the begin reset virtual network gateway connection + shared key operation through network resource provider. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.ConnectionResetSharedKey :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either str or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[str] + :return: An instance of LROPoller that returns either ConnectionResetSharedKey or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.ConnectionResetSharedKey] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[str] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._generate_vpn_profile_initial( + raw_result = self._reset_shared_key_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -850,7 +851,7 @@ def begin_generate_vpn_profile( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -858,7 +859,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -874,12 +875,13 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_generate_vpn_profile.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/generatevpnprofile'} # type: ignore + begin_reset_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore - def _get_vpn_profile_package_url_initial( + def _start_packet_capture_initial( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str + virtual_network_gateway_connection_name, # type: str + parameters=None, # type: Optional["_models.VpnPacketCaptureStartParameters"] **kwargs # type: Any ): # type: (...) -> Optional[str] @@ -888,14 +890,15 @@ def _get_vpn_profile_package_url_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_vpn_profile_package_url_initial.metadata['url'] # type: ignore + url = self._start_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -906,15 +909,23 @@ def _get_vpn_profile_package_url_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnPacketCaptureStartParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: @@ -924,22 +935,26 @@ def _get_vpn_profile_package_url_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _get_vpn_profile_package_url_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'} # type: ignore + _start_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture'} # type: ignore - def begin_get_vpn_profile_package_url( + def begin_start_packet_capture( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str + virtual_network_gateway_connection_name, # type: str + parameters=None, # type: Optional["_models.VpnPacketCaptureStartParameters"] **kwargs # type: Any ): # type: (...) -> LROPoller[str] - """Gets pre-generated VPN profile for P2S client of the virtual network gateway in the specified - resource group. The profile needs to be generated first using generateVpnProfile. + """Starts packet capture on virtual network gateway connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to start packet + capture on gateway connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnPacketCaptureStartParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -958,9 +973,10 @@ def begin_get_vpn_profile_package_url( ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_vpn_profile_package_url_initial( + raw_result = self._start_packet_capture_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -977,7 +993,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -993,99 +1009,105 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_vpn_profile_package_url.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'} # type: ignore + begin_start_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/startPacketCapture'} # type: ignore - def _get_bgp_peer_status_initial( + def _stop_packet_capture_initial( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - peer=None, # type: Optional[str] + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.VpnPacketCaptureStopParameters" **kwargs # type: Any ): - # type: (...) -> Optional["_models.BgpPeerStatusListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.BgpPeerStatusListResult"]] + # type: (...) -> Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_bgp_peer_status_initial.metadata['url'] # type: ignore + url = self._stop_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - if peer is not None: - query_parameters['peer'] = self._serialize.query("peer", peer, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VpnPacketCaptureStopParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_bgp_peer_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus'} # type: ignore + _stop_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture'} # type: ignore - def begin_get_bgp_peer_status( + def begin_stop_packet_capture( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - peer=None, # type: Optional[str] + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.VpnPacketCaptureStopParameters" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.BgpPeerStatusListResult"] - """The GetBgpPeerStatus operation retrieves the status of all BGP peers. + # type: (...) -> LROPoller[str] + """Stops packet capture on virtual network gateway connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param peer: The IP address of the peer to retrieve the status of. - :type peer: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to stop packet + capture on gateway connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnPacketCaptureStopParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either BgpPeerStatusListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.BgpPeerStatusListResult] + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.BgpPeerStatusListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_bgp_peer_status_initial( + raw_result = self._stop_packet_capture_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - peer=peer, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -1094,7 +1116,7 @@ def begin_get_bgp_peer_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('BgpPeerStatusListResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -1102,7 +1124,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -1118,28 +1140,28 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_bgp_peer_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getBgpPeerStatus'} # type: ignore + begin_stop_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/stopPacketCapture'} # type: ignore - def _get_learned_routes_initial( + def _get_ike_sas_initial( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str + virtual_network_gateway_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["_models.GatewayRouteListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] + # type: (...) -> Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._get_learned_routes_initial.metadata['url'] # type: ignore + url = self._get_ike_sas_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1158,53 +1180,55 @@ def _get_learned_routes_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_learned_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes'} # type: ignore + _get_ike_sas_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas'} # type: ignore - def begin_get_learned_routes( + def begin_get_ike_sas( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str + virtual_network_gateway_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.GatewayRouteListResult"] - """This operation retrieves a list of routes the virtual network gateway has learned, including - routes learned from BGP peers. + # type: (...) -> LROPoller[str] + """Lists IKE Security Associations for the virtual network gateway connection in the specified + resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.GatewayRouteListResult] + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_learned_routes_initial( + raw_result = self._get_ike_sas_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -1213,7 +1237,7 @@ def begin_get_learned_routes( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -1221,7 +1245,7 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -1237,36 +1261,34 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_learned_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getLearnedRoutes'} # type: ignore + begin_get_ike_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/getikesas'} # type: ignore - def _get_advertised_routes_initial( + def _reset_connection_initial( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - peer, # type: str + virtual_network_gateway_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> Optional["_models.GatewayRouteListResult"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.GatewayRouteListResult"]] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._get_advertised_routes_initial.metadata['url'] # type: ignore + url = self._reset_connection_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - query_parameters['peer'] = self._serialize.query("peer", peer, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -1277,59 +1299,51 @@ def _get_advertised_routes_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _get_advertised_routes_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore + _reset_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection'} # type: ignore - def begin_get_advertised_routes( + def begin_reset_connection( self, resource_group_name, # type: str - virtual_network_gateway_name, # type: str - peer, # type: str + virtual_network_gateway_connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.GatewayRouteListResult"] - """This operation retrieves a list of routes the virtual network gateway is advertising to the - specified peer. + # type: (...) -> LROPoller[None] + """Resets the virtual network gateway connection specified. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param virtual_network_gateway_name: The name of the virtual network gateway. - :type virtual_network_gateway_name: str - :param peer: The IP address of the peer. - :type peer: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + Connection. + :type virtual_network_gateway_connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.GatewayRouteListResult] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.GatewayRouteListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_advertised_routes_initial( + raw_result = self._reset_connection_initial( resource_group_name=resource_group_name, - virtual_network_gateway_name=virtual_network_gateway_name, - peer=peer, + virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -1338,15 +1352,12 @@ def begin_get_advertised_routes( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('GatewayRouteListResult', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -1362,4 +1373,4 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore + begin_reset_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/resetconnection'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_gateway_nat_rules_operations.py similarity index 70% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_peerings_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_gateway_nat_rules_operations.py index c502b83a5a97..ba39636f3ea4 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_network_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_gateway_nat_rules_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkPeeringsOperations(object): - """VirtualNetworkPeeringsOperations operations. +class VirtualNetworkGatewayNatRulesOperations(object): + """VirtualNetworkGatewayNatRulesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,28 +47,94 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def get( self, resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str + virtual_network_gateway_name, # type: str + nat_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> "_models.VirtualNetworkGatewayNatRule" + """Retrieves the details of a nat rule. + + :param resource_group_name: The resource group name of the Virtual Network Gateway. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkGatewayNatRule, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + nat_rule_name, # type: str + nat_rule_parameters, # type: "_models.VirtualNetworkGatewayNatRule" + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualNetworkGatewayNatRule" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -78,58 +144,75 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.delete(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(nat_rule_parameters, 'VirtualNetworkGatewayNatRule') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 202, 204]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore - def begin_delete( + def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str + virtual_network_gateway_name, # type: str + nat_rule_name, # type: str + nat_rule_parameters, # type: "_models.VirtualNetworkGatewayNatRule" **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified virtual network peering. + # type: (...) -> LROPoller["_models.VirtualNetworkGatewayNatRule"] + """Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the + existing nat rules. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the Virtual Network Gateway. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the virtual network peering. - :type virtual_network_peering_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str + :param nat_rule_parameters: Parameters supplied to create or Update a Nat Rule. + :type nat_rule_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either VirtualNetworkGatewayNatRule or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayNatRule] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayNatRule"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._delete_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - virtual_network_peering_name=virtual_network_peering_name, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, + nat_rule_parameters=nat_rule_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -138,17 +221,20 @@ def begin_delete( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualNetworkGatewayNatRule', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -160,96 +246,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore - def get( + def _delete_initial( self, resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str + virtual_network_gateway_name, # type: str + nat_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkPeering" - """Gets the specified virtual network peering. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the virtual network peering. - :type virtual_network_peering_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore - - def _create_or_update_initial( - self, - resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str - virtual_network_peering_parameters, # type: "_models.VirtualNetworkPeering" - **kwargs # type: Any - ): - # type: (...) -> "_models.VirtualNetworkPeering" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - - # Construct URL - url = self._create_or_update_initial.metadata['url'] # type: ignore - path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -259,75 +280,59 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(virtual_network_peering_parameters, 'VirtualNetworkPeering') - body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, None, {}) - return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore - def begin_create_or_update( + def begin_delete( self, resource_group_name, # type: str - virtual_network_name, # type: str - virtual_network_peering_name, # type: str - virtual_network_peering_parameters, # type: "_models.VirtualNetworkPeering" + virtual_network_gateway_name, # type: str + nat_rule_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetworkPeering"] - """Creates or updates a peering in the specified virtual network. + # type: (...) -> LROPoller[None] + """Deletes a nat rule. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the Virtual Network Gateway. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param virtual_network_peering_name: The name of the peering. - :type virtual_network_peering_name: str - :param virtual_network_peering_parameters: Parameters supplied to the create or update virtual - network peering operation. - :type virtual_network_peering_parameters: ~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str + :param nat_rule_name: The name of the nat rule. + :type nat_rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkPeering or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeering] + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] + cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_or_update_initial( + raw_result = self._delete_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - virtual_network_peering_name=virtual_network_peering_name, - virtual_network_peering_parameters=virtual_network_peering_parameters, + virtual_network_gateway_name=virtual_network_gateway_name, + nat_rule_name=nat_rule_name, cls=lambda x,y,z: x, **kwargs ) @@ -336,20 +341,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkPeering', pipeline_response) - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized + return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'virtualNetworkPeeringName': self._serialize.url("virtual_network_peering_name", virtual_network_peering_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'natRuleName': self._serialize.url("nat_rule_name", nat_rule_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -361,33 +363,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings/{virtualNetworkPeeringName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}'} # type: ignore - def list( + def list_by_virtual_network_gateway( self, resource_group_name, # type: str - virtual_network_name, # type: str + virtual_network_gateway_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkPeeringListResult"] - """Gets all virtual network peerings in a virtual network. + # type: (...) -> Iterable["_models.ListVirtualNetworkGatewayNatRulesResult"] + """Retrieves all nat rules for a particular virtual network gateway. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the virtual network gateway. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param virtual_network_gateway_name: The name of the gateway. + :type virtual_network_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkPeeringListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkPeeringListResult] + :return: An iterator like instance of either ListVirtualNetworkGatewayNatRulesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualNetworkGatewayNatRulesResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeeringListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualNetworkGatewayNatRulesResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -396,11 +398,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_virtual_network_gateway.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -415,7 +417,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkPeeringListResult', pipeline_response) + deserialized = self._deserialize('ListVirtualNetworkGatewayNatRulesResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -436,4 +438,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/virtualNetworkPeerings'} # type: ignore + list_by_virtual_network_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_network_gateways_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_gateways_operations.py similarity index 62% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_network_gateways_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_gateways_operations.py index 2436bb41dbd1..16b4cd5e3823 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_network_gateways_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_gateways_operations.py @@ -32,7 +32,7 @@ class VirtualNetworkGatewaysOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,9 +60,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -120,7 +120,7 @@ def begin_create_or_update( :param virtual_network_gateway_name: The name of the virtual network gateway. :type virtual_network_gateway_name: str :param parameters: Parameters supplied to create or update virtual network gateway operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -128,7 +128,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -163,7 +163,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -192,7 +192,7 @@ def get( :type virtual_network_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkGateway, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] @@ -200,8 +200,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -248,7 +248,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -265,6 +266,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -351,15 +353,15 @@ def _update_tags_initial( parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGateway" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGateway"] + # type: (...) -> Optional["_models.VirtualNetworkGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VirtualNetworkGateway"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._update_tags_initial.metadata['url'] # type: ignore @@ -386,11 +388,13 @@ def _update_tags_initial( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VirtualNetworkGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -413,7 +417,7 @@ def begin_update_tags( :param virtual_network_gateway_name: The name of the virtual network gateway. :type virtual_network_gateway_name: str :param parameters: Parameters supplied to update virtual network gateway tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -421,7 +425,7 @@ def begin_update_tags( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -456,7 +460,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -482,7 +486,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkGatewayListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListResult"] @@ -490,8 +494,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -556,7 +560,7 @@ def list_connections( :type virtual_network_gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkGatewayListConnectionsResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayListConnectionsResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGatewayListConnectionsResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayListConnectionsResult"] @@ -564,8 +568,8 @@ def list_connections( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -629,8 +633,8 @@ def _reset_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._reset_initial.metadata['url'] # type: ignore @@ -693,7 +697,7 @@ def begin_reset( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VirtualNetworkGateway or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGateway] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -742,6 +746,117 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/reset'} # type: ignore + def _reset_vpn_client_shared_key_initial( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._reset_vpn_client_shared_key_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_vpn_client_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey'} # type: ignore + + def begin_reset_vpn_client_shared_key( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Resets the VPN client shared key of the virtual network gateway in the specified resource + group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_vpn_client_shared_key_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_vpn_client_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/resetvpnclientsharedkey'} # type: ignore + def _generatevpnclientpackage_initial( self, resource_group_name, # type: str @@ -755,9 +870,9 @@ def _generatevpnclientpackage_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._generatevpnclientpackage_initial.metadata['url'] # type: ignore @@ -815,7 +930,7 @@ def begin_generatevpnclientpackage( :type virtual_network_gateway_name: str :param parameters: Parameters supplied to the generate virtual network gateway VPN client package operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VpnClientParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnClientParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -885,9 +1000,9 @@ def _generate_vpn_profile_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._generate_vpn_profile_initial.metadata['url'] # type: ignore @@ -945,7 +1060,7 @@ def begin_generate_vpn_profile( :type virtual_network_gateway_name: str :param parameters: Parameters supplied to the generate virtual network gateway VPN client package operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VpnClientParameters + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnClientParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -1014,8 +1129,8 @@ def _get_vpn_profile_package_url_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_vpn_profile_package_url_initial.metadata['url'] # type: ignore @@ -1134,8 +1249,8 @@ def _get_bgp_peer_status_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_bgp_peer_status_initial.metadata['url'] # type: ignore @@ -1197,7 +1312,7 @@ def begin_get_bgp_peer_status( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either BgpPeerStatusListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.BgpPeerStatusListResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.BgpPeerStatusListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1269,8 +1384,8 @@ def supported_vpn_devices( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.supported_vpn_devices.metadata['url'] # type: ignore @@ -1317,8 +1432,8 @@ def _get_learned_routes_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_learned_routes_initial.metadata['url'] # type: ignore @@ -1376,7 +1491,7 @@ def begin_get_learned_routes( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.GatewayRouteListResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.GatewayRouteListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1437,8 +1552,8 @@ def _get_advertised_routes_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._get_advertised_routes_initial.metadata['url'] # type: ignore @@ -1500,7 +1615,7 @@ def begin_get_advertised_routes( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either GatewayRouteListResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.GatewayRouteListResult] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.GatewayRouteListResult] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -1549,42 +1664,28 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_get_advertised_routes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getAdvertisedRoutes'} # type: ignore - def vpn_device_configuration_script( + def _set_vpnclient_ipsec_parameters_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.VpnDeviceScriptParameters" + virtual_network_gateway_name, # type: str + vpnclient_ipsec_params, # type: "_models.VpnClientIPsecParameters" **kwargs # type: Any ): - # type: (...) -> str - """Gets a xml format representation for vpn device configuration script. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection for which the configuration script is generated. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the generate vpn device script operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VpnDeviceScriptParameters - :keyword callable cls: A custom type or function that will be passed the direct response - :return: str, or the result of cls(response) - :rtype: str - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[str] + # type: (...) -> Optional["_models.VpnClientIPsecParameters"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnClientIPsecParameters"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self.vpn_device_configuration_script.metadata['url'] # type: ignore + url = self._set_vpnclient_ipsec_parameters_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -1599,20 +1700,784 @@ def vpn_device_configuration_script( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VpnDeviceScriptParameters') + body_content = self._serialize.body(vpnclient_ipsec_params, 'VpnClientIPsecParameters') body_content_kwargs['content'] = body_content request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _set_vpnclient_ipsec_parameters_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters'} # type: ignore + + def begin_set_vpnclient_ipsec_parameters( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + vpnclient_ipsec_params, # type: "_models.VpnClientIPsecParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnClientIPsecParameters"] + """The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy for P2S client of + virtual network gateway in the specified resource group through Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param vpnclient_ipsec_params: Parameters supplied to the Begin Set vpnclient ipsec parameters + of Virtual Network Gateway P2S client operation through Network resource provider. + :type vpnclient_ipsec_params: ~azure.mgmt.network.v2021_05_01.models.VpnClientIPsecParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VpnClientIPsecParameters or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnClientIPsecParameters] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._set_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + vpnclient_ipsec_params=vpnclient_ipsec_params, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_set_vpnclient_ipsec_parameters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters'} # type: ignore + + def _get_vpnclient_ipsec_parameters_initial( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnClientIPsecParameters" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._get_vpnclient_ipsec_parameters_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('str', pipeline_response) + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - vpn_device_configuration_script.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript'} # type: ignore + _get_vpnclient_ipsec_parameters_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters'} # type: ignore + + def begin_get_vpnclient_ipsec_parameters( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnClientIPsecParameters"] + """The Get VpnclientIpsecParameters operation retrieves information about the vpnclient ipsec + policy for P2S client of virtual network gateway in the specified resource group through + Network resource provider. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The virtual network gateway name. + :type virtual_network_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VpnClientIPsecParameters or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnClientIPsecParameters] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientIPsecParameters"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_vpnclient_ipsec_parameters_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnClientIPsecParameters', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_vpnclient_ipsec_parameters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters'} # type: ignore + + def vpn_device_configuration_script( + self, + resource_group_name, # type: str + virtual_network_gateway_connection_name, # type: str + parameters, # type: "_models.VpnDeviceScriptParameters" + **kwargs # type: Any + ): + # type: (...) -> str + """Gets a xml format representation for vpn device configuration script. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_connection_name: The name of the virtual network gateway + connection for which the configuration script is generated. + :type virtual_network_gateway_connection_name: str + :param parameters: Parameters supplied to the generate vpn device script operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnDeviceScriptParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: str, or the result of cls(response) + :rtype: str + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[str] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.vpn_device_configuration_script.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VpnDeviceScriptParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + vpn_device_configuration_script.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/vpndeviceconfigurationscript'} # type: ignore + + def _start_packet_capture_initial( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + parameters=None, # type: Optional["_models.VpnPacketCaptureStartParameters"] + **kwargs # type: Any + ): + # type: (...) -> Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._start_packet_capture_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnPacketCaptureStartParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _start_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture'} # type: ignore + + def begin_start_packet_capture( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + parameters=None, # type: Optional["_models.VpnPacketCaptureStartParameters"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[str] + """Starts packet capture on virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to start packet + capture on gateway. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnPacketCaptureStartParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._start_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_start_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/startPacketCapture'} # type: ignore + + def _stop_packet_capture_initial( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + parameters, # type: "_models.VpnPacketCaptureStopParameters" + **kwargs # type: Any + ): + # type: (...) -> Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._stop_packet_capture_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VpnPacketCaptureStopParameters') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _stop_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture'} # type: ignore + + def begin_stop_packet_capture( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + parameters, # type: "_models.VpnPacketCaptureStopParameters" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[str] + """Stops packet capture on virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param parameters: Virtual network gateway packet capture parameters supplied to stop packet + capture on gateway. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnPacketCaptureStopParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/stopPacketCapture'} # type: ignore + + def _get_vpnclient_connection_health_initial( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VpnClientConnectionHealthDetailListResult"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnClientConnectionHealthDetailListResult"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._get_vpnclient_connection_health_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnClientConnectionHealthDetailListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_vpnclient_connection_health_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth'} # type: ignore + + def begin_get_vpnclient_connection_health( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnClientConnectionHealthDetailListResult"] + """Get VPN client connection health detail per P2S client connection of the virtual network + gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VpnClientConnectionHealthDetailListResult or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnClientConnectionHealthDetailListResult] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnClientConnectionHealthDetailListResult"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_vpnclient_connection_health_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnClientConnectionHealthDetailListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_vpnclient_connection_health.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getVpnClientConnectionHealth'} # type: ignore + + def _disconnect_virtual_network_gateway_vpn_connections_initial( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + request, # type: "_models.P2SVpnConnectionRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._disconnect_virtual_network_gateway_vpn_connections_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'P2SVpnConnectionRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _disconnect_virtual_network_gateway_vpn_connections_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections'} # type: ignore + + def begin_disconnect_virtual_network_gateway_vpn_connections( + self, + resource_group_name, # type: str + virtual_network_gateway_name, # type: str + request, # type: "_models.P2SVpnConnectionRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Disconnect vpn connections of virtual network gateway in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_gateway_name: The name of the virtual network gateway. + :type virtual_network_gateway_name: str + :param request: The parameters are supplied to disconnect vpn connections. + :type request: ~azure.mgmt.network.v2021_05_01.models.P2SVpnConnectionRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._disconnect_virtual_network_gateway_vpn_connections_initial( + resource_group_name=resource_group_name, + virtual_network_gateway_name=virtual_network_gateway_name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_disconnect_virtual_network_gateway_vpn_connections.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/disconnectVirtualNetworkGatewayVpnConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_network_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_peerings_operations.py similarity index 93% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_network_peerings_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_peerings_operations.py index ebbfa091f71b..ec7da43b7e43 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_network_peerings_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_peerings_operations.py @@ -32,7 +32,7 @@ class VirtualNetworkPeeringsOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -60,7 +60,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -78,6 +79,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -148,7 +150,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -180,7 +182,7 @@ def get( :type virtual_network_peering_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetworkPeering, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeering"] @@ -188,8 +190,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -231,6 +233,7 @@ def _create_or_update_initial( virtual_network_name, # type: str virtual_network_peering_name, # type: str virtual_network_peering_parameters, # type: "_models.VirtualNetworkPeering" + sync_remote_address_space=None, # type: Optional[Union[str, "_models.SyncRemoteAddressSpace"]] **kwargs # type: Any ): # type: (...) -> "_models.VirtualNetworkPeering" @@ -239,9 +242,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -255,6 +258,8 @@ def _create_or_update_initial( # Construct parameters query_parameters = {} # type: Dict[str, Any] + if sync_remote_address_space is not None: + query_parameters['syncRemoteAddressSpace'] = self._serialize.query("sync_remote_address_space", sync_remote_address_space, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -291,6 +296,7 @@ def begin_create_or_update( virtual_network_name, # type: str virtual_network_peering_name, # type: str virtual_network_peering_parameters, # type: "_models.VirtualNetworkPeering" + sync_remote_address_space=None, # type: Optional[Union[str, "_models.SyncRemoteAddressSpace"]] **kwargs # type: Any ): # type: (...) -> LROPoller["_models.VirtualNetworkPeering"] @@ -304,7 +310,10 @@ def begin_create_or_update( :type virtual_network_peering_name: str :param virtual_network_peering_parameters: Parameters supplied to the create or update virtual network peering operation. - :type virtual_network_peering_parameters: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering + :type virtual_network_peering_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering + :param sync_remote_address_space: Parameter indicates the intention to sync the peering with + the current address space on the remote vNet after it's updated. + :type sync_remote_address_space: str or ~azure.mgmt.network.v2021_05_01.models.SyncRemoteAddressSpace :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -312,7 +321,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VirtualNetworkPeering or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeering] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeering] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -328,6 +337,7 @@ def begin_create_or_update( virtual_network_name=virtual_network_name, virtual_network_peering_name=virtual_network_peering_name, virtual_network_peering_parameters=virtual_network_peering_parameters, + sync_remote_address_space=sync_remote_address_space, cls=lambda x,y,z: x, **kwargs ) @@ -349,7 +359,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -378,7 +388,7 @@ def list( :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkPeeringListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkPeeringListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkPeeringListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkPeeringListResult"] @@ -386,8 +396,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_application_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_taps_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_application_security_groups_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_taps_operations.py index 15a590bd2958..390e004e212b 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_application_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_network_taps_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class ApplicationSecurityGroupsOperations(object): - """ApplicationSecurityGroupsOperations operations. +class VirtualNetworkTapsOperations(object): + """VirtualNetworkTapsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - application_security_group_name, # type: str + tap_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -59,13 +59,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -88,21 +90,21 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - application_security_group_name, # type: str + tap_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified application security group. + """Deletes the specified virtual network tap. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_security_group_name: The name of the application security group. - :type application_security_group_name: str + :param tap_name: The name of the virtual network tap. + :type tap_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -123,7 +125,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - application_security_group_name=application_security_group_name, + tap_name=tap_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,11 +139,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,39 +155,39 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore def get( self, resource_group_name, # type: str - application_security_group_name, # type: str + tap_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.ApplicationSecurityGroup" - """Gets information about the specified application security group. + # type: (...) -> "_models.VirtualNetworkTap" + """Gets information about the specified virtual network tap. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_security_group_name: The name of the application security group. - :type application_security_group_name: str + :param tap_name: The name of virtual network tap. + :type tap_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: ApplicationSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup + :return: VirtualNetworkTap, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -206,28 +208,28 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - application_security_group_name, # type: str - parameters, # type: "_models.ApplicationSecurityGroup" + tap_name, # type: str + parameters, # type: "_models.VirtualNetworkTap" **kwargs # type: Any ): - # type: (...) -> "_models.ApplicationSecurityGroup" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + # type: (...) -> "_models.VirtualNetworkTap" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -235,7 +237,7 @@ def _create_or_update_initial( url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -250,7 +252,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ApplicationSecurityGroup') + body_content = self._serialize.body(parameters, 'VirtualNetworkTap') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -261,46 +263,45 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - application_security_group_name, # type: str - parameters, # type: "_models.ApplicationSecurityGroup" + tap_name, # type: str + parameters, # type: "_models.VirtualNetworkTap" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ApplicationSecurityGroup"] - """Creates or updates an application security group. + # type: (...) -> LROPoller["_models.VirtualNetworkTap"] + """Creates or updates a Virtual Network Tap. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param application_security_group_name: The name of the application security group. - :type application_security_group_name: str - :param parameters: Parameters supplied to the create or update ApplicationSecurityGroup - operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup + :param tap_name: The name of the virtual network tap. + :type tap_name: str + :param parameters: Parameters supplied to the create or update virtual network tap operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ApplicationSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroup] + :return: An instance of LROPoller that returns either VirtualNetworkTap or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -309,7 +310,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - application_security_group_name=application_security_group_name, + tap_name=tap_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -319,7 +320,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ApplicationSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -327,11 +328,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'applicationSecurityGroupName': self._serialize.url("application_security_group_name", application_security_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -343,26 +344,93 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups/{applicationSecurityGroupName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + tap_name, # type: str + tap_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualNetworkTap" + """Updates an VirtualNetworkTap tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param tap_name: The name of the tap. + :type tap_name: str + :param tap_parameters: Parameters supplied to update VirtualNetworkTap tags. + :type tap_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetworkTap, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTap + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTap"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'tapName': self._serialize.url("tap_name", tap_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(tap_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualNetworkTap', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps/{tapName}'} # type: ignore def list_all( self, **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ApplicationSecurityGroupListResult"] - """Gets all application security groups in a subscription. + # type: (...) -> Iterable["_models.VirtualNetworkTapListResult"] + """Gets all the VirtualNetworkTaps in a subscription. :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroupListResult] + :return: An iterator like instance of either VirtualNetworkTapListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTapListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTapListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -389,7 +457,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTapListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -410,29 +478,29 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/applicationSecurityGroups'} # type: ignore + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworkTaps'} # type: ignore - def list( + def list_by_resource_group( self, resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.ApplicationSecurityGroupListResult"] - """Gets all the application security groups in a resource group. + # type: (...) -> Iterable["_models.VirtualNetworkTapListResult"] + """Gets all the VirtualNetworkTaps in a subscription. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either ApplicationSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.ApplicationSecurityGroupListResult] + :return: An iterator like instance of either VirtualNetworkTapListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkTapListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkTapListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" accept = "application/json" def prepare_request(next_link=None): @@ -442,7 +510,7 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), @@ -460,7 +528,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('ApplicationSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('VirtualNetworkTapListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -481,4 +549,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/applicationSecurityGroups'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkTaps'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_networks_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_networks_operations.py similarity index 86% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_networks_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_networks_operations.py index f98c2ee5fb01..7f1caaa6dc3a 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_virtual_networks_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_networks_operations.py @@ -32,7 +32,7 @@ class VirtualNetworksOperations(object): instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -59,7 +59,8 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -141,7 +143,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -173,7 +175,7 @@ def get( :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.VirtualNetwork + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetwork :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] @@ -181,8 +183,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -232,9 +234,9 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -292,7 +294,7 @@ def begin_create_or_update( :param virtual_network_name: The name of the virtual network. :type virtual_network_name: str :param parameters: Parameters supplied to the create or update virtual network operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.VirtualNetwork + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualNetwork :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -300,7 +302,7 @@ def begin_create_or_update( :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetwork] + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualNetwork] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] @@ -335,7 +337,7 @@ def get_long_running_output(pipeline_response): 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -349,7 +351,7 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore - def _update_tags_initial( + def update_tags( self, resource_group_name, # type: str virtual_network_name, # type: str @@ -357,17 +359,30 @@ def _update_tags_initial( **kwargs # type: Any ): # type: (...) -> "_models.VirtualNetwork" + """Updates a virtual network tags. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_network_name: The name of the virtual network. + :type virtual_network_name: str + :param parameters: Parameters supplied to update virtual network tags. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualNetwork, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualNetwork + :raises: ~azure.core.exceptions.HttpResponseError + """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self.update_tags.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), @@ -401,79 +416,7 @@ def _update_tags_initial( return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore - - def begin_update_tags( - self, - resource_group_name, # type: str - virtual_network_name, # type: str - parameters, # type: "_models.TagsObject" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.VirtualNetwork"] - """Updates a virtual network tags. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param parameters: Parameters supplied to update virtual network tags. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.TagsObject - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.VirtualNetwork] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._update_tags_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetwork', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore def list_all( self, @@ -484,7 +427,7 @@ def list_all( :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] @@ -492,8 +435,8 @@ def list_all( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -554,7 +497,7 @@ def list( :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkListResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] @@ -562,8 +505,8 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -617,7 +560,7 @@ def check_ip_address_availability( self, resource_group_name, # type: str virtual_network_name, # type: str - ip_address=None, # type: Optional[str] + ip_address, # type: str **kwargs # type: Any ): # type: (...) -> "_models.IPAddressAvailabilityResult" @@ -631,7 +574,7 @@ def check_ip_address_availability( :type ip_address: str :keyword callable cls: A custom type or function that will be passed the direct response :return: IPAddressAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.IPAddressAvailabilityResult + :rtype: ~azure.mgmt.network.v2021_05_01.models.IPAddressAvailabilityResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.IPAddressAvailabilityResult"] @@ -639,8 +582,8 @@ def check_ip_address_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.check_ip_address_availability.metadata['url'] # type: ignore @@ -653,8 +596,7 @@ def check_ip_address_availability( # Construct parameters query_parameters = {} # type: Dict[str, Any] - if ip_address is not None: - query_parameters['ipAddress'] = self._serialize.query("ip_address", ip_address, 'str') + query_parameters['ipAddress'] = self._serialize.query("ip_address", ip_address, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers @@ -692,7 +634,7 @@ def list_usage( :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListUsageResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.VirtualNetworkListUsageResult] + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualNetworkListUsageResult] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListUsageResult"] @@ -700,8 +642,8 @@ def list_usage( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_router_peerings_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_router_peerings_operations.py new file mode 100644 index 000000000000..aa04e71863fc --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_router_peerings_operations.py @@ -0,0 +1,445 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VirtualRouterPeeringsOperations(object): + """VirtualRouterPeeringsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _delete_initial( + self, + resource_group_name, # type: str + virtual_router_name, # type: str + peering_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + virtual_router_name, # type: str + peering_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes the specified peering from a Virtual Router. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the peering. + :type peering_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + virtual_router_name, # type: str + peering_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualRouterPeering" + """Gets the specified Virtual Router Peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the Virtual Router Peering. + :type peering_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualRouterPeering, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeering + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + virtual_router_name, # type: str + peering_name, # type: str + parameters, # type: "_models.VirtualRouterPeering" + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualRouterPeering" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'VirtualRouterPeering') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + virtual_router_name, # type: str + peering_name, # type: str + parameters, # type: "_models.VirtualRouterPeering" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VirtualRouterPeering"] + """Creates or updates the specified Virtual Router Peering. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param peering_name: The name of the Virtual Router Peering. + :type peering_name: str + :param parameters: Parameters supplied to the create or update Virtual Router Peering + operation. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeering + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualRouterPeering or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeering] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeering"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_router_name=virtual_router_name, + peering_name=peering_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualRouterPeering', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'peeringName': self._serialize.url("peering_name", peering_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings/{peeringName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + virtual_router_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.VirtualRouterPeeringListResult"] + """Lists all Virtual Router Peerings in a Virtual Router resource. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either VirtualRouterPeeringListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualRouterPeeringListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterPeeringListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('VirtualRouterPeeringListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}/peerings'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_security_groups_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_routers_operations.py similarity index 76% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_security_groups_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_routers_operations.py index 83b9962476e4..9c54dfce5060 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_network_security_groups_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_routers_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class NetworkSecurityGroupsOperations(object): - """NetworkSecurityGroupsOperations operations. +class VirtualRoutersOperations(object): + """VirtualRoutersOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -50,7 +50,7 @@ def __init__(self, client, config, serializer, deserializer): def _delete_initial( self, resource_group_name, # type: str - network_security_group_name, # type: str + virtual_router_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -59,13 +59,14 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -76,6 +77,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -83,26 +85,27 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - network_security_group_name, # type: str + virtual_router_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified network security group. + """Deletes the specified Virtual Router. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -123,7 +126,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + virtual_router_name=virtual_router_name, cls=lambda x,y,z: x, **kwargs ) @@ -137,11 +140,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -153,42 +156,42 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore def get( self, resource_group_name, # type: str - network_security_group_name, # type: str + virtual_router_name, # type: str expand=None, # type: Optional[str] **kwargs # type: Any ): - # type: (...) -> "_models.NetworkSecurityGroup" - """Gets the specified network security group. + # type: (...) -> "_models.VirtualRouter" + """Gets the specified Virtual Router. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str :param expand: Expands referenced resources. :type expand: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: NetworkSecurityGroup, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup + :return: VirtualRouter, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualRouter :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -209,38 +212,39 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualRouter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - network_security_group_name, # type: str - parameters, # type: "_models.NetworkSecurityGroup" + virtual_router_name, # type: str + parameters, # type: "_models.VirtualRouter" **kwargs # type: Any ): - # type: (...) -> "_models.NetworkSecurityGroup" - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + # type: (...) -> "_models.VirtualRouter" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +259,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'NetworkSecurityGroup') + body_content = self._serialize.body(parameters, 'VirtualRouter') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -263,49 +267,49 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualRouter', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualRouter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - network_security_group_name, # type: str - parameters, # type: "_models.NetworkSecurityGroup" + virtual_router_name, # type: str + parameters, # type: "_models.VirtualRouter" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.NetworkSecurityGroup"] - """Creates or updates a network security group in the specified resource group. + # type: (...) -> LROPoller["_models.VirtualRouter"] + """Creates or updates the specified Virtual Router. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_security_group_name: The name of the network security group. - :type network_security_group_name: str - :param parameters: Parameters supplied to the create or update network security group - operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup + :param virtual_router_name: The name of the Virtual Router. + :type virtual_router_name: str + :param parameters: Parameters supplied to the create or update Virtual Router. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualRouter :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either NetworkSecurityGroup or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroup] + :return: An instance of LROPoller that returns either VirtualRouter or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualRouter] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroup"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouter"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -314,7 +318,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - network_security_group_name=network_security_group_name, + virtual_router_name=virtual_router_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -324,7 +328,7 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroup', pipeline_response) + deserialized = self._deserialize('VirtualRouter', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -332,11 +336,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkSecurityGroupName': self._serialize.url("network_security_group_name", network_security_group_name, 'str'), + 'virtualRouterName': self._serialize.url("virtual_router_name", virtual_router_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -348,27 +352,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups/{networkSecurityGroupName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters/{virtualRouterName}'} # type: ignore - def list_all( + def list_by_resource_group( self, + resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkSecurityGroupListResult"] - """Gets all network security groups in a subscription. + # type: (...) -> Iterable["_models.VirtualRouterListResult"] + """Lists all Virtual Routers in a resource group. + :param resource_group_name: The name of the resource group. + :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroupListResult] + :return: An iterator like instance of either VirtualRouterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualRouterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -377,8 +384,9 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list_all.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -394,7 +402,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('VirtualRouterListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -407,38 +415,36 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/networkSecurityGroups'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualRouters'} # type: ignore def list( self, - resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkSecurityGroupListResult"] - """Gets all network security groups in a resource group. + # type: (...) -> Iterable["_models.VirtualRouterListResult"] + """Gets all the Virtual Routers in a subscription. - :param resource_group_name: The name of the resource group. - :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkSecurityGroupListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkSecurityGroupListResult] + :return: An iterator like instance of either VirtualRouterListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.VirtualRouterListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkSecurityGroupListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualRouterListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -449,7 +455,6 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore 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'), } url = self._client.format_url(url, **path_format_arguments) @@ -465,7 +470,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkSecurityGroupListResult', pipeline_response) + deserialized = self._deserialize('VirtualRouterListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -478,12 +483,13 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkSecurityGroups'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualRouters'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_wans_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_wans_operations.py new file mode 100644 index 000000000000..3ded6e2baeea --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_virtual_wans_operations.py @@ -0,0 +1,552 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VirtualWansOperations(object): + """VirtualWansOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualWAN" + """Retrieves the details of a VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being retrieved. + :type virtual_wan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWAN, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWAN + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + wan_parameters, # type: "_models.VirtualWAN" + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualWAN" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(wan_parameters, 'VirtualWAN') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + wan_parameters, # type: "_models.VirtualWAN" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VirtualWAN"] + """Creates a VirtualWAN resource if it doesn't exist else updates the existing VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being created or updated. + :type virtual_wan_name: str + :param wan_parameters: Parameters supplied to create or update VirtualWAN. + :type wan_parameters: ~azure.mgmt.network.v2021_05_01.models.VirtualWAN + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VirtualWAN or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VirtualWAN] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + wan_parameters=wan_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + wan_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.VirtualWAN" + """Updates a VirtualWAN tags. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being updated. + :type virtual_wan_name: str + :param wan_parameters: Parameters supplied to Update VirtualWAN tags. + :type wan_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VirtualWAN, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VirtualWAN + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualWAN"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(wan_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VirtualWAN', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a VirtualWAN. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN being deleted. + :type virtual_wan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'VirtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{VirtualWANName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVirtualWANsResult"] + """Lists all the VirtualWANs in a resource group. + + :param resource_group_name: The resource group name of the VirtualWan. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualWANsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualWANsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualWANsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualWANsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVirtualWANsResult"] + """Lists all the VirtualWANs in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVirtualWANsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVirtualWANsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVirtualWANsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVirtualWANsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualWans'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_packet_captures_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_connections_operations.py similarity index 63% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_packet_captures_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_connections_operations.py index e3ffec39796f..dc42bc15a644 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_packet_captures_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_connections_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class PacketCapturesOperations(object): - """PacketCapturesOperations operations. +class VpnConnectionsOperations(object): + """VpnConnectionsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,31 +47,94 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _create_initial( + def get( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str - parameters, # type: "_models.PacketCapture" + gateway_name, # type: str + connection_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.PacketCaptureResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + # type: (...) -> "_models.VpnConnection" + """Retrieves the details of a vpn connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._create_initial.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + connection_name, # type: str + vpn_connection_parameters, # type: "_models.VpnConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnConnection" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -85,66 +148,71 @@ def _create_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'PacketCapture') + body_content = self._serialize.body(vpn_connection_parameters, 'VpnConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [201]: + if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + if response.status_code == 200: + deserialized = self._deserialize('VpnConnection', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore - def begin_create( + def begin_create_or_update( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str - parameters, # type: "_models.PacketCapture" + gateway_name, # type: str + connection_name, # type: str + vpn_connection_parameters, # type: "_models.VpnConnection" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.PacketCaptureResult"] - """Create and start a packet capture on the specified VM. + # type: (...) -> LROPoller["_models.VpnConnection"] + """Creates a vpn connection to a scalable vpn gateway if it doesn't exist else updates the + existing connection. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str - :param parameters: Parameters that define the create packet capture operation. - :type parameters: ~azure.mgmt.network.v2017_09_01.models.PacketCapture + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the connection. + :type connection_name: str + :param vpn_connection_parameters: Parameters supplied to create or Update a VPN Connection. + :type vpn_connection_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnConnection :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PacketCaptureResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.PacketCaptureResult] + :return: An instance of LROPoller that returns either VpnConnection or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnConnection] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnConnection"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._create_initial( + raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, - parameters=parameters, + gateway_name=gateway_name, + connection_name=connection_name, + vpn_connection_parameters=vpn_connection_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -153,20 +221,20 @@ def begin_create( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) + deserialized = self._deserialize('VpnConnection', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -178,76 +246,13 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore - - def get( - self, - resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.PacketCaptureResult" - """Gets a packet capture session by name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: PacketCaptureResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_09_01.models.PacketCaptureResult - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('PacketCaptureResult', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore def _delete_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + gateway_name, # type: str + connection_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -256,15 +261,16 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -274,36 +280,37 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [202, 204]: + if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + gateway_name, # type: str + connection_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified packet capture session. + """Deletes a vpn connection. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the connection. + :type connection_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -324,8 +331,8 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + gateway_name=gateway_name, + connection_name=connection_name, cls=lambda x,y,z: x, **kwargs ) @@ -338,13 +345,13 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -356,29 +363,32 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}'} # type: ignore - def _stop_initial( + def _start_packet_capture_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + gateway_name, # type: str + vpn_connection_name, # type: str + parameters=None, # type: Optional["_models.VpnConnectionPacketCaptureStartParameters"] **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._stop_initial.metadata['url'] # type: ignore + url = self._start_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'vpnConnectionName': self._serialize.url("vpn_connection_name", vpn_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -389,8 +399,16 @@ def _stop_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnConnectionPacketCaptureStartParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -398,49 +416,59 @@ def _stop_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) - _stop_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop'} # type: ignore + return deserialized + _start_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture'} # type: ignore - def begin_stop( + def begin_start_packet_capture( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + gateway_name, # type: str + vpn_connection_name, # type: str + parameters=None, # type: Optional["_models.VpnConnectionPacketCaptureStartParameters"] **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Stops a specified packet capture session. + # type: (...) -> LROPoller[str] + """Starts packet capture on Vpn connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the network watcher. - :type network_watcher_name: str - :param packet_capture_name: The name of the packet capture session. - :type packet_capture_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_connection_name: The name of the vpn connection. + :type vpn_connection_name: str + :param parameters: Vpn Connection packet capture parameters supplied to start packet capture on + gateway connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnConnectionPacketCaptureStartParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._stop_initial( + raw_result = self._start_packet_capture_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -449,17 +477,20 @@ def begin_stop( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + if cls: - return cls(pipeline_response, None, {}) + return cls(pipeline_response, deserialized, {}) + return deserialized path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'vpnConnectionName': self._serialize.url("vpn_connection_name", vpn_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -471,30 +502,32 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/stop'} # type: ignore + begin_start_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/startpacketcapture'} # type: ignore - def _get_status_initial( + def _stop_packet_capture_initial( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + gateway_name, # type: str + vpn_connection_name, # type: str + parameters=None, # type: Optional["_models.VpnConnectionPacketCaptureStopParameters"] **kwargs # type: Any ): - # type: (...) -> "_models.PacketCaptureQueryStatusResult" - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + # type: (...) -> Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self._get_status_initial.metadata['url'] # type: ignore + url = self._stop_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'vpnConnectionName': self._serialize.url("vpn_connection_name", vpn_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -505,9 +538,16 @@ def _get_status_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnConnectionPacketCaptureStopParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -515,56 +555,59 @@ def _get_status_initial( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) - - if response.status_code == 202: - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _get_status_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus'} # type: ignore + _stop_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture'} # type: ignore - def begin_get_status( + def begin_stop_packet_capture( self, resource_group_name, # type: str - network_watcher_name, # type: str - packet_capture_name, # type: str + gateway_name, # type: str + vpn_connection_name, # type: str + parameters=None, # type: Optional["_models.VpnConnectionPacketCaptureStopParameters"] **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.PacketCaptureQueryStatusResult"] - """Query the status of a running packet capture session. + # type: (...) -> LROPoller[str] + """Stops packet capture on Vpn connection in the specified resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str - :param network_watcher_name: The name of the Network Watcher resource. - :type network_watcher_name: str - :param packet_capture_name: The name given to the packet capture session. - :type packet_capture_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_connection_name: The name of the vpn connection. + :type vpn_connection_name: str + :param parameters: Vpn Connection packet capture parameters supplied to stop packet capture on + gateway connection. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnConnectionPacketCaptureStopParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either PacketCaptureQueryStatusResult or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_09_01.models.PacketCaptureQueryStatusResult] + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureQueryStatusResult"] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._get_status_initial( + raw_result = self._stop_packet_capture_initial( resource_group_name=resource_group_name, - network_watcher_name=network_watcher_name, - packet_capture_name=packet_capture_name, + gateway_name=gateway_name, + vpn_connection_name=vpn_connection_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -573,7 +616,7 @@ def begin_get_status( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('PacketCaptureQueryStatusResult', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -581,8 +624,8 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), - 'packetCaptureName': self._serialize.url("packet_capture_name", packet_capture_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'vpnConnectionName': self._serialize.url("vpn_connection_name", vpn_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } @@ -598,33 +641,33 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_get_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures/{packetCaptureName}/queryStatus'} # type: ignore + begin_stop_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{vpnConnectionName}/stoppacketcapture'} # type: ignore - def list( + def list_by_vpn_gateway( self, resource_group_name, # type: str - network_watcher_name, # type: str + gateway_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PacketCaptureListResult"] - """Lists all packet capture sessions within the specified resource group. + # type: (...) -> Iterable["_models.ListVpnConnectionsResult"] + """Retrieves all vpn connections for a particular virtual wan vpn gateway. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param network_watcher_name: The name of the Network Watcher resource. - :type network_watcher_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PacketCaptureListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.PacketCaptureListResult] + :return: An iterator like instance of either ListVpnConnectionsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnConnectionsResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.PacketCaptureListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnConnectionsResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -633,11 +676,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_vpn_gateway.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'networkWatcherName': self._serialize.url("network_watcher_name", network_watcher_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -652,11 +695,11 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('PacketCaptureListResult', pipeline_response) + deserialized = self._deserialize('ListVpnConnectionsResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) - return None, iter(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) @@ -673,4 +716,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/packetCaptures'} # type: ignore + list_by_vpn_gateway.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_network_gateway_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_gateways_operations.py similarity index 63% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_network_gateway_connections_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_gateways_operations.py index 91d71228ded4..f5a7c269e614 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_virtual_network_gateway_connections_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_gateways_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworkGatewayConnectionsOperations(object): - """VirtualNetworkGatewayConnectionsOperations operations. +class VpnGatewaysOperations(object): + """VpnGatewaysOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,29 +47,88 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def get( + self, + resource_group_name, # type: str + gateway_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnGateway" + """Retrieves the details of a virtual wan vpn gateway. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnGateway, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnGateway + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore + def _create_or_update_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.VirtualNetworkGatewayConnection" + gateway_name, # type: str + vpn_gateway_parameters, # type: "_models.VpnGateway" **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGatewayConnection" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + # type: (...) -> "_models.VpnGateway" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -83,7 +142,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetworkGatewayConnection') + body_content = self._serialize.body(vpn_gateway_parameters, 'VpnGateway') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -94,47 +153,46 @@ def _create_or_update_initial( raise HttpResponseError(response=response, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('VpnGateway', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.VirtualNetworkGatewayConnection" + gateway_name, # type: str + vpn_gateway_parameters, # type: "_models.VpnGateway" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetworkGatewayConnection"] - """Creates or updates a virtual network gateway connection in the specified resource group. + # type: (...) -> LROPoller["_models.VpnGateway"] + """Creates a virtual wan vpn gateway if it doesn't exist else updates the existing gateway. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the create or update virtual network gateway - connection operation. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnection + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_gateway_parameters: Parameters supplied to create or Update a virtual wan vpn + gateway. + :type vpn_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnGateway :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGatewayConnection or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnection] + :return: An instance of LROPoller that returns either VpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -143,8 +201,8 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + gateway_name=gateway_name, + vpn_gateway_parameters=vpn_gateway_parameters, cls=lambda x,y,z: x, **kwargs ) @@ -153,19 +211,19 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -177,41 +235,31 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore - def get( + def _update_tags_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str + gateway_name, # type: str + vpn_gateway_parameters, # type: "_models.TagsObject" **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGatewayConnection" - """Gets the specified virtual network gateway connection by resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetworkGatewayConnection, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnection - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnection"] + # type: (...) -> Optional["_models.VpnGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnGateway"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self._update_tags_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -221,28 +269,106 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_gateway_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnection', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore + + def begin_update_tags( + self, + resource_group_name, # type: str + gateway_name, # type: str + vpn_gateway_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnGateway"] + """Updates virtual wan vpn gateway tags. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param vpn_gateway_parameters: Parameters supplied to update a virtual wan vpn gateway tags. + :type vpn_gateway_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnGateway] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_tags_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + vpn_gateway_parameters=vpn_gateway_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnGateway', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore def _delete_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str + gateway_name, # type: str **kwargs # type: Any ): # type: (...) -> None @@ -251,14 +377,15 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -268,6 +395,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -280,22 +408,21 @@ def _delete_initial( if cls: return cls(pipeline_response, None, {}) - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore def begin_delete( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str + gateway_name, # type: str **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Deletes the specified virtual network Gateway connection. + """Deletes a virtual wan vpn gateway. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. @@ -316,7 +443,7 @@ def begin_delete( if cont_token is None: raw_result = self._delete_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + gateway_name=gateway_name, cls=lambda x,y,z: x, **kwargs ) @@ -329,9 +456,9 @@ def get_long_running_output(pipeline_response): return cls(pipeline_response, None, {}) path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -346,30 +473,28 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}'} # type: ignore - def _update_tags_initial( + def _reset_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.TagsObject" + gateway_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetworkGatewayConnectionListEntity" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListEntity"] + # type: (...) -> Optional["_models.VpnGateway"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnGateway"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" # Construct URL - url = self._update_tags_initial.metadata['url'] # type: ignore + url = self._reset_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -380,67 +505,60 @@ def _update_tags_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'TagsObject') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListEntity', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _update_tags_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + _reset_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset'} # type: ignore - def begin_update_tags( + def begin_reset( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.TagsObject" + gateway_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetworkGatewayConnectionListEntity"] - """Updates a virtual network gateway connection tags. + # type: (...) -> LROPoller["_models.VpnGateway"] + """Resets the primary of the vpn gateway in the specified resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The name of the virtual network gateway - connection. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to update virtual network gateway connection tags. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.TagsObject + :param gateway_name: The name of the gateway. + :type gateway_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetworkGatewayConnectionListEntity or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionListEntity] + :return: An instance of LROPoller that returns either VpnGateway or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnGateway] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListEntity"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnGateway"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._update_tags_initial( + raw_result = self._reset_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, + gateway_name=gateway_name, cls=lambda x,y,z: x, **kwargs ) @@ -449,7 +567,7 @@ def begin_update_tags( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListEntity', pipeline_response) + deserialized = self._deserialize('VpnGateway', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -457,11 +575,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -473,30 +591,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}'} # type: ignore + begin_reset.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/reset'} # type: ignore - def _set_shared_key_initial( + def _start_packet_capture_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionSharedKey" + gateway_name, # type: str + parameters=None, # type: Optional["_models.VpnGatewayPacketCaptureStartParameters"] **kwargs # type: Any ): - # type: (...) -> "_models.ConnectionSharedKey" - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + # type: (...) -> Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-05-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL - url = self._set_shared_key_initial.metadata['url'] # type: ignore + url = self._start_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -511,68 +629,67 @@ def _set_shared_key_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionSharedKey') + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnGatewayPacketCaptureStartParameters') + else: + body_content = None body_content_kwargs['content'] = body_content - request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200, 201]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _set_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + _start_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture'} # type: ignore - def begin_set_shared_key( + def begin_start_packet_capture( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionSharedKey" + gateway_name, # type: str + parameters=None, # type: Optional["_models.VpnGatewayPacketCaptureStartParameters"] **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.ConnectionSharedKey"] - """The Put VirtualNetworkGatewayConnectionSharedKey operation sets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + # type: (...) -> LROPoller[str] + """Starts packet capture on vpn gateway in the specified resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the Begin Set Virtual Network Gateway connection - Shared key operation throughNetwork resource provider. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ConnectionSharedKey + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param parameters: Vpn gateway packet capture parameters supplied to start packet capture on + vpn gateway. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnGatewayPacketCaptureStartParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ConnectionSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectionSharedKey] + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + cls = kwargs.pop('cls', None) # type: ClsType[str] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval ) cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: - raw_result = self._set_shared_key_initial( + raw_result = self._start_packet_capture_initial( resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, + gateway_name=gateway_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -582,7 +699,7 @@ def begin_set_shared_key( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) @@ -590,11 +707,11 @@ def get_long_running_output(pipeline_response): path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -606,41 +723,30 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_set_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + begin_start_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/startpacketcapture'} # type: ignore - def get_shared_key( + def _stop_packet_capture_initial( self, resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str + gateway_name, # type: str + parameters=None, # type: Optional["_models.VpnGatewayPacketCaptureStopParameters"] **kwargs # type: Any ): - # type: (...) -> "_models.ConnectionSharedKey" - """The Get VirtualNetworkGatewayConnectionSharedKey operation retrieves information about the - specified virtual network gateway connection shared key through Network resource provider. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection shared - key name. - :type virtual_network_gateway_connection_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: ConnectionSharedKey, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.ConnectionSharedKey - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionSharedKey"] + # type: (...) -> Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.get_shared_key.metadata['url'] # type: ignore + url = self._stop_packet_capture_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -651,47 +757,128 @@ def get_shared_key( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'VpnGatewayPacketCaptureStopParameters') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('ConnectionSharedKey', pipeline_response) + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey'} # type: ignore + _stop_packet_capture_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture'} # type: ignore - def list( + def begin_stop_packet_capture( + self, + resource_group_name, # type: str + gateway_name, # type: str + parameters=None, # type: Optional["_models.VpnGatewayPacketCaptureStopParameters"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller[str] + """Stops packet capture on vpn gateway in the specified resource group. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param parameters: Vpn gateway packet capture parameters supplied to stop packet capture on vpn + gateway. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.VpnGatewayPacketCaptureStopParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._stop_packet_capture_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_stop_packet_capture.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/stoppacketcapture'} # type: ignore + + def list_by_resource_group( self, resource_group_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkGatewayConnectionListResult"] - """The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways - connections created. + # type: (...) -> Iterable["_models.ListVpnGatewaysResult"] + """Lists all the VpnGateways in a resource group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnGateway. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkGatewayConnectionListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.VirtualNetworkGatewayConnectionListResult] + :return: An iterator like instance of either ListVpnGatewaysResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnGatewaysResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkGatewayConnectionListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewaysResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -700,10 +887,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_resource_group.metadata['url'] # type: ignore 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'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -718,7 +905,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkGatewayConnectionListResult', pipeline_response) + deserialized = self._deserialize('ListVpnGatewaysResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -739,136 +926,71 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections'} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways'} # type: ignore - def _reset_shared_key_initial( + def list( self, - resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionResetSharedKey" **kwargs # type: Any ): - # type: (...) -> Optional["_models.ConnectionResetSharedKey"] - cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectionResetSharedKey"]] + # type: (...) -> Iterable["_models.ListVpnGatewaysResult"] + """Lists all the VpnGateways in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnGatewaysResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnGatewaysResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnGatewaysResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" - # Construct URL - url = self._reset_shared_key_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'ConnectionResetSharedKey') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - if response.status_code not in [200, 202]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnGatewaysResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) + def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, deserialized, {}) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - return deserialized - _reset_shared_key_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) - def begin_reset_shared_key( - self, - resource_group_name, # type: str - virtual_network_gateway_connection_name, # type: str - parameters, # type: "_models.ConnectionResetSharedKey" - **kwargs # type: Any - ): - # type: (...) -> LROPoller["_models.ConnectionResetSharedKey"] - """The VirtualNetworkGatewayConnectionResetSharedKey operation resets the virtual network gateway - connection shared key for passed virtual network gateway connection in the specified resource - group through Network resource provider. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_gateway_connection_name: The virtual network gateway connection reset - shared key Name. - :type virtual_network_gateway_connection_name: str - :param parameters: Parameters supplied to the begin reset virtual network gateway connection - shared key operation through network resource provider. - :type parameters: ~azure.mgmt.network.v2017_11_01.models.ConnectionResetSharedKey - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either ConnectionResetSharedKey or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.ConnectionResetSharedKey] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectionResetSharedKey"] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return ItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._reset_shared_key_initial( - resource_group_name=resource_group_name, - virtual_network_gateway_connection_name=virtual_network_gateway_connection_name, - parameters=parameters, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - deserialized = self._deserialize('ConnectionResetSharedKey', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - return deserialized - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkGatewayConnectionName': self._serialize.url("virtual_network_gateway_connection_name", virtual_network_gateway_connection_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_reset_shared_key.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/connections/{virtualNetworkGatewayConnectionName}/sharedkey/reset'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnGateways'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_link_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_link_connections_operations.py new file mode 100644 index 000000000000..60cec18baa6f --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_link_connections_operations.py @@ -0,0 +1,386 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VpnLinkConnectionsOperations(object): + """VpnLinkConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _reset_connection_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + connection_name, # type: str + link_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._reset_connection_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _reset_connection_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection'} # type: ignore + + def begin_reset_connection( + self, + resource_group_name, # type: str + gateway_name, # type: str + connection_name, # type: str + link_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Resets the VpnLink connection specified. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn link connection. + :type link_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._reset_connection_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_reset_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/resetconnection'} # type: ignore + + def _get_ike_sas_initial( + self, + resource_group_name, # type: str + gateway_name, # type: str + connection_name, # type: str + link_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional[str] + cls = kwargs.pop('cls', None) # type: ClsType[Optional[str]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._get_ike_sas_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _get_ike_sas_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas'} # type: ignore + + def begin_get_ike_sas( + self, + resource_group_name, # type: str + gateway_name, # type: str + connection_name, # type: str + link_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[str] + """Lists IKE Security Associations for Vpn Site Link Connection in the specified resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn link connection. + :type link_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either str or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[str] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[str] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._get_ike_sas_initial( + resource_group_name=resource_group_name, + gateway_name=gateway_name, + connection_name=connection_name, + link_connection_name=link_connection_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('str', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_get_ike_sas.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}/getikesas'} # type: ignore + + def list_by_vpn_connection( + self, + resource_group_name, # type: str + gateway_name, # type: str + connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVpnSiteLinkConnectionsResult"] + """Retrieves all vpn site link connections for a particular virtual wan vpn gateway vpn + connection. + + :param resource_group_name: The resource group name of the vpn gateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSiteLinkConnectionsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnSiteLinkConnectionsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSiteLinkConnectionsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_vpn_connection.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnSiteLinkConnectionsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_vpn_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py new file mode 100644 index 000000000000..731fd91932da --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_server_configurations_associated_with_virtual_wan_operations.py @@ -0,0 +1,166 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VpnServerConfigurationsAssociatedWithVirtualWanOperations(object): + """VpnServerConfigurationsAssociatedWithVirtualWanOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _list_initial( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VpnServerConfigurationsResponse"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VpnServerConfigurationsResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._list_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfigurationsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _list_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations'} # type: ignore + + def begin_list( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnServerConfigurationsResponse"] + """Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN whose associated VpnServerConfigurations is + needed. + :type virtual_wan_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VpnServerConfigurationsResponse or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnServerConfigurationsResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfigurationsResponse"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._list_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnServerConfigurationsResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnServerConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_server_configurations_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_server_configurations_operations.py new file mode 100644 index 000000000000..e2d9470b296c --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_server_configurations_operations.py @@ -0,0 +1,556 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VpnServerConfigurationsOperations(object): + """VpnServerConfigurationsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + vpn_server_configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnServerConfiguration" + """Retrieves the details of a VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being retrieved. + :type vpn_server_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + vpn_server_configuration_name, # type: str + vpn_server_configuration_parameters, # type: "_models.VpnServerConfiguration" + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnServerConfiguration" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_server_configuration_parameters, 'VpnServerConfiguration') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + vpn_server_configuration_name, # type: str + vpn_server_configuration_parameters, # type: "_models.VpnServerConfiguration" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnServerConfiguration"] + """Creates a VpnServerConfiguration resource if it doesn't exist else updates the existing + VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being created or + updated. + :type vpn_server_configuration_name: str + :param vpn_server_configuration_parameters: Parameters supplied to create or update + VpnServerConfiguration. + :type vpn_server_configuration_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VpnServerConfiguration or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + vpn_server_configuration_parameters=vpn_server_configuration_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + vpn_server_configuration_name, # type: str + vpn_server_configuration_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnServerConfiguration" + """Updates VpnServerConfiguration tags. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being updated. + :type vpn_server_configuration_name: str + :param vpn_server_configuration_parameters: Parameters supplied to update + VpnServerConfiguration tags. + :type vpn_server_configuration_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnServerConfiguration, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnServerConfiguration + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnServerConfiguration"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_server_configuration_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnServerConfiguration', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + vpn_server_configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + vpn_server_configuration_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a VpnServerConfiguration. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :param vpn_server_configuration_name: The name of the VpnServerConfiguration being deleted. + :type vpn_server_configuration_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vpn_server_configuration_name=vpn_server_configuration_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnServerConfigurationName': self._serialize.url("vpn_server_configuration_name", vpn_server_configuration_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations/{vpnServerConfigurationName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVpnServerConfigurationsResult"] + """Lists all the vpnServerConfigurations in a resource group. + + :param resource_group_name: The resource group name of the VpnServerConfiguration. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnServerConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnServerConfigurationsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnServerConfigurations'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVpnServerConfigurationsResult"] + """Lists all the VpnServerConfigurations in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnServerConfigurationsResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnServerConfigurationsResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnServerConfigurationsResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnServerConfigurationsResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnServerConfigurations'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_link_connections_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_link_connections_operations.py new file mode 100644 index 000000000000..794059d85cb8 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_link_connections_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VpnSiteLinkConnectionsOperations(object): + """VpnSiteLinkConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + gateway_name, # type: str + connection_name, # type: str + link_connection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnSiteLinkConnection" + """Retrieves the details of a vpn site link connection. + + :param resource_group_name: The resource group name of the VpnGateway. + :type resource_group_name: str + :param gateway_name: The name of the gateway. + :type gateway_name: str + :param connection_name: The name of the vpn connection. + :type connection_name: str + :param link_connection_name: The name of the vpn connection. + :type link_connection_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSiteLinkConnection, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnSiteLinkConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSiteLinkConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), + 'connectionName': self._serialize.url("connection_name", connection_name, 'str'), + 'linkConnectionName': self._serialize.url("link_connection_name", link_connection_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSiteLinkConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnGateways/{gatewayName}/vpnConnections/{connectionName}/vpnLinkConnections/{linkConnectionName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_backend_address_pools_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_links_operations.py similarity index 71% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_backend_address_pools_operations.py rename to sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_links_operations.py index a5193e1de003..fade2a426b43 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_load_balancer_backend_address_pools_operations.py +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_links_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerBackendAddressPoolsOperations(object): - """LoadBalancerBackendAddressPoolsOperations operations. +class VpnSiteLinksOperations(object): + """VpnSiteLinksOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.network.v2021_05_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,31 +45,94 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def list( + def get( + self, + resource_group_name, # type: str + vpn_site_name, # type: str + vpn_site_link_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnSiteLink" + """Retrieves the details of a VPN site link. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite. + :type vpn_site_name: str + :param vpn_site_link_name: The name of the VpnSiteLink being retrieved. + :type vpn_site_link_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSiteLink, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnSiteLink + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSiteLink"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + 'vpnSiteLinkName': self._serialize.url("vpn_site_link_name", vpn_site_link_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSiteLink', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks/{vpnSiteLinkName}'} # type: ignore + + def list_by_vpn_site( self, resource_group_name, # type: str - load_balancer_name, # type: str + vpn_site_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.LoadBalancerBackendAddressPoolListResult"] - """Gets all the load balancer backed address pools. + # type: (...) -> Iterable["_models.ListVpnSiteLinksResult"] + """Lists all the vpnSiteLinks in a resource group for a vpn site. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The resource group name of the VpnSite. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str + :param vpn_site_name: The name of the VpnSite. + :type vpn_site_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either LoadBalancerBackendAddressPoolListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.LoadBalancerBackendAddressPoolListResult] + :return: An iterator like instance of either ListVpnSiteLinksResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnSiteLinksResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.LoadBalancerBackendAddressPoolListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSiteLinksResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-05-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -78,11 +141,11 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_by_vpn_site.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -97,7 +160,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('LoadBalancerBackendAddressPoolListResult', pipeline_response) + deserialized = self._deserialize('ListVpnSiteLinksResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,67 +181,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools'} # type: ignore - - def get( - self, - resource_group_name, # type: str - load_balancer_name, # type: str - backend_address_pool_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> "_models.BackendAddressPool" - """Gets load balancer backend address pool. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str - :param backend_address_pool_name: The name of the backend address pool. - :type backend_address_pool_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: BackendAddressPool, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.BackendAddressPool - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.BackendAddressPool"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - # Construct URL - url = self.get.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), - 'backendAddressPoolName': self._serialize.url("backend_address_pool_name", backend_address_pool_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) - - deserialized = self._deserialize('BackendAddressPool', pipeline_response) - - if cls: - return cls(pipeline_response, deserialized, {}) - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/backendAddressPools/{backendAddressPoolName}'} # type: ignore + list_by_vpn_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}/vpnSiteLinks'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_sites_configuration_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_sites_configuration_operations.py new file mode 100644 index 000000000000..ad2c08557568 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_sites_configuration_operations.py @@ -0,0 +1,168 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VpnSitesConfigurationOperations(object): + """VpnSitesConfigurationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def _download_initial( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + request, # type: "_models.GetVpnSitesConfigurationRequest" + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._download_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(request, 'GetVpnSitesConfigurationRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _download_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration'} # type: ignore + + def begin_download( + self, + resource_group_name, # type: str + virtual_wan_name, # type: str + request, # type: "_models.GetVpnSitesConfigurationRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Gives the sas-url to download the configurations for vpn-sites in a resource group. + + :param resource_group_name: The resource group name. + :type resource_group_name: str + :param virtual_wan_name: The name of the VirtualWAN for which configuration of all vpn-sites is + needed. + :type virtual_wan_name: str + :param request: Parameters supplied to download vpn-sites configuration. + :type request: ~azure.mgmt.network.v2021_05_01.models.GetVpnSitesConfigurationRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._download_initial( + resource_group_name=resource_group_name, + virtual_wan_name=virtual_wan_name, + request=request, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'virtualWANName': self._serialize.url("virtual_wan_name", virtual_wan_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_download.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualWans/{virtualWANName}/vpnConfiguration'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_sites_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_sites_operations.py new file mode 100644 index 000000000000..4b1b9d1f2840 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_sites_operations.py @@ -0,0 +1,552 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VpnSitesOperations(object): + """VpnSitesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + vpn_site_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnSite" + """Retrieves the details of a VPN site. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being retrieved. + :type vpn_site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + def _create_or_update_initial( + self, + resource_group_name, # type: str + vpn_site_name, # type: str + vpn_site_parameters, # type: "_models.VpnSite" + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnSite" + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_site_parameters, 'VpnSite') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('VpnSite', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + vpn_site_name, # type: str + vpn_site_parameters, # type: "_models.VpnSite" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VpnSite"] + """Creates a VpnSite resource if it doesn't exist else updates the existing VpnSite. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being created or updated. + :type vpn_site_name: str + :param vpn_site_parameters: Parameters supplied to create or update VpnSite. + :type vpn_site_parameters: ~azure.mgmt.network.v2021_05_01.models.VpnSite + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VpnSite or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2021_05_01.models.VpnSite] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + vpn_site_parameters=vpn_site_parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + def update_tags( + self, + resource_group_name, # type: str + vpn_site_name, # type: str + vpn_site_parameters, # type: "_models.TagsObject" + **kwargs # type: Any + ): + # type: (...) -> "_models.VpnSite" + """Updates VpnSite tags. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being updated. + :type vpn_site_name: str + :param vpn_site_parameters: Parameters supplied to update VpnSite tags. + :type vpn_site_parameters: ~azure.mgmt.network.v2021_05_01.models.TagsObject + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VpnSite, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.VpnSite + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VpnSite"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update_tags.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(vpn_site_parameters, 'TagsObject') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VpnSite', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_tags.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + vpn_site_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + vpn_site_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes a VpnSite. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :param vpn_site_name: The name of the VpnSite being deleted. + :type vpn_site_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + vpn_site_name=vpn_site_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vpnSiteName': self._serialize.url("vpn_site_name", vpn_site_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites/{vpnSiteName}'} # type: ignore + + def list_by_resource_group( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVpnSitesResult"] + """Lists all the vpnSites in a resource group. + + :param resource_group_name: The resource group name of the VpnSite. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSitesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnSitesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSitesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnSitesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/vpnSites'} # type: ignore + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ListVpnSitesResult"] + """Lists all the VpnSites in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ListVpnSitesResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.ListVpnSitesResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ListVpnSitesResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ListVpnSitesResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/vpnSites'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_web_application_firewall_policies_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_web_application_firewall_policies_operations.py new file mode 100644 index 000000000000..ff0c56f4a7b0 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_web_application_firewall_policies_operations.py @@ -0,0 +1,426 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WebApplicationFirewallPoliciesOperations(object): + """WebApplicationFirewallPoliciesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebApplicationFirewallPolicyListResult"] + """Lists all of the protection policies within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + 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'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebApplicationFirewallPolicyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies'} # type: ignore + + def list_all( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.WebApplicationFirewallPolicyListResult"] + """Gets all the WAF policies in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebApplicationFirewallPolicyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicyListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_all.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('WebApplicationFirewallPolicyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies'} # type: ignore + + def get( + self, + resource_group_name, # type: str + policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.WebApplicationFirewallPolicy" + """Retrieve protection policy with specified name within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param policy_name: The name of the policy. + :type policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + policy_name, # type: str + parameters, # type: "_models.WebApplicationFirewallPolicy" + **kwargs # type: Any + ): + # type: (...) -> "_models.WebApplicationFirewallPolicy" + """Creates or update policy with specified rule set name within a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param policy_name: The name of the policy. + :type policy_name: str + :param parameters: Policy to be created. + :type parameters: ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicy + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebApplicationFirewallPolicy, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.WebApplicationFirewallPolicy + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebApplicationFirewallPolicy"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'WebApplicationFirewallPolicy') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('WebApplicationFirewallPolicy', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + def _delete_initial( + self, + resource_group_name, # type: str + policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}'} # type: ignore + + def begin_delete( + self, + resource_group_name, # type: str + policy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deletes Policy. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param policy_name: The name of the policy. + :type policy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + policy_name=policy_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'policyName': self._serialize.url("policy_name", policy_name, 'str', max_length=128, min_length=0), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/{policyName}'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_web_categories_operations.py b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_web_categories_operations.py new file mode 100644 index 000000000000..da6469d2060d --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_web_categories_operations.py @@ -0,0 +1,173 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class WebCategoriesOperations(object): + """WebCategoriesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.network.v2021_05_01.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + name, # type: str + expand=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> "_models.AzureWebCategory" + """Gets the specified Azure Web Category. + + :param name: The name of the azureWebCategory. + :type name: str + :param expand: Expands resourceIds back referenced by the azureWebCategory resource. + :type expand: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AzureWebCategory, or the result of cls(response) + :rtype: ~azure.mgmt.network.v2021_05_01.models.AzureWebCategory + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureWebCategory"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if expand is not None: + query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('AzureWebCategory', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories/{name}'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.AzureWebCategoryListResult"] + """Gets all the Azure Web Categories in a subscription. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either AzureWebCategoryListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2021_05_01.models.AzureWebCategoryListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.AzureWebCategoryListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-05-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('AzureWebCategoryListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/azureWebCategories'} # type: ignore diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/py.typed b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_base.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_base.test_network.yaml index 80766ab208d6..a9a1da8febb6 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_base.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_base.test_network.yaml @@ -14,24 +14,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\ - ,\r\n \"etag\": \"W/\\\"e0abfe83-1368-450e-b7f4-1e89d40e0fab\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Updating\",\r\n \"resourceGuid\": \"f7fda523-4ad3-4a95-b5a5-df3d1f5525ba\"\ - ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\"\ - : {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"publicipname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\",\r\n + \ \"etag\": \"W/\\\"66b975f5-3aa6-432e-9a71-ac8025009f7b\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"f7810df9-b1e1-49d4-9022-22a4ffe71ffa\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b85f2a74-c525-491f-9db6-8c261674506e?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e8b9acdf-bbdc-4e69-acbd-356446ecd6c9?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -39,7 +40,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:10:55 GMT + - Fri, 05 Nov 2021 08:47:42 GMT expires: - '-1' pragma: @@ -52,7 +53,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - bec4f5e4-1985-493d-85cc-fdf38108e100 + - fd7594cb-a189-441b-9d63-ea12fc41fab9 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -68,9 +69,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b85f2a74-c525-491f-9db6-8c261674506e?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e8b9acdf-bbdc-4e69-acbd-356446ecd6c9?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -82,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:10:57 GMT + - Fri, 05 Nov 2021 08:47:43 GMT expires: - '-1' pragma: @@ -99,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 550ee753-7759-4a2b-a135-bd1df499eb64 + - a123a39c-cebf-45e2-8cf7-39173c0e0318 status: code: 200 message: OK @@ -113,19 +115,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\ - ,\r\n \"etag\": \"W/\\\"72a1dc9d-5ab1-4ebf-8318-e5abc9502a84\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"f7fda523-4ad3-4a95-b5a5-df3d1f5525ba\"\ - ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\"\ - : {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"publicipname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\",\r\n + \ \"etag\": \"W/\\\"f060a6db-e6c1-4720-8f23-c2996ec99582\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"f7810df9-b1e1-49d4-9022-22a4ffe71ffa\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -134,9 +137,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:10:57 GMT + - Fri, 05 Nov 2021 08:47:44 GMT etag: - - W/"72a1dc9d-5ab1-4ebf-8318-e5abc9502a84" + - W/"f060a6db-e6c1-4720-8f23-c2996ec99582" expires: - '-1' pragma: @@ -153,7 +156,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ddbca5d1-e5f9-49c3-b167-220ef045909f + - 4ddd75d5-88fc-48a3-805d-558709053174 status: code: 200 message: OK @@ -172,24 +175,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"8fc0b7c9-5909-4249-9b53-5ea401661d8f\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"718bb1c3-dc3a-480c-83fb-6936d55ea635\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"48afb589-052f-4528-8839-3d43afc8c971\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"e36e940a-c6b3-4730-864d-300b6dd0f024\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n + \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/839ab3e7-40a2-4004-8a67-129fa04c2aae?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/37045d4f-15c0-48f5-b147-73b7a74e5d19?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -197,7 +201,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:03 GMT + - Fri, 05 Nov 2021 08:47:45 GMT expires: - '-1' pragma: @@ -210,7 +214,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3866b867-c826-4ac8-96eb-42dc9a302217 + - e330c1eb-54aa-4a25-9510-31c11244e29a x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -226,9 +230,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/839ab3e7-40a2-4004-8a67-129fa04c2aae?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/37045d4f-15c0-48f5-b147-73b7a74e5d19?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -240,7 +245,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:06 GMT + - Fri, 05 Nov 2021 08:47:48 GMT expires: - '-1' pragma: @@ -257,7 +262,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 75e8b97d-6b65-465e-80a1-2a65e53cf382 + - c8fe6d65-a1c8-4d00-a2d0-a7d795423f50 status: code: 200 message: OK @@ -271,19 +276,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"c43d74f9-a29e-4191-93b3-7c71c5a31d8f\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"718bb1c3-dc3a-480c-83fb-6936d55ea635\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"01b3a281-3710-4db1-a71f-e5c742a1e545\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"e36e940a-c6b3-4730-864d-300b6dd0f024\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n + \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -292,9 +298,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:07 GMT + - Fri, 05 Nov 2021 08:47:48 GMT etag: - - W/"c43d74f9-a29e-4191-93b3-7c71c5a31d8f" + - W/"01b3a281-3710-4db1-a71f-e5c742a1e545" expires: - '-1' pragma: @@ -311,7 +317,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5fa4564d-dde2-4145-9ee4-3c201208da2f + - 83880abd-c2f5-4025-90f0-14314744bec8 status: code: 200 message: OK @@ -330,24 +336,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"rmvirtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"c064da82-33ae-4b0c-9e72-a95c2df52bcf\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"bbac6841-f703-40d2-b234-e93e7f7c73d3\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"rmvirtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"92f97c01-ed9b-4e92-a9d6-593a349f4537\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"078a28e2-34f5-4c32-8439-d4809de84318\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n + \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c3ce9884-f04f-4e27-96cb-23edd5869271?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ce8f15b3-5a36-474c-a084-a27e9d6237f2?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -355,7 +362,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:10 GMT + - Fri, 05 Nov 2021 08:47:49 GMT expires: - '-1' pragma: @@ -368,7 +375,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cc5a3d89-450b-4427-b291-30b6f9ad8c55 + - a535ed2d-e717-4c03-8eb7-1441da929aa3 x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -384,9 +391,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c3ce9884-f04f-4e27-96cb-23edd5869271?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ce8f15b3-5a36-474c-a084-a27e9d6237f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -398,7 +406,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:13 GMT + - Fri, 05 Nov 2021 08:47:52 GMT expires: - '-1' pragma: @@ -415,7 +423,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a225c310-6808-40a4-ae99-e52580682f18 + - c870c637-a559-4016-8d04-fb69cf9e4f07 status: code: 200 message: OK @@ -429,19 +437,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"rmvirtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"b7ae8965-7577-4d79-a04d-fffc4e513ab7\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"bbac6841-f703-40d2-b234-e93e7f7c73d3\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"rmvirtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"1617beaf-676c-494a-946e-679604aa109f\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"078a28e2-34f5-4c32-8439-d4809de84318\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n + \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -450,9 +459,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:14 GMT + - Fri, 05 Nov 2021 08:47:53 GMT etag: - - W/"b7ae8965-7577-4d79-a04d-fffc4e513ab7" + - W/"1617beaf-676c-494a-946e-679604aa109f" expires: - '-1' pragma: @@ -469,7 +478,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2e585784-4cf9-4824-859d-19d7df7ff8ef + - 2f42ac11-6371-4c31-807f-930c62620676 status: code: 200 message: OK @@ -487,20 +496,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"7009e79c-d210-42f9-bb9e-390d250285db\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"15e09063-40b9-4c4c-9240-6b50b0318863\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/358bca21-a99d-4f37-b6dc-443b4d3bd865?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5854481e-fc93-4bfe-af2c-ddaacb35e1d8?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -508,7 +518,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:15 GMT + - Fri, 05 Nov 2021 08:47:53 GMT expires: - '-1' pragma: @@ -521,7 +531,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 510115dc-4f57-4d95-b5b0-f1226b273080 + - c1a817c8-4094-4668-b129-6fa3dbf57526 x-ms-ratelimit-remaining-subscription-writes: - '1196' status: @@ -537,9 +547,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/358bca21-a99d-4f37-b6dc-443b4d3bd865?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5854481e-fc93-4bfe-af2c-ddaacb35e1d8?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -551,7 +562,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:18 GMT + - Fri, 05 Nov 2021 08:47:56 GMT expires: - '-1' pragma: @@ -568,7 +579,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 717fd77d-5826-4a5a-8b77-78963bb6bfa3 + - c0c8cb72-6b9c-4bef-a5f9-5b3c9aefc12f status: code: 200 message: OK @@ -582,17 +593,18 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"2f658b05-133c-4a81-be63-e37eaa89f23a\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"ae5d2731-ffa4-4ce6-bc21-008e22e2dc75\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: cache-control: - no-cache @@ -601,9 +613,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:18 GMT + - Fri, 05 Nov 2021 08:47:56 GMT etag: - - W/"2f658b05-133c-4a81-be63-e37eaa89f23a" + - W/"ae5d2731-ffa4-4ce6-bc21-008e22e2dc75" expires: - '-1' pragma: @@ -620,7 +632,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9a911443-332a-4b68-9bd4-cedbd2aeae26 + - 975350fa-7fe4-427c-92b0-385ad8170f69 status: code: 200 message: OK @@ -639,35 +651,34 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"networkinterfacename\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename\"\ - ,\r\n \"etag\": \"W/\\\"c1d5e2a8-fab0-4f45-afb1-fc50f22cce42\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"1c79e4af-2554-49ee-8092-31164af6b431\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfig\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\"\ - ,\r\n \"etag\": \"W/\\\"c1d5e2a8-fab0-4f45-afb1-fc50f22cce42\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"yoyyw2j01qgera51ne1nkxvggf.bx.internal.cloudapp.net\"\ - \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"vnetEncryptionSupported\"\ - : false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\"\ - : [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" + string: "{\r\n \"name\": \"networkinterfacename\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename\",\r\n + \ \"etag\": \"W/\\\"68da5d76-8f46-4889-ab13-732e7f393561\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"c66b354f-e3ca-43ef-96cd-a261ce65fdb0\",\r\n \"ipConfigurations\": + [\r\n {\r\n \"name\": \"ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\",\r\n + \ \"etag\": \"W/\\\"68da5d76-8f46-4889-ab13-732e7f393561\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": + \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": + [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": + \"bkkg3y3tyyyepbsngafw1uhqee.bx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": + false,\r\n \"vnetEncryptionSupported\": false,\r\n \"enableIPForwarding\": + false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n + \ \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c45f69f3-9a0f-4bc6-87c1-4b123b9079b0?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/d16b1c40-ae29-40c8-9048-c09e8c1d5bf3?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -675,7 +686,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:22 GMT + - Fri, 05 Nov 2021 08:47:57 GMT expires: - '-1' pragma: @@ -688,7 +699,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 06f66a64-2cd3-4788-8b3f-467247ab5663 + - c543a01a-4683-42b3-ba8a-d960f430b5bf x-ms-ratelimit-remaining-subscription-writes: - '1195' status: @@ -704,9 +715,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c45f69f3-9a0f-4bc6-87c1-4b123b9079b0?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/d16b1c40-ae29-40c8-9048-c09e8c1d5bf3?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -718,7 +730,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:53 GMT + - Fri, 05 Nov 2021 08:48:27 GMT expires: - '-1' pragma: @@ -735,7 +747,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 29804f5c-45aa-4603-8059-a4e06177ab37 + - e36b6522-e3dc-4f76-933b-60077a291c93 status: code: 200 message: OK @@ -749,30 +761,29 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"networkinterfacename\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename\"\ - ,\r\n \"etag\": \"W/\\\"c1d5e2a8-fab0-4f45-afb1-fc50f22cce42\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"1c79e4af-2554-49ee-8092-31164af6b431\"\ - ,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"ipconfig\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\"\ - ,\r\n \"etag\": \"W/\\\"c1d5e2a8-fab0-4f45-afb1-fc50f22cce42\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n\ - \ \"dnsServers\": [],\r\n \"appliedDnsServers\": [],\r\n \"\ - internalDomainNameSuffix\": \"yoyyw2j01qgera51ne1nkxvggf.bx.internal.cloudapp.net\"\ - \r\n },\r\n \"enableAcceleratedNetworking\": false,\r\n \"vnetEncryptionSupported\"\ - : false,\r\n \"enableIPForwarding\": false,\r\n \"hostedWorkloads\"\ - : [],\r\n \"tapConfigurations\": [],\r\n \"nicType\": \"Standard\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" + string: "{\r\n \"name\": \"networkinterfacename\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename\",\r\n + \ \"etag\": \"W/\\\"68da5d76-8f46-4889-ab13-732e7f393561\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"c66b354f-e3ca-43ef-96cd-a261ce65fdb0\",\r\n \"ipConfigurations\": + [\r\n {\r\n \"name\": \"ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\",\r\n + \ \"etag\": \"W/\\\"68da5d76-8f46-4889-ab13-732e7f393561\\\"\",\r\n + \ \"type\": \"Microsoft.Network/networkInterfaces/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": + \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"dnsSettings\": {\r\n \"dnsServers\": + [],\r\n \"appliedDnsServers\": [],\r\n \"internalDomainNameSuffix\": + \"bkkg3y3tyyyepbsngafw1uhqee.bx.internal.cloudapp.net\"\r\n },\r\n \"enableAcceleratedNetworking\": + false,\r\n \"vnetEncryptionSupported\": false,\r\n \"enableIPForwarding\": + false,\r\n \"hostedWorkloads\": [],\r\n \"tapConfigurations\": [],\r\n + \ \"nicType\": \"Standard\"\r\n },\r\n \"type\": \"Microsoft.Network/networkInterfaces\"\r\n}" headers: cache-control: - no-cache @@ -781,9 +792,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:54 GMT + - Fri, 05 Nov 2021 08:48:27 GMT etag: - - W/"c1d5e2a8-fab0-4f45-afb1-fc50f22cce42" + - W/"68da5d76-8f46-4889-ab13-732e7f393561" expires: - '-1' pragma: @@ -800,7 +811,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 77f51c37-fc85-431a-bded-f283f503a2a9 + - 3b3d8fee-a049-42e2-952c-0e4e3988aa2e status: code: 200 message: OK @@ -818,20 +829,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"GatewaySubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - ,\r\n \"etag\": \"W/\\\"13da3b29-5c8c-4f75-9fe1-451fb8be2fa8\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - addressPrefix\": \"10.0.1.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"GatewaySubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\",\r\n + \ \"etag\": \"W/\\\"32641938-37e4-4460-897a-6947f17313e9\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7ba24d32-6d28-4b4b-ae28-c4375104fd92?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/af2b7308-a31a-4702-b782-f26d28d6ab08?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -839,7 +851,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:55 GMT + - Fri, 05 Nov 2021 08:48:27 GMT expires: - '-1' pragma: @@ -852,7 +864,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b47cc73c-e2fb-4c86-9fae-313fa4fa5526 + - b95e814f-bc75-465d-ad77-8cf8daf83b8b x-ms-ratelimit-remaining-subscription-writes: - '1194' status: @@ -868,9 +880,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7ba24d32-6d28-4b4b-ae28-c4375104fd92?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/af2b7308-a31a-4702-b782-f26d28d6ab08?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -882,7 +895,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:58 GMT + - Fri, 05 Nov 2021 08:48:30 GMT expires: - '-1' pragma: @@ -899,7 +912,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 31f9f147-112d-4604-bba7-d5fd4abd511b + - b770dfb1-8a90-48b8-a517-46752b692bcb status: code: 200 message: OK @@ -913,17 +926,18 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"GatewaySubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - ,\r\n \"etag\": \"W/\\\"faa39c25-caf6-4ab3-a399-9fa8653b1851\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.1.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"GatewaySubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\",\r\n + \ \"etag\": \"W/\\\"46fd017b-1825-4ca8-9dbb-bb928a86f8f0\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: cache-control: - no-cache @@ -932,9 +946,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:11:58 GMT + - Fri, 05 Nov 2021 08:48:31 GMT etag: - - W/"faa39c25-caf6-4ab3-a399-9fa8653b1851" + - W/"46fd017b-1825-4ca8-9dbb-bb928a86f8f0" expires: - '-1' pragma: @@ -951,7 +965,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - dc358bde-0a7b-434f-a433-1b5e82ed0aab + - ddb52f5e-bf06-4d1a-aa45-9daef7a9022b status: code: 200 message: OK @@ -970,24 +984,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"localnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"d4717c26-3c50-43aa-83f0-c81e86e94300\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/localNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"resourceGuid\": \"242b6de5-625d-493a-8f49-45d1b48a8fd3\",\r\n \ - \ \"localNetworkAddressSpace\": {\r\n \"addressPrefixes\": [\r\n \ - \ \"10.1.0.0/16\"\r\n ]\r\n },\r\n \"gatewayIpAddress\": \"\ - 11.12.13.14\"\r\n }\r\n}" + string: "{\r\n \"name\": \"localnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"987e5b58-0c66-45bc-b98c-3d4c707deaa1\\\"\",\r\n \"type\": + \"Microsoft.Network/localNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"a099dc38-929e-41d4-92c7-0fe885406543\",\r\n \"localNetworkAddressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.1.0.0/16\"\r\n ]\r\n + \ },\r\n \"gatewayIpAddress\": \"11.12.13.14\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/cb912284-6cbc-4d33-8f75-2af5c9f7ecec?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/edd06ac0-ed3b-49eb-9ffc-a9c74c7b9f44?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -995,7 +1009,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:12:03 GMT + - Fri, 05 Nov 2021 08:48:32 GMT expires: - '-1' pragma: @@ -1008,7 +1022,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b79fe795-0ac9-464b-aee1-9892e651535c + - 3c6d792e-ef3d-4c9b-896a-24bd864ee8b4 x-ms-ratelimit-remaining-subscription-writes: - '1193' status: @@ -1024,21 +1038,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/cb912284-6cbc-4d33-8f75-2af5c9f7ecec?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/edd06ac0-ed3b-49eb-9ffc-a9c74c7b9f44?api-version=2021-05-01 response: body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" + string: "{\r\n \"status\": \"InProgress\"\r\n}" headers: cache-control: - no-cache content-length: - - '29' + - '30' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:12:13 GMT + - Fri, 05 Nov 2021 08:48:42 GMT expires: - '-1' pragma: @@ -1055,7 +1070,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d0a6439f-ad65-49a9-a919-e2668499a990 + - c7fd87cf-29a0-491f-a888-44dacd34a846 status: code: 200 message: OK @@ -1069,30 +1084,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/edd06ac0-ed3b-49eb-9ffc-a9c74c7b9f44?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"localnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"e00a1dff-b467-47ba-8b49-35177460489e\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/localNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"242b6de5-625d-493a-8f49-45d1b48a8fd3\",\r\n \ - \ \"localNetworkAddressSpace\": {\r\n \"addressPrefixes\": [\r\n \ - \ \"10.1.0.0/16\"\r\n ]\r\n },\r\n \"gatewayIpAddress\": \"\ - 11.12.13.14\"\r\n }\r\n}" + string: "{\r\n \"status\": \"Succeeded\"\r\n}" headers: cache-control: - no-cache content-length: - - '676' + - '29' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:12:13 GMT - etag: - - W/"e00a1dff-b467-47ba-8b49-35177460489e" + - Fri, 05 Nov 2021 08:48:53 GMT expires: - '-1' pragma: @@ -1109,80 +1116,44 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 50439bb8-327b-4384-b403-8a5bf61fc571 + - e2b89701-1c79-4301-8645-07cb8962a830 status: code: 200 message: OK - request: - body: '{"location": "eastus", "properties": {"ipConfigurations": [{"name": "ipconfig", - "properties": {"privateIPAllocationMethod": "Dynamic", "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet"}, - "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname"}}}], - "gatewayType": "Vpn", "vpnType": "RouteBased", "enableBgp": false, "sku": {"name": - "VpnGw1", "tier": "VpnGw1"}, "bgpSettings": {"asn": 65515, "bgpPeeringAddress": - "10.0.1.30", "peerWeight": 0}, "customRoutes": {"addressPrefixes": ["101.168.0.6/32"]}, - "enableDnsForwarding": false}}' + body: null headers: Accept: - - application/json + - '*/*' Accept-Encoding: - gzip, deflate Connection: - keep-alive - Content-Length: - - '910' - Content-Type: - - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"f7b15fb4-f595-457a-9960-5a22afbf83ee\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"resourceGuid\": \"55410cc2-1709-4ec7-83ba-055e2afdef89\",\r\n \ - \ \"packetCaptureDiagnosticState\": \"None\",\r\n \"enablePrivateIpAddress\"\ - : false,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"\ - ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"etag\": \"W/\\\"f7b15fb4-f595-457a-9960-5a22afbf83ee\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\ - \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\ - \n \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \ - \ \"name\": \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\"\ - : 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\"\ - ,\r\n \"enableBgp\": false,\r\n \"activeActive\": false,\r\n \"vpnClientConfiguration\"\ - : {\r\n \"vpnClientProtocols\": [\r\n \"OpenVPN\",\r\n \ - \ \"IkeV2\"\r\n ],\r\n \"vpnAuthenticationTypes\": [],\r\n \ - \ \"vpnClientRootCertificates\": [],\r\n \"vpnClientRevokedCertificates\"\ - : [],\r\n \"radiusServers\": [],\r\n \"vpnClientIpsecPolicies\"\ - : []\r\n },\r\n \"bgpSettings\": {\r\n \"asn\": 65515,\r\n \ - \ \"bgpPeeringAddress\": \"10.0.1.30\",\r\n \"peerWeight\": 0,\r\n \ - \ \"bgpPeeringAddresses\": [\r\n {\r\n \"ipconfigurationId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"defaultBgpIpAddresses\": [],\r\n \"customBgpIpAddresses\"\ - : []\r\n }\r\n ]\r\n },\r\n \"customRoutes\": {\r\n \ - \ \"addressPrefixes\": [\r\n \"101.168.0.6/32\"\r\n ]\r\n \ - \ },\r\n \"vpnGatewayGeneration\": \"Generation1\",\r\n \"enableDnsForwarding\"\ - : false\r\n }\r\n}" + string: "{\r\n \"name\": \"localnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"9a729969-148d-4486-88d5-d53d86bc9dfb\\\"\",\r\n \"type\": + \"Microsoft.Network/localNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"a099dc38-929e-41d4-92c7-0fe885406543\",\r\n \"localNetworkAddressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.1.0.0/16\"\r\n ]\r\n + \ },\r\n \"gatewayIpAddress\": \"11.12.13.14\"\r\n }\r\n}" headers: - azure-asyncnotification: - - Enabled - azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 cache-control: - no-cache content-length: - - '3100' + - '676' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:12:17 GMT + - Fri, 05 Nov 2021 08:48:53 GMT + etag: + - W/"9a729969-148d-4486-88d5-d53d86bc9dfb" expires: - '-1' pragma: @@ -1192,40 +1163,85 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d56fa97a-2022-4c38-86a5-d2b293452986 - x-ms-ratelimit-remaining-subscription-writes: - - '1192' + - dc44b849-cb73-444a-8816-2db4e5a0aa14 status: - code: 201 - message: Created + code: 200 + message: OK - request: - body: null + body: '{"location": "eastus", "properties": {"ipConfigurations": [{"name": "ipconfig", + "properties": {"privateIPAllocationMethod": "Dynamic", "subnet": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet"}, + "publicIPAddress": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname"}}}], + "gatewayType": "Vpn", "vpnType": "RouteBased", "enableBgp": false, "sku": {"name": + "VpnGw1", "tier": "VpnGw1"}, "bgpSettings": {"asn": 65515, "bgpPeeringAddress": + "10.0.1.30", "peerWeight": 0}, "customRoutes": {"addressPrefixes": ["101.168.0.6/32"]}, + "enableDnsForwarding": false}}' headers: Accept: - - '*/*' + - application/json Accept-Encoding: - gzip, deflate Connection: - keep-alive + Content-Length: + - '910' + Content-Type: + - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"3c8e5975-0180-43be-88ca-1675a62ec68a\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"ef8ecadb-db18-40b7-9785-0f625303c259\",\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"enablePrivateIpAddress\": false,\r\n \"ipConfigurations\": + [\r\n {\r\n \"name\": \"ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"etag\": \"W/\\\"3c8e5975-0180-43be-88ca-1675a62ec68a\\\"\",\r\n + \ \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\n + \ \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \"name\": + \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\": 2\r\n },\r\n + \ \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": + false,\r\n \"activeActive\": false,\r\n \"vpnClientConfiguration\": + {\r\n \"vpnClientProtocols\": [\r\n \"OpenVPN\",\r\n \"IkeV2\"\r\n + \ ],\r\n \"vpnAuthenticationTypes\": [],\r\n \"vpnClientRootCertificates\": + [],\r\n \"vpnClientRevokedCertificates\": [],\r\n \"radiusServers\": + [],\r\n \"vpnClientIpsecPolicies\": []\r\n },\r\n \"bgpSettings\": + {\r\n \"asn\": 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\",\r\n + \ \"peerWeight\": 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n + \ \"ipconfigurationId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"defaultBgpIpAddresses\": [],\r\n \"customBgpIpAddresses\": + []\r\n }\r\n ]\r\n },\r\n \"customRoutes\": {\r\n \"addressPrefixes\": + [\r\n \"101.168.0.6/32\"\r\n ]\r\n },\r\n \"vpnGatewayGeneration\": + \"Generation1\",\r\n \"enableDnsForwarding\": false\r\n }\r\n}" headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 cache-control: - no-cache content-length: - - '30' + - '3100' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:12:27 GMT + - Fri, 05 Nov 2021 08:48:54 GMT expires: - '-1' pragma: @@ -1235,17 +1251,15 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0bc68ae9-6a6a-45cf-8330-ea84b6dc9137 + - b69dd8cb-dfdb-4c26-ac32-0077ca8585c8 + x-ms-ratelimit-remaining-subscription-writes: + - '1192' status: - code: 200 - message: OK + code: 201 + message: Created - request: body: null headers: @@ -1256,9 +1270,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1270,7 +1285,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:12:38 GMT + - Fri, 05 Nov 2021 08:49:04 GMT expires: - '-1' pragma: @@ -1287,7 +1302,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8bc34d17-41ba-4837-a705-42e3de3a3844 + - b6b92c2a-31dc-4b36-96b1-72ec235d977a status: code: 200 message: OK @@ -1301,9 +1316,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1315,7 +1331,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:12:58 GMT + - Fri, 05 Nov 2021 08:49:14 GMT expires: - '-1' pragma: @@ -1332,7 +1348,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c5cf9ad9-a396-42ab-b70e-99dc81edded1 + - 80507e0d-1345-4697-a12d-67a234eda536 status: code: 200 message: OK @@ -1346,9 +1362,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1360,7 +1377,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:13:18 GMT + - Fri, 05 Nov 2021 08:49:34 GMT expires: - '-1' pragma: @@ -1377,7 +1394,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6791fd2a-084d-41bd-a24a-5a898cde54f5 + - 12afbc1b-e046-4c06-a9e1-b95dbcb77397 status: code: 200 message: OK @@ -1391,9 +1408,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1405,7 +1423,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:13:59 GMT + - Fri, 05 Nov 2021 08:49:55 GMT expires: - '-1' pragma: @@ -1422,7 +1440,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0e2bbe83-9e8e-44de-94dd-74080ec24177 + - 286088fa-e917-40db-811d-c2cf0bf35e21 status: code: 200 message: OK @@ -1436,9 +1454,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1450,7 +1469,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:14:40 GMT + - Fri, 05 Nov 2021 08:50:34 GMT expires: - '-1' pragma: @@ -1467,7 +1486,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0debe15f-dc7e-41dd-a02d-5d5f7a8ba8bd + - 3c0f5440-dd77-4714-9a65-0feea000eac8 status: code: 200 message: OK @@ -1481,9 +1500,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1495,7 +1515,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:16:01 GMT + - Fri, 05 Nov 2021 08:51:15 GMT expires: - '-1' pragma: @@ -1512,7 +1532,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 72e46803-962d-4bc5-b838-caa78387957e + - ea5a7a04-1de4-4f2d-adbc-af671ea406d3 status: code: 200 message: OK @@ -1526,9 +1546,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1540,7 +1561,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:18:42 GMT + - Fri, 05 Nov 2021 08:52:34 GMT expires: - '-1' pragma: @@ -1557,7 +1578,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 949b2eaa-f9c8-452f-a4ad-6b0e5eeaeb77 + - 431ca21c-f1b2-4aa3-9bf8-372cbff19838 status: code: 200 message: OK @@ -1571,9 +1592,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1585,7 +1607,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:20:23 GMT + - Fri, 05 Nov 2021 08:55:15 GMT expires: - '-1' pragma: @@ -1602,7 +1624,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 836c6522-df71-4ea8-91a1-9a5f1cb4516d + - a6bc5c83-c94c-4c7a-93af-718e30106276 status: code: 200 message: OK @@ -1616,9 +1638,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1630,7 +1653,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:22:04 GMT + - Fri, 05 Nov 2021 08:56:55 GMT expires: - '-1' pragma: @@ -1647,7 +1670,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6b12943d-c3bf-44a4-91d9-014ac5935a61 + - 01604c66-886e-4798-9c21-1af0891d1330 status: code: 200 message: OK @@ -1661,9 +1684,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1675,7 +1699,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:23:45 GMT + - Fri, 05 Nov 2021 08:58:36 GMT expires: - '-1' pragma: @@ -1692,7 +1716,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 86764d64-7b7f-45b4-8c5e-ad232c275bfb + - 4d9174a3-913c-4381-a2e4-3070af597e1f status: code: 200 message: OK @@ -1706,9 +1730,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1720,7 +1745,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:25:25 GMT + - Fri, 05 Nov 2021 09:00:15 GMT expires: - '-1' pragma: @@ -1737,7 +1762,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cf5494a5-d6f4-4c84-9308-a5fbd4f0781b + - 9dacb064-0889-41b0-b498-44254534c4ca status: code: 200 message: OK @@ -1751,9 +1776,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1765,7 +1791,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:27:06 GMT + - Fri, 05 Nov 2021 09:01:56 GMT expires: - '-1' pragma: @@ -1782,7 +1808,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 633c8e7a-bf06-470e-8def-1c3d87007d8e + - a291bbd7-84d7-42a9-8224-1ebd5aa98c87 status: code: 200 message: OK @@ -1796,9 +1822,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/61bd8f0d-3b6e-4aa9-81bd-254df5c7a2e9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1810,7 +1837,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:28:45 GMT + - Fri, 05 Nov 2021 09:03:36 GMT expires: - '-1' pragma: @@ -1827,7 +1854,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 257632f6-ef49-4071-9444-7d14cd3917ca + - 76f3392e-dbe4-46a8-8217-8b8117be868f status: code: 200 message: OK @@ -1841,9 +1868,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ @@ -1882,7 +1910,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:28:46 GMT + - Fri, 05 Nov 2021 09:05:16 GMT expires: - '-1' pragma: @@ -1899,7 +1927,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 32d50491-c0d8-4b1d-b550-4233f873a22a + - 340fd9ad-9fc8-4ebe-80f2-f68bcb82a910 status: code: 200 message: OK @@ -1977,9 +2005,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e6d4ba9f-bc41-48e9-a859-35f65652754c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/60152bb4-2a86-4134-b804-dd5e284cce2b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1991,7 +2020,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:28:58 GMT + - Fri, 05 Nov 2021 09:06:56 GMT expires: - '-1' pragma: @@ -2008,7 +2037,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7a0f0dc6-0aa1-4261-923e-559a5cf1044c + - 9e7015f4-53e9-4c2d-b190-122004db3fd8 status: code: 200 message: OK @@ -2022,36 +2051,48 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkpeeringname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname\"\ - ,\r\n \"etag\": \"W/\\\"fe15e9b7-2c06-44ac-b7dc-7a2887dad8c8\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - resourceGuid\": \"ca27d982-2b39-08de-31cf-8008aa22d5e6\",\r\n \"peeringState\"\ - : \"Initiated\",\r\n \"peeringSyncLevel\": \"RemoteNotInSync\",\r\n \ - \ \"remoteVirtualNetwork\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\ - \r\n },\r\n \"allowVirtualNetworkAccess\": true,\r\n \"allowForwardedTraffic\"\ - : true,\r\n \"allowGatewayTransit\": false,\r\n \"useRemoteGateways\"\ - : false,\r\n \"doNotVerifyRemoteGateways\": false,\r\n \"peerCompleteVnets\"\ - : true,\r\n \"remoteAddressSpace\": {\r\n \"addressPrefixes\": [\r\ - \n \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"remoteVirtualNetworkAddressSpace\"\ - : {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\r\n ]\r\ - \n },\r\n \"routeServiceVips\": {}\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/virtualNetworkPeerings\"\ - \r\n}" + string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"20dd19fa-6d00-4fd2-bfd5-6b586b5c396d\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"ef8ecadb-db18-40b7-9785-0f625303c259\",\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"enablePrivateIpAddress\": false,\r\n \"ipConfigurations\": + [\r\n {\r\n \"name\": \"ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"etag\": \"W/\\\"20dd19fa-6d00-4fd2-bfd5-6b586b5c396d\\\"\",\r\n + \ \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\n + \ \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \"name\": + \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\": 2\r\n },\r\n + \ \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": + false,\r\n \"activeActive\": false,\r\n \"bgpSettings\": {\r\n \"asn\": + 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\",\r\n \"peerWeight\": + 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n \"ipconfigurationId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\n ],\r\n + \ \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"20.121.0.34\"\r\n ]\r\n }\r\n ]\r\n + \ },\r\n \"customRoutes\": {\r\n \"addressPrefixes\": [\r\n \"101.168.0.6/32\"\r\n + \ ]\r\n },\r\n \"vpnGatewayGeneration\": \"Generation1\",\r\n \"enableDnsForwarding\": + false\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '1366' + - '2911' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:28:59 GMT - etag: - - W/"fe15e9b7-2c06-44ac-b7dc-7a2887dad8c8" + - Fri, 05 Nov 2021 09:06:56 GMT expires: - '-1' pragma: @@ -2068,7 +2109,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ca7f418e-3ff8-4bd3-b5f0-83b5aca04d17 + - b64f74ac-9700-46bf-8051-afa01ab4e352 status: code: 200 message: OK @@ -2099,40 +2140,37 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"connectionname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname\"\ - ,\r\n \"etag\": \"W/\\\"7e3ef523-289c-498c-a108-ddc06b035bfb\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/connections\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"e0b220ea-656e-434d-b101-d452cf7d103e\",\r\n \"\ - packetCaptureDiagnosticState\": \"None\",\r\n \"virtualNetworkGateway1\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ - \r\n },\r\n \"localNetworkGateway2\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\ - \r\n },\r\n \"connectionType\": \"IPsec\",\r\n \"connectionProtocol\"\ - : \"IKEv2\",\r\n \"routingWeight\": 0,\r\n \"sharedKey\": \"Abc123\"\ - ,\r\n \"enableBgp\": false,\r\n \"useLocalAzureIpAddress\": false,\r\ - \n \"usePolicyBasedTrafficSelectors\": false,\r\n \"ipsecPolicies\"\ - : [],\r\n \"trafficSelectorPolicies\": [],\r\n \"ingressBytesTransferred\"\ - : 0,\r\n \"egressBytesTransferred\": 0,\r\n \"expressRouteGatewayBypass\"\ - : false,\r\n \"dpdTimeoutSeconds\": 0,\r\n \"connectionMode\": \"Default\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkpeeringname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname\",\r\n + \ \"etag\": \"W/\\\"ff4129a7-c78d-4276-b70b-a4134c12c937\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"e4e4bce8-f246-0b02-0274-e48bf038b33c\",\r\n + \ \"peeringState\": \"Initiated\",\r\n \"peeringSyncLevel\": \"RemoteNotInSync\",\r\n + \ \"remoteVirtualNetwork\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\r\n + \ },\r\n \"allowVirtualNetworkAccess\": true,\r\n \"allowForwardedTraffic\": + true,\r\n \"allowGatewayTransit\": false,\r\n \"useRemoteGateways\": + false,\r\n \"doNotVerifyRemoteGateways\": false,\r\n \"peerCompleteVnets\": + true,\r\n \"remoteAddressSpace\": {\r\n \"addressPrefixes\": [\r\n + \ \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"remoteVirtualNetworkAddressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\r\n ]\r\n + \ },\r\n \"routeServiceVips\": {}\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/virtualNetworkPeerings\"\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ef19a71c-31f1-4bfd-b9ec-fb7cdda1d29d?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c9d53da5-458e-46cd-8157-b2341206e6e0?api-version=2021-05-01 cache-control: - no-cache content-length: - - '1562' + - '1365' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:29:07 GMT + - Fri, 05 Nov 2021 09:06:57 GMT expires: - '-1' pragma: @@ -2145,7 +2183,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 27702592-21a8-4557-a97e-e6cad7ce6940 + - f816717d-094e-4cd6-bd44-cccc7e8e5770 x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -2161,9 +2199,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ef19a71c-31f1-4bfd-b9ec-fb7cdda1d29d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c9d53da5-458e-46cd-8157-b2341206e6e0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2175,7 +2214,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:29:17 GMT + - Fri, 05 Nov 2021 09:07:07 GMT expires: - '-1' pragma: @@ -2192,7 +2231,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - dbf3606e-c994-4a2a-9676-aecf83d1f3ce + - 54c5a885-6c87-49d8-8ec3-ac274f9291d5 status: code: 200 message: OK @@ -2206,21 +2245,35 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ef19a71c-31f1-4bfd-b9ec-fb7cdda1d29d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname?api-version=2021-05-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"name\": \"virtualnetworkpeeringname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname\",\r\n + \ \"etag\": \"W/\\\"1f15067a-e271-4f37-9b02-78ccfb52d68a\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"e4e4bce8-f246-0b02-0274-e48bf038b33c\",\r\n + \ \"peeringState\": \"Initiated\",\r\n \"peeringSyncLevel\": \"RemoteNotInSync\",\r\n + \ \"remoteVirtualNetwork\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\r\n + \ },\r\n \"allowVirtualNetworkAccess\": true,\r\n \"allowForwardedTraffic\": + true,\r\n \"allowGatewayTransit\": false,\r\n \"useRemoteGateways\": + false,\r\n \"doNotVerifyRemoteGateways\": false,\r\n \"peerCompleteVnets\": + true,\r\n \"remoteAddressSpace\": {\r\n \"addressPrefixes\": [\r\n + \ \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"remoteVirtualNetworkAddressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\r\n ]\r\n + \ },\r\n \"routeServiceVips\": {}\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/virtualNetworkPeerings\"\r\n}" headers: cache-control: - no-cache content-length: - - '30' + - '1366' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:29:28 GMT + - Fri, 05 Nov 2021 09:07:07 GMT + etag: + - W/"1f15067a-e271-4f37-9b02-78ccfb52d68a" expires: - '-1' pragma: @@ -2237,7 +2290,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9f0a8f58-8a4b-44d7-bfd4-07cbc20f6d60 + - de8e667a-f5f0-43ef-8f38-92223bea0e8c status: code: 200 message: OK @@ -2251,21 +2304,40 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ef19a71c-31f1-4bfd-b9ec-fb7cdda1d29d?api-version=2021-03-01 + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-05-01 response: body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" + string: "{\r\n \"name\": \"connectionname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname\",\r\n + \ \"etag\": \"W/\\\"84f8b7fd-7ee0-4441-aaba-f989cfbfac76\\\"\",\r\n \"type\": + \"Microsoft.Network/connections\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"8caef51a-c608-44d9-9a72-927672431290\",\r\n + \ \"packetCaptureDiagnosticState\": \"None\",\r\n \"virtualNetworkGateway1\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\r\n + \ },\r\n \"localNetworkGateway2\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\r\n + \ },\r\n \"connectionType\": \"IPsec\",\r\n \"connectionProtocol\": + \"IKEv2\",\r\n \"routingWeight\": 0,\r\n \"sharedKey\": \"Abc123\",\r\n + \ \"enableBgp\": false,\r\n \"useLocalAzureIpAddress\": false,\r\n \"usePolicyBasedTrafficSelectors\": + false,\r\n \"ipsecPolicies\": [],\r\n \"trafficSelectorPolicies\": [],\r\n + \ \"ingressBytesTransferred\": 0,\r\n \"egressBytesTransferred\": 0,\r\n + \ \"expressRouteGatewayBypass\": false,\r\n \"dpdTimeoutSeconds\": 0,\r\n + \ \"connectionMode\": \"Default\",\r\n \"gatewayCustomBgpIpAddresses\": + []\r\n }\r\n}" headers: + azure-asyncnotification: + - Enabled + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b4ee1478-5ce5-44ff-8f26-f98ac91776a4?api-version=2021-05-01 cache-control: - no-cache content-length: - - '30' + - '1602' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:29:48 GMT + - Fri, 05 Nov 2021 09:07:09 GMT expires: - '-1' pragma: @@ -2282,7 +2354,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2a2af77f-d848-4261-bba4-c10b44d2862c + - 158ff792-15c1-4e6a-a439-09b0fb17289d + x-ms-ratelimit-remaining-subscription-writes: + - '1197' status: code: 200 message: OK @@ -2296,9 +2370,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ef19a71c-31f1-4bfd-b9ec-fb7cdda1d29d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b4ee1478-5ce5-44ff-8f26-f98ac91776a4?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2310,7 +2385,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:30:08 GMT + - Fri, 05 Nov 2021 09:07:20 GMT expires: - '-1' pragma: @@ -2327,7 +2402,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ed026fd6-a1cd-4f1e-af79-c38a334b15c9 + - d78c4a5a-b309-407e-9f92-311fa5987939 status: code: 200 message: OK @@ -2341,9 +2416,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b4ee1478-5ce5-44ff-8f26-f98ac91776a4?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"connectionname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname\"\ @@ -2370,7 +2446,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:30:10 GMT + - Fri, 05 Nov 2021 09:07:30 GMT expires: - '-1' pragma: @@ -2387,7 +2463,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a101e1f0-4586-4412-92ad-9fed867cede1 + - eeb41d9e-27da-466c-a49c-0419b9cd8488 status: code: 200 message: OK @@ -2405,9 +2481,10 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname/sharedkey?api-version=2021-03-01 + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b4ee1478-5ce5-44ff-8f26-f98ac91776a4?api-version=2021-05-01 response: body: string: '' @@ -2419,7 +2496,63 @@ interactions: content-length: - '0' date: - - Sat, 09 Oct 2021 06:30:11 GMT + - Fri, 05 Nov 2021 09:07:50 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - c0a4101a-7b87-4eb0-a551-c1fac73fc355 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"connectionname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname\",\r\n + \ \"etag\": \"W/\\\"b40614e8-41ec-4bc3-8821-07a2f67eb6b3\\\"\",\r\n \"type\": + \"Microsoft.Network/connections\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"8caef51a-c608-44d9-9a72-927672431290\",\r\n + \ \"packetCaptureDiagnosticState\": \"None\",\r\n \"virtualNetworkGateway1\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\r\n + \ },\r\n \"localNetworkGateway2\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\r\n + \ },\r\n \"connectionType\": \"IPsec\",\r\n \"connectionProtocol\": + \"IKEv2\",\r\n \"routingWeight\": 0,\r\n \"sharedKey\": \"Abc123\",\r\n + \ \"enableBgp\": false,\r\n \"useLocalAzureIpAddress\": false,\r\n \"usePolicyBasedTrafficSelectors\": + false,\r\n \"ipsecPolicies\": [],\r\n \"trafficSelectorPolicies\": [],\r\n + \ \"connectionStatus\": \"Unknown\",\r\n \"ingressBytesTransferred\": + 0,\r\n \"egressBytesTransferred\": 0,\r\n \"expressRouteGatewayBypass\": + false,\r\n \"dpdTimeoutSeconds\": 0,\r\n \"connectionMode\": \"Default\",\r\n + \ \"gatewayCustomBgpIpAddresses\": []\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1639' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 05 Nov 2021 09:07:51 GMT expires: - '-1' pragma: @@ -2429,12 +2562,64 @@ interactions: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding x-content-type-options: - nosniff x-ms-arm-service-request-id: - - de3284d7-30e3-49bc-9ba7-47c1f93ba38c + - 3f0ea444-af17-4bf5-a15b-96551a868989 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname/sharedkey?api-version=2021-05-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e031d896-8fa4-4c2b-a8e5-717c0a040db1?api-version=2021-05-01 + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 05 Nov 2021 09:07:51 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 950e485d-18de-4abb-9a36-94c0416f9d20 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1196' status: code: 200 message: OK @@ -2448,9 +2633,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0a000c9a-23ac-4729-8511-db2f1d01e863?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e031d896-8fa4-4c2b-a8e5-717c0a040db1?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2462,7 +2648,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:30:22 GMT + - Fri, 05 Nov 2021 09:08:01 GMT expires: - '-1' pragma: @@ -2479,7 +2665,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5e71b0bd-3754-43ab-a20e-a8e579e329c1 + - b8402cf9-36b1-456d-9c4e-371d9bcceac0 status: code: 200 message: OK @@ -2493,9 +2679,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0a000c9a-23ac-4729-8511-db2f1d01e863?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e031d896-8fa4-4c2b-a8e5-717c0a040db1?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2507,7 +2694,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:30:32 GMT + - Fri, 05 Nov 2021 09:08:11 GMT expires: - '-1' pragma: @@ -2524,7 +2711,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2891793c-34c0-4a13-a417-62906faaedc3 + - 0f3d32cb-4b2e-4461-831b-eff801b31d6b status: code: 200 message: OK @@ -2538,9 +2725,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0a000c9a-23ac-4729-8511-db2f1d01e863?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e031d896-8fa4-4c2b-a8e5-717c0a040db1?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2552,7 +2740,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:30:53 GMT + - Fri, 05 Nov 2021 09:08:32 GMT expires: - '-1' pragma: @@ -2569,7 +2757,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 887210b6-147b-4010-ba48-0fef1a143886 + - 52240363-0451-432b-bfed-d593b6dca81d status: code: 200 message: OK @@ -2583,9 +2771,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0a000c9a-23ac-4729-8511-db2f1d01e863?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e031d896-8fa4-4c2b-a8e5-717c0a040db1?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2597,7 +2786,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:13 GMT + - Fri, 05 Nov 2021 09:08:52 GMT expires: - '-1' pragma: @@ -2614,7 +2803,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b535f847-b645-4d15-9b09-5b92ec803bf8 + - 49cedaac-f9cc-4be1-8b8f-6a80b1fd98de status: code: 200 message: OK @@ -2628,9 +2817,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0a000c9a-23ac-4729-8511-db2f1d01e863?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e031d896-8fa4-4c2b-a8e5-717c0a040db1?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2642,7 +2832,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:55 GMT + - Fri, 05 Nov 2021 09:09:31 GMT expires: - '-1' pragma: @@ -2659,7 +2849,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e5e33c60-e763-499c-9631-62f40216a242 + - c0d69113-0cd2-4cbc-85c4-128db85f3eb9 status: code: 200 message: OK @@ -2673,9 +2863,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname/sharedkey?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname/sharedkey?api-version=2021-05-01 response: body: string: "{\r\n \"value\": \"AzureAbc123\"\r\n}" @@ -2687,7 +2878,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:56 GMT + - Fri, 05 Nov 2021 09:09:31 GMT expires: - '-1' pragma: @@ -2704,7 +2895,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 89bca373-87a2-4bcf-b8db-9f569440a41c + - 8e252e27-e2c8-431d-b741-bb09beec2260 status: code: 200 message: OK @@ -2718,25 +2909,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkpeeringname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname\"\ - ,\r\n \"etag\": \"W/\\\"fe15e9b7-2c06-44ac-b7dc-7a2887dad8c8\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - resourceGuid\": \"ca27d982-2b39-08de-31cf-8008aa22d5e6\",\r\n \"peeringState\"\ - : \"Initiated\",\r\n \"peeringSyncLevel\": \"RemoteNotInSync\",\r\n \ - \ \"remoteVirtualNetwork\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\ - \r\n },\r\n \"allowVirtualNetworkAccess\": true,\r\n \"allowForwardedTraffic\"\ - : true,\r\n \"allowGatewayTransit\": false,\r\n \"useRemoteGateways\"\ - : false,\r\n \"doNotVerifyRemoteGateways\": false,\r\n \"peerCompleteVnets\"\ - : true,\r\n \"remoteAddressSpace\": {\r\n \"addressPrefixes\": [\r\ - \n \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"remoteVirtualNetworkAddressSpace\"\ - : {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\r\n ]\r\ - \n },\r\n \"routeServiceVips\": {}\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/virtualNetworkPeerings\"\ - \r\n}" + string: "{\r\n \"name\": \"virtualnetworkpeeringname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname\",\r\n + \ \"etag\": \"W/\\\"1f15067a-e271-4f37-9b02-78ccfb52d68a\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"e4e4bce8-f246-0b02-0274-e48bf038b33c\",\r\n + \ \"peeringState\": \"Initiated\",\r\n \"peeringSyncLevel\": \"RemoteNotInSync\",\r\n + \ \"remoteVirtualNetwork\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\r\n + \ },\r\n \"allowVirtualNetworkAccess\": true,\r\n \"allowForwardedTraffic\": + true,\r\n \"allowGatewayTransit\": false,\r\n \"useRemoteGateways\": + false,\r\n \"doNotVerifyRemoteGateways\": false,\r\n \"peerCompleteVnets\": + true,\r\n \"remoteAddressSpace\": {\r\n \"addressPrefixes\": [\r\n + \ \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"remoteVirtualNetworkAddressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\r\n ]\r\n + \ },\r\n \"routeServiceVips\": {}\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/virtualNetworkPeerings\"\r\n}" headers: cache-control: - no-cache @@ -2745,9 +2935,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:56 GMT + - Fri, 05 Nov 2021 09:09:32 GMT etag: - - W/"fe15e9b7-2c06-44ac-b7dc-7a2887dad8c8" + - W/"1f15067a-e271-4f37-9b02-78ccfb52d68a" expires: - '-1' pragma: @@ -2764,7 +2954,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2fb7eb9c-342c-4168-b4a5-b07052916f0b + - deee634d-4d43-4d23-bf00-3edd213483ae status: code: 200 message: OK @@ -2778,9 +2968,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname/ServiceAssociationLinks?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname/ServiceAssociationLinks?api-version=2021-05-01 response: body: string: "{\r\n \"value\": []\r\n}" @@ -2792,7 +2983,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:57 GMT + - Fri, 05 Nov 2021 09:09:32 GMT expires: - '-1' pragma: @@ -2809,7 +3000,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6b7051d8-eeea-4626-9796-8e813a4182e4 + - 6e918534-9019-46bf-8412-dbdb9f52f640 status: code: 200 message: OK @@ -2823,9 +3014,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname/ResourceNavigationLinks?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname/ResourceNavigationLinks?api-version=2021-05-01 response: body: string: "{\r\n \"value\": []\r\n}" @@ -2837,7 +3029,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:57 GMT + - Fri, 05 Nov 2021 09:09:32 GMT expires: - '-1' pragma: @@ -2854,7 +3046,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 4bd3372c-f59d-4ae8-b43b-1f280186c0af + - 7360392b-5777-4929-a4e2-06a908e79ea5 status: code: 200 message: OK @@ -2868,9 +3060,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/CheckIPAddressAvailability?ipAddress=10.0.1.4&api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/CheckIPAddressAvailability?ipAddress=10.0.1.4&api-version=2021-05-01 response: body: string: "{\r\n \"available\": true,\r\n \"isPlatformReserved\": false\r\n}" @@ -2882,7 +3075,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:57 GMT + - Fri, 05 Nov 2021 09:09:32 GMT expires: - '-1' pragma: @@ -2899,7 +3092,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5596aa17-d316-4b0b-a29c-8976f05f2d8c + - f9ba7482-3fda-4c6f-b51e-4ab88f6d751a status: code: 200 message: OK @@ -2913,21 +3106,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"7f7c7afa-0460-4693-8d34-234fac304214\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"networkSecurityGroup\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkSecurityGroups/NRMS-kqbaonkswe7nuvirtualnetworkname-subnetname\"\ - \r\n },\r\n \"ipConfigurations\": [\r\n {\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\"\ - \r\n }\r\n ],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"85dd3e0a-493a-4d14-886c-52fa97dc740b\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"ipConfigurations\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\"\r\n + \ }\r\n ],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: cache-control: - no-cache @@ -2936,9 +3127,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:58 GMT + - Fri, 05 Nov 2021 09:09:32 GMT etag: - - W/"7f7c7afa-0460-4693-8d34-234fac304214" + - W/"85dd3e0a-493a-4d14-886c-52fa97dc740b" expires: - '-1' pragma: @@ -2955,7 +3146,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6fa6b52f-9b5b-415d-8aec-48ed23eaeea5 + - 972f11b9-faca-4b98-8073-ec536c294e7e status: code: 200 message: OK @@ -2969,39 +3160,39 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"bf57d304-465a-4815-b896-00e2ec4888b6\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"55410cc2-1709-4ec7-83ba-055e2afdef89\",\r\n \ - \ \"packetCaptureDiagnosticState\": \"None\",\r\n \"enablePrivateIpAddress\"\ - : false,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"\ - ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"etag\": \"W/\\\"bf57d304-465a-4815-b896-00e2ec4888b6\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\ - \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\ - \n \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \ - \ \"name\": \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\"\ - : 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\"\ - ,\r\n \"enableBgp\": false,\r\n \"activeActive\": false,\r\n \"bgpSettings\"\ - : {\r\n \"asn\": 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\"\ - ,\r\n \"peerWeight\": 0,\r\n \"bgpPeeringAddresses\": [\r\n \ - \ {\r\n \"ipconfigurationId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\ - \n ],\r\n \"customBgpIpAddresses\": [],\r\n \"\ - tunnelIpAddresses\": [\r\n \"23.96.4.217\"\r\n ]\r\n \ - \ }\r\n ]\r\n },\r\n \"customRoutes\": {\r\n \"addressPrefixes\"\ - : [\r\n \"101.168.0.6/32\"\r\n ]\r\n },\r\n \"vpnGatewayGeneration\"\ - : \"Generation1\",\r\n \"enableDnsForwarding\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"022cb06e-94fb-489c-87f3-4642a7abd4d9\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"ef8ecadb-db18-40b7-9785-0f625303c259\",\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"enablePrivateIpAddress\": false,\r\n \"ipConfigurations\": + [\r\n {\r\n \"name\": \"ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"etag\": \"W/\\\"022cb06e-94fb-489c-87f3-4642a7abd4d9\\\"\",\r\n + \ \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\n + \ \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \"name\": + \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\": 2\r\n },\r\n + \ \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": + false,\r\n \"activeActive\": false,\r\n \"bgpSettings\": {\r\n \"asn\": + 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\",\r\n \"peerWeight\": + 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n \"ipconfigurationId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\n ],\r\n + \ \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"20.121.0.34\"\r\n ]\r\n }\r\n ]\r\n + \ },\r\n \"customRoutes\": {\r\n \"addressPrefixes\": [\r\n \"101.168.0.6/32\"\r\n + \ ]\r\n },\r\n \"vpnGatewayGeneration\": \"Generation1\",\r\n \"enableDnsForwarding\": + false\r\n }\r\n}" headers: cache-control: - no-cache @@ -3010,7 +3201,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:58 GMT + - Fri, 05 Nov 2021 09:09:32 GMT expires: - '-1' pragma: @@ -3027,7 +3218,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b5d1a042-8055-4ad5-bd9a-7f27ef06002b + - 0228a5be-9c1d-4399-a038-968fc19c6a4e status: code: 200 message: OK @@ -3041,19 +3232,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"localnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"e00a1dff-b467-47ba-8b49-35177460489e\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/localNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"242b6de5-625d-493a-8f49-45d1b48a8fd3\",\r\n \ - \ \"localNetworkAddressSpace\": {\r\n \"addressPrefixes\": [\r\n \ - \ \"10.1.0.0/16\"\r\n ]\r\n },\r\n \"gatewayIpAddress\": \"\ - 11.12.13.14\"\r\n }\r\n}" + string: "{\r\n \"name\": \"localnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"9a729969-148d-4486-88d5-d53d86bc9dfb\\\"\",\r\n \"type\": + \"Microsoft.Network/localNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"a099dc38-929e-41d4-92c7-0fe885406543\",\r\n \"localNetworkAddressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.1.0.0/16\"\r\n ]\r\n + \ },\r\n \"gatewayIpAddress\": \"11.12.13.14\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -3062,9 +3253,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:59 GMT + - Fri, 05 Nov 2021 09:09:32 GMT etag: - - W/"e00a1dff-b467-47ba-8b49-35177460489e" + - W/"9a729969-148d-4486-88d5-d53d86bc9dfb" expires: - '-1' pragma: @@ -3081,7 +3272,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9d85072d-f937-4830-8300-df84713882a6 + - 256a07f0-8102-46d4-8406-2a830f1f4e8d status: code: 200 message: OK @@ -3095,9 +3286,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname/sharedkey?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname/sharedkey?api-version=2021-05-01 response: body: string: "{\r\n \"value\": \"AzureAbc123\"\r\n}" @@ -3109,7 +3301,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:59 GMT + - Fri, 05 Nov 2021 09:09:32 GMT expires: - '-1' pragma: @@ -3126,7 +3318,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f1cfecf6-e1c1-4603-8092-f534ac068f3e + - bccd4796-56b1-4fcf-9de2-cbf2cbbdf4bc status: code: 200 message: OK @@ -3140,67 +3332,63 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"7f7c7afa-0460-4693-8d34-234fac304214\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"718bb1c3-dc3a-480c-83fb-6936d55ea635\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\"\ - : \"GatewaySubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - ,\r\n \"etag\": \"W/\\\"7f7c7afa-0460-4693-8d34-234fac304214\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n \"ipConfigurations\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - \r\n }\r\n ],\r\n \"delegations\": [],\r\n \ - \ \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"\ - privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n },\r\n\ - \ {\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"7f7c7afa-0460-4693-8d34-234fac304214\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"networkSecurityGroup\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkSecurityGroups/NRMS-kqbaonkswe7nuvirtualnetworkname-subnetname\"\ - \r\n },\r\n \"ipConfigurations\": [\r\n {\r\n\ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\"\ - \r\n }\r\n ],\r\n \"delegations\": [],\r\n \ - \ \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"\ - privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n \ - \ ],\r\n \"virtualNetworkPeerings\": [\r\n {\r\n \"name\"\ - : \"virtualnetworkpeeringname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname\"\ - ,\r\n \"etag\": \"W/\\\"7f7c7afa-0460-4693-8d34-234fac304214\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"ca27d982-2b39-08de-31cf-8008aa22d5e6\"\ - ,\r\n \"peeringState\": \"Initiated\",\r\n \"peeringSyncLevel\"\ - : \"RemoteNotInSync\",\r\n \"remoteVirtualNetwork\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\ - \r\n },\r\n \"allowVirtualNetworkAccess\": true,\r\n \ - \ \"allowForwardedTraffic\": true,\r\n \"allowGatewayTransit\"\ - : false,\r\n \"useRemoteGateways\": false,\r\n \"doNotVerifyRemoteGateways\"\ - : false,\r\n \"peerCompleteVnets\": true,\r\n \"remoteAddressSpace\"\ - : {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\ - \r\n ]\r\n },\r\n \"remoteVirtualNetworkAddressSpace\"\ - : {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\ - \r\n ]\r\n },\r\n \"routeServiceVips\": {}\r\n\ - \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/virtualNetworkPeerings\"\ - \r\n }\r\n ],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"85dd3e0a-493a-4d14-886c-52fa97dc740b\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"e36e940a-c6b3-4730-864d-300b6dd0f024\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n + \ {\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"85dd3e0a-493a-4d14-886c-52fa97dc740b\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"ipConfigurations\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\"\r\n + \ }\r\n ],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ },\r\n {\r\n \"name\": \"GatewaySubnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\",\r\n + \ \"etag\": \"W/\\\"85dd3e0a-493a-4d14-886c-52fa97dc740b\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.1.0/24\",\r\n \"ipConfigurations\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\r\n + \ }\r\n ],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [\r\n {\r\n \"name\": + \"virtualnetworkpeeringname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname\",\r\n + \ \"etag\": \"W/\\\"85dd3e0a-493a-4d14-886c-52fa97dc740b\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"e4e4bce8-f246-0b02-0274-e48bf038b33c\",\r\n + \ \"peeringState\": \"Initiated\",\r\n \"peeringSyncLevel\": + \"RemoteNotInSync\",\r\n \"remoteVirtualNetwork\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\r\n + \ },\r\n \"allowVirtualNetworkAccess\": true,\r\n \"allowForwardedTraffic\": + true,\r\n \"allowGatewayTransit\": false,\r\n \"useRemoteGateways\": + false,\r\n \"doNotVerifyRemoteGateways\": false,\r\n \"peerCompleteVnets\": + true,\r\n \"remoteAddressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"remoteVirtualNetworkAddressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\r\n + \ ]\r\n },\r\n \"routeServiceVips\": {}\r\n },\r\n + \ \"type\": \"Microsoft.Network/virtualNetworks/virtualNetworkPeerings\"\r\n + \ }\r\n ],\r\n \"enableDdosProtection\": false\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '4664' + - '4346' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:31:59 GMT + - Fri, 05 Nov 2021 09:09:33 GMT etag: - - W/"7f7c7afa-0460-4693-8d34-234fac304214" + - W/"85dd3e0a-493a-4d14-886c-52fa97dc740b" expires: - '-1' pragma: @@ -3217,7 +3405,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ee2b7d19-ac10-4b92-a3e2-7c5679e91487 + - 5fa0bfdb-6ee6-42d2-952f-20925f76ec18 status: code: 200 message: OK @@ -3231,36 +3419,36 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"connectionname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname\"\ - ,\r\n \"etag\": \"W/\\\"7b821877-5967-4b8b-93bd-a4188f96d15a\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/connections\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"e0b220ea-656e-434d-b101-d452cf7d103e\",\r\n \"\ - packetCaptureDiagnosticState\": \"None\",\r\n \"virtualNetworkGateway1\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ - \r\n },\r\n \"localNetworkGateway2\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\ - \r\n },\r\n \"connectionType\": \"IPsec\",\r\n \"connectionProtocol\"\ - : \"IKEv2\",\r\n \"routingWeight\": 0,\r\n \"sharedKey\": \"AzureAbc123\"\ - ,\r\n \"enableBgp\": false,\r\n \"useLocalAzureIpAddress\": false,\r\ - \n \"usePolicyBasedTrafficSelectors\": false,\r\n \"ipsecPolicies\"\ - : [],\r\n \"trafficSelectorPolicies\": [],\r\n \"connectionStatus\"\ - : \"Unknown\",\r\n \"ingressBytesTransferred\": 0,\r\n \"egressBytesTransferred\"\ - : 0,\r\n \"expressRouteGatewayBypass\": false,\r\n \"dpdTimeoutSeconds\"\ - : 0,\r\n \"connectionMode\": \"Default\"\r\n }\r\n}" + string: "{\r\n \"name\": \"connectionname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname\",\r\n + \ \"etag\": \"W/\\\"de747415-e137-4958-90a8-6f94718841fa\\\"\",\r\n \"type\": + \"Microsoft.Network/connections\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"8caef51a-c608-44d9-9a72-927672431290\",\r\n + \ \"packetCaptureDiagnosticState\": \"None\",\r\n \"virtualNetworkGateway1\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\r\n + \ },\r\n \"localNetworkGateway2\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\r\n + \ },\r\n \"connectionType\": \"IPsec\",\r\n \"connectionProtocol\": + \"IKEv2\",\r\n \"routingWeight\": 0,\r\n \"sharedKey\": \"AzureAbc123\",\r\n + \ \"enableBgp\": false,\r\n \"useLocalAzureIpAddress\": false,\r\n \"usePolicyBasedTrafficSelectors\": + false,\r\n \"ipsecPolicies\": [],\r\n \"trafficSelectorPolicies\": [],\r\n + \ \"connectionStatus\": \"Unknown\",\r\n \"ingressBytesTransferred\": + 0,\r\n \"egressBytesTransferred\": 0,\r\n \"expressRouteGatewayBypass\": + false,\r\n \"dpdTimeoutSeconds\": 0,\r\n \"connectionMode\": \"Default\",\r\n + \ \"gatewayCustomBgpIpAddresses\": []\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '1604' + - '1644' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:32:00 GMT + - Fri, 05 Nov 2021 09:09:33 GMT expires: - '-1' pragma: @@ -3277,7 +3465,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 182dd79c-c588-4447-b27a-0c5e0ac002ea + - ea076564-5e1b-42ba-88fd-4a6e11ce76ed status: code: 200 message: OK @@ -3293,9 +3481,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/getAdvertisedRoutes?peer=10.0.0.2&api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/getAdvertisedRoutes?peer=10.0.0.2&api-version=2021-05-01 response: body: string: 'null' @@ -3307,11 +3496,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:32:01 GMT + - Fri, 05 Nov 2021 09:09:33 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/e0927a74-1a79-488d-b431-b6c637e66f18?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/62839112-d218-4327-bdda-f7c213463566?api-version=2021-05-01 pragma: - no-cache server: @@ -3322,7 +3511,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ef2412da-5ed6-49bc-b947-45fc2a06ae52 + - 854c22a0-2e78-477e-aa2b-f7073989d5a4 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -3338,9 +3527,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/e0927a74-1a79-488d-b431-b6c637e66f18?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/62839112-d218-4327-bdda-f7c213463566?api-version=2021-05-01 response: body: string: "{\r\n \"value\": [\r\n {\r\n \"localAddress\": \"\",\r\n \ @@ -3355,11 +3545,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:32:11 GMT + - Fri, 05 Nov 2021 09:09:44 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/e0927a74-1a79-488d-b431-b6c637e66f18?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/62839112-d218-4327-bdda-f7c213463566?api-version=2021-05-01 pragma: - no-cache server: @@ -3374,7 +3564,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ef2412da-5ed6-49bc-b947-45fc2a06ae52 + - 854c22a0-2e78-477e-aa2b-f7073989d5a4 status: code: 200 message: OK @@ -3390,9 +3580,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/getBgpPeerStatus?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/getBgpPeerStatus?api-version=2021-05-01 response: body: string: 'null' @@ -3404,11 +3595,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:32:12 GMT + - Fri, 05 Nov 2021 09:09:44 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/6c1af3cd-847f-4b8a-a20e-918c2285ddac?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/000af918-ec99-4e4b-8b05-e0c47f7acffa?api-version=2021-05-01 pragma: - no-cache server: @@ -3419,7 +3610,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b04df1e4-0026-4fac-9d57-d086ccfd4d77 + - 974960c7-80d1-4d8a-bfd2-5d8007c0979a x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -3435,9 +3626,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/6c1af3cd-847f-4b8a-a20e-918c2285ddac?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/000af918-ec99-4e4b-8b05-e0c47f7acffa?api-version=2021-05-01 response: body: string: "{\r\n \"value\": []\r\n}" @@ -3449,11 +3641,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:32:22 GMT + - Fri, 05 Nov 2021 09:09:54 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/6c1af3cd-847f-4b8a-a20e-918c2285ddac?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/000af918-ec99-4e4b-8b05-e0c47f7acffa?api-version=2021-05-01 pragma: - no-cache server: @@ -3468,7 +3660,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b04df1e4-0026-4fac-9d57-d086ccfd4d77 + - 974960c7-80d1-4d8a-bfd2-5d8007c0979a status: code: 200 message: OK @@ -3484,9 +3676,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/getLearnedRoutes?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/getLearnedRoutes?api-version=2021-05-01 response: body: string: 'null' @@ -3498,11 +3691,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:32:22 GMT + - Fri, 05 Nov 2021 09:09:55 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/ee19be9e-3333-450d-9c28-41a02e6e70e5?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/26bd1826-383a-4ae9-9fb9-7161870c5466?api-version=2021-05-01 pragma: - no-cache server: @@ -3513,7 +3706,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 039e373e-f669-458a-8b95-cd37a1f01af4 + - 4076ba1c-e1eb-4cc1-aa67-19bb4e7fe48d x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -3529,9 +3722,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/ee19be9e-3333-450d-9c28-41a02e6e70e5?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/26bd1826-383a-4ae9-9fb9-7161870c5466?api-version=2021-05-01 response: body: string: "{\r\n \"value\": []\r\n}" @@ -3543,11 +3737,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:32:33 GMT + - Fri, 05 Nov 2021 09:10:05 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/ee19be9e-3333-450d-9c28-41a02e6e70e5?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/26bd1826-383a-4ae9-9fb9-7161870c5466?api-version=2021-05-01 pragma: - no-cache server: @@ -3562,7 +3756,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 039e373e-f669-458a-8b95-cd37a1f01af4 + - 4076ba1c-e1eb-4cc1-aa67-19bb4e7fe48d status: code: 200 message: OK @@ -3580,25 +3774,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname/sharedkey/reset?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname/sharedkey/reset?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5c3f80c7-7a34-4afd-af12-d18154bea17b?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3708928e-b574-4063-a607-0c7187e60ace?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 06:32:34 GMT + - Fri, 05 Nov 2021 09:10:05 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/5c3f80c7-7a34-4afd-af12-d18154bea17b?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/3708928e-b574-4063-a607-0c7187e60ace?api-version=2021-05-01 pragma: - no-cache server: @@ -3609,7 +3804,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 56543ef5-ff21-499b-9718-85f3ea8d9fe9 + - f179b690-d098-4d39-8458-2e084ba7a31d x-ms-ratelimit-remaining-subscription-writes: - '1196' status: @@ -3625,9 +3820,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5c3f80c7-7a34-4afd-af12-d18154bea17b?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3708928e-b574-4063-a607-0c7187e60ace?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3639,7 +3835,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:32:45 GMT + - Fri, 05 Nov 2021 09:10:15 GMT expires: - '-1' pragma: @@ -3656,7 +3852,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c182d9d2-bad2-456b-8b19-8e6c5bae55ac + - 463a2f5c-eaf3-44f5-9773-5c2044dfaf5f status: code: 200 message: OK @@ -3670,9 +3866,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5c3f80c7-7a34-4afd-af12-d18154bea17b?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3708928e-b574-4063-a607-0c7187e60ace?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3684,7 +3881,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:32:55 GMT + - Fri, 05 Nov 2021 09:10:25 GMT expires: - '-1' pragma: @@ -3701,7 +3898,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0ac8eee0-2186-43ce-8ff8-e70c8930c806 + - fcabe9bb-dbaa-476d-a3cb-d7a7ba7809e8 status: code: 200 message: OK @@ -3715,9 +3912,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5c3f80c7-7a34-4afd-af12-d18154bea17b?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3708928e-b574-4063-a607-0c7187e60ace?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\",\r\n \"properties\": {}\r\n}" @@ -3729,7 +3927,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:33:17 GMT + - Fri, 05 Nov 2021 09:10:45 GMT expires: - '-1' pragma: @@ -3746,7 +3944,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e655da71-f9a2-4153-b11e-3f1b82c2e73d + - 535ac198-d334-43b7-8dd9-eb2e432ca51d status: code: 200 message: OK @@ -3760,15 +3958,16 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/5c3f80c7-7a34-4afd-af12-d18154bea17b?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/3708928e-b574-4063-a607-0c7187e60ace?api-version=2021-05-01 response: body: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5c3f80c7-7a34-4afd-af12-d18154bea17b?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3708928e-b574-4063-a607-0c7187e60ace?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -3776,11 +3975,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:33:17 GMT + - Fri, 05 Nov 2021 09:10:45 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/5c3f80c7-7a34-4afd-af12-d18154bea17b?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/3708928e-b574-4063-a607-0c7187e60ace?api-version=2021-05-01 pragma: - no-cache server: @@ -3795,7 +3994,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 56543ef5-ff21-499b-9718-85f3ea8d9fe9 + - f179b690-d098-4d39-8458-2e084ba7a31d status: code: 200 message: OK @@ -3811,25 +4010,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/reset?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/reset?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 06:33:18 GMT + - Fri, 05 Nov 2021 09:10:45 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 pragma: - no-cache server: @@ -3840,7 +4040,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - aacc745e-5591-49ac-8e76-581bd0c07356 + - 48be45f0-7165-4a47-bc02-68e30a122500 x-ms-ratelimit-remaining-subscription-writes: - '1195' status: @@ -3856,9 +4056,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3870,7 +4071,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:33:28 GMT + - Fri, 05 Nov 2021 09:10:55 GMT expires: - '-1' pragma: @@ -3887,7 +4088,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 87ed4808-589d-4fef-b3f3-cab966f27812 + - 25dfba2e-46e6-470e-a042-80fd706fd606 status: code: 200 message: OK @@ -3901,9 +4102,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3915,7 +4117,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:33:39 GMT + - Fri, 05 Nov 2021 09:11:06 GMT expires: - '-1' pragma: @@ -3932,7 +4134,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 818504f3-4a03-4bc4-be09-8732bb6b52f0 + - 4e143e8e-d803-41ef-bb1e-b950364af675 status: code: 200 message: OK @@ -3946,9 +4148,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3960,7 +4163,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:33:59 GMT + - Fri, 05 Nov 2021 09:11:26 GMT expires: - '-1' pragma: @@ -3977,7 +4180,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9b2d9aab-a269-4b82-9fb9-06ce374a5fd3 + - 67bd06d1-f47a-475b-826c-99a1cc34eac5 status: code: 200 message: OK @@ -3991,9 +4194,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4005,7 +4209,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:34:39 GMT + - Fri, 05 Nov 2021 09:12:06 GMT expires: - '-1' pragma: @@ -4022,7 +4226,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 836f4e5e-020e-4803-b7b3-2de15ff7ce5c + - 6e72d4f2-cfcf-4a72-ac3c-c67721b6b82f status: code: 200 message: OK @@ -4036,9 +4240,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4050,7 +4255,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:36:00 GMT + - Fri, 05 Nov 2021 09:13:27 GMT expires: - '-1' pragma: @@ -4067,7 +4272,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 008b6fec-0596-47dc-919f-1a5ae344d751 + - 3f2c8404-76b5-4215-84d1-b1f70debb4ed status: code: 200 message: OK @@ -4081,9 +4286,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4095,7 +4301,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:38:41 GMT + - Fri, 05 Nov 2021 09:16:07 GMT expires: - '-1' pragma: @@ -4112,7 +4318,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2f5e15a2-32f2-4983-8aab-e77f63a187ec + - f98922f4-777c-4dd8-8ccf-4241a3c37361 status: code: 200 message: OK @@ -4126,9 +4332,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4140,7 +4347,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:40:21 GMT + - Fri, 05 Nov 2021 09:17:47 GMT expires: - '-1' pragma: @@ -4157,7 +4364,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e1aad60f-69d9-4d44-9e97-6940e7d4e175 + - bcd12733-5311-4756-a216-deac54097311 status: code: 200 message: OK @@ -4171,9 +4378,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4185,7 +4393,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:42:02 GMT + - Fri, 05 Nov 2021 09:19:27 GMT expires: - '-1' pragma: @@ -4202,7 +4410,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 4bb351de-424c-407f-ab77-f04f2e455a0e + - d7af6d83-92fe-4421-a4cd-f2c4c83cca87 status: code: 200 message: OK @@ -4216,9 +4424,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4230,7 +4439,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:43:43 GMT + - Fri, 05 Nov 2021 09:21:07 GMT expires: - '-1' pragma: @@ -4247,7 +4456,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 389ecb63-7489-4585-b627-05afad81d754 + - 6f80f541-84c1-4a62-aa64-3c42957ea444 status: code: 200 message: OK @@ -4261,9 +4470,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4275,7 +4485,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:45:23 GMT + - Fri, 05 Nov 2021 09:22:48 GMT expires: - '-1' pragma: @@ -4292,7 +4502,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a9e62c67-2ea4-42c1-9f1a-c9fdde164d0a + - a81bbf23-ca1b-4fd4-97b2-7c24ac458df9 status: code: 200 message: OK @@ -4306,9 +4516,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\",\r\n \"properties\": {}\r\n}" @@ -4320,7 +4531,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:47:04 GMT + - Fri, 05 Nov 2021 09:24:28 GMT expires: - '-1' pragma: @@ -4337,7 +4548,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7d94f1e9-fbd3-45fb-816a-1b1bc513e99a + - b4698a02-b631-4abf-8bd3-b7c4824ed1c7 status: code: 200 message: OK @@ -4351,15 +4562,16 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 response: body: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -4367,11 +4579,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:47:04 GMT + - Fri, 05 Nov 2021 09:24:28 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/5e19a21f-8a1a-4d3a-9ab4-831cc168ef30?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/84c5a94c-5b78-4cfc-a562-dde293b00083?api-version=2021-05-01 pragma: - no-cache server: @@ -4386,7 +4598,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - aacc745e-5591-49ac-8e76-581bd0c07356 + - 48be45f0-7165-4a47-bc02-68e30a122500 status: code: 200 message: OK @@ -4404,45 +4616,44 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"931ed2c8-85e0-4a75-8643-411479ef9f68\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\"\ - : \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Updating\",\r\n \"resourceGuid\": \"55410cc2-1709-4ec7-83ba-055e2afdef89\"\ - ,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \"enablePrivateIpAddress\"\ - : false,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"\ - ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"etag\": \"W/\\\"931ed2c8-85e0-4a75-8643-411479ef9f68\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\ - \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\ - \n \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \ - \ \"name\": \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\"\ - : 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\"\ - ,\r\n \"enableBgp\": false,\r\n \"activeActive\": false,\r\n \"vpnClientConfiguration\"\ - : {\r\n \"vpnClientProtocols\": [\r\n \"OpenVPN\",\r\n \ - \ \"IkeV2\"\r\n ],\r\n \"vpnAuthenticationTypes\": [],\r\n \ - \ \"vpnClientRootCertificates\": [],\r\n \"vpnClientRevokedCertificates\"\ - : [],\r\n \"radiusServers\": [],\r\n \"vpnClientIpsecPolicies\"\ - : []\r\n },\r\n \"bgpSettings\": {\r\n \"asn\": 65515,\r\n \ - \ \"bgpPeeringAddress\": \"10.0.1.30\",\r\n \"peerWeight\": 0,\r\n \ - \ \"bgpPeeringAddresses\": [\r\n {\r\n \"ipconfigurationId\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\ - \n ],\r\n \"customBgpIpAddresses\": [],\r\n \"\ - tunnelIpAddresses\": [\r\n \"23.96.4.217\"\r\n ]\r\n \ - \ }\r\n ]\r\n },\r\n \"customRoutes\": {\r\n \"addressPrefixes\"\ - : [\r\n \"101.168.0.6/32\"\r\n ]\r\n },\r\n \"vpnGatewayGeneration\"\ - : \"Generation1\",\r\n \"enableDnsForwarding\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"257bac5e-ee52-4198-9588-3032e2ecf20b\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"ef8ecadb-db18-40b7-9785-0f625303c259\",\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"enablePrivateIpAddress\": false,\r\n \"ipConfigurations\": + [\r\n {\r\n \"name\": \"ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"etag\": \"W/\\\"257bac5e-ee52-4198-9588-3032e2ecf20b\\\"\",\r\n + \ \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\n + \ \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \"name\": + \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\": 2\r\n },\r\n + \ \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": + false,\r\n \"activeActive\": false,\r\n \"vpnClientConfiguration\": + {\r\n \"vpnClientProtocols\": [\r\n \"OpenVPN\",\r\n \"IkeV2\"\r\n + \ ],\r\n \"vpnAuthenticationTypes\": [],\r\n \"vpnClientRootCertificates\": + [],\r\n \"vpnClientRevokedCertificates\": [],\r\n \"radiusServers\": + [],\r\n \"vpnClientIpsecPolicies\": []\r\n },\r\n \"bgpSettings\": + {\r\n \"asn\": 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\",\r\n + \ \"peerWeight\": 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n + \ \"ipconfigurationId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\n ],\r\n + \ \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"20.121.0.34\"\r\n ]\r\n }\r\n ]\r\n + \ },\r\n \"customRoutes\": {\r\n \"addressPrefixes\": [\r\n \"101.168.0.6/32\"\r\n + \ ]\r\n },\r\n \"vpnGatewayGeneration\": \"Generation1\",\r\n \"enableDnsForwarding\": + false\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -4453,7 +4664,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:47:09 GMT + - Fri, 05 Nov 2021 09:24:29 GMT expires: - '-1' pragma: @@ -4470,9 +4681,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 4024c3c1-e97b-4dc7-adbd-6bcae63a5564 + - d8e49495-8ef4-493a-a098-672cdfc2caf7 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1195' status: code: 200 message: OK @@ -4486,40 +4697,40 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"931ed2c8-85e0-4a75-8643-411479ef9f68\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\"\ - : \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Updating\",\r\n \"resourceGuid\": \"55410cc2-1709-4ec7-83ba-055e2afdef89\"\ - ,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \"enablePrivateIpAddress\"\ - : false,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"\ - ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"etag\": \"W/\\\"931ed2c8-85e0-4a75-8643-411479ef9f68\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\ - \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\ - \n \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \ - \ \"name\": \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\"\ - : 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\"\ - ,\r\n \"enableBgp\": false,\r\n \"activeActive\": false,\r\n \"bgpSettings\"\ - : {\r\n \"asn\": 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\"\ - ,\r\n \"peerWeight\": 0,\r\n \"bgpPeeringAddresses\": [\r\n \ - \ {\r\n \"ipconfigurationId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\ - \n ],\r\n \"customBgpIpAddresses\": [],\r\n \"\ - tunnelIpAddresses\": [\r\n \"23.96.4.217\"\r\n ]\r\n \ - \ }\r\n ]\r\n },\r\n \"customRoutes\": {\r\n \"addressPrefixes\"\ - : [\r\n \"101.168.0.6/32\"\r\n ]\r\n },\r\n \"vpnGatewayGeneration\"\ - : \"Generation1\",\r\n \"enableDnsForwarding\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"257bac5e-ee52-4198-9588-3032e2ecf20b\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"ef8ecadb-db18-40b7-9785-0f625303c259\",\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"enablePrivateIpAddress\": false,\r\n \"ipConfigurations\": + [\r\n {\r\n \"name\": \"ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"etag\": \"W/\\\"257bac5e-ee52-4198-9588-3032e2ecf20b\\\"\",\r\n + \ \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\n + \ \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \"name\": + \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\": 2\r\n },\r\n + \ \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": + false,\r\n \"activeActive\": false,\r\n \"bgpSettings\": {\r\n \"asn\": + 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\",\r\n \"peerWeight\": + 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n \"ipconfigurationId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\n ],\r\n + \ \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"20.121.0.34\"\r\n ]\r\n }\r\n ]\r\n + \ },\r\n \"customRoutes\": {\r\n \"addressPrefixes\": [\r\n \"101.168.0.6/32\"\r\n + \ ]\r\n },\r\n \"vpnGatewayGeneration\": \"Generation1\",\r\n \"enableDnsForwarding\": + false\r\n }\r\n}" headers: cache-control: - no-cache @@ -4528,7 +4739,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:47:19 GMT + - Fri, 05 Nov 2021 09:24:39 GMT expires: - '-1' pragma: @@ -4545,7 +4756,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8e192cf6-3c1c-46b6-9c87-d087afe1a8c8 + - 3d2cdfe0-6df3-476a-88d0-104d3a939f2d status: code: 200 message: OK @@ -4559,40 +4770,40 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"931ed2c8-85e0-4a75-8643-411479ef9f68\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\"\ - : \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Updating\",\r\n \"resourceGuid\": \"55410cc2-1709-4ec7-83ba-055e2afdef89\"\ - ,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \"enablePrivateIpAddress\"\ - : false,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"\ - ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"etag\": \"W/\\\"931ed2c8-85e0-4a75-8643-411479ef9f68\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\ - \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\ - \n \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \ - \ \"name\": \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\"\ - : 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\"\ - ,\r\n \"enableBgp\": false,\r\n \"activeActive\": false,\r\n \"bgpSettings\"\ - : {\r\n \"asn\": 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\"\ - ,\r\n \"peerWeight\": 0,\r\n \"bgpPeeringAddresses\": [\r\n \ - \ {\r\n \"ipconfigurationId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\ - \n ],\r\n \"customBgpIpAddresses\": [],\r\n \"\ - tunnelIpAddresses\": [\r\n \"23.96.4.217\"\r\n ]\r\n \ - \ }\r\n ]\r\n },\r\n \"customRoutes\": {\r\n \"addressPrefixes\"\ - : [\r\n \"101.168.0.6/32\"\r\n ]\r\n },\r\n \"vpnGatewayGeneration\"\ - : \"Generation1\",\r\n \"enableDnsForwarding\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"257bac5e-ee52-4198-9588-3032e2ecf20b\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"ef8ecadb-db18-40b7-9785-0f625303c259\",\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"enablePrivateIpAddress\": false,\r\n \"ipConfigurations\": + [\r\n {\r\n \"name\": \"ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"etag\": \"W/\\\"257bac5e-ee52-4198-9588-3032e2ecf20b\\\"\",\r\n + \ \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\n + \ \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \"name\": + \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\": 2\r\n },\r\n + \ \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": + false,\r\n \"activeActive\": false,\r\n \"bgpSettings\": {\r\n \"asn\": + 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\",\r\n \"peerWeight\": + 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n \"ipconfigurationId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\n ],\r\n + \ \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"20.121.0.34\"\r\n ]\r\n }\r\n ]\r\n + \ },\r\n \"customRoutes\": {\r\n \"addressPrefixes\": [\r\n \"101.168.0.6/32\"\r\n + \ ]\r\n },\r\n \"vpnGatewayGeneration\": \"Generation1\",\r\n \"enableDnsForwarding\": + false\r\n }\r\n}" headers: cache-control: - no-cache @@ -4601,7 +4812,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:47:49 GMT + - Fri, 05 Nov 2021 09:25:10 GMT expires: - '-1' pragma: @@ -4618,7 +4829,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8bf6c7c0-8895-4ab7-9ebc-5ab49a95890e + - 4bb8d268-faeb-4edc-9312-3b6986e40141 status: code: 200 message: OK @@ -4632,40 +4843,40 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"16c24795-2ea5-4004-882e-463e441c96a1\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\"\ - : \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Succeeded\",\r\n \"resourceGuid\": \"55410cc2-1709-4ec7-83ba-055e2afdef89\"\ - ,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \"enablePrivateIpAddress\"\ - : false,\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": \"\ - ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"etag\": \"W/\\\"16c24795-2ea5-4004-882e-463e441c96a1\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\ - \r\n },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\ - \n \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \ - \ \"name\": \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\"\ - : 2\r\n },\r\n \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\"\ - ,\r\n \"enableBgp\": false,\r\n \"activeActive\": false,\r\n \"bgpSettings\"\ - : {\r\n \"asn\": 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\"\ - ,\r\n \"peerWeight\": 0,\r\n \"bgpPeeringAddresses\": [\r\n \ - \ {\r\n \"ipconfigurationId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - ,\r\n \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\ - \n ],\r\n \"customBgpIpAddresses\": [],\r\n \"\ - tunnelIpAddresses\": [\r\n \"23.96.4.217\"\r\n ]\r\n \ - \ }\r\n ]\r\n },\r\n \"customRoutes\": {\r\n \"addressPrefixes\"\ - : [\r\n \"101.168.0.6/32\"\r\n ]\r\n },\r\n \"vpnGatewayGeneration\"\ - : \"Generation1\",\r\n \"enableDnsForwarding\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"949dc127-61f5-45f7-af05-5218b572933e\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"ef8ecadb-db18-40b7-9785-0f625303c259\",\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"enablePrivateIpAddress\": false,\r\n \"ipConfigurations\": + [\r\n {\r\n \"name\": \"ipconfig\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"etag\": \"W/\\\"949dc127-61f5-45f7-af05-5218b572933e\\\"\",\r\n + \ \"type\": \"Microsoft.Network/virtualNetworkGateways/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipname\"\r\n + \ },\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"natRules\": [],\r\n + \ \"enableBgpRouteTranslationForNat\": false,\r\n \"sku\": {\r\n \"name\": + \"VpnGw1\",\r\n \"tier\": \"VpnGw1\",\r\n \"capacity\": 2\r\n },\r\n + \ \"gatewayType\": \"Vpn\",\r\n \"vpnType\": \"RouteBased\",\r\n \"enableBgp\": + false,\r\n \"activeActive\": false,\r\n \"bgpSettings\": {\r\n \"asn\": + 65515,\r\n \"bgpPeeringAddress\": \"10.0.1.30\",\r\n \"peerWeight\": + 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n \"ipconfigurationId\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\",\r\n + \ \"defaultBgpIpAddresses\": [\r\n \"10.0.1.30\"\r\n ],\r\n + \ \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"20.121.0.34\"\r\n ]\r\n }\r\n ]\r\n + \ },\r\n \"customRoutes\": {\r\n \"addressPrefixes\": [\r\n \"101.168.0.6/32\"\r\n + \ ]\r\n },\r\n \"vpnGatewayGeneration\": \"Generation1\",\r\n \"enableDnsForwarding\": + false\r\n }\r\n}" headers: cache-control: - no-cache @@ -4674,7 +4885,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:48:20 GMT + - Fri, 05 Nov 2021 09:25:40 GMT expires: - '-1' pragma: @@ -4691,7 +4902,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c27cb3b0-ef65-4fd9-a198-bea908c93f47 + - 5b92c3e3-d2af-4af0-a0e6-af80a98dd82d status: code: 200 message: OK @@ -4709,20 +4920,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"localnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\ - ,\r\n \"etag\": \"W/\\\"e28de107-6bc3-46d0-bf9d-2a10b5544558\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/localNetworkGateways\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\"\ - : \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Succeeded\",\r\n \"resourceGuid\": \"242b6de5-625d-493a-8f49-45d1b48a8fd3\"\ - ,\r\n \"localNetworkAddressSpace\": {\r\n \"addressPrefixes\": [\r\ - \n \"10.1.0.0/16\"\r\n ]\r\n },\r\n \"gatewayIpAddress\"\ - : \"11.12.13.14\"\r\n }\r\n}" + string: "{\r\n \"name\": \"localnetworkgatewayname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\",\r\n + \ \"etag\": \"W/\\\"677d7503-dba7-4be1-9e2c-2b2c09d690de\\\"\",\r\n \"type\": + \"Microsoft.Network/localNetworkGateways\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"a099dc38-929e-41d4-92c7-0fe885406543\",\r\n \"localNetworkAddressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.1.0.0/16\"\r\n ]\r\n + \ },\r\n \"gatewayIpAddress\": \"11.12.13.14\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -4733,7 +4944,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:48:23 GMT + - Fri, 05 Nov 2021 09:25:41 GMT expires: - '-1' pragma: @@ -4750,7 +4961,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f49ccb62-b3c3-414e-8966-1f6c03c60a3b + - 55970cb5-7117-493a-87b2-fb3717a0bff1 x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -4770,68 +4981,65 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"a00ca2ff-4b6b-4b57-ae56-02b547225f6b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"718bb1c3-dc3a-480c-83fb-6936d55ea635\",\r\n \ - \ \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\"\ - : \"GatewaySubnet\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\"\ - ,\r\n \"etag\": \"W/\\\"a00ca2ff-4b6b-4b57-ae56-02b547225f6b\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n \"ipConfigurations\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\ - \r\n }\r\n ],\r\n \"delegations\": [],\r\n \ - \ \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"\ - privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n },\r\n\ - \ {\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"a00ca2ff-4b6b-4b57-ae56-02b547225f6b\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"networkSecurityGroup\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkSecurityGroups/NRMS-kqbaonkswe7nuvirtualnetworkname-subnetname\"\ - \r\n },\r\n \"ipConfigurations\": [\r\n {\r\n\ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\"\ - \r\n }\r\n ],\r\n \"delegations\": [],\r\n \ - \ \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"\ - privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n \ - \ ],\r\n \"virtualNetworkPeerings\": [\r\n {\r\n \"name\"\ - : \"virtualnetworkpeeringname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname\"\ - ,\r\n \"etag\": \"W/\\\"a00ca2ff-4b6b-4b57-ae56-02b547225f6b\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"ca27d982-2b39-08de-31cf-8008aa22d5e6\"\ - ,\r\n \"peeringState\": \"Initiated\",\r\n \"peeringSyncLevel\"\ - : \"RemoteNotInSync\",\r\n \"remoteVirtualNetwork\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\ - \r\n },\r\n \"allowVirtualNetworkAccess\": true,\r\n \ - \ \"allowForwardedTraffic\": true,\r\n \"allowGatewayTransit\"\ - : false,\r\n \"useRemoteGateways\": false,\r\n \"doNotVerifyRemoteGateways\"\ - : false,\r\n \"peerCompleteVnets\": true,\r\n \"remoteAddressSpace\"\ - : {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\ - \r\n ]\r\n },\r\n \"remoteVirtualNetworkAddressSpace\"\ - : {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\ - \r\n ]\r\n },\r\n \"routeServiceVips\": {}\r\n\ - \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/virtualNetworkPeerings\"\ - \r\n }\r\n ],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"61c4962b-6642-44fa-b8a4-acc6c6aa4d16\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"e36e940a-c6b3-4730-864d-300b6dd0f024\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnetname\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"61c4962b-6642-44fa-b8a4-acc6c6aa4d16\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"ipConfigurations\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename/ipConfigurations/ipconfig\"\r\n + \ }\r\n ],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ },\r\n {\r\n \"name\": \"GatewaySubnet\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/GatewaySubnet\",\r\n + \ \"etag\": \"W/\\\"61c4962b-6642-44fa-b8a4-acc6c6aa4d16\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.1.0/24\",\r\n \"ipConfigurations\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname/ipConfigurations/ipconfig\"\r\n + \ }\r\n ],\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [\r\n {\r\n \"name\": + \"virtualnetworkpeeringname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname\",\r\n + \ \"etag\": \"W/\\\"61c4962b-6642-44fa-b8a4-acc6c6aa4d16\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"e4e4bce8-f246-0b02-0274-e48bf038b33c\",\r\n + \ \"peeringState\": \"Initiated\",\r\n \"peeringSyncLevel\": + \"RemoteNotInSync\",\r\n \"remoteVirtualNetwork\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\r\n + \ },\r\n \"allowVirtualNetworkAccess\": true,\r\n \"allowForwardedTraffic\": + true,\r\n \"allowGatewayTransit\": false,\r\n \"useRemoteGateways\": + false,\r\n \"doNotVerifyRemoteGateways\": false,\r\n \"peerCompleteVnets\": + true,\r\n \"remoteAddressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"remoteVirtualNetworkAddressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.2.0.0/16\"\r\n + \ ]\r\n },\r\n \"routeServiceVips\": {}\r\n },\r\n + \ \"type\": \"Microsoft.Network/virtualNetworks/virtualNetworkPeerings\"\r\n + \ }\r\n ],\r\n \"enableDdosProtection\": false\r\n }\r\n}" headers: azure-asyncnotification: - Enabled cache-control: - no-cache content-length: - - '4728' + - '4410' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:48:26 GMT + - Fri, 05 Nov 2021 09:25:42 GMT expires: - '-1' pragma: @@ -4848,7 +5056,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5f5e30c0-7809-476a-aec5-67211c37a492 + - 77d7b9bc-4ee0-40e4-82f5-b4f22ba63ff3 x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -4868,38 +5076,38 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"connectionname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname\"\ - ,\r\n \"etag\": \"W/\\\"859d9361-b329-4ca1-810d-c22831357038\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/connections\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"e0b220ea-656e-434d-b101-d452cf7d103e\",\r\n \"\ - packetCaptureDiagnosticState\": \"None\",\r\n \"virtualNetworkGateway1\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\ - \r\n },\r\n \"localNetworkGateway2\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\ - \r\n },\r\n \"connectionType\": \"IPsec\",\r\n \"connectionProtocol\"\ - : \"IKEv2\",\r\n \"routingWeight\": 0,\r\n \"sharedKey\": \"FvfqcirMGheMNR9JyStLFgtarFGQguHXqgULU5LOOME3xw1v7wuEfgdVTtNPFlOQ7fNq7w9ofwoF6bNnC4JXEH7bScwNzB2ZESm2mOsQPsATufVcGOshqaJLAoMTCL8J\"\ - ,\r\n \"enableBgp\": false,\r\n \"useLocalAzureIpAddress\": false,\r\ - \n \"usePolicyBasedTrafficSelectors\": false,\r\n \"ipsecPolicies\"\ - : [],\r\n \"trafficSelectorPolicies\": [],\r\n \"ingressBytesTransferred\"\ - : 0,\r\n \"egressBytesTransferred\": 0,\r\n \"expressRouteGatewayBypass\"\ - : false,\r\n \"dpdTimeoutSeconds\": 0,\r\n \"connectionMode\": \"Default\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"connectionname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname\",\r\n + \ \"etag\": \"W/\\\"fc2284a2-b201-443f-8bc6-0105f40e86ee\\\"\",\r\n \"type\": + \"Microsoft.Network/connections\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"8caef51a-c608-44d9-9a72-927672431290\",\r\n + \ \"packetCaptureDiagnosticState\": \"None\",\r\n \"virtualNetworkGateway1\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname\"\r\n + \ },\r\n \"localNetworkGateway2\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname\"\r\n + \ },\r\n \"connectionType\": \"IPsec\",\r\n \"connectionProtocol\": + \"IKEv2\",\r\n \"routingWeight\": 0,\r\n \"sharedKey\": \"FddlqTOd8xXSJ94X83vDeja1nrPbrXSCdPiPmrGfCQK5Bh4u7Hc3LcHmrWSY2aV01ClS444rQjcaC2Qill0JTseRzeFXf31Teb9vjSCAdU0J34Wik2fKkc0qptv76nQI\",\r\n + \ \"enableBgp\": false,\r\n \"useLocalAzureIpAddress\": false,\r\n \"usePolicyBasedTrafficSelectors\": + false,\r\n \"ipsecPolicies\": [],\r\n \"trafficSelectorPolicies\": [],\r\n + \ \"ingressBytesTransferred\": 0,\r\n \"egressBytesTransferred\": 0,\r\n + \ \"expressRouteGatewayBypass\": false,\r\n \"dpdTimeoutSeconds\": 0,\r\n + \ \"connectionMode\": \"Default\",\r\n \"gatewayCustomBgpIpAddresses\": + []\r\n }\r\n}" headers: azure-asyncnotification: - Enabled cache-control: - no-cache content-length: - - '1685' + - '1725' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:48:30 GMT + - Fri, 05 Nov 2021 09:25:44 GMT expires: - '-1' pragma: @@ -4916,7 +5124,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c5c777db-2958-4603-abe1-cf434daedfb1 + - dfe37c08-85f9-45fc-8202-29ff20d4a3fe x-ms-ratelimit-remaining-subscription-writes: - '1196' status: @@ -4934,9 +5142,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/connections/connectionname?api-version=2021-05-01 response: body: string: '' @@ -4944,17 +5153,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5669af5c-6259-40fb-a0f9-81a7bc403f86?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/56cb03ab-1093-4861-9c54-25041834e068?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 06:48:30 GMT + - Fri, 05 Nov 2021 09:25:44 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/5669af5c-6259-40fb-a0f9-81a7bc403f86?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/56cb03ab-1093-4861-9c54-25041834e068?api-version=2021-05-01 pragma: - no-cache server: @@ -4965,7 +5174,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f8e6306c-a30c-4041-aed1-45b547a14508 + - 049e02ca-7c81-4c51-b528-e167f9ce334a x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -4981,9 +5190,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5669af5c-6259-40fb-a0f9-81a7bc403f86?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/56cb03ab-1093-4861-9c54-25041834e068?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4995,7 +5205,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:48:42 GMT + - Fri, 05 Nov 2021 09:25:54 GMT expires: - '-1' pragma: @@ -5012,7 +5222,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3ac822d9-6ba2-44e3-8695-62a2e8104967 + - 0b81c893-9b3a-4208-8396-30baab4a0a39 status: code: 200 message: OK @@ -5026,9 +5236,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5669af5c-6259-40fb-a0f9-81a7bc403f86?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/56cb03ab-1093-4861-9c54-25041834e068?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -5040,7 +5251,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:48:52 GMT + - Fri, 05 Nov 2021 09:26:04 GMT expires: - '-1' pragma: @@ -5057,7 +5268,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1182f8ef-2d9d-4ca4-94c3-2ea960433546 + - 32167065-962e-4f11-883b-f03cd07eedaf status: code: 200 message: OK @@ -5071,9 +5282,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5669af5c-6259-40fb-a0f9-81a7bc403f86?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/56cb03ab-1093-4861-9c54-25041834e068?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -5085,7 +5297,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:49:12 GMT + - Fri, 05 Nov 2021 09:26:24 GMT expires: - '-1' pragma: @@ -5102,7 +5314,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 666d9af9-daca-491b-b9e8-a7d8b4793d5a + - cded6162-3dc1-4712-b393-8bcb7b062ade status: code: 200 message: OK @@ -5118,25 +5330,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/virtualNetworkPeerings/virtualnetworkpeeringname?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a028e2b6-8be7-4c29-9245-a56aa483430c?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/179292dc-e017-4b44-8b17-f8b852f6d2f6?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 06:49:13 GMT + - Fri, 05 Nov 2021 09:26:25 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/a028e2b6-8be7-4c29-9245-a56aa483430c?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/179292dc-e017-4b44-8b17-f8b852f6d2f6?api-version=2021-05-01 pragma: - no-cache server: @@ -5147,7 +5360,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cc0d93de-28d6-4cd1-88c6-bbbf5daf7e7f + - fb8b33c2-9f2a-4bfb-9107-34574e199fb0 x-ms-ratelimit-remaining-subscription-deletes: - '14998' status: @@ -5163,9 +5376,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a028e2b6-8be7-4c29-9245-a56aa483430c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/179292dc-e017-4b44-8b17-f8b852f6d2f6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -5177,7 +5391,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:49:23 GMT + - Fri, 05 Nov 2021 09:26:35 GMT expires: - '-1' pragma: @@ -5194,7 +5408,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7ffd8357-892b-4711-8783-94f5f28afe14 + - fadac8f6-5814-43ea-9b09-b09e041e00e0 status: code: 200 message: OK @@ -5210,9 +5424,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: string: '' @@ -5220,17 +5435,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 06:49:24 GMT + - Fri, 05 Nov 2021 09:26:35 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 pragma: - no-cache server: @@ -5241,7 +5456,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e32bc862-7fbb-477c-bc2a-2f96c35c2f12 + - ca7569c7-dd4f-4f72-ab23-da8805f7133b x-ms-ratelimit-remaining-subscription-deletes: - '14997' status: @@ -5257,9 +5472,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -5271,7 +5487,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:49:35 GMT + - Fri, 05 Nov 2021 09:26:46 GMT expires: - '-1' pragma: @@ -5288,7 +5504,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 4cbbb27f-beea-4a79-83c5-982ff6ab9d23 + - c6cba0fb-eb72-4b21-97d0-15a3e45ae516 status: code: 200 message: OK @@ -5302,9 +5518,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -5316,7 +5533,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:49:45 GMT + - Fri, 05 Nov 2021 09:26:57 GMT expires: - '-1' pragma: @@ -5333,7 +5550,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1715d3c2-ab01-4e6c-8540-39f32d58ad5f + - 884910f6-ddc9-4fc3-9c84-0b6793bbae83 status: code: 200 message: OK @@ -5347,9 +5564,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -5361,7 +5579,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:50:05 GMT + - Fri, 05 Nov 2021 09:27:16 GMT expires: - '-1' pragma: @@ -5378,7 +5596,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f1a751e2-2d81-4832-8d26-d612e1484453 + - 29180c63-38c4-4a27-be9a-013fd3a64a8a status: code: 200 message: OK @@ -5392,9 +5610,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -5406,7 +5625,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:50:26 GMT + - Fri, 05 Nov 2021 09:27:36 GMT expires: - '-1' pragma: @@ -5423,7 +5642,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - df39525a-b4ec-4aa3-bd9c-f42897b45c8d + - 3eb56c3c-1eab-425c-b183-ffd48c9ce50f status: code: 200 message: OK @@ -5437,9 +5656,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -5451,7 +5671,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:51:07 GMT + - Fri, 05 Nov 2021 09:28:16 GMT expires: - '-1' pragma: @@ -5468,7 +5688,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e6be168d-0f8d-4cf4-b029-6cdd13d0611b + - e0485d52-edec-4f9a-8fa3-786ac32049b7 status: code: 200 message: OK @@ -5482,9 +5702,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -5496,7 +5717,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:51:47 GMT + - Fri, 05 Nov 2021 09:28:57 GMT expires: - '-1' pragma: @@ -5513,7 +5734,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1a4334b9-9c41-4342-a6c8-01ff3c9601f6 + - f0f50d9d-040c-4af8-b640-b6fa0f17fa32 status: code: 200 message: OK @@ -5527,9 +5748,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -5541,7 +5763,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:53:08 GMT + - Fri, 05 Nov 2021 09:30:17 GMT expires: - '-1' pragma: @@ -5558,7 +5780,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1c837904-04ac-4b97-8818-f8495a036daf + - 30a451f3-3ca7-42cc-8f9a-42a28131c845 status: code: 200 message: OK @@ -5572,9 +5794,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/27701c5e-7757-4b53-a840-71cf018560d2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7d8b9885-9a14-4183-a737-8eaf29791870?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -5586,7 +5809,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:55:49 GMT + - Fri, 05 Nov 2021 09:32:57 GMT expires: - '-1' pragma: @@ -5603,7 +5826,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 11ba3759-9cd5-4932-9465-c76924cfad79 + - 86d53331-aea8-4b7a-a6a3-459228bb43e8 status: code: 200 message: OK @@ -5619,9 +5842,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: string: '' @@ -5629,7 +5853,7 @@ interactions: cache-control: - no-cache date: - - Sat, 09 Oct 2021 06:55:51 GMT + - Fri, 05 Nov 2021 09:32:58 GMT expires: - '-1' pragma: @@ -5655,9 +5879,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: string: '' @@ -5665,7 +5890,7 @@ interactions: cache-control: - no-cache date: - - Sat, 09 Oct 2021 06:55:51 GMT + - Fri, 05 Nov 2021 09:32:58 GMT expires: - '-1' pragma: @@ -5691,9 +5916,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworkGateways/virtualnetworkgatewayname?api-version=2021-05-01 response: body: string: '' @@ -5701,7 +5927,7 @@ interactions: cache-control: - no-cache date: - - Sat, 09 Oct 2021 06:55:52 GMT + - Fri, 05 Nov 2021 09:32:58 GMT expires: - '-1' pragma: @@ -5727,9 +5953,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/localNetworkGateways/localnetworkgatewayname?api-version=2021-05-01 response: body: string: '' @@ -5737,17 +5964,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b40c444f-16e6-4d70-a898-ef64d87cf959?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/73c40d63-20a3-4e79-81be-55d8c49aaf24?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 06:55:53 GMT + - Fri, 05 Nov 2021 09:32:58 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/b40c444f-16e6-4d70-a898-ef64d87cf959?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/73c40d63-20a3-4e79-81be-55d8c49aaf24?api-version=2021-05-01 pragma: - no-cache server: @@ -5758,7 +5985,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1f2ee310-25fa-478e-8195-54252ff8f0a1 + - 275abb64-a53a-4f7b-a6eb-72aab228be91 x-ms-ratelimit-remaining-subscription-deletes: - '14996' status: @@ -5774,9 +6001,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b40c444f-16e6-4d70-a898-ef64d87cf959?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/73c40d63-20a3-4e79-81be-55d8c49aaf24?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -5788,7 +6016,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:56:03 GMT + - Fri, 05 Nov 2021 09:33:08 GMT expires: - '-1' pragma: @@ -5805,7 +6033,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ed5cb4a5-4fee-40dd-b6e0-f155328af2ef + - 5daa187c-4ac9-4605-89ee-05fb0885e0c9 status: code: 200 message: OK @@ -5821,9 +6049,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/networkinterfacename?api-version=2021-05-01 response: body: string: '' @@ -5831,17 +6060,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a4d25670-2de2-479b-9cec-e1a4a56761f1?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7c2f120c-3b35-48fe-8961-539750b6f88f?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 06:56:04 GMT + - Fri, 05 Nov 2021 09:33:08 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/a4d25670-2de2-479b-9cec-e1a4a56761f1?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/7c2f120c-3b35-48fe-8961-539750b6f88f?api-version=2021-05-01 pragma: - no-cache server: @@ -5852,7 +6081,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b9fae64c-528e-40b7-866e-e879881e587c + - e6175286-a325-479b-b411-50a514dc57d4 x-ms-ratelimit-remaining-subscription-deletes: - '14995' status: @@ -5868,9 +6097,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a4d25670-2de2-479b-9cec-e1a4a56761f1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7c2f120c-3b35-48fe-8961-539750b6f88f?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -5882,7 +6112,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:56:14 GMT + - Fri, 05 Nov 2021 09:33:18 GMT expires: - '-1' pragma: @@ -5899,7 +6129,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7c10f3f3-9427-4079-83b8-e51c3c6a88f8 + - 2e1cc225-09dd-4dbc-87f8-21968821260a status: code: 200 message: OK @@ -5915,25 +6145,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b670e295-6149-47b9-829d-5f6f658f133d?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c31aa691-97dd-4306-a9b9-7b42097ffb6f?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 06:56:15 GMT + - Fri, 05 Nov 2021 09:33:19 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/b670e295-6149-47b9-829d-5f6f658f133d?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/c31aa691-97dd-4306-a9b9-7b42097ffb6f?api-version=2021-05-01 pragma: - no-cache server: @@ -5944,7 +6175,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - df9c7a99-e534-4507-8ca8-d8ba1825d88d + - 15cce446-64ef-4080-a7bc-a2d295a2cb27 x-ms-ratelimit-remaining-subscription-deletes: - '14994' status: @@ -5960,9 +6191,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b670e295-6149-47b9-829d-5f6f658f133d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c31aa691-97dd-4306-a9b9-7b42097ffb6f?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -5974,7 +6206,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:56:25 GMT + - Fri, 05 Nov 2021 09:33:30 GMT expires: - '-1' pragma: @@ -5991,7 +6223,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5ce1d743-21f2-48fc-9761-3f45939cd4c4 + - 736bb9d3-b3f3-4293-a668-4721a37ed830 status: code: 200 message: OK @@ -6007,9 +6239,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: string: '' @@ -6017,17 +6250,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/f2b2acea-a6cb-4ab7-86d5-e6a55466dcb1?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/487db0af-a539-4f78-8014-6367a654f18b?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 06:56:26 GMT + - Fri, 05 Nov 2021 09:33:30 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/f2b2acea-a6cb-4ab7-86d5-e6a55466dcb1?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/487db0af-a539-4f78-8014-6367a654f18b?api-version=2021-05-01 pragma: - no-cache server: @@ -6038,7 +6271,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9c7ec657-c05e-4546-b67d-520852e6cb09 + - 85a11166-17dc-4b0b-a15e-e9edda647d25 x-ms-ratelimit-remaining-subscription-deletes: - '14993' status: @@ -6054,9 +6287,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/f2b2acea-a6cb-4ab7-86d5-e6a55466dcb1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/487db0af-a539-4f78-8014-6367a654f18b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -6068,7 +6302,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:56:36 GMT + - Fri, 05 Nov 2021 09:33:40 GMT expires: - '-1' pragma: @@ -6085,7 +6319,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7bacb927-1366-4e05-a882-9b3ca2c97c4f + - 19f74b0f-7901-4b77-ab67-bc294512fa40 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_base_async.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_base_async.test_network.yaml index f355a3d2b583..b35534addb66 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_base_async.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_base_async.test_network.yaml @@ -10,51 +10,53 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"552b6400-d4c3-4492-bfb7-351131330b56\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"784b2fb3-f0be-49c8-86d6-848af5b0eddd\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"8f9b6642-3018-4fc3-847f-e3336e7310d1\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"0cc0a199-1bcb-433c-9f79-fea03da61b79\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n + \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n + \ }\r\n}" headers: azure-asyncnotification: Enabled - azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/23034535-357c-47ec-a2e8-bf15dfea92d8?api-version=2021-03-01 + azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/849b3ece-8004-4c8b-98a2-11ef3918005f?api-version=2021-05-01 cache-control: no-cache content-length: '694' content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:56:58 GMT + date: Fri, 05 Nov 2021 09:33:46 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff - x-ms-arm-service-request-id: 29180058-b480-4803-9416-a6ef2df4f231 + x-ms-arm-service-request-id: 13693751-b387-4425-b2a6-2f82368db388 x-ms-ratelimit-remaining-subscription-writes: '1199' status: code: 201 message: Created - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 - request: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/23034535-357c-47ec-a2e8-bf15dfea92d8?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/849b3ece-8004-4c8b-98a2-11ef3918005f?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:01 GMT + date: Fri, 05 Nov 2021 09:33:49 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -62,33 +64,34 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: e21cd47e-018b-472b-8205-8756317e5614 + x-ms-arm-service-request-id: 3b661dc0-6002-4f0f-830a-6f70f88f482e status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/23034535-357c-47ec-a2e8-bf15dfea92d8?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/849b3ece-8004-4c8b-98a2-11ef3918005f?api-version=2021-05-01 - request: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"3621e4c0-268f-4e8f-a9c4-ddc2f2f933de\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"784b2fb3-f0be-49c8-86d6-848af5b0eddd\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"14f9dab3-aa4c-4411-bd60-71a467ff40ae\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"0cc0a199-1bcb-433c-9f79-fea03da61b79\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n + \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n + \ }\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:02 GMT - etag: W/"3621e4c0-268f-4e8f-a9c4-ddc2f2f933de" + date: Fri, 05 Nov 2021 09:33:49 GMT + etag: W/"14f9dab3-aa4c-4411-bd60-71a467ff40ae" expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -96,11 +99,11 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: 982b16b4-4f88-439e-9e51-51cea502fa4d + x-ms-arm-service-request-id: 29e69f1a-cfbd-451f-ac8f-e9e2b8cccecd status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 - request: body: '{"properties": {"addressPrefix": "10.0.0.0/24"}}' headers: @@ -111,48 +114,50 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"5dad582f-b8b9-4109-92f6-7fc394dcff9f\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" - headers: - azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ea3e24de-b82a-4bb1-810d-29aa598c1e41?api-version=2021-03-01 + string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"9492923b-e281-4750-b632-f342bd511a75\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + headers: + azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/545e6026-7f29-46d8-b6bd-1368b1e85ccc?api-version=2021-05-01 cache-control: no-cache content-length: '609' content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:03 GMT + date: Fri, 05 Nov 2021 09:33:49 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff - x-ms-arm-service-request-id: 5f30fa1e-27cd-475f-9d64-42d1fba7d9f0 + x-ms-arm-service-request-id: 37916554-85b8-4891-8fdc-2bade8af1da5 x-ms-ratelimit-remaining-subscription-writes: '1198' status: code: 201 message: Created - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 - request: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ea3e24de-b82a-4bb1-810d-29aa598c1e41?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/545e6026-7f29-46d8-b6bd-1368b1e85ccc?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:06 GMT + date: Fri, 05 Nov 2021 09:33:52 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -160,31 +165,32 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: 9747daa5-a792-42f2-afdd-a259a7d93948 + x-ms-arm-service-request-id: 8ddf1fec-c6ae-49f9-9ee9-886361d45444 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ea3e24de-b82a-4bb1-810d-29aa598c1e41?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/545e6026-7f29-46d8-b6bd-1368b1e85ccc?api-version=2021-05-01 - request: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"a096d662-c9dc-442a-a143-9f9ddd0bb403\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"6fb56713-5c4c-47ce-998e-f14e4916397a\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:06 GMT - etag: W/"a096d662-c9dc-442a-a143-9f9ddd0bb403" + date: Fri, 05 Nov 2021 09:33:52 GMT + etag: W/"6fb56713-5c4c-47ce-998e-f14e4916397a" expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -192,27 +198,28 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: 3627bb8a-5167-42f1-8254-575d25bbc00e + x-ms-arm-service-request-id: 6bfe3332-1f3b-41a2-a454-2cabcfe8c427 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/CheckIPAddressAvailability?ipAddress=10.0.0.4&api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/CheckIPAddressAvailability?ipAddress=10.0.0.4&api-version=2021-05-01 response: body: string: "{\r\n \"available\": true,\r\n \"isPlatformReserved\": false\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:07 GMT + date: Fri, 05 Nov 2021 09:33:53 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -220,33 +227,34 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: 22e05a1b-52e7-4ceb-8f44-27aefcb101c4 + x-ms-arm-service-request-id: ead4bc4a-9b79-4353-aa9b-ad3007e0376f status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/CheckIPAddressAvailability?ipAddress=10.0.0.4&api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/CheckIPAddressAvailability?ipAddress=10.0.0.4&api-version=2021-05-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"a096d662-c9dc-442a-a143-9f9ddd0bb403\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"6fb56713-5c4c-47ce-998e-f14e4916397a\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:07 GMT - etag: W/"a096d662-c9dc-442a-a143-9f9ddd0bb403" + date: Fri, 05 Nov 2021 09:33:53 GMT + etag: W/"6fb56713-5c4c-47ce-998e-f14e4916397a" expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -254,35 +262,35 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: 93c0cb35-5f23-4227-987c-470a43bc7e3c + x-ms-arm-service-request-id: cd1a0568-77fa-484b-bab6-979e54160fb8 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets?api-version=2021-05-01 response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"subnetname\",\r\n\ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"a096d662-c9dc-442a-a143-9f9ddd0bb403\\\"\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\"\ - : [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ - \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n\ - \ ]\r\n}" + string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"subnetname\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"6fb56713-5c4c-47ce-998e-f14e4916397a\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": + \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": + \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ]\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:07 GMT + date: Fri, 05 Nov 2021 09:33:53 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -290,31 +298,32 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: 3e3de2a7-2e8a-452e-83d4-74fad2af22ef + x-ms-arm-service-request-id: 6fcda2ab-80e9-4c4d-8562-f766a78608c1 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets?api-version=2021-05-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/usages?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/usages?api-version=2021-05-01 response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"currentValue\": 0,\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"limit\": 251,\r\n \"name\": {\r\n \"localizedValue\"\ - : \"Subnet size and usage\",\r\n \"value\": \"SubnetSpace\"\r\n \ - \ },\r\n \"unit\": \"Count\"\r\n }\r\n ]\r\n}" + string: "{\r\n \"value\": [\r\n {\r\n \"currentValue\": 0,\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"limit\": 251,\r\n \"name\": {\r\n \"localizedValue\": + \"Subnet size and usage\",\r\n \"value\": \"SubnetSpace\"\r\n },\r\n + \ \"unit\": \"Count\"\r\n }\r\n ]\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:08 GMT + date: Fri, 05 Nov 2021 09:33:53 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -322,43 +331,42 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: 671bc08e-bdf2-47ad-8dbe-86e51def7a9d + x-ms-arm-service-request-id: def80712-7eb0-4b94-af7d-03d83be19cfd status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/usages?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/usages?api-version=2021-05-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"a096d662-c9dc-442a-a143-9f9ddd0bb403\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"784b2fb3-f0be-49c8-86d6-848af5b0eddd\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\"\ - : \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"a096d662-c9dc-442a-a143-9f9ddd0bb403\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\"\ - : [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ - \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\ - \n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n \ - \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\"\ - : false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"6fb56713-5c4c-47ce-998e-f14e4916397a\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"0cc0a199-1bcb-433c-9f79-fea03da61b79\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [\r\n + \ {\r\n \"name\": \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"6fb56713-5c4c-47ce-998e-f14e4916397a\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:09 GMT - etag: W/"a096d662-c9dc-442a-a143-9f9ddd0bb403" + date: Fri, 05 Nov 2021 09:33:53 GMT + etag: W/"6fb56713-5c4c-47ce-998e-f14e4916397a" expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -366,44 +374,44 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: 793b43d3-b9c5-456d-82f7-1cdb40d9a526 + x-ms-arm-service-request-id: be7794f2-15ff-4c12-b74b-4edb2844e4cc status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks?api-version=2021-05-01 response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"virtualnetworkname\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"a096d662-c9dc-442a-a143-9f9ddd0bb403\\\"\",\r\ - \n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"784b2fb3-f0be-49c8-86d6-848af5b0eddd\"\ - ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \ - \ \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\"\ - : [\r\n {\r\n \"name\": \"subnetname\",\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"a096d662-c9dc-442a-a143-9f9ddd0bb403\\\"\ - \",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n\ - \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"\ - Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\ - \r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\ - \n \"enableDdosProtection\": false\r\n }\r\n }\r\n ]\r\n}" + string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"virtualnetworkname\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"6fb56713-5c4c-47ce-998e-f14e4916397a\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"0cc0a199-1bcb-433c-9f79-fea03da61b79\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"subnets\": [\r\n {\r\n \"name\": + \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"6fb56713-5c4c-47ce-998e-f14e4916397a\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n + \ \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n }\r\n + \ ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n }\r\n ]\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:09 GMT + date: Fri, 05 Nov 2021 09:33:53 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -411,107 +419,29 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: 649730a5-fa2c-4a75-9fe8-17b3fffc0487 + x-ms-arm-service-request-id: 9ed08bc9-d718-4a32-99e9-0134eada2b61 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks?api-version=2021-05-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/virtualNetworks?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/virtualNetworks?api-version=2021-05-01 response: body: - string: "{\r\n \"value\": [\r\n {\r\n \"name\": \"aks-vnet-42661388\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_myjstest_9_eastus/providers/Microsoft.Network/virtualNetworks/aks-vnet-42661388\"\ - ,\r\n \"etag\": \"W/\\\"47a03291-e3cb-459e-a16a-f257ead5209e\\\"\",\r\ - \n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"ee1fc49b-331d-495a-90e3-f182ff7d1790\"\ - ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \ - \ \"10.0.0.0/8\"\r\n ]\r\n },\r\n \"subnets\"\ - : [\r\n {\r\n \"name\": \"aks-subnet\",\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_myjstest_9_eastus/providers/Microsoft.Network/virtualNetworks/aks-vnet-42661388/subnets/aks-subnet\"\ - ,\r\n \"etag\": \"W/\\\"47a03291-e3cb-459e-a16a-f257ead5209e\\\"\ - \",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"addressPrefix\": \"10.240.0.0/16\",\r\n\ - \ \"networkSecurityGroup\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_myjstest_9_eastus/providers/Microsoft.Network/networkSecurityGroups/aks-agentpool-42661388-nsg\"\ - \r\n },\r\n \"routeTable\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_myjstest_9_eastus/providers/Microsoft.Network/routeTables/aks-agentpool-42661388-routetable\"\ - \r\n },\r\n \"ipConfigurations\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MC_myjstest_9_eastus/providers/Microsoft.Compute/virtualMachineScaleSets/aks-aksagent-42661388-vmss/virtualMachines/0/networkInterfaces/aks-aksagent-42661388-vmss/ipConfigurations/ipconfig1\"\ - \r\n }\r\n ],\r\n \"delegations\"\ - : [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n\ - \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n \ - \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\ - \r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\ - \n \"enableDdosProtection\": false\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"a096d662-c9dc-442a-a143-9f9ddd0bb403\\\"\",\r\ - \n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"784b2fb3-f0be-49c8-86d6-848af5b0eddd\"\ - ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \ - \ \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\"\ - : [\r\n {\r\n \"name\": \"subnetname\",\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"a096d662-c9dc-442a-a143-9f9ddd0bb403\\\"\ - \",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n\ - \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"\ - Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\ - \r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\ - \n \"enableDdosProtection\": false\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"rmvirtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ebm4jvnsvqpji5t6btyw7sxjg5s7ini3jsownblfy7ongu4yecaxhdfyg6pdhy3b7hbbfncvcmf/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"4f47fcdd-07b3-4c3c-ba66-af60dc01bc68\\\"\",\r\ - \n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"bbac6841-f703-40d2-b234-e93e7f7c73d3\"\ - ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \ - \ \"10.2.0.0/16\"\r\n ]\r\n },\r\n \"subnets\"\ - : [],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\"\ - : false\r\n }\r\n },\r\n {\r\n \"name\": \"sdknettestqa2vnet464\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-net-test-qa2/providers/Microsoft.Network/virtualNetworks/sdknettestqa2vnet464\"\ - ,\r\n \"etag\": \"W/\\\"49ab6eb5-6b57-4dea-b994-4bf75c91268b\\\"\",\r\ - \n \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {},\r\n \"properties\": {\r\n \ - \ \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a0cd9266-92c6-44e2-9039-28d28196e9bc\"\ - ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \ - \ \"10.1.0.0/16\"\r\n ]\r\n },\r\n \"subnets\"\ - : [\r\n {\r\n \"name\": \"default\",\r\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-net-test-qa2/providers/Microsoft.Network/virtualNetworks/sdknettestqa2vnet464/subnets/default\"\ - ,\r\n \"etag\": \"W/\\\"49ab6eb5-6b57-4dea-b994-4bf75c91268b\\\"\ - \",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"addressPrefix\": \"10.1.0.0/24\",\r\n\ - \ \"ipConfigurations\": [\r\n {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-net-test-qa2/providers/Microsoft.Network/networkInterfaces/anf-sdknettestqa2vnet464-nic-2JBDNX/ipConfigurations/ipconfig1\"\ - \r\n }\r\n ],\r\n \"serviceEndpoints\"\ - : [],\r\n \"delegations\": [\r\n {\r\n \ - \ \"name\": \"858246068f874a3f96e679fc8bf8c983\",\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-net-test-qa2/providers/Microsoft.Network/virtualNetworks/sdknettestqa2vnet464/subnets/default/delegations/858246068f874a3f96e679fc8bf8c983\"\ - ,\r\n \"etag\": \"W/\\\"49ab6eb5-6b57-4dea-b994-4bf75c91268b\\\ - \"\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"serviceName\": \"Microsoft.Netapp/volumes\"\ - ,\r\n \"actions\": [\r\n \"Microsoft.Network/networkinterfaces/*\"\ - ,\r\n \"Microsoft.Network/virtualNetworks/subnets/join/action\"\ - \r\n ]\r\n },\r\n \"\ - type\": \"Microsoft.Network/virtualNetworks/subnets/delegations\"\r\n \ - \ }\r\n ],\r\n \"purpose\": \"HostedWorkloads\"\ - ,\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ - \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n \ - \ },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\ - \r\n }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\ - \n \"enableDdosProtection\": false\r\n }\r\n }\r\n ]\r\n}" + string: '{"value":[{"name":"cli-vnet-kv3quqjhk5konrv","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_acfr_petvo2n7uqr5i547f4c3jfwanx2xs2bx4efsfmwspj755haqa5hw6esbgfer6/providers/Microsoft.Network/virtualNetworks/cli-vnet-kv3quqjhk5konrv","etag":"W/\"b4bbb5a7-123a-4739-899c-a58ebd9643b1\"","type":"Microsoft.Network/virtualNetworks","location":"westus","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"d2b52897-bdf3-45ac-8b53-9d72656a3250","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"cli-subnet-ksg7z56exhbag","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_acfr_petvo2n7uqr5i547f4c3jfwanx2xs2bx4efsfmwspj755haqa5hw6esbgfer6/providers/Microsoft.Network/virtualNetworks/cli-vnet-kv3quqjhk5konrv/subnets/cli-subnet-ksg7z56exhbag","etag":"W/\"b4bbb5a7-123a-4739-899c-a58ebd9643b1\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Disabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"cli.lock.rsrchikdj2r5lezlez4w6","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_cannotdelete_resource_lockbfuaftaa7m4m77urywe56rs3yfr4sr3ybmrsclix/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrchikdj2r5lezlez4w6","etag":"W/\"12b1330b-fc13-4adc-be53-d75e698376c6\"","type":"Microsoft.Network/virtualNetworks","location":"westus","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"f884bb67-ba92-440b-94dd-eb58447b9240","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"cli.lock.rsrctghseyfj2qky7arbn","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_readonly_resource_locklucgtzf5vgc65f5gjnxtn3kf4axeyzdcowlatqmvexq3/providers/Microsoft.Network/virtualNetworks/cli.lock.rsrctghseyfj2qky7arbn","etag":"W/\"a9c69b17-6231-4b9b-b75a-6f285a315d7f\"","type":"Microsoft.Network/virtualNetworks","location":"westus","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"cfe15601-e962-4d12-b9a8-89c51565111b","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"ethan_vnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ethan_rg/providers/Microsoft.Network/virtualNetworks/ethan_vnet","etag":"W/\"e2539aab-bec8-489e-9974-6614d5a21c19\"","type":"Microsoft.Network/virtualNetworks","location":"westus","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"2a669fb4-fb26-44e2-8fdc-92caecabd1f5","addressSpace":{"addressPrefixes":["10.0.0.0/24"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"RouteServerSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ethan_rg/providers/Microsoft.Network/virtualNetworks/ethan_vnet/subnets/RouteServerSubnet","etag":"W/\"e2539aab-bec8-489e-9974-6614d5a21c19\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ethan_rg/providers/Microsoft.Network/virtualHubs/ethan_route/ipConfigurations/Default"},{"id":"/subscriptions/1fda6fe9-e52c-4107-add3-73a6accd961e/resourceGroups/armrg-162ca9a4-f16d-4551-8741-4327302be557/providers/Microsoft.Compute/virtualMachineScaleSets/rs/virtualMachines/0/networkInterfaces/custnic/ipConfigurations/ipconfig"},{"id":"/subscriptions/1fda6fe9-e52c-4107-add3-73a6accd961e/resourceGroups/armrg-162ca9a4-f16d-4551-8741-4327302be557/providers/Microsoft.Compute/virtualMachineScaleSets/rs/virtualMachines/1/networkInterfaces/custnic/ipConfigurations/ipconfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"bez-vn","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.Network/virtualNetworks/bez-vn","etag":"W/\"c11471f8-4361-413c-8454-24beecc76e3b\"","type":"Microsoft.Network/virtualNetworks","location":"eastus","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"47cf1393-1ba1-4280-a0c4-4286344ef374","addressSpace":{"addressPrefixes":["10.128.0.0/16"]},"subnets":[{"name":"default","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.Network/virtualNetworks/bez-vn/subnets/default","etag":"W/\"c11471f8-4361-413c-8454-24beecc76e3b\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.128.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"},{"name":"test","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.Network/virtualNetworks/bez-vn/subnets/test","etag":"W/\"c11471f8-4361-413c-8454-24beecc76e3b\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.128.1.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MSP_bez-rg_bez-diskpool_eastus/providers/Microsoft.Network/networkInterfaces/diskpool-nic-0/ipConfigurations/ipconfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MSP_bez-rg_bez-diskpool_eastus/providers/Microsoft.Network/networkInterfaces/diskpool-nic-1/ipConfigurations/ipconfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MSP_bez-rg_bez-diskpool_eastus/providers/Microsoft.Network/networkInterfaces/diskpool-nic-swap-1/ipConfigurations/ipconfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MSP_bez-rg_bez-diskpool_eastus/providers/Microsoft.Network/networkInterfaces/diskpool-nic-swap-2/ipConfigurations/ipconfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MSP_bez-rg_bez-diskpool_eastus/providers/Microsoft.Network/networkInterfaces/diskpool-nic-swap-0/ipConfigurations/ipconfig"}],"serviceEndpoints":[],"delegations":[{"name":"Microsoft.StoragePool.diskPools","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/bez-rg/providers/Microsoft.Network/virtualNetworks/bez-vn/subnets/test/delegations/Microsoft.StoragePool.diskPools","etag":"W/\"c11471f8-4361-413c-8454-24beecc76e3b\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.StoragePool/diskPools","actions":["Microsoft.Network/virtualNetworks/read"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"rmvirtualnetworkname","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-jt7cqerbwdlyjziv4orbnoibnx3tzu7fz4ohzxocoaimglctqxxvppfx6xwkr7ly6lqeorlnldg/providers/Microsoft.Network/virtualNetworks/rmvirtualnetworkname","etag":"W/\"7409d8dd-d945-4bb3-99ca-b347fb21eef3\"","type":"Microsoft.Network/virtualNetworks","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"078a28e2-34f5-4c32-8439-d4809de84318","addressSpace":{"addressPrefixes":["10.2.0.0/16"]},"subnets":[],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"virtualnetworkname","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname","etag":"W/\"6fb56713-5c4c-47ce-998e-f14e4916397a\"","type":"Microsoft.Network/virtualNetworks","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"0cc0a199-1bcb-433c-9f79-fea03da61b79","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"subnetname","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname","etag":"W/\"6fb56713-5c4c-47ce-998e-f14e4916397a\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"networkxx","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-sc5p7qjni2rubcmlyvnduxhouwkqp6wnx74eittdevtrw5greuhqt44nkgjpboi6neprbnr5kcy/providers/Microsoft.Network/virtualNetworks/networkxx","etag":"W/\"623afacc-b3d9-4cff-91fb-82bb75f713ee\"","type":"Microsoft.Network/virtualNetworks","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"1c0f5374-5d48-46d7-acb8-1901da685746","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"networkxx","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-v6zsvqhipyq2syteu7paigv7qmzwxyx2f6ve27q344543iy6dbzssz3yrh563a4njctp7wbt63g/providers/Microsoft.Network/virtualNetworks/networkxx","etag":"W/\"14b568ac-d146-46f8-bdcc-d0a6280af546\"","type":"Microsoft.Network/virtualNetworks","location":"eastus","properties":{"provisioningState":"Succeeded","resourceGuid":"c8d49bea-463a-4d98-bd58-58dfdee17ac0","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"cli-vnet-htz32mq4kepjvx3","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-rg-subnethokg7guxho6/providers/Microsoft.Network/virtualNetworks/cli-vnet-htz32mq4kepjvx3","etag":"W/\"3d823a08-3e64-4889-b4b3-a24f807dc804\"","type":"Microsoft.Network/virtualNetworks","location":"southcentralus","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"94245f26-e97f-476f-9866-08f482a7cab8","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"cli-subnet-jn3ys","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-rg-subnethokg7guxho6/providers/Microsoft.Network/virtualNetworks/cli-vnet-htz32mq4kepjvx3/subnets/cli-subnet-jn3ys","etag":"W/\"3d823a08-3e64-4889-b4b3-a24f807dc804\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[{"name":"0","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-rg-subnethokg7guxho6/providers/Microsoft.Network/virtualNetworks/cli-vnet-htz32mq4kepjvx3/subnets/cli-subnet-jn3ys/delegations/0","etag":"W/\"3d823a08-3e64-4889-b4b3-a24f807dc804\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.Netapp/volumes","actions":["Microsoft.Network/networkinterfaces/*","Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"purpose":"HostedWorkloads","privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"cli-vnet-ifkn6ws2a4oznz2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-rg-subnetsn4ya27nfgv/providers/Microsoft.Network/virtualNetworks/cli-vnet-ifkn6ws2a4oznz2","etag":"W/\"95319e64-b19a-4e09-9f11-3128a8220b21\"","type":"Microsoft.Network/virtualNetworks","location":"southcentralus","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"4b760751-5ed7-48ea-8453-802c6047797b","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"cli-subnet-we3r2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-rg-subnetsn4ya27nfgv/providers/Microsoft.Network/virtualNetworks/cli-vnet-ifkn6ws2a4oznz2/subnets/cli-subnet-we3r2","etag":"W/\"95319e64-b19a-4e09-9f11-3128a8220b21\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[{"name":"0","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli-rg-subnetsn4ya27nfgv/providers/Microsoft.Network/virtualNetworks/cli-vnet-ifkn6ws2a4oznz2/subnets/cli-subnet-we3r2/delegations/0","etag":"W/\"95319e64-b19a-4e09-9f11-3128a8220b21\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.Netapp/volumes","actions":["Microsoft.Network/networkinterfaces/*","Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"purpose":"HostedWorkloads","privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"fengnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Network/virtualNetworks/fengnet","etag":"W/\"ab7fc3cd-5cd6-4589-94a3-051eb2cfaa57\"","type":"Microsoft.Network/virtualNetworks","location":"centralus","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"11ee3c60-0e22-44a3-a916-d553364b109e","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"default","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Network/virtualNetworks/fengnet/subnets/default","etag":"W/\"ab7fc3cd-5cd6-4589-94a3-051eb2cfaa57\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"fengtestvnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Network/virtualNetworks/fengtestvnet","etag":"W/\"d5e7f592-f675-4296-a973-59b532c4ab9f\"","type":"Microsoft.Network/virtualNetworks","location":"centralus","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"59680b56-4598-4692-8f56-3ba38d3d2d14","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"default","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Network/virtualNetworks/fengtestvnet/subnets/default","etag":"W/\"d5e7f592-f675-4296-a973-59b532c4ab9f\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"},{"name":"updatesub","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/feng-cli-rg/providers/Microsoft.Network/virtualNetworks/fengtestvnet/subnets/updatesub","etag":"W/\"d5e7f592-f675-4296-a973-59b532c4ab9f\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.1.0/24","serviceEndpoints":[{"provisioningState":"Succeeded","service":"Microsoft.AzureActiveDirectory","locations":["*"]}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"swiftnamefmntkfn3iszd7ar","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swiftwebapp5kf24b6qyajr7/providers/Microsoft.Network/virtualNetworks/swiftnamefmntkfn3iszd7ar","etag":"W/\"a274825e-a64c-4d2c-9b11-4b01459994fb\"","type":"Microsoft.Network/virtualNetworks","location":"japanwest","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"86495243-9a40-4efb-b32f-315668e21b14","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"swiftsubnetmtifzhtqub4tr","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swiftwebapp5kf24b6qyajr7/providers/Microsoft.Network/virtualNetworks/swiftnamefmntkfn3iszd7ar/subnets/swiftsubnetmtifzhtqub4tr","etag":"W/\"a274825e-a64c-4d2c-9b11-4b01459994fb\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[{"name":"delegation","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swiftwebapp5kf24b6qyajr7/providers/Microsoft.Network/virtualNetworks/swiftnamefmntkfn3iszd7ar/subnets/swiftsubnetmtifzhtqub4tr/delegations/delegation","etag":"W/\"a274825e-a64c-4d2c-9b11-4b01459994fb\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.Web/serverFarms","actions":["Microsoft.Network/virtualNetworks/subnets/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"swiftnamerfu4ewm2ahhea6i","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swiftwebappsgyiyhjoyvvjz/providers/Microsoft.Network/virtualNetworks/swiftnamerfu4ewm2ahhea6i","etag":"W/\"3d1b4ca3-3cd3-4fc3-980a-87af80b92bf2\"","type":"Microsoft.Network/virtualNetworks","location":"japanwest","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"f8077178-baf6-4919-8daf-8a525a1e0be9","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"swiftsubnetzgqizupnl3uk7","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swiftwebappsgyiyhjoyvvjz/providers/Microsoft.Network/virtualNetworks/swiftnamerfu4ewm2ahhea6i/subnets/swiftsubnetzgqizupnl3uk7","etag":"W/\"3d1b4ca3-3cd3-4fc3-980a-87af80b92bf2\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[{"name":"delegation","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/swiftwebappsgyiyhjoyvvjz/providers/Microsoft.Network/virtualNetworks/swiftnamerfu4ewm2ahhea6i/subnets/swiftsubnetzgqizupnl3uk7/delegations/delegation","etag":"W/\"3d1b4ca3-3cd3-4fc3-980a-87af80b92bf2\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.Web/serverFarms","actions":["Microsoft.Network/virtualNetworks/subnets/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"cli-vnet-lefr-02","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_snapshot_vpshzlob7c63iuglneagoxjxa45dqn6eoglhf37oo5cms/providers/Microsoft.Network/virtualNetworks/cli-vnet-lefr-02","etag":"W/\"a94f4406-7d2e-44c2-b311-c9b5cc946b1b\"","type":"Microsoft.Network/virtualNetworks","location":"westus2","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"d0252539-b9d8-4264-bf7a-dfc99802c145","addressSpace":{"addressPrefixes":["10.5.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"cli-subnet-lefr-02","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_snapshot_vpshzlob7c63iuglneagoxjxa45dqn6eoglhf37oo5cms/providers/Microsoft.Network/virtualNetworks/cli-vnet-lefr-02/subnets/cli-subnet-lefr-02","etag":"W/\"a94f4406-7d2e-44c2-b311-c9b5cc946b1b\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.5.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_snapshot_vpshzlob7c63iuglneagoxjxa45dqn6eoglhf37oo5cms/providers/Microsoft.Network/networkInterfaces/anf-cli-vnet-lefr-02-nic-OP6BGH/ipConfigurations/ipconfig1"}],"delegations":[{"name":"0","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_snapshot_vpshzlob7c63iuglneagoxjxa45dqn6eoglhf37oo5cms/providers/Microsoft.Network/virtualNetworks/cli-vnet-lefr-02/subnets/cli-subnet-lefr-02/delegations/0","etag":"W/\"a94f4406-7d2e-44c2-b311-c9b5cc946b1b\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.Netapp/volumes","actions":["Microsoft.Network/networkinterfaces/*","Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"purpose":"HostedWorkloads","privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"hzyvm2VNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hzyvm2rg/providers/Microsoft.Network/virtualNetworks/hzyvm2VNET","etag":"W/\"a9958473-bb41-4a5b-90a8-f4b407195024\"","type":"Microsoft.Network/virtualNetworks","location":"westus2","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"7925e975-8b54-440a-b51d-2114aacc17c2","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"hzyvm2Subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hzyvm2rg/providers/Microsoft.Network/virtualNetworks/hzyvm2VNET/subnets/hzyvm2Subnet","etag":"W/\"a9958473-bb41-4a5b-90a8-f4b407195024\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hzyvm2rg/providers/Microsoft.Network/networkInterfaces/hzyvm2VMNic/ipConfigurations/ipconfighzyvm2"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"hzyvmVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hzyvmrg/providers/Microsoft.Network/virtualNetworks/hzyvmVNET","etag":"W/\"4064f3ad-aa88-4a96-8100-4de32a684cff\"","type":"Microsoft.Network/virtualNetworks","location":"westus2","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"b0d15626-c40f-4435-9577-b9b903b97fd3","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"hzyvmSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hzyvmrg/providers/Microsoft.Network/virtualNetworks/hzyvmVNET/subnets/hzyvmSubnet","etag":"W/\"4064f3ad-aa88-4a96-8100-4de32a684cff\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/hzyvmrg/providers/Microsoft.Network/networkInterfaces/hzyvmVMNic/ipConfigurations/ipconfighzyvm"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"jl-ubuntuVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jl-ubunturg/providers/Microsoft.Network/virtualNetworks/jl-ubuntuVNET","etag":"W/\"b84101bc-e580-4c9c-8f29-13b9b006191c\"","type":"Microsoft.Network/virtualNetworks","location":"westus2","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"a3ed11c0-fb61-44e8-985b-7cfa5cb5dc8e","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"jl-ubuntuSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jl-ubunturg/providers/Microsoft.Network/virtualNetworks/jl-ubuntuVNET/subnets/jl-ubuntuSubnet","etag":"W/\"b84101bc-e580-4c9c-8f29-13b9b006191c\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jl-ubunturg/providers/Microsoft.Network/networkInterfaces/jl-ubuntuVMNic/ipConfigurations/ipconfigjl-ubuntu"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"jl0922vmVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jl0922rg/providers/Microsoft.Network/virtualNetworks/jl0922vmVNET","etag":"W/\"c742dbf2-5e9b-4136-8262-97c3422343d8\"","type":"Microsoft.Network/virtualNetworks","location":"westus2","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"bd5ae80c-71da-4124-a463-656911f05c4a","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"jl0922vmSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jl0922rg/providers/Microsoft.Network/virtualNetworks/jl0922vmVNET/subnets/jl0922vmSubnet","etag":"W/\"c742dbf2-5e9b-4136-8262-97c3422343d8\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/jl0922rg/providers/Microsoft.Network/networkInterfaces/jl0922vmVMNic/ipConfigurations/ipconfigjl0922vm"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"sdk-vnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-wus2-rg-test/providers/Microsoft.Network/virtualNetworks/sdk-vnet","etag":"W/\"80073273-e5a3-4113-aa56-395c2b1f3e4a\"","type":"Microsoft.Network/virtualNetworks","location":"westus2","properties":{"provisioningState":"Succeeded","resourceGuid":"7637a963-71f9-4aed-905b-8c0f4aed45b9","addressSpace":{"addressPrefixes":["10.6.0.0/16"]},"subnets":[{"name":"default","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-wus2-rg-test/providers/Microsoft.Network/virtualNetworks/sdk-vnet/subnets/default","etag":"W/\"80073273-e5a3-4113-aa56-395c2b1f3e4a\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.6.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-wus2-rg-test/providers/Microsoft.Network/networkInterfaces/anf-sdk-vnet-nic-VLB5RZ/ipConfigurations/ipconfig1"}],"serviceEndpoints":[],"delegations":[{"name":"514c6b63b2df4757ba448bd8f44d10a5","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/sdk-wus2-rg-test/providers/Microsoft.Network/virtualNetworks/sdk-vnet/subnets/default/delegations/514c6b63b2df4757ba448bd8f44d10a5","etag":"W/\"80073273-e5a3-4113-aa56-395c2b1f3e4a\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.Netapp/volumes","actions":["Microsoft.Network/networkinterfaces/*","Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"purpose":"HostedWorkloads","privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vme2gol3cqVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_3tlf6fnaho6xh2k67p5k2gzrdwsz6shx7wiovzaqqgrv6/providers/Microsoft.Network/virtualNetworks/vme2gol3cqVNET","etag":"W/\"40595384-2375-484b-a4ed-c6105804e7bb\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"a9f8b585-a0c9-457d-ae98-fd6383f181b7","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vme2gol3cqSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_3tlf6fnaho6xh2k67p5k2gzrdwsz6shx7wiovzaqqgrv6/providers/Microsoft.Network/virtualNetworks/vme2gol3cqVNET/subnets/vme2gol3cqSubnet","etag":"W/\"40595384-2375-484b-a4ed-c6105804e7bb\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_3tlf6fnaho6xh2k67p5k2gzrdwsz6shx7wiovzaqqgrv6/providers/Microsoft.Compute/virtualMachineScaleSets/vmssgrpf4n/virtualMachines/0/networkInterfaces/vmssgdebeNic/ipConfigurations/vmssgdebeIPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_3tlf6fnaho6xh2k67p5k2gzrdwsz6shx7wiovzaqqgrv6/providers/Microsoft.Compute/virtualMachineScaleSets/vmssgrpf4n/virtualMachines/2/networkInterfaces/vmssgdebeNic/ipConfigurations/vmssgdebeIPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmymwxa64iVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_3ye3fknhdgsj3emasgvno7ha6pbu7kl7u7zfgrkrqvxfy/providers/Microsoft.Network/virtualNetworks/vmymwxa64iVNET","etag":"W/\"931666e0-2f8a-4069-9e77-e87d86b21d1d\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"ee043fa8-0c8c-4de9-8744-066f113e18d6","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmymwxa64iSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_3ye3fknhdgsj3emasgvno7ha6pbu7kl7u7zfgrkrqvxfy/providers/Microsoft.Network/virtualNetworks/vmymwxa64iVNET/subnets/vmymwxa64iSubnet","etag":"W/\"931666e0-2f8a-4069-9e77-e87d86b21d1d\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_3ye3fknhdgsj3emasgvno7ha6pbu7kl7u7zfgrkrqvxfy/providers/Microsoft.Compute/virtualMachineScaleSets/vmssfvnman/virtualMachines/0/networkInterfaces/vmssfc2fdNic/ipConfigurations/vmssfc2fdIPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_3ye3fknhdgsj3emasgvno7ha6pbu7kl7u7zfgrkrqvxfy/providers/Microsoft.Compute/virtualMachineScaleSets/vmssfvnman/virtualMachines/3/networkInterfaces/vmssfc2fdNic/ipConfigurations/vmssfc2fdIPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmqvhbocfjVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_a2bft34ibubuugccpmc6c4zuixspwci77rpr6brqyr5jb/providers/Microsoft.Network/virtualNetworks/vmqvhbocfjVNET","etag":"W/\"0037e54d-d1e1-4d6a-8ac8-6b3314552b3d\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"b25fa330-f31f-4938-ad1f-938420dd813e","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmqvhbocfjSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_a2bft34ibubuugccpmc6c4zuixspwci77rpr6brqyr5jb/providers/Microsoft.Network/virtualNetworks/vmqvhbocfjVNET/subnets/vmqvhbocfjSubnet","etag":"W/\"0037e54d-d1e1-4d6a-8ac8-6b3314552b3d\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_a2bft34ibubuugccpmc6c4zuixspwci77rpr6brqyr5jb/providers/Microsoft.Compute/virtualMachineScaleSets/vmsshc7hvt/virtualMachines/1/networkInterfaces/vmssh1df1Nic/ipConfigurations/vmssh1df1IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_a2bft34ibubuugccpmc6c4zuixspwci77rpr6brqyr5jb/providers/Microsoft.Compute/virtualMachineScaleSets/vmsshc7hvt/virtualMachines/3/networkInterfaces/vmssh1df1Nic/ipConfigurations/vmssh1df1IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmrvrfjdlmVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_aorgdxvqiasmoxu6rnetf22jmzhqns5aousc7zygvltqg/providers/Microsoft.Network/virtualNetworks/vmrvrfjdlmVNET","etag":"W/\"26550e57-414a-420f-aa35-82f2274d3a76\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"7cdca0d6-6705-4f8e-8b64-169ca8370165","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmrvrfjdlmSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_aorgdxvqiasmoxu6rnetf22jmzhqns5aousc7zygvltqg/providers/Microsoft.Network/virtualNetworks/vmrvrfjdlmVNET/subnets/vmrvrfjdlmSubnet","etag":"W/\"26550e57-414a-420f-aa35-82f2274d3a76\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmzrx5qdb3VNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_aymyxfviyz6aokyxy3cedxjplbojtxqgwnuiwcgfgkq5o/providers/Microsoft.Network/virtualNetworks/vmzrx5qdb3VNET","etag":"W/\"99a77dda-9847-47e7-8588-598cb1fa9a26\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"88095440-4e08-48a4-b1be-d974b628bd01","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmzrx5qdb3Subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_aymyxfviyz6aokyxy3cedxjplbojtxqgwnuiwcgfgkq5o/providers/Microsoft.Network/virtualNetworks/vmzrx5qdb3VNET/subnets/vmzrx5qdb3Subnet","etag":"W/\"99a77dda-9847-47e7-8588-598cb1fa9a26\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_aymyxfviyz6aokyxy3cedxjplbojtxqgwnuiwcgfgkq5o/providers/Microsoft.Compute/virtualMachineScaleSets/vmss5ugl4q/virtualMachines/0/networkInterfaces/vmss5d054Nic/ipConfigurations/vmss5d054IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_aymyxfviyz6aokyxy3cedxjplbojtxqgwnuiwcgfgkq5o/providers/Microsoft.Compute/virtualMachineScaleSets/vmss5ugl4q/virtualMachines/2/networkInterfaces/vmss5d054Nic/ipConfigurations/vmss5d054IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmqwnatidzVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_ctb5edywpqrnmw6fyhfp6db2kg6cl2yynycdrwl6uwqs5/providers/Microsoft.Network/virtualNetworks/vmqwnatidzVNET","etag":"W/\"658dd58c-5880-4c45-9102-157f095d45a1\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"ebac9b1e-2381-4338-af35-0b4770a554cb","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmqwnatidzSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_ctb5edywpqrnmw6fyhfp6db2kg6cl2yynycdrwl6uwqs5/providers/Microsoft.Network/virtualNetworks/vmqwnatidzVNET/subnets/vmqwnatidzSubnet","etag":"W/\"658dd58c-5880-4c45-9102-157f095d45a1\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_ctb5edywpqrnmw6fyhfp6db2kg6cl2yynycdrwl6uwqs5/providers/Microsoft.Compute/virtualMachineScaleSets/vmssgdwvqb/virtualMachines/0/networkInterfaces/vmssg2295Nic/ipConfigurations/vmssg2295IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_ctb5edywpqrnmw6fyhfp6db2kg6cl2yynycdrwl6uwqs5/providers/Microsoft.Compute/virtualMachineScaleSets/vmssgdwvqb/virtualMachines/2/networkInterfaces/vmssg2295Nic/ipConfigurations/vmssg2295IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmwgtm6ebaVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_dfv7ckxck7r52gyblbxd5vcipcs7izfdjgx25d7iygamg/providers/Microsoft.Network/virtualNetworks/vmwgtm6ebaVNET","etag":"W/\"d2d1c39c-211d-44c5-9e9f-ce7377034b00\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"02cf94f2-b1e9-4f8c-876b-d25d91242127","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmwgtm6ebaSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_dfv7ckxck7r52gyblbxd5vcipcs7izfdjgx25d7iygamg/providers/Microsoft.Network/virtualNetworks/vmwgtm6ebaVNET/subnets/vmwgtm6ebaSubnet","etag":"W/\"d2d1c39c-211d-44c5-9e9f-ce7377034b00\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_dfv7ckxck7r52gyblbxd5vcipcs7izfdjgx25d7iygamg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss4ynaxr/virtualMachines/0/networkInterfaces/vmss4e461Nic/ipConfigurations/vmss4e461IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_dfv7ckxck7r52gyblbxd5vcipcs7izfdjgx25d7iygamg/providers/Microsoft.Compute/virtualMachineScaleSets/vmss4ynaxr/virtualMachines/1/networkInterfaces/vmss4e461Nic/ipConfigurations/vmss4e461IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmkqf3qdkwVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_e44ggpblxyfbseuzmahjyolmkprp7optrde4jdhurcip6/providers/Microsoft.Network/virtualNetworks/vmkqf3qdkwVNET","etag":"W/\"1babf9cd-364c-4814-9b9f-e9f33dcf50f4\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"e0c10383-fefd-4e36-a9f9-ceafc5d6123c","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmkqf3qdkwSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_e44ggpblxyfbseuzmahjyolmkprp7optrde4jdhurcip6/providers/Microsoft.Network/virtualNetworks/vmkqf3qdkwVNET/subnets/vmkqf3qdkwSubnet","etag":"W/\"1babf9cd-364c-4814-9b9f-e9f33dcf50f4\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_e44ggpblxyfbseuzmahjyolmkprp7optrde4jdhurcip6/providers/Microsoft.Compute/virtualMachineScaleSets/vmss6ek7zz/virtualMachines/0/networkInterfaces/vmss69514Nic/ipConfigurations/vmss69514IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_e44ggpblxyfbseuzmahjyolmkprp7optrde4jdhurcip6/providers/Microsoft.Compute/virtualMachineScaleSets/vmss6ek7zz/virtualMachines/1/networkInterfaces/vmss69514Nic/ipConfigurations/vmss69514IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmpwwy7buwVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_eecnpr6vltq44bk6663dlyestehe3baga2ixcw73v5x7b/providers/Microsoft.Network/virtualNetworks/vmpwwy7buwVNET","etag":"W/\"a43f920e-db04-40ae-8a1d-255f024820cd\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"841a3f52-0ffc-4dc0-a5cf-652d3830f139","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmpwwy7buwSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_eecnpr6vltq44bk6663dlyestehe3baga2ixcw73v5x7b/providers/Microsoft.Network/virtualNetworks/vmpwwy7buwVNET/subnets/vmpwwy7buwSubnet","etag":"W/\"a43f920e-db04-40ae-8a1d-255f024820cd\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_eecnpr6vltq44bk6663dlyestehe3baga2ixcw73v5x7b/providers/Microsoft.Compute/virtualMachineScaleSets/vmss6f6sa5/virtualMachines/0/networkInterfaces/vmss60642Nic/ipConfigurations/vmss60642IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_eecnpr6vltq44bk6663dlyestehe3baga2ixcw73v5x7b/providers/Microsoft.Compute/virtualMachineScaleSets/vmss6f6sa5/virtualMachines/1/networkInterfaces/vmss60642Nic/ipConfigurations/vmss60642IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vm2eic4kjkVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_gexmayegjkcclpwnxzumfzmarbt75giw2uinq3v5dpbby/providers/Microsoft.Network/virtualNetworks/vm2eic4kjkVNET","etag":"W/\"e97d316b-bf3d-4d5b-bc31-bd91c7066d53\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"ec1a5d37-d096-4dbe-bae7-d585a09ab646","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vm2eic4kjkSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_gexmayegjkcclpwnxzumfzmarbt75giw2uinq3v5dpbby/providers/Microsoft.Network/virtualNetworks/vm2eic4kjkVNET/subnets/vm2eic4kjkSubnet","etag":"W/\"e97d316b-bf3d-4d5b-bc31-bd91c7066d53\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_gexmayegjkcclpwnxzumfzmarbt75giw2uinq3v5dpbby/providers/Microsoft.Compute/virtualMachineScaleSets/vmssmnp5ih/virtualMachines/0/networkInterfaces/vmssm969eNic/ipConfigurations/vmssm969eIPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_gexmayegjkcclpwnxzumfzmarbt75giw2uinq3v5dpbby/providers/Microsoft.Compute/virtualMachineScaleSets/vmssmnp5ih/virtualMachines/2/networkInterfaces/vmssm969eNic/ipConfigurations/vmssm969eIPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmugglew4yVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_i3usix747thafnrmbph4fpclz5wjaqrhqcg2dxyiwgygp/providers/Microsoft.Network/virtualNetworks/vmugglew4yVNET","etag":"W/\"b7194b40-20d0-4fcc-810c-0fd7a6a06991\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"7204fcc6-ab8c-46b9-bb95-756e15fb7129","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmugglew4ySubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_i3usix747thafnrmbph4fpclz5wjaqrhqcg2dxyiwgygp/providers/Microsoft.Network/virtualNetworks/vmugglew4yVNET/subnets/vmugglew4ySubnet","etag":"W/\"b7194b40-20d0-4fcc-810c-0fd7a6a06991\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_i3usix747thafnrmbph4fpclz5wjaqrhqcg2dxyiwgygp/providers/Microsoft.Compute/virtualMachineScaleSets/vmsscnidmh/virtualMachines/1/networkInterfaces/vmssc2cb1Nic/ipConfigurations/vmssc2cb1IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_i3usix747thafnrmbph4fpclz5wjaqrhqcg2dxyiwgygp/providers/Microsoft.Compute/virtualMachineScaleSets/vmsscnidmh/virtualMachines/2/networkInterfaces/vmssc2cb1Nic/ipConfigurations/vmssc2cb1IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmff5u2exdVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_jaytbkhe4qpztqxil7l5bsvrpsegovvfbubap2oq2feu4/providers/Microsoft.Network/virtualNetworks/vmff5u2exdVNET","etag":"W/\"fcf15958-21c5-4512-99af-cd802c2b9786\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"bac6ecdd-14ac-46e2-852f-97ec659f85fa","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmff5u2exdSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_jaytbkhe4qpztqxil7l5bsvrpsegovvfbubap2oq2feu4/providers/Microsoft.Network/virtualNetworks/vmff5u2exdVNET/subnets/vmff5u2exdSubnet","etag":"W/\"fcf15958-21c5-4512-99af-cd802c2b9786\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_jaytbkhe4qpztqxil7l5bsvrpsegovvfbubap2oq2feu4/providers/Microsoft.Compute/virtualMachineScaleSets/vmssftnjpy/virtualMachines/0/networkInterfaces/vmssf7b7dNic/ipConfigurations/vmssf7b7dIPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_jaytbkhe4qpztqxil7l5bsvrpsegovvfbubap2oq2feu4/providers/Microsoft.Compute/virtualMachineScaleSets/vmssftnjpy/virtualMachines/1/networkInterfaces/vmssf7b7dNic/ipConfigurations/vmssf7b7dIPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmt3nur6slVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_m5gxv3yeatxpltzlrezxx2dpdx3mkq2koek5kyqze5vho/providers/Microsoft.Network/virtualNetworks/vmt3nur6slVNET","etag":"W/\"df9832a6-f8dc-4030-86c8-0c371f8df873\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"bef7f45d-bc96-4c4f-98d6-b6212a4448d6","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmt3nur6slSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_m5gxv3yeatxpltzlrezxx2dpdx3mkq2koek5kyqze5vho/providers/Microsoft.Network/virtualNetworks/vmt3nur6slVNET/subnets/vmt3nur6slSubnet","etag":"W/\"df9832a6-f8dc-4030-86c8-0c371f8df873\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmvk6hkl2qVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_mmnzgmp6imrcn3jevlkuszwqbycvcrtxtb7vm3e5turfc/providers/Microsoft.Network/virtualNetworks/vmvk6hkl2qVNET","etag":"W/\"e274147c-50bf-4c61-acda-156236f06cc1\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"35f13b25-2732-45ec-830b-23261ca8f247","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmvk6hkl2qSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_mmnzgmp6imrcn3jevlkuszwqbycvcrtxtb7vm3e5turfc/providers/Microsoft.Network/virtualNetworks/vmvk6hkl2qVNET/subnets/vmvk6hkl2qSubnet","etag":"W/\"e274147c-50bf-4c61-acda-156236f06cc1\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmjsispjvtVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_nyzsydhpivousvhlutfp7tg3ofv74i7yyblun2lp7aos7/providers/Microsoft.Network/virtualNetworks/vmjsispjvtVNET","etag":"W/\"ef358660-0131-453c-a392-1859bb2d4999\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"e73c27df-0a67-4121-ab87-f9bb543470f2","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmjsispjvtSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_nyzsydhpivousvhlutfp7tg3ofv74i7yyblun2lp7aos7/providers/Microsoft.Network/virtualNetworks/vmjsispjvtVNET/subnets/vmjsispjvtSubnet","etag":"W/\"ef358660-0131-453c-a392-1859bb2d4999\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_nyzsydhpivousvhlutfp7tg3ofv74i7yyblun2lp7aos7/providers/Microsoft.Compute/virtualMachineScaleSets/vmsswmnycl/virtualMachines/0/networkInterfaces/vmssw0e13Nic/ipConfigurations/vmssw0e13IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_nyzsydhpivousvhlutfp7tg3ofv74i7yyblun2lp7aos7/providers/Microsoft.Compute/virtualMachineScaleSets/vmsswmnycl/virtualMachines/1/networkInterfaces/vmssw0e13Nic/ipConfigurations/vmssw0e13IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmt5z7orbyVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_out4tzo47qu5oe2f757obuscubngkv3cdyhgmlmkcymip/providers/Microsoft.Network/virtualNetworks/vmt5z7orbyVNET","etag":"W/\"e6ba0d5c-25ac-4af8-b193-b397545c6e1e\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"d655ee71-8335-402a-a841-f4a254acf1e9","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmt5z7orbySubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_out4tzo47qu5oe2f757obuscubngkv3cdyhgmlmkcymip/providers/Microsoft.Network/virtualNetworks/vmt5z7orbyVNET/subnets/vmt5z7orbySubnet","etag":"W/\"e6ba0d5c-25ac-4af8-b193-b397545c6e1e\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_out4tzo47qu5oe2f757obuscubngkv3cdyhgmlmkcymip/providers/Microsoft.Compute/virtualMachineScaleSets/vmss6akcuf/virtualMachines/0/networkInterfaces/vmss64bd3Nic/ipConfigurations/vmss64bd3IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_out4tzo47qu5oe2f757obuscubngkv3cdyhgmlmkcymip/providers/Microsoft.Compute/virtualMachineScaleSets/vmss6akcuf/virtualMachines/2/networkInterfaces/vmss64bd3Nic/ipConfigurations/vmss64bd3IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmtjx74drfVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_qqg3b7bmmnshm3sevgjqzhna3r4blwuwofcvsneveiyzy/providers/Microsoft.Network/virtualNetworks/vmtjx74drfVNET","etag":"W/\"a11d2a55-790c-4efc-b4ce-8db1157c1d27\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"c2627865-759c-4954-aaf8-18c5f0ea9ff5","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmtjx74drfSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_qqg3b7bmmnshm3sevgjqzhna3r4blwuwofcvsneveiyzy/providers/Microsoft.Network/virtualNetworks/vmtjx74drfVNET/subnets/vmtjx74drfSubnet","etag":"W/\"a11d2a55-790c-4efc-b4ce-8db1157c1d27\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_qqg3b7bmmnshm3sevgjqzhna3r4blwuwofcvsneveiyzy/providers/Microsoft.Compute/virtualMachineScaleSets/vmssqyrwwx/virtualMachines/0/networkInterfaces/vmssqe056Nic/ipConfigurations/vmssqe056IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_qqg3b7bmmnshm3sevgjqzhna3r4blwuwofcvsneveiyzy/providers/Microsoft.Compute/virtualMachineScaleSets/vmssqyrwwx/virtualMachines/1/networkInterfaces/vmssqe056Nic/ipConfigurations/vmssqe056IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmyiskgmpoVNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_rahefuv5i4dwzi2g6mgwte63x3jxvul7m5bpox6pmg5pt/providers/Microsoft.Network/virtualNetworks/vmyiskgmpoVNET","etag":"W/\"48934e64-89bb-4f18-b322-9f6e8932c7c0\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"e96f19c4-46af-4d4c-a3c5-028b86738024","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmyiskgmpoSubnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_rahefuv5i4dwzi2g6mgwte63x3jxvul7m5bpox6pmg5pt/providers/Microsoft.Network/virtualNetworks/vmyiskgmpoVNET/subnets/vmyiskgmpoSubnet","etag":"W/\"48934e64-89bb-4f18-b322-9f6e8932c7c0\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_rahefuv5i4dwzi2g6mgwte63x3jxvul7m5bpox6pmg5pt/providers/Microsoft.Compute/virtualMachineScaleSets/vmssf34c5y/virtualMachines/0/networkInterfaces/vmssf350bNic/ipConfigurations/vmssf350bIPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_rahefuv5i4dwzi2g6mgwte63x3jxvul7m5bpox6pmg5pt/providers/Microsoft.Compute/virtualMachineScaleSets/vmssf34c5y/virtualMachines/3/networkInterfaces/vmssf350bNic/ipConfigurations/vmssf350bIPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmpegszss2VNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_wbqhujrqkqkaecjvlez4kql3kjuokx62ayhp5pxuiktgj/providers/Microsoft.Network/virtualNetworks/vmpegszss2VNET","etag":"W/\"6220c256-d194-40cd-ae7a-296ab25efbbf\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"8543d1d5-a01e-49b2-a48c-23f771c23759","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmpegszss2Subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_wbqhujrqkqkaecjvlez4kql3kjuokx62ayhp5pxuiktgj/providers/Microsoft.Network/virtualNetworks/vmpegszss2VNET/subnets/vmpegszss2Subnet","etag":"W/\"6220c256-d194-40cd-ae7a-296ab25efbbf\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"vmtrg55pc2VNET","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_wws6rf3szk4njqxzd5gnn46dl6jsnandg3f4x4hgynzzb/providers/Microsoft.Network/virtualNetworks/vmtrg55pc2VNET","etag":"W/\"8b68c774-c88c-47d3-9d43-8c77bcbe2f3c\"","type":"Microsoft.Network/virtualNetworks","location":"centraluseuap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"d39ac177-f6cf-40e5-83a6-7d46a880c1d8","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"vmtrg55pc2Subnet","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_wws6rf3szk4njqxzd5gnn46dl6jsnandg3f4x4hgynzzb/providers/Microsoft.Network/virtualNetworks/vmtrg55pc2VNET/subnets/vmtrg55pc2Subnet","etag":"W/\"8b68c774-c88c-47d3-9d43-8c77bcbe2f3c\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","ipConfigurations":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_wws6rf3szk4njqxzd5gnn46dl6jsnandg3f4x4hgynzzb/providers/Microsoft.Compute/virtualMachineScaleSets/vmss4xbwxk/virtualMachines/0/networkInterfaces/vmss41653Nic/ipConfigurations/vmss41653IPConfig"},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_test_capacity_reservation_wws6rf3szk4njqxzd5gnn46dl6jsnandg3f4x4hgynzzb/providers/Microsoft.Compute/virtualMachineScaleSets/vmss4xbwxk/virtualMachines/2/networkInterfaces/vmss41653Nic/ipConfigurations/vmss41653IPConfig"}],"delegations":[],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"clitestvnet1","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgl6kzjmeryiey3qq6r3t2fpgbpghqhjxjs53hyzljt5ht53gn6dzdhduqzthm5g5ck/providers/Microsoft.Network/virtualNetworks/clitestvnet1","etag":"W/\"7a1da782-35a9-4466-b02a-4f7ee4cacbba\"","type":"Microsoft.Network/virtualNetworks","location":"eastus2euap","properties":{"provisioningState":"Succeeded","resourceGuid":"b7133b38-9624-4f98-a809-325eb7914a21","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"Subnetetserver2postgres","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgl6kzjmeryiey3qq6r3t2fpgbpghqhjxjs53hyzljt5ht53gn6dzdhduqzthm5g5ck/providers/Microsoft.Network/virtualNetworks/clitestvnet1/subnets/Subnetetserver2postgres","etag":"W/\"7a1da782-35a9-4466-b02a-4f7ee4cacbba\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","serviceAssociationLinks":[{"name":"Subnetetserver2postgres-service-association-link","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgl6kzjmeryiey3qq6r3t2fpgbpghqhjxjs53hyzljt5ht53gn6dzdhduqzthm5g5ck/providers/Microsoft.Network/virtualNetworks/clitestvnet1/subnets/Subnetetserver2postgres/serviceAssociationLinks/Subnetetserver2postgres-service-association-link","etag":"W/\"7a1da782-35a9-4466-b02a-4f7ee4cacbba\"","type":"Microsoft.Network/virtualNetworks/subnets/serviceAssociationLinks","properties":{"provisioningState":"Succeeded","linkedResourceType":"Microsoft.DBforPostgreSQL/flexibleServers","enabledForArmDeployments":false,"allowDelete":false,"locations":[]}}],"serviceEndpoints":[{"provisioningState":"Succeeded","service":"Microsoft.Storage","locations":["eastus2euap","centraluseuap"]}],"delegations":[{"name":"Microsoft.DBforPostgreSQL/flexibleServers","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgl6kzjmeryiey3qq6r3t2fpgbpghqhjxjs53hyzljt5ht53gn6dzdhduqzthm5g5ck/providers/Microsoft.Network/virtualNetworks/clitestvnet1/subnets/Subnetetserver2postgres/delegations/Microsoft.DBforPostgreSQL/flexibleServers","etag":"W/\"7a1da782-35a9-4466-b02a-4f7ee4cacbba\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.DBforPostgreSQL/flexibleServers","actions":["Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"testvnet2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmbhlwg6cz2/providers/Microsoft.Network/virtualNetworks/testvnet2","etag":"W/\"f06ab616-e04f-4dde-acff-c871d2451f4d\"","type":"Microsoft.Network/virtualNetworks","location":"eastus2euap","properties":{"provisioningState":"Succeeded","resourceGuid":"5ec94fbd-ba43-4024-b3b6-3fd34e176171","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"Subnetvnet-preparer-server","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmbhlwg6cz2/providers/Microsoft.Network/virtualNetworks/testvnet2/subnets/Subnetvnet-preparer-server","etag":"W/\"f06ab616-e04f-4dde-acff-c871d2451f4d\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[{"name":"Microsoft.DBforPostgreSQL/flexibleServers","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmbhlwg6cz2/providers/Microsoft.Network/virtualNetworks/testvnet2/subnets/Subnetvnet-preparer-server/delegations/Microsoft.DBforPostgreSQL/flexibleServers","etag":"W/\"f06ab616-e04f-4dde-acff-c871d2451f4d\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.DBforPostgreSQL/flexibleServers","actions":["Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"testvnet4","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmbhlwg6cz2/providers/Microsoft.Network/virtualNetworks/testvnet4","etag":"W/\"3ab4aa22-204c-442b-9967-a9f743a11f0b\"","type":"Microsoft.Network/virtualNetworks","location":"eastus2euap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"c125a3e0-745e-4327-b9c1-209bacf02dd7","addressSpace":{"addressPrefixes":["173.1.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"Subnetvnet-preparer-server","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmbhlwg6cz2/providers/Microsoft.Network/virtualNetworks/testvnet4/subnets/Subnetvnet-preparer-server","etag":"W/\"3ab4aa22-204c-442b-9967-a9f743a11f0b\"","properties":{"provisioningState":"Succeeded","addressPrefix":"173.1.1.0/24","delegations":[{"name":"Microsoft.DBforPostgreSQL/flexibleServers","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgmbhlwg6cz2/providers/Microsoft.Network/virtualNetworks/testvnet4/subnets/Subnetvnet-preparer-server/delegations/Microsoft.DBforPostgreSQL/flexibleServers","etag":"W/\"3ab4aa22-204c-442b-9967-a9f743a11f0b\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.DBforPostgreSQL/flexibleServers","actions":["Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"testvnet2","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtgjelif2kk/providers/Microsoft.Network/virtualNetworks/testvnet2","etag":"W/\"6472de7d-b378-4502-92df-621f72884257\"","type":"Microsoft.Network/virtualNetworks","location":"eastus2euap","properties":{"provisioningState":"Succeeded","resourceGuid":"eb2451c3-b19c-4b7b-a132-613d27f8cbb0","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"Subnetvnet-preparer-server","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtgjelif2kk/providers/Microsoft.Network/virtualNetworks/testvnet2/subnets/Subnetvnet-preparer-server","etag":"W/\"6472de7d-b378-4502-92df-621f72884257\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","delegations":[{"name":"Microsoft.DBforPostgreSQL/flexibleServers","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtgjelif2kk/providers/Microsoft.Network/virtualNetworks/testvnet2/subnets/Subnetvnet-preparer-server/delegations/Microsoft.DBforPostgreSQL/flexibleServers","etag":"W/\"6472de7d-b378-4502-92df-621f72884257\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.DBforPostgreSQL/flexibleServers","actions":["Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"testvnet4","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtgjelif2kk/providers/Microsoft.Network/virtualNetworks/testvnet4","etag":"W/\"14a3eb91-1cf9-479b-bf7b-3c3c72c6b0d1\"","type":"Microsoft.Network/virtualNetworks","location":"eastus2euap","tags":{},"properties":{"provisioningState":"Succeeded","resourceGuid":"4022e7b7-1942-4e9b-9fcd-7e089260f13a","addressSpace":{"addressPrefixes":["173.1.0.0/16"]},"dhcpOptions":{"dnsServers":[]},"subnets":[{"name":"Subnetvnet-preparer-server","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtgjelif2kk/providers/Microsoft.Network/virtualNetworks/testvnet4/subnets/Subnetvnet-preparer-server","etag":"W/\"14a3eb91-1cf9-479b-bf7b-3c3c72c6b0d1\"","properties":{"provisioningState":"Succeeded","addressPrefix":"173.1.1.0/24","delegations":[{"name":"Microsoft.DBforPostgreSQL/flexibleServers","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgtgjelif2kk/providers/Microsoft.Network/virtualNetworks/testvnet4/subnets/Subnetvnet-preparer-server/delegations/Microsoft.DBforPostgreSQL/flexibleServers","etag":"W/\"14a3eb91-1cf9-479b-bf7b-3c3c72c6b0d1\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.DBforPostgreSQL/flexibleServers","actions":["Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}},{"name":"clitestvnet3","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgvsrrci2gv23pas67rbcxkq3wi3mlj5wohqb6capbzzu6mnlijgtvkrydqtmes4xth/providers/Microsoft.Network/virtualNetworks/clitestvnet3","etag":"W/\"f6c0b40b-5faf-4c08-98ac-63b80a1ebf5a\"","type":"Microsoft.Network/virtualNetworks","location":"eastus2euap","properties":{"provisioningState":"Succeeded","resourceGuid":"3f5d23b7-51e2-47c9-8e24-dc7b296c7d48","addressSpace":{"addressPrefixes":["10.0.0.0/16"]},"subnets":[{"name":"Subnetetserver4postgres","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgvsrrci2gv23pas67rbcxkq3wi3mlj5wohqb6capbzzu6mnlijgtvkrydqtmes4xth/providers/Microsoft.Network/virtualNetworks/clitestvnet3/subnets/Subnetetserver4postgres","etag":"W/\"f6c0b40b-5faf-4c08-98ac-63b80a1ebf5a\"","properties":{"provisioningState":"Succeeded","addressPrefix":"10.0.0.0/24","serviceAssociationLinks":[{"name":"Subnetetserver4postgres-service-association-link","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgvsrrci2gv23pas67rbcxkq3wi3mlj5wohqb6capbzzu6mnlijgtvkrydqtmes4xth/providers/Microsoft.Network/virtualNetworks/clitestvnet3/subnets/Subnetetserver4postgres/serviceAssociationLinks/Subnetetserver4postgres-service-association-link","etag":"W/\"f6c0b40b-5faf-4c08-98ac-63b80a1ebf5a\"","type":"Microsoft.Network/virtualNetworks/subnets/serviceAssociationLinks","properties":{"provisioningState":"Succeeded","linkedResourceType":"Microsoft.DBforPostgreSQL/flexibleServers","enabledForArmDeployments":false,"allowDelete":false,"locations":[]}}],"serviceEndpoints":[{"provisioningState":"Succeeded","service":"Microsoft.Storage","locations":["eastus2euap","centraluseuap"]}],"delegations":[{"name":"Microsoft.DBforPostgreSQL/flexibleServers","id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/clitest.rgvsrrci2gv23pas67rbcxkq3wi3mlj5wohqb6capbzzu6mnlijgtvkrydqtmes4xth/providers/Microsoft.Network/virtualNetworks/clitestvnet3/subnets/Subnetetserver4postgres/delegations/Microsoft.DBforPostgreSQL/flexibleServers","etag":"W/\"f6c0b40b-5faf-4c08-98ac-63b80a1ebf5a\"","properties":{"provisioningState":"Succeeded","serviceName":"Microsoft.DBforPostgreSQL/flexibleServers","actions":["Microsoft.Network/virtualNetworks/subnets/join/action"]},"type":"Microsoft.Network/virtualNetworks/subnets/delegations"}],"privateEndpointNetworkPolicies":"Enabled","privateLinkServiceNetworkPolicies":"Enabled"},"type":"Microsoft.Network/virtualNetworks/subnets"}],"virtualNetworkPeerings":[],"enableDdosProtection":false}}]}' headers: cache-control: no-cache + content-length: '11640' content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:09 GMT + date: Fri, 05 Nov 2021 09:33:54 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -519,11 +449,11 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: e389dd64-35ea-4271-9d9e-637f1f17be89 + x-ms-original-request-ids: b6b046b1-0361-461f-b44d-ca32b2c124f5 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/virtualNetworks?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/virtualNetworks?api-version=2021-05-01 - request: body: '{"tags": {"tag1": "value1", "tag2": "value2"}}' headers: @@ -534,33 +464,33 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\"\ - ,\r\n \"etag\": \"W/\\\"2c230c05-86b8-4414-baff-fc4126bf19a1\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"784b2fb3-f0be-49c8-86d6-848af5b0eddd\",\r\n \ - \ \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [\r\n {\r\n \"name\"\ - : \"subnetname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\"\ - ,\r\n \"etag\": \"W/\\\"2c230c05-86b8-4414-baff-fc4126bf19a1\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\"\ - : [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \ - \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\ - \n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n \ - \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\"\ - : false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetworkname\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname\",\r\n + \ \"etag\": \"W/\\\"fbbbced6-5ba2-4357-9fe2-3f3b1bce4d1c\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"0cc0a199-1bcb-433c-9f79-fea03da61b79\",\r\n \"addressSpace\": + {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n + \ },\r\n \"subnets\": [\r\n {\r\n \"name\": \"subnetname\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname\",\r\n + \ \"etag\": \"W/\\\"fbbbced6-5ba2-4357-9fe2-3f3b1bce4d1c\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": + [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": + \"Enabled\"\r\n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n + \ }\r\n ],\r\n \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": + false\r\n }\r\n}" headers: azure-asyncnotification: Enabled cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:12 GMT + date: Fri, 05 Nov 2021 09:33:56 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -568,55 +498,57 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: d187b44f-861e-49ed-a480-5f8323575dd1 + x-ms-arm-service-request-id: 52d9bd9f-d91e-42ab-9384-6de029141bca x-ms-ratelimit-remaining-subscription-writes: '1197' status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 response: body: string: '' headers: - azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/4779308e-1ceb-48b7-b6c8-03302787cf68?api-version=2021-03-01 + azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e7624955-04a7-44b7-ad8d-0d543121aada?api-version=2021-05-01 cache-control: no-cache content-length: '0' - date: Sat, 09 Oct 2021 06:57:12 GMT + date: Fri, 05 Nov 2021 09:33:56 GMT expires: '-1' - location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/4779308e-1ceb-48b7-b6c8-03302787cf68?api-version=2021-03-01 + location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/e7624955-04a7-44b7-ad8d-0d543121aada?api-version=2021-05-01 pragma: no-cache server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff - x-ms-arm-service-request-id: e4f01ec4-5aea-420b-9e9b-d704ace96010 + x-ms-arm-service-request-id: 0a3e9816-5c33-44a9-b55e-6eeb30e75766 x-ms-ratelimit-remaining-subscription-deletes: '14999' status: code: 202 message: Accepted - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname/subnets/subnetname?api-version=2021-05-01 - request: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/4779308e-1ceb-48b7-b6c8-03302787cf68?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e7624955-04a7-44b7-ad8d-0d543121aada?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:23 GMT + date: Fri, 05 Nov 2021 09:34:06 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -624,55 +556,57 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: dc4cf2a3-d28a-46d3-9ad3-39bde0828c28 + x-ms-arm-service-request-id: 5ca3bdfc-054d-4174-9d98-5d001a9b026d status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/4779308e-1ceb-48b7-b6c8-03302787cf68?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e7624955-04a7-44b7-ad8d-0d543121aada?api-version=2021-05-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 response: body: string: '' headers: azure-asyncnotification: Enabled - azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/46c329b5-ae41-4de1-a8f0-9bb8f9293f69?api-version=2021-03-01 + azure-asyncoperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/412767f0-62e2-4c7b-ba63-0f7df76a1b5e?api-version=2021-05-01 cache-control: no-cache content-length: '0' - date: Sat, 09 Oct 2021 06:57:24 GMT + date: Fri, 05 Nov 2021 09:34:06 GMT expires: '-1' - location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/46c329b5-ae41-4de1-a8f0-9bb8f9293f69?api-version=2021-03-01 + location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/412767f0-62e2-4c7b-ba63-0f7df76a1b5e?api-version=2021-05-01 pragma: no-cache server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000; includeSubDomains x-content-type-options: nosniff - x-ms-arm-service-request-id: 4263329f-c099-4617-ae7b-adf95fb12a35 + x-ms-arm-service-request-id: 9c602f85-6579-4b85-a0bb-37fb628f3ab8 x-ms-ratelimit-remaining-subscription-deletes: '14998' status: code: 202 message: Accepted - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-ai55nvbuzx67lvruftflooqzn6mtrkqticmd2u7pvzc3bl5fsdtqbj4cjlldktbhyxxnwfekdcr/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgpy-olhm4r67e3224hjavnah5khztlbpsoxgnflud5iutfpppztqabacpixiulvpp5rlzms3dmbaqrq/providers/Microsoft.Network/virtualNetworks/virtualnetworkname?api-version=2021-05-01 - request: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/46c329b5-ae41-4de1-a8f0-9bb8f9293f69?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/412767f0-62e2-4c7b-ba63-0f7df76a1b5e?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" headers: cache-control: no-cache content-type: application/json; charset=utf-8 - date: Sat, 09 Oct 2021 06:57:34 GMT + date: Fri, 05 Nov 2021 09:34:16 GMT expires: '-1' pragma: no-cache server: Microsoft-HTTPAPI/2.0 @@ -680,9 +614,9 @@ interactions: transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff - x-ms-arm-service-request-id: ab37011f-5774-40ef-b387-3224570dfa00 + x-ms-arm-service-request-id: 419313cf-4372-4f7d-b4c2-3afd58ceba59 status: code: 200 message: OK - url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/46c329b5-ae41-4de1-a8f0-9bb8f9293f69?api-version=2021-03-01 + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/412767f0-62e2-4c7b-ba63-0f7df76a1b5e?api-version=2021-05-01 version: 1 diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_endpoint.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_endpoint.test_network.yaml index 00dbe635c0c5..41b5ad21e0dc 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_endpoint.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_endpoint.test_network.yaml @@ -14,24 +14,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetwork\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork\"\ - ,\r\n \"etag\": \"W/\\\"743a9444-b3a2-483e-881b-d0d424218691\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"ed25d3c0-7a23-4fb6-a2de-a4dacb73521d\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetwork\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork\",\r\n + \ \"etag\": \"W/\\\"584b1a59-3268-4166-9a99-d1489985b5c1\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"c37d51d5-5fb9-4ad3-9b6a-c618aac056aa\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n + \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/4464fdd7-bbda-40ff-8be1-7914b0e2f7d3?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e2c7a96a-1d12-47b5-806e-be55cd275d92?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -39,7 +40,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:57:52 GMT + - Fri, 05 Nov 2021 09:34:22 GMT expires: - '-1' pragma: @@ -52,7 +53,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 31ce2c21-d07d-425e-8b6a-e05d861c97a7 + - d7579eb3-f5de-4ac2-82e2-7592af136d94 x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -68,9 +69,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/4464fdd7-bbda-40ff-8be1-7914b0e2f7d3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e2c7a96a-1d12-47b5-806e-be55cd275d92?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -82,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:57:55 GMT + - Fri, 05 Nov 2021 09:34:25 GMT expires: - '-1' pragma: @@ -99,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8ec25170-e2d0-48dd-9ab2-b2f137d94ef6 + - ddda78de-d80f-4f8e-8336-7f326cf9c360 status: code: 200 message: OK @@ -113,19 +115,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualnetwork\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork\"\ - ,\r\n \"etag\": \"W/\\\"ed1a51b7-4c71-431f-867f-7610665b330a\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"ed25d3c0-7a23-4fb6-a2de-a4dacb73521d\",\r\n \"\ - addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\ - \r\n ]\r\n },\r\n \"subnets\": [],\r\n \"virtualNetworkPeerings\"\ - : [],\r\n \"enableDdosProtection\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualnetwork\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork\",\r\n + \ \"etag\": \"W/\\\"e9a348fd-ed38-4cf7-a5b7-0d80e8db9029\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualNetworks\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"c37d51d5-5fb9-4ad3-9b6a-c618aac056aa\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": + [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"subnets\": [],\r\n + \ \"virtualNetworkPeerings\": [],\r\n \"enableDdosProtection\": false\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -134,9 +137,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:57:56 GMT + - Fri, 05 Nov 2021 09:34:25 GMT etag: - - W/"ed1a51b7-4c71-431f-867f-7610665b330a" + - W/"e9a348fd-ed38-4cf7-a5b7-0d80e8db9029" expires: - '-1' pragma: @@ -153,7 +156,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ed7242b2-2248-455f-b1ac-32aab2d1b2a4 + - 057ceec0-736e-470e-ab4c-459e2b6a66fb status: code: 200 message: OK @@ -172,20 +175,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\ - ,\r\n \"etag\": \"W/\\\"6bfe5ccb-bcc8-42c9-a5f7-97d75a90e3d7\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Disabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\",\r\n + \ \"etag\": \"W/\\\"94e3e770-170c-4b69-b62a-3acf9cbe7f8f\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Disabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/8a8cd9c1-d080-4f8d-839e-6ac41bfd9fda?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/23ed0113-5444-4006-8e34-28cc8cb0d7e3?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -193,7 +197,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:57:56 GMT + - Fri, 05 Nov 2021 09:34:26 GMT expires: - '-1' pragma: @@ -206,7 +210,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ebb04829-35aa-4f7b-a55c-8284e8813bd9 + - a8a116c0-80b2-49b0-bf2e-fd5fdaf2df27 x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -222,9 +226,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/8a8cd9c1-d080-4f8d-839e-6ac41bfd9fda?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/23ed0113-5444-4006-8e34-28cc8cb0d7e3?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -236,7 +241,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:00 GMT + - Fri, 05 Nov 2021 09:34:29 GMT expires: - '-1' pragma: @@ -253,7 +258,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 304636e5-afab-40fa-b930-18409e002e0c + - ff929e19-4ee2-4076-9906-259073588475 status: code: 200 message: OK @@ -267,17 +272,18 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\ - ,\r\n \"etag\": \"W/\\\"86e0440b-a290-4017-a5a5-d92829ff098a\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.0.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Enabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Disabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"subnet1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\",\r\n + \ \"etag\": \"W/\\\"cae644fc-b454-4448-9c53-08c9ec7b1fda\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.0.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Enabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Disabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: cache-control: - no-cache @@ -286,9 +292,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:00 GMT + - Fri, 05 Nov 2021 09:34:29 GMT etag: - - W/"86e0440b-a290-4017-a5a5-d92829ff098a" + - W/"cae644fc-b454-4448-9c53-08c9ec7b1fda" expires: - '-1' pragma: @@ -305,7 +311,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e7205887-fce7-4581-96b1-2234ad3454e0 + - 07017b00-b3ce-42b8-8b65-146e037ddbcf status: code: 200 message: OK @@ -324,20 +330,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\"\ - ,\r\n \"etag\": \"W/\\\"f0621097-978e-4da3-973d-3ab4237ef45b\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - addressPrefix\": \"10.0.1.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"subnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\",\r\n + \ \"etag\": \"W/\\\"128c7ff2-91ce-4c09-bfc3-1544849b5acc\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/d1cd8404-74b6-4dc7-a4eb-15a7c90f52ce?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/09f1d3ef-6a89-440d-81b8-80cde1bac530?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -345,7 +352,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:01 GMT + - Fri, 05 Nov 2021 09:34:29 GMT expires: - '-1' pragma: @@ -358,7 +365,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - bac558f8-c542-4283-8140-9a02d41a58bb + - 9013db4e-5de8-4784-aea5-0b25d3a9c531 x-ms-ratelimit-remaining-subscription-writes: - '1196' status: @@ -374,9 +381,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/d1cd8404-74b6-4dc7-a4eb-15a7c90f52ce?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/09f1d3ef-6a89-440d-81b8-80cde1bac530?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -388,7 +396,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:04 GMT + - Fri, 05 Nov 2021 09:34:32 GMT expires: - '-1' pragma: @@ -405,7 +413,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d311bd03-3f4d-4784-b40f-19fe0eea66be + - 6d7826aa-16ed-4c72-a738-07f6742f2f07 status: code: 200 message: OK @@ -419,17 +427,18 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"subnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\"\ - ,\r\n \"etag\": \"W/\\\"be1d1a2e-06ec-40d7-9d48-87361f47fc36\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.1.0/24\",\r\n \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\"\ - : \"Disabled\",\r\n \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\ - \n },\r\n \"type\": \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" + string: "{\r\n \"name\": \"subnet2\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\",\r\n + \ \"etag\": \"W/\\\"f822bbac-94e7-4c8c-bb8b-8ccdf600d709\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.1.0/24\",\r\n + \ \"delegations\": [],\r\n \"privateEndpointNetworkPolicies\": \"Disabled\",\r\n + \ \"privateLinkServiceNetworkPolicies\": \"Enabled\"\r\n },\r\n \"type\": + \"Microsoft.Network/virtualNetworks/subnets\"\r\n}" headers: cache-control: - no-cache @@ -438,9 +447,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:05 GMT + - Fri, 05 Nov 2021 09:34:32 GMT etag: - - W/"be1d1a2e-06ec-40d7-9d48-87361f47fc36" + - W/"f822bbac-94e7-4c8c-bb8b-8ccdf600d709" expires: - '-1' pragma: @@ -457,7 +466,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6f1a020a-1ec3-4082-935c-7d503cb7d8a9 + - 70db2889-ca0e-462c-91c6-e0c5fa1f399b status: code: 200 message: OK @@ -476,34 +485,33 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"loadbalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer\"\ - ,\r\n \"etag\": \"W/\\\"0ed7e65b-3d7f-4dc0-a218-6b687b8e166b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"5ec0d23b-6a1c-446a-bb6e-ddcc1c620ca0\",\r\n \"\ - frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myIPConfiguration\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\ - ,\r\n \"etag\": \"W/\\\"0ed7e65b-3d7f-4dc0-a218-6b687b8e166b\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\ - \r\n },\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n \ - \ }\r\n }\r\n ],\r\n \"backendAddressPools\": [],\r\n \"\ - loadBalancingRules\": [],\r\n \"probes\": [],\r\n \"inboundNatRules\"\ - : [],\r\n \"outboundRules\": [],\r\n \"inboundNatPools\": []\r\n },\r\ - \n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"loadbalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer\",\r\n + \ \"etag\": \"W/\\\"397229ea-5953-400c-ac05-b4b45f7f813f\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"0700baee-be69-4dce-a04d-ba3831399459\",\r\n + \ \"frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myIPConfiguration\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\",\r\n + \ \"etag\": \"W/\\\"397229ea-5953-400c-ac05-b4b45f7f813f\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": + \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\r\n + \ },\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n + \ }\r\n ],\r\n \"backendAddressPools\": [],\r\n \"loadBalancingRules\": + [],\r\n \"probes\": [],\r\n \"inboundNatRules\": [],\r\n \"outboundRules\": + [],\r\n \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": + \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/43723b9e-b856-4768-aebc-cc2518df650f?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5a56868a-f65f-41d6-8671-f514844a2362?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -511,7 +519,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:10 GMT + - Fri, 05 Nov 2021 09:34:34 GMT expires: - '-1' pragma: @@ -524,7 +532,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8a76bc44-47ba-4d94-aa1a-43fd9a555860 + - 6eb66bb7-4b93-4c93-8965-24b4700d65a0 x-ms-ratelimit-remaining-subscription-writes: - '1195' status: @@ -540,9 +548,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/43723b9e-b856-4768-aebc-cc2518df650f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5a56868a-f65f-41d6-8671-f514844a2362?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -554,7 +563,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:22 GMT + - Fri, 05 Nov 2021 09:34:44 GMT expires: - '-1' pragma: @@ -571,7 +580,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f7aff935-74cf-4ca3-be56-ba422afc5a5d + - e64a8853-5180-4fa5-ac54-de7b7a56df7c status: code: 200 message: OK @@ -585,29 +594,28 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"loadbalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer\"\ - ,\r\n \"etag\": \"W/\\\"f71c10ab-f645-4eee-b9e8-d602e8c1406f\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"5ec0d23b-6a1c-446a-bb6e-ddcc1c620ca0\",\r\n \"\ - frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myIPConfiguration\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\ - ,\r\n \"etag\": \"W/\\\"f71c10ab-f645-4eee-b9e8-d602e8c1406f\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\ - \r\n },\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n \ - \ }\r\n }\r\n ],\r\n \"backendAddressPools\": [],\r\n \"\ - loadBalancingRules\": [],\r\n \"probes\": [],\r\n \"inboundNatRules\"\ - : [],\r\n \"outboundRules\": [],\r\n \"inboundNatPools\": []\r\n },\r\ - \n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"loadbalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer\",\r\n + \ \"etag\": \"W/\\\"fb250634-fc1b-47f3-90eb-510a77418a83\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"0700baee-be69-4dce-a04d-ba3831399459\",\r\n + \ \"frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myIPConfiguration\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\",\r\n + \ \"etag\": \"W/\\\"fb250634-fc1b-47f3-90eb-510a77418a83\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAddress\": \"10.0.0.4\",\r\n \"privateIPAllocationMethod\": + \"Dynamic\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\r\n + \ },\r\n \"privateIPAddressVersion\": \"IPv4\"\r\n }\r\n + \ }\r\n ],\r\n \"backendAddressPools\": [],\r\n \"loadBalancingRules\": + [],\r\n \"probes\": [],\r\n \"inboundNatRules\": [],\r\n \"outboundRules\": + [],\r\n \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": + \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -616,9 +624,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:23 GMT + - Fri, 05 Nov 2021 09:34:44 GMT etag: - - W/"f71c10ab-f645-4eee-b9e8-d602e8c1406f" + - W/"fb250634-fc1b-47f3-90eb-510a77418a83" expires: - '-1' pragma: @@ -635,7 +643,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2923b829-636d-429e-88de-aa951132ddee + - 8376a3ac-3814-4e34-96b5-01b726b6570d status: code: 200 message: OK @@ -659,39 +667,39 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\"\ - ,\r\n \"etag\": \"W/\\\"c1953363-e7dc-4f78-90eb-43f18351e564\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateLinkServices\",\r\n \"location\":\ - \ \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"resourceGuid\": \"491e4f8f-d59f-4dc5-8292-ce727d7995bb\",\r\n \ - \ \"fqdns\": [\r\n \"fqdn1\",\r\n \"fqdn2\",\r\n \"fqdn3\"\ - \r\n ],\r\n \"alias\": \"myservice.af99f146-02c4-4066-9b65-17af696ee052.eastus.azure.privatelinkservice\"\ - ,\r\n \"visibility\": {\r\n \"subscriptions\": [\r\n \"00000000-0000-0000-0000-000000000000\"\ - \r\n ]\r\n },\r\n \"autoApproval\": {\r\n \"subscriptions\"\ - : [\r\n \"00000000-0000-0000-0000-000000000000\"\r\n ]\r\n \ - \ },\r\n \"enableProxyProtocol\": false,\r\n \"loadBalancerFrontendIpConfigurations\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\ - \r\n }\r\n ],\r\n \"ipConfigurations\": [\r\n {\r\n \ - \ \"name\": \"myIPConfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/ipConfigurations/myIPConfiguration\"\ - ,\r\n \"etag\": \"W/\\\"c1953363-e7dc-4f78-90eb-43f18351e564\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/privateLinkServices/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"privateEndpointConnections\"\ - : [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myService.nic.3d855175-e267-48fc-ae20-23d66e087a92\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\",\r\n + \ \"etag\": \"W/\\\"342c9868-8338-470f-b111-c9f71a1aa44c\\\"\",\r\n \"type\": + \"Microsoft.Network/privateLinkServices\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"64281dd1-9cc4-42cd-98c6-7a571ff4f480\",\r\n \"fqdns\": [\r\n \"fqdn1\",\r\n + \ \"fqdn2\",\r\n \"fqdn3\"\r\n ],\r\n \"alias\": \"myservice.fd93ffb3-ec4e-4418-84eb-cff313fb390b.eastus.azure.privatelinkservice\",\r\n + \ \"visibility\": {\r\n \"subscriptions\": [\r\n \"00000000-0000-0000-0000-000000000000\"\r\n + \ ]\r\n },\r\n \"autoApproval\": {\r\n \"subscriptions\": [\r\n + \ \"00000000-0000-0000-0000-000000000000\"\r\n ]\r\n },\r\n + \ \"enableProxyProtocol\": false,\r\n \"loadBalancerFrontendIpConfigurations\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\r\n + \ }\r\n ],\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": + \"myIPConfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/ipConfigurations/myIPConfiguration\",\r\n + \ \"etag\": \"W/\\\"342c9868-8338-470f-b111-c9f71a1aa44c\\\"\",\r\n + \ \"type\": \"Microsoft.Network/privateLinkServices/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"subnet\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"privateEndpointConnections\": + [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myService.nic.7be8acb7-4145-4031-80a6-ee1e62c4cde4\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/8f5f08a4-ac24-4a49-9dd9-ca2d019e7332?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/32e01119-b065-495f-9968-af08dd09dc59?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -699,7 +707,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:27 GMT + - Fri, 05 Nov 2021 09:34:46 GMT expires: - '-1' pragma: @@ -712,7 +720,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cebf171e-112d-4fda-8bfc-b40d40410c18 + - d90c5f00-5787-4cb7-8b0b-9a28959a01f2 x-ms-ratelimit-remaining-subscription-writes: - '1194' status: @@ -728,9 +736,56 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/8f5f08a4-ac24-4a49-9dd9-ca2d019e7332?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/32e01119-b065-495f-9968-af08dd09dc59?api-version=2021-05-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 05 Nov 2021 09:34:56 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 5ddbbd11-a17f-4dcb-9ab3-14ba3e018338 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/32e01119-b065-495f-9968-af08dd09dc59?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -742,7 +797,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:37 GMT + - Fri, 05 Nov 2021 09:35:07 GMT expires: - '-1' pragma: @@ -759,7 +814,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - fb0faf03-688f-4504-89b2-d3547f2aecb5 + - 75d992fe-238e-4c8e-9f01-741abe9254fb status: code: 200 message: OK @@ -773,34 +828,34 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\"\ - ,\r\n \"etag\": \"W/\\\"04c6602c-8659-4b7e-bb42-48cc5d06b20b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateLinkServices\",\r\n \"location\":\ - \ \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"491e4f8f-d59f-4dc5-8292-ce727d7995bb\",\r\n \ - \ \"fqdns\": [\r\n \"fqdn1\",\r\n \"fqdn2\",\r\n \"fqdn3\"\ - \r\n ],\r\n \"alias\": \"myservice.af99f146-02c4-4066-9b65-17af696ee052.eastus.azure.privatelinkservice\"\ - ,\r\n \"visibility\": {\r\n \"subscriptions\": [\r\n \"00000000-0000-0000-0000-000000000000\"\ - \r\n ]\r\n },\r\n \"autoApproval\": {\r\n \"subscriptions\"\ - : [\r\n \"00000000-0000-0000-0000-000000000000\"\r\n ]\r\n \ - \ },\r\n \"enableProxyProtocol\": false,\r\n \"loadBalancerFrontendIpConfigurations\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\ - \r\n }\r\n ],\r\n \"ipConfigurations\": [\r\n {\r\n \ - \ \"name\": \"myIPConfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/ipConfigurations/myIPConfiguration\"\ - ,\r\n \"etag\": \"W/\\\"04c6602c-8659-4b7e-bb42-48cc5d06b20b\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/privateLinkServices/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"privateEndpointConnections\"\ - : [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myService.nic.3d855175-e267-48fc-ae20-23d66e087a92\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\",\r\n + \ \"etag\": \"W/\\\"6b096649-8222-4397-9c69-eb41dd2b9c65\\\"\",\r\n \"type\": + \"Microsoft.Network/privateLinkServices\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"64281dd1-9cc4-42cd-98c6-7a571ff4f480\",\r\n \"fqdns\": [\r\n \"fqdn1\",\r\n + \ \"fqdn2\",\r\n \"fqdn3\"\r\n ],\r\n \"alias\": \"myservice.fd93ffb3-ec4e-4418-84eb-cff313fb390b.eastus.azure.privatelinkservice\",\r\n + \ \"visibility\": {\r\n \"subscriptions\": [\r\n \"00000000-0000-0000-0000-000000000000\"\r\n + \ ]\r\n },\r\n \"autoApproval\": {\r\n \"subscriptions\": [\r\n + \ \"00000000-0000-0000-0000-000000000000\"\r\n ]\r\n },\r\n + \ \"enableProxyProtocol\": false,\r\n \"loadBalancerFrontendIpConfigurations\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\r\n + \ }\r\n ],\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": + \"myIPConfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/ipConfigurations/myIPConfiguration\",\r\n + \ \"etag\": \"W/\\\"6b096649-8222-4397-9c69-eb41dd2b9c65\\\"\",\r\n + \ \"type\": \"Microsoft.Network/privateLinkServices/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"subnet\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"privateEndpointConnections\": + [],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myService.nic.7be8acb7-4145-4031-80a6-ee1e62c4cde4\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -809,9 +864,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:38 GMT + - Fri, 05 Nov 2021 09:35:07 GMT etag: - - W/"04c6602c-8659-4b7e-bb42-48cc5d06b20b" + - W/"6b096649-8222-4397-9c69-eb41dd2b9c65" expires: - '-1' pragma: @@ -828,7 +883,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6ceced13-6e2f-4dad-957c-ab5e21bedd6e + - f8348a7c-c9b2-4737-9c6e-59e8797c8035 status: code: 200 message: OK @@ -848,43 +903,43 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPrivateEndpoint\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\ - ,\r\n \"etag\": \"W/\\\"340ea538-182a-43d1-bab9-2276d357d774\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"\ - eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"resourceGuid\": \"e6ea4e43-69fa-4c05-93f4-196c69b81a38\",\r\n \ - \ \"privateLinkServiceConnections\": [\r\n {\r\n \"name\": \"\ - myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateLinkServiceConnections/myService\"\ - ,\r\n \"etag\": \"W/\\\"340ea538-182a-43d1-bab9-2276d357d774\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\"\ - ,\r\n \"privateLinkServiceConnectionState\": {\r\n \"\ - status\": \"Approved\",\r\n \"description\": \"\",\r\n \ - \ \"actionsRequired\": \"None\"\r\n }\r\n },\r\n \ - \ \"type\": \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\ - \r\n }\r\n ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\ - \n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\"\ - \r\n },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\":\ - \ [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myPrivateEndpoint.nic.50bf49ea-1ccf-48e2-8e96-cfbe188acc21\"\ - \r\n }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}" + string: "{\r\n \"name\": \"myPrivateEndpoint\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\",\r\n + \ \"etag\": \"W/\\\"cd68bc15-841f-44dc-bdf3-fb6dcb9a5aa1\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n \"privateLinkServiceConnections\": + [\r\n {\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateLinkServiceConnections/myService\",\r\n + \ \"etag\": \"W/\\\"cd68bc15-841f-44dc-bdf3-fb6dcb9a5aa1\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\",\r\n + \ \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"Auto Approved\",\r\n \"actionsRequired\": + \"None\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\r\n + \ }\r\n ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\n + \ \"customNetworkInterfaceName\": \"\",\r\n \"subnet\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\"\r\n + \ },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\": [\r\n + \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myPrivateEndpoint.nic.45072cbc-6395-4e28-a23d-bc2ed65540f0\"\r\n + \ }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7964b8c0-2180-4c41-b57f-12bed9099e91?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e95137e5-307c-45a8-96c3-94f38890d471?api-version=2021-05-01 cache-control: - no-cache content-length: - - '2212' + - '2264' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:43 GMT + - Fri, 05 Nov 2021 09:35:09 GMT expires: - '-1' pragma: @@ -897,7 +952,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - dc78d71c-3ae0-4367-a34b-45d0810d5304 + - 31baeddb-8e58-429c-bcac-01252e734296 x-ms-ratelimit-remaining-subscription-writes: - '1193' status: @@ -913,9 +968,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7964b8c0-2180-4c41-b57f-12bed9099e91?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e95137e5-307c-45a8-96c3-94f38890d471?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -927,7 +983,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:58:53 GMT + - Fri, 05 Nov 2021 09:35:19 GMT expires: - '-1' pragma: @@ -944,7 +1000,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5442d46f-054b-458b-8664-f55288bf1245 + - 258b386f-5099-46c5-b365-b68467f8e617 status: code: 200 message: OK @@ -958,9 +1014,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7964b8c0-2180-4c41-b57f-12bed9099e91?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e95137e5-307c-45a8-96c3-94f38890d471?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -972,7 +1029,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:59:04 GMT + - Fri, 05 Nov 2021 09:35:29 GMT expires: - '-1' pragma: @@ -989,7 +1046,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f0649469-25dd-40f5-a5c8-cee87ad17360 + - 8df6dd3b-2e3a-47ed-9df8-deaf8d249d81 status: code: 200 message: OK @@ -1003,9 +1060,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7964b8c0-2180-4c41-b57f-12bed9099e91?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e95137e5-307c-45a8-96c3-94f38890d471?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1017,7 +1075,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:59:24 GMT + - Fri, 05 Nov 2021 09:35:49 GMT expires: - '-1' pragma: @@ -1034,7 +1092,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 263b176f-d7c9-4b55-98fb-ed554bc2b1cb + - 16550606-180a-492e-850b-180322397026 status: code: 200 message: OK @@ -1048,41 +1106,41 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPrivateEndpoint\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\ - ,\r\n \"etag\": \"W/\\\"0bd7bd74-b172-42fe-9de5-59dee2d1c4dc\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"\ - eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"e6ea4e43-69fa-4c05-93f4-196c69b81a38\",\r\n \ - \ \"privateLinkServiceConnections\": [\r\n {\r\n \"name\": \"\ - myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateLinkServiceConnections/myService\"\ - ,\r\n \"etag\": \"W/\\\"0bd7bd74-b172-42fe-9de5-59dee2d1c4dc\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\"\ - ,\r\n \"privateLinkServiceConnectionState\": {\r\n \"\ - status\": \"Approved\",\r\n \"description\": \"Approved\",\r\n\ - \ \"actionsRequired\": \"None\"\r\n }\r\n },\r\n\ - \ \"type\": \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\ - \r\n }\r\n ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\ - \n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\"\ - \r\n },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\":\ - \ [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myPrivateEndpoint.nic.50bf49ea-1ccf-48e2-8e96-cfbe188acc21\"\ - \r\n }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}" + string: "{\r\n \"name\": \"myPrivateEndpoint\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\",\r\n + \ \"etag\": \"W/\\\"b1ceb113-8e16-461f-8dbd-59aeb773622b\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n \"privateLinkServiceConnections\": + [\r\n {\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateLinkServiceConnections/myService\",\r\n + \ \"etag\": \"W/\\\"b1ceb113-8e16-461f-8dbd-59aeb773622b\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\",\r\n + \ \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"Approved\",\r\n \"actionsRequired\": + \"None\"\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\r\n + \ }\r\n ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\n + \ \"customNetworkInterfaceName\": \"\",\r\n \"subnet\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\"\r\n + \ },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\": [\r\n + \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myPrivateEndpoint.nic.45072cbc-6395-4e28-a23d-bc2ed65540f0\"\r\n + \ }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '2221' + - '2260' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:59:24 GMT + - Fri, 05 Nov 2021 09:35:49 GMT etag: - - W/"0bd7bd74-b172-42fe-9de5-59dee2d1c4dc" + - W/"b1ceb113-8e16-461f-8dbd-59aeb773622b" expires: - '-1' pragma: @@ -1099,7 +1157,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cd730281-0140-46ab-bc66-e31af7f1be72 + - 8425721f-6a8d-4e9b-ab9b-c5823eb6ff0d status: code: 200 message: OK @@ -1113,45 +1171,44 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\"\ - ,\r\n \"etag\": \"W/\\\"6028b547-ff20-4851-82b9-24716aae3721\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateLinkServices\",\r\n \"location\":\ - \ \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"491e4f8f-d59f-4dc5-8292-ce727d7995bb\",\r\n \ - \ \"fqdns\": [\r\n \"fqdn1\",\r\n \"fqdn2\",\r\n \"fqdn3\"\ - \r\n ],\r\n \"alias\": \"myservice.af99f146-02c4-4066-9b65-17af696ee052.eastus.azure.privatelinkservice\"\ - ,\r\n \"visibility\": {\r\n \"subscriptions\": [\r\n \"00000000-0000-0000-0000-000000000000\"\ - \r\n ]\r\n },\r\n \"autoApproval\": {\r\n \"subscriptions\"\ - : [\r\n \"00000000-0000-0000-0000-000000000000\"\r\n ]\r\n \ - \ },\r\n \"enableProxyProtocol\": false,\r\n \"loadBalancerFrontendIpConfigurations\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\ - \r\n }\r\n ],\r\n \"ipConfigurations\": [\r\n {\r\n \ - \ \"name\": \"myIPConfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/ipConfigurations/myIPConfiguration\"\ - ,\r\n \"etag\": \"W/\\\"6028b547-ff20-4851-82b9-24716aae3721\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/privateLinkServices/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"privateEndpointConnections\"\ - : [\r\n {\r\n \"name\": \"myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38\"\ - ,\r\n \"etag\": \"W/\\\"6028b547-ff20-4851-82b9-24716aae3721\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateEndpoint\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\ - \r\n },\r\n \"privateLinkServiceConnectionState\": {\r\n\ - \ \"status\": \"Approved\",\r\n \"description\": \"\ - Approved\",\r\n \"actionsRequired\": \"None\"\r\n },\r\ - \n \"linkIdentifier\": \"536884267\"\r\n },\r\n \"\ - type\": \"Microsoft.Network/privateLinkServices/privateEndpointConnections\"\ - \r\n }\r\n ],\r\n \"networkInterfaces\": [\r\n {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myService.nic.3d855175-e267-48fc-ae20-23d66e087a92\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\",\r\n + \ \"etag\": \"W/\\\"7172f48b-41fb-4a30-a2d2-832b3c58400c\\\"\",\r\n \"type\": + \"Microsoft.Network/privateLinkServices\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"64281dd1-9cc4-42cd-98c6-7a571ff4f480\",\r\n \"fqdns\": [\r\n \"fqdn1\",\r\n + \ \"fqdn2\",\r\n \"fqdn3\"\r\n ],\r\n \"alias\": \"myservice.fd93ffb3-ec4e-4418-84eb-cff313fb390b.eastus.azure.privatelinkservice\",\r\n + \ \"visibility\": {\r\n \"subscriptions\": [\r\n \"00000000-0000-0000-0000-000000000000\"\r\n + \ ]\r\n },\r\n \"autoApproval\": {\r\n \"subscriptions\": [\r\n + \ \"00000000-0000-0000-0000-000000000000\"\r\n ]\r\n },\r\n + \ \"enableProxyProtocol\": false,\r\n \"loadBalancerFrontendIpConfigurations\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\r\n + \ }\r\n ],\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": + \"myIPConfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/ipConfigurations/myIPConfiguration\",\r\n + \ \"etag\": \"W/\\\"7172f48b-41fb-4a30-a2d2-832b3c58400c\\\"\",\r\n + \ \"type\": \"Microsoft.Network/privateLinkServices/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"subnet\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"privateEndpointConnections\": + [\r\n {\r\n \"name\": \"myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n + \ \"etag\": \"W/\\\"7172f48b-41fb-4a30-a2d2-832b3c58400c\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateEndpoint\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\r\n + \ },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"Approved\",\r\n \"actionsRequired\": + \"None\"\r\n },\r\n \"linkIdentifier\": \"536937263\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/privateLinkServices/privateEndpointConnections\"\r\n + \ }\r\n ],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myService.nic.7be8acb7-4145-4031-80a6-ee1e62c4cde4\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -1160,9 +1217,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:59:25 GMT + - Fri, 05 Nov 2021 09:35:49 GMT etag: - - W/"6028b547-ff20-4851-82b9-24716aae3721" + - W/"7172f48b-41fb-4a30-a2d2-832b3c58400c" expires: - '-1' pragma: @@ -1179,12 +1236,12 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d1ecbcfb-6eda-4c5f-a7e8-f33736e7e8b8 + - df752965-f43e-4138-baf4-9dacb6e3e225 status: code: 200 message: OK - request: - body: '{"name": "myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38", "properties": + body: '{"name": "myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf", "properties": {"privateLinkServiceConnectionState": {"status": "Approved", "description": "approved it for some reason."}}}' headers: @@ -1199,24 +1256,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38\"\ - ,\r\n \"etag\": \"W/\\\"b3c110c1-08dc-4fb7-ab9a-0c1d3d9f0210\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - privateEndpoint\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\ - \r\n },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\"\ - : \"Approved\",\r\n \"description\": \"approved it for some reason.\"\ - ,\r\n \"actionsRequired\": \"\"\r\n },\r\n \"linkIdentifier\":\ - \ \"536884267\"\r\n },\r\n \"type\": \"Microsoft.Network/privateLinkServices/privateEndpointConnections\"\ - \r\n}" + string: "{\r\n \"name\": \"myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n + \ \"etag\": \"W/\\\"22afe013-ead5-4b4f-a7e5-0738a845aa70\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"privateEndpoint\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\r\n + \ },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"approved it for some reason.\",\r\n + \ \"actionsRequired\": \"\"\r\n },\r\n \"linkIdentifier\": \"536937263\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/privateLinkServices/privateEndpointConnections\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/df772347-dc48-4901-aea1-aa8564e994cf?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/fcfdb5c1-fca2-4966-adc9-4e495913be3c?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -1224,7 +1281,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:59:25 GMT + - Fri, 05 Nov 2021 09:35:49 GMT expires: - '-1' pragma: @@ -1241,7 +1298,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 183f4644-8398-4d09-b6e2-ce5e96129f0a + - 53365c7f-e5bf-4e42-965f-e3035655ba49 x-ms-ratelimit-remaining-subscription-writes: - '1192' status: @@ -1261,8 +1318,9 @@ interactions: Content-Type: - application/json; charset=utf-8 User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.21 msrest_azure/0.6.2 azure-mgmt-privatedns/0.1.0 Azure-SDK-For-Python + - python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 msrest_azure/0.6.4 + azure-mgmt-privatedns/0.1.0 Azure-SDK-For-Python accept-language: - en-US method: PUT @@ -1272,7 +1330,7 @@ interactions: string: '{}' headers: azure-asyncoperation: - - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTthYmM2NTRlNi01NTZiLTRlM2QtYTY2OC0yZGM4MTFiZWJhNTg=?api-version=2018-09-01 + - https://management.azure.com:443/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTs0ZDljYmU0OS0xODk3LTRiYzgtYjQ2YS1jMTA1NmYzNGI3MzE=?api-version=2018-09-01 cache-control: - private content-length: @@ -1280,9 +1338,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 06:59:35 GMT + - Fri, 05 Nov 2021 09:35:52 GMT location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTthYmM2NTRlNi01NTZiLTRlM2QtYTY2OC0yZGM4MTFiZWJhNTg=?api-version=2018-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsOperationResults/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTs0ZDljYmU0OS0xODk3LTRiYzgtYjQ2YS1jMTA1NmYzNGI3MzE=?api-version=2018-09-01 server: - Microsoft-IIS/10.0 strict-transport-security: @@ -1308,10 +1366,11 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.21 msrest_azure/0.6.2 azure-mgmt-privatedns/0.1.0 Azure-SDK-For-Python + - python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 msrest_azure/0.6.4 + azure-mgmt-privatedns/0.1.0 Azure-SDK-For-Python method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTthYmM2NTRlNi01NTZiLTRlM2QtYTY2OC0yZGM4MTFiZWJhNTg=?api-version=2018-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsOperationStatuses/RnJvbnRFbmRBc3luY09wZXJhdGlvbjtVcHNlcnRQcml2YXRlRG5zWm9uZTs0ZDljYmU0OS0xODk3LTRiYzgtYjQ2YS1jMTA1NmYzNGI3MzE=?api-version=2018-09-01 response: body: string: '{"status":"Succeeded"}' @@ -1323,7 +1382,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:06 GMT + - Fri, 05 Nov 2021 09:36:22 GMT server: - Microsoft-IIS/10.0 strict-transport-security: @@ -1353,13 +1412,14 @@ interactions: Connection: - keep-alive User-Agent: - - python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - msrest/0.6.21 msrest_azure/0.6.2 azure-mgmt-privatedns/0.1.0 Azure-SDK-For-Python + - python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) msrest/0.6.21 + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 msrest_azure/0.6.4 + azure-mgmt-privatedns/0.1.0 Azure-SDK-For-Python method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsZones/www.zone1.com?api-version=2018-09-01 response: body: - string: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/rgname\/providers\/Microsoft.Network\/privateDnsZones\/www.zone1.com","name":"www.zone1.com","type":"Microsoft.Network\/privateDnsZones","etag":"dab798b9-b2be-4ede-9a95-e7eab5bf4828","location":"global","properties":{"maxNumberOfRecordSets":25000,"maxNumberOfVirtualNetworkLinks":1000,"maxNumberOfVirtualNetworkLinksWithRegistration":100,"numberOfRecordSets":1,"numberOfVirtualNetworkLinks":0,"numberOfVirtualNetworkLinksWithRegistration":0,"provisioningState":"Succeeded"}}' + string: '{"id":"\/subscriptions\/00000000-0000-0000-0000-000000000000\/resourceGroups\/rgname\/providers\/Microsoft.Network\/privateDnsZones\/www.zone1.com","name":"www.zone1.com","type":"Microsoft.Network\/privateDnsZones","etag":"bc961f91-6bb0-4eab-9008-28efe9fb880b","location":"global","properties":{"maxNumberOfRecordSets":25000,"maxNumberOfVirtualNetworkLinks":1000,"maxNumberOfVirtualNetworkLinksWithRegistration":100,"numberOfRecordSets":1,"numberOfVirtualNetworkLinks":0,"numberOfVirtualNetworkLinksWithRegistration":0,"provisioningState":"Succeeded"}}' headers: cache-control: - private @@ -1368,9 +1428,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:07 GMT + - Fri, 05 Nov 2021 09:36:23 GMT etag: - - dab798b9-b2be-4ede-9a95-e7eab5bf4828 + - bc961f91-6bb0-4eab-9008-28efe9fb880b server: - Microsoft-IIS/10.0 strict-transport-security: @@ -1405,26 +1465,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPrivateDnsZoneGroup\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup\"\ - ,\r\n \"etag\": \"W/\\\"c3e31058-ced1-4858-89bd-5bd342bb3289\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - privateDnsZoneConfigs\": [\r\n {\r\n \"name\": \"zone1\",\r\n\ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup/privateDnsZoneConfigs/zone1\"\ - ,\r\n \"etag\": \"W/\\\"c3e31058-ced1-4858-89bd-5bd342bb3289\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"privateDnsZoneId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsZones/www.zone1.com\"\ - ,\r\n \"recordSets\": []\r\n }\r\n }\r\n ]\r\n }\r\ - \n}" + string: "{\r\n \"name\": \"myPrivateDnsZoneGroup\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup\",\r\n + \ \"etag\": \"W/\\\"4ac24675-4c01-4995-b62c-c82244270b8f\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"privateDnsZoneConfigs\": + [\r\n {\r\n \"name\": \"zone1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup/privateDnsZoneConfigs/zone1\",\r\n + \ \"etag\": \"W/\\\"4ac24675-4c01-4995-b62c-c82244270b8f\\\"\",\r\n + \ \"type\": \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"privateDnsZoneId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsZones/www.zone1.com\",\r\n + \ \"recordSets\": []\r\n }\r\n }\r\n ]\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/6c1ca94d-ffcd-442a-83d0-231cdc1dea5f?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/56228a63-591c-42cc-865f-0bca87bb8d1c?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -1432,7 +1491,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:08 GMT + - Fri, 05 Nov 2021 09:36:23 GMT expires: - '-1' pragma: @@ -1445,7 +1504,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3509c4a8-a4da-48c1-a22e-b95a14fb31b5 + - f1257fc9-4bdc-47de-aa26-8e731af98567 x-ms-ratelimit-remaining-subscription-writes: - '1191' status: @@ -1461,9 +1520,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/6c1ca94d-ffcd-442a-83d0-231cdc1dea5f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/56228a63-591c-42cc-865f-0bca87bb8d1c?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1475,7 +1535,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:18 GMT + - Fri, 05 Nov 2021 09:36:34 GMT expires: - '-1' pragma: @@ -1492,7 +1552,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 39073212-2d19-4e85-83a1-4eb5305d4891 + - 98427564-23ef-4e88-beb9-78aa0be798de status: code: 200 message: OK @@ -1506,23 +1566,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPrivateDnsZoneGroup\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup\"\ - ,\r\n \"etag\": \"W/\\\"2dada9fb-df80-4cc8-94f1-7fd8948934b3\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ - \ \"privateDnsZoneConfigs\": [\r\n {\r\n \"name\": \"zone1\",\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup/privateDnsZoneConfigs/zone1\"\ - ,\r\n \"etag\": \"W/\\\"2dada9fb-df80-4cc8-94f1-7fd8948934b3\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateDnsZoneId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsZones/www.zone1.com\"\ - ,\r\n \"recordSets\": []\r\n }\r\n }\r\n ]\r\n }\r\ - \n}" + string: "{\r\n \"name\": \"myPrivateDnsZoneGroup\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup\",\r\n + \ \"etag\": \"W/\\\"12afdbb1-203c-4c6b-9853-3cd7c63b732b\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateDnsZoneConfigs\": + [\r\n {\r\n \"name\": \"zone1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup/privateDnsZoneConfigs/zone1\",\r\n + \ \"etag\": \"W/\\\"12afdbb1-203c-4c6b-9853-3cd7c63b732b\\\"\",\r\n + \ \"type\": \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateDnsZoneId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsZones/www.zone1.com\",\r\n + \ \"recordSets\": []\r\n }\r\n }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -1531,9 +1590,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:19 GMT + - Fri, 05 Nov 2021 09:36:34 GMT etag: - - W/"2dada9fb-df80-4cc8-94f1-7fd8948934b3" + - W/"12afdbb1-203c-4c6b-9853-3cd7c63b732b" expires: - '-1' pragma: @@ -1550,7 +1609,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 31eae06d-d46f-4926-87ea-077722fbcb1c + - 44d91c47-2034-4ed8-b056-c041b8ca55d0 status: code: 200 message: OK @@ -1564,23 +1623,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPrivateDnsZoneGroup\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup\"\ - ,\r\n \"etag\": \"W/\\\"2dada9fb-df80-4cc8-94f1-7fd8948934b3\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ - \ \"privateDnsZoneConfigs\": [\r\n {\r\n \"name\": \"zone1\",\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup/privateDnsZoneConfigs/zone1\"\ - ,\r\n \"etag\": \"W/\\\"2dada9fb-df80-4cc8-94f1-7fd8948934b3\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateDnsZoneId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsZones/www.zone1.com\"\ - ,\r\n \"recordSets\": []\r\n }\r\n }\r\n ]\r\n }\r\ - \n}" + string: "{\r\n \"name\": \"myPrivateDnsZoneGroup\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup\",\r\n + \ \"etag\": \"W/\\\"12afdbb1-203c-4c6b-9853-3cd7c63b732b\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateDnsZoneConfigs\": + [\r\n {\r\n \"name\": \"zone1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup/privateDnsZoneConfigs/zone1\",\r\n + \ \"etag\": \"W/\\\"12afdbb1-203c-4c6b-9853-3cd7c63b732b\\\"\",\r\n + \ \"type\": \"Microsoft.Network/privateEndpoints/privateDnsZoneGroups/privateDnsZoneConfigs\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateDnsZoneId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateDnsZones/www.zone1.com\",\r\n + \ \"recordSets\": []\r\n }\r\n }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -1589,9 +1647,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:19 GMT + - Fri, 05 Nov 2021 09:36:35 GMT etag: - - W/"2dada9fb-df80-4cc8-94f1-7fd8948934b3" + - W/"12afdbb1-203c-4c6b-9853-3cd7c63b732b" expires: - '-1' pragma: @@ -1608,7 +1666,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 66800fbb-75af-4ead-acc3-dbb03e61e9de + - f206022b-5c16-444d-ab48-5a485353a4c7 status: code: 200 message: OK @@ -1622,21 +1680,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38\"\ - ,\r\n \"etag\": \"W/\\\"3809f0e2-4555-4c2d-9cb5-ec99b656c695\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - privateEndpoint\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\ - \r\n },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\"\ - : \"Approved\",\r\n \"description\": \"approved it for some reason.\"\ - ,\r\n \"actionsRequired\": \"\"\r\n },\r\n \"linkIdentifier\":\ - \ \"536884267\"\r\n },\r\n \"type\": \"Microsoft.Network/privateLinkServices/privateEndpointConnections\"\ - \r\n}" + string: "{\r\n \"name\": \"myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n + \ \"etag\": \"W/\\\"ad7fb687-b382-44b5-8560-211ca8f63de4\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateEndpoint\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\r\n + \ },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"approved it for some reason.\",\r\n + \ \"actionsRequired\": \"\"\r\n },\r\n \"linkIdentifier\": \"536937263\"\r\n + \ },\r\n \"type\": \"Microsoft.Network/privateLinkServices/privateEndpointConnections\"\r\n}" headers: cache-control: - no-cache @@ -1645,9 +1703,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:19 GMT + - Fri, 05 Nov 2021 09:36:35 GMT etag: - - W/"3809f0e2-4555-4c2d-9cb5-ec99b656c695" + - W/"ad7fb687-b382-44b5-8560-211ca8f63de4" expires: - '-1' pragma: @@ -1664,7 +1722,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5cf90636-e58b-487d-8453-6626a8c37f19 + - 93eea5a7-ef8a-4d13-93a5-ebe297273c7a status: code: 200 message: OK @@ -1678,41 +1736,41 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPrivateEndpoint\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\ - ,\r\n \"etag\": \"W/\\\"2dada9fb-df80-4cc8-94f1-7fd8948934b3\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"\ - eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"e6ea4e43-69fa-4c05-93f4-196c69b81a38\",\r\n \ - \ \"privateLinkServiceConnections\": [\r\n {\r\n \"name\": \"\ - myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateLinkServiceConnections/myService\"\ - ,\r\n \"etag\": \"W/\\\"2dada9fb-df80-4cc8-94f1-7fd8948934b3\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\"\ - ,\r\n \"privateLinkServiceConnectionState\": {\r\n \"\ - status\": \"Approved\",\r\n \"description\": \"approved it for\ - \ some reason.\",\r\n \"actionsRequired\": \"\"\r\n }\r\ - \n },\r\n \"type\": \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\ - \r\n }\r\n ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\ - \n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\"\ - \r\n },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\":\ - \ [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myPrivateEndpoint.nic.50bf49ea-1ccf-48e2-8e96-cfbe188acc21\"\ - \r\n }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}" + string: "{\r\n \"name\": \"myPrivateEndpoint\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\",\r\n + \ \"etag\": \"W/\\\"12afdbb1-203c-4c6b-9853-3cd7c63b732b\\\"\",\r\n \"type\": + \"Microsoft.Network/privateEndpoints\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n \"privateLinkServiceConnections\": + [\r\n {\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateLinkServiceConnections/myService\",\r\n + \ \"etag\": \"W/\\\"12afdbb1-203c-4c6b-9853-3cd7c63b732b\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateLinkServiceId\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\",\r\n + \ \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"approved it for some reason.\",\r\n + \ \"actionsRequired\": \"\"\r\n }\r\n },\r\n \"type\": + \"Microsoft.Network/privateEndpoints/privateLinkServiceConnections\"\r\n }\r\n + \ ],\r\n \"manualPrivateLinkServiceConnections\": [],\r\n \"customNetworkInterfaceName\": + \"\",\r\n \"subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet2\"\r\n + \ },\r\n \"ipConfigurations\": [],\r\n \"networkInterfaces\": [\r\n + \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myPrivateEndpoint.nic.45072cbc-6395-4e28-a23d-bc2ed65540f0\"\r\n + \ }\r\n ],\r\n \"customDnsConfigs\": []\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '2237' + - '2276' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:20 GMT + - Fri, 05 Nov 2021 09:36:35 GMT etag: - - W/"2dada9fb-df80-4cc8-94f1-7fd8948934b3" + - W/"12afdbb1-203c-4c6b-9853-3cd7c63b732b" expires: - '-1' pragma: @@ -1729,7 +1787,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e3c3b3ae-d20e-40bf-ab89-bd286a07cc07 + - 23321f10-baed-459f-b1cf-7bbf7fdae18a status: code: 200 message: OK @@ -1743,45 +1801,44 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\"\ - ,\r\n \"etag\": \"W/\\\"3809f0e2-4555-4c2d-9cb5-ec99b656c695\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/privateLinkServices\",\r\n \"location\":\ - \ \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"491e4f8f-d59f-4dc5-8292-ce727d7995bb\",\r\n \ - \ \"fqdns\": [\r\n \"fqdn1\",\r\n \"fqdn2\",\r\n \"fqdn3\"\ - \r\n ],\r\n \"alias\": \"myservice.af99f146-02c4-4066-9b65-17af696ee052.eastus.azure.privatelinkservice\"\ - ,\r\n \"visibility\": {\r\n \"subscriptions\": [\r\n \"00000000-0000-0000-0000-000000000000\"\ - \r\n ]\r\n },\r\n \"autoApproval\": {\r\n \"subscriptions\"\ - : [\r\n \"00000000-0000-0000-0000-000000000000\"\r\n ]\r\n \ - \ },\r\n \"enableProxyProtocol\": false,\r\n \"loadBalancerFrontendIpConfigurations\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\ - \r\n }\r\n ],\r\n \"ipConfigurations\": [\r\n {\r\n \ - \ \"name\": \"myIPConfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/ipConfigurations/myIPConfiguration\"\ - ,\r\n \"etag\": \"W/\\\"3809f0e2-4555-4c2d-9cb5-ec99b656c695\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/privateLinkServices/ipConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - subnet\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\ - \r\n },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\"\ - : \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"privateEndpointConnections\"\ - : [\r\n {\r\n \"name\": \"myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38\"\ - ,\r\n \"etag\": \"W/\\\"3809f0e2-4555-4c2d-9cb5-ec99b656c695\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateEndpoint\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\ - \r\n },\r\n \"privateLinkServiceConnectionState\": {\r\n\ - \ \"status\": \"Approved\",\r\n \"description\": \"\ - approved it for some reason.\",\r\n \"actionsRequired\": \"\"\r\ - \n },\r\n \"linkIdentifier\": \"536884267\"\r\n },\r\ - \n \"type\": \"Microsoft.Network/privateLinkServices/privateEndpointConnections\"\ - \r\n }\r\n ],\r\n \"networkInterfaces\": [\r\n {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myService.nic.3d855175-e267-48fc-ae20-23d66e087a92\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myService\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService\",\r\n + \ \"etag\": \"W/\\\"ad7fb687-b382-44b5-8560-211ca8f63de4\\\"\",\r\n \"type\": + \"Microsoft.Network/privateLinkServices\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"64281dd1-9cc4-42cd-98c6-7a571ff4f480\",\r\n \"fqdns\": [\r\n \"fqdn1\",\r\n + \ \"fqdn2\",\r\n \"fqdn3\"\r\n ],\r\n \"alias\": \"myservice.fd93ffb3-ec4e-4418-84eb-cff313fb390b.eastus.azure.privatelinkservice\",\r\n + \ \"visibility\": {\r\n \"subscriptions\": [\r\n \"00000000-0000-0000-0000-000000000000\"\r\n + \ ]\r\n },\r\n \"autoApproval\": {\r\n \"subscriptions\": [\r\n + \ \"00000000-0000-0000-0000-000000000000\"\r\n ]\r\n },\r\n + \ \"enableProxyProtocol\": false,\r\n \"loadBalancerFrontendIpConfigurations\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/loadbalancer/frontendIPConfigurations/myIPConfiguration\"\r\n + \ }\r\n ],\r\n \"ipConfigurations\": [\r\n {\r\n \"name\": + \"myIPConfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/ipConfigurations/myIPConfiguration\",\r\n + \ \"etag\": \"W/\\\"ad7fb687-b382-44b5-8560-211ca8f63de4\\\"\",\r\n + \ \"type\": \"Microsoft.Network/privateLinkServices/ipConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"subnet\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualNetworks/virtualnetwork/subnets/subnet1\"\r\n + \ },\r\n \"primary\": true,\r\n \"privateIPAddressVersion\": + \"IPv4\"\r\n }\r\n }\r\n ],\r\n \"privateEndpointConnections\": + [\r\n {\r\n \"name\": \"myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf\",\r\n + \ \"etag\": \"W/\\\"ad7fb687-b382-44b5-8560-211ca8f63de4\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateEndpoint\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint\"\r\n + \ },\r\n \"privateLinkServiceConnectionState\": {\r\n \"status\": + \"Approved\",\r\n \"description\": \"approved it for some reason.\",\r\n + \ \"actionsRequired\": \"\"\r\n },\r\n \"linkIdentifier\": + \"536937263\"\r\n },\r\n \"type\": \"Microsoft.Network/privateLinkServices/privateEndpointConnections\"\r\n + \ }\r\n ],\r\n \"networkInterfaces\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/networkInterfaces/myService.nic.7be8acb7-4145-4031-80a6-ee1e62c4cde4\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -1790,9 +1847,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:20 GMT + - Fri, 05 Nov 2021 09:36:35 GMT etag: - - W/"3809f0e2-4555-4c2d-9cb5-ec99b656c695" + - W/"ad7fb687-b382-44b5-8560-211ca8f63de4" expires: - '-1' pragma: @@ -1809,7 +1866,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2c14a52f-8a99-472a-a01c-599257a6ba59 + - 412ae559-ba92-4f96-925c-0cb03044f740 status: code: 200 message: OK @@ -1825,25 +1882,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint/privateDnsZoneGroups/myPrivateDnsZoneGroup?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/acebdcbb-60db-4834-bdb6-5b5785d881d9?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e47a6ad7-41a1-407c-8859-ad996bf9c8fb?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:00:21 GMT + - Fri, 05 Nov 2021 09:36:35 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/acebdcbb-60db-4834-bdb6-5b5785d881d9?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/e47a6ad7-41a1-407c-8859-ad996bf9c8fb?api-version=2021-05-01 pragma: - no-cache server: @@ -1854,9 +1912,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 380f6010-4a11-40bc-9be7-b4241248628d + - c6684bea-b810-4442-8258-226018627dd4 x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14998' status: code: 202 message: Accepted @@ -1870,9 +1928,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/acebdcbb-60db-4834-bdb6-5b5785d881d9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e47a6ad7-41a1-407c-8859-ad996bf9c8fb?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1884,7 +1943,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:31 GMT + - Fri, 05 Nov 2021 09:36:45 GMT expires: - '-1' pragma: @@ -1901,7 +1960,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 05b505a3-4ac5-47d8-8da6-e67e007ae1b7 + - 4c1663f6-41ac-46cc-90a0-03aaa38de66a status: code: 200 message: OK @@ -1917,25 +1976,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.e6ea4e43-69fa-4c05-93f4-196c69b81a38?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService/privateEndpointConnections/myPrivateEndpoint.78999a86-3873-411c-bec9-c0fcfdadd0bf?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/be238b6f-7d2d-4557-94f9-58c02d26f680?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3996e963-6fd4-4a95-8036-9260749e6f7b?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:00:41 GMT + - Fri, 05 Nov 2021 09:36:45 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/be238b6f-7d2d-4557-94f9-58c02d26f680?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/3996e963-6fd4-4a95-8036-9260749e6f7b?api-version=2021-05-01 pragma: - no-cache server: @@ -1946,9 +2006,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 65e988b4-623b-430b-bbf3-932733de4826 + - 1d77e1ef-de37-4278-9ee7-733011a1f19d x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14997' status: code: 202 message: Accepted @@ -1962,9 +2022,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/be238b6f-7d2d-4557-94f9-58c02d26f680?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3996e963-6fd4-4a95-8036-9260749e6f7b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1976,7 +2037,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:00:52 GMT + - Fri, 05 Nov 2021 09:36:55 GMT expires: - '-1' pragma: @@ -1993,7 +2054,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 96a3851c-a206-41c6-baf8-8be1c141d189 + - 07731db8-8ee1-40cd-b68a-22dd7b9be507 status: code: 200 message: OK @@ -2009,9 +2070,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateEndpoints/myPrivateEndpoint?api-version=2021-05-01 response: body: string: '' @@ -2019,17 +2081,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/67731c64-9006-41a3-969b-b48d212569a2?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b2607408-2745-4313-8012-733931e91ce2?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:00:53 GMT + - Fri, 05 Nov 2021 09:36:56 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/67731c64-9006-41a3-969b-b48d212569a2?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/b2607408-2745-4313-8012-733931e91ce2?api-version=2021-05-01 pragma: - no-cache server: @@ -2040,9 +2102,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1beb33b0-8770-405c-980e-3ebdff2e6d6a + - d32bf68a-45ce-4bd9-b7f8-bfe847161e25 x-ms-ratelimit-remaining-subscription-deletes: - - '14997' + - '14996' status: code: 202 message: Accepted @@ -2056,9 +2118,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/67731c64-9006-41a3-969b-b48d212569a2?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/b2607408-2745-4313-8012-733931e91ce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2070,7 +2133,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:03 GMT + - Fri, 05 Nov 2021 09:37:06 GMT expires: - '-1' pragma: @@ -2087,7 +2150,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 04d3444b-f7fe-4f32-99b5-594b7b1a4645 + - 9e86c94b-4395-4cf2-a827-66b08cd29ad4 status: code: 200 message: OK @@ -2103,9 +2166,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/privateLinkServices/myService?api-version=2021-05-01 response: body: string: '' @@ -2113,17 +2177,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/995e958e-018c-446b-8ead-84aa8e403547?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/be83f4b3-5243-4db4-90b9-70f9fc60eed6?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:01:05 GMT + - Fri, 05 Nov 2021 09:37:06 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/995e958e-018c-446b-8ead-84aa8e403547?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/be83f4b3-5243-4db4-90b9-70f9fc60eed6?api-version=2021-05-01 pragma: - no-cache server: @@ -2134,9 +2198,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 75073fed-0195-47aa-b0c0-2c33d855922c + - fe11aa40-5d73-44b8-8fbe-0b4503b06967 x-ms-ratelimit-remaining-subscription-deletes: - - '14996' + - '14995' status: code: 202 message: Accepted @@ -2150,9 +2214,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/995e958e-018c-446b-8ead-84aa8e403547?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/be83f4b3-5243-4db4-90b9-70f9fc60eed6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2164,7 +2229,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:15 GMT + - Fri, 05 Nov 2021 09:37:16 GMT expires: - '-1' pragma: @@ -2181,7 +2246,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ba9cba19-3d82-4437-af83-b9939ba0039f + - bdffa879-8fd2-4a75-9ccf-2f74640eb911 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_endpoint_policy.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_endpoint_policy.test_network.yaml index a1ae827dde34..9fabb8d1f318 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_endpoint_policy.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_endpoint_policy.test_network.yaml @@ -13,22 +13,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myServiceEndpointPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy\"\ - ,\r\n \"etag\": \"W/\\\"42824aa3-d7dc-46a9-a605-ca14c0cdd278\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/serviceEndpointPolicies\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"resourceGuid\": \"a7d98446-dd43-48de-88d5-64a978d39131\",\r\n \ - \ \"serviceEndpointPolicyDefinitions\": []\r\n }\r\n}" + string: "{\r\n \"name\": \"myServiceEndpointPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy\",\r\n + \ \"etag\": \"W/\\\"f7a98279-8d46-40d7-a15b-c4f6ed3f5c5a\\\"\",\r\n \"type\": + \"Microsoft.Network/serviceEndpointPolicies\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"5b1e959a-3c2d-43ad-bd39-3d5b8b8e7cf3\",\r\n \"serviceEndpointPolicyDefinitions\": + []\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/fd482636-c96b-47c7-bac7-4f504935dbc9?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ae798e73-59bc-44c5-b822-2012f84e42a5?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -36,7 +37,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:33 GMT + - Fri, 05 Nov 2021 09:37:21 GMT expires: - '-1' pragma: @@ -49,9 +50,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ae22afc2-975d-40de-9052-51f763f57d7c + - 397d208f-4c59-49e1-b8c5-1a13af5c5728 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1196' status: code: 201 message: Created @@ -65,9 +66,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/fd482636-c96b-47c7-bac7-4f504935dbc9?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/ae798e73-59bc-44c5-b822-2012f84e42a5?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -79,7 +81,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:43 GMT + - Fri, 05 Nov 2021 09:37:31 GMT expires: - '-1' pragma: @@ -96,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 602507f8-9be3-4148-8a9c-b71c65941c57 + - 67932f7d-82a1-4369-b8b8-185764d6ae8b status: code: 200 message: OK @@ -110,17 +112,18 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myServiceEndpointPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy\"\ - ,\r\n \"etag\": \"W/\\\"62c36147-8494-4e87-99a7-5b04f01943af\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/serviceEndpointPolicies\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"a7d98446-dd43-48de-88d5-64a978d39131\",\r\n \ - \ \"serviceEndpointPolicyDefinitions\": []\r\n }\r\n}" + string: "{\r\n \"name\": \"myServiceEndpointPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy\",\r\n + \ \"etag\": \"W/\\\"e22b42c8-405c-4b89-bfca-1aea2ea4ffbd\\\"\",\r\n \"type\": + \"Microsoft.Network/serviceEndpointPolicies\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"5b1e959a-3c2d-43ad-bd39-3d5b8b8e7cf3\",\r\n \"serviceEndpointPolicyDefinitions\": + []\r\n }\r\n}" headers: cache-control: - no-cache @@ -129,9 +132,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:44 GMT + - Fri, 05 Nov 2021 09:37:31 GMT etag: - - W/"62c36147-8494-4e87-99a7-5b04f01943af" + - W/"e22b42c8-405c-4b89-bfca-1aea2ea4ffbd" expires: - '-1' pragma: @@ -148,7 +151,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e60474d6-f1b0-4bfb-b374-c3c67993ca53 + - 81a415c1-b240-4655-944d-584916009e45 status: code: 200 message: OK @@ -167,23 +170,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myServiceEndpointPolicyDefinition\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\"\ - ,\r\n \"etag\": \"W/\\\"e7ef4214-8f08-4e03-85f5-9f08c31d6ceb\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - service\": \"Microsoft.Storage\",\r\n \"description\": \"Storage Service\ - \ EndpointPolicy Definition\",\r\n \"serviceResources\": [\r\n \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\ - \r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\ - \r\n}" + string: "{\r\n \"name\": \"myServiceEndpointPolicyDefinition\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\",\r\n + \ \"etag\": \"W/\\\"d5675331-230f-4e46-adf9-bab2b2812472\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"service\": \"Microsoft.Storage\",\r\n + \ \"description\": \"Storage Service EndpointPolicy Definition\",\r\n \"serviceResources\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\r\n + \ ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5a69b1e2-9375-452d-82f8-a37d1c9e3487?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/22507113-ad1e-461e-b60c-27c2a0f70d47?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -191,7 +193,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:45 GMT + - Fri, 05 Nov 2021 09:37:31 GMT expires: - '-1' pragma: @@ -204,9 +206,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e0af18dc-2054-47ac-8cf4-985b53ff1b8f + - 54c3b3a2-6eb8-471d-9039-f5a04c8caf81 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1195' status: code: 201 message: Created @@ -220,9 +222,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5a69b1e2-9375-452d-82f8-a37d1c9e3487?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/22507113-ad1e-461e-b60c-27c2a0f70d47?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -234,7 +237,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:57 GMT + - Fri, 05 Nov 2021 09:37:41 GMT expires: - '-1' pragma: @@ -251,7 +254,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3de0601e-71c2-4d3b-b57d-2c27b62bb4f8 + - a2de8b98-ca67-42e4-adec-4b6effb589fd status: code: 200 message: OK @@ -265,20 +268,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myServiceEndpointPolicyDefinition\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\"\ - ,\r\n \"etag\": \"W/\\\"b3e62056-830e-4d01-b91e-a00bd95bc0de\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - service\": \"Microsoft.Storage\",\r\n \"description\": \"Storage Service\ - \ EndpointPolicy Definition\",\r\n \"serviceResources\": [\r\n \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\ - \r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\ - \r\n}" + string: "{\r\n \"name\": \"myServiceEndpointPolicyDefinition\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\",\r\n + \ \"etag\": \"W/\\\"7509d3cc-75de-4f16-8155-b296e69c8001\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"service\": \"Microsoft.Storage\",\r\n + \ \"description\": \"Storage Service EndpointPolicy Definition\",\r\n \"serviceResources\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\r\n + \ ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\r\n}" headers: cache-control: - no-cache @@ -287,9 +289,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:57 GMT + - Fri, 05 Nov 2021 09:37:41 GMT etag: - - W/"b3e62056-830e-4d01-b91e-a00bd95bc0de" + - W/"7509d3cc-75de-4f16-8155-b296e69c8001" expires: - '-1' pragma: @@ -306,7 +308,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 81ac91bc-ff6d-4177-a9fc-1db3dd1e19a6 + - 369c1897-344f-4597-9a35-58c61f1f1b4a status: code: 200 message: OK @@ -320,20 +322,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myServiceEndpointPolicyDefinition\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\"\ - ,\r\n \"etag\": \"W/\\\"b3e62056-830e-4d01-b91e-a00bd95bc0de\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - service\": \"Microsoft.Storage\",\r\n \"description\": \"Storage Service\ - \ EndpointPolicy Definition\",\r\n \"serviceResources\": [\r\n \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\ - \r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\ - \r\n}" + string: "{\r\n \"name\": \"myServiceEndpointPolicyDefinition\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\",\r\n + \ \"etag\": \"W/\\\"7509d3cc-75de-4f16-8155-b296e69c8001\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"service\": \"Microsoft.Storage\",\r\n + \ \"description\": \"Storage Service EndpointPolicy Definition\",\r\n \"serviceResources\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\r\n + \ ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\r\n}" headers: cache-control: - no-cache @@ -342,9 +343,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:58 GMT + - Fri, 05 Nov 2021 09:37:41 GMT etag: - - W/"b3e62056-830e-4d01-b91e-a00bd95bc0de" + - W/"7509d3cc-75de-4f16-8155-b296e69c8001" expires: - '-1' pragma: @@ -361,7 +362,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 977a19ac-a732-43f4-ac18-a74f4db7f22c + - ade739ba-ba67-4fe0-b50d-48c51aff1d25 status: code: 200 message: OK @@ -375,25 +376,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myServiceEndpointPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy\"\ - ,\r\n \"etag\": \"W/\\\"b3e62056-830e-4d01-b91e-a00bd95bc0de\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/serviceEndpointPolicies\",\r\n \"location\"\ - : \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"a7d98446-dd43-48de-88d5-64a978d39131\",\r\n \ - \ \"serviceEndpointPolicyDefinitions\": [\r\n {\r\n \"name\"\ - : \"myServiceEndpointPolicyDefinition\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\"\ - ,\r\n \"etag\": \"W/\\\"b3e62056-830e-4d01-b91e-a00bd95bc0de\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"service\": \"Microsoft.Storage\",\r\n \"description\"\ - : \"Storage Service EndpointPolicy Definition\",\r\n \"serviceResources\"\ - : [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\ - \r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myServiceEndpointPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy\",\r\n + \ \"etag\": \"W/\\\"7509d3cc-75de-4f16-8155-b296e69c8001\\\"\",\r\n \"type\": + \"Microsoft.Network/serviceEndpointPolicies\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"5b1e959a-3c2d-43ad-bd39-3d5b8b8e7cf3\",\r\n \"serviceEndpointPolicyDefinitions\": + [\r\n {\r\n \"name\": \"myServiceEndpointPolicyDefinition\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\",\r\n + \ \"etag\": \"W/\\\"7509d3cc-75de-4f16-8155-b296e69c8001\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"service\": \"Microsoft.Storage\",\r\n \"description\": + \"Storage Service EndpointPolicy Definition\",\r\n \"serviceResources\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\r\n + \ ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -402,9 +404,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:01:58 GMT + - Fri, 05 Nov 2021 09:37:42 GMT etag: - - W/"b3e62056-830e-4d01-b91e-a00bd95bc0de" + - W/"7509d3cc-75de-4f16-8155-b296e69c8001" expires: - '-1' pragma: @@ -421,7 +423,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1d8c6e32-67d8-40fa-a0ad-eee710e4a2a5 + - c1f40f50-c80b-45d0-9950-363bcb0948b4 status: code: 200 message: OK @@ -439,26 +441,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myServiceEndpointPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy\"\ - ,\r\n \"etag\": \"W/\\\"d8bb5b3c-deb7-4bd6-be06-ad537fc3e499\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/serviceEndpointPolicies\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\"\ - : \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Succeeded\",\r\n \"resourceGuid\": \"a7d98446-dd43-48de-88d5-64a978d39131\"\ - ,\r\n \"serviceEndpointPolicyDefinitions\": [\r\n {\r\n \"\ - name\": \"myServiceEndpointPolicyDefinition\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\"\ - ,\r\n \"etag\": \"W/\\\"d8bb5b3c-deb7-4bd6-be06-ad537fc3e499\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"service\": \"Microsoft.Storage\",\r\n \"description\"\ - : \"Storage Service EndpointPolicy Definition\",\r\n \"serviceResources\"\ - : [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\ - \r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myServiceEndpointPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy\",\r\n + \ \"etag\": \"W/\\\"88e2c762-0b23-47c7-81e5-1a904bd45f42\\\"\",\r\n \"type\": + \"Microsoft.Network/serviceEndpointPolicies\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"5b1e959a-3c2d-43ad-bd39-3d5b8b8e7cf3\",\r\n \"serviceEndpointPolicyDefinitions\": + [\r\n {\r\n \"name\": \"myServiceEndpointPolicyDefinition\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition\",\r\n + \ \"etag\": \"W/\\\"88e2c762-0b23-47c7-81e5-1a904bd45f42\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"service\": \"Microsoft.Storage\",\r\n \"description\": + \"Storage Service EndpointPolicy Definition\",\r\n \"serviceResources\": + [\r\n \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname\"\r\n + \ ]\r\n },\r\n \"type\": \"Microsoft.Network/serviceEndpointPolicies/serviceEndpointPolicyDefinitions\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -469,7 +472,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:02:01 GMT + - Fri, 05 Nov 2021 09:37:42 GMT expires: - '-1' pragma: @@ -486,9 +489,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 18655917-9890-41b9-8e52-5f39ffa039c6 + - 6d573b29-7677-4271-8cbe-5a51e083dc29 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1194' status: code: 200 message: OK @@ -504,25 +507,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy/serviceEndpointPolicyDefinitions/myServiceEndpointPolicyDefinition?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5575ac40-1179-4a73-b3dc-eb1fc94cc654?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7b3b02c5-5a80-4b20-853d-b91d19a45961?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:02:02 GMT + - Fri, 05 Nov 2021 09:37:43 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/5575ac40-1179-4a73-b3dc-eb1fc94cc654?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/7b3b02c5-5a80-4b20-853d-b91d19a45961?api-version=2021-05-01 pragma: - no-cache server: @@ -533,9 +537,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cfb04fc9-da89-42ab-8748-5f1e356d5813 + - 2ee4e2e9-9e18-48e3-8e8a-1023e3f2ad66 x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14997' status: code: 202 message: Accepted @@ -549,9 +553,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5575ac40-1179-4a73-b3dc-eb1fc94cc654?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7b3b02c5-5a80-4b20-853d-b91d19a45961?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -563,7 +568,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:02:12 GMT + - Fri, 05 Nov 2021 09:37:52 GMT expires: - '-1' pragma: @@ -580,7 +585,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8f42a9f5-d4c2-434f-8594-53c379f36c37 + - ee3a0a38-a59a-4dff-af85-0b4a48e9e79b status: code: 200 message: OK @@ -596,9 +601,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/serviceEndpointPolicies/myServiceEndpointPolicy?api-version=2021-05-01 response: body: string: '' @@ -606,17 +612,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a5e3d59e-868d-49bc-bf10-e7311120c9e4?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/bd5bb680-4b8c-412f-9f92-6e4b282f8542?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:02:13 GMT + - Fri, 05 Nov 2021 09:37:53 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/a5e3d59e-868d-49bc-bf10-e7311120c9e4?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/bd5bb680-4b8c-412f-9f92-6e4b282f8542?api-version=2021-05-01 pragma: - no-cache server: @@ -627,9 +633,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 79d0ce8b-9cc2-4c3e-a46e-e9e47450903e + - 36ae0fd2-b975-4fe9-ba0e-4a653d0b4cd6 x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14996' status: code: 202 message: Accepted @@ -643,9 +649,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a5e3d59e-868d-49bc-bf10-e7311120c9e4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/bd5bb680-4b8c-412f-9f92-6e4b282f8542?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -657,7 +664,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:02:23 GMT + - Fri, 05 Nov 2021 09:38:04 GMT expires: - '-1' pragma: @@ -674,7 +681,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 20268518-29a2-41f7-b4dc-16a601c8f89f + - b1fafb60-13d3-4e6c-96de-3a25de495098 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_firewall.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_firewall.test_network.yaml index b04c9fa0c03d..0455c778f2d7 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_firewall.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_firewall.test_network.yaml @@ -14,23 +14,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan\"\ - ,\r\n \"etag\": \"W/\\\"c8e5f20b-347b-46e0-9d49-4d33615000e5\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Updating\",\r\n \"disableVpnEncryption\"\ - : false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\"\ - : \"None\",\r\n \"type\": \"Basic\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan\",\r\n + \ \"etag\": \"W/\\\"4a51aefa-d1c0-4fe8-9b3f-80fb333c9d2a\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": + true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\": + \"Basic\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/54f5e6ed-9a14-43f0-9123-de5e8dae342b?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5a78c090-f8cc-431f-b989-94f917605d3f?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -38,7 +39,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:02:40 GMT + - Fri, 05 Nov 2021 09:38:07 GMT expires: - '-1' pragma: @@ -51,9 +52,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f05da407-c8eb-417a-a783-1b0c3b13f3ff + - cd3fc8ab-f853-47d5-901b-a91a8a7f4377 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1199' status: code: 201 message: Created @@ -67,9 +68,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/54f5e6ed-9a14-43f0-9123-de5e8dae342b?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5a78c090-f8cc-431f-b989-94f917605d3f?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -81,7 +83,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:02:52 GMT + - Fri, 05 Nov 2021 09:38:17 GMT expires: - '-1' pragma: @@ -98,7 +100,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f3380fdf-13ba-4b5e-9306-ceaf302c0323 + - 1013220a-37f0-4530-8ea2-e6ae517e207d status: code: 200 message: OK @@ -112,18 +114,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan\"\ - ,\r\n \"etag\": \"W/\\\"ec3a8cdc-869e-459c-9327-7ee63b406040\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\"\ - : false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\"\ - : \"None\",\r\n \"type\": \"Basic\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualwan\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan\",\r\n + \ \"etag\": \"W/\\\"45b02cae-abba-4862-9b14-ae8c66946e8d\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": + true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\": + \"Basic\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -132,9 +135,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:02:52 GMT + - Fri, 05 Nov 2021 09:38:18 GMT etag: - - W/"ec3a8cdc-869e-459c-9327-7ee63b406040" + - W/"45b02cae-abba-4862-9b14-ae8c66946e8d" expires: - '-1' pragma: @@ -151,7 +154,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9d71d068-344f-4ab9-902b-f87e953ec1f7 + - 36c20c70-73cc-407b-bb70-e759963dff2e status: code: 200 message: OK @@ -171,27 +174,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\ - ,\r\n \"etag\": \"W/\\\"b8b3d70f-00b2-4a11-bc91-fd658df4405a\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Updating\",\r\n \"virtualHubRouteTableV2s\"\ - : [],\r\n \"addressPrefix\": \"10.168.0.0/24\",\r\n \"virtualRouterAsn\"\ - : 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"\ - routes\": []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan\"\ - \r\n },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"None\",\r\ - \n \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\"\ - : \"ExpressRoute\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\",\r\n + \ \"etag\": \"W/\\\"8b4150d5-1cba-4332-b873-f83e0dc9e15b\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"virtualHubRouteTableV2s\": [],\r\n \"addressPrefix\": + \"10.168.0.0/24\",\r\n \"virtualRouterAsn\": 0,\r\n \"virtualRouterIps\": + [],\r\n \"routeTable\": {\r\n \"routes\": []\r\n },\r\n \"virtualWan\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan\"\r\n + \ },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"None\",\r\n \"allowBranchToBranchTraffic\": + false,\r\n \"preferredRoutingGateway\": \"ExpressRoute\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8a94a5a9-0734-4f76-be5a-106f88bbbe3d?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3ab9f089-d489-484e-94f6-48d73a00a808?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -199,7 +202,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:02:57 GMT + - Fri, 05 Nov 2021 09:38:19 GMT expires: - '-1' pragma: @@ -212,9 +215,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 713f3559-3b1e-4497-b0b9-d2a238c5d4cf + - f7e17249-b20f-492c-bd26-b39fadb9277e x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1198' status: code: 201 message: Created @@ -228,9 +231,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8a94a5a9-0734-4f76-be5a-106f88bbbe3d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3ab9f089-d489-484e-94f6-48d73a00a808?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -242,7 +246,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:03:07 GMT + - Fri, 05 Nov 2021 09:38:29 GMT expires: - '-1' pragma: @@ -259,7 +263,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 13138a75-5237-48e4-a86b-69c12b576a72 + - 6d924723-8187-412c-8b4b-f0fd7ab2b0c0 status: code: 200 message: OK @@ -273,9 +277,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8a94a5a9-0734-4f76-be5a-106f88bbbe3d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3ab9f089-d489-484e-94f6-48d73a00a808?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -287,7 +292,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:03:18 GMT + - Fri, 05 Nov 2021 09:38:39 GMT expires: - '-1' pragma: @@ -304,7 +309,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - efe77c20-7592-444b-852e-99a3956404b4 + - d173efba-eac4-4c9b-84d9-b697db7f285f status: code: 200 message: OK @@ -318,9 +323,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8a94a5a9-0734-4f76-be5a-106f88bbbe3d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3ab9f089-d489-484e-94f6-48d73a00a808?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -332,7 +338,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:03:38 GMT + - Fri, 05 Nov 2021 09:38:59 GMT expires: - '-1' pragma: @@ -349,7 +355,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8052aa22-29f0-45a3-b463-71b93082e27c + - 31d5ab4d-af6b-4524-a638-3e1eb67408d7 status: code: 200 message: OK @@ -363,9 +369,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8a94a5a9-0734-4f76-be5a-106f88bbbe3d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3ab9f089-d489-484e-94f6-48d73a00a808?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -377,7 +384,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:03:58 GMT + - Fri, 05 Nov 2021 09:39:19 GMT expires: - '-1' pragma: @@ -394,7 +401,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 184a78d8-64b6-472f-84d7-ddd222647ab8 + - bc7f07a0-08ce-4f87-9809-48f4eb20db71 status: code: 200 message: OK @@ -408,9 +415,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8a94a5a9-0734-4f76-be5a-106f88bbbe3d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3ab9f089-d489-484e-94f6-48d73a00a808?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -422,7 +430,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:04:39 GMT + - Fri, 05 Nov 2021 09:40:00 GMT expires: - '-1' pragma: @@ -439,7 +447,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e85f199f-6dc4-4b71-a9e6-390eaee2a916 + - bac9f934-4a54-488d-90df-42634be7b9be status: code: 200 message: OK @@ -453,9 +461,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8a94a5a9-0734-4f76-be5a-106f88bbbe3d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3ab9f089-d489-484e-94f6-48d73a00a808?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -467,7 +476,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:05:19 GMT + - Fri, 05 Nov 2021 09:40:39 GMT expires: - '-1' pragma: @@ -484,7 +493,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2505a13b-2f37-405f-a3c9-ef6cdd86ebaa + - 9165a07c-4d6b-4237-b31f-4f72f52789c2 status: code: 200 message: OK @@ -498,9 +507,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8a94a5a9-0734-4f76-be5a-106f88bbbe3d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3ab9f089-d489-484e-94f6-48d73a00a808?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -512,7 +522,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:06:40 GMT + - Fri, 05 Nov 2021 09:41:59 GMT expires: - '-1' pragma: @@ -529,7 +539,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d47728fd-b24f-45ef-ae10-1c01ce61679e + - 87bcab0f-b04a-40de-9d12-888522d2b885 status: code: 200 message: OK @@ -543,21 +553,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8a94a5a9-0734-4f76-be5a-106f88bbbe3d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3ab9f089-d489-484e-94f6-48d73a00a808?api-version=2021-05-01 response: body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" + string: "{\r\n \"status\": \"InProgress\"\r\n}" headers: cache-control: - no-cache content-length: - - '29' + - '30' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:09:21 GMT + - Fri, 05 Nov 2021 09:44:40 GMT expires: - '-1' pragma: @@ -574,7 +585,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2d351a0e-9af9-4ec5-adbc-8085e7749d84 + - 44bec9fc-496e-410a-a79f-1043b6ace29d status: code: 200 message: OK @@ -588,31 +599,32 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\ - ,\r\n \"etag\": \"W/\\\"47920ffc-2438-4e08-92f4-f4261c6ec924\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\"\ - : [],\r\n \"addressPrefix\": \"10.168.0.0/24\",\r\n \"virtualRouterAsn\"\ - : 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"\ - routes\": []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan\"\ - \r\n },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"Provisioning\"\ - ,\r\n \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\"\ - : \"ExpressRoute\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\",\r\n + \ \"etag\": \"W/\\\"dc3355a4-f168-455f-a433-0805d3dabce7\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"virtualHubRouteTableV2s\": [],\r\n \"addressPrefix\": + \"10.168.0.0/24\",\r\n \"virtualRouterAsn\": 0,\r\n \"virtualRouterIps\": + [],\r\n \"routeTable\": {\r\n \"routes\": []\r\n },\r\n \"virtualWan\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan\"\r\n + \ },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"Provisioning\",\r\n + \ \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\": + \"ExpressRoute\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '993' + - '29' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:09:21 GMT + - Fri, 05 Nov 2021 09:44:40 GMT expires: - '-1' pragma: @@ -629,7 +641,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a07d6464-a222-4b78-8fbf-06e2b931f060 + - 86cb3788-5be8-46c5-a517-c15724059625 status: code: 200 message: OK @@ -648,21 +660,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\ - \r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\"\ - : [],\r\n \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \ - \ \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\ - ,\r\n \"name\": \"firewallpolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\"\ - ,\r\n \"etag\": \"53c5df4e-f046-4d43-9e5b-7c0821c06063\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" + string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n + \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\",\r\n + \ \"name\": \"firewallpolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n + \ \"etag\": \"84a81f15-ede1-4726-bc84-3533bd7116d1\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/558b9af0-1c33-4bdd-82ba-dc8f105ce496?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/2e6ad90b-5a2d-4c60-9ea1-cdf4b963f9a8?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -670,7 +683,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:09:34 GMT + - Fri, 05 Nov 2021 09:44:43 GMT expires: - '-1' pragma: @@ -682,7 +695,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1189' status: code: 201 message: Created @@ -696,21 +709,32 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/558b9af0-1c33-4bdd-82ba-dc8f105ce496?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/nfvOperations/2e6ad90b-5a2d-4c60-9ea1-cdf4b963f9a8?api-version=2021-05-01 response: body: - string: "{\r\n \"status\": \"Succeeded\"\r\n}" + string: "{\r\n \"name\": \"virtualhub\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\ + ,\r\n \"etag\": \"W/\\\"47920ffc-2438-4e08-92f4-f4261c6ec924\\\"\",\r\n \ + \ \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\"\ + ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ + : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\"\ + : [],\r\n \"addressPrefix\": \"10.168.0.0/24\",\r\n \"virtualRouterAsn\"\ + : 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"\ + routes\": []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualWans/virtualwan\"\ + \r\n },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"Provisioning\"\ + ,\r\n \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\"\ + : \"ExpressRoute\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '29' + - '993' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:09:44 GMT + - Fri, 05 Nov 2021 09:44:53 GMT expires: - '-1' pragma: @@ -738,18 +762,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\ - \r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\"\ - : [],\r\n \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \ - \ \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\ - ,\r\n \"name\": \"firewallpolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\"\ - ,\r\n \"etag\": \"53c5df4e-f046-4d43-9e5b-7c0821c06063\",\r\n \"location\"\ - : \"eastus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" + string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n + \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\",\r\n + \ \"name\": \"firewallpolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n + \ \"etag\": \"84a81f15-ede1-4726-bc84-3533bd7116d1\",\r\n \"location\": \"eastus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -758,9 +783,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:09:44 GMT + - Fri, 05 Nov 2021 09:44:53 GMT etag: - - '"53c5df4e-f046-4d43-9e5b-7c0821c06063"' + - '"84a81f15-ede1-4726-bc84-3533bd7116d1"' expires: - '-1' pragma: @@ -775,15 +800,14 @@ interactions: - Accept-Encoding x-content-type-options: - nosniff + x-ms-arm-service-request-id: + - a07d6464-a222-4b78-8fbf-06e2b931f060 status: code: 200 message: OK - request: - body: '{"location": "West US", "tags": {"key1": "value1"}, "zones": [], "properties": - {"virtualHub": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub"}, - "firewallPolicy": {"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy"}, - "hubIPAddresses": {"publicIPs": {"addresses": [], "count": 1}}, "sku": {"name": - "AZFW_Hub", "tier": "Standard"}}}' + body: '{"location": "eastus", "tags": {"key1": "value1"}, "properties": {"threatIntelMode": + "Alert"}}' headers: Accept: - application/json @@ -792,13 +816,69 @@ interactions: Connection: - keep-alive Content-Length: - - '606' + - '94' Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\",\r\n + \ \"etag\": \"W/\\\"b0a47ab2-2c52-4e4f-8dfa-88c12b718851\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"virtualHub\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\r\n + \ },\r\n \"hubIPAddresses\": {\r\n \"publicIPs\": {\r\n \"addresses\": + [],\r\n \"count\": 1\r\n }\r\n },\r\n \"firewallPolicy\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\r\n + \ }\r\n }\r\n}" + headers: + azure-asyncoperation: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 + cache-control: + - no-cache + content-length: + - '618' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 05 Nov 2021 09:44:57 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 8ab43b61-edd1-448d-9939-4aef1be34cbd + x-ms-ratelimit-remaining-subscription-writes: + - '1188' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\"\ @@ -825,7 +905,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:09:52 GMT + - Fri, 05 Nov 2021 09:45:07 GMT expires: - '-1' pragma: @@ -838,9 +918,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 4353692c-bfa4-474b-9d87-975d59e46e47 - x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - e8155bfc-e9ea-4620-a08c-505a450fbea8 status: code: 201 message: Created @@ -854,9 +932,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -868,7 +947,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:10:02 GMT + - Fri, 05 Nov 2021 09:45:18 GMT expires: - '-1' pragma: @@ -885,7 +964,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9a40fefc-bc26-4859-a893-47551dbdec27 + - 5b88608c-7185-467c-9434-2da2f6beae05 status: code: 200 message: OK @@ -899,9 +978,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -913,7 +993,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:10:15 GMT + - Fri, 05 Nov 2021 09:45:38 GMT expires: - '-1' pragma: @@ -930,7 +1010,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 64309e2b-4b9b-4847-9da7-42f6b724162e + - 547ffa09-46d2-4d25-96a5-baead1038d4f status: code: 200 message: OK @@ -944,9 +1024,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -958,7 +1039,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:10:35 GMT + - Fri, 05 Nov 2021 09:45:57 GMT expires: - '-1' pragma: @@ -975,7 +1056,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d34185d3-5717-47ac-a54d-ef9eb18f2ccf + - 36cacc7d-4d11-485b-965a-ccd5a7b474f9 status: code: 200 message: OK @@ -989,9 +1070,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1003,7 +1085,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:10:55 GMT + - Fri, 05 Nov 2021 09:46:38 GMT expires: - '-1' pragma: @@ -1020,7 +1102,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e2ea3d19-3764-44b3-b82b-0e625283312e + - 76105c99-341e-41b3-b9b2-dc97aa985509 status: code: 200 message: OK @@ -1034,9 +1116,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1048,7 +1131,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:11:35 GMT + - Fri, 05 Nov 2021 09:47:18 GMT expires: - '-1' pragma: @@ -1065,7 +1148,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 436c5f85-8902-4b9b-9c2f-742c2c656ca6 + - 5a27d46b-44cb-46b3-bb7c-6b920bd6279e status: code: 200 message: OK @@ -1079,9 +1162,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1093,7 +1177,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:12:17 GMT + - Fri, 05 Nov 2021 09:48:37 GMT expires: - '-1' pragma: @@ -1110,7 +1194,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - bc86ce6e-d7aa-4be7-ab9f-ad5d85bca05b + - b62434c4-ae1e-45b1-8d96-e23d26e0a502 status: code: 200 message: OK @@ -1124,9 +1208,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1138,7 +1223,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:13:37 GMT + - Fri, 05 Nov 2021 09:51:18 GMT expires: - '-1' pragma: @@ -1155,7 +1240,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - be92f0d9-e81e-41d0-8f13-957d95047f15 + - 8384f545-99ad-4930-85de-f95eb031014c status: code: 200 message: OK @@ -1169,9 +1254,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1183,7 +1269,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:16:18 GMT + - Fri, 05 Nov 2021 09:52:58 GMT expires: - '-1' pragma: @@ -1200,7 +1286,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c0f0f809-384b-46f6-8e29-b162ca72f0f4 + - 81420734-fa1b-44c4-b169-e2dc29c9280a status: code: 200 message: OK @@ -1214,9 +1300,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1228,7 +1315,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:17:58 GMT + - Fri, 05 Nov 2021 09:54:38 GMT expires: - '-1' pragma: @@ -1245,7 +1332,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 620e0567-b284-48c8-9bd2-29b78b9ef5b3 + - ff7b1315-bb90-47e6-9b1c-e132be79717e status: code: 200 message: OK @@ -1259,9 +1346,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1273,7 +1361,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:19:39 GMT + - Fri, 05 Nov 2021 09:56:18 GMT expires: - '-1' pragma: @@ -1290,7 +1378,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a7cc0913-c8dc-434a-8f43-221ac655a233 + - 23dd910f-dbc1-4796-bb73-e08c5955c0a0 status: code: 200 message: OK @@ -1304,9 +1392,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4f5d9a75-c255-4228-a5dc-f2603f24b6d4?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d25fb46b-a68d-4e89-92f3-4de4558ff6c6?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1318,7 +1407,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:21:19 GMT + - Fri, 05 Nov 2021 09:57:58 GMT expires: - '-1' pragma: @@ -1335,7 +1424,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2bd0190b-c94a-45e3-b65e-b854164bb322 + - 8f70dedf-014a-4360-996a-fb26315e51c7 status: code: 200 message: OK @@ -1349,36 +1438,35 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\"\ - ,\r\n \"etag\": \"W/\\\"7a82d960-3f86-48d6-9414-0f0127102594\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \ - \ \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n\ - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\ - \r\n },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"\ - 10.168.0.132\",\r\n \"publicIPs\": {\r\n \"addresses\": [\r\n\ - \ {\r\n \"address\": \"104.45.209.39\"\r\n }\r\ - \n ],\r\n \"count\": 1\r\n }\r\n },\r\n \"firewallPolicy\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\",\r\n + \ \"etag\": \"W/\\\"490e4241-e354-4a40-acf5-7ddd04e713d6\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"virtualHub\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\r\n + \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.168.0.132\",\r\n + \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": + \"13.64.60.135\"\r\n }\r\n ],\r\n \"count\": 1\r\n + \ }\r\n },\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\r\n + \ }\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '1245' + - '1244' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:21:19 GMT + - Fri, 05 Nov 2021 09:57:58 GMT etag: - - W/"7a82d960-3f86-48d6-9414-0f0127102594" + - W/"490e4241-e354-4a40-acf5-7ddd04e713d6" expires: - '-1' pragma: @@ -1395,7 +1483,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 33cdc5dd-69fb-43fc-ad51-36600c72510d + - 8c0a3fd1-c96d-462f-9e11-5ce10b2aae1c status: code: 200 message: OK @@ -1409,36 +1497,35 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\"\ - ,\r\n \"etag\": \"W/\\\"7a82d960-3f86-48d6-9414-0f0127102594\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \ - \ \"name\": \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n\ - \ \"additionalProperties\": {},\r\n \"virtualHub\": {\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\ - \r\n },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"\ - 10.168.0.132\",\r\n \"publicIPs\": {\r\n \"addresses\": [\r\n\ - \ {\r\n \"address\": \"104.45.209.39\"\r\n }\r\ - \n ],\r\n \"count\": 1\r\n }\r\n },\r\n \"firewallPolicy\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\",\r\n + \ \"etag\": \"W/\\\"490e4241-e354-4a40-acf5-7ddd04e713d6\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": + \"Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"virtualHub\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\r\n + \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.168.0.132\",\r\n + \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": + \"13.64.60.135\"\r\n }\r\n ],\r\n \"count\": 1\r\n + \ }\r\n },\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\r\n + \ }\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '1245' + - '1244' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:21:20 GMT + - Fri, 05 Nov 2021 09:57:58 GMT etag: - - W/"7a82d960-3f86-48d6-9414-0f0127102594" + - W/"490e4241-e354-4a40-acf5-7ddd04e713d6" expires: - '-1' pragma: @@ -1455,7 +1542,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e5bd30f1-9ad3-45da-8898-babef7bb897a + - 578401d0-9b2a-4d95-8367-fb517f0a3f73 status: code: 200 message: OK @@ -1473,36 +1560,35 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\"\ - ,\r\n \"etag\": \"W/\\\"661e2bc2-660b-40de-9d83-5572ceae4bf2\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"\ - Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"virtualHub\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\ - \r\n },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"\ - 10.168.0.132\",\r\n \"publicIPs\": {\r\n \"addresses\": [\r\n\ - \ {\r\n \"address\": \"104.45.209.39\"\r\n }\r\ - \n ],\r\n \"count\": 1\r\n }\r\n },\r\n \"firewallPolicy\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\",\r\n + \ \"etag\": \"W/\\\"34831e4b-d370-4ff2-9928-c92fca850468\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": + \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": + {},\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\r\n + \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.168.0.132\",\r\n + \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": + \"13.64.60.135\"\r\n }\r\n ],\r\n \"count\": 1\r\n + \ }\r\n },\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\r\n + \ }\r\n }\r\n}" headers: azure-asyncnotification: - Enabled cache-control: - no-cache content-length: - - '1267' + - '1266' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:21:24 GMT + - Fri, 05 Nov 2021 09:58:00 GMT expires: - '-1' pragma: @@ -1519,9 +1605,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - bf9cd4b5-5360-4999-835a-bb77dd719db5 + - 27a2ddf2-262e-4225-b7ce-b3b27ab3a58e x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1188' status: code: 200 message: OK @@ -1535,36 +1621,35 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\"\ - ,\r\n \"etag\": \"W/\\\"661e2bc2-660b-40de-9d83-5572ceae4bf2\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"\ - Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"virtualHub\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\ - \r\n },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"\ - 10.168.0.132\",\r\n \"publicIPs\": {\r\n \"addresses\": [\r\n\ - \ {\r\n \"address\": \"104.45.209.39\"\r\n }\r\ - \n ],\r\n \"count\": 1\r\n }\r\n },\r\n \"firewallPolicy\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\",\r\n + \ \"etag\": \"W/\\\"34831e4b-d370-4ff2-9928-c92fca850468\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": + \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": + {},\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\r\n + \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.168.0.132\",\r\n + \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": + \"13.64.60.135\"\r\n }\r\n ],\r\n \"count\": 1\r\n + \ }\r\n },\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\r\n + \ }\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '1267' + - '1266' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:21:35 GMT + - Fri, 05 Nov 2021 09:58:10 GMT etag: - - W/"661e2bc2-660b-40de-9d83-5572ceae4bf2" + - W/"34831e4b-d370-4ff2-9928-c92fca850468" expires: - '-1' pragma: @@ -1581,7 +1666,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5c4e6990-44a2-4fc3-abca-4522466b0461 + - 717d873c-6f7c-427e-9671-8d1464d5a8c2 status: code: 200 message: OK @@ -1595,36 +1680,35 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\"\ - ,\r\n \"etag\": \"W/\\\"661e2bc2-660b-40de-9d83-5572ceae4bf2\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"\ - Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"virtualHub\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\ - \r\n },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"\ - 10.168.0.132\",\r\n \"publicIPs\": {\r\n \"addresses\": [\r\n\ - \ {\r\n \"address\": \"104.45.209.39\"\r\n }\r\ - \n ],\r\n \"count\": 1\r\n }\r\n },\r\n \"firewallPolicy\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\",\r\n + \ \"etag\": \"W/\\\"34831e4b-d370-4ff2-9928-c92fca850468\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": + \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": + {},\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\r\n + \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.168.0.132\",\r\n + \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": + \"13.64.60.135\"\r\n }\r\n ],\r\n \"count\": 1\r\n + \ }\r\n },\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\r\n + \ }\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '1267' + - '1266' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:22:05 GMT + - Fri, 05 Nov 2021 09:58:39 GMT etag: - - W/"661e2bc2-660b-40de-9d83-5572ceae4bf2" + - W/"34831e4b-d370-4ff2-9928-c92fca850468" expires: - '-1' pragma: @@ -1641,7 +1725,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d5e3cb91-2f33-4caa-a64f-9416416ce7cc + - 655dfa64-bb9f-41ba-be37-c8b1e22670d5 status: code: 200 message: OK @@ -1655,36 +1739,153 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\"\ - ,\r\n \"etag\": \"W/\\\"212512f7-537a-4cd9-98ba-90105d0f4d8b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"sku\": {\r\n \"name\": \"AZFW_Hub\",\r\n \"tier\": \"\ - Standard\"\r\n },\r\n \"additionalProperties\": {},\r\n \"virtualHub\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\ - \r\n },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"\ - 10.168.0.132\",\r\n \"publicIPs\": {\r\n \"addresses\": [\r\n\ - \ {\r\n \"address\": \"104.45.209.39\"\r\n }\r\ - \n ],\r\n \"count\": 1\r\n }\r\n },\r\n \"firewallPolicy\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\",\r\n + \ \"etag\": \"W/\\\"34831e4b-d370-4ff2-9928-c92fca850468\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": + \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": + {},\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\r\n + \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.168.0.132\",\r\n + \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": + \"13.64.60.135\"\r\n }\r\n ],\r\n \"count\": 1\r\n + \ }\r\n },\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\r\n + \ }\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '1268' + - '1266' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 05 Nov 2021 09:59:10 GMT + etag: + - W/"34831e4b-d370-4ff2-9928-c92fca850468" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - 74e8298c-97b7-4a1c-91e6-829f80a97540 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\",\r\n + \ \"etag\": \"W/\\\"34831e4b-d370-4ff2-9928-c92fca850468\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"sku\": {\r\n \"name\": + \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": + {},\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\r\n + \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.168.0.132\",\r\n + \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": + \"13.64.60.135\"\r\n }\r\n ],\r\n \"count\": 1\r\n + \ }\r\n },\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\r\n + \ }\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1266' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 05 Nov 2021 09:59:40 GMT + etag: + - W/"34831e4b-d370-4ff2-9928-c92fca850468" + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - d271afdb-0871-4a02-8017-c7bd860d5d6d + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 + response: + body: + string: "{\r\n \"name\": \"azurefirewall\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall\",\r\n + \ \"etag\": \"W/\\\"decf3cd8-801d-4cf3-8615-9a5cc00f7016\\\"\",\r\n \"type\": + \"Microsoft.Network/azureFirewalls\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"sku\": {\r\n \"name\": + \"AZFW_Hub\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"additionalProperties\": + {},\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/virtualHubs/virtualhub\"\r\n + \ },\r\n \"hubIPAddresses\": {\r\n \"privateIPAddress\": \"10.168.0.132\",\r\n + \ \"publicIPs\": {\r\n \"addresses\": [\r\n {\r\n \"address\": + \"13.64.60.135\"\r\n }\r\n ],\r\n \"count\": 1\r\n + \ }\r\n },\r\n \"firewallPolicy\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/firewallPolicies/firewallpolicy\"\r\n + \ }\r\n }\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '1267' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:22:36 GMT + - Fri, 05 Nov 2021 10:00:10 GMT etag: - - W/"212512f7-537a-4cd9-98ba-90105d0f4d8b" + - W/"decf3cd8-801d-4cf3-8615-9a5cc00f7016" expires: - '-1' pragma: @@ -1701,7 +1902,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - eac59f6c-ff3a-4d54-bae8-1ade9a51934d + - 2397d111-c1e6-4738-ac03-813cb8016f0d status: code: 200 message: OK @@ -1717,9 +1918,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_network_firewall_test_network892411e1/providers/Microsoft.Network/azureFirewalls/azurefirewall?api-version=2021-05-01 response: body: string: '' @@ -1727,17 +1929,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:22:38 GMT + - Fri, 05 Nov 2021 10:00:10 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 pragma: - no-cache server: @@ -1748,9 +1950,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 895407d2-b8f9-422d-ad16-f06f578713ef + - 8a3d093f-72d3-4a95-abf5-b979407bf5f5 x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14988' status: code: 202 message: Accepted @@ -1764,9 +1966,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1778,7 +1981,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:22:48 GMT + - Fri, 05 Nov 2021 10:00:20 GMT expires: - '-1' pragma: @@ -1795,7 +1998,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 692ae9f5-5e12-4ed2-b8f6-8d1d7eae87b0 + - 080e83c6-1e46-4a6c-9718-b170c6094536 status: code: 200 message: OK @@ -1809,9 +2012,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1823,7 +2027,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:22:59 GMT + - Fri, 05 Nov 2021 10:00:31 GMT expires: - '-1' pragma: @@ -1840,7 +2044,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c956941c-e2e5-45b1-8329-e4ad99f43ccc + - 7110059b-d451-4e39-a6d7-f677507dcff0 status: code: 200 message: OK @@ -1854,9 +2058,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1868,7 +2073,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:23:19 GMT + - Fri, 05 Nov 2021 10:00:51 GMT expires: - '-1' pragma: @@ -1885,7 +2090,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 68134544-a7b9-4e19-aafd-af7eff462da5 + - 35d1a6ac-9832-408f-9016-51977b1ec708 status: code: 200 message: OK @@ -1899,9 +2104,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1913,7 +2119,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:23:39 GMT + - Fri, 05 Nov 2021 10:01:10 GMT expires: - '-1' pragma: @@ -1930,7 +2136,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 4003fb1f-2136-41de-a916-0419ba78a75a + - 81b0b5ea-b332-4f01-a099-ff3fca1337da status: code: 200 message: OK @@ -1944,9 +2150,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1958,7 +2165,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:24:20 GMT + - Fri, 05 Nov 2021 10:01:50 GMT expires: - '-1' pragma: @@ -1975,7 +2182,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7010c004-1e93-4773-9064-ada622f85597 + - 8532b8d3-833c-4242-bac7-07c0500ad174 status: code: 200 message: OK @@ -1989,9 +2196,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2003,7 +2211,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:25:00 GMT + - Fri, 05 Nov 2021 10:02:31 GMT expires: - '-1' pragma: @@ -2020,7 +2228,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c01a3f4d-20dd-4f3a-8454-1fc43d813535 + - ea87ac27-9cb1-470d-a57a-37e0f3fa7b73 status: code: 200 message: OK @@ -2034,9 +2242,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2048,7 +2257,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:26:21 GMT + - Fri, 05 Nov 2021 10:03:50 GMT expires: - '-1' pragma: @@ -2065,7 +2274,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0b3ecd9a-67ff-41da-9ebc-1a2454bbdf12 + - afe77e06-29f7-4ac7-9bef-dad0a6ded0a7 status: code: 200 message: OK @@ -2079,9 +2288,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/cc3e16d0-0536-492e-9c8c-66c800f1fe9c?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/61f9d9a3-9427-4aa2-8300-2dca23b1330a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -2093,7 +2303,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:02 GMT + - Fri, 05 Nov 2021 10:06:31 GMT expires: - '-1' pragma: @@ -2110,7 +2320,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 77a01e44-d4ef-4f6d-9145-13d9c2c4cb11 + - 1b2791c3-0fe0-4bb7-a18c-c82928377057 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_firewall_policy.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_firewall_policy.test_network.yaml index 463341f892bc..0343a9a12281 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_firewall_policy.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_firewall_policy.test_network.yaml @@ -14,21 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\ - \r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\"\ - : [],\r\n \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \ - \ \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\"\ - ,\r\n \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\"\ - ,\r\n \"etag\": \"4b2a2155-3831-4516-9ea3-251fc57f2893\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" + string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n + \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": + \"Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n + \ \"etag\": \"5db5c6d5-f1e9-4360-a2a5-0084b70b2e3e\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/d5267cb7-fd51-466c-a487-6e5b268f78c1?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/a05d0430-69e1-4d4f-9903-3b8c0ef0d272?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -36,7 +37,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:18 GMT + - Fri, 05 Nov 2021 10:06:38 GMT expires: - '-1' pragma: @@ -48,7 +49,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1193' status: code: 201 message: Created @@ -62,9 +63,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/d5267cb7-fd51-466c-a487-6e5b268f78c1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/a05d0430-69e1-4d4f-9903-3b8c0ef0d272?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -76,7 +78,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:29 GMT + - Fri, 05 Nov 2021 10:06:48 GMT expires: - '-1' pragma: @@ -104,18 +106,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\ - \r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\"\ - : [],\r\n \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \ - \ \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\"\ - ,\r\n \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\"\ - ,\r\n \"etag\": \"4b2a2155-3831-4516-9ea3-251fc57f2893\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" + string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n + \ \"ruleCollectionGroups\": [],\r\n \"firewalls\": [],\r\n \"provisioningState\": + \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n + \ \"etag\": \"5db5c6d5-f1e9-4360-a2a5-0084b70b2e3e\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -124,9 +127,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:29 GMT + - Fri, 05 Nov 2021 10:06:48 GMT etag: - - '"4b2a2155-3831-4516-9ea3-251fc57f2893"' + - '"5db5c6d5-f1e9-4360-a2a5-0084b70b2e3e"' expires: - '-1' pragma: @@ -162,30 +165,29 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup?api-version=2020-04-01 response: body: - string: "{\r\n \"properties\": {\r\n \"priority\": 110,\r\n \"rules\"\ - : [\r\n {\r\n \"ruleType\": \"FirewallPolicyFilterRule\",\r\n\ - \ \"action\": {\r\n \"type\": \"Deny\"\r\n },\r\n \ - \ \"ruleConditions\": [\r\n {\r\n \"ruleConditionType\"\ - : \"NetworkRuleCondition\",\r\n \"name\": \"network-condition1\"\ - ,\r\n \"ipProtocols\": [\r\n \"TCP\"\r\n \ - \ ],\r\n \"sourceAddresses\": [\r\n \"10.1.25.0/24\"\ - \r\n ],\r\n \"destinationAddresses\": [\r\n \ - \ \"*\"\r\n ],\r\n \"destinationPorts\": [\r\n\ - \ \"*\"\r\n ]\r\n }\r\n ],\r\n \ - \ \"name\": \"Example-Filter-Rule\",\r\n \"priority\": 0\r\n \ - \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup\"\ - ,\r\n \"name\": \"myRuleGroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleGroups\"\ - ,\r\n \"etag\": \"ac0c0e06-0b93-4741-8a47-c03a76ca7673\",\r\n \"location\"\ - : \"westus\"\r\n}" + string: "{\r\n \"properties\": {\r\n \"priority\": 110,\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"FirewallPolicyFilterRule\",\r\n \"action\": + {\r\n \"type\": \"Deny\"\r\n },\r\n \"ruleConditions\": + [\r\n {\r\n \"ruleConditionType\": \"NetworkRuleCondition\",\r\n + \ \"name\": \"network-condition1\",\r\n \"ipProtocols\": + [\r\n \"TCP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"10.1.25.0/24\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"*\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"Example-Filter-Rule\",\r\n \"priority\": 0\r\n + \ }\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup\",\r\n + \ \"name\": \"myRuleGroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleGroups\",\r\n + \ \"etag\": \"2ca1e141-342d-4f96-9a53-2f6cd16e3e7e\",\r\n \"location\": \"westus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/6013b275-cf33-472e-a70a-d716f6c116e9?api-version=2020-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/ce2acaf8-7c3e-4a76-b69e-ee9da96a28f0?api-version=2020-04-01 cache-control: - no-cache content-length: @@ -193,7 +195,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:36 GMT + - Fri, 05 Nov 2021 10:06:49 GMT expires: - '-1' pragma: @@ -205,7 +207,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1192' status: code: 201 message: Created @@ -219,9 +221,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/6013b275-cf33-472e-a70a-d716f6c116e9?api-version=2020-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/ce2acaf8-7c3e-4a76-b69e-ee9da96a28f0?api-version=2020-04-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -233,7 +236,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:46 GMT + - Fri, 05 Nov 2021 10:06:59 GMT expires: - '-1' pragma: @@ -261,27 +264,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup?api-version=2020-04-01 response: body: - string: "{\r\n \"properties\": {\r\n \"priority\": 110,\r\n \"rules\"\ - : [\r\n {\r\n \"ruleType\": \"FirewallPolicyFilterRule\",\r\n\ - \ \"action\": {\r\n \"type\": \"Deny\"\r\n },\r\n \ - \ \"ruleConditions\": [\r\n {\r\n \"ruleConditionType\"\ - : \"NetworkRuleCondition\",\r\n \"name\": \"network-condition1\"\ - ,\r\n \"ipProtocols\": [\r\n \"TCP\"\r\n \ - \ ],\r\n \"sourceAddresses\": [\r\n \"10.1.25.0/24\"\ - \r\n ],\r\n \"destinationAddresses\": [\r\n \ - \ \"*\"\r\n ],\r\n \"destinationPorts\": [\r\n\ - \ \"*\"\r\n ]\r\n }\r\n ],\r\n \ - \ \"name\": \"Example-Filter-Rule\",\r\n \"priority\": 0\r\n \ - \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup\"\ - ,\r\n \"name\": \"myRuleGroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleGroups\"\ - ,\r\n \"etag\": \"ac0c0e06-0b93-4741-8a47-c03a76ca7673\",\r\n \"location\"\ - : \"westus\"\r\n}" + string: "{\r\n \"properties\": {\r\n \"priority\": 110,\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"FirewallPolicyFilterRule\",\r\n \"action\": + {\r\n \"type\": \"Deny\"\r\n },\r\n \"ruleConditions\": + [\r\n {\r\n \"ruleConditionType\": \"NetworkRuleCondition\",\r\n + \ \"name\": \"network-condition1\",\r\n \"ipProtocols\": + [\r\n \"TCP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"10.1.25.0/24\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"*\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"Example-Filter-Rule\",\r\n \"priority\": 0\r\n + \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup\",\r\n + \ \"name\": \"myRuleGroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleGroups\",\r\n + \ \"etag\": \"2ca1e141-342d-4f96-9a53-2f6cd16e3e7e\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache @@ -290,9 +292,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:46 GMT + - Fri, 05 Nov 2021 10:06:59 GMT etag: - - '"ac0c0e06-0b93-4741-8a47-c03a76ca7673"' + - '"2ca1e141-342d-4f96-9a53-2f6cd16e3e7e"' expires: - '-1' pragma: @@ -320,27 +322,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup?api-version=2020-04-01 response: body: - string: "{\r\n \"properties\": {\r\n \"priority\": 110,\r\n \"rules\"\ - : [\r\n {\r\n \"ruleType\": \"FirewallPolicyFilterRule\",\r\n\ - \ \"action\": {\r\n \"type\": \"Deny\"\r\n },\r\n \ - \ \"ruleConditions\": [\r\n {\r\n \"ruleConditionType\"\ - : \"NetworkRuleCondition\",\r\n \"name\": \"network-condition1\"\ - ,\r\n \"ipProtocols\": [\r\n \"TCP\"\r\n \ - \ ],\r\n \"sourceAddresses\": [\r\n \"10.1.25.0/24\"\ - \r\n ],\r\n \"destinationAddresses\": [\r\n \ - \ \"*\"\r\n ],\r\n \"destinationPorts\": [\r\n\ - \ \"*\"\r\n ]\r\n }\r\n ],\r\n \ - \ \"name\": \"Example-Filter-Rule\",\r\n \"priority\": 0\r\n \ - \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup\"\ - ,\r\n \"name\": \"myRuleGroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleGroups\"\ - ,\r\n \"etag\": \"ac0c0e06-0b93-4741-8a47-c03a76ca7673\",\r\n \"location\"\ - : \"westus\"\r\n}" + string: "{\r\n \"properties\": {\r\n \"priority\": 110,\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"FirewallPolicyFilterRule\",\r\n \"action\": + {\r\n \"type\": \"Deny\"\r\n },\r\n \"ruleConditions\": + [\r\n {\r\n \"ruleConditionType\": \"NetworkRuleCondition\",\r\n + \ \"name\": \"network-condition1\",\r\n \"ipProtocols\": + [\r\n \"TCP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"10.1.25.0/24\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"*\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"Example-Filter-Rule\",\r\n \"priority\": 0\r\n + \ }\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup\",\r\n + \ \"name\": \"myRuleGroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleGroups\",\r\n + \ \"etag\": \"2ca1e141-342d-4f96-9a53-2f6cd16e3e7e\",\r\n \"location\": \"westus\"\r\n}" headers: cache-control: - no-cache @@ -349,9 +350,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:47 GMT + - Fri, 05 Nov 2021 10:06:59 GMT etag: - - '"ac0c0e06-0b93-4741-8a47-c03a76ca7673"' + - '"2ca1e141-342d-4f96-9a53-2f6cd16e3e7e"' expires: - '-1' pragma: @@ -379,31 +380,31 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\ - \r\n },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\"\ - : [],\r\n \"ruleCollectionGroups\": [\r\n {\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallpolicies/myFirewallPolicy/ruleCollectionGroups/myRuleGroup\"\ - \r\n }\r\n ],\r\n \"firewalls\": [],\r\n \"provisioningState\"\ - : \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\"\ - ,\r\n \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\"\ - ,\r\n \"etag\": \"54abce39-f07d-4f21-870b-0ce347c25d13\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" + string: "{\r\n \"properties\": {\r\n \"sku\": {\r\n \"tier\": \"Standard\"\r\n + \ },\r\n \"threatIntelMode\": \"Alert\",\r\n \"childPolicies\": [],\r\n + \ \"ruleCollectionGroups\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallpolicies/myFirewallPolicy/ruleCollectionGroups/myRuleGroup\",\r\n + \ \"resourceType\": \"NotDefined\"\r\n }\r\n ],\r\n \"firewalls\": + [],\r\n \"provisioningState\": \"Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy\",\r\n + \ \"name\": \"myFirewallPolicy\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies\",\r\n + \ \"etag\": \"c0e9bc18-1014-45eb-aa57-0af3ee7f70fd\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '931' + - '970' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:47 GMT + - Fri, 05 Nov 2021 10:07:00 GMT etag: - - '"54abce39-f07d-4f21-870b-0ce347c25d13"' + - '"c0e9bc18-1014-45eb-aa57-0af3ee7f70fd"' expires: - '-1' pragma: @@ -433,30 +434,29 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup?api-version=2020-04-01 response: body: - string: "{\r\n \"properties\": {\r\n \"priority\": 110,\r\n \"rules\"\ - : [\r\n {\r\n \"ruleType\": \"FirewallPolicyFilterRule\",\r\n\ - \ \"action\": {\r\n \"type\": \"Deny\"\r\n },\r\n \ - \ \"ruleConditions\": [\r\n {\r\n \"ruleConditionType\"\ - : \"NetworkRuleCondition\",\r\n \"name\": \"network-condition1\"\ - ,\r\n \"ipProtocols\": [\r\n \"TCP\"\r\n \ - \ ],\r\n \"sourceAddresses\": [\r\n \"10.1.25.0/24\"\ - \r\n ],\r\n \"destinationAddresses\": [\r\n \ - \ \"*\"\r\n ],\r\n \"destinationPorts\": [\r\n\ - \ \"*\"\r\n ]\r\n }\r\n ],\r\n \ - \ \"name\": \"Example-Filter-Rule\",\r\n \"priority\": 0\r\n \ - \ }\r\n ],\r\n \"provisioningState\": \"Deleting\"\r\n },\r\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup\"\ - ,\r\n \"name\": \"myRuleGroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleGroups\"\ - ,\r\n \"etag\": \"60b67acf-661a-48b1-b714-4c0c43f72745\",\r\n \"location\"\ - : \"westus\"\r\n}" + string: "{\r\n \"properties\": {\r\n \"priority\": 110,\r\n \"rules\": + [\r\n {\r\n \"ruleType\": \"FirewallPolicyFilterRule\",\r\n \"action\": + {\r\n \"type\": \"Deny\"\r\n },\r\n \"ruleConditions\": + [\r\n {\r\n \"ruleConditionType\": \"NetworkRuleCondition\",\r\n + \ \"name\": \"network-condition1\",\r\n \"ipProtocols\": + [\r\n \"TCP\"\r\n ],\r\n \"sourceAddresses\": + [\r\n \"10.1.25.0/24\"\r\n ],\r\n \"destinationAddresses\": + [\r\n \"*\"\r\n ],\r\n \"destinationPorts\": + [\r\n \"*\"\r\n ]\r\n }\r\n ],\r\n + \ \"name\": \"Example-Filter-Rule\",\r\n \"priority\": 0\r\n + \ }\r\n ],\r\n \"provisioningState\": \"Deleting\"\r\n },\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy/ruleGroups/myRuleGroup\",\r\n + \ \"name\": \"myRuleGroup\",\r\n \"type\": \"Microsoft.Network/FirewallPolicies/RuleGroups\",\r\n + \ \"etag\": \"f3ebcc39-a890-442c-b1d5-75eebf3587e7\",\r\n \"location\": \"westus\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/7887e1af-4cd9-410c-9414-f25414ff09f8?api-version=2020-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/ded27c87-cd44-4f4e-aa56-a84b047ae671?api-version=2020-04-01 cache-control: - no-cache content-length: @@ -464,11 +464,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:48 GMT + - Fri, 05 Nov 2021 10:07:00 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperationResults/7887e1af-4cd9-410c-9414-f25414ff09f8?api-version=2020-04-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperationResults/ded27c87-cd44-4f4e-aa56-a84b047ae671?api-version=2020-04-01 pragma: - no-cache server: @@ -478,7 +478,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14995' status: code: 202 message: Accepted @@ -492,9 +492,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/7887e1af-4cd9-410c-9414-f25414ff09f8?api-version=2020-04-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/ded27c87-cd44-4f4e-aa56-a84b047ae671?api-version=2020-04-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -506,7 +507,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:29:59 GMT + - Fri, 05 Nov 2021 10:07:10 GMT expires: - '-1' pragma: @@ -536,9 +537,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/firewallPolicies/myFirewallPolicy?api-version=2021-05-01 response: body: string: '' @@ -548,7 +550,7 @@ interactions: content-length: - '0' date: - - Sat, 09 Oct 2021 07:30:03 GMT + - Fri, 05 Nov 2021 10:07:13 GMT expires: - '-1' pragma: @@ -560,7 +562,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14994' status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_ip.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_ip.test_network.yaml index ce37eeae854e..b362113dda22 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_ip.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_ip.test_network.yaml @@ -14,21 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"firewalls\": [],\r\n \"firewallPolicies\"\ - : [],\r\n \"ipAddresses\": [\r\n \"13.64.39.16/32\",\r\n \"40.74.146.80/31\"\ - ,\r\n \"40.74.147.32/28\"\r\n ],\r\n \"provisioningState\": \"\ - Updating\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups\"\ - ,\r\n \"name\": \"myIpGroups\",\r\n \"type\": \"Microsoft.Network/IpGroups\"\ - ,\r\n \"etag\": \"0f5b9812-b0d2-423b-b217-8b402f064ed4\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" + string: "{\r\n \"properties\": {\r\n \"firewalls\": [],\r\n \"firewallPolicies\": + [],\r\n \"ipAddresses\": [\r\n \"13.64.39.16/32\",\r\n \"40.74.146.80/31\",\r\n + \ \"40.74.147.32/28\"\r\n ],\r\n \"provisioningState\": \"Updating\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups\",\r\n + \ \"name\": \"myIpGroups\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n + \ \"etag\": \"068cea02-dd72-4d0b-9299-bab5e7fa1ba4\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/a316eed3-e048-496b-9f59-109a67cf17ef?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/9efb8dfe-a2c4-46fa-b01d-a12d1aedf7e1?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -36,7 +37,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:16 GMT + - Fri, 05 Nov 2021 10:07:19 GMT expires: - '-1' pragma: @@ -62,9 +63,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/a316eed3-e048-496b-9f59-109a67cf17ef?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/nfvOperations/9efb8dfe-a2c4-46fa-b01d-a12d1aedf7e1?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -76,7 +78,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:26 GMT + - Fri, 05 Nov 2021 10:07:29 GMT expires: - '-1' pragma: @@ -104,18 +106,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"firewalls\": [],\r\n \"firewallPolicies\"\ - : [],\r\n \"ipAddresses\": [\r\n \"13.64.39.16/32\",\r\n \"40.74.146.80/31\"\ - ,\r\n \"40.74.147.32/28\"\r\n ],\r\n \"provisioningState\": \"\ - Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups\"\ - ,\r\n \"name\": \"myIpGroups\",\r\n \"type\": \"Microsoft.Network/IpGroups\"\ - ,\r\n \"etag\": \"0f5b9812-b0d2-423b-b217-8b402f064ed4\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" + string: "{\r\n \"properties\": {\r\n \"firewalls\": [],\r\n \"firewallPolicies\": + [],\r\n \"ipAddresses\": [\r\n \"13.64.39.16/32\",\r\n \"40.74.146.80/31\",\r\n + \ \"40.74.147.32/28\"\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups\",\r\n + \ \"name\": \"myIpGroups\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n + \ \"etag\": \"068cea02-dd72-4d0b-9299-bab5e7fa1ba4\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -124,9 +127,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:26 GMT + - Fri, 05 Nov 2021 10:07:29 GMT etag: - - '"0f5b9812-b0d2-423b-b217-8b402f064ed4"' + - '"068cea02-dd72-4d0b-9299-bab5e7fa1ba4"' expires: - '-1' pragma: @@ -154,18 +157,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups?api-version=2021-05-01 response: body: - string: "{\r\n \"properties\": {\r\n \"firewalls\": [],\r\n \"firewallPolicies\"\ - : [],\r\n \"ipAddresses\": [\r\n \"13.64.39.16/32\",\r\n \"40.74.146.80/31\"\ - ,\r\n \"40.74.147.32/28\"\r\n ],\r\n \"provisioningState\": \"\ - Succeeded\"\r\n },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups\"\ - ,\r\n \"name\": \"myIpGroups\",\r\n \"type\": \"Microsoft.Network/IpGroups\"\ - ,\r\n \"etag\": \"0f5b9812-b0d2-423b-b217-8b402f064ed4\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" + string: "{\r\n \"properties\": {\r\n \"firewalls\": [],\r\n \"firewallPolicies\": + [],\r\n \"ipAddresses\": [\r\n \"13.64.39.16/32\",\r\n \"40.74.146.80/31\",\r\n + \ \"40.74.147.32/28\"\r\n ],\r\n \"provisioningState\": \"Succeeded\"\r\n + \ },\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups\",\r\n + \ \"name\": \"myIpGroups\",\r\n \"type\": \"Microsoft.Network/IpGroups\",\r\n + \ \"etag\": \"068cea02-dd72-4d0b-9299-bab5e7fa1ba4\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -174,9 +178,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:27 GMT + - Fri, 05 Nov 2021 10:07:29 GMT etag: - - '"0f5b9812-b0d2-423b-b217-8b402f064ed4"' + - '"068cea02-dd72-4d0b-9299-bab5e7fa1ba4"' expires: - '-1' pragma: @@ -206,9 +210,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ipGroups/myIpGroups?api-version=2021-05-01 response: body: string: '' @@ -218,7 +223,7 @@ interactions: content-length: - '0' date: - - Sat, 09 Oct 2021 07:30:30 GMT + - Fri, 05 Nov 2021 10:07:30 GMT expires: - '-1' pragma: @@ -230,7 +235,7 @@ interactions: x-content-type-options: - nosniff x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14993' status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_ip_addresses.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_ip_addresses.test_network.yaml index be1a32520a6c..220078c6b294 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_ip_addresses.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_ip_addresses.test_network.yaml @@ -14,24 +14,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipprefixd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381\"\ - ,\r\n \"etag\": \"W/\\\"fa1430c8-abc4-486c-82c4-3849553ad1db\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"\ - westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"resourceGuid\": \"fb594c88-fccc-4501-b514-aaec39dda8d2\",\r\n \ - \ \"prefixLength\": 30,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n\ - \ \"ipTags\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"publicipprefixd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381\",\r\n + \ \"etag\": \"W/\\\"6fd143ba-f974-4db9-9ada-22e3b88805a4\\\"\",\r\n \"type\": + \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"fae41816-6bd9-4e00-8898-d092dfe98909\",\r\n \"prefixLength\": 30,\r\n + \ \"publicIPAddressVersion\": \"IPv4\",\r\n \"ipTags\": []\r\n },\r\n + \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2dec3af6-4573-4bda-9494-2cea35dd448b?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1ac15804-ae54-4918-80fc-0efd5709ec01?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -39,7 +40,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:46 GMT + - Fri, 05 Nov 2021 10:07:37 GMT expires: - '-1' pragma: @@ -52,7 +53,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b0a21e4f-03f7-4f77-9460-5eeacea9ab0f + - bee44597-6dd3-4b53-acc1-dd921d447799 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -68,9 +69,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2dec3af6-4573-4bda-9494-2cea35dd448b?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/1ac15804-ae54-4918-80fc-0efd5709ec01?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -82,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:49 GMT + - Fri, 05 Nov 2021 10:07:40 GMT expires: - '-1' pragma: @@ -99,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - aa23380f-df83-4c6d-8515-0d9dcbb6724d + - 700ce7e8-6d5b-4f49-bf00-bf0088a2e0d7 status: code: 200 message: OK @@ -113,31 +115,31 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipprefixd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381\"\ - ,\r\n \"etag\": \"W/\\\"9debd59c-6645-47d2-b861-2ab1cd7299dc\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"\ - westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"fb594c88-fccc-4501-b514-aaec39dda8d2\",\r\n \ - \ \"prefixLength\": 30,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n\ - \ \"ipPrefix\": \"104.42.23.112/30\",\r\n \"ipTags\": []\r\n },\r\n\ - \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"publicipprefixd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381\",\r\n + \ \"etag\": \"W/\\\"879c97e2-e3f0-410b-9fa4-1fc0d25620fa\\\"\",\r\n \"type\": + \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"fae41816-6bd9-4e00-8898-d092dfe98909\",\r\n \"prefixLength\": 30,\r\n + \ \"publicIPAddressVersion\": \"IPv4\",\r\n \"ipPrefix\": \"13.93.210.52/30\",\r\n + \ \"ipTags\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '710' + - '709' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:50 GMT + - Fri, 05 Nov 2021 10:07:40 GMT etag: - - W/"9debd59c-6645-47d2-b861-2ab1cd7299dc" + - W/"879c97e2-e3f0-410b-9fa4-1fc0d25620fa" expires: - '-1' pragma: @@ -154,7 +156,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1093ceb4-6345-42f9-bbf7-7ec5e348b947 + - 1360f96e-25f9-4265-b475-575385150b95 status: code: 200 message: OK @@ -172,24 +174,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipaddressd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381\"\ - ,\r\n \"etag\": \"W/\\\"703b203d-1711-4a90-bfc0-f7165f5892b3\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Updating\",\r\n \"resourceGuid\": \"dea76b1d-9fda-42c4-b995-c77ba28276a7\"\ - ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\"\ - : {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"publicipaddressd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381\",\r\n + \ \"etag\": \"W/\\\"b76fae01-94d3-416a-bae6-554f8e610a3b\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"73012ce5-dd21-4b9d-86bc-ad840806abae\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/686b88c8-13aa-4b22-a7d6-64edf59498d5?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/bf463db0-ee1f-420a-b4a2-a8f1637a2c48?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -197,7 +200,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:54 GMT + - Fri, 05 Nov 2021 10:07:41 GMT expires: - '-1' pragma: @@ -210,7 +213,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f407c0ea-feae-4d4a-8ee0-2d800b72fa02 + - 482defc4-2fc2-4d5f-ad33-ce5b96d8d18a x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -226,9 +229,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/686b88c8-13aa-4b22-a7d6-64edf59498d5?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/bf463db0-ee1f-420a-b4a2-a8f1637a2c48?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -240,7 +244,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:55 GMT + - Fri, 05 Nov 2021 10:07:42 GMT expires: - '-1' pragma: @@ -257,7 +261,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d644b0e5-8f2a-4004-aa6d-02c9fdf8dfd2 + - 3490dc90-cc98-4ba5-aee4-14ed7d6815a1 status: code: 200 message: OK @@ -271,19 +275,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipaddressd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381\"\ - ,\r\n \"etag\": \"W/\\\"0d77df32-9947-4258-aa41-e4727019619c\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"dea76b1d-9fda-42c4-b995-c77ba28276a7\"\ - ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\"\ - : {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"publicipaddressd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381\",\r\n + \ \"etag\": \"W/\\\"2b2ddb5a-4486-4ff9-9a8f-f343a3569c92\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"73012ce5-dd21-4b9d-86bc-ad840806abae\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -292,9 +297,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:56 GMT + - Fri, 05 Nov 2021 10:07:43 GMT etag: - - W/"0d77df32-9947-4258-aa41-e4727019619c" + - W/"2b2ddb5a-4486-4ff9-9a8f-f343a3569c92" expires: - '-1' pragma: @@ -311,7 +316,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5b2aed85-e51b-44a4-81f3-c46143dc9c3a + - a46e7dc1-131d-4bcc-a43b-a05b72fa9446 status: code: 200 message: OK @@ -325,19 +330,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipaddressd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381\"\ - ,\r\n \"etag\": \"W/\\\"0d77df32-9947-4258-aa41-e4727019619c\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"dea76b1d-9fda-42c4-b995-c77ba28276a7\"\ - ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\"\ - : {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"publicipaddressd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381\",\r\n + \ \"etag\": \"W/\\\"2b2ddb5a-4486-4ff9-9a8f-f343a3569c92\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"73012ce5-dd21-4b9d-86bc-ad840806abae\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: cache-control: - no-cache @@ -346,9 +352,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:57 GMT + - Fri, 05 Nov 2021 10:07:43 GMT etag: - - W/"0d77df32-9947-4258-aa41-e4727019619c" + - W/"2b2ddb5a-4486-4ff9-9a8f-f343a3569c92" expires: - '-1' pragma: @@ -365,7 +371,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - abbecbab-2990-44f4-96a0-a46dffd68e6e + - e41ea3e3-1561-445c-b939-f8cbb9ae0445 status: code: 200 message: OK @@ -379,31 +385,31 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipprefixd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381\"\ - ,\r\n \"etag\": \"W/\\\"9debd59c-6645-47d2-b861-2ab1cd7299dc\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"\ - westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"fb594c88-fccc-4501-b514-aaec39dda8d2\",\r\n \ - \ \"prefixLength\": 30,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n\ - \ \"ipPrefix\": \"104.42.23.112/30\",\r\n \"ipTags\": []\r\n },\r\n\ - \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"publicipprefixd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381\",\r\n + \ \"etag\": \"W/\\\"879c97e2-e3f0-410b-9fa4-1fc0d25620fa\\\"\",\r\n \"type\": + \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"westus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"fae41816-6bd9-4e00-8898-d092dfe98909\",\r\n \"prefixLength\": 30,\r\n + \ \"publicIPAddressVersion\": \"IPv4\",\r\n \"ipPrefix\": \"13.93.210.52/30\",\r\n + \ \"ipTags\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '710' + - '709' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:30:57 GMT + - Fri, 05 Nov 2021 10:07:43 GMT etag: - - W/"9debd59c-6645-47d2-b861-2ab1cd7299dc" + - W/"879c97e2-e3f0-410b-9fa4-1fc0d25620fa" expires: - '-1' pragma: @@ -420,7 +426,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 99926cca-c68e-45be-9cd0-07324d68a7aa + - a96056d8-0564-489a-8332-12a01ee0c89a status: code: 200 message: OK @@ -438,20 +444,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipaddressd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381\"\ - ,\r\n \"etag\": \"W/\\\"25554e37-f95d-43dc-b397-7a9b583a903f\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\ - \n \"tag2\": \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"dea76b1d-9fda-42c4-b995-c77ba28276a7\"\ - ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ - : \"Dynamic\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\"\ - : {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"publicipaddressd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381\",\r\n + \ \"etag\": \"W/\\\"e2d7dfa1-37e4-4678-b485-1dbb75a47110\\\"\",\r\n \"location\": + \"eastus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": + \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"73012ce5-dd21-4b9d-86bc-ad840806abae\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Dynamic\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Basic\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled @@ -462,7 +469,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:31:01 GMT + - Fri, 05 Nov 2021 10:07:44 GMT expires: - '-1' pragma: @@ -479,7 +486,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b49dcdfe-fe49-44c2-bce0-29eb3d4c7465 + - 6eb1b54a-b923-45be-a466-8816231d9417 x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -499,32 +506,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipprefixd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381\"\ - ,\r\n \"etag\": \"W/\\\"8c07bcf8-d92a-427e-a8fc-3bcd65b3ae7b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"\ - westus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\ - value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"fb594c88-fccc-4501-b514-aaec39dda8d2\",\r\n \ - \ \"prefixLength\": 30,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n\ - \ \"ipPrefix\": \"104.42.23.112/30\",\r\n \"ipTags\": []\r\n },\r\n\ - \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"publicipprefixd3db1381\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381\",\r\n + \ \"etag\": \"W/\\\"1d105436-aefa-4c97-be24-6d1fb6918649\\\"\",\r\n \"type\": + \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"fae41816-6bd9-4e00-8898-d092dfe98909\",\r\n \"prefixLength\": + 30,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"ipPrefix\": \"13.93.210.52/30\",\r\n + \ \"ipTags\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled cache-control: - no-cache content-length: - - '774' + - '773' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:31:02 GMT + - Fri, 05 Nov 2021 10:07:44 GMT expires: - '-1' pragma: @@ -541,7 +548,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cb452bac-621e-4e8c-9a8b-ac0506ef2c12 + - 270227c8-63ec-4222-97f5-d6f61441d29b x-ms-ratelimit-remaining-subscription-writes: - '1196' status: @@ -559,9 +566,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddressd3db1381?api-version=2021-05-01 response: body: string: '' @@ -569,17 +577,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5428a613-c70b-4003-9bbb-0dba90d73ba3?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/32111615-9f45-47b0-8269-712af243739b?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:31:03 GMT + - Fri, 05 Nov 2021 10:07:45 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/5428a613-c70b-4003-9bbb-0dba90d73ba3?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/32111615-9f45-47b0-8269-712af243739b?api-version=2021-05-01 pragma: - no-cache server: @@ -590,7 +598,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0d026b0c-0b45-49bc-be4a-fc7c11ecdf0a + - 6e2ccd35-3f6b-4110-ad0d-154b43e1ad3a x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -606,9 +614,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5428a613-c70b-4003-9bbb-0dba90d73ba3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/32111615-9f45-47b0-8269-712af243739b?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -620,7 +629,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:31:14 GMT + - Fri, 05 Nov 2021 10:07:55 GMT expires: - '-1' pragma: @@ -637,7 +646,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a08c0266-6d24-478e-b622-a64999bbf25f + - 5ae0ce3f-1eb9-4b94-8bf5-8687a2862686 status: code: 200 message: OK @@ -653,9 +662,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefixd3db1381?api-version=2021-05-01 response: body: string: '' @@ -663,17 +673,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d6bd2fdc-4357-4053-a857-7003455ad121?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/62c6c1e0-2abf-4c5f-8f59-1628d79e147a?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:31:15 GMT + - Fri, 05 Nov 2021 10:07:55 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/d6bd2fdc-4357-4053-a857-7003455ad121?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/62c6c1e0-2abf-4c5f-8f59-1628d79e147a?api-version=2021-05-01 pragma: - no-cache server: @@ -684,7 +694,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 50532f65-8169-49a8-9d95-d5065781e3d4 + - 52c2e833-08c6-49a2-929b-26bd9fd49352 x-ms-ratelimit-remaining-subscription-deletes: - '14998' status: @@ -700,9 +710,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d6bd2fdc-4357-4053-a857-7003455ad121?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/62c6c1e0-2abf-4c5f-8f59-1628d79e147a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -714,7 +725,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:31:25 GMT + - Fri, 05 Nov 2021 10:08:05 GMT expires: - '-1' pragma: @@ -731,7 +742,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7cd96e9e-4012-4f39-90cb-1c34815b7aa2 + - e3e29f05-1925-4663-a5f4-43e85edfcd27 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_load_balancer.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_load_balancer.test_network.yaml index f523583e5209..6a29c17e3052 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_load_balancer.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_load_balancer.test_network.yaml @@ -14,25 +14,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"public_ip_address_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\ - ,\r\n \"etag\": \"W/\\\"61ba8436-3e1c-402b-8074-159b348d7eb5\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Updating\",\r\n \"resourceGuid\": \"de266522-c4ad-4e27-9546-4d5a5f0fda9d\"\ - ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ - : \"Static\",\r\n \"idleTimeoutInMinutes\": 10,\r\n \"ipTags\": []\r\ - \n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\"\ - : {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n\ - }" + string: "{\r\n \"name\": \"public_ip_address_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\",\r\n + \ \"etag\": \"W/\\\"460da7a8-0663-4782-93fd-af72db59f82c\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"816f0120-420d-4e6a-84f4-1cb2bb064ea1\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": + 10,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/fcf9a2bf-a43e-4332-89a7-fb9c55f96750?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2cf3782a-c6a6-4088-b217-d754612f1867?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -40,7 +40,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:31:40 GMT + - Fri, 05 Nov 2021 10:08:11 GMT expires: - '-1' pragma: @@ -53,7 +53,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 80275fb2-835d-412a-add9-045c735443b2 + - 30c64a10-2d95-4bb1-86ae-7257cbf748ef x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -69,9 +69,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/fcf9a2bf-a43e-4332-89a7-fb9c55f96750?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2cf3782a-c6a6-4088-b217-d754612f1867?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -83,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:31:42 GMT + - Fri, 05 Nov 2021 10:08:12 GMT expires: - '-1' pragma: @@ -100,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 54d11d1d-f3c8-43c0-ace8-ff5cf446abb6 + - 58f76a05-704b-4577-aa43-dadb24fc7c29 status: code: 200 message: OK @@ -114,20 +115,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"public_ip_address_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\ - ,\r\n \"etag\": \"W/\\\"028e3aba-6b93-40df-b5a8-6ac26a4e4eed\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"de266522-c4ad-4e27-9546-4d5a5f0fda9d\"\ - ,\r\n \"ipAddress\": \"13.90.153.169\",\r\n \"publicIPAddressVersion\"\ - : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\"\ - : 10,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\"\ - ,\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"public_ip_address_name\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\",\r\n + \ \"etag\": \"W/\\\"ce573125-e155-4c7c-9304-70975fdabf7f\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"816f0120-420d-4e6a-84f4-1cb2bb064ea1\",\r\n \"ipAddress\": + \"104.211.0.190\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \"Static\",\r\n \"idleTimeoutInMinutes\": 10,\r\n \"ipTags\": []\r\n + \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": + {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -136,9 +137,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:31:42 GMT + - Fri, 05 Nov 2021 10:08:12 GMT etag: - - W/"028e3aba-6b93-40df-b5a8-6ac26a4e4eed" + - W/"ce573125-e155-4c7c-9304-70975fdabf7f" expires: - '-1' pragma: @@ -155,7 +156,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a6630a4c-600d-41f5-9275-7ae67ff72ab6 + - 73c55f7b-c850-4bd7-96d3-18593d20af61 status: code: 200 message: OK @@ -188,81 +189,80 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"949b0d6d-07b0-484a-8f27-a9d327d51d39\",\r\n \"\ - frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\ - \r\n },\r\n \"loadBalancingRules\": [\r\n {\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ],\r\n \"outboundRules\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \ - \ \"backendAddressPools\": [\r\n {\r\n \"name\": \"myBackendAddressPool\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ],\r\n \"loadBalancingRules\": [\r\ - \n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\ - \r\n }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \ - \ \"name\": \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 80,\r\n \"backendPort\"\ - : 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\"\ - : 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\"\ - : false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\"\ - : false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\"\ - : true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"backendAddressPools\": [\r\n {\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n }\r\n ],\r\n \"probe\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n\ - \ {\r\n \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \ - \ \"requestPath\": \"healthcheck.aspx\",\r\n \"intervalInSeconds\"\ - : 15,\r\n \"numberOfProbes\": 2,\r\n \"loadBalancingRules\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\ - \r\n }\r\n ],\r\n \"inboundNatRules\": [],\r\n \"outboundRules\"\ - : [\r\n {\r\n \"name\": \"myOutboundRule\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"allocatedOutboundPorts\": 1024,\r\n \"protocol\"\ - : \"All\",\r\n \"enableTcpReset\": false,\r\n \"idleTimeoutInMinutes\"\ - : 4,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"frontendIPConfigurations\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \ - \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a34eb2b1-c9de-4343-8186-5bbb44c6a0b0\",\r\n + \ \"frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\r\n + \ },\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"myBackendAddressPool\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \"name\": + \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 80,\r\n \"backendPort\": + 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": + 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\": + true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"backendAddressPools\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ }\r\n ],\r\n \"probe\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n {\r\n + \ \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \"requestPath\": + \"healthcheck.aspx\",\r\n \"intervalInSeconds\": 15,\r\n \"numberOfProbes\": + 2,\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\r\n + \ }\r\n ],\r\n \"inboundNatRules\": [],\r\n \"outboundRules\": + [\r\n {\r\n \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"allocatedOutboundPorts\": + 1024,\r\n \"protocol\": \"All\",\r\n \"enableTcpReset\": + false,\r\n \"idleTimeoutInMinutes\": 4,\r\n \"backendAddressPool\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"frontendIPConfigurations\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"inboundNatPools\": + []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": + \"Regional\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/1e152f18-1396-4bf3-ac3d-0ab8563e9a83?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/95a02e10-9149-42aa-9ff8-5c353ac1b2a1?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -270,7 +270,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:31:46 GMT + - Fri, 05 Nov 2021 10:08:13 GMT expires: - '-1' pragma: @@ -283,7 +283,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7a86b5c4-59d2-4738-8111-1f32a991cc5c + - f78cec1f-f624-49a7-842b-8624124495d1 x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -299,9 +299,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/1e152f18-1396-4bf3-ac3d-0ab8563e9a83?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/95a02e10-9149-42aa-9ff8-5c353ac1b2a1?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -313,7 +314,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:16 GMT + - Fri, 05 Nov 2021 10:08:44 GMT expires: - '-1' pragma: @@ -330,7 +331,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7567eefa-ca0c-44da-be93-5cd6d8264333 + - 7efd0962-7bd1-4e91-98d2-027c489624f4 status: code: 200 message: OK @@ -344,76 +345,75 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"949b0d6d-07b0-484a-8f27-a9d327d51d39\",\r\n \"\ - frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\ - \r\n },\r\n \"loadBalancingRules\": [\r\n {\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ],\r\n \"outboundRules\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \ - \ \"backendAddressPools\": [\r\n {\r\n \"name\": \"myBackendAddressPool\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ],\r\n \"loadBalancingRules\": [\r\ - \n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\ - \r\n }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \ - \ \"name\": \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 80,\r\n \"backendPort\"\ - : 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\"\ - : 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\"\ - : false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\"\ - : false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\"\ - : true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"backendAddressPools\": [\r\n {\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n }\r\n ],\r\n \"probe\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n\ - \ {\r\n \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \ - \ \"requestPath\": \"healthcheck.aspx\",\r\n \"intervalInSeconds\"\ - : 15,\r\n \"numberOfProbes\": 2,\r\n \"loadBalancingRules\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\ - \r\n }\r\n ],\r\n \"inboundNatRules\": [],\r\n \"outboundRules\"\ - : [\r\n {\r\n \"name\": \"myOutboundRule\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - ,\r\n \"etag\": \"W/\\\"c58e2eba-cb77-40fa-9356-b59272cdc396\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"allocatedOutboundPorts\": 1024,\r\n \"protocol\"\ - : \"All\",\r\n \"enableTcpReset\": false,\r\n \"idleTimeoutInMinutes\"\ - : 4,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"frontendIPConfigurations\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \ - \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a34eb2b1-c9de-4343-8186-5bbb44c6a0b0\",\r\n + \ \"frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\r\n + \ },\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"myBackendAddressPool\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \"name\": + \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 80,\r\n \"backendPort\": + 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": + 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\": + true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"backendAddressPools\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ }\r\n ],\r\n \"probe\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n {\r\n + \ \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \"requestPath\": + \"healthcheck.aspx\",\r\n \"intervalInSeconds\": 15,\r\n \"numberOfProbes\": + 2,\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\r\n + \ }\r\n ],\r\n \"inboundNatRules\": [],\r\n \"outboundRules\": + [\r\n {\r\n \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\",\r\n + \ \"etag\": \"W/\\\"0a23cddf-904f-4788-937a-b8f6a31fee23\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"allocatedOutboundPorts\": + 1024,\r\n \"protocol\": \"All\",\r\n \"enableTcpReset\": + false,\r\n \"idleTimeoutInMinutes\": 4,\r\n \"backendAddressPool\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"frontendIPConfigurations\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"inboundNatPools\": + []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": + \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -422,9 +422,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:17 GMT + - Fri, 05 Nov 2021 10:08:44 GMT etag: - - W/"c58e2eba-cb77-40fa-9356-b59272cdc396" + - W/"0a23cddf-904f-4788-937a-b8f6a31fee23" expires: - '-1' pragma: @@ -441,7 +441,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d2a08710-80d8-4907-9353-739d3ec0ab35 + - 6b96c8b0-8343-4d97-975f-ef75bf572eae status: code: 200 message: OK @@ -461,24 +461,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"frontendIPConfiguration\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 3390,\r\n \"backendPort\": 3389,\r\n\ - \ \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\": 4,\r\n\ - \ \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": false,\r\ - \n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": false\r\ - \n }\r\n}" + string: "{\r\n \"name\": \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"frontendIPConfiguration\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 3390,\r\n \"backendPort\": 3389,\r\n \"enableFloatingIP\": + false,\r\n \"idleTimeoutInMinutes\": 4,\r\n \"protocol\": \"Tcp\",\r\n + \ \"enableDestinationServiceEndpoint\": false,\r\n \"enableTcpReset\": + false,\r\n \"allowBackendPortConflict\": false\r\n }\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/473b6cf4-25e5-406a-9dd8-1403b7aba350?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/aacf2105-07fc-4aa7-887c-fa9e5e058f6c?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -486,7 +486,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:17 GMT + - Fri, 05 Nov 2021 10:08:44 GMT expires: - '-1' pragma: @@ -499,7 +499,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9d585a42-727d-45bf-9337-43837fd11ff8 + - 6ca64b55-62ee-45c0-ac5c-abf3353bf696 x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -515,9 +515,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/473b6cf4-25e5-406a-9dd8-1403b7aba350?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/aacf2105-07fc-4aa7-887c-fa9e5e058f6c?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -529,7 +530,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:47 GMT + - Fri, 05 Nov 2021 10:09:14 GMT expires: - '-1' pragma: @@ -546,7 +547,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5835fd2f-24ea-4a38-8aa8-989820b2147a + - 6e6066b2-1ca4-478a-82b1-afedd2b4f60a status: code: 200 message: OK @@ -560,21 +561,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"frontendIPConfiguration\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 3390,\r\n \"backendPort\": 3389,\r\n\ - \ \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\": 4,\r\n\ - \ \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": false,\r\ - \n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": false\r\ - \n }\r\n}" + string: "{\r\n \"name\": \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"frontendIPConfiguration\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 3390,\r\n \"backendPort\": 3389,\r\n \"enableFloatingIP\": + false,\r\n \"idleTimeoutInMinutes\": 4,\r\n \"protocol\": \"Tcp\",\r\n + \ \"enableDestinationServiceEndpoint\": false,\r\n \"enableTcpReset\": + false,\r\n \"allowBackendPortConflict\": false\r\n }\r\n}" headers: cache-control: - no-cache @@ -583,9 +584,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:48 GMT + - Fri, 05 Nov 2021 10:09:14 GMT etag: - - W/"7c8665f3-06b0-4873-99e3-283b3fe3718b" + - W/"430a951f-3588-447b-b0b6-c9275c77eafc" expires: - '-1' pragma: @@ -602,7 +603,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 28afcf04-71ea-45b4-867b-eda936171b32 + - 0d9d5344-c163-4573-a08c-8c1aa5e98247 status: code: 200 message: OK @@ -616,24 +617,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myFrontendIpconfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \ - \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\":\ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\ - \r\n },\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\":\ - \ \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ],\r\n \"inboundNatRules\": [\r\n {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\ - \r\n }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myFrontendIpconfiguration\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"privateIPAllocationMethod\": + \"Dynamic\",\r\n \"publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\r\n + \ },\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ],\r\n \"inboundNatRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\r\n + \ }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -642,9 +642,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:48 GMT + - Fri, 05 Nov 2021 10:09:14 GMT etag: - - W/"7c8665f3-06b0-4873-99e3-283b3fe3718b" + - W/"430a951f-3588-447b-b0b6-c9275c77eafc" expires: - '-1' pragma: @@ -661,7 +661,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - aa4d158a-687f-44f5-85b8-2206fa672506 + - 8c3fcb27-e3ef-4bdf-9772-d0aa82e8bf98 status: code: 200 message: OK @@ -675,20 +675,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myBackendAddressPool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - loadBalancerBackendAddresses\": [],\r\n \"outboundRules\": [\r\n {\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\ - \r\n}" + string: "{\r\n \"name\": \"myBackendAddressPool\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"loadBalancerBackendAddresses\": + [],\r\n \"outboundRules\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n}" headers: cache-control: - no-cache @@ -697,9 +696,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:49 GMT + - Fri, 05 Nov 2021 10:09:14 GMT etag: - - W/"7c8665f3-06b0-4873-99e3-283b3fe3718b" + - W/"430a951f-3588-447b-b0b6-c9275c77eafc" expires: - '-1' pragma: @@ -716,7 +715,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 32ad6aea-34b9-4e1f-ade1-fda8aa0d8be1 + - 010e8094-7445-4c8a-a4c7-00deaade4aa5 status: code: 200 message: OK @@ -730,26 +729,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\",\r\n \"\ - properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"frontendIPConfiguration\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 80,\r\n \"backendPort\": 80,\r\n \ - \ \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": 15,\r\n \ - \ \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": false,\r\ - \n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": false,\r\ - \n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\": true,\r\ - \n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"backendAddressPools\": [\r\n {\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n }\r\n ],\r\n \"probe\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers/loadBalancingRules\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"frontendIPConfiguration\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 80,\r\n \"backendPort\": 80,\r\n \"enableFloatingIP\": + true,\r\n \"idleTimeoutInMinutes\": 15,\r\n \"protocol\": \"Tcp\",\r\n + \ \"enableDestinationServiceEndpoint\": false,\r\n \"enableTcpReset\": + false,\r\n \"allowBackendPortConflict\": false,\r\n \"loadDistribution\": + \"Default\",\r\n \"disableOutboundSnat\": true,\r\n \"backendAddressPool\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"backendAddressPools\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ }\r\n ],\r\n \"probe\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\r\n + \ }\r\n }\r\n}" headers: cache-control: - no-cache @@ -758,9 +757,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:49 GMT + - Fri, 05 Nov 2021 10:09:14 GMT etag: - - W/"7c8665f3-06b0-4873-99e3-283b3fe3718b" + - W/"430a951f-3588-447b-b0b6-c9275c77eafc" expires: - '-1' pragma: @@ -777,7 +776,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 10d71b58-13d3-4a8b-96f0-15bd8822bcac + - d2e0bdfe-b8c4-4985-a86b-9cee07c2434f status: code: 200 message: OK @@ -791,21 +790,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"frontendIPConfiguration\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 3390,\r\n \"backendPort\": 3389,\r\n\ - \ \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\": 4,\r\n\ - \ \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": false,\r\ - \n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": false\r\ - \n }\r\n}" + string: "{\r\n \"name\": \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"frontendIPConfiguration\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 3390,\r\n \"backendPort\": 3389,\r\n \"enableFloatingIP\": + false,\r\n \"idleTimeoutInMinutes\": 4,\r\n \"protocol\": \"Tcp\",\r\n + \ \"enableDestinationServiceEndpoint\": false,\r\n \"enableTcpReset\": + false,\r\n \"allowBackendPortConflict\": false\r\n }\r\n}" headers: cache-control: - no-cache @@ -814,9 +813,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:50 GMT + - Fri, 05 Nov 2021 10:09:14 GMT etag: - - W/"7c8665f3-06b0-4873-99e3-283b3fe3718b" + - W/"430a951f-3588-447b-b0b6-c9275c77eafc" expires: - '-1' pragma: @@ -833,7 +832,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - bccf1982-1dcd-4482-b52f-8d208f4e53e2 + - 5fbc415c-d977-40bd-9019-95d1b15c7ba3 status: code: 200 message: OK @@ -847,21 +846,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"allocatedOutboundPorts\"\ - : 1024,\r\n \"protocol\": \"All\",\r\n \"enableTcpReset\": false,\r\n\ - \ \"idleTimeoutInMinutes\": 4,\r\n \"backendAddressPool\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"frontendIPConfigurations\": [\r\n {\r\n \"\ - id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers/outboundRules\",\r\n \"properties\": {\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"allocatedOutboundPorts\": + 1024,\r\n \"protocol\": \"All\",\r\n \"enableTcpReset\": false,\r\n + \ \"idleTimeoutInMinutes\": 4,\r\n \"backendAddressPool\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"frontendIPConfigurations\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -870,9 +870,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:50 GMT + - Fri, 05 Nov 2021 10:09:14 GMT etag: - - W/"7c8665f3-06b0-4873-99e3-283b3fe3718b" + - W/"430a951f-3588-447b-b0b6-c9275c77eafc" expires: - '-1' pragma: @@ -889,7 +889,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - caa277b4-465f-4af5-9f7e-c54368a08c9f + - c414b5f3-f9cc-482d-a835-8825e32c0227 status: code: 200 message: OK @@ -903,19 +903,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - protocol\": \"Http\",\r\n \"port\": 80,\r\n \"requestPath\": \"healthcheck.aspx\"\ - ,\r\n \"intervalInSeconds\": 15,\r\n \"numberOfProbes\": 2,\r\n \"\ - loadBalancingRules\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\ - \r\n}" + string: "{\r\n \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"protocol\": \"Http\",\r\n + \ \"port\": 80,\r\n \"requestPath\": \"healthcheck.aspx\",\r\n \"intervalInSeconds\": + 15,\r\n \"numberOfProbes\": 2,\r\n \"loadBalancingRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\r\n}" headers: cache-control: - no-cache @@ -924,9 +924,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:50 GMT + - Fri, 05 Nov 2021 10:09:14 GMT etag: - - W/"7c8665f3-06b0-4873-99e3-283b3fe3718b" + - W/"430a951f-3588-447b-b0b6-c9275c77eafc" expires: - '-1' pragma: @@ -943,7 +943,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 368f5811-34ab-46da-8e66-0e90e002d079 + - 7fc6111f-07c0-4b31-b9b1-54aa2093cc85 status: code: 200 message: OK @@ -957,87 +957,87 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"949b0d6d-07b0-484a-8f27-a9d327d51d39\",\r\n \"\ - frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\ - \r\n },\r\n \"loadBalancingRules\": [\r\n {\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ],\r\n \"inboundNatRules\": [\r\n\ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\ - \r\n }\r\n ],\r\n \"outboundRules\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \ - \ \"backendAddressPools\": [\r\n {\r\n \"name\": \"myBackendAddressPool\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ],\r\n \"loadBalancingRules\": [\r\ - \n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\ - \r\n }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \ - \ \"name\": \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 80,\r\n \"backendPort\"\ - : 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\"\ - : 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\"\ - : false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\"\ - : false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\"\ - : true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"backendAddressPools\": [\r\n {\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n }\r\n ],\r\n \"probe\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n\ - \ {\r\n \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \ - \ \"requestPath\": \"healthcheck.aspx\",\r\n \"intervalInSeconds\"\ - : 15,\r\n \"numberOfProbes\": 2,\r\n \"loadBalancingRules\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\ - \r\n }\r\n ],\r\n \"inboundNatRules\": [\r\n {\r\n \ - \ \"name\": \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 3390,\r\n \"backendPort\"\ - : 3389,\r\n \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\"\ - : 4,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\"\ - : false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\"\ - : false\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [\r\n\ - \ {\r\n \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - ,\r\n \"etag\": \"W/\\\"7c8665f3-06b0-4873-99e3-283b3fe3718b\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"allocatedOutboundPorts\": 1024,\r\n \"protocol\"\ - : \"All\",\r\n \"enableTcpReset\": false,\r\n \"idleTimeoutInMinutes\"\ - : 4,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"frontendIPConfigurations\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \ - \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a34eb2b1-c9de-4343-8186-5bbb44c6a0b0\",\r\n + \ \"frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\r\n + \ },\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ],\r\n \"inboundNatRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\r\n + \ }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"myBackendAddressPool\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \"name\": + \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 80,\r\n \"backendPort\": + 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": + 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\": + true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"backendAddressPools\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ }\r\n ],\r\n \"probe\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n {\r\n + \ \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \"requestPath\": + \"healthcheck.aspx\",\r\n \"intervalInSeconds\": 15,\r\n \"numberOfProbes\": + 2,\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\r\n + \ }\r\n ],\r\n \"inboundNatRules\": [\r\n {\r\n \"name\": + \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 3390,\r\n \"backendPort\": + 3389,\r\n \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n + \ \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\",\r\n + \ \"etag\": \"W/\\\"430a951f-3588-447b-b0b6-c9275c77eafc\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"allocatedOutboundPorts\": + 1024,\r\n \"protocol\": \"All\",\r\n \"enableTcpReset\": + false,\r\n \"idleTimeoutInMinutes\": 4,\r\n \"backendAddressPool\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"frontendIPConfigurations\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"inboundNatPools\": + []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": + \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -1046,9 +1046,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:51 GMT + - Fri, 05 Nov 2021 10:09:15 GMT etag: - - W/"7c8665f3-06b0-4873-99e3-283b3fe3718b" + - W/"430a951f-3588-447b-b0b6-c9275c77eafc" expires: - '-1' pragma: @@ -1065,7 +1065,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 164d9e5b-826b-494b-8419-d99daa7b20fa + - 15f711cf-a796-4118-8fb9-b048f2d46666 status: code: 200 message: OK @@ -1083,88 +1083,88 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\"\ - ,\r\n \"etag\": \"W/\\\"3cb88839-58aa-4de8-b315-67a532955cee\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\"\ - ,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"949b0d6d-07b0-484a-8f27-a9d327d51d39\",\r\n \ - \ \"frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - ,\r\n \"etag\": \"W/\\\"3cb88839-58aa-4de8-b315-67a532955cee\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"\ - publicIPAddress\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\ - \r\n },\r\n \"loadBalancingRules\": [\r\n {\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ],\r\n \"inboundNatRules\": [\r\n\ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\ - \r\n }\r\n ],\r\n \"outboundRules\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \ - \ \"backendAddressPools\": [\r\n {\r\n \"name\": \"myBackendAddressPool\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - ,\r\n \"etag\": \"W/\\\"3cb88839-58aa-4de8-b315-67a532955cee\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - \r\n }\r\n ],\r\n \"loadBalancingRules\": [\r\ - \n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\ - \r\n }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \ - \ \"name\": \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - ,\r\n \"etag\": \"W/\\\"3cb88839-58aa-4de8-b315-67a532955cee\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 80,\r\n \"backendPort\"\ - : 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\"\ - : 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\"\ - : false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\"\ - : false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\"\ - : true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"backendAddressPools\": [\r\n {\r\ - \n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n }\r\n ],\r\n \"probe\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - \r\n }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n\ - \ {\r\n \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\ - ,\r\n \"etag\": \"W/\\\"3cb88839-58aa-4de8-b315-67a532955cee\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \ - \ \"requestPath\": \"healthcheck.aspx\",\r\n \"intervalInSeconds\"\ - : 15,\r\n \"numberOfProbes\": 2,\r\n \"loadBalancingRules\"\ - : [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\ - \r\n }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\ - \r\n }\r\n ],\r\n \"inboundNatRules\": [\r\n {\r\n \ - \ \"name\": \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\ - ,\r\n \"etag\": \"W/\\\"3cb88839-58aa-4de8-b315-67a532955cee\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n },\r\n \"frontendPort\": 3390,\r\n \"backendPort\"\ - : 3389,\r\n \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\"\ - : 4,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\"\ - : false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\"\ - : false\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [\r\n\ - \ {\r\n \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\ - ,\r\n \"etag\": \"W/\\\"3cb88839-58aa-4de8-b315-67a532955cee\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"allocatedOutboundPorts\": 1024,\r\n \"protocol\"\ - : \"All\",\r\n \"enableTcpReset\": false,\r\n \"idleTimeoutInMinutes\"\ - : 4,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\ - \r\n },\r\n \"frontendIPConfigurations\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\ - \r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n \ - \ \"inboundNatPools\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"myLoadBalancer\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer\",\r\n + \ \"etag\": \"W/\\\"b7f18ec3-c073-4760-ba9f-33e44310d84c\\\"\",\r\n \"type\": + \"Microsoft.Network/loadBalancers\",\r\n \"location\": \"eastus\",\r\n \"tags\": + {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"a34eb2b1-c9de-4343-8186-5bbb44c6a0b0\",\r\n + \ \"frontendIPConfigurations\": [\r\n {\r\n \"name\": \"myFrontendIpconfiguration\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\",\r\n + \ \"etag\": \"W/\\\"b7f18ec3-c073-4760-ba9f-33e44310d84c\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/frontendIPConfigurations\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"privateIPAllocationMethod\": \"Dynamic\",\r\n \"publicIPAddress\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/public_ip_address_name\"\r\n + \ },\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ],\r\n \"inboundNatRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\"\r\n + \ }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"backendAddressPools\": + [\r\n {\r\n \"name\": \"myBackendAddressPool\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\",\r\n + \ \"etag\": \"W/\\\"b7f18ec3-c073-4760-ba9f-33e44310d84c\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"loadBalancerBackendAddresses\": [],\r\n \"outboundRules\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/backendAddressPools\"\r\n + \ }\r\n ],\r\n \"loadBalancingRules\": [\r\n {\r\n \"name\": + \"myLoadBalancingRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\",\r\n + \ \"etag\": \"W/\\\"b7f18ec3-c073-4760-ba9f-33e44310d84c\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/loadBalancingRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 80,\r\n \"backendPort\": + 80,\r\n \"enableFloatingIP\": true,\r\n \"idleTimeoutInMinutes\": + 15,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false,\r\n \"loadDistribution\": \"Default\",\r\n \"disableOutboundSnat\": + true,\r\n \"backendAddressPool\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"backendAddressPools\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ }\r\n ],\r\n \"probe\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\"\r\n + \ }\r\n }\r\n }\r\n ],\r\n \"probes\": [\r\n {\r\n + \ \"name\": \"myProbe\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/probes/myProbe\",\r\n + \ \"etag\": \"W/\\\"b7f18ec3-c073-4760-ba9f-33e44310d84c\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"protocol\": \"Http\",\r\n \"port\": 80,\r\n \"requestPath\": + \"healthcheck.aspx\",\r\n \"intervalInSeconds\": 15,\r\n \"numberOfProbes\": + 2,\r\n \"loadBalancingRules\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/loadBalancingRules/myLoadBalancingRule\"\r\n + \ }\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/loadBalancers/probes\"\r\n + \ }\r\n ],\r\n \"inboundNatRules\": [\r\n {\r\n \"name\": + \"myInboundNatRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule\",\r\n + \ \"etag\": \"W/\\\"b7f18ec3-c073-4760-ba9f-33e44310d84c\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/inboundNatRules\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"frontendIPConfiguration\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ },\r\n \"frontendPort\": 3390,\r\n \"backendPort\": + 3389,\r\n \"enableFloatingIP\": false,\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"protocol\": \"Tcp\",\r\n \"enableDestinationServiceEndpoint\": + false,\r\n \"enableTcpReset\": false,\r\n \"allowBackendPortConflict\": + false\r\n }\r\n }\r\n ],\r\n \"outboundRules\": [\r\n {\r\n + \ \"name\": \"myOutboundRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/outboundRules/myOutboundRule\",\r\n + \ \"etag\": \"W/\\\"b7f18ec3-c073-4760-ba9f-33e44310d84c\\\"\",\r\n + \ \"type\": \"Microsoft.Network/loadBalancers/outboundRules\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"allocatedOutboundPorts\": + 1024,\r\n \"protocol\": \"All\",\r\n \"enableTcpReset\": + false,\r\n \"idleTimeoutInMinutes\": 4,\r\n \"backendAddressPool\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/backendAddressPools/myBackendAddressPool\"\r\n + \ },\r\n \"frontendIPConfigurations\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/frontendIPConfigurations/myFrontendIpconfiguration\"\r\n + \ }\r\n ]\r\n }\r\n }\r\n ],\r\n \"inboundNatPools\": + []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": + \"Regional\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -1175,7 +1175,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:32:55 GMT + - Fri, 05 Nov 2021 10:09:16 GMT expires: - '-1' pragma: @@ -1192,7 +1192,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 88e8b864-afa0-4f6d-aaa3-a990819b11e9 + - e5f89aa7-5091-4d58-bf23-d462d59ed155 x-ms-ratelimit-remaining-subscription-writes: - '1196' status: @@ -1210,25 +1210,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer/inboundNatRules/myInboundNatRule?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/09146b2a-905d-4025-90c8-890a8b69af0d?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0dac4e66-43c3-4925-a0f0-a524e104d790?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:32:56 GMT + - Fri, 05 Nov 2021 10:09:16 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/09146b2a-905d-4025-90c8-890a8b69af0d?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/0dac4e66-43c3-4925-a0f0-a524e104d790?api-version=2021-05-01 pragma: - no-cache server: @@ -1239,7 +1240,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 41c6a65f-0c40-4086-8dba-97f89b2f169a + - 8256d663-08cb-4641-b9ee-de12712e0a21 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -1255,9 +1256,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/09146b2a-905d-4025-90c8-890a8b69af0d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/0dac4e66-43c3-4925-a0f0-a524e104d790?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1269,7 +1271,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:33:06 GMT + - Fri, 05 Nov 2021 10:09:27 GMT expires: - '-1' pragma: @@ -1286,7 +1288,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b5209835-a6c9-4c6c-9cf8-f5fca4ce9653 + - d2ca2366-ab78-468c-b08b-b50fc4515698 status: code: 200 message: OK @@ -1302,9 +1304,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/loadBalancers/myLoadBalancer?api-version=2021-05-01 response: body: string: '' @@ -1312,17 +1315,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/432e8c0c-3d6e-4d8f-9043-604a0d7fd17e?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3d89c7d7-9714-437a-ab94-bc019ade6e20?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:33:09 GMT + - Fri, 05 Nov 2021 10:09:27 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/432e8c0c-3d6e-4d8f-9043-604a0d7fd17e?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/3d89c7d7-9714-437a-ab94-bc019ade6e20?api-version=2021-05-01 pragma: - no-cache server: @@ -1333,7 +1336,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1f617790-bed2-4f2e-85d9-87d9de7ed922 + - 3207e9d0-65b9-4fb0-8848-d4b636a51fe9 x-ms-ratelimit-remaining-subscription-deletes: - '14998' status: @@ -1349,9 +1352,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/432e8c0c-3d6e-4d8f-9043-604a0d7fd17e?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/3d89c7d7-9714-437a-ab94-bc019ade6e20?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1363,7 +1367,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:33:19 GMT + - Fri, 05 Nov 2021 10:09:37 GMT expires: - '-1' pragma: @@ -1380,7 +1384,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b6de7388-e7a4-4242-829b-dcedf49683e1 + - 81b7ad64-91d4-42ec-9291-6c07109a5c69 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_nat.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_nat.test_network.yaml index 5ad53f8f7609..e369dd565ec6 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_nat.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_nat.test_network.yaml @@ -14,25 +14,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipaddress\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\ - ,\r\n \"etag\": \"W/\\\"395c9877-217c-41ad-a868-4dadb0bf036c\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Updating\",\r\n \"resourceGuid\": \"060d2512-66b7-4ba1-9d66-32015e5056ae\"\ - ,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\"\ - : \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n\ - \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\"\ - : {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n\ - }" + string: "{\r\n \"name\": \"publicipaddress\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\",\r\n + \ \"etag\": \"W/\\\"ed77a92f-b965-44c3-b1f4-615501e22f7c\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"resourceGuid\": \"318681b8-068b-4012-9e8f-220a2e1e9581\",\r\n \"publicIPAddressVersion\": + \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\": + 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n + \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2880659b-ba5c-41e7-bd75-7971f5940009?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/f33303f5-9a13-4182-a82f-66a871430611?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -40,7 +40,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:33:37 GMT + - Fri, 05 Nov 2021 10:09:42 GMT expires: - '-1' pragma: @@ -53,9 +53,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 54147fd0-c0ef-4f7d-8472-d06b91b69ee3 + - 7cb5f0dd-0d59-4b84-a2a5-9f4c87e9e0cb x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1190' status: code: 201 message: Created @@ -69,9 +69,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2880659b-ba5c-41e7-bd75-7971f5940009?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/f33303f5-9a13-4182-a82f-66a871430611?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -83,7 +84,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:33:38 GMT + - Fri, 05 Nov 2021 10:09:43 GMT expires: - '-1' pragma: @@ -100,7 +101,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 35f34ce4-5a81-468c-acb7-36031303b7cb + - 2c8e47dc-3b1e-4a00-b082-0bf72c6818f7 status: code: 200 message: OK @@ -114,20 +115,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipaddress\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\ - ,\r\n \"etag\": \"W/\\\"1ac031ba-4946-4e0a-8de1-3b2a0702a0b2\\\"\",\r\n \ - \ \"location\": \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"resourceGuid\": \"060d2512-66b7-4ba1-9d66-32015e5056ae\"\ - ,\r\n \"ipAddress\": \"104.211.57.80\",\r\n \"publicIPAddressVersion\"\ - : \"IPv4\",\r\n \"publicIPAllocationMethod\": \"Static\",\r\n \"idleTimeoutInMinutes\"\ - : 4,\r\n \"ipTags\": []\r\n },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\"\ - ,\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"publicipaddress\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\",\r\n + \ \"etag\": \"W/\\\"dd26cd68-1dee-414e-8c1b-d91587a6b56b\\\"\",\r\n \"location\": + \"eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"resourceGuid\": \"318681b8-068b-4012-9e8f-220a2e1e9581\",\r\n \"ipAddress\": + \"20.121.27.142\",\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n \"publicIPAllocationMethod\": + \"Static\",\r\n \"idleTimeoutInMinutes\": 4,\r\n \"ipTags\": []\r\n + \ },\r\n \"type\": \"Microsoft.Network/publicIPAddresses\",\r\n \"sku\": + {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -136,9 +137,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:33:39 GMT + - Fri, 05 Nov 2021 10:09:43 GMT etag: - - W/"1ac031ba-4946-4e0a-8de1-3b2a0702a0b2" + - W/"dd26cd68-1dee-414e-8c1b-d91587a6b56b" expires: - '-1' pragma: @@ -155,7 +156,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c00e3a6a-6527-490c-a764-c469c7e9ddd3 + - e5ecd026-3864-4ed2-8bf1-6ecdc4d92faa status: code: 200 message: OK @@ -174,24 +175,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipprefix\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\ - ,\r\n \"etag\": \"W/\\\"47e0b7b0-c9f7-4989-8dbe-29ba9bb325ea\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"\ - eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"resourceGuid\": \"d113c67f-9249-4eec-b2bf-96bd9259e072\",\r\n \ - \ \"prefixLength\": 30,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n\ - \ \"ipTags\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"publicipprefix\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\",\r\n + \ \"etag\": \"W/\\\"73c3e2ae-13d9-46c5-922b-10958aa2848d\\\"\",\r\n \"type\": + \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": + \"52b41365-6c9d-4e23-979a-52c7ef6b9853\",\r\n \"prefixLength\": 30,\r\n + \ \"publicIPAddressVersion\": \"IPv4\",\r\n \"ipTags\": []\r\n },\r\n + \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\r\n + \ }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/04530d77-9fa5-49cb-80a9-77ff716f3d62?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/578ff257-2336-4371-9b36-a6a8c549fb07?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -199,7 +201,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:33:42 GMT + - Fri, 05 Nov 2021 10:09:45 GMT expires: - '-1' pragma: @@ -212,9 +214,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 23bbb25b-4125-43d5-8d38-6a0292579d0a + - 3893cc72-824a-4294-8148-fbf2810a24ec x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1189' status: code: 201 message: Created @@ -228,9 +230,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/04530d77-9fa5-49cb-80a9-77ff716f3d62?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/578ff257-2336-4371-9b36-a6a8c549fb07?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -242,7 +245,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:33:46 GMT + - Fri, 05 Nov 2021 10:09:48 GMT expires: - '-1' pragma: @@ -259,7 +262,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 85130a68-227c-42c9-ba4c-8fa5f9bbb075 + - c7d6858d-c826-4c04-b684-77fb2ee2e144 status: code: 200 message: OK @@ -273,31 +276,31 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"publicipprefix\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\ - ,\r\n \"etag\": \"W/\\\"a39b5af5-4576-44df-8a21-d4028e39ab14\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"\ - eastus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"d113c67f-9249-4eec-b2bf-96bd9259e072\",\r\n \ - \ \"prefixLength\": 30,\r\n \"publicIPAddressVersion\": \"IPv4\",\r\n\ - \ \"ipPrefix\": \"40.121.128.200/30\",\r\n \"ipTags\": []\r\n },\r\n\ - \ \"sku\": {\r\n \"name\": \"Standard\",\r\n \"tier\": \"Regional\"\ - \r\n }\r\n}" + string: "{\r\n \"name\": \"publicipprefix\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\",\r\n + \ \"etag\": \"W/\\\"1d20c71c-2fe4-4889-a718-79ac2761baee\\\"\",\r\n \"type\": + \"Microsoft.Network/publicIPPrefixes\",\r\n \"location\": \"eastus\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": + \"52b41365-6c9d-4e23-979a-52c7ef6b9853\",\r\n \"prefixLength\": 30,\r\n + \ \"publicIPAddressVersion\": \"IPv4\",\r\n \"ipPrefix\": \"13.90.59.100/30\",\r\n + \ \"ipTags\": []\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '695' + - '693' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:33:46 GMT + - Fri, 05 Nov 2021 10:09:48 GMT etag: - - W/"a39b5af5-4576-44df-8a21-d4028e39ab14" + - W/"1d20c71c-2fe4-4889-a718-79ac2761baee" expires: - '-1' pragma: @@ -314,7 +317,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 53c67f89-7061-40f6-b917-72b5c05c8164 + - 7ea8052a-5df1-41c5-ae67-22ea95d56ab5 status: code: 200 message: OK @@ -334,27 +337,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myNatGateway\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway\"\ - ,\r\n \"etag\": \"W/\\\"e1ea635b-1638-4633-b662-74e315946d7f\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/natGateways\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"e2ff01b2-aced-4212-a31c-f940e8b4ae6b\",\r\n \"\ - idleTimeoutInMinutes\": 4,\r\n \"publicIpAddresses\": [\r\n {\r\n\ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\ - \r\n }\r\n ],\r\n \"publicIpPrefixes\": [\r\n {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\ - \r\n }\r\n ]\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"myNatGateway\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway\",\r\n + \ \"etag\": \"W/\\\"47a19dfc-55f8-4bd4-9692-14c597d82722\\\"\",\r\n \"type\": + \"Microsoft.Network/natGateways\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"2349ce3d-53de-4264-a9ba-1768dc8d4337\",\r\n + \ \"idleTimeoutInMinutes\": 4,\r\n \"publicIpAddresses\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\r\n + \ }\r\n ],\r\n \"publicIpPrefixes\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\r\n + \ }\r\n ]\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e70876f8-cdfb-46f9-bf44-6e826e00ec92?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/395b1dd3-3869-486b-866c-e90a68905659?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -362,7 +365,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:33:50 GMT + - Fri, 05 Nov 2021 10:09:49 GMT expires: - '-1' pragma: @@ -375,9 +378,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 997e9722-4511-4642-b66c-f136ba1969c1 + - d8a43b4b-de20-472d-bcfb-1e71aa880869 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1188' status: code: 201 message: Created @@ -391,9 +394,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/e70876f8-cdfb-46f9-bf44-6e826e00ec92?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/395b1dd3-3869-486b-866c-e90a68905659?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -405,7 +409,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:00 GMT + - Fri, 05 Nov 2021 10:09:59 GMT expires: - '-1' pragma: @@ -422,7 +426,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2093c3a0-0c3c-4945-8506-c46f65678e25 + - 2a2cc722-a87e-49a9-bb67-055bc91683e0 status: code: 200 message: OK @@ -436,22 +440,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myNatGateway\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway\"\ - ,\r\n \"etag\": \"W/\\\"e6fa9011-5db6-43bd-9155-3674f7e840b5\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/natGateways\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"e2ff01b2-aced-4212-a31c-f940e8b4ae6b\",\r\n \"\ - idleTimeoutInMinutes\": 4,\r\n \"publicIpAddresses\": [\r\n {\r\n\ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\ - \r\n }\r\n ],\r\n \"publicIpPrefixes\": [\r\n {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\ - \r\n }\r\n ]\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"myNatGateway\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway\",\r\n + \ \"etag\": \"W/\\\"56c5091c-3914-47cc-8431-8afe6b4b2926\\\"\",\r\n \"type\": + \"Microsoft.Network/natGateways\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"2349ce3d-53de-4264-a9ba-1768dc8d4337\",\r\n + \ \"idleTimeoutInMinutes\": 4,\r\n \"publicIpAddresses\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\r\n + \ }\r\n ],\r\n \"publicIpPrefixes\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\r\n + \ }\r\n ]\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -460,9 +464,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:00 GMT + - Fri, 05 Nov 2021 10:09:59 GMT etag: - - W/"e6fa9011-5db6-43bd-9155-3674f7e840b5" + - W/"56c5091c-3914-47cc-8431-8afe6b4b2926" expires: - '-1' pragma: @@ -479,7 +483,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e02bf22c-8650-41e9-a0a0-842705e74954 + - 73bb95cf-6f3c-4f6f-9f7a-06ecfe6820e6 status: code: 200 message: OK @@ -493,22 +497,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myNatGateway\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway\"\ - ,\r\n \"etag\": \"W/\\\"e6fa9011-5db6-43bd-9155-3674f7e840b5\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/natGateways\",\r\n \"location\": \"eastus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"e2ff01b2-aced-4212-a31c-f940e8b4ae6b\",\r\n \"\ - idleTimeoutInMinutes\": 4,\r\n \"publicIpAddresses\": [\r\n {\r\n\ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\ - \r\n }\r\n ],\r\n \"publicIpPrefixes\": [\r\n {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\ - \r\n }\r\n ]\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"myNatGateway\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway\",\r\n + \ \"etag\": \"W/\\\"56c5091c-3914-47cc-8431-8afe6b4b2926\\\"\",\r\n \"type\": + \"Microsoft.Network/natGateways\",\r\n \"location\": \"eastus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"2349ce3d-53de-4264-a9ba-1768dc8d4337\",\r\n + \ \"idleTimeoutInMinutes\": 4,\r\n \"publicIpAddresses\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\r\n + \ }\r\n ],\r\n \"publicIpPrefixes\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\r\n + \ }\r\n ]\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -517,9 +521,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:01 GMT + - Fri, 05 Nov 2021 10:09:59 GMT etag: - - W/"e6fa9011-5db6-43bd-9155-3674f7e840b5" + - W/"56c5091c-3914-47cc-8431-8afe6b4b2926" expires: - '-1' pragma: @@ -536,7 +540,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1a305d35-aa20-4a55-8f2e-01c167aa21cf + - d257b60a-669d-479d-8a89-4d0978b1b224 status: code: 200 message: OK @@ -554,23 +558,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myNatGateway\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway\"\ - ,\r\n \"etag\": \"W/\\\"46f83c2c-4750-4446-bf61-536418166bbf\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/natGateways\",\r\n \"location\": \"eastus\"\ - ,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"e2ff01b2-aced-4212-a31c-f940e8b4ae6b\",\r\n \ - \ \"idleTimeoutInMinutes\": 4,\r\n \"publicIpAddresses\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\ - \r\n }\r\n ],\r\n \"publicIpPrefixes\": [\r\n {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\ - \r\n }\r\n ]\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\"\ - ,\r\n \"tier\": \"Regional\"\r\n }\r\n}" + string: "{\r\n \"name\": \"myNatGateway\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway\",\r\n + \ \"etag\": \"W/\\\"02487304-1293-44f2-8966-333f46c8098d\\\"\",\r\n \"type\": + \"Microsoft.Network/natGateways\",\r\n \"location\": \"eastus\",\r\n \"tags\": + {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"2349ce3d-53de-4264-a9ba-1768dc8d4337\",\r\n + \ \"idleTimeoutInMinutes\": 4,\r\n \"publicIpAddresses\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPAddresses/publicipaddress\"\r\n + \ }\r\n ],\r\n \"publicIpPrefixes\": [\r\n {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/publicIPPrefixes/publicipprefix\"\r\n + \ }\r\n ]\r\n },\r\n \"sku\": {\r\n \"name\": \"Standard\",\r\n + \ \"tier\": \"Regional\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -581,7 +585,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:04 GMT + - Fri, 05 Nov 2021 10:10:00 GMT expires: - '-1' pragma: @@ -598,9 +602,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9cfe73a3-699e-452a-b2b4-3d9314a5de01 + - 0a00c4a5-a027-4919-810b-a6ab386bcaa0 x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1187' status: code: 200 message: OK @@ -616,9 +620,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/natGateways/myNatGateway?api-version=2021-05-01 response: body: string: '' @@ -626,17 +631,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/51e0157c-2601-40d3-ad2f-551a0801a6fb?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7bbcf7b7-4abe-4506-8215-8d5fb5fbea79?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:34:05 GMT + - Fri, 05 Nov 2021 10:10:00 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/51e0157c-2601-40d3-ad2f-551a0801a6fb?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/7bbcf7b7-4abe-4506-8215-8d5fb5fbea79?api-version=2021-05-01 pragma: - no-cache server: @@ -647,9 +652,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 93bd1bdc-a017-480f-b41c-4395046b11c5 + - 0a2dea04-0c82-4fdc-a791-8d3cd8c7d196 x-ms-ratelimit-remaining-subscription-deletes: - - '14999' + - '14992' status: code: 202 message: Accepted @@ -663,9 +668,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/51e0157c-2601-40d3-ad2f-551a0801a6fb?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/7bbcf7b7-4abe-4506-8215-8d5fb5fbea79?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -677,7 +683,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:16 GMT + - Fri, 05 Nov 2021 10:10:11 GMT expires: - '-1' pragma: @@ -694,7 +700,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d8884662-d86d-4169-9359-4f2934d46c14 + - 1dded58a-75c1-4f64-9d3f-b173bff54f97 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_route_filter.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_route_filter.test_network.yaml index d1bf94d33797..c7c0622d7209 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_route_filter.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_route_filter.test_network.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRouteFilter\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter\"\ - ,\r\n \"etag\": \"W/\\\"70eae2ba-41c1-4f6a-8ccb-0c48e6a53413\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/routeFilters\",\r\n \"location\": \"eastus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Updating\",\r\n \"rules\": []\r\n \ - \ }\r\n}" + string: "{\r\n \"name\": \"myRouteFilter\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter\",\r\n + \ \"etag\": \"W/\\\"4f44a847-7e4c-47e7-9693-f1c1bf457262\\\"\",\r\n \"type\": + \"Microsoft.Network/routeFilters\",\r\n \"location\": \"eastus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"rules\": []\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/897edc32-2582-43e9-bd23-5cfd10318865?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/756e8bd2-da8f-42fe-922f-bfdb831568eb?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -37,7 +37,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:43 GMT + - Fri, 05 Nov 2021 10:10:19 GMT expires: - '-1' pragma: @@ -50,9 +50,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ff38ddd3-ee5f-418e-a133-10d8485a2bd8 + - 94f2c22e-f3f2-4349-9398-73af42ead3d7 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1196' status: code: 201 message: Created @@ -66,9 +66,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/897edc32-2582-43e9-bd23-5cfd10318865?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/756e8bd2-da8f-42fe-922f-bfdb831568eb?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -80,7 +81,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:53 GMT + - Fri, 05 Nov 2021 10:10:30 GMT expires: - '-1' pragma: @@ -97,7 +98,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2a1ac38a-7b1d-4ad4-8522-685650cf4cee + - aec17773-b790-4ef5-b743-a83704d50051 status: code: 200 message: OK @@ -111,17 +112,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRouteFilter\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter\"\ - ,\r\n \"etag\": \"W/\\\"73095dc7-2c73-492c-b70e-fb318fe6dea6\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/routeFilters\",\r\n \"location\": \"eastus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"rules\": []\r\n\ - \ }\r\n}" + string: "{\r\n \"name\": \"myRouteFilter\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter\",\r\n + \ \"etag\": \"W/\\\"b3f8ca7b-7c17-4830-8e11-a1e489edace4\\\"\",\r\n \"type\": + \"Microsoft.Network/routeFilters\",\r\n \"location\": \"eastus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"rules\": []\r\n }\r\n}" headers: cache-control: - no-cache @@ -130,9 +131,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:54 GMT + - Fri, 05 Nov 2021 10:10:30 GMT etag: - - W/"73095dc7-2c73-492c-b70e-fb318fe6dea6" + - W/"b3f8ca7b-7c17-4830-8e11-a1e489edace4" expires: - '-1' pragma: @@ -149,7 +150,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8f4e72cb-bee7-4460-a0a4-28e706c277f6 + - 7b44c6d8-7ab0-47a5-af4f-a8aecdb6de8e status: code: 200 message: OK @@ -163,22483 +164,19401 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/serviceTags?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/serviceTags?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"Public\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/serviceTags/Public\"\ - ,\r\n \"type\": \"Microsoft.Network/serviceTags\",\r\n \"changeNumber\"\ - : \"74\",\r\n \"cloud\": \"Public\",\r\n \"values\": [\r\n {\r\n \ - \ \"name\": \"ActionGroup\",\r\n \"id\": \"ActionGroup\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"4\",\r\n \"region\": \"\",\r\n \"state\":\ - \ \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \ - \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n\ - \ \"systemService\": \"ActionGroup\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.66.60.119/32\",\r\n \"13.66.143.220/30\",\r\ - \n \"13.66.202.14/32\",\r\n \"13.66.248.225/32\",\r\n \ - \ \"13.66.249.211/32\",\r\n \"13.67.10.124/30\",\r\n \ - \ \"13.69.109.132/30\",\r\n \"13.71.199.112/30\",\r\n \ - \ \"13.77.53.216/30\",\r\n \"13.77.172.102/32\",\r\n \"\ - 13.77.183.209/32\",\r\n \"13.78.109.156/30\",\r\n \"13.84.49.247/32\"\ - ,\r\n \"13.84.51.172/32\",\r\n \"13.84.52.58/32\",\r\n \ - \ \"13.86.221.220/30\",\r\n \"13.106.38.142/32\",\r\n \ - \ \"13.106.38.148/32\",\r\n \"13.106.54.3/32\",\r\n \ - \ \"13.106.54.19/32\",\r\n \"13.106.57.181/32\",\r\n \"\ - 13.106.57.196/31\",\r\n \"20.21.42.88/30\",\r\n \"20.38.149.132/30\"\ - ,\r\n \"20.42.64.36/30\",\r\n \"20.43.121.124/30\",\r\n\ - \ \"20.44.17.220/30\",\r\n \"20.45.123.236/30\",\r\n \ - \ \"20.72.27.152/30\",\r\n \"20.135.74.3/32\",\r\n \ - \ \"20.150.172.228/30\",\r\n \"20.192.238.124/30\",\r\n \ - \ \"20.193.202.4/30\",\r\n \"40.68.195.137/32\",\r\n \"\ - 40.68.201.58/32\",\r\n \"40.68.201.65/32\",\r\n \"40.68.201.206/32\"\ - ,\r\n \"40.68.201.211/32\",\r\n \"40.68.204.18/32\",\r\n\ - \ \"40.115.37.106/32\",\r\n \"40.121.219.215/32\",\r\n \ - \ \"40.121.221.62/32\",\r\n \"40.121.222.201/32\",\r\n \ - \ \"40.121.223.186/32\",\r\n \"51.12.101.172/30\",\r\n \ - \ \"51.12.204.244/30\",\r\n \"51.104.9.100/30\",\r\n \ - \ \"52.183.20.244/32\",\r\n \"52.183.31.0/32\",\r\n \"\ - 52.183.94.59/32\",\r\n \"52.184.145.166/32\",\r\n \"104.214.165.80/30\"\ - ,\r\n \"168.61.142.52/30\",\r\n \"191.233.50.4/30\",\r\n\ - \ \"191.233.207.64/26\",\r\n \"2603:1000:4:402::178/125\"\ - ,\r\n \"2603:1000:104:402::178/125\",\r\n \"2603:1010:6:402::178/125\"\ - ,\r\n \"2603:1010:101:402::178/125\",\r\n \"2603:1010:304:402::178/125\"\ - ,\r\n \"2603:1010:404:402::178/125\",\r\n \"2603:1020:5:402::178/125\"\ - ,\r\n \"2603:1020:206:402::178/125\",\r\n \"2603:1020:305:402::178/125\"\ - ,\r\n \"2603:1020:405:402::178/125\",\r\n \"2603:1020:605:402::178/125\"\ - ,\r\n \"2603:1020:705:402::178/125\",\r\n \"2603:1020:805:402::178/125\"\ - ,\r\n \"2603:1020:905:402::178/125\",\r\n \"2603:1020:a04:402::178/125\"\ - ,\r\n \"2603:1020:b04:402::178/125\",\r\n \"2603:1020:c04:402::178/125\"\ - ,\r\n \"2603:1020:d04:402::178/125\",\r\n \"2603:1020:e04:402::178/125\"\ - ,\r\n \"2603:1020:f04:402::178/125\",\r\n \"2603:1020:1004:800::f8/125\"\ - ,\r\n \"2603:1020:1104:400::178/125\",\r\n \"2603:1030:f:400::978/125\"\ - ,\r\n \"2603:1030:10:402::178/125\",\r\n \"2603:1030:104:402::178/125\"\ - ,\r\n \"2603:1030:107:400::f0/125\",\r\n \"2603:1030:210:402::178/125\"\ - ,\r\n \"2603:1030:40b:400::978/125\",\r\n \"2603:1030:40c:402::178/125\"\ - ,\r\n \"2603:1030:504:802::f8/125\",\r\n \"2603:1030:608:402::178/125\"\ - ,\r\n \"2603:1030:807:402::178/125\",\r\n \"2603:1030:a07:402::8f8/125\"\ - ,\r\n \"2603:1030:b04:402::178/125\",\r\n \"2603:1030:c06:400::978/125\"\ - ,\r\n \"2603:1030:f05:402::178/125\",\r\n \"2603:1030:1005:402::178/125\"\ - ,\r\n \"2603:1040:5:402::178/125\",\r\n \"2603:1040:207:402::178/125\"\ - ,\r\n \"2603:1040:407:402::178/125\",\r\n \"2603:1040:606:402::178/125\"\ - ,\r\n \"2603:1040:806:402::178/125\",\r\n \"2603:1040:904:402::178/125\"\ - ,\r\n \"2603:1040:a06:402::178/125\",\r\n \"2603:1040:b04:402::178/125\"\ - ,\r\n \"2603:1040:c06:402::178/125\",\r\n \"2603:1040:d04:800::f8/125\"\ - ,\r\n \"2603:1040:f05:402::178/125\",\r\n \"2603:1040:1002:400::180/125\"\ - ,\r\n \"2603:1040:1104:400::178/125\",\r\n \"2603:1050:6:402::178/125\"\ - ,\r\n \"2603:1050:403:400::1f8/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement\",\r\n \"id\": \"\ - ApiManagement\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"\ - properties\": {\r\n \"changeNumber\": \"7\",\r\n \"region\"\ - : \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n\ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureApiManagement\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.64.39.16/32\",\r\n \ - \ \"13.66.138.92/31\",\r\n \"13.66.140.176/28\",\r\n \ - \ \"13.67.8.108/31\",\r\n \"13.67.9.208/28\",\r\n \"\ - 13.69.64.76/31\",\r\n \"13.69.66.144/28\",\r\n \"13.69.227.76/31\"\ - ,\r\n \"13.69.229.80/28\",\r\n \"13.70.72.28/31\",\r\n \ - \ \"13.70.72.240/28\",\r\n \"13.71.49.1/32\",\r\n \ - \ \"13.71.170.44/31\",\r\n \"13.71.172.144/28\",\r\n \"\ - 13.71.194.116/31\",\r\n \"13.71.196.32/28\",\r\n \"13.75.34.148/31\"\ - ,\r\n \"13.75.38.16/28\",\r\n \"13.75.217.184/32\",\r\n\ - \ \"13.75.221.78/32\",\r\n \"13.77.50.68/31\",\r\n \ - \ \"13.77.52.224/28\",\r\n \"13.78.106.92/31\",\r\n \ - \ \"13.78.108.176/28\",\r\n \"13.84.189.17/32\",\r\n \"\ - 13.85.22.63/32\",\r\n \"13.86.102.66/32\",\r\n \"13.87.56.84/31\"\ - ,\r\n \"13.87.57.144/28\",\r\n \"13.87.122.84/31\",\r\n\ - \ \"13.87.123.144/28\",\r\n \"13.89.170.204/31\",\r\n \ - \ \"13.89.174.64/28\",\r\n \"20.21.36.96/28\",\r\n \ - \ \"20.36.106.68/31\",\r\n \"20.36.107.176/28\",\r\n \"\ - 20.36.114.20/31\",\r\n \"20.36.115.128/28\",\r\n \"20.37.52.67/32\"\ - ,\r\n \"20.37.74.224/31\",\r\n \"20.37.76.32/28\",\r\n \ - \ \"20.37.81.41/32\",\r\n \"20.39.80.2/32\",\r\n \ - \ \"20.39.99.81/32\",\r\n \"20.40.125.155/32\",\r\n \"\ - 20.40.160.107/32\",\r\n \"20.40.231.62/31\",\r\n \"20.44.2.4/31\"\ - ,\r\n \"20.44.3.224/28\",\r\n \"20.44.33.246/32\",\r\n \ - \ \"20.44.72.3/32\",\r\n \"20.46.13.224/28\",\r\n \ - \ \"20.46.144.85/32\",\r\n \"20.47.232.184/31\",\r\n \"\ - 20.48.201.76/31\",\r\n \"20.52.94.112/31\",\r\n \"20.62.63.254/31\"\ - ,\r\n \"20.70.220.182/31\",\r\n \"20.72.26.16/28\",\r\n\ - \ \"20.83.221.20/30\",\r\n \"20.83.221.64/28\",\r\n \ - \ \"20.83.221.86/31\",\r\n \"20.86.92.254/31\",\r\n \ - \ \"20.88.154.20/31\",\r\n \"20.90.131.114/31\",\r\n \"\ - 20.92.3.250/31\",\r\n \"20.97.32.190/31\",\r\n \"20.99.8.80/28\"\ - ,\r\n \"20.150.167.160/28\",\r\n \"20.150.170.224/28\",\r\ - \n \"20.188.77.119/32\",\r\n \"20.191.167.246/31\",\r\n\ - \ \"20.192.45.112/28\",\r\n \"20.192.50.64/28\",\r\n \ - \ \"20.192.234.160/28\",\r\n \"20.193.192.48/28\",\r\n \ - \ \"20.193.202.160/28\",\r\n \"20.194.74.240/28\",\r\n \ - \ \"20.195.78.64/28\",\r\n \"23.96.224.175/32\",\r\n \ - \ \"23.101.67.140/32\",\r\n \"23.101.166.38/32\",\r\n \"\ - 40.66.60.111/32\",\r\n \"40.67.58.224/28\",\r\n \"40.69.106.68/31\"\ - ,\r\n \"40.69.107.224/28\",\r\n \"40.70.146.76/31\",\r\n\ - \ \"40.70.148.16/28\",\r\n \"40.71.10.204/31\",\r\n \ - \ \"40.71.13.128/28\",\r\n \"40.74.100.52/31\",\r\n \ - \ \"40.74.101.48/28\",\r\n \"40.74.146.80/31\",\r\n \"\ - 40.74.147.32/28\",\r\n \"40.78.194.68/31\",\r\n \"40.78.195.224/28\"\ - ,\r\n \"40.78.202.128/31\",\r\n \"40.78.203.160/28\",\r\n\ - \ \"40.79.130.44/31\",\r\n \"40.79.131.192/28\",\r\n \ - \ \"40.79.178.68/31\",\r\n \"40.79.179.192/28\",\r\n \ - \ \"40.80.232.185/32\",\r\n \"40.81.47.216/32\",\r\n \ - \ \"40.81.89.24/32\",\r\n \"40.81.185.8/32\",\r\n \"40.82.157.167/32\"\ - ,\r\n \"40.90.185.46/32\",\r\n \"40.112.242.148/31\",\r\n\ - \ \"40.112.243.240/28\",\r\n \"40.120.87.48/31\",\r\n \ - \ \"51.12.17.0/28\",\r\n \"51.12.25.16/28\",\r\n \ - \ \"51.12.98.224/28\",\r\n \"51.12.202.224/28\",\r\n \"\ - 51.107.0.91/32\",\r\n \"51.107.59.0/28\",\r\n \"51.107.96.8/32\"\ - ,\r\n \"51.107.155.0/28\",\r\n \"51.107.246.176/28\",\r\n\ - \ \"51.116.0.0/32\",\r\n \"51.116.59.0/28\",\r\n \ - \ \"51.116.96.0/32\",\r\n \"51.116.155.64/28\",\r\n \"\ - 51.120.2.185/32\",\r\n \"51.120.98.176/28\",\r\n \"51.120.130.134/32\"\ - ,\r\n \"51.120.218.224/28\",\r\n \"51.120.234.240/28\",\r\ - \n \"51.137.136.0/32\",\r\n \"51.138.215.124/31\",\r\n \ - \ \"51.140.146.60/31\",\r\n \"51.140.149.0/28\",\r\n \ - \ \"51.140.210.84/31\",\r\n \"51.140.211.176/28\",\r\n \ - \ \"51.143.127.203/32\",\r\n \"51.145.56.125/32\",\r\n \ - \ \"51.145.179.78/32\",\r\n \"52.139.20.34/32\",\r\n \ - \ \"52.139.80.117/32\",\r\n \"52.139.152.27/32\",\r\n \"\ - 52.140.238.179/32\",\r\n \"52.142.95.35/32\",\r\n \"52.146.139.194/31\"\ - ,\r\n \"52.162.106.148/31\",\r\n \"52.162.110.80/28\",\r\ - \n \"52.224.186.99/32\",\r\n \"52.231.18.44/31\",\r\n \ - \ \"52.231.19.192/28\",\r\n \"52.231.146.84/31\",\r\n \ - \ \"52.231.147.176/28\",\r\n \"52.253.135.58/32\",\r\n \ - \ \"52.253.159.160/32\",\r\n \"52.253.229.253/32\",\r\n \ - \ \"65.52.164.91/32\",\r\n \"65.52.173.247/32\",\r\n \ - \ \"65.52.250.4/31\",\r\n \"65.52.252.32/28\",\r\n \"102.37.166.220/31\"\ - ,\r\n \"102.133.0.79/32\",\r\n \"102.133.26.4/31\",\r\n\ - \ \"102.133.28.0/28\",\r\n \"102.133.130.197/32\",\r\n \ - \ \"102.133.154.4/31\",\r\n \"102.133.156.0/28\",\r\n \ - \ \"104.41.217.243/32\",\r\n \"104.41.218.160/32\",\r\n \ - \ \"104.211.81.28/31\",\r\n \"104.211.81.240/28\",\r\n \ - \ \"104.211.146.68/31\",\r\n \"104.211.147.144/28\",\r\n \ - \ \"104.214.18.172/31\",\r\n \"104.214.19.224/28\",\r\n \ - \ \"137.117.160.56/32\",\r\n \"191.232.18.181/32\",\r\n \ - \ \"191.233.24.179/32\",\r\n \"191.233.50.192/28\",\r\n \ - \ \"191.233.203.28/31\",\r\n \"191.233.203.240/28\",\r\n \ - \ \"191.238.73.14/31\",\r\n \"191.238.241.97/32\",\r\n \ - \ \"2603:1000:4:402::140/124\",\r\n \"2603:1000:104:402::140/124\"\ - ,\r\n \"2603:1010:6:402::140/124\",\r\n \"2603:1010:101:402::140/124\"\ - ,\r\n \"2603:1010:304:402::140/124\",\r\n \"2603:1010:404:402::140/124\"\ - ,\r\n \"2603:1020:5:402::140/124\",\r\n \"2603:1020:206:402::140/124\"\ - ,\r\n \"2603:1020:305:402::140/124\",\r\n \"2603:1020:405:402::140/124\"\ - ,\r\n \"2603:1020:605:402::140/124\",\r\n \"2603:1020:705:402::140/124\"\ - ,\r\n \"2603:1020:805:402::140/124\",\r\n \"2603:1020:905:402::140/124\"\ - ,\r\n \"2603:1020:a04:2::510/124\",\r\n \"2603:1020:a04:402::140/124\"\ - ,\r\n \"2603:1020:b04:402::140/124\",\r\n \"2603:1020:c04:402::140/124\"\ - ,\r\n \"2603:1020:d04:402::140/124\",\r\n \"2603:1020:e04::6f0/124\"\ - ,\r\n \"2603:1020:e04:402::140/124\",\r\n \"2603:1020:f04:402::140/124\"\ - ,\r\n \"2603:1020:1004:1::700/124\",\r\n \"2603:1020:1004:800::c0/124\"\ - ,\r\n \"2603:1020:1104:1::3c0/124\",\r\n \"2603:1020:1104:400::140/124\"\ - ,\r\n \"2603:1030:f:2::490/124\",\r\n \"2603:1030:f:400::940/124\"\ - ,\r\n \"2603:1030:10:402::140/124\",\r\n \"2603:1030:104::780/124\"\ - ,\r\n \"2603:1030:104:402::140/124\",\r\n \"2603:1030:107:400::c0/124\"\ - ,\r\n \"2603:1030:210:402::140/124\",\r\n \"2603:1030:40b:400::940/124\"\ - ,\r\n \"2603:1030:40c:402::140/124\",\r\n \"2603:1030:504:2::80/124\"\ - ,\r\n \"2603:1030:608:402::140/124\",\r\n \"2603:1030:807:402::140/124\"\ - ,\r\n \"2603:1030:a07:402::8c0/124\",\r\n \"2603:1030:b04:402::140/124\"\ - ,\r\n \"2603:1030:c06:400::940/124\",\r\n \"2603:1030:f05:402::140/124\"\ - ,\r\n \"2603:1030:1005:402::140/124\",\r\n \"2603:1040:5:402::140/124\"\ - ,\r\n \"2603:1040:207:1::4a0/124\",\r\n \"2603:1040:207:402::140/124\"\ - ,\r\n \"2603:1040:407:402::140/124\",\r\n \"2603:1040:606:402::140/124\"\ - ,\r\n \"2603:1040:806:402::140/124\",\r\n \"2603:1040:904:402::140/124\"\ - ,\r\n \"2603:1040:a06:2::280/124\",\r\n \"2603:1040:a06:402::140/124\"\ - ,\r\n \"2603:1040:b04:402::140/124\",\r\n \"2603:1040:c06:402::140/124\"\ - ,\r\n \"2603:1040:d04:1::700/124\",\r\n \"2603:1040:d04:800::c0/124\"\ - ,\r\n \"2603:1040:f05::6f0/124\",\r\n \"2603:1040:f05:402::140/124\"\ - ,\r\n \"2603:1040:1002::7e0/124\",\r\n \"2603:1040:1104:1::400/124\"\ - ,\r\n \"2603:1040:1104:400::140/124\",\r\n \"2603:1050:6:402::140/124\"\ - ,\r\n \"2603:1050:403:400::2a0/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.AustraliaCentral\",\r\n\ - \ \"id\": \"ApiManagement.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.36.106.68/31\",\r\n \"20.36.107.176/28\",\r\n \"20.37.52.67/32\"\ - ,\r\n \"2603:1010:304:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.AustraliaCentral2\",\r\ - \n \"id\": \"ApiManagement.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiacentral2\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.36.114.20/31\",\r\n \"20.36.115.128/28\",\r\ - \n \"20.39.99.81/32\",\r\n \"2603:1010:404:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.AustraliaEast\"\ - ,\r\n \"id\": \"ApiManagement.AustraliaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.70.72.28/31\",\r\n \"13.70.72.240/28\",\r\n \"13.75.217.184/32\"\ - ,\r\n \"13.75.221.78/32\",\r\n \"20.40.125.155/32\",\r\n\ - \ \"20.70.220.182/31\",\r\n \"2603:1010:6:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.AustraliaSoutheast\"\ - ,\r\n \"id\": \"ApiManagement.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.77.50.68/31\",\r\n \"13.77.52.224/28\",\r\n\ - \ \"20.40.160.107/32\",\r\n \"20.92.3.250/31\",\r\n \ - \ \"2603:1010:101:402::140/124\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"ApiManagement.BrazilSouth\",\r\n \"id\":\ - \ \"ApiManagement.BrazilSouth\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 191.233.24.179/32\",\r\n \"191.233.203.28/31\",\r\n \"191.233.203.240/28\"\ - ,\r\n \"191.238.73.14/31\",\r\n \"2603:1050:6:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.BrazilSoutheast\"\ - ,\r\n \"id\": \"ApiManagement.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 191.232.18.181/32\",\r\n \"191.233.50.192/28\",\r\n \"2603:1050:403:400::2a0/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.CanadaCentral\"\ - ,\r\n \"id\": \"ApiManagement.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.71.170.44/31\",\r\n \"13.71.172.144/28\",\r\n \"20.48.201.76/31\"\ - ,\r\n \"52.139.20.34/32\",\r\n \"2603:1030:f05:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.CanadaEast\"\ - ,\r\n \"id\": \"ApiManagement.CanadaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 40.69.106.68/31\",\r\n \"40.69.107.224/28\",\r\n \"52.139.80.117/32\"\ - ,\r\n \"2603:1030:1005:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.CentralIndia\",\r\n \ - \ \"id\": \"ApiManagement.CentralIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.71.49.1/32\",\r\n \"20.192.45.112/28\",\r\n \"104.211.81.28/31\"\ - ,\r\n \"104.211.81.240/28\",\r\n \"2603:1040:a06:2::280/124\"\ - ,\r\n \"2603:1040:a06:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.CentralUS\",\r\n \ - \ \"id\": \"ApiManagement.CentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.86.102.66/32\",\r\n \"13.89.170.204/31\",\r\n \"13.89.174.64/28\"\ - ,\r\n \"20.40.231.62/31\",\r\n \"2603:1030:10:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.CentralUSEUAP\"\ - ,\r\n \"id\": \"ApiManagement.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.46.13.224/28\",\r\n \"40.78.202.128/31\",\r\n \"40.78.203.160/28\"\ - ,\r\n \"52.253.159.160/32\",\r\n \"2603:1030:f:2::490/124\"\ - ,\r\n \"2603:1030:f:400::940/124\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"ApiManagement.EastAsia\",\r\n \"\ - id\": \"ApiManagement.EastAsia\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.75.34.148/31\",\r\n \"13.75.38.16/28\",\r\n \"20.195.78.64/28\"\ - ,\r\n \"52.139.152.27/32\",\r\n \"65.52.164.91/32\",\r\n\ - \ \"65.52.173.247/32\",\r\n \"2603:1040:207:1::4a0/124\"\ - ,\r\n \"2603:1040:207:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.EastUS\",\r\n \"\ - id\": \"ApiManagement.EastUS\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureApiManagement\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.88.154.20/31\",\r\n\ - \ \"40.71.10.204/31\",\r\n \"40.71.13.128/28\",\r\n \ - \ \"52.224.186.99/32\",\r\n \"2603:1030:210:402::140/124\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.EastUS2\"\ - ,\r\n \"id\": \"ApiManagement.EastUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.44.72.3/32\",\r\n \"20.62.63.254/31\",\r\n \"40.70.146.76/31\"\ - ,\r\n \"40.70.148.16/28\",\r\n \"2603:1030:40c:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.EastUS2EUAP\"\ - ,\r\n \"id\": \"ApiManagement.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.47.232.184/31\",\r\n \"40.74.146.80/31\",\r\n \"40.74.147.32/28\"\ - ,\r\n \"52.253.229.253/32\",\r\n \"2603:1030:40b:400::940/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.FranceCentral\"\ - ,\r\n \"id\": \"ApiManagement.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 40.66.60.111/32\",\r\n \"40.79.130.44/31\",\r\n \"40.79.131.192/28\"\ - ,\r\n \"51.138.215.124/31\",\r\n \"2603:1020:805:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.FranceSouth\"\ - ,\r\n \"id\": \"ApiManagement.FranceSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.39.80.2/32\",\r\n \"40.79.178.68/31\",\r\n \"40.79.179.192/28\"\ - ,\r\n \"2603:1020:905:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.GermanyNorth\",\r\n \ - \ \"id\": \"ApiManagement.GermanyNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 51.116.0.0/32\",\r\n \"51.116.59.0/28\",\r\n \"2603:1020:d04:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.GermanyWestCentral\"\ - ,\r\n \"id\": \"ApiManagement.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.52.94.112/31\",\r\n \"51.116.96.0/32\",\r\n \"51.116.155.64/28\"\ - ,\r\n \"2603:1020:c04:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.JapanEast\",\r\n \ - \ \"id\": \"ApiManagement.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.78.106.92/31\",\r\n \"13.78.108.176/28\",\r\n \"20.191.167.246/31\"\ - ,\r\n \"52.140.238.179/32\",\r\n \"2603:1040:407:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.JapanWest\"\ - ,\r\n \"id\": \"ApiManagement.JapanWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 40.74.100.52/31\",\r\n \"40.74.101.48/28\",\r\n \"40.81.185.8/32\"\ - ,\r\n \"2603:1040:606:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.JioIndiaCentral\",\r\n\ - \ \"id\": \"ApiManagement.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.192.50.64/28\",\r\n \"20.192.234.160/28\",\r\n \"2603:1040:1104:1::400/124\"\ - ,\r\n \"2603:1040:1104:400::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.JioIndiaWest\",\r\n \ - \ \"id\": \"ApiManagement.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.193.192.48/28\",\r\n \"20.193.202.160/28\",\r\n \"2603:1040:d04:1::700/124\"\ - ,\r\n \"2603:1040:d04:800::c0/124\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"ApiManagement.KoreaCentral\",\r\n \ - \ \"id\": \"ApiManagement.KoreaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.194.74.240/28\",\r\n \"40.82.157.167/32\",\r\n \"52.231.18.44/31\"\ - ,\r\n \"52.231.19.192/28\",\r\n \"2603:1040:f05::6f0/124\"\ - ,\r\n \"2603:1040:f05:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.KoreaSouth\",\r\n \ - \ \"id\": \"ApiManagement.KoreaSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 40.80.232.185/32\",\r\n \"52.231.146.84/31\",\r\n \"52.231.147.176/28\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.NorthCentralUS\"\ - ,\r\n \"id\": \"ApiManagement.NorthCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 23.96.224.175/32\",\r\n \"23.101.166.38/32\",\r\n \"40.81.47.216/32\"\ - ,\r\n \"52.162.106.148/31\",\r\n \"52.162.110.80/28\",\r\ - \n \"2603:1030:608:402::140/124\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"ApiManagement.NorthEurope\",\r\n \"\ - id\": \"ApiManagement.NorthEurope\",\r\n \"serviceTagChangeNumber\":\ - \ \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.69.227.76/31\",\r\n \"13.69.229.80/28\",\r\n \"52.142.95.35/32\"\ - ,\r\n \"52.146.139.194/31\",\r\n \"104.41.217.243/32\",\r\ - \n \"104.41.218.160/32\",\r\n \"2603:1020:5:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.NorwayEast\"\ - ,\r\n \"id\": \"ApiManagement.NorwayEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 51.120.2.185/32\",\r\n \"51.120.98.176/28\",\r\n \"51.120.234.240/28\"\ - ,\r\n \"2603:1020:e04::6f0/124\",\r\n \"2603:1020:e04:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.NorwayWest\"\ - ,\r\n \"id\": \"ApiManagement.NorwayWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 51.120.130.134/32\",\r\n \"51.120.218.224/28\",\r\n \"2603:1020:f04:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.SouthAfricaNorth\"\ - ,\r\n \"id\": \"ApiManagement.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 102.37.166.220/31\",\r\n \"102.133.130.197/32\",\r\n \"\ - 102.133.154.4/31\",\r\n \"102.133.156.0/28\",\r\n \"2603:1000:104:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.SouthAfricaWest\"\ - ,\r\n \"id\": \"ApiManagement.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 102.133.0.79/32\",\r\n \"102.133.26.4/31\",\r\n \"102.133.28.0/28\"\ - ,\r\n \"2603:1000:4:402::140/124\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"ApiManagement.SouthCentralUS\",\r\n \ - \ \"id\": \"ApiManagement.SouthCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.84.189.17/32\",\r\n \"13.85.22.63/32\",\r\n \"20.97.32.190/31\"\ - ,\r\n \"20.188.77.119/32\",\r\n \"104.214.18.172/31\",\r\ - \n \"104.214.19.224/28\",\r\n \"191.238.241.97/32\",\r\n\ - \ \"2603:1030:807:402::140/124\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"ApiManagement.SouthCentralUSSTG\",\r\n \"\ - id\": \"ApiManagement.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.44.2.4/31\",\r\n \"20.44.3.224/28\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.SoutheastAsia\",\r\n \ - \ \"id\": \"ApiManagement.SoutheastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.67.8.108/31\",\r\n \"13.67.9.208/28\",\r\n \"40.90.185.46/32\"\ - ,\r\n \"2603:1040:5:402::140/124\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"ApiManagement.SouthIndia\",\r\n \"\ - id\": \"ApiManagement.SouthIndia\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.44.33.246/32\",\r\n \"40.78.194.68/31\",\r\n \"40.78.195.224/28\"\ - ,\r\n \"2603:1040:c06:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.SwedenCentral\",\r\n \ - \ \"id\": \"ApiManagement.SwedenCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 51.12.25.16/28\",\r\n \"51.12.98.224/28\",\r\n \"2603:1020:1004:1::700/124\"\ - ,\r\n \"2603:1020:1004:800::c0/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.SwitzerlandNorth\",\r\n\ - \ \"id\": \"ApiManagement.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 51.107.0.91/32\",\r\n \"51.107.59.0/28\",\r\n \"51.107.246.176/28\"\ - ,\r\n \"2603:1020:a04:2::510/124\",\r\n \"2603:1020:a04:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.SwitzerlandWest\"\ - ,\r\n \"id\": \"ApiManagement.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 51.107.96.8/32\",\r\n \"51.107.155.0/28\",\r\n \"2603:1020:b04:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.UAECentral\"\ - ,\r\n \"id\": \"ApiManagement.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.37.74.224/31\",\r\n \"20.37.76.32/28\",\r\n \"20.37.81.41/32\"\ - ,\r\n \"2603:1040:b04:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.UAENorth\",\r\n \"\ - id\": \"ApiManagement.UAENorth\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.46.144.85/32\",\r\n \"40.120.87.48/31\",\r\n \"65.52.250.4/31\"\ - ,\r\n \"65.52.252.32/28\",\r\n \"2603:1040:904:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.UKSouth\"\ - ,\r\n \"id\": \"ApiManagement.UKSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.90.131.114/31\",\r\n \"51.140.146.60/31\",\r\n \"51.140.149.0/28\"\ - ,\r\n \"51.145.56.125/32\",\r\n \"2603:1020:705:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.UKWest\"\ - ,\r\n \"id\": \"ApiManagement.UKWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 51.137.136.0/32\",\r\n \"51.140.210.84/31\",\r\n \"51.140.211.176/28\"\ - ,\r\n \"2603:1020:605:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.WestCentralUS\",\r\n \ - \ \"id\": \"ApiManagement.WestCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.71.194.116/31\",\r\n \"13.71.196.32/28\",\r\n \"52.253.135.58/32\"\ - ,\r\n \"2603:1030:b04:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.WestEurope\",\r\n \ - \ \"id\": \"ApiManagement.WestEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 13.69.64.76/31\",\r\n \"13.69.66.144/28\",\r\n \"20.86.92.254/31\"\ - ,\r\n \"23.101.67.140/32\",\r\n \"51.145.179.78/32\",\r\n\ - \ \"137.117.160.56/32\",\r\n \"2603:1020:206:402::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.WestIndia\"\ - ,\r\n \"id\": \"ApiManagement.WestIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 40.81.89.24/32\",\r\n \"104.211.146.68/31\",\r\n \"104.211.147.144/28\"\ - ,\r\n \"2603:1040:806:402::140/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApiManagement.WestUS\",\r\n \"\ - id\": \"ApiManagement.WestUS\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureApiManagement\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.64.39.16/32\",\r\n \ - \ \"40.112.242.148/31\",\r\n \"40.112.243.240/28\",\r\n \ - \ \"2603:1030:a07:402::8c0/124\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"ApiManagement.WestUS2\",\r\n \"id\": \"\ - ApiManagement.WestUS2\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureApiManagement\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.138.92/31\",\r\n\ - \ \"13.66.140.176/28\",\r\n \"20.83.221.20/30\",\r\n \ - \ \"20.83.221.64/28\",\r\n \"20.83.221.86/31\",\r\n \ - \ \"51.143.127.203/32\",\r\n \"2603:1030:c06:400::940/124\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.WestUS3\"\ - ,\r\n \"id\": \"ApiManagement.WestUS3\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"\ - 20.150.167.160/28\",\r\n \"20.150.170.224/28\",\r\n \"2603:1030:504:2::80/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppConfiguration\"\ - ,\r\n \"id\": \"AppConfiguration\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppConfiguration\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.142.72/29\",\r\n\ - \ \"13.66.143.192/28\",\r\n \"13.66.143.208/29\",\r\n \ - \ \"13.67.10.112/29\",\r\n \"13.67.13.192/28\",\r\n \ - \ \"13.67.13.208/29\",\r\n \"13.69.67.112/29\",\r\n \"\ - 13.69.67.240/28\",\r\n \"13.69.71.128/29\",\r\n \"13.69.107.72/29\"\ - ,\r\n \"13.69.112.144/28\",\r\n \"13.69.112.160/29\",\r\n\ - \ \"13.69.230.8/29\",\r\n \"13.69.230.40/29\",\r\n \ - \ \"13.69.231.144/28\",\r\n \"13.70.74.128/29\",\r\n \ - \ \"13.70.78.144/28\",\r\n \"13.70.78.160/29\",\r\n \"\ - 13.71.175.64/28\",\r\n \"13.71.175.96/28\",\r\n \"13.71.196.176/28\"\ - ,\r\n \"13.71.199.80/28\",\r\n \"13.73.242.56/29\",\r\n\ - \ \"13.73.244.96/28\",\r\n \"13.73.244.112/29\",\r\n \ - \ \"13.73.255.128/26\",\r\n \"13.74.108.160/28\",\r\n \ - \ \"13.74.108.240/28\",\r\n \"13.77.53.88/29\",\r\n \ - \ \"13.77.53.192/28\",\r\n \"13.77.53.208/29\",\r\n \"13.78.109.144/29\"\ - ,\r\n \"13.78.109.208/28\",\r\n \"13.78.111.128/29\",\r\n\ - \ \"13.86.219.192/29\",\r\n \"13.86.221.192/28\",\r\n \ - \ \"13.86.221.208/29\",\r\n \"13.87.58.64/29\",\r\n \ - \ \"13.87.58.80/28\",\r\n \"13.87.58.128/29\",\r\n \"\ - 13.87.124.64/29\",\r\n \"13.87.124.80/28\",\r\n \"13.87.124.128/29\"\ - ,\r\n \"13.89.175.208/28\",\r\n \"13.89.178.16/29\",\r\n\ - \ \"13.89.178.32/29\",\r\n \"20.21.39.128/26\",\r\n \ - \ \"20.21.44.64/27\",\r\n \"20.21.67.128/27\",\r\n \ - \ \"20.21.75.128/27\",\r\n \"20.36.108.120/29\",\r\n \"\ - 20.36.108.136/29\",\r\n \"20.36.108.144/28\",\r\n \"20.36.115.248/29\"\ - ,\r\n \"20.36.117.40/29\",\r\n \"20.36.117.48/28\",\r\n\ - \ \"20.36.123.16/28\",\r\n \"20.36.124.64/26\",\r\n \ - \ \"20.37.67.96/28\",\r\n \"20.37.69.64/26\",\r\n \"\ - 20.37.76.112/29\",\r\n \"20.37.76.144/28\",\r\n \"20.37.76.192/29\"\ - ,\r\n \"20.37.198.144/28\",\r\n \"20.37.227.32/28\",\r\n\ - \ \"20.37.228.128/26\",\r\n \"20.38.128.96/29\",\r\n \ - \ \"20.38.128.112/28\",\r\n \"20.38.128.160/29\",\r\n \ - \ \"20.38.139.96/28\",\r\n \"20.38.141.64/26\",\r\n \ - \ \"20.38.147.176/28\",\r\n \"20.38.147.240/28\",\r\n \"\ - 20.39.14.16/28\",\r\n \"20.40.206.144/28\",\r\n \"20.40.206.160/28\"\ - ,\r\n \"20.40.224.128/26\",\r\n \"20.41.68.64/28\",\r\n\ - \ \"20.41.69.192/26\",\r\n \"20.41.197.48/28\",\r\n \ - \ \"20.42.64.16/28\",\r\n \"20.42.230.144/28\",\r\n \ - \ \"20.43.44.144/28\",\r\n \"20.43.46.128/26\",\r\n \"\ - 20.43.70.128/28\",\r\n \"20.43.121.40/29\",\r\n \"20.43.121.96/28\"\ - ,\r\n \"20.43.121.112/29\",\r\n \"20.44.4.96/29\",\r\n \ - \ \"20.44.4.120/29\",\r\n \"20.44.4.160/28\",\r\n \ - \ \"20.44.8.168/29\",\r\n \"20.44.10.96/28\",\r\n \"20.44.10.112/29\"\ - ,\r\n \"20.44.17.56/29\",\r\n \"20.44.17.192/28\",\r\n \ - \ \"20.44.17.208/29\",\r\n \"20.44.27.224/28\",\r\n \ - \ \"20.44.29.32/28\",\r\n \"20.45.116.0/26\",\r\n \"\ - 20.45.123.120/29\",\r\n \"20.45.123.176/28\",\r\n \"20.45.123.224/29\"\ - ,\r\n \"20.45.126.0/27\",\r\n \"20.45.198.0/27\",\r\n \ - \ \"20.45.199.64/26\",\r\n \"20.48.192.192/26\",\r\n \ - \ \"20.49.83.96/27\",\r\n \"20.49.91.96/27\",\r\n \"\ - 20.49.99.80/28\",\r\n \"20.49.103.0/26\",\r\n \"20.49.109.96/28\"\ - ,\r\n \"20.49.115.64/26\",\r\n \"20.49.120.80/28\",\r\n\ - \ \"20.49.127.64/26\",\r\n \"20.50.1.240/28\",\r\n \ - \ \"20.50.65.96/28\",\r\n \"20.51.8.0/26\",\r\n \"20.51.16.0/26\"\ - ,\r\n \"20.53.41.192/26\",\r\n \"20.61.98.0/26\",\r\n \ - \ \"20.62.128.64/26\",\r\n \"20.72.20.192/26\",\r\n \ - \ \"20.72.28.128/27\",\r\n \"20.150.165.176/28\",\r\n \ - \ \"20.150.167.0/26\",\r\n \"20.150.172.64/27\",\r\n \"\ - 20.150.173.32/27\",\r\n \"20.150.179.200/29\",\r\n \"20.150.181.0/28\"\ - ,\r\n \"20.150.181.16/29\",\r\n \"20.150.181.128/27\",\r\ - \n \"20.150.187.200/29\",\r\n \"20.150.189.0/28\",\r\n \ - \ \"20.150.189.16/29\",\r\n \"20.150.190.32/27\",\r\n \ - \ \"20.187.194.224/28\",\r\n \"20.187.196.128/26\",\r\n \ - \ \"20.189.224.64/26\",\r\n \"20.191.160.192/26\",\r\n \ - \ \"20.192.99.200/29\",\r\n \"20.192.101.0/28\",\r\n \ - \ \"20.192.101.16/29\",\r\n \"20.192.167.0/26\",\r\n \"\ - 20.192.231.64/26\",\r\n \"20.192.235.240/29\",\r\n \"20.192.238.112/29\"\ - ,\r\n \"20.192.238.192/27\",\r\n \"20.193.203.224/27\",\r\ - \n \"20.194.67.64/27\",\r\n \"20.205.75.96/27\",\r\n \ - \ \"20.205.83.96/27\",\r\n \"20.208.19.128/27\",\r\n \ - \ \"23.98.83.72/29\",\r\n \"23.98.86.32/28\",\r\n \"\ - 23.98.86.48/29\",\r\n \"23.98.86.96/27\",\r\n \"23.98.104.176/28\"\ - ,\r\n \"23.98.108.64/26\",\r\n \"40.64.132.144/28\",\r\n\ - \ \"40.67.52.0/26\",\r\n \"40.67.60.72/29\",\r\n \ - \ \"40.67.60.112/28\",\r\n \"40.67.60.160/29\",\r\n \"\ - 40.69.108.80/29\",\r\n \"40.69.108.176/28\",\r\n \"40.69.110.160/29\"\ - ,\r\n \"40.70.148.56/29\",\r\n \"40.70.151.48/28\",\r\n\ - \ \"40.70.151.64/29\",\r\n \"40.71.13.248/29\",\r\n \ - \ \"40.71.14.120/29\",\r\n \"40.71.15.128/28\",\r\n \ - \ \"40.74.149.40/29\",\r\n \"40.74.149.56/29\",\r\n \"\ - 40.74.149.80/28\",\r\n \"40.75.35.72/29\",\r\n \"40.75.35.192/28\"\ - ,\r\n \"40.75.35.208/29\",\r\n \"40.78.196.80/29\",\r\n\ - \ \"40.78.196.144/28\",\r\n \"40.78.196.160/29\",\r\n \ - \ \"40.78.204.8/29\",\r\n \"40.78.204.144/28\",\r\n \ - \ \"40.78.204.192/29\",\r\n \"40.78.229.80/28\",\r\n \ - \ \"40.78.229.112/28\",\r\n \"40.78.236.136/29\",\r\n \"\ - 40.78.238.32/28\",\r\n \"40.78.238.48/29\",\r\n \"40.78.243.176/28\"\ - ,\r\n \"40.78.245.128/28\",\r\n \"40.78.251.144/28\",\r\n\ - \ \"40.78.251.208/28\",\r\n \"40.79.132.88/29\",\r\n \ - \ \"40.79.139.64/28\",\r\n \"40.79.139.128/28\",\r\n \ - \ \"40.79.146.208/28\",\r\n \"40.79.148.64/28\",\r\n \ - \ \"40.79.150.64/27\",\r\n \"40.79.156.96/28\",\r\n \"40.79.163.64/29\"\ - ,\r\n \"40.79.163.128/28\",\r\n \"40.79.163.144/29\",\r\n\ - \ \"40.79.165.96/27\",\r\n \"40.79.171.112/28\",\r\n \ - \ \"40.79.171.176/28\",\r\n \"40.79.180.48/29\",\r\n \ - \ \"40.79.180.128/28\",\r\n \"40.79.180.144/29\",\r\n \ - \ \"40.79.187.192/29\",\r\n \"40.79.189.32/28\",\r\n \"\ - 40.79.189.48/29\",\r\n \"40.79.190.224/27\",\r\n \"40.79.195.176/28\"\ - ,\r\n \"40.79.195.240/28\",\r\n \"40.80.51.112/28\",\r\n\ - \ \"40.80.51.176/28\",\r\n \"40.80.54.0/27\",\r\n \ - \ \"40.80.62.32/28\",\r\n \"40.80.172.48/28\",\r\n \"\ - 40.80.173.64/26\",\r\n \"40.80.176.40/29\",\r\n \"40.80.176.56/29\"\ - ,\r\n \"40.80.176.112/28\",\r\n \"40.80.191.240/28\",\r\n\ - \ \"40.89.20.160/28\",\r\n \"40.89.23.128/26\",\r\n \ - \ \"40.119.11.192/28\",\r\n \"40.120.75.128/27\",\r\n \ - \ \"51.11.192.0/28\",\r\n \"51.11.192.16/29\",\r\n \"\ - 51.12.43.64/26\",\r\n \"51.12.99.216/29\",\r\n \"51.12.100.48/28\"\ - ,\r\n \"51.12.100.96/29\",\r\n \"51.12.102.128/27\",\r\n\ - \ \"51.12.195.64/26\",\r\n \"51.12.204.48/28\",\r\n \ - \ \"51.12.204.96/28\",\r\n \"51.12.206.32/27\",\r\n \ - \ \"51.12.227.200/29\",\r\n \"51.12.229.0/28\",\r\n \"\ - 51.12.229.16/29\",\r\n \"51.12.229.192/27\",\r\n \"51.12.235.200/29\"\ - ,\r\n \"51.12.237.0/28\",\r\n \"51.12.237.16/29\",\r\n \ - \ \"51.12.237.96/27\",\r\n \"51.103.203.128/27\",\r\n \ - \ \"51.104.9.48/28\",\r\n \"51.104.29.224/28\",\r\n \ - \ \"51.105.67.184/29\",\r\n \"51.105.67.216/29\",\r\n \ - \ \"51.105.69.64/28\",\r\n \"51.105.75.224/28\",\r\n \"\ - 51.105.77.32/28\",\r\n \"51.105.83.64/26\",\r\n \"51.105.90.176/28\"\ - ,\r\n \"51.105.93.0/26\",\r\n \"51.107.51.48/28\",\r\n \ - \ \"51.107.53.128/26\",\r\n \"51.107.60.56/29\",\r\n \ - \ \"51.107.60.128/28\",\r\n \"51.107.60.144/29\",\r\n \ - \ \"51.107.147.48/28\",\r\n \"51.107.148.192/26\",\r\n \ - \ \"51.107.156.64/29\",\r\n \"51.107.156.136/29\",\r\n \ - \ \"51.107.156.144/28\",\r\n \"51.116.49.192/28\",\r\n \ - \ \"51.116.51.64/26\",\r\n \"51.116.60.56/29\",\r\n \"51.116.60.88/29\"\ - ,\r\n \"51.116.60.128/28\",\r\n \"51.116.145.176/28\",\r\ - \n \"51.116.148.0/26\",\r\n \"51.116.156.56/29\",\r\n \ - \ \"51.116.156.168/29\",\r\n \"51.116.158.32/28\",\r\n \ - \ \"51.116.158.48/29\",\r\n \"51.116.243.152/29\",\r\n \ - \ \"51.116.243.192/28\",\r\n \"51.116.243.208/29\",\r\n \ - \ \"51.116.245.128/27\",\r\n \"51.116.251.40/29\",\r\n \ - \ \"51.116.251.160/28\",\r\n \"51.116.251.176/29\",\r\n \ - \ \"51.116.253.64/27\",\r\n \"51.120.43.96/28\",\r\n \ - \ \"51.120.45.0/26\",\r\n \"51.120.100.56/29\",\r\n \"\ - 51.120.100.128/28\",\r\n \"51.120.100.144/29\",\r\n \"51.120.107.200/29\"\ - ,\r\n \"51.120.109.0/28\",\r\n \"51.120.109.16/29\",\r\n\ - \ \"51.120.110.160/27\",\r\n \"51.120.211.200/29\",\r\n\ - \ \"51.120.213.0/28\",\r\n \"51.120.213.16/29\",\r\n \ - \ \"51.120.214.96/27\",\r\n \"51.120.220.56/29\",\r\n \ - \ \"51.120.220.96/28\",\r\n \"51.120.220.112/29\",\r\n \ - \ \"51.120.227.96/28\",\r\n \"51.120.229.0/26\",\r\n \ - \ \"51.137.164.128/28\",\r\n \"51.137.167.0/26\",\r\n \"\ - 51.140.148.40/29\",\r\n \"51.140.149.16/29\",\r\n \"51.140.212.96/29\"\ - ,\r\n \"51.140.212.192/28\",\r\n \"51.140.212.208/29\",\r\ - \n \"51.143.195.64/26\",\r\n \"51.143.208.64/26\",\r\n \ - \ \"52.136.51.96/28\",\r\n \"52.136.52.128/26\",\r\n \ - \ \"52.138.92.88/29\",\r\n \"52.138.92.144/28\",\r\n \ - \ \"52.138.92.160/29\",\r\n \"52.138.227.176/28\",\r\n \ - \ \"52.138.229.48/28\",\r\n \"52.140.108.112/28\",\r\n \ - \ \"52.140.108.128/28\",\r\n \"52.140.111.0/26\",\r\n \"\ - 52.146.131.192/26\",\r\n \"52.150.152.64/28\",\r\n \"52.150.156.128/26\"\ - ,\r\n \"52.162.111.32/28\",\r\n \"52.162.111.112/28\",\r\ - \n \"52.167.107.112/28\",\r\n \"52.167.107.240/28\",\r\n\ - \ \"52.168.117.64/27\",\r\n \"52.172.112.64/26\",\r\n \ - \ \"52.182.141.0/29\",\r\n \"52.182.141.32/28\",\r\n \ - \ \"52.182.141.48/29\",\r\n \"52.228.85.208/28\",\r\n \ - \ \"52.231.20.8/29\",\r\n \"52.231.20.80/28\",\r\n \"\ - 52.231.23.0/29\",\r\n \"52.231.148.112/29\",\r\n \"52.231.148.176/28\"\ - ,\r\n \"52.231.148.192/29\",\r\n \"52.236.186.248/29\",\r\ - \n \"52.236.187.96/28\",\r\n \"52.236.189.64/29\",\r\n \ - \ \"52.246.155.176/28\",\r\n \"52.246.155.240/28\",\r\n \ - \ \"52.246.157.32/27\",\r\n \"65.52.252.112/29\",\r\n \ - \ \"65.52.252.224/28\",\r\n \"65.52.252.240/29\",\r\n \ - \ \"102.133.28.96/29\",\r\n \"102.133.28.152/29\",\r\n \ - \ \"102.133.28.192/28\",\r\n \"102.133.58.240/28\",\r\n \ - \ \"102.133.60.128/26\",\r\n \"102.133.124.80/29\",\r\n \ - \ \"102.133.124.112/28\",\r\n \"102.133.124.128/29\",\r\n \ - \ \"102.133.156.120/29\",\r\n \"102.133.156.152/29\",\r\n \ - \ \"102.133.156.160/28\",\r\n \"102.133.218.160/28\",\r\n\ - \ \"102.133.220.128/26\",\r\n \"102.133.251.88/29\",\r\n\ - \ \"102.133.251.192/28\",\r\n \"102.133.251.208/29\",\r\n\ - \ \"104.46.177.192/26\",\r\n \"104.214.161.0/29\",\r\n \ - \ \"104.214.161.16/28\",\r\n \"104.214.161.32/29\",\r\n \ - \ \"104.214.166.64/27\",\r\n \"168.61.142.96/27\",\r\n \ - \ \"191.233.11.144/28\",\r\n \"191.233.14.128/26\",\r\n \ - \ \"191.233.51.224/27\",\r\n \"191.233.205.112/28\",\r\n \ - \ \"191.233.205.176/28\",\r\n \"191.234.136.96/28\",\r\n\ - \ \"191.234.139.64/26\",\r\n \"191.234.147.200/29\",\r\n\ - \ \"191.234.149.16/28\",\r\n \"191.234.149.128/29\",\r\n\ - \ \"191.234.149.192/27\",\r\n \"191.234.155.200/29\",\r\n\ - \ \"191.234.157.16/28\",\r\n \"191.234.157.32/29\",\r\n\ - \ \"191.234.157.96/27\",\r\n \"2603:1000:4:402::2e0/123\"\ - ,\r\n \"2603:1000:104:402::2e0/123\",\r\n \"2603:1000:104:802::220/123\"\ - ,\r\n \"2603:1000:104:c02::220/123\",\r\n \"2603:1010:6:402::2e0/123\"\ - ,\r\n \"2603:1010:6:802::220/123\",\r\n \"2603:1010:6:c02::220/123\"\ - ,\r\n \"2603:1010:101:402::2e0/123\",\r\n \"2603:1010:304:402::2e0/123\"\ - ,\r\n \"2603:1010:404:402::2e0/123\",\r\n \"2603:1020:5:402::2e0/123\"\ - ,\r\n \"2603:1020:5:802::220/123\",\r\n \"2603:1020:5:c02::220/123\"\ - ,\r\n \"2603:1020:206:402::2e0/123\",\r\n \"2603:1020:206:802::220/123\"\ - ,\r\n \"2603:1020:206:c02::220/123\",\r\n \"2603:1020:305:402::2e0/123\"\ - ,\r\n \"2603:1020:405:402::2e0/123\",\r\n \"2603:1020:605:402::2e0/123\"\ - ,\r\n \"2603:1020:705:402::2e0/123\",\r\n \"2603:1020:705:802::220/123\"\ - ,\r\n \"2603:1020:705:c02::220/123\",\r\n \"2603:1020:805:402::2e0/123\"\ - ,\r\n \"2603:1020:805:802::220/123\",\r\n \"2603:1020:805:c02::220/123\"\ - ,\r\n \"2603:1020:905:402::2e0/123\",\r\n \"2603:1020:a04:3::/122\"\ - ,\r\n \"2603:1020:a04:402::2e0/123\",\r\n \"2603:1020:a04:802::220/123\"\ - ,\r\n \"2603:1020:a04:c02::220/123\",\r\n \"2603:1020:b04:402::2e0/123\"\ - ,\r\n \"2603:1020:c04:402::2e0/123\",\r\n \"2603:1020:c04:802::220/123\"\ - ,\r\n \"2603:1020:c04:c02::220/123\",\r\n \"2603:1020:d04:402::2e0/123\"\ - ,\r\n \"2603:1020:e04:3::2c0/122\",\r\n \"2603:1020:e04:402::2e0/123\"\ - ,\r\n \"2603:1020:e04:802::220/123\",\r\n \"2603:1020:e04:c02::220/123\"\ - ,\r\n \"2603:1020:f04:402::2e0/123\",\r\n \"2603:1020:1004:1::340/122\"\ - ,\r\n \"2603:1020:1004:400::1e0/123\",\r\n \"2603:1020:1004:400::380/123\"\ - ,\r\n \"2603:1020:1004:800::440/123\",\r\n \"2603:1020:1004:c02::280/123\"\ - ,\r\n \"2603:1020:1104:1::100/122\",\r\n \"2603:1020:1104:400::2e0/123\"\ - ,\r\n \"2603:1030:f:2::680/122\",\r\n \"2603:1030:f:400::ae0/123\"\ - ,\r\n \"2603:1030:10:402::2e0/123\",\r\n \"2603:1030:10:802::220/123\"\ - ,\r\n \"2603:1030:10:c02::220/123\",\r\n \"2603:1030:104:2::/122\"\ - ,\r\n \"2603:1030:104:402::2e0/123\",\r\n \"2603:1030:104:402::720/123\"\ - ,\r\n \"2603:1030:104:802::1c0/123\",\r\n \"2603:1030:107::7c0/122\"\ - ,\r\n \"2603:1030:107:400::260/123\",\r\n \"2603:1030:210:402::2e0/123\"\ - ,\r\n \"2603:1030:210:802::220/123\",\r\n \"2603:1030:210:c02::220/123\"\ - ,\r\n \"2603:1030:40b:400::ae0/123\",\r\n \"2603:1030:40b:800::220/123\"\ - ,\r\n \"2603:1030:40b:c00::220/123\",\r\n \"2603:1030:40c:402::2e0/123\"\ - ,\r\n \"2603:1030:40c:802::220/123\",\r\n \"2603:1030:40c:c02::220/123\"\ - ,\r\n \"2603:1030:504::340/122\",\r\n \"2603:1030:504:402::1e0/123\"\ - ,\r\n \"2603:1030:504:402::380/123\",\r\n \"2603:1030:504:802::260/123\"\ - ,\r\n \"2603:1030:504:c02::280/123\",\r\n \"2603:1030:608:402::2e0/123\"\ - ,\r\n \"2603:1030:807:402::2e0/123\",\r\n \"2603:1030:807:802::220/123\"\ - ,\r\n \"2603:1030:807:c02::220/123\",\r\n \"2603:1030:a07:402::960/123\"\ - ,\r\n \"2603:1030:b04:402::2e0/123\",\r\n \"2603:1030:c06:400::ae0/123\"\ - ,\r\n \"2603:1030:c06:802::220/123\",\r\n \"2603:1030:c06:c02::220/123\"\ - ,\r\n \"2603:1030:f05:402::2e0/123\",\r\n \"2603:1030:f05:802::220/123\"\ - ,\r\n \"2603:1030:f05:c02::220/123\",\r\n \"2603:1030:1005:402::2e0/123\"\ - ,\r\n \"2603:1040:5:402::2e0/123\",\r\n \"2603:1040:5:802::220/123\"\ - ,\r\n \"2603:1040:5:c02::220/123\",\r\n \"2603:1040:207:2::240/122\"\ - ,\r\n \"2603:1040:207:402::2e0/123\",\r\n \"2603:1040:207:800::c0/123\"\ - ,\r\n \"2603:1040:207:c00::c0/123\",\r\n \"2603:1040:407:402::2e0/123\"\ - ,\r\n \"2603:1040:407:802::220/123\",\r\n \"2603:1040:407:c02::220/123\"\ - ,\r\n \"2603:1040:606:402::2e0/123\",\r\n \"2603:1040:806:402::2e0/123\"\ - ,\r\n \"2603:1040:904:402::2e0/123\",\r\n \"2603:1040:904:802::220/123\"\ - ,\r\n \"2603:1040:904:c02::220/123\",\r\n \"2603:1040:a06:2::500/122\"\ - ,\r\n \"2603:1040:a06:402::2e0/123\",\r\n \"2603:1040:a06:802::220/123\"\ - ,\r\n \"2603:1040:a06:c02::220/123\",\r\n \"2603:1040:b04:402::2e0/123\"\ - ,\r\n \"2603:1040:c06:402::2e0/123\",\r\n \"2603:1040:d04:1::340/122\"\ - ,\r\n \"2603:1040:d04:400::1e0/123\",\r\n \"2603:1040:d04:400::380/123\"\ - ,\r\n \"2603:1040:d04:c02::280/123\",\r\n \"2603:1040:f05:2::200/122\"\ - ,\r\n \"2603:1040:f05:402::2e0/123\",\r\n \"2603:1040:f05:802::220/123\"\ - ,\r\n \"2603:1040:f05:c02::220/123\",\r\n \"2603:1040:1002:1::540/122\"\ - ,\r\n \"2603:1040:1002:400::1a0/123\",\r\n \"2603:1040:1002:800::c0/123\"\ - ,\r\n \"2603:1040:1002:c00::c0/123\",\r\n \"2603:1040:1104:1::100/122\"\ - ,\r\n \"2603:1040:1104:400::2e0/123\",\r\n \"2603:1050:6:402::2e0/123\"\ - ,\r\n \"2603:1050:6:802::220/123\",\r\n \"2603:1050:6:c02::220/123\"\ - ,\r\n \"2603:1050:403:400::200/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ApplicationInsightsAvailability\",\r\ - \n \"id\": \"ApplicationInsightsAvailability\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"ApplicationInsightsAvailability\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.86.97.224/27\",\r\n\ - \ \"13.86.98.0/27\",\r\n \"13.86.98.48/28\",\r\n \ - \ \"13.86.98.64/28\",\r\n \"20.37.156.64/27\",\r\n \"\ - 20.37.192.80/29\",\r\n \"20.38.80.80/28\",\r\n \"20.40.104.96/27\"\ - ,\r\n \"20.40.104.128/27\",\r\n \"20.40.124.176/28\",\r\n\ - \ \"20.40.124.240/28\",\r\n \"20.40.125.80/28\",\r\n \ - \ \"20.40.129.32/27\",\r\n \"20.40.129.64/26\",\r\n \ - \ \"20.40.129.128/27\",\r\n \"20.42.4.64/27\",\r\n \"\ - 20.42.35.32/28\",\r\n \"20.42.35.64/26\",\r\n \"20.42.35.128/28\"\ - ,\r\n \"20.42.129.32/27\",\r\n \"20.43.40.80/28\",\r\n \ - \ \"20.43.64.80/29\",\r\n \"20.43.128.96/29\",\r\n \ - \ \"20.45.5.160/27\",\r\n \"20.45.5.192/26\",\r\n \"\ - 20.189.106.64/29\",\r\n \"23.100.224.16/28\",\r\n \"23.100.224.32/27\"\ - ,\r\n \"23.100.224.64/26\",\r\n \"23.100.225.0/28\",\r\n\ - \ \"40.74.24.80/28\",\r\n \"40.80.186.128/26\",\r\n \ - \ \"40.91.82.48/28\",\r\n \"40.91.82.64/26\",\r\n \"\ - 40.91.82.128/28\",\r\n \"40.119.8.96/27\",\r\n \"51.104.24.80/29\"\ - ,\r\n \"51.105.9.128/27\",\r\n \"51.105.9.160/28\",\r\n\ - \ \"51.137.160.80/29\",\r\n \"51.144.56.96/27\",\r\n \ - \ \"51.144.56.128/26\",\r\n \"52.139.250.96/27\",\r\n \ - \ \"52.139.250.128/27\",\r\n \"52.140.232.160/27\",\r\n \ - \ \"52.140.232.192/28\",\r\n \"52.158.28.64/26\",\r\n \ - \ \"52.229.216.48/28\",\r\n \"52.229.216.64/27\",\r\n \ - \ \"191.233.26.64/28\",\r\n \"191.233.26.128/28\",\r\n \"\ - 191.233.26.176/28\",\r\n \"191.235.224.80/29\"\r\n ]\r\n \ - \ }\r\n },\r\n {\r\n \"name\": \"AppService\",\r\n \"\ - id\": \"AppService\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \"region\"\ - : \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n\ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \ - \ \"FW\",\r\n \"VSE\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.64.73.110/32\"\ - ,\r\n \"13.65.30.245/32\",\r\n \"13.65.37.122/32\",\r\n\ - \ \"13.65.39.165/32\",\r\n \"13.65.42.35/32\",\r\n \ - \ \"13.65.42.183/32\",\r\n \"13.65.45.30/32\",\r\n \"\ - 13.65.85.146/32\",\r\n \"13.65.89.91/32\",\r\n \"13.65.92.72/32\"\ - ,\r\n \"13.65.94.204/32\",\r\n \"13.65.95.109/32\",\r\n\ - \ \"13.65.97.243/32\",\r\n \"13.65.193.29/32\",\r\n \ - \ \"13.65.210.166/32\",\r\n \"13.65.212.252/32\",\r\n \ - \ \"13.65.241.130/32\",\r\n \"13.65.243.110/32\",\r\n \ - \ \"13.66.16.101/32\",\r\n \"13.66.38.99/32\",\r\n \"13.66.39.88/32\"\ - ,\r\n \"13.66.138.96/27\",\r\n \"13.66.209.135/32\",\r\n\ - \ \"13.66.212.205/32\",\r\n \"13.66.226.80/32\",\r\n \ - \ \"13.66.231.217/32\",\r\n \"13.66.241.134/32\",\r\n \ - \ \"13.66.244.249/32\",\r\n \"13.67.9.0/25\",\r\n \"\ - 13.67.56.225/32\",\r\n \"13.67.63.90/32\",\r\n \"13.67.129.26/32\"\ - ,\r\n \"13.67.141.98/32\",\r\n \"13.68.29.136/32\",\r\n\ - \ \"13.68.101.62/32\",\r\n \"13.69.68.0/23\",\r\n \ - \ \"13.69.186.152/32\",\r\n \"13.69.228.0/25\",\r\n \"\ - 13.69.253.145/32\",\r\n \"13.70.72.32/27\",\r\n \"13.70.123.149/32\"\ - ,\r\n \"13.70.146.110/32\",\r\n \"13.70.147.206/32\",\r\n\ - \ \"13.71.122.35/32\",\r\n \"13.71.123.138/32\",\r\n \ - \ \"13.71.149.151/32\",\r\n \"13.71.170.128/27\",\r\n \ - \ \"13.71.194.192/27\",\r\n \"13.73.1.134/32\",\r\n \ - \ \"13.73.26.73/32\",\r\n \"13.73.116.45/32\",\r\n \"13.73.118.104/32\"\ - ,\r\n \"13.74.41.233/32\",\r\n \"13.74.147.218/32\",\r\n\ - \ \"13.74.158.5/32\",\r\n \"13.74.252.44/32\",\r\n \ - \ \"13.75.34.160/27\",\r\n \"13.75.46.26/32\",\r\n \"\ - 13.75.47.15/32\",\r\n \"13.75.89.224/32\",\r\n \"13.75.112.108/32\"\ - ,\r\n \"13.75.115.40/32\",\r\n \"13.75.138.224/32\",\r\n\ - \ \"13.75.147.143/32\",\r\n \"13.75.147.201/32\",\r\n \ - \ \"13.75.218.45/32\",\r\n \"13.76.44.139/32\",\r\n \ - \ \"13.76.245.96/32\",\r\n \"13.77.7.175/32\",\r\n \"\ - 13.77.50.96/27\",\r\n \"13.77.82.141/32\",\r\n \"13.77.83.246/32\"\ - ,\r\n \"13.77.96.119/32\",\r\n \"13.77.157.133/32\",\r\n\ - \ \"13.77.160.237/32\",\r\n \"13.77.182.13/32\",\r\n \ - \ \"13.78.59.237/32\",\r\n \"13.78.106.96/27\",\r\n \ - \ \"13.78.117.86/32\",\r\n \"13.78.123.87/32\",\r\n \"\ - 13.78.150.96/32\",\r\n \"13.78.184.89/32\",\r\n \"13.79.2.71/32\"\ - ,\r\n \"13.79.38.229/32\",\r\n \"13.79.172.40/32\",\r\n\ - \ \"13.80.19.74/32\",\r\n \"13.81.7.21/32\",\r\n \ - \ \"13.81.108.99/32\",\r\n \"13.81.215.235/32\",\r\n \"\ - 13.82.93.245/32\",\r\n \"13.82.101.179/32\",\r\n \"13.82.175.96/32\"\ - ,\r\n \"13.84.36.2/32\",\r\n \"13.84.40.227/32\",\r\n \ - \ \"13.84.42.35/32\",\r\n \"13.84.46.29/32\",\r\n \ - \ \"13.84.55.137/32\",\r\n \"13.84.146.60/32\",\r\n \"\ - 13.84.180.32/32\",\r\n \"13.84.181.47/32\",\r\n \"13.84.188.162/32\"\ - ,\r\n \"13.84.189.137/32\",\r\n \"13.84.227.164/32\",\r\n\ - \ \"13.85.15.194/32\",\r\n \"13.85.16.224/32\",\r\n \ - \ \"13.85.20.144/32\",\r\n \"13.85.24.220/32\",\r\n \ - \ \"13.85.27.14/32\",\r\n \"13.85.31.243/32\",\r\n \"13.85.72.129/32\"\ - ,\r\n \"13.85.77.179/32\",\r\n \"13.85.82.0/32\",\r\n \ - \ \"13.89.57.7/32\",\r\n \"13.89.172.0/23\",\r\n \ - \ \"13.89.238.239/32\",\r\n \"13.90.143.69/32\",\r\n \"\ - 13.90.213.204/32\",\r\n \"13.91.40.166/32\",\r\n \"13.91.242.166/32\"\ - ,\r\n \"13.92.139.214/32\",\r\n \"13.92.193.110/32\",\r\n\ - \ \"13.92.237.218/32\",\r\n \"13.93.141.10/32\",\r\n \ - \ \"13.93.158.16/32\",\r\n \"13.93.220.109/32\",\r\n \ - \ \"13.93.231.75/32\",\r\n \"13.94.47.87/32\",\r\n \"\ - 13.94.143.57/32\",\r\n \"13.94.192.98/32\",\r\n \"13.94.211.38/32\"\ - ,\r\n \"13.95.82.181/32\",\r\n \"13.95.93.152/32\",\r\n\ - \ \"13.95.150.128/32\",\r\n \"13.95.238.192/32\",\r\n \ - \ \"20.21.52.0/24\",\r\n \"20.21.54.0/25\",\r\n \"\ - 20.21.54.128/27\",\r\n \"20.36.43.207/32\",\r\n \"20.36.72.230/32\"\ - ,\r\n \"20.36.106.96/27\",\r\n \"20.36.117.0/27\",\r\n \ - \ \"20.36.122.0/27\",\r\n \"20.37.66.0/27\",\r\n \ - \ \"20.37.74.96/27\",\r\n \"20.37.196.192/27\",\r\n \"\ - 20.37.226.0/27\",\r\n \"20.38.138.0/27\",\r\n \"20.38.146.160/27\"\ - ,\r\n \"20.39.11.104/29\",\r\n \"20.40.24.16/32\",\r\n \ - \ \"20.40.24.21/32\",\r\n \"20.40.24.23/32\",\r\n \ - \ \"20.40.24.30/31\",\r\n \"20.40.24.34/32\",\r\n \"20.40.24.37/32\"\ - ,\r\n \"20.40.24.38/31\",\r\n \"20.40.24.46/32\",\r\n \ - \ \"20.40.24.49/32\",\r\n \"20.40.24.50/31\",\r\n \ - \ \"20.40.24.54/31\",\r\n \"20.40.24.62/31\",\r\n \"20.40.24.81/32\"\ - ,\r\n \"20.40.24.89/32\",\r\n \"20.40.24.108/32\",\r\n \ - \ \"20.40.24.144/32\",\r\n \"20.40.202.0/23\",\r\n \ - \ \"20.41.66.224/27\",\r\n \"20.41.195.192/27\",\r\n \ - \ \"20.42.26.252/32\",\r\n \"20.42.128.96/27\",\r\n \"20.42.228.160/27\"\ - ,\r\n \"20.43.43.32/27\",\r\n \"20.43.67.32/27\",\r\n \ - \ \"20.43.132.128/25\",\r\n \"20.44.2.32/27\",\r\n \ - \ \"20.44.26.160/27\",\r\n \"20.45.94.192/26\",\r\n \"\ - 20.45.95.0/26\",\r\n \"20.45.122.160/27\",\r\n \"20.45.196.16/29\"\ - ,\r\n \"20.49.82.32/27\",\r\n \"20.49.90.32/27\",\r\n \ - \ \"20.49.97.0/25\",\r\n \"20.49.104.0/25\",\r\n \ - \ \"20.50.2.0/23\",\r\n \"20.50.64.0/25\",\r\n \"20.53.52.192/27\"\ - ,\r\n \"20.53.53.0/25\",\r\n \"20.53.60.96/27\",\r\n \ - \ \"20.53.61.0/25\",\r\n \"20.72.26.32/27\",\r\n \"\ - 20.91.8.64/27\",\r\n \"20.91.8.128/25\",\r\n \"20.99.14.0/24\"\ - ,\r\n \"20.99.24.128/25\",\r\n \"20.150.128.0/24\",\r\n\ - \ \"20.150.170.192/27\",\r\n \"20.150.178.160/27\",\r\n\ - \ \"20.150.186.160/27\",\r\n \"20.150.247.0/24\",\r\n \ - \ \"20.150.248.7/32\",\r\n \"20.150.248.8/32\",\r\n \ - \ \"20.150.248.12/31\",\r\n \"20.150.248.15/32\",\r\n \ - \ \"20.150.248.16/28\",\r\n \"20.150.248.32/31\",\r\n \"\ - 20.150.248.36/32\",\r\n \"20.150.248.38/31\",\r\n \"20.150.248.43/32\"\ - ,\r\n \"20.150.248.44/31\",\r\n \"20.150.248.48/29\",\r\n\ - \ \"20.150.248.56/32\",\r\n \"20.150.248.59/32\",\r\n \ - \ \"20.150.248.60/32\",\r\n \"20.150.248.63/32\",\r\n \ - \ \"20.150.248.64/31\",\r\n \"20.150.248.68/31\",\r\n \ - \ \"20.150.248.71/32\",\r\n \"20.150.248.72/29\",\r\n \ - \ \"20.150.248.80/32\",\r\n \"20.150.248.82/31\",\r\n \"\ - 20.150.248.86/31\",\r\n \"20.150.248.89/32\",\r\n \"20.150.248.90/31\"\ - ,\r\n \"20.150.248.100/31\",\r\n \"20.150.248.104/31\",\r\ - \n \"20.150.248.110/31\",\r\n \"20.150.248.112/30\",\r\n\ - \ \"20.150.248.118/31\",\r\n \"20.150.248.122/31\",\r\n\ - \ \"20.150.248.124/31\",\r\n \"20.150.248.128/31\",\r\n\ - \ \"20.150.248.134/31\",\r\n \"20.150.248.136/29\",\r\n\ - \ \"20.150.248.144/28\",\r\n \"20.150.248.160/27\",\r\n\ - \ \"20.150.248.192/29\",\r\n \"20.150.248.200/32\",\r\n\ - \ \"20.150.248.202/31\",\r\n \"20.188.98.74/32\",\r\n \ - \ \"20.189.104.96/27\",\r\n \"20.189.109.96/27\",\r\n \ - \ \"20.189.112.66/32\",\r\n \"20.192.54.0/24\",\r\n \ - \ \"20.192.98.160/27\",\r\n \"20.192.234.128/27\",\r\n \ - \ \"20.193.198.0/24\",\r\n \"20.193.202.128/27\",\r\n \"\ - 20.194.66.32/27\",\r\n \"20.199.200.0/26\",\r\n \"20.205.66.0/24\"\ - ,\r\n \"20.207.0.96/27\",\r\n \"20.207.0.128/25\",\r\n \ - \ \"20.208.1.0/24\",\r\n \"23.96.0.52/32\",\r\n \ - \ \"23.96.1.109/32\",\r\n \"23.96.13.243/32\",\r\n \"23.96.32.128/32\"\ - ,\r\n \"23.96.96.142/32\",\r\n \"23.96.103.159/32\",\r\n\ - \ \"23.96.112.53/32\",\r\n \"23.96.113.128/32\",\r\n \ - \ \"23.96.124.25/32\",\r\n \"23.96.187.5/32\",\r\n \ - \ \"23.96.201.21/32\",\r\n \"23.96.207.177/32\",\r\n \"\ - 23.96.209.155/32\",\r\n \"23.96.220.116/32\",\r\n \"23.97.56.169/32\"\ - ,\r\n \"23.97.79.119/32\",\r\n \"23.97.96.32/32\",\r\n \ - \ \"23.97.160.56/32\",\r\n \"23.97.160.74/32\",\r\n \ - \ \"23.97.162.202/32\",\r\n \"23.97.195.129/32\",\r\n \ - \ \"23.97.208.18/32\",\r\n \"23.97.214.177/32\",\r\n \"\ - 23.97.216.47/32\",\r\n \"23.97.224.11/32\",\r\n \"23.98.64.36/32\"\ - ,\r\n \"23.98.64.158/32\",\r\n \"23.99.0.12/32\",\r\n \ - \ \"23.99.65.65/32\",\r\n \"23.99.91.55/32\",\r\n \ - \ \"23.99.110.192/32\",\r\n \"23.99.116.70/32\",\r\n \"\ - 23.99.128.52/32\",\r\n \"23.99.183.149/32\",\r\n \"23.99.192.132/32\"\ - ,\r\n \"23.99.196.180/32\",\r\n \"23.99.206.151/32\",\r\n\ - \ \"23.99.224.56/32\",\r\n \"23.100.1.29/32\",\r\n \ - \ \"23.100.46.198/32\",\r\n \"23.100.48.106/32\",\r\n \ - \ \"23.100.50.51/32\",\r\n \"23.100.52.22/32\",\r\n \"\ - 23.100.56.27/32\",\r\n \"23.100.72.240/32\",\r\n \"23.100.82.11/32\"\ - ,\r\n \"23.100.216.96/27\",\r\n \"23.100.216.128/25\",\r\ - \n \"23.101.10.141/32\",\r\n \"23.101.27.182/32\",\r\n \ - \ \"23.101.54.230/32\",\r\n \"23.101.63.214/32\",\r\n \ - \ \"23.101.67.245/32\",\r\n \"23.101.118.145/32\",\r\n \ - \ \"23.101.119.44/32\",\r\n \"23.101.119.163/32\",\r\n \ - \ \"23.101.120.195/32\",\r\n \"23.101.125.65/32\",\r\n \ - \ \"23.101.147.117/32\",\r\n \"23.101.169.175/32\",\r\n \ - \ \"23.101.171.94/32\",\r\n \"23.101.172.244/32\",\r\n \ - \ \"23.101.180.75/32\",\r\n \"23.101.203.117/32\",\r\n \ - \ \"23.101.203.214/32\",\r\n \"23.101.207.250/32\",\r\n \ - \ \"23.101.208.52/32\",\r\n \"23.101.224.24/32\",\r\n \"\ - 23.101.230.162/32\",\r\n \"23.102.12.43/32\",\r\n \"23.102.21.198/32\"\ - ,\r\n \"23.102.21.212/32\",\r\n \"23.102.25.149/32\",\r\n\ - \ \"23.102.28.178/32\",\r\n \"23.102.154.38/32\",\r\n \ - \ \"23.102.161.217/32\",\r\n \"23.102.191.170/32\",\r\n \ - \ \"40.64.8.224/27\",\r\n \"40.64.9.0/25\",\r\n \"\ - 40.64.10.0/25\",\r\n \"40.64.10.128/27\",\r\n \"40.64.128.224/27\"\ - ,\r\n \"40.67.58.192/27\",\r\n \"40.68.40.55/32\",\r\n \ - \ \"40.68.205.178/32\",\r\n \"40.68.208.131/32\",\r\n \ - \ \"40.68.210.104/32\",\r\n \"40.68.214.185/32\",\r\n \ - \ \"40.69.43.225/32\",\r\n \"40.69.88.149/32\",\r\n \ - \ \"40.69.106.96/27\",\r\n \"40.69.190.41/32\",\r\n \"40.69.200.124/32\"\ - ,\r\n \"40.69.210.172/32\",\r\n \"40.69.218.150/32\",\r\n\ - \ \"40.70.27.35/32\",\r\n \"40.70.147.0/25\",\r\n \ - \ \"40.71.0.179/32\",\r\n \"40.71.11.128/25\",\r\n \"\ - 40.71.177.34/32\",\r\n \"40.71.199.117/32\",\r\n \"40.71.234.254/32\"\ - ,\r\n \"40.71.250.191/32\",\r\n \"40.74.100.128/27\",\r\n\ - \ \"40.74.133.20/32\",\r\n \"40.74.245.188/32\",\r\n \ - \ \"40.74.253.108/32\",\r\n \"40.74.255.112/32\",\r\n \ - \ \"40.76.5.137/32\",\r\n \"40.76.192.15/32\",\r\n \"\ - 40.76.210.54/32\",\r\n \"40.76.218.33/32\",\r\n \"40.76.223.101/32\"\ - ,\r\n \"40.77.56.174/32\",\r\n \"40.78.18.232/32\",\r\n\ - \ \"40.78.25.157/32\",\r\n \"40.78.48.219/32\",\r\n \ - \ \"40.78.194.96/27\",\r\n \"40.78.204.160/27\",\r\n \ - \ \"40.79.65.200/32\",\r\n \"40.79.130.128/27\",\r\n \"\ - 40.79.154.192/27\",\r\n \"40.79.163.160/27\",\r\n \"40.79.171.64/27\"\ - ,\r\n \"40.79.178.96/27\",\r\n \"40.79.195.0/27\",\r\n \ - \ \"40.80.50.160/27\",\r\n \"40.80.58.224/27\",\r\n \ - \ \"40.80.155.102/32\",\r\n \"40.80.156.205/32\",\r\n \ - \ \"40.80.170.224/27\",\r\n \"40.80.191.0/25\",\r\n \"\ - 40.82.191.84/32\",\r\n \"40.82.217.93/32\",\r\n \"40.82.255.128/25\"\ - ,\r\n \"40.83.16.172/32\",\r\n \"40.83.72.59/32\",\r\n \ - \ \"40.83.124.73/32\",\r\n \"40.83.145.50/32\",\r\n \ - \ \"40.83.150.233/32\",\r\n \"40.83.182.206/32\",\r\n \ - \ \"40.83.183.236/32\",\r\n \"40.83.184.25/32\",\r\n \"\ - 40.84.54.203/32\",\r\n \"40.84.59.174/32\",\r\n \"40.84.148.247/32\"\ - ,\r\n \"40.84.159.58/32\",\r\n \"40.84.194.106/32\",\r\n\ - \ \"40.84.226.176/32\",\r\n \"40.84.227.180/32\",\r\n \ - \ \"40.84.232.28/32\",\r\n \"40.85.74.227/32\",\r\n \ - \ \"40.85.92.115/32\",\r\n \"40.85.96.208/32\",\r\n \"\ - 40.85.190.10/32\",\r\n \"40.85.212.173/32\",\r\n \"40.85.230.182/32\"\ - ,\r\n \"40.86.86.144/32\",\r\n \"40.86.91.212/32\",\r\n\ - \ \"40.86.96.177/32\",\r\n \"40.86.99.202/32\",\r\n \ - \ \"40.86.225.89/32\",\r\n \"40.86.230.96/32\",\r\n \ - \ \"40.87.65.131/32\",\r\n \"40.87.70.95/32\",\r\n \"40.89.19.0/27\"\ - ,\r\n \"40.89.131.148/32\",\r\n \"40.89.141.103/32\",\r\n\ - \ \"40.112.69.156/32\",\r\n \"40.112.90.244/32\",\r\n \ - \ \"40.112.93.201/32\",\r\n \"40.112.142.148/32\",\r\n \ - \ \"40.112.143.134/32\",\r\n \"40.112.143.140/32\",\r\n \ - \ \"40.112.143.214/32\",\r\n \"40.112.165.44/32\",\r\n \ - \ \"40.112.166.161/32\",\r\n \"40.112.191.159/32\",\r\n \ - \ \"40.112.192.69/32\",\r\n \"40.112.216.189/32\",\r\n \ - \ \"40.112.243.0/25\",\r\n \"40.113.2.52/32\",\r\n \"\ - 40.113.65.9/32\",\r\n \"40.113.71.148/32\",\r\n \"40.113.81.82/32\"\ - ,\r\n \"40.113.90.202/32\",\r\n \"40.113.126.251/32\",\r\ - \n \"40.113.131.37/32\",\r\n \"40.113.136.240/32\",\r\n\ - \ \"40.113.142.219/32\",\r\n \"40.113.204.88/32\",\r\n \ - \ \"40.113.232.243/32\",\r\n \"40.113.236.45/32\",\r\n \ - \ \"40.114.13.25/32\",\r\n \"40.114.41.245/32\",\r\n \ - \ \"40.114.51.68/32\",\r\n \"40.114.68.21/32\",\r\n \ - \ \"40.114.106.25/32\",\r\n \"40.114.194.188/32\",\r\n \"\ - 40.114.210.78/32\",\r\n \"40.114.228.161/32\",\r\n \"40.114.237.65/32\"\ - ,\r\n \"40.114.243.70/32\",\r\n \"40.115.55.251/32\",\r\n\ - \ \"40.115.98.85/32\",\r\n \"40.115.179.121/32\",\r\n \ - \ \"40.115.251.148/32\",\r\n \"40.117.154.240/32\",\r\n \ - \ \"40.117.188.126/32\",\r\n \"40.117.190.72/32\",\r\n \ - \ \"40.118.29.72/32\",\r\n \"40.118.71.240/32\",\r\n \ - \ \"40.118.96.231/32\",\r\n \"40.118.100.127/32\",\r\n \ - \ \"40.118.101.67/32\",\r\n \"40.118.102.46/32\",\r\n \ - \ \"40.118.185.161/32\",\r\n \"40.118.235.113/32\",\r\n \ - \ \"40.118.246.51/32\",\r\n \"40.118.255.59/32\",\r\n \"\ - 40.119.12.0/23\",\r\n \"40.120.74.32/27\",\r\n \"40.121.8.241/32\"\ - ,\r\n \"40.121.16.193/32\",\r\n \"40.121.32.232/32\",\r\n\ - \ \"40.121.35.221/32\",\r\n \"40.121.91.199/32\",\r\n \ - \ \"40.121.212.165/32\",\r\n \"40.121.221.52/32\",\r\n \ - \ \"40.122.36.65/32\",\r\n \"40.122.65.162/32\",\r\n \ - \ \"40.122.110.154/32\",\r\n \"40.122.114.229/32\",\r\n \ - \ \"40.123.45.47/32\",\r\n \"40.123.47.58/32\",\r\n \"\ - 40.124.12.75/32\",\r\n \"40.124.13.58/32\",\r\n \"40.126.227.158/32\"\ - ,\r\n \"40.126.236.22/32\",\r\n \"40.126.242.59/32\",\r\n\ - \ \"40.126.245.169/32\",\r\n \"40.127.132.204/32\",\r\n\ - \ \"40.127.139.252/32\",\r\n \"40.127.192.244/32\",\r\n\ - \ \"40.127.196.56/32\",\r\n \"51.12.23.0/24\",\r\n \ - \ \"51.12.31.0/24\",\r\n \"51.12.73.224/27\",\r\n \"\ - 51.12.74.0/25\",\r\n \"51.12.98.192/27\",\r\n \"51.12.202.192/27\"\ - ,\r\n \"51.12.226.160/27\",\r\n \"51.12.234.160/27\",\r\n\ - \ \"51.13.142.128/25\",\r\n \"51.13.143.64/27\",\r\n \ - \ \"51.13.143.128/25\",\r\n \"51.104.28.64/26\",\r\n \ - \ \"51.105.66.160/27\",\r\n \"51.105.74.160/27\",\r\n \ - \ \"51.105.90.32/27\",\r\n \"51.105.172.25/32\",\r\n \"\ - 51.107.50.0/27\",\r\n \"51.107.58.160/27\",\r\n \"51.107.146.0/27\"\ - ,\r\n \"51.107.154.160/27\",\r\n \"51.107.255.192/26\",\r\ - \n \"51.116.49.32/27\",\r\n \"51.116.58.160/27\",\r\n \ - \ \"51.116.145.32/27\",\r\n \"51.116.154.224/27\",\r\n \ - \ \"51.116.242.160/27\",\r\n \"51.116.250.160/27\",\r\n \ - \ \"51.120.42.0/27\",\r\n \"51.120.98.192/27\",\r\n \ - \ \"51.120.106.160/27\",\r\n \"51.120.210.160/27\",\r\n \ - \ \"51.120.218.192/27\",\r\n \"51.120.226.0/27\",\r\n \ - \ \"51.136.14.31/32\",\r\n \"51.137.106.13/32\",\r\n \"\ - 51.137.163.32/27\",\r\n \"51.140.37.241/32\",\r\n \"51.140.57.176/32\"\ - ,\r\n \"51.140.59.233/32\",\r\n \"51.140.75.147/32\",\r\n\ - \ \"51.140.84.145/32\",\r\n \"51.140.85.106/32\",\r\n \ - \ \"51.140.87.39/32\",\r\n \"51.140.122.226/32\",\r\n \ - \ \"51.140.146.128/26\",\r\n \"51.140.152.154/32\",\r\n \ - \ \"51.140.153.150/32\",\r\n \"51.140.180.76/32\",\r\n \ - \ \"51.140.185.151/32\",\r\n \"51.140.191.223/32\",\r\n \ - \ \"51.140.210.96/27\",\r\n \"51.140.244.162/32\",\r\n \ - \ \"51.140.245.89/32\",\r\n \"51.141.12.112/32\",\r\n \ - \ \"51.141.37.245/32\",\r\n \"51.141.44.139/32\",\r\n \"\ - 51.141.45.207/32\",\r\n \"51.141.90.252/32\",\r\n \"51.143.102.21/32\"\ - ,\r\n \"51.143.191.44/32\",\r\n \"51.144.7.192/32\",\r\n\ - \ \"51.144.107.53/32\",\r\n \"51.144.116.43/32\",\r\n \ - \ \"51.144.164.215/32\",\r\n \"51.144.182.8/32\",\r\n \ - \ \"52.136.50.0/27\",\r\n \"52.136.138.55/32\",\r\n \ - \ \"52.136.190.0/25\",\r\n \"52.136.190.128/27\",\r\n \"\ - 52.138.196.70/32\",\r\n \"52.138.218.121/32\",\r\n \"52.140.106.224/27\"\ - ,\r\n \"52.143.137.150/32\",\r\n \"52.147.117.224/27\",\r\ - \n \"52.147.118.128/25\",\r\n \"52.147.119.64/27\",\r\n\ - \ \"52.147.119.128/25\",\r\n \"52.150.140.224/27\",\r\n\ - \ \"52.151.62.51/32\",\r\n \"52.160.40.218/32\",\r\n \ - \ \"52.161.96.193/32\",\r\n \"52.162.208.73/32\",\r\n \ - \ \"52.163.122.160/32\",\r\n \"52.164.201.186/32\",\r\n \ - \ \"52.164.250.133/32\",\r\n \"52.165.129.203/32\",\r\n \ - \ \"52.165.135.234/32\",\r\n \"52.165.155.12/32\",\r\n \ - \ \"52.165.155.237/32\",\r\n \"52.165.163.223/32\",\r\n \ - \ \"52.165.168.40/32\",\r\n \"52.165.174.123/32\",\r\n \ - \ \"52.165.184.170/32\",\r\n \"52.165.220.33/32\",\r\n \ - \ \"52.165.224.81/32\",\r\n \"52.165.237.15/32\",\r\n \"\ - 52.166.78.97/32\",\r\n \"52.166.113.188/32\",\r\n \"52.166.119.99/32\"\ - ,\r\n \"52.166.178.208/32\",\r\n \"52.166.181.85/32\",\r\ - \n \"52.166.198.163/32\",\r\n \"52.168.125.188/32\",\r\n\ - \ \"52.169.73.236/32\",\r\n \"52.169.78.163/32\",\r\n \ - \ \"52.169.180.223/32\",\r\n \"52.169.184.163/32\",\r\n \ - \ \"52.169.188.236/32\",\r\n \"52.169.191.40/32\",\r\n \ - \ \"52.170.7.25/32\",\r\n \"52.170.46.174/32\",\r\n \ - \ \"52.171.56.101/32\",\r\n \"52.171.56.110/32\",\r\n \ - \ \"52.171.136.200/32\",\r\n \"52.171.140.237/32\",\r\n \ - \ \"52.171.218.239/32\",\r\n \"52.171.221.170/32\",\r\n \ - \ \"52.171.222.247/32\",\r\n \"52.172.54.225/32\",\r\n \"\ - 52.172.195.80/32\",\r\n \"52.172.204.196/32\",\r\n \"52.172.219.121/32\"\ - ,\r\n \"52.173.28.95/32\",\r\n \"52.173.36.83/32\",\r\n\ - \ \"52.173.76.33/32\",\r\n \"52.173.77.140/32\",\r\n \ - \ \"52.173.83.49/32\",\r\n \"52.173.84.157/32\",\r\n \ - \ \"52.173.87.130/32\",\r\n \"52.173.94.173/32\",\r\n \ - \ \"52.173.134.115/32\",\r\n \"52.173.139.99/32\",\r\n \ - \ \"52.173.139.125/32\",\r\n \"52.173.149.254/32\",\r\n \ - \ \"52.173.151.229/32\",\r\n \"52.173.184.147/32\",\r\n \ - \ \"52.173.245.249/32\",\r\n \"52.173.249.137/32\",\r\n \ - \ \"52.174.3.80/32\",\r\n \"52.174.7.133/32\",\r\n \"52.174.35.5/32\"\ - ,\r\n \"52.174.106.15/32\",\r\n \"52.174.150.25/32\",\r\n\ - \ \"52.174.181.178/32\",\r\n \"52.174.184.18/32\",\r\n \ - \ \"52.174.193.210/32\",\r\n \"52.174.235.29/32\",\r\n \ - \ \"52.175.158.219/32\",\r\n \"52.175.202.25/32\",\r\n \ - \ \"52.175.254.10/32\",\r\n \"52.176.2.229/32\",\r\n \ - \ \"52.176.5.241/32\",\r\n \"52.176.6.0/32\",\r\n \"\ - 52.176.6.37/32\",\r\n \"52.176.61.128/32\",\r\n \"52.176.104.120/32\"\ - ,\r\n \"52.176.149.197/32\",\r\n \"52.176.165.69/32\",\r\ - \n \"52.177.169.150/32\",\r\n \"52.177.189.138/32\",\r\n\ - \ \"52.177.206.73/32\",\r\n \"52.178.29.39/32\",\r\n \ - \ \"52.178.37.244/32\",\r\n \"52.178.43.209/32\",\r\n \ - \ \"52.178.45.139/32\",\r\n \"52.178.46.181/32\",\r\n \ - \ \"52.178.75.200/32\",\r\n \"52.178.79.163/32\",\r\n \ - \ \"52.178.89.129/32\",\r\n \"52.178.90.230/32\",\r\n \"\ - 52.178.92.96/32\",\r\n \"52.178.105.179/32\",\r\n \"52.178.114.226/32\"\ - ,\r\n \"52.178.158.175/32\",\r\n \"52.178.164.235/32\",\r\ - \n \"52.178.179.169/32\",\r\n \"52.178.190.191/32\",\r\n\ - \ \"52.178.201.147/32\",\r\n \"52.178.208.12/32\",\r\n \ - \ \"52.178.212.17/32\",\r\n \"52.178.214.89/32\",\r\n \ - \ \"52.179.97.15/32\",\r\n \"52.179.188.206/32\",\r\n \ - \ \"52.180.178.6/32\",\r\n \"52.180.183.66/32\",\r\n \ - \ \"52.183.82.125/32\",\r\n \"52.184.162.135/32\",\r\n \ - \ \"52.184.193.103/32\",\r\n \"52.184.193.104/32\",\r\n \ - \ \"52.187.17.126/32\",\r\n \"52.187.36.104/32\",\r\n \"\ - 52.187.52.94/32\",\r\n \"52.187.135.79/32\",\r\n \"52.187.206.243/32\"\ - ,\r\n \"52.187.229.23/32\",\r\n \"52.189.213.49/32\",\r\n\ - \ \"52.225.179.39/32\",\r\n \"52.225.190.65/32\",\r\n \ - \ \"52.226.134.64/32\",\r\n \"52.228.42.76/32\",\r\n \ - \ \"52.228.84.32/27\",\r\n \"52.228.121.123/32\",\r\n \ - \ \"52.229.30.210/32\",\r\n \"52.229.115.84/32\",\r\n \ - \ \"52.230.1.186/32\",\r\n \"52.231.18.128/27\",\r\n \"\ - 52.231.32.120/32\",\r\n \"52.231.38.95/32\",\r\n \"52.231.77.58/32\"\ - ,\r\n \"52.231.146.96/27\",\r\n \"52.231.200.101/32\",\r\ - \n \"52.231.200.179/32\",\r\n \"52.232.19.237/32\",\r\n\ - \ \"52.232.26.228/32\",\r\n \"52.232.33.202/32\",\r\n \ - \ \"52.232.56.79/32\",\r\n \"52.232.127.196/32\",\r\n \ - \ \"52.233.38.143/32\",\r\n \"52.233.128.61/32\",\r\n \ - \ \"52.233.133.18/32\",\r\n \"52.233.133.121/32\",\r\n \ - \ \"52.233.155.168/32\",\r\n \"52.233.164.195/32\",\r\n \ - \ \"52.233.175.59/32\",\r\n \"52.233.184.181/32\",\r\n \ - \ \"52.233.198.206/32\",\r\n \"52.234.209.94/32\",\r\n \ - \ \"52.237.18.220/32\",\r\n \"52.237.22.139/32\",\r\n \"\ - 52.237.130.0/32\",\r\n \"52.237.205.163/32\",\r\n \"52.237.214.221/32\"\ - ,\r\n \"52.237.246.162/32\",\r\n \"52.240.149.243/32\",\r\ - \n \"52.240.155.58/32\",\r\n \"52.242.22.213/32\",\r\n \ - \ \"52.242.27.213/32\",\r\n \"52.243.39.89/32\",\r\n \ - \ \"52.246.154.160/27\",\r\n \"52.252.160.21/32\",\r\n \ - \ \"52.253.224.223/32\",\r\n \"52.255.35.249/32\",\r\n \ - \ \"52.255.54.134/32\",\r\n \"65.52.24.41/32\",\r\n \"\ - 65.52.128.33/32\",\r\n \"65.52.130.1/32\",\r\n \"65.52.160.119/32\"\ - ,\r\n \"65.52.168.70/32\",\r\n \"65.52.213.73/32\",\r\n\ - \ \"65.52.217.59/32\",\r\n \"65.52.218.253/32\",\r\n \ - \ \"65.52.250.96/27\",\r\n \"94.245.104.73/32\",\r\n \ - \ \"102.37.86.64/26\",\r\n \"102.37.86.128/26\",\r\n \ - \ \"102.133.26.32/27\",\r\n \"102.133.57.128/27\",\r\n \"\ - 102.133.122.160/27\",\r\n \"102.133.154.32/27\",\r\n \"\ - 102.133.218.32/28\",\r\n \"102.133.250.160/27\",\r\n \"\ - 104.40.3.53/32\",\r\n \"104.40.11.192/32\",\r\n \"104.40.28.133/32\"\ - ,\r\n \"104.40.53.219/32\",\r\n \"104.40.63.98/32\",\r\n\ - \ \"104.40.84.133/32\",\r\n \"104.40.92.107/32\",\r\n \ - \ \"104.40.129.89/32\",\r\n \"104.40.147.180/32\",\r\n \ - \ \"104.40.147.216/32\",\r\n \"104.40.158.55/32\",\r\n \ - \ \"104.40.179.243/32\",\r\n \"104.40.183.236/32\",\r\n \ - \ \"104.40.185.192/32\",\r\n \"104.40.187.26/32\",\r\n \ - \ \"104.40.191.174/32\",\r\n \"104.40.210.25/32\",\r\n \ - \ \"104.40.215.219/32\",\r\n \"104.40.222.81/32\",\r\n \ - \ \"104.40.250.100/32\",\r\n \"104.41.9.139/32\",\r\n \ - \ \"104.41.13.179/32\",\r\n \"104.41.63.108/32\",\r\n \"\ - 104.41.186.103/32\",\r\n \"104.41.216.137/32\",\r\n \"104.41.229.199/32\"\ - ,\r\n \"104.42.53.248/32\",\r\n \"104.42.78.153/32\",\r\n\ - \ \"104.42.128.171/32\",\r\n \"104.42.148.55/32\",\r\n \ - \ \"104.42.152.64/32\",\r\n \"104.42.154.105/32\",\r\n \ - \ \"104.42.188.146/32\",\r\n \"104.42.231.5/32\",\r\n \ - \ \"104.43.129.105/32\",\r\n \"104.43.140.101/32\",\r\n \ - \ \"104.43.142.33/32\",\r\n \"104.43.221.31/32\",\r\n \ - \ \"104.43.246.71/32\",\r\n \"104.43.254.102/32\",\r\n \ - \ \"104.44.128.13/32\",\r\n \"104.44.130.38/32\",\r\n \ - \ \"104.45.1.117/32\",\r\n \"104.45.14.249/32\",\r\n \"\ - 104.45.81.79/32\",\r\n \"104.45.95.61/32\",\r\n \"104.45.129.178/32\"\ - ,\r\n \"104.45.141.247/32\",\r\n \"104.45.152.13/32\",\r\ - \n \"104.45.152.60/32\",\r\n \"104.45.154.200/32\",\r\n\ - \ \"104.45.226.98/32\",\r\n \"104.45.231.79/32\",\r\n \ - \ \"104.46.38.245/32\",\r\n \"104.46.44.78/32\",\r\n \ - \ \"104.46.61.116/32\",\r\n \"104.46.101.59/32\",\r\n \ - \ \"104.47.137.62/32\",\r\n \"104.47.151.115/32\",\r\n \ - \ \"104.47.160.14/32\",\r\n \"104.47.164.119/32\",\r\n \ - \ \"104.208.48.107/32\",\r\n \"104.209.178.67/32\",\r\n \ - \ \"104.209.192.206/32\",\r\n \"104.209.197.87/32\",\r\n \ - \ \"104.210.38.149/32\",\r\n \"104.210.69.241/32\",\r\n \ - \ \"104.210.92.71/32\",\r\n \"104.210.145.181/32\",\r\n \ - \ \"104.210.147.57/32\",\r\n \"104.210.152.76/32\",\r\n \ - \ \"104.210.152.122/32\",\r\n \"104.210.153.116/32\",\r\n \ - \ \"104.210.158.20/32\",\r\n \"104.211.26.212/32\",\r\n \ - \ \"104.211.81.32/27\",\r\n \"104.211.97.138/32\",\r\n \ - \ \"104.211.146.96/27\",\r\n \"104.211.160.159/32\",\r\n \ - \ \"104.211.179.11/32\",\r\n \"104.211.184.197/32\",\r\n \ - \ \"104.211.224.252/32\",\r\n \"104.211.225.167/32\",\r\n \ - \ \"104.214.20.0/23\",\r\n \"104.214.29.203/32\",\r\n \ - \ \"104.214.64.238/32\",\r\n \"104.214.74.110/32\",\r\n \ - \ \"104.214.77.221/32\",\r\n \"104.214.110.60/32\",\r\n \ - \ \"104.214.110.226/32\",\r\n \"104.214.118.174/32\",\r\n \ - \ \"104.214.119.36/32\",\r\n \"104.214.137.236/32\",\r\n \ - \ \"104.214.231.110/32\",\r\n \"104.214.236.47/32\",\r\n \ - \ \"104.214.237.135/32\",\r\n \"104.215.11.176/32\",\r\n\ - \ \"104.215.58.230/32\",\r\n \"104.215.73.236/32\",\r\n\ - \ \"104.215.78.13/32\",\r\n \"104.215.89.22/32\",\r\n \ - \ \"104.215.147.45/32\",\r\n \"104.215.155.1/32\",\r\n \ - \ \"111.221.95.27/32\",\r\n \"137.116.78.243/32\",\r\n \ - \ \"137.116.88.213/32\",\r\n \"137.116.128.188/32\",\r\n \ - \ \"137.116.153.238/32\",\r\n \"137.117.9.212/32\",\r\n \ - \ \"137.117.17.70/32\",\r\n \"137.117.58.204/32\",\r\n \ - \ \"137.117.66.167/32\",\r\n \"137.117.84.54/32\",\r\n \ - \ \"137.117.90.63/32\",\r\n \"137.117.93.87/32\",\r\n \ - \ \"137.117.166.35/32\",\r\n \"137.117.175.14/32\",\r\n \ - \ \"137.117.203.130/32\",\r\n \"137.117.211.244/32\",\r\n \ - \ \"137.117.218.101/32\",\r\n \"137.117.224.218/32\",\r\n \ - \ \"137.117.225.87/32\",\r\n \"137.135.91.176/32\",\r\n \ - \ \"137.135.107.235/32\",\r\n \"137.135.129.175/32\",\r\n \ - \ \"137.135.133.221/32\",\r\n \"138.91.0.30/32\",\r\n \ - \ \"138.91.16.18/32\",\r\n \"138.91.224.84/32\",\r\n \ - \ \"138.91.225.40/32\",\r\n \"138.91.240.81/32\",\r\n \ - \ \"157.56.13.114/32\",\r\n \"168.61.152.29/32\",\r\n \"\ - 168.61.159.114/32\",\r\n \"168.61.217.214/32\",\r\n \"168.61.218.125/32\"\ - ,\r\n \"168.62.20.37/32\",\r\n \"168.62.48.183/32\",\r\n\ - \ \"168.62.180.173/32\",\r\n \"168.62.224.13/32\",\r\n \ - \ \"168.62.225.23/32\",\r\n \"168.63.5.231/32\",\r\n \ - \ \"168.63.53.239/32\",\r\n \"168.63.107.5/32\",\r\n \ - \ \"191.232.38.77/32\",\r\n \"191.232.176.16/32\",\r\n \ - \ \"191.233.50.32/27\",\r\n \"191.233.82.44/32\",\r\n \"\ - 191.233.85.165/32\",\r\n \"191.233.87.194/32\",\r\n \"191.233.203.32/27\"\ - ,\r\n \"191.234.16.188/32\",\r\n \"191.234.146.160/27\"\ - ,\r\n \"191.234.154.160/27\",\r\n \"191.235.81.73/32\",\r\ - \n \"191.235.90.70/32\",\r\n \"191.235.160.13/32\",\r\n\ - \ \"191.235.176.12/32\",\r\n \"191.235.177.30/32\",\r\n\ - \ \"191.235.208.12/32\",\r\n \"191.235.215.184/32\",\r\n\ - \ \"191.235.228.32/27\",\r\n \"191.236.16.12/32\",\r\n \ - \ \"191.236.59.67/32\",\r\n \"191.236.80.12/32\",\r\n \ - \ \"191.236.106.123/32\",\r\n \"191.236.148.9/32\",\r\n \ - \ \"191.236.192.121/32\",\r\n \"191.237.24.89/32\",\r\n \ - \ \"191.237.27.74/32\",\r\n \"191.237.128.238/32\",\r\n \ - \ \"191.238.8.26/32\",\r\n \"191.238.33.50/32\",\r\n \ - \ \"191.238.176.139/32\",\r\n \"191.238.240.12/32\",\r\n \ - \ \"191.239.58.162/32\",\r\n \"191.239.188.11/32\",\r\n \ - \ \"207.46.144.49/32\",\r\n \"207.46.147.148/32\",\r\n \ - \ \"2603:1000:4:402::a0/123\",\r\n \"2603:1000:104:402::a0/123\"\ - ,\r\n \"2603:1000:104:802::a0/123\",\r\n \"2603:1000:104:c02::a0/123\"\ - ,\r\n \"2603:1010:6:402::a0/123\",\r\n \"2603:1010:6:802::a0/123\"\ - ,\r\n \"2603:1010:6:c02::a0/123\",\r\n \"2603:1010:101:402::a0/123\"\ - ,\r\n \"2603:1010:304:402::a0/123\",\r\n \"2603:1010:404:402::a0/123\"\ - ,\r\n \"2603:1020:5:402::a0/123\",\r\n \"2603:1020:5:802::a0/123\"\ - ,\r\n \"2603:1020:5:c02::a0/123\",\r\n \"2603:1020:206:402::a0/123\"\ - ,\r\n \"2603:1020:206:802::a0/123\",\r\n \"2603:1020:206:c02::a0/123\"\ - ,\r\n \"2603:1020:305:402::a0/123\",\r\n \"2603:1020:405:402::a0/123\"\ - ,\r\n \"2603:1020:605:402::a0/123\",\r\n \"2603:1020:705:402::a0/123\"\ - ,\r\n \"2603:1020:705:802::a0/123\",\r\n \"2603:1020:705:c02::a0/123\"\ - ,\r\n \"2603:1020:805:402::a0/123\",\r\n \"2603:1020:805:802::a0/123\"\ - ,\r\n \"2603:1020:805:c02::a0/123\",\r\n \"2603:1020:905:402::a0/123\"\ - ,\r\n \"2603:1020:a04:3::100/120\",\r\n \"2603:1020:a04:402::a0/123\"\ - ,\r\n \"2603:1020:a04:802::a0/123\",\r\n \"2603:1020:a04:c02::a0/123\"\ - ,\r\n \"2603:1020:b04:402::a0/123\",\r\n \"2603:1020:c04:402::a0/123\"\ - ,\r\n \"2603:1020:c04:802::a0/123\",\r\n \"2603:1020:c04:c02::a0/123\"\ - ,\r\n \"2603:1020:d04:402::a0/123\",\r\n \"2603:1020:e04:402::a0/123\"\ - ,\r\n \"2603:1020:e04:802::a0/123\",\r\n \"2603:1020:e04:c02::a0/123\"\ - ,\r\n \"2603:1020:f04:402::a0/123\",\r\n \"2603:1020:1004:2::500/120\"\ - ,\r\n \"2603:1020:1004:400::a0/123\",\r\n \"2603:1020:1004:800::160/123\"\ - ,\r\n \"2603:1020:1004:800::360/123\",\r\n \"2603:1020:1104:400::a0/123\"\ - ,\r\n \"2603:1030:f:400::8a0/123\",\r\n \"2603:1030:10:402::a0/123\"\ - ,\r\n \"2603:1030:10:802::a0/123\",\r\n \"2603:1030:10:c02::a0/123\"\ - ,\r\n \"2603:1030:104:2::100/120\",\r\n \"2603:1030:104:402::a0/123\"\ - ,\r\n \"2603:1030:107:400::20/123\",\r\n \"2603:1030:210:402::a0/123\"\ - ,\r\n \"2603:1030:210:802::a0/123\",\r\n \"2603:1030:210:c02::a0/123\"\ - ,\r\n \"2603:1030:40b:400::8a0/123\",\r\n \"2603:1030:40b:800::a0/123\"\ - ,\r\n \"2603:1030:40b:c00::a0/123\",\r\n \"2603:1030:40c:402::a0/123\"\ - ,\r\n \"2603:1030:40c:802::a0/123\",\r\n \"2603:1030:40c:c02::a0/123\"\ - ,\r\n \"2603:1030:504:402::a0/123\",\r\n \"2603:1030:504:802::160/123\"\ - ,\r\n \"2603:1030:504:802::360/123\",\r\n \"2603:1030:504:c02::3a0/123\"\ - ,\r\n \"2603:1030:608:402::a0/123\",\r\n \"2603:1030:807:402::a0/123\"\ - ,\r\n \"2603:1030:807:802::a0/123\",\r\n \"2603:1030:807:c02::a0/123\"\ - ,\r\n \"2603:1030:a07:402::a0/123\",\r\n \"2603:1030:b04:402::a0/123\"\ - ,\r\n \"2603:1030:c06:400::8a0/123\",\r\n \"2603:1030:c06:802::a0/123\"\ - ,\r\n \"2603:1030:c06:c02::a0/123\",\r\n \"2603:1030:f05:402::a0/123\"\ - ,\r\n \"2603:1030:f05:802::a0/123\",\r\n \"2603:1030:f05:c02::a0/123\"\ - ,\r\n \"2603:1030:1005:402::a0/123\",\r\n \"2603:1040:5:402::a0/123\"\ - ,\r\n \"2603:1040:5:802::a0/123\",\r\n \"2603:1040:5:c02::a0/123\"\ - ,\r\n \"2603:1040:207:2::400/120\",\r\n \"2603:1040:207:402::a0/123\"\ - ,\r\n \"2603:1040:407:402::a0/123\",\r\n \"2603:1040:407:802::a0/123\"\ - ,\r\n \"2603:1040:407:c02::a0/123\",\r\n \"2603:1040:606:402::a0/123\"\ - ,\r\n \"2603:1040:806:402::a0/123\",\r\n \"2603:1040:904:402::a0/123\"\ - ,\r\n \"2603:1040:904:802::a0/123\",\r\n \"2603:1040:904:c02::a0/123\"\ - ,\r\n \"2603:1040:a06:402::a0/123\",\r\n \"2603:1040:a06:802::a0/123\"\ - ,\r\n \"2603:1040:a06:c02::a0/123\",\r\n \"2603:1040:b04:402::a0/123\"\ - ,\r\n \"2603:1040:c06:402::a0/123\",\r\n \"2603:1040:d04:400::a0/123\"\ - ,\r\n \"2603:1040:d04:800::160/123\",\r\n \"2603:1040:d04:800::360/123\"\ - ,\r\n \"2603:1040:f05:402::a0/123\",\r\n \"2603:1040:f05:802::a0/123\"\ - ,\r\n \"2603:1040:f05:c02::a0/123\",\r\n \"2603:1040:1002:2::100/120\"\ - ,\r\n \"2603:1040:1104:400::a0/123\",\r\n \"2603:1050:6:402::a0/123\"\ - ,\r\n \"2603:1050:6:802::a0/123\",\r\n \"2603:1050:6:c02::a0/123\"\ - ,\r\n \"2603:1050:403:400::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.AustraliaCentral\",\r\n \ - \ \"id\": \"AppService.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.36.43.207/32\"\ - ,\r\n \"20.36.106.96/27\",\r\n \"20.37.226.0/27\",\r\n \ - \ \"20.53.52.192/27\",\r\n \"20.53.53.0/25\",\r\n \ - \ \"2603:1010:304:402::a0/123\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AppService.AustraliaCentral2\",\r\n \"id\"\ - : \"AppService.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.36.72.230/32\"\ - ,\r\n \"20.36.117.0/27\",\r\n \"20.36.122.0/27\",\r\n \ - \ \"20.53.60.96/27\",\r\n \"20.53.61.0/25\",\r\n \ - \ \"2603:1010:404:402::a0/123\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"AppService.AustraliaEast\",\r\n \"id\": \"AppService.AustraliaEast\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"australiaeast\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\",\r\n\ - \ \"addressPrefixes\": [\r\n \"13.70.72.32/27\",\r\n \ - \ \"13.70.123.149/32\",\r\n \"13.75.138.224/32\",\r\n \ - \ \"13.75.147.143/32\",\r\n \"13.75.147.201/32\",\r\n \ - \ \"13.75.218.45/32\",\r\n \"20.37.196.192/27\",\r\n \"\ - 23.101.208.52/32\",\r\n \"40.79.163.160/27\",\r\n \"40.79.171.64/27\"\ - ,\r\n \"40.82.217.93/32\",\r\n \"40.126.227.158/32\",\r\n\ - \ \"40.126.236.22/32\",\r\n \"40.126.242.59/32\",\r\n \ - \ \"40.126.245.169/32\",\r\n \"52.187.206.243/32\",\r\n \ - \ \"52.187.229.23/32\",\r\n \"52.237.205.163/32\",\r\n \ - \ \"52.237.214.221/32\",\r\n \"52.237.246.162/32\",\r\n \ - \ \"104.210.69.241/32\",\r\n \"104.210.92.71/32\",\r\n \ - \ \"2603:1010:6:402::a0/123\",\r\n \"2603:1010:6:802::a0/123\"\ - ,\r\n \"2603:1010:6:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.AustraliaSoutheast\",\r\n \ - \ \"id\": \"AppService.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\":\ - \ [\r\n \"13.70.146.110/32\",\r\n \"13.70.147.206/32\",\r\ - \n \"13.73.116.45/32\",\r\n \"13.73.118.104/32\",\r\n \ - \ \"13.77.7.175/32\",\r\n \"13.77.50.96/27\",\r\n \ - \ \"20.42.228.160/27\",\r\n \"23.101.224.24/32\",\r\n \"\ - 23.101.230.162/32\",\r\n \"52.189.213.49/32\",\r\n \"52.255.35.249/32\"\ - ,\r\n \"52.255.54.134/32\",\r\n \"191.239.188.11/32\",\r\ - \n \"2603:1010:101:402::a0/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AppService.BrazilSouth\",\r\n \"id\": \"\ - AppService.BrazilSouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"23.97.96.32/32\",\r\n \ - \ \"104.41.9.139/32\",\r\n \"104.41.13.179/32\",\r\n \ - \ \"104.41.63.108/32\",\r\n \"191.232.38.77/32\",\r\n \ - \ \"191.232.176.16/32\",\r\n \"191.233.203.32/27\",\r\n \ - \ \"191.234.146.160/27\",\r\n \"191.234.154.160/27\",\r\n \ - \ \"191.235.81.73/32\",\r\n \"191.235.90.70/32\",\r\n \ - \ \"191.235.228.32/27\",\r\n \"2603:1050:6:402::a0/123\",\r\n\ - \ \"2603:1050:6:802::a0/123\",\r\n \"2603:1050:6:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.BrazilSoutheast\"\ - ,\r\n \"id\": \"AppService.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"191.233.50.32/27\"\ - ,\r\n \"2603:1050:403:400::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.CanadaCentral\",\r\n \ - \ \"id\": \"AppService.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.71.170.128/27\"\ - ,\r\n \"20.38.146.160/27\",\r\n \"40.82.191.84/32\",\r\n\ - \ \"40.85.212.173/32\",\r\n \"40.85.230.182/32\",\r\n \ - \ \"52.228.42.76/32\",\r\n \"52.228.84.32/27\",\r\n \ - \ \"52.228.121.123/32\",\r\n \"52.233.38.143/32\",\r\n \ - \ \"52.237.18.220/32\",\r\n \"52.237.22.139/32\",\r\n \ - \ \"52.246.154.160/27\",\r\n \"2603:1030:f05:402::a0/123\",\r\n \ - \ \"2603:1030:f05:802::a0/123\",\r\n \"2603:1030:f05:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.CanadaEast\"\ - ,\r\n \"id\": \"AppService.CanadaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"40.69.106.96/27\"\ - ,\r\n \"40.86.225.89/32\",\r\n \"40.86.230.96/32\",\r\n\ - \ \"40.89.19.0/27\",\r\n \"52.229.115.84/32\",\r\n \ - \ \"52.242.22.213/32\",\r\n \"52.242.27.213/32\",\r\n \ - \ \"2603:1030:1005:402::a0/123\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AppService.CentralIndia\",\r\n \"id\": \"\ - AppService.CentralIndia\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.192.98.160/27\",\r\n\ - \ \"40.80.50.160/27\",\r\n \"52.140.106.224/27\",\r\n \ - \ \"52.172.195.80/32\",\r\n \"52.172.204.196/32\",\r\n \ - \ \"52.172.219.121/32\",\r\n \"104.211.81.32/27\",\r\n \ - \ \"104.211.97.138/32\",\r\n \"2603:1040:a06:402::a0/123\",\r\ - \n \"2603:1040:a06:802::a0/123\",\r\n \"2603:1040:a06:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.CentralUS\"\ - ,\r\n \"id\": \"AppService.CentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.67.129.26/32\"\ - ,\r\n \"13.67.141.98/32\",\r\n \"13.89.57.7/32\",\r\n \ - \ \"13.89.172.0/23\",\r\n \"13.89.238.239/32\",\r\n \ - \ \"20.40.202.0/23\",\r\n \"23.99.128.52/32\",\r\n \"\ - 23.99.183.149/32\",\r\n \"23.99.192.132/32\",\r\n \"23.99.196.180/32\"\ - ,\r\n \"23.99.206.151/32\",\r\n \"23.99.224.56/32\",\r\n\ - \ \"23.100.82.11/32\",\r\n \"23.101.118.145/32\",\r\n \ - \ \"23.101.119.44/32\",\r\n \"23.101.119.163/32\",\r\n \ - \ \"23.101.120.195/32\",\r\n \"23.101.125.65/32\",\r\n \ - \ \"40.69.190.41/32\",\r\n \"40.77.56.174/32\",\r\n \ - \ \"40.83.16.172/32\",\r\n \"40.86.86.144/32\",\r\n \"\ - 40.86.91.212/32\",\r\n \"40.86.96.177/32\",\r\n \"40.86.99.202/32\"\ - ,\r\n \"40.113.204.88/32\",\r\n \"40.113.232.243/32\",\r\ - \n \"40.113.236.45/32\",\r\n \"40.122.36.65/32\",\r\n \ - \ \"40.122.65.162/32\",\r\n \"40.122.110.154/32\",\r\n \ - \ \"40.122.114.229/32\",\r\n \"52.165.129.203/32\",\r\n \ - \ \"52.165.135.234/32\",\r\n \"52.165.155.12/32\",\r\n \ - \ \"52.165.155.237/32\",\r\n \"52.165.163.223/32\",\r\n \ - \ \"52.165.168.40/32\",\r\n \"52.165.174.123/32\",\r\n \ - \ \"52.165.184.170/32\",\r\n \"52.165.220.33/32\",\r\n \ - \ \"52.165.224.81/32\",\r\n \"52.165.237.15/32\",\r\n \ - \ \"52.173.28.95/32\",\r\n \"52.173.36.83/32\",\r\n \"\ - 52.173.76.33/32\",\r\n \"52.173.77.140/32\",\r\n \"52.173.83.49/32\"\ - ,\r\n \"52.173.84.157/32\",\r\n \"52.173.87.130/32\",\r\n\ - \ \"52.173.94.173/32\",\r\n \"52.173.134.115/32\",\r\n \ - \ \"52.173.139.99/32\",\r\n \"52.173.139.125/32\",\r\n \ - \ \"52.173.149.254/32\",\r\n \"52.173.151.229/32\",\r\n \ - \ \"52.173.184.147/32\",\r\n \"52.173.245.249/32\",\r\n \ - \ \"52.173.249.137/32\",\r\n \"52.176.2.229/32\",\r\n \ - \ \"52.176.5.241/32\",\r\n \"52.176.6.0/32\",\r\n \"\ - 52.176.6.37/32\",\r\n \"52.176.61.128/32\",\r\n \"52.176.104.120/32\"\ - ,\r\n \"52.176.149.197/32\",\r\n \"52.176.165.69/32\",\r\ - \n \"104.43.129.105/32\",\r\n \"104.43.140.101/32\",\r\n\ - \ \"104.43.142.33/32\",\r\n \"104.43.221.31/32\",\r\n \ - \ \"104.43.246.71/32\",\r\n \"104.43.254.102/32\",\r\n \ - \ \"168.61.152.29/32\",\r\n \"168.61.159.114/32\",\r\n \ - \ \"168.61.217.214/32\",\r\n \"168.61.218.125/32\",\r\n \ - \ \"2603:1030:10:402::a0/123\",\r\n \"2603:1030:10:802::a0/123\"\ - ,\r\n \"2603:1030:10:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.CentralUSEUAP\",\r\n \"\ - id\": \"AppService.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.45.196.16/29\"\ - ,\r\n \"40.78.204.160/27\",\r\n \"52.180.178.6/32\",\r\n\ - \ \"52.180.183.66/32\",\r\n \"104.208.48.107/32\",\r\n \ - \ \"2603:1030:f:400::8a0/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AppService.EastAsia\",\r\n \"id\": \"AppService.EastAsia\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"eastasia\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureAppService\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.75.34.160/27\",\r\n \ - \ \"13.75.46.26/32\",\r\n \"13.75.47.15/32\",\r\n \"13.75.89.224/32\"\ - ,\r\n \"13.75.112.108/32\",\r\n \"13.75.115.40/32\",\r\n\ - \ \"13.94.47.87/32\",\r\n \"20.189.104.96/27\",\r\n \ - \ \"20.189.109.96/27\",\r\n \"20.189.112.66/32\",\r\n \ - \ \"20.205.66.0/24\",\r\n \"23.97.79.119/32\",\r\n \"\ - 23.99.110.192/32\",\r\n \"23.99.116.70/32\",\r\n \"23.101.10.141/32\"\ - ,\r\n \"40.83.72.59/32\",\r\n \"40.83.124.73/32\",\r\n \ - \ \"65.52.160.119/32\",\r\n \"65.52.168.70/32\",\r\n \ - \ \"191.234.16.188/32\",\r\n \"207.46.144.49/32\",\r\n \ - \ \"207.46.147.148/32\",\r\n \"2603:1040:207:2::400/120\",\r\n\ - \ \"2603:1040:207:402::a0/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AppService.EastUS\",\r\n \"id\": \"AppService.EastUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"eastus\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureAppService\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.82.93.245/32\",\r\n \ - \ \"13.82.101.179/32\",\r\n \"13.82.175.96/32\",\r\n \"\ - 13.90.143.69/32\",\r\n \"13.90.213.204/32\",\r\n \"13.92.139.214/32\"\ - ,\r\n \"13.92.193.110/32\",\r\n \"13.92.237.218/32\",\r\n\ - \ \"20.42.26.252/32\",\r\n \"20.49.104.0/25\",\r\n \ - \ \"23.96.0.52/32\",\r\n \"23.96.1.109/32\",\r\n \"\ - 23.96.13.243/32\",\r\n \"23.96.32.128/32\",\r\n \"23.96.96.142/32\"\ - ,\r\n \"23.96.103.159/32\",\r\n \"23.96.112.53/32\",\r\n\ - \ \"23.96.113.128/32\",\r\n \"23.96.124.25/32\",\r\n \ - \ \"40.71.0.179/32\",\r\n \"40.71.11.128/25\",\r\n \ - \ \"40.71.177.34/32\",\r\n \"40.71.199.117/32\",\r\n \"\ - 40.71.234.254/32\",\r\n \"40.71.250.191/32\",\r\n \"40.76.5.137/32\"\ - ,\r\n \"40.76.192.15/32\",\r\n \"40.76.210.54/32\",\r\n\ - \ \"40.76.218.33/32\",\r\n \"40.76.223.101/32\",\r\n \ - \ \"40.79.154.192/27\",\r\n \"40.85.190.10/32\",\r\n \ - \ \"40.87.65.131/32\",\r\n \"40.87.70.95/32\",\r\n \"\ - 40.114.13.25/32\",\r\n \"40.114.41.245/32\",\r\n \"40.114.51.68/32\"\ - ,\r\n \"40.114.68.21/32\",\r\n \"40.114.106.25/32\",\r\n\ - \ \"40.117.154.240/32\",\r\n \"40.117.188.126/32\",\r\n\ - \ \"40.117.190.72/32\",\r\n \"40.121.8.241/32\",\r\n \ - \ \"40.121.16.193/32\",\r\n \"40.121.32.232/32\",\r\n \ - \ \"40.121.35.221/32\",\r\n \"40.121.91.199/32\",\r\n \ - \ \"40.121.212.165/32\",\r\n \"40.121.221.52/32\",\r\n \ - \ \"52.168.125.188/32\",\r\n \"52.170.7.25/32\",\r\n \"\ - 52.170.46.174/32\",\r\n \"52.179.97.15/32\",\r\n \"52.226.134.64/32\"\ - ,\r\n \"52.234.209.94/32\",\r\n \"104.45.129.178/32\",\r\ - \n \"104.45.141.247/32\",\r\n \"104.45.152.13/32\",\r\n\ - \ \"104.45.152.60/32\",\r\n \"104.45.154.200/32\",\r\n \ - \ \"104.211.26.212/32\",\r\n \"137.117.58.204/32\",\r\n \ - \ \"137.117.66.167/32\",\r\n \"137.117.84.54/32\",\r\n \ - \ \"137.117.90.63/32\",\r\n \"137.117.93.87/32\",\r\n \ - \ \"137.135.91.176/32\",\r\n \"137.135.107.235/32\",\r\n \ - \ \"168.62.48.183/32\",\r\n \"168.62.180.173/32\",\r\n \ - \ \"191.236.16.12/32\",\r\n \"191.236.59.67/32\",\r\n \ - \ \"191.237.24.89/32\",\r\n \"191.237.27.74/32\",\r\n \ - \ \"191.238.8.26/32\",\r\n \"191.238.33.50/32\",\r\n \"\ - 2603:1030:210:402::a0/123\",\r\n \"2603:1030:210:802::a0/123\",\r\ - \n \"2603:1030:210:c02::a0/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AppService.EastUS2\",\r\n \"id\": \"AppService.EastUS2\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"eastus2\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureAppService\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.68.29.136/32\",\r\n \ - \ \"13.68.101.62/32\",\r\n \"13.77.82.141/32\",\r\n \"\ - 13.77.83.246/32\",\r\n \"13.77.96.119/32\",\r\n \"20.49.97.0/25\"\ - ,\r\n \"23.101.147.117/32\",\r\n \"40.70.27.35/32\",\r\n\ - \ \"40.70.147.0/25\",\r\n \"40.79.65.200/32\",\r\n \ - \ \"40.84.54.203/32\",\r\n \"40.84.59.174/32\",\r\n \ - \ \"40.123.45.47/32\",\r\n \"40.123.47.58/32\",\r\n \"52.177.169.150/32\"\ - ,\r\n \"52.177.189.138/32\",\r\n \"52.177.206.73/32\",\r\ - \n \"52.179.188.206/32\",\r\n \"52.184.162.135/32\",\r\n\ - \ \"52.184.193.103/32\",\r\n \"52.184.193.104/32\",\r\n\ - \ \"104.46.101.59/32\",\r\n \"104.209.178.67/32\",\r\n \ - \ \"104.209.192.206/32\",\r\n \"104.209.197.87/32\",\r\n\ - \ \"137.116.78.243/32\",\r\n \"137.116.88.213/32\",\r\n\ - \ \"191.236.192.121/32\",\r\n \"191.237.128.238/32\",\r\n\ - \ \"2603:1030:40c:402::a0/123\",\r\n \"2603:1030:40c:802::a0/123\"\ - ,\r\n \"2603:1030:40c:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.EastUS2EUAP\",\r\n \"\ - id\": \"AppService.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.39.11.104/29\"\ - ,\r\n \"52.225.179.39/32\",\r\n \"52.225.190.65/32\",\r\n\ - \ \"52.253.224.223/32\",\r\n \"2603:1030:40b:400::8a0/123\"\ - ,\r\n \"2603:1030:40b:800::a0/123\",\r\n \"2603:1030:40b:c00::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.FranceCentral\"\ - ,\r\n \"id\": \"AppService.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.43.43.32/27\"\ - ,\r\n \"40.79.130.128/27\",\r\n \"40.89.131.148/32\",\r\n\ - \ \"40.89.141.103/32\",\r\n \"52.143.137.150/32\",\r\n \ - \ \"2603:1020:805:402::a0/123\",\r\n \"2603:1020:805:802::a0/123\"\ - ,\r\n \"2603:1020:805:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.FranceSouth\",\r\n \"\ - id\": \"AppService.FranceSouth\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"40.79.178.96/27\"\ - ,\r\n \"51.105.90.32/27\",\r\n \"52.136.138.55/32\",\r\n\ - \ \"52.136.190.0/25\",\r\n \"52.136.190.128/27\",\r\n \ - \ \"2603:1020:905:402::a0/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AppService.GermanyNorth\",\r\n \"id\": \"\ - AppService.GermanyNorth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.116.49.32/27\",\r\n\ - \ \"51.116.58.160/27\",\r\n \"2603:1020:d04:402::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.GermanyWestCentral\"\ - ,\r\n \"id\": \"AppService.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"51.116.145.32/27\"\ - ,\r\n \"51.116.154.224/27\",\r\n \"51.116.242.160/27\",\r\ - \n \"51.116.250.160/27\",\r\n \"2603:1020:c04:402::a0/123\"\ - ,\r\n \"2603:1020:c04:802::a0/123\",\r\n \"2603:1020:c04:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.JapanEast\"\ - ,\r\n \"id\": \"AppService.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.71.149.151/32\"\ - ,\r\n \"13.73.1.134/32\",\r\n \"13.73.26.73/32\",\r\n \ - \ \"13.78.59.237/32\",\r\n \"13.78.106.96/27\",\r\n \ - \ \"13.78.117.86/32\",\r\n \"13.78.123.87/32\",\r\n \"\ - 20.43.67.32/27\",\r\n \"40.79.195.0/27\",\r\n \"40.115.179.121/32\"\ - ,\r\n \"40.115.251.148/32\",\r\n \"52.243.39.89/32\",\r\n\ - \ \"104.41.186.103/32\",\r\n \"138.91.0.30/32\",\r\n \ - \ \"2603:1040:407:402::a0/123\",\r\n \"2603:1040:407:802::a0/123\"\ - ,\r\n \"2603:1040:407:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.JapanWest\",\r\n \"id\"\ - : \"AppService.JapanWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"40.74.100.128/27\",\r\n\ - \ \"40.74.133.20/32\",\r\n \"40.80.58.224/27\",\r\n \ - \ \"52.175.158.219/32\",\r\n \"104.214.137.236/32\",\r\n \ - \ \"104.215.11.176/32\",\r\n \"104.215.58.230/32\",\r\n \ - \ \"138.91.16.18/32\",\r\n \"2603:1040:606:402::a0/123\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.JioIndiaCentral\"\ - ,\r\n \"id\": \"AppService.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.192.54.0/24\"\ - ,\r\n \"20.192.234.128/27\",\r\n \"20.207.0.96/27\",\r\n\ - \ \"20.207.0.128/25\",\r\n \"2603:1040:1104:400::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.JioIndiaWest\"\ - ,\r\n \"id\": \"AppService.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.193.198.0/24\"\ - ,\r\n \"20.193.202.128/27\",\r\n \"40.64.8.224/27\",\r\n\ - \ \"40.64.9.0/25\",\r\n \"40.64.10.0/25\",\r\n \ - \ \"40.64.10.128/27\",\r\n \"2603:1040:d04:400::a0/123\",\r\n \ - \ \"2603:1040:d04:800::160/123\",\r\n \"2603:1040:d04:800::360/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.KoreaCentral\"\ - ,\r\n \"id\": \"AppService.KoreaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.41.66.224/27\"\ - ,\r\n \"20.44.26.160/27\",\r\n \"20.194.66.32/27\",\r\n\ - \ \"52.231.18.128/27\",\r\n \"52.231.32.120/32\",\r\n \ - \ \"52.231.38.95/32\",\r\n \"52.231.77.58/32\",\r\n \ - \ \"2603:1040:f05:402::a0/123\",\r\n \"2603:1040:f05:802::a0/123\"\ - ,\r\n \"2603:1040:f05:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.KoreaSouth\",\r\n \"\ - id\": \"AppService.KoreaSouth\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"40.80.170.224/27\"\ - ,\r\n \"52.147.117.224/27\",\r\n \"52.147.118.128/25\",\r\ - \n \"52.147.119.64/27\",\r\n \"52.147.119.128/25\",\r\n\ - \ \"52.231.146.96/27\",\r\n \"52.231.200.101/32\",\r\n \ - \ \"52.231.200.179/32\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"AppService.NorthCentralUS\",\r\n \"id\": \"AppService.NorthCentralUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"northcentralus\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\",\r\n\ - \ \"addressPrefixes\": [\r\n \"23.96.187.5/32\",\r\n \ - \ \"23.96.201.21/32\",\r\n \"23.96.207.177/32\",\r\n \ - \ \"23.96.209.155/32\",\r\n \"23.96.220.116/32\",\r\n \"\ - 23.100.72.240/32\",\r\n \"23.101.169.175/32\",\r\n \"23.101.171.94/32\"\ - ,\r\n \"23.101.172.244/32\",\r\n \"40.80.191.0/25\",\r\n\ - \ \"52.162.208.73/32\",\r\n \"52.237.130.0/32\",\r\n \ - \ \"52.240.149.243/32\",\r\n \"52.240.155.58/32\",\r\n \ - \ \"52.252.160.21/32\",\r\n \"65.52.24.41/32\",\r\n \ - \ \"65.52.213.73/32\",\r\n \"65.52.217.59/32\",\r\n \"\ - 65.52.218.253/32\",\r\n \"157.56.13.114/32\",\r\n \"168.62.224.13/32\"\ - ,\r\n \"168.62.225.23/32\",\r\n \"191.236.148.9/32\",\r\n\ - \ \"2603:1030:608:402::a0/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AppService.NorthEurope\",\r\n \"id\": \"\ - AppService.NorthEurope\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.69.186.152/32\",\r\n\ - \ \"13.69.228.0/25\",\r\n \"13.69.253.145/32\",\r\n \ - \ \"13.74.41.233/32\",\r\n \"13.74.147.218/32\",\r\n \ - \ \"13.74.158.5/32\",\r\n \"13.74.252.44/32\",\r\n \"\ - 13.79.2.71/32\",\r\n \"13.79.38.229/32\",\r\n \"13.79.172.40/32\"\ - ,\r\n \"20.50.64.0/25\",\r\n \"23.100.48.106/32\",\r\n \ - \ \"23.100.50.51/32\",\r\n \"23.100.52.22/32\",\r\n \ - \ \"23.100.56.27/32\",\r\n \"23.101.54.230/32\",\r\n \ - \ \"23.101.63.214/32\",\r\n \"23.102.12.43/32\",\r\n \"\ - 23.102.21.198/32\",\r\n \"23.102.21.212/32\",\r\n \"23.102.25.149/32\"\ - ,\r\n \"23.102.28.178/32\",\r\n \"40.69.43.225/32\",\r\n\ - \ \"40.69.88.149/32\",\r\n \"40.69.200.124/32\",\r\n \ - \ \"40.69.210.172/32\",\r\n \"40.69.218.150/32\",\r\n \ - \ \"40.85.74.227/32\",\r\n \"40.85.92.115/32\",\r\n \ - \ \"40.85.96.208/32\",\r\n \"40.112.69.156/32\",\r\n \"\ - 40.112.90.244/32\",\r\n \"40.112.93.201/32\",\r\n \"40.113.2.52/32\"\ - ,\r\n \"40.113.65.9/32\",\r\n \"40.113.71.148/32\",\r\n\ - \ \"40.113.81.82/32\",\r\n \"40.113.90.202/32\",\r\n \ - \ \"40.115.98.85/32\",\r\n \"40.127.132.204/32\",\r\n \ - \ \"40.127.139.252/32\",\r\n \"40.127.192.244/32\",\r\n \ - \ \"40.127.196.56/32\",\r\n \"52.138.196.70/32\",\r\n \ - \ \"52.138.218.121/32\",\r\n \"52.164.201.186/32\",\r\n \ - \ \"52.164.250.133/32\",\r\n \"52.169.73.236/32\",\r\n \ - \ \"52.169.78.163/32\",\r\n \"52.169.180.223/32\",\r\n \ - \ \"52.169.184.163/32\",\r\n \"52.169.188.236/32\",\r\n \ - \ \"52.169.191.40/32\",\r\n \"52.178.158.175/32\",\r\n \"\ - 52.178.164.235/32\",\r\n \"52.178.179.169/32\",\r\n \"52.178.190.191/32\"\ - ,\r\n \"52.178.201.147/32\",\r\n \"52.178.208.12/32\",\r\ - \n \"52.178.212.17/32\",\r\n \"52.178.214.89/32\",\r\n \ - \ \"94.245.104.73/32\",\r\n \"104.41.216.137/32\",\r\n \ - \ \"104.41.229.199/32\",\r\n \"104.45.81.79/32\",\r\n \ - \ \"104.45.95.61/32\",\r\n \"137.135.129.175/32\",\r\n \ - \ \"137.135.133.221/32\",\r\n \"168.63.53.239/32\",\r\n \ - \ \"191.235.160.13/32\",\r\n \"191.235.176.12/32\",\r\n \ - \ \"191.235.177.30/32\",\r\n \"191.235.208.12/32\",\r\n \ - \ \"191.235.215.184/32\",\r\n \"2603:1020:5:402::a0/123\",\r\n\ - \ \"2603:1020:5:802::a0/123\",\r\n \"2603:1020:5:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.NorwayEast\"\ - ,\r\n \"id\": \"AppService.NorwayEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"51.120.42.0/27\"\ - ,\r\n \"51.120.98.192/27\",\r\n \"51.120.106.160/27\",\r\ - \n \"51.120.210.160/27\",\r\n \"2603:1020:e04:402::a0/123\"\ - ,\r\n \"2603:1020:e04:802::a0/123\",\r\n \"2603:1020:e04:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.NorwayWest\"\ - ,\r\n \"id\": \"AppService.NorwayWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"51.13.142.128/25\"\ - ,\r\n \"51.13.143.64/27\",\r\n \"51.13.143.128/25\",\r\n\ - \ \"51.120.218.192/27\",\r\n \"51.120.226.0/27\",\r\n \ - \ \"2603:1020:f04:402::a0/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AppService.SouthAfricaNorth\",\r\n \"id\"\ - : \"AppService.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"102.133.122.160/27\"\ - ,\r\n \"102.133.154.32/27\",\r\n \"102.133.218.32/28\",\r\ - \n \"102.133.250.160/27\",\r\n \"2603:1000:104:402::a0/123\"\ - ,\r\n \"2603:1000:104:802::a0/123\",\r\n \"2603:1000:104:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SouthAfricaWest\"\ - ,\r\n \"id\": \"AppService.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"102.37.86.64/26\"\ - ,\r\n \"102.37.86.128/26\",\r\n \"102.133.26.32/27\",\r\n\ - \ \"102.133.57.128/27\",\r\n \"2603:1000:4:402::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SouthCentralUS\"\ - ,\r\n \"id\": \"AppService.SouthCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.65.30.245/32\"\ - ,\r\n \"13.65.37.122/32\",\r\n \"13.65.39.165/32\",\r\n\ - \ \"13.65.42.35/32\",\r\n \"13.65.42.183/32\",\r\n \ - \ \"13.65.45.30/32\",\r\n \"13.65.85.146/32\",\r\n \"\ - 13.65.89.91/32\",\r\n \"13.65.92.72/32\",\r\n \"13.65.94.204/32\"\ - ,\r\n \"13.65.95.109/32\",\r\n \"13.65.97.243/32\",\r\n\ - \ \"13.65.193.29/32\",\r\n \"13.65.210.166/32\",\r\n \ - \ \"13.65.212.252/32\",\r\n \"13.65.241.130/32\",\r\n \ - \ \"13.65.243.110/32\",\r\n \"13.66.16.101/32\",\r\n \ - \ \"13.66.38.99/32\",\r\n \"13.66.39.88/32\",\r\n \"13.84.36.2/32\"\ - ,\r\n \"13.84.40.227/32\",\r\n \"13.84.42.35/32\",\r\n \ - \ \"13.84.46.29/32\",\r\n \"13.84.55.137/32\",\r\n \ - \ \"13.84.146.60/32\",\r\n \"13.84.180.32/32\",\r\n \"\ - 13.84.181.47/32\",\r\n \"13.84.188.162/32\",\r\n \"13.84.189.137/32\"\ - ,\r\n \"13.84.227.164/32\",\r\n \"13.85.15.194/32\",\r\n\ - \ \"13.85.16.224/32\",\r\n \"13.85.20.144/32\",\r\n \ - \ \"13.85.24.220/32\",\r\n \"13.85.27.14/32\",\r\n \ - \ \"13.85.31.243/32\",\r\n \"13.85.72.129/32\",\r\n \"13.85.77.179/32\"\ - ,\r\n \"13.85.82.0/32\",\r\n \"20.45.122.160/27\",\r\n \ - \ \"20.49.90.32/27\",\r\n \"23.101.180.75/32\",\r\n \ - \ \"23.102.154.38/32\",\r\n \"23.102.161.217/32\",\r\n \ - \ \"23.102.191.170/32\",\r\n \"40.74.245.188/32\",\r\n \ - \ \"40.74.253.108/32\",\r\n \"40.74.255.112/32\",\r\n \ - \ \"40.84.148.247/32\",\r\n \"40.84.159.58/32\",\r\n \"\ - 40.84.194.106/32\",\r\n \"40.84.226.176/32\",\r\n \"40.84.227.180/32\"\ - ,\r\n \"40.84.232.28/32\",\r\n \"40.119.12.0/23\",\r\n \ - \ \"40.124.12.75/32\",\r\n \"40.124.13.58/32\",\r\n \ - \ \"52.171.56.101/32\",\r\n \"52.171.56.110/32\",\r\n \ - \ \"52.171.136.200/32\",\r\n \"52.171.140.237/32\",\r\n \ - \ \"52.171.218.239/32\",\r\n \"52.171.221.170/32\",\r\n \ - \ \"52.171.222.247/32\",\r\n \"104.44.128.13/32\",\r\n \ - \ \"104.44.130.38/32\",\r\n \"104.210.145.181/32\",\r\n \ - \ \"104.210.147.57/32\",\r\n \"104.210.152.76/32\",\r\n \ - \ \"104.210.152.122/32\",\r\n \"104.210.153.116/32\",\r\n \ - \ \"104.210.158.20/32\",\r\n \"104.214.20.0/23\",\r\n \ - \ \"104.214.29.203/32\",\r\n \"104.214.64.238/32\",\r\n \ - \ \"104.214.74.110/32\",\r\n \"104.214.77.221/32\",\r\n \ - \ \"104.214.110.60/32\",\r\n \"104.214.110.226/32\",\r\n \ - \ \"104.214.118.174/32\",\r\n \"104.214.119.36/32\",\r\n \ - \ \"104.215.73.236/32\",\r\n \"104.215.78.13/32\",\r\n \ - \ \"104.215.89.22/32\",\r\n \"191.238.176.139/32\",\r\n \ - \ \"191.238.240.12/32\",\r\n \"2603:1030:807:402::a0/123\",\r\n\ - \ \"2603:1030:807:802::a0/123\",\r\n \"2603:1030:807:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SouthCentralUSSTG\"\ - ,\r\n \"id\": \"AppService.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.44.2.32/27\"\ - ,\r\n \"23.100.216.96/27\",\r\n \"23.100.216.128/25\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SoutheastAsia\"\ - ,\r\n \"id\": \"AppService.SoutheastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.67.9.0/25\"\ - ,\r\n \"13.67.56.225/32\",\r\n \"13.67.63.90/32\",\r\n \ - \ \"13.76.44.139/32\",\r\n \"13.76.245.96/32\",\r\n \ - \ \"20.43.132.128/25\",\r\n \"20.188.98.74/32\",\r\n \ - \ \"23.97.56.169/32\",\r\n \"23.98.64.36/32\",\r\n \"23.98.64.158/32\"\ - ,\r\n \"23.101.27.182/32\",\r\n \"52.163.122.160/32\",\r\ - \n \"52.187.17.126/32\",\r\n \"52.187.36.104/32\",\r\n \ - \ \"52.187.52.94/32\",\r\n \"52.187.135.79/32\",\r\n \ - \ \"52.230.1.186/32\",\r\n \"104.215.147.45/32\",\r\n \ - \ \"104.215.155.1/32\",\r\n \"111.221.95.27/32\",\r\n \ - \ \"137.116.128.188/32\",\r\n \"137.116.153.238/32\",\r\n \ - \ \"2603:1040:5:402::a0/123\",\r\n \"2603:1040:5:802::a0/123\"\ - ,\r\n \"2603:1040:5:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.SouthIndia\",\r\n \"id\"\ - : \"AppService.SouthIndia\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.71.122.35/32\",\r\n\ - \ \"13.71.123.138/32\",\r\n \"20.41.195.192/27\",\r\n \ - \ \"40.78.194.96/27\",\r\n \"52.172.54.225/32\",\r\n \ - \ \"104.211.224.252/32\",\r\n \"104.211.225.167/32\",\r\n \ - \ \"2603:1040:c06:402::a0/123\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AppService.SwedenCentral\",\r\n \"id\": \"\ - AppService.SwedenCentral\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.12.31.0/24\",\r\n \ - \ \"51.12.73.224/27\",\r\n \"51.12.74.0/25\",\r\n \ - \ \"51.12.98.192/27\",\r\n \"51.12.226.160/27\",\r\n \"\ - 51.12.234.160/27\",\r\n \"2603:1020:1004:2::500/120\",\r\n \ - \ \"2603:1020:1004:400::a0/123\",\r\n \"2603:1020:1004:800::160/123\"\ - ,\r\n \"2603:1020:1004:800::360/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AppService.SwitzerlandNorth\",\r\n \ - \ \"id\": \"AppService.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.208.1.0/24\"\ - ,\r\n \"51.107.50.0/27\",\r\n \"51.107.58.160/27\",\r\n\ - \ \"2603:1020:a04:3::100/120\",\r\n \"2603:1020:a04:402::a0/123\"\ - ,\r\n \"2603:1020:a04:802::a0/123\",\r\n \"2603:1020:a04:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SwitzerlandWest\"\ - ,\r\n \"id\": \"AppService.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.199.200.0/26\"\ - ,\r\n \"51.107.146.0/27\",\r\n \"51.107.154.160/27\",\r\n\ - \ \"51.107.255.192/26\",\r\n \"2603:1020:b04:402::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.UAECentral\"\ - ,\r\n \"id\": \"AppService.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.37.66.0/27\"\ - ,\r\n \"20.37.74.96/27\",\r\n \"20.45.94.192/26\",\r\n \ - \ \"20.45.95.0/26\",\r\n \"2603:1040:b04:402::a0/123\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.UAENorth\"\ - ,\r\n \"id\": \"AppService.UAENorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.38.138.0/27\"\ - ,\r\n \"40.120.74.32/27\",\r\n \"65.52.250.96/27\",\r\n\ - \ \"2603:1040:904:402::a0/123\",\r\n \"2603:1040:904:802::a0/123\"\ - ,\r\n \"2603:1040:904:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.UKSouth\",\r\n \"id\"\ - : \"AppService.UKSouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.104.28.64/26\",\r\n\ - \ \"51.105.66.160/27\",\r\n \"51.105.74.160/27\",\r\n \ - \ \"51.140.37.241/32\",\r\n \"51.140.57.176/32\",\r\n \ - \ \"51.140.59.233/32\",\r\n \"51.140.75.147/32\",\r\n \ - \ \"51.140.84.145/32\",\r\n \"51.140.85.106/32\",\r\n \ - \ \"51.140.87.39/32\",\r\n \"51.140.122.226/32\",\r\n \"\ - 51.140.146.128/26\",\r\n \"51.140.152.154/32\",\r\n \"51.140.153.150/32\"\ - ,\r\n \"51.140.180.76/32\",\r\n \"51.140.185.151/32\",\r\ - \n \"51.140.191.223/32\",\r\n \"51.143.191.44/32\",\r\n\ - \ \"2603:1020:705:402::a0/123\",\r\n \"2603:1020:705:802::a0/123\"\ - ,\r\n \"2603:1020:705:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.UKWest\",\r\n \"id\"\ - : \"AppService.UKWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.137.163.32/27\",\r\n\ - \ \"51.140.210.96/27\",\r\n \"51.140.244.162/32\",\r\n \ - \ \"51.140.245.89/32\",\r\n \"51.141.12.112/32\",\r\n \ - \ \"51.141.37.245/32\",\r\n \"51.141.44.139/32\",\r\n \ - \ \"51.141.45.207/32\",\r\n \"51.141.90.252/32\",\r\n \ - \ \"2603:1020:605:402::a0/123\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AppService.WestCentralUS\",\r\n \"id\": \"\ - AppService.WestCentralUS\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.71.194.192/27\",\r\n\ - \ \"13.78.150.96/32\",\r\n \"13.78.184.89/32\",\r\n \ - \ \"52.150.140.224/27\",\r\n \"52.161.96.193/32\",\r\n \ - \ \"2603:1030:b04:402::a0/123\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AppService.WestEurope\",\r\n \"id\": \"AppService.WestEurope\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"westeurope\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureAppService\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.69.68.0/23\",\r\n \"\ - 13.80.19.74/32\",\r\n \"13.81.7.21/32\",\r\n \"13.81.108.99/32\"\ - ,\r\n \"13.81.215.235/32\",\r\n \"13.94.143.57/32\",\r\n\ - \ \"13.94.192.98/32\",\r\n \"13.94.211.38/32\",\r\n \ - \ \"13.95.82.181/32\",\r\n \"13.95.93.152/32\",\r\n \ - \ \"13.95.150.128/32\",\r\n \"13.95.238.192/32\",\r\n \"\ - 20.50.2.0/23\",\r\n \"23.97.160.56/32\",\r\n \"23.97.160.74/32\"\ - ,\r\n \"23.97.162.202/32\",\r\n \"23.97.195.129/32\",\r\n\ - \ \"23.97.208.18/32\",\r\n \"23.97.214.177/32\",\r\n \ - \ \"23.97.216.47/32\",\r\n \"23.97.224.11/32\",\r\n \ - \ \"23.100.1.29/32\",\r\n \"23.101.67.245/32\",\r\n \"\ - 40.68.40.55/32\",\r\n \"40.68.205.178/32\",\r\n \"40.68.208.131/32\"\ - ,\r\n \"40.68.210.104/32\",\r\n \"40.68.214.185/32\",\r\n\ - \ \"40.113.126.251/32\",\r\n \"40.113.131.37/32\",\r\n \ - \ \"40.113.136.240/32\",\r\n \"40.113.142.219/32\",\r\n \ - \ \"40.114.194.188/32\",\r\n \"40.114.210.78/32\",\r\n \ - \ \"40.114.228.161/32\",\r\n \"40.114.237.65/32\",\r\n \ - \ \"40.114.243.70/32\",\r\n \"40.115.55.251/32\",\r\n \ - \ \"40.118.29.72/32\",\r\n \"40.118.71.240/32\",\r\n \ - \ \"40.118.96.231/32\",\r\n \"40.118.100.127/32\",\r\n \ - \ \"40.118.101.67/32\",\r\n \"40.118.102.46/32\",\r\n \"\ - 51.105.172.25/32\",\r\n \"51.136.14.31/32\",\r\n \"51.137.106.13/32\"\ - ,\r\n \"51.144.7.192/32\",\r\n \"51.144.107.53/32\",\r\n\ - \ \"51.144.116.43/32\",\r\n \"51.144.164.215/32\",\r\n \ - \ \"51.144.182.8/32\",\r\n \"52.166.78.97/32\",\r\n \ - \ \"52.166.113.188/32\",\r\n \"52.166.119.99/32\",\r\n \ - \ \"52.166.178.208/32\",\r\n \"52.166.181.85/32\",\r\n \ - \ \"52.166.198.163/32\",\r\n \"52.174.3.80/32\",\r\n \"\ - 52.174.7.133/32\",\r\n \"52.174.35.5/32\",\r\n \"52.174.106.15/32\"\ - ,\r\n \"52.174.150.25/32\",\r\n \"52.174.181.178/32\",\r\ - \n \"52.174.184.18/32\",\r\n \"52.174.193.210/32\",\r\n\ - \ \"52.174.235.29/32\",\r\n \"52.178.29.39/32\",\r\n \ - \ \"52.178.37.244/32\",\r\n \"52.178.43.209/32\",\r\n \ - \ \"52.178.45.139/32\",\r\n \"52.178.46.181/32\",\r\n \ - \ \"52.178.75.200/32\",\r\n \"52.178.79.163/32\",\r\n \ - \ \"52.178.89.129/32\",\r\n \"52.178.90.230/32\",\r\n \"\ - 52.178.92.96/32\",\r\n \"52.178.105.179/32\",\r\n \"52.178.114.226/32\"\ - ,\r\n \"52.232.19.237/32\",\r\n \"52.232.26.228/32\",\r\n\ - \ \"52.232.33.202/32\",\r\n \"52.232.56.79/32\",\r\n \ - \ \"52.232.127.196/32\",\r\n \"52.233.128.61/32\",\r\n \ - \ \"52.233.133.18/32\",\r\n \"52.233.133.121/32\",\r\n \ - \ \"52.233.155.168/32\",\r\n \"52.233.164.195/32\",\r\n \ - \ \"52.233.175.59/32\",\r\n \"52.233.184.181/32\",\r\n \ - \ \"52.233.198.206/32\",\r\n \"65.52.128.33/32\",\r\n \ - \ \"65.52.130.1/32\",\r\n \"104.40.129.89/32\",\r\n \"\ - 104.40.147.180/32\",\r\n \"104.40.147.216/32\",\r\n \"104.40.158.55/32\"\ - ,\r\n \"104.40.179.243/32\",\r\n \"104.40.183.236/32\",\r\ - \n \"104.40.185.192/32\",\r\n \"104.40.187.26/32\",\r\n\ - \ \"104.40.191.174/32\",\r\n \"104.40.210.25/32\",\r\n \ - \ \"104.40.215.219/32\",\r\n \"104.40.222.81/32\",\r\n \ - \ \"104.40.250.100/32\",\r\n \"104.45.1.117/32\",\r\n \ - \ \"104.45.14.249/32\",\r\n \"104.46.38.245/32\",\r\n \ - \ \"104.46.44.78/32\",\r\n \"104.46.61.116/32\",\r\n \ - \ \"104.47.137.62/32\",\r\n \"104.47.151.115/32\",\r\n \"\ - 104.47.160.14/32\",\r\n \"104.47.164.119/32\",\r\n \"104.214.231.110/32\"\ - ,\r\n \"104.214.236.47/32\",\r\n \"104.214.237.135/32\"\ - ,\r\n \"137.117.166.35/32\",\r\n \"137.117.175.14/32\",\r\ - \n \"137.117.203.130/32\",\r\n \"137.117.211.244/32\",\r\ - \n \"137.117.218.101/32\",\r\n \"137.117.224.218/32\",\r\ - \n \"137.117.225.87/32\",\r\n \"168.63.5.231/32\",\r\n \ - \ \"168.63.107.5/32\",\r\n \"191.233.82.44/32\",\r\n \ - \ \"191.233.85.165/32\",\r\n \"191.233.87.194/32\",\r\n \ - \ \"2603:1020:206:402::a0/123\",\r\n \"2603:1020:206:802::a0/123\"\ - ,\r\n \"2603:1020:206:c02::a0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AppService.WestIndia\",\r\n \"id\"\ - : \"AppService.WestIndia\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"52.136.50.0/27\",\r\n \ - \ \"104.211.146.96/27\",\r\n \"104.211.160.159/32\",\r\n\ - \ \"104.211.179.11/32\",\r\n \"104.211.184.197/32\",\r\n\ - \ \"2603:1040:806:402::a0/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AppService.WestUS\",\r\n \"id\": \"AppService.WestUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"westus\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureAppService\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.64.73.110/32\",\r\n \ - \ \"13.91.40.166/32\",\r\n \"13.91.242.166/32\",\r\n \"\ - 13.93.141.10/32\",\r\n \"13.93.158.16/32\",\r\n \"13.93.220.109/32\"\ - ,\r\n \"13.93.231.75/32\",\r\n \"23.99.0.12/32\",\r\n \ - \ \"23.99.65.65/32\",\r\n \"23.99.91.55/32\",\r\n \ - \ \"23.100.46.198/32\",\r\n \"23.101.203.117/32\",\r\n \ - \ \"23.101.203.214/32\",\r\n \"23.101.207.250/32\",\r\n \ - \ \"40.78.18.232/32\",\r\n \"40.78.25.157/32\",\r\n \"40.78.48.219/32\"\ - ,\r\n \"40.80.155.102/32\",\r\n \"40.80.156.205/32\",\r\n\ - \ \"40.82.255.128/25\",\r\n \"40.83.145.50/32\",\r\n \ - \ \"40.83.150.233/32\",\r\n \"40.83.182.206/32\",\r\n \ - \ \"40.83.183.236/32\",\r\n \"40.83.184.25/32\",\r\n \ - \ \"40.112.142.148/32\",\r\n \"40.112.143.134/32\",\r\n \ - \ \"40.112.143.140/32\",\r\n \"40.112.143.214/32\",\r\n \ - \ \"40.112.165.44/32\",\r\n \"40.112.166.161/32\",\r\n \ - \ \"40.112.191.159/32\",\r\n \"40.112.192.69/32\",\r\n \"\ - 40.112.216.189/32\",\r\n \"40.112.243.0/25\",\r\n \"40.118.185.161/32\"\ - ,\r\n \"40.118.235.113/32\",\r\n \"40.118.246.51/32\",\r\ - \n \"40.118.255.59/32\",\r\n \"52.160.40.218/32\",\r\n \ - \ \"104.40.3.53/32\",\r\n \"104.40.11.192/32\",\r\n \ - \ \"104.40.28.133/32\",\r\n \"104.40.53.219/32\",\r\n \ - \ \"104.40.63.98/32\",\r\n \"104.40.84.133/32\",\r\n \"\ - 104.40.92.107/32\",\r\n \"104.42.53.248/32\",\r\n \"104.42.78.153/32\"\ - ,\r\n \"104.42.128.171/32\",\r\n \"104.42.148.55/32\",\r\ - \n \"104.42.152.64/32\",\r\n \"104.42.154.105/32\",\r\n\ - \ \"104.42.188.146/32\",\r\n \"104.42.231.5/32\",\r\n \ - \ \"104.45.226.98/32\",\r\n \"104.45.231.79/32\",\r\n \ - \ \"104.210.38.149/32\",\r\n \"137.117.9.212/32\",\r\n \ - \ \"137.117.17.70/32\",\r\n \"138.91.224.84/32\",\r\n \ - \ \"138.91.225.40/32\",\r\n \"138.91.240.81/32\",\r\n \ - \ \"168.62.20.37/32\",\r\n \"191.236.80.12/32\",\r\n \"\ - 191.236.106.123/32\",\r\n \"191.239.58.162/32\",\r\n \"\ - 2603:1030:a07:402::a0/123\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"AppService.WestUS2\",\r\n \"id\": \"AppService.WestUS2\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"westus2\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureAppService\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.66.138.96/27\",\r\n \ - \ \"13.66.209.135/32\",\r\n \"13.66.212.205/32\",\r\n \"\ - 13.66.226.80/32\",\r\n \"13.66.231.217/32\",\r\n \"13.66.241.134/32\"\ - ,\r\n \"13.66.244.249/32\",\r\n \"13.77.157.133/32\",\r\n\ - \ \"13.77.160.237/32\",\r\n \"13.77.182.13/32\",\r\n \ - \ \"20.42.128.96/27\",\r\n \"40.64.128.224/27\",\r\n \ - \ \"51.143.102.21/32\",\r\n \"52.151.62.51/32\",\r\n \ - \ \"52.175.202.25/32\",\r\n \"52.175.254.10/32\",\r\n \"\ - 52.183.82.125/32\",\r\n \"52.229.30.210/32\",\r\n \"2603:1030:c06:400::8a0/123\"\ - ,\r\n \"2603:1030:c06:802::a0/123\",\r\n \"2603:1030:c06:c02::a0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.WestUS3\"\ - ,\r\n \"id\": \"AppService.WestUS3\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.40.24.16/32\"\ - ,\r\n \"20.40.24.21/32\",\r\n \"20.40.24.23/32\",\r\n \ - \ \"20.40.24.30/31\",\r\n \"20.40.24.34/32\",\r\n \ - \ \"20.40.24.37/32\",\r\n \"20.40.24.38/31\",\r\n \"20.40.24.46/32\"\ - ,\r\n \"20.40.24.49/32\",\r\n \"20.40.24.50/31\",\r\n \ - \ \"20.40.24.54/31\",\r\n \"20.40.24.62/31\",\r\n \ - \ \"20.40.24.81/32\",\r\n \"20.40.24.89/32\",\r\n \"20.40.24.108/32\"\ - ,\r\n \"20.40.24.144/32\",\r\n \"20.150.128.0/24\",\r\n\ - \ \"20.150.170.192/27\",\r\n \"20.150.178.160/27\",\r\n\ - \ \"20.150.186.160/27\",\r\n \"20.150.247.0/24\",\r\n \ - \ \"20.150.248.7/32\",\r\n \"20.150.248.8/32\",\r\n \ - \ \"20.150.248.12/31\",\r\n \"20.150.248.15/32\",\r\n \ - \ \"20.150.248.16/28\",\r\n \"20.150.248.32/31\",\r\n \"\ - 20.150.248.36/32\",\r\n \"20.150.248.38/31\",\r\n \"20.150.248.43/32\"\ - ,\r\n \"20.150.248.44/31\",\r\n \"20.150.248.48/29\",\r\n\ - \ \"20.150.248.56/32\",\r\n \"20.150.248.59/32\",\r\n \ - \ \"20.150.248.60/32\",\r\n \"20.150.248.63/32\",\r\n \ - \ \"20.150.248.64/31\",\r\n \"20.150.248.68/31\",\r\n \ - \ \"20.150.248.71/32\",\r\n \"20.150.248.72/29\",\r\n \ - \ \"20.150.248.80/32\",\r\n \"20.150.248.82/31\",\r\n \"\ - 20.150.248.86/31\",\r\n \"20.150.248.89/32\",\r\n \"20.150.248.90/31\"\ - ,\r\n \"20.150.248.100/31\",\r\n \"20.150.248.104/31\",\r\ - \n \"20.150.248.110/31\",\r\n \"20.150.248.112/30\",\r\n\ - \ \"20.150.248.118/31\",\r\n \"20.150.248.122/31\",\r\n\ - \ \"20.150.248.124/31\",\r\n \"20.150.248.128/31\",\r\n\ - \ \"20.150.248.134/31\",\r\n \"20.150.248.136/29\",\r\n\ - \ \"20.150.248.144/28\",\r\n \"20.150.248.160/27\",\r\n\ - \ \"20.150.248.192/29\",\r\n \"20.150.248.200/32\",\r\n\ - \ \"20.150.248.202/31\",\r\n \"2603:1030:504:402::a0/123\"\ - ,\r\n \"2603:1030:504:802::160/123\",\r\n \"2603:1030:504:802::360/123\"\ - ,\r\n \"2603:1030:504:c02::3a0/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AppServiceManagement\",\r\n \"\ - id\": \"AppServiceManagement\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"7\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAppServiceManagement\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.64.115.203/32\",\r\n\ - \ \"13.66.140.0/26\",\r\n \"13.66.225.188/32\",\r\n \ - \ \"13.67.8.128/26\",\r\n \"13.69.64.128/26\",\r\n \ - \ \"13.69.116.0/26\",\r\n \"13.69.227.128/26\",\r\n \"13.70.72.64/26\"\ - ,\r\n \"13.70.73.128/26\",\r\n \"13.71.170.64/26\",\r\n\ - \ \"13.71.173.0/26\",\r\n \"13.71.173.128/26\",\r\n \ - \ \"13.71.194.128/26\",\r\n \"13.73.240.128/26\",\r\n \ - \ \"13.73.242.64/26\",\r\n \"13.75.34.192/26\",\r\n \"\ - 13.75.127.117/32\",\r\n \"13.77.50.128/26\",\r\n \"13.78.106.128/26\"\ - ,\r\n \"13.78.109.0/26\",\r\n \"13.78.148.75/32\",\r\n \ - \ \"13.86.120.89/32\",\r\n \"13.87.56.128/26\",\r\n \ - \ \"13.87.122.128/26\",\r\n \"13.89.171.0/26\",\r\n \ - \ \"13.94.141.115/32\",\r\n \"13.94.143.126/32\",\r\n \"\ - 13.94.149.179/32\",\r\n \"20.21.42.192/26\",\r\n \"20.21.53.160/28\"\ - ,\r\n \"20.21.66.192/26\",\r\n \"20.21.74.192/26\",\r\n\ - \ \"20.36.42.12/32\",\r\n \"20.36.78.208/32\",\r\n \ - \ \"20.36.106.128/26\",\r\n \"20.36.114.64/26\",\r\n \ - \ \"20.36.144.192/26\",\r\n \"20.37.74.128/26\",\r\n \"\ - 20.42.68.128/26\",\r\n \"20.42.74.128/26\",\r\n \"20.43.120.128/26\"\ - ,\r\n \"20.44.2.192/26\",\r\n \"20.44.13.128/26\",\r\n \ - \ \"20.44.27.0/26\",\r\n \"20.45.75.173/32\",\r\n \ - \ \"20.45.94.96/28\",\r\n \"20.45.125.128/26\",\r\n \"\ - 20.45.242.144/28\",\r\n \"20.47.216.128/26\",\r\n \"20.47.233.128/28\"\ - ,\r\n \"20.48.202.48/28\",\r\n \"20.49.82.128/26\",\r\n\ - \ \"20.49.90.128/26\",\r\n \"20.50.72.192/26\",\r\n \ - \ \"20.50.80.128/26\",\r\n \"20.50.201.128/26\",\r\n \ - \ \"20.51.5.48/28\",\r\n \"20.52.95.16/28\",\r\n \"20.53.53.208/28\"\ - ,\r\n \"20.53.60.208/28\",\r\n \"20.59.79.208/28\",\r\n\ - \ \"20.69.5.128/28\",\r\n \"20.70.222.64/28\",\r\n \ - \ \"20.72.26.192/26\",\r\n \"20.83.192.128/26\",\r\n \ - \ \"20.83.221.240/28\",\r\n \"20.87.80.32/28\",\r\n \"\ - 20.88.157.128/28\",\r\n \"20.89.12.144/28\",\r\n \"20.90.32.160/28\"\ - ,\r\n \"20.90.132.96/28\",\r\n \"20.92.4.160/28\",\r\n \ - \ \"20.97.34.224/28\",\r\n \"20.98.146.32/28\",\r\n \ - \ \"20.98.193.224/28\",\r\n \"20.99.24.16/28\",\r\n \ - \ \"20.100.2.0/28\",\r\n \"20.105.208.208/28\",\r\n \"20.111.0.208/28\"\ - ,\r\n \"20.150.130.208/28\",\r\n \"20.150.171.0/26\",\r\n\ - \ \"20.150.179.0/26\",\r\n \"20.150.187.0/26\",\r\n \ - \ \"20.150.248.2/32\",\r\n \"20.150.251.21/32\",\r\n \ - \ \"20.189.194.64/28\",\r\n \"20.192.84.144/28\",\r\n \ - \ \"20.192.99.0/26\",\r\n \"20.192.153.112/28\",\r\n \"\ - 20.192.170.16/28\",\r\n \"20.192.234.192/26\",\r\n \"20.193.202.192/26\"\ - ,\r\n \"20.194.66.128/26\",\r\n \"20.194.129.0/26\",\r\n\ - \ \"20.195.85.128/28\",\r\n \"20.200.196.64/28\",\r\n \ - \ \"20.205.69.32/28\",\r\n \"20.205.74.192/26\",\r\n \ - \ \"20.205.82.192/26\",\r\n \"20.205.192.0/26\",\r\n \ - \ \"20.206.0.112/28\",\r\n \"20.207.1.32/28\",\r\n \"20.208.5.0/28\"\ - ,\r\n \"20.208.18.192/26\",\r\n \"23.96.195.3/32\",\r\n\ - \ \"23.97.120.79/32\",\r\n \"23.98.113.0/26\",\r\n \ - \ \"23.99.115.5/32\",\r\n \"23.99.217.42/32\",\r\n \"\ - 23.100.216.80/28\",\r\n \"23.100.226.236/32\",\r\n \"23.101.234.41/32\"\ - ,\r\n \"23.102.188.65/32\",\r\n \"40.64.9.160/28\",\r\n\ - \ \"40.64.113.192/26\",\r\n \"40.67.59.0/26\",\r\n \ - \ \"40.69.106.128/26\",\r\n \"40.70.146.128/26\",\r\n \ - \ \"40.71.11.0/26\",\r\n \"40.71.13.64/26\",\r\n \"40.74.100.64/26\"\ - ,\r\n \"40.74.151.128/26\",\r\n \"40.78.194.128/26\",\r\n\ - \ \"40.79.130.64/26\",\r\n \"40.79.142.128/26\",\r\n \ - \ \"40.79.149.192/26\",\r\n \"40.79.165.0/26\",\r\n \ - \ \"40.79.175.0/26\",\r\n \"40.79.178.128/26\",\r\n \"\ - 40.79.191.64/26\",\r\n \"40.80.53.128/26\",\r\n \"40.83.120.64/32\"\ - ,\r\n \"40.83.121.56/32\",\r\n \"40.83.125.161/32\",\r\n\ - \ \"40.85.230.101/32\",\r\n \"40.86.229.100/32\",\r\n \ - \ \"40.89.122.64/26\",\r\n \"40.90.240.166/32\",\r\n \ - \ \"40.91.126.196/32\",\r\n \"40.112.242.192/26\",\r\n \ - \ \"40.119.4.111/32\",\r\n \"40.120.74.128/26\",\r\n \ - \ \"40.120.87.208/28\",\r\n \"40.123.229.242/32\",\r\n \"\ - 40.124.47.188/32\",\r\n \"40.127.3.19/32\",\r\n \"51.12.20.192/27\"\ - ,\r\n \"51.12.22.224/28\",\r\n \"51.12.29.32/27\",\r\n \ - \ \"51.12.73.192/28\",\r\n \"51.12.99.0/26\",\r\n \ - \ \"51.12.203.0/26\",\r\n \"51.12.227.0/26\",\r\n \"51.12.235.0/26\"\ - ,\r\n \"51.13.143.16/28\",\r\n \"51.103.202.192/26\",\r\n\ - \ \"51.104.8.0/26\",\r\n \"51.104.8.128/26\",\r\n \ - \ \"51.105.71.64/26\",\r\n \"51.107.58.192/26\",\r\n \ - \ \"51.107.68.94/32\",\r\n \"51.107.154.192/26\",\r\n \"\ - 51.107.232.208/32\",\r\n \"51.107.255.144/28\",\r\n \"51.116.58.192/26\"\ - ,\r\n \"51.116.75.96/28\",\r\n \"51.116.155.0/26\",\r\n\ - \ \"51.116.156.64/26\",\r\n \"51.116.175.204/32\",\r\n \ - \ \"51.116.208.94/32\",\r\n \"51.116.243.64/26\",\r\n \ - \ \"51.116.251.192/26\",\r\n \"51.120.79.170/32\",\r\n \ - \ \"51.120.99.0/26\",\r\n \"51.120.107.0/26\",\r\n \ - \ \"51.120.164.77/32\",\r\n \"51.120.211.0/26\",\r\n \"\ - 51.120.219.0/26\",\r\n \"51.132.193.0/26\",\r\n \"51.140.146.64/26\"\ - ,\r\n \"51.140.185.75/32\",\r\n \"51.140.210.128/26\",\r\ - \n \"51.141.8.34/32\",\r\n \"52.136.136.72/32\",\r\n \ - \ \"52.136.191.16/28\",\r\n \"52.143.136.64/32\",\r\n \ - \ \"52.146.139.224/28\",\r\n \"52.147.119.32/28\",\r\n \ - \ \"52.151.25.45/32\",\r\n \"52.162.80.89/32\",\r\n \"\ - 52.162.106.192/26\",\r\n \"52.162.107.0/25\",\r\n \"52.165.152.214/32\"\ - ,\r\n \"52.165.153.122/32\",\r\n \"52.165.154.193/32\",\r\ - \n \"52.165.158.140/32\",\r\n \"52.167.111.64/26\",\r\n\ - \ \"52.174.22.21/32\",\r\n \"52.178.177.147/32\",\r\n \ - \ \"52.178.184.149/32\",\r\n \"52.178.190.65/32\",\r\n \ - \ \"52.178.195.197/32\",\r\n \"52.180.179.14/32\",\r\n \ - \ \"52.182.143.128/26\",\r\n \"52.187.56.50/32\",\r\n \ - \ \"52.187.59.251/32\",\r\n \"52.187.63.19/32\",\r\n \ - \ \"52.187.63.37/32\",\r\n \"52.224.105.172/32\",\r\n \"\ - 52.225.177.15/32\",\r\n \"52.225.177.153/32\",\r\n \"52.225.177.238/32\"\ - ,\r\n \"52.231.18.64/26\",\r\n \"52.231.32.117/32\",\r\n\ - \ \"52.231.146.128/26\",\r\n \"52.231.200.177/32\",\r\n\ - \ \"52.242.40.112/28\",\r\n \"52.246.157.64/26\",\r\n \ - \ \"65.52.14.230/32\",\r\n \"65.52.172.237/32\",\r\n \ - \ \"65.52.193.203/32\",\r\n \"65.52.250.128/26\",\r\n \ - \ \"70.37.57.58/32\",\r\n \"70.37.89.222/32\",\r\n \"\ - 102.37.85.224/28\",\r\n \"102.133.26.192/26\",\r\n \"102.133.64.41/32\"\ - ,\r\n \"102.133.123.0/26\",\r\n \"102.133.123.128/26\",\r\ - \n \"102.133.154.192/26\",\r\n \"102.133.254.64/26\",\r\n\ - \ \"104.41.46.178/32\",\r\n \"104.41.185.116/32\",\r\n \ - \ \"104.43.165.73/32\",\r\n \"104.43.242.137/32\",\r\n \ - \ \"104.44.129.141/32\",\r\n \"104.44.129.243/32\",\r\n \ - \ \"104.44.129.255/32\",\r\n \"104.44.134.255/32\",\r\n \ - \ \"104.45.227.37/32\",\r\n \"104.46.108.135/32\",\r\n \ - \ \"104.208.54.11/32\",\r\n \"104.210.90.65/32\",\r\n \ - \ \"104.211.81.64/26\",\r\n \"104.211.98.24/32\",\r\n \ - \ \"104.211.146.128/26\",\r\n \"104.211.160.229/32\",\r\n \ - \ \"104.211.225.66/32\",\r\n \"104.214.18.192/26\",\r\n \ - \ \"104.214.49.0/32\",\r\n \"104.215.158.33/32\",\r\n \ - \ \"157.55.176.93/32\",\r\n \"157.55.208.185/32\",\r\n \ - \ \"168.61.143.0/26\",\r\n \"168.63.132.240/32\",\r\n \"\ - 168.63.241.160/32\",\r\n \"191.233.50.128/26\",\r\n \"191.233.94.45/32\"\ - ,\r\n \"191.233.203.64/26\",\r\n \"191.234.147.0/26\",\r\ - \n \"191.234.155.0/26\",\r\n \"191.236.60.72/32\",\r\n \ - \ \"191.236.154.88/32\",\r\n \"191.237.222.191/32\",\r\n\ - \ \"191.238.77.240/28\",\r\n \"191.239.104.48/32\",\r\n\ - \ \"2603:1000:4:1::480/123\",\r\n \"2603:1000:4:402::100/122\"\ - ,\r\n \"2603:1000:104:3::20/123\",\r\n \"2603:1000:104:402::100/122\"\ - ,\r\n \"2603:1000:104:802::100/122\",\r\n \"2603:1000:104:c02::100/122\"\ - ,\r\n \"2603:1010:6:2::700/123\",\r\n \"2603:1010:6:402::100/122\"\ - ,\r\n \"2603:1010:6:802::100/122\",\r\n \"2603:1010:6:c02::100/122\"\ - ,\r\n \"2603:1010:101:1::4a0/123\",\r\n \"2603:1010:101:402::100/122\"\ - ,\r\n \"2603:1010:304:1::480/123\",\r\n \"2603:1010:304:402::100/122\"\ - ,\r\n \"2603:1010:404:1::480/123\",\r\n \"2603:1010:404:402::100/122\"\ - ,\r\n \"2603:1020:5:4::220/123\",\r\n \"2603:1020:5:402::100/122\"\ - ,\r\n \"2603:1020:5:802::100/122\",\r\n \"2603:1020:5:c02::100/122\"\ - ,\r\n \"2603:1020:206::7a0/123\",\r\n \"2603:1020:206:402::100/122\"\ - ,\r\n \"2603:1020:206:802::100/122\",\r\n \"2603:1020:206:c02::100/122\"\ - ,\r\n \"2603:1020:305:402::100/122\",\r\n \"2603:1020:405:402::100/122\"\ - ,\r\n \"2603:1020:605:1::4a0/123\",\r\n \"2603:1020:605:402::100/122\"\ - ,\r\n \"2603:1020:705:2::720/123\",\r\n \"2603:1020:705:402::100/122\"\ - ,\r\n \"2603:1020:705:802::100/122\",\r\n \"2603:1020:705:c02::100/122\"\ - ,\r\n \"2603:1020:805:2::500/123\",\r\n \"2603:1020:805:402::100/122\"\ - ,\r\n \"2603:1020:805:802::100/122\",\r\n \"2603:1020:805:c02::100/122\"\ - ,\r\n \"2603:1020:905:1::480/123\",\r\n \"2603:1020:905:402::100/122\"\ - ,\r\n \"2603:1020:a04:3::200/123\",\r\n \"2603:1020:a04:402::100/122\"\ - ,\r\n \"2603:1020:a04:802::100/122\",\r\n \"2603:1020:a04:c02::100/122\"\ - ,\r\n \"2603:1020:b04:1::4a0/123\",\r\n \"2603:1020:b04:402::100/122\"\ - ,\r\n \"2603:1020:c04:2::500/123\",\r\n \"2603:1020:c04:402::100/122\"\ - ,\r\n \"2603:1020:c04:802::100/122\",\r\n \"2603:1020:c04:c02::100/122\"\ - ,\r\n \"2603:1020:d04:1::480/123\",\r\n \"2603:1020:d04:402::100/122\"\ - ,\r\n \"2603:1020:e04:3::4c0/123\",\r\n \"2603:1020:e04:402::100/122\"\ - ,\r\n \"2603:1020:e04:802::100/122\",\r\n \"2603:1020:e04:c02::100/122\"\ - ,\r\n \"2603:1020:f04:1::480/123\",\r\n \"2603:1020:f04:402::100/122\"\ - ,\r\n \"2603:1020:1004:3::60/123\",\r\n \"2603:1020:1004:400::440/122\"\ - ,\r\n \"2603:1020:1004:800::80/122\",\r\n \"2603:1020:1004:800::200/122\"\ - ,\r\n \"2603:1020:1004:800::380/122\",\r\n \"2603:1020:1004:c02::3c0/122\"\ - ,\r\n \"2603:1020:1104:2::200/123\",\r\n \"2603:1020:1104:400::100/122\"\ - ,\r\n \"2603:1030:f:3::700/123\",\r\n \"2603:1030:f:400::900/122\"\ - ,\r\n \"2603:1030:10::7a0/123\",\r\n \"2603:1030:10:402::100/122\"\ - ,\r\n \"2603:1030:10:802::100/122\",\r\n \"2603:1030:10:c02::100/122\"\ - ,\r\n \"2603:1030:104:2::c0/123\",\r\n \"2603:1030:104:402::100/122\"\ - ,\r\n \"2603:1030:104:402::600/122\",\r\n \"2603:1030:104:802::c0/122\"\ - ,\r\n \"2603:1030:107:400::80/122\",\r\n \"2603:1030:210::7a0/123\"\ - ,\r\n \"2603:1030:210:402::100/122\",\r\n \"2603:1030:210:802::100/122\"\ - ,\r\n \"2603:1030:210:c02::100/122\",\r\n \"2603:1030:302::a0/123\"\ - ,\r\n \"2603:1030:40b:3::360/123\",\r\n \"2603:1030:40b:400::900/122\"\ - ,\r\n \"2603:1030:40b:800::100/122\",\r\n \"2603:1030:40b:c00::100/122\"\ - ,\r\n \"2603:1030:40c::7c0/123\",\r\n \"2603:1030:40c:402::100/122\"\ - ,\r\n \"2603:1030:40c:802::100/122\",\r\n \"2603:1030:40c:c02::100/122\"\ - ,\r\n \"2603:1030:504:2::740/123\",\r\n \"2603:1030:504:402::400/122\"\ - ,\r\n \"2603:1030:504:802::80/122\",\r\n \"2603:1030:504:802::380/122\"\ - ,\r\n \"2603:1030:504:c02::440/122\",\r\n \"2603:1030:608:1::4a0/123\"\ - ,\r\n \"2603:1030:608:402::100/122\",\r\n \"2603:1030:807:3::220/123\"\ - ,\r\n \"2603:1030:807:402::100/122\",\r\n \"2603:1030:807:802::100/122\"\ - ,\r\n \"2603:1030:807:c02::100/122\",\r\n \"2603:1030:a07:4::140/123\"\ - ,\r\n \"2603:1030:a07:402::880/122\",\r\n \"2603:1030:b04:1::4a0/123\"\ - ,\r\n \"2603:1030:b04:402::100/122\",\r\n \"2603:1030:c06:5::180/123\"\ - ,\r\n \"2603:1030:c06:400::900/122\",\r\n \"2603:1030:c06:802::100/122\"\ - ,\r\n \"2603:1030:c06:c02::100/122\",\r\n \"2603:1030:f05:2::700/123\"\ - ,\r\n \"2603:1030:f05:402::100/122\",\r\n \"2603:1030:f05:802::100/122\"\ - ,\r\n \"2603:1030:f05:c02::100/122\",\r\n \"2603:1030:1005:1::4a0/123\"\ - ,\r\n \"2603:1030:1005:402::100/122\",\r\n \"2603:1040:5:3::220/123\"\ - ,\r\n \"2603:1040:5:402::100/122\",\r\n \"2603:1040:5:802::100/122\"\ - ,\r\n \"2603:1040:5:c02::100/122\",\r\n \"2603:1040:207:402::100/122\"\ - ,\r\n \"2603:1040:207:800::80/122\",\r\n \"2603:1040:207:c00::80/122\"\ - ,\r\n \"2603:1040:407:2::500/123\",\r\n \"2603:1040:407:402::100/122\"\ - ,\r\n \"2603:1040:407:802::100/122\",\r\n \"2603:1040:407:c02::100/122\"\ - ,\r\n \"2603:1040:606:1::4a0/123\",\r\n \"2603:1040:606:402::100/122\"\ - ,\r\n \"2603:1040:806:1::2a0/123\",\r\n \"2603:1040:806:402::100/122\"\ - ,\r\n \"2603:1040:904:2::500/123\",\r\n \"2603:1040:904:402::100/122\"\ - ,\r\n \"2603:1040:904:802::100/122\",\r\n \"2603:1040:904:c02::100/122\"\ - ,\r\n \"2603:1040:a06:3::220/123\",\r\n \"2603:1040:a06:402::100/122\"\ - ,\r\n \"2603:1040:a06:802::100/122\",\r\n \"2603:1040:a06:c02::100/122\"\ - ,\r\n \"2603:1040:b04:1::480/123\",\r\n \"2603:1040:b04:402::100/122\"\ - ,\r\n \"2603:1040:c06:1::4a0/123\",\r\n \"2603:1040:c06:402::100/122\"\ - ,\r\n \"2603:1040:d04:3::40/123\",\r\n \"2603:1040:d04:400::440/122\"\ - ,\r\n \"2603:1040:d04:800::80/122\",\r\n \"2603:1040:d04:800::200/122\"\ - ,\r\n \"2603:1040:d04:800::380/122\",\r\n \"2603:1040:e05:1::e0/123\"\ - ,\r\n \"2603:1040:f05:3::100/123\",\r\n \"2603:1040:f05:402::100/122\"\ - ,\r\n \"2603:1040:f05:802::100/122\",\r\n \"2603:1040:f05:c02::100/122\"\ - ,\r\n \"2603:1040:1002:2::340/123\",\r\n \"2603:1040:1002:400::80/122\"\ - ,\r\n \"2603:1040:1002:800::80/122\",\r\n \"2603:1040:1002:c00::80/122\"\ - ,\r\n \"2603:1040:1104:2::260/123\",\r\n \"2603:1040:1104:400::100/122\"\ - ,\r\n \"2603:1050:6:2::500/123\",\r\n \"2603:1050:6:402::100/122\"\ - ,\r\n \"2603:1050:6:802::100/122\",\r\n \"2603:1050:6:c02::100/122\"\ - ,\r\n \"2603:1050:403:1::4c0/123\",\r\n \"2603:1050:403:400::100/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureActiveDirectory\"\ - ,\r\n \"id\": \"AzureActiveDirectory\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\",\r\n \"VSE\"\r\n ],\r\n \"systemService\"\ - : \"AzureAD\",\r\n \"addressPrefixes\": [\r\n \"13.64.151.161/32\"\ - ,\r\n \"13.66.141.64/27\",\r\n \"13.67.9.224/27\",\r\n \ - \ \"13.69.66.160/27\",\r\n \"13.69.229.96/27\",\r\n \ - \ \"13.70.73.32/27\",\r\n \"13.71.172.160/27\",\r\n \ - \ \"13.71.195.224/27\",\r\n \"13.71.201.64/26\",\r\n \"\ - 13.73.240.32/27\",\r\n \"13.74.104.0/26\",\r\n \"13.74.249.156/32\"\ - ,\r\n \"13.75.38.32/27\",\r\n \"13.75.105.168/32\",\r\n\ - \ \"13.77.52.160/27\",\r\n \"13.78.108.192/27\",\r\n \ - \ \"13.78.172.246/32\",\r\n \"13.79.37.247/32\",\r\n \ - \ \"13.86.219.0/27\",\r\n \"13.87.16.0/26\",\r\n \"13.87.57.160/27\"\ - ,\r\n \"13.87.123.160/27\",\r\n \"13.89.174.0/27\",\r\n\ - \ \"20.36.107.192/27\",\r\n \"20.36.115.64/27\",\r\n \ - \ \"20.37.75.96/27\",\r\n \"20.40.228.64/28\",\r\n \ - \ \"20.43.120.32/27\",\r\n \"20.44.3.160/27\",\r\n \"20.44.16.32/27\"\ - ,\r\n \"20.46.10.64/27\",\r\n \"20.51.9.80/28\",\r\n \ - \ \"20.51.14.72/31\",\r\n \"20.51.16.128/27\",\r\n \ - \ \"20.61.98.160/27\",\r\n \"20.61.99.128/28\",\r\n \"\ - 20.62.58.80/28\",\r\n \"20.62.129.0/27\",\r\n \"20.62.129.240/28\"\ - ,\r\n \"20.62.134.74/31\",\r\n \"20.65.132.96/28\",\r\n\ - \ \"20.66.2.32/27\",\r\n \"20.66.3.16/28\",\r\n \ - \ \"20.72.21.64/26\",\r\n \"20.88.66.0/27\",\r\n \"20.187.197.32/27\"\ - ,\r\n \"20.187.197.240/28\",\r\n \"20.190.128.0/18\",\r\n\ - \ \"20.194.73.0/28\",\r\n \"20.195.56.102/32\",\r\n \ - \ \"20.195.57.118/32\",\r\n \"20.195.64.192/27\",\r\n \ - \ \"20.195.64.240/28\",\r\n \"23.101.0.70/32\",\r\n \"\ - 23.101.6.190/32\",\r\n \"40.68.160.142/32\",\r\n \"40.69.107.160/27\"\ - ,\r\n \"40.71.13.0/27\",\r\n \"40.74.101.64/27\",\r\n \ - \ \"40.74.146.192/27\",\r\n \"40.78.195.160/27\",\r\n \ - \ \"40.78.203.64/27\",\r\n \"40.79.131.128/27\",\r\n \ - \ \"40.79.179.128/27\",\r\n \"40.83.144.56/32\",\r\n \"\ - 40.126.0.0/18\",\r\n \"51.140.148.192/27\",\r\n \"51.140.208.0/26\"\ - ,\r\n \"51.140.211.192/27\",\r\n \"52.138.65.157/32\",\r\ - \n \"52.138.68.41/32\",\r\n \"52.146.132.96/27\",\r\n \ - \ \"52.146.133.80/28\",\r\n \"52.146.137.66/31\",\r\n \ - \ \"52.150.157.0/27\",\r\n \"52.159.175.31/32\",\r\n \ - \ \"52.161.13.71/32\",\r\n \"52.161.13.95/32\",\r\n \"\ - 52.161.110.169/32\",\r\n \"52.162.110.96/27\",\r\n \"52.169.125.119/32\"\ - ,\r\n \"52.169.218.0/32\",\r\n \"52.174.189.149/32\",\r\n\ - \ \"52.175.18.134/32\",\r\n \"52.178.27.112/32\",\r\n \ - \ \"52.179.122.218/32\",\r\n \"52.179.126.223/32\",\r\n \ - \ \"52.180.177.87/32\",\r\n \"52.180.179.108/32\",\r\n \ - \ \"52.180.181.61/32\",\r\n \"52.180.183.8/32\",\r\n \ - \ \"52.187.19.1/32\",\r\n \"52.187.113.48/32\",\r\n \"\ - 52.187.117.83/32\",\r\n \"52.187.120.237/32\",\r\n \"52.225.184.198/32\"\ - ,\r\n \"52.225.188.89/32\",\r\n \"52.226.169.40/32\",\r\n\ - \ \"52.231.19.128/27\",\r\n \"52.231.147.192/27\",\r\n \ - \ \"65.52.251.96/27\",\r\n \"104.40.84.19/32\",\r\n \ - \ \"104.40.87.209/32\",\r\n \"104.40.156.18/32\",\r\n \ - \ \"104.40.168.0/26\",\r\n \"104.41.159.212/32\",\r\n \ - \ \"104.45.138.161/32\",\r\n \"104.46.178.128/27\",\r\n \ - \ \"104.211.147.160/27\",\r\n \"191.233.204.160/27\",\r\n \ - \ \"2603:1006:2000::/48\",\r\n \"2603:1007:200::/48\",\r\n \ - \ \"2603:1016:1400::/48\",\r\n \"2603:1017::/48\",\r\n \ - \ \"2603:1026:3000::/48\",\r\n \"2603:1027:1::/48\",\r\n \ - \ \"2603:1030:107:2::/120\",\r\n \"2603:1030:107:2::100/121\"\ - ,\r\n \"2603:1036:3000::/48\",\r\n \"2603:1037:1::/48\"\ - ,\r\n \"2603:1046:2000::/48\",\r\n \"2603:1047:1::/48\"\ - ,\r\n \"2603:1056:2000::/48\",\r\n \"2603:1057:2::/48\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureActiveDirectoryDomainServices\"\ - ,\r\n \"id\": \"AzureActiveDirectoryDomainServices\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureIdentity\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.64.151.161/32\",\r\n\ - \ \"13.66.141.64/27\",\r\n \"13.67.9.224/27\",\r\n \ - \ \"13.69.66.160/27\",\r\n \"13.69.229.96/27\",\r\n \ - \ \"13.70.73.32/27\",\r\n \"13.71.172.160/27\",\r\n \"13.71.195.224/27\"\ - ,\r\n \"13.73.240.32/27\",\r\n \"13.74.249.156/32\",\r\n\ - \ \"13.75.38.32/27\",\r\n \"13.75.105.168/32\",\r\n \ - \ \"13.77.52.160/27\",\r\n \"13.78.108.192/27\",\r\n \ - \ \"13.78.172.246/32\",\r\n \"13.79.37.247/32\",\r\n \"\ - 13.86.219.0/27\",\r\n \"13.87.57.160/27\",\r\n \"13.87.123.160/27\"\ - ,\r\n \"13.89.174.0/27\",\r\n \"20.36.107.192/27\",\r\n\ - \ \"20.36.115.64/27\",\r\n \"20.37.75.96/27\",\r\n \ - \ \"20.43.120.32/27\",\r\n \"20.44.3.160/27\",\r\n \"\ - 20.44.16.32/27\",\r\n \"20.46.10.64/27\",\r\n \"20.51.16.128/27\"\ - ,\r\n \"20.61.98.160/27\",\r\n \"20.62.129.0/27\",\r\n \ - \ \"20.66.2.32/27\",\r\n \"20.72.21.64/27\",\r\n \ - \ \"20.187.197.32/27\",\r\n \"20.190.165.48/29\",\r\n \"\ - 20.190.166.48/29\",\r\n \"20.190.166.112/29\",\r\n \"20.190.166.176/29\"\ - ,\r\n \"20.195.56.102/32\",\r\n \"20.195.57.118/32\",\r\n\ - \ \"20.195.64.192/27\",\r\n \"23.101.0.70/32\",\r\n \ - \ \"23.101.6.190/32\",\r\n \"40.68.160.142/32\",\r\n \ - \ \"40.69.107.160/27\",\r\n \"40.71.13.0/27\",\r\n \"\ - 40.74.101.64/27\",\r\n \"40.74.146.192/27\",\r\n \"40.78.195.160/27\"\ - ,\r\n \"40.78.203.64/27\",\r\n \"40.79.131.128/27\",\r\n\ - \ \"40.79.179.128/27\",\r\n \"40.83.144.56/32\",\r\n \ - \ \"40.126.37.48/29\",\r\n \"40.126.38.48/29\",\r\n \ - \ \"40.126.38.112/29\",\r\n \"40.126.38.176/29\",\r\n \ - \ \"51.140.148.192/27\",\r\n \"51.140.211.192/27\",\r\n \ - \ \"52.138.65.157/32\",\r\n \"52.138.68.41/32\",\r\n \"\ - 52.146.132.96/27\",\r\n \"52.150.157.0/27\",\r\n \"52.161.13.71/32\"\ - ,\r\n \"52.161.13.95/32\",\r\n \"52.161.110.169/32\",\r\n\ - \ \"52.162.110.96/27\",\r\n \"52.169.125.119/32\",\r\n \ - \ \"52.169.218.0/32\",\r\n \"52.174.189.149/32\",\r\n \ - \ \"52.175.18.134/32\",\r\n \"52.178.27.112/32\",\r\n \ - \ \"52.179.122.218/32\",\r\n \"52.179.126.223/32\",\r\n \ - \ \"52.180.177.87/32\",\r\n \"52.180.179.108/32\",\r\n \ - \ \"52.180.181.61/32\",\r\n \"52.180.183.8/32\",\r\n \ - \ \"52.187.19.1/32\",\r\n \"52.187.113.48/32\",\r\n \"52.187.117.83/32\"\ - ,\r\n \"52.187.120.237/32\",\r\n \"52.225.184.198/32\",\r\ - \n \"52.225.188.89/32\",\r\n \"52.231.19.128/27\",\r\n \ - \ \"52.231.147.192/27\",\r\n \"65.52.251.96/27\",\r\n \ - \ \"104.40.84.19/32\",\r\n \"104.40.87.209/32\",\r\n \ - \ \"104.40.156.18/32\",\r\n \"104.41.159.212/32\",\r\n \ - \ \"104.45.138.161/32\",\r\n \"104.46.178.128/27\",\r\n \ - \ \"104.211.147.160/27\",\r\n \"191.233.204.160/27\",\r\n \ - \ \"2603:1030:107:2::100/121\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureAdvancedThreatProtection\",\r\n \"id\"\ - : \"AzureAdvancedThreatProtection\",\r\n \"serviceTagChangeNumber\":\ - \ \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAdvancedThreatProtection\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.72.105.31/32\",\r\n\ - \ \"13.72.105.76/32\",\r\n \"13.93.176.195/32\",\r\n \ - \ \"13.93.176.215/32\",\r\n \"20.21.32.24/29\",\r\n \ - \ \"20.36.120.112/29\",\r\n \"20.37.64.112/29\",\r\n \"\ - 20.37.156.192/29\",\r\n \"20.37.195.8/29\",\r\n \"20.37.224.112/29\"\ - ,\r\n \"20.38.84.96/29\",\r\n \"20.38.136.112/29\",\r\n\ - \ \"20.39.11.16/29\",\r\n \"20.41.4.96/29\",\r\n \ - \ \"20.41.65.128/29\",\r\n \"20.41.192.112/29\",\r\n \"\ - 20.42.4.192/29\",\r\n \"20.42.129.176/29\",\r\n \"20.42.224.112/29\"\ - ,\r\n \"20.43.41.144/29\",\r\n \"20.43.65.136/29\",\r\n\ - \ \"20.43.130.88/29\",\r\n \"20.45.112.112/29\",\r\n \ - \ \"20.45.192.112/29\",\r\n \"20.51.14.64/29\",\r\n \ - \ \"20.62.135.224/29\",\r\n \"20.66.6.80/29\",\r\n \"\ - 20.72.16.24/29\",\r\n \"20.82.244.24/29\",\r\n \"20.86.88.184/29\"\ - ,\r\n \"20.150.160.112/29\",\r\n \"20.184.13.55/32\",\r\n\ - \ \"20.184.14.129/32\",\r\n \"20.189.106.120/29\",\r\n \ - \ \"20.192.160.24/29\",\r\n \"20.192.225.16/29\",\r\n \ - \ \"20.195.69.80/29\",\r\n \"40.65.107.78/32\",\r\n \ - \ \"40.65.111.206/32\",\r\n \"40.67.48.112/29\",\r\n \"\ - 40.74.30.96/29\",\r\n \"40.80.56.112/29\",\r\n \"40.80.168.112/29\"\ - ,\r\n \"40.80.188.16/29\",\r\n \"40.82.253.64/29\",\r\n\ - \ \"40.85.133.119/32\",\r\n \"40.85.133.178/32\",\r\n \ - \ \"40.87.44.77/32\",\r\n \"40.87.45.222/32\",\r\n \ - \ \"40.89.16.112/29\",\r\n \"40.119.9.224/29\",\r\n \"\ - 51.12.46.232/29\",\r\n \"51.12.198.192/29\",\r\n \"51.104.25.144/29\"\ - ,\r\n \"51.105.80.112/29\",\r\n \"51.105.88.112/29\",\r\n\ - \ \"51.107.48.112/29\",\r\n \"51.107.144.112/29\",\r\n \ - \ \"51.120.40.112/29\",\r\n \"51.120.224.112/29\",\r\n \ - \ \"51.137.161.128/29\",\r\n \"51.143.183.3/32\",\r\n \ - \ \"51.143.183.52/32\",\r\n \"51.143.192.112/29\",\r\n \ - \ \"51.143.214.56/29\",\r\n \"52.136.48.112/29\",\r\n \ - \ \"52.140.104.112/29\",\r\n \"52.150.139.64/29\",\r\n \ - \ \"52.170.0.116/32\",\r\n \"52.170.1.228/32\",\r\n \"\ - 52.170.249.197/32\",\r\n \"52.174.66.179/32\",\r\n \"52.174.66.180/32\"\ - ,\r\n \"52.225.176.98/32\",\r\n \"52.225.181.34/32\",\r\n\ - \ \"52.225.183.206/32\",\r\n \"52.228.81.128/29\",\r\n \ - \ \"104.42.25.10/32\",\r\n \"104.42.29.8/32\",\r\n \ - \ \"168.63.46.233/32\",\r\n \"168.63.46.241/32\",\r\n \ - \ \"191.233.8.24/29\",\r\n \"191.235.225.136/29\",\r\n \ - \ \"2603:1000:4::140/123\",\r\n \"2603:1000:104:1::140/123\",\r\n\ - \ \"2603:1010:6:1::140/123\",\r\n \"2603:1010:101::140/123\"\ - ,\r\n \"2603:1010:304::140/123\",\r\n \"2603:1010:404::140/123\"\ - ,\r\n \"2603:1020:5:1::140/123\",\r\n \"2603:1020:206:1::140/123\"\ - ,\r\n \"2603:1020:305::140/123\",\r\n \"2603:1020:405::140/123\"\ - ,\r\n \"2603:1020:605::140/123\",\r\n \"2603:1020:705:1::140/123\"\ - ,\r\n \"2603:1020:805:1::140/123\",\r\n \"2603:1020:905::140/123\"\ - ,\r\n \"2603:1020:a04:1::140/123\",\r\n \"2603:1020:b04::140/123\"\ - ,\r\n \"2603:1020:c04:1::140/123\",\r\n \"2603:1020:d04::140/123\"\ - ,\r\n \"2603:1020:e04:1::140/123\",\r\n \"2603:1020:f04::140/123\"\ - ,\r\n \"2603:1020:1004::140/123\",\r\n \"2603:1020:1104::140/123\"\ - ,\r\n \"2603:1030:f:1::140/123\",\r\n \"2603:1030:10:1::140/123\"\ - ,\r\n \"2603:1030:104:1::140/123\",\r\n \"2603:1030:107::140/123\"\ - ,\r\n \"2603:1030:210:1::140/123\",\r\n \"2603:1030:40b:1::140/123\"\ - ,\r\n \"2603:1030:40c:1::140/123\",\r\n \"2603:1030:504:1::140/123\"\ - ,\r\n \"2603:1030:608::140/123\",\r\n \"2603:1030:807:1::140/123\"\ - ,\r\n \"2603:1030:a07::140/123\",\r\n \"2603:1030:b04::140/123\"\ - ,\r\n \"2603:1030:c06:1::140/123\",\r\n \"2603:1030:f05:1::140/123\"\ - ,\r\n \"2603:1030:1005::140/123\",\r\n \"2603:1040:5:1::140/123\"\ - ,\r\n \"2603:1040:207::140/123\",\r\n \"2603:1040:407:1::140/123\"\ - ,\r\n \"2603:1040:606::140/123\",\r\n \"2603:1040:806::140/123\"\ - ,\r\n \"2603:1040:904:1::140/123\",\r\n \"2603:1040:a06:1::140/123\"\ - ,\r\n \"2603:1040:b04::140/123\",\r\n \"2603:1040:c06::140/123\"\ - ,\r\n \"2603:1040:d04::140/123\",\r\n \"2603:1040:f05:1::140/123\"\ - ,\r\n \"2603:1040:1002::c0/123\",\r\n \"2603:1040:1104::140/123\"\ - ,\r\n \"2603:1050:6:1::140/123\",\r\n \"2603:1050:403::140/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureAPIForFHIR\"\ - ,\r\n \"id\": \"AzureAPIForFHIR\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAPIForFHIR\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.67.40.183/32\",\r\n\ - \ \"13.69.233.32/31\",\r\n \"13.70.78.170/31\",\r\n \ - \ \"13.71.175.130/31\",\r\n \"13.71.199.118/31\",\r\n \ - \ \"13.73.244.194/31\",\r\n \"13.73.254.220/30\",\r\n \ - \ \"13.78.111.194/31\",\r\n \"13.80.124.132/32\",\r\n \"\ - 13.82.180.206/32\",\r\n \"13.86.221.218/31\",\r\n \"13.87.58.136/31\"\ - ,\r\n \"13.87.124.136/31\",\r\n \"20.21.36.224/27\",\r\n\ - \ \"20.36.117.192/31\",\r\n \"20.36.123.84/30\",\r\n \ - \ \"20.37.68.224/30\",\r\n \"20.37.76.204/31\",\r\n \ - \ \"20.37.198.142/31\",\r\n \"20.37.227.102/31\",\r\n \ - \ \"20.37.228.12/31\",\r\n \"20.38.128.170/31\",\r\n \"\ - 20.38.141.6/31\",\r\n \"20.38.142.104/31\",\r\n \"20.39.15.58/31\"\ - ,\r\n \"20.40.224.224/31\",\r\n \"20.40.224.228/31\",\r\n\ - \ \"20.40.230.128/28\",\r\n \"20.41.69.50/31\",\r\n \ - \ \"20.41.69.60/31\",\r\n \"20.42.230.234/31\",\r\n \ - \ \"20.43.45.248/30\",\r\n \"20.43.121.122/31\",\r\n \"\ - 20.44.4.232/31\",\r\n \"20.44.19.4/31\",\r\n \"20.45.90.96/28\"\ - ,\r\n \"20.45.112.122/31\",\r\n \"20.45.114.204/31\",\r\n\ - \ \"20.45.117.48/28\",\r\n \"20.45.199.40/30\",\r\n \ - \ \"20.46.12.208/28\",\r\n \"20.46.15.0/27\",\r\n \"\ - 20.48.192.84/30\",\r\n \"20.48.197.160/28\",\r\n \"20.49.99.46/31\"\ - ,\r\n \"20.49.102.228/31\",\r\n \"20.49.114.188/30\",\r\n\ - \ \"20.49.127.240/31\",\r\n \"20.51.0.208/28\",\r\n \ - \ \"20.51.13.80/28\",\r\n \"20.51.16.168/31\",\r\n \ - \ \"20.51.21.80/28\",\r\n \"20.52.88.224/28\",\r\n \"20.53.0.32/31\"\ - ,\r\n \"20.53.44.80/31\",\r\n \"20.53.47.208/28\",\r\n \ - \ \"20.53.49.112/28\",\r\n \"20.53.57.64/28\",\r\n \ - \ \"20.58.67.96/28\",\r\n \"20.61.98.66/31\",\r\n \"\ - 20.61.98.68/31\",\r\n \"20.61.103.240/28\",\r\n \"20.62.60.112/28\"\ - ,\r\n \"20.62.128.148/30\",\r\n \"20.62.134.240/28\",\r\n\ - \ \"20.65.134.80/28\",\r\n \"20.66.5.144/28\",\r\n \ - \ \"20.69.1.160/28\",\r\n \"20.72.21.208/28\",\r\n \"\ - 20.99.9.192/27\",\r\n \"20.150.165.156/30\",\r\n \"20.150.225.0/31\"\ - ,\r\n \"20.150.245.64/28\",\r\n \"20.150.245.160/27\",\r\ - \n \"20.187.196.196/30\",\r\n \"20.189.228.224/28\",\r\n\ - \ \"20.191.160.26/31\",\r\n \"20.191.160.116/31\",\r\n \ - \ \"20.191.167.144/28\",\r\n \"20.192.45.0/28\",\r\n \ - \ \"20.192.47.64/27\",\r\n \"20.192.50.96/27\",\r\n \ - \ \"20.192.50.240/28\",\r\n \"20.192.80.192/28\",\r\n \"\ - 20.192.164.188/30\",\r\n \"20.192.184.80/31\",\r\n \"20.192.225.200/30\"\ - ,\r\n \"20.192.238.122/31\",\r\n \"20.193.194.128/27\",\r\ - \n \"20.193.194.160/28\",\r\n \"20.193.206.36/31\",\r\n\ - \ \"20.194.74.160/28\",\r\n \"20.194.75.192/27\",\r\n \ - \ \"20.195.67.208/28\",\r\n \"20.195.74.224/28\",\r\n \ - \ \"20.195.78.96/27\",\r\n \"20.195.146.208/28\",\r\n \ - \ \"23.96.205.55/32\",\r\n \"23.98.108.42/31\",\r\n \"\ - 23.98.108.46/31\",\r\n \"40.64.135.76/30\",\r\n \"40.67.48.122/31\"\ - ,\r\n \"40.67.50.244/31\",\r\n \"40.67.53.240/28\",\r\n\ - \ \"40.67.60.110/31\",\r\n \"40.69.111.32/31\",\r\n \ - \ \"40.71.15.192/31\",\r\n \"40.75.35.218/31\",\r\n \ - \ \"40.78.204.44/31\",\r\n \"40.78.238.58/31\",\r\n \"\ - 40.78.250.110/31\",\r\n \"40.79.116.45/32\",\r\n \"40.80.63.158/31\"\ - ,\r\n \"40.80.63.244/31\",\r\n \"40.80.173.128/30\",\r\n\ - \ \"40.80.180.2/31\",\r\n \"40.82.248.70/31\",\r\n \ - \ \"40.89.23.40/31\",\r\n \"40.113.78.45/32\",\r\n \"\ - 40.120.82.160/28\",\r\n \"40.126.239.114/32\",\r\n \"51.11.192.32/31\"\ - ,\r\n \"51.12.20.32/28\",\r\n \"51.12.20.64/27\",\r\n \ - \ \"51.12.28.64/27\",\r\n \"51.12.28.96/28\",\r\n \ - \ \"51.12.42.64/30\",\r\n \"51.12.100.104/31\",\r\n \"\ - 51.12.193.28/30\",\r\n \"51.12.204.224/31\",\r\n \"51.13.136.56/31\"\ - ,\r\n \"51.13.138.32/28\",\r\n \"51.104.9.98/31\",\r\n \ - \ \"51.104.30.170/31\",\r\n \"51.107.53.48/30\",\r\n \ - \ \"51.107.60.94/31\",\r\n \"51.107.148.18/31\",\r\n \ - \ \"51.107.156.134/31\",\r\n \"51.107.243.128/28\",\r\n \ - \ \"51.107.247.96/27\",\r\n \"51.107.249.72/31\",\r\n \ - \ \"51.107.251.112/28\",\r\n \"51.116.51.32/30\",\r\n \"\ - 51.116.55.128/28\",\r\n \"51.116.60.240/31\",\r\n \"51.116.146.216/30\"\ - ,\r\n \"51.116.158.58/31\",\r\n \"51.120.40.126/31\",\r\n\ - \ \"51.120.100.94/31\",\r\n \"51.120.220.94/31\",\r\n \ - \ \"51.120.228.36/31\",\r\n \"51.120.232.32/31\",\r\n \ - \ \"51.120.234.144/28\",\r\n \"51.120.235.192/27\",\r\n \ - \ \"51.137.164.94/31\",\r\n \"51.137.167.168/31\",\r\n \ - \ \"51.138.160.0/31\",\r\n \"51.138.211.16/28\",\r\n \ - \ \"51.140.40.89/32\",\r\n \"51.140.210.86/31\",\r\n \"\ - 51.140.224.110/32\",\r\n \"51.143.208.132/31\",\r\n \"51.143.213.208/28\"\ - ,\r\n \"52.136.48.122/31\",\r\n \"52.136.52.36/31\",\r\n\ - \ \"52.136.184.0/30\",\r\n \"52.136.186.32/28\",\r\n \ - \ \"52.139.106.72/31\",\r\n \"52.139.108.32/28\",\r\n \ - \ \"52.140.110.164/30\",\r\n \"52.146.131.52/30\",\r\n \ - \ \"52.146.137.176/28\",\r\n \"52.147.113.96/28\",\r\n \ - \ \"52.150.156.44/30\",\r\n \"52.161.13.30/32\",\r\n \"\ - 52.162.111.130/31\",\r\n \"52.167.239.195/32\",\r\n \"52.172.112.24/30\"\ - ,\r\n \"52.172.116.144/28\",\r\n \"52.178.17.0/31\",\r\n\ - \ \"52.182.141.14/31\",\r\n \"52.231.23.8/31\",\r\n \ - \ \"52.231.146.86/31\",\r\n \"52.231.152.94/32\",\r\n \ - \ \"52.247.220.99/32\",\r\n \"65.52.252.248/31\",\r\n \ - \ \"102.37.64.48/31\",\r\n \"102.37.81.144/28\",\r\n \"\ - 102.37.161.64/28\",\r\n \"102.133.58.204/30\",\r\n \"102.133.124.12/31\"\ - ,\r\n \"102.133.220.196/30\",\r\n \"104.46.162.0/31\",\r\ - \n \"104.46.178.112/31\",\r\n \"104.46.183.192/28\",\r\n\ - \ \"104.210.152.157/32\",\r\n \"104.214.161.14/31\",\r\n\ - \ \"191.233.14.192/30\",\r\n \"191.233.51.212/31\",\r\n\ - \ \"191.233.207.24/31\",\r\n \"191.234.139.160/31\",\r\n\ - \ \"191.235.225.154/31\",\r\n \"191.238.72.224/28\",\r\n\ - \ \"2603:1020:a04:2::540/123\",\r\n \"2603:1020:e04::7c0/123\"\ - ,\r\n \"2603:1020:1004:2::c0/123\",\r\n \"2603:1020:1104:1::4e0/123\"\ - ,\r\n \"2603:1030:f:2::4e0/123\",\r\n \"2603:1030:104::7c0/123\"\ - ,\r\n \"2603:1030:504:2::c0/123\",\r\n \"2603:1040:207:1::4e0/123\"\ - ,\r\n \"2603:1040:a06:2::2c0/123\",\r\n \"2603:1040:d04:2::20/123\"\ - ,\r\n \"2603:1040:f05::7c0/123\",\r\n \"2603:1040:1002:1::a0/123\"\ - ,\r\n \"2603:1040:1104:1::440/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureArcInfrastructure\",\r\n \"\ - id\": \"AzureArcInfrastructure\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureArcInfrastructure\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.143.219/32\",\r\n\ - \ \"13.70.79.64/32\",\r\n \"13.71.175.129/32\",\r\n \ - \ \"13.71.199.117/32\",\r\n \"13.73.244.196/32\",\r\n \ - \ \"13.73.253.124/30\",\r\n \"13.74.107.94/32\",\r\n \ - \ \"13.77.53.221/32\",\r\n \"13.78.111.193/32\",\r\n \"\ - 13.81.244.155/32\",\r\n \"13.86.223.80/32\",\r\n \"13.90.194.180/32\"\ - ,\r\n \"20.36.122.52/30\",\r\n \"20.37.66.52/30\",\r\n \ - \ \"20.37.196.248/30\",\r\n \"20.37.226.52/30\",\r\n \ - \ \"20.37.228.8/30\",\r\n \"20.38.87.188/30\",\r\n \ - \ \"20.38.138.56/30\",\r\n \"20.38.141.8/30\",\r\n \"20.39.12.228/30\"\ - ,\r\n \"20.39.14.84/30\",\r\n \"20.40.200.152/29\",\r\n\ - \ \"20.40.224.52/30\",\r\n \"20.41.67.84/30\",\r\n \ - \ \"20.41.69.52/30\",\r\n \"20.41.195.252/30\",\r\n \ - \ \"20.42.228.216/30\",\r\n \"20.43.43.160/30\",\r\n \"\ - 20.43.45.240/30\",\r\n \"20.43.67.88/30\",\r\n \"20.43.121.252/32\"\ - ,\r\n \"20.44.19.6/32\",\r\n \"20.45.197.224/30\",\r\n \ - \ \"20.45.199.32/30\",\r\n \"20.48.192.76/30\",\r\n \ - \ \"20.49.99.12/30\",\r\n \"20.49.102.212/30\",\r\n \ - \ \"20.49.109.32/30\",\r\n \"20.49.113.12/30\",\r\n \"20.49.114.52/30\"\ - ,\r\n \"20.49.120.32/30\",\r\n \"20.49.125.188/30\",\r\n\ - \ \"20.50.1.196/30\",\r\n \"20.53.0.34/32\",\r\n \ - \ \"20.53.41.44/30\",\r\n \"20.61.96.184/30\",\r\n \"\ - 20.150.165.140/30\",\r\n \"20.187.194.204/30\",\r\n \"20.189.111.204/30\"\ - ,\r\n \"20.191.160.28/30\",\r\n \"20.192.164.176/30\",\r\ - \n \"20.192.228.252/30\",\r\n \"23.98.104.12/30\",\r\n \ - \ \"23.98.108.32/30\",\r\n \"40.64.132.84/30\",\r\n \ - \ \"40.64.135.72/30\",\r\n \"40.69.111.34/32\",\r\n \ - \ \"40.71.15.194/32\",\r\n \"40.78.204.46/32\",\r\n \"40.78.239.96/32\"\ - ,\r\n \"40.79.138.46/32\",\r\n \"40.80.59.24/30\",\r\n \ - \ \"40.80.172.12/30\",\r\n \"40.89.20.128/30\",\r\n \ - \ \"40.89.23.32/30\",\r\n \"40.119.9.232/30\",\r\n \"\ - 51.104.28.216/30\",\r\n \"51.104.31.172/30\",\r\n \"51.105.77.50/32\"\ - ,\r\n \"51.105.90.148/30\",\r\n \"51.107.50.56/30\",\r\n\ - \ \"51.107.53.32/30\",\r\n \"51.107.60.152/32\",\r\n \ - \ \"51.107.146.52/30\",\r\n \"51.116.49.136/30\",\r\n \ - \ \"51.116.145.136/30\",\r\n \"51.116.146.212/30\",\r\n \ - \ \"51.116.158.60/32\",\r\n \"51.120.42.56/30\",\r\n \ - \ \"51.120.44.196/30\",\r\n \"51.120.100.156/32\",\r\n \ - \ \"51.120.226.52/30\",\r\n \"51.137.164.76/30\",\r\n \"\ - 51.137.166.40/30\",\r\n \"51.140.212.216/32\",\r\n \"52.136.51.68/30\"\ - ,\r\n \"52.138.90.54/32\",\r\n \"52.140.107.92/30\",\r\n\ - \ \"52.140.110.108/30\",\r\n \"52.146.79.132/30\",\r\n \ - \ \"52.146.130.180/30\",\r\n \"52.150.152.204/30\",\r\n \ - \ \"52.150.156.36/30\",\r\n \"52.162.111.132/32\",\r\n \ - \ \"52.182.141.60/32\",\r\n \"52.228.84.80/30\",\r\n \ - \ \"52.231.23.10/32\",\r\n \"52.236.189.74/32\",\r\n \ - \ \"65.52.252.250/32\",\r\n \"102.133.57.188/30\",\r\n \ - \ \"102.133.154.6/32\",\r\n \"102.133.218.52/30\",\r\n \"\ - 102.133.219.188/30\",\r\n \"104.46.178.0/30\",\r\n \"104.214.164.48/32\"\ - ,\r\n \"137.135.98.137/32\",\r\n \"191.233.207.26/32\",\r\ - \n \"191.234.136.44/30\",\r\n \"191.234.138.144/30\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureAttestation\"\ - ,\r\n \"id\": \"AzureAttestation\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAttestation\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.145.224/30\",\r\n\ - \ \"13.69.109.140/30\",\r\n \"13.69.233.128/30\",\r\n \ - \ \"13.70.79.80/30\",\r\n \"13.71.175.208/30\",\r\n \ - \ \"13.76.91.201/32\",\r\n \"13.77.168.36/32\",\r\n \"\ - 13.86.223.192/30\",\r\n \"13.86.254.29/32\",\r\n \"13.89.241.144/32\"\ - ,\r\n \"20.21.32.44/30\",\r\n \"20.37.71.40/30\",\r\n \ - \ \"20.37.229.172/30\",\r\n \"20.38.132.24/30\",\r\n \ - \ \"20.38.143.40/30\",\r\n \"20.40.225.60/30\",\r\n \ - \ \"20.43.123.196/30\",\r\n \"20.44.4.248/30\",\r\n \"20.44.12.140/30\"\ - ,\r\n \"20.44.19.164/30\",\r\n \"20.45.116.92/30\",\r\n\ - \ \"20.45.126.116/30\",\r\n \"20.46.11.4/30\",\r\n \ - \ \"20.48.193.180/30\",\r\n \"20.49.83.244/30\",\r\n \ - \ \"20.49.103.124/30\",\r\n \"20.49.118.20/30\",\r\n \"\ - 20.49.127.244/30\",\r\n \"20.50.107.73/32\",\r\n \"20.51.8.204/30\"\ - ,\r\n \"20.51.20.80/30\",\r\n \"20.52.72.44/30\",\r\n \ - \ \"20.53.0.104/30\",\r\n \"20.53.47.64/30\",\r\n \ - \ \"20.53.56.4/30\",\r\n \"20.54.110.142/32\",\r\n \"20.61.99.100/30\"\ - ,\r\n \"20.62.129.148/30\",\r\n \"20.65.130.92/30\",\r\n\ - \ \"20.72.21.144/30\",\r\n \"20.72.30.180/30\",\r\n \ - \ \"20.72.129.122/32\",\r\n \"20.73.227.143/32\",\r\n \ - \ \"20.150.174.132/30\",\r\n \"20.150.244.32/30\",\r\n \ - \ \"20.151.24.34/32\",\r\n \"20.187.197.228/30\",\r\n \ - \ \"20.189.225.84/30\",\r\n \"20.191.161.220/30\",\r\n \"\ - 20.192.43.76/30\",\r\n \"20.192.166.188/30\",\r\n \"20.192.184.116/30\"\ - ,\r\n \"20.192.231.240/30\",\r\n \"20.192.238.188/30\",\r\ - \n \"20.193.96.12/30\",\r\n \"20.194.72.148/30\",\r\n \ - \ \"20.195.146.64/30\",\r\n \"23.98.109.52/30\",\r\n \ - \ \"23.99.79.140/32\",\r\n \"40.67.52.116/30\",\r\n \ - \ \"40.67.121.196/30\",\r\n \"40.69.111.116/30\",\r\n \"\ - 40.71.15.204/30\",\r\n \"40.78.239.116/30\",\r\n \"40.79.141.132/30\"\ - ,\r\n \"40.79.189.116/30\",\r\n \"40.80.173.216/30\",\r\n\ - \ \"40.80.180.196/30\",\r\n \"40.88.132.87/32\",\r\n \ - \ \"40.89.23.44/30\",\r\n \"40.89.121.168/30\",\r\n \ - \ \"40.114.209.61/32\",\r\n \"40.120.8.176/30\",\r\n \"\ - 40.120.75.60/30\",\r\n \"40.127.193.93/32\",\r\n \"51.11.125.56/32\"\ - ,\r\n \"51.12.46.224/30\",\r\n \"51.12.198.4/30\",\r\n \ - \ \"51.13.128.64/30\",\r\n \"51.13.136.184/30\",\r\n \ - \ \"51.107.53.52/30\",\r\n \"51.107.128.36/30\",\r\n \ - \ \"51.107.192.152/30\",\r\n \"51.107.250.40/30\",\r\n \ - \ \"51.116.54.72/30\",\r\n \"51.116.149.224/30\",\r\n \"\ - 51.116.246.16/30\",\r\n \"51.120.100.244/30\",\r\n \"51.120.233.128/30\"\ - ,\r\n \"51.137.167.184/30\",\r\n \"51.138.160.76/30\",\r\ - \n \"51.138.210.128/30\",\r\n \"51.140.111.84/32\",\r\n\ - \ \"51.140.149.84/30\",\r\n \"51.140.215.168/30\",\r\n \ - \ \"51.143.209.132/30\",\r\n \"52.136.53.132/30\",\r\n \ - \ \"52.136.184.232/30\",\r\n \"52.139.46.228/32\",\r\n \ - \ \"52.139.86.173/32\",\r\n \"52.142.163.77/32\",\r\n \ - \ \"52.146.132.244/30\",\r\n \"52.150.157.172/30\",\r\n \ - \ \"52.154.45.19/32\",\r\n \"52.162.111.140/30\",\r\n \ - \ \"52.162.199.134/32\",\r\n \"52.172.116.0/30\",\r\n \ - \ \"52.180.178.44/32\",\r\n \"52.229.112.108/32\",\r\n \"\ - 52.231.23.116/30\",\r\n \"52.231.151.68/30\",\r\n \"52.247.36.207/32\"\ - ,\r\n \"52.251.59.202/32\",\r\n \"70.37.52.246/32\",\r\n\ - \ \"102.37.64.120/30\",\r\n \"102.37.80.52/30\",\r\n \ - \ \"102.133.126.132/30\",\r\n \"102.133.221.196/30\",\r\n \ - \ \"104.46.162.16/30\",\r\n \"104.46.179.240/30\",\r\n \ - \ \"104.214.164.108/30\",\r\n \"168.61.140.108/30\",\r\n \ - \ \"191.233.51.220/30\",\r\n \"191.233.207.212/30\",\r\n\ - \ \"191.238.72.72/30\",\r\n \"2603:1020:a04:2::530/124\"\ - ,\r\n \"2603:1020:e04::7a0/123\",\r\n \"2603:1020:1004:1::720/123\"\ - ,\r\n \"2603:1020:1104:1::3e0/123\",\r\n \"2603:1030:f:2::4c0/123\"\ - ,\r\n \"2603:1030:104::7a0/124\",\r\n \"2603:1030:504:2::a0/123\"\ - ,\r\n \"2603:1040:207:1::4c0/124\",\r\n \"2603:1040:a06:2::2a0/123\"\ - ,\r\n \"2603:1040:d04:1::720/123\",\r\n \"2603:1040:f05::7a0/123\"\ - ,\r\n \"2603:1040:1002:1::80/124\",\r\n \"2603:1040:1104:1::420/123\"\ - ,\r\n \"2603:1040:1104:400::420/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureBackup\",\r\n \"id\": \"AzureBackup\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"7\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"AzureBackup\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.66.140.192/26\",\r\n \"13.66.141.0/27\",\r\n\ - \ \"13.67.12.0/24\",\r\n \"13.67.13.0/25\",\r\n \ - \ \"13.69.65.32/27\",\r\n \"13.69.65.128/25\",\r\n \"13.69.107.0/27\"\ - ,\r\n \"13.69.107.128/25\",\r\n \"13.69.228.128/25\",\r\n\ - \ \"13.69.229.0/27\",\r\n \"13.70.73.192/27\",\r\n \ - \ \"13.70.74.0/26\",\r\n \"13.71.172.0/26\",\r\n \"\ - 13.71.172.64/27\",\r\n \"13.71.195.64/26\",\r\n \"13.71.195.128/27\"\ - ,\r\n \"13.74.107.192/27\",\r\n \"13.74.108.0/25\",\r\n\ - \ \"13.75.36.128/25\",\r\n \"13.75.37.0/24\",\r\n \ - \ \"13.77.52.32/27\",\r\n \"13.77.52.64/26\",\r\n \"\ - 13.78.108.32/27\",\r\n \"13.78.108.64/26\",\r\n \"13.86.218.0/25\"\ - ,\r\n \"13.86.218.128/26\",\r\n \"13.87.57.0/26\",\r\n \ - \ \"13.87.57.64/27\",\r\n \"13.87.123.0/26\",\r\n \ - \ \"13.87.123.64/27\",\r\n \"13.89.171.128/26\",\r\n \"\ - 13.89.171.192/27\",\r\n \"20.21.36.128/26\",\r\n \"20.21.43.64/26\"\ - ,\r\n \"20.21.67.0/26\",\r\n \"20.21.75.0/26\",\r\n \ - \ \"20.36.107.32/27\",\r\n \"20.36.107.64/26\",\r\n \ - \ \"20.36.114.224/27\",\r\n \"20.36.115.0/26\",\r\n \"\ - 20.37.75.0/26\",\r\n \"20.37.75.64/27\",\r\n \"20.38.147.0/27\"\ - ,\r\n \"20.38.147.64/26\",\r\n \"20.40.229.128/25\",\r\n\ - \ \"20.44.3.64/26\",\r\n \"20.44.3.128/27\",\r\n \ - \ \"20.44.8.32/27\",\r\n \"20.44.8.64/26\",\r\n \"20.44.16.128/27\"\ - ,\r\n \"20.44.16.192/26\",\r\n \"20.44.27.128/27\",\r\n\ - \ \"20.44.31.192/26\",\r\n \"20.45.90.0/26\",\r\n \ - \ \"20.45.123.0/26\",\r\n \"20.45.123.64/28\",\r\n \"\ - 20.45.125.192/27\",\r\n \"20.46.12.0/25\",\r\n \"20.48.197.0/26\"\ - ,\r\n \"20.49.82.192/26\",\r\n \"20.49.83.0/27\",\r\n \ - \ \"20.49.90.192/26\",\r\n \"20.49.91.0/27\",\r\n \ - \ \"20.51.0.0/26\",\r\n \"20.51.12.128/26\",\r\n \"20.51.20.128/25\"\ - ,\r\n \"20.52.88.0/26\",\r\n \"20.53.47.128/26\",\r\n \ - \ \"20.53.49.0/26\",\r\n \"20.53.56.192/26\",\r\n \ - \ \"20.58.67.128/25\",\r\n \"20.61.102.128/25\",\r\n \"\ - 20.61.103.0/26\",\r\n \"20.62.59.128/25\",\r\n \"20.62.133.128/25\"\ - ,\r\n \"20.62.134.0/26\",\r\n \"20.65.133.128/26\",\r\n\ - \ \"20.66.4.0/25\",\r\n \"20.66.4.128/26\",\r\n \ - \ \"20.69.1.0/26\",\r\n \"20.72.27.64/26\",\r\n \"20.99.9.128/26\"\ - ,\r\n \"20.150.171.96/27\",\r\n \"20.150.171.128/26\",\r\ - \n \"20.150.179.80/28\",\r\n \"20.150.179.128/26\",\r\n\ - \ \"20.150.181.64/27\",\r\n \"20.150.187.80/28\",\r\n \ - \ \"20.150.187.128/26\",\r\n \"20.150.190.0/27\",\r\n \ - \ \"20.150.244.64/26\",\r\n \"20.189.228.64/26\",\r\n \ - \ \"20.191.166.128/26\",\r\n \"20.192.44.128/26\",\r\n \ - \ \"20.192.50.128/26\",\r\n \"20.192.80.64/26\",\r\n \"\ - 20.192.99.80/28\",\r\n \"20.192.99.128/26\",\r\n \"20.192.235.32/27\"\ - ,\r\n \"20.192.235.64/26\",\r\n \"20.193.192.192/26\",\r\ - \n \"20.193.203.0/26\",\r\n \"20.193.203.64/27\",\r\n \ - \ \"20.194.66.192/26\",\r\n \"20.194.67.0/27\",\r\n \ - \ \"20.194.74.0/26\",\r\n \"20.195.66.0/24\",\r\n \"\ - 20.195.67.0/25\",\r\n \"20.195.73.0/24\",\r\n \"20.195.74.0/25\"\ - ,\r\n \"20.195.146.128/26\",\r\n \"20.205.74.96/27\",\r\n\ - \ \"20.205.75.0/26\",\r\n \"20.205.82.96/27\",\r\n \ - \ \"20.205.83.0/26\",\r\n \"20.208.19.0/26\",\r\n \"\ - 23.98.83.0/27\",\r\n \"23.98.83.128/25\",\r\n \"23.98.84.0/24\"\ - ,\r\n \"40.67.59.96/27\",\r\n \"40.67.59.128/26\",\r\n \ - \ \"40.69.107.32/27\",\r\n \"40.69.107.64/26\",\r\n \ - \ \"40.70.147.128/26\",\r\n \"40.70.147.192/27\",\r\n \ - \ \"40.71.12.0/25\",\r\n \"40.71.12.128/26\",\r\n \"40.74.98.64/26\"\ - ,\r\n \"40.74.98.128/27\",\r\n \"40.74.146.96/27\",\r\n\ - \ \"40.74.146.128/26\",\r\n \"40.75.34.96/27\",\r\n \ - \ \"40.75.34.192/26\",\r\n \"40.78.195.32/27\",\r\n \ - \ \"40.78.195.64/26\",\r\n \"40.78.202.160/27\",\r\n \"\ - 40.78.202.192/26\",\r\n \"40.78.227.64/26\",\r\n \"40.78.227.128/25\"\ - ,\r\n \"40.78.234.192/27\",\r\n \"40.78.235.0/24\",\r\n\ - \ \"40.78.236.0/25\",\r\n \"40.78.243.32/27\",\r\n \ - \ \"40.78.243.64/26\",\r\n \"40.78.250.224/27\",\r\n \ - \ \"40.78.251.0/26\",\r\n \"40.79.131.0/26\",\r\n \"40.79.131.64/27\"\ - ,\r\n \"40.79.142.192/26\",\r\n \"40.79.150.0/26\",\r\n\ - \ \"40.79.155.64/26\",\r\n \"40.79.155.128/25\",\r\n \ - \ \"40.79.162.128/27\",\r\n \"40.79.162.192/26\",\r\n \ - \ \"40.79.170.64/26\",\r\n \"40.79.170.128/27\",\r\n \ - \ \"40.79.171.32/27\",\r\n \"40.79.179.32/27\",\r\n \"\ - 40.79.179.64/26\",\r\n \"40.79.187.32/27\",\r\n \"40.79.187.64/26\"\ - ,\r\n \"40.79.195.32/27\",\r\n \"40.79.195.64/26\",\r\n\ - \ \"40.80.51.0/27\",\r\n \"40.80.53.192/26\",\r\n \ - \ \"40.120.74.192/26\",\r\n \"40.120.75.0/27\",\r\n \"\ - 40.120.82.0/26\",\r\n \"51.12.17.64/26\",\r\n \"51.12.25.128/26\"\ - ,\r\n \"51.12.99.96/27\",\r\n \"51.12.99.128/26\",\r\n \ - \ \"51.12.203.96/27\",\r\n \"51.12.203.128/26\",\r\n \ - \ \"51.12.227.80/28\",\r\n \"51.12.227.128/26\",\r\n \ - \ \"51.12.235.80/28\",\r\n \"51.12.235.128/26\",\r\n \"\ - 51.13.137.128/26\",\r\n \"51.103.203.0/26\",\r\n \"51.105.67.32/27\"\ - ,\r\n \"51.105.67.64/26\",\r\n \"51.105.75.0/27\",\r\n \ - \ \"51.105.75.64/26\",\r\n \"51.107.59.64/26\",\r\n \ - \ \"51.107.59.128/27\",\r\n \"51.107.155.64/26\",\r\n \ - \ \"51.107.155.128/27\",\r\n \"51.107.243.0/26\",\r\n \ - \ \"51.107.251.0/26\",\r\n \"51.116.55.0/26\",\r\n \"51.116.59.64/26\"\ - ,\r\n \"51.116.59.128/27\",\r\n \"51.116.155.128/26\",\r\ - \n \"51.116.155.192/27\",\r\n \"51.116.156.144/28\",\r\n\ - \ \"51.116.156.192/26\",\r\n \"51.116.245.0/26\",\r\n \ - \ \"51.116.245.64/27\",\r\n \"51.116.250.240/28\",\r\n \ - \ \"51.116.251.64/26\",\r\n \"51.116.253.0/27\",\r\n \ - \ \"51.120.99.96/27\",\r\n \"51.120.99.128/26\",\r\n \ - \ \"51.120.107.80/28\",\r\n \"51.120.107.128/26\",\r\n \"\ - 51.120.110.128/27\",\r\n \"51.120.211.80/28\",\r\n \"51.120.211.128/26\"\ - ,\r\n \"51.120.214.64/27\",\r\n \"51.120.219.96/27\",\r\n\ - \ \"51.120.219.128/26\",\r\n \"51.120.233.192/26\",\r\n\ - \ \"51.138.210.192/26\",\r\n \"51.140.148.64/26\",\r\n \ - \ \"51.140.148.128/27\",\r\n \"51.140.211.32/27\",\r\n \ - \ \"51.140.211.64/26\",\r\n \"51.143.212.192/26\",\r\n \ - \ \"51.143.213.0/25\",\r\n \"52.136.185.192/26\",\r\n \ - \ \"52.138.90.160/27\",\r\n \"52.138.90.192/26\",\r\n \ - \ \"52.138.226.192/27\",\r\n \"52.138.227.0/25\",\r\n \ - \ \"52.139.107.128/26\",\r\n \"52.146.136.64/26\",\r\n \"\ - 52.146.136.128/25\",\r\n \"52.147.113.0/26\",\r\n \"52.162.107.192/26\"\ - ,\r\n \"52.162.110.0/27\",\r\n \"52.167.106.192/27\",\r\n\ - \ \"52.167.107.0/26\",\r\n \"52.172.116.64/26\",\r\n \ - \ \"52.182.139.64/27\",\r\n \"52.182.139.128/26\",\r\n \ - \ \"52.231.19.0/26\",\r\n \"52.231.19.64/27\",\r\n \ - \ \"52.231.147.32/27\",\r\n \"52.231.147.64/26\",\r\n \"\ - 52.236.187.0/27\",\r\n \"52.236.187.128/25\",\r\n \"52.246.155.0/27\"\ - ,\r\n \"52.246.155.64/26\",\r\n \"65.52.251.0/26\",\r\n\ - \ \"65.52.251.64/27\",\r\n \"102.37.81.0/26\",\r\n \ - \ \"102.37.160.192/26\",\r\n \"102.133.27.64/26\",\r\n \ - \ \"102.133.27.128/27\",\r\n \"102.133.123.96/27\",\r\n \ - \ \"102.133.155.64/26\",\r\n \"102.133.155.128/27\",\r\n \ - \ \"102.133.251.0/27\",\r\n \"102.133.254.128/26\",\r\n \ - \ \"104.46.183.64/26\",\r\n \"104.211.82.0/26\",\r\n \ - \ \"104.211.82.64/27\",\r\n \"104.211.147.0/26\",\r\n \"\ - 104.211.147.64/27\",\r\n \"104.214.19.96/27\",\r\n \"104.214.19.128/26\"\ - ,\r\n \"104.214.165.96/27\",\r\n \"104.214.165.192/26\"\ - ,\r\n \"191.233.50.224/27\",\r\n \"191.233.51.64/26\",\r\ - \n \"191.233.204.0/26\",\r\n \"191.233.204.64/27\",\r\n\ - \ \"191.234.147.80/28\",\r\n \"191.234.147.128/26\",\r\n\ - \ \"191.234.149.160/27\",\r\n \"191.234.155.80/28\",\r\n\ - \ \"191.234.155.128/26\",\r\n \"191.234.157.64/27\",\r\n\ - \ \"191.238.72.0/26\",\r\n \"2603:1000:4:402::200/121\"\ - ,\r\n \"2603:1000:104:402::200/121\",\r\n \"2603:1000:104:802::180/121\"\ - ,\r\n \"2603:1000:104:c02::180/121\",\r\n \"2603:1010:6:402::200/121\"\ - ,\r\n \"2603:1010:6:802::180/121\",\r\n \"2603:1010:6:c02::180/121\"\ - ,\r\n \"2603:1010:101:402::200/121\",\r\n \"2603:1010:304:402::200/121\"\ - ,\r\n \"2603:1010:404:402::200/121\",\r\n \"2603:1020:5:402::200/121\"\ - ,\r\n \"2603:1020:5:802::180/121\",\r\n \"2603:1020:5:c02::180/121\"\ - ,\r\n \"2603:1020:206:402::200/121\",\r\n \"2603:1020:206:802::180/121\"\ - ,\r\n \"2603:1020:206:c02::180/121\",\r\n \"2603:1020:305:402::200/121\"\ - ,\r\n \"2603:1020:405:402::200/121\",\r\n \"2603:1020:605:402::200/121\"\ - ,\r\n \"2603:1020:705:402::200/121\",\r\n \"2603:1020:705:802::180/121\"\ - ,\r\n \"2603:1020:705:c02::180/121\",\r\n \"2603:1020:805:402::200/121\"\ - ,\r\n \"2603:1020:805:802::180/121\",\r\n \"2603:1020:805:c02::180/121\"\ - ,\r\n \"2603:1020:905:402::200/121\",\r\n \"2603:1020:a04:2::600/121\"\ - ,\r\n \"2603:1020:a04:402::200/121\",\r\n \"2603:1020:a04:802::180/121\"\ - ,\r\n \"2603:1020:a04:c02::180/121\",\r\n \"2603:1020:b04:402::200/121\"\ - ,\r\n \"2603:1020:c04:402::200/121\",\r\n \"2603:1020:c04:802::180/121\"\ - ,\r\n \"2603:1020:c04:c02::180/121\",\r\n \"2603:1020:d04:402::200/121\"\ - ,\r\n \"2603:1020:e04:3::200/121\",\r\n \"2603:1020:e04:402::200/121\"\ - ,\r\n \"2603:1020:e04:802::180/121\",\r\n \"2603:1020:e04:c02::180/121\"\ - ,\r\n \"2603:1020:f04:402::200/121\",\r\n \"2603:1020:1004:1::780/121\"\ - ,\r\n \"2603:1020:1004:400::100/121\",\r\n \"2603:1020:1004:400::300/121\"\ - ,\r\n \"2603:1020:1004:800::480/121\",\r\n \"2603:1020:1004:c02::200/121\"\ - ,\r\n \"2603:1020:1104:1::400/121\",\r\n \"2603:1020:1104:400::200/121\"\ - ,\r\n \"2603:1030:f:2::580/121\",\r\n \"2603:1030:f:400::a00/121\"\ - ,\r\n \"2603:1030:10:402::200/121\",\r\n \"2603:1030:10:802::180/121\"\ - ,\r\n \"2603:1030:10:c02::180/121\",\r\n \"2603:1030:104:402::200/121\"\ - ,\r\n \"2603:1030:104:402::680/121\",\r\n \"2603:1030:104:802::100/121\"\ - ,\r\n \"2603:1030:107:400::180/121\",\r\n \"2603:1030:210:402::200/121\"\ - ,\r\n \"2603:1030:210:802::180/121\",\r\n \"2603:1030:210:c02::180/121\"\ - ,\r\n \"2603:1030:40b:400::a00/121\",\r\n \"2603:1030:40b:800::180/121\"\ - ,\r\n \"2603:1030:40b:c00::180/121\",\r\n \"2603:1030:40c:402::200/121\"\ - ,\r\n \"2603:1030:40c:802::180/121\",\r\n \"2603:1030:40c:c02::180/121\"\ - ,\r\n \"2603:1030:504:2::100/121\",\r\n \"2603:1030:504:402::100/121\"\ - ,\r\n \"2603:1030:504:402::300/121\",\r\n \"2603:1030:504:802::280/121\"\ - ,\r\n \"2603:1030:504:c02::200/121\",\r\n \"2603:1030:608:402::200/121\"\ - ,\r\n \"2603:1030:807:402::200/121\",\r\n \"2603:1030:807:802::180/121\"\ - ,\r\n \"2603:1030:807:c02::180/121\",\r\n \"2603:1030:a07:402::180/121\"\ - ,\r\n \"2603:1030:b04:402::200/121\",\r\n \"2603:1030:c06:400::a00/121\"\ - ,\r\n \"2603:1030:c06:802::180/121\",\r\n \"2603:1030:c06:c02::180/121\"\ - ,\r\n \"2603:1030:f05:402::200/121\",\r\n \"2603:1030:f05:802::180/121\"\ - ,\r\n \"2603:1030:f05:c02::180/121\",\r\n \"2603:1030:1005:402::200/121\"\ - ,\r\n \"2603:1040:5:402::200/121\",\r\n \"2603:1040:5:802::180/121\"\ - ,\r\n \"2603:1040:5:c02::180/121\",\r\n \"2603:1040:207:1::580/121\"\ - ,\r\n \"2603:1040:207:402::200/121\",\r\n \"2603:1040:207:800::100/121\"\ - ,\r\n \"2603:1040:207:c00::100/121\",\r\n \"2603:1040:407:402::200/121\"\ - ,\r\n \"2603:1040:407:802::180/121\",\r\n \"2603:1040:407:c02::180/121\"\ - ,\r\n \"2603:1040:606:402::200/121\",\r\n \"2603:1040:806:402::200/121\"\ - ,\r\n \"2603:1040:904:402::200/121\",\r\n \"2603:1040:904:802::180/121\"\ - ,\r\n \"2603:1040:904:c02::180/121\",\r\n \"2603:1040:a06:2::300/121\"\ - ,\r\n \"2603:1040:a06:402::200/121\",\r\n \"2603:1040:a06:802::180/121\"\ - ,\r\n \"2603:1040:a06:c02::180/121\",\r\n \"2603:1040:b04:402::200/121\"\ - ,\r\n \"2603:1040:c06:402::200/121\",\r\n \"2603:1040:d04:1::780/121\"\ - ,\r\n \"2603:1040:d04:400::100/121\",\r\n \"2603:1040:d04:400::300/121\"\ - ,\r\n \"2603:1040:d04:c02::200/121\",\r\n \"2603:1040:f05:2::/121\"\ - ,\r\n \"2603:1040:f05:402::200/121\",\r\n \"2603:1040:f05:802::180/121\"\ - ,\r\n \"2603:1040:f05:c02::180/121\",\r\n \"2603:1040:1002:1::100/121\"\ - ,\r\n \"2603:1040:1002:400::100/121\",\r\n \"2603:1040:1002:800::100/121\"\ - ,\r\n \"2603:1040:1002:c00::100/121\",\r\n \"2603:1040:1104:1::480/121\"\ - ,\r\n \"2603:1040:1104:400::200/121\",\r\n \"2603:1050:6:402::200/121\"\ - ,\r\n \"2603:1050:6:802::180/121\",\r\n \"2603:1050:6:c02::180/121\"\ - ,\r\n \"2603:1050:403:400::500/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureBotService\",\r\n \"id\":\ - \ \"AzureBotService\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\"\ - : \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n\ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureBotService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.142.64/30\",\r\n\ - \ \"13.67.10.88/30\",\r\n \"13.69.67.56/30\",\r\n \ - \ \"13.69.227.252/30\",\r\n \"13.70.74.112/30\",\r\n \ - \ \"13.71.173.240/30\",\r\n \"13.71.196.160/30\",\r\n \"\ - 13.73.248.0/30\",\r\n \"13.75.39.72/30\",\r\n \"13.77.53.80/30\"\ - ,\r\n \"13.78.108.172/30\",\r\n \"13.86.219.168/30\",\r\n\ - \ \"13.87.58.40/30\",\r\n \"13.87.124.40/30\",\r\n \ - \ \"13.89.171.116/30\",\r\n \"20.21.32.16/30\",\r\n \ - \ \"20.36.108.112/30\",\r\n \"20.36.115.240/30\",\r\n \"\ - 20.36.120.64/30\",\r\n \"20.37.64.64/30\",\r\n \"20.37.76.104/30\"\ - ,\r\n \"20.37.152.64/30\",\r\n \"20.37.192.64/30\",\r\n\ - \ \"20.37.224.64/30\",\r\n \"20.38.80.64/30\",\r\n \ - \ \"20.38.128.72/30\",\r\n \"20.38.136.64/30\",\r\n \ - \ \"20.39.8.64/30\",\r\n \"20.41.0.64/30\",\r\n \"20.41.64.64/30\"\ - ,\r\n \"20.41.192.64/30\",\r\n \"20.42.0.64/30\",\r\n \ - \ \"20.42.128.64/30\",\r\n \"20.42.224.64/30\",\r\n \ - \ \"20.43.40.64/30\",\r\n \"20.43.64.64/30\",\r\n \"\ - 20.43.121.8/30\",\r\n \"20.43.128.64/30\",\r\n \"20.44.4.72/30\"\ - ,\r\n \"20.44.17.24/30\",\r\n \"20.44.27.208/30\",\r\n \ - \ \"20.45.112.64/30\",\r\n \"20.45.123.112/30\",\r\n \ - \ \"20.45.192.64/30\",\r\n \"20.72.16.16/30\",\r\n \ - \ \"20.150.160.120/30\",\r\n \"20.189.104.64/30\",\r\n \"\ - 20.192.160.16/30\",\r\n \"20.192.224.64/26\",\r\n \"40.67.48.64/30\"\ - ,\r\n \"40.67.58.4/30\",\r\n \"40.69.108.56/30\",\r\n \ - \ \"40.71.12.244/30\",\r\n \"40.74.24.64/30\",\r\n \ - \ \"40.74.147.168/30\",\r\n \"40.78.196.56/30\",\r\n \"\ - 40.78.202.132/30\",\r\n \"40.79.132.56/30\",\r\n \"40.79.180.24/30\"\ - ,\r\n \"40.80.56.64/30\",\r\n \"40.80.168.64/30\",\r\n \ - \ \"40.80.176.32/30\",\r\n \"40.80.184.64/30\",\r\n \ - \ \"40.82.248.64/30\",\r\n \"40.89.16.64/30\",\r\n \"\ - 51.12.40.64/26\",\r\n \"51.12.192.64/26\",\r\n \"51.104.8.248/30\"\ - ,\r\n \"51.104.24.64/30\",\r\n \"51.105.80.64/30\",\r\n\ - \ \"51.105.88.64/30\",\r\n \"51.107.48.64/30\",\r\n \ - \ \"51.107.58.4/30\",\r\n \"51.107.144.64/30\",\r\n \ - \ \"51.107.154.4/30\",\r\n \"51.116.48.64/30\",\r\n \"\ - 51.116.144.64/30\",\r\n \"51.120.40.64/30\",\r\n \"51.120.98.12/30\"\ - ,\r\n \"51.120.218.4/30\",\r\n \"51.120.224.64/30\",\r\n\ - \ \"51.137.160.64/30\",\r\n \"51.140.212.72/30\",\r\n \ - \ \"51.143.192.64/30\",\r\n \"52.136.48.64/30\",\r\n \ - \ \"52.140.104.64/30\",\r\n \"52.150.136.64/30\",\r\n \ - \ \"52.162.111.16/30\",\r\n \"52.228.80.64/30\",\r\n \"\ - 52.231.148.88/30\",\r\n \"65.52.252.104/30\",\r\n \"102.133.28.88/30\"\ - ,\r\n \"102.133.56.64/30\",\r\n \"102.133.124.8/30\",\r\n\ - \ \"102.133.216.64/30\",\r\n \"191.233.8.16/30\",\r\n \ - \ \"191.233.205.96/30\",\r\n \"191.235.224.64/30\",\r\n \ - \ \"2603:1000:4::20/123\",\r\n \"2603:1000:104:1::20/123\"\ - ,\r\n \"2603:1010:6:1::20/123\",\r\n \"2603:1010:101::20/123\"\ - ,\r\n \"2603:1010:304::20/123\",\r\n \"2603:1010:404::20/123\"\ - ,\r\n \"2603:1020:5:1::20/123\",\r\n \"2603:1020:206:1::20/123\"\ - ,\r\n \"2603:1020:305::20/123\",\r\n \"2603:1020:405::20/123\"\ - ,\r\n \"2603:1020:605::20/123\",\r\n \"2603:1020:705:1::20/123\"\ - ,\r\n \"2603:1020:805:1::20/123\",\r\n \"2603:1020:905::20/123\"\ - ,\r\n \"2603:1020:a04:1::20/123\",\r\n \"2603:1020:b04::20/123\"\ - ,\r\n \"2603:1020:c04:1::20/123\",\r\n \"2603:1020:d04::20/123\"\ - ,\r\n \"2603:1020:e04:1::20/123\",\r\n \"2603:1020:f04::20/123\"\ - ,\r\n \"2603:1020:1004::20/123\",\r\n \"2603:1020:1104::20/123\"\ - ,\r\n \"2603:1030:f:1::20/123\",\r\n \"2603:1030:10:1::20/123\"\ - ,\r\n \"2603:1030:104:1::20/123\",\r\n \"2603:1030:107::20/123\"\ - ,\r\n \"2603:1030:210:1::20/123\",\r\n \"2603:1030:40b:1::20/123\"\ - ,\r\n \"2603:1030:40c:1::20/123\",\r\n \"2603:1030:504:1::20/123\"\ - ,\r\n \"2603:1030:608::20/123\",\r\n \"2603:1030:807:1::20/123\"\ - ,\r\n \"2603:1030:a07::20/123\",\r\n \"2603:1030:b04::20/123\"\ - ,\r\n \"2603:1030:c06:1::20/123\",\r\n \"2603:1030:f05:1::20/123\"\ - ,\r\n \"2603:1030:1005::20/123\",\r\n \"2603:1040:5:1::20/123\"\ - ,\r\n \"2603:1040:207::20/123\",\r\n \"2603:1040:407:1::20/123\"\ - ,\r\n \"2603:1040:606::20/123\",\r\n \"2603:1040:806::20/123\"\ - ,\r\n \"2603:1040:904:1::20/123\",\r\n \"2603:1040:a06:1::20/123\"\ - ,\r\n \"2603:1040:b04::20/123\",\r\n \"2603:1040:c06::20/123\"\ - ,\r\n \"2603:1040:d04::20/123\",\r\n \"2603:1040:f05:1::20/123\"\ - ,\r\n \"2603:1040:1002::60/123\",\r\n \"2603:1040:1104::20/123\"\ - ,\r\n \"2603:1050:6:1::20/123\",\r\n \"2603:1050:403::20/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud\"\ - ,\r\n \"id\": \"AzureCloud\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"7\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"\",\r\n \"addressPrefixes\": [\r\n \"13.64.0.0/16\"\ - ,\r\n \"13.65.0.0/16\",\r\n \"13.66.0.0/17\",\r\n \ - \ \"13.66.128.0/17\",\r\n \"13.67.0.0/17\",\r\n \"13.67.128.0/20\"\ - ,\r\n \"13.67.144.0/21\",\r\n \"13.67.152.0/24\",\r\n \ - \ \"13.67.153.0/28\",\r\n \"13.67.153.16/28\",\r\n \ - \ \"13.67.153.32/27\",\r\n \"13.67.153.64/26\",\r\n \"\ - 13.67.153.128/25\",\r\n \"13.67.154.0/24\",\r\n \"13.67.155.0/24\"\ - ,\r\n \"13.67.156.0/22\",\r\n \"13.67.160.0/19\",\r\n \ - \ \"13.67.192.0/18\",\r\n \"13.68.0.0/17\",\r\n \"\ - 13.68.128.0/17\",\r\n \"13.69.0.0/17\",\r\n \"13.69.128.0/17\"\ - ,\r\n \"13.70.0.0/18\",\r\n \"13.70.64.0/18\",\r\n \ - \ \"13.70.128.0/18\",\r\n \"13.70.192.0/18\",\r\n \"\ - 13.71.0.0/18\",\r\n \"13.71.64.0/18\",\r\n \"13.71.128.0/19\"\ - ,\r\n \"13.71.160.0/19\",\r\n \"13.71.192.0/18\",\r\n \ - \ \"13.72.64.0/18\",\r\n \"13.72.192.0/19\",\r\n \ - \ \"13.72.224.0/19\",\r\n \"13.73.0.0/19\",\r\n \"13.73.32.0/19\"\ - ,\r\n \"13.73.96.0/19\",\r\n \"13.73.128.0/18\",\r\n \ - \ \"13.73.192.0/20\",\r\n \"13.73.224.0/21\",\r\n \ - \ \"13.73.232.0/21\",\r\n \"13.73.240.0/20\",\r\n \"13.74.0.0/16\"\ - ,\r\n \"13.75.0.0/17\",\r\n \"13.75.128.0/17\",\r\n \ - \ \"13.76.0.0/16\",\r\n \"13.77.0.0/18\",\r\n \"13.77.64.0/18\"\ - ,\r\n \"13.77.128.0/18\",\r\n \"13.77.192.0/19\",\r\n \ - \ \"13.78.0.0/17\",\r\n \"13.78.128.0/17\",\r\n \"\ - 13.79.0.0/16\",\r\n \"13.80.0.0/15\",\r\n \"13.82.0.0/16\"\ - ,\r\n \"13.83.0.0/16\",\r\n \"13.84.0.0/15\",\r\n \ - \ \"13.86.0.0/17\",\r\n \"13.86.128.0/17\",\r\n \"13.87.0.0/18\"\ - ,\r\n \"13.87.64.0/18\",\r\n \"13.87.128.0/17\",\r\n \ - \ \"13.88.0.0/17\",\r\n \"13.88.128.0/18\",\r\n \"\ - 13.88.200.0/21\",\r\n \"13.88.208.0/20\",\r\n \"13.88.224.0/19\"\ - ,\r\n \"13.89.0.0/16\",\r\n \"13.90.0.0/16\",\r\n \ - \ \"13.91.0.0/16\",\r\n \"13.92.0.0/16\",\r\n \"13.93.0.0/17\"\ - ,\r\n \"13.93.128.0/17\",\r\n \"13.94.0.0/18\",\r\n \ - \ \"13.94.64.0/18\",\r\n \"13.94.128.0/17\",\r\n \"\ - 13.95.0.0/16\",\r\n \"13.104.129.0/26\",\r\n \"13.104.129.64/26\"\ - ,\r\n \"13.104.129.128/26\",\r\n \"13.104.129.192/26\",\r\ - \n \"13.104.144.0/27\",\r\n \"13.104.144.32/27\",\r\n \ - \ \"13.104.144.64/27\",\r\n \"13.104.144.96/27\",\r\n \ - \ \"13.104.144.128/27\",\r\n \"13.104.144.160/27\",\r\n \ - \ \"13.104.144.192/27\",\r\n \"13.104.144.224/27\",\r\n \ - \ \"13.104.145.0/26\",\r\n \"13.104.145.64/26\",\r\n \ - \ \"13.104.145.128/27\",\r\n \"13.104.145.160/27\",\r\n \ - \ \"13.104.145.192/26\",\r\n \"13.104.146.0/26\",\r\n \ - \ \"13.104.146.64/26\",\r\n \"13.104.146.128/25\",\r\n \"\ - 13.104.147.0/25\",\r\n \"13.104.147.128/25\",\r\n \"13.104.148.0/25\"\ - ,\r\n \"13.104.148.128/25\",\r\n \"13.104.149.0/26\",\r\n\ - \ \"13.104.149.64/26\",\r\n \"13.104.149.128/25\",\r\n \ - \ \"13.104.150.0/25\",\r\n \"13.104.150.128/26\",\r\n \ - \ \"13.104.150.192/26\",\r\n \"13.104.151.0/26\",\r\n \ - \ \"13.104.151.64/26\",\r\n \"13.104.151.128/26\",\r\n \ - \ \"13.104.151.192/26\",\r\n \"13.104.152.0/25\",\r\n \ - \ \"13.104.152.128/25\",\r\n \"13.104.153.0/27\",\r\n \"\ - 13.104.153.32/28\",\r\n \"13.104.153.48/28\",\r\n \"13.104.153.64/27\"\ - ,\r\n \"13.104.153.96/27\",\r\n \"13.104.153.128/26\",\r\ - \n \"13.104.153.192/26\",\r\n \"13.104.154.0/25\",\r\n \ - \ \"13.104.154.128/25\",\r\n \"13.104.155.0/27\",\r\n \ - \ \"13.104.155.32/27\",\r\n \"13.104.155.64/26\",\r\n \ - \ \"13.104.155.128/26\",\r\n \"13.104.155.192/26\",\r\n \ - \ \"13.104.156.0/24\",\r\n \"13.104.157.0/25\",\r\n \ - \ \"13.104.157.128/25\",\r\n \"13.104.158.0/28\",\r\n \"\ - 13.104.158.16/28\",\r\n \"13.104.158.32/27\",\r\n \"13.104.158.64/26\"\ - ,\r\n \"13.104.158.128/27\",\r\n \"13.104.158.160/28\",\r\ - \n \"13.104.158.176/28\",\r\n \"13.104.158.192/27\",\r\n\ - \ \"13.104.158.224/27\",\r\n \"13.104.159.0/25\",\r\n \ - \ \"13.104.159.128/26\",\r\n \"13.104.159.192/26\",\r\n \ - \ \"13.104.192.0/21\",\r\n \"13.104.208.0/26\",\r\n \ - \ \"13.104.208.64/27\",\r\n \"13.104.208.96/27\",\r\n \ - \ \"13.104.208.128/27\",\r\n \"13.104.208.160/28\",\r\n \ - \ \"13.104.208.176/28\",\r\n \"13.104.208.192/26\",\r\n \ - \ \"13.104.209.0/24\",\r\n \"13.104.210.0/24\",\r\n \"\ - 13.104.211.0/25\",\r\n \"13.104.211.128/26\",\r\n \"13.104.211.192/26\"\ - ,\r\n \"13.104.212.0/26\",\r\n \"13.104.212.64/26\",\r\n\ - \ \"13.104.212.128/26\",\r\n \"13.104.212.192/26\",\r\n\ - \ \"13.104.213.0/25\",\r\n \"13.104.213.128/25\",\r\n \ - \ \"13.104.214.0/25\",\r\n \"13.104.214.128/25\",\r\n \ - \ \"13.104.215.0/25\",\r\n \"13.104.215.128/25\",\r\n \ - \ \"13.104.216.0/24\",\r\n \"13.104.217.0/25\",\r\n \"\ - 13.104.217.128/25\",\r\n \"13.104.218.0/25\",\r\n \"13.104.218.128/25\"\ - ,\r\n \"13.104.219.0/25\",\r\n \"13.104.219.128/25\",\r\n\ - \ \"13.104.220.0/25\",\r\n \"13.104.220.128/25\",\r\n \ - \ \"13.104.221.0/24\",\r\n \"13.104.222.0/24\",\r\n \ - \ \"13.104.223.0/25\",\r\n \"13.104.223.128/26\",\r\n \ - \ \"13.104.223.192/26\",\r\n \"13.105.14.0/25\",\r\n \"\ - 13.105.14.128/26\",\r\n \"13.105.14.192/26\",\r\n \"13.105.16.0/25\"\ - ,\r\n \"13.105.16.128/26\",\r\n \"13.105.16.192/26\",\r\n\ - \ \"13.105.17.0/26\",\r\n \"13.105.17.64/26\",\r\n \ - \ \"13.105.17.128/26\",\r\n \"13.105.17.192/26\",\r\n \ - \ \"13.105.18.0/26\",\r\n \"13.105.18.64/26\",\r\n \"\ - 13.105.18.160/27\",\r\n \"13.105.18.192/26\",\r\n \"13.105.19.0/25\"\ - ,\r\n \"13.105.19.128/25\",\r\n \"13.105.20.0/25\",\r\n\ - \ \"13.105.20.128/26\",\r\n \"13.105.20.192/26\",\r\n \ - \ \"13.105.21.0/24\",\r\n \"13.105.22.0/24\",\r\n \ - \ \"13.105.23.0/26\",\r\n \"13.105.23.64/26\",\r\n \"13.105.23.128/25\"\ - ,\r\n \"13.105.24.0/24\",\r\n \"13.105.25.0/24\",\r\n \ - \ \"13.105.26.0/24\",\r\n \"13.105.27.0/25\",\r\n \ - \ \"13.105.27.128/27\",\r\n \"13.105.27.160/27\",\r\n \"\ - 13.105.27.192/27\",\r\n \"13.105.27.224/27\",\r\n \"13.105.28.0/28\"\ - ,\r\n \"13.105.28.16/28\",\r\n \"13.105.28.32/28\",\r\n\ - \ \"13.105.28.48/28\",\r\n \"13.105.28.128/25\",\r\n \ - \ \"13.105.29.0/25\",\r\n \"13.105.29.128/25\",\r\n \ - \ \"13.105.36.0/27\",\r\n \"13.105.36.32/28\",\r\n \"\ - 13.105.36.48/28\",\r\n \"13.105.36.64/27\",\r\n \"13.105.36.96/27\"\ - ,\r\n \"13.105.36.128/26\",\r\n \"13.105.36.192/26\",\r\n\ - \ \"13.105.37.0/26\",\r\n \"13.105.37.64/26\",\r\n \ - \ \"13.105.37.128/26\",\r\n \"13.105.37.192/26\",\r\n \ - \ \"13.105.52.0/27\",\r\n \"13.105.52.32/27\",\r\n \"\ - 13.105.52.64/28\",\r\n \"13.105.52.80/28\",\r\n \"13.105.52.96/27\"\ - ,\r\n \"13.105.52.128/26\",\r\n \"13.105.52.192/26\",\r\n\ - \ \"13.105.53.0/25\",\r\n \"13.105.53.128/26\",\r\n \ - \ \"13.105.53.192/26\",\r\n \"13.105.60.0/27\",\r\n \ - \ \"13.105.60.32/28\",\r\n \"13.105.60.48/28\",\r\n \"\ - 13.105.60.64/27\",\r\n \"13.105.60.96/27\",\r\n \"13.105.60.128/27\"\ - ,\r\n \"13.105.60.160/27\",\r\n \"13.105.60.192/26\",\r\n\ - \ \"13.105.61.0/28\",\r\n \"13.105.61.16/28\",\r\n \ - \ \"13.105.61.32/27\",\r\n \"13.105.61.64/26\",\r\n \ - \ \"13.105.61.128/25\",\r\n \"13.105.66.0/27\",\r\n \"13.105.66.32/27\"\ - ,\r\n \"13.105.66.64/26\",\r\n \"13.105.66.128/28\",\r\n\ - \ \"13.105.66.144/28\",\r\n \"13.105.66.160/27\",\r\n \ - \ \"13.105.66.192/26\",\r\n \"13.105.67.0/25\",\r\n \ - \ \"13.105.67.128/25\",\r\n \"13.105.74.0/27\",\r\n \"\ - 13.105.74.32/28\",\r\n \"13.105.74.48/28\",\r\n \"13.105.74.64/27\"\ - ,\r\n \"13.105.74.96/27\",\r\n \"13.105.74.128/26\",\r\n\ - \ \"13.105.74.192/26\",\r\n \"13.105.75.0/27\",\r\n \ - \ \"13.105.75.32/28\",\r\n \"13.105.75.48/28\",\r\n \ - \ \"13.105.75.64/27\",\r\n \"13.105.75.96/27\",\r\n \"\ - 13.105.75.128/27\",\r\n \"13.105.75.160/27\",\r\n \"13.105.75.192/28\"\ - ,\r\n \"13.105.75.208/28\",\r\n \"13.105.75.224/27\",\r\n\ - \ \"13.105.96.0/26\",\r\n \"13.105.96.64/27\",\r\n \ - \ \"13.105.96.96/28\",\r\n \"13.105.96.112/28\",\r\n \ - \ \"13.105.96.128/25\",\r\n \"13.105.97.0/27\",\r\n \"\ - 13.105.97.32/27\",\r\n \"13.105.97.64/27\",\r\n \"13.105.97.96/27\"\ - ,\r\n \"13.105.97.128/25\",\r\n \"13.105.98.0/27\",\r\n\ - \ \"13.105.98.32/28\",\r\n \"13.105.98.48/28\",\r\n \ - \ \"13.105.98.64/27\",\r\n \"13.105.98.96/27\",\r\n \ - \ \"13.105.98.128/27\",\r\n \"13.105.98.160/27\",\r\n \"\ - 13.105.98.192/28\",\r\n \"13.105.98.208/28\",\r\n \"13.105.98.224/27\"\ - ,\r\n \"13.105.99.0/26\",\r\n \"13.105.99.64/27\",\r\n \ - \ \"13.105.99.96/28\",\r\n \"13.105.99.112/28\",\r\n \ - \ \"13.105.99.128/27\",\r\n \"13.105.99.160/27\",\r\n \ - \ \"13.105.99.192/26\",\r\n \"13.105.100.0/28\",\r\n \ - \ \"13.105.100.16/28\",\r\n \"13.105.100.32/27\",\r\n \"\ - 13.105.100.64/26\",\r\n \"13.105.100.128/27\",\r\n \"13.105.100.160/28\"\ - ,\r\n \"13.105.100.176/28\",\r\n \"13.105.100.192/27\",\r\ - \n \"13.105.100.224/27\",\r\n \"13.105.101.0/27\",\r\n \ - \ \"20.21.0.0/17\",\r\n \"20.21.128.0/20\",\r\n \ - \ \"20.21.144.0/21\",\r\n \"20.36.0.0/19\",\r\n \"20.36.32.0/19\"\ - ,\r\n \"20.36.64.0/19\",\r\n \"20.36.96.0/21\",\r\n \ - \ \"20.36.104.0/21\",\r\n \"20.36.112.0/20\",\r\n \"\ - 20.36.128.0/17\",\r\n \"20.37.0.0/18\",\r\n \"20.37.64.0/19\"\ - ,\r\n \"20.37.96.0/19\",\r\n \"20.37.128.0/18\",\r\n \ - \ \"20.37.192.0/19\",\r\n \"20.37.224.0/19\",\r\n \ - \ \"20.38.0.0/20\",\r\n \"20.38.16.0/24\",\r\n \"20.38.32.0/20\"\ - ,\r\n \"20.38.64.0/19\",\r\n \"20.38.96.0/23\",\r\n \ - \ \"20.38.98.0/24\",\r\n \"20.38.99.0/24\",\r\n \"\ - 20.38.100.0/23\",\r\n \"20.38.102.0/23\",\r\n \"20.38.104.0/23\"\ - ,\r\n \"20.38.106.0/23\",\r\n \"20.38.108.0/23\",\r\n \ - \ \"20.38.110.0/23\",\r\n \"20.38.112.0/23\",\r\n \ - \ \"20.38.114.0/25\",\r\n \"20.38.114.128/25\",\r\n \"\ - 20.38.115.0/24\",\r\n \"20.38.116.0/23\",\r\n \"20.38.118.0/24\"\ - ,\r\n \"20.38.119.0/24\",\r\n \"20.38.120.0/24\",\r\n \ - \ \"20.38.121.0/25\",\r\n \"20.38.121.128/25\",\r\n \ - \ \"20.38.122.0/23\",\r\n \"20.38.124.0/23\",\r\n \"\ - 20.38.126.0/23\",\r\n \"20.38.128.0/21\",\r\n \"20.38.136.0/21\"\ - ,\r\n \"20.38.144.0/21\",\r\n \"20.38.152.0/21\",\r\n \ - \ \"20.38.160.0/20\",\r\n \"20.38.184.0/22\",\r\n \ - \ \"20.38.188.0/22\",\r\n \"20.38.196.0/22\",\r\n \"20.38.200.0/22\"\ - ,\r\n \"20.38.208.0/22\",\r\n \"20.39.0.0/19\",\r\n \ - \ \"20.39.32.0/19\",\r\n \"20.39.64.0/21\",\r\n \"\ - 20.39.72.0/21\",\r\n \"20.39.80.0/20\",\r\n \"20.39.96.0/19\"\ - ,\r\n \"20.39.128.0/20\",\r\n \"20.39.144.0/20\",\r\n \ - \ \"20.39.160.0/21\",\r\n \"20.39.168.0/21\",\r\n \ - \ \"20.39.176.0/21\",\r\n \"20.39.184.0/21\",\r\n \"20.39.192.0/20\"\ - ,\r\n \"20.39.208.0/20\",\r\n \"20.39.224.0/21\",\r\n \ - \ \"20.39.232.0/21\",\r\n \"20.39.240.0/20\",\r\n \ - \ \"20.40.0.0/21\",\r\n \"20.40.8.0/21\",\r\n \"20.40.16.0/21\"\ - ,\r\n \"20.40.24.0/21\",\r\n \"20.40.32.0/21\",\r\n \ - \ \"20.40.40.0/21\",\r\n \"20.40.48.0/20\",\r\n \"\ - 20.40.64.0/20\",\r\n \"20.40.80.0/21\",\r\n \"20.40.88.0/21\"\ - ,\r\n \"20.40.96.0/21\",\r\n \"20.40.104.0/21\",\r\n \ - \ \"20.40.112.0/21\",\r\n \"20.40.120.0/21\",\r\n \ - \ \"20.40.128.0/19\",\r\n \"20.40.160.0/20\",\r\n \"20.40.176.0/20\"\ - ,\r\n \"20.40.192.0/18\",\r\n \"20.41.0.0/18\",\r\n \ - \ \"20.41.64.0/18\",\r\n \"20.41.128.0/18\",\r\n \"\ - 20.41.192.0/18\",\r\n \"20.42.0.0/17\",\r\n \"20.42.128.0/18\"\ - ,\r\n \"20.42.192.0/19\",\r\n \"20.42.224.0/19\",\r\n \ - \ \"20.43.0.0/19\",\r\n \"20.43.32.0/19\",\r\n \"\ - 20.43.64.0/19\",\r\n \"20.43.96.0/20\",\r\n \"20.43.112.0/21\"\ - ,\r\n \"20.43.120.0/21\",\r\n \"20.43.128.0/18\",\r\n \ - \ \"20.43.192.0/18\",\r\n \"20.44.0.0/21\",\r\n \"\ - 20.44.8.0/21\",\r\n \"20.44.16.0/21\",\r\n \"20.44.24.0/21\"\ - ,\r\n \"20.44.32.0/19\",\r\n \"20.44.64.0/18\",\r\n \ - \ \"20.44.128.0/18\",\r\n \"20.44.192.0/18\",\r\n \"\ - 20.45.0.0/18\",\r\n \"20.45.64.0/19\",\r\n \"20.45.96.0/20\"\ - ,\r\n \"20.45.112.0/21\",\r\n \"20.45.120.0/21\",\r\n \ - \ \"20.45.128.0/21\",\r\n \"20.45.136.0/21\",\r\n \ - \ \"20.45.144.0/20\",\r\n \"20.45.160.0/19\",\r\n \"20.45.192.0/18\"\ - ,\r\n \"20.46.0.0/19\",\r\n \"20.46.32.0/19\",\r\n \ - \ \"20.46.64.0/19\",\r\n \"20.46.96.0/20\",\r\n \"20.46.112.0/20\"\ - ,\r\n \"20.46.128.0/20\",\r\n \"20.46.144.0/20\",\r\n \ - \ \"20.46.160.0/19\",\r\n \"20.46.192.0/21\",\r\n \ - \ \"20.46.200.0/21\",\r\n \"20.46.208.0/20\",\r\n \"20.46.224.0/19\"\ - ,\r\n \"20.47.0.0/24\",\r\n \"20.47.1.0/24\",\r\n \ - \ \"20.47.2.0/24\",\r\n \"20.47.3.0/24\",\r\n \"20.47.4.0/24\"\ - ,\r\n \"20.47.5.0/24\",\r\n \"20.47.6.0/24\",\r\n \ - \ \"20.47.7.0/24\",\r\n \"20.47.8.0/24\",\r\n \"20.47.9.0/24\"\ - ,\r\n \"20.47.10.0/24\",\r\n \"20.47.11.0/24\",\r\n \ - \ \"20.47.12.0/24\",\r\n \"20.47.13.0/24\",\r\n \"\ - 20.47.14.0/24\",\r\n \"20.47.15.0/24\",\r\n \"20.47.16.0/23\"\ - ,\r\n \"20.47.18.0/23\",\r\n \"20.47.20.0/23\",\r\n \ - \ \"20.47.22.0/23\",\r\n \"20.47.24.0/23\",\r\n \"\ - 20.47.26.0/24\",\r\n \"20.47.27.0/24\",\r\n \"20.47.28.0/24\"\ - ,\r\n \"20.47.29.0/24\",\r\n \"20.47.30.0/24\",\r\n \ - \ \"20.47.31.0/24\",\r\n \"20.47.32.0/24\",\r\n \"\ - 20.47.33.0/24\",\r\n \"20.47.34.0/24\",\r\n \"20.47.35.0/24\"\ - ,\r\n \"20.47.36.0/24\",\r\n \"20.47.37.0/24\",\r\n \ - \ \"20.47.38.0/24\",\r\n \"20.47.39.0/24\",\r\n \"\ - 20.47.40.0/24\",\r\n \"20.47.41.0/24\",\r\n \"20.47.42.0/24\"\ - ,\r\n \"20.47.43.0/24\",\r\n \"20.47.44.0/24\",\r\n \ - \ \"20.47.45.0/24\",\r\n \"20.47.46.0/24\",\r\n \"\ - 20.47.47.0/24\",\r\n \"20.47.48.0/24\",\r\n \"20.47.49.0/24\"\ - ,\r\n \"20.47.50.0/24\",\r\n \"20.47.51.0/24\",\r\n \ - \ \"20.47.52.0/24\",\r\n \"20.47.53.0/24\",\r\n \"\ - 20.47.54.0/24\",\r\n \"20.47.55.0/24\",\r\n \"20.47.56.0/24\"\ - ,\r\n \"20.47.57.0/24\",\r\n \"20.47.58.0/23\",\r\n \ - \ \"20.47.60.0/23\",\r\n \"20.47.62.0/23\",\r\n \"\ - 20.47.64.0/24\",\r\n \"20.47.65.0/24\",\r\n \"20.47.66.0/24\"\ - ,\r\n \"20.47.67.0/24\",\r\n \"20.47.68.0/24\",\r\n \ - \ \"20.47.69.0/24\",\r\n \"20.47.70.0/24\",\r\n \"\ - 20.47.71.0/24\",\r\n \"20.47.72.0/23\",\r\n \"20.47.74.0/23\"\ - ,\r\n \"20.47.76.0/23\",\r\n \"20.47.78.0/23\",\r\n \ - \ \"20.47.80.0/23\",\r\n \"20.47.82.0/23\",\r\n \"\ - 20.47.84.0/23\",\r\n \"20.47.86.0/24\",\r\n \"20.47.87.0/24\"\ - ,\r\n \"20.47.88.0/24\",\r\n \"20.47.89.0/24\",\r\n \ - \ \"20.47.90.0/24\",\r\n \"20.47.91.0/24\",\r\n \"\ - 20.47.92.0/24\",\r\n \"20.47.93.0/24\",\r\n \"20.47.94.0/24\"\ - ,\r\n \"20.47.95.0/24\",\r\n \"20.47.96.0/23\",\r\n \ - \ \"20.47.98.0/24\",\r\n \"20.47.99.0/24\",\r\n \"\ - 20.47.100.0/24\",\r\n \"20.47.101.0/24\",\r\n \"20.47.102.0/24\"\ - ,\r\n \"20.47.103.0/24\",\r\n \"20.47.104.0/24\",\r\n \ - \ \"20.47.105.0/24\",\r\n \"20.47.106.0/24\",\r\n \ - \ \"20.47.107.0/24\",\r\n \"20.47.108.0/23\",\r\n \"20.47.110.0/24\"\ - ,\r\n \"20.47.111.0/24\",\r\n \"20.47.112.0/24\",\r\n \ - \ \"20.47.113.0/24\",\r\n \"20.47.114.0/24\",\r\n \ - \ \"20.47.115.0/24\",\r\n \"20.47.116.0/24\",\r\n \"20.47.117.0/24\"\ - ,\r\n \"20.47.118.0/24\",\r\n \"20.47.119.0/24\",\r\n \ - \ \"20.47.120.0/23\",\r\n \"20.47.122.0/23\",\r\n \ - \ \"20.47.124.0/23\",\r\n \"20.47.126.0/23\",\r\n \"20.47.128.0/17\"\ - ,\r\n \"20.48.0.0/17\",\r\n \"20.48.128.0/18\",\r\n \ - \ \"20.48.192.0/20\",\r\n \"20.48.224.0/19\",\r\n \"\ - 20.49.0.0/18\",\r\n \"20.49.64.0/20\",\r\n \"20.49.80.0/21\"\ - ,\r\n \"20.49.88.0/21\",\r\n \"20.49.96.0/21\",\r\n \ - \ \"20.49.104.0/21\",\r\n \"20.49.112.0/21\",\r\n \"\ - 20.49.120.0/21\",\r\n \"20.49.128.0/17\",\r\n \"20.50.0.0/18\"\ - ,\r\n \"20.50.64.0/20\",\r\n \"20.50.80.0/21\",\r\n \ - \ \"20.50.96.0/19\",\r\n \"20.50.128.0/17\",\r\n \"\ - 20.51.0.0/21\",\r\n \"20.51.8.0/21\",\r\n \"20.51.16.0/21\"\ - ,\r\n \"20.51.24.0/21\",\r\n \"20.51.32.0/19\",\r\n \ - \ \"20.51.64.0/18\",\r\n \"20.51.128.0/17\",\r\n \"\ - 20.52.0.0/18\",\r\n \"20.52.64.0/21\",\r\n \"20.52.72.0/21\"\ - ,\r\n \"20.52.80.0/27\",\r\n \"20.52.80.32/27\",\r\n \ - \ \"20.52.80.64/27\",\r\n \"20.52.88.0/21\",\r\n \"\ - 20.52.96.0/19\",\r\n \"20.52.128.0/17\",\r\n \"20.53.0.0/19\"\ - ,\r\n \"20.53.32.0/28\",\r\n \"20.53.40.0/21\",\r\n \ - \ \"20.53.48.0/21\",\r\n \"20.53.56.0/21\",\r\n \"\ - 20.53.64.0/18\",\r\n \"20.53.128.0/17\",\r\n \"20.54.0.0/17\"\ - ,\r\n \"20.54.128.0/17\",\r\n \"20.55.0.0/17\",\r\n \ - \ \"20.55.128.0/18\",\r\n \"20.55.192.0/18\",\r\n \"\ - 20.56.0.0/16\",\r\n \"20.57.0.0/17\",\r\n \"20.57.128.0/18\"\ - ,\r\n \"20.57.192.0/19\",\r\n \"20.57.224.0/19\",\r\n \ - \ \"20.58.0.0/18\",\r\n \"20.58.64.0/18\",\r\n \"\ - 20.58.128.0/18\",\r\n \"20.58.192.0/18\",\r\n \"20.59.0.0/18\"\ - ,\r\n \"20.59.64.0/18\",\r\n \"20.59.128.0/18\",\r\n \ - \ \"20.59.192.0/18\",\r\n \"20.60.0.0/24\",\r\n \"\ - 20.60.1.0/24\",\r\n \"20.60.2.0/23\",\r\n \"20.60.4.0/24\"\ - ,\r\n \"20.60.5.0/24\",\r\n \"20.60.6.0/23\",\r\n \ - \ \"20.60.8.0/24\",\r\n \"20.60.9.0/24\",\r\n \"20.60.10.0/24\"\ - ,\r\n \"20.60.11.0/24\",\r\n \"20.60.12.0/24\",\r\n \ - \ \"20.60.13.0/24\",\r\n \"20.60.14.0/24\",\r\n \"\ - 20.60.15.0/24\",\r\n \"20.60.16.0/24\",\r\n \"20.60.17.0/24\"\ - ,\r\n \"20.60.18.0/24\",\r\n \"20.60.19.0/24\",\r\n \ - \ \"20.60.20.0/24\",\r\n \"20.60.21.0/24\",\r\n \"\ - 20.60.22.0/23\",\r\n \"20.60.24.0/23\",\r\n \"20.60.26.0/23\"\ - ,\r\n \"20.60.28.0/23\",\r\n \"20.60.30.0/23\",\r\n \ - \ \"20.60.32.0/23\",\r\n \"20.60.34.0/23\",\r\n \"\ - 20.60.36.0/23\",\r\n \"20.60.38.0/23\",\r\n \"20.60.40.0/23\"\ - ,\r\n \"20.60.42.0/23\",\r\n \"20.60.44.0/25\",\r\n \ - \ \"20.60.46.0/23\",\r\n \"20.60.48.0/22\",\r\n \"\ - 20.60.52.0/23\",\r\n \"20.60.54.0/23\",\r\n \"20.60.56.0/22\"\ - ,\r\n \"20.60.60.0/22\",\r\n \"20.60.64.0/22\",\r\n \ - \ \"20.60.68.0/22\",\r\n \"20.60.72.0/22\",\r\n \"\ - 20.60.76.0/23\",\r\n \"20.60.78.0/23\",\r\n \"20.60.80.0/23\"\ - ,\r\n \"20.60.82.0/23\",\r\n \"20.60.84.0/23\",\r\n \ - \ \"20.60.86.0/23\",\r\n \"20.60.88.0/22\",\r\n \"\ - 20.60.128.0/23\",\r\n \"20.60.130.0/24\",\r\n \"20.60.131.0/24\"\ - ,\r\n \"20.60.132.0/23\",\r\n \"20.60.134.0/23\",\r\n \ - \ \"20.60.136.0/24\",\r\n \"20.60.138.0/23\",\r\n \ - \ \"20.60.140.0/23\",\r\n \"20.60.142.0/23\",\r\n \"20.60.144.0/23\"\ - ,\r\n \"20.60.146.0/23\",\r\n \"20.60.148.0/23\",\r\n \ - \ \"20.60.150.0/23\",\r\n \"20.60.152.0/23\",\r\n \ - \ \"20.60.154.0/23\",\r\n \"20.60.156.0/23\",\r\n \"20.60.158.0/23\"\ - ,\r\n \"20.60.160.0/23\",\r\n \"20.60.162.0/23\",\r\n \ - \ \"20.60.164.0/23\",\r\n \"20.60.166.0/23\",\r\n \ - \ \"20.60.168.0/23\",\r\n \"20.60.170.0/23\",\r\n \"20.60.172.0/23\"\ - ,\r\n \"20.60.174.0/23\",\r\n \"20.60.176.0/23\",\r\n \ - \ \"20.60.178.0/23\",\r\n \"20.60.180.0/23\",\r\n \ - \ \"20.60.182.0/23\",\r\n \"20.60.184.0/23\",\r\n \"20.60.186.0/23\"\ - ,\r\n \"20.60.188.0/23\",\r\n \"20.60.190.0/23\",\r\n \ - \ \"20.60.192.0/23\",\r\n \"20.60.194.0/23\",\r\n \ - \ \"20.60.196.0/23\",\r\n \"20.60.198.0/23\",\r\n \"20.60.200.0/23\"\ - ,\r\n \"20.60.202.0/23\",\r\n \"20.60.204.0/23\",\r\n \ - \ \"20.60.206.0/23\",\r\n \"20.60.208.0/23\",\r\n \ - \ \"20.60.210.0/23\",\r\n \"20.60.212.0/23\",\r\n \"20.60.214.0/23\"\ - ,\r\n \"20.60.216.0/23\",\r\n \"20.60.218.0/23\",\r\n \ - \ \"20.60.220.0/23\",\r\n \"20.60.222.0/23\",\r\n \ - \ \"20.60.224.0/23\",\r\n \"20.60.226.0/23\",\r\n \"20.60.228.0/23\"\ - ,\r\n \"20.60.230.0/23\",\r\n \"20.60.232.0/23\",\r\n \ - \ \"20.60.234.0/23\",\r\n \"20.60.236.0/23\",\r\n \ - \ \"20.60.238.0/23\",\r\n \"20.60.240.0/23\",\r\n \"20.60.242.0/23\"\ - ,\r\n \"20.60.244.0/23\",\r\n \"20.60.246.0/23\",\r\n \ - \ \"20.60.248.0/23\",\r\n \"20.60.250.0/23\",\r\n \ - \ \"20.60.252.0/23\",\r\n \"20.60.254.0/23\",\r\n \"20.61.0.0/16\"\ - ,\r\n \"20.62.0.0/17\",\r\n \"20.62.128.0/17\",\r\n \ - \ \"20.63.0.0/17\",\r\n \"20.63.128.0/18\",\r\n \"\ - 20.63.192.0/18\",\r\n \"20.64.0.0/17\",\r\n \"20.64.128.0/17\"\ - ,\r\n \"20.65.0.0/17\",\r\n \"20.65.128.0/17\",\r\n \ - \ \"20.66.0.0/17\",\r\n \"20.66.128.0/17\",\r\n \"\ - 20.67.0.0/17\",\r\n \"20.67.128.0/17\",\r\n \"20.68.0.0/18\"\ - ,\r\n \"20.68.64.0/18\",\r\n \"20.68.128.0/17\",\r\n \ - \ \"20.69.0.0/18\",\r\n \"20.69.64.0/18\",\r\n \"\ - 20.69.128.0/18\",\r\n \"20.69.192.0/18\",\r\n \"20.70.0.0/18\"\ - ,\r\n \"20.70.64.0/18\",\r\n \"20.70.128.0/17\",\r\n \ - \ \"20.71.0.0/16\",\r\n \"20.72.0.0/19\",\r\n \"20.72.32.0/19\"\ - ,\r\n \"20.72.64.0/18\",\r\n \"20.72.128.0/18\",\r\n \ - \ \"20.72.192.0/18\",\r\n \"20.73.0.0/16\",\r\n \"\ - 20.74.0.0/17\",\r\n \"20.74.128.0/17\",\r\n \"20.75.0.0/17\"\ - ,\r\n \"20.75.128.0/17\",\r\n \"20.76.0.0/16\",\r\n \ - \ \"20.77.0.0/17\",\r\n \"20.77.128.0/18\",\r\n \"\ - 20.77.192.0/18\",\r\n \"20.78.0.0/17\",\r\n \"20.78.128.0/18\"\ - ,\r\n \"20.78.192.0/18\",\r\n \"20.79.0.0/16\",\r\n \ - \ \"20.80.0.0/18\",\r\n \"20.80.64.0/18\",\r\n \"20.80.128.0/18\"\ - ,\r\n \"20.80.192.0/18\",\r\n \"20.81.0.0/17\",\r\n \ - \ \"20.81.128.0/17\",\r\n \"20.82.0.0/17\",\r\n \"\ - 20.82.128.0/17\",\r\n \"20.83.0.0/18\",\r\n \"20.83.64.0/18\"\ - ,\r\n \"20.83.128.0/18\",\r\n \"20.83.192.0/18\",\r\n \ - \ \"20.84.0.0/17\",\r\n \"20.84.128.0/17\",\r\n \"\ - 20.85.0.0/17\",\r\n \"20.85.128.0/17\",\r\n \"20.86.0.0/16\"\ - ,\r\n \"20.87.0.0/17\",\r\n \"20.88.0.0/18\",\r\n \ - \ \"20.88.64.0/19\",\r\n \"20.88.96.0/19\",\r\n \"20.88.128.0/18\"\ - ,\r\n \"20.88.192.0/18\",\r\n \"20.89.0.0/17\",\r\n \ - \ \"20.89.128.0/18\",\r\n \"20.89.192.0/18\",\r\n \"\ - 20.90.0.0/18\",\r\n \"20.90.64.0/18\",\r\n \"20.90.128.0/17\"\ - ,\r\n \"20.91.0.0/18\",\r\n \"20.91.128.0/17\",\r\n \ - \ \"20.92.0.0/18\",\r\n \"20.92.64.0/18\",\r\n \"20.92.128.0/17\"\ - ,\r\n \"20.93.0.0/17\",\r\n \"20.93.128.0/17\",\r\n \ - \ \"20.94.0.0/17\",\r\n \"20.94.128.0/18\",\r\n \"\ - 20.94.192.0/18\",\r\n \"20.95.0.0/21\",\r\n \"20.95.8.0/21\"\ - ,\r\n \"20.95.255.0/29\",\r\n \"20.96.0.0/16\",\r\n \ - \ \"20.97.0.0/17\",\r\n \"20.97.128.0/17\",\r\n \"\ - 20.98.0.0/18\",\r\n \"20.98.64.0/18\",\r\n \"20.98.128.0/18\"\ - ,\r\n \"20.98.192.0/18\",\r\n \"20.99.0.0/17\",\r\n \ - \ \"20.99.128.0/17\",\r\n \"20.100.0.0/18\",\r\n \"\ - 20.101.0.0/16\",\r\n \"20.102.0.0/17\",\r\n \"20.102.128.0/18\"\ - ,\r\n \"20.102.192.0/18\",\r\n \"20.103.0.0/16\",\r\n \ - \ \"20.104.0.0/17\",\r\n \"20.104.128.0/18\",\r\n \ - \ \"20.104.192.0/18\",\r\n \"20.105.0.0/17\",\r\n \"20.105.128.0/17\"\ - ,\r\n \"20.106.0.0/18\",\r\n \"20.106.64.0/18\",\r\n \ - \ \"20.106.128.0/17\",\r\n \"20.107.0.0/17\",\r\n \ - \ \"20.108.0.0/16\",\r\n \"20.109.0.0/17\",\r\n \"20.109.128.0/18\"\ - ,\r\n \"20.109.192.0/18\",\r\n \"20.110.0.0/16\",\r\n \ - \ \"20.111.0.0/18\",\r\n \"20.112.0.0/17\",\r\n \"\ - 20.112.128.0/19\",\r\n \"20.112.192.0/18\",\r\n \"20.113.0.0/18\"\ - ,\r\n \"20.135.0.0/22\",\r\n \"20.135.4.0/23\",\r\n \ - \ \"20.135.6.0/23\",\r\n \"20.135.8.0/22\",\r\n \"\ - 20.135.12.0/22\",\r\n \"20.135.16.0/23\",\r\n \"20.135.18.0/23\"\ - ,\r\n \"20.135.20.0/23\",\r\n \"20.135.22.0/23\",\r\n \ - \ \"20.135.24.0/23\",\r\n \"20.135.26.0/23\",\r\n \ - \ \"20.135.28.0/23\",\r\n \"20.135.30.0/23\",\r\n \"20.135.32.0/23\"\ - ,\r\n \"20.135.34.0/23\",\r\n \"20.135.36.0/23\",\r\n \ - \ \"20.135.38.0/23\",\r\n \"20.135.40.0/23\",\r\n \ - \ \"20.135.42.0/23\",\r\n \"20.135.44.0/23\",\r\n \"20.135.46.0/23\"\ - ,\r\n \"20.135.48.0/23\",\r\n \"20.135.50.0/23\",\r\n \ - \ \"20.135.52.0/23\",\r\n \"20.135.54.0/23\",\r\n \ - \ \"20.135.56.0/23\",\r\n \"20.135.58.0/23\",\r\n \"20.135.60.0/23\"\ - ,\r\n \"20.135.62.0/23\",\r\n \"20.135.64.0/23\",\r\n \ - \ \"20.135.66.0/23\",\r\n \"20.135.68.0/23\",\r\n \ - \ \"20.135.70.0/23\",\r\n \"20.135.72.0/23\",\r\n \"20.135.74.0/23\"\ - ,\r\n \"20.135.76.0/23\",\r\n \"20.135.78.0/23\",\r\n \ - \ \"20.135.80.0/22\",\r\n \"20.135.84.0/22\",\r\n \ - \ \"20.135.88.0/23\",\r\n \"20.135.90.0/23\",\r\n \"20.135.92.0/22\"\ - ,\r\n \"20.135.96.0/22\",\r\n \"20.135.100.0/23\",\r\n \ - \ \"20.135.102.0/23\",\r\n \"20.135.104.0/22\",\r\n \ - \ \"20.135.108.0/22\",\r\n \"20.135.112.0/23\",\r\n \ - \ \"20.135.114.0/23\",\r\n \"20.135.116.0/22\",\r\n \"20.135.120.0/21\"\ - ,\r\n \"20.135.128.0/22\",\r\n \"20.135.132.0/23\",\r\n\ - \ \"20.135.134.0/23\",\r\n \"20.135.136.0/22\",\r\n \ - \ \"20.135.140.0/22\",\r\n \"20.135.144.0/23\",\r\n \ - \ \"20.135.146.0/23\",\r\n \"20.135.148.0/22\",\r\n \"\ - 20.135.152.0/22\",\r\n \"20.135.156.0/23\",\r\n \"20.135.158.0/23\"\ - ,\r\n \"20.135.160.0/22\",\r\n \"20.135.164.0/22\",\r\n\ - \ \"20.135.168.0/23\",\r\n \"20.135.170.0/23\",\r\n \ - \ \"20.135.172.0/22\",\r\n \"20.135.176.0/22\",\r\n \ - \ \"20.135.180.0/23\",\r\n \"20.135.182.0/23\",\r\n \"\ - 20.135.184.0/22\",\r\n \"20.135.188.0/22\",\r\n \"20.135.192.0/23\"\ - ,\r\n \"20.135.194.0/23\",\r\n \"20.135.196.0/22\",\r\n\ - \ \"20.135.200.0/22\",\r\n \"20.135.204.0/23\",\r\n \ - \ \"20.135.206.0/23\",\r\n \"20.135.208.0/23\",\r\n \ - \ \"20.135.210.0/23\",\r\n \"20.135.212.0/22\",\r\n \"\ - 20.135.216.0/22\",\r\n \"20.135.220.0/23\",\r\n \"20.135.222.0/23\"\ - ,\r\n \"20.135.224.0/22\",\r\n \"20.135.228.0/22\",\r\n\ - \ \"20.135.232.0/23\",\r\n \"20.135.234.0/23\",\r\n \ - \ \"20.135.236.0/23\",\r\n \"20.135.238.0/23\",\r\n \ - \ \"20.135.240.0/25\",\r\n \"20.135.242.0/23\",\r\n \"\ - 20.135.244.0/23\",\r\n \"20.136.0.0/25\",\r\n \"20.136.0.128/25\"\ - ,\r\n \"20.136.1.0/24\",\r\n \"20.136.2.0/24\",\r\n \ - \ \"20.143.0.0/24\",\r\n \"20.143.1.0/24\",\r\n \"\ - 20.143.2.0/24\",\r\n \"20.143.3.0/24\",\r\n \"20.143.4.0/24\"\ - ,\r\n \"20.150.0.0/24\",\r\n \"20.150.1.0/25\",\r\n \ - \ \"20.150.1.128/25\",\r\n \"20.150.2.0/23\",\r\n \"\ - 20.150.4.0/23\",\r\n \"20.150.6.0/23\",\r\n \"20.150.8.0/23\"\ - ,\r\n \"20.150.10.0/23\",\r\n \"20.150.12.0/23\",\r\n \ - \ \"20.150.14.0/23\",\r\n \"20.150.16.0/24\",\r\n \ - \ \"20.150.17.0/25\",\r\n \"20.150.17.128/25\",\r\n \"\ - 20.150.18.0/25\",\r\n \"20.150.18.128/25\",\r\n \"20.150.19.0/24\"\ - ,\r\n \"20.150.20.0/25\",\r\n \"20.150.20.128/25\",\r\n\ - \ \"20.150.21.0/24\",\r\n \"20.150.22.0/24\",\r\n \ - \ \"20.150.23.0/24\",\r\n \"20.150.24.0/24\",\r\n \"\ - 20.150.25.0/24\",\r\n \"20.150.26.0/24\",\r\n \"20.150.27.0/24\"\ - ,\r\n \"20.150.28.0/24\",\r\n \"20.150.29.0/24\",\r\n \ - \ \"20.150.30.0/24\",\r\n \"20.150.31.0/24\",\r\n \ - \ \"20.150.32.0/23\",\r\n \"20.150.34.0/23\",\r\n \"20.150.36.0/24\"\ - ,\r\n \"20.150.37.0/24\",\r\n \"20.150.38.0/23\",\r\n \ - \ \"20.150.40.0/25\",\r\n \"20.150.40.128/25\",\r\n \ - \ \"20.150.41.0/24\",\r\n \"20.150.42.0/24\",\r\n \"\ - 20.150.43.0/25\",\r\n \"20.150.43.128/25\",\r\n \"20.150.44.0/24\"\ - ,\r\n \"20.150.45.0/24\",\r\n \"20.150.46.0/24\",\r\n \ - \ \"20.150.47.0/25\",\r\n \"20.150.47.128/25\",\r\n \ - \ \"20.150.48.0/24\",\r\n \"20.150.49.0/24\",\r\n \"\ - 20.150.50.0/23\",\r\n \"20.150.52.0/24\",\r\n \"20.150.53.0/24\"\ - ,\r\n \"20.150.54.0/24\",\r\n \"20.150.55.0/24\",\r\n \ - \ \"20.150.56.0/24\",\r\n \"20.150.57.0/24\",\r\n \ - \ \"20.150.58.0/24\",\r\n \"20.150.59.0/24\",\r\n \"20.150.60.0/24\"\ - ,\r\n \"20.150.61.0/24\",\r\n \"20.150.62.0/24\",\r\n \ - \ \"20.150.63.0/24\",\r\n \"20.150.64.0/24\",\r\n \ - \ \"20.150.65.0/24\",\r\n \"20.150.66.0/24\",\r\n \"20.150.67.0/24\"\ - ,\r\n \"20.150.68.0/24\",\r\n \"20.150.69.0/24\",\r\n \ - \ \"20.150.70.0/24\",\r\n \"20.150.71.0/24\",\r\n \ - \ \"20.150.72.0/24\",\r\n \"20.150.73.0/24\",\r\n \"20.150.74.0/24\"\ - ,\r\n \"20.150.75.0/24\",\r\n \"20.150.76.0/24\",\r\n \ - \ \"20.150.77.0/24\",\r\n \"20.150.78.0/24\",\r\n \ - \ \"20.150.79.0/24\",\r\n \"20.150.80.0/24\",\r\n \"20.150.81.0/24\"\ - ,\r\n \"20.150.82.0/24\",\r\n \"20.150.83.0/24\",\r\n \ - \ \"20.150.84.0/24\",\r\n \"20.150.85.0/24\",\r\n \ - \ \"20.150.86.0/24\",\r\n \"20.150.87.0/24\",\r\n \"20.150.88.0/24\"\ - ,\r\n \"20.150.89.0/24\",\r\n \"20.150.90.0/24\",\r\n \ - \ \"20.150.91.0/24\",\r\n \"20.150.92.0/24\",\r\n \ - \ \"20.150.93.0/24\",\r\n \"20.150.94.0/24\",\r\n \"20.150.95.0/24\"\ - ,\r\n \"20.150.96.0/24\",\r\n \"20.150.97.0/24\",\r\n \ - \ \"20.150.98.0/24\",\r\n \"20.150.99.0/24\",\r\n \ - \ \"20.150.100.0/24\",\r\n \"20.150.101.0/24\",\r\n \"\ - 20.150.102.0/24\",\r\n \"20.150.103.0/24\",\r\n \"20.150.104.0/24\"\ - ,\r\n \"20.150.105.0/24\",\r\n \"20.150.106.0/24\",\r\n\ - \ \"20.150.107.0/24\",\r\n \"20.150.108.0/24\",\r\n \ - \ \"20.150.109.0/24\",\r\n \"20.150.110.0/24\",\r\n \ - \ \"20.150.111.0/24\",\r\n \"20.150.112.0/24\",\r\n \"\ - 20.150.113.0/24\",\r\n \"20.150.114.0/24\",\r\n \"20.150.115.0/24\"\ - ,\r\n \"20.150.116.0/24\",\r\n \"20.150.117.0/24\",\r\n\ - \ \"20.150.118.0/24\",\r\n \"20.150.119.0/24\",\r\n \ - \ \"20.150.120.0/24\",\r\n \"20.150.121.0/24\",\r\n \ - \ \"20.150.122.0/24\",\r\n \"20.150.123.0/24\",\r\n \"\ - 20.150.124.0/24\",\r\n \"20.150.125.0/24\",\r\n \"20.150.126.0/24\"\ - ,\r\n \"20.150.127.0/24\",\r\n \"20.150.128.0/17\",\r\n\ - \ \"20.151.0.0/16\",\r\n \"20.157.0.0/24\",\r\n \ - \ \"20.157.1.0/24\",\r\n \"20.157.2.0/24\",\r\n \"20.157.3.0/24\"\ - ,\r\n \"20.157.4.0/23\",\r\n \"20.157.6.0/23\",\r\n \ - \ \"20.157.8.0/22\",\r\n \"20.157.32.0/24\",\r\n \"\ - 20.157.33.0/24\",\r\n \"20.157.34.0/23\",\r\n \"20.157.36.0/23\"\ - ,\r\n \"20.157.38.0/24\",\r\n \"20.157.39.0/24\",\r\n \ - \ \"20.157.40.0/24\",\r\n \"20.157.41.0/24\",\r\n \ - \ \"20.157.42.0/24\",\r\n \"20.157.43.0/24\",\r\n \"20.157.44.0/24\"\ - ,\r\n \"20.157.45.0/24\",\r\n \"20.157.46.0/24\",\r\n \ - \ \"20.157.47.0/24\",\r\n \"20.157.48.0/23\",\r\n \ - \ \"20.157.50.0/23\",\r\n \"20.157.52.0/24\",\r\n \"20.157.53.0/24\"\ - ,\r\n \"20.157.54.0/24\",\r\n \"20.157.55.0/24\",\r\n \ - \ \"20.157.56.0/24\",\r\n \"20.157.57.0/24\",\r\n \ - \ \"20.157.58.0/24\",\r\n \"20.157.59.0/24\",\r\n \"20.157.60.0/24\"\ - ,\r\n \"20.157.61.0/24\",\r\n \"20.157.62.0/23\",\r\n \ - \ \"20.157.96.0/24\",\r\n \"20.157.97.0/24\",\r\n \ - \ \"20.157.98.0/24\",\r\n \"20.157.99.0/24\",\r\n \"20.157.100.0/24\"\ - ,\r\n \"20.157.101.0/24\",\r\n \"20.157.102.0/24\",\r\n\ - \ \"20.157.103.0/24\",\r\n \"20.157.104.0/24\",\r\n \ - \ \"20.157.105.0/24\",\r\n \"20.157.106.0/24\",\r\n \ - \ \"20.157.107.0/24\",\r\n \"20.157.108.0/24\",\r\n \"\ - 20.157.128.0/24\",\r\n \"20.157.129.0/24\",\r\n \"20.157.130.0/24\"\ - ,\r\n \"20.157.131.0/24\",\r\n \"20.157.132.0/24\",\r\n\ - \ \"20.157.133.0/24\",\r\n \"20.157.134.0/24\",\r\n \ - \ \"20.157.135.0/24\",\r\n \"20.157.136.0/24\",\r\n \ - \ \"20.157.137.0/24\",\r\n \"20.157.138.0/24\",\r\n \"\ - 20.157.139.0/24\",\r\n \"20.157.140.0/24\",\r\n \"20.157.141.0/24\"\ - ,\r\n \"20.157.142.0/23\",\r\n \"20.157.144.0/24\",\r\n\ - \ \"20.157.145.0/24\",\r\n \"20.157.146.0/24\",\r\n \ - \ \"20.157.147.0/24\",\r\n \"20.157.148.0/24\",\r\n \ - \ \"20.157.149.0/24\",\r\n \"20.157.150.0/24\",\r\n \"\ - 20.157.151.0/24\",\r\n \"20.157.152.0/24\",\r\n \"20.157.153.0/24\"\ - ,\r\n \"20.157.154.0/24\",\r\n \"20.157.155.0/24\",\r\n\ - \ \"20.157.156.0/24\",\r\n \"20.157.157.0/24\",\r\n \ - \ \"20.157.158.0/24\",\r\n \"20.157.159.0/24\",\r\n \ - \ \"20.157.160.0/24\",\r\n \"20.157.161.0/24\",\r\n \"\ - 20.184.0.0/18\",\r\n \"20.184.64.0/18\",\r\n \"20.184.128.0/17\"\ - ,\r\n \"20.185.0.0/16\",\r\n \"20.186.0.0/17\",\r\n \ - \ \"20.186.128.0/18\",\r\n \"20.186.192.0/18\",\r\n \ - \ \"20.187.0.0/18\",\r\n \"20.187.64.0/18\",\r\n \"20.187.128.0/18\"\ - ,\r\n \"20.187.192.0/21\",\r\n \"20.187.224.0/19\",\r\n\ - \ \"20.188.0.0/19\",\r\n \"20.188.32.0/19\",\r\n \ - \ \"20.188.64.0/19\",\r\n \"20.188.96.0/19\",\r\n \"20.188.128.0/17\"\ - ,\r\n \"20.189.0.0/18\",\r\n \"20.189.64.0/18\",\r\n \ - \ \"20.189.128.0/18\",\r\n \"20.189.192.0/18\",\r\n \ - \ \"20.190.0.0/18\",\r\n \"20.190.64.0/19\",\r\n \"20.190.96.0/19\"\ - ,\r\n \"20.190.128.0/24\",\r\n \"20.190.129.0/24\",\r\n\ - \ \"20.190.130.0/24\",\r\n \"20.190.131.0/24\",\r\n \ - \ \"20.190.132.0/24\",\r\n \"20.190.133.0/24\",\r\n \ - \ \"20.190.134.0/24\",\r\n \"20.190.135.0/24\",\r\n \"\ - 20.190.136.0/24\",\r\n \"20.190.137.0/24\",\r\n \"20.190.138.0/25\"\ - ,\r\n \"20.190.138.128/25\",\r\n \"20.190.139.0/25\",\r\n\ - \ \"20.190.139.128/25\",\r\n \"20.190.140.0/25\",\r\n \ - \ \"20.190.140.128/25\",\r\n \"20.190.141.0/25\",\r\n \ - \ \"20.190.141.128/25\",\r\n \"20.190.142.0/25\",\r\n \ - \ \"20.190.142.128/25\",\r\n \"20.190.143.0/25\",\r\n \ - \ \"20.190.143.128/25\",\r\n \"20.190.144.0/25\",\r\n \"\ - 20.190.144.128/25\",\r\n \"20.190.145.0/25\",\r\n \"20.190.145.128/25\"\ - ,\r\n \"20.190.146.0/25\",\r\n \"20.190.146.128/25\",\r\n\ - \ \"20.190.147.0/25\",\r\n \"20.190.147.128/25\",\r\n \ - \ \"20.190.148.0/25\",\r\n \"20.190.148.128/25\",\r\n \ - \ \"20.190.149.0/24\",\r\n \"20.190.150.0/24\",\r\n \ - \ \"20.190.151.0/24\",\r\n \"20.190.152.0/24\",\r\n \"\ - 20.190.153.0/24\",\r\n \"20.190.154.0/24\",\r\n \"20.190.155.0/24\"\ - ,\r\n \"20.190.156.0/24\",\r\n \"20.190.157.0/24\",\r\n\ - \ \"20.190.158.0/24\",\r\n \"20.190.159.0/24\",\r\n \ - \ \"20.190.160.0/24\",\r\n \"20.190.161.0/24\",\r\n \ - \ \"20.190.162.0/24\",\r\n \"20.190.163.0/24\",\r\n \"\ - 20.190.164.0/24\",\r\n \"20.190.165.0/24\",\r\n \"20.190.166.0/24\"\ - ,\r\n \"20.190.167.0/24\",\r\n \"20.190.168.0/24\",\r\n\ - \ \"20.190.169.0/24\",\r\n \"20.190.170.0/24\",\r\n \ - \ \"20.190.171.0/24\",\r\n \"20.190.172.0/24\",\r\n \ - \ \"20.190.173.0/24\",\r\n \"20.190.174.0/24\",\r\n \"\ - 20.190.175.0/24\",\r\n \"20.190.176.0/24\",\r\n \"20.190.177.0/24\"\ - ,\r\n \"20.190.178.0/24\",\r\n \"20.190.179.0/24\",\r\n\ - \ \"20.190.180.0/24\",\r\n \"20.190.181.0/24\",\r\n \ - \ \"20.190.182.0/24\",\r\n \"20.190.183.0/24\",\r\n \ - \ \"20.190.184.0/24\",\r\n \"20.190.185.0/24\",\r\n \"\ - 20.190.186.0/24\",\r\n \"20.190.187.0/24\",\r\n \"20.190.188.0/24\"\ - ,\r\n \"20.190.189.0/26\",\r\n \"20.190.189.64/26\",\r\n\ - \ \"20.190.189.128/26\",\r\n \"20.190.189.192/26\",\r\n\ - \ \"20.190.190.0/26\",\r\n \"20.190.190.64/26\",\r\n \ - \ \"20.190.190.128/25\",\r\n \"20.190.191.0/26\",\r\n \ - \ \"20.190.191.64/26\",\r\n \"20.190.191.128/26\",\r\n \ - \ \"20.190.191.192/26\",\r\n \"20.190.192.0/18\",\r\n \ - \ \"20.191.0.0/18\",\r\n \"20.191.64.0/18\",\r\n \"20.191.128.0/19\"\ - ,\r\n \"20.191.160.0/19\",\r\n \"20.191.192.0/18\",\r\n\ - \ \"20.192.0.0/19\",\r\n \"20.192.32.0/21\",\r\n \ - \ \"20.192.40.0/21\",\r\n \"20.192.48.0/21\",\r\n \"20.192.56.0/21\"\ - ,\r\n \"20.192.64.0/19\",\r\n \"20.192.96.0/21\",\r\n \ - \ \"20.192.104.0/21\",\r\n \"20.192.112.0/20\",\r\n \ - \ \"20.192.128.0/19\",\r\n \"20.192.160.0/21\",\r\n \"\ - 20.192.168.0/21\",\r\n \"20.192.176.0/21\",\r\n \"20.192.184.0/21\"\ - ,\r\n \"20.192.192.0/19\",\r\n \"20.192.224.0/20\",\r\n\ - \ \"20.192.240.0/20\",\r\n \"20.193.0.0/18\",\r\n \ - \ \"20.193.64.0/19\",\r\n \"20.193.96.0/19\",\r\n \"\ - 20.193.128.0/19\",\r\n \"20.193.160.0/19\",\r\n \"20.193.192.0/20\"\ - ,\r\n \"20.193.208.0/20\",\r\n \"20.193.224.0/19\",\r\n\ - \ \"20.194.0.0/18\",\r\n \"20.194.64.0/20\",\r\n \ - \ \"20.194.80.0/21\",\r\n \"20.194.96.0/19\",\r\n \"20.194.128.0/17\"\ - ,\r\n \"20.195.0.0/18\",\r\n \"20.195.64.0/21\",\r\n \ - \ \"20.195.72.0/21\",\r\n \"20.195.80.0/21\",\r\n \ - \ \"20.195.88.0/21\",\r\n \"20.195.96.0/19\",\r\n \"20.195.128.0/22\"\ - ,\r\n \"20.195.136.0/21\",\r\n \"20.195.144.0/21\",\r\n\ - \ \"20.195.152.0/21\",\r\n \"20.195.160.0/19\",\r\n \ - \ \"20.195.192.0/18\",\r\n \"20.196.0.0/18\",\r\n \"\ - 20.196.64.0/18\",\r\n \"20.196.128.0/17\",\r\n \"20.197.0.0/18\"\ - ,\r\n \"20.197.64.0/18\",\r\n \"20.197.128.0/17\",\r\n \ - \ \"20.198.0.0/17\",\r\n \"20.198.128.0/17\",\r\n \ - \ \"20.199.0.0/17\",\r\n \"20.199.128.0/18\",\r\n \"20.199.192.0/18\"\ - ,\r\n \"20.200.0.0/18\",\r\n \"20.200.64.0/18\",\r\n \ - \ \"20.200.128.0/18\",\r\n \"20.200.192.0/18\",\r\n \ - \ \"20.201.0.0/17\",\r\n \"20.201.128.0/24\",\r\n \"20.201.129.0/24\"\ - ,\r\n \"20.201.130.0/23\",\r\n \"20.201.132.0/23\",\r\n\ - \ \"20.201.134.0/24\",\r\n \"20.201.223.0/24\",\r\n \ - \ \"20.201.224.0/23\",\r\n \"20.201.231.0/24\",\r\n \ - \ \"20.202.0.0/24\",\r\n \"20.202.1.0/24\",\r\n \"20.202.2.0/24\"\ - ,\r\n \"20.202.3.0/24\",\r\n \"20.202.4.0/24\",\r\n \ - \ \"20.202.20.0/24\",\r\n \"20.202.21.0/24\",\r\n \"\ - 20.202.22.0/24\",\r\n \"20.202.23.0/24\",\r\n \"20.202.24.0/24\"\ - ,\r\n \"20.202.40.0/24\",\r\n \"20.202.41.0/24\",\r\n \ - \ \"20.202.42.0/24\",\r\n \"20.202.43.0/24\",\r\n \ - \ \"20.202.60.0/24\",\r\n \"20.202.61.0/24\",\r\n \"20.203.0.0/18\"\ - ,\r\n \"20.203.128.0/17\",\r\n \"20.204.0.0/16\",\r\n \ - \ \"20.205.0.0/18\",\r\n \"20.205.64.0/20\",\r\n \ - \ \"20.205.80.0/21\",\r\n \"20.205.96.0/19\",\r\n \"20.205.128.0/20\"\ - ,\r\n \"20.205.160.0/19\",\r\n \"20.205.192.0/18\",\r\n\ - \ \"20.206.0.0/18\",\r\n \"20.206.64.0/18\",\r\n \ - \ \"20.206.128.0/18\",\r\n \"20.207.0.0/18\",\r\n \"20.208.0.0/17\"\ - ,\r\n \"20.208.128.0/20\",\r\n \"20.209.0.0/23\",\r\n \ - \ \"20.209.2.0/23\",\r\n \"20.209.4.0/23\",\r\n \"\ - 20.209.6.0/23\",\r\n \"20.209.8.0/23\",\r\n \"20.209.10.0/23\"\ - ,\r\n \"20.209.12.0/23\",\r\n \"20.209.14.0/23\",\r\n \ - \ \"20.209.16.0/23\",\r\n \"20.210.0.0/18\",\r\n \ - \ \"20.211.0.0/18\",\r\n \"23.96.0.0/17\",\r\n \"23.96.128.0/17\"\ - ,\r\n \"23.97.48.0/20\",\r\n \"23.97.64.0/19\",\r\n \ - \ \"23.97.96.0/20\",\r\n \"23.97.112.0/25\",\r\n \"\ - 23.97.112.128/28\",\r\n \"23.97.112.160/27\",\r\n \"23.97.112.192/27\"\ - ,\r\n \"23.97.112.224/27\",\r\n \"23.97.116.0/22\",\r\n\ - \ \"23.97.120.0/21\",\r\n \"23.97.128.0/17\",\r\n \ - \ \"23.98.32.0/21\",\r\n \"23.98.40.0/22\",\r\n \"23.98.44.0/24\"\ - ,\r\n \"23.98.45.0/24\",\r\n \"23.98.46.0/24\",\r\n \ - \ \"23.98.47.0/24\",\r\n \"23.98.48.0/21\",\r\n \"\ - 23.98.56.0/24\",\r\n \"23.98.57.64/26\",\r\n \"23.98.64.0/18\"\ - ,\r\n \"23.98.128.0/17\",\r\n \"23.99.0.0/18\",\r\n \ - \ \"23.99.64.0/19\",\r\n \"23.99.96.0/19\",\r\n \"\ - 23.99.128.0/17\",\r\n \"23.100.0.0/20\",\r\n \"23.100.16.0/20\"\ - ,\r\n \"23.100.32.0/20\",\r\n \"23.100.48.0/20\",\r\n \ - \ \"23.100.64.0/21\",\r\n \"23.100.72.0/21\",\r\n \ - \ \"23.100.80.0/21\",\r\n \"23.100.88.0/21\",\r\n \"23.100.96.0/21\"\ - ,\r\n \"23.100.104.0/21\",\r\n \"23.100.112.0/21\",\r\n\ - \ \"23.100.120.0/21\",\r\n \"23.100.128.0/18\",\r\n \ - \ \"23.100.192.0/19\",\r\n \"23.100.224.0/20\",\r\n \ - \ \"23.100.240.0/20\",\r\n \"23.101.0.0/20\",\r\n \"23.101.16.0/20\"\ - ,\r\n \"23.101.32.0/21\",\r\n \"23.101.48.0/20\",\r\n \ - \ \"23.101.64.0/20\",\r\n \"23.101.80.0/21\",\r\n \ - \ \"23.101.112.0/20\",\r\n \"23.101.128.0/20\",\r\n \"\ - 23.101.144.0/20\",\r\n \"23.101.160.0/20\",\r\n \"23.101.176.0/20\"\ - ,\r\n \"23.101.192.0/20\",\r\n \"23.101.208.0/20\",\r\n\ - \ \"23.101.224.0/19\",\r\n \"23.102.0.0/18\",\r\n \ - \ \"23.102.64.0/19\",\r\n \"23.102.96.0/19\",\r\n \"\ - 23.102.128.0/18\",\r\n \"23.102.192.0/21\",\r\n \"23.102.200.0/23\"\ - ,\r\n \"23.102.202.0/24\",\r\n \"23.102.203.0/24\",\r\n\ - \ \"23.102.204.0/22\",\r\n \"23.102.208.0/20\",\r\n \ - \ \"23.102.224.0/19\",\r\n \"23.103.64.32/27\",\r\n \ - \ \"23.103.64.64/27\",\r\n \"23.103.66.0/23\",\r\n \"40.64.0.0/18\"\ - ,\r\n \"40.64.64.0/18\",\r\n \"40.64.128.0/21\",\r\n \ - \ \"40.65.0.0/18\",\r\n \"40.65.64.0/18\",\r\n \"\ - 40.65.128.0/18\",\r\n \"40.65.192.0/18\",\r\n \"40.66.32.0/19\"\ - ,\r\n \"40.66.120.0/21\",\r\n \"40.67.0.0/18\",\r\n \ - \ \"40.67.64.0/19\",\r\n \"40.67.96.0/20\",\r\n \"\ - 40.67.112.0/21\",\r\n \"40.67.120.0/21\",\r\n \"40.67.128.0/19\"\ - ,\r\n \"40.67.160.0/19\",\r\n \"40.67.192.0/19\",\r\n \ - \ \"40.67.224.0/19\",\r\n \"40.68.0.0/16\",\r\n \"\ - 40.69.0.0/18\",\r\n \"40.69.64.0/19\",\r\n \"40.69.96.0/19\"\ - ,\r\n \"40.69.128.0/18\",\r\n \"40.69.192.0/19\",\r\n \ - \ \"40.70.0.0/18\",\r\n \"40.70.64.0/20\",\r\n \"\ - 40.70.80.0/21\",\r\n \"40.70.88.0/28\",\r\n \"40.70.128.0/17\"\ - ,\r\n \"40.71.0.0/16\",\r\n \"40.74.0.0/18\",\r\n \ - \ \"40.74.64.0/18\",\r\n \"40.74.128.0/20\",\r\n \"40.74.144.0/20\"\ - ,\r\n \"40.74.160.0/19\",\r\n \"40.74.192.0/18\",\r\n \ - \ \"40.75.0.0/19\",\r\n \"40.75.32.0/21\",\r\n \"\ - 40.75.64.0/18\",\r\n \"40.75.128.0/17\",\r\n \"40.76.0.0/16\"\ - ,\r\n \"40.77.0.0/17\",\r\n \"40.77.128.0/25\",\r\n \ - \ \"40.77.128.128/25\",\r\n \"40.77.129.0/24\",\r\n \ - \ \"40.77.130.0/25\",\r\n \"40.77.130.128/26\",\r\n \"\ - 40.77.130.192/26\",\r\n \"40.77.131.0/25\",\r\n \"40.77.131.128/26\"\ - ,\r\n \"40.77.131.192/27\",\r\n \"40.77.131.224/28\",\r\n\ - \ \"40.77.131.240/28\",\r\n \"40.77.132.0/24\",\r\n \ - \ \"40.77.133.0/24\",\r\n \"40.77.134.0/24\",\r\n \"\ - 40.77.135.0/24\",\r\n \"40.77.136.0/28\",\r\n \"40.77.136.16/28\"\ - ,\r\n \"40.77.136.32/28\",\r\n \"40.77.136.48/28\",\r\n\ - \ \"40.77.136.64/28\",\r\n \"40.77.136.80/28\",\r\n \ - \ \"40.77.136.96/28\",\r\n \"40.77.136.112/28\",\r\n \ - \ \"40.77.136.128/25\",\r\n \"40.77.137.0/25\",\r\n \"\ - 40.77.137.128/26\",\r\n \"40.77.137.192/27\",\r\n \"40.77.138.0/25\"\ - ,\r\n \"40.77.138.128/25\",\r\n \"40.77.139.0/25\",\r\n\ - \ \"40.77.139.128/25\",\r\n \"40.77.160.0/27\",\r\n \ - \ \"40.77.160.32/27\",\r\n \"40.77.160.64/26\",\r\n \ - \ \"40.77.160.128/25\",\r\n \"40.77.161.0/26\",\r\n \"\ - 40.77.161.64/26\",\r\n \"40.77.161.128/25\",\r\n \"40.77.162.0/24\"\ - ,\r\n \"40.77.163.0/24\",\r\n \"40.77.164.0/24\",\r\n \ - \ \"40.77.165.0/24\",\r\n \"40.77.166.0/25\",\r\n \ - \ \"40.77.166.128/28\",\r\n \"40.77.166.160/27\",\r\n \"\ - 40.77.166.192/26\",\r\n \"40.77.167.0/24\",\r\n \"40.77.168.0/24\"\ - ,\r\n \"40.77.169.0/24\",\r\n \"40.77.170.0/24\",\r\n \ - \ \"40.77.171.0/24\",\r\n \"40.77.172.0/24\",\r\n \ - \ \"40.77.173.0/24\",\r\n \"40.77.174.0/24\",\r\n \"40.77.175.0/27\"\ - ,\r\n \"40.77.175.32/27\",\r\n \"40.77.175.64/27\",\r\n\ - \ \"40.77.175.96/27\",\r\n \"40.77.175.128/27\",\r\n \ - \ \"40.77.175.160/27\",\r\n \"40.77.175.192/27\",\r\n \ - \ \"40.77.175.240/28\",\r\n \"40.77.176.0/24\",\r\n \ - \ \"40.77.177.0/24\",\r\n \"40.77.178.0/23\",\r\n \"40.77.180.0/23\"\ - ,\r\n \"40.77.182.0/28\",\r\n \"40.77.182.16/28\",\r\n \ - \ \"40.77.182.32/27\",\r\n \"40.77.182.64/27\",\r\n \ - \ \"40.77.182.96/27\",\r\n \"40.77.182.128/27\",\r\n \ - \ \"40.77.182.160/27\",\r\n \"40.77.182.192/26\",\r\n \"\ - 40.77.183.0/24\",\r\n \"40.77.184.0/25\",\r\n \"40.77.184.128/25\"\ - ,\r\n \"40.77.185.0/25\",\r\n \"40.77.185.128/25\",\r\n\ - \ \"40.77.186.0/23\",\r\n \"40.77.188.0/22\",\r\n \ - \ \"40.77.192.0/22\",\r\n \"40.77.196.0/24\",\r\n \"\ - 40.77.197.0/24\",\r\n \"40.77.198.0/26\",\r\n \"40.77.198.64/26\"\ - ,\r\n \"40.77.198.128/25\",\r\n \"40.77.199.0/25\",\r\n\ - \ \"40.77.199.128/26\",\r\n \"40.77.199.192/26\",\r\n \ - \ \"40.77.200.0/25\",\r\n \"40.77.200.128/25\",\r\n \ - \ \"40.77.201.0/24\",\r\n \"40.77.202.0/24\",\r\n \"\ - 40.77.224.0/28\",\r\n \"40.77.224.16/28\",\r\n \"40.77.224.32/27\"\ - ,\r\n \"40.77.224.64/27\",\r\n \"40.77.224.96/27\",\r\n\ - \ \"40.77.224.128/25\",\r\n \"40.77.225.0/24\",\r\n \ - \ \"40.77.226.0/25\",\r\n \"40.77.226.128/25\",\r\n \ - \ \"40.77.227.0/24\",\r\n \"40.77.228.0/24\",\r\n \"40.77.229.0/24\"\ - ,\r\n \"40.77.230.0/24\",\r\n \"40.77.231.0/24\",\r\n \ - \ \"40.77.232.0/25\",\r\n \"40.77.232.128/25\",\r\n \ - \ \"40.77.233.0/24\",\r\n \"40.77.234.0/25\",\r\n \"\ - 40.77.234.128/27\",\r\n \"40.77.234.160/27\",\r\n \"40.77.234.192/27\"\ - ,\r\n \"40.77.234.224/27\",\r\n \"40.77.235.0/24\",\r\n\ - \ \"40.77.236.0/27\",\r\n \"40.77.236.32/27\",\r\n \ - \ \"40.77.236.80/28\",\r\n \"40.77.236.96/27\",\r\n \ - \ \"40.77.236.128/27\",\r\n \"40.77.236.160/28\",\r\n \"\ - 40.77.236.176/28\",\r\n \"40.77.236.192/28\",\r\n \"40.77.236.224/27\"\ - ,\r\n \"40.77.237.0/26\",\r\n \"40.77.237.64/26\",\r\n \ - \ \"40.77.237.128/25\",\r\n \"40.77.240.0/25\",\r\n \ - \ \"40.77.240.128/25\",\r\n \"40.77.241.0/24\",\r\n \ - \ \"40.77.242.0/23\",\r\n \"40.77.244.0/25\",\r\n \"40.77.245.0/24\"\ - ,\r\n \"40.77.246.0/24\",\r\n \"40.77.247.0/24\",\r\n \ - \ \"40.77.248.0/25\",\r\n \"40.77.248.128/25\",\r\n \ - \ \"40.77.249.0/24\",\r\n \"40.77.250.0/24\",\r\n \"\ - 40.77.251.0/24\",\r\n \"40.77.252.0/23\",\r\n \"40.77.254.0/26\"\ - ,\r\n \"40.77.254.64/27\",\r\n \"40.77.254.128/25\",\r\n\ - \ \"40.77.255.0/25\",\r\n \"40.77.255.128/26\",\r\n \ - \ \"40.77.255.192/26\",\r\n \"40.78.0.0/17\",\r\n \"\ - 40.78.128.0/18\",\r\n \"40.78.192.0/21\",\r\n \"40.78.200.0/21\"\ - ,\r\n \"40.78.208.0/28\",\r\n \"40.78.208.16/28\",\r\n \ - \ \"40.78.208.32/30\",\r\n \"40.78.208.48/28\",\r\n \ - \ \"40.78.208.64/28\",\r\n \"40.78.209.0/24\",\r\n \"\ - 40.78.210.0/24\",\r\n \"40.78.211.0/24\",\r\n \"40.78.212.0/24\"\ - ,\r\n \"40.78.213.0/24\",\r\n \"40.78.214.0/24\",\r\n \ - \ \"40.78.215.0/24\",\r\n \"40.78.216.0/24\",\r\n \ - \ \"40.78.217.0/24\",\r\n \"40.78.218.0/24\",\r\n \"40.78.219.0/24\"\ - ,\r\n \"40.78.220.0/24\",\r\n \"40.78.221.0/24\",\r\n \ - \ \"40.78.222.0/24\",\r\n \"40.78.223.0/24\",\r\n \ - \ \"40.78.224.0/21\",\r\n \"40.78.232.0/21\",\r\n \"40.78.240.0/20\"\ - ,\r\n \"40.79.0.0/21\",\r\n \"40.79.8.0/27\",\r\n \ - \ \"40.79.8.32/28\",\r\n \"40.79.8.64/27\",\r\n \"40.79.8.96/28\"\ - ,\r\n \"40.79.9.0/24\",\r\n \"40.79.16.0/20\",\r\n \ - \ \"40.79.32.0/20\",\r\n \"40.79.48.0/27\",\r\n \"40.79.48.32/28\"\ - ,\r\n \"40.79.49.0/24\",\r\n \"40.79.56.0/21\",\r\n \ - \ \"40.79.64.0/20\",\r\n \"40.79.80.0/21\",\r\n \"\ - 40.79.88.0/27\",\r\n \"40.79.88.32/28\",\r\n \"40.79.89.0/24\"\ - ,\r\n \"40.79.90.0/24\",\r\n \"40.79.91.0/28\",\r\n \ - \ \"40.79.92.0/24\",\r\n \"40.79.93.0/28\",\r\n \"\ - 40.79.94.0/24\",\r\n \"40.79.95.0/28\",\r\n \"40.79.96.0/19\"\ - ,\r\n \"40.79.128.0/20\",\r\n \"40.79.144.0/21\",\r\n \ - \ \"40.79.152.0/21\",\r\n \"40.79.160.0/20\",\r\n \ - \ \"40.79.176.0/21\",\r\n \"40.79.184.0/21\",\r\n \"40.79.192.0/21\"\ - ,\r\n \"40.79.200.0/24\",\r\n \"40.79.201.0/24\",\r\n \ - \ \"40.79.202.0/24\",\r\n \"40.79.203.0/24\",\r\n \ - \ \"40.79.204.0/27\",\r\n \"40.79.204.32/28\",\r\n \"40.79.204.48/28\"\ - ,\r\n \"40.79.204.64/27\",\r\n \"40.79.204.96/27\",\r\n\ - \ \"40.79.204.128/27\",\r\n \"40.79.204.160/27\",\r\n \ - \ \"40.79.204.192/26\",\r\n \"40.79.205.0/26\",\r\n \ - \ \"40.79.205.64/28\",\r\n \"40.79.205.80/28\",\r\n \"\ - 40.79.205.96/27\",\r\n \"40.79.205.128/26\",\r\n \"40.79.205.192/27\"\ - ,\r\n \"40.79.205.224/28\",\r\n \"40.79.205.240/28\",\r\n\ - \ \"40.79.206.0/27\",\r\n \"40.79.206.32/27\",\r\n \ - \ \"40.79.206.64/27\",\r\n \"40.79.206.96/27\",\r\n \ - \ \"40.79.206.128/27\",\r\n \"40.79.206.160/27\",\r\n \"\ - 40.79.206.192/27\",\r\n \"40.79.206.224/27\",\r\n \"40.79.207.0/27\"\ - ,\r\n \"40.79.207.32/27\",\r\n \"40.79.207.64/28\",\r\n\ - \ \"40.79.207.80/28\",\r\n \"40.79.207.96/27\",\r\n \ - \ \"40.79.207.128/25\",\r\n \"40.79.208.0/24\",\r\n \ - \ \"40.79.209.0/24\",\r\n \"40.79.210.0/24\",\r\n \"40.79.211.0/24\"\ - ,\r\n \"40.79.212.0/24\",\r\n \"40.79.213.0/24\",\r\n \ - \ \"40.79.214.0/24\",\r\n \"40.79.215.0/24\",\r\n \ - \ \"40.79.216.0/24\",\r\n \"40.79.217.0/24\",\r\n \"40.79.218.0/24\"\ - ,\r\n \"40.79.219.0/24\",\r\n \"40.79.220.0/24\",\r\n \ - \ \"40.79.221.0/24\",\r\n \"40.79.222.0/24\",\r\n \ - \ \"40.79.223.0/24\",\r\n \"40.79.232.0/21\",\r\n \"40.79.240.0/20\"\ - ,\r\n \"40.80.0.0/22\",\r\n \"40.80.4.0/22\",\r\n \ - \ \"40.80.8.0/22\",\r\n \"40.80.12.0/22\",\r\n \"40.80.16.0/22\"\ - ,\r\n \"40.80.20.0/22\",\r\n \"40.80.24.0/22\",\r\n \ - \ \"40.80.28.0/22\",\r\n \"40.80.32.0/22\",\r\n \"\ - 40.80.36.0/22\",\r\n \"40.80.40.0/22\",\r\n \"40.80.44.0/22\"\ - ,\r\n \"40.80.48.0/21\",\r\n \"40.80.56.0/21\",\r\n \ - \ \"40.80.64.0/19\",\r\n \"40.80.96.0/20\",\r\n \"\ - 40.80.144.0/21\",\r\n \"40.80.152.0/21\",\r\n \"40.80.160.0/24\"\ - ,\r\n \"40.80.168.0/21\",\r\n \"40.80.176.0/21\",\r\n \ - \ \"40.80.184.0/21\",\r\n \"40.80.192.0/19\",\r\n \ - \ \"40.80.224.0/20\",\r\n \"40.80.240.0/20\",\r\n \"40.81.0.0/20\"\ - ,\r\n \"40.81.16.0/20\",\r\n \"40.81.32.0/20\",\r\n \ - \ \"40.81.48.0/20\",\r\n \"40.81.64.0/20\",\r\n \"\ - 40.81.80.0/20\",\r\n \"40.81.96.0/20\",\r\n \"40.81.112.0/20\"\ - ,\r\n \"40.81.128.0/19\",\r\n \"40.81.160.0/20\",\r\n \ - \ \"40.81.176.0/20\",\r\n \"40.81.192.0/19\",\r\n \ - \ \"40.81.224.0/19\",\r\n \"40.82.0.0/22\",\r\n \"40.82.4.0/22\"\ - ,\r\n \"40.82.16.0/22\",\r\n \"40.82.20.0/22\",\r\n \ - \ \"40.82.24.0/22\",\r\n \"40.82.28.0/22\",\r\n \"\ - 40.82.32.0/22\",\r\n \"40.82.36.0/22\",\r\n \"40.82.44.0/22\"\ - ,\r\n \"40.82.48.0/22\",\r\n \"40.82.60.0/22\",\r\n \ - \ \"40.82.64.0/22\",\r\n \"40.82.68.0/22\",\r\n \"\ - 40.82.72.0/22\",\r\n \"40.82.76.0/22\",\r\n \"40.82.80.0/22\"\ - ,\r\n \"40.82.84.0/22\",\r\n \"40.82.92.0/22\",\r\n \ - \ \"40.82.96.0/22\",\r\n \"40.82.100.0/22\",\r\n \"\ - 40.82.116.0/22\",\r\n \"40.82.120.0/22\",\r\n \"40.82.128.0/19\"\ - ,\r\n \"40.82.160.0/19\",\r\n \"40.82.192.0/19\",\r\n \ - \ \"40.82.224.0/20\",\r\n \"40.82.240.0/22\",\r\n \ - \ \"40.82.244.0/22\",\r\n \"40.82.248.0/21\",\r\n \"40.83.0.0/20\"\ - ,\r\n \"40.83.16.0/21\",\r\n \"40.83.24.0/26\",\r\n \ - \ \"40.83.24.64/27\",\r\n \"40.83.24.96/27\",\r\n \"\ - 40.83.24.128/25\",\r\n \"40.83.25.0/24\",\r\n \"40.83.26.0/23\"\ - ,\r\n \"40.83.28.0/22\",\r\n \"40.83.32.0/19\",\r\n \ - \ \"40.83.64.0/18\",\r\n \"40.83.128.0/17\",\r\n \"\ - 40.84.0.0/17\",\r\n \"40.84.128.0/17\",\r\n \"40.85.0.0/17\"\ - ,\r\n \"40.85.128.0/20\",\r\n \"40.85.144.0/20\",\r\n \ - \ \"40.85.160.0/19\",\r\n \"40.85.192.0/18\",\r\n \ - \ \"40.86.0.0/17\",\r\n \"40.86.128.0/19\",\r\n \"40.86.160.0/19\"\ - ,\r\n \"40.86.192.0/18\",\r\n \"40.87.0.0/17\",\r\n \ - \ \"40.87.128.0/19\",\r\n \"40.87.160.0/22\",\r\n \"\ - 40.87.164.0/22\",\r\n \"40.87.168.0/30\",\r\n \"40.87.168.4/30\"\ - ,\r\n \"40.87.168.8/29\",\r\n \"40.87.168.16/28\",\r\n \ - \ \"40.87.168.32/29\",\r\n \"40.87.168.40/29\",\r\n \ - \ \"40.87.168.48/28\",\r\n \"40.87.168.64/30\",\r\n \ - \ \"40.87.168.68/31\",\r\n \"40.87.168.70/31\",\r\n \"40.87.168.72/29\"\ - ,\r\n \"40.87.168.80/28\",\r\n \"40.87.168.96/27\",\r\n\ - \ \"40.87.168.128/26\",\r\n \"40.87.168.192/28\",\r\n \ - \ \"40.87.168.208/31\",\r\n \"40.87.168.210/31\",\r\n \ - \ \"40.87.168.212/30\",\r\n \"40.87.168.216/29\",\r\n \ - \ \"40.87.168.224/27\",\r\n \"40.87.169.0/27\",\r\n \"\ - 40.87.169.32/29\",\r\n \"40.87.169.40/30\",\r\n \"40.87.169.44/30\"\ - ,\r\n \"40.87.169.48/29\",\r\n \"40.87.169.56/31\",\r\n\ - \ \"40.87.169.58/31\",\r\n \"40.87.169.60/30\",\r\n \ - \ \"40.87.169.64/27\",\r\n \"40.87.169.96/31\",\r\n \ - \ \"40.87.169.98/31\",\r\n \"40.87.169.100/31\",\r\n \"\ - 40.87.169.102/31\",\r\n \"40.87.169.104/29\",\r\n \"40.87.169.112/28\"\ - ,\r\n \"40.87.169.128/29\",\r\n \"40.87.169.136/31\",\r\n\ - \ \"40.87.169.138/31\",\r\n \"40.87.169.140/30\",\r\n \ - \ \"40.87.169.144/28\",\r\n \"40.87.169.160/27\",\r\n \ - \ \"40.87.169.192/26\",\r\n \"40.87.170.0/25\",\r\n \ - \ \"40.87.170.128/28\",\r\n \"40.87.170.144/31\",\r\n \"\ - 40.87.170.146/31\",\r\n \"40.87.170.148/30\",\r\n \"40.87.170.152/29\"\ - ,\r\n \"40.87.170.160/28\",\r\n \"40.87.170.176/29\",\r\n\ - \ \"40.87.170.184/30\",\r\n \"40.87.170.188/30\",\r\n \ - \ \"40.87.170.192/31\",\r\n \"40.87.170.194/31\",\r\n \ - \ \"40.87.170.196/30\",\r\n \"40.87.170.200/29\",\r\n \ - \ \"40.87.170.208/30\",\r\n \"40.87.170.212/31\",\r\n \ - \ \"40.87.170.214/31\",\r\n \"40.87.170.216/30\",\r\n \"\ - 40.87.170.220/30\",\r\n \"40.87.170.224/30\",\r\n \"40.87.170.228/30\"\ - ,\r\n \"40.87.170.232/29\",\r\n \"40.87.170.240/29\",\r\n\ - \ \"40.87.170.248/30\",\r\n \"40.87.170.252/30\",\r\n \ - \ \"40.87.171.0/31\",\r\n \"40.87.171.2/31\",\r\n \ - \ \"40.87.171.4/30\",\r\n \"40.87.171.8/29\",\r\n \"40.87.171.16/28\"\ - ,\r\n \"40.87.171.32/30\",\r\n \"40.87.171.36/30\",\r\n\ - \ \"40.87.171.40/31\",\r\n \"40.87.171.42/31\",\r\n \ - \ \"40.87.171.44/30\",\r\n \"40.87.171.48/28\",\r\n \ - \ \"40.87.171.64/29\",\r\n \"40.87.171.72/29\",\r\n \"\ - 40.87.171.80/28\",\r\n \"40.87.171.96/27\",\r\n \"40.87.171.128/27\"\ - ,\r\n \"40.87.171.160/31\",\r\n \"40.87.171.162/31\",\r\n\ - \ \"40.87.171.164/31\",\r\n \"40.87.171.166/31\",\r\n \ - \ \"40.87.171.168/29\",\r\n \"40.87.171.176/28\",\r\n \ - \ \"40.87.171.192/27\",\r\n \"40.87.171.224/28\",\r\n \ - \ \"40.87.171.240/29\",\r\n \"40.87.171.248/31\",\r\n \ - \ \"40.87.171.250/31\",\r\n \"40.87.171.252/30\",\r\n \"\ - 40.87.172.0/22\",\r\n \"40.87.176.0/25\",\r\n \"40.87.176.128/27\"\ - ,\r\n \"40.87.176.160/29\",\r\n \"40.87.176.168/30\",\r\n\ - \ \"40.87.176.172/31\",\r\n \"40.87.176.174/31\",\r\n \ - \ \"40.87.176.176/29\",\r\n \"40.87.176.184/30\",\r\n \ - \ \"40.87.176.188/30\",\r\n \"40.87.176.192/28\",\r\n \ - \ \"40.87.176.208/29\",\r\n \"40.87.176.216/29\",\r\n \ - \ \"40.87.176.224/29\",\r\n \"40.87.176.232/31\",\r\n \"\ - 40.87.176.234/31\",\r\n \"40.87.176.236/30\",\r\n \"40.87.176.240/28\"\ - ,\r\n \"40.87.177.0/28\",\r\n \"40.87.177.16/28\",\r\n \ - \ \"40.87.177.32/27\",\r\n \"40.87.177.64/27\",\r\n \ - \ \"40.87.177.96/28\",\r\n \"40.87.177.112/29\",\r\n \ - \ \"40.87.177.120/31\",\r\n \"40.87.177.122/31\",\r\n \"\ - 40.87.177.124/30\",\r\n \"40.87.177.128/28\",\r\n \"40.87.177.144/29\"\ - ,\r\n \"40.87.177.152/31\",\r\n \"40.87.177.154/31\",\r\n\ - \ \"40.87.177.156/30\",\r\n \"40.87.177.160/27\",\r\n \ - \ \"40.87.177.192/29\",\r\n \"40.87.177.200/30\",\r\n \ - \ \"40.87.177.204/30\",\r\n \"40.87.177.208/30\",\r\n \ - \ \"40.87.177.212/30\",\r\n \"40.87.177.216/29\",\r\n \ - \ \"40.87.177.224/27\",\r\n \"40.87.178.0/25\",\r\n \"\ - 40.87.178.128/26\",\r\n \"40.87.178.192/28\",\r\n \"40.87.178.208/30\"\ - ,\r\n \"40.87.180.0/30\",\r\n \"40.87.180.4/31\",\r\n \ - \ \"40.87.180.6/31\",\r\n \"40.87.180.8/30\",\r\n \ - \ \"40.87.180.12/31\",\r\n \"40.87.180.14/31\",\r\n \"\ - 40.87.180.16/30\",\r\n \"40.87.180.20/31\",\r\n \"40.87.180.22/31\"\ - ,\r\n \"40.87.180.24/30\",\r\n \"40.87.180.28/30\",\r\n\ - \ \"40.87.180.32/29\",\r\n \"40.87.180.40/31\",\r\n \ - \ \"40.87.180.42/31\",\r\n \"40.87.180.44/30\",\r\n \ - \ \"40.87.180.48/28\",\r\n \"40.87.180.64/30\",\r\n \"\ - 40.87.180.68/30\",\r\n \"40.87.180.72/31\",\r\n \"40.87.180.74/31\"\ - ,\r\n \"40.87.180.76/30\",\r\n \"40.87.180.80/28\",\r\n\ - \ \"40.87.180.96/27\",\r\n \"40.87.180.128/26\",\r\n \ - \ \"40.87.180.192/30\",\r\n \"40.87.180.196/30\",\r\n \ - \ \"40.87.180.200/31\",\r\n \"40.87.180.202/31\",\r\n \ - \ \"40.87.180.204/30\",\r\n \"40.87.180.208/28\",\r\n \ - \ \"40.87.180.224/28\",\r\n \"40.87.180.240/29\",\r\n \"\ - 40.87.180.248/30\",\r\n \"40.87.180.252/30\",\r\n \"40.87.181.0/30\"\ - ,\r\n \"40.87.181.4/30\",\r\n \"40.87.181.8/29\",\r\n \ - \ \"40.87.181.16/29\",\r\n \"40.87.181.24/30\",\r\n \ - \ \"40.87.182.0/30\",\r\n \"40.87.182.4/30\",\r\n \"\ - 40.87.182.8/29\",\r\n \"40.87.182.16/29\",\r\n \"40.87.182.24/29\"\ - ,\r\n \"40.87.182.32/28\",\r\n \"40.87.182.48/29\",\r\n\ - \ \"40.87.182.56/30\",\r\n \"40.87.182.60/31\",\r\n \ - \ \"40.87.182.62/31\",\r\n \"40.87.182.64/26\",\r\n \ - \ \"40.87.182.128/25\",\r\n \"40.87.183.0/28\",\r\n \"\ - 40.87.183.16/29\",\r\n \"40.87.183.24/30\",\r\n \"40.87.183.28/30\"\ - ,\r\n \"40.87.183.32/31\",\r\n \"40.87.183.34/31\",\r\n\ - \ \"40.87.183.36/30\",\r\n \"40.87.183.40/31\",\r\n \ - \ \"40.87.183.42/31\",\r\n \"40.87.183.44/30\",\r\n \ - \ \"40.87.183.48/30\",\r\n \"40.87.183.52/31\",\r\n \"\ - 40.87.183.54/31\",\r\n \"40.87.183.56/29\",\r\n \"40.87.183.64/26\"\ - ,\r\n \"40.87.183.128/28\",\r\n \"40.87.183.144/28\",\r\n\ - \ \"40.87.183.160/27\",\r\n \"40.87.183.192/27\",\r\n \ - \ \"40.87.183.224/29\",\r\n \"40.87.183.232/30\",\r\n \ - \ \"40.87.183.236/31\",\r\n \"40.87.183.238/31\",\r\n \ - \ \"40.87.183.240/30\",\r\n \"40.87.183.244/30\",\r\n \ - \ \"40.87.183.248/29\",\r\n \"40.87.184.0/22\",\r\n \"\ - 40.87.188.0/22\",\r\n \"40.87.192.0/22\",\r\n \"40.87.196.0/22\"\ - ,\r\n \"40.87.200.0/22\",\r\n \"40.87.204.0/22\",\r\n \ - \ \"40.87.208.0/22\",\r\n \"40.87.212.0/22\",\r\n \ - \ \"40.87.216.0/22\",\r\n \"40.87.220.0/22\",\r\n \"40.87.224.0/22\"\ - ,\r\n \"40.87.228.0/22\",\r\n \"40.87.232.0/21\",\r\n \ - \ \"40.88.0.0/16\",\r\n \"40.89.0.0/19\",\r\n \"\ - 40.89.32.0/19\",\r\n \"40.89.64.0/18\",\r\n \"40.89.128.0/18\"\ - ,\r\n \"40.89.192.0/19\",\r\n \"40.89.224.0/19\",\r\n \ - \ \"40.90.16.0/27\",\r\n \"40.90.16.32/27\",\r\n \ - \ \"40.90.16.64/27\",\r\n \"40.90.16.96/27\",\r\n \"40.90.16.128/27\"\ - ,\r\n \"40.90.16.160/27\",\r\n \"40.90.16.192/26\",\r\n\ - \ \"40.90.17.0/27\",\r\n \"40.90.17.32/27\",\r\n \ - \ \"40.90.17.64/27\",\r\n \"40.90.17.96/27\",\r\n \"40.90.17.128/28\"\ - ,\r\n \"40.90.17.144/28\",\r\n \"40.90.17.160/27\",\r\n\ - \ \"40.90.17.192/27\",\r\n \"40.90.17.224/27\",\r\n \ - \ \"40.90.18.0/28\",\r\n \"40.90.18.16/28\",\r\n \"\ - 40.90.18.32/27\",\r\n \"40.90.18.64/26\",\r\n \"40.90.18.128/26\"\ - ,\r\n \"40.90.18.192/26\",\r\n \"40.90.19.0/27\",\r\n \ - \ \"40.90.19.32/27\",\r\n \"40.90.19.64/26\",\r\n \ - \ \"40.90.19.128/25\",\r\n \"40.90.20.0/25\",\r\n \"40.90.20.128/25\"\ - ,\r\n \"40.90.21.0/25\",\r\n \"40.90.21.128/25\",\r\n \ - \ \"40.90.22.0/25\",\r\n \"40.90.22.128/25\",\r\n \ - \ \"40.90.23.0/25\",\r\n \"40.90.23.128/25\",\r\n \"40.90.24.0/25\"\ - ,\r\n \"40.90.24.128/25\",\r\n \"40.90.25.0/26\",\r\n \ - \ \"40.90.25.64/26\",\r\n \"40.90.25.128/26\",\r\n \ - \ \"40.90.25.192/26\",\r\n \"40.90.26.0/26\",\r\n \"40.90.26.64/26\"\ - ,\r\n \"40.90.26.128/25\",\r\n \"40.90.27.0/26\",\r\n \ - \ \"40.90.27.64/26\",\r\n \"40.90.27.128/26\",\r\n \ - \ \"40.90.27.192/26\",\r\n \"40.90.28.0/26\",\r\n \"40.90.28.64/26\"\ - ,\r\n \"40.90.28.128/26\",\r\n \"40.90.28.192/26\",\r\n\ - \ \"40.90.29.0/26\",\r\n \"40.90.29.64/26\",\r\n \ - \ \"40.90.29.128/26\",\r\n \"40.90.29.192/26\",\r\n \"\ - 40.90.30.0/25\",\r\n \"40.90.30.128/27\",\r\n \"40.90.30.160/27\"\ - ,\r\n \"40.90.30.192/26\",\r\n \"40.90.31.0/27\",\r\n \ - \ \"40.90.31.32/27\",\r\n \"40.90.31.64/27\",\r\n \ - \ \"40.90.31.96/27\",\r\n \"40.90.31.128/25\",\r\n \"40.90.128.0/28\"\ - ,\r\n \"40.90.128.16/28\",\r\n \"40.90.128.32/28\",\r\n\ - \ \"40.90.128.48/28\",\r\n \"40.90.128.64/28\",\r\n \ - \ \"40.90.128.80/28\",\r\n \"40.90.128.96/28\",\r\n \ - \ \"40.90.128.112/28\",\r\n \"40.90.128.128/28\",\r\n \"\ - 40.90.128.144/28\",\r\n \"40.90.128.160/28\",\r\n \"40.90.128.176/28\"\ - ,\r\n \"40.90.128.192/28\",\r\n \"40.90.128.208/28\",\r\n\ - \ \"40.90.128.224/28\",\r\n \"40.90.128.240/28\",\r\n \ - \ \"40.90.129.0/27\",\r\n \"40.90.129.32/28\",\r\n \ - \ \"40.90.129.48/28\",\r\n \"40.90.129.64/27\",\r\n \"\ - 40.90.129.96/27\",\r\n \"40.90.129.128/26\",\r\n \"40.90.129.192/27\"\ - ,\r\n \"40.90.129.224/27\",\r\n \"40.90.130.0/27\",\r\n\ - \ \"40.90.130.32/28\",\r\n \"40.90.130.48/28\",\r\n \ - \ \"40.90.130.64/28\",\r\n \"40.90.130.80/28\",\r\n \ - \ \"40.90.130.96/28\",\r\n \"40.90.130.112/28\",\r\n \"\ - 40.90.130.128/28\",\r\n \"40.90.130.144/28\",\r\n \"40.90.130.160/27\"\ - ,\r\n \"40.90.130.192/28\",\r\n \"40.90.130.208/28\",\r\n\ - \ \"40.90.130.224/28\",\r\n \"40.90.130.240/28\",\r\n \ - \ \"40.90.131.0/27\",\r\n \"40.90.131.32/27\",\r\n \ - \ \"40.90.131.64/27\",\r\n \"40.90.131.96/27\",\r\n \"\ - 40.90.131.128/27\",\r\n \"40.90.131.160/27\",\r\n \"40.90.131.192/27\"\ - ,\r\n \"40.90.131.224/27\",\r\n \"40.90.132.0/27\",\r\n\ - \ \"40.90.132.32/28\",\r\n \"40.90.132.48/28\",\r\n \ - \ \"40.90.132.64/28\",\r\n \"40.90.132.80/28\",\r\n \ - \ \"40.90.132.96/27\",\r\n \"40.90.132.128/26\",\r\n \"\ - 40.90.132.192/26\",\r\n \"40.90.133.0/27\",\r\n \"40.90.133.32/27\"\ - ,\r\n \"40.90.133.64/27\",\r\n \"40.90.133.96/28\",\r\n\ - \ \"40.90.133.112/28\",\r\n \"40.90.133.128/28\",\r\n \ - \ \"40.90.133.144/28\",\r\n \"40.90.133.160/27\",\r\n \ - \ \"40.90.133.192/26\",\r\n \"40.90.134.0/26\",\r\n \ - \ \"40.90.134.64/26\",\r\n \"40.90.134.128/26\",\r\n \"\ - 40.90.134.192/26\",\r\n \"40.90.135.0/26\",\r\n \"40.90.135.64/26\"\ - ,\r\n \"40.90.135.128/25\",\r\n \"40.90.136.0/28\",\r\n\ - \ \"40.90.136.16/28\",\r\n \"40.90.136.32/27\",\r\n \ - \ \"40.90.136.64/26\",\r\n \"40.90.136.128/27\",\r\n \ - \ \"40.90.136.160/28\",\r\n \"40.90.136.176/28\",\r\n \ - \ \"40.90.136.192/27\",\r\n \"40.90.136.224/27\",\r\n \"\ - 40.90.137.0/27\",\r\n \"40.90.137.32/27\",\r\n \"40.90.137.64/27\"\ - ,\r\n \"40.90.137.96/27\",\r\n \"40.90.137.128/27\",\r\n\ - \ \"40.90.137.160/27\",\r\n \"40.90.137.192/27\",\r\n \ - \ \"40.90.137.224/27\",\r\n \"40.90.138.0/27\",\r\n \ - \ \"40.90.138.32/27\",\r\n \"40.90.138.64/27\",\r\n \"\ - 40.90.138.96/27\",\r\n \"40.90.138.128/27\",\r\n \"40.90.138.160/27\"\ - ,\r\n \"40.90.138.192/28\",\r\n \"40.90.138.208/28\",\r\n\ - \ \"40.90.138.224/27\",\r\n \"40.90.139.0/27\",\r\n \ - \ \"40.90.139.32/27\",\r\n \"40.90.139.64/27\",\r\n \ - \ \"40.90.139.96/27\",\r\n \"40.90.139.128/27\",\r\n \"\ - 40.90.139.160/27\",\r\n \"40.90.139.192/27\",\r\n \"40.90.139.224/27\"\ - ,\r\n \"40.90.140.0/27\",\r\n \"40.90.140.32/27\",\r\n \ - \ \"40.90.140.64/27\",\r\n \"40.90.140.96/27\",\r\n \ - \ \"40.90.140.128/27\",\r\n \"40.90.140.160/27\",\r\n \ - \ \"40.90.140.192/27\",\r\n \"40.90.140.224/27\",\r\n \ - \ \"40.90.141.0/27\",\r\n \"40.90.141.32/27\",\r\n \"40.90.141.64/27\"\ - ,\r\n \"40.90.141.96/27\",\r\n \"40.90.141.128/27\",\r\n\ - \ \"40.90.141.160/27\",\r\n \"40.90.141.192/26\",\r\n \ - \ \"40.90.142.0/27\",\r\n \"40.90.142.32/27\",\r\n \ - \ \"40.90.142.64/27\",\r\n \"40.90.142.96/27\",\r\n \"\ - 40.90.142.128/27\",\r\n \"40.90.142.160/27\",\r\n \"40.90.142.192/28\"\ - ,\r\n \"40.90.142.208/28\",\r\n \"40.90.142.224/28\",\r\n\ - \ \"40.90.142.240/28\",\r\n \"40.90.143.0/27\",\r\n \ - \ \"40.90.143.32/27\",\r\n \"40.90.143.64/27\",\r\n \ - \ \"40.90.143.96/27\",\r\n \"40.90.143.128/27\",\r\n \"\ - 40.90.143.160/27\",\r\n \"40.90.143.192/26\",\r\n \"40.90.144.0/27\"\ - ,\r\n \"40.90.144.32/27\",\r\n \"40.90.144.64/26\",\r\n\ - \ \"40.90.144.128/26\",\r\n \"40.90.144.192/27\",\r\n \ - \ \"40.90.144.224/27\",\r\n \"40.90.145.0/27\",\r\n \ - \ \"40.90.145.32/27\",\r\n \"40.90.145.64/27\",\r\n \"\ - 40.90.145.96/27\",\r\n \"40.90.145.128/27\",\r\n \"40.90.145.160/27\"\ - ,\r\n \"40.90.145.192/27\",\r\n \"40.90.145.224/27\",\r\n\ - \ \"40.90.146.0/28\",\r\n \"40.90.146.16/28\",\r\n \ - \ \"40.90.146.32/27\",\r\n \"40.90.146.64/26\",\r\n \ - \ \"40.90.146.128/27\",\r\n \"40.90.146.160/27\",\r\n \"\ - 40.90.146.192/27\",\r\n \"40.90.146.224/27\",\r\n \"40.90.147.0/27\"\ - ,\r\n \"40.90.147.32/27\",\r\n \"40.90.147.64/27\",\r\n\ - \ \"40.90.147.96/27\",\r\n \"40.90.147.128/26\",\r\n \ - \ \"40.90.147.192/27\",\r\n \"40.90.147.224/27\",\r\n \ - \ \"40.90.148.0/26\",\r\n \"40.90.148.64/27\",\r\n \"\ - 40.90.148.96/27\",\r\n \"40.90.148.128/27\",\r\n \"40.90.148.160/28\"\ - ,\r\n \"40.90.148.176/28\",\r\n \"40.90.148.192/27\",\r\n\ - \ \"40.90.148.224/27\",\r\n \"40.90.149.0/27\",\r\n \ - \ \"40.90.149.32/27\",\r\n \"40.90.149.64/27\",\r\n \ - \ \"40.90.149.96/27\",\r\n \"40.90.149.128/25\",\r\n \"\ - 40.90.150.0/27\",\r\n \"40.90.150.32/27\",\r\n \"40.90.150.64/27\"\ - ,\r\n \"40.90.150.96/27\",\r\n \"40.90.150.128/25\",\r\n\ - \ \"40.90.151.0/26\",\r\n \"40.90.151.64/27\",\r\n \ - \ \"40.90.151.96/27\",\r\n \"40.90.151.128/28\",\r\n \ - \ \"40.90.151.144/28\",\r\n \"40.90.151.160/27\",\r\n \"\ - 40.90.151.192/27\",\r\n \"40.90.151.224/27\",\r\n \"40.90.152.0/25\"\ - ,\r\n \"40.90.152.128/27\",\r\n \"40.90.152.160/27\",\r\n\ - \ \"40.90.152.192/27\",\r\n \"40.90.152.224/27\",\r\n \ - \ \"40.90.153.0/26\",\r\n \"40.90.153.64/27\",\r\n \ - \ \"40.90.153.96/27\",\r\n \"40.90.153.128/25\",\r\n \"\ - 40.90.154.0/26\",\r\n \"40.90.154.64/26\",\r\n \"40.90.154.128/26\"\ - ,\r\n \"40.90.154.192/26\",\r\n \"40.90.155.0/26\",\r\n\ - \ \"40.90.155.64/26\",\r\n \"40.90.155.128/26\",\r\n \ - \ \"40.90.155.192/26\",\r\n \"40.90.156.0/26\",\r\n \ - \ \"40.90.156.64/27\",\r\n \"40.90.156.96/27\",\r\n \"\ - 40.90.156.128/26\",\r\n \"40.90.156.192/26\",\r\n \"40.90.157.0/27\"\ - ,\r\n \"40.90.157.32/27\",\r\n \"40.90.157.64/26\",\r\n\ - \ \"40.90.157.128/26\",\r\n \"40.90.157.192/27\",\r\n \ - \ \"40.90.157.224/27\",\r\n \"40.90.158.0/26\",\r\n \ - \ \"40.90.158.64/26\",\r\n \"40.90.158.128/25\",\r\n \ - \ \"40.90.159.0/24\",\r\n \"40.90.160.0/19\",\r\n \"40.90.192.0/19\"\ - ,\r\n \"40.90.224.0/19\",\r\n \"40.91.0.0/22\",\r\n \ - \ \"40.91.4.0/22\",\r\n \"40.91.12.0/28\",\r\n \"40.91.12.16/28\"\ - ,\r\n \"40.91.12.32/28\",\r\n \"40.91.12.48/28\",\r\n \ - \ \"40.91.12.64/26\",\r\n \"40.91.12.128/28\",\r\n \ - \ \"40.91.12.160/27\",\r\n \"40.91.12.208/28\",\r\n \"\ - 40.91.12.240/28\",\r\n \"40.91.13.0/28\",\r\n \"40.91.13.64/27\"\ - ,\r\n \"40.91.13.96/28\",\r\n \"40.91.13.128/27\",\r\n \ - \ \"40.91.13.240/28\",\r\n \"40.91.14.0/24\",\r\n \ - \ \"40.91.16.0/22\",\r\n \"40.91.20.0/22\",\r\n \"40.91.24.0/22\"\ - ,\r\n \"40.91.28.0/22\",\r\n \"40.91.32.0/22\",\r\n \ - \ \"40.91.64.0/18\",\r\n \"40.91.160.0/19\",\r\n \"\ - 40.91.192.0/18\",\r\n \"40.93.0.0/23\",\r\n \"40.93.2.0/24\"\ - ,\r\n \"40.93.3.0/24\",\r\n \"40.93.4.0/24\",\r\n \ - \ \"40.93.5.0/24\",\r\n \"40.93.6.0/24\",\r\n \"40.93.7.0/24\"\ - ,\r\n \"40.93.8.0/24\",\r\n \"40.93.9.0/24\",\r\n \ - \ \"40.93.10.0/24\",\r\n \"40.93.11.0/24\",\r\n \"40.93.12.0/24\"\ - ,\r\n \"40.93.13.0/24\",\r\n \"40.93.14.0/24\",\r\n \ - \ \"40.93.15.0/24\",\r\n \"40.93.16.0/24\",\r\n \"\ - 40.93.17.0/24\",\r\n \"40.93.64.0/24\",\r\n \"40.93.65.0/24\"\ - ,\r\n \"40.93.128.0/24\",\r\n \"40.93.129.0/24\",\r\n \ - \ \"40.93.192.0/24\",\r\n \"40.93.193.0/24\",\r\n \ - \ \"40.93.194.0/23\",\r\n \"40.93.196.0/23\",\r\n \"40.93.198.0/23\"\ - ,\r\n \"40.93.200.0/23\",\r\n \"40.93.202.0/24\",\r\n \ - \ \"40.93.203.0/24\",\r\n \"40.93.204.0/22\",\r\n \ - \ \"40.93.208.0/22\",\r\n \"40.93.212.0/24\",\r\n \"40.93.213.0/24\"\ - ,\r\n \"40.93.214.0/24\",\r\n \"40.96.46.0/24\",\r\n \ - \ \"40.96.50.0/24\",\r\n \"40.96.52.0/24\",\r\n \"\ - 40.96.55.0/24\",\r\n \"40.96.61.0/24\",\r\n \"40.96.63.0/24\"\ - ,\r\n \"40.96.255.0/24\",\r\n \"40.101.0.0/24\",\r\n \ - \ \"40.101.1.0/24\",\r\n \"40.112.36.0/25\",\r\n \"\ - 40.112.36.128/25\",\r\n \"40.112.37.0/26\",\r\n \"40.112.37.64/26\"\ - ,\r\n \"40.112.37.128/26\",\r\n \"40.112.37.192/26\",\r\n\ - \ \"40.112.38.192/26\",\r\n \"40.112.39.0/25\",\r\n \ - \ \"40.112.39.128/26\",\r\n \"40.112.48.0/20\",\r\n \ - \ \"40.112.64.0/19\",\r\n \"40.112.96.0/19\",\r\n \"40.112.128.0/17\"\ - ,\r\n \"40.113.0.0/18\",\r\n \"40.113.64.0/19\",\r\n \ - \ \"40.113.96.0/19\",\r\n \"40.113.128.0/18\",\r\n \ - \ \"40.113.192.0/18\",\r\n \"40.114.0.0/17\",\r\n \"40.114.128.0/17\"\ - ,\r\n \"40.115.0.0/18\",\r\n \"40.115.64.0/19\",\r\n \ - \ \"40.115.96.0/19\",\r\n \"40.115.128.0/17\",\r\n \ - \ \"40.116.0.0/16\",\r\n \"40.117.0.0/19\",\r\n \"40.117.32.0/19\"\ - ,\r\n \"40.117.64.0/18\",\r\n \"40.117.128.0/17\",\r\n \ - \ \"40.118.0.0/17\",\r\n \"40.118.128.0/17\",\r\n \ - \ \"40.119.0.0/18\",\r\n \"40.119.64.0/22\",\r\n \"40.119.68.0/22\"\ - ,\r\n \"40.119.72.0/22\",\r\n \"40.119.76.0/22\",\r\n \ - \ \"40.119.80.0/22\",\r\n \"40.119.84.0/22\",\r\n \ - \ \"40.119.88.0/22\",\r\n \"40.119.92.0/22\",\r\n \"40.119.96.0/22\"\ - ,\r\n \"40.119.100.0/27\",\r\n \"40.119.100.32/28\",\r\n\ - \ \"40.119.100.48/30\",\r\n \"40.119.100.52/30\",\r\n \ - \ \"40.119.100.56/29\",\r\n \"40.119.100.64/28\",\r\n \ - \ \"40.119.100.80/29\",\r\n \"40.119.100.88/30\",\r\n \ - \ \"40.119.100.92/30\",\r\n \"40.119.100.96/29\",\r\n \ - \ \"40.119.104.0/22\",\r\n \"40.119.108.0/22\",\r\n \"\ - 40.119.112.0/22\",\r\n \"40.119.116.0/22\",\r\n \"40.119.120.0/22\"\ - ,\r\n \"40.119.124.0/22\",\r\n \"40.119.128.0/19\",\r\n\ - \ \"40.119.160.0/19\",\r\n \"40.119.192.0/18\",\r\n \ - \ \"40.120.0.0/20\",\r\n \"40.120.16.0/20\",\r\n \"\ - 40.120.32.0/19\",\r\n \"40.120.64.0/18\",\r\n \"40.121.0.0/16\"\ - ,\r\n \"40.122.0.0/20\",\r\n \"40.122.16.0/20\",\r\n \ - \ \"40.122.32.0/19\",\r\n \"40.122.64.0/18\",\r\n \ - \ \"40.122.128.0/17\",\r\n \"40.123.0.0/17\",\r\n \"40.123.128.0/22\"\ - ,\r\n \"40.123.132.0/22\",\r\n \"40.123.136.0/24\",\r\n\ - \ \"40.123.140.0/22\",\r\n \"40.123.144.0/26\",\r\n \ - \ \"40.123.144.64/29\",\r\n \"40.123.144.72/29\",\r\n \ - \ \"40.123.144.80/28\",\r\n \"40.123.144.96/29\",\r\n \ - \ \"40.123.144.104/29\",\r\n \"40.123.144.112/28\",\r\n \ - \ \"40.123.144.128/28\",\r\n \"40.123.144.144/29\",\r\n \ - \ \"40.123.144.152/30\",\r\n \"40.123.148.0/27\",\r\n \"\ - 40.123.148.32/28\",\r\n \"40.123.148.48/30\",\r\n \"40.123.192.0/19\"\ - ,\r\n \"40.123.224.0/20\",\r\n \"40.123.240.0/20\",\r\n\ - \ \"40.124.0.0/16\",\r\n \"40.125.0.0/19\",\r\n \ - \ \"40.125.32.0/19\",\r\n \"40.125.64.0/18\",\r\n \"40.126.0.0/24\"\ - ,\r\n \"40.126.1.0/24\",\r\n \"40.126.2.0/24\",\r\n \ - \ \"40.126.3.0/24\",\r\n \"40.126.4.0/24\",\r\n \"\ - 40.126.5.0/24\",\r\n \"40.126.6.0/24\",\r\n \"40.126.7.0/24\"\ - ,\r\n \"40.126.8.0/24\",\r\n \"40.126.9.0/24\",\r\n \ - \ \"40.126.10.0/25\",\r\n \"40.126.10.128/25\",\r\n \ - \ \"40.126.11.0/25\",\r\n \"40.126.11.128/25\",\r\n \"\ - 40.126.12.0/25\",\r\n \"40.126.12.128/25\",\r\n \"40.126.13.0/25\"\ - ,\r\n \"40.126.13.128/25\",\r\n \"40.126.14.0/25\",\r\n\ - \ \"40.126.14.128/25\",\r\n \"40.126.15.0/25\",\r\n \ - \ \"40.126.15.128/25\",\r\n \"40.126.16.0/25\",\r\n \ - \ \"40.126.16.128/25\",\r\n \"40.126.17.0/25\",\r\n \"\ - 40.126.17.128/25\",\r\n \"40.126.18.0/25\",\r\n \"40.126.18.128/25\"\ - ,\r\n \"40.126.19.0/25\",\r\n \"40.126.19.128/25\",\r\n\ - \ \"40.126.20.0/25\",\r\n \"40.126.20.128/25\",\r\n \ - \ \"40.126.21.0/24\",\r\n \"40.126.22.0/24\",\r\n \"\ - 40.126.23.0/24\",\r\n \"40.126.24.0/24\",\r\n \"40.126.25.0/24\"\ - ,\r\n \"40.126.26.0/24\",\r\n \"40.126.27.0/24\",\r\n \ - \ \"40.126.28.0/24\",\r\n \"40.126.29.0/24\",\r\n \ - \ \"40.126.30.0/24\",\r\n \"40.126.31.0/24\",\r\n \"40.126.32.0/24\"\ - ,\r\n \"40.126.33.0/24\",\r\n \"40.126.34.0/24\",\r\n \ - \ \"40.126.35.0/24\",\r\n \"40.126.36.0/24\",\r\n \ - \ \"40.126.37.0/24\",\r\n \"40.126.38.0/24\",\r\n \"40.126.39.0/24\"\ - ,\r\n \"40.126.40.0/24\",\r\n \"40.126.41.0/24\",\r\n \ - \ \"40.126.42.0/24\",\r\n \"40.126.43.0/24\",\r\n \ - \ \"40.126.44.0/24\",\r\n \"40.126.45.0/24\",\r\n \"40.126.46.0/24\"\ - ,\r\n \"40.126.47.0/24\",\r\n \"40.126.48.0/24\",\r\n \ - \ \"40.126.49.0/24\",\r\n \"40.126.50.0/24\",\r\n \ - \ \"40.126.51.0/24\",\r\n \"40.126.52.0/24\",\r\n \"40.126.53.0/24\"\ - ,\r\n \"40.126.54.0/24\",\r\n \"40.126.55.0/24\",\r\n \ - \ \"40.126.56.0/24\",\r\n \"40.126.57.0/24\",\r\n \ - \ \"40.126.58.0/24\",\r\n \"40.126.59.0/24\",\r\n \"40.126.60.0/24\"\ - ,\r\n \"40.126.61.0/26\",\r\n \"40.126.61.64/26\",\r\n \ - \ \"40.126.61.128/26\",\r\n \"40.126.61.192/26\",\r\n \ - \ \"40.126.62.0/26\",\r\n \"40.126.62.64/26\",\r\n \ - \ \"40.126.62.128/25\",\r\n \"40.126.63.0/26\",\r\n \"\ - 40.126.63.64/26\",\r\n \"40.126.63.128/26\",\r\n \"40.126.63.192/26\"\ - ,\r\n \"40.126.128.0/18\",\r\n \"40.126.192.0/24\",\r\n\ - \ \"40.126.193.0/24\",\r\n \"40.126.194.0/24\",\r\n \ - \ \"40.126.195.0/24\",\r\n \"40.126.196.0/24\",\r\n \ - \ \"40.126.197.0/24\",\r\n \"40.126.198.0/24\",\r\n \"\ - 40.126.199.0/24\",\r\n \"40.126.200.0/24\",\r\n \"40.126.201.0/24\"\ - ,\r\n \"40.126.202.0/24\",\r\n \"40.126.203.0/24\",\r\n\ - \ \"40.126.204.0/24\",\r\n \"40.126.205.0/24\",\r\n \ - \ \"40.126.206.0/24\",\r\n \"40.126.207.0/24\",\r\n \ - \ \"40.126.208.0/20\",\r\n \"40.126.224.0/19\",\r\n \"\ - 40.127.0.0/19\",\r\n \"40.127.32.0/24\",\r\n \"40.127.64.0/19\"\ - ,\r\n \"40.127.96.0/20\",\r\n \"40.127.128.0/17\",\r\n \ - \ \"51.11.0.0/18\",\r\n \"51.11.64.0/19\",\r\n \"\ - 51.11.96.0/19\",\r\n \"51.11.128.0/18\",\r\n \"51.11.192.0/18\"\ - ,\r\n \"51.12.0.0/20\",\r\n \"51.12.16.0/21\",\r\n \ - \ \"51.12.24.0/21\",\r\n \"51.12.32.0/19\",\r\n \"51.12.64.0/19\"\ - ,\r\n \"51.12.96.0/21\",\r\n \"51.12.104.0/27\",\r\n \ - \ \"51.12.104.32/27\",\r\n \"51.12.112.0/20\",\r\n \ - \ \"51.12.128.0/21\",\r\n \"51.12.136.0/21\",\r\n \"51.12.144.0/20\"\ - ,\r\n \"51.12.160.0/19\",\r\n \"51.12.192.0/20\",\r\n \ - \ \"51.12.208.0/20\",\r\n \"51.12.224.0/19\",\r\n \ - \ \"51.13.0.0/21\",\r\n \"51.13.16.0/20\",\r\n \"51.13.32.0/19\"\ - ,\r\n \"51.13.64.0/18\",\r\n \"51.13.128.0/19\",\r\n \ - \ \"51.13.160.0/19\",\r\n \"51.103.0.0/17\",\r\n \"\ - 51.103.128.0/18\",\r\n \"51.103.192.0/27\",\r\n \"51.103.192.32/27\"\ - ,\r\n \"51.103.200.0/21\",\r\n \"51.103.208.0/20\",\r\n\ - \ \"51.103.224.0/19\",\r\n \"51.104.0.0/19\",\r\n \ - \ \"51.104.32.0/19\",\r\n \"51.104.64.0/18\",\r\n \"\ - 51.104.128.0/18\",\r\n \"51.104.192.0/18\",\r\n \"51.105.0.0/18\"\ - ,\r\n \"51.105.64.0/20\",\r\n \"51.105.80.0/21\",\r\n \ - \ \"51.105.88.0/21\",\r\n \"51.105.96.0/19\",\r\n \ - \ \"51.105.128.0/17\",\r\n \"51.107.0.0/18\",\r\n \"51.107.64.0/19\"\ - ,\r\n \"51.107.96.0/19\",\r\n \"51.107.128.0/21\",\r\n \ - \ \"51.107.136.0/21\",\r\n \"51.107.144.0/20\",\r\n \ - \ \"51.107.160.0/20\",\r\n \"51.107.176.0/20\",\r\n \ - \ \"51.107.192.0/21\",\r\n \"51.107.200.0/21\",\r\n \"51.107.208.0/20\"\ - ,\r\n \"51.107.224.0/20\",\r\n \"51.107.240.0/21\",\r\n\ - \ \"51.107.248.0/21\",\r\n \"51.116.0.0/18\",\r\n \ - \ \"51.116.64.0/19\",\r\n \"51.116.96.0/19\",\r\n \"\ - 51.116.128.0/18\",\r\n \"51.116.192.0/21\",\r\n \"51.116.200.0/21\"\ - ,\r\n \"51.116.208.0/20\",\r\n \"51.116.224.0/19\",\r\n\ - \ \"51.120.0.0/17\",\r\n \"51.120.128.0/18\",\r\n \ - \ \"51.120.192.0/20\",\r\n \"51.120.208.0/21\",\r\n \"\ - 51.120.216.0/21\",\r\n \"51.120.224.0/21\",\r\n \"51.120.232.0/21\"\ - ,\r\n \"51.120.240.0/20\",\r\n \"51.124.0.0/16\",\r\n \ - \ \"51.132.0.0/18\",\r\n \"51.132.64.0/18\",\r\n \ - \ \"51.132.128.0/17\",\r\n \"51.136.0.0/16\",\r\n \"51.137.0.0/17\"\ - ,\r\n \"51.137.128.0/18\",\r\n \"51.137.192.0/18\",\r\n\ - \ \"51.138.0.0/17\",\r\n \"51.138.128.0/19\",\r\n \ - \ \"51.138.160.0/21\",\r\n \"51.138.192.0/19\",\r\n \"\ - 51.140.0.0/17\",\r\n \"51.140.128.0/18\",\r\n \"51.140.192.0/18\"\ - ,\r\n \"51.141.0.0/17\",\r\n \"51.141.128.0/27\",\r\n \ - \ \"51.141.128.32/27\",\r\n \"51.141.128.64/26\",\r\n \ - \ \"51.141.128.128/25\",\r\n \"51.141.129.64/26\",\r\n \ - \ \"51.141.129.128/26\",\r\n \"51.141.129.192/26\",\r\n \ - \ \"51.141.130.0/25\",\r\n \"51.141.134.0/24\",\r\n \ - \ \"51.141.135.0/24\",\r\n \"51.141.136.0/22\",\r\n \"51.141.156.0/22\"\ - ,\r\n \"51.141.160.0/19\",\r\n \"51.141.192.0/18\",\r\n\ - \ \"51.142.0.0/17\",\r\n \"51.142.128.0/17\",\r\n \ - \ \"51.143.0.0/17\",\r\n \"51.143.128.0/18\",\r\n \"\ - 51.143.192.0/21\",\r\n \"51.143.200.0/28\",\r\n \"51.143.201.0/24\"\ - ,\r\n \"51.143.208.0/20\",\r\n \"51.143.224.0/19\",\r\n\ - \ \"51.144.0.0/16\",\r\n \"51.145.0.0/17\",\r\n \ - \ \"51.145.128.0/17\",\r\n \"52.96.11.0/24\",\r\n \"52.101.0.0/22\"\ - ,\r\n \"52.101.4.0/22\",\r\n \"52.101.8.0/24\",\r\n \ - \ \"52.101.9.0/24\",\r\n \"52.101.10.0/24\",\r\n \"\ - 52.101.11.0/24\",\r\n \"52.101.12.0/22\",\r\n \"52.101.16.0/22\"\ - ,\r\n \"52.101.20.0/22\",\r\n \"52.101.24.0/22\",\r\n \ - \ \"52.101.28.0/22\",\r\n \"52.101.32.0/22\",\r\n \ - \ \"52.101.36.0/22\",\r\n \"52.101.40.0/24\",\r\n \"52.101.41.0/24\"\ - ,\r\n \"52.101.42.0/24\",\r\n \"52.101.43.0/24\",\r\n \ - \ \"52.101.44.0/23\",\r\n \"52.101.46.0/23\",\r\n \ - \ \"52.101.48.0/23\",\r\n \"52.101.50.0/24\",\r\n \"52.101.51.0/24\"\ - ,\r\n \"52.101.52.0/22\",\r\n \"52.101.56.0/22\",\r\n \ - \ \"52.101.60.0/24\",\r\n \"52.101.61.0/24\",\r\n \ - \ \"52.101.62.0/23\",\r\n \"52.101.64.0/24\",\r\n \"52.101.65.0/24\"\ - ,\r\n \"52.101.66.0/23\",\r\n \"52.101.68.0/24\",\r\n \ - \ \"52.101.69.0/24\",\r\n \"52.101.70.0/23\",\r\n \ - \ \"52.101.72.0/23\",\r\n \"52.101.74.0/24\",\r\n \"52.101.75.0/24\"\ - ,\r\n \"52.101.76.0/22\",\r\n \"52.101.80.0/22\",\r\n \ - \ \"52.101.128.0/22\",\r\n \"52.101.132.0/24\",\r\n \ - \ \"52.101.133.0/24\",\r\n \"52.101.134.0/23\",\r\n \"\ - 52.101.136.0/23\",\r\n \"52.102.128.0/24\",\r\n \"52.102.129.0/24\"\ - ,\r\n \"52.102.130.0/24\",\r\n \"52.102.131.0/24\",\r\n\ - \ \"52.102.132.0/24\",\r\n \"52.102.133.0/24\",\r\n \ - \ \"52.102.134.0/24\",\r\n \"52.102.135.0/24\",\r\n \ - \ \"52.102.136.0/24\",\r\n \"52.102.137.0/24\",\r\n \"\ - 52.102.138.0/24\",\r\n \"52.102.139.0/24\",\r\n \"52.102.140.0/24\"\ - ,\r\n \"52.102.141.0/24\",\r\n \"52.102.142.0/24\",\r\n\ - \ \"52.102.143.0/24\",\r\n \"52.102.158.0/24\",\r\n \ - \ \"52.102.159.0/24\",\r\n \"52.102.160.0/24\",\r\n \ - \ \"52.102.161.0/24\",\r\n \"52.102.162.0/24\",\r\n \"\ - 52.102.163.0/24\",\r\n \"52.102.192.0/24\",\r\n \"52.102.193.0/24\"\ - ,\r\n \"52.103.0.0/24\",\r\n \"52.103.1.0/24\",\r\n \ - \ \"52.103.2.0/24\",\r\n \"52.103.3.0/24\",\r\n \"\ - 52.103.4.0/24\",\r\n \"52.103.5.0/24\",\r\n \"52.103.6.0/24\"\ - ,\r\n \"52.103.7.0/24\",\r\n \"52.103.8.0/24\",\r\n \ - \ \"52.103.9.0/24\",\r\n \"52.103.10.0/24\",\r\n \"\ - 52.103.11.0/24\",\r\n \"52.103.12.0/24\",\r\n \"52.103.13.0/24\"\ - ,\r\n \"52.103.14.0/24\",\r\n \"52.103.15.0/24\",\r\n \ - \ \"52.103.16.0/24\",\r\n \"52.103.17.0/24\",\r\n \ - \ \"52.103.32.0/24\",\r\n \"52.103.33.0/24\",\r\n \"52.103.34.0/24\"\ - ,\r\n \"52.103.35.0/24\",\r\n \"52.103.64.0/24\",\r\n \ - \ \"52.103.65.0/24\",\r\n \"52.103.128.0/24\",\r\n \ - \ \"52.103.129.0/24\",\r\n \"52.103.130.0/24\",\r\n \"\ - 52.103.131.0/24\",\r\n \"52.103.132.0/24\",\r\n \"52.103.133.0/24\"\ - ,\r\n \"52.103.134.0/24\",\r\n \"52.103.136.0/24\",\r\n\ - \ \"52.103.137.0/24\",\r\n \"52.103.138.0/24\",\r\n \ - \ \"52.103.139.0/24\",\r\n \"52.103.140.0/24\",\r\n \ - \ \"52.103.141.0/24\",\r\n \"52.103.142.0/24\",\r\n \"\ - 52.103.143.0/24\",\r\n \"52.103.160.0/24\",\r\n \"52.103.161.0/24\"\ - ,\r\n \"52.103.162.0/24\",\r\n \"52.103.163.0/24\",\r\n\ - \ \"52.103.192.0/24\",\r\n \"52.103.193.0/24\",\r\n \ - \ \"52.108.0.0/21\",\r\n \"52.108.16.0/21\",\r\n \"\ - 52.108.24.0/21\",\r\n \"52.108.32.0/22\",\r\n \"52.108.36.0/22\"\ - ,\r\n \"52.108.40.0/23\",\r\n \"52.108.42.0/23\",\r\n \ - \ \"52.108.44.0/23\",\r\n \"52.108.46.0/23\",\r\n \ - \ \"52.108.48.0/23\",\r\n \"52.108.50.0/23\",\r\n \"52.108.52.0/23\"\ - ,\r\n \"52.108.54.0/23\",\r\n \"52.108.56.0/21\",\r\n \ - \ \"52.108.68.0/23\",\r\n \"52.108.70.0/23\",\r\n \ - \ \"52.108.72.0/24\",\r\n \"52.108.73.0/24\",\r\n \"52.108.74.0/24\"\ - ,\r\n \"52.108.75.0/24\",\r\n \"52.108.76.0/24\",\r\n \ - \ \"52.108.77.0/24\",\r\n \"52.108.78.0/24\",\r\n \ - \ \"52.108.79.0/24\",\r\n \"52.108.80.0/24\",\r\n \"52.108.81.0/24\"\ - ,\r\n \"52.108.82.0/24\",\r\n \"52.108.83.0/24\",\r\n \ - \ \"52.108.84.0/24\",\r\n \"52.108.85.0/24\",\r\n \ - \ \"52.108.86.0/24\",\r\n \"52.108.87.0/24\",\r\n \"52.108.88.0/24\"\ - ,\r\n \"52.108.89.0/24\",\r\n \"52.108.90.0/24\",\r\n \ - \ \"52.108.91.0/24\",\r\n \"52.108.92.0/24\",\r\n \ - \ \"52.108.93.0/24\",\r\n \"52.108.94.0/24\",\r\n \"52.108.95.0/24\"\ - ,\r\n \"52.108.96.0/24\",\r\n \"52.108.97.0/24\",\r\n \ - \ \"52.108.98.0/24\",\r\n \"52.108.99.0/24\",\r\n \ - \ \"52.108.100.0/23\",\r\n \"52.108.102.0/23\",\r\n \"\ - 52.108.104.0/24\",\r\n \"52.108.105.0/24\",\r\n \"52.108.106.0/23\"\ - ,\r\n \"52.108.108.0/23\",\r\n \"52.108.110.0/24\",\r\n\ - \ \"52.108.111.0/24\",\r\n \"52.108.112.0/24\",\r\n \ - \ \"52.108.113.0/24\",\r\n \"52.108.115.0/24\",\r\n \ - \ \"52.108.116.0/24\",\r\n \"52.108.117.0/24\",\r\n \"\ - 52.108.118.0/24\",\r\n \"52.108.121.0/24\",\r\n \"52.108.122.0/24\"\ - ,\r\n \"52.108.123.0/24\",\r\n \"52.108.124.0/24\",\r\n\ - \ \"52.108.125.0/24\",\r\n \"52.108.126.0/24\",\r\n \ - \ \"52.108.127.0/24\",\r\n \"52.108.128.0/24\",\r\n \ - \ \"52.108.129.0/24\",\r\n \"52.108.130.0/24\",\r\n \"\ - 52.108.132.0/24\",\r\n \"52.108.133.0/24\",\r\n \"52.108.134.0/24\"\ - ,\r\n \"52.108.135.0/24\",\r\n \"52.108.136.0/24\",\r\n\ - \ \"52.108.137.0/24\",\r\n \"52.108.138.0/24\",\r\n \ - \ \"52.108.139.0/24\",\r\n \"52.108.165.0/24\",\r\n \ - \ \"52.108.166.0/23\",\r\n \"52.108.168.0/23\",\r\n \"\ - 52.108.170.0/24\",\r\n \"52.108.171.0/24\",\r\n \"52.108.172.0/23\"\ - ,\r\n \"52.108.174.0/23\",\r\n \"52.108.176.0/24\",\r\n\ - \ \"52.108.177.0/24\",\r\n \"52.108.178.0/24\",\r\n \ - \ \"52.108.179.0/24\",\r\n \"52.108.180.0/24\",\r\n \ - \ \"52.108.181.0/24\",\r\n \"52.108.182.0/24\",\r\n \"\ - 52.108.183.0/24\",\r\n \"52.108.184.0/24\",\r\n \"52.108.185.0/24\"\ - ,\r\n \"52.108.186.0/24\",\r\n \"52.108.187.0/24\",\r\n\ - \ \"52.108.188.0/24\",\r\n \"52.108.189.0/24\",\r\n \ - \ \"52.108.190.0/24\",\r\n \"52.108.191.0/24\",\r\n \ - \ \"52.108.192.0/24\",\r\n \"52.108.193.0/24\",\r\n \"\ - 52.108.194.0/24\",\r\n \"52.108.195.0/24\",\r\n \"52.108.196.0/24\"\ - ,\r\n \"52.108.197.0/24\",\r\n \"52.108.198.0/24\",\r\n\ - \ \"52.108.199.0/24\",\r\n \"52.108.200.0/24\",\r\n \ - \ \"52.108.201.0/24\",\r\n \"52.108.202.0/24\",\r\n \ - \ \"52.108.203.0/24\",\r\n \"52.108.204.0/23\",\r\n \"\ - 52.108.206.0/23\",\r\n \"52.108.208.0/21\",\r\n \"52.108.216.0/22\"\ - ,\r\n \"52.108.220.0/23\",\r\n \"52.108.222.0/23\",\r\n\ - \ \"52.108.224.0/23\",\r\n \"52.108.226.0/23\",\r\n \ - \ \"52.108.228.0/23\",\r\n \"52.108.230.0/23\",\r\n \ - \ \"52.108.232.0/23\",\r\n \"52.108.234.0/23\",\r\n \"\ - 52.108.236.0/22\",\r\n \"52.108.240.0/21\",\r\n \"52.108.248.0/21\"\ - ,\r\n \"52.109.0.0/22\",\r\n \"52.109.4.0/22\",\r\n \ - \ \"52.109.8.0/22\",\r\n \"52.109.12.0/22\",\r\n \"\ - 52.109.16.0/22\",\r\n \"52.109.20.0/22\",\r\n \"52.109.24.0/22\"\ - ,\r\n \"52.109.28.0/22\",\r\n \"52.109.32.0/22\",\r\n \ - \ \"52.109.36.0/22\",\r\n \"52.109.40.0/22\",\r\n \ - \ \"52.109.44.0/22\",\r\n \"52.109.48.0/22\",\r\n \"52.109.52.0/22\"\ - ,\r\n \"52.109.56.0/22\",\r\n \"52.109.60.0/22\",\r\n \ - \ \"52.109.64.0/22\",\r\n \"52.109.68.0/22\",\r\n \ - \ \"52.109.72.0/22\",\r\n \"52.109.76.0/22\",\r\n \"52.109.80.0/23\"\ - ,\r\n \"52.109.82.0/23\",\r\n \"52.109.84.0/23\",\r\n \ - \ \"52.109.86.0/23\",\r\n \"52.109.88.0/22\",\r\n \ - \ \"52.109.92.0/22\",\r\n \"52.109.96.0/22\",\r\n \"52.109.100.0/23\"\ - ,\r\n \"52.109.102.0/23\",\r\n \"52.109.104.0/23\",\r\n\ - \ \"52.109.106.0/23\",\r\n \"52.109.108.0/22\",\r\n \ - \ \"52.109.112.0/22\",\r\n \"52.109.116.0/22\",\r\n \ - \ \"52.109.120.0/22\",\r\n \"52.109.124.0/22\",\r\n \"\ - 52.109.128.0/22\",\r\n \"52.109.132.0/22\",\r\n \"52.109.136.0/22\"\ - ,\r\n \"52.109.140.0/22\",\r\n \"52.109.144.0/23\",\r\n\ - \ \"52.109.146.0/23\",\r\n \"52.109.148.0/23\",\r\n \ - \ \"52.109.150.0/23\",\r\n \"52.109.152.0/23\",\r\n \ - \ \"52.109.154.0/23\",\r\n \"52.109.156.0/23\",\r\n \"\ - 52.109.158.0/23\",\r\n \"52.109.160.0/23\",\r\n \"52.109.162.0/23\"\ - ,\r\n \"52.109.164.0/24\",\r\n \"52.109.165.0/24\",\r\n\ - \ \"52.111.192.0/24\",\r\n \"52.111.193.0/24\",\r\n \ - \ \"52.111.194.0/24\",\r\n \"52.111.195.0/24\",\r\n \ - \ \"52.111.196.0/24\",\r\n \"52.111.197.0/24\",\r\n \"\ - 52.111.198.0/24\",\r\n \"52.111.199.0/24\",\r\n \"52.111.200.0/24\"\ - ,\r\n \"52.111.201.0/24\",\r\n \"52.111.202.0/24\",\r\n\ - \ \"52.111.203.0/24\",\r\n \"52.111.204.0/24\",\r\n \ - \ \"52.111.205.0/24\",\r\n \"52.111.206.0/24\",\r\n \ - \ \"52.111.207.0/24\",\r\n \"52.111.208.0/24\",\r\n \"\ - 52.111.224.0/24\",\r\n \"52.111.225.0/24\",\r\n \"52.111.226.0/24\"\ - ,\r\n \"52.111.227.0/24\",\r\n \"52.111.228.0/24\",\r\n\ - \ \"52.111.229.0/24\",\r\n \"52.111.230.0/24\",\r\n \ - \ \"52.111.231.0/24\",\r\n \"52.111.232.0/24\",\r\n \ - \ \"52.111.233.0/24\",\r\n \"52.111.234.0/24\",\r\n \"\ - 52.111.235.0/24\",\r\n \"52.111.236.0/24\",\r\n \"52.111.237.0/24\"\ - ,\r\n \"52.111.238.0/24\",\r\n \"52.111.239.0/24\",\r\n\ - \ \"52.111.240.0/24\",\r\n \"52.111.241.0/24\",\r\n \ - \ \"52.111.242.0/24\",\r\n \"52.111.243.0/24\",\r\n \ - \ \"52.111.244.0/24\",\r\n \"52.111.245.0/24\",\r\n \"\ - 52.111.246.0/24\",\r\n \"52.111.247.0/24\",\r\n \"52.111.248.0/24\"\ - ,\r\n \"52.111.249.0/24\",\r\n \"52.111.250.0/24\",\r\n\ - \ \"52.111.251.0/24\",\r\n \"52.111.252.0/24\",\r\n \ - \ \"52.111.253.0/24\",\r\n \"52.111.254.0/24\",\r\n \ - \ \"52.111.255.0/24\",\r\n \"52.112.14.0/23\",\r\n \"52.112.17.0/24\"\ - ,\r\n \"52.112.18.0/23\",\r\n \"52.112.24.0/21\",\r\n \ - \ \"52.112.40.0/21\",\r\n \"52.112.48.0/20\",\r\n \ - \ \"52.112.71.0/24\",\r\n \"52.112.76.0/22\",\r\n \"52.112.83.0/24\"\ - ,\r\n \"52.112.88.0/22\",\r\n \"52.112.93.0/24\",\r\n \ - \ \"52.112.94.0/24\",\r\n \"52.112.95.0/24\",\r\n \ - \ \"52.112.97.0/24\",\r\n \"52.112.98.0/23\",\r\n \"52.112.104.0/24\"\ - ,\r\n \"52.112.105.0/24\",\r\n \"52.112.106.0/23\",\r\n\ - \ \"52.112.108.0/24\",\r\n \"52.112.109.0/24\",\r\n \ - \ \"52.112.110.0/23\",\r\n \"52.112.112.0/24\",\r\n \ - \ \"52.112.113.0/24\",\r\n \"52.112.114.0/24\",\r\n \"\ - 52.112.115.0/24\",\r\n \"52.112.116.0/24\",\r\n \"52.112.117.0/24\"\ - ,\r\n \"52.112.118.0/24\",\r\n \"52.112.119.0/24\",\r\n\ - \ \"52.112.120.0/24\",\r\n \"52.112.121.0/24\",\r\n \ - \ \"52.112.122.0/24\",\r\n \"52.112.144.0/20\",\r\n \ - \ \"52.112.168.0/22\",\r\n \"52.112.172.0/22\",\r\n \"\ - 52.112.176.0/21\",\r\n \"52.112.184.0/22\",\r\n \"52.112.190.0/24\"\ - ,\r\n \"52.112.191.0/24\",\r\n \"52.112.197.0/24\",\r\n\ - \ \"52.112.200.0/22\",\r\n \"52.112.204.0/23\",\r\n \ - \ \"52.112.206.0/24\",\r\n \"52.112.207.0/24\",\r\n \ - \ \"52.112.212.0/24\",\r\n \"52.112.213.0/24\",\r\n \"\ - 52.112.214.0/23\",\r\n \"52.112.216.0/21\",\r\n \"52.112.229.0/24\"\ - ,\r\n \"52.112.230.0/24\",\r\n \"52.112.231.0/24\",\r\n\ - \ \"52.112.232.0/24\",\r\n \"52.112.233.0/24\",\r\n \ - \ \"52.112.236.0/24\",\r\n \"52.112.237.0/24\",\r\n \ - \ \"52.112.238.0/24\",\r\n \"52.112.240.0/20\",\r\n \"\ - 52.113.9.0/24\",\r\n \"52.113.10.0/23\",\r\n \"52.113.13.0/24\"\ - ,\r\n \"52.113.14.0/24\",\r\n \"52.113.15.0/24\",\r\n \ - \ \"52.113.16.0/20\",\r\n \"52.113.37.0/24\",\r\n \ - \ \"52.113.40.0/21\",\r\n \"52.113.48.0/20\",\r\n \"52.113.70.0/23\"\ - ,\r\n \"52.113.72.0/22\",\r\n \"52.113.76.0/23\",\r\n \ - \ \"52.113.78.0/23\",\r\n \"52.113.83.0/24\",\r\n \ - \ \"52.113.87.0/24\",\r\n \"52.113.88.0/22\",\r\n \"52.113.92.0/22\"\ - ,\r\n \"52.113.96.0/22\",\r\n \"52.113.100.0/24\",\r\n \ - \ \"52.113.101.0/24\",\r\n \"52.113.102.0/24\",\r\n \ - \ \"52.113.103.0/24\",\r\n \"52.113.104.0/24\",\r\n \ - \ \"52.113.105.0/24\",\r\n \"52.113.106.0/24\",\r\n \"52.113.107.0/24\"\ - ,\r\n \"52.113.108.0/24\",\r\n \"52.113.109.0/24\",\r\n\ - \ \"52.113.110.0/23\",\r\n \"52.113.112.0/20\",\r\n \ - \ \"52.113.128.0/24\",\r\n \"52.113.129.0/24\",\r\n \ - \ \"52.113.130.0/24\",\r\n \"52.113.131.0/24\",\r\n \"\ - 52.113.132.0/24\",\r\n \"52.113.133.0/24\",\r\n \"52.113.134.0/24\"\ - ,\r\n \"52.113.136.0/21\",\r\n \"52.113.144.0/21\",\r\n\ - \ \"52.113.160.0/19\",\r\n \"52.113.192.0/24\",\r\n \ - \ \"52.113.193.0/24\",\r\n \"52.113.198.0/24\",\r\n \ - \ \"52.113.199.0/24\",\r\n \"52.113.200.0/22\",\r\n \"\ - 52.113.204.0/24\",\r\n \"52.113.205.0/24\",\r\n \"52.113.206.0/24\"\ - ,\r\n \"52.113.207.0/24\",\r\n \"52.113.208.0/20\",\r\n\ - \ \"52.113.224.0/19\",\r\n \"52.114.0.0/21\",\r\n \ - \ \"52.114.8.0/21\",\r\n \"52.114.16.0/22\",\r\n \"52.114.20.0/22\"\ - ,\r\n \"52.114.24.0/22\",\r\n \"52.114.28.0/22\",\r\n \ - \ \"52.114.32.0/22\",\r\n \"52.114.36.0/22\",\r\n \ - \ \"52.114.40.0/22\",\r\n \"52.114.44.0/22\",\r\n \"52.114.48.0/22\"\ - ,\r\n \"52.114.52.0/23\",\r\n \"52.114.54.0/23\",\r\n \ - \ \"52.114.56.0/23\",\r\n \"52.114.58.0/23\",\r\n \ - \ \"52.114.60.0/23\",\r\n \"52.114.64.0/21\",\r\n \"52.114.72.0/22\"\ - ,\r\n \"52.114.76.0/22\",\r\n \"52.114.80.0/22\",\r\n \ - \ \"52.114.84.0/22\",\r\n \"52.114.88.0/22\",\r\n \ - \ \"52.114.92.0/22\",\r\n \"52.114.96.0/21\",\r\n \"52.114.104.0/22\"\ - ,\r\n \"52.114.108.0/22\",\r\n \"52.114.112.0/23\",\r\n\ - \ \"52.114.114.0/23\",\r\n \"52.114.116.0/22\",\r\n \ - \ \"52.114.120.0/22\",\r\n \"52.114.128.0/22\",\r\n \ - \ \"52.114.132.0/22\",\r\n \"52.114.136.0/21\",\r\n \"\ - 52.114.144.0/22\",\r\n \"52.114.148.0/22\",\r\n \"52.114.152.0/21\"\ - ,\r\n \"52.114.160.0/22\",\r\n \"52.114.164.0/22\",\r\n\ - \ \"52.114.168.0/22\",\r\n \"52.114.172.0/22\",\r\n \ - \ \"52.114.176.0/22\",\r\n \"52.114.180.0/22\",\r\n \ - \ \"52.114.184.0/23\",\r\n \"52.114.186.0/23\",\r\n \"\ - 52.114.192.0/23\",\r\n \"52.114.194.0/23\",\r\n \"52.114.196.0/22\"\ - ,\r\n \"52.114.200.0/22\",\r\n \"52.114.216.0/22\",\r\n\ - \ \"52.114.224.0/24\",\r\n \"52.114.226.0/24\",\r\n \ - \ \"52.114.228.0/24\",\r\n \"52.114.230.0/24\",\r\n \ - \ \"52.114.231.0/24\",\r\n \"52.114.232.0/24\",\r\n \"\ - 52.114.233.0/24\",\r\n \"52.114.234.0/24\",\r\n \"52.114.236.0/24\"\ - ,\r\n \"52.114.238.0/24\",\r\n \"52.114.240.0/24\",\r\n\ - \ \"52.114.241.0/24\",\r\n \"52.114.242.0/24\",\r\n \ - \ \"52.114.244.0/24\",\r\n \"52.114.248.0/22\",\r\n \ - \ \"52.114.252.0/22\",\r\n \"52.115.0.0/21\",\r\n \"52.115.8.0/22\"\ - ,\r\n \"52.115.16.0/21\",\r\n \"52.115.24.0/22\",\r\n \ - \ \"52.115.32.0/22\",\r\n \"52.115.36.0/23\",\r\n \ - \ \"52.115.38.0/24\",\r\n \"52.115.39.0/24\",\r\n \"52.115.40.0/22\"\ - ,\r\n \"52.115.44.0/23\",\r\n \"52.115.46.0/24\",\r\n \ - \ \"52.115.47.0/24\",\r\n \"52.115.48.0/22\",\r\n \ - \ \"52.115.52.0/23\",\r\n \"52.115.54.0/24\",\r\n \"52.115.55.0/24\"\ - ,\r\n \"52.115.56.0/22\",\r\n \"52.115.60.0/23\",\r\n \ - \ \"52.115.62.0/23\",\r\n \"52.115.64.0/22\",\r\n \ - \ \"52.115.68.0/22\",\r\n \"52.115.72.0/22\",\r\n \"52.115.76.0/22\"\ - ,\r\n \"52.115.80.0/22\",\r\n \"52.115.84.0/22\",\r\n \ - \ \"52.115.88.0/22\",\r\n \"52.115.92.0/24\",\r\n \ - \ \"52.115.93.0/24\",\r\n \"52.115.96.0/24\",\r\n \"52.115.97.0/24\"\ - ,\r\n \"52.115.98.0/24\",\r\n \"52.115.99.0/24\",\r\n \ - \ \"52.115.100.0/22\",\r\n \"52.115.104.0/23\",\r\n \ - \ \"52.115.106.0/23\",\r\n \"52.115.108.0/22\",\r\n \"\ - 52.115.112.0/23\",\r\n \"52.115.128.0/21\",\r\n \"52.115.136.0/22\"\ - ,\r\n \"52.115.140.0/22\",\r\n \"52.115.144.0/20\",\r\n\ - \ \"52.115.160.0/19\",\r\n \"52.115.192.0/19\",\r\n \ - \ \"52.120.0.0/19\",\r\n \"52.120.32.0/19\",\r\n \"\ - 52.120.64.0/19\",\r\n \"52.120.96.0/19\",\r\n \"52.120.128.0/21\"\ - ,\r\n \"52.120.136.0/21\",\r\n \"52.120.144.0/21\",\r\n\ - \ \"52.120.152.0/22\",\r\n \"52.120.156.0/24\",\r\n \ - \ \"52.120.157.0/24\",\r\n \"52.120.158.0/23\",\r\n \ - \ \"52.120.160.0/19\",\r\n \"52.120.192.0/20\",\r\n \"\ - 52.120.208.0/20\",\r\n \"52.120.224.0/20\",\r\n \"52.120.240.0/20\"\ - ,\r\n \"52.121.0.0/21\",\r\n \"52.121.16.0/21\",\r\n \ - \ \"52.121.24.0/21\",\r\n \"52.121.32.0/22\",\r\n \ - \ \"52.121.36.0/22\",\r\n \"52.121.40.0/21\",\r\n \"52.121.48.0/20\"\ - ,\r\n \"52.121.64.0/20\",\r\n \"52.121.80.0/22\",\r\n \ - \ \"52.121.84.0/23\",\r\n \"52.121.86.0/23\",\r\n \ - \ \"52.121.88.0/21\",\r\n \"52.121.96.0/22\",\r\n \"52.121.100.0/22\"\ - ,\r\n \"52.121.104.0/23\",\r\n \"52.121.106.0/23\",\r\n\ - \ \"52.121.108.0/22\",\r\n \"52.121.112.0/22\",\r\n \ - \ \"52.121.116.0/22\",\r\n \"52.121.120.0/23\",\r\n \ - \ \"52.121.122.0/23\",\r\n \"52.121.124.0/22\",\r\n \"\ - 52.121.128.0/20\",\r\n \"52.121.144.0/21\",\r\n \"52.121.152.0/21\"\ - ,\r\n \"52.121.160.0/22\",\r\n \"52.121.164.0/24\",\r\n\ - \ \"52.121.165.0/24\",\r\n \"52.121.168.0/22\",\r\n \ - \ \"52.121.172.0/22\",\r\n \"52.121.176.0/23\",\r\n \ - \ \"52.121.178.0/23\",\r\n \"52.121.180.0/23\",\r\n \"\ - 52.123.0.0/24\",\r\n \"52.123.1.0/24\",\r\n \"52.123.2.0/24\"\ - ,\r\n \"52.123.3.0/24\",\r\n \"52.123.4.0/24\",\r\n \ - \ \"52.123.5.0/24\",\r\n \"52.125.128.0/22\",\r\n \"\ - 52.125.132.0/22\",\r\n \"52.125.136.0/24\",\r\n \"52.125.137.0/24\"\ - ,\r\n \"52.125.138.0/23\",\r\n \"52.125.140.0/23\",\r\n\ - \ \"52.136.0.0/22\",\r\n \"52.136.4.0/22\",\r\n \ - \ \"52.136.8.0/21\",\r\n \"52.136.16.0/24\",\r\n \"52.136.17.0/24\"\ - ,\r\n \"52.136.18.0/24\",\r\n \"52.136.19.0/24\",\r\n \ - \ \"52.136.20.0/24\",\r\n \"52.136.21.0/24\",\r\n \ - \ \"52.136.22.0/24\",\r\n \"52.136.23.0/24\",\r\n \"52.136.24.0/24\"\ - ,\r\n \"52.136.25.0/24\",\r\n \"52.136.26.0/24\",\r\n \ - \ \"52.136.27.0/24\",\r\n \"52.136.28.0/24\",\r\n \ - \ \"52.136.29.0/24\",\r\n \"52.136.30.0/24\",\r\n \"52.136.31.0/24\"\ - ,\r\n \"52.136.32.0/19\",\r\n \"52.136.64.0/18\",\r\n \ - \ \"52.136.128.0/18\",\r\n \"52.136.192.0/18\",\r\n \ - \ \"52.137.0.0/18\",\r\n \"52.137.64.0/18\",\r\n \"52.137.128.0/17\"\ - ,\r\n \"52.138.0.0/18\",\r\n \"52.138.64.0/20\",\r\n \ - \ \"52.138.80.0/21\",\r\n \"52.138.88.0/21\",\r\n \ - \ \"52.138.96.0/19\",\r\n \"52.138.128.0/17\",\r\n \"52.139.0.0/18\"\ - ,\r\n \"52.139.64.0/18\",\r\n \"52.139.128.0/18\",\r\n \ - \ \"52.139.192.0/18\",\r\n \"52.140.0.0/18\",\r\n \ - \ \"52.140.64.0/18\",\r\n \"52.140.128.0/18\",\r\n \"\ - 52.140.192.0/18\",\r\n \"52.141.0.0/18\",\r\n \"52.141.64.0/18\"\ - ,\r\n \"52.141.128.0/18\",\r\n \"52.141.192.0/19\",\r\n\ - \ \"52.141.224.0/20\",\r\n \"52.141.240.0/20\",\r\n \ - \ \"52.142.0.0/18\",\r\n \"52.142.64.0/18\",\r\n \"\ - 52.142.128.0/18\",\r\n \"52.142.192.0/18\",\r\n \"52.143.0.0/18\"\ - ,\r\n \"52.143.64.0/18\",\r\n \"52.143.128.0/18\",\r\n \ - \ \"52.143.192.0/24\",\r\n \"52.143.193.0/24\",\r\n \ - \ \"52.143.194.0/24\",\r\n \"52.143.195.0/24\",\r\n \ - \ \"52.143.196.0/24\",\r\n \"52.143.197.0/24\",\r\n \"52.143.198.0/24\"\ - ,\r\n \"52.143.199.0/24\",\r\n \"52.143.200.0/23\",\r\n\ - \ \"52.143.202.0/24\",\r\n \"52.143.203.0/24\",\r\n \ - \ \"52.143.204.0/23\",\r\n \"52.143.206.0/24\",\r\n \ - \ \"52.143.207.0/24\",\r\n \"52.143.208.0/24\",\r\n \"\ - 52.143.209.0/24\",\r\n \"52.143.210.0/24\",\r\n \"52.143.211.0/24\"\ - ,\r\n \"52.143.212.0/23\",\r\n \"52.143.214.0/24\",\r\n\ - \ \"52.143.215.0/24\",\r\n \"52.143.216.0/23\",\r\n \ - \ \"52.143.218.0/24\",\r\n \"52.143.219.0/24\",\r\n \ - \ \"52.143.220.0/24\",\r\n \"52.143.221.0/24\",\r\n \"\ - 52.143.222.0/23\",\r\n \"52.143.224.0/19\",\r\n \"52.146.0.0/17\"\ - ,\r\n \"52.146.128.0/17\",\r\n \"52.147.0.0/19\",\r\n \ - \ \"52.147.32.0/19\",\r\n \"52.147.64.0/19\",\r\n \ - \ \"52.147.96.0/19\",\r\n \"52.147.128.0/19\",\r\n \"52.147.160.0/19\"\ - ,\r\n \"52.147.192.0/18\",\r\n \"52.148.0.0/18\",\r\n \ - \ \"52.148.64.0/18\",\r\n \"52.148.128.0/18\",\r\n \ - \ \"52.148.192.0/18\",\r\n \"52.149.0.0/18\",\r\n \"52.149.64.0/18\"\ - ,\r\n \"52.149.128.0/17\",\r\n \"52.150.0.0/17\",\r\n \ - \ \"52.150.128.0/17\",\r\n \"52.151.0.0/18\",\r\n \ - \ \"52.151.64.0/18\",\r\n \"52.151.128.0/17\",\r\n \"52.152.0.0/17\"\ - ,\r\n \"52.152.128.0/17\",\r\n \"52.153.0.0/18\",\r\n \ - \ \"52.153.64.0/18\",\r\n \"52.153.128.0/18\",\r\n \ - \ \"52.153.192.0/18\",\r\n \"52.154.0.0/18\",\r\n \"52.154.64.0/18\"\ - ,\r\n \"52.154.128.0/17\",\r\n \"52.155.0.0/19\",\r\n \ - \ \"52.155.32.0/19\",\r\n \"52.155.64.0/19\",\r\n \ - \ \"52.155.96.0/19\",\r\n \"52.155.128.0/17\",\r\n \"52.156.0.0/19\"\ - ,\r\n \"52.156.32.0/19\",\r\n \"52.156.64.0/18\",\r\n \ - \ \"52.156.128.0/19\",\r\n \"52.156.160.0/19\",\r\n \ - \ \"52.156.192.0/18\",\r\n \"52.157.0.0/18\",\r\n \"\ - 52.157.64.0/18\",\r\n \"52.157.128.0/17\",\r\n \"52.158.0.0/17\"\ - ,\r\n \"52.158.128.0/19\",\r\n \"52.158.160.0/20\",\r\n\ - \ \"52.158.176.0/20\",\r\n \"52.158.192.0/19\",\r\n \ - \ \"52.158.224.0/19\",\r\n \"52.159.0.0/18\",\r\n \"\ - 52.159.64.0/18\",\r\n \"52.159.128.0/17\",\r\n \"52.160.0.0/16\"\ - ,\r\n \"52.161.0.0/16\",\r\n \"52.162.0.0/16\",\r\n \ - \ \"52.163.0.0/16\",\r\n \"52.164.0.0/16\",\r\n \"\ - 52.165.0.0/19\",\r\n \"52.165.32.0/20\",\r\n \"52.165.48.0/28\"\ - ,\r\n \"52.165.49.0/24\",\r\n \"52.165.56.0/21\",\r\n \ - \ \"52.165.64.0/19\",\r\n \"52.165.96.0/21\",\r\n \ - \ \"52.165.104.0/25\",\r\n \"52.165.104.128/26\",\r\n \"\ - 52.165.128.0/17\",\r\n \"52.166.0.0/16\",\r\n \"52.167.0.0/16\"\ - ,\r\n \"52.168.0.0/16\",\r\n \"52.169.0.0/16\",\r\n \ - \ \"52.170.0.0/16\",\r\n \"52.171.0.0/16\",\r\n \"\ - 52.172.0.0/17\",\r\n \"52.172.128.0/17\",\r\n \"52.173.0.0/16\"\ - ,\r\n \"52.174.0.0/16\",\r\n \"52.175.0.0/17\",\r\n \ - \ \"52.175.128.0/18\",\r\n \"52.175.192.0/18\",\r\n \ - \ \"52.176.0.0/17\",\r\n \"52.176.128.0/19\",\r\n \"52.176.160.0/21\"\ - ,\r\n \"52.176.176.0/20\",\r\n \"52.176.192.0/19\",\r\n\ - \ \"52.176.224.0/24\",\r\n \"52.176.225.0/24\",\r\n \ - \ \"52.176.232.0/21\",\r\n \"52.176.240.0/20\",\r\n \ - \ \"52.177.0.0/16\",\r\n \"52.178.0.0/17\",\r\n \"52.178.128.0/17\"\ - ,\r\n \"52.179.0.0/17\",\r\n \"52.179.128.0/17\",\r\n \ - \ \"52.180.0.0/17\",\r\n \"52.180.128.0/19\",\r\n \ - \ \"52.180.160.0/20\",\r\n \"52.180.176.0/21\",\r\n \"\ - 52.180.184.0/27\",\r\n \"52.180.184.32/28\",\r\n \"52.180.185.0/24\"\ - ,\r\n \"52.182.128.0/17\",\r\n \"52.183.0.0/17\",\r\n \ - \ \"52.183.128.0/18\",\r\n \"52.183.192.0/18\",\r\n \ - \ \"52.184.0.0/17\",\r\n \"52.184.128.0/19\",\r\n \"\ - 52.184.160.0/21\",\r\n \"52.184.168.0/28\",\r\n \"52.184.168.16/28\"\ - ,\r\n \"52.184.168.32/28\",\r\n \"52.184.168.80/28\",\r\n\ - \ \"52.184.168.96/27\",\r\n \"52.184.168.128/28\",\r\n \ - \ \"52.184.169.0/24\",\r\n \"52.184.170.0/24\",\r\n \ - \ \"52.184.176.0/20\",\r\n \"52.184.192.0/18\",\r\n \ - \ \"52.185.0.0/19\",\r\n \"52.185.32.0/20\",\r\n \"52.185.48.0/21\"\ - ,\r\n \"52.185.56.0/26\",\r\n \"52.185.56.64/27\",\r\n \ - \ \"52.185.56.96/28\",\r\n \"52.185.56.112/28\",\r\n \ - \ \"52.185.56.128/27\",\r\n \"52.185.56.160/28\",\r\n \ - \ \"52.185.64.0/19\",\r\n \"52.185.96.0/20\",\r\n \"\ - 52.185.112.0/26\",\r\n \"52.185.112.64/27\",\r\n \"52.185.112.96/27\"\ - ,\r\n \"52.185.120.0/21\",\r\n \"52.185.128.0/18\",\r\n\ - \ \"52.185.192.0/18\",\r\n \"52.186.0.0/16\",\r\n \ - \ \"52.187.0.0/17\",\r\n \"52.187.128.0/18\",\r\n \"\ - 52.187.192.0/18\",\r\n \"52.188.0.0/16\",\r\n \"52.189.0.0/17\"\ - ,\r\n \"52.189.128.0/18\",\r\n \"52.189.192.0/18\",\r\n\ - \ \"52.190.0.0/17\",\r\n \"52.190.128.0/17\",\r\n \ - \ \"52.191.0.0/17\",\r\n \"52.191.128.0/18\",\r\n \"\ - 52.191.192.0/18\",\r\n \"52.224.0.0/16\",\r\n \"52.225.0.0/17\"\ - ,\r\n \"52.225.128.0/21\",\r\n \"52.225.136.0/27\",\r\n\ - \ \"52.225.136.32/28\",\r\n \"52.225.136.48/28\",\r\n \ - \ \"52.225.136.64/28\",\r\n \"52.225.137.0/24\",\r\n \ - \ \"52.225.144.0/20\",\r\n \"52.225.160.0/19\",\r\n \ - \ \"52.225.192.0/18\",\r\n \"52.226.0.0/16\",\r\n \"52.228.0.0/17\"\ - ,\r\n \"52.228.128.0/17\",\r\n \"52.229.0.0/18\",\r\n \ - \ \"52.229.64.0/18\",\r\n \"52.229.128.0/17\",\r\n \ - \ \"52.230.0.0/17\",\r\n \"52.230.128.0/17\",\r\n \"52.231.0.0/17\"\ - ,\r\n \"52.231.128.0/17\",\r\n \"52.232.0.0/17\",\r\n \ - \ \"52.232.128.0/21\",\r\n \"52.232.136.0/21\",\r\n \ - \ \"52.232.144.0/24\",\r\n \"52.232.145.0/24\",\r\n \"\ - 52.232.146.0/24\",\r\n \"52.232.147.0/24\",\r\n \"52.232.148.0/24\"\ - ,\r\n \"52.232.149.0/24\",\r\n \"52.232.150.0/24\",\r\n\ - \ \"52.232.151.0/24\",\r\n \"52.232.152.0/24\",\r\n \ - \ \"52.232.153.0/24\",\r\n \"52.232.154.0/24\",\r\n \ - \ \"52.232.155.0/24\",\r\n \"52.232.156.0/24\",\r\n \"\ - 52.232.157.0/24\",\r\n \"52.232.158.0/24\",\r\n \"52.232.159.0/24\"\ - ,\r\n \"52.232.160.0/19\",\r\n \"52.232.192.0/18\",\r\n\ - \ \"52.233.0.0/18\",\r\n \"52.233.64.0/18\",\r\n \ - \ \"52.233.128.0/17\",\r\n \"52.234.0.0/17\",\r\n \"52.234.128.0/17\"\ - ,\r\n \"52.235.0.0/18\",\r\n \"52.235.64.0/18\",\r\n \ - \ \"52.236.0.0/17\",\r\n \"52.236.128.0/17\",\r\n \ - \ \"52.237.0.0/18\",\r\n \"52.237.64.0/18\",\r\n \"52.237.128.0/18\"\ - ,\r\n \"52.237.192.0/18\",\r\n \"52.238.0.0/18\",\r\n \ - \ \"52.238.192.0/18\",\r\n \"52.239.0.0/17\",\r\n \ - \ \"52.239.128.0/24\",\r\n \"52.239.129.0/24\",\r\n \"\ - 52.239.130.0/23\",\r\n \"52.239.132.0/23\",\r\n \"52.239.134.0/24\"\ - ,\r\n \"52.239.135.0/26\",\r\n \"52.239.135.64/26\",\r\n\ - \ \"52.239.135.128/26\",\r\n \"52.239.135.192/26\",\r\n\ - \ \"52.239.136.0/22\",\r\n \"52.239.140.0/22\",\r\n \ - \ \"52.239.144.0/23\",\r\n \"52.239.146.0/23\",\r\n \ - \ \"52.239.148.0/27\",\r\n \"52.239.148.64/26\",\r\n \"\ - 52.239.148.128/25\",\r\n \"52.239.149.0/24\",\r\n \"52.239.150.0/23\"\ - ,\r\n \"52.239.152.0/22\",\r\n \"52.239.156.0/24\",\r\n\ - \ \"52.239.157.0/25\",\r\n \"52.239.157.128/26\",\r\n \ - \ \"52.239.157.192/27\",\r\n \"52.239.157.224/27\",\r\n \ - \ \"52.239.158.0/23\",\r\n \"52.239.160.0/22\",\r\n \ - \ \"52.239.164.0/25\",\r\n \"52.239.164.128/26\",\r\n \ - \ \"52.239.164.192/26\",\r\n \"52.239.165.0/26\",\r\n \"\ - 52.239.165.160/27\",\r\n \"52.239.165.192/26\",\r\n \"52.239.167.0/24\"\ - ,\r\n \"52.239.168.0/22\",\r\n \"52.239.172.0/22\",\r\n\ - \ \"52.239.176.128/25\",\r\n \"52.239.177.0/27\",\r\n \ - \ \"52.239.177.32/27\",\r\n \"52.239.177.64/26\",\r\n \ - \ \"52.239.177.128/25\",\r\n \"52.239.178.0/23\",\r\n \ - \ \"52.239.180.0/22\",\r\n \"52.239.184.0/25\",\r\n \"\ - 52.239.184.160/28\",\r\n \"52.239.184.176/28\",\r\n \"52.239.184.192/27\"\ - ,\r\n \"52.239.184.224/27\",\r\n \"52.239.185.0/28\",\r\n\ - \ \"52.239.185.32/27\",\r\n \"52.239.186.0/24\",\r\n \ - \ \"52.239.187.0/25\",\r\n \"52.239.187.128/25\",\r\n \ - \ \"52.239.188.0/24\",\r\n \"52.239.189.0/24\",\r\n \ - \ \"52.239.190.0/25\",\r\n \"52.239.190.128/26\",\r\n \"\ - 52.239.190.192/26\",\r\n \"52.239.192.0/26\",\r\n \"52.239.192.64/28\"\ - ,\r\n \"52.239.192.96/27\",\r\n \"52.239.192.128/27\",\r\ - \n \"52.239.192.160/27\",\r\n \"52.239.192.192/26\",\r\n\ - \ \"52.239.193.0/24\",\r\n \"52.239.194.0/24\",\r\n \ - \ \"52.239.195.0/24\",\r\n \"52.239.196.0/24\",\r\n \ - \ \"52.239.197.0/24\",\r\n \"52.239.198.0/25\",\r\n \"\ - 52.239.198.128/27\",\r\n \"52.239.198.192/26\",\r\n \"52.239.199.0/24\"\ - ,\r\n \"52.239.200.0/23\",\r\n \"52.239.202.0/24\",\r\n\ - \ \"52.239.203.0/24\",\r\n \"52.239.205.0/24\",\r\n \ - \ \"52.239.206.0/24\",\r\n \"52.239.207.32/28\",\r\n \ - \ \"52.239.207.64/26\",\r\n \"52.239.207.128/27\",\r\n \ - \ \"52.239.207.192/26\",\r\n \"52.239.208.0/23\",\r\n \"\ - 52.239.210.0/23\",\r\n \"52.239.212.0/23\",\r\n \"52.239.214.0/23\"\ - ,\r\n \"52.239.216.0/23\",\r\n \"52.239.218.0/23\",\r\n\ - \ \"52.239.220.0/23\",\r\n \"52.239.222.0/23\",\r\n \ - \ \"52.239.224.0/24\",\r\n \"52.239.225.0/24\",\r\n \ - \ \"52.239.226.0/24\",\r\n \"52.239.227.0/24\",\r\n \"\ - 52.239.228.0/23\",\r\n \"52.239.230.0/24\",\r\n \"52.239.231.0/24\"\ - ,\r\n \"52.239.232.0/25\",\r\n \"52.239.232.128/25\",\r\n\ - \ \"52.239.233.0/25\",\r\n \"52.239.233.128/25\",\r\n \ - \ \"52.239.234.0/23\",\r\n \"52.239.236.0/23\",\r\n \ - \ \"52.239.238.0/24\",\r\n \"52.239.239.0/24\",\r\n \"\ - 52.239.240.0/24\",\r\n \"52.239.241.0/24\",\r\n \"52.239.242.0/23\"\ - ,\r\n \"52.239.244.0/23\",\r\n \"52.239.246.0/23\",\r\n\ - \ \"52.239.248.0/24\",\r\n \"52.239.249.0/24\",\r\n \ - \ \"52.239.250.0/24\",\r\n \"52.239.251.0/24\",\r\n \ - \ \"52.239.252.0/24\",\r\n \"52.239.253.0/24\",\r\n \"\ - 52.239.254.0/23\",\r\n \"52.240.0.0/17\",\r\n \"52.240.128.0/17\"\ - ,\r\n \"52.241.0.0/16\",\r\n \"52.242.0.0/18\",\r\n \ - \ \"52.242.64.0/18\",\r\n \"52.242.128.0/17\",\r\n \ - \ \"52.243.32.0/19\",\r\n \"52.243.64.0/18\",\r\n \"52.245.8.0/22\"\ - ,\r\n \"52.245.12.0/22\",\r\n \"52.245.16.0/22\",\r\n \ - \ \"52.245.20.0/22\",\r\n \"52.245.24.0/22\",\r\n \ - \ \"52.245.28.0/22\",\r\n \"52.245.32.0/22\",\r\n \"52.245.36.0/22\"\ - ,\r\n \"52.245.40.0/22\",\r\n \"52.245.44.0/24\",\r\n \ - \ \"52.245.45.0/25\",\r\n \"52.245.45.128/28\",\r\n \ - \ \"52.245.45.144/28\",\r\n \"52.245.45.160/27\",\r\n \ - \ \"52.245.45.192/26\",\r\n \"52.245.46.0/27\",\r\n \"\ - 52.245.46.32/28\",\r\n \"52.245.46.48/28\",\r\n \"52.245.46.64/28\"\ - ,\r\n \"52.245.46.80/28\",\r\n \"52.245.46.96/28\",\r\n\ - \ \"52.245.46.112/28\",\r\n \"52.245.46.128/28\",\r\n \ - \ \"52.245.46.160/27\",\r\n \"52.245.46.192/26\",\r\n \ - \ \"52.245.48.0/22\",\r\n \"52.245.52.0/22\",\r\n \"\ - 52.245.56.0/22\",\r\n \"52.245.60.0/22\",\r\n \"52.245.64.0/22\"\ - ,\r\n \"52.245.68.0/24\",\r\n \"52.245.69.0/27\",\r\n \ - \ \"52.245.69.32/27\",\r\n \"52.245.69.64/27\",\r\n \ - \ \"52.245.69.96/28\",\r\n \"52.245.69.144/28\",\r\n \ - \ \"52.245.69.160/27\",\r\n \"52.245.69.192/26\",\r\n \"\ - 52.245.70.0/23\",\r\n \"52.245.72.0/22\",\r\n \"52.245.76.0/22\"\ - ,\r\n \"52.245.80.0/22\",\r\n \"52.245.84.0/22\",\r\n \ - \ \"52.245.88.0/22\",\r\n \"52.245.92.0/22\",\r\n \ - \ \"52.245.96.0/22\",\r\n \"52.245.100.0/22\",\r\n \"52.245.104.0/22\"\ - ,\r\n \"52.245.108.0/22\",\r\n \"52.245.112.0/22\",\r\n\ - \ \"52.245.116.0/22\",\r\n \"52.245.120.0/22\",\r\n \ - \ \"52.245.124.0/22\",\r\n \"52.246.0.0/17\",\r\n \"\ - 52.246.128.0/20\",\r\n \"52.246.152.0/21\",\r\n \"52.246.160.0/19\"\ - ,\r\n \"52.246.192.0/18\",\r\n \"52.247.0.0/17\",\r\n \ - \ \"52.247.192.0/18\",\r\n \"52.248.0.0/17\",\r\n \ - \ \"52.248.128.0/17\",\r\n \"52.249.0.0/18\",\r\n \"52.249.64.0/19\"\ - ,\r\n \"52.249.128.0/17\",\r\n \"52.250.0.0/17\",\r\n \ - \ \"52.250.128.0/18\",\r\n \"52.250.192.0/18\",\r\n \ - \ \"52.251.0.0/17\",\r\n \"52.252.0.0/17\",\r\n \"52.252.128.0/17\"\ - ,\r\n \"52.253.0.0/18\",\r\n \"52.253.64.0/20\",\r\n \ - \ \"52.253.80.0/20\",\r\n \"52.253.96.0/19\",\r\n \ - \ \"52.253.128.0/20\",\r\n \"52.253.148.0/23\",\r\n \"52.253.150.0/23\"\ - ,\r\n \"52.253.152.0/23\",\r\n \"52.253.154.0/23\",\r\n\ - \ \"52.253.156.0/22\",\r\n \"52.253.160.0/24\",\r\n \ - \ \"52.253.161.0/24\",\r\n \"52.253.162.0/23\",\r\n \ - \ \"52.253.164.0/24\",\r\n \"52.253.165.0/24\",\r\n \"\ - 52.253.166.0/24\",\r\n \"52.253.167.0/24\",\r\n \"52.253.168.0/24\"\ - ,\r\n \"52.253.169.0/24\",\r\n \"52.253.170.0/23\",\r\n\ - \ \"52.253.172.0/24\",\r\n \"52.253.173.0/24\",\r\n \ - \ \"52.253.174.0/24\",\r\n \"52.253.175.0/24\",\r\n \ - \ \"52.253.176.0/24\",\r\n \"52.253.177.0/24\",\r\n \"\ - 52.253.178.0/24\",\r\n \"52.253.179.0/24\",\r\n \"52.253.180.0/24\"\ - ,\r\n \"52.253.181.0/24\",\r\n \"52.253.182.0/23\",\r\n\ - \ \"52.253.184.0/24\",\r\n \"52.253.185.0/24\",\r\n \ - \ \"52.253.186.0/24\",\r\n \"52.253.187.0/24\",\r\n \ - \ \"52.253.188.0/23\",\r\n \"52.253.190.0/24\",\r\n \"\ - 52.253.191.0/24\",\r\n \"52.253.192.0/24\",\r\n \"52.253.193.0/24\"\ - ,\r\n \"52.253.194.0/23\",\r\n \"52.253.196.0/24\",\r\n\ - \ \"52.253.197.0/24\",\r\n \"52.253.198.0/24\",\r\n \ - \ \"52.253.199.0/24\",\r\n \"52.253.200.0/23\",\r\n \ - \ \"52.253.202.0/24\",\r\n \"52.253.203.0/24\",\r\n \"\ - 52.253.204.0/23\",\r\n \"52.253.206.0/24\",\r\n \"52.253.207.0/24\"\ - ,\r\n \"52.253.208.0/23\",\r\n \"52.253.210.0/23\",\r\n\ - \ \"52.253.212.0/24\",\r\n \"52.253.213.0/24\",\r\n \ - \ \"52.253.214.0/23\",\r\n \"52.253.216.0/23\",\r\n \ - \ \"52.253.218.0/24\",\r\n \"52.253.219.0/24\",\r\n \"\ - 52.253.220.0/23\",\r\n \"52.253.222.0/23\",\r\n \"52.253.224.0/21\"\ - ,\r\n \"52.253.232.0/21\",\r\n \"52.254.0.0/18\",\r\n \ - \ \"52.254.64.0/19\",\r\n \"52.254.96.0/20\",\r\n \ - \ \"52.254.112.0/21\",\r\n \"52.254.120.0/21\",\r\n \"\ - 52.254.128.0/17\",\r\n \"52.255.0.0/19\",\r\n \"52.255.32.0/19\"\ - ,\r\n \"52.255.64.0/18\",\r\n \"52.255.128.0/17\",\r\n \ - \ \"53.103.135.0/24\",\r\n \"53.103.136.0/24\",\r\n \ - \ \"53.103.137.0/24\",\r\n \"53.103.138.0/24\",\r\n \ - \ \"53.103.139.0/24\",\r\n \"53.103.140.0/24\",\r\n \"53.103.141.0/24\"\ - ,\r\n \"53.103.142.0/24\",\r\n \"53.103.143.0/24\",\r\n\ - \ \"64.4.8.0/24\",\r\n \"64.4.54.0/24\",\r\n \"\ - 65.52.0.0/19\",\r\n \"65.52.32.0/21\",\r\n \"65.52.48.0/20\"\ - ,\r\n \"65.52.64.0/20\",\r\n \"65.52.104.0/24\",\r\n \ - \ \"65.52.106.0/24\",\r\n \"65.52.108.0/23\",\r\n \ - \ \"65.52.110.0/24\",\r\n \"65.52.111.0/24\",\r\n \"65.52.112.0/20\"\ - ,\r\n \"65.52.128.0/19\",\r\n \"65.52.160.0/19\",\r\n \ - \ \"65.52.192.0/19\",\r\n \"65.52.224.0/21\",\r\n \ - \ \"65.52.232.0/21\",\r\n \"65.52.240.0/21\",\r\n \"65.52.248.0/21\"\ - ,\r\n \"65.54.19.128/27\",\r\n \"65.54.55.160/27\",\r\n\ - \ \"65.54.55.224/27\",\r\n \"65.55.32.128/28\",\r\n \ - \ \"65.55.32.192/27\",\r\n \"65.55.32.224/28\",\r\n \ - \ \"65.55.33.176/28\",\r\n \"65.55.33.192/28\",\r\n \"\ - 65.55.35.192/27\",\r\n \"65.55.44.8/29\",\r\n \"65.55.44.16/28\"\ - ,\r\n \"65.55.44.32/27\",\r\n \"65.55.44.64/27\",\r\n \ - \ \"65.55.44.96/28\",\r\n \"65.55.44.112/28\",\r\n \ - \ \"65.55.44.128/27\",\r\n \"65.55.51.0/24\",\r\n \"65.55.60.176/29\"\ - ,\r\n \"65.55.60.184/30\",\r\n \"65.55.60.188/30\",\r\n\ - \ \"65.55.105.0/26\",\r\n \"65.55.105.96/27\",\r\n \ - \ \"65.55.105.160/27\",\r\n \"65.55.105.192/27\",\r\n \ - \ \"65.55.105.224/27\",\r\n \"65.55.106.0/26\",\r\n \"\ - 65.55.106.64/27\",\r\n \"65.55.106.128/26\",\r\n \"65.55.106.192/28\"\ - ,\r\n \"65.55.106.208/28\",\r\n \"65.55.106.224/28\",\r\n\ - \ \"65.55.106.240/28\",\r\n \"65.55.107.0/28\",\r\n \ - \ \"65.55.107.48/28\",\r\n \"65.55.107.64/27\",\r\n \ - \ \"65.55.107.96/27\",\r\n \"65.55.108.0/24\",\r\n \"65.55.109.0/24\"\ - ,\r\n \"65.55.110.0/24\",\r\n \"65.55.120.0/24\",\r\n \ - \ \"65.55.144.0/23\",\r\n \"65.55.146.0/24\",\r\n \ - \ \"65.55.207.0/24\",\r\n \"65.55.209.0/25\",\r\n \"65.55.209.128/26\"\ - ,\r\n \"65.55.209.192/26\",\r\n \"65.55.210.0/24\",\r\n\ - \ \"65.55.211.0/27\",\r\n \"65.55.211.32/27\",\r\n \ - \ \"65.55.212.0/27\",\r\n \"65.55.212.128/25\",\r\n \ - \ \"65.55.213.0/27\",\r\n \"65.55.213.64/26\",\r\n \"65.55.213.128/26\"\ - ,\r\n \"65.55.217.0/24\",\r\n \"65.55.218.0/24\",\r\n \ - \ \"65.55.219.0/27\",\r\n \"65.55.219.32/27\",\r\n \ - \ \"65.55.219.64/26\",\r\n \"65.55.219.128/25\",\r\n \"\ - 65.55.250.0/24\",\r\n \"65.55.252.0/24\",\r\n \"70.37.0.0/21\"\ - ,\r\n \"70.37.8.0/22\",\r\n \"70.37.12.0/32\",\r\n \ - \ \"70.37.16.0/20\",\r\n \"70.37.32.0/20\",\r\n \"70.37.48.0/20\"\ - ,\r\n \"70.37.64.0/18\",\r\n \"70.37.160.0/21\",\r\n \ - \ \"94.245.88.0/21\",\r\n \"94.245.104.0/21\",\r\n \ - \ \"94.245.117.96/27\",\r\n \"94.245.118.0/27\",\r\n \"\ - 94.245.120.128/28\",\r\n \"94.245.122.0/24\",\r\n \"94.245.123.144/28\"\ - ,\r\n \"94.245.123.176/28\",\r\n \"102.37.0.0/20\",\r\n\ - \ \"102.37.16.0/21\",\r\n \"102.37.24.0/23\",\r\n \ - \ \"102.37.26.0/27\",\r\n \"102.37.26.32/27\",\r\n \"\ - 102.37.32.0/19\",\r\n \"102.37.64.0/21\",\r\n \"102.37.72.0/21\"\ - ,\r\n \"102.37.80.0/21\",\r\n \"102.37.96.0/19\",\r\n \ - \ \"102.37.128.0/19\",\r\n \"102.37.160.0/21\",\r\n \ - \ \"102.37.192.0/18\",\r\n \"102.133.0.0/18\",\r\n \"\ - 102.133.64.0/19\",\r\n \"102.133.96.0/20\",\r\n \"102.133.112.0/28\"\ - ,\r\n \"102.133.120.0/21\",\r\n \"102.133.128.0/18\",\r\n\ - \ \"102.133.192.0/19\",\r\n \"102.133.224.0/20\",\r\n \ - \ \"102.133.240.0/25\",\r\n \"102.133.240.128/26\",\r\n \ - \ \"102.133.248.0/21\",\r\n \"103.25.156.0/24\",\r\n \ - \ \"103.36.96.0/24\",\r\n \"103.255.140.0/23\",\r\n \ - \ \"104.40.0.0/17\",\r\n \"104.40.128.0/17\",\r\n \"104.41.0.0/18\"\ - ,\r\n \"104.41.64.0/18\",\r\n \"104.41.128.0/19\",\r\n \ - \ \"104.41.160.0/19\",\r\n \"104.41.192.0/18\",\r\n \ - \ \"104.42.0.0/16\",\r\n \"104.43.0.0/17\",\r\n \"104.43.128.0/17\"\ - ,\r\n \"104.44.88.0/27\",\r\n \"104.44.88.32/27\",\r\n \ - \ \"104.44.88.64/27\",\r\n \"104.44.88.96/27\",\r\n \ - \ \"104.44.88.128/27\",\r\n \"104.44.88.160/27\",\r\n \ - \ \"104.44.88.192/27\",\r\n \"104.44.88.224/27\",\r\n \ - \ \"104.44.89.0/27\",\r\n \"104.44.89.32/27\",\r\n \"104.44.89.64/27\"\ - ,\r\n \"104.44.89.96/27\",\r\n \"104.44.89.128/27\",\r\n\ - \ \"104.44.89.160/27\",\r\n \"104.44.89.192/27\",\r\n \ - \ \"104.44.89.224/27\",\r\n \"104.44.90.0/27\",\r\n \ - \ \"104.44.90.32/27\",\r\n \"104.44.90.64/26\",\r\n \"\ - 104.44.90.128/27\",\r\n \"104.44.90.160/27\",\r\n \"104.44.90.192/27\"\ - ,\r\n \"104.44.90.224/27\",\r\n \"104.44.91.0/27\",\r\n\ - \ \"104.44.91.32/27\",\r\n \"104.44.91.64/27\",\r\n \ - \ \"104.44.91.96/27\",\r\n \"104.44.91.128/27\",\r\n \ - \ \"104.44.91.160/27\",\r\n \"104.44.91.192/27\",\r\n \ - \ \"104.44.91.224/27\",\r\n \"104.44.92.0/27\",\r\n \"104.44.92.32/27\"\ - ,\r\n \"104.44.92.64/27\",\r\n \"104.44.92.96/27\",\r\n\ - \ \"104.44.92.128/27\",\r\n \"104.44.92.160/27\",\r\n \ - \ \"104.44.92.192/27\",\r\n \"104.44.92.224/27\",\r\n \ - \ \"104.44.93.0/27\",\r\n \"104.44.93.32/27\",\r\n \ - \ \"104.44.93.64/27\",\r\n \"104.44.93.96/27\",\r\n \"104.44.93.128/27\"\ - ,\r\n \"104.44.93.160/27\",\r\n \"104.44.93.192/27\",\r\n\ - \ \"104.44.93.224/27\",\r\n \"104.44.94.0/28\",\r\n \ - \ \"104.44.94.16/28\",\r\n \"104.44.94.32/28\",\r\n \ - \ \"104.44.94.48/28\",\r\n \"104.44.94.64/28\",\r\n \"\ - 104.44.94.80/28\",\r\n \"104.44.94.96/28\",\r\n \"104.44.94.112/28\"\ - ,\r\n \"104.44.94.128/28\",\r\n \"104.44.94.144/28\",\r\n\ - \ \"104.44.94.160/27\",\r\n \"104.44.94.192/28\",\r\n \ - \ \"104.44.94.208/28\",\r\n \"104.44.94.224/27\",\r\n \ - \ \"104.44.95.0/28\",\r\n \"104.44.95.16/28\",\r\n \ - \ \"104.44.95.32/28\",\r\n \"104.44.95.48/28\",\r\n \"104.44.95.64/28\"\ - ,\r\n \"104.44.95.80/28\",\r\n \"104.44.95.96/28\",\r\n\ - \ \"104.44.95.112/28\",\r\n \"104.44.95.128/27\",\r\n \ - \ \"104.44.95.160/27\",\r\n \"104.44.95.192/28\",\r\n \ - \ \"104.44.95.208/28\",\r\n \"104.44.95.224/28\",\r\n \ - \ \"104.44.95.240/28\",\r\n \"104.44.128.0/18\",\r\n \ - \ \"104.45.0.0/18\",\r\n \"104.45.64.0/20\",\r\n \"104.45.80.0/20\"\ - ,\r\n \"104.45.96.0/19\",\r\n \"104.45.128.0/18\",\r\n \ - \ \"104.45.192.0/20\",\r\n \"104.45.208.0/20\",\r\n \ - \ \"104.45.224.0/19\",\r\n \"104.46.0.0/21\",\r\n \"\ - 104.46.8.0/21\",\r\n \"104.46.24.0/22\",\r\n \"104.46.28.0/24\"\ - ,\r\n \"104.46.29.0/24\",\r\n \"104.46.30.0/23\",\r\n \ - \ \"104.46.32.0/19\",\r\n \"104.46.64.0/19\",\r\n \ - \ \"104.46.96.0/19\",\r\n \"104.46.160.0/19\",\r\n \"104.46.192.0/20\"\ - ,\r\n \"104.46.208.0/20\",\r\n \"104.46.224.0/20\",\r\n\ - \ \"104.47.128.0/18\",\r\n \"104.47.200.0/21\",\r\n \ - \ \"104.47.208.0/23\",\r\n \"104.47.210.0/23\",\r\n \ - \ \"104.47.212.0/23\",\r\n \"104.47.214.0/23\",\r\n \"\ - 104.47.216.64/26\",\r\n \"104.47.218.0/23\",\r\n \"104.47.220.0/22\"\ - ,\r\n \"104.47.224.0/20\",\r\n \"104.208.0.0/19\",\r\n \ - \ \"104.208.32.0/20\",\r\n \"104.208.48.0/20\",\r\n \ - \ \"104.208.64.0/18\",\r\n \"104.208.128.0/17\",\r\n \ - \ \"104.209.0.0/18\",\r\n \"104.209.64.0/20\",\r\n \"104.209.80.0/20\"\ - ,\r\n \"104.209.128.0/17\",\r\n \"104.210.0.0/20\",\r\n\ - \ \"104.210.32.0/19\",\r\n \"104.210.64.0/18\",\r\n \ - \ \"104.210.128.0/19\",\r\n \"104.210.176.0/20\",\r\n \ - \ \"104.210.192.0/19\",\r\n \"104.211.0.0/18\",\r\n \"\ - 104.211.64.0/18\",\r\n \"104.211.128.0/18\",\r\n \"104.211.192.0/18\"\ - ,\r\n \"104.214.0.0/17\",\r\n \"104.214.128.0/19\",\r\n\ - \ \"104.214.160.0/19\",\r\n \"104.214.192.0/18\",\r\n \ - \ \"104.215.0.0/18\",\r\n \"104.215.64.0/18\",\r\n \ - \ \"104.215.128.0/17\",\r\n \"111.221.28.0/24\",\r\n \"\ - 111.221.29.0/24\",\r\n \"111.221.30.0/23\",\r\n \"111.221.78.0/23\"\ - ,\r\n \"111.221.80.0/20\",\r\n \"111.221.96.0/20\",\r\n\ - \ \"131.253.12.0/29\",\r\n \"131.253.12.16/28\",\r\n \ - \ \"131.253.12.40/29\",\r\n \"131.253.12.48/29\",\r\n \ - \ \"131.253.12.80/28\",\r\n \"131.253.12.160/28\",\r\n \ - \ \"131.253.12.176/28\",\r\n \"131.253.12.192/28\",\r\n \ - \ \"131.253.12.208/28\",\r\n \"131.253.12.224/30\",\r\n \ - \ \"131.253.12.228/30\",\r\n \"131.253.12.240/29\",\r\n \ - \ \"131.253.12.248/29\",\r\n \"131.253.13.0/28\",\r\n \ - \ \"131.253.13.16/29\",\r\n \"131.253.13.24/29\",\r\n \"\ - 131.253.13.32/28\",\r\n \"131.253.13.48/28\",\r\n \"131.253.13.72/29\"\ - ,\r\n \"131.253.13.80/29\",\r\n \"131.253.13.88/30\",\r\n\ - \ \"131.253.13.96/30\",\r\n \"131.253.13.100/30\",\r\n \ - \ \"131.253.13.104/30\",\r\n \"131.253.13.128/27\",\r\n \ - \ \"131.253.14.4/30\",\r\n \"131.253.14.8/31\",\r\n \ - \ \"131.253.14.16/28\",\r\n \"131.253.14.32/27\",\r\n \ - \ \"131.253.14.64/29\",\r\n \"131.253.14.96/27\",\r\n \ - \ \"131.253.14.128/27\",\r\n \"131.253.14.160/27\",\r\n \ - \ \"131.253.14.192/29\",\r\n \"131.253.14.208/28\",\r\n \ - \ \"131.253.14.224/28\",\r\n \"131.253.14.248/29\",\r\n \ - \ \"131.253.15.8/29\",\r\n \"131.253.15.16/28\",\r\n \"\ - 131.253.15.32/27\",\r\n \"131.253.15.192/28\",\r\n \"131.253.15.208/28\"\ - ,\r\n \"131.253.15.224/27\",\r\n \"131.253.24.0/28\",\r\n\ - \ \"131.253.24.160/27\",\r\n \"131.253.24.192/26\",\r\n\ - \ \"131.253.25.0/24\",\r\n \"131.253.27.0/24\",\r\n \ - \ \"131.253.34.224/27\",\r\n \"131.253.35.128/26\",\r\n \ - \ \"131.253.35.192/26\",\r\n \"131.253.36.128/26\",\r\n \ - \ \"131.253.36.224/27\",\r\n \"131.253.38.0/27\",\r\n \ - \ \"131.253.38.32/27\",\r\n \"131.253.38.128/26\",\r\n \ - \ \"131.253.38.224/27\",\r\n \"131.253.40.0/28\",\r\n \ - \ \"131.253.40.16/28\",\r\n \"131.253.40.32/28\",\r\n \"\ - 131.253.40.48/29\",\r\n \"131.253.40.64/28\",\r\n \"131.253.40.80/28\"\ - ,\r\n \"131.253.40.96/27\",\r\n \"131.253.40.128/27\",\r\ - \n \"131.253.40.160/28\",\r\n \"131.253.40.192/26\",\r\n\ - \ \"131.253.41.0/24\",\r\n \"132.245.230.0/23\",\r\n \ - \ \"134.170.80.64/28\",\r\n \"134.170.192.0/21\",\r\n \ - \ \"134.170.220.0/23\",\r\n \"134.170.222.0/24\",\r\n \ - \ \"137.116.0.0/18\",\r\n \"137.116.64.0/19\",\r\n \"\ - 137.116.96.0/22\",\r\n \"137.116.112.0/20\",\r\n \"137.116.128.0/19\"\ - ,\r\n \"137.116.160.0/20\",\r\n \"137.116.176.0/21\",\r\n\ - \ \"137.116.184.0/21\",\r\n \"137.116.192.0/19\",\r\n \ - \ \"137.116.224.0/19\",\r\n \"137.117.0.0/19\",\r\n \ - \ \"137.117.32.0/19\",\r\n \"137.117.64.0/18\",\r\n \"\ - 137.117.128.0/17\",\r\n \"137.135.0.0/18\",\r\n \"137.135.64.0/18\"\ - ,\r\n \"137.135.128.0/17\",\r\n \"138.91.0.0/20\",\r\n \ - \ \"138.91.16.0/20\",\r\n \"138.91.32.0/20\",\r\n \ - \ \"138.91.48.0/20\",\r\n \"138.91.64.0/19\",\r\n \"138.91.96.0/19\"\ - ,\r\n \"138.91.128.0/17\",\r\n \"157.55.2.128/26\",\r\n\ - \ \"157.55.3.0/24\",\r\n \"157.55.7.128/26\",\r\n \ - \ \"157.55.8.64/26\",\r\n \"157.55.8.144/28\",\r\n \"\ - 157.55.10.160/29\",\r\n \"157.55.10.176/28\",\r\n \"157.55.10.192/26\"\ - ,\r\n \"157.55.11.128/25\",\r\n \"157.55.12.64/26\",\r\n\ - \ \"157.55.12.128/26\",\r\n \"157.55.13.64/26\",\r\n \ - \ \"157.55.13.128/26\",\r\n \"157.55.24.0/21\",\r\n \ - \ \"157.55.37.0/24\",\r\n \"157.55.38.0/24\",\r\n \"157.55.39.0/24\"\ - ,\r\n \"157.55.48.0/24\",\r\n \"157.55.50.0/25\",\r\n \ - \ \"157.55.51.224/28\",\r\n \"157.55.55.0/27\",\r\n \ - \ \"157.55.55.32/28\",\r\n \"157.55.55.100/30\",\r\n \ - \ \"157.55.55.104/29\",\r\n \"157.55.55.136/29\",\r\n \"\ - 157.55.55.144/29\",\r\n \"157.55.55.152/29\",\r\n \"157.55.55.160/28\"\ - ,\r\n \"157.55.55.176/29\",\r\n \"157.55.55.200/29\",\r\n\ - \ \"157.55.55.216/29\",\r\n \"157.55.55.228/30\",\r\n \ - \ \"157.55.55.232/29\",\r\n \"157.55.55.240/28\",\r\n \ - \ \"157.55.60.224/27\",\r\n \"157.55.64.0/20\",\r\n \ - \ \"157.55.80.0/21\",\r\n \"157.55.103.32/27\",\r\n \"\ - 157.55.103.128/25\",\r\n \"157.55.106.0/26\",\r\n \"157.55.106.128/25\"\ - ,\r\n \"157.55.107.0/24\",\r\n \"157.55.108.0/23\",\r\n\ - \ \"157.55.110.0/23\",\r\n \"157.55.115.0/25\",\r\n \ - \ \"157.55.136.0/21\",\r\n \"157.55.151.0/28\",\r\n \ - \ \"157.55.153.224/28\",\r\n \"157.55.154.128/25\",\r\n \ - \ \"157.55.160.0/20\",\r\n \"157.55.176.0/20\",\r\n \"\ - 157.55.192.0/21\",\r\n \"157.55.200.0/22\",\r\n \"157.55.204.1/32\"\ - ,\r\n \"157.55.204.2/31\",\r\n \"157.55.204.33/32\",\r\n\ - \ \"157.55.204.34/31\",\r\n \"157.55.204.128/25\",\r\n \ - \ \"157.55.208.0/21\",\r\n \"157.55.248.0/21\",\r\n \ - \ \"157.56.2.0/25\",\r\n \"157.56.2.128/25\",\r\n \"\ - 157.56.3.0/25\",\r\n \"157.56.3.128/25\",\r\n \"157.56.8.0/21\"\ - ,\r\n \"157.56.19.224/27\",\r\n \"157.56.21.160/27\",\r\n\ - \ \"157.56.21.192/27\",\r\n \"157.56.24.160/27\",\r\n \ - \ \"157.56.24.192/28\",\r\n \"157.56.28.0/22\",\r\n \ - \ \"157.56.80.0/25\",\r\n \"157.56.117.64/27\",\r\n \"\ - 157.56.160.0/21\",\r\n \"157.56.176.0/21\",\r\n \"157.56.216.0/26\"\ - ,\r\n \"168.61.0.0/19\",\r\n \"168.61.32.0/20\",\r\n \ - \ \"168.61.48.0/21\",\r\n \"168.61.56.0/21\",\r\n \ - \ \"168.61.64.0/20\",\r\n \"168.61.80.0/20\",\r\n \"168.61.96.0/19\"\ - ,\r\n \"168.61.128.0/25\",\r\n \"168.61.128.128/28\",\r\n\ - \ \"168.61.128.160/27\",\r\n \"168.61.128.192/26\",\r\n\ - \ \"168.61.129.0/25\",\r\n \"168.61.129.128/26\",\r\n \ - \ \"168.61.129.208/28\",\r\n \"168.61.129.224/27\",\r\n \ - \ \"168.61.130.64/26\",\r\n \"168.61.130.128/25\",\r\n \ - \ \"168.61.131.0/26\",\r\n \"168.61.131.128/25\",\r\n \ - \ \"168.61.132.0/26\",\r\n \"168.61.136.0/21\",\r\n \ - \ \"168.61.144.0/20\",\r\n \"168.61.160.0/19\",\r\n \"168.61.208.0/20\"\ - ,\r\n \"168.62.0.0/19\",\r\n \"168.62.32.0/19\",\r\n \ - \ \"168.62.64.0/19\",\r\n \"168.62.96.0/19\",\r\n \ - \ \"168.62.128.0/19\",\r\n \"168.62.160.0/19\",\r\n \"168.62.192.0/19\"\ - ,\r\n \"168.62.224.0/19\",\r\n \"168.63.0.0/19\",\r\n \ - \ \"168.63.32.0/19\",\r\n \"168.63.64.0/20\",\r\n \ - \ \"168.63.80.0/21\",\r\n \"168.63.88.0/23\",\r\n \"168.63.90.0/24\"\ - ,\r\n \"168.63.91.0/26\",\r\n \"168.63.92.0/22\",\r\n \ - \ \"168.63.96.0/19\",\r\n \"168.63.128.0/24\",\r\n \ - \ \"168.63.129.0/28\",\r\n \"168.63.129.32/27\",\r\n \"\ - 168.63.129.64/26\",\r\n \"168.63.129.128/25\",\r\n \"168.63.130.0/23\"\ - ,\r\n \"168.63.132.0/22\",\r\n \"168.63.136.0/21\",\r\n\ - \ \"168.63.148.0/22\",\r\n \"168.63.152.0/22\",\r\n \ - \ \"168.63.156.0/24\",\r\n \"168.63.160.0/19\",\r\n \ - \ \"168.63.192.0/19\",\r\n \"168.63.224.0/19\",\r\n \"\ - 191.232.16.0/21\",\r\n \"191.232.32.0/19\",\r\n \"191.232.138.0/23\"\ - ,\r\n \"191.232.140.0/24\",\r\n \"191.232.160.0/19\",\r\n\ - \ \"191.232.192.0/18\",\r\n \"191.233.0.0/21\",\r\n \ - \ \"191.233.8.0/21\",\r\n \"191.233.16.0/20\",\r\n \ - \ \"191.233.32.0/20\",\r\n \"191.233.48.0/21\",\r\n \"191.233.64.0/18\"\ - ,\r\n \"191.233.128.0/20\",\r\n \"191.233.144.0/20\",\r\n\ - \ \"191.233.160.0/19\",\r\n \"191.233.192.0/18\",\r\n \ - \ \"191.234.2.0/23\",\r\n \"191.234.16.0/20\",\r\n \ - \ \"191.234.32.0/19\",\r\n \"191.234.128.0/18\",\r\n \"\ - 191.234.192.0/19\",\r\n \"191.234.224.0/19\",\r\n \"191.235.32.0/19\"\ - ,\r\n \"191.235.64.0/18\",\r\n \"191.235.128.0/18\",\r\n\ - \ \"191.235.192.0/22\",\r\n \"191.235.196.0/22\",\r\n \ - \ \"191.235.200.0/21\",\r\n \"191.235.208.0/20\",\r\n \ - \ \"191.235.224.0/20\",\r\n \"191.235.240.0/21\",\r\n \ - \ \"191.235.248.0/23\",\r\n \"191.235.250.0/25\",\r\n \ - \ \"191.235.255.0/24\",\r\n \"191.236.0.0/18\",\r\n \"\ - 191.236.64.0/18\",\r\n \"191.236.128.0/18\",\r\n \"191.236.192.0/18\"\ - ,\r\n \"191.237.0.0/17\",\r\n \"191.237.128.0/18\",\r\n\ - \ \"191.237.192.0/23\",\r\n \"191.237.194.0/24\",\r\n \ - \ \"191.237.195.0/24\",\r\n \"191.237.196.0/24\",\r\n \ - \ \"191.237.200.0/21\",\r\n \"191.237.208.0/20\",\r\n \ - \ \"191.237.224.0/21\",\r\n \"191.237.232.0/22\",\r\n \ - \ \"191.237.236.0/24\",\r\n \"191.237.238.0/24\",\r\n \"\ - 191.237.240.0/23\",\r\n \"191.237.248.0/21\",\r\n \"191.238.0.0/18\"\ - ,\r\n \"191.238.64.0/23\",\r\n \"191.238.66.0/23\",\r\n\ - \ \"191.238.68.0/24\",\r\n \"191.238.70.0/23\",\r\n \ - \ \"191.238.72.0/21\",\r\n \"191.238.80.0/21\",\r\n \ - \ \"191.238.88.0/22\",\r\n \"191.238.92.0/23\",\r\n \"\ - 191.238.96.0/19\",\r\n \"191.238.128.0/21\",\r\n \"191.238.144.0/20\"\ - ,\r\n \"191.238.160.0/19\",\r\n \"191.238.192.0/19\",\r\n\ - \ \"191.238.224.0/19\",\r\n \"191.239.0.0/18\",\r\n \ - \ \"191.239.64.0/19\",\r\n \"191.239.96.0/20\",\r\n \ - \ \"191.239.112.0/20\",\r\n \"191.239.160.0/19\",\r\n \"\ - 191.239.192.0/22\",\r\n \"191.239.200.0/22\",\r\n \"191.239.204.0/22\"\ - ,\r\n \"191.239.208.0/20\",\r\n \"191.239.224.0/20\",\r\n\ - \ \"191.239.240.0/20\",\r\n \"193.149.64.0/21\",\r\n \ - \ \"193.149.72.0/21\",\r\n \"193.149.80.0/21\",\r\n \ - \ \"193.149.88.0/21\",\r\n \"198.180.97.0/24\",\r\n \"\ - 199.30.16.0/24\",\r\n \"199.30.18.0/23\",\r\n \"199.30.20.0/24\"\ - ,\r\n \"199.30.22.0/24\",\r\n \"199.30.24.0/23\",\r\n \ - \ \"199.30.27.0/25\",\r\n \"199.30.27.144/28\",\r\n \ - \ \"199.30.27.160/27\",\r\n \"199.30.28.64/26\",\r\n \ - \ \"199.30.28.128/25\",\r\n \"199.30.29.0/24\",\r\n \"199.30.31.0/25\"\ - ,\r\n \"199.30.31.192/26\",\r\n \"202.89.233.64/27\",\r\n\ - \ \"202.89.235.128/25\",\r\n \"204.79.180.0/24\",\r\n \ - \ \"204.152.18.0/31\",\r\n \"204.152.18.8/29\",\r\n \ - \ \"204.152.18.32/27\",\r\n \"204.152.18.64/26\",\r\n \ - \ \"204.152.19.0/24\",\r\n \"204.231.197.0/24\",\r\n \"\ - 207.46.13.0/24\",\r\n \"207.46.50.128/28\",\r\n \"207.46.59.64/27\"\ - ,\r\n \"207.46.63.64/27\",\r\n \"207.46.63.128/25\",\r\n\ - \ \"207.46.67.160/27\",\r\n \"207.46.67.192/27\",\r\n \ - \ \"207.46.72.0/27\",\r\n \"207.46.77.224/28\",\r\n \ - \ \"207.46.87.0/24\",\r\n \"207.46.89.16/28\",\r\n \"\ - 207.46.95.32/27\",\r\n \"207.46.126.0/24\",\r\n \"207.46.128.0/19\"\ - ,\r\n \"207.46.193.192/28\",\r\n \"207.46.193.224/27\",\r\ - \n \"207.46.198.128/25\",\r\n \"207.46.200.96/27\",\r\n\ - \ \"207.46.200.176/28\",\r\n \"207.46.202.128/28\",\r\n\ - \ \"207.46.205.0/24\",\r\n \"207.46.224.0/20\",\r\n \ - \ \"207.68.174.8/29\",\r\n \"207.68.174.40/29\",\r\n \ - \ \"207.68.174.48/29\",\r\n \"207.68.174.184/29\",\r\n \ - \ \"207.68.174.192/28\",\r\n \"207.68.174.208/28\",\r\n \ - \ \"209.240.212.0/23\",\r\n \"213.199.128.0/20\",\r\n \"\ - 213.199.169.0/24\",\r\n \"213.199.180.32/28\",\r\n \"213.199.180.96/27\"\ - ,\r\n \"213.199.180.192/27\",\r\n \"213.199.183.0/24\",\r\ - \n \"2602:fd5e:1::/63\",\r\n \"2602:fd5e:1:2::/64\",\r\n\ - \ \"2603:1000::/47\",\r\n \"2603:1000:3::/48\",\r\n \ - \ \"2603:1000:4::/47\",\r\n \"2603:1000:100::/47\",\r\n \ - \ \"2603:1000:103::/48\",\r\n \"2603:1000:104::/47\",\r\n \ - \ \"2603:1006:1400::/63\",\r\n \"2603:1006:1401::/63\",\r\n\ - \ \"2603:1006:1500::/64\",\r\n \"2603:1006:1500:4::/64\"\ - ,\r\n \"2603:1006:2000::/59\",\r\n \"2603:1006:2000:20::/59\"\ - ,\r\n \"2603:1007:200::/59\",\r\n \"2603:1007:200:20::/59\"\ - ,\r\n \"2603:1010::/46\",\r\n \"2603:1010:5::/48\",\r\n\ - \ \"2603:1010:6::/47\",\r\n \"2603:1010:100::/40\",\r\n\ - \ \"2603:1010:200::/47\",\r\n \"2603:1010:202::/48\",\r\n\ - \ \"2603:1010:204::/48\",\r\n \"2603:1010:205::/48\",\r\n\ - \ \"2603:1010:206::/48\",\r\n \"2603:1010:300::/47\",\r\n\ - \ \"2603:1010:303::/48\",\r\n \"2603:1010:304::/47\",\r\n\ - \ \"2603:1010:400::/47\",\r\n \"2603:1010:403::/48\",\r\n\ - \ \"2603:1010:404::/47\",\r\n \"2603:1016:1400::/59\",\r\ - \n \"2603:1016:1400:20::/59\",\r\n \"2603:1016:1400:40::/59\"\ - ,\r\n \"2603:1016:1400:60::/59\",\r\n \"2603:1016:2400::/48\"\ - ,\r\n \"2603:1016:2401::/48\",\r\n \"2603:1016:2402::/48\"\ - ,\r\n \"2603:1016:2403::/48\",\r\n \"2603:1016:2500::/64\"\ - ,\r\n \"2603:1016:2500:4::/64\",\r\n \"2603:1016:2500:8::/64\"\ - ,\r\n \"2603:1016:2500:c::/64\",\r\n \"2603:1017::/59\"\ - ,\r\n \"2603:1017:0:20::/59\",\r\n \"2603:1017:0:40::/59\"\ - ,\r\n \"2603:1017:0:60::/59\",\r\n \"2603:1020::/47\",\r\ - \n \"2603:1020:2::/48\",\r\n \"2603:1020:4::/48\",\r\n \ - \ \"2603:1020:5::/48\",\r\n \"2603:1020:6::/48\",\r\n \ - \ \"2603:1020:100::/47\",\r\n \"2603:1020:103::/48\",\r\n \ - \ \"2603:1020:104::/48\",\r\n \"2603:1020:200::/46\",\r\n\ - \ \"2603:1020:205::/48\",\r\n \"2603:1020:206::/47\",\r\n\ - \ \"2603:1020:300::/47\",\r\n \"2603:1020:302::/48\",\r\n\ - \ \"2603:1020:304::/48\",\r\n \"2603:1020:305::/48\",\r\n\ - \ \"2603:1020:400::/47\",\r\n \"2603:1020:402::/48\",\r\n\ - \ \"2603:1020:404::/48\",\r\n \"2603:1020:405::/48\",\r\n\ - \ \"2603:1020:500::/47\",\r\n \"2603:1020:503::/48\",\r\n\ - \ \"2603:1020:504::/48\",\r\n \"2603:1020:600::/47\",\r\n\ - \ \"2603:1020:602::/48\",\r\n \"2603:1020:604::/48\",\r\n\ - \ \"2603:1020:605::/48\",\r\n \"2603:1020:606::/48\",\r\n\ - \ \"2603:1020:700::/47\",\r\n \"2603:1020:702::/48\",\r\n\ - \ \"2603:1020:704::/48\",\r\n \"2603:1020:705::/48\",\r\n\ - \ \"2603:1020:706::/48\",\r\n \"2603:1020:800::/47\",\r\n\ - \ \"2603:1020:802::/48\",\r\n \"2603:1020:804::/48\",\r\n\ - \ \"2603:1020:805::/48\",\r\n \"2603:1020:806::/48\",\r\n\ - \ \"2603:1020:900::/47\",\r\n \"2603:1020:902::/48\",\r\n\ - \ \"2603:1020:904::/48\",\r\n \"2603:1020:905::/48\",\r\n\ - \ \"2603:1020:906::/48\",\r\n \"2603:1020:a00::/47\",\r\n\ - \ \"2603:1020:a03::/48\",\r\n \"2603:1020:a04::/47\",\r\n\ - \ \"2603:1020:b00::/47\",\r\n \"2603:1020:b03::/48\",\r\n\ - \ \"2603:1020:b04::/47\",\r\n \"2603:1020:c00::/47\",\r\n\ - \ \"2603:1020:c03::/48\",\r\n \"2603:1020:c04::/47\",\r\n\ - \ \"2603:1020:d00::/47\",\r\n \"2603:1020:d03::/48\",\r\n\ - \ \"2603:1020:d04::/47\",\r\n \"2603:1020:e00::/47\",\r\n\ - \ \"2603:1020:e03::/48\",\r\n \"2603:1020:e04::/47\",\r\n\ - \ \"2603:1020:f00::/47\",\r\n \"2603:1020:f03::/48\",\r\n\ - \ \"2603:1020:f04::/47\",\r\n \"2603:1020:1000::/47\",\r\ - \n \"2603:1020:1003::/48\",\r\n \"2603:1020:1004::/47\"\ - ,\r\n \"2603:1020:1100::/47\",\r\n \"2603:1020:1103::/48\"\ - ,\r\n \"2603:1020:1104::/47\",\r\n \"2603:1020:1107::/48\"\ - ,\r\n \"2603:1020:1200::/47\",\r\n \"2603:1020:1301::/48\"\ - ,\r\n \"2603:1026:900::/64\",\r\n \"2603:1026:900:1::/64\"\ - ,\r\n \"2603:1026:900:2::/63\",\r\n \"2603:1026:2400::/48\"\ - ,\r\n \"2603:1026:2401::/48\",\r\n \"2603:1026:2402::/48\"\ - ,\r\n \"2603:1026:2403::/48\",\r\n \"2603:1026:2404::/48\"\ - ,\r\n \"2603:1026:2405::/48\",\r\n \"2603:1026:2406::/48\"\ - ,\r\n \"2603:1026:2407::/48\",\r\n \"2603:1026:2408::/48\"\ - ,\r\n \"2603:1026:2409::/48\",\r\n \"2603:1026:240a::/48\"\ - ,\r\n \"2603:1026:240b::/48\",\r\n \"2603:1026:240c::/48\"\ - ,\r\n \"2603:1026:240d::/48\",\r\n \"2603:1026:240e::/48\"\ - ,\r\n \"2603:1026:240f::/48\",\r\n \"2603:1026:2410::/48\"\ - ,\r\n \"2603:1026:2411::/48\",\r\n \"2603:1026:2412::/48\"\ - ,\r\n \"2603:1026:2500::/64\",\r\n \"2603:1026:2500:4::/64\"\ - ,\r\n \"2603:1026:2500:8::/64\",\r\n \"2603:1026:2500:c::/64\"\ - ,\r\n \"2603:1026:2500:10::/64\",\r\n \"2603:1026:2500:14::/64\"\ - ,\r\n \"2603:1026:2500:18::/64\",\r\n \"2603:1026:2500:1c::/64\"\ - ,\r\n \"2603:1026:2500:20::/64\",\r\n \"2603:1026:2500:24::/64\"\ - ,\r\n \"2603:1026:2500:28::/64\",\r\n \"2603:1026:2500:2c::/64\"\ - ,\r\n \"2603:1026:2500:30::/64\",\r\n \"2603:1026:2500:34::/64\"\ - ,\r\n \"2603:1026:2500:38::/64\",\r\n \"2603:1026:3000::/59\"\ - ,\r\n \"2603:1026:3000:20::/59\",\r\n \"2603:1026:3000:40::/59\"\ - ,\r\n \"2603:1026:3000:60::/59\",\r\n \"2603:1026:3000:80::/59\"\ - ,\r\n \"2603:1026:3000:a0::/59\",\r\n \"2603:1026:3000:c0::/59\"\ - ,\r\n \"2603:1026:3000:e0::/59\",\r\n \"2603:1026:3000:100::/59\"\ - ,\r\n \"2603:1026:3000:120::/59\",\r\n \"2603:1026:3000:140::/59\"\ - ,\r\n \"2603:1026:3000:160::/59\",\r\n \"2603:1026:3000:180::/59\"\ - ,\r\n \"2603:1026:3000:1a0::/59\",\r\n \"2603:1026:3000:1c0::/59\"\ - ,\r\n \"2603:1026:3000:1e0::/59\",\r\n \"2603:1026:3000:200::/59\"\ - ,\r\n \"2603:1026:3000:220::/59\",\r\n \"2603:1027:1::/59\"\ - ,\r\n \"2603:1027:1:20::/59\",\r\n \"2603:1027:1:40::/59\"\ - ,\r\n \"2603:1027:1:60::/59\",\r\n \"2603:1027:1:80::/59\"\ - ,\r\n \"2603:1027:1:a0::/59\",\r\n \"2603:1027:1:c0::/59\"\ - ,\r\n \"2603:1027:1:e0::/59\",\r\n \"2603:1027:1:100::/59\"\ - ,\r\n \"2603:1027:1:120::/59\",\r\n \"2603:1027:1:140::/59\"\ - ,\r\n \"2603:1027:1:160::/59\",\r\n \"2603:1027:1:180::/59\"\ - ,\r\n \"2603:1027:1:1a0::/59\",\r\n \"2603:1027:1:1c0::/59\"\ - ,\r\n \"2603:1027:1:1e0::/59\",\r\n \"2603:1027:1:200::/59\"\ - ,\r\n \"2603:1027:1:220::/59\",\r\n \"2603:1030::/45\",\r\ - \n \"2603:1030:8::/48\",\r\n \"2603:1030:9::/63\",\r\n \ - \ \"2603:1030:9:2::/63\",\r\n \"2603:1030:9:4::/62\",\r\n\ - \ \"2603:1030:9:8::/61\",\r\n \"2603:1030:9:10::/62\",\r\ - \n \"2603:1030:9:14::/63\",\r\n \"2603:1030:9:16::/64\"\ - ,\r\n \"2603:1030:9:17::/64\",\r\n \"2603:1030:9:18::/61\"\ - ,\r\n \"2603:1030:9:20::/59\",\r\n \"2603:1030:9:40::/58\"\ - ,\r\n \"2603:1030:9:80::/59\",\r\n \"2603:1030:9:a0::/60\"\ - ,\r\n \"2603:1030:9:b0::/63\",\r\n \"2603:1030:9:b2::/64\"\ - ,\r\n \"2603:1030:9:b3::/64\",\r\n \"2603:1030:9:b4::/63\"\ - ,\r\n \"2603:1030:9:b6::/64\",\r\n \"2603:1030:9:b7::/64\"\ - ,\r\n \"2603:1030:9:b8::/63\",\r\n \"2603:1030:9:ba::/63\"\ - ,\r\n \"2603:1030:9:bc::/64\",\r\n \"2603:1030:9:bd::/64\"\ - ,\r\n \"2603:1030:9:be::/63\",\r\n \"2603:1030:9:c0::/58\"\ - ,\r\n \"2603:1030:9:100::/64\",\r\n \"2603:1030:9:101::/64\"\ - ,\r\n \"2603:1030:9:102::/63\",\r\n \"2603:1030:9:104::/62\"\ - ,\r\n \"2603:1030:9:108::/62\",\r\n \"2603:1030:9:10c::/64\"\ - ,\r\n \"2603:1030:9:10d::/64\",\r\n \"2603:1030:9:10e::/63\"\ - ,\r\n \"2603:1030:9:110::/64\",\r\n \"2603:1030:9:111::/64\"\ - ,\r\n \"2603:1030:9:112::/63\",\r\n \"2603:1030:9:114::/64\"\ - ,\r\n \"2603:1030:9:115::/64\",\r\n \"2603:1030:9:116::/63\"\ - ,\r\n \"2603:1030:9:118::/62\",\r\n \"2603:1030:9:11c::/63\"\ - ,\r\n \"2603:1030:9:11e::/64\",\r\n \"2603:1030:9:11f::/64\"\ - ,\r\n \"2603:1030:9:120::/61\",\r\n \"2603:1030:9:128::/62\"\ - ,\r\n \"2603:1030:9:12c::/63\",\r\n \"2603:1030:9:12e::/64\"\ - ,\r\n \"2603:1030:9:12f::/64\",\r\n \"2603:1030:9:130::/60\"\ - ,\r\n \"2603:1030:9:140::/59\",\r\n \"2603:1030:9:160::/61\"\ - ,\r\n \"2603:1030:9:168::/62\",\r\n \"2603:1030:9:16c::/63\"\ - ,\r\n \"2603:1030:9:16e::/64\",\r\n \"2603:1030:9:16f::/64\"\ - ,\r\n \"2603:1030:9:170::/60\",\r\n \"2603:1030:9:180::/61\"\ - ,\r\n \"2603:1030:9:188::/62\",\r\n \"2603:1030:9:18c::/62\"\ - ,\r\n \"2603:1030:9:190::/61\",\r\n \"2603:1030:a::/47\"\ - ,\r\n \"2603:1030:d::/48\",\r\n \"2603:1030:e::/48\",\r\n\ - \ \"2603:1030:f::/48\",\r\n \"2603:1030:10::/47\",\r\n \ - \ \"2603:1030:12::/48\",\r\n \"2603:1030:100::/61\",\r\n\ - \ \"2603:1030:100:8::/62\",\r\n \"2603:1030:100:c::/63\"\ - ,\r\n \"2603:1030:100:e::/63\",\r\n \"2603:1030:100:10::/62\"\ - ,\r\n \"2603:1030:100:14::/63\",\r\n \"2603:1030:100:16::/63\"\ - ,\r\n \"2603:1030:100:18::/62\",\r\n \"2603:1030:101::/48\"\ - ,\r\n \"2603:1030:103::/48\",\r\n \"2603:1030:104::/48\"\ - ,\r\n \"2603:1030:105::/48\",\r\n \"2603:1030:106::/48\"\ - ,\r\n \"2603:1030:107::/48\",\r\n \"2603:1030:108::/48\"\ - ,\r\n \"2603:1030:109::/48\",\r\n \"2603:1030:208::/47\"\ - ,\r\n \"2603:1030:20a::/47\",\r\n \"2603:1030:20c::/47\"\ - ,\r\n \"2603:1030:20e::/48\",\r\n \"2603:1030:210::/47\"\ - ,\r\n \"2603:1030:212::/56\",\r\n \"2603:1030:213::/48\"\ - ,\r\n \"2603:1030:301::/48\",\r\n \"2603:1030:302::/48\"\ - ,\r\n \"2603:1030:303::/48\",\r\n \"2603:1030:400::/48\"\ - ,\r\n \"2603:1030:401::/63\",\r\n \"2603:1030:401:2::/63\"\ - ,\r\n \"2603:1030:401:4::/62\",\r\n \"2603:1030:401:8::/61\"\ - ,\r\n \"2603:1030:401:10::/62\",\r\n \"2603:1030:401:14::/63\"\ - ,\r\n \"2603:1030:401:16::/64\",\r\n \"2603:1030:401:17::/64\"\ - ,\r\n \"2603:1030:401:18::/61\",\r\n \"2603:1030:401:20::/59\"\ - ,\r\n \"2603:1030:401:40::/60\",\r\n \"2603:1030:401:50::/61\"\ - ,\r\n \"2603:1030:401:58::/64\",\r\n \"2603:1030:401:59::/64\"\ - ,\r\n \"2603:1030:401:5a::/63\",\r\n \"2603:1030:401:5c::/62\"\ - ,\r\n \"2603:1030:401:60::/59\",\r\n \"2603:1030:401:80::/62\"\ - ,\r\n \"2603:1030:401:84::/64\",\r\n \"2603:1030:401:85::/64\"\ - ,\r\n \"2603:1030:401:86::/64\",\r\n \"2603:1030:401:87::/64\"\ - ,\r\n \"2603:1030:401:88::/62\",\r\n \"2603:1030:401:8c::/63\"\ - ,\r\n \"2603:1030:401:8e::/64\",\r\n \"2603:1030:401:8f::/64\"\ - ,\r\n \"2603:1030:401:90::/63\",\r\n \"2603:1030:401:92::/63\"\ - ,\r\n \"2603:1030:401:94::/62\",\r\n \"2603:1030:401:98::/61\"\ - ,\r\n \"2603:1030:401:a0::/62\",\r\n \"2603:1030:401:a4::/63\"\ - ,\r\n \"2603:1030:401:a6::/64\",\r\n \"2603:1030:401:a7::/64\"\ - ,\r\n \"2603:1030:401:a8::/61\",\r\n \"2603:1030:401:b0::/60\"\ - ,\r\n \"2603:1030:401:c0::/58\",\r\n \"2603:1030:401:100::/59\"\ - ,\r\n \"2603:1030:401:120::/64\",\r\n \"2603:1030:401:121::/64\"\ - ,\r\n \"2603:1030:401:122::/63\",\r\n \"2603:1030:401:124::/62\"\ - ,\r\n \"2603:1030:401:128::/61\",\r\n \"2603:1030:401:130::/62\"\ - ,\r\n \"2603:1030:401:134::/63\",\r\n \"2603:1030:401:136::/63\"\ - ,\r\n \"2603:1030:401:138::/64\",\r\n \"2603:1030:401:139::/64\"\ - ,\r\n \"2603:1030:401:13a::/63\",\r\n \"2603:1030:401:13c::/62\"\ - ,\r\n \"2603:1030:401:140::/63\",\r\n \"2603:1030:401:142::/64\"\ - ,\r\n \"2603:1030:401:143::/64\",\r\n \"2603:1030:401:144::/63\"\ - ,\r\n \"2603:1030:401:146::/63\",\r\n \"2603:1030:401:148::/63\"\ - ,\r\n \"2603:1030:401:14a::/63\",\r\n \"2603:1030:401:14c::/62\"\ - ,\r\n \"2603:1030:401:150::/62\",\r\n \"2603:1030:401:154::/63\"\ - ,\r\n \"2603:1030:401:156::/63\",\r\n \"2603:1030:401:158::/64\"\ - ,\r\n \"2603:1030:401:159::/64\",\r\n \"2603:1030:401:15a::/63\"\ - ,\r\n \"2603:1030:401:15c::/62\",\r\n \"2603:1030:401:160::/61\"\ - ,\r\n \"2603:1030:401:168::/63\",\r\n \"2603:1030:401:16a::/63\"\ - ,\r\n \"2603:1030:401:16c::/64\",\r\n \"2603:1030:401:16d::/64\"\ - ,\r\n \"2603:1030:401:16e::/63\",\r\n \"2603:1030:401:170::/61\"\ - ,\r\n \"2603:1030:401:178::/62\",\r\n \"2603:1030:401:17c::/62\"\ - ,\r\n \"2603:1030:401:180::/58\",\r\n \"2603:1030:401:1c0::/61\"\ - ,\r\n \"2603:1030:401:1c8::/63\",\r\n \"2603:1030:401:1ca::/63\"\ - ,\r\n \"2603:1030:401:1cc::/62\",\r\n \"2603:1030:401:1d0::/60\"\ - ,\r\n \"2603:1030:401:1e0::/60\",\r\n \"2603:1030:401:1f0::/61\"\ - ,\r\n \"2603:1030:401:1f8::/64\",\r\n \"2603:1030:401:1f9::/64\"\ - ,\r\n \"2603:1030:401:1fa::/63\",\r\n \"2603:1030:401:1fc::/62\"\ - ,\r\n \"2603:1030:401:200::/61\",\r\n \"2603:1030:401:208::/62\"\ - ,\r\n \"2603:1030:401:20c::/62\",\r\n \"2603:1030:401:210::/60\"\ - ,\r\n \"2603:1030:401:220::/62\",\r\n \"2603:1030:401:224::/63\"\ - ,\r\n \"2603:1030:402::/47\",\r\n \"2603:1030:405::/48\"\ - ,\r\n \"2603:1030:406::/47\",\r\n \"2603:1030:408::/48\"\ - ,\r\n \"2603:1030:409::/48\",\r\n \"2603:1030:40a::/64\"\ - ,\r\n \"2603:1030:40a:1::/64\",\r\n \"2603:1030:40a:2::/64\"\ - ,\r\n \"2603:1030:40a:3::/64\",\r\n \"2603:1030:40a:4::/62\"\ - ,\r\n \"2603:1030:40a:8::/63\",\r\n \"2603:1030:40b::/48\"\ - ,\r\n \"2603:1030:40c::/48\",\r\n \"2603:1030:40d::/60\"\ - ,\r\n \"2603:1030:40d:4000::/50\",\r\n \"2603:1030:40d:8000::/49\"\ - ,\r\n \"2603:1030:40e::/56\",\r\n \"2603:1030:40e:100::/56\"\ - ,\r\n \"2603:1030:40f::/48\",\r\n \"2603:1030:410::/48\"\ - ,\r\n \"2603:1030:500::/47\",\r\n \"2603:1030:503::/48\"\ - ,\r\n \"2603:1030:504::/47\",\r\n \"2603:1030:600::/46\"\ - ,\r\n \"2603:1030:604::/47\",\r\n \"2603:1030:607::/48\"\ - ,\r\n \"2603:1030:608::/47\",\r\n \"2603:1030:800::/48\"\ - ,\r\n \"2603:1030:802::/47\",\r\n \"2603:1030:804::/58\"\ - ,\r\n \"2603:1030:804:40::/60\",\r\n \"2603:1030:804:50::/63\"\ - ,\r\n \"2603:1030:804:52::/64\",\r\n \"2603:1030:804:53::/64\"\ - ,\r\n \"2603:1030:804:54::/64\",\r\n \"2603:1030:804:55::/64\"\ - ,\r\n \"2603:1030:804:56::/63\",\r\n \"2603:1030:804:58::/63\"\ - ,\r\n \"2603:1030:804:5a::/64\",\r\n \"2603:1030:804:5b::/64\"\ - ,\r\n \"2603:1030:804:5c::/62\",\r\n \"2603:1030:804:60::/62\"\ - ,\r\n \"2603:1030:804:64::/63\",\r\n \"2603:1030:804:66::/64\"\ - ,\r\n \"2603:1030:804:67::/64\",\r\n \"2603:1030:804:68::/61\"\ - ,\r\n \"2603:1030:804:70::/60\",\r\n \"2603:1030:804:80::/59\"\ - ,\r\n \"2603:1030:804:a0::/62\",\r\n \"2603:1030:804:a4::/64\"\ - ,\r\n \"2603:1030:804:a5::/64\",\r\n \"2603:1030:804:a6::/63\"\ - ,\r\n \"2603:1030:804:a8::/61\",\r\n \"2603:1030:804:b0::/62\"\ - ,\r\n \"2603:1030:804:b4::/64\",\r\n \"2603:1030:804:b5::/64\"\ - ,\r\n \"2603:1030:804:b6::/63\",\r\n \"2603:1030:804:b8::/61\"\ - ,\r\n \"2603:1030:804:c0::/61\",\r\n \"2603:1030:804:c8::/62\"\ - ,\r\n \"2603:1030:804:cc::/63\",\r\n \"2603:1030:804:ce::/63\"\ - ,\r\n \"2603:1030:804:d0::/63\",\r\n \"2603:1030:804:d2::/63\"\ - ,\r\n \"2603:1030:804:d4::/62\",\r\n \"2603:1030:804:d8::/61\"\ - ,\r\n \"2603:1030:804:e0::/59\",\r\n \"2603:1030:804:100::/58\"\ - ,\r\n \"2603:1030:804:140::/60\",\r\n \"2603:1030:804:150::/63\"\ - ,\r\n \"2603:1030:805::/48\",\r\n \"2603:1030:806::/48\"\ - ,\r\n \"2603:1030:807::/48\",\r\n \"2603:1030:809::/48\"\ - ,\r\n \"2603:1030:80a::/56\",\r\n \"2603:1030:80b::/48\"\ - ,\r\n \"2603:1030:80c::/48\",\r\n \"2603:1030:a00::/46\"\ - ,\r\n \"2603:1030:a04::/48\",\r\n \"2603:1030:a06::/48\"\ - ,\r\n \"2603:1030:a07::/48\",\r\n \"2603:1030:a08::/48\"\ - ,\r\n \"2603:1030:a09::/56\",\r\n \"2603:1030:a0a::/48\"\ - ,\r\n \"2603:1030:b00::/47\",\r\n \"2603:1030:b03::/48\"\ - ,\r\n \"2603:1030:b04::/48\",\r\n \"2603:1030:b05::/48\"\ - ,\r\n \"2603:1030:b06::/48\",\r\n \"2603:1030:c00::/48\"\ - ,\r\n \"2603:1030:c02::/47\",\r\n \"2603:1030:c04::/48\"\ - ,\r\n \"2603:1030:c05::/48\",\r\n \"2603:1030:c06::/48\"\ - ,\r\n \"2603:1030:c07::/48\",\r\n \"2603:1030:d00::/47\"\ - ,\r\n \"2603:1030:e01:2::/64\",\r\n \"2603:1030:f00::/47\"\ - ,\r\n \"2603:1030:f02::/48\",\r\n \"2603:1030:f04::/48\"\ - ,\r\n \"2603:1030:f05::/48\",\r\n \"2603:1030:f06::/48\"\ - ,\r\n \"2603:1030:f07::/56\",\r\n \"2603:1030:f08::/48\"\ - ,\r\n \"2603:1030:1000::/47\",\r\n \"2603:1030:1002::/48\"\ - ,\r\n \"2603:1030:1004::/48\",\r\n \"2603:1030:1005::/48\"\ - ,\r\n \"2603:1030:1006::/48\",\r\n \"2603:1036:903::/64\"\ - ,\r\n \"2603:1036:903:1::/64\",\r\n \"2603:1036:903:2::/64\"\ - ,\r\n \"2603:1036:903:3::/64\",\r\n \"2603:1036:9ff:ffff::/64\"\ - ,\r\n \"2603:1036:d20::/64\",\r\n \"2603:1036:120d::/48\"\ - ,\r\n \"2603:1036:2400::/48\",\r\n \"2603:1036:2401::/48\"\ - ,\r\n \"2603:1036:2402::/48\",\r\n \"2603:1036:2403::/48\"\ - ,\r\n \"2603:1036:2404::/48\",\r\n \"2603:1036:2405::/48\"\ - ,\r\n \"2603:1036:2406::/48\",\r\n \"2603:1036:2407::/48\"\ - ,\r\n \"2603:1036:2408::/48\",\r\n \"2603:1036:2409::/48\"\ - ,\r\n \"2603:1036:240a::/48\",\r\n \"2603:1036:240b::/48\"\ - ,\r\n \"2603:1036:240c::/48\",\r\n \"2603:1036:240d::/48\"\ - ,\r\n \"2603:1036:240e::/48\",\r\n \"2603:1036:240f::/48\"\ - ,\r\n \"2603:1036:2500::/64\",\r\n \"2603:1036:2500:4::/64\"\ - ,\r\n \"2603:1036:2500:8::/64\",\r\n \"2603:1036:2500:c::/64\"\ - ,\r\n \"2603:1036:2500:10::/64\",\r\n \"2603:1036:2500:14::/64\"\ - ,\r\n \"2603:1036:2500:18::/63\",\r\n \"2603:1036:2500:1c::/64\"\ - ,\r\n \"2603:1036:2500:20::/64\",\r\n \"2603:1036:2500:24::/64\"\ - ,\r\n \"2603:1036:2500:28::/64\",\r\n \"2603:1036:2500:2c::/64\"\ - ,\r\n \"2603:1036:2500:30::/64\",\r\n \"2603:1036:2500:34::/64\"\ - ,\r\n \"2603:1036:2500:38::/64\",\r\n \"2603:1036:3000::/59\"\ - ,\r\n \"2603:1036:3000:20::/59\",\r\n \"2603:1036:3000:40::/59\"\ - ,\r\n \"2603:1036:3000:60::/59\",\r\n \"2603:1036:3000:80::/59\"\ - ,\r\n \"2603:1036:3000:a0::/59\",\r\n \"2603:1036:3000:c0::/59\"\ - ,\r\n \"2603:1036:3000:e0::/59\",\r\n \"2603:1036:3000:100::/59\"\ - ,\r\n \"2603:1036:3000:120::/59\",\r\n \"2603:1036:3000:140::/59\"\ - ,\r\n \"2603:1036:3000:160::/59\",\r\n \"2603:1036:3000:180::/59\"\ - ,\r\n \"2603:1036:3000:1a0::/59\",\r\n \"2603:1036:3000:1c0::/59\"\ - ,\r\n \"2603:1037:1::/59\",\r\n \"2603:1037:1:20::/59\"\ - ,\r\n \"2603:1037:1:40::/59\",\r\n \"2603:1037:1:60::/59\"\ - ,\r\n \"2603:1037:1:80::/59\",\r\n \"2603:1037:1:a0::/59\"\ - ,\r\n \"2603:1037:1:c0::/59\",\r\n \"2603:1037:1:e0::/59\"\ - ,\r\n \"2603:1037:1:100::/59\",\r\n \"2603:1037:1:120::/59\"\ - ,\r\n \"2603:1037:1:140::/59\",\r\n \"2603:1037:1:160::/59\"\ - ,\r\n \"2603:1037:1:180::/59\",\r\n \"2603:1037:1:1a0::/59\"\ - ,\r\n \"2603:1037:1:1c0::/59\",\r\n \"2603:1039:205::/48\"\ - ,\r\n \"2603:1040::/47\",\r\n \"2603:1040:2::/48\",\r\n\ - \ \"2603:1040:4::/48\",\r\n \"2603:1040:5::/48\",\r\n \ - \ \"2603:1040:6::/48\",\r\n \"2603:1040:100::/47\",\r\n \ - \ \"2603:1040:102::/48\",\r\n \"2603:1040:103::/48\",\r\n\ - \ \"2603:1040:104::/48\",\r\n \"2603:1040:200::/46\",\r\n\ - \ \"2603:1040:204::/48\",\r\n \"2603:1040:206::/48\",\r\n\ - \ \"2603:1040:207::/48\",\r\n \"2603:1040:208::/48\",\r\n\ - \ \"2603:1040:400::/46\",\r\n \"2603:1040:404::/48\",\r\n\ - \ \"2603:1040:406::/48\",\r\n \"2603:1040:407::/48\",\r\n\ - \ \"2603:1040:408::/48\",\r\n \"2603:1040:600::/46\",\r\n\ - \ \"2603:1040:605::/48\",\r\n \"2603:1040:606::/47\",\r\n\ - \ \"2603:1040:800::/46\",\r\n \"2603:1040:805::/48\",\r\n\ - \ \"2603:1040:806::/47\",\r\n \"2603:1040:900::/47\",\r\n\ - \ \"2603:1040:903::/48\",\r\n \"2603:1040:904::/47\",\r\n\ - \ \"2603:1040:a00::/46\",\r\n \"2603:1040:a05::/48\",\r\n\ - \ \"2603:1040:a06::/47\",\r\n \"2603:1040:b00::/47\",\r\n\ - \ \"2603:1040:b03::/48\",\r\n \"2603:1040:b04::/47\",\r\n\ - \ \"2603:1040:c00::/46\",\r\n \"2603:1040:c05::/48\",\r\n\ - \ \"2603:1040:c06::/47\",\r\n \"2603:1040:d00::/47\",\r\n\ - \ \"2603:1040:d03::/48\",\r\n \"2603:1040:d04::/48\",\r\n\ - \ \"2603:1040:e00::/47\",\r\n \"2603:1040:e02::/48\",\r\n\ - \ \"2603:1040:e04::/48\",\r\n \"2603:1040:e05::/48\",\r\n\ - \ \"2603:1040:e06::/48\",\r\n \"2603:1040:f00::/47\",\r\n\ - \ \"2603:1040:f02::/48\",\r\n \"2603:1040:f04::/48\",\r\n\ - \ \"2603:1040:f05::/48\",\r\n \"2603:1040:f06::/48\",\r\n\ - \ \"2603:1040:1001::/48\",\r\n \"2603:1040:1002::/48\",\r\ - \n \"2603:1040:1003::/48\",\r\n \"2603:1040:1004::/48\"\ - ,\r\n \"2603:1040:1100::/47\",\r\n \"2603:1040:1103::/48\"\ - ,\r\n \"2603:1040:1104::/48\",\r\n \"2603:1046:1400::/48\"\ - ,\r\n \"2603:1046:1401::/48\",\r\n \"2603:1046:1402::/48\"\ - ,\r\n \"2603:1046:1403::/48\",\r\n \"2603:1046:1404::/48\"\ - ,\r\n \"2603:1046:1405::/48\",\r\n \"2603:1046:1406::/48\"\ - ,\r\n \"2603:1046:1407::/48\",\r\n \"2603:1046:1408::/48\"\ - ,\r\n \"2603:1046:1409::/48\",\r\n \"2603:1046:140a::/48\"\ - ,\r\n \"2603:1046:140b::/48\",\r\n \"2603:1046:1500::/64\"\ - ,\r\n \"2603:1046:1500:4::/64\",\r\n \"2603:1046:1500:8::/64\"\ - ,\r\n \"2603:1046:1500:c::/64\",\r\n \"2603:1046:1500:10::/64\"\ - ,\r\n \"2603:1046:1500:14::/64\",\r\n \"2603:1046:1500:18::/64\"\ - ,\r\n \"2603:1046:1500:1c::/64\",\r\n \"2603:1046:1500:20::/64\"\ - ,\r\n \"2603:1046:1500:24::/64\",\r\n \"2603:1046:1500:28::/64\"\ - ,\r\n \"2603:1046:1500:2c::/64\",\r\n \"2603:1046:1500:30::/64\"\ - ,\r\n \"2603:1046:1500:34::/64\",\r\n \"2603:1046:2000:20::/59\"\ - ,\r\n \"2603:1046:2000:40::/59\",\r\n \"2603:1046:2000:60::/59\"\ - ,\r\n \"2603:1046:2000:80::/59\",\r\n \"2603:1046:2000:a0::/59\"\ - ,\r\n \"2603:1046:2000:e0::/59\",\r\n \"2603:1046:2000:100::/59\"\ - ,\r\n \"2603:1046:2000:120::/59\",\r\n \"2603:1046:2000:140::/59\"\ - ,\r\n \"2603:1046:2000:160::/59\",\r\n \"2603:1046:2000:180::/59\"\ - ,\r\n \"2603:1046:2000:1a0::/59\",\r\n \"2603:1046:2000:1c0::/59\"\ - ,\r\n \"2603:1046:2000:1e0::/59\",\r\n \"2603:1047:1:20::/59\"\ - ,\r\n \"2603:1047:1:40::/59\",\r\n \"2603:1047:1:60::/59\"\ - ,\r\n \"2603:1047:1:80::/59\",\r\n \"2603:1047:1:a0::/59\"\ - ,\r\n \"2603:1047:1:e0::/59\",\r\n \"2603:1047:1:100::/59\"\ - ,\r\n \"2603:1047:1:120::/59\",\r\n \"2603:1047:1:140::/59\"\ - ,\r\n \"2603:1047:1:160::/59\",\r\n \"2603:1047:1:180::/59\"\ - ,\r\n \"2603:1047:1:1a0::/59\",\r\n \"2603:1047:1:1c0::/59\"\ - ,\r\n \"2603:1047:1:1e0::/59\",\r\n \"2603:1050:1::/48\"\ - ,\r\n \"2603:1050:2::/47\",\r\n \"2603:1050:5::/48\",\r\n\ - \ \"2603:1050:6::/47\",\r\n \"2603:1050:100::/40\",\r\n\ - \ \"2603:1050:211::/48\",\r\n \"2603:1050:214::/48\",\r\n\ - \ \"2603:1050:300::/40\",\r\n \"2603:1050:400::/48\",\r\n\ - \ \"2603:1050:402::/48\",\r\n \"2603:1050:403::/48\",\r\n\ - \ \"2603:1050:404::/48\",\r\n \"2603:1056:1400::/48\",\r\ - \n \"2603:1056:1401::/48\",\r\n \"2603:1056:1402::/48\"\ - ,\r\n \"2603:1056:1403::/48\",\r\n \"2603:1056:1500::/64\"\ - ,\r\n \"2603:1056:1500:4::/64\",\r\n \"2603:1056:1500:c::/64\"\ - ,\r\n \"2603:1056:2000:20::/59\",\r\n \"2603:1056:2000:60::/59\"\ - ,\r\n \"2603:1057:2:20::/59\",\r\n \"2603:1057:2:60::/59\"\ - ,\r\n \"2603:1061:1000::/48\",\r\n \"2603:1061:1001::/48\"\ - ,\r\n \"2603:1061:1002::/48\",\r\n \"2603:1061:1003::/48\"\ - ,\r\n \"2603:1061:1004::/61\",\r\n \"2603:1061:1004:8::/62\"\ - ,\r\n \"2603:1061:1004:c::/63\",\r\n \"2603:1062:2::/57\"\ - ,\r\n \"2603:1062:2:80::/57\",\r\n \"2a01:111:f100:1000::/62\"\ - ,\r\n \"2a01:111:f100:1004::/63\",\r\n \"2a01:111:f100:2000::/52\"\ - ,\r\n \"2a01:111:f100:3000::/52\",\r\n \"2a01:111:f100:4002::/64\"\ - ,\r\n \"2a01:111:f100:5000::/52\",\r\n \"2a01:111:f100:6000::/64\"\ - ,\r\n \"2a01:111:f100:a000::/63\",\r\n \"2a01:111:f100:a002::/64\"\ - ,\r\n \"2a01:111:f100:a004::/64\",\r\n \"2a01:111:f403:c000::/64\"\ - ,\r\n \"2a01:111:f403:c004::/62\",\r\n \"2a01:111:f403:c100::/64\"\ - ,\r\n \"2a01:111:f403:c10c::/62\",\r\n \"2a01:111:f403:c110::/64\"\ - ,\r\n \"2a01:111:f403:c111::/64\",\r\n \"2a01:111:f403:c112::/64\"\ - ,\r\n \"2a01:111:f403:c113::/64\",\r\n \"2a01:111:f403:c114::/64\"\ - ,\r\n \"2a01:111:f403:c200::/64\",\r\n \"2a01:111:f403:c201::/64\"\ - ,\r\n \"2a01:111:f403:c202::/64\",\r\n \"2a01:111:f403:c203::/64\"\ - ,\r\n \"2a01:111:f403:c400::/64\",\r\n \"2a01:111:f403:c401::/64\"\ - ,\r\n \"2a01:111:f403:c800::/64\",\r\n \"2a01:111:f403:c804::/62\"\ - ,\r\n \"2a01:111:f403:c900::/64\",\r\n \"2a01:111:f403:c904::/62\"\ - ,\r\n \"2a01:111:f403:c908::/62\",\r\n \"2a01:111:f403:c90c::/62\"\ - ,\r\n \"2a01:111:f403:c910::/62\",\r\n \"2a01:111:f403:c914::/62\"\ - ,\r\n \"2a01:111:f403:c918::/64\",\r\n \"2a01:111:f403:c919::/64\"\ - ,\r\n \"2a01:111:f403:c91a::/63\",\r\n \"2a01:111:f403:c91c::/63\"\ - ,\r\n \"2a01:111:f403:c91e::/63\",\r\n \"2a01:111:f403:c920::/63\"\ - ,\r\n \"2a01:111:f403:c922::/64\",\r\n \"2a01:111:f403:c923::/64\"\ - ,\r\n \"2a01:111:f403:c924::/62\",\r\n \"2a01:111:f403:c928::/62\"\ - ,\r\n \"2a01:111:f403:c92c::/64\",\r\n \"2a01:111:f403:c92d::/64\"\ - ,\r\n \"2a01:111:f403:c92e::/63\",\r\n \"2a01:111:f403:c930::/63\"\ - ,\r\n \"2a01:111:f403:c932::/63\",\r\n \"2a01:111:f403:c934::/63\"\ - ,\r\n \"2a01:111:f403:c936::/64\",\r\n \"2a01:111:f403:c937::/64\"\ - ,\r\n \"2a01:111:f403:c938::/62\",\r\n \"2a01:111:f403:c93c::/62\"\ - ,\r\n \"2a01:111:f403:c940::/64\",\r\n \"2a01:111:f403:ca00::/62\"\ - ,\r\n \"2a01:111:f403:ca04::/64\",\r\n \"2a01:111:f403:ca05::/64\"\ - ,\r\n \"2a01:111:f403:ca06::/63\",\r\n \"2a01:111:f403:ca08::/63\"\ - ,\r\n \"2a01:111:f403:ca10::/64\",\r\n \"2a01:111:f403:ca11::/64\"\ - ,\r\n \"2a01:111:f403:ca12::/63\",\r\n \"2a01:111:f403:ca14::/64\"\ - ,\r\n \"2a01:111:f403:ca16::/63\",\r\n \"2a01:111:f403:ca18::/63\"\ - ,\r\n \"2a01:111:f403:cc00::/62\",\r\n \"2a01:111:f403:cc04::/64\"\ - ,\r\n \"2a01:111:f403:cc05::/64\",\r\n \"2a01:111:f403:cc06::/63\"\ - ,\r\n \"2a01:111:f403:cc08::/63\",\r\n \"2a01:111:f403:d000::/64\"\ - ,\r\n \"2a01:111:f403:d004::/62\",\r\n \"2a01:111:f403:d100::/64\"\ - ,\r\n \"2a01:111:f403:d104::/62\",\r\n \"2a01:111:f403:d108::/62\"\ - ,\r\n \"2a01:111:f403:d10c::/62\",\r\n \"2a01:111:f403:d120::/62\"\ - ,\r\n \"2a01:111:f403:d124::/64\",\r\n \"2a01:111:f403:d125::/64\"\ - ,\r\n \"2a01:111:f403:d200::/64\",\r\n \"2a01:111:f403:d201::/64\"\ - ,\r\n \"2a01:111:f403:d202::/64\",\r\n \"2a01:111:f403:d203::/64\"\ - ,\r\n \"2a01:111:f403:d401::/64\",\r\n \"2a01:111:f403:d402::/64\"\ - ,\r\n \"2a01:111:f403:d800::/64\",\r\n \"2a01:111:f403:d804::/62\"\ - ,\r\n \"2a01:111:f403:d900::/64\",\r\n \"2a01:111:f403:d904::/62\"\ - ,\r\n \"2a01:111:f403:d908::/62\",\r\n \"2a01:111:f403:d90c::/62\"\ - ,\r\n \"2a01:111:f403:d910::/62\",\r\n \"2a01:111:f403:d914::/64\"\ - ,\r\n \"2a01:111:f403:d915::/64\",\r\n \"2a01:111:f403:da00::/64\"\ - ,\r\n \"2a01:111:f403:da01::/64\",\r\n \"2a01:111:f403:da02::/64\"\ - ,\r\n \"2a01:111:f403:da03::/64\",\r\n \"2a01:111:f403:dc00::/64\"\ - ,\r\n \"2a01:111:f403:dc01::/64\",\r\n \"2a01:111:f403:e000::/64\"\ - ,\r\n \"2a01:111:f403:e003::/64\",\r\n \"2a01:111:f403:e004::/62\"\ - ,\r\n \"2a01:111:f403:e008::/62\",\r\n \"2a01:111:f403:e00c::/62\"\ - ,\r\n \"2a01:111:f403:e010::/62\",\r\n \"2a01:111:f403:e014::/64\"\ - ,\r\n \"2a01:111:f403:e200::/64\",\r\n \"2a01:111:f403:e201::/64\"\ - ,\r\n \"2a01:111:f403:e202::/64\",\r\n \"2a01:111:f403:e203::/64\"\ - ,\r\n \"2a01:111:f403:e400::/64\",\r\n \"2a01:111:f403:e401::/64\"\ - ,\r\n \"2a01:111:f403:f000::/64\",\r\n \"2a01:111:f403:f800::/62\"\ - ,\r\n \"2a01:111:f403:f804::/62\",\r\n \"2a01:111:f403:f900::/62\"\ - ,\r\n \"2a01:111:f403:f904::/62\",\r\n \"2a01:111:f403:f908::/62\"\ - ,\r\n \"2a01:111:f403:f90c::/62\",\r\n \"2a01:111:f403:f910::/62\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.australiacentral\"\ - ,\r\n \"id\": \"AzureCloud.australiacentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.155.128/26\",\r\n \"13.105.27.160/27\"\ - ,\r\n \"20.36.32.0/19\",\r\n \"20.36.104.0/21\",\r\n \ - \ \"20.37.0.0/18\",\r\n \"20.37.224.0/19\",\r\n \"\ - 20.38.184.0/22\",\r\n \"20.39.64.0/21\",\r\n \"20.47.35.0/24\"\ - ,\r\n \"20.53.0.0/19\",\r\n \"20.53.48.0/21\",\r\n \ - \ \"20.60.214.0/23\",\r\n \"20.70.0.0/18\",\r\n \"20.135.52.0/23\"\ - ,\r\n \"20.150.124.0/24\",\r\n \"20.157.0.0/24\",\r\n \ - \ \"20.157.101.0/24\",\r\n \"20.157.138.0/24\",\r\n \ - \ \"20.190.189.64/26\",\r\n \"40.82.240.0/22\",\r\n \"\ - 40.90.130.48/28\",\r\n \"40.90.142.96/27\",\r\n \"40.90.149.64/27\"\ - ,\r\n \"40.126.61.64/26\",\r\n \"52.108.74.0/24\",\r\n \ - \ \"52.108.95.0/24\",\r\n \"52.109.128.0/22\",\r\n \ - \ \"52.111.248.0/24\",\r\n \"52.143.219.0/24\",\r\n \"\ - 52.239.216.0/23\",\r\n \"2603:1010:300::/47\",\r\n \"2603:1010:303::/48\"\ - ,\r\n \"2603:1010:304::/47\",\r\n \"2603:1016:1400:20::/59\"\ - ,\r\n \"2603:1016:2400::/48\",\r\n \"2603:1016:2500:4::/64\"\ - ,\r\n \"2603:1017:0:20::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.australiacentral2\",\r\n \"id\"\ - : \"AzureCloud.australiacentral2\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.158.224/27\",\r\n \"20.36.64.0/19\",\r\n\ - \ \"20.36.112.0/20\",\r\n \"20.39.72.0/21\",\r\n \ - \ \"20.39.96.0/19\",\r\n \"20.47.36.0/24\",\r\n \"20.53.56.0/21\"\ - ,\r\n \"20.135.54.0/23\",\r\n \"20.150.103.0/24\",\r\n \ - \ \"20.157.1.0/24\",\r\n \"20.190.189.128/26\",\r\n \ - \ \"20.193.96.0/19\",\r\n \"40.82.244.0/22\",\r\n \"\ - 40.90.31.96/27\",\r\n \"40.90.130.32/28\",\r\n \"40.90.142.64/27\"\ - ,\r\n \"40.90.149.32/27\",\r\n \"40.126.61.128/26\",\r\n\ - \ \"40.126.128.0/18\",\r\n \"52.108.180.0/24\",\r\n \ - \ \"52.108.201.0/24\",\r\n \"52.109.100.0/23\",\r\n \ - \ \"52.111.249.0/24\",\r\n \"52.143.218.0/24\",\r\n \"\ - 52.239.218.0/23\",\r\n \"2603:1010:400::/47\",\r\n \"2603:1010:403::/48\"\ - ,\r\n \"2603:1010:404::/47\",\r\n \"2603:1016:1400:40::/59\"\ - ,\r\n \"2603:1016:2401::/48\",\r\n \"2603:1016:2500:8::/64\"\ - ,\r\n \"2603:1017:0:40::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.australiaeast\",\r\n \"id\":\ - \ \"AzureCloud.australiaeast\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.70.64.0/18\",\r\n \"13.72.224.0/19\",\r\n \ - \ \"13.73.192.0/20\",\r\n \"13.75.128.0/17\",\r\n \ - \ \"13.104.211.128/26\",\r\n \"13.105.16.192/26\",\r\n \ - \ \"13.105.20.128/26\",\r\n \"13.105.52.192/26\",\r\n \"\ - 13.105.53.128/26\",\r\n \"20.37.192.0/19\",\r\n \"20.38.112.0/23\"\ - ,\r\n \"20.40.64.0/20\",\r\n \"20.40.80.0/21\",\r\n \ - \ \"20.40.120.0/21\",\r\n \"20.40.176.0/20\",\r\n \"\ - 20.42.192.0/19\",\r\n \"20.43.96.0/20\",\r\n \"20.47.37.0/24\"\ - ,\r\n \"20.47.122.0/23\",\r\n \"20.53.32.0/28\",\r\n \ - \ \"20.53.40.0/21\",\r\n \"20.53.64.0/18\",\r\n \"\ - 20.53.128.0/17\",\r\n \"20.58.128.0/18\",\r\n \"20.60.72.0/22\"\ - ,\r\n \"20.60.182.0/23\",\r\n \"20.70.128.0/17\",\r\n \ - \ \"20.92.64.0/18\",\r\n \"20.92.128.0/17\",\r\n \ - \ \"20.135.120.0/21\",\r\n \"20.150.66.0/24\",\r\n \"20.150.92.0/24\"\ - ,\r\n \"20.150.117.0/24\",\r\n \"20.157.44.0/24\",\r\n \ - \ \"20.157.107.0/24\",\r\n \"20.157.155.0/24\",\r\n \ - \ \"20.188.128.0/17\",\r\n \"20.190.142.0/25\",\r\n \ - \ \"20.190.167.0/24\",\r\n \"20.191.192.0/18\",\r\n \"20.193.0.0/18\"\ - ,\r\n \"20.193.64.0/19\",\r\n \"20.211.0.0/18\",\r\n \ - \ \"23.101.208.0/20\",\r\n \"40.79.160.0/20\",\r\n \ - \ \"40.79.211.0/24\",\r\n \"40.82.32.0/22\",\r\n \"40.82.192.0/19\"\ - ,\r\n \"40.87.208.0/22\",\r\n \"40.90.18.0/28\",\r\n \ - \ \"40.90.30.0/25\",\r\n \"40.90.130.80/28\",\r\n \ - \ \"40.90.130.208/28\",\r\n \"40.90.140.32/27\",\r\n \"\ - 40.90.142.160/27\",\r\n \"40.90.147.64/27\",\r\n \"40.90.150.0/27\"\ - ,\r\n \"40.112.37.128/26\",\r\n \"40.126.14.0/25\",\r\n\ - \ \"40.126.39.0/24\",\r\n \"40.126.224.0/19\",\r\n \ - \ \"52.108.40.0/23\",\r\n \"52.108.83.0/24\",\r\n \"\ - 52.109.112.0/22\",\r\n \"52.111.224.0/24\",\r\n \"52.113.88.0/22\"\ - ,\r\n \"52.113.103.0/24\",\r\n \"52.114.16.0/22\",\r\n \ - \ \"52.114.58.0/23\",\r\n \"52.114.192.0/23\",\r\n \ - \ \"52.115.98.0/24\",\r\n \"52.120.158.0/23\",\r\n \"\ - 52.121.108.0/22\",\r\n \"52.143.199.0/24\",\r\n \"52.143.200.0/23\"\ - ,\r\n \"52.147.0.0/19\",\r\n \"52.156.160.0/19\",\r\n \ - \ \"52.187.192.0/18\",\r\n \"52.232.136.0/21\",\r\n \ - \ \"52.232.154.0/24\",\r\n \"52.237.192.0/18\",\r\n \"\ - 52.239.130.0/23\",\r\n \"52.239.226.0/24\",\r\n \"52.245.16.0/22\"\ - ,\r\n \"104.44.90.64/26\",\r\n \"104.44.93.96/27\",\r\n\ - \ \"104.44.95.48/28\",\r\n \"104.46.29.0/24\",\r\n \ - \ \"104.46.30.0/23\",\r\n \"104.209.80.0/20\",\r\n \"\ - 104.210.64.0/18\",\r\n \"191.238.66.0/23\",\r\n \"191.239.64.0/19\"\ - ,\r\n \"2603:1010::/46\",\r\n \"2603:1010:5::/48\",\r\n\ - \ \"2603:1010:6::/47\",\r\n \"2603:1016:1400:60::/59\",\r\ - \n \"2603:1016:2402::/48\",\r\n \"2603:1016:2500:c::/64\"\ - ,\r\n \"2603:1017:0:60::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.australiasoutheast\",\r\n \"\ - id\": \"AzureCloud.australiasoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\"\r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.70.128.0/18\",\r\n \"13.73.96.0/19\",\r\n \ - \ \"13.77.0.0/18\",\r\n \"20.40.160.0/20\",\r\n \ - \ \"20.42.224.0/19\",\r\n \"20.45.144.0/20\",\r\n \"20.46.96.0/20\"\ - ,\r\n \"20.47.38.0/24\",\r\n \"20.47.74.0/23\",\r\n \ - \ \"20.58.192.0/18\",\r\n \"20.60.32.0/23\",\r\n \"\ - 20.70.64.0/18\",\r\n \"20.92.0.0/18\",\r\n \"20.135.50.0/23\"\ - ,\r\n \"20.150.12.0/23\",\r\n \"20.150.119.0/24\",\r\n \ - \ \"20.157.45.0/24\",\r\n \"20.190.96.0/19\",\r\n \ - \ \"20.190.142.128/25\",\r\n \"20.190.168.0/24\",\r\n \ - \ \"20.202.61.0/24\",\r\n \"23.101.224.0/19\",\r\n \"40.79.212.0/24\"\ - ,\r\n \"40.81.48.0/20\",\r\n \"40.87.212.0/22\",\r\n \ - \ \"40.90.24.0/25\",\r\n \"40.90.27.0/26\",\r\n \"\ - 40.90.138.128/27\",\r\n \"40.90.155.64/26\",\r\n \"40.112.37.192/26\"\ - ,\r\n \"40.115.64.0/19\",\r\n \"40.126.14.128/25\",\r\n\ - \ \"40.126.40.0/24\",\r\n \"40.127.64.0/19\",\r\n \ - \ \"52.108.194.0/24\",\r\n \"52.108.234.0/23\",\r\n \"\ - 52.109.116.0/22\",\r\n \"52.111.250.0/24\",\r\n \"52.113.13.0/24\"\ - ,\r\n \"52.113.76.0/23\",\r\n \"52.114.20.0/22\",\r\n \ - \ \"52.114.60.0/23\",\r\n \"52.115.99.0/24\",\r\n \ - \ \"52.121.106.0/23\",\r\n \"52.136.25.0/24\",\r\n \"52.147.32.0/19\"\ - ,\r\n \"52.158.128.0/19\",\r\n \"52.189.192.0/18\",\r\n\ - \ \"52.239.132.0/23\",\r\n \"52.239.225.0/24\",\r\n \ - \ \"52.243.64.0/18\",\r\n \"52.245.20.0/22\",\r\n \"\ - 52.255.32.0/19\",\r\n \"104.44.90.32/27\",\r\n \"104.44.93.128/27\"\ - ,\r\n \"104.44.95.64/28\",\r\n \"104.46.28.0/24\",\r\n \ - \ \"104.46.160.0/19\",\r\n \"104.209.64.0/20\",\r\n \ - \ \"191.239.160.0/19\",\r\n \"191.239.192.0/22\",\r\n \ - \ \"2603:1010:100::/40\",\r\n \"2603:1010:200::/47\",\r\n \ - \ \"2603:1010:202::/48\",\r\n \"2603:1010:204::/48\",\r\n \ - \ \"2603:1010:205::/48\",\r\n \"2603:1010:206::/48\",\r\n \ - \ \"2603:1016:1400::/59\",\r\n \"2603:1016:2403::/48\",\r\ - \n \"2603:1016:2500::/64\",\r\n \"2603:1017::/59\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.brazilse\"\ - ,\r\n \"id\": \"AzureCloud.brazilse\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.105.27.128/27\",\r\n \"13.105.36.48/28\",\r\ - \n \"13.105.36.96/27\",\r\n \"13.105.52.0/27\",\r\n \ - \ \"20.40.32.0/21\",\r\n \"20.135.76.0/23\",\r\n \"\ - 20.150.73.0/24\",\r\n \"20.150.80.0/24\",\r\n \"20.150.123.0/24\"\ - ,\r\n \"20.157.42.0/24\",\r\n \"20.195.128.0/22\",\r\n \ - \ \"20.195.144.0/21\",\r\n \"20.206.0.0/18\",\r\n \ - \ \"23.97.112.192/27\",\r\n \"23.97.116.0/22\",\r\n \"\ - 23.97.120.0/21\",\r\n \"40.79.204.192/26\",\r\n \"40.123.128.0/22\"\ - ,\r\n \"40.126.207.0/24\",\r\n \"52.108.111.0/24\",\r\n\ - \ \"52.108.112.0/24\",\r\n \"52.109.164.0/24\",\r\n \ - \ \"52.111.207.0/24\",\r\n \"52.112.206.0/24\",\r\n \ - \ \"52.253.197.0/24\",\r\n \"191.232.16.0/21\",\r\n \"\ - 191.233.8.0/21\",\r\n \"191.233.48.0/21\",\r\n \"191.233.160.0/19\"\ - ,\r\n \"191.234.224.0/19\",\r\n \"191.237.224.0/21\",\r\n\ - \ \"2603:1050:400::/48\",\r\n \"2603:1050:402::/48\",\r\n\ - \ \"2603:1050:403::/48\",\r\n \"2603:1050:404::/48\",\r\n\ - \ \"2603:1056:1403::/48\",\r\n \"2603:1056:1500:4::/64\"\ - ,\r\n \"2603:1056:2000:60::/59\",\r\n \"2603:1057:2:60::/59\"\ - ,\r\n \"2603:1061:1002::/48\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.brazilsouth\",\r\n \"id\": \"\ - AzureCloud.brazilsouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"\ - region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"\",\r\n \"addressPrefixes\": [\r\n \"13.105.52.80/28\"\ - ,\r\n \"13.105.52.128/26\",\r\n \"20.40.16.0/21\",\r\n \ - \ \"20.40.112.0/21\",\r\n \"20.47.39.0/24\",\r\n \ - \ \"20.47.86.0/24\",\r\n \"20.60.36.0/23\",\r\n \"20.135.128.0/22\"\ - ,\r\n \"20.135.132.0/23\",\r\n \"20.150.111.0/24\",\r\n\ - \ \"20.157.55.0/24\",\r\n \"20.190.145.0/25\",\r\n \ - \ \"20.190.173.0/24\",\r\n \"20.195.136.0/21\",\r\n \ - \ \"20.195.152.0/21\",\r\n \"20.195.160.0/19\",\r\n \"20.195.192.0/18\"\ - ,\r\n \"20.197.128.0/17\",\r\n \"20.201.0.0/17\",\r\n \ - \ \"20.206.64.0/18\",\r\n \"20.206.128.0/18\",\r\n \ - \ \"20.209.12.0/23\",\r\n \"23.97.96.0/20\",\r\n \"23.97.112.0/25\"\ - ,\r\n \"23.97.112.128/28\",\r\n \"23.97.112.160/27\",\r\n\ - \ \"40.90.29.64/26\",\r\n \"40.90.29.128/26\",\r\n \ - \ \"40.90.133.32/27\",\r\n \"40.90.133.144/28\",\r\n \ - \ \"40.90.141.64/27\",\r\n \"40.90.144.224/27\",\r\n \"\ - 40.90.145.96/27\",\r\n \"40.90.145.128/27\",\r\n \"40.90.157.0/27\"\ - ,\r\n \"40.126.17.0/25\",\r\n \"40.126.45.0/24\",\r\n \ - \ \"52.108.36.0/22\",\r\n \"52.108.82.0/24\",\r\n \ - \ \"52.108.171.0/24\",\r\n \"52.108.172.0/23\",\r\n \"\ - 52.109.108.0/22\",\r\n \"52.111.225.0/24\",\r\n \"52.112.118.0/24\"\ - ,\r\n \"52.113.132.0/24\",\r\n \"52.114.194.0/23\",\r\n\ - \ \"52.114.196.0/22\",\r\n \"52.114.200.0/22\",\r\n \ - \ \"52.121.40.0/21\",\r\n \"52.253.185.0/24\",\r\n \ - \ \"52.253.186.0/24\",\r\n \"104.41.0.0/18\",\r\n \"191.232.32.0/19\"\ - ,\r\n \"191.232.160.0/19\",\r\n \"191.232.192.0/18\",\r\n\ - \ \"191.233.0.0/21\",\r\n \"191.233.16.0/20\",\r\n \ - \ \"191.233.128.0/20\",\r\n \"191.233.192.0/18\",\r\n \ - \ \"191.234.128.0/18\",\r\n \"191.234.192.0/19\",\r\n \ - \ \"191.235.32.0/19\",\r\n \"191.235.64.0/18\",\r\n \"191.235.196.0/22\"\ - ,\r\n \"191.235.200.0/21\",\r\n \"191.235.224.0/20\",\r\n\ - \ \"191.235.240.0/21\",\r\n \"191.235.248.0/23\",\r\n \ - \ \"191.235.250.0/25\",\r\n \"191.237.195.0/24\",\r\n \ - \ \"191.237.200.0/21\",\r\n \"191.237.248.0/21\",\r\n \ - \ \"191.238.72.0/21\",\r\n \"191.238.128.0/21\",\r\n \ - \ \"191.238.192.0/19\",\r\n \"191.239.112.0/20\",\r\n \"\ - 191.239.204.0/22\",\r\n \"191.239.240.0/20\",\r\n \"2603:1050:1::/48\"\ - ,\r\n \"2603:1050:2::/47\",\r\n \"2603:1050:5::/48\",\r\n\ - \ \"2603:1050:6::/47\",\r\n \"2603:1056:1400::/48\",\r\n\ - \ \"2603:1056:1500::/64\",\r\n \"2603:1056:2000:20::/59\"\ - ,\r\n \"2603:1057:2:20::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.canadacentral\",\r\n \"id\":\ - \ \"AzureCloud.canadacentral\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.71.160.0/19\",\r\n \"13.88.224.0/19\",\r\n\ - \ \"13.104.151.192/26\",\r\n \"13.104.152.0/25\",\r\n \ - \ \"13.104.208.176/28\",\r\n \"13.104.212.192/26\",\r\n \ - \ \"13.104.223.192/26\",\r\n \"20.38.114.0/25\",\r\n \ - \ \"20.38.144.0/21\",\r\n \"20.39.128.0/20\",\r\n \"\ - 20.43.0.0/19\",\r\n \"20.47.40.0/24\",\r\n \"20.47.87.0/24\"\ - ,\r\n \"20.48.128.0/18\",\r\n \"20.48.192.0/20\",\r\n \ - \ \"20.48.224.0/19\",\r\n \"20.60.42.0/23\",\r\n \ - \ \"20.60.242.0/23\",\r\n \"20.63.0.0/17\",\r\n \"20.104.0.0/17\"\ - ,\r\n \"20.104.192.0/18\",\r\n \"20.135.182.0/23\",\r\n\ - \ \"20.135.184.0/22\",\r\n \"20.150.16.0/24\",\r\n \ - \ \"20.150.31.0/24\",\r\n \"20.150.71.0/24\",\r\n \"\ - 20.150.100.0/24\",\r\n \"20.151.0.0/16\",\r\n \"20.157.52.0/24\"\ - ,\r\n \"20.157.148.0/24\",\r\n \"20.190.139.0/25\",\r\n\ - \ \"20.190.161.0/24\",\r\n \"20.200.64.0/18\",\r\n \ - \ \"40.79.216.0/24\",\r\n \"40.80.44.0/22\",\r\n \"\ - 40.82.160.0/19\",\r\n \"40.85.192.0/18\",\r\n \"40.90.17.144/28\"\ - ,\r\n \"40.90.128.0/28\",\r\n \"40.90.138.32/27\",\r\n \ - \ \"40.90.143.160/27\",\r\n \"40.90.151.96/27\",\r\n \ - \ \"40.126.11.0/25\",\r\n \"40.126.33.0/24\",\r\n \"\ - 52.108.42.0/23\",\r\n \"52.108.84.0/24\",\r\n \"52.109.92.0/22\"\ - ,\r\n \"52.111.251.0/24\",\r\n \"52.114.160.0/22\",\r\n\ - \ \"52.136.23.0/24\",\r\n \"52.136.27.0/24\",\r\n \ - \ \"52.138.0.0/18\",\r\n \"52.139.0.0/18\",\r\n \"52.156.0.0/19\"\ - ,\r\n \"52.228.0.0/17\",\r\n \"52.233.0.0/18\",\r\n \ - \ \"52.237.0.0/18\",\r\n \"52.239.148.64/26\",\r\n \ - \ \"52.239.189.0/24\",\r\n \"52.245.28.0/22\",\r\n \"52.246.152.0/21\"\ - ,\r\n \"52.253.196.0/24\",\r\n \"104.44.93.32/27\",\r\n\ - \ \"104.44.95.16/28\",\r\n \"2603:1030:208::/47\",\r\n \ - \ \"2603:1030:f00::/47\",\r\n \"2603:1030:f02::/48\",\r\n\ - \ \"2603:1030:f04::/48\",\r\n \"2603:1030:f05::/48\",\r\n\ - \ \"2603:1030:f06::/48\",\r\n \"2603:1030:f07::/56\",\r\n\ - \ \"2603:1030:f08::/48\",\r\n \"2603:1036:2401::/48\",\r\ - \n \"2603:1036:2500:30::/64\",\r\n \"2603:1036:3000:40::/59\"\ - ,\r\n \"2603:1037:1:40::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.canadaeast\",\r\n \"id\": \"\ - AzureCloud.canadaeast\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.154.128/25\"\ - ,\r\n \"20.38.121.128/25\",\r\n \"20.47.41.0/24\",\r\n \ - \ \"20.47.88.0/24\",\r\n \"20.60.142.0/23\",\r\n \ - \ \"20.104.128.0/18\",\r\n \"20.135.66.0/23\",\r\n \"20.150.1.0/25\"\ - ,\r\n \"20.150.40.128/25\",\r\n \"20.150.113.0/24\",\r\n\ - \ \"20.157.4.0/23\",\r\n \"20.157.8.0/22\",\r\n \ - \ \"20.157.161.0/24\",\r\n \"20.190.139.128/25\",\r\n \"\ - 20.190.162.0/24\",\r\n \"20.200.0.0/18\",\r\n \"40.69.96.0/19\"\ - ,\r\n \"40.79.217.0/24\",\r\n \"40.80.40.0/22\",\r\n \ - \ \"40.80.240.0/20\",\r\n \"40.86.192.0/18\",\r\n \ - \ \"40.89.0.0/19\",\r\n \"40.90.17.128/28\",\r\n \"40.90.138.64/27\"\ - ,\r\n \"40.90.156.96/27\",\r\n \"40.126.11.128/25\",\r\n\ - \ \"40.126.34.0/24\",\r\n \"52.108.193.0/24\",\r\n \ - \ \"52.108.232.0/23\",\r\n \"52.109.96.0/22\",\r\n \"\ - 52.111.226.0/24\",\r\n \"52.114.164.0/22\",\r\n \"52.136.22.0/24\"\ - ,\r\n \"52.139.64.0/18\",\r\n \"52.155.0.0/19\",\r\n \ - \ \"52.229.64.0/18\",\r\n \"52.232.128.0/21\",\r\n \ - \ \"52.235.0.0/18\",\r\n \"52.239.164.128/26\",\r\n \"\ - 52.239.190.0/25\",\r\n \"52.242.0.0/18\",\r\n \"52.245.32.0/22\"\ - ,\r\n \"104.44.93.64/27\",\r\n \"104.44.95.32/28\",\r\n\ - \ \"2603:1030:20a::/47\",\r\n \"2603:1030:1000::/47\",\r\ - \n \"2603:1030:1002::/48\",\r\n \"2603:1030:1004::/48\"\ - ,\r\n \"2603:1030:1005::/48\",\r\n \"2603:1030:1006::/48\"\ - ,\r\n \"2603:1036:2402::/48\",\r\n \"2603:1036:2500:34::/64\"\ - ,\r\n \"2603:1036:3000:80::/59\",\r\n \"2603:1037:1:80::/59\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.centralfrance\"\ - ,\r\n \"id\": \"AzureCloud.centralfrance\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.156.0/24\",\r\n \"20.38.196.0/22\",\r\n\ - \ \"20.39.232.0/21\",\r\n \"20.39.240.0/20\",\r\n \ - \ \"20.40.128.0/19\",\r\n \"20.43.32.0/19\",\r\n \"20.47.44.0/24\"\ - ,\r\n \"20.47.80.0/23\",\r\n \"20.60.13.0/24\",\r\n \ - \ \"20.60.156.0/23\",\r\n \"20.74.0.0/17\",\r\n \"\ - 20.111.0.0/18\",\r\n \"20.135.146.0/23\",\r\n \"20.135.148.0/22\"\ - ,\r\n \"20.150.61.0/24\",\r\n \"20.157.129.0/24\",\r\n \ - \ \"20.188.32.0/19\",\r\n \"20.190.147.0/25\",\r\n \ - \ \"20.190.177.0/24\",\r\n \"20.199.0.0/17\",\r\n \"\ - 20.202.0.0/24\",\r\n \"20.209.8.0/23\",\r\n \"40.66.32.0/19\"\ - ,\r\n \"40.79.128.0/20\",\r\n \"40.79.144.0/21\",\r\n \ - \ \"40.79.205.0/26\",\r\n \"40.79.222.0/24\",\r\n \ - \ \"40.80.24.0/22\",\r\n \"40.89.128.0/18\",\r\n \"40.90.130.240/28\"\ - ,\r\n \"40.90.132.0/27\",\r\n \"40.90.136.64/26\",\r\n \ - \ \"40.90.136.128/27\",\r\n \"40.90.147.128/26\",\r\n \ - \ \"40.90.147.192/27\",\r\n \"40.126.19.0/25\",\r\n \ - \ \"40.126.49.0/24\",\r\n \"51.11.192.0/18\",\r\n \"51.103.0.0/17\"\ - ,\r\n \"51.138.192.0/19\",\r\n \"52.108.52.0/23\",\r\n \ - \ \"52.108.89.0/24\",\r\n \"52.108.168.0/23\",\r\n \ - \ \"52.108.170.0/24\",\r\n \"52.109.68.0/22\",\r\n \"\ - 52.111.231.0/24\",\r\n \"52.112.172.0/22\",\r\n \"52.112.190.0/24\"\ - ,\r\n \"52.112.213.0/24\",\r\n \"52.112.214.0/23\",\r\n\ - \ \"52.114.104.0/22\",\r\n \"52.114.114.0/23\",\r\n \ - \ \"52.115.112.0/23\",\r\n \"52.115.128.0/21\",\r\n \ - \ \"52.115.136.0/22\",\r\n \"52.121.88.0/21\",\r\n \"52.121.96.0/22\"\ - ,\r\n \"52.121.178.0/23\",\r\n \"52.121.180.0/23\",\r\n\ - \ \"52.143.128.0/18\",\r\n \"52.143.215.0/24\",\r\n \ - \ \"52.143.216.0/23\",\r\n \"52.239.134.0/24\",\r\n \ - \ \"52.239.194.0/24\",\r\n \"52.239.241.0/24\",\r\n \"\ - 52.245.116.0/22\",\r\n \"2603:1020:800::/47\",\r\n \"2603:1020:802::/48\"\ - ,\r\n \"2603:1020:804::/48\",\r\n \"2603:1020:805::/48\"\ - ,\r\n \"2603:1020:806::/48\",\r\n \"2603:1026:2400::/48\"\ - ,\r\n \"2603:1026:2500:1c::/64\",\r\n \"2603:1026:3000:100::/59\"\ - ,\r\n \"2603:1027:1:100::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.centralindia\",\r\n \"id\": \"\ - AzureCloud.centralindia\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"\",\r\n \"addressPrefixes\": [\r\n \"13.71.0.0/18\"\ - ,\r\n \"13.104.148.128/25\",\r\n \"13.105.98.0/27\",\r\n\ - \ \"13.105.98.32/28\",\r\n \"13.105.98.64/27\",\r\n \ - \ \"20.38.126.0/23\",\r\n \"20.40.40.0/21\",\r\n \"\ - 20.40.48.0/20\",\r\n \"20.43.120.0/21\",\r\n \"20.47.42.0/24\"\ - ,\r\n \"20.47.89.0/24\",\r\n \"20.60.84.0/23\",\r\n \ - \ \"20.135.90.0/23\",\r\n \"20.135.92.0/22\",\r\n \"\ - 20.150.114.0/24\",\r\n \"20.157.139.0/24\",\r\n \"20.190.146.0/25\"\ - ,\r\n \"20.190.175.0/24\",\r\n \"20.192.0.0/19\",\r\n \ - \ \"20.192.40.0/21\",\r\n \"20.192.96.0/21\",\r\n \ - \ \"20.192.168.0/21\",\r\n \"20.193.128.0/19\",\r\n \"\ - 20.193.224.0/19\",\r\n \"20.197.0.0/18\",\r\n \"20.198.0.0/17\"\ - ,\r\n \"20.202.41.0/24\",\r\n \"20.204.0.0/16\",\r\n \ - \ \"40.79.207.32/27\",\r\n \"40.79.207.64/28\",\r\n \ - \ \"40.79.207.96/27\",\r\n \"40.79.214.0/24\",\r\n \"\ - 40.80.48.0/21\",\r\n \"40.80.64.0/19\",\r\n \"40.81.224.0/19\"\ - ,\r\n \"40.87.224.0/22\",\r\n \"40.90.137.128/27\",\r\n\ - \ \"40.112.39.0/25\",\r\n \"40.112.39.128/26\",\r\n \ - \ \"40.126.18.0/25\",\r\n \"40.126.47.0/24\",\r\n \"\ - 52.108.44.0/23\",\r\n \"52.108.85.0/24\",\r\n \"52.109.56.0/22\"\ - ,\r\n \"52.111.252.0/24\",\r\n \"52.113.10.0/23\",\r\n \ - \ \"52.113.70.0/23\",\r\n \"52.113.92.0/22\",\r\n \ - \ \"52.113.193.0/24\",\r\n \"52.114.40.0/22\",\r\n \"\ - 52.121.122.0/23\",\r\n \"52.121.124.0/22\",\r\n \"52.136.24.0/24\"\ - ,\r\n \"52.140.64.0/18\",\r\n \"52.172.128.0/17\",\r\n \ - \ \"52.239.135.64/26\",\r\n \"52.239.202.0/24\",\r\n \ - \ \"52.245.96.0/22\",\r\n \"52.253.181.0/24\",\r\n \ - \ \"52.253.191.0/24\",\r\n \"104.44.92.128/27\",\r\n \"\ - 104.44.94.192/28\",\r\n \"104.47.210.0/23\",\r\n \"104.211.64.0/18\"\ - ,\r\n \"2603:1040:a00::/46\",\r\n \"2603:1040:a05::/48\"\ - ,\r\n \"2603:1040:a06::/47\",\r\n \"2603:1046:1400::/48\"\ - ,\r\n \"2603:1046:1500:8::/64\",\r\n \"2603:1046:2000:80::/59\"\ - ,\r\n \"2603:1047:1:80::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.centralus\",\r\n \"id\": \"AzureCloud.centralus\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"5\",\r\n \"region\": \"centralus\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\"\ - : \"\",\r\n \"addressPrefixes\": [\r\n \"13.67.128.0/20\"\ - ,\r\n \"13.67.144.0/21\",\r\n \"13.67.152.0/24\",\r\n \ - \ \"13.67.153.0/28\",\r\n \"13.67.153.32/27\",\r\n \ - \ \"13.67.153.64/26\",\r\n \"13.67.153.128/25\",\r\n \"\ - 13.67.155.0/24\",\r\n \"13.67.156.0/22\",\r\n \"13.67.160.0/19\"\ - ,\r\n \"13.67.192.0/18\",\r\n \"13.86.0.0/17\",\r\n \ - \ \"13.89.0.0/16\",\r\n \"13.104.147.128/25\",\r\n \ - \ \"13.104.219.128/25\",\r\n \"13.105.17.192/26\",\r\n \"\ - 13.105.24.0/24\",\r\n \"13.105.37.0/26\",\r\n \"13.105.53.192/26\"\ - ,\r\n \"13.105.98.160/27\",\r\n \"13.105.98.192/28\",\r\n\ - \ \"13.105.98.224/27\",\r\n \"20.37.128.0/18\",\r\n \ - \ \"20.38.96.0/23\",\r\n \"20.38.122.0/23\",\r\n \"\ - 20.40.192.0/18\",\r\n \"20.44.8.0/21\",\r\n \"20.46.224.0/19\"\ - ,\r\n \"20.47.58.0/23\",\r\n \"20.47.78.0/23\",\r\n \ - \ \"20.60.18.0/24\",\r\n \"20.60.30.0/23\",\r\n \"\ - 20.60.178.0/23\",\r\n \"20.60.194.0/23\",\r\n \"20.60.240.0/23\"\ - ,\r\n \"20.60.244.0/23\",\r\n \"20.80.64.0/18\",\r\n \ - \ \"20.83.0.0/18\",\r\n \"20.84.128.0/17\",\r\n \"\ - 20.98.128.0/18\",\r\n \"20.106.0.0/18\",\r\n \"20.109.192.0/18\"\ - ,\r\n \"20.112.192.0/18\",\r\n \"20.135.0.0/22\",\r\n \ - \ \"20.135.188.0/22\",\r\n \"20.135.192.0/23\",\r\n \ - \ \"20.143.4.0/24\",\r\n \"20.150.43.128/25\",\r\n \"\ - 20.150.58.0/24\",\r\n \"20.150.63.0/24\",\r\n \"20.150.77.0/24\"\ - ,\r\n \"20.150.89.0/24\",\r\n \"20.150.95.0/24\",\r\n \ - \ \"20.157.34.0/23\",\r\n \"20.157.142.0/23\",\r\n \ - \ \"20.184.64.0/18\",\r\n \"20.186.192.0/18\",\r\n \"\ - 20.190.134.0/24\",\r\n \"20.190.155.0/24\",\r\n \"23.99.128.0/17\"\ - ,\r\n \"23.100.80.0/21\",\r\n \"23.100.240.0/20\",\r\n \ - \ \"23.101.112.0/20\",\r\n \"23.102.202.0/24\",\r\n \ - \ \"40.67.160.0/19\",\r\n \"40.69.128.0/18\",\r\n \"\ - 40.77.0.0/17\",\r\n \"40.77.130.128/26\",\r\n \"40.77.137.0/25\"\ - ,\r\n \"40.77.138.0/25\",\r\n \"40.77.161.64/26\",\r\n \ - \ \"40.77.166.192/26\",\r\n \"40.77.171.0/24\",\r\n \ - \ \"40.77.175.192/27\",\r\n \"40.77.175.240/28\",\r\n \ - \ \"40.77.182.16/28\",\r\n \"40.77.182.192/26\",\r\n \"\ - 40.77.184.128/25\",\r\n \"40.77.197.0/24\",\r\n \"40.77.255.128/26\"\ - ,\r\n \"40.78.128.0/18\",\r\n \"40.78.221.0/24\",\r\n \ - \ \"40.82.16.0/22\",\r\n \"40.82.96.0/22\",\r\n \"\ - 40.83.0.0/20\",\r\n \"40.83.16.0/21\",\r\n \"40.83.24.0/26\"\ - ,\r\n \"40.83.24.64/27\",\r\n \"40.83.24.128/25\",\r\n \ - \ \"40.83.25.0/24\",\r\n \"40.83.26.0/23\",\r\n \ - \ \"40.83.28.0/22\",\r\n \"40.83.32.0/19\",\r\n \"40.86.0.0/17\"\ - ,\r\n \"40.87.180.0/30\",\r\n \"40.87.180.4/31\",\r\n \ - \ \"40.87.180.14/31\",\r\n \"40.87.180.16/30\",\r\n \ - \ \"40.87.180.20/31\",\r\n \"40.87.180.28/30\",\r\n \"\ - 40.87.180.32/29\",\r\n \"40.87.180.42/31\",\r\n \"40.87.180.44/30\"\ - ,\r\n \"40.87.180.48/28\",\r\n \"40.87.180.64/30\",\r\n\ - \ \"40.87.180.74/31\",\r\n \"40.87.180.76/30\",\r\n \ - \ \"40.87.180.80/28\",\r\n \"40.87.180.96/27\",\r\n \ - \ \"40.87.180.128/26\",\r\n \"40.87.180.192/30\",\r\n \"\ - 40.87.180.202/31\",\r\n \"40.87.180.204/30\",\r\n \"40.87.180.208/28\"\ - ,\r\n \"40.87.180.224/28\",\r\n \"40.87.180.240/29\",\r\n\ - \ \"40.87.180.248/30\",\r\n \"40.87.181.4/30\",\r\n \ - \ \"40.87.181.8/29\",\r\n \"40.87.181.16/29\",\r\n \ - \ \"40.87.181.24/30\",\r\n \"40.87.182.4/30\",\r\n \"40.87.182.8/29\"\ - ,\r\n \"40.87.182.24/29\",\r\n \"40.87.182.32/28\",\r\n\ - \ \"40.87.182.48/29\",\r\n \"40.87.182.56/30\",\r\n \ - \ \"40.87.182.62/31\",\r\n \"40.87.182.64/26\",\r\n \ - \ \"40.87.182.128/25\",\r\n \"40.87.183.0/28\",\r\n \"\ - 40.87.183.16/29\",\r\n \"40.87.183.24/30\",\r\n \"40.87.183.34/31\"\ - ,\r\n \"40.87.183.36/30\",\r\n \"40.87.183.42/31\",\r\n\ - \ \"40.87.183.44/30\",\r\n \"40.87.183.54/31\",\r\n \ - \ \"40.87.183.56/29\",\r\n \"40.87.183.64/26\",\r\n \ - \ \"40.87.183.144/28\",\r\n \"40.87.183.160/27\",\r\n \"\ - 40.87.183.192/27\",\r\n \"40.87.183.224/29\",\r\n \"40.87.183.232/30\"\ - ,\r\n \"40.87.183.236/31\",\r\n \"40.87.183.244/30\",\r\n\ - \ \"40.87.183.248/29\",\r\n \"40.89.224.0/19\",\r\n \ - \ \"40.90.16.0/27\",\r\n \"40.90.21.128/25\",\r\n \"\ - 40.90.22.0/25\",\r\n \"40.90.26.128/25\",\r\n \"40.90.129.224/27\"\ - ,\r\n \"40.90.130.64/28\",\r\n \"40.90.130.192/28\",\r\n\ - \ \"40.90.132.192/26\",\r\n \"40.90.137.224/27\",\r\n \ - \ \"40.90.140.96/27\",\r\n \"40.90.140.224/27\",\r\n \ - \ \"40.90.141.0/27\",\r\n \"40.90.142.128/27\",\r\n \ - \ \"40.90.142.240/28\",\r\n \"40.90.144.0/27\",\r\n \"40.90.144.128/26\"\ - ,\r\n \"40.90.148.176/28\",\r\n \"40.90.149.96/27\",\r\n\ - \ \"40.90.151.144/28\",\r\n \"40.90.154.64/26\",\r\n \ - \ \"40.90.156.192/26\",\r\n \"40.90.158.64/26\",\r\n \ - \ \"40.93.8.0/24\",\r\n \"40.93.13.0/24\",\r\n \"40.93.192.0/24\"\ - ,\r\n \"40.113.192.0/18\",\r\n \"40.122.16.0/20\",\r\n \ - \ \"40.122.32.0/19\",\r\n \"40.122.64.0/18\",\r\n \ - \ \"40.122.128.0/17\",\r\n \"40.126.6.0/24\",\r\n \"40.126.27.0/24\"\ - ,\r\n \"52.101.8.0/24\",\r\n \"52.101.32.0/22\",\r\n \ - \ \"52.101.61.0/24\",\r\n \"52.101.62.0/23\",\r\n \ - \ \"52.101.64.0/24\",\r\n \"52.102.130.0/24\",\r\n \"52.102.139.0/24\"\ - ,\r\n \"52.103.4.0/24\",\r\n \"52.103.13.0/24\",\r\n \ - \ \"52.103.130.0/24\",\r\n \"52.103.139.0/24\",\r\n \ - \ \"52.108.165.0/24\",\r\n \"52.108.166.0/23\",\r\n \"\ - 52.108.185.0/24\",\r\n \"52.108.208.0/21\",\r\n \"52.109.8.0/22\"\ - ,\r\n \"52.111.227.0/24\",\r\n \"52.112.113.0/24\",\r\n\ - \ \"52.113.129.0/24\",\r\n \"52.114.128.0/22\",\r\n \ - \ \"52.115.76.0/22\",\r\n \"52.115.80.0/22\",\r\n \"\ - 52.115.88.0/22\",\r\n \"52.115.92.0/24\",\r\n \"52.123.2.0/24\"\ - ,\r\n \"52.125.128.0/22\",\r\n \"52.136.30.0/24\",\r\n \ - \ \"52.141.192.0/19\",\r\n \"52.141.240.0/20\",\r\n \ - \ \"52.143.193.0/24\",\r\n \"52.143.224.0/19\",\r\n \ - \ \"52.154.0.0/18\",\r\n \"52.154.128.0/17\",\r\n \"52.158.160.0/20\"\ - ,\r\n \"52.158.192.0/19\",\r\n \"52.165.0.0/19\",\r\n \ - \ \"52.165.32.0/20\",\r\n \"52.165.48.0/28\",\r\n \ - \ \"52.165.49.0/24\",\r\n \"52.165.56.0/21\",\r\n \"52.165.64.0/19\"\ - ,\r\n \"52.165.96.0/21\",\r\n \"52.165.104.0/25\",\r\n \ - \ \"52.165.128.0/17\",\r\n \"52.173.0.0/16\",\r\n \ - \ \"52.176.0.0/17\",\r\n \"52.176.128.0/19\",\r\n \"52.176.160.0/21\"\ - ,\r\n \"52.176.176.0/20\",\r\n \"52.176.192.0/19\",\r\n\ - \ \"52.176.224.0/24\",\r\n \"52.180.128.0/19\",\r\n \ - \ \"52.180.184.0/27\",\r\n \"52.180.184.32/28\",\r\n \ - \ \"52.180.185.0/24\",\r\n \"52.182.128.0/17\",\r\n \"\ - 52.185.0.0/19\",\r\n \"52.185.32.0/20\",\r\n \"52.185.48.0/21\"\ - ,\r\n \"52.185.56.0/26\",\r\n \"52.185.56.64/27\",\r\n \ - \ \"52.185.56.96/28\",\r\n \"52.185.56.128/27\",\r\n \ - \ \"52.185.56.160/28\",\r\n \"52.185.64.0/19\",\r\n \ - \ \"52.185.96.0/20\",\r\n \"52.185.112.0/26\",\r\n \"52.185.112.96/27\"\ - ,\r\n \"52.185.120.0/21\",\r\n \"52.189.0.0/17\",\r\n \ - \ \"52.228.128.0/17\",\r\n \"52.230.128.0/17\",\r\n \ - \ \"52.232.157.0/24\",\r\n \"52.238.192.0/18\",\r\n \"\ - 52.239.150.0/23\",\r\n \"52.239.177.32/27\",\r\n \"52.239.177.64/26\"\ - ,\r\n \"52.239.177.128/25\",\r\n \"52.239.195.0/24\",\r\n\ - \ \"52.239.234.0/23\",\r\n \"52.242.128.0/17\",\r\n \ - \ \"52.245.68.0/24\",\r\n \"52.245.69.32/27\",\r\n \ - \ \"52.245.69.64/27\",\r\n \"52.245.69.96/28\",\r\n \"52.245.69.144/28\"\ - ,\r\n \"52.245.69.160/27\",\r\n \"52.245.69.192/26\",\r\n\ - \ \"52.245.70.0/23\",\r\n \"52.255.0.0/19\",\r\n \ - \ \"53.103.139.0/24\",\r\n \"65.55.144.0/23\",\r\n \"\ - 65.55.146.0/24\",\r\n \"104.43.128.0/17\",\r\n \"104.44.88.160/27\"\ - ,\r\n \"104.44.91.160/27\",\r\n \"104.44.92.224/27\",\r\n\ - \ \"104.44.94.80/28\",\r\n \"104.208.0.0/19\",\r\n \ - \ \"104.208.32.0/20\",\r\n \"131.253.36.224/27\",\r\n \ - \ \"157.55.108.0/23\",\r\n \"168.61.128.0/25\",\r\n \"\ - 168.61.128.128/28\",\r\n \"168.61.128.160/27\",\r\n \"168.61.128.192/26\"\ - ,\r\n \"168.61.129.0/25\",\r\n \"168.61.129.128/26\",\r\n\ - \ \"168.61.129.208/28\",\r\n \"168.61.129.224/27\",\r\n\ - \ \"168.61.130.64/26\",\r\n \"168.61.130.128/25\",\r\n \ - \ \"168.61.131.0/26\",\r\n \"168.61.131.128/25\",\r\n \ - \ \"168.61.132.0/26\",\r\n \"168.61.144.0/20\",\r\n \ - \ \"168.61.160.0/19\",\r\n \"168.61.208.0/20\",\r\n \"\ - 193.149.72.0/21\",\r\n \"2603:1030::/45\",\r\n \"2603:1030:9:2::/63\"\ - ,\r\n \"2603:1030:9:4::/62\",\r\n \"2603:1030:9:8::/61\"\ - ,\r\n \"2603:1030:9:10::/62\",\r\n \"2603:1030:9:14::/63\"\ - ,\r\n \"2603:1030:9:17::/64\",\r\n \"2603:1030:9:18::/61\"\ - ,\r\n \"2603:1030:9:20::/59\",\r\n \"2603:1030:9:40::/58\"\ - ,\r\n \"2603:1030:9:80::/59\",\r\n \"2603:1030:9:a0::/60\"\ - ,\r\n \"2603:1030:9:b3::/64\",\r\n \"2603:1030:9:b4::/63\"\ - ,\r\n \"2603:1030:9:b7::/64\",\r\n \"2603:1030:9:b8::/63\"\ - ,\r\n \"2603:1030:9:bd::/64\",\r\n \"2603:1030:9:be::/63\"\ - ,\r\n \"2603:1030:9:c0::/58\",\r\n \"2603:1030:9:100::/64\"\ - ,\r\n \"2603:1030:9:104::/62\",\r\n \"2603:1030:9:108::/62\"\ - ,\r\n \"2603:1030:9:10c::/64\",\r\n \"2603:1030:9:111::/64\"\ - ,\r\n \"2603:1030:9:112::/63\",\r\n \"2603:1030:9:114::/64\"\ - ,\r\n \"2603:1030:9:118::/62\",\r\n \"2603:1030:9:11c::/63\"\ - ,\r\n \"2603:1030:9:11f::/64\",\r\n \"2603:1030:9:120::/61\"\ - ,\r\n \"2603:1030:9:128::/62\",\r\n \"2603:1030:9:12f::/64\"\ - ,\r\n \"2603:1030:9:130::/60\",\r\n \"2603:1030:9:140::/59\"\ - ,\r\n \"2603:1030:9:160::/61\",\r\n \"2603:1030:9:168::/62\"\ - ,\r\n \"2603:1030:9:16f::/64\",\r\n \"2603:1030:9:170::/60\"\ - ,\r\n \"2603:1030:9:180::/61\",\r\n \"2603:1030:9:18c::/62\"\ - ,\r\n \"2603:1030:9:190::/61\",\r\n \"2603:1030:a::/47\"\ - ,\r\n \"2603:1030:d::/48\",\r\n \"2603:1030:10::/47\",\r\ - \n \"2603:1036:2403::/48\",\r\n \"2603:1036:2500:1c::/64\"\ - ,\r\n \"2603:1036:3000:100::/59\",\r\n \"2603:1037:1:100::/59\"\ - ,\r\n \"2a01:111:f403:c111::/64\",\r\n \"2a01:111:f403:c904::/62\"\ - ,\r\n \"2a01:111:f403:c928::/62\",\r\n \"2a01:111:f403:c92c::/64\"\ - ,\r\n \"2a01:111:f403:d104::/62\",\r\n \"2a01:111:f403:d904::/62\"\ - ,\r\n \"2a01:111:f403:e004::/62\",\r\n \"2a01:111:f403:f904::/62\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.centraluseuap\"\ - ,\r\n \"id\": \"AzureCloud.centraluseuap\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.67.153.16/28\",\r\n \"13.67.154.0/24\",\r\n\ - \ \"13.104.129.0/26\",\r\n \"13.104.159.192/26\",\r\n \ - \ \"13.104.208.0/26\",\r\n \"13.105.98.208/28\",\r\n \ - \ \"13.105.99.0/26\",\r\n \"20.45.192.0/18\",\r\n \"\ - 20.46.0.0/19\",\r\n \"20.47.5.0/24\",\r\n \"20.47.105.0/24\"\ - ,\r\n \"20.51.24.0/21\",\r\n \"20.60.24.0/23\",\r\n \ - \ \"20.112.128.0/19\",\r\n \"20.135.68.0/23\",\r\n \ - \ \"20.150.23.0/24\",\r\n \"20.150.47.0/25\",\r\n \"20.157.96.0/24\"\ - ,\r\n \"20.190.138.128/25\",\r\n \"20.190.150.0/24\",\r\n\ - \ \"40.66.120.0/21\",\r\n \"40.78.200.0/21\",\r\n \ - \ \"40.78.208.16/28\",\r\n \"40.79.232.0/21\",\r\n \"\ - 40.82.0.0/22\",\r\n \"40.83.24.96/27\",\r\n \"40.87.180.6/31\"\ - ,\r\n \"40.87.180.8/30\",\r\n \"40.87.180.12/31\",\r\n \ - \ \"40.87.180.22/31\",\r\n \"40.87.180.24/30\",\r\n \ - \ \"40.87.180.40/31\",\r\n \"40.87.180.68/30\",\r\n \ - \ \"40.87.180.72/31\",\r\n \"40.87.180.196/30\",\r\n \"\ - 40.87.180.200/31\",\r\n \"40.87.180.252/30\",\r\n \"40.87.181.0/30\"\ - ,\r\n \"40.87.182.0/30\",\r\n \"40.87.182.16/29\",\r\n \ - \ \"40.87.182.60/31\",\r\n \"40.87.183.28/30\",\r\n \ - \ \"40.87.183.32/31\",\r\n \"40.87.183.40/31\",\r\n \ - \ \"40.87.183.48/30\",\r\n \"40.87.183.52/31\",\r\n \"40.87.183.128/28\"\ - ,\r\n \"40.87.183.238/31\",\r\n \"40.87.183.240/30\",\r\n\ - \ \"40.89.32.0/19\",\r\n \"40.90.132.80/28\",\r\n \ - \ \"40.90.142.32/27\",\r\n \"40.90.149.0/27\",\r\n \"\ - 40.93.17.0/24\",\r\n \"40.93.208.0/22\",\r\n \"40.93.212.0/24\"\ - ,\r\n \"40.96.52.0/24\",\r\n \"40.122.0.0/20\",\r\n \ - \ \"40.126.10.128/25\",\r\n \"40.126.22.0/24\",\r\n \ - \ \"52.102.143.0/24\",\r\n \"52.103.17.0/24\",\r\n \"52.103.143.0/24\"\ - ,\r\n \"52.108.113.0/24\",\r\n \"52.109.140.0/22\",\r\n\ - \ \"52.141.224.0/20\",\r\n \"52.143.198.0/24\",\r\n \ - \ \"52.158.176.0/20\",\r\n \"52.165.104.128/26\",\r\n \ - \ \"52.176.225.0/24\",\r\n \"52.176.232.0/21\",\r\n \"\ - 52.176.240.0/20\",\r\n \"52.180.160.0/20\",\r\n \"52.180.176.0/21\"\ - ,\r\n \"52.185.56.112/28\",\r\n \"52.185.112.64/27\",\r\n\ - \ \"52.239.177.0/27\",\r\n \"52.239.238.0/24\",\r\n \ - \ \"52.245.69.0/27\",\r\n \"52.253.156.0/22\",\r\n \ - \ \"52.253.232.0/21\",\r\n \"53.103.143.0/24\",\r\n \"104.208.48.0/20\"\ - ,\r\n \"168.61.136.0/21\",\r\n \"2603:1030:8::/48\",\r\n\ - \ \"2603:1030:9::/63\",\r\n \"2603:1030:9:16::/64\",\r\n\ - \ \"2603:1030:9:b0::/63\",\r\n \"2603:1030:9:b2::/64\",\r\ - \n \"2603:1030:9:b6::/64\",\r\n \"2603:1030:9:ba::/63\"\ - ,\r\n \"2603:1030:9:bc::/64\",\r\n \"2603:1030:9:101::/64\"\ - ,\r\n \"2603:1030:9:102::/63\",\r\n \"2603:1030:9:10d::/64\"\ - ,\r\n \"2603:1030:9:10e::/63\",\r\n \"2603:1030:9:110::/64\"\ - ,\r\n \"2603:1030:9:115::/64\",\r\n \"2603:1030:9:116::/63\"\ - ,\r\n \"2603:1030:9:11e::/64\",\r\n \"2603:1030:9:12c::/63\"\ - ,\r\n \"2603:1030:9:12e::/64\",\r\n \"2603:1030:9:16c::/63\"\ - ,\r\n \"2603:1030:9:16e::/64\",\r\n \"2603:1030:9:188::/62\"\ - ,\r\n \"2603:1030:e::/48\",\r\n \"2603:1030:f::/48\",\r\n\ - \ \"2603:1030:12::/48\",\r\n \"2603:1036:903:2::/64\",\r\ - \n \"2603:1036:240d::/48\",\r\n \"2603:1036:2500:2c::/64\"\ - ,\r\n \"2603:1036:3000:160::/59\",\r\n \"2603:1037:1:160::/59\"\ - ,\r\n \"2a01:111:f403:c114::/64\",\r\n \"2a01:111:f403:c93c::/62\"\ - ,\r\n \"2a01:111:f403:c940::/64\",\r\n \"2a01:111:f403:d125::/64\"\ - ,\r\n \"2a01:111:f403:d915::/64\",\r\n \"2a01:111:f403:e014::/64\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.eastasia\"\ - ,\r\n \"id\": \"AzureCloud.eastasia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.70.0.0/18\",\r\n \"13.72.192.0/19\",\r\n \ - \ \"13.75.0.0/17\",\r\n \"13.88.208.0/20\",\r\n \"\ - 13.94.0.0/18\",\r\n \"13.104.155.64/26\",\r\n \"13.104.155.192/26\"\ - ,\r\n \"13.105.14.192/26\",\r\n \"13.105.16.0/25\",\r\n\ - \ \"13.105.100.16/28\",\r\n \"13.105.100.64/26\",\r\n \ - \ \"13.105.100.128/27\",\r\n \"13.105.100.160/28\",\r\n \ - \ \"13.105.100.192/27\",\r\n \"20.47.43.0/24\",\r\n \ - \ \"20.47.126.0/23\",\r\n \"20.60.86.0/23\",\r\n \"20.60.131.0/24\"\ - ,\r\n \"20.60.254.0/23\",\r\n \"20.135.40.0/23\",\r\n \ - \ \"20.135.234.0/23\",\r\n \"20.135.236.0/23\",\r\n \ - \ \"20.150.1.128/25\",\r\n \"20.150.22.0/24\",\r\n \"\ - 20.150.96.0/24\",\r\n \"20.157.53.0/24\",\r\n \"20.187.64.0/18\"\ - ,\r\n \"20.187.128.0/18\",\r\n \"20.187.192.0/21\",\r\n\ - \ \"20.187.224.0/19\",\r\n \"20.189.64.0/18\",\r\n \ - \ \"20.190.140.128/25\",\r\n \"20.190.164.0/24\",\r\n \ - \ \"20.195.72.0/21\",\r\n \"20.195.88.0/21\",\r\n \"20.205.0.0/18\"\ - ,\r\n \"20.205.64.0/20\",\r\n \"20.205.80.0/21\",\r\n \ - \ \"20.205.96.0/19\",\r\n \"20.205.128.0/20\",\r\n \ - \ \"23.97.64.0/19\",\r\n \"23.98.32.0/21\",\r\n \"23.98.40.0/22\"\ - ,\r\n \"23.98.44.0/24\",\r\n \"23.99.96.0/19\",\r\n \ - \ \"23.100.88.0/21\",\r\n \"23.101.0.0/20\",\r\n \"\ - 23.102.200.0/23\",\r\n \"23.102.224.0/19\",\r\n \"40.77.134.0/24\"\ - ,\r\n \"40.77.136.16/28\",\r\n \"40.77.160.32/27\",\r\n\ - \ \"40.77.160.64/26\",\r\n \"40.77.160.128/25\",\r\n \ - \ \"40.77.161.0/26\",\r\n \"40.77.161.128/25\",\r\n \ - \ \"40.77.175.128/27\",\r\n \"40.77.192.0/22\",\r\n \"\ - 40.77.201.0/24\",\r\n \"40.77.226.0/25\",\r\n \"40.77.234.128/27\"\ - ,\r\n \"40.77.236.192/28\",\r\n \"40.77.237.128/25\",\r\n\ - \ \"40.77.252.0/23\",\r\n \"40.79.210.0/24\",\r\n \ - \ \"40.81.16.0/20\",\r\n \"40.82.116.0/22\",\r\n \"40.83.64.0/18\"\ - ,\r\n \"40.87.192.0/22\",\r\n \"40.90.154.192/26\",\r\n\ - \ \"40.93.128.0/24\",\r\n \"40.126.12.128/25\",\r\n \ - \ \"40.126.36.0/24\",\r\n \"52.101.128.0/22\",\r\n \ - \ \"52.101.132.0/24\",\r\n \"52.102.192.0/24\",\r\n \"52.103.64.0/24\"\ - ,\r\n \"52.103.192.0/24\",\r\n \"52.108.32.0/22\",\r\n \ - \ \"52.108.81.0/24\",\r\n \"52.109.120.0/22\",\r\n \ - \ \"52.111.228.0/24\",\r\n \"52.113.96.0/22\",\r\n \"\ - 52.113.100.0/24\",\r\n \"52.113.104.0/24\",\r\n \"52.113.108.0/24\"\ - ,\r\n \"52.114.0.0/21\",\r\n \"52.114.52.0/23\",\r\n \ - \ \"52.115.40.0/22\",\r\n \"52.115.44.0/23\",\r\n \ - \ \"52.115.46.0/24\",\r\n \"52.115.96.0/24\",\r\n \"52.120.157.0/24\"\ - ,\r\n \"52.121.112.0/22\",\r\n \"52.139.128.0/18\",\r\n\ - \ \"52.175.0.0/17\",\r\n \"52.184.0.0/17\",\r\n \ - \ \"52.229.128.0/17\",\r\n \"52.232.153.0/24\",\r\n \"\ - 52.239.128.0/24\",\r\n \"52.239.224.0/24\",\r\n \"52.245.56.0/22\"\ - ,\r\n \"52.246.128.0/20\",\r\n \"52.253.222.0/23\",\r\n\ - \ \"65.52.160.0/19\",\r\n \"104.44.88.192/27\",\r\n \ - \ \"104.44.90.224/27\",\r\n \"104.44.91.192/27\",\r\n \ - \ \"104.44.94.96/28\",\r\n \"104.46.24.0/22\",\r\n \"\ - 104.208.64.0/18\",\r\n \"104.214.160.0/19\",\r\n \"111.221.29.0/24\"\ - ,\r\n \"111.221.30.0/23\",\r\n \"111.221.78.0/23\",\r\n\ - \ \"131.253.13.100/30\",\r\n \"131.253.13.104/30\",\r\n\ - \ \"131.253.35.192/26\",\r\n \"134.170.192.0/21\",\r\n \ - \ \"137.116.160.0/20\",\r\n \"168.63.128.0/24\",\r\n \ - \ \"168.63.129.0/28\",\r\n \"168.63.129.32/27\",\r\n \ - \ \"168.63.129.64/26\",\r\n \"168.63.129.128/25\",\r\n \ - \ \"168.63.130.0/23\",\r\n \"168.63.132.0/22\",\r\n \"\ - 168.63.136.0/21\",\r\n \"168.63.148.0/22\",\r\n \"168.63.152.0/22\"\ - ,\r\n \"168.63.156.0/24\",\r\n \"168.63.192.0/19\",\r\n\ - \ \"191.232.140.0/24\",\r\n \"191.234.2.0/23\",\r\n \ - \ \"191.234.16.0/20\",\r\n \"191.237.238.0/24\",\r\n \ - \ \"204.231.197.0/24\",\r\n \"207.46.67.160/27\",\r\n \ - \ \"207.46.67.192/27\",\r\n \"207.46.72.0/27\",\r\n \"207.46.77.224/28\"\ - ,\r\n \"207.46.87.0/24\",\r\n \"207.46.89.16/28\",\r\n \ - \ \"207.46.95.32/27\",\r\n \"207.46.126.0/24\",\r\n \ - \ \"207.46.128.0/19\",\r\n \"207.68.174.208/28\",\r\n \ - \ \"2603:1040:200::/46\",\r\n \"2603:1040:204::/48\",\r\n \ - \ \"2603:1040:206::/48\",\r\n \"2603:1040:207::/48\",\r\n \ - \ \"2603:1040:208::/48\",\r\n \"2603:1046:1401::/48\",\r\n\ - \ \"2603:1046:1500:24::/64\",\r\n \"2603:1046:2000:40::/59\"\ - ,\r\n \"2603:1047:1:40::/59\",\r\n \"2a01:111:f100:6000::/64\"\ - ,\r\n \"2a01:111:f403:c400::/64\",\r\n \"2a01:111:f403:cc00::/62\"\ - ,\r\n \"2a01:111:f403:cc04::/64\",\r\n \"2a01:111:f403:d401::/64\"\ - ,\r\n \"2a01:111:f403:dc00::/64\",\r\n \"2a01:111:f403:e400::/64\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.eastus\"\ - ,\r\n \"id\": \"AzureCloud.eastus\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"7\",\r\ - \n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n \ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.68.128.0/17\",\r\n \"13.72.64.0/18\",\r\n \ - \ \"13.82.0.0/16\",\r\n \"13.90.0.0/16\",\r\n \"\ - 13.92.0.0/16\",\r\n \"13.104.144.128/27\",\r\n \"13.104.152.128/25\"\ - ,\r\n \"13.104.192.0/21\",\r\n \"13.104.211.0/25\",\r\n\ - \ \"13.104.214.128/25\",\r\n \"13.104.215.0/25\",\r\n \ - \ \"13.105.17.0/26\",\r\n \"13.105.19.0/25\",\r\n \ - \ \"13.105.20.192/26\",\r\n \"13.105.27.0/25\",\r\n \"\ - 13.105.27.192/27\",\r\n \"13.105.36.192/26\",\r\n \"13.105.74.48/28\"\ - ,\r\n \"13.105.98.48/28\",\r\n \"13.105.98.96/27\",\r\n\ - \ \"13.105.98.128/27\",\r\n \"20.38.98.0/24\",\r\n \ - \ \"20.39.32.0/19\",\r\n \"20.42.0.0/17\",\r\n \"20.47.1.0/24\"\ - ,\r\n \"20.47.16.0/23\",\r\n \"20.47.31.0/24\",\r\n \ - \ \"20.47.108.0/23\",\r\n \"20.47.113.0/24\",\r\n \"\ - 20.49.104.0/21\",\r\n \"20.51.128.0/17\",\r\n \"20.55.0.0/17\"\ - ,\r\n \"20.60.0.0/24\",\r\n \"20.60.2.0/23\",\r\n \ - \ \"20.60.6.0/23\",\r\n \"20.60.60.0/22\",\r\n \"20.60.128.0/23\"\ - ,\r\n \"20.60.134.0/23\",\r\n \"20.60.146.0/23\",\r\n \ - \ \"20.60.220.0/23\",\r\n \"20.62.128.0/17\",\r\n \ - \ \"20.72.128.0/18\",\r\n \"20.75.128.0/17\",\r\n \"20.81.0.0/17\"\ - ,\r\n \"20.83.128.0/18\",\r\n \"20.84.0.0/17\",\r\n \ - \ \"20.85.128.0/17\",\r\n \"20.88.128.0/18\",\r\n \"\ - 20.95.0.0/21\",\r\n \"20.102.0.0/17\",\r\n \"20.106.128.0/17\"\ - ,\r\n \"20.135.4.0/23\",\r\n \"20.135.194.0/23\",\r\n \ - \ \"20.135.196.0/22\",\r\n \"20.150.32.0/23\",\r\n \ - \ \"20.150.90.0/24\",\r\n \"20.157.6.0/23\",\r\n \"20.157.39.0/24\"\ - ,\r\n \"20.157.59.0/24\",\r\n \"20.157.61.0/24\",\r\n \ - \ \"20.157.104.0/24\",\r\n \"20.157.132.0/24\",\r\n \ - \ \"20.157.147.0/24\",\r\n \"20.185.0.0/16\",\r\n \"\ - 20.190.130.0/24\",\r\n \"20.190.151.0/24\",\r\n \"20.202.20.0/24\"\ - ,\r\n \"20.209.0.0/23\",\r\n \"23.96.0.0/17\",\r\n \ - \ \"23.98.45.0/24\",\r\n \"23.100.16.0/20\",\r\n \"\ - 23.101.128.0/20\",\r\n \"40.71.0.0/16\",\r\n \"40.76.0.0/16\"\ - ,\r\n \"40.78.219.0/24\",\r\n \"40.78.224.0/21\",\r\n \ - \ \"40.79.152.0/21\",\r\n \"40.80.144.0/21\",\r\n \ - \ \"40.82.24.0/22\",\r\n \"40.82.60.0/22\",\r\n \"40.85.160.0/19\"\ - ,\r\n \"40.87.0.0/17\",\r\n \"40.87.164.0/22\",\r\n \ - \ \"40.88.0.0/16\",\r\n \"40.90.23.128/25\",\r\n \"\ - 40.90.24.128/25\",\r\n \"40.90.25.0/26\",\r\n \"40.90.30.192/26\"\ - ,\r\n \"40.90.129.128/26\",\r\n \"40.90.130.96/28\",\r\n\ - \ \"40.90.131.224/27\",\r\n \"40.90.136.16/28\",\r\n \ - \ \"40.90.136.32/27\",\r\n \"40.90.137.96/27\",\r\n \ - \ \"40.90.139.224/27\",\r\n \"40.90.143.0/27\",\r\n \"\ - 40.90.146.64/26\",\r\n \"40.90.147.0/27\",\r\n \"40.90.148.64/27\"\ - ,\r\n \"40.90.150.32/27\",\r\n \"40.90.224.0/19\",\r\n \ - \ \"40.91.4.0/22\",\r\n \"40.93.2.0/24\",\r\n \"\ - 40.93.4.0/24\",\r\n \"40.93.11.0/24\",\r\n \"40.112.48.0/20\"\ - ,\r\n \"40.114.0.0/17\",\r\n \"40.117.32.0/19\",\r\n \ - \ \"40.117.64.0/18\",\r\n \"40.117.128.0/17\",\r\n \ - \ \"40.121.0.0/16\",\r\n \"40.123.132.0/22\",\r\n \"40.126.2.0/24\"\ - ,\r\n \"40.126.23.0/24\",\r\n \"52.101.4.0/22\",\r\n \ - \ \"52.101.9.0/24\",\r\n \"52.101.20.0/22\",\r\n \"\ - 52.101.51.0/24\",\r\n \"52.101.52.0/22\",\r\n \"52.102.129.0/24\"\ - ,\r\n \"52.102.137.0/24\",\r\n \"52.102.159.0/24\",\r\n\ - \ \"52.103.1.0/24\",\r\n \"52.103.3.0/24\",\r\n \ - \ \"52.103.11.0/24\",\r\n \"52.103.129.0/24\",\r\n \"52.103.137.0/24\"\ - ,\r\n \"52.108.16.0/21\",\r\n \"52.108.79.0/24\",\r\n \ - \ \"52.108.105.0/24\",\r\n \"52.108.106.0/23\",\r\n \ - \ \"52.109.12.0/22\",\r\n \"52.111.229.0/24\",\r\n \"\ - 52.112.112.0/24\",\r\n \"52.113.16.0/20\",\r\n \"52.114.132.0/22\"\ - ,\r\n \"52.115.54.0/24\",\r\n \"52.115.62.0/23\",\r\n \ - \ \"52.115.192.0/19\",\r\n \"52.120.32.0/19\",\r\n \ - \ \"52.120.224.0/20\",\r\n \"52.123.0.0/24\",\r\n \"52.125.132.0/22\"\ - ,\r\n \"52.136.64.0/18\",\r\n \"52.142.0.0/18\",\r\n \ - \ \"52.143.207.0/24\",\r\n \"52.146.0.0/17\",\r\n \ - \ \"52.147.192.0/18\",\r\n \"52.149.128.0/17\",\r\n \"52.150.0.0/17\"\ - ,\r\n \"52.151.128.0/17\",\r\n \"52.152.128.0/17\",\r\n\ - \ \"52.154.64.0/18\",\r\n \"52.168.0.0/16\",\r\n \ - \ \"52.170.0.0/16\",\r\n \"52.179.0.0/17\",\r\n \"52.186.0.0/16\"\ - ,\r\n \"52.188.0.0/16\",\r\n \"52.190.0.0/17\",\r\n \ - \ \"52.191.0.0/17\",\r\n \"52.191.192.0/18\",\r\n \"\ - 52.224.0.0/16\",\r\n \"52.226.0.0/16\",\r\n \"52.232.146.0/24\"\ - ,\r\n \"52.234.128.0/17\",\r\n \"52.239.152.0/22\",\r\n\ - \ \"52.239.168.0/22\",\r\n \"52.239.207.192/26\",\r\n \ - \ \"52.239.214.0/23\",\r\n \"52.239.220.0/23\",\r\n \ - \ \"52.239.246.0/23\",\r\n \"52.239.252.0/24\",\r\n \"\ - 52.240.0.0/17\",\r\n \"52.245.8.0/22\",\r\n \"52.245.104.0/22\"\ - ,\r\n \"52.249.128.0/17\",\r\n \"52.253.160.0/24\",\r\n\ - \ \"52.255.128.0/17\",\r\n \"53.103.137.0/24\",\r\n \ - \ \"65.54.19.128/27\",\r\n \"104.41.128.0/19\",\r\n \ - \ \"104.44.91.32/27\",\r\n \"104.44.94.16/28\",\r\n \"\ - 104.44.95.160/27\",\r\n \"104.44.95.240/28\",\r\n \"104.45.128.0/18\"\ - ,\r\n \"104.45.192.0/20\",\r\n \"104.211.0.0/18\",\r\n \ - \ \"137.116.112.0/20\",\r\n \"137.117.32.0/19\",\r\n \ - \ \"137.117.64.0/18\",\r\n \"137.135.64.0/18\",\r\n \ - \ \"138.91.96.0/19\",\r\n \"157.56.176.0/21\",\r\n \"168.61.32.0/20\"\ - ,\r\n \"168.61.48.0/21\",\r\n \"168.62.32.0/19\",\r\n \ - \ \"168.62.160.0/19\",\r\n \"191.234.32.0/19\",\r\n \ - \ \"191.236.0.0/18\",\r\n \"191.237.0.0/17\",\r\n \"\ - 191.238.0.0/18\",\r\n \"204.152.18.0/31\",\r\n \"204.152.18.8/29\"\ - ,\r\n \"204.152.18.32/27\",\r\n \"204.152.18.64/26\",\r\n\ - \ \"204.152.19.0/24\",\r\n \"2602:fd5e:1::/63\",\r\n \ - \ \"2602:fd5e:1:2::/64\",\r\n \"2603:1030:20c::/47\",\r\n \ - \ \"2603:1030:20e::/48\",\r\n \"2603:1030:210::/47\",\r\n\ - \ \"2603:1030:212::/56\",\r\n \"2603:1030:213::/48\",\r\n\ - \ \"2603:1036:120d::/48\",\r\n \"2603:1036:2404::/48\",\r\ - \n \"2603:1036:3000:120::/59\",\r\n \"2603:1037:1:120::/59\"\ - ,\r\n \"2a01:111:f100:2000::/52\",\r\n \"2a01:111:f403:c100::/64\"\ - ,\r\n \"2a01:111:f403:c900::/64\",\r\n \"2a01:111:f403:c91e::/63\"\ - ,\r\n \"2a01:111:f403:c920::/63\",\r\n \"2a01:111:f403:c922::/64\"\ - ,\r\n \"2a01:111:f403:d100::/64\",\r\n \"2a01:111:f403:d900::/64\"\ - ,\r\n \"2a01:111:f403:f000::/64\",\r\n \"2a01:111:f403:f900::/62\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.eastus2\"\ - ,\r\n \"id\": \"AzureCloud.eastus2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.68.0.0/17\",\r\n \"13.77.64.0/18\",\r\n \ - \ \"13.104.147.0/25\",\r\n \"13.104.208.64/27\",\r\n \ - \ \"13.105.18.192/26\",\r\n \"13.105.23.64/26\",\r\n \ - \ \"13.105.28.0/28\",\r\n \"13.105.28.128/25\",\r\n \"13.105.67.128/25\"\ - ,\r\n \"13.105.74.128/26\",\r\n \"13.105.75.0/27\",\r\n\ - \ \"13.105.75.32/28\",\r\n \"13.105.75.64/27\",\r\n \ - \ \"20.36.128.0/17\",\r\n \"20.38.100.0/23\",\r\n \"\ - 20.38.208.0/22\",\r\n \"20.41.0.0/18\",\r\n \"20.44.16.0/21\"\ - ,\r\n \"20.44.64.0/18\",\r\n \"20.47.60.0/23\",\r\n \ - \ \"20.47.76.0/23\",\r\n \"20.49.0.0/18\",\r\n \"20.49.96.0/21\"\ - ,\r\n \"20.55.192.0/18\",\r\n \"20.57.0.0/17\",\r\n \ - \ \"20.60.56.0/22\",\r\n \"20.60.88.0/22\",\r\n \"\ - 20.60.132.0/23\",\r\n \"20.60.180.0/23\",\r\n \"20.60.224.0/23\"\ - ,\r\n \"20.60.236.0/23\",\r\n \"20.62.0.0/17\",\r\n \ - \ \"20.65.0.0/17\",\r\n \"20.69.192.0/18\",\r\n \"\ - 20.72.64.0/18\",\r\n \"20.75.0.0/17\",\r\n \"20.80.192.0/18\"\ - ,\r\n \"20.81.128.0/17\",\r\n \"20.85.0.0/17\",\r\n \ - \ \"20.88.96.0/19\",\r\n \"20.94.0.0/17\",\r\n \"20.95.255.0/29\"\ - ,\r\n \"20.96.0.0/16\",\r\n \"20.97.128.0/17\",\r\n \ - \ \"20.98.192.0/18\",\r\n \"20.109.0.0/17\",\r\n \"\ - 20.110.0.0/16\",\r\n \"20.135.16.0/23\",\r\n \"20.135.200.0/22\"\ - ,\r\n \"20.135.204.0/23\",\r\n \"20.136.0.0/25\",\r\n \ - \ \"20.136.1.0/24\",\r\n \"20.143.2.0/24\",\r\n \"\ - 20.150.29.0/24\",\r\n \"20.150.36.0/24\",\r\n \"20.150.50.0/23\"\ - ,\r\n \"20.150.72.0/24\",\r\n \"20.150.82.0/24\",\r\n \ - \ \"20.150.88.0/24\",\r\n \"20.157.36.0/23\",\r\n \ - \ \"20.157.48.0/23\",\r\n \"20.157.62.0/23\",\r\n \"20.186.0.0/17\"\ - ,\r\n \"20.186.128.0/18\",\r\n \"20.190.131.0/24\",\r\n\ - \ \"20.190.152.0/24\",\r\n \"20.190.192.0/18\",\r\n \ - \ \"20.201.224.0/23\",\r\n \"20.202.21.0/24\",\r\n \ - \ \"23.100.64.0/21\",\r\n \"23.101.32.0/21\",\r\n \"23.101.80.0/21\"\ - ,\r\n \"23.101.144.0/20\",\r\n \"23.102.96.0/19\",\r\n \ - \ \"23.102.204.0/22\",\r\n \"23.102.208.0/20\",\r\n \ - \ \"40.65.192.0/18\",\r\n \"40.67.128.0/19\",\r\n \"\ - 40.70.0.0/18\",\r\n \"40.70.64.0/20\",\r\n \"40.70.80.0/21\"\ - ,\r\n \"40.70.128.0/17\",\r\n \"40.75.0.0/19\",\r\n \ - \ \"40.75.64.0/18\",\r\n \"40.77.128.128/25\",\r\n \ - \ \"40.77.129.0/24\",\r\n \"40.77.130.0/25\",\r\n \"40.77.132.0/24\"\ - ,\r\n \"40.77.136.48/28\",\r\n \"40.77.137.128/26\",\r\n\ - \ \"40.77.138.128/25\",\r\n \"40.77.163.0/24\",\r\n \ - \ \"40.77.166.160/27\",\r\n \"40.77.167.0/24\",\r\n \ - \ \"40.77.168.0/24\",\r\n \"40.77.170.0/24\",\r\n \"40.77.175.96/27\"\ - ,\r\n \"40.77.177.0/24\",\r\n \"40.77.178.0/23\",\r\n \ - \ \"40.77.182.0/28\",\r\n \"40.77.182.32/27\",\r\n \ - \ \"40.77.184.0/25\",\r\n \"40.77.198.0/26\",\r\n \"40.77.199.192/26\"\ - ,\r\n \"40.77.224.128/25\",\r\n \"40.77.228.0/24\",\r\n\ - \ \"40.77.233.0/24\",\r\n \"40.77.234.192/27\",\r\n \ - \ \"40.77.236.80/28\",\r\n \"40.77.237.64/26\",\r\n \ - \ \"40.77.240.0/25\",\r\n \"40.77.245.0/24\",\r\n \"40.77.248.0/25\"\ - ,\r\n \"40.77.251.0/24\",\r\n \"40.78.208.48/28\",\r\n \ - \ \"40.78.220.0/24\",\r\n \"40.79.0.0/21\",\r\n \ - \ \"40.79.8.0/27\",\r\n \"40.79.8.32/28\",\r\n \"40.79.8.64/27\"\ - ,\r\n \"40.79.8.96/28\",\r\n \"40.79.9.0/24\",\r\n \ - \ \"40.79.16.0/20\",\r\n \"40.79.32.0/20\",\r\n \"40.79.48.0/27\"\ - ,\r\n \"40.79.48.32/28\",\r\n \"40.79.49.0/24\",\r\n \ - \ \"40.79.56.0/21\",\r\n \"40.79.64.0/20\",\r\n \"\ - 40.79.80.0/21\",\r\n \"40.79.90.0/24\",\r\n \"40.79.91.0/28\"\ - ,\r\n \"40.79.92.0/24\",\r\n \"40.79.93.0/28\",\r\n \ - \ \"40.79.94.0/24\",\r\n \"40.79.95.0/28\",\r\n \"\ - 40.79.206.64/27\",\r\n \"40.79.240.0/20\",\r\n \"40.82.4.0/22\"\ - ,\r\n \"40.82.44.0/22\",\r\n \"40.84.0.0/17\",\r\n \ - \ \"40.87.168.0/30\",\r\n \"40.87.168.8/29\",\r\n \"\ - 40.87.168.16/28\",\r\n \"40.87.168.32/29\",\r\n \"40.87.168.48/28\"\ - ,\r\n \"40.87.168.64/30\",\r\n \"40.87.168.70/31\",\r\n\ - \ \"40.87.168.72/29\",\r\n \"40.87.168.80/28\",\r\n \ - \ \"40.87.168.96/27\",\r\n \"40.87.168.128/26\",\r\n \ - \ \"40.87.168.192/28\",\r\n \"40.87.168.210/31\",\r\n \ - \ \"40.87.168.212/30\",\r\n \"40.87.168.216/29\",\r\n \"\ - 40.87.168.224/27\",\r\n \"40.87.169.0/27\",\r\n \"40.87.169.32/29\"\ - ,\r\n \"40.87.169.44/30\",\r\n \"40.87.169.48/29\",\r\n\ - \ \"40.87.169.56/31\",\r\n \"40.87.169.60/30\",\r\n \ - \ \"40.87.169.64/27\",\r\n \"40.87.169.96/31\",\r\n \ - \ \"40.87.169.102/31\",\r\n \"40.87.169.104/29\",\r\n \"\ - 40.87.169.112/28\",\r\n \"40.87.169.128/29\",\r\n \"40.87.169.136/31\"\ - ,\r\n \"40.87.169.140/30\",\r\n \"40.87.169.160/27\",\r\n\ - \ \"40.87.169.192/26\",\r\n \"40.87.170.0/25\",\r\n \ - \ \"40.87.170.128/28\",\r\n \"40.87.170.144/31\",\r\n \ - \ \"40.87.170.152/29\",\r\n \"40.87.170.160/28\",\r\n \ - \ \"40.87.170.176/29\",\r\n \"40.87.170.184/30\",\r\n \"\ - 40.87.170.194/31\",\r\n \"40.87.170.196/30\",\r\n \"40.87.170.214/31\"\ - ,\r\n \"40.87.170.216/30\",\r\n \"40.87.170.228/30\",\r\n\ - \ \"40.87.170.232/29\",\r\n \"40.87.170.240/29\",\r\n \ - \ \"40.87.170.248/30\",\r\n \"40.87.171.2/31\",\r\n \ - \ \"40.87.171.4/30\",\r\n \"40.87.171.8/29\",\r\n \"\ - 40.87.171.16/28\",\r\n \"40.87.171.36/30\",\r\n \"40.87.171.40/31\"\ - ,\r\n \"40.87.171.72/29\",\r\n \"40.87.171.80/28\",\r\n\ - \ \"40.87.171.96/27\",\r\n \"40.87.171.128/27\",\r\n \ - \ \"40.87.171.160/31\",\r\n \"40.87.171.166/31\",\r\n \ - \ \"40.87.171.168/29\",\r\n \"40.87.171.176/28\",\r\n \ - \ \"40.87.171.192/27\",\r\n \"40.87.171.224/28\",\r\n \ - \ \"40.87.171.240/29\",\r\n \"40.87.171.248/31\",\r\n \"\ - 40.90.19.128/25\",\r\n \"40.90.20.0/25\",\r\n \"40.90.130.160/27\"\ - ,\r\n \"40.90.132.128/26\",\r\n \"40.90.133.112/28\",\r\n\ - \ \"40.90.134.192/26\",\r\n \"40.90.136.0/28\",\r\n \ - \ \"40.90.138.160/27\",\r\n \"40.90.140.160/27\",\r\n \ - \ \"40.90.140.192/27\",\r\n \"40.90.143.192/26\",\r\n \ - \ \"40.90.144.64/26\",\r\n \"40.90.145.32/27\",\r\n \"\ - 40.90.145.64/27\",\r\n \"40.90.148.96/27\",\r\n \"40.90.155.128/26\"\ - ,\r\n \"40.90.157.128/26\",\r\n \"40.90.158.128/25\",\r\n\ - \ \"40.91.12.16/28\",\r\n \"40.91.12.48/28\",\r\n \ - \ \"40.91.12.64/26\",\r\n \"40.91.12.128/28\",\r\n \"\ - 40.91.12.160/27\",\r\n \"40.91.12.208/28\",\r\n \"40.91.12.240/28\"\ - ,\r\n \"40.91.13.64/27\",\r\n \"40.91.13.96/28\",\r\n \ - \ \"40.91.13.128/27\",\r\n \"40.91.13.240/28\",\r\n \ - \ \"40.91.14.0/24\",\r\n \"40.93.3.0/24\",\r\n \"40.93.12.0/24\"\ - ,\r\n \"40.123.0.0/17\",\r\n \"40.123.144.0/26\",\r\n \ - \ \"40.123.144.64/29\",\r\n \"40.123.144.104/29\",\r\n \ - \ \"40.123.144.112/28\",\r\n \"40.123.144.128/28\",\r\n \ - \ \"40.123.144.144/29\",\r\n \"40.126.3.0/24\",\r\n \ - \ \"40.126.24.0/24\",\r\n \"52.101.10.0/24\",\r\n \"52.101.36.0/22\"\ - ,\r\n \"52.101.56.0/22\",\r\n \"52.101.60.0/24\",\r\n \ - \ \"52.102.131.0/24\",\r\n \"52.102.138.0/24\",\r\n \ - \ \"52.103.5.0/24\",\r\n \"52.103.12.0/24\",\r\n \"52.103.131.0/24\"\ - ,\r\n \"52.103.138.0/24\",\r\n \"52.108.186.0/24\",\r\n\ - \ \"52.108.216.0/22\",\r\n \"52.109.4.0/22\",\r\n \ - \ \"52.111.230.0/24\",\r\n \"52.112.76.0/22\",\r\n \"\ - 52.112.95.0/24\",\r\n \"52.112.104.0/24\",\r\n \"52.112.108.0/24\"\ - ,\r\n \"52.112.116.0/24\",\r\n \"52.114.136.0/21\",\r\n\ - \ \"52.114.180.0/22\",\r\n \"52.114.186.0/23\",\r\n \ - \ \"52.115.48.0/22\",\r\n \"52.115.52.0/23\",\r\n \"\ - 52.115.64.0/22\",\r\n \"52.115.160.0/19\",\r\n \"52.120.64.0/19\"\ - ,\r\n \"52.121.32.0/22\",\r\n \"52.123.4.0/24\",\r\n \ - \ \"52.125.136.0/24\",\r\n \"52.136.29.0/24\",\r\n \ - \ \"52.138.80.0/21\",\r\n \"52.138.96.0/19\",\r\n \"52.143.192.0/24\"\ - ,\r\n \"52.147.160.0/19\",\r\n \"52.167.0.0/16\",\r\n \ - \ \"52.177.0.0/16\",\r\n \"52.179.128.0/17\",\r\n \ - \ \"52.184.128.0/19\",\r\n \"52.184.160.0/21\",\r\n \"\ - 52.184.168.0/28\",\r\n \"52.184.168.80/28\",\r\n \"52.184.168.96/27\"\ - ,\r\n \"52.184.168.128/28\",\r\n \"52.184.169.0/24\",\r\n\ - \ \"52.184.170.0/24\",\r\n \"52.184.176.0/20\",\r\n \ - \ \"52.184.192.0/18\",\r\n \"52.225.128.0/21\",\r\n \ - \ \"52.225.136.0/27\",\r\n \"52.225.136.32/28\",\r\n \"\ - 52.225.136.64/28\",\r\n \"52.225.137.0/24\",\r\n \"52.225.192.0/18\"\ - ,\r\n \"52.232.151.0/24\",\r\n \"52.232.160.0/19\",\r\n\ - \ \"52.232.192.0/18\",\r\n \"52.239.156.0/24\",\r\n \ - \ \"52.239.157.0/25\",\r\n \"52.239.157.128/26\",\r\n \ - \ \"52.239.157.192/27\",\r\n \"52.239.172.0/22\",\r\n \ - \ \"52.239.184.0/25\",\r\n \"52.239.184.160/28\",\r\n \"\ - 52.239.184.192/27\",\r\n \"52.239.185.32/27\",\r\n \"52.239.192.0/26\"\ - ,\r\n \"52.239.192.64/28\",\r\n \"52.239.192.96/27\",\r\n\ - \ \"52.239.192.160/27\",\r\n \"52.239.192.192/26\",\r\n\ - \ \"52.239.198.0/25\",\r\n \"52.239.198.192/26\",\r\n \ - \ \"52.239.206.0/24\",\r\n \"52.239.207.32/28\",\r\n \ - \ \"52.239.207.64/26\",\r\n \"52.239.207.128/27\",\r\n \ - \ \"52.239.222.0/23\",\r\n \"52.242.64.0/18\",\r\n \"\ - 52.245.44.0/24\",\r\n \"52.245.45.0/25\",\r\n \"52.245.45.128/28\"\ - ,\r\n \"52.245.45.160/27\",\r\n \"52.245.45.192/26\",\r\n\ - \ \"52.245.46.0/27\",\r\n \"52.245.46.48/28\",\r\n \ - \ \"52.245.46.64/28\",\r\n \"52.245.46.112/28\",\r\n \ - \ \"52.245.46.128/28\",\r\n \"52.245.46.160/27\",\r\n \"\ - 52.245.46.192/26\",\r\n \"52.247.0.0/17\",\r\n \"52.250.128.0/18\"\ - ,\r\n \"52.251.0.0/17\",\r\n \"52.252.0.0/17\",\r\n \ - \ \"52.253.64.0/20\",\r\n \"52.253.148.0/23\",\r\n \ - \ \"52.253.154.0/23\",\r\n \"52.254.0.0/18\",\r\n \"52.254.64.0/19\"\ - ,\r\n \"52.254.96.0/20\",\r\n \"52.254.112.0/21\",\r\n \ - \ \"53.103.138.0/24\",\r\n \"65.52.108.0/23\",\r\n \ - \ \"65.52.110.0/24\",\r\n \"65.55.44.16/28\",\r\n \"\ - 65.55.44.32/27\",\r\n \"65.55.44.64/27\",\r\n \"65.55.44.96/28\"\ - ,\r\n \"65.55.44.128/27\",\r\n \"65.55.60.188/30\",\r\n\ - \ \"65.55.105.0/26\",\r\n \"65.55.105.96/27\",\r\n \ - \ \"65.55.105.224/27\",\r\n \"65.55.106.0/26\",\r\n \ - \ \"65.55.106.64/27\",\r\n \"65.55.106.128/26\",\r\n \"\ - 65.55.107.48/28\",\r\n \"65.55.107.64/27\",\r\n \"65.55.108.0/24\"\ - ,\r\n \"65.55.209.128/26\",\r\n \"65.55.211.32/27\",\r\n\ - \ \"65.55.213.64/26\",\r\n \"65.55.213.128/26\",\r\n \ - \ \"65.55.217.0/24\",\r\n \"65.55.219.32/27\",\r\n \ - \ \"65.55.219.128/25\",\r\n \"104.44.88.32/27\",\r\n \"\ - 104.44.88.96/27\",\r\n \"104.44.91.96/27\",\r\n \"104.44.93.160/27\"\ - ,\r\n \"104.44.94.48/28\",\r\n \"104.46.0.0/21\",\r\n \ - \ \"104.46.96.0/19\",\r\n \"104.46.192.0/20\",\r\n \ - \ \"104.47.200.0/21\",\r\n \"104.208.128.0/17\",\r\n \"\ - 104.209.128.0/17\",\r\n \"104.210.0.0/20\",\r\n \"131.253.12.176/28\"\ - ,\r\n \"131.253.12.208/28\",\r\n \"131.253.12.224/30\",\r\ - \n \"131.253.13.16/29\",\r\n \"131.253.13.48/28\",\r\n \ - \ \"131.253.13.72/29\",\r\n \"131.253.13.80/29\",\r\n \ - \ \"131.253.13.96/30\",\r\n \"131.253.14.16/28\",\r\n \ - \ \"131.253.14.64/29\",\r\n \"131.253.14.208/28\",\r\n \ - \ \"131.253.14.224/28\",\r\n \"131.253.15.8/29\",\r\n \ - \ \"131.253.15.16/28\",\r\n \"131.253.24.0/28\",\r\n \"\ - 131.253.24.192/26\",\r\n \"131.253.34.224/27\",\r\n \"131.253.38.0/27\"\ - ,\r\n \"131.253.38.128/26\",\r\n \"131.253.40.0/28\",\r\n\ - \ \"134.170.220.0/23\",\r\n \"137.116.0.0/18\",\r\n \ - \ \"137.116.64.0/19\",\r\n \"137.116.96.0/22\",\r\n \ - \ \"157.55.7.128/26\",\r\n \"157.55.10.192/26\",\r\n \"\ - 157.55.11.128/25\",\r\n \"157.55.37.0/24\",\r\n \"157.55.38.0/24\"\ - ,\r\n \"157.55.48.0/24\",\r\n \"157.55.50.0/25\",\r\n \ - \ \"157.55.55.100/30\",\r\n \"157.55.55.104/29\",\r\n \ - \ \"157.55.55.136/29\",\r\n \"157.55.55.144/29\",\r\n \ - \ \"157.55.55.160/28\",\r\n \"157.56.2.128/25\",\r\n \ - \ \"157.56.3.0/25\",\r\n \"191.236.192.0/18\",\r\n \"191.237.128.0/18\"\ - ,\r\n \"191.239.224.0/20\",\r\n \"193.149.64.0/21\",\r\n\ - \ \"199.30.16.0/24\",\r\n \"199.30.18.0/23\",\r\n \ - \ \"199.30.20.0/24\",\r\n \"199.30.22.0/24\",\r\n \"\ - 199.30.28.64/26\",\r\n \"199.30.28.128/25\",\r\n \"199.30.29.0/24\"\ - ,\r\n \"2603:1030:400::/48\",\r\n \"2603:1030:401:2::/63\"\ - ,\r\n \"2603:1030:401:4::/62\",\r\n \"2603:1030:401:8::/61\"\ - ,\r\n \"2603:1030:401:10::/62\",\r\n \"2603:1030:401:14::/63\"\ - ,\r\n \"2603:1030:401:17::/64\",\r\n \"2603:1030:401:18::/61\"\ - ,\r\n \"2603:1030:401:20::/59\",\r\n \"2603:1030:401:40::/60\"\ - ,\r\n \"2603:1030:401:50::/61\",\r\n \"2603:1030:401:58::/64\"\ - ,\r\n \"2603:1030:401:5a::/63\",\r\n \"2603:1030:401:5c::/62\"\ - ,\r\n \"2603:1030:401:60::/59\",\r\n \"2603:1030:401:80::/62\"\ - ,\r\n \"2603:1030:401:84::/64\",\r\n \"2603:1030:401:87::/64\"\ - ,\r\n \"2603:1030:401:88::/62\",\r\n \"2603:1030:401:8c::/63\"\ - ,\r\n \"2603:1030:401:8f::/64\",\r\n \"2603:1030:401:90::/63\"\ - ,\r\n \"2603:1030:401:94::/62\",\r\n \"2603:1030:401:98::/61\"\ - ,\r\n \"2603:1030:401:a0::/62\",\r\n \"2603:1030:401:a4::/63\"\ - ,\r\n \"2603:1030:401:a7::/64\",\r\n \"2603:1030:401:a8::/61\"\ - ,\r\n \"2603:1030:401:b0::/60\",\r\n \"2603:1030:401:c0::/58\"\ - ,\r\n \"2603:1030:401:100::/59\",\r\n \"2603:1030:401:120::/64\"\ - ,\r\n \"2603:1030:401:124::/62\",\r\n \"2603:1030:401:128::/61\"\ - ,\r\n \"2603:1030:401:130::/62\",\r\n \"2603:1030:401:134::/63\"\ - ,\r\n \"2603:1030:401:139::/64\",\r\n \"2603:1030:401:13a::/63\"\ - ,\r\n \"2603:1030:401:143::/64\",\r\n \"2603:1030:401:144::/63\"\ - ,\r\n \"2603:1030:401:14a::/63\",\r\n \"2603:1030:401:14c::/62\"\ - ,\r\n \"2603:1030:401:150::/62\",\r\n \"2603:1030:401:154::/63\"\ - ,\r\n \"2603:1030:401:159::/64\",\r\n \"2603:1030:401:15a::/63\"\ - ,\r\n \"2603:1030:401:15c::/62\",\r\n \"2603:1030:401:160::/61\"\ - ,\r\n \"2603:1030:401:16a::/63\",\r\n \"2603:1030:401:16c::/64\"\ - ,\r\n \"2603:1030:401:17c::/62\",\r\n \"2603:1030:401:180::/58\"\ - ,\r\n \"2603:1030:401:1c0::/61\",\r\n \"2603:1030:401:1c8::/63\"\ - ,\r\n \"2603:1030:401:1cc::/62\",\r\n \"2603:1030:401:1d0::/60\"\ - ,\r\n \"2603:1030:401:1e0::/60\",\r\n \"2603:1030:401:1f0::/61\"\ - ,\r\n \"2603:1030:401:1f8::/64\",\r\n \"2603:1030:401:20c::/62\"\ - ,\r\n \"2603:1030:401:210::/60\",\r\n \"2603:1030:401:220::/62\"\ - ,\r\n \"2603:1030:402::/47\",\r\n \"2603:1030:406::/47\"\ - ,\r\n \"2603:1030:408::/48\",\r\n \"2603:1030:40a:1::/64\"\ - ,\r\n \"2603:1030:40a:2::/64\",\r\n \"2603:1030:40c::/48\"\ - ,\r\n \"2603:1030:40d:8000::/49\",\r\n \"2603:1030:40e::/56\"\ - ,\r\n \"2603:1030:40f::/48\",\r\n \"2603:1036:2405::/48\"\ - ,\r\n \"2603:1036:2500::/64\",\r\n \"2603:1036:3000::/59\"\ - ,\r\n \"2603:1037:1::/59\",\r\n \"2603:1039:205::/48\",\r\ - \n \"2603:1062:2::/57\",\r\n \"2a01:111:f403:c110::/64\"\ - ,\r\n \"2a01:111:f403:c908::/62\",\r\n \"2a01:111:f403:c923::/64\"\ - ,\r\n \"2a01:111:f403:c924::/62\",\r\n \"2a01:111:f403:d108::/62\"\ - ,\r\n \"2a01:111:f403:d908::/62\",\r\n \"2a01:111:f403:e008::/62\"\ - ,\r\n \"2a01:111:f403:f908::/62\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCloud.eastus2euap\",\r\n \"id\"\ - : \"AzureCloud.eastus2euap\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \ - \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n \ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.216.0/24\",\r\n \"13.105.52.32/27\",\r\n\ - \ \"13.105.52.64/28\",\r\n \"13.105.52.96/27\",\r\n \ - \ \"13.105.60.160/27\",\r\n \"13.105.61.0/28\",\r\n \ - \ \"13.105.61.32/27\",\r\n \"20.39.0.0/19\",\r\n \"20.47.6.0/24\"\ - ,\r\n \"20.47.106.0/24\",\r\n \"20.47.128.0/17\",\r\n \ - \ \"20.51.16.0/21\",\r\n \"20.60.154.0/23\",\r\n \ - \ \"20.60.184.0/23\",\r\n \"20.60.238.0/23\",\r\n \"20.102.128.0/18\"\ - ,\r\n \"20.135.210.0/23\",\r\n \"20.135.212.0/22\",\r\n\ - \ \"20.150.108.0/24\",\r\n \"20.157.58.0/24\",\r\n \ - \ \"20.157.149.0/24\",\r\n \"20.190.138.0/25\",\r\n \ - \ \"20.190.149.0/24\",\r\n \"40.70.88.0/28\",\r\n \"40.74.144.0/20\"\ - ,\r\n \"40.75.32.0/21\",\r\n \"40.78.208.0/28\",\r\n \ - \ \"40.79.88.0/27\",\r\n \"40.79.88.32/28\",\r\n \"\ - 40.79.89.0/24\",\r\n \"40.79.96.0/19\",\r\n \"40.87.168.4/30\"\ - ,\r\n \"40.87.168.40/29\",\r\n \"40.87.168.68/31\",\r\n\ - \ \"40.87.168.208/31\",\r\n \"40.87.169.40/30\",\r\n \ - \ \"40.87.169.58/31\",\r\n \"40.87.169.98/31\",\r\n \ - \ \"40.87.169.100/31\",\r\n \"40.87.169.138/31\",\r\n \ - \ \"40.87.169.144/28\",\r\n \"40.87.170.146/31\",\r\n \"\ - 40.87.170.148/30\",\r\n \"40.87.170.188/30\",\r\n \"40.87.170.192/31\"\ - ,\r\n \"40.87.170.200/29\",\r\n \"40.87.170.208/30\",\r\n\ - \ \"40.87.170.212/31\",\r\n \"40.87.170.220/30\",\r\n \ - \ \"40.87.170.224/30\",\r\n \"40.87.170.252/30\",\r\n \ - \ \"40.87.171.0/31\",\r\n \"40.87.171.32/30\",\r\n \ - \ \"40.87.171.42/31\",\r\n \"40.87.171.44/30\",\r\n \"40.87.171.48/28\"\ - ,\r\n \"40.87.171.64/29\",\r\n \"40.87.171.162/31\",\r\n\ - \ \"40.87.171.164/31\",\r\n \"40.87.171.250/31\",\r\n \ - \ \"40.87.171.252/30\",\r\n \"40.89.64.0/18\",\r\n \ - \ \"40.90.129.96/27\",\r\n \"40.90.137.32/27\",\r\n \"\ - 40.90.146.192/27\",\r\n \"40.91.12.0/28\",\r\n \"40.91.12.32/28\"\ - ,\r\n \"40.91.13.0/28\",\r\n \"40.93.16.0/24\",\r\n \ - \ \"40.93.203.0/24\",\r\n \"40.93.204.0/22\",\r\n \"\ - 40.96.46.0/24\",\r\n \"40.96.55.0/24\",\r\n \"40.123.144.72/29\"\ - ,\r\n \"40.123.144.80/28\",\r\n \"40.123.144.96/29\",\r\n\ - \ \"40.123.144.152/30\",\r\n \"40.126.10.0/25\",\r\n \ - \ \"40.126.21.0/24\",\r\n \"52.102.142.0/24\",\r\n \ - \ \"52.103.16.0/24\",\r\n \"52.103.142.0/24\",\r\n \"52.108.116.0/24\"\ - ,\r\n \"52.109.165.0/24\",\r\n \"52.111.208.0/24\",\r\n\ - \ \"52.138.64.0/20\",\r\n \"52.138.88.0/21\",\r\n \ - \ \"52.143.212.0/23\",\r\n \"52.147.128.0/19\",\r\n \"\ - 52.184.168.16/28\",\r\n \"52.184.168.32/28\",\r\n \"52.225.136.48/28\"\ - ,\r\n \"52.225.144.0/20\",\r\n \"52.225.160.0/19\",\r\n\ - \ \"52.232.150.0/24\",\r\n \"52.239.157.224/27\",\r\n \ - \ \"52.239.165.192/26\",\r\n \"52.239.184.176/28\",\r\n \ - \ \"52.239.184.224/27\",\r\n \"52.239.185.0/28\",\r\n \ - \ \"52.239.192.128/27\",\r\n \"52.239.198.128/27\",\r\n \ - \ \"52.239.230.0/24\",\r\n \"52.239.239.0/24\",\r\n \ - \ \"52.245.45.144/28\",\r\n \"52.245.46.32/28\",\r\n \"\ - 52.245.46.80/28\",\r\n \"52.245.46.96/28\",\r\n \"52.253.150.0/23\"\ - ,\r\n \"52.253.152.0/23\",\r\n \"52.253.224.0/21\",\r\n\ - \ \"52.254.120.0/21\",\r\n \"53.103.142.0/24\",\r\n \ - \ \"104.44.95.208/28\",\r\n \"198.180.97.0/24\",\r\n \ - \ \"2603:1030:401::/63\",\r\n \"2603:1030:401:16::/64\",\r\n \ - \ \"2603:1030:401:59::/64\",\r\n \"2603:1030:401:85::/64\"\ - ,\r\n \"2603:1030:401:86::/64\",\r\n \"2603:1030:401:8e::/64\"\ - ,\r\n \"2603:1030:401:92::/63\",\r\n \"2603:1030:401:a6::/64\"\ - ,\r\n \"2603:1030:401:121::/64\",\r\n \"2603:1030:401:122::/63\"\ - ,\r\n \"2603:1030:401:136::/63\",\r\n \"2603:1030:401:138::/64\"\ - ,\r\n \"2603:1030:401:13c::/62\",\r\n \"2603:1030:401:140::/63\"\ - ,\r\n \"2603:1030:401:142::/64\",\r\n \"2603:1030:401:146::/63\"\ - ,\r\n \"2603:1030:401:148::/63\",\r\n \"2603:1030:401:156::/63\"\ - ,\r\n \"2603:1030:401:158::/64\",\r\n \"2603:1030:401:168::/63\"\ - ,\r\n \"2603:1030:401:16d::/64\",\r\n \"2603:1030:401:16e::/63\"\ - ,\r\n \"2603:1030:401:170::/61\",\r\n \"2603:1030:401:178::/62\"\ - ,\r\n \"2603:1030:401:1ca::/63\",\r\n \"2603:1030:401:1f9::/64\"\ - ,\r\n \"2603:1030:401:1fa::/63\",\r\n \"2603:1030:401:1fc::/62\"\ - ,\r\n \"2603:1030:401:200::/61\",\r\n \"2603:1030:401:208::/62\"\ - ,\r\n \"2603:1030:401:224::/63\",\r\n \"2603:1030:405::/48\"\ - ,\r\n \"2603:1030:409::/48\",\r\n \"2603:1030:40a::/64\"\ - ,\r\n \"2603:1030:40a:3::/64\",\r\n \"2603:1030:40a:4::/62\"\ - ,\r\n \"2603:1030:40a:8::/63\",\r\n \"2603:1030:40b::/48\"\ - ,\r\n \"2603:1030:40d::/60\",\r\n \"2603:1030:40d:4000::/50\"\ - ,\r\n \"2603:1030:40e:100::/56\",\r\n \"2603:1030:410::/48\"\ - ,\r\n \"2603:1036:903:1::/64\",\r\n \"2603:1036:903:3::/64\"\ - ,\r\n \"2603:1036:240a::/48\",\r\n \"2603:1036:240f::/48\"\ - ,\r\n \"2603:1036:2500:4::/64\",\r\n \"2603:1036:3000:20::/59\"\ - ,\r\n \"2603:1037:1:20::/59\",\r\n \"2a01:111:f403:c113::/64\"\ - ,\r\n \"2a01:111:f403:c937::/64\",\r\n \"2a01:111:f403:c938::/62\"\ - ,\r\n \"2a01:111:f403:d124::/64\",\r\n \"2a01:111:f403:d914::/64\"\ - ,\r\n \"2a01:111:f403:e003::/64\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCloud.germanyn\",\r\n \"id\"\ - : \"AzureCloud.germanyn\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.144.96/27\"\ - ,\r\n \"13.104.212.64/26\",\r\n \"20.38.115.0/24\",\r\n\ - \ \"20.47.45.0/24\",\r\n \"20.47.84.0/23\",\r\n \ - \ \"20.52.72.0/21\",\r\n \"20.52.80.32/27\",\r\n \"20.135.56.0/23\"\ - ,\r\n \"20.150.60.0/24\",\r\n \"20.150.112.0/24\",\r\n \ - \ \"20.190.189.0/26\",\r\n \"40.82.72.0/22\",\r\n \ - \ \"40.90.31.0/27\",\r\n \"40.90.128.240/28\",\r\n \"\ - 40.119.96.0/22\",\r\n \"40.126.61.0/26\",\r\n \"40.126.198.0/24\"\ - ,\r\n \"51.116.0.0/18\",\r\n \"51.116.64.0/19\",\r\n \ - \ \"51.116.200.0/21\",\r\n \"51.116.208.0/20\",\r\n \ - \ \"52.108.76.0/24\",\r\n \"52.108.97.0/24\",\r\n \"52.109.102.0/23\"\ - ,\r\n \"52.111.254.0/24\",\r\n \"52.114.240.0/24\",\r\n\ - \ \"52.253.172.0/24\",\r\n \"2603:1020:d00::/47\",\r\n \ - \ \"2603:1020:d03::/48\",\r\n \"2603:1020:d04::/47\",\r\n\ - \ \"2603:1026:2411::/48\",\r\n \"2603:1026:2500:34::/64\"\ - ,\r\n \"2603:1026:3000:220::/59\",\r\n \"2603:1027:1:220::/59\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.germanywc\"\ - ,\r\n \"id\": \"AzureCloud.germanywc\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.144.224/27\",\r\n \"13.104.145.128/27\"\ - ,\r\n \"13.104.212.128/26\",\r\n \"13.105.61.128/25\",\r\ - \n \"13.105.66.0/27\",\r\n \"13.105.74.96/27\",\r\n \ - \ \"13.105.74.192/26\",\r\n \"20.38.118.0/24\",\r\n \ - \ \"20.47.27.0/24\",\r\n \"20.47.65.0/24\",\r\n \"20.47.112.0/24\"\ - ,\r\n \"20.52.0.0/18\",\r\n \"20.52.64.0/21\",\r\n \ - \ \"20.52.80.0/27\",\r\n \"20.52.80.64/27\",\r\n \"\ - 20.52.88.0/21\",\r\n \"20.52.96.0/19\",\r\n \"20.52.128.0/17\"\ - ,\r\n \"20.60.22.0/23\",\r\n \"20.79.0.0/16\",\r\n \ - \ \"20.113.0.0/18\",\r\n \"20.135.152.0/22\",\r\n \"\ - 20.135.156.0/23\",\r\n \"20.150.54.0/24\",\r\n \"20.150.125.0/24\"\ - ,\r\n \"20.157.160.0/24\",\r\n \"20.190.190.64/26\",\r\n\ - \ \"40.82.68.0/22\",\r\n \"40.90.129.48/28\",\r\n \ - \ \"40.90.140.0/27\",\r\n \"40.90.147.32/27\",\r\n \"\ - 40.90.151.160/27\",\r\n \"40.119.92.0/22\",\r\n \"40.126.62.64/26\"\ - ,\r\n \"40.126.197.0/24\",\r\n \"51.116.96.0/19\",\r\n \ - \ \"51.116.128.0/18\",\r\n \"51.116.192.0/21\",\r\n \ - \ \"51.116.224.0/19\",\r\n \"52.108.178.0/24\",\r\n \ - \ \"52.108.199.0/24\",\r\n \"52.109.104.0/23\",\r\n \"52.111.255.0/24\"\ - ,\r\n \"52.114.244.0/24\",\r\n \"52.253.169.0/24\",\r\n\ - \ \"52.253.170.0/23\",\r\n \"2603:1020:c00::/47\",\r\n \ - \ \"2603:1020:c03::/48\",\r\n \"2603:1020:c04::/47\",\r\n\ - \ \"2603:1026:240a::/48\",\r\n \"2603:1026:2500:14::/64\"\ - ,\r\n \"2603:1026:3000:a0::/59\",\r\n \"2603:1027:1:a0::/59\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.japaneast\"\ - ,\r\n \"id\": \"AzureCloud.japaneast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.71.128.0/19\",\r\n \"13.73.0.0/19\",\r\n \ - \ \"13.78.0.0/17\",\r\n \"13.104.149.64/26\",\r\n \ - \ \"13.104.150.128/26\",\r\n \"13.104.221.0/24\",\r\n \"\ - 13.105.18.64/26\",\r\n \"20.37.96.0/19\",\r\n \"20.38.116.0/23\"\ - ,\r\n \"20.40.88.0/21\",\r\n \"20.40.96.0/21\",\r\n \ - \ \"20.43.64.0/19\",\r\n \"20.44.128.0/18\",\r\n \"\ - 20.46.112.0/20\",\r\n \"20.46.160.0/19\",\r\n \"20.47.12.0/24\"\ - ,\r\n \"20.47.101.0/24\",\r\n \"20.48.0.0/17\",\r\n \ - \ \"20.60.172.0/23\",\r\n \"20.60.248.0/23\",\r\n \"\ - 20.63.128.0/18\",\r\n \"20.78.0.0/17\",\r\n \"20.78.192.0/18\"\ - ,\r\n \"20.89.0.0/17\",\r\n \"20.89.128.0/18\",\r\n \ - \ \"20.135.102.0/23\",\r\n \"20.135.104.0/22\",\r\n \ - \ \"20.150.85.0/24\",\r\n \"20.150.105.0/24\",\r\n \"20.157.38.0/24\"\ - ,\r\n \"20.157.108.0/24\",\r\n \"20.157.144.0/24\",\r\n\ - \ \"20.188.0.0/19\",\r\n \"20.190.141.128/25\",\r\n \ - \ \"20.190.166.0/24\",\r\n \"20.191.160.0/19\",\r\n \ - \ \"20.194.128.0/17\",\r\n \"20.210.0.0/18\",\r\n \"23.98.57.64/26\"\ - ,\r\n \"23.100.96.0/21\",\r\n \"23.102.64.0/19\",\r\n \ - \ \"40.79.184.0/21\",\r\n \"40.79.192.0/21\",\r\n \ - \ \"40.79.206.96/27\",\r\n \"40.79.208.0/24\",\r\n \"40.81.192.0/19\"\ - ,\r\n \"40.82.48.0/22\",\r\n \"40.87.200.0/22\",\r\n \ - \ \"40.90.16.160/27\",\r\n \"40.90.128.80/28\",\r\n \ - \ \"40.90.132.64/28\",\r\n \"40.90.142.0/27\",\r\n \"\ - 40.90.142.192/28\",\r\n \"40.90.148.224/27\",\r\n \"40.90.152.192/27\"\ - ,\r\n \"40.90.158.0/26\",\r\n \"40.115.128.0/17\",\r\n \ - \ \"40.126.13.128/25\",\r\n \"40.126.38.0/24\",\r\n \ - \ \"52.108.191.0/24\",\r\n \"52.108.228.0/23\",\r\n \ - \ \"52.109.52.0/22\",\r\n \"52.111.232.0/24\",\r\n \"52.112.176.0/21\"\ - ,\r\n \"52.112.184.0/22\",\r\n \"52.113.78.0/23\",\r\n \ - \ \"52.113.102.0/24\",\r\n \"52.113.107.0/24\",\r\n \ - \ \"52.113.133.0/24\",\r\n \"52.114.32.0/22\",\r\n \"\ - 52.115.38.0/24\",\r\n \"52.115.47.0/24\",\r\n \"52.121.120.0/23\"\ - ,\r\n \"52.121.152.0/21\",\r\n \"52.121.160.0/22\",\r\n\ - \ \"52.121.164.0/24\",\r\n \"52.136.31.0/24\",\r\n \ - \ \"52.140.192.0/18\",\r\n \"52.155.96.0/19\",\r\n \"\ - 52.156.32.0/19\",\r\n \"52.185.128.0/18\",\r\n \"52.232.155.0/24\"\ - ,\r\n \"52.239.144.0/23\",\r\n \"52.243.32.0/19\",\r\n \ - \ \"52.245.36.0/22\",\r\n \"52.246.160.0/19\",\r\n \ - \ \"52.253.96.0/19\",\r\n \"52.253.161.0/24\",\r\n \"\ - 104.41.160.0/19\",\r\n \"104.44.88.224/27\",\r\n \"104.44.91.224/27\"\ - ,\r\n \"104.44.94.112/28\",\r\n \"104.46.208.0/20\",\r\n\ - \ \"138.91.0.0/20\",\r\n \"191.237.240.0/23\",\r\n \ - \ \"2603:1040:400::/46\",\r\n \"2603:1040:404::/48\",\r\n \ - \ \"2603:1040:406::/48\",\r\n \"2603:1040:407::/48\",\r\n \ - \ \"2603:1040:408::/48\",\r\n \"2603:1046:1402::/48\",\r\n\ - \ \"2603:1046:1500:18::/64\",\r\n \"2603:1046:2000:140::/59\"\ - ,\r\n \"2603:1047:1:140::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.japanwest\",\r\n \"id\": \"AzureCloud.japanwest\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"4\",\r\n \"region\": \"japanwest\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\"\ - : \"\",\r\n \"addressPrefixes\": [\r\n \"13.73.232.0/21\"\ - ,\r\n \"20.39.176.0/21\",\r\n \"20.47.10.0/24\",\r\n \ - \ \"20.47.66.0/24\",\r\n \"20.47.99.0/24\",\r\n \"\ - 20.60.12.0/24\",\r\n \"20.60.186.0/23\",\r\n \"20.63.192.0/18\"\ - ,\r\n \"20.78.128.0/18\",\r\n \"20.89.192.0/18\",\r\n \ - \ \"20.135.48.0/23\",\r\n \"20.150.10.0/23\",\r\n \ - \ \"20.157.56.0/24\",\r\n \"20.157.103.0/24\",\r\n \"20.189.192.0/18\"\ - ,\r\n \"20.190.141.0/25\",\r\n \"20.190.165.0/24\",\r\n\ - \ \"20.202.42.0/24\",\r\n \"20.209.16.0/23\",\r\n \ - \ \"23.98.56.0/24\",\r\n \"23.100.104.0/21\",\r\n \"\ - 40.74.64.0/18\",\r\n \"40.74.128.0/20\",\r\n \"40.79.209.0/24\"\ - ,\r\n \"40.80.56.0/21\",\r\n \"40.80.176.0/21\",\r\n \ - \ \"40.81.176.0/20\",\r\n \"40.82.100.0/22\",\r\n \ - \ \"40.87.204.0/22\",\r\n \"40.90.18.32/27\",\r\n \"40.90.27.192/26\"\ - ,\r\n \"40.90.28.0/26\",\r\n \"40.90.137.0/27\",\r\n \ - \ \"40.90.142.208/28\",\r\n \"40.90.156.0/26\",\r\n \ - \ \"40.126.13.0/25\",\r\n \"40.126.37.0/24\",\r\n \"52.108.46.0/23\"\ - ,\r\n \"52.108.86.0/24\",\r\n \"52.109.132.0/22\",\r\n \ - \ \"52.111.233.0/24\",\r\n \"52.112.88.0/22\",\r\n \ - \ \"52.113.14.0/24\",\r\n \"52.113.72.0/22\",\r\n \"\ - 52.113.87.0/24\",\r\n \"52.113.106.0/24\",\r\n \"52.114.36.0/22\"\ - ,\r\n \"52.115.39.0/24\",\r\n \"52.115.100.0/22\",\r\n \ - \ \"52.115.104.0/23\",\r\n \"52.121.80.0/22\",\r\n \ - \ \"52.121.84.0/23\",\r\n \"52.121.116.0/22\",\r\n \"\ - 52.121.165.0/24\",\r\n \"52.121.168.0/22\",\r\n \"52.147.64.0/19\"\ - ,\r\n \"52.175.128.0/18\",\r\n \"52.232.158.0/24\",\r\n\ - \ \"52.239.146.0/23\",\r\n \"52.245.92.0/22\",\r\n \ - \ \"104.44.92.0/27\",\r\n \"104.44.94.128/28\",\r\n \ - \ \"104.46.224.0/20\",\r\n \"104.214.128.0/19\",\r\n \"\ - 104.215.0.0/18\",\r\n \"138.91.16.0/20\",\r\n \"191.233.32.0/20\"\ - ,\r\n \"191.237.236.0/24\",\r\n \"191.238.68.0/24\",\r\n\ - \ \"191.238.80.0/21\",\r\n \"191.238.88.0/22\",\r\n \ - \ \"191.238.92.0/23\",\r\n \"191.239.96.0/20\",\r\n \ - \ \"2603:1040:600::/46\",\r\n \"2603:1040:605::/48\",\r\n \ - \ \"2603:1040:606::/47\",\r\n \"2603:1046:1403::/48\",\r\n \ - \ \"2603:1046:1500:14::/64\",\r\n \"2603:1046:2000:a0::/59\"\ - ,\r\n \"2603:1047:1:a0::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.jioindiacentral\",\r\n \"id\"\ - : \"AzureCloud.jioindiacentral\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.60.170.0/23\",\r\n \"20.135.38.0/23\",\r\n\ - \ \"20.135.46.0/23\",\r\n \"20.150.64.0/24\",\r\n \ - \ \"20.150.109.0/24\",\r\n \"20.157.152.0/24\",\r\n \"\ - 20.190.191.0/26\",\r\n \"20.192.32.0/21\",\r\n \"20.192.48.0/21\"\ - ,\r\n \"20.192.104.0/21\",\r\n \"20.192.112.0/20\",\r\n\ - \ \"20.192.176.0/21\",\r\n \"20.192.192.0/19\",\r\n \ - \ \"20.192.224.0/20\",\r\n \"20.193.208.0/20\",\r\n \ - \ \"20.207.0.0/18\",\r\n \"40.79.205.80/28\",\r\n \"40.79.205.128/26\"\ - ,\r\n \"40.119.120.0/22\",\r\n \"40.126.63.0/26\",\r\n \ - \ \"40.126.205.0/24\",\r\n \"52.108.123.0/24\",\r\n \ - \ \"52.253.192.0/24\",\r\n \"2603:1040:1100::/47\",\r\n \ - \ \"2603:1040:1103::/48\",\r\n \"2603:1040:1104::/48\",\r\n \ - \ \"2603:1046:1500:c::/64\",\r\n \"2603:1046:2000:1a0::/59\"\ - ,\r\n \"2603:1047:1:1a0::/59\",\r\n \"2603:1061:1000::/48\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.jioindiawest\"\ - ,\r\n \"id\": \"AzureCloud.jioindiawest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.105.75.48/28\",\r\n \"13.105.75.96/27\",\r\n\ - \ \"13.105.75.128/27\",\r\n \"20.60.54.0/23\",\r\n \ - \ \"20.135.96.0/22\",\r\n \"20.135.100.0/23\",\r\n \"\ - 20.150.65.0/24\",\r\n \"20.150.97.0/24\",\r\n \"20.157.153.0/24\"\ - ,\r\n \"20.190.191.64/26\",\r\n \"20.192.56.0/21\",\r\n\ - \ \"20.192.160.0/21\",\r\n \"20.192.240.0/20\",\r\n \ - \ \"20.193.160.0/19\",\r\n \"20.193.192.0/20\",\r\n \ - \ \"40.64.0.0/18\",\r\n \"40.119.124.0/22\",\r\n \"40.126.63.64/26\"\ - ,\r\n \"40.126.206.0/24\",\r\n \"40.127.32.0/24\",\r\n \ - \ \"52.108.124.0/24\",\r\n \"52.253.193.0/24\",\r\n \ - \ \"52.253.194.0/23\",\r\n \"2603:1040:d00::/47\",\r\n \ - \ \"2603:1040:d03::/48\",\r\n \"2603:1040:d04::/48\",\r\n \ - \ \"2603:1046:1500:10::/64\",\r\n \"2603:1046:2000:1c0::/59\"\ - ,\r\n \"2603:1047:1:1c0::/59\",\r\n \"2603:1061:1001::/48\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.koreacentral\"\ - ,\r\n \"id\": \"AzureCloud.koreacentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.129.192/26\",\r\n \"13.104.223.128/26\"\ - ,\r\n \"13.105.20.0/25\",\r\n \"13.105.96.112/28\",\r\n\ - \ \"13.105.97.32/27\",\r\n \"13.105.97.64/27\",\r\n \ - \ \"20.39.184.0/21\",\r\n \"20.39.192.0/20\",\r\n \"\ - 20.41.64.0/18\",\r\n \"20.44.24.0/21\",\r\n \"20.47.46.0/24\"\ - ,\r\n \"20.47.90.0/24\",\r\n \"20.60.16.0/24\",\r\n \ - \ \"20.60.200.0/23\",\r\n \"20.135.108.0/22\",\r\n \ - \ \"20.135.112.0/23\",\r\n \"20.150.4.0/23\",\r\n \"20.157.140.0/24\"\ - ,\r\n \"20.190.144.128/25\",\r\n \"20.190.148.128/25\",\r\ - \n \"20.190.180.0/24\",\r\n \"20.194.0.0/18\",\r\n \ - \ \"20.194.64.0/20\",\r\n \"20.194.80.0/21\",\r\n \"\ - 20.194.96.0/19\",\r\n \"20.196.64.0/18\",\r\n \"20.196.128.0/17\"\ - ,\r\n \"20.200.192.0/18\",\r\n \"40.79.221.0/24\",\r\n \ - \ \"40.80.36.0/22\",\r\n \"40.82.128.0/19\",\r\n \ - \ \"40.90.17.224/27\",\r\n \"40.90.128.176/28\",\r\n \"\ - 40.90.131.128/27\",\r\n \"40.90.139.128/27\",\r\n \"40.90.156.64/27\"\ - ,\r\n \"40.126.16.128/25\",\r\n \"40.126.20.128/25\",\r\n\ - \ \"40.126.52.0/24\",\r\n \"52.108.48.0/23\",\r\n \ - \ \"52.108.87.0/24\",\r\n \"52.109.44.0/22\",\r\n \"\ - 52.111.194.0/24\",\r\n \"52.114.44.0/22\",\r\n \"52.115.106.0/23\"\ - ,\r\n \"52.115.108.0/22\",\r\n \"52.121.172.0/22\",\r\n\ - \ \"52.121.176.0/23\",\r\n \"52.141.0.0/18\",\r\n \ - \ \"52.231.0.0/17\",\r\n \"52.232.145.0/24\",\r\n \"\ - 52.239.148.0/27\",\r\n \"52.239.164.192/26\",\r\n \"52.239.190.128/26\"\ - ,\r\n \"52.245.112.0/22\",\r\n \"52.253.173.0/24\",\r\n\ - \ \"52.253.174.0/24\",\r\n \"104.44.90.160/27\",\r\n \ - \ \"2603:1040:f00::/47\",\r\n \"2603:1040:f02::/48\",\r\n \ - \ \"2603:1040:f04::/48\",\r\n \"2603:1040:f05::/48\",\r\n\ - \ \"2603:1040:f06::/48\",\r\n \"2603:1046:1404::/48\",\r\ - \n \"2603:1046:1500:20::/64\",\r\n \"2603:1046:2000:160::/59\"\ - ,\r\n \"2603:1047:1:160::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.koreasouth\",\r\n \"id\": \"\ - AzureCloud.koreasouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.157.0/25\"\ - ,\r\n \"20.39.168.0/21\",\r\n \"20.47.47.0/24\",\r\n \ - \ \"20.47.91.0/24\",\r\n \"20.60.202.0/23\",\r\n \"\ - 20.135.26.0/23\",\r\n \"20.135.30.0/23\",\r\n \"20.150.14.0/23\"\ - ,\r\n \"20.157.137.0/24\",\r\n \"20.190.148.0/25\",\r\n\ - \ \"20.190.179.0/24\",\r\n \"20.200.128.0/18\",\r\n \ - \ \"20.202.40.0/24\",\r\n \"40.79.220.0/24\",\r\n \"\ - 40.80.32.0/22\",\r\n \"40.80.168.0/21\",\r\n \"40.80.224.0/20\"\ - ,\r\n \"40.89.192.0/19\",\r\n \"40.90.131.160/27\",\r\n\ - \ \"40.90.139.160/27\",\r\n \"40.90.157.32/27\",\r\n \ - \ \"40.126.20.0/25\",\r\n \"40.126.51.0/24\",\r\n \ - \ \"52.108.190.0/24\",\r\n \"52.108.226.0/23\",\r\n \"52.109.48.0/22\"\ - ,\r\n \"52.111.234.0/24\",\r\n \"52.113.110.0/23\",\r\n\ - \ \"52.114.48.0/22\",\r\n \"52.147.96.0/19\",\r\n \ - \ \"52.231.128.0/17\",\r\n \"52.232.144.0/24\",\r\n \"\ - 52.239.165.0/26\",\r\n \"52.239.165.160/27\",\r\n \"52.239.190.192/26\"\ - ,\r\n \"52.245.100.0/22\",\r\n \"104.44.94.224/27\",\r\n\ - \ \"2603:1040:e00::/47\",\r\n \"2603:1040:e02::/48\",\r\n\ - \ \"2603:1040:e04::/48\",\r\n \"2603:1040:e05::/48\",\r\n\ - \ \"2603:1040:e06::/48\",\r\n \"2603:1046:1405::/48\",\r\ - \n \"2603:1046:1500:1c::/64\",\r\n \"2603:1046:2000:e0::/59\"\ - ,\r\n \"2603:1047:1:e0::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.northcentralus\",\r\n \"id\"\ - : \"AzureCloud.northcentralus\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \ - \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.105.26.0/24\",\r\n \"13.105.28.16/28\",\r\n\ - \ \"13.105.29.0/25\",\r\n \"13.105.37.64/26\",\r\n \ - \ \"13.105.37.128/26\",\r\n \"20.36.96.0/21\",\r\n \"\ - 20.41.128.0/18\",\r\n \"20.47.3.0/24\",\r\n \"20.47.15.0/24\"\ - ,\r\n \"20.47.107.0/24\",\r\n \"20.47.119.0/24\",\r\n \ - \ \"20.49.112.0/21\",\r\n \"20.51.0.0/21\",\r\n \"\ - 20.59.192.0/18\",\r\n \"20.60.28.0/23\",\r\n \"20.60.82.0/23\"\ - ,\r\n \"20.66.128.0/17\",\r\n \"20.72.32.0/19\",\r\n \ - \ \"20.80.0.0/18\",\r\n \"20.88.0.0/18\",\r\n \"20.95.8.0/21\"\ - ,\r\n \"20.98.0.0/18\",\r\n \"20.102.192.0/18\",\r\n \ - \ \"20.135.12.0/22\",\r\n \"20.135.70.0/23\",\r\n \ - \ \"20.150.17.0/25\",\r\n \"20.150.25.0/24\",\r\n \"20.150.49.0/24\"\ - ,\r\n \"20.150.67.0/24\",\r\n \"20.150.126.0/24\",\r\n \ - \ \"20.157.47.0/24\",\r\n \"20.157.99.0/24\",\r\n \ - \ \"20.190.135.0/24\",\r\n \"20.190.156.0/24\",\r\n \"\ - 23.96.128.0/17\",\r\n \"23.98.48.0/21\",\r\n \"23.100.72.0/21\"\ - ,\r\n \"23.100.224.0/20\",\r\n \"23.101.160.0/20\",\r\n\ - \ \"40.77.131.224/28\",\r\n \"40.77.136.96/28\",\r\n \ - \ \"40.77.137.192/27\",\r\n \"40.77.139.0/25\",\r\n \ - \ \"40.77.175.0/27\",\r\n \"40.77.176.0/24\",\r\n \"40.77.182.128/27\"\ - ,\r\n \"40.77.183.0/24\",\r\n \"40.77.188.0/22\",\r\n \ - \ \"40.77.196.0/24\",\r\n \"40.77.198.64/26\",\r\n \ - \ \"40.77.200.128/25\",\r\n \"40.77.224.0/28\",\r\n \"\ - 40.77.224.32/27\",\r\n \"40.77.231.0/24\",\r\n \"40.77.234.0/25\"\ - ,\r\n \"40.77.236.32/27\",\r\n \"40.77.236.160/28\",\r\n\ - \ \"40.77.237.0/26\",\r\n \"40.77.248.128/25\",\r\n \ - \ \"40.77.254.0/26\",\r\n \"40.77.255.192/26\",\r\n \ - \ \"40.78.208.64/28\",\r\n \"40.78.222.0/24\",\r\n \"40.80.184.0/21\"\ - ,\r\n \"40.81.32.0/20\",\r\n \"40.87.172.0/22\",\r\n \ - \ \"40.90.19.64/26\",\r\n \"40.90.132.96/27\",\r\n \ - \ \"40.90.133.128/28\",\r\n \"40.90.135.64/26\",\r\n \"\ - 40.90.140.128/27\",\r\n \"40.90.144.32/27\",\r\n \"40.90.155.192/26\"\ - ,\r\n \"40.91.24.0/22\",\r\n \"40.116.0.0/16\",\r\n \ - \ \"40.126.7.0/24\",\r\n \"40.126.28.0/24\",\r\n \"\ - 52.108.182.0/24\",\r\n \"52.108.203.0/24\",\r\n \"52.109.16.0/22\"\ - ,\r\n \"52.111.235.0/24\",\r\n \"52.112.94.0/24\",\r\n \ - \ \"52.113.198.0/24\",\r\n \"52.114.168.0/22\",\r\n \ - \ \"52.141.128.0/18\",\r\n \"52.159.64.0/18\",\r\n \"\ - 52.162.0.0/16\",\r\n \"52.232.156.0/24\",\r\n \"52.237.128.0/18\"\ - ,\r\n \"52.239.149.0/24\",\r\n \"52.239.186.0/24\",\r\n\ - \ \"52.239.253.0/24\",\r\n \"52.240.128.0/17\",\r\n \ - \ \"52.245.72.0/22\",\r\n \"52.252.128.0/17\",\r\n \ - \ \"65.52.0.0/19\",\r\n \"65.52.48.0/20\",\r\n \"65.52.104.0/24\"\ - ,\r\n \"65.52.106.0/24\",\r\n \"65.52.192.0/19\",\r\n \ - \ \"65.52.232.0/21\",\r\n \"65.52.240.0/21\",\r\n \ - \ \"65.55.60.176/29\",\r\n \"65.55.105.192/27\",\r\n \"\ - 65.55.106.208/28\",\r\n \"65.55.106.224/28\",\r\n \"65.55.109.0/24\"\ - ,\r\n \"65.55.211.0/27\",\r\n \"65.55.212.0/27\",\r\n \ - \ \"65.55.212.128/25\",\r\n \"65.55.213.0/27\",\r\n \ - \ \"65.55.218.0/24\",\r\n \"65.55.219.0/27\",\r\n \"\ - 104.44.88.128/27\",\r\n \"104.44.91.128/27\",\r\n \"104.44.94.64/28\"\ - ,\r\n \"104.47.220.0/22\",\r\n \"131.253.12.16/28\",\r\n\ - \ \"131.253.12.40/29\",\r\n \"131.253.12.48/29\",\r\n \ - \ \"131.253.12.192/28\",\r\n \"131.253.12.248/29\",\r\n \ - \ \"131.253.13.0/28\",\r\n \"131.253.13.32/28\",\r\n \ - \ \"131.253.14.32/27\",\r\n \"131.253.14.160/27\",\r\n \ - \ \"131.253.14.248/29\",\r\n \"131.253.15.32/27\",\r\n \ - \ \"131.253.15.208/28\",\r\n \"131.253.15.224/27\",\r\n \ - \ \"131.253.25.0/24\",\r\n \"131.253.27.0/24\",\r\n \"\ - 131.253.36.128/26\",\r\n \"131.253.38.32/27\",\r\n \"131.253.38.224/27\"\ - ,\r\n \"131.253.40.16/28\",\r\n \"131.253.40.32/28\",\r\n\ - \ \"131.253.40.96/27\",\r\n \"131.253.40.192/26\",\r\n \ - \ \"157.55.24.0/21\",\r\n \"157.55.55.0/27\",\r\n \ - \ \"157.55.55.32/28\",\r\n \"157.55.55.152/29\",\r\n \"\ - 157.55.55.176/29\",\r\n \"157.55.55.200/29\",\r\n \"157.55.55.216/29\"\ - ,\r\n \"157.55.60.224/27\",\r\n \"157.55.64.0/20\",\r\n\ - \ \"157.55.106.128/25\",\r\n \"157.55.110.0/23\",\r\n \ - \ \"157.55.115.0/25\",\r\n \"157.55.136.0/21\",\r\n \ - \ \"157.55.151.0/28\",\r\n \"157.55.160.0/20\",\r\n \"\ - 157.55.208.0/21\",\r\n \"157.55.248.0/21\",\r\n \"157.56.8.0/21\"\ - ,\r\n \"157.56.24.160/27\",\r\n \"157.56.24.192/28\",\r\n\ - \ \"157.56.28.0/22\",\r\n \"157.56.216.0/26\",\r\n \ - \ \"168.62.96.0/19\",\r\n \"168.62.224.0/19\",\r\n \"\ - 191.233.144.0/20\",\r\n \"191.236.128.0/18\",\r\n \"199.30.31.0/25\"\ - ,\r\n \"204.79.180.0/24\",\r\n \"207.46.193.192/28\",\r\n\ - \ \"207.46.193.224/27\",\r\n \"207.46.198.128/25\",\r\n\ - \ \"207.46.200.96/27\",\r\n \"207.46.200.176/28\",\r\n \ - \ \"207.46.202.128/28\",\r\n \"207.46.205.0/24\",\r\n \ - \ \"207.68.174.40/29\",\r\n \"207.68.174.184/29\",\r\n \ - \ \"2603:1030:600::/46\",\r\n \"2603:1030:604::/47\",\r\n \ - \ \"2603:1030:607::/48\",\r\n \"2603:1030:608::/47\",\r\n\ - \ \"2603:1036:2406::/48\",\r\n \"2603:1036:2500:8::/64\"\ - ,\r\n \"2603:1036:3000:60::/59\",\r\n \"2603:1037:1:60::/59\"\ - ,\r\n \"2a01:111:f100:1000::/62\",\r\n \"2a01:111:f100:1004::/63\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.northeurope\"\ - ,\r\n \"id\": \"AzureCloud.northeurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\ - \n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.69.128.0/17\",\r\n \"13.70.192.0/18\",\r\n\ - \ \"13.74.0.0/16\",\r\n \"13.79.0.0/16\",\r\n \"\ - 13.94.64.0/18\",\r\n \"13.104.148.0/25\",\r\n \"13.104.149.128/25\"\ - ,\r\n \"13.104.150.0/25\",\r\n \"13.104.208.160/28\",\r\n\ - \ \"13.104.210.0/24\",\r\n \"13.105.18.0/26\",\r\n \ - \ \"13.105.21.0/24\",\r\n \"13.105.28.48/28\",\r\n \"\ - 13.105.37.192/26\",\r\n \"13.105.60.192/26\",\r\n \"13.105.67.0/25\"\ - ,\r\n \"13.105.96.128/25\",\r\n \"20.38.64.0/19\",\r\n \ - \ \"20.38.102.0/23\",\r\n \"20.47.8.0/24\",\r\n \ - \ \"20.47.20.0/23\",\r\n \"20.47.32.0/24\",\r\n \"20.47.111.0/24\"\ - ,\r\n \"20.47.117.0/24\",\r\n \"20.50.64.0/20\",\r\n \ - \ \"20.50.80.0/21\",\r\n \"20.54.0.0/17\",\r\n \"\ - 20.60.19.0/24\",\r\n \"20.60.40.0/23\",\r\n \"20.60.144.0/23\"\ - ,\r\n \"20.60.204.0/23\",\r\n \"20.60.246.0/23\",\r\n \ - \ \"20.67.128.0/17\",\r\n \"20.82.128.0/17\",\r\n \ - \ \"20.93.0.0/17\",\r\n \"20.105.0.0/17\",\r\n \"20.135.20.0/23\"\ - ,\r\n \"20.135.134.0/23\",\r\n \"20.135.136.0/22\",\r\n\ - \ \"20.143.3.0/24\",\r\n \"20.150.26.0/24\",\r\n \ - \ \"20.150.47.128/25\",\r\n \"20.150.48.0/24\",\r\n \"\ - 20.150.75.0/24\",\r\n \"20.150.84.0/24\",\r\n \"20.150.104.0/24\"\ - ,\r\n \"20.157.60.0/24\",\r\n \"20.157.100.0/24\",\r\n \ - \ \"20.157.159.0/24\",\r\n \"20.190.129.0/24\",\r\n \ - \ \"20.190.159.0/24\",\r\n \"20.191.0.0/18\",\r\n \"\ - 20.202.1.0/24\",\r\n \"20.209.14.0/23\",\r\n \"23.100.48.0/20\"\ - ,\r\n \"23.100.128.0/18\",\r\n \"23.101.48.0/20\",\r\n \ - \ \"23.102.0.0/18\",\r\n \"40.67.224.0/19\",\r\n \ - \ \"40.69.0.0/18\",\r\n \"40.69.64.0/19\",\r\n \"40.69.192.0/19\"\ - ,\r\n \"40.77.133.0/24\",\r\n \"40.77.136.32/28\",\r\n \ - \ \"40.77.136.80/28\",\r\n \"40.77.165.0/24\",\r\n \ - \ \"40.77.174.0/24\",\r\n \"40.77.175.160/27\",\r\n \"\ - 40.77.182.96/27\",\r\n \"40.77.226.128/25\",\r\n \"40.77.229.0/24\"\ - ,\r\n \"40.77.234.160/27\",\r\n \"40.77.236.0/27\",\r\n\ - \ \"40.77.236.176/28\",\r\n \"40.77.255.0/25\",\r\n \ - \ \"40.78.211.0/24\",\r\n \"40.79.204.0/27\",\r\n \"\ - 40.79.204.32/28\",\r\n \"40.79.204.64/27\",\r\n \"40.85.0.0/17\"\ - ,\r\n \"40.85.128.0/20\",\r\n \"40.87.128.0/19\",\r\n \ - \ \"40.87.188.0/22\",\r\n \"40.90.17.192/27\",\r\n \ - \ \"40.90.25.64/26\",\r\n \"40.90.25.128/26\",\r\n \"\ - 40.90.31.128/25\",\r\n \"40.90.128.16/28\",\r\n \"40.90.129.192/27\"\ - ,\r\n \"40.90.130.224/28\",\r\n \"40.90.133.64/27\",\r\n\ - \ \"40.90.136.176/28\",\r\n \"40.90.137.192/27\",\r\n \ - \ \"40.90.140.64/27\",\r\n \"40.90.141.96/27\",\r\n \ - \ \"40.90.141.128/27\",\r\n \"40.90.145.0/27\",\r\n \"\ - 40.90.145.224/27\",\r\n \"40.90.147.96/27\",\r\n \"40.90.148.160/28\"\ - ,\r\n \"40.90.149.128/25\",\r\n \"40.90.153.128/25\",\r\n\ - \ \"40.91.20.0/22\",\r\n \"40.91.32.0/22\",\r\n \ - \ \"40.93.64.0/24\",\r\n \"40.112.36.0/25\",\r\n \"40.112.37.64/26\"\ - ,\r\n \"40.112.64.0/19\",\r\n \"40.113.0.0/18\",\r\n \ - \ \"40.113.64.0/19\",\r\n \"40.115.96.0/19\",\r\n \ - \ \"40.126.1.0/24\",\r\n \"40.126.31.0/24\",\r\n \"40.127.96.0/20\"\ - ,\r\n \"40.127.128.0/17\",\r\n \"51.104.64.0/18\",\r\n \ - \ \"51.104.128.0/18\",\r\n \"52.101.65.0/24\",\r\n \ - \ \"52.101.66.0/23\",\r\n \"52.101.68.0/24\",\r\n \"\ - 52.102.160.0/24\",\r\n \"52.103.32.0/24\",\r\n \"52.103.160.0/24\"\ - ,\r\n \"52.108.174.0/23\",\r\n \"52.108.176.0/24\",\r\n\ - \ \"52.108.196.0/24\",\r\n \"52.108.240.0/21\",\r\n \ - \ \"52.109.76.0/22\",\r\n \"52.111.236.0/24\",\r\n \ - \ \"52.112.191.0/24\",\r\n \"52.112.229.0/24\",\r\n \"52.112.232.0/24\"\ - ,\r\n \"52.112.236.0/24\",\r\n \"52.113.40.0/21\",\r\n \ - \ \"52.113.48.0/20\",\r\n \"52.113.112.0/20\",\r\n \ - \ \"52.113.136.0/21\",\r\n \"52.113.205.0/24\",\r\n \"\ - 52.114.76.0/22\",\r\n \"52.114.96.0/21\",\r\n \"52.114.120.0/22\"\ - ,\r\n \"52.114.231.0/24\",\r\n \"52.114.233.0/24\",\r\n\ - \ \"52.114.248.0/22\",\r\n \"52.115.16.0/21\",\r\n \ - \ \"52.115.24.0/22\",\r\n \"52.120.136.0/21\",\r\n \"\ - 52.120.192.0/20\",\r\n \"52.121.16.0/21\",\r\n \"52.121.48.0/20\"\ - ,\r\n \"52.125.138.0/23\",\r\n \"52.138.128.0/17\",\r\n\ - \ \"52.142.64.0/18\",\r\n \"52.143.195.0/24\",\r\n \ - \ \"52.143.209.0/24\",\r\n \"52.146.128.0/17\",\r\n \ - \ \"52.155.64.0/19\",\r\n \"52.155.128.0/17\",\r\n \"52.156.192.0/18\"\ - ,\r\n \"52.158.0.0/17\",\r\n \"52.164.0.0/16\",\r\n \ - \ \"52.169.0.0/16\",\r\n \"52.178.128.0/17\",\r\n \"\ - 52.232.148.0/24\",\r\n \"52.236.0.0/17\",\r\n \"52.239.136.0/22\"\ - ,\r\n \"52.239.205.0/24\",\r\n \"52.239.248.0/24\",\r\n\ - \ \"52.245.40.0/22\",\r\n \"52.245.88.0/22\",\r\n \ - \ \"65.52.64.0/20\",\r\n \"65.52.224.0/21\",\r\n \"94.245.88.0/21\"\ - ,\r\n \"94.245.104.0/21\",\r\n \"94.245.117.96/27\",\r\n\ - \ \"94.245.118.0/27\",\r\n \"94.245.120.128/28\",\r\n \ - \ \"94.245.122.0/24\",\r\n \"94.245.123.144/28\",\r\n \ - \ \"94.245.123.176/28\",\r\n \"104.41.64.0/18\",\r\n \ - \ \"104.41.192.0/18\",\r\n \"104.44.88.64/27\",\r\n \"\ - 104.44.91.64/27\",\r\n \"104.44.92.192/27\",\r\n \"104.44.94.32/28\"\ - ,\r\n \"104.45.80.0/20\",\r\n \"104.45.96.0/19\",\r\n \ - \ \"104.46.8.0/21\",\r\n \"104.46.64.0/19\",\r\n \ - \ \"104.47.218.0/23\",\r\n \"131.253.40.80/28\",\r\n \"\ - 134.170.80.64/28\",\r\n \"137.116.224.0/19\",\r\n \"137.135.128.0/17\"\ - ,\r\n \"138.91.48.0/20\",\r\n \"157.55.3.0/24\",\r\n \ - \ \"157.55.10.160/29\",\r\n \"157.55.10.176/28\",\r\n \ - \ \"157.55.13.128/26\",\r\n \"157.55.107.0/24\",\r\n \ - \ \"157.55.204.128/25\",\r\n \"168.61.80.0/20\",\r\n \"\ - 168.61.96.0/19\",\r\n \"168.63.32.0/19\",\r\n \"168.63.64.0/20\"\ - ,\r\n \"168.63.80.0/21\",\r\n \"168.63.92.0/22\",\r\n \ - \ \"191.232.138.0/23\",\r\n \"191.235.128.0/18\",\r\n \ - \ \"191.235.192.0/22\",\r\n \"191.235.208.0/20\",\r\n \ - \ \"191.235.255.0/24\",\r\n \"191.237.192.0/23\",\r\n \ - \ \"191.237.194.0/24\",\r\n \"191.237.196.0/24\",\r\n \"\ - 191.237.208.0/20\",\r\n \"191.238.96.0/19\",\r\n \"191.239.208.0/20\"\ - ,\r\n \"193.149.88.0/21\",\r\n \"2603:1020::/47\",\r\n \ - \ \"2603:1020:2::/48\",\r\n \"2603:1020:4::/48\",\r\n \ - \ \"2603:1020:5::/48\",\r\n \"2603:1020:6::/48\",\r\n \ - \ \"2603:1026:2404::/48\",\r\n \"2603:1026:3000:c0::/59\",\r\n\ - \ \"2603:1027:1:c0::/59\",\r\n \"2a01:111:f100:a000::/63\"\ - ,\r\n \"2a01:111:f100:a002::/64\",\r\n \"2a01:111:f100:a004::/64\"\ - ,\r\n \"2a01:111:f403:c200::/64\",\r\n \"2a01:111:f403:ca00::/62\"\ - ,\r\n \"2a01:111:f403:ca04::/64\",\r\n \"2a01:111:f403:d200::/64\"\ - ,\r\n \"2a01:111:f403:da00::/64\",\r\n \"2a01:111:f403:e200::/64\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.norwaye\"\ - ,\r\n \"id\": \"AzureCloud.norwaye\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.155.32/27\",\r\n \"13.104.158.0/28\",\r\ - \n \"13.104.158.32/27\",\r\n \"13.104.218.0/25\",\r\n \ - \ \"13.105.97.96/27\",\r\n \"13.105.97.128/25\",\r\n \ - \ \"20.38.120.0/24\",\r\n \"20.47.48.0/24\",\r\n \"\ - 20.60.206.0/23\",\r\n \"20.100.0.0/18\",\r\n \"20.135.158.0/23\"\ - ,\r\n \"20.135.160.0/22\",\r\n \"20.150.53.0/24\",\r\n \ - \ \"20.150.121.0/24\",\r\n \"20.157.2.0/24\",\r\n \ - \ \"20.190.185.0/24\",\r\n \"40.82.84.0/22\",\r\n \"40.119.104.0/22\"\ - ,\r\n \"40.126.57.0/24\",\r\n \"40.126.200.0/24\",\r\n \ - \ \"51.13.0.0/21\",\r\n \"51.13.16.0/20\",\r\n \"\ - 51.13.32.0/19\",\r\n \"51.13.64.0/18\",\r\n \"51.13.160.0/19\"\ - ,\r\n \"51.107.208.0/20\",\r\n \"51.120.0.0/17\",\r\n \ - \ \"51.120.208.0/21\",\r\n \"51.120.232.0/21\",\r\n \ - \ \"51.120.240.0/20\",\r\n \"52.108.77.0/24\",\r\n \"\ - 52.108.98.0/24\",\r\n \"52.109.86.0/23\",\r\n \"52.111.197.0/24\"\ - ,\r\n \"52.114.234.0/24\",\r\n \"52.253.168.0/24\",\r\n\ - \ \"52.253.177.0/24\",\r\n \"52.253.178.0/24\",\r\n \ - \ \"2603:1020:e00::/47\",\r\n \"2603:1020:e03::/48\",\r\n \ - \ \"2603:1020:e04::/47\",\r\n \"2603:1026:240e::/48\",\r\n\ - \ \"2603:1026:2500:28::/64\",\r\n \"2603:1026:3000:180::/59\"\ - ,\r\n \"2603:1027:1:180::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.norwayw\",\r\n \"id\": \"AzureCloud.norwayw\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"norwayw\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\"\ - : \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.153.48/28\"\ - ,\r\n \"13.104.153.96/27\",\r\n \"13.104.155.0/27\",\r\n\ - \ \"13.104.217.128/25\",\r\n \"20.47.49.0/24\",\r\n \ - \ \"20.60.15.0/24\",\r\n \"20.135.58.0/23\",\r\n \"\ - 20.150.0.0/24\",\r\n \"20.150.56.0/24\",\r\n \"20.157.3.0/24\"\ - ,\r\n \"20.190.186.0/24\",\r\n \"40.119.108.0/22\",\r\n\ - \ \"40.126.58.0/24\",\r\n \"40.126.201.0/24\",\r\n \ - \ \"51.13.128.0/19\",\r\n \"51.120.128.0/18\",\r\n \"\ - 51.120.192.0/20\",\r\n \"51.120.216.0/21\",\r\n \"51.120.224.0/21\"\ - ,\r\n \"52.108.177.0/24\",\r\n \"52.108.198.0/24\",\r\n\ - \ \"52.109.144.0/23\",\r\n \"52.111.198.0/24\",\r\n \ - \ \"52.114.238.0/24\",\r\n \"52.253.167.0/24\",\r\n \ - \ \"2603:1020:f00::/47\",\r\n \"2603:1020:f03::/48\",\r\n \ - \ \"2603:1020:f04::/47\",\r\n \"2603:1026:2409::/48\",\r\n \ - \ \"2603:1026:2500:10::/64\",\r\n \"2603:1026:3000:80::/59\"\ - ,\r\n \"2603:1027:1:80::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.southafricanorth\",\r\n \"id\"\ - : \"AzureCloud.southafricanorth\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \ - \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.158.128/27\",\r\n \"13.104.158.160/28\"\ - ,\r\n \"13.104.158.192/27\",\r\n \"13.105.27.224/27\",\r\ - \n \"20.38.114.128/25\",\r\n \"20.45.128.0/21\",\r\n \ - \ \"20.47.50.0/24\",\r\n \"20.47.92.0/24\",\r\n \"\ - 20.60.190.0/23\",\r\n \"20.87.0.0/17\",\r\n \"20.135.78.0/23\"\ - ,\r\n \"20.135.80.0/22\",\r\n \"20.150.21.0/24\",\r\n \ - \ \"20.150.62.0/24\",\r\n \"20.150.101.0/24\",\r\n \ - \ \"20.190.190.0/26\",\r\n \"40.79.203.0/24\",\r\n \"\ - 40.82.20.0/22\",\r\n \"40.82.120.0/22\",\r\n \"40.90.19.0/27\"\ - ,\r\n \"40.90.128.144/28\",\r\n \"40.90.130.144/28\",\r\n\ - \ \"40.90.133.160/27\",\r\n \"40.90.143.128/27\",\r\n \ - \ \"40.90.151.64/27\",\r\n \"40.90.157.224/27\",\r\n \ - \ \"40.119.64.0/22\",\r\n \"40.120.16.0/20\",\r\n \"\ - 40.123.240.0/20\",\r\n \"40.126.62.0/26\",\r\n \"40.127.0.0/19\"\ - ,\r\n \"52.108.54.0/23\",\r\n \"52.108.90.0/24\",\r\n \ - \ \"52.109.150.0/23\",\r\n \"52.111.237.0/24\",\r\n \ - \ \"52.114.112.0/23\",\r\n \"52.114.224.0/24\",\r\n \"\ - 52.121.86.0/23\",\r\n \"52.143.204.0/23\",\r\n \"52.143.206.0/24\"\ - ,\r\n \"52.239.232.0/25\",\r\n \"102.37.0.0/20\",\r\n \ - \ \"102.37.16.0/21\",\r\n \"102.37.24.0/23\",\r\n \ - \ \"102.37.26.32/27\",\r\n \"102.37.32.0/19\",\r\n \"102.37.72.0/21\"\ - ,\r\n \"102.37.96.0/19\",\r\n \"102.37.128.0/19\",\r\n \ - \ \"102.37.160.0/21\",\r\n \"102.37.192.0/18\",\r\n \ - \ \"102.133.120.0/21\",\r\n \"102.133.128.0/18\",\r\n \ - \ \"102.133.192.0/19\",\r\n \"102.133.224.0/20\",\r\n \ - \ \"102.133.240.0/25\",\r\n \"102.133.240.128/26\",\r\n \ - \ \"102.133.248.0/21\",\r\n \"2603:1000:100::/47\",\r\n \ - \ \"2603:1000:103::/48\",\r\n \"2603:1000:104::/47\",\r\n \ - \ \"2603:1006:1400::/63\",\r\n \"2603:1006:1500:4::/64\",\r\n \ - \ \"2603:1006:2000::/59\",\r\n \"2603:1007:200::/59\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.southafricawest\"\ - ,\r\n \"id\": \"AzureCloud.southafricawest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.144.160/27\",\r\n \"20.38.121.0/25\",\r\ - \n \"20.45.136.0/21\",\r\n \"20.47.51.0/24\",\r\n \ - \ \"20.47.93.0/24\",\r\n \"20.60.8.0/24\",\r\n \"20.60.210.0/23\"\ - ,\r\n \"20.135.32.0/23\",\r\n \"20.150.20.0/25\",\r\n \ - \ \"20.190.189.192/26\",\r\n \"40.78.209.0/24\",\r\n \ - \ \"40.82.64.0/22\",\r\n \"40.90.17.0/27\",\r\n \"40.90.128.96/28\"\ - ,\r\n \"40.90.152.224/27\",\r\n \"40.117.0.0/19\",\r\n \ - \ \"40.119.68.0/22\",\r\n \"40.126.61.192/26\",\r\n \ - \ \"52.108.187.0/24\",\r\n \"52.108.220.0/23\",\r\n \ - \ \"52.109.152.0/23\",\r\n \"52.111.238.0/24\",\r\n \"52.114.228.0/24\"\ - ,\r\n \"52.143.203.0/24\",\r\n \"52.239.232.128/25\",\r\n\ - \ \"102.37.26.0/27\",\r\n \"102.37.64.0/21\",\r\n \ - \ \"102.37.80.0/21\",\r\n \"102.133.0.0/18\",\r\n \"\ - 102.133.64.0/19\",\r\n \"102.133.96.0/20\",\r\n \"102.133.112.0/28\"\ - ,\r\n \"2603:1000::/47\",\r\n \"2603:1000:3::/48\",\r\n\ - \ \"2603:1000:4::/47\",\r\n \"2603:1006:1401::/63\",\r\n\ - \ \"2603:1006:1500::/64\",\r\n \"2603:1006:2000:20::/59\"\ - ,\r\n \"2603:1007:200:20::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.southcentralus\",\r\n \"id\"\ - : \"AzureCloud.southcentralus\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \ - \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.65.0.0/16\",\r\n \"13.66.0.0/17\",\r\n \ - \ \"13.73.240.0/20\",\r\n \"13.84.0.0/15\",\r\n \"\ - 13.104.144.64/27\",\r\n \"13.104.208.128/27\",\r\n \"13.104.217.0/25\"\ - ,\r\n \"13.104.220.128/25\",\r\n \"13.105.23.0/26\",\r\n\ - \ \"13.105.25.0/24\",\r\n \"13.105.53.0/25\",\r\n \ - \ \"13.105.60.0/27\",\r\n \"13.105.60.32/28\",\r\n \"\ - 13.105.60.64/27\",\r\n \"13.105.66.192/26\",\r\n \"20.38.104.0/23\"\ - ,\r\n \"20.45.0.0/18\",\r\n \"20.45.120.0/21\",\r\n \ - \ \"20.47.0.0/24\",\r\n \"20.47.24.0/23\",\r\n \"20.47.29.0/24\"\ - ,\r\n \"20.47.69.0/24\",\r\n \"20.47.100.0/24\",\r\n \ - \ \"20.49.88.0/21\",\r\n \"20.60.48.0/22\",\r\n \"\ - 20.60.64.0/22\",\r\n \"20.60.140.0/23\",\r\n \"20.60.148.0/23\"\ - ,\r\n \"20.60.160.0/23\",\r\n \"20.64.0.0/17\",\r\n \ - \ \"20.65.128.0/17\",\r\n \"20.88.192.0/18\",\r\n \"\ - 20.94.128.0/18\",\r\n \"20.97.0.0/17\",\r\n \"20.135.8.0/22\"\ - ,\r\n \"20.135.216.0/22\",\r\n \"20.135.220.0/23\",\r\n\ - \ \"20.136.0.128/25\",\r\n \"20.136.2.0/24\",\r\n \ - \ \"20.150.20.128/25\",\r\n \"20.150.38.0/23\",\r\n \"\ - 20.150.70.0/24\",\r\n \"20.150.79.0/24\",\r\n \"20.150.93.0/24\"\ - ,\r\n \"20.150.94.0/24\",\r\n \"20.157.43.0/24\",\r\n \ - \ \"20.157.54.0/24\",\r\n \"20.157.134.0/24\",\r\n \ - \ \"20.188.64.0/19\",\r\n \"20.189.0.0/18\",\r\n \"20.190.128.0/24\"\ - ,\r\n \"20.190.157.0/24\",\r\n \"20.202.24.0/24\",\r\n \ - \ \"23.98.128.0/17\",\r\n \"23.100.120.0/21\",\r\n \ - \ \"23.101.176.0/20\",\r\n \"23.102.128.0/18\",\r\n \"\ - 40.74.160.0/19\",\r\n \"40.74.192.0/18\",\r\n \"40.77.130.192/26\"\ - ,\r\n \"40.77.131.0/25\",\r\n \"40.77.131.128/26\",\r\n\ - \ \"40.77.172.0/24\",\r\n \"40.77.199.0/25\",\r\n \ - \ \"40.77.225.0/24\",\r\n \"40.78.214.0/24\",\r\n \"\ - 40.79.206.160/27\",\r\n \"40.79.206.192/27\",\r\n \"40.79.207.80/28\"\ - ,\r\n \"40.79.207.128/25\",\r\n \"40.80.192.0/19\",\r\n\ - \ \"40.84.128.0/17\",\r\n \"40.86.128.0/19\",\r\n \ - \ \"40.87.176.0/25\",\r\n \"40.87.176.128/27\",\r\n \"\ - 40.87.176.160/29\",\r\n \"40.87.176.174/31\",\r\n \"40.87.176.184/30\"\ - ,\r\n \"40.87.176.192/28\",\r\n \"40.87.176.216/29\",\r\n\ - \ \"40.87.176.224/29\",\r\n \"40.87.176.232/31\",\r\n \ - \ \"40.87.176.240/28\",\r\n \"40.87.177.16/28\",\r\n \ - \ \"40.87.177.32/27\",\r\n \"40.87.177.64/27\",\r\n \ - \ \"40.87.177.96/28\",\r\n \"40.87.177.112/29\",\r\n \"\ - 40.87.177.120/31\",\r\n \"40.87.177.124/30\",\r\n \"40.87.177.128/28\"\ - ,\r\n \"40.87.177.144/29\",\r\n \"40.87.177.152/31\",\r\n\ - \ \"40.87.177.156/30\",\r\n \"40.87.177.160/27\",\r\n \ - \ \"40.87.177.192/29\",\r\n \"40.87.177.200/30\",\r\n \ - \ \"40.87.177.212/30\",\r\n \"40.87.177.216/29\",\r\n \ - \ \"40.87.177.224/27\",\r\n \"40.87.178.0/25\",\r\n \"\ - 40.87.178.128/26\",\r\n \"40.87.178.192/28\",\r\n \"40.87.178.208/30\"\ - ,\r\n \"40.90.16.128/27\",\r\n \"40.90.18.64/26\",\r\n \ - \ \"40.90.27.64/26\",\r\n \"40.90.27.128/26\",\r\n \ - \ \"40.90.28.64/26\",\r\n \"40.90.28.128/26\",\r\n \"\ - 40.90.30.160/27\",\r\n \"40.90.128.224/28\",\r\n \"40.90.133.96/28\"\ - ,\r\n \"40.90.135.128/25\",\r\n \"40.90.136.160/28\",\r\n\ - \ \"40.90.145.160/27\",\r\n \"40.90.148.0/26\",\r\n \ - \ \"40.90.152.160/27\",\r\n \"40.90.155.0/26\",\r\n \ - \ \"40.91.16.0/22\",\r\n \"40.93.5.0/24\",\r\n \"40.93.14.0/24\"\ - ,\r\n \"40.93.193.0/24\",\r\n \"40.93.194.0/23\",\r\n \ - \ \"40.93.196.0/23\",\r\n \"40.119.0.0/18\",\r\n \ - \ \"40.124.0.0/16\",\r\n \"40.126.0.0/24\",\r\n \"40.126.29.0/24\"\ - ,\r\n \"52.101.11.0/24\",\r\n \"52.101.12.0/22\",\r\n \ - \ \"52.102.132.0/24\",\r\n \"52.102.140.0/24\",\r\n \ - \ \"52.103.6.0/24\",\r\n \"52.103.14.0/24\",\r\n \"52.103.132.0/24\"\ - ,\r\n \"52.103.140.0/24\",\r\n \"52.108.102.0/23\",\r\n\ - \ \"52.108.104.0/24\",\r\n \"52.108.197.0/24\",\r\n \ - \ \"52.108.248.0/21\",\r\n \"52.109.20.0/22\",\r\n \ - \ \"52.111.239.0/24\",\r\n \"52.112.24.0/21\",\r\n \"52.112.117.0/24\"\ - ,\r\n \"52.113.160.0/19\",\r\n \"52.113.206.0/24\",\r\n\ - \ \"52.114.144.0/22\",\r\n \"52.115.68.0/22\",\r\n \ - \ \"52.115.72.0/22\",\r\n \"52.115.84.0/22\",\r\n \"\ - 52.120.0.0/19\",\r\n \"52.120.152.0/22\",\r\n \"52.121.0.0/21\"\ - ,\r\n \"52.123.3.0/24\",\r\n \"52.125.137.0/24\",\r\n \ - \ \"52.141.64.0/18\",\r\n \"52.152.0.0/17\",\r\n \ - \ \"52.153.64.0/18\",\r\n \"52.153.192.0/18\",\r\n \"52.171.0.0/16\"\ - ,\r\n \"52.183.192.0/18\",\r\n \"52.185.192.0/18\",\r\n\ - \ \"52.189.128.0/18\",\r\n \"52.232.159.0/24\",\r\n \ - \ \"52.239.158.0/23\",\r\n \"52.239.178.0/23\",\r\n \ - \ \"52.239.180.0/22\",\r\n \"52.239.199.0/24\",\r\n \"\ - 52.239.200.0/23\",\r\n \"52.239.203.0/24\",\r\n \"52.239.208.0/23\"\ - ,\r\n \"52.245.24.0/22\",\r\n \"52.248.0.0/17\",\r\n \ - \ \"52.249.0.0/18\",\r\n \"52.253.0.0/18\",\r\n \"\ - 52.253.179.0/24\",\r\n \"52.253.180.0/24\",\r\n \"52.255.64.0/18\"\ - ,\r\n \"53.103.140.0/24\",\r\n \"65.52.32.0/21\",\r\n \ - \ \"65.54.55.160/27\",\r\n \"65.54.55.224/27\",\r\n \ - \ \"70.37.48.0/20\",\r\n \"70.37.64.0/18\",\r\n \"70.37.160.0/21\"\ - ,\r\n \"104.44.89.0/27\",\r\n \"104.44.89.64/27\",\r\n \ - \ \"104.44.92.64/27\",\r\n \"104.44.94.160/27\",\r\n \ - \ \"104.44.128.0/18\",\r\n \"104.47.208.0/23\",\r\n \ - \ \"104.210.128.0/19\",\r\n \"104.210.176.0/20\",\r\n \"\ - 104.210.192.0/19\",\r\n \"104.214.0.0/17\",\r\n \"104.215.64.0/18\"\ - ,\r\n \"131.253.40.64/28\",\r\n \"157.55.51.224/28\",\r\n\ - \ \"157.55.80.0/21\",\r\n \"157.55.103.32/27\",\r\n \ - \ \"157.55.153.224/28\",\r\n \"157.55.176.0/20\",\r\n \ - \ \"157.55.192.0/21\",\r\n \"157.55.200.0/22\",\r\n \"\ - 157.55.204.1/32\",\r\n \"157.55.204.2/31\",\r\n \"157.55.204.33/32\"\ - ,\r\n \"157.55.204.34/31\",\r\n \"168.62.128.0/19\",\r\n\ - \ \"191.238.144.0/20\",\r\n \"191.238.160.0/19\",\r\n \ - \ \"191.238.224.0/19\",\r\n \"2603:1030:800::/48\",\r\n \ - \ \"2603:1030:802::/47\",\r\n \"2603:1030:804::/58\",\r\n\ - \ \"2603:1030:804:40::/60\",\r\n \"2603:1030:804:53::/64\"\ - ,\r\n \"2603:1030:804:54::/64\",\r\n \"2603:1030:804:5b::/64\"\ - ,\r\n \"2603:1030:804:5c::/62\",\r\n \"2603:1030:804:60::/62\"\ - ,\r\n \"2603:1030:804:67::/64\",\r\n \"2603:1030:804:68::/61\"\ - ,\r\n \"2603:1030:804:70::/60\",\r\n \"2603:1030:804:80::/59\"\ - ,\r\n \"2603:1030:804:a0::/62\",\r\n \"2603:1030:804:a4::/64\"\ - ,\r\n \"2603:1030:804:a6::/63\",\r\n \"2603:1030:804:a8::/61\"\ - ,\r\n \"2603:1030:804:b0::/62\",\r\n \"2603:1030:804:b4::/64\"\ - ,\r\n \"2603:1030:804:b6::/63\",\r\n \"2603:1030:804:b8::/61\"\ - ,\r\n \"2603:1030:804:c0::/61\",\r\n \"2603:1030:804:c8::/62\"\ - ,\r\n \"2603:1030:804:cc::/63\",\r\n \"2603:1030:804:d2::/63\"\ - ,\r\n \"2603:1030:804:d4::/62\",\r\n \"2603:1030:804:d8::/61\"\ - ,\r\n \"2603:1030:804:e0::/59\",\r\n \"2603:1030:804:100::/58\"\ - ,\r\n \"2603:1030:804:140::/60\",\r\n \"2603:1030:804:150::/63\"\ - ,\r\n \"2603:1030:805::/48\",\r\n \"2603:1030:806::/48\"\ - ,\r\n \"2603:1030:807::/48\",\r\n \"2603:1030:809::/48\"\ - ,\r\n \"2603:1030:80a::/56\",\r\n \"2603:1030:80b::/48\"\ - ,\r\n \"2603:1036:2407::/48\",\r\n \"2603:1036:2500:24::/64\"\ - ,\r\n \"2603:1036:3000:140::/59\",\r\n \"2603:1037:1:140::/59\"\ - ,\r\n \"2603:1062:2:80::/57\",\r\n \"2a01:111:f100:4002::/64\"\ - ,\r\n \"2a01:111:f100:5000::/52\",\r\n \"2a01:111:f403:c10c::/62\"\ - ,\r\n \"2a01:111:f403:c90c::/62\",\r\n \"2a01:111:f403:c92d::/64\"\ - ,\r\n \"2a01:111:f403:c92e::/63\",\r\n \"2a01:111:f403:c930::/63\"\ - ,\r\n \"2a01:111:f403:d10c::/62\",\r\n \"2a01:111:f403:d90c::/62\"\ - ,\r\n \"2a01:111:f403:e00c::/62\",\r\n \"2a01:111:f403:f90c::/62\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.southeastasia\"\ - ,\r\n \"id\": \"AzureCloud.southeastasia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.67.0.0/17\",\r\n \"13.76.0.0/16\",\r\n \ - \ \"13.104.149.0/26\",\r\n \"13.104.153.0/27\",\r\n \ - \ \"13.104.153.32/28\",\r\n \"13.104.153.64/27\",\r\n \"\ - 13.104.153.192/26\",\r\n \"13.104.154.0/25\",\r\n \"13.104.213.128/25\"\ - ,\r\n \"20.43.128.0/18\",\r\n \"20.44.192.0/18\",\r\n \ - \ \"20.47.9.0/24\",\r\n \"20.47.33.0/24\",\r\n \"\ - 20.47.64.0/24\",\r\n \"20.47.98.0/24\",\r\n \"20.60.136.0/24\"\ - ,\r\n \"20.60.138.0/23\",\r\n \"20.135.84.0/22\",\r\n \ - \ \"20.135.88.0/23\",\r\n \"20.150.17.128/25\",\r\n \ - \ \"20.150.28.0/24\",\r\n \"20.150.86.0/24\",\r\n \"\ - 20.150.127.0/24\",\r\n \"20.157.98.0/24\",\r\n \"20.157.128.0/24\"\ - ,\r\n \"20.184.0.0/18\",\r\n \"20.188.96.0/19\",\r\n \ - \ \"20.190.64.0/19\",\r\n \"20.190.140.0/25\",\r\n \ - \ \"20.190.163.0/24\",\r\n \"20.191.128.0/19\",\r\n \"\ - 20.195.0.0/18\",\r\n \"20.195.64.0/21\",\r\n \"20.195.80.0/21\"\ - ,\r\n \"20.195.96.0/19\",\r\n \"20.197.64.0/18\",\r\n \ - \ \"20.198.128.0/17\",\r\n \"20.202.43.0/24\",\r\n \ - \ \"20.205.160.0/19\",\r\n \"20.205.192.0/18\",\r\n \"\ - 23.97.48.0/20\",\r\n \"23.98.64.0/18\",\r\n \"23.100.112.0/21\"\ - ,\r\n \"23.101.16.0/20\",\r\n \"40.65.128.0/18\",\r\n \ - \ \"40.78.223.0/24\",\r\n \"40.78.232.0/21\",\r\n \ - \ \"40.79.206.32/27\",\r\n \"40.82.28.0/22\",\r\n \"40.87.196.0/22\"\ - ,\r\n \"40.90.133.192/26\",\r\n \"40.90.134.0/26\",\r\n\ - \ \"40.90.137.64/27\",\r\n \"40.90.138.96/27\",\r\n \ - \ \"40.90.146.160/27\",\r\n \"40.90.146.224/27\",\r\n \ - \ \"40.90.154.128/26\",\r\n \"40.90.160.0/19\",\r\n \"\ - 40.93.129.0/24\",\r\n \"40.119.192.0/18\",\r\n \"40.126.12.0/25\"\ - ,\r\n \"40.126.35.0/24\",\r\n \"52.101.133.0/24\",\r\n \ - \ \"52.101.134.0/23\",\r\n \"52.101.136.0/23\",\r\n \ - \ \"52.102.193.0/24\",\r\n \"52.103.65.0/24\",\r\n \"\ - 52.103.193.0/24\",\r\n \"52.108.68.0/23\",\r\n \"52.108.91.0/24\"\ - ,\r\n \"52.108.184.0/24\",\r\n \"52.108.195.0/24\",\r\n\ - \ \"52.108.206.0/23\",\r\n \"52.108.236.0/22\",\r\n \ - \ \"52.109.124.0/22\",\r\n \"52.111.240.0/24\",\r\n \ - \ \"52.112.40.0/21\",\r\n \"52.112.48.0/20\",\r\n \"52.113.101.0/24\"\ - ,\r\n \"52.113.105.0/24\",\r\n \"52.113.109.0/24\",\r\n\ - \ \"52.113.131.0/24\",\r\n \"52.114.8.0/21\",\r\n \ - \ \"52.114.54.0/23\",\r\n \"52.114.56.0/23\",\r\n \"\ - 52.114.80.0/22\",\r\n \"52.114.216.0/22\",\r\n \"52.115.32.0/22\"\ - ,\r\n \"52.115.36.0/23\",\r\n \"52.115.97.0/24\",\r\n \ - \ \"52.120.144.0/21\",\r\n \"52.120.156.0/24\",\r\n \ - \ \"52.121.128.0/20\",\r\n \"52.121.144.0/21\",\r\n \"\ - 52.136.26.0/24\",\r\n \"52.139.192.0/18\",\r\n \"52.143.196.0/24\"\ - ,\r\n \"52.143.210.0/24\",\r\n \"52.148.64.0/18\",\r\n \ - \ \"52.163.0.0/16\",\r\n \"52.187.0.0/17\",\r\n \ - \ \"52.187.128.0/18\",\r\n \"52.230.0.0/17\",\r\n \"52.237.64.0/18\"\ - ,\r\n \"52.239.129.0/24\",\r\n \"52.239.197.0/24\",\r\n\ - \ \"52.239.227.0/24\",\r\n \"52.239.249.0/24\",\r\n \ - \ \"52.245.80.0/22\",\r\n \"52.253.80.0/20\",\r\n \"\ - 104.43.0.0/17\",\r\n \"104.44.89.32/27\",\r\n \"104.44.90.128/27\"\ - ,\r\n \"104.44.92.32/27\",\r\n \"104.44.94.144/28\",\r\n\ - \ \"104.44.95.192/28\",\r\n \"104.44.95.224/28\",\r\n \ - \ \"104.215.128.0/17\",\r\n \"111.221.80.0/20\",\r\n \ - \ \"111.221.96.0/20\",\r\n \"137.116.128.0/19\",\r\n \ - \ \"138.91.32.0/20\",\r\n \"168.63.90.0/24\",\r\n \"168.63.91.0/26\"\ - ,\r\n \"168.63.160.0/19\",\r\n \"168.63.224.0/19\",\r\n\ - \ \"191.238.64.0/23\",\r\n \"207.46.50.128/28\",\r\n \ - \ \"207.46.59.64/27\",\r\n \"207.46.63.64/27\",\r\n \ - \ \"207.46.63.128/25\",\r\n \"207.46.224.0/20\",\r\n \"\ - 2603:1040::/47\",\r\n \"2603:1040:2::/48\",\r\n \"2603:1040:4::/48\"\ - ,\r\n \"2603:1040:5::/48\",\r\n \"2603:1040:6::/48\",\r\n\ - \ \"2603:1046:1406::/48\",\r\n \"2603:1046:1500:28::/64\"\ - ,\r\n \"2603:1046:2000:180::/59\",\r\n \"2603:1047:1:180::/59\"\ - ,\r\n \"2a01:111:f403:c401::/64\",\r\n \"2a01:111:f403:cc05::/64\"\ - ,\r\n \"2a01:111:f403:cc06::/63\",\r\n \"2a01:111:f403:cc08::/63\"\ - ,\r\n \"2a01:111:f403:d402::/64\",\r\n \"2a01:111:f403:dc01::/64\"\ - ,\r\n \"2a01:111:f403:e401::/64\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCloud.southfrance\",\r\n \"id\"\ - : \"AzureCloud.southfrance\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n \ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.150.192/26\",\r\n \"13.104.151.0/26\",\r\ - \n \"20.38.188.0/22\",\r\n \"20.39.80.0/20\",\r\n \ - \ \"20.47.28.0/24\",\r\n \"20.47.102.0/24\",\r\n \"20.60.11.0/24\"\ - ,\r\n \"20.60.188.0/23\",\r\n \"20.135.28.0/23\",\r\n \ - \ \"20.150.19.0/24\",\r\n \"20.157.156.0/24\",\r\n \ - \ \"20.190.147.128/25\",\r\n \"20.190.178.0/24\",\r\n \ - \ \"40.79.176.0/21\",\r\n \"40.79.223.0/24\",\r\n \"40.80.20.0/22\"\ - ,\r\n \"40.80.96.0/20\",\r\n \"40.82.224.0/20\",\r\n \ - \ \"40.90.132.32/28\",\r\n \"40.90.136.192/27\",\r\n \ - \ \"40.90.147.224/27\",\r\n \"40.126.19.128/25\",\r\n \ - \ \"40.126.50.0/24\",\r\n \"51.105.88.0/21\",\r\n \"51.138.128.0/19\"\ - ,\r\n \"51.138.160.0/21\",\r\n \"52.108.188.0/24\",\r\n\ - \ \"52.108.222.0/23\",\r\n \"52.109.72.0/22\",\r\n \ - \ \"52.111.253.0/24\",\r\n \"52.114.108.0/22\",\r\n \ - \ \"52.136.8.0/21\",\r\n \"52.136.28.0/24\",\r\n \"52.136.128.0/18\"\ - ,\r\n \"52.239.135.0/26\",\r\n \"52.239.196.0/24\",\r\n\ - \ \"52.245.120.0/22\",\r\n \"2603:1020:900::/47\",\r\n \ - \ \"2603:1020:902::/48\",\r\n \"2603:1020:904::/48\",\r\n\ - \ \"2603:1020:905::/48\",\r\n \"2603:1020:906::/48\",\r\n\ - \ \"2603:1026:2401::/48\",\r\n \"2603:1026:2500:2c::/64\"\ - ,\r\n \"2603:1026:3000:1a0::/59\",\r\n \"2603:1027:1:1a0::/59\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.southindia\"\ - ,\r\n \"id\": \"AzureCloud.southindia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\ - \n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.71.64.0/18\",\r\n \"13.104.153.128/26\",\r\n\ - \ \"20.40.0.0/21\",\r\n \"20.41.192.0/18\",\r\n \ - \ \"20.44.32.0/19\",\r\n \"20.47.52.0/24\",\r\n \"20.47.72.0/23\"\ - ,\r\n \"20.60.10.0/24\",\r\n \"20.60.226.0/23\",\r\n \ - \ \"20.135.42.0/23\",\r\n \"20.150.24.0/24\",\r\n \ - \ \"20.157.135.0/24\",\r\n \"20.190.145.128/25\",\r\n \"\ - 20.190.174.0/24\",\r\n \"20.192.128.0/19\",\r\n \"20.192.184.0/21\"\ - ,\r\n \"40.78.192.0/21\",\r\n \"40.79.213.0/24\",\r\n \ - \ \"40.81.64.0/20\",\r\n \"40.87.216.0/22\",\r\n \ - \ \"40.90.26.64/26\",\r\n \"40.90.137.160/27\",\r\n \"40.126.17.128/25\"\ - ,\r\n \"40.126.46.0/24\",\r\n \"52.108.192.0/24\",\r\n \ - \ \"52.108.230.0/23\",\r\n \"52.109.60.0/22\",\r\n \ - \ \"52.111.241.0/24\",\r\n \"52.113.15.0/24\",\r\n \"\ - 52.114.24.0/22\",\r\n \"52.136.17.0/24\",\r\n \"52.140.0.0/18\"\ - ,\r\n \"52.172.0.0/17\",\r\n \"52.239.135.128/26\",\r\n\ - \ \"52.239.188.0/24\",\r\n \"52.245.84.0/22\",\r\n \ - \ \"104.44.92.160/27\",\r\n \"104.44.94.208/28\",\r\n \ - \ \"104.47.214.0/23\",\r\n \"104.211.192.0/18\",\r\n \"\ - 2603:1040:c00::/46\",\r\n \"2603:1040:c05::/48\",\r\n \"\ - 2603:1040:c06::/47\",\r\n \"2603:1046:1407::/48\",\r\n \"\ - 2603:1046:1500:4::/64\",\r\n \"2603:1046:2000:60::/59\",\r\n \ - \ \"2603:1047:1:60::/59\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"AzureCloud.swedencentral\",\r\n \"id\": \"AzureCloud.swedencentral\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"swedencentral\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\"\ - : \"\",\r\n \"addressPrefixes\": [\r\n \"13.105.75.208/28\"\ - ,\r\n \"13.105.96.0/26\",\r\n \"13.105.99.112/28\",\r\n\ - \ \"13.105.99.160/27\",\r\n \"13.105.99.192/26\",\r\n \ - \ \"13.105.100.0/28\",\r\n \"13.105.100.32/27\",\r\n \ - \ \"20.60.78.0/23\",\r\n \"20.60.234.0/23\",\r\n \"\ - 20.60.252.0/23\",\r\n \"20.91.128.0/17\",\r\n \"20.135.164.0/22\"\ - ,\r\n \"20.135.168.0/23\",\r\n \"20.150.44.0/24\",\r\n \ - \ \"20.150.120.0/24\",\r\n \"20.157.151.0/24\",\r\n \ - \ \"20.190.181.0/24\",\r\n \"40.93.214.0/24\",\r\n \"\ - 40.101.1.0/24\",\r\n \"40.119.112.0/22\",\r\n \"40.126.53.0/24\"\ - ,\r\n \"40.126.203.0/24\",\r\n \"51.12.24.0/21\",\r\n \ - \ \"51.12.32.0/19\",\r\n \"51.12.64.0/19\",\r\n \"\ - 51.12.96.0/21\",\r\n \"51.12.104.32/27\",\r\n \"51.12.128.0/21\"\ - ,\r\n \"51.12.144.0/20\",\r\n \"51.12.208.0/20\",\r\n \ - \ \"51.12.224.0/19\",\r\n \"51.107.176.0/20\",\r\n \ - \ \"52.101.75.0/24\",\r\n \"52.101.80.0/22\",\r\n \"52.102.163.0/24\"\ - ,\r\n \"52.103.35.0/24\",\r\n \"52.103.163.0/24\",\r\n \ - \ \"52.108.134.0/24\",\r\n \"52.112.120.0/24\",\r\n \ - \ \"52.112.122.0/24\",\r\n \"52.253.187.0/24\",\r\n \ - \ \"52.253.188.0/23\",\r\n \"132.245.230.0/23\",\r\n \"\ - 2603:1020:1000::/47\",\r\n \"2603:1020:1003::/48\",\r\n \ - \ \"2603:1020:1004::/47\",\r\n \"2603:1026:900::/64\",\r\n \ - \ \"2603:1026:900:2::/63\",\r\n \"2603:1026:2402::/48\",\r\n \ - \ \"2603:1026:2500:4::/64\",\r\n \"2603:1026:3000:20::/59\"\ - ,\r\n \"2603:1027:1:20::/59\",\r\n \"2a01:111:f403:c202::/64\"\ - ,\r\n \"2a01:111:f403:ca10::/64\",\r\n \"2a01:111:f403:ca12::/63\"\ - ,\r\n \"2a01:111:f403:ca14::/64\",\r\n \"2a01:111:f403:d202::/64\"\ - ,\r\n \"2a01:111:f403:da02::/64\",\r\n \"2a01:111:f403:e202::/64\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.switzerlandn\"\ - ,\r\n \"id\": \"AzureCloud.switzerlandn\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.144.32/27\",\r\n \"13.104.211.192/26\"\ - ,\r\n \"13.105.100.176/28\",\r\n \"13.105.100.224/27\",\r\ - \n \"13.105.101.0/27\",\r\n \"20.47.53.0/24\",\r\n \ - \ \"20.47.71.0/24\",\r\n \"20.60.174.0/23\",\r\n \"\ - 20.135.170.0/23\",\r\n \"20.135.172.0/22\",\r\n \"20.150.59.0/24\"\ - ,\r\n \"20.150.118.0/24\",\r\n \"20.190.183.0/24\",\r\n\ - \ \"20.199.128.0/18\",\r\n \"20.203.128.0/17\",\r\n \ - \ \"20.208.0.0/17\",\r\n \"20.208.128.0/20\",\r\n \"\ - 40.90.30.128/27\",\r\n \"40.90.128.208/28\",\r\n \"40.119.80.0/22\"\ - ,\r\n \"40.126.55.0/24\",\r\n \"40.126.194.0/24\",\r\n \ - \ \"51.103.128.0/18\",\r\n \"51.103.192.32/27\",\r\n \ - \ \"51.103.200.0/21\",\r\n \"51.103.208.0/20\",\r\n \ - \ \"51.103.224.0/19\",\r\n \"51.107.0.0/18\",\r\n \"51.107.64.0/19\"\ - ,\r\n \"51.107.128.0/21\",\r\n \"51.107.200.0/21\",\r\n\ - \ \"51.107.240.0/21\",\r\n \"52.108.75.0/24\",\r\n \ - \ \"52.108.96.0/24\",\r\n \"52.109.156.0/23\",\r\n \"\ - 52.111.202.0/24\",\r\n \"52.114.226.0/24\",\r\n \"52.239.251.0/24\"\ - ,\r\n \"52.253.165.0/24\",\r\n \"52.253.175.0/24\",\r\n\ - \ \"52.253.176.0/24\",\r\n \"2603:1020:a00::/47\",\r\n \ - \ \"2603:1020:a03::/48\",\r\n \"2603:1020:a04::/47\",\r\n\ - \ \"2603:1026:240b::/48\",\r\n \"2603:1026:2500:c::/64\"\ - ,\r\n \"2603:1026:3000:60::/59\",\r\n \"2603:1027:1:60::/59\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.switzerlandw\"\ - ,\r\n \"id\": \"AzureCloud.switzerlandw\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.144.0/27\",\r\n \"13.104.212.0/26\",\r\n\ - \ \"20.47.26.0/24\",\r\n \"20.47.67.0/24\",\r\n \ - \ \"20.47.103.0/24\",\r\n \"20.60.176.0/23\",\r\n \"20.135.62.0/23\"\ - ,\r\n \"20.150.55.0/24\",\r\n \"20.150.116.0/24\",\r\n \ - \ \"20.157.133.0/24\",\r\n \"20.190.184.0/24\",\r\n \ - \ \"20.199.192.0/18\",\r\n \"40.90.19.32/27\",\r\n \"\ - 40.90.128.192/28\",\r\n \"40.119.84.0/22\",\r\n \"40.126.56.0/24\"\ - ,\r\n \"40.126.195.0/24\",\r\n \"51.103.192.0/27\",\r\n\ - \ \"51.107.96.0/19\",\r\n \"51.107.136.0/21\",\r\n \ - \ \"51.107.144.0/20\",\r\n \"51.107.160.0/20\",\r\n \ - \ \"51.107.192.0/21\",\r\n \"51.107.224.0/20\",\r\n \"51.107.248.0/21\"\ - ,\r\n \"52.108.179.0/24\",\r\n \"52.108.200.0/24\",\r\n\ - \ \"52.109.158.0/23\",\r\n \"52.111.203.0/24\",\r\n \ - \ \"52.114.230.0/24\",\r\n \"52.239.250.0/24\",\r\n \ - \ \"52.253.166.0/24\",\r\n \"2603:1020:b00::/47\",\r\n \ - \ \"2603:1020:b03::/48\",\r\n \"2603:1020:b04::/47\",\r\n \ - \ \"2603:1026:240c::/48\",\r\n \"2603:1026:2500:20::/64\",\r\n\ - \ \"2603:1026:3000:120::/59\",\r\n \"2603:1027:1:120::/59\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.uaecentral\"\ - ,\r\n \"id\": \"AzureCloud.uaecentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\ - \n ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.159.128/26\",\r\n \"20.37.64.0/19\",\r\n\ - \ \"20.45.64.0/19\",\r\n \"20.46.200.0/21\",\r\n \ - \ \"20.46.208.0/20\",\r\n \"20.47.54.0/24\",\r\n \"20.47.94.0/24\"\ - ,\r\n \"20.135.36.0/23\",\r\n \"20.150.6.0/23\",\r\n \ - \ \"20.150.115.0/24\",\r\n \"20.157.131.0/24\",\r\n \ - \ \"20.190.188.0/24\",\r\n \"40.90.16.64/27\",\r\n \"\ - 40.90.128.48/28\",\r\n \"40.90.151.224/27\",\r\n \"40.119.76.0/22\"\ - ,\r\n \"40.120.0.0/20\",\r\n \"40.125.0.0/19\",\r\n \ - \ \"40.126.60.0/24\",\r\n \"40.126.193.0/24\",\r\n \ - \ \"40.126.208.0/20\",\r\n \"52.108.183.0/24\",\r\n \"52.108.204.0/23\"\ - ,\r\n \"52.109.160.0/23\",\r\n \"52.111.247.0/24\",\r\n\ - \ \"52.114.232.0/24\",\r\n \"52.143.221.0/24\",\r\n \ - \ \"52.239.233.0/25\",\r\n \"2603:1040:b00::/47\",\r\n \ - \ \"2603:1040:b03::/48\",\r\n \"2603:1040:b04::/47\",\r\n \ - \ \"2603:1046:140b::/48\",\r\n \"2603:1046:1500:30::/64\",\r\ - \n \"2603:1046:2000:120::/59\",\r\n \"2603:1047:1:120::/59\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.uaenorth\"\ - ,\r\n \"id\": \"AzureCloud.uaenorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.151.64/26\",\r\n \"13.104.151.128/26\"\ - ,\r\n \"13.105.61.16/28\",\r\n \"13.105.61.64/26\",\r\n\ - \ \"20.38.124.0/23\",\r\n \"20.38.136.0/21\",\r\n \ - \ \"20.38.152.0/21\",\r\n \"20.46.32.0/19\",\r\n \"20.46.144.0/20\"\ - ,\r\n \"20.46.192.0/21\",\r\n \"20.47.55.0/24\",\r\n \ - \ \"20.47.95.0/24\",\r\n \"20.60.21.0/24\",\r\n \"\ - 20.60.212.0/23\",\r\n \"20.74.128.0/17\",\r\n \"20.135.114.0/23\"\ - ,\r\n \"20.135.116.0/22\",\r\n \"20.157.141.0/24\",\r\n\ - \ \"20.190.187.0/24\",\r\n \"20.196.0.0/18\",\r\n \ - \ \"20.203.0.0/18\",\r\n \"40.90.16.96/27\",\r\n \"40.90.128.64/28\"\ - ,\r\n \"40.90.152.128/27\",\r\n \"40.119.72.0/22\",\r\n\ - \ \"40.119.160.0/19\",\r\n \"40.120.64.0/18\",\r\n \ - \ \"40.123.192.0/19\",\r\n \"40.123.224.0/20\",\r\n \ - \ \"40.126.59.0/24\",\r\n \"40.126.192.0/24\",\r\n \"52.108.70.0/23\"\ - ,\r\n \"52.108.92.0/24\",\r\n \"52.109.162.0/23\",\r\n \ - \ \"52.111.204.0/24\",\r\n \"52.112.200.0/22\",\r\n \ - \ \"52.112.204.0/23\",\r\n \"52.112.207.0/24\",\r\n \ - \ \"52.114.236.0/24\",\r\n \"52.121.100.0/22\",\r\n \"52.121.104.0/23\"\ - ,\r\n \"52.143.202.0/24\",\r\n \"52.143.222.0/23\",\r\n\ - \ \"52.239.233.128/25\",\r\n \"65.52.248.0/21\",\r\n \ - \ \"2603:1040:900::/47\",\r\n \"2603:1040:903::/48\",\r\n \ - \ \"2603:1040:904::/47\",\r\n \"2603:1046:140a::/48\",\r\n\ - \ \"2603:1046:1500:2c::/64\",\r\n \"2603:1046:2000:100::/59\"\ - ,\r\n \"2603:1047:1:100::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.uksouth\",\r\n \"id\": \"AzureCloud.uksouth\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"4\",\r\n \"region\": \"uksouth\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\"\ - : \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.129.128/26\"\ - ,\r\n \"13.104.145.160/27\",\r\n \"13.104.146.64/26\",\r\ - \n \"13.104.159.0/25\",\r\n \"20.38.106.0/23\",\r\n \ - \ \"20.39.208.0/20\",\r\n \"20.39.224.0/21\",\r\n \"\ - 20.47.11.0/24\",\r\n \"20.47.34.0/24\",\r\n \"20.47.68.0/24\"\ - ,\r\n \"20.47.114.0/24\",\r\n \"20.49.128.0/17\",\r\n \ - \ \"20.50.96.0/19\",\r\n \"20.58.0.0/18\",\r\n \"\ - 20.60.17.0/24\",\r\n \"20.60.166.0/23\",\r\n \"20.68.0.0/18\"\ - ,\r\n \"20.68.128.0/17\",\r\n \"20.77.0.0/17\",\r\n \ - \ \"20.77.128.0/18\",\r\n \"20.90.64.0/18\",\r\n \"\ - 20.90.128.0/17\",\r\n \"20.108.0.0/16\",\r\n \"20.135.176.0/22\"\ - ,\r\n \"20.135.180.0/23\",\r\n \"20.150.18.0/25\",\r\n \ - \ \"20.150.40.0/25\",\r\n \"20.150.41.0/24\",\r\n \ - \ \"20.150.69.0/24\",\r\n \"20.157.157.0/24\",\r\n \"\ - 20.190.143.0/25\",\r\n \"20.190.169.0/24\",\r\n \"20.202.4.0/24\"\ - ,\r\n \"20.209.6.0/23\",\r\n \"40.79.215.0/24\",\r\n \ - \ \"40.80.0.0/22\",\r\n \"40.81.128.0/19\",\r\n \"\ - 40.90.17.32/27\",\r\n \"40.90.17.160/27\",\r\n \"40.90.29.192/26\"\ - ,\r\n \"40.90.128.112/28\",\r\n \"40.90.128.160/28\",\r\n\ - \ \"40.90.131.64/27\",\r\n \"40.90.139.64/27\",\r\n \ - \ \"40.90.141.192/26\",\r\n \"40.90.153.64/27\",\r\n \ - \ \"40.90.154.0/26\",\r\n \"40.120.32.0/19\",\r\n \"40.126.15.0/25\"\ - ,\r\n \"40.126.41.0/24\",\r\n \"51.11.0.0/18\",\r\n \ - \ \"51.11.128.0/18\",\r\n \"51.104.0.0/19\",\r\n \"\ - 51.104.192.0/18\",\r\n \"51.105.0.0/18\",\r\n \"51.105.64.0/20\"\ - ,\r\n \"51.132.0.0/18\",\r\n \"51.132.128.0/17\",\r\n \ - \ \"51.140.0.0/17\",\r\n \"51.140.128.0/18\",\r\n \ - \ \"51.141.128.32/27\",\r\n \"51.141.129.64/26\",\r\n \"\ - 51.141.130.0/25\",\r\n \"51.141.135.0/24\",\r\n \"51.141.192.0/18\"\ - ,\r\n \"51.143.128.0/18\",\r\n \"51.143.208.0/20\",\r\n\ - \ \"51.143.224.0/19\",\r\n \"51.145.0.0/17\",\r\n \ - \ \"52.108.50.0/23\",\r\n \"52.108.88.0/24\",\r\n \"\ - 52.108.99.0/24\",\r\n \"52.108.100.0/23\",\r\n \"52.109.28.0/22\"\ - ,\r\n \"52.111.242.0/24\",\r\n \"52.112.231.0/24\",\r\n\ - \ \"52.112.240.0/20\",\r\n \"52.113.128.0/24\",\r\n \ - \ \"52.113.200.0/22\",\r\n \"52.113.204.0/24\",\r\n \ - \ \"52.113.224.0/19\",\r\n \"52.114.88.0/22\",\r\n \"52.120.160.0/19\"\ - ,\r\n \"52.120.240.0/20\",\r\n \"52.136.21.0/24\",\r\n \ - \ \"52.151.64.0/18\",\r\n \"52.239.187.0/25\",\r\n \ - \ \"52.239.231.0/24\",\r\n \"52.245.64.0/22\",\r\n \"\ - 52.253.162.0/23\",\r\n \"104.44.89.224/27\",\r\n \"2603:1020:700::/47\"\ - ,\r\n \"2603:1020:702::/48\",\r\n \"2603:1020:704::/48\"\ - ,\r\n \"2603:1020:705::/48\",\r\n \"2603:1020:706::/48\"\ - ,\r\n \"2603:1026:2406::/48\",\r\n \"2603:1026:2500:18::/64\"\ - ,\r\n \"2603:1026:3000:e0::/59\",\r\n \"2603:1027:1:e0::/59\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.ukwest\"\ - ,\r\n \"id\": \"AzureCloud.ukwest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n \ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.39.160.0/21\",\r\n \"20.40.104.0/21\",\r\n\ - \ \"20.47.56.0/24\",\r\n \"20.47.82.0/23\",\r\n \ - \ \"20.58.64.0/18\",\r\n \"20.60.164.0/23\",\r\n \"20.68.64.0/18\"\ - ,\r\n \"20.77.192.0/18\",\r\n \"20.90.0.0/18\",\r\n \ - \ \"20.135.64.0/23\",\r\n \"20.150.2.0/23\",\r\n \"\ - 20.150.52.0/24\",\r\n \"20.150.110.0/24\",\r\n \"20.157.46.0/24\"\ - ,\r\n \"20.190.144.0/25\",\r\n \"20.190.171.0/24\",\r\n\ - \ \"20.202.3.0/24\",\r\n \"40.79.218.0/24\",\r\n \ - \ \"40.81.112.0/20\",\r\n \"40.87.228.0/22\",\r\n \"40.90.28.192/26\"\ - ,\r\n \"40.90.29.0/26\",\r\n \"40.90.131.96/27\",\r\n \ - \ \"40.90.139.96/27\",\r\n \"40.90.157.192/27\",\r\n \ - \ \"40.126.16.0/25\",\r\n \"40.126.43.0/24\",\r\n \"\ - 51.11.96.0/19\",\r\n \"51.104.32.0/19\",\r\n \"51.132.64.0/18\"\ - ,\r\n \"51.137.128.0/18\",\r\n \"51.140.192.0/18\",\r\n\ - \ \"51.141.0.0/17\",\r\n \"51.141.128.0/27\",\r\n \ - \ \"51.141.128.64/26\",\r\n \"51.141.128.128/25\",\r\n \ - \ \"51.141.129.128/26\",\r\n \"51.141.134.0/24\",\r\n \ - \ \"51.141.136.0/22\",\r\n \"52.108.189.0/24\",\r\n \"52.108.224.0/23\"\ - ,\r\n \"52.109.32.0/22\",\r\n \"52.111.205.0/24\",\r\n \ - \ \"52.112.168.0/22\",\r\n \"52.112.212.0/24\",\r\n \ - \ \"52.112.230.0/24\",\r\n \"52.113.192.0/24\",\r\n \ - \ \"52.114.84.0/22\",\r\n \"52.114.92.0/22\",\r\n \"52.136.20.0/24\"\ - ,\r\n \"52.142.128.0/18\",\r\n \"52.239.240.0/24\",\r\n\ - \ \"104.44.90.0/27\",\r\n \"2603:1020:600::/47\",\r\n \ - \ \"2603:1020:602::/48\",\r\n \"2603:1020:604::/48\",\r\n\ - \ \"2603:1020:605::/48\",\r\n \"2603:1020:606::/48\",\r\n\ - \ \"2603:1026:2407::/48\",\r\n \"2603:1026:3000:200::/59\"\ - ,\r\n \"2603:1027:1:200::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.usstagec\",\r\n \"id\": \"AzureCloud.usstagec\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"usstagec\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\"\ - : \"\",\r\n \"addressPrefixes\": [\r\n \"13.105.16.128/26\"\ - ,\r\n \"20.38.110.0/23\",\r\n \"20.43.112.0/21\",\r\n \ - \ \"20.44.0.0/21\",\r\n \"20.45.96.0/20\",\r\n \"\ - 20.45.112.0/21\",\r\n \"20.46.64.0/19\",\r\n \"20.46.128.0/20\"\ - ,\r\n \"20.47.14.0/24\",\r\n \"20.60.9.0/24\",\r\n \ - \ \"20.135.34.0/23\",\r\n \"23.100.192.0/19\",\r\n \"\ - 40.82.76.0/22\",\r\n \"40.87.176.168/30\",\r\n \"40.87.176.172/31\"\ - ,\r\n \"40.87.176.176/29\",\r\n \"40.87.176.188/30\",\r\n\ - \ \"40.87.176.208/29\",\r\n \"40.87.176.234/31\",\r\n \ - \ \"40.87.176.236/30\",\r\n \"40.87.177.0/28\",\r\n \ - \ \"40.87.177.122/31\",\r\n \"40.87.177.154/31\",\r\n \ - \ \"40.87.177.204/30\",\r\n \"40.87.177.208/30\",\r\n \"\ - 40.90.16.32/27\",\r\n \"40.90.128.32/28\",\r\n \"40.90.151.192/27\"\ - ,\r\n \"40.126.196.0/24\",\r\n \"52.108.132.0/24\",\r\n\ - \ \"52.143.220.0/24\",\r\n \"2603:1030:301::/48\",\r\n \ - \ \"2603:1030:302::/48\",\r\n \"2603:1030:303::/48\",\r\n\ - \ \"2603:1030:804:50::/63\",\r\n \"2603:1030:804:52::/64\"\ - ,\r\n \"2603:1030:804:55::/64\",\r\n \"2603:1030:804:56::/63\"\ - ,\r\n \"2603:1030:804:58::/63\",\r\n \"2603:1030:804:5a::/64\"\ - ,\r\n \"2603:1030:804:64::/63\",\r\n \"2603:1030:804:66::/64\"\ - ,\r\n \"2603:1030:804:a5::/64\",\r\n \"2603:1030:804:b5::/64\"\ - ,\r\n \"2603:1030:804:ce::/63\",\r\n \"2603:1030:804:d0::/63\"\ - ,\r\n \"2603:1030:80c::/48\",\r\n \"2603:1036:240e::/48\"\ - ,\r\n \"2603:1036:2500:28::/64\",\r\n \"2603:1036:3000:1a0::/59\"\ - ,\r\n \"2603:1037:1:1a0::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.westcentralus\",\r\n \"id\":\ - \ \"AzureCloud.westcentralus\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \ - \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.71.192.0/18\",\r\n \"13.77.192.0/19\",\r\n\ - \ \"13.78.128.0/17\",\r\n \"13.104.145.64/26\",\r\n \ - \ \"13.104.215.128/25\",\r\n \"13.104.219.0/25\",\r\n \ - \ \"20.47.4.0/24\",\r\n \"20.47.70.0/24\",\r\n \"20.47.104.0/24\"\ - ,\r\n \"20.51.32.0/19\",\r\n \"20.55.128.0/18\",\r\n \ - \ \"20.57.224.0/19\",\r\n \"20.59.128.0/18\",\r\n \ - \ \"20.60.4.0/24\",\r\n \"20.60.218.0/23\",\r\n \"20.69.0.0/18\"\ - ,\r\n \"20.135.22.0/23\",\r\n \"20.135.72.0/23\",\r\n \ - \ \"20.150.81.0/24\",\r\n \"20.150.98.0/24\",\r\n \ - \ \"20.157.41.0/24\",\r\n \"20.190.136.0/24\",\r\n \"20.190.158.0/24\"\ - ,\r\n \"40.67.120.0/21\",\r\n \"40.77.128.0/25\",\r\n \ - \ \"40.77.131.192/27\",\r\n \"40.77.131.240/28\",\r\n \ - \ \"40.77.135.0/24\",\r\n \"40.77.136.128/25\",\r\n \ - \ \"40.77.166.0/25\",\r\n \"40.77.166.128/28\",\r\n \"\ - 40.77.173.0/24\",\r\n \"40.77.175.32/27\",\r\n \"40.77.182.160/27\"\ - ,\r\n \"40.77.185.0/25\",\r\n \"40.77.224.16/28\",\r\n \ - \ \"40.77.224.64/27\",\r\n \"40.77.227.0/24\",\r\n \ - \ \"40.77.232.0/25\",\r\n \"40.77.235.0/24\",\r\n \"\ - 40.77.236.96/27\",\r\n \"40.77.246.0/24\",\r\n \"40.78.218.0/24\"\ - ,\r\n \"40.79.205.240/28\",\r\n \"40.79.206.224/27\",\r\n\ - \ \"40.79.207.0/27\",\r\n \"40.90.131.0/27\",\r\n \ - \ \"40.90.138.192/28\",\r\n \"40.90.139.0/27\",\r\n \"\ - 40.90.143.96/27\",\r\n \"40.90.151.0/26\",\r\n \"40.90.151.128/28\"\ - ,\r\n \"40.90.152.0/25\",\r\n \"40.93.6.0/24\",\r\n \ - \ \"40.93.15.0/24\",\r\n \"40.93.198.0/23\",\r\n \"\ - 40.93.200.0/23\",\r\n \"40.93.202.0/24\",\r\n \"40.96.255.0/24\"\ - ,\r\n \"40.123.136.0/24\",\r\n \"40.126.8.0/24\",\r\n \ - \ \"40.126.30.0/24\",\r\n \"52.101.24.0/22\",\r\n \ - \ \"52.101.40.0/24\",\r\n \"52.102.133.0/24\",\r\n \"52.102.141.0/24\"\ - ,\r\n \"52.103.7.0/24\",\r\n \"52.103.15.0/24\",\r\n \ - \ \"52.103.133.0/24\",\r\n \"52.103.141.0/24\",\r\n \ - \ \"52.108.181.0/24\",\r\n \"52.108.202.0/24\",\r\n \"\ - 52.109.136.0/22\",\r\n \"52.111.206.0/24\",\r\n \"52.112.93.0/24\"\ - ,\r\n \"52.113.207.0/24\",\r\n \"52.136.4.0/22\",\r\n \ - \ \"52.143.214.0/24\",\r\n \"52.148.0.0/18\",\r\n \ - \ \"52.150.128.0/17\",\r\n \"52.153.128.0/18\",\r\n \"\ - 52.159.0.0/18\",\r\n \"52.161.0.0/16\",\r\n \"52.239.164.0/25\"\ - ,\r\n \"52.239.167.0/24\",\r\n \"52.239.244.0/23\",\r\n\ - \ \"52.245.60.0/22\",\r\n \"52.253.128.0/20\",\r\n \ - \ \"53.103.141.0/24\",\r\n \"64.4.8.0/24\",\r\n \"64.4.54.0/24\"\ - ,\r\n \"65.55.209.192/26\",\r\n \"104.44.89.96/27\",\r\n\ - \ \"104.47.224.0/20\",\r\n \"131.253.24.160/27\",\r\n \ - \ \"131.253.40.160/28\",\r\n \"157.55.12.128/26\",\r\n \ - \ \"157.55.103.128/25\",\r\n \"207.68.174.48/29\",\r\n \ - \ \"2603:1030:b00::/47\",\r\n \"2603:1030:b03::/48\",\r\n \ - \ \"2603:1030:b04::/48\",\r\n \"2603:1030:b05::/48\",\r\n\ - \ \"2603:1030:b06::/48\",\r\n \"2603:1036:9ff:ffff::/64\"\ - ,\r\n \"2603:1036:2408::/48\",\r\n \"2603:1036:2500:20::/64\"\ - ,\r\n \"2603:1036:3000:180::/59\",\r\n \"2603:1037:1:180::/59\"\ - ,\r\n \"2a01:111:f403:c112::/64\",\r\n \"2a01:111:f403:c910::/62\"\ - ,\r\n \"2a01:111:f403:c932::/63\",\r\n \"2a01:111:f403:c934::/63\"\ - ,\r\n \"2a01:111:f403:c936::/64\",\r\n \"2a01:111:f403:d120::/62\"\ - ,\r\n \"2a01:111:f403:d910::/62\",\r\n \"2a01:111:f403:e010::/62\"\ - ,\r\n \"2a01:111:f403:f910::/62\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCloud.westeurope\",\r\n \"id\"\ - : \"AzureCloud.westeurope\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"\ - region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"\",\r\n \"addressPrefixes\": [\r\n \"13.69.0.0/17\"\ - ,\r\n \"13.73.128.0/18\",\r\n \"13.73.224.0/21\",\r\n \ - \ \"13.80.0.0/15\",\r\n \"13.88.200.0/21\",\r\n \"\ - 13.93.0.0/17\",\r\n \"13.94.128.0/17\",\r\n \"13.95.0.0/16\"\ - ,\r\n \"13.104.145.192/26\",\r\n \"13.104.146.0/26\",\r\n\ - \ \"13.104.146.128/25\",\r\n \"13.104.158.176/28\",\r\n\ - \ \"13.104.209.0/24\",\r\n \"13.104.214.0/25\",\r\n \ - \ \"13.104.218.128/25\",\r\n \"13.105.22.0/24\",\r\n \ - \ \"13.105.23.128/25\",\r\n \"13.105.28.32/28\",\r\n \"\ - 13.105.29.128/25\",\r\n \"13.105.60.48/28\",\r\n \"13.105.60.96/27\"\ - ,\r\n \"13.105.60.128/27\",\r\n \"13.105.66.144/28\",\r\n\ - \ \"20.38.108.0/23\",\r\n \"20.38.200.0/22\",\r\n \ - \ \"20.47.7.0/24\",\r\n \"20.47.18.0/23\",\r\n \"20.47.30.0/24\"\ - ,\r\n \"20.47.96.0/23\",\r\n \"20.47.115.0/24\",\r\n \ - \ \"20.47.118.0/24\",\r\n \"20.50.0.0/18\",\r\n \"\ - 20.50.128.0/17\",\r\n \"20.54.128.0/17\",\r\n \"20.56.0.0/16\"\ - ,\r\n \"20.60.26.0/23\",\r\n \"20.60.130.0/24\",\r\n \ - \ \"20.60.150.0/23\",\r\n \"20.60.196.0/23\",\r\n \ - \ \"20.60.222.0/23\",\r\n \"20.60.250.0/23\",\r\n \"20.61.0.0/16\"\ - ,\r\n \"20.67.0.0/17\",\r\n \"20.71.0.0/16\",\r\n \ - \ \"20.73.0.0/16\",\r\n \"20.76.0.0/16\",\r\n \"20.82.0.0/17\"\ - ,\r\n \"20.86.0.0/16\",\r\n \"20.93.128.0/17\",\r\n \ - \ \"20.101.0.0/16\",\r\n \"20.103.0.0/16\",\r\n \"\ - 20.105.128.0/17\",\r\n \"20.107.0.0/17\",\r\n \"20.135.24.0/23\"\ - ,\r\n \"20.135.140.0/22\",\r\n \"20.135.144.0/23\",\r\n\ - \ \"20.143.1.0/24\",\r\n \"20.150.8.0/23\",\r\n \ - \ \"20.150.37.0/24\",\r\n \"20.150.42.0/24\",\r\n \"20.150.74.0/24\"\ - ,\r\n \"20.150.76.0/24\",\r\n \"20.150.83.0/24\",\r\n \ - \ \"20.150.122.0/24\",\r\n \"20.157.33.0/24\",\r\n \ - \ \"20.157.97.0/24\",\r\n \"20.157.146.0/24\",\r\n \"\ - 20.157.158.0/24\",\r\n \"20.190.137.0/24\",\r\n \"20.190.160.0/24\"\ - ,\r\n \"20.202.2.0/24\",\r\n \"20.209.10.0/23\",\r\n \ - \ \"23.97.128.0/17\",\r\n \"23.98.46.0/24\",\r\n \"\ - 23.100.0.0/20\",\r\n \"23.101.64.0/20\",\r\n \"40.67.192.0/19\"\ - ,\r\n \"40.68.0.0/16\",\r\n \"40.74.0.0/18\",\r\n \ - \ \"40.78.210.0/24\",\r\n \"40.79.205.192/27\",\r\n \"\ - 40.79.205.224/28\",\r\n \"40.79.206.0/27\",\r\n \"40.82.92.0/22\"\ - ,\r\n \"40.87.184.0/22\",\r\n \"40.90.17.64/27\",\r\n \ - \ \"40.90.18.192/26\",\r\n \"40.90.20.128/25\",\r\n \ - \ \"40.90.21.0/25\",\r\n \"40.90.130.0/27\",\r\n \"40.90.133.0/27\"\ - ,\r\n \"40.90.134.64/26\",\r\n \"40.90.134.128/26\",\r\n\ - \ \"40.90.138.0/27\",\r\n \"40.90.141.32/27\",\r\n \ - \ \"40.90.141.160/27\",\r\n \"40.90.142.224/28\",\r\n \ - \ \"40.90.144.192/27\",\r\n \"40.90.145.192/27\",\r\n \ - \ \"40.90.146.16/28\",\r\n \"40.90.146.128/27\",\r\n \"\ - 40.90.150.128/25\",\r\n \"40.90.157.64/26\",\r\n \"40.90.159.0/24\"\ - ,\r\n \"40.91.28.0/22\",\r\n \"40.91.192.0/18\",\r\n \ - \ \"40.93.65.0/24\",\r\n \"40.112.36.128/25\",\r\n \ - \ \"40.112.37.0/26\",\r\n \"40.112.38.192/26\",\r\n \"\ - 40.112.96.0/19\",\r\n \"40.113.96.0/19\",\r\n \"40.113.128.0/18\"\ - ,\r\n \"40.114.128.0/17\",\r\n \"40.115.0.0/18\",\r\n \ - \ \"40.118.0.0/17\",\r\n \"40.119.128.0/19\",\r\n \ - \ \"40.123.140.0/22\",\r\n \"40.126.9.0/24\",\r\n \"40.126.32.0/24\"\ - ,\r\n \"51.105.96.0/19\",\r\n \"51.105.128.0/17\",\r\n \ - \ \"51.124.0.0/16\",\r\n \"51.136.0.0/16\",\r\n \ - \ \"51.137.0.0/17\",\r\n \"51.137.192.0/18\",\r\n \"51.138.0.0/17\"\ - ,\r\n \"51.144.0.0/16\",\r\n \"51.145.128.0/17\",\r\n \ - \ \"52.101.69.0/24\",\r\n \"52.101.70.0/23\",\r\n \ - \ \"52.101.72.0/23\",\r\n \"52.102.161.0/24\",\r\n \"52.103.33.0/24\"\ - ,\r\n \"52.103.161.0/24\",\r\n \"52.108.24.0/21\",\r\n \ - \ \"52.108.56.0/21\",\r\n \"52.108.80.0/24\",\r\n \ - \ \"52.108.108.0/23\",\r\n \"52.108.110.0/24\",\r\n \"\ - 52.109.88.0/22\",\r\n \"52.111.243.0/24\",\r\n \"52.112.14.0/23\"\ - ,\r\n \"52.112.17.0/24\",\r\n \"52.112.18.0/23\",\r\n \ - \ \"52.112.71.0/24\",\r\n \"52.112.83.0/24\",\r\n \ - \ \"52.112.97.0/24\",\r\n \"52.112.98.0/23\",\r\n \"52.112.110.0/23\"\ - ,\r\n \"52.112.144.0/20\",\r\n \"52.112.197.0/24\",\r\n\ - \ \"52.112.216.0/21\",\r\n \"52.112.233.0/24\",\r\n \ - \ \"52.112.237.0/24\",\r\n \"52.112.238.0/24\",\r\n \ - \ \"52.113.9.0/24\",\r\n \"52.113.37.0/24\",\r\n \"52.113.83.0/24\"\ - ,\r\n \"52.113.130.0/24\",\r\n \"52.113.144.0/21\",\r\n\ - \ \"52.113.199.0/24\",\r\n \"52.114.64.0/21\",\r\n \ - \ \"52.114.72.0/22\",\r\n \"52.114.116.0/22\",\r\n \"\ - 52.114.241.0/24\",\r\n \"52.114.242.0/24\",\r\n \"52.114.252.0/22\"\ - ,\r\n \"52.115.0.0/21\",\r\n \"52.115.8.0/22\",\r\n \ - \ \"52.120.128.0/21\",\r\n \"52.120.208.0/20\",\r\n \ - \ \"52.121.24.0/21\",\r\n \"52.121.64.0/20\",\r\n \"52.125.140.0/23\"\ - ,\r\n \"52.136.192.0/18\",\r\n \"52.137.0.0/18\",\r\n \ - \ \"52.142.192.0/18\",\r\n \"52.143.0.0/18\",\r\n \ - \ \"52.143.194.0/24\",\r\n \"52.143.208.0/24\",\r\n \"\ - 52.148.192.0/18\",\r\n \"52.149.64.0/18\",\r\n \"52.157.64.0/18\"\ - ,\r\n \"52.157.128.0/17\",\r\n \"52.166.0.0/16\",\r\n \ - \ \"52.174.0.0/16\",\r\n \"52.178.0.0/17\",\r\n \"\ - 52.232.0.0/17\",\r\n \"52.232.147.0/24\",\r\n \"52.233.128.0/17\"\ - ,\r\n \"52.236.128.0/17\",\r\n \"52.239.140.0/22\",\r\n\ - \ \"52.239.212.0/23\",\r\n \"52.239.242.0/23\",\r\n \ - \ \"52.245.48.0/22\",\r\n \"52.245.124.0/22\",\r\n \ - \ \"65.52.128.0/19\",\r\n \"104.40.128.0/17\",\r\n \"104.44.89.160/27\"\ - ,\r\n \"104.44.90.192/27\",\r\n \"104.44.93.0/27\",\r\n\ - \ \"104.44.93.192/27\",\r\n \"104.44.95.80/28\",\r\n \ - \ \"104.44.95.96/28\",\r\n \"104.45.0.0/18\",\r\n \ - \ \"104.45.64.0/20\",\r\n \"104.46.32.0/19\",\r\n \"104.47.128.0/18\"\ - ,\r\n \"104.47.216.64/26\",\r\n \"104.214.192.0/18\",\r\n\ - \ \"137.116.192.0/19\",\r\n \"137.117.128.0/17\",\r\n \ - \ \"157.55.8.64/26\",\r\n \"157.55.8.144/28\",\r\n \ - \ \"157.56.117.64/27\",\r\n \"168.61.56.0/21\",\r\n \"\ - 168.63.0.0/19\",\r\n \"168.63.96.0/19\",\r\n \"191.233.64.0/18\"\ - ,\r\n \"191.237.232.0/22\",\r\n \"191.239.200.0/22\",\r\n\ - \ \"193.149.80.0/21\",\r\n \"213.199.128.0/20\",\r\n \ - \ \"213.199.180.32/28\",\r\n \"213.199.180.96/27\",\r\n \ - \ \"213.199.180.192/27\",\r\n \"213.199.183.0/24\",\r\n \ - \ \"2603:1020:200::/46\",\r\n \"2603:1020:205::/48\",\r\n \ - \ \"2603:1020:206::/47\",\r\n \"2603:1026:2405::/48\",\r\n\ - \ \"2603:1026:2500:24::/64\",\r\n \"2603:1026:3000:140::/59\"\ - ,\r\n \"2603:1027:1:140::/59\",\r\n \"2a01:111:f403:c201::/64\"\ - ,\r\n \"2a01:111:f403:ca05::/64\",\r\n \"2a01:111:f403:ca06::/63\"\ - ,\r\n \"2a01:111:f403:ca08::/63\",\r\n \"2a01:111:f403:d201::/64\"\ - ,\r\n \"2a01:111:f403:da01::/64\",\r\n \"2a01:111:f403:e201::/64\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.westindia\"\ - ,\r\n \"id\": \"AzureCloud.westindia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.104.157.128/25\",\r\n \"20.38.128.0/21\",\r\ - \n \"20.40.8.0/21\",\r\n \"20.47.57.0/24\",\r\n \ - \ \"20.47.124.0/23\",\r\n \"20.60.216.0/23\",\r\n \"20.135.44.0/23\"\ - ,\r\n \"20.150.18.128/25\",\r\n \"20.150.43.0/25\",\r\n\ - \ \"20.150.106.0/24\",\r\n \"20.157.102.0/24\",\r\n \ - \ \"20.157.136.0/24\",\r\n \"20.190.146.128/25\",\r\n \ - \ \"20.190.176.0/24\",\r\n \"20.192.64.0/19\",\r\n \"\ - 40.79.219.0/24\",\r\n \"40.81.80.0/20\",\r\n \"40.87.220.0/22\"\ - ,\r\n \"40.90.26.0/26\",\r\n \"40.90.138.224/27\",\r\n \ - \ \"40.126.18.128/25\",\r\n \"40.126.48.0/24\",\r\n \ - \ \"52.108.73.0/24\",\r\n \"52.108.94.0/24\",\r\n \"\ - 52.109.64.0/22\",\r\n \"52.111.244.0/24\",\r\n \"52.113.134.0/24\"\ - ,\r\n \"52.114.28.0/22\",\r\n \"52.136.16.0/24\",\r\n \ - \ \"52.136.32.0/19\",\r\n \"52.140.128.0/18\",\r\n \ - \ \"52.183.128.0/18\",\r\n \"52.239.135.192/26\",\r\n \ - \ \"52.239.187.128/25\",\r\n \"52.245.76.0/22\",\r\n \"\ - 52.249.64.0/19\",\r\n \"104.44.93.224/27\",\r\n \"104.44.95.112/28\"\ - ,\r\n \"104.47.212.0/23\",\r\n \"104.211.128.0/18\",\r\n\ - \ \"2603:1040:800::/46\",\r\n \"2603:1040:805::/48\",\r\n\ - \ \"2603:1040:806::/47\",\r\n \"2603:1046:1408::/48\",\r\ - \n \"2603:1046:1500::/64\",\r\n \"2603:1046:2000:20::/59\"\ - ,\r\n \"2603:1047:1:20::/59\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCloud.westus\",\r\n \"id\": \"AzureCloud.westus\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"7\",\r\n \"region\": \"westus\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\"\ - : \"\",\r\n \"addressPrefixes\": [\r\n \"13.64.0.0/16\",\r\ - \n \"13.73.32.0/19\",\r\n \"13.83.0.0/16\",\r\n \ - \ \"13.86.128.0/17\",\r\n \"13.87.128.0/17\",\r\n \"13.88.0.0/17\"\ - ,\r\n \"13.88.128.0/18\",\r\n \"13.91.0.0/16\",\r\n \ - \ \"13.93.128.0/17\",\r\n \"13.104.144.192/27\",\r\n \ - \ \"13.104.158.16/28\",\r\n \"13.104.158.64/26\",\r\n \ - \ \"13.104.208.96/27\",\r\n \"13.104.222.0/24\",\r\n \"\ - 13.104.223.0/25\",\r\n \"13.105.17.64/26\",\r\n \"13.105.17.128/26\"\ - ,\r\n \"13.105.19.128/25\",\r\n \"13.105.96.64/27\",\r\n\ - \ \"13.105.96.96/28\",\r\n \"13.105.97.0/27\",\r\n \ - \ \"20.43.192.0/18\",\r\n \"20.47.2.0/24\",\r\n \"20.47.22.0/23\"\ - ,\r\n \"20.47.110.0/24\",\r\n \"20.47.116.0/24\",\r\n \ - \ \"20.49.120.0/21\",\r\n \"20.57.192.0/19\",\r\n \ - \ \"20.59.64.0/18\",\r\n \"20.60.1.0/24\",\r\n \"20.60.34.0/23\"\ - ,\r\n \"20.60.52.0/23\",\r\n \"20.60.80.0/23\",\r\n \ - \ \"20.60.168.0/23\",\r\n \"20.60.230.0/23\",\r\n \"\ - 20.60.232.0/23\",\r\n \"20.66.0.0/17\",\r\n \"20.135.74.0/23\"\ - ,\r\n \"20.150.34.0/23\",\r\n \"20.150.91.0/24\",\r\n \ - \ \"20.150.102.0/24\",\r\n \"20.157.32.0/24\",\r\n \ - \ \"20.157.57.0/24\",\r\n \"20.157.105.0/24\",\r\n \"\ - 20.157.130.0/24\",\r\n \"20.184.128.0/17\",\r\n \"20.189.128.0/18\"\ - ,\r\n \"20.190.132.0/24\",\r\n \"20.190.153.0/24\",\r\n\ - \ \"20.202.22.0/24\",\r\n \"23.99.0.0/18\",\r\n \ - \ \"23.99.64.0/19\",\r\n \"23.100.32.0/20\",\r\n \"23.101.192.0/20\"\ - ,\r\n \"40.65.0.0/18\",\r\n \"40.75.128.0/17\",\r\n \ - \ \"40.78.0.0/17\",\r\n \"40.78.216.0/24\",\r\n \"\ - 40.80.152.0/21\",\r\n \"40.81.0.0/20\",\r\n \"40.82.248.0/21\"\ - ,\r\n \"40.83.128.0/17\",\r\n \"40.85.144.0/20\",\r\n \ - \ \"40.86.160.0/19\",\r\n \"40.87.160.0/22\",\r\n \ - \ \"40.90.17.96/27\",\r\n \"40.90.18.128/26\",\r\n \"40.90.22.128/25\"\ - ,\r\n \"40.90.23.0/25\",\r\n \"40.90.25.192/26\",\r\n \ - \ \"40.90.128.128/28\",\r\n \"40.90.131.192/27\",\r\n \ - \ \"40.90.135.0/26\",\r\n \"40.90.139.192/27\",\r\n \ - \ \"40.90.146.0/28\",\r\n \"40.90.148.128/27\",\r\n \"\ - 40.90.153.96/27\",\r\n \"40.90.156.128/26\",\r\n \"40.93.0.0/23\"\ - ,\r\n \"40.93.9.0/24\",\r\n \"40.112.128.0/17\",\r\n \ - \ \"40.118.128.0/17\",\r\n \"40.125.32.0/19\",\r\n \ - \ \"40.126.4.0/24\",\r\n \"40.126.25.0/24\",\r\n \"52.101.0.0/22\"\ - ,\r\n \"52.101.16.0/22\",\r\n \"52.101.41.0/24\",\r\n \ - \ \"52.101.43.0/24\",\r\n \"52.101.44.0/23\",\r\n \ - \ \"52.102.128.0/24\",\r\n \"52.102.135.0/24\",\r\n \"\ - 52.102.158.0/24\",\r\n \"52.103.0.0/24\",\r\n \"52.103.2.0/24\"\ - ,\r\n \"52.103.9.0/24\",\r\n \"52.103.128.0/24\",\r\n \ - \ \"52.108.0.0/21\",\r\n \"52.108.78.0/24\",\r\n \ - \ \"52.109.0.0/22\",\r\n \"52.111.245.0/24\",\r\n \"52.112.106.0/23\"\ - ,\r\n \"52.112.114.0/24\",\r\n \"52.113.208.0/20\",\r\n\ - \ \"52.114.152.0/21\",\r\n \"52.114.172.0/22\",\r\n \ - \ \"52.114.176.0/22\",\r\n \"52.114.184.0/23\",\r\n \ - \ \"52.115.56.0/22\",\r\n \"52.115.60.0/23\",\r\n \"52.115.93.0/24\"\ - ,\r\n \"52.115.140.0/22\",\r\n \"52.115.144.0/20\",\r\n\ - \ \"52.120.96.0/19\",\r\n \"52.121.36.0/22\",\r\n \ - \ \"52.123.1.0/24\",\r\n \"52.137.128.0/17\",\r\n \"\ - 52.153.0.0/18\",\r\n \"52.155.32.0/19\",\r\n \"52.157.0.0/18\"\ - ,\r\n \"52.159.128.0/17\",\r\n \"52.160.0.0/16\",\r\n \ - \ \"52.180.0.0/17\",\r\n \"52.190.128.0/17\",\r\n \ - \ \"52.225.0.0/17\",\r\n \"52.232.149.0/24\",\r\n \"52.234.0.0/17\"\ - ,\r\n \"52.238.0.0/18\",\r\n \"52.239.0.0/17\",\r\n \ - \ \"52.239.160.0/22\",\r\n \"52.239.228.0/23\",\r\n \ - \ \"52.239.254.0/23\",\r\n \"52.241.0.0/16\",\r\n \"52.245.12.0/22\"\ - ,\r\n \"52.245.108.0/22\",\r\n \"52.246.0.0/17\",\r\n \ - \ \"52.248.128.0/17\",\r\n \"52.250.192.0/18\",\r\n \ - \ \"52.254.128.0/17\",\r\n \"53.103.135.0/24\",\r\n \"\ - 65.52.112.0/20\",\r\n \"104.40.0.0/17\",\r\n \"104.42.0.0/16\"\ - ,\r\n \"104.44.88.0/27\",\r\n \"104.44.91.0/27\",\r\n \ - \ \"104.44.92.96/27\",\r\n \"104.44.94.0/28\",\r\n \ - \ \"104.44.95.128/27\",\r\n \"104.45.208.0/20\",\r\n \"\ - 104.45.224.0/19\",\r\n \"104.209.0.0/18\",\r\n \"104.210.32.0/19\"\ - ,\r\n \"137.116.184.0/21\",\r\n \"137.117.0.0/19\",\r\n\ - \ \"137.135.0.0/18\",\r\n \"138.91.64.0/19\",\r\n \ - \ \"138.91.128.0/17\",\r\n \"157.56.160.0/21\",\r\n \"\ - 168.61.0.0/19\",\r\n \"168.61.64.0/20\",\r\n \"168.62.0.0/19\"\ - ,\r\n \"168.62.192.0/19\",\r\n \"168.63.88.0/23\",\r\n \ - \ \"191.236.64.0/18\",\r\n \"191.238.70.0/23\",\r\n \ - \ \"191.239.0.0/18\",\r\n \"2603:1030:a00::/46\",\r\n \ - \ \"2603:1030:a04::/48\",\r\n \"2603:1030:a06::/48\",\r\n \ - \ \"2603:1030:a07::/48\",\r\n \"2603:1030:a08::/48\",\r\n \ - \ \"2603:1030:a09::/56\",\r\n \"2603:1030:a0a::/48\",\r\n \ - \ \"2603:1036:2400::/48\",\r\n \"2603:1036:2500:10::/64\"\ - ,\r\n \"2603:1036:3000:1c0::/59\",\r\n \"2603:1037:1:1c0::/59\"\ - ,\r\n \"2a01:111:f100:3000::/52\",\r\n \"2a01:111:f403:c000::/64\"\ - ,\r\n \"2a01:111:f403:c800::/64\",\r\n \"2a01:111:f403:c914::/62\"\ - ,\r\n \"2a01:111:f403:c918::/64\",\r\n \"2a01:111:f403:d000::/64\"\ - ,\r\n \"2a01:111:f403:d800::/64\",\r\n \"2a01:111:f403:e000::/64\"\ - ,\r\n \"2a01:111:f403:f800::/62\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCloud.westus2\",\r\n \"id\":\ - \ \"AzureCloud.westus2\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \"\ - region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"\",\r\n \"addressPrefixes\": [\r\n \"13.66.128.0/17\"\ - ,\r\n \"13.77.128.0/18\",\r\n \"13.104.129.64/26\",\r\n\ - \ \"13.104.145.0/26\",\r\n \"13.104.208.192/26\",\r\n \ - \ \"13.104.213.0/25\",\r\n \"13.104.220.0/25\",\r\n \ - \ \"13.105.14.0/25\",\r\n \"13.105.14.128/26\",\r\n \"\ - 13.105.18.160/27\",\r\n \"13.105.36.0/27\",\r\n \"13.105.36.32/28\"\ - ,\r\n \"13.105.36.64/27\",\r\n \"13.105.36.128/26\",\r\n\ - \ \"13.105.66.64/26\",\r\n \"20.36.0.0/19\",\r\n \ - \ \"20.38.99.0/24\",\r\n \"20.42.128.0/18\",\r\n \"20.47.62.0/23\"\ - ,\r\n \"20.47.120.0/23\",\r\n \"20.51.8.0/21\",\r\n \ - \ \"20.51.64.0/18\",\r\n \"20.57.128.0/18\",\r\n \"\ - 20.59.0.0/18\",\r\n \"20.60.20.0/24\",\r\n \"20.60.68.0/22\"\ - ,\r\n \"20.60.152.0/23\",\r\n \"20.60.228.0/23\",\r\n \ - \ \"20.64.128.0/17\",\r\n \"20.69.64.0/18\",\r\n \ - \ \"20.69.128.0/18\",\r\n \"20.72.192.0/18\",\r\n \"20.80.128.0/18\"\ - ,\r\n \"20.83.64.0/18\",\r\n \"20.83.192.0/18\",\r\n \ - \ \"20.94.192.0/18\",\r\n \"20.98.64.0/18\",\r\n \"\ - 20.99.128.0/17\",\r\n \"20.109.128.0/18\",\r\n \"20.112.0.0/17\"\ - ,\r\n \"20.135.18.0/23\",\r\n \"20.135.228.0/22\",\r\n \ - \ \"20.135.232.0/23\",\r\n \"20.150.68.0/24\",\r\n \ - \ \"20.150.78.0/24\",\r\n \"20.150.87.0/24\",\r\n \"\ - 20.150.107.0/24\",\r\n \"20.157.50.0/23\",\r\n \"20.157.106.0/24\"\ - ,\r\n \"20.187.0.0/18\",\r\n \"20.190.0.0/18\",\r\n \ - \ \"20.190.133.0/24\",\r\n \"20.190.154.0/24\",\r\n \ - \ \"20.191.64.0/18\",\r\n \"20.201.223.0/24\",\r\n \"20.201.231.0/24\"\ - ,\r\n \"20.202.23.0/24\",\r\n \"23.98.47.0/24\",\r\n \ - \ \"23.102.192.0/21\",\r\n \"23.102.203.0/24\",\r\n \ - \ \"23.103.64.32/27\",\r\n \"23.103.64.64/27\",\r\n \"\ - 23.103.66.0/23\",\r\n \"40.64.64.0/18\",\r\n \"40.64.128.0/21\"\ - ,\r\n \"40.65.64.0/18\",\r\n \"40.77.136.0/28\",\r\n \ - \ \"40.77.136.64/28\",\r\n \"40.77.139.128/25\",\r\n \ - \ \"40.77.160.0/27\",\r\n \"40.77.162.0/24\",\r\n \"\ - 40.77.164.0/24\",\r\n \"40.77.169.0/24\",\r\n \"40.77.175.64/27\"\ - ,\r\n \"40.77.180.0/23\",\r\n \"40.77.182.64/27\",\r\n \ - \ \"40.77.185.128/25\",\r\n \"40.77.186.0/23\",\r\n \ - \ \"40.77.198.128/25\",\r\n \"40.77.199.128/26\",\r\n \ - \ \"40.77.200.0/25\",\r\n \"40.77.202.0/24\",\r\n \"40.77.224.96/27\"\ - ,\r\n \"40.77.230.0/24\",\r\n \"40.77.232.128/25\",\r\n\ - \ \"40.77.234.224/27\",\r\n \"40.77.236.128/27\",\r\n \ - \ \"40.77.240.128/25\",\r\n \"40.77.241.0/24\",\r\n \ - \ \"40.77.242.0/23\",\r\n \"40.77.244.0/25\",\r\n \"\ - 40.77.247.0/24\",\r\n \"40.77.249.0/24\",\r\n \"40.77.250.0/24\"\ - ,\r\n \"40.77.254.128/25\",\r\n \"40.78.208.32/30\",\r\n\ - \ \"40.78.217.0/24\",\r\n \"40.78.240.0/20\",\r\n \ - \ \"40.79.206.128/27\",\r\n \"40.80.160.0/24\",\r\n \"\ - 40.82.36.0/22\",\r\n \"40.87.232.0/21\",\r\n \"40.90.16.192/26\"\ - ,\r\n \"40.90.131.32/27\",\r\n \"40.90.132.48/28\",\r\n\ - \ \"40.90.136.224/27\",\r\n \"40.90.138.208/28\",\r\n \ - \ \"40.90.139.32/27\",\r\n \"40.90.146.32/27\",\r\n \ - \ \"40.90.148.192/27\",\r\n \"40.90.153.0/26\",\r\n \"\ - 40.90.192.0/19\",\r\n \"40.91.0.0/22\",\r\n \"40.91.64.0/18\"\ - ,\r\n \"40.91.160.0/19\",\r\n \"40.93.7.0/24\",\r\n \ - \ \"40.93.10.0/24\",\r\n \"40.96.50.0/24\",\r\n \"\ - 40.96.61.0/24\",\r\n \"40.96.63.0/24\",\r\n \"40.125.64.0/18\"\ - ,\r\n \"40.126.5.0/24\",\r\n \"40.126.26.0/24\",\r\n \ - \ \"51.141.160.0/19\",\r\n \"51.143.0.0/17\",\r\n \ - \ \"52.96.11.0/24\",\r\n \"52.101.28.0/22\",\r\n \"52.101.42.0/24\"\ - ,\r\n \"52.101.46.0/23\",\r\n \"52.101.48.0/23\",\r\n \ - \ \"52.101.50.0/24\",\r\n \"52.102.134.0/24\",\r\n \ - \ \"52.102.136.0/24\",\r\n \"52.103.8.0/24\",\r\n \"52.103.10.0/24\"\ - ,\r\n \"52.103.134.0/24\",\r\n \"52.103.136.0/24\",\r\n\ - \ \"52.108.72.0/24\",\r\n \"52.108.93.0/24\",\r\n \ - \ \"52.109.24.0/22\",\r\n \"52.111.246.0/24\",\r\n \"\ - 52.112.105.0/24\",\r\n \"52.112.109.0/24\",\r\n \"52.112.115.0/24\"\ - ,\r\n \"52.114.148.0/22\",\r\n \"52.115.55.0/24\",\r\n \ - \ \"52.123.5.0/24\",\r\n \"52.136.0.0/22\",\r\n \ - \ \"52.137.64.0/18\",\r\n \"52.143.64.0/18\",\r\n \"52.143.197.0/24\"\ - ,\r\n \"52.143.211.0/24\",\r\n \"52.148.128.0/18\",\r\n\ - \ \"52.149.0.0/18\",\r\n \"52.151.0.0/18\",\r\n \ - \ \"52.156.64.0/18\",\r\n \"52.156.128.0/19\",\r\n \"52.158.224.0/19\"\ - ,\r\n \"52.175.192.0/18\",\r\n \"52.183.0.0/17\",\r\n \ - \ \"52.191.128.0/18\",\r\n \"52.229.0.0/18\",\r\n \ - \ \"52.232.152.0/24\",\r\n \"52.233.64.0/18\",\r\n \"52.235.64.0/18\"\ - ,\r\n \"52.239.148.128/25\",\r\n \"52.239.176.128/25\",\r\ - \n \"52.239.193.0/24\",\r\n \"52.239.210.0/23\",\r\n \ - \ \"52.239.236.0/23\",\r\n \"52.245.52.0/22\",\r\n \ - \ \"52.246.192.0/18\",\r\n \"52.247.192.0/18\",\r\n \"\ - 52.250.0.0/17\",\r\n \"53.103.136.0/24\",\r\n \"65.52.111.0/24\"\ - ,\r\n \"65.55.32.128/28\",\r\n \"65.55.32.192/27\",\r\n\ - \ \"65.55.32.224/28\",\r\n \"65.55.33.176/28\",\r\n \ - \ \"65.55.33.192/28\",\r\n \"65.55.35.192/27\",\r\n \ - \ \"65.55.44.8/29\",\r\n \"65.55.44.112/28\",\r\n \"65.55.51.0/24\"\ - ,\r\n \"65.55.105.160/27\",\r\n \"65.55.106.192/28\",\r\n\ - \ \"65.55.106.240/28\",\r\n \"65.55.107.0/28\",\r\n \ - \ \"65.55.107.96/27\",\r\n \"65.55.110.0/24\",\r\n \ - \ \"65.55.120.0/24\",\r\n \"65.55.207.0/24\",\r\n \"65.55.209.0/25\"\ - ,\r\n \"65.55.210.0/24\",\r\n \"65.55.219.64/26\",\r\n \ - \ \"65.55.250.0/24\",\r\n \"65.55.252.0/24\",\r\n \ - \ \"70.37.0.0/21\",\r\n \"70.37.8.0/22\",\r\n \"70.37.16.0/20\"\ - ,\r\n \"70.37.32.0/20\",\r\n \"104.44.89.128/27\",\r\n \ - \ \"104.44.89.192/27\",\r\n \"104.44.95.0/28\",\r\n \ - \ \"131.253.12.160/28\",\r\n \"131.253.12.228/30\",\r\n \ - \ \"131.253.13.24/29\",\r\n \"131.253.13.88/30\",\r\n \ - \ \"131.253.13.128/27\",\r\n \"131.253.14.4/30\",\r\n \ - \ \"131.253.14.8/31\",\r\n \"131.253.14.96/27\",\r\n \"\ - 131.253.14.128/27\",\r\n \"131.253.14.192/29\",\r\n \"131.253.15.192/28\"\ - ,\r\n \"131.253.35.128/26\",\r\n \"131.253.40.48/29\",\r\ - \n \"131.253.40.128/27\",\r\n \"131.253.41.0/24\",\r\n \ - \ \"134.170.222.0/24\",\r\n \"137.116.176.0/21\",\r\n \ - \ \"157.55.2.128/26\",\r\n \"157.55.12.64/26\",\r\n \ - \ \"157.55.13.64/26\",\r\n \"157.55.39.0/24\",\r\n \"\ - 157.55.55.228/30\",\r\n \"157.55.55.232/29\",\r\n \"157.55.55.240/28\"\ - ,\r\n \"157.55.106.0/26\",\r\n \"157.55.154.128/25\",\r\n\ - \ \"157.56.2.0/25\",\r\n \"157.56.3.128/25\",\r\n \ - \ \"157.56.19.224/27\",\r\n \"157.56.21.160/27\",\r\n \ - \ \"157.56.21.192/27\",\r\n \"157.56.80.0/25\",\r\n \"\ - 168.62.64.0/19\",\r\n \"199.30.24.0/23\",\r\n \"199.30.27.0/25\"\ - ,\r\n \"199.30.27.144/28\",\r\n \"199.30.27.160/27\",\r\n\ - \ \"199.30.31.192/26\",\r\n \"207.46.13.0/24\",\r\n \ - \ \"207.68.174.192/28\",\r\n \"209.240.212.0/23\",\r\n \ - \ \"2603:1030:c00::/48\",\r\n \"2603:1030:c02::/47\",\r\n \ - \ \"2603:1030:c04::/48\",\r\n \"2603:1030:c05::/48\",\r\n \ - \ \"2603:1030:c06::/48\",\r\n \"2603:1030:c07::/48\",\r\n\ - \ \"2603:1030:d00::/47\",\r\n \"2603:1030:e01:2::/64\",\r\ - \n \"2603:1036:903::/64\",\r\n \"2603:1036:d20::/64\",\r\ - \n \"2603:1036:2409::/48\",\r\n \"2603:1036:2500:14::/64\"\ - ,\r\n \"2603:1036:3000:c0::/59\",\r\n \"2603:1037:1:c0::/59\"\ - ,\r\n \"2a01:111:f403:c004::/62\",\r\n \"2a01:111:f403:c804::/62\"\ - ,\r\n \"2a01:111:f403:c919::/64\",\r\n \"2a01:111:f403:c91a::/63\"\ - ,\r\n \"2a01:111:f403:c91c::/63\",\r\n \"2a01:111:f403:d004::/62\"\ - ,\r\n \"2a01:111:f403:d804::/62\",\r\n \"2a01:111:f403:f804::/62\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.westus3\"\ - ,\r\n \"id\": \"AzureCloud.westus3\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.105.66.32/27\",\r\n \"13.105.66.128/28\",\r\ - \n \"13.105.66.160/27\",\r\n \"13.105.74.0/27\",\r\n \ - \ \"13.105.74.32/28\",\r\n \"13.105.74.64/27\",\r\n \ - \ \"20.38.0.0/20\",\r\n \"20.38.32.0/20\",\r\n \"20.38.160.0/20\"\ - ,\r\n \"20.40.24.0/21\",\r\n \"20.60.14.0/24\",\r\n \ - \ \"20.60.38.0/23\",\r\n \"20.60.162.0/23\",\r\n \"\ - 20.106.64.0/18\",\r\n \"20.135.6.0/23\",\r\n \"20.135.222.0/23\"\ - ,\r\n \"20.135.224.0/22\",\r\n \"20.143.0.0/24\",\r\n \ - \ \"20.150.30.0/24\",\r\n \"20.150.128.0/17\",\r\n \ - \ \"20.157.40.0/24\",\r\n \"20.157.145.0/24\",\r\n \"\ - 20.190.190.128/25\",\r\n \"20.209.4.0/23\",\r\n \"40.79.204.160/27\"\ - ,\r\n \"40.79.205.64/28\",\r\n \"40.79.205.96/27\",\r\n\ - \ \"40.119.88.0/22\",\r\n \"40.126.62.128/25\",\r\n \ - \ \"40.126.202.0/24\",\r\n \"52.108.139.0/24\",\r\n \ - \ \"52.253.182.0/23\",\r\n \"52.253.184.0/24\",\r\n \"\ - 2603:1030:500::/47\",\r\n \"2603:1030:503::/48\",\r\n \"\ - 2603:1030:504::/47\",\r\n \"2603:1036:240c::/48\",\r\n \"\ - 2603:1036:2500:18::/63\",\r\n \"2603:1036:2500:38::/64\",\r\n \ - \ \"2603:1036:3000:e0::/59\",\r\n \"2603:1037:1:e0::/59\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCognitiveSearch\"\ - ,\r\n \"id\": \"AzureCognitiveSearch\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureCognitiveSearch\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.64.32.141/32\",\r\n\ - \ \"13.83.22.45/32\",\r\n \"13.83.22.74/32\",\r\n \ - \ \"13.83.22.119/32\",\r\n \"13.86.5.51/32\",\r\n \"\ - 20.21.32.192/26\",\r\n \"20.36.120.128/26\",\r\n \"20.37.64.128/26\"\ - ,\r\n \"20.37.156.128/26\",\r\n \"20.37.193.192/26\",\r\n\ - \ \"20.37.224.128/26\",\r\n \"20.38.84.0/26\",\r\n \ - \ \"20.38.136.128/26\",\r\n \"20.39.8.192/26\",\r\n \ - \ \"20.40.123.36/32\",\r\n \"20.40.123.39/32\",\r\n \"20.40.123.46/32\"\ - ,\r\n \"20.40.123.72/32\",\r\n \"20.41.4.128/26\",\r\n \ - \ \"20.41.65.64/26\",\r\n \"20.41.193.64/26\",\r\n \ - \ \"20.42.4.128/26\",\r\n \"20.42.24.90/32\",\r\n \"\ - 20.42.29.212/32\",\r\n \"20.42.30.105/32\",\r\n \"20.42.34.190/32\"\ - ,\r\n \"20.42.35.204/32\",\r\n \"20.42.129.192/26\",\r\n\ - \ \"20.42.225.192/26\",\r\n \"20.43.41.64/26\",\r\n \ - \ \"20.43.65.64/26\",\r\n \"20.43.130.128/26\",\r\n \ - \ \"20.44.74.182/32\",\r\n \"20.44.76.53/32\",\r\n \"20.44.76.61/32\"\ - ,\r\n \"20.44.76.86/32\",\r\n \"20.45.0.49/32\",\r\n \ - \ \"20.45.2.122/32\",\r\n \"20.45.112.128/26\",\r\n \ - \ \"20.45.192.128/26\",\r\n \"20.72.17.0/26\",\r\n \"\ - 20.150.160.128/26\",\r\n \"20.185.110.199/32\",\r\n \"20.189.106.128/26\"\ - ,\r\n \"20.189.129.94/32\",\r\n \"20.192.161.0/26\",\r\n\ - \ \"20.192.225.64/26\",\r\n \"23.100.238.27/32\",\r\n \ - \ \"23.100.238.34/31\",\r\n \"23.100.238.37/32\",\r\n \ - \ \"40.64.8.64/26\",\r\n \"40.65.173.157/32\",\r\n \ - \ \"40.65.175.212/32\",\r\n \"40.65.175.228/32\",\r\n \"\ - 40.66.56.233/32\",\r\n \"40.67.48.128/26\",\r\n \"40.74.18.154/32\"\ - ,\r\n \"40.74.30.0/26\",\r\n \"40.80.57.64/26\",\r\n \ - \ \"40.80.169.64/26\",\r\n \"40.80.186.192/26\",\r\n \ - \ \"40.80.216.231/32\",\r\n \"40.80.217.38/32\",\r\n \ - \ \"40.80.219.46/32\",\r\n \"40.81.9.100/32\",\r\n \"40.81.9.131/32\"\ - ,\r\n \"40.81.9.203/32\",\r\n \"40.81.9.209/32\",\r\n \ - \ \"40.81.9.213/32\",\r\n \"40.81.9.221/32\",\r\n \ - \ \"40.81.10.36/32\",\r\n \"40.81.12.133/32\",\r\n \"40.81.15.8/32\"\ - ,\r\n \"40.81.15.39/32\",\r\n \"40.81.29.152/32\",\r\n \ - \ \"40.81.188.130/32\",\r\n \"40.81.191.58/32\",\r\n \ - \ \"40.81.253.154/32\",\r\n \"40.82.155.65/32\",\r\n \ - \ \"40.82.253.0/26\",\r\n \"40.89.17.64/26\",\r\n \"40.90.190.180/32\"\ - ,\r\n \"40.90.240.17/32\",\r\n \"40.91.93.84/32\",\r\n \ - \ \"40.91.127.116/32\",\r\n \"40.91.127.241/32\",\r\n \ - \ \"40.119.11.0/26\",\r\n \"51.12.41.64/26\",\r\n \ - \ \"51.12.193.64/26\",\r\n \"51.104.25.64/26\",\r\n \"51.105.80.128/26\"\ - ,\r\n \"51.105.88.128/26\",\r\n \"51.107.48.128/26\",\r\n\ - \ \"51.107.144.128/26\",\r\n \"51.116.48.96/28\",\r\n \ - \ \"51.116.144.96/28\",\r\n \"51.120.40.128/26\",\r\n \ - \ \"51.120.224.128/26\",\r\n \"51.132.43.66/32\",\r\n \ - \ \"51.137.161.64/26\",\r\n \"51.143.104.54/32\",\r\n \ - \ \"51.143.104.90/32\",\r\n \"51.143.192.128/26\",\r\n \ - \ \"51.145.124.157/32\",\r\n \"51.145.124.158/32\",\r\n \ - \ \"51.145.176.249/32\",\r\n \"51.145.177.212/32\",\r\n \ - \ \"51.145.178.138/32\",\r\n \"51.145.178.140/32\",\r\n \ - \ \"52.136.48.128/26\",\r\n \"52.137.24.236/32\",\r\n \"\ - 52.137.26.114/32\",\r\n \"52.137.26.155/32\",\r\n \"52.137.26.198/32\"\ - ,\r\n \"52.137.27.49/32\",\r\n \"52.137.56.115/32\",\r\n\ - \ \"52.137.60.208/32\",\r\n \"52.139.0.47/32\",\r\n \ - \ \"52.139.0.49/32\",\r\n \"52.140.105.64/26\",\r\n \ - \ \"52.140.233.105/32\",\r\n \"52.150.139.0/26\",\r\n \"\ - 52.151.235.150/32\",\r\n \"52.151.235.242/32\",\r\n \"52.151.235.244/32\"\ - ,\r\n \"52.155.216.245/32\",\r\n \"52.155.217.84/32\",\r\ - \n \"52.155.221.242/32\",\r\n \"52.155.221.250/32\",\r\n\ - \ \"52.155.222.35/32\",\r\n \"52.155.222.56/32\",\r\n \ - \ \"52.157.22.233/32\",\r\n \"52.157.231.64/32\",\r\n \ - \ \"52.158.28.181/32\",\r\n \"52.158.30.241/32\",\r\n \ - \ \"52.158.208.11/32\",\r\n \"52.184.80.221/32\",\r\n \ - \ \"52.185.224.13/32\",\r\n \"52.185.224.38/32\",\r\n \"\ - 52.188.217.235/32\",\r\n \"52.188.218.228/32\",\r\n \"52.188.218.239/32\"\ - ,\r\n \"52.228.81.64/26\",\r\n \"52.242.214.45/32\",\r\n\ - \ \"52.253.133.74/32\",\r\n \"52.253.229.120/32\",\r\n \ - \ \"102.37.84.192/26\",\r\n \"102.133.128.33/32\",\r\n \ - \ \"102.133.217.128/26\",\r\n \"104.45.64.0/32\",\r\n \ - \ \"104.45.64.147/32\",\r\n \"104.45.64.224/32\",\r\n \ - \ \"104.45.65.30/32\",\r\n \"104.45.65.89/32\",\r\n \"\ - 191.233.9.0/26\",\r\n \"191.233.26.156/32\",\r\n \"191.235.225.64/26\"\ - ,\r\n \"2603:1000:4::180/121\",\r\n \"2603:1000:104:1::180/121\"\ - ,\r\n \"2603:1010:6:1::180/121\",\r\n \"2603:1010:101::180/121\"\ - ,\r\n \"2603:1010:304::180/121\",\r\n \"2603:1010:404::180/121\"\ - ,\r\n \"2603:1020:5:1::180/121\",\r\n \"2603:1020:206:1::180/121\"\ - ,\r\n \"2603:1020:305::180/121\",\r\n \"2603:1020:405::180/121\"\ - ,\r\n \"2603:1020:605::180/121\",\r\n \"2603:1020:705:1::180/121\"\ - ,\r\n \"2603:1020:805:1::180/121\",\r\n \"2603:1020:905::180/121\"\ - ,\r\n \"2603:1020:a04:1::180/121\",\r\n \"2603:1020:b04::180/121\"\ - ,\r\n \"2603:1020:c04:1::180/121\",\r\n \"2603:1020:d04::180/121\"\ - ,\r\n \"2603:1020:e04:1::180/121\",\r\n \"2603:1020:f04::180/121\"\ - ,\r\n \"2603:1020:1004::180/121\",\r\n \"2603:1020:1104::180/121\"\ - ,\r\n \"2603:1030:f:1::180/121\",\r\n \"2603:1030:10:1::180/121\"\ - ,\r\n \"2603:1030:104:1::180/121\",\r\n \"2603:1030:107::180/121\"\ - ,\r\n \"2603:1030:210:1::180/121\",\r\n \"2603:1030:302::500/121\"\ - ,\r\n \"2603:1030:40b:1::180/121\",\r\n \"2603:1030:40c:1::180/121\"\ - ,\r\n \"2603:1030:504:1::180/121\",\r\n \"2603:1030:608::180/121\"\ - ,\r\n \"2603:1030:807:1::180/121\",\r\n \"2603:1030:a07::180/121\"\ - ,\r\n \"2603:1030:b04::180/121\",\r\n \"2603:1030:c06:1::180/121\"\ - ,\r\n \"2603:1030:f05:1::180/121\",\r\n \"2603:1030:1005::180/121\"\ - ,\r\n \"2603:1040:5:1::180/121\",\r\n \"2603:1040:207::180/121\"\ - ,\r\n \"2603:1040:407:1::180/121\",\r\n \"2603:1040:606::180/121\"\ - ,\r\n \"2603:1040:806::180/121\",\r\n \"2603:1040:904:1::180/121\"\ - ,\r\n \"2603:1040:a06:1::180/121\",\r\n \"2603:1040:b04::180/121\"\ - ,\r\n \"2603:1040:c06::180/121\",\r\n \"2603:1040:d04::180/121\"\ - ,\r\n \"2603:1040:e05:1::/121\",\r\n \"2603:1040:f05:1::180/121\"\ - ,\r\n \"2603:1040:1002::380/121\",\r\n \"2603:1040:1104::180/121\"\ - ,\r\n \"2603:1050:6:1::180/121\",\r\n \"2603:1050:403::180/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors\"\ - ,\r\n \"id\": \"AzureConnectors\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureConnectors\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.65.86.57/32\",\r\n \ - \ \"13.66.140.128/28\",\r\n \"13.66.145.96/27\",\r\n \ - \ \"13.67.8.240/28\",\r\n \"13.67.15.32/27\",\r\n \"\ - 13.69.64.208/28\",\r\n \"13.69.71.192/27\",\r\n \"13.69.227.208/28\"\ - ,\r\n \"13.69.231.192/27\",\r\n \"13.70.72.192/28\",\r\n\ - \ \"13.70.78.224/27\",\r\n \"13.70.136.174/32\",\r\n \ - \ \"13.71.125.22/32\",\r\n \"13.71.127.26/32\",\r\n \ - \ \"13.71.153.19/32\",\r\n \"13.71.170.208/28\",\r\n \"\ - 13.71.175.160/27\",\r\n \"13.71.195.32/28\",\r\n \"13.71.199.192/27\"\ - ,\r\n \"13.72.243.10/32\",\r\n \"13.73.21.230/32\",\r\n\ - \ \"13.73.244.224/27\",\r\n \"13.75.36.64/28\",\r\n \ - \ \"13.75.110.131/32\",\r\n \"13.77.50.240/28\",\r\n \ - \ \"13.77.55.160/27\",\r\n \"13.78.108.0/28\",\r\n \"\ - 13.78.132.82/32\",\r\n \"13.86.223.32/27\",\r\n \"13.87.56.224/28\"\ - ,\r\n \"13.87.122.224/28\",\r\n \"13.89.171.80/28\",\r\n\ - \ \"13.89.178.64/27\",\r\n \"13.93.148.62/32\",\r\n \ - \ \"20.21.43.0/26\",\r\n \"20.36.107.0/28\",\r\n \"\ - 20.36.114.176/28\",\r\n \"20.36.117.160/27\",\r\n \"20.37.74.192/28\"\ - ,\r\n \"20.38.128.224/27\",\r\n \"20.43.123.0/27\",\r\n\ - \ \"20.44.3.0/28\",\r\n \"20.44.29.64/27\",\r\n \ - \ \"20.45.90.208/28\",\r\n \"20.45.90.224/27\",\r\n \"\ - 20.45.240.112/28\",\r\n \"20.45.241.128/27\",\r\n \"20.47.232.80/28\"\ - ,\r\n \"20.47.232.96/27\",\r\n \"20.48.200.192/27\",\r\n\ - \ \"20.48.200.224/28\",\r\n \"20.51.4.192/27\",\r\n \ - \ \"20.51.4.224/28\",\r\n \"20.52.93.80/28\",\r\n \"\ - 20.52.93.96/27\",\r\n \"20.53.0.0/27\",\r\n \"20.53.52.64/27\"\ - ,\r\n \"20.53.52.96/28\",\r\n \"20.53.60.16/28\",\r\n \ - \ \"20.53.60.32/27\",\r\n \"20.58.70.192/27\",\r\n \ - \ \"20.58.70.224/28\",\r\n \"20.59.77.0/27\",\r\n \"20.66.6.112/28\"\ - ,\r\n \"20.69.4.0/27\",\r\n \"20.69.4.32/28\",\r\n \ - \ \"20.70.220.192/27\",\r\n \"20.70.220.224/28\",\r\n \ - \ \"20.72.27.0/26\",\r\n \"20.82.246.112/28\",\r\n \"\ - 20.83.220.208/28\",\r\n \"20.83.220.224/27\",\r\n \"20.86.93.32/27\"\ - ,\r\n \"20.86.93.64/28\",\r\n \"20.88.66.32/27\",\r\n \ - \ \"20.88.66.64/28\",\r\n \"20.88.153.176/28\",\r\n \ - \ \"20.88.153.192/27\",\r\n \"20.89.11.48/28\",\r\n \"\ - 20.89.11.64/27\",\r\n \"20.90.129.0/27\",\r\n \"20.90.129.32/28\"\ - ,\r\n \"20.92.3.64/27\",\r\n \"20.92.3.96/28\",\r\n \ - \ \"20.97.33.48/28\",\r\n \"20.97.33.64/27\",\r\n \"\ - 20.98.144.224/27\",\r\n \"20.98.145.0/28\",\r\n \"20.98.192.80/28\"\ - ,\r\n \"20.98.192.96/27\",\r\n \"20.100.0.96/27\",\r\n \ - \ \"20.100.0.128/28\",\r\n \"20.150.129.176/28\",\r\n \ - \ \"20.150.129.192/27\",\r\n \"20.150.170.240/28\",\r\n \ - \ \"20.150.173.64/26\",\r\n \"20.189.192.144/28\",\r\n \ - \ \"20.189.192.160/27\",\r\n \"20.192.32.64/26\",\r\n \ - \ \"20.192.82.48/28\",\r\n \"20.192.82.64/27\",\r\n \"\ - 20.192.152.64/27\",\r\n \"20.192.152.96/28\",\r\n \"20.192.168.64/27\"\ - ,\r\n \"20.192.168.96/28\",\r\n \"20.192.184.32/27\",\r\n\ - \ \"20.193.206.192/26\",\r\n \"20.195.82.240/28\",\r\n \ - \ \"20.195.83.0/27\",\r\n \"20.200.194.160/27\",\r\n \ - \ \"20.200.194.192/28\",\r\n \"20.205.67.48/28\",\r\n \ - \ \"20.205.67.64/27\",\r\n \"20.206.0.0/26\",\r\n \"\ - 20.207.0.0/26\",\r\n \"23.100.208.0/27\",\r\n \"40.64.8.48/28\"\ - ,\r\n \"40.64.8.128/27\",\r\n \"40.67.58.240/28\",\r\n \ - \ \"40.67.60.224/27\",\r\n \"40.69.106.240/28\",\r\n \ - \ \"40.69.111.0/27\",\r\n \"40.70.146.208/28\",\r\n \ - \ \"40.70.151.96/27\",\r\n \"40.71.11.80/28\",\r\n \"40.71.15.160/27\"\ - ,\r\n \"40.71.249.139/32\",\r\n \"40.71.249.205/32\",\r\n\ - \ \"40.74.100.224/28\",\r\n \"40.74.146.64/28\",\r\n \ - \ \"40.78.194.240/28\",\r\n \"40.78.202.96/28\",\r\n \ - \ \"40.79.130.208/28\",\r\n \"40.79.148.96/27\",\r\n \ - \ \"40.79.178.240/28\",\r\n \"40.79.180.224/27\",\r\n \"\ - 40.79.189.64/27\",\r\n \"40.80.180.64/27\",\r\n \"40.89.135.2/32\"\ - ,\r\n \"40.91.208.65/32\",\r\n \"40.112.195.87/32\",\r\n\ - \ \"40.112.243.160/28\",\r\n \"40.114.40.132/32\",\r\n \ - \ \"40.120.8.0/27\",\r\n \"40.120.64.64/27\",\r\n \ - \ \"40.120.86.16/28\",\r\n \"40.120.86.32/27\",\r\n \"\ - 51.12.20.224/27\",\r\n \"51.12.22.128/28\",\r\n \"51.12.29.112/28\"\ - ,\r\n \"51.12.72.128/27\",\r\n \"51.12.98.240/28\",\r\n\ - \ \"51.12.102.0/26\",\r\n \"51.12.202.240/28\",\r\n \ - \ \"51.12.205.192/26\",\r\n \"51.13.139.160/27\",\r\n \ - \ \"51.13.139.192/28\",\r\n \"51.103.142.22/32\",\r\n \ - \ \"51.105.77.96/27\",\r\n \"51.107.59.16/28\",\r\n \"\ - 51.107.60.224/27\",\r\n \"51.107.86.217/32\",\r\n \"51.107.155.16/28\"\ - ,\r\n \"51.107.156.224/27\",\r\n \"51.107.246.112/28\",\r\ - \n \"51.107.246.128/27\",\r\n \"51.107.254.32/27\",\r\n\ - \ \"51.107.254.64/28\",\r\n \"51.116.55.240/28\",\r\n \ - \ \"51.116.59.16/28\",\r\n \"51.116.60.192/27\",\r\n \ - \ \"51.116.74.32/27\",\r\n \"51.116.155.80/28\",\r\n \ - \ \"51.116.158.96/27\",\r\n \"51.116.211.212/32\",\r\n \ - \ \"51.116.236.78/32\",\r\n \"51.120.98.224/28\",\r\n \"\ - 51.120.100.192/27\",\r\n \"51.120.218.240/28\",\r\n \"51.120.220.192/27\"\ - ,\r\n \"51.138.215.48/28\",\r\n \"51.138.215.64/27\",\r\n\ - \ \"51.140.61.124/32\",\r\n \"51.140.74.150/32\",\r\n \ - \ \"51.140.80.51/32\",\r\n \"51.140.148.0/28\",\r\n \ - \ \"51.140.211.0/28\",\r\n \"51.140.212.224/27\",\r\n \ - \ \"51.141.47.105/32\",\r\n \"51.141.52.185/32\",\r\n \"\ - 51.141.124.13/32\",\r\n \"52.136.133.184/32\",\r\n \"52.136.142.154/32\"\ - ,\r\n \"52.136.189.16/28\",\r\n \"52.136.189.32/27\",\r\n\ - \ \"52.138.92.192/27\",\r\n \"52.139.111.0/27\",\r\n \ - \ \"52.139.111.32/28\",\r\n \"52.141.1.104/32\",\r\n \ - \ \"52.141.36.214/32\",\r\n \"52.146.138.32/27\",\r\n \ - \ \"52.147.117.32/27\",\r\n \"52.147.117.64/28\",\r\n \"\ - 52.161.101.204/32\",\r\n \"52.161.102.22/32\",\r\n \"52.162.107.160/28\"\ - ,\r\n \"52.162.111.192/27\",\r\n \"52.162.126.4/32\",\r\n\ - \ \"52.162.242.161/32\",\r\n \"52.171.130.92/32\",\r\n \ - \ \"52.172.80.0/26\",\r\n \"52.172.211.12/32\",\r\n \ - \ \"52.172.212.129/32\",\r\n \"52.173.241.27/32\",\r\n \ - \ \"52.173.245.164/32\",\r\n \"52.174.88.118/32\",\r\n \ - \ \"52.175.23.169/32\",\r\n \"52.178.150.68/32\",\r\n \ - \ \"52.183.78.157/32\",\r\n \"52.187.68.19/32\",\r\n \"\ - 52.225.129.144/32\",\r\n \"52.231.18.208/28\",\r\n \"52.231.147.0/28\"\ - ,\r\n \"52.231.148.224/27\",\r\n \"52.231.163.10/32\",\r\ - \n \"52.231.201.173/32\",\r\n \"52.232.188.154/32\",\r\n\ - \ \"52.237.24.126/32\",\r\n \"52.237.32.212/32\",\r\n \ - \ \"52.237.214.72/32\",\r\n \"52.242.30.112/32\",\r\n \ - \ \"52.242.35.152/32\",\r\n \"52.255.48.202/32\",\r\n \ - \ \"65.52.250.208/28\",\r\n \"94.245.91.93/32\",\r\n \ - \ \"102.37.64.0/27\",\r\n \"102.37.84.128/27\",\r\n \"102.37.84.160/28\"\ - ,\r\n \"102.37.166.80/28\",\r\n \"102.37.166.96/27\",\r\n\ - \ \"102.133.27.0/28\",\r\n \"102.133.72.85/32\",\r\n \ - \ \"102.133.155.0/28\",\r\n \"102.133.168.167/32\",\r\n \ - \ \"102.133.253.0/27\",\r\n \"104.41.59.51/32\",\r\n \ - \ \"104.42.122.49/32\",\r\n \"104.209.247.23/32\",\r\n \ - \ \"104.211.81.192/28\",\r\n \"104.211.146.224/28\",\r\n \ - \ \"104.211.189.124/32\",\r\n \"104.211.189.218/32\",\r\n \ - \ \"104.214.19.48/28\",\r\n \"104.214.70.191/32\",\r\n \ - \ \"104.214.164.0/27\",\r\n \"104.214.165.128/26\",\r\n \ - \ \"104.215.27.24/32\",\r\n \"104.215.61.248/32\",\r\n \ - \ \"168.61.140.0/27\",\r\n \"168.61.143.64/26\",\r\n \ - \ \"191.232.191.157/32\",\r\n \"191.233.51.0/26\",\r\n \"\ - 191.233.203.192/28\",\r\n \"191.233.207.160/27\",\r\n \"\ - 191.238.76.112/28\",\r\n \"191.238.76.128/27\",\r\n \"2603:1000:4:402::180/122\"\ - ,\r\n \"2603:1000:104:402::180/122\",\r\n \"2603:1010:6:402::180/122\"\ - ,\r\n \"2603:1010:101:402::180/122\",\r\n \"2603:1010:304:402::180/122\"\ - ,\r\n \"2603:1010:404:402::180/122\",\r\n \"2603:1020:5:402::180/122\"\ - ,\r\n \"2603:1020:206:402::180/122\",\r\n \"2603:1020:305:402::180/122\"\ - ,\r\n \"2603:1020:405:402::180/122\",\r\n \"2603:1020:605:402::180/122\"\ - ,\r\n \"2603:1020:705:402::180/122\",\r\n \"2603:1020:805:402::180/122\"\ - ,\r\n \"2603:1020:905:402::180/122\",\r\n \"2603:1020:a04:402::180/122\"\ - ,\r\n \"2603:1020:b04:402::180/122\",\r\n \"2603:1020:c04:402::180/122\"\ - ,\r\n \"2603:1020:d04:402::180/122\",\r\n \"2603:1020:e04:402::180/122\"\ - ,\r\n \"2603:1020:f04:402::180/122\",\r\n \"2603:1020:1004:c02::80/122\"\ - ,\r\n \"2603:1020:1104:400::180/122\",\r\n \"2603:1030:f:400::980/122\"\ - ,\r\n \"2603:1030:10:402::180/122\",\r\n \"2603:1030:104:402::180/122\"\ - ,\r\n \"2603:1030:107:400::100/122\",\r\n \"2603:1030:210:402::180/122\"\ - ,\r\n \"2603:1030:40b:400::980/122\",\r\n \"2603:1030:40c:402::180/122\"\ - ,\r\n \"2603:1030:504:c02::80/122\",\r\n \"2603:1030:608:402::180/122\"\ - ,\r\n \"2603:1030:807:402::180/122\",\r\n \"2603:1030:a07:402::100/122\"\ - ,\r\n \"2603:1030:b04:402::180/122\",\r\n \"2603:1030:c06:400::980/122\"\ - ,\r\n \"2603:1030:f05:402::180/122\",\r\n \"2603:1030:1005:402::180/122\"\ - ,\r\n \"2603:1040:5:402::180/122\",\r\n \"2603:1040:207:402::180/122\"\ - ,\r\n \"2603:1040:407:402::180/122\",\r\n \"2603:1040:606:402::180/122\"\ - ,\r\n \"2603:1040:806:402::180/122\",\r\n \"2603:1040:904:402::180/122\"\ - ,\r\n \"2603:1040:a06:402::180/122\",\r\n \"2603:1040:b04:402::180/122\"\ - ,\r\n \"2603:1040:c06:402::180/122\",\r\n \"2603:1040:d04:c02::80/122\"\ - ,\r\n \"2603:1040:f05:402::180/122\",\r\n \"2603:1040:1002:400::c0/122\"\ - ,\r\n \"2603:1040:1104:400::180/122\",\r\n \"2603:1050:6:402::180/122\"\ - ,\r\n \"2603:1050:403:400::2c0/122\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureConnectors.AustraliaCentral\",\r\ - \n \"id\": \"AzureConnectors.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.36.107.0/28\"\ - ,\r\n \"20.53.0.0/27\",\r\n \"20.53.52.64/27\",\r\n \ - \ \"20.53.52.96/28\",\r\n \"2603:1010:304:402::180/122\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.AustraliaCentral2\"\ - ,\r\n \"id\": \"AzureConnectors.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiacentral2\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\":\ - \ [\r\n \"20.36.114.176/28\",\r\n \"20.36.117.160/27\",\r\ - \n \"20.53.60.16/28\",\r\n \"20.53.60.32/27\",\r\n \ - \ \"2603:1010:404:402::180/122\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureConnectors.AustraliaEast\",\r\n \"id\"\ - : \"AzureConnectors.AustraliaEast\",\r\n \"serviceTagChangeNumber\":\ - \ \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.70.72.192/28\"\ - ,\r\n \"13.70.78.224/27\",\r\n \"13.72.243.10/32\",\r\n\ - \ \"20.70.220.192/27\",\r\n \"20.70.220.224/28\",\r\n \ - \ \"52.237.214.72/32\",\r\n \"2603:1010:6:402::180/122\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.AustraliaSoutheast\"\ - ,\r\n \"id\": \"AzureConnectors.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\":\ - \ [\r\n \"13.70.136.174/32\",\r\n \"13.77.50.240/28\",\r\ - \n \"13.77.55.160/27\",\r\n \"20.92.3.64/27\",\r\n \ - \ \"20.92.3.96/28\",\r\n \"52.255.48.202/32\",\r\n \"\ - 2603:1010:101:402::180/122\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"AzureConnectors.BrazilSouth\",\r\n \"id\": \"AzureConnectors.BrazilSouth\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"4\",\r\n \"region\": \"brazilsouth\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureConnectors\",\r\n\ - \ \"addressPrefixes\": [\r\n \"104.41.59.51/32\",\r\n \ - \ \"191.232.191.157/32\",\r\n \"191.233.203.192/28\",\r\n \ - \ \"191.233.207.160/27\",\r\n \"191.238.76.112/28\",\r\n \ - \ \"191.238.76.128/27\",\r\n \"2603:1050:6:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.BrazilSoutheast\"\ - ,\r\n \"id\": \"AzureConnectors.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.206.0.0/26\"\ - ,\r\n \"191.233.51.0/26\",\r\n \"2603:1050:403:400::2c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CanadaCentral\"\ - ,\r\n \"id\": \"AzureConnectors.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.71.170.208/28\"\ - ,\r\n \"13.71.175.160/27\",\r\n \"20.48.200.192/27\",\r\n\ - \ \"20.48.200.224/28\",\r\n \"52.237.24.126/32\",\r\n \ - \ \"52.237.32.212/32\",\r\n \"2603:1030:f05:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CanadaEast\"\ - ,\r\n \"id\": \"AzureConnectors.CanadaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"40.69.106.240/28\"\ - ,\r\n \"40.69.111.0/27\",\r\n \"52.139.111.0/27\",\r\n \ - \ \"52.139.111.32/28\",\r\n \"52.242.30.112/32\",\r\n \ - \ \"52.242.35.152/32\",\r\n \"2603:1030:1005:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CentralIndia\"\ - ,\r\n \"id\": \"AzureConnectors.CentralIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.43.123.0/27\"\ - ,\r\n \"20.192.168.64/27\",\r\n \"20.192.168.96/28\",\r\n\ - \ \"52.172.211.12/32\",\r\n \"52.172.212.129/32\",\r\n \ - \ \"104.211.81.192/28\",\r\n \"2603:1040:a06:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CentralUS\"\ - ,\r\n \"id\": \"AzureConnectors.CentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.89.171.80/28\"\ - ,\r\n \"13.89.178.64/27\",\r\n \"20.98.144.224/27\",\r\n\ - \ \"20.98.145.0/28\",\r\n \"52.173.241.27/32\",\r\n \ - \ \"52.173.245.164/32\",\r\n \"2603:1030:10:402::180/122\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CentralUSEUAP\"\ - ,\r\n \"id\": \"AzureConnectors.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.45.240.112/28\"\ - ,\r\n \"20.45.241.128/27\",\r\n \"40.78.202.96/28\",\r\n\ - \ \"168.61.140.0/27\",\r\n \"168.61.143.64/26\",\r\n \ - \ \"2603:1030:f:400::980/122\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureConnectors.EastAsia\",\r\n \"id\": \"\ - AzureConnectors.EastAsia\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureConnectors\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.75.36.64/28\",\r\n \ - \ \"13.75.110.131/32\",\r\n \"20.205.67.48/28\",\r\n \ - \ \"20.205.67.64/27\",\r\n \"52.175.23.169/32\",\r\n \ - \ \"104.214.164.0/27\",\r\n \"104.214.165.128/26\",\r\n \ - \ \"2603:1040:207:402::180/122\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureConnectors.EastUS\",\r\n \"id\": \"AzureConnectors.EastUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"4\",\r\n \"region\": \"eastus\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureConnectors\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.88.153.176/28\",\r\n \ - \ \"20.88.153.192/27\",\r\n \"40.71.11.80/28\",\r\n \"\ - 40.71.15.160/27\",\r\n \"40.71.249.139/32\",\r\n \"40.71.249.205/32\"\ - ,\r\n \"40.114.40.132/32\",\r\n \"2603:1030:210:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.EastUS2\"\ - ,\r\n \"id\": \"AzureConnectors.EastUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.98.192.80/28\"\ - ,\r\n \"20.98.192.96/27\",\r\n \"40.70.146.208/28\",\r\n\ - \ \"40.70.151.96/27\",\r\n \"52.225.129.144/32\",\r\n \ - \ \"52.232.188.154/32\",\r\n \"104.209.247.23/32\",\r\n \ - \ \"2603:1030:40c:402::180/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureConnectors.EastUS2EUAP\",\r\n \"id\"\ - : \"AzureConnectors.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.47.232.80/28\"\ - ,\r\n \"20.47.232.96/27\",\r\n \"40.74.146.64/28\",\r\n\ - \ \"52.138.92.192/27\",\r\n \"2603:1030:40b:400::980/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.FranceCentral\"\ - ,\r\n \"id\": \"AzureConnectors.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"40.79.130.208/28\"\ - ,\r\n \"40.79.148.96/27\",\r\n \"40.89.135.2/32\",\r\n \ - \ \"51.138.215.48/28\",\r\n \"51.138.215.64/27\",\r\n \ - \ \"2603:1020:805:402::180/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureConnectors.FranceSouth\",\r\n \"id\"\ - : \"AzureConnectors.FranceSouth\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"40.79.178.240/28\"\ - ,\r\n \"40.79.180.224/27\",\r\n \"52.136.133.184/32\",\r\ - \n \"52.136.142.154/32\",\r\n \"52.136.189.16/28\",\r\n\ - \ \"52.136.189.32/27\",\r\n \"2603:1020:905:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.GermanyNorth\"\ - ,\r\n \"id\": \"AzureConnectors.GermanyNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"51.116.55.240/28\"\ - ,\r\n \"51.116.59.16/28\",\r\n \"51.116.60.192/27\",\r\n\ - \ \"51.116.74.32/27\",\r\n \"51.116.211.212/32\",\r\n \ - \ \"2603:1020:d04:402::180/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureConnectors.GermanyWestCentral\",\r\n \ - \ \"id\": \"AzureConnectors.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.52.93.80/28\"\ - ,\r\n \"20.52.93.96/27\",\r\n \"51.116.155.80/28\",\r\n\ - \ \"51.116.158.96/27\",\r\n \"51.116.236.78/32\",\r\n \ - \ \"2603:1020:c04:402::180/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureConnectors.JapanEast\",\r\n \"id\"\ - : \"AzureConnectors.JapanEast\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.71.153.19/32\"\ - ,\r\n \"13.73.21.230/32\",\r\n \"13.78.108.0/28\",\r\n \ - \ \"20.89.11.48/28\",\r\n \"20.89.11.64/27\",\r\n \ - \ \"40.79.189.64/27\",\r\n \"2603:1040:407:402::180/122\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.JapanWest\"\ - ,\r\n \"id\": \"AzureConnectors.JapanWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.189.192.144/28\"\ - ,\r\n \"20.189.192.160/27\",\r\n \"40.74.100.224/28\",\r\ - \n \"40.80.180.64/27\",\r\n \"104.215.27.24/32\",\r\n \ - \ \"104.215.61.248/32\",\r\n \"2603:1040:606:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.JioIndiaCentral\"\ - ,\r\n \"id\": \"AzureConnectors.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.192.32.64/26\"\ - ,\r\n \"20.207.0.0/26\",\r\n \"2603:1040:1104:400::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.JioIndiaWest\"\ - ,\r\n \"id\": \"AzureConnectors.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.193.206.192/26\"\ - ,\r\n \"40.64.8.48/28\",\r\n \"40.64.8.128/27\",\r\n \ - \ \"2603:1040:d04:c02::80/122\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureConnectors.KoreaCentral\",\r\n \"id\"\ - : \"AzureConnectors.KoreaCentral\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.44.29.64/27\"\ - ,\r\n \"20.200.194.160/27\",\r\n \"20.200.194.192/28\",\r\ - \n \"52.141.1.104/32\",\r\n \"52.141.36.214/32\",\r\n \ - \ \"52.231.18.208/28\",\r\n \"2603:1040:f05:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.KoreaSouth\"\ - ,\r\n \"id\": \"AzureConnectors.KoreaSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"52.147.117.32/27\"\ - ,\r\n \"52.147.117.64/28\",\r\n \"52.231.147.0/28\",\r\n\ - \ \"52.231.148.224/27\",\r\n \"52.231.163.10/32\",\r\n \ - \ \"52.231.201.173/32\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"AzureConnectors.NorthCentralUS\",\r\n \"id\": \"\ - AzureConnectors.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.51.4.192/27\"\ - ,\r\n \"20.51.4.224/28\",\r\n \"52.162.107.160/28\",\r\n\ - \ \"52.162.111.192/27\",\r\n \"52.162.126.4/32\",\r\n \ - \ \"52.162.242.161/32\",\r\n \"2603:1030:608:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.NorthEurope\"\ - ,\r\n \"id\": \"AzureConnectors.NorthEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.69.227.208/28\"\ - ,\r\n \"13.69.231.192/27\",\r\n \"20.82.246.112/28\",\r\n\ - \ \"52.146.138.32/27\",\r\n \"52.178.150.68/32\",\r\n \ - \ \"94.245.91.93/32\",\r\n \"2603:1020:5:402::180/122\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.NorwayEast\"\ - ,\r\n \"id\": \"AzureConnectors.NorwayEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.100.0.96/27\"\ - ,\r\n \"20.100.0.128/28\",\r\n \"51.120.98.224/28\",\r\n\ - \ \"51.120.100.192/27\",\r\n \"2603:1020:e04:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.NorwayWest\"\ - ,\r\n \"id\": \"AzureConnectors.NorwayWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"51.13.139.160/27\"\ - ,\r\n \"51.13.139.192/28\",\r\n \"51.120.218.240/28\",\r\ - \n \"51.120.220.192/27\",\r\n \"2603:1020:f04:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SouthAfricaNorth\"\ - ,\r\n \"id\": \"AzureConnectors.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"102.37.166.80/28\"\ - ,\r\n \"102.37.166.96/27\",\r\n \"102.133.155.0/28\",\r\n\ - \ \"102.133.168.167/32\",\r\n \"102.133.253.0/27\",\r\n\ - \ \"2603:1000:104:402::180/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureConnectors.SouthAfricaWest\",\r\n \"\ - id\": \"AzureConnectors.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"102.37.64.0/27\"\ - ,\r\n \"102.37.84.128/27\",\r\n \"102.37.84.160/28\",\r\n\ - \ \"102.133.27.0/28\",\r\n \"102.133.72.85/32\",\r\n \ - \ \"2603:1000:4:402::180/122\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureConnectors.SouthCentralUS\",\r\n \"\ - id\": \"AzureConnectors.SouthCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.65.86.57/32\"\ - ,\r\n \"13.73.244.224/27\",\r\n \"20.97.33.48/28\",\r\n\ - \ \"20.97.33.64/27\",\r\n \"52.171.130.92/32\",\r\n \ - \ \"104.214.19.48/28\",\r\n \"104.214.70.191/32\",\r\n \ - \ \"2603:1030:807:402::180/122\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureConnectors.SouthCentralUSSTG\",\r\n \ - \ \"id\": \"AzureConnectors.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.44.3.0/28\"\ - ,\r\n \"23.100.208.0/27\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureConnectors.SoutheastAsia\",\r\n \"id\"\ - : \"AzureConnectors.SoutheastAsia\",\r\n \"serviceTagChangeNumber\":\ - \ \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.67.8.240/28\"\ - ,\r\n \"13.67.15.32/27\",\r\n \"20.195.82.240/28\",\r\n\ - \ \"20.195.83.0/27\",\r\n \"52.187.68.19/32\",\r\n \ - \ \"2603:1040:5:402::180/122\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureConnectors.SouthIndia\",\r\n \"id\":\ - \ \"AzureConnectors.SouthIndia\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.71.125.22/32\"\ - ,\r\n \"13.71.127.26/32\",\r\n \"20.192.152.64/27\",\r\n\ - \ \"20.192.152.96/28\",\r\n \"20.192.184.32/27\",\r\n \ - \ \"40.78.194.240/28\",\r\n \"52.172.80.0/26\",\r\n \ - \ \"2603:1040:c06:402::180/122\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureConnectors.SwedenCentral\",\r\n \"id\"\ - : \"AzureConnectors.SwedenCentral\",\r\n \"serviceTagChangeNumber\":\ - \ \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"51.12.29.112/28\"\ - ,\r\n \"51.12.72.128/27\",\r\n \"51.12.98.240/28\",\r\n\ - \ \"51.12.102.0/26\",\r\n \"2603:1020:1004:c02::80/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SwitzerlandNorth\"\ - ,\r\n \"id\": \"AzureConnectors.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"51.103.142.22/32\"\ - ,\r\n \"51.107.59.16/28\",\r\n \"51.107.60.224/27\",\r\n\ - \ \"51.107.86.217/32\",\r\n \"51.107.246.112/28\",\r\n \ - \ \"51.107.246.128/27\",\r\n \"2603:1020:a04:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SwitzerlandWest\"\ - ,\r\n \"id\": \"AzureConnectors.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"51.107.155.16/28\"\ - ,\r\n \"51.107.156.224/27\",\r\n \"51.107.254.32/27\",\r\ - \n \"51.107.254.64/28\",\r\n \"2603:1020:b04:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.UAECentral\"\ - ,\r\n \"id\": \"AzureConnectors.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.37.74.192/28\"\ - ,\r\n \"20.45.90.208/28\",\r\n \"20.45.90.224/27\",\r\n\ - \ \"40.120.8.0/27\",\r\n \"2603:1040:b04:402::180/122\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.UAENorth\"\ - ,\r\n \"id\": \"AzureConnectors.UAENorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"40.120.64.64/27\"\ - ,\r\n \"40.120.86.16/28\",\r\n \"40.120.86.32/27\",\r\n\ - \ \"65.52.250.208/28\",\r\n \"2603:1040:904:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.UKSouth\"\ - ,\r\n \"id\": \"AzureConnectors.UKSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.90.129.0/27\"\ - ,\r\n \"20.90.129.32/28\",\r\n \"51.105.77.96/27\",\r\n\ - \ \"51.140.61.124/32\",\r\n \"51.140.74.150/32\",\r\n \ - \ \"51.140.80.51/32\",\r\n \"51.140.148.0/28\",\r\n \ - \ \"2603:1020:705:402::180/122\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureConnectors.UKWest\",\r\n \"id\": \"\ - AzureConnectors.UKWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureConnectors\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.58.70.192/27\",\r\n\ - \ \"20.58.70.224/28\",\r\n \"51.140.211.0/28\",\r\n \ - \ \"51.140.212.224/27\",\r\n \"51.141.47.105/32\",\r\n \ - \ \"51.141.52.185/32\",\r\n \"51.141.124.13/32\",\r\n \ - \ \"2603:1020:605:402::180/122\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureConnectors.WestCentralUS\",\r\n \"id\"\ - : \"AzureConnectors.WestCentralUS\",\r\n \"serviceTagChangeNumber\":\ - \ \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.71.195.32/28\"\ - ,\r\n \"13.71.199.192/27\",\r\n \"13.78.132.82/32\",\r\n\ - \ \"20.69.4.0/27\",\r\n \"20.69.4.32/28\",\r\n \ - \ \"52.161.101.204/32\",\r\n \"52.161.102.22/32\",\r\n \"\ - 2603:1030:b04:402::180/122\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"AzureConnectors.WestEurope\",\r\n \"id\": \"AzureConnectors.WestEurope\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"5\",\r\n \"region\": \"westeurope\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureConnectors\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.69.64.208/28\",\r\n \ - \ \"13.69.71.192/27\",\r\n \"20.86.93.32/27\",\r\n \"20.86.93.64/28\"\ - ,\r\n \"40.91.208.65/32\",\r\n \"52.174.88.118/32\",\r\n\ - \ \"2603:1020:206:402::180/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureConnectors.WestIndia\",\r\n \"id\"\ - : \"AzureConnectors.WestIndia\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.38.128.224/27\"\ - ,\r\n \"20.192.82.48/28\",\r\n \"20.192.82.64/27\",\r\n\ - \ \"104.211.146.224/28\",\r\n \"104.211.189.124/32\",\r\n\ - \ \"104.211.189.218/32\",\r\n \"2603:1040:806:402::180/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.WestUS\"\ - ,\r\n \"id\": \"AzureConnectors.WestUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.86.223.32/27\"\ - ,\r\n \"13.93.148.62/32\",\r\n \"20.59.77.0/27\",\r\n \ - \ \"20.66.6.112/28\",\r\n \"40.112.195.87/32\",\r\n \ - \ \"40.112.243.160/28\",\r\n \"104.42.122.49/32\",\r\n \ - \ \"2603:1030:a07:402::100/122\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureConnectors.WestUS2\",\r\n \"id\": \"\ - AzureConnectors.WestUS2\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \"\ - region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureConnectors\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.140.128/28\",\r\n\ - \ \"13.66.145.96/27\",\r\n \"20.83.220.208/28\",\r\n \ - \ \"20.83.220.224/27\",\r\n \"52.183.78.157/32\",\r\n \ - \ \"2603:1030:c06:400::980/122\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureConnectors.WestUS3\",\r\n \"id\": \"\ - AzureConnectors.WestUS3\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"\ - region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureConnectors\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.150.129.176/28\",\r\n\ - \ \"20.150.129.192/27\",\r\n \"20.150.170.240/28\",\r\n\ - \ \"20.150.173.64/26\",\r\n \"2603:1030:504:c02::80/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry\"\ - ,\r\n \"id\": \"AzureContainerRegistry\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"8\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\",\r\n \"VSE\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.66.140.72/29\",\r\n \"13.66.146.0/24\",\r\n \"\ - 13.66.147.0/25\",\r\n \"13.66.148.0/24\",\r\n \"13.67.8.120/29\"\ - ,\r\n \"13.67.14.0/24\",\r\n \"13.69.64.88/29\",\r\n \ - \ \"13.69.106.80/29\",\r\n \"13.69.110.0/24\",\r\n \ - \ \"13.69.112.192/26\",\r\n \"13.69.227.88/29\",\r\n \"\ - 13.69.236.0/23\",\r\n \"13.69.238.0/24\",\r\n \"13.70.72.136/29\"\ - ,\r\n \"13.70.78.0/25\",\r\n \"13.70.114.192/26\",\r\n \ - \ \"13.71.170.56/29\",\r\n \"13.71.176.0/24\",\r\n \ - \ \"13.71.194.224/29\",\r\n \"13.73.245.64/26\",\r\n \ - \ \"13.73.245.128/25\",\r\n \"13.73.255.64/26\",\r\n \"\ - 13.74.107.80/29\",\r\n \"13.74.110.0/24\",\r\n \"13.75.36.0/29\"\ - ,\r\n \"13.77.50.80/29\",\r\n \"13.78.106.200/29\",\r\n\ - \ \"13.78.111.0/25\",\r\n \"13.87.56.96/29\",\r\n \ - \ \"13.87.122.96/29\",\r\n \"13.89.170.216/29\",\r\n \ - \ \"13.89.175.0/25\",\r\n \"13.89.178.192/26\",\r\n \"20.21.36.0/26\"\ - ,\r\n \"20.21.42.128/26\",\r\n \"20.21.44.128/25\",\r\n\ - \ \"20.21.46.192/26\",\r\n \"20.21.66.128/26\",\r\n \ - \ \"20.21.69.0/25\",\r\n \"20.21.74.128/26\",\r\n \"\ - 20.21.77.0/25\",\r\n \"20.37.69.0/26\",\r\n \"20.37.74.72/29\"\ - ,\r\n \"20.38.132.192/26\",\r\n \"20.38.140.192/26\",\r\n\ - \ \"20.38.146.144/29\",\r\n \"20.38.149.0/25\",\r\n \ - \ \"20.39.15.128/25\",\r\n \"20.40.224.64/26\",\r\n \ - \ \"20.41.69.128/26\",\r\n \"20.41.199.192/26\",\r\n \"\ - 20.41.208.64/26\",\r\n \"20.42.66.0/23\",\r\n \"20.42.74.64/26\"\ - ,\r\n \"20.43.46.64/26\",\r\n \"20.43.121.128/26\",\r\n\ - \ \"20.43.123.64/26\",\r\n \"20.43.127.0/25\",\r\n \ - \ \"20.44.2.24/29\",\r\n \"20.44.11.0/25\",\r\n \"20.44.11.128/26\"\ - ,\r\n \"20.44.12.0/25\",\r\n \"20.44.19.64/26\",\r\n \ - \ \"20.44.22.0/23\",\r\n \"20.44.26.144/29\",\r\n \ - \ \"20.44.29.128/25\",\r\n \"20.45.122.144/29\",\r\n \"\ - 20.45.125.0/25\",\r\n \"20.45.199.128/25\",\r\n \"20.48.192.128/26\"\ - ,\r\n \"20.49.82.16/29\",\r\n \"20.49.84.64/26\",\r\n \ - \ \"20.49.86.0/25\",\r\n \"20.49.90.16/29\",\r\n \ - \ \"20.49.92.0/24\",\r\n \"20.49.93.0/26\",\r\n \"20.49.102.128/26\"\ - ,\r\n \"20.49.115.0/26\",\r\n \"20.49.127.0/26\",\r\n \ - \ \"20.50.72.128/26\",\r\n \"20.50.200.0/24\",\r\n \ - \ \"20.52.72.128/26\",\r\n \"20.52.88.64/26\",\r\n \"\ - 20.53.0.192/26\",\r\n \"20.53.1.0/26\",\r\n \"20.53.41.128/26\"\ - ,\r\n \"20.61.97.128/25\",\r\n \"20.62.128.0/26\",\r\n \ - \ \"20.65.0.0/24\",\r\n \"20.72.18.128/26\",\r\n \ - \ \"20.72.26.128/26\",\r\n \"20.72.30.0/25\",\r\n \"20.83.192.64/26\"\ - ,\r\n \"20.89.0.192/26\",\r\n \"20.99.8.192/26\",\r\n \ - \ \"20.135.26.64/26\",\r\n \"20.150.170.24/29\",\r\n \ - \ \"20.150.173.128/26\",\r\n \"20.150.174.0/25\",\r\n \ - \ \"20.150.175.128/26\",\r\n \"20.150.178.144/29\",\r\n \ - \ \"20.150.181.192/26\",\r\n \"20.150.182.128/25\",\r\n \ - \ \"20.150.186.144/29\",\r\n \"20.150.189.192/26\",\r\n \ - \ \"20.150.190.128/25\",\r\n \"20.150.225.64/26\",\r\n \ - \ \"20.150.241.0/26\",\r\n \"20.187.196.64/26\",\r\n \"\ - 20.189.169.0/24\",\r\n \"20.189.171.128/25\",\r\n \"20.189.224.0/26\"\ - ,\r\n \"20.191.160.128/26\",\r\n \"20.192.32.0/26\",\r\n\ - \ \"20.192.33.0/26\",\r\n \"20.192.33.128/25\",\r\n \ - \ \"20.192.50.0/26\",\r\n \"20.192.98.144/29\",\r\n \ - \ \"20.192.101.64/26\",\r\n \"20.192.101.128/26\",\r\n \ - \ \"20.192.234.24/29\",\r\n \"20.192.236.0/26\",\r\n \"\ - 20.193.96.64/26\",\r\n \"20.193.96.128/26\",\r\n \"20.193.160.64/26\"\ - ,\r\n \"20.193.192.128/26\",\r\n \"20.193.202.16/29\",\r\ - \n \"20.193.204.128/26\",\r\n \"20.193.205.0/25\",\r\n \ - \ \"20.193.206.64/26\",\r\n \"20.194.66.16/29\",\r\n \ - \ \"20.194.68.0/25\",\r\n \"20.194.70.0/25\",\r\n \"\ - 20.194.80.128/26\",\r\n \"20.194.81.0/25\",\r\n \"20.194.81.128/26\"\ - ,\r\n \"20.194.128.0/25\",\r\n \"20.195.64.128/26\",\r\n\ - \ \"20.195.136.0/24\",\r\n \"20.195.137.0/25\",\r\n \ - \ \"20.195.152.192/26\",\r\n \"20.195.153.128/25\",\r\n \ - \ \"20.205.74.128/26\",\r\n \"20.205.77.0/25\",\r\n \ - \ \"20.205.82.128/26\",\r\n \"20.205.85.0/25\",\r\n \"\ - 20.208.18.128/26\",\r\n \"20.208.21.0/25\",\r\n \"23.98.82.112/29\"\ - ,\r\n \"23.98.86.128/25\",\r\n \"23.98.87.0/25\",\r\n \ - \ \"23.98.112.0/25\",\r\n \"40.64.112.0/24\",\r\n \ - \ \"40.64.113.128/26\",\r\n \"40.64.135.128/25\",\r\n \"\ - 40.67.58.24/29\",\r\n \"40.67.121.0/25\",\r\n \"40.67.122.128/26\"\ - ,\r\n \"40.69.106.80/29\",\r\n \"40.69.110.0/25\",\r\n \ - \ \"40.69.116.0/26\",\r\n \"40.70.146.88/29\",\r\n \ - \ \"40.70.150.0/24\",\r\n \"40.71.10.216/29\",\r\n \"\ - 40.74.100.160/29\",\r\n \"40.74.146.48/29\",\r\n \"40.74.149.128/25\"\ - ,\r\n \"40.74.151.64/26\",\r\n \"40.75.34.32/29\",\r\n \ - \ \"40.78.194.80/29\",\r\n \"40.78.196.192/26\",\r\n \ - \ \"40.78.202.72/29\",\r\n \"40.78.226.208/29\",\r\n \ - \ \"40.78.231.0/24\",\r\n \"40.78.234.48/29\",\r\n \"\ - 40.78.239.128/25\",\r\n \"40.78.242.160/29\",\r\n \"40.78.246.0/24\"\ - ,\r\n \"40.78.250.96/29\",\r\n \"40.79.130.56/29\",\r\n\ - \ \"40.79.132.192/26\",\r\n \"40.79.138.32/29\",\r\n \ - \ \"40.79.141.0/25\",\r\n \"40.79.143.128/25\",\r\n \ - \ \"40.79.146.32/29\",\r\n \"40.79.148.128/25\",\r\n \"\ - 40.79.150.128/25\",\r\n \"40.79.154.104/29\",\r\n \"40.79.162.32/29\"\ - ,\r\n \"40.79.165.128/25\",\r\n \"40.79.166.0/25\",\r\n\ - \ \"40.79.170.0/29\",\r\n \"40.79.173.128/25\",\r\n \ - \ \"40.79.174.0/25\",\r\n \"40.79.178.80/29\",\r\n \ - \ \"40.79.186.8/29\",\r\n \"40.79.189.128/25\",\r\n \"40.79.190.0/25\"\ - ,\r\n \"40.79.194.96/29\",\r\n \"40.79.197.128/25\",\r\n\ - \ \"40.80.50.144/29\",\r\n \"40.80.51.192/26\",\r\n \ - \ \"40.80.53.64/26\",\r\n \"40.80.54.128/25\",\r\n \ - \ \"40.80.176.128/25\",\r\n \"40.80.181.0/26\",\r\n \"40.89.23.64/26\"\ - ,\r\n \"40.89.120.0/24\",\r\n \"40.89.121.0/25\",\r\n \ - \ \"40.112.242.160/29\",\r\n \"40.120.8.64/26\",\r\n \ - \ \"40.120.9.0/26\",\r\n \"40.120.66.0/25\",\r\n \"\ - 40.120.74.16/29\",\r\n \"40.120.77.0/25\",\r\n \"40.124.64.0/25\"\ - ,\r\n \"51.11.97.128/26\",\r\n \"51.11.193.0/26\",\r\n \ - \ \"51.11.193.128/25\",\r\n \"51.12.25.64/26\",\r\n \ - \ \"51.12.32.0/25\",\r\n \"51.12.32.128/26\",\r\n \"\ - 51.12.98.24/29\",\r\n \"51.12.100.192/26\",\r\n \"51.12.101.0/26\"\ - ,\r\n \"51.12.168.128/26\",\r\n \"51.12.199.192/26\",\r\n\ - \ \"51.12.202.24/29\",\r\n \"51.12.205.128/26\",\r\n \ - \ \"51.12.206.128/25\",\r\n \"51.12.226.144/29\",\r\n \ - \ \"51.12.229.128/26\",\r\n \"51.12.230.0/25\",\r\n \ - \ \"51.12.234.144/29\",\r\n \"51.12.237.128/26\",\r\n \"\ - 51.12.238.0/25\",\r\n \"51.13.0.0/25\",\r\n \"51.13.1.64/26\"\ - ,\r\n \"51.13.128.128/25\",\r\n \"51.13.129.0/26\",\r\n\ - \ \"51.103.202.128/26\",\r\n \"51.103.205.0/25\",\r\n \ - \ \"51.104.9.128/25\",\r\n \"51.105.66.144/29\",\r\n \ - \ \"51.105.69.128/25\",\r\n \"51.105.70.0/25\",\r\n \ - \ \"51.105.74.144/29\",\r\n \"51.105.77.128/25\",\r\n \"\ - 51.107.53.64/26\",\r\n \"51.107.56.192/26\",\r\n \"51.107.58.24/29\"\ - ,\r\n \"51.107.148.128/26\",\r\n \"51.107.152.192/26\",\r\ - \n \"51.107.154.24/29\",\r\n \"51.107.192.0/26\",\r\n \ - \ \"51.116.58.24/29\",\r\n \"51.116.154.88/29\",\r\n \ - \ \"51.116.158.128/25\",\r\n \"51.116.242.144/29\",\r\n \ - \ \"51.116.250.144/29\",\r\n \"51.116.254.64/26\",\r\n \ - \ \"51.116.254.128/25\",\r\n \"51.120.98.160/29\",\r\n \ - \ \"51.120.106.144/29\",\r\n \"51.120.109.128/26\",\r\n \ - \ \"51.120.110.0/25\",\r\n \"51.120.210.144/29\",\r\n \ - \ \"51.120.213.128/25\",\r\n \"51.120.214.0/26\",\r\n \"\ - 51.120.218.24/29\",\r\n \"51.120.234.0/26\",\r\n \"51.132.192.0/25\"\ - ,\r\n \"51.137.166.192/26\",\r\n \"51.138.160.128/26\",\r\ - \n \"51.140.146.200/29\",\r\n \"51.140.151.64/26\",\r\n\ - \ \"51.140.210.192/29\",\r\n \"51.140.215.0/25\",\r\n \ - \ \"51.143.208.0/26\",\r\n \"52.138.90.32/29\",\r\n \ - \ \"52.138.93.0/24\",\r\n \"52.138.226.80/29\",\r\n \"\ - 52.138.230.0/23\",\r\n \"52.140.110.192/26\",\r\n \"52.146.131.128/26\"\ - ,\r\n \"52.147.97.128/25\",\r\n \"52.150.156.64/26\",\r\n\ - \ \"52.162.104.192/26\",\r\n \"52.162.106.160/29\",\r\n\ - \ \"52.167.106.80/29\",\r\n \"52.167.110.0/24\",\r\n \ - \ \"52.167.111.0/26\",\r\n \"52.168.112.192/26\",\r\n \ - \ \"52.168.114.0/23\",\r\n \"52.178.18.0/23\",\r\n \"\ - 52.178.20.0/24\",\r\n \"52.182.138.208/29\",\r\n \"52.182.142.0/24\"\ - ,\r\n \"52.231.18.56/29\",\r\n \"52.231.20.128/26\",\r\n\ - \ \"52.231.146.192/29\",\r\n \"52.236.186.80/29\",\r\n \ - \ \"52.236.191.0/24\",\r\n \"52.240.241.128/25\",\r\n \ - \ \"52.240.244.0/25\",\r\n \"52.246.154.144/29\",\r\n \ - \ \"52.246.157.128/25\",\r\n \"52.246.158.0/25\",\r\n \ - \ \"65.52.248.192/26\",\r\n \"65.52.250.16/29\",\r\n \"\ - 102.37.65.64/26\",\r\n \"102.37.72.128/26\",\r\n \"102.133.26.24/29\"\ - ,\r\n \"102.133.122.144/29\",\r\n \"102.133.124.192/26\"\ - ,\r\n \"102.133.126.0/26\",\r\n \"102.133.154.24/29\",\r\ - \n \"102.133.156.192/26\",\r\n \"102.133.220.64/26\",\r\n\ - \ \"102.133.250.144/29\",\r\n \"102.133.253.64/26\",\r\n\ - \ \"102.133.253.128/26\",\r\n \"104.46.161.128/25\",\r\n\ - \ \"104.46.162.128/26\",\r\n \"104.46.177.128/26\",\r\n\ - \ \"104.208.16.80/29\",\r\n \"104.208.144.80/29\",\r\n \ - \ \"104.211.81.136/29\",\r\n \"104.211.146.80/29\",\r\n \ - \ \"104.214.18.184/29\",\r\n \"104.214.161.128/25\",\r\n\ - \ \"104.214.165.0/26\",\r\n \"168.61.140.128/25\",\r\n \ - \ \"168.61.141.0/24\",\r\n \"168.61.142.192/26\",\r\n \ - \ \"191.233.50.16/29\",\r\n \"191.233.54.64/26\",\r\n \ - \ \"191.233.54.128/26\",\r\n \"191.233.203.136/29\",\r\n \ - \ \"191.233.205.192/26\",\r\n \"191.234.139.0/26\",\r\n \ - \ \"191.234.146.144/29\",\r\n \"191.234.149.64/26\",\r\n \ - \ \"191.234.150.0/26\",\r\n \"191.234.151.0/25\",\r\n \ - \ \"191.234.154.144/29\",\r\n \"191.234.157.192/26\",\r\n \ - \ \"2603:1000:4:402::90/125\",\r\n \"2603:1000:4:402::340/122\"\ - ,\r\n \"2603:1000:4:402::580/122\",\r\n \"2603:1000:104:402::90/125\"\ - ,\r\n \"2603:1000:104:402::340/122\",\r\n \"2603:1000:104:402::580/121\"\ - ,\r\n \"2603:1000:104:802::90/125\",\r\n \"2603:1000:104:802::2c0/122\"\ - ,\r\n \"2603:1000:104:802::400/121\",\r\n \"2603:1000:104:c02::90/125\"\ - ,\r\n \"2603:1000:104:c02::400/121\",\r\n \"2603:1010:6:402::90/125\"\ - ,\r\n \"2603:1010:6:402::340/122\",\r\n \"2603:1010:6:402::580/121\"\ - ,\r\n \"2603:1010:6:802::90/125\",\r\n \"2603:1010:6:802::2c0/122\"\ - ,\r\n \"2603:1010:6:802::400/121\",\r\n \"2603:1010:6:c02::90/125\"\ - ,\r\n \"2603:1010:6:c02::400/121\",\r\n \"2603:1010:101:402::90/125\"\ - ,\r\n \"2603:1010:101:402::340/122\",\r\n \"2603:1010:101:402::580/122\"\ - ,\r\n \"2603:1010:304:402::90/125\",\r\n \"2603:1010:304:402::340/122\"\ - ,\r\n \"2603:1010:304:402::580/122\",\r\n \"2603:1010:404:402::90/125\"\ - ,\r\n \"2603:1010:404:402::340/122\",\r\n \"2603:1010:404:402::580/122\"\ - ,\r\n \"2603:1020:5:402::90/125\",\r\n \"2603:1020:5:402::340/122\"\ - ,\r\n \"2603:1020:5:402::580/121\",\r\n \"2603:1020:5:802::90/125\"\ - ,\r\n \"2603:1020:5:802::2c0/122\",\r\n \"2603:1020:5:802::400/121\"\ - ,\r\n \"2603:1020:5:c02::90/125\",\r\n \"2603:1020:5:c02::400/121\"\ - ,\r\n \"2603:1020:206:402::90/125\",\r\n \"2603:1020:206:402::340/122\"\ - ,\r\n \"2603:1020:206:402::580/121\",\r\n \"2603:1020:206:802::90/125\"\ - ,\r\n \"2603:1020:206:802::2c0/122\",\r\n \"2603:1020:206:802::400/121\"\ - ,\r\n \"2603:1020:206:c02::90/125\",\r\n \"2603:1020:206:c02::400/121\"\ - ,\r\n \"2603:1020:305:402::90/125\",\r\n \"2603:1020:305:402::340/122\"\ - ,\r\n \"2603:1020:405:402::90/125\",\r\n \"2603:1020:405:402::340/122\"\ - ,\r\n \"2603:1020:605:402::90/125\",\r\n \"2603:1020:605:402::340/122\"\ - ,\r\n \"2603:1020:605:402::580/122\",\r\n \"2603:1020:705:402::90/125\"\ - ,\r\n \"2603:1020:705:402::340/122\",\r\n \"2603:1020:705:402::580/121\"\ - ,\r\n \"2603:1020:705:802::90/125\",\r\n \"2603:1020:705:802::2c0/122\"\ - ,\r\n \"2603:1020:705:802::400/121\",\r\n \"2603:1020:705:c02::90/125\"\ - ,\r\n \"2603:1020:705:c02::400/121\",\r\n \"2603:1020:805:402::90/125\"\ - ,\r\n \"2603:1020:805:402::340/122\",\r\n \"2603:1020:805:402::580/121\"\ - ,\r\n \"2603:1020:805:802::90/125\",\r\n \"2603:1020:805:802::2c0/122\"\ - ,\r\n \"2603:1020:805:802::400/121\",\r\n \"2603:1020:805:c02::90/125\"\ - ,\r\n \"2603:1020:805:c02::400/121\",\r\n \"2603:1020:905:402::90/125\"\ - ,\r\n \"2603:1020:905:402::340/122\",\r\n \"2603:1020:905:402::580/122\"\ - ,\r\n \"2603:1020:a04::348/125\",\r\n \"2603:1020:a04:402::90/125\"\ - ,\r\n \"2603:1020:a04:402::340/122\",\r\n \"2603:1020:a04:402::580/121\"\ - ,\r\n \"2603:1020:a04:802::90/125\",\r\n \"2603:1020:a04:802::2c0/122\"\ - ,\r\n \"2603:1020:a04:802::400/121\",\r\n \"2603:1020:a04:c02::90/125\"\ - ,\r\n \"2603:1020:a04:c02::400/121\",\r\n \"2603:1020:b04:402::90/125\"\ - ,\r\n \"2603:1020:b04:402::340/122\",\r\n \"2603:1020:b04:402::580/122\"\ - ,\r\n \"2603:1020:c04:402::90/125\",\r\n \"2603:1020:c04:402::340/122\"\ - ,\r\n \"2603:1020:c04:402::580/121\",\r\n \"2603:1020:c04:802::90/125\"\ - ,\r\n \"2603:1020:c04:802::2c0/122\",\r\n \"2603:1020:c04:802::400/121\"\ - ,\r\n \"2603:1020:c04:c02::90/125\",\r\n \"2603:1020:c04:c02::400/121\"\ - ,\r\n \"2603:1020:d04:402::90/125\",\r\n \"2603:1020:d04:402::340/122\"\ - ,\r\n \"2603:1020:d04:402::580/122\",\r\n \"2603:1020:e04::348/125\"\ - ,\r\n \"2603:1020:e04:402::90/125\",\r\n \"2603:1020:e04:402::340/122\"\ - ,\r\n \"2603:1020:e04:402::580/121\",\r\n \"2603:1020:e04:402::600/120\"\ - ,\r\n \"2603:1020:e04:802::90/125\",\r\n \"2603:1020:e04:802::2c0/122\"\ - ,\r\n \"2603:1020:e04:802::400/121\",\r\n \"2603:1020:e04:c02::90/125\"\ - ,\r\n \"2603:1020:e04:c02::400/121\",\r\n \"2603:1020:f04:402::90/125\"\ - ,\r\n \"2603:1020:f04:402::340/122\",\r\n \"2603:1020:f04:402::580/122\"\ - ,\r\n \"2603:1020:1004:1::1a0/125\",\r\n \"2603:1020:1004:400::90/125\"\ - ,\r\n \"2603:1020:1004:400::3b8/125\",\r\n \"2603:1020:1004:400::4c0/122\"\ - ,\r\n \"2603:1020:1004:400::500/121\",\r\n \"2603:1020:1004:800::150/125\"\ - ,\r\n \"2603:1020:1004:800::180/121\",\r\n \"2603:1020:1004:800::280/121\"\ - ,\r\n \"2603:1020:1004:c02::1b0/125\",\r\n \"2603:1020:1004:c02::300/121\"\ - ,\r\n \"2603:1020:1104::5a0/125\",\r\n \"2603:1020:1104:400::90/125\"\ - ,\r\n \"2603:1020:1104:400::380/121\",\r\n \"2603:1020:1104:400::540/122\"\ - ,\r\n \"2603:1030:f:1::2a8/125\",\r\n \"2603:1030:f:400::890/125\"\ - ,\r\n \"2603:1030:f:400::b40/122\",\r\n \"2603:1030:f:400::d80/122\"\ - ,\r\n \"2603:1030:f:400::e00/121\",\r\n \"2603:1030:10:402::90/125\"\ - ,\r\n \"2603:1030:10:402::340/122\",\r\n \"2603:1030:10:402::580/121\"\ - ,\r\n \"2603:1030:10:802::90/125\",\r\n \"2603:1030:10:802::2c0/122\"\ - ,\r\n \"2603:1030:10:802::400/121\",\r\n \"2603:1030:10:c02::90/125\"\ - ,\r\n \"2603:1030:10:c02::400/121\",\r\n \"2603:1030:104::348/125\"\ - ,\r\n \"2603:1030:104:402::90/125\",\r\n \"2603:1030:104:402::168/125\"\ - ,\r\n \"2603:1030:104:402::340/122\",\r\n \"2603:1030:104:402::580/122\"\ - ,\r\n \"2603:1030:104:402::780/121\",\r\n \"2603:1030:104:802::58/125\"\ - ,\r\n \"2603:1030:104:802::200/121\",\r\n \"2603:1030:107::580/125\"\ - ,\r\n \"2603:1030:107:400::18/125\",\r\n \"2603:1030:107:400::300/121\"\ - ,\r\n \"2603:1030:107:400::500/122\",\r\n \"2603:1030:210:402::90/125\"\ - ,\r\n \"2603:1030:210:402::340/122\",\r\n \"2603:1030:210:402::580/121\"\ - ,\r\n \"2603:1030:210:802::90/125\",\r\n \"2603:1030:210:802::2c0/122\"\ - ,\r\n \"2603:1030:210:802::400/121\",\r\n \"2603:1030:210:c02::90/125\"\ - ,\r\n \"2603:1030:210:c02::400/121\",\r\n \"2603:1030:302:402::c0/122\"\ - ,\r\n \"2603:1030:40b:400::890/125\",\r\n \"2603:1030:40b:400::b40/122\"\ - ,\r\n \"2603:1030:40b:800::90/125\",\r\n \"2603:1030:40b:800::2c0/122\"\ - ,\r\n \"2603:1030:40b:c00::90/125\",\r\n \"2603:1030:40b:c00::400/121\"\ - ,\r\n \"2603:1030:40c:402::90/125\",\r\n \"2603:1030:40c:402::340/122\"\ - ,\r\n \"2603:1030:40c:402::580/121\",\r\n \"2603:1030:40c:802::90/125\"\ - ,\r\n \"2603:1030:40c:802::2c0/122\",\r\n \"2603:1030:40c:802::400/121\"\ - ,\r\n \"2603:1030:40c:c02::90/125\",\r\n \"2603:1030:504::1a0/125\"\ - ,\r\n \"2603:1030:504:402::90/125\",\r\n \"2603:1030:504:402::3b8/125\"\ - ,\r\n \"2603:1030:504:402::480/121\",\r\n \"2603:1030:504:802::c0/125\"\ - ,\r\n \"2603:1030:504:802::150/125\",\r\n \"2603:1030:504:802::180/121\"\ - ,\r\n \"2603:1030:504:c02::140/122\",\r\n \"2603:1030:504:c02::300/121\"\ - ,\r\n \"2603:1030:504:c02::400/125\",\r\n \"2603:1030:608:402::90/125\"\ - ,\r\n \"2603:1030:608:402::340/122\",\r\n \"2603:1030:608:402::580/122\"\ - ,\r\n \"2603:1030:807:402::90/125\",\r\n \"2603:1030:807:402::340/122\"\ - ,\r\n \"2603:1030:807:402::580/121\",\r\n \"2603:1030:807:802::90/125\"\ - ,\r\n \"2603:1030:807:802::2c0/122\",\r\n \"2603:1030:807:802::400/121\"\ - ,\r\n \"2603:1030:807:c02::90/125\",\r\n \"2603:1030:807:c02::400/121\"\ - ,\r\n \"2603:1030:a07:402::90/125\",\r\n \"2603:1030:a07:402::9c0/122\"\ - ,\r\n \"2603:1030:a07:402::a00/122\",\r\n \"2603:1030:b04:402::90/125\"\ - ,\r\n \"2603:1030:b04:402::340/122\",\r\n \"2603:1030:b04:402::580/122\"\ - ,\r\n \"2603:1030:c06:400::890/125\",\r\n \"2603:1030:c06:400::b40/122\"\ - ,\r\n \"2603:1030:c06:802::90/125\",\r\n \"2603:1030:c06:802::2c0/122\"\ - ,\r\n \"2603:1030:c06:c02::90/125\",\r\n \"2603:1030:c06:c02::400/121\"\ - ,\r\n \"2603:1030:f05:402::90/125\",\r\n \"2603:1030:f05:402::340/122\"\ - ,\r\n \"2603:1030:f05:402::580/121\",\r\n \"2603:1030:f05:802::90/125\"\ - ,\r\n \"2603:1030:f05:802::2c0/122\",\r\n \"2603:1030:f05:802::400/121\"\ - ,\r\n \"2603:1030:f05:c02::90/125\",\r\n \"2603:1030:f05:c02::400/121\"\ - ,\r\n \"2603:1030:1005:402::90/125\",\r\n \"2603:1030:1005:402::340/122\"\ - ,\r\n \"2603:1030:1005:402::580/122\",\r\n \"2603:1040:5:402::90/125\"\ - ,\r\n \"2603:1040:5:402::340/122\",\r\n \"2603:1040:5:402::580/121\"\ - ,\r\n \"2603:1040:5:802::90/125\",\r\n \"2603:1040:5:802::2c0/122\"\ - ,\r\n \"2603:1040:5:802::400/121\",\r\n \"2603:1040:5:c02::90/125\"\ - ,\r\n \"2603:1040:5:c02::400/121\",\r\n \"2603:1040:207::2a8/125\"\ - ,\r\n \"2603:1040:207:402::90/125\",\r\n \"2603:1040:207:402::340/122\"\ - ,\r\n \"2603:1040:207:402::580/122\",\r\n \"2603:1040:207:402::600/121\"\ - ,\r\n \"2603:1040:207:800::48/125\",\r\n \"2603:1040:207:800::180/121\"\ - ,\r\n \"2603:1040:207:c00::48/125\",\r\n \"2603:1040:207:c00::180/121\"\ - ,\r\n \"2603:1040:407:402::90/125\",\r\n \"2603:1040:407:402::340/122\"\ - ,\r\n \"2603:1040:407:402::580/121\",\r\n \"2603:1040:407:802::90/125\"\ - ,\r\n \"2603:1040:407:802::2c0/122\",\r\n \"2603:1040:407:802::400/121\"\ - ,\r\n \"2603:1040:407:c02::90/125\",\r\n \"2603:1040:407:c02::400/121\"\ - ,\r\n \"2603:1040:606:402::90/125\",\r\n \"2603:1040:606:402::340/122\"\ - ,\r\n \"2603:1040:606:402::580/122\",\r\n \"2603:1040:806:402::90/125\"\ - ,\r\n \"2603:1040:806:402::340/122\",\r\n \"2603:1040:806:402::580/122\"\ - ,\r\n \"2603:1040:904:402::90/125\",\r\n \"2603:1040:904:402::340/122\"\ - ,\r\n \"2603:1040:904:402::580/121\",\r\n \"2603:1040:904:802::90/125\"\ - ,\r\n \"2603:1040:904:802::2c0/122\",\r\n \"2603:1040:904:802::400/121\"\ - ,\r\n \"2603:1040:904:c02::90/125\",\r\n \"2603:1040:a06::448/125\"\ - ,\r\n \"2603:1040:a06:402::90/125\",\r\n \"2603:1040:a06:402::340/122\"\ - ,\r\n \"2603:1040:a06:402::580/121\",\r\n \"2603:1040:a06:802::90/125\"\ - ,\r\n \"2603:1040:a06:802::2c0/122\",\r\n \"2603:1040:a06:802::400/121\"\ - ,\r\n \"2603:1040:a06:c02::90/125\",\r\n \"2603:1040:a06:c02::400/121\"\ - ,\r\n \"2603:1040:b04:402::90/125\",\r\n \"2603:1040:b04:402::340/122\"\ - ,\r\n \"2603:1040:b04:402::580/122\",\r\n \"2603:1040:c06:402::90/125\"\ - ,\r\n \"2603:1040:c06:402::340/122\",\r\n \"2603:1040:c06:402::580/122\"\ - ,\r\n \"2603:1040:d04:1::1a0/125\",\r\n \"2603:1040:d04:400::90/125\"\ - ,\r\n \"2603:1040:d04:400::3b8/125\",\r\n \"2603:1040:d04:400::4c0/122\"\ - ,\r\n \"2603:1040:d04:400::500/121\",\r\n \"2603:1040:d04:800::150/125\"\ - ,\r\n \"2603:1040:d04:800::180/121\",\r\n \"2603:1040:d04:800::280/121\"\ - ,\r\n \"2603:1040:d04:c02::300/121\",\r\n \"2603:1040:e05:402::100/122\"\ - ,\r\n \"2603:1040:f05::348/125\",\r\n \"2603:1040:f05:402::90/125\"\ - ,\r\n \"2603:1040:f05:402::340/122\",\r\n \"2603:1040:f05:402::580/121\"\ - ,\r\n \"2603:1040:f05:402::600/120\",\r\n \"2603:1040:f05:402::700/121\"\ - ,\r\n \"2603:1040:f05:802::90/125\",\r\n \"2603:1040:f05:802::2c0/122\"\ - ,\r\n \"2603:1040:f05:802::400/121\",\r\n \"2603:1040:f05:c02::90/125\"\ - ,\r\n \"2603:1040:f05:c02::400/121\",\r\n \"2603:1040:1002::780/125\"\ - ,\r\n \"2603:1040:1002:400::48/125\",\r\n \"2603:1040:1002:400::280/121\"\ - ,\r\n \"2603:1040:1002:800::48/125\",\r\n \"2603:1040:1002:800::180/121\"\ - ,\r\n \"2603:1040:1002:c00::48/125\",\r\n \"2603:1040:1002:c00::180/121\"\ - ,\r\n \"2603:1040:1104::5a0/125\",\r\n \"2603:1040:1104:400::90/125\"\ - ,\r\n \"2603:1040:1104:400::380/121\",\r\n \"2603:1040:1104:400::480/122\"\ - ,\r\n \"2603:1050:6:402::90/125\",\r\n \"2603:1050:6:402::340/122\"\ - ,\r\n \"2603:1050:6:402::500/121\",\r\n \"2603:1050:6:802::90/125\"\ - ,\r\n \"2603:1050:6:802::2c0/122\",\r\n \"2603:1050:6:802::400/121\"\ - ,\r\n \"2603:1050:6:c02::90/125\",\r\n \"2603:1050:6:c02::400/121\"\ - ,\r\n \"2603:1050:403:400::98/125\",\r\n \"2603:1050:403:400::480/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.AustraliaEast\"\ - ,\r\n \"id\": \"AzureContainerRegistry.AustraliaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.70.72.136/29\",\r\n \"13.70.78.0/25\",\r\n \"\ - 13.70.114.192/26\",\r\n \"20.53.41.128/26\",\r\n \"40.79.162.32/29\"\ - ,\r\n \"40.79.165.128/25\",\r\n \"40.79.166.0/25\",\r\n\ - \ \"40.79.170.0/29\",\r\n \"40.79.173.128/25\",\r\n \ - \ \"40.79.174.0/25\",\r\n \"2603:1010:6:402::90/125\",\r\n \ - \ \"2603:1010:6:402::340/122\",\r\n \"2603:1010:6:402::580/121\"\ - ,\r\n \"2603:1010:6:802::90/125\",\r\n \"2603:1010:6:802::2c0/122\"\ - ,\r\n \"2603:1010:6:802::400/121\",\r\n \"2603:1010:6:c02::90/125\"\ - ,\r\n \"2603:1010:6:c02::400/121\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.AustraliaSoutheast\"\ - ,\r\n \"id\": \"AzureContainerRegistry.AustraliaSoutheast\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"3\",\r\n \"region\": \"australiasoutheast\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.77.50.80/29\",\r\n \ - \ \"104.46.161.128/25\",\r\n \"104.46.162.128/26\",\r\n \ - \ \"104.46.177.128/26\",\r\n \"2603:1010:101:402::90/125\"\ - ,\r\n \"2603:1010:101:402::340/122\",\r\n \"2603:1010:101:402::580/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.BrazilSouth\"\ - ,\r\n \"id\": \"AzureContainerRegistry.BrazilSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.195.136.0/24\",\r\n \"20.195.137.0/25\",\r\n \"\ - 20.195.152.192/26\",\r\n \"20.195.153.128/25\",\r\n \"191.233.203.136/29\"\ - ,\r\n \"191.233.205.192/26\",\r\n \"191.234.139.0/26\",\r\ - \n \"191.234.146.144/29\",\r\n \"191.234.149.64/26\",\r\n\ - \ \"191.234.150.0/26\",\r\n \"191.234.151.0/25\",\r\n \ - \ \"191.234.154.144/29\",\r\n \"191.234.157.192/26\",\r\n\ - \ \"2603:1050:6:402::90/125\",\r\n \"2603:1050:6:402::340/122\"\ - ,\r\n \"2603:1050:6:402::500/121\",\r\n \"2603:1050:6:802::90/125\"\ - ,\r\n \"2603:1050:6:802::2c0/122\",\r\n \"2603:1050:6:802::400/121\"\ - ,\r\n \"2603:1050:6:c02::90/125\",\r\n \"2603:1050:6:c02::400/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.BrazilSoutheast\"\ - ,\r\n \"id\": \"AzureContainerRegistry.BrazilSoutheast\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"1\",\r\n \"region\": \"brazilse\",\r\n \"\ - state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\ - \n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \ - \ \"addressPrefixes\": [\r\n \"191.233.50.16/29\",\r\n \"\ - 191.233.54.64/26\",\r\n \"191.233.54.128/26\",\r\n \"2603:1050:403:400::98/125\"\ - ,\r\n \"2603:1050:403:400::480/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.CanadaCentral\"\ - ,\r\n \"id\": \"AzureContainerRegistry.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.71.170.56/29\",\r\n \"13.71.176.0/25\",\r\n \"\ - 13.71.176.128/25\",\r\n \"20.38.146.144/29\",\r\n \"20.38.149.0/25\"\ - ,\r\n \"20.48.192.128/26\",\r\n \"52.246.154.144/29\",\r\ - \n \"52.246.157.128/25\",\r\n \"52.246.158.0/25\",\r\n \ - \ \"2603:1030:f05:402::90/125\",\r\n \"2603:1030:f05:402::340/122\"\ - ,\r\n \"2603:1030:f05:402::580/121\",\r\n \"2603:1030:f05:802::90/125\"\ - ,\r\n \"2603:1030:f05:802::2c0/122\",\r\n \"2603:1030:f05:802::400/121\"\ - ,\r\n \"2603:1030:f05:c02::90/125\",\r\n \"2603:1030:f05:c02::400/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.CanadaEast\"\ - ,\r\n \"id\": \"AzureContainerRegistry.CanadaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"40.69.106.80/29\",\r\n \"40.69.110.0/25\",\r\n \"\ - 40.69.116.0/26\",\r\n \"40.89.23.64/26\",\r\n \"2603:1030:1005:402::90/125\"\ - ,\r\n \"2603:1030:1005:402::340/122\",\r\n \"2603:1030:1005:402::580/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.CentralIndia\"\ - ,\r\n \"id\": \"AzureContainerRegistry.CentralIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.43.121.128/26\",\r\n \"20.43.123.64/26\",\r\n \ - \ \"20.43.127.0/25\",\r\n \"20.192.98.144/29\",\r\n \"20.192.101.64/26\"\ - ,\r\n \"20.192.101.128/26\",\r\n \"40.80.50.144/29\",\r\n\ - \ \"40.80.51.192/26\",\r\n \"40.80.53.64/26\",\r\n \ - \ \"40.80.54.128/25\",\r\n \"52.140.110.192/26\",\r\n \ - \ \"104.211.81.136/29\",\r\n \"2603:1040:a06::448/125\",\r\n \ - \ \"2603:1040:a06:402::90/125\",\r\n \"2603:1040:a06:402::340/122\"\ - ,\r\n \"2603:1040:a06:402::580/121\",\r\n \"2603:1040:a06:802::90/125\"\ - ,\r\n \"2603:1040:a06:802::2c0/122\",\r\n \"2603:1040:a06:802::400/121\"\ - ,\r\n \"2603:1040:a06:c02::90/125\",\r\n \"2603:1040:a06:c02::400/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.CentralUS\"\ - ,\r\n \"id\": \"AzureContainerRegistry.CentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.89.170.216/29\",\r\n \"13.89.175.0/25\",\r\n \"\ - 13.89.178.192/26\",\r\n \"20.40.224.64/26\",\r\n \"20.44.11.0/25\"\ - ,\r\n \"20.44.11.128/26\",\r\n \"20.44.12.0/25\",\r\n \ - \ \"52.182.138.208/29\",\r\n \"52.182.142.0/25\",\r\n \ - \ \"52.182.142.128/25\",\r\n \"104.208.16.80/29\",\r\n \ - \ \"2603:1030:10:402::90/125\",\r\n \"2603:1030:10:402::340/122\"\ - ,\r\n \"2603:1030:10:402::580/121\",\r\n \"2603:1030:10:802::90/125\"\ - ,\r\n \"2603:1030:10:802::2c0/122\",\r\n \"2603:1030:10:802::400/121\"\ - ,\r\n \"2603:1030:10:c02::90/125\",\r\n \"2603:1030:10:c02::400/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.CentralUSEUAP\"\ - ,\r\n \"id\": \"AzureContainerRegistry.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.45.199.128/25\",\r\n \"40.78.202.72/29\",\r\n \ - \ \"168.61.140.128/25\",\r\n \"168.61.141.0/25\",\r\n \"\ - 168.61.141.128/25\",\r\n \"168.61.142.192/26\",\r\n \"2603:1030:f:1::2a8/125\"\ - ,\r\n \"2603:1030:f:400::890/125\",\r\n \"2603:1030:f:400::b40/122\"\ - ,\r\n \"2603:1030:f:400::d80/122\",\r\n \"2603:1030:f:400::e00/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.EastAsia\"\ - ,\r\n \"id\": \"AzureContainerRegistry.EastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.75.36.0/29\",\r\n \"20.187.196.64/26\",\r\n \"\ - 20.205.74.128/26\",\r\n \"20.205.77.0/25\",\r\n \"20.205.82.128/26\"\ - ,\r\n \"20.205.85.0/25\",\r\n \"104.214.161.128/25\",\r\n\ - \ \"104.214.165.0/26\",\r\n \"2603:1040:207::2a8/125\",\r\ - \n \"2603:1040:207:402::90/125\",\r\n \"2603:1040:207:402::340/122\"\ - ,\r\n \"2603:1040:207:402::580/122\",\r\n \"2603:1040:207:402::600/121\"\ - ,\r\n \"2603:1040:207:800::48/125\",\r\n \"2603:1040:207:800::180/121\"\ - ,\r\n \"2603:1040:207:c00::48/125\",\r\n \"2603:1040:207:c00::180/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.EastUS\"\ - ,\r\n \"id\": \"AzureContainerRegistry.EastUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.42.66.0/24\",\r\n \"20.42.67.0/24\",\r\n \"20.42.74.64/26\"\ - ,\r\n \"20.62.128.0/26\",\r\n \"40.71.10.216/29\",\r\n \ - \ \"40.78.226.208/29\",\r\n \"40.78.231.0/24\",\r\n \ - \ \"40.79.154.104/29\",\r\n \"52.168.112.192/26\",\r\n \ - \ \"52.168.114.0/24\",\r\n \"52.168.115.0/24\",\r\n \"\ - 2603:1030:210:402::90/125\",\r\n \"2603:1030:210:402::340/122\",\r\ - \n \"2603:1030:210:402::580/121\",\r\n \"2603:1030:210:802::90/125\"\ - ,\r\n \"2603:1030:210:802::2c0/122\",\r\n \"2603:1030:210:802::400/121\"\ - ,\r\n \"2603:1030:210:c02::90/125\",\r\n \"2603:1030:210:c02::400/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.EastUS2\"\ - ,\r\n \"id\": \"AzureContainerRegistry.EastUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.44.19.64/26\",\r\n \"20.44.22.0/24\",\r\n \"20.44.23.0/24\"\ - ,\r\n \"20.49.102.128/26\",\r\n \"20.65.0.0/24\",\r\n \ - \ \"40.70.146.88/29\",\r\n \"40.70.150.0/24\",\r\n \ - \ \"52.167.106.80/29\",\r\n \"52.167.110.0/24\",\r\n \"\ - 52.167.111.0/26\",\r\n \"104.208.144.80/29\",\r\n \"2603:1030:40c:402::90/125\"\ - ,\r\n \"2603:1030:40c:402::340/122\",\r\n \"2603:1030:40c:402::580/121\"\ - ,\r\n \"2603:1030:40c:802::90/125\",\r\n \"2603:1030:40c:802::2c0/122\"\ - ,\r\n \"2603:1030:40c:802::400/121\",\r\n \"2603:1030:40c:c02::90/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.EastUS2EUAP\"\ - ,\r\n \"id\": \"AzureContainerRegistry.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.39.15.128/25\",\r\n \"40.74.146.48/29\",\r\n \"\ - 40.74.149.128/25\",\r\n \"40.74.151.64/26\",\r\n \"40.75.34.32/29\"\ - ,\r\n \"40.89.120.0/24\",\r\n \"40.89.121.0/25\",\r\n \ - \ \"52.138.90.32/29\",\r\n \"52.138.93.0/25\",\r\n \ - \ \"52.138.93.128/25\",\r\n \"2603:1030:40b:400::890/125\",\r\n\ - \ \"2603:1030:40b:400::b40/122\",\r\n \"2603:1030:40b:800::90/125\"\ - ,\r\n \"2603:1030:40b:800::2c0/122\",\r\n \"2603:1030:40b:c00::90/125\"\ - ,\r\n \"2603:1030:40b:c00::400/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.FranceCentral\"\ - ,\r\n \"id\": \"AzureContainerRegistry.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.43.46.64/26\",\r\n \"40.79.130.56/29\",\r\n \"\ - 40.79.132.192/26\",\r\n \"40.79.138.32/29\",\r\n \"40.79.141.0/26\"\ - ,\r\n \"40.79.141.64/26\",\r\n \"40.79.143.128/25\",\r\n\ - \ \"40.79.146.32/29\",\r\n \"40.79.148.128/26\",\r\n \ - \ \"40.79.148.192/26\",\r\n \"40.79.150.128/25\",\r\n \ - \ \"51.11.193.0/26\",\r\n \"51.11.193.128/25\",\r\n \ - \ \"2603:1020:805:402::90/125\",\r\n \"2603:1020:805:402::340/122\"\ - ,\r\n \"2603:1020:805:402::580/121\",\r\n \"2603:1020:805:802::90/125\"\ - ,\r\n \"2603:1020:805:802::2c0/122\",\r\n \"2603:1020:805:802::400/121\"\ - ,\r\n \"2603:1020:805:c02::90/125\",\r\n \"2603:1020:805:c02::400/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.FranceSouth\"\ - ,\r\n \"id\": \"AzureContainerRegistry.FranceSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"40.79.178.80/29\",\r\n \"51.138.160.128/26\",\r\n \ - \ \"2603:1020:905:402::90/125\",\r\n \"2603:1020:905:402::340/122\"\ - ,\r\n \"2603:1020:905:402::580/122\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.GermanyNorth\"\ - ,\r\n \"id\": \"AzureContainerRegistry.GermanyNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.52.72.128/26\",\r\n \"51.116.58.24/29\",\r\n \"\ - 2603:1020:d04:402::90/125\",\r\n \"2603:1020:d04:402::340/122\",\r\ - \n \"2603:1020:d04:402::580/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.GermanyWestCentral\"\ - ,\r\n \"id\": \"AzureContainerRegistry.GermanyWestCentral\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"4\",\r\n \"region\": \"germanywc\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"20.52.88.64/26\",\r\n \ - \ \"51.116.154.88/29\",\r\n \"51.116.158.128/26\",\r\n \ - \ \"51.116.158.192/26\",\r\n \"51.116.242.144/29\",\r\n \ - \ \"51.116.250.144/29\",\r\n \"51.116.254.64/26\",\r\n \ - \ \"51.116.254.128/25\",\r\n \"2603:1020:c04:402::90/125\",\r\n\ - \ \"2603:1020:c04:402::340/122\",\r\n \"2603:1020:c04:402::580/121\"\ - ,\r\n \"2603:1020:c04:802::90/125\",\r\n \"2603:1020:c04:802::2c0/122\"\ - ,\r\n \"2603:1020:c04:802::400/121\",\r\n \"2603:1020:c04:c02::90/125\"\ - ,\r\n \"2603:1020:c04:c02::400/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.JapanEast\",\r\ - \n \"id\": \"AzureContainerRegistry.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.78.106.200/29\",\r\n \"13.78.111.0/25\",\r\n \"\ - 20.89.0.192/26\",\r\n \"20.191.160.128/26\",\r\n \"20.194.128.0/25\"\ - ,\r\n \"40.79.186.8/29\",\r\n \"40.79.189.128/25\",\r\n\ - \ \"40.79.190.0/25\",\r\n \"40.79.194.96/29\",\r\n \ - \ \"40.79.197.128/25\",\r\n \"2603:1040:407:402::90/125\",\r\n\ - \ \"2603:1040:407:402::340/122\",\r\n \"2603:1040:407:402::580/121\"\ - ,\r\n \"2603:1040:407:802::90/125\",\r\n \"2603:1040:407:802::2c0/122\"\ - ,\r\n \"2603:1040:407:802::400/121\",\r\n \"2603:1040:407:c02::90/125\"\ - ,\r\n \"2603:1040:407:c02::400/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.JapanWest\",\r\ - \n \"id\": \"AzureContainerRegistry.JapanWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.189.224.0/26\",\r\n \"40.74.100.160/29\",\r\n \ - \ \"40.80.176.128/25\",\r\n \"40.80.181.0/26\",\r\n \"2603:1040:606:402::90/125\"\ - ,\r\n \"2603:1040:606:402::340/122\",\r\n \"2603:1040:606:402::580/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.JioIndiaCentral\"\ - ,\r\n \"id\": \"AzureContainerRegistry.JioIndiaCentral\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"1\",\r\n \"region\": \"jioindiacentral\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"20.192.32.0/26\",\r\n \ - \ \"20.192.33.0/26\",\r\n \"20.192.33.128/25\",\r\n \ - \ \"20.192.50.0/26\",\r\n \"20.192.234.24/29\",\r\n \"20.192.236.0/26\"\ - ,\r\n \"2603:1040:1104::5a0/125\",\r\n \"2603:1040:1104:400::90/125\"\ - ,\r\n \"2603:1040:1104:400::380/121\",\r\n \"2603:1040:1104:400::480/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.JioIndiaWest\"\ - ,\r\n \"id\": \"AzureContainerRegistry.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.193.160.64/26\",\r\n \"20.193.192.128/26\",\r\n \ - \ \"20.193.202.16/29\",\r\n \"20.193.204.128/26\",\r\n \ - \ \"20.193.205.0/25\",\r\n \"20.193.206.64/26\",\r\n \"\ - 2603:1040:d04:1::1a0/125\",\r\n \"2603:1040:d04:400::90/125\",\r\n\ - \ \"2603:1040:d04:400::3b8/125\",\r\n \"2603:1040:d04:400::4c0/122\"\ - ,\r\n \"2603:1040:d04:400::500/121\",\r\n \"2603:1040:d04:800::150/125\"\ - ,\r\n \"2603:1040:d04:800::180/121\",\r\n \"2603:1040:d04:800::280/121\"\ - ,\r\n \"2603:1040:d04:c02::300/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.KoreaCentral\"\ - ,\r\n \"id\": \"AzureContainerRegistry.KoreaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.41.69.128/26\",\r\n \"20.44.26.144/29\",\r\n \"\ - 20.44.29.128/26\",\r\n \"20.44.29.192/26\",\r\n \"20.194.66.16/29\"\ - ,\r\n \"20.194.68.0/26\",\r\n \"20.194.68.64/26\",\r\n \ - \ \"20.194.70.0/25\",\r\n \"20.194.80.128/26\",\r\n \ - \ \"20.194.81.0/25\",\r\n \"20.194.81.128/26\",\r\n \ - \ \"52.231.18.56/29\",\r\n \"52.231.20.128/26\",\r\n \"\ - 2603:1040:f05::348/125\",\r\n \"2603:1040:f05:402::90/125\",\r\n\ - \ \"2603:1040:f05:402::340/122\",\r\n \"2603:1040:f05:402::580/121\"\ - ,\r\n \"2603:1040:f05:402::600/120\",\r\n \"2603:1040:f05:402::700/121\"\ - ,\r\n \"2603:1040:f05:802::90/125\",\r\n \"2603:1040:f05:802::2c0/122\"\ - ,\r\n \"2603:1040:f05:802::400/121\",\r\n \"2603:1040:f05:c02::90/125\"\ - ,\r\n \"2603:1040:f05:c02::400/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.KoreaSouth\"\ - ,\r\n \"id\": \"AzureContainerRegistry.KoreaSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.135.26.64/26\",\r\n \"52.147.97.128/25\",\r\n \ - \ \"52.231.146.192/29\",\r\n \"2603:1040:e05:402::100/122\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.NorthCentralUS\"\ - ,\r\n \"id\": \"AzureContainerRegistry.NorthCentralUS\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"3\",\r\n \"region\": \"northcentralus\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"20.49.115.0/26\",\r\n \ - \ \"52.162.104.192/26\",\r\n \"52.162.106.160/29\",\r\n \ - \ \"52.240.241.128/25\",\r\n \"52.240.244.0/25\",\r\n \ - \ \"2603:1030:608:402::90/125\",\r\n \"2603:1030:608:402::340/122\"\ - ,\r\n \"2603:1030:608:402::580/122\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.NorthEurope\"\ - ,\r\n \"id\": \"AzureContainerRegistry.NorthEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.69.227.88/29\",\r\n \"13.69.236.0/23\",\r\n \"\ - 13.69.238.0/24\",\r\n \"13.74.107.80/29\",\r\n \"13.74.110.0/24\"\ - ,\r\n \"20.50.72.128/26\",\r\n \"52.138.226.80/29\",\r\n\ - \ \"52.138.230.0/24\",\r\n \"52.138.231.0/24\",\r\n \ - \ \"52.146.131.128/26\",\r\n \"2603:1020:5:402::90/125\",\r\n\ - \ \"2603:1020:5:402::340/122\",\r\n \"2603:1020:5:402::580/121\"\ - ,\r\n \"2603:1020:5:802::90/125\",\r\n \"2603:1020:5:802::2c0/122\"\ - ,\r\n \"2603:1020:5:802::400/121\",\r\n \"2603:1020:5:c02::90/125\"\ - ,\r\n \"2603:1020:5:c02::400/121\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.NorwayEast\",\r\ - \n \"id\": \"AzureContainerRegistry.NorwayEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"7\",\r\ - \n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"51.13.0.0/25\",\r\n \"51.13.1.64/26\",\r\n \"51.120.98.160/29\"\ - ,\r\n \"51.120.106.144/29\",\r\n \"51.120.109.128/26\",\r\ - \n \"51.120.110.0/25\",\r\n \"51.120.210.144/29\",\r\n \ - \ \"51.120.213.128/25\",\r\n \"51.120.214.0/26\",\r\n \ - \ \"51.120.234.0/26\",\r\n \"2603:1020:e04::348/125\",\r\n\ - \ \"2603:1020:e04:402::90/125\",\r\n \"2603:1020:e04:402::340/122\"\ - ,\r\n \"2603:1020:e04:402::580/121\",\r\n \"2603:1020:e04:402::600/120\"\ - ,\r\n \"2603:1020:e04:802::90/125\",\r\n \"2603:1020:e04:802::2c0/122\"\ - ,\r\n \"2603:1020:e04:802::400/121\",\r\n \"2603:1020:e04:c02::90/125\"\ - ,\r\n \"2603:1020:e04:c02::400/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.NorwayWest\"\ - ,\r\n \"id\": \"AzureContainerRegistry.NorwayWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"51.13.128.128/25\",\r\n \"51.13.129.0/26\",\r\n \"\ - 51.120.218.24/29\",\r\n \"2603:1020:f04:402::90/125\",\r\n \ - \ \"2603:1020:f04:402::340/122\",\r\n \"2603:1020:f04:402::580/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SouthAfricaNorth\"\ - ,\r\n \"id\": \"AzureContainerRegistry.SouthAfricaNorth\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"4\",\r\n \"region\": \"southafricanorth\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"102.37.72.128/26\",\r\n \ - \ \"102.133.122.144/29\",\r\n \"102.133.124.192/26\",\r\n \ - \ \"102.133.126.0/26\",\r\n \"102.133.154.24/29\",\r\n \ - \ \"102.133.156.192/26\",\r\n \"102.133.220.64/26\",\r\n \ - \ \"102.133.250.144/29\",\r\n \"102.133.253.64/26\",\r\n\ - \ \"102.133.253.128/26\",\r\n \"2603:1000:104:402::90/125\"\ - ,\r\n \"2603:1000:104:402::340/122\",\r\n \"2603:1000:104:402::580/121\"\ - ,\r\n \"2603:1000:104:802::90/125\",\r\n \"2603:1000:104:802::2c0/122\"\ - ,\r\n \"2603:1000:104:802::400/121\",\r\n \"2603:1000:104:c02::90/125\"\ - ,\r\n \"2603:1000:104:c02::400/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.SouthAfricaWest\"\ - ,\r\n \"id\": \"AzureContainerRegistry.SouthAfricaWest\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"3\",\r\n \"region\": \"southafricawest\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"102.37.65.64/26\",\r\n \ - \ \"102.133.26.24/29\",\r\n \"2603:1000:4:402::90/125\",\r\n\ - \ \"2603:1000:4:402::340/122\",\r\n \"2603:1000:4:402::580/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SouthCentralUS\"\ - ,\r\n \"id\": \"AzureContainerRegistry.SouthCentralUS\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"4\",\r\n \"region\": \"southcentralus\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"13.73.245.64/26\",\r\n \ - \ \"13.73.245.128/25\",\r\n \"13.73.255.64/26\",\r\n \ - \ \"20.45.122.144/29\",\r\n \"20.45.125.0/25\",\r\n \"\ - 20.49.90.16/29\",\r\n \"20.49.92.0/25\",\r\n \"20.49.92.128/25\"\ - ,\r\n \"20.49.93.0/26\",\r\n \"40.124.64.0/25\",\r\n \ - \ \"104.214.18.184/29\",\r\n \"2603:1030:807:402::90/125\"\ - ,\r\n \"2603:1030:807:402::340/122\",\r\n \"2603:1030:807:402::580/121\"\ - ,\r\n \"2603:1030:807:802::90/125\",\r\n \"2603:1030:807:802::2c0/122\"\ - ,\r\n \"2603:1030:807:802::400/121\",\r\n \"2603:1030:807:c02::90/125\"\ - ,\r\n \"2603:1030:807:c02::400/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.SouthCentralUSSTG\"\ - ,\r\n \"id\": \"AzureContainerRegistry.SouthCentralUSSTG\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"usstagec\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"20.44.2.24/29\",\r\n \ - \ \"2603:1030:302:402::c0/122\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureContainerRegistry.SoutheastAsia\",\r\n \ - \ \"id\": \"AzureContainerRegistry.SoutheastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.67.8.120/29\",\r\n \"13.67.14.0/25\",\r\n \"13.67.14.128/25\"\ - ,\r\n \"20.195.64.128/26\",\r\n \"23.98.82.112/29\",\r\n\ - \ \"23.98.86.128/25\",\r\n \"23.98.87.0/25\",\r\n \ - \ \"23.98.112.0/25\",\r\n \"40.78.234.48/29\",\r\n \"\ - 40.78.239.128/25\",\r\n \"2603:1040:5:402::90/125\",\r\n \ - \ \"2603:1040:5:402::340/122\",\r\n \"2603:1040:5:402::580/121\"\ - ,\r\n \"2603:1040:5:802::90/125\",\r\n \"2603:1040:5:802::2c0/122\"\ - ,\r\n \"2603:1040:5:802::400/121\",\r\n \"2603:1040:5:c02::90/125\"\ - ,\r\n \"2603:1040:5:c02::400/121\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.SouthIndia\",\r\ - \n \"id\": \"AzureContainerRegistry.SouthIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.41.199.192/26\",\r\n \"20.41.208.64/26\",\r\n \ - \ \"40.78.194.80/29\",\r\n \"40.78.196.192/26\",\r\n \"\ - 2603:1040:c06:402::90/125\",\r\n \"2603:1040:c06:402::340/122\",\r\ - \n \"2603:1040:c06:402::580/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.SwedenCentral\"\ - ,\r\n \"id\": \"AzureContainerRegistry.SwedenCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"51.12.25.64/26\",\r\n \"51.12.32.0/25\",\r\n \"51.12.32.128/26\"\ - ,\r\n \"51.12.98.24/29\",\r\n \"51.12.100.192/26\",\r\n\ - \ \"51.12.101.0/26\",\r\n \"51.12.226.144/29\",\r\n \ - \ \"51.12.229.128/26\",\r\n \"51.12.230.0/25\",\r\n \ - \ \"51.12.234.144/29\",\r\n \"51.12.237.128/26\",\r\n \"\ - 51.12.238.0/25\",\r\n \"2603:1020:1004:1::1a0/125\",\r\n \ - \ \"2603:1020:1004:400::90/125\",\r\n \"2603:1020:1004:400::3b8/125\"\ - ,\r\n \"2603:1020:1004:400::4c0/122\",\r\n \"2603:1020:1004:400::500/121\"\ - ,\r\n \"2603:1020:1004:800::150/125\",\r\n \"2603:1020:1004:800::180/121\"\ - ,\r\n \"2603:1020:1004:800::280/121\",\r\n \"2603:1020:1004:c02::1b0/125\"\ - ,\r\n \"2603:1020:1004:c02::300/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.SwitzerlandNorth\"\ - ,\r\n \"id\": \"AzureContainerRegistry.SwitzerlandNorth\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"4\",\r\n \"region\": \"switzerlandn\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.208.18.128/26\",\r\n \ - \ \"20.208.21.0/25\",\r\n \"51.103.202.128/26\",\r\n \"\ - 51.103.205.0/25\",\r\n \"51.107.53.64/26\",\r\n \"51.107.56.192/26\"\ - ,\r\n \"51.107.58.24/29\",\r\n \"2603:1020:a04::348/125\"\ - ,\r\n \"2603:1020:a04:402::90/125\",\r\n \"2603:1020:a04:402::340/122\"\ - ,\r\n \"2603:1020:a04:402::580/121\",\r\n \"2603:1020:a04:802::90/125\"\ - ,\r\n \"2603:1020:a04:802::2c0/122\",\r\n \"2603:1020:a04:802::400/121\"\ - ,\r\n \"2603:1020:a04:c02::90/125\",\r\n \"2603:1020:a04:c02::400/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SwitzerlandWest\"\ - ,\r\n \"id\": \"AzureContainerRegistry.SwitzerlandWest\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"3\",\r\n \"region\": \"switzerlandw\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \ - \ \"addressPrefixes\": [\r\n \"51.107.148.128/26\",\r\n \ - \ \"51.107.152.192/26\",\r\n \"51.107.154.24/29\",\r\n \ - \ \"51.107.192.0/26\",\r\n \"2603:1020:b04:402::90/125\",\r\n \ - \ \"2603:1020:b04:402::340/122\",\r\n \"2603:1020:b04:402::580/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.UAECentral\"\ - ,\r\n \"id\": \"AzureContainerRegistry.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.37.69.0/26\",\r\n \"20.37.74.72/29\",\r\n \"40.120.8.64/26\"\ - ,\r\n \"40.120.9.0/26\",\r\n \"2603:1040:b04:402::90/125\"\ - ,\r\n \"2603:1040:b04:402::340/122\",\r\n \"2603:1040:b04:402::580/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.UAENorth\"\ - ,\r\n \"id\": \"AzureContainerRegistry.UAENorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.38.140.192/26\",\r\n \"40.120.66.0/25\",\r\n \"\ - 40.120.74.16/29\",\r\n \"40.120.77.0/26\",\r\n \"40.120.77.64/26\"\ - ,\r\n \"65.52.248.192/26\",\r\n \"65.52.250.16/29\",\r\n\ - \ \"2603:1040:904:402::90/125\",\r\n \"2603:1040:904:402::340/122\"\ - ,\r\n \"2603:1040:904:402::580/121\",\r\n \"2603:1040:904:802::90/125\"\ - ,\r\n \"2603:1040:904:802::2c0/122\",\r\n \"2603:1040:904:802::400/121\"\ - ,\r\n \"2603:1040:904:c02::90/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.UKSouth\",\r\n\ - \ \"id\": \"AzureContainerRegistry.UKSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"51.104.9.128/25\",\r\n \"51.105.66.144/29\",\r\n \ - \ \"51.105.69.128/25\",\r\n \"51.105.70.0/25\",\r\n \"51.105.74.144/29\"\ - ,\r\n \"51.105.77.128/25\",\r\n \"51.132.192.0/25\",\r\n\ - \ \"51.140.146.200/29\",\r\n \"51.140.151.64/26\",\r\n \ - \ \"51.143.208.0/26\",\r\n \"2603:1020:705:402::90/125\"\ - ,\r\n \"2603:1020:705:402::340/122\",\r\n \"2603:1020:705:402::580/121\"\ - ,\r\n \"2603:1020:705:802::90/125\",\r\n \"2603:1020:705:802::2c0/122\"\ - ,\r\n \"2603:1020:705:802::400/121\",\r\n \"2603:1020:705:c02::90/125\"\ - ,\r\n \"2603:1020:705:c02::400/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.UKWest\",\r\n\ - \ \"id\": \"AzureContainerRegistry.UKWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"51.11.97.128/26\",\r\n \"51.137.166.192/26\",\r\n \ - \ \"51.140.210.192/29\",\r\n \"51.140.215.0/25\",\r\n \"\ - 2603:1020:605:402::90/125\",\r\n \"2603:1020:605:402::340/122\",\r\ - \n \"2603:1020:605:402::580/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.WestCentralUS\"\ - ,\r\n \"id\": \"AzureContainerRegistry.WestCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.71.194.224/29\",\r\n \"40.67.121.0/25\",\r\n \"\ - 40.67.122.128/26\",\r\n \"52.150.156.64/26\",\r\n \"2603:1030:b04:402::90/125\"\ - ,\r\n \"2603:1030:b04:402::340/122\",\r\n \"2603:1030:b04:402::580/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.WestEurope\"\ - ,\r\n \"id\": \"AzureContainerRegistry.WestEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.69.64.88/29\",\r\n \"13.69.106.80/29\",\r\n \"\ - 13.69.110.0/24\",\r\n \"13.69.112.192/26\",\r\n \"20.50.200.0/24\"\ - ,\r\n \"20.61.97.128/25\",\r\n \"52.178.18.0/23\",\r\n \ - \ \"52.178.20.0/24\",\r\n \"52.236.186.80/29\",\r\n \ - \ \"52.236.191.0/24\",\r\n \"2603:1020:206:402::90/125\",\r\n\ - \ \"2603:1020:206:402::340/122\",\r\n \"2603:1020:206:402::580/121\"\ - ,\r\n \"2603:1020:206:802::90/125\",\r\n \"2603:1020:206:802::2c0/122\"\ - ,\r\n \"2603:1020:206:802::400/121\",\r\n \"2603:1020:206:c02::90/125\"\ - ,\r\n \"2603:1020:206:c02::400/121\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.WestIndia\",\r\ - \n \"id\": \"AzureContainerRegistry.WestIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.38.132.192/26\",\r\n \"104.211.146.80/29\",\r\n \ - \ \"2603:1040:806:402::90/125\",\r\n \"2603:1040:806:402::340/122\"\ - ,\r\n \"2603:1040:806:402::580/122\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureContainerRegistry.WestUS\",\r\n\ - \ \"id\": \"AzureContainerRegistry.WestUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.49.127.0/26\",\r\n \"20.189.169.0/24\",\r\n \"\ - 20.189.171.128/25\",\r\n \"40.112.242.160/29\",\r\n \"2603:1030:a07:402::90/125\"\ - ,\r\n \"2603:1030:a07:402::9c0/122\",\r\n \"2603:1030:a07:402::a00/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.WestUS2\"\ - ,\r\n \"id\": \"AzureContainerRegistry.WestUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.66.140.72/29\",\r\n \"13.66.146.0/24\",\r\n \"\ - 13.66.147.0/25\",\r\n \"13.66.148.0/24\",\r\n \"20.83.192.64/26\"\ - ,\r\n \"40.64.112.0/24\",\r\n \"40.64.113.128/26\",\r\n\ - \ \"40.64.135.128/25\",\r\n \"40.78.242.160/29\",\r\n \ - \ \"40.78.246.0/24\",\r\n \"40.78.250.96/29\",\r\n \ - \ \"2603:1030:c06:400::890/125\",\r\n \"2603:1030:c06:400::b40/122\"\ - ,\r\n \"2603:1030:c06:802::90/125\",\r\n \"2603:1030:c06:802::2c0/122\"\ - ,\r\n \"2603:1030:c06:c02::90/125\",\r\n \"2603:1030:c06:c02::400/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.WestUS3\"\ - ,\r\n \"id\": \"AzureContainerRegistry.WestUS3\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.150.170.24/29\",\r\n \"20.150.173.128/26\",\r\n \ - \ \"20.150.174.0/25\",\r\n \"20.150.175.128/26\",\r\n \ - \ \"20.150.178.144/29\",\r\n \"20.150.181.192/26\",\r\n \ - \ \"20.150.182.128/25\",\r\n \"20.150.186.144/29\",\r\n \ - \ \"20.150.189.192/26\",\r\n \"20.150.190.128/25\",\r\n \ - \ \"20.150.225.64/26\",\r\n \"20.150.241.0/26\",\r\n \"\ - 2603:1030:504::1a0/125\",\r\n \"2603:1030:504:402::90/125\",\r\n\ - \ \"2603:1030:504:402::3b8/125\",\r\n \"2603:1030:504:402::480/121\"\ - ,\r\n \"2603:1030:504:802::c0/125\",\r\n \"2603:1030:504:802::150/125\"\ - ,\r\n \"2603:1030:504:802::180/121\",\r\n \"2603:1030:504:c02::140/122\"\ - ,\r\n \"2603:1030:504:c02::300/121\",\r\n \"2603:1030:504:c02::400/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB\"\ - ,\r\n \"id\": \"AzureCosmosDB\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\",\r\n \"VSE\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.64.69.151/32\"\ - ,\r\n \"13.64.113.68/32\",\r\n \"13.64.114.48/32\",\r\n\ - \ \"13.64.194.140/32\",\r\n \"13.65.145.92/32\",\r\n \ - \ \"13.66.26.107/32\",\r\n \"13.66.82.75/32\",\r\n \ - \ \"13.66.138.0/26\",\r\n \"13.67.8.0/26\",\r\n \"13.68.28.135/32\"\ - ,\r\n \"13.69.66.0/25\",\r\n \"13.69.66.128/29\",\r\n \ - \ \"13.69.112.0/25\",\r\n \"13.69.226.0/25\",\r\n \ - \ \"13.70.74.136/29\",\r\n \"13.71.115.125/32\",\r\n \"\ - 13.71.124.81/32\",\r\n \"13.71.170.0/28\",\r\n \"13.71.194.0/26\"\ - ,\r\n \"13.72.255.150/32\",\r\n \"13.73.100.183/32\",\r\n\ - \ \"13.73.254.224/27\",\r\n \"13.74.106.0/25\",\r\n \ - \ \"13.75.34.0/26\",\r\n \"13.75.134.84/32\",\r\n \"\ - 13.76.161.130/32\",\r\n \"13.77.50.0/28\",\r\n \"13.78.51.35/32\"\ - ,\r\n \"13.78.106.0/26\",\r\n \"13.78.188.25/32\",\r\n \ - \ \"13.79.34.236/32\",\r\n \"13.81.51.99/32\",\r\n \ - \ \"13.82.53.191/32\",\r\n \"13.84.150.178/32\",\r\n \ - \ \"13.84.157.70/32\",\r\n \"13.85.16.188/32\",\r\n \"13.87.56.0/27\"\ - ,\r\n \"13.87.122.0/27\",\r\n \"13.88.30.39/32\",\r\n \ - \ \"13.88.253.180/32\",\r\n \"13.89.41.245/32\",\r\n \ - \ \"13.89.170.0/25\",\r\n \"13.89.190.186/32\",\r\n \ - \ \"13.89.224.229/32\",\r\n \"13.90.199.155/32\",\r\n \"\ - 13.91.246.52/32\",\r\n \"13.93.153.80/32\",\r\n \"13.93.156.125/32\"\ - ,\r\n \"13.93.207.66/32\",\r\n \"13.94.201.5/32\",\r\n \ - \ \"13.95.234.68/32\",\r\n \"20.21.34.160/27\",\r\n \ - \ \"20.21.42.0/26\",\r\n \"20.21.66.0/26\",\r\n \"20.21.74.0/26\"\ - ,\r\n \"20.36.26.132/32\",\r\n \"20.36.42.8/32\",\r\n \ - \ \"20.36.75.163/32\",\r\n \"20.36.106.0/26\",\r\n \ - \ \"20.36.114.0/28\",\r\n \"20.36.123.96/27\",\r\n \"\ - 20.37.68.160/27\",\r\n \"20.37.75.128/26\",\r\n \"20.37.228.32/27\"\ - ,\r\n \"20.38.140.128/27\",\r\n \"20.38.146.0/26\",\r\n\ - \ \"20.39.15.64/27\",\r\n \"20.40.207.160/27\",\r\n \ - \ \"20.41.69.64/27\",\r\n \"20.41.199.128/27\",\r\n \ - \ \"20.43.46.0/27\",\r\n \"20.43.126.128/26\",\r\n \"20.44.2.64/26\"\ - ,\r\n \"20.44.10.0/26\",\r\n \"20.44.26.0/26\",\r\n \ - \ \"20.45.115.160/27\",\r\n \"20.45.122.0/26\",\r\n \ - \ \"20.45.198.96/27\",\r\n \"20.48.192.32/27\",\r\n \"\ - 20.49.82.64/26\",\r\n \"20.49.90.64/26\",\r\n \"20.49.102.64/27\"\ - ,\r\n \"20.49.114.128/27\",\r\n \"20.49.126.160/27\",\r\n\ - \ \"20.53.41.0/27\",\r\n \"20.61.97.0/27\",\r\n \ - \ \"20.72.18.64/27\",\r\n \"20.72.26.64/26\",\r\n \"20.89.0.128/26\"\ - ,\r\n \"20.150.166.192/27\",\r\n \"20.150.170.64/26\",\r\ - \n \"20.150.178.0/26\",\r\n \"20.150.186.0/26\",\r\n \ - \ \"20.187.196.0/27\",\r\n \"20.191.160.32/27\",\r\n \ - \ \"20.192.98.0/26\",\r\n \"20.192.166.192/27\",\r\n \ - \ \"20.192.231.0/27\",\r\n \"20.192.234.64/26\",\r\n \"\ - 20.193.202.64/26\",\r\n \"20.194.66.64/26\",\r\n \"20.194.80.64/26\"\ - ,\r\n \"20.205.74.0/26\",\r\n \"20.205.82.0/26\",\r\n \ - \ \"20.208.18.0/26\",\r\n \"23.96.180.213/32\",\r\n \ - \ \"23.96.219.207/32\",\r\n \"23.96.242.234/32\",\r\n \ - \ \"23.98.82.0/26\",\r\n \"23.98.107.224/27\",\r\n \"23.102.191.13/32\"\ - ,\r\n \"23.102.239.134/32\",\r\n \"40.64.135.0/27\",\r\n\ - \ \"40.65.106.154/32\",\r\n \"40.65.114.105/32\",\r\n \ - \ \"40.67.51.160/27\",\r\n \"40.67.58.64/26\",\r\n \ - \ \"40.68.44.85/32\",\r\n \"40.69.106.0/28\",\r\n \"40.70.0.140/32\"\ - ,\r\n \"40.70.220.202/32\",\r\n \"40.71.10.0/25\",\r\n \ - \ \"40.71.17.19/32\",\r\n \"40.71.203.37/32\",\r\n \ - \ \"40.71.204.115/32\",\r\n \"40.71.216.114/32\",\r\n \ - \ \"40.74.98.0/26\",\r\n \"40.74.143.235/32\",\r\n \"40.74.147.192/26\"\ - ,\r\n \"40.75.32.32/29\",\r\n \"40.75.34.128/26\",\r\n \ - \ \"40.77.63.179/32\",\r\n \"40.78.194.0/28\",\r\n \ - \ \"40.78.203.32/27\",\r\n \"40.78.226.0/25\",\r\n \"\ - 40.78.236.192/26\",\r\n \"40.78.243.192/26\",\r\n \"40.78.250.0/26\"\ - ,\r\n \"40.79.39.162/32\",\r\n \"40.79.59.92/32\",\r\n \ - \ \"40.79.67.136/32\",\r\n \"40.79.130.0/28\",\r\n \ - \ \"40.79.138.48/28\",\r\n \"40.79.142.64/26\",\r\n \"\ - 40.79.146.48/28\",\r\n \"40.79.149.128/26\",\r\n \"40.79.154.128/26\"\ - ,\r\n \"40.79.163.72/29\",\r\n \"40.79.163.192/26\",\r\n\ - \ \"40.79.170.48/28\",\r\n \"40.79.174.192/26\",\r\n \ - \ \"40.79.178.0/28\",\r\n \"40.79.186.16/28\",\r\n \ - \ \"40.79.191.0/26\",\r\n \"40.79.194.128/26\",\r\n \"\ - 40.80.50.0/26\",\r\n \"40.80.63.160/27\",\r\n \"40.80.173.0/27\"\ - ,\r\n \"40.83.137.191/32\",\r\n \"40.85.178.211/32\",\r\n\ - \ \"40.86.229.245/32\",\r\n \"40.89.22.224/27\",\r\n \ - \ \"40.89.67.208/32\",\r\n \"40.89.132.238/32\",\r\n \ - \ \"40.112.140.12/32\",\r\n \"40.112.241.0/24\",\r\n \ - \ \"40.112.249.60/32\",\r\n \"40.113.90.91/32\",\r\n \"\ - 40.114.240.253/32\",\r\n \"40.115.241.37/32\",\r\n \"40.118.245.44/32\"\ - ,\r\n \"40.118.245.251/32\",\r\n \"40.120.74.64/26\",\r\n\ - \ \"40.122.132.89/32\",\r\n \"40.122.174.140/32\",\r\n \ - \ \"40.126.244.209/32\",\r\n \"51.11.192.192/26\",\r\n \ - \ \"51.12.43.0/27\",\r\n \"51.12.98.64/26\",\r\n \ - \ \"51.12.195.0/27\",\r\n \"51.12.202.64/26\",\r\n \"51.12.226.0/26\"\ - ,\r\n \"51.12.234.0/26\",\r\n \"51.103.202.0/26\",\r\n \ - \ \"51.104.31.128/27\",\r\n \"51.105.66.0/26\",\r\n \ - \ \"51.105.74.0/26\",\r\n \"51.105.92.192/27\",\r\n \ - \ \"51.107.52.224/27\",\r\n \"51.107.58.64/26\",\r\n \"\ - 51.107.148.32/27\",\r\n \"51.107.154.64/26\",\r\n \"51.116.50.224/27\"\ - ,\r\n \"51.116.58.64/26\",\r\n \"51.116.146.224/27\",\r\n\ - \ \"51.116.154.128/26\",\r\n \"51.116.242.0/26\",\r\n \ - \ \"51.116.250.0/26\",\r\n \"51.120.44.128/27\",\r\n \ - \ \"51.120.98.64/26\",\r\n \"51.120.106.0/26\",\r\n \ - \ \"51.120.210.0/26\",\r\n \"51.120.218.64/26\",\r\n \"\ - 51.120.228.160/27\",\r\n \"51.137.166.128/27\",\r\n \"51.140.52.73/32\"\ - ,\r\n \"51.140.70.75/32\",\r\n \"51.140.75.146/32\",\r\n\ - \ \"51.140.83.56/32\",\r\n \"51.140.99.233/32\",\r\n \ - \ \"51.140.146.0/27\",\r\n \"51.140.210.0/27\",\r\n \ - \ \"51.141.11.34/32\",\r\n \"51.141.25.77/32\",\r\n \"\ - 51.141.53.76/32\",\r\n \"51.141.55.229/32\",\r\n \"51.143.189.37/32\"\ - ,\r\n \"51.144.177.166/32\",\r\n \"51.144.182.233/32\",\r\ - \n \"52.136.52.64/27\",\r\n \"52.136.134.25/32\",\r\n \ - \ \"52.136.134.250/32\",\r\n \"52.136.136.70/32\",\r\n \ - \ \"52.138.66.90/32\",\r\n \"52.138.70.62/32\",\r\n \ - \ \"52.138.92.0/26\",\r\n \"52.138.141.112/32\",\r\n \"\ - 52.138.197.33/32\",\r\n \"52.138.201.47/32\",\r\n \"52.138.205.97/32\"\ - ,\r\n \"52.138.206.153/32\",\r\n \"52.138.227.192/26\",\r\ - \n \"52.140.110.64/27\",\r\n \"52.143.136.41/32\",\r\n \ - \ \"52.146.79.160/27\",\r\n \"52.146.131.0/27\",\r\n \ - \ \"52.150.154.224/27\",\r\n \"52.151.16.118/32\",\r\n \ - \ \"52.156.170.104/32\",\r\n \"52.158.234.203/32\",\r\n \ - \ \"52.161.13.67/32\",\r\n \"52.161.15.197/32\",\r\n \ - \ \"52.161.22.131/32\",\r\n \"52.161.100.126/32\",\r\n \ - \ \"52.162.106.0/26\",\r\n \"52.162.252.26/32\",\r\n \"\ - 52.163.63.20/32\",\r\n \"52.163.249.82/32\",\r\n \"52.164.250.188/32\"\ - ,\r\n \"52.165.42.204/32\",\r\n \"52.165.46.249/32\",\r\n\ - \ \"52.165.129.184/32\",\r\n \"52.165.229.112/32\",\r\n\ - \ \"52.165.229.184/32\",\r\n \"52.167.107.128/26\",\r\n\ - \ \"52.168.28.222/32\",\r\n \"52.169.122.37/32\",\r\n \ - \ \"52.169.219.183/32\",\r\n \"52.170.204.83/32\",\r\n \ - \ \"52.172.55.127/32\",\r\n \"52.172.206.130/32\",\r\n \ - \ \"52.173.148.217/32\",\r\n \"52.173.196.170/32\",\r\n \ - \ \"52.173.240.244/32\",\r\n \"52.174.253.239/32\",\r\n \ - \ \"52.175.25.211/32\",\r\n \"52.175.39.232/32\",\r\n \ - \ \"52.176.0.136/32\",\r\n \"52.176.7.71/32\",\r\n \"\ - 52.176.101.49/32\",\r\n \"52.176.155.127/32\",\r\n \"52.177.172.74/32\"\ - ,\r\n \"52.177.206.153/32\",\r\n \"52.178.108.222/32\",\r\ - \n \"52.179.141.33/32\",\r\n \"52.179.143.233/32\",\r\n\ - \ \"52.179.200.0/25\",\r\n \"52.180.160.251/32\",\r\n \ - \ \"52.180.161.1/32\",\r\n \"52.180.177.137/32\",\r\n \ - \ \"52.182.138.0/25\",\r\n \"52.183.42.252/32\",\r\n \ - \ \"52.183.66.36/32\",\r\n \"52.183.92.223/32\",\r\n \"\ - 52.183.119.101/32\",\r\n \"52.184.152.241/32\",\r\n \"52.186.69.224/32\"\ - ,\r\n \"52.187.11.8/32\",\r\n \"52.187.12.93/32\",\r\n \ - \ \"52.191.197.220/32\",\r\n \"52.226.18.140/32\",\r\n \ - \ \"52.226.21.178/32\",\r\n \"52.230.15.63/32\",\r\n \ - \ \"52.230.23.170/32\",\r\n \"52.230.70.94/32\",\r\n \ - \ \"52.230.87.21/32\",\r\n \"52.231.18.0/28\",\r\n \"52.231.25.123/32\"\ - ,\r\n \"52.231.39.143/32\",\r\n \"52.231.56.0/28\",\r\n\ - \ \"52.231.146.0/27\",\r\n \"52.231.206.234/32\",\r\n \ - \ \"52.231.207.31/32\",\r\n \"52.232.59.220/32\",\r\n \ - \ \"52.233.41.60/32\",\r\n \"52.233.128.86/32\",\r\n \ - \ \"52.235.40.247/32\",\r\n \"52.235.46.28/32\",\r\n \"\ - 52.236.189.0/26\",\r\n \"52.237.20.252/32\",\r\n \"52.246.154.0/26\"\ - ,\r\n \"52.255.52.19/32\",\r\n \"52.255.58.221/32\",\r\n\ - \ \"65.52.210.9/32\",\r\n \"65.52.251.128/26\",\r\n \ - \ \"102.133.26.64/26\",\r\n \"102.133.60.64/27\",\r\n \ - \ \"102.133.122.0/26\",\r\n \"102.133.154.64/26\",\r\n \ - \ \"102.133.220.0/27\",\r\n \"102.133.250.0/26\",\r\n \ - \ \"104.41.52.61/32\",\r\n \"104.41.54.69/32\",\r\n \"104.41.177.93/32\"\ - ,\r\n \"104.45.16.183/32\",\r\n \"104.45.131.193/32\",\r\ - \n \"104.45.144.73/32\",\r\n \"104.46.177.64/27\",\r\n \ - \ \"104.208.231.0/25\",\r\n \"104.210.89.99/32\",\r\n \ - \ \"104.210.217.251/32\",\r\n \"104.211.84.0/28\",\r\n \ - \ \"104.211.102.50/32\",\r\n \"104.211.146.0/28\",\r\n \ - \ \"104.211.162.94/32\",\r\n \"104.211.184.117/32\",\r\n \ - \ \"104.211.188.174/32\",\r\n \"104.211.227.84/32\",\r\n \ - \ \"104.214.18.0/25\",\r\n \"104.214.23.192/27\",\r\n \ - \ \"104.214.26.177/32\",\r\n \"104.215.1.53/32\",\r\n \ - \ \"104.215.21.39/32\",\r\n \"104.215.55.227/32\",\r\n \ - \ \"137.117.9.157/32\",\r\n \"157.55.170.133/32\",\r\n \ - \ \"168.61.142.128/26\",\r\n \"191.232.51.175/32\",\r\n \ - \ \"191.232.53.203/32\",\r\n \"191.233.11.192/27\",\r\n \ - \ \"191.233.50.64/26\",\r\n \"191.233.204.128/27\",\r\n \ - \ \"191.234.138.160/27\",\r\n \"191.234.146.0/26\",\r\n \ - \ \"191.234.154.0/26\",\r\n \"191.234.179.157/32\",\r\n \ - \ \"191.239.179.124/32\",\r\n \"207.46.150.252/32\",\r\n \ - \ \"2603:1000:4:402::c0/122\",\r\n \"2603:1000:104:402::c0/122\"\ - ,\r\n \"2603:1000:104:802::c0/122\",\r\n \"2603:1000:104:c02::c0/122\"\ - ,\r\n \"2603:1010:6:402::c0/122\",\r\n \"2603:1010:6:802::c0/122\"\ - ,\r\n \"2603:1010:6:c02::c0/122\",\r\n \"2603:1010:101:402::c0/122\"\ - ,\r\n \"2603:1010:304:402::c0/122\",\r\n \"2603:1010:404:402::c0/122\"\ - ,\r\n \"2603:1020:5:402::c0/122\",\r\n \"2603:1020:5:802::c0/122\"\ - ,\r\n \"2603:1020:5:c02::c0/122\",\r\n \"2603:1020:206:402::c0/122\"\ - ,\r\n \"2603:1020:206:802::c0/122\",\r\n \"2603:1020:206:c02::c0/122\"\ - ,\r\n \"2603:1020:305:402::c0/122\",\r\n \"2603:1020:405:402::c0/122\"\ - ,\r\n \"2603:1020:605:402::c0/122\",\r\n \"2603:1020:705:402::c0/122\"\ - ,\r\n \"2603:1020:705:802::c0/122\",\r\n \"2603:1020:705:c02::c0/122\"\ - ,\r\n \"2603:1020:805:402::c0/122\",\r\n \"2603:1020:805:802::c0/122\"\ - ,\r\n \"2603:1020:805:c02::c0/122\",\r\n \"2603:1020:905:402::c0/122\"\ - ,\r\n \"2603:1020:a04::6a0/123\",\r\n \"2603:1020:a04:402::c0/122\"\ - ,\r\n \"2603:1020:a04:802::c0/122\",\r\n \"2603:1020:a04:c02::c0/122\"\ - ,\r\n \"2603:1020:b04:402::c0/122\",\r\n \"2603:1020:c04:402::c0/122\"\ - ,\r\n \"2603:1020:c04:802::c0/122\",\r\n \"2603:1020:c04:c02::c0/122\"\ - ,\r\n \"2603:1020:d04:402::c0/122\",\r\n \"2603:1020:e04::680/123\"\ - ,\r\n \"2603:1020:e04:402::c0/122\",\r\n \"2603:1020:e04:802::c0/122\"\ - ,\r\n \"2603:1020:e04:c02::c0/122\",\r\n \"2603:1020:f04:402::c0/122\"\ - ,\r\n \"2603:1020:1004:1::60/123\",\r\n \"2603:1020:1004:400::c0/122\"\ - ,\r\n \"2603:1020:1004:400::280/122\",\r\n \"2603:1020:1004:400::3c0/122\"\ - ,\r\n \"2603:1020:1004:800::400/122\",\r\n \"2603:1020:1004:c02::1c0/122\"\ - ,\r\n \"2603:1020:1104::520/123\",\r\n \"2603:1020:1104:400::c0/122\"\ - ,\r\n \"2603:1030:f:2::2a0/123\",\r\n \"2603:1030:f:400::8c0/122\"\ - ,\r\n \"2603:1030:10:402::c0/122\",\r\n \"2603:1030:10:802::c0/122\"\ - ,\r\n \"2603:1030:10:c02::c0/122\",\r\n \"2603:1030:104::680/123\"\ - ,\r\n \"2603:1030:104:402::c0/122\",\r\n \"2603:1030:104:402::5c0/122\"\ - ,\r\n \"2603:1030:104:802::80/122\",\r\n \"2603:1030:107::540/123\"\ - ,\r\n \"2603:1030:107:400::40/122\",\r\n \"2603:1030:210:402::c0/122\"\ - ,\r\n \"2603:1030:210:802::c0/122\",\r\n \"2603:1030:210:c02::c0/122\"\ - ,\r\n \"2603:1030:40b:400::8c0/122\",\r\n \"2603:1030:40b:800::c0/122\"\ - ,\r\n \"2603:1030:40b:c00::c0/122\",\r\n \"2603:1030:40c:402::c0/122\"\ - ,\r\n \"2603:1030:40c:802::c0/122\",\r\n \"2603:1030:40c:c02::c0/122\"\ - ,\r\n \"2603:1030:504::60/123\",\r\n \"2603:1030:504:402::c0/122\"\ - ,\r\n \"2603:1030:504:402::280/122\",\r\n \"2603:1030:504:402::3c0/122\"\ - ,\r\n \"2603:1030:504:802::200/122\",\r\n \"2603:1030:504:c02::3c0/122\"\ - ,\r\n \"2603:1030:608:402::c0/122\",\r\n \"2603:1030:807:402::c0/122\"\ - ,\r\n \"2603:1030:807:802::c0/122\",\r\n \"2603:1030:807:c02::c0/122\"\ - ,\r\n \"2603:1030:a07:402::c0/122\",\r\n \"2603:1030:b04:402::c0/122\"\ - ,\r\n \"2603:1030:c06:400::8c0/122\",\r\n \"2603:1030:c06:802::c0/122\"\ - ,\r\n \"2603:1030:c06:c02::c0/122\",\r\n \"2603:1030:f05:402::c0/122\"\ - ,\r\n \"2603:1030:f05:802::c0/122\",\r\n \"2603:1030:f05:c02::c0/122\"\ - ,\r\n \"2603:1030:1005:402::c0/122\",\r\n \"2603:1040:5:402::c0/122\"\ - ,\r\n \"2603:1040:5:802::c0/122\",\r\n \"2603:1040:5:c02::c0/122\"\ - ,\r\n \"2603:1040:207:1::2a0/123\",\r\n \"2603:1040:207:402::c0/122\"\ - ,\r\n \"2603:1040:207:800::/122\",\r\n \"2603:1040:207:c00::/122\"\ - ,\r\n \"2603:1040:407:402::c0/122\",\r\n \"2603:1040:407:802::c0/122\"\ - ,\r\n \"2603:1040:407:c02::c0/122\",\r\n \"2603:1040:606:402::c0/122\"\ - ,\r\n \"2603:1040:806:402::c0/122\",\r\n \"2603:1040:904:402::c0/122\"\ - ,\r\n \"2603:1040:904:802::c0/122\",\r\n \"2603:1040:904:c02::c0/122\"\ - ,\r\n \"2603:1040:a06::780/123\",\r\n \"2603:1040:a06:402::c0/122\"\ - ,\r\n \"2603:1040:a06:802::c0/122\",\r\n \"2603:1040:a06:c02::c0/122\"\ - ,\r\n \"2603:1040:b04:402::c0/122\",\r\n \"2603:1040:c06:402::c0/122\"\ - ,\r\n \"2603:1040:d04:1::60/123\",\r\n \"2603:1040:d04:400::c0/122\"\ - ,\r\n \"2603:1040:d04:400::280/122\",\r\n \"2603:1040:d04:400::3c0/122\"\ - ,\r\n \"2603:1040:f05::680/123\",\r\n \"2603:1040:f05:402::c0/122\"\ - ,\r\n \"2603:1040:f05:802::c0/122\",\r\n \"2603:1040:f05:c02::c0/122\"\ - ,\r\n \"2603:1040:1002::740/123\",\r\n \"2603:1040:1002:400::/122\"\ - ,\r\n \"2603:1040:1002:800::/122\",\r\n \"2603:1040:1002:c00::/122\"\ - ,\r\n \"2603:1040:1104::520/123\",\r\n \"2603:1040:1104:400::c0/122\"\ - ,\r\n \"2603:1050:6:402::c0/122\",\r\n \"2603:1050:6:802::c0/122\"\ - ,\r\n \"2603:1050:6:c02::c0/122\",\r\n \"2603:1050:403:400::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.AustraliaCentral\"\ - ,\r\n \"id\": \"AzureCosmosDB.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.36.42.8/32\"\ - ,\r\n \"20.36.106.0/26\",\r\n \"20.37.228.32/27\",\r\n \ - \ \"2603:1010:304:402::c0/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCosmosDB.AustraliaCentral2\",\r\n \"\ - id\": \"AzureCosmosDB.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiacentral2\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\ - \n \"20.36.75.163/32\",\r\n \"20.36.114.0/28\",\r\n \ - \ \"20.36.123.96/27\",\r\n \"2603:1010:404:402::c0/122\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.AustraliaEast\"\ - ,\r\n \"id\": \"AzureCosmosDB.AustraliaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.70.74.136/29\"\ - ,\r\n \"13.72.255.150/32\",\r\n \"13.75.134.84/32\",\r\n\ - \ \"20.53.41.0/27\",\r\n \"40.79.163.72/29\",\r\n \ - \ \"40.79.163.192/26\",\r\n \"40.79.170.48/28\",\r\n \ - \ \"40.79.174.192/26\",\r\n \"40.126.244.209/32\",\r\n \"\ - 52.156.170.104/32\",\r\n \"104.210.89.99/32\",\r\n \"2603:1010:6:402::c0/122\"\ - ,\r\n \"2603:1010:6:802::c0/122\",\r\n \"2603:1010:6:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.AustraliaSoutheast\"\ - ,\r\n \"id\": \"AzureCosmosDB.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\ - \n \"13.73.100.183/32\",\r\n \"13.77.50.0/28\",\r\n \ - \ \"52.255.52.19/32\",\r\n \"52.255.58.221/32\",\r\n \ - \ \"104.46.177.64/27\",\r\n \"191.239.179.124/32\",\r\n \ - \ \"2603:1010:101:402::c0/122\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureCosmosDB.BrazilSouth\",\r\n \"id\": \"\ - AzureCosmosDB.BrazilSouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureCosmosDB\"\ - ,\r\n \"addressPrefixes\": [\r\n \"104.41.52.61/32\",\r\n\ - \ \"104.41.54.69/32\",\r\n \"191.232.51.175/32\",\r\n \ - \ \"191.232.53.203/32\",\r\n \"191.233.204.128/27\",\r\n \ - \ \"191.234.138.160/27\",\r\n \"191.234.146.0/26\",\r\n \ - \ \"191.234.154.0/26\",\r\n \"191.234.179.157/32\",\r\n \ - \ \"2603:1050:6:402::c0/122\",\r\n \"2603:1050:6:802::c0/122\"\ - ,\r\n \"2603:1050:6:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.BrazilSoutheast\",\r\n \ - \ \"id\": \"AzureCosmosDB.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"191.233.11.192/27\"\ - ,\r\n \"191.233.50.64/26\",\r\n \"2603:1050:403:400::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.CanadaCentral\"\ - ,\r\n \"id\": \"AzureCosmosDB.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.71.170.0/28\"\ - ,\r\n \"13.88.253.180/32\",\r\n \"20.38.146.0/26\",\r\n\ - \ \"20.48.192.32/27\",\r\n \"52.233.41.60/32\",\r\n \ - \ \"52.237.20.252/32\",\r\n \"52.246.154.0/26\",\r\n \ - \ \"2603:1030:f05:402::c0/122\",\r\n \"2603:1030:f05:802::c0/122\"\ - ,\r\n \"2603:1030:f05:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.CanadaEast\",\r\n \ - \ \"id\": \"AzureCosmosDB.CanadaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"40.69.106.0/28\"\ - ,\r\n \"40.86.229.245/32\",\r\n \"40.89.22.224/27\",\r\n\ - \ \"52.235.40.247/32\",\r\n \"52.235.46.28/32\",\r\n \ - \ \"2603:1030:1005:402::c0/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCosmosDB.CentralIndia\",\r\n \"id\"\ - : \"AzureCosmosDB.CentralIndia\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.43.126.128/26\"\ - ,\r\n \"20.192.98.0/26\",\r\n \"40.80.50.0/26\",\r\n \ - \ \"52.140.110.64/27\",\r\n \"52.172.206.130/32\",\r\n \ - \ \"104.211.84.0/28\",\r\n \"104.211.102.50/32\",\r\n \ - \ \"2603:1040:a06::780/123\",\r\n \"2603:1040:a06:402::c0/122\"\ - ,\r\n \"2603:1040:a06:802::c0/122\",\r\n \"2603:1040:a06:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.CentralUS\"\ - ,\r\n \"id\": \"AzureCosmosDB.CentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.89.41.245/32\"\ - ,\r\n \"13.89.170.0/25\",\r\n \"13.89.190.186/32\",\r\n\ - \ \"13.89.224.229/32\",\r\n \"20.40.207.160/27\",\r\n \ - \ \"20.44.10.0/26\",\r\n \"40.77.63.179/32\",\r\n \ - \ \"40.122.132.89/32\",\r\n \"40.122.174.140/32\",\r\n \ - \ \"52.165.42.204/32\",\r\n \"52.165.46.249/32\",\r\n \"\ - 52.165.129.184/32\",\r\n \"52.165.229.112/32\",\r\n \"52.165.229.184/32\"\ - ,\r\n \"52.173.148.217/32\",\r\n \"52.173.196.170/32\",\r\ - \n \"52.173.240.244/32\",\r\n \"52.176.0.136/32\",\r\n \ - \ \"52.176.7.71/32\",\r\n \"52.176.101.49/32\",\r\n \ - \ \"52.176.155.127/32\",\r\n \"52.182.138.0/25\",\r\n \ - \ \"2603:1030:10:402::c0/122\",\r\n \"2603:1030:10:802::c0/122\"\ - ,\r\n \"2603:1030:10:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.CentralUSEUAP\",\r\n \ - \ \"id\": \"AzureCosmosDB.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.45.198.96/27\"\ - ,\r\n \"40.78.203.32/27\",\r\n \"52.180.160.251/32\",\r\n\ - \ \"52.180.161.1/32\",\r\n \"52.180.177.137/32\",\r\n \ - \ \"168.61.142.128/26\",\r\n \"2603:1030:f:2::2a0/123\",\r\ - \n \"2603:1030:f:400::8c0/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCosmosDB.EastAsia\",\r\n \"id\": \"\ - AzureCosmosDB.EastAsia\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureCosmosDB\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.75.34.0/26\",\r\n \ - \ \"20.187.196.0/27\",\r\n \"20.205.74.0/26\",\r\n \ - \ \"20.205.82.0/26\",\r\n \"23.102.239.134/32\",\r\n \"\ - 52.175.25.211/32\",\r\n \"52.175.39.232/32\",\r\n \"207.46.150.252/32\"\ - ,\r\n \"2603:1040:207:1::2a0/123\",\r\n \"2603:1040:207:402::c0/122\"\ - ,\r\n \"2603:1040:207:800::/122\",\r\n \"2603:1040:207:c00::/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.EastUS\"\ - ,\r\n \"id\": \"AzureCosmosDB.EastUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.82.53.191/32\"\ - ,\r\n \"13.90.199.155/32\",\r\n \"40.71.10.0/25\",\r\n \ - \ \"40.71.17.19/32\",\r\n \"40.71.203.37/32\",\r\n \ - \ \"40.71.204.115/32\",\r\n \"40.71.216.114/32\",\r\n \ - \ \"40.78.226.0/25\",\r\n \"40.79.154.128/26\",\r\n \"\ - 40.85.178.211/32\",\r\n \"52.146.79.160/27\",\r\n \"52.168.28.222/32\"\ - ,\r\n \"52.170.204.83/32\",\r\n \"52.186.69.224/32\",\r\n\ - \ \"52.191.197.220/32\",\r\n \"52.226.18.140/32\",\r\n \ - \ \"52.226.21.178/32\",\r\n \"104.45.131.193/32\",\r\n \ - \ \"104.45.144.73/32\",\r\n \"2603:1030:210:402::c0/122\"\ - ,\r\n \"2603:1030:210:802::c0/122\",\r\n \"2603:1030:210:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.EastUS2\"\ - ,\r\n \"id\": \"AzureCosmosDB.EastUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.68.28.135/32\"\ - ,\r\n \"20.49.102.64/27\",\r\n \"40.70.0.140/32\",\r\n \ - \ \"40.70.220.202/32\",\r\n \"40.79.39.162/32\",\r\n \ - \ \"40.79.59.92/32\",\r\n \"40.79.67.136/32\",\r\n \ - \ \"52.167.107.128/26\",\r\n \"52.177.172.74/32\",\r\n \"\ - 52.177.206.153/32\",\r\n \"52.179.141.33/32\",\r\n \"52.179.143.233/32\"\ - ,\r\n \"52.179.200.0/25\",\r\n \"52.184.152.241/32\",\r\n\ - \ \"104.208.231.0/25\",\r\n \"2603:1030:40c:402::c0/122\"\ - ,\r\n \"2603:1030:40c:802::c0/122\",\r\n \"2603:1030:40c:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.EastUS2EUAP\"\ - ,\r\n \"id\": \"AzureCosmosDB.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.39.15.64/27\"\ - ,\r\n \"40.74.147.192/26\",\r\n \"40.75.32.32/29\",\r\n\ - \ \"40.75.34.128/26\",\r\n \"40.89.67.208/32\",\r\n \ - \ \"52.138.66.90/32\",\r\n \"52.138.70.62/32\",\r\n \ - \ \"52.138.92.0/26\",\r\n \"2603:1030:40b:400::8c0/122\",\r\n \ - \ \"2603:1030:40b:800::c0/122\",\r\n \"2603:1030:40b:c00::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.FranceCentral\"\ - ,\r\n \"id\": \"AzureCosmosDB.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.43.46.0/27\"\ - ,\r\n \"40.79.130.0/28\",\r\n \"40.79.138.48/28\",\r\n \ - \ \"40.79.142.64/26\",\r\n \"40.79.146.48/28\",\r\n \ - \ \"40.79.149.128/26\",\r\n \"40.89.132.238/32\",\r\n \ - \ \"51.11.192.192/26\",\r\n \"52.143.136.41/32\",\r\n \ - \ \"2603:1020:805:402::c0/122\",\r\n \"2603:1020:805:802::c0/122\"\ - ,\r\n \"2603:1020:805:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.FranceSouth\",\r\n \ - \ \"id\": \"AzureCosmosDB.FranceSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"40.79.178.0/28\"\ - ,\r\n \"51.105.92.192/27\",\r\n \"52.136.134.25/32\",\r\n\ - \ \"52.136.134.250/32\",\r\n \"52.136.136.70/32\",\r\n \ - \ \"2603:1020:905:402::c0/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCosmosDB.GermanyNorth\",\r\n \"id\"\ - : \"AzureCosmosDB.GermanyNorth\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"51.116.50.224/27\"\ - ,\r\n \"51.116.58.64/26\",\r\n \"2603:1020:d04:402::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.GermanyWestCentral\"\ - ,\r\n \"id\": \"AzureCosmosDB.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"51.116.146.224/27\"\ - ,\r\n \"51.116.154.128/26\",\r\n \"51.116.242.0/26\",\r\n\ - \ \"51.116.250.0/26\",\r\n \"2603:1020:c04:402::c0/122\"\ - ,\r\n \"2603:1020:c04:802::c0/122\",\r\n \"2603:1020:c04:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.JapanEast\"\ - ,\r\n \"id\": \"AzureCosmosDB.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.78.51.35/32\"\ - ,\r\n \"13.78.106.0/26\",\r\n \"20.89.0.128/26\",\r\n \ - \ \"20.191.160.32/27\",\r\n \"40.79.186.16/28\",\r\n \ - \ \"40.79.191.0/26\",\r\n \"40.79.194.128/26\",\r\n \ - \ \"40.115.241.37/32\",\r\n \"104.41.177.93/32\",\r\n \"\ - 2603:1040:407:402::c0/122\",\r\n \"2603:1040:407:802::c0/122\",\r\ - \n \"2603:1040:407:c02::c0/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCosmosDB.JapanWest\",\r\n \"id\": \"\ - AzureCosmosDB.JapanWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureCosmosDB\"\ - ,\r\n \"addressPrefixes\": [\r\n \"40.74.98.0/26\",\r\n \ - \ \"40.74.143.235/32\",\r\n \"40.80.63.160/27\",\r\n \ - \ \"104.215.1.53/32\",\r\n \"104.215.21.39/32\",\r\n \ - \ \"104.215.55.227/32\",\r\n \"2603:1040:606:402::c0/122\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.JioIndiaCentral\"\ - ,\r\n \"id\": \"AzureCosmosDB.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.192.231.0/27\"\ - ,\r\n \"20.192.234.64/26\",\r\n \"2603:1040:1104::520/123\"\ - ,\r\n \"2603:1040:1104:400::c0/122\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.JioIndiaWest\",\r\n \ - \ \"id\": \"AzureCosmosDB.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.192.166.192/27\"\ - ,\r\n \"20.193.202.64/26\",\r\n \"2603:1040:d04:1::60/123\"\ - ,\r\n \"2603:1040:d04:400::c0/122\",\r\n \"2603:1040:d04:400::280/122\"\ - ,\r\n \"2603:1040:d04:400::3c0/122\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.KoreaCentral\",\r\n \ - \ \"id\": \"AzureCosmosDB.KoreaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.41.69.64/27\"\ - ,\r\n \"20.44.26.0/26\",\r\n \"20.194.66.64/26\",\r\n \ - \ \"20.194.80.64/26\",\r\n \"52.231.18.0/28\",\r\n \ - \ \"52.231.25.123/32\",\r\n \"52.231.39.143/32\",\r\n \ - \ \"52.231.56.0/28\",\r\n \"2603:1040:f05::680/123\",\r\n \ - \ \"2603:1040:f05:402::c0/122\",\r\n \"2603:1040:f05:802::c0/122\"\ - ,\r\n \"2603:1040:f05:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.KoreaSouth\",\r\n \ - \ \"id\": \"AzureCosmosDB.KoreaSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"40.80.173.0/27\"\ - ,\r\n \"52.231.146.0/27\",\r\n \"52.231.206.234/32\",\r\n\ - \ \"52.231.207.31/32\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"AzureCosmosDB.NorthCentralUS\",\r\n \"id\": \"AzureCosmosDB.NorthCentralUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"northcentralus\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.49.114.128/27\",\r\n \ - \ \"23.96.180.213/32\",\r\n \"23.96.219.207/32\",\r\n \ - \ \"23.96.242.234/32\",\r\n \"52.162.106.0/26\",\r\n \"\ - 52.162.252.26/32\",\r\n \"65.52.210.9/32\",\r\n \"157.55.170.133/32\"\ - ,\r\n \"2603:1030:608:402::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.NorthEurope\",\r\n \ - \ \"id\": \"AzureCosmosDB.NorthEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.69.226.0/25\"\ - ,\r\n \"13.74.106.0/25\",\r\n \"13.79.34.236/32\",\r\n \ - \ \"40.113.90.91/32\",\r\n \"52.138.141.112/32\",\r\n \ - \ \"52.138.197.33/32\",\r\n \"52.138.201.47/32\",\r\n \ - \ \"52.138.205.97/32\",\r\n \"52.138.206.153/32\",\r\n \ - \ \"52.138.227.192/26\",\r\n \"52.146.131.0/27\",\r\n \ - \ \"52.164.250.188/32\",\r\n \"52.169.122.37/32\",\r\n \ - \ \"52.169.219.183/32\",\r\n \"2603:1020:5:402::c0/122\",\r\n \ - \ \"2603:1020:5:802::c0/122\",\r\n \"2603:1020:5:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.NorwayEast\"\ - ,\r\n \"id\": \"AzureCosmosDB.NorwayEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"51.120.44.128/27\"\ - ,\r\n \"51.120.98.64/26\",\r\n \"51.120.106.0/26\",\r\n\ - \ \"51.120.210.0/26\",\r\n \"2603:1020:e04::680/123\",\r\ - \n \"2603:1020:e04:402::c0/122\",\r\n \"2603:1020:e04:802::c0/122\"\ - ,\r\n \"2603:1020:e04:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.NorwayWest\",\r\n \ - \ \"id\": \"AzureCosmosDB.NorwayWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"51.120.218.64/26\"\ - ,\r\n \"51.120.228.160/27\",\r\n \"2603:1020:f04:402::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.SouthAfricaNorth\"\ - ,\r\n \"id\": \"AzureCosmosDB.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"102.133.122.0/26\"\ - ,\r\n \"102.133.154.64/26\",\r\n \"102.133.220.0/27\",\r\ - \n \"102.133.250.0/26\",\r\n \"2603:1000:104:402::c0/122\"\ - ,\r\n \"2603:1000:104:802::c0/122\",\r\n \"2603:1000:104:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.SouthAfricaWest\"\ - ,\r\n \"id\": \"AzureCosmosDB.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"102.133.26.64/26\"\ - ,\r\n \"102.133.60.64/27\",\r\n \"2603:1000:4:402::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.SouthCentralUS\"\ - ,\r\n \"id\": \"AzureCosmosDB.SouthCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.65.145.92/32\"\ - ,\r\n \"13.66.26.107/32\",\r\n \"13.66.82.75/32\",\r\n \ - \ \"13.73.254.224/27\",\r\n \"13.84.150.178/32\",\r\n \ - \ \"13.84.157.70/32\",\r\n \"13.85.16.188/32\",\r\n \ - \ \"20.45.122.0/26\",\r\n \"20.49.90.64/26\",\r\n \"23.102.191.13/32\"\ - ,\r\n \"104.210.217.251/32\",\r\n \"104.214.18.0/25\",\r\ - \n \"104.214.23.192/27\",\r\n \"104.214.26.177/32\",\r\n\ - \ \"2603:1030:807:402::c0/122\",\r\n \"2603:1030:807:802::c0/122\"\ - ,\r\n \"2603:1030:807:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.SouthCentralUSSTG\",\r\n\ - \ \"id\": \"AzureCosmosDB.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.44.2.64/26\"\ - ,\r\n \"20.45.115.160/27\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureCosmosDB.SoutheastAsia\",\r\n \"id\"\ - : \"AzureCosmosDB.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.67.8.0/26\"\ - ,\r\n \"13.76.161.130/32\",\r\n \"23.98.82.0/26\",\r\n \ - \ \"23.98.107.224/27\",\r\n \"40.78.236.192/26\",\r\n \ - \ \"52.163.63.20/32\",\r\n \"52.163.249.82/32\",\r\n \ - \ \"52.187.11.8/32\",\r\n \"52.187.12.93/32\",\r\n \"\ - 52.230.15.63/32\",\r\n \"52.230.23.170/32\",\r\n \"52.230.70.94/32\"\ - ,\r\n \"52.230.87.21/32\",\r\n \"2603:1040:5:402::c0/122\"\ - ,\r\n \"2603:1040:5:802::c0/122\",\r\n \"2603:1040:5:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.SouthIndia\"\ - ,\r\n \"id\": \"AzureCosmosDB.SouthIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.71.115.125/32\"\ - ,\r\n \"13.71.124.81/32\",\r\n \"20.41.199.128/27\",\r\n\ - \ \"40.78.194.0/28\",\r\n \"52.172.55.127/32\",\r\n \ - \ \"104.211.227.84/32\",\r\n \"2603:1040:c06:402::c0/122\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.SwedenCentral\"\ - ,\r\n \"id\": \"AzureCosmosDB.SwedenCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"51.12.43.0/27\"\ - ,\r\n \"51.12.98.64/26\",\r\n \"51.12.226.0/26\",\r\n \ - \ \"51.12.234.0/26\",\r\n \"2603:1020:1004:1::60/123\",\r\n\ - \ \"2603:1020:1004:400::c0/122\",\r\n \"2603:1020:1004:400::280/122\"\ - ,\r\n \"2603:1020:1004:400::3c0/122\",\r\n \"2603:1020:1004:800::400/122\"\ - ,\r\n \"2603:1020:1004:c02::1c0/122\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.SwitzerlandNorth\",\r\n\ - \ \"id\": \"AzureCosmosDB.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.208.18.0/26\"\ - ,\r\n \"51.103.202.0/26\",\r\n \"51.107.52.224/27\",\r\n\ - \ \"51.107.58.64/26\",\r\n \"2603:1020:a04::6a0/123\",\r\ - \n \"2603:1020:a04:402::c0/122\",\r\n \"2603:1020:a04:802::c0/122\"\ - ,\r\n \"2603:1020:a04:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.SwitzerlandWest\",\r\n\ - \ \"id\": \"AzureCosmosDB.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"51.107.148.32/27\"\ - ,\r\n \"51.107.154.64/26\",\r\n \"2603:1020:b04:402::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.UAECentral\"\ - ,\r\n \"id\": \"AzureCosmosDB.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.37.68.160/27\"\ - ,\r\n \"20.37.75.128/26\",\r\n \"2603:1040:b04:402::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.UAENorth\"\ - ,\r\n \"id\": \"AzureCosmosDB.UAENorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.38.140.128/27\"\ - ,\r\n \"40.120.74.64/26\",\r\n \"65.52.251.128/26\",\r\n\ - \ \"2603:1040:904:402::c0/122\",\r\n \"2603:1040:904:802::c0/122\"\ - ,\r\n \"2603:1040:904:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.UKSouth\",\r\n \"\ - id\": \"AzureCosmosDB.UKSouth\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureCosmosDB\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.104.31.128/27\",\r\n\ - \ \"51.105.66.0/26\",\r\n \"51.105.74.0/26\",\r\n \ - \ \"51.140.52.73/32\",\r\n \"51.140.70.75/32\",\r\n \"\ - 51.140.75.146/32\",\r\n \"51.140.83.56/32\",\r\n \"51.140.99.233/32\"\ - ,\r\n \"51.140.146.0/27\",\r\n \"51.143.189.37/32\",\r\n\ - \ \"2603:1020:705:402::c0/122\",\r\n \"2603:1020:705:802::c0/122\"\ - ,\r\n \"2603:1020:705:c02::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.UKWest\",\r\n \"id\"\ - : \"AzureCosmosDB.UKWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureCosmosDB\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.137.166.128/27\",\r\n\ - \ \"51.140.210.0/27\",\r\n \"51.141.11.34/32\",\r\n \ - \ \"51.141.25.77/32\",\r\n \"51.141.53.76/32\",\r\n \ - \ \"51.141.55.229/32\",\r\n \"2603:1020:605:402::c0/122\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.WestCentralUS\"\ - ,\r\n \"id\": \"AzureCosmosDB.WestCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.71.194.0/26\"\ - ,\r\n \"13.78.188.25/32\",\r\n \"52.150.154.224/27\",\r\n\ - \ \"52.161.13.67/32\",\r\n \"52.161.15.197/32\",\r\n \ - \ \"52.161.22.131/32\",\r\n \"52.161.100.126/32\",\r\n \ - \ \"2603:1030:b04:402::c0/122\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureCosmosDB.WestEurope\",\r\n \"id\": \"\ - AzureCosmosDB.WestEurope\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureCosmosDB\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.69.66.0/25\",\r\n \ - \ \"13.69.66.128/29\",\r\n \"13.69.112.0/25\",\r\n \ - \ \"13.81.51.99/32\",\r\n \"13.94.201.5/32\",\r\n \"13.95.234.68/32\"\ - ,\r\n \"20.61.97.0/27\",\r\n \"40.68.44.85/32\",\r\n \ - \ \"40.114.240.253/32\",\r\n \"51.144.177.166/32\",\r\n \ - \ \"51.144.182.233/32\",\r\n \"52.174.253.239/32\",\r\n \ - \ \"52.178.108.222/32\",\r\n \"52.232.59.220/32\",\r\n \ - \ \"52.233.128.86/32\",\r\n \"52.236.189.0/26\",\r\n \ - \ \"104.45.16.183/32\",\r\n \"2603:1020:206:402::c0/122\",\r\n\ - \ \"2603:1020:206:802::c0/122\",\r\n \"2603:1020:206:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.WestIndia\"\ - ,\r\n \"id\": \"AzureCosmosDB.WestIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"52.136.52.64/27\"\ - ,\r\n \"104.211.146.0/28\",\r\n \"104.211.162.94/32\",\r\ - \n \"104.211.184.117/32\",\r\n \"104.211.188.174/32\",\r\ - \n \"2603:1040:806:402::c0/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureCosmosDB.WestUS\",\r\n \"id\": \"AzureCosmosDB.WestUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"westus\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.64.69.151/32\",\r\n \"\ - 13.64.113.68/32\",\r\n \"13.64.114.48/32\",\r\n \"13.64.194.140/32\"\ - ,\r\n \"13.88.30.39/32\",\r\n \"13.91.246.52/32\",\r\n \ - \ \"13.93.153.80/32\",\r\n \"13.93.156.125/32\",\r\n \ - \ \"13.93.207.66/32\",\r\n \"20.49.126.160/27\",\r\n \ - \ \"40.83.137.191/32\",\r\n \"40.112.140.12/32\",\r\n \ - \ \"40.112.241.0/24\",\r\n \"40.112.249.60/32\",\r\n \"\ - 40.118.245.44/32\",\r\n \"40.118.245.251/32\",\r\n \"137.117.9.157/32\"\ - ,\r\n \"2603:1030:a07:402::c0/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureCosmosDB.WestUS2\",\r\n \"\ - id\": \"AzureCosmosDB.WestUS2\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureCosmosDB\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.138.0/26\",\r\n \ - \ \"20.36.26.132/32\",\r\n \"40.64.135.0/27\",\r\n \ - \ \"40.65.106.154/32\",\r\n \"40.65.114.105/32\",\r\n \ - \ \"40.78.243.192/26\",\r\n \"40.78.250.0/26\",\r\n \"\ - 52.151.16.118/32\",\r\n \"52.158.234.203/32\",\r\n \"52.183.42.252/32\"\ - ,\r\n \"52.183.66.36/32\",\r\n \"52.183.92.223/32\",\r\n\ - \ \"52.183.119.101/32\",\r\n \"2603:1030:c06:400::8c0/122\"\ - ,\r\n \"2603:1030:c06:802::c0/122\",\r\n \"2603:1030:c06:c02::c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.WestUS3\"\ - ,\r\n \"id\": \"AzureCosmosDB.WestUS3\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.150.166.192/27\"\ - ,\r\n \"20.150.170.64/26\",\r\n \"20.150.178.0/26\",\r\n\ - \ \"20.150.186.0/26\",\r\n \"2603:1030:504::60/123\",\r\n\ - \ \"2603:1030:504:402::c0/122\",\r\n \"2603:1030:504:402::280/122\"\ - ,\r\n \"2603:1030:504:402::3c0/122\",\r\n \"2603:1030:504:802::200/122\"\ - ,\r\n \"2603:1030:504:c02::3c0/122\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureDatabricks\",\r\n \"id\":\ - \ \"AzureDatabricks\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\"\ - : \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n\ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureDatabricks\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.70.105.50/32\",\r\n\ - \ \"13.70.107.141/32\",\r\n \"13.71.184.74/32\",\r\n \ - \ \"13.71.187.166/32\",\r\n \"13.75.164.249/32\",\r\n \ - \ \"13.75.218.172/32\",\r\n \"13.78.18.152/32\",\r\n \ - \ \"13.78.19.235/32\",\r\n \"13.86.58.215/32\",\r\n \"\ - 13.88.249.244/32\",\r\n \"20.21.32.32/29\",\r\n \"20.36.120.68/30\"\ - ,\r\n \"20.37.64.68/30\",\r\n \"20.37.156.208/28\",\r\n\ - \ \"20.37.195.16/29\",\r\n \"20.37.224.68/30\",\r\n \ - \ \"20.38.84.80/28\",\r\n \"20.38.136.120/29\",\r\n \ - \ \"20.39.8.68/30\",\r\n \"20.41.4.112/28\",\r\n \"20.41.65.136/29\"\ - ,\r\n \"20.41.192.68/30\",\r\n \"20.42.4.208/28\",\r\n \ - \ \"20.42.129.160/28\",\r\n \"20.42.224.68/30\",\r\n \ - \ \"20.43.41.152/29\",\r\n \"20.43.65.144/29\",\r\n \ - \ \"20.43.130.96/28\",\r\n \"20.45.112.68/30\",\r\n \"\ - 20.45.192.68/30\",\r\n \"20.46.12.200/29\",\r\n \"20.46.121.76/32\"\ - ,\r\n \"20.52.93.40/29\",\r\n \"20.72.16.32/29\",\r\n \ - \ \"20.99.8.64/29\",\r\n \"20.150.160.104/30\",\r\n \ - \ \"20.150.160.208/29\",\r\n \"20.186.83.56/32\",\r\n \ - \ \"20.189.106.192/28\",\r\n \"20.192.160.32/29\",\r\n \ - \ \"20.192.225.24/29\",\r\n \"20.194.4.102/32\",\r\n \"\ - 23.97.106.142/32\",\r\n \"23.97.201.41/32\",\r\n \"23.100.0.135/32\"\ - ,\r\n \"23.100.226.13/32\",\r\n \"23.101.147.147/32\",\r\ - \n \"23.101.152.95/32\",\r\n \"40.67.48.68/30\",\r\n \ - \ \"40.70.58.221/32\",\r\n \"40.74.30.80/28\",\r\n \ - \ \"40.80.56.68/30\",\r\n \"40.80.168.68/30\",\r\n \"40.80.188.0/28\"\ - ,\r\n \"40.82.248.112/28\",\r\n \"40.83.176.199/32\",\r\n\ - \ \"40.83.178.242/32\",\r\n \"40.85.223.25/32\",\r\n \ - \ \"40.86.167.110/32\",\r\n \"40.89.16.68/30\",\r\n \ - \ \"40.89.168.225/32\",\r\n \"40.89.170.184/32\",\r\n \ - \ \"40.89.171.101/32\",\r\n \"40.118.174.12/32\",\r\n \"\ - 40.119.9.208/28\",\r\n \"40.123.212.253/32\",\r\n \"40.123.218.63/32\"\ - ,\r\n \"40.123.219.125/32\",\r\n \"40.123.225.135/32\",\r\ - \n \"40.127.5.82/32\",\r\n \"40.127.5.124/32\",\r\n \ - \ \"40.127.147.196/32\",\r\n \"51.12.41.16/30\",\r\n \ - \ \"51.12.47.16/29\",\r\n \"51.12.193.16/30\",\r\n \"\ - 51.12.198.200/29\",\r\n \"51.103.18.111/32\",\r\n \"51.104.25.136/30\"\ - ,\r\n \"51.105.80.68/30\",\r\n \"51.105.88.68/30\",\r\n\ - \ \"51.107.48.120/30\",\r\n \"51.107.144.68/30\",\r\n \ - \ \"51.107.246.160/29\",\r\n \"51.116.74.16/29\",\r\n \ - \ \"51.120.40.120/30\",\r\n \"51.120.224.68/30\",\r\n \ - \ \"51.120.234.176/29\",\r\n \"51.137.160.120/29\",\r\n \ - \ \"51.138.96.158/32\",\r\n \"51.140.200.46/32\",\r\n \ - \ \"51.140.203.27/32\",\r\n \"51.140.204.4/32\",\r\n \"\ - 51.141.103.193/32\",\r\n \"51.143.192.68/30\",\r\n \"52.136.48.68/30\"\ - ,\r\n \"52.140.104.120/29\",\r\n \"52.141.6.71/32\",\r\n\ - \ \"52.141.6.181/32\",\r\n \"52.141.22.164/32\",\r\n \ - \ \"52.146.50.16/32\",\r\n \"52.150.136.68/30\",\r\n \ - \ \"52.172.133.58/32\",\r\n \"52.187.0.85/32\",\r\n \"\ - 52.187.3.203/32\",\r\n \"52.187.145.107/32\",\r\n \"52.228.81.136/29\"\ - ,\r\n \"52.230.27.216/32\",\r\n \"52.232.19.246/32\",\r\n\ - \ \"52.246.160.72/32\",\r\n \"52.247.0.200/32\",\r\n \ - \ \"102.37.41.3/32\",\r\n \"102.133.56.68/30\",\r\n \ - \ \"102.133.216.96/29\",\r\n \"102.133.224.24/32\",\r\n \ - \ \"104.41.54.118/32\",\r\n \"104.45.7.191/32\",\r\n \"\ - 104.211.89.81/32\",\r\n \"104.211.101.14/32\",\r\n \"104.211.103.82/32\"\ - ,\r\n \"191.232.53.223/32\",\r\n \"191.233.8.32/29\",\r\n\ - \ \"191.234.160.82/32\",\r\n \"191.235.225.144/29\",\r\n\ - \ \"2603:1000:4::160/123\",\r\n \"2603:1000:104:1::160/123\"\ - ,\r\n \"2603:1010:6:1::160/123\",\r\n \"2603:1010:101::160/123\"\ - ,\r\n \"2603:1010:304::160/123\",\r\n \"2603:1010:404::160/123\"\ - ,\r\n \"2603:1020:5:1::160/123\",\r\n \"2603:1020:206:1::160/123\"\ - ,\r\n \"2603:1020:305::160/123\",\r\n \"2603:1020:405::160/123\"\ - ,\r\n \"2603:1020:605::160/123\",\r\n \"2603:1020:705:1::160/123\"\ - ,\r\n \"2603:1020:805:1::160/123\",\r\n \"2603:1020:905::160/123\"\ - ,\r\n \"2603:1020:a04:1::160/123\",\r\n \"2603:1020:b04::160/123\"\ - ,\r\n \"2603:1020:c04:1::160/123\",\r\n \"2603:1020:d04::160/123\"\ - ,\r\n \"2603:1020:e04:1::160/123\",\r\n \"2603:1020:f04::160/123\"\ - ,\r\n \"2603:1020:1004::160/123\",\r\n \"2603:1020:1104::160/123\"\ - ,\r\n \"2603:1030:f:1::160/123\",\r\n \"2603:1030:10:1::160/123\"\ - ,\r\n \"2603:1030:104:1::160/123\",\r\n \"2603:1030:107::160/123\"\ - ,\r\n \"2603:1030:210:1::160/123\",\r\n \"2603:1030:40b:1::160/123\"\ - ,\r\n \"2603:1030:40c:1::160/123\",\r\n \"2603:1030:504:1::160/123\"\ - ,\r\n \"2603:1030:608::160/123\",\r\n \"2603:1030:807:1::160/123\"\ - ,\r\n \"2603:1030:a07::160/123\",\r\n \"2603:1030:b04::160/123\"\ - ,\r\n \"2603:1030:c06:1::160/123\",\r\n \"2603:1030:f05:1::160/123\"\ - ,\r\n \"2603:1030:1005::160/123\",\r\n \"2603:1040:5:1::160/123\"\ - ,\r\n \"2603:1040:207::160/123\",\r\n \"2603:1040:407:1::160/123\"\ - ,\r\n \"2603:1040:606::160/123\",\r\n \"2603:1040:806::160/123\"\ - ,\r\n \"2603:1040:904:1::160/123\",\r\n \"2603:1040:a06:1::160/123\"\ - ,\r\n \"2603:1040:b04::160/123\",\r\n \"2603:1040:c06::160/123\"\ - ,\r\n \"2603:1040:d04::160/123\",\r\n \"2603:1040:f05:1::160/123\"\ - ,\r\n \"2603:1040:1002::e0/123\",\r\n \"2603:1040:1104::160/123\"\ - ,\r\n \"2603:1050:6:1::160/123\",\r\n \"2603:1050:403::160/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureDataExplorerManagement\"\ - ,\r\n \"id\": \"AzureDataExplorerManagement\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureDataExplorerManagement\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.64.38.225/32\",\r\n\ - \ \"13.66.141.160/28\",\r\n \"13.69.106.240/28\",\r\n \ - \ \"13.69.229.176/28\",\r\n \"13.70.73.112/28\",\r\n \ - \ \"13.71.173.64/28\",\r\n \"13.71.196.64/28\",\r\n \ - \ \"13.73.240.96/28\",\r\n \"13.75.39.0/28\",\r\n \"13.77.52.240/28\"\ - ,\r\n \"13.86.36.42/32\",\r\n \"13.86.219.64/28\",\r\n \ - \ \"13.87.57.224/28\",\r\n \"13.87.123.224/28\",\r\n \ - \ \"13.89.174.80/28\",\r\n \"20.21.37.0/28\",\r\n \"\ - 20.36.242.104/32\",\r\n \"20.37.24.1/32\",\r\n \"20.39.97.38/32\"\ - ,\r\n \"20.39.99.177/32\",\r\n \"20.40.114.21/32\",\r\n\ - \ \"20.40.161.39/32\",\r\n \"20.43.89.90/32\",\r\n \ - \ \"20.43.120.96/28\",\r\n \"20.44.16.96/28\",\r\n \"\ - 20.44.27.96/28\",\r\n \"20.45.3.60/32\",\r\n \"20.46.13.240/28\"\ - ,\r\n \"20.46.146.7/32\",\r\n \"20.72.27.128/28\",\r\n \ - \ \"20.99.9.224/28\",\r\n \"20.150.171.192/28\",\r\n \ - \ \"20.150.245.112/28\",\r\n \"20.185.100.27/32\",\r\n \ - \ \"20.189.74.103/32\",\r\n \"20.192.47.96/28\",\r\n \ - \ \"20.192.235.128/28\",\r\n \"20.193.203.96/28\",\r\n \ - \ \"20.194.75.224/28\",\r\n \"20.195.78.80/28\",\r\n \"\ - 23.98.82.240/28\",\r\n \"40.66.57.57/32\",\r\n \"40.66.57.91/32\"\ - ,\r\n \"40.67.188.68/32\",\r\n \"40.69.107.240/28\",\r\n\ - \ \"40.71.13.176/28\",\r\n \"40.74.101.208/28\",\r\n \ - \ \"40.74.147.80/28\",\r\n \"40.78.195.240/28\",\r\n \ - \ \"40.78.203.176/28\",\r\n \"40.79.131.224/28\",\r\n \ - \ \"40.79.179.208/28\",\r\n \"40.79.187.16/28\",\r\n \"\ - 40.80.234.9/32\",\r\n \"40.80.250.168/32\",\r\n \"40.80.255.12/32\"\ - ,\r\n \"40.81.28.50/32\",\r\n \"40.81.43.47/32\",\r\n \ - \ \"40.81.56.122/32\",\r\n \"40.81.72.110/32\",\r\n \ - \ \"40.81.88.112/32\",\r\n \"40.81.89.242/32\",\r\n \"\ - 40.81.122.39/32\",\r\n \"40.81.154.254/32\",\r\n \"40.81.184.86/32\"\ - ,\r\n \"40.81.220.38/32\",\r\n \"40.81.248.53/32\",\r\n\ - \ \"40.81.249.251/32\",\r\n \"40.82.154.174/32\",\r\n \ - \ \"40.82.156.149/32\",\r\n \"40.82.188.208/32\",\r\n \ - \ \"40.82.217.84/32\",\r\n \"40.82.236.24/32\",\r\n \ - \ \"40.89.56.69/32\",\r\n \"40.90.219.23/32\",\r\n \"40.91.74.95/32\"\ - ,\r\n \"40.119.3.195/32\",\r\n \"40.119.203.252/32\",\r\n\ - \ \"51.12.20.48/28\",\r\n \"51.12.28.48/28\",\r\n \ - \ \"51.12.99.192/28\",\r\n \"51.12.203.192/28\",\r\n \ - \ \"51.104.8.112/28\",\r\n \"51.107.59.160/28\",\r\n \"\ - 51.107.98.201/32\",\r\n \"51.107.155.160/28\",\r\n \"51.107.247.128/28\"\ - ,\r\n \"51.116.59.160/28\",\r\n \"51.116.98.150/32\",\r\n\ - \ \"51.116.155.224/28\",\r\n \"51.120.99.80/28\",\r\n \ - \ \"51.120.219.192/28\",\r\n \"51.120.235.224/28\",\r\n \ - \ \"51.140.212.0/28\",\r\n \"51.145.176.215/32\",\r\n \ - \ \"52.142.91.221/32\",\r\n \"52.159.55.120/32\",\r\n \ - \ \"52.162.110.176/28\",\r\n \"52.224.146.56/32\",\r\n \ - \ \"52.231.148.16/28\",\r\n \"52.232.230.201/32\",\r\n \ - \ \"52.253.159.186/32\",\r\n \"52.253.225.186/32\",\r\n \ - \ \"52.253.226.110/32\",\r\n \"102.133.0.192/32\",\r\n \ - \ \"102.133.28.112/28\",\r\n \"102.133.130.206/32\",\r\n \ - \ \"102.133.156.16/28\",\r\n \"104.211.147.224/28\",\r\n \ - \ \"191.233.25.183/32\",\r\n \"191.233.50.208/28\",\r\n \ - \ \"191.233.205.0/28\",\r\n \"2603:1000:4:1::380/121\",\r\n \ - \ \"2603:1000:4:402::150/124\",\r\n \"2603:1000:104:2::100/121\"\ - ,\r\n \"2603:1000:104:402::150/124\",\r\n \"2603:1010:6::600/121\"\ - ,\r\n \"2603:1010:6:402::150/124\",\r\n \"2603:1010:101:1::380/121\"\ - ,\r\n \"2603:1010:101:402::150/124\",\r\n \"2603:1010:304:1::380/121\"\ - ,\r\n \"2603:1010:304:402::150/124\",\r\n \"2603:1010:404:1::380/121\"\ - ,\r\n \"2603:1010:404:402::150/124\",\r\n \"2603:1020:5::600/121\"\ - ,\r\n \"2603:1020:5:402::150/124\",\r\n \"2603:1020:206::600/121\"\ - ,\r\n \"2603:1020:206:402::150/124\",\r\n \"2603:1020:305:402::150/124\"\ - ,\r\n \"2603:1020:405:402::150/124\",\r\n \"2603:1020:605:1::380/121\"\ - ,\r\n \"2603:1020:605:402::150/124\",\r\n \"2603:1020:705::600/121\"\ - ,\r\n \"2603:1020:705:402::150/124\",\r\n \"2603:1020:805::600/121\"\ - ,\r\n \"2603:1020:805:402::150/124\",\r\n \"2603:1020:905:1::380/121\"\ - ,\r\n \"2603:1020:905:402::150/124\",\r\n \"2603:1020:a04::600/121\"\ - ,\r\n \"2603:1020:a04:402::150/124\",\r\n \"2603:1020:b04:1::380/121\"\ - ,\r\n \"2603:1020:b04:402::150/124\",\r\n \"2603:1020:c04::600/121\"\ - ,\r\n \"2603:1020:c04:402::150/124\",\r\n \"2603:1020:d04:1::380/121\"\ - ,\r\n \"2603:1020:d04:402::150/124\",\r\n \"2603:1020:e04::600/121\"\ - ,\r\n \"2603:1020:e04:402::150/124\",\r\n \"2603:1020:f04:1::380/121\"\ - ,\r\n \"2603:1020:f04:402::150/124\",\r\n \"2603:1020:1004:2::100/121\"\ - ,\r\n \"2603:1020:1004:800::d0/124\",\r\n \"2603:1020:1104:1::600/121\"\ - ,\r\n \"2603:1020:1104:400::150/124\",\r\n \"2603:1030:f:2::380/121\"\ - ,\r\n \"2603:1030:f:400::950/124\",\r\n \"2603:1030:10::600/121\"\ - ,\r\n \"2603:1030:10:402::150/124\",\r\n \"2603:1030:104::600/121\"\ - ,\r\n \"2603:1030:104:402::150/124\",\r\n \"2603:1030:107:1::300/121\"\ - ,\r\n \"2603:1030:107:400::e0/124\",\r\n \"2603:1030:210::600/121\"\ - ,\r\n \"2603:1030:210:402::150/124\",\r\n \"2603:1030:40b:2::400/121\"\ - ,\r\n \"2603:1030:40b:400::950/124\",\r\n \"2603:1030:40c::600/121\"\ - ,\r\n \"2603:1030:40c:402::150/124\",\r\n \"2603:1030:504:2::180/121\"\ - ,\r\n \"2603:1030:504:802::d0/124\",\r\n \"2603:1030:608:1::380/121\"\ - ,\r\n \"2603:1030:608:402::150/124\",\r\n \"2603:1030:807::600/121\"\ - ,\r\n \"2603:1030:807:402::150/124\",\r\n \"2603:1030:a07:1::380/121\"\ - ,\r\n \"2603:1030:a07:402::8d0/124\",\r\n \"2603:1030:b04:1::380/121\"\ - ,\r\n \"2603:1030:b04:402::150/124\",\r\n \"2603:1030:c06:2::400/121\"\ - ,\r\n \"2603:1030:c06:400::950/124\",\r\n \"2603:1030:f05::600/121\"\ - ,\r\n \"2603:1030:f05:402::150/124\",\r\n \"2603:1030:1005:1::380/121\"\ - ,\r\n \"2603:1030:1005:402::150/124\",\r\n \"2603:1040:5::700/121\"\ - ,\r\n \"2603:1040:5:402::150/124\",\r\n \"2603:1040:207:1::380/121\"\ - ,\r\n \"2603:1040:207:402::150/124\",\r\n \"2603:1040:407::600/121\"\ - ,\r\n \"2603:1040:407:402::150/124\",\r\n \"2603:1040:606:1::380/121\"\ - ,\r\n \"2603:1040:606:402::150/124\",\r\n \"2603:1040:806:1::380/121\"\ - ,\r\n \"2603:1040:806:402::150/124\",\r\n \"2603:1040:904::600/121\"\ - ,\r\n \"2603:1040:904:402::150/124\",\r\n \"2603:1040:a06::700/121\"\ - ,\r\n \"2603:1040:a06:402::150/124\",\r\n \"2603:1040:b04:1::380/121\"\ - ,\r\n \"2603:1040:b04:402::150/124\",\r\n \"2603:1040:c06:1::380/121\"\ - ,\r\n \"2603:1040:c06:402::150/124\",\r\n \"2603:1040:d04:2::280/121\"\ - ,\r\n \"2603:1040:d04:800::d0/124\",\r\n \"2603:1040:e05::180/121\"\ - ,\r\n \"2603:1040:f05::600/121\",\r\n \"2603:1040:f05:402::150/124\"\ - ,\r\n \"2603:1040:1002:1::180/123\",\r\n \"2603:1040:1104:1::680/121\"\ - ,\r\n \"2603:1040:1104:400::150/124\",\r\n \"2603:1050:6::600/121\"\ - ,\r\n \"2603:1050:6:402::150/124\",\r\n \"2603:1050:403:1::400/121\"\ - ,\r\n \"2603:1050:403:400::2b0/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureDataLake\",\r\n \"id\": \"\ - AzureDataLake\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"\ - properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\"\ - : \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n\ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureDataLake\"\ - ,\r\n \"addressPrefixes\": [\r\n \"40.90.138.133/32\",\r\n\ - \ \"40.90.138.136/32\",\r\n \"40.90.141.128/29\",\r\n \ - \ \"40.90.141.167/32\",\r\n \"40.90.144.0/27\",\r\n \ - \ \"40.90.145.192/26\",\r\n \"65.52.108.31/32\",\r\n \ - \ \"65.52.108.38/32\",\r\n \"104.44.88.66/31\",\r\n \"104.44.88.106/31\"\ - ,\r\n \"104.44.88.112/31\",\r\n \"104.44.88.176/31\",\r\n\ - \ \"104.44.88.184/29\",\r\n \"104.44.89.39/32\",\r\n \ - \ \"104.44.89.42/32\",\r\n \"104.44.90.128/27\",\r\n \ - \ \"104.44.90.194/31\",\r\n \"104.44.91.64/27\",\r\n \ - \ \"104.44.91.160/27\",\r\n \"104.44.93.192/27\"\r\n ]\r\n\ - \ }\r\n },\r\n {\r\n \"name\": \"AzureDeviceUpdate\",\r\n\ - \ \"id\": \"AzureDeviceUpdate\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureDeviceUpdate\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.37.71.192/28\",\r\n\ - \ \"20.38.143.224/28\",\r\n \"20.40.229.32/28\",\r\n \ - \ \"20.45.116.224/28\",\r\n \"20.45.241.192/26\",\r\n \ - \ \"20.46.11.192/28\",\r\n \"20.48.196.112/28\",\r\n \ - \ \"20.49.119.192/28\",\r\n \"20.51.12.64/26\",\r\n \"\ - 20.51.20.64/28\",\r\n \"20.53.47.16/28\",\r\n \"20.53.48.160/28\"\ - ,\r\n \"20.53.56.96/28\",\r\n \"20.58.67.0/28\",\r\n \ - \ \"20.59.77.64/26\",\r\n \"20.61.102.96/28\",\r\n \ - \ \"20.62.59.16/28\",\r\n \"20.62.132.240/28\",\r\n \"\ - 20.62.135.128/27\",\r\n \"20.62.135.160/28\",\r\n \"20.65.133.64/28\"\ - ,\r\n \"20.66.3.208/28\",\r\n \"20.69.0.112/28\",\r\n \ - \ \"20.69.4.64/26\",\r\n \"20.69.4.128/26\",\r\n \ - \ \"20.86.93.128/26\",\r\n \"20.150.244.16/28\",\r\n \"\ - 20.189.225.240/28\",\r\n \"20.191.165.240/28\",\r\n \"20.192.43.240/28\"\ - ,\r\n \"20.192.48.112/28\",\r\n \"20.192.80.0/28\",\r\n\ - \ \"20.192.167.208/28\",\r\n \"20.194.73.224/28\",\r\n \ - \ \"20.195.65.112/28\",\r\n \"20.195.72.112/28\",\r\n \ - \ \"20.205.67.192/26\",\r\n \"40.67.53.144/28\",\r\n \ - \ \"51.12.46.112/28\",\r\n \"51.12.198.96/28\",\r\n \"\ - 51.13.137.48/28\",\r\n \"51.107.242.112/28\",\r\n \"51.107.250.224/28\"\ - ,\r\n \"51.116.54.160/28\",\r\n \"51.116.149.192/28\",\r\ - \n \"51.120.233.80/28\",\r\n \"51.138.210.80/28\",\r\n \ - \ \"51.143.212.48/28\",\r\n \"52.136.185.128/28\",\r\n \ - \ \"52.139.107.80/28\",\r\n \"52.146.136.16/28\",\r\n \ - \ \"52.147.112.192/28\",\r\n \"52.172.113.176/28\",\r\n \ - \ \"102.37.80.176/28\",\r\n \"102.37.160.128/28\",\r\n \ - \ \"104.46.179.224/28\",\r\n \"191.233.15.240/28\",\r\n \ - \ \"191.234.142.240/28\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"AzureDevOps\",\r\n \"id\": \"AzureDevOps\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"\",\r\n \"\ - state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\ - \n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"AzureDevOps\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.37.158.0/23\",\r\n \"20.37.194.0/24\",\r\n\ - \ \"20.39.13.0/26\",\r\n \"20.41.6.0/23\",\r\n \ - \ \"20.41.194.0/24\",\r\n \"20.42.5.0/24\",\r\n \"20.42.134.0/23\"\ - ,\r\n \"20.42.226.0/24\",\r\n \"20.45.196.64/26\",\r\n \ - \ \"20.189.107.0/24\",\r\n \"20.195.68.0/24\",\r\n \ - \ \"40.74.28.0/23\",\r\n \"40.80.187.0/24\",\r\n \"40.82.252.0/24\"\ - ,\r\n \"40.119.10.0/24\",\r\n \"51.104.26.0/24\",\r\n \ - \ \"52.150.138.0/24\",\r\n \"52.228.82.0/24\",\r\n \ - \ \"191.235.226.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"AzureDevSpaces\",\r\n \"id\": \"AzureDevSpaces\",\r\n\ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n\ - \ \"changeNumber\": \"1\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"AzureDevSpaces\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.69.71.144/28\",\r\n \"13.70.78.176/28\",\r\n\ - \ \"13.71.175.112/28\",\r\n \"13.71.199.96/28\",\r\n \ - \ \"13.73.244.128/28\",\r\n \"13.74.111.128/28\",\r\n \ - \ \"13.78.111.144/28\",\r\n \"13.86.221.224/28\",\r\n \ - \ \"20.37.157.64/28\",\r\n \"20.37.195.80/28\",\r\n \"\ - 20.38.85.128/28\",\r\n \"20.39.11.64/28\",\r\n \"20.41.5.128/28\"\ - ,\r\n \"20.42.6.32/27\",\r\n \"20.42.6.128/28\",\r\n \ - \ \"20.42.64.64/26\",\r\n \"20.42.131.192/27\",\r\n \ - \ \"20.42.230.64/28\",\r\n \"20.43.65.208/28\",\r\n \"\ - 20.43.130.240/28\",\r\n \"20.189.108.32/28\",\r\n \"40.69.110.176/28\"\ - ,\r\n \"40.70.151.80/28\",\r\n \"40.74.30.144/28\",\r\n\ - \ \"40.75.35.224/28\",\r\n \"40.78.239.0/28\",\r\n \ - \ \"40.78.251.224/27\",\r\n \"40.82.253.112/28\",\r\n \ - \ \"40.89.17.192/28\",\r\n \"40.119.9.240/28\",\r\n \"\ - 51.104.25.208/28\",\r\n \"51.105.77.64/28\",\r\n \"52.150.139.144/28\"\ - ,\r\n \"52.182.141.128/28\",\r\n \"52.228.81.224/28\",\r\ - \n \"104.214.161.48/28\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureDigitalTwins\",\r\n \"id\": \"AzureDigitalTwins\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"6\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"AzureDigitalTwins\",\r\n \"\ - addressPrefixes\": [\r\n \"20.21.36.64/27\",\r\n \"20.36.125.120/29\"\ - ,\r\n \"20.36.125.192/27\",\r\n \"20.37.70.112/29\",\r\n\ - \ \"20.37.70.192/27\",\r\n \"20.38.142.112/29\",\r\n \ - \ \"20.38.142.192/27\",\r\n \"20.39.2.134/32\",\r\n \ - \ \"20.39.2.208/32\",\r\n \"20.39.2.237/32\",\r\n \"20.39.3.11/32\"\ - ,\r\n \"20.39.3.14/32\",\r\n \"20.39.3.17/32\",\r\n \ - \ \"20.39.3.38/32\",\r\n \"20.39.18.169/32\",\r\n \"\ - 20.40.225.48/29\",\r\n \"20.40.225.128/27\",\r\n \"20.43.47.72/29\"\ - ,\r\n \"20.43.47.96/27\",\r\n \"20.45.116.80/29\",\r\n \ - \ \"20.45.116.96/27\",\r\n \"20.46.10.56/29\",\r\n \ - \ \"20.46.10.96/27\",\r\n \"20.48.193.128/27\",\r\n \"\ - 20.48.193.160/29\",\r\n \"20.49.103.112/29\",\r\n \"20.49.103.192/27\"\ - ,\r\n \"20.49.118.8/29\",\r\n \"20.49.118.32/27\",\r\n \ - \ \"20.49.248.209/32\",\r\n \"20.49.249.56/32\",\r\n \ - \ \"20.49.249.78/32\",\r\n \"20.49.249.101/32\",\r\n \ - \ \"20.49.249.106/32\",\r\n \"20.49.249.156/32\",\r\n \ - \ \"20.49.249.189/32\",\r\n \"20.49.249.208/32\",\r\n \"\ - 20.49.249.236/32\",\r\n \"20.49.250.2/32\",\r\n \"20.50.211.192/32\"\ - ,\r\n \"20.50.212.99/32\",\r\n \"20.50.212.103/32\",\r\n\ - \ \"20.50.212.140/32\",\r\n \"20.50.213.6/32\",\r\n \ - \ \"20.50.213.76/32\",\r\n \"20.50.213.88/32\",\r\n \ - \ \"20.50.213.93/32\",\r\n \"20.50.213.94/32\",\r\n \"\ - 20.50.213.120/32\",\r\n \"20.51.8.96/27\",\r\n \"20.51.8.192/29\"\ - ,\r\n \"20.51.16.176/29\",\r\n \"20.51.17.0/27\",\r\n \ - \ \"20.51.73.8/32\",\r\n \"20.51.73.11/32\",\r\n \ - \ \"20.51.73.22/31\",\r\n \"20.51.73.25/32\",\r\n \"20.51.73.26/31\"\ - ,\r\n \"20.51.73.36/32\",\r\n \"20.51.73.39/32\",\r\n \ - \ \"20.51.73.44/32\",\r\n \"20.53.44.88/29\",\r\n \ - \ \"20.53.44.96/27\",\r\n \"20.53.48.0/27\",\r\n \"20.53.48.32/29\"\ - ,\r\n \"20.53.114.26/32\",\r\n \"20.53.114.71/32\",\r\n\ - \ \"20.53.114.84/32\",\r\n \"20.53.114.118/32\",\r\n \ - \ \"20.58.66.0/27\",\r\n \"20.58.66.32/29\",\r\n \"\ - 20.61.98.144/29\",\r\n \"20.61.99.0/27\",\r\n \"20.62.129.32/27\"\ - ,\r\n \"20.62.129.128/29\",\r\n \"20.65.130.72/29\",\r\n\ - \ \"20.65.130.96/27\",\r\n \"20.66.2.16/29\",\r\n \ - \ \"20.66.2.128/27\",\r\n \"20.72.20.0/27\",\r\n \"20.150.166.176/29\"\ - ,\r\n \"20.150.167.128/27\",\r\n \"20.185.75.6/32\",\r\n\ - \ \"20.185.75.209/32\",\r\n \"20.187.197.16/29\",\r\n \ - \ \"20.187.197.128/27\",\r\n \"20.189.224.224/27\",\r\n \ - \ \"20.189.225.64/29\",\r\n \"20.191.161.96/27\",\r\n \ - \ \"20.191.161.192/29\",\r\n \"20.192.166.176/29\",\r\n \ - \ \"20.192.167.128/27\",\r\n \"20.192.231.192/27\",\r\n \ - \ \"20.192.231.224/29\",\r\n \"20.193.3.89/32\",\r\n \ - \ \"20.193.3.243/32\",\r\n \"20.193.7.70/32\",\r\n \"\ - 20.193.7.132/32\",\r\n \"20.193.59.172/32\",\r\n \"20.193.59.253/32\"\ - ,\r\n \"20.194.72.136/29\",\r\n \"20.194.72.160/27\",\r\n\ - \ \"23.98.108.184/29\",\r\n \"23.98.109.0/27\",\r\n \ - \ \"40.67.52.104/29\",\r\n \"40.67.52.192/27\",\r\n \ - \ \"40.80.173.208/29\",\r\n \"40.80.173.224/27\",\r\n \"\ - 40.119.241.130/32\",\r\n \"40.119.241.148/32\",\r\n \"40.119.241.154/32\"\ - ,\r\n \"40.119.242.73/32\",\r\n \"40.119.242.79/32\",\r\n\ - \ \"40.119.242.168/32\",\r\n \"40.119.242.232/32\",\r\n\ - \ \"40.119.243.20/32\",\r\n \"40.119.243.119/32\",\r\n \ - \ \"40.119.243.178/32\",\r\n \"40.124.97.243/32\",\r\n \ - \ \"40.124.98.14/31\",\r\n \"40.124.98.23/32\",\r\n \ - \ \"40.124.98.34/31\",\r\n \"40.124.98.48/32\",\r\n \"\ - 40.124.98.52/32\",\r\n \"40.124.98.70/32\",\r\n \"40.124.99.100/32\"\ - ,\r\n \"51.12.43.144/29\",\r\n \"51.12.43.160/27\",\r\n\ - \ \"51.12.194.120/29\",\r\n \"51.12.195.192/27\",\r\n \ - \ \"51.13.136.128/27\",\r\n \"51.13.136.160/29\",\r\n \ - \ \"51.104.141.227/32\",\r\n \"51.107.241.64/27\",\r\n \ - \ \"51.107.241.96/29\",\r\n \"51.107.249.80/29\",\r\n \ - \ \"51.107.249.96/27\",\r\n \"51.116.51.176/29\",\r\n \ - \ \"51.116.54.0/27\",\r\n \"51.116.148.120/29\",\r\n \"\ - 51.116.148.192/27\",\r\n \"51.120.232.40/29\",\r\n \"51.120.232.128/27\"\ - ,\r\n \"51.143.208.208/29\",\r\n \"51.143.208.224/27\",\r\ - \n \"52.136.52.248/29\",\r\n \"52.136.53.64/27\",\r\n \ - \ \"52.136.184.80/29\",\r\n \"52.136.184.96/27\",\r\n \ - \ \"52.139.106.96/27\",\r\n \"52.140.111.112/29\",\r\n \ - \ \"52.140.111.192/27\",\r\n \"52.142.120.18/32\",\r\n \ - \ \"52.142.120.22/32\",\r\n \"52.142.120.57/32\",\r\n \ - \ \"52.142.120.74/32\",\r\n \"52.142.120.90/32\",\r\n \"\ - 52.142.120.104/32\",\r\n \"52.142.120.156/32\",\r\n \"52.146.132.192/27\"\ - ,\r\n \"52.146.132.224/29\",\r\n \"52.148.29.27/32\",\r\n\ - \ \"52.149.20.142/32\",\r\n \"52.149.234.152/32\",\r\n \ - \ \"52.149.238.190/32\",\r\n \"52.149.239.34/32\",\r\n \ - \ \"52.150.156.248/29\",\r\n \"52.150.157.32/27\",\r\n \ - \ \"52.153.153.146/32\",\r\n \"52.153.153.246/32\",\r\n \ - \ \"52.153.153.255/32\",\r\n \"52.153.154.13/32\",\r\n \ - \ \"52.153.154.40/32\",\r\n \"52.153.154.123/32\",\r\n \ - \ \"52.153.154.158/32\",\r\n \"52.153.154.161/32\",\r\n \ - \ \"52.156.207.58/32\",\r\n \"52.156.207.195/32\",\r\n \ - \ \"52.161.185.49/32\",\r\n \"52.170.161.49/32\",\r\n \ - \ \"52.170.162.28/32\",\r\n \"52.172.112.168/29\",\r\n \ - \ \"52.172.113.0/27\",\r\n \"52.186.106.218/32\",\r\n \"\ - 52.191.16.191/32\",\r\n \"52.191.18.106/32\",\r\n \"52.247.76.74/32\"\ - ,\r\n \"52.247.76.167/32\",\r\n \"52.247.76.187/32\",\r\n\ - \ \"52.247.76.199/32\",\r\n \"52.247.76.216/32\",\r\n \ - \ \"52.247.76.246/32\",\r\n \"52.247.76.252/32\",\r\n \ - \ \"52.247.77.7/32\",\r\n \"52.247.77.22/32\",\r\n \ - \ \"52.247.77.26/32\",\r\n \"52.250.39.158/32\",\r\n \"\ - 52.250.39.236/32\",\r\n \"52.250.39.246/32\",\r\n \"52.250.39.250/32\"\ - ,\r\n \"52.250.72.145/32\",\r\n \"52.250.73.36/32\",\r\n\ - \ \"52.250.73.178/32\",\r\n \"52.250.73.204/32\",\r\n \ - \ \"52.250.74.3/32\",\r\n \"52.253.224.146/32\",\r\n \ - \ \"52.253.224.154/32\",\r\n \"102.37.80.0/27\",\r\n \ - \ \"102.37.80.32/29\",\r\n \"102.133.221.16/29\",\r\n \"\ - 102.133.221.32/27\",\r\n \"104.46.178.120/29\",\r\n \"104.46.178.160/27\"\ - ,\r\n \"191.233.15.16/29\",\r\n \"191.233.15.32/27\",\r\n\ - \ \"191.234.139.168/29\",\r\n \"191.234.142.0/27\",\r\n\ - \ \"2603:1020:a04:2::580/121\",\r\n \"2603:1020:e04::700/121\"\ - ,\r\n \"2603:1020:1004:1::540/122\",\r\n \"2603:1020:1004:2::/121\"\ - ,\r\n \"2603:1020:1104:1::380/122\",\r\n \"2603:1020:1104:1::680/121\"\ - ,\r\n \"2603:1030:f:2::500/121\",\r\n \"2603:1030:104::700/121\"\ - ,\r\n \"2603:1030:107::5c0/122\",\r\n \"2603:1030:504::560/123\"\ - ,\r\n \"2603:1030:504:2::/121\",\r\n \"2603:1040:207:1::500/121\"\ - ,\r\n \"2603:1040:a06:2::200/121\",\r\n \"2603:1040:d04:1::540/122\"\ - ,\r\n \"2603:1040:d04:2::80/121\",\r\n \"2603:1040:f05::700/121\"\ - ,\r\n \"2603:1040:1002::7c0/123\",\r\n \"2603:1040:1002:1::/121\"\ - ,\r\n \"2603:1040:1104:1::380/121\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureEventGrid\",\r\n \"id\": \"\ - AzureEventGrid\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"\ - properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\"\ - : \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n\ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventGrid\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.71.56.240/28\",\r\n\ - \ \"13.71.57.0/28\",\r\n \"13.73.248.128/25\",\r\n \ - \ \"13.86.56.32/27\",\r\n \"13.86.56.160/27\",\r\n \"\ - 13.88.73.16/28\",\r\n \"13.88.73.32/27\",\r\n \"13.88.135.208/28\"\ - ,\r\n \"13.91.193.0/28\",\r\n \"20.21.33.128/25\",\r\n \ - \ \"20.36.121.0/25\",\r\n \"20.37.55.32/27\",\r\n \ - \ \"20.37.65.0/25\",\r\n \"20.37.82.224/27\",\r\n \"20.37.157.128/25\"\ - ,\r\n \"20.37.196.0/25\",\r\n \"20.37.225.0/25\",\r\n \ - \ \"20.38.87.0/25\",\r\n \"20.38.137.0/25\",\r\n \ - \ \"20.39.11.128/25\",\r\n \"20.39.20.16/28\",\r\n \"20.39.80.112/28\"\ - ,\r\n \"20.39.80.128/28\",\r\n \"20.39.99.64/28\",\r\n \ - \ \"20.39.99.240/28\",\r\n \"20.40.152.128/27\",\r\n \ - \ \"20.40.175.48/28\",\r\n \"20.40.175.64/28\",\r\n \ - \ \"20.41.66.0/25\",\r\n \"20.41.136.240/28\",\r\n \"20.41.195.0/25\"\ - ,\r\n \"20.42.7.0/25\",\r\n \"20.42.228.0/25\",\r\n \ - \ \"20.43.42.128/25\",\r\n \"20.43.66.128/25\",\r\n \ - \ \"20.43.131.128/25\",\r\n \"20.43.165.144/28\",\r\n \"\ - 20.43.172.128/27\",\r\n \"20.44.39.176/28\",\r\n \"20.44.39.192/28\"\ - ,\r\n \"20.44.168.64/28\",\r\n \"20.44.205.112/28\",\r\n\ - \ \"20.45.113.0/25\",\r\n \"20.45.195.0/25\",\r\n \ - \ \"20.46.152.112/28\",\r\n \"20.46.152.128/28\",\r\n \ - \ \"20.49.96.0/25\",\r\n \"20.52.90.128/25\",\r\n \"20.72.17.128/25\"\ - ,\r\n \"20.150.164.0/25\",\r\n \"20.189.108.128/25\",\r\n\ - \ \"20.189.115.80/28\",\r\n \"20.189.123.80/28\",\r\n \ - \ \"20.189.125.32/27\",\r\n \"20.191.59.128/28\",\r\n \ - \ \"20.191.59.176/28\",\r\n \"20.192.164.0/25\",\r\n \ - \ \"20.192.228.0/25\",\r\n \"20.193.34.0/28\",\r\n \"\ - 20.193.34.32/28\",\r\n \"40.64.128.0/25\",\r\n \"40.67.49.0/25\"\ - ,\r\n \"40.74.31.128/25\",\r\n \"40.74.106.96/27\",\r\n\ - \ \"40.80.58.0/25\",\r\n \"40.80.170.0/25\",\r\n \ - \ \"40.80.190.0/25\",\r\n \"40.80.236.192/27\",\r\n \"\ - 40.81.93.240/28\",\r\n \"40.81.95.128/28\",\r\n \"40.82.254.128/25\"\ - ,\r\n \"40.89.18.0/25\",\r\n \"40.89.240.144/28\",\r\n \ - \ \"40.114.160.176/28\",\r\n \"40.114.160.192/28\",\r\n \ - \ \"40.114.169.0/28\",\r\n \"40.127.155.192/28\",\r\n \ - \ \"40.127.251.144/28\",\r\n \"51.12.47.128/25\",\r\n \ - \ \"51.12.199.0/25\",\r\n \"51.104.27.128/25\",\r\n \ - \ \"51.105.81.0/25\",\r\n \"51.105.89.0/25\",\r\n \"51.107.4.128/27\"\ - ,\r\n \"51.107.49.0/25\",\r\n \"51.107.99.32/27\",\r\n \ - \ \"51.107.145.0/25\",\r\n \"51.116.3.32/27\",\r\n \ - \ \"51.116.72.0/25\",\r\n \"51.116.100.208/28\",\r\n \ - \ \"51.116.100.224/28\",\r\n \"51.120.4.0/27\",\r\n \"51.120.41.0/25\"\ - ,\r\n \"51.120.131.64/27\",\r\n \"51.120.225.0/25\",\r\n\ - \ \"51.132.161.160/28\",\r\n \"51.132.170.64/28\",\r\n \ - \ \"51.137.16.224/28\",\r\n \"51.137.142.32/28\",\r\n \ - \ \"51.137.162.0/25\",\r\n \"51.143.193.0/25\",\r\n \ - \ \"52.136.49.0/25\",\r\n \"52.139.9.80/28\",\r\n \"52.139.11.16/28\"\ - ,\r\n \"52.139.85.16/28\",\r\n \"52.139.85.32/28\",\r\n\ - \ \"52.140.106.0/25\",\r\n \"52.142.152.144/28\",\r\n \ - \ \"52.149.23.160/27\",\r\n \"52.149.48.80/28\",\r\n \ - \ \"52.149.48.96/27\",\r\n \"52.149.248.0/28\",\r\n \ - \ \"52.149.248.64/27\",\r\n \"52.149.248.96/28\",\r\n \"\ - 52.150.140.0/25\",\r\n \"52.154.57.48/28\",\r\n \"52.154.57.80/28\"\ - ,\r\n \"52.154.68.16/28\",\r\n \"52.154.68.32/28\",\r\n\ - \ \"52.156.103.192/28\",\r\n \"52.159.49.144/28\",\r\n \ - \ \"52.159.51.160/28\",\r\n \"52.159.53.64/28\",\r\n \ - \ \"52.159.53.112/28\",\r\n \"52.160.136.16/28\",\r\n \ - \ \"52.160.136.32/28\",\r\n \"52.161.186.128/28\",\r\n \ - \ \"52.161.186.208/28\",\r\n \"52.167.21.160/27\",\r\n \ - \ \"52.167.21.208/28\",\r\n \"52.167.21.224/28\",\r\n \"\ - 52.170.171.192/28\",\r\n \"52.170.171.240/28\",\r\n \"52.177.38.160/27\"\ - ,\r\n \"52.185.176.112/28\",\r\n \"52.185.212.176/28\",\r\ - \n \"52.185.212.192/28\",\r\n \"52.186.36.16/28\",\r\n \ - \ \"52.228.83.0/25\",\r\n \"52.231.112.192/28\",\r\n \ - \ \"52.231.112.224/28\",\r\n \"52.250.28.176/28\",\r\n \ - \ \"52.250.32.160/28\",\r\n \"52.252.213.192/28\",\r\n \ - \ \"52.255.80.16/28\",\r\n \"52.255.82.160/28\",\r\n \ - \ \"102.37.162.0/25\",\r\n \"102.133.0.240/28\",\r\n \"\ - 102.133.1.0/28\",\r\n \"102.133.57.0/25\",\r\n \"102.133.135.16/28\"\ - ,\r\n \"102.133.135.32/28\",\r\n \"191.233.9.128/25\",\r\ - \n \"191.235.126.0/28\",\r\n \"191.235.126.144/28\",\r\n\ - \ \"191.235.227.0/25\",\r\n \"2603:1000:4::380/121\",\r\n\ - \ \"2603:1000:104:1::380/121\",\r\n \"2603:1010:6:1::380/121\"\ - ,\r\n \"2603:1010:101::380/121\",\r\n \"2603:1010:304::380/121\"\ - ,\r\n \"2603:1010:404::380/121\",\r\n \"2603:1020:5:1::380/121\"\ - ,\r\n \"2603:1020:206:1::380/121\",\r\n \"2603:1020:305::380/121\"\ - ,\r\n \"2603:1020:405::380/121\",\r\n \"2603:1020:605::380/121\"\ - ,\r\n \"2603:1020:705:1::380/121\",\r\n \"2603:1020:805:1::380/121\"\ - ,\r\n \"2603:1020:905::380/121\",\r\n \"2603:1020:a04:1::380/121\"\ - ,\r\n \"2603:1020:b04::380/121\",\r\n \"2603:1020:c04:1::380/121\"\ - ,\r\n \"2603:1020:d04::380/121\",\r\n \"2603:1020:e04:1::380/121\"\ - ,\r\n \"2603:1020:f04::380/121\",\r\n \"2603:1020:1004::380/121\"\ - ,\r\n \"2603:1020:1104::280/121\",\r\n \"2603:1030:f:1::380/121\"\ - ,\r\n \"2603:1030:10:1::380/121\",\r\n \"2603:1030:104:1::380/121\"\ - ,\r\n \"2603:1030:107::280/121\",\r\n \"2603:1030:210:1::380/121\"\ - ,\r\n \"2603:1030:40b:1::380/121\",\r\n \"2603:1030:40c:1::380/121\"\ - ,\r\n \"2603:1030:504:1::380/121\",\r\n \"2603:1030:608::380/121\"\ - ,\r\n \"2603:1030:807:1::380/121\",\r\n \"2603:1030:a07::380/121\"\ - ,\r\n \"2603:1030:b04::380/121\",\r\n \"2603:1030:c06:1::380/121\"\ - ,\r\n \"2603:1030:f05:1::380/121\",\r\n \"2603:1030:1005::380/121\"\ - ,\r\n \"2603:1040:5:1::380/121\",\r\n \"2603:1040:207::380/121\"\ - ,\r\n \"2603:1040:407:1::380/121\",\r\n \"2603:1040:606::380/121\"\ - ,\r\n \"2603:1040:806::380/121\",\r\n \"2603:1040:904:1::380/121\"\ - ,\r\n \"2603:1040:a06:1::380/121\",\r\n \"2603:1040:b04::380/121\"\ - ,\r\n \"2603:1040:c06::380/121\",\r\n \"2603:1040:d04::380/121\"\ - ,\r\n \"2603:1040:f05:1::380/121\",\r\n \"2603:1040:1002::480/121\"\ - ,\r\n \"2603:1040:1104::280/121\",\r\n \"2603:1050:6:1::380/121\"\ - ,\r\n \"2603:1050:403::380/121\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureFrontDoor.Backend\",\r\n \"id\": \"\ - AzureFrontDoor.Backend\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.73.248.16/29\",\r\n \ - \ \"20.21.37.40/29\",\r\n \"20.36.120.104/29\",\r\n \"\ - 20.37.64.104/29\",\r\n \"20.37.156.120/29\",\r\n \"20.37.195.0/29\"\ - ,\r\n \"20.37.224.104/29\",\r\n \"20.38.84.72/29\",\r\n\ - \ \"20.38.136.104/29\",\r\n \"20.39.11.8/29\",\r\n \ - \ \"20.41.4.88/29\",\r\n \"20.41.64.120/29\",\r\n \"\ - 20.41.192.104/29\",\r\n \"20.42.4.120/29\",\r\n \"20.42.129.152/29\"\ - ,\r\n \"20.42.224.104/29\",\r\n \"20.43.41.136/29\",\r\n\ - \ \"20.43.65.128/29\",\r\n \"20.43.130.80/29\",\r\n \ - \ \"20.45.112.104/29\",\r\n \"20.45.192.104/29\",\r\n \ - \ \"20.72.18.248/29\",\r\n \"20.150.160.96/29\",\r\n \ - \ \"20.189.106.112/29\",\r\n \"20.192.161.104/29\",\r\n \ - \ \"20.192.225.48/29\",\r\n \"40.67.48.104/29\",\r\n \"\ - 40.74.30.72/29\",\r\n \"40.80.56.104/29\",\r\n \"40.80.168.104/29\"\ - ,\r\n \"40.80.184.120/29\",\r\n \"40.82.248.248/29\",\r\n\ - \ \"40.89.16.104/29\",\r\n \"51.12.41.8/29\",\r\n \ - \ \"51.12.193.8/29\",\r\n \"51.104.25.128/29\",\r\n \"\ - 51.105.80.104/29\",\r\n \"51.105.88.104/29\",\r\n \"51.107.48.104/29\"\ - ,\r\n \"51.107.144.104/29\",\r\n \"51.120.40.104/29\",\r\ - \n \"51.120.224.104/29\",\r\n \"51.137.160.112/29\",\r\n\ - \ \"51.143.192.104/29\",\r\n \"52.136.48.104/29\",\r\n \ - \ \"52.140.104.104/29\",\r\n \"52.150.136.120/29\",\r\n \ - \ \"52.228.80.120/29\",\r\n \"102.133.56.88/29\",\r\n \ - \ \"102.133.216.88/29\",\r\n \"147.243.0.0/16\",\r\n \ - \ \"191.233.9.120/29\",\r\n \"191.235.225.128/29\",\r\n \ - \ \"2603:1000:4::600/123\",\r\n \"2603:1000:104::e0/123\",\r\n\ - \ \"2603:1000:104::300/123\",\r\n \"2603:1000:104:1::5c0/123\"\ - ,\r\n \"2603:1000:104:1::7e0/123\",\r\n \"2603:1010:6:1::5c0/123\"\ - ,\r\n \"2603:1010:6:1::7e0/123\",\r\n \"2603:1010:101::600/123\"\ - ,\r\n \"2603:1010:304::600/123\",\r\n \"2603:1010:404::600/123\"\ - ,\r\n \"2603:1020:5:1::5c0/123\",\r\n \"2603:1020:5:1::7e0/123\"\ - ,\r\n \"2603:1020:206:1::5c0/123\",\r\n \"2603:1020:206:1::7e0/123\"\ - ,\r\n \"2603:1020:305::600/123\",\r\n \"2603:1020:405::600/123\"\ - ,\r\n \"2603:1020:605::600/123\",\r\n \"2603:1020:705:1::5c0/123\"\ - ,\r\n \"2603:1020:705:1::7e0/123\",\r\n \"2603:1020:805:1::5c0/123\"\ - ,\r\n \"2603:1020:805:1::7e0/123\",\r\n \"2603:1020:905::600/123\"\ - ,\r\n \"2603:1020:a04:1::5c0/123\",\r\n \"2603:1020:a04:1::7e0/123\"\ - ,\r\n \"2603:1020:b04::600/123\",\r\n \"2603:1020:c04:1::5c0/123\"\ - ,\r\n \"2603:1020:c04:1::7e0/123\",\r\n \"2603:1020:d04::600/123\"\ - ,\r\n \"2603:1020:e04:1::5c0/123\",\r\n \"2603:1020:e04:1::7e0/123\"\ - ,\r\n \"2603:1020:f04::600/123\",\r\n \"2603:1020:1004::5c0/123\"\ - ,\r\n \"2603:1020:1004::7e0/123\",\r\n \"2603:1020:1104::680/123\"\ - ,\r\n \"2603:1030:f:1::600/123\",\r\n \"2603:1030:10:1::5c0/123\"\ - ,\r\n \"2603:1030:10:1::7e0/123\",\r\n \"2603:1030:104:1::5c0/123\"\ - ,\r\n \"2603:1030:104:1::7e0/123\",\r\n \"2603:1030:107::6a0/123\"\ - ,\r\n \"2603:1030:210:1::5c0/123\",\r\n \"2603:1030:210:1::7e0/123\"\ - ,\r\n \"2603:1030:40b:1::5c0/123\",\r\n \"2603:1030:40c:1::5c0/123\"\ - ,\r\n \"2603:1030:40c:1::7e0/123\",\r\n \"2603:1030:504:1::5c0/123\"\ - ,\r\n \"2603:1030:504:1::7e0/123\",\r\n \"2603:1030:608::600/123\"\ - ,\r\n \"2603:1030:807:1::5c0/123\",\r\n \"2603:1030:807:1::7e0/123\"\ - ,\r\n \"2603:1030:a07::600/123\",\r\n \"2603:1030:b04::600/123\"\ - ,\r\n \"2603:1030:c06:1::5c0/123\",\r\n \"2603:1030:f05:1::5c0/123\"\ - ,\r\n \"2603:1030:f05:1::7e0/123\",\r\n \"2603:1030:1005::600/123\"\ - ,\r\n \"2603:1040:5::e0/123\",\r\n \"2603:1040:5:1::5c0/123\"\ - ,\r\n \"2603:1040:5:1::7e0/123\",\r\n \"2603:1040:207::600/123\"\ - ,\r\n \"2603:1040:407:1::5c0/123\",\r\n \"2603:1040:407:1::7e0/123\"\ - ,\r\n \"2603:1040:606::600/123\",\r\n \"2603:1040:806::600/123\"\ - ,\r\n \"2603:1040:904:1::5c0/123\",\r\n \"2603:1040:904:1::7e0/123\"\ - ,\r\n \"2603:1040:a06::e0/123\",\r\n \"2603:1040:a06:1::5c0/123\"\ - ,\r\n \"2603:1040:a06:1::7e0/123\",\r\n \"2603:1040:b04::600/123\"\ - ,\r\n \"2603:1040:c06::600/123\",\r\n \"2603:1040:d04::5c0/123\"\ - ,\r\n \"2603:1040:d04::7e0/123\",\r\n \"2603:1040:f05:1::5c0/123\"\ - ,\r\n \"2603:1040:f05:1::7e0/123\",\r\n \"2603:1040:1002:1::1e0/123\"\ - ,\r\n \"2603:1040:1104::680/123\",\r\n \"2603:1050:6:1::5c0/123\"\ - ,\r\n \"2603:1050:6:1::7e0/123\",\r\n \"2603:1050:403::5c0/123\"\ - ,\r\n \"2a01:111:20a::/48\",\r\n \"2a01:111:2050::/44\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureFrontDoor.FirstParty\"\ - ,\r\n \"id\": \"AzureFrontDoor.FirstParty\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureFrontDoor\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.107.3.0/24\",\r\n \ - \ \"13.107.4.0/22\",\r\n \"13.107.9.0/24\",\r\n \"\ - 13.107.12.0/23\",\r\n \"13.107.15.0/24\",\r\n \"13.107.16.0/24\"\ - ,\r\n \"13.107.18.0/23\",\r\n \"13.107.21.0/24\",\r\n \ - \ \"13.107.22.0/24\",\r\n \"13.107.37.0/24\",\r\n \ - \ \"13.107.38.0/23\",\r\n \"13.107.40.0/24\",\r\n \"13.107.42.0/23\"\ - ,\r\n \"13.107.48.0/24\",\r\n \"13.107.50.0/24\",\r\n \ - \ \"13.107.52.0/24\",\r\n \"13.107.54.0/24\",\r\n \ - \ \"13.107.56.0/24\",\r\n \"13.107.64.0/18\",\r\n \"13.107.128.0/19\"\ - ,\r\n \"13.107.228.0/23\",\r\n \"13.107.245.0/24\",\r\n\ - \ \"13.107.254.0/23\",\r\n \"131.253.3.0/24\",\r\n \ - \ \"131.253.21.0/24\",\r\n \"131.253.33.0/24\",\r\n \ - \ \"150.171.32.0/19\",\r\n \"202.89.233.96/28\",\r\n \"\ - 204.79.197.0/24\",\r\n \"2620:1ec:4::/46\",\r\n \"2620:1ec:a::/47\"\ - ,\r\n \"2620:1ec:c::/47\",\r\n \"2620:1ec:12::/47\",\r\n\ - \ \"2620:1ec:21::/48\",\r\n \"2620:1ec:22::/48\",\r\n \ - \ \"2620:1ec:26::/63\",\r\n \"2620:1ec:26:2::/64\",\r\n \ - \ \"2620:1ec:28::/48\",\r\n \"2620:1ec:34::/48\",\r\n \ - \ \"2620:1ec:39::/48\",\r\n \"2620:1ec:3e::/47\",\r\n \ - \ \"2620:1ec:42::/47\",\r\n \"2620:1ec:44::/47\",\r\n \ - \ \"2620:1ec:4a::/47\",\r\n \"2620:1ec:8f0::/44\",\r\n \ - \ \"2620:1ec:900::/44\",\r\n \"2620:1ec:a92::/48\",\r\n \ - \ \"2620:1ec:c11::/48\",\r\n \"2a01:111:2003::/48\",\r\n \ - \ \"2a01:111:202c::/46\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"AzureFrontDoor.Frontend\",\r\n \"id\": \"AzureFrontDoor.Frontend\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"6\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.73.248.8/29\",\r\n \"13.107.208.0/24\",\r\n\ - \ \"13.107.213.0/24\",\r\n \"13.107.219.0/24\",\r\n \ - \ \"13.107.224.0/24\",\r\n \"13.107.226.0/23\",\r\n \ - \ \"13.107.231.0/24\",\r\n \"13.107.246.0/24\",\r\n \"\ - 13.107.253.0/24\",\r\n \"20.21.37.32/29\",\r\n \"20.36.120.96/29\"\ - ,\r\n \"20.37.64.96/29\",\r\n \"20.37.156.112/29\",\r\n\ - \ \"20.37.192.88/29\",\r\n \"20.37.224.96/29\",\r\n \ - \ \"20.38.84.64/29\",\r\n \"20.38.136.96/29\",\r\n \ - \ \"20.39.11.0/29\",\r\n \"20.41.4.80/29\",\r\n \"20.41.64.112/29\"\ - ,\r\n \"20.41.192.96/29\",\r\n \"20.42.4.112/29\",\r\n \ - \ \"20.42.129.144/29\",\r\n \"20.42.224.96/29\",\r\n \ - \ \"20.43.41.128/29\",\r\n \"20.43.64.88/29\",\r\n \ - \ \"20.43.128.104/29\",\r\n \"20.45.112.96/29\",\r\n \"\ - 20.45.192.96/29\",\r\n \"20.72.18.240/29\",\r\n \"20.150.160.72/29\"\ - ,\r\n \"20.189.106.72/29\",\r\n \"20.192.161.96/29\",\r\n\ - \ \"20.192.225.40/29\",\r\n \"40.67.48.96/29\",\r\n \ - \ \"40.74.30.64/29\",\r\n \"40.80.56.96/29\",\r\n \"\ - 40.80.168.96/29\",\r\n \"40.80.184.112/29\",\r\n \"40.82.248.72/29\"\ - ,\r\n \"40.89.16.96/29\",\r\n \"40.90.64.0/22\",\r\n \ - \ \"40.90.68.0/24\",\r\n \"51.12.41.0/29\",\r\n \"\ - 51.12.193.0/29\",\r\n \"51.104.24.88/29\",\r\n \"51.105.80.96/29\"\ - ,\r\n \"51.105.88.96/29\",\r\n \"51.107.48.96/29\",\r\n\ - \ \"51.107.144.96/29\",\r\n \"51.120.40.96/29\",\r\n \ - \ \"51.120.224.96/29\",\r\n \"51.137.160.88/29\",\r\n \ - \ \"51.143.192.96/29\",\r\n \"52.136.48.96/29\",\r\n \ - \ \"52.140.104.96/29\",\r\n \"52.150.136.112/29\",\r\n \ - \ \"52.228.80.112/29\",\r\n \"102.133.56.80/29\",\r\n \"\ - 102.133.216.80/29\",\r\n \"104.212.67.0/24\",\r\n \"104.212.68.0/24\"\ - ,\r\n \"191.233.9.112/29\",\r\n \"191.235.224.88/29\",\r\ - \n \"2603:1000:4::5e0/123\",\r\n \"2603:1000:104::c0/123\"\ - ,\r\n \"2603:1000:104::160/123\",\r\n \"2603:1000:104:1::5a0/123\"\ - ,\r\n \"2603:1000:104:1::7c0/123\",\r\n \"2603:1010:6:1::5a0/123\"\ - ,\r\n \"2603:1010:6:1::7c0/123\",\r\n \"2603:1010:101::5e0/123\"\ - ,\r\n \"2603:1010:304::5e0/123\",\r\n \"2603:1010:404::5e0/123\"\ - ,\r\n \"2603:1020:5:1::5a0/123\",\r\n \"2603:1020:5:1::7c0/123\"\ - ,\r\n \"2603:1020:206:1::5a0/123\",\r\n \"2603:1020:206:1::7c0/123\"\ - ,\r\n \"2603:1020:305::5e0/123\",\r\n \"2603:1020:405::5e0/123\"\ - ,\r\n \"2603:1020:605::5e0/123\",\r\n \"2603:1020:705:1::5a0/123\"\ - ,\r\n \"2603:1020:705:1::7c0/123\",\r\n \"2603:1020:805:1::5a0/123\"\ - ,\r\n \"2603:1020:805:1::7c0/123\",\r\n \"2603:1020:905::5e0/123\"\ - ,\r\n \"2603:1020:a04:1::5a0/123\",\r\n \"2603:1020:a04:1::7c0/123\"\ - ,\r\n \"2603:1020:b04::5e0/123\",\r\n \"2603:1020:c04:1::5a0/123\"\ - ,\r\n \"2603:1020:c04:1::7c0/123\",\r\n \"2603:1020:d04::5e0/123\"\ - ,\r\n \"2603:1020:e04:1::5a0/123\",\r\n \"2603:1020:e04:1::7c0/123\"\ - ,\r\n \"2603:1020:f04::5e0/123\",\r\n \"2603:1020:1004::5a0/123\"\ - ,\r\n \"2603:1020:1004::7c0/123\",\r\n \"2603:1020:1104::5e0/123\"\ - ,\r\n \"2603:1030:f:1::5e0/123\",\r\n \"2603:1030:10:1::5a0/123\"\ - ,\r\n \"2603:1030:10:1::7c0/123\",\r\n \"2603:1030:104:1::5a0/123\"\ - ,\r\n \"2603:1030:104:1::7c0/123\",\r\n \"2603:1030:107::680/123\"\ - ,\r\n \"2603:1030:210:1::5a0/123\",\r\n \"2603:1030:210:1::7c0/123\"\ - ,\r\n \"2603:1030:40b:1::5a0/123\",\r\n \"2603:1030:40c:1::5a0/123\"\ - ,\r\n \"2603:1030:40c:1::7c0/123\",\r\n \"2603:1030:504:1::5a0/123\"\ - ,\r\n \"2603:1030:504:1::7c0/123\",\r\n \"2603:1030:608::5e0/123\"\ - ,\r\n \"2603:1030:807:1::5a0/123\",\r\n \"2603:1030:807:1::7c0/123\"\ - ,\r\n \"2603:1030:a07::5e0/123\",\r\n \"2603:1030:b04::5e0/123\"\ - ,\r\n \"2603:1030:c06:1::5a0/123\",\r\n \"2603:1030:f05:1::5a0/123\"\ - ,\r\n \"2603:1030:f05:1::7c0/123\",\r\n \"2603:1030:1005::5e0/123\"\ - ,\r\n \"2603:1040:5::c0/123\",\r\n \"2603:1040:5:1::5a0/123\"\ - ,\r\n \"2603:1040:5:1::7c0/123\",\r\n \"2603:1040:207::5e0/123\"\ - ,\r\n \"2603:1040:407:1::5a0/123\",\r\n \"2603:1040:407:1::7c0/123\"\ - ,\r\n \"2603:1040:606::5e0/123\",\r\n \"2603:1040:806::5e0/123\"\ - ,\r\n \"2603:1040:904:1::5a0/123\",\r\n \"2603:1040:904:1::7c0/123\"\ - ,\r\n \"2603:1040:a06::c0/123\",\r\n \"2603:1040:a06:1::5a0/123\"\ - ,\r\n \"2603:1040:a06:1::7c0/123\",\r\n \"2603:1040:b04::5e0/123\"\ - ,\r\n \"2603:1040:c06::5e0/123\",\r\n \"2603:1040:d04::5a0/123\"\ - ,\r\n \"2603:1040:d04::7c0/123\",\r\n \"2603:1040:f05:1::5a0/123\"\ - ,\r\n \"2603:1040:f05:1::7c0/123\",\r\n \"2603:1040:1002:1::1c0/123\"\ - ,\r\n \"2603:1040:1104::5e0/123\",\r\n \"2603:1050:6:1::5a0/123\"\ - ,\r\n \"2603:1050:6:1::7c0/123\",\r\n \"2603:1050:403::5a0/123\"\ - ,\r\n \"2620:1ec:27::/48\",\r\n \"2620:1ec:29::/48\",\r\n\ - \ \"2620:1ec:40::/47\",\r\n \"2620:1ec:46::/47\",\r\n \ - \ \"2620:1ec:48::/47\",\r\n \"2620:1ec:bdf::/48\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureInformationProtection\"\ - ,\r\n \"id\": \"AzureInformationProtection\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureInformationProtection\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.153.57/32\",\r\n\ - \ \"13.66.245.220/32\",\r\n \"13.66.251.171/32\",\r\n \ - \ \"13.67.114.221/32\",\r\n \"13.68.179.152/32\",\r\n \ - \ \"13.76.139.8/32\",\r\n \"13.76.244.119/32\",\r\n \ - \ \"13.77.166.40/32\",\r\n \"13.77.203.47/32\",\r\n \"\ - 13.78.130.67/32\",\r\n \"13.78.130.185/32\",\r\n \"13.78.178.191/32\"\ - ,\r\n \"13.79.189.239/32\",\r\n \"13.79.189.241/32\",\r\n\ - \ \"13.82.198.231/32\",\r\n \"13.83.91.144/32\",\r\n \ - \ \"13.92.58.123/32\",\r\n \"13.92.61.93/32\",\r\n \ - \ \"13.93.72.133/32\",\r\n \"13.93.75.214/32\",\r\n \"\ - 13.94.98.184/32\",\r\n \"13.94.116.226/32\",\r\n \"23.97.70.206/32\"\ - ,\r\n \"23.99.106.184/32\",\r\n \"23.99.114.156/32\",\r\n\ - \ \"23.99.251.107/32\",\r\n \"23.101.112.34/32\",\r\n \ - \ \"23.101.147.227/32\",\r\n \"23.101.163.169/32\",\r\n \ - \ \"40.69.191.65/32\",\r\n \"40.70.16.196/32\",\r\n \ - \ \"40.76.94.49/32\",\r\n \"40.83.177.47/32\",\r\n \"\ - 40.83.223.214/32\",\r\n \"40.87.2.166/32\",\r\n \"40.87.67.213/32\"\ - ,\r\n \"40.87.94.91/32\",\r\n \"40.114.2.72/32\",\r\n \ - \ \"40.117.180.9/32\",\r\n \"40.121.48.207/32\",\r\n \ - \ \"40.121.49.153/32\",\r\n \"40.121.90.82/32\",\r\n \ - \ \"40.127.160.102/32\",\r\n \"40.127.175.173/32\",\r\n \ - \ \"51.136.18.12/32\",\r\n \"51.141.184.35/32\",\r\n \"\ - 51.143.32.47/32\",\r\n \"51.143.88.135/32\",\r\n \"51.144.167.90/32\"\ - ,\r\n \"51.145.146.97/32\",\r\n \"52.162.33.18/32\",\r\n\ - \ \"52.162.37.146/32\",\r\n \"52.162.88.200/32\",\r\n \ - \ \"52.162.95.132/32\",\r\n \"52.162.208.48/32\",\r\n \ - \ \"52.163.61.51/32\",\r\n \"52.163.85.21/32\",\r\n \ - \ \"52.163.85.129/32\",\r\n \"52.163.87.92/32\",\r\n \"\ - 52.163.89.155/32\",\r\n \"52.163.89.160/32\",\r\n \"52.165.189.139/32\"\ - ,\r\n \"52.167.1.118/32\",\r\n \"52.167.225.247/32\",\r\n\ - \ \"52.167.226.2/32\",\r\n \"52.167.227.104/32\",\r\n \ - \ \"52.167.227.154/32\",\r\n \"52.173.21.111/32\",\r\n \ - \ \"52.173.89.54/32\",\r\n \"52.173.89.66/32\",\r\n \ - \ \"52.173.93.137/32\",\r\n \"52.176.44.178/32\",\r\n \ - \ \"52.178.145.186/32\",\r\n \"52.178.147.96/32\",\r\n \"\ - 52.179.136.129/32\",\r\n \"52.184.34.233/32\",\r\n \"52.184.35.49/32\"\ - ,\r\n \"52.232.110.114/32\",\r\n \"52.232.113.160/32\",\r\ - \n \"52.232.118.97/32\",\r\n \"52.232.119.81/32\",\r\n \ - \ \"52.237.141.83/32\",\r\n \"52.237.141.229/32\",\r\n \ - \ \"52.250.56.125/32\",\r\n \"65.52.36.85/32\",\r\n \ - \ \"65.52.55.108/32\",\r\n \"65.52.176.250/32\",\r\n \ - \ \"65.52.177.192/32\",\r\n \"65.52.184.44/32\",\r\n \"\ - 65.52.184.218/32\",\r\n \"65.52.236.123/32\",\r\n \"70.37.163.131/32\"\ - ,\r\n \"94.245.88.160/32\",\r\n \"104.40.16.135/32\",\r\n\ - \ \"104.40.30.29/32\",\r\n \"104.41.143.145/32\",\r\n \ - \ \"137.116.91.123/32\",\r\n \"137.117.47.75/32\",\r\n \ - \ \"138.91.121.248/32\",\r\n \"138.91.122.178/32\",\r\n \ - \ \"157.55.177.248/32\",\r\n \"157.55.185.205/32\",\r\n \ - \ \"157.56.8.93/32\",\r\n \"157.56.8.135/32\",\r\n \ - \ \"157.56.9.127/32\",\r\n \"168.61.46.212/32\",\r\n \"\ - 168.62.5.167/32\",\r\n \"168.62.8.139/32\",\r\n \"168.62.25.173/32\"\ - ,\r\n \"168.62.25.179/32\",\r\n \"168.62.48.148/32\",\r\n\ - \ \"168.62.49.18/32\",\r\n \"168.62.52.244/32\",\r\n \ - \ \"168.62.53.73/32\",\r\n \"168.62.53.132/32\",\r\n \ - \ \"168.62.54.75/32\",\r\n \"168.62.54.211/32\",\r\n \ - \ \"168.62.54.212/32\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"AzureIoTHub\",\r\n \"id\": \"AzureIoTHub\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"5\",\r\n \"region\": \"\",\r\n \"state\":\ - \ \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \ - \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n\ - \ \"systemService\": \"AzureIoTHub\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.66.142.96/27\",\r\n \"13.67.10.224/27\",\r\n\ - \ \"13.67.234.22/32\",\r\n \"13.69.71.0/25\",\r\n \ - \ \"13.69.109.0/25\",\r\n \"13.69.192.43/32\",\r\n \"\ - 13.69.230.64/27\",\r\n \"13.70.74.192/27\",\r\n \"13.70.182.204/32\"\ - ,\r\n \"13.70.182.210/32\",\r\n \"13.71.84.34/32\",\r\n\ - \ \"13.71.113.127/32\",\r\n \"13.71.150.19/32\",\r\n \ - \ \"13.71.175.32/27\",\r\n \"13.71.196.224/27\",\r\n \ - \ \"13.73.115.51/32\",\r\n \"13.73.244.0/27\",\r\n \"\ - 13.73.252.128/25\",\r\n \"13.74.108.192/27\",\r\n \"13.75.39.160/27\"\ - ,\r\n \"13.76.83.155/32\",\r\n \"13.76.217.46/32\",\r\n\ - \ \"13.77.53.128/27\",\r\n \"13.78.109.160/27\",\r\n \ - \ \"13.78.129.154/32\",\r\n \"13.78.130.69/32\",\r\n \ - \ \"13.79.172.43/32\",\r\n \"13.82.93.138/32\",\r\n \"\ - 13.84.189.6/32\",\r\n \"13.85.68.113/32\",\r\n \"13.86.221.0/25\"\ - ,\r\n \"13.87.58.96/27\",\r\n \"13.87.124.96/27\",\r\n \ - \ \"13.89.174.160/27\",\r\n \"13.89.231.149/32\",\r\n \ - \ \"13.94.40.72/32\",\r\n \"13.95.15.251/32\",\r\n \ - \ \"20.21.44.96/27\",\r\n \"20.21.67.160/27\",\r\n \"20.21.75.160/27\"\ - ,\r\n \"20.36.108.160/27\",\r\n \"20.36.117.64/27\",\r\n\ - \ \"20.36.123.32/27\",\r\n \"20.36.123.128/25\",\r\n \ - \ \"20.37.67.128/25\",\r\n \"20.37.68.0/27\",\r\n \ - \ \"20.37.76.160/27\",\r\n \"20.37.198.160/27\",\r\n \"\ - 20.37.199.0/25\",\r\n \"20.37.227.64/27\",\r\n \"20.37.227.128/25\"\ - ,\r\n \"20.38.128.128/27\",\r\n \"20.38.139.128/25\",\r\n\ - \ \"20.38.140.0/27\",\r\n \"20.38.147.192/27\",\r\n \ - \ \"20.39.14.32/27\",\r\n \"20.39.14.128/25\",\r\n \ - \ \"20.40.206.192/27\",\r\n \"20.40.207.0/25\",\r\n \"20.41.68.96/27\"\ - ,\r\n \"20.41.68.128/25\",\r\n \"20.41.197.64/27\",\r\n\ - \ \"20.41.197.128/25\",\r\n \"20.42.230.160/27\",\r\n \ - \ \"20.42.231.0/25\",\r\n \"20.43.44.160/27\",\r\n \ - \ \"20.43.45.0/25\",\r\n \"20.43.70.160/27\",\r\n \"20.43.71.0/25\"\ - ,\r\n \"20.43.121.64/27\",\r\n \"20.44.4.128/27\",\r\n \ - \ \"20.44.8.224/27\",\r\n \"20.44.17.96/27\",\r\n \ - \ \"20.44.29.0/27\",\r\n \"20.45.114.224/27\",\r\n \"\ - 20.45.115.0/25\",\r\n \"20.45.123.128/27\",\r\n \"20.45.198.32/27\"\ - ,\r\n \"20.45.198.128/25\",\r\n \"20.49.83.128/27\",\r\n\ - \ \"20.49.91.128/27\",\r\n \"20.49.99.96/27\",\r\n \ - \ \"20.49.99.128/25\",\r\n \"20.49.109.128/25\",\r\n \ - \ \"20.49.110.0/26\",\r\n \"20.49.110.128/25\",\r\n \"\ - 20.49.113.32/27\",\r\n \"20.49.113.128/25\",\r\n \"20.49.120.96/27\"\ - ,\r\n \"20.49.120.128/25\",\r\n \"20.49.121.0/25\",\r\n\ - \ \"20.50.65.128/25\",\r\n \"20.50.68.0/27\",\r\n \ - \ \"20.72.28.160/27\",\r\n \"20.150.165.192/27\",\r\n \ - \ \"20.150.166.0/25\",\r\n \"20.150.172.192/27\",\r\n \"\ - 20.150.179.224/27\",\r\n \"20.150.187.224/27\",\r\n \"20.187.195.0/25\"\ - ,\r\n \"20.188.0.51/32\",\r\n \"20.188.3.145/32\",\r\n \ - \ \"20.188.39.126/32\",\r\n \"20.189.109.192/27\",\r\n \ - \ \"20.192.99.224/27\",\r\n \"20.192.165.224/27\",\r\n \ - \ \"20.192.166.0/25\",\r\n \"20.192.230.32/27\",\r\n \ - \ \"20.192.230.128/25\",\r\n \"20.192.238.0/27\",\r\n \ - \ \"20.193.206.0/27\",\r\n \"20.194.67.96/27\",\r\n \"\ - 20.205.75.192/27\",\r\n \"20.205.83.192/27\",\r\n \"20.208.19.160/27\"\ - ,\r\n \"23.96.222.45/32\",\r\n \"23.96.223.89/32\",\r\n\ - \ \"23.98.86.0/27\",\r\n \"23.98.104.192/27\",\r\n \ - \ \"23.98.106.0/25\",\r\n \"23.99.109.81/32\",\r\n \"\ - 23.100.4.253/32\",\r\n \"23.100.8.130/32\",\r\n \"23.100.105.192/32\"\ - ,\r\n \"23.101.29.228/32\",\r\n \"23.102.235.31/32\",\r\n\ - \ \"40.64.132.160/27\",\r\n \"40.64.134.0/25\",\r\n \ - \ \"40.67.51.0/25\",\r\n \"40.67.51.128/27\",\r\n \"\ - 40.67.60.128/27\",\r\n \"40.69.108.128/27\",\r\n \"40.70.148.128/27\"\ - ,\r\n \"40.71.14.128/25\",\r\n \"40.74.66.139/32\",\r\n\ - \ \"40.74.125.44/32\",\r\n \"40.74.149.0/27\",\r\n \ - \ \"40.75.35.96/27\",\r\n \"40.76.71.185/32\",\r\n \"\ - 40.77.23.107/32\",\r\n \"40.78.22.17/32\",\r\n \"40.78.196.96/27\"\ - ,\r\n \"40.78.204.64/27\",\r\n \"40.78.229.128/25\",\r\n\ - \ \"40.78.238.0/27\",\r\n \"40.78.245.32/27\",\r\n \ - \ \"40.78.251.160/27\",\r\n \"40.79.114.144/32\",\r\n \ - \ \"40.79.132.128/27\",\r\n \"40.79.139.32/27\",\r\n \"\ - 40.79.148.0/27\",\r\n \"40.79.156.128/25\",\r\n \"40.79.163.32/27\"\ - ,\r\n \"40.79.171.128/27\",\r\n \"40.79.180.96/27\",\r\n\ - \ \"40.79.187.224/27\",\r\n \"40.79.195.192/27\",\r\n \ - \ \"40.80.51.128/27\",\r\n \"40.80.62.64/27\",\r\n \ - \ \"40.80.62.128/25\",\r\n \"40.80.172.64/27\",\r\n \"\ - 40.80.172.128/25\",\r\n \"40.80.176.64/27\",\r\n \"40.83.177.42/32\"\ - ,\r\n \"40.84.53.157/32\",\r\n \"40.87.138.172/32\",\r\n\ - \ \"40.87.143.97/32\",\r\n \"40.89.20.192/27\",\r\n \ - \ \"40.89.21.0/25\",\r\n \"40.112.221.188/32\",\r\n \ - \ \"40.112.223.235/32\",\r\n \"40.113.153.50/32\",\r\n \ - \ \"40.113.176.160/27\",\r\n \"40.113.176.192/27\",\r\n \ - \ \"40.113.177.0/24\",\r\n \"40.114.53.146/32\",\r\n \"\ - 40.118.27.192/32\",\r\n \"40.119.11.224/27\",\r\n \"40.120.75.160/27\"\ - ,\r\n \"40.127.132.17/32\",\r\n \"51.12.42.32/27\",\r\n\ - \ \"51.12.42.128/25\",\r\n \"51.12.100.64/27\",\r\n \ - \ \"51.12.194.32/27\",\r\n \"51.12.194.128/25\",\r\n \ - \ \"51.12.204.64/27\",\r\n \"51.12.227.224/27\",\r\n \"\ - 51.12.235.224/27\",\r\n \"51.103.203.160/27\",\r\n \"51.104.30.0/25\"\ - ,\r\n \"51.104.30.128/27\",\r\n \"51.105.69.0/27\",\r\n\ - \ \"51.105.75.192/27\",\r\n \"51.105.91.128/25\",\r\n \ - \ \"51.105.92.0/27\",\r\n \"51.107.51.64/27\",\r\n \ - \ \"51.107.51.128/25\",\r\n \"51.107.60.96/27\",\r\n \"\ - 51.107.147.64/27\",\r\n \"51.107.147.128/25\",\r\n \"51.107.156.96/27\"\ - ,\r\n \"51.116.49.224/27\",\r\n \"51.116.50.0/25\",\r\n\ - \ \"51.116.60.96/27\",\r\n \"51.116.145.192/27\",\r\n \ - \ \"51.116.146.0/25\",\r\n \"51.116.158.0/27\",\r\n \ - \ \"51.116.243.160/27\",\r\n \"51.116.251.128/27\",\r\n \ - \ \"51.120.43.128/25\",\r\n \"51.120.44.0/27\",\r\n \"\ - 51.120.100.96/27\",\r\n \"51.120.107.224/27\",\r\n \"51.120.211.224/27\"\ - ,\r\n \"51.120.227.128/25\",\r\n \"51.120.228.0/27\",\r\n\ - \ \"51.137.164.160/27\",\r\n \"51.137.165.0/25\",\r\n \ - \ \"51.140.84.251/32\",\r\n \"51.140.126.10/32\",\r\n \ - \ \"51.140.149.32/27\",\r\n \"51.140.212.160/27\",\r\n \ - \ \"51.140.226.207/32\",\r\n \"51.140.240.234/32\",\r\n \ - \ \"51.141.49.253/32\",\r\n \"51.144.118.31/32\",\r\n \ - \ \"52.136.51.128/25\",\r\n \"52.136.52.0/27\",\r\n \"\ - 52.136.132.236/32\",\r\n \"52.138.92.96/27\",\r\n \"52.138.229.0/27\"\ - ,\r\n \"52.140.108.160/27\",\r\n \"52.140.109.0/25\",\r\n\ - \ \"52.147.10.141/32\",\r\n \"52.147.10.149/32\",\r\n \ - \ \"52.150.152.96/27\",\r\n \"52.150.153.128/25\",\r\n \ - \ \"52.151.6.77/32\",\r\n \"52.151.78.51/32\",\r\n \ - \ \"52.158.236.252/32\",\r\n \"52.161.15.247/32\",\r\n \ - \ \"52.162.111.64/27\",\r\n \"52.163.212.39/32\",\r\n \"\ - 52.163.215.122/32\",\r\n \"52.167.107.192/27\",\r\n \"52.167.155.89/32\"\ - ,\r\n \"52.168.180.95/32\",\r\n \"52.169.138.222/32\",\r\ - \n \"52.172.203.144/32\",\r\n \"52.175.221.106/32\",\r\n\ - \ \"52.176.4.4/32\",\r\n \"52.176.92.27/32\",\r\n \ - \ \"52.177.196.50/32\",\r\n \"52.178.147.144/32\",\r\n \ - \ \"52.179.159.231/32\",\r\n \"52.180.165.88/32\",\r\n \ - \ \"52.180.165.248/32\",\r\n \"52.180.177.125/32\",\r\n \ - \ \"52.182.139.224/27\",\r\n \"52.225.176.167/32\",\r\n \ - \ \"52.225.177.25/32\",\r\n \"52.225.179.220/32\",\r\n \ - \ \"52.225.180.26/32\",\r\n \"52.225.180.217/32\",\r\n \"\ - 52.225.187.149/32\",\r\n \"52.228.85.224/27\",\r\n \"52.228.86.0/25\"\ - ,\r\n \"52.231.20.32/27\",\r\n \"52.231.32.236/32\",\r\n\ - \ \"52.231.148.128/27\",\r\n \"52.231.205.15/32\",\r\n \ - \ \"52.236.189.128/25\",\r\n \"52.237.27.123/32\",\r\n \ - \ \"52.242.31.77/32\",\r\n \"52.246.155.192/27\",\r\n \ - \ \"52.250.225.32/27\",\r\n \"65.52.252.160/27\",\r\n \ - \ \"102.133.28.160/27\",\r\n \"102.133.59.0/25\",\r\n \ - \ \"102.133.59.128/27\",\r\n \"102.133.124.32/27\",\r\n \ - \ \"102.133.156.64/27\",\r\n \"102.133.218.192/27\",\r\n \ - \ \"102.133.219.0/25\",\r\n \"102.133.251.128/27\",\r\n \ - \ \"104.40.49.44/32\",\r\n \"104.41.34.180/32\",\r\n \"\ - 104.43.252.98/32\",\r\n \"104.46.115.237/32\",\r\n \"104.210.105.7/32\"\ - ,\r\n \"104.211.18.153/32\",\r\n \"104.211.210.195/32\"\ - ,\r\n \"104.214.34.123/32\",\r\n \"137.117.83.38/32\",\r\ - \n \"157.55.253.43/32\",\r\n \"168.61.54.255/32\",\r\n \ - \ \"168.61.208.218/32\",\r\n \"191.233.11.160/27\",\r\n \ - \ \"191.233.14.0/25\",\r\n \"191.233.54.0/27\",\r\n \ - \ \"191.233.205.128/27\",\r\n \"191.234.136.128/25\",\r\n \ - \ \"191.234.137.0/27\",\r\n \"191.234.147.224/27\",\r\n \ - \ \"191.234.155.224/27\",\r\n \"207.46.138.102/32\",\r\n \ - \ \"2603:1000:4:402::300/123\",\r\n \"2603:1000:104:402::300/123\"\ - ,\r\n \"2603:1000:104:802::240/123\",\r\n \"2603:1000:104:c02::240/123\"\ - ,\r\n \"2603:1010:6:402::300/123\",\r\n \"2603:1010:6:802::240/123\"\ - ,\r\n \"2603:1010:6:c02::240/123\",\r\n \"2603:1010:101:402::300/123\"\ - ,\r\n \"2603:1010:304:402::300/123\",\r\n \"2603:1010:404:402::300/123\"\ - ,\r\n \"2603:1020:5:402::300/123\",\r\n \"2603:1020:5:802::240/123\"\ - ,\r\n \"2603:1020:5:c02::240/123\",\r\n \"2603:1020:206:402::300/123\"\ - ,\r\n \"2603:1020:206:802::240/123\",\r\n \"2603:1020:206:c02::240/123\"\ - ,\r\n \"2603:1020:305:402::300/123\",\r\n \"2603:1020:405:402::300/123\"\ - ,\r\n \"2603:1020:605:402::300/123\",\r\n \"2603:1020:705:402::300/123\"\ - ,\r\n \"2603:1020:705:802::240/123\",\r\n \"2603:1020:705:c02::240/123\"\ - ,\r\n \"2603:1020:805:402::300/123\",\r\n \"2603:1020:805:802::240/123\"\ - ,\r\n \"2603:1020:805:c02::240/123\",\r\n \"2603:1020:905:402::300/123\"\ - ,\r\n \"2603:1020:a04:402::300/123\",\r\n \"2603:1020:a04:802::240/123\"\ - ,\r\n \"2603:1020:a04:c02::240/123\",\r\n \"2603:1020:b04:402::300/123\"\ - ,\r\n \"2603:1020:c04:402::300/123\",\r\n \"2603:1020:c04:802::240/123\"\ - ,\r\n \"2603:1020:c04:c02::240/123\",\r\n \"2603:1020:d04:402::300/123\"\ - ,\r\n \"2603:1020:e04:402::300/123\",\r\n \"2603:1020:e04:802::240/123\"\ - ,\r\n \"2603:1020:e04:c02::240/123\",\r\n \"2603:1020:f04:402::300/123\"\ - ,\r\n \"2603:1020:1004:400::480/123\",\r\n \"2603:1020:1004:800::100/123\"\ - ,\r\n \"2603:1020:1004:800::240/123\",\r\n \"2603:1020:1004:c02::2a0/123\"\ - ,\r\n \"2603:1020:1104:400::300/123\",\r\n \"2603:1030:f:400::b00/123\"\ - ,\r\n \"2603:1030:10:402::300/123\",\r\n \"2603:1030:10:802::240/123\"\ - ,\r\n \"2603:1030:10:c02::240/123\",\r\n \"2603:1030:104:402::300/123\"\ - ,\r\n \"2603:1030:104:402::740/123\",\r\n \"2603:1030:104:802::1e0/123\"\ - ,\r\n \"2603:1030:107:400::280/123\",\r\n \"2603:1030:210:402::300/123\"\ - ,\r\n \"2603:1030:210:802::240/123\",\r\n \"2603:1030:210:c02::240/123\"\ - ,\r\n \"2603:1030:40b:400::b00/123\",\r\n \"2603:1030:40b:800::240/123\"\ - ,\r\n \"2603:1030:40b:c00::240/123\",\r\n \"2603:1030:40c:402::300/123\"\ - ,\r\n \"2603:1030:40c:802::240/123\",\r\n \"2603:1030:40c:c02::240/123\"\ - ,\r\n \"2603:1030:504:402::460/123\",\r\n \"2603:1030:504:802::100/123\"\ - ,\r\n \"2603:1030:504:c02::2a0/123\",\r\n \"2603:1030:608:402::300/123\"\ - ,\r\n \"2603:1030:807:402::300/123\",\r\n \"2603:1030:807:802::240/123\"\ - ,\r\n \"2603:1030:807:c02::240/123\",\r\n \"2603:1030:a07:402::980/123\"\ - ,\r\n \"2603:1030:b04:402::300/123\",\r\n \"2603:1030:c06:400::b00/123\"\ - ,\r\n \"2603:1030:c06:802::240/123\",\r\n \"2603:1030:c06:c02::240/123\"\ - ,\r\n \"2603:1030:f05:402::300/123\",\r\n \"2603:1030:f05:802::240/123\"\ - ,\r\n \"2603:1030:f05:c02::240/123\",\r\n \"2603:1030:1005:402::300/123\"\ - ,\r\n \"2603:1040:5:402::300/123\",\r\n \"2603:1040:5:802::240/123\"\ - ,\r\n \"2603:1040:5:c02::240/123\",\r\n \"2603:1040:207:402::300/123\"\ - ,\r\n \"2603:1040:207:800::e0/123\",\r\n \"2603:1040:207:c00::e0/123\"\ - ,\r\n \"2603:1040:407:402::300/123\",\r\n \"2603:1040:407:802::240/123\"\ - ,\r\n \"2603:1040:407:c02::240/123\",\r\n \"2603:1040:606:402::300/123\"\ - ,\r\n \"2603:1040:806:402::300/123\",\r\n \"2603:1040:904:402::300/123\"\ - ,\r\n \"2603:1040:904:802::240/123\",\r\n \"2603:1040:904:c02::240/123\"\ - ,\r\n \"2603:1040:a06:402::300/123\",\r\n \"2603:1040:a06:802::240/123\"\ - ,\r\n \"2603:1040:a06:c02::240/123\",\r\n \"2603:1040:b04:402::300/123\"\ - ,\r\n \"2603:1040:c06:402::300/123\",\r\n \"2603:1040:d04:400::480/123\"\ - ,\r\n \"2603:1040:d04:800::100/123\",\r\n \"2603:1040:d04:800::240/123\"\ - ,\r\n \"2603:1040:d04:c02::2a0/123\",\r\n \"2603:1040:f05:402::300/123\"\ - ,\r\n \"2603:1040:f05:802::240/123\",\r\n \"2603:1040:f05:c02::240/123\"\ - ,\r\n \"2603:1040:1002:400::200/123\",\r\n \"2603:1040:1002:800::e0/123\"\ - ,\r\n \"2603:1040:1002:c00::e0/123\",\r\n \"2603:1040:1104:400::300/123\"\ - ,\r\n \"2603:1050:6:402::300/123\",\r\n \"2603:1050:6:802::240/123\"\ - ,\r\n \"2603:1050:6:c02::240/123\",\r\n \"2603:1050:403:400::220/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault\"\ - ,\r\n \"id\": \"AzureKeyVault\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\",\r\n \"VSE\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.66.138.88/30\"\ - ,\r\n \"13.66.226.249/32\",\r\n \"13.66.230.241/32\",\r\n\ - \ \"13.67.8.104/30\",\r\n \"13.68.24.216/32\",\r\n \ - \ \"13.68.29.203/32\",\r\n \"13.68.104.240/32\",\r\n \ - \ \"13.69.64.72/30\",\r\n \"13.69.111.192/30\",\r\n \"\ - 13.69.227.72/30\",\r\n \"13.70.72.24/30\",\r\n \"13.70.138.129/32\"\ - ,\r\n \"13.71.170.40/30\",\r\n \"13.71.194.112/30\",\r\n\ - \ \"13.72.250.239/32\",\r\n \"13.74.10.39/32\",\r\n \ - \ \"13.74.10.113/32\",\r\n \"13.74.111.148/30\",\r\n \ - \ \"13.75.34.144/30\",\r\n \"13.77.50.64/30\",\r\n \"\ - 13.78.106.88/30\",\r\n \"13.80.247.19/32\",\r\n \"13.80.247.42/32\"\ - ,\r\n \"13.84.174.143/32\",\r\n \"13.87.34.51/32\",\r\n\ - \ \"13.87.39.0/32\",\r\n \"13.87.56.80/30\",\r\n \ - \ \"13.87.122.80/30\",\r\n \"13.89.61.248/32\",\r\n \"\ - 13.89.170.200/30\",\r\n \"20.21.37.112/30\",\r\n \"20.21.43.244/30\"\ - ,\r\n \"20.21.66.76/30\",\r\n \"20.21.74.76/30\",\r\n \ - \ \"20.36.40.39/32\",\r\n \"20.36.40.42/32\",\r\n \ - \ \"20.36.72.34/32\",\r\n \"20.36.72.38/32\",\r\n \"20.36.106.64/30\"\ - ,\r\n \"20.36.114.16/30\",\r\n \"20.37.74.228/30\",\r\n\ - \ \"20.38.149.196/30\",\r\n \"20.40.230.32/28\",\r\n \ - \ \"20.40.230.48/29\",\r\n \"20.42.64.44/30\",\r\n \ - \ \"20.42.73.8/30\",\r\n \"20.43.56.38/32\",\r\n \"20.43.56.66/32\"\ - ,\r\n \"20.44.2.0/30\",\r\n \"20.44.13.224/30\",\r\n \ - \ \"20.44.19.172/30\",\r\n \"20.44.29.112/30\",\r\n \ - \ \"20.45.90.72/29\",\r\n \"20.45.90.80/30\",\r\n \"20.45.117.32/29\"\ - ,\r\n \"20.45.117.40/30\",\r\n \"20.45.123.240/30\",\r\n\ - \ \"20.45.123.252/30\",\r\n \"20.45.208.8/30\",\r\n \ - \ \"20.45.241.176/29\",\r\n \"20.46.11.248/29\",\r\n \ - \ \"20.46.12.192/30\",\r\n \"20.48.197.104/29\",\r\n \"\ - 20.48.197.112/30\",\r\n \"20.49.82.0/30\",\r\n \"20.49.90.0/30\"\ - ,\r\n \"20.49.91.232/30\",\r\n \"20.49.119.232/29\",\r\n\ - \ \"20.49.119.240/28\",\r\n \"20.50.80.192/30\",\r\n \ - \ \"20.51.12.248/29\",\r\n \"20.51.13.64/30\",\r\n \ - \ \"20.51.20.84/30\",\r\n \"20.51.21.64/29\",\r\n \"20.52.88.144/29\"\ - ,\r\n \"20.52.88.152/30\",\r\n \"20.53.47.68/30\",\r\n \ - \ \"20.53.47.200/29\",\r\n \"20.53.48.40/29\",\r\n \ - \ \"20.53.49.96/30\",\r\n \"20.53.57.40/29\",\r\n \"\ - 20.53.57.48/30\",\r\n \"20.58.67.48/29\",\r\n \"20.58.67.56/30\"\ - ,\r\n \"20.61.103.224/29\",\r\n \"20.61.103.232/30\",\r\n\ - \ \"20.62.60.128/27\",\r\n \"20.62.134.76/30\",\r\n \ - \ \"20.62.134.224/29\",\r\n \"20.65.134.48/28\",\r\n \ - \ \"20.65.134.64/29\",\r\n \"20.66.2.28/30\",\r\n \"20.66.5.128/29\"\ - ,\r\n \"20.69.1.104/29\",\r\n \"20.69.1.112/30\",\r\n \ - \ \"20.72.21.148/30\",\r\n \"20.72.21.192/29\",\r\n \ - \ \"20.72.26.0/30\",\r\n \"20.83.221.96/28\",\r\n \"\ - 20.88.156.160/29\",\r\n \"20.98.145.80/28\",\r\n \"20.98.192.176/28\"\ - ,\r\n \"20.150.170.0/30\",\r\n \"20.150.181.28/30\",\r\n\ - \ \"20.150.181.164/30\",\r\n \"20.150.189.32/30\",\r\n \ - \ \"20.150.244.36/30\",\r\n \"20.150.245.56/29\",\r\n \ - \ \"20.185.217.251/32\",\r\n \"20.185.218.1/32\",\r\n \ - \ \"20.186.41.83/32\",\r\n \"20.186.47.182/32\",\r\n \ - \ \"20.188.2.148/32\",\r\n \"20.188.2.156/32\",\r\n \"\ - 20.188.40.44/32\",\r\n \"20.188.40.46/32\",\r\n \"20.189.228.136/29\"\ - ,\r\n \"20.189.228.208/30\",\r\n \"20.191.166.120/29\",\r\ - \n \"20.191.167.128/30\",\r\n \"20.192.44.112/29\",\r\n\ - \ \"20.192.44.120/30\",\r\n \"20.192.50.216/29\",\r\n \ - \ \"20.192.50.224/30\",\r\n \"20.192.80.48/29\",\r\n \ - \ \"20.192.80.56/30\",\r\n \"20.192.102.64/30\",\r\n \ - \ \"20.192.234.0/30\",\r\n \"20.193.194.44/30\",\r\n \"\ - 20.193.194.80/29\",\r\n \"20.193.202.0/30\",\r\n \"20.194.66.0/30\"\ - ,\r\n \"20.194.74.80/29\",\r\n \"20.194.74.88/30\",\r\n\ - \ \"20.195.67.192/29\",\r\n \"20.195.67.200/30\",\r\n \ - \ \"20.195.74.168/29\",\r\n \"20.195.74.176/30\",\r\n \ - \ \"20.195.83.60/30\",\r\n \"20.195.84.168/29\",\r\n \ - \ \"20.195.146.68/30\",\r\n \"20.195.146.192/29\",\r\n \ - \ \"20.205.74.76/30\",\r\n \"20.205.82.76/30\",\r\n \"\ - 20.205.192.64/30\",\r\n \"20.208.18.76/30\",\r\n \"23.96.210.207/32\"\ - ,\r\n \"23.96.250.48/32\",\r\n \"23.97.50.43/32\",\r\n \ - \ \"23.97.120.25/32\",\r\n \"23.97.120.29/32\",\r\n \ - \ \"23.97.120.39/32\",\r\n \"23.97.120.57/32\",\r\n \ - \ \"23.97.178.0/32\",\r\n \"23.99.132.207/32\",\r\n \"23.100.57.24/32\"\ - ,\r\n \"23.100.58.149/32\",\r\n \"23.101.21.103/32\",\r\n\ - \ \"23.101.21.193/32\",\r\n \"23.101.23.190/32\",\r\n \ - \ \"23.101.23.192/32\",\r\n \"23.101.159.107/32\",\r\n \ - \ \"23.102.72.114/32\",\r\n \"23.102.75.18/32\",\r\n \ - \ \"40.65.188.244/32\",\r\n \"40.65.189.219/32\",\r\n \ - \ \"40.67.53.184/29\",\r\n \"40.67.53.224/30\",\r\n \"\ - 40.67.58.0/30\",\r\n \"40.69.106.64/30\",\r\n \"40.70.146.72/30\"\ - ,\r\n \"40.70.186.91/32\",\r\n \"40.70.204.6/32\",\r\n \ - \ \"40.70.204.32/32\",\r\n \"40.71.10.200/30\",\r\n \ - \ \"40.74.100.48/30\",\r\n \"40.74.150.68/30\",\r\n \ - \ \"40.76.196.75/32\",\r\n \"40.76.212.37/32\",\r\n \"40.78.194.64/30\"\ - ,\r\n \"40.78.239.124/30\",\r\n \"40.78.245.200/30\",\r\n\ - \ \"40.78.253.68/30\",\r\n \"40.79.118.1/32\",\r\n \ - \ \"40.79.118.5/32\",\r\n \"40.79.130.40/30\",\r\n \"\ - 40.79.141.136/30\",\r\n \"40.79.148.84/30\",\r\n \"40.79.163.156/30\"\ - ,\r\n \"40.79.173.4/30\",\r\n \"40.79.178.64/30\",\r\n \ - \ \"40.79.191.192/30\",\r\n \"40.79.197.112/30\",\r\n \ - \ \"40.80.53.8/30\",\r\n \"40.84.47.24/32\",\r\n \"\ - 40.85.185.208/32\",\r\n \"40.85.229.9/32\",\r\n \"40.85.231.231/32\"\ - ,\r\n \"40.86.224.94/32\",\r\n \"40.86.231.180/32\",\r\n\ - \ \"40.87.69.184/32\",\r\n \"40.89.121.172/30\",\r\n \ - \ \"40.89.145.89/32\",\r\n \"40.89.145.93/32\",\r\n \ - \ \"40.89.180.10/32\",\r\n \"40.89.180.25/32\",\r\n \"\ - 40.91.193.78/32\",\r\n \"40.91.199.213/32\",\r\n \"40.112.242.144/30\"\ - ,\r\n \"40.117.157.122/32\",\r\n \"40.120.74.0/30\",\r\n\ - \ \"40.120.82.104/29\",\r\n \"40.120.82.112/30\",\r\n \ - \ \"40.124.64.128/30\",\r\n \"51.12.17.232/29\",\r\n \ - \ \"51.12.17.240/30\",\r\n \"51.12.25.204/30\",\r\n \ - \ \"51.12.28.32/29\",\r\n \"51.12.98.0/30\",\r\n \"51.12.202.0/30\"\ - ,\r\n \"51.12.229.24/30\",\r\n \"51.12.237.24/30\",\r\n\ - \ \"51.13.136.188/30\",\r\n \"51.13.137.216/29\",\r\n \ - \ \"51.103.202.76/30\",\r\n \"51.104.192.129/32\",\r\n \ - \ \"51.104.192.138/32\",\r\n \"51.105.4.67/32\",\r\n \ - \ \"51.105.4.75/32\",\r\n \"51.105.71.160/30\",\r\n \"\ - 51.105.77.56/30\",\r\n \"51.107.58.0/30\",\r\n \"51.107.154.0/30\"\ - ,\r\n \"51.107.241.116/30\",\r\n \"51.107.242.248/29\",\r\ - \n \"51.107.250.44/30\",\r\n \"51.107.251.104/29\",\r\n\ - \ \"51.116.54.76/30\",\r\n \"51.116.55.88/29\",\r\n \ - \ \"51.116.58.0/30\",\r\n \"51.116.154.64/30\",\r\n \ - \ \"51.116.243.220/30\",\r\n \"51.116.251.188/30\",\r\n \ - \ \"51.120.98.8/30\",\r\n \"51.120.110.192/30\",\r\n \"\ - 51.120.214.128/30\",\r\n \"51.120.218.0/30\",\r\n \"51.120.233.132/30\"\ - ,\r\n \"51.120.234.128/29\",\r\n \"51.138.210.132/30\",\r\ - \n \"51.138.211.8/29\",\r\n \"51.140.146.56/30\",\r\n \ - \ \"51.140.157.60/32\",\r\n \"51.140.184.38/31\",\r\n \ - \ \"51.140.210.80/30\",\r\n \"51.141.8.42/31\",\r\n \ - \ \"51.143.6.21/32\",\r\n \"51.143.212.184/29\",\r\n \"\ - 51.143.213.192/30\",\r\n \"52.136.136.15/32\",\r\n \"52.136.136.16/32\"\ - ,\r\n \"52.136.184.236/30\",\r\n \"52.136.185.176/29\",\r\ - \n \"52.138.73.5/32\",\r\n \"52.138.73.51/32\",\r\n \ - \ \"52.138.92.188/30\",\r\n \"52.138.160.103/32\",\r\n \ - \ \"52.138.160.105/32\",\r\n \"52.139.107.208/29\",\r\n \ - \ \"52.139.107.216/30\",\r\n \"52.146.137.68/30\",\r\n \ - \ \"52.146.137.168/29\",\r\n \"52.147.113.72/29\",\r\n \ - \ \"52.147.113.80/30\",\r\n \"52.148.84.142/32\",\r\n \ - \ \"52.148.84.145/32\",\r\n \"52.151.41.92/32\",\r\n \"\ - 52.151.47.4/32\",\r\n \"52.151.75.86/32\",\r\n \"52.154.176.47/32\"\ - ,\r\n \"52.154.177.179/32\",\r\n \"52.157.162.137/32\",\r\ - \n \"52.157.162.147/32\",\r\n \"52.158.236.253/32\",\r\n\ - \ \"52.158.239.35/32\",\r\n \"52.161.25.42/32\",\r\n \ - \ \"52.161.31.136/32\",\r\n \"52.161.31.139/32\",\r\n \ - \ \"52.162.106.144/30\",\r\n \"52.162.255.194/32\",\r\n \ - \ \"52.165.21.159/32\",\r\n \"52.165.208.47/32\",\r\n \ - \ \"52.167.111.160/30\",\r\n \"52.167.143.179/32\",\r\n \ - \ \"52.167.228.54/32\",\r\n \"52.168.109.101/32\",\r\n \ - \ \"52.169.232.147/32\",\r\n \"52.172.116.4/30\",\r\n \"\ - 52.172.116.136/29\",\r\n \"52.173.90.250/32\",\r\n \"52.173.199.154/32\"\ - ,\r\n \"52.173.216.55/32\",\r\n \"52.175.236.86/32\",\r\n\ - \ \"52.176.48.58/32\",\r\n \"52.176.254.165/32\",\r\n \ - \ \"52.177.71.51/32\",\r\n \"52.180.176.121/32\",\r\n \ - \ \"52.180.176.122/32\",\r\n \"52.182.143.192/30\",\r\n \ - \ \"52.183.24.22/32\",\r\n \"52.183.80.133/32\",\r\n \ - \ \"52.183.93.92/32\",\r\n \"52.183.94.166/32\",\r\n \"\ - 52.184.155.181/32\",\r\n \"52.184.158.37/32\",\r\n \"52.184.164.12/32\"\ - ,\r\n \"52.187.161.13/32\",\r\n \"52.187.163.139/32\",\r\ - \n \"52.225.179.130/32\",\r\n \"52.225.182.225/32\",\r\n\ - \ \"52.225.188.225/32\",\r\n \"52.225.191.36/32\",\r\n \ - \ \"52.225.218.218/32\",\r\n \"52.231.18.40/30\",\r\n \ - \ \"52.231.32.65/32\",\r\n \"52.231.32.66/32\",\r\n \ - \ \"52.231.146.80/30\",\r\n \"52.231.200.107/32\",\r\n \ - \ \"52.231.200.108/32\",\r\n \"52.236.189.80/30\",\r\n \ - \ \"52.237.253.194/32\",\r\n \"52.246.157.4/30\",\r\n \"\ - 52.247.193.69/32\",\r\n \"52.255.63.107/32\",\r\n \"52.255.152.252/32\"\ - ,\r\n \"52.255.152.255/32\",\r\n \"65.52.250.0/30\",\r\n\ - \ \"102.37.81.88/29\",\r\n \"102.37.81.128/30\",\r\n \ - \ \"102.37.160.176/29\",\r\n \"102.37.160.184/30\",\r\n \ - \ \"102.133.26.0/30\",\r\n \"102.133.124.140/30\",\r\n \ - \ \"102.133.154.0/30\",\r\n \"102.133.251.220/30\",\r\n \ - \ \"104.41.0.141/32\",\r\n \"104.41.1.239/32\",\r\n \ - \ \"104.41.162.219/32\",\r\n \"104.41.162.228/32\",\r\n \ - \ \"104.42.6.91/32\",\r\n \"104.42.136.180/32\",\r\n \"\ - 104.43.161.34/32\",\r\n \"104.43.192.26/32\",\r\n \"104.44.136.42/32\"\ - ,\r\n \"104.46.40.31/32\",\r\n \"104.46.179.244/30\",\r\n\ - \ \"104.46.183.152/29\",\r\n \"104.46.219.151/32\",\r\n\ - \ \"104.46.219.184/32\",\r\n \"104.208.26.47/32\",\r\n \ - \ \"104.210.195.61/32\",\r\n \"104.211.81.24/30\",\r\n \ - \ \"104.211.98.11/32\",\r\n \"104.211.99.174/32\",\r\n \ - \ \"104.211.146.64/30\",\r\n \"104.211.166.82/32\",\r\n \ - \ \"104.211.167.57/32\",\r\n \"104.211.224.186/32\",\r\n \ - \ \"104.211.225.134/32\",\r\n \"104.214.18.168/30\",\r\n \ - \ \"104.215.18.67/32\",\r\n \"104.215.31.67/32\",\r\n \ - \ \"104.215.94.76/32\",\r\n \"104.215.99.117/32\",\r\n \ - \ \"104.215.139.166/32\",\r\n \"104.215.140.132/32\",\r\n \ - \ \"137.116.44.148/32\",\r\n \"137.116.120.244/32\",\r\n \ - \ \"137.116.233.191/32\",\r\n \"168.62.108.27/32\",\r\n \ - \ \"168.62.237.29/32\",\r\n \"168.63.167.27/32\",\r\n \ - \ \"168.63.219.200/32\",\r\n \"168.63.219.205/32\",\r\n \ - \ \"191.233.50.0/30\",\r\n \"191.233.203.24/30\",\r\n \ - \ \"191.234.149.140/30\",\r\n \"191.234.157.44/30\",\r\n \ - \ \"191.238.72.76/30\",\r\n \"191.238.72.152/29\",\r\n \ - \ \"2603:1000:4::2a0/125\",\r\n \"2603:1000:4:402::80/125\",\r\ - \n \"2603:1000:104::660/125\",\r\n \"2603:1000:104:402::80/125\"\ - ,\r\n \"2603:1000:104:802::80/125\",\r\n \"2603:1000:104:c02::80/125\"\ - ,\r\n \"2603:1010:6::340/125\",\r\n \"2603:1010:6:402::80/125\"\ - ,\r\n \"2603:1010:6:802::80/125\",\r\n \"2603:1010:6:c02::80/125\"\ - ,\r\n \"2603:1010:101::2a0/125\",\r\n \"2603:1010:101:402::80/125\"\ - ,\r\n \"2603:1010:304::2a0/125\",\r\n \"2603:1010:304:402::80/125\"\ - ,\r\n \"2603:1010:404::2a0/125\",\r\n \"2603:1010:404:402::80/125\"\ - ,\r\n \"2603:1020:5::340/125\",\r\n \"2603:1020:5:402::80/125\"\ - ,\r\n \"2603:1020:5:802::80/125\",\r\n \"2603:1020:5:c02::80/125\"\ - ,\r\n \"2603:1020:206::340/125\",\r\n \"2603:1020:206:402::80/125\"\ - ,\r\n \"2603:1020:206:802::80/125\",\r\n \"2603:1020:206:c02::80/125\"\ - ,\r\n \"2603:1020:305:402::80/125\",\r\n \"2603:1020:405:402::80/125\"\ - ,\r\n \"2603:1020:605::2a0/125\",\r\n \"2603:1020:605:402::80/125\"\ - ,\r\n \"2603:1020:705::340/125\",\r\n \"2603:1020:705:402::80/125\"\ - ,\r\n \"2603:1020:705:802::80/125\",\r\n \"2603:1020:705:c02::80/125\"\ - ,\r\n \"2603:1020:805::340/125\",\r\n \"2603:1020:805:402::80/125\"\ - ,\r\n \"2603:1020:805:802::80/125\",\r\n \"2603:1020:805:c02::80/125\"\ - ,\r\n \"2603:1020:905::2a0/125\",\r\n \"2603:1020:905:402::80/125\"\ - ,\r\n \"2603:1020:a04::340/125\",\r\n \"2603:1020:a04:402::80/125\"\ - ,\r\n \"2603:1020:a04:802::80/125\",\r\n \"2603:1020:a04:c02::80/125\"\ - ,\r\n \"2603:1020:b04::2a0/125\",\r\n \"2603:1020:b04:402::80/125\"\ - ,\r\n \"2603:1020:c04::340/125\",\r\n \"2603:1020:c04:402::80/125\"\ - ,\r\n \"2603:1020:c04:802::80/125\",\r\n \"2603:1020:c04:c02::80/125\"\ - ,\r\n \"2603:1020:d04::2a0/125\",\r\n \"2603:1020:d04:402::80/125\"\ - ,\r\n \"2603:1020:e04::340/125\",\r\n \"2603:1020:e04:402::80/125\"\ - ,\r\n \"2603:1020:e04:802::80/125\",\r\n \"2603:1020:e04:c02::80/125\"\ - ,\r\n \"2603:1020:f04::2a0/125\",\r\n \"2603:1020:f04:402::80/125\"\ - ,\r\n \"2603:1020:1004:1::1f8/125\",\r\n \"2603:1020:1004:400::80/125\"\ - ,\r\n \"2603:1020:1004:400::2f8/125\",\r\n \"2603:1020:1004:800::140/125\"\ - ,\r\n \"2603:1020:1104:1::158/125\",\r\n \"2603:1020:1104:400::80/125\"\ - ,\r\n \"2603:1030:f:1::2a0/125\",\r\n \"2603:1030:f:400::880/125\"\ - ,\r\n \"2603:1030:10::340/125\",\r\n \"2603:1030:10:402::80/125\"\ - ,\r\n \"2603:1030:10:802::80/125\",\r\n \"2603:1030:10:c02::80/125\"\ - ,\r\n \"2603:1030:104::340/125\",\r\n \"2603:1030:104:402::80/125\"\ - ,\r\n \"2603:1030:107::738/125\",\r\n \"2603:1030:107:400::/125\"\ - ,\r\n \"2603:1030:107:400::10/125\",\r\n \"2603:1030:210::340/125\"\ - ,\r\n \"2603:1030:210:402::80/125\",\r\n \"2603:1030:210:802::80/125\"\ - ,\r\n \"2603:1030:210:c02::80/125\",\r\n \"2603:1030:40b:2::220/125\"\ - ,\r\n \"2603:1030:40b:400::880/125\",\r\n \"2603:1030:40b:800::80/125\"\ - ,\r\n \"2603:1030:40b:c00::80/125\",\r\n \"2603:1030:40c::340/125\"\ - ,\r\n \"2603:1030:40c:402::80/125\",\r\n \"2603:1030:40c:802::80/125\"\ - ,\r\n \"2603:1030:40c:c02::80/125\",\r\n \"2603:1030:504::1f8/125\"\ - ,\r\n \"2603:1030:504:402::80/125\",\r\n \"2603:1030:504:402::2f8/125\"\ - ,\r\n \"2603:1030:504:802::140/125\",\r\n \"2603:1030:608::2a0/125\"\ - ,\r\n \"2603:1030:608:402::80/125\",\r\n \"2603:1030:807::340/125\"\ - ,\r\n \"2603:1030:807:402::80/125\",\r\n \"2603:1030:807:802::80/125\"\ - ,\r\n \"2603:1030:807:c02::80/125\",\r\n \"2603:1030:a07::2a0/125\"\ - ,\r\n \"2603:1030:a07:402::80/125\",\r\n \"2603:1030:b04::2a0/125\"\ - ,\r\n \"2603:1030:b04:402::80/125\",\r\n \"2603:1030:c06:2::220/125\"\ - ,\r\n \"2603:1030:c06:400::880/125\",\r\n \"2603:1030:c06:802::80/125\"\ - ,\r\n \"2603:1030:c06:c02::80/125\",\r\n \"2603:1030:f05::340/125\"\ - ,\r\n \"2603:1030:f05:402::80/125\",\r\n \"2603:1030:f05:802::80/125\"\ - ,\r\n \"2603:1030:f05:c02::80/125\",\r\n \"2603:1030:1005::2a0/125\"\ - ,\r\n \"2603:1030:1005:402::80/125\",\r\n \"2603:1040:5::440/125\"\ - ,\r\n \"2603:1040:5:402::80/125\",\r\n \"2603:1040:5:802::80/125\"\ - ,\r\n \"2603:1040:5:c02::80/125\",\r\n \"2603:1040:207::2a0/125\"\ - ,\r\n \"2603:1040:207:402::80/125\",\r\n \"2603:1040:407::340/125\"\ - ,\r\n \"2603:1040:407:402::80/125\",\r\n \"2603:1040:407:802::80/125\"\ - ,\r\n \"2603:1040:407:c02::80/125\",\r\n \"2603:1040:606::2a0/125\"\ - ,\r\n \"2603:1040:606:402::80/125\",\r\n \"2603:1040:806::2a0/125\"\ - ,\r\n \"2603:1040:806:402::80/125\",\r\n \"2603:1040:904::340/125\"\ - ,\r\n \"2603:1040:904:402::80/125\",\r\n \"2603:1040:904:802::80/125\"\ - ,\r\n \"2603:1040:904:c02::80/125\",\r\n \"2603:1040:a06::440/125\"\ - ,\r\n \"2603:1040:a06:402::80/125\",\r\n \"2603:1040:a06:802::80/125\"\ - ,\r\n \"2603:1040:a06:c02::80/125\",\r\n \"2603:1040:b04::2a0/125\"\ - ,\r\n \"2603:1040:b04:402::80/125\",\r\n \"2603:1040:c06::2a0/125\"\ - ,\r\n \"2603:1040:c06:402::80/125\",\r\n \"2603:1040:d04:1::1f8/125\"\ - ,\r\n \"2603:1040:d04:400::80/125\",\r\n \"2603:1040:d04:400::2f8/125\"\ - ,\r\n \"2603:1040:d04:800::140/125\",\r\n \"2603:1040:e05::20/125\"\ - ,\r\n \"2603:1040:f05::340/125\",\r\n \"2603:1040:f05:402::80/125\"\ - ,\r\n \"2603:1040:f05:802::80/125\",\r\n \"2603:1040:f05:c02::80/125\"\ - ,\r\n \"2603:1040:1002:1::470/125\",\r\n \"2603:1040:1104:1::158/125\"\ - ,\r\n \"2603:1040:1104:400::80/125\",\r\n \"2603:1050:6::340/125\"\ - ,\r\n \"2603:1050:6:402::80/125\",\r\n \"2603:1050:6:802::80/125\"\ - ,\r\n \"2603:1050:6:c02::80/125\",\r\n \"2603:1050:403:1::220/125\"\ - ,\r\n \"2603:1050:403:400::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.AustraliaCentral\",\r\n\ - \ \"id\": \"AzureKeyVault.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.36.40.39/32\"\ - ,\r\n \"20.36.40.42/32\",\r\n \"20.36.106.64/30\",\r\n \ - \ \"20.53.48.40/29\",\r\n \"20.53.49.96/30\",\r\n \ - \ \"2603:1010:304::2a0/125\",\r\n \"2603:1010:304:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.AustraliaCentral2\"\ - ,\r\n \"id\": \"AzureKeyVault.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiacentral2\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\ - \n \"20.36.72.34/32\",\r\n \"20.36.72.38/32\",\r\n \ - \ \"20.36.114.16/30\",\r\n \"20.53.57.40/29\",\r\n \"\ - 20.53.57.48/30\",\r\n \"2603:1010:404::2a0/125\",\r\n \"\ - 2603:1010:404:402::80/125\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"AzureKeyVault.AustraliaEast\",\r\n \"id\": \"AzureKeyVault.AustraliaEast\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"australiaeast\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.70.72.24/30\",\r\n \ - \ \"13.72.250.239/32\",\r\n \"20.53.47.68/30\",\r\n \"\ - 20.53.47.200/29\",\r\n \"40.79.163.156/30\",\r\n \"40.79.173.4/30\"\ - ,\r\n \"52.237.253.194/32\",\r\n \"2603:1010:6::340/125\"\ - ,\r\n \"2603:1010:6:402::80/125\",\r\n \"2603:1010:6:802::80/125\"\ - ,\r\n \"2603:1010:6:c02::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.AustraliaSoutheast\",\r\n\ - \ \"id\": \"AzureKeyVault.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\ - \n \"13.70.138.129/32\",\r\n \"13.77.50.64/30\",\r\n \ - \ \"52.255.63.107/32\",\r\n \"104.46.179.244/30\",\r\n \ - \ \"104.46.183.152/29\",\r\n \"2603:1010:101::2a0/125\",\r\n\ - \ \"2603:1010:101:402::80/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureKeyVault.BrazilSouth\",\r\n \"id\"\ - : \"AzureKeyVault.BrazilSouth\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"104.41.0.141/32\"\ - ,\r\n \"104.41.1.239/32\",\r\n \"191.233.203.24/30\",\r\n\ - \ \"191.234.149.140/30\",\r\n \"191.234.157.44/30\",\r\n\ - \ \"191.238.72.76/30\",\r\n \"191.238.72.152/29\",\r\n \ - \ \"2603:1050:6::340/125\",\r\n \"2603:1050:6:402::80/125\"\ - ,\r\n \"2603:1050:6:802::80/125\",\r\n \"2603:1050:6:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.BrazilSoutheast\"\ - ,\r\n \"id\": \"AzureKeyVault.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.195.146.68/30\"\ - ,\r\n \"20.195.146.192/29\",\r\n \"23.97.120.25/32\",\r\n\ - \ \"23.97.120.29/32\",\r\n \"23.97.120.39/32\",\r\n \ - \ \"23.97.120.57/32\",\r\n \"191.233.50.0/30\",\r\n \ - \ \"2603:1050:403:1::220/125\",\r\n \"2603:1050:403:400::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.CanadaCentral\"\ - ,\r\n \"id\": \"AzureKeyVault.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.71.170.40/30\"\ - ,\r\n \"20.38.149.196/30\",\r\n \"20.48.197.104/29\",\r\n\ - \ \"20.48.197.112/30\",\r\n \"40.85.229.9/32\",\r\n \ - \ \"40.85.231.231/32\",\r\n \"52.246.157.4/30\",\r\n \ - \ \"2603:1030:f05::340/125\",\r\n \"2603:1030:f05:402::80/125\"\ - ,\r\n \"2603:1030:f05:802::80/125\",\r\n \"2603:1030:f05:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.CanadaEast\"\ - ,\r\n \"id\": \"AzureKeyVault.CanadaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"40.69.106.64/30\"\ - ,\r\n \"40.86.224.94/32\",\r\n \"40.86.231.180/32\",\r\n\ - \ \"52.139.107.208/29\",\r\n \"52.139.107.216/30\",\r\n\ - \ \"2603:1030:1005::2a0/125\",\r\n \"2603:1030:1005:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.CentralIndia\"\ - ,\r\n \"id\": \"AzureKeyVault.CentralIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.192.44.112/29\"\ - ,\r\n \"20.192.44.120/30\",\r\n \"20.192.102.64/30\",\r\n\ - \ \"40.80.53.8/30\",\r\n \"104.211.81.24/30\",\r\n \ - \ \"104.211.98.11/32\",\r\n \"104.211.99.174/32\",\r\n \ - \ \"2603:1040:a06::440/125\",\r\n \"2603:1040:a06:402::80/125\"\ - ,\r\n \"2603:1040:a06:802::80/125\",\r\n \"2603:1040:a06:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.CentralUS\"\ - ,\r\n \"id\": \"AzureKeyVault.CentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.89.61.248/32\"\ - ,\r\n \"13.89.170.200/30\",\r\n \"20.40.230.32/28\",\r\n\ - \ \"20.40.230.48/29\",\r\n \"20.44.13.224/30\",\r\n \ - \ \"20.98.145.80/28\",\r\n \"23.99.132.207/32\",\r\n \ - \ \"52.154.176.47/32\",\r\n \"52.154.177.179/32\",\r\n \ - \ \"52.165.21.159/32\",\r\n \"52.165.208.47/32\",\r\n \"\ - 52.173.90.250/32\",\r\n \"52.173.199.154/32\",\r\n \"52.173.216.55/32\"\ - ,\r\n \"52.176.48.58/32\",\r\n \"52.182.143.192/30\",\r\n\ - \ \"104.43.161.34/32\",\r\n \"104.43.192.26/32\",\r\n \ - \ \"104.208.26.47/32\",\r\n \"2603:1030:10::340/125\",\r\n\ - \ \"2603:1030:10:402::80/125\",\r\n \"2603:1030:10:802::80/125\"\ - ,\r\n \"2603:1030:10:c02::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.CentralUSEUAP\",\r\n \ - \ \"id\": \"AzureKeyVault.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.45.208.8/30\"\ - ,\r\n \"20.45.241.176/29\",\r\n \"20.46.11.248/29\",\r\n\ - \ \"20.46.12.192/30\",\r\n \"52.176.254.165/32\",\r\n \ - \ \"52.180.176.121/32\",\r\n \"52.180.176.122/32\",\r\n \ - \ \"2603:1030:f:1::2a0/125\",\r\n \"2603:1030:f:400::880/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.EastAsia\"\ - ,\r\n \"id\": \"AzureKeyVault.EastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.75.34.144/30\"\ - ,\r\n \"20.195.74.168/29\",\r\n \"20.195.74.176/30\",\r\n\ - \ \"20.205.74.76/30\",\r\n \"20.205.82.76/30\",\r\n \ - \ \"168.63.219.200/32\",\r\n \"168.63.219.205/32\",\r\n \ - \ \"2603:1040:207::2a0/125\",\r\n \"2603:1040:207:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.EastUS\"\ - ,\r\n \"id\": \"AzureKeyVault.EastUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.42.64.44/30\"\ - ,\r\n \"20.42.73.8/30\",\r\n \"20.62.134.76/30\",\r\n \ - \ \"20.62.134.224/29\",\r\n \"20.88.156.160/29\",\r\n \ - \ \"20.185.217.251/32\",\r\n \"20.185.218.1/32\",\r\n \ - \ \"40.71.10.200/30\",\r\n \"40.76.196.75/32\",\r\n \"\ - 40.76.212.37/32\",\r\n \"40.85.185.208/32\",\r\n \"40.87.69.184/32\"\ - ,\r\n \"40.117.157.122/32\",\r\n \"52.168.109.101/32\",\r\ - \n \"52.255.152.252/32\",\r\n \"52.255.152.255/32\",\r\n\ - \ \"137.116.120.244/32\",\r\n \"2603:1030:210::340/125\"\ - ,\r\n \"2603:1030:210:402::80/125\",\r\n \"2603:1030:210:802::80/125\"\ - ,\r\n \"2603:1030:210:c02::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.EastUS2\",\r\n \"\ - id\": \"AzureKeyVault.EastUS2\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \ - \ \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureKeyVault\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.68.24.216/32\",\r\n\ - \ \"13.68.29.203/32\",\r\n \"13.68.104.240/32\",\r\n \ - \ \"20.44.19.172/30\",\r\n \"20.62.60.128/27\",\r\n \ - \ \"20.98.192.176/28\",\r\n \"20.186.41.83/32\",\r\n \"\ - 20.186.47.182/32\",\r\n \"23.101.159.107/32\",\r\n \"40.70.146.72/30\"\ - ,\r\n \"40.70.186.91/32\",\r\n \"40.70.204.6/32\",\r\n \ - \ \"40.70.204.32/32\",\r\n \"40.84.47.24/32\",\r\n \ - \ \"52.167.111.160/30\",\r\n \"52.167.143.179/32\",\r\n \ - \ \"52.167.228.54/32\",\r\n \"52.177.71.51/32\",\r\n \ - \ \"52.184.155.181/32\",\r\n \"52.184.158.37/32\",\r\n \"\ - 52.184.164.12/32\",\r\n \"52.225.218.218/32\",\r\n \"137.116.44.148/32\"\ - ,\r\n \"2603:1030:40c::340/125\",\r\n \"2603:1030:40c:402::80/125\"\ - ,\r\n \"2603:1030:40c:802::80/125\",\r\n \"2603:1030:40c:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.EastUS2EUAP\"\ - ,\r\n \"id\": \"AzureKeyVault.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.51.20.84/30\"\ - ,\r\n \"20.51.21.64/29\",\r\n \"40.74.150.68/30\",\r\n \ - \ \"40.79.118.1/32\",\r\n \"40.79.118.5/32\",\r\n \ - \ \"40.89.121.172/30\",\r\n \"52.138.73.5/32\",\r\n \"\ - 52.138.73.51/32\",\r\n \"52.138.92.188/30\",\r\n \"52.225.179.130/32\"\ - ,\r\n \"52.225.182.225/32\",\r\n \"52.225.188.225/32\",\r\ - \n \"52.225.191.36/32\",\r\n \"2603:1030:40b:2::220/125\"\ - ,\r\n \"2603:1030:40b:400::880/125\",\r\n \"2603:1030:40b:800::80/125\"\ - ,\r\n \"2603:1030:40b:c00::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.FranceCentral\",\r\n \ - \ \"id\": \"AzureKeyVault.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.43.56.38/32\"\ - ,\r\n \"20.43.56.66/32\",\r\n \"20.188.40.44/32\",\r\n \ - \ \"20.188.40.46/32\",\r\n \"40.79.130.40/30\",\r\n \ - \ \"40.79.141.136/30\",\r\n \"40.79.148.84/30\",\r\n \ - \ \"40.89.145.89/32\",\r\n \"40.89.145.93/32\",\r\n \"\ - 40.89.180.10/32\",\r\n \"40.89.180.25/32\",\r\n \"51.138.210.132/30\"\ - ,\r\n \"51.138.211.8/29\",\r\n \"2603:1020:805::340/125\"\ - ,\r\n \"2603:1020:805:402::80/125\",\r\n \"2603:1020:805:802::80/125\"\ - ,\r\n \"2603:1020:805:c02::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.FranceSouth\",\r\n \ - \ \"id\": \"AzureKeyVault.FranceSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"40.79.178.64/30\"\ - ,\r\n \"52.136.136.15/32\",\r\n \"52.136.136.16/32\",\r\n\ - \ \"52.136.184.236/30\",\r\n \"52.136.185.176/29\",\r\n\ - \ \"2603:1020:905::2a0/125\",\r\n \"2603:1020:905:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.GermanyNorth\"\ - ,\r\n \"id\": \"AzureKeyVault.GermanyNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"51.116.54.76/30\"\ - ,\r\n \"51.116.55.88/29\",\r\n \"51.116.58.0/30\",\r\n \ - \ \"2603:1020:d04::2a0/125\",\r\n \"2603:1020:d04:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.GermanyWestCentral\"\ - ,\r\n \"id\": \"AzureKeyVault.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.52.88.144/29\"\ - ,\r\n \"20.52.88.152/30\",\r\n \"51.116.154.64/30\",\r\n\ - \ \"51.116.243.220/30\",\r\n \"51.116.251.188/30\",\r\n\ - \ \"2603:1020:c04::340/125\",\r\n \"2603:1020:c04:402::80/125\"\ - ,\r\n \"2603:1020:c04:802::80/125\",\r\n \"2603:1020:c04:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.JapanEast\"\ - ,\r\n \"id\": \"AzureKeyVault.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.78.106.88/30\"\ - ,\r\n \"20.188.2.148/32\",\r\n \"20.188.2.156/32\",\r\n\ - \ \"20.191.166.120/29\",\r\n \"20.191.167.128/30\",\r\n\ - \ \"23.102.72.114/32\",\r\n \"23.102.75.18/32\",\r\n \ - \ \"40.79.191.192/30\",\r\n \"40.79.197.112/30\",\r\n \ - \ \"104.41.162.219/32\",\r\n \"104.41.162.228/32\",\r\n \ - \ \"104.46.219.151/32\",\r\n \"104.46.219.184/32\",\r\n \ - \ \"2603:1040:407::340/125\",\r\n \"2603:1040:407:402::80/125\"\ - ,\r\n \"2603:1040:407:802::80/125\",\r\n \"2603:1040:407:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.JapanWest\"\ - ,\r\n \"id\": \"AzureKeyVault.JapanWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.189.228.136/29\"\ - ,\r\n \"20.189.228.208/30\",\r\n \"40.74.100.48/30\",\r\n\ - \ \"104.215.18.67/32\",\r\n \"104.215.31.67/32\",\r\n \ - \ \"2603:1040:606::2a0/125\",\r\n \"2603:1040:606:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.JioIndiaCentral\"\ - ,\r\n \"id\": \"AzureKeyVault.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.192.50.216/29\"\ - ,\r\n \"20.192.50.224/30\",\r\n \"20.192.234.0/30\",\r\n\ - \ \"2603:1040:1104:1::158/125\",\r\n \"2603:1040:1104:400::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.JioIndiaWest\"\ - ,\r\n \"id\": \"AzureKeyVault.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.193.194.44/30\"\ - ,\r\n \"20.193.194.80/29\",\r\n \"20.193.202.0/30\",\r\n\ - \ \"2603:1040:d04:1::1f8/125\",\r\n \"2603:1040:d04:400::80/125\"\ - ,\r\n \"2603:1040:d04:400::2f8/125\",\r\n \"2603:1040:d04:800::140/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.KoreaCentral\"\ - ,\r\n \"id\": \"AzureKeyVault.KoreaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.44.29.112/30\"\ - ,\r\n \"20.194.66.0/30\",\r\n \"20.194.74.80/29\",\r\n \ - \ \"20.194.74.88/30\",\r\n \"52.231.18.40/30\",\r\n \ - \ \"52.231.32.65/32\",\r\n \"52.231.32.66/32\",\r\n \ - \ \"2603:1040:f05::340/125\",\r\n \"2603:1040:f05:402::80/125\",\r\ - \n \"2603:1040:f05:802::80/125\",\r\n \"2603:1040:f05:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.KoreaSouth\"\ - ,\r\n \"id\": \"AzureKeyVault.KoreaSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"52.147.113.72/29\"\ - ,\r\n \"52.147.113.80/30\",\r\n \"52.231.146.80/30\",\r\n\ - \ \"52.231.200.107/32\",\r\n \"52.231.200.108/32\",\r\n\ - \ \"2603:1040:e05::20/125\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"AzureKeyVault.NorthCentralUS\",\r\n \"id\"\ - : \"AzureKeyVault.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.49.119.232/29\"\ - ,\r\n \"20.49.119.240/28\",\r\n \"23.96.210.207/32\",\r\n\ - \ \"23.96.250.48/32\",\r\n \"52.162.106.144/30\",\r\n \ - \ \"52.162.255.194/32\",\r\n \"168.62.108.27/32\",\r\n \ - \ \"168.62.237.29/32\",\r\n \"2603:1030:608::2a0/125\",\r\n\ - \ \"2603:1030:608:402::80/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureKeyVault.NorthEurope\",\r\n \"id\"\ - : \"AzureKeyVault.NorthEurope\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.69.227.72/30\"\ - ,\r\n \"13.74.10.39/32\",\r\n \"13.74.10.113/32\",\r\n \ - \ \"13.74.111.148/30\",\r\n \"20.50.80.192/30\",\r\n \ - \ \"23.100.57.24/32\",\r\n \"23.100.58.149/32\",\r\n \ - \ \"52.138.160.103/32\",\r\n \"52.138.160.105/32\",\r\n \ - \ \"52.146.137.68/30\",\r\n \"52.146.137.168/29\",\r\n \ - \ \"52.169.232.147/32\",\r\n \"137.116.233.191/32\",\r\n \ - \ \"2603:1020:5::340/125\",\r\n \"2603:1020:5:402::80/125\",\r\n\ - \ \"2603:1020:5:802::80/125\",\r\n \"2603:1020:5:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.NorwayEast\"\ - ,\r\n \"id\": \"AzureKeyVault.NorwayEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"51.120.98.8/30\"\ - ,\r\n \"51.120.110.192/30\",\r\n \"51.120.214.128/30\",\r\ - \n \"51.120.233.132/30\",\r\n \"51.120.234.128/29\",\r\n\ - \ \"2603:1020:e04::340/125\",\r\n \"2603:1020:e04:402::80/125\"\ - ,\r\n \"2603:1020:e04:802::80/125\",\r\n \"2603:1020:e04:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.NorwayWest\"\ - ,\r\n \"id\": \"AzureKeyVault.NorwayWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"51.13.136.188/30\"\ - ,\r\n \"51.13.137.216/29\",\r\n \"51.120.218.0/30\",\r\n\ - \ \"2603:1020:f04::2a0/125\",\r\n \"2603:1020:f04:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SouthAfricaNorth\"\ - ,\r\n \"id\": \"AzureKeyVault.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"102.37.160.176/29\"\ - ,\r\n \"102.37.160.184/30\",\r\n \"102.133.124.140/30\"\ - ,\r\n \"102.133.154.0/30\",\r\n \"102.133.251.220/30\",\r\ - \n \"2603:1000:104::660/125\",\r\n \"2603:1000:104:402::80/125\"\ - ,\r\n \"2603:1000:104:802::80/125\",\r\n \"2603:1000:104:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SouthAfricaWest\"\ - ,\r\n \"id\": \"AzureKeyVault.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"102.37.81.88/29\"\ - ,\r\n \"102.37.81.128/30\",\r\n \"102.133.26.0/30\",\r\n\ - \ \"2603:1000:4::2a0/125\",\r\n \"2603:1000:4:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SouthCentralUS\"\ - ,\r\n \"id\": \"AzureKeyVault.SouthCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.84.174.143/32\"\ - ,\r\n \"20.45.123.240/30\",\r\n \"20.45.123.252/30\",\r\n\ - \ \"20.49.90.0/30\",\r\n \"20.49.91.232/30\",\r\n \ - \ \"20.65.134.48/28\",\r\n \"20.65.134.64/29\",\r\n \"\ - 40.124.64.128/30\",\r\n \"104.44.136.42/32\",\r\n \"104.210.195.61/32\"\ - ,\r\n \"104.214.18.168/30\",\r\n \"104.215.94.76/32\",\r\ - \n \"104.215.99.117/32\",\r\n \"2603:1030:807::340/125\"\ - ,\r\n \"2603:1030:807:402::80/125\",\r\n \"2603:1030:807:802::80/125\"\ - ,\r\n \"2603:1030:807:c02::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.SouthCentralUSSTG\",\r\n\ - \ \"id\": \"AzureKeyVault.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.44.2.0/30\"\ - ,\r\n \"20.45.117.32/29\",\r\n \"20.45.117.40/30\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SoutheastAsia\"\ - ,\r\n \"id\": \"AzureKeyVault.SoutheastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.67.8.104/30\"\ - ,\r\n \"20.195.67.192/29\",\r\n \"20.195.67.200/30\",\r\n\ - \ \"20.195.83.60/30\",\r\n \"20.195.84.168/29\",\r\n \ - \ \"20.205.192.64/30\",\r\n \"23.97.50.43/32\",\r\n \ - \ \"23.101.21.103/32\",\r\n \"23.101.21.193/32\",\r\n \ - \ \"23.101.23.190/32\",\r\n \"23.101.23.192/32\",\r\n \"\ - 40.65.188.244/32\",\r\n \"40.65.189.219/32\",\r\n \"40.78.239.124/30\"\ - ,\r\n \"52.148.84.142/32\",\r\n \"52.148.84.145/32\",\r\n\ - \ \"52.187.161.13/32\",\r\n \"52.187.163.139/32\",\r\n \ - \ \"104.215.139.166/32\",\r\n \"104.215.140.132/32\",\r\n\ - \ \"168.63.167.27/32\",\r\n \"2603:1040:5::440/125\",\r\n\ - \ \"2603:1040:5:402::80/125\",\r\n \"2603:1040:5:802::80/125\"\ - ,\r\n \"2603:1040:5:c02::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.SouthIndia\",\r\n \"\ - id\": \"AzureKeyVault.SouthIndia\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"40.78.194.64/30\"\ - ,\r\n \"52.172.116.4/30\",\r\n \"52.172.116.136/29\",\r\n\ - \ \"104.211.224.186/32\",\r\n \"104.211.225.134/32\",\r\n\ - \ \"2603:1040:c06::2a0/125\",\r\n \"2603:1040:c06:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SwedenCentral\"\ - ,\r\n \"id\": \"AzureKeyVault.SwedenCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"51.12.25.204/30\"\ - ,\r\n \"51.12.28.32/29\",\r\n \"51.12.98.0/30\",\r\n \ - \ \"51.12.229.24/30\",\r\n \"51.12.237.24/30\",\r\n \ - \ \"2603:1020:1004:1::1f8/125\",\r\n \"2603:1020:1004:400::80/125\"\ - ,\r\n \"2603:1020:1004:400::2f8/125\",\r\n \"2603:1020:1004:800::140/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SwitzerlandNorth\"\ - ,\r\n \"id\": \"AzureKeyVault.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.208.18.76/30\"\ - ,\r\n \"51.103.202.76/30\",\r\n \"51.107.58.0/30\",\r\n\ - \ \"51.107.241.116/30\",\r\n \"51.107.242.248/29\",\r\n\ - \ \"2603:1020:a04::340/125\",\r\n \"2603:1020:a04:402::80/125\"\ - ,\r\n \"2603:1020:a04:802::80/125\",\r\n \"2603:1020:a04:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SwitzerlandWest\"\ - ,\r\n \"id\": \"AzureKeyVault.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"51.107.154.0/30\"\ - ,\r\n \"51.107.250.44/30\",\r\n \"51.107.251.104/29\",\r\ - \n \"2603:1020:b04::2a0/125\",\r\n \"2603:1020:b04:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.UAECentral\"\ - ,\r\n \"id\": \"AzureKeyVault.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.37.74.228/30\"\ - ,\r\n \"20.45.90.72/29\",\r\n \"20.45.90.80/30\",\r\n \ - \ \"2603:1040:b04::2a0/125\",\r\n \"2603:1040:b04:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.UAENorth\"\ - ,\r\n \"id\": \"AzureKeyVault.UAENorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"40.120.74.0/30\"\ - ,\r\n \"40.120.82.104/29\",\r\n \"40.120.82.112/30\",\r\n\ - \ \"65.52.250.0/30\",\r\n \"2603:1040:904::340/125\",\r\n\ - \ \"2603:1040:904:402::80/125\",\r\n \"2603:1040:904:802::80/125\"\ - ,\r\n \"2603:1040:904:c02::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.UKSouth\",\r\n \"\ - id\": \"AzureKeyVault.UKSouth\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureKeyVault\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.104.192.129/32\",\r\n\ - \ \"51.104.192.138/32\",\r\n \"51.105.4.67/32\",\r\n \ - \ \"51.105.4.75/32\",\r\n \"51.105.71.160/30\",\r\n \ - \ \"51.105.77.56/30\",\r\n \"51.140.146.56/30\",\r\n \"\ - 51.140.157.60/32\",\r\n \"51.140.184.38/31\",\r\n \"51.143.212.184/29\"\ - ,\r\n \"51.143.213.192/30\",\r\n \"52.151.75.86/32\",\r\n\ - \ \"2603:1020:705::340/125\",\r\n \"2603:1020:705:402::80/125\"\ - ,\r\n \"2603:1020:705:802::80/125\",\r\n \"2603:1020:705:c02::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.UKWest\"\ - ,\r\n \"id\": \"AzureKeyVault.UKWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.58.67.48/29\"\ - ,\r\n \"20.58.67.56/30\",\r\n \"51.140.210.80/30\",\r\n\ - \ \"51.141.8.42/31\",\r\n \"2603:1020:605::2a0/125\",\r\n\ - \ \"2603:1020:605:402::80/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureKeyVault.WestCentralUS\",\r\n \"id\"\ - : \"AzureKeyVault.WestCentralUS\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.71.194.112/30\"\ - ,\r\n \"20.69.1.104/29\",\r\n \"20.69.1.112/30\",\r\n \ - \ \"52.161.25.42/32\",\r\n \"52.161.31.136/32\",\r\n \ - \ \"52.161.31.139/32\",\r\n \"2603:1030:b04::2a0/125\",\r\n \ - \ \"2603:1030:b04:402::80/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"AzureKeyVault.WestEurope\",\r\n \"id\":\ - \ \"AzureKeyVault.WestEurope\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.69.64.72/30\"\ - ,\r\n \"13.69.111.192/30\",\r\n \"13.80.247.19/32\",\r\n\ - \ \"13.80.247.42/32\",\r\n \"20.61.103.224/29\",\r\n \ - \ \"20.61.103.232/30\",\r\n \"23.97.178.0/32\",\r\n \ - \ \"40.91.193.78/32\",\r\n \"40.91.199.213/32\",\r\n \"\ - 52.157.162.137/32\",\r\n \"52.157.162.147/32\",\r\n \"52.236.189.80/30\"\ - ,\r\n \"104.46.40.31/32\",\r\n \"2603:1020:206::340/125\"\ - ,\r\n \"2603:1020:206:402::80/125\",\r\n \"2603:1020:206:802::80/125\"\ - ,\r\n \"2603:1020:206:c02::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.WestIndia\",\r\n \"\ - id\": \"AzureKeyVault.WestIndia\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.192.80.48/29\"\ - ,\r\n \"20.192.80.56/30\",\r\n \"104.211.146.64/30\",\r\n\ - \ \"104.211.166.82/32\",\r\n \"104.211.167.57/32\",\r\n\ - \ \"2603:1040:806::2a0/125\",\r\n \"2603:1040:806:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.WestUS\"\ - ,\r\n \"id\": \"AzureKeyVault.WestUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.66.2.28/30\"\ - ,\r\n \"20.66.5.128/29\",\r\n \"40.112.242.144/30\",\r\n\ - \ \"104.42.6.91/32\",\r\n \"104.42.136.180/32\",\r\n \ - \ \"2603:1030:a07::2a0/125\",\r\n \"2603:1030:a07:402::80/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.WestUS2\"\ - ,\r\n \"id\": \"AzureKeyVault.WestUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.66.138.88/30\"\ - ,\r\n \"13.66.226.249/32\",\r\n \"13.66.230.241/32\",\r\n\ - \ \"20.51.12.248/29\",\r\n \"20.51.13.64/30\",\r\n \ - \ \"20.83.221.96/28\",\r\n \"40.78.245.200/30\",\r\n \ - \ \"40.78.253.68/30\",\r\n \"51.143.6.21/32\",\r\n \"52.151.41.92/32\"\ - ,\r\n \"52.151.47.4/32\",\r\n \"52.158.236.253/32\",\r\n\ - \ \"52.158.239.35/32\",\r\n \"52.175.236.86/32\",\r\n \ - \ \"52.183.24.22/32\",\r\n \"52.183.80.133/32\",\r\n \ - \ \"52.183.93.92/32\",\r\n \"52.183.94.166/32\",\r\n \ - \ \"52.247.193.69/32\",\r\n \"2603:1030:c06:2::220/125\",\r\n \ - \ \"2603:1030:c06:400::880/125\",\r\n \"2603:1030:c06:802::80/125\"\ - ,\r\n \"2603:1030:c06:c02::80/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"AzureKeyVault.WestUS3\",\r\n \"\ - id\": \"AzureKeyVault.WestUS3\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \ - \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureKeyVault\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.150.170.0/30\",\r\n\ - \ \"20.150.181.28/30\",\r\n \"20.150.181.164/30\",\r\n \ - \ \"20.150.189.32/30\",\r\n \"20.150.244.36/30\",\r\n \ - \ \"20.150.245.56/29\",\r\n \"2603:1030:504::1f8/125\",\r\n\ - \ \"2603:1030:504:402::80/125\",\r\n \"2603:1030:504:402::2f8/125\"\ - ,\r\n \"2603:1030:504:802::140/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"AzureMachineLearning\",\r\n \"\ - id\": \"AzureMachineLearning\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureMachineLearning\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.87.135/32\",\r\n\ - \ \"13.66.140.80/28\",\r\n \"13.67.8.224/28\",\r\n \ - \ \"13.69.64.192/28\",\r\n \"13.69.106.192/28\",\r\n \ - \ \"13.69.227.192/28\",\r\n \"13.70.72.144/28\",\r\n \"\ - 13.71.170.192/28\",\r\n \"13.71.173.80/28\",\r\n \"13.71.194.240/28\"\ - ,\r\n \"13.73.240.16/28\",\r\n \"13.73.240.112/28\",\r\n\ - \ \"13.73.240.240/28\",\r\n \"13.73.248.96/28\",\r\n \ - \ \"13.74.107.160/28\",\r\n \"13.75.36.16/28\",\r\n \ - \ \"13.77.50.224/28\",\r\n \"13.78.106.208/28\",\r\n \"\ - 13.86.195.35/32\",\r\n \"13.87.56.112/28\",\r\n \"13.87.122.112/28\"\ - ,\r\n \"13.87.160.129/32\",\r\n \"13.89.171.64/28\",\r\n\ - \ \"20.21.33.0/27\",\r\n \"20.36.106.80/28\",\r\n \ - \ \"20.36.114.160/28\",\r\n \"20.37.67.80/28\",\r\n \"\ - 20.37.74.208/28\",\r\n \"20.37.152.240/28\",\r\n \"20.37.192.96/28\"\ - ,\r\n \"20.38.80.96/28\",\r\n \"20.38.128.48/28\",\r\n \ - \ \"20.38.147.128/28\",\r\n \"20.39.1.205/32\",\r\n \ - \ \"20.39.11.80/28\",\r\n \"20.40.141.171/32\",\r\n \ - \ \"20.40.231.32/28\",\r\n \"20.41.0.240/28\",\r\n \"20.41.64.80/28\"\ - ,\r\n \"20.41.197.0/28\",\r\n \"20.42.0.240/28\",\r\n \ - \ \"20.42.129.16/28\",\r\n \"20.42.227.48/28\",\r\n \ - \ \"20.43.40.96/28\",\r\n \"20.43.64.96/28\",\r\n \"\ - 20.43.120.112/28\",\r\n \"20.43.128.112/28\",\r\n \"20.44.3.32/28\"\ - ,\r\n \"20.44.26.224/28\",\r\n \"20.44.132.166/32\",\r\n\ - \ \"20.45.240.64/28\",\r\n \"20.46.13.192/28\",\r\n \ - \ \"20.48.197.240/28\",\r\n \"20.51.1.48/28\",\r\n \ - \ \"20.51.14.48/28\",\r\n \"20.51.21.224/28\",\r\n \"20.62.61.128/28\"\ - ,\r\n \"20.62.135.208/28\",\r\n \"20.65.135.0/28\",\r\n\ - \ \"20.66.6.48/28\",\r\n \"20.69.1.240/28\",\r\n \ - \ \"20.70.216.96/28\",\r\n \"20.72.16.48/28\",\r\n \"\ - 20.82.244.0/28\",\r\n \"20.86.88.160/28\",\r\n \"20.89.9.0/28\"\ - ,\r\n \"20.99.8.96/27\",\r\n \"20.150.161.128/28\",\r\n\ - \ \"20.150.171.80/28\",\r\n \"20.150.179.64/28\",\r\n \ - \ \"20.150.187.64/28\",\r\n \"20.150.246.16/28\",\r\n \ - \ \"20.188.219.157/32\",\r\n \"20.188.221.15/32\",\r\n \ - \ \"20.189.106.80/28\",\r\n \"20.189.229.176/28\",\r\n \ - \ \"20.192.47.112/28\",\r\n \"20.192.99.64/28\",\r\n \ - \ \"20.192.160.48/28\",\r\n \"20.192.225.144/28\",\r\n \"\ - 20.192.235.16/28\",\r\n \"20.193.194.176/28\",\r\n \"20.195.69.64/28\"\ - ,\r\n \"20.195.75.48/28\",\r\n \"20.195.75.96/27\",\r\n\ - \ \"20.200.192.16/28\",\r\n \"23.98.82.192/28\",\r\n \ - \ \"23.100.232.216/32\",\r\n \"40.66.61.146/32\",\r\n \ - \ \"40.67.59.80/28\",\r\n \"40.69.106.224/28\",\r\n \ - \ \"40.70.146.192/28\",\r\n \"40.70.154.161/32\",\r\n \"\ - 40.71.11.64/28\",\r\n \"40.74.24.96/28\",\r\n \"40.74.100.176/28\"\ - ,\r\n \"40.74.147.48/28\",\r\n \"40.75.35.48/28\",\r\n \ - \ \"40.78.194.224/28\",\r\n \"40.78.202.80/28\",\r\n \ - \ \"40.78.227.32/28\",\r\n \"40.78.234.128/28\",\r\n \ - \ \"40.78.242.176/28\",\r\n \"40.78.250.112/28\",\r\n \ - \ \"40.79.130.192/28\",\r\n \"40.79.138.128/28\",\r\n \"\ - 40.79.146.128/28\",\r\n \"40.79.154.64/28\",\r\n \"40.79.162.48/28\"\ - ,\r\n \"40.79.170.224/28\",\r\n \"40.79.178.224/28\",\r\n\ - \ \"40.79.186.160/28\",\r\n \"40.79.194.64/28\",\r\n \ - \ \"40.80.51.64/28\",\r\n \"40.80.57.176/28\",\r\n \ - \ \"40.80.169.160/28\",\r\n \"40.80.184.80/28\",\r\n \"\ - 40.80.188.96/28\",\r\n \"40.81.27.228/32\",\r\n \"40.82.187.230/32\"\ - ,\r\n \"40.82.248.80/28\",\r\n \"40.89.17.208/28\",\r\n\ - \ \"40.90.184.249/32\",\r\n \"40.91.77.76/32\",\r\n \ - \ \"40.112.242.176/28\",\r\n \"40.119.8.80/28\",\r\n \ - \ \"51.11.24.49/32\",\r\n \"51.12.29.0/28\",\r\n \"51.12.29.64/27\"\ - ,\r\n \"51.12.47.32/28\",\r\n \"51.12.99.80/28\",\r\n \ - \ \"51.12.198.224/28\",\r\n \"51.12.203.80/28\",\r\n \ - \ \"51.12.227.64/28\",\r\n \"51.12.235.64/28\",\r\n \ - \ \"51.104.8.64/27\",\r\n \"51.104.24.96/28\",\r\n \"51.105.67.16/28\"\ - ,\r\n \"51.105.75.128/28\",\r\n \"51.105.88.224/28\",\r\n\ - \ \"51.105.129.135/32\",\r\n \"51.107.59.48/28\",\r\n \ - \ \"51.107.147.32/28\",\r\n \"51.107.155.48/28\",\r\n \ - \ \"51.107.247.64/27\",\r\n \"51.116.49.176/28\",\r\n \ - \ \"51.116.59.48/28\",\r\n \"51.116.155.112/28\",\r\n \ - \ \"51.116.156.128/28\",\r\n \"51.116.250.224/28\",\r\n \ - \ \"51.120.99.64/28\",\r\n \"51.120.107.64/28\",\r\n \"\ - 51.120.211.64/28\",\r\n \"51.120.219.80/28\",\r\n \"51.120.227.80/28\"\ - ,\r\n \"51.120.234.224/28\",\r\n \"51.137.161.224/28\",\r\ - \n \"51.138.213.16/28\",\r\n \"51.140.146.208/28\",\r\n\ - \ \"51.140.210.208/28\",\r\n \"51.143.214.32/28\",\r\n \ - \ \"51.144.184.47/32\",\r\n \"52.138.90.144/28\",\r\n \ - \ \"52.138.226.160/28\",\r\n \"52.139.3.33/32\",\r\n \ - \ \"52.140.107.96/28\",\r\n \"52.141.25.58/32\",\r\n \ - \ \"52.141.26.97/32\",\r\n \"52.148.163.43/32\",\r\n \"\ - 52.150.136.80/28\",\r\n \"52.151.111.249/32\",\r\n \"52.155.90.254/32\"\ - ,\r\n \"52.155.115.7/32\",\r\n \"52.156.193.50/32\",\r\n\ - \ \"52.162.106.176/28\",\r\n \"52.167.106.160/28\",\r\n\ - \ \"52.177.164.219/32\",\r\n \"52.182.139.32/28\",\r\n \ - \ \"52.184.87.76/32\",\r\n \"52.185.70.56/32\",\r\n \ - \ \"52.228.80.80/28\",\r\n \"52.230.56.136/32\",\r\n \ - \ \"52.231.18.192/28\",\r\n \"52.231.146.208/28\",\r\n \ - \ \"52.236.186.192/28\",\r\n \"52.242.224.215/32\",\r\n \ - \ \"52.246.155.128/28\",\r\n \"52.249.59.91/32\",\r\n \"\ - 52.252.160.26/32\",\r\n \"52.253.131.79/32\",\r\n \"52.253.131.198/32\"\ - ,\r\n \"52.253.227.208/32\",\r\n \"52.255.214.109/32\",\r\ - \n \"52.255.217.127/32\",\r\n \"65.52.250.192/28\",\r\n\ - \ \"102.37.163.32/28\",\r\n \"102.133.27.32/28\",\r\n \ - \ \"102.133.58.224/28\",\r\n \"102.133.122.224/27\",\r\n \ - \ \"102.133.155.32/28\",\r\n \"102.133.251.64/28\",\r\n \ - \ \"104.208.16.160/28\",\r\n \"104.208.144.160/28\",\r\n\ - \ \"104.211.81.144/28\",\r\n \"104.214.19.32/28\",\r\n \ - \ \"191.233.8.48/28\",\r\n \"191.233.203.144/28\",\r\n \ - \ \"191.233.240.165/32\",\r\n \"191.233.242.167/32\",\r\n\ - \ \"191.234.147.64/28\",\r\n \"191.234.155.64/28\",\r\n\ - \ \"191.235.224.96/28\",\r\n \"191.238.73.80/28\",\r\n \ - \ \"2603:1000:4::300/122\",\r\n \"2603:1000:104:1::2c0/122\"\ - ,\r\n \"2603:1010:6:1::2c0/122\",\r\n \"2603:1010:101::300/122\"\ - ,\r\n \"2603:1010:304::300/122\",\r\n \"2603:1010:404::300/122\"\ - ,\r\n \"2603:1020:5:1::2c0/122\",\r\n \"2603:1020:206:1::2c0/122\"\ - ,\r\n \"2603:1020:305::300/122\",\r\n \"2603:1020:405::300/122\"\ - ,\r\n \"2603:1020:605::300/122\",\r\n \"2603:1020:705:1::2c0/122\"\ - ,\r\n \"2603:1020:805:1::2c0/122\",\r\n \"2603:1020:905::300/122\"\ - ,\r\n \"2603:1020:a04:1::2c0/122\",\r\n \"2603:1020:b04::300/122\"\ - ,\r\n \"2603:1020:c04:1::2c0/122\",\r\n \"2603:1020:d04::300/122\"\ - ,\r\n \"2603:1020:e04:1::2c0/122\",\r\n \"2603:1020:f04::300/122\"\ - ,\r\n \"2603:1020:1004::2c0/122\",\r\n \"2603:1020:1104::240/122\"\ - ,\r\n \"2603:1030:f:1::300/122\",\r\n \"2603:1030:10:1::2c0/122\"\ - ,\r\n \"2603:1030:104:1::2c0/122\",\r\n \"2603:1030:107::240/122\"\ - ,\r\n \"2603:1030:210:1::2c0/122\",\r\n \"2603:1030:40b:1::2c0/122\"\ - ,\r\n \"2603:1030:40c:1::2c0/122\",\r\n \"2603:1030:504:1::2c0/122\"\ - ,\r\n \"2603:1030:608::300/122\",\r\n \"2603:1030:807:1::2c0/122\"\ - ,\r\n \"2603:1030:a07::300/122\",\r\n \"2603:1030:b04::300/122\"\ - ,\r\n \"2603:1030:c06:1::2c0/122\",\r\n \"2603:1030:f05:1::2c0/122\"\ - ,\r\n \"2603:1030:1005::300/122\",\r\n \"2603:1040:5:1::2c0/122\"\ - ,\r\n \"2603:1040:207::300/122\",\r\n \"2603:1040:407:1::2c0/122\"\ - ,\r\n \"2603:1040:606::300/122\",\r\n \"2603:1040:806::300/122\"\ - ,\r\n \"2603:1040:904:1::2c0/122\",\r\n \"2603:1040:a06:1::2c0/122\"\ - ,\r\n \"2603:1040:b04::300/122\",\r\n \"2603:1040:c06::300/122\"\ - ,\r\n \"2603:1040:d04::2c0/122\",\r\n \"2603:1040:f05:1::2c0/122\"\ - ,\r\n \"2603:1040:1002::440/122\",\r\n \"2603:1040:1104::240/122\"\ - ,\r\n \"2603:1050:6:1::2c0/122\",\r\n \"2603:1050:403::2c0/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureMonitor\"\ - ,\r\n \"id\": \"AzureMonitor\",\r\n \"serviceTagChangeNumber\":\ - \ \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"8\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureMonitor\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.65.96.175/32\",\r\n\ - \ \"13.65.206.67/32\",\r\n \"13.65.211.125/32\",\r\n \ - \ \"13.66.36.144/32\",\r\n \"13.66.37.172/32\",\r\n \ - \ \"13.66.59.226/32\",\r\n \"13.66.60.151/32\",\r\n \"\ - 13.66.140.168/29\",\r\n \"13.66.141.152/29\",\r\n \"13.66.143.218/32\"\ - ,\r\n \"13.66.145.232/29\",\r\n \"13.66.147.144/28\",\r\n\ - \ \"13.66.160.124/32\",\r\n \"13.66.220.187/32\",\r\n \ - \ \"13.66.231.27/32\",\r\n \"13.67.9.192/28\",\r\n \ - \ \"13.67.10.64/29\",\r\n \"13.67.10.92/30\",\r\n \"13.67.15.0/32\"\ - ,\r\n \"13.67.15.112/29\",\r\n \"13.67.77.233/32\",\r\n\ - \ \"13.67.89.191/32\",\r\n \"13.68.31.237/32\",\r\n \ - \ \"13.68.101.211/32\",\r\n \"13.68.106.77/32\",\r\n \ - \ \"13.68.109.212/32\",\r\n \"13.68.111.247/32\",\r\n \ - \ \"13.69.51.175/32\",\r\n \"13.69.51.218/32\",\r\n \"13.69.65.16/28\"\ - ,\r\n \"13.69.66.136/29\",\r\n \"13.69.67.60/30\",\r\n \ - \ \"13.69.67.126/32\",\r\n \"13.69.106.88/29\",\r\n \ - \ \"13.69.106.208/28\",\r\n \"13.69.109.224/27\",\r\n \ - \ \"13.69.111.200/29\",\r\n \"13.69.229.64/29\",\r\n \"\ - 13.69.229.240/29\",\r\n \"13.69.233.0/30\",\r\n \"13.69.233.96/27\"\ - ,\r\n \"13.69.239.96/29\",\r\n \"13.70.72.232/29\",\r\n\ - \ \"13.70.73.104/29\",\r\n \"13.70.79.88/29\",\r\n \ - \ \"13.70.79.96/27\",\r\n \"13.70.124.27/32\",\r\n \"\ - 13.70.127.61/32\",\r\n \"13.71.172.128/28\",\r\n \"13.71.172.248/29\"\ - ,\r\n \"13.71.175.128/32\",\r\n \"13.71.175.216/29\",\r\n\ - \ \"13.71.177.32/27\",\r\n \"13.71.187.91/32\",\r\n \ - \ \"13.71.191.47/32\",\r\n \"13.71.195.192/27\",\r\n \ - \ \"13.71.196.56/29\",\r\n \"13.71.199.116/32\",\r\n \"\ - 13.73.26.213/32\",\r\n \"13.73.240.0/29\",\r\n \"13.73.242.32/29\"\ - ,\r\n \"13.73.244.192/31\",\r\n \"13.73.248.6/31\",\r\n\ - \ \"13.73.253.104/29\",\r\n \"13.73.253.112/29\",\r\n \ - \ \"13.73.253.120/32\",\r\n \"13.74.107.88/30\",\r\n \ - \ \"13.74.108.128/29\",\r\n \"13.74.111.152/29\",\r\n \ - \ \"13.75.38.0/28\",\r\n \"13.75.38.120/29\",\r\n \"13.75.39.76/30\"\ - ,\r\n \"13.75.117.221/32\",\r\n \"13.75.119.169/32\",\r\n\ - \ \"13.75.195.15/32\",\r\n \"13.76.85.243/32\",\r\n \ - \ \"13.76.87.86/32\",\r\n \"13.77.52.16/28\",\r\n \"\ - 13.77.53.48/29\",\r\n \"13.77.53.220/32\",\r\n \"13.77.150.166/32\"\ - ,\r\n \"13.77.155.39/32\",\r\n \"13.77.174.177/32\",\r\n\ - \ \"13.78.10.58/32\",\r\n \"13.78.13.189/32\",\r\n \ - \ \"13.78.108.160/29\",\r\n \"13.78.108.168/30\",\r\n \ - \ \"13.78.109.112/29\",\r\n \"13.78.111.192/32\",\r\n \ - \ \"13.78.135.15/32\",\r\n \"13.78.145.11/32\",\r\n \"13.78.151.158/32\"\ - ,\r\n \"13.78.172.58/32\",\r\n \"13.78.189.112/32\",\r\n\ - \ \"13.78.236.149/32\",\r\n \"13.78.237.51/32\",\r\n \ - \ \"13.80.134.255/32\",\r\n \"13.82.100.176/32\",\r\n \ - \ \"13.82.184.151/32\",\r\n \"13.84.134.59/32\",\r\n \ - \ \"13.84.148.7/32\",\r\n \"13.84.149.186/32\",\r\n \"\ - 13.84.173.179/32\",\r\n \"13.84.189.95/32\",\r\n \"13.84.225.10/32\"\ - ,\r\n \"13.85.70.142/32\",\r\n \"13.86.218.224/28\",\r\n\ - \ \"13.86.218.248/29\",\r\n \"13.86.223.128/26\",\r\n \ - \ \"13.87.56.248/29\",\r\n \"13.87.57.128/28\",\r\n \ - \ \"13.87.122.248/29\",\r\n \"13.87.123.128/28\",\r\n \ - \ \"13.88.177.28/32\",\r\n \"13.88.230.43/32\",\r\n \"\ - 13.88.247.208/32\",\r\n \"13.88.255.115/32\",\r\n \"13.89.42.127/32\"\ - ,\r\n \"13.89.171.112/30\",\r\n \"13.89.174.128/29\",\r\n\ - \ \"13.89.179.0/29\",\r\n \"13.90.93.206/32\",\r\n \ - \ \"13.90.248.141/32\",\r\n \"13.90.249.229/32\",\r\n \ - \ \"13.90.251.123/32\",\r\n \"13.91.42.27/32\",\r\n \"\ - 13.91.102.27/32\",\r\n \"13.92.40.198/32\",\r\n \"13.92.40.223/32\"\ - ,\r\n \"13.92.138.16/32\",\r\n \"13.92.179.52/32\",\r\n\ - \ \"13.92.211.249/32\",\r\n \"13.92.232.146/32\",\r\n \ - \ \"13.92.254.218/32\",\r\n \"13.92.255.146/32\",\r\n \ - \ \"13.93.215.80/32\",\r\n \"13.93.233.49/32\",\r\n \ - \ \"13.93.236.73/32\",\r\n \"13.94.39.13/32\",\r\n \"20.21.37.116/30\"\ - ,\r\n \"20.21.37.120/29\",\r\n \"20.21.39.224/29\",\r\n\ - \ \"20.21.46.128/29\",\r\n \"20.21.53.0/27\",\r\n \ - \ \"20.21.67.200/29\",\r\n \"20.21.75.200/29\",\r\n \"\ - 20.36.107.24/29\",\r\n \"20.36.107.160/28\",\r\n \"20.36.114.200/29\"\ - ,\r\n \"20.36.114.208/28\",\r\n \"20.36.125.224/27\",\r\n\ - \ \"20.37.71.0/27\",\r\n \"20.37.74.232/29\",\r\n \ - \ \"20.37.74.240/28\",\r\n \"20.37.152.68/31\",\r\n \"\ - 20.37.192.68/31\",\r\n \"20.37.195.26/31\",\r\n \"20.37.198.112/28\"\ - ,\r\n \"20.37.198.140/32\",\r\n \"20.37.198.232/29\",\r\n\ - \ \"20.37.198.240/28\",\r\n \"20.37.227.16/28\",\r\n \ - \ \"20.37.227.100/31\",\r\n \"20.37.227.104/29\",\r\n \ - \ \"20.37.227.112/28\",\r\n \"20.38.80.68/31\",\r\n \ - \ \"20.38.128.64/29\",\r\n \"20.38.132.64/27\",\r\n \"20.38.143.0/27\"\ - ,\r\n \"20.38.143.44/30\",\r\n \"20.38.146.152/29\",\r\n\ - \ \"20.38.147.144/29\",\r\n \"20.38.149.200/29\",\r\n \ - \ \"20.38.152.32/27\",\r\n \"20.39.14.0/28\",\r\n \ - \ \"20.39.15.16/28\",\r\n \"20.39.15.32/28\",\r\n \"20.40.124.0/32\"\ - ,\r\n \"20.40.137.91/32\",\r\n \"20.40.140.212/32\",\r\n\ - \ \"20.40.160.120/32\",\r\n \"20.40.200.172/31\",\r\n \ - \ \"20.40.200.174/32\",\r\n \"20.40.206.128/28\",\r\n \ - \ \"20.40.206.232/29\",\r\n \"20.40.207.128/28\",\r\n \ - \ \"20.40.228.0/26\",\r\n \"20.41.49.208/32\",\r\n \"\ - 20.41.64.68/31\",\r\n \"20.41.67.112/28\",\r\n \"20.41.69.4/30\"\ - ,\r\n \"20.41.69.16/28\",\r\n \"20.41.69.48/31\",\r\n \ - \ \"20.41.69.62/31\",\r\n \"20.41.208.32/27\",\r\n \ - \ \"20.42.0.68/31\",\r\n \"20.42.65.72/29\",\r\n \"20.42.65.128/25\"\ - ,\r\n \"20.42.73.16/29\",\r\n \"20.42.73.128/25\",\r\n \ - \ \"20.42.128.68/31\",\r\n \"20.42.230.112/28\",\r\n \ - \ \"20.42.230.208/28\",\r\n \"20.42.230.224/29\",\r\n \ - \ \"20.42.230.232/31\",\r\n \"20.43.40.68/31\",\r\n \"\ - 20.43.41.178/31\",\r\n \"20.43.44.128/28\",\r\n \"20.43.44.216/29\"\ - ,\r\n \"20.43.44.224/28\",\r\n \"20.43.64.68/31\",\r\n \ - \ \"20.43.65.154/31\",\r\n \"20.43.70.96/28\",\r\n \ - \ \"20.43.70.192/29\",\r\n \"20.43.70.200/30\",\r\n \"\ - 20.43.70.204/32\",\r\n \"20.43.70.224/29\",\r\n \"20.43.98.234/32\"\ - ,\r\n \"20.43.99.158/32\",\r\n \"20.43.120.0/29\",\r\n \ - \ \"20.43.120.240/29\",\r\n \"20.43.123.200/29\",\r\n \ - \ \"20.43.128.68/31\",\r\n \"20.43.152.45/32\",\r\n \ - \ \"20.44.3.48/28\",\r\n \"20.44.8.0/28\",\r\n \"20.44.11.192/26\"\ - ,\r\n \"20.44.12.192/26\",\r\n \"20.44.13.232/29\",\r\n\ - \ \"20.44.16.0/29\",\r\n \"20.44.17.0/29\",\r\n \ - \ \"20.44.26.152/29\",\r\n \"20.44.26.248/29\",\r\n \"\ - 20.44.29.120/29\",\r\n \"20.44.73.196/32\",\r\n \"20.44.192.217/32\"\ - ,\r\n \"20.45.122.152/29\",\r\n \"20.45.123.80/29\",\r\n\ - \ \"20.45.123.116/30\",\r\n \"20.45.125.224/28\",\r\n \ - \ \"20.45.127.64/29\",\r\n \"20.45.208.32/29\",\r\n \ - \ \"20.46.10.224/27\",\r\n \"20.46.12.196/30\",\r\n \"\ - 20.46.13.216/29\",\r\n \"20.46.15.48/29\",\r\n \"20.47.217.0/29\"\ - ,\r\n \"20.48.193.224/27\",\r\n \"20.49.83.32/28\",\r\n\ - \ \"20.49.84.32/27\",\r\n \"20.49.91.32/28\",\r\n \ - \ \"20.49.93.192/26\",\r\n \"20.49.95.48/29\",\r\n \"\ - 20.49.99.44/31\",\r\n \"20.49.99.64/28\",\r\n \"20.49.102.24/29\"\ - ,\r\n \"20.49.102.32/28\",\r\n \"20.49.109.46/31\",\r\n\ - \ \"20.49.109.80/28\",\r\n \"20.49.111.16/28\",\r\n \ - \ \"20.49.111.32/28\",\r\n \"20.49.114.20/30\",\r\n \ - \ \"20.49.114.32/28\",\r\n \"20.49.114.48/31\",\r\n \"\ - 20.49.120.64/28\",\r\n \"20.50.65.80/28\",\r\n \"20.50.68.112/29\"\ - ,\r\n \"20.50.68.120/30\",\r\n \"20.50.68.124/31\",\r\n\ - \ \"20.50.68.128/29\",\r\n \"20.50.80.200/29\",\r\n \ - \ \"20.51.9.0/26\",\r\n \"20.51.17.64/27\",\r\n \"\ - 20.52.64.24/29\",\r\n \"20.52.64.32/27\",\r\n \"20.52.72.64/27\"\ - ,\r\n \"20.53.0.128/27\",\r\n \"20.53.46.64/27\",\r\n \ - \ \"20.53.48.64/27\",\r\n \"20.58.66.96/27\",\r\n \ - \ \"20.61.99.64/27\",\r\n \"20.62.132.0/25\",\r\n \"20.65.132.0/26\"\ - ,\r\n \"20.66.2.192/26\",\r\n \"20.72.20.48/28\",\r\n \ - \ \"20.72.21.0/30\",\r\n \"20.72.21.32/27\",\r\n \ - \ \"20.72.28.192/27\",\r\n \"20.83.192.192/29\",\r\n \"\ - 20.89.1.32/29\",\r\n \"20.98.192.0/27\",\r\n \"20.99.11.48/28\"\ - ,\r\n \"20.99.11.96/30\",\r\n \"20.150.167.184/29\",\r\n\ - \ \"20.150.171.208/29\",\r\n \"20.150.173.0/28\",\r\n \ - \ \"20.150.178.152/29\",\r\n \"20.150.181.96/28\",\r\n \ - \ \"20.150.181.168/29\",\r\n \"20.150.182.32/27\",\r\n \ - \ \"20.150.186.152/29\",\r\n \"20.150.189.40/29\",\r\n \ - \ \"20.150.225.8/29\",\r\n \"20.150.241.64/29\",\r\n \ - \ \"20.150.241.72/30\",\r\n \"20.150.241.96/27\",\r\n \"\ - 20.187.197.192/27\",\r\n \"20.188.36.28/32\",\r\n \"20.189.81.24/32\"\ - ,\r\n \"20.189.81.26/32\",\r\n \"20.189.109.144/28\",\r\n\ - \ \"20.189.111.0/28\",\r\n \"20.189.111.16/29\",\r\n \ - \ \"20.189.111.24/31\",\r\n \"20.189.172.0/25\",\r\n \ - \ \"20.189.225.128/27\",\r\n \"20.190.60.32/32\",\r\n \ - \ \"20.190.60.38/32\",\r\n \"20.191.165.64/27\",\r\n \"\ - 20.192.32.192/27\",\r\n \"20.192.43.96/27\",\r\n \"20.192.45.100/31\"\ - ,\r\n \"20.192.48.0/27\",\r\n \"20.192.50.192/28\",\r\n\ - \ \"20.192.98.152/29\",\r\n \"20.192.101.32/27\",\r\n \ - \ \"20.192.102.72/29\",\r\n \"20.192.167.160/27\",\r\n \ - \ \"20.192.231.244/30\",\r\n \"20.192.235.144/28\",\r\n \ - \ \"20.193.96.32/27\",\r\n \"20.193.160.40/29\",\r\n \ - \ \"20.193.194.24/29\",\r\n \"20.193.194.32/29\",\r\n \ - \ \"20.193.194.40/30\",\r\n \"20.193.203.112/28\",\r\n \ - \ \"20.193.204.64/27\",\r\n \"20.194.67.32/28\",\r\n \"\ - 20.194.67.216/29\",\r\n \"20.194.67.224/27\",\r\n \"20.194.72.224/27\"\ - ,\r\n \"20.195.74.188/31\",\r\n \"20.195.82.160/27\",\r\n\ - \ \"20.205.77.184/29\",\r\n \"20.205.83.232/29\",\r\n \ - \ \"20.205.192.72/29\",\r\n \"20.208.19.200/29\",\r\n \ - \ \"23.96.28.38/32\",\r\n \"23.96.245.125/32\",\r\n \ - \ \"23.96.252.161/32\",\r\n \"23.96.252.216/32\",\r\n \"\ - 23.97.65.103/32\",\r\n \"23.98.82.120/29\",\r\n \"23.98.82.208/28\"\ - ,\r\n \"23.98.104.160/28\",\r\n \"23.98.106.136/29\",\r\n\ - \ \"23.98.106.144/30\",\r\n \"23.98.106.148/31\",\r\n \ - \ \"23.98.106.150/32\",\r\n \"23.98.106.152/29\",\r\n \ - \ \"23.98.113.96/29\",\r\n \"23.99.130.172/32\",\r\n \ - \ \"23.100.90.7/32\",\r\n \"23.100.94.221/32\",\r\n \"\ - 23.100.122.113/32\",\r\n \"23.100.228.32/32\",\r\n \"23.101.0.142/32\"\ - ,\r\n \"23.101.9.4/32\",\r\n \"23.101.13.65/32\",\r\n \ - \ \"23.101.69.223/32\",\r\n \"23.101.225.155/32\",\r\n \ - \ \"23.101.232.120/32\",\r\n \"23.101.239.238/32\",\r\n \ - \ \"23.102.44.211/32\",\r\n \"23.102.45.216/32\",\r\n \ - \ \"23.102.66.132/32\",\r\n \"23.102.77.48/32\",\r\n \ - \ \"23.102.181.197/32\",\r\n \"40.64.132.128/28\",\r\n \ - \ \"40.64.132.240/28\",\r\n \"40.64.134.128/29\",\r\n \"\ - 40.64.134.136/31\",\r\n \"40.64.134.138/32\",\r\n \"40.67.52.224/27\"\ - ,\r\n \"40.67.59.192/28\",\r\n \"40.67.122.0/26\",\r\n \ - \ \"40.67.122.96/29\",\r\n \"40.68.61.229/32\",\r\n \ - \ \"40.68.154.39/32\",\r\n \"40.69.81.159/32\",\r\n \ - \ \"40.69.107.16/28\",\r\n \"40.69.108.48/29\",\r\n \"40.69.111.128/27\"\ - ,\r\n \"40.69.194.158/32\",\r\n \"40.70.23.205/32\",\r\n\ - \ \"40.70.148.0/30\",\r\n \"40.70.148.8/29\",\r\n \ - \ \"40.71.12.224/28\",\r\n \"40.71.12.240/30\",\r\n \"\ - 40.71.12.248/29\",\r\n \"40.71.13.168/29\",\r\n \"40.71.14.112/30\"\ - ,\r\n \"40.71.183.225/32\",\r\n \"40.74.24.68/31\",\r\n\ - \ \"40.74.36.208/32\",\r\n \"40.74.59.40/32\",\r\n \ - \ \"40.74.101.32/28\",\r\n \"40.74.101.200/29\",\r\n \ - \ \"40.74.146.84/30\",\r\n \"40.74.147.160/29\",\r\n \"\ - 40.74.150.32/27\",\r\n \"40.74.150.72/29\",\r\n \"40.74.249.98/32\"\ - ,\r\n \"40.75.34.40/29\",\r\n \"40.75.35.64/29\",\r\n \ - \ \"40.76.29.55/32\",\r\n \"40.76.53.225/32\",\r\n \ - \ \"40.77.17.183/32\",\r\n \"40.77.22.234/32\",\r\n \"\ - 40.77.24.27/32\",\r\n \"40.77.101.95/32\",\r\n \"40.77.109.134/32\"\ - ,\r\n \"40.78.23.86/32\",\r\n \"40.78.57.61/32\",\r\n \ - \ \"40.78.107.177/32\",\r\n \"40.78.195.16/28\",\r\n \ - \ \"40.78.196.48/29\",\r\n \"40.78.202.144/28\",\r\n \ - \ \"40.78.203.240/29\",\r\n \"40.78.226.216/29\",\r\n \"\ - 40.78.229.32/29\",\r\n \"40.78.234.56/29\",\r\n \"40.78.234.144/28\"\ - ,\r\n \"40.78.242.168/30\",\r\n \"40.78.243.16/29\",\r\n\ - \ \"40.78.247.64/26\",\r\n \"40.78.250.104/30\",\r\n \ - \ \"40.78.250.208/29\",\r\n \"40.78.253.72/29\",\r\n \ - \ \"40.78.253.192/26\",\r\n \"40.79.130.240/29\",\r\n \ - \ \"40.79.132.32/29\",\r\n \"40.79.138.40/30\",\r\n \"\ - 40.79.138.144/29\",\r\n \"40.79.141.144/29\",\r\n \"40.79.146.40/30\"\ - ,\r\n \"40.79.146.144/29\",\r\n \"40.79.150.96/29\",\r\n\ - \ \"40.79.154.80/29\",\r\n \"40.79.156.32/29\",\r\n \ - \ \"40.79.162.40/29\",\r\n \"40.79.163.0/29\",\r\n \ - \ \"40.79.165.64/28\",\r\n \"40.79.165.88/29\",\r\n \"40.79.170.24/29\"\ - ,\r\n \"40.79.170.240/29\",\r\n \"40.79.173.8/29\",\r\n\ - \ \"40.79.179.8/29\",\r\n \"40.79.179.16/28\",\r\n \ - \ \"40.79.187.8/29\",\r\n \"40.79.190.160/27\",\r\n \ - \ \"40.79.191.200/29\",\r\n \"40.79.194.104/29\",\r\n \"\ - 40.79.194.112/29\",\r\n \"40.79.197.120/29\",\r\n \"40.80.50.152/29\"\ - ,\r\n \"40.80.51.80/29\",\r\n \"40.80.54.32/29\",\r\n \ - \ \"40.80.180.160/27\",\r\n \"40.80.191.224/28\",\r\n \ - \ \"40.81.58.225/32\",\r\n \"40.84.133.5/32\",\r\n \ - \ \"40.84.150.47/32\",\r\n \"40.84.189.107/32\",\r\n \"\ - 40.84.192.116/32\",\r\n \"40.85.180.90/32\",\r\n \"40.85.201.168/32\"\ - ,\r\n \"40.85.218.175/32\",\r\n \"40.85.248.43/32\",\r\n\ - \ \"40.86.89.165/32\",\r\n \"40.86.201.128/32\",\r\n \ - \ \"40.87.67.118/32\",\r\n \"40.87.138.220/32\",\r\n \ - \ \"40.87.140.215/32\",\r\n \"40.89.121.176/29\",\r\n \ - \ \"40.89.153.171/32\",\r\n \"40.89.189.61/32\",\r\n \"\ - 40.112.49.101/32\",\r\n \"40.112.74.241/32\",\r\n \"40.113.176.128/28\"\ - ,\r\n \"40.113.178.16/28\",\r\n \"40.113.178.32/28\",\r\n\ - \ \"40.113.178.48/32\",\r\n \"40.114.241.141/32\",\r\n \ - \ \"40.115.54.120/32\",\r\n \"40.115.103.168/32\",\r\n \ - \ \"40.115.104.31/32\",\r\n \"40.117.80.207/32\",\r\n \ - \ \"40.117.95.162/32\",\r\n \"40.117.147.74/32\",\r\n \ - \ \"40.117.190.239/32\",\r\n \"40.117.197.224/32\",\r\n \ - \ \"40.118.129.58/32\",\r\n \"40.119.4.128/32\",\r\n \ - \ \"40.119.8.72/31\",\r\n \"40.119.11.160/28\",\r\n \"40.119.11.180/30\"\ - ,\r\n \"40.120.8.192/27\",\r\n \"40.120.64.200/29\",\r\n\ - \ \"40.120.75.32/28\",\r\n \"40.120.77.160/29\",\r\n \ - \ \"40.121.57.2/32\",\r\n \"40.121.61.208/32\",\r\n \ - \ \"40.121.135.131/32\",\r\n \"40.121.163.228/32\",\r\n \ - \ \"40.121.165.150/32\",\r\n \"40.121.210.163/32\",\r\n \ - \ \"40.124.64.144/29\",\r\n \"40.124.64.192/26\",\r\n \ - \ \"40.126.246.183/32\",\r\n \"40.127.75.125/32\",\r\n \"\ - 40.127.84.197/32\",\r\n \"40.127.144.141/32\",\r\n \"51.11.97.96/27\"\ - ,\r\n \"51.11.192.40/29\",\r\n \"51.12.17.20/30\",\r\n \ - \ \"51.12.17.56/29\",\r\n \"51.12.17.128/29\",\r\n \ - \ \"51.12.25.56/29\",\r\n \"51.12.25.192/29\",\r\n \"\ - 51.12.25.200/30\",\r\n \"51.12.46.0/27\",\r\n \"51.12.99.72/29\"\ - ,\r\n \"51.12.102.192/27\",\r\n \"51.12.102.224/29\",\r\n\ - \ \"51.12.168.64/29\",\r\n \"51.12.195.224/27\",\r\n \ - \ \"51.12.203.208/28\",\r\n \"51.12.205.96/27\",\r\n \ - \ \"51.12.226.152/29\",\r\n \"51.12.229.224/29\",\r\n \ - \ \"51.12.234.152/29\",\r\n \"51.12.237.32/27\",\r\n \"\ - 51.12.237.192/29\",\r\n \"51.13.1.8/29\",\r\n \"51.13.128.32/27\"\ - ,\r\n \"51.13.136.192/27\",\r\n \"51.103.203.200/29\",\r\ - \n \"51.104.8.104/29\",\r\n \"51.104.15.255/32\",\r\n \ - \ \"51.104.24.68/31\",\r\n \"51.104.25.142/31\",\r\n \ - \ \"51.104.29.192/28\",\r\n \"51.104.30.160/29\",\r\n \ - \ \"51.104.30.168/32\",\r\n \"51.104.30.176/28\",\r\n \ - \ \"51.104.252.13/32\",\r\n \"51.104.255.249/32\",\r\n \"\ - 51.105.66.152/29\",\r\n \"51.105.67.160/29\",\r\n \"51.105.70.128/27\"\ - ,\r\n \"51.105.71.168/29\",\r\n \"51.105.74.152/29\",\r\n\ - \ \"51.105.75.144/29\",\r\n \"51.105.248.23/32\",\r\n \ - \ \"51.107.48.68/31\",\r\n \"51.107.48.126/31\",\r\n \ - \ \"51.107.51.16/28\",\r\n \"51.107.51.120/29\",\r\n \ - \ \"51.107.52.192/30\",\r\n \"51.107.52.200/29\",\r\n \"\ - 51.107.59.176/28\",\r\n \"51.107.75.144/32\",\r\n \"51.107.75.207/32\"\ - ,\r\n \"51.107.128.56/29\",\r\n \"51.107.128.96/27\",\r\n\ - \ \"51.107.147.16/28\",\r\n \"51.107.147.116/30\",\r\n \ - \ \"51.107.148.0/28\",\r\n \"51.107.148.16/31\",\r\n \ - \ \"51.107.155.176/28\",\r\n \"51.107.156.48/29\",\r\n \ - \ \"51.107.192.160/27\",\r\n \"51.107.242.0/27\",\r\n \ - \ \"51.107.243.172/31\",\r\n \"51.107.250.0/27\",\r\n \ - \ \"51.116.54.32/27\",\r\n \"51.116.59.176/28\",\r\n \"\ - 51.116.149.0/27\",\r\n \"51.116.155.240/28\",\r\n \"51.116.242.152/29\"\ - ,\r\n \"51.116.245.96/28\",\r\n \"51.116.246.96/29\",\r\n\ - \ \"51.116.250.152/29\",\r\n \"51.116.253.32/28\",\r\n \ - \ \"51.116.253.136/29\",\r\n \"51.120.40.68/31\",\r\n \ - \ \"51.120.98.0/29\",\r\n \"51.120.98.248/29\",\r\n \ - \ \"51.120.106.152/29\",\r\n \"51.120.110.200/29\",\r\n \ - \ \"51.120.210.152/29\",\r\n \"51.120.213.64/27\",\r\n \ - \ \"51.120.214.136/29\",\r\n \"51.120.219.208/28\",\r\n \ - \ \"51.120.232.34/31\",\r\n \"51.120.232.160/27\",\r\n \ - \ \"51.120.234.140/31\",\r\n \"51.120.235.240/28\",\r\n \ - \ \"51.132.193.96/29\",\r\n \"51.137.164.92/31\",\r\n \"\ - 51.137.164.112/28\",\r\n \"51.137.164.200/29\",\r\n \"51.137.164.208/28\"\ - ,\r\n \"51.138.160.80/29\",\r\n \"51.140.6.23/32\",\r\n\ - \ \"51.140.54.208/32\",\r\n \"51.140.60.235/32\",\r\n \ - \ \"51.140.69.144/32\",\r\n \"51.140.148.48/28\",\r\n \ - \ \"51.140.151.160/29\",\r\n \"51.140.152.61/32\",\r\n \ - \ \"51.140.152.186/32\",\r\n \"51.140.163.207/32\",\r\n \ - \ \"51.140.180.52/32\",\r\n \"51.140.181.40/32\",\r\n \ - \ \"51.140.211.160/28\",\r\n \"51.140.212.64/29\",\r\n \ - \ \"51.141.113.128/32\",\r\n \"51.143.88.183/32\",\r\n \ - \ \"51.143.165.22/32\",\r\n \"51.143.209.96/27\",\r\n \"\ - 51.144.41.38/32\",\r\n \"51.144.81.252/32\",\r\n \"51.145.44.242/32\"\ - ,\r\n \"52.136.53.96/27\",\r\n \"52.138.31.112/32\",\r\n\ - \ \"52.138.31.127/32\",\r\n \"52.138.90.48/30\",\r\n \ - \ \"52.138.90.56/29\",\r\n \"52.138.222.110/32\",\r\n \ - \ \"52.138.226.88/29\",\r\n \"52.138.227.128/29\",\r\n \ - \ \"52.139.8.32/32\",\r\n \"52.139.106.160/27\",\r\n \ - \ \"52.140.104.68/31\",\r\n \"52.140.108.96/28\",\r\n \"\ - 52.140.108.216/29\",\r\n \"52.140.108.224/28\",\r\n \"52.140.108.240/31\"\ - ,\r\n \"52.141.22.149/32\",\r\n \"52.141.22.239/32\",\r\n\ - \ \"52.146.133.32/27\",\r\n \"52.147.97.64/27\",\r\n \ - \ \"52.147.112.96/27\",\r\n \"52.150.36.187/32\",\r\n \ - \ \"52.150.152.48/28\",\r\n \"52.150.152.90/31\",\r\n \ - \ \"52.150.154.24/29\",\r\n \"52.150.154.32/28\",\r\n \ - \ \"52.151.11.176/32\",\r\n \"52.155.118.97/32\",\r\n \"\ - 52.155.162.238/32\",\r\n \"52.156.40.142/32\",\r\n \"52.156.168.82/32\"\ - ,\r\n \"52.161.8.76/32\",\r\n \"52.161.11.71/32\",\r\n \ - \ \"52.161.12.245/32\",\r\n \"52.162.87.50/32\",\r\n \ - \ \"52.162.110.64/28\",\r\n \"52.162.110.168/29\",\r\n \ - \ \"52.162.214.75/32\",\r\n \"52.163.94.131/32\",\r\n \ - \ \"52.163.122.20/32\",\r\n \"52.164.120.183/32\",\r\n \ - \ \"52.164.125.22/32\",\r\n \"52.164.225.5/32\",\r\n \"\ - 52.165.27.187/32\",\r\n \"52.165.34.117/32\",\r\n \"52.165.38.20/32\"\ - ,\r\n \"52.165.150.242/32\",\r\n \"52.167.106.88/29\",\r\ - \n \"52.167.107.64/29\",\r\n \"52.167.109.72/29\",\r\n \ - \ \"52.167.145.160/29\",\r\n \"52.167.221.184/32\",\r\n \ - \ \"52.168.112.64/32\",\r\n \"52.168.116.72/29\",\r\n \ - \ \"52.168.136.177/32\",\r\n \"52.169.4.236/32\",\r\n \ - \ \"52.169.15.254/32\",\r\n \"52.169.30.110/32\",\r\n \ - \ \"52.169.64.244/32\",\r\n \"52.171.56.178/32\",\r\n \ - \ \"52.171.138.167/32\",\r\n \"52.172.113.64/27\",\r\n \"\ - 52.172.209.125/32\",\r\n \"52.173.25.25/32\",\r\n \"52.173.33.254/32\"\ - ,\r\n \"52.173.90.199/32\",\r\n \"52.173.185.24/32\",\r\n\ - \ \"52.173.196.209/32\",\r\n \"52.173.196.230/32\",\r\n\ - \ \"52.173.249.138/32\",\r\n \"52.175.198.74/32\",\r\n \ - \ \"52.175.231.105/32\",\r\n \"52.175.235.148/32\",\r\n \ - \ \"52.176.42.206/32\",\r\n \"52.176.46.30/32\",\r\n \ - \ \"52.176.49.206/32\",\r\n \"52.176.55.135/32\",\r\n \ - \ \"52.176.92.196/32\",\r\n \"52.177.223.60/32\",\r\n \ - \ \"52.178.17.224/29\",\r\n \"52.178.26.73/32\",\r\n \"\ - 52.178.37.209/32\",\r\n \"52.179.192.178/32\",\r\n \"52.180.160.132/32\"\ - ,\r\n \"52.180.164.91/32\",\r\n \"52.180.178.187/32\",\r\ - \n \"52.180.182.209/32\",\r\n \"52.182.138.216/29\",\r\n\ - \ \"52.182.139.48/29\",\r\n \"52.182.143.200/29\",\r\n \ - \ \"52.183.41.109/32\",\r\n \"52.183.66.112/32\",\r\n \ - \ \"52.183.73.112/32\",\r\n \"52.183.95.86/32\",\r\n \ - \ \"52.183.127.155/32\",\r\n \"52.184.158.205/32\",\r\n \ - \ \"52.185.132.101/32\",\r\n \"52.185.132.170/32\",\r\n \ - \ \"52.185.215.171/32\",\r\n \"52.186.121.41/32\",\r\n \ - \ \"52.186.126.31/32\",\r\n \"52.188.179.229/32\",\r\n \ - \ \"52.191.170.253/32\",\r\n \"52.191.197.52/32\",\r\n \ - \ \"52.224.125.230/32\",\r\n \"52.224.162.220/32\",\r\n \ - \ \"52.224.235.3/32\",\r\n \"52.226.151.250/32\",\r\n \"\ - 52.228.80.68/31\",\r\n \"52.228.81.162/31\",\r\n \"52.228.85.192/28\"\ - ,\r\n \"52.228.86.152/29\",\r\n \"52.228.86.160/28\",\r\n\ - \ \"52.228.86.176/32\",\r\n \"52.229.25.130/32\",\r\n \ - \ \"52.229.37.75/32\",\r\n \"52.229.218.221/32\",\r\n \ - \ \"52.229.225.6/32\",\r\n \"52.230.224.237/32\",\r\n \ - \ \"52.231.18.240/28\",\r\n \"52.231.23.120/29\",\r\n \ - \ \"52.231.28.204/32\",\r\n \"52.231.33.16/32\",\r\n \"\ - 52.231.64.72/32\",\r\n \"52.231.67.208/32\",\r\n \"52.231.70.0/32\"\ - ,\r\n \"52.231.108.46/32\",\r\n \"52.231.111.52/32\",\r\n\ - \ \"52.231.147.160/28\",\r\n \"52.231.148.80/29\",\r\n \ - \ \"52.232.35.33/32\",\r\n \"52.232.65.133/32\",\r\n \ - \ \"52.232.106.242/32\",\r\n \"52.236.186.88/29\",\r\n \ - \ \"52.236.186.208/28\",\r\n \"52.236.189.88/29\",\r\n \ - \ \"52.237.34.41/32\",\r\n \"52.237.157.70/32\",\r\n \ - \ \"52.240.244.144/29\",\r\n \"52.242.230.209/32\",\r\n \ - \ \"52.246.154.152/29\",\r\n \"52.246.155.144/29\",\r\n \ - \ \"52.246.157.16/28\",\r\n \"52.246.158.160/29\",\r\n \"\ - 52.247.202.90/32\",\r\n \"52.250.228.8/29\",\r\n \"52.250.228.16/28\"\ - ,\r\n \"52.250.228.32/31\",\r\n \"65.52.2.145/32\",\r\n\ - \ \"65.52.5.76/32\",\r\n \"65.52.122.208/32\",\r\n \ - \ \"65.52.250.232/29\",\r\n \"65.52.250.240/28\",\r\n \ - \ \"102.37.64.128/27\",\r\n \"102.37.72.240/29\",\r\n \ - \ \"102.37.80.64/27\",\r\n \"102.133.27.48/28\",\r\n \"\ - 102.133.28.64/29\",\r\n \"102.133.122.152/29\",\r\n \"102.133.123.240/29\"\ - ,\r\n \"102.133.126.64/27\",\r\n \"102.133.126.152/29\"\ - ,\r\n \"102.133.155.48/28\",\r\n \"102.133.161.73/32\",\r\ - \n \"102.133.162.233/32\",\r\n \"102.133.216.68/31\",\r\n\ - \ \"102.133.216.106/31\",\r\n \"102.133.218.144/28\",\r\n\ - \ \"102.133.218.244/30\",\r\n \"102.133.219.128/28\",\r\n\ - \ \"102.133.221.160/27\",\r\n \"102.133.250.152/29\",\r\n\ - \ \"102.133.251.80/29\",\r\n \"102.133.254.224/29\",\r\n\ - \ \"104.40.222.36/32\",\r\n \"104.41.61.169/32\",\r\n \ - \ \"104.41.152.101/32\",\r\n \"104.41.157.59/32\",\r\n \ - \ \"104.41.224.134/32\",\r\n \"104.42.40.28/32\",\r\n \ - \ \"104.44.140.84/32\",\r\n \"104.45.136.42/32\",\r\n \ - \ \"104.45.230.69/32\",\r\n \"104.45.232.72/32\",\r\n \ - \ \"104.46.123.164/32\",\r\n \"104.46.162.64/27\",\r\n \"\ - 104.46.179.128/27\",\r\n \"104.208.33.155/32\",\r\n \"104.208.34.98/32\"\ - ,\r\n \"104.208.35.169/32\",\r\n \"104.208.144.88/29\",\r\ - \n \"104.209.156.106/32\",\r\n \"104.209.161.217/32\",\r\ - \n \"104.210.9.42/32\",\r\n \"104.211.79.84/32\",\r\n \ - \ \"104.211.90.234/32\",\r\n \"104.211.91.254/32\",\r\n \ - \ \"104.211.92.54/32\",\r\n \"104.211.92.218/32\",\r\n \ - \ \"104.211.95.59/32\",\r\n \"104.211.96.228/32\",\r\n \ - \ \"104.211.103.96/32\",\r\n \"104.211.147.128/28\",\r\n \ - \ \"104.211.216.161/32\",\r\n \"104.214.70.219/32\",\r\n \ - \ \"104.214.104.109/32\",\r\n \"104.214.164.128/27\",\r\n\ - \ \"104.214.166.96/29\",\r\n \"104.215.81.124/32\",\r\n\ - \ \"104.215.96.105/32\",\r\n \"104.215.100.22/32\",\r\n\ - \ \"104.215.103.78/32\",\r\n \"104.215.115.118/32\",\r\n\ - \ \"111.221.88.173/32\",\r\n \"137.116.82.175/32\",\r\n\ - \ \"137.116.146.215/32\",\r\n \"137.116.151.139/32\",\r\n\ - \ \"137.116.226.81/32\",\r\n \"137.117.144.33/32\",\r\n\ - \ \"138.91.9.98/32\",\r\n \"138.91.32.98/32\",\r\n \ - \ \"138.91.37.93/32\",\r\n \"157.55.177.6/32\",\r\n \ - \ \"168.61.142.0/27\",\r\n \"168.61.179.178/32\",\r\n \"\ - 168.62.169.17/32\",\r\n \"168.63.174.169/32\",\r\n \"168.63.242.221/32\"\ - ,\r\n \"191.232.33.83/32\",\r\n \"191.232.161.75/32\",\r\ - \n \"191.232.213.23/32\",\r\n \"191.232.213.239/32\",\r\n\ - \ \"191.232.214.6/32\",\r\n \"191.232.239.181/32\",\r\n\ - \ \"191.233.15.128/27\",\r\n \"191.233.51.128/28\",\r\n\ - \ \"191.233.203.232/29\",\r\n \"191.233.204.248/29\",\r\n\ - \ \"191.233.207.216/29\",\r\n \"191.234.136.60/31\",\r\n\ - \ \"191.234.136.80/28\",\r\n \"191.234.137.40/29\",\r\n\ - \ \"191.234.137.48/28\",\r\n \"191.234.146.152/29\",\r\n\ - \ \"191.234.149.40/29\",\r\n \"191.234.149.144/28\",\r\n\ - \ \"191.234.154.152/29\",\r\n \"191.234.157.48/28\",\r\n\ - \ \"191.234.157.160/29\",\r\n \"191.235.224.68/31\",\r\n\ - \ \"191.237.224.192/27\",\r\n \"191.239.251.90/32\",\r\n\ - \ \"207.46.224.101/32\",\r\n \"207.46.236.191/32\",\r\n\ - \ \"2603:1000:4::780/121\",\r\n \"2603:1000:4:1::280/123\"\ - ,\r\n \"2603:1000:4:1::300/121\",\r\n \"2603:1000:4:402::500/121\"\ - ,\r\n \"2603:1000:104::4c0/122\",\r\n \"2603:1000:104::600/122\"\ - ,\r\n \"2603:1000:104:1::280/122\",\r\n \"2603:1000:104:2::/123\"\ - ,\r\n \"2603:1000:104:2::80/121\",\r\n \"2603:1000:104:402::500/121\"\ - ,\r\n \"2603:1010:2:3::c9/128\",\r\n \"2603:1010:6::60/123\"\ - ,\r\n \"2603:1010:6::1c0/122\",\r\n \"2603:1010:6::300/123\"\ - ,\r\n \"2603:1010:6::500/121\",\r\n \"2603:1010:6:1::280/122\"\ - ,\r\n \"2603:1010:6:402::500/121\",\r\n \"2603:1010:101::780/121\"\ - ,\r\n \"2603:1010:101:1::280/123\",\r\n \"2603:1010:101:1::300/121\"\ - ,\r\n \"2603:1010:101:402::500/121\",\r\n \"2603:1010:300::88/128\"\ - ,\r\n \"2603:1010:304::780/121\",\r\n \"2603:1010:304:1::280/123\"\ - ,\r\n \"2603:1010:304:1::300/121\",\r\n \"2603:1010:304:402::500/121\"\ - ,\r\n \"2603:1010:404::780/121\",\r\n \"2603:1010:404:1::280/123\"\ - ,\r\n \"2603:1010:404:1::300/121\",\r\n \"2603:1010:404:402::500/121\"\ - ,\r\n \"2603:1020:5::60/123\",\r\n \"2603:1020:5::1c0/122\"\ - ,\r\n \"2603:1020:5::300/123\",\r\n \"2603:1020:5::360/123\"\ - ,\r\n \"2603:1020:5::500/121\",\r\n \"2603:1020:5:1::280/122\"\ - ,\r\n \"2603:1020:5:402::500/121\",\r\n \"2603:1020:200::682f:a517/128\"\ - ,\r\n \"2603:1020:200::682f:a52a/128\",\r\n \"2603:1020:200::682f:a6f1/128\"\ - ,\r\n \"2603:1020:206::60/123\",\r\n \"2603:1020:206::1c0/122\"\ - ,\r\n \"2603:1020:206::300/123\",\r\n \"2603:1020:206::360/123\"\ - ,\r\n \"2603:1020:206::500/121\",\r\n \"2603:1020:206:1::280/122\"\ - ,\r\n \"2603:1020:206:402::500/121\",\r\n \"2603:1020:305::780/121\"\ - ,\r\n \"2603:1020:405::780/121\",\r\n \"2603:1020:605::780/121\"\ - ,\r\n \"2603:1020:605:1::280/123\",\r\n \"2603:1020:605:1::300/121\"\ - ,\r\n \"2603:1020:605:402::500/121\",\r\n \"2603:1020:705::60/123\"\ - ,\r\n \"2603:1020:705::1c0/122\",\r\n \"2603:1020:705::300/123\"\ - ,\r\n \"2603:1020:705::360/123\",\r\n \"2603:1020:705::500/121\"\ - ,\r\n \"2603:1020:705:1::280/122\",\r\n \"2603:1020:705:402::500/121\"\ - ,\r\n \"2603:1020:805::60/123\",\r\n \"2603:1020:805::1c0/122\"\ - ,\r\n \"2603:1020:805::300/123\",\r\n \"2603:1020:805::360/123\"\ - ,\r\n \"2603:1020:805::500/121\",\r\n \"2603:1020:805:1::280/122\"\ - ,\r\n \"2603:1020:805:402::500/121\",\r\n \"2603:1020:905::780/121\"\ - ,\r\n \"2603:1020:905:1::280/123\",\r\n \"2603:1020:905:1::300/121\"\ - ,\r\n \"2603:1020:905:402::500/121\",\r\n \"2603:1020:a04::60/123\"\ - ,\r\n \"2603:1020:a04::1c0/122\",\r\n \"2603:1020:a04::300/123\"\ - ,\r\n \"2603:1020:a04::360/123\",\r\n \"2603:1020:a04::500/121\"\ - ,\r\n \"2603:1020:a04:1::280/122\",\r\n \"2603:1020:a04:402::500/121\"\ - ,\r\n \"2603:1020:b04::780/121\",\r\n \"2603:1020:b04:1::280/123\"\ - ,\r\n \"2603:1020:b04:1::300/121\",\r\n \"2603:1020:b04:402::500/121\"\ - ,\r\n \"2603:1020:c01:2::b/128\",\r\n \"2603:1020:c01:2::e/128\"\ - ,\r\n \"2603:1020:c04::60/123\",\r\n \"2603:1020:c04::1c0/122\"\ - ,\r\n \"2603:1020:c04::300/123\",\r\n \"2603:1020:c04::360/123\"\ - ,\r\n \"2603:1020:c04::500/121\",\r\n \"2603:1020:c04:1::280/122\"\ - ,\r\n \"2603:1020:c04:402::500/121\",\r\n \"2603:1020:d01:2::a/128\"\ - ,\r\n \"2603:1020:d04::780/121\",\r\n \"2603:1020:d04:1::280/123\"\ - ,\r\n \"2603:1020:d04:1::300/121\",\r\n \"2603:1020:d04:402::500/121\"\ - ,\r\n \"2603:1020:e04::60/123\",\r\n \"2603:1020:e04::1c0/122\"\ - ,\r\n \"2603:1020:e04::300/123\",\r\n \"2603:1020:e04::360/123\"\ - ,\r\n \"2603:1020:e04::500/121\",\r\n \"2603:1020:e04:1::280/122\"\ - ,\r\n \"2603:1020:e04:402::500/121\",\r\n \"2603:1020:f04::780/121\"\ - ,\r\n \"2603:1020:f04:1::280/123\",\r\n \"2603:1020:f04:1::300/121\"\ - ,\r\n \"2603:1020:f04:402::500/121\",\r\n \"2603:1020:1001:6::1/128\"\ - ,\r\n \"2603:1020:1004::280/122\",\r\n \"2603:1020:1004:1::380/121\"\ - ,\r\n \"2603:1020:1004:2::180/121\",\r\n \"2603:1020:1004:400::420/123\"\ - ,\r\n \"2603:1020:1004:400::4a0/123\",\r\n \"2603:1020:1004:400::580/121\"\ - ,\r\n \"2603:1020:1004:c02::100/121\",\r\n \"2603:1020:1101::3/128\"\ - ,\r\n \"2603:1020:1104:1::160/123\",\r\n \"2603:1020:1104:1::180/122\"\ - ,\r\n \"2603:1020:1104:1::1c0/123\",\r\n \"2603:1020:1104:1::4c0/123\"\ - ,\r\n \"2603:1020:1104:1::500/121\",\r\n \"2603:1020:1104:400::440/123\"\ - ,\r\n \"2603:1020:1104:400::480/121\",\r\n \"2603:1030:7:5::e/128\"\ - ,\r\n \"2603:1030:7:5::17/128\",\r\n \"2603:1030:7:5::29/128\"\ - ,\r\n \"2603:1030:7:5::32/128\",\r\n \"2603:1030:7:6::10/128\"\ - ,\r\n \"2603:1030:7:6::14/128\",\r\n \"2603:1030:7:6::1b/128\"\ - ,\r\n \"2603:1030:7:6::37/128\",\r\n \"2603:1030:7:6::3f/128\"\ - ,\r\n \"2603:1030:8:5::8/128\",\r\n \"2603:1030:f:1::780/121\"\ - ,\r\n \"2603:1030:f:2::280/123\",\r\n \"2603:1030:f:2::300/121\"\ - ,\r\n \"2603:1030:f:400::d00/121\",\r\n \"2603:1030:10::60/123\"\ - ,\r\n \"2603:1030:10::1c0/122\",\r\n \"2603:1030:10::300/123\"\ - ,\r\n \"2603:1030:10::360/123\",\r\n \"2603:1030:10::500/121\"\ - ,\r\n \"2603:1030:10:1::280/122\",\r\n \"2603:1030:10:402::500/121\"\ - ,\r\n \"2603:1030:104::60/123\",\r\n \"2603:1030:104::1c0/122\"\ - ,\r\n \"2603:1030:104::300/123\",\r\n \"2603:1030:104::360/123\"\ - ,\r\n \"2603:1030:104::500/121\",\r\n \"2603:1030:104:1::280/122\"\ - ,\r\n \"2603:1030:104:402::500/121\",\r\n \"2603:1030:107:1::80/121\"\ - ,\r\n \"2603:1030:107:1::200/123\",\r\n \"2603:1030:107:1::280/121\"\ - ,\r\n \"2603:1030:107:400::3c0/123\",\r\n \"2603:1030:107:400::480/121\"\ - ,\r\n \"2603:1030:210::60/123\",\r\n \"2603:1030:210::1c0/122\"\ - ,\r\n \"2603:1030:210::300/123\",\r\n \"2603:1030:210::360/123\"\ - ,\r\n \"2603:1030:210::500/121\",\r\n \"2603:1030:210:1::280/122\"\ - ,\r\n \"2603:1030:210:402::500/121\",\r\n \"2603:1030:302:402::80/123\"\ - ,\r\n \"2603:1030:302:402::100/121\",\r\n \"2603:1030:408:6::18/128\"\ - ,\r\n \"2603:1030:408:6::2a/128\",\r\n \"2603:1030:408:6::3f/128\"\ - ,\r\n \"2603:1030:408:6::59/128\",\r\n \"2603:1030:408:7::37/128\"\ - ,\r\n \"2603:1030:408:7::39/128\",\r\n \"2603:1030:408:7::3b/128\"\ - ,\r\n \"2603:1030:408:7::48/128\",\r\n \"2603:1030:408:7::4f/128\"\ - ,\r\n \"2603:1030:409:2::6/128\",\r\n \"2603:1030:409:2::b/128\"\ - ,\r\n \"2603:1030:409:2::c/128\",\r\n \"2603:1030:40b:1::280/122\"\ - ,\r\n \"2603:1030:40b:2::80/121\",\r\n \"2603:1030:40b:2::240/123\"\ - ,\r\n \"2603:1030:40b:2::300/121\",\r\n \"2603:1030:40b:400::d00/121\"\ - ,\r\n \"2603:1030:40c::60/123\",\r\n \"2603:1030:40c::1c0/122\"\ - ,\r\n \"2603:1030:40c::300/123\",\r\n \"2603:1030:40c::360/123\"\ - ,\r\n \"2603:1030:40c::500/121\",\r\n \"2603:1030:40c:1::280/122\"\ - ,\r\n \"2603:1030:40c:402::500/121\",\r\n \"2603:1030:504::380/121\"\ - ,\r\n \"2603:1030:504::540/123\",\r\n \"2603:1030:504::700/121\"\ - ,\r\n \"2603:1030:504:1::280/122\",\r\n \"2603:1030:504:c02::100/123\"\ - ,\r\n \"2603:1030:504:c02::180/121\",\r\n \"2603:1030:608::780/121\"\ - ,\r\n \"2603:1030:608:1::280/123\",\r\n \"2603:1030:608:1::300/121\"\ - ,\r\n \"2603:1030:608:402::500/121\",\r\n \"2603:1030:800:5::bfee:a401/128\"\ - ,\r\n \"2603:1030:800:5::bfee:a418/128\",\r\n \"2603:1030:800:5::bfee:a429/128\"\ - ,\r\n \"2603:1030:800:5::bfee:a42a/128\",\r\n \"2603:1030:800:5::bfee:a435/128\"\ - ,\r\n \"2603:1030:807::60/123\",\r\n \"2603:1030:807::1c0/122\"\ - ,\r\n \"2603:1030:807::300/123\",\r\n \"2603:1030:807::360/123\"\ - ,\r\n \"2603:1030:807::500/121\",\r\n \"2603:1030:807:1::280/122\"\ - ,\r\n \"2603:1030:807:402::500/121\",\r\n \"2603:1030:a07::780/121\"\ - ,\r\n \"2603:1030:a07:1::280/123\",\r\n \"2603:1030:a07:1::300/121\"\ - ,\r\n \"2603:1030:a07:402::380/121\",\r\n \"2603:1030:b00::68/128\"\ - ,\r\n \"2603:1030:b00::ca/128\",\r\n \"2603:1030:b00::e8/128\"\ - ,\r\n \"2603:1030:b00::164/128\",\r\n \"2603:1030:b00::2a1/128\"\ - ,\r\n \"2603:1030:b00::4d9/128\",\r\n \"2603:1030:b00::4db/128\"\ - ,\r\n \"2603:1030:b00::50d/128\",\r\n \"2603:1030:b04::780/121\"\ - ,\r\n \"2603:1030:b04:1::280/123\",\r\n \"2603:1030:b04:1::300/121\"\ - ,\r\n \"2603:1030:b04:402::500/121\",\r\n \"2603:1030:c02:2::285/128\"\ - ,\r\n \"2603:1030:c02:2::2da/128\",\r\n \"2603:1030:c02:2::4e1/128\"\ - ,\r\n \"2603:1030:c06:1::280/122\",\r\n \"2603:1030:c06:2::80/121\"\ - ,\r\n \"2603:1030:c06:2::240/123\",\r\n \"2603:1030:c06:2::300/121\"\ - ,\r\n \"2603:1030:c06:400::d00/121\",\r\n \"2603:1030:d00::1d/128\"\ - ,\r\n \"2603:1030:d00::48/128\",\r\n \"2603:1030:d00::5a/128\"\ - ,\r\n \"2603:1030:d00::82/128\",\r\n \"2603:1030:d00::84/128\"\ - ,\r\n \"2603:1030:d00::9a/128\",\r\n \"2603:1030:f05::60/123\"\ - ,\r\n \"2603:1030:f05::1c0/122\",\r\n \"2603:1030:f05::300/123\"\ - ,\r\n \"2603:1030:f05::360/123\",\r\n \"2603:1030:f05::500/121\"\ - ,\r\n \"2603:1030:f05:1::280/122\",\r\n \"2603:1030:f05:402::500/121\"\ - ,\r\n \"2603:1030:1005::780/121\",\r\n \"2603:1030:1005:1::280/123\"\ - ,\r\n \"2603:1030:1005:1::300/121\",\r\n \"2603:1030:1005:402::500/121\"\ - ,\r\n \"2603:1040:5::160/123\",\r\n \"2603:1040:5::2c0/122\"\ - ,\r\n \"2603:1040:5::400/123\",\r\n \"2603:1040:5::460/123\"\ - ,\r\n \"2603:1040:5::600/121\",\r\n \"2603:1040:5:1::280/122\"\ - ,\r\n \"2603:1040:5:402::500/121\",\r\n \"2603:1040:207::780/121\"\ - ,\r\n \"2603:1040:207:1::280/123\",\r\n \"2603:1040:207:1::300/121\"\ - ,\r\n \"2603:1040:207:402::500/121\",\r\n \"2603:1040:207:800::300/121\"\ - ,\r\n \"2603:1040:407::60/123\",\r\n \"2603:1040:407::1c0/122\"\ - ,\r\n \"2603:1040:407::300/123\",\r\n \"2603:1040:407::360/123\"\ - ,\r\n \"2603:1040:407::500/121\",\r\n \"2603:1040:407:1::280/122\"\ - ,\r\n \"2603:1040:407:402::500/121\",\r\n \"2603:1040:606::780/121\"\ - ,\r\n \"2603:1040:606:1::280/123\",\r\n \"2603:1040:606:1::300/121\"\ - ,\r\n \"2603:1040:606:402::500/121\",\r\n \"2603:1040:806::780/121\"\ - ,\r\n \"2603:1040:806:1::280/123\",\r\n \"2603:1040:806:1::300/121\"\ - ,\r\n \"2603:1040:806:402::500/121\",\r\n \"2603:1040:900:2::e/128\"\ - ,\r\n \"2603:1040:904::60/123\",\r\n \"2603:1040:904::1c0/122\"\ - ,\r\n \"2603:1040:904::300/123\",\r\n \"2603:1040:904::360/123\"\ - ,\r\n \"2603:1040:904::500/121\",\r\n \"2603:1040:904:1::280/122\"\ - ,\r\n \"2603:1040:904:402::500/121\",\r\n \"2603:1040:a06::160/123\"\ - ,\r\n \"2603:1040:a06::2c0/122\",\r\n \"2603:1040:a06::400/123\"\ - ,\r\n \"2603:1040:a06::460/123\",\r\n \"2603:1040:a06::600/121\"\ - ,\r\n \"2603:1040:a06:1::280/122\",\r\n \"2603:1040:a06:402::500/121\"\ - ,\r\n \"2603:1040:b00:2::b/128\",\r\n \"2603:1040:b04::780/121\"\ - ,\r\n \"2603:1040:b04:1::280/123\",\r\n \"2603:1040:b04:1::300/121\"\ - ,\r\n \"2603:1040:b04:402::500/121\",\r\n \"2603:1040:c06::780/121\"\ - ,\r\n \"2603:1040:c06:1::280/123\",\r\n \"2603:1040:c06:1::300/121\"\ - ,\r\n \"2603:1040:c06:402::500/121\",\r\n \"2603:1040:d01:4::7/128\"\ - ,\r\n \"2603:1040:d04::280/122\",\r\n \"2603:1040:d04:1::380/121\"\ - ,\r\n \"2603:1040:d04:2::/123\",\r\n \"2603:1040:d04:2::100/120\"\ - ,\r\n \"2603:1040:d04:400::420/123\",\r\n \"2603:1040:d04:400::580/121\"\ - ,\r\n \"2603:1040:e05::40/123\",\r\n \"2603:1040:e05::80/121\"\ - ,\r\n \"2603:1040:e05:402::80/121\",\r\n \"2603:1040:f05::60/123\"\ - ,\r\n \"2603:1040:f05::1c0/122\",\r\n \"2603:1040:f05::300/123\"\ - ,\r\n \"2603:1040:f05::360/123\",\r\n \"2603:1040:f05::500/121\"\ - ,\r\n \"2603:1040:f05:1::280/122\",\r\n \"2603:1040:f05:402::500/121\"\ - ,\r\n \"2603:1040:1002:2::20/123\",\r\n \"2603:1040:1002:2::40/122\"\ - ,\r\n \"2603:1040:1002:2::80/123\",\r\n \"2603:1040:1002:2::200/121\"\ - ,\r\n \"2603:1040:1101:2::3/128\",\r\n \"2603:1040:1104:1::160/123\"\ - ,\r\n \"2603:1040:1104:1::180/122\",\r\n \"2603:1040:1104:1::1c0/123\"\ - ,\r\n \"2603:1040:1104:1::580/121\",\r\n \"2603:1040:1104:400::460/123\"\ - ,\r\n \"2603:1050:6::60/123\",\r\n \"2603:1050:6::1c0/122\"\ - ,\r\n \"2603:1050:6::300/123\",\r\n \"2603:1050:6::360/123\"\ - ,\r\n \"2603:1050:6::500/121\",\r\n \"2603:1050:6:1::280/122\"\ - ,\r\n \"2603:1050:6:402::580/121\",\r\n \"2603:1050:6:c02::2a0/123\"\ - ,\r\n \"2603:1050:403::280/122\",\r\n \"2603:1050:403:1::80/121\"\ - ,\r\n \"2603:1050:403:1::240/123\",\r\n \"2603:1050:403:1::300/121\"\ - ,\r\n \"2603:1050:403:400::580/121\",\r\n \"2a01:111:f100:1003::4134:3677/128\"\ - ,\r\n \"2a01:111:f100:1003::4134:36c2/128\",\r\n \"2a01:111:f100:1003::4134:36d9/128\"\ - ,\r\n \"2a01:111:f100:1003::4134:3707/128\",\r\n \"2a01:111:f100:1003::4134:370d/128\"\ - ,\r\n \"2a01:111:f100:1003::4134:3785/128\",\r\n \"2a01:111:f100:1003::4134:37d9/128\"\ - ,\r\n \"2a01:111:f100:1005::a83e:f7fe/128\",\r\n \"2a01:111:f100:2000::a83e:3015/128\"\ - ,\r\n \"2a01:111:f100:2000::a83e:301c/128\",\r\n \"2a01:111:f100:2000::a83e:3022/128\"\ - ,\r\n \"2a01:111:f100:2000::a83e:3070/128\",\r\n \"2a01:111:f100:2000::a83e:3083/128\"\ - ,\r\n \"2a01:111:f100:2000::a83e:3097/128\",\r\n \"2a01:111:f100:2000::a83e:30a9/128\"\ - ,\r\n \"2a01:111:f100:2000::a83e:30f3/128\",\r\n \"2a01:111:f100:2000::a83e:313a/128\"\ - ,\r\n \"2a01:111:f100:2000::a83e:32a5/128\",\r\n \"2a01:111:f100:2000::a83e:335c/128\"\ - ,\r\n \"2a01:111:f100:2000::a83e:336c/128\",\r\n \"2a01:111:f100:2000::a83e:3370/128\"\ - ,\r\n \"2a01:111:f100:2000::a83e:337e/128\",\r\n \"2a01:111:f100:2000::a83e:33ad/128\"\ - ,\r\n \"2a01:111:f100:2000::a83e:3649/128\",\r\n \"2a01:111:f100:2002::8975:2c8c/128\"\ - ,\r\n \"2a01:111:f100:2002::8975:2ce6/128\",\r\n \"2a01:111:f100:2002::8975:2d44/128\"\ - ,\r\n \"2a01:111:f100:2002::8975:2e91/128\",\r\n \"2a01:111:f100:2002::8975:2eaa/128\"\ - ,\r\n \"2a01:111:f100:2002::8975:2fc3/128\",\r\n \"2a01:111:f100:3000::a83e:1840/128\"\ - ,\r\n \"2a01:111:f100:3000::a83e:187a/128\",\r\n \"2a01:111:f100:3000::a83e:187c/128\"\ - ,\r\n \"2a01:111:f100:3000::a83e:18be/128\",\r\n \"2a01:111:f100:3000::a83e:1913/128\"\ - ,\r\n \"2a01:111:f100:3000::a83e:1978/128\",\r\n \"2a01:111:f100:3000::a83e:197f/128\"\ - ,\r\n \"2a01:111:f100:3000::a83e:19b3/128\",\r\n \"2a01:111:f100:3000::a83e:19c0/128\"\ - ,\r\n \"2a01:111:f100:3000::a83e:1a00/128\",\r\n \"2a01:111:f100:3000::a83e:1a54/127\"\ - ,\r\n \"2a01:111:f100:3000::a83e:1a8e/128\",\r\n \"2a01:111:f100:3000::a83e:1a9f/128\"\ - ,\r\n \"2a01:111:f100:3000::a83e:1adf/128\",\r\n \"2a01:111:f100:3000::a83e:1b12/128\"\ - ,\r\n \"2a01:111:f100:3001::8987:1164/128\",\r\n \"2a01:111:f100:3001::8987:1179/128\"\ - ,\r\n \"2a01:111:f100:3001::8987:11da/128\",\r\n \"2a01:111:f100:3001::8987:11ea/128\"\ - ,\r\n \"2a01:111:f100:3001::8987:12cf/128\",\r\n \"2a01:111:f100:3001::a83e:a67/128\"\ - ,\r\n \"2a01:111:f100:4002::9d37:c071/128\",\r\n \"2a01:111:f100:4002::9d37:c0bd/128\"\ - ,\r\n \"2a01:111:f100:6000::4134:a688/128\",\r\n \"2a01:111:f100:6000::4134:a6cf/128\"\ - ,\r\n \"2a01:111:f100:7000::6fdd:5343/128\",\r\n \"2a01:111:f100:7000::6fdd:5431/128\"\ - ,\r\n \"2a01:111:f100:9001::1761:91e4/128\",\r\n \"2a01:111:f100:9001::1761:9323/128\"\ - ,\r\n \"2a01:111:f100:9001::1761:958a/128\",\r\n \"2a01:111:f100:9001::1761:9696/128\"\ - ,\r\n \"2a01:111:f100:a001::4134:e463/128\",\r\n \"2a01:111:f100:a001::a83f:5c0a/128\"\ - ,\r\n \"2a01:111:f100:a001::a83f:5c0c/128\",\r\n \"2a01:111:f100:a004::bfeb:8ba9/128\"\ - ,\r\n \"2a01:111:f100:a004::bfeb:8c93/128\",\r\n \"2a01:111:f100:a004::bfeb:8d32/128\"\ - ,\r\n \"2a01:111:f100:a004::bfeb:8dc7/128\"\r\n ]\r\n \ - \ }\r\n },\r\n {\r\n \"name\": \"AzureOpenDatasets\",\r\n \ - \ \"id\": \"AzureOpenDatasets\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureOpenDatasets\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.73.248.32/28\",\r\n\ - \ \"20.36.120.192/28\",\r\n \"20.37.64.192/28\",\r\n \ - \ \"20.37.156.224/28\",\r\n \"20.37.195.32/28\",\r\n \ - \ \"20.37.224.192/28\",\r\n \"20.38.84.112/28\",\r\n \ - \ \"20.38.136.192/28\",\r\n \"20.39.11.32/28\",\r\n \"20.41.4.192/28\"\ - ,\r\n \"20.41.65.160/28\",\r\n \"20.41.193.128/28\",\r\n\ - \ \"20.42.4.224/28\",\r\n \"20.42.131.0/28\",\r\n \ - \ \"20.42.227.0/28\",\r\n \"20.43.41.160/28\",\r\n \"\ - 20.43.65.160/28\",\r\n \"20.43.130.112/28\",\r\n \"20.45.112.192/28\"\ - ,\r\n \"20.45.192.192/28\",\r\n \"20.150.160.192/28\",\r\ - \n \"20.189.106.208/28\",\r\n \"20.192.225.128/28\",\r\n\ - \ \"40.67.48.192/28\",\r\n \"40.74.30.112/28\",\r\n \ - \ \"40.80.57.128/28\",\r\n \"40.80.169.128/28\",\r\n \ - \ \"40.80.188.32/28\",\r\n \"40.82.253.80/28\",\r\n \"\ - 40.89.17.128/28\",\r\n \"51.12.41.32/28\",\r\n \"51.12.193.32/28\"\ - ,\r\n \"51.104.25.160/28\",\r\n \"51.105.80.192/28\",\r\n\ - \ \"51.105.88.192/28\",\r\n \"51.107.48.192/28\",\r\n \ - \ \"51.107.144.192/28\",\r\n \"51.116.48.112/28\",\r\n \ - \ \"51.116.144.112/28\",\r\n \"51.120.40.192/28\",\r\n \ - \ \"51.120.224.192/28\",\r\n \"51.137.161.144/28\",\r\n \ - \ \"51.143.192.192/28\",\r\n \"52.136.48.192/28\",\r\n \ - \ \"52.140.105.128/28\",\r\n \"52.150.139.80/28\",\r\n \ - \ \"52.228.81.144/28\",\r\n \"102.133.56.112/28\",\r\n \ - \ \"102.133.216.112/28\",\r\n \"191.235.225.160/28\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzurePortal\",\r\n\ - \ \"id\": \"AzurePortal\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzurePortal\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.67.35.35/32\",\r\n \ - \ \"13.67.35.77/32\",\r\n \"13.68.130.251/32\",\r\n \ - \ \"13.68.235.98/32\",\r\n \"13.69.112.176/28\",\r\n \ - \ \"13.69.126.92/32\",\r\n \"13.71.190.228/32\",\r\n \"\ - 13.73.249.32/27\",\r\n \"13.73.249.160/28\",\r\n \"13.73.255.248/29\"\ - ,\r\n \"13.77.1.236/32\",\r\n \"13.77.55.208/28\",\r\n \ - \ \"13.77.202.2/32\",\r\n \"13.78.49.187/32\",\r\n \ - \ \"13.78.132.155/32\",\r\n \"13.78.230.142/32\",\r\n \ - \ \"13.88.220.109/32\",\r\n \"13.88.222.0/32\",\r\n \"\ - 13.90.156.71/32\",\r\n \"13.92.138.76/32\",\r\n \"20.21.39.64/27\"\ - ,\r\n \"20.36.121.128/27\",\r\n \"20.36.122.56/30\",\r\n\ - \ \"20.36.125.104/29\",\r\n \"20.37.65.128/27\",\r\n \ - \ \"20.37.66.56/30\",\r\n \"20.37.70.96/29\",\r\n \ - \ \"20.37.195.224/27\",\r\n \"20.37.196.252/30\",\r\n \"\ - 20.37.198.64/27\",\r\n \"20.37.225.128/27\",\r\n \"20.37.226.56/30\"\ - ,\r\n \"20.37.229.152/29\",\r\n \"20.38.85.192/27\",\r\n\ - \ \"20.38.87.224/27\",\r\n \"20.38.137.160/27\",\r\n \ - \ \"20.38.138.60/30\",\r\n \"20.38.142.88/29\",\r\n \ - \ \"20.38.149.208/28\",\r\n \"20.39.12.32/27\",\r\n \"\ - 20.39.12.232/30\",\r\n \"20.40.200.0/27\",\r\n \"20.40.200.160/30\"\ - ,\r\n \"20.40.224.226/31\",\r\n \"20.40.225.32/29\",\r\n\ - \ \"20.41.5.192/27\",\r\n \"20.41.65.224/27\",\r\n \ - \ \"20.41.67.88/30\",\r\n \"20.41.193.224/27\",\r\n \ - \ \"20.41.197.16/30\",\r\n \"20.42.6.192/27\",\r\n \"20.42.227.192/27\"\ - ,\r\n \"20.42.228.220/30\",\r\n \"20.42.228.224/27\",\r\n\ - \ \"20.42.230.80/28\",\r\n \"20.43.42.64/27\",\r\n \ - \ \"20.43.43.164/30\",\r\n \"20.43.46.248/29\",\r\n \ - \ \"20.43.66.64/27\",\r\n \"20.43.67.92/30\",\r\n \"20.43.67.96/27\"\ - ,\r\n \"20.43.70.64/28\",\r\n \"20.43.123.160/28\",\r\n\ - \ \"20.43.132.32/27\",\r\n \"20.44.19.32/28\",\r\n \ - \ \"20.45.112.124/30\",\r\n \"20.45.113.128/27\",\r\n \ - \ \"20.45.116.64/29\",\r\n \"20.45.125.240/28\",\r\n \"\ - 20.45.195.160/27\",\r\n \"20.45.197.192/27\",\r\n \"20.45.197.228/30\"\ - ,\r\n \"20.46.10.40/29\",\r\n \"20.47.232.32/28\",\r\n \ - \ \"20.48.193.48/29\",\r\n \"20.49.99.16/28\",\r\n \ - \ \"20.49.99.32/30\",\r\n \"20.49.103.96/29\",\r\n \"\ - 20.49.109.36/30\",\r\n \"20.49.109.44/31\",\r\n \"20.49.109.48/28\"\ - ,\r\n \"20.49.115.184/29\",\r\n \"20.49.120.0/27\",\r\n\ - \ \"20.49.120.36/30\",\r\n \"20.49.126.156/30\",\r\n \ - \ \"20.49.127.224/28\",\r\n \"20.50.1.32/27\",\r\n \ - \ \"20.50.1.160/27\",\r\n \"20.50.1.200/30\",\r\n \"20.50.1.208/28\"\ - ,\r\n \"20.50.65.72/30\",\r\n \"20.51.16.120/29\",\r\n \ - \ \"20.53.44.4/30\",\r\n \"20.53.44.64/29\",\r\n \ - \ \"20.61.98.128/29\",\r\n \"20.62.128.240/29\",\r\n \"\ - 20.72.20.96/27\",\r\n \"20.150.161.192/27\",\r\n \"20.150.165.144/30\"\ - ,\r\n \"20.150.166.160/29\",\r\n \"20.187.197.0/29\",\r\n\ - \ \"20.189.108.96/27\",\r\n \"20.189.109.88/30\",\r\n \ - \ \"20.189.109.160/27\",\r\n \"20.189.224.208/29\",\r\n \ - \ \"20.191.161.80/29\",\r\n \"20.192.161.192/27\",\r\n \ - \ \"20.192.164.180/30\",\r\n \"20.192.166.160/29\",\r\n \ - \ \"20.192.228.128/27\",\r\n \"20.192.230.0/30\",\r\n \ - \ \"20.192.230.112/29\",\r\n \"20.194.72.56/29\",\r\n \ - \ \"23.98.104.80/28\",\r\n \"23.98.104.96/27\",\r\n \"\ - 23.98.104.128/30\",\r\n \"23.98.108.44/31\",\r\n \"23.98.108.168/29\"\ - ,\r\n \"23.102.65.134/32\",\r\n \"40.64.128.128/27\",\r\n\ - \ \"40.64.132.88/30\",\r\n \"40.64.132.96/28\",\r\n \ - \ \"40.64.135.88/29\",\r\n \"40.65.114.234/32\",\r\n \ - \ \"40.67.48.124/30\",\r\n \"40.67.49.128/27\",\r\n \"\ - 40.67.50.192/27\",\r\n \"40.67.52.88/29\",\r\n \"40.67.121.128/28\"\ - ,\r\n \"40.71.15.144/28\",\r\n \"40.78.239.48/28\",\r\n\ - \ \"40.78.245.208/28\",\r\n \"40.79.189.96/28\",\r\n \ - \ \"40.80.58.128/27\",\r\n \"40.80.59.28/30\",\r\n \ - \ \"40.80.59.32/27\",\r\n \"40.80.169.224/27\",\r\n \"\ - 40.80.172.16/30\",\r\n \"40.80.173.192/29\",\r\n \"40.80.190.160/27\"\ - ,\r\n \"40.80.191.200/30\",\r\n \"40.82.253.224/27\",\r\n\ - \ \"40.84.132.239/32\",\r\n \"40.84.228.255/32\",\r\n \ - \ \"40.89.18.160/27\",\r\n \"40.89.20.132/30\",\r\n \ - \ \"40.89.23.232/29\",\r\n \"40.113.117.57/32\",\r\n \ - \ \"40.114.78.132/32\",\r\n \"40.114.236.251/32\",\r\n \"\ - 40.117.86.243/32\",\r\n \"40.117.237.78/32\",\r\n \"40.119.9.236/30\"\ - ,\r\n \"51.12.41.20/30\",\r\n \"51.12.41.160/27\",\r\n \ - \ \"51.12.43.128/29\",\r\n \"51.12.193.20/30\",\r\n \ - \ \"51.12.193.160/27\",\r\n \"51.12.194.104/29\",\r\n \ - \ \"51.13.136.8/29\",\r\n \"51.104.27.96/27\",\r\n \"\ - 51.104.28.220/30\",\r\n \"51.104.28.224/28\",\r\n \"51.105.80.124/30\"\ - ,\r\n \"51.105.81.128/27\",\r\n \"51.105.89.160/27\",\r\n\ - \ \"51.105.90.152/30\",\r\n \"51.107.49.160/27\",\r\n \ - \ \"51.107.50.60/30\",\r\n \"51.107.53.240/29\",\r\n \ - \ \"51.107.145.128/27\",\r\n \"51.107.146.56/30\",\r\n \ - \ \"51.107.149.248/29\",\r\n \"51.116.48.192/27\",\r\n \ - \ \"51.116.49.140/30\",\r\n \"51.116.51.160/29\",\r\n \ - \ \"51.116.144.192/27\",\r\n \"51.116.145.140/30\",\r\n \ - \ \"51.116.148.104/29\",\r\n \"51.120.41.160/27\",\r\n \"\ - 51.120.42.60/30\",\r\n \"51.120.225.128/27\",\r\n \"51.120.226.56/30\"\ - ,\r\n \"51.120.232.16/29\",\r\n \"51.137.162.160/27\",\r\ - \n \"51.137.164.80/30\",\r\n \"51.137.167.152/29\",\r\n\ - \ \"51.140.69.25/32\",\r\n \"51.140.138.84/32\",\r\n \ - \ \"51.140.149.64/28\",\r\n \"51.143.192.124/30\",\r\n \ - \ \"51.143.193.128/27\",\r\n \"51.143.208.192/29\",\r\n \ - \ \"51.145.3.27/32\",\r\n \"51.145.21.195/32\",\r\n \ - \ \"52.136.49.160/27\",\r\n \"52.136.51.72/30\",\r\n \"\ - 52.136.52.232/29\",\r\n \"52.136.184.64/29\",\r\n \"52.140.105.224/27\"\ - ,\r\n \"52.140.107.112/28\",\r\n \"52.140.108.64/30\",\r\ - \n \"52.140.111.96/29\",\r\n \"52.146.132.80/29\",\r\n \ - \ \"52.150.139.224/27\",\r\n \"52.150.140.216/30\",\r\n \ - \ \"52.150.152.16/28\",\r\n \"52.150.152.224/27\",\r\n \ - \ \"52.150.156.232/29\",\r\n \"52.161.101.86/32\",\r\n \ - \ \"52.163.207.80/32\",\r\n \"52.172.112.152/29\",\r\n \ - \ \"52.172.181.227/32\",\r\n \"52.172.190.71/32\",\r\n \ - \ \"52.172.191.4/32\",\r\n \"52.172.215.87/32\",\r\n \ - \ \"52.228.24.159/32\",\r\n \"52.228.83.160/27\",\r\n \"\ - 52.228.84.84/30\",\r\n \"52.228.84.96/28\",\r\n \"52.233.66.46/32\"\ - ,\r\n \"52.243.76.246/32\",\r\n \"102.133.56.160/27\",\r\ - \n \"102.133.58.192/30\",\r\n \"102.133.61.176/29\",\r\n\ - \ \"102.133.217.192/27\",\r\n \"102.133.218.56/30\",\r\n\ - \ \"102.133.221.0/29\",\r\n \"104.41.216.228/32\",\r\n \ - \ \"104.42.195.92/32\",\r\n \"104.46.178.96/29\",\r\n \ - \ \"104.211.89.213/32\",\r\n \"104.211.101.116/32\",\r\n \ - \ \"104.214.117.155/32\",\r\n \"104.215.120.160/32\",\r\n\ - \ \"104.215.146.128/32\",\r\n \"137.116.247.179/32\",\r\n\ - \ \"191.233.10.96/27\",\r\n \"191.233.15.0/29\",\r\n \ - \ \"191.234.136.0/27\",\r\n \"191.234.136.48/30\",\r\n \ - \ \"191.234.139.144/29\",\r\n \"191.235.227.160/27\",\r\n \ - \ \"213.199.128.226/32\",\r\n \"2603:1000:4::700/121\",\r\n\ - \ \"2603:1000:104::200/121\",\r\n \"2603:1000:104::400/121\"\ - ,\r\n \"2603:1000:104:1::680/121\",\r\n \"2603:1010:6::100/121\"\ - ,\r\n \"2603:1010:6:1::680/121\",\r\n \"2603:1010:101::700/121\"\ - ,\r\n \"2603:1010:304::700/121\",\r\n \"2603:1010:404::700/121\"\ - ,\r\n \"2603:1020:5::100/121\",\r\n \"2603:1020:5:1::680/121\"\ - ,\r\n \"2603:1020:206::100/121\",\r\n \"2603:1020:206:1::680/121\"\ - ,\r\n \"2603:1020:305::700/121\",\r\n \"2603:1020:405::700/121\"\ - ,\r\n \"2603:1020:605::700/121\",\r\n \"2603:1020:705::100/121\"\ - ,\r\n \"2603:1020:705:1::680/121\",\r\n \"2603:1020:805::100/121\"\ - ,\r\n \"2603:1020:805:1::680/121\",\r\n \"2603:1020:905::700/121\"\ - ,\r\n \"2603:1020:a04::100/121\",\r\n \"2603:1020:a04:1::680/121\"\ - ,\r\n \"2603:1020:b04::700/121\",\r\n \"2603:1020:c04::100/121\"\ - ,\r\n \"2603:1020:c04:1::680/121\",\r\n \"2603:1020:d04::700/121\"\ - ,\r\n \"2603:1020:e04::100/121\",\r\n \"2603:1020:e04:1::680/121\"\ - ,\r\n \"2603:1020:f04::700/121\",\r\n \"2603:1020:1004::680/121\"\ - ,\r\n \"2603:1020:1004:1::100/121\",\r\n \"2603:1020:1104::780/121\"\ - ,\r\n \"2603:1030:f:1::700/121\",\r\n \"2603:1030:10::100/121\"\ - ,\r\n \"2603:1030:10:1::680/121\",\r\n \"2603:1030:104::100/121\"\ - ,\r\n \"2603:1030:104:1::680/121\",\r\n \"2603:1030:107:1::/121\"\ - ,\r\n \"2603:1030:210::100/121\",\r\n \"2603:1030:210:1::680/121\"\ - ,\r\n \"2603:1030:40b:1::680/121\",\r\n \"2603:1030:40c::100/121\"\ - ,\r\n \"2603:1030:40c:1::680/121\",\r\n \"2603:1030:504::100/121\"\ - ,\r\n \"2603:1030:504:1::680/121\",\r\n \"2603:1030:608::700/121\"\ - ,\r\n \"2603:1030:807::100/121\",\r\n \"2603:1030:807:1::680/121\"\ - ,\r\n \"2603:1030:a07::700/121\",\r\n \"2603:1030:b04::700/121\"\ - ,\r\n \"2603:1030:c06:1::680/121\",\r\n \"2603:1030:f05::100/121\"\ - ,\r\n \"2603:1030:f05:1::680/121\",\r\n \"2603:1030:1005::700/121\"\ - ,\r\n \"2603:1040:5::200/121\",\r\n \"2603:1040:5:1::680/121\"\ - ,\r\n \"2603:1040:207::700/121\",\r\n \"2603:1040:407::100/121\"\ - ,\r\n \"2603:1040:407:1::680/121\",\r\n \"2603:1040:606::700/121\"\ - ,\r\n \"2603:1040:806::700/121\",\r\n \"2603:1040:904::100/121\"\ - ,\r\n \"2603:1040:904:1::680/121\",\r\n \"2603:1040:a06::200/121\"\ - ,\r\n \"2603:1040:a06:1::680/121\",\r\n \"2603:1040:b04::700/121\"\ - ,\r\n \"2603:1040:c06::700/121\",\r\n \"2603:1040:d04::680/121\"\ - ,\r\n \"2603:1040:d04:1::100/121\",\r\n \"2603:1040:f05::100/121\"\ - ,\r\n \"2603:1040:f05:1::680/121\",\r\n \"2603:1040:1002:1::580/121\"\ - ,\r\n \"2603:1040:1104::780/121\",\r\n \"2603:1050:6::100/121\"\ - ,\r\n \"2603:1050:6:1::680/121\",\r\n \"2603:1050:403::680/121\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureRemoteRendering\"\ - ,\r\n \"id\": \"AzureRemoteRendering\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureRemoteRendering\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.145.228/30\",\r\n\ - \ \"13.69.233.132/30\",\r\n \"13.70.79.84/30\",\r\n \ - \ \"20.44.19.168/30\",\r\n \"20.45.126.120/30\",\r\n \ - \ \"20.49.103.240/28\",\r\n \"20.51.9.64/28\",\r\n \"\ - 20.51.17.96/28\",\r\n \"20.53.44.240/28\",\r\n \"20.61.99.112/28\"\ - ,\r\n \"20.62.129.224/28\",\r\n \"20.65.132.80/28\",\r\n\ - \ \"20.150.130.192/28\",\r\n \"20.191.165.112/28\",\r\n\ - \ \"20.195.64.224/28\",\r\n \"40.74.150.64/30\",\r\n \ - \ \"40.78.239.120/30\",\r\n \"40.79.197.44/30\",\r\n \ - \ \"51.12.73.96/28\",\r\n \"51.140.149.88/30\",\r\n \"\ - 51.143.209.144/28\",\r\n \"52.146.133.64/28\",\r\n \"52.168.112.88/30\"\ - ,\r\n \"52.178.17.8/30\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"AzureResourceManager\",\r\n \"id\": \"AzureResourceManager\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"6\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"AzureResourceManager\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.66.141.176/28\",\r\n \ - \ \"13.67.18.0/23\",\r\n \"13.69.67.32/28\",\r\n \"13.69.114.0/23\"\ - ,\r\n \"13.69.229.224/28\",\r\n \"13.69.234.0/23\",\r\n\ - \ \"13.70.74.64/28\",\r\n \"13.70.76.0/23\",\r\n \ - \ \"13.71.173.192/28\",\r\n \"13.71.196.80/28\",\r\n \"\ - 13.71.198.0/24\",\r\n \"13.73.240.224/28\",\r\n \"13.73.246.0/23\"\ - ,\r\n \"13.75.39.16/28\",\r\n \"13.77.53.32/28\",\r\n \ - \ \"13.77.55.0/25\",\r\n \"13.78.109.96/28\",\r\n \ - \ \"13.86.219.80/28\",\r\n \"13.86.222.0/24\",\r\n \"13.87.57.240/28\"\ - ,\r\n \"13.87.60.0/23\",\r\n \"13.87.123.240/28\",\r\n \ - \ \"13.87.126.0/24\",\r\n \"13.89.180.0/23\",\r\n \ - \ \"20.21.44.0/26\",\r\n \"20.21.50.0/23\",\r\n \"20.36.108.48/28\"\ - ,\r\n \"20.36.110.0/23\",\r\n \"20.36.115.144/28\",\r\n\ - \ \"20.36.118.0/23\",\r\n \"20.36.126.0/23\",\r\n \ - \ \"20.37.76.48/28\",\r\n \"20.37.78.0/23\",\r\n \"20.37.230.0/23\"\ - ,\r\n \"20.38.128.32/28\",\r\n \"20.38.130.0/23\",\r\n \ - \ \"20.38.150.0/23\",\r\n \"20.40.206.240/28\",\r\n \ - \ \"20.40.226.0/23\",\r\n \"20.41.70.0/23\",\r\n \"\ - 20.43.120.224/28\",\r\n \"20.43.124.0/23\",\r\n \"20.44.3.240/28\"\ - ,\r\n \"20.44.6.0/23\",\r\n \"20.44.8.16/28\",\r\n \ - \ \"20.44.16.112/28\",\r\n \"20.44.20.0/23\",\r\n \"\ - 20.44.30.0/24\",\r\n \"20.45.88.0/23\",\r\n \"20.45.118.0/23\"\ - ,\r\n \"20.46.8.0/23\",\r\n \"20.48.194.0/23\",\r\n \ - \ \"20.49.116.0/23\",\r\n \"20.50.68.96/28\",\r\n \"\ - 20.51.10.0/23\",\r\n \"20.51.18.0/23\",\r\n \"20.53.42.0/23\"\ - ,\r\n \"20.58.64.0/23\",\r\n \"20.61.100.0/23\",\r\n \ - \ \"20.62.56.0/23\",\r\n \"20.62.130.0/23\",\r\n \"\ - 20.65.128.0/23\",\r\n \"20.66.0.0/23\",\r\n \"20.72.28.64/26\"\ - ,\r\n \"20.88.64.64/26\",\r\n \"20.150.225.128/26\",\r\n\ - \ \"20.150.242.0/23\",\r\n \"20.187.198.0/23\",\r\n \ - \ \"20.189.168.0/24\",\r\n \"20.189.226.0/23\",\r\n \ - \ \"20.191.162.0/23\",\r\n \"20.192.32.128/26\",\r\n \"\ - 20.192.40.0/23\",\r\n \"20.192.52.0/23\",\r\n \"20.193.196.0/23\"\ - ,\r\n \"20.193.204.0/26\",\r\n \"20.195.144.0/23\",\r\n\ - \ \"23.98.110.0/23\",\r\n \"40.67.54.0/23\",\r\n \ - \ \"40.67.59.208/28\",\r\n \"40.67.62.0/23\",\r\n \"40.67.120.0/24\"\ - ,\r\n \"40.69.108.32/28\",\r\n \"40.69.112.0/22\",\r\n \ - \ \"40.71.13.224/28\",\r\n \"40.74.102.0/28\",\r\n \ - \ \"40.75.35.32/28\",\r\n \"40.75.38.0/23\",\r\n \"40.78.196.32/28\"\ - ,\r\n \"40.78.198.0/23\",\r\n \"40.78.203.224/28\",\r\n\ - \ \"40.78.206.0/23\",\r\n \"40.78.234.176/28\",\r\n \ - \ \"40.78.254.0/23\",\r\n \"40.79.131.240/28\",\r\n \ - \ \"40.79.134.0/23\",\r\n \"40.79.158.0/23\",\r\n \"40.79.180.0/28\"\ - ,\r\n \"40.79.182.0/23\",\r\n \"40.79.198.0/23\",\r\n \ - \ \"40.80.174.0/23\",\r\n \"40.80.178.0/23\",\r\n \ - \ \"40.113.178.0/28\",\r\n \"40.120.80.0/23\",\r\n \"51.11.64.0/24\"\ - ,\r\n \"51.11.96.0/24\",\r\n \"51.12.44.0/23\",\r\n \ - \ \"51.12.101.64/26\",\r\n \"51.12.196.0/23\",\r\n \ - \ \"51.12.205.0/26\",\r\n \"51.104.8.224/28\",\r\n \"51.105.78.0/23\"\ - ,\r\n \"51.105.94.0/23\",\r\n \"51.107.54.0/23\",\r\n \ - \ \"51.107.60.32/28\",\r\n \"51.107.62.0/23\",\r\n \ - \ \"51.107.150.0/23\",\r\n \"51.107.156.32/28\",\r\n \"\ - 51.107.158.0/23\",\r\n \"51.116.52.0/23\",\r\n \"51.116.60.32/28\"\ - ,\r\n \"51.116.62.0/23\",\r\n \"51.116.150.0/23\",\r\n \ - \ \"51.116.156.32/28\",\r\n \"51.116.159.0/24\",\r\n \ - \ \"51.120.46.0/23\",\r\n \"51.120.100.32/28\",\r\n \ - \ \"51.120.102.0/23\",\r\n \"51.120.220.32/28\",\r\n \"\ - 51.120.222.0/23\",\r\n \"51.120.230.0/23\",\r\n \"51.138.208.0/23\"\ - ,\r\n \"51.140.212.16/28\",\r\n \"51.140.214.0/24\",\r\n\ - \ \"51.143.210.0/23\",\r\n \"52.136.54.0/23\",\r\n \ - \ \"52.138.94.0/23\",\r\n \"52.139.104.0/23\",\r\n \"\ - 52.146.134.0/23\",\r\n \"52.147.96.0/24\",\r\n \"52.150.158.0/23\"\ - ,\r\n \"52.162.110.224/28\",\r\n \"52.172.114.0/23\",\r\n\ - \ \"52.231.19.208/28\",\r\n \"52.231.22.0/24\",\r\n \ - \ \"52.231.148.64/28\",\r\n \"52.231.150.0/24\",\r\n \ - \ \"52.240.242.0/23\",\r\n \"65.52.252.48/28\",\r\n \"\ - 65.52.254.0/23\",\r\n \"102.133.28.16/28\",\r\n \"102.133.30.0/23\"\ - ,\r\n \"102.133.62.0/23\",\r\n \"102.133.123.224/28\",\r\ - \n \"102.133.158.0/23\",\r\n \"102.133.222.0/23\",\r\n \ - \ \"104.46.160.0/24\",\r\n \"104.46.161.0/25\",\r\n \ - \ \"104.46.180.0/23\",\r\n \"104.214.162.0/23\",\r\n \ - \ \"104.214.166.0/26\",\r\n \"168.61.138.0/23\",\r\n \"\ - 168.61.143.192/26\",\r\n \"191.233.52.0/23\",\r\n \"191.233.205.16/28\"\ - ,\r\n \"191.234.140.0/23\",\r\n \"191.234.158.0/23\",\r\n\ - \ \"2603:1000:4::6c0/122\",\r\n \"2603:1000:4:402::280/122\"\ - ,\r\n \"2603:1000:104::480/122\",\r\n \"2603:1000:104:402::280/122\"\ - ,\r\n \"2603:1010:6::180/122\",\r\n \"2603:1010:6:402::280/122\"\ - ,\r\n \"2603:1010:101::6c0/122\",\r\n \"2603:1010:101:402::280/122\"\ - ,\r\n \"2603:1010:304::6c0/122\",\r\n \"2603:1010:304:402::280/122\"\ - ,\r\n \"2603:1010:404::6c0/122\",\r\n \"2603:1010:404:402::280/122\"\ - ,\r\n \"2603:1020:5::180/122\",\r\n \"2603:1020:5:402::280/122\"\ - ,\r\n \"2603:1020:206::180/122\",\r\n \"2603:1020:206:402::280/122\"\ - ,\r\n \"2603:1020:305::6c0/122\",\r\n \"2603:1020:305:402::280/122\"\ - ,\r\n \"2603:1020:405::6c0/122\",\r\n \"2603:1020:405:402::280/122\"\ - ,\r\n \"2603:1020:605::6c0/122\",\r\n \"2603:1020:605:402::280/122\"\ - ,\r\n \"2603:1020:705::180/122\",\r\n \"2603:1020:705:402::280/122\"\ - ,\r\n \"2603:1020:805::180/122\",\r\n \"2603:1020:805:402::280/122\"\ - ,\r\n \"2603:1020:905::6c0/122\",\r\n \"2603:1020:905:402::280/122\"\ - ,\r\n \"2603:1020:a04::180/122\",\r\n \"2603:1020:a04:2::700/120\"\ - ,\r\n \"2603:1020:a04:402::280/122\",\r\n \"2603:1020:b04::6c0/122\"\ - ,\r\n \"2603:1020:b04:402::280/122\",\r\n \"2603:1020:c04::180/122\"\ - ,\r\n \"2603:1020:c04:402::280/122\",\r\n \"2603:1020:d04::6c0/122\"\ - ,\r\n \"2603:1020:d04:402::280/122\",\r\n \"2603:1020:e04::180/122\"\ - ,\r\n \"2603:1020:e04:3::300/120\",\r\n \"2603:1020:e04:402::280/122\"\ - ,\r\n \"2603:1020:f04::6c0/122\",\r\n \"2603:1020:f04:402::280/122\"\ - ,\r\n \"2603:1020:1004:1::400/120\",\r\n \"2603:1020:1004:400::180/122\"\ - ,\r\n \"2603:1020:1104:1::/120\",\r\n \"2603:1020:1104:400::280/122\"\ - ,\r\n \"2603:1030:f:1::6c0/122\",\r\n \"2603:1030:f:2::700/120\"\ - ,\r\n \"2603:1030:f:400::a80/122\",\r\n \"2603:1030:10::180/122\"\ - ,\r\n \"2603:1030:10:402::280/122\",\r\n \"2603:1030:104::180/122\"\ - ,\r\n \"2603:1030:104:402::280/122\",\r\n \"2603:1030:107:1::100/120\"\ - ,\r\n \"2603:1030:107:400::200/122\",\r\n \"2603:1030:210::180/122\"\ - ,\r\n \"2603:1030:210:402::280/122\",\r\n \"2603:1030:40b:2::40/122\"\ - ,\r\n \"2603:1030:40b:400::a80/122\",\r\n \"2603:1030:40c::180/122\"\ - ,\r\n \"2603:1030:40c:402::280/122\",\r\n \"2603:1030:504::400/120\"\ - ,\r\n \"2603:1030:504:402::180/122\",\r\n \"2603:1030:608::6c0/122\"\ - ,\r\n \"2603:1030:608:402::280/122\",\r\n \"2603:1030:807::180/122\"\ - ,\r\n \"2603:1030:807:402::280/122\",\r\n \"2603:1030:a07::6c0/122\"\ - ,\r\n \"2603:1030:a07:402::900/122\",\r\n \"2603:1030:b04::6c0/122\"\ - ,\r\n \"2603:1030:b04:402::280/122\",\r\n \"2603:1030:c06:2::40/122\"\ - ,\r\n \"2603:1030:c06:400::a80/122\",\r\n \"2603:1030:f05::180/122\"\ - ,\r\n \"2603:1030:f05:402::280/122\",\r\n \"2603:1030:1005::6c0/122\"\ - ,\r\n \"2603:1030:1005:402::280/122\",\r\n \"2603:1040:5::280/122\"\ - ,\r\n \"2603:1040:5:402::280/122\",\r\n \"2603:1040:207::6c0/122\"\ - ,\r\n \"2603:1040:207:2::300/120\",\r\n \"2603:1040:207:402::280/122\"\ - ,\r\n \"2603:1040:407::180/122\",\r\n \"2603:1040:407:402::280/122\"\ - ,\r\n \"2603:1040:606::6c0/122\",\r\n \"2603:1040:606:402::280/122\"\ - ,\r\n \"2603:1040:806::6c0/122\",\r\n \"2603:1040:806:402::280/122\"\ - ,\r\n \"2603:1040:904::180/122\",\r\n \"2603:1040:904:402::280/122\"\ - ,\r\n \"2603:1040:a06::280/122\",\r\n \"2603:1040:a06:2::400/120\"\ - ,\r\n \"2603:1040:a06:402::280/122\",\r\n \"2603:1040:b04::6c0/122\"\ - ,\r\n \"2603:1040:b04:402::280/122\",\r\n \"2603:1040:c06::6c0/122\"\ - ,\r\n \"2603:1040:c06:402::280/122\",\r\n \"2603:1040:d04:1::400/120\"\ - ,\r\n \"2603:1040:d04:400::180/122\",\r\n \"2603:1040:f05::180/122\"\ - ,\r\n \"2603:1040:f05:2::100/120\",\r\n \"2603:1040:f05:402::280/122\"\ - ,\r\n \"2603:1040:1002:1::600/120\",\r\n \"2603:1040:1002:400::1c0/122\"\ - ,\r\n \"2603:1040:1104:1::/120\",\r\n \"2603:1040:1104:400::280/122\"\ - ,\r\n \"2603:1050:6::180/122\",\r\n \"2603:1050:6:402::280/122\"\ - ,\r\n \"2603:1050:403:1::40/122\",\r\n \"2603:1050:403:400::440/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureSignalR\"\ - ,\r\n \"id\": \"AzureSignalR\",\r\n \"serviceTagChangeNumber\":\ - \ \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSignalR\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.145.0/26\",\r\n \ - \ \"13.67.15.64/27\",\r\n \"13.69.113.0/24\",\r\n \ - \ \"13.69.232.128/25\",\r\n \"13.70.74.224/27\",\r\n \"\ - 13.71.199.32/27\",\r\n \"13.73.244.64/27\",\r\n \"13.74.111.0/25\"\ - ,\r\n \"13.78.109.224/27\",\r\n \"13.89.175.128/26\",\r\n\ - \ \"20.38.132.96/27\",\r\n \"20.38.143.192/27\",\r\n \ - \ \"20.38.149.224/27\",\r\n \"20.40.229.0/27\",\r\n \ - \ \"20.42.64.128/25\",\r\n \"20.42.72.0/25\",\r\n \"20.44.10.128/26\"\ - ,\r\n \"20.44.17.128/26\",\r\n \"20.45.123.192/27\",\r\n\ - \ \"20.46.11.96/27\",\r\n \"20.48.196.192/27\",\r\n \ - \ \"20.49.91.192/27\",\r\n \"20.49.119.96/27\",\r\n \ - \ \"20.51.12.32/27\",\r\n \"20.51.17.224/27\",\r\n \"20.53.47.32/27\"\ - ,\r\n \"20.61.102.64/27\",\r\n \"20.62.59.32/27\",\r\n \ - \ \"20.62.133.64/27\",\r\n \"20.65.132.224/27\",\r\n \ - \ \"20.66.3.224/27\",\r\n \"20.69.0.192/27\",\r\n \"\ - 20.82.247.128/25\",\r\n \"20.86.94.128/25\",\r\n \"20.88.155.0/25\"\ - ,\r\n \"20.150.174.160/27\",\r\n \"20.150.244.160/27\",\r\ - \n \"20.189.170.0/24\",\r\n \"20.189.229.224/27\",\r\n \ - \ \"20.191.166.64/27\",\r\n \"20.192.34.0/27\",\r\n \ - \ \"20.192.44.64/27\",\r\n \"20.192.55.192/27\",\r\n \ - \ \"20.193.199.160/27\",\r\n \"20.193.205.224/27\",\r\n \ - \ \"20.194.73.192/27\",\r\n \"20.195.65.192/27\",\r\n \"\ - 20.195.72.192/27\",\r\n \"20.195.84.0/25\",\r\n \"23.98.86.64/27\"\ - ,\r\n \"40.69.108.192/26\",\r\n \"40.69.110.128/27\",\r\n\ - \ \"40.70.148.192/26\",\r\n \"40.71.15.0/25\",\r\n \ - \ \"40.74.98.160/27\",\r\n \"40.78.204.96/27\",\r\n \ - \ \"40.78.238.64/26\",\r\n \"40.78.238.128/25\",\r\n \"\ - 40.78.245.64/26\",\r\n \"40.78.253.0/26\",\r\n \"40.79.132.160/27\"\ - ,\r\n \"40.79.139.96/27\",\r\n \"40.79.148.32/27\",\r\n\ - \ \"40.79.163.96/27\",\r\n \"40.79.171.192/27\",\r\n \ - \ \"40.79.189.0/27\",\r\n \"40.79.197.0/27\",\r\n \ - \ \"40.80.53.32/27\",\r\n \"40.120.64.160/27\",\r\n \"51.12.17.160/27\"\ - ,\r\n \"51.12.46.192/27\",\r\n \"51.12.101.192/27\",\r\n\ - \ \"51.12.168.0/27\",\r\n \"51.104.9.64/27\",\r\n \ - \ \"51.105.69.32/27\",\r\n \"51.105.77.0/27\",\r\n \"\ - 51.107.128.128/27\",\r\n \"51.107.192.192/27\",\r\n \"51.107.242.192/27\"\ - ,\r\n \"51.107.250.192/27\",\r\n \"51.116.149.96/27\",\r\ - \n \"51.116.246.32/27\",\r\n \"51.120.213.96/27\",\r\n \ - \ \"51.120.233.96/27\",\r\n \"51.138.210.96/27\",\r\n \ - \ \"51.143.212.128/27\",\r\n \"52.136.53.224/27\",\r\n \ - \ \"52.138.92.224/27\",\r\n \"52.138.229.128/25\",\r\n \ - \ \"52.139.107.96/27\",\r\n \"52.146.136.32/27\",\r\n \ - \ \"52.167.109.0/26\",\r\n \"52.178.16.0/24\",\r\n \"\ - 52.182.141.64/26\",\r\n \"52.231.20.96/27\",\r\n \"52.231.20.192/26\"\ - ,\r\n \"52.236.190.0/24\",\r\n \"102.37.160.32/27\",\r\n\ - \ \"102.133.126.96/27\",\r\n \"104.214.164.160/27\",\r\n\ - \ \"191.233.207.128/27\",\r\n \"191.238.72.96/27\",\r\n\ - \ \"2603:1000:4:2::100/120\",\r\n \"2603:1000:104:2::600/120\"\ - ,\r\n \"2603:1010:6:2::500/120\",\r\n \"2603:1010:101:2::/120\"\ - ,\r\n \"2603:1010:304:2::100/120\",\r\n \"2603:1010:404:2::100/120\"\ - ,\r\n \"2603:1020:5:4::/120\",\r\n \"2603:1020:206:4::200/120\"\ - ,\r\n \"2603:1020:605:2::100/120\",\r\n \"2603:1020:705:2::500/120\"\ - ,\r\n \"2603:1020:805:2::300/120\",\r\n \"2603:1020:905:2::100/120\"\ - ,\r\n \"2603:1020:a04:2::300/120\",\r\n \"2603:1020:b04:2::100/120\"\ - ,\r\n \"2603:1020:c04:2::300/120\",\r\n \"2603:1020:d04:1::700/120\"\ - ,\r\n \"2603:1020:e04:3::700/120\",\r\n \"2603:1020:f04:3::100/120\"\ - ,\r\n \"2603:1020:1004:2::600/120\",\r\n \"2603:1020:1104:2::/120\"\ - ,\r\n \"2603:1030:f:3::500/120\",\r\n \"2603:1030:10:4::/120\"\ - ,\r\n \"2603:1030:104:2::400/120\",\r\n \"2603:1030:107:1::600/120\"\ - ,\r\n \"2603:1030:210:5::/120\",\r\n \"2603:1030:302::300/120\"\ - ,\r\n \"2603:1030:40b:3::100/120\",\r\n \"2603:1030:40c:4::/120\"\ - ,\r\n \"2603:1030:504:2::500/120\",\r\n \"2603:1030:608:1::700/120\"\ - ,\r\n \"2603:1030:807:3::/120\",\r\n \"2603:1030:a07:1::700/120\"\ - ,\r\n \"2603:1030:b04:1::700/120\",\r\n \"2603:1030:c06:2::700/120\"\ - ,\r\n \"2603:1030:f05:2::500/120\",\r\n \"2603:1030:1005:2::100/120\"\ - ,\r\n \"2603:1040:5:3::/120\",\r\n \"2603:1040:207:2::600/120\"\ - ,\r\n \"2603:1040:407:2::300/120\",\r\n \"2603:1040:606:2::100/120\"\ - ,\r\n \"2603:1040:806:2::100/120\",\r\n \"2603:1040:904:2::300/120\"\ - ,\r\n \"2603:1040:a06:3::/120\",\r\n \"2603:1040:b04:2::100/120\"\ - ,\r\n \"2603:1040:c06:2::100/120\",\r\n \"2603:1040:d04:2::600/120\"\ - ,\r\n \"2603:1040:e05::600/120\",\r\n \"2603:1040:f05:2::700/120\"\ - ,\r\n \"2603:1040:1002::100/120\",\r\n \"2603:1040:1104:2::/120\"\ - ,\r\n \"2603:1050:6:2::300/120\",\r\n \"2603:1050:403:2::100/120\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureSiteRecovery\"\ - ,\r\n \"id\": \"AzureSiteRecovery\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSiteRecovery\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.141.240/28\",\r\n\ - \ \"13.67.10.96/28\",\r\n \"13.69.67.80/28\",\r\n \ - \ \"13.69.107.80/28\",\r\n \"13.69.230.16/28\",\r\n \"\ - 13.70.74.96/28\",\r\n \"13.70.159.158/32\",\r\n \"13.71.173.224/28\"\ - ,\r\n \"13.71.196.144/28\",\r\n \"13.73.242.192/28\",\r\n\ - \ \"13.74.108.144/28\",\r\n \"13.75.39.80/28\",\r\n \ - \ \"13.77.53.64/28\",\r\n \"13.78.109.128/28\",\r\n \ - \ \"13.82.88.226/32\",\r\n \"13.84.148.14/32\",\r\n \"\ - 13.86.219.176/28\",\r\n \"13.87.37.4/32\",\r\n \"13.87.58.48/28\"\ - ,\r\n \"13.87.124.48/28\",\r\n \"13.89.174.144/28\",\r\n\ - \ \"20.21.32.0/28\",\r\n \"20.21.43.224/28\",\r\n \ - \ \"20.21.66.112/28\",\r\n \"20.21.74.112/28\",\r\n \"\ - 20.36.34.70/32\",\r\n \"20.36.69.62/32\",\r\n \"20.36.108.96/28\"\ - ,\r\n \"20.36.115.224/28\",\r\n \"20.36.120.80/28\",\r\n\ - \ \"20.37.64.80/28\",\r\n \"20.37.76.128/28\",\r\n \ - \ \"20.37.156.96/28\",\r\n \"20.37.192.112/28\",\r\n \ - \ \"20.37.224.80/28\",\r\n \"20.38.80.112/28\",\r\n \"\ - 20.38.128.80/28\",\r\n \"20.38.136.80/28\",\r\n \"20.38.147.160/28\"\ - ,\r\n \"20.39.8.80/28\",\r\n \"20.41.4.64/28\",\r\n \ - \ \"20.41.64.96/28\",\r\n \"20.41.192.80/28\",\r\n \ - \ \"20.42.4.96/28\",\r\n \"20.42.129.128/28\",\r\n \"20.42.224.80/28\"\ - ,\r\n \"20.43.40.112/28\",\r\n \"20.43.64.112/28\",\r\n\ - \ \"20.43.121.16/28\",\r\n \"20.43.130.64/28\",\r\n \ - \ \"20.44.4.80/28\",\r\n \"20.44.8.176/28\",\r\n \"\ - 20.44.17.32/28\",\r\n \"20.44.27.192/28\",\r\n \"20.45.75.232/32\"\ - ,\r\n \"20.45.112.80/28\",\r\n \"20.45.123.96/28\",\r\n\ - \ \"20.45.192.80/28\",\r\n \"20.49.83.48/28\",\r\n \ - \ \"20.49.91.48/28\",\r\n \"20.72.16.0/28\",\r\n \"\ - 20.72.28.32/28\",\r\n \"20.150.160.80/28\",\r\n \"20.150.172.48/28\"\ - ,\r\n \"20.150.179.208/28\",\r\n \"20.150.187.208/28\",\r\ - \n \"20.189.106.96/28\",\r\n \"20.192.99.208/28\",\r\n \ - \ \"20.192.160.0/28\",\r\n \"20.192.225.0/28\",\r\n \ - \ \"20.192.235.224/28\",\r\n \"20.193.203.208/28\",\r\n \ - \ \"20.194.67.48/28\",\r\n \"20.205.75.80/28\",\r\n \ - \ \"20.205.83.80/28\",\r\n \"20.208.18.112/28\",\r\n \"\ - 23.96.195.247/32\",\r\n \"23.98.83.80/28\",\r\n \"40.67.48.80/28\"\ - ,\r\n \"40.67.60.80/28\",\r\n \"40.69.108.64/28\",\r\n \ - \ \"40.69.144.231/32\",\r\n \"40.69.212.238/32\",\r\n \ - \ \"40.70.148.96/28\",\r\n \"40.71.14.0/28\",\r\n \ - \ \"40.74.24.112/28\",\r\n \"40.74.147.176/28\",\r\n \"\ - 40.75.35.80/28\",\r\n \"40.78.196.64/28\",\r\n \"40.78.204.16/28\"\ - ,\r\n \"40.78.229.48/28\",\r\n \"40.78.236.144/28\",\r\n\ - \ \"40.78.243.160/28\",\r\n \"40.78.251.96/28\",\r\n \ - \ \"40.79.132.64/28\",\r\n \"40.79.139.0/28\",\r\n \ - \ \"40.79.146.192/28\",\r\n \"40.79.156.48/28\",\r\n \"\ - 40.79.163.16/28\",\r\n \"40.79.171.96/28\",\r\n \"40.79.180.32/28\"\ - ,\r\n \"40.79.187.176/28\",\r\n \"40.79.195.160/28\",\r\n\ - \ \"40.80.51.96/28\",\r\n \"40.80.56.80/28\",\r\n \ - \ \"40.80.168.80/28\",\r\n \"40.80.176.16/28\",\r\n \"\ - 40.80.184.96/28\",\r\n \"40.82.248.96/28\",\r\n \"40.83.179.48/32\"\ - ,\r\n \"40.89.16.80/28\",\r\n \"40.119.9.192/28\",\r\n \ - \ \"40.120.75.96/28\",\r\n \"40.123.219.238/32\",\r\n \ - \ \"51.12.47.0/28\",\r\n \"51.12.100.32/28\",\r\n \ - \ \"51.12.198.112/28\",\r\n \"51.12.204.32/28\",\r\n \"\ - 51.12.227.208/28\",\r\n \"51.12.235.208/28\",\r\n \"51.103.202.112/28\"\ - ,\r\n \"51.104.9.0/28\",\r\n \"51.104.24.112/28\",\r\n \ - \ \"51.105.67.192/28\",\r\n \"51.105.75.160/28\",\r\n \ - \ \"51.105.80.80/28\",\r\n \"51.105.88.80/28\",\r\n \ - \ \"51.107.48.80/28\",\r\n \"51.107.60.64/28\",\r\n \"\ - 51.107.68.31/32\",\r\n \"51.107.144.80/28\",\r\n \"51.107.156.80/28\"\ - ,\r\n \"51.107.231.223/32\",\r\n \"51.116.48.80/28\",\r\n\ - \ \"51.116.60.64/28\",\r\n \"51.116.144.80/28\",\r\n \ - \ \"51.116.156.176/28\",\r\n \"51.116.208.58/32\",\r\n \ - \ \"51.116.243.128/28\",\r\n \"51.116.251.48/28\",\r\n \ - \ \"51.120.40.80/28\",\r\n \"51.120.100.64/28\",\r\n \ - \ \"51.120.107.208/28\",\r\n \"51.120.211.208/28\",\r\n \ - \ \"51.120.220.64/28\",\r\n \"51.120.224.80/28\",\r\n \"\ - 51.137.160.96/28\",\r\n \"51.140.43.158/32\",\r\n \"51.140.212.80/28\"\ - ,\r\n \"51.141.3.203/32\",\r\n \"51.143.192.80/28\",\r\n\ - \ \"52.136.48.80/28\",\r\n \"52.136.139.227/32\",\r\n \ - \ \"52.138.92.64/28\",\r\n \"52.138.227.144/28\",\r\n \ - \ \"52.140.104.80/28\",\r\n \"52.143.138.106/32\",\r\n \ - \ \"52.150.136.96/28\",\r\n \"52.161.20.168/32\",\r\n \ - \ \"52.162.111.0/28\",\r\n \"52.166.13.64/32\",\r\n \"\ - 52.167.107.80/28\",\r\n \"52.172.46.220/32\",\r\n \"52.172.187.37/32\"\ - ,\r\n \"52.175.17.132/32\",\r\n \"52.175.146.69/32\",\r\n\ - \ \"52.180.178.64/32\",\r\n \"52.182.139.192/28\",\r\n \ - \ \"52.183.45.166/32\",\r\n \"52.184.158.163/32\",\r\n \ - \ \"52.185.150.140/32\",\r\n \"52.187.58.193/32\",\r\n \ - \ \"52.187.191.206/32\",\r\n \"52.225.188.170/32\",\r\n \ - \ \"52.228.36.192/32\",\r\n \"52.228.80.96/28\",\r\n \ - \ \"52.229.125.98/32\",\r\n \"52.231.20.16/28\",\r\n \ - \ \"52.231.28.253/32\",\r\n \"52.231.148.96/28\",\r\n \"\ - 52.231.198.185/32\",\r\n \"52.236.187.64/28\",\r\n \"52.246.155.160/28\"\ - ,\r\n \"65.52.252.192/28\",\r\n \"102.133.28.128/28\",\r\ - \n \"102.133.59.160/28\",\r\n \"102.133.72.51/32\",\r\n\ - \ \"102.133.124.64/28\",\r\n \"102.133.156.96/28\",\r\n\ - \ \"102.133.160.44/32\",\r\n \"102.133.218.176/28\",\r\n\ - \ \"102.133.251.160/28\",\r\n \"104.210.113.114/32\",\r\n\ - \ \"104.211.177.6/32\",\r\n \"191.233.8.0/28\",\r\n \ - \ \"191.233.51.192/28\",\r\n \"191.233.205.80/28\",\r\n \ - \ \"191.234.147.208/28\",\r\n \"191.234.155.208/28\",\r\n \ - \ \"191.234.185.172/32\",\r\n \"191.235.224.112/28\",\r\n\ - \ \"2603:1000:4::/123\",\r\n \"2603:1000:4:402::2d0/125\"\ - ,\r\n \"2603:1000:104:1::/123\",\r\n \"2603:1000:104:402::2d0/125\"\ - ,\r\n \"2603:1000:104:802::158/125\",\r\n \"2603:1000:104:c02::158/125\"\ - ,\r\n \"2603:1010:6:1::/123\",\r\n \"2603:1010:6:402::2d0/125\"\ - ,\r\n \"2603:1010:6:802::158/125\",\r\n \"2603:1010:6:c02::158/125\"\ - ,\r\n \"2603:1010:101::/123\",\r\n \"2603:1010:101:402::2d0/125\"\ - ,\r\n \"2603:1010:304::/123\",\r\n \"2603:1010:304:402::2d0/125\"\ - ,\r\n \"2603:1010:404::/123\",\r\n \"2603:1010:404:402::2d0/125\"\ - ,\r\n \"2603:1020:5:1::/123\",\r\n \"2603:1020:5:402::2d0/125\"\ - ,\r\n \"2603:1020:5:802::158/125\",\r\n \"2603:1020:5:c02::158/125\"\ - ,\r\n \"2603:1020:206:1::/123\",\r\n \"2603:1020:206:402::2d0/125\"\ - ,\r\n \"2603:1020:206:802::158/125\",\r\n \"2603:1020:206:c02::158/125\"\ - ,\r\n \"2603:1020:305::/123\",\r\n \"2603:1020:305:402::2d0/125\"\ - ,\r\n \"2603:1020:405::/123\",\r\n \"2603:1020:405:402::2d0/125\"\ - ,\r\n \"2603:1020:605::/123\",\r\n \"2603:1020:605:402::2d0/125\"\ - ,\r\n \"2603:1020:705:1::/123\",\r\n \"2603:1020:705:402::2d0/125\"\ - ,\r\n \"2603:1020:705:802::158/125\",\r\n \"2603:1020:705:c02::158/125\"\ - ,\r\n \"2603:1020:805:1::/123\",\r\n \"2603:1020:805:402::2d0/125\"\ - ,\r\n \"2603:1020:805:802::158/125\",\r\n \"2603:1020:805:c02::158/125\"\ - ,\r\n \"2603:1020:905::/123\",\r\n \"2603:1020:905:402::2d0/125\"\ - ,\r\n \"2603:1020:a04:1::/123\",\r\n \"2603:1020:a04:402::2d0/125\"\ - ,\r\n \"2603:1020:a04:802::158/125\",\r\n \"2603:1020:a04:c02::158/125\"\ - ,\r\n \"2603:1020:b04::/123\",\r\n \"2603:1020:b04:402::2d0/125\"\ - ,\r\n \"2603:1020:c04:1::/123\",\r\n \"2603:1020:c04:402::2d0/125\"\ - ,\r\n \"2603:1020:c04:802::158/125\",\r\n \"2603:1020:c04:c02::158/125\"\ - ,\r\n \"2603:1020:d04::/123\",\r\n \"2603:1020:d04:402::2d0/125\"\ - ,\r\n \"2603:1020:e04:1::/123\",\r\n \"2603:1020:e04:402::2d0/125\"\ - ,\r\n \"2603:1020:e04:802::158/125\",\r\n \"2603:1020:e04:c02::158/125\"\ - ,\r\n \"2603:1020:f04::/123\",\r\n \"2603:1020:f04:402::2d0/125\"\ - ,\r\n \"2603:1020:1004::/123\",\r\n \"2603:1020:1004:400::1d0/125\"\ - ,\r\n \"2603:1020:1004:400::2f0/125\",\r\n \"2603:1020:1004:800::3e0/125\"\ - ,\r\n \"2603:1020:1004:c02::3a0/125\",\r\n \"2603:1020:1104::/123\"\ - ,\r\n \"2603:1020:1104:400::2d0/125\",\r\n \"2603:1030:f:1::/123\"\ - ,\r\n \"2603:1030:f:400::ad0/125\",\r\n \"2603:1030:10:1::/123\"\ - ,\r\n \"2603:1030:10:402::2d0/125\",\r\n \"2603:1030:10:802::158/125\"\ - ,\r\n \"2603:1030:10:c02::158/125\",\r\n \"2603:1030:104:1::/123\"\ - ,\r\n \"2603:1030:104:402::2d0/125\",\r\n \"2603:1030:104:402::700/125\"\ - ,\r\n \"2603:1030:104:802::1a0/125\",\r\n \"2603:1030:107::/123\"\ - ,\r\n \"2603:1030:107:400::f8/125\",\r\n \"2603:1030:210:1::/123\"\ - ,\r\n \"2603:1030:210:402::2d0/125\",\r\n \"2603:1030:210:802::158/125\"\ - ,\r\n \"2603:1030:210:c02::158/125\",\r\n \"2603:1030:40b:1::/123\"\ - ,\r\n \"2603:1030:40b:400::ad0/125\",\r\n \"2603:1030:40b:800::158/125\"\ - ,\r\n \"2603:1030:40b:c00::158/125\",\r\n \"2603:1030:40c:1::/123\"\ - ,\r\n \"2603:1030:40c:402::2d0/125\",\r\n \"2603:1030:40c:802::158/125\"\ - ,\r\n \"2603:1030:40c:c02::158/125\",\r\n \"2603:1030:504:1::/123\"\ - ,\r\n \"2603:1030:504:402::1d0/125\",\r\n \"2603:1030:504:402::2f0/125\"\ - ,\r\n \"2603:1030:504:802::3e0/125\",\r\n \"2603:1030:504:c02::390/125\"\ - ,\r\n \"2603:1030:608::/123\",\r\n \"2603:1030:608:402::2d0/125\"\ - ,\r\n \"2603:1030:807:1::/123\",\r\n \"2603:1030:807:402::2d0/125\"\ - ,\r\n \"2603:1030:807:802::158/125\",\r\n \"2603:1030:807:c02::158/125\"\ - ,\r\n \"2603:1030:a07::/123\",\r\n \"2603:1030:a07:402::950/125\"\ - ,\r\n \"2603:1030:b04::/123\",\r\n \"2603:1030:b04:402::2d0/125\"\ - ,\r\n \"2603:1030:c06:1::/123\",\r\n \"2603:1030:c06:400::ad0/125\"\ - ,\r\n \"2603:1030:c06:802::158/125\",\r\n \"2603:1030:c06:c02::158/125\"\ - ,\r\n \"2603:1030:f05:1::/123\",\r\n \"2603:1030:f05:402::2d0/125\"\ - ,\r\n \"2603:1030:f05:802::158/125\",\r\n \"2603:1030:f05:c02::158/125\"\ - ,\r\n \"2603:1030:1005::/123\",\r\n \"2603:1030:1005:402::2d0/125\"\ - ,\r\n \"2603:1040:5:1::/123\",\r\n \"2603:1040:5:402::2d0/125\"\ - ,\r\n \"2603:1040:5:802::158/125\",\r\n \"2603:1040:5:c02::158/125\"\ - ,\r\n \"2603:1040:207::/123\",\r\n \"2603:1040:207:402::2d0/125\"\ - ,\r\n \"2603:1040:207:800::58/125\",\r\n \"2603:1040:207:c00::58/125\"\ - ,\r\n \"2603:1040:407:1::/123\",\r\n \"2603:1040:407:402::2d0/125\"\ - ,\r\n \"2603:1040:407:802::158/125\",\r\n \"2603:1040:407:c02::158/125\"\ - ,\r\n \"2603:1040:606::/123\",\r\n \"2603:1040:606:402::2d0/125\"\ - ,\r\n \"2603:1040:806::/123\",\r\n \"2603:1040:806:402::2d0/125\"\ - ,\r\n \"2603:1040:904:1::/123\",\r\n \"2603:1040:904:402::2d0/125\"\ - ,\r\n \"2603:1040:904:802::158/125\",\r\n \"2603:1040:904:c02::158/125\"\ - ,\r\n \"2603:1040:a06:1::/123\",\r\n \"2603:1040:a06:402::2d0/125\"\ - ,\r\n \"2603:1040:a06:802::158/125\",\r\n \"2603:1040:a06:c02::158/125\"\ - ,\r\n \"2603:1040:b04::/123\",\r\n \"2603:1040:b04:402::2d0/125\"\ - ,\r\n \"2603:1040:c06::/123\",\r\n \"2603:1040:c06:402::2d0/125\"\ - ,\r\n \"2603:1040:d04::/123\",\r\n \"2603:1040:d04:400::1d0/125\"\ - ,\r\n \"2603:1040:d04:400::2f0/125\",\r\n \"2603:1040:d04:800::3e0/125\"\ - ,\r\n \"2603:1040:f05:1::/123\",\r\n \"2603:1040:f05:402::2d0/125\"\ - ,\r\n \"2603:1040:f05:802::158/125\",\r\n \"2603:1040:f05:c02::158/125\"\ - ,\r\n \"2603:1040:1002::40/123\",\r\n \"2603:1040:1002:400::188/125\"\ - ,\r\n \"2603:1040:1002:800::58/125\",\r\n \"2603:1040:1002:c00::58/125\"\ - ,\r\n \"2603:1040:1104::/123\",\r\n \"2603:1040:1104:400::2d0/125\"\ - ,\r\n \"2603:1050:6:1::/123\",\r\n \"2603:1050:6:402::2d0/125\"\ - ,\r\n \"2603:1050:6:802::158/125\",\r\n \"2603:1050:6:c02::158/125\"\ - ,\r\n \"2603:1050:403::/123\",\r\n \"2603:1050:403:400::1f0/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureTrafficManager\"\ - ,\r\n \"id\": \"AzureTrafficManager\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureTrafficManager\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.65.92.252/32\",\r\n\ - \ \"13.65.95.152/32\",\r\n \"13.75.124.254/32\",\r\n \ - \ \"13.75.127.63/32\",\r\n \"13.75.152.253/32\",\r\n \ - \ \"13.75.153.124/32\",\r\n \"13.84.222.37/32\",\r\n \ - \ \"23.96.236.252/32\",\r\n \"23.101.191.199/32\",\r\n \"\ - 40.68.30.66/32\",\r\n \"40.68.31.178/32\",\r\n \"40.78.67.110/32\"\ - ,\r\n \"40.87.147.10/32\",\r\n \"40.87.151.34/32\",\r\n\ - \ \"40.114.5.197/32\",\r\n \"52.172.155.168/32\",\r\n \ - \ \"52.172.158.37/32\",\r\n \"52.173.90.107/32\",\r\n \ - \ \"52.173.250.232/32\",\r\n \"52.240.144.45/32\",\r\n \ - \ \"52.240.151.125/32\",\r\n \"65.52.217.19/32\",\r\n \ - \ \"104.41.187.209/32\",\r\n \"104.41.190.203/32\",\r\n \ - \ \"104.42.192.195/32\",\r\n \"104.45.149.110/32\",\r\n \ - \ \"104.215.91.84/32\",\r\n \"137.135.46.163/32\",\r\n \ - \ \"137.135.47.215/32\",\r\n \"137.135.80.149/32\",\r\n \ - \ \"137.135.82.249/32\",\r\n \"191.232.208.52/32\",\r\n \ - \ \"191.232.214.62/32\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"BatchNodeManagement\",\r\n \"id\": \"BatchNodeManagement\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.65.192.161/32\",\r\n \"\ - 13.65.208.36/32\",\r\n \"13.66.141.32/27\",\r\n \"13.66.225.240/32\"\ - ,\r\n \"13.66.227.117/32\",\r\n \"13.66.227.193/32\",\r\n\ - \ \"13.67.9.160/27\",\r\n \"13.67.58.116/32\",\r\n \ - \ \"13.67.190.3/32\",\r\n \"13.67.237.249/32\",\r\n \ - \ \"13.69.65.64/26\",\r\n \"13.69.106.128/26\",\r\n \"13.69.125.173/32\"\ - ,\r\n \"13.69.229.32/27\",\r\n \"13.70.73.0/27\",\r\n \ - \ \"13.71.144.135/32\",\r\n \"13.71.172.96/27\",\r\n \ - \ \"13.71.195.160/27\",\r\n \"13.73.117.100/32\",\r\n \ - \ \"13.73.153.226/32\",\r\n \"13.73.157.134/32\",\r\n \ - \ \"13.73.249.64/27\",\r\n \"13.74.107.128/27\",\r\n \"\ - 13.75.36.96/27\",\r\n \"13.77.52.128/27\",\r\n \"13.77.80.138/32\"\ - ,\r\n \"13.78.108.128/27\",\r\n \"13.78.145.2/32\",\r\n\ - \ \"13.78.145.73/32\",\r\n \"13.78.150.134/32\",\r\n \ - \ \"13.78.187.18/32\",\r\n \"13.79.172.125/32\",\r\n \ - \ \"13.80.117.88/32\",\r\n \"13.81.1.133/32\",\r\n \"\ - 13.81.59.254/32\",\r\n \"13.81.63.6/32\",\r\n \"13.81.104.137/32\"\ - ,\r\n \"13.86.218.192/27\",\r\n \"13.87.32.176/32\",\r\n\ - \ \"13.87.32.218/32\",\r\n \"13.87.33.133/32\",\r\n \ - \ \"13.87.57.96/27\",\r\n \"13.87.123.96/27\",\r\n \ - \ \"13.89.55.147/32\",\r\n \"13.89.171.224/27\",\r\n \"\ - 13.91.55.167/32\",\r\n \"13.91.88.93/32\",\r\n \"13.91.107.154/32\"\ - ,\r\n \"13.92.114.103/32\",\r\n \"13.93.206.144/32\",\r\n\ - \ \"13.94.214.82/32\",\r\n \"13.95.9.27/32\",\r\n \ - \ \"20.21.33.32/27\",\r\n \"20.36.40.22/32\",\r\n \"\ - 20.36.47.197/32\",\r\n \"20.36.107.128/27\",\r\n \"20.36.121.160/27\"\ - ,\r\n \"20.37.65.160/27\",\r\n \"20.37.75.224/27\",\r\n\ - \ \"20.37.196.128/27\",\r\n \"20.37.225.160/27\",\r\n \ - \ \"20.38.85.224/27\",\r\n \"20.38.137.192/27\",\r\n \ - \ \"20.38.146.224/27\",\r\n \"20.39.1.125/32\",\r\n \ - \ \"20.39.1.239/32\",\r\n \"20.39.2.44/32\",\r\n \"20.39.2.122/32\"\ - ,\r\n \"20.39.3.157/32\",\r\n \"20.39.3.186/32\",\r\n \ - \ \"20.39.12.64/27\",\r\n \"20.40.137.186/32\",\r\n \ - \ \"20.40.149.165/32\",\r\n \"20.40.200.32/27\",\r\n \ - \ \"20.41.5.224/27\",\r\n \"20.41.66.128/27\",\r\n \"20.41.195.128/27\"\ - ,\r\n \"20.42.6.224/27\",\r\n \"20.42.227.224/27\",\r\n\ - \ \"20.43.42.96/27\",\r\n \"20.43.66.96/27\",\r\n \ - \ \"20.43.132.64/27\",\r\n \"20.44.4.112/29\",\r\n \"\ - 20.44.27.64/27\",\r\n \"20.45.113.160/27\",\r\n \"20.45.122.224/27\"\ - ,\r\n \"20.45.195.192/27\",\r\n \"20.49.83.64/27\",\r\n\ - \ \"20.49.91.64/27\",\r\n \"20.50.1.64/26\",\r\n \ - \ \"20.72.17.64/27\",\r\n \"20.150.161.224/27\",\r\n \"\ - 20.150.172.0/27\",\r\n \"20.150.179.96/27\",\r\n \"20.150.187.96/27\"\ - ,\r\n \"20.189.109.0/27\",\r\n \"20.192.99.96/27\",\r\n\ - \ \"20.192.161.224/27\",\r\n \"20.192.228.160/27\",\r\n\ - \ \"20.192.235.192/27\",\r\n \"20.193.203.128/27\",\r\n\ - \ \"23.96.12.112/32\",\r\n \"23.96.101.73/32\",\r\n \ - \ \"23.96.109.140/32\",\r\n \"23.96.232.67/32\",\r\n \ - \ \"23.97.48.186/32\",\r\n \"23.97.51.12/32\",\r\n \"\ - 23.97.97.29/32\",\r\n \"23.97.180.74/32\",\r\n \"23.98.82.160/27\"\ - ,\r\n \"23.99.98.61/32\",\r\n \"23.99.107.229/32\",\r\n\ - \ \"23.99.195.236/32\",\r\n \"23.100.100.145/32\",\r\n \ - \ \"23.100.103.112/32\",\r\n \"23.101.176.33/32\",\r\n \ - \ \"23.102.178.148/32\",\r\n \"23.102.185.64/32\",\r\n \ - \ \"40.64.128.160/27\",\r\n \"40.67.49.160/27\",\r\n \ - \ \"40.67.60.0/27\",\r\n \"40.68.100.153/32\",\r\n \"\ - 40.68.191.54/32\",\r\n \"40.68.218.90/32\",\r\n \"40.69.107.128/27\"\ - ,\r\n \"40.70.147.224/27\",\r\n \"40.71.12.192/27\",\r\n\ - \ \"40.74.101.0/27\",\r\n \"40.74.140.140/32\",\r\n \ - \ \"40.74.149.48/29\",\r\n \"40.74.177.177/32\",\r\n \ - \ \"40.75.35.136/29\",\r\n \"40.77.18.99/32\",\r\n \"\ - 40.78.195.128/27\",\r\n \"40.78.203.0/27\",\r\n \"40.78.227.0/27\"\ - ,\r\n \"40.78.234.96/27\",\r\n \"40.78.242.224/27\",\r\n\ - \ \"40.78.250.160/27\",\r\n \"40.79.131.96/27\",\r\n \ - \ \"40.79.138.96/27\",\r\n \"40.79.146.96/27\",\r\n \ - \ \"40.79.154.32/27\",\r\n \"40.79.162.96/27\",\r\n \"\ - 40.79.170.192/27\",\r\n \"40.79.186.128/27\",\r\n \"40.79.194.32/27\"\ - ,\r\n \"40.80.50.224/27\",\r\n \"40.80.58.160/27\",\r\n\ - \ \"40.80.170.128/27\",\r\n \"40.80.190.192/27\",\r\n \ - \ \"40.82.255.64/27\",\r\n \"40.84.49.170/32\",\r\n \ - \ \"40.84.62.82/32\",\r\n \"40.85.226.213/32\",\r\n \"\ - 40.85.227.37/32\",\r\n \"40.86.224.98/32\",\r\n \"40.86.224.104/32\"\ - ,\r\n \"40.88.48.36/32\",\r\n \"40.89.18.192/27\",\r\n \ - \ \"40.89.65.161/32\",\r\n \"40.89.66.236/32\",\r\n \ - \ \"40.89.67.77/32\",\r\n \"40.89.70.17/32\",\r\n \"\ - 40.112.254.235/32\",\r\n \"40.115.50.9/32\",\r\n \"40.118.208.127/32\"\ - ,\r\n \"40.122.166.234/32\",\r\n \"51.12.41.192/27\",\r\n\ - \ \"51.12.100.0/27\",\r\n \"51.12.193.192/27\",\r\n \ - \ \"51.12.204.0/27\",\r\n \"51.12.227.96/27\",\r\n \ - \ \"51.12.235.96/27\",\r\n \"51.104.28.0/27\",\r\n \"51.105.66.224/27\"\ - ,\r\n \"51.105.74.224/27\",\r\n \"51.105.81.160/27\",\r\n\ - \ \"51.105.89.192/27\",\r\n \"51.107.49.192/27\",\r\n \ - \ \"51.107.59.224/27\",\r\n \"51.107.145.160/27\",\r\n \ - \ \"51.107.155.224/27\",\r\n \"51.116.48.224/27\",\r\n \ - \ \"51.116.59.224/27\",\r\n \"51.116.144.224/27\",\r\n \ - \ \"51.116.154.32/27\",\r\n \"51.116.243.0/27\",\r\n \ - \ \"51.116.251.0/27\",\r\n \"51.120.41.192/27\",\r\n \"\ - 51.120.99.224/27\",\r\n \"51.120.107.96/27\",\r\n \"51.120.211.96/27\"\ - ,\r\n \"51.120.220.0/27\",\r\n \"51.120.225.160/27\",\r\n\ - \ \"51.137.162.192/27\",\r\n \"51.140.148.160/27\",\r\n\ - \ \"51.140.184.59/32\",\r\n \"51.140.184.61/32\",\r\n \ - \ \"51.140.184.63/32\",\r\n \"51.140.211.128/27\",\r\n \ - \ \"51.141.8.61/32\",\r\n \"51.141.8.62/32\",\r\n \ - \ \"51.141.8.64/32\",\r\n \"51.143.193.160/27\",\r\n \"\ - 52.136.49.192/27\",\r\n \"52.136.143.192/31\",\r\n \"52.137.105.46/32\"\ - ,\r\n \"52.138.90.64/27\",\r\n \"52.138.226.128/27\",\r\n\ - \ \"52.140.106.128/27\",\r\n \"52.143.139.121/32\",\r\n\ - \ \"52.143.140.12/32\",\r\n \"52.148.148.46/32\",\r\n \ - \ \"52.150.140.128/27\",\r\n \"52.161.95.12/32\",\r\n \ - \ \"52.161.107.48/32\",\r\n \"52.162.110.32/27\",\r\n \ - \ \"52.164.244.189/32\",\r\n \"52.164.245.81/32\",\r\n \ - \ \"52.165.44.224/32\",\r\n \"52.166.19.45/32\",\r\n \"\ - 52.167.106.128/27\",\r\n \"52.169.27.79/32\",\r\n \"52.169.30.175/32\"\ - ,\r\n \"52.169.235.90/32\",\r\n \"52.174.33.113/32\",\r\n\ - \ \"52.174.34.69/32\",\r\n \"52.174.35.218/32\",\r\n \ - \ \"52.174.38.99/32\",\r\n \"52.174.176.203/32\",\r\n \ - \ \"52.174.179.66/32\",\r\n \"52.174.180.164/32\",\r\n \ - \ \"52.175.218.150/32\",\r\n \"52.178.149.188/32\",\r\n \ - \ \"52.180.176.58/32\",\r\n \"52.180.177.108/32\",\r\n \ - \ \"52.180.177.206/32\",\r\n \"52.180.179.94/32\",\r\n \ - \ \"52.180.181.0/32\",\r\n \"52.180.181.239/32\",\r\n \"\ - 52.182.139.0/27\",\r\n \"52.188.222.115/32\",\r\n \"52.189.217.254/32\"\ - ,\r\n \"52.191.129.21/32\",\r\n \"52.191.166.57/32\",\r\n\ - \ \"52.225.185.38/32\",\r\n \"52.225.191.67/32\",\r\n \ - \ \"52.228.44.187/32\",\r\n \"52.228.83.192/27\",\r\n \ - \ \"52.231.19.96/27\",\r\n \"52.231.32.70/31\",\r\n \ - \ \"52.231.32.82/32\",\r\n \"52.231.147.128/27\",\r\n \"\ - 52.231.200.112/31\",\r\n \"52.231.200.126/32\",\r\n \"52.233.40.34/32\"\ - ,\r\n \"52.233.157.9/32\",\r\n \"52.233.157.78/32\",\r\n\ - \ \"52.233.161.238/32\",\r\n \"52.233.172.80/32\",\r\n \ - \ \"52.235.41.66/32\",\r\n \"52.236.186.128/26\",\r\n \ - \ \"52.237.30.175/32\",\r\n \"52.242.22.129/32\",\r\n \ - \ \"52.242.33.105/32\",\r\n \"52.246.154.224/27\",\r\n \ - \ \"52.249.60.22/32\",\r\n \"52.253.227.240/32\",\r\n \ - \ \"65.52.199.156/32\",\r\n \"65.52.199.188/32\",\r\n \"\ - 65.52.251.224/27\",\r\n \"70.37.49.163/32\",\r\n \"102.133.27.192/27\"\ - ,\r\n \"102.133.56.192/27\",\r\n \"102.133.123.64/27\",\r\ - \n \"102.133.155.192/27\",\r\n \"102.133.217.224/27\",\r\ - \n \"102.133.250.224/27\",\r\n \"104.40.69.159/32\",\r\n\ - \ \"104.40.183.25/32\",\r\n \"104.41.2.182/32\",\r\n \ - \ \"104.41.129.99/32\",\r\n \"104.43.128.78/32\",\r\n \ - \ \"104.43.131.156/32\",\r\n \"104.43.132.75/32\",\r\n \ - \ \"104.45.13.8/32\",\r\n \"104.45.82.201/32\",\r\n \"\ - 104.45.88.181/32\",\r\n \"104.46.232.208/32\",\r\n \"104.46.236.29/32\"\ - ,\r\n \"104.47.149.96/32\",\r\n \"104.208.16.128/27\",\r\ - \n \"104.208.144.128/27\",\r\n \"104.208.156.99/32\",\r\n\ - \ \"104.208.157.18/32\",\r\n \"104.210.3.254/32\",\r\n \ - \ \"104.210.115.52/32\",\r\n \"104.211.82.96/27\",\r\n \ - \ \"104.211.96.142/32\",\r\n \"104.211.96.144/31\",\r\n \ - \ \"104.211.147.96/27\",\r\n \"104.211.160.72/32\",\r\n \ - \ \"104.211.160.74/31\",\r\n \"104.211.224.117/32\",\r\n \ - \ \"104.211.224.119/32\",\r\n \"104.211.224.121/32\",\r\n\ - \ \"104.214.19.192/27\",\r\n \"104.214.65.153/32\",\r\n\ - \ \"111.221.104.48/32\",\r\n \"137.116.33.5/32\",\r\n \ - \ \"137.116.33.29/32\",\r\n \"137.116.33.71/32\",\r\n \ - \ \"137.116.37.146/32\",\r\n \"137.116.46.180/32\",\r\n \ - \ \"137.116.193.225/32\",\r\n \"137.117.45.176/32\",\r\n \ - \ \"137.117.109.143/32\",\r\n \"138.91.1.114/32\",\r\n \ - \ \"138.91.17.36/32\",\r\n \"157.55.167.71/32\",\r\n \ - \ \"157.55.210.88/32\",\r\n \"168.61.161.154/32\",\r\n \ - \ \"168.61.209.228/32\",\r\n \"168.62.4.114/32\",\r\n \"\ - 168.62.36.128/32\",\r\n \"168.62.168.27/32\",\r\n \"168.63.5.53/32\"\ - ,\r\n \"168.63.36.126/32\",\r\n \"168.63.133.23/32\",\r\n\ - \ \"168.63.208.148/32\",\r\n \"191.232.37.60/32\",\r\n \ - \ \"191.233.10.0/27\",\r\n \"191.233.76.85/32\",\r\n \ - \ \"191.233.204.96/27\",\r\n \"191.234.147.96/27\",\r\n \ - \ \"191.234.155.96/27\",\r\n \"191.235.227.192/27\",\r\n \ - \ \"191.236.37.239/32\",\r\n \"191.236.38.142/32\",\r\n \ - \ \"191.236.161.35/32\",\r\n \"191.236.163.245/32\",\r\n \ - \ \"191.236.164.44/32\",\r\n \"191.239.18.3/32\",\r\n \ - \ \"191.239.21.73/32\",\r\n \"191.239.40.217/32\",\r\n \ - \ \"191.239.64.139/32\",\r\n \"191.239.64.152/32\",\r\n \ - \ \"191.239.160.161/32\",\r\n \"191.239.160.185/32\",\r\n \ - \ \"207.46.149.75/32\",\r\n \"207.46.225.72/32\",\r\n \ - \ \"2603:1000:4::400/122\",\r\n \"2603:1000:104:1::340/122\"\ - ,\r\n \"2603:1010:6:1::340/122\",\r\n \"2603:1010:101::400/122\"\ - ,\r\n \"2603:1010:304::400/122\",\r\n \"2603:1010:404::400/122\"\ - ,\r\n \"2603:1020:5:1::340/122\",\r\n \"2603:1020:206:1::340/122\"\ - ,\r\n \"2603:1020:305::400/122\",\r\n \"2603:1020:405::400/122\"\ - ,\r\n \"2603:1020:605::400/122\",\r\n \"2603:1020:705:1::340/122\"\ - ,\r\n \"2603:1020:805:1::340/122\",\r\n \"2603:1020:905::400/122\"\ - ,\r\n \"2603:1020:a04:1::340/122\",\r\n \"2603:1020:b04::400/122\"\ - ,\r\n \"2603:1020:c04:1::340/122\",\r\n \"2603:1020:d04::400/122\"\ - ,\r\n \"2603:1020:e04:1::340/122\",\r\n \"2603:1020:f04::400/122\"\ - ,\r\n \"2603:1020:1004::340/122\",\r\n \"2603:1020:1104::300/122\"\ - ,\r\n \"2603:1030:f:1::400/122\",\r\n \"2603:1030:10:1::340/122\"\ - ,\r\n \"2603:1030:104:1::340/122\",\r\n \"2603:1030:107::300/122\"\ - ,\r\n \"2603:1030:210:1::340/122\",\r\n \"2603:1030:40b:1::340/122\"\ - ,\r\n \"2603:1030:40c:1::340/122\",\r\n \"2603:1030:504:1::340/122\"\ - ,\r\n \"2603:1030:608::400/122\",\r\n \"2603:1030:807:1::340/122\"\ - ,\r\n \"2603:1030:a07::400/122\",\r\n \"2603:1030:b04::400/122\"\ - ,\r\n \"2603:1030:c06:1::340/122\",\r\n \"2603:1030:f05:1::340/122\"\ - ,\r\n \"2603:1030:1005::400/122\",\r\n \"2603:1040:5:1::340/122\"\ - ,\r\n \"2603:1040:207::400/122\",\r\n \"2603:1040:407:1::340/122\"\ - ,\r\n \"2603:1040:606::400/122\",\r\n \"2603:1040:806::400/122\"\ - ,\r\n \"2603:1040:904:1::340/122\",\r\n \"2603:1040:a06:1::340/122\"\ - ,\r\n \"2603:1040:b04::400/122\",\r\n \"2603:1040:c06::400/122\"\ - ,\r\n \"2603:1040:d04::340/122\",\r\n \"2603:1040:f05:1::340/122\"\ - ,\r\n \"2603:1040:1002::500/122\",\r\n \"2603:1040:1104::300/122\"\ - ,\r\n \"2603:1050:6:1::340/122\",\r\n \"2603:1050:403::340/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"CognitiveServicesManagement\"\ - ,\r\n \"id\": \"CognitiveServicesManagement\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"7\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"CognitiveServicesManagement\",\r\ - \n \"addressPrefixes\": [\r\n \"13.64.73.207/32\",\r\n \ - \ \"13.65.241.39/32\",\r\n \"13.66.56.76/32\",\r\n \ - \ \"13.66.141.232/29\",\r\n \"13.66.142.0/26\",\r\n \"\ - 13.67.10.80/29\",\r\n \"13.67.10.128/26\",\r\n \"13.68.82.4/32\"\ - ,\r\n \"13.68.211.223/32\",\r\n \"13.69.67.64/28\",\r\n\ - \ \"13.69.67.128/26\",\r\n \"13.69.230.0/29\",\r\n \ - \ \"13.69.230.32/29\",\r\n \"13.70.74.88/29\",\r\n \"\ - 13.70.74.120/29\",\r\n \"13.70.127.50/32\",\r\n \"13.70.149.125/32\"\ - ,\r\n \"13.71.173.216/29\",\r\n \"13.71.173.248/29\",\r\n\ - \ \"13.71.196.136/29\",\r\n \"13.71.196.168/29\",\r\n \ - \ \"13.73.242.48/29\",\r\n \"13.73.242.128/26\",\r\n \ - \ \"13.73.249.0/27\",\r\n \"13.73.249.96/27\",\r\n \"\ - 13.73.249.128/28\",\r\n \"13.73.253.122/31\",\r\n \"13.73.254.200/29\"\ - ,\r\n \"13.73.254.208/29\",\r\n \"13.73.254.216/30\",\r\n\ - \ \"13.73.255.32/27\",\r\n \"13.74.139.192/32\",\r\n \ - \ \"13.75.39.64/29\",\r\n \"13.75.39.96/29\",\r\n \ - \ \"13.75.92.220/32\",\r\n \"13.75.137.81/32\",\r\n \"13.75.163.9/32\"\ - ,\r\n \"13.75.168.111/32\",\r\n \"13.77.55.152/29\",\r\n\ - \ \"13.77.170.155/32\",\r\n \"13.78.17.188/32\",\r\n \ - \ \"13.78.70.7/32\",\r\n \"13.78.185.44/32\",\r\n \ - \ \"13.78.187.168/32\",\r\n \"13.83.68.180/32\",\r\n \"\ - 13.84.42.205/32\",\r\n \"13.86.178.10/32\",\r\n \"13.86.184.142/32\"\ - ,\r\n \"13.86.219.128/27\",\r\n \"13.86.219.160/29\",\r\n\ - \ \"13.87.216.38/32\",\r\n \"13.88.14.63/32\",\r\n \ - \ \"13.88.26.200/32\",\r\n \"13.91.58.176/32\",\r\n \ - \ \"13.91.138.229/32\",\r\n \"13.92.179.108/32\",\r\n \"\ - 13.93.122.1/32\",\r\n \"13.94.26.39/32\",\r\n \"20.21.37.64/27\"\ - ,\r\n \"20.21.37.96/28\",\r\n \"20.21.39.0/26\",\r\n \ - \ \"20.21.39.232/29\",\r\n \"20.36.120.224/27\",\r\n \ - \ \"20.36.121.192/27\",\r\n \"20.36.121.224/28\",\r\n \ - \ \"20.36.125.128/26\",\r\n \"20.37.64.224/27\",\r\n \"\ - 20.37.65.192/27\",\r\n \"20.37.65.224/28\",\r\n \"20.37.68.36/30\"\ - ,\r\n \"20.37.70.128/26\",\r\n \"20.37.70.224/27\",\r\n\ - \ \"20.37.71.208/28\",\r\n \"20.37.76.200/30\",\r\n \ - \ \"20.37.156.204/30\",\r\n \"20.37.157.96/27\",\r\n \ - \ \"20.37.195.112/28\",\r\n \"20.37.195.192/27\",\r\n \ - \ \"20.37.196.160/27\",\r\n \"20.37.224.224/27\",\r\n \"\ - 20.37.225.192/27\",\r\n \"20.37.225.224/28\",\r\n \"20.37.229.192/26\"\ - ,\r\n \"20.38.84.108/30\",\r\n \"20.38.85.160/27\",\r\n\ - \ \"20.38.87.128/27\",\r\n \"20.38.87.160/28\",\r\n \ - \ \"20.38.136.240/28\",\r\n \"20.38.137.128/27\",\r\n \ - \ \"20.38.137.224/27\",\r\n \"20.38.141.12/30\",\r\n \ - \ \"20.38.142.128/26\",\r\n \"20.38.142.224/27\",\r\n \"\ - 20.38.143.240/28\",\r\n \"20.39.11.112/28\",\r\n \"20.39.12.0/27\"\ - ,\r\n \"20.39.12.96/27\",\r\n \"20.39.15.56/31\",\r\n \ - \ \"20.39.15.60/30\",\r\n \"20.40.24.42/32\",\r\n \ - \ \"20.40.125.208/32\",\r\n \"20.40.164.245/32\",\r\n \"\ - 20.40.170.73/32\",\r\n \"20.40.187.210/32\",\r\n \"20.40.188.109/32\"\ - ,\r\n \"20.40.190.135/32\",\r\n \"20.40.190.225/32\",\r\n\ - \ \"20.40.200.64/27\",\r\n \"20.40.200.96/28\",\r\n \ - \ \"20.40.207.152/29\",\r\n \"20.40.224.32/28\",\r\n \ - \ \"20.40.224.48/30\",\r\n \"20.40.224.56/29\",\r\n \"\ - 20.40.225.64/26\",\r\n \"20.40.225.192/26\",\r\n \"20.40.229.64/28\"\ - ,\r\n \"20.41.5.160/27\",\r\n \"20.41.65.192/27\",\r\n \ - \ \"20.41.66.160/27\",\r\n \"20.41.66.192/28\",\r\n \ - \ \"20.41.69.40/29\",\r\n \"20.41.69.56/30\",\r\n \"\ - 20.41.193.176/28\",\r\n \"20.41.193.192/27\",\r\n \"20.41.195.160/27\"\ - ,\r\n \"20.41.208.0/30\",\r\n \"20.42.4.204/30\",\r\n \ - \ \"20.42.6.144/28\",\r\n \"20.42.6.160/27\",\r\n \ - \ \"20.42.7.128/27\",\r\n \"20.42.131.240/28\",\r\n \"\ - 20.42.227.144/28\",\r\n \"20.42.227.160/27\",\r\n \"20.42.228.128/27\"\ - ,\r\n \"20.43.42.16/28\",\r\n \"20.43.42.32/27\",\r\n \ - \ \"20.43.43.0/27\",\r\n \"20.43.45.232/29\",\r\n \ - \ \"20.43.45.244/30\",\r\n \"20.43.47.0/26\",\r\n \"20.43.47.128/27\"\ - ,\r\n \"20.43.66.16/28\",\r\n \"20.43.66.32/27\",\r\n \ - \ \"20.43.67.0/27\",\r\n \"20.43.88.240/32\",\r\n \ - \ \"20.43.121.0/29\",\r\n \"20.43.121.32/29\",\r\n \"20.43.131.48/28\"\ - ,\r\n \"20.43.132.0/27\",\r\n \"20.43.132.96/27\",\r\n \ - \ \"20.44.8.160/29\",\r\n \"20.44.8.192/29\",\r\n \ - \ \"20.44.17.16/29\",\r\n \"20.44.17.48/29\",\r\n \"20.44.27.120/29\"\ - ,\r\n \"20.44.27.216/29\",\r\n \"20.45.67.213/32\",\r\n\ - \ \"20.45.112.224/27\",\r\n \"20.45.113.192/27\",\r\n \ - \ \"20.45.113.224/28\",\r\n \"20.45.116.128/26\",\r\n \ - \ \"20.45.116.240/28\",\r\n \"20.45.192.126/31\",\r\n \ - \ \"20.45.195.128/27\",\r\n \"20.45.195.224/27\",\r\n \ - \ \"20.45.196.0/28\",\r\n \"20.45.198.88/29\",\r\n \"20.45.199.36/30\"\ - ,\r\n \"20.45.232.21/32\",\r\n \"20.46.10.128/26\",\r\n\ - \ \"20.46.10.192/27\",\r\n \"20.46.11.224/28\",\r\n \ - \ \"20.47.154.170/32\",\r\n \"20.48.192.64/29\",\r\n \ - \ \"20.48.192.80/30\",\r\n \"20.48.193.64/26\",\r\n \"\ - 20.48.193.192/27\",\r\n \"20.48.196.240/28\",\r\n \"20.49.96.128/27\"\ - ,\r\n \"20.49.96.160/28\",\r\n \"20.49.102.56/29\",\r\n\ - \ \"20.49.102.192/28\",\r\n \"20.49.102.208/30\",\r\n \ - \ \"20.49.102.216/29\",\r\n \"20.49.102.224/30\",\r\n \ - \ \"20.49.103.128/26\",\r\n \"20.49.114.160/29\",\r\n \ - \ \"20.49.114.176/29\",\r\n \"20.49.114.184/30\",\r\n \ - \ \"20.49.114.224/27\",\r\n \"20.49.115.192/26\",\r\n \"\ - 20.49.118.64/27\",\r\n \"20.49.119.208/28\",\r\n \"20.49.126.136/29\"\ - ,\r\n \"20.49.126.144/29\",\r\n \"20.49.126.152/30\",\r\n\ - \ \"20.49.126.224/27\",\r\n \"20.50.1.16/28\",\r\n \ - \ \"20.50.68.126/31\",\r\n \"20.51.8.128/26\",\r\n \"\ - 20.51.8.224/27\",\r\n \"20.51.12.192/27\",\r\n \"20.51.12.224/28\"\ - ,\r\n \"20.51.16.192/26\",\r\n \"20.51.17.32/27\",\r\n \ - \ \"20.51.20.112/28\",\r\n \"20.52.64.16/29\",\r\n \ - \ \"20.52.72.48/29\",\r\n \"20.52.88.128/28\",\r\n \"\ - 20.52.135.226/32\",\r\n \"20.53.41.32/29\",\r\n \"20.53.41.40/30\"\ - ,\r\n \"20.53.41.48/28\",\r\n \"20.53.44.0/30\",\r\n \ - \ \"20.53.44.128/26\",\r\n \"20.53.44.192/27\",\r\n \ - \ \"20.53.47.80/28\",\r\n \"20.53.48.176/28\",\r\n \"\ - 20.53.56.112/28\",\r\n \"20.58.66.64/27\",\r\n \"20.58.67.32/28\"\ - ,\r\n \"20.61.96.168/29\",\r\n \"20.61.96.176/29\",\r\n\ - \ \"20.61.96.188/30\",\r\n \"20.61.97.64/27\",\r\n \ - \ \"20.61.98.64/31\",\r\n \"20.61.98.192/26\",\r\n \"\ - 20.61.99.32/27\",\r\n \"20.61.103.80/28\",\r\n \"20.62.58.0/26\"\ - ,\r\n \"20.62.59.96/28\",\r\n \"20.62.128.144/30\",\r\n\ - \ \"20.62.129.64/26\",\r\n \"20.62.129.160/27\",\r\n \ - \ \"20.62.134.80/28\",\r\n \"20.65.130.0/26\",\r\n \ - \ \"20.65.130.128/26\",\r\n \"20.65.133.96/28\",\r\n \"\ - 20.66.2.64/26\",\r\n \"20.66.2.160/27\",\r\n \"20.66.4.240/28\"\ - ,\r\n \"20.69.0.240/28\",\r\n \"20.72.20.64/27\",\r\n \ - \ \"20.72.20.128/26\",\r\n \"20.72.21.8/29\",\r\n \ - \ \"20.99.11.16/28\",\r\n \"20.99.11.104/29\",\r\n \"20.150.161.160/27\"\ - ,\r\n \"20.150.164.128/27\",\r\n \"20.150.164.160/28\",\r\ - \n \"20.150.167.64/26\",\r\n \"20.150.174.136/29\",\r\n\ - \ \"20.150.241.80/29\",\r\n \"20.150.244.48/28\",\r\n \ - \ \"20.150.244.128/27\",\r\n \"20.184.58.62/32\",\r\n \ - \ \"20.184.240.78/32\",\r\n \"20.184.241.66/32\",\r\n \ - \ \"20.184.241.238/32\",\r\n \"20.184.242.113/32\",\r\n \ - \ \"20.184.242.115/32\",\r\n \"20.184.242.189/32\",\r\n \ - \ \"20.185.105.28/32\",\r\n \"20.187.195.152/29\",\r\n \ - \ \"20.187.196.192/30\",\r\n \"20.187.197.64/26\",\r\n \ - \ \"20.187.197.160/27\",\r\n \"20.189.108.64/27\",\r\n \ - \ \"20.189.109.32/27\",\r\n \"20.189.109.64/28\",\r\n \"\ - 20.189.111.200/30\",\r\n \"20.189.111.208/28\",\r\n \"20.189.225.0/26\"\ - ,\r\n \"20.189.225.96/27\",\r\n \"20.189.228.144/28\",\r\ - \n \"20.191.160.8/29\",\r\n \"20.191.160.20/30\",\r\n \ - \ \"20.191.160.96/28\",\r\n \"20.191.160.112/30\",\r\n \ - \ \"20.191.161.128/26\",\r\n \"20.191.161.224/27\",\r\n \ - \ \"20.191.166.96/28\",\r\n \"20.192.44.96/28\",\r\n \ - \ \"20.192.48.192/28\",\r\n \"20.192.50.80/28\",\r\n \ - \ \"20.192.50.208/29\",\r\n \"20.192.80.32/28\",\r\n \"\ - 20.192.161.144/28\",\r\n \"20.192.161.160/27\",\r\n \"20.192.164.128/27\"\ - ,\r\n \"20.192.167.64/26\",\r\n \"20.192.184.84/30\",\r\n\ - \ \"20.192.225.208/28\",\r\n \"20.192.225.224/27\",\r\n\ - \ \"20.192.228.192/27\",\r\n \"20.192.231.128/26\",\r\n\ - \ \"20.193.194.0/28\",\r\n \"20.193.194.48/29\",\r\n \ - \ \"20.193.194.64/28\",\r\n \"20.194.72.64/26\",\r\n \ - \ \"20.194.72.192/27\",\r\n \"20.194.74.64/28\",\r\n \ - \ \"20.195.65.240/29\",\r\n \"20.195.72.240/28\",\r\n \"\ - 20.195.146.80/28\",\r\n \"23.96.13.121/32\",\r\n \"23.96.229.148/32\"\ - ,\r\n \"23.98.107.28/30\",\r\n \"23.98.107.200/29\",\r\n\ - \ \"23.98.107.208/28\",\r\n \"23.98.108.36/30\",\r\n \ - \ \"23.98.108.40/31\",\r\n \"23.98.108.192/26\",\r\n \ - \ \"23.98.109.32/29\",\r\n \"23.100.0.32/32\",\r\n \"\ - 23.100.57.171/32\",\r\n \"23.100.59.49/32\",\r\n \"40.64.128.192/27\"\ - ,\r\n \"40.64.134.140/30\",\r\n \"40.64.134.168/29\",\r\n\ - \ \"40.64.134.176/28\",\r\n \"40.64.135.80/29\",\r\n \ - \ \"40.67.48.224/27\",\r\n \"40.67.49.192/27\",\r\n \ - \ \"40.67.49.224/28\",\r\n \"40.67.52.128/26\",\r\n \"\ - 40.67.53.160/28\",\r\n \"40.69.73.194/32\",\r\n \"40.69.104.32/30\"\ - ,\r\n \"40.69.111.36/30\",\r\n \"40.70.47.165/32\",\r\n\ - \ \"40.70.241.203/32\",\r\n \"40.74.30.108/30\",\r\n \ - \ \"40.74.31.64/26\",\r\n \"40.74.64.203/32\",\r\n \ - \ \"40.78.20.224/32\",\r\n \"40.78.204.0/29\",\r\n \"40.78.204.32/29\"\ - ,\r\n \"40.79.132.48/29\",\r\n \"40.79.132.80/29\",\r\n\ - \ \"40.79.156.64/27\",\r\n \"40.79.176.32/30\",\r\n \ - \ \"40.79.187.168/29\",\r\n \"40.79.187.200/29\",\r\n \ - \ \"40.80.57.208/28\",\r\n \"40.80.57.224/27\",\r\n \"\ - 40.80.58.192/27\",\r\n \"40.80.63.152/30\",\r\n \"40.80.63.224/28\"\ - ,\r\n \"40.80.63.240/30\",\r\n \"40.80.169.192/27\",\r\n\ - \ \"40.80.170.160/27\",\r\n \"40.80.170.192/28\",\r\n \ - \ \"40.80.172.28/30\",\r\n \"40.80.176.0/28\",\r\n \ - \ \"40.80.188.112/28\",\r\n \"40.80.190.128/27\",\r\n \ - \ \"40.80.190.224/27\",\r\n \"40.82.253.200/30\",\r\n \"\ - 40.82.253.208/28\",\r\n \"40.82.255.0/26\",\r\n \"40.82.255.96/27\"\ - ,\r\n \"40.85.230.100/32\",\r\n \"40.86.227.247/32\",\r\n\ - \ \"40.87.48.184/32\",\r\n \"40.88.22.25/32\",\r\n \ - \ \"40.89.17.240/28\",\r\n \"40.89.18.128/27\",\r\n \ - \ \"40.89.18.224/27\",\r\n \"40.89.23.36/30\",\r\n \"40.89.133.209/32\"\ - ,\r\n \"40.89.134.214/32\",\r\n \"40.90.138.4/32\",\r\n\ - \ \"40.90.139.2/32\",\r\n \"40.90.139.36/32\",\r\n \ - \ \"40.90.139.163/32\",\r\n \"40.90.141.99/32\",\r\n \ - \ \"40.112.254.71/32\",\r\n \"40.113.124.208/32\",\r\n \ - \ \"40.113.226.173/32\",\r\n \"40.115.248.103/32\",\r\n \ - \ \"40.117.154.42/32\",\r\n \"40.117.232.90/32\",\r\n \"\ - 40.119.2.134/32\",\r\n \"40.119.11.216/29\",\r\n \"40.120.8.48/30\"\ - ,\r\n \"40.121.217.232/32\",\r\n \"40.122.42.111/32\",\r\ - \n \"40.123.205.29/32\",\r\n \"40.123.210.248/32\",\r\n\ - \ \"40.123.214.182/32\",\r\n \"40.123.214.251/32\",\r\n\ - \ \"40.123.218.49/32\",\r\n \"40.127.76.4/32\",\r\n \ - \ \"40.127.76.10/32\",\r\n \"40.127.165.113/32\",\r\n \ - \ \"51.11.97.80/29\",\r\n \"51.12.17.32/28\",\r\n \"\ - 51.12.17.136/29\",\r\n \"51.12.17.144/28\",\r\n \"51.12.25.32/28\"\ - ,\r\n \"51.12.25.208/29\",\r\n \"51.12.41.48/28\",\r\n \ - \ \"51.12.41.128/27\",\r\n \"51.12.41.224/27\",\r\n \ - \ \"51.12.43.192/26\",\r\n \"51.12.46.240/28\",\r\n \ - \ \"51.12.193.48/28\",\r\n \"51.12.193.128/27\",\r\n \"\ - 51.12.193.224/27\",\r\n \"51.12.195.128/26\",\r\n \"51.13.1.0/29\"\ - ,\r\n \"51.13.128.72/29\",\r\n \"51.13.136.64/26\",\r\n\ - \ \"51.13.137.192/28\",\r\n \"51.13.137.224/27\",\r\n \ - \ \"51.13.144.174/32\",\r\n \"51.103.144.46/32\",\r\n \ - \ \"51.104.25.240/28\",\r\n \"51.104.27.64/27\",\r\n \ - \ \"51.104.28.32/27\",\r\n \"51.104.31.160/29\",\r\n \"\ - 51.104.31.168/30\",\r\n \"51.104.31.176/28\",\r\n \"51.105.67.176/29\"\ - ,\r\n \"51.105.67.208/29\",\r\n \"51.105.80.224/27\",\r\n\ - \ \"51.105.81.192/27\",\r\n \"51.105.81.224/28\",\r\n \ - \ \"51.105.89.128/27\",\r\n \"51.105.89.224/27\",\r\n \ - \ \"51.105.90.0/28\",\r\n \"51.105.92.52/30\",\r\n \ - \ \"51.105.170.64/32\",\r\n \"51.107.48.240/28\",\r\n \"\ - 51.107.49.128/27\",\r\n \"51.107.49.224/27\",\r\n \"51.107.52.216/29\"\ - ,\r\n \"51.107.53.36/30\",\r\n \"51.107.53.40/29\",\r\n\ - \ \"51.107.84.104/32\",\r\n \"51.107.85.61/32\",\r\n \ - \ \"51.107.128.24/29\",\r\n \"51.107.144.224/27\",\r\n \ - \ \"51.107.145.192/27\",\r\n \"51.107.145.224/28\",\r\n \ - \ \"51.107.148.20/30\",\r\n \"51.107.148.64/28\",\r\n \ - \ \"51.107.192.72/29\",\r\n \"51.107.224.189/32\",\r\n \ - \ \"51.107.224.209/32\",\r\n \"51.107.241.0/26\",\r\n \ - \ \"51.107.241.128/27\",\r\n \"51.107.242.224/28\",\r\n \ - \ \"51.107.249.0/26\",\r\n \"51.107.249.128/27\",\r\n \"\ - 51.107.250.240/28\",\r\n \"51.116.48.144/28\",\r\n \"51.116.48.160/27\"\ - ,\r\n \"51.116.49.0/27\",\r\n \"51.116.51.192/26\",\r\n\ - \ \"51.116.54.176/28\",\r\n \"51.116.55.64/28\",\r\n \ - \ \"51.116.144.144/28\",\r\n \"51.116.144.160/27\",\r\n \ - \ \"51.116.145.0/27\",\r\n \"51.116.148.128/26\",\r\n \ - \ \"51.116.149.208/28\",\r\n \"51.116.211.6/32\",\r\n \ - \ \"51.120.40.240/28\",\r\n \"51.120.41.128/27\",\r\n \ - \ \"51.120.41.224/27\",\r\n \"51.120.78.154/32\",\r\n \"\ - 51.120.109.192/29\",\r\n \"51.120.224.224/27\",\r\n \"51.120.225.192/27\"\ - ,\r\n \"51.120.225.224/28\",\r\n \"51.120.232.64/26\",\r\ - \n \"51.120.233.144/28\",\r\n \"51.120.233.160/27\",\r\n\ - \ \"51.120.237.0/29\",\r\n \"51.124.95.46/32\",\r\n \ - \ \"51.124.140.143/32\",\r\n \"51.137.162.128/27\",\r\n \ - \ \"51.137.162.224/27\",\r\n \"51.137.163.0/28\",\r\n \ - \ \"51.137.166.28/30\",\r\n \"51.137.166.44/30\",\r\n \ - \ \"51.137.166.48/28\",\r\n \"51.137.167.192/26\",\r\n \ - \ \"51.138.40.194/32\",\r\n \"51.138.41.75/32\",\r\n \"\ - 51.138.160.4/30\",\r\n \"51.138.210.144/28\",\r\n \"51.140.5.56/32\"\ - ,\r\n \"51.140.105.165/32\",\r\n \"51.140.202.0/32\",\r\n\ - \ \"51.143.192.224/27\",\r\n \"51.143.193.192/27\",\r\n\ - \ \"51.143.193.224/28\",\r\n \"51.143.208.128/30\",\r\n\ - \ \"51.143.209.0/26\",\r\n \"51.143.209.64/27\",\r\n \ - \ \"51.143.212.160/28\",\r\n \"51.144.83.210/32\",\r\n \ - \ \"52.136.48.240/28\",\r\n \"52.136.49.128/27\",\r\n \ - \ \"52.136.49.224/27\",\r\n \"52.136.53.0/26\",\r\n \"\ - 52.136.184.128/26\",\r\n \"52.136.184.192/27\",\r\n \"52.136.185.160/28\"\ - ,\r\n \"52.138.41.171/32\",\r\n \"52.138.92.172/30\",\r\n\ - \ \"52.139.106.0/26\",\r\n \"52.139.106.128/27\",\r\n \ - \ \"52.139.107.192/28\",\r\n \"52.140.105.192/27\",\r\n \ - \ \"52.140.106.160/27\",\r\n \"52.140.106.192/28\",\r\n \ - \ \"52.140.110.96/29\",\r\n \"52.140.110.104/30\",\r\n \ - \ \"52.140.110.112/28\",\r\n \"52.140.110.160/30\",\r\n \ - \ \"52.140.111.128/26\",\r\n \"52.140.111.224/27\",\r\n \ - \ \"52.142.81.236/32\",\r\n \"52.142.83.87/32\",\r\n \ - \ \"52.142.84.66/32\",\r\n \"52.142.85.51/32\",\r\n \"\ - 52.143.91.192/28\",\r\n \"52.146.79.144/28\",\r\n \"52.146.79.224/27\"\ - ,\r\n \"52.146.131.32/28\",\r\n \"52.146.131.48/30\",\r\n\ - \ \"52.146.131.96/27\",\r\n \"52.146.132.128/26\",\r\n \ - \ \"52.146.133.0/27\",\r\n \"52.146.137.16/28\",\r\n \ - \ \"52.147.43.145/32\",\r\n \"52.147.44.12/32\",\r\n \ - \ \"52.147.97.4/30\",\r\n \"52.147.112.0/26\",\r\n \"\ - 52.147.112.64/27\",\r\n \"52.147.112.208/28\",\r\n \"52.149.31.64/28\"\ - ,\r\n \"52.150.139.192/27\",\r\n \"52.150.140.160/27\",\r\ - \n \"52.150.140.192/28\",\r\n \"52.150.154.200/29\",\r\n\ - \ \"52.150.154.208/28\",\r\n \"52.150.156.32/30\",\r\n \ - \ \"52.150.156.40/30\",\r\n \"52.150.157.64/26\",\r\n \ - \ \"52.150.157.128/27\",\r\n \"52.151.39.177/32\",\r\n \ - \ \"52.152.207.160/28\",\r\n \"52.152.207.192/28\",\r\n \ - \ \"52.155.218.251/32\",\r\n \"52.156.93.240/28\",\r\n \ - \ \"52.156.103.64/27\",\r\n \"52.156.103.96/28\",\r\n \ - \ \"52.161.16.73/32\",\r\n \"52.162.110.248/29\",\r\n \ - \ \"52.162.111.24/29\",\r\n \"52.163.56.146/32\",\r\n \"\ - 52.168.112.0/26\",\r\n \"52.171.134.140/32\",\r\n \"52.172.112.0/28\"\ - ,\r\n \"52.172.112.16/29\",\r\n \"52.172.112.192/26\",\r\ - \n \"52.172.113.32/27\",\r\n \"52.172.116.16/28\",\r\n \ - \ \"52.172.187.21/32\",\r\n \"52.173.240.242/32\",\r\n \ - \ \"52.174.60.141/32\",\r\n \"52.174.146.221/32\",\r\n \ - \ \"52.175.18.186/32\",\r\n \"52.175.35.166/32\",\r\n \ - \ \"52.179.13.227/32\",\r\n \"52.179.14.109/32\",\r\n \ - \ \"52.179.113.96/27\",\r\n \"52.179.113.128/28\",\r\n \ - \ \"52.180.162.194/32\",\r\n \"52.180.166.172/32\",\r\n \ - \ \"52.180.178.146/32\",\r\n \"52.180.179.119/32\",\r\n \ - \ \"52.183.33.203/32\",\r\n \"52.186.33.48/28\",\r\n \"\ - 52.186.91.216/32\",\r\n \"52.187.20.181/32\",\r\n \"52.187.39.99/32\"\ - ,\r\n \"52.190.33.56/32\",\r\n \"52.190.33.61/32\",\r\n\ - \ \"52.190.33.154/32\",\r\n \"52.191.160.229/32\",\r\n \ - \ \"52.191.173.81/32\",\r\n \"52.224.200.129/32\",\r\n \ - \ \"52.228.83.128/27\",\r\n \"52.228.83.224/27\",\r\n \ - \ \"52.228.84.0/28\",\r\n \"52.229.16.14/32\",\r\n \ - \ \"52.231.74.63/32\",\r\n \"52.231.79.142/32\",\r\n \"\ - 52.231.148.200/30\",\r\n \"52.231.159.35/32\",\r\n \"52.233.163.218/32\"\ - ,\r\n \"52.237.137.4/32\",\r\n \"52.249.207.163/32\",\r\n\ - \ \"52.254.75.76/32\",\r\n \"52.255.83.208/28\",\r\n \ - \ \"52.255.84.176/28\",\r\n \"52.255.84.192/28\",\r\n \ - \ \"52.255.124.16/28\",\r\n \"52.255.124.80/28\",\r\n \ - \ \"52.255.124.96/28\",\r\n \"65.52.205.19/32\",\r\n \"\ - 65.52.252.208/28\",\r\n \"102.37.81.64/28\",\r\n \"102.37.160.144/28\"\ - ,\r\n \"102.133.28.72/29\",\r\n \"102.133.28.104/29\",\r\ - \n \"102.133.56.144/28\",\r\n \"102.133.56.224/27\",\r\n\ - \ \"102.133.61.192/26\",\r\n \"102.133.75.174/32\",\r\n\ - \ \"102.133.123.248/29\",\r\n \"102.133.124.24/29\",\r\n\ - \ \"102.133.124.88/29\",\r\n \"102.133.124.96/29\",\r\n\ - \ \"102.133.156.128/29\",\r\n \"102.133.161.242/32\",\r\n\ - \ \"102.133.162.109/32\",\r\n \"102.133.162.196/32\",\r\n\ - \ \"102.133.162.221/32\",\r\n \"102.133.163.185/32\",\r\n\ - \ \"102.133.217.80/28\",\r\n \"102.133.217.96/27\",\r\n\ - \ \"102.133.218.0/27\",\r\n \"102.133.220.192/30\",\r\n\ - \ \"102.133.221.64/26\",\r\n \"102.133.221.128/27\",\r\n\ - \ \"102.133.236.198/32\",\r\n \"104.42.100.80/32\",\r\n\ - \ \"104.42.194.173/32\",\r\n \"104.42.239.93/32\",\r\n \ - \ \"104.44.89.44/32\",\r\n \"104.46.112.239/32\",\r\n \ - \ \"104.46.176.164/30\",\r\n \"104.46.176.176/28\",\r\n \ - \ \"104.46.178.4/30\",\r\n \"104.46.178.192/26\",\r\n \ - \ \"104.46.179.0/27\",\r\n \"104.46.183.128/28\",\r\n \ - \ \"104.46.239.137/32\",\r\n \"104.211.88.173/32\",\r\n \ - \ \"104.211.222.193/32\",\r\n \"104.214.49.162/32\",\r\n \ - \ \"104.214.233.86/32\",\r\n \"104.215.9.217/32\",\r\n \ - \ \"137.117.70.195/32\",\r\n \"137.135.45.32/32\",\r\n \ - \ \"137.135.64.59/32\",\r\n \"168.61.158.107/32\",\r\n \ - \ \"168.61.165.229/32\",\r\n \"168.63.20.177/32\",\r\n \"\ - 191.232.39.30/32\",\r\n \"191.232.162.204/32\",\r\n \"191.233.10.48/28\"\ - ,\r\n \"191.233.10.64/27\",\r\n \"191.233.10.128/27\",\r\ - \n \"191.233.15.64/26\",\r\n \"191.233.205.72/29\",\r\n\ - \ \"191.233.205.104/29\",\r\n \"191.234.138.136/29\",\r\n\ - \ \"191.234.138.148/30\",\r\n \"191.234.139.192/26\",\r\n\ - \ \"191.234.142.32/27\",\r\n \"191.235.227.128/27\",\r\n\ - \ \"191.235.227.224/27\",\r\n \"191.235.228.0/28\",\r\n\ - \ \"191.238.72.80/28\",\r\n \"2603:1000:4::680/122\",\r\n\ - \ \"2603:1000:104::180/122\",\r\n \"2603:1000:104::380/122\"\ - ,\r\n \"2603:1000:104:1::640/122\",\r\n \"2603:1010:6::80/122\"\ - ,\r\n \"2603:1010:6:1::640/122\",\r\n \"2603:1010:101::680/122\"\ - ,\r\n \"2603:1010:304::680/122\",\r\n \"2603:1010:404::680/122\"\ - ,\r\n \"2603:1020:5::80/122\",\r\n \"2603:1020:5:1::640/122\"\ - ,\r\n \"2603:1020:206::80/122\",\r\n \"2603:1020:206:1::640/122\"\ - ,\r\n \"2603:1020:305::680/122\",\r\n \"2603:1020:405::680/122\"\ - ,\r\n \"2603:1020:605::680/122\",\r\n \"2603:1020:705::80/122\"\ - ,\r\n \"2603:1020:705:1::640/122\",\r\n \"2603:1020:805::80/122\"\ - ,\r\n \"2603:1020:805:1::640/122\",\r\n \"2603:1020:905::680/122\"\ - ,\r\n \"2603:1020:a04::80/122\",\r\n \"2603:1020:a04::698/125\"\ - ,\r\n \"2603:1020:a04:1::640/122\",\r\n \"2603:1020:a04:2::680/121\"\ - ,\r\n \"2603:1020:b04::680/122\",\r\n \"2603:1020:c04::80/122\"\ - ,\r\n \"2603:1020:c04:1::640/122\",\r\n \"2603:1020:d04::680/122\"\ - ,\r\n \"2603:1020:e04::80/122\",\r\n \"2603:1020:e04::358/125\"\ - ,\r\n \"2603:1020:e04:1::640/122\",\r\n \"2603:1020:e04:2::/122\"\ - ,\r\n \"2603:1020:e04:3::280/122\",\r\n \"2603:1020:f04::680/122\"\ - ,\r\n \"2603:1020:f04:2::/122\",\r\n \"2603:1020:1004::640/122\"\ - ,\r\n \"2603:1020:1004:1::80/122\",\r\n \"2603:1020:1004:1::1f0/125\"\ - ,\r\n \"2603:1020:1004:1::300/122\",\r\n \"2603:1020:1004:1::740/122\"\ - ,\r\n \"2603:1020:1104::700/121\",\r\n \"2603:1020:1104:1::150/125\"\ - ,\r\n \"2603:1020:1104:1::480/122\",\r\n \"2603:1030:f:1::2b8/125\"\ - ,\r\n \"2603:1030:f:1::680/122\",\r\n \"2603:1030:f:2::600/121\"\ - ,\r\n \"2603:1030:10::80/122\",\r\n \"2603:1030:10:1::640/122\"\ - ,\r\n \"2603:1030:104::80/122\",\r\n \"2603:1030:104::6c8/125\"\ - ,\r\n \"2603:1030:104:1::640/122\",\r\n \"2603:1030:107::730/125\"\ - ,\r\n \"2603:1030:107::740/122\",\r\n \"2603:1030:107::780/122\"\ - ,\r\n \"2603:1030:210::80/122\",\r\n \"2603:1030:210:1::640/122\"\ - ,\r\n \"2603:1030:40b:1::640/122\",\r\n \"2603:1030:40c::80/122\"\ - ,\r\n \"2603:1030:40c:1::640/122\",\r\n \"2603:1030:504::80/122\"\ - ,\r\n \"2603:1030:504::1f0/125\",\r\n \"2603:1030:504::300/122\"\ - ,\r\n \"2603:1030:504:1::640/122\",\r\n \"2603:1030:504:2::200/122\"\ - ,\r\n \"2603:1030:608::680/122\",\r\n \"2603:1030:807::80/122\"\ - ,\r\n \"2603:1030:807:1::640/122\",\r\n \"2603:1030:a07::680/122\"\ - ,\r\n \"2603:1030:b04::680/122\",\r\n \"2603:1030:c06:1::640/122\"\ - ,\r\n \"2603:1030:f05::80/122\",\r\n \"2603:1030:f05:1::640/122\"\ - ,\r\n \"2603:1030:1005::680/122\",\r\n \"2603:1040:5::180/122\"\ - ,\r\n \"2603:1040:5:1::640/122\",\r\n \"2603:1040:207::680/122\"\ - ,\r\n \"2603:1040:207:1::468/125\",\r\n \"2603:1040:207:2::40/122\"\ - ,\r\n \"2603:1040:207:2::200/122\",\r\n \"2603:1040:407::80/122\"\ - ,\r\n \"2603:1040:407:1::640/122\",\r\n \"2603:1040:606::680/122\"\ - ,\r\n \"2603:1040:806::680/122\",\r\n \"2603:1040:904::80/122\"\ - ,\r\n \"2603:1040:904:1::640/122\",\r\n \"2603:1040:a06::180/122\"\ - ,\r\n \"2603:1040:a06::7c8/125\",\r\n \"2603:1040:a06:1::640/122\"\ - ,\r\n \"2603:1040:a06:2::380/121\",\r\n \"2603:1040:b04::680/122\"\ - ,\r\n \"2603:1040:c06::680/122\",\r\n \"2603:1040:d04::640/122\"\ - ,\r\n \"2603:1040:d04:1::80/122\",\r\n \"2603:1040:d04:1::1f0/125\"\ - ,\r\n \"2603:1040:d04:1::300/122\",\r\n \"2603:1040:d04:1::740/122\"\ - ,\r\n \"2603:1040:f05::80/122\",\r\n \"2603:1040:f05::358/125\"\ - ,\r\n \"2603:1040:f05:1::640/122\",\r\n \"2603:1040:f05:2::80/121\"\ - ,\r\n \"2603:1040:1002:1::478/125\",\r\n \"2603:1040:1002:1::480/121\"\ - ,\r\n \"2603:1040:1002:1::500/122\",\r\n \"2603:1040:1104::700/121\"\ - ,\r\n \"2603:1040:1104:1::150/125\",\r\n \"2603:1040:1104:1::500/122\"\ - ,\r\n \"2603:1050:6::80/122\",\r\n \"2603:1050:6:1::640/122\"\ - ,\r\n \"2603:1050:403::640/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"DataFactory\",\r\n \"id\": \"DataFactory\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"5\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.66.143.128/28\",\r\n \"13.67.10.208/28\",\r\ - \n \"13.69.67.192/28\",\r\n \"13.69.107.112/28\",\r\n \ - \ \"13.69.112.128/28\",\r\n \"13.69.230.96/28\",\r\n \ - \ \"13.70.74.144/28\",\r\n \"13.71.175.80/28\",\r\n \ - \ \"13.71.199.0/28\",\r\n \"13.73.244.32/28\",\r\n \"13.73.253.96/29\"\ - ,\r\n \"13.74.108.224/28\",\r\n \"13.75.39.112/28\",\r\n\ - \ \"13.77.53.160/28\",\r\n \"13.78.109.192/28\",\r\n \ - \ \"13.86.219.208/28\",\r\n \"13.89.174.192/28\",\r\n \ - \ \"13.104.248.64/27\",\r\n \"13.104.252.208/28\",\r\n \ - \ \"13.104.252.224/28\",\r\n \"13.104.253.48/28\",\r\n \ - \ \"13.104.254.128/28\",\r\n \"20.21.46.64/28\",\r\n \"\ - 20.21.48.0/23\",\r\n \"20.21.67.208/28\",\r\n \"20.21.75.208/28\"\ - ,\r\n \"20.36.117.208/28\",\r\n \"20.36.124.32/28\",\r\n\ - \ \"20.36.124.128/25\",\r\n \"20.36.125.0/26\",\r\n \ - \ \"20.37.68.144/28\",\r\n \"20.37.69.128/25\",\r\n \ - \ \"20.37.70.0/26\",\r\n \"20.37.154.0/23\",\r\n \"20.37.156.0/26\"\ - ,\r\n \"20.37.193.0/25\",\r\n \"20.37.193.128/26\",\r\n\ - \ \"20.37.198.224/29\",\r\n \"20.37.228.16/28\",\r\n \ - \ \"20.37.228.192/26\",\r\n \"20.37.229.0/25\",\r\n \ - \ \"20.38.80.192/26\",\r\n \"20.38.82.0/23\",\r\n \"20.38.141.16/28\"\ - ,\r\n \"20.38.141.128/25\",\r\n \"20.38.142.0/26\",\r\n\ - \ \"20.38.147.224/28\",\r\n \"20.38.152.0/28\",\r\n \ - \ \"20.39.8.96/27\",\r\n \"20.39.8.128/26\",\r\n \"\ - 20.39.15.0/29\",\r\n \"20.40.206.224/29\",\r\n \"20.41.2.0/23\"\ - ,\r\n \"20.41.4.0/26\",\r\n \"20.41.64.128/25\",\r\n \ - \ \"20.41.65.0/26\",\r\n \"20.41.69.8/29\",\r\n \"\ - 20.41.192.128/25\",\r\n \"20.41.193.0/26\",\r\n \"20.41.197.112/29\"\ - ,\r\n \"20.41.198.0/25\",\r\n \"20.41.198.128/26\",\r\n\ - \ \"20.42.2.0/23\",\r\n \"20.42.4.0/26\",\r\n \"\ - 20.42.64.0/28\",\r\n \"20.42.129.64/26\",\r\n \"20.42.132.0/23\"\ - ,\r\n \"20.42.225.0/25\",\r\n \"20.42.225.128/26\",\r\n\ - \ \"20.42.230.136/29\",\r\n \"20.43.40.128/25\",\r\n \ - \ \"20.43.41.0/26\",\r\n \"20.43.44.208/29\",\r\n \ - \ \"20.43.64.128/25\",\r\n \"20.43.65.0/26\",\r\n \"20.43.70.120/29\"\ - ,\r\n \"20.43.121.48/28\",\r\n \"20.43.128.128/25\",\r\n\ - \ \"20.43.130.0/26\",\r\n \"20.44.10.64/28\",\r\n \ - \ \"20.44.17.80/28\",\r\n \"20.44.27.240/28\",\r\n \"\ - 20.45.123.160/28\",\r\n \"20.45.208.16/28\",\r\n \"20.48.201.0/26\"\ - ,\r\n \"20.49.83.224/28\",\r\n \"20.49.95.32/28\",\r\n \ - \ \"20.49.102.16/29\",\r\n \"20.49.111.0/29\",\r\n \ - \ \"20.49.114.24/29\",\r\n \"20.49.118.128/25\",\r\n \ - \ \"20.50.68.56/29\",\r\n \"20.52.64.0/28\",\r\n \"20.52.93.128/26\"\ - ,\r\n \"20.53.0.48/28\",\r\n \"20.53.45.0/24\",\r\n \ - \ \"20.53.46.0/26\",\r\n \"20.58.71.0/26\",\r\n \"\ - 20.65.130.192/26\",\r\n \"20.65.131.0/24\",\r\n \"20.72.22.0/23\"\ - ,\r\n \"20.72.28.48/28\",\r\n \"20.90.129.128/25\",\r\n\ - \ \"20.90.130.0/24\",\r\n \"20.99.12.0/23\",\r\n \ - \ \"20.100.0.192/26\",\r\n \"20.150.162.0/23\",\r\n \"\ - 20.150.173.16/28\",\r\n \"20.150.181.112/28\",\r\n \"20.150.190.64/28\"\ - ,\r\n \"20.189.104.128/25\",\r\n \"20.189.106.0/26\",\r\n\ - \ \"20.189.109.232/29\",\r\n \"20.189.192.192/26\",\r\n\ - \ \"20.191.164.0/24\",\r\n \"20.191.165.0/26\",\r\n \ - \ \"20.192.42.0/24\",\r\n \"20.192.43.0/26\",\r\n \"\ - 20.192.102.80/28\",\r\n \"20.192.152.0/26\",\r\n \"20.192.162.0/23\"\ - ,\r\n \"20.192.184.96/28\",\r\n \"20.192.226.0/23\",\r\n\ - \ \"20.192.238.96/28\",\r\n \"20.193.205.144/28\",\r\n \ - \ \"20.194.67.192/28\",\r\n \"20.194.78.0/23\",\r\n \ - \ \"20.195.64.0/25\",\r\n \"20.200.195.0/26\",\r\n \"\ - 20.205.64.0/23\",\r\n \"20.205.67.128/26\",\r\n \"20.205.77.160/28\"\ - ,\r\n \"20.205.77.224/27\",\r\n \"20.205.83.240/28\",\r\n\ - \ \"20.208.2.0/23\",\r\n \"20.208.19.208/28\",\r\n \ - \ \"23.98.83.112/28\",\r\n \"23.98.106.128/29\",\r\n \ - \ \"23.98.109.64/26\",\r\n \"23.98.109.128/25\",\r\n \"\ - 40.64.132.232/29\",\r\n \"40.69.108.160/28\",\r\n \"40.69.111.48/28\"\ - ,\r\n \"40.70.148.160/28\",\r\n \"40.71.14.32/28\",\r\n\ - \ \"40.74.24.192/26\",\r\n \"40.74.26.0/23\",\r\n \ - \ \"40.74.149.64/28\",\r\n \"40.75.35.144/28\",\r\n \"\ - 40.78.196.128/28\",\r\n \"40.78.229.96/28\",\r\n \"40.78.236.176/28\"\ - ,\r\n \"40.78.245.16/28\",\r\n \"40.78.251.192/28\",\r\n\ - \ \"40.79.132.112/28\",\r\n \"40.79.139.80/28\",\r\n \ - \ \"40.79.146.240/28\",\r\n \"40.79.163.80/28\",\r\n \ - \ \"40.79.171.160/28\",\r\n \"40.79.187.208/28\",\r\n \ - \ \"40.79.195.224/28\",\r\n \"40.80.51.160/28\",\r\n \"\ - 40.80.56.128/25\",\r\n \"40.80.57.0/26\",\r\n \"40.80.62.24/29\"\ - ,\r\n \"40.80.168.128/25\",\r\n \"40.80.169.0/26\",\r\n\ - \ \"40.80.172.112/29\",\r\n \"40.80.176.96/28\",\r\n \ - \ \"40.80.185.0/24\",\r\n \"40.80.186.0/25\",\r\n \ - \ \"40.82.249.64/26\",\r\n \"40.82.250.0/23\",\r\n \"40.89.16.128/25\"\ - ,\r\n \"40.89.17.0/26\",\r\n \"40.89.20.224/29\",\r\n \ - \ \"40.113.176.232/29\",\r\n \"40.119.9.0/25\",\r\n \ - \ \"40.119.9.128/26\",\r\n \"40.120.8.56/29\",\r\n \"\ - 40.120.64.112/28\",\r\n \"40.120.75.112/28\",\r\n \"40.120.86.64/26\"\ - ,\r\n \"40.122.0.16/28\",\r\n \"51.12.18.0/23\",\r\n \ - \ \"51.12.26.0/23\",\r\n \"51.12.101.176/28\",\r\n \ - \ \"51.12.206.16/28\",\r\n \"51.12.229.64/28\",\r\n \"\ - 51.12.237.64/28\",\r\n \"51.13.128.0/28\",\r\n \"51.103.203.208/28\"\ - ,\r\n \"51.104.9.32/28\",\r\n \"51.104.24.128/25\",\r\n\ - \ \"51.104.25.0/26\",\r\n \"51.104.29.216/29\",\r\n \ - \ \"51.105.67.240/28\",\r\n \"51.105.75.240/28\",\r\n \ - \ \"51.105.92.176/28\",\r\n \"51.105.93.64/26\",\r\n \ - \ \"51.105.93.128/25\",\r\n \"51.107.51.40/29\",\r\n \"\ - 51.107.52.0/25\",\r\n \"51.107.52.128/26\",\r\n \"51.107.128.0/28\"\ - ,\r\n \"51.107.148.80/28\",\r\n \"51.107.149.0/25\",\r\n\ - \ \"51.107.149.128/26\",\r\n \"51.107.192.80/28\",\r\n \ - \ \"51.107.246.192/26\",\r\n \"51.116.147.32/28\",\r\n \ - \ \"51.116.147.64/26\",\r\n \"51.116.147.128/25\",\r\n \ - \ \"51.116.245.112/28\",\r\n \"51.116.245.176/28\",\r\n \ - \ \"51.116.253.48/28\",\r\n \"51.116.253.144/28\",\r\n \ - \ \"51.120.44.208/28\",\r\n \"51.120.45.64/26\",\r\n \ - \ \"51.120.45.128/25\",\r\n \"51.120.100.224/28\",\r\n \ - \ \"51.120.109.96/28\",\r\n \"51.120.213.32/28\",\r\n \"\ - 51.120.228.224/27\",\r\n \"51.120.229.64/26\",\r\n \"51.120.229.128/25\"\ - ,\r\n \"51.120.238.0/23\",\r\n \"51.137.160.128/25\",\r\n\ - \ \"51.137.161.0/26\",\r\n \"51.137.164.192/29\",\r\n \ - \ \"51.138.160.16/28\",\r\n \"51.138.215.128/26\",\r\n \ - \ \"51.140.212.112/28\",\r\n \"52.138.92.128/28\",\r\n \ - \ \"52.138.229.32/28\",\r\n \"52.139.111.64/26\",\r\n \ - \ \"52.140.104.128/25\",\r\n \"52.140.105.0/26\",\r\n \ - \ \"52.140.108.208/29\",\r\n \"52.150.136.192/26\",\r\n \ - \ \"52.150.137.128/25\",\r\n \"52.150.154.16/29\",\r\n \ - \ \"52.150.155.0/24\",\r\n \"52.150.157.160/29\",\r\n \"\ - 52.150.157.192/26\",\r\n \"52.162.111.48/28\",\r\n \"52.167.107.224/28\"\ - ,\r\n \"52.176.232.16/28\",\r\n \"52.182.141.16/28\",\r\n\ - \ \"52.228.80.128/25\",\r\n \"52.228.81.0/26\",\r\n \ - \ \"52.228.86.144/29\",\r\n \"52.231.20.64/28\",\r\n \ - \ \"52.231.148.160/28\",\r\n \"52.231.151.32/28\",\r\n \ - \ \"52.236.187.112/28\",\r\n \"52.246.155.224/28\",\r\n \ - \ \"52.250.228.0/29\",\r\n \"102.37.64.96/28\",\r\n \"\ - 102.37.72.224/28\",\r\n \"102.37.166.128/26\",\r\n \"102.133.60.48/28\"\ - ,\r\n \"102.133.60.192/26\",\r\n \"102.133.61.0/25\",\r\n\ - \ \"102.133.124.104/29\",\r\n \"102.133.127.160/28\",\r\n\ - \ \"102.133.156.136/29\",\r\n \"102.133.216.128/25\",\r\n\ - \ \"102.133.217.0/26\",\r\n \"102.133.218.248/29\",\r\n\ - \ \"102.133.251.184/29\",\r\n \"102.133.253.48/28\",\r\n\ - \ \"104.46.179.64/26\",\r\n \"104.46.182.0/24\",\r\n \ - \ \"191.233.12.0/23\",\r\n \"191.233.54.224/28\",\r\n \ - \ \"191.233.205.160/28\",\r\n \"191.234.137.32/29\",\r\n \ - \ \"191.234.142.64/26\",\r\n \"191.234.143.0/24\",\r\n \ - \ \"191.234.149.0/28\",\r\n \"191.234.157.0/28\",\r\n \ - \ \"191.235.224.128/25\",\r\n \"191.235.225.0/26\",\r\n \ - \ \"2603:1000:4::440/122\",\r\n \"2603:1000:4::500/121\",\r\n \ - \ \"2603:1000:4:402::330/124\",\r\n \"2603:1000:104::/121\"\ - ,\r\n \"2603:1000:104::80/122\",\r\n \"2603:1000:104::1c0/122\"\ - ,\r\n \"2603:1000:104::280/121\",\r\n \"2603:1000:104:1::480/121\"\ - ,\r\n \"2603:1000:104:1::500/122\",\r\n \"2603:1000:104:1::700/121\"\ - ,\r\n \"2603:1000:104:1::780/122\",\r\n \"2603:1000:104:402::330/124\"\ - ,\r\n \"2603:1000:104:802::210/124\",\r\n \"2603:1000:104:c02::210/124\"\ - ,\r\n \"2603:1010:6:1::480/121\",\r\n \"2603:1010:6:1::500/122\"\ - ,\r\n \"2603:1010:6:1::700/121\",\r\n \"2603:1010:6:1::780/122\"\ - ,\r\n \"2603:1010:6:402::330/124\",\r\n \"2603:1010:6:802::210/124\"\ - ,\r\n \"2603:1010:6:c02::210/124\",\r\n \"2603:1010:101::440/122\"\ - ,\r\n \"2603:1010:101::500/121\",\r\n \"2603:1010:101:402::330/124\"\ - ,\r\n \"2603:1010:304::440/122\",\r\n \"2603:1010:304::500/121\"\ - ,\r\n \"2603:1010:304:402::330/124\",\r\n \"2603:1010:404::440/122\"\ - ,\r\n \"2603:1010:404::500/121\",\r\n \"2603:1010:404:402::330/124\"\ - ,\r\n \"2603:1020:5:1::480/121\",\r\n \"2603:1020:5:1::500/122\"\ - ,\r\n \"2603:1020:5:1::700/121\",\r\n \"2603:1020:5:1::780/122\"\ - ,\r\n \"2603:1020:5:402::330/124\",\r\n \"2603:1020:5:802::210/124\"\ - ,\r\n \"2603:1020:5:c02::210/124\",\r\n \"2603:1020:206:1::480/121\"\ - ,\r\n \"2603:1020:206:1::500/122\",\r\n \"2603:1020:206:1::700/121\"\ - ,\r\n \"2603:1020:206:1::780/122\",\r\n \"2603:1020:206:402::330/124\"\ - ,\r\n \"2603:1020:206:802::210/124\",\r\n \"2603:1020:206:c02::210/124\"\ - ,\r\n \"2603:1020:305::440/122\",\r\n \"2603:1020:305::500/121\"\ - ,\r\n \"2603:1020:305:402::330/124\",\r\n \"2603:1020:405::440/122\"\ - ,\r\n \"2603:1020:405::500/121\",\r\n \"2603:1020:405:402::330/124\"\ - ,\r\n \"2603:1020:605::440/122\",\r\n \"2603:1020:605::500/121\"\ - ,\r\n \"2603:1020:605:402::330/124\",\r\n \"2603:1020:705:1::480/121\"\ - ,\r\n \"2603:1020:705:1::500/122\",\r\n \"2603:1020:705:1::700/121\"\ - ,\r\n \"2603:1020:705:1::780/122\",\r\n \"2603:1020:705:402::330/124\"\ - ,\r\n \"2603:1020:705:802::210/124\",\r\n \"2603:1020:705:c02::210/124\"\ - ,\r\n \"2603:1020:805:1::480/121\",\r\n \"2603:1020:805:1::500/122\"\ - ,\r\n \"2603:1020:805:1::700/121\",\r\n \"2603:1020:805:1::780/122\"\ - ,\r\n \"2603:1020:805:402::330/124\",\r\n \"2603:1020:805:802::210/124\"\ - ,\r\n \"2603:1020:805:c02::210/124\",\r\n \"2603:1020:905::440/122\"\ - ,\r\n \"2603:1020:905::500/121\",\r\n \"2603:1020:905:402::330/124\"\ - ,\r\n \"2603:1020:a04:1::480/121\",\r\n \"2603:1020:a04:1::500/122\"\ - ,\r\n \"2603:1020:a04:1::700/121\",\r\n \"2603:1020:a04:1::780/122\"\ - ,\r\n \"2603:1020:a04:402::330/124\",\r\n \"2603:1020:a04:802::210/124\"\ - ,\r\n \"2603:1020:a04:c02::210/124\",\r\n \"2603:1020:b04::440/122\"\ - ,\r\n \"2603:1020:b04::500/121\",\r\n \"2603:1020:b04:402::330/124\"\ - ,\r\n \"2603:1020:c04:1::480/121\",\r\n \"2603:1020:c04:1::500/122\"\ - ,\r\n \"2603:1020:c04:1::700/121\",\r\n \"2603:1020:c04:1::780/122\"\ - ,\r\n \"2603:1020:c04:402::330/124\",\r\n \"2603:1020:c04:802::210/124\"\ - ,\r\n \"2603:1020:c04:c02::210/124\",\r\n \"2603:1020:d04::440/122\"\ - ,\r\n \"2603:1020:d04::500/121\",\r\n \"2603:1020:d04:402::330/124\"\ - ,\r\n \"2603:1020:e04:1::480/121\",\r\n \"2603:1020:e04:1::500/122\"\ - ,\r\n \"2603:1020:e04:1::700/121\",\r\n \"2603:1020:e04:1::780/122\"\ - ,\r\n \"2603:1020:e04:402::330/124\",\r\n \"2603:1020:e04:802::210/124\"\ - ,\r\n \"2603:1020:e04:c02::210/124\",\r\n \"2603:1020:f04::440/122\"\ - ,\r\n \"2603:1020:f04::500/121\",\r\n \"2603:1020:f04:402::330/124\"\ - ,\r\n \"2603:1020:1004::480/121\",\r\n \"2603:1020:1004::500/122\"\ - ,\r\n \"2603:1020:1004::700/121\",\r\n \"2603:1020:1004::780/122\"\ - ,\r\n \"2603:1020:1004:400::240/124\",\r\n \"2603:1020:1004:800::340/124\"\ - ,\r\n \"2603:1020:1004:c02::380/124\",\r\n \"2603:1020:1104::600/121\"\ - ,\r\n \"2603:1020:1104:400::500/124\",\r\n \"2603:1030:f:1::440/122\"\ - ,\r\n \"2603:1030:f:1::500/121\",\r\n \"2603:1030:f:400::b30/124\"\ - ,\r\n \"2603:1030:10:1::480/121\",\r\n \"2603:1030:10:1::500/122\"\ - ,\r\n \"2603:1030:10:1::700/121\",\r\n \"2603:1030:10:1::780/122\"\ - ,\r\n \"2603:1030:10:402::330/124\",\r\n \"2603:1030:10:802::210/124\"\ - ,\r\n \"2603:1030:10:c02::210/124\",\r\n \"2603:1030:104:1::480/121\"\ - ,\r\n \"2603:1030:104:1::500/122\",\r\n \"2603:1030:104:1::700/121\"\ - ,\r\n \"2603:1030:104:1::780/122\",\r\n \"2603:1030:104:402::330/124\"\ - ,\r\n \"2603:1030:104:802::40/124\",\r\n \"2603:1030:107::600/121\"\ - ,\r\n \"2603:1030:107:400::380/124\",\r\n \"2603:1030:210:1::480/121\"\ - ,\r\n \"2603:1030:210:1::500/122\",\r\n \"2603:1030:210:1::700/121\"\ - ,\r\n \"2603:1030:210:1::780/122\",\r\n \"2603:1030:210:402::330/124\"\ - ,\r\n \"2603:1030:210:802::210/124\",\r\n \"2603:1030:210:c02::210/124\"\ - ,\r\n \"2603:1030:40b:1::480/121\",\r\n \"2603:1030:40b:1::500/122\"\ - ,\r\n \"2603:1030:40b:400::b30/124\",\r\n \"2603:1030:40b:800::210/124\"\ - ,\r\n \"2603:1030:40b:c00::210/124\",\r\n \"2603:1030:40c:1::480/121\"\ - ,\r\n \"2603:1030:40c:1::500/122\",\r\n \"2603:1030:40c:1::700/121\"\ - ,\r\n \"2603:1030:40c:1::780/122\",\r\n \"2603:1030:40c:402::330/124\"\ - ,\r\n \"2603:1030:40c:802::210/124\",\r\n \"2603:1030:40c:c02::210/124\"\ - ,\r\n \"2603:1030:504:1::480/121\",\r\n \"2603:1030:504:1::500/122\"\ - ,\r\n \"2603:1030:504:1::700/121\",\r\n \"2603:1030:504:1::780/122\"\ - ,\r\n \"2603:1030:504:402::240/124\",\r\n \"2603:1030:504:802::340/124\"\ - ,\r\n \"2603:1030:504:c02::380/124\",\r\n \"2603:1030:608::440/122\"\ - ,\r\n \"2603:1030:608::500/121\",\r\n \"2603:1030:608:402::330/124\"\ - ,\r\n \"2603:1030:807:1::480/121\",\r\n \"2603:1030:807:1::500/122\"\ - ,\r\n \"2603:1030:807:1::700/121\",\r\n \"2603:1030:807:1::780/122\"\ - ,\r\n \"2603:1030:807:402::330/124\",\r\n \"2603:1030:807:802::210/124\"\ - ,\r\n \"2603:1030:807:c02::210/124\",\r\n \"2603:1030:a07::440/122\"\ - ,\r\n \"2603:1030:a07::500/121\",\r\n \"2603:1030:a07:402::9b0/124\"\ - ,\r\n \"2603:1030:b04::440/122\",\r\n \"2603:1030:b04::500/121\"\ - ,\r\n \"2603:1030:b04:402::330/124\",\r\n \"2603:1030:c06:1::480/121\"\ - ,\r\n \"2603:1030:c06:1::500/122\",\r\n \"2603:1030:c06:400::b30/124\"\ - ,\r\n \"2603:1030:c06:802::210/124\",\r\n \"2603:1030:c06:c02::210/124\"\ - ,\r\n \"2603:1030:f05:1::480/121\",\r\n \"2603:1030:f05:1::500/122\"\ - ,\r\n \"2603:1030:f05:1::700/121\",\r\n \"2603:1030:f05:1::780/122\"\ - ,\r\n \"2603:1030:f05:402::330/124\",\r\n \"2603:1030:f05:802::210/124\"\ - ,\r\n \"2603:1030:f05:c02::210/124\",\r\n \"2603:1030:1005::440/122\"\ - ,\r\n \"2603:1030:1005::500/121\",\r\n \"2603:1030:1005:402::330/124\"\ - ,\r\n \"2603:1040:5::/121\",\r\n \"2603:1040:5::80/122\"\ - ,\r\n \"2603:1040:5:1::480/121\",\r\n \"2603:1040:5:1::500/122\"\ - ,\r\n \"2603:1040:5:1::700/121\",\r\n \"2603:1040:5:1::780/122\"\ - ,\r\n \"2603:1040:5:402::330/124\",\r\n \"2603:1040:5:802::210/124\"\ - ,\r\n \"2603:1040:5:c02::210/124\",\r\n \"2603:1040:207::440/122\"\ - ,\r\n \"2603:1040:207::500/121\",\r\n \"2603:1040:207:402::330/124\"\ - ,\r\n \"2603:1040:207:800::70/124\",\r\n \"2603:1040:207:c00::70/124\"\ - ,\r\n \"2603:1040:407:1::480/121\",\r\n \"2603:1040:407:1::500/122\"\ - ,\r\n \"2603:1040:407:1::700/121\",\r\n \"2603:1040:407:1::780/122\"\ - ,\r\n \"2603:1040:407:402::330/124\",\r\n \"2603:1040:407:802::210/124\"\ - ,\r\n \"2603:1040:407:c02::210/124\",\r\n \"2603:1040:606::440/122\"\ - ,\r\n \"2603:1040:606::500/121\",\r\n \"2603:1040:606:402::330/124\"\ - ,\r\n \"2603:1040:806::440/122\",\r\n \"2603:1040:806::500/121\"\ - ,\r\n \"2603:1040:806:402::330/124\",\r\n \"2603:1040:904:1::480/121\"\ - ,\r\n \"2603:1040:904:1::500/122\",\r\n \"2603:1040:904:1::700/121\"\ - ,\r\n \"2603:1040:904:1::780/122\",\r\n \"2603:1040:904:402::330/124\"\ - ,\r\n \"2603:1040:904:802::210/124\",\r\n \"2603:1040:904:c02::210/124\"\ - ,\r\n \"2603:1040:a06::/121\",\r\n \"2603:1040:a06::80/122\"\ - ,\r\n \"2603:1040:a06:1::480/121\",\r\n \"2603:1040:a06:1::500/122\"\ - ,\r\n \"2603:1040:a06:1::700/121\",\r\n \"2603:1040:a06:1::780/122\"\ - ,\r\n \"2603:1040:a06:402::330/124\",\r\n \"2603:1040:a06:802::210/124\"\ - ,\r\n \"2603:1040:a06:c02::210/124\",\r\n \"2603:1040:b04::440/122\"\ - ,\r\n \"2603:1040:b04::500/121\",\r\n \"2603:1040:b04:402::330/124\"\ - ,\r\n \"2603:1040:c06::440/122\",\r\n \"2603:1040:c06::500/121\"\ - ,\r\n \"2603:1040:c06:402::330/124\",\r\n \"2603:1040:d04::480/121\"\ - ,\r\n \"2603:1040:d04::500/122\",\r\n \"2603:1040:d04::700/121\"\ - ,\r\n \"2603:1040:d04::780/122\",\r\n \"2603:1040:d04:400::240/124\"\ - ,\r\n \"2603:1040:d04:800::340/124\",\r\n \"2603:1040:d04:c02::380/124\"\ - ,\r\n \"2603:1040:f05:1::480/121\",\r\n \"2603:1040:f05:1::500/122\"\ - ,\r\n \"2603:1040:f05:1::700/121\",\r\n \"2603:1040:f05:1::780/122\"\ - ,\r\n \"2603:1040:f05:402::330/124\",\r\n \"2603:1040:f05:802::210/124\"\ - ,\r\n \"2603:1040:f05:c02::210/124\",\r\n \"2603:1040:1002:1::380/121\"\ - ,\r\n \"2603:1040:1002:400::230/124\",\r\n \"2603:1040:1002:800::70/124\"\ - ,\r\n \"2603:1040:1002:c00::70/124\",\r\n \"2603:1040:1104::600/121\"\ - ,\r\n \"2603:1040:1104:400::500/124\",\r\n \"2603:1050:6:1::480/121\"\ - ,\r\n \"2603:1050:6:1::500/122\",\r\n \"2603:1050:6:1::700/121\"\ - ,\r\n \"2603:1050:6:1::780/122\",\r\n \"2603:1050:6:402::330/124\"\ - ,\r\n \"2603:1050:6:802::210/124\",\r\n \"2603:1050:6:c02::210/124\"\ - ,\r\n \"2603:1050:403::480/121\",\r\n \"2603:1050:403::500/122\"\ - ,\r\n \"2603:1050:403:400::240/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"DataFactoryManagement\",\r\n \"\ - id\": \"DataFactoryManagement\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"DataFactory\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.143.128/28\",\r\n\ - \ \"13.67.10.208/28\",\r\n \"13.69.67.192/28\",\r\n \ - \ \"13.69.107.112/28\",\r\n \"13.69.112.128/28\",\r\n \ - \ \"13.69.230.96/28\",\r\n \"13.70.74.144/28\",\r\n \"\ - 13.71.175.80/28\",\r\n \"13.71.199.0/28\",\r\n \"13.73.244.32/28\"\ - ,\r\n \"13.73.253.96/29\",\r\n \"13.74.108.224/28\",\r\n\ - \ \"13.75.39.112/28\",\r\n \"13.77.53.160/28\",\r\n \ - \ \"13.78.109.192/28\",\r\n \"13.86.219.208/28\",\r\n \ - \ \"13.89.174.192/28\",\r\n \"13.104.248.64/27\",\r\n \ - \ \"13.104.252.208/28\",\r\n \"13.104.252.224/28\",\r\n \ - \ \"13.104.253.48/28\",\r\n \"13.104.254.128/28\",\r\n \ - \ \"20.21.46.64/28\",\r\n \"20.21.67.208/28\",\r\n \"20.21.75.208/28\"\ - ,\r\n \"20.36.117.208/28\",\r\n \"20.36.124.32/28\",\r\n\ - \ \"20.37.68.144/28\",\r\n \"20.37.198.224/29\",\r\n \ - \ \"20.37.228.16/28\",\r\n \"20.38.141.16/28\",\r\n \ - \ \"20.38.147.224/28\",\r\n \"20.38.152.0/28\",\r\n \"\ - 20.39.15.0/29\",\r\n \"20.40.206.224/29\",\r\n \"20.41.69.8/29\"\ - ,\r\n \"20.41.197.112/29\",\r\n \"20.42.64.0/28\",\r\n \ - \ \"20.42.230.136/29\",\r\n \"20.43.44.208/29\",\r\n \ - \ \"20.43.70.120/29\",\r\n \"20.43.121.48/28\",\r\n \ - \ \"20.44.10.64/28\",\r\n \"20.44.17.80/28\",\r\n \"20.44.27.240/28\"\ - ,\r\n \"20.45.123.160/28\",\r\n \"20.45.208.16/28\",\r\n\ - \ \"20.49.83.224/28\",\r\n \"20.49.95.32/28\",\r\n \ - \ \"20.49.102.16/29\",\r\n \"20.49.111.0/29\",\r\n \"\ - 20.49.114.24/29\",\r\n \"20.50.68.56/29\",\r\n \"20.52.64.0/28\"\ - ,\r\n \"20.53.0.48/28\",\r\n \"20.72.28.48/28\",\r\n \ - \ \"20.150.173.16/28\",\r\n \"20.150.181.112/28\",\r\n \ - \ \"20.150.190.64/28\",\r\n \"20.189.109.232/29\",\r\n \ - \ \"20.192.102.80/28\",\r\n \"20.192.184.96/28\",\r\n \ - \ \"20.192.238.96/28\",\r\n \"20.193.205.144/28\",\r\n \ - \ \"20.194.67.192/28\",\r\n \"20.205.77.160/28\",\r\n \"\ - 20.205.77.224/27\",\r\n \"20.205.83.240/28\",\r\n \"20.208.19.208/28\"\ - ,\r\n \"23.98.83.112/28\",\r\n \"23.98.106.128/29\",\r\n\ - \ \"40.64.132.232/29\",\r\n \"40.69.108.160/28\",\r\n \ - \ \"40.69.111.48/28\",\r\n \"40.70.148.160/28\",\r\n \ - \ \"40.71.14.32/28\",\r\n \"40.74.149.64/28\",\r\n \"\ - 40.75.35.144/28\",\r\n \"40.78.196.128/28\",\r\n \"40.78.229.96/28\"\ - ,\r\n \"40.78.236.176/28\",\r\n \"40.78.245.16/28\",\r\n\ - \ \"40.78.251.192/28\",\r\n \"40.79.132.112/28\",\r\n \ - \ \"40.79.139.80/28\",\r\n \"40.79.146.240/28\",\r\n \ - \ \"40.79.163.80/28\",\r\n \"40.79.171.160/28\",\r\n \ - \ \"40.79.187.208/28\",\r\n \"40.79.195.224/28\",\r\n \"\ - 40.80.51.160/28\",\r\n \"40.80.62.24/29\",\r\n \"40.80.172.112/29\"\ - ,\r\n \"40.80.176.96/28\",\r\n \"40.89.20.224/29\",\r\n\ - \ \"40.113.176.232/29\",\r\n \"40.120.8.56/29\",\r\n \ - \ \"40.120.64.112/28\",\r\n \"40.120.75.112/28\",\r\n \ - \ \"40.122.0.16/28\",\r\n \"51.12.101.176/28\",\r\n \ - \ \"51.12.206.16/28\",\r\n \"51.12.229.64/28\",\r\n \"51.12.237.64/28\"\ - ,\r\n \"51.13.128.0/28\",\r\n \"51.103.203.208/28\",\r\n\ - \ \"51.104.9.32/28\",\r\n \"51.104.29.216/29\",\r\n \ - \ \"51.105.67.240/28\",\r\n \"51.105.75.240/28\",\r\n \ - \ \"51.105.92.176/28\",\r\n \"51.107.51.40/29\",\r\n \ - \ \"51.107.128.0/28\",\r\n \"51.107.148.80/28\",\r\n \"\ - 51.107.192.80/28\",\r\n \"51.116.147.32/28\",\r\n \"51.116.245.112/28\"\ - ,\r\n \"51.116.245.176/28\",\r\n \"51.116.253.48/28\",\r\ - \n \"51.116.253.144/28\",\r\n \"51.120.44.208/28\",\r\n\ - \ \"51.120.100.224/28\",\r\n \"51.120.109.96/28\",\r\n \ - \ \"51.120.213.32/28\",\r\n \"51.120.228.224/27\",\r\n \ - \ \"51.137.164.192/29\",\r\n \"51.138.160.16/28\",\r\n \ - \ \"51.140.212.112/28\",\r\n \"52.138.92.128/28\",\r\n \ - \ \"52.138.229.32/28\",\r\n \"52.140.108.208/29\",\r\n \ - \ \"52.150.154.16/29\",\r\n \"52.162.111.48/28\",\r\n \ - \ \"52.167.107.224/28\",\r\n \"52.176.232.16/28\",\r\n \ - \ \"52.182.141.16/28\",\r\n \"52.228.86.144/29\",\r\n \"\ - 52.231.20.64/28\",\r\n \"52.231.148.160/28\",\r\n \"52.231.151.32/28\"\ - ,\r\n \"52.236.187.112/28\",\r\n \"52.246.155.224/28\",\r\ - \n \"52.250.228.0/29\",\r\n \"102.37.64.96/28\",\r\n \ - \ \"102.37.72.224/28\",\r\n \"102.133.60.48/28\",\r\n \ - \ \"102.133.124.104/29\",\r\n \"102.133.127.160/28\",\r\n \ - \ \"102.133.156.136/29\",\r\n \"102.133.218.248/29\",\r\n \ - \ \"102.133.251.184/29\",\r\n \"102.133.253.48/28\",\r\n\ - \ \"191.233.54.224/28\",\r\n \"191.233.205.160/28\",\r\n\ - \ \"191.234.137.32/29\",\r\n \"191.234.149.0/28\",\r\n \ - \ \"191.234.157.0/28\",\r\n \"2603:1000:4::440/122\",\r\n\ - \ \"2603:1000:4:402::330/124\",\r\n \"2603:1000:104::80/122\"\ - ,\r\n \"2603:1000:104::1c0/122\",\r\n \"2603:1000:104:1::500/122\"\ - ,\r\n \"2603:1000:104:1::780/122\",\r\n \"2603:1000:104:402::330/124\"\ - ,\r\n \"2603:1000:104:802::210/124\",\r\n \"2603:1000:104:c02::210/124\"\ - ,\r\n \"2603:1010:6:1::500/122\",\r\n \"2603:1010:6:1::780/122\"\ - ,\r\n \"2603:1010:6:402::330/124\",\r\n \"2603:1010:6:802::210/124\"\ - ,\r\n \"2603:1010:6:c02::210/124\",\r\n \"2603:1010:101::440/122\"\ - ,\r\n \"2603:1010:101:402::330/124\",\r\n \"2603:1010:304::440/122\"\ - ,\r\n \"2603:1010:304:402::330/124\",\r\n \"2603:1010:404::440/122\"\ - ,\r\n \"2603:1010:404:402::330/124\",\r\n \"2603:1020:5:1::500/122\"\ - ,\r\n \"2603:1020:5:1::780/122\",\r\n \"2603:1020:5:402::330/124\"\ - ,\r\n \"2603:1020:5:802::210/124\",\r\n \"2603:1020:5:c02::210/124\"\ - ,\r\n \"2603:1020:206:1::500/122\",\r\n \"2603:1020:206:1::780/122\"\ - ,\r\n \"2603:1020:206:402::330/124\",\r\n \"2603:1020:206:802::210/124\"\ - ,\r\n \"2603:1020:206:c02::210/124\",\r\n \"2603:1020:305::440/122\"\ - ,\r\n \"2603:1020:305:402::330/124\",\r\n \"2603:1020:405::440/122\"\ - ,\r\n \"2603:1020:405:402::330/124\",\r\n \"2603:1020:605::440/122\"\ - ,\r\n \"2603:1020:605:402::330/124\",\r\n \"2603:1020:705:1::500/122\"\ - ,\r\n \"2603:1020:705:1::780/122\",\r\n \"2603:1020:705:402::330/124\"\ - ,\r\n \"2603:1020:705:802::210/124\",\r\n \"2603:1020:705:c02::210/124\"\ - ,\r\n \"2603:1020:805:1::500/122\",\r\n \"2603:1020:805:1::780/122\"\ - ,\r\n \"2603:1020:805:402::330/124\",\r\n \"2603:1020:805:802::210/124\"\ - ,\r\n \"2603:1020:805:c02::210/124\",\r\n \"2603:1020:905::440/122\"\ - ,\r\n \"2603:1020:905:402::330/124\",\r\n \"2603:1020:a04:1::500/122\"\ - ,\r\n \"2603:1020:a04:1::780/122\",\r\n \"2603:1020:a04:402::330/124\"\ - ,\r\n \"2603:1020:a04:802::210/124\",\r\n \"2603:1020:a04:c02::210/124\"\ - ,\r\n \"2603:1020:b04::440/122\",\r\n \"2603:1020:b04:402::330/124\"\ - ,\r\n \"2603:1020:c04:1::500/122\",\r\n \"2603:1020:c04:1::780/122\"\ - ,\r\n \"2603:1020:c04:402::330/124\",\r\n \"2603:1020:c04:802::210/124\"\ - ,\r\n \"2603:1020:c04:c02::210/124\",\r\n \"2603:1020:d04::440/122\"\ - ,\r\n \"2603:1020:d04:402::330/124\",\r\n \"2603:1020:e04:1::500/122\"\ - ,\r\n \"2603:1020:e04:1::780/122\",\r\n \"2603:1020:e04:402::330/124\"\ - ,\r\n \"2603:1020:e04:802::210/124\",\r\n \"2603:1020:e04:c02::210/124\"\ - ,\r\n \"2603:1020:f04::440/122\",\r\n \"2603:1020:f04:402::330/124\"\ - ,\r\n \"2603:1020:1004::500/122\",\r\n \"2603:1020:1004::780/122\"\ - ,\r\n \"2603:1020:1004:400::240/124\",\r\n \"2603:1020:1004:800::340/124\"\ - ,\r\n \"2603:1020:1004:c02::380/124\",\r\n \"2603:1020:1104:400::500/124\"\ - ,\r\n \"2603:1030:f:1::440/122\",\r\n \"2603:1030:f:400::b30/124\"\ - ,\r\n \"2603:1030:10:1::500/122\",\r\n \"2603:1030:10:1::780/122\"\ - ,\r\n \"2603:1030:10:402::330/124\",\r\n \"2603:1030:10:802::210/124\"\ - ,\r\n \"2603:1030:10:c02::210/124\",\r\n \"2603:1030:104:1::500/122\"\ - ,\r\n \"2603:1030:104:1::780/122\",\r\n \"2603:1030:104:402::330/124\"\ - ,\r\n \"2603:1030:104:802::40/124\",\r\n \"2603:1030:107:400::380/124\"\ - ,\r\n \"2603:1030:210:1::500/122\",\r\n \"2603:1030:210:1::780/122\"\ - ,\r\n \"2603:1030:210:402::330/124\",\r\n \"2603:1030:210:802::210/124\"\ - ,\r\n \"2603:1030:210:c02::210/124\",\r\n \"2603:1030:40b:1::500/122\"\ - ,\r\n \"2603:1030:40b:400::b30/124\",\r\n \"2603:1030:40b:800::210/124\"\ - ,\r\n \"2603:1030:40b:c00::210/124\",\r\n \"2603:1030:40c:1::500/122\"\ - ,\r\n \"2603:1030:40c:1::780/122\",\r\n \"2603:1030:40c:402::330/124\"\ - ,\r\n \"2603:1030:40c:802::210/124\",\r\n \"2603:1030:40c:c02::210/124\"\ - ,\r\n \"2603:1030:504:1::500/122\",\r\n \"2603:1030:504:1::780/122\"\ - ,\r\n \"2603:1030:504:402::240/124\",\r\n \"2603:1030:504:802::340/124\"\ - ,\r\n \"2603:1030:504:c02::380/124\",\r\n \"2603:1030:608::440/122\"\ - ,\r\n \"2603:1030:608:402::330/124\",\r\n \"2603:1030:807:1::500/122\"\ - ,\r\n \"2603:1030:807:1::780/122\",\r\n \"2603:1030:807:402::330/124\"\ - ,\r\n \"2603:1030:807:802::210/124\",\r\n \"2603:1030:807:c02::210/124\"\ - ,\r\n \"2603:1030:a07::440/122\",\r\n \"2603:1030:a07:402::9b0/124\"\ - ,\r\n \"2603:1030:b04::440/122\",\r\n \"2603:1030:b04:402::330/124\"\ - ,\r\n \"2603:1030:c06:1::500/122\",\r\n \"2603:1030:c06:400::b30/124\"\ - ,\r\n \"2603:1030:c06:802::210/124\",\r\n \"2603:1030:c06:c02::210/124\"\ - ,\r\n \"2603:1030:f05:1::500/122\",\r\n \"2603:1030:f05:1::780/122\"\ - ,\r\n \"2603:1030:f05:402::330/124\",\r\n \"2603:1030:f05:802::210/124\"\ - ,\r\n \"2603:1030:f05:c02::210/124\",\r\n \"2603:1030:1005::440/122\"\ - ,\r\n \"2603:1030:1005:402::330/124\",\r\n \"2603:1040:5::80/122\"\ - ,\r\n \"2603:1040:5:1::500/122\",\r\n \"2603:1040:5:1::780/122\"\ - ,\r\n \"2603:1040:5:402::330/124\",\r\n \"2603:1040:5:802::210/124\"\ - ,\r\n \"2603:1040:5:c02::210/124\",\r\n \"2603:1040:207::440/122\"\ - ,\r\n \"2603:1040:207:402::330/124\",\r\n \"2603:1040:207:800::70/124\"\ - ,\r\n \"2603:1040:207:c00::70/124\",\r\n \"2603:1040:407:1::500/122\"\ - ,\r\n \"2603:1040:407:1::780/122\",\r\n \"2603:1040:407:402::330/124\"\ - ,\r\n \"2603:1040:407:802::210/124\",\r\n \"2603:1040:407:c02::210/124\"\ - ,\r\n \"2603:1040:606::440/122\",\r\n \"2603:1040:606:402::330/124\"\ - ,\r\n \"2603:1040:806::440/122\",\r\n \"2603:1040:806:402::330/124\"\ - ,\r\n \"2603:1040:904:1::500/122\",\r\n \"2603:1040:904:1::780/122\"\ - ,\r\n \"2603:1040:904:402::330/124\",\r\n \"2603:1040:904:802::210/124\"\ - ,\r\n \"2603:1040:904:c02::210/124\",\r\n \"2603:1040:a06::80/122\"\ - ,\r\n \"2603:1040:a06:1::500/122\",\r\n \"2603:1040:a06:1::780/122\"\ - ,\r\n \"2603:1040:a06:402::330/124\",\r\n \"2603:1040:a06:802::210/124\"\ - ,\r\n \"2603:1040:a06:c02::210/124\",\r\n \"2603:1040:b04::440/122\"\ - ,\r\n \"2603:1040:b04:402::330/124\",\r\n \"2603:1040:c06::440/122\"\ - ,\r\n \"2603:1040:c06:402::330/124\",\r\n \"2603:1040:d04::500/122\"\ - ,\r\n \"2603:1040:d04::780/122\",\r\n \"2603:1040:d04:400::240/124\"\ - ,\r\n \"2603:1040:d04:800::340/124\",\r\n \"2603:1040:d04:c02::380/124\"\ - ,\r\n \"2603:1040:f05:1::500/122\",\r\n \"2603:1040:f05:1::780/122\"\ - ,\r\n \"2603:1040:f05:402::330/124\",\r\n \"2603:1040:f05:802::210/124\"\ - ,\r\n \"2603:1040:f05:c02::210/124\",\r\n \"2603:1040:1002:400::230/124\"\ - ,\r\n \"2603:1040:1002:800::70/124\",\r\n \"2603:1040:1002:c00::70/124\"\ - ,\r\n \"2603:1040:1104:400::500/124\",\r\n \"2603:1050:6:1::500/122\"\ - ,\r\n \"2603:1050:6:1::780/122\",\r\n \"2603:1050:6:402::330/124\"\ - ,\r\n \"2603:1050:6:802::210/124\",\r\n \"2603:1050:6:c02::210/124\"\ - ,\r\n \"2603:1050:403::500/122\",\r\n \"2603:1050:403:400::240/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.138.128/25\",\r\n\ - \ \"13.69.226.128/25\",\r\n \"13.71.171.0/24\",\r\n \ - \ \"13.74.106.128/25\",\r\n \"13.75.35.0/24\",\r\n \ - \ \"13.77.51.0/24\",\r\n \"13.78.107.0/24\",\r\n \"40.78.242.0/25\"\ - ,\r\n \"40.79.138.192/26\",\r\n \"40.120.64.224/27\",\r\n\ - \ \"51.107.129.64/27\",\r\n \"51.140.147.0/24\",\r\n \ - \ \"65.52.252.128/27\",\r\n \"102.133.251.96/27\",\r\n \ - \ \"104.211.80.0/24\",\r\n \"191.233.202.0/24\"\r\n ]\r\ - \n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.AustraliaSoutheast\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail.AustraliaSoutheast\",\r\n\ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n\ - \ \"changeNumber\": \"1\",\r\n \"region\": \"australiasoutheast\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.77.51.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.BrazilSouth\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail.BrazilSouth\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"brazilsouth\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\"\ - ,\r\n \"addressPrefixes\": [\r\n \"191.233.202.0/24\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.CanadaCentral\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail.CanadaCentral\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"canadacentral\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.71.171.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.CentralIndia\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail.CentralIndia\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"centralindia\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\"\ - ,\r\n \"addressPrefixes\": [\r\n \"104.211.80.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.EastAsia\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail.EastAsia\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"1\",\r\n \"region\": \"eastasia\",\r\n \"\ - state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\ - \n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.75.35.0/24\"\r\n ]\r\ - \n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.FranceCentral\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail.FranceCentral\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"centralfrance\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\"\ - ,\r\n \"addressPrefixes\": [\r\n \"40.79.138.192/26\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.JapanEast\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail.JapanEast\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"1\",\r\n \"region\": \"japaneast\",\r\n \"\ - state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\ - \n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.78.107.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.NorthEurope\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail.NorthEurope\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"northeurope\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.69.226.128/25\",\r\n\ - \ \"13.74.106.128/25\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"Dynamics365ForMarketingEmail.SouthAfricaNorth\",\r\n \ - \ \"id\": \"Dynamics365ForMarketingEmail.SouthAfricaNorth\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"southafricanorth\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\"\ - ,\r\n \"addressPrefixes\": [\r\n \"102.133.251.96/27\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.UAENorth\"\ - ,\r\n \"id\": \"Dynamics365ForMarketingEmail.UAENorth\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"2\",\r\n \"region\": \"uaenorth\",\r\n \"\ - state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\ - \n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n \ - \ \"addressPrefixes\": [\r\n \"40.120.64.224/27\",\r\n \ - \ \"65.52.252.128/27\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"Dynamics365ForMarketingEmail.UKSouth\",\r\n \"id\"\ - : \"Dynamics365ForMarketingEmail.UKSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"Dynamics365ForMarketingEmail\",\r\n \"addressPrefixes\": [\r\n\ - \ \"51.140.147.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"Dynamics365ForMarketingEmail.WestUS2\",\r\n \"id\"\ - : \"Dynamics365ForMarketingEmail.WestUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"Dynamics365ForMarketingEmail\",\r\n \"addressPrefixes\": [\r\n\ - \ \"13.66.138.128/25\",\r\n \"40.78.242.0/25\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub\",\r\n \ - \ \"id\": \"EventHub\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"\ - region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\",\r\n \"VSE\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.64.195.117/32\"\ - ,\r\n \"13.65.209.24/32\",\r\n \"13.66.138.64/28\",\r\n\ - \ \"13.66.145.128/26\",\r\n \"13.66.149.0/26\",\r\n \ - \ \"13.66.228.204/32\",\r\n \"13.66.230.42/32\",\r\n \ - \ \"13.67.8.64/27\",\r\n \"13.67.20.64/26\",\r\n \"13.68.20.101/32\"\ - ,\r\n \"13.68.21.169/32\",\r\n \"13.68.77.215/32\",\r\n\ - \ \"13.69.64.0/26\",\r\n \"13.69.106.0/26\",\r\n \ - \ \"13.69.111.128/26\",\r\n \"13.69.227.0/26\",\r\n \"\ - 13.69.239.0/26\",\r\n \"13.69.253.135/32\",\r\n \"13.69.255.140/32\"\ - ,\r\n \"13.70.72.0/28\",\r\n \"13.70.79.16/28\",\r\n \ - \ \"13.70.114.64/26\",\r\n \"13.71.30.214/32\",\r\n \ - \ \"13.71.123.78/32\",\r\n \"13.71.154.11/32\",\r\n \"\ - 13.71.170.16/28\",\r\n \"13.71.177.128/26\",\r\n \"13.71.194.64/27\"\ - ,\r\n \"13.72.254.134/32\",\r\n \"13.74.107.0/26\",\r\n\ - \ \"13.75.34.64/26\",\r\n \"13.76.179.223/32\",\r\n \ - \ \"13.76.216.217/32\",\r\n \"13.77.50.32/27\",\r\n \ - \ \"13.78.106.64/28\",\r\n \"13.78.149.209/32\",\r\n \"\ - 13.78.150.233/32\",\r\n \"13.78.191.44/32\",\r\n \"13.84.145.196/32\"\ - ,\r\n \"13.87.34.139/32\",\r\n \"13.87.34.243/32\",\r\n\ - \ \"13.87.56.32/27\",\r\n \"13.87.122.32/27\",\r\n \ - \ \"13.88.20.117/32\",\r\n \"13.88.26.28/32\",\r\n \"\ - 13.89.58.37/32\",\r\n \"13.89.59.231/32\",\r\n \"13.89.170.128/26\"\ - ,\r\n \"13.89.178.112/28\",\r\n \"13.90.83.7/32\",\r\n \ - \ \"13.90.208.184/32\",\r\n \"13.91.61.11/32\",\r\n \ - \ \"13.92.124.151/32\",\r\n \"13.92.180.208/32\",\r\n \ - \ \"13.92.190.184/32\",\r\n \"13.93.226.138/32\",\r\n \ - \ \"13.94.47.61/32\",\r\n \"20.21.38.0/24\",\r\n \"20.21.43.128/26\"\ - ,\r\n \"20.21.67.64/26\",\r\n \"20.21.75.64/26\",\r\n \ - \ \"20.36.46.142/32\",\r\n \"20.36.74.130/32\",\r\n \ - \ \"20.36.106.192/27\",\r\n \"20.36.114.32/27\",\r\n \ - \ \"20.36.144.64/26\",\r\n \"20.37.74.0/27\",\r\n \"20.38.146.64/26\"\ - ,\r\n \"20.42.68.64/26\",\r\n \"20.42.74.0/26\",\r\n \ - \ \"20.42.131.16/28\",\r\n \"20.42.131.64/26\",\r\n \ - \ \"20.43.126.64/26\",\r\n \"20.44.2.128/26\",\r\n \"\ - 20.44.13.64/26\",\r\n \"20.44.26.64/26\",\r\n \"20.44.31.128/26\"\ - ,\r\n \"20.45.92.0/24\",\r\n \"20.45.117.128/26\",\r\n \ - \ \"20.45.122.64/26\",\r\n \"20.45.126.192/26\",\r\n \ - \ \"20.45.240.128/25\",\r\n \"20.45.241.0/26\",\r\n \ - \ \"20.46.15.64/26\",\r\n \"20.47.216.64/26\",\r\n \"20.48.200.128/26\"\ - ,\r\n \"20.49.84.192/26\",\r\n \"20.49.93.64/27\",\r\n \ - \ \"20.49.93.128/27\",\r\n \"20.49.95.128/26\",\r\n \ - \ \"20.50.72.64/26\",\r\n \"20.50.80.64/26\",\r\n \"\ - 20.50.201.64/26\",\r\n \"20.51.3.0/24\",\r\n \"20.51.14.96/27\"\ - ,\r\n \"20.51.14.128/25\",\r\n \"20.51.22.128/26\",\r\n\ - \ \"20.51.23.0/25\",\r\n \"20.51.23.128/26\",\r\n \ - \ \"20.52.64.128/26\",\r\n \"20.52.92.0/24\",\r\n \"\ - 20.53.51.0/24\",\r\n \"20.53.59.0/24\",\r\n \"20.53.85.82/32\"\ - ,\r\n \"20.58.69.0/24\",\r\n \"20.62.62.0/24\",\r\n \ - \ \"20.66.7.0/24\",\r\n \"20.69.3.0/24\",\r\n \"20.70.219.0/24\"\ - ,\r\n \"20.72.27.192/26\",\r\n \"20.76.242.45/32\",\r\n\ - \ \"20.82.245.0/24\",\r\n \"20.83.192.0/26\",\r\n \ - \ \"20.86.89.0/24\",\r\n \"20.88.65.0/24\",\r\n \"20.88.153.0/26\"\ - ,\r\n \"20.89.0.64/26\",\r\n \"20.89.10.0/24\",\r\n \ - \ \"20.90.128.128/26\",\r\n \"20.92.2.0/24\",\r\n \"\ - 20.97.32.192/26\",\r\n \"20.99.15.0/24\",\r\n \"20.100.0.0/26\"\ - ,\r\n \"20.150.160.224/27\",\r\n \"20.150.170.160/27\",\r\ - \n \"20.150.175.64/26\",\r\n \"20.150.178.64/26\",\r\n \ - \ \"20.150.182.0/27\",\r\n \"20.150.186.64/26\",\r\n \ - \ \"20.150.189.128/26\",\r\n \"20.150.246.32/27\",\r\n \ - \ \"20.150.246.64/26\",\r\n \"20.150.246.128/25\",\r\n \ - \ \"20.151.32.64/26\",\r\n \"20.189.231.0/24\",\r\n \"\ - 20.192.33.64/26\",\r\n \"20.192.51.96/27\",\r\n \"20.192.51.128/25\"\ - ,\r\n \"20.192.55.0/26\",\r\n \"20.192.83.0/24\",\r\n \ - \ \"20.192.98.64/26\",\r\n \"20.192.102.0/26\",\r\n \ - \ \"20.192.161.64/27\",\r\n \"20.192.168.0/26\",\r\n \ - \ \"20.192.225.160/27\",\r\n \"20.192.234.32/27\",\r\n \"\ - 20.193.195.32/27\",\r\n \"20.193.195.64/26\",\r\n \"20.193.195.128/25\"\ - ,\r\n \"20.193.202.32/27\",\r\n \"20.193.204.192/26\",\r\ - \n \"20.194.68.192/26\",\r\n \"20.194.80.0/26\",\r\n \ - \ \"20.194.128.192/26\",\r\n \"20.195.77.0/24\",\r\n \ - \ \"20.195.81.0/24\",\r\n \"20.195.97.0/32\",\r\n \"\ - 20.195.137.192/26\",\r\n \"20.195.150.160/27\",\r\n \"20.195.150.192/26\"\ - ,\r\n \"20.195.151.0/25\",\r\n \"20.195.152.64/26\",\r\n\ - \ \"20.200.193.0/24\",\r\n \"20.205.75.128/26\",\r\n \ - \ \"20.205.83.128/26\",\r\n \"20.208.19.64/26\",\r\n \ - \ \"23.96.214.181/32\",\r\n \"23.96.253.236/32\",\r\n \ - \ \"23.97.67.90/32\",\r\n \"23.97.97.36/32\",\r\n \"23.97.103.3/32\"\ - ,\r\n \"23.97.120.51/32\",\r\n \"23.97.226.21/32\",\r\n\ - \ \"23.98.64.92/32\",\r\n \"23.98.65.24/32\",\r\n \ - \ \"23.98.82.64/27\",\r\n \"23.98.87.192/26\",\r\n \"\ - 23.98.112.192/26\",\r\n \"23.99.7.105/32\",\r\n \"23.99.54.235/32\"\ - ,\r\n \"23.99.60.253/32\",\r\n \"23.99.80.186/32\",\r\n\ - \ \"23.99.118.48/32\",\r\n \"23.99.128.69/32\",\r\n \ - \ \"23.99.129.170/32\",\r\n \"23.99.192.254/32\",\r\n \ - \ \"23.99.196.56/32\",\r\n \"23.99.228.174/32\",\r\n \ - \ \"23.100.14.185/32\",\r\n \"23.100.100.84/32\",\r\n \"\ - 23.101.3.68/32\",\r\n \"23.101.8.229/32\",\r\n \"23.102.0.186/32\"\ - ,\r\n \"23.102.0.239/32\",\r\n \"23.102.53.113/32\",\r\n\ - \ \"23.102.128.15/32\",\r\n \"23.102.160.39/32\",\r\n \ - \ \"23.102.161.227/32\",\r\n \"23.102.163.4/32\",\r\n \ - \ \"23.102.165.127/32\",\r\n \"23.102.167.73/32\",\r\n \ - \ \"23.102.180.26/32\",\r\n \"23.102.234.49/32\",\r\n \ - \ \"40.64.113.64/26\",\r\n \"40.67.58.128/26\",\r\n \"\ - 40.67.72.64/26\",\r\n \"40.68.35.230/32\",\r\n \"40.68.39.15/32\"\ - ,\r\n \"40.68.93.145/32\",\r\n \"40.68.205.113/32\",\r\n\ - \ \"40.68.217.242/32\",\r\n \"40.69.29.216/32\",\r\n \ - \ \"40.69.106.32/27\",\r\n \"40.69.217.246/32\",\r\n \ - \ \"40.70.78.154/32\",\r\n \"40.70.146.0/26\",\r\n \"\ - 40.71.10.128/26\",\r\n \"40.71.100.98/32\",\r\n \"40.74.100.0/27\"\ - ,\r\n \"40.74.141.187/32\",\r\n \"40.74.146.16/28\",\r\n\ - \ \"40.74.151.0/26\",\r\n \"40.75.34.0/28\",\r\n \ - \ \"40.76.29.197/32\",\r\n \"40.76.40.11/32\",\r\n \"\ - 40.76.194.119/32\",\r\n \"40.78.110.196/32\",\r\n \"40.78.194.32/27\"\ - ,\r\n \"40.78.202.32/27\",\r\n \"40.78.226.128/26\",\r\n\ - \ \"40.78.234.0/27\",\r\n \"40.78.242.128/28\",\r\n \ - \ \"40.78.247.0/26\",\r\n \"40.78.250.64/28\",\r\n \ - \ \"40.78.253.128/26\",\r\n \"40.79.44.59/32\",\r\n \"40.79.74.86/32\"\ - ,\r\n \"40.79.130.16/28\",\r\n \"40.79.138.0/28\",\r\n \ - \ \"40.79.142.0/26\",\r\n \"40.79.146.0/28\",\r\n \ - \ \"40.79.149.64/26\",\r\n \"40.79.155.0/26\",\r\n \"\ - 40.79.162.0/28\",\r\n \"40.79.166.192/26\",\r\n \"40.79.170.32/28\"\ - ,\r\n \"40.79.174.128/26\",\r\n \"40.79.178.32/27\",\r\n\ - \ \"40.79.186.32/27\",\r\n \"40.79.191.128/26\",\r\n \ - \ \"40.79.194.192/26\",\r\n \"40.80.50.64/26\",\r\n \ - \ \"40.83.191.202/32\",\r\n \"40.83.222.100/32\",\r\n \ - \ \"40.84.150.241/32\",\r\n \"40.84.185.67/32\",\r\n \"\ - 40.85.226.62/32\",\r\n \"40.85.229.32/32\",\r\n \"40.86.77.12/32\"\ - ,\r\n \"40.86.102.100/32\",\r\n \"40.86.176.23/32\",\r\n\ - \ \"40.86.225.142/32\",\r\n \"40.86.230.119/32\",\r\n \ - \ \"40.89.122.0/26\",\r\n \"40.112.185.115/32\",\r\n \ - \ \"40.112.213.11/32\",\r\n \"40.112.242.0/25\",\r\n \ - \ \"40.115.79.2/32\",\r\n \"40.117.88.66/32\",\r\n \"40.120.75.64/27\"\ - ,\r\n \"40.120.78.0/26\",\r\n \"40.120.84.0/24\",\r\n \ - \ \"40.121.84.50/32\",\r\n \"40.121.141.232/32\",\r\n \ - \ \"40.121.148.193/32\",\r\n \"40.122.173.108/32\",\r\n \ - \ \"40.122.213.155/32\",\r\n \"40.124.65.64/26\",\r\n \ - \ \"40.125.103.251/32\",\r\n \"40.127.83.123/32\",\r\n \ - \ \"40.127.132.254/32\",\r\n \"51.11.192.128/26\",\r\n \ - \ \"51.12.21.0/24\",\r\n \"51.12.30.0/24\",\r\n \"51.12.98.160/27\"\ - ,\r\n \"51.12.102.64/26\",\r\n \"51.12.202.160/27\",\r\n\ - \ \"51.12.206.64/26\",\r\n \"51.12.226.64/26\",\r\n \ - \ \"51.12.234.64/26\",\r\n \"51.13.0.192/26\",\r\n \ - \ \"51.13.140.0/24\",\r\n \"51.103.203.64/26\",\r\n \"51.104.165.162/32\"\ - ,\r\n \"51.105.66.64/26\",\r\n \"51.105.71.0/26\",\r\n \ - \ \"51.105.74.64/26\",\r\n \"51.107.58.128/27\",\r\n \ - \ \"51.107.129.0/26\",\r\n \"51.107.154.128/27\",\r\n \ - \ \"51.107.245.0/24\",\r\n \"51.107.253.0/24\",\r\n \"\ - 51.116.58.128/27\",\r\n \"51.116.73.0/24\",\r\n \"51.116.154.192/27\"\ - ,\r\n \"51.116.242.64/26\",\r\n \"51.116.245.192/27\",\r\ - \n \"51.116.246.192/26\",\r\n \"51.116.250.64/26\",\r\n\ - \ \"51.116.254.0/26\",\r\n \"51.120.98.128/27\",\r\n \ - \ \"51.120.106.64/26\",\r\n \"51.120.210.64/26\",\r\n \ - \ \"51.120.218.160/27\",\r\n \"51.132.192.192/26\",\r\n \ - \ \"51.138.214.0/24\",\r\n \"51.140.80.99/32\",\r\n \ - \ \"51.140.87.93/32\",\r\n \"51.140.125.8/32\",\r\n \"51.140.146.32/28\"\ - ,\r\n \"51.140.149.192/26\",\r\n \"51.140.189.52/32\",\r\ - \n \"51.140.189.108/32\",\r\n \"51.140.210.32/27\",\r\n\ - \ \"51.141.14.113/32\",\r\n \"51.141.14.168/32\",\r\n \ - \ \"51.141.50.179/32\",\r\n \"51.144.238.23/32\",\r\n \ - \ \"52.136.136.62/32\",\r\n \"52.136.188.0/24\",\r\n \ - \ \"52.138.90.0/28\",\r\n \"52.138.147.148/32\",\r\n \"\ - 52.138.226.0/26\",\r\n \"52.139.4.118/32\",\r\n \"52.139.109.0/24\"\ - ,\r\n \"52.143.136.55/32\",\r\n \"52.147.115.0/24\",\r\n\ - \ \"52.151.58.121/32\",\r\n \"52.161.19.160/32\",\r\n \ - \ \"52.161.24.64/32\",\r\n \"52.162.106.64/26\",\r\n \ - \ \"52.165.34.144/32\",\r\n \"52.165.179.109/32\",\r\n \ - \ \"52.165.235.119/32\",\r\n \"52.165.237.8/32\",\r\n \ - \ \"52.167.106.0/26\",\r\n \"52.167.109.192/26\",\r\n \"\ - 52.167.145.0/26\",\r\n \"52.168.14.144/32\",\r\n \"52.168.66.180/32\"\ - ,\r\n \"52.168.117.0/26\",\r\n \"52.168.146.69/32\",\r\n\ - \ \"52.168.147.11/32\",\r\n \"52.169.18.8/32\",\r\n \ - \ \"52.172.119.0/24\",\r\n \"52.172.221.245/32\",\r\n \ - \ \"52.172.223.211/32\",\r\n \"52.173.199.106/32\",\r\n \ - \ \"52.174.243.57/32\",\r\n \"52.175.35.235/32\",\r\n \ - \ \"52.176.47.198/32\",\r\n \"52.178.17.128/26\",\r\n \"\ - 52.178.78.61/32\",\r\n \"52.178.211.227/32\",\r\n \"52.179.6.240/32\"\ - ,\r\n \"52.179.8.35/32\",\r\n \"52.179.157.59/32\",\r\n\ - \ \"52.180.180.228/32\",\r\n \"52.180.182.75/32\",\r\n \ - \ \"52.182.138.128/26\",\r\n \"52.182.143.64/26\",\r\n \ - \ \"52.183.46.73/32\",\r\n \"52.183.86.102/32\",\r\n \ - \ \"52.187.2.226/32\",\r\n \"52.187.59.188/32\",\r\n \ - \ \"52.187.61.82/32\",\r\n \"52.187.185.159/32\",\r\n \"\ - 52.191.213.188/32\",\r\n \"52.191.228.245/32\",\r\n \"52.225.184.224/32\"\ - ,\r\n \"52.225.186.130/32\",\r\n \"52.226.36.235/32\",\r\ - \n \"52.231.18.16/28\",\r\n \"52.231.29.105/32\",\r\n \ - \ \"52.231.32.85/32\",\r\n \"52.231.32.94/32\",\r\n \ - \ \"52.231.146.32/27\",\r\n \"52.231.200.144/32\",\r\n \ - \ \"52.231.200.153/32\",\r\n \"52.231.207.155/32\",\r\n \ - \ \"52.232.27.189/32\",\r\n \"52.233.30.41/32\",\r\n \"\ - 52.233.190.35/32\",\r\n \"52.233.192.247/32\",\r\n \"52.236.186.0/26\"\ - ,\r\n \"52.237.33.36/32\",\r\n \"52.237.33.104/32\",\r\n\ - \ \"52.237.143.176/32\",\r\n \"52.242.20.204/32\",\r\n \ - \ \"52.243.36.161/32\",\r\n \"52.246.154.64/26\",\r\n \ - \ \"52.246.159.0/26\",\r\n \"65.52.129.16/32\",\r\n \ - \ \"65.52.250.32/27\",\r\n \"102.37.65.0/26\",\r\n \"\ - 102.37.72.64/26\",\r\n \"102.37.83.0/24\",\r\n \"102.37.165.0/24\"\ - ,\r\n \"102.133.26.128/26\",\r\n \"102.133.122.64/26\",\r\ - \n \"102.133.127.0/26\",\r\n \"102.133.154.128/26\",\r\n\ - \ \"102.133.250.64/26\",\r\n \"102.133.254.0/26\",\r\n \ - \ \"104.40.26.199/32\",\r\n \"104.40.29.113/32\",\r\n \ - \ \"104.40.68.250/32\",\r\n \"104.40.69.64/32\",\r\n \ - \ \"104.40.150.139/32\",\r\n \"104.40.179.185/32\",\r\n \ - \ \"104.40.216.174/32\",\r\n \"104.41.63.213/32\",\r\n \ - \ \"104.41.201.10/32\",\r\n \"104.42.97.95/32\",\r\n \"\ - 104.43.18.219/32\",\r\n \"104.43.168.200/32\",\r\n \"104.43.192.43/32\"\ - ,\r\n \"104.43.192.222/32\",\r\n \"104.44.129.14/32\",\r\ - \n \"104.44.129.59/32\",\r\n \"104.45.135.34/32\",\r\n \ - \ \"104.45.147.24/32\",\r\n \"104.46.32.56/32\",\r\n \ - \ \"104.46.32.58/32\",\r\n \"104.46.98.9/32\",\r\n \ - \ \"104.46.98.73/32\",\r\n \"104.46.99.176/32\",\r\n \"\ - 104.208.16.0/26\",\r\n \"104.208.144.0/26\",\r\n \"104.208.237.147/32\"\ - ,\r\n \"104.209.186.70/32\",\r\n \"104.210.14.49/32\",\r\ - \n \"104.210.106.31/32\",\r\n \"104.210.146.250/32\",\r\n\ - \ \"104.211.81.0/28\",\r\n \"104.211.98.185/32\",\r\n \ - \ \"104.211.102.58/32\",\r\n \"104.211.146.32/27\",\r\n \ - \ \"104.211.160.121/32\",\r\n \"104.211.160.144/32\",\r\n\ - \ \"104.211.224.190/32\",\r\n \"104.211.224.238/32\",\r\n\ - \ \"104.214.18.128/27\",\r\n \"104.214.70.229/32\",\r\n\ - \ \"137.116.48.46/32\",\r\n \"137.116.77.157/32\",\r\n \ - \ \"137.116.91.178/32\",\r\n \"137.116.157.26/32\",\r\n \ - \ \"137.116.158.30/32\",\r\n \"137.117.85.236/32\",\r\n \ - \ \"137.117.89.253/32\",\r\n \"137.117.91.152/32\",\r\n \ - \ \"137.135.102.226/32\",\r\n \"138.91.1.105/32\",\r\n \ - \ \"138.91.17.38/32\",\r\n \"138.91.17.85/32\",\r\n \ - \ \"138.91.193.184/32\",\r\n \"168.61.92.197/32\",\r\n \ - \ \"168.61.143.128/26\",\r\n \"168.61.148.205/32\",\r\n \ - \ \"168.62.52.235/32\",\r\n \"168.62.234.250/32\",\r\n \ - \ \"168.62.237.3/32\",\r\n \"168.62.249.226/32\",\r\n \"\ - 168.63.141.27/32\",\r\n \"191.233.9.64/27\",\r\n \"191.233.73.228/32\"\ - ,\r\n \"191.233.203.0/28\",\r\n \"191.234.146.64/26\",\r\ - \n \"191.234.150.192/26\",\r\n \"191.234.154.64/26\",\r\n\ - \ \"191.236.32.73/32\",\r\n \"191.236.32.191/32\",\r\n \ - \ \"191.236.35.225/32\",\r\n \"191.236.128.253/32\",\r\n\ - \ \"191.236.129.107/32\",\r\n \"191.237.47.93/32\",\r\n\ - \ \"191.237.129.158/32\",\r\n \"191.237.224.0/26\",\r\n\ - \ \"191.238.75.0/24\",\r\n \"191.238.99.131/32\",\r\n \ - \ \"191.238.160.221/32\",\r\n \"191.239.64.142/32\",\r\n \ - \ \"191.239.64.144/32\",\r\n \"191.239.160.45/32\",\r\n \ - \ \"191.239.160.178/32\",\r\n \"207.46.153.127/32\",\r\n\ - \ \"207.46.154.16/32\",\r\n \"207.46.227.14/32\",\r\n \ - \ \"2603:1000:4::240/122\",\r\n \"2603:1000:4:2::/120\",\r\ - \n \"2603:1000:4:402::1c0/123\",\r\n \"2603:1000:104:1::240/122\"\ - ,\r\n \"2603:1000:104:2::500/120\",\r\n \"2603:1000:104:402::1c0/123\"\ - ,\r\n \"2603:1000:104:802::160/123\",\r\n \"2603:1000:104:c02::160/123\"\ - ,\r\n \"2603:1010:6:1::240/122\",\r\n \"2603:1010:6:2::400/120\"\ - ,\r\n \"2603:1010:6:402::1c0/123\",\r\n \"2603:1010:6:802::160/123\"\ - ,\r\n \"2603:1010:6:c02::160/123\",\r\n \"2603:1010:101::240/122\"\ - ,\r\n \"2603:1010:101:402::1c0/123\",\r\n \"2603:1010:304::240/122\"\ - ,\r\n \"2603:1010:304:2::/120\",\r\n \"2603:1010:304:402::1c0/123\"\ - ,\r\n \"2603:1010:404::240/122\",\r\n \"2603:1010:404:2::/120\"\ - ,\r\n \"2603:1010:404:402::1c0/123\",\r\n \"2603:1020:5:1::240/122\"\ - ,\r\n \"2603:1020:5:402::1c0/123\",\r\n \"2603:1020:5:802::160/123\"\ - ,\r\n \"2603:1020:5:c02::160/123\",\r\n \"2603:1020:206:1::240/122\"\ - ,\r\n \"2603:1020:206:4::100/120\",\r\n \"2603:1020:206:402::1c0/123\"\ - ,\r\n \"2603:1020:206:802::160/123\",\r\n \"2603:1020:206:c02::160/123\"\ - ,\r\n \"2603:1020:305::240/122\",\r\n \"2603:1020:305:402::1c0/123\"\ - ,\r\n \"2603:1020:405::240/122\",\r\n \"2603:1020:405:402::1c0/123\"\ - ,\r\n \"2603:1020:605::240/122\",\r\n \"2603:1020:605:2::/120\"\ - ,\r\n \"2603:1020:605:402::1c0/123\",\r\n \"2603:1020:705:1::240/122\"\ - ,\r\n \"2603:1020:705:2::400/120\",\r\n \"2603:1020:705:402::1c0/123\"\ - ,\r\n \"2603:1020:705:802::160/123\",\r\n \"2603:1020:705:c02::160/123\"\ - ,\r\n \"2603:1020:805:1::240/122\",\r\n \"2603:1020:805:2::200/120\"\ - ,\r\n \"2603:1020:805:402::1c0/123\",\r\n \"2603:1020:805:802::160/123\"\ - ,\r\n \"2603:1020:805:c02::160/123\",\r\n \"2603:1020:905::240/122\"\ - ,\r\n \"2603:1020:905:2::/120\",\r\n \"2603:1020:905:402::1c0/123\"\ - ,\r\n \"2603:1020:a04:1::240/122\",\r\n \"2603:1020:a04:2::200/120\"\ - ,\r\n \"2603:1020:a04:402::1c0/123\",\r\n \"2603:1020:a04:802::160/123\"\ - ,\r\n \"2603:1020:a04:c02::160/123\",\r\n \"2603:1020:b04::240/122\"\ - ,\r\n \"2603:1020:b04:2::/120\",\r\n \"2603:1020:b04:402::1c0/123\"\ - ,\r\n \"2603:1020:c04:1::240/122\",\r\n \"2603:1020:c04:2::200/120\"\ - ,\r\n \"2603:1020:c04:402::1c0/123\",\r\n \"2603:1020:c04:802::160/123\"\ - ,\r\n \"2603:1020:c04:c02::160/123\",\r\n \"2603:1020:d04::240/122\"\ - ,\r\n \"2603:1020:d04:1::600/120\",\r\n \"2603:1020:d04:402::1c0/123\"\ - ,\r\n \"2603:1020:e04:1::240/122\",\r\n \"2603:1020:e04:3::600/120\"\ - ,\r\n \"2603:1020:e04:402::1c0/123\",\r\n \"2603:1020:e04:802::160/123\"\ - ,\r\n \"2603:1020:e04:c02::160/123\",\r\n \"2603:1020:f04::240/122\"\ - ,\r\n \"2603:1020:f04:3::/120\",\r\n \"2603:1020:f04:402::1c0/123\"\ - ,\r\n \"2603:1020:1004::240/122\",\r\n \"2603:1020:1004:2::400/120\"\ - ,\r\n \"2603:1020:1004:400::2c0/123\",\r\n \"2603:1020:1004:c02::c0/123\"\ - ,\r\n \"2603:1020:1104:400::1c0/123\",\r\n \"2603:1030:f:1::240/122\"\ - ,\r\n \"2603:1030:f:3::200/122\",\r\n \"2603:1030:f:3::400/120\"\ - ,\r\n \"2603:1030:f:400::9c0/123\",\r\n \"2603:1030:10:1::240/122\"\ - ,\r\n \"2603:1030:10:402::1c0/123\",\r\n \"2603:1030:10:802::160/123\"\ - ,\r\n \"2603:1030:10:c02::160/123\",\r\n \"2603:1030:104:1::240/122\"\ - ,\r\n \"2603:1030:104:2::300/120\",\r\n \"2603:1030:104:402::1c0/123\"\ - ,\r\n \"2603:1030:104:402::660/123\",\r\n \"2603:1030:104:802::180/123\"\ - ,\r\n \"2603:1030:107:1::500/120\",\r\n \"2603:1030:107:400::140/123\"\ - ,\r\n \"2603:1030:210:1::240/122\",\r\n \"2603:1030:210:402::1c0/123\"\ - ,\r\n \"2603:1030:210:802::160/123\",\r\n \"2603:1030:210:c02::160/123\"\ - ,\r\n \"2603:1030:302::200/120\",\r\n \"2603:1030:40b:1::240/122\"\ - ,\r\n \"2603:1030:40b:2::4c0/122\",\r\n \"2603:1030:40b:3::/120\"\ - ,\r\n \"2603:1030:40b:400::9c0/123\",\r\n \"2603:1030:40b:800::160/123\"\ - ,\r\n \"2603:1030:40b:c00::160/123\",\r\n \"2603:1030:40c:1::240/122\"\ - ,\r\n \"2603:1030:40c:402::1c0/123\",\r\n \"2603:1030:40c:802::160/123\"\ - ,\r\n \"2603:1030:40c:c02::160/123\",\r\n \"2603:1030:504:1::240/122\"\ - ,\r\n \"2603:1030:504:2::400/120\",\r\n \"2603:1030:504:402::2c0/123\"\ - ,\r\n \"2603:1030:504:802::240/123\",\r\n \"2603:1030:504:c02::c0/123\"\ - ,\r\n \"2603:1030:608::240/122\",\r\n \"2603:1030:608:1::600/120\"\ - ,\r\n \"2603:1030:608:402::1c0/123\",\r\n \"2603:1030:807:1::240/122\"\ - ,\r\n \"2603:1030:807:402::1c0/123\",\r\n \"2603:1030:807:802::160/123\"\ - ,\r\n \"2603:1030:807:c02::160/123\",\r\n \"2603:1030:a07::240/122\"\ - ,\r\n \"2603:1030:a07:1::600/120\",\r\n \"2603:1030:a07:402::140/123\"\ - ,\r\n \"2603:1030:b04::240/122\",\r\n \"2603:1030:b04:1::600/120\"\ - ,\r\n \"2603:1030:b04:402::1c0/123\",\r\n \"2603:1030:c06:1::240/122\"\ - ,\r\n \"2603:1030:c06:2::600/120\",\r\n \"2603:1030:c06:400::9c0/123\"\ - ,\r\n \"2603:1030:c06:802::160/123\",\r\n \"2603:1030:c06:c02::160/123\"\ - ,\r\n \"2603:1030:f05:1::240/122\",\r\n \"2603:1030:f05:2::400/120\"\ - ,\r\n \"2603:1030:f05:402::1c0/123\",\r\n \"2603:1030:f05:802::160/123\"\ - ,\r\n \"2603:1030:f05:c02::160/123\",\r\n \"2603:1030:1005::240/122\"\ - ,\r\n \"2603:1030:1005:2::/120\",\r\n \"2603:1030:1005:402::1c0/123\"\ - ,\r\n \"2603:1040:5:1::240/122\",\r\n \"2603:1040:5:402::1c0/123\"\ - ,\r\n \"2603:1040:5:802::160/123\",\r\n \"2603:1040:5:c02::160/123\"\ - ,\r\n \"2603:1040:207::240/122\",\r\n \"2603:1040:207:2::100/120\"\ - ,\r\n \"2603:1040:207:402::1c0/123\",\r\n \"2603:1040:407:1::240/122\"\ - ,\r\n \"2603:1040:407:2::200/120\",\r\n \"2603:1040:407:402::1c0/123\"\ - ,\r\n \"2603:1040:407:802::160/123\",\r\n \"2603:1040:407:c02::160/123\"\ - ,\r\n \"2603:1040:606::240/122\",\r\n \"2603:1040:606:2::/120\"\ - ,\r\n \"2603:1040:606:402::1c0/123\",\r\n \"2603:1040:806::240/122\"\ - ,\r\n \"2603:1040:806:2::/120\",\r\n \"2603:1040:806:402::1c0/123\"\ - ,\r\n \"2603:1040:904:1::240/122\",\r\n \"2603:1040:904:2::200/120\"\ - ,\r\n \"2603:1040:904:402::1c0/123\",\r\n \"2603:1040:904:802::160/123\"\ - ,\r\n \"2603:1040:904:c02::160/123\",\r\n \"2603:1040:a06:1::240/122\"\ - ,\r\n \"2603:1040:a06:2::700/120\",\r\n \"2603:1040:a06:402::1c0/123\"\ - ,\r\n \"2603:1040:a06:802::160/123\",\r\n \"2603:1040:a06:c02::160/123\"\ - ,\r\n \"2603:1040:b04::240/122\",\r\n \"2603:1040:b04:2::/120\"\ - ,\r\n \"2603:1040:b04:402::1c0/123\",\r\n \"2603:1040:c06::240/122\"\ - ,\r\n \"2603:1040:c06:2::/120\",\r\n \"2603:1040:c06:402::1c0/123\"\ - ,\r\n \"2603:1040:d04::240/122\",\r\n \"2603:1040:d04:2::500/120\"\ - ,\r\n \"2603:1040:d04:400::2c0/123\",\r\n \"2603:1040:d04:c02::c0/123\"\ - ,\r\n \"2603:1040:e05::500/120\",\r\n \"2603:1040:f05:1::240/122\"\ - ,\r\n \"2603:1040:f05:2::600/120\",\r\n \"2603:1040:f05:402::1c0/123\"\ - ,\r\n \"2603:1040:f05:802::160/123\",\r\n \"2603:1040:f05:c02::160/123\"\ - ,\r\n \"2603:1040:1002:1::200/120\",\r\n \"2603:1040:1104:400::1c0/123\"\ - ,\r\n \"2603:1050:6:1::240/122\",\r\n \"2603:1050:6:2::200/120\"\ - ,\r\n \"2603:1050:6:402::1c0/123\",\r\n \"2603:1050:6:802::160/123\"\ - ,\r\n \"2603:1050:6:c02::160/123\",\r\n \"2603:1050:403::240/122\"\ - ,\r\n \"2603:1050:403:2::/120\",\r\n \"2603:1050:403:400::1c0/123\"\ - ,\r\n \"2603:10e1:100:2::1435:5552/128\",\r\n \"2603:10e1:100:2::144c:f22d/128\"\ - ,\r\n \"2603:10e1:100:2::14c3:6100/128\",\r\n \"2603:10e1:100:2::287d:67fb/128\"\ - ,\r\n \"2603:10e1:100:2::3368:a5a2/128\",\r\n \"2603:10e1:100:2::348b:476/128\"\ - ,\r\n \"2603:10e1:100:2::34bf:e4f5/128\"\r\n ]\r\n }\r\ - \n },\r\n {\r\n \"name\": \"EventHub.AustraliaCentral\",\r\n \ - \ \"id\": \"EventHub.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.36.46.142/32\"\ - ,\r\n \"20.36.106.192/27\",\r\n \"20.53.51.0/24\",\r\n \ - \ \"2603:1010:304::240/122\",\r\n \"2603:1010:304:2::/120\"\ - ,\r\n \"2603:1010:304:402::1c0/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.AustraliaCentral2\",\r\n \ - \ \"id\": \"EventHub.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiacentral2\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\ - \n \"20.36.74.130/32\",\r\n \"20.36.114.32/27\",\r\n \ - \ \"20.53.59.0/24\",\r\n \"2603:1010:404::240/122\",\r\n \ - \ \"2603:1010:404:2::/120\",\r\n \"2603:1010:404:402::1c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.AustraliaEast\"\ - ,\r\n \"id\": \"EventHub.AustraliaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.70.72.0/28\"\ - ,\r\n \"13.70.79.16/28\",\r\n \"13.70.114.64/26\",\r\n \ - \ \"13.72.254.134/32\",\r\n \"20.53.85.82/32\",\r\n \ - \ \"20.70.219.0/24\",\r\n \"40.79.162.0/28\",\r\n \"\ - 40.79.166.192/26\",\r\n \"40.79.170.32/28\",\r\n \"40.79.174.128/26\"\ - ,\r\n \"104.210.106.31/32\",\r\n \"191.239.64.142/32\",\r\ - \n \"191.239.64.144/32\",\r\n \"2603:1010:6:1::240/122\"\ - ,\r\n \"2603:1010:6:2::400/120\",\r\n \"2603:1010:6:402::1c0/123\"\ - ,\r\n \"2603:1010:6:802::160/123\",\r\n \"2603:1010:6:c02::160/123\"\ - ,\r\n \"2603:10e1:100:2::1435:5552/128\"\r\n ]\r\n }\r\ - \n },\r\n {\r\n \"name\": \"EventHub.AustraliaSoutheast\",\r\n\ - \ \"id\": \"EventHub.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\ - \n \"13.77.50.32/27\",\r\n \"20.92.2.0/24\",\r\n \ - \ \"40.115.79.2/32\",\r\n \"40.127.83.123/32\",\r\n \"\ - 191.239.160.45/32\",\r\n \"191.239.160.178/32\",\r\n \"\ - 2603:1010:101::240/122\",\r\n \"2603:1010:101:402::1c0/123\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.BrazilSouth\"\ - ,\r\n \"id\": \"EventHub.BrazilSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.195.137.192/26\"\ - ,\r\n \"20.195.152.64/26\",\r\n \"23.97.97.36/32\",\r\n\ - \ \"23.97.103.3/32\",\r\n \"104.41.63.213/32\",\r\n \ - \ \"191.233.203.0/28\",\r\n \"191.234.146.64/26\",\r\n \ - \ \"191.234.150.192/26\",\r\n \"191.234.154.64/26\",\r\n \ - \ \"191.238.75.0/24\",\r\n \"2603:1050:6:1::240/122\",\r\n \ - \ \"2603:1050:6:2::200/120\",\r\n \"2603:1050:6:402::1c0/123\"\ - ,\r\n \"2603:1050:6:802::160/123\",\r\n \"2603:1050:6:c02::160/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.BrazilSoutheast\"\ - ,\r\n \"id\": \"EventHub.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.195.150.160/27\"\ - ,\r\n \"20.195.150.192/26\",\r\n \"20.195.151.0/25\",\r\n\ - \ \"23.97.120.51/32\",\r\n \"191.233.9.64/27\",\r\n \ - \ \"191.237.224.0/26\",\r\n \"2603:1050:403::240/122\",\r\n\ - \ \"2603:1050:403:2::/120\",\r\n \"2603:1050:403:400::1c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.CanadaCentral\"\ - ,\r\n \"id\": \"EventHub.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.71.170.16/28\"\ - ,\r\n \"13.71.177.128/26\",\r\n \"20.38.146.64/26\",\r\n\ - \ \"20.48.200.128/26\",\r\n \"20.151.32.64/26\",\r\n \ - \ \"40.85.226.62/32\",\r\n \"40.85.229.32/32\",\r\n \ - \ \"52.139.4.118/32\",\r\n \"52.233.30.41/32\",\r\n \"\ - 52.237.33.36/32\",\r\n \"52.237.33.104/32\",\r\n \"52.246.154.64/26\"\ - ,\r\n \"52.246.159.0/26\",\r\n \"2603:1030:f05:1::240/122\"\ - ,\r\n \"2603:1030:f05:2::400/120\",\r\n \"2603:1030:f05:402::1c0/123\"\ - ,\r\n \"2603:1030:f05:802::160/123\",\r\n \"2603:1030:f05:c02::160/123\"\ - ,\r\n \"2603:10e1:100:2::348b:476/128\"\r\n ]\r\n }\r\ - \n },\r\n {\r\n \"name\": \"EventHub.CanadaEast\",\r\n \"\ - id\": \"EventHub.CanadaEast\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"40.69.106.32/27\"\ - ,\r\n \"40.86.225.142/32\",\r\n \"40.86.230.119/32\",\r\n\ - \ \"52.139.109.0/24\",\r\n \"52.242.20.204/32\",\r\n \ - \ \"2603:1030:1005::240/122\",\r\n \"2603:1030:1005:2::/120\"\ - ,\r\n \"2603:1030:1005:402::1c0/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.CentralIndia\",\r\n \"\ - id\": \"EventHub.CentralIndia\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.71.30.214/32\"\ - ,\r\n \"20.43.126.64/26\",\r\n \"20.192.98.64/26\",\r\n\ - \ \"20.192.102.0/26\",\r\n \"20.192.168.0/26\",\r\n \ - \ \"40.80.50.64/26\",\r\n \"52.172.221.245/32\",\r\n \ - \ \"52.172.223.211/32\",\r\n \"104.211.81.0/28\",\r\n \ - \ \"104.211.98.185/32\",\r\n \"104.211.102.58/32\",\r\n \ - \ \"2603:1040:a06:1::240/122\",\r\n \"2603:1040:a06:2::700/120\"\ - ,\r\n \"2603:1040:a06:402::1c0/123\",\r\n \"2603:1040:a06:802::160/123\"\ - ,\r\n \"2603:1040:a06:c02::160/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.CentralUS\",\r\n \"id\"\ - : \"EventHub.CentralUS\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventHub\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.89.58.37/32\",\r\n \ - \ \"13.89.59.231/32\",\r\n \"13.89.170.128/26\",\r\n \ - \ \"13.89.178.112/28\",\r\n \"20.44.13.64/26\",\r\n \ - \ \"23.99.128.69/32\",\r\n \"23.99.129.170/32\",\r\n \"\ - 23.99.192.254/32\",\r\n \"23.99.196.56/32\",\r\n \"23.99.228.174/32\"\ - ,\r\n \"40.86.77.12/32\",\r\n \"40.86.102.100/32\",\r\n\ - \ \"40.122.173.108/32\",\r\n \"40.122.213.155/32\",\r\n\ - \ \"52.165.34.144/32\",\r\n \"52.165.179.109/32\",\r\n \ - \ \"52.165.235.119/32\",\r\n \"52.165.237.8/32\",\r\n \ - \ \"52.173.199.106/32\",\r\n \"52.176.47.198/32\",\r\n \ - \ \"52.182.138.128/26\",\r\n \"52.182.143.64/26\",\r\n \ - \ \"104.43.168.200/32\",\r\n \"104.43.192.43/32\",\r\n \ - \ \"104.43.192.222/32\",\r\n \"104.208.16.0/26\",\r\n \ - \ \"168.61.148.205/32\",\r\n \"2603:1030:10:1::240/122\",\r\n \ - \ \"2603:1030:10:402::1c0/123\",\r\n \"2603:1030:10:802::160/123\"\ - ,\r\n \"2603:1030:10:c02::160/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"EventHub.CentralUSEUAP\",\r\n \"\ - id\": \"EventHub.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.45.240.128/25\"\ - ,\r\n \"20.45.241.0/26\",\r\n \"20.46.15.64/26\",\r\n \ - \ \"40.78.202.32/27\",\r\n \"52.180.180.228/32\",\r\n \ - \ \"52.180.182.75/32\",\r\n \"168.61.143.128/26\",\r\n \ - \ \"2603:1030:f:1::240/122\",\r\n \"2603:1030:f:3::200/122\"\ - ,\r\n \"2603:1030:f:3::400/120\",\r\n \"2603:1030:f:400::9c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.EastAsia\"\ - ,\r\n \"id\": \"EventHub.EastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.75.34.64/26\"\ - ,\r\n \"13.94.47.61/32\",\r\n \"20.195.77.0/24\",\r\n \ - \ \"20.205.75.128/26\",\r\n \"20.205.83.128/26\",\r\n \ - \ \"23.97.67.90/32\",\r\n \"23.99.118.48/32\",\r\n \ - \ \"23.101.3.68/32\",\r\n \"23.101.8.229/32\",\r\n \"23.102.234.49/32\"\ - ,\r\n \"52.175.35.235/32\",\r\n \"168.63.141.27/32\",\r\n\ - \ \"207.46.153.127/32\",\r\n \"207.46.154.16/32\",\r\n \ - \ \"2603:1040:207::240/122\",\r\n \"2603:1040:207:2::100/120\"\ - ,\r\n \"2603:1040:207:402::1c0/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.EastUS\",\r\n \"id\":\ - \ \"EventHub.EastUS\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \"region\"\ - : \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventHub\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.90.83.7/32\",\r\n \ - \ \"13.90.208.184/32\",\r\n \"13.92.124.151/32\",\r\n \ - \ \"13.92.180.208/32\",\r\n \"13.92.190.184/32\",\r\n \ - \ \"20.42.68.64/26\",\r\n \"20.42.74.0/26\",\r\n \"20.88.153.0/26\"\ - ,\r\n \"40.71.10.128/26\",\r\n \"40.71.100.98/32\",\r\n\ - \ \"40.76.29.197/32\",\r\n \"40.76.40.11/32\",\r\n \ - \ \"40.76.194.119/32\",\r\n \"40.78.226.128/26\",\r\n \ - \ \"40.79.155.0/26\",\r\n \"40.117.88.66/32\",\r\n \"\ - 40.121.84.50/32\",\r\n \"40.121.141.232/32\",\r\n \"40.121.148.193/32\"\ - ,\r\n \"52.168.14.144/32\",\r\n \"52.168.66.180/32\",\r\n\ - \ \"52.168.117.0/26\",\r\n \"52.168.146.69/32\",\r\n \ - \ \"52.168.147.11/32\",\r\n \"52.179.6.240/32\",\r\n \ - \ \"52.179.8.35/32\",\r\n \"52.191.213.188/32\",\r\n \ - \ \"52.191.228.245/32\",\r\n \"52.226.36.235/32\",\r\n \"\ - 104.45.135.34/32\",\r\n \"104.45.147.24/32\",\r\n \"137.117.85.236/32\"\ - ,\r\n \"137.117.89.253/32\",\r\n \"137.117.91.152/32\",\r\ - \n \"137.135.102.226/32\",\r\n \"168.62.52.235/32\",\r\n\ - \ \"191.236.32.73/32\",\r\n \"191.236.32.191/32\",\r\n \ - \ \"191.236.35.225/32\",\r\n \"191.237.47.93/32\",\r\n \ - \ \"2603:1030:210:1::240/122\",\r\n \"2603:1030:210:402::1c0/123\"\ - ,\r\n \"2603:1030:210:802::160/123\",\r\n \"2603:1030:210:c02::160/123\"\ - ,\r\n \"2603:10e1:100:2::34bf:e4f5/128\"\r\n ]\r\n }\r\ - \n },\r\n {\r\n \"name\": \"EventHub.EastUS2\",\r\n \"id\"\ - : \"EventHub.EastUS2\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventHub\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.68.20.101/32\",\r\n\ - \ \"13.68.21.169/32\",\r\n \"13.68.77.215/32\",\r\n \ - \ \"20.36.144.64/26\",\r\n \"20.62.62.0/24\",\r\n \"\ - 40.70.78.154/32\",\r\n \"40.70.146.0/26\",\r\n \"40.79.44.59/32\"\ - ,\r\n \"40.79.74.86/32\",\r\n \"52.167.106.0/26\",\r\n \ - \ \"52.167.109.192/26\",\r\n \"52.167.145.0/26\",\r\n \ - \ \"52.179.157.59/32\",\r\n \"104.46.98.9/32\",\r\n \ - \ \"104.46.98.73/32\",\r\n \"104.46.99.176/32\",\r\n \"\ - 104.208.144.0/26\",\r\n \"104.208.237.147/32\",\r\n \"104.209.186.70/32\"\ - ,\r\n \"104.210.14.49/32\",\r\n \"137.116.48.46/32\",\r\n\ - \ \"137.116.77.157/32\",\r\n \"137.116.91.178/32\",\r\n\ - \ \"191.237.129.158/32\",\r\n \"2603:1030:40c:1::240/122\"\ - ,\r\n \"2603:1030:40c:402::1c0/123\",\r\n \"2603:1030:40c:802::160/123\"\ - ,\r\n \"2603:1030:40c:c02::160/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.EastUS2EUAP\",\r\n \"\ - id\": \"EventHub.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.47.216.64/26\"\ - ,\r\n \"20.51.22.128/26\",\r\n \"20.51.23.0/25\",\r\n \ - \ \"20.51.23.128/26\",\r\n \"40.74.146.16/28\",\r\n \ - \ \"40.74.151.0/26\",\r\n \"40.75.34.0/28\",\r\n \"40.89.122.0/26\"\ - ,\r\n \"52.138.90.0/28\",\r\n \"52.225.184.224/32\",\r\n\ - \ \"52.225.186.130/32\",\r\n \"2603:1030:40b:1::240/122\"\ - ,\r\n \"2603:1030:40b:2::4c0/122\",\r\n \"2603:1030:40b:3::/120\"\ - ,\r\n \"2603:1030:40b:400::9c0/123\",\r\n \"2603:1030:40b:800::160/123\"\ - ,\r\n \"2603:1030:40b:c00::160/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.FranceCentral\",\r\n \"\ - id\": \"EventHub.FranceCentral\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"40.79.130.16/28\"\ - ,\r\n \"40.79.138.0/28\",\r\n \"40.79.142.0/26\",\r\n \ - \ \"40.79.146.0/28\",\r\n \"40.79.149.64/26\",\r\n \ - \ \"51.11.192.128/26\",\r\n \"51.138.214.0/24\",\r\n \"\ - 52.143.136.55/32\",\r\n \"2603:1020:805:1::240/122\",\r\n \ - \ \"2603:1020:805:2::200/120\",\r\n \"2603:1020:805:402::1c0/123\"\ - ,\r\n \"2603:1020:805:802::160/123\",\r\n \"2603:1020:805:c02::160/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.FranceSouth\"\ - ,\r\n \"id\": \"EventHub.FranceSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"40.79.178.32/27\"\ - ,\r\n \"52.136.136.62/32\",\r\n \"52.136.188.0/24\",\r\n\ - \ \"2603:1020:905::240/122\",\r\n \"2603:1020:905:2::/120\"\ - ,\r\n \"2603:1020:905:402::1c0/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.GermanyNorth\",\r\n \"\ - id\": \"EventHub.GermanyNorth\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"51.116.58.128/27\"\ - ,\r\n \"51.116.73.0/24\",\r\n \"2603:1020:d04::240/122\"\ - ,\r\n \"2603:1020:d04:1::600/120\",\r\n \"2603:1020:d04:402::1c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.GermanyWestCentral\"\ - ,\r\n \"id\": \"EventHub.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.52.64.128/26\"\ - ,\r\n \"20.52.92.0/24\",\r\n \"51.116.154.192/27\",\r\n\ - \ \"51.116.242.64/26\",\r\n \"51.116.245.192/27\",\r\n \ - \ \"51.116.246.192/26\",\r\n \"51.116.250.64/26\",\r\n \ - \ \"51.116.254.0/26\",\r\n \"2603:1020:c04:1::240/122\",\r\ - \n \"2603:1020:c04:2::200/120\",\r\n \"2603:1020:c04:402::1c0/123\"\ - ,\r\n \"2603:1020:c04:802::160/123\",\r\n \"2603:1020:c04:c02::160/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.JapanEast\"\ - ,\r\n \"id\": \"EventHub.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.71.154.11/32\"\ - ,\r\n \"13.78.106.64/28\",\r\n \"20.89.0.64/26\",\r\n \ - \ \"20.89.10.0/24\",\r\n \"20.194.128.192/26\",\r\n \ - \ \"23.100.100.84/32\",\r\n \"40.79.186.32/27\",\r\n \ - \ \"40.79.191.128/26\",\r\n \"40.79.194.192/26\",\r\n \"\ - 52.243.36.161/32\",\r\n \"138.91.1.105/32\",\r\n \"2603:1040:407:1::240/122\"\ - ,\r\n \"2603:1040:407:2::200/120\",\r\n \"2603:1040:407:402::1c0/123\"\ - ,\r\n \"2603:1040:407:802::160/123\",\r\n \"2603:1040:407:c02::160/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.JapanWest\"\ - ,\r\n \"id\": \"EventHub.JapanWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.189.231.0/24\"\ - ,\r\n \"40.74.100.0/27\",\r\n \"40.74.141.187/32\",\r\n\ - \ \"138.91.17.38/32\",\r\n \"138.91.17.85/32\",\r\n \ - \ \"2603:1040:606::240/122\",\r\n \"2603:1040:606:2::/120\"\ - ,\r\n \"2603:1040:606:402::1c0/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.JioIndiaCentral\",\r\n \ - \ \"id\": \"EventHub.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.192.33.64/26\"\ - ,\r\n \"20.192.51.96/27\",\r\n \"20.192.51.128/25\",\r\n\ - \ \"20.192.55.0/26\",\r\n \"20.192.225.160/27\",\r\n \ - \ \"20.192.234.32/27\",\r\n \"2603:1040:1104:400::1c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.JioIndiaWest\"\ - ,\r\n \"id\": \"EventHub.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.192.161.64/27\"\ - ,\r\n \"20.193.195.32/27\",\r\n \"20.193.195.64/26\",\r\n\ - \ \"20.193.195.128/25\",\r\n \"20.193.202.32/27\",\r\n \ - \ \"20.193.204.192/26\",\r\n \"2603:1040:d04::240/122\",\r\ - \n \"2603:1040:d04:2::500/120\",\r\n \"2603:1040:d04:400::2c0/123\"\ - ,\r\n \"2603:1040:d04:c02::c0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"EventHub.KoreaCentral\",\r\n \"\ - id\": \"EventHub.KoreaCentral\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \ - \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.44.26.64/26\"\ - ,\r\n \"20.44.31.128/26\",\r\n \"20.194.68.192/26\",\r\n\ - \ \"20.194.80.0/26\",\r\n \"20.200.193.0/24\",\r\n \ - \ \"52.231.18.16/28\",\r\n \"52.231.29.105/32\",\r\n \ - \ \"52.231.32.85/32\",\r\n \"52.231.32.94/32\",\r\n \"\ - 2603:1040:f05:1::240/122\",\r\n \"2603:1040:f05:2::600/120\",\r\n\ - \ \"2603:1040:f05:402::1c0/123\",\r\n \"2603:1040:f05:802::160/123\"\ - ,\r\n \"2603:1040:f05:c02::160/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.KoreaSouth\",\r\n \"id\"\ - : \"EventHub.KoreaSouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventHub\"\ - ,\r\n \"addressPrefixes\": [\r\n \"52.147.115.0/24\",\r\n\ - \ \"52.231.146.32/27\",\r\n \"52.231.200.144/32\",\r\n \ - \ \"52.231.200.153/32\",\r\n \"52.231.207.155/32\",\r\n \ - \ \"2603:1040:e05::500/120\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"EventHub.NorthCentralUS\",\r\n \"id\": \"\ - EventHub.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.51.3.0/24\"\ - ,\r\n \"23.96.214.181/32\",\r\n \"23.96.253.236/32\",\r\n\ - \ \"52.162.106.64/26\",\r\n \"52.237.143.176/32\",\r\n \ - \ \"168.62.234.250/32\",\r\n \"168.62.237.3/32\",\r\n \ - \ \"168.62.249.226/32\",\r\n \"191.236.128.253/32\",\r\n \ - \ \"191.236.129.107/32\",\r\n \"2603:1030:608::240/122\",\r\ - \n \"2603:1030:608:1::600/120\",\r\n \"2603:1030:608:402::1c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.NorthEurope\"\ - ,\r\n \"id\": \"EventHub.NorthEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.69.227.0/26\"\ - ,\r\n \"13.69.239.0/26\",\r\n \"13.69.253.135/32\",\r\n\ - \ \"13.69.255.140/32\",\r\n \"13.74.107.0/26\",\r\n \ - \ \"20.50.72.64/26\",\r\n \"20.50.80.64/26\",\r\n \"\ - 20.82.245.0/24\",\r\n \"23.102.0.186/32\",\r\n \"23.102.0.239/32\"\ - ,\r\n \"23.102.53.113/32\",\r\n \"40.69.29.216/32\",\r\n\ - \ \"40.69.217.246/32\",\r\n \"40.127.132.254/32\",\r\n \ - \ \"51.104.165.162/32\",\r\n \"52.138.147.148/32\",\r\n \ - \ \"52.138.226.0/26\",\r\n \"52.169.18.8/32\",\r\n \ - \ \"52.178.211.227/32\",\r\n \"104.41.201.10/32\",\r\n \ - \ \"168.61.92.197/32\",\r\n \"191.238.99.131/32\",\r\n \ - \ \"2603:1020:5:1::240/122\",\r\n \"2603:1020:5:402::1c0/123\",\r\ - \n \"2603:1020:5:802::160/123\",\r\n \"2603:1020:5:c02::160/123\"\ - ,\r\n \"2603:10e1:100:2::3368:a5a2/128\"\r\n ]\r\n }\r\ - \n },\r\n {\r\n \"name\": \"EventHub.NorwayEast\",\r\n \"\ - id\": \"EventHub.NorwayEast\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventHub\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.100.0.0/26\",\r\n \ - \ \"51.13.0.192/26\",\r\n \"51.120.98.128/27\",\r\n \ - \ \"51.120.106.64/26\",\r\n \"51.120.210.64/26\",\r\n \ - \ \"2603:1020:e04:1::240/122\",\r\n \"2603:1020:e04:3::600/120\"\ - ,\r\n \"2603:1020:e04:402::1c0/123\",\r\n \"2603:1020:e04:802::160/123\"\ - ,\r\n \"2603:1020:e04:c02::160/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.NorwayWest\",\r\n \"id\"\ - : \"EventHub.NorwayWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventHub\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.13.140.0/24\",\r\n \ - \ \"51.120.218.160/27\",\r\n \"2603:1020:f04::240/122\",\r\ - \n \"2603:1020:f04:3::/120\",\r\n \"2603:1020:f04:402::1c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.SouthAfricaNorth\"\ - ,\r\n \"id\": \"EventHub.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"102.37.72.64/26\"\ - ,\r\n \"102.37.165.0/24\",\r\n \"102.133.122.64/26\",\r\n\ - \ \"102.133.127.0/26\",\r\n \"102.133.154.128/26\",\r\n\ - \ \"102.133.250.64/26\",\r\n \"102.133.254.0/26\",\r\n \ - \ \"2603:1000:104:1::240/122\",\r\n \"2603:1000:104:2::500/120\"\ - ,\r\n \"2603:1000:104:402::1c0/123\",\r\n \"2603:1000:104:802::160/123\"\ - ,\r\n \"2603:1000:104:c02::160/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.SouthAfricaWest\",\r\n \ - \ \"id\": \"EventHub.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"102.37.65.0/26\"\ - ,\r\n \"102.37.83.0/24\",\r\n \"102.133.26.128/26\",\r\n\ - \ \"2603:1000:4::240/122\",\r\n \"2603:1000:4:2::/120\"\ - ,\r\n \"2603:1000:4:402::1c0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"EventHub.SouthCentralUS\",\r\n \"\ - id\": \"EventHub.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.65.209.24/32\"\ - ,\r\n \"13.84.145.196/32\",\r\n \"20.45.122.64/26\",\r\n\ - \ \"20.45.126.192/26\",\r\n \"20.49.93.64/27\",\r\n \ - \ \"20.49.93.128/27\",\r\n \"20.49.95.128/26\",\r\n \ - \ \"20.97.32.192/26\",\r\n \"23.102.128.15/32\",\r\n \"\ - 23.102.160.39/32\",\r\n \"23.102.161.227/32\",\r\n \"23.102.163.4/32\"\ - ,\r\n \"23.102.165.127/32\",\r\n \"23.102.167.73/32\",\r\ - \n \"23.102.180.26/32\",\r\n \"40.84.150.241/32\",\r\n \ - \ \"40.84.185.67/32\",\r\n \"40.124.65.64/26\",\r\n \ - \ \"104.44.129.14/32\",\r\n \"104.44.129.59/32\",\r\n \ - \ \"104.210.146.250/32\",\r\n \"104.214.18.128/27\",\r\n \ - \ \"104.214.70.229/32\",\r\n \"191.238.160.221/32\",\r\n \ - \ \"2603:1030:807:1::240/122\",\r\n \"2603:1030:807:402::1c0/123\"\ - ,\r\n \"2603:1030:807:802::160/123\",\r\n \"2603:1030:807:c02::160/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.SouthCentralUSSTG\"\ - ,\r\n \"id\": \"EventHub.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.44.2.128/26\"\ - ,\r\n \"20.45.117.128/26\",\r\n \"2603:1030:302::200/120\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.SoutheastAsia\"\ - ,\r\n \"id\": \"EventHub.SoutheastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.67.8.64/27\"\ - ,\r\n \"13.67.20.64/26\",\r\n \"13.76.179.223/32\",\r\n\ - \ \"13.76.216.217/32\",\r\n \"20.195.81.0/24\",\r\n \ - \ \"20.195.97.0/32\",\r\n \"23.98.64.92/32\",\r\n \"\ - 23.98.65.24/32\",\r\n \"23.98.82.64/27\",\r\n \"23.98.87.192/26\"\ - ,\r\n \"23.98.112.192/26\",\r\n \"40.78.234.0/27\",\r\n\ - \ \"52.187.2.226/32\",\r\n \"52.187.59.188/32\",\r\n \ - \ \"52.187.61.82/32\",\r\n \"52.187.185.159/32\",\r\n \ - \ \"104.43.18.219/32\",\r\n \"137.116.157.26/32\",\r\n \ - \ \"137.116.158.30/32\",\r\n \"207.46.227.14/32\",\r\n \ - \ \"2603:1040:5:1::240/122\",\r\n \"2603:1040:5:402::1c0/123\"\ - ,\r\n \"2603:1040:5:802::160/123\",\r\n \"2603:1040:5:c02::160/123\"\ - ,\r\n \"2603:10e1:100:2::14c3:6100/128\"\r\n ]\r\n }\r\ - \n },\r\n {\r\n \"name\": \"EventHub.SouthIndia\",\r\n \"\ - id\": \"EventHub.SouthIndia\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.71.123.78/32\"\ - ,\r\n \"40.78.194.32/27\",\r\n \"52.172.119.0/24\",\r\n\ - \ \"104.211.224.190/32\",\r\n \"104.211.224.238/32\",\r\n\ - \ \"2603:1040:c06::240/122\",\r\n \"2603:1040:c06:2::/120\"\ - ,\r\n \"2603:1040:c06:402::1c0/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.SwedenCentral\",\r\n \"\ - id\": \"EventHub.SwedenCentral\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \ - \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"51.12.30.0/24\"\ - ,\r\n \"51.12.98.160/27\",\r\n \"51.12.102.64/26\",\r\n\ - \ \"51.12.226.64/26\",\r\n \"51.12.234.64/26\",\r\n \ - \ \"2603:1020:1004::240/122\",\r\n \"2603:1020:1004:2::400/120\"\ - ,\r\n \"2603:1020:1004:400::2c0/123\",\r\n \"2603:1020:1004:c02::c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.SwitzerlandNorth\"\ - ,\r\n \"id\": \"EventHub.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.208.19.64/26\"\ - ,\r\n \"51.103.203.64/26\",\r\n \"51.107.58.128/27\",\r\n\ - \ \"51.107.129.0/26\",\r\n \"51.107.245.0/24\",\r\n \ - \ \"2603:1020:a04:1::240/122\",\r\n \"2603:1020:a04:2::200/120\"\ - ,\r\n \"2603:1020:a04:402::1c0/123\",\r\n \"2603:1020:a04:802::160/123\"\ - ,\r\n \"2603:1020:a04:c02::160/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.SwitzerlandWest\",\r\n \ - \ \"id\": \"EventHub.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"51.107.154.128/27\"\ - ,\r\n \"51.107.253.0/24\",\r\n \"2603:1020:b04::240/122\"\ - ,\r\n \"2603:1020:b04:2::/120\",\r\n \"2603:1020:b04:402::1c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.UAECentral\"\ - ,\r\n \"id\": \"EventHub.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.37.74.0/27\"\ - ,\r\n \"20.45.92.0/24\",\r\n \"2603:1040:b04::240/122\"\ - ,\r\n \"2603:1040:b04:2::/120\",\r\n \"2603:1040:b04:402::1c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.UAENorth\"\ - ,\r\n \"id\": \"EventHub.UAENorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"40.120.75.64/27\"\ - ,\r\n \"40.120.78.0/26\",\r\n \"40.120.84.0/24\",\r\n \ - \ \"65.52.250.32/27\",\r\n \"2603:1040:904:1::240/122\",\r\ - \n \"2603:1040:904:2::200/120\",\r\n \"2603:1040:904:402::1c0/123\"\ - ,\r\n \"2603:1040:904:802::160/123\",\r\n \"2603:1040:904:c02::160/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.UKSouth\"\ - ,\r\n \"id\": \"EventHub.UKSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.90.128.128/26\"\ - ,\r\n \"51.105.66.64/26\",\r\n \"51.105.71.0/26\",\r\n \ - \ \"51.105.74.64/26\",\r\n \"51.132.192.192/26\",\r\n \ - \ \"51.140.80.99/32\",\r\n \"51.140.87.93/32\",\r\n \ - \ \"51.140.125.8/32\",\r\n \"51.140.146.32/28\",\r\n \"\ - 51.140.149.192/26\",\r\n \"51.140.189.52/32\",\r\n \"51.140.189.108/32\"\ - ,\r\n \"2603:1020:705:1::240/122\",\r\n \"2603:1020:705:2::400/120\"\ - ,\r\n \"2603:1020:705:402::1c0/123\",\r\n \"2603:1020:705:802::160/123\"\ - ,\r\n \"2603:1020:705:c02::160/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.UKWest\",\r\n \"id\":\ - \ \"EventHub.UKWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\"\ - : \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventHub\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.58.69.0/24\",\r\n \ - \ \"51.140.210.32/27\",\r\n \"51.141.14.113/32\",\r\n \ - \ \"51.141.14.168/32\",\r\n \"51.141.50.179/32\",\r\n \ - \ \"2603:1020:605::240/122\",\r\n \"2603:1020:605:2::/120\",\r\ - \n \"2603:1020:605:402::1c0/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"EventHub.WestCentralUS\",\r\n \"id\"\ - : \"EventHub.WestCentralUS\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.71.194.64/27\"\ - ,\r\n \"13.78.149.209/32\",\r\n \"13.78.150.233/32\",\r\n\ - \ \"13.78.191.44/32\",\r\n \"20.69.3.0/24\",\r\n \ - \ \"52.161.19.160/32\",\r\n \"52.161.24.64/32\",\r\n \"\ - 2603:1030:b04::240/122\",\r\n \"2603:1030:b04:1::600/120\",\r\n \ - \ \"2603:1030:b04:402::1c0/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"EventHub.WestEurope\",\r\n \"id\": \"EventHub.WestEurope\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"5\",\r\n \"region\": \"westeurope\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureEventHub\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.69.64.0/26\",\r\n \"\ - 13.69.106.0/26\",\r\n \"13.69.111.128/26\",\r\n \"20.50.201.64/26\"\ - ,\r\n \"20.76.242.45/32\",\r\n \"20.86.89.0/24\",\r\n \ - \ \"23.97.226.21/32\",\r\n \"23.100.14.185/32\",\r\n \ - \ \"40.68.35.230/32\",\r\n \"40.68.39.15/32\",\r\n \"\ - 40.68.93.145/32\",\r\n \"40.68.205.113/32\",\r\n \"40.68.217.242/32\"\ - ,\r\n \"51.144.238.23/32\",\r\n \"52.174.243.57/32\",\r\n\ - \ \"52.178.17.128/26\",\r\n \"52.178.78.61/32\",\r\n \ - \ \"52.232.27.189/32\",\r\n \"52.233.190.35/32\",\r\n \ - \ \"52.233.192.247/32\",\r\n \"52.236.186.0/26\",\r\n \ - \ \"65.52.129.16/32\",\r\n \"104.40.150.139/32\",\r\n \ - \ \"104.40.179.185/32\",\r\n \"104.40.216.174/32\",\r\n \ - \ \"104.46.32.56/32\",\r\n \"104.46.32.58/32\",\r\n \"191.233.73.228/32\"\ - ,\r\n \"2603:1020:206:1::240/122\",\r\n \"2603:1020:206:4::100/120\"\ - ,\r\n \"2603:1020:206:402::1c0/123\",\r\n \"2603:1020:206:802::160/123\"\ - ,\r\n \"2603:1020:206:c02::160/123\",\r\n \"2603:10e1:100:2::144c:f22d/128\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.WestIndia\"\ - ,\r\n \"id\": \"EventHub.WestIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.192.83.0/24\"\ - ,\r\n \"104.211.146.32/27\",\r\n \"104.211.160.121/32\"\ - ,\r\n \"104.211.160.144/32\",\r\n \"2603:1040:806::240/122\"\ - ,\r\n \"2603:1040:806:2::/120\",\r\n \"2603:1040:806:402::1c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.WestUS\"\ - ,\r\n \"id\": \"EventHub.WestUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.64.195.117/32\"\ - ,\r\n \"13.88.20.117/32\",\r\n \"13.88.26.28/32\",\r\n \ - \ \"13.91.61.11/32\",\r\n \"13.93.226.138/32\",\r\n \ - \ \"20.66.7.0/24\",\r\n \"23.99.7.105/32\",\r\n \"23.99.54.235/32\"\ - ,\r\n \"23.99.60.253/32\",\r\n \"23.99.80.186/32\",\r\n\ - \ \"40.78.110.196/32\",\r\n \"40.83.191.202/32\",\r\n \ - \ \"40.83.222.100/32\",\r\n \"40.86.176.23/32\",\r\n \ - \ \"40.112.185.115/32\",\r\n \"40.112.213.11/32\",\r\n \ - \ \"40.112.242.0/25\",\r\n \"104.40.26.199/32\",\r\n \ - \ \"104.40.29.113/32\",\r\n \"104.40.68.250/32\",\r\n \"\ - 104.40.69.64/32\",\r\n \"104.42.97.95/32\",\r\n \"138.91.193.184/32\"\ - ,\r\n \"2603:1030:a07::240/122\",\r\n \"2603:1030:a07:1::600/120\"\ - ,\r\n \"2603:1030:a07:402::140/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"EventHub.WestUS2\",\r\n \"id\"\ - : \"EventHub.WestUS2\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \"\ - region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventHub\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.138.64/28\",\r\n\ - \ \"13.66.145.128/26\",\r\n \"13.66.149.0/26\",\r\n \ - \ \"13.66.228.204/32\",\r\n \"13.66.230.42/32\",\r\n \ - \ \"20.42.131.16/28\",\r\n \"20.42.131.64/26\",\r\n \"\ - 20.51.14.96/27\",\r\n \"20.51.14.128/25\",\r\n \"20.83.192.0/26\"\ - ,\r\n \"40.64.113.64/26\",\r\n \"40.78.242.128/28\",\r\n\ - \ \"40.78.247.0/26\",\r\n \"40.78.250.64/28\",\r\n \ - \ \"40.78.253.128/26\",\r\n \"40.125.103.251/32\",\r\n \ - \ \"52.151.58.121/32\",\r\n \"52.183.46.73/32\",\r\n \ - \ \"52.183.86.102/32\",\r\n \"2603:1030:c06:1::240/122\",\r\n \ - \ \"2603:1030:c06:2::600/120\",\r\n \"2603:1030:c06:400::9c0/123\"\ - ,\r\n \"2603:1030:c06:802::160/123\",\r\n \"2603:1030:c06:c02::160/123\"\ - ,\r\n \"2603:10e1:100:2::287d:67fb/128\"\r\n ]\r\n }\r\ - \n },\r\n {\r\n \"name\": \"EventHub.WestUS3\",\r\n \"id\"\ - : \"EventHub.WestUS3\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"\ - region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureEventHub\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.150.160.224/27\",\r\n\ - \ \"20.150.170.160/27\",\r\n \"20.150.175.64/26\",\r\n \ - \ \"20.150.178.64/26\",\r\n \"20.150.182.0/27\",\r\n \ - \ \"20.150.186.64/26\",\r\n \"20.150.189.128/26\",\r\n \ - \ \"20.150.246.32/27\",\r\n \"20.150.246.64/26\",\r\n \ - \ \"20.150.246.128/25\",\r\n \"2603:1030:504:1::240/122\",\r\n\ - \ \"2603:1030:504:2::400/120\",\r\n \"2603:1030:504:402::2c0/123\"\ - ,\r\n \"2603:1030:504:802::240/123\",\r\n \"2603:1030:504:c02::c0/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"GatewayManager\"\ - ,\r\n \"id\": \"GatewayManager\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"GatewayManager\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.65.91.57/32\",\r\n \ - \ \"13.66.140.144/29\",\r\n \"13.67.9.128/29\",\r\n \ - \ \"13.69.64.224/29\",\r\n \"13.69.227.224/29\",\r\n \ - \ \"13.70.72.208/29\",\r\n \"13.70.185.130/32\",\r\n \"\ - 13.71.170.240/29\",\r\n \"13.71.194.232/29\",\r\n \"13.75.36.8/29\"\ - ,\r\n \"13.77.0.146/32\",\r\n \"13.77.50.88/29\",\r\n \ - \ \"13.78.108.16/29\",\r\n \"13.78.188.33/32\",\r\n \ - \ \"13.85.74.21/32\",\r\n \"13.87.35.147/32\",\r\n \"\ - 13.87.36.246/32\",\r\n \"13.87.56.104/29\",\r\n \"13.87.122.104/29\"\ - ,\r\n \"13.89.171.96/29\",\r\n \"13.91.249.235/32\",\r\n\ - \ \"13.91.254.232/32\",\r\n \"13.92.84.128/32\",\r\n \ - \ \"13.93.112.146/32\",\r\n \"13.93.117.26/32\",\r\n \ - \ \"20.21.32.64/26\",\r\n \"20.36.42.151/32\",\r\n \"\ - 20.36.42.152/32\",\r\n \"20.36.74.91/32\",\r\n \"20.36.74.113/32\"\ - ,\r\n \"20.36.106.72/29\",\r\n \"20.36.114.24/29\",\r\n\ - \ \"20.36.120.72/29\",\r\n \"20.37.53.66/32\",\r\n \ - \ \"20.37.53.76/32\",\r\n \"20.37.64.72/29\",\r\n \"\ - 20.37.74.88/29\",\r\n \"20.37.152.72/29\",\r\n \"20.37.192.72/29\"\ - ,\r\n \"20.37.224.72/29\",\r\n \"20.38.80.72/29\",\r\n \ - \ \"20.38.136.72/29\",\r\n \"20.39.1.56/32\",\r\n \ - \ \"20.39.1.58/32\",\r\n \"20.39.8.72/29\",\r\n \"20.39.26.140/32\"\ - ,\r\n \"20.39.26.246/32\",\r\n \"20.40.173.147/32\",\r\n\ - \ \"20.41.0.72/29\",\r\n \"20.41.64.72/29\",\r\n \ - \ \"20.41.192.72/29\",\r\n \"20.42.0.72/29\",\r\n \"20.42.128.72/29\"\ - ,\r\n \"20.42.224.72/29\",\r\n \"20.43.40.72/29\",\r\n \ - \ \"20.43.64.72/29\",\r\n \"20.43.128.72/29\",\r\n \ - \ \"20.44.3.16/29\",\r\n \"20.45.112.72/29\",\r\n \"\ - 20.45.192.72/29\",\r\n \"20.46.13.128/26\",\r\n \"20.54.106.86/32\"\ - ,\r\n \"20.54.121.133/32\",\r\n \"20.72.16.64/26\",\r\n\ - \ \"20.74.0.115/32\",\r\n \"20.74.0.127/32\",\r\n \ - \ \"20.99.8.0/26\",\r\n \"20.150.160.64/29\",\r\n \"\ - 20.150.161.0/26\",\r\n \"20.150.171.64/29\",\r\n \"20.189.104.72/29\"\ - ,\r\n \"20.189.180.225/32\",\r\n \"20.189.181.8/32\",\r\n\ - \ \"20.192.47.0/26\",\r\n \"20.192.160.64/26\",\r\n \ - \ \"20.192.224.192/26\",\r\n \"20.193.142.141/32\",\r\n \ - \ \"20.193.142.178/32\",\r\n \"20.194.75.128/26\",\r\n \ - \ \"20.195.37.65/32\",\r\n \"20.195.38.22/32\",\r\n \ - \ \"20.195.78.0/26\",\r\n \"23.100.231.72/32\",\r\n \"23.100.231.96/32\"\ - ,\r\n \"23.101.173.90/32\",\r\n \"40.67.48.72/29\",\r\n\ - \ \"40.67.59.64/29\",\r\n \"40.69.106.88/29\",\r\n \ - \ \"40.70.146.224/29\",\r\n \"40.71.11.96/29\",\r\n \ - \ \"40.74.24.72/29\",\r\n \"40.74.100.168/29\",\r\n \"40.78.194.88/29\"\ - ,\r\n \"40.78.202.112/29\",\r\n \"40.79.130.224/29\",\r\n\ - \ \"40.79.178.88/29\",\r\n \"40.80.56.72/29\",\r\n \ - \ \"40.80.168.72/29\",\r\n \"40.80.184.72/29\",\r\n \ - \ \"40.81.94.172/32\",\r\n \"40.81.94.182/32\",\r\n \"40.81.180.83/32\"\ - ,\r\n \"40.81.182.82/32\",\r\n \"40.81.189.24/32\",\r\n\ - \ \"40.81.189.42/32\",\r\n \"40.82.236.2/32\",\r\n \ - \ \"40.82.236.13/32\",\r\n \"40.82.248.240/29\",\r\n \ - \ \"40.88.222.179/32\",\r\n \"40.88.223.53/32\",\r\n \"\ - 40.89.16.72/29\",\r\n \"40.89.217.100/32\",\r\n \"40.89.217.109/32\"\ - ,\r\n \"40.90.186.21/32\",\r\n \"40.90.186.91/32\",\r\n\ - \ \"40.91.89.36/32\",\r\n \"40.91.91.51/32\",\r\n \ - \ \"40.112.242.168/29\",\r\n \"40.115.248.200/32\",\r\n \ - \ \"40.115.254.17/32\",\r\n \"40.119.8.64/29\",\r\n \"\ - 40.124.139.107/32\",\r\n \"40.124.139.174/32\",\r\n \"51.12.40.192/26\"\ - ,\r\n \"51.12.192.192/26\",\r\n \"51.104.24.72/29\",\r\n\ - \ \"51.105.80.72/29\",\r\n \"51.105.88.72/29\",\r\n \ - \ \"51.107.48.72/29\",\r\n \"51.107.59.32/29\",\r\n \ - \ \"51.107.144.72/29\",\r\n \"51.107.155.32/29\",\r\n \"\ - 51.107.247.0/26\",\r\n \"51.116.48.72/29\",\r\n \"51.116.59.32/29\"\ - ,\r\n \"51.116.144.72/29\",\r\n \"51.116.155.96/29\",\r\n\ - \ \"51.120.40.72/29\",\r\n \"51.120.98.168/29\",\r\n \ - \ \"51.120.219.64/29\",\r\n \"51.120.224.72/29\",\r\n \ - \ \"51.120.235.128/26\",\r\n \"51.137.160.72/29\",\r\n \ - \ \"51.140.63.41/32\",\r\n \"51.140.114.209/32\",\r\n \ - \ \"51.140.148.16/29\",\r\n \"51.140.210.200/29\",\r\n \ - \ \"51.141.25.80/32\",\r\n \"51.141.29.178/32\",\r\n \"\ - 51.143.192.72/29\",\r\n \"52.136.48.72/29\",\r\n \"52.136.137.15/32\"\ - ,\r\n \"52.136.137.16/32\",\r\n \"52.138.70.115/32\",\r\n\ - \ \"52.138.71.153/32\",\r\n \"52.138.90.40/29\",\r\n \ - \ \"52.139.87.129/32\",\r\n \"52.139.87.150/32\",\r\n \ - \ \"52.140.104.72/29\",\r\n \"52.142.152.114/32\",\r\n \ - \ \"52.142.154.100/32\",\r\n \"52.143.136.58/31\",\r\n \ - \ \"52.143.250.137/32\",\r\n \"52.143.251.22/32\",\r\n \ - \ \"52.147.44.33/32\",\r\n \"52.148.30.6/32\",\r\n \"52.149.24.100/32\"\ - ,\r\n \"52.149.26.14/32\",\r\n \"52.150.136.72/29\",\r\n\ - \ \"52.159.19.113/32\",\r\n \"52.159.20.67/32\",\r\n \ - \ \"52.159.21.124/32\",\r\n \"52.161.28.251/32\",\r\n \ - \ \"52.162.106.168/29\",\r\n \"52.163.241.22/32\",\r\n \ - \ \"52.163.246.27/32\",\r\n \"52.165.221.72/32\",\r\n \ - \ \"52.169.225.171/32\",\r\n \"52.169.231.163/32\",\r\n \ - \ \"52.172.28.183/32\",\r\n \"52.172.31.29/32\",\r\n \"\ - 52.172.204.73/32\",\r\n \"52.172.222.13/32\",\r\n \"52.173.250.124/32\"\ - ,\r\n \"52.177.204.204/32\",\r\n \"52.177.207.219/32\",\r\ - \n \"52.179.10.142/32\",\r\n \"52.180.178.35/32\",\r\n \ - \ \"52.180.178.191/32\",\r\n \"52.180.182.210/32\",\r\n \ - \ \"52.184.255.23/32\",\r\n \"52.191.140.123/32\",\r\n \ - \ \"52.191.170.38/32\",\r\n \"52.228.80.72/29\",\r\n \ - \ \"52.229.161.220/32\",\r\n \"52.229.166.101/32\",\r\n \ - \ \"52.231.18.224/29\",\r\n \"52.231.24.186/32\",\r\n \ - \ \"52.231.35.84/32\",\r\n \"52.231.146.200/29\",\r\n \ - \ \"52.231.203.87/32\",\r\n \"52.231.204.175/32\",\r\n \"\ - 52.237.24.145/32\",\r\n \"52.237.30.255/32\",\r\n \"52.237.208.51/32\"\ - ,\r\n \"52.237.215.149/32\",\r\n \"52.242.17.200/32\",\r\ - \n \"52.242.28.83/32\",\r\n \"52.251.12.161/32\",\r\n \ - \ \"52.253.157.2/32\",\r\n \"52.253.159.209/32\",\r\n \ - \ \"52.253.232.235/32\",\r\n \"52.253.239.162/32\",\r\n \ - \ \"65.52.250.24/29\",\r\n \"70.37.160.97/32\",\r\n \ - \ \"70.37.161.124/32\",\r\n \"102.133.27.16/29\",\r\n \"\ - 102.133.56.72/29\",\r\n \"102.133.155.16/29\",\r\n \"102.133.216.72/29\"\ - ,\r\n \"104.211.81.208/29\",\r\n \"104.211.146.88/29\",\r\ - \n \"104.211.188.0/32\",\r\n \"104.211.191.94/32\",\r\n\ - \ \"104.214.19.64/29\",\r\n \"104.215.50.115/32\",\r\n \ - \ \"104.215.52.27/32\",\r\n \"168.62.104.154/32\",\r\n \ - \ \"168.62.208.162/32\",\r\n \"168.62.209.95/32\",\r\n \ - \ \"191.233.8.64/26\",\r\n \"191.233.203.208/29\",\r\n \ - \ \"191.233.245.75/32\",\r\n \"191.233.245.118/32\",\r\n \ - \ \"191.234.182.29/32\",\r\n \"191.235.81.58/32\",\r\n \ - \ \"191.235.224.72/29\",\r\n \"2603:1000:4::40/122\",\r\n \ - \ \"2603:1000:104:1::40/122\",\r\n \"2603:1010:6:1::40/122\"\ - ,\r\n \"2603:1010:101::40/122\",\r\n \"2603:1010:304::40/122\"\ - ,\r\n \"2603:1010:404::40/122\",\r\n \"2603:1020:5:1::40/122\"\ - ,\r\n \"2603:1020:206:1::40/122\",\r\n \"2603:1020:305::40/122\"\ - ,\r\n \"2603:1020:405::40/122\",\r\n \"2603:1020:605::40/122\"\ - ,\r\n \"2603:1020:705:1::40/122\",\r\n \"2603:1020:805:1::40/122\"\ - ,\r\n \"2603:1020:905::40/122\",\r\n \"2603:1020:a04:1::40/122\"\ - ,\r\n \"2603:1020:b04::40/122\",\r\n \"2603:1020:c04:1::40/122\"\ - ,\r\n \"2603:1020:d04::40/122\",\r\n \"2603:1020:e04:1::40/122\"\ - ,\r\n \"2603:1020:f04::40/122\",\r\n \"2603:1020:1004::40/122\"\ - ,\r\n \"2603:1020:1104::40/122\",\r\n \"2603:1030:f:1::40/122\"\ - ,\r\n \"2603:1030:10:1::40/122\",\r\n \"2603:1030:104:1::40/122\"\ - ,\r\n \"2603:1030:107::40/122\",\r\n \"2603:1030:210:1::40/122\"\ - ,\r\n \"2603:1030:40b:1::40/122\",\r\n \"2603:1030:40c:1::40/122\"\ - ,\r\n \"2603:1030:504:1::40/122\",\r\n \"2603:1030:608::40/122\"\ - ,\r\n \"2603:1030:807:1::40/122\",\r\n \"2603:1030:a07::40/122\"\ - ,\r\n \"2603:1030:b04::40/122\",\r\n \"2603:1030:c06:1::40/122\"\ - ,\r\n \"2603:1030:f05:1::40/122\",\r\n \"2603:1030:1005::40/122\"\ - ,\r\n \"2603:1040:5:1::40/122\",\r\n \"2603:1040:207::40/122\"\ - ,\r\n \"2603:1040:407:1::40/122\",\r\n \"2603:1040:606::40/122\"\ - ,\r\n \"2603:1040:806::40/122\",\r\n \"2603:1040:904:1::40/122\"\ - ,\r\n \"2603:1040:a06:1::40/122\",\r\n \"2603:1040:b04::40/122\"\ - ,\r\n \"2603:1040:c06::40/122\",\r\n \"2603:1040:d04::40/122\"\ - ,\r\n \"2603:1040:f05:1::40/122\",\r\n \"2603:1040:1002::80/122\"\ - ,\r\n \"2603:1040:1104::40/122\",\r\n \"2603:1050:6:1::40/122\"\ - ,\r\n \"2603:1050:403::40/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"GuestAndHybridManagement\",\r\n \"id\":\ - \ \"GuestAndHybridManagement\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureAutomation\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.65.24.129/32\",\r\n\ - \ \"13.66.138.94/31\",\r\n \"13.66.141.224/29\",\r\n \ - \ \"13.66.145.80/28\",\r\n \"13.67.8.110/31\",\r\n \ - \ \"13.67.10.72/29\",\r\n \"13.69.64.78/31\",\r\n \"13.69.67.48/29\"\ - ,\r\n \"13.69.107.64/29\",\r\n \"13.69.109.128/31\",\r\n\ - \ \"13.69.109.176/28\",\r\n \"13.69.227.78/31\",\r\n \ - \ \"13.69.229.248/29\",\r\n \"13.70.72.30/31\",\r\n \ - \ \"13.70.74.80/29\",\r\n \"13.70.123.166/32\",\r\n \"\ - 13.71.170.46/31\",\r\n \"13.71.173.208/29\",\r\n \"13.71.175.144/28\"\ - ,\r\n \"13.71.194.118/31\",\r\n \"13.71.196.128/29\",\r\n\ - \ \"13.71.199.176/28\",\r\n \"13.73.242.40/29\",\r\n \ - \ \"13.73.242.210/31\",\r\n \"13.73.244.208/28\",\r\n \ - \ \"13.74.107.92/31\",\r\n \"13.74.108.136/29\",\r\n \ - \ \"13.75.34.150/31\",\r\n \"13.75.39.104/29\",\r\n \"\ - 13.77.1.26/32\",\r\n \"13.77.1.212/32\",\r\n \"13.77.50.70/31\"\ - ,\r\n \"13.77.53.56/29\",\r\n \"13.77.55.192/28\",\r\n \ - \ \"13.78.59.184/32\",\r\n \"13.78.106.94/31\",\r\n \ - \ \"13.78.109.120/29\",\r\n \"13.78.111.208/28\",\r\n \ - \ \"13.86.219.200/29\",\r\n \"13.86.221.216/31\",\r\n \ - \ \"13.86.223.64/28\",\r\n \"13.87.56.86/31\",\r\n \"13.87.58.72/29\"\ - ,\r\n \"13.87.122.86/31\",\r\n \"13.87.124.72/29\",\r\n\ - \ \"13.88.240.74/32\",\r\n \"13.88.244.195/32\",\r\n \ - \ \"13.89.170.206/31\",\r\n \"13.89.174.136/29\",\r\n \ - \ \"13.89.178.96/28\",\r\n \"13.94.240.75/32\",\r\n \ - \ \"20.21.42.112/29\",\r\n \"20.21.66.88/29\",\r\n \"20.21.74.88/29\"\ - ,\r\n \"20.36.39.150/32\",\r\n \"20.36.106.70/31\",\r\n\ - \ \"20.36.108.128/29\",\r\n \"20.36.108.240/28\",\r\n \ - \ \"20.36.114.22/31\",\r\n \"20.36.117.32/29\",\r\n \ - \ \"20.36.117.144/28\",\r\n \"20.37.74.226/31\",\r\n \ - \ \"20.37.76.120/29\",\r\n \"20.38.128.104/29\",\r\n \"\ - 20.38.128.168/31\",\r\n \"20.38.132.0/28\",\r\n \"20.38.147.152/29\"\ - ,\r\n \"20.38.149.128/31\",\r\n \"20.40.231.60/31\",\r\n\ - \ \"20.42.64.32/31\",\r\n \"20.42.72.128/31\",\r\n \ - \ \"20.42.72.144/28\",\r\n \"20.43.120.248/29\",\r\n \ - \ \"20.43.121.120/31\",\r\n \"20.43.123.48/28\",\r\n \"\ - 20.44.2.6/31\",\r\n \"20.44.4.104/29\",\r\n \"20.44.8.200/29\"\ - ,\r\n \"20.44.10.120/31\",\r\n \"20.44.17.8/29\",\r\n \ - \ \"20.44.17.216/31\",\r\n \"20.44.19.16/28\",\r\n \ - \ \"20.44.27.112/29\",\r\n \"20.44.29.48/31\",\r\n \"\ - 20.44.29.96/28\",\r\n \"20.45.90.94/31\",\r\n \"20.45.93.144/28\"\ - ,\r\n \"20.45.94.64/29\",\r\n \"20.45.123.88/29\",\r\n \ - \ \"20.45.123.232/31\",\r\n \"20.45.241.184/29\",\r\n \ - \ \"20.45.242.0/28\",\r\n \"20.45.242.16/31\",\r\n \ - \ \"20.47.232.160/28\",\r\n \"20.47.232.176/29\",\r\n \"\ - 20.48.201.74/31\",\r\n \"20.48.201.80/28\",\r\n \"20.48.202.0/29\"\ - ,\r\n \"20.49.82.24/29\",\r\n \"20.49.90.24/29\",\r\n \ - \ \"20.51.5.2/31\",\r\n \"20.51.5.8/29\",\r\n \"\ - 20.51.5.16/28\",\r\n \"20.51.14.78/31\",\r\n \"20.51.21.250/31\"\ - ,\r\n \"20.52.89.54/31\",\r\n \"20.52.93.216/29\",\r\n \ - \ \"20.52.94.96/28\",\r\n \"20.53.52.224/28\",\r\n \ - \ \"20.53.52.240/29\",\r\n \"20.53.52.248/31\",\r\n \"\ - 20.53.57.62/31\",\r\n \"20.53.60.80/28\",\r\n \"20.53.60.192/29\"\ - ,\r\n \"20.58.68.60/31\",\r\n \"20.58.71.72/29\",\r\n \ - \ \"20.58.71.224/28\",\r\n \"20.59.79.64/28\",\r\n \ - \ \"20.62.63.252/31\",\r\n \"20.66.6.88/29\",\r\n \"20.69.2.14/31\"\ - ,\r\n \"20.69.4.200/29\",\r\n \"20.69.4.208/28\",\r\n \ - \ \"20.70.220.180/31\",\r\n \"20.70.221.16/28\",\r\n \ - \ \"20.70.221.192/29\",\r\n \"20.72.27.176/29\",\r\n \ - \ \"20.82.246.152/29\",\r\n \"20.83.221.112/28\",\r\n \"\ - 20.83.221.192/29\",\r\n \"20.86.92.252/31\",\r\n \"20.88.154.18/31\"\ - ,\r\n \"20.88.156.168/29\",\r\n \"20.88.156.176/28\",\r\n\ - \ \"20.89.11.118/31\",\r\n \"20.89.11.120/29\",\r\n \ - \ \"20.89.11.224/28\",\r\n \"20.90.129.72/29\",\r\n \ - \ \"20.90.131.96/28\",\r\n \"20.90.131.112/31\",\r\n \"\ - 20.92.3.224/28\",\r\n \"20.92.3.240/29\",\r\n \"20.92.3.248/31\"\ - ,\r\n \"20.97.32.188/31\",\r\n \"20.97.33.120/29\",\r\n\ - \ \"20.97.33.224/28\",\r\n \"20.98.145.72/29\",\r\n \ - \ \"20.98.145.96/28\",\r\n \"20.98.192.224/28\",\r\n \ - \ \"20.98.192.240/29\",\r\n \"20.100.1.128/28\",\r\n \"\ - 20.100.1.144/29\",\r\n \"20.100.1.152/31\",\r\n \"20.105.208.104/29\"\ - ,\r\n \"20.105.208.112/28\",\r\n \"20.111.0.32/28\",\r\n\ - \ \"20.111.0.48/29\",\r\n \"20.150.129.250/31\",\r\n \ - \ \"20.150.130.32/28\",\r\n \"20.150.130.48/29\",\r\n \ - \ \"20.150.171.216/29\",\r\n \"20.150.172.224/31\",\r\n \ - \ \"20.150.179.192/29\",\r\n \"20.150.181.24/31\",\r\n \ - \ \"20.150.181.176/28\",\r\n \"20.150.187.192/29\",\r\n \ - \ \"20.150.189.24/31\",\r\n \"20.189.193.16/28\",\r\n \ - \ \"20.189.193.160/29\",\r\n \"20.189.228.220/31\",\r\n \ - \ \"20.192.50.230/31\",\r\n \"20.192.99.192/29\",\r\n \"\ - 20.192.101.24/31\",\r\n \"20.192.152.148/31\",\r\n \"20.192.152.152/29\"\ - ,\r\n \"20.192.153.64/28\",\r\n \"20.192.168.148/31\",\r\ - \n \"20.192.168.152/29\",\r\n \"20.192.169.96/28\",\r\n\ - \ \"20.192.184.64/28\",\r\n \"20.192.234.176/28\",\r\n \ - \ \"20.192.235.8/29\",\r\n \"20.192.238.120/31\",\r\n \ - \ \"20.193.202.176/28\",\r\n \"20.193.203.192/29\",\r\n \ - \ \"20.194.66.24/29\",\r\n \"20.195.83.58/31\",\r\n \ - \ \"20.195.84.176/28\",\r\n \"20.195.85.0/29\",\r\n \"\ - 20.195.146.206/31\",\r\n \"20.200.194.236/31\",\r\n \"20.200.194.240/28\"\ - ,\r\n \"20.200.195.160/29\",\r\n \"20.205.67.112/28\",\r\ - \n \"20.205.68.96/29\",\r\n \"20.205.68.104/31\",\r\n \ - \ \"20.205.74.88/29\",\r\n \"20.205.82.88/29\",\r\n \ - \ \"20.206.0.72/29\",\r\n \"20.206.0.80/28\",\r\n \"\ - 20.207.0.88/29\",\r\n \"20.207.1.0/28\",\r\n \"20.208.4.96/31\"\ - ,\r\n \"20.208.18.88/29\",\r\n \"23.96.225.107/32\",\r\n\ - \ \"23.96.225.182/32\",\r\n \"23.98.83.64/29\",\r\n \ - \ \"23.98.86.56/31\",\r\n \"40.64.8.178/31\",\r\n \"\ - 40.64.8.184/29\",\r\n \"40.64.9.128/28\",\r\n \"40.67.60.96/29\"\ - ,\r\n \"40.67.60.108/31\",\r\n \"40.69.106.70/31\",\r\n\ - \ \"40.69.108.88/29\",\r\n \"40.69.110.240/28\",\r\n \ - \ \"40.70.146.78/31\",\r\n \"40.70.148.48/29\",\r\n \ - \ \"40.71.10.206/31\",\r\n \"40.71.13.240/29\",\r\n \"\ - 40.71.30.252/32\",\r\n \"40.74.146.82/31\",\r\n \"40.74.149.32/29\"\ - ,\r\n \"40.74.150.16/28\",\r\n \"40.75.35.128/29\",\r\n\ - \ \"40.75.35.216/31\",\r\n \"40.78.194.70/31\",\r\n \ - \ \"40.78.196.88/29\",\r\n \"40.78.202.130/31\",\r\n \ - \ \"40.78.203.248/29\",\r\n \"40.78.229.40/29\",\r\n \"\ - 40.78.236.128/29\",\r\n \"40.78.238.56/31\",\r\n \"40.78.239.32/28\"\ - ,\r\n \"40.78.242.172/31\",\r\n \"40.78.243.24/29\",\r\n\ - \ \"40.78.250.108/31\",\r\n \"40.78.250.216/29\",\r\n \ - \ \"40.79.130.46/31\",\r\n \"40.79.132.40/29\",\r\n \ - \ \"40.79.138.44/31\",\r\n \"40.79.138.152/29\",\r\n \ - \ \"40.79.139.208/28\",\r\n \"40.79.146.44/31\",\r\n \"\ - 40.79.146.152/29\",\r\n \"40.79.156.40/29\",\r\n \"40.79.163.8/29\"\ - ,\r\n \"40.79.163.152/31\",\r\n \"40.79.170.248/29\",\r\n\ - \ \"40.79.171.224/31\",\r\n \"40.79.173.16/28\",\r\n \ - \ \"40.79.178.70/31\",\r\n \"40.79.180.56/29\",\r\n \ - \ \"40.79.180.208/28\",\r\n \"40.79.187.160/29\",\r\n \ - \ \"40.79.189.56/31\",\r\n \"40.79.194.120/29\",\r\n \"\ - 40.79.197.32/31\",\r\n \"40.80.51.88/29\",\r\n \"40.80.53.0/31\"\ - ,\r\n \"40.80.176.48/29\",\r\n \"40.80.180.0/31\",\r\n \ - \ \"40.80.180.96/28\",\r\n \"40.85.168.201/32\",\r\n \ - \ \"40.89.129.151/32\",\r\n \"40.89.132.62/32\",\r\n \ - \ \"40.89.137.16/32\",\r\n \"40.89.157.7/32\",\r\n \"\ - 40.114.77.89/32\",\r\n \"40.114.85.4/32\",\r\n \"40.118.103.191/32\"\ - ,\r\n \"40.120.8.32/28\",\r\n \"40.120.64.48/28\",\r\n \ - \ \"40.120.75.48/29\",\r\n \"40.120.86.146/31\",\r\n \ - \ \"40.120.86.152/29\",\r\n \"40.120.87.32/28\",\r\n \ - \ \"51.11.97.0/31\",\r\n \"51.11.97.64/28\",\r\n \"51.12.22.172/31\"\ - ,\r\n \"51.12.22.176/28\",\r\n \"51.12.22.192/29\",\r\n\ - \ \"51.12.72.220/31\",\r\n \"51.12.73.64/28\",\r\n \ - \ \"51.12.73.80/29\",\r\n \"51.12.99.208/29\",\r\n \"\ - 51.12.203.72/29\",\r\n \"51.12.227.192/29\",\r\n \"51.12.235.192/29\"\ - ,\r\n \"51.13.141.224/28\",\r\n \"51.13.141.240/29\",\r\n\ - \ \"51.103.202.88/29\",\r\n \"51.104.8.240/29\",\r\n \ - \ \"51.104.9.96/31\",\r\n \"51.105.67.168/29\",\r\n \ - \ \"51.105.69.80/31\",\r\n \"51.105.75.152/29\",\r\n \"\ - 51.105.77.48/31\",\r\n \"51.105.77.80/28\",\r\n \"51.107.60.80/29\"\ - ,\r\n \"51.107.60.92/31\",\r\n \"51.107.60.208/28\",\r\n\ - \ \"51.107.156.72/29\",\r\n \"51.107.156.132/31\",\r\n \ - \ \"51.107.156.208/28\",\r\n \"51.107.247.200/29\",\r\n \ - \ \"51.107.247.208/28\",\r\n \"51.107.251.188/31\",\r\n \ - \ \"51.107.254.224/28\",\r\n \"51.107.254.240/29\",\r\n \ - \ \"51.116.55.174/31\",\r\n \"51.116.60.80/29\",\r\n \ - \ \"51.116.60.224/28\",\r\n \"51.116.74.24/29\",\r\n \ - \ \"51.116.74.80/28\",\r\n \"51.116.156.160/29\",\r\n \ - \ \"51.116.158.56/31\",\r\n \"51.116.158.80/28\",\r\n \"\ - 51.116.243.144/29\",\r\n \"51.116.243.216/31\",\r\n \"51.116.251.32/29\"\ - ,\r\n \"51.116.251.184/31\",\r\n \"51.120.100.80/29\",\r\ - \n \"51.120.100.92/31\",\r\n \"51.120.107.192/29\",\r\n\ - \ \"51.120.109.24/31\",\r\n \"51.120.109.48/28\",\r\n \ - \ \"51.120.211.192/29\",\r\n \"51.120.213.24/31\",\r\n \ - \ \"51.120.220.80/29\",\r\n \"51.120.220.92/31\",\r\n \ - \ \"51.120.220.176/28\",\r\n \"51.120.228.38/31\",\r\n \ - \ \"51.138.215.122/31\",\r\n \"51.140.6.15/32\",\r\n \ - \ \"51.140.51.174/32\",\r\n \"51.140.212.104/29\",\r\n \"\ - 52.136.186.118/31\",\r\n \"52.136.189.88/29\",\r\n \"52.136.190.160/28\"\ - ,\r\n \"52.138.90.52/31\",\r\n \"52.138.92.80/29\",\r\n\ - \ \"52.138.227.136/29\",\r\n \"52.138.229.64/31\",\r\n \ - \ \"52.138.229.80/28\",\r\n \"52.146.138.80/28\",\r\n \ - \ \"52.146.139.192/31\",\r\n \"52.147.97.0/31\",\r\n \ - \ \"52.147.113.182/31\",\r\n \"52.147.117.104/29\",\r\n \ - \ \"52.147.117.112/28\",\r\n \"52.151.62.99/32\",\r\n \ - \ \"52.161.14.192/32\",\r\n \"52.161.28.108/32\",\r\n \"\ - 52.162.110.240/29\",\r\n \"52.162.111.128/31\",\r\n \"52.163.228.23/32\"\ - ,\r\n \"52.167.107.72/29\",\r\n \"52.167.109.64/31\",\r\n\ - \ \"52.169.105.82/32\",\r\n \"52.172.153.216/32\",\r\n \ - \ \"52.172.155.142/32\",\r\n \"52.178.223.62/32\",\r\n \ - \ \"52.180.166.238/32\",\r\n \"52.180.179.25/32\",\r\n \ - \ \"52.182.139.56/29\",\r\n \"52.182.141.12/31\",\r\n \ - \ \"52.182.141.144/28\",\r\n \"52.183.5.195/32\",\r\n \ - \ \"52.231.18.46/31\",\r\n \"52.231.20.0/29\",\r\n \"\ - 52.231.64.18/32\",\r\n \"52.231.69.100/32\",\r\n \"52.231.148.120/29\"\ - ,\r\n \"52.231.148.208/28\",\r\n \"52.236.186.240/29\",\r\ - \n \"52.236.189.72/31\",\r\n \"52.240.241.64/28\",\r\n \ - \ \"52.242.40.64/28\",\r\n \"52.242.40.80/29\",\r\n \ - \ \"52.242.40.88/31\",\r\n \"52.246.155.152/29\",\r\n \ - \ \"52.246.157.0/31\",\r\n \"52.250.228.34/31\",\r\n \"\ - 65.52.250.6/31\",\r\n \"65.52.252.120/29\",\r\n \"102.37.64.32/28\"\ - ,\r\n \"102.37.85.10/31\",\r\n \"102.37.85.16/28\",\r\n\ - \ \"102.37.85.192/29\",\r\n \"102.37.166.218/31\",\r\n \ - \ \"102.37.167.96/28\",\r\n \"102.37.167.112/29\",\r\n \ - \ \"102.133.26.6/31\",\r\n \"102.133.28.144/29\",\r\n \ - \ \"102.133.124.16/29\",\r\n \"102.133.156.112/29\",\r\n \ - \ \"102.133.251.176/29\",\r\n \"102.133.253.32/28\",\r\n \ - \ \"104.41.9.106/32\",\r\n \"104.41.178.182/32\",\r\n \ - \ \"104.208.163.218/32\",\r\n \"104.209.137.89/32\",\r\n \ - \ \"104.210.80.208/32\",\r\n \"104.210.158.71/32\",\r\n \ - \ \"104.214.164.32/28\",\r\n \"104.215.254.56/32\",\r\n \ - \ \"168.61.140.48/28\",\r\n \"191.232.170.251/32\",\r\n \ - \ \"191.233.51.144/29\",\r\n \"191.233.203.30/31\",\r\n \ - \ \"191.233.205.64/29\",\r\n \"191.234.147.192/29\",\r\n \ - \ \"191.234.149.48/28\",\r\n \"191.234.149.136/31\",\r\n \ - \ \"191.234.155.192/29\",\r\n \"191.234.157.40/31\",\r\n\ - \ \"191.238.73.12/31\",\r\n \"191.238.77.32/28\",\r\n \ - \ \"191.238.77.48/29\",\r\n \"2603:1000:4:1::2a0/123\",\r\n\ - \ \"2603:1000:4:402::2c0/124\",\r\n \"2603:1000:104:3::/123\"\ - ,\r\n \"2603:1000:104:402::2c0/124\",\r\n \"2603:1000:104:802::200/124\"\ - ,\r\n \"2603:1000:104:c02::200/124\",\r\n \"2603:1010:6::6a0/123\"\ - ,\r\n \"2603:1010:6:402::2c0/124\",\r\n \"2603:1010:6:802::200/124\"\ - ,\r\n \"2603:1010:6:c02::200/124\",\r\n \"2603:1010:101:1::480/123\"\ - ,\r\n \"2603:1010:101:402::2c0/124\",\r\n \"2603:1010:304:1::2a0/123\"\ - ,\r\n \"2603:1010:304:402::2c0/124\",\r\n \"2603:1010:404:1::2a0/123\"\ - ,\r\n \"2603:1010:404:402::2c0/124\",\r\n \"2603:1020:5:4::200/123\"\ - ,\r\n \"2603:1020:5:402::2c0/124\",\r\n \"2603:1020:5:802::200/124\"\ - ,\r\n \"2603:1020:5:c02::200/124\",\r\n \"2603:1020:206::780/123\"\ - ,\r\n \"2603:1020:206:402::2c0/124\",\r\n \"2603:1020:206:802::200/124\"\ - ,\r\n \"2603:1020:206:c02::200/124\",\r\n \"2603:1020:305:402::2c0/124\"\ - ,\r\n \"2603:1020:405:402::2c0/124\",\r\n \"2603:1020:605:1::480/123\"\ - ,\r\n \"2603:1020:605:402::2c0/124\",\r\n \"2603:1020:705:2::700/123\"\ - ,\r\n \"2603:1020:705:402::2c0/124\",\r\n \"2603:1020:705:802::200/124\"\ - ,\r\n \"2603:1020:705:c02::200/124\",\r\n \"2603:1020:805::6a0/123\"\ - ,\r\n \"2603:1020:805:402::2c0/124\",\r\n \"2603:1020:805:802::200/124\"\ - ,\r\n \"2603:1020:805:c02::200/124\",\r\n \"2603:1020:905:1::2a0/123\"\ - ,\r\n \"2603:1020:905:402::2c0/124\",\r\n \"2603:1020:a04:3::a0/123\"\ - ,\r\n \"2603:1020:a04:402::2c0/124\",\r\n \"2603:1020:a04:802::200/124\"\ - ,\r\n \"2603:1020:a04:c02::200/124\",\r\n \"2603:1020:b04:1::480/123\"\ - ,\r\n \"2603:1020:b04:402::2c0/124\",\r\n \"2603:1020:c04::6a0/123\"\ - ,\r\n \"2603:1020:c04:402::2c0/124\",\r\n \"2603:1020:c04:802::200/124\"\ - ,\r\n \"2603:1020:c04:c02::200/124\",\r\n \"2603:1020:d04:1::2a0/123\"\ - ,\r\n \"2603:1020:d04:402::2c0/124\",\r\n \"2603:1020:e04:3::460/123\"\ - ,\r\n \"2603:1020:e04:402::2c0/124\",\r\n \"2603:1020:e04:802::200/124\"\ - ,\r\n \"2603:1020:e04:c02::200/124\",\r\n \"2603:1020:f04:1::2a0/123\"\ - ,\r\n \"2603:1020:f04:402::2c0/124\",\r\n \"2603:1020:1004:3::40/123\"\ - ,\r\n \"2603:1020:1004:400::1c0/124\",\r\n \"2603:1020:1004:400::2e0/124\"\ - ,\r\n \"2603:1020:1004:400::3a0/124\",\r\n \"2603:1020:1004:800::3d0/124\"\ - ,\r\n \"2603:1020:1004:800::3f0/124\",\r\n \"2603:1020:1004:c02::390/124\"\ - ,\r\n \"2603:1020:1104:1::7a0/123\",\r\n \"2603:1020:1104:400::2c0/124\"\ - ,\r\n \"2603:1030:f:3::2a0/123\",\r\n \"2603:1030:f:400::ac0/124\"\ - ,\r\n \"2603:1030:10::780/123\",\r\n \"2603:1030:10:402::2c0/124\"\ - ,\r\n \"2603:1030:10:802::200/124\",\r\n \"2603:1030:10:c02::200/124\"\ - ,\r\n \"2603:1030:104:402::2c0/124\",\r\n \"2603:1030:104:402::650/124\"\ - ,\r\n \"2603:1030:104:402::710/124\",\r\n \"2603:1030:104:802::70/124\"\ - ,\r\n \"2603:1030:107:400::240/124\",\r\n \"2603:1030:210::780/123\"\ - ,\r\n \"2603:1030:210:402::2c0/124\",\r\n \"2603:1030:210:802::200/124\"\ - ,\r\n \"2603:1030:210:c02::200/124\",\r\n \"2603:1030:40b:3::340/123\"\ - ,\r\n \"2603:1030:40b:400::ac0/124\",\r\n \"2603:1030:40b:800::200/124\"\ - ,\r\n \"2603:1030:40b:c00::200/124\",\r\n \"2603:1030:40c::760/123\"\ - ,\r\n \"2603:1030:40c:402::2c0/124\",\r\n \"2603:1030:40c:802::200/124\"\ - ,\r\n \"2603:1030:40c:c02::200/124\",\r\n \"2603:1030:504:2::2e0/123\"\ - ,\r\n \"2603:1030:504:402::1c0/124\",\r\n \"2603:1030:504:402::2e0/124\"\ - ,\r\n \"2603:1030:504:402::3a0/124\",\r\n \"2603:1030:504:402::440/124\"\ - ,\r\n \"2603:1030:504:802::3c0/123\",\r\n \"2603:1030:504:802::3f0/124\"\ - ,\r\n \"2603:1030:504:c02::410/124\",\r\n \"2603:1030:608:1::480/123\"\ - ,\r\n \"2603:1030:608:402::2c0/124\",\r\n \"2603:1030:807:3::200/123\"\ - ,\r\n \"2603:1030:807:402::2c0/124\",\r\n \"2603:1030:807:802::200/124\"\ - ,\r\n \"2603:1030:807:c02::200/124\",\r\n \"2603:1030:a07:1::4e0/123\"\ - ,\r\n \"2603:1030:a07:402::940/124\",\r\n \"2603:1030:b04:1::480/123\"\ - ,\r\n \"2603:1030:b04:402::2c0/124\",\r\n \"2603:1030:c06:5::120/123\"\ - ,\r\n \"2603:1030:c06:400::ac0/124\",\r\n \"2603:1030:c06:802::200/124\"\ - ,\r\n \"2603:1030:c06:c02::200/124\",\r\n \"2603:1030:f05::6a0/123\"\ - ,\r\n \"2603:1030:f05:402::2c0/124\",\r\n \"2603:1030:f05:802::200/124\"\ - ,\r\n \"2603:1030:f05:c02::200/124\",\r\n \"2603:1030:1005:1::480/123\"\ - ,\r\n \"2603:1030:1005:402::2c0/124\",\r\n \"2603:1040:5:3::200/123\"\ - ,\r\n \"2603:1040:5:402::2c0/124\",\r\n \"2603:1040:5:802::200/124\"\ - ,\r\n \"2603:1040:5:c02::200/124\",\r\n \"2603:1040:207:402::2c0/124\"\ - ,\r\n \"2603:1040:207:800::60/124\",\r\n \"2603:1040:207:c00::60/124\"\ - ,\r\n \"2603:1040:407::6a0/123\",\r\n \"2603:1040:407:402::2c0/124\"\ - ,\r\n \"2603:1040:407:802::200/124\",\r\n \"2603:1040:407:c02::200/124\"\ - ,\r\n \"2603:1040:606:1::480/123\",\r\n \"2603:1040:606:402::2c0/124\"\ - ,\r\n \"2603:1040:806:402::2c0/124\",\r\n \"2603:1040:904::6a0/123\"\ - ,\r\n \"2603:1040:904:402::2c0/124\",\r\n \"2603:1040:904:802::200/124\"\ - ,\r\n \"2603:1040:904:c02::200/124\",\r\n \"2603:1040:a06:3::200/123\"\ - ,\r\n \"2603:1040:a06:402::2c0/124\",\r\n \"2603:1040:a06:802::200/124\"\ - ,\r\n \"2603:1040:a06:c02::200/124\",\r\n \"2603:1040:b04:1::2a0/123\"\ - ,\r\n \"2603:1040:b04:402::2c0/124\",\r\n \"2603:1040:c06:1::480/123\"\ - ,\r\n \"2603:1040:c06:402::2c0/124\",\r\n \"2603:1040:d04:2::320/123\"\ - ,\r\n \"2603:1040:d04:400::1c0/124\",\r\n \"2603:1040:d04:400::2e0/124\"\ - ,\r\n \"2603:1040:d04:400::3a0/124\",\r\n \"2603:1040:d04:800::3d0/124\"\ - ,\r\n \"2603:1040:d04:800::3f0/124\",\r\n \"2603:1040:e05:1::c0/123\"\ - ,\r\n \"2603:1040:f05:2::2a0/123\",\r\n \"2603:1040:f05:402::2c0/124\"\ - ,\r\n \"2603:1040:f05:802::200/124\",\r\n \"2603:1040:f05:c02::200/124\"\ - ,\r\n \"2603:1040:1002:400::190/124\",\r\n \"2603:1040:1002:800::60/124\"\ - ,\r\n \"2603:1040:1002:c00::60/124\",\r\n \"2603:1040:1104:2::240/123\"\ - ,\r\n \"2603:1040:1104:400::2c0/124\",\r\n \"2603:1050:6::6a0/123\"\ - ,\r\n \"2603:1050:6:402::2c0/124\",\r\n \"2603:1050:6:802::200/124\"\ - ,\r\n \"2603:1050:6:c02::200/124\",\r\n \"2603:1050:403:1::260/123\"\ - ,\r\n \"2603:1050:403:400::1e0/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"HDInsight\",\r\n \"id\": \"HDInsight\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"6\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.64.254.98/32\",\r\n \"13.66.141.144/29\",\r\ - \n \"13.67.9.152/29\",\r\n \"13.69.65.8/29\",\r\n \ - \ \"13.69.229.72/29\",\r\n \"13.70.73.96/29\",\r\n \"\ - 13.71.172.240/29\",\r\n \"13.71.196.48/29\",\r\n \"13.73.240.8/29\"\ - ,\r\n \"13.73.254.192/29\",\r\n \"13.74.153.132/32\",\r\n\ - \ \"13.75.38.112/29\",\r\n \"13.75.152.195/32\",\r\n \ - \ \"13.76.136.249/32\",\r\n \"13.76.245.160/32\",\r\n \ - \ \"13.77.2.56/32\",\r\n \"13.77.2.94/32\",\r\n \"13.77.52.8/29\"\ - ,\r\n \"13.78.89.60/32\",\r\n \"13.78.125.90/32\",\r\n \ - \ \"13.82.225.233/32\",\r\n \"13.86.218.240/29\",\r\n \ - \ \"13.87.58.32/29\",\r\n \"13.87.124.32/29\",\r\n \ - \ \"13.89.171.120/29\",\r\n \"20.21.37.56/29\",\r\n \"\ - 20.36.36.33/32\",\r\n \"20.36.36.196/32\",\r\n \"20.36.123.88/29\"\ - ,\r\n \"20.37.68.40/29\",\r\n \"20.37.76.96/29\",\r\n \ - \ \"20.37.228.0/29\",\r\n \"20.38.139.88/29\",\r\n \ - \ \"20.39.15.48/29\",\r\n \"20.40.207.144/29\",\r\n \"\ - 20.41.69.32/29\",\r\n \"20.41.197.120/29\",\r\n \"20.43.45.224/29\"\ - ,\r\n \"20.43.120.8/29\",\r\n \"20.44.4.64/29\",\r\n \ - \ \"20.44.16.8/29\",\r\n \"20.44.26.240/29\",\r\n \ - \ \"20.45.115.128/29\",\r\n \"20.45.198.80/29\",\r\n \"\ - 20.48.192.24/29\",\r\n \"20.49.102.48/29\",\r\n \"20.49.114.56/29\"\ - ,\r\n \"20.49.126.128/29\",\r\n \"20.53.40.120/29\",\r\n\ - \ \"20.61.96.160/29\",\r\n \"20.72.20.40/29\",\r\n \ - \ \"20.150.167.176/29\",\r\n \"20.150.172.232/29\",\r\n \ - \ \"20.188.39.64/32\",\r\n \"20.189.111.192/29\",\r\n \ - \ \"20.191.160.0/29\",\r\n \"20.192.48.216/29\",\r\n \"\ - 20.192.235.248/29\",\r\n \"20.193.194.16/29\",\r\n \"20.193.203.200/29\"\ - ,\r\n \"23.98.107.192/29\",\r\n \"23.99.5.239/32\",\r\n\ - \ \"23.101.196.19/32\",\r\n \"23.102.235.122/32\",\r\n \ - \ \"40.64.134.160/29\",\r\n \"40.67.50.248/29\",\r\n \ - \ \"40.67.60.64/29\",\r\n \"40.69.107.8/29\",\r\n \"\ - 40.71.13.160/29\",\r\n \"40.71.175.99/32\",\r\n \"40.74.101.192/29\"\ - ,\r\n \"40.74.125.69/32\",\r\n \"40.74.146.88/29\",\r\n\ - \ \"40.78.195.8/29\",\r\n \"40.78.202.136/29\",\r\n \ - \ \"40.79.130.248/29\",\r\n \"40.79.180.16/29\",\r\n \ - \ \"40.79.187.0/29\",\r\n \"40.80.63.144/29\",\r\n \"\ - 40.80.172.120/29\",\r\n \"40.89.22.88/29\",\r\n \"40.89.65.220/32\"\ - ,\r\n \"40.89.68.134/32\",\r\n \"40.89.157.135/32\",\r\n\ - \ \"51.12.17.48/29\",\r\n \"51.12.25.48/29\",\r\n \ - \ \"51.104.8.96/29\",\r\n \"51.104.31.56/29\",\r\n \"\ - 51.105.92.56/29\",\r\n \"51.107.52.208/29\",\r\n \"51.107.60.48/29\"\ - ,\r\n \"51.107.148.24/29\",\r\n \"51.107.156.56/29\",\r\n\ - \ \"51.116.49.168/29\",\r\n \"51.116.60.48/29\",\r\n \ - \ \"51.116.145.168/29\",\r\n \"51.116.156.48/29\",\r\n \ - \ \"51.120.43.88/29\",\r\n \"51.120.100.48/29\",\r\n \ - \ \"51.120.220.48/29\",\r\n \"51.120.228.40/29\",\r\n \ - \ \"51.137.166.32/29\",\r\n \"51.140.47.39/32\",\r\n \"\ - 51.140.52.16/32\",\r\n \"51.140.211.24/29\",\r\n \"51.141.7.20/32\"\ - ,\r\n \"51.141.13.110/32\",\r\n \"52.136.52.40/29\",\r\n\ - \ \"52.140.108.248/29\",\r\n \"52.146.79.136/29\",\r\n \ - \ \"52.146.130.184/29\",\r\n \"52.150.154.192/29\",\r\n \ - \ \"52.161.10.167/32\",\r\n \"52.161.23.15/32\",\r\n \ - \ \"52.162.110.160/29\",\r\n \"52.164.210.96/32\",\r\n \ - \ \"52.166.243.90/32\",\r\n \"52.172.152.49/32\",\r\n \ - \ \"52.172.153.209/32\",\r\n \"52.174.36.244/32\",\r\n \ - \ \"52.175.38.134/32\",\r\n \"52.175.211.210/32\",\r\n \ - \ \"52.175.222.222/32\",\r\n \"52.180.183.49/32\",\r\n \"\ - 52.180.183.58/32\",\r\n \"52.228.37.66/32\",\r\n \"52.228.45.222/32\"\ - ,\r\n \"52.229.123.172/32\",\r\n \"52.229.127.96/32\",\r\ - \n \"52.231.36.209/32\",\r\n \"52.231.39.142/32\",\r\n \ - \ \"52.231.147.24/29\",\r\n \"52.231.203.16/32\",\r\n \ - \ \"52.231.205.214/32\",\r\n \"65.52.252.96/29\",\r\n \ - \ \"102.133.28.80/29\",\r\n \"102.133.60.32/29\",\r\n \ - \ \"102.133.124.0/29\",\r\n \"102.133.219.176/29\",\r\n \ - \ \"104.46.176.168/29\",\r\n \"104.210.84.115/32\",\r\n \ - \ \"104.211.216.210/32\",\r\n \"104.211.223.67/32\",\r\n \ - \ \"138.91.29.150/32\",\r\n \"138.91.141.162/32\",\r\n \ - \ \"157.55.213.99/32\",\r\n \"157.56.8.38/32\",\r\n \"\ - 168.61.48.131/32\",\r\n \"168.61.49.99/32\",\r\n \"191.233.10.184/29\"\ - ,\r\n \"191.233.51.152/29\",\r\n \"191.233.204.240/29\"\ - ,\r\n \"191.234.138.128/29\",\r\n \"191.235.84.104/32\"\ - ,\r\n \"191.235.87.113/32\",\r\n \"2603:1000:4:402::320/124\"\ - ,\r\n \"2603:1000:104:402::320/124\",\r\n \"2603:1010:6:402::320/124\"\ - ,\r\n \"2603:1010:101:402::320/124\",\r\n \"2603:1010:304:402::320/124\"\ - ,\r\n \"2603:1010:404:402::320/124\",\r\n \"2603:1020:5:402::320/124\"\ - ,\r\n \"2603:1020:206:402::320/124\",\r\n \"2603:1020:305:402::320/124\"\ - ,\r\n \"2603:1020:405:402::320/124\",\r\n \"2603:1020:605:402::320/124\"\ - ,\r\n \"2603:1020:705:402::320/124\",\r\n \"2603:1020:805:402::320/124\"\ - ,\r\n \"2603:1020:905:402::320/124\",\r\n \"2603:1020:a04:3::40/124\"\ - ,\r\n \"2603:1020:a04:402::320/124\",\r\n \"2603:1020:b04:402::320/124\"\ - ,\r\n \"2603:1020:c04:402::320/124\",\r\n \"2603:1020:d04:402::320/124\"\ - ,\r\n \"2603:1020:e04::790/124\",\r\n \"2603:1020:e04:402::320/124\"\ - ,\r\n \"2603:1020:f04:402::320/124\",\r\n \"2603:1020:1004:1::1e0/124\"\ - ,\r\n \"2603:1020:1104:1::140/124\",\r\n \"2603:1030:f:2::4b0/124\"\ - ,\r\n \"2603:1030:f:400::b20/124\",\r\n \"2603:1030:10:402::320/124\"\ - ,\r\n \"2603:1030:104::7b0/124\",\r\n \"2603:1030:104:402::320/124\"\ - ,\r\n \"2603:1030:107::720/124\",\r\n \"2603:1030:210:402::320/124\"\ - ,\r\n \"2603:1030:40b:400::b20/124\",\r\n \"2603:1030:40c:402::320/124\"\ - ,\r\n \"2603:1030:504::1e0/124\",\r\n \"2603:1030:608:402::320/124\"\ - ,\r\n \"2603:1030:807:402::320/124\",\r\n \"2603:1030:a07:402::9a0/124\"\ - ,\r\n \"2603:1030:b04:402::320/124\",\r\n \"2603:1030:c06:400::b20/124\"\ - ,\r\n \"2603:1030:f05:402::320/124\",\r\n \"2603:1030:1005:402::320/124\"\ - ,\r\n \"2603:1040:5:402::320/124\",\r\n \"2603:1040:207:1::4d0/124\"\ - ,\r\n \"2603:1040:207:402::320/124\",\r\n \"2603:1040:407:402::320/124\"\ - ,\r\n \"2603:1040:606:402::320/124\",\r\n \"2603:1040:806:402::320/124\"\ - ,\r\n \"2603:1040:904:402::320/124\",\r\n \"2603:1040:a06:2::540/124\"\ - ,\r\n \"2603:1040:a06:402::320/124\",\r\n \"2603:1040:b04:402::320/124\"\ - ,\r\n \"2603:1040:c06:402::320/124\",\r\n \"2603:1040:d04:1::1e0/124\"\ - ,\r\n \"2603:1040:f05::790/124\",\r\n \"2603:1040:f05:402::320/124\"\ - ,\r\n \"2603:1040:1002:1::460/124\",\r\n \"2603:1040:1104:1::140/124\"\ - ,\r\n \"2603:1050:6:402::320/124\",\r\n \"2603:1050:403:400::420/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.AustraliaCentral\"\ - ,\r\n \"id\": \"HDInsight.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.36.36.33/32\"\ - ,\r\n \"20.36.36.196/32\",\r\n \"20.37.228.0/29\",\r\n \ - \ \"2603:1010:304:402::320/124\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"HDInsight.AustraliaEast\",\r\n \"id\": \"\ - HDInsight.AustraliaEast\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"HDInsight\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.70.73.96/29\",\r\n \ - \ \"13.75.152.195/32\",\r\n \"20.53.40.120/29\",\r\n \ - \ \"104.210.84.115/32\",\r\n \"2603:1010:6:402::320/124\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.AustraliaSoutheast\"\ - ,\r\n \"id\": \"HDInsight.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": [\r\n\ - \ \"13.77.2.56/32\",\r\n \"13.77.2.94/32\",\r\n \ - \ \"13.77.52.8/29\",\r\n \"104.46.176.168/29\",\r\n \"\ - 2603:1010:101:402::320/124\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"HDInsight.BrazilSouth\",\r\n \"id\": \"HDInsight.BrazilSouth\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"brazilsouth\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"HDInsight\",\r\n \ - \ \"addressPrefixes\": [\r\n \"191.233.204.240/29\",\r\n \ - \ \"191.234.138.128/29\",\r\n \"191.235.84.104/32\",\r\n \ - \ \"191.235.87.113/32\",\r\n \"2603:1050:6:402::320/124\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.BrazilSoutheast\"\ - ,\r\n \"id\": \"HDInsight.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"191.233.10.184/29\"\ - ,\r\n \"191.233.51.152/29\",\r\n \"2603:1050:403:400::420/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.CanadaCentral\"\ - ,\r\n \"id\": \"HDInsight.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.71.172.240/29\"\ - ,\r\n \"20.48.192.24/29\",\r\n \"52.228.37.66/32\",\r\n\ - \ \"52.228.45.222/32\",\r\n \"2603:1030:f05:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.CanadaEast\"\ - ,\r\n \"id\": \"HDInsight.CanadaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"40.69.107.8/29\"\ - ,\r\n \"40.89.22.88/29\",\r\n \"52.229.123.172/32\",\r\n\ - \ \"52.229.127.96/32\",\r\n \"2603:1030:1005:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.CentralIndia\"\ - ,\r\n \"id\": \"HDInsight.CentralIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.43.120.8/29\"\ - ,\r\n \"52.140.108.248/29\",\r\n \"52.172.152.49/32\",\r\ - \n \"52.172.153.209/32\",\r\n \"2603:1040:a06:2::540/124\"\ - ,\r\n \"2603:1040:a06:402::320/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"HDInsight.CentralUS\",\r\n \"id\"\ - : \"HDInsight.CentralUS\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"HDInsight\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.89.171.120/29\",\r\n\ - \ \"20.40.207.144/29\",\r\n \"2603:1030:10:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.CentralUSEUAP\"\ - ,\r\n \"id\": \"HDInsight.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.45.198.80/29\"\ - ,\r\n \"40.78.202.136/29\",\r\n \"52.180.183.49/32\",\r\n\ - \ \"52.180.183.58/32\",\r\n \"2603:1030:f:2::4b0/124\",\r\ - \n \"2603:1030:f:400::b20/124\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"HDInsight.EastAsia\",\r\n \"id\": \"HDInsight.EastAsia\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"eastasia\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"HDInsight\",\r\n \"\ - addressPrefixes\": [\r\n \"13.75.38.112/29\",\r\n \"20.189.111.192/29\"\ - ,\r\n \"23.102.235.122/32\",\r\n \"52.175.38.134/32\",\r\ - \n \"2603:1040:207:1::4d0/124\",\r\n \"2603:1040:207:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.EastUS\"\ - ,\r\n \"id\": \"HDInsight.EastUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.82.225.233/32\"\ - ,\r\n \"40.71.13.160/29\",\r\n \"40.71.175.99/32\",\r\n\ - \ \"52.146.79.136/29\",\r\n \"168.61.48.131/32\",\r\n \ - \ \"168.61.49.99/32\",\r\n \"2603:1030:210:402::320/124\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.EastUS2\"\ - ,\r\n \"id\": \"HDInsight.EastUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.44.16.8/29\"\ - ,\r\n \"20.49.102.48/29\",\r\n \"2603:1030:40c:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.EastUS2EUAP\"\ - ,\r\n \"id\": \"HDInsight.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.39.15.48/29\"\ - ,\r\n \"40.74.146.88/29\",\r\n \"40.89.65.220/32\",\r\n\ - \ \"40.89.68.134/32\",\r\n \"2603:1030:40b:400::b20/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.FranceCentral\"\ - ,\r\n \"id\": \"HDInsight.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.43.45.224/29\"\ - ,\r\n \"20.188.39.64/32\",\r\n \"40.79.130.248/29\",\r\n\ - \ \"40.89.157.135/32\",\r\n \"2603:1020:805:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.FranceSouth\"\ - ,\r\n \"id\": \"HDInsight.FranceSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"40.79.180.16/29\"\ - ,\r\n \"51.105.92.56/29\",\r\n \"2603:1020:905:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.GermanyNorth\"\ - ,\r\n \"id\": \"HDInsight.GermanyNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.116.49.168/29\"\ - ,\r\n \"51.116.60.48/29\",\r\n \"2603:1020:d04:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.GermanyWestCentral\"\ - ,\r\n \"id\": \"HDInsight.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.116.145.168/29\"\ - ,\r\n \"51.116.156.48/29\",\r\n \"2603:1020:c04:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.JapanEast\"\ - ,\r\n \"id\": \"HDInsight.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.78.89.60/32\"\ - ,\r\n \"13.78.125.90/32\",\r\n \"20.191.160.0/29\",\r\n\ - \ \"40.79.187.0/29\",\r\n \"2603:1040:407:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.JapanWest\"\ - ,\r\n \"id\": \"HDInsight.JapanWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"40.74.101.192/29\"\ - ,\r\n \"40.74.125.69/32\",\r\n \"40.80.63.144/29\",\r\n\ - \ \"138.91.29.150/32\",\r\n \"2603:1040:606:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.JioIndiaCentral\"\ - ,\r\n \"id\": \"HDInsight.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.192.48.216/29\"\ - ,\r\n \"20.192.235.248/29\",\r\n \"2603:1040:1104:1::140/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.JioIndiaWest\"\ - ,\r\n \"id\": \"HDInsight.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.193.194.16/29\"\ - ,\r\n \"20.193.203.200/29\",\r\n \"2603:1040:d04:1::1e0/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.KoreaCentral\"\ - ,\r\n \"id\": \"HDInsight.KoreaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.41.69.32/29\"\ - ,\r\n \"20.44.26.240/29\",\r\n \"52.231.36.209/32\",\r\n\ - \ \"52.231.39.142/32\",\r\n \"2603:1040:f05::790/124\",\r\ - \n \"2603:1040:f05:402::320/124\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"HDInsight.KoreaSouth\",\r\n \"id\"\ - : \"HDInsight.KoreaSouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"HDInsight\"\ - ,\r\n \"addressPrefixes\": [\r\n \"40.80.172.120/29\",\r\n\ - \ \"52.231.147.24/29\",\r\n \"52.231.203.16/32\",\r\n \ - \ \"52.231.205.214/32\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"HDInsight.NorthCentralUS\",\r\n \"id\": \"HDInsight.NorthCentralUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"northcentralus\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"HDInsight\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.49.114.56/29\",\r\n \"\ - 52.162.110.160/29\",\r\n \"157.55.213.99/32\",\r\n \"157.56.8.38/32\"\ - ,\r\n \"2603:1030:608:402::320/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"HDInsight.NorthEurope\",\r\n \"\ - id\": \"HDInsight.NorthEurope\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.69.229.72/29\"\ - ,\r\n \"13.74.153.132/32\",\r\n \"52.146.130.184/29\",\r\ - \n \"52.164.210.96/32\",\r\n \"2603:1020:5:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.NorwayEast\"\ - ,\r\n \"id\": \"HDInsight.NorwayEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.120.43.88/29\"\ - ,\r\n \"51.120.100.48/29\",\r\n \"2603:1020:e04::790/124\"\ - ,\r\n \"2603:1020:e04:402::320/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"HDInsight.NorwayWest\",\r\n \"\ - id\": \"HDInsight.NorwayWest\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"HDInsight\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.120.220.48/29\",\r\n\ - \ \"51.120.228.40/29\",\r\n \"2603:1020:f04:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SouthAfricaNorth\"\ - ,\r\n \"id\": \"HDInsight.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"102.133.124.0/29\"\ - ,\r\n \"102.133.219.176/29\",\r\n \"2603:1000:104:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SouthAfricaWest\"\ - ,\r\n \"id\": \"HDInsight.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"102.133.28.80/29\"\ - ,\r\n \"102.133.60.32/29\",\r\n \"2603:1000:4:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SouthCentralUS\"\ - ,\r\n \"id\": \"HDInsight.SouthCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.73.240.8/29\"\ - ,\r\n \"13.73.254.192/29\",\r\n \"2603:1030:807:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SouthCentralUSSTG\"\ - ,\r\n \"id\": \"HDInsight.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.44.4.64/29\"\ - ,\r\n \"20.45.115.128/29\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"HDInsight.SoutheastAsia\",\r\n \"id\": \"\ - HDInsight.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"HDInsight\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.67.9.152/29\",\r\n \ - \ \"13.76.136.249/32\",\r\n \"13.76.245.160/32\",\r\n \ - \ \"23.98.107.192/29\",\r\n \"2603:1040:5:402::320/124\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SouthIndia\"\ - ,\r\n \"id\": \"HDInsight.SouthIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.41.197.120/29\"\ - ,\r\n \"40.78.195.8/29\",\r\n \"104.211.216.210/32\",\r\n\ - \ \"104.211.223.67/32\",\r\n \"2603:1040:c06:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SwedenCentral\"\ - ,\r\n \"id\": \"HDInsight.SwedenCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.12.25.48/29\"\ - ,\r\n \"2603:1020:1004:1::1e0/124\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"HDInsight.SwitzerlandNorth\",\r\n \ - \ \"id\": \"HDInsight.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.107.52.208/29\"\ - ,\r\n \"51.107.60.48/29\",\r\n \"2603:1020:a04:3::40/124\"\ - ,\r\n \"2603:1020:a04:402::320/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"HDInsight.SwitzerlandWest\",\r\n \ - \ \"id\": \"HDInsight.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.107.148.24/29\"\ - ,\r\n \"51.107.156.56/29\",\r\n \"2603:1020:b04:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.UAECentral\"\ - ,\r\n \"id\": \"HDInsight.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.37.68.40/29\"\ - ,\r\n \"20.37.76.96/29\",\r\n \"2603:1040:b04:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.UAENorth\"\ - ,\r\n \"id\": \"HDInsight.UAENorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.38.139.88/29\"\ - ,\r\n \"65.52.252.96/29\",\r\n \"2603:1040:904:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.UKSouth\"\ - ,\r\n \"id\": \"HDInsight.UKSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.104.8.96/29\"\ - ,\r\n \"51.104.31.56/29\",\r\n \"51.140.47.39/32\",\r\n\ - \ \"51.140.52.16/32\",\r\n \"2603:1020:705:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.UKWest\"\ - ,\r\n \"id\": \"HDInsight.UKWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.137.166.32/29\"\ - ,\r\n \"51.140.211.24/29\",\r\n \"51.141.7.20/32\",\r\n\ - \ \"51.141.13.110/32\",\r\n \"2603:1020:605:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.WestCentralUS\"\ - ,\r\n \"id\": \"HDInsight.WestCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.71.196.48/29\"\ - ,\r\n \"52.150.154.192/29\",\r\n \"52.161.10.167/32\",\r\ - \n \"52.161.23.15/32\",\r\n \"2603:1030:b04:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.WestEurope\"\ - ,\r\n \"id\": \"HDInsight.WestEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.69.65.8/29\"\ - ,\r\n \"20.61.96.160/29\",\r\n \"52.166.243.90/32\",\r\n\ - \ \"52.174.36.244/32\",\r\n \"2603:1020:206:402::320/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.WestUS\"\ - ,\r\n \"id\": \"HDInsight.WestUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.64.254.98/32\"\ - ,\r\n \"13.86.218.240/29\",\r\n \"20.49.126.128/29\",\r\n\ - \ \"23.99.5.239/32\",\r\n \"23.101.196.19/32\",\r\n \ - \ \"138.91.141.162/32\",\r\n \"2603:1030:a07:402::9a0/124\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.WestUS2\"\ - ,\r\n \"id\": \"HDInsight.WestUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.66.141.144/29\"\ - ,\r\n \"40.64.134.160/29\",\r\n \"52.175.211.210/32\",\r\ - \n \"52.175.222.222/32\",\r\n \"2603:1030:c06:400::b20/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.WestUS3\"\ - ,\r\n \"id\": \"HDInsight.WestUS3\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.150.167.176/29\"\ - ,\r\n \"20.150.172.232/29\",\r\n \"2603:1030:504::1e0/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"LogicApps\"\ - ,\r\n \"id\": \"LogicApps\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"LogicApps\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.65.39.247/32\",\r\n\ - \ \"13.65.82.17/32\",\r\n \"13.65.82.190/32\",\r\n \ - \ \"13.65.86.56/32\",\r\n \"13.65.98.39/32\",\r\n \"\ - 13.66.52.232/32\",\r\n \"13.66.128.68/32\",\r\n \"13.66.201.169/32\"\ - ,\r\n \"13.66.210.167/32\",\r\n \"13.66.224.169/32\",\r\n\ - \ \"13.66.246.219/32\",\r\n \"13.67.13.224/27\",\r\n \ - \ \"13.67.91.135/32\",\r\n \"13.67.107.128/32\",\r\n \ - \ \"13.67.110.109/32\",\r\n \"13.67.236.76/32\",\r\n \ - \ \"13.67.236.125/32\",\r\n \"13.69.71.160/27\",\r\n \"\ - 13.69.109.144/28\",\r\n \"13.69.231.160/27\",\r\n \"13.69.233.16/28\"\ - ,\r\n \"13.70.78.192/27\",\r\n \"13.70.159.205/32\",\r\n\ - \ \"13.71.146.140/32\",\r\n \"13.71.158.3/32\",\r\n \ - \ \"13.71.158.120/32\",\r\n \"13.71.184.150/32\",\r\n \ - \ \"13.71.186.1/32\",\r\n \"13.71.199.128/27\",\r\n \"\ - 13.71.199.160/28\",\r\n \"13.73.4.207/32\",\r\n \"13.73.114.207/32\"\ - ,\r\n \"13.73.115.153/32\",\r\n \"13.73.244.144/28\",\r\n\ - \ \"13.73.244.160/27\",\r\n \"13.75.89.159/32\",\r\n \ - \ \"13.75.94.173/32\",\r\n \"13.75.149.4/32\",\r\n \ - \ \"13.75.153.66/32\",\r\n \"13.76.4.194/32\",\r\n \"13.76.5.96/32\"\ - ,\r\n \"13.76.133.155/32\",\r\n \"13.77.3.139/32\",\r\n\ - \ \"13.77.53.224/27\",\r\n \"13.77.55.128/28\",\r\n \ - \ \"13.77.56.167/32\",\r\n \"13.77.58.136/32\",\r\n \ - \ \"13.77.149.159/32\",\r\n \"13.77.152.21/32\",\r\n \"\ - 13.78.18.168/32\",\r\n \"13.78.20.232/32\",\r\n \"13.78.21.155/32\"\ - ,\r\n \"13.78.35.229/32\",\r\n \"13.78.42.223/32\",\r\n\ - \ \"13.78.43.164/32\",\r\n \"13.78.62.130/32\",\r\n \ - \ \"13.78.84.187/32\",\r\n \"13.78.111.160/27\",\r\n \ - \ \"13.78.129.20/32\",\r\n \"13.78.137.179/32\",\r\n \"\ - 13.78.137.247/32\",\r\n \"13.78.141.75/32\",\r\n \"13.78.148.140/32\"\ - ,\r\n \"13.78.151.161/32\",\r\n \"13.79.173.49/32\",\r\n\ - \ \"13.84.41.46/32\",\r\n \"13.84.43.45/32\",\r\n \ - \ \"13.84.159.168/32\",\r\n \"13.85.79.155/32\",\r\n \ - \ \"13.86.221.240/28\",\r\n \"13.86.223.0/27\",\r\n \"13.87.58.144/28\"\ - ,\r\n \"13.87.58.160/27\",\r\n \"13.87.124.144/28\",\r\n\ - \ \"13.87.124.160/27\",\r\n \"13.88.249.209/32\",\r\n \ - \ \"13.89.178.48/28\",\r\n \"13.91.252.184/32\",\r\n \ - \ \"13.92.98.111/32\",\r\n \"13.95.147.65/32\",\r\n \ - \ \"13.95.155.53/32\",\r\n \"20.21.46.80/28\",\r\n \"20.21.46.96/27\"\ - ,\r\n \"20.36.108.192/27\",\r\n \"20.36.108.224/28\",\r\n\ - \ \"20.36.117.96/27\",\r\n \"20.36.117.128/28\",\r\n \ - \ \"20.37.76.208/28\",\r\n \"20.37.76.224/27\",\r\n \ - \ \"20.38.128.176/28\",\r\n \"20.38.128.192/27\",\r\n \ - \ \"20.38.149.144/28\",\r\n \"20.38.149.160/27\",\r\n \"\ - 20.40.32.19/32\",\r\n \"20.40.32.49/32\",\r\n \"20.40.32.59/32\"\ - ,\r\n \"20.40.32.60/31\",\r\n \"20.40.32.80/31\",\r\n \ - \ \"20.40.32.85/32\",\r\n \"20.40.32.87/32\",\r\n \ - \ \"20.40.32.113/32\",\r\n \"20.40.32.116/32\",\r\n \"\ - 20.40.32.162/32\",\r\n \"20.42.64.48/28\",\r\n \"20.42.72.160/27\"\ - ,\r\n \"20.43.121.192/27\",\r\n \"20.43.121.224/28\",\r\n\ - \ \"20.44.4.176/28\",\r\n \"20.44.4.192/27\",\r\n \ - \ \"20.44.17.224/27\",\r\n \"20.45.64.29/32\",\r\n \"\ - 20.45.64.87/32\",\r\n \"20.45.67.134/31\",\r\n \"20.45.67.170/32\"\ - ,\r\n \"20.45.71.213/32\",\r\n \"20.45.72.54/32\",\r\n \ - \ \"20.45.72.72/32\",\r\n \"20.45.75.193/32\",\r\n \ - \ \"20.45.75.200/32\",\r\n \"20.45.75.236/32\",\r\n \"\ - 20.45.79.239/32\",\r\n \"20.46.42.220/32\",\r\n \"20.46.46.173/32\"\ - ,\r\n \"20.72.30.160/28\",\r\n \"20.72.30.192/27\",\r\n\ - \ \"20.150.172.240/28\",\r\n \"20.150.173.192/27\",\r\n\ - \ \"20.150.181.32/27\",\r\n \"20.188.33.169/32\",\r\n \ - \ \"20.188.39.105/32\",\r\n \"20.192.184.0/27\",\r\n \ - \ \"20.192.238.128/27\",\r\n \"20.192.238.160/28\",\r\n \ - \ \"20.193.206.48/28\",\r\n \"20.193.206.128/27\",\r\n \ - \ \"23.96.200.77/32\",\r\n \"23.96.200.227/32\",\r\n \ - \ \"23.96.203.46/32\",\r\n \"23.96.210.49/32\",\r\n \"23.96.212.28/32\"\ - ,\r\n \"23.96.253.219/32\",\r\n \"23.97.68.172/32\",\r\n\ - \ \"23.97.210.126/32\",\r\n \"23.97.211.179/32\",\r\n \ - \ \"23.97.218.130/32\",\r\n \"23.99.125.99/32\",\r\n \ - \ \"23.100.29.190/32\",\r\n \"23.100.82.16/32\",\r\n \ - \ \"23.100.86.139/32\",\r\n \"23.100.87.24/32\",\r\n \"\ - 23.100.87.56/32\",\r\n \"23.100.124.84/32\",\r\n \"23.100.127.172/32\"\ - ,\r\n \"23.101.132.208/32\",\r\n \"23.101.136.201/32\",\r\ - \n \"23.101.139.153/32\",\r\n \"23.101.183.225/32\",\r\n\ - \ \"23.101.191.106/32\",\r\n \"23.102.70.174/32\",\r\n \ - \ \"40.67.60.176/28\",\r\n \"40.67.60.192/27\",\r\n \ - \ \"40.68.209.23/32\",\r\n \"40.68.222.65/32\",\r\n \ - \ \"40.69.110.192/27\",\r\n \"40.69.110.224/28\",\r\n \"\ - 40.70.26.154/32\",\r\n \"40.70.27.236/32\",\r\n \"40.70.27.253/32\"\ - ,\r\n \"40.70.29.214/32\",\r\n \"40.70.131.151/32\",\r\n\ - \ \"40.74.64.207/32\",\r\n \"40.74.66.200/32\",\r\n \ - \ \"40.74.68.85/32\",\r\n \"40.74.74.21/32\",\r\n \"\ - 40.74.76.213/32\",\r\n \"40.74.77.205/32\",\r\n \"40.74.81.13/32\"\ - ,\r\n \"40.74.85.215/32\",\r\n \"40.74.131.151/32\",\r\n\ - \ \"40.74.132.29/32\",\r\n \"40.74.136.23/32\",\r\n \ - \ \"40.74.140.4/32\",\r\n \"40.74.140.162/32\",\r\n \ - \ \"40.74.140.173/32\",\r\n \"40.74.142.133/32\",\r\n \"\ - 40.74.143.215/32\",\r\n \"40.74.149.96/27\",\r\n \"40.75.35.240/28\"\ - ,\r\n \"40.77.31.87/32\",\r\n \"40.77.111.254/32\",\r\n\ - \ \"40.78.196.176/28\",\r\n \"40.78.204.208/28\",\r\n \ - \ \"40.78.204.224/27\",\r\n \"40.78.239.16/28\",\r\n \ - \ \"40.78.245.144/28\",\r\n \"40.78.245.160/27\",\r\n \ - \ \"40.79.44.7/32\",\r\n \"40.79.139.144/28\",\r\n \"\ - 40.79.139.160/27\",\r\n \"40.79.171.240/28\",\r\n \"40.79.180.160/27\"\ - ,\r\n \"40.79.180.192/28\",\r\n \"40.79.197.48/28\",\r\n\ - \ \"40.80.180.16/28\",\r\n \"40.80.180.32/27\",\r\n \ - \ \"40.83.73.39/32\",\r\n \"40.83.75.165/32\",\r\n \ - \ \"40.83.77.208/32\",\r\n \"40.83.98.194/32\",\r\n \"40.83.100.69/32\"\ - ,\r\n \"40.83.127.19/32\",\r\n \"40.83.164.80/32\",\r\n\ - \ \"40.84.25.234/32\",\r\n \"40.84.30.147/32\",\r\n \ - \ \"40.84.59.136/32\",\r\n \"40.84.138.132/32\",\r\n \ - \ \"40.85.241.105/32\",\r\n \"40.85.250.135/32\",\r\n \ - \ \"40.85.250.212/32\",\r\n \"40.85.252.47/32\",\r\n \"\ - 40.86.202.42/32\",\r\n \"40.86.203.228/32\",\r\n \"40.86.216.241/32\"\ - ,\r\n \"40.86.217.241/32\",\r\n \"40.86.226.149/32\",\r\n\ - \ \"40.86.228.93/32\",\r\n \"40.89.186.28/32\",\r\n \ - \ \"40.89.186.30/32\",\r\n \"40.89.188.169/32\",\r\n \ - \ \"40.89.190.104/32\",\r\n \"40.89.191.161/32\",\r\n \ - \ \"40.112.90.39/32\",\r\n \"40.112.92.104/32\",\r\n \"\ - 40.112.95.216/32\",\r\n \"40.113.1.181/32\",\r\n \"40.113.3.202/32\"\ - ,\r\n \"40.113.4.18/32\",\r\n \"40.113.10.90/32\",\r\n \ - \ \"40.113.11.17/32\",\r\n \"40.113.12.95/32\",\r\n \ - \ \"40.113.18.211/32\",\r\n \"40.113.20.202/32\",\r\n \ - \ \"40.113.22.12/32\",\r\n \"40.113.94.31/32\",\r\n \"\ - 40.113.218.230/32\",\r\n \"40.114.8.21/32\",\r\n \"40.114.12.31/32\"\ - ,\r\n \"40.114.13.216/32\",\r\n \"40.114.14.143/32\",\r\n\ - \ \"40.114.40.186/32\",\r\n \"40.114.51.5/32\",\r\n \ - \ \"40.114.82.191/32\",\r\n \"40.115.78.70/32\",\r\n \ - \ \"40.115.78.237/32\",\r\n \"40.117.99.79/32\",\r\n \"\ - 40.117.100.228/32\",\r\n \"40.118.241.243/32\",\r\n \"40.118.244.241/32\"\ - ,\r\n \"40.119.166.152/32\",\r\n \"40.120.64.0/27\",\r\n\ - \ \"40.120.64.32/28\",\r\n \"40.121.91.41/32\",\r\n \ - \ \"40.122.41.236/32\",\r\n \"40.122.46.197/32\",\r\n \ - \ \"40.122.170.198/32\",\r\n \"40.123.212.104/32\",\r\n \ - \ \"40.123.216.73/32\",\r\n \"40.123.217.165/32\",\r\n \ - \ \"40.123.224.143/32\",\r\n \"40.123.224.227/32\",\r\n \ - \ \"40.123.228.182/32\",\r\n \"40.123.230.45/32\",\r\n \ - \ \"40.123.231.179/32\",\r\n \"40.123.231.186/32\",\r\n \ - \ \"40.126.227.199/32\",\r\n \"40.126.240.14/32\",\r\n \ - \ \"40.126.249.73/32\",\r\n \"40.126.252.33/32\",\r\n \"\ - 40.126.252.85/32\",\r\n \"40.126.252.107/32\",\r\n \"40.127.80.231/32\"\ - ,\r\n \"40.127.83.170/32\",\r\n \"40.127.84.38/32\",\r\n\ - \ \"40.127.86.12/32\",\r\n \"40.127.91.18/32\",\r\n \ - \ \"40.127.93.92/32\",\r\n \"51.11.97.16/28\",\r\n \ - \ \"51.11.97.32/27\",\r\n \"51.12.100.112/28\",\r\n \"51.12.102.160/27\"\ - ,\r\n \"51.12.204.112/28\",\r\n \"51.12.204.192/27\",\r\n\ - \ \"51.12.229.32/27\",\r\n \"51.103.128.52/32\",\r\n \ - \ \"51.103.132.236/32\",\r\n \"51.103.134.69/32\",\r\n \ - \ \"51.103.134.138/32\",\r\n \"51.103.135.51/32\",\r\n \ - \ \"51.103.136.37/32\",\r\n \"51.103.136.209/32\",\r\n \ - \ \"51.103.136.210/32\",\r\n \"51.103.137.79/32\",\r\n \ - \ \"51.103.138.28/32\",\r\n \"51.103.138.96/32\",\r\n \ - \ \"51.103.139.122/32\",\r\n \"51.104.9.112/28\",\r\n \"\ - 51.105.69.96/27\",\r\n \"51.107.60.160/27\",\r\n \"51.107.60.192/28\"\ - ,\r\n \"51.107.156.160/27\",\r\n \"51.107.156.192/28\",\r\ - \n \"51.107.225.151/32\",\r\n \"51.107.225.163/32\",\r\n\ - \ \"51.107.225.167/32\",\r\n \"51.107.225.179/32\",\r\n\ - \ \"51.107.225.180/32\",\r\n \"51.107.225.186/32\",\r\n\ - \ \"51.107.225.190/32\",\r\n \"51.107.231.86/32\",\r\n \ - \ \"51.107.239.66/32\",\r\n \"51.107.239.83/32\",\r\n \ - \ \"51.107.239.112/32\",\r\n \"51.107.239.123/32\",\r\n \ - \ \"51.116.60.144/28\",\r\n \"51.116.60.160/27\",\r\n \ - \ \"51.116.158.64/28\",\r\n \"51.116.168.104/32\",\r\n \ - \ \"51.116.168.222/32\",\r\n \"51.116.171.49/32\",\r\n \ - \ \"51.116.171.209/32\",\r\n \"51.116.175.0/32\",\r\n \ - \ \"51.116.175.17/32\",\r\n \"51.116.175.51/32\",\r\n \"\ - 51.116.208.37/32\",\r\n \"51.116.208.51/32\",\r\n \"51.116.208.64/32\"\ - ,\r\n \"51.116.208.132/32\",\r\n \"51.116.208.165/32\",\r\ - \n \"51.116.208.175/32\",\r\n \"51.116.208.192/32\",\r\n\ - \ \"51.116.208.200/32\",\r\n \"51.116.208.217/32\",\r\n\ - \ \"51.116.208.222/32\",\r\n \"51.116.211.29/32\",\r\n \ - \ \"51.116.211.168/32\",\r\n \"51.116.233.22/32\",\r\n \ - \ \"51.116.233.33/32\",\r\n \"51.116.233.35/32\",\r\n \ - \ \"51.116.233.40/32\",\r\n \"51.116.233.87/32\",\r\n \ - \ \"51.116.243.224/27\",\r\n \"51.120.100.160/27\",\r\n \ - \ \"51.120.109.32/28\",\r\n \"51.120.220.128/27\",\r\n \ - \ \"51.120.220.160/28\",\r\n \"51.140.28.225/32\",\r\n \ - \ \"51.140.73.85/32\",\r\n \"51.140.74.14/32\",\r\n \"\ - 51.140.78.44/32\",\r\n \"51.140.78.71/32\",\r\n \"51.140.79.109/32\"\ - ,\r\n \"51.140.84.39/32\",\r\n \"51.140.137.190/32\",\r\n\ - \ \"51.140.142.28/32\",\r\n \"51.140.153.135/32\",\r\n \ - \ \"51.140.155.81/32\",\r\n \"51.140.158.24/32\",\r\n \ - \ \"51.141.45.238/32\",\r\n \"51.141.47.136/32\",\r\n \ - \ \"51.141.48.98/32\",\r\n \"51.141.51.145/32\",\r\n \ - \ \"51.141.53.164/32\",\r\n \"51.141.54.185/32\",\r\n \"\ - 51.141.112.112/32\",\r\n \"51.141.113.36/32\",\r\n \"51.141.114.77/32\"\ - ,\r\n \"51.141.118.119/32\",\r\n \"51.141.119.63/32\",\r\ - \n \"51.141.119.150/32\",\r\n \"51.144.176.185/32\",\r\n\ - \ \"51.144.182.201/32\",\r\n \"52.143.156.55/32\",\r\n \ - \ \"52.143.158.203/32\",\r\n \"52.143.162.83/32\",\r\n \ - \ \"52.143.164.15/32\",\r\n \"52.143.164.80/32\",\r\n \ - \ \"52.147.97.16/28\",\r\n \"52.147.97.32/27\",\r\n \ - \ \"52.160.90.237/32\",\r\n \"52.160.92.112/32\",\r\n \"\ - 52.161.8.128/32\",\r\n \"52.161.9.108/32\",\r\n \"52.161.18.218/32\"\ - ,\r\n \"52.161.19.82/32\",\r\n \"52.161.26.172/32\",\r\n\ - \ \"52.161.27.190/32\",\r\n \"52.162.111.144/28\",\r\n \ - \ \"52.162.111.160/27\",\r\n \"52.162.208.216/32\",\r\n \ - \ \"52.162.213.231/32\",\r\n \"52.163.93.214/32\",\r\n \ - \ \"52.163.228.93/32\",\r\n \"52.163.230.166/32\",\r\n \ - \ \"52.167.109.80/28\",\r\n \"52.169.218.253/32\",\r\n \ - \ \"52.169.220.174/32\",\r\n \"52.172.9.47/32\",\r\n \ - \ \"52.172.49.43/32\",\r\n \"52.172.50.24/32\",\r\n \"\ - 52.172.51.140/32\",\r\n \"52.172.52.0/32\",\r\n \"52.172.55.231/32\"\ - ,\r\n \"52.172.154.168/32\",\r\n \"52.172.157.194/32\",\r\ - \n \"52.172.184.192/32\",\r\n \"52.172.185.79/32\",\r\n\ - \ \"52.172.186.159/32\",\r\n \"52.172.191.194/32\",\r\n\ - \ \"52.174.49.6/32\",\r\n \"52.174.54.218/32\",\r\n \ - \ \"52.175.33.254/32\",\r\n \"52.175.198.132/32\",\r\n \ - \ \"52.178.165.215/32\",\r\n \"52.178.166.21/32\",\r\n \ - \ \"52.182.141.160/27\",\r\n \"52.183.29.132/32\",\r\n \ - \ \"52.183.30.10/32\",\r\n \"52.183.30.169/32\",\r\n \"\ - 52.183.39.67/32\",\r\n \"52.187.65.81/32\",\r\n \"52.187.65.155/32\"\ - ,\r\n \"52.187.226.96/32\",\r\n \"52.187.226.139/32\",\r\ - \n \"52.187.227.245/32\",\r\n \"52.187.229.130/32\",\r\n\ - \ \"52.187.231.161/32\",\r\n \"52.187.231.184/32\",\r\n\ - \ \"52.189.214.42/32\",\r\n \"52.189.216.28/32\",\r\n \ - \ \"52.189.220.75/32\",\r\n \"52.189.222.77/32\",\r\n \ - \ \"52.228.39.244/32\",\r\n \"52.229.120.45/32\",\r\n \ - \ \"52.229.125.57/32\",\r\n \"52.229.126.25/32\",\r\n \ - \ \"52.231.23.16/28\",\r\n \"52.231.23.32/27\",\r\n \"\ - 52.232.128.155/32\",\r\n \"52.232.129.143/32\",\r\n \"52.232.133.109/32\"\ - ,\r\n \"52.233.29.79/32\",\r\n \"52.233.29.92/32\",\r\n\ - \ \"52.233.30.218/32\",\r\n \"65.52.8.225/32\",\r\n \ - \ \"65.52.9.64/32\",\r\n \"65.52.9.96/32\",\r\n \"\ - 65.52.10.183/32\",\r\n \"65.52.60.5/32\",\r\n \"65.52.175.34/32\"\ - ,\r\n \"65.52.185.96/32\",\r\n \"65.52.185.218/32\",\r\n\ - \ \"65.52.186.153/32\",\r\n \"65.52.186.190/32\",\r\n \ - \ \"65.52.186.225/32\",\r\n \"65.52.211.164/32\",\r\n \ - \ \"70.37.50.6/32\",\r\n \"70.37.54.122/32\",\r\n \"\ - 102.133.28.208/28\",\r\n \"102.133.28.224/27\",\r\n \"102.133.72.37/32\"\ - ,\r\n \"102.133.72.98/32\",\r\n \"102.133.72.113/32\",\r\ - \n \"102.133.72.132/32\",\r\n \"102.133.72.145/32\",\r\n\ - \ \"102.133.72.173/32\",\r\n \"102.133.72.179/32\",\r\n\ - \ \"102.133.72.183/32\",\r\n \"102.133.72.184/32\",\r\n\ - \ \"102.133.72.190/32\",\r\n \"102.133.75.169/32\",\r\n\ - \ \"102.133.75.191/32\",\r\n \"102.133.156.176/28\",\r\n\ - \ \"102.133.224.125/32\",\r\n \"102.133.226.199/32\",\r\n\ - \ \"102.133.227.103/32\",\r\n \"102.133.228.4/32\",\r\n\ - \ \"102.133.228.6/32\",\r\n \"102.133.228.9/32\",\r\n \ - \ \"102.133.230.4/32\",\r\n \"102.133.230.82/32\",\r\n \ - \ \"102.133.231.9/32\",\r\n \"102.133.231.51/32\",\r\n \ - \ \"102.133.231.117/32\",\r\n \"102.133.231.188/32\",\r\n \ - \ \"102.133.251.224/27\",\r\n \"104.40.49.140/32\",\r\n \ - \ \"104.40.54.74/32\",\r\n \"104.40.59.188/32\",\r\n \ - \ \"104.40.61.150/32\",\r\n \"104.40.62.178/32\",\r\n \ - \ \"104.40.218.37/32\",\r\n \"104.41.0.115/32\",\r\n \"\ - 104.41.33.103/32\",\r\n \"104.41.162.245/32\",\r\n \"104.41.163.102/32\"\ - ,\r\n \"104.41.168.76/32\",\r\n \"104.41.173.132/32\",\r\ - \n \"104.41.179.165/32\",\r\n \"104.41.181.59/32\",\r\n\ - \ \"104.41.182.232/32\",\r\n \"104.42.38.32/32\",\r\n \ - \ \"104.42.49.145/32\",\r\n \"104.42.224.227/32\",\r\n \ - \ \"104.42.236.93/32\",\r\n \"104.43.166.135/32\",\r\n \ - \ \"104.43.243.39/32\",\r\n \"104.45.9.52/32\",\r\n \ - \ \"104.45.153.81/32\",\r\n \"104.46.32.99/32\",\r\n \"\ - 104.46.34.93/32\",\r\n \"104.46.34.208/32\",\r\n \"104.46.39.63/32\"\ - ,\r\n \"104.46.42.167/32\",\r\n \"104.46.98.208/32\",\r\n\ - \ \"104.46.106.158/32\",\r\n \"104.47.138.214/32\",\r\n\ - \ \"104.208.25.27/32\",\r\n \"104.208.140.40/32\",\r\n \ - \ \"104.208.155.200/32\",\r\n \"104.208.158.174/32\",\r\n\ - \ \"104.209.131.77/32\",\r\n \"104.209.133.254/32\",\r\n\ - \ \"104.209.134.133/32\",\r\n \"104.210.89.222/32\",\r\n\ - \ \"104.210.89.244/32\",\r\n \"104.210.90.241/32\",\r\n\ - \ \"104.210.91.55/32\",\r\n \"104.210.144.48/32\",\r\n \ - \ \"104.210.153.89/32\",\r\n \"104.211.73.195/32\",\r\n \ - \ \"104.211.74.145/32\",\r\n \"104.211.90.162/32\",\r\n \ - \ \"104.211.90.169/32\",\r\n \"104.211.101.108/32\",\r\n\ - \ \"104.211.102.62/32\",\r\n \"104.211.154.7/32\",\r\n \ - \ \"104.211.154.59/32\",\r\n \"104.211.156.153/32\",\r\n\ - \ \"104.211.157.237/32\",\r\n \"104.211.158.123/32\",\r\n\ - \ \"104.211.158.127/32\",\r\n \"104.211.162.205/32\",\r\n\ - \ \"104.211.164.25/32\",\r\n \"104.211.164.80/32\",\r\n\ - \ \"104.211.164.112/32\",\r\n \"104.211.164.136/32\",\r\n\ - \ \"104.211.165.81/32\",\r\n \"104.211.225.152/32\",\r\n\ - \ \"104.211.227.229/32\",\r\n \"104.211.229.115/32\",\r\n\ - \ \"104.211.230.126/32\",\r\n \"104.211.230.129/32\",\r\n\ - \ \"104.211.231.39/32\",\r\n \"104.214.137.243/32\",\r\n\ - \ \"104.214.161.64/27\",\r\n \"104.214.161.96/28\",\r\n\ - \ \"104.215.88.156/32\",\r\n \"104.215.89.144/32\",\r\n\ - \ \"104.215.90.86/32\",\r\n \"104.215.90.189/32\",\r\n \ - \ \"104.215.90.203/32\",\r\n \"104.215.93.125/32\",\r\n \ - \ \"104.215.176.31/32\",\r\n \"104.215.176.81/32\",\r\n \ - \ \"104.215.177.5/32\",\r\n \"104.215.178.204/32\",\r\n \ - \ \"104.215.179.133/32\",\r\n \"104.215.180.203/32\",\r\n\ - \ \"104.215.181.6/32\",\r\n \"111.221.85.72/32\",\r\n \ - \ \"111.221.85.74/32\",\r\n \"137.116.44.82/32\",\r\n \ - \ \"137.116.80.70/32\",\r\n \"137.116.85.245/32\",\r\n \ - \ \"137.116.126.165/32\",\r\n \"137.117.72.32/32\",\r\n \ - \ \"137.135.106.54/32\",\r\n \"138.91.17.47/32\",\r\n \ - \ \"138.91.25.99/32\",\r\n \"138.91.26.45/32\",\r\n \"\ - 138.91.188.137/32\",\r\n \"157.55.210.61/32\",\r\n \"157.55.212.238/32\"\ - ,\r\n \"157.56.12.202/32\",\r\n \"157.56.160.212/32\",\r\ - \n \"157.56.162.53/32\",\r\n \"157.56.167.147/32\",\r\n\ - \ \"168.61.86.120/32\",\r\n \"168.61.152.201/32\",\r\n \ - \ \"168.61.172.83/32\",\r\n \"168.61.172.225/32\",\r\n \ - \ \"168.61.173.172/32\",\r\n \"168.61.217.177/32\",\r\n \ - \ \"168.62.109.110/32\",\r\n \"168.62.219.52/32\",\r\n \ - \ \"168.62.219.83/32\",\r\n \"168.62.248.37/32\",\r\n \ - \ \"168.62.249.81/32\",\r\n \"168.63.136.37/32\",\r\n \ - \ \"168.63.200.173/32\",\r\n \"191.232.32.19/32\",\r\n \ - \ \"191.232.32.100/32\",\r\n \"191.232.34.78/32\",\r\n \ - \ \"191.232.34.249/32\",\r\n \"191.232.35.177/32\",\r\n \ - \ \"191.232.36.213/32\",\r\n \"191.233.54.240/28\",\r\n \ - \ \"191.233.68.51/32\",\r\n \"191.233.207.0/28\",\r\n \"\ - 191.233.207.32/27\",\r\n \"191.234.161.28/32\",\r\n \"191.234.161.168/32\"\ - ,\r\n \"191.234.162.131/32\",\r\n \"191.234.162.178/32\"\ - ,\r\n \"191.234.166.198/32\",\r\n \"191.234.182.26/32\"\ - ,\r\n \"191.235.82.221/32\",\r\n \"191.235.86.199/32\",\r\ - \n \"191.235.91.7/32\",\r\n \"191.235.94.220/32\",\r\n \ - \ \"191.235.95.229/32\",\r\n \"191.235.180.188/32\",\r\n\ - \ \"191.237.255.116/32\",\r\n \"191.238.41.107/32\",\r\n\ - \ \"191.238.161.62/32\",\r\n \"191.238.163.65/32\",\r\n\ - \ \"191.239.67.132/32\",\r\n \"191.239.82.62/32\",\r\n \ - \ \"191.239.161.74/32\",\r\n \"191.239.177.86/32\",\r\n \ - \ \"207.46.148.176/32\",\r\n \"2603:1000:4:402::3c0/124\"\ - ,\r\n \"2603:1000:4:402::3e0/123\",\r\n \"2603:1000:104:402::3c0/124\"\ - ,\r\n \"2603:1000:104:402::3e0/123\",\r\n \"2603:1010:6:402::3c0/124\"\ - ,\r\n \"2603:1010:6:402::3e0/123\",\r\n \"2603:1010:101:402::3c0/124\"\ - ,\r\n \"2603:1010:101:402::3e0/123\",\r\n \"2603:1010:304:402::3c0/124\"\ - ,\r\n \"2603:1010:304:402::3e0/123\",\r\n \"2603:1010:404:402::3c0/124\"\ - ,\r\n \"2603:1010:404:402::3e0/123\",\r\n \"2603:1020:5:402::3c0/124\"\ - ,\r\n \"2603:1020:5:402::3e0/123\",\r\n \"2603:1020:206:402::3c0/124\"\ - ,\r\n \"2603:1020:206:402::3e0/123\",\r\n \"2603:1020:305:402::3c0/124\"\ - ,\r\n \"2603:1020:305:402::3e0/123\",\r\n \"2603:1020:405:402::3c0/124\"\ - ,\r\n \"2603:1020:405:402::3e0/123\",\r\n \"2603:1020:605:402::3c0/124\"\ - ,\r\n \"2603:1020:605:402::3e0/123\",\r\n \"2603:1020:705:402::3c0/124\"\ - ,\r\n \"2603:1020:705:402::3e0/123\",\r\n \"2603:1020:805:402::3c0/124\"\ - ,\r\n \"2603:1020:805:402::3e0/123\",\r\n \"2603:1020:905:402::3c0/124\"\ - ,\r\n \"2603:1020:905:402::3e0/123\",\r\n \"2603:1020:a04:402::3c0/124\"\ - ,\r\n \"2603:1020:a04:402::3e0/123\",\r\n \"2603:1020:b04:402::3c0/124\"\ - ,\r\n \"2603:1020:b04:402::3e0/123\",\r\n \"2603:1020:c04:402::3c0/124\"\ - ,\r\n \"2603:1020:c04:402::3e0/123\",\r\n \"2603:1020:d04:402::3c0/124\"\ - ,\r\n \"2603:1020:d04:402::3e0/123\",\r\n \"2603:1020:e04:402::3c0/124\"\ - ,\r\n \"2603:1020:e04:402::3e0/123\",\r\n \"2603:1020:f04:402::3c0/124\"\ - ,\r\n \"2603:1020:f04:402::3e0/123\",\r\n \"2603:1020:1004:400::250/124\"\ - ,\r\n \"2603:1020:1004:400::260/123\",\r\n \"2603:1020:1104:400::510/124\"\ - ,\r\n \"2603:1020:1104:400::520/123\",\r\n \"2603:1030:f:400::bc0/124\"\ - ,\r\n \"2603:1030:f:400::be0/123\",\r\n \"2603:1030:10:402::3c0/124\"\ - ,\r\n \"2603:1030:10:402::3e0/123\",\r\n \"2603:1030:104:402::3c0/124\"\ - ,\r\n \"2603:1030:104:402::3e0/123\",\r\n \"2603:1030:107:400::390/124\"\ - ,\r\n \"2603:1030:107:400::3a0/123\",\r\n \"2603:1030:210:402::3c0/124\"\ - ,\r\n \"2603:1030:210:402::3e0/123\",\r\n \"2603:1030:40b:400::bc0/124\"\ - ,\r\n \"2603:1030:40b:400::be0/123\",\r\n \"2603:1030:40c:402::3c0/124\"\ - ,\r\n \"2603:1030:40c:402::3e0/123\",\r\n \"2603:1030:504:402::250/124\"\ - ,\r\n \"2603:1030:504:402::260/123\",\r\n \"2603:1030:608:402::3c0/124\"\ - ,\r\n \"2603:1030:608:402::3e0/123\",\r\n \"2603:1030:807:402::3c0/124\"\ - ,\r\n \"2603:1030:807:402::3e0/123\",\r\n \"2603:1030:a07:402::340/124\"\ - ,\r\n \"2603:1030:a07:402::360/123\",\r\n \"2603:1030:b04:402::3c0/124\"\ - ,\r\n \"2603:1030:b04:402::3e0/123\",\r\n \"2603:1030:c06:400::bc0/124\"\ - ,\r\n \"2603:1030:c06:400::be0/123\",\r\n \"2603:1030:f05:402::3c0/124\"\ - ,\r\n \"2603:1030:f05:402::3e0/123\",\r\n \"2603:1030:1005:402::3c0/124\"\ - ,\r\n \"2603:1030:1005:402::3e0/123\",\r\n \"2603:1040:5:402::3c0/124\"\ - ,\r\n \"2603:1040:5:402::3e0/123\",\r\n \"2603:1040:207:402::3c0/124\"\ - ,\r\n \"2603:1040:207:402::3e0/123\",\r\n \"2603:1040:407:402::3c0/124\"\ - ,\r\n \"2603:1040:407:402::3e0/123\",\r\n \"2603:1040:606:402::3c0/124\"\ - ,\r\n \"2603:1040:606:402::3e0/123\",\r\n \"2603:1040:806:402::3c0/124\"\ - ,\r\n \"2603:1040:806:402::3e0/123\",\r\n \"2603:1040:904:402::3c0/124\"\ - ,\r\n \"2603:1040:904:402::3e0/123\",\r\n \"2603:1040:a06:402::3c0/124\"\ - ,\r\n \"2603:1040:a06:402::3e0/123\",\r\n \"2603:1040:b04:402::3c0/124\"\ - ,\r\n \"2603:1040:b04:402::3e0/123\",\r\n \"2603:1040:c06:402::3c0/124\"\ - ,\r\n \"2603:1040:c06:402::3e0/123\",\r\n \"2603:1040:d04:400::250/124\"\ - ,\r\n \"2603:1040:d04:400::260/123\",\r\n \"2603:1040:f05:402::3c0/124\"\ - ,\r\n \"2603:1040:f05:402::3e0/123\",\r\n \"2603:1040:1002:400::3c0/124\"\ - ,\r\n \"2603:1040:1002:400::3e0/123\",\r\n \"2603:1040:1104:400::510/124\"\ - ,\r\n \"2603:1040:1104:400::520/123\",\r\n \"2603:1050:6:402::3c0/124\"\ - ,\r\n \"2603:1050:6:402::3e0/123\",\r\n \"2603:1050:403:400::180/123\"\ - ,\r\n \"2603:1050:403:400::250/124\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"LogicAppsManagement\",\r\n \"id\"\ - : \"LogicAppsManagement\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"LogicApps\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.65.39.247/32\",\r\n\ - \ \"13.65.98.39/32\",\r\n \"13.66.128.68/32\",\r\n \ - \ \"13.66.224.169/32\",\r\n \"13.67.236.76/32\",\r\n \ - \ \"13.69.109.144/28\",\r\n \"13.69.233.16/28\",\r\n \"\ - 13.71.146.140/32\",\r\n \"13.71.199.160/28\",\r\n \"13.73.115.153/32\"\ - ,\r\n \"13.73.244.144/28\",\r\n \"13.75.89.159/32\",\r\n\ - \ \"13.75.153.66/32\",\r\n \"13.77.55.128/28\",\r\n \ - \ \"13.78.43.164/32\",\r\n \"13.78.62.130/32\",\r\n \ - \ \"13.78.84.187/32\",\r\n \"13.78.137.247/32\",\r\n \"\ - 13.79.173.49/32\",\r\n \"13.84.41.46/32\",\r\n \"13.84.43.45/32\"\ - ,\r\n \"13.85.79.155/32\",\r\n \"13.86.221.240/28\",\r\n\ - \ \"13.87.58.144/28\",\r\n \"13.87.124.144/28\",\r\n \ - \ \"13.88.249.209/32\",\r\n \"13.89.178.48/28\",\r\n \ - \ \"13.91.252.184/32\",\r\n \"13.95.155.53/32\",\r\n \ - \ \"20.21.46.80/28\",\r\n \"20.36.108.224/28\",\r\n \"20.36.117.128/28\"\ - ,\r\n \"20.37.76.208/28\",\r\n \"20.38.128.176/28\",\r\n\ - \ \"20.38.149.144/28\",\r\n \"20.40.32.49/32\",\r\n \ - \ \"20.40.32.59/32\",\r\n \"20.40.32.80/32\",\r\n \"\ - 20.40.32.162/32\",\r\n \"20.42.64.48/28\",\r\n \"20.43.121.224/28\"\ - ,\r\n \"20.44.4.176/28\",\r\n \"20.45.64.29/32\",\r\n \ - \ \"20.45.64.87/32\",\r\n \"20.45.71.213/32\",\r\n \ - \ \"20.45.75.193/32\",\r\n \"20.46.42.220/32\",\r\n \"\ - 20.46.46.173/32\",\r\n \"20.72.30.160/28\",\r\n \"20.150.172.240/28\"\ - ,\r\n \"20.192.238.160/28\",\r\n \"20.193.206.48/28\",\r\ - \n \"23.97.68.172/32\",\r\n \"40.67.60.176/28\",\r\n \ - \ \"40.69.110.224/28\",\r\n \"40.70.27.253/32\",\r\n \ - \ \"40.74.66.200/32\",\r\n \"40.74.81.13/32\",\r\n \"\ - 40.74.85.215/32\",\r\n \"40.74.140.173/32\",\r\n \"40.75.35.240/28\"\ - ,\r\n \"40.77.31.87/32\",\r\n \"40.77.111.254/32\",\r\n\ - \ \"40.78.196.176/28\",\r\n \"40.78.204.208/28\",\r\n \ - \ \"40.78.239.16/28\",\r\n \"40.78.245.144/28\",\r\n \ - \ \"40.79.44.7/32\",\r\n \"40.79.139.144/28\",\r\n \"\ - 40.79.171.240/28\",\r\n \"40.79.180.192/28\",\r\n \"40.79.197.48/28\"\ - ,\r\n \"40.80.180.16/28\",\r\n \"40.83.98.194/32\",\r\n\ - \ \"40.84.25.234/32\",\r\n \"40.84.59.136/32\",\r\n \ - \ \"40.84.138.132/32\",\r\n \"40.85.241.105/32\",\r\n \ - \ \"40.86.202.42/32\",\r\n \"40.112.90.39/32\",\r\n \"\ - 40.115.78.70/32\",\r\n \"40.115.78.237/32\",\r\n \"40.117.99.79/32\"\ - ,\r\n \"40.117.100.228/32\",\r\n \"40.120.64.32/28\",\r\n\ - \ \"40.123.224.143/32\",\r\n \"40.123.224.227/32\",\r\n\ - \ \"51.11.97.16/28\",\r\n \"51.12.100.112/28\",\r\n \ - \ \"51.12.204.112/28\",\r\n \"51.103.128.52/32\",\r\n \ - \ \"51.103.132.236/32\",\r\n \"51.103.134.138/32\",\r\n \ - \ \"51.103.136.209/32\",\r\n \"51.104.9.112/28\",\r\n \ - \ \"51.107.60.192/28\",\r\n \"51.107.156.192/28\",\r\n \ - \ \"51.107.225.163/32\",\r\n \"51.107.225.167/32\",\r\n \ - \ \"51.107.225.180/32\",\r\n \"51.107.239.66/32\",\r\n \"\ - 51.116.60.144/28\",\r\n \"51.116.158.64/28\",\r\n \"51.116.168.222/32\"\ - ,\r\n \"51.116.171.209/32\",\r\n \"51.116.175.0/32\",\r\n\ - \ \"51.116.208.37/32\",\r\n \"51.116.208.64/32\",\r\n \ - \ \"51.116.208.132/32\",\r\n \"51.116.211.29/32\",\r\n \ - \ \"51.116.233.40/32\",\r\n \"51.120.109.32/28\",\r\n \ - \ \"51.120.220.160/28\",\r\n \"51.140.78.71/32\",\r\n \ - \ \"51.140.79.109/32\",\r\n \"51.140.84.39/32\",\r\n \"\ - 51.140.155.81/32\",\r\n \"51.141.48.98/32\",\r\n \"51.141.51.145/32\"\ - ,\r\n \"51.141.53.164/32\",\r\n \"51.141.119.150/32\",\r\ - \n \"51.144.176.185/32\",\r\n \"52.147.97.16/28\",\r\n \ - \ \"52.160.90.237/32\",\r\n \"52.161.8.128/32\",\r\n \ - \ \"52.161.19.82/32\",\r\n \"52.161.26.172/32\",\r\n \ - \ \"52.162.111.144/28\",\r\n \"52.163.93.214/32\",\r\n \ - \ \"52.167.109.80/28\",\r\n \"52.169.218.253/32\",\r\n \ - \ \"52.169.220.174/32\",\r\n \"52.172.9.47/32\",\r\n \"\ - 52.172.49.43/32\",\r\n \"52.172.51.140/32\",\r\n \"52.172.157.194/32\"\ - ,\r\n \"52.172.184.192/32\",\r\n \"52.172.191.194/32\",\r\ - \n \"52.174.49.6/32\",\r\n \"52.174.54.218/32\",\r\n \ - \ \"52.183.30.10/32\",\r\n \"52.183.39.67/32\",\r\n \ - \ \"52.187.65.81/32\",\r\n \"52.187.65.155/32\",\r\n \"\ - 52.187.231.161/32\",\r\n \"52.189.216.28/32\",\r\n \"52.229.125.57/32\"\ - ,\r\n \"52.231.23.16/28\",\r\n \"52.232.129.143/32\",\r\n\ - \ \"52.232.133.109/32\",\r\n \"52.233.29.79/32\",\r\n \ - \ \"52.233.30.218/32\",\r\n \"65.52.9.64/32\",\r\n \ - \ \"65.52.211.164/32\",\r\n \"102.133.28.208/28\",\r\n \ - \ \"102.133.72.145/32\",\r\n \"102.133.72.173/32\",\r\n \ - \ \"102.133.72.184/32\",\r\n \"102.133.72.190/32\",\r\n \ - \ \"102.133.156.176/28\",\r\n \"102.133.224.125/32\",\r\n \ - \ \"102.133.226.199/32\",\r\n \"102.133.228.4/32\",\r\n \ - \ \"102.133.228.9/32\",\r\n \"104.43.243.39/32\",\r\n \ - \ \"104.210.89.222/32\",\r\n \"104.210.89.244/32\",\r\n \ - \ \"104.210.153.89/32\",\r\n \"104.211.73.195/32\",\r\n \ - \ \"104.211.157.237/32\",\r\n \"104.211.164.25/32\",\r\n \ - \ \"104.211.164.112/32\",\r\n \"104.211.165.81/32\",\r\n \ - \ \"104.211.225.152/32\",\r\n \"104.214.161.96/28\",\r\n \ - \ \"104.215.181.6/32\",\r\n \"137.116.126.165/32\",\r\n \ - \ \"137.135.106.54/32\",\r\n \"138.91.188.137/32\",\r\n \ - \ \"157.56.12.202/32\",\r\n \"157.56.160.212/32\",\r\n \ - \ \"168.62.249.81/32\",\r\n \"168.63.200.173/32\",\r\n \ - \ \"191.233.54.240/28\",\r\n \"191.233.207.0/28\",\r\n \ - \ \"191.234.166.198/32\",\r\n \"191.235.86.199/32\",\r\n \ - \ \"191.235.94.220/32\",\r\n \"191.235.95.229/32\",\r\n \ - \ \"2603:1000:4:402::3c0/124\",\r\n \"2603:1000:104:402::3c0/124\"\ - ,\r\n \"2603:1010:6:402::3c0/124\",\r\n \"2603:1010:101:402::3c0/124\"\ - ,\r\n \"2603:1010:304:402::3c0/124\",\r\n \"2603:1010:404:402::3c0/124\"\ - ,\r\n \"2603:1020:5:402::3c0/124\",\r\n \"2603:1020:206:402::3c0/124\"\ - ,\r\n \"2603:1020:305:402::3c0/124\",\r\n \"2603:1020:405:402::3c0/124\"\ - ,\r\n \"2603:1020:605:402::3c0/124\",\r\n \"2603:1020:705:402::3c0/124\"\ - ,\r\n \"2603:1020:805:402::3c0/124\",\r\n \"2603:1020:905:402::3c0/124\"\ - ,\r\n \"2603:1020:a04:402::3c0/124\",\r\n \"2603:1020:b04:402::3c0/124\"\ - ,\r\n \"2603:1020:c04:402::3c0/124\",\r\n \"2603:1020:d04:402::3c0/124\"\ - ,\r\n \"2603:1020:e04:402::3c0/124\",\r\n \"2603:1020:f04:402::3c0/124\"\ - ,\r\n \"2603:1020:1004:400::250/124\",\r\n \"2603:1020:1104:400::510/124\"\ - ,\r\n \"2603:1030:f:400::bc0/124\",\r\n \"2603:1030:10:402::3c0/124\"\ - ,\r\n \"2603:1030:104:402::3c0/124\",\r\n \"2603:1030:107:400::390/124\"\ - ,\r\n \"2603:1030:210:402::3c0/124\",\r\n \"2603:1030:40b:400::bc0/124\"\ - ,\r\n \"2603:1030:40c:402::3c0/124\",\r\n \"2603:1030:504:402::250/124\"\ - ,\r\n \"2603:1030:608:402::3c0/124\",\r\n \"2603:1030:807:402::3c0/124\"\ - ,\r\n \"2603:1030:a07:402::340/124\",\r\n \"2603:1030:b04:402::3c0/124\"\ - ,\r\n \"2603:1030:c06:400::bc0/124\",\r\n \"2603:1030:f05:402::3c0/124\"\ - ,\r\n \"2603:1030:1005:402::3c0/124\",\r\n \"2603:1040:5:402::3c0/124\"\ - ,\r\n \"2603:1040:207:402::3c0/124\",\r\n \"2603:1040:407:402::3c0/124\"\ - ,\r\n \"2603:1040:606:402::3c0/124\",\r\n \"2603:1040:806:402::3c0/124\"\ - ,\r\n \"2603:1040:904:402::3c0/124\",\r\n \"2603:1040:a06:402::3c0/124\"\ - ,\r\n \"2603:1040:b04:402::3c0/124\",\r\n \"2603:1040:c06:402::3c0/124\"\ - ,\r\n \"2603:1040:d04:400::250/124\",\r\n \"2603:1040:f05:402::3c0/124\"\ - ,\r\n \"2603:1040:1002:400::3c0/124\",\r\n \"2603:1040:1104:400::510/124\"\ - ,\r\n \"2603:1050:6:402::3c0/124\",\r\n \"2603:1050:403:400::250/124\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"M365ManagementActivityApi\"\ - ,\r\n \"id\": \"M365ManagementActivityApi\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"M365ManagementActivityApi\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.69.109.192/29\",\r\n\ - \ \"13.69.233.40/29\",\r\n \"13.71.175.136/31\",\r\n \ - \ \"13.78.111.196/31\",\r\n \"13.86.223.88/29\",\r\n \ - \ \"20.36.117.194/31\",\r\n \"20.37.76.206/31\",\r\n \ - \ \"20.43.121.254/31\",\r\n \"20.44.10.196/30\",\r\n \"\ - 20.44.19.8/30\",\r\n \"20.45.126.96/29\",\r\n \"20.53.0.36/31\"\ - ,\r\n \"20.192.184.82/31\",\r\n \"40.69.111.44/31\",\r\n\ - \ \"40.78.239.100/30\",\r\n \"40.79.139.196/31\",\r\n \ - \ \"40.80.180.4/31\",\r\n \"40.120.75.56/31\",\r\n \ - \ \"51.105.69.82/31\",\r\n \"51.107.60.154/31\",\r\n \"\ - 51.107.192.128/31\",\r\n \"51.116.60.242/31\",\r\n \"51.116.158.62/31\"\ - ,\r\n \"51.120.100.158/31\",\r\n \"51.120.220.120/31\",\r\ - \n \"51.138.160.2/31\",\r\n \"51.140.212.218/31\",\r\n \ - \ \"52.162.111.136/30\",\r\n \"52.168.112.80/29\",\r\n \ - \ \"52.231.23.12/31\",\r\n \"52.231.148.204/31\",\r\n \ - \ \"102.37.64.50/31\",\r\n \"102.133.124.14/31\",\r\n \ - \ \"104.214.164.52/30\",\r\n \"191.233.207.28/31\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftCloudAppSecurity\"\ - ,\r\n \"id\": \"MicrosoftCloudAppSecurity\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"MicrosoftCloudAppSecurity\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.64.26.88/32\",\r\n \ - \ \"13.64.28.87/32\",\r\n \"13.64.29.32/32\",\r\n \ - \ \"13.64.29.161/32\",\r\n \"13.64.30.76/32\",\r\n \"\ - 13.64.30.117/32\",\r\n \"13.64.30.118/32\",\r\n \"13.64.31.116/32\"\ - ,\r\n \"13.64.196.27/32\",\r\n \"13.64.198.19/32\",\r\n\ - \ \"13.64.198.97/32\",\r\n \"13.64.199.41/32\",\r\n \ - \ \"13.64.252.115/32\",\r\n \"13.66.134.18/32\",\r\n \ - \ \"13.66.142.80/28\",\r\n \"13.66.158.8/32\",\r\n \"\ - 13.66.168.209/32\",\r\n \"13.66.173.192/32\",\r\n \"13.66.210.205/32\"\ - ,\r\n \"13.67.10.192/28\",\r\n \"13.67.48.221/32\",\r\n\ - \ \"13.69.67.96/28\",\r\n \"13.69.107.96/28\",\r\n \ - \ \"13.69.190.115/32\",\r\n \"13.69.230.48/28\",\r\n \ - \ \"13.70.74.160/27\",\r\n \"13.71.175.0/27\",\r\n \"13.71.196.192/27\"\ - ,\r\n \"13.73.242.224/27\",\r\n \"13.74.108.176/28\",\r\n\ - \ \"13.74.168.152/32\",\r\n \"13.75.39.128/27\",\r\n \ - \ \"13.76.43.73/32\",\r\n \"13.76.129.255/32\",\r\n \ - \ \"13.77.53.96/27\",\r\n \"13.77.80.28/32\",\r\n \"13.77.136.80/32\"\ - ,\r\n \"13.77.148.229/32\",\r\n \"13.77.160.162/32\",\r\n\ - \ \"13.77.163.148/32\",\r\n \"13.77.165.61/32\",\r\n \ - \ \"13.80.7.94/32\",\r\n \"13.80.22.71/32\",\r\n \"\ - 13.80.125.22/32\",\r\n \"13.81.123.49/32\",\r\n \"13.81.204.189/32\"\ - ,\r\n \"13.81.212.71/32\",\r\n \"13.86.176.189/32\",\r\n\ - \ \"13.86.176.211/32\",\r\n \"13.86.219.224/27\",\r\n \ - \ \"13.86.235.202/32\",\r\n \"13.86.239.236/32\",\r\n \ - \ \"13.88.224.38/32\",\r\n \"13.88.224.211/32\",\r\n \ - \ \"13.88.224.222/32\",\r\n \"13.88.226.74/32\",\r\n \"\ - 13.88.227.7/32\",\r\n \"13.89.178.0/28\",\r\n \"13.91.61.249/32\"\ - ,\r\n \"13.91.91.243/32\",\r\n \"13.91.98.185/32\",\r\n\ - \ \"13.93.32.114/32\",\r\n \"13.93.113.192/32\",\r\n \ - \ \"13.93.196.52/32\",\r\n \"13.93.216.68/32\",\r\n \ - \ \"13.93.233.42/32\",\r\n \"13.95.1.33/32\",\r\n \"13.95.29.177/32\"\ - ,\r\n \"13.95.30.46/32\",\r\n \"20.36.220.93/32\",\r\n \ - \ \"20.36.222.59/32\",\r\n \"20.36.222.60/32\",\r\n \ - \ \"20.36.240.76/32\",\r\n \"20.36.244.208/32\",\r\n \ - \ \"20.36.245.0/32\",\r\n \"20.36.245.182/32\",\r\n \"\ - 20.36.245.235/32\",\r\n \"20.36.246.188/32\",\r\n \"20.36.248.40/32\"\ - ,\r\n \"20.40.106.50/31\",\r\n \"20.40.107.84/32\",\r\n\ - \ \"20.40.132.195/32\",\r\n \"20.40.134.79/32\",\r\n \ - \ \"20.40.134.94/32\",\r\n \"20.40.160.184/32\",\r\n \ - \ \"20.40.161.119/32\",\r\n \"20.40.161.131/32\",\r\n \ - \ \"20.40.161.132/32\",\r\n \"20.40.161.135/32\",\r\n \"\ - 20.40.161.140/30\",\r\n \"20.40.161.160/31\",\r\n \"20.40.162.86/32\"\ - ,\r\n \"20.40.162.200/32\",\r\n \"20.40.163.88/32\",\r\n\ - \ \"20.40.163.96/31\",\r\n \"20.40.163.130/32\",\r\n \ - \ \"20.40.163.133/32\",\r\n \"20.40.163.178/31\",\r\n \ - \ \"20.42.29.162/32\",\r\n \"20.42.31.48/32\",\r\n \"\ - 20.42.31.251/32\",\r\n \"20.44.8.208/28\",\r\n \"20.44.17.64/28\"\ - ,\r\n \"20.44.72.173/32\",\r\n \"20.44.72.217/32\",\r\n\ - \ \"20.44.73.253/32\",\r\n \"20.45.3.127/32\",\r\n \ - \ \"20.184.57.4/32\",\r\n \"20.184.57.218/32\",\r\n \ - \ \"20.184.58.46/32\",\r\n \"20.184.58.110/32\",\r\n \"\ - 20.184.60.77/32\",\r\n \"20.184.61.67/32\",\r\n \"20.184.61.253/32\"\ - ,\r\n \"20.184.63.158/32\",\r\n \"20.184.63.216/32\",\r\n\ - \ \"20.184.63.232/32\",\r\n \"20.188.72.248/32\",\r\n \ - \ \"23.97.54.160/32\",\r\n \"23.97.55.165/32\",\r\n \ - \ \"23.98.83.96/28\",\r\n \"23.100.67.153/32\",\r\n \"\ - 40.65.169.46/32\",\r\n \"40.65.169.97/32\",\r\n \"40.65.169.196/32\"\ - ,\r\n \"40.65.169.236/32\",\r\n \"40.65.170.17/32\",\r\n\ - \ \"40.65.170.26/32\",\r\n \"40.65.170.80/30\",\r\n \ - \ \"40.65.170.112/31\",\r\n \"40.65.170.123/32\",\r\n \ - \ \"40.65.170.125/32\",\r\n \"40.65.170.128/32\",\r\n \ - \ \"40.65.170.133/32\",\r\n \"40.65.170.137/32\",\r\n \"\ - 40.65.233.253/32\",\r\n \"40.65.235.54/32\",\r\n \"40.66.56.158/32\"\ - ,\r\n \"40.66.57.164/32\",\r\n \"40.66.57.203/32\",\r\n\ - \ \"40.66.59.41/32\",\r\n \"40.66.59.193/32\",\r\n \ - \ \"40.66.59.195/32\",\r\n \"40.66.59.196/32\",\r\n \ - \ \"40.66.59.246/32\",\r\n \"40.66.60.101/32\",\r\n \"40.66.60.118/32\"\ - ,\r\n \"40.66.60.180/32\",\r\n \"40.66.60.185/32\",\r\n\ - \ \"40.66.60.200/32\",\r\n \"40.66.60.206/31\",\r\n \ - \ \"40.66.60.208/31\",\r\n \"40.66.60.210/32\",\r\n \ - \ \"40.66.60.215/32\",\r\n \"40.66.60.216/31\",\r\n \"\ - 40.66.60.219/32\",\r\n \"40.66.60.220/31\",\r\n \"40.66.60.222/32\"\ - ,\r\n \"40.66.60.224/31\",\r\n \"40.66.60.226/32\",\r\n\ - \ \"40.66.60.232/32\",\r\n \"40.66.61.61/32\",\r\n \ - \ \"40.66.61.158/32\",\r\n \"40.66.61.193/32\",\r\n \ - \ \"40.66.61.226/32\",\r\n \"40.66.62.7/32\",\r\n \"40.66.62.9/32\"\ - ,\r\n \"40.66.62.78/32\",\r\n \"40.66.62.130/32\",\r\n \ - \ \"40.66.62.154/32\",\r\n \"40.66.62.225/32\",\r\n \ - \ \"40.66.63.148/32\",\r\n \"40.66.63.255/32\",\r\n \ - \ \"40.67.152.91/32\",\r\n \"40.67.152.227/32\",\r\n \"\ - 40.67.154.160/32\",\r\n \"40.67.155.146/32\",\r\n \"40.67.159.55/32\"\ - ,\r\n \"40.67.216.253/32\",\r\n \"40.67.219.133/32\",\r\n\ - \ \"40.67.251.0/32\",\r\n \"40.67.254.233/32\",\r\n \ - \ \"40.68.245.184/32\",\r\n \"40.69.108.96/27\",\r\n \ - \ \"40.70.0.255/32\",\r\n \"40.70.29.49/32\",\r\n \"40.70.29.200/32\"\ - ,\r\n \"40.70.148.112/28\",\r\n \"40.70.184.90/32\",\r\n\ - \ \"40.71.14.16/28\",\r\n \"40.74.1.235/32\",\r\n \ - \ \"40.74.6.204/32\",\r\n \"40.76.78.217/32\",\r\n \"\ - 40.78.23.204/32\",\r\n \"40.78.56.129/32\",\r\n \"40.78.229.64/28\"\ - ,\r\n \"40.78.236.160/28\",\r\n \"40.78.245.0/28\",\r\n\ - \ \"40.78.251.128/28\",\r\n \"40.79.132.96/28\",\r\n \ - \ \"40.79.139.16/28\",\r\n \"40.79.146.224/28\",\r\n \ - \ \"40.79.156.112/28\",\r\n \"40.79.180.64/27\",\r\n \ - \ \"40.80.219.49/32\",\r\n \"40.80.220.215/32\",\r\n \"\ - 40.80.220.246/32\",\r\n \"40.80.221.77/32\",\r\n \"40.80.222.91/32\"\ - ,\r\n \"40.80.222.197/32\",\r\n \"40.81.56.80/32\",\r\n\ - \ \"40.81.57.138/32\",\r\n \"40.81.57.141/32\",\r\n \ - \ \"40.81.57.144/32\",\r\n \"40.81.57.157/32\",\r\n \ - \ \"40.81.57.164/32\",\r\n \"40.81.57.169/32\",\r\n \"\ - 40.81.58.180/32\",\r\n \"40.81.58.184/32\",\r\n \"40.81.58.193/32\"\ - ,\r\n \"40.81.59.4/32\",\r\n \"40.81.59.90/32\",\r\n \ - \ \"40.81.59.93/32\",\r\n \"40.81.62.162/32\",\r\n \ - \ \"40.81.62.179/32\",\r\n \"40.81.62.193/32\",\r\n \"\ - 40.81.62.199/32\",\r\n \"40.81.62.206/32\",\r\n \"40.81.62.209/32\"\ - ,\r\n \"40.81.62.212/32\",\r\n \"40.81.62.220/30\",\r\n\ - \ \"40.81.62.224/32\",\r\n \"40.81.62.255/32\",\r\n \ - \ \"40.81.63.1/32\",\r\n \"40.81.63.2/32\",\r\n \"\ - 40.81.63.4/31\",\r\n \"40.81.63.7/32\",\r\n \"40.81.63.8/32\"\ - ,\r\n \"40.81.63.235/32\",\r\n \"40.81.63.245/32\",\r\n\ - \ \"40.81.63.248/32\",\r\n \"40.81.120.13/32\",\r\n \ - \ \"40.81.120.24/31\",\r\n \"40.81.120.97/32\",\r\n \ - \ \"40.81.120.187/32\",\r\n \"40.81.120.191/32\",\r\n \"\ - 40.81.120.192/32\",\r\n \"40.81.121.66/32\",\r\n \"40.81.121.76/32\"\ - ,\r\n \"40.81.121.78/32\",\r\n \"40.81.121.107/32\",\r\n\ - \ \"40.81.121.108/32\",\r\n \"40.81.121.111/32\",\r\n \ - \ \"40.81.121.127/32\",\r\n \"40.81.121.135/32\",\r\n \ - \ \"40.81.121.140/32\",\r\n \"40.81.121.175/32\",\r\n \ - \ \"40.81.122.4/32\",\r\n \"40.81.122.62/31\",\r\n \"\ - 40.81.122.76/32\",\r\n \"40.81.122.203/32\",\r\n \"40.81.123.124/32\"\ - ,\r\n \"40.81.123.157/32\",\r\n \"40.81.124.185/32\",\r\n\ - \ \"40.81.124.219/32\",\r\n \"40.81.127.25/32\",\r\n \ - \ \"40.81.127.139/32\",\r\n \"40.81.127.140/31\",\r\n \ - \ \"40.81.127.229/32\",\r\n \"40.81.127.230/32\",\r\n \ - \ \"40.81.127.239/32\",\r\n \"40.81.152.126/32\",\r\n \ - \ \"40.81.152.171/32\",\r\n \"40.81.152.172/32\",\r\n \"\ - 40.81.156.153/32\",\r\n \"40.81.156.154/31\",\r\n \"40.81.156.156/32\"\ - ,\r\n \"40.81.159.35/32\",\r\n \"40.81.159.77/32\",\r\n\ - \ \"40.82.184.80/32\",\r\n \"40.82.185.36/32\",\r\n \ - \ \"40.82.185.117/32\",\r\n \"40.82.185.229/32\",\r\n \ - \ \"40.82.186.166/32\",\r\n \"40.82.186.168/31\",\r\n \ - \ \"40.82.186.176/31\",\r\n \"40.82.186.180/32\",\r\n \"\ - 40.82.186.182/32\",\r\n \"40.82.186.185/32\",\r\n \"40.82.186.214/32\"\ - ,\r\n \"40.82.186.231/32\",\r\n \"40.82.187.161/32\",\r\n\ - \ \"40.82.187.162/31\",\r\n \"40.82.187.164/32\",\r\n \ - \ \"40.82.187.177/32\",\r\n \"40.82.187.178/31\",\r\n \ - \ \"40.82.187.199/32\",\r\n \"40.82.187.200/32\",\r\n \ - \ \"40.82.187.202/32\",\r\n \"40.82.187.204/30\",\r\n \ - \ \"40.82.187.208/30\",\r\n \"40.82.187.212/31\",\r\n \"\ - 40.82.187.218/32\",\r\n \"40.82.187.223/32\",\r\n \"40.82.190.163/32\"\ - ,\r\n \"40.82.191.58/32\",\r\n \"40.84.2.83/32\",\r\n \ - \ \"40.84.4.93/32\",\r\n \"40.84.4.119/32\",\r\n \ - \ \"40.84.5.28/32\",\r\n \"40.84.49.16/32\",\r\n \"40.89.136.227/32\"\ - ,\r\n \"40.89.137.101/32\",\r\n \"40.89.142.184/32\",\r\n\ - \ \"40.89.143.43/32\",\r\n \"40.90.184.197/32\",\r\n \ - \ \"40.90.185.64/32\",\r\n \"40.90.191.153/32\",\r\n \ - \ \"40.90.218.196/31\",\r\n \"40.90.218.198/32\",\r\n \ - \ \"40.90.218.203/32\",\r\n \"40.90.219.121/32\",\r\n \"\ - 40.90.219.184/32\",\r\n \"40.90.220.37/32\",\r\n \"40.90.220.190/32\"\ - ,\r\n \"40.90.220.196/32\",\r\n \"40.90.222.64/32\",\r\n\ - \ \"40.91.74.37/32\",\r\n \"40.91.78.105/32\",\r\n \ - \ \"40.91.114.40/29\",\r\n \"40.91.114.48/31\",\r\n \ - \ \"40.91.122.25/32\",\r\n \"40.91.122.38/32\",\r\n \"40.91.126.157/32\"\ - ,\r\n \"40.91.127.44/32\",\r\n \"40.91.198.19/32\",\r\n\ - \ \"40.113.121.176/32\",\r\n \"40.114.112.147/32\",\r\n\ - \ \"40.114.217.8/32\",\r\n \"40.115.24.65/32\",\r\n \ - \ \"40.115.25.50/32\",\r\n \"40.115.71.111/32\",\r\n \ - \ \"40.118.63.137/32\",\r\n \"40.118.97.232/32\",\r\n \ - \ \"40.118.211.172/32\",\r\n \"40.119.145.130/32\",\r\n \ - \ \"40.119.147.102/32\",\r\n \"40.119.154.72/32\",\r\n \"\ - 40.119.203.98/31\",\r\n \"40.119.203.158/31\",\r\n \"40.119.203.208/31\"\ - ,\r\n \"40.119.207.131/32\",\r\n \"40.119.207.144/32\",\r\ - \n \"40.119.207.164/32\",\r\n \"40.119.207.166/32\",\r\n\ - \ \"40.119.207.174/32\",\r\n \"40.119.207.182/32\",\r\n\ - \ \"40.119.207.193/32\",\r\n \"40.119.207.200/32\",\r\n\ - \ \"40.119.215.167/32\",\r\n \"40.121.134.1/32\",\r\n \ - \ \"40.124.53.69/32\",\r\n \"51.11.26.92/32\",\r\n \ - \ \"51.11.26.95/32\",\r\n \"51.104.9.16/28\",\r\n \"51.105.37.244/32\"\ - ,\r\n \"51.105.67.224/28\",\r\n \"51.105.75.176/28\",\r\n\ - \ \"51.105.124.64/32\",\r\n \"51.105.124.80/32\",\r\n \ - \ \"51.105.161.5/32\",\r\n \"51.105.163.8/32\",\r\n \ - \ \"51.105.163.43/32\",\r\n \"51.105.164.8/32\",\r\n \ - \ \"51.105.164.234/32\",\r\n \"51.105.164.241/32\",\r\n \ - \ \"51.105.165.31/32\",\r\n \"51.105.165.37/32\",\r\n \"\ - 51.105.165.63/32\",\r\n \"51.105.165.116/32\",\r\n \"51.105.166.102/31\"\ - ,\r\n \"51.105.166.106/32\",\r\n \"51.105.179.157/32\",\r\ - \n \"51.137.136.13/32\",\r\n \"51.137.136.14/32\",\r\n \ - \ \"51.137.136.34/32\",\r\n \"51.137.137.69/32\",\r\n \ - \ \"51.137.137.118/32\",\r\n \"51.137.137.121/32\",\r\n \ - \ \"51.137.137.200/32\",\r\n \"51.137.137.237/32\",\r\n \ - \ \"51.140.1.10/32\",\r\n \"51.140.8.108/32\",\r\n \ - \ \"51.140.8.180/32\",\r\n \"51.140.35.95/32\",\r\n \"\ - 51.140.52.106/32\",\r\n \"51.140.78.213/32\",\r\n \"51.140.105.124/32\"\ - ,\r\n \"51.140.125.227/32\",\r\n \"51.140.164.179/32\",\r\ - \n \"51.140.191.146/32\",\r\n \"51.140.212.128/27\",\r\n\ - \ \"51.140.230.246/32\",\r\n \"51.140.231.138/32\",\r\n\ - \ \"51.141.2.189/32\",\r\n \"51.141.7.11/32\",\r\n \ - \ \"51.143.58.207/32\",\r\n \"51.143.111.58/32\",\r\n \ - \ \"51.143.120.236/32\",\r\n \"51.143.120.242/32\",\r\n \ - \ \"51.143.122.59/32\",\r\n \"51.143.122.60/32\",\r\n \ - \ \"51.144.56.60/32\",\r\n \"51.145.108.227/32\",\r\n \"\ - 51.145.108.250/32\",\r\n \"51.145.181.195/32\",\r\n \"51.145.181.214/32\"\ - ,\r\n \"52.137.56.200/32\",\r\n \"52.137.89.147/32\",\r\n\ - \ \"52.138.227.160/28\",\r\n \"52.139.1.70/32\",\r\n \ - \ \"52.139.1.156/32\",\r\n \"52.139.1.158/31\",\r\n \ - \ \"52.139.1.200/32\",\r\n \"52.139.1.218/32\",\r\n \"\ - 52.139.2.0/32\",\r\n \"52.139.16.105/32\",\r\n \"52.139.18.234/32\"\ - ,\r\n \"52.139.18.236/32\",\r\n \"52.139.19.71/32\",\r\n\ - \ \"52.139.19.187/32\",\r\n \"52.139.19.215/32\",\r\n \ - \ \"52.139.19.247/32\",\r\n \"52.139.20.31/32\",\r\n \ - \ \"52.139.20.118/32\",\r\n \"52.139.21.70/32\",\r\n \ - \ \"52.139.245.1/32\",\r\n \"52.139.245.21/32\",\r\n \"\ - 52.139.245.40/32\",\r\n \"52.139.245.48/32\",\r\n \"52.139.251.219/32\"\ - ,\r\n \"52.139.252.105/32\",\r\n \"52.142.112.145/32\",\r\ - \n \"52.142.112.146/32\",\r\n \"52.142.116.135/32\",\r\n\ - \ \"52.142.116.174/32\",\r\n \"52.142.116.250/32\",\r\n\ - \ \"52.142.117.183/32\",\r\n \"52.142.118.130/32\",\r\n\ - \ \"52.142.121.6/32\",\r\n \"52.142.121.75/32\",\r\n \ - \ \"52.142.124.23/32\",\r\n \"52.142.127.127/32\",\r\n \ - \ \"52.142.220.179/32\",\r\n \"52.142.232.120/32\",\r\n \ - \ \"52.143.73.88/32\",\r\n \"52.143.74.31/32\",\r\n \ - \ \"52.148.115.188/32\",\r\n \"52.148.115.194/32\",\r\n \ - \ \"52.148.115.238/32\",\r\n \"52.148.116.37/32\",\r\n \ - \ \"52.148.161.45/32\",\r\n \"52.148.161.53/32\",\r\n \"\ - 52.151.237.243/32\",\r\n \"52.151.238.5/32\",\r\n \"52.151.244.65/32\"\ - ,\r\n \"52.151.247.27/32\",\r\n \"52.153.240.107/32\",\r\ - \n \"52.155.161.88/32\",\r\n \"52.155.161.91/32\",\r\n \ - \ \"52.155.164.131/32\",\r\n \"52.155.166.50/32\",\r\n \ - \ \"52.155.167.231/32\",\r\n \"52.155.168.45/32\",\r\n \ - \ \"52.155.177.13/32\",\r\n \"52.155.178.247/32\",\r\n \ - \ \"52.155.179.84/32\",\r\n \"52.155.180.208/30\",\r\n \ - \ \"52.155.181.180/30\",\r\n \"52.155.182.48/31\",\r\n \ - \ \"52.155.182.50/32\",\r\n \"52.155.182.138/32\",\r\n \ - \ \"52.155.182.141/32\",\r\n \"52.156.197.208/32\",\r\n \ - \ \"52.156.197.254/32\",\r\n \"52.156.198.196/32\",\r\n \ - \ \"52.156.202.7/32\",\r\n \"52.156.203.22/32\",\r\n \"\ - 52.156.203.198/31\",\r\n \"52.156.204.24/32\",\r\n \"52.156.204.51/32\"\ - ,\r\n \"52.156.204.99/32\",\r\n \"52.156.204.139/32\",\r\ - \n \"52.156.205.137/32\",\r\n \"52.156.205.182/32\",\r\n\ - \ \"52.156.205.222/32\",\r\n \"52.156.205.226/32\",\r\n\ - \ \"52.156.206.43/32\",\r\n \"52.156.206.45/32\",\r\n \ - \ \"52.156.206.46/31\",\r\n \"52.157.19.228/32\",\r\n \ - \ \"52.157.20.142/32\",\r\n \"52.157.218.219/32\",\r\n \ - \ \"52.157.218.232/32\",\r\n \"52.157.232.110/32\",\r\n \ - \ \"52.157.232.147/32\",\r\n \"52.157.233.49/32\",\r\n \ - \ \"52.157.233.92/32\",\r\n \"52.157.233.133/32\",\r\n \ - \ \"52.157.233.205/32\",\r\n \"52.157.234.160/32\",\r\n \ - \ \"52.157.234.222/32\",\r\n \"52.157.235.27/32\",\r\n \ - \ \"52.157.235.144/32\",\r\n \"52.157.236.195/32\",\r\n \ - \ \"52.157.237.107/32\",\r\n \"52.157.237.213/32\",\r\n \ - \ \"52.157.237.255/32\",\r\n \"52.157.238.58/32\",\r\n \ - \ \"52.157.239.110/32\",\r\n \"52.157.239.132/32\",\r\n \ - \ \"52.158.28.235/32\",\r\n \"52.167.107.96/28\",\r\n \"\ - 52.169.192.237/32\",\r\n \"52.174.56.180/32\",\r\n \"52.177.85.43/32\"\ - ,\r\n \"52.178.44.248/32\",\r\n \"52.178.89.44/32\",\r\n\ - \ \"52.179.155.177/32\",\r\n \"52.179.194.73/32\",\r\n \ - \ \"52.179.198.41/32\",\r\n \"52.182.139.208/28\",\r\n \ - \ \"52.183.24.254/32\",\r\n \"52.183.30.204/32\",\r\n \ - \ \"52.183.75.62/32\",\r\n \"52.184.165.82/32\",\r\n \ - \ \"52.188.217.236/32\",\r\n \"52.189.208.36/32\",\r\n \ - \ \"52.189.213.36/32\",\r\n \"52.189.213.124/32\",\r\n \ - \ \"52.189.218.253/32\",\r\n \"52.190.26.220/32\",\r\n \"\ - 52.190.31.62/32\",\r\n \"52.191.129.65/32\",\r\n \"52.191.237.188/32\"\ - ,\r\n \"52.191.238.65/32\",\r\n \"52.224.188.157/32\",\r\ - \n \"52.224.188.168/32\",\r\n \"52.224.190.225/32\",\r\n\ - \ \"52.224.191.62/32\",\r\n \"52.224.201.216/32\",\r\n \ - \ \"52.224.201.223/32\",\r\n \"52.224.202.86/32\",\r\n \ - \ \"52.224.202.91/32\",\r\n \"52.225.225.218/32\",\r\n \ - \ \"52.225.231.232/32\",\r\n \"52.232.224.227/32\",\r\n \ - \ \"52.232.225.84/32\",\r\n \"52.232.228.217/32\",\r\n \ - \ \"52.232.245.96/32\",\r\n \"52.236.187.80/28\",\r\n \ - \ \"52.249.25.160/32\",\r\n \"52.249.25.165/32\",\r\n \ - \ \"65.52.138.123/32\",\r\n \"65.52.229.200/32\",\r\n \"\ - 104.40.28.202/32\",\r\n \"104.40.129.120/32\",\r\n \"104.42.15.41/32\"\ - ,\r\n \"104.42.34.58/32\",\r\n \"104.42.38.254/32\",\r\n\ - \ \"104.42.54.24/32\",\r\n \"104.42.75.120/32\",\r\n \ - \ \"104.42.211.215/32\",\r\n \"104.45.7.95/32\",\r\n \ - \ \"104.45.65.169/32\",\r\n \"104.45.168.103/32\",\r\n \ - \ \"104.45.168.104/32\",\r\n \"104.45.168.106/32\",\r\n \ - \ \"104.45.168.108/32\",\r\n \"104.45.168.111/32\",\r\n \ - \ \"104.45.168.114/32\",\r\n \"104.45.170.70/32\",\r\n \ - \ \"104.45.170.127/32\",\r\n \"104.45.170.161/32\",\r\n \ - \ \"104.45.170.173/32\",\r\n \"104.45.170.174/31\",\r\n \ - \ \"104.45.170.176/32\",\r\n \"104.45.170.178/32\",\r\n \ - \ \"104.45.170.180/32\",\r\n \"104.45.170.182/31\",\r\n \ - \ \"104.45.170.184/31\",\r\n \"104.45.170.186/32\",\r\n \ - \ \"104.45.170.188/32\",\r\n \"104.45.170.191/32\",\r\n \ - \ \"104.45.170.194/32\",\r\n \"104.45.170.196/32\",\r\n \ - \ \"104.46.116.211/32\",\r\n \"104.46.121.72/32\",\r\n \ - \ \"104.46.122.189/32\",\r\n \"104.208.216.221/32\",\r\n \ - \ \"104.209.35.177/32\",\r\n \"104.209.168.251/32\",\r\n \ - \ \"104.210.0.32/32\",\r\n \"104.211.9.226/32\",\r\n \"\ - 104.214.225.33/32\",\r\n \"137.116.52.31/32\",\r\n \"138.91.147.71/32\"\ - ,\r\n \"168.63.38.153/32\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"MicrosoftContainerRegistry\",\r\n \"id\"\ - : \"MicrosoftContainerRegistry\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.140.64/29\",\r\n\ - \ \"13.67.8.112/29\",\r\n \"13.69.64.80/29\",\r\n \ - \ \"13.69.106.72/29\",\r\n \"13.69.227.80/29\",\r\n \"\ - 13.70.72.128/29\",\r\n \"13.71.170.48/29\",\r\n \"13.71.194.120/29\"\ - ,\r\n \"13.74.107.72/29\",\r\n \"13.75.34.152/29\",\r\n\ - \ \"13.77.50.72/29\",\r\n \"13.78.106.192/29\",\r\n \ - \ \"13.87.56.88/29\",\r\n \"13.87.122.88/29\",\r\n \ - \ \"13.89.170.208/29\",\r\n \"20.21.42.64/29\",\r\n \"20.21.66.64/29\"\ - ,\r\n \"20.21.74.64/29\",\r\n \"20.37.74.64/29\",\r\n \ - \ \"20.38.146.136/29\",\r\n \"20.44.2.16/29\",\r\n \ - \ \"20.44.26.136/29\",\r\n \"20.45.122.136/29\",\r\n \"\ - 20.49.82.8/29\",\r\n \"20.49.90.8/29\",\r\n \"20.72.26.8/29\"\ - ,\r\n \"20.150.170.16/29\",\r\n \"20.150.178.136/29\",\r\ - \n \"20.150.186.136/29\",\r\n \"20.192.98.136/29\",\r\n\ - \ \"20.192.234.16/29\",\r\n \"20.193.202.8/29\",\r\n \ - \ \"20.194.66.8/29\",\r\n \"20.205.74.64/29\",\r\n \ - \ \"20.205.82.64/29\",\r\n \"20.208.18.64/29\",\r\n \"\ - 23.98.82.104/29\",\r\n \"40.67.58.16/29\",\r\n \"40.69.106.72/29\"\ - ,\r\n \"40.70.146.80/29\",\r\n \"40.71.10.208/29\",\r\n\ - \ \"40.74.100.56/29\",\r\n \"40.74.146.40/29\",\r\n \ - \ \"40.75.34.24/29\",\r\n \"40.78.194.72/29\",\r\n \ - \ \"40.78.202.64/29\",\r\n \"40.78.226.200/29\",\r\n \"\ - 40.78.234.40/29\",\r\n \"40.78.242.152/29\",\r\n \"40.78.250.88/29\"\ - ,\r\n \"40.79.130.48/29\",\r\n \"40.79.138.24/29\",\r\n\ - \ \"40.79.146.24/29\",\r\n \"40.79.154.96/29\",\r\n \ - \ \"40.79.162.24/29\",\r\n \"40.79.170.8/29\",\r\n \ - \ \"40.79.178.72/29\",\r\n \"40.79.186.0/29\",\r\n \"40.79.194.88/29\"\ - ,\r\n \"40.80.50.136/29\",\r\n \"40.112.242.152/29\",\r\n\ - \ \"40.120.74.8/29\",\r\n \"51.12.98.16/29\",\r\n \ - \ \"51.12.202.16/29\",\r\n \"51.12.226.136/29\",\r\n \ - \ \"51.12.234.136/29\",\r\n \"51.103.202.64/29\",\r\n \"\ - 51.105.66.136/29\",\r\n \"51.105.74.136/29\",\r\n \"51.107.58.16/29\"\ - ,\r\n \"51.107.154.16/29\",\r\n \"51.116.58.16/29\",\r\n\ - \ \"51.116.154.80/29\",\r\n \"51.116.242.136/29\",\r\n \ - \ \"51.116.250.136/29\",\r\n \"51.120.98.24/29\",\r\n \ - \ \"51.120.106.136/29\",\r\n \"51.120.210.136/29\",\r\n \ - \ \"51.120.218.16/29\",\r\n \"51.140.146.192/29\",\r\n \ - \ \"51.140.210.88/29\",\r\n \"52.138.90.24/29\",\r\n \ - \ \"52.138.226.72/29\",\r\n \"52.162.106.152/29\",\r\n \ - \ \"52.167.106.72/29\",\r\n \"52.182.138.200/29\",\r\n \ - \ \"52.231.18.48/29\",\r\n \"52.231.146.88/29\",\r\n \"\ - 52.236.186.72/29\",\r\n \"52.246.154.136/29\",\r\n \"65.52.250.8/29\"\ - ,\r\n \"102.133.26.16/29\",\r\n \"102.133.122.136/29\",\r\ - \n \"102.133.154.16/29\",\r\n \"102.133.250.136/29\",\r\n\ - \ \"104.208.16.72/29\",\r\n \"104.208.144.72/29\",\r\n \ - \ \"104.211.81.128/29\",\r\n \"104.211.146.72/29\",\r\n \ - \ \"104.214.18.176/29\",\r\n \"191.233.50.8/29\",\r\n \ - \ \"191.233.203.128/29\",\r\n \"191.234.146.136/29\",\r\n \ - \ \"191.234.154.136/29\",\r\n \"2603:1000:4:402::88/125\"\ - ,\r\n \"2603:1000:104:402::88/125\",\r\n \"2603:1000:104:802::88/125\"\ - ,\r\n \"2603:1000:104:c02::88/125\",\r\n \"2603:1010:6:402::88/125\"\ - ,\r\n \"2603:1010:6:802::88/125\",\r\n \"2603:1010:6:c02::88/125\"\ - ,\r\n \"2603:1010:101:402::88/125\",\r\n \"2603:1010:304:402::88/125\"\ - ,\r\n \"2603:1010:404:402::88/125\",\r\n \"2603:1020:5:402::88/125\"\ - ,\r\n \"2603:1020:5:802::88/125\",\r\n \"2603:1020:5:c02::88/125\"\ - ,\r\n \"2603:1020:206:402::88/125\",\r\n \"2603:1020:206:802::88/125\"\ - ,\r\n \"2603:1020:206:c02::88/125\",\r\n \"2603:1020:305:402::88/125\"\ - ,\r\n \"2603:1020:405:402::88/125\",\r\n \"2603:1020:605:402::88/125\"\ - ,\r\n \"2603:1020:705:402::88/125\",\r\n \"2603:1020:705:802::88/125\"\ - ,\r\n \"2603:1020:705:c02::88/125\",\r\n \"2603:1020:805:402::88/125\"\ - ,\r\n \"2603:1020:805:802::88/125\",\r\n \"2603:1020:805:c02::88/125\"\ - ,\r\n \"2603:1020:905:402::88/125\",\r\n \"2603:1020:a04:402::88/125\"\ - ,\r\n \"2603:1020:a04:802::88/125\",\r\n \"2603:1020:a04:c02::88/125\"\ - ,\r\n \"2603:1020:b04:402::88/125\",\r\n \"2603:1020:c04:402::88/125\"\ - ,\r\n \"2603:1020:c04:802::88/125\",\r\n \"2603:1020:c04:c02::88/125\"\ - ,\r\n \"2603:1020:d04:402::88/125\",\r\n \"2603:1020:e04:402::88/125\"\ - ,\r\n \"2603:1020:e04:802::88/125\",\r\n \"2603:1020:e04:c02::88/125\"\ - ,\r\n \"2603:1020:f04:402::88/125\",\r\n \"2603:1020:1004:400::88/125\"\ - ,\r\n \"2603:1020:1004:400::3b0/125\",\r\n \"2603:1020:1004:800::148/125\"\ - ,\r\n \"2603:1020:1004:c02::1a8/125\",\r\n \"2603:1020:1104:400::88/125\"\ - ,\r\n \"2603:1030:f:400::888/125\",\r\n \"2603:1030:10:402::88/125\"\ - ,\r\n \"2603:1030:10:802::88/125\",\r\n \"2603:1030:10:c02::88/125\"\ - ,\r\n \"2603:1030:104:402::88/125\",\r\n \"2603:1030:104:402::160/125\"\ - ,\r\n \"2603:1030:104:802::50/125\",\r\n \"2603:1030:107:400::8/125\"\ - ,\r\n \"2603:1030:210:402::88/125\",\r\n \"2603:1030:210:802::88/125\"\ - ,\r\n \"2603:1030:210:c02::88/125\",\r\n \"2603:1030:40b:400::888/125\"\ - ,\r\n \"2603:1030:40b:800::88/125\",\r\n \"2603:1030:40b:c00::88/125\"\ - ,\r\n \"2603:1030:40c:402::88/125\",\r\n \"2603:1030:40c:802::88/125\"\ - ,\r\n \"2603:1030:40c:c02::88/125\",\r\n \"2603:1030:504:402::88/125\"\ - ,\r\n \"2603:1030:504:402::3b0/125\",\r\n \"2603:1030:504:802::148/125\"\ - ,\r\n \"2603:1030:504:802::3e8/125\",\r\n \"2603:1030:504:c02::398/125\"\ - ,\r\n \"2603:1030:608:402::88/125\",\r\n \"2603:1030:807:402::88/125\"\ - ,\r\n \"2603:1030:807:802::88/125\",\r\n \"2603:1030:807:c02::88/125\"\ - ,\r\n \"2603:1030:a07:402::88/125\",\r\n \"2603:1030:b04:402::88/125\"\ - ,\r\n \"2603:1030:c06:400::888/125\",\r\n \"2603:1030:c06:802::88/125\"\ - ,\r\n \"2603:1030:c06:c02::88/125\",\r\n \"2603:1030:f05:402::88/125\"\ - ,\r\n \"2603:1030:f05:802::88/125\",\r\n \"2603:1030:f05:c02::88/125\"\ - ,\r\n \"2603:1030:1005:402::88/125\",\r\n \"2603:1040:5:402::88/125\"\ - ,\r\n \"2603:1040:5:802::88/125\",\r\n \"2603:1040:5:c02::88/125\"\ - ,\r\n \"2603:1040:207:402::88/125\",\r\n \"2603:1040:207:800::40/125\"\ - ,\r\n \"2603:1040:207:c00::40/125\",\r\n \"2603:1040:407:402::88/125\"\ - ,\r\n \"2603:1040:407:802::88/125\",\r\n \"2603:1040:407:c02::88/125\"\ - ,\r\n \"2603:1040:606:402::88/125\",\r\n \"2603:1040:806:402::88/125\"\ - ,\r\n \"2603:1040:904:402::88/125\",\r\n \"2603:1040:904:802::88/125\"\ - ,\r\n \"2603:1040:904:c02::88/125\",\r\n \"2603:1040:a06:402::88/125\"\ - ,\r\n \"2603:1040:a06:802::88/125\",\r\n \"2603:1040:a06:c02::88/125\"\ - ,\r\n \"2603:1040:b04:402::88/125\",\r\n \"2603:1040:c06:402::88/125\"\ - ,\r\n \"2603:1040:d04:400::88/125\",\r\n \"2603:1040:d04:400::3b0/125\"\ - ,\r\n \"2603:1040:d04:800::148/125\",\r\n \"2603:1040:f05:402::88/125\"\ - ,\r\n \"2603:1040:f05:802::88/125\",\r\n \"2603:1040:f05:c02::88/125\"\ - ,\r\n \"2603:1040:1002:400::40/125\",\r\n \"2603:1040:1002:800::40/125\"\ - ,\r\n \"2603:1040:1002:c00::40/125\",\r\n \"2603:1040:1104:400::88/125\"\ - ,\r\n \"2603:1050:6:402::88/125\",\r\n \"2603:1050:6:802::88/125\"\ - ,\r\n \"2603:1050:6:c02::88/125\",\r\n \"2603:1050:403:400::90/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.AustraliaEast\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.AustraliaEast\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"2\",\r\n \"region\": \"australiaeast\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.70.72.128/29\",\r\n\ - \ \"40.79.162.24/29\",\r\n \"40.79.170.8/29\",\r\n \ - \ \"2603:1010:6:402::88/125\",\r\n \"2603:1010:6:802::88/125\"\ - ,\r\n \"2603:1010:6:c02::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.AustraliaSoutheast\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.AustraliaSoutheast\",\r\n\ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n\ - \ \"changeNumber\": \"2\",\r\n \"region\": \"australiasoutheast\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.77.50.72/29\",\r\n \ - \ \"2603:1010:101:402::88/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"MicrosoftContainerRegistry.BrazilSouth\",\r\n\ - \ \"id\": \"MicrosoftContainerRegistry.BrazilSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"191.233.203.128/29\",\r\n \"191.234.146.136/29\",\r\n\ - \ \"191.234.154.136/29\",\r\n \"2603:1050:6:402::88/125\"\ - ,\r\n \"2603:1050:6:802::88/125\",\r\n \"2603:1050:6:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.BrazilSoutheast\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.BrazilSoutheast\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"brazilse\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\ - \n \"addressPrefixes\": [\r\n \"191.233.50.8/29\",\r\n \ - \ \"2603:1050:403:400::90/125\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"MicrosoftContainerRegistry.CanadaCentral\",\r\n\ - \ \"id\": \"MicrosoftContainerRegistry.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.71.170.48/29\",\r\n \"20.38.146.136/29\",\r\n \ - \ \"52.246.154.136/29\",\r\n \"2603:1030:f05:402::88/125\",\r\ - \n \"2603:1030:f05:802::88/125\",\r\n \"2603:1030:f05:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.CanadaEast\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.CanadaEast\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"2\",\r\n \"region\": \"canadaeast\",\r\n \"\ - state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\ - \n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n \ - \ \"addressPrefixes\": [\r\n \"40.69.106.72/29\",\r\n \ - \ \"2603:1030:1005:402::88/125\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"MicrosoftContainerRegistry.CentralIndia\",\r\n\ - \ \"id\": \"MicrosoftContainerRegistry.CentralIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.192.98.136/29\",\r\n \"40.80.50.136/29\",\r\n \ - \ \"104.211.81.128/29\",\r\n \"2603:1040:a06:402::88/125\",\r\ - \n \"2603:1040:a06:802::88/125\",\r\n \"2603:1040:a06:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.CentralUS\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.CentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.89.170.208/29\",\r\n \"52.182.138.200/29\",\r\n \ - \ \"104.208.16.72/29\",\r\n \"2603:1030:10:402::88/125\",\r\ - \n \"2603:1030:10:802::88/125\",\r\n \"2603:1030:10:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.CentralUSEUAP\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.CentralUSEUAP\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"2\",\r\n \"region\": \"centraluseuap\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"40.78.202.64/29\",\r\n\ - \ \"2603:1030:f:400::888/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"MicrosoftContainerRegistry.EastAsia\",\r\n \ - \ \"id\": \"MicrosoftContainerRegistry.EastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.75.34.152/29\",\r\n \"20.205.74.64/29\",\r\n \ - \ \"20.205.82.64/29\",\r\n \"2603:1040:207:402::88/125\",\r\n\ - \ \"2603:1040:207:800::40/125\",\r\n \"2603:1040:207:c00::40/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.EastUS\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.EastUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"40.71.10.208/29\",\r\n \"40.78.226.200/29\",\r\n \ - \ \"40.79.154.96/29\",\r\n \"2603:1030:210:402::88/125\",\r\n\ - \ \"2603:1030:210:802::88/125\",\r\n \"2603:1030:210:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.EastUS2\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.EastUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"40.70.146.80/29\",\r\n \"52.167.106.72/29\",\r\n \ - \ \"104.208.144.72/29\",\r\n \"2603:1030:40c:402::88/125\",\r\ - \n \"2603:1030:40c:802::88/125\",\r\n \"2603:1030:40c:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.EastUS2EUAP\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.EastUS2EUAP\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"2\",\r\n \"region\": \"eastus2euap\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"40.74.146.40/29\",\r\n \ - \ \"40.75.34.24/29\",\r\n \"52.138.90.24/29\",\r\n \ - \ \"2603:1030:40b:400::888/125\",\r\n \"2603:1030:40b:800::88/125\"\ - ,\r\n \"2603:1030:40b:c00::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.FranceCentral\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.FranceCentral\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"2\",\r\n \"region\": \"centralfrance\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"40.79.130.48/29\",\r\n\ - \ \"40.79.138.24/29\",\r\n \"40.79.146.24/29\",\r\n \ - \ \"2603:1020:805:402::88/125\",\r\n \"2603:1020:805:802::88/125\"\ - ,\r\n \"2603:1020:805:c02::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.FranceSouth\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.FranceSouth\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"2\",\r\n \"region\": \"southfrance\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"40.79.178.72/29\",\r\n \ - \ \"2603:1020:905:402::88/125\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"MicrosoftContainerRegistry.GermanyNorth\",\r\n\ - \ \"id\": \"MicrosoftContainerRegistry.GermanyNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"51.116.58.16/29\",\r\n \"2603:1020:d04:402::88/125\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.GermanyWestCentral\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.GermanyWestCentral\",\r\n\ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n\ - \ \"changeNumber\": \"2\",\r\n \"region\": \"germanywc\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.116.154.80/29\",\r\n\ - \ \"51.116.242.136/29\",\r\n \"51.116.250.136/29\",\r\n\ - \ \"2603:1020:c04:402::88/125\",\r\n \"2603:1020:c04:802::88/125\"\ - ,\r\n \"2603:1020:c04:c02::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.JapanEast\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.78.106.192/29\",\r\n \"40.79.186.0/29\",\r\n \ - \ \"40.79.194.88/29\",\r\n \"2603:1040:407:402::88/125\",\r\n\ - \ \"2603:1040:407:802::88/125\",\r\n \"2603:1040:407:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.JapanWest\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.JapanWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"40.74.100.56/29\",\r\n \"2603:1040:606:402::88/125\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.JioIndiaCentral\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.JioIndiaCentral\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"jioindiacentral\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.192.234.16/29\",\r\n\ - \ \"2603:1040:1104:400::88/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"MicrosoftContainerRegistry.JioIndiaWest\",\r\n\ - \ \"id\": \"MicrosoftContainerRegistry.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.193.202.8/29\",\r\n \"2603:1040:d04:400::88/125\",\r\ - \n \"2603:1040:d04:400::3b0/125\",\r\n \"2603:1040:d04:800::148/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.KoreaCentral\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.KoreaCentral\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"2\",\r\n \"region\": \"koreacentral\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n\ - \ \"addressPrefixes\": [\r\n \"20.44.26.136/29\",\r\n \ - \ \"20.194.66.8/29\",\r\n \"52.231.18.48/29\",\r\n \ - \ \"2603:1040:f05:402::88/125\",\r\n \"2603:1040:f05:802::88/125\"\ - ,\r\n \"2603:1040:f05:c02::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.KoreaSouth\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.KoreaSouth\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"1\",\r\n \"region\": \"koreasouth\",\r\n \"\ - state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\ - \n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n \ - \ \"addressPrefixes\": [\r\n \"52.231.146.88/29\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.NorthCentralUS\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.NorthCentralUS\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"2\",\r\n \"region\": \"northcentralus\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"52.162.106.152/29\",\r\n\ - \ \"2603:1030:608:402::88/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"MicrosoftContainerRegistry.NorthEurope\",\r\n\ - \ \"id\": \"MicrosoftContainerRegistry.NorthEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.69.227.80/29\",\r\n \"13.74.107.72/29\",\r\n \ - \ \"52.138.226.72/29\",\r\n \"2603:1020:5:402::88/125\",\r\n \ - \ \"2603:1020:5:802::88/125\",\r\n \"2603:1020:5:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.NorwayEast\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.NorwayEast\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"2\",\r\n \"region\": \"norwaye\",\r\n \"state\"\ - : \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \ - \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n\ - \ \"systemService\": \"MicrosoftContainerRegistry\",\r\n \"\ - addressPrefixes\": [\r\n \"51.120.98.24/29\",\r\n \"51.120.106.136/29\"\ - ,\r\n \"51.120.210.136/29\",\r\n \"2603:1020:e04:402::88/125\"\ - ,\r\n \"2603:1020:e04:802::88/125\",\r\n \"2603:1020:e04:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.NorwayWest\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.NorwayWest\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"2\",\r\n \"region\": \"norwayw\",\r\n \"state\"\ - : \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \ - \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n\ - \ \"systemService\": \"MicrosoftContainerRegistry\",\r\n \"\ - addressPrefixes\": [\r\n \"51.120.218.16/29\",\r\n \"2603:1020:f04:402::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SouthAfricaNorth\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.SouthAfricaNorth\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"2\",\r\n \"region\": \"southafricanorth\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"102.133.122.136/29\",\r\ - \n \"102.133.154.16/29\",\r\n \"102.133.250.136/29\",\r\n\ - \ \"2603:1000:104:402::88/125\",\r\n \"2603:1000:104:802::88/125\"\ - ,\r\n \"2603:1000:104:c02::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SouthAfricaWest\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.SouthAfricaWest\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"2\",\r\n \"region\": \"southafricawest\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"102.133.26.16/29\",\r\n\ - \ \"2603:1000:4:402::88/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"MicrosoftContainerRegistry.SouthCentralUS\",\r\ - \n \"id\": \"MicrosoftContainerRegistry.SouthCentralUS\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"2\",\r\n \"region\": \"southcentralus\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\ - \n \"addressPrefixes\": [\r\n \"20.45.122.136/29\",\r\n \ - \ \"20.49.90.8/29\",\r\n \"104.214.18.176/29\",\r\n \ - \ \"2603:1030:807:402::88/125\",\r\n \"2603:1030:807:802::88/125\"\ - ,\r\n \"2603:1030:807:c02::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SouthCentralUSSTG\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.SouthCentralUSSTG\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"1\",\r\n \"region\": \"usstagec\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.44.2.16/29\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SoutheastAsia\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.SoutheastAsia\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"2\",\r\n \"region\": \"southeastasia\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.67.8.112/29\",\r\n \ - \ \"23.98.82.104/29\",\r\n \"40.78.234.40/29\",\r\n \ - \ \"2603:1040:5:402::88/125\",\r\n \"2603:1040:5:802::88/125\"\ - ,\r\n \"2603:1040:5:c02::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SouthIndia\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.SouthIndia\",\r\n \"\ - serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \"\ - changeNumber\": \"2\",\r\n \"region\": \"southindia\",\r\n \"\ - state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\ - \n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n \ - \ \"addressPrefixes\": [\r\n \"40.78.194.72/29\",\r\n \ - \ \"2603:1040:c06:402::88/125\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"MicrosoftContainerRegistry.SwedenCentral\",\r\n\ - \ \"id\": \"MicrosoftContainerRegistry.SwedenCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"51.12.98.16/29\",\r\n \"51.12.226.136/29\",\r\n \ - \ \"51.12.234.136/29\",\r\n \"2603:1020:1004:400::88/125\",\r\n\ - \ \"2603:1020:1004:400::3b0/125\",\r\n \"2603:1020:1004:800::148/125\"\ - ,\r\n \"2603:1020:1004:c02::1a8/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SwitzerlandNorth\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.SwitzerlandNorth\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"3\",\r\n \"region\": \"switzerlandn\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.208.18.64/29\",\r\n\ - \ \"51.103.202.64/29\",\r\n \"51.107.58.16/29\",\r\n \ - \ \"2603:1020:a04:402::88/125\",\r\n \"2603:1020:a04:802::88/125\"\ - ,\r\n \"2603:1020:a04:c02::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SwitzerlandWest\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.SwitzerlandWest\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"2\",\r\n \"region\": \"switzerlandw\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.107.154.16/29\",\r\n\ - \ \"2603:1020:b04:402::88/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"MicrosoftContainerRegistry.UAECentral\",\r\n\ - \ \"id\": \"MicrosoftContainerRegistry.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.37.74.64/29\",\r\n \"2603:1040:b04:402::88/125\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.UAENorth\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.UAENorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"40.120.74.8/29\",\r\n \"65.52.250.8/29\",\r\n \ - \ \"2603:1040:904:402::88/125\",\r\n \"2603:1040:904:802::88/125\"\ - ,\r\n \"2603:1040:904:c02::88/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.UKSouth\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.UKSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"51.105.66.136/29\",\r\n \"51.105.74.136/29\",\r\n \ - \ \"51.140.146.192/29\",\r\n \"2603:1020:705:402::88/125\",\r\ - \n \"2603:1020:705:802::88/125\",\r\n \"2603:1020:705:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.UKWest\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.UKWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"51.140.210.88/29\",\r\n \"2603:1020:605:402::88/125\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestCentralUS\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.WestCentralUS\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"2\",\r\n \"region\": \"westcentralus\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"MicrosoftContainerRegistry\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.71.194.120/29\",\r\n\ - \ \"2603:1030:b04:402::88/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"MicrosoftContainerRegistry.WestEurope\",\r\n\ - \ \"id\": \"MicrosoftContainerRegistry.WestEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.69.64.80/29\",\r\n \"13.69.106.72/29\",\r\n \ - \ \"52.236.186.72/29\",\r\n \"2603:1020:206:402::88/125\",\r\n\ - \ \"2603:1020:206:802::88/125\",\r\n \"2603:1020:206:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestIndia\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.WestIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"104.211.146.72/29\",\r\n \"2603:1040:806:402::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestUS\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.WestUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"40.112.242.152/29\",\r\n \"2603:1030:a07:402::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestUS2\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.WestUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"13.66.140.64/29\",\r\n \"40.78.242.152/29\",\r\n \ - \ \"40.78.250.88/29\",\r\n \"2603:1030:c06:400::888/125\",\r\n\ - \ \"2603:1030:c06:802::88/125\",\r\n \"2603:1030:c06:c02::88/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestUS3\"\ - ,\r\n \"id\": \"MicrosoftContainerRegistry.WestUS3\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.150.170.16/29\",\r\n \"20.150.178.136/29\",\r\n \ - \ \"20.150.186.136/29\",\r\n \"2603:1030:504:402::88/125\"\ - ,\r\n \"2603:1030:504:402::3b0/125\",\r\n \"2603:1030:504:802::148/125\"\ - ,\r\n \"2603:1030:504:802::3e8/125\",\r\n \"2603:1030:504:c02::398/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"PowerBI\"\ - ,\r\n \"id\": \"PowerBI\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \ - \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"PowerBI\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.73.248.4/31\",\r\n \ - \ \"13.73.248.48/28\",\r\n \"13.73.248.64/27\",\r\n \ - \ \"20.21.32.22/31\",\r\n \"20.21.36.124/30\",\r\n \"\ - 20.21.37.48/29\",\r\n \"20.36.120.122/31\",\r\n \"20.36.120.124/30\"\ - ,\r\n \"20.36.120.208/29\",\r\n \"20.37.64.122/31\",\r\n\ - \ \"20.37.64.124/30\",\r\n \"20.37.64.208/29\",\r\n \ - \ \"20.37.156.200/30\",\r\n \"20.37.156.240/28\",\r\n \ - \ \"20.37.157.0/29\",\r\n \"20.37.157.16/28\",\r\n \"\ - 20.37.157.32/27\",\r\n \"20.37.195.24/31\",\r\n \"20.37.195.48/29\"\ - ,\r\n \"20.37.195.64/28\",\r\n \"20.37.195.128/26\",\r\n\ - \ \"20.37.224.122/31\",\r\n \"20.37.224.124/30\",\r\n \ - \ \"20.37.224.208/29\",\r\n \"20.38.84.104/31\",\r\n \ - \ \"20.38.84.128/25\",\r\n \"20.38.85.0/25\",\r\n \"\ - 20.38.86.0/24\",\r\n \"20.38.136.70/31\",\r\n \"20.38.136.208/30\"\ - ,\r\n \"20.38.136.216/29\",\r\n \"20.39.11.26/31\",\r\n\ - \ \"20.39.11.28/30\",\r\n \"20.39.11.48/28\",\r\n \ - \ \"20.40.230.60/30\",\r\n \"20.41.4.104/31\",\r\n \"\ - 20.41.4.108/30\",\r\n \"20.41.4.208/28\",\r\n \"20.41.4.224/27\"\ - ,\r\n \"20.41.5.0/25\",\r\n \"20.41.65.146/31\",\r\n \ - \ \"20.41.65.148/30\",\r\n \"20.41.65.152/29\",\r\n \ - \ \"20.41.192.122/31\",\r\n \"20.41.192.124/30\",\r\n \ - \ \"20.41.193.144/29\",\r\n \"20.42.0.70/31\",\r\n \"20.42.4.240/29\"\ - ,\r\n \"20.42.6.0/27\",\r\n \"20.42.6.64/26\",\r\n \ - \ \"20.42.131.32/31\",\r\n \"20.42.131.40/29\",\r\n \ - \ \"20.42.131.48/29\",\r\n \"20.42.131.128/26\",\r\n \"\ - 20.42.224.122/31\",\r\n \"20.42.227.16/28\",\r\n \"20.42.227.32/29\"\ - ,\r\n \"20.42.227.64/26\",\r\n \"20.43.41.176/31\",\r\n\ - \ \"20.43.41.184/29\",\r\n \"20.43.41.192/26\",\r\n \ - \ \"20.43.65.152/31\",\r\n \"20.43.65.176/29\",\r\n \ - \ \"20.43.65.192/28\",\r\n \"20.43.65.224/27\",\r\n \"\ - 20.43.130.192/31\",\r\n \"20.43.130.196/30\",\r\n \"20.43.130.200/29\"\ - ,\r\n \"20.43.130.208/28\",\r\n \"20.43.130.224/28\",\r\n\ - \ \"20.43.131.0/27\",\r\n \"20.43.131.64/26\",\r\n \ - \ \"20.45.90.88/30\",\r\n \"20.45.94.80/29\",\r\n \"\ - 20.45.192.122/31\",\r\n \"20.45.192.124/31\",\r\n \"20.45.192.208/30\"\ - ,\r\n \"20.45.192.216/29\",\r\n \"20.45.192.224/28\",\r\n\ - \ \"20.45.242.48/29\",\r\n \"20.46.15.56/30\",\r\n \ - \ \"20.47.233.72/29\",\r\n \"20.48.196.232/29\",\r\n \ - \ \"20.48.197.124/30\",\r\n \"20.48.202.16/29\",\r\n \"\ - 20.48.202.24/30\",\r\n \"20.50.0.0/24\",\r\n \"20.51.0.204/30\"\ - ,\r\n \"20.51.1.32/28\",\r\n \"20.51.5.4/30\",\r\n \ - \ \"20.51.5.192/26\",\r\n \"20.51.14.76/31\",\r\n \"\ - 20.51.21.160/29\",\r\n \"20.51.21.176/29\",\r\n \"20.51.21.240/29\"\ - ,\r\n \"20.52.89.48/30\",\r\n \"20.52.95.0/29\",\r\n \ - \ \"20.53.49.108/30\",\r\n \"20.53.53.192/29\",\r\n \ - \ \"20.59.79.96/27\",\r\n \"20.59.79.192/28\",\r\n \"\ - 20.65.133.80/29\",\r\n \"20.65.134.192/27\",\r\n \"20.65.134.224/28\"\ - ,\r\n \"20.65.134.240/30\",\r\n \"20.65.135.16/28\",\r\n\ - \ \"20.69.4.224/28\",\r\n \"20.69.4.240/30\",\r\n \ - \ \"20.70.221.0/28\",\r\n \"20.70.221.224/27\",\r\n \"\ - 20.72.16.22/31\",\r\n \"20.72.16.44/30\",\r\n \"20.72.20.32/29\"\ - ,\r\n \"20.83.221.80/30\",\r\n \"20.83.221.84/31\",\r\n\ - \ \"20.83.221.208/29\",\r\n \"20.86.93.192/28\",\r\n \ - \ \"20.86.93.208/29\",\r\n \"20.87.80.8/29\",\r\n \ - \ \"20.88.154.0/29\",\r\n \"20.88.157.72/29\",\r\n \"20.88.157.96/27\"\ - ,\r\n \"20.89.11.112/30\",\r\n \"20.89.11.116/31\",\r\n\ - \ \"20.89.11.248/29\",\r\n \"20.90.32.144/28\",\r\n \ - \ \"20.90.131.116/30\",\r\n \"20.90.132.64/28\",\r\n \ - \ \"20.92.4.144/28\",\r\n \"20.97.33.248/29\",\r\n \"\ - 20.97.34.128/26\",\r\n \"20.97.34.192/28\",\r\n \"20.98.145.48/28\"\ - ,\r\n \"20.98.145.64/30\",\r\n \"20.98.145.112/29\",\r\n\ - \ \"20.98.146.0/27\",\r\n \"20.98.192.168/30\",\r\n \ - \ \"20.98.192.192/27\",\r\n \"20.98.193.128/26\",\r\n \ - \ \"20.98.193.192/29\",\r\n \"20.99.11.4/30\",\r\n \"\ - 20.99.11.8/29\",\r\n \"20.100.1.168/29\",\r\n \"20.105.209.128/25\"\ - ,\r\n \"20.111.0.192/29\",\r\n \"20.150.160.110/31\",\r\n\ - \ \"20.150.160.124/30\",\r\n \"20.150.161.144/29\",\r\n\ - \ \"20.189.104.70/31\",\r\n \"20.189.106.224/27\",\r\n \ - \ \"20.189.108.0/27\",\r\n \"20.189.193.176/29\",\r\n \ - \ \"20.191.167.244/31\",\r\n \"20.192.47.128/30\",\r\n \ - \ \"20.192.47.132/31\",\r\n \"20.192.82.20/30\",\r\n \ - \ \"20.192.82.120/29\",\r\n \"20.192.84.128/29\",\r\n \ - \ \"20.192.152.144/30\",\r\n \"20.192.153.88/30\",\r\n \"\ - 20.192.160.22/31\",\r\n \"20.192.161.112/30\",\r\n \"20.192.161.120/29\"\ - ,\r\n \"20.192.168.144/30\",\r\n \"20.192.169.120/30\",\r\ - \n \"20.192.225.34/31\",\r\n \"20.192.225.36/30\",\r\n \ - \ \"20.192.225.192/29\",\r\n \"20.195.83.48/29\",\r\n \ - \ \"20.195.85.16/30\",\r\n \"20.195.85.32/27\",\r\n \ - \ \"20.195.146.200/30\",\r\n \"20.200.192.8/30\",\r\n \ - \ \"20.200.192.14/31\",\r\n \"20.200.194.232/30\",\r\n \"\ - 20.200.195.176/30\",\r\n \"20.205.68.120/29\",\r\n \"20.205.69.0/28\"\ - ,\r\n \"20.206.0.96/29\",\r\n \"40.67.50.246/31\",\r\n \ - \ \"40.74.24.70/31\",\r\n \"40.74.30.128/29\",\r\n \ - \ \"40.74.30.160/27\",\r\n \"40.74.30.192/26\",\r\n \"\ - 40.74.31.0/26\",\r\n \"40.80.56.122/31\",\r\n \"40.80.57.144/29\"\ - ,\r\n \"40.80.57.160/28\",\r\n \"40.80.168.122/31\",\r\n\ - \ \"40.80.168.124/30\",\r\n \"40.80.169.144/29\",\r\n \ - \ \"40.80.184.70/31\",\r\n \"40.80.188.48/28\",\r\n \ - \ \"40.80.188.64/27\",\r\n \"40.80.188.128/25\",\r\n \ - \ \"40.80.189.0/24\",\r\n \"40.82.248.68/31\",\r\n \"40.82.253.96/28\"\ - ,\r\n \"40.82.253.128/26\",\r\n \"40.82.254.0/25\",\r\n\ - \ \"40.89.16.122/31\",\r\n \"40.89.17.144/28\",\r\n \ - \ \"40.89.17.160/27\",\r\n \"40.119.8.76/30\",\r\n \ - \ \"40.119.11.64/26\",\r\n \"40.120.82.124/30\",\r\n \"\ - 40.120.86.144/31\",\r\n \"40.120.86.148/30\",\r\n \"40.120.87.52/30\"\ - ,\r\n \"51.12.17.16/30\",\r\n \"51.12.17.24/29\",\r\n \ - \ \"51.12.17.246/31\",\r\n \"51.12.22.168/30\",\r\n \ - \ \"51.12.22.200/30\",\r\n \"51.12.25.8/29\",\r\n \"\ - 51.12.29.30/31\",\r\n \"51.12.46.230/31\",\r\n \"51.12.47.28/30\"\ - ,\r\n \"51.12.72.216/30\",\r\n \"51.12.73.88/30\",\r\n \ - \ \"51.12.198.210/31\",\r\n \"51.13.138.72/30\",\r\n \ - \ \"51.13.143.0/29\",\r\n \"51.104.25.140/31\",\r\n \ - \ \"51.104.25.152/30\",\r\n \"51.104.25.176/28\",\r\n \"\ - 51.104.25.192/29\",\r\n \"51.104.27.0/26\",\r\n \"51.105.88.122/31\"\ - ,\r\n \"51.105.88.124/30\",\r\n \"51.105.88.208/28\",\r\n\ - \ \"51.107.48.124/31\",\r\n \"51.107.48.208/30\",\r\n \ - \ \"51.107.48.216/29\",\r\n \"51.107.144.122/31\",\r\n \ - \ \"51.107.144.124/30\",\r\n \"51.107.144.208/29\",\r\n \ - \ \"51.107.243.168/30\",\r\n \"51.107.247.224/29\",\r\n \ - \ \"51.107.251.184/30\",\r\n \"51.107.255.128/29\",\r\n \ - \ \"51.116.48.68/31\",\r\n \"51.116.48.128/30\",\r\n \ - \ \"51.116.48.136/29\",\r\n \"51.116.55.168/30\",\r\n \ - \ \"51.116.75.72/29\",\r\n \"51.116.144.68/31\",\r\n \"\ - 51.116.144.128/30\",\r\n \"51.116.144.136/29\",\r\n \"51.116.149.232/29\"\ - ,\r\n \"51.120.40.124/31\",\r\n \"51.120.40.208/30\",\r\n\ - \ \"51.120.40.216/29\",\r\n \"51.120.224.122/31\",\r\n \ - \ \"51.120.224.124/30\",\r\n \"51.120.224.208/29\",\r\n \ - \ \"51.120.237.12/30\",\r\n \"51.137.160.70/31\",\r\n \ - \ \"51.137.161.160/27\",\r\n \"51.137.161.192/27\",\r\n \ - \ \"51.138.215.114/31\",\r\n \"51.138.215.116/30\",\r\n \ - \ \"51.138.215.120/31\",\r\n \"52.136.48.120/31\",\r\n \ - \ \"52.136.48.124/30\",\r\n \"52.136.48.208/29\",\r\n \ - \ \"52.136.48.224/28\",\r\n \"52.136.186.112/30\",\r\n \ - \ \"52.136.190.184/29\",\r\n \"52.139.108.116/30\",\r\n \ - \ \"52.140.105.144/28\",\r\n \"52.140.105.160/28\",\r\n \ - \ \"52.146.140.128/25\",\r\n \"52.147.113.176/30\",\r\n \ - \ \"52.147.119.8/29\",\r\n \"52.150.139.76/31\",\r\n \"\ - 52.150.139.96/30\",\r\n \"52.150.139.112/28\",\r\n \"52.150.139.128/28\"\ - ,\r\n \"52.150.139.160/27\",\r\n \"52.172.116.184/30\",\r\ - \n \"52.172.116.190/31\",\r\n \"52.228.81.160/31\",\r\n\ - \ \"52.228.81.168/29\",\r\n \"52.228.81.176/28\",\r\n \ - \ \"52.228.81.192/27\",\r\n \"52.242.40.92/30\",\r\n \ - \ \"52.242.40.96/29\",\r\n \"102.37.81.140/30\",\r\n \ - \ \"102.37.85.208/29\",\r\n \"102.37.160.160/29\",\r\n \ - \ \"102.37.163.20/30\",\r\n \"102.133.56.98/31\",\r\n \"\ - 102.133.56.100/30\",\r\n \"102.133.56.104/29\",\r\n \"102.133.216.104/31\"\ - ,\r\n \"102.133.216.108/30\",\r\n \"102.133.217.64/29\"\ - ,\r\n \"191.233.8.22/31\",\r\n \"191.233.10.32/30\",\r\n\ - \ \"191.233.10.40/29\",\r\n \"191.235.225.152/31\",\r\n\ - \ \"191.235.225.156/30\",\r\n \"191.235.225.176/28\",\r\n\ - \ \"191.235.225.192/28\",\r\n \"191.235.225.224/27\",\r\n\ - \ \"191.238.72.128/28\",\r\n \"191.238.76.176/29\",\r\n\ - \ \"191.238.77.192/28\",\r\n \"191.238.77.208/29\",\r\n\ - \ \"191.238.77.216/30\",\r\n \"2603:1000:4::620/123\",\r\ - \n \"2603:1000:4::640/122\",\r\n \"2603:1000:104::100/122\"\ - ,\r\n \"2603:1000:104::140/123\",\r\n \"2603:1000:104::320/123\"\ - ,\r\n \"2603:1000:104::340/122\",\r\n \"2603:1000:104:1::5e0/123\"\ - ,\r\n \"2603:1000:104:1::600/122\",\r\n \"2603:1010:6::/122\"\ - ,\r\n \"2603:1010:6::40/123\",\r\n \"2603:1010:6:1::5e0/123\"\ - ,\r\n \"2603:1010:6:1::600/122\",\r\n \"2603:1010:101::620/123\"\ - ,\r\n \"2603:1010:101::640/122\",\r\n \"2603:1010:304::620/123\"\ - ,\r\n \"2603:1010:304::640/122\",\r\n \"2603:1010:404::620/123\"\ - ,\r\n \"2603:1010:404::640/122\",\r\n \"2603:1020:5::/122\"\ - ,\r\n \"2603:1020:5::40/123\",\r\n \"2603:1020:5:1::5e0/123\"\ - ,\r\n \"2603:1020:5:1::600/122\",\r\n \"2603:1020:206::/122\"\ - ,\r\n \"2603:1020:206::40/123\",\r\n \"2603:1020:206:1::5e0/123\"\ - ,\r\n \"2603:1020:206:1::600/122\",\r\n \"2603:1020:305::620/123\"\ - ,\r\n \"2603:1020:305::640/122\",\r\n \"2603:1020:405::620/123\"\ - ,\r\n \"2603:1020:405::640/122\",\r\n \"2603:1020:605::620/123\"\ - ,\r\n \"2603:1020:605::640/122\",\r\n \"2603:1020:705::/122\"\ - ,\r\n \"2603:1020:705::40/123\",\r\n \"2603:1020:705:1::5e0/123\"\ - ,\r\n \"2603:1020:705:1::600/122\",\r\n \"2603:1020:805::/122\"\ - ,\r\n \"2603:1020:805::40/123\",\r\n \"2603:1020:805:1::5e0/123\"\ - ,\r\n \"2603:1020:805:1::600/122\",\r\n \"2603:1020:905::620/123\"\ - ,\r\n \"2603:1020:905::640/122\",\r\n \"2603:1020:a04::/122\"\ - ,\r\n \"2603:1020:a04::40/123\",\r\n \"2603:1020:a04:1::5e0/123\"\ - ,\r\n \"2603:1020:a04:1::600/122\",\r\n \"2603:1020:b04::620/123\"\ - ,\r\n \"2603:1020:b04::640/122\",\r\n \"2603:1020:c04::/122\"\ - ,\r\n \"2603:1020:c04::40/123\",\r\n \"2603:1020:c04:1::5e0/123\"\ - ,\r\n \"2603:1020:c04:1::600/122\",\r\n \"2603:1020:d04::620/123\"\ - ,\r\n \"2603:1020:d04::640/122\",\r\n \"2603:1020:e04::/122\"\ - ,\r\n \"2603:1020:e04::40/123\",\r\n \"2603:1020:e04:1::5e0/123\"\ - ,\r\n \"2603:1020:e04:1::600/122\",\r\n \"2603:1020:f04::620/123\"\ - ,\r\n \"2603:1020:f04::640/122\",\r\n \"2603:1020:1004::5e0/123\"\ - ,\r\n \"2603:1020:1004::600/122\",\r\n \"2603:1020:1004:1::/122\"\ - ,\r\n \"2603:1020:1004:1::40/123\",\r\n \"2603:1020:1104::6a0/123\"\ - ,\r\n \"2603:1020:1104::6c0/122\",\r\n \"2603:1030:f:1::620/123\"\ - ,\r\n \"2603:1030:f:1::640/122\",\r\n \"2603:1030:10::/122\"\ - ,\r\n \"2603:1030:10::40/123\",\r\n \"2603:1030:10:1::5e0/123\"\ - ,\r\n \"2603:1030:10:1::600/122\",\r\n \"2603:1030:104::/122\"\ - ,\r\n \"2603:1030:104::40/123\",\r\n \"2603:1030:104:1::5e0/123\"\ - ,\r\n \"2603:1030:104:1::600/122\",\r\n \"2603:1030:107::6c0/122\"\ - ,\r\n \"2603:1030:107::700/123\",\r\n \"2603:1030:210::/122\"\ - ,\r\n \"2603:1030:210::40/123\",\r\n \"2603:1030:210:1::5e0/123\"\ - ,\r\n \"2603:1030:210:1::600/122\",\r\n \"2603:1030:40b:1::5e0/123\"\ - ,\r\n \"2603:1030:40b:1::600/122\",\r\n \"2603:1030:40c::/122\"\ - ,\r\n \"2603:1030:40c::40/123\",\r\n \"2603:1030:40c:1::5e0/123\"\ - ,\r\n \"2603:1030:40c:1::600/122\",\r\n \"2603:1030:504::/122\"\ - ,\r\n \"2603:1030:504::40/123\",\r\n \"2603:1030:504:1::5e0/123\"\ - ,\r\n \"2603:1030:504:1::600/122\",\r\n \"2603:1030:608::620/123\"\ - ,\r\n \"2603:1030:608::640/122\",\r\n \"2603:1030:807::/122\"\ - ,\r\n \"2603:1030:807::40/123\",\r\n \"2603:1030:807:1::5e0/123\"\ - ,\r\n \"2603:1030:807:1::600/122\",\r\n \"2603:1030:a07::620/123\"\ - ,\r\n \"2603:1030:a07::640/122\",\r\n \"2603:1030:b04::620/123\"\ - ,\r\n \"2603:1030:b04::640/122\",\r\n \"2603:1030:c06:1::5e0/123\"\ - ,\r\n \"2603:1030:c06:1::600/122\",\r\n \"2603:1030:f05::/122\"\ - ,\r\n \"2603:1030:f05::40/123\",\r\n \"2603:1030:f05:1::5e0/123\"\ - ,\r\n \"2603:1030:f05:1::600/122\",\r\n \"2603:1030:1005::620/123\"\ - ,\r\n \"2603:1030:1005::640/122\",\r\n \"2603:1040:5::100/122\"\ - ,\r\n \"2603:1040:5::140/123\",\r\n \"2603:1040:5:1::5e0/123\"\ - ,\r\n \"2603:1040:5:1::600/122\",\r\n \"2603:1040:207::620/123\"\ - ,\r\n \"2603:1040:207::640/122\",\r\n \"2603:1040:407::/122\"\ - ,\r\n \"2603:1040:407::40/123\",\r\n \"2603:1040:407:1::5e0/123\"\ - ,\r\n \"2603:1040:407:1::600/122\",\r\n \"2603:1040:606::620/123\"\ - ,\r\n \"2603:1040:606::640/122\",\r\n \"2603:1040:806::620/123\"\ - ,\r\n \"2603:1040:806::640/122\",\r\n \"2603:1040:904::/122\"\ - ,\r\n \"2603:1040:904::40/123\",\r\n \"2603:1040:904:1::5e0/123\"\ - ,\r\n \"2603:1040:904:1::600/122\",\r\n \"2603:1040:a06::100/122\"\ - ,\r\n \"2603:1040:a06::140/123\",\r\n \"2603:1040:a06:1::5e0/123\"\ - ,\r\n \"2603:1040:a06:1::600/122\",\r\n \"2603:1040:b04::620/123\"\ - ,\r\n \"2603:1040:b04::640/122\",\r\n \"2603:1040:c06::620/123\"\ - ,\r\n \"2603:1040:c06::640/122\",\r\n \"2603:1040:d04::5e0/123\"\ - ,\r\n \"2603:1040:d04::600/122\",\r\n \"2603:1040:d04:1::/122\"\ - ,\r\n \"2603:1040:d04:1::40/123\",\r\n \"2603:1040:f05::/122\"\ - ,\r\n \"2603:1040:f05::40/123\",\r\n \"2603:1040:f05:1::5e0/123\"\ - ,\r\n \"2603:1040:f05:1::600/122\",\r\n \"2603:1040:1002:1::400/122\"\ - ,\r\n \"2603:1040:1002:1::440/123\",\r\n \"2603:1040:1104::6a0/123\"\ - ,\r\n \"2603:1040:1104::6c0/122\",\r\n \"2603:1050:6::/122\"\ - ,\r\n \"2603:1050:6::40/123\",\r\n \"2603:1050:6:1::5e0/123\"\ - ,\r\n \"2603:1050:6:1::600/122\",\r\n \"2603:1050:403::5e0/123\"\ - ,\r\n \"2603:1050:403::600/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"PowerQueryOnline\",\r\n \"id\": \"PowerQueryOnline\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"PowerQueryOnline\",\r\n \"\ - addressPrefixes\": [\r\n \"20.21.32.20/31\",\r\n \"20.36.120.120/31\"\ - ,\r\n \"20.37.64.120/31\",\r\n \"20.37.152.70/31\",\r\n\ - \ \"20.37.192.70/31\",\r\n \"20.37.224.120/31\",\r\n \ - \ \"20.38.80.70/31\",\r\n \"20.38.136.68/31\",\r\n \ - \ \"20.39.11.24/31\",\r\n \"20.41.0.68/30\",\r\n \"20.41.64.70/31\"\ - ,\r\n \"20.41.65.144/31\",\r\n \"20.41.192.120/31\",\r\n\ - \ \"20.42.4.200/30\",\r\n \"20.42.128.70/31\",\r\n \ - \ \"20.42.129.184/29\",\r\n \"20.42.224.120/31\",\r\n \ - \ \"20.43.40.70/31\",\r\n \"20.43.64.70/31\",\r\n \"20.43.128.70/31\"\ - ,\r\n \"20.45.112.120/31\",\r\n \"20.45.192.120/31\",\r\n\ - \ \"20.72.16.20/31\",\r\n \"20.150.160.108/31\",\r\n \ - \ \"20.189.104.68/31\",\r\n \"20.192.160.20/31\",\r\n \ - \ \"20.192.225.32/31\",\r\n \"40.67.48.120/31\",\r\n \ - \ \"40.74.30.104/30\",\r\n \"40.80.56.120/31\",\r\n \"\ - 40.80.168.120/31\",\r\n \"40.80.184.68/31\",\r\n \"40.82.253.72/29\"\ - ,\r\n \"40.89.16.120/31\",\r\n \"40.119.8.74/31\",\r\n \ - \ \"51.12.46.228/31\",\r\n \"51.12.198.208/31\",\r\n \ - \ \"51.104.24.70/31\",\r\n \"51.105.80.120/31\",\r\n \ - \ \"51.105.88.120/31\",\r\n \"51.107.48.70/31\",\r\n \"\ - 51.107.144.120/31\",\r\n \"51.116.48.70/31\",\r\n \"51.116.144.70/31\"\ - ,\r\n \"51.120.40.70/31\",\r\n \"51.120.224.120/31\",\r\n\ - \ \"51.137.160.68/31\",\r\n \"51.143.192.120/31\",\r\n \ - \ \"52.140.104.70/31\",\r\n \"52.150.139.72/30\",\r\n \ - \ \"52.228.80.70/31\",\r\n \"102.133.56.96/31\",\r\n \ - \ \"102.133.216.70/31\",\r\n \"191.233.8.20/31\",\r\n \ - \ \"191.235.224.70/31\",\r\n \"2603:1000:4::200/123\",\r\n \ - \ \"2603:1000:104:1::200/123\",\r\n \"2603:1010:6:1::200/123\"\ - ,\r\n \"2603:1010:101::200/123\",\r\n \"2603:1010:304::200/123\"\ - ,\r\n \"2603:1010:404::200/123\",\r\n \"2603:1020:5:1::200/123\"\ - ,\r\n \"2603:1020:206:1::200/123\",\r\n \"2603:1020:305::200/123\"\ - ,\r\n \"2603:1020:405::200/123\",\r\n \"2603:1020:605::200/123\"\ - ,\r\n \"2603:1020:705:1::200/123\",\r\n \"2603:1020:805:1::200/123\"\ - ,\r\n \"2603:1020:905::200/123\",\r\n \"2603:1020:a04:1::200/123\"\ - ,\r\n \"2603:1020:b04::200/123\",\r\n \"2603:1020:c04:1::200/123\"\ - ,\r\n \"2603:1020:d04::200/123\",\r\n \"2603:1020:e04:1::200/123\"\ - ,\r\n \"2603:1020:f04::200/123\",\r\n \"2603:1020:1004::200/123\"\ - ,\r\n \"2603:1020:1104::200/123\",\r\n \"2603:1030:f:1::200/123\"\ - ,\r\n \"2603:1030:10:1::200/123\",\r\n \"2603:1030:104:1::200/123\"\ - ,\r\n \"2603:1030:107::200/123\",\r\n \"2603:1030:210:1::200/123\"\ - ,\r\n \"2603:1030:40b:1::200/123\",\r\n \"2603:1030:40c:1::200/123\"\ - ,\r\n \"2603:1030:504:1::200/123\",\r\n \"2603:1030:608::200/123\"\ - ,\r\n \"2603:1030:807:1::200/123\",\r\n \"2603:1030:a07::200/123\"\ - ,\r\n \"2603:1030:b04::200/123\",\r\n \"2603:1030:c06:1::200/123\"\ - ,\r\n \"2603:1030:f05:1::200/123\",\r\n \"2603:1030:1005::200/123\"\ - ,\r\n \"2603:1040:5:1::200/123\",\r\n \"2603:1040:207::200/123\"\ - ,\r\n \"2603:1040:407:1::200/123\",\r\n \"2603:1040:606::200/123\"\ - ,\r\n \"2603:1040:806::200/123\",\r\n \"2603:1040:904:1::200/123\"\ - ,\r\n \"2603:1040:a06:1::200/123\",\r\n \"2603:1040:b04::200/123\"\ - ,\r\n \"2603:1040:c06::200/123\",\r\n \"2603:1040:d04::200/123\"\ - ,\r\n \"2603:1040:f05:1::200/123\",\r\n \"2603:1040:1002::400/123\"\ - ,\r\n \"2603:1040:1104::200/123\",\r\n \"2603:1050:6:1::200/123\"\ - ,\r\n \"2603:1050:403::200/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"ServiceBus\",\r\n \"id\": \"ServiceBus\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"8\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n \ - \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureServiceBus\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.138.80/29\",\r\n\ - \ \"13.66.147.192/26\",\r\n \"13.67.8.96/29\",\r\n \ - \ \"13.67.20.0/26\",\r\n \"13.68.110.36/32\",\r\n \"\ - 13.69.64.64/29\",\r\n \"13.69.106.64/29\",\r\n \"13.69.111.64/26\"\ - ,\r\n \"13.69.227.64/29\",\r\n \"13.69.233.192/26\",\r\n\ - \ \"13.70.72.16/29\",\r\n \"13.70.114.0/26\",\r\n \ - \ \"13.70.186.33/32\",\r\n \"13.71.114.157/32\",\r\n \ - \ \"13.71.170.32/29\",\r\n \"13.71.177.64/26\",\r\n \"13.71.194.96/28\"\ - ,\r\n \"13.74.107.64/29\",\r\n \"13.74.142.88/32\",\r\n\ - \ \"13.75.34.128/28\",\r\n \"13.76.141.36/32\",\r\n \ - \ \"13.77.50.16/28\",\r\n \"13.78.94.187/32\",\r\n \ - \ \"13.78.106.80/29\",\r\n \"13.85.81.218/32\",\r\n \"13.87.35.8/32\"\ - ,\r\n \"13.87.56.64/28\",\r\n \"13.87.122.64/28\",\r\n \ - \ \"13.88.10.93/32\",\r\n \"13.89.170.192/29\",\r\n \ - \ \"13.89.178.128/26\",\r\n \"20.21.37.128/25\",\r\n \ - \ \"20.21.42.80/29\",\r\n \"20.21.42.96/28\",\r\n \"20.21.66.80/29\"\ - ,\r\n \"20.21.66.96/28\",\r\n \"20.21.74.80/29\",\r\n \ - \ \"20.21.74.96/28\",\r\n \"20.36.106.224/27\",\r\n \ - \ \"20.36.114.128/27\",\r\n \"20.36.144.0/26\",\r\n \"\ - 20.37.74.32/27\",\r\n \"20.38.146.128/29\",\r\n \"20.40.231.128/25\"\ - ,\r\n \"20.42.65.0/26\",\r\n \"20.42.68.0/26\",\r\n \ - \ \"20.42.72.192/26\",\r\n \"20.42.73.64/26\",\r\n \ - \ \"20.43.126.0/26\",\r\n \"20.44.2.8/29\",\r\n \"20.44.13.0/26\"\ - ,\r\n \"20.44.26.128/29\",\r\n \"20.44.31.64/26\",\r\n \ - \ \"20.45.93.0/25\",\r\n \"20.45.117.192/26\",\r\n \ - \ \"20.45.122.128/29\",\r\n \"20.45.126.128/26\",\r\n \ - \ \"20.45.240.0/26\",\r\n \"20.45.241.64/26\",\r\n \"20.47.216.0/26\"\ - ,\r\n \"20.48.199.128/25\",\r\n \"20.49.83.248/29\",\r\n\ - \ \"20.49.84.128/28\",\r\n \"20.49.91.224/29\",\r\n \ - \ \"20.49.91.240/28\",\r\n \"20.49.95.64/26\",\r\n \ - \ \"20.50.72.0/26\",\r\n \"20.50.80.0/26\",\r\n \"20.50.201.0/26\"\ - ,\r\n \"20.51.1.128/25\",\r\n \"20.51.15.0/25\",\r\n \ - \ \"20.51.22.192/26\",\r\n \"20.51.23.192/26\",\r\n \ - \ \"20.52.64.64/26\",\r\n \"20.52.91.128/25\",\r\n \"\ - 20.53.50.128/25\",\r\n \"20.53.58.128/25\",\r\n \"20.58.70.0/25\"\ - ,\r\n \"20.62.63.0/25\",\r\n \"20.65.135.128/25\",\r\n \ - \ \"20.66.6.128/25\",\r\n \"20.69.2.128/25\",\r\n \ - \ \"20.70.216.128/25\",\r\n \"20.72.27.144/29\",\r\n \"\ - 20.72.27.160/28\",\r\n \"20.82.244.128/25\",\r\n \"20.86.92.0/25\"\ - ,\r\n \"20.88.64.128/25\",\r\n \"20.88.153.64/26\",\r\n\ - \ \"20.89.0.0/26\",\r\n \"20.89.9.128/25\",\r\n \ - \ \"20.90.128.192/26\",\r\n \"20.92.0.128/25\",\r\n \"\ - 20.99.11.128/25\",\r\n \"20.150.129.0/25\",\r\n \"20.150.160.216/29\"\ - ,\r\n \"20.150.170.8/29\",\r\n \"20.150.175.0/26\",\r\n\ - \ \"20.150.178.128/29\",\r\n \"20.150.182.64/28\",\r\n \ - \ \"20.150.186.128/29\",\r\n \"20.150.189.48/28\",\r\n \ - \ \"20.150.189.64/26\",\r\n \"20.151.32.0/26\",\r\n \ - \ \"20.189.230.128/25\",\r\n \"20.192.32.240/28\",\r\n \ - \ \"20.192.47.192/26\",\r\n \"20.192.55.64/26\",\r\n \"\ - 20.192.55.128/26\",\r\n \"20.192.82.128/25\",\r\n \"20.192.98.128/29\"\ - ,\r\n \"20.192.101.192/26\",\r\n \"20.192.160.40/29\",\r\ - \n \"20.192.225.56/29\",\r\n \"20.192.234.8/29\",\r\n \ - \ \"20.193.199.0/25\",\r\n \"20.193.204.104/29\",\r\n \ - \ \"20.193.204.112/28\",\r\n \"20.194.67.208/29\",\r\n \ - \ \"20.194.68.128/28\",\r\n \"20.194.128.128/26\",\r\n \ - \ \"20.195.75.128/25\",\r\n \"20.195.82.0/25\",\r\n \"\ - 20.195.137.128/26\",\r\n \"20.195.151.128/25\",\r\n \"20.195.152.0/26\"\ - ,\r\n \"20.200.192.128/25\",\r\n \"20.205.74.80/29\",\r\n\ - \ \"20.205.75.64/28\",\r\n \"20.205.82.80/29\",\r\n \ - \ \"20.205.83.64/28\",\r\n \"20.208.18.80/29\",\r\n \ - \ \"20.208.18.96/28\",\r\n \"23.97.120.37/32\",\r\n \"\ - 23.98.82.96/29\",\r\n \"23.98.87.128/26\",\r\n \"23.98.112.128/26\"\ - ,\r\n \"40.64.113.0/26\",\r\n \"40.65.108.146/32\",\r\n\ - \ \"40.67.58.8/29\",\r\n \"40.67.72.0/26\",\r\n \ - \ \"40.68.127.68/32\",\r\n \"40.69.106.16/28\",\r\n \"\ - 40.70.146.64/29\",\r\n \"40.70.151.128/26\",\r\n \"40.71.10.192/29\"\ - ,\r\n \"40.74.100.32/28\",\r\n \"40.74.122.78/32\",\r\n\ - \ \"40.74.146.32/29\",\r\n \"40.74.150.192/26\",\r\n \ - \ \"40.75.34.16/29\",\r\n \"40.78.194.16/28\",\r\n \ - \ \"40.78.202.16/28\",\r\n \"40.78.226.192/29\",\r\n \"\ - 40.78.234.32/29\",\r\n \"40.78.242.144/29\",\r\n \"40.78.247.192/26\"\ - ,\r\n \"40.78.250.80/29\",\r\n \"40.79.130.32/29\",\r\n\ - \ \"40.79.138.16/29\",\r\n \"40.79.141.192/26\",\r\n \ - \ \"40.79.146.16/29\",\r\n \"40.79.149.0/26\",\r\n \ - \ \"40.79.154.88/29\",\r\n \"40.79.162.16/29\",\r\n \"\ - 40.79.166.128/26\",\r\n \"40.79.170.16/29\",\r\n \"40.79.173.64/26\"\ - ,\r\n \"40.79.178.16/28\",\r\n \"40.79.186.64/27\",\r\n\ - \ \"40.79.194.80/29\",\r\n \"40.80.50.128/29\",\r\n \ - \ \"40.80.53.16/28\",\r\n \"40.86.91.130/32\",\r\n \ - \ \"40.89.121.192/26\",\r\n \"40.112.242.128/28\",\r\n \"\ - 40.114.86.33/32\",\r\n \"40.120.74.24/29\",\r\n \"40.120.77.192/26\"\ - ,\r\n \"40.120.85.0/25\",\r\n \"40.124.65.0/26\",\r\n \ - \ \"51.11.192.64/26\",\r\n \"51.12.22.0/25\",\r\n \ - \ \"51.12.29.128/25\",\r\n \"51.12.98.8/29\",\r\n \"51.12.101.224/28\"\ - ,\r\n \"51.12.202.8/29\",\r\n \"51.12.206.0/28\",\r\n \ - \ \"51.12.226.128/29\",\r\n \"51.12.229.80/28\",\r\n \ - \ \"51.12.234.128/29\",\r\n \"51.12.237.80/28\",\r\n \ - \ \"51.13.0.128/26\",\r\n \"51.13.141.0/25\",\r\n \"51.103.202.80/29\"\ - ,\r\n \"51.103.202.96/28\",\r\n \"51.105.66.128/29\",\r\n\ - \ \"51.105.70.192/26\",\r\n \"51.105.74.128/29\",\r\n \ - \ \"51.107.58.8/29\",\r\n \"51.107.128.192/26\",\r\n \ - \ \"51.107.154.8/29\",\r\n \"51.107.244.128/25\",\r\n \ - \ \"51.107.252.128/25\",\r\n \"51.116.58.8/29\",\r\n \"\ - 51.116.72.128/25\",\r\n \"51.116.154.72/29\",\r\n \"51.116.242.128/29\"\ - ,\r\n \"51.116.246.128/26\",\r\n \"51.116.250.128/29\",\r\ - \n \"51.116.253.192/26\",\r\n \"51.120.98.16/29\",\r\n \ - \ \"51.120.106.128/29\",\r\n \"51.120.109.208/28\",\r\n \ - \ \"51.120.210.128/29\",\r\n \"51.120.213.48/28\",\r\n \ - \ \"51.120.218.8/29\",\r\n \"51.120.237.64/26\",\r\n \ - \ \"51.132.192.128/26\",\r\n \"51.138.213.128/25\",\r\n \ - \ \"51.140.43.12/32\",\r\n \"51.140.146.48/29\",\r\n \ - \ \"51.140.149.128/26\",\r\n \"51.140.210.64/28\",\r\n \ - \ \"51.141.1.129/32\",\r\n \"52.136.187.128/25\",\r\n \"\ - 52.138.71.95/32\",\r\n \"52.138.90.16/29\",\r\n \"52.138.226.64/29\"\ - ,\r\n \"52.139.110.0/25\",\r\n \"52.147.116.0/25\",\r\n\ - \ \"52.161.17.198/32\",\r\n \"52.162.106.128/28\",\r\n \ - \ \"52.167.106.64/29\",\r\n \"52.167.109.128/26\",\r\n \ - \ \"52.168.29.86/32\",\r\n \"52.168.112.128/26\",\r\n \ - \ \"52.168.116.192/26\",\r\n \"52.172.118.128/25\",\r\n \ - \ \"52.172.220.188/32\",\r\n \"52.178.17.64/26\",\r\n \ - \ \"52.180.178.204/32\",\r\n \"52.182.138.192/29\",\r\n \ - \ \"52.182.143.0/26\",\r\n \"52.187.192.243/32\",\r\n \ - \ \"52.231.18.32/29\",\r\n \"52.231.23.128/26\",\r\n \"\ - 52.231.146.64/28\",\r\n \"52.232.119.191/32\",\r\n \"52.233.33.226/32\"\ - ,\r\n \"52.236.186.64/29\",\r\n \"52.242.36.0/32\",\r\n\ - \ \"52.246.154.128/29\",\r\n \"52.246.158.192/26\",\r\n\ - \ \"65.52.219.186/32\",\r\n \"65.52.250.64/27\",\r\n \ - \ \"102.37.64.192/26\",\r\n \"102.37.72.0/26\",\r\n \ - \ \"102.37.84.0/25\",\r\n \"102.37.163.128/25\",\r\n \"\ - 102.133.26.8/29\",\r\n \"102.133.122.128/29\",\r\n \"102.133.126.192/26\"\ - ,\r\n \"102.133.154.8/29\",\r\n \"102.133.250.128/29\",\r\ - \n \"102.133.253.192/26\",\r\n \"104.40.15.128/32\",\r\n\ - \ \"104.45.239.115/32\",\r\n \"104.208.16.64/29\",\r\n \ - \ \"104.208.144.64/29\",\r\n \"104.211.81.16/29\",\r\n \ - \ \"104.211.146.16/28\",\r\n \"104.211.190.88/32\",\r\n \ - \ \"104.214.18.160/29\",\r\n \"104.214.165.72/29\",\r\n \ - \ \"168.61.142.56/29\",\r\n \"191.232.184.253/32\",\r\n \ - \ \"191.233.8.40/29\",\r\n \"191.233.203.16/29\",\r\n \ - \ \"191.234.146.128/29\",\r\n \"191.234.150.128/26\",\r\n \ - \ \"191.234.154.128/29\",\r\n \"191.234.157.144/28\",\r\n\ - \ \"191.235.170.182/32\",\r\n \"191.237.224.64/26\",\r\n\ - \ \"191.238.73.128/25\",\r\n \"207.46.138.15/32\",\r\n \ - \ \"2603:1000:4::220/123\",\r\n \"2603:1000:4:1::500/120\"\ - ,\r\n \"2603:1000:4:402::170/125\",\r\n \"2603:1000:104:1::220/123\"\ - ,\r\n \"2603:1000:104:2::400/120\",\r\n \"2603:1000:104:402::170/125\"\ - ,\r\n \"2603:1000:104:802::150/125\",\r\n \"2603:1000:104:c02::150/125\"\ - ,\r\n \"2603:1010:6::700/120\",\r\n \"2603:1010:6:1::220/123\"\ - ,\r\n \"2603:1010:6:402::170/125\",\r\n \"2603:1010:6:802::150/125\"\ - ,\r\n \"2603:1010:6:c02::150/125\",\r\n \"2603:1010:101::220/123\"\ - ,\r\n \"2603:1010:101:1::500/120\",\r\n \"2603:1010:101:402::170/125\"\ - ,\r\n \"2603:1010:304::220/123\",\r\n \"2603:1010:304:1::500/120\"\ - ,\r\n \"2603:1010:304:402::170/125\",\r\n \"2603:1010:404::220/123\"\ - ,\r\n \"2603:1010:404:1::500/120\",\r\n \"2603:1010:404:402::170/125\"\ - ,\r\n \"2603:1020:5::700/120\",\r\n \"2603:1020:5:1::220/123\"\ - ,\r\n \"2603:1020:5:402::170/125\",\r\n \"2603:1020:5:802::150/125\"\ - ,\r\n \"2603:1020:5:c02::150/125\",\r\n \"2603:1020:206:1::220/123\"\ - ,\r\n \"2603:1020:206:4::/120\",\r\n \"2603:1020:206:402::170/125\"\ - ,\r\n \"2603:1020:206:802::150/125\",\r\n \"2603:1020:206:c02::150/125\"\ - ,\r\n \"2603:1020:305::220/123\",\r\n \"2603:1020:305:402::170/125\"\ - ,\r\n \"2603:1020:405::220/123\",\r\n \"2603:1020:405:402::170/125\"\ - ,\r\n \"2603:1020:605::220/123\",\r\n \"2603:1020:605:1::500/120\"\ - ,\r\n \"2603:1020:605:402::170/125\",\r\n \"2603:1020:705::700/120\"\ - ,\r\n \"2603:1020:705:1::220/123\",\r\n \"2603:1020:705:402::170/125\"\ - ,\r\n \"2603:1020:705:802::150/125\",\r\n \"2603:1020:705:c02::150/125\"\ - ,\r\n \"2603:1020:805::700/120\",\r\n \"2603:1020:805:1::220/123\"\ - ,\r\n \"2603:1020:805:402::170/125\",\r\n \"2603:1020:805:802::150/125\"\ - ,\r\n \"2603:1020:805:c02::150/125\",\r\n \"2603:1020:905::220/123\"\ - ,\r\n \"2603:1020:905:1::500/120\",\r\n \"2603:1020:905:402::170/125\"\ - ,\r\n \"2603:1020:a04::700/120\",\r\n \"2603:1020:a04:1::220/123\"\ - ,\r\n \"2603:1020:a04:402::170/125\",\r\n \"2603:1020:a04:802::150/125\"\ - ,\r\n \"2603:1020:a04:c02::150/125\",\r\n \"2603:1020:b04::220/123\"\ - ,\r\n \"2603:1020:b04:1::500/120\",\r\n \"2603:1020:b04:402::170/125\"\ - ,\r\n \"2603:1020:c04::700/120\",\r\n \"2603:1020:c04:1::220/123\"\ - ,\r\n \"2603:1020:c04:402::170/125\",\r\n \"2603:1020:c04:802::150/125\"\ - ,\r\n \"2603:1020:c04:c02::150/125\",\r\n \"2603:1020:d04::220/123\"\ - ,\r\n \"2603:1020:d04:1::500/120\",\r\n \"2603:1020:d04:402::170/125\"\ - ,\r\n \"2603:1020:e04:1::220/123\",\r\n \"2603:1020:e04:3::500/120\"\ - ,\r\n \"2603:1020:e04:402::170/125\",\r\n \"2603:1020:e04:802::150/125\"\ - ,\r\n \"2603:1020:e04:c02::150/125\",\r\n \"2603:1020:f04::220/123\"\ - ,\r\n \"2603:1020:f04:1::500/120\",\r\n \"2603:1020:f04:402::170/125\"\ - ,\r\n \"2603:1020:1004::220/123\",\r\n \"2603:1020:1004:2::300/120\"\ - ,\r\n \"2603:1020:1004:800::e0/124\",\r\n \"2603:1020:1004:800::f0/125\"\ - ,\r\n \"2603:1020:1004:800::358/125\",\r\n \"2603:1020:1004:800::3c0/124\"\ - ,\r\n \"2603:1020:1004:800::3e8/125\",\r\n \"2603:1020:1004:c02::180/123\"\ - ,\r\n \"2603:1020:1004:c02::1a0/125\",\r\n \"2603:1020:1104:400::170/125\"\ - ,\r\n \"2603:1030:f:1::220/123\",\r\n \"2603:1030:f:3::240/122\"\ - ,\r\n \"2603:1030:f:3::300/120\",\r\n \"2603:1030:f:400::970/125\"\ - ,\r\n \"2603:1030:10:1::220/123\",\r\n \"2603:1030:10:402::170/125\"\ - ,\r\n \"2603:1030:10:802::150/125\",\r\n \"2603:1030:10:c02::150/125\"\ - ,\r\n \"2603:1030:104:1::220/123\",\r\n \"2603:1030:104:2::200/120\"\ - ,\r\n \"2603:1030:104:402::170/125\",\r\n \"2603:1030:104:402::640/124\"\ - ,\r\n \"2603:1030:104:802::68/125\",\r\n \"2603:1030:107:1::400/120\"\ - ,\r\n \"2603:1030:107:400::d8/125\",\r\n \"2603:1030:210:1::220/123\"\ - ,\r\n \"2603:1030:210:402::170/125\",\r\n \"2603:1030:210:802::150/125\"\ - ,\r\n \"2603:1030:210:c02::150/125\",\r\n \"2603:1030:302::100/120\"\ - ,\r\n \"2603:1030:40b:1::220/123\",\r\n \"2603:1030:40b:2::480/122\"\ - ,\r\n \"2603:1030:40b:2::500/120\",\r\n \"2603:1030:40b:400::970/125\"\ - ,\r\n \"2603:1030:40b:800::150/125\",\r\n \"2603:1030:40b:c00::150/125\"\ - ,\r\n \"2603:1030:40c:1::220/123\",\r\n \"2603:1030:40c:402::170/125\"\ - ,\r\n \"2603:1030:40c:802::150/125\",\r\n \"2603:1030:40c:c02::150/125\"\ - ,\r\n \"2603:1030:504:1::220/123\",\r\n \"2603:1030:504:2::300/120\"\ - ,\r\n \"2603:1030:504:802::e0/124\",\r\n \"2603:1030:504:802::f0/125\"\ - ,\r\n \"2603:1030:504:802::358/125\",\r\n \"2603:1030:608::220/123\"\ - ,\r\n \"2603:1030:608:1::500/120\",\r\n \"2603:1030:608:402::170/125\"\ - ,\r\n \"2603:1030:807::700/120\",\r\n \"2603:1030:807:1::220/123\"\ - ,\r\n \"2603:1030:807:402::170/125\",\r\n \"2603:1030:807:802::150/125\"\ - ,\r\n \"2603:1030:807:c02::150/125\",\r\n \"2603:1030:a07::220/123\"\ - ,\r\n \"2603:1030:a07:1::500/120\",\r\n \"2603:1030:a07:402::8f0/125\"\ - ,\r\n \"2603:1030:b04::220/123\",\r\n \"2603:1030:b04:1::500/120\"\ - ,\r\n \"2603:1030:b04:402::170/125\",\r\n \"2603:1030:c06:1::220/123\"\ - ,\r\n \"2603:1030:c06:2::500/120\",\r\n \"2603:1030:c06:400::970/125\"\ - ,\r\n \"2603:1030:c06:802::150/125\",\r\n \"2603:1030:c06:c02::150/125\"\ - ,\r\n \"2603:1030:f05::700/120\",\r\n \"2603:1030:f05:1::220/123\"\ - ,\r\n \"2603:1030:f05:402::170/125\",\r\n \"2603:1030:f05:802::150/125\"\ - ,\r\n \"2603:1030:f05:c02::150/125\",\r\n \"2603:1030:1005::220/123\"\ - ,\r\n \"2603:1030:1005:1::500/120\",\r\n \"2603:1030:1005:402::170/125\"\ - ,\r\n \"2603:1040:5:1::220/123\",\r\n \"2603:1040:5:402::170/125\"\ - ,\r\n \"2603:1040:5:802::150/125\",\r\n \"2603:1040:5:c02::150/125\"\ - ,\r\n \"2603:1040:207::220/123\",\r\n \"2603:1040:207:2::80/121\"\ - ,\r\n \"2603:1040:207:2::500/120\",\r\n \"2603:1040:207:402::170/125\"\ - ,\r\n \"2603:1040:407::700/120\",\r\n \"2603:1040:407:1::220/123\"\ - ,\r\n \"2603:1040:407:402::170/125\",\r\n \"2603:1040:407:802::150/125\"\ - ,\r\n \"2603:1040:407:c02::150/125\",\r\n \"2603:1040:606::220/123\"\ - ,\r\n \"2603:1040:606:1::500/120\",\r\n \"2603:1040:606:402::170/125\"\ - ,\r\n \"2603:1040:806::220/123\",\r\n \"2603:1040:806:1::500/120\"\ - ,\r\n \"2603:1040:806:402::170/125\",\r\n \"2603:1040:904::700/120\"\ - ,\r\n \"2603:1040:904:1::220/123\",\r\n \"2603:1040:904:402::170/125\"\ - ,\r\n \"2603:1040:904:802::150/125\",\r\n \"2603:1040:904:c02::150/125\"\ - ,\r\n \"2603:1040:a06:1::220/123\",\r\n \"2603:1040:a06:2::600/120\"\ - ,\r\n \"2603:1040:a06:402::170/125\",\r\n \"2603:1040:a06:802::150/125\"\ - ,\r\n \"2603:1040:a06:c02::150/125\",\r\n \"2603:1040:b04::220/123\"\ - ,\r\n \"2603:1040:b04:1::500/120\",\r\n \"2603:1040:b04:402::170/125\"\ - ,\r\n \"2603:1040:c06::220/123\",\r\n \"2603:1040:c06:1::500/120\"\ - ,\r\n \"2603:1040:c06:402::170/125\",\r\n \"2603:1040:d04::220/123\"\ - ,\r\n \"2603:1040:d04:2::400/120\",\r\n \"2603:1040:d04:800::e0/124\"\ - ,\r\n \"2603:1040:d04:800::f0/125\",\r\n \"2603:1040:d04:800::358/125\"\ - ,\r\n \"2603:1040:d04:800::3c0/125\",\r\n \"2603:1040:d04:800::3e8/125\"\ - ,\r\n \"2603:1040:e05::400/120\",\r\n \"2603:1040:f05:1::220/123\"\ - ,\r\n \"2603:1040:f05:2::300/120\",\r\n \"2603:1040:f05:402::170/125\"\ - ,\r\n \"2603:1040:f05:802::150/125\",\r\n \"2603:1040:f05:c02::150/125\"\ - ,\r\n \"2603:1040:1002:1::300/121\",\r\n \"2603:1040:1104:1::700/120\"\ - ,\r\n \"2603:1040:1104:400::170/125\",\r\n \"2603:1050:6::700/120\"\ - ,\r\n \"2603:1050:6:1::220/123\",\r\n \"2603:1050:6:402::170/125\"\ - ,\r\n \"2603:1050:6:802::150/125\",\r\n \"2603:1050:6:c02::150/125\"\ - ,\r\n \"2603:1050:403::220/123\",\r\n \"2603:1050:403:1::500/120\"\ - ,\r\n \"2603:1050:403:400::148/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.AustraliaCentral\",\r\n \ - \ \"id\": \"ServiceBus.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.36.106.224/27\",\r\n \ - \ \"20.53.50.128/25\",\r\n \"2603:1010:304::220/123\",\r\n \ - \ \"2603:1010:304:1::500/120\",\r\n \"2603:1010:304:402::170/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.AustraliaCentral2\"\ - ,\r\n \"id\": \"ServiceBus.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiacentral2\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\"\r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n\ - \ \"addressPrefixes\": [\r\n \"20.36.114.128/27\",\r\n \ - \ \"20.53.58.128/25\",\r\n \"2603:1010:404::220/123\",\r\n\ - \ \"2603:1010:404:1::500/120\",\r\n \"2603:1010:404:402::170/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.AustraliaEast\"\ - ,\r\n \"id\": \"ServiceBus.AustraliaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.70.72.16/29\",\r\n \ - \ \"13.70.114.0/26\",\r\n \"20.70.216.128/25\",\r\n \"40.79.162.16/29\"\ - ,\r\n \"40.79.166.128/26\",\r\n \"40.79.170.16/29\",\r\n\ - \ \"40.79.173.64/26\",\r\n \"52.187.192.243/32\",\r\n \ - \ \"2603:1010:6::700/120\",\r\n \"2603:1010:6:1::220/123\"\ - ,\r\n \"2603:1010:6:402::170/125\",\r\n \"2603:1010:6:802::150/125\"\ - ,\r\n \"2603:1010:6:c02::150/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"ServiceBus.AustraliaSoutheast\",\r\n \ - \ \"id\": \"ServiceBus.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\"\r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n\ - \ \"addressPrefixes\": [\r\n \"13.70.186.33/32\",\r\n \ - \ \"13.77.50.16/28\",\r\n \"20.92.0.128/25\",\r\n \"\ - 2603:1010:101::220/123\",\r\n \"2603:1010:101:1::500/120\",\r\n \ - \ \"2603:1010:101:402::170/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"ServiceBus.BrazilSouth\",\r\n \"id\": \"\ - ServiceBus.BrazilSouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"20.195.137.128/26\",\r\n \"20.195.152.0/26\",\r\n \ - \ \"191.232.184.253/32\",\r\n \"191.233.203.16/29\",\r\n \ - \ \"191.234.146.128/29\",\r\n \"191.234.150.128/26\",\r\n\ - \ \"191.234.154.128/29\",\r\n \"191.234.157.144/28\",\r\n\ - \ \"191.238.73.128/25\",\r\n \"2603:1050:6::700/120\",\r\ - \n \"2603:1050:6:1::220/123\",\r\n \"2603:1050:6:402::170/125\"\ - ,\r\n \"2603:1050:6:802::150/125\",\r\n \"2603:1050:6:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.BrazilSoutheast\"\ - ,\r\n \"id\": \"ServiceBus.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.195.151.128/25\",\r\n \ - \ \"23.97.120.37/32\",\r\n \"191.233.8.40/29\",\r\n \"191.237.224.64/26\"\ - ,\r\n \"2603:1050:403::220/123\",\r\n \"2603:1050:403:1::500/120\"\ - ,\r\n \"2603:1050:403:400::148/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.CanadaCentral\",\r\n \ - \ \"id\": \"ServiceBus.CanadaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.71.170.32/29\",\r\n \ - \ \"13.71.177.64/26\",\r\n \"20.38.146.128/29\",\r\n \"\ - 20.48.199.128/25\",\r\n \"20.151.32.0/26\",\r\n \"52.233.33.226/32\"\ - ,\r\n \"52.246.154.128/29\",\r\n \"52.246.158.192/26\",\r\ - \n \"2603:1030:f05::700/120\",\r\n \"2603:1030:f05:1::220/123\"\ - ,\r\n \"2603:1030:f05:402::170/125\",\r\n \"2603:1030:f05:802::150/125\"\ - ,\r\n \"2603:1030:f05:c02::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.CanadaEast\",\r\n \"\ - id\": \"ServiceBus.CanadaEast\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n \ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\"\ - : [\r\n \"40.69.106.16/28\",\r\n \"52.139.110.0/25\",\r\n\ - \ \"52.242.36.0/32\",\r\n \"2603:1030:1005::220/123\",\r\ - \n \"2603:1030:1005:1::500/120\",\r\n \"2603:1030:1005:402::170/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.CentralIndia\"\ - ,\r\n \"id\": \"ServiceBus.CentralIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.43.126.0/26\",\r\n \ - \ \"20.192.47.192/26\",\r\n \"20.192.98.128/29\",\r\n \"\ - 20.192.101.192/26\",\r\n \"40.80.50.128/29\",\r\n \"40.80.53.16/28\"\ - ,\r\n \"52.172.220.188/32\",\r\n \"104.211.81.16/29\",\r\ - \n \"2603:1040:a06:1::220/123\",\r\n \"2603:1040:a06:2::600/120\"\ - ,\r\n \"2603:1040:a06:402::170/125\",\r\n \"2603:1040:a06:802::150/125\"\ - ,\r\n \"2603:1040:a06:c02::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.CentralUS\",\r\n \"\ - id\": \"ServiceBus.CentralUS\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n \ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.89.170.192/29\",\r\n \"13.89.178.128/26\",\r\ - \n \"20.40.231.128/25\",\r\n \"20.44.13.0/26\",\r\n \ - \ \"40.86.91.130/32\",\r\n \"52.182.138.192/29\",\r\n \ - \ \"52.182.143.0/26\",\r\n \"104.208.16.64/29\",\r\n \ - \ \"2603:1030:10:1::220/123\",\r\n \"2603:1030:10:402::170/125\"\ - ,\r\n \"2603:1030:10:802::150/125\",\r\n \"2603:1030:10:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.CentralUSEUAP\"\ - ,\r\n \"id\": \"ServiceBus.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.45.240.0/26\",\r\n \ - \ \"20.45.241.64/26\",\r\n \"40.78.202.16/28\",\r\n \"52.180.178.204/32\"\ - ,\r\n \"168.61.142.56/29\",\r\n \"2603:1030:f:1::220/123\"\ - ,\r\n \"2603:1030:f:3::240/122\",\r\n \"2603:1030:f:3::300/120\"\ - ,\r\n \"2603:1030:f:400::970/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"ServiceBus.EastAsia\",\r\n \"id\"\ - : \"ServiceBus.EastAsia\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"13.75.34.128/28\",\r\n \"20.195.75.128/25\",\r\n \ - \ \"20.205.74.80/29\",\r\n \"20.205.75.64/28\",\r\n \ - \ \"20.205.82.80/29\",\r\n \"20.205.83.64/28\",\r\n \"\ - 104.214.165.72/29\",\r\n \"207.46.138.15/32\",\r\n \"2603:1040:207::220/123\"\ - ,\r\n \"2603:1040:207:2::80/121\",\r\n \"2603:1040:207:2::500/120\"\ - ,\r\n \"2603:1040:207:402::170/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.EastUS\",\r\n \"id\"\ - : \"ServiceBus.EastUS\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"20.42.65.0/26\",\r\n \"20.42.68.0/26\",\r\n \ - \ \"20.42.72.192/26\",\r\n \"20.42.73.64/26\",\r\n \"20.88.153.64/26\"\ - ,\r\n \"40.71.10.192/29\",\r\n \"40.78.226.192/29\",\r\n\ - \ \"40.79.154.88/29\",\r\n \"40.114.86.33/32\",\r\n \ - \ \"52.168.29.86/32\",\r\n \"52.168.112.128/26\",\r\n \ - \ \"52.168.116.192/26\",\r\n \"2603:1030:210:1::220/123\",\r\n\ - \ \"2603:1030:210:402::170/125\",\r\n \"2603:1030:210:802::150/125\"\ - ,\r\n \"2603:1030:210:c02::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.EastUS2\",\r\n \"id\"\ - : \"ServiceBus.EastUS2\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"13.68.110.36/32\",\r\n \"20.36.144.0/26\",\r\n \ - \ \"20.62.63.0/25\",\r\n \"40.70.146.64/29\",\r\n \"\ - 40.70.151.128/26\",\r\n \"52.167.106.64/29\",\r\n \"52.167.109.128/26\"\ - ,\r\n \"104.208.144.64/29\",\r\n \"2603:1030:40c:1::220/123\"\ - ,\r\n \"2603:1030:40c:402::170/125\",\r\n \"2603:1030:40c:802::150/125\"\ - ,\r\n \"2603:1030:40c:c02::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.EastUS2EUAP\",\r\n \"\ - id\": \"ServiceBus.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.216.0/26\",\r\n \"\ - 20.51.22.192/26\",\r\n \"20.51.23.192/26\",\r\n \"40.74.146.32/29\"\ - ,\r\n \"40.74.150.192/26\",\r\n \"40.75.34.16/29\",\r\n\ - \ \"40.89.121.192/26\",\r\n \"52.138.71.95/32\",\r\n \ - \ \"52.138.90.16/29\",\r\n \"2603:1030:40b:1::220/123\",\r\n\ - \ \"2603:1030:40b:2::480/122\",\r\n \"2603:1030:40b:2::500/120\"\ - ,\r\n \"2603:1030:40b:400::970/125\",\r\n \"2603:1030:40b:800::150/125\"\ - ,\r\n \"2603:1030:40b:c00::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.FranceCentral\",\r\n \ - \ \"id\": \"ServiceBus.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"40.79.130.32/29\",\r\n \ - \ \"40.79.138.16/29\",\r\n \"40.79.141.192/26\",\r\n \"\ - 40.79.146.16/29\",\r\n \"40.79.149.0/26\",\r\n \"51.11.192.64/26\"\ - ,\r\n \"51.138.213.128/25\",\r\n \"2603:1020:805::700/120\"\ - ,\r\n \"2603:1020:805:1::220/123\",\r\n \"2603:1020:805:402::170/125\"\ - ,\r\n \"2603:1020:805:802::150/125\",\r\n \"2603:1020:805:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.FranceSouth\"\ - ,\r\n \"id\": \"ServiceBus.FranceSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\ - \n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"40.79.178.16/28\",\r\n \"\ - 52.136.187.128/25\",\r\n \"2603:1020:905::220/123\",\r\n \ - \ \"2603:1020:905:1::500/120\",\r\n \"2603:1020:905:402::170/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.GermanyNorth\"\ - ,\r\n \"id\": \"ServiceBus.GermanyNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"51.116.58.8/29\",\r\n \"\ - 51.116.72.128/25\",\r\n \"2603:1020:d04::220/123\",\r\n \ - \ \"2603:1020:d04:1::500/120\",\r\n \"2603:1020:d04:402::170/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.GermanyWestCentral\"\ - ,\r\n \"id\": \"ServiceBus.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.52.64.64/26\",\r\n \"\ - 20.52.91.128/25\",\r\n \"51.116.154.72/29\",\r\n \"51.116.242.128/29\"\ - ,\r\n \"51.116.246.128/26\",\r\n \"51.116.250.128/29\",\r\ - \n \"51.116.253.192/26\",\r\n \"2603:1020:c04::700/120\"\ - ,\r\n \"2603:1020:c04:1::220/123\",\r\n \"2603:1020:c04:402::170/125\"\ - ,\r\n \"2603:1020:c04:802::150/125\",\r\n \"2603:1020:c04:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.JapanEast\"\ - ,\r\n \"id\": \"ServiceBus.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.78.94.187/32\",\r\n \"\ - 13.78.106.80/29\",\r\n \"20.89.0.0/26\",\r\n \"20.89.9.128/25\"\ - ,\r\n \"20.194.128.128/26\",\r\n \"40.79.186.64/27\",\r\n\ - \ \"40.79.194.80/29\",\r\n \"2603:1040:407::700/120\",\r\ - \n \"2603:1040:407:1::220/123\",\r\n \"2603:1040:407:402::170/125\"\ - ,\r\n \"2603:1040:407:802::150/125\",\r\n \"2603:1040:407:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.JapanWest\"\ - ,\r\n \"id\": \"ServiceBus.JapanWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.189.230.128/25\",\r\n \ - \ \"40.74.100.32/28\",\r\n \"40.74.122.78/32\",\r\n \"2603:1040:606::220/123\"\ - ,\r\n \"2603:1040:606:1::500/120\",\r\n \"2603:1040:606:402::170/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.JioIndiaCentral\"\ - ,\r\n \"id\": \"ServiceBus.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.192.32.240/28\",\r\n \ - \ \"20.192.55.64/26\",\r\n \"20.192.55.128/26\",\r\n \"\ - 20.192.225.56/29\",\r\n \"20.192.234.8/29\",\r\n \"2603:1040:1104:1::700/120\"\ - ,\r\n \"2603:1040:1104:400::170/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.JioIndiaWest\",\r\n \ - \ \"id\": \"ServiceBus.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.192.160.40/29\",\r\n \ - \ \"20.193.199.0/25\",\r\n \"20.193.204.104/29\",\r\n \ - \ \"20.193.204.112/28\",\r\n \"2603:1040:d04::220/123\",\r\n \ - \ \"2603:1040:d04:2::400/120\",\r\n \"2603:1040:d04:800::e0/124\"\ - ,\r\n \"2603:1040:d04:800::f0/125\",\r\n \"2603:1040:d04:800::358/125\"\ - ,\r\n \"2603:1040:d04:800::3c0/125\",\r\n \"2603:1040:d04:800::3e8/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.KoreaCentral\"\ - ,\r\n \"id\": \"ServiceBus.KoreaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.44.26.128/29\",\r\n \ - \ \"20.44.31.64/26\",\r\n \"20.194.67.208/29\",\r\n \"\ - 20.194.68.128/28\",\r\n \"20.200.192.128/25\",\r\n \"52.231.18.32/29\"\ - ,\r\n \"52.231.23.128/26\",\r\n \"2603:1040:f05:1::220/123\"\ - ,\r\n \"2603:1040:f05:2::300/120\",\r\n \"2603:1040:f05:402::170/125\"\ - ,\r\n \"2603:1040:f05:802::150/125\",\r\n \"2603:1040:f05:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.KoreaSouth\"\ - ,\r\n \"id\": \"ServiceBus.KoreaSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\ - \n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"52.147.116.0/25\",\r\n \"\ - 52.231.146.64/28\",\r\n \"2603:1040:e05::400/120\"\r\n ]\r\ - \n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.NorthCentralUS\"\ - ,\r\n \"id\": \"ServiceBus.NorthCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.51.1.128/25\",\r\n \ - \ \"52.162.106.128/28\",\r\n \"65.52.219.186/32\",\r\n \"\ - 2603:1030:608::220/123\",\r\n \"2603:1030:608:1::500/120\",\r\n \ - \ \"2603:1030:608:402::170/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"ServiceBus.NorthEurope\",\r\n \"id\": \"\ - ServiceBus.NorthEurope\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"13.69.227.64/29\",\r\n \"13.69.233.192/26\",\r\n \ - \ \"13.74.107.64/29\",\r\n \"13.74.142.88/32\",\r\n \ - \ \"20.50.72.0/26\",\r\n \"20.50.80.0/26\",\r\n \"20.82.244.128/25\"\ - ,\r\n \"52.138.226.64/29\",\r\n \"191.235.170.182/32\",\r\ - \n \"2603:1020:5::700/120\",\r\n \"2603:1020:5:1::220/123\"\ - ,\r\n \"2603:1020:5:402::170/125\",\r\n \"2603:1020:5:802::150/125\"\ - ,\r\n \"2603:1020:5:c02::150/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"ServiceBus.NorwayEast\",\r\n \"id\"\ - : \"ServiceBus.NorwayEast\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"\ - region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"51.13.0.128/26\",\r\n \"51.120.98.16/29\",\r\n \ - \ \"51.120.106.128/29\",\r\n \"51.120.109.208/28\",\r\n \ - \ \"51.120.210.128/29\",\r\n \"51.120.213.48/28\",\r\n \ - \ \"51.120.237.64/26\",\r\n \"2603:1020:e04:1::220/123\",\r\n\ - \ \"2603:1020:e04:3::500/120\",\r\n \"2603:1020:e04:402::170/125\"\ - ,\r\n \"2603:1020:e04:802::150/125\",\r\n \"2603:1020:e04:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.NorwayWest\"\ - ,\r\n \"id\": \"ServiceBus.NorwayWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"51.13.141.0/25\",\r\n \"\ - 51.120.218.8/29\",\r\n \"2603:1020:f04::220/123\",\r\n \"\ - 2603:1020:f04:1::500/120\",\r\n \"2603:1020:f04:402::170/125\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SouthAfricaNorth\"\ - ,\r\n \"id\": \"ServiceBus.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"102.37.72.0/26\",\r\n \ - \ \"102.37.163.128/25\",\r\n \"102.133.122.128/29\",\r\n \ - \ \"102.133.126.192/26\",\r\n \"102.133.154.8/29\",\r\n \ - \ \"102.133.250.128/29\",\r\n \"102.133.253.192/26\",\r\n \ - \ \"2603:1000:104:1::220/123\",\r\n \"2603:1000:104:2::400/120\"\ - ,\r\n \"2603:1000:104:402::170/125\",\r\n \"2603:1000:104:802::150/125\"\ - ,\r\n \"2603:1000:104:c02::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.SouthAfricaWest\",\r\n \ - \ \"id\": \"ServiceBus.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"102.37.64.192/26\",\r\n \ - \ \"102.37.84.0/25\",\r\n \"102.133.26.8/29\",\r\n \"\ - 2603:1000:4::220/123\",\r\n \"2603:1000:4:1::500/120\",\r\n \ - \ \"2603:1000:4:402::170/125\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"ServiceBus.SouthCentralUS\",\r\n \"id\": \"\ - ServiceBus.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n \ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.85.81.218/32\",\r\n \"20.45.122.128/29\",\r\ - \n \"20.45.126.128/26\",\r\n \"20.49.91.224/29\",\r\n \ - \ \"20.49.91.240/28\",\r\n \"20.49.95.64/26\",\r\n \ - \ \"20.65.135.128/25\",\r\n \"40.124.65.0/26\",\r\n \"\ - 104.214.18.160/29\",\r\n \"2603:1030:807::700/120\",\r\n \ - \ \"2603:1030:807:1::220/123\",\r\n \"2603:1030:807:402::170/125\"\ - ,\r\n \"2603:1030:807:802::150/125\",\r\n \"2603:1030:807:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SouthCentralUSSTG\"\ - ,\r\n \"id\": \"ServiceBus.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.44.2.8/29\",\r\n \"20.45.117.192/26\"\ - ,\r\n \"2603:1030:302::100/120\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"ServiceBus.SoutheastAsia\",\r\n \"id\":\ - \ \"ServiceBus.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \ - \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.67.8.96/29\",\r\n \"13.67.20.0/26\"\ - ,\r\n \"13.76.141.36/32\",\r\n \"20.195.82.0/25\",\r\n \ - \ \"23.98.82.96/29\",\r\n \"23.98.87.128/26\",\r\n \ - \ \"23.98.112.128/26\",\r\n \"40.78.234.32/29\",\r\n \ - \ \"2603:1040:5:1::220/123\",\r\n \"2603:1040:5:402::170/125\",\r\ - \n \"2603:1040:5:802::150/125\",\r\n \"2603:1040:5:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SouthIndia\"\ - ,\r\n \"id\": \"ServiceBus.SouthIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\ - \n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.71.114.157/32\",\r\n \ - \ \"40.78.194.16/28\",\r\n \"52.172.118.128/25\",\r\n \"\ - 2603:1040:c06::220/123\",\r\n \"2603:1040:c06:1::500/120\",\r\n \ - \ \"2603:1040:c06:402::170/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"ServiceBus.SwedenCentral\",\r\n \"id\":\ - \ \"ServiceBus.SwedenCentral\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \ - \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"51.12.29.128/25\",\r\n \"\ - 51.12.98.8/29\",\r\n \"51.12.101.224/28\",\r\n \"51.12.226.128/29\"\ - ,\r\n \"51.12.229.80/28\",\r\n \"51.12.234.128/29\",\r\n\ - \ \"51.12.237.80/28\",\r\n \"2603:1020:1004::220/123\",\r\ - \n \"2603:1020:1004:2::300/120\",\r\n \"2603:1020:1004:800::e0/124\"\ - ,\r\n \"2603:1020:1004:800::f0/125\",\r\n \"2603:1020:1004:800::358/125\"\ - ,\r\n \"2603:1020:1004:800::3c0/124\",\r\n \"2603:1020:1004:800::3e8/125\"\ - ,\r\n \"2603:1020:1004:c02::180/123\",\r\n \"2603:1020:1004:c02::1a0/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SwitzerlandNorth\"\ - ,\r\n \"id\": \"ServiceBus.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.208.18.80/29\",\r\n \ - \ \"20.208.18.96/28\",\r\n \"51.103.202.80/29\",\r\n \"\ - 51.103.202.96/28\",\r\n \"51.107.58.8/29\",\r\n \"51.107.128.192/26\"\ - ,\r\n \"51.107.244.128/25\",\r\n \"2603:1020:a04::700/120\"\ - ,\r\n \"2603:1020:a04:1::220/123\",\r\n \"2603:1020:a04:402::170/125\"\ - ,\r\n \"2603:1020:a04:802::150/125\",\r\n \"2603:1020:a04:c02::150/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SwitzerlandWest\"\ - ,\r\n \"id\": \"ServiceBus.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"51.107.154.8/29\",\r\n \ - \ \"51.107.252.128/25\",\r\n \"2603:1020:b04::220/123\",\r\n \ - \ \"2603:1020:b04:1::500/120\",\r\n \"2603:1020:b04:402::170/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.UAECentral\"\ - ,\r\n \"id\": \"ServiceBus.UAECentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\ - \n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.37.74.32/27\",\r\n \"\ - 20.45.93.0/25\",\r\n \"2603:1040:b04::220/123\",\r\n \"\ - 2603:1040:b04:1::500/120\",\r\n \"2603:1040:b04:402::170/125\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.UAENorth\"\ - ,\r\n \"id\": \"ServiceBus.UAENorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"40.120.74.24/29\",\r\n \"\ - 40.120.77.192/26\",\r\n \"40.120.85.0/25\",\r\n \"65.52.250.64/27\"\ - ,\r\n \"2603:1040:904::700/120\",\r\n \"2603:1040:904:1::220/123\"\ - ,\r\n \"2603:1040:904:402::170/125\",\r\n \"2603:1040:904:802::150/125\"\ - ,\r\n \"2603:1040:904:c02::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.UKSouth\",\r\n \"id\"\ - : \"ServiceBus.UKSouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"20.90.128.192/26\",\r\n \"51.105.66.128/29\",\r\n \ - \ \"51.105.70.192/26\",\r\n \"51.105.74.128/29\",\r\n \ - \ \"51.132.192.128/26\",\r\n \"51.140.43.12/32\",\r\n \ - \ \"51.140.146.48/29\",\r\n \"51.140.149.128/26\",\r\n \ - \ \"2603:1020:705::700/120\",\r\n \"2603:1020:705:1::220/123\"\ - ,\r\n \"2603:1020:705:402::170/125\",\r\n \"2603:1020:705:802::150/125\"\ - ,\r\n \"2603:1020:705:c02::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.UKWest\",\r\n \"id\"\ - : \"ServiceBus.UKWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"20.58.70.0/25\",\r\n \"51.140.210.64/28\",\r\n \ - \ \"51.141.1.129/32\",\r\n \"2603:1020:605::220/123\",\r\n \ - \ \"2603:1020:605:1::500/120\",\r\n \"2603:1020:605:402::170/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.WestCentralUS\"\ - ,\r\n \"id\": \"ServiceBus.WestCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - \r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.71.194.96/28\",\r\n \ - \ \"20.69.2.128/25\",\r\n \"52.161.17.198/32\",\r\n \"\ - 2603:1030:b04::220/123\",\r\n \"2603:1030:b04:1::500/120\",\r\n \ - \ \"2603:1030:b04:402::170/125\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"ServiceBus.WestEurope\",\r\n \"id\": \"\ - ServiceBus.WestEurope\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"\ - region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"13.69.64.64/29\",\r\n \"13.69.106.64/29\",\r\n \ - \ \"13.69.111.64/26\",\r\n \"20.50.201.0/26\",\r\n \"\ - 20.86.92.0/25\",\r\n \"40.68.127.68/32\",\r\n \"52.178.17.64/26\"\ - ,\r\n \"52.232.119.191/32\",\r\n \"52.236.186.64/29\",\r\ - \n \"2603:1020:206:1::220/123\",\r\n \"2603:1020:206:4::/120\"\ - ,\r\n \"2603:1020:206:402::170/125\",\r\n \"2603:1020:206:802::150/125\"\ - ,\r\n \"2603:1020:206:c02::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.WestIndia\",\r\n \"\ - id\": \"ServiceBus.WestIndia\",\r\n \"serviceTagChangeNumber\": \"74\"\ - ,\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n \ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.192.82.128/25\",\r\n \"104.211.146.16/28\"\ - ,\r\n \"104.211.190.88/32\",\r\n \"2603:1040:806::220/123\"\ - ,\r\n \"2603:1040:806:1::500/120\",\r\n \"2603:1040:806:402::170/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.WestUS\"\ - ,\r\n \"id\": \"ServiceBus.WestUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n \ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"\ - addressPrefixes\": [\r\n \"13.88.10.93/32\",\r\n \"20.66.6.128/25\"\ - ,\r\n \"40.112.242.128/28\",\r\n \"104.40.15.128/32\",\r\ - \n \"104.45.239.115/32\",\r\n \"2603:1030:a07::220/123\"\ - ,\r\n \"2603:1030:a07:1::500/120\",\r\n \"2603:1030:a07:402::8f0/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.WestUS2\"\ - ,\r\n \"id\": \"ServiceBus.WestUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n\ - \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.66.138.80/29\",\r\n \"\ - 13.66.147.192/26\",\r\n \"20.51.15.0/25\",\r\n \"40.64.113.0/26\"\ - ,\r\n \"40.65.108.146/32\",\r\n \"40.78.242.144/29\",\r\n\ - \ \"40.78.247.192/26\",\r\n \"40.78.250.80/29\",\r\n \ - \ \"2603:1030:c06:1::220/123\",\r\n \"2603:1030:c06:2::500/120\"\ - ,\r\n \"2603:1030:c06:400::970/125\",\r\n \"2603:1030:c06:802::150/125\"\ - ,\r\n \"2603:1030:c06:c02::150/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"ServiceBus.WestUS3\",\r\n \"id\"\ - : \"ServiceBus.WestUS3\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"\ - region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"\ - systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n\ - \ \"20.150.129.0/25\",\r\n \"20.150.160.216/29\",\r\n \ - \ \"20.150.170.8/29\",\r\n \"20.150.175.0/26\",\r\n \ - \ \"20.150.178.128/29\",\r\n \"20.150.182.64/28\",\r\n \ - \ \"20.150.186.128/29\",\r\n \"20.150.189.48/28\",\r\n \ - \ \"20.150.189.64/26\",\r\n \"2603:1030:504:1::220/123\",\r\n \ - \ \"2603:1030:504:2::300/120\",\r\n \"2603:1030:504:802::e0/124\"\ - ,\r\n \"2603:1030:504:802::f0/125\",\r\n \"2603:1030:504:802::358/125\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceFabric\"\ - ,\r\n \"id\": \"ServiceFabric\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"ServiceFabric\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.140.152/29\",\r\n\ - \ \"13.66.167.194/32\",\r\n \"13.66.226.151/32\",\r\n \ - \ \"13.67.9.136/29\",\r\n \"13.69.64.232/29\",\r\n \ - \ \"13.69.109.136/30\",\r\n \"13.69.227.232/29\",\r\n \ - \ \"13.70.72.216/29\",\r\n \"13.70.78.172/30\",\r\n \"13.71.170.224/29\"\ - ,\r\n \"13.71.170.248/29\",\r\n \"13.71.195.48/29\",\r\n\ - \ \"13.74.80.74/32\",\r\n \"13.74.111.144/30\",\r\n \ - \ \"13.75.36.80/29\",\r\n \"13.75.41.166/32\",\r\n \ - \ \"13.75.42.35/32\",\r\n \"13.77.52.0/29\",\r\n \"13.78.108.24/29\"\ - ,\r\n \"13.78.147.125/32\",\r\n \"13.80.117.236/32\",\r\n\ - \ \"13.87.32.204/32\",\r\n \"13.87.56.240/29\",\r\n \ - \ \"13.87.122.240/29\",\r\n \"13.89.171.104/29\",\r\n \ - \ \"13.91.7.211/32\",\r\n \"13.91.252.58/32\",\r\n \"\ - 13.92.124.124/32\",\r\n \"20.21.42.76/30\",\r\n \"20.21.66.72/30\"\ - ,\r\n \"20.21.74.72/30\",\r\n \"20.36.40.70/32\",\r\n \ - \ \"20.36.72.79/32\",\r\n \"20.36.107.16/29\",\r\n \ - \ \"20.36.114.192/29\",\r\n \"20.37.74.80/29\",\r\n \"\ - 20.38.149.192/30\",\r\n \"20.42.64.40/30\",\r\n \"20.42.72.132/30\"\ - ,\r\n \"20.44.3.24/29\",\r\n \"20.44.10.124/30\",\r\n \ - \ \"20.44.19.0/30\",\r\n \"20.44.29.52/30\",\r\n \ - \ \"20.45.79.240/32\",\r\n \"20.45.123.244/30\",\r\n \"\ - 20.49.82.4/30\",\r\n \"20.49.90.4/30\",\r\n \"20.72.26.4/30\"\ - ,\r\n \"20.150.171.72/29\",\r\n \"20.150.181.160/30\",\r\ - \n \"20.150.189.28/30\",\r\n \"20.150.225.4/30\",\r\n \ - \ \"20.184.2.84/32\",\r\n \"20.192.32.224/30\",\r\n \ - \ \"20.192.101.28/30\",\r\n \"20.192.235.0/29\",\r\n \ - \ \"20.193.202.24/29\",\r\n \"20.193.204.100/30\",\r\n \"\ - 20.194.66.4/30\",\r\n \"20.205.74.72/30\",\r\n \"20.205.82.72/30\"\ - ,\r\n \"20.208.18.72/30\",\r\n \"23.96.200.228/32\",\r\n\ - \ \"23.96.210.6/32\",\r\n \"23.96.214.100/32\",\r\n \ - \ \"23.98.86.60/30\",\r\n \"23.99.11.219/32\",\r\n \ - \ \"23.100.199.230/32\",\r\n \"40.67.59.72/29\",\r\n \"\ - 40.69.107.0/29\",\r\n \"40.69.166.6/32\",\r\n \"40.70.146.232/29\"\ - ,\r\n \"40.71.11.104/29\",\r\n \"40.74.100.240/29\",\r\n\ - \ \"40.74.146.56/29\",\r\n \"40.75.35.220/30\",\r\n \ - \ \"40.76.203.148/32\",\r\n \"40.76.205.181/32\",\r\n \ - \ \"40.78.195.0/29\",\r\n \"40.78.202.120/29\",\r\n \"\ - 40.78.238.60/30\",\r\n \"40.78.245.192/30\",\r\n \"40.78.253.64/30\"\ - ,\r\n \"40.79.114.102/32\",\r\n \"40.79.130.232/29\",\r\n\ - \ \"40.79.139.192/30\",\r\n \"40.79.148.80/30\",\r\n \ - \ \"40.79.165.80/29\",\r\n \"40.79.171.228/30\",\r\n \ - \ \"40.79.173.0/30\",\r\n \"40.79.179.0/29\",\r\n \"\ - 40.79.189.60/30\",\r\n \"40.79.197.36/30\",\r\n \"40.80.53.4/30\"\ - ,\r\n \"40.84.62.189/32\",\r\n \"40.84.133.64/32\",\r\n\ - \ \"40.85.224.118/32\",\r\n \"40.86.230.174/32\",\r\n \ - \ \"40.89.168.15/32\",\r\n \"40.112.243.176/29\",\r\n \ - \ \"40.113.23.157/32\",\r\n \"40.113.88.37/32\",\r\n \ - \ \"40.115.64.123/32\",\r\n \"40.115.113.228/32\",\r\n \ - \ \"40.120.74.4/30\",\r\n \"40.123.204.26/32\",\r\n \"\ - 51.12.99.64/29\",\r\n \"51.12.101.168/30\",\r\n \"51.12.203.64/29\"\ - ,\r\n \"51.12.204.240/30\",\r\n \"51.12.229.28/30\",\r\n\ - \ \"51.12.237.28/30\",\r\n \"51.103.202.72/30\",\r\n \ - \ \"51.105.69.84/30\",\r\n \"51.105.77.52/30\",\r\n \ - \ \"51.107.59.40/29\",\r\n \"51.107.76.20/32\",\r\n \"\ - 51.107.155.40/29\",\r\n \"51.107.239.250/32\",\r\n \"51.116.59.40/29\"\ - ,\r\n \"51.116.155.104/29\",\r\n \"51.116.208.26/32\",\r\ - \n \"51.116.232.27/32\",\r\n \"51.116.245.160/30\",\r\n\ - \ \"51.116.253.128/30\",\r\n \"51.120.68.23/32\",\r\n \ - \ \"51.120.98.240/29\",\r\n \"51.120.109.28/30\",\r\n \ - \ \"51.120.164.23/32\",\r\n \"51.120.213.28/30\",\r\n \ - \ \"51.120.219.72/29\",\r\n \"51.140.148.24/29\",\r\n \ - \ \"51.140.184.27/32\",\r\n \"51.140.211.16/29\",\r\n \"\ - 51.141.8.30/32\",\r\n \"52.136.136.27/32\",\r\n \"52.138.70.82/32\"\ - ,\r\n \"52.138.92.168/30\",\r\n \"52.138.143.55/32\",\r\n\ - \ \"52.138.229.68/30\",\r\n \"52.143.136.15/32\",\r\n \ - \ \"52.143.184.15/32\",\r\n \"52.151.38.144/32\",\r\n \ - \ \"52.158.236.247/32\",\r\n \"52.162.107.176/29\",\r\n \ - \ \"52.163.90.165/32\",\r\n \"52.163.94.113/32\",\r\n \ - \ \"52.165.37.188/32\",\r\n \"52.167.0.27/32\",\r\n \"\ - 52.167.109.68/30\",\r\n \"52.167.227.220/32\",\r\n \"52.174.163.204/32\"\ - ,\r\n \"52.174.164.254/32\",\r\n \"52.178.30.193/32\",\r\ - \n \"52.180.176.84/32\",\r\n \"52.182.141.56/30\",\r\n \ - \ \"52.182.172.232/32\",\r\n \"52.225.184.94/32\",\r\n \ - \ \"52.225.185.159/32\",\r\n \"52.230.8.61/32\",\r\n \ - \ \"52.231.18.232/29\",\r\n \"52.231.32.81/32\",\r\n \ - \ \"52.231.147.16/29\",\r\n \"52.231.200.124/32\",\r\n \ - \ \"52.236.161.75/32\",\r\n \"52.236.189.76/30\",\r\n \"\ - 52.246.157.8/30\",\r\n \"65.52.250.224/29\",\r\n \"102.37.48.12/32\"\ - ,\r\n \"102.133.27.24/29\",\r\n \"102.133.72.31/32\",\r\n\ - \ \"102.133.126.144/30\",\r\n \"102.133.155.24/29\",\r\n\ - \ \"102.133.160.28/32\",\r\n \"102.133.235.169/32\",\r\n\ - \ \"102.133.251.216/30\",\r\n \"104.41.9.53/32\",\r\n \ - \ \"104.41.187.29/32\",\r\n \"104.42.181.121/32\",\r\n \ - \ \"104.43.213.84/32\",\r\n \"104.45.19.250/32\",\r\n \ - \ \"104.46.225.57/32\",\r\n \"104.210.107.69/32\",\r\n \ - \ \"104.211.81.216/29\",\r\n \"104.211.103.201/32\",\r\n \ - \ \"104.211.146.240/29\",\r\n \"104.211.164.163/32\",\r\n \ - \ \"104.211.228.68/32\",\r\n \"104.214.19.72/29\",\r\n \ - \ \"104.214.165.68/30\",\r\n \"104.215.78.146/32\",\r\n \ - \ \"137.116.252.9/32\",\r\n \"137.135.33.49/32\",\r\n \ - \ \"168.61.142.48/30\",\r\n \"191.233.50.24/29\",\r\n \ - \ \"191.233.203.216/29\",\r\n \"191.234.149.32/30\",\r\n \ - \ \"191.234.157.128/30\",\r\n \"207.46.234.62/32\",\r\n \ - \ \"2603:1000:4:402::98/125\",\r\n \"2603:1000:104:402::98/125\"\ - ,\r\n \"2603:1000:104:802::98/125\",\r\n \"2603:1000:104:c02::98/125\"\ - ,\r\n \"2603:1010:6:402::98/125\",\r\n \"2603:1010:6:802::98/125\"\ - ,\r\n \"2603:1010:6:c02::98/125\",\r\n \"2603:1010:101:402::98/125\"\ - ,\r\n \"2603:1010:304:402::98/125\",\r\n \"2603:1010:404:402::98/125\"\ - ,\r\n \"2603:1020:5:402::98/125\",\r\n \"2603:1020:5:802::98/125\"\ - ,\r\n \"2603:1020:5:c02::98/125\",\r\n \"2603:1020:206:402::98/125\"\ - ,\r\n \"2603:1020:206:802::98/125\",\r\n \"2603:1020:206:c02::98/125\"\ - ,\r\n \"2603:1020:305:402::98/125\",\r\n \"2603:1020:405:402::98/125\"\ - ,\r\n \"2603:1020:605:402::98/125\",\r\n \"2603:1020:705:402::98/125\"\ - ,\r\n \"2603:1020:705:802::98/125\",\r\n \"2603:1020:705:c02::98/125\"\ - ,\r\n \"2603:1020:805:402::98/125\",\r\n \"2603:1020:805:802::98/125\"\ - ,\r\n \"2603:1020:805:c02::98/125\",\r\n \"2603:1020:905:402::98/125\"\ - ,\r\n \"2603:1020:a04:402::98/125\",\r\n \"2603:1020:a04:802::98/125\"\ - ,\r\n \"2603:1020:a04:c02::98/125\",\r\n \"2603:1020:b04:402::98/125\"\ - ,\r\n \"2603:1020:c04:402::98/125\",\r\n \"2603:1020:c04:802::98/125\"\ - ,\r\n \"2603:1020:c04:c02::98/125\",\r\n \"2603:1020:d04:402::98/125\"\ - ,\r\n \"2603:1020:e04:402::98/125\",\r\n \"2603:1020:e04:802::98/125\"\ - ,\r\n \"2603:1020:e04:c02::98/125\",\r\n \"2603:1020:f04:402::98/125\"\ - ,\r\n \"2603:1020:1004:400::98/125\",\r\n \"2603:1020:1004:800::158/125\"\ - ,\r\n \"2603:1020:1004:800::350/125\",\r\n \"2603:1020:1004:c02::1b8/125\"\ - ,\r\n \"2603:1020:1104:400::98/125\",\r\n \"2603:1030:f:400::898/125\"\ - ,\r\n \"2603:1030:10:402::98/125\",\r\n \"2603:1030:10:802::98/125\"\ - ,\r\n \"2603:1030:10:c02::98/125\",\r\n \"2603:1030:104:402::98/125\"\ - ,\r\n \"2603:1030:104:402::3d8/125\",\r\n \"2603:1030:104:802::60/125\"\ - ,\r\n \"2603:1030:107:400::d0/125\",\r\n \"2603:1030:210:402::98/125\"\ - ,\r\n \"2603:1030:210:802::98/125\",\r\n \"2603:1030:210:c02::98/125\"\ - ,\r\n \"2603:1030:40b:400::898/125\",\r\n \"2603:1030:40b:800::98/125\"\ - ,\r\n \"2603:1030:40b:c00::98/125\",\r\n \"2603:1030:40c:402::98/125\"\ - ,\r\n \"2603:1030:40c:802::98/125\",\r\n \"2603:1030:40c:c02::98/125\"\ - ,\r\n \"2603:1030:504:402::98/125\",\r\n \"2603:1030:504:802::c8/125\"\ - ,\r\n \"2603:1030:504:802::158/125\",\r\n \"2603:1030:504:802::350/125\"\ - ,\r\n \"2603:1030:504:c02::408/125\",\r\n \"2603:1030:608:402::98/125\"\ - ,\r\n \"2603:1030:807:402::98/125\",\r\n \"2603:1030:807:802::98/125\"\ - ,\r\n \"2603:1030:807:c02::98/125\",\r\n \"2603:1030:a07:402::98/125\"\ - ,\r\n \"2603:1030:b04:402::98/125\",\r\n \"2603:1030:c06:400::898/125\"\ - ,\r\n \"2603:1030:c06:802::98/125\",\r\n \"2603:1030:c06:c02::98/125\"\ - ,\r\n \"2603:1030:f05:402::98/125\",\r\n \"2603:1030:f05:802::98/125\"\ - ,\r\n \"2603:1030:f05:c02::98/125\",\r\n \"2603:1030:1005:402::98/125\"\ - ,\r\n \"2603:1040:5:402::98/125\",\r\n \"2603:1040:5:802::98/125\"\ - ,\r\n \"2603:1040:5:c02::98/125\",\r\n \"2603:1040:207:402::98/125\"\ - ,\r\n \"2603:1040:207:800::50/125\",\r\n \"2603:1040:207:c00::50/125\"\ - ,\r\n \"2603:1040:407:402::98/125\",\r\n \"2603:1040:407:802::98/125\"\ - ,\r\n \"2603:1040:407:c02::98/125\",\r\n \"2603:1040:606:402::98/125\"\ - ,\r\n \"2603:1040:806:402::98/125\",\r\n \"2603:1040:904:402::98/125\"\ - ,\r\n \"2603:1040:904:802::98/125\",\r\n \"2603:1040:904:c02::98/125\"\ - ,\r\n \"2603:1040:a06:402::98/125\",\r\n \"2603:1040:a06:802::98/125\"\ - ,\r\n \"2603:1040:a06:c02::98/125\",\r\n \"2603:1040:b04:402::98/125\"\ - ,\r\n \"2603:1040:c06:402::98/125\",\r\n \"2603:1040:d04:400::98/125\"\ - ,\r\n \"2603:1040:d04:800::158/125\",\r\n \"2603:1040:d04:800::350/125\"\ - ,\r\n \"2603:1040:f05:402::98/125\",\r\n \"2603:1040:f05:802::98/125\"\ - ,\r\n \"2603:1040:f05:c02::98/125\",\r\n \"2603:1040:1002:400::58/125\"\ - ,\r\n \"2603:1040:1002:800::50/125\",\r\n \"2603:1040:1002:c00::50/125\"\ - ,\r\n \"2603:1040:1104:400::98/125\",\r\n \"2603:1050:6:402::98/125\"\ - ,\r\n \"2603:1050:6:802::98/125\",\r\n \"2603:1050:6:c02::98/125\"\ - ,\r\n \"2603:1050:403:400::140/125\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"Sql\",\r\n \"id\": \"Sql\",\r\n\ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n\ - \ \"changeNumber\": \"5\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n \ - \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureSQL\",\r\ - \n \"addressPrefixes\": [\r\n \"13.65.31.249/32\",\r\n \ - \ \"13.65.39.207/32\",\r\n \"13.65.85.183/32\",\r\n \ - \ \"13.65.200.105/32\",\r\n \"13.65.209.243/32\",\r\n \ - \ \"13.65.253.67/32\",\r\n \"13.66.60.72/32\",\r\n \"13.66.60.111/32\"\ - ,\r\n \"13.66.62.124/32\",\r\n \"13.66.136.0/26\",\r\n \ - \ \"13.66.136.192/29\",\r\n \"13.66.137.0/26\",\r\n \ - \ \"13.66.226.202/32\",\r\n \"13.66.229.222/32\",\r\n \ - \ \"13.66.230.18/31\",\r\n \"13.66.230.60/32\",\r\n \"\ - 13.66.230.64/32\",\r\n \"13.66.230.103/32\",\r\n \"13.67.16.0/26\"\ - ,\r\n \"13.67.16.192/29\",\r\n \"13.67.17.0/26\",\r\n \ - \ \"13.67.48.255/32\",\r\n \"13.67.56.134/32\",\r\n \ - \ \"13.67.59.217/32\",\r\n \"13.67.215.62/32\",\r\n \"\ - 13.68.22.44/32\",\r\n \"13.68.30.216/32\",\r\n \"13.68.87.133/32\"\ - ,\r\n \"13.69.104.0/26\",\r\n \"13.69.104.192/26\",\r\n\ - \ \"13.69.105.0/26\",\r\n \"13.69.105.192/26\",\r\n \ - \ \"13.69.111.32/27\",\r\n \"13.69.112.168/29\",\r\n \ - \ \"13.69.116.64/27\",\r\n \"13.69.116.96/30\",\r\n \"\ - 13.69.116.128/25\",\r\n \"13.69.224.0/26\",\r\n \"13.69.224.192/26\"\ - ,\r\n \"13.69.225.0/26\",\r\n \"13.69.225.192/26\",\r\n\ - \ \"13.69.233.136/29\",\r\n \"13.70.112.0/27\",\r\n \ - \ \"13.70.112.32/29\",\r\n \"13.70.113.0/27\",\r\n \ - \ \"13.70.114.128/27\",\r\n \"13.70.148.251/32\",\r\n \"\ - 13.70.155.163/32\",\r\n \"13.71.168.0/27\",\r\n \"13.71.168.32/29\"\ - ,\r\n \"13.71.169.0/27\",\r\n \"13.71.177.192/27\",\r\n\ - \ \"13.71.192.0/27\",\r\n \"13.71.193.0/27\",\r\n \ - \ \"13.71.193.32/29\",\r\n \"13.73.109.251/32\",\r\n \ - \ \"13.74.104.64/26\",\r\n \"13.74.104.128/26\",\r\n \"\ - 13.74.105.0/26\",\r\n \"13.74.105.128/26\",\r\n \"13.74.105.192/29\"\ - ,\r\n \"13.75.32.0/26\",\r\n \"13.75.32.192/29\",\r\n \ - \ \"13.75.33.0/26\",\r\n \"13.75.33.192/29\",\r\n \ - \ \"13.75.105.141/32\",\r\n \"13.75.106.191/32\",\r\n \"\ - 13.75.108.188/32\",\r\n \"13.75.149.87/32\",\r\n \"13.76.90.3/32\"\ - ,\r\n \"13.76.247.54/32\",\r\n \"13.77.7.78/32\",\r\n \ - \ \"13.77.48.0/27\",\r\n \"13.77.49.0/27\",\r\n \"\ - 13.77.49.32/29\",\r\n \"13.78.61.196/32\",\r\n \"13.78.104.0/27\"\ - ,\r\n \"13.78.104.32/29\",\r\n \"13.78.105.0/27\",\r\n \ - \ \"13.78.121.203/32\",\r\n \"13.78.144.57/32\",\r\n \ - \ \"13.78.145.25/32\",\r\n \"13.78.148.71/32\",\r\n \ - \ \"13.78.151.189/32\",\r\n \"13.78.151.207/32\",\r\n \"\ - 13.78.178.116/32\",\r\n \"13.78.178.151/32\",\r\n \"13.78.248.32/27\"\ - ,\r\n \"13.84.223.76/32\",\r\n \"13.85.65.48/32\",\r\n \ - \ \"13.85.68.115/32\",\r\n \"13.85.69.107/32\",\r\n \ - \ \"13.86.216.0/25\",\r\n \"13.86.216.128/26\",\r\n \ - \ \"13.86.216.192/27\",\r\n \"13.86.217.0/25\",\r\n \"13.86.217.128/26\"\ - ,\r\n \"13.86.217.192/27\",\r\n \"13.86.217.224/29\",\r\n\ - \ \"13.87.16.64/27\",\r\n \"13.87.17.0/27\",\r\n \ - \ \"13.87.33.234/32\",\r\n \"13.87.34.7/32\",\r\n \"13.87.34.19/32\"\ - ,\r\n \"13.87.38.138/32\",\r\n \"13.87.120.0/27\",\r\n \ - \ \"13.87.121.0/27\",\r\n \"13.88.14.200/32\",\r\n \ - \ \"13.88.29.70/32\",\r\n \"13.88.249.189/32\",\r\n \"\ - 13.88.254.42/32\",\r\n \"13.89.36.110/32\",\r\n \"13.89.37.61/32\"\ - ,\r\n \"13.89.57.50/32\",\r\n \"13.89.57.115/32\",\r\n \ - \ \"13.89.168.0/26\",\r\n \"13.89.168.192/29\",\r\n \ - \ \"13.89.169.0/26\",\r\n \"13.91.4.219/32\",\r\n \"\ - 13.91.6.136/32\",\r\n \"13.91.41.153/32\",\r\n \"13.91.44.56/32\"\ - ,\r\n \"13.91.46.83/32\",\r\n \"13.91.47.72/32\",\r\n \ - \ \"13.93.165.251/32\",\r\n \"13.93.237.158/32\",\r\n \ - \ \"20.21.40.64/27\",\r\n \"20.21.41.64/27\",\r\n \"\ - 20.21.43.248/29\",\r\n \"20.21.53.32/27\",\r\n \"20.21.53.64/26\"\ - ,\r\n \"20.21.64.64/27\",\r\n \"20.21.65.64/27\",\r\n \ - \ \"20.21.67.192/29\",\r\n \"20.21.72.64/27\",\r\n \ - \ \"20.21.73.64/27\",\r\n \"20.21.75.192/29\",\r\n \"\ - 20.36.104.0/27\",\r\n \"20.36.105.0/27\",\r\n \"20.36.105.32/29\"\ - ,\r\n \"20.36.112.0/27\",\r\n \"20.36.113.0/27\",\r\n \ - \ \"20.36.113.32/29\",\r\n \"20.36.144.128/27\",\r\n \ - \ \"20.36.145.0/26\",\r\n \"20.37.71.64/26\",\r\n \"\ - 20.37.71.128/26\",\r\n \"20.37.72.64/27\",\r\n \"20.37.72.96/29\"\ - ,\r\n \"20.37.73.64/27\",\r\n \"20.37.73.96/29\",\r\n \ - \ \"20.38.143.64/26\",\r\n \"20.38.143.128/26\",\r\n \ - \ \"20.38.144.0/27\",\r\n \"20.38.144.32/29\",\r\n \"\ - 20.38.145.0/27\",\r\n \"20.38.152.24/29\",\r\n \"20.40.228.128/25\"\ - ,\r\n \"20.42.65.64/29\",\r\n \"20.42.65.96/27\",\r\n \ - \ \"20.42.68.192/27\",\r\n \"20.42.69.0/25\",\r\n \ - \ \"20.42.73.0/29\",\r\n \"20.42.73.32/27\",\r\n \"20.42.74.192/27\"\ - ,\r\n \"20.42.75.0/25\",\r\n \"20.43.47.192/26\",\r\n \ - \ \"20.44.0.0/27\",\r\n \"20.44.1.0/27\",\r\n \"\ - 20.44.24.0/27\",\r\n \"20.44.24.32/29\",\r\n \"20.44.25.0/27\"\ - ,\r\n \"20.45.120.0/27\",\r\n \"20.45.121.0/27\",\r\n \ - \ \"20.45.121.32/29\",\r\n \"20.46.11.32/27\",\r\n \ - \ \"20.46.11.64/27\",\r\n \"20.46.11.128/26\",\r\n \"\ - 20.48.196.32/27\",\r\n \"20.48.196.64/27\",\r\n \"20.48.196.128/26\"\ - ,\r\n \"20.49.80.0/27\",\r\n \"20.49.80.32/29\",\r\n \ - \ \"20.49.81.0/27\",\r\n \"20.49.88.0/27\",\r\n \"\ - 20.49.88.32/29\",\r\n \"20.49.89.0/27\",\r\n \"20.49.89.32/29\"\ - ,\r\n \"20.49.119.32/27\",\r\n \"20.49.119.64/27\",\r\n\ - \ \"20.49.119.128/26\",\r\n \"20.50.73.32/27\",\r\n \ - \ \"20.50.201.224/27\",\r\n \"20.50.202.0/26\",\r\n \ - \ \"20.51.9.128/25\",\r\n \"20.51.17.160/27\",\r\n \"20.51.17.192/27\"\ - ,\r\n \"20.51.20.0/26\",\r\n \"20.53.46.128/25\",\r\n \ - \ \"20.53.48.96/27\",\r\n \"20.53.48.128/27\",\r\n \ - \ \"20.53.48.192/26\",\r\n \"20.53.56.32/27\",\r\n \"\ - 20.53.56.64/27\",\r\n \"20.53.56.128/26\",\r\n \"20.58.66.128/25\"\ - ,\r\n \"20.58.68.56/30\",\r\n \"20.61.99.192/26\",\r\n \ - \ \"20.61.102.0/26\",\r\n \"20.62.58.128/25\",\r\n \ - \ \"20.62.132.160/27\",\r\n \"20.62.132.192/27\",\r\n \ - \ \"20.62.133.0/26\",\r\n \"20.65.132.160/27\",\r\n \"\ - 20.65.132.192/27\",\r\n \"20.65.133.0/26\",\r\n \"20.66.3.64/26\"\ - ,\r\n \"20.66.3.128/26\",\r\n \"20.69.0.32/27\",\r\n \ - \ \"20.69.0.64/27\",\r\n \"20.69.0.128/26\",\r\n \"\ - 20.72.21.224/27\",\r\n \"20.72.24.64/27\",\r\n \"20.72.24.128/27\"\ - ,\r\n \"20.72.25.128/27\",\r\n \"20.88.64.0/27\",\r\n \ - \ \"20.89.1.64/27\",\r\n \"20.150.168.0/27\",\r\n \ - \ \"20.150.168.32/29\",\r\n \"20.150.169.0/27\",\r\n \"\ - 20.150.176.0/27\",\r\n \"20.150.176.32/29\",\r\n \"20.150.177.0/27\"\ - ,\r\n \"20.150.184.0/27\",\r\n \"20.150.184.32/29\",\r\n\ - \ \"20.150.185.0/27\",\r\n \"20.150.241.128/25\",\r\n \ - \ \"20.189.172.224/27\",\r\n \"20.189.225.160/27\",\r\n \ - \ \"20.189.225.192/27\",\r\n \"20.189.228.0/26\",\r\n \ - \ \"20.191.165.160/27\",\r\n \"20.191.165.192/27\",\r\n \ - \ \"20.191.166.0/26\",\r\n \"20.192.43.160/27\",\r\n \ - \ \"20.192.43.192/27\",\r\n \"20.192.44.0/26\",\r\n \"\ - 20.192.48.32/27\",\r\n \"20.192.48.64/27\",\r\n \"20.192.48.128/26\"\ - ,\r\n \"20.192.96.0/27\",\r\n \"20.192.96.32/29\",\r\n \ - \ \"20.192.97.0/27\",\r\n \"20.192.167.224/27\",\r\n \ - \ \"20.192.232.0/27\",\r\n \"20.192.233.0/27\",\r\n \ - \ \"20.192.233.32/29\",\r\n \"20.193.192.0/27\",\r\n \"\ - 20.193.192.64/26\",\r\n \"20.193.200.0/27\",\r\n \"20.193.200.32/29\"\ - ,\r\n \"20.193.201.0/27\",\r\n \"20.194.64.0/27\",\r\n \ - \ \"20.194.64.32/29\",\r\n \"20.194.65.0/27\",\r\n \ - \ \"20.194.73.64/26\",\r\n \"20.194.73.128/26\",\r\n \ - \ \"20.194.80.192/27\",\r\n \"20.194.129.64/27\",\r\n \"\ - 20.195.65.32/27\",\r\n \"20.195.65.64/27\",\r\n \"20.195.65.128/26\"\ - ,\r\n \"20.195.72.32/27\",\r\n \"20.195.72.64/27\",\r\n\ - \ \"20.195.72.128/26\",\r\n \"20.195.146.0/26\",\r\n \ - \ \"20.205.72.64/27\",\r\n \"20.205.73.64/27\",\r\n \ - \ \"20.205.77.176/29\",\r\n \"20.205.77.200/29\",\r\n \ - \ \"20.205.80.64/27\",\r\n \"20.205.81.64/27\",\r\n \"20.205.83.224/29\"\ - ,\r\n \"20.208.16.64/27\",\r\n \"20.208.17.64/27\",\r\n\ - \ \"20.208.19.192/29\",\r\n \"23.96.89.109/32\",\r\n \ - \ \"23.96.106.191/32\",\r\n \"23.96.178.199/32\",\r\n \ - \ \"23.96.202.229/32\",\r\n \"23.96.204.249/32\",\r\n \ - \ \"23.96.205.215/32\",\r\n \"23.96.214.69/32\",\r\n \"\ - 23.96.243.243/32\",\r\n \"23.96.247.75/32\",\r\n \"23.96.249.37/32\"\ - ,\r\n \"23.96.250.178/32\",\r\n \"23.97.68.51/32\",\r\n\ - \ \"23.97.74.21/32\",\r\n \"23.97.78.163/32\",\r\n \ - \ \"23.97.167.46/32\",\r\n \"23.97.169.19/32\",\r\n \ - \ \"23.97.219.82/32\",\r\n \"23.97.221.176/32\",\r\n \"\ - 23.98.55.75/32\",\r\n \"23.98.80.0/26\",\r\n \"23.98.80.192/29\"\ - ,\r\n \"23.98.81.0/26\",\r\n \"23.98.162.75/32\",\r\n \ - \ \"23.98.162.76/31\",\r\n \"23.98.162.78/32\",\r\n \ - \ \"23.98.170.75/32\",\r\n \"23.98.170.76/31\",\r\n \"\ - 23.99.4.210/32\",\r\n \"23.99.4.248/32\",\r\n \"23.99.10.185/32\"\ - ,\r\n \"23.99.34.75/32\",\r\n \"23.99.34.76/31\",\r\n \ - \ \"23.99.34.78/32\",\r\n \"23.99.37.235/32\",\r\n \ - \ \"23.99.37.236/32\",\r\n \"23.99.57.14/32\",\r\n \"\ - 23.99.80.243/32\",\r\n \"23.99.89.212/32\",\r\n \"23.99.90.75/32\"\ - ,\r\n \"23.99.91.130/32\",\r\n \"23.99.102.124/32\",\r\n\ - \ \"23.99.118.196/32\",\r\n \"23.99.160.139/32\",\r\n \ - \ \"23.99.160.140/31\",\r\n \"23.99.160.142/32\",\r\n \ - \ \"23.99.205.183/32\",\r\n \"23.100.117.95/32\",\r\n \ - \ \"23.100.119.70/32\",\r\n \"23.101.18.228/32\",\r\n \ - \ \"23.101.64.10/32\",\r\n \"23.101.165.167/32\",\r\n \"\ - 23.101.167.45/32\",\r\n \"23.101.170.98/32\",\r\n \"23.102.16.130/32\"\ - ,\r\n \"23.102.23.219/32\",\r\n \"23.102.25.199/32\",\r\n\ - \ \"23.102.52.155/32\",\r\n \"23.102.57.142/32\",\r\n \ - \ \"23.102.62.171/32\",\r\n \"23.102.69.95/32\",\r\n \ - \ \"23.102.71.13/32\",\r\n \"23.102.74.190/32\",\r\n \ - \ \"23.102.172.251/32\",\r\n \"23.102.173.220/32\",\r\n \ - \ \"23.102.174.146/32\",\r\n \"23.102.179.187/32\",\r\n \ - \ \"23.102.206.35/32\",\r\n \"23.102.206.36/31\",\r\n \"\ - 40.67.53.0/25\",\r\n \"40.67.56.0/27\",\r\n \"40.67.56.32/29\"\ - ,\r\n \"40.67.57.0/27\",\r\n \"40.68.37.158/32\",\r\n \ - \ \"40.68.215.206/32\",\r\n \"40.68.220.16/32\",\r\n \ - \ \"40.69.104.0/27\",\r\n \"40.69.105.0/27\",\r\n \"\ - 40.69.105.32/29\",\r\n \"40.69.132.90/32\",\r\n \"40.69.143.202/32\"\ - ,\r\n \"40.69.169.120/32\",\r\n \"40.69.189.48/32\",\r\n\ - \ \"40.70.144.0/26\",\r\n \"40.70.144.192/29\",\r\n \ - \ \"40.70.145.0/26\",\r\n \"40.71.8.0/26\",\r\n \"\ - 40.71.8.192/26\",\r\n \"40.71.9.0/26\",\r\n \"40.71.9.192/26\"\ - ,\r\n \"40.71.83.113/32\",\r\n \"40.71.196.33/32\",\r\n\ - \ \"40.71.211.227/32\",\r\n \"40.71.226.18/32\",\r\n \ - \ \"40.74.51.145/32\",\r\n \"40.74.53.36/32\",\r\n \ - \ \"40.74.60.91/32\",\r\n \"40.74.96.0/27\",\r\n \"40.74.96.32/29\"\ - ,\r\n \"40.74.97.0/27\",\r\n \"40.74.114.22/32\",\r\n \ - \ \"40.74.115.153/32\",\r\n \"40.74.135.185/32\",\r\n \ - \ \"40.74.144.0/27\",\r\n \"40.74.144.32/29\",\r\n \ - \ \"40.74.145.0/27\",\r\n \"40.74.145.32/29\",\r\n \"40.74.254.156/32\"\ - ,\r\n \"40.75.32.0/27\",\r\n \"40.75.32.40/29\",\r\n \ - \ \"40.75.33.0/27\",\r\n \"40.75.33.32/29\",\r\n \"\ - 40.76.2.172/32\",\r\n \"40.76.26.90/32\",\r\n \"40.76.42.44/32\"\ - ,\r\n \"40.76.65.222/32\",\r\n \"40.76.66.9/32\",\r\n \ - \ \"40.76.193.221/32\",\r\n \"40.76.209.171/32\",\r\n \ - \ \"40.76.219.185/32\",\r\n \"40.77.30.201/32\",\r\n \ - \ \"40.78.16.122/32\",\r\n \"40.78.23.252/32\",\r\n \"\ - 40.78.31.250/32\",\r\n \"40.78.57.109/32\",\r\n \"40.78.101.91/32\"\ - ,\r\n \"40.78.110.18/32\",\r\n \"40.78.111.189/32\",\r\n\ - \ \"40.78.192.0/27\",\r\n \"40.78.192.32/29\",\r\n \ - \ \"40.78.193.0/27\",\r\n \"40.78.193.32/29\",\r\n \"\ - 40.78.200.128/29\",\r\n \"40.78.201.128/29\",\r\n \"40.78.224.0/26\"\ - ,\r\n \"40.78.224.128/26\",\r\n \"40.78.225.0/26\",\r\n\ - \ \"40.78.225.128/26\",\r\n \"40.78.232.0/26\",\r\n \ - \ \"40.78.232.192/29\",\r\n \"40.78.233.0/26\",\r\n \ - \ \"40.78.240.0/26\",\r\n \"40.78.240.192/29\",\r\n \"\ - 40.78.241.0/26\",\r\n \"40.78.248.0/26\",\r\n \"40.78.248.192/29\"\ - ,\r\n \"40.78.249.0/26\",\r\n \"40.79.84.180/32\",\r\n \ - \ \"40.79.128.0/27\",\r\n \"40.79.128.32/29\",\r\n \ - \ \"40.79.129.0/27\",\r\n \"40.79.136.0/27\",\r\n \"\ - 40.79.136.32/29\",\r\n \"40.79.137.0/27\",\r\n \"40.79.144.0/27\"\ - ,\r\n \"40.79.144.32/29\",\r\n \"40.79.145.0/27\",\r\n \ - \ \"40.79.152.0/26\",\r\n \"40.79.152.192/26\",\r\n \ - \ \"40.79.153.0/26\",\r\n \"40.79.153.192/26\",\r\n \ - \ \"40.79.160.0/27\",\r\n \"40.79.160.32/29\",\r\n \"40.79.161.0/27\"\ - ,\r\n \"40.79.168.0/27\",\r\n \"40.79.168.32/29\",\r\n \ - \ \"40.79.169.0/27\",\r\n \"40.79.176.0/27\",\r\n \ - \ \"40.79.176.40/29\",\r\n \"40.79.177.0/27\",\r\n \"\ - 40.79.177.32/29\",\r\n \"40.79.184.0/27\",\r\n \"40.79.184.32/29\"\ - ,\r\n \"40.79.185.0/27\",\r\n \"40.79.191.224/27\",\r\n\ - \ \"40.79.192.0/27\",\r\n \"40.79.192.32/29\",\r\n \ - \ \"40.79.193.0/27\",\r\n \"40.80.48.0/27\",\r\n \"\ - 40.80.48.32/29\",\r\n \"40.80.49.0/27\",\r\n \"40.83.178.165/32\"\ - ,\r\n \"40.83.186.249/32\",\r\n \"40.84.5.64/32\",\r\n \ - \ \"40.84.54.249/32\",\r\n \"40.84.153.95/32\",\r\n \ - \ \"40.84.155.210/32\",\r\n \"40.84.156.165/32\",\r\n \ - \ \"40.84.191.1/32\",\r\n \"40.84.193.16/32\",\r\n \"\ - 40.84.195.189/32\",\r\n \"40.84.231.203/32\",\r\n \"40.85.102.50/32\"\ - ,\r\n \"40.85.224.249/32\",\r\n \"40.85.225.5/32\",\r\n\ - \ \"40.86.75.134/32\",\r\n \"40.86.226.166/32\",\r\n \ - \ \"40.86.226.230/32\",\r\n \"40.112.139.250/32\",\r\n \ - \ \"40.112.240.0/27\",\r\n \"40.112.246.0/27\",\r\n \ - \ \"40.113.14.53/32\",\r\n \"40.113.16.190/32\",\r\n \"\ - 40.113.17.148/32\",\r\n \"40.113.20.38/32\",\r\n \"40.113.93.91/32\"\ - ,\r\n \"40.113.200.119/32\",\r\n \"40.114.40.118/32\",\r\ - \n \"40.114.43.106/32\",\r\n \"40.114.45.195/32\",\r\n \ - \ \"40.114.46.128/32\",\r\n \"40.114.46.212/32\",\r\n \ - \ \"40.114.81.142/32\",\r\n \"40.114.240.125/32\",\r\n \ - \ \"40.114.240.162/32\",\r\n \"40.115.37.61/32\",\r\n \ - \ \"40.115.51.118/32\",\r\n \"40.115.52.141/32\",\r\n \ - \ \"40.115.53.255/32\",\r\n \"40.115.61.208/32\",\r\n \"\ - 40.117.42.73/32\",\r\n \"40.117.44.71/32\",\r\n \"40.117.90.115/32\"\ - ,\r\n \"40.117.97.189/32\",\r\n \"40.118.12.208/32\",\r\n\ - \ \"40.118.129.167/32\",\r\n \"40.118.170.1/32\",\r\n \ - \ \"40.118.209.206/32\",\r\n \"40.118.244.227/32\",\r\n \ - \ \"40.118.249.123/32\",\r\n \"40.118.250.19/32\",\r\n \ - \ \"40.120.72.0/27\",\r\n \"40.120.72.32/29\",\r\n \ - \ \"40.120.73.0/27\",\r\n \"40.121.143.204/32\",\r\n \"\ - 40.121.149.49/32\",\r\n \"40.121.154.241/32\",\r\n \"40.121.158.30/32\"\ - ,\r\n \"40.122.205.105/32\",\r\n \"40.122.215.111/32\",\r\ - \n \"40.124.8.76/32\",\r\n \"40.124.64.136/29\",\r\n \ - \ \"40.124.64.160/27\",\r\n \"40.124.65.128/27\",\r\n \ - \ \"40.126.228.153/32\",\r\n \"40.126.230.223/32\",\r\n \ - \ \"40.126.232.113/32\",\r\n \"40.126.233.152/32\",\r\n \ - \ \"40.126.250.24/32\",\r\n \"40.127.82.69/32\",\r\n \ - \ \"40.127.83.164/32\",\r\n \"40.127.128.10/32\",\r\n \"\ - 40.127.135.67/32\",\r\n \"40.127.137.209/32\",\r\n \"40.127.141.194/32\"\ - ,\r\n \"40.127.177.139/32\",\r\n \"40.127.190.50/32\",\r\ - \n \"51.12.46.32/27\",\r\n \"51.12.46.64/27\",\r\n \ - \ \"51.12.46.128/26\",\r\n \"51.12.96.0/27\",\r\n \"\ - 51.12.96.32/29\",\r\n \"51.12.97.0/27\",\r\n \"51.12.198.32/27\"\ - ,\r\n \"51.12.198.64/27\",\r\n \"51.12.198.128/26\",\r\n\ - \ \"51.12.200.0/27\",\r\n \"51.12.200.32/29\",\r\n \ - \ \"51.12.201.0/27\",\r\n \"51.12.201.32/29\",\r\n \"\ - 51.12.224.0/27\",\r\n \"51.12.224.32/29\",\r\n \"51.12.225.0/27\"\ - ,\r\n \"51.12.232.0/27\",\r\n \"51.12.232.32/29\",\r\n \ - \ \"51.12.233.0/27\",\r\n \"51.13.136.224/27\",\r\n \ - \ \"51.13.137.0/27\",\r\n \"51.13.137.64/26\",\r\n \"\ - 51.103.200.64/27\",\r\n \"51.103.201.64/27\",\r\n \"51.103.203.192/29\"\ - ,\r\n \"51.105.64.0/27\",\r\n \"51.105.64.32/29\",\r\n \ - \ \"51.105.65.0/27\",\r\n \"51.105.72.0/27\",\r\n \ - \ \"51.105.72.32/29\",\r\n \"51.105.73.0/27\",\r\n \"\ - 51.107.56.0/27\",\r\n \"51.107.56.32/29\",\r\n \"51.107.57.0/27\"\ - ,\r\n \"51.107.152.0/27\",\r\n \"51.107.153.0/27\",\r\n\ - \ \"51.107.153.32/29\",\r\n \"51.107.242.32/27\",\r\n \ - \ \"51.107.242.64/27\",\r\n \"51.107.242.128/26\",\r\n \ - \ \"51.107.250.64/26\",\r\n \"51.107.250.128/26\",\r\n \ - \ \"51.116.54.96/27\",\r\n \"51.116.54.128/27\",\r\n \ - \ \"51.116.54.192/26\",\r\n \"51.116.56.0/27\",\r\n \"\ - 51.116.57.0/27\",\r\n \"51.116.57.32/29\",\r\n \"51.116.149.32/27\"\ - ,\r\n \"51.116.149.64/27\",\r\n \"51.116.149.128/26\",\r\ - \n \"51.116.152.0/27\",\r\n \"51.116.152.32/29\",\r\n \ - \ \"51.116.153.0/27\",\r\n \"51.116.240.0/27\",\r\n \ - \ \"51.116.240.32/29\",\r\n \"51.116.241.0/27\",\r\n \ - \ \"51.116.248.0/27\",\r\n \"51.116.248.32/29\",\r\n \"\ - 51.116.249.0/27\",\r\n \"51.120.96.0/27\",\r\n \"51.120.96.32/29\"\ - ,\r\n \"51.120.97.0/27\",\r\n \"51.120.104.0/27\",\r\n \ - \ \"51.120.104.32/29\",\r\n \"51.120.105.0/27\",\r\n \ - \ \"51.120.208.0/27\",\r\n \"51.120.208.32/29\",\r\n \ - \ \"51.120.209.0/27\",\r\n \"51.120.216.0/27\",\r\n \"\ - 51.120.217.0/27\",\r\n \"51.120.217.32/29\",\r\n \"51.120.232.192/26\"\ - ,\r\n \"51.120.233.0/26\",\r\n \"51.132.193.64/27\",\r\n\ - \ \"51.138.210.0/26\",\r\n \"51.140.77.9/32\",\r\n \ - \ \"51.140.114.26/32\",\r\n \"51.140.115.150/32\",\r\n \ - \ \"51.140.144.0/27\",\r\n \"51.140.144.32/29\",\r\n \ - \ \"51.140.145.0/27\",\r\n \"51.140.151.128/27\",\r\n \"\ - 51.140.180.9/32\",\r\n \"51.140.183.238/32\",\r\n \"51.140.184.11/32\"\ - ,\r\n \"51.140.184.12/32\",\r\n \"51.140.208.64/27\",\r\n\ - \ \"51.140.208.96/29\",\r\n \"51.140.209.0/27\",\r\n \ - \ \"51.140.209.32/29\",\r\n \"51.141.8.11/32\",\r\n \ - \ \"51.141.8.12/32\",\r\n \"51.141.15.53/32\",\r\n \"\ - 51.141.25.212/32\",\r\n \"51.143.209.224/27\",\r\n \"51.143.212.0/27\"\ - ,\r\n \"51.143.212.64/26\",\r\n \"52.136.53.160/27\",\r\n\ - \ \"52.136.53.192/27\",\r\n \"52.136.185.0/25\",\r\n \ - \ \"52.138.88.0/27\",\r\n \"52.138.88.32/29\",\r\n \ - \ \"52.138.89.0/27\",\r\n \"52.138.89.32/29\",\r\n \"52.138.224.0/26\"\ - ,\r\n \"52.138.224.128/26\",\r\n \"52.138.225.0/26\",\r\n\ - \ \"52.138.225.128/26\",\r\n \"52.138.229.72/29\",\r\n \ - \ \"52.139.106.192/26\",\r\n \"52.139.107.0/26\",\r\n \ - \ \"52.146.133.128/25\",\r\n \"52.147.112.160/27\",\r\n \ - \ \"52.161.15.204/32\",\r\n \"52.161.100.158/32\",\r\n \ - \ \"52.161.105.228/32\",\r\n \"52.161.128.32/27\",\r\n \ - \ \"52.162.104.0/26\",\r\n \"52.162.105.0/26\",\r\n \ - \ \"52.162.105.192/28\",\r\n \"52.162.125.1/32\",\r\n \"\ - 52.162.241.250/32\",\r\n \"52.165.184.67/32\",\r\n \"52.166.76.0/32\"\ - ,\r\n \"52.166.131.195/32\",\r\n \"52.167.104.0/26\",\r\n\ - \ \"52.167.104.192/29\",\r\n \"52.167.104.224/27\",\r\n\ - \ \"52.167.105.0/26\",\r\n \"52.167.111.144/28\",\r\n \ - \ \"52.167.111.192/27\",\r\n \"52.167.117.226/32\",\r\n \ - \ \"52.167.145.64/26\",\r\n \"52.167.145.128/27\",\r\n \ - \ \"52.168.116.64/29\",\r\n \"52.168.117.96/27\",\r\n \ - \ \"52.168.117.128/27\",\r\n \"52.168.117.160/29\",\r\n \ - \ \"52.168.118.0/25\",\r\n \"52.168.166.153/32\",\r\n \ - \ \"52.168.169.124/32\",\r\n \"52.168.183.223/32\",\r\n \ - \ \"52.170.41.199/32\",\r\n \"52.170.97.16/32\",\r\n \"\ - 52.170.98.29/32\",\r\n \"52.171.56.10/32\",\r\n \"52.172.24.47/32\"\ - ,\r\n \"52.172.43.208/32\",\r\n \"52.172.113.96/27\",\r\n\ - \ \"52.172.113.128/27\",\r\n \"52.172.113.192/26\",\r\n\ - \ \"52.172.217.233/32\",\r\n \"52.172.221.154/32\",\r\n\ - \ \"52.173.205.59/32\",\r\n \"52.175.33.150/32\",\r\n \ - \ \"52.176.43.167/32\",\r\n \"52.176.59.12/32\",\r\n \ - \ \"52.176.95.237/32\",\r\n \"52.176.100.98/32\",\r\n \ - \ \"52.177.185.181/32\",\r\n \"52.177.197.103/32\",\r\n \ - \ \"52.177.200.215/32\",\r\n \"52.178.17.192/27\",\r\n \ - \ \"52.178.21.0/26\",\r\n \"52.178.21.64/27\",\r\n \"52.179.16.95/32\"\ - ,\r\n \"52.179.157.248/32\",\r\n \"52.179.165.160/32\",\r\ - \n \"52.179.167.70/32\",\r\n \"52.179.178.184/32\",\r\n\ - \ \"52.180.176.154/31\",\r\n \"52.180.183.226/32\",\r\n\ - \ \"52.182.136.0/26\",\r\n \"52.182.136.192/29\",\r\n \ - \ \"52.182.137.0/26\",\r\n \"52.183.250.62/32\",\r\n \ - \ \"52.184.192.175/32\",\r\n \"52.184.231.0/32\",\r\n \ - \ \"52.185.152.149/32\",\r\n \"52.187.15.214/32\",\r\n \ - \ \"52.187.76.130/32\",\r\n \"52.191.144.64/26\",\r\n \"\ - 52.191.152.64/26\",\r\n \"52.191.172.187/32\",\r\n \"52.191.174.114/32\"\ - ,\r\n \"52.225.188.46/32\",\r\n \"52.225.188.113/32\",\r\ - \n \"52.225.222.124/32\",\r\n \"52.228.24.103/32\",\r\n\ - \ \"52.228.35.221/32\",\r\n \"52.228.39.117/32\",\r\n \ - \ \"52.229.17.93/32\",\r\n \"52.229.122.195/32\",\r\n \ - \ \"52.229.123.147/32\",\r\n \"52.229.124.23/32\",\r\n \ - \ \"52.231.16.0/27\",\r\n \"52.231.16.32/29\",\r\n \"\ - 52.231.17.0/27\",\r\n \"52.231.32.42/31\",\r\n \"52.231.39.56/32\"\ - ,\r\n \"52.231.144.0/27\",\r\n \"52.231.145.0/27\",\r\n\ - \ \"52.231.151.96/27\",\r\n \"52.231.200.86/31\",\r\n \ - \ \"52.231.206.133/32\",\r\n \"52.236.184.0/27\",\r\n \ - \ \"52.236.184.32/29\",\r\n \"52.236.184.128/25\",\r\n \ - \ \"52.236.185.0/27\",\r\n \"52.236.185.128/25\",\r\n \ - \ \"52.237.28.86/32\",\r\n \"52.237.219.227/32\",\r\n \ - \ \"52.242.26.53/32\",\r\n \"52.242.29.91/32\",\r\n \"52.242.30.154/32\"\ - ,\r\n \"52.242.36.107/32\",\r\n \"52.243.32.19/32\",\r\n\ - \ \"52.243.43.186/32\",\r\n \"52.246.152.0/27\",\r\n \ - \ \"52.246.152.32/29\",\r\n \"52.246.153.0/27\",\r\n \ - \ \"52.246.251.248/32\",\r\n \"52.255.48.161/32\",\r\n \ - \ \"65.52.208.91/32\",\r\n \"65.52.213.108/32\",\r\n \"\ - 65.52.214.127/32\",\r\n \"65.52.218.82/32\",\r\n \"65.52.225.245/32\"\ - ,\r\n \"65.52.226.209/32\",\r\n \"65.52.248.0/27\",\r\n\ - \ \"65.52.248.32/29\",\r\n \"65.52.249.0/27\",\r\n \ - \ \"102.37.80.96/27\",\r\n \"102.37.80.128/27\",\r\n \ - \ \"102.37.80.192/26\",\r\n \"102.37.160.0/27\",\r\n \"\ - 102.37.160.64/26\",\r\n \"102.133.24.0/27\",\r\n \"102.133.25.0/27\"\ - ,\r\n \"102.133.25.32/29\",\r\n \"102.133.120.0/27\",\r\n\ - \ \"102.133.120.32/29\",\r\n \"102.133.121.0/27\",\r\n \ - \ \"102.133.152.0/27\",\r\n \"102.133.152.32/29\",\r\n \ - \ \"102.133.153.0/27\",\r\n \"102.133.221.224/27\",\r\n \ - \ \"102.133.248.0/27\",\r\n \"102.133.248.32/29\",\r\n \ - \ \"102.133.249.0/27\",\r\n \"104.40.28.188/32\",\r\n \ - \ \"104.40.49.103/32\",\r\n \"104.40.54.130/32\",\r\n \ - \ \"104.40.82.151/32\",\r\n \"104.40.155.247/32\",\r\n \ - \ \"104.40.168.64/26\",\r\n \"104.40.168.192/26\",\r\n \ - \ \"104.40.169.0/27\",\r\n \"104.40.169.32/29\",\r\n \"\ - 104.40.169.128/25\",\r\n \"104.40.180.164/32\",\r\n \"104.40.220.28/32\"\ - ,\r\n \"104.40.230.18/32\",\r\n \"104.40.232.54/32\",\r\n\ - \ \"104.40.237.111/32\",\r\n \"104.41.11.5/32\",\r\n \ - \ \"104.41.13.213/32\",\r\n \"104.41.13.233/32\",\r\n \ - \ \"104.41.36.39/32\",\r\n \"104.41.56.218/32\",\r\n \ - \ \"104.41.57.82/32\",\r\n \"104.41.59.170/32\",\r\n \"\ - 104.41.150.1/32\",\r\n \"104.41.152.74/32\",\r\n \"104.41.168.103/32\"\ - ,\r\n \"104.41.169.34/32\",\r\n \"104.41.202.30/32\",\r\n\ - \ \"104.41.205.195/32\",\r\n \"104.41.208.104/32\",\r\n\ - \ \"104.41.210.68/32\",\r\n \"104.41.211.98/32\",\r\n \ - \ \"104.42.120.235/32\",\r\n \"104.42.127.95/32\",\r\n \ - \ \"104.42.136.93/32\",\r\n \"104.42.188.130/32\",\r\n \ - \ \"104.42.192.190/32\",\r\n \"104.42.199.221/32\",\r\n \ - \ \"104.42.231.253/32\",\r\n \"104.42.237.198/32\",\r\n \ - \ \"104.42.238.205/32\",\r\n \"104.43.10.74/32\",\r\n \ - \ \"104.43.15.0/32\",\r\n \"104.43.164.21/32\",\r\n \"\ - 104.43.164.247/32\",\r\n \"104.43.203.72/32\",\r\n \"104.45.11.99/32\"\ - ,\r\n \"104.45.14.115/32\",\r\n \"104.45.158.30/32\",\r\n\ - \ \"104.46.38.143/32\",\r\n \"104.46.40.24/32\",\r\n \ - \ \"104.46.100.189/32\",\r\n \"104.46.108.148/32\",\r\n \ - \ \"104.46.162.192/27\",\r\n \"104.46.179.160/27\",\r\n \ - \ \"104.46.179.192/27\",\r\n \"104.46.183.0/26\",\r\n \ - \ \"104.47.157.97/32\",\r\n \"104.208.21.0/26\",\r\n \ - \ \"104.208.21.192/29\",\r\n \"104.208.22.0/26\",\r\n \"\ - 104.208.28.16/32\",\r\n \"104.208.28.53/32\",\r\n \"104.208.149.0/26\"\ - ,\r\n \"104.208.150.0/26\",\r\n \"104.208.150.192/29\",\r\ - \n \"104.208.161.78/32\",\r\n \"104.208.163.201/32\",\r\n\ - \ \"104.208.233.240/32\",\r\n \"104.208.238.55/32\",\r\n\ - \ \"104.208.241.224/32\",\r\n \"104.209.186.94/32\",\r\n\ - \ \"104.210.32.128/32\",\r\n \"104.210.105.215/32\",\r\n\ - \ \"104.211.85.0/27\",\r\n \"104.211.86.0/27\",\r\n \ - \ \"104.211.86.32/29\",\r\n \"104.211.96.159/32\",\r\n \ - \ \"104.211.96.160/32\",\r\n \"104.211.144.0/27\",\r\n \ - \ \"104.211.144.32/29\",\r\n \"104.211.145.0/27\",\r\n \ - \ \"104.211.145.32/29\",\r\n \"104.211.160.80/31\",\r\n \ - \ \"104.211.185.58/32\",\r\n \"104.211.190.46/32\",\r\n \ - \ \"104.211.224.146/31\",\r\n \"104.214.16.0/26\",\r\n \ - \ \"104.214.16.192/26\",\r\n \"104.214.17.0/26\",\r\n \"\ - 104.214.17.192/26\",\r\n \"104.214.67.25/32\",\r\n \"104.214.73.137/32\"\ - ,\r\n \"104.214.78.242/32\",\r\n \"104.214.148.156/32\"\ - ,\r\n \"104.214.150.17/32\",\r\n \"104.215.195.14/32\",\r\ - \n \"104.215.196.52/32\",\r\n \"111.221.106.161/32\",\r\n\ - \ \"137.116.31.224/27\",\r\n \"137.116.129.110/32\",\r\n\ - \ \"137.116.203.91/32\",\r\n \"137.135.51.212/32\",\r\n\ - \ \"137.135.109.63/32\",\r\n \"137.135.186.126/32\",\r\n\ - \ \"137.135.189.158/32\",\r\n \"137.135.205.85/32\",\r\n\ - \ \"137.135.213.9/32\",\r\n \"138.91.48.99/32\",\r\n \ - \ \"138.91.58.227/32\",\r\n \"138.91.145.12/32\",\r\n \ - \ \"138.91.160.189/32\",\r\n \"138.91.240.14/32\",\r\n \ - \ \"138.91.246.31/32\",\r\n \"138.91.247.51/32\",\r\n \ - \ \"138.91.251.139/32\",\r\n \"157.55.208.150/32\",\r\n \ - \ \"168.61.136.0/27\",\r\n \"168.61.137.0/27\",\r\n \"\ - 168.62.115.112/28\",\r\n \"168.62.232.188/32\",\r\n \"168.62.235.49/32\"\ - ,\r\n \"168.62.235.241/32\",\r\n \"168.62.239.29/32\",\r\ - \n \"168.63.13.214/32\",\r\n \"168.63.98.91/32\",\r\n \ - \ \"168.63.175.68/32\",\r\n \"191.233.15.160/27\",\r\n \ - \ \"191.233.15.192/27\",\r\n \"191.233.48.0/27\",\r\n \ - \ \"191.233.48.32/29\",\r\n \"191.233.49.0/27\",\r\n \ - \ \"191.233.69.227/32\",\r\n \"191.233.90.117/32\",\r\n \ - \ \"191.233.200.0/27\",\r\n \"191.233.200.32/29\",\r\n \ - \ \"191.233.201.0/27\",\r\n \"191.234.2.139/32\",\r\n \"\ - 191.234.2.140/31\",\r\n \"191.234.2.142/32\",\r\n \"191.234.142.160/27\"\ - ,\r\n \"191.234.142.192/27\",\r\n \"191.234.144.0/27\",\r\ - \n \"191.234.144.32/29\",\r\n \"191.234.145.0/27\",\r\n\ - \ \"191.234.152.0/26\",\r\n \"191.234.153.0/26\",\r\n \ - \ \"191.234.157.136/29\",\r\n \"191.235.170.58/32\",\r\n \ - \ \"191.235.193.75/32\",\r\n \"191.235.193.76/31\",\r\n \ - \ \"191.235.193.78/32\",\r\n \"191.235.193.139/32\",\r\n\ - \ \"191.235.193.140/31\",\r\n \"191.235.209.79/32\",\r\n\ - \ \"191.236.119.31/32\",\r\n \"191.236.148.44/32\",\r\n\ - \ \"191.236.153.120/32\",\r\n \"191.237.20.112/32\",\r\n\ - \ \"191.237.82.74/32\",\r\n \"191.237.219.202/32\",\r\n\ - \ \"191.237.232.75/32\",\r\n \"191.237.232.76/31\",\r\n\ - \ \"191.237.232.78/32\",\r\n \"191.237.232.235/32\",\r\n\ - \ \"191.237.232.236/31\",\r\n \"191.237.240.43/32\",\r\n\ - \ \"191.237.240.44/32\",\r\n \"191.237.240.46/32\",\r\n\ - \ \"191.238.6.43/32\",\r\n \"191.238.6.44/31\",\r\n \ - \ \"191.238.6.46/32\",\r\n \"191.238.68.11/32\",\r\n \ - \ \"191.238.68.12/31\",\r\n \"191.238.68.14/32\",\r\n \ - \ \"191.238.224.203/32\",\r\n \"191.238.230.40/32\",\r\n \ - \ \"191.239.12.154/32\",\r\n \"191.239.189.48/32\",\r\n \ - \ \"191.239.192.109/32\",\r\n \"191.239.224.107/32\",\r\n \ - \ \"191.239.224.108/31\",\r\n \"191.239.224.110/32\",\r\n \ - \ \"207.46.139.82/32\",\r\n \"207.46.140.180/32\",\r\n \ - \ \"207.46.153.182/32\",\r\n \"2603:1000:4::280/123\",\r\n \ - \ \"2603:1000:4:1::200/121\",\r\n \"2603:1000:4:400::/123\"\ - ,\r\n \"2603:1000:4:401::/123\",\r\n \"2603:1000:104::640/123\"\ - ,\r\n \"2603:1000:104::680/121\",\r\n \"2603:1000:104:400::/123\"\ - ,\r\n \"2603:1000:104:401::/123\",\r\n \"2603:1000:104:800::/123\"\ - ,\r\n \"2603:1000:104:801::/123\",\r\n \"2603:1000:104:c00::/123\"\ - ,\r\n \"2603:1000:104:c01::/123\",\r\n \"2603:1010:6::320/123\"\ - ,\r\n \"2603:1010:6::380/121\",\r\n \"2603:1010:6:400::/123\"\ - ,\r\n \"2603:1010:6:401::/123\",\r\n \"2603:1010:6:800::/123\"\ - ,\r\n \"2603:1010:6:801::/123\",\r\n \"2603:1010:6:c00::/123\"\ - ,\r\n \"2603:1010:6:c01::/123\",\r\n \"2603:1010:101::280/123\"\ - ,\r\n \"2603:1010:101:1::200/121\",\r\n \"2603:1010:101:400::/123\"\ - ,\r\n \"2603:1010:304::280/123\",\r\n \"2603:1010:304:1::200/121\"\ - ,\r\n \"2603:1010:304:400::/123\",\r\n \"2603:1010:404::280/123\"\ - ,\r\n \"2603:1010:404:1::200/121\",\r\n \"2603:1010:404:400::/123\"\ - ,\r\n \"2603:1020:5::320/123\",\r\n \"2603:1020:5::380/121\"\ - ,\r\n \"2603:1020:5:400::/123\",\r\n \"2603:1020:5:401::/123\"\ - ,\r\n \"2603:1020:5:800::/123\",\r\n \"2603:1020:5:801::/123\"\ - ,\r\n \"2603:1020:5:c00::/123\",\r\n \"2603:1020:5:c01::/123\"\ - ,\r\n \"2603:1020:206::320/123\",\r\n \"2603:1020:206::380/121\"\ - ,\r\n \"2603:1020:206:400::/123\",\r\n \"2603:1020:206:401::/123\"\ - ,\r\n \"2603:1020:206:800::/123\",\r\n \"2603:1020:206:801::/123\"\ - ,\r\n \"2603:1020:206:c00::/123\",\r\n \"2603:1020:206:c01::/123\"\ - ,\r\n \"2603:1020:605::280/123\",\r\n \"2603:1020:605:1::200/121\"\ - ,\r\n \"2603:1020:605:400::/123\",\r\n \"2603:1020:705::320/123\"\ - ,\r\n \"2603:1020:705::380/121\",\r\n \"2603:1020:705:400::/123\"\ - ,\r\n \"2603:1020:705:401::/123\",\r\n \"2603:1020:705:800::/123\"\ - ,\r\n \"2603:1020:705:801::/123\",\r\n \"2603:1020:705:c00::/123\"\ - ,\r\n \"2603:1020:705:c01::/123\",\r\n \"2603:1020:805::320/123\"\ - ,\r\n \"2603:1020:805::380/121\",\r\n \"2603:1020:805:400::/123\"\ - ,\r\n \"2603:1020:805:401::/123\",\r\n \"2603:1020:805:800::/123\"\ - ,\r\n \"2603:1020:805:801::/123\",\r\n \"2603:1020:805:c00::/123\"\ - ,\r\n \"2603:1020:805:c01::/123\",\r\n \"2603:1020:905::280/123\"\ - ,\r\n \"2603:1020:905:1::200/121\",\r\n \"2603:1020:905:400::/123\"\ - ,\r\n \"2603:1020:a04::320/123\",\r\n \"2603:1020:a04::380/121\"\ - ,\r\n \"2603:1020:a04:400::/123\",\r\n \"2603:1020:a04:401::/123\"\ - ,\r\n \"2603:1020:a04:800::/123\",\r\n \"2603:1020:a04:801::/123\"\ - ,\r\n \"2603:1020:a04:c00::/123\",\r\n \"2603:1020:a04:c01::/123\"\ - ,\r\n \"2603:1020:b04::280/123\",\r\n \"2603:1020:b04:1::200/121\"\ - ,\r\n \"2603:1020:b04:400::/123\",\r\n \"2603:1020:c04::320/123\"\ - ,\r\n \"2603:1020:c04::380/121\",\r\n \"2603:1020:c04:400::/123\"\ - ,\r\n \"2603:1020:c04:401::/123\",\r\n \"2603:1020:c04:800::/123\"\ - ,\r\n \"2603:1020:c04:801::/123\",\r\n \"2603:1020:c04:c00::/123\"\ - ,\r\n \"2603:1020:c04:c01::/123\",\r\n \"2603:1020:d04::280/123\"\ - ,\r\n \"2603:1020:d04:1::200/121\",\r\n \"2603:1020:d04:400::/123\"\ - ,\r\n \"2603:1020:e04::320/123\",\r\n \"2603:1020:e04::380/121\"\ - ,\r\n \"2603:1020:e04:400::/123\",\r\n \"2603:1020:e04:401::/123\"\ - ,\r\n \"2603:1020:e04:800::/123\",\r\n \"2603:1020:e04:801::/123\"\ - ,\r\n \"2603:1020:e04:c00::/123\",\r\n \"2603:1020:e04:c01::/123\"\ - ,\r\n \"2603:1020:f04::280/123\",\r\n \"2603:1020:f04:1::200/121\"\ - ,\r\n \"2603:1020:f04:400::/123\",\r\n \"2603:1020:1004:1::520/123\"\ - ,\r\n \"2603:1020:1004:1::580/121\",\r\n \"2603:1020:1004:400::400/123\"\ - ,\r\n \"2603:1020:1004:402::/123\",\r\n \"2603:1020:1004:403::/123\"\ - ,\r\n \"2603:1020:1004:802::/123\",\r\n \"2603:1020:1004:803::/123\"\ - ,\r\n \"2603:1020:1004:c03::/123\",\r\n \"2603:1020:1004:c04::/123\"\ - ,\r\n \"2603:1020:1104::500/123\",\r\n \"2603:1020:1104:1::300/121\"\ - ,\r\n \"2603:1020:1104:400::420/123\",\r\n \"2603:1020:1104:402::/123\"\ - ,\r\n \"2603:1030:f:1::280/123\",\r\n \"2603:1030:f:2::200/121\"\ - ,\r\n \"2603:1030:f:402::/122\",\r\n \"2603:1030:f:403::/122\"\ - ,\r\n \"2603:1030:10::320/123\",\r\n \"2603:1030:10::380/121\"\ - ,\r\n \"2603:1030:10:400::/123\",\r\n \"2603:1030:10:401::/123\"\ - ,\r\n \"2603:1030:10:800::/123\",\r\n \"2603:1030:10:801::/123\"\ - ,\r\n \"2603:1030:10:c00::/123\",\r\n \"2603:1030:10:c01::/123\"\ - ,\r\n \"2603:1030:104::320/123\",\r\n \"2603:1030:104::380/121\"\ - ,\r\n \"2603:1030:104:400::/123\",\r\n \"2603:1030:104:401::/123\"\ - ,\r\n \"2603:1030:107:1::380/123\",\r\n \"2603:1030:107:401::40/122\"\ - ,\r\n \"2603:1030:107:402::40/123\",\r\n \"2603:1030:210::320/123\"\ - ,\r\n \"2603:1030:210::380/121\",\r\n \"2603:1030:210:400::/123\"\ - ,\r\n \"2603:1030:210:401::/123\",\r\n \"2603:1030:210:800::/123\"\ - ,\r\n \"2603:1030:210:801::/123\",\r\n \"2603:1030:210:c00::/123\"\ - ,\r\n \"2603:1030:210:c01::/123\",\r\n \"2603:1030:40b:2::200/123\"\ - ,\r\n \"2603:1030:40b:2::280/121\",\r\n \"2603:1030:40b:402::/122\"\ - ,\r\n \"2603:1030:40b:403::/122\",\r\n \"2603:1030:40b:802::/122\"\ - ,\r\n \"2603:1030:40b:803::/122\",\r\n \"2603:1030:40b:c02::/122\"\ - ,\r\n \"2603:1030:40b:c03::/122\",\r\n \"2603:1030:40c::320/123\"\ - ,\r\n \"2603:1030:40c::380/121\",\r\n \"2603:1030:40c:400::/123\"\ - ,\r\n \"2603:1030:40c:401::/123\",\r\n \"2603:1030:40c:800::/123\"\ - ,\r\n \"2603:1030:40c:801::/123\",\r\n \"2603:1030:40c:c00::/123\"\ - ,\r\n \"2603:1030:40c:c01::/123\",\r\n \"2603:1030:504::520/123\"\ - ,\r\n \"2603:1030:504::580/121\",\r\n \"2603:1030:504:400::/123\"\ - ,\r\n \"2603:1030:504:401::/123\",\r\n \"2603:1030:504:800::/123\"\ - ,\r\n \"2603:1030:504:801::/123\",\r\n \"2603:1030:504:c00::/123\"\ - ,\r\n \"2603:1030:504:c01::/123\",\r\n \"2603:1030:608::280/123\"\ - ,\r\n \"2603:1030:608:1::200/121\",\r\n \"2603:1030:608:400::/123\"\ - ,\r\n \"2603:1030:807::320/123\",\r\n \"2603:1030:807::380/121\"\ - ,\r\n \"2603:1030:807:400::/123\",\r\n \"2603:1030:807:401::/123\"\ - ,\r\n \"2603:1030:807:800::/123\",\r\n \"2603:1030:807:801::/123\"\ - ,\r\n \"2603:1030:807:c00::/123\",\r\n \"2603:1030:807:c01::/123\"\ - ,\r\n \"2603:1030:a07::280/123\",\r\n \"2603:1030:a07:1::200/121\"\ - ,\r\n \"2603:1030:a07:400::/123\",\r\n \"2603:1030:b04::280/123\"\ - ,\r\n \"2603:1030:b04:1::200/121\",\r\n \"2603:1030:b04:400::/123\"\ - ,\r\n \"2603:1030:c06:2::200/123\",\r\n \"2603:1030:c06:2::280/121\"\ - ,\r\n \"2603:1030:c06:401::/123\",\r\n \"2603:1030:c06:402::/123\"\ - ,\r\n \"2603:1030:c06:800::/123\",\r\n \"2603:1030:c06:801::/123\"\ - ,\r\n \"2603:1030:c06:c00::/123\",\r\n \"2603:1030:c06:c01::/123\"\ - ,\r\n \"2603:1030:f05::320/123\",\r\n \"2603:1030:f05::380/121\"\ - ,\r\n \"2603:1030:f05:400::/123\",\r\n \"2603:1030:f05:401::/123\"\ - ,\r\n \"2603:1030:f05:800::/123\",\r\n \"2603:1030:f05:801::/123\"\ - ,\r\n \"2603:1030:f05:c00::/123\",\r\n \"2603:1030:f05:c01::/123\"\ - ,\r\n \"2603:1030:1005::280/123\",\r\n \"2603:1030:1005:1::200/121\"\ - ,\r\n \"2603:1030:1005:400::/123\",\r\n \"2603:1040:5::420/123\"\ - ,\r\n \"2603:1040:5::480/121\",\r\n \"2603:1040:5:400::/123\"\ - ,\r\n \"2603:1040:5:401::/123\",\r\n \"2603:1040:5:800::/123\"\ - ,\r\n \"2603:1040:5:801::/123\",\r\n \"2603:1040:5:c00::/123\"\ - ,\r\n \"2603:1040:5:c01::/123\",\r\n \"2603:1040:207::280/123\"\ - ,\r\n \"2603:1040:207:1::200/121\",\r\n \"2603:1040:207:400::/123\"\ - ,\r\n \"2603:1040:207:401::/123\",\r\n \"2603:1040:407::320/123\"\ - ,\r\n \"2603:1040:407::380/121\",\r\n \"2603:1040:407:400::/123\"\ - ,\r\n \"2603:1040:407:401::/123\",\r\n \"2603:1040:407:800::/123\"\ - ,\r\n \"2603:1040:407:801::/123\",\r\n \"2603:1040:407:c00::/123\"\ - ,\r\n \"2603:1040:407:c01::/123\",\r\n \"2603:1040:606::280/123\"\ - ,\r\n \"2603:1040:606:1::200/121\",\r\n \"2603:1040:606:400::/123\"\ - ,\r\n \"2603:1040:806::280/123\",\r\n \"2603:1040:806:1::200/121\"\ - ,\r\n \"2603:1040:806:400::/123\",\r\n \"2603:1040:904::320/123\"\ - ,\r\n \"2603:1040:904::380/121\",\r\n \"2603:1040:904:400::/123\"\ - ,\r\n \"2603:1040:904:401::/123\",\r\n \"2603:1040:904:800::/123\"\ - ,\r\n \"2603:1040:904:801::/123\",\r\n \"2603:1040:904:c00::/123\"\ - ,\r\n \"2603:1040:904:c01::/123\",\r\n \"2603:1040:a06::420/123\"\ - ,\r\n \"2603:1040:a06::480/121\",\r\n \"2603:1040:a06:400::/123\"\ - ,\r\n \"2603:1040:a06:401::/123\",\r\n \"2603:1040:a06:800::/123\"\ - ,\r\n \"2603:1040:a06:801::/123\",\r\n \"2603:1040:a06:c00::/123\"\ - ,\r\n \"2603:1040:a06:c01::/123\",\r\n \"2603:1040:b04::280/123\"\ - ,\r\n \"2603:1040:b04:1::200/121\",\r\n \"2603:1040:b04:400::/123\"\ - ,\r\n \"2603:1040:c06::280/123\",\r\n \"2603:1040:c06:1::200/121\"\ - ,\r\n \"2603:1040:c06:400::/123\",\r\n \"2603:1040:c06:401::/123\"\ - ,\r\n \"2603:1040:d04:1::520/123\",\r\n \"2603:1040:d04:1::580/121\"\ - ,\r\n \"2603:1040:d04:400::400/123\",\r\n \"2603:1040:d04:402::/123\"\ - ,\r\n \"2603:1040:d04:403::/123\",\r\n \"2603:1040:d04:802::/123\"\ - ,\r\n \"2603:1040:d04:803::/123\",\r\n \"2603:1040:d04:c03::/123\"\ - ,\r\n \"2603:1040:d04:c04::/123\",\r\n \"2603:1040:e05::/123\"\ - ,\r\n \"2603:1040:f05::320/123\",\r\n \"2603:1040:f05::380/121\"\ - ,\r\n \"2603:1040:f05:400::/123\",\r\n \"2603:1040:f05:401::/123\"\ - ,\r\n \"2603:1040:f05:800::/123\",\r\n \"2603:1040:f05:801::/123\"\ - ,\r\n \"2603:1040:f05:c00::/123\",\r\n \"2603:1040:f05:c01::/123\"\ - ,\r\n \"2603:1040:1002:2::c0/123\",\r\n \"2603:1040:1002:2::280/121\"\ - ,\r\n \"2603:1040:1104::500/123\",\r\n \"2603:1040:1104:1::300/121\"\ - ,\r\n \"2603:1040:1104:400::440/123\",\r\n \"2603:1040:1104:402::/123\"\ - ,\r\n \"2603:1050:6::320/123\",\r\n \"2603:1050:6::380/121\"\ - ,\r\n \"2603:1050:6:400::/123\",\r\n \"2603:1050:6:401::/123\"\ - ,\r\n \"2603:1050:6:800::/123\",\r\n \"2603:1050:6:801::/123\"\ - ,\r\n \"2603:1050:6:c00::/122\",\r\n \"2603:1050:6:c01::/122\"\ - ,\r\n \"2603:1050:403:1::200/123\",\r\n \"2603:1050:403:1::280/121\"\ - ,\r\n \"2603:1050:403:402::/123\",\r\n \"2603:1050:403:403::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.AustraliaCentral\"\ - ,\r\n \"id\": \"Sql.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.36.104.0/27\"\ - ,\r\n \"20.36.105.0/27\",\r\n \"20.36.105.32/29\",\r\n \ - \ \"20.53.48.96/27\",\r\n \"20.53.48.128/27\",\r\n \ - \ \"20.53.48.192/26\",\r\n \"2603:1010:304::280/123\",\r\n \ - \ \"2603:1010:304:1::200/121\",\r\n \"2603:1010:304:400::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.AustraliaCentral2\"\ - ,\r\n \"id\": \"Sql.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiacentral2\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \ - \ \"20.36.112.0/27\",\r\n \"20.36.113.0/27\",\r\n \ - \ \"20.36.113.32/29\",\r\n \"20.53.56.32/27\",\r\n \"\ - 20.53.56.64/27\",\r\n \"20.53.56.128/26\",\r\n \"2603:1010:404::280/123\"\ - ,\r\n \"2603:1010:404:1::200/121\",\r\n \"2603:1010:404:400::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.AustraliaEast\"\ - ,\r\n \"id\": \"Sql.AustraliaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.70.112.0/27\"\ - ,\r\n \"13.70.112.32/29\",\r\n \"13.70.113.0/27\",\r\n \ - \ \"13.70.114.128/27\",\r\n \"13.75.149.87/32\",\r\n \ - \ \"20.53.46.128/25\",\r\n \"40.79.160.0/27\",\r\n \ - \ \"40.79.160.32/29\",\r\n \"40.79.161.0/27\",\r\n \"40.79.168.0/27\"\ - ,\r\n \"40.79.168.32/29\",\r\n \"40.79.169.0/27\",\r\n \ - \ \"40.126.228.153/32\",\r\n \"40.126.230.223/32\",\r\n \ - \ \"40.126.232.113/32\",\r\n \"40.126.233.152/32\",\r\n \ - \ \"40.126.250.24/32\",\r\n \"52.237.219.227/32\",\r\n \ - \ \"104.210.105.215/32\",\r\n \"2603:1010:6::320/123\",\r\n\ - \ \"2603:1010:6::380/121\",\r\n \"2603:1010:6:400::/123\"\ - ,\r\n \"2603:1010:6:401::/123\",\r\n \"2603:1010:6:800::/123\"\ - ,\r\n \"2603:1010:6:801::/123\",\r\n \"2603:1010:6:c00::/123\"\ - ,\r\n \"2603:1010:6:c01::/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"Sql.AustraliaSoutheast\",\r\n \"id\": \"\ - Sql.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.70.148.251/32\"\ - ,\r\n \"13.70.155.163/32\",\r\n \"13.73.109.251/32\",\r\n\ - \ \"13.77.7.78/32\",\r\n \"13.77.48.0/27\",\r\n \ - \ \"13.77.49.0/27\",\r\n \"13.77.49.32/29\",\r\n \"40.127.82.69/32\"\ - ,\r\n \"40.127.83.164/32\",\r\n \"52.255.48.161/32\",\r\n\ - \ \"104.46.162.192/27\",\r\n \"104.46.179.160/27\",\r\n\ - \ \"104.46.179.192/27\",\r\n \"104.46.183.0/26\",\r\n \ - \ \"191.239.189.48/32\",\r\n \"191.239.192.109/32\",\r\n \ - \ \"2603:1010:101::280/123\",\r\n \"2603:1010:101:1::200/121\"\ - ,\r\n \"2603:1010:101:400::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.BrazilSouth\",\r\n \"id\": \"\ - Sql.BrazilSouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"\ - properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\"\ - : \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\"\ - ,\r\n \"addressPrefixes\": [\r\n \"104.41.11.5/32\",\r\n \ - \ \"104.41.13.213/32\",\r\n \"104.41.13.233/32\",\r\n \ - \ \"104.41.36.39/32\",\r\n \"104.41.56.218/32\",\r\n \ - \ \"104.41.57.82/32\",\r\n \"104.41.59.170/32\",\r\n \ - \ \"191.233.200.0/27\",\r\n \"191.233.200.32/29\",\r\n \"\ - 191.233.201.0/27\",\r\n \"191.234.142.160/27\",\r\n \"191.234.142.192/27\"\ - ,\r\n \"191.234.144.0/27\",\r\n \"191.234.144.32/29\",\r\ - \n \"191.234.145.0/27\",\r\n \"191.234.152.0/26\",\r\n \ - \ \"191.234.153.0/26\",\r\n \"191.234.157.136/29\",\r\n \ - \ \"2603:1050:6::320/123\",\r\n \"2603:1050:6::380/121\"\ - ,\r\n \"2603:1050:6:400::/123\",\r\n \"2603:1050:6:401::/123\"\ - ,\r\n \"2603:1050:6:800::/123\",\r\n \"2603:1050:6:801::/123\"\ - ,\r\n \"2603:1050:6:c00::/122\",\r\n \"2603:1050:6:c01::/122\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.BrazilSoutheast\"\ - ,\r\n \"id\": \"Sql.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.195.146.0/26\"\ - ,\r\n \"191.233.15.160/27\",\r\n \"191.233.15.192/27\",\r\ - \n \"191.233.48.0/27\",\r\n \"191.233.48.32/29\",\r\n \ - \ \"191.233.49.0/27\",\r\n \"2603:1050:403:1::200/123\",\r\ - \n \"2603:1050:403:1::280/121\",\r\n \"2603:1050:403:402::/123\"\ - ,\r\n \"2603:1050:403:403::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.CanadaCentral\",\r\n \"id\": \"\ - Sql.CanadaCentral\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\"\ - : \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.71.168.0/27\",\r\n \ - \ \"13.71.168.32/29\",\r\n \"13.71.169.0/27\",\r\n \ - \ \"13.71.177.192/27\",\r\n \"13.88.249.189/32\",\r\n \ - \ \"13.88.254.42/32\",\r\n \"20.38.144.0/27\",\r\n \"20.38.144.32/29\"\ - ,\r\n \"20.38.145.0/27\",\r\n \"20.48.196.32/27\",\r\n \ - \ \"20.48.196.64/27\",\r\n \"20.48.196.128/26\",\r\n \ - \ \"40.85.224.249/32\",\r\n \"40.85.225.5/32\",\r\n \ - \ \"52.228.24.103/32\",\r\n \"52.228.35.221/32\",\r\n \"\ - 52.228.39.117/32\",\r\n \"52.237.28.86/32\",\r\n \"52.246.152.0/27\"\ - ,\r\n \"52.246.152.32/29\",\r\n \"52.246.153.0/27\",\r\n\ - \ \"2603:1030:f05::320/123\",\r\n \"2603:1030:f05::380/121\"\ - ,\r\n \"2603:1030:f05:400::/123\",\r\n \"2603:1030:f05:401::/123\"\ - ,\r\n \"2603:1030:f05:800::/123\",\r\n \"2603:1030:f05:801::/123\"\ - ,\r\n \"2603:1030:f05:c00::/123\",\r\n \"2603:1030:f05:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.CanadaEast\"\ - ,\r\n \"id\": \"Sql.CanadaEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"40.69.104.0/27\"\ - ,\r\n \"40.69.105.0/27\",\r\n \"40.69.105.32/29\",\r\n \ - \ \"40.86.226.166/32\",\r\n \"40.86.226.230/32\",\r\n \ - \ \"52.139.106.192/26\",\r\n \"52.139.107.0/26\",\r\n \ - \ \"52.229.122.195/32\",\r\n \"52.229.123.147/32\",\r\n \ - \ \"52.229.124.23/32\",\r\n \"52.242.26.53/32\",\r\n \ - \ \"52.242.29.91/32\",\r\n \"52.242.30.154/32\",\r\n \"\ - 52.242.36.107/32\",\r\n \"2603:1030:1005::280/123\",\r\n \ - \ \"2603:1030:1005:1::200/121\",\r\n \"2603:1030:1005:400::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.CentralIndia\"\ - ,\r\n \"id\": \"Sql.CentralIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.192.43.160/27\"\ - ,\r\n \"20.192.43.192/27\",\r\n \"20.192.44.0/26\",\r\n\ - \ \"20.192.96.0/27\",\r\n \"20.192.96.32/29\",\r\n \ - \ \"20.192.97.0/27\",\r\n \"40.80.48.0/27\",\r\n \"\ - 40.80.48.32/29\",\r\n \"40.80.49.0/27\",\r\n \"52.172.217.233/32\"\ - ,\r\n \"52.172.221.154/32\",\r\n \"104.211.85.0/27\",\r\n\ - \ \"104.211.86.0/27\",\r\n \"104.211.86.32/29\",\r\n \ - \ \"104.211.96.159/32\",\r\n \"104.211.96.160/32\",\r\n \ - \ \"2603:1040:a06::420/123\",\r\n \"2603:1040:a06::480/121\"\ - ,\r\n \"2603:1040:a06:400::/123\",\r\n \"2603:1040:a06:401::/123\"\ - ,\r\n \"2603:1040:a06:800::/123\",\r\n \"2603:1040:a06:801::/123\"\ - ,\r\n \"2603:1040:a06:c00::/123\",\r\n \"2603:1040:a06:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.CentralUS\"\ - ,\r\n \"id\": \"Sql.CentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.67.215.62/32\"\ - ,\r\n \"13.89.36.110/32\",\r\n \"13.89.37.61/32\",\r\n \ - \ \"13.89.57.50/32\",\r\n \"13.89.57.115/32\",\r\n \ - \ \"13.89.168.0/26\",\r\n \"13.89.168.192/29\",\r\n \"\ - 13.89.169.0/26\",\r\n \"20.40.228.128/25\",\r\n \"23.99.160.139/32\"\ - ,\r\n \"23.99.160.140/31\",\r\n \"23.99.160.142/32\",\r\n\ - \ \"23.99.205.183/32\",\r\n \"40.69.132.90/32\",\r\n \ - \ \"40.69.143.202/32\",\r\n \"40.69.169.120/32\",\r\n \ - \ \"40.69.189.48/32\",\r\n \"40.77.30.201/32\",\r\n \ - \ \"40.86.75.134/32\",\r\n \"40.113.200.119/32\",\r\n \"\ - 40.122.205.105/32\",\r\n \"40.122.215.111/32\",\r\n \"52.165.184.67/32\"\ - ,\r\n \"52.173.205.59/32\",\r\n \"52.176.43.167/32\",\r\n\ - \ \"52.176.59.12/32\",\r\n \"52.176.95.237/32\",\r\n \ - \ \"52.176.100.98/32\",\r\n \"52.182.136.0/26\",\r\n \ - \ \"52.182.136.192/29\",\r\n \"52.182.137.0/26\",\r\n \ - \ \"104.43.164.21/32\",\r\n \"104.43.164.247/32\",\r\n \ - \ \"104.43.203.72/32\",\r\n \"104.208.21.0/26\",\r\n \"\ - 104.208.21.192/29\",\r\n \"104.208.22.0/26\",\r\n \"104.208.28.16/32\"\ - ,\r\n \"104.208.28.53/32\",\r\n \"2603:1030:10::320/123\"\ - ,\r\n \"2603:1030:10::380/121\",\r\n \"2603:1030:10:400::/123\"\ - ,\r\n \"2603:1030:10:401::/123\",\r\n \"2603:1030:10:800::/123\"\ - ,\r\n \"2603:1030:10:801::/123\",\r\n \"2603:1030:10:c00::/123\"\ - ,\r\n \"2603:1030:10:c01::/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"Sql.CentralUSEUAP\",\r\n \"id\": \"Sql.CentralUSEUAP\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"centraluseuap\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.46.11.32/27\",\r\n \"\ - 20.46.11.64/27\",\r\n \"20.46.11.128/26\",\r\n \"40.78.200.128/29\"\ - ,\r\n \"40.78.201.128/29\",\r\n \"52.180.176.154/31\",\r\ - \n \"52.180.183.226/32\",\r\n \"168.61.136.0/27\",\r\n \ - \ \"168.61.137.0/27\",\r\n \"2603:1030:f:1::280/123\",\r\n\ - \ \"2603:1030:f:2::200/121\",\r\n \"2603:1030:f:402::/122\"\ - ,\r\n \"2603:1030:f:403::/122\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"Sql.EastAsia\",\r\n \"id\": \"Sql.EastAsia\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"eastasia\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.75.32.0/26\",\r\n \"13.75.32.192/29\",\r\n\ - \ \"13.75.33.0/26\",\r\n \"13.75.33.192/29\",\r\n \ - \ \"13.75.105.141/32\",\r\n \"13.75.106.191/32\",\r\n \ - \ \"13.75.108.188/32\",\r\n \"20.195.72.32/27\",\r\n \"\ - 20.195.72.64/27\",\r\n \"20.195.72.128/26\",\r\n \"20.205.72.64/27\"\ - ,\r\n \"20.205.73.64/27\",\r\n \"20.205.77.176/29\",\r\n\ - \ \"20.205.77.200/29\",\r\n \"20.205.80.64/27\",\r\n \ - \ \"20.205.81.64/27\",\r\n \"20.205.83.224/29\",\r\n \ - \ \"23.97.68.51/32\",\r\n \"23.97.74.21/32\",\r\n \"\ - 23.97.78.163/32\",\r\n \"23.99.102.124/32\",\r\n \"23.99.118.196/32\"\ - ,\r\n \"52.175.33.150/32\",\r\n \"191.234.2.139/32\",\r\n\ - \ \"191.234.2.140/31\",\r\n \"191.234.2.142/32\",\r\n \ - \ \"207.46.139.82/32\",\r\n \"207.46.140.180/32\",\r\n \ - \ \"207.46.153.182/32\",\r\n \"2603:1040:207::280/123\",\r\n\ - \ \"2603:1040:207:1::200/121\",\r\n \"2603:1040:207:400::/123\"\ - ,\r\n \"2603:1040:207:401::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.EastUS\",\r\n \"id\": \"Sql.EastUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"eastus\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.42.65.64/29\",\r\n \"20.42.65.96/27\",\r\n\ - \ \"20.42.68.192/27\",\r\n \"20.42.69.0/25\",\r\n \ - \ \"20.42.73.0/29\",\r\n \"20.42.73.32/27\",\r\n \"20.42.74.192/27\"\ - ,\r\n \"20.42.75.0/25\",\r\n \"20.62.132.160/27\",\r\n \ - \ \"20.62.132.192/27\",\r\n \"20.62.133.0/26\",\r\n \ - \ \"23.96.89.109/32\",\r\n \"23.96.106.191/32\",\r\n \ - \ \"40.71.8.0/26\",\r\n \"40.71.8.192/26\",\r\n \"40.71.9.0/26\"\ - ,\r\n \"40.71.9.192/26\",\r\n \"40.71.83.113/32\",\r\n \ - \ \"40.71.196.33/32\",\r\n \"40.71.211.227/32\",\r\n \ - \ \"40.71.226.18/32\",\r\n \"40.76.2.172/32\",\r\n \ - \ \"40.76.26.90/32\",\r\n \"40.76.42.44/32\",\r\n \"40.76.65.222/32\"\ - ,\r\n \"40.76.66.9/32\",\r\n \"40.76.193.221/32\",\r\n \ - \ \"40.76.209.171/32\",\r\n \"40.76.219.185/32\",\r\n \ - \ \"40.78.224.0/26\",\r\n \"40.78.224.128/26\",\r\n \ - \ \"40.78.225.0/26\",\r\n \"40.78.225.128/26\",\r\n \"\ - 40.79.152.0/26\",\r\n \"40.79.152.192/26\",\r\n \"40.79.153.0/26\"\ - ,\r\n \"40.79.153.192/26\",\r\n \"40.114.40.118/32\",\r\n\ - \ \"40.114.43.106/32\",\r\n \"40.114.45.195/32\",\r\n \ - \ \"40.114.46.128/32\",\r\n \"40.114.46.212/32\",\r\n \ - \ \"40.114.81.142/32\",\r\n \"40.117.42.73/32\",\r\n \ - \ \"40.117.44.71/32\",\r\n \"40.117.90.115/32\",\r\n \"\ - 40.117.97.189/32\",\r\n \"40.121.143.204/32\",\r\n \"40.121.149.49/32\"\ - ,\r\n \"40.121.154.241/32\",\r\n \"40.121.158.30/32\",\r\ - \n \"52.168.116.64/29\",\r\n \"52.168.117.96/27\",\r\n \ - \ \"52.168.117.128/27\",\r\n \"52.168.117.160/29\",\r\n \ - \ \"52.168.118.0/25\",\r\n \"52.168.166.153/32\",\r\n \ - \ \"52.168.169.124/32\",\r\n \"52.168.183.223/32\",\r\n \ - \ \"52.170.41.199/32\",\r\n \"52.170.97.16/32\",\r\n \ - \ \"52.170.98.29/32\",\r\n \"52.179.16.95/32\",\r\n \"\ - 104.41.150.1/32\",\r\n \"104.41.152.74/32\",\r\n \"104.45.158.30/32\"\ - ,\r\n \"137.135.109.63/32\",\r\n \"191.237.20.112/32\",\r\ - \n \"191.237.82.74/32\",\r\n \"191.238.6.43/32\",\r\n \ - \ \"191.238.6.44/31\",\r\n \"191.238.6.46/32\",\r\n \ - \ \"2603:1030:210::320/123\",\r\n \"2603:1030:210::380/121\",\r\ - \n \"2603:1030:210:400::/123\",\r\n \"2603:1030:210:401::/123\"\ - ,\r\n \"2603:1030:210:800::/123\",\r\n \"2603:1030:210:801::/123\"\ - ,\r\n \"2603:1030:210:c00::/123\",\r\n \"2603:1030:210:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.EastUS2\"\ - ,\r\n \"id\": \"Sql.EastUS2\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.68.22.44/32\"\ - ,\r\n \"13.68.30.216/32\",\r\n \"13.68.87.133/32\",\r\n\ - \ \"20.36.144.128/27\",\r\n \"20.36.145.0/26\",\r\n \ - \ \"20.62.58.128/25\",\r\n \"23.102.206.35/32\",\r\n \ - \ \"23.102.206.36/31\",\r\n \"40.70.144.0/26\",\r\n \"\ - 40.70.144.192/29\",\r\n \"40.70.145.0/26\",\r\n \"40.79.84.180/32\"\ - ,\r\n \"40.84.5.64/32\",\r\n \"40.84.54.249/32\",\r\n \ - \ \"52.167.104.0/26\",\r\n \"52.167.104.192/29\",\r\n \ - \ \"52.167.104.224/27\",\r\n \"52.167.105.0/26\",\r\n \ - \ \"52.167.111.144/28\",\r\n \"52.167.111.192/27\",\r\n \ - \ \"52.167.117.226/32\",\r\n \"52.167.145.64/26\",\r\n \ - \ \"52.167.145.128/27\",\r\n \"52.177.185.181/32\",\r\n \ - \ \"52.177.197.103/32\",\r\n \"52.177.200.215/32\",\r\n \ - \ \"52.179.157.248/32\",\r\n \"52.179.165.160/32\",\r\n \ - \ \"52.179.167.70/32\",\r\n \"52.179.178.184/32\",\r\n \ - \ \"52.184.192.175/32\",\r\n \"52.184.231.0/32\",\r\n \"\ - 52.225.222.124/32\",\r\n \"104.46.100.189/32\",\r\n \"104.46.108.148/32\"\ - ,\r\n \"104.208.149.0/26\",\r\n \"104.208.150.0/26\",\r\n\ - \ \"104.208.150.192/29\",\r\n \"104.208.161.78/32\",\r\n\ - \ \"104.208.163.201/32\",\r\n \"104.208.233.240/32\",\r\n\ - \ \"104.208.238.55/32\",\r\n \"104.208.241.224/32\",\r\n\ - \ \"104.209.186.94/32\",\r\n \"191.239.224.107/32\",\r\n\ - \ \"191.239.224.108/31\",\r\n \"191.239.224.110/32\",\r\n\ - \ \"2603:1030:40c::320/123\",\r\n \"2603:1030:40c::380/121\"\ - ,\r\n \"2603:1030:40c:400::/123\",\r\n \"2603:1030:40c:401::/123\"\ - ,\r\n \"2603:1030:40c:800::/123\",\r\n \"2603:1030:40c:801::/123\"\ - ,\r\n \"2603:1030:40c:c00::/123\",\r\n \"2603:1030:40c:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.EastUS2EUAP\"\ - ,\r\n \"id\": \"Sql.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.51.17.160/27\"\ - ,\r\n \"20.51.17.192/27\",\r\n \"20.51.20.0/26\",\r\n \ - \ \"40.74.144.0/27\",\r\n \"40.74.144.32/29\",\r\n \ - \ \"40.74.145.0/27\",\r\n \"40.74.145.32/29\",\r\n \"\ - 40.75.32.0/27\",\r\n \"40.75.32.40/29\",\r\n \"40.75.33.0/27\"\ - ,\r\n \"40.75.33.32/29\",\r\n \"52.138.88.0/27\",\r\n \ - \ \"52.138.88.32/29\",\r\n \"52.138.89.0/27\",\r\n \ - \ \"52.138.89.32/29\",\r\n \"52.225.188.46/32\",\r\n \"\ - 52.225.188.113/32\",\r\n \"2603:1030:40b:2::200/123\",\r\n \ - \ \"2603:1030:40b:2::280/121\",\r\n \"2603:1030:40b:402::/122\"\ - ,\r\n \"2603:1030:40b:403::/122\",\r\n \"2603:1030:40b:802::/122\"\ - ,\r\n \"2603:1030:40b:803::/122\",\r\n \"2603:1030:40b:c02::/122\"\ - ,\r\n \"2603:1030:40b:c03::/122\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.EastUS2Stage\",\r\n \"id\": \"\ - Sql.EastUS2Stage\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\"\ - : \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\"\ - ,\r\n \"addressPrefixes\": [\r\n \"137.116.31.224/27\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.FranceCentral\"\ - ,\r\n \"id\": \"Sql.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.43.47.192/26\"\ - ,\r\n \"40.79.128.0/27\",\r\n \"40.79.128.32/29\",\r\n \ - \ \"40.79.129.0/27\",\r\n \"40.79.136.0/27\",\r\n \ - \ \"40.79.136.32/29\",\r\n \"40.79.137.0/27\",\r\n \"\ - 40.79.144.0/27\",\r\n \"40.79.144.32/29\",\r\n \"40.79.145.0/27\"\ - ,\r\n \"51.138.210.0/26\",\r\n \"2603:1020:805::320/123\"\ - ,\r\n \"2603:1020:805::380/121\",\r\n \"2603:1020:805:400::/123\"\ - ,\r\n \"2603:1020:805:401::/123\",\r\n \"2603:1020:805:800::/123\"\ - ,\r\n \"2603:1020:805:801::/123\",\r\n \"2603:1020:805:c00::/123\"\ - ,\r\n \"2603:1020:805:c01::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.FranceSouth\",\r\n \"id\": \"\ - Sql.FranceSouth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"\ - properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\"\ - : \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\"\ - ,\r\n \"addressPrefixes\": [\r\n \"40.79.176.0/27\",\r\n \ - \ \"40.79.176.40/29\",\r\n \"40.79.177.0/27\",\r\n \ - \ \"40.79.177.32/29\",\r\n \"52.136.185.0/25\",\r\n \"\ - 2603:1020:905::280/123\",\r\n \"2603:1020:905:1::200/121\",\r\n \ - \ \"2603:1020:905:400::/123\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"Sql.GermanyNorth\",\r\n \"id\": \"Sql.GermanyNorth\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"germanyn\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"51.116.54.96/27\",\r\n \"51.116.54.128/27\",\r\ - \n \"51.116.54.192/26\",\r\n \"51.116.56.0/27\",\r\n \ - \ \"51.116.57.0/27\",\r\n \"51.116.57.32/29\",\r\n \ - \ \"2603:1020:d04::280/123\",\r\n \"2603:1020:d04:1::200/121\",\r\ - \n \"2603:1020:d04:400::/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"Sql.GermanyWestCentral\",\r\n \"id\": \"\ - Sql.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\"\ - ,\r\n \"addressPrefixes\": [\r\n \"51.116.149.32/27\",\r\n\ - \ \"51.116.149.64/27\",\r\n \"51.116.149.128/26\",\r\n \ - \ \"51.116.152.0/27\",\r\n \"51.116.152.32/29\",\r\n \ - \ \"51.116.153.0/27\",\r\n \"51.116.240.0/27\",\r\n \ - \ \"51.116.240.32/29\",\r\n \"51.116.241.0/27\",\r\n \"\ - 51.116.248.0/27\",\r\n \"51.116.248.32/29\",\r\n \"51.116.249.0/27\"\ - ,\r\n \"2603:1020:c04::320/123\",\r\n \"2603:1020:c04::380/121\"\ - ,\r\n \"2603:1020:c04:400::/123\",\r\n \"2603:1020:c04:401::/123\"\ - ,\r\n \"2603:1020:c04:800::/123\",\r\n \"2603:1020:c04:801::/123\"\ - ,\r\n \"2603:1020:c04:c00::/123\",\r\n \"2603:1020:c04:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.JapanEast\"\ - ,\r\n \"id\": \"Sql.JapanEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.78.61.196/32\"\ - ,\r\n \"13.78.104.0/27\",\r\n \"13.78.104.32/29\",\r\n \ - \ \"13.78.105.0/27\",\r\n \"13.78.121.203/32\",\r\n \ - \ \"20.89.1.64/27\",\r\n \"20.191.165.160/27\",\r\n \ - \ \"20.191.165.192/27\",\r\n \"20.191.166.0/26\",\r\n \"\ - 20.194.129.64/27\",\r\n \"23.102.69.95/32\",\r\n \"23.102.71.13/32\"\ - ,\r\n \"23.102.74.190/32\",\r\n \"40.79.184.0/27\",\r\n\ - \ \"40.79.184.32/29\",\r\n \"40.79.185.0/27\",\r\n \ - \ \"40.79.191.224/27\",\r\n \"40.79.192.0/27\",\r\n \ - \ \"40.79.192.32/29\",\r\n \"40.79.193.0/27\",\r\n \"52.185.152.149/32\"\ - ,\r\n \"52.243.32.19/32\",\r\n \"52.243.43.186/32\",\r\n\ - \ \"104.41.168.103/32\",\r\n \"104.41.169.34/32\",\r\n \ - \ \"191.237.240.43/32\",\r\n \"191.237.240.44/32\",\r\n \ - \ \"191.237.240.46/32\",\r\n \"2603:1040:407::320/123\",\r\ - \n \"2603:1040:407::380/121\",\r\n \"2603:1040:407:400::/123\"\ - ,\r\n \"2603:1040:407:401::/123\",\r\n \"2603:1040:407:800::/123\"\ - ,\r\n \"2603:1040:407:801::/123\",\r\n \"2603:1040:407:c00::/123\"\ - ,\r\n \"2603:1040:407:c01::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.JapanWest\",\r\n \"id\": \"Sql.JapanWest\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"japanwest\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.189.225.160/27\",\r\n \"20.189.225.192/27\"\ - ,\r\n \"20.189.228.0/26\",\r\n \"40.74.96.0/27\",\r\n \ - \ \"40.74.96.32/29\",\r\n \"40.74.97.0/27\",\r\n \ - \ \"40.74.114.22/32\",\r\n \"40.74.115.153/32\",\r\n \"\ - 40.74.135.185/32\",\r\n \"104.214.148.156/32\",\r\n \"104.214.150.17/32\"\ - ,\r\n \"191.238.68.11/32\",\r\n \"191.238.68.12/31\",\r\n\ - \ \"191.238.68.14/32\",\r\n \"2603:1040:606::280/123\",\r\ - \n \"2603:1040:606:1::200/121\",\r\n \"2603:1040:606:400::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.JioIndiaCentral\"\ - ,\r\n \"id\": \"Sql.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.192.48.32/27\"\ - ,\r\n \"20.192.48.64/27\",\r\n \"20.192.48.128/26\",\r\n\ - \ \"20.192.232.0/27\",\r\n \"20.192.233.0/27\",\r\n \ - \ \"20.192.233.32/29\",\r\n \"2603:1040:1104::500/123\",\r\n\ - \ \"2603:1040:1104:1::300/121\",\r\n \"2603:1040:1104:400::440/123\"\ - ,\r\n \"2603:1040:1104:402::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.JioIndiaWest\",\r\n \"id\": \"\ - Sql.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n \ - \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\"\ - : \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.192.167.224/27\",\r\n\ - \ \"20.193.192.0/27\",\r\n \"20.193.192.64/26\",\r\n \ - \ \"20.193.200.0/27\",\r\n \"20.193.200.32/29\",\r\n \ - \ \"20.193.201.0/27\",\r\n \"2603:1040:d04:1::520/123\",\r\n \ - \ \"2603:1040:d04:1::580/121\",\r\n \"2603:1040:d04:400::400/123\"\ - ,\r\n \"2603:1040:d04:402::/123\",\r\n \"2603:1040:d04:403::/123\"\ - ,\r\n \"2603:1040:d04:802::/123\",\r\n \"2603:1040:d04:803::/123\"\ - ,\r\n \"2603:1040:d04:c03::/123\",\r\n \"2603:1040:d04:c04::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.KoreaCentral\"\ - ,\r\n \"id\": \"Sql.KoreaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.44.24.0/27\"\ - ,\r\n \"20.44.24.32/29\",\r\n \"20.44.25.0/27\",\r\n \ - \ \"20.194.64.0/27\",\r\n \"20.194.64.32/29\",\r\n \ - \ \"20.194.65.0/27\",\r\n \"20.194.73.64/26\",\r\n \"20.194.73.128/26\"\ - ,\r\n \"20.194.80.192/27\",\r\n \"52.231.16.0/27\",\r\n\ - \ \"52.231.16.32/29\",\r\n \"52.231.17.0/27\",\r\n \ - \ \"52.231.32.42/31\",\r\n \"52.231.39.56/32\",\r\n \ - \ \"2603:1040:f05::320/123\",\r\n \"2603:1040:f05::380/121\",\r\n\ - \ \"2603:1040:f05:400::/123\",\r\n \"2603:1040:f05:401::/123\"\ - ,\r\n \"2603:1040:f05:800::/123\",\r\n \"2603:1040:f05:801::/123\"\ - ,\r\n \"2603:1040:f05:c00::/123\",\r\n \"2603:1040:f05:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.KoreaSouth\"\ - ,\r\n \"id\": \"Sql.KoreaSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"52.147.112.160/27\"\ - ,\r\n \"52.231.144.0/27\",\r\n \"52.231.145.0/27\",\r\n\ - \ \"52.231.151.96/27\",\r\n \"52.231.200.86/31\",\r\n \ - \ \"52.231.206.133/32\",\r\n \"2603:1040:e05::/123\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.NorthCentralUS\"\ - ,\r\n \"id\": \"Sql.NorthCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.49.119.32/27\"\ - ,\r\n \"20.49.119.64/27\",\r\n \"20.49.119.128/26\",\r\n\ - \ \"23.96.178.199/32\",\r\n \"23.96.202.229/32\",\r\n \ - \ \"23.96.204.249/32\",\r\n \"23.96.205.215/32\",\r\n \ - \ \"23.96.214.69/32\",\r\n \"23.96.243.243/32\",\r\n \ - \ \"23.96.247.75/32\",\r\n \"23.96.249.37/32\",\r\n \"\ - 23.96.250.178/32\",\r\n \"23.98.55.75/32\",\r\n \"23.101.165.167/32\"\ - ,\r\n \"23.101.167.45/32\",\r\n \"23.101.170.98/32\",\r\n\ - \ \"52.162.104.0/26\",\r\n \"52.162.105.0/26\",\r\n \ - \ \"52.162.105.192/28\",\r\n \"52.162.125.1/32\",\r\n \ - \ \"52.162.241.250/32\",\r\n \"65.52.208.91/32\",\r\n \ - \ \"65.52.213.108/32\",\r\n \"65.52.214.127/32\",\r\n \"\ - 65.52.218.82/32\",\r\n \"157.55.208.150/32\",\r\n \"168.62.232.188/32\"\ - ,\r\n \"168.62.235.49/32\",\r\n \"168.62.235.241/32\",\r\ - \n \"168.62.239.29/32\",\r\n \"191.236.148.44/32\",\r\n\ - \ \"191.236.153.120/32\",\r\n \"2603:1030:608::280/123\"\ - ,\r\n \"2603:1030:608:1::200/121\",\r\n \"2603:1030:608:400::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.NorthCentralUSStage\"\ - ,\r\n \"id\": \"Sql.NorthCentralUSStage\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"168.62.115.112/28\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.NorthEurope\"\ - ,\r\n \"id\": \"Sql.NorthEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.69.224.0/26\"\ - ,\r\n \"13.69.224.192/26\",\r\n \"13.69.225.0/26\",\r\n\ - \ \"13.69.225.192/26\",\r\n \"13.69.233.136/29\",\r\n \ - \ \"13.74.104.64/26\",\r\n \"13.74.104.128/26\",\r\n \ - \ \"13.74.105.0/26\",\r\n \"13.74.105.128/26\",\r\n \ - \ \"13.74.105.192/29\",\r\n \"20.50.73.32/27\",\r\n \"23.102.16.130/32\"\ - ,\r\n \"23.102.23.219/32\",\r\n \"23.102.25.199/32\",\r\n\ - \ \"23.102.52.155/32\",\r\n \"23.102.57.142/32\",\r\n \ - \ \"23.102.62.171/32\",\r\n \"40.85.102.50/32\",\r\n \ - \ \"40.113.14.53/32\",\r\n \"40.113.16.190/32\",\r\n \ - \ \"40.113.17.148/32\",\r\n \"40.113.20.38/32\",\r\n \"\ - 40.113.93.91/32\",\r\n \"40.127.128.10/32\",\r\n \"40.127.135.67/32\"\ - ,\r\n \"40.127.137.209/32\",\r\n \"40.127.141.194/32\",\r\ - \n \"40.127.177.139/32\",\r\n \"40.127.190.50/32\",\r\n\ - \ \"52.138.224.0/26\",\r\n \"52.138.224.128/26\",\r\n \ - \ \"52.138.225.0/26\",\r\n \"52.138.225.128/26\",\r\n \ - \ \"52.138.229.72/29\",\r\n \"52.146.133.128/25\",\r\n \ - \ \"65.52.225.245/32\",\r\n \"65.52.226.209/32\",\r\n \ - \ \"104.41.202.30/32\",\r\n \"104.41.205.195/32\",\r\n \ - \ \"104.41.208.104/32\",\r\n \"104.41.210.68/32\",\r\n \ - \ \"104.41.211.98/32\",\r\n \"137.135.186.126/32\",\r\n \ - \ \"137.135.189.158/32\",\r\n \"137.135.205.85/32\",\r\n \ - \ \"137.135.213.9/32\",\r\n \"138.91.48.99/32\",\r\n \"\ - 138.91.58.227/32\",\r\n \"191.235.170.58/32\",\r\n \"191.235.193.75/32\"\ - ,\r\n \"191.235.193.76/31\",\r\n \"191.235.193.78/32\",\r\ - \n \"191.235.193.139/32\",\r\n \"191.235.193.140/31\",\r\ - \n \"191.235.209.79/32\",\r\n \"191.237.219.202/32\",\r\n\ - \ \"2603:1020:5::320/123\",\r\n \"2603:1020:5::380/121\"\ - ,\r\n \"2603:1020:5:400::/123\",\r\n \"2603:1020:5:401::/123\"\ - ,\r\n \"2603:1020:5:800::/123\",\r\n \"2603:1020:5:801::/123\"\ - ,\r\n \"2603:1020:5:c00::/123\",\r\n \"2603:1020:5:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.NorwayEast\"\ - ,\r\n \"id\": \"Sql.NorwayEast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"51.120.96.0/27\"\ - ,\r\n \"51.120.96.32/29\",\r\n \"51.120.97.0/27\",\r\n \ - \ \"51.120.104.0/27\",\r\n \"51.120.104.32/29\",\r\n \ - \ \"51.120.105.0/27\",\r\n \"51.120.208.0/27\",\r\n \ - \ \"51.120.208.32/29\",\r\n \"51.120.209.0/27\",\r\n \"\ - 51.120.232.192/26\",\r\n \"51.120.233.0/26\",\r\n \"2603:1020:e04::320/123\"\ - ,\r\n \"2603:1020:e04::380/121\",\r\n \"2603:1020:e04:400::/123\"\ - ,\r\n \"2603:1020:e04:401::/123\",\r\n \"2603:1020:e04:800::/123\"\ - ,\r\n \"2603:1020:e04:801::/123\",\r\n \"2603:1020:e04:c00::/123\"\ - ,\r\n \"2603:1020:e04:c01::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.NorwayWest\",\r\n \"id\": \"Sql.NorwayWest\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"norwayw\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"51.13.136.224/27\",\r\n \"51.13.137.0/27\",\r\n\ - \ \"51.13.137.64/26\",\r\n \"51.120.216.0/27\",\r\n \ - \ \"51.120.217.0/27\",\r\n \"51.120.217.32/29\",\r\n \ - \ \"2603:1020:f04::280/123\",\r\n \"2603:1020:f04:1::200/121\"\ - ,\r\n \"2603:1020:f04:400::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.SouthAfricaNorth\",\r\n \"id\"\ - : \"Sql.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"102.37.160.0/27\"\ - ,\r\n \"102.37.160.64/26\",\r\n \"102.133.120.0/27\",\r\n\ - \ \"102.133.120.32/29\",\r\n \"102.133.121.0/27\",\r\n \ - \ \"102.133.152.0/27\",\r\n \"102.133.152.32/29\",\r\n \ - \ \"102.133.153.0/27\",\r\n \"102.133.221.224/27\",\r\n \ - \ \"102.133.248.0/27\",\r\n \"102.133.248.32/29\",\r\n \ - \ \"102.133.249.0/27\",\r\n \"2603:1000:104::640/123\",\r\n\ - \ \"2603:1000:104::680/121\",\r\n \"2603:1000:104:400::/123\"\ - ,\r\n \"2603:1000:104:401::/123\",\r\n \"2603:1000:104:800::/123\"\ - ,\r\n \"2603:1000:104:801::/123\",\r\n \"2603:1000:104:c00::/123\"\ - ,\r\n \"2603:1000:104:c01::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.SouthAfricaWest\",\r\n \"id\"\ - : \"Sql.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": \"74\",\r\n\ - \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"\ - region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n \"\ - networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"102.37.80.96/27\"\ - ,\r\n \"102.37.80.128/27\",\r\n \"102.37.80.192/26\",\r\n\ - \ \"102.133.24.0/27\",\r\n \"102.133.25.0/27\",\r\n \ - \ \"102.133.25.32/29\",\r\n \"2603:1000:4::280/123\",\r\n \ - \ \"2603:1000:4:1::200/121\",\r\n \"2603:1000:4:400::/123\"\ - ,\r\n \"2603:1000:4:401::/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"Sql.SouthCentralUS\",\r\n \"id\": \"Sql.SouthCentralUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"southcentralus\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.65.31.249/32\",\r\n \"\ - 13.65.39.207/32\",\r\n \"13.65.85.183/32\",\r\n \"13.65.200.105/32\"\ - ,\r\n \"13.65.209.243/32\",\r\n \"13.65.253.67/32\",\r\n\ - \ \"13.66.60.72/32\",\r\n \"13.66.60.111/32\",\r\n \ - \ \"13.66.62.124/32\",\r\n \"13.84.223.76/32\",\r\n \ - \ \"13.85.65.48/32\",\r\n \"13.85.68.115/32\",\r\n \"13.85.69.107/32\"\ - ,\r\n \"20.45.120.0/27\",\r\n \"20.45.121.0/27\",\r\n \ - \ \"20.45.121.32/29\",\r\n \"20.49.88.0/27\",\r\n \ - \ \"20.49.88.32/29\",\r\n \"20.49.89.0/27\",\r\n \"20.49.89.32/29\"\ - ,\r\n \"20.65.132.160/27\",\r\n \"20.65.132.192/27\",\r\n\ - \ \"20.65.133.0/26\",\r\n \"23.98.162.75/32\",\r\n \ - \ \"23.98.162.76/31\",\r\n \"23.98.162.78/32\",\r\n \ - \ \"23.98.170.75/32\",\r\n \"23.98.170.76/31\",\r\n \"23.102.172.251/32\"\ - ,\r\n \"23.102.173.220/32\",\r\n \"23.102.174.146/32\",\r\ - \n \"23.102.179.187/32\",\r\n \"40.74.254.156/32\",\r\n\ - \ \"40.84.153.95/32\",\r\n \"40.84.155.210/32\",\r\n \ - \ \"40.84.156.165/32\",\r\n \"40.84.191.1/32\",\r\n \ - \ \"40.84.193.16/32\",\r\n \"40.84.195.189/32\",\r\n \"\ - 40.84.231.203/32\",\r\n \"40.124.8.76/32\",\r\n \"40.124.64.136/29\"\ - ,\r\n \"40.124.64.160/27\",\r\n \"40.124.65.128/27\",\r\n\ - \ \"52.171.56.10/32\",\r\n \"52.183.250.62/32\",\r\n \ - \ \"104.214.16.0/26\",\r\n \"104.214.16.192/26\",\r\n \ - \ \"104.214.17.0/26\",\r\n \"104.214.17.192/26\",\r\n \ - \ \"104.214.67.25/32\",\r\n \"104.214.73.137/32\",\r\n \ - \ \"104.214.78.242/32\",\r\n \"191.238.224.203/32\",\r\n \ - \ \"191.238.230.40/32\",\r\n \"2603:1030:807::320/123\",\r\n \ - \ \"2603:1030:807::380/121\",\r\n \"2603:1030:807:400::/123\"\ - ,\r\n \"2603:1030:807:401::/123\",\r\n \"2603:1030:807:800::/123\"\ - ,\r\n \"2603:1030:807:801::/123\",\r\n \"2603:1030:807:c00::/123\"\ - ,\r\n \"2603:1030:807:c01::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.SouthCentralUSSTG\",\r\n \"id\"\ - : \"Sql.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"\ - region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.44.0.0/27\",\r\n \ - \ \"20.44.1.0/27\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"Sql.SoutheastAsia\",\r\n \"id\": \"Sql.SoutheastAsia\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"southeastasia\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.67.16.0/26\",\r\n \"13.67.16.192/29\"\ - ,\r\n \"13.67.17.0/26\",\r\n \"13.67.48.255/32\",\r\n \ - \ \"13.67.56.134/32\",\r\n \"13.67.59.217/32\",\r\n \ - \ \"13.76.90.3/32\",\r\n \"13.76.247.54/32\",\r\n \"\ - 20.195.65.32/27\",\r\n \"20.195.65.64/27\",\r\n \"20.195.65.128/26\"\ - ,\r\n \"23.98.80.0/26\",\r\n \"23.98.80.192/29\",\r\n \ - \ \"23.98.81.0/26\",\r\n \"23.100.117.95/32\",\r\n \ - \ \"23.100.119.70/32\",\r\n \"23.101.18.228/32\",\r\n \ - \ \"40.78.232.0/26\",\r\n \"40.78.232.192/29\",\r\n \"40.78.233.0/26\"\ - ,\r\n \"52.187.15.214/32\",\r\n \"52.187.76.130/32\",\r\n\ - \ \"104.43.10.74/32\",\r\n \"104.43.15.0/32\",\r\n \ - \ \"104.215.195.14/32\",\r\n \"104.215.196.52/32\",\r\n \ - \ \"111.221.106.161/32\",\r\n \"137.116.129.110/32\",\r\n \ - \ \"168.63.175.68/32\",\r\n \"2603:1040:5::420/123\",\r\n \ - \ \"2603:1040:5::480/121\",\r\n \"2603:1040:5:400::/123\"\ - ,\r\n \"2603:1040:5:401::/123\",\r\n \"2603:1040:5:800::/123\"\ - ,\r\n \"2603:1040:5:801::/123\",\r\n \"2603:1040:5:c00::/123\"\ - ,\r\n \"2603:1040:5:c01::/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"Sql.SouthIndia\",\r\n \"id\": \"Sql.SouthIndia\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"southindia\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"40.78.192.0/27\",\r\n \"40.78.192.32/29\",\r\n\ - \ \"40.78.193.0/27\",\r\n \"40.78.193.32/29\",\r\n \ - \ \"52.172.24.47/32\",\r\n \"52.172.43.208/32\",\r\n \ - \ \"52.172.113.96/27\",\r\n \"52.172.113.128/27\",\r\n \ - \ \"52.172.113.192/26\",\r\n \"104.211.224.146/31\",\r\n \ - \ \"2603:1040:c06::280/123\",\r\n \"2603:1040:c06:1::200/121\",\r\ - \n \"2603:1040:c06:400::/123\",\r\n \"2603:1040:c06:401::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.SwedenCentral\"\ - ,\r\n \"id\": \"Sql.SwedenCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"51.12.46.32/27\"\ - ,\r\n \"51.12.46.64/27\",\r\n \"51.12.46.128/26\",\r\n \ - \ \"51.12.96.0/27\",\r\n \"51.12.96.32/29\",\r\n \ - \ \"51.12.97.0/27\",\r\n \"51.12.224.0/27\",\r\n \"51.12.224.32/29\"\ - ,\r\n \"51.12.225.0/27\",\r\n \"51.12.232.0/27\",\r\n \ - \ \"51.12.232.32/29\",\r\n \"51.12.233.0/27\",\r\n \ - \ \"2603:1020:1004:1::520/123\",\r\n \"2603:1020:1004:1::580/121\"\ - ,\r\n \"2603:1020:1004:400::400/123\",\r\n \"2603:1020:1004:402::/123\"\ - ,\r\n \"2603:1020:1004:403::/123\",\r\n \"2603:1020:1004:802::/123\"\ - ,\r\n \"2603:1020:1004:803::/123\",\r\n \"2603:1020:1004:c03::/123\"\ - ,\r\n \"2603:1020:1004:c04::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.SwitzerlandNorth\",\r\n \"id\"\ - : \"Sql.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"\ - region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"AzureSQL\"\ - ,\r\n \"addressPrefixes\": [\r\n \"20.208.16.64/27\",\r\n\ - \ \"20.208.17.64/27\",\r\n \"20.208.19.192/29\",\r\n \ - \ \"51.103.200.64/27\",\r\n \"51.103.201.64/27\",\r\n \ - \ \"51.103.203.192/29\",\r\n \"51.107.56.0/27\",\r\n \ - \ \"51.107.56.32/29\",\r\n \"51.107.57.0/27\",\r\n \"51.107.242.32/27\"\ - ,\r\n \"51.107.242.64/27\",\r\n \"51.107.242.128/26\",\r\ - \n \"2603:1020:a04::320/123\",\r\n \"2603:1020:a04::380/121\"\ - ,\r\n \"2603:1020:a04:400::/123\",\r\n \"2603:1020:a04:401::/123\"\ - ,\r\n \"2603:1020:a04:800::/123\",\r\n \"2603:1020:a04:801::/123\"\ - ,\r\n \"2603:1020:a04:c00::/123\",\r\n \"2603:1020:a04:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.SwitzerlandWest\"\ - ,\r\n \"id\": \"Sql.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"51.107.152.0/27\"\ - ,\r\n \"51.107.153.0/27\",\r\n \"51.107.153.32/29\",\r\n\ - \ \"51.107.250.64/26\",\r\n \"51.107.250.128/26\",\r\n \ - \ \"2603:1020:b04::280/123\",\r\n \"2603:1020:b04:1::200/121\"\ - ,\r\n \"2603:1020:b04:400::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.UAECentral\",\r\n \"id\": \"Sql.UAECentral\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"uaecentral\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.37.71.64/26\",\r\n \"20.37.71.128/26\",\r\n\ - \ \"20.37.72.64/27\",\r\n \"20.37.72.96/29\",\r\n \ - \ \"20.37.73.64/27\",\r\n \"20.37.73.96/29\",\r\n \"\ - 2603:1040:b04::280/123\",\r\n \"2603:1040:b04:1::200/121\",\r\n \ - \ \"2603:1040:b04:400::/123\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"Sql.UAENorth\",\r\n \"id\": \"Sql.UAENorth\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"uaenorth\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.38.143.64/26\",\r\n \"20.38.143.128/26\",\r\ - \n \"20.38.152.24/29\",\r\n \"40.120.72.0/27\",\r\n \ - \ \"40.120.72.32/29\",\r\n \"40.120.73.0/27\",\r\n \ - \ \"65.52.248.0/27\",\r\n \"65.52.248.32/29\",\r\n \"65.52.249.0/27\"\ - ,\r\n \"2603:1040:904::320/123\",\r\n \"2603:1040:904::380/121\"\ - ,\r\n \"2603:1040:904:400::/123\",\r\n \"2603:1040:904:401::/123\"\ - ,\r\n \"2603:1040:904:800::/123\",\r\n \"2603:1040:904:801::/123\"\ - ,\r\n \"2603:1040:904:c00::/123\",\r\n \"2603:1040:904:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.UKSouth\"\ - ,\r\n \"id\": \"Sql.UKSouth\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \ - \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"51.105.64.0/27\"\ - ,\r\n \"51.105.64.32/29\",\r\n \"51.105.65.0/27\",\r\n \ - \ \"51.105.72.0/27\",\r\n \"51.105.72.32/29\",\r\n \ - \ \"51.105.73.0/27\",\r\n \"51.132.193.64/27\",\r\n \"\ - 51.140.77.9/32\",\r\n \"51.140.114.26/32\",\r\n \"51.140.115.150/32\"\ - ,\r\n \"51.140.144.0/27\",\r\n \"51.140.144.32/29\",\r\n\ - \ \"51.140.145.0/27\",\r\n \"51.140.151.128/27\",\r\n \ - \ \"51.140.180.9/32\",\r\n \"51.140.183.238/32\",\r\n \ - \ \"51.140.184.11/32\",\r\n \"51.140.184.12/32\",\r\n \ - \ \"51.143.209.224/27\",\r\n \"51.143.212.0/27\",\r\n \ - \ \"51.143.212.64/26\",\r\n \"2603:1020:705::320/123\",\r\n \ - \ \"2603:1020:705::380/121\",\r\n \"2603:1020:705:400::/123\"\ - ,\r\n \"2603:1020:705:401::/123\",\r\n \"2603:1020:705:800::/123\"\ - ,\r\n \"2603:1020:705:801::/123\",\r\n \"2603:1020:705:c00::/123\"\ - ,\r\n \"2603:1020:705:c01::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.UKWest\",\r\n \"id\": \"Sql.UKWest\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"ukwest\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"20.58.66.128/25\",\r\n \"20.58.68.56/30\",\r\n\ - \ \"51.140.208.64/27\",\r\n \"51.140.208.96/29\",\r\n \ - \ \"51.140.209.0/27\",\r\n \"51.140.209.32/29\",\r\n \ - \ \"51.141.8.11/32\",\r\n \"51.141.8.12/32\",\r\n \"\ - 51.141.15.53/32\",\r\n \"51.141.25.212/32\",\r\n \"2603:1020:605::280/123\"\ - ,\r\n \"2603:1020:605:1::200/121\",\r\n \"2603:1020:605:400::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.WestCentralUS\"\ - ,\r\n \"id\": \"Sql.WestCentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.71.192.0/27\"\ - ,\r\n \"13.71.193.0/27\",\r\n \"13.71.193.32/29\",\r\n \ - \ \"13.78.144.57/32\",\r\n \"13.78.145.25/32\",\r\n \ - \ \"13.78.148.71/32\",\r\n \"13.78.151.189/32\",\r\n \ - \ \"13.78.151.207/32\",\r\n \"13.78.178.116/32\",\r\n \"\ - 13.78.178.151/32\",\r\n \"13.78.248.32/27\",\r\n \"20.69.0.32/27\"\ - ,\r\n \"20.69.0.64/27\",\r\n \"20.69.0.128/26\",\r\n \ - \ \"52.161.15.204/32\",\r\n \"52.161.100.158/32\",\r\n \ - \ \"52.161.105.228/32\",\r\n \"52.161.128.32/27\",\r\n \ - \ \"2603:1030:b04::280/123\",\r\n \"2603:1030:b04:1::200/121\"\ - ,\r\n \"2603:1030:b04:400::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.WestEurope\",\r\n \"id\": \"Sql.WestEurope\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"westeurope\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.69.104.0/26\",\r\n \"13.69.104.192/26\",\r\n\ - \ \"13.69.105.0/26\",\r\n \"13.69.105.192/26\",\r\n \ - \ \"13.69.111.32/27\",\r\n \"13.69.112.168/29\",\r\n \ - \ \"13.69.116.64/27\",\r\n \"13.69.116.96/30\",\r\n \"\ - 13.69.116.128/25\",\r\n \"20.50.201.224/27\",\r\n \"20.50.202.0/26\"\ - ,\r\n \"20.61.99.192/26\",\r\n \"20.61.102.0/26\",\r\n \ - \ \"23.97.167.46/32\",\r\n \"23.97.169.19/32\",\r\n \ - \ \"23.97.219.82/32\",\r\n \"23.97.221.176/32\",\r\n \ - \ \"23.101.64.10/32\",\r\n \"40.68.37.158/32\",\r\n \"\ - 40.68.215.206/32\",\r\n \"40.68.220.16/32\",\r\n \"40.74.51.145/32\"\ - ,\r\n \"40.74.53.36/32\",\r\n \"40.74.60.91/32\",\r\n \ - \ \"40.114.240.125/32\",\r\n \"40.114.240.162/32\",\r\n \ - \ \"40.115.37.61/32\",\r\n \"40.115.51.118/32\",\r\n \ - \ \"40.115.52.141/32\",\r\n \"40.115.53.255/32\",\r\n \ - \ \"40.115.61.208/32\",\r\n \"40.118.12.208/32\",\r\n \ - \ \"52.166.76.0/32\",\r\n \"52.166.131.195/32\",\r\n \"\ - 52.178.17.192/27\",\r\n \"52.178.21.0/26\",\r\n \"52.178.21.64/27\"\ - ,\r\n \"52.236.184.0/27\",\r\n \"52.236.184.32/29\",\r\n\ - \ \"52.236.184.128/25\",\r\n \"52.236.185.0/27\",\r\n \ - \ \"52.236.185.128/25\",\r\n \"104.40.155.247/32\",\r\n \ - \ \"104.40.168.64/26\",\r\n \"104.40.168.192/26\",\r\n \ - \ \"104.40.169.0/27\",\r\n \"104.40.169.32/29\",\r\n \ - \ \"104.40.169.128/25\",\r\n \"104.40.180.164/32\",\r\n \ - \ \"104.40.220.28/32\",\r\n \"104.40.230.18/32\",\r\n \ - \ \"104.40.232.54/32\",\r\n \"104.40.237.111/32\",\r\n \ - \ \"104.45.11.99/32\",\r\n \"104.45.14.115/32\",\r\n \"\ - 104.46.38.143/32\",\r\n \"104.46.40.24/32\",\r\n \"104.47.157.97/32\"\ - ,\r\n \"137.116.203.91/32\",\r\n \"168.63.13.214/32\",\r\ - \n \"168.63.98.91/32\",\r\n \"191.233.69.227/32\",\r\n \ - \ \"191.233.90.117/32\",\r\n \"191.237.232.75/32\",\r\n \ - \ \"191.237.232.76/31\",\r\n \"191.237.232.78/32\",\r\n \ - \ \"191.237.232.235/32\",\r\n \"191.237.232.236/31\",\r\n\ - \ \"2603:1020:206::320/123\",\r\n \"2603:1020:206::380/121\"\ - ,\r\n \"2603:1020:206:400::/123\",\r\n \"2603:1020:206:401::/123\"\ - ,\r\n \"2603:1020:206:800::/123\",\r\n \"2603:1020:206:801::/123\"\ - ,\r\n \"2603:1020:206:c00::/123\",\r\n \"2603:1020:206:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.WestIndia\"\ - ,\r\n \"id\": \"Sql.WestIndia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"52.136.53.160/27\"\ - ,\r\n \"52.136.53.192/27\",\r\n \"104.211.144.0/27\",\r\n\ - \ \"104.211.144.32/29\",\r\n \"104.211.145.0/27\",\r\n \ - \ \"104.211.145.32/29\",\r\n \"104.211.160.80/31\",\r\n \ - \ \"104.211.185.58/32\",\r\n \"104.211.190.46/32\",\r\n \ - \ \"2603:1040:806::280/123\",\r\n \"2603:1040:806:1::200/121\"\ - ,\r\n \"2603:1040:806:400::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"Sql.WestUS\",\r\n \"id\": \"Sql.WestUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"westus\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.86.216.0/25\",\r\n \"13.86.216.128/26\",\r\n\ - \ \"13.86.216.192/27\",\r\n \"13.86.217.0/25\",\r\n \ - \ \"13.86.217.128/26\",\r\n \"13.86.217.192/27\",\r\n \ - \ \"13.86.217.224/29\",\r\n \"13.88.14.200/32\",\r\n \ - \ \"13.88.29.70/32\",\r\n \"13.91.4.219/32\",\r\n \"13.91.6.136/32\"\ - ,\r\n \"13.91.41.153/32\",\r\n \"13.91.44.56/32\",\r\n \ - \ \"13.91.46.83/32\",\r\n \"13.91.47.72/32\",\r\n \ - \ \"13.93.165.251/32\",\r\n \"13.93.237.158/32\",\r\n \ - \ \"20.66.3.64/26\",\r\n \"20.66.3.128/26\",\r\n \"20.189.172.224/27\"\ - ,\r\n \"23.99.4.210/32\",\r\n \"23.99.4.248/32\",\r\n \ - \ \"23.99.10.185/32\",\r\n \"23.99.34.75/32\",\r\n \ - \ \"23.99.34.76/31\",\r\n \"23.99.34.78/32\",\r\n \"23.99.37.235/32\"\ - ,\r\n \"23.99.37.236/32\",\r\n \"23.99.57.14/32\",\r\n \ - \ \"23.99.80.243/32\",\r\n \"23.99.89.212/32\",\r\n \ - \ \"23.99.90.75/32\",\r\n \"23.99.91.130/32\",\r\n \"\ - 40.78.16.122/32\",\r\n \"40.78.23.252/32\",\r\n \"40.78.31.250/32\"\ - ,\r\n \"40.78.57.109/32\",\r\n \"40.78.101.91/32\",\r\n\ - \ \"40.78.110.18/32\",\r\n \"40.78.111.189/32\",\r\n \ - \ \"40.83.178.165/32\",\r\n \"40.83.186.249/32\",\r\n \ - \ \"40.112.139.250/32\",\r\n \"40.112.240.0/27\",\r\n \ - \ \"40.112.246.0/27\",\r\n \"40.118.129.167/32\",\r\n \ - \ \"40.118.170.1/32\",\r\n \"40.118.209.206/32\",\r\n \"\ - 40.118.244.227/32\",\r\n \"40.118.249.123/32\",\r\n \"40.118.250.19/32\"\ - ,\r\n \"104.40.28.188/32\",\r\n \"104.40.49.103/32\",\r\n\ - \ \"104.40.54.130/32\",\r\n \"104.40.82.151/32\",\r\n \ - \ \"104.42.120.235/32\",\r\n \"104.42.127.95/32\",\r\n \ - \ \"104.42.136.93/32\",\r\n \"104.42.188.130/32\",\r\n \ - \ \"104.42.192.190/32\",\r\n \"104.42.199.221/32\",\r\n \ - \ \"104.42.231.253/32\",\r\n \"104.42.237.198/32\",\r\n \ - \ \"104.42.238.205/32\",\r\n \"104.210.32.128/32\",\r\n \ - \ \"137.135.51.212/32\",\r\n \"138.91.145.12/32\",\r\n \ - \ \"138.91.160.189/32\",\r\n \"138.91.240.14/32\",\r\n \ - \ \"138.91.246.31/32\",\r\n \"138.91.247.51/32\",\r\n \ - \ \"138.91.251.139/32\",\r\n \"191.236.119.31/32\",\r\n \ - \ \"191.239.12.154/32\",\r\n \"2603:1030:a07::280/123\",\r\n \ - \ \"2603:1030:a07:1::200/121\",\r\n \"2603:1030:a07:400::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.WestUS2\"\ - ,\r\n \"id\": \"Sql.WestUS2\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \ - \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.66.136.0/26\"\ - ,\r\n \"13.66.136.192/29\",\r\n \"13.66.137.0/26\",\r\n\ - \ \"13.66.226.202/32\",\r\n \"13.66.229.222/32\",\r\n \ - \ \"13.66.230.18/31\",\r\n \"13.66.230.60/32\",\r\n \ - \ \"13.66.230.64/32\",\r\n \"13.66.230.103/32\",\r\n \ - \ \"20.51.9.128/25\",\r\n \"40.78.240.0/26\",\r\n \"40.78.240.192/29\"\ - ,\r\n \"40.78.241.0/26\",\r\n \"40.78.248.0/26\",\r\n \ - \ \"40.78.248.192/29\",\r\n \"40.78.249.0/26\",\r\n \ - \ \"52.191.144.64/26\",\r\n \"52.191.152.64/26\",\r\n \ - \ \"52.191.172.187/32\",\r\n \"52.191.174.114/32\",\r\n \ - \ \"52.229.17.93/32\",\r\n \"52.246.251.248/32\",\r\n \"\ - 2603:1030:c06:2::200/123\",\r\n \"2603:1030:c06:2::280/121\",\r\n\ - \ \"2603:1030:c06:401::/123\",\r\n \"2603:1030:c06:402::/123\"\ - ,\r\n \"2603:1030:c06:800::/123\",\r\n \"2603:1030:c06:801::/123\"\ - ,\r\n \"2603:1030:c06:c00::/123\",\r\n \"2603:1030:c06:c01::/123\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.WestUS3\"\ - ,\r\n \"id\": \"Sql.WestUS3\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \ - \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.150.168.0/27\"\ - ,\r\n \"20.150.168.32/29\",\r\n \"20.150.169.0/27\",\r\n\ - \ \"20.150.176.0/27\",\r\n \"20.150.176.32/29\",\r\n \ - \ \"20.150.177.0/27\",\r\n \"20.150.184.0/27\",\r\n \ - \ \"20.150.184.32/29\",\r\n \"20.150.185.0/27\",\r\n \"\ - 20.150.241.128/25\",\r\n \"2603:1030:504::520/123\",\r\n \ - \ \"2603:1030:504::580/121\",\r\n \"2603:1030:504:400::/123\",\r\ - \n \"2603:1030:504:401::/123\",\r\n \"2603:1030:504:800::/123\"\ - ,\r\n \"2603:1030:504:801::/123\",\r\n \"2603:1030:504:c00::/123\"\ - ,\r\n \"2603:1030:504:c01::/123\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"SqlManagement\",\r\n \"id\": \"SqlManagement\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"6\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"SqlManagement\",\r\n \"addressPrefixes\"\ - : [\r\n \"13.64.155.40/32\",\r\n \"13.66.140.96/27\",\r\n\ - \ \"13.66.141.192/27\",\r\n \"13.67.8.192/27\",\r\n \ - \ \"13.67.10.32/27\",\r\n \"13.69.64.96/27\",\r\n \"\ - 13.69.67.0/27\",\r\n \"13.69.106.96/27\",\r\n \"13.69.107.32/27\"\ - ,\r\n \"13.69.227.96/27\",\r\n \"13.69.229.192/27\",\r\n\ - \ \"13.70.72.160/27\",\r\n \"13.70.73.224/27\",\r\n \ - \ \"13.71.119.167/32\",\r\n \"13.71.123.234/32\",\r\n \ - \ \"13.71.170.160/27\",\r\n \"13.71.173.96/27\",\r\n \ - \ \"13.71.195.0/27\",\r\n \"13.71.196.96/27\",\r\n \"13.73.240.192/27\"\ - ,\r\n \"13.73.242.0/27\",\r\n \"13.73.249.176/28\",\r\n\ - \ \"13.74.107.96/27\",\r\n \"13.74.107.224/27\",\r\n \ - \ \"13.75.36.32/27\",\r\n \"13.75.39.32/27\",\r\n \ - \ \"13.77.50.192/27\",\r\n \"13.77.53.0/27\",\r\n \"13.78.106.224/27\"\ - ,\r\n \"13.78.109.64/27\",\r\n \"13.78.181.246/32\",\r\n\ - \ \"13.78.182.82/32\",\r\n \"13.84.52.76/32\",\r\n \ - \ \"13.86.219.96/27\",\r\n \"13.87.39.133/32\",\r\n \ - \ \"13.87.39.173/32\",\r\n \"13.87.56.192/27\",\r\n \"13.87.58.0/27\"\ - ,\r\n \"13.87.122.192/27\",\r\n \"13.87.124.0/27\",\r\n\ - \ \"13.89.170.224/27\",\r\n \"13.89.174.96/27\",\r\n \ - \ \"13.92.242.41/32\",\r\n \"13.94.47.38/32\",\r\n \ - \ \"13.104.248.32/27\",\r\n \"13.104.248.96/27\",\r\n \"\ - 20.21.39.240/28\",\r\n \"20.21.46.0/26\",\r\n \"20.21.67.224/27\"\ - ,\r\n \"20.21.69.128/27\",\r\n \"20.21.75.224/27\",\r\n\ - \ \"20.21.77.128/27\",\r\n \"20.36.46.202/32\",\r\n \ - \ \"20.36.46.220/32\",\r\n \"20.36.75.75/32\",\r\n \ - \ \"20.36.75.114/32\",\r\n \"20.36.108.0/27\",\r\n \"20.36.108.64/27\"\ - ,\r\n \"20.36.115.160/27\",\r\n \"20.36.115.192/27\",\r\n\ - \ \"20.36.123.0/28\",\r\n \"20.37.67.64/28\",\r\n \ - \ \"20.37.76.0/27\",\r\n \"20.37.76.64/27\",\r\n \"20.37.198.96/28\"\ - ,\r\n \"20.37.227.0/28\",\r\n \"20.38.87.208/28\",\r\n \ - \ \"20.38.128.0/27\",\r\n \"20.38.139.64/28\",\r\n \ - \ \"20.38.146.192/27\",\r\n \"20.38.147.32/27\",\r\n \ - \ \"20.39.12.240/28\",\r\n \"20.40.200.176/28\",\r\n \"\ - 20.41.67.96/28\",\r\n \"20.41.197.32/28\",\r\n \"20.42.131.34/31\"\ - ,\r\n \"20.42.230.96/28\",\r\n \"20.43.43.176/28\",\r\n\ - \ \"20.43.70.80/28\",\r\n \"20.43.120.192/27\",\r\n \ - \ \"20.44.4.0/26\",\r\n \"20.44.8.128/27\",\r\n \"\ - 20.44.16.160/27\",\r\n \"20.44.26.192/27\",\r\n \"20.44.27.160/27\"\ - ,\r\n \"20.45.75.228/32\",\r\n \"20.45.75.230/32\",\r\n\ - \ \"20.45.114.208/28\",\r\n \"20.45.122.192/27\",\r\n \ - \ \"20.45.126.32/27\",\r\n \"20.45.197.240/28\",\r\n \ - \ \"20.47.216.224/27\",\r\n \"20.49.83.160/27\",\r\n \ - \ \"20.49.83.192/27\",\r\n \"20.49.91.160/27\",\r\n \"\ - 20.49.93.96/27\",\r\n \"20.49.99.48/28\",\r\n \"20.49.109.64/28\"\ - ,\r\n \"20.49.113.16/28\",\r\n \"20.49.120.48/28\",\r\n\ - \ \"20.50.1.224/28\",\r\n \"20.51.13.68/30\",\r\n \ - \ \"20.69.2.8/30\",\r\n \"20.72.21.16/28\",\r\n \"20.72.28.224/27\"\ - ,\r\n \"20.72.30.128/27\",\r\n \"20.150.165.160/28\",\r\n\ - \ \"20.150.170.32/27\",\r\n \"20.150.170.128/27\",\r\n \ - \ \"20.150.172.96/27\",\r\n \"20.150.178.192/26\",\r\n \ - \ \"20.150.186.192/26\",\r\n \"20.187.194.208/28\",\r\n \ - \ \"20.192.98.192/26\",\r\n \"20.192.165.192/28\",\r\n \ - \ \"20.192.230.16/28\",\r\n \"20.192.238.32/27\",\r\n \ - \ \"20.192.238.64/27\",\r\n \"20.193.205.160/27\",\r\n \ - \ \"20.193.205.192/27\",\r\n \"20.194.67.128/26\",\r\n \ - \ \"20.205.75.224/27\",\r\n \"20.205.77.128/27\",\r\n \ - \ \"20.205.78.0/25\",\r\n \"20.205.85.128/26\",\r\n \"20.208.19.224/27\"\ - ,\r\n \"20.208.21.128/27\",\r\n \"23.96.185.63/32\",\r\n\ - \ \"23.96.243.93/32\",\r\n \"23.97.120.24/32\",\r\n \ - \ \"23.98.82.128/27\",\r\n \"23.98.83.32/27\",\r\n \ - \ \"23.98.104.144/28\",\r\n \"23.99.97.255/32\",\r\n \"\ - 40.64.132.112/28\",\r\n \"40.65.124.161/32\",\r\n \"40.67.50.224/28\"\ - ,\r\n \"40.67.58.32/27\",\r\n \"40.67.60.32/27\",\r\n \ - \ \"40.69.106.192/27\",\r\n \"40.69.108.0/27\",\r\n \ - \ \"40.69.161.215/32\",\r\n \"40.70.72.228/32\",\r\n \ - \ \"40.70.146.96/27\",\r\n \"40.70.148.64/27\",\r\n \"40.71.10.224/27\"\ - ,\r\n \"40.71.13.192/27\",\r\n \"40.71.215.148/32\",\r\n\ - \ \"40.74.100.192/27\",\r\n \"40.74.101.224/27\",\r\n \ - \ \"40.74.147.0/27\",\r\n \"40.74.147.96/27\",\r\n \ - \ \"40.74.147.128/27\",\r\n \"40.74.254.227/32\",\r\n \ - \ \"40.75.34.64/27\",\r\n \"40.75.35.0/27\",\r\n \"40.78.194.192/27\"\ - ,\r\n \"40.78.196.0/27\",\r\n \"40.78.203.128/27\",\r\n\ - \ \"40.78.203.192/27\",\r\n \"40.78.226.224/27\",\r\n \ - \ \"40.78.229.0/27\",\r\n \"40.78.234.64/27\",\r\n \ - \ \"40.78.234.224/27\",\r\n \"40.78.242.192/27\",\r\n \ - \ \"40.78.243.128/27\",\r\n \"40.78.250.128/27\",\r\n \"\ - 40.78.251.64/27\",\r\n \"40.79.32.162/32\",\r\n \"40.79.130.160/27\"\ - ,\r\n \"40.79.132.0/27\",\r\n \"40.79.138.64/27\",\r\n \ - \ \"40.79.138.160/27\",\r\n \"40.79.146.64/27\",\r\n \ - \ \"40.79.146.160/27\",\r\n \"40.79.154.0/27\",\r\n \ - \ \"40.79.154.224/27\",\r\n \"40.79.156.0/27\",\r\n \"\ - 40.79.162.64/27\",\r\n \"40.79.162.160/27\",\r\n \"40.79.170.160/27\"\ - ,\r\n \"40.79.171.0/27\",\r\n \"40.79.178.192/27\",\r\n\ - \ \"40.79.179.224/27\",\r\n \"40.79.186.96/27\",\r\n \ - \ \"40.79.187.128/27\",\r\n \"40.79.194.0/27\",\r\n \ - \ \"40.79.195.128/27\",\r\n \"40.80.50.192/27\",\r\n \"\ - 40.80.51.32/27\",\r\n \"40.80.62.0/28\",\r\n \"40.80.172.32/28\"\ - ,\r\n \"40.89.20.144/28\",\r\n \"40.112.243.128/27\",\r\n\ - \ \"40.120.75.192/26\",\r\n \"40.123.207.224/32\",\r\n \ - \ \"40.123.219.239/32\",\r\n \"40.126.238.47/32\",\r\n \ - \ \"40.127.3.232/32\",\r\n \"51.12.42.0/28\",\r\n \ - \ \"51.12.98.32/27\",\r\n \"51.12.98.128/27\",\r\n \"51.12.194.0/28\"\ - ,\r\n \"51.12.202.32/27\",\r\n \"51.12.202.128/27\",\r\n\ - \ \"51.12.226.192/26\",\r\n \"51.12.234.192/26\",\r\n \ - \ \"51.103.203.224/27\",\r\n \"51.103.205.128/27\",\r\n \ - \ \"51.104.8.192/27\",\r\n \"51.104.28.240/28\",\r\n \ - \ \"51.105.66.192/27\",\r\n \"51.105.67.128/27\",\r\n \ - \ \"51.105.74.192/27\",\r\n \"51.105.75.32/27\",\r\n \"\ - 51.105.83.0/28\",\r\n \"51.105.90.160/28\",\r\n \"51.107.51.0/28\"\ - ,\r\n \"51.107.58.32/27\",\r\n \"51.107.60.0/27\",\r\n \ - \ \"51.107.147.0/28\",\r\n \"51.107.154.32/27\",\r\n \ - \ \"51.107.156.0/27\",\r\n \"51.116.49.144/28\",\r\n \ - \ \"51.116.58.32/27\",\r\n \"51.116.60.0/27\",\r\n \"\ - 51.116.145.144/28\",\r\n \"51.116.154.96/27\",\r\n \"51.116.156.0/27\"\ - ,\r\n \"51.116.242.192/26\",\r\n \"51.116.243.32/27\",\r\ - \n \"51.116.250.192/27\",\r\n \"51.116.253.96/27\",\r\n\ - \ \"51.120.43.64/28\",\r\n \"51.120.98.32/27\",\r\n \ - \ \"51.120.100.0/27\",\r\n \"51.120.106.192/26\",\r\n \ - \ \"51.120.210.192/26\",\r\n \"51.120.218.32/27\",\r\n \ - \ \"51.120.218.128/27\",\r\n \"51.120.227.64/28\",\r\n \ - \ \"51.137.164.96/28\",\r\n \"51.140.121.92/32\",\r\n \"\ - 51.140.127.51/32\",\r\n \"51.140.146.224/27\",\r\n \"51.140.210.224/27\"\ - ,\r\n \"51.140.212.32/27\",\r\n \"51.141.38.88/32\",\r\n\ - \ \"51.141.39.175/32\",\r\n \"51.143.195.0/28\",\r\n \ - \ \"52.136.51.80/28\",\r\n \"52.136.139.224/32\",\r\n \ - \ \"52.136.140.157/32\",\r\n \"52.138.90.96/27\",\r\n \ - \ \"52.138.226.96/27\",\r\n \"52.138.226.224/27\",\r\n \ - \ \"52.140.108.80/28\",\r\n \"52.143.136.162/32\",\r\n \ - \ \"52.143.139.82/32\",\r\n \"52.150.139.78/31\",\r\n \"\ - 52.150.152.32/28\",\r\n \"52.162.107.128/27\",\r\n \"52.162.110.192/27\"\ - ,\r\n \"52.164.200.174/32\",\r\n \"52.165.237.178/32\",\r\ - \n \"52.166.50.138/32\",\r\n \"52.167.106.96/27\",\r\n \ - \ \"52.167.106.224/27\",\r\n \"52.169.6.70/32\",\r\n \ - \ \"52.172.193.99/32\",\r\n \"52.172.204.185/32\",\r\n \ - \ \"52.173.243.204/32\",\r\n \"52.175.156.251/32\",\r\n \ - \ \"52.182.138.224/27\",\r\n \"52.182.139.96/27\",\r\n \ - \ \"52.183.64.43/32\",\r\n \"52.185.145.40/32\",\r\n \ - \ \"52.185.154.136/32\",\r\n \"52.187.185.17/32\",\r\n \"\ - 52.225.130.171/32\",\r\n \"52.228.84.112/28\",\r\n \"52.230.122.197/32\"\ - ,\r\n \"52.231.18.160/27\",\r\n \"52.231.19.224/27\",\r\n\ - \ \"52.231.30.200/32\",\r\n \"52.231.34.21/32\",\r\n \ - \ \"52.231.146.224/27\",\r\n \"52.231.148.32/27\",\r\n \ - \ \"52.231.202.76/32\",\r\n \"52.231.206.187/32\",\r\n \ - \ \"52.233.30.2/32\",\r\n \"52.233.38.82/32\",\r\n \"\ - 52.233.130.100/32\",\r\n \"52.235.36.131/32\",\r\n \"52.236.186.96/27\"\ - ,\r\n \"52.236.187.32/27\",\r\n \"52.237.244.169/32\",\r\ - \n \"52.242.36.170/32\",\r\n \"52.243.87.200/32\",\r\n \ - \ \"52.246.154.192/27\",\r\n \"52.246.155.32/27\",\r\n \ - \ \"52.255.51.21/32\",\r\n \"65.52.252.0/27\",\r\n \ - \ \"65.52.252.64/27\",\r\n \"102.133.27.224/27\",\r\n \ - \ \"102.133.28.32/27\",\r\n \"102.133.58.208/28\",\r\n \"\ - 102.133.72.35/32\",\r\n \"102.133.72.42/32\",\r\n \"102.133.122.192/27\"\ - ,\r\n \"102.133.123.192/27\",\r\n \"102.133.155.224/27\"\ - ,\r\n \"102.133.156.32/27\",\r\n \"102.133.160.35/32\",\r\ - \n \"102.133.218.128/28\",\r\n \"102.133.250.192/27\",\r\ - \n \"102.133.251.32/27\",\r\n \"104.42.96.175/32\",\r\n\ - \ \"104.208.16.96/27\",\r\n \"104.208.144.96/27\",\r\n \ - \ \"104.211.81.160/27\",\r\n \"104.211.146.192/27\",\r\n\ - \ \"104.211.187.232/32\",\r\n \"104.214.19.0/27\",\r\n \ - \ \"104.214.108.80/32\",\r\n \"104.215.17.87/32\",\r\n \ - \ \"191.232.163.58/32\",\r\n \"191.233.11.128/28\",\r\n \ - \ \"191.233.54.32/27\",\r\n \"191.233.54.192/27\",\r\n \ - \ \"191.233.203.160/27\",\r\n \"191.233.205.32/27\",\r\n \ - \ \"191.234.136.64/28\",\r\n \"191.234.146.192/26\",\r\n \ - \ \"191.234.154.192/26\",\r\n \"2603:1000:4:402::380/122\"\ - ,\r\n \"2603:1000:104:402::380/122\",\r\n \"2603:1000:104:802::260/123\"\ - ,\r\n \"2603:1000:104:802::280/123\",\r\n \"2603:1000:104:c02::260/123\"\ - ,\r\n \"2603:1000:104:c02::280/123\",\r\n \"2603:1010:6:402::380/122\"\ - ,\r\n \"2603:1010:6:802::260/123\",\r\n \"2603:1010:6:802::280/123\"\ - ,\r\n \"2603:1010:6:c02::260/123\",\r\n \"2603:1010:6:c02::280/123\"\ - ,\r\n \"2603:1010:101:402::380/122\",\r\n \"2603:1010:304:402::380/122\"\ - ,\r\n \"2603:1010:404:402::380/122\",\r\n \"2603:1020:5:402::380/122\"\ - ,\r\n \"2603:1020:5:802::260/123\",\r\n \"2603:1020:5:802::280/123\"\ - ,\r\n \"2603:1020:5:c02::260/123\",\r\n \"2603:1020:5:c02::280/123\"\ - ,\r\n \"2603:1020:206:402::380/122\",\r\n \"2603:1020:206:802::260/123\"\ - ,\r\n \"2603:1020:206:802::280/123\",\r\n \"2603:1020:206:c02::260/123\"\ - ,\r\n \"2603:1020:206:c02::280/123\",\r\n \"2603:1020:305:402::380/122\"\ - ,\r\n \"2603:1020:405:402::380/122\",\r\n \"2603:1020:605:402::380/122\"\ - ,\r\n \"2603:1020:705:402::380/122\",\r\n \"2603:1020:705:802::260/123\"\ - ,\r\n \"2603:1020:705:802::280/123\",\r\n \"2603:1020:705:c02::260/123\"\ - ,\r\n \"2603:1020:705:c02::280/123\",\r\n \"2603:1020:805:402::380/122\"\ - ,\r\n \"2603:1020:805:802::260/123\",\r\n \"2603:1020:805:802::280/123\"\ - ,\r\n \"2603:1020:805:c02::260/123\",\r\n \"2603:1020:805:c02::280/123\"\ - ,\r\n \"2603:1020:905:402::380/122\",\r\n \"2603:1020:a04:3::80/123\"\ - ,\r\n \"2603:1020:a04:402::380/122\",\r\n \"2603:1020:a04:802::260/123\"\ - ,\r\n \"2603:1020:a04:802::280/123\",\r\n \"2603:1020:a04:c02::260/123\"\ - ,\r\n \"2603:1020:a04:c02::280/123\",\r\n \"2603:1020:b04:402::380/122\"\ - ,\r\n \"2603:1020:c04:402::380/122\",\r\n \"2603:1020:c04:802::260/123\"\ - ,\r\n \"2603:1020:c04:802::280/123\",\r\n \"2603:1020:c04:c02::260/123\"\ - ,\r\n \"2603:1020:c04:c02::280/123\",\r\n \"2603:1020:d04:402::380/122\"\ - ,\r\n \"2603:1020:e04:3::400/123\",\r\n \"2603:1020:e04:402::380/122\"\ - ,\r\n \"2603:1020:e04:802::260/123\",\r\n \"2603:1020:e04:802::280/123\"\ - ,\r\n \"2603:1020:e04:c02::260/123\",\r\n \"2603:1020:e04:c02::280/123\"\ - ,\r\n \"2603:1020:f04:402::380/122\",\r\n \"2603:1020:1004:1::500/123\"\ - ,\r\n \"2603:1020:1004:400::200/122\",\r\n \"2603:1020:1004:800::300/122\"\ - ,\r\n \"2603:1020:1004:c02::2c0/122\",\r\n \"2603:1020:1104:1::1e0/123\"\ - ,\r\n \"2603:1020:1104:400::340/122\",\r\n \"2603:1030:f:2::6e0/123\"\ - ,\r\n \"2603:1030:f:400::b80/122\",\r\n \"2603:1030:10:402::380/122\"\ - ,\r\n \"2603:1030:10:802::260/123\",\r\n \"2603:1030:10:802::280/123\"\ - ,\r\n \"2603:1030:10:c02::260/123\",\r\n \"2603:1030:10:c02::280/123\"\ - ,\r\n \"2603:1030:104:2::60/123\",\r\n \"2603:1030:104:402::380/122\"\ - ,\r\n \"2603:1030:104:802::/122\",\r\n \"2603:1030:107:1::220/123\"\ - ,\r\n \"2603:1030:107:400::2c0/122\",\r\n \"2603:1030:210:402::380/122\"\ - ,\r\n \"2603:1030:210:802::260/123\",\r\n \"2603:1030:210:802::280/123\"\ - ,\r\n \"2603:1030:210:c02::260/123\",\r\n \"2603:1030:210:c02::280/123\"\ - ,\r\n \"2603:1030:40b:400::b80/122\",\r\n \"2603:1030:40b:800::260/123\"\ - ,\r\n \"2603:1030:40b:800::280/123\",\r\n \"2603:1030:40b:c00::260/123\"\ - ,\r\n \"2603:1030:40b:c00::280/123\",\r\n \"2603:1030:40c:402::380/122\"\ - ,\r\n \"2603:1030:40c:802::260/123\",\r\n \"2603:1030:40c:802::280/123\"\ - ,\r\n \"2603:1030:40c:c02::260/123\",\r\n \"2603:1030:40c:c02::280/123\"\ - ,\r\n \"2603:1030:504::500/123\",\r\n \"2603:1030:504:402::200/122\"\ - ,\r\n \"2603:1030:504:802::300/122\",\r\n \"2603:1030:504:c02::2c0/122\"\ - ,\r\n \"2603:1030:608:402::380/122\",\r\n \"2603:1030:807:402::380/122\"\ - ,\r\n \"2603:1030:807:802::260/123\",\r\n \"2603:1030:807:802::280/123\"\ - ,\r\n \"2603:1030:807:c02::260/123\",\r\n \"2603:1030:807:c02::280/123\"\ - ,\r\n \"2603:1030:a07:402::300/122\",\r\n \"2603:1030:b04:402::380/122\"\ - ,\r\n \"2603:1030:c06:400::b80/122\",\r\n \"2603:1030:c06:802::260/123\"\ - ,\r\n \"2603:1030:c06:802::280/123\",\r\n \"2603:1030:c06:c02::260/123\"\ - ,\r\n \"2603:1030:c06:c02::280/123\",\r\n \"2603:1030:f05:402::380/122\"\ - ,\r\n \"2603:1030:f05:802::260/123\",\r\n \"2603:1030:f05:802::280/123\"\ - ,\r\n \"2603:1030:f05:c02::260/123\",\r\n \"2603:1030:f05:c02::280/123\"\ - ,\r\n \"2603:1030:1005:402::380/122\",\r\n \"2603:1040:5:402::380/122\"\ - ,\r\n \"2603:1040:5:802::260/123\",\r\n \"2603:1040:5:802::280/123\"\ - ,\r\n \"2603:1040:5:c02::260/123\",\r\n \"2603:1040:5:c02::280/123\"\ - ,\r\n \"2603:1040:207:2::280/123\",\r\n \"2603:1040:207:402::380/122\"\ - ,\r\n \"2603:1040:207:800::280/122\",\r\n \"2603:1040:207:c00::280/122\"\ - ,\r\n \"2603:1040:407:402::380/122\",\r\n \"2603:1040:407:802::260/123\"\ - ,\r\n \"2603:1040:407:802::280/123\",\r\n \"2603:1040:407:c02::260/123\"\ - ,\r\n \"2603:1040:407:c02::280/123\",\r\n \"2603:1040:606:402::380/122\"\ - ,\r\n \"2603:1040:806:402::380/122\",\r\n \"2603:1040:904:402::380/122\"\ - ,\r\n \"2603:1040:904:802::260/123\",\r\n \"2603:1040:904:802::280/123\"\ - ,\r\n \"2603:1040:904:c02::260/123\",\r\n \"2603:1040:904:c02::280/123\"\ - ,\r\n \"2603:1040:a06:2::580/123\",\r\n \"2603:1040:a06:402::380/122\"\ - ,\r\n \"2603:1040:a06:802::260/123\",\r\n \"2603:1040:a06:802::280/123\"\ - ,\r\n \"2603:1040:a06:c02::260/123\",\r\n \"2603:1040:a06:c02::280/123\"\ - ,\r\n \"2603:1040:b04:402::380/122\",\r\n \"2603:1040:c06:402::380/122\"\ - ,\r\n \"2603:1040:d04:1::500/123\",\r\n \"2603:1040:d04:400::200/122\"\ - ,\r\n \"2603:1040:d04:800::300/122\",\r\n \"2603:1040:d04:c02::2c0/122\"\ - ,\r\n \"2603:1040:f05:2::240/123\",\r\n \"2603:1040:f05:402::380/122\"\ - ,\r\n \"2603:1040:f05:802::260/123\",\r\n \"2603:1040:f05:802::280/123\"\ - ,\r\n \"2603:1040:f05:c02::260/123\",\r\n \"2603:1040:f05:c02::280/123\"\ - ,\r\n \"2603:1040:1002:2::a0/123\",\r\n \"2603:1040:1002:400::380/122\"\ - ,\r\n \"2603:1040:1002:800::280/122\",\r\n \"2603:1040:1002:c00::280/122\"\ - ,\r\n \"2603:1040:1104:1::1e0/123\",\r\n \"2603:1040:1104:400::340/122\"\ - ,\r\n \"2603:1050:6:402::380/122\",\r\n \"2603:1050:6:802::260/123\"\ - ,\r\n \"2603:1050:6:802::280/123\",\r\n \"2603:1050:6:c02::260/123\"\ - ,\r\n \"2603:1050:6:c02::280/123\",\r\n \"2603:1050:403:400::260/123\"\ - ,\r\n \"2603:1050:403:400::280/123\"\r\n ]\r\n }\r\n\ - \ },\r\n {\r\n \"name\": \"Storage\",\r\n \"id\": \"Storage\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"5\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n \ - \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureStorage\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.65.107.32/28\",\r\n\ - \ \"13.65.160.16/28\",\r\n \"13.65.160.48/28\",\r\n \ - \ \"13.65.160.64/28\",\r\n \"13.66.176.16/28\",\r\n \ - \ \"13.66.176.48/28\",\r\n \"13.66.232.64/28\",\r\n \"\ - 13.66.232.208/28\",\r\n \"13.66.232.224/28\",\r\n \"13.66.234.0/27\"\ - ,\r\n \"13.67.155.16/28\",\r\n \"13.68.120.64/28\",\r\n\ - \ \"13.68.163.32/28\",\r\n \"13.68.165.64/28\",\r\n \ - \ \"13.68.167.240/28\",\r\n \"13.69.40.16/28\",\r\n \ - \ \"13.70.99.16/28\",\r\n \"13.70.99.48/28\",\r\n \"13.70.99.64/28\"\ - ,\r\n \"13.70.208.16/28\",\r\n \"13.71.200.64/28\",\r\n\ - \ \"13.71.200.96/28\",\r\n \"13.71.200.240/28\",\r\n \ - \ \"13.71.202.16/28\",\r\n \"13.71.202.32/28\",\r\n \ - \ \"13.71.202.64/27\",\r\n \"13.72.235.64/28\",\r\n \"\ - 13.72.235.96/27\",\r\n \"13.72.235.144/28\",\r\n \"13.72.237.48/28\"\ - ,\r\n \"13.72.237.64/28\",\r\n \"13.73.8.16/28\",\r\n \ - \ \"13.73.8.32/28\",\r\n \"13.74.208.64/28\",\r\n \ - \ \"13.74.208.112/28\",\r\n \"13.74.208.144/28\",\r\n \"\ - 13.75.240.16/28\",\r\n \"13.75.240.32/28\",\r\n \"13.75.240.64/27\"\ - ,\r\n \"13.76.104.16/28\",\r\n \"13.77.8.16/28\",\r\n \ - \ \"13.77.8.32/28\",\r\n \"13.77.8.64/28\",\r\n \"\ - 13.77.8.96/28\",\r\n \"13.77.8.128/27\",\r\n \"13.77.8.160/28\"\ - ,\r\n \"13.77.8.192/27\",\r\n \"13.77.112.16/28\",\r\n \ - \ \"13.77.112.32/28\",\r\n \"13.77.112.112/28\",\r\n \ - \ \"13.77.112.128/28\",\r\n \"13.77.115.16/28\",\r\n \ - \ \"13.77.115.32/28\",\r\n \"13.77.184.64/28\",\r\n \"\ - 13.78.152.64/28\",\r\n \"13.78.240.16/28\",\r\n \"13.79.176.16/28\"\ - ,\r\n \"13.79.176.48/28\",\r\n \"13.79.176.80/28\",\r\n\ - \ \"13.82.33.32/28\",\r\n \"13.82.152.16/28\",\r\n \ - \ \"13.82.152.48/28\",\r\n \"13.82.152.80/28\",\r\n \ - \ \"13.83.72.16/28\",\r\n \"13.84.56.16/28\",\r\n \"13.85.88.16/28\"\ - ,\r\n \"13.85.200.128/28\",\r\n \"13.87.40.64/28\",\r\n\ - \ \"13.87.40.96/28\",\r\n \"13.88.144.112/28\",\r\n \ - \ \"13.88.144.240/28\",\r\n \"13.88.145.64/28\",\r\n \ - \ \"13.88.145.96/28\",\r\n \"13.88.145.128/28\",\r\n \"\ - 13.93.168.80/28\",\r\n \"13.93.168.112/28\",\r\n \"13.93.168.144/28\"\ - ,\r\n \"13.95.96.176/28\",\r\n \"13.95.240.16/28\",\r\n\ - \ \"13.95.240.32/28\",\r\n \"13.95.240.64/27\",\r\n \ - \ \"20.38.96.0/19\",\r\n \"20.47.0.0/18\",\r\n \"20.60.0.0/16\"\ - ,\r\n \"20.150.0.0/17\",\r\n \"20.157.32.0/19\",\r\n \ - \ \"20.157.128.0/18\",\r\n \"20.209.0.0/16\",\r\n \ - \ \"23.96.64.64/26\",\r\n \"23.97.112.64/26\",\r\n \"23.98.49.0/26\"\ - ,\r\n \"23.98.49.192/26\",\r\n \"23.98.55.0/26\",\r\n \ - \ \"23.98.55.112/28\",\r\n \"23.98.55.144/28\",\r\n \ - \ \"23.98.56.0/26\",\r\n \"23.98.57.64/26\",\r\n \"23.98.160.64/26\"\ - ,\r\n \"23.98.162.192/26\",\r\n \"23.98.168.0/24\",\r\n\ - \ \"23.98.192.64/26\",\r\n \"23.98.255.64/26\",\r\n \ - \ \"23.99.32.64/26\",\r\n \"23.99.34.224/28\",\r\n \ - \ \"23.99.37.96/28\",\r\n \"23.99.47.32/28\",\r\n \"23.99.160.64/26\"\ - ,\r\n \"23.99.160.192/28\",\r\n \"23.102.206.0/28\",\r\n\ - \ \"23.102.206.128/28\",\r\n \"23.102.206.192/28\",\r\n\ - \ \"40.68.176.16/28\",\r\n \"40.68.176.48/28\",\r\n \ - \ \"40.68.232.16/28\",\r\n \"40.68.232.48/28\",\r\n \ - \ \"40.69.176.16/28\",\r\n \"40.70.88.0/28\",\r\n \"40.71.104.16/28\"\ - ,\r\n \"40.71.104.32/28\",\r\n \"40.71.240.16/28\",\r\n\ - \ \"40.78.72.16/28\",\r\n \"40.78.112.64/28\",\r\n \ - \ \"40.79.8.16/28\",\r\n \"40.79.48.16/28\",\r\n \"\ - 40.79.88.16/28\",\r\n \"40.83.24.16/28\",\r\n \"40.83.24.80/28\"\ - ,\r\n \"40.83.24.96/27\",\r\n \"40.83.104.176/28\",\r\n\ - \ \"40.83.104.208/28\",\r\n \"40.83.225.32/28\",\r\n \ - \ \"40.83.227.16/28\",\r\n \"40.84.8.32/28\",\r\n \ - \ \"40.84.11.80/28\",\r\n \"40.85.105.32/28\",\r\n \"40.85.232.64/28\"\ - ,\r\n \"40.85.232.96/28\",\r\n \"40.85.232.144/28\",\r\n\ - \ \"40.85.235.32/27\",\r\n \"40.85.235.80/28\",\r\n \ - \ \"40.85.235.96/28\",\r\n \"40.86.232.64/28\",\r\n \ - \ \"40.86.232.96/28\",\r\n \"40.86.232.128/28\",\r\n \"\ - 40.86.232.176/28\",\r\n \"40.86.232.192/28\",\r\n \"40.112.152.16/28\"\ - ,\r\n \"40.112.224.16/28\",\r\n \"40.112.224.48/28\",\r\n\ - \ \"40.113.27.176/28\",\r\n \"40.114.152.16/28\",\r\n \ - \ \"40.114.152.48/28\",\r\n \"40.115.169.32/28\",\r\n \ - \ \"40.115.175.16/28\",\r\n \"40.115.175.32/28\",\r\n \ - \ \"40.115.227.80/28\",\r\n \"40.115.229.16/28\",\r\n \ - \ \"40.115.229.32/28\",\r\n \"40.115.231.64/27\",\r\n \"\ - 40.115.231.112/28\",\r\n \"40.115.231.128/28\",\r\n \"40.116.120.16/28\"\ - ,\r\n \"40.116.232.16/28\",\r\n \"40.116.232.48/28\",\r\n\ - \ \"40.116.232.96/28\",\r\n \"40.117.48.80/28\",\r\n \ - \ \"40.117.48.112/28\",\r\n \"40.117.104.16/28\",\r\n \ - \ \"40.118.72.176/28\",\r\n \"40.118.73.48/28\",\r\n \ - \ \"40.118.73.176/28\",\r\n \"40.118.73.208/28\",\r\n \"\ - 40.122.96.16/28\",\r\n \"40.122.216.16/28\",\r\n \"40.123.16.16/28\"\ - ,\r\n \"51.140.16.16/28\",\r\n \"51.140.16.32/28\",\r\n\ - \ \"51.140.168.64/27\",\r\n \"51.140.168.112/28\",\r\n \ - \ \"51.140.168.128/28\",\r\n \"51.140.232.64/27\",\r\n \ - \ \"51.140.232.112/28\",\r\n \"51.140.232.128/28\",\r\n \ - \ \"51.140.232.160/27\",\r\n \"51.141.128.0/24\",\r\n \ - \ \"51.141.129.64/26\",\r\n \"51.141.129.128/25\",\r\n \ - \ \"51.141.130.0/25\",\r\n \"52.161.112.16/28\",\r\n \ - \ \"52.161.112.32/28\",\r\n \"52.161.168.16/28\",\r\n \"\ - 52.161.168.32/28\",\r\n \"52.162.56.16/28\",\r\n \"52.162.56.32/28\"\ - ,\r\n \"52.162.56.64/27\",\r\n \"52.162.56.112/28\",\r\n\ - \ \"52.162.56.128/28\",\r\n \"52.163.176.16/28\",\r\n \ - \ \"52.163.232.16/28\",\r\n \"52.164.112.16/28\",\r\n \ - \ \"52.164.232.16/28\",\r\n \"52.164.232.32/28\",\r\n \ - \ \"52.164.232.64/28\",\r\n \"52.165.104.16/28\",\r\n \ - \ \"52.165.104.32/28\",\r\n \"52.165.104.64/27\",\r\n \"\ - 52.165.104.112/28\",\r\n \"52.165.104.144/28\",\r\n \"52.165.104.160/28\"\ - ,\r\n \"52.165.136.32/28\",\r\n \"52.165.240.64/28\",\r\n\ - \ \"52.166.80.32/27\",\r\n \"52.166.80.80/28\",\r\n \ - \ \"52.166.80.96/28\",\r\n \"52.167.88.80/28\",\r\n \ - \ \"52.167.88.112/28\",\r\n \"52.167.240.16/28\",\r\n \"\ - 52.169.168.32/27\",\r\n \"52.169.240.16/28\",\r\n \"52.169.240.32/28\"\ - ,\r\n \"52.169.240.64/28\",\r\n \"52.171.144.32/27\",\r\n\ - \ \"52.171.144.80/28\",\r\n \"52.171.144.96/28\",\r\n \ - \ \"52.171.144.128/28\",\r\n \"52.172.16.16/28\",\r\n \ - \ \"52.172.16.80/28\",\r\n \"52.172.16.96/28\",\r\n \ - \ \"52.172.16.128/27\",\r\n \"52.173.152.64/28\",\r\n \"\ - 52.173.152.96/28\",\r\n \"52.174.8.32/28\",\r\n \"52.174.224.16/28\"\ - ,\r\n \"52.174.224.32/28\",\r\n \"52.174.224.64/27\",\r\n\ - \ \"52.174.224.112/28\",\r\n \"52.174.224.128/28\",\r\n\ - \ \"52.175.40.128/28\",\r\n \"52.175.112.16/28\",\r\n \ - \ \"52.176.224.64/28\",\r\n \"52.176.224.96/28\",\r\n \ - \ \"52.177.208.80/28\",\r\n \"52.178.168.32/27\",\r\n \ - \ \"52.178.168.80/28\",\r\n \"52.178.168.96/28\",\r\n \ - \ \"52.178.168.128/27\",\r\n \"52.179.24.16/28\",\r\n \"\ - 52.179.144.32/28\",\r\n \"52.179.144.64/28\",\r\n \"52.179.240.16/28\"\ - ,\r\n \"52.179.240.48/28\",\r\n \"52.179.240.64/28\",\r\n\ - \ \"52.179.240.96/27\",\r\n \"52.179.240.144/28\",\r\n \ - \ \"52.179.240.160/28\",\r\n \"52.179.240.192/27\",\r\n \ - \ \"52.179.240.240/28\",\r\n \"52.179.241.0/28\",\r\n \ - \ \"52.179.241.32/27\",\r\n \"52.180.40.16/28\",\r\n \ - \ \"52.180.40.32/28\",\r\n \"52.180.184.16/28\",\r\n \ - \ \"52.182.176.16/28\",\r\n \"52.182.176.32/28\",\r\n \"\ - 52.182.176.64/27\",\r\n \"52.183.48.16/28\",\r\n \"52.183.104.16/28\"\ - ,\r\n \"52.183.104.32/28\",\r\n \"52.184.40.16/28\",\r\n\ - \ \"52.184.40.32/28\",\r\n \"52.184.168.32/28\",\r\n \ - \ \"52.184.168.96/27\",\r\n \"52.185.56.80/28\",\r\n \ - \ \"52.185.56.96/28\",\r\n \"52.185.56.144/28\",\r\n \ - \ \"52.185.56.160/28\",\r\n \"52.185.112.16/28\",\r\n \"\ - 52.185.112.48/28\",\r\n \"52.185.112.80/28\",\r\n \"52.185.112.112/28\"\ - ,\r\n \"52.185.233.0/24\",\r\n \"52.186.112.32/27\",\r\n\ - \ \"52.187.141.32/27\",\r\n \"52.189.177.0/24\",\r\n \ - \ \"52.190.240.16/28\",\r\n \"52.190.240.32/28\",\r\n \ - \ \"52.190.240.64/27\",\r\n \"52.190.240.112/28\",\r\n \ - \ \"52.190.240.128/28\",\r\n \"52.191.176.16/28\",\r\n \ - \ \"52.191.176.32/28\",\r\n \"52.225.40.32/27\",\r\n \"\ - 52.225.136.16/28\",\r\n \"52.225.136.32/28\",\r\n \"52.225.240.0/28\"\ - ,\r\n \"52.226.8.32/27\",\r\n \"52.226.8.80/28\",\r\n \ - \ \"52.226.8.96/28\",\r\n \"52.226.8.128/27\",\r\n \ - \ \"52.228.232.0/28\",\r\n \"52.229.80.64/27\",\r\n \"\ - 52.230.240.16/28\",\r\n \"52.230.240.32/28\",\r\n \"52.230.240.64/27\"\ - ,\r\n \"52.230.240.112/28\",\r\n \"52.230.240.128/28\",\r\ - \n \"52.230.240.160/27\",\r\n \"52.231.80.64/27\",\r\n \ - \ \"52.231.80.112/28\",\r\n \"52.231.80.128/28\",\r\n \ - \ \"52.231.80.160/27\",\r\n \"52.231.168.64/27\",\r\n \ - \ \"52.231.168.112/28\",\r\n \"52.231.168.128/28\",\r\n \ - \ \"52.231.208.16/28\",\r\n \"52.231.208.32/28\",\r\n \ - \ \"52.232.232.16/28\",\r\n \"52.232.232.32/28\",\r\n \ - \ \"52.232.232.80/28\",\r\n \"52.232.232.96/28\",\r\n \"\ - 52.232.232.128/27\",\r\n \"52.232.232.176/28\",\r\n \"52.232.232.192/28\"\ - ,\r\n \"52.234.176.48/28\",\r\n \"52.234.176.64/28\",\r\n\ - \ \"52.234.176.96/27\",\r\n \"52.236.40.16/28\",\r\n \ - \ \"52.236.40.32/28\",\r\n \"52.236.240.48/28\",\r\n \ - \ \"52.236.240.64/28\",\r\n \"52.237.104.16/28\",\r\n \ - \ \"52.237.104.32/28\",\r\n \"52.238.56.16/28\",\r\n \"\ - 52.238.56.32/28\",\r\n \"52.238.56.64/27\",\r\n \"52.238.56.112/28\"\ - ,\r\n \"52.238.56.128/28\",\r\n \"52.238.56.160/27\",\r\n\ - \ \"52.238.200.32/27\",\r\n \"52.239.104.16/28\",\r\n \ - \ \"52.239.104.32/28\",\r\n \"52.239.128.0/20\",\r\n \ - \ \"52.239.144.0/22\",\r\n \"52.239.148.0/27\",\r\n \ - \ \"52.239.148.64/26\",\r\n \"52.239.148.128/25\",\r\n \"\ - 52.239.149.0/24\",\r\n \"52.239.150.0/23\",\r\n \"52.239.152.0/21\"\ - ,\r\n \"52.239.160.0/22\",\r\n \"52.239.164.0/24\",\r\n\ - \ \"52.239.165.0/26\",\r\n \"52.239.165.160/27\",\r\n \ - \ \"52.239.165.192/26\",\r\n \"52.239.167.0/24\",\r\n \ - \ \"52.239.168.0/21\",\r\n \"52.239.176.128/25\",\r\n \ - \ \"52.239.177.0/24\",\r\n \"52.239.178.0/23\",\r\n \"\ - 52.239.180.0/22\",\r\n \"52.239.184.0/22\",\r\n \"52.239.188.0/23\"\ - ,\r\n \"52.239.190.0/24\",\r\n \"52.239.191.0/28\",\r\n\ - \ \"52.239.192.0/21\",\r\n \"52.239.200.0/22\",\r\n \ - \ \"52.239.205.0/24\",\r\n \"52.239.206.0/23\",\r\n \ - \ \"52.239.208.0/20\",\r\n \"52.239.224.0/19\",\r\n \"\ - 52.240.48.16/28\",\r\n \"52.240.48.32/28\",\r\n \"52.240.60.16/28\"\ - ,\r\n \"52.240.60.32/28\",\r\n \"52.240.60.64/27\",\r\n\ - \ \"52.241.88.16/28\",\r\n \"52.241.88.32/28\",\r\n \ - \ \"52.241.88.64/27\",\r\n \"52.245.40.0/24\",\r\n \ - \ \"104.41.232.16/28\",\r\n \"104.42.200.16/28\",\r\n \"\ - 104.46.31.16/28\",\r\n \"104.208.0.16/28\",\r\n \"104.208.0.48/28\"\ - ,\r\n \"104.208.128.16/28\",\r\n \"104.208.248.16/28\",\r\ - \n \"104.211.104.64/28\",\r\n \"104.211.104.96/28\",\r\n\ - \ \"104.211.104.128/28\",\r\n \"104.211.109.0/28\",\r\n\ - \ \"104.211.109.32/27\",\r\n \"104.211.109.80/28\",\r\n\ - \ \"104.211.109.96/28\",\r\n \"104.211.168.16/28\",\r\n\ - \ \"104.211.232.16/28\",\r\n \"104.211.232.48/28\",\r\n\ - \ \"104.211.232.80/28\",\r\n \"104.211.232.176/28\",\r\n\ - \ \"104.214.40.16/28\",\r\n \"104.214.80.16/28\",\r\n \ - \ \"104.214.80.48/28\",\r\n \"104.214.152.16/28\",\r\n \ - \ \"104.214.152.176/28\",\r\n \"104.214.243.32/28\",\r\n \ - \ \"104.215.32.16/28\",\r\n \"104.215.32.32/28\",\r\n \ - \ \"104.215.32.64/27\",\r\n \"104.215.35.32/27\",\r\n \ - \ \"104.215.104.64/28\",\r\n \"104.215.240.64/28\",\r\n \ - \ \"104.215.240.96/28\",\r\n \"137.116.1.0/25\",\r\n \ - \ \"137.116.2.0/25\",\r\n \"137.116.3.0/25\",\r\n \"137.116.3.128/26\"\ - ,\r\n \"137.116.96.0/25\",\r\n \"137.116.96.128/26\",\r\n\ - \ \"137.135.192.64/26\",\r\n \"137.135.192.192/26\",\r\n\ - \ \"137.135.193.192/26\",\r\n \"137.135.194.0/25\",\r\n\ - \ \"137.135.194.192/26\",\r\n \"138.91.96.64/26\",\r\n \ - \ \"138.91.96.128/26\",\r\n \"138.91.128.128/26\",\r\n \ - \ \"138.91.129.0/26\",\r\n \"157.56.216.0/26\",\r\n \ - \ \"168.61.57.64/26\",\r\n \"168.61.57.128/25\",\r\n \ - \ \"168.61.58.0/26\",\r\n \"168.61.58.128/26\",\r\n \"168.61.59.64/26\"\ - ,\r\n \"168.61.61.0/26\",\r\n \"168.61.61.192/26\",\r\n\ - \ \"168.61.120.32/27\",\r\n \"168.61.120.64/27\",\r\n \ - \ \"168.61.121.0/26\",\r\n \"168.61.128.192/26\",\r\n \ - \ \"168.61.129.0/25\",\r\n \"168.61.130.64/26\",\r\n \ - \ \"168.61.130.128/25\",\r\n \"168.61.131.0/26\",\r\n \ - \ \"168.61.131.128/25\",\r\n \"168.61.132.0/26\",\r\n \"\ - 168.62.0.0/26\",\r\n \"168.62.1.128/26\",\r\n \"168.62.32.0/26\"\ - ,\r\n \"168.62.32.192/26\",\r\n \"168.62.33.128/26\",\r\n\ - \ \"168.62.96.128/25\",\r\n \"168.62.128.128/26\",\r\n \ - \ \"168.63.0.0/26\",\r\n \"168.63.2.64/26\",\r\n \ - \ \"168.63.3.32/27\",\r\n \"168.63.3.64/27\",\r\n \"168.63.32.0/26\"\ - ,\r\n \"168.63.33.192/26\",\r\n \"168.63.89.64/26\",\r\n\ - \ \"168.63.89.128/26\",\r\n \"168.63.113.32/27\",\r\n \ - \ \"168.63.113.64/27\",\r\n \"168.63.128.0/26\",\r\n \ - \ \"168.63.128.128/25\",\r\n \"168.63.129.128/25\",\r\n \ - \ \"168.63.130.0/26\",\r\n \"168.63.130.128/26\",\r\n \ - \ \"168.63.131.0/26\",\r\n \"168.63.156.64/26\",\r\n \"\ - 168.63.156.192/26\",\r\n \"168.63.160.0/26\",\r\n \"168.63.160.192/26\"\ - ,\r\n \"168.63.161.64/26\",\r\n \"168.63.161.160/27\",\r\ - \n \"168.63.161.192/26\",\r\n \"168.63.162.32/27\",\r\n\ - \ \"168.63.162.64/26\",\r\n \"168.63.162.144/28\",\r\n \ - \ \"168.63.162.192/26\",\r\n \"168.63.163.128/26\",\r\n \ - \ \"168.63.180.64/26\",\r\n \"191.232.216.32/27\",\r\n \ - \ \"191.232.221.16/28\",\r\n \"191.232.221.32/28\",\r\n \ - \ \"191.233.128.0/24\",\r\n \"191.235.192.192/26\",\r\n \ - \ \"191.235.193.32/28\",\r\n \"191.235.248.0/23\",\r\n \ - \ \"191.235.250.0/25\",\r\n \"191.235.255.192/26\",\r\n \ - \ \"191.237.32.128/28\",\r\n \"191.237.32.208/28\",\r\n \ - \ \"191.237.32.240/28\",\r\n \"191.237.160.64/26\",\r\n \ - \ \"191.237.160.224/28\",\r\n \"191.237.232.32/28\",\r\n \ - \ \"191.237.232.128/28\",\r\n \"191.237.238.32/28\",\r\n \ - \ \"191.238.0.0/26\",\r\n \"191.238.0.224/28\",\r\n \ - \ \"191.238.64.64/26\",\r\n \"191.238.64.192/28\",\r\n \ - \ \"191.238.66.0/26\",\r\n \"191.239.192.0/26\",\r\n \ - \ \"191.239.203.0/28\",\r\n \"191.239.224.0/26\",\r\n \"\ - 2603:1000:5::/48\",\r\n \"2603:1000:105::/48\",\r\n \"2603:1010:7::/48\"\ - ,\r\n \"2603:1010:206::/48\",\r\n \"2603:1010:305::/48\"\ - ,\r\n \"2603:1010:405::/48\",\r\n \"2603:1020:6::/48\",\r\ - \n \"2603:1020:101::/48\",\r\n \"2603:1020:207::/48\",\r\ - \n \"2603:1020:606::/48\",\r\n \"2603:1020:706::/48\",\r\ - \n \"2603:1020:806::/48\",\r\n \"2603:1020:906::/48\",\r\ - \n \"2603:1020:a05::/48\",\r\n \"2603:1020:b05::/48\",\r\ - \n \"2603:1020:c05::/48\",\r\n \"2603:1020:d05::/48\",\r\ - \n \"2603:1020:e05::/48\",\r\n \"2603:1020:f05::/48\",\r\ - \n \"2603:1020:1005::/48\",\r\n \"2603:1020:1105::/48\"\ - ,\r\n \"2603:1020:1106::/47\",\r\n \"2603:1020:1201::/48\"\ - ,\r\n \"2603:1020:1301::/48\",\r\n \"2603:1030:11::/48\"\ - ,\r\n \"2603:1030:12::/48\",\r\n \"2603:1030:108::/47\"\ - ,\r\n \"2603:1030:213::/48\",\r\n \"2603:1030:40f::/48\"\ - ,\r\n \"2603:1030:410::/48\",\r\n \"2603:1030:505::/48\"\ - ,\r\n \"2603:1030:609::/48\",\r\n \"2603:1030:80b::/48\"\ - ,\r\n \"2603:1030:80c::/48\",\r\n \"2603:1030:a0a::/48\"\ - ,\r\n \"2603:1030:b06::/48\",\r\n \"2603:1030:d01::/48\"\ - ,\r\n \"2603:1030:f08::/48\",\r\n \"2603:1030:1006::/48\"\ - ,\r\n \"2603:1040:6::/48\",\r\n \"2603:1040:104::/48\",\r\ - \n \"2603:1040:208::/48\",\r\n \"2603:1040:408::/48\",\r\ - \n \"2603:1040:607::/48\",\r\n \"2603:1040:807::/48\",\r\ - \n \"2603:1040:905::/48\",\r\n \"2603:1040:a07::/48\",\r\ - \n \"2603:1040:b05::/48\",\r\n \"2603:1040:c07::/48\",\r\ - \n \"2603:1040:d00::/48\",\r\n \"2603:1040:e06::/48\",\r\ - \n \"2603:1040:f06::/48\",\r\n \"2603:1040:1004::/48\",\r\ - \n \"2603:1040:1100::/48\",\r\n \"2603:1050:7::/48\",\r\n\ - \ \"2603:1050:214::/48\",\r\n \"2603:1050:404::/48\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.AustraliaCentral\"\ - ,\r\n \"id\": \"Storage.AustraliaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.35.0/24\"\ - ,\r\n \"20.60.214.0/23\",\r\n \"20.150.124.0/24\",\r\n \ - \ \"20.157.138.0/24\",\r\n \"52.239.216.0/23\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.AustraliaCentral2\"\ - ,\r\n \"id\": \"Storage.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"australiacentral2\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": [\r\ - \n \"20.47.36.0/24\",\r\n \"20.150.103.0/24\",\r\n \ - \ \"52.239.218.0/23\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"Storage.AustraliaEast\",\r\n \"id\": \"Storage.AustraliaEast\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"australiaeast\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.70.99.16/28\",\r\n \ - \ \"13.70.99.48/28\",\r\n \"13.70.99.64/28\",\r\n \"13.72.235.64/28\"\ - ,\r\n \"13.72.235.96/27\",\r\n \"13.72.235.144/28\",\r\n\ - \ \"13.72.237.48/28\",\r\n \"13.72.237.64/28\",\r\n \ - \ \"13.75.240.16/28\",\r\n \"13.75.240.32/28\",\r\n \ - \ \"13.75.240.64/27\",\r\n \"20.38.112.0/23\",\r\n \"20.47.37.0/24\"\ - ,\r\n \"20.60.72.0/22\",\r\n \"20.60.182.0/23\",\r\n \ - \ \"20.150.66.0/24\",\r\n \"20.150.92.0/24\",\r\n \ - \ \"20.150.117.0/24\",\r\n \"20.157.44.0/24\",\r\n \"20.157.155.0/24\"\ - ,\r\n \"52.239.130.0/23\",\r\n \"52.239.226.0/24\",\r\n\ - \ \"104.46.31.16/28\",\r\n \"191.238.66.0/26\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.AustraliaSoutheast\"\ - ,\r\n \"id\": \"Storage.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\"\ - ,\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"\ - NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \ - \ \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": [\r\ - \n \"13.77.8.16/28\",\r\n \"13.77.8.32/28\",\r\n \ - \ \"13.77.8.64/28\",\r\n \"13.77.8.96/28\",\r\n \"13.77.8.128/27\"\ - ,\r\n \"13.77.8.160/28\",\r\n \"13.77.8.192/27\",\r\n \ - \ \"20.47.38.0/24\",\r\n \"20.60.32.0/23\",\r\n \"\ - 20.150.12.0/23\",\r\n \"20.150.119.0/24\",\r\n \"20.157.45.0/24\"\ - ,\r\n \"52.239.132.0/23\",\r\n \"52.239.225.0/24\",\r\n\ - \ \"191.239.192.0/26\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"Storage.BrazilSouth\",\r\n \"id\": \"Storage.BrazilSouth\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"brazilsouth\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.39.0/24\",\r\n \ - \ \"20.60.36.0/23\",\r\n \"20.150.111.0/24\",\r\n \"20.157.55.0/24\"\ - ,\r\n \"20.209.12.0/23\",\r\n \"23.97.112.64/26\",\r\n \ - \ \"191.232.216.32/27\",\r\n \"191.232.221.16/28\",\r\n \ - \ \"191.232.221.32/28\",\r\n \"191.233.128.0/24\",\r\n \ - \ \"191.235.248.0/23\",\r\n \"191.235.250.0/25\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.BrazilSoutheast\"\ - ,\r\n \"id\": \"Storage.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.150.73.0/24\"\ - ,\r\n \"20.150.80.0/24\",\r\n \"20.150.123.0/24\",\r\n \ - \ \"20.157.42.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"Storage.CanadaCentral\",\r\n \"id\": \"Storage.CanadaCentral\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"canadacentral\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.38.114.0/25\",\r\n \ - \ \"20.47.40.0/24\",\r\n \"20.60.42.0/23\",\r\n \"20.60.242.0/23\"\ - ,\r\n \"20.150.16.0/24\",\r\n \"20.150.31.0/24\",\r\n \ - \ \"20.150.71.0/24\",\r\n \"20.150.100.0/24\",\r\n \ - \ \"20.157.52.0/24\",\r\n \"20.157.148.0/24\",\r\n \"\ - 40.85.232.64/28\",\r\n \"40.85.232.96/28\",\r\n \"40.85.232.144/28\"\ - ,\r\n \"40.85.235.32/27\",\r\n \"40.85.235.80/28\",\r\n\ - \ \"40.85.235.96/28\",\r\n \"52.239.148.64/26\",\r\n \ - \ \"52.239.189.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"Storage.CanadaEast\",\r\n \"id\": \"Storage.CanadaEast\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"canadaeast\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.38.121.128/25\",\r\n \"\ - 20.47.41.0/24\",\r\n \"20.60.142.0/23\",\r\n \"20.150.1.0/25\"\ - ,\r\n \"20.150.40.128/25\",\r\n \"20.150.113.0/24\",\r\n\ - \ \"20.157.161.0/24\",\r\n \"40.86.232.64/28\",\r\n \ - \ \"40.86.232.96/28\",\r\n \"40.86.232.128/28\",\r\n \ - \ \"40.86.232.176/28\",\r\n \"40.86.232.192/28\",\r\n \ - \ \"52.229.80.64/27\",\r\n \"52.239.164.128/26\",\r\n \"\ - 52.239.190.0/25\"\r\n ]\r\n }\r\n },\r\n {\r\n \"name\"\ - : \"Storage.CentralIndia\",\r\n \"id\": \"Storage.CentralIndia\",\r\n\ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n\ - \ \"changeNumber\": \"2\",\r\n \"region\": \"centralindia\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.38.126.0/23\",\r\n \ - \ \"20.47.42.0/24\",\r\n \"20.60.84.0/23\",\r\n \"20.150.114.0/24\"\ - ,\r\n \"20.157.139.0/24\",\r\n \"52.239.135.64/26\",\r\n\ - \ \"52.239.202.0/24\",\r\n \"104.211.104.64/28\",\r\n \ - \ \"104.211.104.96/28\",\r\n \"104.211.104.128/28\",\r\n \ - \ \"104.211.109.0/28\",\r\n \"104.211.109.32/27\",\r\n \ - \ \"104.211.109.80/28\",\r\n \"104.211.109.96/28\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.CentralUS\"\ - ,\r\n \"id\": \"Storage.CentralUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"13.67.155.16/28\"\ - ,\r\n \"20.38.96.0/23\",\r\n \"20.38.122.0/23\",\r\n \ - \ \"20.47.58.0/23\",\r\n \"20.60.18.0/24\",\r\n \"\ - 20.60.30.0/23\",\r\n \"20.60.178.0/23\",\r\n \"20.60.194.0/23\"\ - ,\r\n \"20.60.240.0/23\",\r\n \"20.60.244.0/23\",\r\n \ - \ \"20.150.43.128/25\",\r\n \"20.150.58.0/24\",\r\n \ - \ \"20.150.63.0/24\",\r\n \"20.150.77.0/24\",\r\n \"\ - 20.150.89.0/24\",\r\n \"20.150.95.0/24\",\r\n \"20.157.34.0/23\"\ - ,\r\n \"20.157.142.0/23\",\r\n \"23.99.160.64/26\",\r\n\ - \ \"23.99.160.192/28\",\r\n \"40.69.176.16/28\",\r\n \ - \ \"40.83.24.16/28\",\r\n \"40.83.24.80/28\",\r\n \ - \ \"40.122.96.16/28\",\r\n \"40.122.216.16/28\",\r\n \"\ - 52.165.104.16/28\",\r\n \"52.165.104.32/28\",\r\n \"52.165.104.64/27\"\ - ,\r\n \"52.165.104.112/28\",\r\n \"52.165.136.32/28\",\r\ - \n \"52.165.240.64/28\",\r\n \"52.173.152.64/28\",\r\n \ - \ \"52.173.152.96/28\",\r\n \"52.176.224.64/28\",\r\n \ - \ \"52.176.224.96/28\",\r\n \"52.180.184.16/28\",\r\n \ - \ \"52.182.176.16/28\",\r\n \"52.182.176.32/28\",\r\n \ - \ \"52.182.176.64/27\",\r\n \"52.185.56.80/28\",\r\n \"\ - 52.185.56.96/28\",\r\n \"52.185.56.144/28\",\r\n \"52.185.56.160/28\"\ - ,\r\n \"52.185.112.16/28\",\r\n \"52.185.112.48/28\",\r\n\ - \ \"52.185.112.112/28\",\r\n \"52.228.232.0/28\",\r\n \ - \ \"52.230.240.16/28\",\r\n \"52.230.240.32/28\",\r\n \ - \ \"52.230.240.64/27\",\r\n \"52.230.240.112/28\",\r\n \ - \ \"52.230.240.128/28\",\r\n \"52.230.240.160/27\",\r\n \ - \ \"52.238.200.32/27\",\r\n \"52.239.150.0/23\",\r\n \ - \ \"52.239.177.32/27\",\r\n \"52.239.177.64/26\",\r\n \"\ - 52.239.177.128/25\",\r\n \"52.239.195.0/24\",\r\n \"52.239.234.0/23\"\ - ,\r\n \"104.208.0.16/28\",\r\n \"104.208.0.48/28\",\r\n\ - \ \"168.61.128.192/26\",\r\n \"168.61.129.0/25\",\r\n \ - \ \"168.61.130.64/26\",\r\n \"168.61.130.128/25\",\r\n \ - \ \"168.61.131.0/26\",\r\n \"168.61.131.128/25\",\r\n \ - \ \"168.61.132.0/26\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"Storage.CentralUSEUAP\",\r\n \"id\": \"Storage.CentralUSEUAP\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"centraluseuap\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.5.0/24\",\r\n \"\ - 20.60.24.0/23\",\r\n \"20.150.23.0/24\",\r\n \"20.150.47.0/25\"\ - ,\r\n \"40.83.24.96/27\",\r\n \"52.165.104.144/28\",\r\n\ - \ \"52.165.104.160/28\",\r\n \"52.185.112.80/28\",\r\n \ - \ \"52.239.177.0/27\",\r\n \"52.239.238.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.EastAsia\"\ - ,\r\n \"id\": \"Storage.EastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.43.0/24\"\ - ,\r\n \"20.60.86.0/23\",\r\n \"20.60.131.0/24\",\r\n \ - \ \"20.60.254.0/23\",\r\n \"20.150.1.128/25\",\r\n \ - \ \"20.150.22.0/24\",\r\n \"20.150.96.0/24\",\r\n \"20.157.53.0/24\"\ - ,\r\n \"40.83.104.176/28\",\r\n \"40.83.104.208/28\",\r\n\ - \ \"52.175.40.128/28\",\r\n \"52.175.112.16/28\",\r\n \ - \ \"52.184.40.16/28\",\r\n \"52.184.40.32/28\",\r\n \ - \ \"52.239.128.0/24\",\r\n \"52.239.224.0/24\",\r\n \"\ - 168.63.128.0/26\",\r\n \"168.63.128.128/25\",\r\n \"168.63.129.128/25\"\ - ,\r\n \"168.63.130.0/26\",\r\n \"168.63.130.128/26\",\r\n\ - \ \"168.63.131.0/26\",\r\n \"168.63.156.64/26\",\r\n \ - \ \"168.63.156.192/26\",\r\n \"191.237.238.32/28\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.EastUS\"\ - ,\r\n \"id\": \"Storage.EastUS\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"13.68.163.32/28\"\ - ,\r\n \"13.68.165.64/28\",\r\n \"13.68.167.240/28\",\r\n\ - \ \"13.82.33.32/28\",\r\n \"13.82.152.16/28\",\r\n \ - \ \"13.82.152.48/28\",\r\n \"13.82.152.80/28\",\r\n \ - \ \"20.38.98.0/24\",\r\n \"20.47.1.0/24\",\r\n \"20.47.16.0/23\"\ - ,\r\n \"20.47.31.0/24\",\r\n \"20.60.0.0/24\",\r\n \ - \ \"20.60.2.0/23\",\r\n \"20.60.6.0/23\",\r\n \"20.60.60.0/22\"\ - ,\r\n \"20.60.128.0/23\",\r\n \"20.60.134.0/23\",\r\n \ - \ \"20.60.146.0/23\",\r\n \"20.60.220.0/23\",\r\n \ - \ \"20.150.32.0/23\",\r\n \"20.150.90.0/24\",\r\n \"20.157.39.0/24\"\ - ,\r\n \"20.157.59.0/24\",\r\n \"20.157.132.0/24\",\r\n \ - \ \"20.157.147.0/24\",\r\n \"20.209.0.0/23\",\r\n \ - \ \"23.96.64.64/26\",\r\n \"40.71.104.16/28\",\r\n \"\ - 40.71.104.32/28\",\r\n \"40.71.240.16/28\",\r\n \"40.117.48.80/28\"\ - ,\r\n \"40.117.48.112/28\",\r\n \"40.117.104.16/28\",\r\n\ - \ \"52.179.24.16/28\",\r\n \"52.186.112.32/27\",\r\n \ - \ \"52.226.8.32/27\",\r\n \"52.226.8.80/28\",\r\n \ - \ \"52.226.8.96/28\",\r\n \"52.226.8.128/27\",\r\n \"52.234.176.48/28\"\ - ,\r\n \"52.234.176.64/28\",\r\n \"52.234.176.96/27\",\r\n\ - \ \"52.239.152.0/22\",\r\n \"52.239.168.0/22\",\r\n \ - \ \"52.239.207.192/26\",\r\n \"52.239.214.0/23\",\r\n \ - \ \"52.239.220.0/23\",\r\n \"52.239.246.0/23\",\r\n \"\ - 52.239.252.0/24\",\r\n \"52.240.48.16/28\",\r\n \"52.240.48.32/28\"\ - ,\r\n \"52.240.60.16/28\",\r\n \"52.240.60.32/28\",\r\n\ - \ \"52.240.60.64/27\",\r\n \"138.91.96.64/26\",\r\n \ - \ \"138.91.96.128/26\",\r\n \"168.62.32.0/26\",\r\n \ - \ \"168.62.32.192/26\",\r\n \"168.62.33.128/26\",\r\n \"\ - 191.237.32.128/28\",\r\n \"191.237.32.208/28\",\r\n \"191.237.32.240/28\"\ - ,\r\n \"191.238.0.0/26\",\r\n \"191.238.0.224/28\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.EastUS2\"\ - ,\r\n \"id\": \"Storage.EastUS2\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"13.68.120.64/28\"\ - ,\r\n \"13.77.112.16/28\",\r\n \"13.77.112.32/28\",\r\n\ - \ \"13.77.112.112/28\",\r\n \"13.77.112.128/28\",\r\n \ - \ \"13.77.115.16/28\",\r\n \"13.77.115.32/28\",\r\n \ - \ \"20.38.100.0/23\",\r\n \"20.47.60.0/23\",\r\n \"20.60.56.0/22\"\ - ,\r\n \"20.60.88.0/22\",\r\n \"20.60.132.0/23\",\r\n \ - \ \"20.60.180.0/23\",\r\n \"20.60.224.0/23\",\r\n \ - \ \"20.60.236.0/23\",\r\n \"20.150.29.0/24\",\r\n \"20.150.36.0/24\"\ - ,\r\n \"20.150.50.0/23\",\r\n \"20.150.72.0/24\",\r\n \ - \ \"20.150.82.0/24\",\r\n \"20.150.88.0/24\",\r\n \ - \ \"20.157.36.0/23\",\r\n \"20.157.48.0/23\",\r\n \"20.157.62.0/23\"\ - ,\r\n \"23.102.206.0/28\",\r\n \"23.102.206.128/28\",\r\n\ - \ \"23.102.206.192/28\",\r\n \"40.79.8.16/28\",\r\n \ - \ \"40.79.48.16/28\",\r\n \"40.84.8.32/28\",\r\n \"\ - 40.84.11.80/28\",\r\n \"40.123.16.16/28\",\r\n \"52.167.88.80/28\"\ - ,\r\n \"52.167.88.112/28\",\r\n \"52.167.240.16/28\",\r\n\ - \ \"52.177.208.80/28\",\r\n \"52.179.144.32/28\",\r\n \ - \ \"52.179.144.64/28\",\r\n \"52.179.240.16/28\",\r\n \ - \ \"52.179.240.48/28\",\r\n \"52.179.240.64/28\",\r\n \ - \ \"52.179.240.96/27\",\r\n \"52.179.240.144/28\",\r\n \ - \ \"52.179.240.160/28\",\r\n \"52.179.240.192/27\",\r\n \ - \ \"52.179.240.240/28\",\r\n \"52.179.241.0/28\",\r\n \ - \ \"52.179.241.32/27\",\r\n \"52.184.168.96/27\",\r\n \"\ - 52.225.136.16/28\",\r\n \"52.225.136.32/28\",\r\n \"52.225.240.0/28\"\ - ,\r\n \"52.232.232.16/28\",\r\n \"52.232.232.32/28\",\r\n\ - \ \"52.232.232.80/28\",\r\n \"52.232.232.96/28\",\r\n \ - \ \"52.232.232.128/27\",\r\n \"52.232.232.176/28\",\r\n \ - \ \"52.232.232.192/28\",\r\n \"52.239.156.0/24\",\r\n \ - \ \"52.239.157.0/25\",\r\n \"52.239.157.128/26\",\r\n \ - \ \"52.239.157.192/27\",\r\n \"52.239.172.0/22\",\r\n \ - \ \"52.239.184.0/25\",\r\n \"52.239.184.160/28\",\r\n \"\ - 52.239.184.192/27\",\r\n \"52.239.185.32/27\",\r\n \"52.239.192.0/26\"\ - ,\r\n \"52.239.192.64/28\",\r\n \"52.239.192.96/27\",\r\n\ - \ \"52.239.192.160/27\",\r\n \"52.239.192.192/26\",\r\n\ - \ \"52.239.198.0/25\",\r\n \"52.239.198.192/26\",\r\n \ - \ \"52.239.206.0/24\",\r\n \"52.239.207.32/28\",\r\n \ - \ \"52.239.207.64/26\",\r\n \"52.239.207.128/27\",\r\n \ - \ \"52.239.222.0/23\",\r\n \"104.208.128.16/28\",\r\n \ - \ \"104.208.248.16/28\",\r\n \"137.116.1.0/25\",\r\n \"\ - 137.116.2.0/26\",\r\n \"137.116.2.96/29\",\r\n \"137.116.2.104/30\"\ - ,\r\n \"137.116.2.108/32\",\r\n \"137.116.2.110/31\",\r\n\ - \ \"137.116.2.112/32\",\r\n \"137.116.2.114/32\",\r\n \ - \ \"137.116.2.116/30\",\r\n \"137.116.2.120/29\",\r\n \ - \ \"137.116.3.0/25\",\r\n \"137.116.3.128/26\",\r\n \ - \ \"137.116.96.0/25\",\r\n \"137.116.96.128/26\",\r\n \"\ - 191.237.160.64/26\",\r\n \"191.237.160.224/28\",\r\n \"\ - 191.239.224.0/26\"\r\n ]\r\n }\r\n },\r\n {\r\n \"\ - name\": \"Storage.EastUS2EUAP\",\r\n \"id\": \"Storage.EastUS2EUAP\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"4\",\r\n \"region\": \"eastus2euap\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.6.0/24\",\r\n \"\ - 20.60.154.0/23\",\r\n \"20.60.184.0/23\",\r\n \"20.60.238.0/23\"\ - ,\r\n \"20.150.108.0/24\",\r\n \"20.157.58.0/24\",\r\n \ - \ \"20.157.149.0/24\",\r\n \"40.70.88.0/30\",\r\n \ - \ \"40.70.88.4/31\",\r\n \"40.70.88.6/32\",\r\n \"40.70.88.8/31\"\ - ,\r\n \"40.70.88.10/32\",\r\n \"40.70.88.12/32\",\r\n \ - \ \"40.70.88.14/31\",\r\n \"40.79.88.16/30\",\r\n \ - \ \"40.79.88.20/31\",\r\n \"40.79.88.22/32\",\r\n \"40.79.88.24/31\"\ - ,\r\n \"40.79.88.26/32\",\r\n \"40.79.88.28/32\",\r\n \ - \ \"40.79.88.30/31\",\r\n \"52.184.168.32/30\",\r\n \ - \ \"52.184.168.36/31\",\r\n \"52.184.168.38/32\",\r\n \ - \ \"52.184.168.40/31\",\r\n \"52.184.168.42/32\",\r\n \"\ - 52.184.168.44/32\",\r\n \"52.184.168.46/31\",\r\n \"52.239.157.224/27\"\ - ,\r\n \"52.239.165.192/26\",\r\n \"52.239.184.176/28\",\r\ - \n \"52.239.184.224/27\",\r\n \"52.239.185.0/28\",\r\n \ - \ \"52.239.192.128/27\",\r\n \"52.239.198.128/27\",\r\n \ - \ \"52.239.230.0/24\",\r\n \"52.239.239.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.EastUS2Stage\"\ - ,\r\n \"id\": \"Storage.EastUS2Stage\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"137.116.2.64/27\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.FranceCentral\"\ - ,\r\n \"id\": \"Storage.FranceCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.44.0/24\"\ - ,\r\n \"20.60.13.0/24\",\r\n \"20.60.156.0/23\",\r\n \ - \ \"20.150.61.0/24\",\r\n \"20.157.129.0/24\",\r\n \ - \ \"20.209.8.0/23\",\r\n \"52.239.134.0/24\",\r\n \"52.239.194.0/24\"\ - ,\r\n \"52.239.241.0/24\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"Storage.FranceSouth\",\r\n \"id\": \"Storage.FranceSouth\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"southfrance\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.28.0/24\",\r\n \ - \ \"20.60.11.0/24\",\r\n \"20.60.188.0/23\",\r\n \"20.150.19.0/24\"\ - ,\r\n \"20.157.156.0/24\",\r\n \"52.239.135.0/26\",\r\n\ - \ \"52.239.196.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"Storage.GermanyNorth\",\r\n \"id\": \"Storage.GermanyNorth\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"1\",\r\n \"region\": \"germanyn\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.38.115.0/24\",\r\n \"\ - 20.47.45.0/24\",\r\n \"20.150.60.0/24\",\r\n \"20.150.112.0/24\"\ - \r\n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.GermanyWestCentral\"\ - ,\r\n \"id\": \"Storage.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.118.0/24\"\ - ,\r\n \"20.47.27.0/24\",\r\n \"20.60.22.0/23\",\r\n \ - \ \"20.150.54.0/24\",\r\n \"20.150.125.0/24\",\r\n \ - \ \"20.157.160.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"Storage.JapanEast\",\r\n \"id\": \"Storage.JapanEast\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"japaneast\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.73.8.16/28\",\r\n \"13.73.8.32/28\"\ - ,\r\n \"20.38.116.0/23\",\r\n \"20.47.12.0/24\",\r\n \ - \ \"20.60.172.0/23\",\r\n \"20.60.248.0/23\",\r\n \ - \ \"20.150.85.0/24\",\r\n \"20.150.105.0/24\",\r\n \"20.157.38.0/24\"\ - ,\r\n \"20.157.144.0/24\",\r\n \"23.98.57.64/26\",\r\n \ - \ \"40.115.169.32/28\",\r\n \"40.115.175.16/28\",\r\n \ - \ \"40.115.175.32/28\",\r\n \"40.115.227.80/28\",\r\n \ - \ \"40.115.229.16/28\",\r\n \"40.115.229.32/28\",\r\n \ - \ \"40.115.231.64/27\",\r\n \"40.115.231.112/28\",\r\n \ - \ \"40.115.231.128/28\",\r\n \"52.239.144.0/23\"\r\n ]\r\n\ - \ }\r\n },\r\n {\r\n \"name\": \"Storage.JapanWest\",\r\n\ - \ \"id\": \"Storage.JapanWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.10.0/24\"\ - ,\r\n \"20.60.12.0/24\",\r\n \"20.60.186.0/23\",\r\n \ - \ \"20.150.10.0/23\",\r\n \"20.157.56.0/24\",\r\n \ - \ \"20.209.16.0/23\",\r\n \"23.98.56.0/26\",\r\n \"52.239.146.0/23\"\ - ,\r\n \"104.214.152.16/28\",\r\n \"104.214.152.176/28\"\ - ,\r\n \"104.215.32.16/28\",\r\n \"104.215.32.32/28\",\r\n\ - \ \"104.215.32.64/27\",\r\n \"104.215.35.32/27\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.JioIndiaCentral\"\ - ,\r\n \"id\": \"Storage.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.60.170.0/23\"\ - ,\r\n \"20.150.64.0/24\",\r\n \"20.150.109.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.JioIndiaWest\"\ - ,\r\n \"id\": \"Storage.JioIndiaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.60.54.0/23\"\ - ,\r\n \"20.150.65.0/24\",\r\n \"20.150.97.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.KoreaCentral\"\ - ,\r\n \"id\": \"Storage.KoreaCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.46.0/24\"\ - ,\r\n \"20.60.16.0/24\",\r\n \"20.60.200.0/23\",\r\n \ - \ \"20.150.4.0/23\",\r\n \"20.157.140.0/24\",\r\n \ - \ \"52.231.80.64/27\",\r\n \"52.231.80.112/28\",\r\n \"\ - 52.231.80.128/28\",\r\n \"52.231.80.160/27\",\r\n \"52.239.148.0/27\"\ - ,\r\n \"52.239.164.192/26\",\r\n \"52.239.190.128/26\"\r\ - \n ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.KoreaSouth\"\ - ,\r\n \"id\": \"Storage.KoreaSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.47.0/24\"\ - ,\r\n \"20.60.202.0/23\",\r\n \"20.150.14.0/23\",\r\n \ - \ \"20.157.137.0/24\",\r\n \"52.231.168.64/27\",\r\n \ - \ \"52.231.168.112/28\",\r\n \"52.231.168.128/28\",\r\n \ - \ \"52.231.208.16/28\",\r\n \"52.231.208.32/28\",\r\n \ - \ \"52.239.165.0/26\",\r\n \"52.239.165.160/27\",\r\n \ - \ \"52.239.190.192/26\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"Storage.NorthCentralUS\",\r\n \"id\": \"Storage.NorthCentralUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"northcentralus\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.3.0/24\",\r\n \"\ - 20.47.15.0/24\",\r\n \"20.60.28.0/23\",\r\n \"20.60.82.0/23\"\ - ,\r\n \"20.150.17.0/25\",\r\n \"20.150.25.0/24\",\r\n \ - \ \"20.150.49.0/24\",\r\n \"20.150.67.0/24\",\r\n \ - \ \"20.150.126.0/24\",\r\n \"20.157.47.0/24\",\r\n \"23.98.49.0/26\"\ - ,\r\n \"23.98.49.192/26\",\r\n \"23.98.55.0/26\",\r\n \ - \ \"23.98.55.112/28\",\r\n \"23.98.55.144/28\",\r\n \ - \ \"40.116.120.16/28\",\r\n \"40.116.232.16/28\",\r\n \ - \ \"40.116.232.48/28\",\r\n \"40.116.232.96/28\",\r\n \"\ - 52.162.56.16/28\",\r\n \"52.162.56.32/28\",\r\n \"52.162.56.64/27\"\ - ,\r\n \"52.162.56.112/28\",\r\n \"52.162.56.128/28\",\r\n\ - \ \"52.239.149.0/24\",\r\n \"52.239.186.0/24\",\r\n \ - \ \"52.239.253.0/24\",\r\n \"157.56.216.0/26\",\r\n \ - \ \"168.62.96.128/26\",\r\n \"168.62.96.210/32\",\r\n \"\ - 168.62.96.224/27\"\r\n ]\r\n }\r\n },\r\n {\r\n \"\ - name\": \"Storage.NorthCentralUSStage\",\r\n \"id\": \"Storage.NorthCentralUSStage\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"1\",\r\n \"region\": \"northcentralus\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"168.62.96.192/29\",\r\n \ - \ \"168.62.96.200/30\",\r\n \"168.62.96.204/32\",\r\n \ - \ \"168.62.96.206/31\",\r\n \"168.62.96.208/32\",\r\n \"\ - 168.62.96.212/30\",\r\n \"168.62.96.216/29\"\r\n ]\r\n \ - \ }\r\n },\r\n {\r\n \"name\": \"Storage.NorthEurope\",\r\n \ - \ \"id\": \"Storage.NorthEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"13.70.208.16/28\"\ - ,\r\n \"13.74.208.64/28\",\r\n \"13.74.208.112/28\",\r\n\ - \ \"13.74.208.144/28\",\r\n \"13.79.176.16/28\",\r\n \ - \ \"13.79.176.48/28\",\r\n \"13.79.176.80/28\",\r\n \ - \ \"20.38.102.0/23\",\r\n \"20.47.8.0/24\",\r\n \"20.47.20.0/23\"\ - ,\r\n \"20.47.32.0/24\",\r\n \"20.60.19.0/24\",\r\n \ - \ \"20.60.40.0/23\",\r\n \"20.60.144.0/23\",\r\n \"\ - 20.60.204.0/23\",\r\n \"20.60.246.0/23\",\r\n \"20.150.26.0/24\"\ - ,\r\n \"20.150.47.128/25\",\r\n \"20.150.48.0/24\",\r\n\ - \ \"20.150.75.0/24\",\r\n \"20.150.84.0/24\",\r\n \ - \ \"20.150.104.0/24\",\r\n \"20.157.60.0/24\",\r\n \"\ - 20.157.159.0/24\",\r\n \"20.209.14.0/23\",\r\n \"40.85.105.32/28\"\ - ,\r\n \"40.113.27.176/28\",\r\n \"52.164.112.16/28\",\r\n\ - \ \"52.164.232.16/28\",\r\n \"52.164.232.32/28\",\r\n \ - \ \"52.164.232.64/28\",\r\n \"52.169.168.32/27\",\r\n \ - \ \"52.169.240.16/28\",\r\n \"52.169.240.32/28\",\r\n \ - \ \"52.169.240.64/28\",\r\n \"52.178.168.32/27\",\r\n \ - \ \"52.178.168.80/28\",\r\n \"52.178.168.96/28\",\r\n \"\ - 52.178.168.128/27\",\r\n \"52.236.40.16/28\",\r\n \"52.236.40.32/28\"\ - ,\r\n \"52.239.136.0/22\",\r\n \"52.239.205.0/24\",\r\n\ - \ \"52.239.248.0/24\",\r\n \"52.245.40.0/24\",\r\n \ - \ \"104.41.232.16/28\",\r\n \"137.135.192.64/26\",\r\n \ - \ \"137.135.192.192/26\",\r\n \"137.135.193.192/26\",\r\n \ - \ \"137.135.194.0/25\",\r\n \"137.135.194.192/26\",\r\n \ - \ \"168.61.120.32/27\",\r\n \"168.61.120.64/27\",\r\n \ - \ \"168.61.121.0/26\",\r\n \"168.63.32.0/26\",\r\n \"\ - 168.63.33.192/26\",\r\n \"191.235.192.192/26\",\r\n \"191.235.193.32/28\"\ - ,\r\n \"191.235.255.192/26\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"Storage.NorwayEast\",\r\n \"id\": \"Storage.NorwayEast\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"norwaye\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.38.120.0/24\",\r\n \"\ - 20.47.48.0/24\",\r\n \"20.60.206.0/23\",\r\n \"20.150.53.0/24\"\ - ,\r\n \"20.150.121.0/24\"\r\n ]\r\n }\r\n },\r\n \ - \ {\r\n \"name\": \"Storage.NorwayWest\",\r\n \"id\": \"Storage.NorwayWest\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"1\",\r\n \"region\": \"norwayw\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.49.0/24\",\r\n \"20.60.15.0/24\"\ - ,\r\n \"20.150.0.0/24\",\r\n \"20.150.56.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.SouthAfricaNorth\"\ - ,\r\n \"id\": \"Storage.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.114.128/25\"\ - ,\r\n \"20.47.50.0/24\",\r\n \"20.60.190.0/23\",\r\n \ - \ \"20.150.21.0/24\",\r\n \"20.150.62.0/24\",\r\n \ - \ \"20.150.101.0/24\",\r\n \"52.239.232.0/25\"\r\n ]\r\n \ - \ }\r\n },\r\n {\r\n \"name\": \"Storage.SouthAfricaWest\"\ - ,\r\n \"id\": \"Storage.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\ - \n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.121.0/25\"\ - ,\r\n \"20.47.51.0/24\",\r\n \"20.60.8.0/24\",\r\n \ - \ \"20.60.210.0/23\",\r\n \"20.150.20.0/25\",\r\n \"\ - 52.239.232.128/25\"\r\n ]\r\n }\r\n },\r\n {\r\n \"\ - name\": \"Storage.SouthCentralUS\",\r\n \"id\": \"Storage.SouthCentralUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"southcentralus\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.65.107.32/28\",\r\n \ - \ \"13.65.160.16/28\",\r\n \"13.65.160.48/28\",\r\n \"\ - 13.65.160.64/28\",\r\n \"13.84.56.16/28\",\r\n \"13.85.88.16/28\"\ - ,\r\n \"13.85.200.128/28\",\r\n \"20.38.104.0/23\",\r\n\ - \ \"20.47.0.0/27\",\r\n \"20.47.24.0/23\",\r\n \ - \ \"20.47.29.0/24\",\r\n \"20.60.48.0/22\",\r\n \"20.60.64.0/22\"\ - ,\r\n \"20.60.140.0/23\",\r\n \"20.60.148.0/23\",\r\n \ - \ \"20.60.160.0/23\",\r\n \"20.150.20.128/25\",\r\n \ - \ \"20.150.38.0/23\",\r\n \"20.150.70.0/24\",\r\n \"\ - 20.150.79.0/24\",\r\n \"20.150.93.0/24\",\r\n \"20.150.94.0/24\"\ - ,\r\n \"20.157.43.0/24\",\r\n \"20.157.54.0/24\",\r\n \ - \ \"20.157.134.0/24\",\r\n \"23.98.160.64/26\",\r\n \ - \ \"23.98.162.192/26\",\r\n \"23.98.168.0/24\",\r\n \"\ - 23.98.192.64/26\",\r\n \"23.98.255.64/26\",\r\n \"52.171.144.32/27\"\ - ,\r\n \"52.171.144.80/28\",\r\n \"52.171.144.96/28\",\r\n\ - \ \"52.171.144.128/28\",\r\n \"52.185.233.0/24\",\r\n \ - \ \"52.189.177.0/24\",\r\n \"52.239.158.0/23\",\r\n \ - \ \"52.239.178.0/23\",\r\n \"52.239.180.0/22\",\r\n \"\ - 52.239.199.0/24\",\r\n \"52.239.200.0/23\",\r\n \"52.239.203.0/24\"\ - ,\r\n \"52.239.208.0/23\",\r\n \"104.214.40.16/28\",\r\n\ - \ \"104.214.80.16/28\",\r\n \"104.214.80.48/28\",\r\n \ - \ \"104.215.104.64/28\",\r\n \"168.62.128.128/26\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.SouthCentralUSSTG\"\ - ,\r\n \"id\": \"Storage.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.110.0/23\"\ - ,\r\n \"20.47.14.0/24\",\r\n \"20.60.9.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.SoutheastAsia\"\ - ,\r\n \"id\": \"Storage.SoutheastAsia\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"13.76.104.16/28\"\ - ,\r\n \"20.47.9.0/24\",\r\n \"20.47.33.0/24\",\r\n \ - \ \"20.60.136.0/24\",\r\n \"20.60.138.0/23\",\r\n \"\ - 20.150.17.128/25\",\r\n \"20.150.28.0/24\",\r\n \"20.150.86.0/24\"\ - ,\r\n \"20.150.127.0/24\",\r\n \"20.157.128.0/24\",\r\n\ - \ \"52.163.176.16/28\",\r\n \"52.163.232.16/28\",\r\n \ - \ \"52.187.141.32/27\",\r\n \"52.237.104.16/28\",\r\n \ - \ \"52.237.104.32/28\",\r\n \"52.239.129.0/24\",\r\n \ - \ \"52.239.197.0/24\",\r\n \"52.239.227.0/24\",\r\n \"\ - 52.239.249.0/24\",\r\n \"104.215.240.64/28\",\r\n \"104.215.240.96/28\"\ - ,\r\n \"168.63.160.0/26\",\r\n \"168.63.160.192/26\",\r\n\ - \ \"168.63.161.64/26\",\r\n \"168.63.161.160/27\",\r\n \ - \ \"168.63.161.192/26\",\r\n \"168.63.162.32/27\",\r\n \ - \ \"168.63.162.64/26\",\r\n \"168.63.162.144/28\",\r\n \ - \ \"168.63.162.192/26\",\r\n \"168.63.163.128/26\",\r\n \ - \ \"168.63.180.64/26\",\r\n \"191.238.64.64/26\",\r\n \ - \ \"191.238.64.192/28\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"Storage.SouthIndia\",\r\n \"id\": \"Storage.SouthIndia\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"southindia\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.52.0/24\",\r\n \"20.60.10.0/24\"\ - ,\r\n \"20.60.226.0/23\",\r\n \"20.150.24.0/24\",\r\n \ - \ \"20.157.135.0/24\",\r\n \"52.172.16.16/28\",\r\n \ - \ \"52.172.16.80/28\",\r\n \"52.172.16.96/28\",\r\n \"\ - 52.172.16.128/27\",\r\n \"52.239.135.128/26\",\r\n \"52.239.188.0/24\"\ - ,\r\n \"104.211.232.16/28\",\r\n \"104.211.232.48/28\",\r\ - \n \"104.211.232.80/28\",\r\n \"104.211.232.176/28\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.SwedenCentral\"\ - ,\r\n \"id\": \"Storage.SwedenCentral\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\ - \n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.60.78.0/23\"\ - ,\r\n \"20.60.234.0/23\",\r\n \"20.60.252.0/23\",\r\n \ - \ \"20.150.44.0/24\",\r\n \"20.150.120.0/24\"\r\n ]\r\ - \n }\r\n },\r\n {\r\n \"name\": \"Storage.SwitzerlandNorth\"\ - ,\r\n \"id\": \"Storage.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.53.0/24\"\ - ,\r\n \"20.60.174.0/23\",\r\n \"20.150.59.0/24\",\r\n \ - \ \"20.150.118.0/24\",\r\n \"52.239.251.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.SwitzerlandWest\"\ - ,\r\n \"id\": \"Storage.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n\ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\ - ,\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.26.0/24\"\ - ,\r\n \"20.60.176.0/23\",\r\n \"20.150.55.0/24\",\r\n \ - \ \"20.150.116.0/24\",\r\n \"20.157.133.0/24\",\r\n \ - \ \"52.239.250.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\n \ - \ \"name\": \"Storage.UAECentral\",\r\n \"id\": \"Storage.UAECentral\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"uaecentral\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.54.0/24\",\r\n \"20.150.6.0/23\"\ - ,\r\n \"20.150.115.0/24\",\r\n \"20.157.131.0/24\",\r\n\ - \ \"52.239.233.0/25\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"Storage.UAENorth\",\r\n \"id\": \"Storage.UAENorth\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"uaenorth\",\r\n\ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.38.124.0/23\",\r\n \"\ - 20.47.55.0/24\",\r\n \"20.60.21.0/24\",\r\n \"20.60.212.0/23\"\ - ,\r\n \"20.157.141.0/24\",\r\n \"52.239.233.128/25\"\r\n\ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.UKSouth\"\ - ,\r\n \"id\": \"Storage.UKSouth\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\ - \n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.106.0/23\"\ - ,\r\n \"20.47.11.0/24\",\r\n \"20.47.34.0/24\",\r\n \ - \ \"20.60.17.0/24\",\r\n \"20.60.166.0/23\",\r\n \"\ - 20.150.18.0/25\",\r\n \"20.150.40.0/25\",\r\n \"20.150.41.0/24\"\ - ,\r\n \"20.150.69.0/24\",\r\n \"20.157.157.0/24\",\r\n \ - \ \"20.209.6.0/23\",\r\n \"51.140.16.16/28\",\r\n \ - \ \"51.140.16.32/28\",\r\n \"51.140.168.64/27\",\r\n \"\ - 51.140.168.112/28\",\r\n \"51.140.168.128/28\",\r\n \"51.141.128.32/27\"\ - ,\r\n \"51.141.129.64/26\",\r\n \"51.141.130.0/25\",\r\n\ - \ \"52.239.187.0/25\",\r\n \"52.239.231.0/24\"\r\n \ - \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.UKWest\"\ - ,\r\n \"id\": \"Storage.UKWest\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\ - \n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n\ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.56.0/24\"\ - ,\r\n \"20.60.164.0/23\",\r\n \"20.150.2.0/23\",\r\n \ - \ \"20.150.52.0/24\",\r\n \"20.150.110.0/24\",\r\n \ - \ \"20.157.46.0/24\",\r\n \"51.140.232.64/27\",\r\n \"\ - 51.140.232.112/28\",\r\n \"51.140.232.128/28\",\r\n \"51.140.232.160/27\"\ - ,\r\n \"51.141.128.0/27\",\r\n \"51.141.128.64/26\",\r\n\ - \ \"51.141.128.128/25\",\r\n \"51.141.129.128/26\",\r\n\ - \ \"52.239.240.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\ - \n \"name\": \"Storage.WestCentralUS\",\r\n \"id\": \"Storage.WestCentralUS\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"3\",\r\n \"region\": \"westcentralus\"\ - ,\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"\ - FW\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.71.200.64/28\",\r\n \ - \ \"13.71.200.96/28\",\r\n \"13.71.200.240/28\",\r\n \"\ - 13.71.202.16/28\",\r\n \"13.71.202.32/28\",\r\n \"13.71.202.64/27\"\ - ,\r\n \"13.78.152.64/28\",\r\n \"13.78.240.16/28\",\r\n\ - \ \"20.47.4.0/24\",\r\n \"20.60.4.0/24\",\r\n \"\ - 20.60.218.0/23\",\r\n \"20.150.81.0/24\",\r\n \"20.150.98.0/24\"\ - ,\r\n \"20.157.41.0/24\",\r\n \"52.161.112.16/28\",\r\n\ - \ \"52.161.112.32/28\",\r\n \"52.161.168.16/28\",\r\n \ - \ \"52.161.168.32/28\",\r\n \"52.239.164.0/25\",\r\n \ - \ \"52.239.167.0/24\",\r\n \"52.239.244.0/23\"\r\n ]\r\ - \n }\r\n },\r\n {\r\n \"name\": \"Storage.WestEurope\",\r\n\ - \ \"id\": \"Storage.WestEurope\",\r\n \"serviceTagChangeNumber\"\ - : \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\ - \n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\ - \n \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"13.69.40.16/28\"\ - ,\r\n \"13.95.96.176/28\",\r\n \"13.95.240.16/28\",\r\n\ - \ \"13.95.240.32/28\",\r\n \"13.95.240.64/27\",\r\n \ - \ \"20.38.108.0/23\",\r\n \"20.47.7.0/24\",\r\n \"\ - 20.47.18.0/23\",\r\n \"20.47.30.0/24\",\r\n \"20.60.26.0/23\"\ - ,\r\n \"20.60.130.0/24\",\r\n \"20.60.150.0/23\",\r\n \ - \ \"20.60.196.0/23\",\r\n \"20.60.222.0/23\",\r\n \ - \ \"20.60.250.0/23\",\r\n \"20.150.8.0/23\",\r\n \"20.150.37.0/24\"\ - ,\r\n \"20.150.42.0/24\",\r\n \"20.150.74.0/24\",\r\n \ - \ \"20.150.76.0/24\",\r\n \"20.150.83.0/24\",\r\n \ - \ \"20.150.122.0/24\",\r\n \"20.157.33.0/24\",\r\n \"20.157.146.0/24\"\ - ,\r\n \"20.157.158.0/24\",\r\n \"20.209.10.0/23\",\r\n \ - \ \"40.68.176.16/28\",\r\n \"40.68.176.48/28\",\r\n \ - \ \"40.68.232.16/28\",\r\n \"40.68.232.48/28\",\r\n \ - \ \"40.114.152.16/28\",\r\n \"40.114.152.48/28\",\r\n \"\ - 40.118.72.176/28\",\r\n \"40.118.73.48/28\",\r\n \"40.118.73.176/28\"\ - ,\r\n \"40.118.73.208/28\",\r\n \"52.166.80.32/27\",\r\n\ - \ \"52.166.80.80/28\",\r\n \"52.166.80.96/28\",\r\n \ - \ \"52.174.8.32/28\",\r\n \"52.174.224.16/28\",\r\n \ - \ \"52.174.224.32/28\",\r\n \"52.174.224.64/27\",\r\n \"\ - 52.174.224.112/28\",\r\n \"52.174.224.128/28\",\r\n \"52.236.240.48/28\"\ - ,\r\n \"52.236.240.64/28\",\r\n \"52.239.140.0/22\",\r\n\ - \ \"52.239.212.0/23\",\r\n \"52.239.242.0/23\",\r\n \ - \ \"104.214.243.32/28\",\r\n \"168.61.57.64/26\",\r\n \ - \ \"168.61.57.128/25\",\r\n \"168.61.58.0/26\",\r\n \"\ - 168.61.58.128/26\",\r\n \"168.61.59.64/26\",\r\n \"168.61.61.0/26\"\ - ,\r\n \"168.61.61.192/26\",\r\n \"168.63.0.0/26\",\r\n \ - \ \"168.63.2.64/26\",\r\n \"168.63.3.32/27\",\r\n \ - \ \"168.63.3.64/27\",\r\n \"168.63.113.32/27\",\r\n \"\ - 168.63.113.64/27\",\r\n \"191.237.232.32/28\",\r\n \"191.237.232.128/28\"\ - ,\r\n \"191.239.203.0/28\"\r\n ]\r\n }\r\n },\r\n\ - \ {\r\n \"name\": \"Storage.WestIndia\",\r\n \"id\": \"Storage.WestIndia\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"2\",\r\n \"region\": \"westindia\",\r\ - \n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"20.47.57.0/24\",\r\n \"20.60.216.0/23\"\ - ,\r\n \"20.150.18.128/25\",\r\n \"20.150.43.0/25\",\r\n\ - \ \"20.150.106.0/24\",\r\n \"20.157.136.0/24\",\r\n \ - \ \"52.239.135.192/26\",\r\n \"52.239.187.128/25\",\r\n \ - \ \"104.211.168.16/28\"\r\n ]\r\n }\r\n },\r\n {\r\n\ - \ \"name\": \"Storage.WestUS\",\r\n \"id\": \"Storage.WestUS\",\r\ - \n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n\ - \ \"changeNumber\": \"5\",\r\n \"region\": \"westus\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \ - \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\ - \r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n \ - \ \"addressPrefixes\": [\r\n \"13.83.72.16/28\",\r\n \"\ - 13.88.144.112/28\",\r\n \"13.88.144.240/28\",\r\n \"13.88.145.64/28\"\ - ,\r\n \"13.88.145.96/28\",\r\n \"13.88.145.128/28\",\r\n\ - \ \"13.93.168.80/28\",\r\n \"13.93.168.112/28\",\r\n \ - \ \"13.93.168.144/28\",\r\n \"20.47.2.0/24\",\r\n \ - \ \"20.47.22.0/23\",\r\n \"20.60.1.0/24\",\r\n \"20.60.34.0/23\"\ - ,\r\n \"20.60.52.0/23\",\r\n \"20.60.80.0/23\",\r\n \ - \ \"20.60.168.0/23\",\r\n \"20.60.230.0/23\",\r\n \"\ - 20.60.232.0/23\",\r\n \"20.150.34.0/23\",\r\n \"20.150.91.0/24\"\ - ,\r\n \"20.150.102.0/24\",\r\n \"20.157.32.0/24\",\r\n \ - \ \"20.157.57.0/24\",\r\n \"20.157.130.0/24\",\r\n \ - \ \"23.99.32.64/26\",\r\n \"23.99.34.224/28\",\r\n \"\ - 23.99.37.96/28\",\r\n \"23.99.47.32/28\",\r\n \"40.78.72.16/28\"\ - ,\r\n \"40.78.112.64/28\",\r\n \"40.83.225.32/28\",\r\n\ - \ \"40.83.227.16/28\",\r\n \"40.112.152.16/28\",\r\n \ - \ \"40.112.224.16/28\",\r\n \"40.112.224.48/28\",\r\n \ - \ \"52.180.40.16/28\",\r\n \"52.180.40.32/28\",\r\n \ - \ \"52.190.240.16/28\",\r\n \"52.190.240.32/28\",\r\n \"\ - 52.190.240.64/27\",\r\n \"52.190.240.112/28\",\r\n \"52.190.240.128/28\"\ - ,\r\n \"52.225.40.32/27\",\r\n \"52.238.56.16/28\",\r\n\ - \ \"52.238.56.32/28\",\r\n \"52.238.56.64/27\",\r\n \ - \ \"52.238.56.112/28\",\r\n \"52.238.56.128/28\",\r\n \ - \ \"52.238.56.160/27\",\r\n \"52.239.104.16/28\",\r\n \ - \ \"52.239.104.32/28\",\r\n \"52.239.160.0/22\",\r\n \"\ - 52.239.228.0/23\",\r\n \"52.239.254.0/23\",\r\n \"52.241.88.16/28\"\ - ,\r\n \"52.241.88.32/28\",\r\n \"52.241.88.64/27\",\r\n\ - \ \"104.42.200.16/28\",\r\n \"138.91.128.128/26\",\r\n \ - \ \"138.91.129.0/26\",\r\n \"168.62.0.0/26\",\r\n \ - \ \"168.62.1.128/26\",\r\n \"168.63.89.64/26\",\r\n \"\ - 168.63.89.128/26\"\r\n ]\r\n }\r\n },\r\n {\r\n \"\ - name\": \"Storage.WestUS2\",\r\n \"id\": \"Storage.WestUS2\",\r\n \ - \ \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\n \ - \ \"changeNumber\": \"3\",\r\n \"region\": \"westus2\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"\ - API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n\ - \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"\ - addressPrefixes\": [\r\n \"13.66.176.16/28\",\r\n \"13.66.176.48/28\"\ - ,\r\n \"13.66.232.64/28\",\r\n \"13.66.232.208/28\",\r\n\ - \ \"13.66.232.224/28\",\r\n \"13.66.234.0/27\",\r\n \ - \ \"13.77.184.64/28\",\r\n \"20.38.99.0/24\",\r\n \"\ - 20.47.62.0/23\",\r\n \"20.60.20.0/24\",\r\n \"20.60.68.0/22\"\ - ,\r\n \"20.60.152.0/23\",\r\n \"20.60.228.0/23\",\r\n \ - \ \"20.150.68.0/24\",\r\n \"20.150.78.0/24\",\r\n \ - \ \"20.150.87.0/24\",\r\n \"20.150.107.0/24\",\r\n \"20.157.50.0/23\"\ - ,\r\n \"52.183.48.16/28\",\r\n \"52.183.104.16/28\",\r\n\ - \ \"52.183.104.32/28\",\r\n \"52.191.176.16/28\",\r\n \ - \ \"52.191.176.32/28\",\r\n \"52.239.148.128/25\",\r\n \ - \ \"52.239.176.128/25\",\r\n \"52.239.193.0/24\",\r\n \ - \ \"52.239.210.0/23\",\r\n \"52.239.236.0/23\"\r\n ]\r\ - \n }\r\n },\r\n {\r\n \"name\": \"Storage.WestUS3\",\r\n \ - \ \"id\": \"Storage.WestUS3\",\r\n \"serviceTagChangeNumber\": \"\ - 74\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \ - \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \ - \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n \ - \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\"\ - : \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.60.14.0/24\"\ - ,\r\n \"20.60.38.0/23\",\r\n \"20.60.162.0/23\",\r\n \ - \ \"20.150.30.0/24\",\r\n \"20.157.40.0/24\",\r\n \ - \ \"20.157.145.0/24\",\r\n \"20.209.4.0/23\"\r\n ]\r\n \ - \ }\r\n },\r\n {\r\n \"name\": \"StorageSyncService\",\r\n \ - \ \"id\": \"StorageSyncService\",\r\n \"serviceTagChangeNumber\":\ - \ \"74\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\ - \n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"StorageSyncService\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.70.176.196/32\",\r\n\ - \ \"13.73.248.112/29\",\r\n \"13.75.153.240/32\",\r\n \ - \ \"13.76.81.46/32\",\r\n \"20.21.42.120/29\",\r\n \ - \ \"20.36.120.216/29\",\r\n \"20.37.64.216/29\",\r\n \"\ - 20.37.157.80/29\",\r\n \"20.37.195.96/29\",\r\n \"20.37.224.216/29\"\ - ,\r\n \"20.38.85.152/29\",\r\n \"20.38.136.224/29\",\r\n\ - \ \"20.39.11.96/29\",\r\n \"20.41.5.144/29\",\r\n \ - \ \"20.41.65.184/29\",\r\n \"20.41.193.160/29\",\r\n \ - \ \"20.42.4.248/29\",\r\n \"20.42.131.224/29\",\r\n \"20.42.227.128/29\"\ - ,\r\n \"20.43.42.8/29\",\r\n \"20.43.66.0/29\",\r\n \ - \ \"20.43.131.40/29\",\r\n \"20.45.71.151/32\",\r\n \ - \ \"20.45.112.216/29\",\r\n \"20.45.192.248/29\",\r\n \"\ - 20.45.208.0/29\",\r\n \"20.50.1.0/29\",\r\n \"20.72.27.184/29\"\ - ,\r\n \"20.150.172.40/29\",\r\n \"20.189.108.56/29\",\r\n\ - \ \"20.192.32.232/29\",\r\n \"20.193.205.128/29\",\r\n \ - \ \"23.100.106.151/32\",\r\n \"23.102.225.54/32\",\r\n \ - \ \"40.67.48.208/29\",\r\n \"40.80.57.192/29\",\r\n \ - \ \"40.80.169.176/29\",\r\n \"40.80.188.24/29\",\r\n \ - \ \"40.82.253.192/29\",\r\n \"40.89.17.232/29\",\r\n \"\ - 40.112.150.67/32\",\r\n \"40.113.94.67/32\",\r\n \"40.123.47.110/32\"\ - ,\r\n \"40.123.216.130/32\",\r\n \"51.12.101.240/29\",\r\ - \n \"51.12.204.248/29\",\r\n \"51.104.25.224/29\",\r\n \ - \ \"51.105.80.208/29\",\r\n \"51.105.88.248/29\",\r\n \ - \ \"51.107.48.224/29\",\r\n \"51.107.144.216/29\",\r\n \ - \ \"51.116.60.244/30\",\r\n \"51.116.245.168/30\",\r\n \ - \ \"51.120.40.224/29\",\r\n \"51.120.224.216/29\",\r\n \ - \ \"51.137.161.240/29\",\r\n \"51.140.67.72/32\",\r\n \ - \ \"51.140.202.34/32\",\r\n \"51.143.192.208/29\",\r\n \ - \ \"52.136.48.216/29\",\r\n \"52.136.131.99/32\",\r\n \"\ - 52.140.105.184/29\",\r\n \"52.143.166.54/32\",\r\n \"52.150.139.104/29\"\ - ,\r\n \"52.161.25.233/32\",\r\n \"52.176.149.179/32\",\r\ - \n \"52.183.27.204/32\",\r\n \"52.225.171.85/32\",\r\n \ - \ \"52.228.42.41/32\",\r\n \"52.228.81.248/29\",\r\n \ - \ \"52.231.67.75/32\",\r\n \"52.231.159.38/32\",\r\n \ - \ \"52.235.36.119/32\",\r\n \"65.52.62.167/32\",\r\n \"\ - 102.133.56.128/29\",\r\n \"102.133.75.173/32\",\r\n \"102.133.175.72/32\"\ - ,\r\n \"104.40.191.8/32\",\r\n \"104.41.148.238/32\",\r\n\ - \ \"104.41.161.113/32\",\r\n \"104.208.61.223/32\",\r\n\ - \ \"104.210.219.252/32\",\r\n \"104.211.73.56/32\",\r\n\ - \ \"104.211.231.18/32\",\r\n \"104.214.165.88/29\",\r\n\ - \ \"191.233.9.96/29\",\r\n \"191.235.225.216/29\",\r\n \ - \ \"191.237.253.115/32\",\r\n \"2603:1000:4::340/123\",\r\ - \n \"2603:1000:104:1::300/123\",\r\n \"2603:1010:6:1::300/123\"\ - ,\r\n \"2603:1010:101::340/123\",\r\n \"2603:1010:304::340/123\"\ - ,\r\n \"2603:1010:404::340/123\",\r\n \"2603:1020:5:1::300/123\"\ - ,\r\n \"2603:1020:206:1::300/123\",\r\n \"2603:1020:305::340/123\"\ - ,\r\n \"2603:1020:405::340/123\",\r\n \"2603:1020:605::340/123\"\ - ,\r\n \"2603:1020:705:1::300/123\",\r\n \"2603:1020:805:1::300/123\"\ - ,\r\n \"2603:1020:905::340/123\",\r\n \"2603:1020:a04:1::300/123\"\ - ,\r\n \"2603:1020:b04::340/123\",\r\n \"2603:1020:c04:1::300/123\"\ - ,\r\n \"2603:1020:d04::340/123\",\r\n \"2603:1020:e04:1::300/123\"\ - ,\r\n \"2603:1020:e04:802::2a0/123\",\r\n \"2603:1020:f04::340/123\"\ - ,\r\n \"2603:1020:1004::300/123\",\r\n \"2603:1020:1004:800::120/123\"\ - ,\r\n \"2603:1020:1104:400::320/123\",\r\n \"2603:1030:f:1::340/123\"\ - ,\r\n \"2603:1030:f:400::dc0/123\",\r\n \"2603:1030:10:1::300/123\"\ - ,\r\n \"2603:1030:104:1::300/123\",\r\n \"2603:1030:104:402::760/123\"\ - ,\r\n \"2603:1030:107:400::2a0/123\",\r\n \"2603:1030:210:1::300/123\"\ - ,\r\n \"2603:1030:40b:1::300/123\",\r\n \"2603:1030:40c:1::300/123\"\ - ,\r\n \"2603:1030:504:1::300/123\",\r\n \"2603:1030:504:802::120/123\"\ - ,\r\n \"2603:1030:608::340/123\",\r\n \"2603:1030:807:1::300/123\"\ - ,\r\n \"2603:1030:a07::340/123\",\r\n \"2603:1030:b04::340/123\"\ - ,\r\n \"2603:1030:c06:1::300/123\",\r\n \"2603:1030:f05:1::300/123\"\ - ,\r\n \"2603:1030:1005::340/123\",\r\n \"2603:1040:5:1::300/123\"\ - ,\r\n \"2603:1040:207::340/123\",\r\n \"2603:1040:207:402::5c0/123\"\ - ,\r\n \"2603:1040:407:1::300/123\",\r\n \"2603:1040:606::340/123\"\ - ,\r\n \"2603:1040:806::340/123\",\r\n \"2603:1040:904:1::300/123\"\ - ,\r\n \"2603:1040:a06:1::300/123\",\r\n \"2603:1040:a06:802::2a0/123\"\ - ,\r\n \"2603:1040:b04::340/123\",\r\n \"2603:1040:c06::340/123\"\ - ,\r\n \"2603:1040:d04::300/123\",\r\n \"2603:1040:d04:800::120/123\"\ - ,\r\n \"2603:1040:f05:1::300/123\",\r\n \"2603:1040:f05:802::2a0/123\"\ - ,\r\n \"2603:1040:1002:400::240/123\",\r\n \"2603:1040:1104:400::320/123\"\ - ,\r\n \"2603:1050:6:1::300/123\",\r\n \"2603:1050:6:802::2a0/123\"\ - ,\r\n \"2603:1050:403::300/123\"\r\n ]\r\n }\r\n },\r\ - \n {\r\n \"name\": \"WindowsAdminCenter\",\r\n \"id\": \"WindowsAdminCenter\"\ - ,\r\n \"serviceTagChangeNumber\": \"74\",\r\n \"properties\": {\r\ - \n \"changeNumber\": \"1\",\r\n \"region\": \"\",\r\n \ - \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\"\ - ,\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n \ - \ ],\r\n \"systemService\": \"WindowsAdminCenter\",\r\n \"\ - addressPrefixes\": [\r\n \"13.73.255.240/29\",\r\n \"20.21.34.136/29\"\ - ,\r\n \"20.36.125.96/29\",\r\n \"20.37.68.232/29\",\r\n\ - \ \"20.37.229.144/29\",\r\n \"20.38.142.80/29\",\r\n \ - \ \"20.40.224.232/29\",\r\n \"20.43.46.240/29\",\r\n \ - \ \"20.45.115.136/29\",\r\n \"20.46.10.32/29\",\r\n \"\ - 20.48.192.88/29\",\r\n \"20.49.102.232/29\",\r\n \"20.49.115.176/29\"\ - ,\r\n \"20.51.8.80/29\",\r\n \"20.51.16.112/29\",\r\n \ - \ \"20.53.44.8/29\",\r\n \"20.61.98.72/29\",\r\n \ - \ \"20.62.128.152/29\",\r\n \"20.66.2.0/29\",\r\n \"20.72.17.120/29\"\ - ,\r\n \"20.150.161.152/29\",\r\n \"20.187.196.200/29\",\r\ - \n \"20.191.160.120/29\",\r\n \"20.192.161.128/29\",\r\n\ - \ \"20.192.230.8/29\",\r\n \"20.194.72.48/29\",\r\n \ - \ \"23.98.108.160/29\",\r\n \"40.67.52.80/29\",\r\n \ - \ \"40.80.63.248/29\",\r\n \"40.80.173.136/29\",\r\n \"\ - 40.89.23.224/29\",\r\n \"51.12.42.72/29\",\r\n \"51.12.194.96/29\"\ - ,\r\n \"51.13.136.0/29\",\r\n \"51.107.53.56/29\",\r\n \ - \ \"51.107.149.240/29\",\r\n \"51.116.51.40/29\",\r\n \ - \ \"51.116.148.96/29\",\r\n \"51.120.44.200/29\",\r\n \ - \ \"51.137.167.144/29\",\r\n \"51.143.208.136/29\",\r\n \ - \ \"52.136.52.224/29\",\r\n \"52.136.184.8/29\",\r\n \ - \ \"52.140.110.168/29\",\r\n \"52.146.131.56/29\",\r\n \ - \ \"52.150.156.224/29\",\r\n \"52.172.112.144/29\",\r\n \ - \ \"102.133.60.40/29\",\r\n \"102.133.220.200/29\",\r\n \ - \ \"104.46.178.8/29\",\r\n \"191.233.14.200/29\",\r\n \"\ - 191.234.138.152/29\",\r\n \"2603:1020:a04::690/125\",\r\n \ - \ \"2603:1020:e04::350/125\",\r\n \"2603:1020:1004:1::1a8/125\"\ - ,\r\n \"2603:1020:1104::5a8/125\",\r\n \"2603:1030:f:1::2b0/125\"\ - ,\r\n \"2603:1030:104::6c0/125\",\r\n \"2603:1030:107::588/125\"\ - ,\r\n \"2603:1030:504::1a8/125\",\r\n \"2603:1040:207:1::460/125\"\ - ,\r\n \"2603:1040:a06::7c0/125\",\r\n \"2603:1040:d04:1::1a8/125\"\ - ,\r\n \"2603:1040:f05::350/125\",\r\n \"2603:1040:1002::788/125\"\ - ,\r\n \"2603:1040:1104::5a8/125\"\r\n ]\r\n }\r\n \ - \ },\r\n {\r\n \"name\": \"WindowsVirtualDesktop\",\r\n \"id\"\ - : \"WindowsVirtualDesktop\",\r\n \"serviceTagChangeNumber\": \"74\",\r\ - \n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \"\ - region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\"\ - : [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n\ - \ \"FW\"\r\n ],\r\n \"systemService\": \"WindowsVirtualDesktop\"\ - ,\r\n \"addressPrefixes\": [\r\n \"13.66.251.49/32\",\r\n\ - \ \"13.67.68.78/32\",\r\n \"13.68.24.173/32\",\r\n \ - \ \"13.68.76.104/32\",\r\n \"13.69.82.138/32\",\r\n \ - \ \"13.69.156.85/32\",\r\n \"13.70.40.201/32\",\r\n \"13.70.120.215/32\"\ - ,\r\n \"13.71.5.20/32\",\r\n \"13.71.67.87/32\",\r\n \ - \ \"13.71.81.161/32\",\r\n \"13.71.95.31/32\",\r\n \ - \ \"13.71.113.6/32\",\r\n \"13.73.237.154/32\",\r\n \"\ - 13.75.114.143/32\",\r\n \"13.75.171.61/32\",\r\n \"13.75.198.169/32\"\ - ,\r\n \"13.76.88.89/32\",\r\n \"13.76.195.19/32\",\r\n \ - \ \"13.76.230.148/32\",\r\n \"13.77.45.213/32\",\r\n \ - \ \"13.77.140.58/32\",\r\n \"13.79.243.194/32\",\r\n \ - \ \"13.88.221.28/32\",\r\n \"13.88.254.98/32\",\r\n \"\ - 20.36.33.29/32\",\r\n \"20.36.33.170/32\",\r\n \"20.36.35.190/32\"\ - ,\r\n \"20.36.38.195/32\",\r\n \"20.36.39.50/32\",\r\n \ - \ \"20.36.39.171/32\",\r\n \"20.36.41.74/32\",\r\n \ - \ \"20.41.77.252/32\",\r\n \"20.45.64.86/32\",\r\n \"\ - 20.45.67.112/32\",\r\n \"20.45.67.185/32\",\r\n \"20.45.79.3/32\"\ - ,\r\n \"20.45.79.24/32\",\r\n \"20.45.79.91/32\",\r\n \ - \ \"20.45.79.96/32\",\r\n \"20.45.79.168/32\",\r\n \ - \ \"20.46.46.252/32\",\r\n \"20.74.152.13/32\",\r\n \"\ - 20.74.154.246/32\",\r\n \"20.74.156.183/32\",\r\n \"20.74.178.102/32\"\ - ,\r\n \"20.74.182.99/32\",\r\n \"20.96.12.123/32\",\r\n\ - \ \"20.151.111.129/32\",\r\n \"20.188.3.1/32\",\r\n \ - \ \"20.188.39.108/32\",\r\n \"20.188.41.240/32\",\r\n \ - \ \"20.188.45.82/32\",\r\n \"20.190.43.99/32\",\r\n \"\ - 20.203.0.247/32\",\r\n \"23.97.108.170/32\",\r\n \"23.98.66.174/32\"\ - ,\r\n \"23.98.133.187/32\",\r\n \"23.99.141.138/32\",\r\n\ - \ \"23.100.50.154/32\",\r\n \"23.100.98.36/32\",\r\n \ - \ \"23.101.5.54/32\",\r\n \"23.101.220.135/32\",\r\n \ - \ \"23.102.229.113/32\",\r\n \"40.65.122.222/32\",\r\n \ - \ \"40.68.18.120/32\",\r\n \"40.69.31.73/32\",\r\n \"\ - 40.69.90.166/32\",\r\n \"40.69.102.46/32\",\r\n \"40.69.149.151/32\"\ - ,\r\n \"40.70.189.87/32\",\r\n \"40.74.84.253/32\",\r\n\ - \ \"40.74.113.202/32\",\r\n \"40.74.118.163/32\",\r\n \ - \ \"40.74.136.34/32\",\r\n \"40.75.30.117/32\",\r\n \ - \ \"40.80.80.48/32\",\r\n \"40.83.79.39/32\",\r\n \"\ - 40.85.241.159/32\",\r\n \"40.86.204.245/32\",\r\n \"40.86.205.216/32\"\ - ,\r\n \"40.86.208.118/32\",\r\n \"40.86.222.183/32\",\r\n\ - \ \"40.89.129.146/32\",\r\n \"40.89.154.76/32\",\r\n \ - \ \"40.113.199.138/32\",\r\n \"40.113.200.58/32\",\r\n \ - \ \"40.114.241.90/32\",\r\n \"40.115.136.175/32\",\r\n \ - \ \"40.120.39.124/32\",\r\n \"40.122.28.196/32\",\r\n \ - \ \"40.122.212.20/32\",\r\n \"40.123.228.58/32\",\r\n \ - \ \"40.127.3.207/32\",\r\n \"51.11.13.248/32\",\r\n \"51.11.241.142/32\"\ - ,\r\n \"51.104.49.88/32\",\r\n \"51.105.54.123/32\",\r\n\ - \ \"51.107.68.172/32\",\r\n \"51.107.69.35/32\",\r\n \ - \ \"51.107.78.168/32\",\r\n \"51.107.85.67/32\",\r\n \ - \ \"51.107.85.110/32\",\r\n \"51.107.86.7/32\",\r\n \"\ - 51.107.86.99/32\",\r\n \"51.116.171.102/32\",\r\n \"51.116.182.248/32\"\ - ,\r\n \"51.116.225.43/32\",\r\n \"51.116.225.44/32\",\r\n\ - \ \"51.116.225.55/32\",\r\n \"51.116.236.74/32\",\r\n \ - \ \"51.116.236.84/32\",\r\n \"51.120.69.158/32\",\r\n \ - \ \"51.120.70.135/32\",\r\n \"51.120.70.141/32\",\r\n \ - \ \"51.120.77.155/32\",\r\n \"51.120.78.142/32\",\r\n \ - \ \"51.120.79.212/32\",\r\n \"51.120.88.120/32\",\r\n \"\ - 51.132.29.107/32\",\r\n \"51.136.28.200/32\",\r\n \"51.137.89.79/32\"\ - ,\r\n \"51.140.57.159/32\",\r\n \"51.140.206.110/32\",\r\ - \n \"51.140.231.223/32\",\r\n \"51.140.255.55/32\",\r\n\ - \ \"51.141.30.31/32\",\r\n \"51.141.122.89/32\",\r\n \ - \ \"51.141.173.236/32\",\r\n \"51.143.39.79/32\",\r\n \ - \ \"51.143.164.192/32\",\r\n \"51.143.169.107/32\",\r\n \ - \ \"51.145.17.75/32\",\r\n \"52.137.2.50/32\",\r\n \"\ - 52.138.9.153/32\",\r\n \"52.138.20.115/32\",\r\n \"52.138.28.23/32\"\ - ,\r\n \"52.141.37.201/32\",\r\n \"52.141.56.101/32\",\r\n\ - \ \"52.142.161.0/32\",\r\n \"52.142.162.226/32\",\r\n \ - \ \"52.143.96.87/32\",\r\n \"52.143.182.208/32\",\r\n \ - \ \"52.147.3.93/32\",\r\n \"52.147.160.158/32\",\r\n \ - \ \"52.151.53.196/32\",\r\n \"52.155.111.124/32\",\r\n \ - \ \"52.156.171.127/32\",\r\n \"52.163.209.255/32\",\r\n \ - \ \"52.164.126.124/32\",\r\n \"52.165.218.15/32\",\r\n \ - \ \"52.167.163.135/32\",\r\n \"52.167.171.53/32\",\r\n \"\ - 52.169.5.116/32\",\r\n \"52.171.36.33/32\",\r\n \"52.172.34.74/32\"\ - ,\r\n \"52.172.40.215/32\",\r\n \"52.172.133.5/32\",\r\n\ - \ \"52.172.194.109/32\",\r\n \"52.172.210.235/32\",\r\n\ - \ \"52.172.217.34/32\",\r\n \"52.172.223.46/32\",\r\n \ - \ \"52.173.89.168/32\",\r\n \"52.175.144.120/32\",\r\n \ - \ \"52.175.253.156/32\",\r\n \"52.177.123.162/32\",\r\n \ - \ \"52.177.172.247/32\",\r\n \"52.183.19.64/32\",\r\n \ - \ \"52.183.130.137/32\",\r\n \"52.185.202.152/32\",\r\n \ - \ \"52.187.127.152/32\",\r\n \"52.189.194.14/32\",\r\n \ - \ \"52.189.215.151/32\",\r\n \"52.189.233.158/32\",\r\n \ - \ \"52.191.129.231/32\",\r\n \"52.228.29.164/32\",\r\n \ - \ \"52.229.117.254/32\",\r\n \"52.229.125.45/32\",\r\n \ - \ \"52.229.207.180/32\",\r\n \"52.231.13.193/32\",\r\n \ - \ \"52.231.38.211/32\",\r\n \"52.231.93.224/32\",\r\n \"\ - 52.231.98.58/32\",\r\n \"52.231.155.130/32\",\r\n \"52.231.156.19/32\"\ - ,\r\n \"52.231.164.163/32\",\r\n \"52.231.166.199/32\",\r\ - \n \"52.231.195.7/32\",\r\n \"52.231.197.195/32\",\r\n \ - \ \"52.231.206.162/32\",\r\n \"52.233.16.198/32\",\r\n \ - \ \"52.237.20.14/32\",\r\n \"52.237.201.246/32\",\r\n \ - \ \"52.237.253.245/32\",\r\n \"52.242.86.101/32\",\r\n \ - \ \"52.243.65.107/32\",\r\n \"52.243.74.213/32\",\r\n \ - \ \"52.246.165.140/32\",\r\n \"52.246.177.221/32\",\r\n \ - \ \"52.246.191.98/32\",\r\n \"52.247.122.225/32\",\r\n \ - \ \"52.247.123.0/32\",\r\n \"52.255.40.105/32\",\r\n \"\ - 52.255.61.145/32\",\r\n \"65.52.71.120/32\",\r\n \"65.52.158.177/32\"\ - ,\r\n \"70.37.83.67/32\",\r\n \"70.37.86.126/32\",\r\n \ - \ \"70.37.99.24/32\",\r\n \"102.37.42.159/32\",\r\n \ - \ \"102.133.64.36/32\",\r\n \"102.133.64.68/32\",\r\n \ - \ \"102.133.64.91/32\",\r\n \"102.133.64.111/32\",\r\n \ - \ \"102.133.72.250/32\",\r\n \"102.133.75.8/32\",\r\n \"\ - 102.133.75.32/32\",\r\n \"102.133.75.35/32\",\r\n \"102.133.161.220/32\"\ - ,\r\n \"102.133.166.135/32\",\r\n \"102.133.172.191/32\"\ - ,\r\n \"102.133.175.200/32\",\r\n \"102.133.224.81/32\"\ - ,\r\n \"102.133.234.139/32\",\r\n \"104.40.156.194/32\"\ - ,\r\n \"104.41.5.162/32\",\r\n \"104.41.45.182/32\",\r\n\ - \ \"104.41.166.159/32\",\r\n \"104.43.169.4/32\",\r\n \ - \ \"104.46.237.209/32\",\r\n \"104.208.28.82/32\",\r\n \ - \ \"104.209.233.222/32\",\r\n \"104.210.150.160/32\",\r\n \ - \ \"104.211.78.17/32\",\r\n \"104.211.114.61/32\",\r\n \ - \ \"104.211.138.88/32\",\r\n \"104.211.140.190/32\",\r\n \ - \ \"104.211.155.114/32\",\r\n \"104.211.165.123/32\",\r\n\ - \ \"104.211.184.150/32\",\r\n \"104.211.188.151/32\",\r\n\ - \ \"104.211.211.213/32\",\r\n \"104.211.216.230/32\",\r\n\ - \ \"104.211.222.50/32\",\r\n \"104.211.242.104/32\",\r\n\ - \ \"104.214.60.144/32\",\r\n \"104.214.237.23/32\",\r\n\ - \ \"104.215.51.3/32\",\r\n \"104.215.103.51/32\",\r\n \ - \ \"104.215.112.85/32\",\r\n \"137.116.49.12/32\",\r\n \ - \ \"137.116.248.148/32\",\r\n \"137.117.171.26/32\",\r\n \ - \ \"137.135.243.65/32\",\r\n \"138.91.44.13/32\",\r\n \ - \ \"168.61.167.193/32\",\r\n \"168.63.31.54/32\",\r\n \ - \ \"168.63.71.119/32\",\r\n \"168.63.137.213/32\",\r\n \ - \ \"191.232.49.74/32\",\r\n \"191.232.166.149/32\",\r\n \ - \ \"191.232.235.70/32\",\r\n \"191.232.238.73/32\",\r\n \ - \ \"191.234.191.63/32\",\r\n \"191.235.65.127/32\",\r\n \ - \ \"191.235.72.175/32\",\r\n \"191.235.73.211/32\",\r\n \ - \ \"191.235.78.126/32\",\r\n \"191.239.248.16/32\"\r\n ]\r\ - \n }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}" + string: "{\r\n \"name\": \"Public\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/serviceTags/Public\",\r\n + \ \"type\": \"Microsoft.Network/serviceTags\",\r\n \"changeNumber\": \"75\",\r\n + \ \"cloud\": \"Public\",\r\n \"values\": [\r\n {\r\n \"name\": \"ActionGroup\",\r\n + \ \"id\": \"ActionGroup\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"ActionGroup\",\r\n \"addressPrefixes\": + [\r\n \"13.66.60.119/32\",\r\n \"13.66.143.220/30\",\r\n + \ \"13.66.202.14/32\",\r\n \"13.66.248.225/32\",\r\n \"13.66.249.211/32\",\r\n + \ \"13.67.10.124/30\",\r\n \"13.69.109.132/30\",\r\n \"13.71.199.112/30\",\r\n + \ \"13.77.53.216/30\",\r\n \"13.77.172.102/32\",\r\n \"13.77.183.209/32\",\r\n + \ \"13.78.109.156/30\",\r\n \"13.84.49.247/32\",\r\n \"13.84.51.172/32\",\r\n + \ \"13.84.52.58/32\",\r\n \"13.86.221.220/30\",\r\n \"13.106.38.142/32\",\r\n + \ \"13.106.38.148/32\",\r\n \"13.106.54.3/32\",\r\n \"13.106.54.19/32\",\r\n + \ \"13.106.57.181/32\",\r\n \"13.106.57.196/31\",\r\n \"20.21.42.88/30\",\r\n + \ \"20.38.149.132/30\",\r\n \"20.42.64.36/30\",\r\n \"20.43.121.124/30\",\r\n + \ \"20.44.17.220/30\",\r\n \"20.45.123.236/30\",\r\n \"20.72.27.152/30\",\r\n + \ \"20.135.74.3/32\",\r\n \"20.150.172.228/30\",\r\n \"20.192.238.124/30\",\r\n + \ \"20.193.202.4/30\",\r\n \"40.68.195.137/32\",\r\n \"40.68.201.58/32\",\r\n + \ \"40.68.201.65/32\",\r\n \"40.68.201.206/32\",\r\n \"40.68.201.211/32\",\r\n + \ \"40.68.204.18/32\",\r\n \"40.115.37.106/32\",\r\n \"40.121.219.215/32\",\r\n + \ \"40.121.221.62/32\",\r\n \"40.121.222.201/32\",\r\n \"40.121.223.186/32\",\r\n + \ \"51.12.101.172/30\",\r\n \"51.12.204.244/30\",\r\n \"51.104.9.100/30\",\r\n + \ \"52.183.20.244/32\",\r\n \"52.183.31.0/32\",\r\n \"52.183.94.59/32\",\r\n + \ \"52.184.145.166/32\",\r\n \"52.240.244.140/30\",\r\n \"104.214.165.80/30\",\r\n + \ \"168.61.142.52/30\",\r\n \"191.233.50.4/30\",\r\n \"191.233.207.64/26\",\r\n + \ \"2603:1000:4:402::178/125\",\r\n \"2603:1000:104:402::178/125\",\r\n + \ \"2603:1010:6:402::178/125\",\r\n \"2603:1010:101:402::178/125\",\r\n + \ \"2603:1010:304:402::178/125\",\r\n \"2603:1010:404:402::178/125\",\r\n + \ \"2603:1020:5:402::178/125\",\r\n \"2603:1020:206:402::178/125\",\r\n + \ \"2603:1020:305:402::178/125\",\r\n \"2603:1020:405:402::178/125\",\r\n + \ \"2603:1020:605:402::178/125\",\r\n \"2603:1020:705:402::178/125\",\r\n + \ \"2603:1020:805:402::178/125\",\r\n \"2603:1020:905:402::178/125\",\r\n + \ \"2603:1020:a04:402::178/125\",\r\n \"2603:1020:b04:402::178/125\",\r\n + \ \"2603:1020:c04:402::178/125\",\r\n \"2603:1020:d04:402::178/125\",\r\n + \ \"2603:1020:e04:402::178/125\",\r\n \"2603:1020:f04:402::178/125\",\r\n + \ \"2603:1020:1004:800::f8/125\",\r\n \"2603:1020:1104:400::178/125\",\r\n + \ \"2603:1030:f:400::978/125\",\r\n \"2603:1030:10:402::178/125\",\r\n + \ \"2603:1030:104:402::178/125\",\r\n \"2603:1030:107:400::f0/125\",\r\n + \ \"2603:1030:210:402::178/125\",\r\n \"2603:1030:40b:400::978/125\",\r\n + \ \"2603:1030:40c:402::178/125\",\r\n \"2603:1030:504:802::f8/125\",\r\n + \ \"2603:1030:608:402::178/125\",\r\n \"2603:1030:807:402::178/125\",\r\n + \ \"2603:1030:a07:402::8f8/125\",\r\n \"2603:1030:b04:402::178/125\",\r\n + \ \"2603:1030:c06:400::978/125\",\r\n \"2603:1030:f05:402::178/125\",\r\n + \ \"2603:1030:1005:402::178/125\",\r\n \"2603:1040:5:402::178/125\",\r\n + \ \"2603:1040:207:402::178/125\",\r\n \"2603:1040:407:402::178/125\",\r\n + \ \"2603:1040:606:402::178/125\",\r\n \"2603:1040:806:402::178/125\",\r\n + \ \"2603:1040:904:402::178/125\",\r\n \"2603:1040:a06:402::178/125\",\r\n + \ \"2603:1040:b04:402::178/125\",\r\n \"2603:1040:c06:402::178/125\",\r\n + \ \"2603:1040:d04:800::f8/125\",\r\n \"2603:1040:f05:402::178/125\",\r\n + \ \"2603:1040:1002:400::180/125\",\r\n \"2603:1040:1104:400::178/125\",\r\n + \ \"2603:1050:6:402::178/125\",\r\n \"2603:1050:403:400::1f8/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement\",\r\n + \ \"id\": \"ApiManagement\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"8\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.64.39.16/32\",\r\n \"13.66.138.92/31\",\r\n \"13.66.140.176/28\",\r\n + \ \"13.67.8.108/31\",\r\n \"13.67.9.208/28\",\r\n \"13.69.64.76/31\",\r\n + \ \"13.69.66.144/28\",\r\n \"13.69.227.76/31\",\r\n \"13.69.229.80/28\",\r\n + \ \"13.70.72.28/31\",\r\n \"13.70.72.240/28\",\r\n \"13.71.49.1/32\",\r\n + \ \"13.71.170.44/31\",\r\n \"13.71.172.144/28\",\r\n \"13.71.194.116/31\",\r\n + \ \"13.71.196.32/28\",\r\n \"13.75.34.148/31\",\r\n \"13.75.38.16/28\",\r\n + \ \"13.75.217.184/32\",\r\n \"13.75.221.78/32\",\r\n \"13.77.50.68/31\",\r\n + \ \"13.77.52.224/28\",\r\n \"13.78.106.92/31\",\r\n \"13.78.108.176/28\",\r\n + \ \"13.84.189.17/32\",\r\n \"13.85.22.63/32\",\r\n \"13.86.102.66/32\",\r\n + \ \"13.87.56.84/31\",\r\n \"13.87.57.144/28\",\r\n \"13.87.122.84/31\",\r\n + \ \"13.87.123.144/28\",\r\n \"13.89.170.204/31\",\r\n \"13.89.174.64/28\",\r\n + \ \"20.21.36.96/28\",\r\n \"20.36.106.68/31\",\r\n \"20.36.107.176/28\",\r\n + \ \"20.36.114.20/31\",\r\n \"20.36.115.128/28\",\r\n \"20.37.52.67/32\",\r\n + \ \"20.37.74.224/31\",\r\n \"20.37.76.32/28\",\r\n \"20.37.81.41/32\",\r\n + \ \"20.39.80.2/32\",\r\n \"20.39.99.81/32\",\r\n \"20.40.125.155/32\",\r\n + \ \"20.40.160.107/32\",\r\n \"20.40.231.62/31\",\r\n \"20.44.2.4/31\",\r\n + \ \"20.44.3.224/28\",\r\n \"20.44.33.246/32\",\r\n \"20.44.72.3/32\",\r\n + \ \"20.46.13.224/28\",\r\n \"20.46.144.85/32\",\r\n \"20.47.232.184/31\",\r\n + \ \"20.48.201.76/31\",\r\n \"20.52.94.112/31\",\r\n \"20.62.63.254/31\",\r\n + \ \"20.70.220.182/31\",\r\n \"20.72.26.16/28\",\r\n \"20.83.221.20/30\",\r\n + \ \"20.83.221.64/28\",\r\n \"20.83.221.86/31\",\r\n \"20.86.92.254/31\",\r\n + \ \"20.88.154.20/31\",\r\n \"20.90.131.114/31\",\r\n \"20.92.3.250/31\",\r\n + \ \"20.97.32.190/31\",\r\n \"20.99.8.80/28\",\r\n \"20.150.167.160/28\",\r\n + \ \"20.150.170.224/28\",\r\n \"20.188.77.119/32\",\r\n \"20.191.167.246/31\",\r\n + \ \"20.192.45.112/28\",\r\n \"20.192.50.64/28\",\r\n \"20.192.234.160/28\",\r\n + \ \"20.193.192.48/28\",\r\n \"20.193.202.160/28\",\r\n \"20.194.74.240/28\",\r\n + \ \"20.195.78.64/28\",\r\n \"23.96.224.175/32\",\r\n \"23.101.67.140/32\",\r\n + \ \"23.101.166.38/32\",\r\n \"40.66.60.111/32\",\r\n \"40.67.58.224/28\",\r\n + \ \"40.69.106.68/31\",\r\n \"40.69.107.224/28\",\r\n \"40.70.146.76/31\",\r\n + \ \"40.70.148.16/28\",\r\n \"40.71.10.204/31\",\r\n \"40.71.13.128/28\",\r\n + \ \"40.74.100.52/31\",\r\n \"40.74.101.48/28\",\r\n \"40.74.146.80/31\",\r\n + \ \"40.74.147.32/28\",\r\n \"40.78.194.68/31\",\r\n \"40.78.195.224/28\",\r\n + \ \"40.78.202.128/31\",\r\n \"40.78.203.160/28\",\r\n \"40.79.130.44/31\",\r\n + \ \"40.79.131.192/28\",\r\n \"40.79.178.68/31\",\r\n \"40.79.179.192/28\",\r\n + \ \"40.80.232.185/32\",\r\n \"40.81.47.216/32\",\r\n \"40.81.89.24/32\",\r\n + \ \"40.81.185.8/32\",\r\n \"40.82.157.167/32\",\r\n \"40.90.185.46/32\",\r\n + \ \"40.112.242.148/31\",\r\n \"40.112.243.240/28\",\r\n \"40.120.87.48/31\",\r\n + \ \"51.12.17.0/28\",\r\n \"51.12.25.16/28\",\r\n \"51.12.98.224/28\",\r\n + \ \"51.12.202.224/28\",\r\n \"51.107.0.91/32\",\r\n \"51.107.59.0/28\",\r\n + \ \"51.107.96.8/32\",\r\n \"51.107.155.0/28\",\r\n \"51.107.246.176/28\",\r\n + \ \"51.116.0.0/32\",\r\n \"51.116.59.0/28\",\r\n \"51.116.96.0/32\",\r\n + \ \"51.116.155.64/28\",\r\n \"51.120.2.185/32\",\r\n \"51.120.98.176/28\",\r\n + \ \"51.120.130.134/32\",\r\n \"51.120.218.224/28\",\r\n \"51.120.234.240/28\",\r\n + \ \"51.137.136.0/32\",\r\n \"51.138.215.124/31\",\r\n \"51.140.146.60/31\",\r\n + \ \"51.140.149.0/28\",\r\n \"51.140.210.84/31\",\r\n \"51.140.211.176/28\",\r\n + \ \"51.143.127.203/32\",\r\n \"51.145.56.125/32\",\r\n \"51.145.179.78/32\",\r\n + \ \"52.139.20.34/32\",\r\n \"52.139.80.117/32\",\r\n \"52.139.152.27/32\",\r\n + \ \"52.140.238.179/32\",\r\n \"52.142.95.35/32\",\r\n \"52.146.139.194/31\",\r\n + \ \"52.162.106.148/31\",\r\n \"52.162.110.80/28\",\r\n \"52.224.186.99/32\",\r\n + \ \"52.231.18.44/31\",\r\n \"52.231.19.192/28\",\r\n \"52.231.146.84/31\",\r\n + \ \"52.231.147.176/28\",\r\n \"52.253.135.58/32\",\r\n \"52.253.159.160/32\",\r\n + \ \"52.253.229.253/32\",\r\n \"65.52.164.91/32\",\r\n \"65.52.173.247/32\",\r\n + \ \"65.52.250.4/31\",\r\n \"65.52.252.32/28\",\r\n \"102.37.166.220/31\",\r\n + \ \"102.133.0.79/32\",\r\n \"102.133.26.4/31\",\r\n \"102.133.28.0/28\",\r\n + \ \"102.133.130.197/32\",\r\n \"102.133.154.4/31\",\r\n \"102.133.156.0/28\",\r\n + \ \"104.41.217.243/32\",\r\n \"104.41.218.160/32\",\r\n \"104.211.81.28/31\",\r\n + \ \"104.211.81.240/28\",\r\n \"104.211.146.68/31\",\r\n \"104.211.147.144/28\",\r\n + \ \"104.214.18.172/31\",\r\n \"104.214.19.224/28\",\r\n \"137.117.160.56/32\",\r\n + \ \"191.232.18.181/32\",\r\n \"191.233.24.179/32\",\r\n \"191.233.50.192/28\",\r\n + \ \"191.233.203.28/31\",\r\n \"191.233.203.240/28\",\r\n + \ \"191.238.73.14/31\",\r\n \"191.238.241.97/32\",\r\n \"2603:1000:4:402::140/124\",\r\n + \ \"2603:1000:104:402::140/124\",\r\n \"2603:1010:6:402::140/124\",\r\n + \ \"2603:1010:101:402::140/124\",\r\n \"2603:1010:304:402::140/124\",\r\n + \ \"2603:1010:404:402::140/124\",\r\n \"2603:1020:5:402::140/124\",\r\n + \ \"2603:1020:206:402::140/124\",\r\n \"2603:1020:305:402::140/124\",\r\n + \ \"2603:1020:405:402::140/124\",\r\n \"2603:1020:605:402::140/124\",\r\n + \ \"2603:1020:705:402::140/124\",\r\n \"2603:1020:805:402::140/124\",\r\n + \ \"2603:1020:905:402::140/124\",\r\n \"2603:1020:a04:2::510/124\",\r\n + \ \"2603:1020:a04:402::140/124\",\r\n \"2603:1020:b04:402::140/124\",\r\n + \ \"2603:1020:c04:402::140/124\",\r\n \"2603:1020:d04:402::140/124\",\r\n + \ \"2603:1020:e04::6f0/124\",\r\n \"2603:1020:e04:402::140/124\",\r\n + \ \"2603:1020:f04:402::140/124\",\r\n \"2603:1020:1004:1::700/124\",\r\n + \ \"2603:1020:1004:800::c0/124\",\r\n \"2603:1020:1104:1::3c0/124\",\r\n + \ \"2603:1020:1104:400::140/124\",\r\n \"2603:1030:f:2::490/124\",\r\n + \ \"2603:1030:f:400::940/124\",\r\n \"2603:1030:10:402::140/124\",\r\n + \ \"2603:1030:104::780/124\",\r\n \"2603:1030:104:402::140/124\",\r\n + \ \"2603:1030:107:400::c0/124\",\r\n \"2603:1030:210:402::140/124\",\r\n + \ \"2603:1030:40b:400::940/124\",\r\n \"2603:1030:40c:402::140/124\",\r\n + \ \"2603:1030:504:2::80/124\",\r\n \"2603:1030:608:3::630/124\",\r\n + \ \"2603:1030:608:402::140/124\",\r\n \"2603:1030:807:402::140/124\",\r\n + \ \"2603:1030:a07:402::8c0/124\",\r\n \"2603:1030:b04:402::140/124\",\r\n + \ \"2603:1030:c06:400::940/124\",\r\n \"2603:1030:f05:402::140/124\",\r\n + \ \"2603:1030:1005:402::140/124\",\r\n \"2603:1040:5:402::140/124\",\r\n + \ \"2603:1040:207:1::4a0/124\",\r\n \"2603:1040:207:402::140/124\",\r\n + \ \"2603:1040:407:402::140/124\",\r\n \"2603:1040:606:402::140/124\",\r\n + \ \"2603:1040:806:402::140/124\",\r\n \"2603:1040:904:402::140/124\",\r\n + \ \"2603:1040:a06:2::280/124\",\r\n \"2603:1040:a06:402::140/124\",\r\n + \ \"2603:1040:b04:402::140/124\",\r\n \"2603:1040:c06:402::140/124\",\r\n + \ \"2603:1040:d04:1::700/124\",\r\n \"2603:1040:d04:800::c0/124\",\r\n + \ \"2603:1040:f05::6f0/124\",\r\n \"2603:1040:f05:402::140/124\",\r\n + \ \"2603:1040:1002::7e0/124\",\r\n \"2603:1040:1104:1::400/124\",\r\n + \ \"2603:1040:1104:400::140/124\",\r\n \"2603:1050:6:402::140/124\",\r\n + \ \"2603:1050:403:400::2a0/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.AustraliaCentral\",\r\n \"id\": + \"ApiManagement.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"australiacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.36.106.68/31\",\r\n \"20.36.107.176/28\",\r\n + \ \"20.37.52.67/32\",\r\n \"2603:1010:304:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.AustraliaCentral2\",\r\n + \ \"id\": \"ApiManagement.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"20.36.114.20/31\",\r\n + \ \"20.36.115.128/28\",\r\n \"20.39.99.81/32\",\r\n \"2603:1010:404:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.AustraliaEast\",\r\n + \ \"id\": \"ApiManagement.AustraliaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.70.72.28/31\",\r\n \"13.70.72.240/28\",\r\n \"13.75.217.184/32\",\r\n + \ \"13.75.221.78/32\",\r\n \"20.40.125.155/32\",\r\n \"20.70.220.182/31\",\r\n + \ \"2603:1010:6:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.AustraliaSoutheast\",\r\n \"id\": + \"ApiManagement.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"13.77.50.68/31\",\r\n + \ \"13.77.52.224/28\",\r\n \"20.40.160.107/32\",\r\n \"20.92.3.250/31\",\r\n + \ \"2603:1010:101:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.BrazilSouth\",\r\n \"id\": \"ApiManagement.BrazilSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"191.233.24.179/32\",\r\n + \ \"191.233.203.28/31\",\r\n \"191.233.203.240/28\",\r\n + \ \"191.238.73.14/31\",\r\n \"2603:1050:6:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.BrazilSoutheast\",\r\n + \ \"id\": \"ApiManagement.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"191.232.18.181/32\",\r\n \"191.233.50.192/28\",\r\n + \ \"2603:1050:403:400::2a0/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.CanadaCentral\",\r\n \"id\": + \"ApiManagement.CanadaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.71.170.44/31\",\r\n \"13.71.172.144/28\",\r\n + \ \"20.48.201.76/31\",\r\n \"52.139.20.34/32\",\r\n \"2603:1030:f05:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.CanadaEast\",\r\n + \ \"id\": \"ApiManagement.CanadaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"40.69.106.68/31\",\r\n \"40.69.107.224/28\",\r\n + \ \"52.139.80.117/32\",\r\n \"2603:1030:1005:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.CentralIndia\",\r\n + \ \"id\": \"ApiManagement.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.71.49.1/32\",\r\n \"20.192.45.112/28\",\r\n \"104.211.81.28/31\",\r\n + \ \"104.211.81.240/28\",\r\n \"2603:1040:a06:2::280/124\",\r\n + \ \"2603:1040:a06:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.CentralUS\",\r\n \"id\": \"ApiManagement.CentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"13.86.102.66/32\",\r\n + \ \"13.89.170.204/31\",\r\n \"13.89.174.64/28\",\r\n \"20.40.231.62/31\",\r\n + \ \"2603:1030:10:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.CentralUSEUAP\",\r\n \"id\": + \"ApiManagement.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.46.13.224/28\",\r\n \"40.78.202.128/31\",\r\n + \ \"40.78.203.160/28\",\r\n \"52.253.159.160/32\",\r\n \"2603:1030:f:2::490/124\",\r\n + \ \"2603:1030:f:400::940/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.EastAsia\",\r\n \"id\": \"ApiManagement.EastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"13.75.34.148/31\",\r\n + \ \"13.75.38.16/28\",\r\n \"20.195.78.64/28\",\r\n \"52.139.152.27/32\",\r\n + \ \"65.52.164.91/32\",\r\n \"65.52.173.247/32\",\r\n \"2603:1040:207:1::4a0/124\",\r\n + \ \"2603:1040:207:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.EastUS\",\r\n \"id\": \"ApiManagement.EastUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"20.88.154.20/31\",\r\n + \ \"40.71.10.204/31\",\r\n \"40.71.13.128/28\",\r\n \"52.224.186.99/32\",\r\n + \ \"2603:1030:210:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.EastUS2\",\r\n \"id\": \"ApiManagement.EastUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"20.44.72.3/32\",\r\n + \ \"20.62.63.254/31\",\r\n \"40.70.146.76/31\",\r\n \"40.70.148.16/28\",\r\n + \ \"2603:1030:40c:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.EastUS2EUAP\",\r\n \"id\": \"ApiManagement.EastUS2EUAP\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"20.47.232.184/31\",\r\n + \ \"40.74.146.80/31\",\r\n \"40.74.147.32/28\",\r\n \"52.253.229.253/32\",\r\n + \ \"2603:1030:40b:400::940/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.FranceCentral\",\r\n \"id\": + \"ApiManagement.FranceCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"40.66.60.111/32\",\r\n \"40.79.130.44/31\",\r\n + \ \"40.79.131.192/28\",\r\n \"51.138.215.124/31\",\r\n \"2603:1020:805:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.FranceSouth\",\r\n + \ \"id\": \"ApiManagement.FranceSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.39.80.2/32\",\r\n \"40.79.178.68/31\",\r\n \"40.79.179.192/28\",\r\n + \ \"2603:1020:905:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.GermanyNorth\",\r\n \"id\": + \"ApiManagement.GermanyNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"51.116.0.0/32\",\r\n \"51.116.59.0/28\",\r\n \"2603:1020:d04:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.GermanyWestCentral\",\r\n + \ \"id\": \"ApiManagement.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.52.94.112/31\",\r\n \"51.116.96.0/32\",\r\n \"51.116.155.64/28\",\r\n + \ \"2603:1020:c04:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.JapanEast\",\r\n \"id\": \"ApiManagement.JapanEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"13.78.106.92/31\",\r\n + \ \"13.78.108.176/28\",\r\n \"20.191.167.246/31\",\r\n \"52.140.238.179/32\",\r\n + \ \"2603:1040:407:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.JapanWest\",\r\n \"id\": \"ApiManagement.JapanWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"40.74.100.52/31\",\r\n + \ \"40.74.101.48/28\",\r\n \"40.81.185.8/32\",\r\n \"2603:1040:606:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.JioIndiaCentral\",\r\n + \ \"id\": \"ApiManagement.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"20.192.50.64/28\",\r\n + \ \"20.192.234.160/28\",\r\n \"2603:1040:1104:1::400/124\",\r\n + \ \"2603:1040:1104:400::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.JioIndiaWest\",\r\n \"id\": + \"ApiManagement.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.193.192.48/28\",\r\n \"20.193.202.160/28\",\r\n + \ \"2603:1040:d04:1::700/124\",\r\n \"2603:1040:d04:800::c0/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.KoreaCentral\",\r\n + \ \"id\": \"ApiManagement.KoreaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.194.74.240/28\",\r\n \"40.82.157.167/32\",\r\n + \ \"52.231.18.44/31\",\r\n \"52.231.19.192/28\",\r\n \"2603:1040:f05::6f0/124\",\r\n + \ \"2603:1040:f05:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.KoreaSouth\",\r\n \"id\": \"ApiManagement.KoreaSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"40.80.232.185/32\",\r\n + \ \"52.231.146.84/31\",\r\n \"52.231.147.176/28\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"ApiManagement.NorthCentralUS\",\r\n + \ \"id\": \"ApiManagement.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"23.96.224.175/32\",\r\n + \ \"23.101.166.38/32\",\r\n \"40.81.47.216/32\",\r\n \"52.162.106.148/31\",\r\n + \ \"52.162.110.80/28\",\r\n \"2603:1030:608:3::630/124\",\r\n + \ \"2603:1030:608:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.NorthEurope\",\r\n \"id\": \"ApiManagement.NorthEurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"13.69.227.76/31\",\r\n + \ \"13.69.229.80/28\",\r\n \"52.142.95.35/32\",\r\n \"52.146.139.194/31\",\r\n + \ \"104.41.217.243/32\",\r\n \"104.41.218.160/32\",\r\n \"2603:1020:5:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.NorwayEast\",\r\n + \ \"id\": \"ApiManagement.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"51.120.2.185/32\",\r\n \"51.120.98.176/28\",\r\n + \ \"51.120.234.240/28\",\r\n \"2603:1020:e04::6f0/124\",\r\n + \ \"2603:1020:e04:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.NorwayWest\",\r\n \"id\": \"ApiManagement.NorwayWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"51.120.130.134/32\",\r\n + \ \"51.120.218.224/28\",\r\n \"2603:1020:f04:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.SouthAfricaNorth\",\r\n + \ \"id\": \"ApiManagement.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"102.37.166.220/31\",\r\n + \ \"102.133.130.197/32\",\r\n \"102.133.154.4/31\",\r\n \"102.133.156.0/28\",\r\n + \ \"2603:1000:104:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.SouthAfricaWest\",\r\n \"id\": + \"ApiManagement.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"southafricawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"102.133.0.79/32\",\r\n \"102.133.26.4/31\",\r\n + \ \"102.133.28.0/28\",\r\n \"2603:1000:4:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.SouthCentralUS\",\r\n + \ \"id\": \"ApiManagement.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"13.84.189.17/32\",\r\n + \ \"13.85.22.63/32\",\r\n \"20.97.32.190/31\",\r\n \"20.188.77.119/32\",\r\n + \ \"104.214.18.172/31\",\r\n \"104.214.19.224/28\",\r\n \"191.238.241.97/32\",\r\n + \ \"2603:1030:807:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.SouthCentralUSSTG\",\r\n \"id\": + \"ApiManagement.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.44.2.4/31\",\r\n \"20.44.3.224/28\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"ApiManagement.SoutheastAsia\",\r\n + \ \"id\": \"ApiManagement.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.67.8.108/31\",\r\n \"13.67.9.208/28\",\r\n \"40.90.185.46/32\",\r\n + \ \"2603:1040:5:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.SouthIndia\",\r\n \"id\": \"ApiManagement.SouthIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"20.44.33.246/32\",\r\n + \ \"40.78.194.68/31\",\r\n \"40.78.195.224/28\",\r\n \"2603:1040:c06:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.SwedenCentral\",\r\n + \ \"id\": \"ApiManagement.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"51.12.25.16/28\",\r\n \"51.12.98.224/28\",\r\n \"2603:1020:1004:1::700/124\",\r\n + \ \"2603:1020:1004:800::c0/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.SwitzerlandNorth\",\r\n \"id\": + \"ApiManagement.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"51.107.0.91/32\",\r\n \"51.107.59.0/28\",\r\n \"51.107.246.176/28\",\r\n + \ \"2603:1020:a04:2::510/124\",\r\n \"2603:1020:a04:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.SwitzerlandWest\",\r\n + \ \"id\": \"ApiManagement.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"51.107.96.8/32\",\r\n \"51.107.155.0/28\",\r\n \"2603:1020:b04:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.UAECentral\",\r\n + \ \"id\": \"ApiManagement.UAECentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.37.74.224/31\",\r\n \"20.37.76.32/28\",\r\n \"20.37.81.41/32\",\r\n + \ \"2603:1040:b04:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.UAENorth\",\r\n \"id\": \"ApiManagement.UAENorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"20.46.144.85/32\",\r\n + \ \"40.120.87.48/31\",\r\n \"65.52.250.4/31\",\r\n \"65.52.252.32/28\",\r\n + \ \"2603:1040:904:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.UKSouth\",\r\n \"id\": \"ApiManagement.UKSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"20.90.131.114/31\",\r\n + \ \"51.140.146.60/31\",\r\n \"51.140.149.0/28\",\r\n \"51.145.56.125/32\",\r\n + \ \"2603:1020:705:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.UKWest\",\r\n \"id\": \"ApiManagement.UKWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"51.137.136.0/32\",\r\n + \ \"51.140.210.84/31\",\r\n \"51.140.211.176/28\",\r\n \"2603:1020:605:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.WestCentralUS\",\r\n + \ \"id\": \"ApiManagement.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.71.194.116/31\",\r\n \"13.71.196.32/28\",\r\n + \ \"52.253.135.58/32\",\r\n \"2603:1030:b04:402::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.WestEurope\",\r\n + \ \"id\": \"ApiManagement.WestEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.69.64.76/31\",\r\n \"13.69.66.144/28\",\r\n \"20.86.92.254/31\",\r\n + \ \"23.101.67.140/32\",\r\n \"51.145.179.78/32\",\r\n \"137.117.160.56/32\",\r\n + \ \"2603:1020:206:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.WestIndia\",\r\n \"id\": \"ApiManagement.WestIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"40.81.89.24/32\",\r\n + \ \"104.211.146.68/31\",\r\n \"104.211.147.144/28\",\r\n + \ \"2603:1040:806:402::140/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ApiManagement.WestUS\",\r\n \"id\": \"ApiManagement.WestUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureApiManagement\",\r\n \"addressPrefixes\": [\r\n \"13.64.39.16/32\",\r\n + \ \"40.112.242.148/31\",\r\n \"40.112.243.240/28\",\r\n \"2603:1030:a07:402::8c0/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.WestUS2\",\r\n + \ \"id\": \"ApiManagement.WestUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.66.138.92/31\",\r\n \"13.66.140.176/28\",\r\n + \ \"20.83.221.20/30\",\r\n \"20.83.221.64/28\",\r\n \"20.83.221.86/31\",\r\n + \ \"51.143.127.203/32\",\r\n \"2603:1030:c06:400::940/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApiManagement.WestUS3\",\r\n + \ \"id\": \"ApiManagement.WestUS3\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureApiManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.150.167.160/28\",\r\n \"20.150.170.224/28\",\r\n + \ \"2603:1030:504:2::80/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppConfiguration\",\r\n \"id\": \"AppConfiguration\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppConfiguration\",\r\n \"addressPrefixes\": + [\r\n \"13.66.142.72/29\",\r\n \"13.66.143.192/28\",\r\n + \ \"13.66.143.208/29\",\r\n \"13.67.10.112/29\",\r\n \"13.67.13.192/28\",\r\n + \ \"13.67.13.208/29\",\r\n \"13.69.67.112/29\",\r\n \"13.69.67.240/28\",\r\n + \ \"13.69.71.128/29\",\r\n \"13.69.107.72/29\",\r\n \"13.69.112.144/28\",\r\n + \ \"13.69.112.160/29\",\r\n \"13.69.230.8/29\",\r\n \"13.69.230.40/29\",\r\n + \ \"13.69.231.144/28\",\r\n \"13.70.74.128/29\",\r\n \"13.70.78.144/28\",\r\n + \ \"13.70.78.160/29\",\r\n \"13.71.175.64/28\",\r\n \"13.71.175.96/28\",\r\n + \ \"13.71.196.176/28\",\r\n \"13.71.199.80/28\",\r\n \"13.73.242.56/29\",\r\n + \ \"13.73.244.96/28\",\r\n \"13.73.244.112/29\",\r\n \"13.73.255.128/26\",\r\n + \ \"13.74.108.160/28\",\r\n \"13.74.108.240/28\",\r\n \"13.77.53.88/29\",\r\n + \ \"13.77.53.192/28\",\r\n \"13.77.53.208/29\",\r\n \"13.78.109.144/29\",\r\n + \ \"13.78.109.208/28\",\r\n \"13.78.111.128/29\",\r\n \"13.86.219.192/29\",\r\n + \ \"13.86.221.192/28\",\r\n \"13.86.221.208/29\",\r\n \"13.87.58.64/29\",\r\n + \ \"13.87.58.80/28\",\r\n \"13.87.58.128/29\",\r\n \"13.87.124.64/29\",\r\n + \ \"13.87.124.80/28\",\r\n \"13.87.124.128/29\",\r\n \"13.89.175.208/28\",\r\n + \ \"13.89.178.16/29\",\r\n \"13.89.178.32/29\",\r\n \"20.21.39.128/26\",\r\n + \ \"20.21.44.64/27\",\r\n \"20.21.67.128/27\",\r\n \"20.21.75.128/27\",\r\n + \ \"20.36.108.120/29\",\r\n \"20.36.108.136/29\",\r\n \"20.36.108.144/28\",\r\n + \ \"20.36.115.248/29\",\r\n \"20.36.117.40/29\",\r\n \"20.36.117.48/28\",\r\n + \ \"20.36.123.16/28\",\r\n \"20.36.124.64/26\",\r\n \"20.37.67.96/28\",\r\n + \ \"20.37.69.64/26\",\r\n \"20.37.76.112/29\",\r\n \"20.37.76.144/28\",\r\n + \ \"20.37.76.192/29\",\r\n \"20.37.198.144/28\",\r\n \"20.37.227.32/28\",\r\n + \ \"20.37.228.128/26\",\r\n \"20.38.128.96/29\",\r\n \"20.38.128.112/28\",\r\n + \ \"20.38.128.160/29\",\r\n \"20.38.139.96/28\",\r\n \"20.38.141.64/26\",\r\n + \ \"20.38.147.176/28\",\r\n \"20.38.147.240/28\",\r\n \"20.39.14.16/28\",\r\n + \ \"20.40.206.144/28\",\r\n \"20.40.206.160/28\",\r\n \"20.40.224.128/26\",\r\n + \ \"20.41.68.64/28\",\r\n \"20.41.69.192/26\",\r\n \"20.41.197.48/28\",\r\n + \ \"20.42.64.16/28\",\r\n \"20.42.230.144/28\",\r\n \"20.43.44.144/28\",\r\n + \ \"20.43.46.128/26\",\r\n \"20.43.70.128/28\",\r\n \"20.43.121.40/29\",\r\n + \ \"20.43.121.96/28\",\r\n \"20.43.121.112/29\",\r\n \"20.44.4.96/29\",\r\n + \ \"20.44.4.120/29\",\r\n \"20.44.4.160/28\",\r\n \"20.44.8.168/29\",\r\n + \ \"20.44.10.96/28\",\r\n \"20.44.10.112/29\",\r\n \"20.44.17.56/29\",\r\n + \ \"20.44.17.192/28\",\r\n \"20.44.17.208/29\",\r\n \"20.44.27.224/28\",\r\n + \ \"20.44.29.32/28\",\r\n \"20.45.116.0/26\",\r\n \"20.45.123.120/29\",\r\n + \ \"20.45.123.176/28\",\r\n \"20.45.123.224/29\",\r\n \"20.45.126.0/27\",\r\n + \ \"20.45.198.0/27\",\r\n \"20.45.199.64/26\",\r\n \"20.48.192.192/26\",\r\n + \ \"20.49.83.96/27\",\r\n \"20.49.91.96/27\",\r\n \"20.49.99.80/28\",\r\n + \ \"20.49.103.0/26\",\r\n \"20.49.109.96/28\",\r\n \"20.49.115.64/26\",\r\n + \ \"20.49.120.80/28\",\r\n \"20.49.127.64/26\",\r\n \"20.50.1.240/28\",\r\n + \ \"20.50.65.96/28\",\r\n \"20.51.8.0/26\",\r\n \"20.51.16.0/26\",\r\n + \ \"20.53.41.192/26\",\r\n \"20.61.98.0/26\",\r\n \"20.62.128.64/26\",\r\n + \ \"20.72.20.192/26\",\r\n \"20.72.28.128/27\",\r\n \"20.150.165.176/28\",\r\n + \ \"20.150.167.0/26\",\r\n \"20.150.172.64/27\",\r\n \"20.150.173.32/27\",\r\n + \ \"20.150.179.200/29\",\r\n \"20.150.181.0/28\",\r\n \"20.150.181.16/29\",\r\n + \ \"20.150.181.128/27\",\r\n \"20.150.187.200/29\",\r\n \"20.150.189.0/28\",\r\n + \ \"20.150.189.16/29\",\r\n \"20.150.190.32/27\",\r\n \"20.187.194.224/28\",\r\n + \ \"20.187.196.128/26\",\r\n \"20.189.224.64/26\",\r\n \"20.191.160.192/26\",\r\n + \ \"20.192.99.200/29\",\r\n \"20.192.101.0/28\",\r\n \"20.192.101.16/29\",\r\n + \ \"20.192.167.0/26\",\r\n \"20.192.231.64/26\",\r\n \"20.192.235.240/29\",\r\n + \ \"20.192.238.112/29\",\r\n \"20.192.238.192/27\",\r\n \"20.193.203.224/27\",\r\n + \ \"20.194.67.64/27\",\r\n \"20.205.75.96/27\",\r\n \"20.205.83.96/27\",\r\n + \ \"20.208.19.128/27\",\r\n \"23.98.83.72/29\",\r\n \"23.98.86.32/28\",\r\n + \ \"23.98.86.48/29\",\r\n \"23.98.86.96/27\",\r\n \"23.98.104.176/28\",\r\n + \ \"23.98.108.64/26\",\r\n \"40.64.132.144/28\",\r\n \"40.67.52.0/26\",\r\n + \ \"40.67.60.72/29\",\r\n \"40.67.60.112/28\",\r\n \"40.67.60.160/29\",\r\n + \ \"40.69.108.80/29\",\r\n \"40.69.108.176/28\",\r\n \"40.69.110.160/29\",\r\n + \ \"40.70.148.56/29\",\r\n \"40.70.151.48/28\",\r\n \"40.70.151.64/29\",\r\n + \ \"40.71.13.248/29\",\r\n \"40.71.14.120/29\",\r\n \"40.71.15.128/28\",\r\n + \ \"40.74.149.40/29\",\r\n \"40.74.149.56/29\",\r\n \"40.74.149.80/28\",\r\n + \ \"40.75.35.72/29\",\r\n \"40.75.35.192/28\",\r\n \"40.75.35.208/29\",\r\n + \ \"40.78.196.80/29\",\r\n \"40.78.196.144/28\",\r\n \"40.78.196.160/29\",\r\n + \ \"40.78.204.8/29\",\r\n \"40.78.204.144/28\",\r\n \"40.78.204.192/29\",\r\n + \ \"40.78.229.80/28\",\r\n \"40.78.229.112/28\",\r\n \"40.78.236.136/29\",\r\n + \ \"40.78.238.32/28\",\r\n \"40.78.238.48/29\",\r\n \"40.78.243.176/28\",\r\n + \ \"40.78.245.128/28\",\r\n \"40.78.251.144/28\",\r\n \"40.78.251.208/28\",\r\n + \ \"40.79.132.88/29\",\r\n \"40.79.139.64/28\",\r\n \"40.79.139.128/28\",\r\n + \ \"40.79.146.208/28\",\r\n \"40.79.148.64/28\",\r\n \"40.79.150.64/27\",\r\n + \ \"40.79.156.96/28\",\r\n \"40.79.163.64/29\",\r\n \"40.79.163.128/28\",\r\n + \ \"40.79.163.144/29\",\r\n \"40.79.165.96/27\",\r\n \"40.79.171.112/28\",\r\n + \ \"40.79.171.176/28\",\r\n \"40.79.180.48/29\",\r\n \"40.79.180.128/28\",\r\n + \ \"40.79.180.144/29\",\r\n \"40.79.187.192/29\",\r\n \"40.79.189.32/28\",\r\n + \ \"40.79.189.48/29\",\r\n \"40.79.190.224/27\",\r\n \"40.79.195.176/28\",\r\n + \ \"40.79.195.240/28\",\r\n \"40.80.51.112/28\",\r\n \"40.80.51.176/28\",\r\n + \ \"40.80.54.0/27\",\r\n \"40.80.62.32/28\",\r\n \"40.80.172.48/28\",\r\n + \ \"40.80.173.64/26\",\r\n \"40.80.176.40/29\",\r\n \"40.80.176.56/29\",\r\n + \ \"40.80.176.112/28\",\r\n \"40.80.191.240/28\",\r\n \"40.89.20.160/28\",\r\n + \ \"40.89.23.128/26\",\r\n \"40.119.11.192/28\",\r\n \"40.120.75.128/27\",\r\n + \ \"51.11.192.0/28\",\r\n \"51.11.192.16/29\",\r\n \"51.12.43.64/26\",\r\n + \ \"51.12.99.216/29\",\r\n \"51.12.100.48/28\",\r\n \"51.12.100.96/29\",\r\n + \ \"51.12.102.128/27\",\r\n \"51.12.195.64/26\",\r\n \"51.12.204.48/28\",\r\n + \ \"51.12.204.96/28\",\r\n \"51.12.206.32/27\",\r\n \"51.12.227.200/29\",\r\n + \ \"51.12.229.0/28\",\r\n \"51.12.229.16/29\",\r\n \"51.12.229.192/27\",\r\n + \ \"51.12.235.200/29\",\r\n \"51.12.237.0/28\",\r\n \"51.12.237.16/29\",\r\n + \ \"51.12.237.96/27\",\r\n \"51.103.203.128/27\",\r\n \"51.104.9.48/28\",\r\n + \ \"51.104.29.224/28\",\r\n \"51.105.67.184/29\",\r\n \"51.105.67.216/29\",\r\n + \ \"51.105.69.64/28\",\r\n \"51.105.75.224/28\",\r\n \"51.105.77.32/28\",\r\n + \ \"51.105.83.64/26\",\r\n \"51.105.90.176/28\",\r\n \"51.105.93.0/26\",\r\n + \ \"51.107.51.48/28\",\r\n \"51.107.53.128/26\",\r\n \"51.107.60.56/29\",\r\n + \ \"51.107.60.128/28\",\r\n \"51.107.60.144/29\",\r\n \"51.107.147.48/28\",\r\n + \ \"51.107.148.192/26\",\r\n \"51.107.156.64/29\",\r\n \"51.107.156.136/29\",\r\n + \ \"51.107.156.144/28\",\r\n \"51.116.49.192/28\",\r\n \"51.116.51.64/26\",\r\n + \ \"51.116.60.56/29\",\r\n \"51.116.60.88/29\",\r\n \"51.116.60.128/28\",\r\n + \ \"51.116.145.176/28\",\r\n \"51.116.148.0/26\",\r\n \"51.116.156.56/29\",\r\n + \ \"51.116.156.168/29\",\r\n \"51.116.158.32/28\",\r\n \"51.116.158.48/29\",\r\n + \ \"51.116.243.152/29\",\r\n \"51.116.243.192/28\",\r\n \"51.116.243.208/29\",\r\n + \ \"51.116.245.128/27\",\r\n \"51.116.251.40/29\",\r\n \"51.116.251.160/28\",\r\n + \ \"51.116.251.176/29\",\r\n \"51.116.253.64/27\",\r\n \"51.120.43.96/28\",\r\n + \ \"51.120.45.0/26\",\r\n \"51.120.100.56/29\",\r\n \"51.120.100.128/28\",\r\n + \ \"51.120.100.144/29\",\r\n \"51.120.107.200/29\",\r\n \"51.120.109.0/28\",\r\n + \ \"51.120.109.16/29\",\r\n \"51.120.110.160/27\",\r\n \"51.120.211.200/29\",\r\n + \ \"51.120.213.0/28\",\r\n \"51.120.213.16/29\",\r\n \"51.120.214.96/27\",\r\n + \ \"51.120.220.56/29\",\r\n \"51.120.220.96/28\",\r\n \"51.120.220.112/29\",\r\n + \ \"51.120.227.96/28\",\r\n \"51.120.229.0/26\",\r\n \"51.137.164.128/28\",\r\n + \ \"51.137.167.0/26\",\r\n \"51.140.148.40/29\",\r\n \"51.140.149.16/29\",\r\n + \ \"51.140.212.96/29\",\r\n \"51.140.212.192/28\",\r\n \"51.140.212.208/29\",\r\n + \ \"51.143.195.64/26\",\r\n \"51.143.208.64/26\",\r\n \"52.136.51.96/28\",\r\n + \ \"52.136.52.128/26\",\r\n \"52.138.92.88/29\",\r\n \"52.138.92.144/28\",\r\n + \ \"52.138.92.160/29\",\r\n \"52.138.227.176/28\",\r\n \"52.138.229.48/28\",\r\n + \ \"52.140.108.112/28\",\r\n \"52.140.108.128/28\",\r\n \"52.140.111.0/26\",\r\n + \ \"52.146.131.192/26\",\r\n \"52.150.152.64/28\",\r\n \"52.150.156.128/26\",\r\n + \ \"52.162.111.32/28\",\r\n \"52.162.111.112/28\",\r\n \"52.167.107.112/28\",\r\n + \ \"52.167.107.240/28\",\r\n \"52.168.117.64/27\",\r\n \"52.172.112.64/26\",\r\n + \ \"52.182.141.0/29\",\r\n \"52.182.141.32/28\",\r\n \"52.182.141.48/29\",\r\n + \ \"52.228.85.208/28\",\r\n \"52.231.20.8/29\",\r\n \"52.231.20.80/28\",\r\n + \ \"52.231.23.0/29\",\r\n \"52.231.148.112/29\",\r\n \"52.231.148.176/28\",\r\n + \ \"52.231.148.192/29\",\r\n \"52.236.186.248/29\",\r\n \"52.236.187.96/28\",\r\n + \ \"52.236.189.64/29\",\r\n \"52.246.155.176/28\",\r\n \"52.246.155.240/28\",\r\n + \ \"52.246.157.32/27\",\r\n \"65.52.252.112/29\",\r\n \"65.52.252.224/28\",\r\n + \ \"65.52.252.240/29\",\r\n \"102.133.28.96/29\",\r\n \"102.133.28.152/29\",\r\n + \ \"102.133.28.192/28\",\r\n \"102.133.58.240/28\",\r\n \"102.133.60.128/26\",\r\n + \ \"102.133.124.80/29\",\r\n \"102.133.124.112/28\",\r\n + \ \"102.133.124.128/29\",\r\n \"102.133.156.120/29\",\r\n + \ \"102.133.156.152/29\",\r\n \"102.133.156.160/28\",\r\n + \ \"102.133.218.160/28\",\r\n \"102.133.220.128/26\",\r\n + \ \"102.133.251.88/29\",\r\n \"102.133.251.192/28\",\r\n + \ \"102.133.251.208/29\",\r\n \"104.46.177.192/26\",\r\n + \ \"104.214.161.0/29\",\r\n \"104.214.161.16/28\",\r\n \"104.214.161.32/29\",\r\n + \ \"104.214.166.64/27\",\r\n \"168.61.142.96/27\",\r\n \"191.233.11.144/28\",\r\n + \ \"191.233.14.128/26\",\r\n \"191.233.51.224/27\",\r\n \"191.233.205.112/28\",\r\n + \ \"191.233.205.176/28\",\r\n \"191.234.136.96/28\",\r\n + \ \"191.234.139.64/26\",\r\n \"191.234.147.200/29\",\r\n + \ \"191.234.149.16/28\",\r\n \"191.234.149.128/29\",\r\n + \ \"191.234.149.192/27\",\r\n \"191.234.155.200/29\",\r\n + \ \"191.234.157.16/28\",\r\n \"191.234.157.32/29\",\r\n \"191.234.157.96/27\",\r\n + \ \"2603:1000:4:402::2e0/123\",\r\n \"2603:1000:104:402::2e0/123\",\r\n + \ \"2603:1000:104:802::220/123\",\r\n \"2603:1000:104:c02::220/123\",\r\n + \ \"2603:1010:6:402::2e0/123\",\r\n \"2603:1010:6:802::220/123\",\r\n + \ \"2603:1010:6:c02::220/123\",\r\n \"2603:1010:101:402::2e0/123\",\r\n + \ \"2603:1010:304:402::2e0/123\",\r\n \"2603:1010:404:402::2e0/123\",\r\n + \ \"2603:1020:5:402::2e0/123\",\r\n \"2603:1020:5:802::220/123\",\r\n + \ \"2603:1020:5:c02::220/123\",\r\n \"2603:1020:206:402::2e0/123\",\r\n + \ \"2603:1020:206:802::220/123\",\r\n \"2603:1020:206:c02::220/123\",\r\n + \ \"2603:1020:305:402::2e0/123\",\r\n \"2603:1020:405:402::2e0/123\",\r\n + \ \"2603:1020:605:402::2e0/123\",\r\n \"2603:1020:705:402::2e0/123\",\r\n + \ \"2603:1020:705:802::220/123\",\r\n \"2603:1020:705:c02::220/123\",\r\n + \ \"2603:1020:805:402::2e0/123\",\r\n \"2603:1020:805:802::220/123\",\r\n + \ \"2603:1020:805:c02::220/123\",\r\n \"2603:1020:905:402::2e0/123\",\r\n + \ \"2603:1020:a04:3::/122\",\r\n \"2603:1020:a04:402::2e0/123\",\r\n + \ \"2603:1020:a04:802::220/123\",\r\n \"2603:1020:a04:c02::220/123\",\r\n + \ \"2603:1020:b04:402::2e0/123\",\r\n \"2603:1020:c04:402::2e0/123\",\r\n + \ \"2603:1020:c04:802::220/123\",\r\n \"2603:1020:c04:c02::220/123\",\r\n + \ \"2603:1020:d04:402::2e0/123\",\r\n \"2603:1020:e04:3::2c0/122\",\r\n + \ \"2603:1020:e04:402::2e0/123\",\r\n \"2603:1020:e04:802::220/123\",\r\n + \ \"2603:1020:e04:c02::220/123\",\r\n \"2603:1020:f04:402::2e0/123\",\r\n + \ \"2603:1020:1004:1::340/122\",\r\n \"2603:1020:1004:400::1e0/123\",\r\n + \ \"2603:1020:1004:400::380/123\",\r\n \"2603:1020:1004:800::440/123\",\r\n + \ \"2603:1020:1004:c02::280/123\",\r\n \"2603:1020:1104:1::100/122\",\r\n + \ \"2603:1020:1104:400::2e0/123\",\r\n \"2603:1030:f:2::680/122\",\r\n + \ \"2603:1030:f:400::ae0/123\",\r\n \"2603:1030:10:402::2e0/123\",\r\n + \ \"2603:1030:10:802::220/123\",\r\n \"2603:1030:10:c02::220/123\",\r\n + \ \"2603:1030:104:2::/122\",\r\n \"2603:1030:104:402::2e0/123\",\r\n + \ \"2603:1030:104:402::720/123\",\r\n \"2603:1030:104:802::1c0/123\",\r\n + \ \"2603:1030:107::7c0/122\",\r\n \"2603:1030:107:400::260/123\",\r\n + \ \"2603:1030:210:402::2e0/123\",\r\n \"2603:1030:210:802::220/123\",\r\n + \ \"2603:1030:210:c02::220/123\",\r\n \"2603:1030:40b:400::ae0/123\",\r\n + \ \"2603:1030:40b:800::220/123\",\r\n \"2603:1030:40b:c00::220/123\",\r\n + \ \"2603:1030:40c:402::2e0/123\",\r\n \"2603:1030:40c:802::220/123\",\r\n + \ \"2603:1030:40c:c02::220/123\",\r\n \"2603:1030:504::340/122\",\r\n + \ \"2603:1030:504:402::1e0/123\",\r\n \"2603:1030:504:402::380/123\",\r\n + \ \"2603:1030:504:802::260/123\",\r\n \"2603:1030:504:c02::280/123\",\r\n + \ \"2603:1030:608:402::2e0/123\",\r\n \"2603:1030:807:402::2e0/123\",\r\n + \ \"2603:1030:807:802::220/123\",\r\n \"2603:1030:807:c02::220/123\",\r\n + \ \"2603:1030:a07:402::960/123\",\r\n \"2603:1030:b04:402::2e0/123\",\r\n + \ \"2603:1030:c06:400::ae0/123\",\r\n \"2603:1030:c06:802::220/123\",\r\n + \ \"2603:1030:c06:c02::220/123\",\r\n \"2603:1030:f05:402::2e0/123\",\r\n + \ \"2603:1030:f05:802::220/123\",\r\n \"2603:1030:f05:c02::220/123\",\r\n + \ \"2603:1030:1005:402::2e0/123\",\r\n \"2603:1040:5:402::2e0/123\",\r\n + \ \"2603:1040:5:802::220/123\",\r\n \"2603:1040:5:c02::220/123\",\r\n + \ \"2603:1040:207:2::240/122\",\r\n \"2603:1040:207:402::2e0/123\",\r\n + \ \"2603:1040:207:800::c0/123\",\r\n \"2603:1040:207:c00::c0/123\",\r\n + \ \"2603:1040:407:402::2e0/123\",\r\n \"2603:1040:407:802::220/123\",\r\n + \ \"2603:1040:407:c02::220/123\",\r\n \"2603:1040:606:402::2e0/123\",\r\n + \ \"2603:1040:806:402::2e0/123\",\r\n \"2603:1040:904:402::2e0/123\",\r\n + \ \"2603:1040:904:802::220/123\",\r\n \"2603:1040:904:c02::220/123\",\r\n + \ \"2603:1040:a06:2::500/122\",\r\n \"2603:1040:a06:402::2e0/123\",\r\n + \ \"2603:1040:a06:802::220/123\",\r\n \"2603:1040:a06:c02::220/123\",\r\n + \ \"2603:1040:b04:402::2e0/123\",\r\n \"2603:1040:c06:402::2e0/123\",\r\n + \ \"2603:1040:d04:1::340/122\",\r\n \"2603:1040:d04:400::1e0/123\",\r\n + \ \"2603:1040:d04:400::380/123\",\r\n \"2603:1040:d04:c02::280/123\",\r\n + \ \"2603:1040:f05:2::200/122\",\r\n \"2603:1040:f05:402::2e0/123\",\r\n + \ \"2603:1040:f05:802::220/123\",\r\n \"2603:1040:f05:c02::220/123\",\r\n + \ \"2603:1040:1002:1::540/122\",\r\n \"2603:1040:1002:400::1a0/123\",\r\n + \ \"2603:1040:1002:800::c0/123\",\r\n \"2603:1040:1002:c00::c0/123\",\r\n + \ \"2603:1040:1104:1::100/122\",\r\n \"2603:1040:1104:400::2e0/123\",\r\n + \ \"2603:1050:6:402::2e0/123\",\r\n \"2603:1050:6:802::220/123\",\r\n + \ \"2603:1050:6:c02::220/123\",\r\n \"2603:1050:403:400::200/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ApplicationInsightsAvailability\",\r\n + \ \"id\": \"ApplicationInsightsAvailability\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"ApplicationInsightsAvailability\",\r\n + \ \"addressPrefixes\": [\r\n \"13.86.97.224/27\",\r\n \"13.86.98.0/27\",\r\n + \ \"13.86.98.48/28\",\r\n \"13.86.98.64/28\",\r\n \"20.37.156.64/27\",\r\n + \ \"20.37.192.80/29\",\r\n \"20.38.80.80/28\",\r\n \"20.40.104.96/27\",\r\n + \ \"20.40.104.128/27\",\r\n \"20.40.124.176/28\",\r\n \"20.40.124.240/28\",\r\n + \ \"20.40.125.80/28\",\r\n \"20.40.129.32/27\",\r\n \"20.40.129.64/26\",\r\n + \ \"20.40.129.128/27\",\r\n \"20.42.4.64/27\",\r\n \"20.42.35.32/28\",\r\n + \ \"20.42.35.64/26\",\r\n \"20.42.35.128/28\",\r\n \"20.42.129.32/27\",\r\n + \ \"20.43.40.80/28\",\r\n \"20.43.64.80/29\",\r\n \"20.43.128.96/29\",\r\n + \ \"20.45.5.160/27\",\r\n \"20.45.5.192/26\",\r\n \"20.189.106.64/29\",\r\n + \ \"23.100.224.16/28\",\r\n \"23.100.224.32/27\",\r\n \"23.100.224.64/26\",\r\n + \ \"23.100.225.0/28\",\r\n \"40.74.24.80/28\",\r\n \"40.80.186.128/26\",\r\n + \ \"40.91.82.48/28\",\r\n \"40.91.82.64/26\",\r\n \"40.91.82.128/28\",\r\n + \ \"40.119.8.96/27\",\r\n \"51.104.24.80/29\",\r\n \"51.105.9.128/27\",\r\n + \ \"51.105.9.160/28\",\r\n \"51.137.160.80/29\",\r\n \"51.144.56.96/27\",\r\n + \ \"51.144.56.128/26\",\r\n \"52.139.250.96/27\",\r\n \"52.139.250.128/27\",\r\n + \ \"52.140.232.160/27\",\r\n \"52.140.232.192/28\",\r\n \"52.158.28.64/26\",\r\n + \ \"52.229.216.48/28\",\r\n \"52.229.216.64/27\",\r\n \"191.233.26.64/28\",\r\n + \ \"191.233.26.128/28\",\r\n \"191.233.26.176/28\",\r\n \"191.235.224.80/29\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService\",\r\n + \ \"id\": \"AppService\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n + \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureAppService\",\r\n + \ \"addressPrefixes\": [\r\n \"13.64.73.110/32\",\r\n \"13.65.30.245/32\",\r\n + \ \"13.65.37.122/32\",\r\n \"13.65.39.165/32\",\r\n \"13.65.42.35/32\",\r\n + \ \"13.65.42.183/32\",\r\n \"13.65.45.30/32\",\r\n \"13.65.85.146/32\",\r\n + \ \"13.65.89.91/32\",\r\n \"13.65.92.72/32\",\r\n \"13.65.94.204/32\",\r\n + \ \"13.65.95.109/32\",\r\n \"13.65.97.243/32\",\r\n \"13.65.193.29/32\",\r\n + \ \"13.65.210.166/32\",\r\n \"13.65.212.252/32\",\r\n \"13.65.241.130/32\",\r\n + \ \"13.65.243.110/32\",\r\n \"13.66.16.101/32\",\r\n \"13.66.38.99/32\",\r\n + \ \"13.66.39.88/32\",\r\n \"13.66.138.96/27\",\r\n \"13.66.209.135/32\",\r\n + \ \"13.66.212.205/32\",\r\n \"13.66.226.80/32\",\r\n \"13.66.231.217/32\",\r\n + \ \"13.66.241.134/32\",\r\n \"13.66.244.249/32\",\r\n \"13.67.9.0/25\",\r\n + \ \"13.67.56.225/32\",\r\n \"13.67.63.90/32\",\r\n \"13.67.129.26/32\",\r\n + \ \"13.67.141.98/32\",\r\n \"13.68.29.136/32\",\r\n \"13.68.101.62/32\",\r\n + \ \"13.69.68.0/23\",\r\n \"13.69.186.152/32\",\r\n \"13.69.228.0/25\",\r\n + \ \"13.69.253.145/32\",\r\n \"13.70.72.32/27\",\r\n \"13.70.123.149/32\",\r\n + \ \"13.70.146.110/32\",\r\n \"13.70.147.206/32\",\r\n \"13.71.122.35/32\",\r\n + \ \"13.71.123.138/32\",\r\n \"13.71.149.151/32\",\r\n \"13.71.170.128/27\",\r\n + \ \"13.71.194.192/27\",\r\n \"13.73.1.134/32\",\r\n \"13.73.26.73/32\",\r\n + \ \"13.73.116.45/32\",\r\n \"13.73.118.104/32\",\r\n \"13.74.41.233/32\",\r\n + \ \"13.74.147.218/32\",\r\n \"13.74.158.5/32\",\r\n \"13.74.252.44/32\",\r\n + \ \"13.75.34.160/27\",\r\n \"13.75.46.26/32\",\r\n \"13.75.47.15/32\",\r\n + \ \"13.75.89.224/32\",\r\n \"13.75.112.108/32\",\r\n \"13.75.115.40/32\",\r\n + \ \"13.75.138.224/32\",\r\n \"13.75.147.143/32\",\r\n \"13.75.147.201/32\",\r\n + \ \"13.75.218.45/32\",\r\n \"13.76.44.139/32\",\r\n \"13.76.245.96/32\",\r\n + \ \"13.77.7.175/32\",\r\n \"13.77.50.96/27\",\r\n \"13.77.82.141/32\",\r\n + \ \"13.77.83.246/32\",\r\n \"13.77.96.119/32\",\r\n \"13.77.157.133/32\",\r\n + \ \"13.77.160.237/32\",\r\n \"13.77.182.13/32\",\r\n \"13.78.59.237/32\",\r\n + \ \"13.78.106.96/27\",\r\n \"13.78.117.86/32\",\r\n \"13.78.123.87/32\",\r\n + \ \"13.78.150.96/32\",\r\n \"13.78.184.89/32\",\r\n \"13.79.2.71/32\",\r\n + \ \"13.79.38.229/32\",\r\n \"13.79.172.40/32\",\r\n \"13.80.19.74/32\",\r\n + \ \"13.81.7.21/32\",\r\n \"13.81.108.99/32\",\r\n \"13.81.215.235/32\",\r\n + \ \"13.82.93.245/32\",\r\n \"13.82.101.179/32\",\r\n \"13.82.175.96/32\",\r\n + \ \"13.84.36.2/32\",\r\n \"13.84.40.227/32\",\r\n \"13.84.42.35/32\",\r\n + \ \"13.84.46.29/32\",\r\n \"13.84.55.137/32\",\r\n \"13.84.146.60/32\",\r\n + \ \"13.84.180.32/32\",\r\n \"13.84.181.47/32\",\r\n \"13.84.188.162/32\",\r\n + \ \"13.84.189.137/32\",\r\n \"13.84.227.164/32\",\r\n \"13.85.15.194/32\",\r\n + \ \"13.85.16.224/32\",\r\n \"13.85.20.144/32\",\r\n \"13.85.24.220/32\",\r\n + \ \"13.85.27.14/32\",\r\n \"13.85.31.243/32\",\r\n \"13.85.72.129/32\",\r\n + \ \"13.85.77.179/32\",\r\n \"13.85.82.0/32\",\r\n \"13.89.57.7/32\",\r\n + \ \"13.89.172.0/23\",\r\n \"13.89.238.239/32\",\r\n \"13.90.143.69/32\",\r\n + \ \"13.90.213.204/32\",\r\n \"13.91.40.166/32\",\r\n \"13.91.242.166/32\",\r\n + \ \"13.92.139.214/32\",\r\n \"13.92.193.110/32\",\r\n \"13.92.237.218/32\",\r\n + \ \"13.93.141.10/32\",\r\n \"13.93.158.16/32\",\r\n \"13.93.220.109/32\",\r\n + \ \"13.93.231.75/32\",\r\n \"13.94.47.87/32\",\r\n \"13.94.143.57/32\",\r\n + \ \"13.94.192.98/32\",\r\n \"13.94.211.38/32\",\r\n \"13.95.82.181/32\",\r\n + \ \"13.95.93.152/32\",\r\n \"13.95.150.128/32\",\r\n \"13.95.238.192/32\",\r\n + \ \"20.21.52.0/24\",\r\n \"20.21.54.0/25\",\r\n \"20.21.54.128/27\",\r\n + \ \"20.36.43.207/32\",\r\n \"20.36.72.230/32\",\r\n \"20.36.106.96/27\",\r\n + \ \"20.36.117.0/27\",\r\n \"20.36.122.0/27\",\r\n \"20.37.66.0/27\",\r\n + \ \"20.37.74.96/27\",\r\n \"20.37.196.192/27\",\r\n \"20.37.226.0/27\",\r\n + \ \"20.38.138.0/27\",\r\n \"20.38.146.160/27\",\r\n \"20.39.11.104/29\",\r\n + \ \"20.40.24.16/32\",\r\n \"20.40.24.21/32\",\r\n \"20.40.24.23/32\",\r\n + \ \"20.40.24.30/31\",\r\n \"20.40.24.34/32\",\r\n \"20.40.24.37/32\",\r\n + \ \"20.40.24.38/31\",\r\n \"20.40.24.46/32\",\r\n \"20.40.24.49/32\",\r\n + \ \"20.40.24.50/31\",\r\n \"20.40.24.54/31\",\r\n \"20.40.24.62/31\",\r\n + \ \"20.40.24.81/32\",\r\n \"20.40.24.89/32\",\r\n \"20.40.24.108/32\",\r\n + \ \"20.40.24.144/32\",\r\n \"20.40.202.0/23\",\r\n \"20.41.66.224/27\",\r\n + \ \"20.41.195.192/27\",\r\n \"20.42.26.252/32\",\r\n \"20.42.128.96/27\",\r\n + \ \"20.42.228.160/27\",\r\n \"20.43.43.32/27\",\r\n \"20.43.67.32/27\",\r\n + \ \"20.43.132.128/25\",\r\n \"20.44.2.32/27\",\r\n \"20.44.26.160/27\",\r\n + \ \"20.45.94.192/26\",\r\n \"20.45.95.0/26\",\r\n \"20.45.122.160/27\",\r\n + \ \"20.45.196.16/29\",\r\n \"20.45.242.176/29\",\r\n \"20.45.243.0/24\",\r\n + \ \"20.45.244.0/25\",\r\n \"20.47.233.120/29\",\r\n \"20.47.234.0/24\",\r\n + \ \"20.47.235.0/25\",\r\n \"20.48.202.160/27\",\r\n \"20.48.203.0/24\",\r\n + \ \"20.48.204.0/22\",\r\n \"20.49.82.32/27\",\r\n \"20.49.90.32/27\",\r\n + \ \"20.49.97.0/25\",\r\n \"20.49.104.0/25\",\r\n \"20.50.2.0/23\",\r\n + \ \"20.50.64.0/25\",\r\n \"20.53.52.192/27\",\r\n \"20.53.53.0/25\",\r\n + \ \"20.53.60.96/27\",\r\n \"20.53.61.0/25\",\r\n \"20.69.5.168/29\",\r\n + \ \"20.69.6.0/24\",\r\n \"20.69.7.0/25\",\r\n \"20.72.26.32/27\",\r\n + \ \"20.74.192.0/23\",\r\n \"20.74.194.0/24\",\r\n \"20.74.195.0/28\",\r\n + \ \"20.79.104.0/23\",\r\n \"20.79.106.0/24\",\r\n \"20.79.107.0/28\",\r\n + \ \"20.87.80.64/29\",\r\n \"20.87.80.128/25\",\r\n \"20.87.81.0/24\",\r\n + \ \"20.89.12.224/27\",\r\n \"20.89.13.0/24\",\r\n \"20.89.14.0/23\",\r\n + \ \"20.90.33.0/24\",\r\n \"20.90.34.0/23\",\r\n \"20.90.36.0/28\",\r\n + \ \"20.90.132.160/28\",\r\n \"20.90.133.0/24\",\r\n \"20.90.134.0/23\",\r\n + \ \"20.91.8.64/27\",\r\n \"20.91.8.128/25\",\r\n \"20.97.35.16/28\",\r\n + \ \"20.97.36.0/23\",\r\n \"20.97.38.0/24\",\r\n \"20.99.14.0/24\",\r\n + \ \"20.99.24.128/25\",\r\n \"20.100.2.32/29\",\r\n \"20.100.2.128/25\",\r\n + \ \"20.100.3.0/24\",\r\n \"20.111.0.248/29\",\r\n \"20.111.1.0/24\",\r\n + \ \"20.111.2.0/25\",\r\n \"20.150.128.0/24\",\r\n \"20.150.131.0/24\",\r\n + \ \"20.150.132.0/22\",\r\n \"20.150.170.192/27\",\r\n \"20.150.178.160/27\",\r\n + \ \"20.150.186.160/27\",\r\n \"20.150.247.0/24\",\r\n \"20.150.248.7/32\",\r\n + \ \"20.150.248.8/32\",\r\n \"20.150.248.12/31\",\r\n \"20.150.248.15/32\",\r\n + \ \"20.150.248.16/28\",\r\n \"20.150.248.32/31\",\r\n \"20.150.248.36/32\",\r\n + \ \"20.150.248.38/31\",\r\n \"20.150.248.43/32\",\r\n \"20.150.248.44/31\",\r\n + \ \"20.150.248.48/29\",\r\n \"20.150.248.56/32\",\r\n \"20.150.248.59/32\",\r\n + \ \"20.150.248.60/32\",\r\n \"20.150.248.63/32\",\r\n \"20.150.248.64/31\",\r\n + \ \"20.150.248.68/31\",\r\n \"20.150.248.71/32\",\r\n \"20.150.248.72/29\",\r\n + \ \"20.150.248.80/32\",\r\n \"20.150.248.82/31\",\r\n \"20.150.248.86/31\",\r\n + \ \"20.150.248.89/32\",\r\n \"20.150.248.90/31\",\r\n \"20.150.248.100/31\",\r\n + \ \"20.150.248.104/31\",\r\n \"20.150.248.110/31\",\r\n \"20.150.248.112/30\",\r\n + \ \"20.150.248.118/31\",\r\n \"20.150.248.122/31\",\r\n \"20.150.248.124/31\",\r\n + \ \"20.150.248.128/31\",\r\n \"20.150.248.134/31\",\r\n \"20.150.248.136/29\",\r\n + \ \"20.150.248.144/28\",\r\n \"20.150.248.160/27\",\r\n \"20.150.248.192/29\",\r\n + \ \"20.150.248.200/32\",\r\n \"20.150.248.202/31\",\r\n \"20.188.98.74/32\",\r\n + \ \"20.189.104.96/27\",\r\n \"20.189.109.96/27\",\r\n \"20.189.112.66/32\",\r\n + \ \"20.189.194.112/28\",\r\n \"20.189.195.0/24\",\r\n \"20.189.196.0/23\",\r\n + \ \"20.192.54.0/24\",\r\n \"20.192.84.176/28\",\r\n \"20.192.85.0/24\",\r\n + \ \"20.192.86.0/23\",\r\n \"20.192.98.160/27\",\r\n \"20.192.153.144/28\",\r\n + \ \"20.192.154.0/23\",\r\n \"20.192.156.0/24\",\r\n \"20.192.170.8/29\",\r\n + \ \"20.192.170.128/25\",\r\n \"20.192.171.0/24\",\r\n \"20.192.234.128/27\",\r\n + \ \"20.193.198.0/24\",\r\n \"20.193.202.128/27\",\r\n \"20.194.66.32/27\",\r\n + \ \"20.199.200.0/26\",\r\n \"20.200.196.104/29\",\r\n \"20.200.196.128/25\",\r\n + \ \"20.200.197.0/24\",\r\n \"20.205.48.0/24\",\r\n \"20.205.66.0/24\",\r\n + \ \"20.205.69.80/28\",\r\n \"20.205.70.0/23\",\r\n \"20.206.0.200/29\",\r\n + \ \"20.206.1.0/24\",\r\n \"20.206.2.0/25\",\r\n \"20.207.0.96/27\",\r\n + \ \"20.207.0.128/25\",\r\n \"20.208.1.0/24\",\r\n \"20.208.5.32/29\",\r\n + \ \"20.208.5.128/25\",\r\n \"20.208.6.0/24\",\r\n \"23.96.0.52/32\",\r\n + \ \"23.96.1.109/32\",\r\n \"23.96.13.243/32\",\r\n \"23.96.32.128/32\",\r\n + \ \"23.96.96.142/32\",\r\n \"23.96.103.159/32\",\r\n \"23.96.112.53/32\",\r\n + \ \"23.96.113.128/32\",\r\n \"23.96.124.25/32\",\r\n \"23.96.187.5/32\",\r\n + \ \"23.96.201.21/32\",\r\n \"23.96.207.177/32\",\r\n \"23.96.209.155/32\",\r\n + \ \"23.96.220.116/32\",\r\n \"23.97.56.169/32\",\r\n \"23.97.79.119/32\",\r\n + \ \"23.97.96.32/32\",\r\n \"23.97.160.56/32\",\r\n \"23.97.160.74/32\",\r\n + \ \"23.97.162.202/32\",\r\n \"23.97.195.129/32\",\r\n \"23.97.208.18/32\",\r\n + \ \"23.97.214.177/32\",\r\n \"23.97.216.47/32\",\r\n \"23.97.224.11/32\",\r\n + \ \"23.98.64.36/32\",\r\n \"23.98.64.158/32\",\r\n \"23.99.0.12/32\",\r\n + \ \"23.99.65.65/32\",\r\n \"23.99.91.55/32\",\r\n \"23.99.110.192/32\",\r\n + \ \"23.99.116.70/32\",\r\n \"23.99.128.52/32\",\r\n \"23.99.183.149/32\",\r\n + \ \"23.99.192.132/32\",\r\n \"23.99.196.180/32\",\r\n \"23.99.206.151/32\",\r\n + \ \"23.99.224.56/32\",\r\n \"23.100.1.29/32\",\r\n \"23.100.46.198/32\",\r\n + \ \"23.100.48.106/32\",\r\n \"23.100.50.51/32\",\r\n \"23.100.52.22/32\",\r\n + \ \"23.100.56.27/32\",\r\n \"23.100.72.240/32\",\r\n \"23.100.82.11/32\",\r\n + \ \"23.100.216.96/27\",\r\n \"23.100.216.128/25\",\r\n \"23.101.10.141/32\",\r\n + \ \"23.101.27.182/32\",\r\n \"23.101.54.230/32\",\r\n \"23.101.63.214/32\",\r\n + \ \"23.101.67.245/32\",\r\n \"23.101.118.145/32\",\r\n \"23.101.119.44/32\",\r\n + \ \"23.101.119.163/32\",\r\n \"23.101.120.195/32\",\r\n \"23.101.125.65/32\",\r\n + \ \"23.101.147.117/32\",\r\n \"23.101.169.175/32\",\r\n \"23.101.171.94/32\",\r\n + \ \"23.101.172.244/32\",\r\n \"23.101.180.75/32\",\r\n \"23.101.203.117/32\",\r\n + \ \"23.101.203.214/32\",\r\n \"23.101.207.250/32\",\r\n \"23.101.208.52/32\",\r\n + \ \"23.101.224.24/32\",\r\n \"23.101.230.162/32\",\r\n \"23.102.12.43/32\",\r\n + \ \"23.102.21.198/32\",\r\n \"23.102.21.212/32\",\r\n \"23.102.25.149/32\",\r\n + \ \"23.102.28.178/32\",\r\n \"23.102.154.38/32\",\r\n \"23.102.161.217/32\",\r\n + \ \"23.102.191.170/32\",\r\n \"40.64.8.224/27\",\r\n \"40.64.9.0/25\",\r\n + \ \"40.64.10.0/25\",\r\n \"40.64.10.128/27\",\r\n \"40.64.128.224/27\",\r\n + \ \"40.67.58.192/27\",\r\n \"40.68.40.55/32\",\r\n \"40.68.205.178/32\",\r\n + \ \"40.68.208.131/32\",\r\n \"40.68.210.104/32\",\r\n \"40.68.214.185/32\",\r\n + \ \"40.69.43.225/32\",\r\n \"40.69.88.149/32\",\r\n \"40.69.106.96/27\",\r\n + \ \"40.69.190.41/32\",\r\n \"40.69.200.124/32\",\r\n \"40.69.210.172/32\",\r\n + \ \"40.69.218.150/32\",\r\n \"40.70.27.35/32\",\r\n \"40.70.147.0/25\",\r\n + \ \"40.71.0.179/32\",\r\n \"40.71.11.128/25\",\r\n \"40.71.177.34/32\",\r\n + \ \"40.71.199.117/32\",\r\n \"40.71.234.254/32\",\r\n \"40.71.250.191/32\",\r\n + \ \"40.74.100.128/27\",\r\n \"40.74.133.20/32\",\r\n \"40.74.245.188/32\",\r\n + \ \"40.74.253.108/32\",\r\n \"40.74.255.112/32\",\r\n \"40.76.5.137/32\",\r\n + \ \"40.76.192.15/32\",\r\n \"40.76.210.54/32\",\r\n \"40.76.218.33/32\",\r\n + \ \"40.76.223.101/32\",\r\n \"40.77.56.174/32\",\r\n \"40.78.18.232/32\",\r\n + \ \"40.78.25.157/32\",\r\n \"40.78.48.219/32\",\r\n \"40.78.194.96/27\",\r\n + \ \"40.78.204.160/27\",\r\n \"40.79.65.200/32\",\r\n \"40.79.130.128/27\",\r\n + \ \"40.79.154.192/27\",\r\n \"40.79.163.160/27\",\r\n \"40.79.171.64/27\",\r\n + \ \"40.79.178.96/27\",\r\n \"40.79.195.0/27\",\r\n \"40.80.50.160/27\",\r\n + \ \"40.80.58.224/27\",\r\n \"40.80.155.102/32\",\r\n \"40.80.156.205/32\",\r\n + \ \"40.80.170.224/27\",\r\n \"40.80.191.0/25\",\r\n \"40.82.191.84/32\",\r\n + \ \"40.82.217.93/32\",\r\n \"40.82.255.128/25\",\r\n \"40.83.16.172/32\",\r\n + \ \"40.83.72.59/32\",\r\n \"40.83.124.73/32\",\r\n \"40.83.145.50/32\",\r\n + \ \"40.83.150.233/32\",\r\n \"40.83.182.206/32\",\r\n \"40.83.183.236/32\",\r\n + \ \"40.83.184.25/32\",\r\n \"40.84.54.203/32\",\r\n \"40.84.59.174/32\",\r\n + \ \"40.84.148.247/32\",\r\n \"40.84.159.58/32\",\r\n \"40.84.194.106/32\",\r\n + \ \"40.84.226.176/32\",\r\n \"40.84.227.180/32\",\r\n \"40.84.232.28/32\",\r\n + \ \"40.85.74.227/32\",\r\n \"40.85.92.115/32\",\r\n \"40.85.96.208/32\",\r\n + \ \"40.85.190.10/32\",\r\n \"40.85.212.173/32\",\r\n \"40.85.230.182/32\",\r\n + \ \"40.86.86.144/32\",\r\n \"40.86.91.212/32\",\r\n \"40.86.96.177/32\",\r\n + \ \"40.86.99.202/32\",\r\n \"40.86.225.89/32\",\r\n \"40.86.230.96/32\",\r\n + \ \"40.87.65.131/32\",\r\n \"40.87.70.95/32\",\r\n \"40.89.19.0/27\",\r\n + \ \"40.89.131.148/32\",\r\n \"40.89.141.103/32\",\r\n \"40.112.69.156/32\",\r\n + \ \"40.112.90.244/32\",\r\n \"40.112.93.201/32\",\r\n \"40.112.142.148/32\",\r\n + \ \"40.112.143.134/32\",\r\n \"40.112.143.140/32\",\r\n \"40.112.143.214/32\",\r\n + \ \"40.112.165.44/32\",\r\n \"40.112.166.161/32\",\r\n \"40.112.191.159/32\",\r\n + \ \"40.112.192.69/32\",\r\n \"40.112.216.189/32\",\r\n \"40.112.243.0/25\",\r\n + \ \"40.113.2.52/32\",\r\n \"40.113.65.9/32\",\r\n \"40.113.71.148/32\",\r\n + \ \"40.113.81.82/32\",\r\n \"40.113.90.202/32\",\r\n \"40.113.126.251/32\",\r\n + \ \"40.113.131.37/32\",\r\n \"40.113.136.240/32\",\r\n \"40.113.142.219/32\",\r\n + \ \"40.113.204.88/32\",\r\n \"40.113.232.243/32\",\r\n \"40.113.236.45/32\",\r\n + \ \"40.114.13.25/32\",\r\n \"40.114.41.245/32\",\r\n \"40.114.51.68/32\",\r\n + \ \"40.114.68.21/32\",\r\n \"40.114.106.25/32\",\r\n \"40.114.194.188/32\",\r\n + \ \"40.114.210.78/32\",\r\n \"40.114.228.161/32\",\r\n \"40.114.237.65/32\",\r\n + \ \"40.114.243.70/32\",\r\n \"40.115.55.251/32\",\r\n \"40.115.98.85/32\",\r\n + \ \"40.115.179.121/32\",\r\n \"40.115.251.148/32\",\r\n \"40.117.154.240/32\",\r\n + \ \"40.117.188.126/32\",\r\n \"40.117.190.72/32\",\r\n \"40.118.29.72/32\",\r\n + \ \"40.118.71.240/32\",\r\n \"40.118.96.231/32\",\r\n \"40.118.100.127/32\",\r\n + \ \"40.118.101.67/32\",\r\n \"40.118.102.46/32\",\r\n \"40.118.185.161/32\",\r\n + \ \"40.118.235.113/32\",\r\n \"40.118.246.51/32\",\r\n \"40.118.255.59/32\",\r\n + \ \"40.119.12.0/23\",\r\n \"40.120.74.32/27\",\r\n \"40.121.8.241/32\",\r\n + \ \"40.121.16.193/32\",\r\n \"40.121.32.232/32\",\r\n \"40.121.35.221/32\",\r\n + \ \"40.121.91.199/32\",\r\n \"40.121.212.165/32\",\r\n \"40.121.221.52/32\",\r\n + \ \"40.122.36.65/32\",\r\n \"40.122.65.162/32\",\r\n \"40.122.110.154/32\",\r\n + \ \"40.122.114.229/32\",\r\n \"40.123.45.47/32\",\r\n \"40.123.47.58/32\",\r\n + \ \"40.124.12.75/32\",\r\n \"40.124.13.58/32\",\r\n \"40.126.227.158/32\",\r\n + \ \"40.126.236.22/32\",\r\n \"40.126.242.59/32\",\r\n \"40.126.245.169/32\",\r\n + \ \"40.127.132.204/32\",\r\n \"40.127.139.252/32\",\r\n \"40.127.192.244/32\",\r\n + \ \"40.127.196.56/32\",\r\n \"51.12.23.0/24\",\r\n \"51.12.31.0/24\",\r\n + \ \"51.12.73.224/27\",\r\n \"51.12.74.0/25\",\r\n \"51.12.98.192/27\",\r\n + \ \"51.12.202.192/27\",\r\n \"51.12.226.160/27\",\r\n \"51.12.234.160/27\",\r\n + \ \"51.13.142.128/25\",\r\n \"51.13.143.64/27\",\r\n \"51.13.143.128/25\",\r\n + \ \"51.104.28.64/26\",\r\n \"51.105.66.160/27\",\r\n \"51.105.74.160/27\",\r\n + \ \"51.105.83.24/29\",\r\n \"51.105.83.128/25\",\r\n \"51.105.84.0/24\",\r\n + \ \"51.105.90.32/27\",\r\n \"51.105.172.25/32\",\r\n \"51.107.50.0/27\",\r\n + \ \"51.107.58.160/27\",\r\n \"51.107.146.0/27\",\r\n \"51.107.154.160/27\",\r\n + \ \"51.107.255.192/26\",\r\n \"51.116.49.32/27\",\r\n \"51.116.58.160/27\",\r\n + \ \"51.116.75.128/25\",\r\n \"51.116.76.0/24\",\r\n \"51.116.77.0/29\",\r\n + \ \"51.116.145.32/27\",\r\n \"51.116.154.224/27\",\r\n \"51.116.242.160/27\",\r\n + \ \"51.116.250.160/27\",\r\n \"51.120.42.0/27\",\r\n \"51.120.98.192/27\",\r\n + \ \"51.120.106.160/27\",\r\n \"51.120.210.160/27\",\r\n \"51.120.218.192/27\",\r\n + \ \"51.120.226.0/27\",\r\n \"51.136.14.31/32\",\r\n \"51.137.106.13/32\",\r\n + \ \"51.137.163.32/27\",\r\n \"51.140.37.241/32\",\r\n \"51.140.57.176/32\",\r\n + \ \"51.140.59.233/32\",\r\n \"51.140.75.147/32\",\r\n \"51.140.84.145/32\",\r\n + \ \"51.140.85.106/32\",\r\n \"51.140.87.39/32\",\r\n \"51.140.122.226/32\",\r\n + \ \"51.140.146.128/26\",\r\n \"51.140.152.154/32\",\r\n \"51.140.153.150/32\",\r\n + \ \"51.140.180.76/32\",\r\n \"51.140.185.151/32\",\r\n \"51.140.191.223/32\",\r\n + \ \"51.140.210.96/27\",\r\n \"51.140.244.162/32\",\r\n \"51.140.245.89/32\",\r\n + \ \"51.141.12.112/32\",\r\n \"51.141.37.245/32\",\r\n \"51.141.44.139/32\",\r\n + \ \"51.141.45.207/32\",\r\n \"51.141.90.252/32\",\r\n \"51.143.102.21/32\",\r\n + \ \"51.143.191.44/32\",\r\n \"51.144.7.192/32\",\r\n \"51.144.107.53/32\",\r\n + \ \"51.144.116.43/32\",\r\n \"51.144.164.215/32\",\r\n \"51.144.182.8/32\",\r\n + \ \"52.136.50.0/27\",\r\n \"52.136.138.55/32\",\r\n \"52.136.190.0/25\",\r\n + \ \"52.136.190.128/27\",\r\n \"52.138.196.70/32\",\r\n \"52.138.218.121/32\",\r\n + \ \"52.140.106.224/27\",\r\n \"52.143.137.150/32\",\r\n \"52.147.117.224/27\",\r\n + \ \"52.147.118.128/25\",\r\n \"52.147.119.64/27\",\r\n \"52.147.119.128/25\",\r\n + \ \"52.150.140.224/27\",\r\n \"52.151.62.51/32\",\r\n \"52.160.40.218/32\",\r\n + \ \"52.161.96.193/32\",\r\n \"52.162.107.0/25\",\r\n \"52.162.208.73/32\",\r\n + \ \"52.163.122.160/32\",\r\n \"52.164.201.186/32\",\r\n \"52.164.250.133/32\",\r\n + \ \"52.165.129.203/32\",\r\n \"52.165.135.234/32\",\r\n \"52.165.155.12/32\",\r\n + \ \"52.165.155.237/32\",\r\n \"52.165.163.223/32\",\r\n \"52.165.168.40/32\",\r\n + \ \"52.165.174.123/32\",\r\n \"52.165.184.170/32\",\r\n \"52.165.220.33/32\",\r\n + \ \"52.165.224.81/32\",\r\n \"52.165.237.15/32\",\r\n \"52.166.78.97/32\",\r\n + \ \"52.166.113.188/32\",\r\n \"52.166.119.99/32\",\r\n \"52.166.178.208/32\",\r\n + \ \"52.166.181.85/32\",\r\n \"52.166.198.163/32\",\r\n \"52.168.125.188/32\",\r\n + \ \"52.169.73.236/32\",\r\n \"52.169.78.163/32\",\r\n \"52.169.180.223/32\",\r\n + \ \"52.169.184.163/32\",\r\n \"52.169.188.236/32\",\r\n \"52.169.191.40/32\",\r\n + \ \"52.170.7.25/32\",\r\n \"52.170.46.174/32\",\r\n \"52.171.56.101/32\",\r\n + \ \"52.171.56.110/32\",\r\n \"52.171.136.200/32\",\r\n \"52.171.140.237/32\",\r\n + \ \"52.171.218.239/32\",\r\n \"52.171.221.170/32\",\r\n \"52.171.222.247/32\",\r\n + \ \"52.172.54.225/32\",\r\n \"52.172.195.80/32\",\r\n \"52.172.204.196/32\",\r\n + \ \"52.172.219.121/32\",\r\n \"52.173.28.95/32\",\r\n \"52.173.36.83/32\",\r\n + \ \"52.173.76.33/32\",\r\n \"52.173.77.140/32\",\r\n \"52.173.83.49/32\",\r\n + \ \"52.173.84.157/32\",\r\n \"52.173.87.130/32\",\r\n \"52.173.94.173/32\",\r\n + \ \"52.173.134.115/32\",\r\n \"52.173.139.99/32\",\r\n \"52.173.139.125/32\",\r\n + \ \"52.173.149.254/32\",\r\n \"52.173.151.229/32\",\r\n \"52.173.184.147/32\",\r\n + \ \"52.173.245.249/32\",\r\n \"52.173.249.137/32\",\r\n \"52.174.3.80/32\",\r\n + \ \"52.174.7.133/32\",\r\n \"52.174.35.5/32\",\r\n \"52.174.106.15/32\",\r\n + \ \"52.174.150.25/32\",\r\n \"52.174.181.178/32\",\r\n \"52.174.184.18/32\",\r\n + \ \"52.174.193.210/32\",\r\n \"52.174.235.29/32\",\r\n \"52.175.158.219/32\",\r\n + \ \"52.175.202.25/32\",\r\n \"52.175.254.10/32\",\r\n \"52.176.2.229/32\",\r\n + \ \"52.176.5.241/32\",\r\n \"52.176.6.0/32\",\r\n \"52.176.6.37/32\",\r\n + \ \"52.176.61.128/32\",\r\n \"52.176.104.120/32\",\r\n \"52.176.149.197/32\",\r\n + \ \"52.176.165.69/32\",\r\n \"52.177.169.150/32\",\r\n \"52.177.189.138/32\",\r\n + \ \"52.177.206.73/32\",\r\n \"52.178.29.39/32\",\r\n \"52.178.37.244/32\",\r\n + \ \"52.178.43.209/32\",\r\n \"52.178.45.139/32\",\r\n \"52.178.46.181/32\",\r\n + \ \"52.178.75.200/32\",\r\n \"52.178.79.163/32\",\r\n \"52.178.89.129/32\",\r\n + \ \"52.178.90.230/32\",\r\n \"52.178.92.96/32\",\r\n \"52.178.105.179/32\",\r\n + \ \"52.178.114.226/32\",\r\n \"52.178.158.175/32\",\r\n \"52.178.164.235/32\",\r\n + \ \"52.178.179.169/32\",\r\n \"52.178.190.191/32\",\r\n \"52.178.201.147/32\",\r\n + \ \"52.178.208.12/32\",\r\n \"52.178.212.17/32\",\r\n \"52.178.214.89/32\",\r\n + \ \"52.179.97.15/32\",\r\n \"52.179.188.206/32\",\r\n \"52.180.178.6/32\",\r\n + \ \"52.180.183.66/32\",\r\n \"52.183.82.125/32\",\r\n \"52.184.162.135/32\",\r\n + \ \"52.184.193.103/32\",\r\n \"52.184.193.104/32\",\r\n \"52.187.17.126/32\",\r\n + \ \"52.187.36.104/32\",\r\n \"52.187.52.94/32\",\r\n \"52.187.135.79/32\",\r\n + \ \"52.187.206.243/32\",\r\n \"52.187.229.23/32\",\r\n \"52.189.213.49/32\",\r\n + \ \"52.225.179.39/32\",\r\n \"52.225.190.65/32\",\r\n \"52.226.134.64/32\",\r\n + \ \"52.228.42.76/32\",\r\n \"52.228.84.32/27\",\r\n \"52.228.121.123/32\",\r\n + \ \"52.229.30.210/32\",\r\n \"52.229.115.84/32\",\r\n \"52.230.1.186/32\",\r\n + \ \"52.231.18.128/27\",\r\n \"52.231.32.120/32\",\r\n \"52.231.38.95/32\",\r\n + \ \"52.231.77.58/32\",\r\n \"52.231.146.96/27\",\r\n \"52.231.200.101/32\",\r\n + \ \"52.231.200.179/32\",\r\n \"52.232.19.237/32\",\r\n \"52.232.26.228/32\",\r\n + \ \"52.232.33.202/32\",\r\n \"52.232.56.79/32\",\r\n \"52.232.127.196/32\",\r\n + \ \"52.233.38.143/32\",\r\n \"52.233.128.61/32\",\r\n \"52.233.133.18/32\",\r\n + \ \"52.233.133.121/32\",\r\n \"52.233.155.168/32\",\r\n \"52.233.164.195/32\",\r\n + \ \"52.233.175.59/32\",\r\n \"52.233.184.181/32\",\r\n \"52.233.198.206/32\",\r\n + \ \"52.234.209.94/32\",\r\n \"52.237.18.220/32\",\r\n \"52.237.22.139/32\",\r\n + \ \"52.237.130.0/32\",\r\n \"52.237.205.163/32\",\r\n \"52.237.214.221/32\",\r\n + \ \"52.237.246.162/32\",\r\n \"52.240.149.243/32\",\r\n \"52.240.155.58/32\",\r\n + \ \"52.242.22.213/32\",\r\n \"52.242.27.213/32\",\r\n \"52.242.40.192/28\",\r\n + \ \"52.242.41.0/24\",\r\n \"52.242.42.0/23\",\r\n \"52.243.39.89/32\",\r\n + \ \"52.246.154.160/27\",\r\n \"52.252.160.21/32\",\r\n \"52.253.224.223/32\",\r\n + \ \"52.255.35.249/32\",\r\n \"52.255.54.134/32\",\r\n \"65.52.24.41/32\",\r\n + \ \"65.52.128.33/32\",\r\n \"65.52.130.1/32\",\r\n \"65.52.160.119/32\",\r\n + \ \"65.52.168.70/32\",\r\n \"65.52.213.73/32\",\r\n \"65.52.217.59/32\",\r\n + \ \"65.52.218.253/32\",\r\n \"65.52.250.96/27\",\r\n \"94.245.104.73/32\",\r\n + \ \"102.37.86.64/26\",\r\n \"102.37.86.128/26\",\r\n \"102.133.26.32/27\",\r\n + \ \"102.133.57.128/27\",\r\n \"102.133.122.160/27\",\r\n + \ \"102.133.154.32/27\",\r\n \"102.133.218.32/28\",\r\n \"102.133.250.160/27\",\r\n + \ \"104.40.3.53/32\",\r\n \"104.40.11.192/32\",\r\n \"104.40.28.133/32\",\r\n + \ \"104.40.53.219/32\",\r\n \"104.40.63.98/32\",\r\n \"104.40.84.133/32\",\r\n + \ \"104.40.92.107/32\",\r\n \"104.40.129.89/32\",\r\n \"104.40.147.180/32\",\r\n + \ \"104.40.147.216/32\",\r\n \"104.40.158.55/32\",\r\n \"104.40.179.243/32\",\r\n + \ \"104.40.183.236/32\",\r\n \"104.40.185.192/32\",\r\n \"104.40.187.26/32\",\r\n + \ \"104.40.191.174/32\",\r\n \"104.40.210.25/32\",\r\n \"104.40.215.219/32\",\r\n + \ \"104.40.222.81/32\",\r\n \"104.40.250.100/32\",\r\n \"104.41.9.139/32\",\r\n + \ \"104.41.13.179/32\",\r\n \"104.41.63.108/32\",\r\n \"104.41.186.103/32\",\r\n + \ \"104.41.216.137/32\",\r\n \"104.41.229.199/32\",\r\n \"104.42.53.248/32\",\r\n + \ \"104.42.78.153/32\",\r\n \"104.42.128.171/32\",\r\n \"104.42.148.55/32\",\r\n + \ \"104.42.152.64/32\",\r\n \"104.42.154.105/32\",\r\n \"104.42.188.146/32\",\r\n + \ \"104.42.231.5/32\",\r\n \"104.43.129.105/32\",\r\n \"104.43.140.101/32\",\r\n + \ \"104.43.142.33/32\",\r\n \"104.43.221.31/32\",\r\n \"104.43.246.71/32\",\r\n + \ \"104.43.254.102/32\",\r\n \"104.44.128.13/32\",\r\n \"104.44.130.38/32\",\r\n + \ \"104.45.1.117/32\",\r\n \"104.45.14.249/32\",\r\n \"104.45.81.79/32\",\r\n + \ \"104.45.95.61/32\",\r\n \"104.45.129.178/32\",\r\n \"104.45.141.247/32\",\r\n + \ \"104.45.152.13/32\",\r\n \"104.45.152.60/32\",\r\n \"104.45.154.200/32\",\r\n + \ \"104.45.226.98/32\",\r\n \"104.45.231.79/32\",\r\n \"104.46.38.245/32\",\r\n + \ \"104.46.44.78/32\",\r\n \"104.46.61.116/32\",\r\n \"104.46.101.59/32\",\r\n + \ \"104.47.137.62/32\",\r\n \"104.47.151.115/32\",\r\n \"104.47.160.14/32\",\r\n + \ \"104.47.164.119/32\",\r\n \"104.208.48.107/32\",\r\n \"104.209.178.67/32\",\r\n + \ \"104.209.192.206/32\",\r\n \"104.209.197.87/32\",\r\n + \ \"104.210.38.149/32\",\r\n \"104.210.69.241/32\",\r\n \"104.210.92.71/32\",\r\n + \ \"104.210.145.181/32\",\r\n \"104.210.147.57/32\",\r\n + \ \"104.210.152.76/32\",\r\n \"104.210.152.122/32\",\r\n + \ \"104.210.153.116/32\",\r\n \"104.210.158.20/32\",\r\n + \ \"104.211.26.212/32\",\r\n \"104.211.81.32/27\",\r\n \"104.211.97.138/32\",\r\n + \ \"104.211.146.96/27\",\r\n \"104.211.160.159/32\",\r\n + \ \"104.211.179.11/32\",\r\n \"104.211.184.197/32\",\r\n + \ \"104.211.224.252/32\",\r\n \"104.211.225.167/32\",\r\n + \ \"104.214.20.0/23\",\r\n \"104.214.29.203/32\",\r\n \"104.214.64.238/32\",\r\n + \ \"104.214.74.110/32\",\r\n \"104.214.77.221/32\",\r\n \"104.214.110.60/32\",\r\n + \ \"104.214.110.226/32\",\r\n \"104.214.118.174/32\",\r\n + \ \"104.214.119.36/32\",\r\n \"104.214.137.236/32\",\r\n + \ \"104.214.231.110/32\",\r\n \"104.214.236.47/32\",\r\n + \ \"104.214.237.135/32\",\r\n \"104.215.11.176/32\",\r\n + \ \"104.215.58.230/32\",\r\n \"104.215.73.236/32\",\r\n \"104.215.78.13/32\",\r\n + \ \"104.215.89.22/32\",\r\n \"104.215.147.45/32\",\r\n \"104.215.155.1/32\",\r\n + \ \"111.221.95.27/32\",\r\n \"137.116.78.243/32\",\r\n \"137.116.88.213/32\",\r\n + \ \"137.116.128.188/32\",\r\n \"137.116.153.238/32\",\r\n + \ \"137.117.9.212/32\",\r\n \"137.117.17.70/32\",\r\n \"137.117.58.204/32\",\r\n + \ \"137.117.66.167/32\",\r\n \"137.117.84.54/32\",\r\n \"137.117.90.63/32\",\r\n + \ \"137.117.93.87/32\",\r\n \"137.117.166.35/32\",\r\n \"137.117.175.14/32\",\r\n + \ \"137.117.203.130/32\",\r\n \"137.117.211.244/32\",\r\n + \ \"137.117.218.101/32\",\r\n \"137.117.224.218/32\",\r\n + \ \"137.117.225.87/32\",\r\n \"137.135.91.176/32\",\r\n \"137.135.107.235/32\",\r\n + \ \"137.135.129.175/32\",\r\n \"137.135.133.221/32\",\r\n + \ \"138.91.0.30/32\",\r\n \"138.91.16.18/32\",\r\n \"138.91.224.84/32\",\r\n + \ \"138.91.225.40/32\",\r\n \"138.91.240.81/32\",\r\n \"157.56.13.114/32\",\r\n + \ \"168.61.152.29/32\",\r\n \"168.61.159.114/32\",\r\n \"168.61.217.214/32\",\r\n + \ \"168.61.218.125/32\",\r\n \"168.62.20.37/32\",\r\n \"168.62.48.183/32\",\r\n + \ \"168.62.180.173/32\",\r\n \"168.62.224.13/32\",\r\n \"168.62.225.23/32\",\r\n + \ \"168.63.5.231/32\",\r\n \"168.63.53.239/32\",\r\n \"168.63.107.5/32\",\r\n + \ \"191.232.38.77/32\",\r\n \"191.232.176.16/32\",\r\n \"191.233.50.32/27\",\r\n + \ \"191.233.82.44/32\",\r\n \"191.233.85.165/32\",\r\n \"191.233.87.194/32\",\r\n + \ \"191.233.203.32/27\",\r\n \"191.234.16.188/32\",\r\n \"191.234.146.160/27\",\r\n + \ \"191.234.154.160/27\",\r\n \"191.235.81.73/32\",\r\n \"191.235.90.70/32\",\r\n + \ \"191.235.160.13/32\",\r\n \"191.235.176.12/32\",\r\n \"191.235.177.30/32\",\r\n + \ \"191.235.208.12/32\",\r\n \"191.235.215.184/32\",\r\n + \ \"191.235.228.32/27\",\r\n \"191.236.16.12/32\",\r\n \"191.236.59.67/32\",\r\n + \ \"191.236.80.12/32\",\r\n \"191.236.106.123/32\",\r\n \"191.236.148.9/32\",\r\n + \ \"191.236.192.121/32\",\r\n \"191.237.24.89/32\",\r\n \"191.237.27.74/32\",\r\n + \ \"191.237.128.238/32\",\r\n \"191.238.8.26/32\",\r\n \"191.238.33.50/32\",\r\n + \ \"191.238.78.16/28\",\r\n \"191.238.79.0/24\",\r\n \"191.238.176.139/32\",\r\n + \ \"191.238.240.12/32\",\r\n \"191.239.58.162/32\",\r\n \"191.239.188.11/32\",\r\n + \ \"207.46.144.49/32\",\r\n \"207.46.147.148/32\",\r\n \"2603:1000:4:2::400/120\",\r\n + \ \"2603:1000:4:402::a0/123\",\r\n \"2603:1000:104:3::200/119\",\r\n + \ \"2603:1000:104:402::a0/123\",\r\n \"2603:1000:104:802::a0/123\",\r\n + \ \"2603:1000:104:c02::a0/123\",\r\n \"2603:1010:6:402::a0/123\",\r\n + \ \"2603:1010:6:802::a0/123\",\r\n \"2603:1010:6:c02::a0/123\",\r\n + \ \"2603:1010:101:402::a0/123\",\r\n \"2603:1010:304:2::300/120\",\r\n + \ \"2603:1010:304:402::a0/123\",\r\n \"2603:1010:404:2::300/120\",\r\n + \ \"2603:1010:404:402::a0/123\",\r\n \"2603:1020:5:402::a0/123\",\r\n + \ \"2603:1020:5:802::a0/123\",\r\n \"2603:1020:5:c02::a0/123\",\r\n + \ \"2603:1020:206:402::a0/123\",\r\n \"2603:1020:206:802::a0/123\",\r\n + \ \"2603:1020:206:c02::a0/123\",\r\n \"2603:1020:305:1::200/119\",\r\n + \ \"2603:1020:305:402::a0/123\",\r\n \"2603:1020:405:402::a0/123\",\r\n + \ \"2603:1020:605:2::400/118\",\r\n \"2603:1020:605:402::a0/123\",\r\n + \ \"2603:1020:705:402::a0/123\",\r\n \"2603:1020:705:802::a0/123\",\r\n + \ \"2603:1020:705:c02::a0/123\",\r\n \"2603:1020:805:2::600/119\",\r\n + \ \"2603:1020:805:402::a0/123\",\r\n \"2603:1020:805:802::a0/123\",\r\n + \ \"2603:1020:805:c02::a0/123\",\r\n \"2603:1020:905:2::300/120\",\r\n + \ \"2603:1020:905:402::a0/123\",\r\n \"2603:1020:a04:3::100/120\",\r\n + \ \"2603:1020:a04:3::400/119\",\r\n \"2603:1020:a04:402::a0/123\",\r\n + \ \"2603:1020:a04:802::a0/123\",\r\n \"2603:1020:a04:c02::a0/123\",\r\n + \ \"2603:1020:b04:2::400/120\",\r\n \"2603:1020:b04:402::a0/123\",\r\n + \ \"2603:1020:c04:402::a0/123\",\r\n \"2603:1020:c04:802::a0/123\",\r\n + \ \"2603:1020:c04:c02::a0/123\",\r\n \"2603:1020:d04:2::200/119\",\r\n + \ \"2603:1020:d04:402::a0/123\",\r\n \"2603:1020:e04:4::200/119\",\r\n + \ \"2603:1020:e04:402::a0/123\",\r\n \"2603:1020:e04:802::a0/123\",\r\n + \ \"2603:1020:e04:c02::a0/123\",\r\n \"2603:1020:f04:3::400/120\",\r\n + \ \"2603:1020:f04:402::a0/123\",\r\n \"2603:1020:1004:2::500/120\",\r\n + \ \"2603:1020:1004:3::100/120\",\r\n \"2603:1020:1004:400::a0/123\",\r\n + \ \"2603:1020:1004:800::160/123\",\r\n \"2603:1020:1004:800::360/123\",\r\n + \ \"2603:1020:1104:2::300/120\",\r\n \"2603:1020:1104:400::a0/123\",\r\n + \ \"2603:1030:f:4::/119\",\r\n \"2603:1030:f:400::8a0/123\",\r\n + \ \"2603:1030:10:402::a0/123\",\r\n \"2603:1030:10:802::a0/123\",\r\n + \ \"2603:1030:10:c02::a0/123\",\r\n \"2603:1030:104:2::100/120\",\r\n + \ \"2603:1030:104:2::600/120\",\r\n \"2603:1030:104:402::a0/123\",\r\n + \ \"2603:1030:107:400::20/123\",\r\n \"2603:1030:210:402::a0/123\",\r\n + \ \"2603:1030:210:802::a0/123\",\r\n \"2603:1030:210:c02::a0/123\",\r\n + \ \"2603:1030:302::600/120\",\r\n \"2603:1030:40b:3::400/119\",\r\n + \ \"2603:1030:40b:400::8a0/123\",\r\n \"2603:1030:40b:800::a0/123\",\r\n + \ \"2603:1030:40b:c00::a0/123\",\r\n \"2603:1030:40c:402::a0/123\",\r\n + \ \"2603:1030:40c:802::a0/123\",\r\n \"2603:1030:40c:c02::a0/123\",\r\n + \ \"2603:1030:504:402::a0/123\",\r\n \"2603:1030:504:802::160/123\",\r\n + \ \"2603:1030:504:802::360/123\",\r\n \"2603:1030:504:c02::3a0/123\",\r\n + \ \"2603:1030:608:402::a0/123\",\r\n \"2603:1030:807:3::400/118\",\r\n + \ \"2603:1030:807:402::a0/123\",\r\n \"2603:1030:807:802::a0/123\",\r\n + \ \"2603:1030:807:c02::a0/123\",\r\n \"2603:1030:a07:402::a0/123\",\r\n + \ \"2603:1030:b04:3::200/119\",\r\n \"2603:1030:b04:402::a0/123\",\r\n + \ \"2603:1030:c06:400::8a0/123\",\r\n \"2603:1030:c06:802::a0/123\",\r\n + \ \"2603:1030:c06:c02::a0/123\",\r\n \"2603:1030:f05:402::a0/123\",\r\n + \ \"2603:1030:f05:802::a0/123\",\r\n \"2603:1030:f05:c02::a0/123\",\r\n + \ \"2603:1030:1005:2::400/118\",\r\n \"2603:1030:1005:402::a0/123\",\r\n + \ \"2603:1040:5:402::a0/123\",\r\n \"2603:1040:5:802::a0/123\",\r\n + \ \"2603:1040:5:c02::a0/123\",\r\n \"2603:1040:207:2::400/120\",\r\n + \ \"2603:1040:207:3::400/118\",\r\n \"2603:1040:207:402::a0/123\",\r\n + \ \"2603:1040:407:402::a0/123\",\r\n \"2603:1040:407:802::a0/123\",\r\n + \ \"2603:1040:407:c02::a0/123\",\r\n \"2603:1040:606:2::400/118\",\r\n + \ \"2603:1040:606:402::a0/123\",\r\n \"2603:1040:806:2::400/118\",\r\n + \ \"2603:1040:806:402::a0/123\",\r\n \"2603:1040:904:402::a0/123\",\r\n + \ \"2603:1040:904:802::a0/123\",\r\n \"2603:1040:904:c02::a0/123\",\r\n + \ \"2603:1040:a06:3::400/119\",\r\n \"2603:1040:a06:402::a0/123\",\r\n + \ \"2603:1040:a06:802::a0/123\",\r\n \"2603:1040:a06:c02::a0/123\",\r\n + \ \"2603:1040:b04:2::400/120\",\r\n \"2603:1040:b04:402::a0/123\",\r\n + \ \"2603:1040:c06:2::400/118\",\r\n \"2603:1040:c06:402::a0/123\",\r\n + \ \"2603:1040:d04:3::100/120\",\r\n \"2603:1040:d04:400::a0/123\",\r\n + \ \"2603:1040:d04:800::160/123\",\r\n \"2603:1040:d04:800::360/123\",\r\n + \ \"2603:1040:e05:1::200/120\",\r\n \"2603:1040:f05:3::200/119\",\r\n + \ \"2603:1040:f05:402::a0/123\",\r\n \"2603:1040:f05:802::a0/123\",\r\n + \ \"2603:1040:f05:c02::a0/123\",\r\n \"2603:1040:1002:2::100/120\",\r\n + \ \"2603:1040:1002:2::400/120\",\r\n \"2603:1040:1104:2::300/120\",\r\n + \ \"2603:1040:1104:400::a0/123\",\r\n \"2603:1050:6:402::a0/123\",\r\n + \ \"2603:1050:6:802::a0/123\",\r\n \"2603:1050:6:c02::a0/123\",\r\n + \ \"2603:1050:403:2::400/119\",\r\n \"2603:1050:403:400::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.AustraliaCentral\",\r\n + \ \"id\": \"AppService.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.36.43.207/32\",\r\n + \ \"20.36.106.96/27\",\r\n \"20.37.226.0/27\",\r\n \"20.53.52.192/27\",\r\n + \ \"20.53.53.0/25\",\r\n \"2603:1010:304:2::300/120\",\r\n + \ \"2603:1010:304:402::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.AustraliaCentral2\",\r\n \"id\": + \"AppService.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"australiacentral2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.36.72.230/32\",\r\n \"20.36.117.0/27\",\r\n \"20.36.122.0/27\",\r\n + \ \"20.53.60.96/27\",\r\n \"20.53.61.0/25\",\r\n \"2603:1010:404:2::300/120\",\r\n + \ \"2603:1010:404:402::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.AustraliaEast\",\r\n \"id\": \"AppService.AustraliaEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.70.72.32/27\",\r\n + \ \"13.70.123.149/32\",\r\n \"13.75.138.224/32\",\r\n \"13.75.147.143/32\",\r\n + \ \"13.75.147.201/32\",\r\n \"13.75.218.45/32\",\r\n \"20.37.196.192/27\",\r\n + \ \"23.101.208.52/32\",\r\n \"40.79.163.160/27\",\r\n \"40.79.171.64/27\",\r\n + \ \"40.82.217.93/32\",\r\n \"40.126.227.158/32\",\r\n \"40.126.236.22/32\",\r\n + \ \"40.126.242.59/32\",\r\n \"40.126.245.169/32\",\r\n \"52.187.206.243/32\",\r\n + \ \"52.187.229.23/32\",\r\n \"52.237.205.163/32\",\r\n \"52.237.214.221/32\",\r\n + \ \"52.237.246.162/32\",\r\n \"104.210.69.241/32\",\r\n \"104.210.92.71/32\",\r\n + \ \"2603:1010:6:402::a0/123\",\r\n \"2603:1010:6:802::a0/123\",\r\n + \ \"2603:1010:6:c02::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.AustraliaSoutheast\",\r\n \"id\": + \"AppService.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"13.70.146.110/32\",\r\n \"13.70.147.206/32\",\r\n + \ \"13.73.116.45/32\",\r\n \"13.73.118.104/32\",\r\n \"13.77.7.175/32\",\r\n + \ \"13.77.50.96/27\",\r\n \"20.42.228.160/27\",\r\n \"23.101.224.24/32\",\r\n + \ \"23.101.230.162/32\",\r\n \"52.189.213.49/32\",\r\n \"52.255.35.249/32\",\r\n + \ \"52.255.54.134/32\",\r\n \"191.239.188.11/32\",\r\n \"2603:1010:101:402::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.BrazilSouth\",\r\n + \ \"id\": \"AppService.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"23.97.96.32/32\",\r\n \"104.41.9.139/32\",\r\n \"104.41.13.179/32\",\r\n + \ \"104.41.63.108/32\",\r\n \"191.232.38.77/32\",\r\n \"191.232.176.16/32\",\r\n + \ \"191.233.203.32/27\",\r\n \"191.234.146.160/27\",\r\n + \ \"191.234.154.160/27\",\r\n \"191.235.81.73/32\",\r\n \"191.235.90.70/32\",\r\n + \ \"191.235.228.32/27\",\r\n \"191.238.78.16/28\",\r\n \"191.238.79.0/24\",\r\n + \ \"2603:1050:6:402::a0/123\",\r\n \"2603:1050:6:802::a0/123\",\r\n + \ \"2603:1050:6:c02::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.BrazilSoutheast\",\r\n \"id\": + \"AppService.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.206.0.200/29\",\r\n \"20.206.1.0/24\",\r\n \"20.206.2.0/25\",\r\n + \ \"191.233.50.32/27\",\r\n \"2603:1050:403:2::400/119\",\r\n + \ \"2603:1050:403:400::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.CanadaCentral\",\r\n \"id\": \"AppService.CanadaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.71.170.128/27\",\r\n + \ \"20.38.146.160/27\",\r\n \"20.48.202.160/27\",\r\n \"20.48.203.0/24\",\r\n + \ \"20.48.204.0/22\",\r\n \"40.82.191.84/32\",\r\n \"40.85.212.173/32\",\r\n + \ \"40.85.230.182/32\",\r\n \"52.228.42.76/32\",\r\n \"52.228.84.32/27\",\r\n + \ \"52.228.121.123/32\",\r\n \"52.233.38.143/32\",\r\n \"52.237.18.220/32\",\r\n + \ \"52.237.22.139/32\",\r\n \"52.246.154.160/27\",\r\n \"2603:1030:f05:402::a0/123\",\r\n + \ \"2603:1030:f05:802::a0/123\",\r\n \"2603:1030:f05:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.CanadaEast\",\r\n + \ \"id\": \"AppService.CanadaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"40.69.106.96/27\",\r\n \"40.86.225.89/32\",\r\n + \ \"40.86.230.96/32\",\r\n \"40.89.19.0/27\",\r\n \"52.229.115.84/32\",\r\n + \ \"52.242.22.213/32\",\r\n \"52.242.27.213/32\",\r\n \"52.242.40.192/28\",\r\n + \ \"52.242.41.0/24\",\r\n \"52.242.42.0/23\",\r\n \"2603:1030:1005:2::400/118\",\r\n + \ \"2603:1030:1005:402::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.CentralIndia\",\r\n \"id\": \"AppService.CentralIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.192.98.160/27\",\r\n + \ \"20.192.170.8/29\",\r\n \"20.192.170.128/25\",\r\n \"20.192.171.0/24\",\r\n + \ \"40.80.50.160/27\",\r\n \"52.140.106.224/27\",\r\n \"52.172.195.80/32\",\r\n + \ \"52.172.204.196/32\",\r\n \"52.172.219.121/32\",\r\n \"104.211.81.32/27\",\r\n + \ \"104.211.97.138/32\",\r\n \"2603:1040:a06:3::400/119\",\r\n + \ \"2603:1040:a06:402::a0/123\",\r\n \"2603:1040:a06:802::a0/123\",\r\n + \ \"2603:1040:a06:c02::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.CentralUS\",\r\n \"id\": \"AppService.CentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.67.129.26/32\",\r\n + \ \"13.67.141.98/32\",\r\n \"13.89.57.7/32\",\r\n \"13.89.172.0/23\",\r\n + \ \"13.89.238.239/32\",\r\n \"20.40.202.0/23\",\r\n \"23.99.128.52/32\",\r\n + \ \"23.99.183.149/32\",\r\n \"23.99.192.132/32\",\r\n \"23.99.196.180/32\",\r\n + \ \"23.99.206.151/32\",\r\n \"23.99.224.56/32\",\r\n \"23.100.82.11/32\",\r\n + \ \"23.101.118.145/32\",\r\n \"23.101.119.44/32\",\r\n \"23.101.119.163/32\",\r\n + \ \"23.101.120.195/32\",\r\n \"23.101.125.65/32\",\r\n \"40.69.190.41/32\",\r\n + \ \"40.77.56.174/32\",\r\n \"40.83.16.172/32\",\r\n \"40.86.86.144/32\",\r\n + \ \"40.86.91.212/32\",\r\n \"40.86.96.177/32\",\r\n \"40.86.99.202/32\",\r\n + \ \"40.113.204.88/32\",\r\n \"40.113.232.243/32\",\r\n \"40.113.236.45/32\",\r\n + \ \"40.122.36.65/32\",\r\n \"40.122.65.162/32\",\r\n \"40.122.110.154/32\",\r\n + \ \"40.122.114.229/32\",\r\n \"52.165.129.203/32\",\r\n \"52.165.135.234/32\",\r\n + \ \"52.165.155.12/32\",\r\n \"52.165.155.237/32\",\r\n \"52.165.163.223/32\",\r\n + \ \"52.165.168.40/32\",\r\n \"52.165.174.123/32\",\r\n \"52.165.184.170/32\",\r\n + \ \"52.165.220.33/32\",\r\n \"52.165.224.81/32\",\r\n \"52.165.237.15/32\",\r\n + \ \"52.173.28.95/32\",\r\n \"52.173.36.83/32\",\r\n \"52.173.76.33/32\",\r\n + \ \"52.173.77.140/32\",\r\n \"52.173.83.49/32\",\r\n \"52.173.84.157/32\",\r\n + \ \"52.173.87.130/32\",\r\n \"52.173.94.173/32\",\r\n \"52.173.134.115/32\",\r\n + \ \"52.173.139.99/32\",\r\n \"52.173.139.125/32\",\r\n \"52.173.149.254/32\",\r\n + \ \"52.173.151.229/32\",\r\n \"52.173.184.147/32\",\r\n \"52.173.245.249/32\",\r\n + \ \"52.173.249.137/32\",\r\n \"52.176.2.229/32\",\r\n \"52.176.5.241/32\",\r\n + \ \"52.176.6.0/32\",\r\n \"52.176.6.37/32\",\r\n \"52.176.61.128/32\",\r\n + \ \"52.176.104.120/32\",\r\n \"52.176.149.197/32\",\r\n \"52.176.165.69/32\",\r\n + \ \"104.43.129.105/32\",\r\n \"104.43.140.101/32\",\r\n \"104.43.142.33/32\",\r\n + \ \"104.43.221.31/32\",\r\n \"104.43.246.71/32\",\r\n \"104.43.254.102/32\",\r\n + \ \"168.61.152.29/32\",\r\n \"168.61.159.114/32\",\r\n \"168.61.217.214/32\",\r\n + \ \"168.61.218.125/32\",\r\n \"2603:1030:10:402::a0/123\",\r\n + \ \"2603:1030:10:802::a0/123\",\r\n \"2603:1030:10:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.CentralUSEUAP\",\r\n + \ \"id\": \"AppService.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.45.196.16/29\",\r\n \"20.45.242.176/29\",\r\n + \ \"20.45.243.0/24\",\r\n \"20.45.244.0/25\",\r\n \"40.78.204.160/27\",\r\n + \ \"52.180.178.6/32\",\r\n \"52.180.183.66/32\",\r\n \"104.208.48.107/32\",\r\n + \ \"2603:1030:f:4::/119\",\r\n \"2603:1030:f:400::8a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.EastAsia\",\r\n + \ \"id\": \"AppService.EastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"13.75.34.160/27\",\r\n \"13.75.46.26/32\",\r\n \"13.75.47.15/32\",\r\n + \ \"13.75.89.224/32\",\r\n \"13.75.112.108/32\",\r\n \"13.75.115.40/32\",\r\n + \ \"13.94.47.87/32\",\r\n \"20.189.104.96/27\",\r\n \"20.189.109.96/27\",\r\n + \ \"20.189.112.66/32\",\r\n \"20.205.48.0/24\",\r\n \"20.205.66.0/24\",\r\n + \ \"20.205.69.80/28\",\r\n \"20.205.70.0/23\",\r\n \"23.97.79.119/32\",\r\n + \ \"23.99.110.192/32\",\r\n \"23.99.116.70/32\",\r\n \"23.101.10.141/32\",\r\n + \ \"40.83.72.59/32\",\r\n \"40.83.124.73/32\",\r\n \"65.52.160.119/32\",\r\n + \ \"65.52.168.70/32\",\r\n \"191.234.16.188/32\",\r\n \"207.46.144.49/32\",\r\n + \ \"207.46.147.148/32\",\r\n \"2603:1040:207:2::400/120\",\r\n + \ \"2603:1040:207:3::400/118\",\r\n \"2603:1040:207:402::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.EastUS\",\r\n + \ \"id\": \"AppService.EastUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"13.82.93.245/32\",\r\n \"13.82.101.179/32\",\r\n + \ \"13.82.175.96/32\",\r\n \"13.90.143.69/32\",\r\n \"13.90.213.204/32\",\r\n + \ \"13.92.139.214/32\",\r\n \"13.92.193.110/32\",\r\n \"13.92.237.218/32\",\r\n + \ \"20.42.26.252/32\",\r\n \"20.49.104.0/25\",\r\n \"23.96.0.52/32\",\r\n + \ \"23.96.1.109/32\",\r\n \"23.96.13.243/32\",\r\n \"23.96.32.128/32\",\r\n + \ \"23.96.96.142/32\",\r\n \"23.96.103.159/32\",\r\n \"23.96.112.53/32\",\r\n + \ \"23.96.113.128/32\",\r\n \"23.96.124.25/32\",\r\n \"40.71.0.179/32\",\r\n + \ \"40.71.11.128/25\",\r\n \"40.71.177.34/32\",\r\n \"40.71.199.117/32\",\r\n + \ \"40.71.234.254/32\",\r\n \"40.71.250.191/32\",\r\n \"40.76.5.137/32\",\r\n + \ \"40.76.192.15/32\",\r\n \"40.76.210.54/32\",\r\n \"40.76.218.33/32\",\r\n + \ \"40.76.223.101/32\",\r\n \"40.79.154.192/27\",\r\n \"40.85.190.10/32\",\r\n + \ \"40.87.65.131/32\",\r\n \"40.87.70.95/32\",\r\n \"40.114.13.25/32\",\r\n + \ \"40.114.41.245/32\",\r\n \"40.114.51.68/32\",\r\n \"40.114.68.21/32\",\r\n + \ \"40.114.106.25/32\",\r\n \"40.117.154.240/32\",\r\n \"40.117.188.126/32\",\r\n + \ \"40.117.190.72/32\",\r\n \"40.121.8.241/32\",\r\n \"40.121.16.193/32\",\r\n + \ \"40.121.32.232/32\",\r\n \"40.121.35.221/32\",\r\n \"40.121.91.199/32\",\r\n + \ \"40.121.212.165/32\",\r\n \"40.121.221.52/32\",\r\n \"52.168.125.188/32\",\r\n + \ \"52.170.7.25/32\",\r\n \"52.170.46.174/32\",\r\n \"52.179.97.15/32\",\r\n + \ \"52.226.134.64/32\",\r\n \"52.234.209.94/32\",\r\n \"104.45.129.178/32\",\r\n + \ \"104.45.141.247/32\",\r\n \"104.45.152.13/32\",\r\n \"104.45.152.60/32\",\r\n + \ \"104.45.154.200/32\",\r\n \"104.211.26.212/32\",\r\n \"137.117.58.204/32\",\r\n + \ \"137.117.66.167/32\",\r\n \"137.117.84.54/32\",\r\n \"137.117.90.63/32\",\r\n + \ \"137.117.93.87/32\",\r\n \"137.135.91.176/32\",\r\n \"137.135.107.235/32\",\r\n + \ \"168.62.48.183/32\",\r\n \"168.62.180.173/32\",\r\n \"191.236.16.12/32\",\r\n + \ \"191.236.59.67/32\",\r\n \"191.237.24.89/32\",\r\n \"191.237.27.74/32\",\r\n + \ \"191.238.8.26/32\",\r\n \"191.238.33.50/32\",\r\n \"2603:1030:210:402::a0/123\",\r\n + \ \"2603:1030:210:802::a0/123\",\r\n \"2603:1030:210:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.EastUS2\",\r\n + \ \"id\": \"AppService.EastUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"13.68.29.136/32\",\r\n \"13.68.101.62/32\",\r\n + \ \"13.77.82.141/32\",\r\n \"13.77.83.246/32\",\r\n \"13.77.96.119/32\",\r\n + \ \"20.49.97.0/25\",\r\n \"23.101.147.117/32\",\r\n \"40.70.27.35/32\",\r\n + \ \"40.70.147.0/25\",\r\n \"40.79.65.200/32\",\r\n \"40.84.54.203/32\",\r\n + \ \"40.84.59.174/32\",\r\n \"40.123.45.47/32\",\r\n \"40.123.47.58/32\",\r\n + \ \"52.177.169.150/32\",\r\n \"52.177.189.138/32\",\r\n \"52.177.206.73/32\",\r\n + \ \"52.179.188.206/32\",\r\n \"52.184.162.135/32\",\r\n \"52.184.193.103/32\",\r\n + \ \"52.184.193.104/32\",\r\n \"104.46.101.59/32\",\r\n \"104.209.178.67/32\",\r\n + \ \"104.209.192.206/32\",\r\n \"104.209.197.87/32\",\r\n + \ \"137.116.78.243/32\",\r\n \"137.116.88.213/32\",\r\n \"191.236.192.121/32\",\r\n + \ \"191.237.128.238/32\",\r\n \"2603:1030:40c:402::a0/123\",\r\n + \ \"2603:1030:40c:802::a0/123\",\r\n \"2603:1030:40c:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.EastUS2EUAP\",\r\n + \ \"id\": \"AppService.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.39.11.104/29\",\r\n \"20.47.233.120/29\",\r\n + \ \"20.47.234.0/24\",\r\n \"20.47.235.0/25\",\r\n \"52.225.179.39/32\",\r\n + \ \"52.225.190.65/32\",\r\n \"52.253.224.223/32\",\r\n \"2603:1030:40b:3::400/119\",\r\n + \ \"2603:1030:40b:400::8a0/123\",\r\n \"2603:1030:40b:800::a0/123\",\r\n + \ \"2603:1030:40b:c00::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.FranceCentral\",\r\n \"id\": \"AppService.FranceCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.43.43.32/27\",\r\n + \ \"20.111.0.248/29\",\r\n \"20.111.1.0/24\",\r\n \"20.111.2.0/25\",\r\n + \ \"40.79.130.128/27\",\r\n \"40.89.131.148/32\",\r\n \"40.89.141.103/32\",\r\n + \ \"52.143.137.150/32\",\r\n \"2603:1020:805:2::600/119\",\r\n + \ \"2603:1020:805:402::a0/123\",\r\n \"2603:1020:805:802::a0/123\",\r\n + \ \"2603:1020:805:c02::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.FranceSouth\",\r\n \"id\": \"AppService.FranceSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"40.79.178.96/27\",\r\n + \ \"51.105.90.32/27\",\r\n \"52.136.138.55/32\",\r\n \"52.136.190.0/25\",\r\n + \ \"52.136.190.128/27\",\r\n \"2603:1020:905:2::300/120\",\r\n + \ \"2603:1020:905:402::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.GermanyNorth\",\r\n \"id\": \"AppService.GermanyNorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"51.116.49.32/27\",\r\n + \ \"51.116.58.160/27\",\r\n \"51.116.75.128/25\",\r\n \"51.116.76.0/24\",\r\n + \ \"51.116.77.0/29\",\r\n \"2603:1020:d04:2::200/119\",\r\n + \ \"2603:1020:d04:402::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.GermanyWestCentral\",\r\n \"id\": + \"AppService.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.79.104.0/23\",\r\n \"20.79.106.0/24\",\r\n \"20.79.107.0/28\",\r\n + \ \"51.116.145.32/27\",\r\n \"51.116.154.224/27\",\r\n \"51.116.242.160/27\",\r\n + \ \"51.116.250.160/27\",\r\n \"2603:1020:c04:402::a0/123\",\r\n + \ \"2603:1020:c04:802::a0/123\",\r\n \"2603:1020:c04:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.JapanEast\",\r\n + \ \"id\": \"AppService.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"13.71.149.151/32\",\r\n \"13.73.1.134/32\",\r\n + \ \"13.73.26.73/32\",\r\n \"13.78.59.237/32\",\r\n \"13.78.106.96/27\",\r\n + \ \"13.78.117.86/32\",\r\n \"13.78.123.87/32\",\r\n \"20.43.67.32/27\",\r\n + \ \"20.89.12.224/27\",\r\n \"20.89.13.0/24\",\r\n \"20.89.14.0/23\",\r\n + \ \"40.79.195.0/27\",\r\n \"40.115.179.121/32\",\r\n \"40.115.251.148/32\",\r\n + \ \"52.243.39.89/32\",\r\n \"104.41.186.103/32\",\r\n \"138.91.0.30/32\",\r\n + \ \"2603:1040:407:402::a0/123\",\r\n \"2603:1040:407:802::a0/123\",\r\n + \ \"2603:1040:407:c02::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.JapanWest\",\r\n \"id\": \"AppService.JapanWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.189.194.112/28\",\r\n + \ \"20.189.195.0/24\",\r\n \"20.189.196.0/23\",\r\n \"40.74.100.128/27\",\r\n + \ \"40.74.133.20/32\",\r\n \"40.80.58.224/27\",\r\n \"52.175.158.219/32\",\r\n + \ \"104.214.137.236/32\",\r\n \"104.215.11.176/32\",\r\n + \ \"104.215.58.230/32\",\r\n \"138.91.16.18/32\",\r\n \"2603:1040:606:2::400/118\",\r\n + \ \"2603:1040:606:402::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.JioIndiaCentral\",\r\n \"id\": + \"AppService.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.192.54.0/24\",\r\n \"20.192.234.128/27\",\r\n + \ \"20.207.0.96/27\",\r\n \"20.207.0.128/25\",\r\n \"2603:1040:1104:2::300/120\",\r\n + \ \"2603:1040:1104:400::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.JioIndiaWest\",\r\n \"id\": \"AppService.JioIndiaWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.193.198.0/24\",\r\n + \ \"20.193.202.128/27\",\r\n \"40.64.8.224/27\",\r\n \"40.64.9.0/25\",\r\n + \ \"40.64.10.0/25\",\r\n \"40.64.10.128/27\",\r\n \"2603:1040:d04:3::100/120\",\r\n + \ \"2603:1040:d04:400::a0/123\",\r\n \"2603:1040:d04:800::160/123\",\r\n + \ \"2603:1040:d04:800::360/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.KoreaCentral\",\r\n \"id\": \"AppService.KoreaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.41.66.224/27\",\r\n + \ \"20.44.26.160/27\",\r\n \"20.194.66.32/27\",\r\n \"20.200.196.104/29\",\r\n + \ \"20.200.196.128/25\",\r\n \"20.200.197.0/24\",\r\n \"52.231.18.128/27\",\r\n + \ \"52.231.32.120/32\",\r\n \"52.231.38.95/32\",\r\n \"52.231.77.58/32\",\r\n + \ \"2603:1040:f05:3::200/119\",\r\n \"2603:1040:f05:402::a0/123\",\r\n + \ \"2603:1040:f05:802::a0/123\",\r\n \"2603:1040:f05:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.KoreaSouth\",\r\n + \ \"id\": \"AppService.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"40.80.170.224/27\",\r\n \"52.147.117.224/27\",\r\n + \ \"52.147.118.128/25\",\r\n \"52.147.119.64/27\",\r\n \"52.147.119.128/25\",\r\n + \ \"52.231.146.96/27\",\r\n \"52.231.200.101/32\",\r\n \"52.231.200.179/32\",\r\n + \ \"2603:1040:e05:1::200/120\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.NorthCentralUS\",\r\n \"id\": \"AppService.NorthCentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"23.96.187.5/32\",\r\n + \ \"23.96.201.21/32\",\r\n \"23.96.207.177/32\",\r\n \"23.96.209.155/32\",\r\n + \ \"23.96.220.116/32\",\r\n \"23.100.72.240/32\",\r\n \"23.101.169.175/32\",\r\n + \ \"23.101.171.94/32\",\r\n \"23.101.172.244/32\",\r\n \"40.80.191.0/25\",\r\n + \ \"52.162.107.0/25\",\r\n \"52.162.208.73/32\",\r\n \"52.237.130.0/32\",\r\n + \ \"52.240.149.243/32\",\r\n \"52.240.155.58/32\",\r\n \"52.252.160.21/32\",\r\n + \ \"65.52.24.41/32\",\r\n \"65.52.213.73/32\",\r\n \"65.52.217.59/32\",\r\n + \ \"65.52.218.253/32\",\r\n \"157.56.13.114/32\",\r\n \"168.62.224.13/32\",\r\n + \ \"168.62.225.23/32\",\r\n \"191.236.148.9/32\",\r\n \"2603:1030:608:402::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.NorthEurope\",\r\n + \ \"id\": \"AppService.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"13.69.186.152/32\",\r\n \"13.69.228.0/25\",\r\n + \ \"13.69.253.145/32\",\r\n \"13.74.41.233/32\",\r\n \"13.74.147.218/32\",\r\n + \ \"13.74.158.5/32\",\r\n \"13.74.252.44/32\",\r\n \"13.79.2.71/32\",\r\n + \ \"13.79.38.229/32\",\r\n \"13.79.172.40/32\",\r\n \"20.50.64.0/25\",\r\n + \ \"23.100.48.106/32\",\r\n \"23.100.50.51/32\",\r\n \"23.100.52.22/32\",\r\n + \ \"23.100.56.27/32\",\r\n \"23.101.54.230/32\",\r\n \"23.101.63.214/32\",\r\n + \ \"23.102.12.43/32\",\r\n \"23.102.21.198/32\",\r\n \"23.102.21.212/32\",\r\n + \ \"23.102.25.149/32\",\r\n \"23.102.28.178/32\",\r\n \"40.69.43.225/32\",\r\n + \ \"40.69.88.149/32\",\r\n \"40.69.200.124/32\",\r\n \"40.69.210.172/32\",\r\n + \ \"40.69.218.150/32\",\r\n \"40.85.74.227/32\",\r\n \"40.85.92.115/32\",\r\n + \ \"40.85.96.208/32\",\r\n \"40.112.69.156/32\",\r\n \"40.112.90.244/32\",\r\n + \ \"40.112.93.201/32\",\r\n \"40.113.2.52/32\",\r\n \"40.113.65.9/32\",\r\n + \ \"40.113.71.148/32\",\r\n \"40.113.81.82/32\",\r\n \"40.113.90.202/32\",\r\n + \ \"40.115.98.85/32\",\r\n \"40.127.132.204/32\",\r\n \"40.127.139.252/32\",\r\n + \ \"40.127.192.244/32\",\r\n \"40.127.196.56/32\",\r\n \"52.138.196.70/32\",\r\n + \ \"52.138.218.121/32\",\r\n \"52.164.201.186/32\",\r\n \"52.164.250.133/32\",\r\n + \ \"52.169.73.236/32\",\r\n \"52.169.78.163/32\",\r\n \"52.169.180.223/32\",\r\n + \ \"52.169.184.163/32\",\r\n \"52.169.188.236/32\",\r\n \"52.169.191.40/32\",\r\n + \ \"52.178.158.175/32\",\r\n \"52.178.164.235/32\",\r\n \"52.178.179.169/32\",\r\n + \ \"52.178.190.191/32\",\r\n \"52.178.201.147/32\",\r\n \"52.178.208.12/32\",\r\n + \ \"52.178.212.17/32\",\r\n \"52.178.214.89/32\",\r\n \"94.245.104.73/32\",\r\n + \ \"104.41.216.137/32\",\r\n \"104.41.229.199/32\",\r\n \"104.45.81.79/32\",\r\n + \ \"104.45.95.61/32\",\r\n \"137.135.129.175/32\",\r\n \"137.135.133.221/32\",\r\n + \ \"168.63.53.239/32\",\r\n \"191.235.160.13/32\",\r\n \"191.235.176.12/32\",\r\n + \ \"191.235.177.30/32\",\r\n \"191.235.208.12/32\",\r\n \"191.235.215.184/32\",\r\n + \ \"2603:1020:5:402::a0/123\",\r\n \"2603:1020:5:802::a0/123\",\r\n + \ \"2603:1020:5:c02::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.NorwayEast\",\r\n \"id\": \"AppService.NorwayEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.100.2.32/29\",\r\n + \ \"20.100.2.128/25\",\r\n \"20.100.3.0/24\",\r\n \"51.120.42.0/27\",\r\n + \ \"51.120.98.192/27\",\r\n \"51.120.106.160/27\",\r\n \"51.120.210.160/27\",\r\n + \ \"2603:1020:e04:4::200/119\",\r\n \"2603:1020:e04:402::a0/123\",\r\n + \ \"2603:1020:e04:802::a0/123\",\r\n \"2603:1020:e04:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.NorwayWest\",\r\n + \ \"id\": \"AppService.NorwayWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"51.13.142.128/25\",\r\n \"51.13.143.64/27\",\r\n + \ \"51.13.143.128/25\",\r\n \"51.120.218.192/27\",\r\n \"51.120.226.0/27\",\r\n + \ \"2603:1020:f04:3::400/120\",\r\n \"2603:1020:f04:402::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SouthAfricaNorth\",\r\n + \ \"id\": \"AppService.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.87.80.64/29\",\r\n + \ \"20.87.80.128/25\",\r\n \"20.87.81.0/24\",\r\n \"102.133.122.160/27\",\r\n + \ \"102.133.154.32/27\",\r\n \"102.133.218.32/28\",\r\n \"102.133.250.160/27\",\r\n + \ \"2603:1000:104:3::200/119\",\r\n \"2603:1000:104:402::a0/123\",\r\n + \ \"2603:1000:104:802::a0/123\",\r\n \"2603:1000:104:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SouthAfricaWest\",\r\n + \ \"id\": \"AppService.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"102.37.86.64/26\",\r\n + \ \"102.37.86.128/26\",\r\n \"102.133.26.32/27\",\r\n \"102.133.57.128/27\",\r\n + \ \"2603:1000:4:2::400/120\",\r\n \"2603:1000:4:402::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SouthCentralUS\",\r\n + \ \"id\": \"AppService.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.65.30.245/32\",\r\n + \ \"13.65.37.122/32\",\r\n \"13.65.39.165/32\",\r\n \"13.65.42.35/32\",\r\n + \ \"13.65.42.183/32\",\r\n \"13.65.45.30/32\",\r\n \"13.65.85.146/32\",\r\n + \ \"13.65.89.91/32\",\r\n \"13.65.92.72/32\",\r\n \"13.65.94.204/32\",\r\n + \ \"13.65.95.109/32\",\r\n \"13.65.97.243/32\",\r\n \"13.65.193.29/32\",\r\n + \ \"13.65.210.166/32\",\r\n \"13.65.212.252/32\",\r\n \"13.65.241.130/32\",\r\n + \ \"13.65.243.110/32\",\r\n \"13.66.16.101/32\",\r\n \"13.66.38.99/32\",\r\n + \ \"13.66.39.88/32\",\r\n \"13.84.36.2/32\",\r\n \"13.84.40.227/32\",\r\n + \ \"13.84.42.35/32\",\r\n \"13.84.46.29/32\",\r\n \"13.84.55.137/32\",\r\n + \ \"13.84.146.60/32\",\r\n \"13.84.180.32/32\",\r\n \"13.84.181.47/32\",\r\n + \ \"13.84.188.162/32\",\r\n \"13.84.189.137/32\",\r\n \"13.84.227.164/32\",\r\n + \ \"13.85.15.194/32\",\r\n \"13.85.16.224/32\",\r\n \"13.85.20.144/32\",\r\n + \ \"13.85.24.220/32\",\r\n \"13.85.27.14/32\",\r\n \"13.85.31.243/32\",\r\n + \ \"13.85.72.129/32\",\r\n \"13.85.77.179/32\",\r\n \"13.85.82.0/32\",\r\n + \ \"20.45.122.160/27\",\r\n \"20.49.90.32/27\",\r\n \"20.97.35.16/28\",\r\n + \ \"20.97.36.0/23\",\r\n \"20.97.38.0/24\",\r\n \"23.101.180.75/32\",\r\n + \ \"23.102.154.38/32\",\r\n \"23.102.161.217/32\",\r\n \"23.102.191.170/32\",\r\n + \ \"40.74.245.188/32\",\r\n \"40.74.253.108/32\",\r\n \"40.74.255.112/32\",\r\n + \ \"40.84.148.247/32\",\r\n \"40.84.159.58/32\",\r\n \"40.84.194.106/32\",\r\n + \ \"40.84.226.176/32\",\r\n \"40.84.227.180/32\",\r\n \"40.84.232.28/32\",\r\n + \ \"40.119.12.0/23\",\r\n \"40.124.12.75/32\",\r\n \"40.124.13.58/32\",\r\n + \ \"52.171.56.101/32\",\r\n \"52.171.56.110/32\",\r\n \"52.171.136.200/32\",\r\n + \ \"52.171.140.237/32\",\r\n \"52.171.218.239/32\",\r\n \"52.171.221.170/32\",\r\n + \ \"52.171.222.247/32\",\r\n \"104.44.128.13/32\",\r\n \"104.44.130.38/32\",\r\n + \ \"104.210.145.181/32\",\r\n \"104.210.147.57/32\",\r\n + \ \"104.210.152.76/32\",\r\n \"104.210.152.122/32\",\r\n + \ \"104.210.153.116/32\",\r\n \"104.210.158.20/32\",\r\n + \ \"104.214.20.0/23\",\r\n \"104.214.29.203/32\",\r\n \"104.214.64.238/32\",\r\n + \ \"104.214.74.110/32\",\r\n \"104.214.77.221/32\",\r\n \"104.214.110.60/32\",\r\n + \ \"104.214.110.226/32\",\r\n \"104.214.118.174/32\",\r\n + \ \"104.214.119.36/32\",\r\n \"104.215.73.236/32\",\r\n \"104.215.78.13/32\",\r\n + \ \"104.215.89.22/32\",\r\n \"191.238.176.139/32\",\r\n \"191.238.240.12/32\",\r\n + \ \"2603:1030:807:3::400/118\",\r\n \"2603:1030:807:402::a0/123\",\r\n + \ \"2603:1030:807:802::a0/123\",\r\n \"2603:1030:807:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SouthCentralUSSTG\",\r\n + \ \"id\": \"AppService.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.44.2.32/27\",\r\n \"23.100.216.96/27\",\r\n \"23.100.216.128/25\",\r\n + \ \"2603:1030:302::600/120\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.SoutheastAsia\",\r\n \"id\": \"AppService.SoutheastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.67.9.0/25\",\r\n + \ \"13.67.56.225/32\",\r\n \"13.67.63.90/32\",\r\n \"13.76.44.139/32\",\r\n + \ \"13.76.245.96/32\",\r\n \"20.43.132.128/25\",\r\n \"20.188.98.74/32\",\r\n + \ \"23.97.56.169/32\",\r\n \"23.98.64.36/32\",\r\n \"23.98.64.158/32\",\r\n + \ \"23.101.27.182/32\",\r\n \"52.163.122.160/32\",\r\n \"52.187.17.126/32\",\r\n + \ \"52.187.36.104/32\",\r\n \"52.187.52.94/32\",\r\n \"52.187.135.79/32\",\r\n + \ \"52.230.1.186/32\",\r\n \"104.215.147.45/32\",\r\n \"104.215.155.1/32\",\r\n + \ \"111.221.95.27/32\",\r\n \"137.116.128.188/32\",\r\n \"137.116.153.238/32\",\r\n + \ \"2603:1040:5:402::a0/123\",\r\n \"2603:1040:5:802::a0/123\",\r\n + \ \"2603:1040:5:c02::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.SouthIndia\",\r\n \"id\": \"AppService.SouthIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.71.122.35/32\",\r\n + \ \"13.71.123.138/32\",\r\n \"20.41.195.192/27\",\r\n \"20.192.153.144/28\",\r\n + \ \"20.192.154.0/23\",\r\n \"20.192.156.0/24\",\r\n \"40.78.194.96/27\",\r\n + \ \"52.172.54.225/32\",\r\n \"104.211.224.252/32\",\r\n \"104.211.225.167/32\",\r\n + \ \"2603:1040:c06:2::400/118\",\r\n \"2603:1040:c06:402::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.SwedenCentral\",\r\n + \ \"id\": \"AppService.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"51.12.31.0/24\",\r\n \"51.12.73.224/27\",\r\n \"51.12.74.0/25\",\r\n + \ \"51.12.98.192/27\",\r\n \"51.12.226.160/27\",\r\n \"51.12.234.160/27\",\r\n + \ \"2603:1020:1004:2::500/120\",\r\n \"2603:1020:1004:3::100/120\",\r\n + \ \"2603:1020:1004:400::a0/123\",\r\n \"2603:1020:1004:800::160/123\",\r\n + \ \"2603:1020:1004:800::360/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.SwitzerlandNorth\",\r\n \"id\": + \"AppService.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.208.1.0/24\",\r\n \"20.208.5.32/29\",\r\n \"20.208.5.128/25\",\r\n + \ \"20.208.6.0/24\",\r\n \"51.107.50.0/27\",\r\n \"51.107.58.160/27\",\r\n + \ \"2603:1020:a04:3::100/120\",\r\n \"2603:1020:a04:3::400/119\",\r\n + \ \"2603:1020:a04:402::a0/123\",\r\n \"2603:1020:a04:802::a0/123\",\r\n + \ \"2603:1020:a04:c02::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.SwitzerlandWest\",\r\n \"id\": + \"AppService.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.199.200.0/26\",\r\n \"51.107.146.0/27\",\r\n + \ \"51.107.154.160/27\",\r\n \"51.107.255.192/26\",\r\n \"2603:1020:b04:2::400/120\",\r\n + \ \"2603:1020:b04:402::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.UAECentral\",\r\n \"id\": \"AppService.UAECentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.37.66.0/27\",\r\n + \ \"20.37.74.96/27\",\r\n \"20.45.94.192/26\",\r\n \"20.45.95.0/26\",\r\n + \ \"2603:1040:b04:2::400/120\",\r\n \"2603:1040:b04:402::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.UAENorth\",\r\n + \ \"id\": \"AppService.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.38.138.0/27\",\r\n \"20.74.192.0/23\",\r\n \"20.74.194.0/24\",\r\n + \ \"20.74.195.0/28\",\r\n \"40.120.74.32/27\",\r\n \"65.52.250.96/27\",\r\n + \ \"2603:1040:904:402::a0/123\",\r\n \"2603:1040:904:802::a0/123\",\r\n + \ \"2603:1040:904:c02::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.UKSouth\",\r\n \"id\": \"AppService.UKSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"20.90.132.160/28\",\r\n + \ \"20.90.133.0/24\",\r\n \"20.90.134.0/23\",\r\n \"51.104.28.64/26\",\r\n + \ \"51.105.66.160/27\",\r\n \"51.105.74.160/27\",\r\n \"51.140.37.241/32\",\r\n + \ \"51.140.57.176/32\",\r\n \"51.140.59.233/32\",\r\n \"51.140.75.147/32\",\r\n + \ \"51.140.84.145/32\",\r\n \"51.140.85.106/32\",\r\n \"51.140.87.39/32\",\r\n + \ \"51.140.122.226/32\",\r\n \"51.140.146.128/26\",\r\n \"51.140.152.154/32\",\r\n + \ \"51.140.153.150/32\",\r\n \"51.140.180.76/32\",\r\n \"51.140.185.151/32\",\r\n + \ \"51.140.191.223/32\",\r\n \"51.143.191.44/32\",\r\n \"2603:1020:705:402::a0/123\",\r\n + \ \"2603:1020:705:802::a0/123\",\r\n \"2603:1020:705:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.UKWest\",\r\n + \ \"id\": \"AppService.UKWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.90.33.0/24\",\r\n \"20.90.34.0/23\",\r\n \"20.90.36.0/28\",\r\n + \ \"51.137.163.32/27\",\r\n \"51.140.210.96/27\",\r\n \"51.140.244.162/32\",\r\n + \ \"51.140.245.89/32\",\r\n \"51.141.12.112/32\",\r\n \"51.141.37.245/32\",\r\n + \ \"51.141.44.139/32\",\r\n \"51.141.45.207/32\",\r\n \"51.141.90.252/32\",\r\n + \ \"2603:1020:605:2::400/118\",\r\n \"2603:1020:605:402::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.WestCentralUS\",\r\n + \ \"id\": \"AppService.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"13.71.194.192/27\",\r\n \"13.78.150.96/32\",\r\n + \ \"13.78.184.89/32\",\r\n \"20.69.5.168/29\",\r\n \"20.69.6.0/24\",\r\n + \ \"20.69.7.0/25\",\r\n \"52.150.140.224/27\",\r\n \"52.161.96.193/32\",\r\n + \ \"2603:1030:b04:3::200/119\",\r\n \"2603:1030:b04:402::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.WestEurope\",\r\n + \ \"id\": \"AppService.WestEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"13.69.68.0/23\",\r\n \"13.80.19.74/32\",\r\n \"13.81.7.21/32\",\r\n + \ \"13.81.108.99/32\",\r\n \"13.81.215.235/32\",\r\n \"13.94.143.57/32\",\r\n + \ \"13.94.192.98/32\",\r\n \"13.94.211.38/32\",\r\n \"13.95.82.181/32\",\r\n + \ \"13.95.93.152/32\",\r\n \"13.95.150.128/32\",\r\n \"13.95.238.192/32\",\r\n + \ \"20.50.2.0/23\",\r\n \"23.97.160.56/32\",\r\n \"23.97.160.74/32\",\r\n + \ \"23.97.162.202/32\",\r\n \"23.97.195.129/32\",\r\n \"23.97.208.18/32\",\r\n + \ \"23.97.214.177/32\",\r\n \"23.97.216.47/32\",\r\n \"23.97.224.11/32\",\r\n + \ \"23.100.1.29/32\",\r\n \"23.101.67.245/32\",\r\n \"40.68.40.55/32\",\r\n + \ \"40.68.205.178/32\",\r\n \"40.68.208.131/32\",\r\n \"40.68.210.104/32\",\r\n + \ \"40.68.214.185/32\",\r\n \"40.113.126.251/32\",\r\n \"40.113.131.37/32\",\r\n + \ \"40.113.136.240/32\",\r\n \"40.113.142.219/32\",\r\n \"40.114.194.188/32\",\r\n + \ \"40.114.210.78/32\",\r\n \"40.114.228.161/32\",\r\n \"40.114.237.65/32\",\r\n + \ \"40.114.243.70/32\",\r\n \"40.115.55.251/32\",\r\n \"40.118.29.72/32\",\r\n + \ \"40.118.71.240/32\",\r\n \"40.118.96.231/32\",\r\n \"40.118.100.127/32\",\r\n + \ \"40.118.101.67/32\",\r\n \"40.118.102.46/32\",\r\n \"51.105.172.25/32\",\r\n + \ \"51.136.14.31/32\",\r\n \"51.137.106.13/32\",\r\n \"51.144.7.192/32\",\r\n + \ \"51.144.107.53/32\",\r\n \"51.144.116.43/32\",\r\n \"51.144.164.215/32\",\r\n + \ \"51.144.182.8/32\",\r\n \"52.166.78.97/32\",\r\n \"52.166.113.188/32\",\r\n + \ \"52.166.119.99/32\",\r\n \"52.166.178.208/32\",\r\n \"52.166.181.85/32\",\r\n + \ \"52.166.198.163/32\",\r\n \"52.174.3.80/32\",\r\n \"52.174.7.133/32\",\r\n + \ \"52.174.35.5/32\",\r\n \"52.174.106.15/32\",\r\n \"52.174.150.25/32\",\r\n + \ \"52.174.181.178/32\",\r\n \"52.174.184.18/32\",\r\n \"52.174.193.210/32\",\r\n + \ \"52.174.235.29/32\",\r\n \"52.178.29.39/32\",\r\n \"52.178.37.244/32\",\r\n + \ \"52.178.43.209/32\",\r\n \"52.178.45.139/32\",\r\n \"52.178.46.181/32\",\r\n + \ \"52.178.75.200/32\",\r\n \"52.178.79.163/32\",\r\n \"52.178.89.129/32\",\r\n + \ \"52.178.90.230/32\",\r\n \"52.178.92.96/32\",\r\n \"52.178.105.179/32\",\r\n + \ \"52.178.114.226/32\",\r\n \"52.232.19.237/32\",\r\n \"52.232.26.228/32\",\r\n + \ \"52.232.33.202/32\",\r\n \"52.232.56.79/32\",\r\n \"52.232.127.196/32\",\r\n + \ \"52.233.128.61/32\",\r\n \"52.233.133.18/32\",\r\n \"52.233.133.121/32\",\r\n + \ \"52.233.155.168/32\",\r\n \"52.233.164.195/32\",\r\n \"52.233.175.59/32\",\r\n + \ \"52.233.184.181/32\",\r\n \"52.233.198.206/32\",\r\n \"65.52.128.33/32\",\r\n + \ \"65.52.130.1/32\",\r\n \"104.40.129.89/32\",\r\n \"104.40.147.180/32\",\r\n + \ \"104.40.147.216/32\",\r\n \"104.40.158.55/32\",\r\n \"104.40.179.243/32\",\r\n + \ \"104.40.183.236/32\",\r\n \"104.40.185.192/32\",\r\n \"104.40.187.26/32\",\r\n + \ \"104.40.191.174/32\",\r\n \"104.40.210.25/32\",\r\n \"104.40.215.219/32\",\r\n + \ \"104.40.222.81/32\",\r\n \"104.40.250.100/32\",\r\n \"104.45.1.117/32\",\r\n + \ \"104.45.14.249/32\",\r\n \"104.46.38.245/32\",\r\n \"104.46.44.78/32\",\r\n + \ \"104.46.61.116/32\",\r\n \"104.47.137.62/32\",\r\n \"104.47.151.115/32\",\r\n + \ \"104.47.160.14/32\",\r\n \"104.47.164.119/32\",\r\n \"104.214.231.110/32\",\r\n + \ \"104.214.236.47/32\",\r\n \"104.214.237.135/32\",\r\n + \ \"137.117.166.35/32\",\r\n \"137.117.175.14/32\",\r\n \"137.117.203.130/32\",\r\n + \ \"137.117.211.244/32\",\r\n \"137.117.218.101/32\",\r\n + \ \"137.117.224.218/32\",\r\n \"137.117.225.87/32\",\r\n + \ \"168.63.5.231/32\",\r\n \"168.63.107.5/32\",\r\n \"191.233.82.44/32\",\r\n + \ \"191.233.85.165/32\",\r\n \"191.233.87.194/32\",\r\n \"2603:1020:206:402::a0/123\",\r\n + \ \"2603:1020:206:802::a0/123\",\r\n \"2603:1020:206:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.WestIndia\",\r\n + \ \"id\": \"AppService.WestIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.192.84.176/28\",\r\n \"20.192.85.0/24\",\r\n + \ \"20.192.86.0/23\",\r\n \"52.136.50.0/27\",\r\n \"104.211.146.96/27\",\r\n + \ \"104.211.160.159/32\",\r\n \"104.211.179.11/32\",\r\n + \ \"104.211.184.197/32\",\r\n \"2603:1040:806:2::400/118\",\r\n + \ \"2603:1040:806:402::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.WestUS\",\r\n \"id\": \"AppService.WestUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.64.73.110/32\",\r\n + \ \"13.91.40.166/32\",\r\n \"13.91.242.166/32\",\r\n \"13.93.141.10/32\",\r\n + \ \"13.93.158.16/32\",\r\n \"13.93.220.109/32\",\r\n \"13.93.231.75/32\",\r\n + \ \"23.99.0.12/32\",\r\n \"23.99.65.65/32\",\r\n \"23.99.91.55/32\",\r\n + \ \"23.100.46.198/32\",\r\n \"23.101.203.117/32\",\r\n \"23.101.203.214/32\",\r\n + \ \"23.101.207.250/32\",\r\n \"40.78.18.232/32\",\r\n \"40.78.25.157/32\",\r\n + \ \"40.78.48.219/32\",\r\n \"40.80.155.102/32\",\r\n \"40.80.156.205/32\",\r\n + \ \"40.82.255.128/25\",\r\n \"40.83.145.50/32\",\r\n \"40.83.150.233/32\",\r\n + \ \"40.83.182.206/32\",\r\n \"40.83.183.236/32\",\r\n \"40.83.184.25/32\",\r\n + \ \"40.112.142.148/32\",\r\n \"40.112.143.134/32\",\r\n \"40.112.143.140/32\",\r\n + \ \"40.112.143.214/32\",\r\n \"40.112.165.44/32\",\r\n \"40.112.166.161/32\",\r\n + \ \"40.112.191.159/32\",\r\n \"40.112.192.69/32\",\r\n \"40.112.216.189/32\",\r\n + \ \"40.112.243.0/25\",\r\n \"40.118.185.161/32\",\r\n \"40.118.235.113/32\",\r\n + \ \"40.118.246.51/32\",\r\n \"40.118.255.59/32\",\r\n \"52.160.40.218/32\",\r\n + \ \"104.40.3.53/32\",\r\n \"104.40.11.192/32\",\r\n \"104.40.28.133/32\",\r\n + \ \"104.40.53.219/32\",\r\n \"104.40.63.98/32\",\r\n \"104.40.84.133/32\",\r\n + \ \"104.40.92.107/32\",\r\n \"104.42.53.248/32\",\r\n \"104.42.78.153/32\",\r\n + \ \"104.42.128.171/32\",\r\n \"104.42.148.55/32\",\r\n \"104.42.152.64/32\",\r\n + \ \"104.42.154.105/32\",\r\n \"104.42.188.146/32\",\r\n \"104.42.231.5/32\",\r\n + \ \"104.45.226.98/32\",\r\n \"104.45.231.79/32\",\r\n \"104.210.38.149/32\",\r\n + \ \"137.117.9.212/32\",\r\n \"137.117.17.70/32\",\r\n \"138.91.224.84/32\",\r\n + \ \"138.91.225.40/32\",\r\n \"138.91.240.81/32\",\r\n \"168.62.20.37/32\",\r\n + \ \"191.236.80.12/32\",\r\n \"191.236.106.123/32\",\r\n \"191.239.58.162/32\",\r\n + \ \"2603:1030:a07:402::a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppService.WestUS2\",\r\n \"id\": \"AppService.WestUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureAppService\",\r\n \"addressPrefixes\": [\r\n \"13.66.138.96/27\",\r\n + \ \"13.66.209.135/32\",\r\n \"13.66.212.205/32\",\r\n \"13.66.226.80/32\",\r\n + \ \"13.66.231.217/32\",\r\n \"13.66.241.134/32\",\r\n \"13.66.244.249/32\",\r\n + \ \"13.77.157.133/32\",\r\n \"13.77.160.237/32\",\r\n \"13.77.182.13/32\",\r\n + \ \"20.42.128.96/27\",\r\n \"40.64.128.224/27\",\r\n \"51.143.102.21/32\",\r\n + \ \"52.151.62.51/32\",\r\n \"52.175.202.25/32\",\r\n \"52.175.254.10/32\",\r\n + \ \"52.183.82.125/32\",\r\n \"52.229.30.210/32\",\r\n \"2603:1030:c06:400::8a0/123\",\r\n + \ \"2603:1030:c06:802::a0/123\",\r\n \"2603:1030:c06:c02::a0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AppService.WestUS3\",\r\n + \ \"id\": \"AppService.WestUS3\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppService\",\r\n \"addressPrefixes\": + [\r\n \"20.40.24.16/32\",\r\n \"20.40.24.21/32\",\r\n \"20.40.24.23/32\",\r\n + \ \"20.40.24.30/31\",\r\n \"20.40.24.34/32\",\r\n \"20.40.24.37/32\",\r\n + \ \"20.40.24.38/31\",\r\n \"20.40.24.46/32\",\r\n \"20.40.24.49/32\",\r\n + \ \"20.40.24.50/31\",\r\n \"20.40.24.54/31\",\r\n \"20.40.24.62/31\",\r\n + \ \"20.40.24.81/32\",\r\n \"20.40.24.89/32\",\r\n \"20.40.24.108/32\",\r\n + \ \"20.40.24.144/32\",\r\n \"20.150.128.0/24\",\r\n \"20.150.131.0/24\",\r\n + \ \"20.150.132.0/22\",\r\n \"20.150.170.192/27\",\r\n \"20.150.178.160/27\",\r\n + \ \"20.150.186.160/27\",\r\n \"20.150.247.0/24\",\r\n \"20.150.248.7/32\",\r\n + \ \"20.150.248.8/32\",\r\n \"20.150.248.12/31\",\r\n \"20.150.248.15/32\",\r\n + \ \"20.150.248.16/28\",\r\n \"20.150.248.32/31\",\r\n \"20.150.248.36/32\",\r\n + \ \"20.150.248.38/31\",\r\n \"20.150.248.43/32\",\r\n \"20.150.248.44/31\",\r\n + \ \"20.150.248.48/29\",\r\n \"20.150.248.56/32\",\r\n \"20.150.248.59/32\",\r\n + \ \"20.150.248.60/32\",\r\n \"20.150.248.63/32\",\r\n \"20.150.248.64/31\",\r\n + \ \"20.150.248.68/31\",\r\n \"20.150.248.71/32\",\r\n \"20.150.248.72/29\",\r\n + \ \"20.150.248.80/32\",\r\n \"20.150.248.82/31\",\r\n \"20.150.248.86/31\",\r\n + \ \"20.150.248.89/32\",\r\n \"20.150.248.90/31\",\r\n \"20.150.248.100/31\",\r\n + \ \"20.150.248.104/31\",\r\n \"20.150.248.110/31\",\r\n \"20.150.248.112/30\",\r\n + \ \"20.150.248.118/31\",\r\n \"20.150.248.122/31\",\r\n \"20.150.248.124/31\",\r\n + \ \"20.150.248.128/31\",\r\n \"20.150.248.134/31\",\r\n \"20.150.248.136/29\",\r\n + \ \"20.150.248.144/28\",\r\n \"20.150.248.160/27\",\r\n \"20.150.248.192/29\",\r\n + \ \"20.150.248.200/32\",\r\n \"20.150.248.202/31\",\r\n \"2603:1030:504:402::a0/123\",\r\n + \ \"2603:1030:504:802::160/123\",\r\n \"2603:1030:504:802::360/123\",\r\n + \ \"2603:1030:504:c02::3a0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AppServiceManagement\",\r\n \"id\": \"AppServiceManagement\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"8\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAppServiceManagement\",\r\n + \ \"addressPrefixes\": [\r\n \"13.64.115.203/32\",\r\n \"13.66.140.0/26\",\r\n + \ \"13.66.225.188/32\",\r\n \"13.67.8.128/26\",\r\n \"13.69.64.128/26\",\r\n + \ \"13.69.116.0/26\",\r\n \"13.69.227.128/26\",\r\n \"13.70.72.64/26\",\r\n + \ \"13.70.73.128/26\",\r\n \"13.71.170.64/26\",\r\n \"13.71.173.0/26\",\r\n + \ \"13.71.173.128/26\",\r\n \"13.71.194.128/26\",\r\n \"13.73.240.128/26\",\r\n + \ \"13.73.242.64/26\",\r\n \"13.75.34.192/26\",\r\n \"13.75.127.117/32\",\r\n + \ \"13.77.50.128/26\",\r\n \"13.78.106.128/26\",\r\n \"13.78.109.0/26\",\r\n + \ \"13.78.148.75/32\",\r\n \"13.86.120.89/32\",\r\n \"13.87.56.128/26\",\r\n + \ \"13.87.122.128/26\",\r\n \"13.89.171.0/26\",\r\n \"13.94.141.115/32\",\r\n + \ \"13.94.143.126/32\",\r\n \"13.94.149.179/32\",\r\n \"20.21.42.192/26\",\r\n + \ \"20.21.53.160/28\",\r\n \"20.21.66.192/26\",\r\n \"20.21.74.192/26\",\r\n + \ \"20.36.42.12/32\",\r\n \"20.36.78.208/32\",\r\n \"20.36.106.128/26\",\r\n + \ \"20.36.114.64/26\",\r\n \"20.36.144.192/26\",\r\n \"20.37.74.128/26\",\r\n + \ \"20.42.68.128/26\",\r\n \"20.42.74.128/26\",\r\n \"20.43.120.128/26\",\r\n + \ \"20.44.2.192/26\",\r\n \"20.44.13.128/26\",\r\n \"20.44.27.0/26\",\r\n + \ \"20.45.75.173/32\",\r\n \"20.45.94.96/28\",\r\n \"20.45.125.128/26\",\r\n + \ \"20.45.242.144/28\",\r\n \"20.47.216.128/26\",\r\n \"20.47.233.128/28\",\r\n + \ \"20.48.202.48/28\",\r\n \"20.49.82.128/26\",\r\n \"20.49.90.128/26\",\r\n + \ \"20.50.72.192/26\",\r\n \"20.50.80.128/26\",\r\n \"20.50.201.128/26\",\r\n + \ \"20.51.5.48/28\",\r\n \"20.52.95.16/28\",\r\n \"20.53.53.208/28\",\r\n + \ \"20.53.60.208/28\",\r\n \"20.59.79.208/28\",\r\n \"20.69.5.128/28\",\r\n + \ \"20.70.222.64/28\",\r\n \"20.72.26.192/26\",\r\n \"20.83.192.128/26\",\r\n + \ \"20.83.221.240/28\",\r\n \"20.87.80.32/28\",\r\n \"20.88.157.128/28\",\r\n + \ \"20.89.12.144/28\",\r\n \"20.90.32.160/28\",\r\n \"20.90.132.96/28\",\r\n + \ \"20.92.4.160/28\",\r\n \"20.97.34.224/28\",\r\n \"20.98.146.32/28\",\r\n + \ \"20.98.193.224/28\",\r\n \"20.99.24.16/28\",\r\n \"20.100.2.0/28\",\r\n + \ \"20.105.208.208/28\",\r\n \"20.111.0.208/28\",\r\n \"20.150.130.208/28\",\r\n + \ \"20.150.171.0/26\",\r\n \"20.150.179.0/26\",\r\n \"20.150.187.0/26\",\r\n + \ \"20.150.248.2/32\",\r\n \"20.150.251.21/32\",\r\n \"20.189.194.64/28\",\r\n + \ \"20.192.84.144/28\",\r\n \"20.192.99.0/26\",\r\n \"20.192.153.112/28\",\r\n + \ \"20.192.170.16/28\",\r\n \"20.192.234.192/26\",\r\n \"20.193.202.192/26\",\r\n + \ \"20.194.66.128/26\",\r\n \"20.194.129.0/26\",\r\n \"20.195.85.128/28\",\r\n + \ \"20.200.196.64/28\",\r\n \"20.205.69.32/28\",\r\n \"20.205.74.192/26\",\r\n + \ \"20.205.82.192/26\",\r\n \"20.205.192.0/26\",\r\n \"20.206.0.112/28\",\r\n + \ \"20.207.1.32/28\",\r\n \"20.208.5.0/28\",\r\n \"20.208.18.192/26\",\r\n + \ \"23.96.195.3/32\",\r\n \"23.97.120.79/32\",\r\n \"23.98.113.0/26\",\r\n + \ \"23.99.115.5/32\",\r\n \"23.99.217.42/32\",\r\n \"23.100.216.80/28\",\r\n + \ \"23.100.226.236/32\",\r\n \"23.101.234.41/32\",\r\n \"23.102.188.65/32\",\r\n + \ \"40.64.9.160/28\",\r\n \"40.64.113.192/26\",\r\n \"40.67.59.0/26\",\r\n + \ \"40.69.106.128/26\",\r\n \"40.70.146.128/26\",\r\n \"40.71.11.0/26\",\r\n + \ \"40.71.13.64/26\",\r\n \"40.74.100.64/26\",\r\n \"40.74.151.128/26\",\r\n + \ \"40.78.194.128/26\",\r\n \"40.79.130.64/26\",\r\n \"40.79.142.128/26\",\r\n + \ \"40.79.149.192/26\",\r\n \"40.79.165.0/26\",\r\n \"40.79.175.0/26\",\r\n + \ \"40.79.178.128/26\",\r\n \"40.79.191.64/26\",\r\n \"40.80.53.128/26\",\r\n + \ \"40.83.120.64/32\",\r\n \"40.83.121.56/32\",\r\n \"40.83.125.161/32\",\r\n + \ \"40.85.230.101/32\",\r\n \"40.86.229.100/32\",\r\n \"40.89.122.64/26\",\r\n + \ \"40.90.240.166/32\",\r\n \"40.91.126.196/32\",\r\n \"40.112.242.192/26\",\r\n + \ \"40.119.4.111/32\",\r\n \"40.120.74.128/26\",\r\n \"40.120.87.208/28\",\r\n + \ \"40.123.229.242/32\",\r\n \"40.124.47.188/32\",\r\n \"40.127.3.19/32\",\r\n + \ \"51.12.20.192/27\",\r\n \"51.12.22.224/28\",\r\n \"51.12.29.32/27\",\r\n + \ \"51.12.73.192/28\",\r\n \"51.12.99.0/26\",\r\n \"51.12.203.0/26\",\r\n + \ \"51.12.227.0/26\",\r\n \"51.12.235.0/26\",\r\n \"51.13.143.16/28\",\r\n + \ \"51.103.202.192/26\",\r\n \"51.104.8.0/26\",\r\n \"51.104.8.128/26\",\r\n + \ \"51.105.71.64/26\",\r\n \"51.107.58.192/26\",\r\n \"51.107.68.94/32\",\r\n + \ \"51.107.154.192/26\",\r\n \"51.107.232.208/32\",\r\n \"51.107.255.144/28\",\r\n + \ \"51.116.58.192/26\",\r\n \"51.116.75.96/28\",\r\n \"51.116.155.0/26\",\r\n + \ \"51.116.156.64/26\",\r\n \"51.116.175.204/32\",\r\n \"51.116.208.94/32\",\r\n + \ \"51.116.243.64/26\",\r\n \"51.116.251.192/26\",\r\n \"51.120.79.170/32\",\r\n + \ \"51.120.99.0/26\",\r\n \"51.120.107.0/26\",\r\n \"51.120.164.77/32\",\r\n + \ \"51.120.211.0/26\",\r\n \"51.120.219.0/26\",\r\n \"51.132.193.0/26\",\r\n + \ \"51.140.146.64/26\",\r\n \"51.140.185.75/32\",\r\n \"51.140.210.128/26\",\r\n + \ \"51.141.8.34/32\",\r\n \"52.136.136.72/32\",\r\n \"52.136.191.16/28\",\r\n + \ \"52.143.136.64/32\",\r\n \"52.146.139.224/28\",\r\n \"52.147.119.32/28\",\r\n + \ \"52.151.25.45/32\",\r\n \"52.162.80.89/32\",\r\n \"52.162.106.192/26\",\r\n + \ \"52.165.152.214/32\",\r\n \"52.165.153.122/32\",\r\n \"52.165.154.193/32\",\r\n + \ \"52.165.158.140/32\",\r\n \"52.167.111.64/26\",\r\n \"52.174.22.21/32\",\r\n + \ \"52.178.177.147/32\",\r\n \"52.178.184.149/32\",\r\n \"52.178.190.65/32\",\r\n + \ \"52.178.195.197/32\",\r\n \"52.180.179.14/32\",\r\n \"52.182.143.128/26\",\r\n + \ \"52.187.56.50/32\",\r\n \"52.187.59.251/32\",\r\n \"52.187.63.19/32\",\r\n + \ \"52.187.63.37/32\",\r\n \"52.224.105.172/32\",\r\n \"52.225.177.15/32\",\r\n + \ \"52.225.177.153/32\",\r\n \"52.225.177.238/32\",\r\n \"52.231.18.64/26\",\r\n + \ \"52.231.32.117/32\",\r\n \"52.231.146.128/26\",\r\n \"52.231.200.177/32\",\r\n + \ \"52.242.40.112/28\",\r\n \"52.246.157.64/26\",\r\n \"65.52.14.230/32\",\r\n + \ \"65.52.172.237/32\",\r\n \"65.52.193.203/32\",\r\n \"65.52.250.128/26\",\r\n + \ \"70.37.57.58/32\",\r\n \"70.37.89.222/32\",\r\n \"102.37.85.224/28\",\r\n + \ \"102.133.26.192/26\",\r\n \"102.133.64.41/32\",\r\n \"102.133.123.0/26\",\r\n + \ \"102.133.123.128/26\",\r\n \"102.133.154.192/26\",\r\n + \ \"102.133.254.64/26\",\r\n \"104.41.46.178/32\",\r\n \"104.41.185.116/32\",\r\n + \ \"104.43.165.73/32\",\r\n \"104.43.242.137/32\",\r\n \"104.44.129.141/32\",\r\n + \ \"104.44.129.243/32\",\r\n \"104.44.129.255/32\",\r\n \"104.44.134.255/32\",\r\n + \ \"104.45.227.37/32\",\r\n \"104.46.108.135/32\",\r\n \"104.208.54.11/32\",\r\n + \ \"104.210.90.65/32\",\r\n \"104.211.81.64/26\",\r\n \"104.211.98.24/32\",\r\n + \ \"104.211.146.128/26\",\r\n \"104.211.160.229/32\",\r\n + \ \"104.211.225.66/32\",\r\n \"104.214.18.192/26\",\r\n \"104.214.49.0/32\",\r\n + \ \"104.215.158.33/32\",\r\n \"157.55.176.93/32\",\r\n \"157.55.208.185/32\",\r\n + \ \"168.61.143.0/26\",\r\n \"168.63.132.240/32\",\r\n \"168.63.241.160/32\",\r\n + \ \"191.233.50.128/26\",\r\n \"191.233.94.45/32\",\r\n \"191.233.203.64/26\",\r\n + \ \"191.234.147.0/26\",\r\n \"191.234.155.0/26\",\r\n \"191.236.60.72/32\",\r\n + \ \"191.236.154.88/32\",\r\n \"191.237.222.191/32\",\r\n + \ \"191.238.77.240/28\",\r\n \"191.239.104.48/32\",\r\n \"2603:1000:4:1::480/123\",\r\n + \ \"2603:1000:4:402::100/122\",\r\n \"2603:1000:104:3::20/123\",\r\n + \ \"2603:1000:104:402::100/122\",\r\n \"2603:1000:104:802::100/122\",\r\n + \ \"2603:1000:104:c02::100/122\",\r\n \"2603:1010:6:2::700/123\",\r\n + \ \"2603:1010:6:402::100/122\",\r\n \"2603:1010:6:802::100/122\",\r\n + \ \"2603:1010:6:c02::100/122\",\r\n \"2603:1010:101:1::4a0/123\",\r\n + \ \"2603:1010:101:402::100/122\",\r\n \"2603:1010:304:1::480/123\",\r\n + \ \"2603:1010:304:402::100/122\",\r\n \"2603:1010:404:1::480/123\",\r\n + \ \"2603:1010:404:402::100/122\",\r\n \"2603:1020:5:4::220/123\",\r\n + \ \"2603:1020:5:402::100/122\",\r\n \"2603:1020:5:802::100/122\",\r\n + \ \"2603:1020:5:c02::100/122\",\r\n \"2603:1020:206::7a0/123\",\r\n + \ \"2603:1020:206:402::100/122\",\r\n \"2603:1020:206:802::100/122\",\r\n + \ \"2603:1020:206:c02::100/122\",\r\n \"2603:1020:305:402::100/122\",\r\n + \ \"2603:1020:405:402::100/122\",\r\n \"2603:1020:605:1::4a0/123\",\r\n + \ \"2603:1020:605:402::100/122\",\r\n \"2603:1020:705:2::720/123\",\r\n + \ \"2603:1020:705:402::100/122\",\r\n \"2603:1020:705:802::100/122\",\r\n + \ \"2603:1020:705:c02::100/122\",\r\n \"2603:1020:805:2::500/123\",\r\n + \ \"2603:1020:805:402::100/122\",\r\n \"2603:1020:805:802::100/122\",\r\n + \ \"2603:1020:805:c02::100/122\",\r\n \"2603:1020:905:1::480/123\",\r\n + \ \"2603:1020:905:402::100/122\",\r\n \"2603:1020:a04:3::200/123\",\r\n + \ \"2603:1020:a04:402::100/122\",\r\n \"2603:1020:a04:802::100/122\",\r\n + \ \"2603:1020:a04:c02::100/122\",\r\n \"2603:1020:b04:1::4a0/123\",\r\n + \ \"2603:1020:b04:402::100/122\",\r\n \"2603:1020:c04:2::500/123\",\r\n + \ \"2603:1020:c04:402::100/122\",\r\n \"2603:1020:c04:802::100/122\",\r\n + \ \"2603:1020:c04:c02::100/122\",\r\n \"2603:1020:d04:1::480/123\",\r\n + \ \"2603:1020:d04:402::100/122\",\r\n \"2603:1020:e04:3::4c0/123\",\r\n + \ \"2603:1020:e04:402::100/122\",\r\n \"2603:1020:e04:802::100/122\",\r\n + \ \"2603:1020:e04:c02::100/122\",\r\n \"2603:1020:f04:1::480/123\",\r\n + \ \"2603:1020:f04:402::100/122\",\r\n \"2603:1020:1004:3::60/123\",\r\n + \ \"2603:1020:1004:400::440/122\",\r\n \"2603:1020:1004:800::80/122\",\r\n + \ \"2603:1020:1004:800::200/122\",\r\n \"2603:1020:1004:800::380/122\",\r\n + \ \"2603:1020:1004:c02::3c0/122\",\r\n \"2603:1020:1104:2::200/123\",\r\n + \ \"2603:1020:1104:400::100/122\",\r\n \"2603:1030:f:3::700/123\",\r\n + \ \"2603:1030:f:400::900/122\",\r\n \"2603:1030:10::7a0/123\",\r\n + \ \"2603:1030:10:402::100/122\",\r\n \"2603:1030:10:802::100/122\",\r\n + \ \"2603:1030:10:c02::100/122\",\r\n \"2603:1030:104:2::c0/123\",\r\n + \ \"2603:1030:104:402::100/122\",\r\n \"2603:1030:104:402::600/122\",\r\n + \ \"2603:1030:104:802::c0/122\",\r\n \"2603:1030:107:400::80/122\",\r\n + \ \"2603:1030:210::7a0/123\",\r\n \"2603:1030:210:402::100/122\",\r\n + \ \"2603:1030:210:802::100/122\",\r\n \"2603:1030:210:c02::100/122\",\r\n + \ \"2603:1030:302::a0/123\",\r\n \"2603:1030:40b:3::360/123\",\r\n + \ \"2603:1030:40b:400::900/122\",\r\n \"2603:1030:40b:800::100/122\",\r\n + \ \"2603:1030:40b:c00::100/122\",\r\n \"2603:1030:40c::7c0/123\",\r\n + \ \"2603:1030:40c:402::100/122\",\r\n \"2603:1030:40c:802::100/122\",\r\n + \ \"2603:1030:40c:c02::100/122\",\r\n \"2603:1030:504:2::740/123\",\r\n + \ \"2603:1030:504:402::400/122\",\r\n \"2603:1030:504:802::80/122\",\r\n + \ \"2603:1030:504:802::380/122\",\r\n \"2603:1030:504:c02::440/122\",\r\n + \ \"2603:1030:608:1::4a0/123\",\r\n \"2603:1030:608:402::100/122\",\r\n + \ \"2603:1030:807:3::220/123\",\r\n \"2603:1030:807:402::100/122\",\r\n + \ \"2603:1030:807:802::100/122\",\r\n \"2603:1030:807:c02::100/122\",\r\n + \ \"2603:1030:a07:4::140/123\",\r\n \"2603:1030:a07:402::880/122\",\r\n + \ \"2603:1030:b04:1::4a0/123\",\r\n \"2603:1030:b04:402::100/122\",\r\n + \ \"2603:1030:c06:5::180/123\",\r\n \"2603:1030:c06:400::900/122\",\r\n + \ \"2603:1030:c06:802::100/122\",\r\n \"2603:1030:c06:c02::100/122\",\r\n + \ \"2603:1030:f05:2::700/123\",\r\n \"2603:1030:f05:402::100/122\",\r\n + \ \"2603:1030:f05:802::100/122\",\r\n \"2603:1030:f05:c02::100/122\",\r\n + \ \"2603:1030:1005:1::4a0/123\",\r\n \"2603:1030:1005:402::100/122\",\r\n + \ \"2603:1040:5:3::220/123\",\r\n \"2603:1040:5:402::100/122\",\r\n + \ \"2603:1040:5:802::100/122\",\r\n \"2603:1040:5:c02::100/122\",\r\n + \ \"2603:1040:207:402::100/122\",\r\n \"2603:1040:207:800::80/122\",\r\n + \ \"2603:1040:207:c00::80/122\",\r\n \"2603:1040:407:2::500/123\",\r\n + \ \"2603:1040:407:402::100/122\",\r\n \"2603:1040:407:802::100/122\",\r\n + \ \"2603:1040:407:c02::100/122\",\r\n \"2603:1040:606:1::4a0/123\",\r\n + \ \"2603:1040:606:402::100/122\",\r\n \"2603:1040:806:1::2a0/123\",\r\n + \ \"2603:1040:806:402::100/122\",\r\n \"2603:1040:904:2::500/123\",\r\n + \ \"2603:1040:904:402::100/122\",\r\n \"2603:1040:904:802::100/122\",\r\n + \ \"2603:1040:904:c02::100/122\",\r\n \"2603:1040:a06:3::220/123\",\r\n + \ \"2603:1040:a06:402::100/122\",\r\n \"2603:1040:a06:802::100/122\",\r\n + \ \"2603:1040:a06:c02::100/122\",\r\n \"2603:1040:b04:1::480/123\",\r\n + \ \"2603:1040:b04:402::100/122\",\r\n \"2603:1040:c06:1::4a0/123\",\r\n + \ \"2603:1040:c06:402::100/122\",\r\n \"2603:1040:d04:3::40/123\",\r\n + \ \"2603:1040:d04:400::440/122\",\r\n \"2603:1040:d04:800::80/122\",\r\n + \ \"2603:1040:d04:800::200/122\",\r\n \"2603:1040:d04:800::380/122\",\r\n + \ \"2603:1040:e05:1::e0/123\",\r\n \"2603:1040:f05:3::100/123\",\r\n + \ \"2603:1040:f05:402::100/122\",\r\n \"2603:1040:f05:802::100/122\",\r\n + \ \"2603:1040:f05:c02::100/122\",\r\n \"2603:1040:1002:2::340/123\",\r\n + \ \"2603:1040:1002:400::80/122\",\r\n \"2603:1040:1002:800::80/122\",\r\n + \ \"2603:1040:1002:c00::80/122\",\r\n \"2603:1040:1104:2::260/123\",\r\n + \ \"2603:1040:1104:400::100/122\",\r\n \"2603:1050:6:2::500/123\",\r\n + \ \"2603:1050:6:402::100/122\",\r\n \"2603:1050:6:802::100/122\",\r\n + \ \"2603:1050:6:c02::100/122\",\r\n \"2603:1050:403:1::4c0/123\",\r\n + \ \"2603:1050:403:400::100/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureActiveDirectory\",\r\n \"id\": \"AzureActiveDirectory\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n + \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureAD\",\r\n + \ \"addressPrefixes\": [\r\n \"13.64.151.161/32\",\r\n \"13.66.141.64/27\",\r\n + \ \"13.67.9.224/27\",\r\n \"13.69.66.160/27\",\r\n \"13.69.229.96/27\",\r\n + \ \"13.70.73.32/27\",\r\n \"13.71.172.160/27\",\r\n \"13.71.195.224/27\",\r\n + \ \"13.71.201.64/26\",\r\n \"13.73.240.32/27\",\r\n \"13.74.104.0/26\",\r\n + \ \"13.74.249.156/32\",\r\n \"13.75.38.32/27\",\r\n \"13.75.105.168/32\",\r\n + \ \"13.77.52.160/27\",\r\n \"13.78.108.192/27\",\r\n \"13.78.172.246/32\",\r\n + \ \"13.79.37.247/32\",\r\n \"13.86.219.0/27\",\r\n \"13.87.16.0/26\",\r\n + \ \"13.87.57.160/27\",\r\n \"13.87.123.160/27\",\r\n \"13.89.174.0/27\",\r\n + \ \"20.36.107.192/27\",\r\n \"20.36.115.64/27\",\r\n \"20.37.75.96/27\",\r\n + \ \"20.40.228.64/28\",\r\n \"20.43.120.32/27\",\r\n \"20.44.3.160/27\",\r\n + \ \"20.44.16.32/27\",\r\n \"20.46.10.64/27\",\r\n \"20.51.9.80/28\",\r\n + \ \"20.51.14.72/31\",\r\n \"20.51.16.128/27\",\r\n \"20.61.98.160/27\",\r\n + \ \"20.61.99.128/28\",\r\n \"20.62.58.80/28\",\r\n \"20.62.129.0/27\",\r\n + \ \"20.62.129.240/28\",\r\n \"20.62.134.74/31\",\r\n \"20.65.132.96/28\",\r\n + \ \"20.66.2.32/27\",\r\n \"20.66.3.16/28\",\r\n \"20.72.21.64/26\",\r\n + \ \"20.88.66.0/27\",\r\n \"20.187.197.32/27\",\r\n \"20.187.197.240/28\",\r\n + \ \"20.190.128.0/18\",\r\n \"20.194.73.0/28\",\r\n \"20.195.56.102/32\",\r\n + \ \"20.195.57.118/32\",\r\n \"20.195.64.192/27\",\r\n \"20.195.64.240/28\",\r\n + \ \"23.101.0.70/32\",\r\n \"23.101.6.190/32\",\r\n \"40.68.160.142/32\",\r\n + \ \"40.69.107.160/27\",\r\n \"40.71.13.0/27\",\r\n \"40.74.101.64/27\",\r\n + \ \"40.74.146.192/27\",\r\n \"40.78.195.160/27\",\r\n \"40.78.203.64/27\",\r\n + \ \"40.79.131.128/27\",\r\n \"40.79.179.128/27\",\r\n \"40.83.144.56/32\",\r\n + \ \"40.126.0.0/18\",\r\n \"51.140.148.192/27\",\r\n \"51.140.208.0/26\",\r\n + \ \"51.140.211.192/27\",\r\n \"52.138.65.157/32\",\r\n \"52.138.68.41/32\",\r\n + \ \"52.146.132.96/27\",\r\n \"52.146.133.80/28\",\r\n \"52.146.137.66/31\",\r\n + \ \"52.150.157.0/27\",\r\n \"52.159.175.31/32\",\r\n \"52.161.13.71/32\",\r\n + \ \"52.161.13.95/32\",\r\n \"52.161.110.169/32\",\r\n \"52.162.110.96/27\",\r\n + \ \"52.169.125.119/32\",\r\n \"52.169.218.0/32\",\r\n \"52.174.189.149/32\",\r\n + \ \"52.175.18.134/32\",\r\n \"52.178.27.112/32\",\r\n \"52.179.122.218/32\",\r\n + \ \"52.179.126.223/32\",\r\n \"52.180.177.87/32\",\r\n \"52.180.179.108/32\",\r\n + \ \"52.180.181.61/32\",\r\n \"52.180.183.8/32\",\r\n \"52.187.19.1/32\",\r\n + \ \"52.187.113.48/32\",\r\n \"52.187.117.83/32\",\r\n \"52.187.120.237/32\",\r\n + \ \"52.225.184.198/32\",\r\n \"52.225.188.89/32\",\r\n \"52.226.169.40/32\",\r\n + \ \"52.231.19.128/27\",\r\n \"52.231.147.192/27\",\r\n \"65.52.251.96/27\",\r\n + \ \"104.40.84.19/32\",\r\n \"104.40.87.209/32\",\r\n \"104.40.156.18/32\",\r\n + \ \"104.40.168.0/26\",\r\n \"104.41.159.212/32\",\r\n \"104.45.138.161/32\",\r\n + \ \"104.46.178.128/27\",\r\n \"104.211.147.160/27\",\r\n + \ \"191.233.204.160/27\",\r\n \"2603:1006:2000::/48\",\r\n + \ \"2603:1007:200::/48\",\r\n \"2603:1016:1400::/48\",\r\n + \ \"2603:1017::/48\",\r\n \"2603:1026:3000::/48\",\r\n \"2603:1027:1::/48\",\r\n + \ \"2603:1030:107:2::/120\",\r\n \"2603:1030:107:2::100/121\",\r\n + \ \"2603:1036:3000::/48\",\r\n \"2603:1037:1::/48\",\r\n + \ \"2603:1046:2000::/48\",\r\n \"2603:1047:1::/48\",\r\n + \ \"2603:1056:2000::/48\",\r\n \"2603:1057:2::/48\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"AzureActiveDirectoryDomainServices\",\r\n + \ \"id\": \"AzureActiveDirectoryDomainServices\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureIdentity\",\r\n \"addressPrefixes\": + [\r\n \"13.64.151.161/32\",\r\n \"13.66.141.64/27\",\r\n + \ \"13.67.9.224/27\",\r\n \"13.69.66.160/27\",\r\n \"13.69.229.96/27\",\r\n + \ \"13.70.73.32/27\",\r\n \"13.71.172.160/27\",\r\n \"13.71.195.224/27\",\r\n + \ \"13.73.240.32/27\",\r\n \"13.74.249.156/32\",\r\n \"13.75.38.32/27\",\r\n + \ \"13.75.105.168/32\",\r\n \"13.77.52.160/27\",\r\n \"13.78.108.192/27\",\r\n + \ \"13.78.172.246/32\",\r\n \"13.79.37.247/32\",\r\n \"13.86.219.0/27\",\r\n + \ \"13.87.57.160/27\",\r\n \"13.87.123.160/27\",\r\n \"13.89.174.0/27\",\r\n + \ \"20.36.107.192/27\",\r\n \"20.36.115.64/27\",\r\n \"20.37.75.96/27\",\r\n + \ \"20.43.120.32/27\",\r\n \"20.44.3.160/27\",\r\n \"20.44.16.32/27\",\r\n + \ \"20.46.10.64/27\",\r\n \"20.51.16.128/27\",\r\n \"20.61.98.160/27\",\r\n + \ \"20.62.129.0/27\",\r\n \"20.66.2.32/27\",\r\n \"20.72.21.64/27\",\r\n + \ \"20.187.197.32/27\",\r\n \"20.190.165.48/29\",\r\n \"20.190.166.48/29\",\r\n + \ \"20.190.166.112/29\",\r\n \"20.190.166.176/29\",\r\n \"20.195.56.102/32\",\r\n + \ \"20.195.57.118/32\",\r\n \"20.195.64.192/27\",\r\n \"23.101.0.70/32\",\r\n + \ \"23.101.6.190/32\",\r\n \"40.68.160.142/32\",\r\n \"40.69.107.160/27\",\r\n + \ \"40.71.13.0/27\",\r\n \"40.74.101.64/27\",\r\n \"40.74.146.192/27\",\r\n + \ \"40.78.195.160/27\",\r\n \"40.78.203.64/27\",\r\n \"40.79.131.128/27\",\r\n + \ \"40.79.179.128/27\",\r\n \"40.83.144.56/32\",\r\n \"40.126.37.48/29\",\r\n + \ \"40.126.38.48/29\",\r\n \"40.126.38.112/29\",\r\n \"40.126.38.176/29\",\r\n + \ \"51.140.148.192/27\",\r\n \"51.140.211.192/27\",\r\n \"52.138.65.157/32\",\r\n + \ \"52.138.68.41/32\",\r\n \"52.146.132.96/27\",\r\n \"52.150.157.0/27\",\r\n + \ \"52.161.13.71/32\",\r\n \"52.161.13.95/32\",\r\n \"52.161.110.169/32\",\r\n + \ \"52.162.110.96/27\",\r\n \"52.169.125.119/32\",\r\n \"52.169.218.0/32\",\r\n + \ \"52.174.189.149/32\",\r\n \"52.175.18.134/32\",\r\n \"52.178.27.112/32\",\r\n + \ \"52.179.122.218/32\",\r\n \"52.179.126.223/32\",\r\n \"52.180.177.87/32\",\r\n + \ \"52.180.179.108/32\",\r\n \"52.180.181.61/32\",\r\n \"52.180.183.8/32\",\r\n + \ \"52.187.19.1/32\",\r\n \"52.187.113.48/32\",\r\n \"52.187.117.83/32\",\r\n + \ \"52.187.120.237/32\",\r\n \"52.225.184.198/32\",\r\n \"52.225.188.89/32\",\r\n + \ \"52.231.19.128/27\",\r\n \"52.231.147.192/27\",\r\n \"65.52.251.96/27\",\r\n + \ \"104.40.84.19/32\",\r\n \"104.40.87.209/32\",\r\n \"104.40.156.18/32\",\r\n + \ \"104.41.159.212/32\",\r\n \"104.45.138.161/32\",\r\n \"104.46.178.128/27\",\r\n + \ \"104.211.147.160/27\",\r\n \"191.233.204.160/27\",\r\n + \ \"2603:1030:107:2::100/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureAdvancedThreatProtection\",\r\n \"id\": + \"AzureAdvancedThreatProtection\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAdvancedThreatProtection\",\r\n + \ \"addressPrefixes\": [\r\n \"13.72.105.31/32\",\r\n \"13.72.105.76/32\",\r\n + \ \"13.93.176.195/32\",\r\n \"13.93.176.215/32\",\r\n \"20.21.32.24/29\",\r\n + \ \"20.36.120.112/29\",\r\n \"20.37.64.112/29\",\r\n \"20.37.156.192/29\",\r\n + \ \"20.37.195.8/29\",\r\n \"20.37.224.112/29\",\r\n \"20.38.84.96/29\",\r\n + \ \"20.38.136.112/29\",\r\n \"20.39.11.16/29\",\r\n \"20.41.4.96/29\",\r\n + \ \"20.41.65.128/29\",\r\n \"20.41.192.112/29\",\r\n \"20.42.4.192/29\",\r\n + \ \"20.42.129.176/29\",\r\n \"20.42.224.112/29\",\r\n \"20.43.41.144/29\",\r\n + \ \"20.43.65.136/29\",\r\n \"20.43.130.88/29\",\r\n \"20.45.112.112/29\",\r\n + \ \"20.45.192.112/29\",\r\n \"20.51.14.64/29\",\r\n \"20.62.135.224/29\",\r\n + \ \"20.66.6.80/29\",\r\n \"20.72.16.24/29\",\r\n \"20.82.244.24/29\",\r\n + \ \"20.86.88.184/29\",\r\n \"20.150.160.112/29\",\r\n \"20.184.13.55/32\",\r\n + \ \"20.184.14.129/32\",\r\n \"20.189.106.120/29\",\r\n \"20.192.160.24/29\",\r\n + \ \"20.192.225.16/29\",\r\n \"20.195.69.80/29\",\r\n \"40.65.107.78/32\",\r\n + \ \"40.65.111.206/32\",\r\n \"40.67.48.112/29\",\r\n \"40.74.30.96/29\",\r\n + \ \"40.80.56.112/29\",\r\n \"40.80.168.112/29\",\r\n \"40.80.188.16/29\",\r\n + \ \"40.82.253.64/29\",\r\n \"40.85.133.119/32\",\r\n \"40.85.133.178/32\",\r\n + \ \"40.87.44.77/32\",\r\n \"40.87.45.222/32\",\r\n \"40.89.16.112/29\",\r\n + \ \"40.119.9.224/29\",\r\n \"51.12.46.232/29\",\r\n \"51.12.198.192/29\",\r\n + \ \"51.104.25.144/29\",\r\n \"51.105.80.112/29\",\r\n \"51.105.88.112/29\",\r\n + \ \"51.107.48.112/29\",\r\n \"51.107.144.112/29\",\r\n \"51.120.40.112/29\",\r\n + \ \"51.120.224.112/29\",\r\n \"51.137.161.128/29\",\r\n \"51.143.183.3/32\",\r\n + \ \"51.143.183.52/32\",\r\n \"51.143.192.112/29\",\r\n \"51.143.214.56/29\",\r\n + \ \"52.136.48.112/29\",\r\n \"52.140.104.112/29\",\r\n \"52.150.139.64/29\",\r\n + \ \"52.170.0.116/32\",\r\n \"52.170.1.228/32\",\r\n \"52.170.249.197/32\",\r\n + \ \"52.174.66.179/32\",\r\n \"52.174.66.180/32\",\r\n \"52.225.176.98/32\",\r\n + \ \"52.225.181.34/32\",\r\n \"52.225.183.206/32\",\r\n \"52.228.81.128/29\",\r\n + \ \"104.42.25.10/32\",\r\n \"104.42.29.8/32\",\r\n \"168.63.46.233/32\",\r\n + \ \"168.63.46.241/32\",\r\n \"191.233.8.24/29\",\r\n \"191.235.225.136/29\",\r\n + \ \"2603:1000:4::140/123\",\r\n \"2603:1000:104:1::140/123\",\r\n + \ \"2603:1010:6:1::140/123\",\r\n \"2603:1010:101::140/123\",\r\n + \ \"2603:1010:304::140/123\",\r\n \"2603:1010:404::140/123\",\r\n + \ \"2603:1020:5:1::140/123\",\r\n \"2603:1020:206:1::140/123\",\r\n + \ \"2603:1020:305::140/123\",\r\n \"2603:1020:405::140/123\",\r\n + \ \"2603:1020:605::140/123\",\r\n \"2603:1020:705:1::140/123\",\r\n + \ \"2603:1020:805:1::140/123\",\r\n \"2603:1020:905::140/123\",\r\n + \ \"2603:1020:a04:1::140/123\",\r\n \"2603:1020:b04::140/123\",\r\n + \ \"2603:1020:c04:1::140/123\",\r\n \"2603:1020:d04::140/123\",\r\n + \ \"2603:1020:e04:1::140/123\",\r\n \"2603:1020:f04::140/123\",\r\n + \ \"2603:1020:1004::140/123\",\r\n \"2603:1020:1104::140/123\",\r\n + \ \"2603:1030:f:1::140/123\",\r\n \"2603:1030:10:1::140/123\",\r\n + \ \"2603:1030:104:1::140/123\",\r\n \"2603:1030:107::140/123\",\r\n + \ \"2603:1030:210:1::140/123\",\r\n \"2603:1030:40b:1::140/123\",\r\n + \ \"2603:1030:40c:1::140/123\",\r\n \"2603:1030:504:1::140/123\",\r\n + \ \"2603:1030:608::140/123\",\r\n \"2603:1030:807:1::140/123\",\r\n + \ \"2603:1030:a07::140/123\",\r\n \"2603:1030:b04::140/123\",\r\n + \ \"2603:1030:c06:1::140/123\",\r\n \"2603:1030:f05:1::140/123\",\r\n + \ \"2603:1030:1005::140/123\",\r\n \"2603:1040:5:1::140/123\",\r\n + \ \"2603:1040:207::140/123\",\r\n \"2603:1040:407:1::140/123\",\r\n + \ \"2603:1040:606::140/123\",\r\n \"2603:1040:806::140/123\",\r\n + \ \"2603:1040:904:1::140/123\",\r\n \"2603:1040:a06:1::140/123\",\r\n + \ \"2603:1040:b04::140/123\",\r\n \"2603:1040:c06::140/123\",\r\n + \ \"2603:1040:d04::140/123\",\r\n \"2603:1040:f05:1::140/123\",\r\n + \ \"2603:1040:1002::c0/123\",\r\n \"2603:1040:1104::140/123\",\r\n + \ \"2603:1050:6:1::140/123\",\r\n \"2603:1050:403::140/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureAPIForFHIR\",\r\n + \ \"id\": \"AzureAPIForFHIR\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAPIForFHIR\",\r\n \"addressPrefixes\": + [\r\n \"13.67.40.183/32\",\r\n \"13.69.233.32/31\",\r\n + \ \"13.70.78.170/31\",\r\n \"13.71.175.130/31\",\r\n \"13.71.199.118/31\",\r\n + \ \"13.73.244.194/31\",\r\n \"13.73.254.220/30\",\r\n \"13.78.111.194/31\",\r\n + \ \"13.80.124.132/32\",\r\n \"13.82.180.206/32\",\r\n \"13.86.221.218/31\",\r\n + \ \"13.87.58.136/31\",\r\n \"13.87.124.136/31\",\r\n \"20.21.36.224/27\",\r\n + \ \"20.36.117.192/31\",\r\n \"20.36.123.84/30\",\r\n \"20.37.68.224/30\",\r\n + \ \"20.37.76.204/31\",\r\n \"20.37.198.142/31\",\r\n \"20.37.227.102/31\",\r\n + \ \"20.37.228.12/31\",\r\n \"20.38.128.170/31\",\r\n \"20.38.141.6/31\",\r\n + \ \"20.38.142.104/31\",\r\n \"20.39.15.58/31\",\r\n \"20.40.224.224/31\",\r\n + \ \"20.40.224.228/31\",\r\n \"20.40.230.128/28\",\r\n \"20.41.69.50/31\",\r\n + \ \"20.41.69.60/31\",\r\n \"20.42.230.234/31\",\r\n \"20.43.45.248/30\",\r\n + \ \"20.43.121.122/31\",\r\n \"20.44.4.232/31\",\r\n \"20.44.19.4/31\",\r\n + \ \"20.45.90.96/28\",\r\n \"20.45.112.122/31\",\r\n \"20.45.114.204/31\",\r\n + \ \"20.45.117.48/28\",\r\n \"20.45.199.40/30\",\r\n \"20.46.12.208/28\",\r\n + \ \"20.46.15.0/27\",\r\n \"20.48.192.84/30\",\r\n \"20.48.197.160/28\",\r\n + \ \"20.49.99.46/31\",\r\n \"20.49.102.228/31\",\r\n \"20.49.114.188/30\",\r\n + \ \"20.49.127.240/31\",\r\n \"20.51.0.208/28\",\r\n \"20.51.13.80/28\",\r\n + \ \"20.51.16.168/31\",\r\n \"20.51.21.80/28\",\r\n \"20.52.88.224/28\",\r\n + \ \"20.53.0.32/31\",\r\n \"20.53.44.80/31\",\r\n \"20.53.47.208/28\",\r\n + \ \"20.53.49.112/28\",\r\n \"20.53.57.64/28\",\r\n \"20.58.67.96/28\",\r\n + \ \"20.61.98.66/31\",\r\n \"20.61.98.68/31\",\r\n \"20.61.103.240/28\",\r\n + \ \"20.62.60.112/28\",\r\n \"20.62.128.148/30\",\r\n \"20.62.134.240/28\",\r\n + \ \"20.65.134.80/28\",\r\n \"20.66.5.144/28\",\r\n \"20.69.1.160/28\",\r\n + \ \"20.72.21.208/28\",\r\n \"20.99.9.192/27\",\r\n \"20.150.165.156/30\",\r\n + \ \"20.150.225.0/31\",\r\n \"20.150.245.64/28\",\r\n \"20.150.245.160/27\",\r\n + \ \"20.187.196.196/30\",\r\n \"20.189.228.224/28\",\r\n \"20.191.160.26/31\",\r\n + \ \"20.191.160.116/31\",\r\n \"20.191.167.144/28\",\r\n \"20.192.45.0/28\",\r\n + \ \"20.192.47.64/27\",\r\n \"20.192.50.96/27\",\r\n \"20.192.50.240/28\",\r\n + \ \"20.192.80.192/28\",\r\n \"20.192.164.188/30\",\r\n \"20.192.184.80/31\",\r\n + \ \"20.192.225.200/30\",\r\n \"20.192.238.122/31\",\r\n \"20.193.194.128/27\",\r\n + \ \"20.193.194.160/28\",\r\n \"20.193.206.36/31\",\r\n \"20.194.74.160/28\",\r\n + \ \"20.194.75.192/27\",\r\n \"20.195.67.208/28\",\r\n \"20.195.74.224/28\",\r\n + \ \"20.195.78.96/27\",\r\n \"20.195.146.208/28\",\r\n \"23.96.205.55/32\",\r\n + \ \"23.98.108.42/31\",\r\n \"23.98.108.46/31\",\r\n \"40.64.135.76/30\",\r\n + \ \"40.67.48.122/31\",\r\n \"40.67.50.244/31\",\r\n \"40.67.53.240/28\",\r\n + \ \"40.67.60.110/31\",\r\n \"40.69.111.32/31\",\r\n \"40.71.15.192/31\",\r\n + \ \"40.75.35.218/31\",\r\n \"40.78.204.44/31\",\r\n \"40.78.238.58/31\",\r\n + \ \"40.78.250.110/31\",\r\n \"40.79.116.45/32\",\r\n \"40.80.63.158/31\",\r\n + \ \"40.80.63.244/31\",\r\n \"40.80.173.128/30\",\r\n \"40.80.180.2/31\",\r\n + \ \"40.82.248.70/31\",\r\n \"40.89.23.40/31\",\r\n \"40.113.78.45/32\",\r\n + \ \"40.120.82.160/28\",\r\n \"40.126.239.114/32\",\r\n \"51.11.192.32/31\",\r\n + \ \"51.12.20.32/28\",\r\n \"51.12.20.64/27\",\r\n \"51.12.28.64/27\",\r\n + \ \"51.12.28.96/28\",\r\n \"51.12.42.64/30\",\r\n \"51.12.100.104/31\",\r\n + \ \"51.12.193.28/30\",\r\n \"51.12.204.224/31\",\r\n \"51.13.136.56/31\",\r\n + \ \"51.13.138.32/28\",\r\n \"51.104.9.98/31\",\r\n \"51.104.30.170/31\",\r\n + \ \"51.107.53.48/30\",\r\n \"51.107.60.94/31\",\r\n \"51.107.148.18/31\",\r\n + \ \"51.107.156.134/31\",\r\n \"51.107.243.128/28\",\r\n \"51.107.247.96/27\",\r\n + \ \"51.107.249.72/31\",\r\n \"51.107.251.112/28\",\r\n \"51.116.51.32/30\",\r\n + \ \"51.116.55.128/28\",\r\n \"51.116.60.240/31\",\r\n \"51.116.146.216/30\",\r\n + \ \"51.116.158.58/31\",\r\n \"51.120.40.126/31\",\r\n \"51.120.100.94/31\",\r\n + \ \"51.120.220.94/31\",\r\n \"51.120.228.36/31\",\r\n \"51.120.232.32/31\",\r\n + \ \"51.120.234.144/28\",\r\n \"51.120.235.192/27\",\r\n \"51.137.164.94/31\",\r\n + \ \"51.137.167.168/31\",\r\n \"51.138.160.0/31\",\r\n \"51.138.211.16/28\",\r\n + \ \"51.140.40.89/32\",\r\n \"51.140.210.86/31\",\r\n \"51.140.224.110/32\",\r\n + \ \"51.143.208.132/31\",\r\n \"51.143.213.208/28\",\r\n \"52.136.48.122/31\",\r\n + \ \"52.136.52.36/31\",\r\n \"52.136.184.0/30\",\r\n \"52.136.186.32/28\",\r\n + \ \"52.139.106.72/31\",\r\n \"52.139.108.32/28\",\r\n \"52.140.110.164/30\",\r\n + \ \"52.146.131.52/30\",\r\n \"52.146.137.176/28\",\r\n \"52.147.113.96/28\",\r\n + \ \"52.150.156.44/30\",\r\n \"52.161.13.30/32\",\r\n \"52.162.111.130/31\",\r\n + \ \"52.167.239.195/32\",\r\n \"52.172.112.24/30\",\r\n \"52.172.116.144/28\",\r\n + \ \"52.178.17.0/31\",\r\n \"52.182.141.14/31\",\r\n \"52.231.23.8/31\",\r\n + \ \"52.231.146.86/31\",\r\n \"52.231.152.94/32\",\r\n \"52.247.220.99/32\",\r\n + \ \"65.52.252.248/31\",\r\n \"102.37.64.48/31\",\r\n \"102.37.81.144/28\",\r\n + \ \"102.37.161.64/28\",\r\n \"102.133.58.204/30\",\r\n \"102.133.124.12/31\",\r\n + \ \"102.133.220.196/30\",\r\n \"104.46.162.0/31\",\r\n \"104.46.178.112/31\",\r\n + \ \"104.46.183.192/28\",\r\n \"104.210.152.157/32\",\r\n + \ \"104.214.161.14/31\",\r\n \"191.233.14.192/30\",\r\n \"191.233.51.212/31\",\r\n + \ \"191.233.207.24/31\",\r\n \"191.234.139.160/31\",\r\n + \ \"191.235.225.154/31\",\r\n \"191.238.72.224/28\",\r\n + \ \"2603:1020:a04:2::540/123\",\r\n \"2603:1020:e04::7c0/123\",\r\n + \ \"2603:1020:1004:2::c0/123\",\r\n \"2603:1020:1104:1::4e0/123\",\r\n + \ \"2603:1030:f:2::4e0/123\",\r\n \"2603:1030:104::7c0/123\",\r\n + \ \"2603:1030:504:2::c0/123\",\r\n \"2603:1030:608:3::660/123\",\r\n + \ \"2603:1040:207:1::4e0/123\",\r\n \"2603:1040:a06:2::2c0/123\",\r\n + \ \"2603:1040:d04:2::20/123\",\r\n \"2603:1040:f05::7c0/123\",\r\n + \ \"2603:1040:1002:1::a0/123\",\r\n \"2603:1040:1104:1::440/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureArcInfrastructure\",\r\n + \ \"id\": \"AzureArcInfrastructure\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureArcInfrastructure\",\r\n \"addressPrefixes\": + [\r\n \"13.66.143.219/32\",\r\n \"13.70.79.64/32\",\r\n + \ \"13.71.175.129/32\",\r\n \"13.71.199.117/32\",\r\n \"13.73.244.196/32\",\r\n + \ \"13.73.253.124/30\",\r\n \"13.74.107.94/32\",\r\n \"13.77.53.221/32\",\r\n + \ \"13.78.111.193/32\",\r\n \"13.81.244.155/32\",\r\n \"13.86.223.80/32\",\r\n + \ \"13.90.194.180/32\",\r\n \"20.36.122.52/30\",\r\n \"20.37.66.52/30\",\r\n + \ \"20.37.196.248/30\",\r\n \"20.37.226.52/30\",\r\n \"20.37.228.8/30\",\r\n + \ \"20.38.87.188/30\",\r\n \"20.38.138.56/30\",\r\n \"20.38.141.8/30\",\r\n + \ \"20.39.12.228/30\",\r\n \"20.39.14.84/30\",\r\n \"20.40.200.152/29\",\r\n + \ \"20.40.224.52/30\",\r\n \"20.41.67.84/30\",\r\n \"20.41.69.52/30\",\r\n + \ \"20.41.195.252/30\",\r\n \"20.42.228.216/30\",\r\n \"20.43.43.160/30\",\r\n + \ \"20.43.45.240/30\",\r\n \"20.43.67.88/30\",\r\n \"20.43.121.252/32\",\r\n + \ \"20.44.19.6/32\",\r\n \"20.45.197.224/30\",\r\n \"20.45.199.32/30\",\r\n + \ \"20.48.192.76/30\",\r\n \"20.49.99.12/30\",\r\n \"20.49.102.212/30\",\r\n + \ \"20.49.109.32/30\",\r\n \"20.49.113.12/30\",\r\n \"20.49.114.52/30\",\r\n + \ \"20.49.120.32/30\",\r\n \"20.49.125.188/30\",\r\n \"20.50.1.196/30\",\r\n + \ \"20.53.0.34/32\",\r\n \"20.53.41.44/30\",\r\n \"20.61.96.184/30\",\r\n + \ \"20.150.165.140/30\",\r\n \"20.187.194.204/30\",\r\n \"20.189.111.204/30\",\r\n + \ \"20.191.160.28/30\",\r\n \"20.192.164.176/30\",\r\n \"20.192.228.252/30\",\r\n + \ \"23.98.104.12/30\",\r\n \"23.98.108.32/30\",\r\n \"40.64.132.84/30\",\r\n + \ \"40.64.135.72/30\",\r\n \"40.69.111.34/32\",\r\n \"40.71.15.194/32\",\r\n + \ \"40.78.204.46/32\",\r\n \"40.78.239.96/32\",\r\n \"40.79.138.46/32\",\r\n + \ \"40.80.59.24/30\",\r\n \"40.80.172.12/30\",\r\n \"40.89.20.128/30\",\r\n + \ \"40.89.23.32/30\",\r\n \"40.119.9.232/30\",\r\n \"51.104.28.216/30\",\r\n + \ \"51.104.31.172/30\",\r\n \"51.105.77.50/32\",\r\n \"51.105.90.148/30\",\r\n + \ \"51.107.50.56/30\",\r\n \"51.107.53.32/30\",\r\n \"51.107.60.152/32\",\r\n + \ \"51.107.146.52/30\",\r\n \"51.116.49.136/30\",\r\n \"51.116.145.136/30\",\r\n + \ \"51.116.146.212/30\",\r\n \"51.116.158.60/32\",\r\n \"51.120.42.56/30\",\r\n + \ \"51.120.44.196/30\",\r\n \"51.120.100.156/32\",\r\n \"51.120.226.52/30\",\r\n + \ \"51.137.164.76/30\",\r\n \"51.137.166.40/30\",\r\n \"51.140.212.216/32\",\r\n + \ \"52.136.51.68/30\",\r\n \"52.138.90.54/32\",\r\n \"52.140.107.92/30\",\r\n + \ \"52.140.110.108/30\",\r\n \"52.146.79.132/30\",\r\n \"52.146.130.180/30\",\r\n + \ \"52.150.152.204/30\",\r\n \"52.150.156.36/30\",\r\n \"52.162.111.132/32\",\r\n + \ \"52.182.141.60/32\",\r\n \"52.228.84.80/30\",\r\n \"52.231.23.10/32\",\r\n + \ \"52.236.189.74/32\",\r\n \"65.52.252.250/32\",\r\n \"102.133.57.188/30\",\r\n + \ \"102.133.154.6/32\",\r\n \"102.133.218.52/30\",\r\n \"102.133.219.188/30\",\r\n + \ \"104.46.178.0/30\",\r\n \"104.214.164.48/32\",\r\n \"137.135.98.137/32\",\r\n + \ \"191.233.207.26/32\",\r\n \"191.234.136.44/30\",\r\n \"191.234.138.144/30\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureAttestation\",\r\n + \ \"id\": \"AzureAttestation\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAttestation\",\r\n \"addressPrefixes\": + [\r\n \"13.66.145.224/30\",\r\n \"13.69.109.140/30\",\r\n + \ \"13.69.233.128/30\",\r\n \"13.70.79.80/30\",\r\n \"13.71.175.208/30\",\r\n + \ \"13.76.91.201/32\",\r\n \"13.77.168.36/32\",\r\n \"13.86.223.192/30\",\r\n + \ \"13.86.254.29/32\",\r\n \"13.89.241.144/32\",\r\n \"20.21.32.44/30\",\r\n + \ \"20.37.71.40/30\",\r\n \"20.37.229.172/30\",\r\n \"20.38.132.24/30\",\r\n + \ \"20.38.143.40/30\",\r\n \"20.40.225.60/30\",\r\n \"20.43.123.196/30\",\r\n + \ \"20.44.4.248/30\",\r\n \"20.44.12.140/30\",\r\n \"20.44.19.164/30\",\r\n + \ \"20.45.116.92/30\",\r\n \"20.45.126.116/30\",\r\n \"20.46.11.4/30\",\r\n + \ \"20.48.193.180/30\",\r\n \"20.49.83.244/30\",\r\n \"20.49.103.124/30\",\r\n + \ \"20.49.118.20/30\",\r\n \"20.49.127.244/30\",\r\n \"20.50.107.73/32\",\r\n + \ \"20.51.8.204/30\",\r\n \"20.51.20.80/30\",\r\n \"20.52.72.44/30\",\r\n + \ \"20.53.0.104/30\",\r\n \"20.53.47.64/30\",\r\n \"20.53.56.4/30\",\r\n + \ \"20.54.110.142/32\",\r\n \"20.61.99.100/30\",\r\n \"20.62.129.148/30\",\r\n + \ \"20.65.130.92/30\",\r\n \"20.72.21.144/30\",\r\n \"20.72.30.180/30\",\r\n + \ \"20.72.129.122/32\",\r\n \"20.73.227.143/32\",\r\n \"20.150.174.132/30\",\r\n + \ \"20.150.244.32/30\",\r\n \"20.151.24.34/32\",\r\n \"20.187.197.228/30\",\r\n + \ \"20.189.225.84/30\",\r\n \"20.191.161.220/30\",\r\n \"20.192.43.76/30\",\r\n + \ \"20.192.166.188/30\",\r\n \"20.192.184.116/30\",\r\n \"20.192.231.240/30\",\r\n + \ \"20.192.238.188/30\",\r\n \"20.193.96.12/30\",\r\n \"20.194.72.148/30\",\r\n + \ \"20.195.146.64/30\",\r\n \"23.98.109.52/30\",\r\n \"23.99.79.140/32\",\r\n + \ \"40.67.52.116/30\",\r\n \"40.67.121.196/30\",\r\n \"40.69.111.116/30\",\r\n + \ \"40.71.15.204/30\",\r\n \"40.78.239.116/30\",\r\n \"40.79.141.132/30\",\r\n + \ \"40.79.189.116/30\",\r\n \"40.80.173.216/30\",\r\n \"40.80.180.196/30\",\r\n + \ \"40.88.132.87/32\",\r\n \"40.89.23.44/30\",\r\n \"40.89.121.168/30\",\r\n + \ \"40.114.209.61/32\",\r\n \"40.120.8.176/30\",\r\n \"40.120.75.60/30\",\r\n + \ \"40.127.193.93/32\",\r\n \"51.11.125.56/32\",\r\n \"51.12.46.224/30\",\r\n + \ \"51.12.198.4/30\",\r\n \"51.13.128.64/30\",\r\n \"51.13.136.184/30\",\r\n + \ \"51.107.53.52/30\",\r\n \"51.107.128.36/30\",\r\n \"51.107.192.152/30\",\r\n + \ \"51.107.250.40/30\",\r\n \"51.116.54.72/30\",\r\n \"51.116.149.224/30\",\r\n + \ \"51.116.246.16/30\",\r\n \"51.120.100.244/30\",\r\n \"51.120.233.128/30\",\r\n + \ \"51.137.167.184/30\",\r\n \"51.138.160.76/30\",\r\n \"51.138.210.128/30\",\r\n + \ \"51.140.111.84/32\",\r\n \"51.140.149.84/30\",\r\n \"51.140.215.168/30\",\r\n + \ \"51.143.209.132/30\",\r\n \"52.136.53.132/30\",\r\n \"52.136.184.232/30\",\r\n + \ \"52.139.46.228/32\",\r\n \"52.139.86.173/32\",\r\n \"52.142.163.77/32\",\r\n + \ \"52.146.132.244/30\",\r\n \"52.150.157.172/30\",\r\n \"52.154.45.19/32\",\r\n + \ \"52.162.111.140/30\",\r\n \"52.162.199.134/32\",\r\n \"52.172.116.0/30\",\r\n + \ \"52.180.178.44/32\",\r\n \"52.229.112.108/32\",\r\n \"52.231.23.116/30\",\r\n + \ \"52.231.151.68/30\",\r\n \"52.247.36.207/32\",\r\n \"52.251.59.202/32\",\r\n + \ \"70.37.52.246/32\",\r\n \"102.37.64.120/30\",\r\n \"102.37.80.52/30\",\r\n + \ \"102.133.126.132/30\",\r\n \"102.133.221.196/30\",\r\n + \ \"104.46.162.16/30\",\r\n \"104.46.179.240/30\",\r\n \"104.214.164.108/30\",\r\n + \ \"168.61.140.108/30\",\r\n \"191.233.51.220/30\",\r\n \"191.233.207.212/30\",\r\n + \ \"191.238.72.72/30\",\r\n \"2603:1020:a04:2::530/124\",\r\n + \ \"2603:1020:e04::7a0/123\",\r\n \"2603:1020:1004:1::720/123\",\r\n + \ \"2603:1020:1104:1::3e0/123\",\r\n \"2603:1030:f:2::4c0/123\",\r\n + \ \"2603:1030:104::7a0/124\",\r\n \"2603:1030:504:2::a0/123\",\r\n + \ \"2603:1030:608:3::650/124\",\r\n \"2603:1040:207:1::4c0/124\",\r\n + \ \"2603:1040:a06:2::2a0/123\",\r\n \"2603:1040:d04:1::720/123\",\r\n + \ \"2603:1040:f05::7a0/123\",\r\n \"2603:1040:1002:1::80/124\",\r\n + \ \"2603:1040:1104:1::420/123\",\r\n \"2603:1040:1104:400::420/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureBackup\",\r\n + \ \"id\": \"AzureBackup\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"8\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureBackup\",\r\n \"addressPrefixes\": + [\r\n \"13.66.140.192/26\",\r\n \"13.66.141.0/27\",\r\n + \ \"13.67.12.0/24\",\r\n \"13.67.13.0/25\",\r\n \"13.69.65.32/27\",\r\n + \ \"13.69.65.128/25\",\r\n \"13.69.107.0/27\",\r\n \"13.69.107.128/25\",\r\n + \ \"13.69.228.128/25\",\r\n \"13.69.229.0/27\",\r\n \"13.70.73.192/27\",\r\n + \ \"13.70.74.0/26\",\r\n \"13.71.172.0/26\",\r\n \"13.71.172.64/27\",\r\n + \ \"13.71.195.64/26\",\r\n \"13.71.195.128/27\",\r\n \"13.74.107.192/27\",\r\n + \ \"13.74.108.0/25\",\r\n \"13.75.36.128/25\",\r\n \"13.75.37.0/24\",\r\n + \ \"13.77.52.32/27\",\r\n \"13.77.52.64/26\",\r\n \"13.78.108.32/27\",\r\n + \ \"13.78.108.64/26\",\r\n \"13.86.218.0/25\",\r\n \"13.86.218.128/26\",\r\n + \ \"13.87.57.0/26\",\r\n \"13.87.57.64/27\",\r\n \"13.87.123.0/26\",\r\n + \ \"13.87.123.64/27\",\r\n \"13.89.171.128/26\",\r\n \"13.89.171.192/27\",\r\n + \ \"20.21.36.128/26\",\r\n \"20.21.43.64/26\",\r\n \"20.21.67.0/26\",\r\n + \ \"20.21.75.0/26\",\r\n \"20.36.107.32/27\",\r\n \"20.36.107.64/26\",\r\n + \ \"20.36.114.224/27\",\r\n \"20.36.115.0/26\",\r\n \"20.37.75.0/26\",\r\n + \ \"20.37.75.64/27\",\r\n \"20.38.147.0/27\",\r\n \"20.38.147.64/26\",\r\n + \ \"20.40.229.128/25\",\r\n \"20.44.3.64/26\",\r\n \"20.44.3.128/27\",\r\n + \ \"20.44.8.32/27\",\r\n \"20.44.8.64/26\",\r\n \"20.44.16.128/27\",\r\n + \ \"20.44.16.192/26\",\r\n \"20.44.27.128/27\",\r\n \"20.44.31.192/26\",\r\n + \ \"20.45.90.0/26\",\r\n \"20.45.123.0/26\",\r\n \"20.45.123.64/28\",\r\n + \ \"20.45.125.192/27\",\r\n \"20.46.12.0/25\",\r\n \"20.48.197.0/26\",\r\n + \ \"20.49.82.192/26\",\r\n \"20.49.83.0/27\",\r\n \"20.49.90.192/26\",\r\n + \ \"20.49.91.0/27\",\r\n \"20.51.0.0/26\",\r\n \"20.51.12.128/26\",\r\n + \ \"20.51.20.128/25\",\r\n \"20.52.88.0/26\",\r\n \"20.53.47.128/26\",\r\n + \ \"20.53.49.0/26\",\r\n \"20.53.56.192/26\",\r\n \"20.58.67.128/25\",\r\n + \ \"20.61.102.128/25\",\r\n \"20.61.103.0/26\",\r\n \"20.62.59.128/25\",\r\n + \ \"20.62.133.128/25\",\r\n \"20.62.134.0/26\",\r\n \"20.65.133.128/26\",\r\n + \ \"20.66.4.0/25\",\r\n \"20.66.4.128/26\",\r\n \"20.69.1.0/26\",\r\n + \ \"20.72.27.64/26\",\r\n \"20.99.9.128/26\",\r\n \"20.150.171.96/27\",\r\n + \ \"20.150.171.128/26\",\r\n \"20.150.179.80/28\",\r\n \"20.150.179.128/26\",\r\n + \ \"20.150.181.64/27\",\r\n \"20.150.187.80/28\",\r\n \"20.150.187.128/26\",\r\n + \ \"20.150.190.0/27\",\r\n \"20.150.244.64/26\",\r\n \"20.189.228.64/26\",\r\n + \ \"20.191.166.128/26\",\r\n \"20.192.44.128/26\",\r\n \"20.192.50.128/26\",\r\n + \ \"20.192.80.64/26\",\r\n \"20.192.99.80/28\",\r\n \"20.192.99.128/26\",\r\n + \ \"20.192.235.32/27\",\r\n \"20.192.235.64/26\",\r\n \"20.193.192.192/26\",\r\n + \ \"20.193.203.0/26\",\r\n \"20.193.203.64/27\",\r\n \"20.194.66.192/26\",\r\n + \ \"20.194.67.0/27\",\r\n \"20.194.74.0/26\",\r\n \"20.195.66.0/24\",\r\n + \ \"20.195.67.0/25\",\r\n \"20.195.73.0/24\",\r\n \"20.195.74.0/25\",\r\n + \ \"20.195.146.128/26\",\r\n \"20.205.74.96/27\",\r\n \"20.205.75.0/26\",\r\n + \ \"20.205.82.96/27\",\r\n \"20.205.83.0/26\",\r\n \"20.208.19.0/26\",\r\n + \ \"23.98.83.0/27\",\r\n \"23.98.83.128/25\",\r\n \"23.98.84.0/24\",\r\n + \ \"40.67.59.96/27\",\r\n \"40.67.59.128/26\",\r\n \"40.69.107.32/27\",\r\n + \ \"40.69.107.64/26\",\r\n \"40.70.147.128/26\",\r\n \"40.70.147.192/27\",\r\n + \ \"40.71.12.0/25\",\r\n \"40.71.12.128/26\",\r\n \"40.74.98.64/26\",\r\n + \ \"40.74.98.128/27\",\r\n \"40.74.146.96/27\",\r\n \"40.74.146.128/26\",\r\n + \ \"40.75.34.96/27\",\r\n \"40.75.34.192/26\",\r\n \"40.78.195.32/27\",\r\n + \ \"40.78.195.64/26\",\r\n \"40.78.202.160/27\",\r\n \"40.78.202.192/26\",\r\n + \ \"40.78.227.64/26\",\r\n \"40.78.227.128/25\",\r\n \"40.78.234.192/27\",\r\n + \ \"40.78.235.0/24\",\r\n \"40.78.236.0/25\",\r\n \"40.78.243.32/27\",\r\n + \ \"40.78.243.64/26\",\r\n \"40.78.250.224/27\",\r\n \"40.78.251.0/26\",\r\n + \ \"40.79.131.0/26\",\r\n \"40.79.131.64/27\",\r\n \"40.79.142.192/26\",\r\n + \ \"40.79.150.0/26\",\r\n \"40.79.155.64/26\",\r\n \"40.79.155.128/25\",\r\n + \ \"40.79.162.128/27\",\r\n \"40.79.162.192/26\",\r\n \"40.79.170.64/26\",\r\n + \ \"40.79.170.128/27\",\r\n \"40.79.171.32/27\",\r\n \"40.79.179.32/27\",\r\n + \ \"40.79.179.64/26\",\r\n \"40.79.187.32/27\",\r\n \"40.79.187.64/26\",\r\n + \ \"40.79.195.32/27\",\r\n \"40.79.195.64/26\",\r\n \"40.80.51.0/27\",\r\n + \ \"40.80.53.192/26\",\r\n \"40.120.74.192/26\",\r\n \"40.120.75.0/27\",\r\n + \ \"40.120.82.0/26\",\r\n \"51.12.17.64/26\",\r\n \"51.12.25.128/26\",\r\n + \ \"51.12.99.96/27\",\r\n \"51.12.99.128/26\",\r\n \"51.12.203.96/27\",\r\n + \ \"51.12.203.128/26\",\r\n \"51.12.227.80/28\",\r\n \"51.12.227.128/26\",\r\n + \ \"51.12.235.80/28\",\r\n \"51.12.235.128/26\",\r\n \"51.13.137.128/26\",\r\n + \ \"51.103.203.0/26\",\r\n \"51.105.67.32/27\",\r\n \"51.105.67.64/26\",\r\n + \ \"51.105.75.0/27\",\r\n \"51.105.75.64/26\",\r\n \"51.107.59.64/26\",\r\n + \ \"51.107.59.128/27\",\r\n \"51.107.155.64/26\",\r\n \"51.107.155.128/27\",\r\n + \ \"51.107.243.0/26\",\r\n \"51.107.251.0/26\",\r\n \"51.116.55.0/26\",\r\n + \ \"51.116.59.64/26\",\r\n \"51.116.59.128/27\",\r\n \"51.116.155.128/26\",\r\n + \ \"51.116.155.192/27\",\r\n \"51.116.156.144/28\",\r\n \"51.116.156.192/26\",\r\n + \ \"51.116.245.0/26\",\r\n \"51.116.245.64/27\",\r\n \"51.116.250.240/28\",\r\n + \ \"51.116.251.64/26\",\r\n \"51.116.253.0/27\",\r\n \"51.120.99.96/27\",\r\n + \ \"51.120.99.128/26\",\r\n \"51.120.107.80/28\",\r\n \"51.120.107.128/26\",\r\n + \ \"51.120.110.128/27\",\r\n \"51.120.211.80/28\",\r\n \"51.120.211.128/26\",\r\n + \ \"51.120.214.64/27\",\r\n \"51.120.219.96/27\",\r\n \"51.120.219.128/26\",\r\n + \ \"51.120.233.192/26\",\r\n \"51.138.210.192/26\",\r\n \"51.140.148.64/26\",\r\n + \ \"51.140.148.128/27\",\r\n \"51.140.211.32/27\",\r\n \"51.140.211.64/26\",\r\n + \ \"51.143.212.192/26\",\r\n \"51.143.213.0/25\",\r\n \"52.136.185.192/26\",\r\n + \ \"52.138.90.160/27\",\r\n \"52.138.90.192/26\",\r\n \"52.138.226.192/27\",\r\n + \ \"52.138.227.0/25\",\r\n \"52.139.107.128/26\",\r\n \"52.146.136.64/26\",\r\n + \ \"52.146.136.128/25\",\r\n \"52.147.113.0/26\",\r\n \"52.162.107.192/26\",\r\n + \ \"52.162.110.0/27\",\r\n \"52.167.106.192/27\",\r\n \"52.167.107.0/26\",\r\n + \ \"52.172.116.64/26\",\r\n \"52.182.139.64/27\",\r\n \"52.182.139.128/26\",\r\n + \ \"52.231.19.0/26\",\r\n \"52.231.19.64/27\",\r\n \"52.231.147.32/27\",\r\n + \ \"52.231.147.64/26\",\r\n \"52.236.187.0/27\",\r\n \"52.236.187.128/25\",\r\n + \ \"52.246.155.0/27\",\r\n \"52.246.155.64/26\",\r\n \"65.52.251.0/26\",\r\n + \ \"65.52.251.64/27\",\r\n \"102.37.81.0/26\",\r\n \"102.37.160.192/26\",\r\n + \ \"102.133.27.64/26\",\r\n \"102.133.27.128/27\",\r\n \"102.133.123.96/27\",\r\n + \ \"102.133.155.64/26\",\r\n \"102.133.155.128/27\",\r\n + \ \"102.133.251.0/27\",\r\n \"102.133.254.128/26\",\r\n \"104.46.183.64/26\",\r\n + \ \"104.211.82.0/26\",\r\n \"104.211.82.64/27\",\r\n \"104.211.147.0/26\",\r\n + \ \"104.211.147.64/27\",\r\n \"104.214.19.96/27\",\r\n \"104.214.19.128/26\",\r\n + \ \"104.214.165.96/27\",\r\n \"104.214.165.192/26\",\r\n + \ \"191.233.50.224/27\",\r\n \"191.233.51.64/26\",\r\n \"191.233.204.0/26\",\r\n + \ \"191.233.204.64/27\",\r\n \"191.234.147.80/28\",\r\n \"191.234.147.128/26\",\r\n + \ \"191.234.149.160/27\",\r\n \"191.234.155.80/28\",\r\n + \ \"191.234.155.128/26\",\r\n \"191.234.157.64/27\",\r\n + \ \"191.238.72.0/26\",\r\n \"2603:1000:4:402::200/121\",\r\n + \ \"2603:1000:104:402::200/121\",\r\n \"2603:1000:104:802::180/121\",\r\n + \ \"2603:1000:104:c02::180/121\",\r\n \"2603:1010:6:402::200/121\",\r\n + \ \"2603:1010:6:802::180/121\",\r\n \"2603:1010:6:c02::180/121\",\r\n + \ \"2603:1010:101:402::200/121\",\r\n \"2603:1010:304:402::200/121\",\r\n + \ \"2603:1010:404:402::200/121\",\r\n \"2603:1020:5:402::200/121\",\r\n + \ \"2603:1020:5:802::180/121\",\r\n \"2603:1020:5:c02::180/121\",\r\n + \ \"2603:1020:206:402::200/121\",\r\n \"2603:1020:206:802::180/121\",\r\n + \ \"2603:1020:206:c02::180/121\",\r\n \"2603:1020:305:402::200/121\",\r\n + \ \"2603:1020:405:402::200/121\",\r\n \"2603:1020:605:402::200/121\",\r\n + \ \"2603:1020:705:402::200/121\",\r\n \"2603:1020:705:802::180/121\",\r\n + \ \"2603:1020:705:c02::180/121\",\r\n \"2603:1020:805:402::200/121\",\r\n + \ \"2603:1020:805:802::180/121\",\r\n \"2603:1020:805:c02::180/121\",\r\n + \ \"2603:1020:905:402::200/121\",\r\n \"2603:1020:a04:2::600/121\",\r\n + \ \"2603:1020:a04:402::200/121\",\r\n \"2603:1020:a04:802::180/121\",\r\n + \ \"2603:1020:a04:c02::180/121\",\r\n \"2603:1020:b04:402::200/121\",\r\n + \ \"2603:1020:c04:402::200/121\",\r\n \"2603:1020:c04:802::180/121\",\r\n + \ \"2603:1020:c04:c02::180/121\",\r\n \"2603:1020:d04:402::200/121\",\r\n + \ \"2603:1020:e04:3::200/121\",\r\n \"2603:1020:e04:402::200/121\",\r\n + \ \"2603:1020:e04:802::180/121\",\r\n \"2603:1020:e04:c02::180/121\",\r\n + \ \"2603:1020:f04:402::200/121\",\r\n \"2603:1020:1004:1::780/121\",\r\n + \ \"2603:1020:1004:400::100/121\",\r\n \"2603:1020:1004:400::300/121\",\r\n + \ \"2603:1020:1004:800::480/121\",\r\n \"2603:1020:1004:c02::200/121\",\r\n + \ \"2603:1020:1104:1::400/121\",\r\n \"2603:1020:1104:400::200/121\",\r\n + \ \"2603:1030:f:2::580/121\",\r\n \"2603:1030:f:400::a00/121\",\r\n + \ \"2603:1030:10:402::200/121\",\r\n \"2603:1030:10:802::180/121\",\r\n + \ \"2603:1030:10:c02::180/121\",\r\n \"2603:1030:104:402::200/121\",\r\n + \ \"2603:1030:104:402::680/121\",\r\n \"2603:1030:104:802::100/121\",\r\n + \ \"2603:1030:107:400::180/121\",\r\n \"2603:1030:210:402::200/121\",\r\n + \ \"2603:1030:210:802::180/121\",\r\n \"2603:1030:210:c02::180/121\",\r\n + \ \"2603:1030:40b:400::a00/121\",\r\n \"2603:1030:40b:800::180/121\",\r\n + \ \"2603:1030:40b:c00::180/121\",\r\n \"2603:1030:40c:402::200/121\",\r\n + \ \"2603:1030:40c:802::180/121\",\r\n \"2603:1030:40c:c02::180/121\",\r\n + \ \"2603:1030:504:2::100/121\",\r\n \"2603:1030:504:402::100/121\",\r\n + \ \"2603:1030:504:402::300/121\",\r\n \"2603:1030:504:802::280/121\",\r\n + \ \"2603:1030:504:c02::200/121\",\r\n \"2603:1030:608:3::700/121\",\r\n + \ \"2603:1030:608:402::200/121\",\r\n \"2603:1030:807:402::200/121\",\r\n + \ \"2603:1030:807:802::180/121\",\r\n \"2603:1030:807:c02::180/121\",\r\n + \ \"2603:1030:a07:402::180/121\",\r\n \"2603:1030:b04:402::200/121\",\r\n + \ \"2603:1030:c06:400::a00/121\",\r\n \"2603:1030:c06:802::180/121\",\r\n + \ \"2603:1030:c06:c02::180/121\",\r\n \"2603:1030:f05:402::200/121\",\r\n + \ \"2603:1030:f05:802::180/121\",\r\n \"2603:1030:f05:c02::180/121\",\r\n + \ \"2603:1030:1005:402::200/121\",\r\n \"2603:1040:5:402::200/121\",\r\n + \ \"2603:1040:5:802::180/121\",\r\n \"2603:1040:5:c02::180/121\",\r\n + \ \"2603:1040:207:1::580/121\",\r\n \"2603:1040:207:402::200/121\",\r\n + \ \"2603:1040:207:800::100/121\",\r\n \"2603:1040:207:c00::100/121\",\r\n + \ \"2603:1040:407:402::200/121\",\r\n \"2603:1040:407:802::180/121\",\r\n + \ \"2603:1040:407:c02::180/121\",\r\n \"2603:1040:606:402::200/121\",\r\n + \ \"2603:1040:806:402::200/121\",\r\n \"2603:1040:904:402::200/121\",\r\n + \ \"2603:1040:904:802::180/121\",\r\n \"2603:1040:904:c02::180/121\",\r\n + \ \"2603:1040:a06:2::300/121\",\r\n \"2603:1040:a06:402::200/121\",\r\n + \ \"2603:1040:a06:802::180/121\",\r\n \"2603:1040:a06:c02::180/121\",\r\n + \ \"2603:1040:b04:402::200/121\",\r\n \"2603:1040:c06:402::200/121\",\r\n + \ \"2603:1040:d04:1::780/121\",\r\n \"2603:1040:d04:400::100/121\",\r\n + \ \"2603:1040:d04:400::300/121\",\r\n \"2603:1040:d04:c02::200/121\",\r\n + \ \"2603:1040:f05:2::/121\",\r\n \"2603:1040:f05:402::200/121\",\r\n + \ \"2603:1040:f05:802::180/121\",\r\n \"2603:1040:f05:c02::180/121\",\r\n + \ \"2603:1040:1002:1::100/121\",\r\n \"2603:1040:1002:400::100/121\",\r\n + \ \"2603:1040:1002:800::100/121\",\r\n \"2603:1040:1002:c00::100/121\",\r\n + \ \"2603:1040:1104:1::480/121\",\r\n \"2603:1040:1104:400::200/121\",\r\n + \ \"2603:1050:6:402::200/121\",\r\n \"2603:1050:6:802::180/121\",\r\n + \ \"2603:1050:6:c02::180/121\",\r\n \"2603:1050:403:400::500/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureBotService\",\r\n + \ \"id\": \"AzureBotService\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureBotService\",\r\n \"addressPrefixes\": + [\r\n \"13.66.142.64/30\",\r\n \"13.67.10.88/30\",\r\n \"13.69.67.56/30\",\r\n + \ \"13.69.227.252/30\",\r\n \"13.70.74.112/30\",\r\n \"13.71.173.240/30\",\r\n + \ \"13.71.196.160/30\",\r\n \"13.73.248.0/30\",\r\n \"13.75.39.72/30\",\r\n + \ \"13.77.53.80/30\",\r\n \"13.78.108.172/30\",\r\n \"13.86.219.168/30\",\r\n + \ \"13.87.58.40/30\",\r\n \"13.87.124.40/30\",\r\n \"13.89.171.116/30\",\r\n + \ \"20.21.32.16/30\",\r\n \"20.36.108.112/30\",\r\n \"20.36.115.240/30\",\r\n + \ \"20.36.120.64/30\",\r\n \"20.37.64.64/30\",\r\n \"20.37.76.104/30\",\r\n + \ \"20.37.152.64/30\",\r\n \"20.37.192.64/30\",\r\n \"20.37.224.64/30\",\r\n + \ \"20.38.80.64/30\",\r\n \"20.38.128.72/30\",\r\n \"20.38.136.64/30\",\r\n + \ \"20.39.8.64/30\",\r\n \"20.41.0.64/30\",\r\n \"20.41.64.64/30\",\r\n + \ \"20.41.192.64/30\",\r\n \"20.42.0.64/30\",\r\n \"20.42.128.64/30\",\r\n + \ \"20.42.224.64/30\",\r\n \"20.43.40.64/30\",\r\n \"20.43.64.64/30\",\r\n + \ \"20.43.121.8/30\",\r\n \"20.43.128.64/30\",\r\n \"20.44.4.72/30\",\r\n + \ \"20.44.17.24/30\",\r\n \"20.44.27.208/30\",\r\n \"20.45.112.64/30\",\r\n + \ \"20.45.123.112/30\",\r\n \"20.45.192.64/30\",\r\n \"20.72.16.16/30\",\r\n + \ \"20.150.160.120/30\",\r\n \"20.189.104.64/30\",\r\n \"20.192.160.16/30\",\r\n + \ \"20.192.224.64/26\",\r\n \"40.67.48.64/30\",\r\n \"40.67.58.4/30\",\r\n + \ \"40.69.108.56/30\",\r\n \"40.71.12.244/30\",\r\n \"40.74.24.64/30\",\r\n + \ \"40.74.147.168/30\",\r\n \"40.78.196.56/30\",\r\n \"40.78.202.132/30\",\r\n + \ \"40.79.132.56/30\",\r\n \"40.79.180.24/30\",\r\n \"40.80.56.64/30\",\r\n + \ \"40.80.168.64/30\",\r\n \"40.80.176.32/30\",\r\n \"40.80.184.64/30\",\r\n + \ \"40.82.248.64/30\",\r\n \"40.89.16.64/30\",\r\n \"51.12.40.64/26\",\r\n + \ \"51.12.192.64/26\",\r\n \"51.104.8.248/30\",\r\n \"51.104.24.64/30\",\r\n + \ \"51.105.80.64/30\",\r\n \"51.105.88.64/30\",\r\n \"51.107.48.64/30\",\r\n + \ \"51.107.58.4/30\",\r\n \"51.107.144.64/30\",\r\n \"51.107.154.4/30\",\r\n + \ \"51.116.48.64/30\",\r\n \"51.116.144.64/30\",\r\n \"51.120.40.64/30\",\r\n + \ \"51.120.98.12/30\",\r\n \"51.120.218.4/30\",\r\n \"51.120.224.64/30\",\r\n + \ \"51.137.160.64/30\",\r\n \"51.140.212.72/30\",\r\n \"51.143.192.64/30\",\r\n + \ \"52.136.48.64/30\",\r\n \"52.140.104.64/30\",\r\n \"52.150.136.64/30\",\r\n + \ \"52.162.111.16/30\",\r\n \"52.228.80.64/30\",\r\n \"52.231.148.88/30\",\r\n + \ \"65.52.252.104/30\",\r\n \"102.133.28.88/30\",\r\n \"102.133.56.64/30\",\r\n + \ \"102.133.124.8/30\",\r\n \"102.133.216.64/30\",\r\n \"191.233.8.16/30\",\r\n + \ \"191.233.205.96/30\",\r\n \"191.235.224.64/30\",\r\n \"2603:1000:4::20/123\",\r\n + \ \"2603:1000:104:1::20/123\",\r\n \"2603:1010:6:1::20/123\",\r\n + \ \"2603:1010:101::20/123\",\r\n \"2603:1010:304::20/123\",\r\n + \ \"2603:1010:404::20/123\",\r\n \"2603:1020:5:1::20/123\",\r\n + \ \"2603:1020:206:1::20/123\",\r\n \"2603:1020:305::20/123\",\r\n + \ \"2603:1020:405::20/123\",\r\n \"2603:1020:605::20/123\",\r\n + \ \"2603:1020:705:1::20/123\",\r\n \"2603:1020:805:1::20/123\",\r\n + \ \"2603:1020:905::20/123\",\r\n \"2603:1020:a04:1::20/123\",\r\n + \ \"2603:1020:b04::20/123\",\r\n \"2603:1020:c04:1::20/123\",\r\n + \ \"2603:1020:d04::20/123\",\r\n \"2603:1020:e04:1::20/123\",\r\n + \ \"2603:1020:f04::20/123\",\r\n \"2603:1020:1004::20/123\",\r\n + \ \"2603:1020:1104::20/123\",\r\n \"2603:1030:f:1::20/123\",\r\n + \ \"2603:1030:10:1::20/123\",\r\n \"2603:1030:104:1::20/123\",\r\n + \ \"2603:1030:107::20/123\",\r\n \"2603:1030:210:1::20/123\",\r\n + \ \"2603:1030:40b:1::20/123\",\r\n \"2603:1030:40c:1::20/123\",\r\n + \ \"2603:1030:504:1::20/123\",\r\n \"2603:1030:608::20/123\",\r\n + \ \"2603:1030:807:1::20/123\",\r\n \"2603:1030:a07::20/123\",\r\n + \ \"2603:1030:b04::20/123\",\r\n \"2603:1030:c06:1::20/123\",\r\n + \ \"2603:1030:f05:1::20/123\",\r\n \"2603:1030:1005::20/123\",\r\n + \ \"2603:1040:5:1::20/123\",\r\n \"2603:1040:207::20/123\",\r\n + \ \"2603:1040:407:1::20/123\",\r\n \"2603:1040:606::20/123\",\r\n + \ \"2603:1040:806::20/123\",\r\n \"2603:1040:904:1::20/123\",\r\n + \ \"2603:1040:a06:1::20/123\",\r\n \"2603:1040:b04::20/123\",\r\n + \ \"2603:1040:c06::20/123\",\r\n \"2603:1040:d04::20/123\",\r\n + \ \"2603:1040:f05:1::20/123\",\r\n \"2603:1040:1002::60/123\",\r\n + \ \"2603:1040:1104::20/123\",\r\n \"2603:1050:6:1::20/123\",\r\n + \ \"2603:1050:403::20/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCloud\",\r\n \"id\": \"AzureCloud\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"8\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.64.0.0/16\",\r\n + \ \"13.65.0.0/16\",\r\n \"13.66.0.0/17\",\r\n \"13.66.128.0/17\",\r\n + \ \"13.67.0.0/17\",\r\n \"13.67.128.0/20\",\r\n \"13.67.144.0/21\",\r\n + \ \"13.67.152.0/24\",\r\n \"13.67.153.0/28\",\r\n \"13.67.153.16/28\",\r\n + \ \"13.67.153.32/27\",\r\n \"13.67.153.64/26\",\r\n \"13.67.153.128/25\",\r\n + \ \"13.67.154.0/24\",\r\n \"13.67.155.0/24\",\r\n \"13.67.156.0/22\",\r\n + \ \"13.67.160.0/19\",\r\n \"13.67.192.0/18\",\r\n \"13.68.0.0/17\",\r\n + \ \"13.68.128.0/17\",\r\n \"13.69.0.0/17\",\r\n \"13.69.128.0/17\",\r\n + \ \"13.70.0.0/18\",\r\n \"13.70.64.0/18\",\r\n \"13.70.128.0/18\",\r\n + \ \"13.70.192.0/18\",\r\n \"13.71.0.0/18\",\r\n \"13.71.64.0/18\",\r\n + \ \"13.71.128.0/19\",\r\n \"13.71.160.0/19\",\r\n \"13.71.192.0/18\",\r\n + \ \"13.72.64.0/18\",\r\n \"13.72.192.0/19\",\r\n \"13.72.224.0/19\",\r\n + \ \"13.73.0.0/19\",\r\n \"13.73.32.0/19\",\r\n \"13.73.96.0/19\",\r\n + \ \"13.73.128.0/18\",\r\n \"13.73.192.0/20\",\r\n \"13.73.224.0/21\",\r\n + \ \"13.73.232.0/21\",\r\n \"13.73.240.0/20\",\r\n \"13.74.0.0/16\",\r\n + \ \"13.75.0.0/17\",\r\n \"13.75.128.0/17\",\r\n \"13.76.0.0/16\",\r\n + \ \"13.77.0.0/18\",\r\n \"13.77.64.0/18\",\r\n \"13.77.128.0/18\",\r\n + \ \"13.77.192.0/19\",\r\n \"13.78.0.0/17\",\r\n \"13.78.128.0/17\",\r\n + \ \"13.79.0.0/16\",\r\n \"13.80.0.0/15\",\r\n \"13.82.0.0/16\",\r\n + \ \"13.83.0.0/16\",\r\n \"13.84.0.0/15\",\r\n \"13.86.0.0/17\",\r\n + \ \"13.86.128.0/17\",\r\n \"13.87.0.0/18\",\r\n \"13.87.64.0/18\",\r\n + \ \"13.87.128.0/17\",\r\n \"13.88.0.0/17\",\r\n \"13.88.128.0/18\",\r\n + \ \"13.88.200.0/21\",\r\n \"13.88.208.0/20\",\r\n \"13.88.224.0/19\",\r\n + \ \"13.89.0.0/16\",\r\n \"13.90.0.0/16\",\r\n \"13.91.0.0/16\",\r\n + \ \"13.92.0.0/16\",\r\n \"13.93.0.0/17\",\r\n \"13.93.128.0/17\",\r\n + \ \"13.94.0.0/18\",\r\n \"13.94.64.0/18\",\r\n \"13.94.128.0/17\",\r\n + \ \"13.95.0.0/16\",\r\n \"13.104.129.0/26\",\r\n \"13.104.129.64/26\",\r\n + \ \"13.104.129.128/26\",\r\n \"13.104.129.192/26\",\r\n \"13.104.144.0/27\",\r\n + \ \"13.104.144.32/27\",\r\n \"13.104.144.64/27\",\r\n \"13.104.144.96/27\",\r\n + \ \"13.104.144.128/27\",\r\n \"13.104.144.160/27\",\r\n \"13.104.144.192/27\",\r\n + \ \"13.104.144.224/27\",\r\n \"13.104.145.0/26\",\r\n \"13.104.145.64/26\",\r\n + \ \"13.104.145.128/27\",\r\n \"13.104.145.160/27\",\r\n \"13.104.145.192/26\",\r\n + \ \"13.104.146.0/26\",\r\n \"13.104.146.64/26\",\r\n \"13.104.146.128/25\",\r\n + \ \"13.104.147.0/25\",\r\n \"13.104.147.128/25\",\r\n \"13.104.148.0/25\",\r\n + \ \"13.104.148.128/25\",\r\n \"13.104.149.0/26\",\r\n \"13.104.149.64/26\",\r\n + \ \"13.104.149.128/25\",\r\n \"13.104.150.0/25\",\r\n \"13.104.150.128/26\",\r\n + \ \"13.104.150.192/26\",\r\n \"13.104.151.0/26\",\r\n \"13.104.151.64/26\",\r\n + \ \"13.104.151.128/26\",\r\n \"13.104.151.192/26\",\r\n \"13.104.152.0/25\",\r\n + \ \"13.104.152.128/25\",\r\n \"13.104.153.0/27\",\r\n \"13.104.153.32/28\",\r\n + \ \"13.104.153.48/28\",\r\n \"13.104.153.64/27\",\r\n \"13.104.153.96/27\",\r\n + \ \"13.104.153.128/26\",\r\n \"13.104.153.192/26\",\r\n \"13.104.154.0/25\",\r\n + \ \"13.104.154.128/25\",\r\n \"13.104.155.0/27\",\r\n \"13.104.155.32/27\",\r\n + \ \"13.104.155.64/26\",\r\n \"13.104.155.128/26\",\r\n \"13.104.155.192/26\",\r\n + \ \"13.104.156.0/24\",\r\n \"13.104.157.0/25\",\r\n \"13.104.157.128/25\",\r\n + \ \"13.104.158.0/28\",\r\n \"13.104.158.16/28\",\r\n \"13.104.158.32/27\",\r\n + \ \"13.104.158.64/26\",\r\n \"13.104.158.128/27\",\r\n \"13.104.158.160/28\",\r\n + \ \"13.104.158.176/28\",\r\n \"13.104.158.192/27\",\r\n \"13.104.158.224/27\",\r\n + \ \"13.104.159.0/25\",\r\n \"13.104.159.128/26\",\r\n \"13.104.159.192/26\",\r\n + \ \"13.104.192.0/21\",\r\n \"13.104.208.0/26\",\r\n \"13.104.208.64/27\",\r\n + \ \"13.104.208.96/27\",\r\n \"13.104.208.128/27\",\r\n \"13.104.208.160/28\",\r\n + \ \"13.104.208.176/28\",\r\n \"13.104.208.192/26\",\r\n \"13.104.209.0/24\",\r\n + \ \"13.104.210.0/24\",\r\n \"13.104.211.0/25\",\r\n \"13.104.211.128/26\",\r\n + \ \"13.104.211.192/26\",\r\n \"13.104.212.0/26\",\r\n \"13.104.212.64/26\",\r\n + \ \"13.104.212.128/26\",\r\n \"13.104.212.192/26\",\r\n \"13.104.213.0/25\",\r\n + \ \"13.104.213.128/25\",\r\n \"13.104.214.0/25\",\r\n \"13.104.214.128/25\",\r\n + \ \"13.104.215.0/25\",\r\n \"13.104.215.128/25\",\r\n \"13.104.216.0/24\",\r\n + \ \"13.104.217.0/25\",\r\n \"13.104.217.128/25\",\r\n \"13.104.218.0/25\",\r\n + \ \"13.104.218.128/25\",\r\n \"13.104.219.0/25\",\r\n \"13.104.219.128/25\",\r\n + \ \"13.104.220.0/25\",\r\n \"13.104.220.128/25\",\r\n \"13.104.221.0/24\",\r\n + \ \"13.104.222.0/24\",\r\n \"13.104.223.0/25\",\r\n \"13.104.223.128/26\",\r\n + \ \"13.104.223.192/26\",\r\n \"13.105.14.0/25\",\r\n \"13.105.14.128/26\",\r\n + \ \"13.105.14.192/26\",\r\n \"13.105.16.0/25\",\r\n \"13.105.16.128/26\",\r\n + \ \"13.105.16.192/26\",\r\n \"13.105.17.0/26\",\r\n \"13.105.17.64/26\",\r\n + \ \"13.105.17.128/26\",\r\n \"13.105.17.192/26\",\r\n \"13.105.18.0/26\",\r\n + \ \"13.105.18.64/26\",\r\n \"13.105.18.160/27\",\r\n \"13.105.18.192/26\",\r\n + \ \"13.105.19.0/25\",\r\n \"13.105.19.128/25\",\r\n \"13.105.20.0/25\",\r\n + \ \"13.105.20.128/26\",\r\n \"13.105.20.192/26\",\r\n \"13.105.21.0/24\",\r\n + \ \"13.105.22.0/24\",\r\n \"13.105.23.0/26\",\r\n \"13.105.23.64/26\",\r\n + \ \"13.105.23.128/25\",\r\n \"13.105.24.0/24\",\r\n \"13.105.25.0/24\",\r\n + \ \"13.105.26.0/24\",\r\n \"13.105.27.0/25\",\r\n \"13.105.27.128/27\",\r\n + \ \"13.105.27.160/27\",\r\n \"13.105.27.192/27\",\r\n \"13.105.27.224/27\",\r\n + \ \"13.105.28.0/28\",\r\n \"13.105.28.16/28\",\r\n \"13.105.28.32/28\",\r\n + \ \"13.105.28.48/28\",\r\n \"13.105.28.128/25\",\r\n \"13.105.29.0/25\",\r\n + \ \"13.105.29.128/25\",\r\n \"13.105.36.0/27\",\r\n \"13.105.36.32/28\",\r\n + \ \"13.105.36.48/28\",\r\n \"13.105.36.64/27\",\r\n \"13.105.36.96/27\",\r\n + \ \"13.105.36.128/26\",\r\n \"13.105.36.192/26\",\r\n \"13.105.37.0/26\",\r\n + \ \"13.105.37.64/26\",\r\n \"13.105.37.128/26\",\r\n \"13.105.37.192/26\",\r\n + \ \"13.105.52.0/27\",\r\n \"13.105.52.32/27\",\r\n \"13.105.52.64/28\",\r\n + \ \"13.105.52.80/28\",\r\n \"13.105.52.96/27\",\r\n \"13.105.52.128/26\",\r\n + \ \"13.105.52.192/26\",\r\n \"13.105.53.0/25\",\r\n \"13.105.53.128/26\",\r\n + \ \"13.105.53.192/26\",\r\n \"13.105.60.0/27\",\r\n \"13.105.60.32/28\",\r\n + \ \"13.105.60.48/28\",\r\n \"13.105.60.64/27\",\r\n \"13.105.60.96/27\",\r\n + \ \"13.105.60.128/27\",\r\n \"13.105.60.160/27\",\r\n \"13.105.60.192/26\",\r\n + \ \"13.105.61.0/28\",\r\n \"13.105.61.16/28\",\r\n \"13.105.61.32/27\",\r\n + \ \"13.105.61.64/26\",\r\n \"13.105.61.128/25\",\r\n \"13.105.66.0/27\",\r\n + \ \"13.105.66.32/27\",\r\n \"13.105.66.64/26\",\r\n \"13.105.66.128/28\",\r\n + \ \"13.105.66.144/28\",\r\n \"13.105.66.160/27\",\r\n \"13.105.66.192/26\",\r\n + \ \"13.105.67.0/25\",\r\n \"13.105.67.128/25\",\r\n \"13.105.74.0/27\",\r\n + \ \"13.105.74.32/28\",\r\n \"13.105.74.48/28\",\r\n \"13.105.74.64/27\",\r\n + \ \"13.105.74.96/27\",\r\n \"13.105.74.128/26\",\r\n \"13.105.74.192/26\",\r\n + \ \"13.105.75.0/27\",\r\n \"13.105.75.32/28\",\r\n \"13.105.75.48/28\",\r\n + \ \"13.105.75.64/27\",\r\n \"13.105.75.96/27\",\r\n \"13.105.75.128/27\",\r\n + \ \"13.105.75.160/27\",\r\n \"13.105.75.192/28\",\r\n \"13.105.75.208/28\",\r\n + \ \"13.105.75.224/27\",\r\n \"13.105.96.0/26\",\r\n \"13.105.96.64/27\",\r\n + \ \"13.105.96.96/28\",\r\n \"13.105.96.112/28\",\r\n \"13.105.96.128/25\",\r\n + \ \"13.105.97.0/27\",\r\n \"13.105.97.32/27\",\r\n \"13.105.97.64/27\",\r\n + \ \"13.105.97.96/27\",\r\n \"13.105.97.128/25\",\r\n \"13.105.98.0/27\",\r\n + \ \"13.105.98.32/28\",\r\n \"13.105.98.48/28\",\r\n \"13.105.98.64/27\",\r\n + \ \"13.105.98.96/27\",\r\n \"13.105.98.128/27\",\r\n \"13.105.98.160/27\",\r\n + \ \"13.105.98.192/28\",\r\n \"13.105.98.208/28\",\r\n \"13.105.98.224/27\",\r\n + \ \"13.105.99.0/26\",\r\n \"13.105.99.64/27\",\r\n \"13.105.99.96/28\",\r\n + \ \"13.105.99.112/28\",\r\n \"13.105.99.128/27\",\r\n \"13.105.99.160/27\",\r\n + \ \"13.105.99.192/26\",\r\n \"13.105.100.0/28\",\r\n \"13.105.100.16/28\",\r\n + \ \"13.105.100.32/27\",\r\n \"13.105.100.64/26\",\r\n \"13.105.100.128/27\",\r\n + \ \"13.105.100.160/28\",\r\n \"13.105.100.176/28\",\r\n \"13.105.100.192/27\",\r\n + \ \"13.105.100.224/27\",\r\n \"13.105.101.0/27\",\r\n \"13.105.101.32/28\",\r\n + \ \"13.105.101.48/28\",\r\n \"13.105.101.64/26\",\r\n \"20.21.0.0/17\",\r\n + \ \"20.21.128.0/20\",\r\n \"20.21.144.0/21\",\r\n \"20.36.0.0/19\",\r\n + \ \"20.36.32.0/19\",\r\n \"20.36.64.0/19\",\r\n \"20.36.96.0/21\",\r\n + \ \"20.36.104.0/21\",\r\n \"20.36.112.0/20\",\r\n \"20.36.128.0/17\",\r\n + \ \"20.37.0.0/18\",\r\n \"20.37.64.0/19\",\r\n \"20.37.96.0/19\",\r\n + \ \"20.37.128.0/18\",\r\n \"20.37.192.0/19\",\r\n \"20.37.224.0/19\",\r\n + \ \"20.38.0.0/20\",\r\n \"20.38.16.0/24\",\r\n \"20.38.32.0/20\",\r\n + \ \"20.38.64.0/19\",\r\n \"20.38.96.0/23\",\r\n \"20.38.98.0/24\",\r\n + \ \"20.38.99.0/24\",\r\n \"20.38.100.0/23\",\r\n \"20.38.102.0/23\",\r\n + \ \"20.38.104.0/23\",\r\n \"20.38.106.0/23\",\r\n \"20.38.108.0/23\",\r\n + \ \"20.38.110.0/23\",\r\n \"20.38.112.0/23\",\r\n \"20.38.114.0/25\",\r\n + \ \"20.38.114.128/25\",\r\n \"20.38.115.0/24\",\r\n \"20.38.116.0/23\",\r\n + \ \"20.38.118.0/24\",\r\n \"20.38.119.0/24\",\r\n \"20.38.120.0/24\",\r\n + \ \"20.38.121.0/25\",\r\n \"20.38.121.128/25\",\r\n \"20.38.122.0/23\",\r\n + \ \"20.38.124.0/23\",\r\n \"20.38.126.0/23\",\r\n \"20.38.128.0/21\",\r\n + \ \"20.38.136.0/21\",\r\n \"20.38.144.0/21\",\r\n \"20.38.152.0/21\",\r\n + \ \"20.38.160.0/20\",\r\n \"20.38.184.0/22\",\r\n \"20.38.188.0/22\",\r\n + \ \"20.38.196.0/22\",\r\n \"20.38.200.0/22\",\r\n \"20.38.208.0/22\",\r\n + \ \"20.39.0.0/19\",\r\n \"20.39.32.0/19\",\r\n \"20.39.64.0/21\",\r\n + \ \"20.39.72.0/21\",\r\n \"20.39.80.0/20\",\r\n \"20.39.96.0/19\",\r\n + \ \"20.39.128.0/20\",\r\n \"20.39.144.0/20\",\r\n \"20.39.160.0/21\",\r\n + \ \"20.39.168.0/21\",\r\n \"20.39.176.0/21\",\r\n \"20.39.184.0/21\",\r\n + \ \"20.39.192.0/20\",\r\n \"20.39.208.0/20\",\r\n \"20.39.224.0/21\",\r\n + \ \"20.39.232.0/21\",\r\n \"20.39.240.0/20\",\r\n \"20.40.0.0/21\",\r\n + \ \"20.40.8.0/21\",\r\n \"20.40.16.0/21\",\r\n \"20.40.24.0/21\",\r\n + \ \"20.40.32.0/21\",\r\n \"20.40.40.0/21\",\r\n \"20.40.48.0/20\",\r\n + \ \"20.40.64.0/20\",\r\n \"20.40.80.0/21\",\r\n \"20.40.88.0/21\",\r\n + \ \"20.40.96.0/21\",\r\n \"20.40.104.0/21\",\r\n \"20.40.112.0/21\",\r\n + \ \"20.40.120.0/21\",\r\n \"20.40.128.0/19\",\r\n \"20.40.160.0/20\",\r\n + \ \"20.40.176.0/20\",\r\n \"20.40.192.0/18\",\r\n \"20.41.0.0/18\",\r\n + \ \"20.41.64.0/18\",\r\n \"20.41.128.0/18\",\r\n \"20.41.192.0/18\",\r\n + \ \"20.42.0.0/17\",\r\n \"20.42.128.0/18\",\r\n \"20.42.192.0/19\",\r\n + \ \"20.42.224.0/19\",\r\n \"20.43.0.0/19\",\r\n \"20.43.32.0/19\",\r\n + \ \"20.43.64.0/19\",\r\n \"20.43.96.0/20\",\r\n \"20.43.112.0/21\",\r\n + \ \"20.43.120.0/21\",\r\n \"20.43.128.0/18\",\r\n \"20.43.192.0/18\",\r\n + \ \"20.44.0.0/21\",\r\n \"20.44.8.0/21\",\r\n \"20.44.16.0/21\",\r\n + \ \"20.44.24.0/21\",\r\n \"20.44.32.0/19\",\r\n \"20.44.64.0/18\",\r\n + \ \"20.44.128.0/18\",\r\n \"20.44.192.0/18\",\r\n \"20.45.0.0/18\",\r\n + \ \"20.45.64.0/19\",\r\n \"20.45.96.0/20\",\r\n \"20.45.112.0/21\",\r\n + \ \"20.45.120.0/21\",\r\n \"20.45.128.0/21\",\r\n \"20.45.136.0/21\",\r\n + \ \"20.45.144.0/20\",\r\n \"20.45.160.0/20\",\r\n \"20.45.176.0/20\",\r\n + \ \"20.45.192.0/18\",\r\n \"20.46.0.0/19\",\r\n \"20.46.32.0/19\",\r\n + \ \"20.46.64.0/19\",\r\n \"20.46.96.0/20\",\r\n \"20.46.112.0/20\",\r\n + \ \"20.46.128.0/20\",\r\n \"20.46.144.0/20\",\r\n \"20.46.160.0/19\",\r\n + \ \"20.46.192.0/21\",\r\n \"20.46.200.0/21\",\r\n \"20.46.208.0/20\",\r\n + \ \"20.46.224.0/19\",\r\n \"20.47.0.0/24\",\r\n \"20.47.1.0/24\",\r\n + \ \"20.47.2.0/24\",\r\n \"20.47.3.0/24\",\r\n \"20.47.4.0/24\",\r\n + \ \"20.47.5.0/24\",\r\n \"20.47.6.0/24\",\r\n \"20.47.7.0/24\",\r\n + \ \"20.47.8.0/24\",\r\n \"20.47.9.0/24\",\r\n \"20.47.10.0/24\",\r\n + \ \"20.47.11.0/24\",\r\n \"20.47.12.0/24\",\r\n \"20.47.13.0/24\",\r\n + \ \"20.47.14.0/24\",\r\n \"20.47.15.0/24\",\r\n \"20.47.16.0/23\",\r\n + \ \"20.47.18.0/23\",\r\n \"20.47.20.0/23\",\r\n \"20.47.22.0/23\",\r\n + \ \"20.47.24.0/23\",\r\n \"20.47.26.0/24\",\r\n \"20.47.27.0/24\",\r\n + \ \"20.47.28.0/24\",\r\n \"20.47.29.0/24\",\r\n \"20.47.30.0/24\",\r\n + \ \"20.47.31.0/24\",\r\n \"20.47.32.0/24\",\r\n \"20.47.33.0/24\",\r\n + \ \"20.47.34.0/24\",\r\n \"20.47.35.0/24\",\r\n \"20.47.36.0/24\",\r\n + \ \"20.47.37.0/24\",\r\n \"20.47.38.0/24\",\r\n \"20.47.39.0/24\",\r\n + \ \"20.47.40.0/24\",\r\n \"20.47.41.0/24\",\r\n \"20.47.42.0/24\",\r\n + \ \"20.47.43.0/24\",\r\n \"20.47.44.0/24\",\r\n \"20.47.45.0/24\",\r\n + \ \"20.47.46.0/24\",\r\n \"20.47.47.0/24\",\r\n \"20.47.48.0/24\",\r\n + \ \"20.47.49.0/24\",\r\n \"20.47.50.0/24\",\r\n \"20.47.51.0/24\",\r\n + \ \"20.47.52.0/24\",\r\n \"20.47.53.0/24\",\r\n \"20.47.54.0/24\",\r\n + \ \"20.47.55.0/24\",\r\n \"20.47.56.0/24\",\r\n \"20.47.57.0/24\",\r\n + \ \"20.47.58.0/23\",\r\n \"20.47.60.0/23\",\r\n \"20.47.62.0/23\",\r\n + \ \"20.47.64.0/24\",\r\n \"20.47.65.0/24\",\r\n \"20.47.66.0/24\",\r\n + \ \"20.47.67.0/24\",\r\n \"20.47.68.0/24\",\r\n \"20.47.69.0/24\",\r\n + \ \"20.47.70.0/24\",\r\n \"20.47.71.0/24\",\r\n \"20.47.72.0/23\",\r\n + \ \"20.47.74.0/23\",\r\n \"20.47.76.0/23\",\r\n \"20.47.78.0/23\",\r\n + \ \"20.47.80.0/23\",\r\n \"20.47.82.0/23\",\r\n \"20.47.84.0/23\",\r\n + \ \"20.47.86.0/24\",\r\n \"20.47.87.0/24\",\r\n \"20.47.88.0/24\",\r\n + \ \"20.47.89.0/24\",\r\n \"20.47.90.0/24\",\r\n \"20.47.91.0/24\",\r\n + \ \"20.47.92.0/24\",\r\n \"20.47.93.0/24\",\r\n \"20.47.94.0/24\",\r\n + \ \"20.47.95.0/24\",\r\n \"20.47.96.0/23\",\r\n \"20.47.98.0/24\",\r\n + \ \"20.47.99.0/24\",\r\n \"20.47.100.0/24\",\r\n \"20.47.101.0/24\",\r\n + \ \"20.47.102.0/24\",\r\n \"20.47.103.0/24\",\r\n \"20.47.104.0/24\",\r\n + \ \"20.47.105.0/24\",\r\n \"20.47.106.0/24\",\r\n \"20.47.107.0/24\",\r\n + \ \"20.47.108.0/23\",\r\n \"20.47.110.0/24\",\r\n \"20.47.111.0/24\",\r\n + \ \"20.47.112.0/24\",\r\n \"20.47.113.0/24\",\r\n \"20.47.114.0/24\",\r\n + \ \"20.47.115.0/24\",\r\n \"20.47.116.0/24\",\r\n \"20.47.117.0/24\",\r\n + \ \"20.47.118.0/24\",\r\n \"20.47.119.0/24\",\r\n \"20.47.120.0/23\",\r\n + \ \"20.47.122.0/23\",\r\n \"20.47.124.0/23\",\r\n \"20.47.126.0/23\",\r\n + \ \"20.47.128.0/17\",\r\n \"20.48.0.0/17\",\r\n \"20.48.128.0/18\",\r\n + \ \"20.48.192.0/20\",\r\n \"20.48.224.0/19\",\r\n \"20.49.0.0/18\",\r\n + \ \"20.49.64.0/20\",\r\n \"20.49.80.0/21\",\r\n \"20.49.88.0/21\",\r\n + \ \"20.49.96.0/21\",\r\n \"20.49.104.0/21\",\r\n \"20.49.112.0/21\",\r\n + \ \"20.49.120.0/21\",\r\n \"20.49.128.0/17\",\r\n \"20.50.0.0/18\",\r\n + \ \"20.50.64.0/20\",\r\n \"20.50.80.0/21\",\r\n \"20.50.96.0/19\",\r\n + \ \"20.50.128.0/17\",\r\n \"20.51.0.0/21\",\r\n \"20.51.8.0/21\",\r\n + \ \"20.51.16.0/21\",\r\n \"20.51.24.0/21\",\r\n \"20.51.32.0/19\",\r\n + \ \"20.51.64.0/18\",\r\n \"20.51.128.0/17\",\r\n \"20.52.0.0/18\",\r\n + \ \"20.52.64.0/21\",\r\n \"20.52.72.0/21\",\r\n \"20.52.80.0/27\",\r\n + \ \"20.52.80.32/27\",\r\n \"20.52.80.64/27\",\r\n \"20.52.88.0/21\",\r\n + \ \"20.52.96.0/19\",\r\n \"20.52.128.0/17\",\r\n \"20.53.0.0/19\",\r\n + \ \"20.53.32.0/28\",\r\n \"20.53.40.0/21\",\r\n \"20.53.48.0/21\",\r\n + \ \"20.53.56.0/21\",\r\n \"20.53.64.0/18\",\r\n \"20.53.128.0/17\",\r\n + \ \"20.54.0.0/17\",\r\n \"20.54.128.0/17\",\r\n \"20.55.0.0/17\",\r\n + \ \"20.55.128.0/18\",\r\n \"20.55.192.0/18\",\r\n \"20.56.0.0/16\",\r\n + \ \"20.57.0.0/17\",\r\n \"20.57.128.0/18\",\r\n \"20.57.192.0/19\",\r\n + \ \"20.57.224.0/19\",\r\n \"20.58.0.0/18\",\r\n \"20.58.64.0/18\",\r\n + \ \"20.58.128.0/18\",\r\n \"20.58.192.0/18\",\r\n \"20.59.0.0/18\",\r\n + \ \"20.59.64.0/18\",\r\n \"20.59.128.0/18\",\r\n \"20.59.192.0/18\",\r\n + \ \"20.60.0.0/24\",\r\n \"20.60.1.0/24\",\r\n \"20.60.2.0/23\",\r\n + \ \"20.60.4.0/24\",\r\n \"20.60.5.0/24\",\r\n \"20.60.6.0/23\",\r\n + \ \"20.60.8.0/24\",\r\n \"20.60.9.0/24\",\r\n \"20.60.10.0/24\",\r\n + \ \"20.60.11.0/24\",\r\n \"20.60.12.0/24\",\r\n \"20.60.13.0/24\",\r\n + \ \"20.60.14.0/24\",\r\n \"20.60.15.0/24\",\r\n \"20.60.16.0/24\",\r\n + \ \"20.60.17.0/24\",\r\n \"20.60.18.0/24\",\r\n \"20.60.19.0/24\",\r\n + \ \"20.60.20.0/24\",\r\n \"20.60.21.0/24\",\r\n \"20.60.22.0/23\",\r\n + \ \"20.60.24.0/23\",\r\n \"20.60.26.0/23\",\r\n \"20.60.28.0/23\",\r\n + \ \"20.60.30.0/23\",\r\n \"20.60.32.0/23\",\r\n \"20.60.34.0/23\",\r\n + \ \"20.60.36.0/23\",\r\n \"20.60.38.0/23\",\r\n \"20.60.40.0/23\",\r\n + \ \"20.60.42.0/23\",\r\n \"20.60.44.0/25\",\r\n \"20.60.46.0/23\",\r\n + \ \"20.60.48.0/22\",\r\n \"20.60.52.0/23\",\r\n \"20.60.54.0/23\",\r\n + \ \"20.60.56.0/22\",\r\n \"20.60.60.0/22\",\r\n \"20.60.64.0/22\",\r\n + \ \"20.60.68.0/22\",\r\n \"20.60.72.0/22\",\r\n \"20.60.76.0/23\",\r\n + \ \"20.60.78.0/23\",\r\n \"20.60.80.0/23\",\r\n \"20.60.82.0/23\",\r\n + \ \"20.60.84.0/23\",\r\n \"20.60.86.0/23\",\r\n \"20.60.88.0/22\",\r\n + \ \"20.60.128.0/23\",\r\n \"20.60.130.0/24\",\r\n \"20.60.131.0/24\",\r\n + \ \"20.60.132.0/23\",\r\n \"20.60.134.0/23\",\r\n \"20.60.136.0/24\",\r\n + \ \"20.60.138.0/23\",\r\n \"20.60.140.0/23\",\r\n \"20.60.142.0/23\",\r\n + \ \"20.60.144.0/23\",\r\n \"20.60.146.0/23\",\r\n \"20.60.148.0/23\",\r\n + \ \"20.60.150.0/23\",\r\n \"20.60.152.0/23\",\r\n \"20.60.154.0/23\",\r\n + \ \"20.60.156.0/23\",\r\n \"20.60.158.0/23\",\r\n \"20.60.160.0/23\",\r\n + \ \"20.60.162.0/23\",\r\n \"20.60.164.0/23\",\r\n \"20.60.166.0/23\",\r\n + \ \"20.60.168.0/23\",\r\n \"20.60.170.0/23\",\r\n \"20.60.172.0/23\",\r\n + \ \"20.60.174.0/23\",\r\n \"20.60.176.0/23\",\r\n \"20.60.178.0/23\",\r\n + \ \"20.60.180.0/23\",\r\n \"20.60.182.0/23\",\r\n \"20.60.184.0/23\",\r\n + \ \"20.60.186.0/23\",\r\n \"20.60.188.0/23\",\r\n \"20.60.190.0/23\",\r\n + \ \"20.60.192.0/23\",\r\n \"20.60.194.0/23\",\r\n \"20.60.196.0/23\",\r\n + \ \"20.60.198.0/23\",\r\n \"20.60.200.0/23\",\r\n \"20.60.202.0/23\",\r\n + \ \"20.60.204.0/23\",\r\n \"20.60.206.0/23\",\r\n \"20.60.208.0/23\",\r\n + \ \"20.60.210.0/23\",\r\n \"20.60.212.0/23\",\r\n \"20.60.214.0/23\",\r\n + \ \"20.60.216.0/23\",\r\n \"20.60.218.0/23\",\r\n \"20.60.220.0/23\",\r\n + \ \"20.60.222.0/23\",\r\n \"20.60.224.0/23\",\r\n \"20.60.226.0/23\",\r\n + \ \"20.60.228.0/23\",\r\n \"20.60.230.0/23\",\r\n \"20.60.232.0/23\",\r\n + \ \"20.60.234.0/23\",\r\n \"20.60.236.0/23\",\r\n \"20.60.238.0/23\",\r\n + \ \"20.60.240.0/23\",\r\n \"20.60.242.0/23\",\r\n \"20.60.244.0/23\",\r\n + \ \"20.60.246.0/23\",\r\n \"20.60.248.0/23\",\r\n \"20.60.250.0/23\",\r\n + \ \"20.60.252.0/23\",\r\n \"20.60.254.0/23\",\r\n \"20.61.0.0/16\",\r\n + \ \"20.62.0.0/17\",\r\n \"20.62.128.0/17\",\r\n \"20.63.0.0/17\",\r\n + \ \"20.63.128.0/18\",\r\n \"20.63.192.0/18\",\r\n \"20.64.0.0/17\",\r\n + \ \"20.64.128.0/17\",\r\n \"20.65.0.0/17\",\r\n \"20.65.128.0/17\",\r\n + \ \"20.66.0.0/17\",\r\n \"20.66.128.0/17\",\r\n \"20.67.0.0/17\",\r\n + \ \"20.67.128.0/17\",\r\n \"20.68.0.0/18\",\r\n \"20.68.64.0/18\",\r\n + \ \"20.68.128.0/17\",\r\n \"20.69.0.0/18\",\r\n \"20.69.64.0/18\",\r\n + \ \"20.69.128.0/18\",\r\n \"20.69.192.0/18\",\r\n \"20.70.0.0/18\",\r\n + \ \"20.70.64.0/18\",\r\n \"20.70.128.0/17\",\r\n \"20.71.0.0/16\",\r\n + \ \"20.72.0.0/19\",\r\n \"20.72.32.0/19\",\r\n \"20.72.64.0/18\",\r\n + \ \"20.72.128.0/18\",\r\n \"20.72.192.0/18\",\r\n \"20.73.0.0/16\",\r\n + \ \"20.74.0.0/17\",\r\n \"20.74.128.0/17\",\r\n \"20.75.0.0/17\",\r\n + \ \"20.75.128.0/17\",\r\n \"20.76.0.0/16\",\r\n \"20.77.0.0/17\",\r\n + \ \"20.77.128.0/18\",\r\n \"20.77.192.0/18\",\r\n \"20.78.0.0/17\",\r\n + \ \"20.78.128.0/18\",\r\n \"20.78.192.0/18\",\r\n \"20.79.0.0/16\",\r\n + \ \"20.80.0.0/18\",\r\n \"20.80.64.0/18\",\r\n \"20.80.128.0/18\",\r\n + \ \"20.80.192.0/18\",\r\n \"20.81.0.0/17\",\r\n \"20.81.128.0/17\",\r\n + \ \"20.82.0.0/17\",\r\n \"20.82.128.0/17\",\r\n \"20.83.0.0/18\",\r\n + \ \"20.83.64.0/18\",\r\n \"20.83.128.0/18\",\r\n \"20.83.192.0/18\",\r\n + \ \"20.84.0.0/17\",\r\n \"20.84.128.0/17\",\r\n \"20.85.0.0/17\",\r\n + \ \"20.85.128.0/17\",\r\n \"20.86.0.0/16\",\r\n \"20.87.0.0/17\",\r\n + \ \"20.88.0.0/18\",\r\n \"20.88.64.0/19\",\r\n \"20.88.96.0/19\",\r\n + \ \"20.88.128.0/18\",\r\n \"20.88.192.0/18\",\r\n \"20.89.0.0/17\",\r\n + \ \"20.89.128.0/18\",\r\n \"20.89.192.0/18\",\r\n \"20.90.0.0/18\",\r\n + \ \"20.90.64.0/18\",\r\n \"20.90.128.0/17\",\r\n \"20.91.0.0/18\",\r\n + \ \"20.91.128.0/17\",\r\n \"20.92.0.0/18\",\r\n \"20.92.64.0/18\",\r\n + \ \"20.92.128.0/17\",\r\n \"20.93.0.0/17\",\r\n \"20.93.128.0/17\",\r\n + \ \"20.94.0.0/17\",\r\n \"20.94.128.0/18\",\r\n \"20.94.192.0/18\",\r\n + \ \"20.95.0.0/21\",\r\n \"20.95.8.0/21\",\r\n \"20.95.255.0/29\",\r\n + \ \"20.96.0.0/16\",\r\n \"20.97.0.0/17\",\r\n \"20.97.128.0/17\",\r\n + \ \"20.98.0.0/18\",\r\n \"20.98.64.0/18\",\r\n \"20.98.128.0/18\",\r\n + \ \"20.98.192.0/18\",\r\n \"20.99.0.0/17\",\r\n \"20.99.128.0/17\",\r\n + \ \"20.100.0.0/18\",\r\n \"20.101.0.0/16\",\r\n \"20.102.0.0/17\",\r\n + \ \"20.102.128.0/18\",\r\n \"20.102.192.0/18\",\r\n \"20.103.0.0/16\",\r\n + \ \"20.104.0.0/17\",\r\n \"20.104.128.0/18\",\r\n \"20.104.192.0/18\",\r\n + \ \"20.105.0.0/17\",\r\n \"20.105.128.0/17\",\r\n \"20.106.0.0/18\",\r\n + \ \"20.106.64.0/18\",\r\n \"20.106.128.0/17\",\r\n \"20.107.0.0/17\",\r\n + \ \"20.107.128.0/17\",\r\n \"20.108.0.0/16\",\r\n \"20.109.0.0/17\",\r\n + \ \"20.109.128.0/18\",\r\n \"20.109.192.0/18\",\r\n \"20.110.0.0/16\",\r\n + \ \"20.111.0.0/18\",\r\n \"20.112.0.0/17\",\r\n \"20.112.128.0/19\",\r\n + \ \"20.112.160.0/20\",\r\n \"20.112.176.0/21\",\r\n \"20.112.192.0/18\",\r\n + \ \"20.113.0.0/17\",\r\n \"20.114.0.0/18\",\r\n \"20.114.64.0/18\",\r\n + \ \"20.114.128.0/17\",\r\n \"20.115.0.0/17\",\r\n \"20.115.128.0/17\",\r\n + \ \"20.116.0.0/18\",\r\n \"20.135.0.0/22\",\r\n \"20.135.4.0/23\",\r\n + \ \"20.135.6.0/23\",\r\n \"20.135.8.0/22\",\r\n \"20.135.12.0/22\",\r\n + \ \"20.135.16.0/23\",\r\n \"20.135.18.0/23\",\r\n \"20.135.20.0/23\",\r\n + \ \"20.135.22.0/23\",\r\n \"20.135.24.0/23\",\r\n \"20.135.26.0/23\",\r\n + \ \"20.135.28.0/23\",\r\n \"20.135.30.0/23\",\r\n \"20.135.32.0/23\",\r\n + \ \"20.135.34.0/23\",\r\n \"20.135.36.0/23\",\r\n \"20.135.38.0/23\",\r\n + \ \"20.135.40.0/23\",\r\n \"20.135.42.0/23\",\r\n \"20.135.44.0/23\",\r\n + \ \"20.135.46.0/23\",\r\n \"20.135.48.0/23\",\r\n \"20.135.50.0/23\",\r\n + \ \"20.135.52.0/23\",\r\n \"20.135.54.0/23\",\r\n \"20.135.56.0/23\",\r\n + \ \"20.135.58.0/23\",\r\n \"20.135.60.0/23\",\r\n \"20.135.62.0/23\",\r\n + \ \"20.135.64.0/23\",\r\n \"20.135.66.0/23\",\r\n \"20.135.68.0/23\",\r\n + \ \"20.135.70.0/23\",\r\n \"20.135.72.0/23\",\r\n \"20.135.74.0/23\",\r\n + \ \"20.135.76.0/23\",\r\n \"20.135.78.0/23\",\r\n \"20.135.80.0/22\",\r\n + \ \"20.135.84.0/22\",\r\n \"20.135.88.0/23\",\r\n \"20.135.90.0/23\",\r\n + \ \"20.135.92.0/22\",\r\n \"20.135.96.0/22\",\r\n \"20.135.100.0/23\",\r\n + \ \"20.135.102.0/23\",\r\n \"20.135.104.0/22\",\r\n \"20.135.108.0/22\",\r\n + \ \"20.135.112.0/23\",\r\n \"20.135.114.0/23\",\r\n \"20.135.116.0/22\",\r\n + \ \"20.135.120.0/21\",\r\n \"20.135.128.0/22\",\r\n \"20.135.132.0/23\",\r\n + \ \"20.135.134.0/23\",\r\n \"20.135.136.0/22\",\r\n \"20.135.140.0/22\",\r\n + \ \"20.135.144.0/23\",\r\n \"20.135.146.0/23\",\r\n \"20.135.148.0/22\",\r\n + \ \"20.135.152.0/22\",\r\n \"20.135.156.0/23\",\r\n \"20.135.158.0/23\",\r\n + \ \"20.135.160.0/22\",\r\n \"20.135.164.0/22\",\r\n \"20.135.168.0/23\",\r\n + \ \"20.135.170.0/23\",\r\n \"20.135.172.0/22\",\r\n \"20.135.176.0/22\",\r\n + \ \"20.135.180.0/23\",\r\n \"20.135.182.0/23\",\r\n \"20.135.184.0/22\",\r\n + \ \"20.135.188.0/22\",\r\n \"20.135.192.0/23\",\r\n \"20.135.194.0/23\",\r\n + \ \"20.135.196.0/22\",\r\n \"20.135.200.0/22\",\r\n \"20.135.204.0/23\",\r\n + \ \"20.135.206.0/23\",\r\n \"20.135.208.0/23\",\r\n \"20.135.210.0/23\",\r\n + \ \"20.135.212.0/22\",\r\n \"20.135.216.0/22\",\r\n \"20.135.220.0/23\",\r\n + \ \"20.135.222.0/23\",\r\n \"20.135.224.0/22\",\r\n \"20.135.228.0/22\",\r\n + \ \"20.135.232.0/23\",\r\n \"20.135.234.0/23\",\r\n \"20.135.236.0/23\",\r\n + \ \"20.135.238.0/23\",\r\n \"20.135.240.0/25\",\r\n \"20.135.242.0/23\",\r\n + \ \"20.135.244.0/23\",\r\n \"20.136.0.0/25\",\r\n \"20.136.0.128/25\",\r\n + \ \"20.136.1.0/24\",\r\n \"20.136.2.0/24\",\r\n \"20.143.0.0/24\",\r\n + \ \"20.143.1.0/24\",\r\n \"20.143.2.0/24\",\r\n \"20.143.3.0/24\",\r\n + \ \"20.143.4.0/24\",\r\n \"20.150.0.0/24\",\r\n \"20.150.1.0/25\",\r\n + \ \"20.150.1.128/25\",\r\n \"20.150.2.0/23\",\r\n \"20.150.4.0/23\",\r\n + \ \"20.150.6.0/23\",\r\n \"20.150.8.0/23\",\r\n \"20.150.10.0/23\",\r\n + \ \"20.150.12.0/23\",\r\n \"20.150.14.0/23\",\r\n \"20.150.16.0/24\",\r\n + \ \"20.150.17.0/25\",\r\n \"20.150.17.128/25\",\r\n \"20.150.18.0/25\",\r\n + \ \"20.150.18.128/25\",\r\n \"20.150.19.0/24\",\r\n \"20.150.20.0/25\",\r\n + \ \"20.150.20.128/25\",\r\n \"20.150.21.0/24\",\r\n \"20.150.22.0/24\",\r\n + \ \"20.150.23.0/24\",\r\n \"20.150.24.0/24\",\r\n \"20.150.25.0/24\",\r\n + \ \"20.150.26.0/24\",\r\n \"20.150.27.0/24\",\r\n \"20.150.28.0/24\",\r\n + \ \"20.150.29.0/24\",\r\n \"20.150.30.0/24\",\r\n \"20.150.31.0/24\",\r\n + \ \"20.150.32.0/23\",\r\n \"20.150.34.0/23\",\r\n \"20.150.36.0/24\",\r\n + \ \"20.150.37.0/24\",\r\n \"20.150.38.0/23\",\r\n \"20.150.40.0/25\",\r\n + \ \"20.150.40.128/25\",\r\n \"20.150.41.0/24\",\r\n \"20.150.42.0/24\",\r\n + \ \"20.150.43.0/25\",\r\n \"20.150.43.128/25\",\r\n \"20.150.44.0/24\",\r\n + \ \"20.150.45.0/24\",\r\n \"20.150.46.0/24\",\r\n \"20.150.47.0/25\",\r\n + \ \"20.150.47.128/25\",\r\n \"20.150.48.0/24\",\r\n \"20.150.49.0/24\",\r\n + \ \"20.150.50.0/23\",\r\n \"20.150.52.0/24\",\r\n \"20.150.53.0/24\",\r\n + \ \"20.150.54.0/24\",\r\n \"20.150.55.0/24\",\r\n \"20.150.56.0/24\",\r\n + \ \"20.150.57.0/24\",\r\n \"20.150.58.0/24\",\r\n \"20.150.59.0/24\",\r\n + \ \"20.150.60.0/24\",\r\n \"20.150.61.0/24\",\r\n \"20.150.62.0/24\",\r\n + \ \"20.150.63.0/24\",\r\n \"20.150.64.0/24\",\r\n \"20.150.65.0/24\",\r\n + \ \"20.150.66.0/24\",\r\n \"20.150.67.0/24\",\r\n \"20.150.68.0/24\",\r\n + \ \"20.150.69.0/24\",\r\n \"20.150.70.0/24\",\r\n \"20.150.71.0/24\",\r\n + \ \"20.150.72.0/24\",\r\n \"20.150.73.0/24\",\r\n \"20.150.74.0/24\",\r\n + \ \"20.150.75.0/24\",\r\n \"20.150.76.0/24\",\r\n \"20.150.77.0/24\",\r\n + \ \"20.150.78.0/24\",\r\n \"20.150.79.0/24\",\r\n \"20.150.80.0/24\",\r\n + \ \"20.150.81.0/24\",\r\n \"20.150.82.0/24\",\r\n \"20.150.83.0/24\",\r\n + \ \"20.150.84.0/24\",\r\n \"20.150.85.0/24\",\r\n \"20.150.86.0/24\",\r\n + \ \"20.150.87.0/24\",\r\n \"20.150.88.0/24\",\r\n \"20.150.89.0/24\",\r\n + \ \"20.150.90.0/24\",\r\n \"20.150.91.0/24\",\r\n \"20.150.92.0/24\",\r\n + \ \"20.150.93.0/24\",\r\n \"20.150.94.0/24\",\r\n \"20.150.95.0/24\",\r\n + \ \"20.150.96.0/24\",\r\n \"20.150.97.0/24\",\r\n \"20.150.98.0/24\",\r\n + \ \"20.150.99.0/24\",\r\n \"20.150.100.0/24\",\r\n \"20.150.101.0/24\",\r\n + \ \"20.150.102.0/24\",\r\n \"20.150.103.0/24\",\r\n \"20.150.104.0/24\",\r\n + \ \"20.150.105.0/24\",\r\n \"20.150.106.0/24\",\r\n \"20.150.107.0/24\",\r\n + \ \"20.150.108.0/24\",\r\n \"20.150.109.0/24\",\r\n \"20.150.110.0/24\",\r\n + \ \"20.150.111.0/24\",\r\n \"20.150.112.0/24\",\r\n \"20.150.113.0/24\",\r\n + \ \"20.150.114.0/24\",\r\n \"20.150.115.0/24\",\r\n \"20.150.116.0/24\",\r\n + \ \"20.150.117.0/24\",\r\n \"20.150.118.0/24\",\r\n \"20.150.119.0/24\",\r\n + \ \"20.150.120.0/24\",\r\n \"20.150.121.0/24\",\r\n \"20.150.122.0/24\",\r\n + \ \"20.150.123.0/24\",\r\n \"20.150.124.0/24\",\r\n \"20.150.125.0/24\",\r\n + \ \"20.150.126.0/24\",\r\n \"20.150.127.0/24\",\r\n \"20.150.128.0/17\",\r\n + \ \"20.151.0.0/16\",\r\n \"20.157.0.0/24\",\r\n \"20.157.1.0/24\",\r\n + \ \"20.157.2.0/24\",\r\n \"20.157.3.0/24\",\r\n \"20.157.4.0/23\",\r\n + \ \"20.157.6.0/23\",\r\n \"20.157.8.0/22\",\r\n \"20.157.12.0/22\",\r\n + \ \"20.157.16.0/24\",\r\n \"20.157.17.0/24\",\r\n \"20.157.18.0/24\",\r\n + \ \"20.157.19.0/24\",\r\n \"20.157.20.0/24\",\r\n \"20.157.32.0/24\",\r\n + \ \"20.157.33.0/24\",\r\n \"20.157.34.0/23\",\r\n \"20.157.36.0/23\",\r\n + \ \"20.157.38.0/24\",\r\n \"20.157.39.0/24\",\r\n \"20.157.40.0/24\",\r\n + \ \"20.157.41.0/24\",\r\n \"20.157.42.0/24\",\r\n \"20.157.43.0/24\",\r\n + \ \"20.157.44.0/24\",\r\n \"20.157.45.0/24\",\r\n \"20.157.46.0/24\",\r\n + \ \"20.157.47.0/24\",\r\n \"20.157.48.0/23\",\r\n \"20.157.50.0/23\",\r\n + \ \"20.157.52.0/24\",\r\n \"20.157.53.0/24\",\r\n \"20.157.54.0/24\",\r\n + \ \"20.157.55.0/24\",\r\n \"20.157.56.0/24\",\r\n \"20.157.57.0/24\",\r\n + \ \"20.157.58.0/24\",\r\n \"20.157.59.0/24\",\r\n \"20.157.60.0/24\",\r\n + \ \"20.157.61.0/24\",\r\n \"20.157.62.0/23\",\r\n \"20.157.96.0/24\",\r\n + \ \"20.157.97.0/24\",\r\n \"20.157.98.0/24\",\r\n \"20.157.99.0/24\",\r\n + \ \"20.157.100.0/24\",\r\n \"20.157.101.0/24\",\r\n \"20.157.102.0/24\",\r\n + \ \"20.157.103.0/24\",\r\n \"20.157.104.0/24\",\r\n \"20.157.105.0/24\",\r\n + \ \"20.157.106.0/24\",\r\n \"20.157.107.0/24\",\r\n \"20.157.108.0/24\",\r\n + \ \"20.157.128.0/24\",\r\n \"20.157.129.0/24\",\r\n \"20.157.130.0/24\",\r\n + \ \"20.157.131.0/24\",\r\n \"20.157.132.0/24\",\r\n \"20.157.133.0/24\",\r\n + \ \"20.157.134.0/24\",\r\n \"20.157.135.0/24\",\r\n \"20.157.136.0/24\",\r\n + \ \"20.157.137.0/24\",\r\n \"20.157.138.0/24\",\r\n \"20.157.139.0/24\",\r\n + \ \"20.157.140.0/24\",\r\n \"20.157.141.0/24\",\r\n \"20.157.142.0/23\",\r\n + \ \"20.157.144.0/24\",\r\n \"20.157.145.0/24\",\r\n \"20.157.146.0/24\",\r\n + \ \"20.157.147.0/24\",\r\n \"20.157.148.0/24\",\r\n \"20.157.149.0/24\",\r\n + \ \"20.157.150.0/24\",\r\n \"20.157.151.0/24\",\r\n \"20.157.152.0/24\",\r\n + \ \"20.157.153.0/24\",\r\n \"20.157.154.0/24\",\r\n \"20.157.155.0/24\",\r\n + \ \"20.157.156.0/24\",\r\n \"20.157.157.0/24\",\r\n \"20.157.158.0/24\",\r\n + \ \"20.157.159.0/24\",\r\n \"20.157.160.0/24\",\r\n \"20.157.161.0/24\",\r\n + \ \"20.184.0.0/18\",\r\n \"20.184.64.0/18\",\r\n \"20.184.128.0/17\",\r\n + \ \"20.185.0.0/16\",\r\n \"20.186.0.0/17\",\r\n \"20.186.128.0/18\",\r\n + \ \"20.186.192.0/18\",\r\n \"20.187.0.0/18\",\r\n \"20.187.64.0/18\",\r\n + \ \"20.187.128.0/18\",\r\n \"20.187.192.0/21\",\r\n \"20.187.224.0/19\",\r\n + \ \"20.188.0.0/19\",\r\n \"20.188.32.0/19\",\r\n \"20.188.64.0/19\",\r\n + \ \"20.188.96.0/19\",\r\n \"20.188.128.0/17\",\r\n \"20.189.0.0/18\",\r\n + \ \"20.189.64.0/18\",\r\n \"20.189.128.0/18\",\r\n \"20.189.192.0/18\",\r\n + \ \"20.190.0.0/18\",\r\n \"20.190.64.0/19\",\r\n \"20.190.96.0/19\",\r\n + \ \"20.190.128.0/24\",\r\n \"20.190.129.0/24\",\r\n \"20.190.130.0/24\",\r\n + \ \"20.190.131.0/24\",\r\n \"20.190.132.0/24\",\r\n \"20.190.133.0/24\",\r\n + \ \"20.190.134.0/24\",\r\n \"20.190.135.0/24\",\r\n \"20.190.136.0/24\",\r\n + \ \"20.190.137.0/24\",\r\n \"20.190.138.0/25\",\r\n \"20.190.138.128/25\",\r\n + \ \"20.190.139.0/25\",\r\n \"20.190.139.128/25\",\r\n \"20.190.140.0/25\",\r\n + \ \"20.190.140.128/25\",\r\n \"20.190.141.0/25\",\r\n \"20.190.141.128/25\",\r\n + \ \"20.190.142.0/25\",\r\n \"20.190.142.128/25\",\r\n \"20.190.143.0/25\",\r\n + \ \"20.190.143.128/25\",\r\n \"20.190.144.0/25\",\r\n \"20.190.144.128/25\",\r\n + \ \"20.190.145.0/25\",\r\n \"20.190.145.128/25\",\r\n \"20.190.146.0/25\",\r\n + \ \"20.190.146.128/25\",\r\n \"20.190.147.0/25\",\r\n \"20.190.147.128/25\",\r\n + \ \"20.190.148.0/25\",\r\n \"20.190.148.128/25\",\r\n \"20.190.149.0/24\",\r\n + \ \"20.190.150.0/24\",\r\n \"20.190.151.0/24\",\r\n \"20.190.152.0/24\",\r\n + \ \"20.190.153.0/24\",\r\n \"20.190.154.0/24\",\r\n \"20.190.155.0/24\",\r\n + \ \"20.190.156.0/24\",\r\n \"20.190.157.0/24\",\r\n \"20.190.158.0/24\",\r\n + \ \"20.190.159.0/24\",\r\n \"20.190.160.0/24\",\r\n \"20.190.161.0/24\",\r\n + \ \"20.190.162.0/24\",\r\n \"20.190.163.0/24\",\r\n \"20.190.164.0/24\",\r\n + \ \"20.190.165.0/24\",\r\n \"20.190.166.0/24\",\r\n \"20.190.167.0/24\",\r\n + \ \"20.190.168.0/24\",\r\n \"20.190.169.0/24\",\r\n \"20.190.170.0/24\",\r\n + \ \"20.190.171.0/24\",\r\n \"20.190.172.0/24\",\r\n \"20.190.173.0/24\",\r\n + \ \"20.190.174.0/24\",\r\n \"20.190.175.0/24\",\r\n \"20.190.176.0/24\",\r\n + \ \"20.190.177.0/24\",\r\n \"20.190.178.0/24\",\r\n \"20.190.179.0/24\",\r\n + \ \"20.190.180.0/24\",\r\n \"20.190.181.0/24\",\r\n \"20.190.182.0/24\",\r\n + \ \"20.190.183.0/24\",\r\n \"20.190.184.0/24\",\r\n \"20.190.185.0/24\",\r\n + \ \"20.190.186.0/24\",\r\n \"20.190.187.0/24\",\r\n \"20.190.188.0/24\",\r\n + \ \"20.190.189.0/26\",\r\n \"20.190.189.64/26\",\r\n \"20.190.189.128/26\",\r\n + \ \"20.190.189.192/26\",\r\n \"20.190.190.0/26\",\r\n \"20.190.190.64/26\",\r\n + \ \"20.190.190.128/25\",\r\n \"20.190.191.0/26\",\r\n \"20.190.191.64/26\",\r\n + \ \"20.190.191.128/26\",\r\n \"20.190.191.192/26\",\r\n \"20.190.192.0/18\",\r\n + \ \"20.191.0.0/18\",\r\n \"20.191.64.0/18\",\r\n \"20.191.128.0/19\",\r\n + \ \"20.191.160.0/19\",\r\n \"20.191.192.0/18\",\r\n \"20.192.0.0/19\",\r\n + \ \"20.192.32.0/21\",\r\n \"20.192.40.0/21\",\r\n \"20.192.48.0/21\",\r\n + \ \"20.192.56.0/21\",\r\n \"20.192.64.0/19\",\r\n \"20.192.96.0/21\",\r\n + \ \"20.192.104.0/21\",\r\n \"20.192.112.0/20\",\r\n \"20.192.128.0/19\",\r\n + \ \"20.192.160.0/21\",\r\n \"20.192.168.0/21\",\r\n \"20.192.176.0/21\",\r\n + \ \"20.192.184.0/21\",\r\n \"20.192.192.0/19\",\r\n \"20.192.224.0/20\",\r\n + \ \"20.192.240.0/20\",\r\n \"20.193.0.0/18\",\r\n \"20.193.64.0/19\",\r\n + \ \"20.193.96.0/19\",\r\n \"20.193.128.0/19\",\r\n \"20.193.160.0/19\",\r\n + \ \"20.193.192.0/20\",\r\n \"20.193.208.0/20\",\r\n \"20.193.224.0/19\",\r\n + \ \"20.194.0.0/18\",\r\n \"20.194.64.0/20\",\r\n \"20.194.80.0/21\",\r\n + \ \"20.194.96.0/19\",\r\n \"20.194.128.0/17\",\r\n \"20.195.0.0/18\",\r\n + \ \"20.195.64.0/21\",\r\n \"20.195.72.0/21\",\r\n \"20.195.80.0/21\",\r\n + \ \"20.195.88.0/21\",\r\n \"20.195.96.0/19\",\r\n \"20.195.128.0/22\",\r\n + \ \"20.195.136.0/21\",\r\n \"20.195.144.0/21\",\r\n \"20.195.152.0/21\",\r\n + \ \"20.195.160.0/19\",\r\n \"20.195.192.0/18\",\r\n \"20.196.0.0/18\",\r\n + \ \"20.196.64.0/18\",\r\n \"20.196.128.0/17\",\r\n \"20.197.0.0/18\",\r\n + \ \"20.197.64.0/18\",\r\n \"20.197.128.0/17\",\r\n \"20.198.0.0/17\",\r\n + \ \"20.198.128.0/17\",\r\n \"20.199.0.0/17\",\r\n \"20.199.128.0/18\",\r\n + \ \"20.199.192.0/18\",\r\n \"20.200.0.0/18\",\r\n \"20.200.64.0/18\",\r\n + \ \"20.200.128.0/18\",\r\n \"20.200.192.0/18\",\r\n \"20.201.0.0/17\",\r\n + \ \"20.201.128.0/24\",\r\n \"20.201.129.0/24\",\r\n \"20.201.130.0/23\",\r\n + \ \"20.201.132.0/23\",\r\n \"20.201.134.0/24\",\r\n \"20.201.223.0/24\",\r\n + \ \"20.201.224.0/23\",\r\n \"20.201.231.0/24\",\r\n \"20.202.0.0/24\",\r\n + \ \"20.202.1.0/24\",\r\n \"20.202.2.0/24\",\r\n \"20.202.3.0/24\",\r\n + \ \"20.202.4.0/24\",\r\n \"20.202.20.0/24\",\r\n \"20.202.21.0/24\",\r\n + \ \"20.202.22.0/24\",\r\n \"20.202.23.0/24\",\r\n \"20.202.24.0/24\",\r\n + \ \"20.202.40.0/24\",\r\n \"20.202.41.0/24\",\r\n \"20.202.42.0/24\",\r\n + \ \"20.202.43.0/24\",\r\n \"20.202.60.0/24\",\r\n \"20.202.61.0/24\",\r\n + \ \"20.203.0.0/18\",\r\n \"20.203.128.0/17\",\r\n \"20.204.0.0/16\",\r\n + \ \"20.205.0.0/18\",\r\n \"20.205.64.0/20\",\r\n \"20.205.80.0/21\",\r\n + \ \"20.205.96.0/19\",\r\n \"20.205.128.0/20\",\r\n \"20.205.160.0/19\",\r\n + \ \"20.205.192.0/18\",\r\n \"20.206.0.0/18\",\r\n \"20.206.64.0/18\",\r\n + \ \"20.206.128.0/18\",\r\n \"20.207.0.0/18\",\r\n \"20.207.64.0/18\",\r\n + \ \"20.208.0.0/17\",\r\n \"20.208.128.0/20\",\r\n \"20.209.0.0/23\",\r\n + \ \"20.209.2.0/23\",\r\n \"20.209.4.0/23\",\r\n \"20.209.6.0/23\",\r\n + \ \"20.209.8.0/23\",\r\n \"20.209.10.0/23\",\r\n \"20.209.12.0/23\",\r\n + \ \"20.209.14.0/23\",\r\n \"20.209.16.0/23\",\r\n \"20.210.0.0/18\",\r\n + \ \"20.211.0.0/18\",\r\n \"20.212.0.0/18\",\r\n \"23.96.0.0/17\",\r\n + \ \"23.96.128.0/17\",\r\n \"23.97.48.0/20\",\r\n \"23.97.64.0/19\",\r\n + \ \"23.97.96.0/20\",\r\n \"23.97.112.0/25\",\r\n \"23.97.112.128/28\",\r\n + \ \"23.97.112.160/27\",\r\n \"23.97.112.192/27\",\r\n \"23.97.112.224/27\",\r\n + \ \"23.97.116.0/22\",\r\n \"23.97.120.0/21\",\r\n \"23.97.128.0/17\",\r\n + \ \"23.98.32.0/21\",\r\n \"23.98.40.0/22\",\r\n \"23.98.44.0/24\",\r\n + \ \"23.98.45.0/24\",\r\n \"23.98.46.0/24\",\r\n \"23.98.47.0/24\",\r\n + \ \"23.98.48.0/21\",\r\n \"23.98.56.0/24\",\r\n \"23.98.57.64/26\",\r\n + \ \"23.98.64.0/18\",\r\n \"23.98.128.0/17\",\r\n \"23.99.0.0/18\",\r\n + \ \"23.99.64.0/19\",\r\n \"23.99.96.0/19\",\r\n \"23.99.128.0/17\",\r\n + \ \"23.100.0.0/20\",\r\n \"23.100.16.0/20\",\r\n \"23.100.32.0/20\",\r\n + \ \"23.100.48.0/20\",\r\n \"23.100.64.0/21\",\r\n \"23.100.72.0/21\",\r\n + \ \"23.100.80.0/21\",\r\n \"23.100.88.0/21\",\r\n \"23.100.96.0/21\",\r\n + \ \"23.100.104.0/21\",\r\n \"23.100.112.0/21\",\r\n \"23.100.120.0/21\",\r\n + \ \"23.100.128.0/18\",\r\n \"23.100.192.0/19\",\r\n \"23.100.224.0/20\",\r\n + \ \"23.100.240.0/20\",\r\n \"23.101.0.0/20\",\r\n \"23.101.16.0/20\",\r\n + \ \"23.101.32.0/21\",\r\n \"23.101.48.0/20\",\r\n \"23.101.64.0/20\",\r\n + \ \"23.101.80.0/21\",\r\n \"23.101.112.0/20\",\r\n \"23.101.128.0/20\",\r\n + \ \"23.101.144.0/20\",\r\n \"23.101.160.0/20\",\r\n \"23.101.176.0/20\",\r\n + \ \"23.101.192.0/20\",\r\n \"23.101.208.0/20\",\r\n \"23.101.224.0/19\",\r\n + \ \"23.102.0.0/18\",\r\n \"23.102.64.0/19\",\r\n \"23.102.96.0/19\",\r\n + \ \"23.102.128.0/18\",\r\n \"23.102.192.0/21\",\r\n \"23.102.200.0/23\",\r\n + \ \"23.102.202.0/24\",\r\n \"23.102.203.0/24\",\r\n \"23.102.204.0/22\",\r\n + \ \"23.102.208.0/20\",\r\n \"23.102.224.0/19\",\r\n \"23.103.64.32/27\",\r\n + \ \"23.103.64.64/27\",\r\n \"23.103.66.0/23\",\r\n \"40.64.0.0/18\",\r\n + \ \"40.64.64.0/18\",\r\n \"40.64.128.0/21\",\r\n \"40.65.0.0/18\",\r\n + \ \"40.65.64.0/18\",\r\n \"40.65.128.0/18\",\r\n \"40.65.192.0/18\",\r\n + \ \"40.66.32.0/19\",\r\n \"40.66.120.0/21\",\r\n \"40.67.0.0/18\",\r\n + \ \"40.67.64.0/19\",\r\n \"40.67.96.0/20\",\r\n \"40.67.112.0/21\",\r\n + \ \"40.67.120.0/21\",\r\n \"40.67.128.0/19\",\r\n \"40.67.160.0/19\",\r\n + \ \"40.67.192.0/19\",\r\n \"40.67.224.0/19\",\r\n \"40.68.0.0/16\",\r\n + \ \"40.69.0.0/18\",\r\n \"40.69.64.0/19\",\r\n \"40.69.96.0/19\",\r\n + \ \"40.69.128.0/18\",\r\n \"40.69.192.0/19\",\r\n \"40.70.0.0/18\",\r\n + \ \"40.70.64.0/20\",\r\n \"40.70.80.0/21\",\r\n \"40.70.88.0/28\",\r\n + \ \"40.70.128.0/17\",\r\n \"40.71.0.0/16\",\r\n \"40.74.0.0/18\",\r\n + \ \"40.74.64.0/18\",\r\n \"40.74.128.0/20\",\r\n \"40.74.144.0/20\",\r\n + \ \"40.74.160.0/19\",\r\n \"40.74.192.0/18\",\r\n \"40.75.0.0/19\",\r\n + \ \"40.75.32.0/21\",\r\n \"40.75.64.0/18\",\r\n \"40.75.128.0/17\",\r\n + \ \"40.76.0.0/16\",\r\n \"40.77.0.0/17\",\r\n \"40.77.128.0/25\",\r\n + \ \"40.77.128.128/25\",\r\n \"40.77.129.0/24\",\r\n \"40.77.130.0/25\",\r\n + \ \"40.77.130.128/26\",\r\n \"40.77.130.192/26\",\r\n \"40.77.131.0/25\",\r\n + \ \"40.77.131.128/26\",\r\n \"40.77.131.192/27\",\r\n \"40.77.131.224/28\",\r\n + \ \"40.77.131.240/28\",\r\n \"40.77.132.0/24\",\r\n \"40.77.133.0/24\",\r\n + \ \"40.77.134.0/24\",\r\n \"40.77.135.0/24\",\r\n \"40.77.136.0/28\",\r\n + \ \"40.77.136.16/28\",\r\n \"40.77.136.32/28\",\r\n \"40.77.136.48/28\",\r\n + \ \"40.77.136.64/28\",\r\n \"40.77.136.80/28\",\r\n \"40.77.136.96/28\",\r\n + \ \"40.77.136.112/28\",\r\n \"40.77.136.128/25\",\r\n \"40.77.137.0/25\",\r\n + \ \"40.77.137.128/26\",\r\n \"40.77.137.192/27\",\r\n \"40.77.138.0/25\",\r\n + \ \"40.77.138.128/25\",\r\n \"40.77.139.0/25\",\r\n \"40.77.139.128/25\",\r\n + \ \"40.77.160.0/27\",\r\n \"40.77.160.32/27\",\r\n \"40.77.160.64/26\",\r\n + \ \"40.77.160.128/25\",\r\n \"40.77.161.0/26\",\r\n \"40.77.161.64/26\",\r\n + \ \"40.77.161.128/25\",\r\n \"40.77.162.0/24\",\r\n \"40.77.163.0/24\",\r\n + \ \"40.77.164.0/24\",\r\n \"40.77.165.0/24\",\r\n \"40.77.166.0/25\",\r\n + \ \"40.77.166.128/28\",\r\n \"40.77.166.160/27\",\r\n \"40.77.166.192/26\",\r\n + \ \"40.77.167.0/24\",\r\n \"40.77.168.0/24\",\r\n \"40.77.169.0/24\",\r\n + \ \"40.77.170.0/24\",\r\n \"40.77.171.0/24\",\r\n \"40.77.172.0/24\",\r\n + \ \"40.77.173.0/24\",\r\n \"40.77.174.0/24\",\r\n \"40.77.175.0/27\",\r\n + \ \"40.77.175.32/27\",\r\n \"40.77.175.64/27\",\r\n \"40.77.175.96/27\",\r\n + \ \"40.77.175.128/27\",\r\n \"40.77.175.160/27\",\r\n \"40.77.175.192/27\",\r\n + \ \"40.77.175.240/28\",\r\n \"40.77.176.0/24\",\r\n \"40.77.177.0/24\",\r\n + \ \"40.77.178.0/23\",\r\n \"40.77.180.0/23\",\r\n \"40.77.182.0/28\",\r\n + \ \"40.77.182.16/28\",\r\n \"40.77.182.32/27\",\r\n \"40.77.182.64/27\",\r\n + \ \"40.77.182.96/27\",\r\n \"40.77.182.128/27\",\r\n \"40.77.182.160/27\",\r\n + \ \"40.77.182.192/26\",\r\n \"40.77.183.0/24\",\r\n \"40.77.184.0/25\",\r\n + \ \"40.77.184.128/25\",\r\n \"40.77.185.0/25\",\r\n \"40.77.185.128/25\",\r\n + \ \"40.77.186.0/23\",\r\n \"40.77.188.0/22\",\r\n \"40.77.192.0/22\",\r\n + \ \"40.77.196.0/24\",\r\n \"40.77.197.0/24\",\r\n \"40.77.198.0/26\",\r\n + \ \"40.77.198.64/26\",\r\n \"40.77.198.128/25\",\r\n \"40.77.199.0/25\",\r\n + \ \"40.77.199.128/26\",\r\n \"40.77.199.192/26\",\r\n \"40.77.200.0/25\",\r\n + \ \"40.77.200.128/25\",\r\n \"40.77.201.0/24\",\r\n \"40.77.202.0/24\",\r\n + \ \"40.77.224.0/28\",\r\n \"40.77.224.16/28\",\r\n \"40.77.224.32/27\",\r\n + \ \"40.77.224.64/27\",\r\n \"40.77.224.96/27\",\r\n \"40.77.224.128/25\",\r\n + \ \"40.77.225.0/24\",\r\n \"40.77.226.0/25\",\r\n \"40.77.226.128/25\",\r\n + \ \"40.77.227.0/24\",\r\n \"40.77.228.0/24\",\r\n \"40.77.229.0/24\",\r\n + \ \"40.77.230.0/24\",\r\n \"40.77.231.0/24\",\r\n \"40.77.232.0/25\",\r\n + \ \"40.77.232.128/25\",\r\n \"40.77.233.0/24\",\r\n \"40.77.234.0/25\",\r\n + \ \"40.77.234.128/27\",\r\n \"40.77.234.160/27\",\r\n \"40.77.234.192/27\",\r\n + \ \"40.77.234.224/27\",\r\n \"40.77.235.0/24\",\r\n \"40.77.236.0/27\",\r\n + \ \"40.77.236.32/27\",\r\n \"40.77.236.80/28\",\r\n \"40.77.236.96/27\",\r\n + \ \"40.77.236.128/27\",\r\n \"40.77.236.160/28\",\r\n \"40.77.236.176/28\",\r\n + \ \"40.77.236.192/28\",\r\n \"40.77.236.224/27\",\r\n \"40.77.237.0/26\",\r\n + \ \"40.77.237.64/26\",\r\n \"40.77.237.128/25\",\r\n \"40.77.240.0/25\",\r\n + \ \"40.77.240.128/25\",\r\n \"40.77.241.0/24\",\r\n \"40.77.242.0/23\",\r\n + \ \"40.77.244.0/25\",\r\n \"40.77.245.0/24\",\r\n \"40.77.246.0/24\",\r\n + \ \"40.77.247.0/24\",\r\n \"40.77.248.0/25\",\r\n \"40.77.248.128/25\",\r\n + \ \"40.77.249.0/24\",\r\n \"40.77.250.0/24\",\r\n \"40.77.251.0/24\",\r\n + \ \"40.77.252.0/23\",\r\n \"40.77.254.0/26\",\r\n \"40.77.254.64/27\",\r\n + \ \"40.77.254.128/25\",\r\n \"40.77.255.0/25\",\r\n \"40.77.255.128/26\",\r\n + \ \"40.77.255.192/26\",\r\n \"40.78.0.0/17\",\r\n \"40.78.128.0/18\",\r\n + \ \"40.78.192.0/21\",\r\n \"40.78.200.0/21\",\r\n \"40.78.208.0/28\",\r\n + \ \"40.78.208.16/28\",\r\n \"40.78.208.32/30\",\r\n \"40.78.208.48/28\",\r\n + \ \"40.78.208.64/28\",\r\n \"40.78.209.0/24\",\r\n \"40.78.210.0/24\",\r\n + \ \"40.78.211.0/24\",\r\n \"40.78.212.0/24\",\r\n \"40.78.213.0/24\",\r\n + \ \"40.78.214.0/24\",\r\n \"40.78.215.0/24\",\r\n \"40.78.216.0/24\",\r\n + \ \"40.78.217.0/24\",\r\n \"40.78.218.0/24\",\r\n \"40.78.219.0/24\",\r\n + \ \"40.78.220.0/24\",\r\n \"40.78.221.0/24\",\r\n \"40.78.222.0/24\",\r\n + \ \"40.78.223.0/24\",\r\n \"40.78.224.0/21\",\r\n \"40.78.232.0/21\",\r\n + \ \"40.78.240.0/20\",\r\n \"40.79.0.0/21\",\r\n \"40.79.8.0/27\",\r\n + \ \"40.79.8.32/28\",\r\n \"40.79.8.64/27\",\r\n \"40.79.8.96/28\",\r\n + \ \"40.79.9.0/24\",\r\n \"40.79.16.0/20\",\r\n \"40.79.32.0/20\",\r\n + \ \"40.79.48.0/27\",\r\n \"40.79.48.32/28\",\r\n \"40.79.49.0/24\",\r\n + \ \"40.79.56.0/21\",\r\n \"40.79.64.0/20\",\r\n \"40.79.80.0/21\",\r\n + \ \"40.79.88.0/27\",\r\n \"40.79.88.32/28\",\r\n \"40.79.89.0/24\",\r\n + \ \"40.79.90.0/24\",\r\n \"40.79.91.0/28\",\r\n \"40.79.92.0/24\",\r\n + \ \"40.79.93.0/28\",\r\n \"40.79.94.0/24\",\r\n \"40.79.95.0/28\",\r\n + \ \"40.79.96.0/19\",\r\n \"40.79.128.0/20\",\r\n \"40.79.144.0/21\",\r\n + \ \"40.79.152.0/21\",\r\n \"40.79.160.0/20\",\r\n \"40.79.176.0/21\",\r\n + \ \"40.79.184.0/21\",\r\n \"40.79.192.0/21\",\r\n \"40.79.200.0/24\",\r\n + \ \"40.79.201.0/24\",\r\n \"40.79.202.0/24\",\r\n \"40.79.203.0/24\",\r\n + \ \"40.79.204.0/27\",\r\n \"40.79.204.32/28\",\r\n \"40.79.204.48/28\",\r\n + \ \"40.79.204.64/27\",\r\n \"40.79.204.96/27\",\r\n \"40.79.204.128/27\",\r\n + \ \"40.79.204.160/27\",\r\n \"40.79.204.192/26\",\r\n \"40.79.205.0/26\",\r\n + \ \"40.79.205.64/28\",\r\n \"40.79.205.80/28\",\r\n \"40.79.205.96/27\",\r\n + \ \"40.79.205.128/26\",\r\n \"40.79.205.192/27\",\r\n \"40.79.205.224/28\",\r\n + \ \"40.79.205.240/28\",\r\n \"40.79.206.0/27\",\r\n \"40.79.206.32/27\",\r\n + \ \"40.79.206.64/27\",\r\n \"40.79.206.96/27\",\r\n \"40.79.206.128/27\",\r\n + \ \"40.79.206.160/27\",\r\n \"40.79.206.192/27\",\r\n \"40.79.206.224/27\",\r\n + \ \"40.79.207.0/27\",\r\n \"40.79.207.32/27\",\r\n \"40.79.207.64/28\",\r\n + \ \"40.79.207.80/28\",\r\n \"40.79.207.96/27\",\r\n \"40.79.207.128/25\",\r\n + \ \"40.79.208.0/24\",\r\n \"40.79.209.0/24\",\r\n \"40.79.210.0/24\",\r\n + \ \"40.79.211.0/24\",\r\n \"40.79.212.0/24\",\r\n \"40.79.213.0/24\",\r\n + \ \"40.79.214.0/24\",\r\n \"40.79.215.0/24\",\r\n \"40.79.216.0/24\",\r\n + \ \"40.79.217.0/24\",\r\n \"40.79.218.0/24\",\r\n \"40.79.219.0/24\",\r\n + \ \"40.79.220.0/24\",\r\n \"40.79.221.0/24\",\r\n \"40.79.222.0/24\",\r\n + \ \"40.79.223.0/24\",\r\n \"40.79.232.0/21\",\r\n \"40.79.240.0/20\",\r\n + \ \"40.80.0.0/22\",\r\n \"40.80.4.0/22\",\r\n \"40.80.8.0/22\",\r\n + \ \"40.80.12.0/22\",\r\n \"40.80.16.0/22\",\r\n \"40.80.20.0/22\",\r\n + \ \"40.80.24.0/22\",\r\n \"40.80.28.0/22\",\r\n \"40.80.32.0/22\",\r\n + \ \"40.80.36.0/22\",\r\n \"40.80.40.0/22\",\r\n \"40.80.44.0/22\",\r\n + \ \"40.80.48.0/21\",\r\n \"40.80.56.0/21\",\r\n \"40.80.64.0/19\",\r\n + \ \"40.80.96.0/20\",\r\n \"40.80.144.0/21\",\r\n \"40.80.152.0/21\",\r\n + \ \"40.80.160.0/24\",\r\n \"40.80.168.0/21\",\r\n \"40.80.176.0/21\",\r\n + \ \"40.80.184.0/21\",\r\n \"40.80.192.0/19\",\r\n \"40.80.224.0/20\",\r\n + \ \"40.80.240.0/20\",\r\n \"40.81.0.0/20\",\r\n \"40.81.16.0/20\",\r\n + \ \"40.81.32.0/20\",\r\n \"40.81.48.0/20\",\r\n \"40.81.64.0/20\",\r\n + \ \"40.81.80.0/20\",\r\n \"40.81.96.0/20\",\r\n \"40.81.112.0/20\",\r\n + \ \"40.81.128.0/19\",\r\n \"40.81.160.0/20\",\r\n \"40.81.176.0/20\",\r\n + \ \"40.81.192.0/19\",\r\n \"40.81.224.0/19\",\r\n \"40.82.0.0/22\",\r\n + \ \"40.82.4.0/22\",\r\n \"40.82.16.0/22\",\r\n \"40.82.20.0/22\",\r\n + \ \"40.82.24.0/22\",\r\n \"40.82.28.0/22\",\r\n \"40.82.32.0/22\",\r\n + \ \"40.82.36.0/22\",\r\n \"40.82.44.0/22\",\r\n \"40.82.48.0/22\",\r\n + \ \"40.82.60.0/22\",\r\n \"40.82.64.0/22\",\r\n \"40.82.68.0/22\",\r\n + \ \"40.82.72.0/22\",\r\n \"40.82.76.0/22\",\r\n \"40.82.80.0/22\",\r\n + \ \"40.82.84.0/22\",\r\n \"40.82.92.0/22\",\r\n \"40.82.96.0/22\",\r\n + \ \"40.82.100.0/22\",\r\n \"40.82.116.0/22\",\r\n \"40.82.120.0/22\",\r\n + \ \"40.82.128.0/19\",\r\n \"40.82.160.0/19\",\r\n \"40.82.192.0/19\",\r\n + \ \"40.82.224.0/20\",\r\n \"40.82.240.0/22\",\r\n \"40.82.244.0/22\",\r\n + \ \"40.82.248.0/21\",\r\n \"40.83.0.0/20\",\r\n \"40.83.16.0/21\",\r\n + \ \"40.83.24.0/26\",\r\n \"40.83.24.64/27\",\r\n \"40.83.24.96/27\",\r\n + \ \"40.83.24.128/25\",\r\n \"40.83.25.0/24\",\r\n \"40.83.26.0/23\",\r\n + \ \"40.83.28.0/22\",\r\n \"40.83.32.0/19\",\r\n \"40.83.64.0/18\",\r\n + \ \"40.83.128.0/17\",\r\n \"40.84.0.0/17\",\r\n \"40.84.128.0/17\",\r\n + \ \"40.85.0.0/17\",\r\n \"40.85.128.0/20\",\r\n \"40.85.144.0/20\",\r\n + \ \"40.85.160.0/19\",\r\n \"40.85.192.0/18\",\r\n \"40.86.0.0/17\",\r\n + \ \"40.86.128.0/19\",\r\n \"40.86.160.0/19\",\r\n \"40.86.192.0/18\",\r\n + \ \"40.87.0.0/17\",\r\n \"40.87.128.0/19\",\r\n \"40.87.160.0/22\",\r\n + \ \"40.87.164.0/22\",\r\n \"40.87.168.0/30\",\r\n \"40.87.168.4/30\",\r\n + \ \"40.87.168.8/29\",\r\n \"40.87.168.16/28\",\r\n \"40.87.168.32/29\",\r\n + \ \"40.87.168.40/29\",\r\n \"40.87.168.48/28\",\r\n \"40.87.168.64/30\",\r\n + \ \"40.87.168.68/31\",\r\n \"40.87.168.70/31\",\r\n \"40.87.168.72/29\",\r\n + \ \"40.87.168.80/28\",\r\n \"40.87.168.96/27\",\r\n \"40.87.168.128/26\",\r\n + \ \"40.87.168.192/28\",\r\n \"40.87.168.208/31\",\r\n \"40.87.168.210/31\",\r\n + \ \"40.87.168.212/30\",\r\n \"40.87.168.216/29\",\r\n \"40.87.168.224/27\",\r\n + \ \"40.87.169.0/27\",\r\n \"40.87.169.32/29\",\r\n \"40.87.169.40/30\",\r\n + \ \"40.87.169.44/30\",\r\n \"40.87.169.48/29\",\r\n \"40.87.169.56/31\",\r\n + \ \"40.87.169.58/31\",\r\n \"40.87.169.60/30\",\r\n \"40.87.169.64/27\",\r\n + \ \"40.87.169.96/31\",\r\n \"40.87.169.98/31\",\r\n \"40.87.169.100/31\",\r\n + \ \"40.87.169.102/31\",\r\n \"40.87.169.104/29\",\r\n \"40.87.169.112/28\",\r\n + \ \"40.87.169.128/29\",\r\n \"40.87.169.136/31\",\r\n \"40.87.169.138/31\",\r\n + \ \"40.87.169.140/30\",\r\n \"40.87.169.144/28\",\r\n \"40.87.169.160/27\",\r\n + \ \"40.87.169.192/26\",\r\n \"40.87.170.0/25\",\r\n \"40.87.170.128/28\",\r\n + \ \"40.87.170.144/31\",\r\n \"40.87.170.146/31\",\r\n \"40.87.170.148/30\",\r\n + \ \"40.87.170.152/29\",\r\n \"40.87.170.160/28\",\r\n \"40.87.170.176/29\",\r\n + \ \"40.87.170.184/30\",\r\n \"40.87.170.188/30\",\r\n \"40.87.170.192/31\",\r\n + \ \"40.87.170.194/31\",\r\n \"40.87.170.196/30\",\r\n \"40.87.170.200/29\",\r\n + \ \"40.87.170.208/30\",\r\n \"40.87.170.212/31\",\r\n \"40.87.170.214/31\",\r\n + \ \"40.87.170.216/30\",\r\n \"40.87.170.220/30\",\r\n \"40.87.170.224/30\",\r\n + \ \"40.87.170.228/30\",\r\n \"40.87.170.232/29\",\r\n \"40.87.170.240/29\",\r\n + \ \"40.87.170.248/30\",\r\n \"40.87.170.252/30\",\r\n \"40.87.171.0/31\",\r\n + \ \"40.87.171.2/31\",\r\n \"40.87.171.4/30\",\r\n \"40.87.171.8/29\",\r\n + \ \"40.87.171.16/28\",\r\n \"40.87.171.32/30\",\r\n \"40.87.171.36/30\",\r\n + \ \"40.87.171.40/31\",\r\n \"40.87.171.42/31\",\r\n \"40.87.171.44/30\",\r\n + \ \"40.87.171.48/28\",\r\n \"40.87.171.64/29\",\r\n \"40.87.171.72/29\",\r\n + \ \"40.87.171.80/28\",\r\n \"40.87.171.96/27\",\r\n \"40.87.171.128/27\",\r\n + \ \"40.87.171.160/31\",\r\n \"40.87.171.162/31\",\r\n \"40.87.171.164/31\",\r\n + \ \"40.87.171.166/31\",\r\n \"40.87.171.168/29\",\r\n \"40.87.171.176/28\",\r\n + \ \"40.87.171.192/27\",\r\n \"40.87.171.224/28\",\r\n \"40.87.171.240/29\",\r\n + \ \"40.87.171.248/31\",\r\n \"40.87.171.250/31\",\r\n \"40.87.171.252/30\",\r\n + \ \"40.87.172.0/22\",\r\n \"40.87.176.0/25\",\r\n \"40.87.176.128/27\",\r\n + \ \"40.87.176.160/29\",\r\n \"40.87.176.168/30\",\r\n \"40.87.176.172/31\",\r\n + \ \"40.87.176.174/31\",\r\n \"40.87.176.176/29\",\r\n \"40.87.176.184/30\",\r\n + \ \"40.87.176.188/30\",\r\n \"40.87.176.192/28\",\r\n \"40.87.176.208/29\",\r\n + \ \"40.87.176.216/29\",\r\n \"40.87.176.224/29\",\r\n \"40.87.176.232/31\",\r\n + \ \"40.87.176.234/31\",\r\n \"40.87.176.236/30\",\r\n \"40.87.176.240/28\",\r\n + \ \"40.87.177.0/28\",\r\n \"40.87.177.16/28\",\r\n \"40.87.177.32/27\",\r\n + \ \"40.87.177.64/27\",\r\n \"40.87.177.96/28\",\r\n \"40.87.177.112/29\",\r\n + \ \"40.87.177.120/31\",\r\n \"40.87.177.122/31\",\r\n \"40.87.177.124/30\",\r\n + \ \"40.87.177.128/28\",\r\n \"40.87.177.144/29\",\r\n \"40.87.177.152/31\",\r\n + \ \"40.87.177.154/31\",\r\n \"40.87.177.156/30\",\r\n \"40.87.177.160/27\",\r\n + \ \"40.87.177.192/29\",\r\n \"40.87.177.200/30\",\r\n \"40.87.177.204/30\",\r\n + \ \"40.87.177.208/30\",\r\n \"40.87.177.212/30\",\r\n \"40.87.177.216/29\",\r\n + \ \"40.87.177.224/27\",\r\n \"40.87.178.0/25\",\r\n \"40.87.178.128/26\",\r\n + \ \"40.87.178.192/28\",\r\n \"40.87.178.208/29\",\r\n \"40.87.178.216/31\",\r\n + \ \"40.87.180.0/30\",\r\n \"40.87.180.4/31\",\r\n \"40.87.180.6/31\",\r\n + \ \"40.87.180.8/30\",\r\n \"40.87.180.12/31\",\r\n \"40.87.180.14/31\",\r\n + \ \"40.87.180.16/30\",\r\n \"40.87.180.20/31\",\r\n \"40.87.180.22/31\",\r\n + \ \"40.87.180.24/30\",\r\n \"40.87.180.28/30\",\r\n \"40.87.180.32/29\",\r\n + \ \"40.87.180.40/31\",\r\n \"40.87.180.42/31\",\r\n \"40.87.180.44/30\",\r\n + \ \"40.87.180.48/28\",\r\n \"40.87.180.64/30\",\r\n \"40.87.180.68/30\",\r\n + \ \"40.87.180.72/31\",\r\n \"40.87.180.74/31\",\r\n \"40.87.180.76/30\",\r\n + \ \"40.87.180.80/28\",\r\n \"40.87.180.96/27\",\r\n \"40.87.180.128/26\",\r\n + \ \"40.87.180.192/30\",\r\n \"40.87.180.196/30\",\r\n \"40.87.180.200/31\",\r\n + \ \"40.87.180.202/31\",\r\n \"40.87.180.204/30\",\r\n \"40.87.180.208/28\",\r\n + \ \"40.87.180.224/28\",\r\n \"40.87.180.240/29\",\r\n \"40.87.180.248/30\",\r\n + \ \"40.87.180.252/30\",\r\n \"40.87.181.0/30\",\r\n \"40.87.181.4/30\",\r\n + \ \"40.87.181.8/29\",\r\n \"40.87.181.16/28\",\r\n \"40.87.181.32/28\",\r\n + \ \"40.87.181.48/29\",\r\n \"40.87.181.56/31\",\r\n \"40.87.182.0/30\",\r\n + \ \"40.87.182.4/30\",\r\n \"40.87.182.8/29\",\r\n \"40.87.182.16/29\",\r\n + \ \"40.87.182.24/29\",\r\n \"40.87.182.32/28\",\r\n \"40.87.182.48/29\",\r\n + \ \"40.87.182.56/30\",\r\n \"40.87.182.60/31\",\r\n \"40.87.182.62/31\",\r\n + \ \"40.87.182.64/26\",\r\n \"40.87.182.128/25\",\r\n \"40.87.183.0/28\",\r\n + \ \"40.87.183.16/29\",\r\n \"40.87.183.24/30\",\r\n \"40.87.183.28/30\",\r\n + \ \"40.87.183.32/31\",\r\n \"40.87.183.34/31\",\r\n \"40.87.183.36/30\",\r\n + \ \"40.87.183.40/31\",\r\n \"40.87.183.42/31\",\r\n \"40.87.183.44/30\",\r\n + \ \"40.87.183.48/30\",\r\n \"40.87.183.52/31\",\r\n \"40.87.183.54/31\",\r\n + \ \"40.87.183.56/29\",\r\n \"40.87.183.64/26\",\r\n \"40.87.183.128/28\",\r\n + \ \"40.87.183.144/28\",\r\n \"40.87.183.160/27\",\r\n \"40.87.183.192/27\",\r\n + \ \"40.87.183.224/29\",\r\n \"40.87.183.232/30\",\r\n \"40.87.183.236/31\",\r\n + \ \"40.87.183.238/31\",\r\n \"40.87.183.240/30\",\r\n \"40.87.183.244/30\",\r\n + \ \"40.87.183.248/29\",\r\n \"40.87.184.0/22\",\r\n \"40.87.188.0/22\",\r\n + \ \"40.87.192.0/22\",\r\n \"40.87.196.0/22\",\r\n \"40.87.200.0/22\",\r\n + \ \"40.87.204.0/22\",\r\n \"40.87.208.0/22\",\r\n \"40.87.212.0/22\",\r\n + \ \"40.87.216.0/22\",\r\n \"40.87.220.0/22\",\r\n \"40.87.224.0/22\",\r\n + \ \"40.87.228.0/22\",\r\n \"40.87.232.0/21\",\r\n \"40.88.0.0/16\",\r\n + \ \"40.89.0.0/19\",\r\n \"40.89.32.0/19\",\r\n \"40.89.64.0/18\",\r\n + \ \"40.89.128.0/18\",\r\n \"40.89.192.0/19\",\r\n \"40.89.224.0/19\",\r\n + \ \"40.90.16.0/27\",\r\n \"40.90.16.32/27\",\r\n \"40.90.16.64/27\",\r\n + \ \"40.90.16.96/27\",\r\n \"40.90.16.128/27\",\r\n \"40.90.16.160/27\",\r\n + \ \"40.90.16.192/26\",\r\n \"40.90.17.0/27\",\r\n \"40.90.17.32/27\",\r\n + \ \"40.90.17.64/27\",\r\n \"40.90.17.96/27\",\r\n \"40.90.17.128/28\",\r\n + \ \"40.90.17.144/28\",\r\n \"40.90.17.160/27\",\r\n \"40.90.17.192/27\",\r\n + \ \"40.90.17.224/27\",\r\n \"40.90.18.0/28\",\r\n \"40.90.18.16/28\",\r\n + \ \"40.90.18.32/27\",\r\n \"40.90.18.64/26\",\r\n \"40.90.18.128/26\",\r\n + \ \"40.90.18.192/26\",\r\n \"40.90.19.0/27\",\r\n \"40.90.19.32/27\",\r\n + \ \"40.90.19.64/26\",\r\n \"40.90.19.128/25\",\r\n \"40.90.20.0/25\",\r\n + \ \"40.90.20.128/25\",\r\n \"40.90.21.0/25\",\r\n \"40.90.21.128/25\",\r\n + \ \"40.90.22.0/25\",\r\n \"40.90.22.128/25\",\r\n \"40.90.23.0/25\",\r\n + \ \"40.90.23.128/25\",\r\n \"40.90.24.0/25\",\r\n \"40.90.24.128/25\",\r\n + \ \"40.90.25.0/26\",\r\n \"40.90.25.64/26\",\r\n \"40.90.25.128/26\",\r\n + \ \"40.90.25.192/26\",\r\n \"40.90.26.0/26\",\r\n \"40.90.26.64/26\",\r\n + \ \"40.90.26.128/25\",\r\n \"40.90.27.0/26\",\r\n \"40.90.27.64/26\",\r\n + \ \"40.90.27.128/26\",\r\n \"40.90.27.192/26\",\r\n \"40.90.28.0/26\",\r\n + \ \"40.90.28.64/26\",\r\n \"40.90.28.128/26\",\r\n \"40.90.28.192/26\",\r\n + \ \"40.90.29.0/26\",\r\n \"40.90.29.64/26\",\r\n \"40.90.29.128/26\",\r\n + \ \"40.90.29.192/26\",\r\n \"40.90.30.0/25\",\r\n \"40.90.30.128/27\",\r\n + \ \"40.90.30.160/27\",\r\n \"40.90.30.192/26\",\r\n \"40.90.31.0/27\",\r\n + \ \"40.90.31.32/27\",\r\n \"40.90.31.64/27\",\r\n \"40.90.31.96/27\",\r\n + \ \"40.90.31.128/25\",\r\n \"40.90.128.0/28\",\r\n \"40.90.128.16/28\",\r\n + \ \"40.90.128.32/28\",\r\n \"40.90.128.48/28\",\r\n \"40.90.128.64/28\",\r\n + \ \"40.90.128.80/28\",\r\n \"40.90.128.96/28\",\r\n \"40.90.128.112/28\",\r\n + \ \"40.90.128.128/28\",\r\n \"40.90.128.144/28\",\r\n \"40.90.128.160/28\",\r\n + \ \"40.90.128.176/28\",\r\n \"40.90.128.192/28\",\r\n \"40.90.128.208/28\",\r\n + \ \"40.90.128.224/28\",\r\n \"40.90.128.240/28\",\r\n \"40.90.129.0/27\",\r\n + \ \"40.90.129.32/28\",\r\n \"40.90.129.48/28\",\r\n \"40.90.129.64/27\",\r\n + \ \"40.90.129.96/27\",\r\n \"40.90.129.128/26\",\r\n \"40.90.129.192/27\",\r\n + \ \"40.90.129.224/27\",\r\n \"40.90.130.0/27\",\r\n \"40.90.130.32/28\",\r\n + \ \"40.90.130.48/28\",\r\n \"40.90.130.64/28\",\r\n \"40.90.130.80/28\",\r\n + \ \"40.90.130.96/28\",\r\n \"40.90.130.112/28\",\r\n \"40.90.130.128/28\",\r\n + \ \"40.90.130.144/28\",\r\n \"40.90.130.160/27\",\r\n \"40.90.130.192/28\",\r\n + \ \"40.90.130.208/28\",\r\n \"40.90.130.224/28\",\r\n \"40.90.130.240/28\",\r\n + \ \"40.90.131.0/27\",\r\n \"40.90.131.32/27\",\r\n \"40.90.131.64/27\",\r\n + \ \"40.90.131.96/27\",\r\n \"40.90.131.128/27\",\r\n \"40.90.131.160/27\",\r\n + \ \"40.90.131.192/27\",\r\n \"40.90.131.224/27\",\r\n \"40.90.132.0/27\",\r\n + \ \"40.90.132.32/28\",\r\n \"40.90.132.48/28\",\r\n \"40.90.132.64/28\",\r\n + \ \"40.90.132.80/28\",\r\n \"40.90.132.96/27\",\r\n \"40.90.132.128/26\",\r\n + \ \"40.90.132.192/26\",\r\n \"40.90.133.0/27\",\r\n \"40.90.133.32/27\",\r\n + \ \"40.90.133.64/27\",\r\n \"40.90.133.96/28\",\r\n \"40.90.133.112/28\",\r\n + \ \"40.90.133.128/28\",\r\n \"40.90.133.144/28\",\r\n \"40.90.133.160/27\",\r\n + \ \"40.90.133.192/26\",\r\n \"40.90.134.0/26\",\r\n \"40.90.134.64/26\",\r\n + \ \"40.90.134.128/26\",\r\n \"40.90.134.192/26\",\r\n \"40.90.135.0/26\",\r\n + \ \"40.90.135.64/26\",\r\n \"40.90.135.128/25\",\r\n \"40.90.136.0/28\",\r\n + \ \"40.90.136.16/28\",\r\n \"40.90.136.32/27\",\r\n \"40.90.136.64/26\",\r\n + \ \"40.90.136.128/27\",\r\n \"40.90.136.160/28\",\r\n \"40.90.136.176/28\",\r\n + \ \"40.90.136.192/27\",\r\n \"40.90.136.224/27\",\r\n \"40.90.137.0/27\",\r\n + \ \"40.90.137.32/27\",\r\n \"40.90.137.64/27\",\r\n \"40.90.137.96/27\",\r\n + \ \"40.90.137.128/27\",\r\n \"40.90.137.160/27\",\r\n \"40.90.137.192/27\",\r\n + \ \"40.90.137.224/27\",\r\n \"40.90.138.0/27\",\r\n \"40.90.138.32/27\",\r\n + \ \"40.90.138.64/27\",\r\n \"40.90.138.96/27\",\r\n \"40.90.138.128/27\",\r\n + \ \"40.90.138.160/27\",\r\n \"40.90.138.192/28\",\r\n \"40.90.138.208/28\",\r\n + \ \"40.90.138.224/27\",\r\n \"40.90.139.0/27\",\r\n \"40.90.139.32/27\",\r\n + \ \"40.90.139.64/27\",\r\n \"40.90.139.96/27\",\r\n \"40.90.139.128/27\",\r\n + \ \"40.90.139.160/27\",\r\n \"40.90.139.192/27\",\r\n \"40.90.139.224/27\",\r\n + \ \"40.90.140.0/27\",\r\n \"40.90.140.32/27\",\r\n \"40.90.140.64/27\",\r\n + \ \"40.90.140.96/27\",\r\n \"40.90.140.128/27\",\r\n \"40.90.140.160/27\",\r\n + \ \"40.90.140.192/27\",\r\n \"40.90.140.224/27\",\r\n \"40.90.141.0/27\",\r\n + \ \"40.90.141.32/27\",\r\n \"40.90.141.64/27\",\r\n \"40.90.141.96/27\",\r\n + \ \"40.90.141.128/27\",\r\n \"40.90.141.160/27\",\r\n \"40.90.141.192/26\",\r\n + \ \"40.90.142.0/27\",\r\n \"40.90.142.32/27\",\r\n \"40.90.142.64/27\",\r\n + \ \"40.90.142.96/27\",\r\n \"40.90.142.128/27\",\r\n \"40.90.142.160/27\",\r\n + \ \"40.90.142.192/28\",\r\n \"40.90.142.208/28\",\r\n \"40.90.142.224/28\",\r\n + \ \"40.90.142.240/28\",\r\n \"40.90.143.0/27\",\r\n \"40.90.143.32/27\",\r\n + \ \"40.90.143.64/27\",\r\n \"40.90.143.96/27\",\r\n \"40.90.143.128/27\",\r\n + \ \"40.90.143.160/27\",\r\n \"40.90.143.192/26\",\r\n \"40.90.144.0/27\",\r\n + \ \"40.90.144.32/27\",\r\n \"40.90.144.64/26\",\r\n \"40.90.144.128/26\",\r\n + \ \"40.90.144.192/27\",\r\n \"40.90.144.224/27\",\r\n \"40.90.145.0/27\",\r\n + \ \"40.90.145.32/27\",\r\n \"40.90.145.64/27\",\r\n \"40.90.145.96/27\",\r\n + \ \"40.90.145.128/27\",\r\n \"40.90.145.160/27\",\r\n \"40.90.145.192/27\",\r\n + \ \"40.90.145.224/27\",\r\n \"40.90.146.0/28\",\r\n \"40.90.146.16/28\",\r\n + \ \"40.90.146.32/27\",\r\n \"40.90.146.64/26\",\r\n \"40.90.146.128/27\",\r\n + \ \"40.90.146.160/27\",\r\n \"40.90.146.192/27\",\r\n \"40.90.146.224/27\",\r\n + \ \"40.90.147.0/27\",\r\n \"40.90.147.32/27\",\r\n \"40.90.147.64/27\",\r\n + \ \"40.90.147.96/27\",\r\n \"40.90.147.128/26\",\r\n \"40.90.147.192/27\",\r\n + \ \"40.90.147.224/27\",\r\n \"40.90.148.0/26\",\r\n \"40.90.148.64/27\",\r\n + \ \"40.90.148.96/27\",\r\n \"40.90.148.128/27\",\r\n \"40.90.148.160/28\",\r\n + \ \"40.90.148.176/28\",\r\n \"40.90.148.192/27\",\r\n \"40.90.148.224/27\",\r\n + \ \"40.90.149.0/27\",\r\n \"40.90.149.32/27\",\r\n \"40.90.149.64/27\",\r\n + \ \"40.90.149.96/27\",\r\n \"40.90.149.128/25\",\r\n \"40.90.150.0/27\",\r\n + \ \"40.90.150.32/27\",\r\n \"40.90.150.64/27\",\r\n \"40.90.150.96/27\",\r\n + \ \"40.90.150.128/25\",\r\n \"40.90.151.0/26\",\r\n \"40.90.151.64/27\",\r\n + \ \"40.90.151.96/27\",\r\n \"40.90.151.128/28\",\r\n \"40.90.151.144/28\",\r\n + \ \"40.90.151.160/27\",\r\n \"40.90.151.192/27\",\r\n \"40.90.151.224/27\",\r\n + \ \"40.90.152.0/25\",\r\n \"40.90.152.128/27\",\r\n \"40.90.152.160/27\",\r\n + \ \"40.90.152.192/27\",\r\n \"40.90.152.224/27\",\r\n \"40.90.153.0/26\",\r\n + \ \"40.90.153.64/27\",\r\n \"40.90.153.96/27\",\r\n \"40.90.153.128/25\",\r\n + \ \"40.90.154.0/26\",\r\n \"40.90.154.64/26\",\r\n \"40.90.154.128/26\",\r\n + \ \"40.90.154.192/26\",\r\n \"40.90.155.0/26\",\r\n \"40.90.155.64/26\",\r\n + \ \"40.90.155.128/26\",\r\n \"40.90.155.192/26\",\r\n \"40.90.156.0/26\",\r\n + \ \"40.90.156.64/27\",\r\n \"40.90.156.96/27\",\r\n \"40.90.156.128/26\",\r\n + \ \"40.90.156.192/26\",\r\n \"40.90.157.0/27\",\r\n \"40.90.157.32/27\",\r\n + \ \"40.90.157.64/26\",\r\n \"40.90.157.128/26\",\r\n \"40.90.157.192/27\",\r\n + \ \"40.90.157.224/27\",\r\n \"40.90.158.0/26\",\r\n \"40.90.158.64/26\",\r\n + \ \"40.90.158.128/25\",\r\n \"40.90.159.0/24\",\r\n \"40.90.160.0/19\",\r\n + \ \"40.90.192.0/19\",\r\n \"40.90.224.0/19\",\r\n \"40.91.0.0/22\",\r\n + \ \"40.91.4.0/22\",\r\n \"40.91.12.0/28\",\r\n \"40.91.12.16/28\",\r\n + \ \"40.91.12.32/28\",\r\n \"40.91.12.48/28\",\r\n \"40.91.12.64/26\",\r\n + \ \"40.91.12.128/28\",\r\n \"40.91.12.160/27\",\r\n \"40.91.12.208/28\",\r\n + \ \"40.91.12.240/28\",\r\n \"40.91.13.0/28\",\r\n \"40.91.13.64/27\",\r\n + \ \"40.91.13.96/28\",\r\n \"40.91.13.128/27\",\r\n \"40.91.13.240/28\",\r\n + \ \"40.91.14.0/24\",\r\n \"40.91.16.0/22\",\r\n \"40.91.20.0/22\",\r\n + \ \"40.91.24.0/22\",\r\n \"40.91.28.0/22\",\r\n \"40.91.32.0/22\",\r\n + \ \"40.91.64.0/18\",\r\n \"40.91.160.0/19\",\r\n \"40.91.192.0/18\",\r\n + \ \"40.93.0.0/23\",\r\n \"40.93.2.0/24\",\r\n \"40.93.3.0/24\",\r\n + \ \"40.93.4.0/24\",\r\n \"40.93.5.0/24\",\r\n \"40.93.6.0/24\",\r\n + \ \"40.93.7.0/24\",\r\n \"40.93.8.0/24\",\r\n \"40.93.9.0/24\",\r\n + \ \"40.93.10.0/24\",\r\n \"40.93.11.0/24\",\r\n \"40.93.12.0/24\",\r\n + \ \"40.93.13.0/24\",\r\n \"40.93.14.0/24\",\r\n \"40.93.15.0/24\",\r\n + \ \"40.93.16.0/24\",\r\n \"40.93.17.0/24\",\r\n \"40.93.64.0/24\",\r\n + \ \"40.93.65.0/24\",\r\n \"40.93.128.0/24\",\r\n \"40.93.129.0/24\",\r\n + \ \"40.93.192.0/24\",\r\n \"40.93.193.0/24\",\r\n \"40.93.194.0/23\",\r\n + \ \"40.93.196.0/23\",\r\n \"40.93.198.0/23\",\r\n \"40.93.200.0/23\",\r\n + \ \"40.93.202.0/24\",\r\n \"40.93.203.0/24\",\r\n \"40.93.204.0/22\",\r\n + \ \"40.93.208.0/22\",\r\n \"40.93.212.0/24\",\r\n \"40.93.213.0/24\",\r\n + \ \"40.93.214.0/24\",\r\n \"40.96.46.0/24\",\r\n \"40.96.50.0/24\",\r\n + \ \"40.96.52.0/24\",\r\n \"40.96.55.0/24\",\r\n \"40.96.61.0/24\",\r\n + \ \"40.96.63.0/24\",\r\n \"40.96.255.0/24\",\r\n \"40.101.0.0/24\",\r\n + \ \"40.101.1.0/24\",\r\n \"40.112.36.0/25\",\r\n \"40.112.36.128/25\",\r\n + \ \"40.112.37.0/26\",\r\n \"40.112.37.64/26\",\r\n \"40.112.37.128/26\",\r\n + \ \"40.112.37.192/26\",\r\n \"40.112.38.192/26\",\r\n \"40.112.39.0/25\",\r\n + \ \"40.112.39.128/26\",\r\n \"40.112.48.0/20\",\r\n \"40.112.64.0/19\",\r\n + \ \"40.112.96.0/19\",\r\n \"40.112.128.0/17\",\r\n \"40.113.0.0/18\",\r\n + \ \"40.113.64.0/19\",\r\n \"40.113.96.0/19\",\r\n \"40.113.128.0/18\",\r\n + \ \"40.113.192.0/18\",\r\n \"40.114.0.0/17\",\r\n \"40.114.128.0/17\",\r\n + \ \"40.115.0.0/18\",\r\n \"40.115.64.0/19\",\r\n \"40.115.96.0/19\",\r\n + \ \"40.115.128.0/17\",\r\n \"40.116.0.0/16\",\r\n \"40.117.0.0/19\",\r\n + \ \"40.117.32.0/19\",\r\n \"40.117.64.0/18\",\r\n \"40.117.128.0/17\",\r\n + \ \"40.118.0.0/17\",\r\n \"40.118.128.0/17\",\r\n \"40.119.0.0/18\",\r\n + \ \"40.119.64.0/22\",\r\n \"40.119.68.0/22\",\r\n \"40.119.72.0/22\",\r\n + \ \"40.119.76.0/22\",\r\n \"40.119.80.0/22\",\r\n \"40.119.84.0/22\",\r\n + \ \"40.119.88.0/22\",\r\n \"40.119.92.0/22\",\r\n \"40.119.96.0/22\",\r\n + \ \"40.119.100.0/27\",\r\n \"40.119.100.32/28\",\r\n \"40.119.100.48/30\",\r\n + \ \"40.119.100.52/30\",\r\n \"40.119.100.56/29\",\r\n \"40.119.100.64/28\",\r\n + \ \"40.119.100.80/29\",\r\n \"40.119.100.88/30\",\r\n \"40.119.100.92/30\",\r\n + \ \"40.119.100.96/29\",\r\n \"40.119.104.0/22\",\r\n \"40.119.108.0/22\",\r\n + \ \"40.119.112.0/22\",\r\n \"40.119.116.0/22\",\r\n \"40.119.120.0/22\",\r\n + \ \"40.119.124.0/22\",\r\n \"40.119.128.0/19\",\r\n \"40.119.160.0/19\",\r\n + \ \"40.119.192.0/18\",\r\n \"40.120.0.0/20\",\r\n \"40.120.16.0/20\",\r\n + \ \"40.120.32.0/19\",\r\n \"40.120.64.0/18\",\r\n \"40.121.0.0/16\",\r\n + \ \"40.122.0.0/20\",\r\n \"40.122.16.0/20\",\r\n \"40.122.32.0/19\",\r\n + \ \"40.122.64.0/18\",\r\n \"40.122.128.0/17\",\r\n \"40.123.0.0/17\",\r\n + \ \"40.123.128.0/22\",\r\n \"40.123.132.0/22\",\r\n \"40.123.136.0/24\",\r\n + \ \"40.123.140.0/22\",\r\n \"40.123.144.0/26\",\r\n \"40.123.144.64/29\",\r\n + \ \"40.123.144.72/29\",\r\n \"40.123.144.80/28\",\r\n \"40.123.144.96/29\",\r\n + \ \"40.123.144.104/29\",\r\n \"40.123.144.112/28\",\r\n \"40.123.144.128/28\",\r\n + \ \"40.123.144.144/29\",\r\n \"40.123.144.152/30\",\r\n \"40.123.144.156/30\",\r\n + \ \"40.123.144.160/31\",\r\n \"40.123.148.0/27\",\r\n \"40.123.148.32/28\",\r\n + \ \"40.123.148.48/29\",\r\n \"40.123.192.0/19\",\r\n \"40.123.224.0/20\",\r\n + \ \"40.123.240.0/20\",\r\n \"40.124.0.0/16\",\r\n \"40.125.0.0/19\",\r\n + \ \"40.125.32.0/19\",\r\n \"40.125.64.0/18\",\r\n \"40.126.0.0/24\",\r\n + \ \"40.126.1.0/24\",\r\n \"40.126.2.0/24\",\r\n \"40.126.3.0/24\",\r\n + \ \"40.126.4.0/24\",\r\n \"40.126.5.0/24\",\r\n \"40.126.6.0/24\",\r\n + \ \"40.126.7.0/24\",\r\n \"40.126.8.0/24\",\r\n \"40.126.9.0/24\",\r\n + \ \"40.126.10.0/25\",\r\n \"40.126.10.128/25\",\r\n \"40.126.11.0/25\",\r\n + \ \"40.126.11.128/25\",\r\n \"40.126.12.0/25\",\r\n \"40.126.12.128/25\",\r\n + \ \"40.126.13.0/25\",\r\n \"40.126.13.128/25\",\r\n \"40.126.14.0/25\",\r\n + \ \"40.126.14.128/25\",\r\n \"40.126.15.0/25\",\r\n \"40.126.15.128/25\",\r\n + \ \"40.126.16.0/25\",\r\n \"40.126.16.128/25\",\r\n \"40.126.17.0/25\",\r\n + \ \"40.126.17.128/25\",\r\n \"40.126.18.0/25\",\r\n \"40.126.18.128/25\",\r\n + \ \"40.126.19.0/25\",\r\n \"40.126.19.128/25\",\r\n \"40.126.20.0/25\",\r\n + \ \"40.126.20.128/25\",\r\n \"40.126.21.0/24\",\r\n \"40.126.22.0/24\",\r\n + \ \"40.126.23.0/24\",\r\n \"40.126.24.0/24\",\r\n \"40.126.25.0/24\",\r\n + \ \"40.126.26.0/24\",\r\n \"40.126.27.0/24\",\r\n \"40.126.28.0/24\",\r\n + \ \"40.126.29.0/24\",\r\n \"40.126.30.0/24\",\r\n \"40.126.31.0/24\",\r\n + \ \"40.126.32.0/24\",\r\n \"40.126.33.0/24\",\r\n \"40.126.34.0/24\",\r\n + \ \"40.126.35.0/24\",\r\n \"40.126.36.0/24\",\r\n \"40.126.37.0/24\",\r\n + \ \"40.126.38.0/24\",\r\n \"40.126.39.0/24\",\r\n \"40.126.40.0/24\",\r\n + \ \"40.126.41.0/24\",\r\n \"40.126.42.0/24\",\r\n \"40.126.43.0/24\",\r\n + \ \"40.126.44.0/24\",\r\n \"40.126.45.0/24\",\r\n \"40.126.46.0/24\",\r\n + \ \"40.126.47.0/24\",\r\n \"40.126.48.0/24\",\r\n \"40.126.49.0/24\",\r\n + \ \"40.126.50.0/24\",\r\n \"40.126.51.0/24\",\r\n \"40.126.52.0/24\",\r\n + \ \"40.126.53.0/24\",\r\n \"40.126.54.0/24\",\r\n \"40.126.55.0/24\",\r\n + \ \"40.126.56.0/24\",\r\n \"40.126.57.0/24\",\r\n \"40.126.58.0/24\",\r\n + \ \"40.126.59.0/24\",\r\n \"40.126.60.0/24\",\r\n \"40.126.61.0/26\",\r\n + \ \"40.126.61.64/26\",\r\n \"40.126.61.128/26\",\r\n \"40.126.61.192/26\",\r\n + \ \"40.126.62.0/26\",\r\n \"40.126.62.64/26\",\r\n \"40.126.62.128/25\",\r\n + \ \"40.126.63.0/26\",\r\n \"40.126.63.64/26\",\r\n \"40.126.63.128/26\",\r\n + \ \"40.126.63.192/26\",\r\n \"40.126.128.0/18\",\r\n \"40.126.192.0/24\",\r\n + \ \"40.126.193.0/24\",\r\n \"40.126.194.0/24\",\r\n \"40.126.195.0/24\",\r\n + \ \"40.126.196.0/24\",\r\n \"40.126.197.0/24\",\r\n \"40.126.198.0/24\",\r\n + \ \"40.126.199.0/24\",\r\n \"40.126.200.0/24\",\r\n \"40.126.201.0/24\",\r\n + \ \"40.126.202.0/24\",\r\n \"40.126.203.0/24\",\r\n \"40.126.204.0/24\",\r\n + \ \"40.126.205.0/24\",\r\n \"40.126.206.0/24\",\r\n \"40.126.207.0/24\",\r\n + \ \"40.126.208.0/20\",\r\n \"40.126.224.0/19\",\r\n \"40.127.0.0/19\",\r\n + \ \"40.127.32.0/24\",\r\n \"40.127.64.0/19\",\r\n \"40.127.96.0/20\",\r\n + \ \"40.127.128.0/17\",\r\n \"51.11.0.0/18\",\r\n \"51.11.64.0/19\",\r\n + \ \"51.11.96.0/19\",\r\n \"51.11.128.0/18\",\r\n \"51.11.192.0/18\",\r\n + \ \"51.12.0.0/20\",\r\n \"51.12.16.0/21\",\r\n \"51.12.24.0/21\",\r\n + \ \"51.12.32.0/19\",\r\n \"51.12.64.0/19\",\r\n \"51.12.96.0/21\",\r\n + \ \"51.12.104.0/27\",\r\n \"51.12.104.32/27\",\r\n \"51.12.112.0/20\",\r\n + \ \"51.12.128.0/21\",\r\n \"51.12.136.0/21\",\r\n \"51.12.144.0/20\",\r\n + \ \"51.12.160.0/19\",\r\n \"51.12.192.0/20\",\r\n \"51.12.208.0/20\",\r\n + \ \"51.12.224.0/19\",\r\n \"51.13.0.0/21\",\r\n \"51.13.16.0/20\",\r\n + \ \"51.13.32.0/19\",\r\n \"51.13.64.0/18\",\r\n \"51.13.128.0/19\",\r\n + \ \"51.13.160.0/19\",\r\n \"51.103.0.0/17\",\r\n \"51.103.128.0/18\",\r\n + \ \"51.103.192.0/27\",\r\n \"51.103.192.32/27\",\r\n \"51.103.200.0/21\",\r\n + \ \"51.103.208.0/20\",\r\n \"51.103.224.0/19\",\r\n \"51.104.0.0/19\",\r\n + \ \"51.104.32.0/19\",\r\n \"51.104.64.0/18\",\r\n \"51.104.128.0/18\",\r\n + \ \"51.104.192.0/18\",\r\n \"51.105.0.0/18\",\r\n \"51.105.64.0/20\",\r\n + \ \"51.105.80.0/21\",\r\n \"51.105.88.0/21\",\r\n \"51.105.96.0/19\",\r\n + \ \"51.105.128.0/17\",\r\n \"51.107.0.0/18\",\r\n \"51.107.64.0/19\",\r\n + \ \"51.107.96.0/19\",\r\n \"51.107.128.0/21\",\r\n \"51.107.136.0/21\",\r\n + \ \"51.107.144.0/20\",\r\n \"51.107.160.0/20\",\r\n \"51.107.176.0/20\",\r\n + \ \"51.107.192.0/21\",\r\n \"51.107.200.0/21\",\r\n \"51.107.208.0/20\",\r\n + \ \"51.107.224.0/20\",\r\n \"51.107.240.0/21\",\r\n \"51.107.248.0/21\",\r\n + \ \"51.116.0.0/18\",\r\n \"51.116.64.0/19\",\r\n \"51.116.96.0/19\",\r\n + \ \"51.116.128.0/18\",\r\n \"51.116.192.0/21\",\r\n \"51.116.200.0/21\",\r\n + \ \"51.116.208.0/20\",\r\n \"51.116.224.0/19\",\r\n \"51.120.0.0/17\",\r\n + \ \"51.120.128.0/18\",\r\n \"51.120.192.0/20\",\r\n \"51.120.208.0/21\",\r\n + \ \"51.120.216.0/21\",\r\n \"51.120.224.0/21\",\r\n \"51.120.232.0/21\",\r\n + \ \"51.120.240.0/20\",\r\n \"51.124.0.0/16\",\r\n \"51.132.0.0/18\",\r\n + \ \"51.132.64.0/18\",\r\n \"51.132.128.0/17\",\r\n \"51.136.0.0/16\",\r\n + \ \"51.137.0.0/17\",\r\n \"51.137.128.0/18\",\r\n \"51.137.192.0/18\",\r\n + \ \"51.138.0.0/17\",\r\n \"51.138.128.0/19\",\r\n \"51.138.160.0/21\",\r\n + \ \"51.138.192.0/19\",\r\n \"51.140.0.0/17\",\r\n \"51.140.128.0/18\",\r\n + \ \"51.140.192.0/18\",\r\n \"51.141.0.0/17\",\r\n \"51.141.128.0/27\",\r\n + \ \"51.141.128.32/27\",\r\n \"51.141.128.64/26\",\r\n \"51.141.128.128/25\",\r\n + \ \"51.141.129.64/26\",\r\n \"51.141.129.128/26\",\r\n \"51.141.129.192/26\",\r\n + \ \"51.141.130.0/25\",\r\n \"51.141.134.0/24\",\r\n \"51.141.135.0/24\",\r\n + \ \"51.141.136.0/22\",\r\n \"51.141.156.0/22\",\r\n \"51.141.160.0/19\",\r\n + \ \"51.141.192.0/18\",\r\n \"51.142.0.0/17\",\r\n \"51.142.128.0/17\",\r\n + \ \"51.143.0.0/17\",\r\n \"51.143.128.0/18\",\r\n \"51.143.192.0/21\",\r\n + \ \"51.143.200.0/28\",\r\n \"51.143.201.0/24\",\r\n \"51.143.208.0/20\",\r\n + \ \"51.143.224.0/19\",\r\n \"51.144.0.0/16\",\r\n \"51.145.0.0/17\",\r\n + \ \"51.145.128.0/17\",\r\n \"52.96.11.0/24\",\r\n \"52.101.0.0/22\",\r\n + \ \"52.101.4.0/22\",\r\n \"52.101.8.0/24\",\r\n \"52.101.9.0/24\",\r\n + \ \"52.101.10.0/24\",\r\n \"52.101.11.0/24\",\r\n \"52.101.12.0/22\",\r\n + \ \"52.101.16.0/22\",\r\n \"52.101.20.0/22\",\r\n \"52.101.24.0/22\",\r\n + \ \"52.101.28.0/22\",\r\n \"52.101.32.0/22\",\r\n \"52.101.36.0/22\",\r\n + \ \"52.101.40.0/24\",\r\n \"52.101.41.0/24\",\r\n \"52.101.42.0/24\",\r\n + \ \"52.101.43.0/24\",\r\n \"52.101.44.0/23\",\r\n \"52.101.46.0/23\",\r\n + \ \"52.101.48.0/23\",\r\n \"52.101.50.0/24\",\r\n \"52.101.51.0/24\",\r\n + \ \"52.101.52.0/22\",\r\n \"52.101.56.0/22\",\r\n \"52.101.60.0/24\",\r\n + \ \"52.101.61.0/24\",\r\n \"52.101.62.0/23\",\r\n \"52.101.64.0/24\",\r\n + \ \"52.101.65.0/24\",\r\n \"52.101.66.0/23\",\r\n \"52.101.68.0/24\",\r\n + \ \"52.101.69.0/24\",\r\n \"52.101.70.0/23\",\r\n \"52.101.72.0/23\",\r\n + \ \"52.101.74.0/24\",\r\n \"52.101.75.0/24\",\r\n \"52.101.76.0/22\",\r\n + \ \"52.101.80.0/22\",\r\n \"52.101.128.0/22\",\r\n \"52.101.132.0/24\",\r\n + \ \"52.101.133.0/24\",\r\n \"52.101.134.0/23\",\r\n \"52.101.136.0/23\",\r\n + \ \"52.102.128.0/24\",\r\n \"52.102.129.0/24\",\r\n \"52.102.130.0/24\",\r\n + \ \"52.102.131.0/24\",\r\n \"52.102.132.0/24\",\r\n \"52.102.133.0/24\",\r\n + \ \"52.102.134.0/24\",\r\n \"52.102.135.0/24\",\r\n \"52.102.136.0/24\",\r\n + \ \"52.102.137.0/24\",\r\n \"52.102.138.0/24\",\r\n \"52.102.139.0/24\",\r\n + \ \"52.102.140.0/24\",\r\n \"52.102.141.0/24\",\r\n \"52.102.142.0/24\",\r\n + \ \"52.102.143.0/24\",\r\n \"52.102.158.0/24\",\r\n \"52.102.159.0/24\",\r\n + \ \"52.102.160.0/24\",\r\n \"52.102.161.0/24\",\r\n \"52.102.162.0/24\",\r\n + \ \"52.102.163.0/24\",\r\n \"52.102.192.0/24\",\r\n \"52.102.193.0/24\",\r\n + \ \"52.103.0.0/24\",\r\n \"52.103.1.0/24\",\r\n \"52.103.2.0/24\",\r\n + \ \"52.103.3.0/24\",\r\n \"52.103.4.0/24\",\r\n \"52.103.5.0/24\",\r\n + \ \"52.103.6.0/24\",\r\n \"52.103.7.0/24\",\r\n \"52.103.8.0/24\",\r\n + \ \"52.103.9.0/24\",\r\n \"52.103.10.0/24\",\r\n \"52.103.11.0/24\",\r\n + \ \"52.103.12.0/24\",\r\n \"52.103.13.0/24\",\r\n \"52.103.14.0/24\",\r\n + \ \"52.103.15.0/24\",\r\n \"52.103.16.0/24\",\r\n \"52.103.17.0/24\",\r\n + \ \"52.103.32.0/24\",\r\n \"52.103.33.0/24\",\r\n \"52.103.34.0/24\",\r\n + \ \"52.103.35.0/24\",\r\n \"52.103.64.0/24\",\r\n \"52.103.65.0/24\",\r\n + \ \"52.103.128.0/24\",\r\n \"52.103.129.0/24\",\r\n \"52.103.130.0/24\",\r\n + \ \"52.103.131.0/24\",\r\n \"52.103.132.0/24\",\r\n \"52.103.133.0/24\",\r\n + \ \"52.103.134.0/24\",\r\n \"52.103.136.0/24\",\r\n \"52.103.137.0/24\",\r\n + \ \"52.103.138.0/24\",\r\n \"52.103.139.0/24\",\r\n \"52.103.140.0/24\",\r\n + \ \"52.103.141.0/24\",\r\n \"52.103.142.0/24\",\r\n \"52.103.143.0/24\",\r\n + \ \"52.103.160.0/24\",\r\n \"52.103.161.0/24\",\r\n \"52.103.162.0/24\",\r\n + \ \"52.103.163.0/24\",\r\n \"52.103.192.0/24\",\r\n \"52.103.193.0/24\",\r\n + \ \"52.108.0.0/21\",\r\n \"52.108.16.0/21\",\r\n \"52.108.24.0/21\",\r\n + \ \"52.108.32.0/22\",\r\n \"52.108.36.0/22\",\r\n \"52.108.40.0/23\",\r\n + \ \"52.108.42.0/23\",\r\n \"52.108.44.0/23\",\r\n \"52.108.46.0/23\",\r\n + \ \"52.108.48.0/23\",\r\n \"52.108.50.0/23\",\r\n \"52.108.52.0/23\",\r\n + \ \"52.108.54.0/23\",\r\n \"52.108.56.0/21\",\r\n \"52.108.68.0/23\",\r\n + \ \"52.108.70.0/23\",\r\n \"52.108.72.0/24\",\r\n \"52.108.73.0/24\",\r\n + \ \"52.108.74.0/24\",\r\n \"52.108.75.0/24\",\r\n \"52.108.76.0/24\",\r\n + \ \"52.108.77.0/24\",\r\n \"52.108.78.0/24\",\r\n \"52.108.79.0/24\",\r\n + \ \"52.108.80.0/24\",\r\n \"52.108.81.0/24\",\r\n \"52.108.82.0/24\",\r\n + \ \"52.108.83.0/24\",\r\n \"52.108.84.0/24\",\r\n \"52.108.85.0/24\",\r\n + \ \"52.108.86.0/24\",\r\n \"52.108.87.0/24\",\r\n \"52.108.88.0/24\",\r\n + \ \"52.108.89.0/24\",\r\n \"52.108.90.0/24\",\r\n \"52.108.91.0/24\",\r\n + \ \"52.108.92.0/24\",\r\n \"52.108.93.0/24\",\r\n \"52.108.94.0/24\",\r\n + \ \"52.108.95.0/24\",\r\n \"52.108.96.0/24\",\r\n \"52.108.97.0/24\",\r\n + \ \"52.108.98.0/24\",\r\n \"52.108.99.0/24\",\r\n \"52.108.100.0/23\",\r\n + \ \"52.108.102.0/23\",\r\n \"52.108.104.0/24\",\r\n \"52.108.105.0/24\",\r\n + \ \"52.108.106.0/23\",\r\n \"52.108.108.0/23\",\r\n \"52.108.110.0/24\",\r\n + \ \"52.108.111.0/24\",\r\n \"52.108.112.0/24\",\r\n \"52.108.113.0/24\",\r\n + \ \"52.108.115.0/24\",\r\n \"52.108.116.0/24\",\r\n \"52.108.117.0/24\",\r\n + \ \"52.108.118.0/24\",\r\n \"52.108.121.0/24\",\r\n \"52.108.122.0/24\",\r\n + \ \"52.108.123.0/24\",\r\n \"52.108.124.0/24\",\r\n \"52.108.125.0/24\",\r\n + \ \"52.108.126.0/24\",\r\n \"52.108.127.0/24\",\r\n \"52.108.128.0/24\",\r\n + \ \"52.108.129.0/24\",\r\n \"52.108.130.0/24\",\r\n \"52.108.132.0/24\",\r\n + \ \"52.108.133.0/24\",\r\n \"52.108.134.0/24\",\r\n \"52.108.135.0/24\",\r\n + \ \"52.108.136.0/24\",\r\n \"52.108.137.0/24\",\r\n \"52.108.138.0/24\",\r\n + \ \"52.108.139.0/24\",\r\n \"52.108.165.0/24\",\r\n \"52.108.166.0/23\",\r\n + \ \"52.108.168.0/23\",\r\n \"52.108.170.0/24\",\r\n \"52.108.171.0/24\",\r\n + \ \"52.108.172.0/23\",\r\n \"52.108.174.0/23\",\r\n \"52.108.176.0/24\",\r\n + \ \"52.108.177.0/24\",\r\n \"52.108.178.0/24\",\r\n \"52.108.179.0/24\",\r\n + \ \"52.108.180.0/24\",\r\n \"52.108.181.0/24\",\r\n \"52.108.182.0/24\",\r\n + \ \"52.108.183.0/24\",\r\n \"52.108.184.0/24\",\r\n \"52.108.185.0/24\",\r\n + \ \"52.108.186.0/24\",\r\n \"52.108.187.0/24\",\r\n \"52.108.188.0/24\",\r\n + \ \"52.108.189.0/24\",\r\n \"52.108.190.0/24\",\r\n \"52.108.191.0/24\",\r\n + \ \"52.108.192.0/24\",\r\n \"52.108.193.0/24\",\r\n \"52.108.194.0/24\",\r\n + \ \"52.108.195.0/24\",\r\n \"52.108.196.0/24\",\r\n \"52.108.197.0/24\",\r\n + \ \"52.108.198.0/24\",\r\n \"52.108.199.0/24\",\r\n \"52.108.200.0/24\",\r\n + \ \"52.108.201.0/24\",\r\n \"52.108.202.0/24\",\r\n \"52.108.203.0/24\",\r\n + \ \"52.108.204.0/23\",\r\n \"52.108.206.0/23\",\r\n \"52.108.208.0/21\",\r\n + \ \"52.108.216.0/22\",\r\n \"52.108.220.0/23\",\r\n \"52.108.222.0/23\",\r\n + \ \"52.108.224.0/23\",\r\n \"52.108.226.0/23\",\r\n \"52.108.228.0/23\",\r\n + \ \"52.108.230.0/23\",\r\n \"52.108.232.0/23\",\r\n \"52.108.234.0/23\",\r\n + \ \"52.108.236.0/22\",\r\n \"52.108.240.0/21\",\r\n \"52.108.248.0/21\",\r\n + \ \"52.109.0.0/22\",\r\n \"52.109.4.0/22\",\r\n \"52.109.8.0/22\",\r\n + \ \"52.109.12.0/22\",\r\n \"52.109.16.0/22\",\r\n \"52.109.20.0/22\",\r\n + \ \"52.109.24.0/22\",\r\n \"52.109.28.0/22\",\r\n \"52.109.32.0/22\",\r\n + \ \"52.109.36.0/22\",\r\n \"52.109.40.0/22\",\r\n \"52.109.44.0/22\",\r\n + \ \"52.109.48.0/22\",\r\n \"52.109.52.0/22\",\r\n \"52.109.56.0/22\",\r\n + \ \"52.109.60.0/22\",\r\n \"52.109.64.0/22\",\r\n \"52.109.68.0/22\",\r\n + \ \"52.109.72.0/22\",\r\n \"52.109.76.0/22\",\r\n \"52.109.80.0/23\",\r\n + \ \"52.109.82.0/23\",\r\n \"52.109.84.0/23\",\r\n \"52.109.86.0/23\",\r\n + \ \"52.109.88.0/22\",\r\n \"52.109.92.0/22\",\r\n \"52.109.96.0/22\",\r\n + \ \"52.109.100.0/23\",\r\n \"52.109.102.0/23\",\r\n \"52.109.104.0/23\",\r\n + \ \"52.109.106.0/23\",\r\n \"52.109.108.0/22\",\r\n \"52.109.112.0/22\",\r\n + \ \"52.109.116.0/22\",\r\n \"52.109.120.0/22\",\r\n \"52.109.124.0/22\",\r\n + \ \"52.109.128.0/22\",\r\n \"52.109.132.0/22\",\r\n \"52.109.136.0/22\",\r\n + \ \"52.109.140.0/22\",\r\n \"52.109.144.0/23\",\r\n \"52.109.146.0/23\",\r\n + \ \"52.109.148.0/23\",\r\n \"52.109.150.0/23\",\r\n \"52.109.152.0/23\",\r\n + \ \"52.109.154.0/23\",\r\n \"52.109.156.0/23\",\r\n \"52.109.158.0/23\",\r\n + \ \"52.109.160.0/23\",\r\n \"52.109.162.0/23\",\r\n \"52.109.164.0/24\",\r\n + \ \"52.109.165.0/24\",\r\n \"52.111.192.0/24\",\r\n \"52.111.193.0/24\",\r\n + \ \"52.111.194.0/24\",\r\n \"52.111.195.0/24\",\r\n \"52.111.196.0/24\",\r\n + \ \"52.111.197.0/24\",\r\n \"52.111.198.0/24\",\r\n \"52.111.199.0/24\",\r\n + \ \"52.111.200.0/24\",\r\n \"52.111.201.0/24\",\r\n \"52.111.202.0/24\",\r\n + \ \"52.111.203.0/24\",\r\n \"52.111.204.0/24\",\r\n \"52.111.205.0/24\",\r\n + \ \"52.111.206.0/24\",\r\n \"52.111.207.0/24\",\r\n \"52.111.208.0/24\",\r\n + \ \"52.111.224.0/24\",\r\n \"52.111.225.0/24\",\r\n \"52.111.226.0/24\",\r\n + \ \"52.111.227.0/24\",\r\n \"52.111.228.0/24\",\r\n \"52.111.229.0/24\",\r\n + \ \"52.111.230.0/24\",\r\n \"52.111.231.0/24\",\r\n \"52.111.232.0/24\",\r\n + \ \"52.111.233.0/24\",\r\n \"52.111.234.0/24\",\r\n \"52.111.235.0/24\",\r\n + \ \"52.111.236.0/24\",\r\n \"52.111.237.0/24\",\r\n \"52.111.238.0/24\",\r\n + \ \"52.111.239.0/24\",\r\n \"52.111.240.0/24\",\r\n \"52.111.241.0/24\",\r\n + \ \"52.111.242.0/24\",\r\n \"52.111.243.0/24\",\r\n \"52.111.244.0/24\",\r\n + \ \"52.111.245.0/24\",\r\n \"52.111.246.0/24\",\r\n \"52.111.247.0/24\",\r\n + \ \"52.111.248.0/24\",\r\n \"52.111.249.0/24\",\r\n \"52.111.250.0/24\",\r\n + \ \"52.111.251.0/24\",\r\n \"52.111.252.0/24\",\r\n \"52.111.253.0/24\",\r\n + \ \"52.111.254.0/24\",\r\n \"52.111.255.0/24\",\r\n \"52.112.14.0/23\",\r\n + \ \"52.112.17.0/24\",\r\n \"52.112.18.0/23\",\r\n \"52.112.24.0/21\",\r\n + \ \"52.112.40.0/21\",\r\n \"52.112.48.0/20\",\r\n \"52.112.71.0/24\",\r\n + \ \"52.112.76.0/22\",\r\n \"52.112.83.0/24\",\r\n \"52.112.88.0/22\",\r\n + \ \"52.112.93.0/24\",\r\n \"52.112.94.0/24\",\r\n \"52.112.95.0/24\",\r\n + \ \"52.112.97.0/24\",\r\n \"52.112.98.0/23\",\r\n \"52.112.104.0/24\",\r\n + \ \"52.112.105.0/24\",\r\n \"52.112.106.0/23\",\r\n \"52.112.108.0/24\",\r\n + \ \"52.112.109.0/24\",\r\n \"52.112.110.0/23\",\r\n \"52.112.112.0/24\",\r\n + \ \"52.112.113.0/24\",\r\n \"52.112.114.0/24\",\r\n \"52.112.115.0/24\",\r\n + \ \"52.112.116.0/24\",\r\n \"52.112.117.0/24\",\r\n \"52.112.118.0/24\",\r\n + \ \"52.112.119.0/24\",\r\n \"52.112.120.0/24\",\r\n \"52.112.121.0/24\",\r\n + \ \"52.112.122.0/24\",\r\n \"52.112.144.0/20\",\r\n \"52.112.168.0/22\",\r\n + \ \"52.112.172.0/22\",\r\n \"52.112.176.0/21\",\r\n \"52.112.184.0/22\",\r\n + \ \"52.112.190.0/24\",\r\n \"52.112.191.0/24\",\r\n \"52.112.197.0/24\",\r\n + \ \"52.112.200.0/22\",\r\n \"52.112.204.0/23\",\r\n \"52.112.206.0/24\",\r\n + \ \"52.112.207.0/24\",\r\n \"52.112.212.0/24\",\r\n \"52.112.213.0/24\",\r\n + \ \"52.112.214.0/23\",\r\n \"52.112.216.0/21\",\r\n \"52.112.229.0/24\",\r\n + \ \"52.112.230.0/24\",\r\n \"52.112.231.0/24\",\r\n \"52.112.232.0/24\",\r\n + \ \"52.112.233.0/24\",\r\n \"52.112.236.0/24\",\r\n \"52.112.237.0/24\",\r\n + \ \"52.112.238.0/24\",\r\n \"52.112.240.0/20\",\r\n \"52.113.9.0/24\",\r\n + \ \"52.113.10.0/23\",\r\n \"52.113.13.0/24\",\r\n \"52.113.14.0/24\",\r\n + \ \"52.113.15.0/24\",\r\n \"52.113.16.0/20\",\r\n \"52.113.37.0/24\",\r\n + \ \"52.113.40.0/21\",\r\n \"52.113.48.0/20\",\r\n \"52.113.70.0/23\",\r\n + \ \"52.113.72.0/22\",\r\n \"52.113.76.0/23\",\r\n \"52.113.78.0/23\",\r\n + \ \"52.113.83.0/24\",\r\n \"52.113.87.0/24\",\r\n \"52.113.88.0/22\",\r\n + \ \"52.113.92.0/22\",\r\n \"52.113.96.0/22\",\r\n \"52.113.100.0/24\",\r\n + \ \"52.113.101.0/24\",\r\n \"52.113.102.0/24\",\r\n \"52.113.103.0/24\",\r\n + \ \"52.113.104.0/24\",\r\n \"52.113.105.0/24\",\r\n \"52.113.106.0/24\",\r\n + \ \"52.113.107.0/24\",\r\n \"52.113.108.0/24\",\r\n \"52.113.109.0/24\",\r\n + \ \"52.113.110.0/23\",\r\n \"52.113.112.0/20\",\r\n \"52.113.128.0/24\",\r\n + \ \"52.113.129.0/24\",\r\n \"52.113.130.0/24\",\r\n \"52.113.131.0/24\",\r\n + \ \"52.113.132.0/24\",\r\n \"52.113.133.0/24\",\r\n \"52.113.134.0/24\",\r\n + \ \"52.113.136.0/21\",\r\n \"52.113.144.0/21\",\r\n \"52.113.160.0/19\",\r\n + \ \"52.113.192.0/24\",\r\n \"52.113.193.0/24\",\r\n \"52.113.198.0/24\",\r\n + \ \"52.113.199.0/24\",\r\n \"52.113.200.0/22\",\r\n \"52.113.204.0/24\",\r\n + \ \"52.113.205.0/24\",\r\n \"52.113.206.0/24\",\r\n \"52.113.207.0/24\",\r\n + \ \"52.113.208.0/20\",\r\n \"52.113.224.0/19\",\r\n \"52.114.0.0/21\",\r\n + \ \"52.114.8.0/21\",\r\n \"52.114.16.0/22\",\r\n \"52.114.20.0/22\",\r\n + \ \"52.114.24.0/22\",\r\n \"52.114.28.0/22\",\r\n \"52.114.32.0/22\",\r\n + \ \"52.114.36.0/22\",\r\n \"52.114.40.0/22\",\r\n \"52.114.44.0/22\",\r\n + \ \"52.114.48.0/22\",\r\n \"52.114.52.0/23\",\r\n \"52.114.54.0/23\",\r\n + \ \"52.114.56.0/23\",\r\n \"52.114.58.0/23\",\r\n \"52.114.60.0/23\",\r\n + \ \"52.114.64.0/21\",\r\n \"52.114.72.0/22\",\r\n \"52.114.76.0/22\",\r\n + \ \"52.114.80.0/22\",\r\n \"52.114.84.0/22\",\r\n \"52.114.88.0/22\",\r\n + \ \"52.114.92.0/22\",\r\n \"52.114.96.0/21\",\r\n \"52.114.104.0/22\",\r\n + \ \"52.114.108.0/22\",\r\n \"52.114.112.0/23\",\r\n \"52.114.114.0/23\",\r\n + \ \"52.114.116.0/22\",\r\n \"52.114.120.0/22\",\r\n \"52.114.128.0/22\",\r\n + \ \"52.114.132.0/22\",\r\n \"52.114.136.0/21\",\r\n \"52.114.144.0/22\",\r\n + \ \"52.114.148.0/22\",\r\n \"52.114.152.0/21\",\r\n \"52.114.160.0/22\",\r\n + \ \"52.114.164.0/22\",\r\n \"52.114.168.0/22\",\r\n \"52.114.172.0/22\",\r\n + \ \"52.114.176.0/22\",\r\n \"52.114.180.0/22\",\r\n \"52.114.184.0/23\",\r\n + \ \"52.114.186.0/23\",\r\n \"52.114.192.0/23\",\r\n \"52.114.194.0/23\",\r\n + \ \"52.114.196.0/22\",\r\n \"52.114.200.0/22\",\r\n \"52.114.216.0/22\",\r\n + \ \"52.114.224.0/24\",\r\n \"52.114.226.0/24\",\r\n \"52.114.228.0/24\",\r\n + \ \"52.114.230.0/24\",\r\n \"52.114.231.0/24\",\r\n \"52.114.232.0/24\",\r\n + \ \"52.114.233.0/24\",\r\n \"52.114.234.0/24\",\r\n \"52.114.236.0/24\",\r\n + \ \"52.114.238.0/24\",\r\n \"52.114.240.0/24\",\r\n \"52.114.241.0/24\",\r\n + \ \"52.114.242.0/24\",\r\n \"52.114.244.0/24\",\r\n \"52.114.248.0/22\",\r\n + \ \"52.114.252.0/22\",\r\n \"52.115.0.0/21\",\r\n \"52.115.8.0/22\",\r\n + \ \"52.115.16.0/21\",\r\n \"52.115.24.0/22\",\r\n \"52.115.32.0/22\",\r\n + \ \"52.115.36.0/23\",\r\n \"52.115.38.0/24\",\r\n \"52.115.39.0/24\",\r\n + \ \"52.115.40.0/22\",\r\n \"52.115.44.0/23\",\r\n \"52.115.46.0/24\",\r\n + \ \"52.115.47.0/24\",\r\n \"52.115.48.0/22\",\r\n \"52.115.52.0/23\",\r\n + \ \"52.115.54.0/24\",\r\n \"52.115.55.0/24\",\r\n \"52.115.56.0/22\",\r\n + \ \"52.115.60.0/23\",\r\n \"52.115.62.0/23\",\r\n \"52.115.64.0/22\",\r\n + \ \"52.115.68.0/22\",\r\n \"52.115.72.0/22\",\r\n \"52.115.76.0/22\",\r\n + \ \"52.115.80.0/22\",\r\n \"52.115.84.0/22\",\r\n \"52.115.88.0/22\",\r\n + \ \"52.115.92.0/24\",\r\n \"52.115.93.0/24\",\r\n \"52.115.96.0/24\",\r\n + \ \"52.115.97.0/24\",\r\n \"52.115.98.0/24\",\r\n \"52.115.99.0/24\",\r\n + \ \"52.115.100.0/22\",\r\n \"52.115.104.0/23\",\r\n \"52.115.106.0/23\",\r\n + \ \"52.115.108.0/22\",\r\n \"52.115.112.0/23\",\r\n \"52.115.128.0/21\",\r\n + \ \"52.115.136.0/22\",\r\n \"52.115.140.0/22\",\r\n \"52.115.144.0/20\",\r\n + \ \"52.115.160.0/19\",\r\n \"52.115.192.0/19\",\r\n \"52.120.0.0/19\",\r\n + \ \"52.120.32.0/19\",\r\n \"52.120.64.0/19\",\r\n \"52.120.96.0/19\",\r\n + \ \"52.120.128.0/21\",\r\n \"52.120.136.0/21\",\r\n \"52.120.144.0/21\",\r\n + \ \"52.120.152.0/22\",\r\n \"52.120.156.0/24\",\r\n \"52.120.157.0/24\",\r\n + \ \"52.120.158.0/23\",\r\n \"52.120.160.0/19\",\r\n \"52.120.192.0/20\",\r\n + \ \"52.120.208.0/20\",\r\n \"52.120.224.0/20\",\r\n \"52.120.240.0/20\",\r\n + \ \"52.121.0.0/21\",\r\n \"52.121.16.0/21\",\r\n \"52.121.24.0/21\",\r\n + \ \"52.121.32.0/22\",\r\n \"52.121.36.0/22\",\r\n \"52.121.40.0/21\",\r\n + \ \"52.121.48.0/20\",\r\n \"52.121.64.0/20\",\r\n \"52.121.80.0/22\",\r\n + \ \"52.121.84.0/23\",\r\n \"52.121.86.0/23\",\r\n \"52.121.88.0/21\",\r\n + \ \"52.121.96.0/22\",\r\n \"52.121.100.0/22\",\r\n \"52.121.104.0/23\",\r\n + \ \"52.121.106.0/23\",\r\n \"52.121.108.0/22\",\r\n \"52.121.112.0/22\",\r\n + \ \"52.121.116.0/22\",\r\n \"52.121.120.0/23\",\r\n \"52.121.122.0/23\",\r\n + \ \"52.121.124.0/22\",\r\n \"52.121.128.0/20\",\r\n \"52.121.144.0/21\",\r\n + \ \"52.121.152.0/21\",\r\n \"52.121.160.0/22\",\r\n \"52.121.164.0/24\",\r\n + \ \"52.121.165.0/24\",\r\n \"52.121.168.0/22\",\r\n \"52.121.172.0/22\",\r\n + \ \"52.121.176.0/23\",\r\n \"52.121.178.0/23\",\r\n \"52.121.180.0/23\",\r\n + \ \"52.123.0.0/24\",\r\n \"52.123.1.0/24\",\r\n \"52.123.2.0/24\",\r\n + \ \"52.123.3.0/24\",\r\n \"52.123.4.0/24\",\r\n \"52.123.5.0/24\",\r\n + \ \"52.125.128.0/22\",\r\n \"52.125.132.0/22\",\r\n \"52.125.136.0/24\",\r\n + \ \"52.125.137.0/24\",\r\n \"52.125.138.0/23\",\r\n \"52.125.140.0/23\",\r\n + \ \"52.136.0.0/22\",\r\n \"52.136.4.0/22\",\r\n \"52.136.8.0/21\",\r\n + \ \"52.136.16.0/24\",\r\n \"52.136.17.0/24\",\r\n \"52.136.18.0/24\",\r\n + \ \"52.136.19.0/24\",\r\n \"52.136.20.0/24\",\r\n \"52.136.21.0/24\",\r\n + \ \"52.136.22.0/24\",\r\n \"52.136.23.0/24\",\r\n \"52.136.24.0/24\",\r\n + \ \"52.136.25.0/24\",\r\n \"52.136.26.0/24\",\r\n \"52.136.27.0/24\",\r\n + \ \"52.136.28.0/24\",\r\n \"52.136.29.0/24\",\r\n \"52.136.30.0/24\",\r\n + \ \"52.136.31.0/24\",\r\n \"52.136.32.0/19\",\r\n \"52.136.64.0/18\",\r\n + \ \"52.136.128.0/18\",\r\n \"52.136.192.0/18\",\r\n \"52.137.0.0/18\",\r\n + \ \"52.137.64.0/18\",\r\n \"52.137.128.0/17\",\r\n \"52.138.0.0/18\",\r\n + \ \"52.138.64.0/20\",\r\n \"52.138.80.0/21\",\r\n \"52.138.88.0/21\",\r\n + \ \"52.138.96.0/19\",\r\n \"52.138.128.0/17\",\r\n \"52.139.0.0/18\",\r\n + \ \"52.139.64.0/18\",\r\n \"52.139.128.0/18\",\r\n \"52.139.192.0/18\",\r\n + \ \"52.140.0.0/18\",\r\n \"52.140.64.0/18\",\r\n \"52.140.128.0/18\",\r\n + \ \"52.140.192.0/18\",\r\n \"52.141.0.0/18\",\r\n \"52.141.64.0/18\",\r\n + \ \"52.141.128.0/18\",\r\n \"52.141.192.0/19\",\r\n \"52.141.224.0/20\",\r\n + \ \"52.141.240.0/20\",\r\n \"52.142.0.0/18\",\r\n \"52.142.64.0/18\",\r\n + \ \"52.142.128.0/18\",\r\n \"52.142.192.0/18\",\r\n \"52.143.0.0/18\",\r\n + \ \"52.143.64.0/18\",\r\n \"52.143.128.0/18\",\r\n \"52.143.192.0/24\",\r\n + \ \"52.143.193.0/24\",\r\n \"52.143.194.0/24\",\r\n \"52.143.195.0/24\",\r\n + \ \"52.143.196.0/24\",\r\n \"52.143.197.0/24\",\r\n \"52.143.198.0/24\",\r\n + \ \"52.143.199.0/24\",\r\n \"52.143.200.0/23\",\r\n \"52.143.202.0/24\",\r\n + \ \"52.143.203.0/24\",\r\n \"52.143.204.0/23\",\r\n \"52.143.206.0/24\",\r\n + \ \"52.143.207.0/24\",\r\n \"52.143.208.0/24\",\r\n \"52.143.209.0/24\",\r\n + \ \"52.143.210.0/24\",\r\n \"52.143.211.0/24\",\r\n \"52.143.212.0/23\",\r\n + \ \"52.143.214.0/24\",\r\n \"52.143.215.0/24\",\r\n \"52.143.216.0/23\",\r\n + \ \"52.143.218.0/24\",\r\n \"52.143.219.0/24\",\r\n \"52.143.220.0/24\",\r\n + \ \"52.143.221.0/24\",\r\n \"52.143.222.0/23\",\r\n \"52.143.224.0/19\",\r\n + \ \"52.146.0.0/17\",\r\n \"52.146.128.0/17\",\r\n \"52.147.0.0/19\",\r\n + \ \"52.147.32.0/19\",\r\n \"52.147.64.0/19\",\r\n \"52.147.96.0/19\",\r\n + \ \"52.147.128.0/19\",\r\n \"52.147.160.0/19\",\r\n \"52.147.192.0/18\",\r\n + \ \"52.148.0.0/18\",\r\n \"52.148.64.0/18\",\r\n \"52.148.128.0/18\",\r\n + \ \"52.148.192.0/18\",\r\n \"52.149.0.0/18\",\r\n \"52.149.64.0/18\",\r\n + \ \"52.149.128.0/17\",\r\n \"52.150.0.0/17\",\r\n \"52.150.128.0/17\",\r\n + \ \"52.151.0.0/18\",\r\n \"52.151.64.0/18\",\r\n \"52.151.128.0/17\",\r\n + \ \"52.152.0.0/17\",\r\n \"52.152.128.0/17\",\r\n \"52.153.0.0/18\",\r\n + \ \"52.153.64.0/18\",\r\n \"52.153.128.0/18\",\r\n \"52.153.192.0/18\",\r\n + \ \"52.154.0.0/18\",\r\n \"52.154.64.0/18\",\r\n \"52.154.128.0/17\",\r\n + \ \"52.155.0.0/19\",\r\n \"52.155.32.0/19\",\r\n \"52.155.64.0/19\",\r\n + \ \"52.155.96.0/19\",\r\n \"52.155.128.0/17\",\r\n \"52.156.0.0/19\",\r\n + \ \"52.156.32.0/19\",\r\n \"52.156.64.0/18\",\r\n \"52.156.128.0/19\",\r\n + \ \"52.156.160.0/19\",\r\n \"52.156.192.0/18\",\r\n \"52.157.0.0/18\",\r\n + \ \"52.157.64.0/18\",\r\n \"52.157.128.0/17\",\r\n \"52.158.0.0/17\",\r\n + \ \"52.158.128.0/19\",\r\n \"52.158.160.0/20\",\r\n \"52.158.176.0/20\",\r\n + \ \"52.158.192.0/19\",\r\n \"52.158.224.0/19\",\r\n \"52.159.0.0/18\",\r\n + \ \"52.159.64.0/18\",\r\n \"52.159.128.0/17\",\r\n \"52.160.0.0/16\",\r\n + \ \"52.161.0.0/16\",\r\n \"52.162.0.0/16\",\r\n \"52.163.0.0/16\",\r\n + \ \"52.164.0.0/16\",\r\n \"52.165.0.0/19\",\r\n \"52.165.32.0/20\",\r\n + \ \"52.165.48.0/28\",\r\n \"52.165.49.0/24\",\r\n \"52.165.56.0/21\",\r\n + \ \"52.165.64.0/19\",\r\n \"52.165.96.0/21\",\r\n \"52.165.104.0/25\",\r\n + \ \"52.165.104.128/26\",\r\n \"52.165.128.0/17\",\r\n \"52.166.0.0/16\",\r\n + \ \"52.167.0.0/16\",\r\n \"52.168.0.0/16\",\r\n \"52.169.0.0/16\",\r\n + \ \"52.170.0.0/16\",\r\n \"52.171.0.0/16\",\r\n \"52.172.0.0/17\",\r\n + \ \"52.172.128.0/17\",\r\n \"52.173.0.0/16\",\r\n \"52.174.0.0/16\",\r\n + \ \"52.175.0.0/17\",\r\n \"52.175.128.0/18\",\r\n \"52.175.192.0/18\",\r\n + \ \"52.176.0.0/17\",\r\n \"52.176.128.0/19\",\r\n \"52.176.160.0/21\",\r\n + \ \"52.176.176.0/20\",\r\n \"52.176.192.0/19\",\r\n \"52.176.224.0/24\",\r\n + \ \"52.176.225.0/24\",\r\n \"52.176.232.0/21\",\r\n \"52.176.240.0/20\",\r\n + \ \"52.177.0.0/16\",\r\n \"52.178.0.0/17\",\r\n \"52.178.128.0/17\",\r\n + \ \"52.179.0.0/17\",\r\n \"52.179.128.0/17\",\r\n \"52.180.0.0/17\",\r\n + \ \"52.180.128.0/19\",\r\n \"52.180.160.0/20\",\r\n \"52.180.176.0/21\",\r\n + \ \"52.180.184.0/27\",\r\n \"52.180.184.32/28\",\r\n \"52.180.185.0/24\",\r\n + \ \"52.182.128.0/17\",\r\n \"52.183.0.0/17\",\r\n \"52.183.128.0/18\",\r\n + \ \"52.183.192.0/18\",\r\n \"52.184.0.0/17\",\r\n \"52.184.128.0/19\",\r\n + \ \"52.184.160.0/21\",\r\n \"52.184.168.0/28\",\r\n \"52.184.168.16/28\",\r\n + \ \"52.184.168.32/28\",\r\n \"52.184.168.80/28\",\r\n \"52.184.168.96/27\",\r\n + \ \"52.184.168.128/28\",\r\n \"52.184.169.0/24\",\r\n \"52.184.170.0/24\",\r\n + \ \"52.184.176.0/20\",\r\n \"52.184.192.0/18\",\r\n \"52.185.0.0/19\",\r\n + \ \"52.185.32.0/20\",\r\n \"52.185.48.0/21\",\r\n \"52.185.56.0/26\",\r\n + \ \"52.185.56.64/27\",\r\n \"52.185.56.96/28\",\r\n \"52.185.56.112/28\",\r\n + \ \"52.185.56.128/27\",\r\n \"52.185.56.160/28\",\r\n \"52.185.64.0/19\",\r\n + \ \"52.185.96.0/20\",\r\n \"52.185.112.0/26\",\r\n \"52.185.112.64/27\",\r\n + \ \"52.185.112.96/27\",\r\n \"52.185.120.0/21\",\r\n \"52.185.128.0/18\",\r\n + \ \"52.185.192.0/18\",\r\n \"52.186.0.0/16\",\r\n \"52.187.0.0/17\",\r\n + \ \"52.187.128.0/18\",\r\n \"52.187.192.0/18\",\r\n \"52.188.0.0/16\",\r\n + \ \"52.189.0.0/17\",\r\n \"52.189.128.0/18\",\r\n \"52.189.192.0/18\",\r\n + \ \"52.190.0.0/17\",\r\n \"52.190.128.0/17\",\r\n \"52.191.0.0/17\",\r\n + \ \"52.191.128.0/18\",\r\n \"52.191.192.0/18\",\r\n \"52.224.0.0/16\",\r\n + \ \"52.225.0.0/17\",\r\n \"52.225.128.0/21\",\r\n \"52.225.136.0/27\",\r\n + \ \"52.225.136.32/28\",\r\n \"52.225.136.48/28\",\r\n \"52.225.136.64/28\",\r\n + \ \"52.225.137.0/24\",\r\n \"52.225.144.0/20\",\r\n \"52.225.160.0/19\",\r\n + \ \"52.225.192.0/18\",\r\n \"52.226.0.0/16\",\r\n \"52.228.0.0/17\",\r\n + \ \"52.228.128.0/17\",\r\n \"52.229.0.0/18\",\r\n \"52.229.64.0/18\",\r\n + \ \"52.229.128.0/17\",\r\n \"52.230.0.0/17\",\r\n \"52.230.128.0/17\",\r\n + \ \"52.231.0.0/17\",\r\n \"52.231.128.0/17\",\r\n \"52.232.0.0/17\",\r\n + \ \"52.232.128.0/21\",\r\n \"52.232.136.0/21\",\r\n \"52.232.144.0/24\",\r\n + \ \"52.232.145.0/24\",\r\n \"52.232.146.0/24\",\r\n \"52.232.147.0/24\",\r\n + \ \"52.232.148.0/24\",\r\n \"52.232.149.0/24\",\r\n \"52.232.150.0/24\",\r\n + \ \"52.232.151.0/24\",\r\n \"52.232.152.0/24\",\r\n \"52.232.153.0/24\",\r\n + \ \"52.232.154.0/24\",\r\n \"52.232.155.0/24\",\r\n \"52.232.156.0/24\",\r\n + \ \"52.232.157.0/24\",\r\n \"52.232.158.0/24\",\r\n \"52.232.159.0/24\",\r\n + \ \"52.232.160.0/19\",\r\n \"52.232.192.0/18\",\r\n \"52.233.0.0/18\",\r\n + \ \"52.233.64.0/18\",\r\n \"52.233.128.0/17\",\r\n \"52.234.0.0/17\",\r\n + \ \"52.234.128.0/17\",\r\n \"52.235.0.0/18\",\r\n \"52.235.64.0/18\",\r\n + \ \"52.236.0.0/17\",\r\n \"52.236.128.0/17\",\r\n \"52.237.0.0/18\",\r\n + \ \"52.237.64.0/18\",\r\n \"52.237.128.0/18\",\r\n \"52.237.192.0/18\",\r\n + \ \"52.238.0.0/18\",\r\n \"52.238.192.0/18\",\r\n \"52.239.0.0/17\",\r\n + \ \"52.239.128.0/24\",\r\n \"52.239.129.0/24\",\r\n \"52.239.130.0/23\",\r\n + \ \"52.239.132.0/23\",\r\n \"52.239.134.0/24\",\r\n \"52.239.135.0/26\",\r\n + \ \"52.239.135.64/26\",\r\n \"52.239.135.128/26\",\r\n \"52.239.135.192/26\",\r\n + \ \"52.239.136.0/22\",\r\n \"52.239.140.0/22\",\r\n \"52.239.144.0/23\",\r\n + \ \"52.239.146.0/23\",\r\n \"52.239.148.0/27\",\r\n \"52.239.148.64/26\",\r\n + \ \"52.239.148.128/25\",\r\n \"52.239.149.0/24\",\r\n \"52.239.150.0/23\",\r\n + \ \"52.239.152.0/22\",\r\n \"52.239.156.0/24\",\r\n \"52.239.157.0/25\",\r\n + \ \"52.239.157.128/26\",\r\n \"52.239.157.192/27\",\r\n \"52.239.157.224/27\",\r\n + \ \"52.239.158.0/23\",\r\n \"52.239.160.0/22\",\r\n \"52.239.164.0/25\",\r\n + \ \"52.239.164.128/26\",\r\n \"52.239.164.192/26\",\r\n \"52.239.165.0/26\",\r\n + \ \"52.239.165.160/27\",\r\n \"52.239.165.192/26\",\r\n \"52.239.167.0/24\",\r\n + \ \"52.239.168.0/22\",\r\n \"52.239.172.0/22\",\r\n \"52.239.176.128/25\",\r\n + \ \"52.239.177.0/27\",\r\n \"52.239.177.32/27\",\r\n \"52.239.177.64/26\",\r\n + \ \"52.239.177.128/25\",\r\n \"52.239.178.0/23\",\r\n \"52.239.180.0/22\",\r\n + \ \"52.239.184.0/25\",\r\n \"52.239.184.160/28\",\r\n \"52.239.184.176/28\",\r\n + \ \"52.239.184.192/27\",\r\n \"52.239.184.224/27\",\r\n \"52.239.185.0/28\",\r\n + \ \"52.239.185.32/27\",\r\n \"52.239.186.0/24\",\r\n \"52.239.187.0/25\",\r\n + \ \"52.239.187.128/25\",\r\n \"52.239.188.0/24\",\r\n \"52.239.189.0/24\",\r\n + \ \"52.239.190.0/25\",\r\n \"52.239.190.128/26\",\r\n \"52.239.190.192/26\",\r\n + \ \"52.239.192.0/26\",\r\n \"52.239.192.64/28\",\r\n \"52.239.192.96/27\",\r\n + \ \"52.239.192.128/27\",\r\n \"52.239.192.160/27\",\r\n \"52.239.192.192/26\",\r\n + \ \"52.239.193.0/24\",\r\n \"52.239.194.0/24\",\r\n \"52.239.195.0/24\",\r\n + \ \"52.239.196.0/24\",\r\n \"52.239.197.0/24\",\r\n \"52.239.198.0/25\",\r\n + \ \"52.239.198.128/27\",\r\n \"52.239.198.192/26\",\r\n \"52.239.199.0/24\",\r\n + \ \"52.239.200.0/23\",\r\n \"52.239.202.0/24\",\r\n \"52.239.203.0/24\",\r\n + \ \"52.239.205.0/24\",\r\n \"52.239.206.0/24\",\r\n \"52.239.207.32/28\",\r\n + \ \"52.239.207.64/26\",\r\n \"52.239.207.128/27\",\r\n \"52.239.207.192/26\",\r\n + \ \"52.239.208.0/23\",\r\n \"52.239.210.0/23\",\r\n \"52.239.212.0/23\",\r\n + \ \"52.239.214.0/23\",\r\n \"52.239.216.0/23\",\r\n \"52.239.218.0/23\",\r\n + \ \"52.239.220.0/23\",\r\n \"52.239.222.0/23\",\r\n \"52.239.224.0/24\",\r\n + \ \"52.239.225.0/24\",\r\n \"52.239.226.0/24\",\r\n \"52.239.227.0/24\",\r\n + \ \"52.239.228.0/23\",\r\n \"52.239.230.0/24\",\r\n \"52.239.231.0/24\",\r\n + \ \"52.239.232.0/25\",\r\n \"52.239.232.128/25\",\r\n \"52.239.233.0/25\",\r\n + \ \"52.239.233.128/25\",\r\n \"52.239.234.0/23\",\r\n \"52.239.236.0/23\",\r\n + \ \"52.239.238.0/24\",\r\n \"52.239.239.0/24\",\r\n \"52.239.240.0/24\",\r\n + \ \"52.239.241.0/24\",\r\n \"52.239.242.0/23\",\r\n \"52.239.244.0/23\",\r\n + \ \"52.239.246.0/23\",\r\n \"52.239.248.0/24\",\r\n \"52.239.249.0/24\",\r\n + \ \"52.239.250.0/24\",\r\n \"52.239.251.0/24\",\r\n \"52.239.252.0/24\",\r\n + \ \"52.239.253.0/24\",\r\n \"52.239.254.0/23\",\r\n \"52.240.0.0/17\",\r\n + \ \"52.240.128.0/17\",\r\n \"52.241.0.0/16\",\r\n \"52.242.0.0/18\",\r\n + \ \"52.242.64.0/18\",\r\n \"52.242.128.0/17\",\r\n \"52.243.32.0/19\",\r\n + \ \"52.243.64.0/18\",\r\n \"52.245.8.0/22\",\r\n \"52.245.12.0/22\",\r\n + \ \"52.245.16.0/22\",\r\n \"52.245.20.0/22\",\r\n \"52.245.24.0/22\",\r\n + \ \"52.245.28.0/22\",\r\n \"52.245.32.0/22\",\r\n \"52.245.36.0/22\",\r\n + \ \"52.245.40.0/22\",\r\n \"52.245.44.0/24\",\r\n \"52.245.45.0/25\",\r\n + \ \"52.245.45.128/28\",\r\n \"52.245.45.144/28\",\r\n \"52.245.45.160/27\",\r\n + \ \"52.245.45.192/26\",\r\n \"52.245.46.0/27\",\r\n \"52.245.46.32/28\",\r\n + \ \"52.245.46.48/28\",\r\n \"52.245.46.64/28\",\r\n \"52.245.46.80/28\",\r\n + \ \"52.245.46.96/28\",\r\n \"52.245.46.112/28\",\r\n \"52.245.46.128/28\",\r\n + \ \"52.245.46.160/27\",\r\n \"52.245.46.192/26\",\r\n \"52.245.48.0/22\",\r\n + \ \"52.245.52.0/22\",\r\n \"52.245.56.0/22\",\r\n \"52.245.60.0/22\",\r\n + \ \"52.245.64.0/22\",\r\n \"52.245.68.0/24\",\r\n \"52.245.69.0/27\",\r\n + \ \"52.245.69.32/27\",\r\n \"52.245.69.64/27\",\r\n \"52.245.69.96/28\",\r\n + \ \"52.245.69.144/28\",\r\n \"52.245.69.160/27\",\r\n \"52.245.69.192/26\",\r\n + \ \"52.245.70.0/23\",\r\n \"52.245.72.0/22\",\r\n \"52.245.76.0/22\",\r\n + \ \"52.245.80.0/22\",\r\n \"52.245.84.0/22\",\r\n \"52.245.88.0/22\",\r\n + \ \"52.245.92.0/22\",\r\n \"52.245.96.0/22\",\r\n \"52.245.100.0/22\",\r\n + \ \"52.245.104.0/22\",\r\n \"52.245.108.0/22\",\r\n \"52.245.112.0/22\",\r\n + \ \"52.245.116.0/22\",\r\n \"52.245.120.0/22\",\r\n \"52.245.124.0/22\",\r\n + \ \"52.246.0.0/17\",\r\n \"52.246.128.0/20\",\r\n \"52.246.152.0/21\",\r\n + \ \"52.246.160.0/19\",\r\n \"52.246.192.0/18\",\r\n \"52.247.0.0/17\",\r\n + \ \"52.247.192.0/18\",\r\n \"52.248.0.0/17\",\r\n \"52.248.128.0/17\",\r\n + \ \"52.249.0.0/18\",\r\n \"52.249.64.0/19\",\r\n \"52.249.128.0/17\",\r\n + \ \"52.250.0.0/17\",\r\n \"52.250.128.0/18\",\r\n \"52.250.192.0/18\",\r\n + \ \"52.251.0.0/17\",\r\n \"52.252.0.0/17\",\r\n \"52.252.128.0/17\",\r\n + \ \"52.253.0.0/18\",\r\n \"52.253.64.0/20\",\r\n \"52.253.80.0/20\",\r\n + \ \"52.253.96.0/19\",\r\n \"52.253.128.0/20\",\r\n \"52.253.148.0/23\",\r\n + \ \"52.253.150.0/23\",\r\n \"52.253.152.0/23\",\r\n \"52.253.154.0/23\",\r\n + \ \"52.253.156.0/22\",\r\n \"52.253.160.0/24\",\r\n \"52.253.161.0/24\",\r\n + \ \"52.253.162.0/23\",\r\n \"52.253.164.0/24\",\r\n \"52.253.165.0/24\",\r\n + \ \"52.253.166.0/24\",\r\n \"52.253.167.0/24\",\r\n \"52.253.168.0/24\",\r\n + \ \"52.253.169.0/24\",\r\n \"52.253.170.0/23\",\r\n \"52.253.172.0/24\",\r\n + \ \"52.253.173.0/24\",\r\n \"52.253.174.0/24\",\r\n \"52.253.175.0/24\",\r\n + \ \"52.253.176.0/24\",\r\n \"52.253.177.0/24\",\r\n \"52.253.178.0/24\",\r\n + \ \"52.253.179.0/24\",\r\n \"52.253.180.0/24\",\r\n \"52.253.181.0/24\",\r\n + \ \"52.253.182.0/23\",\r\n \"52.253.184.0/24\",\r\n \"52.253.185.0/24\",\r\n + \ \"52.253.186.0/24\",\r\n \"52.253.187.0/24\",\r\n \"52.253.188.0/23\",\r\n + \ \"52.253.190.0/24\",\r\n \"52.253.191.0/24\",\r\n \"52.253.192.0/24\",\r\n + \ \"52.253.193.0/24\",\r\n \"52.253.194.0/23\",\r\n \"52.253.196.0/24\",\r\n + \ \"52.253.197.0/24\",\r\n \"52.253.198.0/24\",\r\n \"52.253.199.0/24\",\r\n + \ \"52.253.200.0/23\",\r\n \"52.253.202.0/24\",\r\n \"52.253.203.0/24\",\r\n + \ \"52.253.204.0/23\",\r\n \"52.253.206.0/24\",\r\n \"52.253.207.0/24\",\r\n + \ \"52.253.208.0/23\",\r\n \"52.253.210.0/23\",\r\n \"52.253.212.0/24\",\r\n + \ \"52.253.213.0/24\",\r\n \"52.253.214.0/23\",\r\n \"52.253.216.0/23\",\r\n + \ \"52.253.218.0/24\",\r\n \"52.253.219.0/24\",\r\n \"52.253.220.0/23\",\r\n + \ \"52.253.222.0/23\",\r\n \"52.253.224.0/21\",\r\n \"52.253.232.0/21\",\r\n + \ \"52.254.0.0/18\",\r\n \"52.254.64.0/19\",\r\n \"52.254.96.0/20\",\r\n + \ \"52.254.112.0/21\",\r\n \"52.254.120.0/21\",\r\n \"52.254.128.0/17\",\r\n + \ \"52.255.0.0/19\",\r\n \"52.255.32.0/19\",\r\n \"52.255.64.0/18\",\r\n + \ \"52.255.128.0/17\",\r\n \"53.103.135.0/24\",\r\n \"53.103.136.0/24\",\r\n + \ \"53.103.137.0/24\",\r\n \"53.103.138.0/24\",\r\n \"53.103.139.0/24\",\r\n + \ \"53.103.140.0/24\",\r\n \"53.103.141.0/24\",\r\n \"53.103.142.0/24\",\r\n + \ \"53.103.143.0/24\",\r\n \"64.4.8.0/24\",\r\n \"64.4.54.0/24\",\r\n + \ \"65.52.0.0/19\",\r\n \"65.52.32.0/21\",\r\n \"65.52.48.0/20\",\r\n + \ \"65.52.64.0/20\",\r\n \"65.52.104.0/24\",\r\n \"65.52.106.0/24\",\r\n + \ \"65.52.108.0/23\",\r\n \"65.52.110.0/24\",\r\n \"65.52.111.0/24\",\r\n + \ \"65.52.112.0/20\",\r\n \"65.52.128.0/19\",\r\n \"65.52.160.0/19\",\r\n + \ \"65.52.192.0/19\",\r\n \"65.52.224.0/21\",\r\n \"65.52.232.0/21\",\r\n + \ \"65.52.240.0/21\",\r\n \"65.52.248.0/21\",\r\n \"65.54.19.128/27\",\r\n + \ \"65.54.55.160/27\",\r\n \"65.54.55.224/27\",\r\n \"65.55.32.128/28\",\r\n + \ \"65.55.32.192/27\",\r\n \"65.55.32.224/28\",\r\n \"65.55.33.176/28\",\r\n + \ \"65.55.33.192/28\",\r\n \"65.55.35.192/27\",\r\n \"65.55.44.8/29\",\r\n + \ \"65.55.44.16/28\",\r\n \"65.55.44.32/27\",\r\n \"65.55.44.64/27\",\r\n + \ \"65.55.44.96/28\",\r\n \"65.55.44.112/28\",\r\n \"65.55.44.128/27\",\r\n + \ \"65.55.51.0/24\",\r\n \"65.55.60.176/29\",\r\n \"65.55.60.184/30\",\r\n + \ \"65.55.60.188/30\",\r\n \"65.55.105.0/26\",\r\n \"65.55.105.96/27\",\r\n + \ \"65.55.105.160/27\",\r\n \"65.55.105.192/27\",\r\n \"65.55.105.224/27\",\r\n + \ \"65.55.106.0/26\",\r\n \"65.55.106.64/27\",\r\n \"65.55.106.128/26\",\r\n + \ \"65.55.106.192/28\",\r\n \"65.55.106.208/28\",\r\n \"65.55.106.224/28\",\r\n + \ \"65.55.106.240/28\",\r\n \"65.55.107.0/28\",\r\n \"65.55.107.48/28\",\r\n + \ \"65.55.107.64/27\",\r\n \"65.55.107.96/27\",\r\n \"65.55.108.0/24\",\r\n + \ \"65.55.109.0/24\",\r\n \"65.55.110.0/24\",\r\n \"65.55.120.0/24\",\r\n + \ \"65.55.144.0/23\",\r\n \"65.55.146.0/24\",\r\n \"65.55.207.0/24\",\r\n + \ \"65.55.209.0/25\",\r\n \"65.55.209.128/26\",\r\n \"65.55.209.192/26\",\r\n + \ \"65.55.210.0/24\",\r\n \"65.55.211.0/27\",\r\n \"65.55.211.32/27\",\r\n + \ \"65.55.212.0/27\",\r\n \"65.55.212.128/25\",\r\n \"65.55.213.0/27\",\r\n + \ \"65.55.213.64/26\",\r\n \"65.55.213.128/26\",\r\n \"65.55.217.0/24\",\r\n + \ \"65.55.218.0/24\",\r\n \"65.55.219.0/27\",\r\n \"65.55.219.32/27\",\r\n + \ \"65.55.219.64/26\",\r\n \"65.55.219.128/25\",\r\n \"65.55.250.0/24\",\r\n + \ \"65.55.252.0/24\",\r\n \"70.37.0.0/21\",\r\n \"70.37.8.0/22\",\r\n + \ \"70.37.12.0/32\",\r\n \"70.37.16.0/20\",\r\n \"70.37.32.0/20\",\r\n + \ \"70.37.48.0/20\",\r\n \"70.37.64.0/18\",\r\n \"70.37.160.0/21\",\r\n + \ \"94.245.88.0/21\",\r\n \"94.245.104.0/21\",\r\n \"94.245.117.96/27\",\r\n + \ \"94.245.118.0/27\",\r\n \"94.245.120.128/28\",\r\n \"94.245.122.0/24\",\r\n + \ \"94.245.123.144/28\",\r\n \"94.245.123.176/28\",\r\n \"102.37.0.0/20\",\r\n + \ \"102.37.16.0/21\",\r\n \"102.37.24.0/23\",\r\n \"102.37.26.0/27\",\r\n + \ \"102.37.26.32/27\",\r\n \"102.37.32.0/19\",\r\n \"102.37.64.0/21\",\r\n + \ \"102.37.72.0/21\",\r\n \"102.37.80.0/21\",\r\n \"102.37.96.0/19\",\r\n + \ \"102.37.128.0/19\",\r\n \"102.37.160.0/21\",\r\n \"102.37.192.0/18\",\r\n + \ \"102.133.0.0/18\",\r\n \"102.133.64.0/19\",\r\n \"102.133.96.0/20\",\r\n + \ \"102.133.112.0/28\",\r\n \"102.133.120.0/21\",\r\n \"102.133.128.0/18\",\r\n + \ \"102.133.192.0/19\",\r\n \"102.133.224.0/20\",\r\n \"102.133.240.0/25\",\r\n + \ \"102.133.240.128/26\",\r\n \"102.133.248.0/21\",\r\n \"103.25.156.0/24\",\r\n + \ \"103.36.96.0/24\",\r\n \"103.255.140.0/23\",\r\n \"104.40.0.0/17\",\r\n + \ \"104.40.128.0/17\",\r\n \"104.41.0.0/18\",\r\n \"104.41.64.0/18\",\r\n + \ \"104.41.128.0/19\",\r\n \"104.41.160.0/19\",\r\n \"104.41.192.0/18\",\r\n + \ \"104.42.0.0/16\",\r\n \"104.43.0.0/17\",\r\n \"104.43.128.0/17\",\r\n + \ \"104.44.88.0/27\",\r\n \"104.44.88.32/27\",\r\n \"104.44.88.64/27\",\r\n + \ \"104.44.88.96/27\",\r\n \"104.44.88.128/27\",\r\n \"104.44.88.160/27\",\r\n + \ \"104.44.88.192/27\",\r\n \"104.44.88.224/27\",\r\n \"104.44.89.0/27\",\r\n + \ \"104.44.89.32/27\",\r\n \"104.44.89.64/27\",\r\n \"104.44.89.96/27\",\r\n + \ \"104.44.89.128/27\",\r\n \"104.44.89.160/27\",\r\n \"104.44.89.192/27\",\r\n + \ \"104.44.89.224/27\",\r\n \"104.44.90.0/27\",\r\n \"104.44.90.32/27\",\r\n + \ \"104.44.90.64/26\",\r\n \"104.44.90.128/27\",\r\n \"104.44.90.160/27\",\r\n + \ \"104.44.90.192/27\",\r\n \"104.44.90.224/27\",\r\n \"104.44.91.0/27\",\r\n + \ \"104.44.91.32/27\",\r\n \"104.44.91.64/27\",\r\n \"104.44.91.96/27\",\r\n + \ \"104.44.91.128/27\",\r\n \"104.44.91.160/27\",\r\n \"104.44.91.192/27\",\r\n + \ \"104.44.91.224/27\",\r\n \"104.44.92.0/27\",\r\n \"104.44.92.32/27\",\r\n + \ \"104.44.92.64/27\",\r\n \"104.44.92.96/27\",\r\n \"104.44.92.128/27\",\r\n + \ \"104.44.92.160/27\",\r\n \"104.44.92.192/27\",\r\n \"104.44.92.224/27\",\r\n + \ \"104.44.93.0/27\",\r\n \"104.44.93.32/27\",\r\n \"104.44.93.64/27\",\r\n + \ \"104.44.93.96/27\",\r\n \"104.44.93.128/27\",\r\n \"104.44.93.160/27\",\r\n + \ \"104.44.93.192/27\",\r\n \"104.44.93.224/27\",\r\n \"104.44.94.0/28\",\r\n + \ \"104.44.94.16/28\",\r\n \"104.44.94.32/28\",\r\n \"104.44.94.48/28\",\r\n + \ \"104.44.94.64/28\",\r\n \"104.44.94.80/28\",\r\n \"104.44.94.96/28\",\r\n + \ \"104.44.94.112/28\",\r\n \"104.44.94.128/28\",\r\n \"104.44.94.144/28\",\r\n + \ \"104.44.94.160/27\",\r\n \"104.44.94.192/28\",\r\n \"104.44.94.208/28\",\r\n + \ \"104.44.94.224/27\",\r\n \"104.44.95.0/28\",\r\n \"104.44.95.16/28\",\r\n + \ \"104.44.95.32/28\",\r\n \"104.44.95.48/28\",\r\n \"104.44.95.64/28\",\r\n + \ \"104.44.95.80/28\",\r\n \"104.44.95.96/28\",\r\n \"104.44.95.112/28\",\r\n + \ \"104.44.95.128/27\",\r\n \"104.44.95.160/27\",\r\n \"104.44.95.192/28\",\r\n + \ \"104.44.95.208/28\",\r\n \"104.44.95.224/28\",\r\n \"104.44.95.240/28\",\r\n + \ \"104.44.128.0/18\",\r\n \"104.45.0.0/18\",\r\n \"104.45.64.0/20\",\r\n + \ \"104.45.80.0/20\",\r\n \"104.45.96.0/19\",\r\n \"104.45.128.0/18\",\r\n + \ \"104.45.192.0/20\",\r\n \"104.45.208.0/20\",\r\n \"104.45.224.0/19\",\r\n + \ \"104.46.0.0/21\",\r\n \"104.46.8.0/21\",\r\n \"104.46.24.0/22\",\r\n + \ \"104.46.28.0/24\",\r\n \"104.46.29.0/24\",\r\n \"104.46.30.0/23\",\r\n + \ \"104.46.32.0/19\",\r\n \"104.46.64.0/19\",\r\n \"104.46.96.0/19\",\r\n + \ \"104.46.160.0/19\",\r\n \"104.46.192.0/20\",\r\n \"104.46.208.0/20\",\r\n + \ \"104.46.224.0/20\",\r\n \"104.47.128.0/18\",\r\n \"104.47.200.0/21\",\r\n + \ \"104.47.208.0/23\",\r\n \"104.47.210.0/23\",\r\n \"104.47.212.0/23\",\r\n + \ \"104.47.214.0/23\",\r\n \"104.47.216.64/26\",\r\n \"104.47.218.0/23\",\r\n + \ \"104.47.220.0/22\",\r\n \"104.47.224.0/20\",\r\n \"104.208.0.0/19\",\r\n + \ \"104.208.32.0/20\",\r\n \"104.208.48.0/20\",\r\n \"104.208.64.0/18\",\r\n + \ \"104.208.128.0/17\",\r\n \"104.209.0.0/18\",\r\n \"104.209.64.0/20\",\r\n + \ \"104.209.80.0/20\",\r\n \"104.209.128.0/17\",\r\n \"104.210.0.0/20\",\r\n + \ \"104.210.32.0/19\",\r\n \"104.210.64.0/18\",\r\n \"104.210.128.0/19\",\r\n + \ \"104.210.176.0/20\",\r\n \"104.210.192.0/19\",\r\n \"104.211.0.0/18\",\r\n + \ \"104.211.64.0/18\",\r\n \"104.211.128.0/18\",\r\n \"104.211.192.0/18\",\r\n + \ \"104.214.0.0/17\",\r\n \"104.214.128.0/19\",\r\n \"104.214.160.0/19\",\r\n + \ \"104.214.192.0/18\",\r\n \"104.215.0.0/18\",\r\n \"104.215.64.0/18\",\r\n + \ \"104.215.128.0/17\",\r\n \"111.221.28.0/24\",\r\n \"111.221.29.0/24\",\r\n + \ \"111.221.30.0/23\",\r\n \"111.221.78.0/23\",\r\n \"111.221.80.0/20\",\r\n + \ \"111.221.96.0/20\",\r\n \"131.253.12.0/29\",\r\n \"131.253.12.16/28\",\r\n + \ \"131.253.12.40/29\",\r\n \"131.253.12.48/29\",\r\n \"131.253.12.80/28\",\r\n + \ \"131.253.12.160/28\",\r\n \"131.253.12.176/28\",\r\n \"131.253.12.192/28\",\r\n + \ \"131.253.12.208/28\",\r\n \"131.253.12.224/30\",\r\n \"131.253.12.228/30\",\r\n + \ \"131.253.12.240/29\",\r\n \"131.253.12.248/29\",\r\n \"131.253.13.0/28\",\r\n + \ \"131.253.13.16/29\",\r\n \"131.253.13.24/29\",\r\n \"131.253.13.32/28\",\r\n + \ \"131.253.13.48/28\",\r\n \"131.253.13.72/29\",\r\n \"131.253.13.80/29\",\r\n + \ \"131.253.13.88/30\",\r\n \"131.253.13.96/30\",\r\n \"131.253.13.100/30\",\r\n + \ \"131.253.13.104/30\",\r\n \"131.253.13.128/27\",\r\n \"131.253.14.4/30\",\r\n + \ \"131.253.14.8/31\",\r\n \"131.253.14.16/28\",\r\n \"131.253.14.32/27\",\r\n + \ \"131.253.14.64/29\",\r\n \"131.253.14.96/27\",\r\n \"131.253.14.128/27\",\r\n + \ \"131.253.14.160/27\",\r\n \"131.253.14.192/29\",\r\n \"131.253.14.208/28\",\r\n + \ \"131.253.14.224/28\",\r\n \"131.253.14.248/29\",\r\n \"131.253.15.8/29\",\r\n + \ \"131.253.15.16/28\",\r\n \"131.253.15.32/27\",\r\n \"131.253.15.192/28\",\r\n + \ \"131.253.15.208/28\",\r\n \"131.253.15.224/27\",\r\n \"131.253.24.0/28\",\r\n + \ \"131.253.24.160/27\",\r\n \"131.253.24.192/26\",\r\n \"131.253.25.0/24\",\r\n + \ \"131.253.27.0/24\",\r\n \"131.253.34.224/27\",\r\n \"131.253.35.128/26\",\r\n + \ \"131.253.35.192/26\",\r\n \"131.253.36.128/26\",\r\n \"131.253.36.224/27\",\r\n + \ \"131.253.38.0/27\",\r\n \"131.253.38.32/27\",\r\n \"131.253.38.128/26\",\r\n + \ \"131.253.38.224/27\",\r\n \"131.253.40.0/28\",\r\n \"131.253.40.16/28\",\r\n + \ \"131.253.40.32/28\",\r\n \"131.253.40.48/29\",\r\n \"131.253.40.64/28\",\r\n + \ \"131.253.40.80/28\",\r\n \"131.253.40.96/27\",\r\n \"131.253.40.128/27\",\r\n + \ \"131.253.40.160/28\",\r\n \"131.253.40.192/26\",\r\n \"131.253.41.0/24\",\r\n + \ \"132.245.230.0/23\",\r\n \"134.170.80.64/28\",\r\n \"134.170.192.0/21\",\r\n + \ \"134.170.220.0/23\",\r\n \"134.170.222.0/24\",\r\n \"137.116.0.0/18\",\r\n + \ \"137.116.64.0/19\",\r\n \"137.116.96.0/22\",\r\n \"137.116.112.0/20\",\r\n + \ \"137.116.128.0/19\",\r\n \"137.116.160.0/20\",\r\n \"137.116.176.0/21\",\r\n + \ \"137.116.184.0/21\",\r\n \"137.116.192.0/19\",\r\n \"137.116.224.0/19\",\r\n + \ \"137.117.0.0/19\",\r\n \"137.117.32.0/19\",\r\n \"137.117.64.0/18\",\r\n + \ \"137.117.128.0/17\",\r\n \"137.135.0.0/18\",\r\n \"137.135.64.0/18\",\r\n + \ \"137.135.128.0/17\",\r\n \"138.91.0.0/20\",\r\n \"138.91.16.0/20\",\r\n + \ \"138.91.32.0/20\",\r\n \"138.91.48.0/20\",\r\n \"138.91.64.0/19\",\r\n + \ \"138.91.96.0/19\",\r\n \"138.91.128.0/17\",\r\n \"157.55.2.128/26\",\r\n + \ \"157.55.3.0/24\",\r\n \"157.55.7.128/26\",\r\n \"157.55.8.64/26\",\r\n + \ \"157.55.8.144/28\",\r\n \"157.55.10.160/29\",\r\n \"157.55.10.176/28\",\r\n + \ \"157.55.10.192/26\",\r\n \"157.55.11.128/25\",\r\n \"157.55.12.64/26\",\r\n + \ \"157.55.12.128/26\",\r\n \"157.55.13.64/26\",\r\n \"157.55.13.128/26\",\r\n + \ \"157.55.24.0/21\",\r\n \"157.55.37.0/24\",\r\n \"157.55.38.0/24\",\r\n + \ \"157.55.39.0/24\",\r\n \"157.55.48.0/24\",\r\n \"157.55.50.0/25\",\r\n + \ \"157.55.51.224/28\",\r\n \"157.55.55.0/27\",\r\n \"157.55.55.32/28\",\r\n + \ \"157.55.55.100/30\",\r\n \"157.55.55.104/29\",\r\n \"157.55.55.136/29\",\r\n + \ \"157.55.55.144/29\",\r\n \"157.55.55.152/29\",\r\n \"157.55.55.160/28\",\r\n + \ \"157.55.55.176/29\",\r\n \"157.55.55.200/29\",\r\n \"157.55.55.216/29\",\r\n + \ \"157.55.55.228/30\",\r\n \"157.55.55.232/29\",\r\n \"157.55.55.240/28\",\r\n + \ \"157.55.60.224/27\",\r\n \"157.55.64.0/20\",\r\n \"157.55.80.0/21\",\r\n + \ \"157.55.103.32/27\",\r\n \"157.55.103.128/25\",\r\n \"157.55.106.0/26\",\r\n + \ \"157.55.106.128/25\",\r\n \"157.55.107.0/24\",\r\n \"157.55.108.0/23\",\r\n + \ \"157.55.110.0/23\",\r\n \"157.55.115.0/25\",\r\n \"157.55.136.0/21\",\r\n + \ \"157.55.151.0/28\",\r\n \"157.55.153.224/28\",\r\n \"157.55.154.128/25\",\r\n + \ \"157.55.160.0/20\",\r\n \"157.55.176.0/20\",\r\n \"157.55.192.0/21\",\r\n + \ \"157.55.200.0/22\",\r\n \"157.55.204.1/32\",\r\n \"157.55.204.2/31\",\r\n + \ \"157.55.204.33/32\",\r\n \"157.55.204.34/31\",\r\n \"157.55.204.128/25\",\r\n + \ \"157.55.208.0/21\",\r\n \"157.55.248.0/21\",\r\n \"157.56.2.0/25\",\r\n + \ \"157.56.2.128/25\",\r\n \"157.56.3.0/25\",\r\n \"157.56.3.128/25\",\r\n + \ \"157.56.8.0/21\",\r\n \"157.56.19.224/27\",\r\n \"157.56.21.160/27\",\r\n + \ \"157.56.21.192/27\",\r\n \"157.56.24.160/27\",\r\n \"157.56.24.192/28\",\r\n + \ \"157.56.28.0/22\",\r\n \"157.56.80.0/25\",\r\n \"157.56.117.64/27\",\r\n + \ \"157.56.160.0/21\",\r\n \"157.56.176.0/21\",\r\n \"157.56.216.0/26\",\r\n + \ \"168.61.0.0/19\",\r\n \"168.61.32.0/20\",\r\n \"168.61.48.0/21\",\r\n + \ \"168.61.56.0/21\",\r\n \"168.61.64.0/20\",\r\n \"168.61.80.0/20\",\r\n + \ \"168.61.96.0/19\",\r\n \"168.61.128.0/25\",\r\n \"168.61.128.128/28\",\r\n + \ \"168.61.128.160/27\",\r\n \"168.61.128.192/26\",\r\n \"168.61.129.0/25\",\r\n + \ \"168.61.129.128/26\",\r\n \"168.61.129.208/28\",\r\n \"168.61.129.224/27\",\r\n + \ \"168.61.130.64/26\",\r\n \"168.61.130.128/25\",\r\n \"168.61.131.0/26\",\r\n + \ \"168.61.131.128/25\",\r\n \"168.61.132.0/26\",\r\n \"168.61.136.0/21\",\r\n + \ \"168.61.144.0/20\",\r\n \"168.61.160.0/19\",\r\n \"168.61.208.0/20\",\r\n + \ \"168.62.0.0/19\",\r\n \"168.62.32.0/19\",\r\n \"168.62.64.0/19\",\r\n + \ \"168.62.96.0/19\",\r\n \"168.62.128.0/19\",\r\n \"168.62.160.0/19\",\r\n + \ \"168.62.192.0/19\",\r\n \"168.62.224.0/19\",\r\n \"168.63.0.0/19\",\r\n + \ \"168.63.32.0/19\",\r\n \"168.63.64.0/20\",\r\n \"168.63.80.0/21\",\r\n + \ \"168.63.88.0/23\",\r\n \"168.63.90.0/24\",\r\n \"168.63.91.0/26\",\r\n + \ \"168.63.92.0/22\",\r\n \"168.63.96.0/19\",\r\n \"168.63.128.0/24\",\r\n + \ \"168.63.129.0/28\",\r\n \"168.63.129.32/27\",\r\n \"168.63.129.64/26\",\r\n + \ \"168.63.129.128/25\",\r\n \"168.63.130.0/23\",\r\n \"168.63.132.0/22\",\r\n + \ \"168.63.136.0/21\",\r\n \"168.63.148.0/22\",\r\n \"168.63.152.0/22\",\r\n + \ \"168.63.156.0/24\",\r\n \"168.63.160.0/19\",\r\n \"168.63.192.0/19\",\r\n + \ \"168.63.224.0/19\",\r\n \"191.232.16.0/21\",\r\n \"191.232.32.0/19\",\r\n + \ \"191.232.138.0/23\",\r\n \"191.232.140.0/24\",\r\n \"191.232.160.0/19\",\r\n + \ \"191.232.192.0/18\",\r\n \"191.233.0.0/21\",\r\n \"191.233.8.0/21\",\r\n + \ \"191.233.16.0/20\",\r\n \"191.233.32.0/20\",\r\n \"191.233.48.0/21\",\r\n + \ \"191.233.64.0/18\",\r\n \"191.233.128.0/20\",\r\n \"191.233.144.0/20\",\r\n + \ \"191.233.160.0/19\",\r\n \"191.233.192.0/18\",\r\n \"191.234.2.0/23\",\r\n + \ \"191.234.16.0/20\",\r\n \"191.234.32.0/19\",\r\n \"191.234.128.0/18\",\r\n + \ \"191.234.192.0/19\",\r\n \"191.234.224.0/19\",\r\n \"191.235.32.0/19\",\r\n + \ \"191.235.64.0/18\",\r\n \"191.235.128.0/18\",\r\n \"191.235.192.0/22\",\r\n + \ \"191.235.196.0/22\",\r\n \"191.235.200.0/21\",\r\n \"191.235.208.0/20\",\r\n + \ \"191.235.224.0/20\",\r\n \"191.235.240.0/21\",\r\n \"191.235.248.0/23\",\r\n + \ \"191.235.250.0/25\",\r\n \"191.235.255.0/24\",\r\n \"191.236.0.0/18\",\r\n + \ \"191.236.64.0/18\",\r\n \"191.236.128.0/18\",\r\n \"191.236.192.0/18\",\r\n + \ \"191.237.0.0/17\",\r\n \"191.237.128.0/18\",\r\n \"191.237.192.0/23\",\r\n + \ \"191.237.194.0/24\",\r\n \"191.237.195.0/24\",\r\n \"191.237.196.0/24\",\r\n + \ \"191.237.200.0/21\",\r\n \"191.237.208.0/20\",\r\n \"191.237.224.0/21\",\r\n + \ \"191.237.232.0/22\",\r\n \"191.237.236.0/24\",\r\n \"191.237.238.0/24\",\r\n + \ \"191.237.240.0/23\",\r\n \"191.237.248.0/21\",\r\n \"191.238.0.0/18\",\r\n + \ \"191.238.64.0/23\",\r\n \"191.238.66.0/23\",\r\n \"191.238.68.0/24\",\r\n + \ \"191.238.70.0/23\",\r\n \"191.238.72.0/21\",\r\n \"191.238.80.0/21\",\r\n + \ \"191.238.88.0/22\",\r\n \"191.238.92.0/23\",\r\n \"191.238.96.0/19\",\r\n + \ \"191.238.128.0/21\",\r\n \"191.238.144.0/20\",\r\n \"191.238.160.0/19\",\r\n + \ \"191.238.192.0/19\",\r\n \"191.238.224.0/19\",\r\n \"191.239.0.0/18\",\r\n + \ \"191.239.64.0/19\",\r\n \"191.239.96.0/20\",\r\n \"191.239.112.0/20\",\r\n + \ \"191.239.160.0/19\",\r\n \"191.239.192.0/22\",\r\n \"191.239.200.0/22\",\r\n + \ \"191.239.204.0/22\",\r\n \"191.239.208.0/20\",\r\n \"191.239.224.0/20\",\r\n + \ \"191.239.240.0/20\",\r\n \"193.149.64.0/21\",\r\n \"193.149.72.0/21\",\r\n + \ \"193.149.80.0/21\",\r\n \"193.149.88.0/21\",\r\n \"198.180.97.0/24\",\r\n + \ \"199.30.16.0/24\",\r\n \"199.30.18.0/23\",\r\n \"199.30.20.0/24\",\r\n + \ \"199.30.22.0/24\",\r\n \"199.30.24.0/23\",\r\n \"199.30.27.0/25\",\r\n + \ \"199.30.27.144/28\",\r\n \"199.30.27.160/27\",\r\n \"199.30.28.64/26\",\r\n + \ \"199.30.28.128/25\",\r\n \"199.30.29.0/24\",\r\n \"199.30.31.0/25\",\r\n + \ \"199.30.31.192/26\",\r\n \"202.89.233.64/27\",\r\n \"202.89.235.128/25\",\r\n + \ \"204.79.180.0/24\",\r\n \"204.152.18.0/31\",\r\n \"204.152.18.8/29\",\r\n + \ \"204.152.18.32/27\",\r\n \"204.152.18.64/26\",\r\n \"204.152.19.0/24\",\r\n + \ \"204.231.197.0/24\",\r\n \"207.46.13.0/24\",\r\n \"207.46.50.128/28\",\r\n + \ \"207.46.59.64/27\",\r\n \"207.46.63.64/27\",\r\n \"207.46.63.128/25\",\r\n + \ \"207.46.67.160/27\",\r\n \"207.46.67.192/27\",\r\n \"207.46.72.0/27\",\r\n + \ \"207.46.77.224/28\",\r\n \"207.46.87.0/24\",\r\n \"207.46.89.16/28\",\r\n + \ \"207.46.95.32/27\",\r\n \"207.46.126.0/24\",\r\n \"207.46.128.0/19\",\r\n + \ \"207.46.193.192/28\",\r\n \"207.46.193.224/27\",\r\n \"207.46.198.128/25\",\r\n + \ \"207.46.200.96/27\",\r\n \"207.46.200.176/28\",\r\n \"207.46.202.128/28\",\r\n + \ \"207.46.205.0/24\",\r\n \"207.46.224.0/20\",\r\n \"207.68.174.8/29\",\r\n + \ \"207.68.174.40/29\",\r\n \"207.68.174.48/29\",\r\n \"207.68.174.184/29\",\r\n + \ \"207.68.174.192/28\",\r\n \"207.68.174.208/28\",\r\n \"209.240.212.0/23\",\r\n + \ \"213.199.128.0/20\",\r\n \"213.199.169.0/24\",\r\n \"213.199.180.32/28\",\r\n + \ \"213.199.180.96/27\",\r\n \"213.199.180.192/27\",\r\n + \ \"213.199.183.0/24\",\r\n \"2602:fd5e:1::/63\",\r\n \"2602:fd5e:1:2::/64\",\r\n + \ \"2603:1000::/47\",\r\n \"2603:1000:3::/48\",\r\n \"2603:1000:4::/47\",\r\n + \ \"2603:1000:100::/47\",\r\n \"2603:1000:103::/48\",\r\n + \ \"2603:1000:104::/47\",\r\n \"2603:1006:1400::/63\",\r\n + \ \"2603:1006:1401::/63\",\r\n \"2603:1006:1500::/64\",\r\n + \ \"2603:1006:1500:4::/64\",\r\n \"2603:1006:2000::/59\",\r\n + \ \"2603:1006:2000:20::/59\",\r\n \"2603:1007:200::/59\",\r\n + \ \"2603:1007:200:20::/59\",\r\n \"2603:1010::/46\",\r\n + \ \"2603:1010:5::/48\",\r\n \"2603:1010:6::/47\",\r\n \"2603:1010:100::/40\",\r\n + \ \"2603:1010:200::/47\",\r\n \"2603:1010:202::/48\",\r\n + \ \"2603:1010:204::/48\",\r\n \"2603:1010:205::/48\",\r\n + \ \"2603:1010:206::/48\",\r\n \"2603:1010:300::/47\",\r\n + \ \"2603:1010:303::/48\",\r\n \"2603:1010:304::/47\",\r\n + \ \"2603:1010:400::/47\",\r\n \"2603:1010:403::/48\",\r\n + \ \"2603:1010:404::/47\",\r\n \"2603:1016:1400::/59\",\r\n + \ \"2603:1016:1400:20::/59\",\r\n \"2603:1016:1400:40::/59\",\r\n + \ \"2603:1016:1400:60::/59\",\r\n \"2603:1016:2400::/48\",\r\n + \ \"2603:1016:2401::/48\",\r\n \"2603:1016:2402::/48\",\r\n + \ \"2603:1016:2403::/48\",\r\n \"2603:1016:2500::/64\",\r\n + \ \"2603:1016:2500:4::/64\",\r\n \"2603:1016:2500:8::/64\",\r\n + \ \"2603:1016:2500:c::/64\",\r\n \"2603:1017::/59\",\r\n + \ \"2603:1017:0:20::/59\",\r\n \"2603:1017:0:40::/59\",\r\n + \ \"2603:1017:0:60::/59\",\r\n \"2603:1020::/47\",\r\n \"2603:1020:2::/48\",\r\n + \ \"2603:1020:4::/48\",\r\n \"2603:1020:5::/48\",\r\n \"2603:1020:6::/48\",\r\n + \ \"2603:1020:100::/47\",\r\n \"2603:1020:103::/48\",\r\n + \ \"2603:1020:104::/48\",\r\n \"2603:1020:200::/46\",\r\n + \ \"2603:1020:205::/48\",\r\n \"2603:1020:206::/47\",\r\n + \ \"2603:1020:300::/47\",\r\n \"2603:1020:302::/48\",\r\n + \ \"2603:1020:304::/48\",\r\n \"2603:1020:305::/48\",\r\n + \ \"2603:1020:400::/47\",\r\n \"2603:1020:402::/48\",\r\n + \ \"2603:1020:404::/48\",\r\n \"2603:1020:405::/48\",\r\n + \ \"2603:1020:500::/47\",\r\n \"2603:1020:503::/48\",\r\n + \ \"2603:1020:504::/48\",\r\n \"2603:1020:600::/47\",\r\n + \ \"2603:1020:602::/48\",\r\n \"2603:1020:604::/48\",\r\n + \ \"2603:1020:605::/48\",\r\n \"2603:1020:606::/48\",\r\n + \ \"2603:1020:700::/47\",\r\n \"2603:1020:702::/48\",\r\n + \ \"2603:1020:704::/48\",\r\n \"2603:1020:705::/48\",\r\n + \ \"2603:1020:706::/48\",\r\n \"2603:1020:800::/47\",\r\n + \ \"2603:1020:802::/48\",\r\n \"2603:1020:804::/48\",\r\n + \ \"2603:1020:805::/48\",\r\n \"2603:1020:806::/48\",\r\n + \ \"2603:1020:900::/47\",\r\n \"2603:1020:902::/48\",\r\n + \ \"2603:1020:904::/48\",\r\n \"2603:1020:905::/48\",\r\n + \ \"2603:1020:906::/48\",\r\n \"2603:1020:a00::/47\",\r\n + \ \"2603:1020:a03::/48\",\r\n \"2603:1020:a04::/47\",\r\n + \ \"2603:1020:b00::/47\",\r\n \"2603:1020:b03::/48\",\r\n + \ \"2603:1020:b04::/47\",\r\n \"2603:1020:c00::/47\",\r\n + \ \"2603:1020:c03::/48\",\r\n \"2603:1020:c04::/47\",\r\n + \ \"2603:1020:d00::/47\",\r\n \"2603:1020:d03::/48\",\r\n + \ \"2603:1020:d04::/47\",\r\n \"2603:1020:e00::/47\",\r\n + \ \"2603:1020:e03::/48\",\r\n \"2603:1020:e04::/47\",\r\n + \ \"2603:1020:f00::/47\",\r\n \"2603:1020:f03::/48\",\r\n + \ \"2603:1020:f04::/47\",\r\n \"2603:1020:1000::/47\",\r\n + \ \"2603:1020:1003::/48\",\r\n \"2603:1020:1004::/47\",\r\n + \ \"2603:1020:1100::/47\",\r\n \"2603:1020:1103::/48\",\r\n + \ \"2603:1020:1104::/47\",\r\n \"2603:1020:1107::/48\",\r\n + \ \"2603:1020:1200::/47\",\r\n \"2603:1020:1301::/48\",\r\n + \ \"2603:1026:900::/64\",\r\n \"2603:1026:900:1::/64\",\r\n + \ \"2603:1026:900:2::/63\",\r\n \"2603:1026:2400::/48\",\r\n + \ \"2603:1026:2401::/48\",\r\n \"2603:1026:2402::/48\",\r\n + \ \"2603:1026:2403::/48\",\r\n \"2603:1026:2404::/48\",\r\n + \ \"2603:1026:2405::/48\",\r\n \"2603:1026:2406::/48\",\r\n + \ \"2603:1026:2407::/48\",\r\n \"2603:1026:2408::/48\",\r\n + \ \"2603:1026:2409::/48\",\r\n \"2603:1026:240a::/48\",\r\n + \ \"2603:1026:240b::/48\",\r\n \"2603:1026:240c::/48\",\r\n + \ \"2603:1026:240d::/48\",\r\n \"2603:1026:240e::/48\",\r\n + \ \"2603:1026:240f::/48\",\r\n \"2603:1026:2410::/48\",\r\n + \ \"2603:1026:2411::/48\",\r\n \"2603:1026:2412::/48\",\r\n + \ \"2603:1026:2500::/64\",\r\n \"2603:1026:2500:4::/64\",\r\n + \ \"2603:1026:2500:8::/64\",\r\n \"2603:1026:2500:c::/64\",\r\n + \ \"2603:1026:2500:10::/64\",\r\n \"2603:1026:2500:14::/64\",\r\n + \ \"2603:1026:2500:18::/64\",\r\n \"2603:1026:2500:1c::/64\",\r\n + \ \"2603:1026:2500:20::/64\",\r\n \"2603:1026:2500:24::/64\",\r\n + \ \"2603:1026:2500:28::/64\",\r\n \"2603:1026:2500:2c::/64\",\r\n + \ \"2603:1026:2500:30::/64\",\r\n \"2603:1026:2500:34::/64\",\r\n + \ \"2603:1026:2500:38::/64\",\r\n \"2603:1026:3000::/59\",\r\n + \ \"2603:1026:3000:20::/59\",\r\n \"2603:1026:3000:40::/59\",\r\n + \ \"2603:1026:3000:60::/59\",\r\n \"2603:1026:3000:80::/59\",\r\n + \ \"2603:1026:3000:a0::/59\",\r\n \"2603:1026:3000:c0::/59\",\r\n + \ \"2603:1026:3000:e0::/59\",\r\n \"2603:1026:3000:100::/59\",\r\n + \ \"2603:1026:3000:120::/59\",\r\n \"2603:1026:3000:140::/59\",\r\n + \ \"2603:1026:3000:160::/59\",\r\n \"2603:1026:3000:180::/59\",\r\n + \ \"2603:1026:3000:1a0::/59\",\r\n \"2603:1026:3000:1c0::/59\",\r\n + \ \"2603:1026:3000:1e0::/59\",\r\n \"2603:1026:3000:200::/59\",\r\n + \ \"2603:1026:3000:220::/59\",\r\n \"2603:1027:1::/59\",\r\n + \ \"2603:1027:1:20::/59\",\r\n \"2603:1027:1:40::/59\",\r\n + \ \"2603:1027:1:60::/59\",\r\n \"2603:1027:1:80::/59\",\r\n + \ \"2603:1027:1:a0::/59\",\r\n \"2603:1027:1:c0::/59\",\r\n + \ \"2603:1027:1:e0::/59\",\r\n \"2603:1027:1:100::/59\",\r\n + \ \"2603:1027:1:120::/59\",\r\n \"2603:1027:1:140::/59\",\r\n + \ \"2603:1027:1:160::/59\",\r\n \"2603:1027:1:180::/59\",\r\n + \ \"2603:1027:1:1a0::/59\",\r\n \"2603:1027:1:1c0::/59\",\r\n + \ \"2603:1027:1:1e0::/59\",\r\n \"2603:1027:1:200::/59\",\r\n + \ \"2603:1027:1:220::/59\",\r\n \"2603:1030::/45\",\r\n \"2603:1030:8::/48\",\r\n + \ \"2603:1030:9::/63\",\r\n \"2603:1030:9:2::/63\",\r\n \"2603:1030:9:4::/62\",\r\n + \ \"2603:1030:9:8::/61\",\r\n \"2603:1030:9:10::/62\",\r\n + \ \"2603:1030:9:14::/63\",\r\n \"2603:1030:9:16::/64\",\r\n + \ \"2603:1030:9:17::/64\",\r\n \"2603:1030:9:18::/61\",\r\n + \ \"2603:1030:9:20::/59\",\r\n \"2603:1030:9:40::/58\",\r\n + \ \"2603:1030:9:80::/59\",\r\n \"2603:1030:9:a0::/60\",\r\n + \ \"2603:1030:9:b0::/63\",\r\n \"2603:1030:9:b2::/64\",\r\n + \ \"2603:1030:9:b3::/64\",\r\n \"2603:1030:9:b4::/63\",\r\n + \ \"2603:1030:9:b6::/64\",\r\n \"2603:1030:9:b7::/64\",\r\n + \ \"2603:1030:9:b8::/63\",\r\n \"2603:1030:9:ba::/63\",\r\n + \ \"2603:1030:9:bc::/64\",\r\n \"2603:1030:9:bd::/64\",\r\n + \ \"2603:1030:9:be::/63\",\r\n \"2603:1030:9:c0::/58\",\r\n + \ \"2603:1030:9:100::/64\",\r\n \"2603:1030:9:101::/64\",\r\n + \ \"2603:1030:9:102::/63\",\r\n \"2603:1030:9:104::/62\",\r\n + \ \"2603:1030:9:108::/62\",\r\n \"2603:1030:9:10c::/64\",\r\n + \ \"2603:1030:9:10d::/64\",\r\n \"2603:1030:9:10e::/63\",\r\n + \ \"2603:1030:9:110::/64\",\r\n \"2603:1030:9:111::/64\",\r\n + \ \"2603:1030:9:112::/63\",\r\n \"2603:1030:9:114::/64\",\r\n + \ \"2603:1030:9:115::/64\",\r\n \"2603:1030:9:116::/63\",\r\n + \ \"2603:1030:9:118::/62\",\r\n \"2603:1030:9:11c::/63\",\r\n + \ \"2603:1030:9:11e::/64\",\r\n \"2603:1030:9:11f::/64\",\r\n + \ \"2603:1030:9:120::/61\",\r\n \"2603:1030:9:128::/62\",\r\n + \ \"2603:1030:9:12c::/63\",\r\n \"2603:1030:9:12e::/64\",\r\n + \ \"2603:1030:9:12f::/64\",\r\n \"2603:1030:9:130::/60\",\r\n + \ \"2603:1030:9:140::/59\",\r\n \"2603:1030:9:160::/61\",\r\n + \ \"2603:1030:9:168::/62\",\r\n \"2603:1030:9:16c::/63\",\r\n + \ \"2603:1030:9:16e::/64\",\r\n \"2603:1030:9:16f::/64\",\r\n + \ \"2603:1030:9:170::/60\",\r\n \"2603:1030:9:180::/61\",\r\n + \ \"2603:1030:9:188::/62\",\r\n \"2603:1030:9:18c::/62\",\r\n + \ \"2603:1030:9:190::/60\",\r\n \"2603:1030:9:1a0::/62\",\r\n + \ \"2603:1030:9:1a4::/63\",\r\n \"2603:1030:9:1a6::/64\",\r\n + \ \"2603:1030:a::/47\",\r\n \"2603:1030:d::/48\",\r\n \"2603:1030:e::/48\",\r\n + \ \"2603:1030:f::/48\",\r\n \"2603:1030:10::/47\",\r\n \"2603:1030:12::/48\",\r\n + \ \"2603:1030:100::/61\",\r\n \"2603:1030:100:8::/62\",\r\n + \ \"2603:1030:100:c::/63\",\r\n \"2603:1030:100:e::/63\",\r\n + \ \"2603:1030:100:10::/62\",\r\n \"2603:1030:100:14::/63\",\r\n + \ \"2603:1030:100:16::/63\",\r\n \"2603:1030:100:18::/62\",\r\n + \ \"2603:1030:101::/48\",\r\n \"2603:1030:103::/48\",\r\n + \ \"2603:1030:104::/48\",\r\n \"2603:1030:105::/48\",\r\n + \ \"2603:1030:106::/48\",\r\n \"2603:1030:107::/48\",\r\n + \ \"2603:1030:108::/48\",\r\n \"2603:1030:109::/48\",\r\n + \ \"2603:1030:208::/47\",\r\n \"2603:1030:20a::/47\",\r\n + \ \"2603:1030:20c::/47\",\r\n \"2603:1030:20e::/48\",\r\n + \ \"2603:1030:210::/47\",\r\n \"2603:1030:212::/56\",\r\n + \ \"2603:1030:213::/48\",\r\n \"2603:1030:301::/48\",\r\n + \ \"2603:1030:302::/48\",\r\n \"2603:1030:303::/48\",\r\n + \ \"2603:1030:400::/48\",\r\n \"2603:1030:401::/63\",\r\n + \ \"2603:1030:401:2::/63\",\r\n \"2603:1030:401:4::/62\",\r\n + \ \"2603:1030:401:8::/61\",\r\n \"2603:1030:401:10::/62\",\r\n + \ \"2603:1030:401:14::/63\",\r\n \"2603:1030:401:16::/64\",\r\n + \ \"2603:1030:401:17::/64\",\r\n \"2603:1030:401:18::/61\",\r\n + \ \"2603:1030:401:20::/59\",\r\n \"2603:1030:401:40::/60\",\r\n + \ \"2603:1030:401:50::/61\",\r\n \"2603:1030:401:58::/64\",\r\n + \ \"2603:1030:401:59::/64\",\r\n \"2603:1030:401:5a::/63\",\r\n + \ \"2603:1030:401:5c::/62\",\r\n \"2603:1030:401:60::/59\",\r\n + \ \"2603:1030:401:80::/62\",\r\n \"2603:1030:401:84::/64\",\r\n + \ \"2603:1030:401:85::/64\",\r\n \"2603:1030:401:86::/64\",\r\n + \ \"2603:1030:401:87::/64\",\r\n \"2603:1030:401:88::/62\",\r\n + \ \"2603:1030:401:8c::/63\",\r\n \"2603:1030:401:8e::/64\",\r\n + \ \"2603:1030:401:8f::/64\",\r\n \"2603:1030:401:90::/63\",\r\n + \ \"2603:1030:401:92::/63\",\r\n \"2603:1030:401:94::/62\",\r\n + \ \"2603:1030:401:98::/61\",\r\n \"2603:1030:401:a0::/62\",\r\n + \ \"2603:1030:401:a4::/63\",\r\n \"2603:1030:401:a6::/64\",\r\n + \ \"2603:1030:401:a7::/64\",\r\n \"2603:1030:401:a8::/61\",\r\n + \ \"2603:1030:401:b0::/60\",\r\n \"2603:1030:401:c0::/58\",\r\n + \ \"2603:1030:401:100::/59\",\r\n \"2603:1030:401:120::/64\",\r\n + \ \"2603:1030:401:121::/64\",\r\n \"2603:1030:401:122::/63\",\r\n + \ \"2603:1030:401:124::/62\",\r\n \"2603:1030:401:128::/61\",\r\n + \ \"2603:1030:401:130::/62\",\r\n \"2603:1030:401:134::/63\",\r\n + \ \"2603:1030:401:136::/63\",\r\n \"2603:1030:401:138::/64\",\r\n + \ \"2603:1030:401:139::/64\",\r\n \"2603:1030:401:13a::/63\",\r\n + \ \"2603:1030:401:13c::/62\",\r\n \"2603:1030:401:140::/63\",\r\n + \ \"2603:1030:401:142::/64\",\r\n \"2603:1030:401:143::/64\",\r\n + \ \"2603:1030:401:144::/63\",\r\n \"2603:1030:401:146::/63\",\r\n + \ \"2603:1030:401:148::/63\",\r\n \"2603:1030:401:14a::/63\",\r\n + \ \"2603:1030:401:14c::/62\",\r\n \"2603:1030:401:150::/62\",\r\n + \ \"2603:1030:401:154::/63\",\r\n \"2603:1030:401:156::/63\",\r\n + \ \"2603:1030:401:158::/64\",\r\n \"2603:1030:401:159::/64\",\r\n + \ \"2603:1030:401:15a::/63\",\r\n \"2603:1030:401:15c::/62\",\r\n + \ \"2603:1030:401:160::/61\",\r\n \"2603:1030:401:168::/63\",\r\n + \ \"2603:1030:401:16a::/63\",\r\n \"2603:1030:401:16c::/64\",\r\n + \ \"2603:1030:401:16d::/64\",\r\n \"2603:1030:401:16e::/63\",\r\n + \ \"2603:1030:401:170::/61\",\r\n \"2603:1030:401:178::/62\",\r\n + \ \"2603:1030:401:17c::/62\",\r\n \"2603:1030:401:180::/58\",\r\n + \ \"2603:1030:401:1c0::/61\",\r\n \"2603:1030:401:1c8::/63\",\r\n + \ \"2603:1030:401:1ca::/63\",\r\n \"2603:1030:401:1cc::/62\",\r\n + \ \"2603:1030:401:1d0::/60\",\r\n \"2603:1030:401:1e0::/60\",\r\n + \ \"2603:1030:401:1f0::/61\",\r\n \"2603:1030:401:1f8::/64\",\r\n + \ \"2603:1030:401:1f9::/64\",\r\n \"2603:1030:401:1fa::/63\",\r\n + \ \"2603:1030:401:1fc::/62\",\r\n \"2603:1030:401:200::/61\",\r\n + \ \"2603:1030:401:208::/62\",\r\n \"2603:1030:401:20c::/62\",\r\n + \ \"2603:1030:401:210::/60\",\r\n \"2603:1030:401:220::/62\",\r\n + \ \"2603:1030:401:224::/63\",\r\n \"2603:1030:401:226::/63\",\r\n + \ \"2603:1030:401:228::/64\",\r\n \"2603:1030:402::/47\",\r\n + \ \"2603:1030:405::/48\",\r\n \"2603:1030:406::/47\",\r\n + \ \"2603:1030:408::/48\",\r\n \"2603:1030:409::/48\",\r\n + \ \"2603:1030:40a::/64\",\r\n \"2603:1030:40a:1::/64\",\r\n + \ \"2603:1030:40a:2::/64\",\r\n \"2603:1030:40a:3::/64\",\r\n + \ \"2603:1030:40a:4::/62\",\r\n \"2603:1030:40a:8::/63\",\r\n + \ \"2603:1030:40b::/48\",\r\n \"2603:1030:40c::/48\",\r\n + \ \"2603:1030:40d::/60\",\r\n \"2603:1030:40d:4000::/50\",\r\n + \ \"2603:1030:40d:8000::/49\",\r\n \"2603:1030:40e::/56\",\r\n + \ \"2603:1030:40e:100::/56\",\r\n \"2603:1030:40f::/48\",\r\n + \ \"2603:1030:410::/48\",\r\n \"2603:1030:500::/47\",\r\n + \ \"2603:1030:503::/48\",\r\n \"2603:1030:504::/47\",\r\n + \ \"2603:1030:600::/46\",\r\n \"2603:1030:604::/47\",\r\n + \ \"2603:1030:607::/48\",\r\n \"2603:1030:608::/47\",\r\n + \ \"2603:1030:800::/48\",\r\n \"2603:1030:802::/47\",\r\n + \ \"2603:1030:804::/58\",\r\n \"2603:1030:804:40::/60\",\r\n + \ \"2603:1030:804:50::/63\",\r\n \"2603:1030:804:52::/64\",\r\n + \ \"2603:1030:804:53::/64\",\r\n \"2603:1030:804:54::/64\",\r\n + \ \"2603:1030:804:55::/64\",\r\n \"2603:1030:804:56::/63\",\r\n + \ \"2603:1030:804:58::/63\",\r\n \"2603:1030:804:5a::/64\",\r\n + \ \"2603:1030:804:5b::/64\",\r\n \"2603:1030:804:5c::/62\",\r\n + \ \"2603:1030:804:60::/62\",\r\n \"2603:1030:804:64::/63\",\r\n + \ \"2603:1030:804:66::/64\",\r\n \"2603:1030:804:67::/64\",\r\n + \ \"2603:1030:804:68::/61\",\r\n \"2603:1030:804:70::/60\",\r\n + \ \"2603:1030:804:80::/59\",\r\n \"2603:1030:804:a0::/62\",\r\n + \ \"2603:1030:804:a4::/64\",\r\n \"2603:1030:804:a5::/64\",\r\n + \ \"2603:1030:804:a6::/63\",\r\n \"2603:1030:804:a8::/61\",\r\n + \ \"2603:1030:804:b0::/62\",\r\n \"2603:1030:804:b4::/64\",\r\n + \ \"2603:1030:804:b5::/64\",\r\n \"2603:1030:804:b6::/63\",\r\n + \ \"2603:1030:804:b8::/61\",\r\n \"2603:1030:804:c0::/61\",\r\n + \ \"2603:1030:804:c8::/62\",\r\n \"2603:1030:804:cc::/63\",\r\n + \ \"2603:1030:804:ce::/63\",\r\n \"2603:1030:804:d0::/63\",\r\n + \ \"2603:1030:804:d2::/63\",\r\n \"2603:1030:804:d4::/62\",\r\n + \ \"2603:1030:804:d8::/61\",\r\n \"2603:1030:804:e0::/59\",\r\n + \ \"2603:1030:804:100::/58\",\r\n \"2603:1030:804:140::/60\",\r\n + \ \"2603:1030:804:150::/62\",\r\n \"2603:1030:804:154::/64\",\r\n + \ \"2603:1030:805::/48\",\r\n \"2603:1030:806::/48\",\r\n + \ \"2603:1030:807::/48\",\r\n \"2603:1030:809::/48\",\r\n + \ \"2603:1030:80a::/56\",\r\n \"2603:1030:80b::/48\",\r\n + \ \"2603:1030:80c::/48\",\r\n \"2603:1030:a00::/46\",\r\n + \ \"2603:1030:a04::/48\",\r\n \"2603:1030:a06::/48\",\r\n + \ \"2603:1030:a07::/48\",\r\n \"2603:1030:a08::/48\",\r\n + \ \"2603:1030:a09::/56\",\r\n \"2603:1030:a0a::/48\",\r\n + \ \"2603:1030:b00::/47\",\r\n \"2603:1030:b03::/48\",\r\n + \ \"2603:1030:b04::/48\",\r\n \"2603:1030:b05::/48\",\r\n + \ \"2603:1030:b06::/48\",\r\n \"2603:1030:c00::/48\",\r\n + \ \"2603:1030:c02::/47\",\r\n \"2603:1030:c04::/48\",\r\n + \ \"2603:1030:c05::/48\",\r\n \"2603:1030:c06::/48\",\r\n + \ \"2603:1030:c07::/48\",\r\n \"2603:1030:d00::/47\",\r\n + \ \"2603:1030:e01:2::/64\",\r\n \"2603:1030:f00::/47\",\r\n + \ \"2603:1030:f02::/48\",\r\n \"2603:1030:f04::/48\",\r\n + \ \"2603:1030:f05::/48\",\r\n \"2603:1030:f06::/48\",\r\n + \ \"2603:1030:f07::/56\",\r\n \"2603:1030:f08::/48\",\r\n + \ \"2603:1030:1000::/47\",\r\n \"2603:1030:1002::/48\",\r\n + \ \"2603:1030:1004::/48\",\r\n \"2603:1030:1005::/48\",\r\n + \ \"2603:1030:1006::/48\",\r\n \"2603:1036:903::/64\",\r\n + \ \"2603:1036:903:1::/64\",\r\n \"2603:1036:903:2::/64\",\r\n + \ \"2603:1036:903:3::/64\",\r\n \"2603:1036:9ff:ffff::/64\",\r\n + \ \"2603:1036:d20::/64\",\r\n \"2603:1036:120d::/48\",\r\n + \ \"2603:1036:2400::/48\",\r\n \"2603:1036:2401::/48\",\r\n + \ \"2603:1036:2402::/48\",\r\n \"2603:1036:2403::/48\",\r\n + \ \"2603:1036:2404::/48\",\r\n \"2603:1036:2405::/48\",\r\n + \ \"2603:1036:2406::/48\",\r\n \"2603:1036:2407::/48\",\r\n + \ \"2603:1036:2408::/48\",\r\n \"2603:1036:2409::/48\",\r\n + \ \"2603:1036:240a::/48\",\r\n \"2603:1036:240b::/48\",\r\n + \ \"2603:1036:240c::/48\",\r\n \"2603:1036:240d::/48\",\r\n + \ \"2603:1036:240e::/48\",\r\n \"2603:1036:240f::/48\",\r\n + \ \"2603:1036:2500::/64\",\r\n \"2603:1036:2500:4::/64\",\r\n + \ \"2603:1036:2500:8::/64\",\r\n \"2603:1036:2500:c::/64\",\r\n + \ \"2603:1036:2500:10::/64\",\r\n \"2603:1036:2500:14::/64\",\r\n + \ \"2603:1036:2500:18::/63\",\r\n \"2603:1036:2500:1c::/64\",\r\n + \ \"2603:1036:2500:20::/64\",\r\n \"2603:1036:2500:24::/64\",\r\n + \ \"2603:1036:2500:28::/64\",\r\n \"2603:1036:2500:2c::/64\",\r\n + \ \"2603:1036:2500:30::/64\",\r\n \"2603:1036:2500:34::/64\",\r\n + \ \"2603:1036:2500:38::/64\",\r\n \"2603:1036:3000::/59\",\r\n + \ \"2603:1036:3000:20::/59\",\r\n \"2603:1036:3000:40::/59\",\r\n + \ \"2603:1036:3000:60::/59\",\r\n \"2603:1036:3000:80::/59\",\r\n + \ \"2603:1036:3000:a0::/59\",\r\n \"2603:1036:3000:c0::/59\",\r\n + \ \"2603:1036:3000:e0::/59\",\r\n \"2603:1036:3000:100::/59\",\r\n + \ \"2603:1036:3000:120::/59\",\r\n \"2603:1036:3000:140::/59\",\r\n + \ \"2603:1036:3000:160::/59\",\r\n \"2603:1036:3000:180::/59\",\r\n + \ \"2603:1036:3000:1a0::/59\",\r\n \"2603:1036:3000:1c0::/59\",\r\n + \ \"2603:1037:1::/59\",\r\n \"2603:1037:1:20::/59\",\r\n + \ \"2603:1037:1:40::/59\",\r\n \"2603:1037:1:60::/59\",\r\n + \ \"2603:1037:1:80::/59\",\r\n \"2603:1037:1:a0::/59\",\r\n + \ \"2603:1037:1:c0::/59\",\r\n \"2603:1037:1:e0::/59\",\r\n + \ \"2603:1037:1:100::/59\",\r\n \"2603:1037:1:120::/59\",\r\n + \ \"2603:1037:1:140::/59\",\r\n \"2603:1037:1:160::/59\",\r\n + \ \"2603:1037:1:180::/59\",\r\n \"2603:1037:1:1a0::/59\",\r\n + \ \"2603:1037:1:1c0::/59\",\r\n \"2603:1039:205::/48\",\r\n + \ \"2603:1040::/47\",\r\n \"2603:1040:2::/48\",\r\n \"2603:1040:4::/48\",\r\n + \ \"2603:1040:5::/48\",\r\n \"2603:1040:6::/48\",\r\n \"2603:1040:100::/47\",\r\n + \ \"2603:1040:102::/48\",\r\n \"2603:1040:103::/48\",\r\n + \ \"2603:1040:104::/48\",\r\n \"2603:1040:200::/46\",\r\n + \ \"2603:1040:204::/48\",\r\n \"2603:1040:206::/48\",\r\n + \ \"2603:1040:207::/48\",\r\n \"2603:1040:208::/48\",\r\n + \ \"2603:1040:400::/46\",\r\n \"2603:1040:404::/48\",\r\n + \ \"2603:1040:406::/48\",\r\n \"2603:1040:407::/48\",\r\n + \ \"2603:1040:408::/48\",\r\n \"2603:1040:600::/46\",\r\n + \ \"2603:1040:605::/48\",\r\n \"2603:1040:606::/47\",\r\n + \ \"2603:1040:800::/46\",\r\n \"2603:1040:805::/48\",\r\n + \ \"2603:1040:806::/47\",\r\n \"2603:1040:900::/47\",\r\n + \ \"2603:1040:903::/48\",\r\n \"2603:1040:904::/47\",\r\n + \ \"2603:1040:a00::/46\",\r\n \"2603:1040:a05::/48\",\r\n + \ \"2603:1040:a06::/47\",\r\n \"2603:1040:b00::/47\",\r\n + \ \"2603:1040:b03::/48\",\r\n \"2603:1040:b04::/47\",\r\n + \ \"2603:1040:c00::/46\",\r\n \"2603:1040:c05::/48\",\r\n + \ \"2603:1040:c06::/47\",\r\n \"2603:1040:d00::/47\",\r\n + \ \"2603:1040:d03::/48\",\r\n \"2603:1040:d04::/48\",\r\n + \ \"2603:1040:e00::/47\",\r\n \"2603:1040:e02::/48\",\r\n + \ \"2603:1040:e04::/48\",\r\n \"2603:1040:e05::/48\",\r\n + \ \"2603:1040:e06::/48\",\r\n \"2603:1040:f00::/47\",\r\n + \ \"2603:1040:f02::/48\",\r\n \"2603:1040:f04::/48\",\r\n + \ \"2603:1040:f05::/48\",\r\n \"2603:1040:f06::/48\",\r\n + \ \"2603:1040:1001::/48\",\r\n \"2603:1040:1002::/48\",\r\n + \ \"2603:1040:1003::/48\",\r\n \"2603:1040:1004::/48\",\r\n + \ \"2603:1040:1100::/47\",\r\n \"2603:1040:1103::/48\",\r\n + \ \"2603:1040:1104::/48\",\r\n \"2603:1046:1400::/48\",\r\n + \ \"2603:1046:1401::/48\",\r\n \"2603:1046:1402::/48\",\r\n + \ \"2603:1046:1403::/48\",\r\n \"2603:1046:1404::/48\",\r\n + \ \"2603:1046:1405::/48\",\r\n \"2603:1046:1406::/48\",\r\n + \ \"2603:1046:1407::/48\",\r\n \"2603:1046:1408::/48\",\r\n + \ \"2603:1046:1409::/48\",\r\n \"2603:1046:140a::/48\",\r\n + \ \"2603:1046:140b::/48\",\r\n \"2603:1046:1500::/64\",\r\n + \ \"2603:1046:1500:4::/64\",\r\n \"2603:1046:1500:8::/64\",\r\n + \ \"2603:1046:1500:c::/64\",\r\n \"2603:1046:1500:10::/64\",\r\n + \ \"2603:1046:1500:14::/64\",\r\n \"2603:1046:1500:18::/64\",\r\n + \ \"2603:1046:1500:1c::/64\",\r\n \"2603:1046:1500:20::/64\",\r\n + \ \"2603:1046:1500:24::/64\",\r\n \"2603:1046:1500:28::/64\",\r\n + \ \"2603:1046:1500:2c::/64\",\r\n \"2603:1046:1500:30::/64\",\r\n + \ \"2603:1046:1500:34::/64\",\r\n \"2603:1046:1500:38::/64\",\r\n + \ \"2603:1046:2000:20::/59\",\r\n \"2603:1046:2000:40::/59\",\r\n + \ \"2603:1046:2000:60::/59\",\r\n \"2603:1046:2000:80::/59\",\r\n + \ \"2603:1046:2000:a0::/59\",\r\n \"2603:1046:2000:e0::/59\",\r\n + \ \"2603:1046:2000:100::/59\",\r\n \"2603:1046:2000:120::/59\",\r\n + \ \"2603:1046:2000:140::/59\",\r\n \"2603:1046:2000:160::/59\",\r\n + \ \"2603:1046:2000:180::/59\",\r\n \"2603:1046:2000:1a0::/59\",\r\n + \ \"2603:1046:2000:1c0::/59\",\r\n \"2603:1046:2000:1e0::/59\",\r\n + \ \"2603:1047:1:20::/59\",\r\n \"2603:1047:1:40::/59\",\r\n + \ \"2603:1047:1:60::/59\",\r\n \"2603:1047:1:80::/59\",\r\n + \ \"2603:1047:1:a0::/59\",\r\n \"2603:1047:1:e0::/59\",\r\n + \ \"2603:1047:1:100::/59\",\r\n \"2603:1047:1:120::/59\",\r\n + \ \"2603:1047:1:140::/59\",\r\n \"2603:1047:1:160::/59\",\r\n + \ \"2603:1047:1:180::/59\",\r\n \"2603:1047:1:1a0::/59\",\r\n + \ \"2603:1047:1:1c0::/59\",\r\n \"2603:1047:1:1e0::/59\",\r\n + \ \"2603:1050:1::/48\",\r\n \"2603:1050:2::/47\",\r\n \"2603:1050:5::/48\",\r\n + \ \"2603:1050:6::/47\",\r\n \"2603:1050:100::/40\",\r\n \"2603:1050:211::/48\",\r\n + \ \"2603:1050:214::/48\",\r\n \"2603:1050:300::/40\",\r\n + \ \"2603:1050:400::/48\",\r\n \"2603:1050:402::/48\",\r\n + \ \"2603:1050:403::/48\",\r\n \"2603:1050:404::/48\",\r\n + \ \"2603:1056:1400::/48\",\r\n \"2603:1056:1401::/48\",\r\n + \ \"2603:1056:1402::/48\",\r\n \"2603:1056:1403::/48\",\r\n + \ \"2603:1056:1500::/64\",\r\n \"2603:1056:1500:4::/64\",\r\n + \ \"2603:1056:1500:c::/64\",\r\n \"2603:1056:2000:20::/59\",\r\n + \ \"2603:1056:2000:60::/59\",\r\n \"2603:1057:2:20::/59\",\r\n + \ \"2603:1057:2:60::/59\",\r\n \"2603:1061:1000::/48\",\r\n + \ \"2603:1061:1001::/48\",\r\n \"2603:1061:1002::/48\",\r\n + \ \"2603:1061:1003::/48\",\r\n \"2603:1061:1004::/60\",\r\n + \ \"2603:1062:2::/57\",\r\n \"2603:1062:2:80::/57\",\r\n + \ \"2a01:111:f100:1000::/62\",\r\n \"2a01:111:f100:1004::/63\",\r\n + \ \"2a01:111:f100:2000::/52\",\r\n \"2a01:111:f100:3000::/52\",\r\n + \ \"2a01:111:f100:4002::/64\",\r\n \"2a01:111:f100:5000::/52\",\r\n + \ \"2a01:111:f100:6000::/64\",\r\n \"2a01:111:f100:a000::/63\",\r\n + \ \"2a01:111:f100:a002::/64\",\r\n \"2a01:111:f100:a004::/64\",\r\n + \ \"2a01:111:f403:c000::/64\",\r\n \"2a01:111:f403:c004::/62\",\r\n + \ \"2a01:111:f403:c100::/64\",\r\n \"2a01:111:f403:c10c::/62\",\r\n + \ \"2a01:111:f403:c110::/64\",\r\n \"2a01:111:f403:c111::/64\",\r\n + \ \"2a01:111:f403:c112::/64\",\r\n \"2a01:111:f403:c113::/64\",\r\n + \ \"2a01:111:f403:c114::/64\",\r\n \"2a01:111:f403:c200::/64\",\r\n + \ \"2a01:111:f403:c201::/64\",\r\n \"2a01:111:f403:c202::/64\",\r\n + \ \"2a01:111:f403:c203::/64\",\r\n \"2a01:111:f403:c400::/64\",\r\n + \ \"2a01:111:f403:c401::/64\",\r\n \"2a01:111:f403:c800::/64\",\r\n + \ \"2a01:111:f403:c804::/62\",\r\n \"2a01:111:f403:c900::/64\",\r\n + \ \"2a01:111:f403:c904::/62\",\r\n \"2a01:111:f403:c908::/62\",\r\n + \ \"2a01:111:f403:c90c::/62\",\r\n \"2a01:111:f403:c910::/62\",\r\n + \ \"2a01:111:f403:c914::/62\",\r\n \"2a01:111:f403:c918::/64\",\r\n + \ \"2a01:111:f403:c919::/64\",\r\n \"2a01:111:f403:c91a::/63\",\r\n + \ \"2a01:111:f403:c91c::/63\",\r\n \"2a01:111:f403:c91e::/63\",\r\n + \ \"2a01:111:f403:c920::/63\",\r\n \"2a01:111:f403:c922::/64\",\r\n + \ \"2a01:111:f403:c923::/64\",\r\n \"2a01:111:f403:c924::/62\",\r\n + \ \"2a01:111:f403:c928::/62\",\r\n \"2a01:111:f403:c92c::/64\",\r\n + \ \"2a01:111:f403:c92d::/64\",\r\n \"2a01:111:f403:c92e::/63\",\r\n + \ \"2a01:111:f403:c930::/63\",\r\n \"2a01:111:f403:c932::/63\",\r\n + \ \"2a01:111:f403:c934::/63\",\r\n \"2a01:111:f403:c936::/64\",\r\n + \ \"2a01:111:f403:c937::/64\",\r\n \"2a01:111:f403:c938::/62\",\r\n + \ \"2a01:111:f403:c93c::/62\",\r\n \"2a01:111:f403:c940::/64\",\r\n + \ \"2a01:111:f403:ca00::/62\",\r\n \"2a01:111:f403:ca04::/64\",\r\n + \ \"2a01:111:f403:ca05::/64\",\r\n \"2a01:111:f403:ca06::/63\",\r\n + \ \"2a01:111:f403:ca08::/63\",\r\n \"2a01:111:f403:ca10::/64\",\r\n + \ \"2a01:111:f403:ca11::/64\",\r\n \"2a01:111:f403:ca12::/63\",\r\n + \ \"2a01:111:f403:ca14::/64\",\r\n \"2a01:111:f403:ca16::/63\",\r\n + \ \"2a01:111:f403:ca18::/63\",\r\n \"2a01:111:f403:cc00::/62\",\r\n + \ \"2a01:111:f403:cc04::/64\",\r\n \"2a01:111:f403:cc05::/64\",\r\n + \ \"2a01:111:f403:cc06::/63\",\r\n \"2a01:111:f403:cc08::/63\",\r\n + \ \"2a01:111:f403:d000::/64\",\r\n \"2a01:111:f403:d004::/62\",\r\n + \ \"2a01:111:f403:d100::/64\",\r\n \"2a01:111:f403:d104::/62\",\r\n + \ \"2a01:111:f403:d108::/62\",\r\n \"2a01:111:f403:d10c::/62\",\r\n + \ \"2a01:111:f403:d120::/62\",\r\n \"2a01:111:f403:d124::/64\",\r\n + \ \"2a01:111:f403:d125::/64\",\r\n \"2a01:111:f403:d200::/64\",\r\n + \ \"2a01:111:f403:d201::/64\",\r\n \"2a01:111:f403:d202::/64\",\r\n + \ \"2a01:111:f403:d203::/64\",\r\n \"2a01:111:f403:d401::/64\",\r\n + \ \"2a01:111:f403:d402::/64\",\r\n \"2a01:111:f403:d800::/64\",\r\n + \ \"2a01:111:f403:d804::/62\",\r\n \"2a01:111:f403:d900::/64\",\r\n + \ \"2a01:111:f403:d904::/62\",\r\n \"2a01:111:f403:d908::/62\",\r\n + \ \"2a01:111:f403:d90c::/62\",\r\n \"2a01:111:f403:d910::/62\",\r\n + \ \"2a01:111:f403:d914::/64\",\r\n \"2a01:111:f403:d915::/64\",\r\n + \ \"2a01:111:f403:da00::/64\",\r\n \"2a01:111:f403:da01::/64\",\r\n + \ \"2a01:111:f403:da02::/64\",\r\n \"2a01:111:f403:da03::/64\",\r\n + \ \"2a01:111:f403:dc00::/64\",\r\n \"2a01:111:f403:dc01::/64\",\r\n + \ \"2a01:111:f403:e000::/64\",\r\n \"2a01:111:f403:e003::/64\",\r\n + \ \"2a01:111:f403:e004::/62\",\r\n \"2a01:111:f403:e008::/62\",\r\n + \ \"2a01:111:f403:e00c::/62\",\r\n \"2a01:111:f403:e010::/62\",\r\n + \ \"2a01:111:f403:e014::/64\",\r\n \"2a01:111:f403:e200::/64\",\r\n + \ \"2a01:111:f403:e201::/64\",\r\n \"2a01:111:f403:e202::/64\",\r\n + \ \"2a01:111:f403:e203::/64\",\r\n \"2a01:111:f403:e400::/64\",\r\n + \ \"2a01:111:f403:e401::/64\",\r\n \"2a01:111:f403:f000::/64\",\r\n + \ \"2a01:111:f403:f800::/62\",\r\n \"2a01:111:f403:f804::/62\",\r\n + \ \"2a01:111:f403:f900::/62\",\r\n \"2a01:111:f403:f904::/62\",\r\n + \ \"2a01:111:f403:f908::/62\",\r\n \"2a01:111:f403:f90c::/62\",\r\n + \ \"2a01:111:f403:f910::/62\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCloud.australiacentral\",\r\n \"id\": + \"AzureCloud.australiacentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"australiacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.155.128/26\",\r\n + \ \"13.105.27.160/27\",\r\n \"20.36.32.0/19\",\r\n \"20.36.104.0/21\",\r\n + \ \"20.37.0.0/18\",\r\n \"20.37.224.0/19\",\r\n \"20.38.184.0/22\",\r\n + \ \"20.39.64.0/21\",\r\n \"20.47.35.0/24\",\r\n \"20.53.0.0/19\",\r\n + \ \"20.53.48.0/21\",\r\n \"20.60.214.0/23\",\r\n \"20.70.0.0/18\",\r\n + \ \"20.135.52.0/23\",\r\n \"20.150.124.0/24\",\r\n \"20.157.0.0/24\",\r\n + \ \"20.157.101.0/24\",\r\n \"20.157.138.0/24\",\r\n \"20.190.189.64/26\",\r\n + \ \"40.82.240.0/22\",\r\n \"40.90.130.48/28\",\r\n \"40.90.142.96/27\",\r\n + \ \"40.90.149.64/27\",\r\n \"40.126.61.64/26\",\r\n \"52.108.74.0/24\",\r\n + \ \"52.108.95.0/24\",\r\n \"52.109.128.0/22\",\r\n \"52.111.248.0/24\",\r\n + \ \"52.143.219.0/24\",\r\n \"52.239.216.0/23\",\r\n \"2603:1010:300::/47\",\r\n + \ \"2603:1010:303::/48\",\r\n \"2603:1010:304::/47\",\r\n + \ \"2603:1016:1400:20::/59\",\r\n \"2603:1016:2400::/48\",\r\n + \ \"2603:1016:2500:4::/64\",\r\n \"2603:1017:0:20::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.australiacentral2\",\r\n + \ \"id\": \"AzureCloud.australiacentral2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.158.224/27\",\r\n \"20.36.64.0/19\",\r\n + \ \"20.36.112.0/20\",\r\n \"20.39.72.0/21\",\r\n \"20.39.96.0/19\",\r\n + \ \"20.47.36.0/24\",\r\n \"20.53.56.0/21\",\r\n \"20.135.54.0/23\",\r\n + \ \"20.150.103.0/24\",\r\n \"20.157.1.0/24\",\r\n \"20.190.189.128/26\",\r\n + \ \"20.193.96.0/19\",\r\n \"40.82.244.0/22\",\r\n \"40.90.31.96/27\",\r\n + \ \"40.90.130.32/28\",\r\n \"40.90.142.64/27\",\r\n \"40.90.149.32/27\",\r\n + \ \"40.126.61.128/26\",\r\n \"40.126.128.0/18\",\r\n \"52.108.180.0/24\",\r\n + \ \"52.108.201.0/24\",\r\n \"52.109.100.0/23\",\r\n \"52.111.249.0/24\",\r\n + \ \"52.143.218.0/24\",\r\n \"52.239.218.0/23\",\r\n \"2603:1010:400::/47\",\r\n + \ \"2603:1010:403::/48\",\r\n \"2603:1010:404::/47\",\r\n + \ \"2603:1016:1400:40::/59\",\r\n \"2603:1016:2401::/48\",\r\n + \ \"2603:1016:2500:8::/64\",\r\n \"2603:1017:0:40::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.australiaeast\",\r\n + \ \"id\": \"AzureCloud.australiaeast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.70.64.0/18\",\r\n + \ \"13.72.224.0/19\",\r\n \"13.73.192.0/20\",\r\n \"13.75.128.0/17\",\r\n + \ \"13.104.211.128/26\",\r\n \"13.105.16.192/26\",\r\n \"13.105.20.128/26\",\r\n + \ \"13.105.52.192/26\",\r\n \"13.105.53.128/26\",\r\n \"20.37.192.0/19\",\r\n + \ \"20.38.112.0/23\",\r\n \"20.40.64.0/20\",\r\n \"20.40.80.0/21\",\r\n + \ \"20.40.120.0/21\",\r\n \"20.40.176.0/20\",\r\n \"20.42.192.0/19\",\r\n + \ \"20.43.96.0/20\",\r\n \"20.47.37.0/24\",\r\n \"20.47.122.0/23\",\r\n + \ \"20.53.32.0/28\",\r\n \"20.53.40.0/21\",\r\n \"20.53.64.0/18\",\r\n + \ \"20.53.128.0/17\",\r\n \"20.58.128.0/18\",\r\n \"20.60.72.0/22\",\r\n + \ \"20.60.182.0/23\",\r\n \"20.70.128.0/17\",\r\n \"20.92.64.0/18\",\r\n + \ \"20.92.128.0/17\",\r\n \"20.135.120.0/21\",\r\n \"20.150.66.0/24\",\r\n + \ \"20.150.92.0/24\",\r\n \"20.150.117.0/24\",\r\n \"20.157.44.0/24\",\r\n + \ \"20.157.107.0/24\",\r\n \"20.157.155.0/24\",\r\n \"20.188.128.0/17\",\r\n + \ \"20.190.142.0/25\",\r\n \"20.190.167.0/24\",\r\n \"20.191.192.0/18\",\r\n + \ \"20.193.0.0/18\",\r\n \"20.193.64.0/19\",\r\n \"20.211.0.0/18\",\r\n + \ \"23.101.208.0/20\",\r\n \"40.79.160.0/20\",\r\n \"40.79.211.0/24\",\r\n + \ \"40.82.32.0/22\",\r\n \"40.82.192.0/19\",\r\n \"40.87.208.0/22\",\r\n + \ \"40.90.18.0/28\",\r\n \"40.90.30.0/25\",\r\n \"40.90.130.80/28\",\r\n + \ \"40.90.130.208/28\",\r\n \"40.90.140.32/27\",\r\n \"40.90.142.160/27\",\r\n + \ \"40.90.147.64/27\",\r\n \"40.90.150.0/27\",\r\n \"40.112.37.128/26\",\r\n + \ \"40.126.14.0/25\",\r\n \"40.126.39.0/24\",\r\n \"40.126.224.0/19\",\r\n + \ \"52.108.40.0/23\",\r\n \"52.108.83.0/24\",\r\n \"52.109.112.0/22\",\r\n + \ \"52.111.224.0/24\",\r\n \"52.113.88.0/22\",\r\n \"52.113.103.0/24\",\r\n + \ \"52.114.16.0/22\",\r\n \"52.114.58.0/23\",\r\n \"52.114.192.0/23\",\r\n + \ \"52.115.98.0/24\",\r\n \"52.120.158.0/23\",\r\n \"52.121.108.0/22\",\r\n + \ \"52.143.199.0/24\",\r\n \"52.143.200.0/23\",\r\n \"52.147.0.0/19\",\r\n + \ \"52.156.160.0/19\",\r\n \"52.187.192.0/18\",\r\n \"52.232.136.0/21\",\r\n + \ \"52.232.154.0/24\",\r\n \"52.237.192.0/18\",\r\n \"52.239.130.0/23\",\r\n + \ \"52.239.226.0/24\",\r\n \"52.245.16.0/22\",\r\n \"104.44.90.64/26\",\r\n + \ \"104.44.93.96/27\",\r\n \"104.44.95.48/28\",\r\n \"104.46.29.0/24\",\r\n + \ \"104.46.30.0/23\",\r\n \"104.209.80.0/20\",\r\n \"104.210.64.0/18\",\r\n + \ \"191.238.66.0/23\",\r\n \"191.239.64.0/19\",\r\n \"2603:1010::/46\",\r\n + \ \"2603:1010:5::/48\",\r\n \"2603:1010:6::/47\",\r\n \"2603:1016:1400:60::/59\",\r\n + \ \"2603:1016:2402::/48\",\r\n \"2603:1016:2500:c::/64\",\r\n + \ \"2603:1017:0:60::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.australiasoutheast\",\r\n \"id\": \"AzureCloud.australiasoutheast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"australiasoutheast\",\r\n \"state\": + \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.70.128.0/18\",\r\n \"13.73.96.0/19\",\r\n \"13.77.0.0/18\",\r\n + \ \"20.40.160.0/20\",\r\n \"20.42.224.0/19\",\r\n \"20.45.144.0/20\",\r\n + \ \"20.46.96.0/20\",\r\n \"20.47.38.0/24\",\r\n \"20.47.74.0/23\",\r\n + \ \"20.58.192.0/18\",\r\n \"20.60.32.0/23\",\r\n \"20.70.64.0/18\",\r\n + \ \"20.92.0.0/18\",\r\n \"20.135.50.0/23\",\r\n \"20.150.12.0/23\",\r\n + \ \"20.150.119.0/24\",\r\n \"20.157.45.0/24\",\r\n \"20.190.96.0/19\",\r\n + \ \"20.190.142.128/25\",\r\n \"20.190.168.0/24\",\r\n \"20.202.61.0/24\",\r\n + \ \"23.101.224.0/19\",\r\n \"40.79.212.0/24\",\r\n \"40.81.48.0/20\",\r\n + \ \"40.87.212.0/22\",\r\n \"40.90.24.0/25\",\r\n \"40.90.27.0/26\",\r\n + \ \"40.90.138.128/27\",\r\n \"40.90.155.64/26\",\r\n \"40.112.37.192/26\",\r\n + \ \"40.115.64.0/19\",\r\n \"40.126.14.128/25\",\r\n \"40.126.40.0/24\",\r\n + \ \"40.127.64.0/19\",\r\n \"52.108.194.0/24\",\r\n \"52.108.234.0/23\",\r\n + \ \"52.109.116.0/22\",\r\n \"52.111.250.0/24\",\r\n \"52.113.13.0/24\",\r\n + \ \"52.113.76.0/23\",\r\n \"52.114.20.0/22\",\r\n \"52.114.60.0/23\",\r\n + \ \"52.115.99.0/24\",\r\n \"52.121.106.0/23\",\r\n \"52.136.25.0/24\",\r\n + \ \"52.147.32.0/19\",\r\n \"52.158.128.0/19\",\r\n \"52.189.192.0/18\",\r\n + \ \"52.239.132.0/23\",\r\n \"52.239.225.0/24\",\r\n \"52.243.64.0/18\",\r\n + \ \"52.245.20.0/22\",\r\n \"52.255.32.0/19\",\r\n \"104.44.90.32/27\",\r\n + \ \"104.44.93.128/27\",\r\n \"104.44.95.64/28\",\r\n \"104.46.28.0/24\",\r\n + \ \"104.46.160.0/19\",\r\n \"104.209.64.0/20\",\r\n \"191.239.160.0/19\",\r\n + \ \"191.239.192.0/22\",\r\n \"2603:1010:100::/40\",\r\n \"2603:1010:200::/47\",\r\n + \ \"2603:1010:202::/48\",\r\n \"2603:1010:204::/48\",\r\n + \ \"2603:1010:205::/48\",\r\n \"2603:1010:206::/48\",\r\n + \ \"2603:1016:1400::/59\",\r\n \"2603:1016:2403::/48\",\r\n + \ \"2603:1016:2500::/64\",\r\n \"2603:1017::/59\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"AzureCloud.brazilse\",\r\n + \ \"id\": \"AzureCloud.brazilse\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.105.27.128/27\",\r\n + \ \"13.105.36.48/28\",\r\n \"13.105.36.96/27\",\r\n \"13.105.52.0/27\",\r\n + \ \"20.40.32.0/21\",\r\n \"20.135.76.0/23\",\r\n \"20.150.73.0/24\",\r\n + \ \"20.150.80.0/24\",\r\n \"20.150.123.0/24\",\r\n \"20.157.42.0/24\",\r\n + \ \"20.195.128.0/22\",\r\n \"20.195.144.0/21\",\r\n \"20.206.0.0/18\",\r\n + \ \"23.97.112.192/27\",\r\n \"23.97.116.0/22\",\r\n \"23.97.120.0/21\",\r\n + \ \"40.79.204.192/26\",\r\n \"40.123.128.0/22\",\r\n \"40.126.207.0/24\",\r\n + \ \"52.108.111.0/24\",\r\n \"52.108.112.0/24\",\r\n \"52.109.164.0/24\",\r\n + \ \"52.111.207.0/24\",\r\n \"52.112.206.0/24\",\r\n \"52.253.197.0/24\",\r\n + \ \"191.232.16.0/21\",\r\n \"191.233.8.0/21\",\r\n \"191.233.48.0/21\",\r\n + \ \"191.233.160.0/19\",\r\n \"191.234.224.0/19\",\r\n \"191.237.224.0/21\",\r\n + \ \"2603:1050:400::/48\",\r\n \"2603:1050:402::/48\",\r\n + \ \"2603:1050:403::/48\",\r\n \"2603:1050:404::/48\",\r\n + \ \"2603:1056:1403::/48\",\r\n \"2603:1056:1500:4::/64\",\r\n + \ \"2603:1056:2000:60::/59\",\r\n \"2603:1057:2:60::/59\",\r\n + \ \"2603:1061:1002::/48\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.brazilsouth\",\r\n \"id\": \"AzureCloud.brazilsouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.105.52.80/28\",\r\n \"13.105.52.128/26\",\r\n + \ \"20.40.16.0/21\",\r\n \"20.40.112.0/21\",\r\n \"20.47.39.0/24\",\r\n + \ \"20.47.86.0/24\",\r\n \"20.60.36.0/23\",\r\n \"20.135.128.0/22\",\r\n + \ \"20.135.132.0/23\",\r\n \"20.150.111.0/24\",\r\n \"20.157.55.0/24\",\r\n + \ \"20.190.145.0/25\",\r\n \"20.190.173.0/24\",\r\n \"20.195.136.0/21\",\r\n + \ \"20.195.152.0/21\",\r\n \"20.195.160.0/19\",\r\n \"20.195.192.0/18\",\r\n + \ \"20.197.128.0/17\",\r\n \"20.201.0.0/17\",\r\n \"20.206.64.0/18\",\r\n + \ \"20.206.128.0/18\",\r\n \"20.209.12.0/23\",\r\n \"23.97.96.0/20\",\r\n + \ \"23.97.112.0/25\",\r\n \"23.97.112.128/28\",\r\n \"23.97.112.160/27\",\r\n + \ \"40.90.29.64/26\",\r\n \"40.90.29.128/26\",\r\n \"40.90.133.32/27\",\r\n + \ \"40.90.133.144/28\",\r\n \"40.90.141.64/27\",\r\n \"40.90.144.224/27\",\r\n + \ \"40.90.145.96/27\",\r\n \"40.90.145.128/27\",\r\n \"40.90.157.0/27\",\r\n + \ \"40.126.17.0/25\",\r\n \"40.126.45.0/24\",\r\n \"52.108.36.0/22\",\r\n + \ \"52.108.82.0/24\",\r\n \"52.108.171.0/24\",\r\n \"52.108.172.0/23\",\r\n + \ \"52.109.108.0/22\",\r\n \"52.111.225.0/24\",\r\n \"52.112.118.0/24\",\r\n + \ \"52.113.132.0/24\",\r\n \"52.114.194.0/23\",\r\n \"52.114.196.0/22\",\r\n + \ \"52.114.200.0/22\",\r\n \"52.121.40.0/21\",\r\n \"52.253.185.0/24\",\r\n + \ \"52.253.186.0/24\",\r\n \"104.41.0.0/18\",\r\n \"191.232.32.0/19\",\r\n + \ \"191.232.160.0/19\",\r\n \"191.232.192.0/18\",\r\n \"191.233.0.0/21\",\r\n + \ \"191.233.16.0/20\",\r\n \"191.233.128.0/20\",\r\n \"191.233.192.0/18\",\r\n + \ \"191.234.128.0/18\",\r\n \"191.234.192.0/19\",\r\n \"191.235.32.0/19\",\r\n + \ \"191.235.64.0/18\",\r\n \"191.235.196.0/22\",\r\n \"191.235.200.0/21\",\r\n + \ \"191.235.224.0/20\",\r\n \"191.235.240.0/21\",\r\n \"191.235.248.0/23\",\r\n + \ \"191.235.250.0/25\",\r\n \"191.237.195.0/24\",\r\n \"191.237.200.0/21\",\r\n + \ \"191.237.248.0/21\",\r\n \"191.238.72.0/21\",\r\n \"191.238.128.0/21\",\r\n + \ \"191.238.192.0/19\",\r\n \"191.239.112.0/20\",\r\n \"191.239.204.0/22\",\r\n + \ \"191.239.240.0/20\",\r\n \"2603:1050:1::/48\",\r\n \"2603:1050:2::/47\",\r\n + \ \"2603:1050:5::/48\",\r\n \"2603:1050:6::/47\",\r\n \"2603:1056:1400::/48\",\r\n + \ \"2603:1056:1500::/64\",\r\n \"2603:1056:2000:20::/59\",\r\n + \ \"2603:1057:2:20::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.canadacentral\",\r\n \"id\": \"AzureCloud.canadacentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.71.160.0/19\",\r\n \"13.88.224.0/19\",\r\n \"13.104.151.192/26\",\r\n + \ \"13.104.152.0/25\",\r\n \"13.104.208.176/28\",\r\n \"13.104.212.192/26\",\r\n + \ \"13.104.223.192/26\",\r\n \"20.38.114.0/25\",\r\n \"20.38.144.0/21\",\r\n + \ \"20.39.128.0/20\",\r\n \"20.43.0.0/19\",\r\n \"20.47.40.0/24\",\r\n + \ \"20.47.87.0/24\",\r\n \"20.48.128.0/18\",\r\n \"20.48.192.0/20\",\r\n + \ \"20.48.224.0/19\",\r\n \"20.60.42.0/23\",\r\n \"20.60.242.0/23\",\r\n + \ \"20.63.0.0/17\",\r\n \"20.104.0.0/17\",\r\n \"20.104.192.0/18\",\r\n + \ \"20.116.0.0/18\",\r\n \"20.135.182.0/23\",\r\n \"20.135.184.0/22\",\r\n + \ \"20.150.16.0/24\",\r\n \"20.150.31.0/24\",\r\n \"20.150.71.0/24\",\r\n + \ \"20.150.100.0/24\",\r\n \"20.151.0.0/16\",\r\n \"20.157.52.0/24\",\r\n + \ \"20.157.148.0/24\",\r\n \"20.190.139.0/25\",\r\n \"20.190.161.0/24\",\r\n + \ \"20.200.64.0/18\",\r\n \"40.79.216.0/24\",\r\n \"40.80.44.0/22\",\r\n + \ \"40.82.160.0/19\",\r\n \"40.85.192.0/18\",\r\n \"40.90.17.144/28\",\r\n + \ \"40.90.128.0/28\",\r\n \"40.90.138.32/27\",\r\n \"40.90.143.160/27\",\r\n + \ \"40.90.151.96/27\",\r\n \"40.126.11.0/25\",\r\n \"40.126.33.0/24\",\r\n + \ \"52.108.42.0/23\",\r\n \"52.108.84.0/24\",\r\n \"52.109.92.0/22\",\r\n + \ \"52.111.251.0/24\",\r\n \"52.114.160.0/22\",\r\n \"52.136.23.0/24\",\r\n + \ \"52.136.27.0/24\",\r\n \"52.138.0.0/18\",\r\n \"52.139.0.0/18\",\r\n + \ \"52.156.0.0/19\",\r\n \"52.228.0.0/17\",\r\n \"52.233.0.0/18\",\r\n + \ \"52.237.0.0/18\",\r\n \"52.239.148.64/26\",\r\n \"52.239.189.0/24\",\r\n + \ \"52.245.28.0/22\",\r\n \"52.246.152.0/21\",\r\n \"52.253.196.0/24\",\r\n + \ \"104.44.93.32/27\",\r\n \"104.44.95.16/28\",\r\n \"2603:1030:208::/47\",\r\n + \ \"2603:1030:f00::/47\",\r\n \"2603:1030:f02::/48\",\r\n + \ \"2603:1030:f04::/48\",\r\n \"2603:1030:f05::/48\",\r\n + \ \"2603:1030:f06::/48\",\r\n \"2603:1030:f07::/56\",\r\n + \ \"2603:1030:f08::/48\",\r\n \"2603:1036:2401::/48\",\r\n + \ \"2603:1036:2500:30::/64\",\r\n \"2603:1036:3000:40::/59\",\r\n + \ \"2603:1037:1:40::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.canadaeast\",\r\n \"id\": \"AzureCloud.canadaeast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.154.128/25\",\r\n \"20.38.121.128/25\",\r\n + \ \"20.47.41.0/24\",\r\n \"20.47.88.0/24\",\r\n \"20.60.142.0/23\",\r\n + \ \"20.104.128.0/18\",\r\n \"20.135.66.0/23\",\r\n \"20.150.1.0/25\",\r\n + \ \"20.150.40.128/25\",\r\n \"20.150.113.0/24\",\r\n \"20.157.4.0/23\",\r\n + \ \"20.157.8.0/22\",\r\n \"20.157.161.0/24\",\r\n \"20.190.139.128/25\",\r\n + \ \"20.190.162.0/24\",\r\n \"20.200.0.0/18\",\r\n \"40.69.96.0/19\",\r\n + \ \"40.79.217.0/24\",\r\n \"40.80.40.0/22\",\r\n \"40.80.240.0/20\",\r\n + \ \"40.86.192.0/18\",\r\n \"40.89.0.0/19\",\r\n \"40.90.17.128/28\",\r\n + \ \"40.90.138.64/27\",\r\n \"40.90.156.96/27\",\r\n \"40.126.11.128/25\",\r\n + \ \"40.126.34.0/24\",\r\n \"52.108.193.0/24\",\r\n \"52.108.232.0/23\",\r\n + \ \"52.109.96.0/22\",\r\n \"52.111.226.0/24\",\r\n \"52.114.164.0/22\",\r\n + \ \"52.136.22.0/24\",\r\n \"52.139.64.0/18\",\r\n \"52.155.0.0/19\",\r\n + \ \"52.229.64.0/18\",\r\n \"52.232.128.0/21\",\r\n \"52.235.0.0/18\",\r\n + \ \"52.239.164.128/26\",\r\n \"52.239.190.0/25\",\r\n \"52.242.0.0/18\",\r\n + \ \"52.245.32.0/22\",\r\n \"104.44.93.64/27\",\r\n \"104.44.95.32/28\",\r\n + \ \"2603:1030:20a::/47\",\r\n \"2603:1030:1000::/47\",\r\n + \ \"2603:1030:1002::/48\",\r\n \"2603:1030:1004::/48\",\r\n + \ \"2603:1030:1005::/48\",\r\n \"2603:1030:1006::/48\",\r\n + \ \"2603:1036:2402::/48\",\r\n \"2603:1036:2500:34::/64\",\r\n + \ \"2603:1036:3000:80::/59\",\r\n \"2603:1037:1:80::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.centralfrance\",\r\n + \ \"id\": \"AzureCloud.centralfrance\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.156.0/24\",\r\n + \ \"20.38.196.0/22\",\r\n \"20.39.232.0/21\",\r\n \"20.39.240.0/20\",\r\n + \ \"20.40.128.0/19\",\r\n \"20.43.32.0/19\",\r\n \"20.47.44.0/24\",\r\n + \ \"20.47.80.0/23\",\r\n \"20.60.13.0/24\",\r\n \"20.60.156.0/23\",\r\n + \ \"20.74.0.0/17\",\r\n \"20.111.0.0/18\",\r\n \"20.135.146.0/23\",\r\n + \ \"20.135.148.0/22\",\r\n \"20.150.61.0/24\",\r\n \"20.157.129.0/24\",\r\n + \ \"20.188.32.0/19\",\r\n \"20.190.147.0/25\",\r\n \"20.190.177.0/24\",\r\n + \ \"20.199.0.0/17\",\r\n \"20.202.0.0/24\",\r\n \"20.209.8.0/23\",\r\n + \ \"40.66.32.0/19\",\r\n \"40.79.128.0/20\",\r\n \"40.79.144.0/21\",\r\n + \ \"40.79.205.0/26\",\r\n \"40.79.222.0/24\",\r\n \"40.80.24.0/22\",\r\n + \ \"40.89.128.0/18\",\r\n \"40.90.130.240/28\",\r\n \"40.90.132.0/27\",\r\n + \ \"40.90.136.64/26\",\r\n \"40.90.136.128/27\",\r\n \"40.90.147.128/26\",\r\n + \ \"40.90.147.192/27\",\r\n \"40.126.19.0/25\",\r\n \"40.126.49.0/24\",\r\n + \ \"51.11.192.0/18\",\r\n \"51.103.0.0/17\",\r\n \"51.138.192.0/19\",\r\n + \ \"52.108.52.0/23\",\r\n \"52.108.89.0/24\",\r\n \"52.108.168.0/23\",\r\n + \ \"52.108.170.0/24\",\r\n \"52.109.68.0/22\",\r\n \"52.111.231.0/24\",\r\n + \ \"52.112.172.0/22\",\r\n \"52.112.190.0/24\",\r\n \"52.112.213.0/24\",\r\n + \ \"52.112.214.0/23\",\r\n \"52.114.104.0/22\",\r\n \"52.114.114.0/23\",\r\n + \ \"52.115.112.0/23\",\r\n \"52.115.128.0/21\",\r\n \"52.115.136.0/22\",\r\n + \ \"52.121.88.0/21\",\r\n \"52.121.96.0/22\",\r\n \"52.121.178.0/23\",\r\n + \ \"52.121.180.0/23\",\r\n \"52.143.128.0/18\",\r\n \"52.143.215.0/24\",\r\n + \ \"52.143.216.0/23\",\r\n \"52.239.134.0/24\",\r\n \"52.239.194.0/24\",\r\n + \ \"52.239.241.0/24\",\r\n \"52.245.116.0/22\",\r\n \"2603:1020:800::/47\",\r\n + \ \"2603:1020:802::/48\",\r\n \"2603:1020:804::/48\",\r\n + \ \"2603:1020:805::/48\",\r\n \"2603:1020:806::/48\",\r\n + \ \"2603:1026:2400::/48\",\r\n \"2603:1026:2500:1c::/64\",\r\n + \ \"2603:1026:3000:100::/59\",\r\n \"2603:1027:1:100::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.centralindia\",\r\n + \ \"id\": \"AzureCloud.centralindia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.71.0.0/18\",\r\n + \ \"13.104.148.128/25\",\r\n \"13.105.98.0/27\",\r\n \"13.105.98.32/28\",\r\n + \ \"13.105.98.64/27\",\r\n \"20.38.126.0/23\",\r\n \"20.40.40.0/21\",\r\n + \ \"20.40.48.0/20\",\r\n \"20.43.120.0/21\",\r\n \"20.47.42.0/24\",\r\n + \ \"20.47.89.0/24\",\r\n \"20.60.84.0/23\",\r\n \"20.135.90.0/23\",\r\n + \ \"20.135.92.0/22\",\r\n \"20.150.114.0/24\",\r\n \"20.157.139.0/24\",\r\n + \ \"20.190.146.0/25\",\r\n \"20.190.175.0/24\",\r\n \"20.192.0.0/19\",\r\n + \ \"20.192.40.0/21\",\r\n \"20.192.96.0/21\",\r\n \"20.192.168.0/21\",\r\n + \ \"20.193.128.0/19\",\r\n \"20.193.224.0/19\",\r\n \"20.197.0.0/18\",\r\n + \ \"20.198.0.0/17\",\r\n \"20.202.41.0/24\",\r\n \"20.204.0.0/16\",\r\n + \ \"20.207.64.0/18\",\r\n \"40.79.207.32/27\",\r\n \"40.79.207.64/28\",\r\n + \ \"40.79.207.96/27\",\r\n \"40.79.214.0/24\",\r\n \"40.80.48.0/21\",\r\n + \ \"40.80.64.0/19\",\r\n \"40.81.224.0/19\",\r\n \"40.87.224.0/22\",\r\n + \ \"40.90.137.128/27\",\r\n \"40.112.39.0/25\",\r\n \"40.112.39.128/26\",\r\n + \ \"40.126.18.0/25\",\r\n \"40.126.47.0/24\",\r\n \"52.108.44.0/23\",\r\n + \ \"52.108.85.0/24\",\r\n \"52.109.56.0/22\",\r\n \"52.111.252.0/24\",\r\n + \ \"52.113.10.0/23\",\r\n \"52.113.70.0/23\",\r\n \"52.113.92.0/22\",\r\n + \ \"52.113.193.0/24\",\r\n \"52.114.40.0/22\",\r\n \"52.121.122.0/23\",\r\n + \ \"52.121.124.0/22\",\r\n \"52.136.24.0/24\",\r\n \"52.140.64.0/18\",\r\n + \ \"52.172.128.0/17\",\r\n \"52.239.135.64/26\",\r\n \"52.239.202.0/24\",\r\n + \ \"52.245.96.0/22\",\r\n \"52.253.181.0/24\",\r\n \"52.253.191.0/24\",\r\n + \ \"104.44.92.128/27\",\r\n \"104.44.94.192/28\",\r\n \"104.47.210.0/23\",\r\n + \ \"104.211.64.0/18\",\r\n \"2603:1040:a00::/46\",\r\n \"2603:1040:a05::/48\",\r\n + \ \"2603:1040:a06::/47\",\r\n \"2603:1046:1400::/48\",\r\n + \ \"2603:1046:1500:8::/64\",\r\n \"2603:1046:2000:80::/59\",\r\n + \ \"2603:1047:1:80::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.centralus\",\r\n \"id\": \"AzureCloud.centralus\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.67.128.0/20\",\r\n \"13.67.144.0/21\",\r\n \"13.67.152.0/24\",\r\n + \ \"13.67.153.0/28\",\r\n \"13.67.153.32/27\",\r\n \"13.67.153.64/26\",\r\n + \ \"13.67.153.128/25\",\r\n \"13.67.155.0/24\",\r\n \"13.67.156.0/22\",\r\n + \ \"13.67.160.0/19\",\r\n \"13.67.192.0/18\",\r\n \"13.86.0.0/17\",\r\n + \ \"13.89.0.0/16\",\r\n \"13.104.147.128/25\",\r\n \"13.104.219.128/25\",\r\n + \ \"13.105.17.192/26\",\r\n \"13.105.24.0/24\",\r\n \"13.105.37.0/26\",\r\n + \ \"13.105.53.192/26\",\r\n \"13.105.98.160/27\",\r\n \"13.105.98.192/28\",\r\n + \ \"13.105.98.224/27\",\r\n \"13.105.101.48/28\",\r\n \"13.105.101.64/26\",\r\n + \ \"20.37.128.0/18\",\r\n \"20.38.96.0/23\",\r\n \"20.38.122.0/23\",\r\n + \ \"20.40.192.0/18\",\r\n \"20.44.8.0/21\",\r\n \"20.46.224.0/19\",\r\n + \ \"20.47.58.0/23\",\r\n \"20.47.78.0/23\",\r\n \"20.60.18.0/24\",\r\n + \ \"20.60.30.0/23\",\r\n \"20.60.178.0/23\",\r\n \"20.60.194.0/23\",\r\n + \ \"20.60.240.0/23\",\r\n \"20.60.244.0/23\",\r\n \"20.80.64.0/18\",\r\n + \ \"20.83.0.0/18\",\r\n \"20.84.128.0/17\",\r\n \"20.98.128.0/18\",\r\n + \ \"20.106.0.0/18\",\r\n \"20.109.192.0/18\",\r\n \"20.112.192.0/18\",\r\n + \ \"20.135.0.0/22\",\r\n \"20.135.188.0/22\",\r\n \"20.135.192.0/23\",\r\n + \ \"20.143.4.0/24\",\r\n \"20.150.43.128/25\",\r\n \"20.150.58.0/24\",\r\n + \ \"20.150.63.0/24\",\r\n \"20.150.77.0/24\",\r\n \"20.150.89.0/24\",\r\n + \ \"20.150.95.0/24\",\r\n \"20.157.34.0/23\",\r\n \"20.157.142.0/23\",\r\n + \ \"20.184.64.0/18\",\r\n \"20.186.192.0/18\",\r\n \"20.190.134.0/24\",\r\n + \ \"20.190.155.0/24\",\r\n \"23.99.128.0/17\",\r\n \"23.100.80.0/21\",\r\n + \ \"23.100.240.0/20\",\r\n \"23.101.112.0/20\",\r\n \"23.102.202.0/24\",\r\n + \ \"40.67.160.0/19\",\r\n \"40.69.128.0/18\",\r\n \"40.77.0.0/17\",\r\n + \ \"40.77.130.128/26\",\r\n \"40.77.137.0/25\",\r\n \"40.77.138.0/25\",\r\n + \ \"40.77.161.64/26\",\r\n \"40.77.166.192/26\",\r\n \"40.77.171.0/24\",\r\n + \ \"40.77.175.192/27\",\r\n \"40.77.175.240/28\",\r\n \"40.77.182.16/28\",\r\n + \ \"40.77.182.192/26\",\r\n \"40.77.184.128/25\",\r\n \"40.77.197.0/24\",\r\n + \ \"40.77.255.128/26\",\r\n \"40.78.128.0/18\",\r\n \"40.78.221.0/24\",\r\n + \ \"40.82.16.0/22\",\r\n \"40.82.96.0/22\",\r\n \"40.83.0.0/20\",\r\n + \ \"40.83.16.0/21\",\r\n \"40.83.24.0/26\",\r\n \"40.83.24.64/27\",\r\n + \ \"40.83.24.128/25\",\r\n \"40.83.25.0/24\",\r\n \"40.83.26.0/23\",\r\n + \ \"40.83.28.0/22\",\r\n \"40.83.32.0/19\",\r\n \"40.86.0.0/17\",\r\n + \ \"40.87.180.0/30\",\r\n \"40.87.180.4/31\",\r\n \"40.87.180.14/31\",\r\n + \ \"40.87.180.16/30\",\r\n \"40.87.180.20/31\",\r\n \"40.87.180.28/30\",\r\n + \ \"40.87.180.32/29\",\r\n \"40.87.180.42/31\",\r\n \"40.87.180.44/30\",\r\n + \ \"40.87.180.48/28\",\r\n \"40.87.180.64/30\",\r\n \"40.87.180.74/31\",\r\n + \ \"40.87.180.76/30\",\r\n \"40.87.180.80/28\",\r\n \"40.87.180.96/27\",\r\n + \ \"40.87.180.128/26\",\r\n \"40.87.180.192/30\",\r\n \"40.87.180.202/31\",\r\n + \ \"40.87.180.204/30\",\r\n \"40.87.180.208/28\",\r\n \"40.87.180.224/28\",\r\n + \ \"40.87.180.240/29\",\r\n \"40.87.180.248/30\",\r\n \"40.87.181.4/30\",\r\n + \ \"40.87.181.8/29\",\r\n \"40.87.181.16/28\",\r\n \"40.87.181.32/28\",\r\n + \ \"40.87.181.48/29\",\r\n \"40.87.181.56/31\",\r\n \"40.87.182.4/30\",\r\n + \ \"40.87.182.8/29\",\r\n \"40.87.182.24/29\",\r\n \"40.87.182.32/28\",\r\n + \ \"40.87.182.48/29\",\r\n \"40.87.182.56/30\",\r\n \"40.87.182.62/31\",\r\n + \ \"40.87.182.64/26\",\r\n \"40.87.182.128/25\",\r\n \"40.87.183.0/28\",\r\n + \ \"40.87.183.16/29\",\r\n \"40.87.183.24/30\",\r\n \"40.87.183.34/31\",\r\n + \ \"40.87.183.36/30\",\r\n \"40.87.183.42/31\",\r\n \"40.87.183.44/30\",\r\n + \ \"40.87.183.54/31\",\r\n \"40.87.183.56/29\",\r\n \"40.87.183.64/26\",\r\n + \ \"40.87.183.144/28\",\r\n \"40.87.183.160/27\",\r\n \"40.87.183.192/27\",\r\n + \ \"40.87.183.224/29\",\r\n \"40.87.183.232/30\",\r\n \"40.87.183.236/31\",\r\n + \ \"40.87.183.244/30\",\r\n \"40.87.183.248/29\",\r\n \"40.89.224.0/19\",\r\n + \ \"40.90.16.0/27\",\r\n \"40.90.21.128/25\",\r\n \"40.90.22.0/25\",\r\n + \ \"40.90.26.128/25\",\r\n \"40.90.129.224/27\",\r\n \"40.90.130.64/28\",\r\n + \ \"40.90.130.192/28\",\r\n \"40.90.132.192/26\",\r\n \"40.90.137.224/27\",\r\n + \ \"40.90.140.96/27\",\r\n \"40.90.140.224/27\",\r\n \"40.90.141.0/27\",\r\n + \ \"40.90.142.128/27\",\r\n \"40.90.142.240/28\",\r\n \"40.90.144.0/27\",\r\n + \ \"40.90.144.128/26\",\r\n \"40.90.148.176/28\",\r\n \"40.90.149.96/27\",\r\n + \ \"40.90.151.144/28\",\r\n \"40.90.154.64/26\",\r\n \"40.90.156.192/26\",\r\n + \ \"40.90.158.64/26\",\r\n \"40.93.8.0/24\",\r\n \"40.93.13.0/24\",\r\n + \ \"40.93.192.0/24\",\r\n \"40.113.192.0/18\",\r\n \"40.122.16.0/20\",\r\n + \ \"40.122.32.0/19\",\r\n \"40.122.64.0/18\",\r\n \"40.122.128.0/17\",\r\n + \ \"40.126.6.0/24\",\r\n \"40.126.27.0/24\",\r\n \"52.101.8.0/24\",\r\n + \ \"52.101.32.0/22\",\r\n \"52.101.61.0/24\",\r\n \"52.101.62.0/23\",\r\n + \ \"52.101.64.0/24\",\r\n \"52.102.130.0/24\",\r\n \"52.102.139.0/24\",\r\n + \ \"52.103.4.0/24\",\r\n \"52.103.13.0/24\",\r\n \"52.103.130.0/24\",\r\n + \ \"52.103.139.0/24\",\r\n \"52.108.165.0/24\",\r\n \"52.108.166.0/23\",\r\n + \ \"52.108.185.0/24\",\r\n \"52.108.208.0/21\",\r\n \"52.109.8.0/22\",\r\n + \ \"52.111.227.0/24\",\r\n \"52.112.113.0/24\",\r\n \"52.113.129.0/24\",\r\n + \ \"52.114.128.0/22\",\r\n \"52.115.76.0/22\",\r\n \"52.115.80.0/22\",\r\n + \ \"52.115.88.0/22\",\r\n \"52.115.92.0/24\",\r\n \"52.123.2.0/24\",\r\n + \ \"52.125.128.0/22\",\r\n \"52.136.30.0/24\",\r\n \"52.141.192.0/19\",\r\n + \ \"52.141.240.0/20\",\r\n \"52.143.193.0/24\",\r\n \"52.143.224.0/19\",\r\n + \ \"52.154.0.0/18\",\r\n \"52.154.128.0/17\",\r\n \"52.158.160.0/20\",\r\n + \ \"52.158.192.0/19\",\r\n \"52.165.0.0/19\",\r\n \"52.165.32.0/20\",\r\n + \ \"52.165.48.0/28\",\r\n \"52.165.49.0/24\",\r\n \"52.165.56.0/21\",\r\n + \ \"52.165.64.0/19\",\r\n \"52.165.96.0/21\",\r\n \"52.165.104.0/25\",\r\n + \ \"52.165.128.0/17\",\r\n \"52.173.0.0/16\",\r\n \"52.176.0.0/17\",\r\n + \ \"52.176.128.0/19\",\r\n \"52.176.160.0/21\",\r\n \"52.176.176.0/20\",\r\n + \ \"52.176.192.0/19\",\r\n \"52.176.224.0/24\",\r\n \"52.180.128.0/19\",\r\n + \ \"52.180.184.0/27\",\r\n \"52.180.184.32/28\",\r\n \"52.180.185.0/24\",\r\n + \ \"52.182.128.0/17\",\r\n \"52.185.0.0/19\",\r\n \"52.185.32.0/20\",\r\n + \ \"52.185.48.0/21\",\r\n \"52.185.56.0/26\",\r\n \"52.185.56.64/27\",\r\n + \ \"52.185.56.96/28\",\r\n \"52.185.56.128/27\",\r\n \"52.185.56.160/28\",\r\n + \ \"52.185.64.0/19\",\r\n \"52.185.96.0/20\",\r\n \"52.185.112.0/26\",\r\n + \ \"52.185.112.96/27\",\r\n \"52.185.120.0/21\",\r\n \"52.189.0.0/17\",\r\n + \ \"52.228.128.0/17\",\r\n \"52.230.128.0/17\",\r\n \"52.232.157.0/24\",\r\n + \ \"52.238.192.0/18\",\r\n \"52.239.150.0/23\",\r\n \"52.239.177.32/27\",\r\n + \ \"52.239.177.64/26\",\r\n \"52.239.177.128/25\",\r\n \"52.239.195.0/24\",\r\n + \ \"52.239.234.0/23\",\r\n \"52.242.128.0/17\",\r\n \"52.245.68.0/24\",\r\n + \ \"52.245.69.32/27\",\r\n \"52.245.69.64/27\",\r\n \"52.245.69.96/28\",\r\n + \ \"52.245.69.144/28\",\r\n \"52.245.69.160/27\",\r\n \"52.245.69.192/26\",\r\n + \ \"52.245.70.0/23\",\r\n \"52.255.0.0/19\",\r\n \"53.103.139.0/24\",\r\n + \ \"65.55.144.0/23\",\r\n \"65.55.146.0/24\",\r\n \"104.43.128.0/17\",\r\n + \ \"104.44.88.160/27\",\r\n \"104.44.91.160/27\",\r\n \"104.44.92.224/27\",\r\n + \ \"104.44.94.80/28\",\r\n \"104.208.0.0/19\",\r\n \"104.208.32.0/20\",\r\n + \ \"131.253.36.224/27\",\r\n \"157.55.108.0/23\",\r\n \"168.61.128.0/25\",\r\n + \ \"168.61.128.128/28\",\r\n \"168.61.128.160/27\",\r\n \"168.61.128.192/26\",\r\n + \ \"168.61.129.0/25\",\r\n \"168.61.129.128/26\",\r\n \"168.61.129.208/28\",\r\n + \ \"168.61.129.224/27\",\r\n \"168.61.130.64/26\",\r\n \"168.61.130.128/25\",\r\n + \ \"168.61.131.0/26\",\r\n \"168.61.131.128/25\",\r\n \"168.61.132.0/26\",\r\n + \ \"168.61.144.0/20\",\r\n \"168.61.160.0/19\",\r\n \"168.61.208.0/20\",\r\n + \ \"193.149.72.0/21\",\r\n \"2603:1030::/45\",\r\n \"2603:1030:9:2::/63\",\r\n + \ \"2603:1030:9:4::/62\",\r\n \"2603:1030:9:8::/61\",\r\n + \ \"2603:1030:9:10::/62\",\r\n \"2603:1030:9:14::/63\",\r\n + \ \"2603:1030:9:17::/64\",\r\n \"2603:1030:9:18::/61\",\r\n + \ \"2603:1030:9:20::/59\",\r\n \"2603:1030:9:40::/58\",\r\n + \ \"2603:1030:9:80::/59\",\r\n \"2603:1030:9:a0::/60\",\r\n + \ \"2603:1030:9:b3::/64\",\r\n \"2603:1030:9:b4::/63\",\r\n + \ \"2603:1030:9:b7::/64\",\r\n \"2603:1030:9:b8::/63\",\r\n + \ \"2603:1030:9:bd::/64\",\r\n \"2603:1030:9:be::/63\",\r\n + \ \"2603:1030:9:c0::/58\",\r\n \"2603:1030:9:100::/64\",\r\n + \ \"2603:1030:9:104::/62\",\r\n \"2603:1030:9:108::/62\",\r\n + \ \"2603:1030:9:10c::/64\",\r\n \"2603:1030:9:111::/64\",\r\n + \ \"2603:1030:9:112::/63\",\r\n \"2603:1030:9:114::/64\",\r\n + \ \"2603:1030:9:118::/62\",\r\n \"2603:1030:9:11c::/63\",\r\n + \ \"2603:1030:9:11f::/64\",\r\n \"2603:1030:9:120::/61\",\r\n + \ \"2603:1030:9:128::/62\",\r\n \"2603:1030:9:12f::/64\",\r\n + \ \"2603:1030:9:130::/60\",\r\n \"2603:1030:9:140::/59\",\r\n + \ \"2603:1030:9:160::/61\",\r\n \"2603:1030:9:168::/62\",\r\n + \ \"2603:1030:9:16f::/64\",\r\n \"2603:1030:9:170::/60\",\r\n + \ \"2603:1030:9:180::/61\",\r\n \"2603:1030:9:18c::/62\",\r\n + \ \"2603:1030:9:190::/60\",\r\n \"2603:1030:9:1a0::/62\",\r\n + \ \"2603:1030:9:1a4::/63\",\r\n \"2603:1030:9:1a6::/64\",\r\n + \ \"2603:1030:a::/47\",\r\n \"2603:1030:d::/48\",\r\n \"2603:1030:10::/47\",\r\n + \ \"2603:1036:2403::/48\",\r\n \"2603:1036:2500:1c::/64\",\r\n + \ \"2603:1036:3000:100::/59\",\r\n \"2603:1037:1:100::/59\",\r\n + \ \"2a01:111:f403:c111::/64\",\r\n \"2a01:111:f403:c904::/62\",\r\n + \ \"2a01:111:f403:c928::/62\",\r\n \"2a01:111:f403:c92c::/64\",\r\n + \ \"2a01:111:f403:d104::/62\",\r\n \"2a01:111:f403:d904::/62\",\r\n + \ \"2a01:111:f403:e004::/62\",\r\n \"2a01:111:f403:f904::/62\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.centraluseuap\",\r\n + \ \"id\": \"AzureCloud.centraluseuap\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.67.153.16/28\",\r\n + \ \"13.67.154.0/24\",\r\n \"13.104.129.0/26\",\r\n \"13.104.159.192/26\",\r\n + \ \"13.104.208.0/26\",\r\n \"13.105.98.208/28\",\r\n \"13.105.99.0/26\",\r\n + \ \"20.45.192.0/18\",\r\n \"20.46.0.0/19\",\r\n \"20.47.5.0/24\",\r\n + \ \"20.47.105.0/24\",\r\n \"20.51.24.0/21\",\r\n \"20.60.24.0/23\",\r\n + \ \"20.112.128.0/19\",\r\n \"20.135.68.0/23\",\r\n \"20.150.23.0/24\",\r\n + \ \"20.150.47.0/25\",\r\n \"20.157.96.0/24\",\r\n \"20.190.138.128/25\",\r\n + \ \"20.190.150.0/24\",\r\n \"40.66.120.0/21\",\r\n \"40.78.200.0/21\",\r\n + \ \"40.78.208.16/28\",\r\n \"40.79.232.0/21\",\r\n \"40.82.0.0/22\",\r\n + \ \"40.83.24.96/27\",\r\n \"40.87.180.6/31\",\r\n \"40.87.180.8/30\",\r\n + \ \"40.87.180.12/31\",\r\n \"40.87.180.22/31\",\r\n \"40.87.180.24/30\",\r\n + \ \"40.87.180.40/31\",\r\n \"40.87.180.68/30\",\r\n \"40.87.180.72/31\",\r\n + \ \"40.87.180.196/30\",\r\n \"40.87.180.200/31\",\r\n \"40.87.180.252/30\",\r\n + \ \"40.87.181.0/30\",\r\n \"40.87.182.0/30\",\r\n \"40.87.182.16/29\",\r\n + \ \"40.87.182.60/31\",\r\n \"40.87.183.28/30\",\r\n \"40.87.183.32/31\",\r\n + \ \"40.87.183.40/31\",\r\n \"40.87.183.48/30\",\r\n \"40.87.183.52/31\",\r\n + \ \"40.87.183.128/28\",\r\n \"40.87.183.238/31\",\r\n \"40.87.183.240/30\",\r\n + \ \"40.89.32.0/19\",\r\n \"40.90.132.80/28\",\r\n \"40.90.142.32/27\",\r\n + \ \"40.90.149.0/27\",\r\n \"40.93.17.0/24\",\r\n \"40.93.208.0/22\",\r\n + \ \"40.93.212.0/24\",\r\n \"40.96.52.0/24\",\r\n \"40.122.0.0/20\",\r\n + \ \"40.126.10.128/25\",\r\n \"40.126.22.0/24\",\r\n \"52.102.143.0/24\",\r\n + \ \"52.103.17.0/24\",\r\n \"52.103.143.0/24\",\r\n \"52.108.113.0/24\",\r\n + \ \"52.109.140.0/22\",\r\n \"52.141.224.0/20\",\r\n \"52.143.198.0/24\",\r\n + \ \"52.158.176.0/20\",\r\n \"52.165.104.128/26\",\r\n \"52.176.225.0/24\",\r\n + \ \"52.176.232.0/21\",\r\n \"52.176.240.0/20\",\r\n \"52.180.160.0/20\",\r\n + \ \"52.180.176.0/21\",\r\n \"52.185.56.112/28\",\r\n \"52.185.112.64/27\",\r\n + \ \"52.239.177.0/27\",\r\n \"52.239.238.0/24\",\r\n \"52.245.69.0/27\",\r\n + \ \"52.253.156.0/22\",\r\n \"52.253.232.0/21\",\r\n \"53.103.143.0/24\",\r\n + \ \"104.208.48.0/20\",\r\n \"168.61.136.0/21\",\r\n \"2603:1030:8::/48\",\r\n + \ \"2603:1030:9::/63\",\r\n \"2603:1030:9:16::/64\",\r\n + \ \"2603:1030:9:b0::/63\",\r\n \"2603:1030:9:b2::/64\",\r\n + \ \"2603:1030:9:b6::/64\",\r\n \"2603:1030:9:ba::/63\",\r\n + \ \"2603:1030:9:bc::/64\",\r\n \"2603:1030:9:101::/64\",\r\n + \ \"2603:1030:9:102::/63\",\r\n \"2603:1030:9:10d::/64\",\r\n + \ \"2603:1030:9:10e::/63\",\r\n \"2603:1030:9:110::/64\",\r\n + \ \"2603:1030:9:115::/64\",\r\n \"2603:1030:9:116::/63\",\r\n + \ \"2603:1030:9:11e::/64\",\r\n \"2603:1030:9:12c::/63\",\r\n + \ \"2603:1030:9:12e::/64\",\r\n \"2603:1030:9:16c::/63\",\r\n + \ \"2603:1030:9:16e::/64\",\r\n \"2603:1030:9:188::/62\",\r\n + \ \"2603:1030:e::/48\",\r\n \"2603:1030:f::/48\",\r\n \"2603:1030:12::/48\",\r\n + \ \"2603:1036:903:2::/64\",\r\n \"2603:1036:240d::/48\",\r\n + \ \"2603:1036:2500:2c::/64\",\r\n \"2603:1036:3000:160::/59\",\r\n + \ \"2603:1037:1:160::/59\",\r\n \"2a01:111:f403:c114::/64\",\r\n + \ \"2a01:111:f403:c93c::/62\",\r\n \"2a01:111:f403:c940::/64\",\r\n + \ \"2a01:111:f403:d125::/64\",\r\n \"2a01:111:f403:d915::/64\",\r\n + \ \"2a01:111:f403:e014::/64\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCloud.eastasia\",\r\n \"id\": \"AzureCloud.eastasia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.70.0.0/18\",\r\n \"13.72.192.0/19\",\r\n \"13.75.0.0/17\",\r\n + \ \"13.88.208.0/20\",\r\n \"13.94.0.0/18\",\r\n \"13.104.155.64/26\",\r\n + \ \"13.104.155.192/26\",\r\n \"13.105.14.192/26\",\r\n \"13.105.16.0/25\",\r\n + \ \"13.105.100.16/28\",\r\n \"13.105.100.64/26\",\r\n \"13.105.100.128/27\",\r\n + \ \"13.105.100.160/28\",\r\n \"13.105.100.192/27\",\r\n \"20.47.43.0/24\",\r\n + \ \"20.47.126.0/23\",\r\n \"20.60.86.0/23\",\r\n \"20.60.131.0/24\",\r\n + \ \"20.60.254.0/23\",\r\n \"20.135.40.0/23\",\r\n \"20.135.234.0/23\",\r\n + \ \"20.135.236.0/23\",\r\n \"20.150.1.128/25\",\r\n \"20.150.22.0/24\",\r\n + \ \"20.150.96.0/24\",\r\n \"20.157.53.0/24\",\r\n \"20.187.64.0/18\",\r\n + \ \"20.187.128.0/18\",\r\n \"20.187.192.0/21\",\r\n \"20.187.224.0/19\",\r\n + \ \"20.189.64.0/18\",\r\n \"20.190.140.128/25\",\r\n \"20.190.164.0/24\",\r\n + \ \"20.195.72.0/21\",\r\n \"20.195.88.0/21\",\r\n \"20.205.0.0/18\",\r\n + \ \"20.205.64.0/20\",\r\n \"20.205.80.0/21\",\r\n \"20.205.96.0/19\",\r\n + \ \"20.205.128.0/20\",\r\n \"23.97.64.0/19\",\r\n \"23.98.32.0/21\",\r\n + \ \"23.98.40.0/22\",\r\n \"23.98.44.0/24\",\r\n \"23.99.96.0/19\",\r\n + \ \"23.100.88.0/21\",\r\n \"23.101.0.0/20\",\r\n \"23.102.200.0/23\",\r\n + \ \"23.102.224.0/19\",\r\n \"40.77.134.0/24\",\r\n \"40.77.136.16/28\",\r\n + \ \"40.77.160.32/27\",\r\n \"40.77.160.64/26\",\r\n \"40.77.160.128/25\",\r\n + \ \"40.77.161.0/26\",\r\n \"40.77.161.128/25\",\r\n \"40.77.175.128/27\",\r\n + \ \"40.77.192.0/22\",\r\n \"40.77.201.0/24\",\r\n \"40.77.226.0/25\",\r\n + \ \"40.77.234.128/27\",\r\n \"40.77.236.192/28\",\r\n \"40.77.237.128/25\",\r\n + \ \"40.77.252.0/23\",\r\n \"40.79.210.0/24\",\r\n \"40.81.16.0/20\",\r\n + \ \"40.82.116.0/22\",\r\n \"40.83.64.0/18\",\r\n \"40.87.192.0/22\",\r\n + \ \"40.90.154.192/26\",\r\n \"40.93.128.0/24\",\r\n \"40.126.12.128/25\",\r\n + \ \"40.126.36.0/24\",\r\n \"52.101.128.0/22\",\r\n \"52.101.132.0/24\",\r\n + \ \"52.102.192.0/24\",\r\n \"52.103.64.0/24\",\r\n \"52.103.192.0/24\",\r\n + \ \"52.108.32.0/22\",\r\n \"52.108.81.0/24\",\r\n \"52.109.120.0/22\",\r\n + \ \"52.111.228.0/24\",\r\n \"52.113.96.0/22\",\r\n \"52.113.100.0/24\",\r\n + \ \"52.113.104.0/24\",\r\n \"52.113.108.0/24\",\r\n \"52.114.0.0/21\",\r\n + \ \"52.114.52.0/23\",\r\n \"52.115.40.0/22\",\r\n \"52.115.44.0/23\",\r\n + \ \"52.115.46.0/24\",\r\n \"52.115.96.0/24\",\r\n \"52.120.157.0/24\",\r\n + \ \"52.121.112.0/22\",\r\n \"52.139.128.0/18\",\r\n \"52.175.0.0/17\",\r\n + \ \"52.184.0.0/17\",\r\n \"52.229.128.0/17\",\r\n \"52.232.153.0/24\",\r\n + \ \"52.239.128.0/24\",\r\n \"52.239.224.0/24\",\r\n \"52.245.56.0/22\",\r\n + \ \"52.246.128.0/20\",\r\n \"52.253.222.0/23\",\r\n \"65.52.160.0/19\",\r\n + \ \"104.44.88.192/27\",\r\n \"104.44.90.224/27\",\r\n \"104.44.91.192/27\",\r\n + \ \"104.44.94.96/28\",\r\n \"104.46.24.0/22\",\r\n \"104.208.64.0/18\",\r\n + \ \"104.214.160.0/19\",\r\n \"111.221.29.0/24\",\r\n \"111.221.30.0/23\",\r\n + \ \"111.221.78.0/23\",\r\n \"131.253.13.100/30\",\r\n \"131.253.13.104/30\",\r\n + \ \"131.253.35.192/26\",\r\n \"134.170.192.0/21\",\r\n \"137.116.160.0/20\",\r\n + \ \"168.63.128.0/24\",\r\n \"168.63.129.0/28\",\r\n \"168.63.129.32/27\",\r\n + \ \"168.63.129.64/26\",\r\n \"168.63.129.128/25\",\r\n \"168.63.130.0/23\",\r\n + \ \"168.63.132.0/22\",\r\n \"168.63.136.0/21\",\r\n \"168.63.148.0/22\",\r\n + \ \"168.63.152.0/22\",\r\n \"168.63.156.0/24\",\r\n \"168.63.192.0/19\",\r\n + \ \"191.232.140.0/24\",\r\n \"191.234.2.0/23\",\r\n \"191.234.16.0/20\",\r\n + \ \"191.237.238.0/24\",\r\n \"204.231.197.0/24\",\r\n \"207.46.67.160/27\",\r\n + \ \"207.46.67.192/27\",\r\n \"207.46.72.0/27\",\r\n \"207.46.77.224/28\",\r\n + \ \"207.46.87.0/24\",\r\n \"207.46.89.16/28\",\r\n \"207.46.95.32/27\",\r\n + \ \"207.46.126.0/24\",\r\n \"207.46.128.0/19\",\r\n \"207.68.174.208/28\",\r\n + \ \"2603:1040:200::/46\",\r\n \"2603:1040:204::/48\",\r\n + \ \"2603:1040:206::/48\",\r\n \"2603:1040:207::/48\",\r\n + \ \"2603:1040:208::/48\",\r\n \"2603:1046:1401::/48\",\r\n + \ \"2603:1046:1500:24::/64\",\r\n \"2603:1046:2000:40::/59\",\r\n + \ \"2603:1047:1:40::/59\",\r\n \"2a01:111:f100:6000::/64\",\r\n + \ \"2a01:111:f403:c400::/64\",\r\n \"2a01:111:f403:cc00::/62\",\r\n + \ \"2a01:111:f403:cc04::/64\",\r\n \"2a01:111:f403:d401::/64\",\r\n + \ \"2a01:111:f403:dc00::/64\",\r\n \"2a01:111:f403:e400::/64\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.eastus\",\r\n + \ \"id\": \"AzureCloud.eastus\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"8\",\r\n + \ \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.68.128.0/17\",\r\n + \ \"13.72.64.0/18\",\r\n \"13.82.0.0/16\",\r\n \"13.90.0.0/16\",\r\n + \ \"13.92.0.0/16\",\r\n \"13.104.144.128/27\",\r\n \"13.104.152.128/25\",\r\n + \ \"13.104.192.0/21\",\r\n \"13.104.211.0/25\",\r\n \"13.104.214.128/25\",\r\n + \ \"13.104.215.0/25\",\r\n \"13.105.17.0/26\",\r\n \"13.105.19.0/25\",\r\n + \ \"13.105.20.192/26\",\r\n \"13.105.27.0/25\",\r\n \"13.105.27.192/27\",\r\n + \ \"13.105.36.192/26\",\r\n \"13.105.74.48/28\",\r\n \"13.105.98.48/28\",\r\n + \ \"13.105.98.96/27\",\r\n \"13.105.98.128/27\",\r\n \"20.38.98.0/24\",\r\n + \ \"20.39.32.0/19\",\r\n \"20.42.0.0/17\",\r\n \"20.47.1.0/24\",\r\n + \ \"20.47.16.0/23\",\r\n \"20.47.31.0/24\",\r\n \"20.47.108.0/23\",\r\n + \ \"20.47.113.0/24\",\r\n \"20.49.104.0/21\",\r\n \"20.51.128.0/17\",\r\n + \ \"20.55.0.0/17\",\r\n \"20.60.0.0/24\",\r\n \"20.60.2.0/23\",\r\n + \ \"20.60.6.0/23\",\r\n \"20.60.60.0/22\",\r\n \"20.60.128.0/23\",\r\n + \ \"20.60.134.0/23\",\r\n \"20.60.146.0/23\",\r\n \"20.60.220.0/23\",\r\n + \ \"20.62.128.0/17\",\r\n \"20.72.128.0/18\",\r\n \"20.75.128.0/17\",\r\n + \ \"20.81.0.0/17\",\r\n \"20.83.128.0/18\",\r\n \"20.84.0.0/17\",\r\n + \ \"20.85.128.0/17\",\r\n \"20.88.128.0/18\",\r\n \"20.95.0.0/21\",\r\n + \ \"20.102.0.0/17\",\r\n \"20.106.128.0/17\",\r\n \"20.115.0.0/17\",\r\n + \ \"20.135.4.0/23\",\r\n \"20.135.194.0/23\",\r\n \"20.135.196.0/22\",\r\n + \ \"20.150.32.0/23\",\r\n \"20.150.90.0/24\",\r\n \"20.157.6.0/23\",\r\n + \ \"20.157.19.0/24\",\r\n \"20.157.39.0/24\",\r\n \"20.157.59.0/24\",\r\n + \ \"20.157.61.0/24\",\r\n \"20.157.104.0/24\",\r\n \"20.157.132.0/24\",\r\n + \ \"20.157.147.0/24\",\r\n \"20.185.0.0/16\",\r\n \"20.190.130.0/24\",\r\n + \ \"20.190.151.0/24\",\r\n \"20.202.20.0/24\",\r\n \"20.209.0.0/23\",\r\n + \ \"23.96.0.0/17\",\r\n \"23.98.45.0/24\",\r\n \"23.100.16.0/20\",\r\n + \ \"23.101.128.0/20\",\r\n \"40.71.0.0/16\",\r\n \"40.76.0.0/16\",\r\n + \ \"40.78.219.0/24\",\r\n \"40.78.224.0/21\",\r\n \"40.79.152.0/21\",\r\n + \ \"40.80.144.0/21\",\r\n \"40.82.24.0/22\",\r\n \"40.82.60.0/22\",\r\n + \ \"40.85.160.0/19\",\r\n \"40.87.0.0/17\",\r\n \"40.87.164.0/22\",\r\n + \ \"40.88.0.0/16\",\r\n \"40.90.23.128/25\",\r\n \"40.90.24.128/25\",\r\n + \ \"40.90.25.0/26\",\r\n \"40.90.30.192/26\",\r\n \"40.90.129.128/26\",\r\n + \ \"40.90.130.96/28\",\r\n \"40.90.131.224/27\",\r\n \"40.90.136.16/28\",\r\n + \ \"40.90.136.32/27\",\r\n \"40.90.137.96/27\",\r\n \"40.90.139.224/27\",\r\n + \ \"40.90.143.0/27\",\r\n \"40.90.146.64/26\",\r\n \"40.90.147.0/27\",\r\n + \ \"40.90.148.64/27\",\r\n \"40.90.150.32/27\",\r\n \"40.90.224.0/19\",\r\n + \ \"40.91.4.0/22\",\r\n \"40.93.2.0/24\",\r\n \"40.93.4.0/24\",\r\n + \ \"40.93.11.0/24\",\r\n \"40.112.48.0/20\",\r\n \"40.114.0.0/17\",\r\n + \ \"40.117.32.0/19\",\r\n \"40.117.64.0/18\",\r\n \"40.117.128.0/17\",\r\n + \ \"40.121.0.0/16\",\r\n \"40.123.132.0/22\",\r\n \"40.126.2.0/24\",\r\n + \ \"40.126.23.0/24\",\r\n \"52.101.4.0/22\",\r\n \"52.101.9.0/24\",\r\n + \ \"52.101.20.0/22\",\r\n \"52.101.51.0/24\",\r\n \"52.101.52.0/22\",\r\n + \ \"52.102.129.0/24\",\r\n \"52.102.137.0/24\",\r\n \"52.102.159.0/24\",\r\n + \ \"52.103.1.0/24\",\r\n \"52.103.3.0/24\",\r\n \"52.103.11.0/24\",\r\n + \ \"52.103.129.0/24\",\r\n \"52.103.137.0/24\",\r\n \"52.108.16.0/21\",\r\n + \ \"52.108.79.0/24\",\r\n \"52.108.105.0/24\",\r\n \"52.108.106.0/23\",\r\n + \ \"52.109.12.0/22\",\r\n \"52.111.229.0/24\",\r\n \"52.112.112.0/24\",\r\n + \ \"52.113.16.0/20\",\r\n \"52.114.132.0/22\",\r\n \"52.115.54.0/24\",\r\n + \ \"52.115.62.0/23\",\r\n \"52.115.192.0/19\",\r\n \"52.120.32.0/19\",\r\n + \ \"52.120.224.0/20\",\r\n \"52.123.0.0/24\",\r\n \"52.125.132.0/22\",\r\n + \ \"52.136.64.0/18\",\r\n \"52.142.0.0/18\",\r\n \"52.143.207.0/24\",\r\n + \ \"52.146.0.0/17\",\r\n \"52.147.192.0/18\",\r\n \"52.149.128.0/17\",\r\n + \ \"52.150.0.0/17\",\r\n \"52.151.128.0/17\",\r\n \"52.152.128.0/17\",\r\n + \ \"52.154.64.0/18\",\r\n \"52.168.0.0/16\",\r\n \"52.170.0.0/16\",\r\n + \ \"52.179.0.0/17\",\r\n \"52.186.0.0/16\",\r\n \"52.188.0.0/16\",\r\n + \ \"52.190.0.0/17\",\r\n \"52.191.0.0/17\",\r\n \"52.191.192.0/18\",\r\n + \ \"52.224.0.0/16\",\r\n \"52.226.0.0/16\",\r\n \"52.232.146.0/24\",\r\n + \ \"52.234.128.0/17\",\r\n \"52.239.152.0/22\",\r\n \"52.239.168.0/22\",\r\n + \ \"52.239.207.192/26\",\r\n \"52.239.214.0/23\",\r\n \"52.239.220.0/23\",\r\n + \ \"52.239.246.0/23\",\r\n \"52.239.252.0/24\",\r\n \"52.240.0.0/17\",\r\n + \ \"52.245.8.0/22\",\r\n \"52.245.104.0/22\",\r\n \"52.249.128.0/17\",\r\n + \ \"52.253.160.0/24\",\r\n \"52.255.128.0/17\",\r\n \"53.103.137.0/24\",\r\n + \ \"65.54.19.128/27\",\r\n \"104.41.128.0/19\",\r\n \"104.44.91.32/27\",\r\n + \ \"104.44.94.16/28\",\r\n \"104.44.95.160/27\",\r\n \"104.44.95.240/28\",\r\n + \ \"104.45.128.0/18\",\r\n \"104.45.192.0/20\",\r\n \"104.211.0.0/18\",\r\n + \ \"137.116.112.0/20\",\r\n \"137.117.32.0/19\",\r\n \"137.117.64.0/18\",\r\n + \ \"137.135.64.0/18\",\r\n \"138.91.96.0/19\",\r\n \"157.56.176.0/21\",\r\n + \ \"168.61.32.0/20\",\r\n \"168.61.48.0/21\",\r\n \"168.62.32.0/19\",\r\n + \ \"168.62.160.0/19\",\r\n \"191.234.32.0/19\",\r\n \"191.236.0.0/18\",\r\n + \ \"191.237.0.0/17\",\r\n \"191.238.0.0/18\",\r\n \"204.152.18.0/31\",\r\n + \ \"204.152.18.8/29\",\r\n \"204.152.18.32/27\",\r\n \"204.152.18.64/26\",\r\n + \ \"204.152.19.0/24\",\r\n \"2602:fd5e:1::/63\",\r\n \"2602:fd5e:1:2::/64\",\r\n + \ \"2603:1030:20c::/47\",\r\n \"2603:1030:20e::/48\",\r\n + \ \"2603:1030:210::/47\",\r\n \"2603:1030:212::/56\",\r\n + \ \"2603:1030:213::/48\",\r\n \"2603:1036:120d::/48\",\r\n + \ \"2603:1036:2404::/48\",\r\n \"2603:1036:3000:120::/59\",\r\n + \ \"2603:1037:1:120::/59\",\r\n \"2a01:111:f100:2000::/52\",\r\n + \ \"2a01:111:f403:c100::/64\",\r\n \"2a01:111:f403:c900::/64\",\r\n + \ \"2a01:111:f403:c91e::/63\",\r\n \"2a01:111:f403:c920::/63\",\r\n + \ \"2a01:111:f403:c922::/64\",\r\n \"2a01:111:f403:d100::/64\",\r\n + \ \"2a01:111:f403:d900::/64\",\r\n \"2a01:111:f403:f000::/64\",\r\n + \ \"2a01:111:f403:f900::/62\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCloud.eastus2\",\r\n \"id\": \"AzureCloud.eastus2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"7\",\r\n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.68.0.0/17\",\r\n \"13.77.64.0/18\",\r\n \"13.104.147.0/25\",\r\n + \ \"13.104.208.64/27\",\r\n \"13.105.18.192/26\",\r\n \"13.105.23.64/26\",\r\n + \ \"13.105.28.0/28\",\r\n \"13.105.28.128/25\",\r\n \"13.105.67.128/25\",\r\n + \ \"13.105.74.128/26\",\r\n \"13.105.75.0/27\",\r\n \"13.105.75.32/28\",\r\n + \ \"13.105.75.64/27\",\r\n \"13.105.101.32/28\",\r\n \"20.36.128.0/17\",\r\n + \ \"20.38.100.0/23\",\r\n \"20.38.208.0/22\",\r\n \"20.41.0.0/18\",\r\n + \ \"20.44.16.0/21\",\r\n \"20.44.64.0/18\",\r\n \"20.47.60.0/23\",\r\n + \ \"20.47.76.0/23\",\r\n \"20.49.0.0/18\",\r\n \"20.49.96.0/21\",\r\n + \ \"20.55.192.0/18\",\r\n \"20.57.0.0/17\",\r\n \"20.60.56.0/22\",\r\n + \ \"20.60.88.0/22\",\r\n \"20.60.132.0/23\",\r\n \"20.60.180.0/23\",\r\n + \ \"20.60.224.0/23\",\r\n \"20.60.236.0/23\",\r\n \"20.62.0.0/17\",\r\n + \ \"20.65.0.0/17\",\r\n \"20.69.192.0/18\",\r\n \"20.72.64.0/18\",\r\n + \ \"20.75.0.0/17\",\r\n \"20.80.192.0/18\",\r\n \"20.81.128.0/17\",\r\n + \ \"20.85.0.0/17\",\r\n \"20.88.96.0/19\",\r\n \"20.94.0.0/17\",\r\n + \ \"20.95.255.0/29\",\r\n \"20.96.0.0/16\",\r\n \"20.97.128.0/17\",\r\n + \ \"20.98.192.0/18\",\r\n \"20.109.0.0/17\",\r\n \"20.110.0.0/16\",\r\n + \ \"20.114.128.0/17\",\r\n \"20.135.16.0/23\",\r\n \"20.135.200.0/22\",\r\n + \ \"20.135.204.0/23\",\r\n \"20.136.0.0/25\",\r\n \"20.136.1.0/24\",\r\n + \ \"20.143.2.0/24\",\r\n \"20.150.29.0/24\",\r\n \"20.150.36.0/24\",\r\n + \ \"20.150.50.0/23\",\r\n \"20.150.72.0/24\",\r\n \"20.150.82.0/24\",\r\n + \ \"20.150.88.0/24\",\r\n \"20.157.17.0/24\",\r\n \"20.157.36.0/23\",\r\n + \ \"20.157.48.0/23\",\r\n \"20.157.62.0/23\",\r\n \"20.186.0.0/17\",\r\n + \ \"20.186.128.0/18\",\r\n \"20.190.131.0/24\",\r\n \"20.190.152.0/24\",\r\n + \ \"20.190.192.0/18\",\r\n \"20.201.224.0/23\",\r\n \"20.202.21.0/24\",\r\n + \ \"23.100.64.0/21\",\r\n \"23.101.32.0/21\",\r\n \"23.101.80.0/21\",\r\n + \ \"23.101.144.0/20\",\r\n \"23.102.96.0/19\",\r\n \"23.102.204.0/22\",\r\n + \ \"23.102.208.0/20\",\r\n \"40.65.192.0/18\",\r\n \"40.67.128.0/19\",\r\n + \ \"40.70.0.0/18\",\r\n \"40.70.64.0/20\",\r\n \"40.70.80.0/21\",\r\n + \ \"40.70.128.0/17\",\r\n \"40.75.0.0/19\",\r\n \"40.75.64.0/18\",\r\n + \ \"40.77.128.128/25\",\r\n \"40.77.129.0/24\",\r\n \"40.77.130.0/25\",\r\n + \ \"40.77.132.0/24\",\r\n \"40.77.136.48/28\",\r\n \"40.77.137.128/26\",\r\n + \ \"40.77.138.128/25\",\r\n \"40.77.163.0/24\",\r\n \"40.77.166.160/27\",\r\n + \ \"40.77.167.0/24\",\r\n \"40.77.168.0/24\",\r\n \"40.77.170.0/24\",\r\n + \ \"40.77.175.96/27\",\r\n \"40.77.177.0/24\",\r\n \"40.77.178.0/23\",\r\n + \ \"40.77.182.0/28\",\r\n \"40.77.182.32/27\",\r\n \"40.77.184.0/25\",\r\n + \ \"40.77.198.0/26\",\r\n \"40.77.199.192/26\",\r\n \"40.77.224.128/25\",\r\n + \ \"40.77.228.0/24\",\r\n \"40.77.233.0/24\",\r\n \"40.77.234.192/27\",\r\n + \ \"40.77.236.80/28\",\r\n \"40.77.237.64/26\",\r\n \"40.77.240.0/25\",\r\n + \ \"40.77.245.0/24\",\r\n \"40.77.248.0/25\",\r\n \"40.77.251.0/24\",\r\n + \ \"40.78.208.48/28\",\r\n \"40.78.220.0/24\",\r\n \"40.79.0.0/21\",\r\n + \ \"40.79.8.0/27\",\r\n \"40.79.8.32/28\",\r\n \"40.79.8.64/27\",\r\n + \ \"40.79.8.96/28\",\r\n \"40.79.9.0/24\",\r\n \"40.79.16.0/20\",\r\n + \ \"40.79.32.0/20\",\r\n \"40.79.48.0/27\",\r\n \"40.79.48.32/28\",\r\n + \ \"40.79.49.0/24\",\r\n \"40.79.56.0/21\",\r\n \"40.79.64.0/20\",\r\n + \ \"40.79.80.0/21\",\r\n \"40.79.90.0/24\",\r\n \"40.79.91.0/28\",\r\n + \ \"40.79.92.0/24\",\r\n \"40.79.93.0/28\",\r\n \"40.79.94.0/24\",\r\n + \ \"40.79.95.0/28\",\r\n \"40.79.206.64/27\",\r\n \"40.79.240.0/20\",\r\n + \ \"40.82.4.0/22\",\r\n \"40.82.44.0/22\",\r\n \"40.84.0.0/17\",\r\n + \ \"40.87.168.0/30\",\r\n \"40.87.168.8/29\",\r\n \"40.87.168.16/28\",\r\n + \ \"40.87.168.32/29\",\r\n \"40.87.168.48/28\",\r\n \"40.87.168.64/30\",\r\n + \ \"40.87.168.70/31\",\r\n \"40.87.168.72/29\",\r\n \"40.87.168.80/28\",\r\n + \ \"40.87.168.96/27\",\r\n \"40.87.168.128/26\",\r\n \"40.87.168.192/28\",\r\n + \ \"40.87.168.210/31\",\r\n \"40.87.168.212/30\",\r\n \"40.87.168.216/29\",\r\n + \ \"40.87.168.224/27\",\r\n \"40.87.169.0/27\",\r\n \"40.87.169.32/29\",\r\n + \ \"40.87.169.44/30\",\r\n \"40.87.169.48/29\",\r\n \"40.87.169.56/31\",\r\n + \ \"40.87.169.60/30\",\r\n \"40.87.169.64/27\",\r\n \"40.87.169.96/31\",\r\n + \ \"40.87.169.102/31\",\r\n \"40.87.169.104/29\",\r\n \"40.87.169.112/28\",\r\n + \ \"40.87.169.128/29\",\r\n \"40.87.169.136/31\",\r\n \"40.87.169.140/30\",\r\n + \ \"40.87.169.160/27\",\r\n \"40.87.169.192/26\",\r\n \"40.87.170.0/25\",\r\n + \ \"40.87.170.128/28\",\r\n \"40.87.170.144/31\",\r\n \"40.87.170.152/29\",\r\n + \ \"40.87.170.160/28\",\r\n \"40.87.170.176/29\",\r\n \"40.87.170.184/30\",\r\n + \ \"40.87.170.194/31\",\r\n \"40.87.170.196/30\",\r\n \"40.87.170.214/31\",\r\n + \ \"40.87.170.216/30\",\r\n \"40.87.170.228/30\",\r\n \"40.87.170.232/29\",\r\n + \ \"40.87.170.240/29\",\r\n \"40.87.170.248/30\",\r\n \"40.87.171.2/31\",\r\n + \ \"40.87.171.4/30\",\r\n \"40.87.171.8/29\",\r\n \"40.87.171.16/28\",\r\n + \ \"40.87.171.36/30\",\r\n \"40.87.171.40/31\",\r\n \"40.87.171.72/29\",\r\n + \ \"40.87.171.80/28\",\r\n \"40.87.171.96/27\",\r\n \"40.87.171.128/27\",\r\n + \ \"40.87.171.160/31\",\r\n \"40.87.171.166/31\",\r\n \"40.87.171.168/29\",\r\n + \ \"40.87.171.176/28\",\r\n \"40.87.171.192/27\",\r\n \"40.87.171.224/28\",\r\n + \ \"40.87.171.240/29\",\r\n \"40.87.171.248/31\",\r\n \"40.90.19.128/25\",\r\n + \ \"40.90.20.0/25\",\r\n \"40.90.130.160/27\",\r\n \"40.90.132.128/26\",\r\n + \ \"40.90.133.112/28\",\r\n \"40.90.134.192/26\",\r\n \"40.90.136.0/28\",\r\n + \ \"40.90.138.160/27\",\r\n \"40.90.140.160/27\",\r\n \"40.90.140.192/27\",\r\n + \ \"40.90.143.192/26\",\r\n \"40.90.144.64/26\",\r\n \"40.90.145.32/27\",\r\n + \ \"40.90.145.64/27\",\r\n \"40.90.148.96/27\",\r\n \"40.90.155.128/26\",\r\n + \ \"40.90.157.128/26\",\r\n \"40.90.158.128/25\",\r\n \"40.91.12.16/28\",\r\n + \ \"40.91.12.48/28\",\r\n \"40.91.12.64/26\",\r\n \"40.91.12.128/28\",\r\n + \ \"40.91.12.160/27\",\r\n \"40.91.12.208/28\",\r\n \"40.91.12.240/28\",\r\n + \ \"40.91.13.64/27\",\r\n \"40.91.13.96/28\",\r\n \"40.91.13.128/27\",\r\n + \ \"40.91.13.240/28\",\r\n \"40.91.14.0/24\",\r\n \"40.93.3.0/24\",\r\n + \ \"40.93.12.0/24\",\r\n \"40.123.0.0/17\",\r\n \"40.123.144.0/26\",\r\n + \ \"40.123.144.64/29\",\r\n \"40.123.144.104/29\",\r\n \"40.123.144.112/28\",\r\n + \ \"40.123.144.128/28\",\r\n \"40.123.144.144/29\",\r\n \"40.123.144.156/30\",\r\n + \ \"40.123.144.160/31\",\r\n \"40.126.3.0/24\",\r\n \"40.126.24.0/24\",\r\n + \ \"52.101.10.0/24\",\r\n \"52.101.36.0/22\",\r\n \"52.101.56.0/22\",\r\n + \ \"52.101.60.0/24\",\r\n \"52.102.131.0/24\",\r\n \"52.102.138.0/24\",\r\n + \ \"52.103.5.0/24\",\r\n \"52.103.12.0/24\",\r\n \"52.103.131.0/24\",\r\n + \ \"52.103.138.0/24\",\r\n \"52.108.186.0/24\",\r\n \"52.108.216.0/22\",\r\n + \ \"52.109.4.0/22\",\r\n \"52.111.230.0/24\",\r\n \"52.112.76.0/22\",\r\n + \ \"52.112.95.0/24\",\r\n \"52.112.104.0/24\",\r\n \"52.112.108.0/24\",\r\n + \ \"52.112.116.0/24\",\r\n \"52.114.136.0/21\",\r\n \"52.114.180.0/22\",\r\n + \ \"52.114.186.0/23\",\r\n \"52.115.48.0/22\",\r\n \"52.115.52.0/23\",\r\n + \ \"52.115.64.0/22\",\r\n \"52.115.160.0/19\",\r\n \"52.120.64.0/19\",\r\n + \ \"52.121.32.0/22\",\r\n \"52.123.4.0/24\",\r\n \"52.125.136.0/24\",\r\n + \ \"52.136.29.0/24\",\r\n \"52.138.80.0/21\",\r\n \"52.138.96.0/19\",\r\n + \ \"52.143.192.0/24\",\r\n \"52.147.160.0/19\",\r\n \"52.167.0.0/16\",\r\n + \ \"52.177.0.0/16\",\r\n \"52.179.128.0/17\",\r\n \"52.184.128.0/19\",\r\n + \ \"52.184.160.0/21\",\r\n \"52.184.168.0/28\",\r\n \"52.184.168.80/28\",\r\n + \ \"52.184.168.96/27\",\r\n \"52.184.168.128/28\",\r\n \"52.184.169.0/24\",\r\n + \ \"52.184.170.0/24\",\r\n \"52.184.176.0/20\",\r\n \"52.184.192.0/18\",\r\n + \ \"52.225.128.0/21\",\r\n \"52.225.136.0/27\",\r\n \"52.225.136.32/28\",\r\n + \ \"52.225.136.64/28\",\r\n \"52.225.137.0/24\",\r\n \"52.225.192.0/18\",\r\n + \ \"52.232.151.0/24\",\r\n \"52.232.160.0/19\",\r\n \"52.232.192.0/18\",\r\n + \ \"52.239.156.0/24\",\r\n \"52.239.157.0/25\",\r\n \"52.239.157.128/26\",\r\n + \ \"52.239.157.192/27\",\r\n \"52.239.172.0/22\",\r\n \"52.239.184.0/25\",\r\n + \ \"52.239.184.160/28\",\r\n \"52.239.184.192/27\",\r\n \"52.239.185.32/27\",\r\n + \ \"52.239.192.0/26\",\r\n \"52.239.192.64/28\",\r\n \"52.239.192.96/27\",\r\n + \ \"52.239.192.160/27\",\r\n \"52.239.192.192/26\",\r\n \"52.239.198.0/25\",\r\n + \ \"52.239.198.192/26\",\r\n \"52.239.206.0/24\",\r\n \"52.239.207.32/28\",\r\n + \ \"52.239.207.64/26\",\r\n \"52.239.207.128/27\",\r\n \"52.239.222.0/23\",\r\n + \ \"52.242.64.0/18\",\r\n \"52.245.44.0/24\",\r\n \"52.245.45.0/25\",\r\n + \ \"52.245.45.128/28\",\r\n \"52.245.45.160/27\",\r\n \"52.245.45.192/26\",\r\n + \ \"52.245.46.0/27\",\r\n \"52.245.46.48/28\",\r\n \"52.245.46.64/28\",\r\n + \ \"52.245.46.112/28\",\r\n \"52.245.46.128/28\",\r\n \"52.245.46.160/27\",\r\n + \ \"52.245.46.192/26\",\r\n \"52.247.0.0/17\",\r\n \"52.250.128.0/18\",\r\n + \ \"52.251.0.0/17\",\r\n \"52.252.0.0/17\",\r\n \"52.253.64.0/20\",\r\n + \ \"52.253.148.0/23\",\r\n \"52.253.154.0/23\",\r\n \"52.254.0.0/18\",\r\n + \ \"52.254.64.0/19\",\r\n \"52.254.96.0/20\",\r\n \"52.254.112.0/21\",\r\n + \ \"53.103.138.0/24\",\r\n \"65.52.108.0/23\",\r\n \"65.52.110.0/24\",\r\n + \ \"65.55.44.16/28\",\r\n \"65.55.44.32/27\",\r\n \"65.55.44.64/27\",\r\n + \ \"65.55.44.96/28\",\r\n \"65.55.44.128/27\",\r\n \"65.55.60.188/30\",\r\n + \ \"65.55.105.0/26\",\r\n \"65.55.105.96/27\",\r\n \"65.55.105.224/27\",\r\n + \ \"65.55.106.0/26\",\r\n \"65.55.106.64/27\",\r\n \"65.55.106.128/26\",\r\n + \ \"65.55.107.48/28\",\r\n \"65.55.107.64/27\",\r\n \"65.55.108.0/24\",\r\n + \ \"65.55.209.128/26\",\r\n \"65.55.211.32/27\",\r\n \"65.55.213.64/26\",\r\n + \ \"65.55.213.128/26\",\r\n \"65.55.217.0/24\",\r\n \"65.55.219.32/27\",\r\n + \ \"65.55.219.128/25\",\r\n \"104.44.88.32/27\",\r\n \"104.44.88.96/27\",\r\n + \ \"104.44.91.96/27\",\r\n \"104.44.93.160/27\",\r\n \"104.44.94.48/28\",\r\n + \ \"104.46.0.0/21\",\r\n \"104.46.96.0/19\",\r\n \"104.46.192.0/20\",\r\n + \ \"104.47.200.0/21\",\r\n \"104.208.128.0/17\",\r\n \"104.209.128.0/17\",\r\n + \ \"104.210.0.0/20\",\r\n \"131.253.12.176/28\",\r\n \"131.253.12.208/28\",\r\n + \ \"131.253.12.224/30\",\r\n \"131.253.13.16/29\",\r\n \"131.253.13.48/28\",\r\n + \ \"131.253.13.72/29\",\r\n \"131.253.13.80/29\",\r\n \"131.253.13.96/30\",\r\n + \ \"131.253.14.16/28\",\r\n \"131.253.14.64/29\",\r\n \"131.253.14.208/28\",\r\n + \ \"131.253.14.224/28\",\r\n \"131.253.15.8/29\",\r\n \"131.253.15.16/28\",\r\n + \ \"131.253.24.0/28\",\r\n \"131.253.24.192/26\",\r\n \"131.253.34.224/27\",\r\n + \ \"131.253.38.0/27\",\r\n \"131.253.38.128/26\",\r\n \"131.253.40.0/28\",\r\n + \ \"134.170.220.0/23\",\r\n \"137.116.0.0/18\",\r\n \"137.116.64.0/19\",\r\n + \ \"137.116.96.0/22\",\r\n \"157.55.7.128/26\",\r\n \"157.55.10.192/26\",\r\n + \ \"157.55.11.128/25\",\r\n \"157.55.37.0/24\",\r\n \"157.55.38.0/24\",\r\n + \ \"157.55.48.0/24\",\r\n \"157.55.50.0/25\",\r\n \"157.55.55.100/30\",\r\n + \ \"157.55.55.104/29\",\r\n \"157.55.55.136/29\",\r\n \"157.55.55.144/29\",\r\n + \ \"157.55.55.160/28\",\r\n \"157.56.2.128/25\",\r\n \"157.56.3.0/25\",\r\n + \ \"191.236.192.0/18\",\r\n \"191.237.128.0/18\",\r\n \"191.239.224.0/20\",\r\n + \ \"193.149.64.0/21\",\r\n \"199.30.16.0/24\",\r\n \"199.30.18.0/23\",\r\n + \ \"199.30.20.0/24\",\r\n \"199.30.22.0/24\",\r\n \"199.30.28.64/26\",\r\n + \ \"199.30.28.128/25\",\r\n \"199.30.29.0/24\",\r\n \"2603:1030:400::/48\",\r\n + \ \"2603:1030:401:2::/63\",\r\n \"2603:1030:401:4::/62\",\r\n + \ \"2603:1030:401:8::/61\",\r\n \"2603:1030:401:10::/62\",\r\n + \ \"2603:1030:401:14::/63\",\r\n \"2603:1030:401:17::/64\",\r\n + \ \"2603:1030:401:18::/61\",\r\n \"2603:1030:401:20::/59\",\r\n + \ \"2603:1030:401:40::/60\",\r\n \"2603:1030:401:50::/61\",\r\n + \ \"2603:1030:401:58::/64\",\r\n \"2603:1030:401:5a::/63\",\r\n + \ \"2603:1030:401:5c::/62\",\r\n \"2603:1030:401:60::/59\",\r\n + \ \"2603:1030:401:80::/62\",\r\n \"2603:1030:401:84::/64\",\r\n + \ \"2603:1030:401:87::/64\",\r\n \"2603:1030:401:88::/62\",\r\n + \ \"2603:1030:401:8c::/63\",\r\n \"2603:1030:401:8f::/64\",\r\n + \ \"2603:1030:401:90::/63\",\r\n \"2603:1030:401:94::/62\",\r\n + \ \"2603:1030:401:98::/61\",\r\n \"2603:1030:401:a0::/62\",\r\n + \ \"2603:1030:401:a4::/63\",\r\n \"2603:1030:401:a7::/64\",\r\n + \ \"2603:1030:401:a8::/61\",\r\n \"2603:1030:401:b0::/60\",\r\n + \ \"2603:1030:401:c0::/58\",\r\n \"2603:1030:401:100::/59\",\r\n + \ \"2603:1030:401:120::/64\",\r\n \"2603:1030:401:124::/62\",\r\n + \ \"2603:1030:401:128::/61\",\r\n \"2603:1030:401:130::/62\",\r\n + \ \"2603:1030:401:134::/63\",\r\n \"2603:1030:401:139::/64\",\r\n + \ \"2603:1030:401:13a::/63\",\r\n \"2603:1030:401:143::/64\",\r\n + \ \"2603:1030:401:144::/63\",\r\n \"2603:1030:401:14a::/63\",\r\n + \ \"2603:1030:401:14c::/62\",\r\n \"2603:1030:401:150::/62\",\r\n + \ \"2603:1030:401:154::/63\",\r\n \"2603:1030:401:159::/64\",\r\n + \ \"2603:1030:401:15a::/63\",\r\n \"2603:1030:401:15c::/62\",\r\n + \ \"2603:1030:401:160::/61\",\r\n \"2603:1030:401:16a::/63\",\r\n + \ \"2603:1030:401:16c::/64\",\r\n \"2603:1030:401:17c::/62\",\r\n + \ \"2603:1030:401:180::/58\",\r\n \"2603:1030:401:1c0::/61\",\r\n + \ \"2603:1030:401:1c8::/63\",\r\n \"2603:1030:401:1cc::/62\",\r\n + \ \"2603:1030:401:1d0::/60\",\r\n \"2603:1030:401:1e0::/60\",\r\n + \ \"2603:1030:401:1f0::/61\",\r\n \"2603:1030:401:1f8::/64\",\r\n + \ \"2603:1030:401:20c::/62\",\r\n \"2603:1030:401:210::/60\",\r\n + \ \"2603:1030:401:220::/62\",\r\n \"2603:1030:401:226::/63\",\r\n + \ \"2603:1030:401:228::/64\",\r\n \"2603:1030:402::/47\",\r\n + \ \"2603:1030:406::/47\",\r\n \"2603:1030:408::/48\",\r\n + \ \"2603:1030:40a:1::/64\",\r\n \"2603:1030:40a:2::/64\",\r\n + \ \"2603:1030:40c::/48\",\r\n \"2603:1030:40d:8000::/49\",\r\n + \ \"2603:1030:40e::/56\",\r\n \"2603:1030:40f::/48\",\r\n + \ \"2603:1036:2405::/48\",\r\n \"2603:1036:2500::/64\",\r\n + \ \"2603:1036:3000::/59\",\r\n \"2603:1037:1::/59\",\r\n + \ \"2603:1039:205::/48\",\r\n \"2603:1062:2::/57\",\r\n \"2a01:111:f403:c110::/64\",\r\n + \ \"2a01:111:f403:c908::/62\",\r\n \"2a01:111:f403:c923::/64\",\r\n + \ \"2a01:111:f403:c924::/62\",\r\n \"2a01:111:f403:d108::/62\",\r\n + \ \"2a01:111:f403:d908::/62\",\r\n \"2a01:111:f403:e008::/62\",\r\n + \ \"2a01:111:f403:f908::/62\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCloud.eastus2euap\",\r\n \"id\": \"AzureCloud.eastus2euap\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.216.0/24\",\r\n \"13.105.52.32/27\",\r\n + \ \"13.105.52.64/28\",\r\n \"13.105.52.96/27\",\r\n \"13.105.60.160/27\",\r\n + \ \"13.105.61.0/28\",\r\n \"13.105.61.32/27\",\r\n \"20.39.0.0/19\",\r\n + \ \"20.47.6.0/24\",\r\n \"20.47.106.0/24\",\r\n \"20.47.128.0/17\",\r\n + \ \"20.51.16.0/21\",\r\n \"20.60.154.0/23\",\r\n \"20.60.184.0/23\",\r\n + \ \"20.60.238.0/23\",\r\n \"20.102.128.0/18\",\r\n \"20.135.210.0/23\",\r\n + \ \"20.135.212.0/22\",\r\n \"20.150.108.0/24\",\r\n \"20.157.58.0/24\",\r\n + \ \"20.157.149.0/24\",\r\n \"20.190.138.0/25\",\r\n \"20.190.149.0/24\",\r\n + \ \"40.70.88.0/28\",\r\n \"40.74.144.0/20\",\r\n \"40.75.32.0/21\",\r\n + \ \"40.78.208.0/28\",\r\n \"40.79.88.0/27\",\r\n \"40.79.88.32/28\",\r\n + \ \"40.79.89.0/24\",\r\n \"40.79.96.0/19\",\r\n \"40.87.168.4/30\",\r\n + \ \"40.87.168.40/29\",\r\n \"40.87.168.68/31\",\r\n \"40.87.168.208/31\",\r\n + \ \"40.87.169.40/30\",\r\n \"40.87.169.58/31\",\r\n \"40.87.169.98/31\",\r\n + \ \"40.87.169.100/31\",\r\n \"40.87.169.138/31\",\r\n \"40.87.169.144/28\",\r\n + \ \"40.87.170.146/31\",\r\n \"40.87.170.148/30\",\r\n \"40.87.170.188/30\",\r\n + \ \"40.87.170.192/31\",\r\n \"40.87.170.200/29\",\r\n \"40.87.170.208/30\",\r\n + \ \"40.87.170.212/31\",\r\n \"40.87.170.220/30\",\r\n \"40.87.170.224/30\",\r\n + \ \"40.87.170.252/30\",\r\n \"40.87.171.0/31\",\r\n \"40.87.171.32/30\",\r\n + \ \"40.87.171.42/31\",\r\n \"40.87.171.44/30\",\r\n \"40.87.171.48/28\",\r\n + \ \"40.87.171.64/29\",\r\n \"40.87.171.162/31\",\r\n \"40.87.171.164/31\",\r\n + \ \"40.87.171.250/31\",\r\n \"40.87.171.252/30\",\r\n \"40.89.64.0/18\",\r\n + \ \"40.90.129.96/27\",\r\n \"40.90.137.32/27\",\r\n \"40.90.146.192/27\",\r\n + \ \"40.91.12.0/28\",\r\n \"40.91.12.32/28\",\r\n \"40.91.13.0/28\",\r\n + \ \"40.93.16.0/24\",\r\n \"40.93.203.0/24\",\r\n \"40.93.204.0/22\",\r\n + \ \"40.96.46.0/24\",\r\n \"40.96.55.0/24\",\r\n \"40.123.144.72/29\",\r\n + \ \"40.123.144.80/28\",\r\n \"40.123.144.96/29\",\r\n \"40.123.144.152/30\",\r\n + \ \"40.126.10.0/25\",\r\n \"40.126.21.0/24\",\r\n \"52.102.142.0/24\",\r\n + \ \"52.103.16.0/24\",\r\n \"52.103.142.0/24\",\r\n \"52.108.116.0/24\",\r\n + \ \"52.109.165.0/24\",\r\n \"52.111.208.0/24\",\r\n \"52.138.64.0/20\",\r\n + \ \"52.138.88.0/21\",\r\n \"52.143.212.0/23\",\r\n \"52.147.128.0/19\",\r\n + \ \"52.184.168.16/28\",\r\n \"52.184.168.32/28\",\r\n \"52.225.136.48/28\",\r\n + \ \"52.225.144.0/20\",\r\n \"52.225.160.0/19\",\r\n \"52.232.150.0/24\",\r\n + \ \"52.239.157.224/27\",\r\n \"52.239.165.192/26\",\r\n \"52.239.184.176/28\",\r\n + \ \"52.239.184.224/27\",\r\n \"52.239.185.0/28\",\r\n \"52.239.192.128/27\",\r\n + \ \"52.239.198.128/27\",\r\n \"52.239.230.0/24\",\r\n \"52.239.239.0/24\",\r\n + \ \"52.245.45.144/28\",\r\n \"52.245.46.32/28\",\r\n \"52.245.46.80/28\",\r\n + \ \"52.245.46.96/28\",\r\n \"52.253.150.0/23\",\r\n \"52.253.152.0/23\",\r\n + \ \"52.253.224.0/21\",\r\n \"52.254.120.0/21\",\r\n \"53.103.142.0/24\",\r\n + \ \"104.44.95.208/28\",\r\n \"198.180.97.0/24\",\r\n \"2603:1030:401::/63\",\r\n + \ \"2603:1030:401:16::/64\",\r\n \"2603:1030:401:59::/64\",\r\n + \ \"2603:1030:401:85::/64\",\r\n \"2603:1030:401:86::/64\",\r\n + \ \"2603:1030:401:8e::/64\",\r\n \"2603:1030:401:92::/63\",\r\n + \ \"2603:1030:401:a6::/64\",\r\n \"2603:1030:401:121::/64\",\r\n + \ \"2603:1030:401:122::/63\",\r\n \"2603:1030:401:136::/63\",\r\n + \ \"2603:1030:401:138::/64\",\r\n \"2603:1030:401:13c::/62\",\r\n + \ \"2603:1030:401:140::/63\",\r\n \"2603:1030:401:142::/64\",\r\n + \ \"2603:1030:401:146::/63\",\r\n \"2603:1030:401:148::/63\",\r\n + \ \"2603:1030:401:156::/63\",\r\n \"2603:1030:401:158::/64\",\r\n + \ \"2603:1030:401:168::/63\",\r\n \"2603:1030:401:16d::/64\",\r\n + \ \"2603:1030:401:16e::/63\",\r\n \"2603:1030:401:170::/61\",\r\n + \ \"2603:1030:401:178::/62\",\r\n \"2603:1030:401:1ca::/63\",\r\n + \ \"2603:1030:401:1f9::/64\",\r\n \"2603:1030:401:1fa::/63\",\r\n + \ \"2603:1030:401:1fc::/62\",\r\n \"2603:1030:401:200::/61\",\r\n + \ \"2603:1030:401:208::/62\",\r\n \"2603:1030:401:224::/63\",\r\n + \ \"2603:1030:405::/48\",\r\n \"2603:1030:409::/48\",\r\n + \ \"2603:1030:40a::/64\",\r\n \"2603:1030:40a:3::/64\",\r\n + \ \"2603:1030:40a:4::/62\",\r\n \"2603:1030:40a:8::/63\",\r\n + \ \"2603:1030:40b::/48\",\r\n \"2603:1030:40d::/60\",\r\n + \ \"2603:1030:40d:4000::/50\",\r\n \"2603:1030:40e:100::/56\",\r\n + \ \"2603:1030:410::/48\",\r\n \"2603:1036:903:1::/64\",\r\n + \ \"2603:1036:903:3::/64\",\r\n \"2603:1036:240a::/48\",\r\n + \ \"2603:1036:240f::/48\",\r\n \"2603:1036:2500:4::/64\",\r\n + \ \"2603:1036:3000:20::/59\",\r\n \"2603:1037:1:20::/59\",\r\n + \ \"2a01:111:f403:c113::/64\",\r\n \"2a01:111:f403:c937::/64\",\r\n + \ \"2a01:111:f403:c938::/62\",\r\n \"2a01:111:f403:d124::/64\",\r\n + \ \"2a01:111:f403:d914::/64\",\r\n \"2a01:111:f403:e003::/64\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.germanyn\",\r\n + \ \"id\": \"AzureCloud.germanyn\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.144.96/27\",\r\n + \ \"13.104.212.64/26\",\r\n \"20.38.115.0/24\",\r\n \"20.47.45.0/24\",\r\n + \ \"20.47.84.0/23\",\r\n \"20.52.72.0/21\",\r\n \"20.52.80.32/27\",\r\n + \ \"20.135.56.0/23\",\r\n \"20.150.60.0/24\",\r\n \"20.150.112.0/24\",\r\n + \ \"20.190.189.0/26\",\r\n \"40.82.72.0/22\",\r\n \"40.90.31.0/27\",\r\n + \ \"40.90.128.240/28\",\r\n \"40.119.96.0/22\",\r\n \"40.126.61.0/26\",\r\n + \ \"40.126.198.0/24\",\r\n \"51.116.0.0/18\",\r\n \"51.116.64.0/19\",\r\n + \ \"51.116.200.0/21\",\r\n \"51.116.208.0/20\",\r\n \"52.108.76.0/24\",\r\n + \ \"52.108.97.0/24\",\r\n \"52.109.102.0/23\",\r\n \"52.111.254.0/24\",\r\n + \ \"52.114.240.0/24\",\r\n \"52.253.172.0/24\",\r\n \"2603:1020:d00::/47\",\r\n + \ \"2603:1020:d03::/48\",\r\n \"2603:1020:d04::/47\",\r\n + \ \"2603:1026:2411::/48\",\r\n \"2603:1026:2500:34::/64\",\r\n + \ \"2603:1026:3000:220::/59\",\r\n \"2603:1027:1:220::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.germanywc\",\r\n + \ \"id\": \"AzureCloud.germanywc\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.144.224/27\",\r\n + \ \"13.104.145.128/27\",\r\n \"13.104.212.128/26\",\r\n \"13.105.61.128/25\",\r\n + \ \"13.105.66.0/27\",\r\n \"13.105.74.96/27\",\r\n \"13.105.74.192/26\",\r\n + \ \"20.38.118.0/24\",\r\n \"20.47.27.0/24\",\r\n \"20.47.65.0/24\",\r\n + \ \"20.47.112.0/24\",\r\n \"20.52.0.0/18\",\r\n \"20.52.64.0/21\",\r\n + \ \"20.52.80.0/27\",\r\n \"20.52.80.64/27\",\r\n \"20.52.88.0/21\",\r\n + \ \"20.52.96.0/19\",\r\n \"20.52.128.0/17\",\r\n \"20.60.22.0/23\",\r\n + \ \"20.79.0.0/16\",\r\n \"20.113.0.0/17\",\r\n \"20.135.152.0/22\",\r\n + \ \"20.135.156.0/23\",\r\n \"20.150.54.0/24\",\r\n \"20.150.125.0/24\",\r\n + \ \"20.157.160.0/24\",\r\n \"20.190.190.64/26\",\r\n \"40.82.68.0/22\",\r\n + \ \"40.90.129.48/28\",\r\n \"40.90.140.0/27\",\r\n \"40.90.147.32/27\",\r\n + \ \"40.90.151.160/27\",\r\n \"40.119.92.0/22\",\r\n \"40.126.62.64/26\",\r\n + \ \"40.126.197.0/24\",\r\n \"51.116.96.0/19\",\r\n \"51.116.128.0/18\",\r\n + \ \"51.116.192.0/21\",\r\n \"51.116.224.0/19\",\r\n \"52.108.178.0/24\",\r\n + \ \"52.108.199.0/24\",\r\n \"52.109.104.0/23\",\r\n \"52.111.255.0/24\",\r\n + \ \"52.114.244.0/24\",\r\n \"52.253.169.0/24\",\r\n \"52.253.170.0/23\",\r\n + \ \"2603:1020:c00::/47\",\r\n \"2603:1020:c03::/48\",\r\n + \ \"2603:1020:c04::/47\",\r\n \"2603:1026:240a::/48\",\r\n + \ \"2603:1026:2500:14::/64\",\r\n \"2603:1026:3000:a0::/59\",\r\n + \ \"2603:1027:1:a0::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.japaneast\",\r\n \"id\": \"AzureCloud.japaneast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.71.128.0/19\",\r\n \"13.73.0.0/19\",\r\n \"13.78.0.0/17\",\r\n + \ \"13.104.149.64/26\",\r\n \"13.104.150.128/26\",\r\n \"13.104.221.0/24\",\r\n + \ \"13.105.18.64/26\",\r\n \"20.37.96.0/19\",\r\n \"20.38.116.0/23\",\r\n + \ \"20.40.88.0/21\",\r\n \"20.40.96.0/21\",\r\n \"20.43.64.0/19\",\r\n + \ \"20.44.128.0/18\",\r\n \"20.46.112.0/20\",\r\n \"20.46.160.0/19\",\r\n + \ \"20.47.12.0/24\",\r\n \"20.47.101.0/24\",\r\n \"20.48.0.0/17\",\r\n + \ \"20.60.172.0/23\",\r\n \"20.60.248.0/23\",\r\n \"20.63.128.0/18\",\r\n + \ \"20.78.0.0/17\",\r\n \"20.78.192.0/18\",\r\n \"20.89.0.0/17\",\r\n + \ \"20.89.128.0/18\",\r\n \"20.135.102.0/23\",\r\n \"20.135.104.0/22\",\r\n + \ \"20.150.85.0/24\",\r\n \"20.150.105.0/24\",\r\n \"20.157.12.0/22\",\r\n + \ \"20.157.38.0/24\",\r\n \"20.157.108.0/24\",\r\n \"20.157.144.0/24\",\r\n + \ \"20.188.0.0/19\",\r\n \"20.190.141.128/25\",\r\n \"20.190.166.0/24\",\r\n + \ \"20.191.160.0/19\",\r\n \"20.194.128.0/17\",\r\n \"20.210.0.0/18\",\r\n + \ \"23.98.57.64/26\",\r\n \"23.100.96.0/21\",\r\n \"23.102.64.0/19\",\r\n + \ \"40.79.184.0/21\",\r\n \"40.79.192.0/21\",\r\n \"40.79.206.96/27\",\r\n + \ \"40.79.208.0/24\",\r\n \"40.81.192.0/19\",\r\n \"40.82.48.0/22\",\r\n + \ \"40.87.200.0/22\",\r\n \"40.90.16.160/27\",\r\n \"40.90.128.80/28\",\r\n + \ \"40.90.132.64/28\",\r\n \"40.90.142.0/27\",\r\n \"40.90.142.192/28\",\r\n + \ \"40.90.148.224/27\",\r\n \"40.90.152.192/27\",\r\n \"40.90.158.0/26\",\r\n + \ \"40.115.128.0/17\",\r\n \"40.126.13.128/25\",\r\n \"40.126.38.0/24\",\r\n + \ \"52.108.191.0/24\",\r\n \"52.108.228.0/23\",\r\n \"52.109.52.0/22\",\r\n + \ \"52.111.232.0/24\",\r\n \"52.112.176.0/21\",\r\n \"52.112.184.0/22\",\r\n + \ \"52.113.78.0/23\",\r\n \"52.113.102.0/24\",\r\n \"52.113.107.0/24\",\r\n + \ \"52.113.133.0/24\",\r\n \"52.114.32.0/22\",\r\n \"52.115.38.0/24\",\r\n + \ \"52.115.47.0/24\",\r\n \"52.121.120.0/23\",\r\n \"52.121.152.0/21\",\r\n + \ \"52.121.160.0/22\",\r\n \"52.121.164.0/24\",\r\n \"52.136.31.0/24\",\r\n + \ \"52.140.192.0/18\",\r\n \"52.155.96.0/19\",\r\n \"52.156.32.0/19\",\r\n + \ \"52.185.128.0/18\",\r\n \"52.232.155.0/24\",\r\n \"52.239.144.0/23\",\r\n + \ \"52.243.32.0/19\",\r\n \"52.245.36.0/22\",\r\n \"52.246.160.0/19\",\r\n + \ \"52.253.96.0/19\",\r\n \"52.253.161.0/24\",\r\n \"104.41.160.0/19\",\r\n + \ \"104.44.88.224/27\",\r\n \"104.44.91.224/27\",\r\n \"104.44.94.112/28\",\r\n + \ \"104.46.208.0/20\",\r\n \"138.91.0.0/20\",\r\n \"191.237.240.0/23\",\r\n + \ \"2603:1040:400::/46\",\r\n \"2603:1040:404::/48\",\r\n + \ \"2603:1040:406::/48\",\r\n \"2603:1040:407::/48\",\r\n + \ \"2603:1040:408::/48\",\r\n \"2603:1046:1402::/48\",\r\n + \ \"2603:1046:1500:18::/64\",\r\n \"2603:1046:2000:140::/59\",\r\n + \ \"2603:1047:1:140::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.japanwest\",\r\n \"id\": \"AzureCloud.japanwest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.73.232.0/21\",\r\n \"20.39.176.0/21\",\r\n \"20.47.10.0/24\",\r\n + \ \"20.47.66.0/24\",\r\n \"20.47.99.0/24\",\r\n \"20.60.12.0/24\",\r\n + \ \"20.60.186.0/23\",\r\n \"20.63.192.0/18\",\r\n \"20.78.128.0/18\",\r\n + \ \"20.89.192.0/18\",\r\n \"20.135.48.0/23\",\r\n \"20.150.10.0/23\",\r\n + \ \"20.157.56.0/24\",\r\n \"20.157.103.0/24\",\r\n \"20.189.192.0/18\",\r\n + \ \"20.190.141.0/25\",\r\n \"20.190.165.0/24\",\r\n \"20.202.42.0/24\",\r\n + \ \"20.209.16.0/23\",\r\n \"23.98.56.0/24\",\r\n \"23.100.104.0/21\",\r\n + \ \"40.74.64.0/18\",\r\n \"40.74.128.0/20\",\r\n \"40.79.209.0/24\",\r\n + \ \"40.80.56.0/21\",\r\n \"40.80.176.0/21\",\r\n \"40.81.176.0/20\",\r\n + \ \"40.82.100.0/22\",\r\n \"40.87.204.0/22\",\r\n \"40.90.18.32/27\",\r\n + \ \"40.90.27.192/26\",\r\n \"40.90.28.0/26\",\r\n \"40.90.137.0/27\",\r\n + \ \"40.90.142.208/28\",\r\n \"40.90.156.0/26\",\r\n \"40.126.13.0/25\",\r\n + \ \"40.126.37.0/24\",\r\n \"52.108.46.0/23\",\r\n \"52.108.86.0/24\",\r\n + \ \"52.109.132.0/22\",\r\n \"52.111.233.0/24\",\r\n \"52.112.88.0/22\",\r\n + \ \"52.113.14.0/24\",\r\n \"52.113.72.0/22\",\r\n \"52.113.87.0/24\",\r\n + \ \"52.113.106.0/24\",\r\n \"52.114.36.0/22\",\r\n \"52.115.39.0/24\",\r\n + \ \"52.115.100.0/22\",\r\n \"52.115.104.0/23\",\r\n \"52.121.80.0/22\",\r\n + \ \"52.121.84.0/23\",\r\n \"52.121.116.0/22\",\r\n \"52.121.165.0/24\",\r\n + \ \"52.121.168.0/22\",\r\n \"52.147.64.0/19\",\r\n \"52.175.128.0/18\",\r\n + \ \"52.232.158.0/24\",\r\n \"52.239.146.0/23\",\r\n \"52.245.92.0/22\",\r\n + \ \"104.44.92.0/27\",\r\n \"104.44.94.128/28\",\r\n \"104.46.224.0/20\",\r\n + \ \"104.214.128.0/19\",\r\n \"104.215.0.0/18\",\r\n \"138.91.16.0/20\",\r\n + \ \"191.233.32.0/20\",\r\n \"191.237.236.0/24\",\r\n \"191.238.68.0/24\",\r\n + \ \"191.238.80.0/21\",\r\n \"191.238.88.0/22\",\r\n \"191.238.92.0/23\",\r\n + \ \"191.239.96.0/20\",\r\n \"2603:1040:600::/46\",\r\n \"2603:1040:605::/48\",\r\n + \ \"2603:1040:606::/47\",\r\n \"2603:1046:1403::/48\",\r\n + \ \"2603:1046:1500:14::/64\",\r\n \"2603:1046:2000:a0::/59\",\r\n + \ \"2603:1047:1:a0::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.jioindiacentral\",\r\n \"id\": \"AzureCloud.jioindiacentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"20.60.170.0/23\",\r\n \"20.135.38.0/23\",\r\n \"20.135.46.0/23\",\r\n + \ \"20.150.64.0/24\",\r\n \"20.150.109.0/24\",\r\n \"20.157.152.0/24\",\r\n + \ \"20.190.191.0/26\",\r\n \"20.192.32.0/21\",\r\n \"20.192.48.0/21\",\r\n + \ \"20.192.104.0/21\",\r\n \"20.192.112.0/20\",\r\n \"20.192.176.0/21\",\r\n + \ \"20.192.192.0/19\",\r\n \"20.192.224.0/20\",\r\n \"20.193.208.0/20\",\r\n + \ \"20.207.0.0/18\",\r\n \"40.79.205.80/28\",\r\n \"40.79.205.128/26\",\r\n + \ \"40.119.120.0/22\",\r\n \"40.126.63.0/26\",\r\n \"40.126.205.0/24\",\r\n + \ \"52.108.123.0/24\",\r\n \"52.253.192.0/24\",\r\n \"2603:1040:1100::/47\",\r\n + \ \"2603:1040:1103::/48\",\r\n \"2603:1040:1104::/48\",\r\n + \ \"2603:1046:1500:c::/64\",\r\n \"2603:1046:2000:1a0::/59\",\r\n + \ \"2603:1047:1:1a0::/59\",\r\n \"2603:1061:1000::/48\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.jioindiawest\",\r\n + \ \"id\": \"AzureCloud.jioindiawest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.105.75.48/28\",\r\n + \ \"13.105.75.96/27\",\r\n \"13.105.75.128/27\",\r\n \"20.60.54.0/23\",\r\n + \ \"20.135.96.0/22\",\r\n \"20.135.100.0/23\",\r\n \"20.150.65.0/24\",\r\n + \ \"20.150.97.0/24\",\r\n \"20.157.153.0/24\",\r\n \"20.190.191.64/26\",\r\n + \ \"20.192.56.0/21\",\r\n \"20.192.160.0/21\",\r\n \"20.192.240.0/20\",\r\n + \ \"20.193.160.0/19\",\r\n \"20.193.192.0/20\",\r\n \"40.64.0.0/18\",\r\n + \ \"40.119.124.0/22\",\r\n \"40.126.63.64/26\",\r\n \"40.126.206.0/24\",\r\n + \ \"40.127.32.0/24\",\r\n \"52.108.124.0/24\",\r\n \"52.253.193.0/24\",\r\n + \ \"52.253.194.0/23\",\r\n \"2603:1040:d00::/47\",\r\n \"2603:1040:d03::/48\",\r\n + \ \"2603:1040:d04::/48\",\r\n \"2603:1046:1500:10::/64\",\r\n + \ \"2603:1046:2000:1c0::/59\",\r\n \"2603:1047:1:1c0::/59\",\r\n + \ \"2603:1061:1001::/48\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.koreacentral\",\r\n \"id\": \"AzureCloud.koreacentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.129.192/26\",\r\n \"13.104.223.128/26\",\r\n + \ \"13.105.20.0/25\",\r\n \"13.105.96.112/28\",\r\n \"13.105.97.32/27\",\r\n + \ \"13.105.97.64/27\",\r\n \"20.39.184.0/21\",\r\n \"20.39.192.0/20\",\r\n + \ \"20.41.64.0/18\",\r\n \"20.44.24.0/21\",\r\n \"20.47.46.0/24\",\r\n + \ \"20.47.90.0/24\",\r\n \"20.60.16.0/24\",\r\n \"20.60.200.0/23\",\r\n + \ \"20.135.108.0/22\",\r\n \"20.135.112.0/23\",\r\n \"20.150.4.0/23\",\r\n + \ \"20.157.140.0/24\",\r\n \"20.190.144.128/25\",\r\n \"20.190.148.128/25\",\r\n + \ \"20.190.180.0/24\",\r\n \"20.194.0.0/18\",\r\n \"20.194.64.0/20\",\r\n + \ \"20.194.80.0/21\",\r\n \"20.194.96.0/19\",\r\n \"20.196.64.0/18\",\r\n + \ \"20.196.128.0/17\",\r\n \"20.200.192.0/18\",\r\n \"40.79.221.0/24\",\r\n + \ \"40.80.36.0/22\",\r\n \"40.82.128.0/19\",\r\n \"40.90.17.224/27\",\r\n + \ \"40.90.128.176/28\",\r\n \"40.90.131.128/27\",\r\n \"40.90.139.128/27\",\r\n + \ \"40.90.156.64/27\",\r\n \"40.126.16.128/25\",\r\n \"40.126.20.128/25\",\r\n + \ \"40.126.52.0/24\",\r\n \"52.108.48.0/23\",\r\n \"52.108.87.0/24\",\r\n + \ \"52.109.44.0/22\",\r\n \"52.111.194.0/24\",\r\n \"52.114.44.0/22\",\r\n + \ \"52.115.106.0/23\",\r\n \"52.115.108.0/22\",\r\n \"52.121.172.0/22\",\r\n + \ \"52.121.176.0/23\",\r\n \"52.141.0.0/18\",\r\n \"52.231.0.0/17\",\r\n + \ \"52.232.145.0/24\",\r\n \"52.239.148.0/27\",\r\n \"52.239.164.192/26\",\r\n + \ \"52.239.190.128/26\",\r\n \"52.245.112.0/22\",\r\n \"52.253.173.0/24\",\r\n + \ \"52.253.174.0/24\",\r\n \"104.44.90.160/27\",\r\n \"2603:1040:f00::/47\",\r\n + \ \"2603:1040:f02::/48\",\r\n \"2603:1040:f04::/48\",\r\n + \ \"2603:1040:f05::/48\",\r\n \"2603:1040:f06::/48\",\r\n + \ \"2603:1046:1404::/48\",\r\n \"2603:1046:1500:20::/64\",\r\n + \ \"2603:1046:2000:160::/59\",\r\n \"2603:1047:1:160::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.koreasouth\",\r\n + \ \"id\": \"AzureCloud.koreasouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.157.0/25\",\r\n + \ \"20.39.168.0/21\",\r\n \"20.47.47.0/24\",\r\n \"20.47.91.0/24\",\r\n + \ \"20.60.202.0/23\",\r\n \"20.135.26.0/23\",\r\n \"20.135.30.0/23\",\r\n + \ \"20.150.14.0/23\",\r\n \"20.157.137.0/24\",\r\n \"20.190.148.0/25\",\r\n + \ \"20.190.179.0/24\",\r\n \"20.200.128.0/18\",\r\n \"20.202.40.0/24\",\r\n + \ \"40.79.220.0/24\",\r\n \"40.80.32.0/22\",\r\n \"40.80.168.0/21\",\r\n + \ \"40.80.224.0/20\",\r\n \"40.89.192.0/19\",\r\n \"40.90.131.160/27\",\r\n + \ \"40.90.139.160/27\",\r\n \"40.90.157.32/27\",\r\n \"40.126.20.0/25\",\r\n + \ \"40.126.51.0/24\",\r\n \"52.108.190.0/24\",\r\n \"52.108.226.0/23\",\r\n + \ \"52.109.48.0/22\",\r\n \"52.111.234.0/24\",\r\n \"52.113.110.0/23\",\r\n + \ \"52.114.48.0/22\",\r\n \"52.147.96.0/19\",\r\n \"52.231.128.0/17\",\r\n + \ \"52.232.144.0/24\",\r\n \"52.239.165.0/26\",\r\n \"52.239.165.160/27\",\r\n + \ \"52.239.190.192/26\",\r\n \"52.245.100.0/22\",\r\n \"104.44.94.224/27\",\r\n + \ \"2603:1040:e00::/47\",\r\n \"2603:1040:e02::/48\",\r\n + \ \"2603:1040:e04::/48\",\r\n \"2603:1040:e05::/48\",\r\n + \ \"2603:1040:e06::/48\",\r\n \"2603:1046:1405::/48\",\r\n + \ \"2603:1046:1500:1c::/64\",\r\n \"2603:1046:2000:e0::/59\",\r\n + \ \"2603:1047:1:e0::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.northcentralus\",\r\n \"id\": \"AzureCloud.northcentralus\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.105.26.0/24\",\r\n \"13.105.28.16/28\",\r\n \"13.105.29.0/25\",\r\n + \ \"13.105.37.64/26\",\r\n \"13.105.37.128/26\",\r\n \"20.36.96.0/21\",\r\n + \ \"20.41.128.0/18\",\r\n \"20.47.3.0/24\",\r\n \"20.47.15.0/24\",\r\n + \ \"20.47.107.0/24\",\r\n \"20.47.119.0/24\",\r\n \"20.49.112.0/21\",\r\n + \ \"20.51.0.0/21\",\r\n \"20.59.192.0/18\",\r\n \"20.60.28.0/23\",\r\n + \ \"20.60.82.0/23\",\r\n \"20.66.128.0/17\",\r\n \"20.72.32.0/19\",\r\n + \ \"20.80.0.0/18\",\r\n \"20.88.0.0/18\",\r\n \"20.95.8.0/21\",\r\n + \ \"20.98.0.0/18\",\r\n \"20.102.192.0/18\",\r\n \"20.112.160.0/20\",\r\n + \ \"20.112.176.0/21\",\r\n \"20.135.12.0/22\",\r\n \"20.135.70.0/23\",\r\n + \ \"20.150.17.0/25\",\r\n \"20.150.25.0/24\",\r\n \"20.150.49.0/24\",\r\n + \ \"20.150.67.0/24\",\r\n \"20.150.126.0/24\",\r\n \"20.157.47.0/24\",\r\n + \ \"20.157.99.0/24\",\r\n \"20.190.135.0/24\",\r\n \"20.190.156.0/24\",\r\n + \ \"23.96.128.0/17\",\r\n \"23.98.48.0/21\",\r\n \"23.100.72.0/21\",\r\n + \ \"23.100.224.0/20\",\r\n \"23.101.160.0/20\",\r\n \"40.77.131.224/28\",\r\n + \ \"40.77.136.96/28\",\r\n \"40.77.137.192/27\",\r\n \"40.77.139.0/25\",\r\n + \ \"40.77.175.0/27\",\r\n \"40.77.176.0/24\",\r\n \"40.77.182.128/27\",\r\n + \ \"40.77.183.0/24\",\r\n \"40.77.188.0/22\",\r\n \"40.77.196.0/24\",\r\n + \ \"40.77.198.64/26\",\r\n \"40.77.200.128/25\",\r\n \"40.77.224.0/28\",\r\n + \ \"40.77.224.32/27\",\r\n \"40.77.231.0/24\",\r\n \"40.77.234.0/25\",\r\n + \ \"40.77.236.32/27\",\r\n \"40.77.236.160/28\",\r\n \"40.77.237.0/26\",\r\n + \ \"40.77.248.128/25\",\r\n \"40.77.254.0/26\",\r\n \"40.77.255.192/26\",\r\n + \ \"40.78.208.64/28\",\r\n \"40.78.222.0/24\",\r\n \"40.80.184.0/21\",\r\n + \ \"40.81.32.0/20\",\r\n \"40.87.172.0/22\",\r\n \"40.90.19.64/26\",\r\n + \ \"40.90.132.96/27\",\r\n \"40.90.133.128/28\",\r\n \"40.90.135.64/26\",\r\n + \ \"40.90.140.128/27\",\r\n \"40.90.144.32/27\",\r\n \"40.90.155.192/26\",\r\n + \ \"40.91.24.0/22\",\r\n \"40.116.0.0/16\",\r\n \"40.126.7.0/24\",\r\n + \ \"40.126.28.0/24\",\r\n \"52.108.182.0/24\",\r\n \"52.108.203.0/24\",\r\n + \ \"52.109.16.0/22\",\r\n \"52.111.235.0/24\",\r\n \"52.112.94.0/24\",\r\n + \ \"52.113.198.0/24\",\r\n \"52.114.168.0/22\",\r\n \"52.141.128.0/18\",\r\n + \ \"52.159.64.0/18\",\r\n \"52.162.0.0/16\",\r\n \"52.232.156.0/24\",\r\n + \ \"52.237.128.0/18\",\r\n \"52.239.149.0/24\",\r\n \"52.239.186.0/24\",\r\n + \ \"52.239.253.0/24\",\r\n \"52.240.128.0/17\",\r\n \"52.245.72.0/22\",\r\n + \ \"52.252.128.0/17\",\r\n \"65.52.0.0/19\",\r\n \"65.52.48.0/20\",\r\n + \ \"65.52.104.0/24\",\r\n \"65.52.106.0/24\",\r\n \"65.52.192.0/19\",\r\n + \ \"65.52.232.0/21\",\r\n \"65.52.240.0/21\",\r\n \"65.55.60.176/29\",\r\n + \ \"65.55.105.192/27\",\r\n \"65.55.106.208/28\",\r\n \"65.55.106.224/28\",\r\n + \ \"65.55.109.0/24\",\r\n \"65.55.211.0/27\",\r\n \"65.55.212.0/27\",\r\n + \ \"65.55.212.128/25\",\r\n \"65.55.213.0/27\",\r\n \"65.55.218.0/24\",\r\n + \ \"65.55.219.0/27\",\r\n \"104.44.88.128/27\",\r\n \"104.44.91.128/27\",\r\n + \ \"104.44.94.64/28\",\r\n \"104.47.220.0/22\",\r\n \"131.253.12.16/28\",\r\n + \ \"131.253.12.40/29\",\r\n \"131.253.12.48/29\",\r\n \"131.253.12.192/28\",\r\n + \ \"131.253.12.248/29\",\r\n \"131.253.13.0/28\",\r\n \"131.253.13.32/28\",\r\n + \ \"131.253.14.32/27\",\r\n \"131.253.14.160/27\",\r\n \"131.253.14.248/29\",\r\n + \ \"131.253.15.32/27\",\r\n \"131.253.15.208/28\",\r\n \"131.253.15.224/27\",\r\n + \ \"131.253.25.0/24\",\r\n \"131.253.27.0/24\",\r\n \"131.253.36.128/26\",\r\n + \ \"131.253.38.32/27\",\r\n \"131.253.38.224/27\",\r\n \"131.253.40.16/28\",\r\n + \ \"131.253.40.32/28\",\r\n \"131.253.40.96/27\",\r\n \"131.253.40.192/26\",\r\n + \ \"157.55.24.0/21\",\r\n \"157.55.55.0/27\",\r\n \"157.55.55.32/28\",\r\n + \ \"157.55.55.152/29\",\r\n \"157.55.55.176/29\",\r\n \"157.55.55.200/29\",\r\n + \ \"157.55.55.216/29\",\r\n \"157.55.60.224/27\",\r\n \"157.55.64.0/20\",\r\n + \ \"157.55.106.128/25\",\r\n \"157.55.110.0/23\",\r\n \"157.55.115.0/25\",\r\n + \ \"157.55.136.0/21\",\r\n \"157.55.151.0/28\",\r\n \"157.55.160.0/20\",\r\n + \ \"157.55.208.0/21\",\r\n \"157.55.248.0/21\",\r\n \"157.56.8.0/21\",\r\n + \ \"157.56.24.160/27\",\r\n \"157.56.24.192/28\",\r\n \"157.56.28.0/22\",\r\n + \ \"157.56.216.0/26\",\r\n \"168.62.96.0/19\",\r\n \"168.62.224.0/19\",\r\n + \ \"191.233.144.0/20\",\r\n \"191.236.128.0/18\",\r\n \"199.30.31.0/25\",\r\n + \ \"204.79.180.0/24\",\r\n \"207.46.193.192/28\",\r\n \"207.46.193.224/27\",\r\n + \ \"207.46.198.128/25\",\r\n \"207.46.200.96/27\",\r\n \"207.46.200.176/28\",\r\n + \ \"207.46.202.128/28\",\r\n \"207.46.205.0/24\",\r\n \"207.68.174.40/29\",\r\n + \ \"207.68.174.184/29\",\r\n \"2603:1030:600::/46\",\r\n + \ \"2603:1030:604::/47\",\r\n \"2603:1030:607::/48\",\r\n + \ \"2603:1030:608::/47\",\r\n \"2603:1036:2406::/48\",\r\n + \ \"2603:1036:2500:8::/64\",\r\n \"2603:1036:3000:60::/59\",\r\n + \ \"2603:1037:1:60::/59\",\r\n \"2a01:111:f100:1000::/62\",\r\n + \ \"2a01:111:f100:1004::/63\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCloud.northeurope\",\r\n \"id\": \"AzureCloud.northeurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"7\",\r\n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.69.128.0/17\",\r\n \"13.70.192.0/18\",\r\n \"13.74.0.0/16\",\r\n + \ \"13.79.0.0/16\",\r\n \"13.94.64.0/18\",\r\n \"13.104.148.0/25\",\r\n + \ \"13.104.149.128/25\",\r\n \"13.104.150.0/25\",\r\n \"13.104.208.160/28\",\r\n + \ \"13.104.210.0/24\",\r\n \"13.105.18.0/26\",\r\n \"13.105.21.0/24\",\r\n + \ \"13.105.28.48/28\",\r\n \"13.105.37.192/26\",\r\n \"13.105.60.192/26\",\r\n + \ \"13.105.67.0/25\",\r\n \"13.105.96.128/25\",\r\n \"20.38.64.0/19\",\r\n + \ \"20.38.102.0/23\",\r\n \"20.47.8.0/24\",\r\n \"20.47.20.0/23\",\r\n + \ \"20.47.32.0/24\",\r\n \"20.47.111.0/24\",\r\n \"20.47.117.0/24\",\r\n + \ \"20.50.64.0/20\",\r\n \"20.50.80.0/21\",\r\n \"20.54.0.0/17\",\r\n + \ \"20.60.19.0/24\",\r\n \"20.60.40.0/23\",\r\n \"20.60.144.0/23\",\r\n + \ \"20.60.204.0/23\",\r\n \"20.60.246.0/23\",\r\n \"20.67.128.0/17\",\r\n + \ \"20.82.128.0/17\",\r\n \"20.93.0.0/17\",\r\n \"20.105.0.0/17\",\r\n + \ \"20.107.128.0/17\",\r\n \"20.135.20.0/23\",\r\n \"20.135.134.0/23\",\r\n + \ \"20.135.136.0/22\",\r\n \"20.143.3.0/24\",\r\n \"20.150.26.0/24\",\r\n + \ \"20.150.47.128/25\",\r\n \"20.150.48.0/24\",\r\n \"20.150.75.0/24\",\r\n + \ \"20.150.84.0/24\",\r\n \"20.150.104.0/24\",\r\n \"20.157.60.0/24\",\r\n + \ \"20.157.100.0/24\",\r\n \"20.157.159.0/24\",\r\n \"20.190.129.0/24\",\r\n + \ \"20.190.159.0/24\",\r\n \"20.191.0.0/18\",\r\n \"20.202.1.0/24\",\r\n + \ \"20.209.14.0/23\",\r\n \"23.100.48.0/20\",\r\n \"23.100.128.0/18\",\r\n + \ \"23.101.48.0/20\",\r\n \"23.102.0.0/18\",\r\n \"40.67.224.0/19\",\r\n + \ \"40.69.0.0/18\",\r\n \"40.69.64.0/19\",\r\n \"40.69.192.0/19\",\r\n + \ \"40.77.133.0/24\",\r\n \"40.77.136.32/28\",\r\n \"40.77.136.80/28\",\r\n + \ \"40.77.165.0/24\",\r\n \"40.77.174.0/24\",\r\n \"40.77.175.160/27\",\r\n + \ \"40.77.182.96/27\",\r\n \"40.77.226.128/25\",\r\n \"40.77.229.0/24\",\r\n + \ \"40.77.234.160/27\",\r\n \"40.77.236.0/27\",\r\n \"40.77.236.176/28\",\r\n + \ \"40.77.255.0/25\",\r\n \"40.78.211.0/24\",\r\n \"40.79.204.0/27\",\r\n + \ \"40.79.204.32/28\",\r\n \"40.79.204.64/27\",\r\n \"40.85.0.0/17\",\r\n + \ \"40.85.128.0/20\",\r\n \"40.87.128.0/19\",\r\n \"40.87.188.0/22\",\r\n + \ \"40.90.17.192/27\",\r\n \"40.90.25.64/26\",\r\n \"40.90.25.128/26\",\r\n + \ \"40.90.31.128/25\",\r\n \"40.90.128.16/28\",\r\n \"40.90.129.192/27\",\r\n + \ \"40.90.130.224/28\",\r\n \"40.90.133.64/27\",\r\n \"40.90.136.176/28\",\r\n + \ \"40.90.137.192/27\",\r\n \"40.90.140.64/27\",\r\n \"40.90.141.96/27\",\r\n + \ \"40.90.141.128/27\",\r\n \"40.90.145.0/27\",\r\n \"40.90.145.224/27\",\r\n + \ \"40.90.147.96/27\",\r\n \"40.90.148.160/28\",\r\n \"40.90.149.128/25\",\r\n + \ \"40.90.153.128/25\",\r\n \"40.91.20.0/22\",\r\n \"40.91.32.0/22\",\r\n + \ \"40.93.64.0/24\",\r\n \"40.112.36.0/25\",\r\n \"40.112.37.64/26\",\r\n + \ \"40.112.64.0/19\",\r\n \"40.113.0.0/18\",\r\n \"40.113.64.0/19\",\r\n + \ \"40.115.96.0/19\",\r\n \"40.126.1.0/24\",\r\n \"40.126.31.0/24\",\r\n + \ \"40.127.96.0/20\",\r\n \"40.127.128.0/17\",\r\n \"51.104.64.0/18\",\r\n + \ \"51.104.128.0/18\",\r\n \"52.101.65.0/24\",\r\n \"52.101.66.0/23\",\r\n + \ \"52.101.68.0/24\",\r\n \"52.102.160.0/24\",\r\n \"52.103.32.0/24\",\r\n + \ \"52.103.160.0/24\",\r\n \"52.108.174.0/23\",\r\n \"52.108.176.0/24\",\r\n + \ \"52.108.196.0/24\",\r\n \"52.108.240.0/21\",\r\n \"52.109.76.0/22\",\r\n + \ \"52.111.236.0/24\",\r\n \"52.112.191.0/24\",\r\n \"52.112.229.0/24\",\r\n + \ \"52.112.232.0/24\",\r\n \"52.112.236.0/24\",\r\n \"52.113.40.0/21\",\r\n + \ \"52.113.48.0/20\",\r\n \"52.113.112.0/20\",\r\n \"52.113.136.0/21\",\r\n + \ \"52.113.205.0/24\",\r\n \"52.114.76.0/22\",\r\n \"52.114.96.0/21\",\r\n + \ \"52.114.120.0/22\",\r\n \"52.114.231.0/24\",\r\n \"52.114.233.0/24\",\r\n + \ \"52.114.248.0/22\",\r\n \"52.115.16.0/21\",\r\n \"52.115.24.0/22\",\r\n + \ \"52.120.136.0/21\",\r\n \"52.120.192.0/20\",\r\n \"52.121.16.0/21\",\r\n + \ \"52.121.48.0/20\",\r\n \"52.125.138.0/23\",\r\n \"52.138.128.0/17\",\r\n + \ \"52.142.64.0/18\",\r\n \"52.143.195.0/24\",\r\n \"52.143.209.0/24\",\r\n + \ \"52.146.128.0/17\",\r\n \"52.155.64.0/19\",\r\n \"52.155.128.0/17\",\r\n + \ \"52.156.192.0/18\",\r\n \"52.158.0.0/17\",\r\n \"52.164.0.0/16\",\r\n + \ \"52.169.0.0/16\",\r\n \"52.178.128.0/17\",\r\n \"52.232.148.0/24\",\r\n + \ \"52.236.0.0/17\",\r\n \"52.239.136.0/22\",\r\n \"52.239.205.0/24\",\r\n + \ \"52.239.248.0/24\",\r\n \"52.245.40.0/22\",\r\n \"52.245.88.0/22\",\r\n + \ \"65.52.64.0/20\",\r\n \"65.52.224.0/21\",\r\n \"94.245.88.0/21\",\r\n + \ \"94.245.104.0/21\",\r\n \"94.245.117.96/27\",\r\n \"94.245.118.0/27\",\r\n + \ \"94.245.120.128/28\",\r\n \"94.245.122.0/24\",\r\n \"94.245.123.144/28\",\r\n + \ \"94.245.123.176/28\",\r\n \"104.41.64.0/18\",\r\n \"104.41.192.0/18\",\r\n + \ \"104.44.88.64/27\",\r\n \"104.44.91.64/27\",\r\n \"104.44.92.192/27\",\r\n + \ \"104.44.94.32/28\",\r\n \"104.45.80.0/20\",\r\n \"104.45.96.0/19\",\r\n + \ \"104.46.8.0/21\",\r\n \"104.46.64.0/19\",\r\n \"104.47.218.0/23\",\r\n + \ \"131.253.40.80/28\",\r\n \"134.170.80.64/28\",\r\n \"137.116.224.0/19\",\r\n + \ \"137.135.128.0/17\",\r\n \"138.91.48.0/20\",\r\n \"157.55.3.0/24\",\r\n + \ \"157.55.10.160/29\",\r\n \"157.55.10.176/28\",\r\n \"157.55.13.128/26\",\r\n + \ \"157.55.107.0/24\",\r\n \"157.55.204.128/25\",\r\n \"168.61.80.0/20\",\r\n + \ \"168.61.96.0/19\",\r\n \"168.63.32.0/19\",\r\n \"168.63.64.0/20\",\r\n + \ \"168.63.80.0/21\",\r\n \"168.63.92.0/22\",\r\n \"191.232.138.0/23\",\r\n + \ \"191.235.128.0/18\",\r\n \"191.235.192.0/22\",\r\n \"191.235.208.0/20\",\r\n + \ \"191.235.255.0/24\",\r\n \"191.237.192.0/23\",\r\n \"191.237.194.0/24\",\r\n + \ \"191.237.196.0/24\",\r\n \"191.237.208.0/20\",\r\n \"191.238.96.0/19\",\r\n + \ \"191.239.208.0/20\",\r\n \"193.149.88.0/21\",\r\n \"2603:1020::/47\",\r\n + \ \"2603:1020:2::/48\",\r\n \"2603:1020:4::/48\",\r\n \"2603:1020:5::/48\",\r\n + \ \"2603:1020:6::/48\",\r\n \"2603:1026:2404::/48\",\r\n + \ \"2603:1026:3000:c0::/59\",\r\n \"2603:1027:1:c0::/59\",\r\n + \ \"2a01:111:f100:a000::/63\",\r\n \"2a01:111:f100:a002::/64\",\r\n + \ \"2a01:111:f100:a004::/64\",\r\n \"2a01:111:f403:c200::/64\",\r\n + \ \"2a01:111:f403:ca00::/62\",\r\n \"2a01:111:f403:ca04::/64\",\r\n + \ \"2a01:111:f403:d200::/64\",\r\n \"2a01:111:f403:da00::/64\",\r\n + \ \"2a01:111:f403:e200::/64\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCloud.norwaye\",\r\n \"id\": \"AzureCloud.norwaye\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.155.32/27\",\r\n \"13.104.158.0/28\",\r\n + \ \"13.104.158.32/27\",\r\n \"13.104.218.0/25\",\r\n \"13.105.97.96/27\",\r\n + \ \"13.105.97.128/25\",\r\n \"20.38.120.0/24\",\r\n \"20.47.48.0/24\",\r\n + \ \"20.60.206.0/23\",\r\n \"20.100.0.0/18\",\r\n \"20.135.158.0/23\",\r\n + \ \"20.135.160.0/22\",\r\n \"20.150.53.0/24\",\r\n \"20.150.121.0/24\",\r\n + \ \"20.157.2.0/24\",\r\n \"20.190.185.0/24\",\r\n \"40.82.84.0/22\",\r\n + \ \"40.119.104.0/22\",\r\n \"40.126.57.0/24\",\r\n \"40.126.200.0/24\",\r\n + \ \"51.13.0.0/21\",\r\n \"51.13.16.0/20\",\r\n \"51.13.32.0/19\",\r\n + \ \"51.13.64.0/18\",\r\n \"51.13.160.0/19\",\r\n \"51.107.208.0/20\",\r\n + \ \"51.120.0.0/17\",\r\n \"51.120.208.0/21\",\r\n \"51.120.232.0/21\",\r\n + \ \"51.120.240.0/20\",\r\n \"52.108.77.0/24\",\r\n \"52.108.98.0/24\",\r\n + \ \"52.109.86.0/23\",\r\n \"52.111.197.0/24\",\r\n \"52.114.234.0/24\",\r\n + \ \"52.253.168.0/24\",\r\n \"52.253.177.0/24\",\r\n \"52.253.178.0/24\",\r\n + \ \"2603:1020:e00::/47\",\r\n \"2603:1020:e03::/48\",\r\n + \ \"2603:1020:e04::/47\",\r\n \"2603:1026:240e::/48\",\r\n + \ \"2603:1026:2500:28::/64\",\r\n \"2603:1026:3000:180::/59\",\r\n + \ \"2603:1027:1:180::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.norwayw\",\r\n \"id\": \"AzureCloud.norwayw\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.153.48/28\",\r\n \"13.104.153.96/27\",\r\n + \ \"13.104.155.0/27\",\r\n \"13.104.217.128/25\",\r\n \"20.47.49.0/24\",\r\n + \ \"20.60.15.0/24\",\r\n \"20.135.58.0/23\",\r\n \"20.150.0.0/24\",\r\n + \ \"20.150.56.0/24\",\r\n \"20.157.3.0/24\",\r\n \"20.190.186.0/24\",\r\n + \ \"40.119.108.0/22\",\r\n \"40.126.58.0/24\",\r\n \"40.126.201.0/24\",\r\n + \ \"51.13.128.0/19\",\r\n \"51.120.128.0/18\",\r\n \"51.120.192.0/20\",\r\n + \ \"51.120.216.0/21\",\r\n \"51.120.224.0/21\",\r\n \"52.108.177.0/24\",\r\n + \ \"52.108.198.0/24\",\r\n \"52.109.144.0/23\",\r\n \"52.111.198.0/24\",\r\n + \ \"52.114.238.0/24\",\r\n \"52.253.167.0/24\",\r\n \"2603:1020:f00::/47\",\r\n + \ \"2603:1020:f03::/48\",\r\n \"2603:1020:f04::/47\",\r\n + \ \"2603:1026:2409::/48\",\r\n \"2603:1026:2500:10::/64\",\r\n + \ \"2603:1026:3000:80::/59\",\r\n \"2603:1027:1:80::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.southafricanorth\",\r\n + \ \"id\": \"AzureCloud.southafricanorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.158.128/27\",\r\n \"13.104.158.160/28\",\r\n + \ \"13.104.158.192/27\",\r\n \"13.105.27.224/27\",\r\n \"20.38.114.128/25\",\r\n + \ \"20.45.128.0/21\",\r\n \"20.47.50.0/24\",\r\n \"20.47.92.0/24\",\r\n + \ \"20.60.190.0/23\",\r\n \"20.87.0.0/17\",\r\n \"20.135.78.0/23\",\r\n + \ \"20.135.80.0/22\",\r\n \"20.150.21.0/24\",\r\n \"20.150.62.0/24\",\r\n + \ \"20.150.101.0/24\",\r\n \"20.190.190.0/26\",\r\n \"40.79.203.0/24\",\r\n + \ \"40.82.20.0/22\",\r\n \"40.82.120.0/22\",\r\n \"40.90.19.0/27\",\r\n + \ \"40.90.128.144/28\",\r\n \"40.90.130.144/28\",\r\n \"40.90.133.160/27\",\r\n + \ \"40.90.143.128/27\",\r\n \"40.90.151.64/27\",\r\n \"40.90.157.224/27\",\r\n + \ \"40.119.64.0/22\",\r\n \"40.120.16.0/20\",\r\n \"40.123.240.0/20\",\r\n + \ \"40.126.62.0/26\",\r\n \"40.127.0.0/19\",\r\n \"52.108.54.0/23\",\r\n + \ \"52.108.90.0/24\",\r\n \"52.109.150.0/23\",\r\n \"52.111.237.0/24\",\r\n + \ \"52.114.112.0/23\",\r\n \"52.114.224.0/24\",\r\n \"52.121.86.0/23\",\r\n + \ \"52.143.204.0/23\",\r\n \"52.143.206.0/24\",\r\n \"52.239.232.0/25\",\r\n + \ \"102.37.0.0/20\",\r\n \"102.37.16.0/21\",\r\n \"102.37.24.0/23\",\r\n + \ \"102.37.26.32/27\",\r\n \"102.37.32.0/19\",\r\n \"102.37.72.0/21\",\r\n + \ \"102.37.96.0/19\",\r\n \"102.37.128.0/19\",\r\n \"102.37.160.0/21\",\r\n + \ \"102.37.192.0/18\",\r\n \"102.133.120.0/21\",\r\n \"102.133.128.0/18\",\r\n + \ \"102.133.192.0/19\",\r\n \"102.133.224.0/20\",\r\n \"102.133.240.0/25\",\r\n + \ \"102.133.240.128/26\",\r\n \"102.133.248.0/21\",\r\n \"2603:1000:100::/47\",\r\n + \ \"2603:1000:103::/48\",\r\n \"2603:1000:104::/47\",\r\n + \ \"2603:1006:1400::/63\",\r\n \"2603:1006:1500:4::/64\",\r\n + \ \"2603:1006:2000::/59\",\r\n \"2603:1007:200::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.southafricawest\",\r\n + \ \"id\": \"AzureCloud.southafricawest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.144.160/27\",\r\n \"20.38.121.0/25\",\r\n + \ \"20.45.136.0/21\",\r\n \"20.47.51.0/24\",\r\n \"20.47.93.0/24\",\r\n + \ \"20.60.8.0/24\",\r\n \"20.60.210.0/23\",\r\n \"20.135.32.0/23\",\r\n + \ \"20.150.20.0/25\",\r\n \"20.190.189.192/26\",\r\n \"40.78.209.0/24\",\r\n + \ \"40.82.64.0/22\",\r\n \"40.90.17.0/27\",\r\n \"40.90.128.96/28\",\r\n + \ \"40.90.152.224/27\",\r\n \"40.117.0.0/19\",\r\n \"40.119.68.0/22\",\r\n + \ \"40.126.61.192/26\",\r\n \"52.108.187.0/24\",\r\n \"52.108.220.0/23\",\r\n + \ \"52.109.152.0/23\",\r\n \"52.111.238.0/24\",\r\n \"52.114.228.0/24\",\r\n + \ \"52.143.203.0/24\",\r\n \"52.239.232.128/25\",\r\n \"102.37.26.0/27\",\r\n + \ \"102.37.64.0/21\",\r\n \"102.37.80.0/21\",\r\n \"102.133.0.0/18\",\r\n + \ \"102.133.64.0/19\",\r\n \"102.133.96.0/20\",\r\n \"102.133.112.0/28\",\r\n + \ \"2603:1000::/47\",\r\n \"2603:1000:3::/48\",\r\n \"2603:1000:4::/47\",\r\n + \ \"2603:1006:1401::/63\",\r\n \"2603:1006:1500::/64\",\r\n + \ \"2603:1006:2000:20::/59\",\r\n \"2603:1007:200:20::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.southcentralus\",\r\n + \ \"id\": \"AzureCloud.southcentralus\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"7\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.65.0.0/16\",\r\n \"13.66.0.0/17\",\r\n \"13.73.240.0/20\",\r\n + \ \"13.84.0.0/15\",\r\n \"13.104.144.64/27\",\r\n \"13.104.208.128/27\",\r\n + \ \"13.104.217.0/25\",\r\n \"13.104.220.128/25\",\r\n \"13.105.23.0/26\",\r\n + \ \"13.105.25.0/24\",\r\n \"13.105.53.0/25\",\r\n \"13.105.60.0/27\",\r\n + \ \"13.105.60.32/28\",\r\n \"13.105.60.64/27\",\r\n \"13.105.66.192/26\",\r\n + \ \"20.38.104.0/23\",\r\n \"20.45.0.0/18\",\r\n \"20.45.120.0/21\",\r\n + \ \"20.47.0.0/24\",\r\n \"20.47.24.0/23\",\r\n \"20.47.29.0/24\",\r\n + \ \"20.47.69.0/24\",\r\n \"20.47.100.0/24\",\r\n \"20.49.88.0/21\",\r\n + \ \"20.60.48.0/22\",\r\n \"20.60.64.0/22\",\r\n \"20.60.140.0/23\",\r\n + \ \"20.60.148.0/23\",\r\n \"20.60.160.0/23\",\r\n \"20.64.0.0/17\",\r\n + \ \"20.65.128.0/17\",\r\n \"20.88.192.0/18\",\r\n \"20.94.128.0/18\",\r\n + \ \"20.97.0.0/17\",\r\n \"20.114.64.0/18\",\r\n \"20.135.8.0/22\",\r\n + \ \"20.135.216.0/22\",\r\n \"20.135.220.0/23\",\r\n \"20.136.0.128/25\",\r\n + \ \"20.136.2.0/24\",\r\n \"20.150.20.128/25\",\r\n \"20.150.38.0/23\",\r\n + \ \"20.150.70.0/24\",\r\n \"20.150.79.0/24\",\r\n \"20.150.93.0/24\",\r\n + \ \"20.150.94.0/24\",\r\n \"20.157.43.0/24\",\r\n \"20.157.54.0/24\",\r\n + \ \"20.157.134.0/24\",\r\n \"20.188.64.0/19\",\r\n \"20.189.0.0/18\",\r\n + \ \"20.190.128.0/24\",\r\n \"20.190.157.0/24\",\r\n \"20.202.24.0/24\",\r\n + \ \"23.98.128.0/17\",\r\n \"23.100.120.0/21\",\r\n \"23.101.176.0/20\",\r\n + \ \"23.102.128.0/18\",\r\n \"40.74.160.0/19\",\r\n \"40.74.192.0/18\",\r\n + \ \"40.77.130.192/26\",\r\n \"40.77.131.0/25\",\r\n \"40.77.131.128/26\",\r\n + \ \"40.77.172.0/24\",\r\n \"40.77.199.0/25\",\r\n \"40.77.225.0/24\",\r\n + \ \"40.78.214.0/24\",\r\n \"40.79.206.160/27\",\r\n \"40.79.206.192/27\",\r\n + \ \"40.79.207.80/28\",\r\n \"40.79.207.128/25\",\r\n \"40.80.192.0/19\",\r\n + \ \"40.84.128.0/17\",\r\n \"40.86.128.0/19\",\r\n \"40.87.176.0/25\",\r\n + \ \"40.87.176.128/27\",\r\n \"40.87.176.160/29\",\r\n \"40.87.176.174/31\",\r\n + \ \"40.87.176.184/30\",\r\n \"40.87.176.192/28\",\r\n \"40.87.176.216/29\",\r\n + \ \"40.87.176.224/29\",\r\n \"40.87.176.232/31\",\r\n \"40.87.176.240/28\",\r\n + \ \"40.87.177.16/28\",\r\n \"40.87.177.32/27\",\r\n \"40.87.177.64/27\",\r\n + \ \"40.87.177.96/28\",\r\n \"40.87.177.112/29\",\r\n \"40.87.177.120/31\",\r\n + \ \"40.87.177.124/30\",\r\n \"40.87.177.128/28\",\r\n \"40.87.177.144/29\",\r\n + \ \"40.87.177.152/31\",\r\n \"40.87.177.156/30\",\r\n \"40.87.177.160/27\",\r\n + \ \"40.87.177.192/29\",\r\n \"40.87.177.200/30\",\r\n \"40.87.177.212/30\",\r\n + \ \"40.87.177.216/29\",\r\n \"40.87.177.224/27\",\r\n \"40.87.178.0/25\",\r\n + \ \"40.87.178.128/26\",\r\n \"40.87.178.192/28\",\r\n \"40.87.178.208/29\",\r\n + \ \"40.87.178.216/31\",\r\n \"40.90.16.128/27\",\r\n \"40.90.18.64/26\",\r\n + \ \"40.90.27.64/26\",\r\n \"40.90.27.128/26\",\r\n \"40.90.28.64/26\",\r\n + \ \"40.90.28.128/26\",\r\n \"40.90.30.160/27\",\r\n \"40.90.128.224/28\",\r\n + \ \"40.90.133.96/28\",\r\n \"40.90.135.128/25\",\r\n \"40.90.136.160/28\",\r\n + \ \"40.90.145.160/27\",\r\n \"40.90.148.0/26\",\r\n \"40.90.152.160/27\",\r\n + \ \"40.90.155.0/26\",\r\n \"40.91.16.0/22\",\r\n \"40.93.5.0/24\",\r\n + \ \"40.93.14.0/24\",\r\n \"40.93.193.0/24\",\r\n \"40.93.194.0/23\",\r\n + \ \"40.93.196.0/23\",\r\n \"40.119.0.0/18\",\r\n \"40.124.0.0/16\",\r\n + \ \"40.126.0.0/24\",\r\n \"40.126.29.0/24\",\r\n \"52.101.11.0/24\",\r\n + \ \"52.101.12.0/22\",\r\n \"52.102.132.0/24\",\r\n \"52.102.140.0/24\",\r\n + \ \"52.103.6.0/24\",\r\n \"52.103.14.0/24\",\r\n \"52.103.132.0/24\",\r\n + \ \"52.103.140.0/24\",\r\n \"52.108.102.0/23\",\r\n \"52.108.104.0/24\",\r\n + \ \"52.108.197.0/24\",\r\n \"52.108.248.0/21\",\r\n \"52.109.20.0/22\",\r\n + \ \"52.111.239.0/24\",\r\n \"52.112.24.0/21\",\r\n \"52.112.117.0/24\",\r\n + \ \"52.113.160.0/19\",\r\n \"52.113.206.0/24\",\r\n \"52.114.144.0/22\",\r\n + \ \"52.115.68.0/22\",\r\n \"52.115.72.0/22\",\r\n \"52.115.84.0/22\",\r\n + \ \"52.120.0.0/19\",\r\n \"52.120.152.0/22\",\r\n \"52.121.0.0/21\",\r\n + \ \"52.123.3.0/24\",\r\n \"52.125.137.0/24\",\r\n \"52.141.64.0/18\",\r\n + \ \"52.152.0.0/17\",\r\n \"52.153.64.0/18\",\r\n \"52.153.192.0/18\",\r\n + \ \"52.171.0.0/16\",\r\n \"52.183.192.0/18\",\r\n \"52.185.192.0/18\",\r\n + \ \"52.189.128.0/18\",\r\n \"52.232.159.0/24\",\r\n \"52.239.158.0/23\",\r\n + \ \"52.239.178.0/23\",\r\n \"52.239.180.0/22\",\r\n \"52.239.199.0/24\",\r\n + \ \"52.239.200.0/23\",\r\n \"52.239.203.0/24\",\r\n \"52.239.208.0/23\",\r\n + \ \"52.245.24.0/22\",\r\n \"52.248.0.0/17\",\r\n \"52.249.0.0/18\",\r\n + \ \"52.253.0.0/18\",\r\n \"52.253.179.0/24\",\r\n \"52.253.180.0/24\",\r\n + \ \"52.255.64.0/18\",\r\n \"53.103.140.0/24\",\r\n \"65.52.32.0/21\",\r\n + \ \"65.54.55.160/27\",\r\n \"65.54.55.224/27\",\r\n \"70.37.48.0/20\",\r\n + \ \"70.37.64.0/18\",\r\n \"70.37.160.0/21\",\r\n \"104.44.89.0/27\",\r\n + \ \"104.44.89.64/27\",\r\n \"104.44.92.64/27\",\r\n \"104.44.94.160/27\",\r\n + \ \"104.44.128.0/18\",\r\n \"104.47.208.0/23\",\r\n \"104.210.128.0/19\",\r\n + \ \"104.210.176.0/20\",\r\n \"104.210.192.0/19\",\r\n \"104.214.0.0/17\",\r\n + \ \"104.215.64.0/18\",\r\n \"131.253.40.64/28\",\r\n \"157.55.51.224/28\",\r\n + \ \"157.55.80.0/21\",\r\n \"157.55.103.32/27\",\r\n \"157.55.153.224/28\",\r\n + \ \"157.55.176.0/20\",\r\n \"157.55.192.0/21\",\r\n \"157.55.200.0/22\",\r\n + \ \"157.55.204.1/32\",\r\n \"157.55.204.2/31\",\r\n \"157.55.204.33/32\",\r\n + \ \"157.55.204.34/31\",\r\n \"168.62.128.0/19\",\r\n \"191.238.144.0/20\",\r\n + \ \"191.238.160.0/19\",\r\n \"191.238.224.0/19\",\r\n \"2603:1030:800::/48\",\r\n + \ \"2603:1030:802::/47\",\r\n \"2603:1030:804::/58\",\r\n + \ \"2603:1030:804:40::/60\",\r\n \"2603:1030:804:53::/64\",\r\n + \ \"2603:1030:804:54::/64\",\r\n \"2603:1030:804:5b::/64\",\r\n + \ \"2603:1030:804:5c::/62\",\r\n \"2603:1030:804:60::/62\",\r\n + \ \"2603:1030:804:67::/64\",\r\n \"2603:1030:804:68::/61\",\r\n + \ \"2603:1030:804:70::/60\",\r\n \"2603:1030:804:80::/59\",\r\n + \ \"2603:1030:804:a0::/62\",\r\n \"2603:1030:804:a4::/64\",\r\n + \ \"2603:1030:804:a6::/63\",\r\n \"2603:1030:804:a8::/61\",\r\n + \ \"2603:1030:804:b0::/62\",\r\n \"2603:1030:804:b4::/64\",\r\n + \ \"2603:1030:804:b6::/63\",\r\n \"2603:1030:804:b8::/61\",\r\n + \ \"2603:1030:804:c0::/61\",\r\n \"2603:1030:804:c8::/62\",\r\n + \ \"2603:1030:804:cc::/63\",\r\n \"2603:1030:804:d2::/63\",\r\n + \ \"2603:1030:804:d4::/62\",\r\n \"2603:1030:804:d8::/61\",\r\n + \ \"2603:1030:804:e0::/59\",\r\n \"2603:1030:804:100::/58\",\r\n + \ \"2603:1030:804:140::/60\",\r\n \"2603:1030:804:150::/62\",\r\n + \ \"2603:1030:804:154::/64\",\r\n \"2603:1030:805::/48\",\r\n + \ \"2603:1030:806::/48\",\r\n \"2603:1030:807::/48\",\r\n + \ \"2603:1030:809::/48\",\r\n \"2603:1030:80a::/56\",\r\n + \ \"2603:1030:80b::/48\",\r\n \"2603:1036:2407::/48\",\r\n + \ \"2603:1036:2500:24::/64\",\r\n \"2603:1036:3000:140::/59\",\r\n + \ \"2603:1037:1:140::/59\",\r\n \"2603:1062:2:80::/57\",\r\n + \ \"2a01:111:f100:4002::/64\",\r\n \"2a01:111:f100:5000::/52\",\r\n + \ \"2a01:111:f403:c10c::/62\",\r\n \"2a01:111:f403:c90c::/62\",\r\n + \ \"2a01:111:f403:c92d::/64\",\r\n \"2a01:111:f403:c92e::/63\",\r\n + \ \"2a01:111:f403:c930::/63\",\r\n \"2a01:111:f403:d10c::/62\",\r\n + \ \"2a01:111:f403:d90c::/62\",\r\n \"2a01:111:f403:e00c::/62\",\r\n + \ \"2a01:111:f403:f90c::/62\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCloud.southeastasia\",\r\n \"id\": \"AzureCloud.southeastasia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.67.0.0/17\",\r\n \"13.76.0.0/16\",\r\n \"13.104.149.0/26\",\r\n + \ \"13.104.153.0/27\",\r\n \"13.104.153.32/28\",\r\n \"13.104.153.64/27\",\r\n + \ \"13.104.153.192/26\",\r\n \"13.104.154.0/25\",\r\n \"13.104.213.128/25\",\r\n + \ \"20.43.128.0/18\",\r\n \"20.44.192.0/18\",\r\n \"20.47.9.0/24\",\r\n + \ \"20.47.33.0/24\",\r\n \"20.47.64.0/24\",\r\n \"20.47.98.0/24\",\r\n + \ \"20.60.136.0/24\",\r\n \"20.60.138.0/23\",\r\n \"20.135.84.0/22\",\r\n + \ \"20.135.88.0/23\",\r\n \"20.150.17.128/25\",\r\n \"20.150.28.0/24\",\r\n + \ \"20.150.86.0/24\",\r\n \"20.150.127.0/24\",\r\n \"20.157.16.0/24\",\r\n + \ \"20.157.98.0/24\",\r\n \"20.157.128.0/24\",\r\n \"20.184.0.0/18\",\r\n + \ \"20.188.96.0/19\",\r\n \"20.190.64.0/19\",\r\n \"20.190.140.0/25\",\r\n + \ \"20.190.163.0/24\",\r\n \"20.191.128.0/19\",\r\n \"20.195.0.0/18\",\r\n + \ \"20.195.64.0/21\",\r\n \"20.195.80.0/21\",\r\n \"20.195.96.0/19\",\r\n + \ \"20.197.64.0/18\",\r\n \"20.198.128.0/17\",\r\n \"20.202.43.0/24\",\r\n + \ \"20.205.160.0/19\",\r\n \"20.205.192.0/18\",\r\n \"20.212.0.0/18\",\r\n + \ \"23.97.48.0/20\",\r\n \"23.98.64.0/18\",\r\n \"23.100.112.0/21\",\r\n + \ \"23.101.16.0/20\",\r\n \"40.65.128.0/18\",\r\n \"40.78.223.0/24\",\r\n + \ \"40.78.232.0/21\",\r\n \"40.79.206.32/27\",\r\n \"40.82.28.0/22\",\r\n + \ \"40.87.196.0/22\",\r\n \"40.90.133.192/26\",\r\n \"40.90.134.0/26\",\r\n + \ \"40.90.137.64/27\",\r\n \"40.90.138.96/27\",\r\n \"40.90.146.160/27\",\r\n + \ \"40.90.146.224/27\",\r\n \"40.90.154.128/26\",\r\n \"40.90.160.0/19\",\r\n + \ \"40.93.129.0/24\",\r\n \"40.119.192.0/18\",\r\n \"40.126.12.0/25\",\r\n + \ \"40.126.35.0/24\",\r\n \"52.101.133.0/24\",\r\n \"52.101.134.0/23\",\r\n + \ \"52.101.136.0/23\",\r\n \"52.102.193.0/24\",\r\n \"52.103.65.0/24\",\r\n + \ \"52.103.193.0/24\",\r\n \"52.108.68.0/23\",\r\n \"52.108.91.0/24\",\r\n + \ \"52.108.184.0/24\",\r\n \"52.108.195.0/24\",\r\n \"52.108.206.0/23\",\r\n + \ \"52.108.236.0/22\",\r\n \"52.109.124.0/22\",\r\n \"52.111.240.0/24\",\r\n + \ \"52.112.40.0/21\",\r\n \"52.112.48.0/20\",\r\n \"52.113.101.0/24\",\r\n + \ \"52.113.105.0/24\",\r\n \"52.113.109.0/24\",\r\n \"52.113.131.0/24\",\r\n + \ \"52.114.8.0/21\",\r\n \"52.114.54.0/23\",\r\n \"52.114.56.0/23\",\r\n + \ \"52.114.80.0/22\",\r\n \"52.114.216.0/22\",\r\n \"52.115.32.0/22\",\r\n + \ \"52.115.36.0/23\",\r\n \"52.115.97.0/24\",\r\n \"52.120.144.0/21\",\r\n + \ \"52.120.156.0/24\",\r\n \"52.121.128.0/20\",\r\n \"52.121.144.0/21\",\r\n + \ \"52.136.26.0/24\",\r\n \"52.139.192.0/18\",\r\n \"52.143.196.0/24\",\r\n + \ \"52.143.210.0/24\",\r\n \"52.148.64.0/18\",\r\n \"52.163.0.0/16\",\r\n + \ \"52.187.0.0/17\",\r\n \"52.187.128.0/18\",\r\n \"52.230.0.0/17\",\r\n + \ \"52.237.64.0/18\",\r\n \"52.239.129.0/24\",\r\n \"52.239.197.0/24\",\r\n + \ \"52.239.227.0/24\",\r\n \"52.239.249.0/24\",\r\n \"52.245.80.0/22\",\r\n + \ \"52.253.80.0/20\",\r\n \"104.43.0.0/17\",\r\n \"104.44.89.32/27\",\r\n + \ \"104.44.90.128/27\",\r\n \"104.44.92.32/27\",\r\n \"104.44.94.144/28\",\r\n + \ \"104.44.95.192/28\",\r\n \"104.44.95.224/28\",\r\n \"104.215.128.0/17\",\r\n + \ \"111.221.80.0/20\",\r\n \"111.221.96.0/20\",\r\n \"137.116.128.0/19\",\r\n + \ \"138.91.32.0/20\",\r\n \"168.63.90.0/24\",\r\n \"168.63.91.0/26\",\r\n + \ \"168.63.160.0/19\",\r\n \"168.63.224.0/19\",\r\n \"191.238.64.0/23\",\r\n + \ \"207.46.50.128/28\",\r\n \"207.46.59.64/27\",\r\n \"207.46.63.64/27\",\r\n + \ \"207.46.63.128/25\",\r\n \"207.46.224.0/20\",\r\n \"2603:1040::/47\",\r\n + \ \"2603:1040:2::/48\",\r\n \"2603:1040:4::/48\",\r\n \"2603:1040:5::/48\",\r\n + \ \"2603:1040:6::/48\",\r\n \"2603:1046:1406::/48\",\r\n + \ \"2603:1046:1500:28::/64\",\r\n \"2603:1046:2000:180::/59\",\r\n + \ \"2603:1047:1:180::/59\",\r\n \"2a01:111:f403:c401::/64\",\r\n + \ \"2a01:111:f403:cc05::/64\",\r\n \"2a01:111:f403:cc06::/63\",\r\n + \ \"2a01:111:f403:cc08::/63\",\r\n \"2a01:111:f403:d402::/64\",\r\n + \ \"2a01:111:f403:dc01::/64\",\r\n \"2a01:111:f403:e401::/64\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.southfrance\",\r\n + \ \"id\": \"AzureCloud.southfrance\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.150.192/26\",\r\n + \ \"13.104.151.0/26\",\r\n \"20.38.188.0/22\",\r\n \"20.39.80.0/20\",\r\n + \ \"20.47.28.0/24\",\r\n \"20.47.102.0/24\",\r\n \"20.60.11.0/24\",\r\n + \ \"20.60.188.0/23\",\r\n \"20.135.28.0/23\",\r\n \"20.150.19.0/24\",\r\n + \ \"20.157.156.0/24\",\r\n \"20.190.147.128/25\",\r\n \"20.190.178.0/24\",\r\n + \ \"40.79.176.0/21\",\r\n \"40.79.223.0/24\",\r\n \"40.80.20.0/22\",\r\n + \ \"40.80.96.0/20\",\r\n \"40.82.224.0/20\",\r\n \"40.90.132.32/28\",\r\n + \ \"40.90.136.192/27\",\r\n \"40.90.147.224/27\",\r\n \"40.126.19.128/25\",\r\n + \ \"40.126.50.0/24\",\r\n \"51.105.88.0/21\",\r\n \"51.138.128.0/19\",\r\n + \ \"51.138.160.0/21\",\r\n \"52.108.188.0/24\",\r\n \"52.108.222.0/23\",\r\n + \ \"52.109.72.0/22\",\r\n \"52.111.253.0/24\",\r\n \"52.114.108.0/22\",\r\n + \ \"52.136.8.0/21\",\r\n \"52.136.28.0/24\",\r\n \"52.136.128.0/18\",\r\n + \ \"52.239.135.0/26\",\r\n \"52.239.196.0/24\",\r\n \"52.245.120.0/22\",\r\n + \ \"2603:1020:900::/47\",\r\n \"2603:1020:902::/48\",\r\n + \ \"2603:1020:904::/48\",\r\n \"2603:1020:905::/48\",\r\n + \ \"2603:1020:906::/48\",\r\n \"2603:1026:2401::/48\",\r\n + \ \"2603:1026:2500:2c::/64\",\r\n \"2603:1026:3000:1a0::/59\",\r\n + \ \"2603:1027:1:1a0::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.southindia\",\r\n \"id\": \"AzureCloud.southindia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.71.64.0/18\",\r\n \"13.104.153.128/26\",\r\n + \ \"20.40.0.0/21\",\r\n \"20.41.192.0/18\",\r\n \"20.44.32.0/19\",\r\n + \ \"20.47.52.0/24\",\r\n \"20.47.72.0/23\",\r\n \"20.60.10.0/24\",\r\n + \ \"20.60.226.0/23\",\r\n \"20.135.42.0/23\",\r\n \"20.150.24.0/24\",\r\n + \ \"20.157.135.0/24\",\r\n \"20.190.145.128/25\",\r\n \"20.190.174.0/24\",\r\n + \ \"20.192.128.0/19\",\r\n \"20.192.184.0/21\",\r\n \"40.78.192.0/21\",\r\n + \ \"40.79.213.0/24\",\r\n \"40.81.64.0/20\",\r\n \"40.87.216.0/22\",\r\n + \ \"40.90.26.64/26\",\r\n \"40.90.137.160/27\",\r\n \"40.126.17.128/25\",\r\n + \ \"40.126.46.0/24\",\r\n \"52.108.192.0/24\",\r\n \"52.108.230.0/23\",\r\n + \ \"52.109.60.0/22\",\r\n \"52.111.241.0/24\",\r\n \"52.113.15.0/24\",\r\n + \ \"52.114.24.0/22\",\r\n \"52.136.17.0/24\",\r\n \"52.140.0.0/18\",\r\n + \ \"52.172.0.0/17\",\r\n \"52.239.135.128/26\",\r\n \"52.239.188.0/24\",\r\n + \ \"52.245.84.0/22\",\r\n \"104.44.92.160/27\",\r\n \"104.44.94.208/28\",\r\n + \ \"104.47.214.0/23\",\r\n \"104.211.192.0/18\",\r\n \"2603:1040:c00::/46\",\r\n + \ \"2603:1040:c05::/48\",\r\n \"2603:1040:c06::/47\",\r\n + \ \"2603:1046:1407::/48\",\r\n \"2603:1046:1500:4::/64\",\r\n + \ \"2603:1046:2000:60::/59\",\r\n \"2603:1047:1:60::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.swedencentral\",\r\n + \ \"id\": \"AzureCloud.swedencentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.105.75.208/28\",\r\n + \ \"13.105.96.0/26\",\r\n \"13.105.99.112/28\",\r\n \"13.105.99.160/27\",\r\n + \ \"13.105.99.192/26\",\r\n \"13.105.100.0/28\",\r\n \"13.105.100.32/27\",\r\n + \ \"20.60.78.0/23\",\r\n \"20.60.234.0/23\",\r\n \"20.60.252.0/23\",\r\n + \ \"20.91.128.0/17\",\r\n \"20.135.164.0/22\",\r\n \"20.135.168.0/23\",\r\n + \ \"20.150.44.0/24\",\r\n \"20.150.120.0/24\",\r\n \"20.157.151.0/24\",\r\n + \ \"20.190.181.0/24\",\r\n \"40.93.214.0/24\",\r\n \"40.101.1.0/24\",\r\n + \ \"40.119.112.0/22\",\r\n \"40.126.53.0/24\",\r\n \"40.126.203.0/24\",\r\n + \ \"51.12.24.0/21\",\r\n \"51.12.32.0/19\",\r\n \"51.12.64.0/19\",\r\n + \ \"51.12.96.0/21\",\r\n \"51.12.104.32/27\",\r\n \"51.12.128.0/21\",\r\n + \ \"51.12.144.0/20\",\r\n \"51.12.208.0/20\",\r\n \"51.12.224.0/19\",\r\n + \ \"51.107.176.0/20\",\r\n \"52.101.75.0/24\",\r\n \"52.101.80.0/22\",\r\n + \ \"52.102.163.0/24\",\r\n \"52.103.35.0/24\",\r\n \"52.103.163.0/24\",\r\n + \ \"52.108.134.0/24\",\r\n \"52.112.120.0/24\",\r\n \"52.112.122.0/24\",\r\n + \ \"52.253.187.0/24\",\r\n \"52.253.188.0/23\",\r\n \"132.245.230.0/23\",\r\n + \ \"2603:1020:1000::/47\",\r\n \"2603:1020:1003::/48\",\r\n + \ \"2603:1020:1004::/47\",\r\n \"2603:1026:900::/64\",\r\n + \ \"2603:1026:900:2::/63\",\r\n \"2603:1026:2402::/48\",\r\n + \ \"2603:1026:2500:4::/64\",\r\n \"2603:1026:3000:20::/59\",\r\n + \ \"2603:1027:1:20::/59\",\r\n \"2a01:111:f403:c202::/64\",\r\n + \ \"2a01:111:f403:ca10::/64\",\r\n \"2a01:111:f403:ca12::/63\",\r\n + \ \"2a01:111:f403:ca14::/64\",\r\n \"2a01:111:f403:d202::/64\",\r\n + \ \"2a01:111:f403:da02::/64\",\r\n \"2a01:111:f403:e202::/64\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.switzerlandn\",\r\n + \ \"id\": \"AzureCloud.switzerlandn\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.144.32/27\",\r\n + \ \"13.104.211.192/26\",\r\n \"13.105.100.176/28\",\r\n \"13.105.100.224/27\",\r\n + \ \"13.105.101.0/27\",\r\n \"20.47.53.0/24\",\r\n \"20.47.71.0/24\",\r\n + \ \"20.60.174.0/23\",\r\n \"20.135.170.0/23\",\r\n \"20.135.172.0/22\",\r\n + \ \"20.150.59.0/24\",\r\n \"20.150.118.0/24\",\r\n \"20.190.183.0/24\",\r\n + \ \"20.199.128.0/18\",\r\n \"20.203.128.0/17\",\r\n \"20.208.0.0/17\",\r\n + \ \"20.208.128.0/20\",\r\n \"40.90.30.128/27\",\r\n \"40.90.128.208/28\",\r\n + \ \"40.119.80.0/22\",\r\n \"40.126.55.0/24\",\r\n \"40.126.194.0/24\",\r\n + \ \"51.103.128.0/18\",\r\n \"51.103.192.32/27\",\r\n \"51.103.200.0/21\",\r\n + \ \"51.103.208.0/20\",\r\n \"51.103.224.0/19\",\r\n \"51.107.0.0/18\",\r\n + \ \"51.107.64.0/19\",\r\n \"51.107.128.0/21\",\r\n \"51.107.200.0/21\",\r\n + \ \"51.107.240.0/21\",\r\n \"52.108.75.0/24\",\r\n \"52.108.96.0/24\",\r\n + \ \"52.109.156.0/23\",\r\n \"52.111.202.0/24\",\r\n \"52.114.226.0/24\",\r\n + \ \"52.239.251.0/24\",\r\n \"52.253.165.0/24\",\r\n \"52.253.175.0/24\",\r\n + \ \"52.253.176.0/24\",\r\n \"2603:1020:a00::/47\",\r\n \"2603:1020:a03::/48\",\r\n + \ \"2603:1020:a04::/47\",\r\n \"2603:1026:240b::/48\",\r\n + \ \"2603:1026:2500:c::/64\",\r\n \"2603:1026:3000:60::/59\",\r\n + \ \"2603:1027:1:60::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.switzerlandw\",\r\n \"id\": \"AzureCloud.switzerlandw\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.144.0/27\",\r\n \"13.104.212.0/26\",\r\n + \ \"20.47.26.0/24\",\r\n \"20.47.67.0/24\",\r\n \"20.47.103.0/24\",\r\n + \ \"20.60.176.0/23\",\r\n \"20.135.62.0/23\",\r\n \"20.150.55.0/24\",\r\n + \ \"20.150.116.0/24\",\r\n \"20.157.133.0/24\",\r\n \"20.190.184.0/24\",\r\n + \ \"20.199.192.0/18\",\r\n \"40.90.19.32/27\",\r\n \"40.90.128.192/28\",\r\n + \ \"40.119.84.0/22\",\r\n \"40.126.56.0/24\",\r\n \"40.126.195.0/24\",\r\n + \ \"51.103.192.0/27\",\r\n \"51.107.96.0/19\",\r\n \"51.107.136.0/21\",\r\n + \ \"51.107.144.0/20\",\r\n \"51.107.160.0/20\",\r\n \"51.107.192.0/21\",\r\n + \ \"51.107.224.0/20\",\r\n \"51.107.248.0/21\",\r\n \"52.108.179.0/24\",\r\n + \ \"52.108.200.0/24\",\r\n \"52.109.158.0/23\",\r\n \"52.111.203.0/24\",\r\n + \ \"52.114.230.0/24\",\r\n \"52.239.250.0/24\",\r\n \"52.253.166.0/24\",\r\n + \ \"2603:1020:b00::/47\",\r\n \"2603:1020:b03::/48\",\r\n + \ \"2603:1020:b04::/47\",\r\n \"2603:1026:240c::/48\",\r\n + \ \"2603:1026:2500:20::/64\",\r\n \"2603:1026:3000:120::/59\",\r\n + \ \"2603:1027:1:120::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.uaecentral\",\r\n \"id\": \"AzureCloud.uaecentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.159.128/26\",\r\n \"20.37.64.0/19\",\r\n + \ \"20.45.64.0/19\",\r\n \"20.46.200.0/21\",\r\n \"20.46.208.0/20\",\r\n + \ \"20.47.54.0/24\",\r\n \"20.47.94.0/24\",\r\n \"20.135.36.0/23\",\r\n + \ \"20.150.6.0/23\",\r\n \"20.150.115.0/24\",\r\n \"20.157.131.0/24\",\r\n + \ \"20.190.188.0/24\",\r\n \"40.90.16.64/27\",\r\n \"40.90.128.48/28\",\r\n + \ \"40.90.151.224/27\",\r\n \"40.119.76.0/22\",\r\n \"40.120.0.0/20\",\r\n + \ \"40.125.0.0/19\",\r\n \"40.126.60.0/24\",\r\n \"40.126.193.0/24\",\r\n + \ \"40.126.208.0/20\",\r\n \"52.108.183.0/24\",\r\n \"52.108.204.0/23\",\r\n + \ \"52.109.160.0/23\",\r\n \"52.111.247.0/24\",\r\n \"52.114.232.0/24\",\r\n + \ \"52.143.221.0/24\",\r\n \"52.239.233.0/25\",\r\n \"2603:1040:b00::/47\",\r\n + \ \"2603:1040:b03::/48\",\r\n \"2603:1040:b04::/47\",\r\n + \ \"2603:1046:140b::/48\",\r\n \"2603:1046:1500:30::/64\",\r\n + \ \"2603:1046:2000:120::/59\",\r\n \"2603:1047:1:120::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.uaenorth\",\r\n + \ \"id\": \"AzureCloud.uaenorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"7\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.151.64/26\",\r\n + \ \"13.104.151.128/26\",\r\n \"13.105.61.16/28\",\r\n \"13.105.61.64/26\",\r\n + \ \"20.38.124.0/23\",\r\n \"20.38.136.0/21\",\r\n \"20.38.152.0/21\",\r\n + \ \"20.46.32.0/19\",\r\n \"20.46.144.0/20\",\r\n \"20.46.192.0/21\",\r\n + \ \"20.47.55.0/24\",\r\n \"20.47.95.0/24\",\r\n \"20.60.21.0/24\",\r\n + \ \"20.60.212.0/23\",\r\n \"20.74.128.0/17\",\r\n \"20.135.114.0/23\",\r\n + \ \"20.135.116.0/22\",\r\n \"20.157.20.0/24\",\r\n \"20.157.141.0/24\",\r\n + \ \"20.190.187.0/24\",\r\n \"20.196.0.0/18\",\r\n \"20.203.0.0/18\",\r\n + \ \"40.90.16.96/27\",\r\n \"40.90.128.64/28\",\r\n \"40.90.152.128/27\",\r\n + \ \"40.119.72.0/22\",\r\n \"40.119.160.0/19\",\r\n \"40.120.64.0/18\",\r\n + \ \"40.123.192.0/19\",\r\n \"40.123.224.0/20\",\r\n \"40.126.59.0/24\",\r\n + \ \"40.126.192.0/24\",\r\n \"52.108.70.0/23\",\r\n \"52.108.92.0/24\",\r\n + \ \"52.109.162.0/23\",\r\n \"52.111.204.0/24\",\r\n \"52.112.200.0/22\",\r\n + \ \"52.112.204.0/23\",\r\n \"52.112.207.0/24\",\r\n \"52.114.236.0/24\",\r\n + \ \"52.121.100.0/22\",\r\n \"52.121.104.0/23\",\r\n \"52.143.202.0/24\",\r\n + \ \"52.143.222.0/23\",\r\n \"52.239.233.128/25\",\r\n \"65.52.248.0/21\",\r\n + \ \"2603:1040:900::/47\",\r\n \"2603:1040:903::/48\",\r\n + \ \"2603:1040:904::/47\",\r\n \"2603:1046:140a::/48\",\r\n + \ \"2603:1046:1500:2c::/64\",\r\n \"2603:1046:2000:100::/59\",\r\n + \ \"2603:1047:1:100::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.uksouth\",\r\n \"id\": \"AzureCloud.uksouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.104.129.128/26\",\r\n \"13.104.145.160/27\",\r\n + \ \"13.104.146.64/26\",\r\n \"13.104.159.0/25\",\r\n \"20.38.106.0/23\",\r\n + \ \"20.39.208.0/20\",\r\n \"20.39.224.0/21\",\r\n \"20.47.11.0/24\",\r\n + \ \"20.47.34.0/24\",\r\n \"20.47.68.0/24\",\r\n \"20.47.114.0/24\",\r\n + \ \"20.49.128.0/17\",\r\n \"20.50.96.0/19\",\r\n \"20.58.0.0/18\",\r\n + \ \"20.60.17.0/24\",\r\n \"20.60.166.0/23\",\r\n \"20.68.0.0/18\",\r\n + \ \"20.68.128.0/17\",\r\n \"20.77.0.0/17\",\r\n \"20.77.128.0/18\",\r\n + \ \"20.90.64.0/18\",\r\n \"20.90.128.0/17\",\r\n \"20.108.0.0/16\",\r\n + \ \"20.135.176.0/22\",\r\n \"20.135.180.0/23\",\r\n \"20.150.18.0/25\",\r\n + \ \"20.150.40.0/25\",\r\n \"20.150.41.0/24\",\r\n \"20.150.69.0/24\",\r\n + \ \"20.157.157.0/24\",\r\n \"20.190.143.0/25\",\r\n \"20.190.169.0/24\",\r\n + \ \"20.202.4.0/24\",\r\n \"20.209.6.0/23\",\r\n \"40.79.215.0/24\",\r\n + \ \"40.80.0.0/22\",\r\n \"40.81.128.0/19\",\r\n \"40.90.17.32/27\",\r\n + \ \"40.90.17.160/27\",\r\n \"40.90.29.192/26\",\r\n \"40.90.128.112/28\",\r\n + \ \"40.90.128.160/28\",\r\n \"40.90.131.64/27\",\r\n \"40.90.139.64/27\",\r\n + \ \"40.90.141.192/26\",\r\n \"40.90.153.64/27\",\r\n \"40.90.154.0/26\",\r\n + \ \"40.120.32.0/19\",\r\n \"40.126.15.0/25\",\r\n \"40.126.41.0/24\",\r\n + \ \"51.11.0.0/18\",\r\n \"51.11.128.0/18\",\r\n \"51.104.0.0/19\",\r\n + \ \"51.104.192.0/18\",\r\n \"51.105.0.0/18\",\r\n \"51.105.64.0/20\",\r\n + \ \"51.132.0.0/18\",\r\n \"51.132.128.0/17\",\r\n \"51.140.0.0/17\",\r\n + \ \"51.140.128.0/18\",\r\n \"51.141.128.32/27\",\r\n \"51.141.129.64/26\",\r\n + \ \"51.141.130.0/25\",\r\n \"51.141.135.0/24\",\r\n \"51.141.192.0/18\",\r\n + \ \"51.143.128.0/18\",\r\n \"51.143.208.0/20\",\r\n \"51.143.224.0/19\",\r\n + \ \"51.145.0.0/17\",\r\n \"52.108.50.0/23\",\r\n \"52.108.88.0/24\",\r\n + \ \"52.108.99.0/24\",\r\n \"52.108.100.0/23\",\r\n \"52.109.28.0/22\",\r\n + \ \"52.111.242.0/24\",\r\n \"52.112.231.0/24\",\r\n \"52.112.240.0/20\",\r\n + \ \"52.113.128.0/24\",\r\n \"52.113.200.0/22\",\r\n \"52.113.204.0/24\",\r\n + \ \"52.113.224.0/19\",\r\n \"52.114.88.0/22\",\r\n \"52.120.160.0/19\",\r\n + \ \"52.120.240.0/20\",\r\n \"52.136.21.0/24\",\r\n \"52.151.64.0/18\",\r\n + \ \"52.239.187.0/25\",\r\n \"52.239.231.0/24\",\r\n \"52.245.64.0/22\",\r\n + \ \"52.253.162.0/23\",\r\n \"104.44.89.224/27\",\r\n \"2603:1020:700::/47\",\r\n + \ \"2603:1020:702::/48\",\r\n \"2603:1020:704::/48\",\r\n + \ \"2603:1020:705::/48\",\r\n \"2603:1020:706::/48\",\r\n + \ \"2603:1026:2406::/48\",\r\n \"2603:1026:2500:18::/64\",\r\n + \ \"2603:1026:3000:e0::/59\",\r\n \"2603:1027:1:e0::/59\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.ukwest\",\r\n + \ \"id\": \"AzureCloud.ukwest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"20.39.160.0/21\",\r\n + \ \"20.40.104.0/21\",\r\n \"20.45.176.0/20\",\r\n \"20.47.56.0/24\",\r\n + \ \"20.47.82.0/23\",\r\n \"20.58.64.0/18\",\r\n \"20.60.164.0/23\",\r\n + \ \"20.68.64.0/18\",\r\n \"20.77.192.0/18\",\r\n \"20.90.0.0/18\",\r\n + \ \"20.135.64.0/23\",\r\n \"20.150.2.0/23\",\r\n \"20.150.52.0/24\",\r\n + \ \"20.150.110.0/24\",\r\n \"20.157.46.0/24\",\r\n \"20.190.144.0/25\",\r\n + \ \"20.190.171.0/24\",\r\n \"20.202.3.0/24\",\r\n \"40.79.218.0/24\",\r\n + \ \"40.81.112.0/20\",\r\n \"40.87.228.0/22\",\r\n \"40.90.28.192/26\",\r\n + \ \"40.90.29.0/26\",\r\n \"40.90.131.96/27\",\r\n \"40.90.139.96/27\",\r\n + \ \"40.90.157.192/27\",\r\n \"40.126.16.0/25\",\r\n \"40.126.43.0/24\",\r\n + \ \"51.11.96.0/19\",\r\n \"51.104.32.0/19\",\r\n \"51.132.64.0/18\",\r\n + \ \"51.137.128.0/18\",\r\n \"51.140.192.0/18\",\r\n \"51.141.0.0/17\",\r\n + \ \"51.141.128.0/27\",\r\n \"51.141.128.64/26\",\r\n \"51.141.128.128/25\",\r\n + \ \"51.141.129.128/26\",\r\n \"51.141.134.0/24\",\r\n \"51.141.136.0/22\",\r\n + \ \"52.108.189.0/24\",\r\n \"52.108.224.0/23\",\r\n \"52.109.32.0/22\",\r\n + \ \"52.111.205.0/24\",\r\n \"52.112.168.0/22\",\r\n \"52.112.212.0/24\",\r\n + \ \"52.112.230.0/24\",\r\n \"52.113.192.0/24\",\r\n \"52.114.84.0/22\",\r\n + \ \"52.114.92.0/22\",\r\n \"52.136.20.0/24\",\r\n \"52.142.128.0/18\",\r\n + \ \"52.239.240.0/24\",\r\n \"104.44.90.0/27\",\r\n \"2603:1020:600::/47\",\r\n + \ \"2603:1020:602::/48\",\r\n \"2603:1020:604::/48\",\r\n + \ \"2603:1020:605::/48\",\r\n \"2603:1020:606::/48\",\r\n + \ \"2603:1026:2407::/48\",\r\n \"2603:1026:3000:200::/59\",\r\n + \ \"2603:1027:1:200::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.usstagec\",\r\n \"id\": \"AzureCloud.usstagec\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.105.16.128/26\",\r\n \"20.38.110.0/23\",\r\n + \ \"20.43.112.0/21\",\r\n \"20.44.0.0/21\",\r\n \"20.45.96.0/20\",\r\n + \ \"20.45.112.0/21\",\r\n \"20.46.64.0/19\",\r\n \"20.46.128.0/20\",\r\n + \ \"20.47.14.0/24\",\r\n \"20.60.9.0/24\",\r\n \"20.135.34.0/23\",\r\n + \ \"23.100.192.0/19\",\r\n \"40.82.76.0/22\",\r\n \"40.87.176.168/30\",\r\n + \ \"40.87.176.172/31\",\r\n \"40.87.176.176/29\",\r\n \"40.87.176.188/30\",\r\n + \ \"40.87.176.208/29\",\r\n \"40.87.176.234/31\",\r\n \"40.87.176.236/30\",\r\n + \ \"40.87.177.0/28\",\r\n \"40.87.177.122/31\",\r\n \"40.87.177.154/31\",\r\n + \ \"40.87.177.204/30\",\r\n \"40.87.177.208/30\",\r\n \"40.90.16.32/27\",\r\n + \ \"40.90.128.32/28\",\r\n \"40.90.151.192/27\",\r\n \"40.126.196.0/24\",\r\n + \ \"52.108.132.0/24\",\r\n \"52.143.220.0/24\",\r\n \"2603:1030:301::/48\",\r\n + \ \"2603:1030:302::/48\",\r\n \"2603:1030:303::/48\",\r\n + \ \"2603:1030:804:50::/63\",\r\n \"2603:1030:804:52::/64\",\r\n + \ \"2603:1030:804:55::/64\",\r\n \"2603:1030:804:56::/63\",\r\n + \ \"2603:1030:804:58::/63\",\r\n \"2603:1030:804:5a::/64\",\r\n + \ \"2603:1030:804:64::/63\",\r\n \"2603:1030:804:66::/64\",\r\n + \ \"2603:1030:804:a5::/64\",\r\n \"2603:1030:804:b5::/64\",\r\n + \ \"2603:1030:804:ce::/63\",\r\n \"2603:1030:804:d0::/63\",\r\n + \ \"2603:1030:80c::/48\",\r\n \"2603:1036:240e::/48\",\r\n + \ \"2603:1036:2500:28::/64\",\r\n \"2603:1036:3000:1a0::/59\",\r\n + \ \"2603:1037:1:1a0::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.westcentralus\",\r\n \"id\": \"AzureCloud.westcentralus\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.71.192.0/18\",\r\n \"13.77.192.0/19\",\r\n \"13.78.128.0/17\",\r\n + \ \"13.104.145.64/26\",\r\n \"13.104.215.128/25\",\r\n \"13.104.219.0/25\",\r\n + \ \"20.47.4.0/24\",\r\n \"20.47.70.0/24\",\r\n \"20.47.104.0/24\",\r\n + \ \"20.51.32.0/19\",\r\n \"20.55.128.0/18\",\r\n \"20.57.224.0/19\",\r\n + \ \"20.59.128.0/18\",\r\n \"20.60.4.0/24\",\r\n \"20.60.218.0/23\",\r\n + \ \"20.69.0.0/18\",\r\n \"20.135.22.0/23\",\r\n \"20.135.72.0/23\",\r\n + \ \"20.150.81.0/24\",\r\n \"20.150.98.0/24\",\r\n \"20.157.41.0/24\",\r\n + \ \"20.190.136.0/24\",\r\n \"20.190.158.0/24\",\r\n \"40.67.120.0/21\",\r\n + \ \"40.77.128.0/25\",\r\n \"40.77.131.192/27\",\r\n \"40.77.131.240/28\",\r\n + \ \"40.77.135.0/24\",\r\n \"40.77.136.128/25\",\r\n \"40.77.166.0/25\",\r\n + \ \"40.77.166.128/28\",\r\n \"40.77.173.0/24\",\r\n \"40.77.175.32/27\",\r\n + \ \"40.77.182.160/27\",\r\n \"40.77.185.0/25\",\r\n \"40.77.224.16/28\",\r\n + \ \"40.77.224.64/27\",\r\n \"40.77.227.0/24\",\r\n \"40.77.232.0/25\",\r\n + \ \"40.77.235.0/24\",\r\n \"40.77.236.96/27\",\r\n \"40.77.246.0/24\",\r\n + \ \"40.78.218.0/24\",\r\n \"40.79.205.240/28\",\r\n \"40.79.206.224/27\",\r\n + \ \"40.79.207.0/27\",\r\n \"40.90.131.0/27\",\r\n \"40.90.138.192/28\",\r\n + \ \"40.90.139.0/27\",\r\n \"40.90.143.96/27\",\r\n \"40.90.151.0/26\",\r\n + \ \"40.90.151.128/28\",\r\n \"40.90.152.0/25\",\r\n \"40.93.6.0/24\",\r\n + \ \"40.93.15.0/24\",\r\n \"40.93.198.0/23\",\r\n \"40.93.200.0/23\",\r\n + \ \"40.93.202.0/24\",\r\n \"40.96.255.0/24\",\r\n \"40.123.136.0/24\",\r\n + \ \"40.126.8.0/24\",\r\n \"40.126.30.0/24\",\r\n \"52.101.24.0/22\",\r\n + \ \"52.101.40.0/24\",\r\n \"52.102.133.0/24\",\r\n \"52.102.141.0/24\",\r\n + \ \"52.103.7.0/24\",\r\n \"52.103.15.0/24\",\r\n \"52.103.133.0/24\",\r\n + \ \"52.103.141.0/24\",\r\n \"52.108.181.0/24\",\r\n \"52.108.202.0/24\",\r\n + \ \"52.109.136.0/22\",\r\n \"52.111.206.0/24\",\r\n \"52.112.93.0/24\",\r\n + \ \"52.113.207.0/24\",\r\n \"52.136.4.0/22\",\r\n \"52.143.214.0/24\",\r\n + \ \"52.148.0.0/18\",\r\n \"52.150.128.0/17\",\r\n \"52.153.128.0/18\",\r\n + \ \"52.159.0.0/18\",\r\n \"52.161.0.0/16\",\r\n \"52.239.164.0/25\",\r\n + \ \"52.239.167.0/24\",\r\n \"52.239.244.0/23\",\r\n \"52.245.60.0/22\",\r\n + \ \"52.253.128.0/20\",\r\n \"53.103.141.0/24\",\r\n \"64.4.8.0/24\",\r\n + \ \"64.4.54.0/24\",\r\n \"65.55.209.192/26\",\r\n \"104.44.89.96/27\",\r\n + \ \"104.47.224.0/20\",\r\n \"131.253.24.160/27\",\r\n \"131.253.40.160/28\",\r\n + \ \"157.55.12.128/26\",\r\n \"157.55.103.128/25\",\r\n \"207.68.174.48/29\",\r\n + \ \"2603:1030:b00::/47\",\r\n \"2603:1030:b03::/48\",\r\n + \ \"2603:1030:b04::/48\",\r\n \"2603:1030:b05::/48\",\r\n + \ \"2603:1030:b06::/48\",\r\n \"2603:1036:9ff:ffff::/64\",\r\n + \ \"2603:1036:2408::/48\",\r\n \"2603:1036:2500:20::/64\",\r\n + \ \"2603:1036:3000:180::/59\",\r\n \"2603:1037:1:180::/59\",\r\n + \ \"2a01:111:f403:c112::/64\",\r\n \"2a01:111:f403:c910::/62\",\r\n + \ \"2a01:111:f403:c932::/63\",\r\n \"2a01:111:f403:c934::/63\",\r\n + \ \"2a01:111:f403:c936::/64\",\r\n \"2a01:111:f403:d120::/62\",\r\n + \ \"2a01:111:f403:d910::/62\",\r\n \"2a01:111:f403:e010::/62\",\r\n + \ \"2a01:111:f403:f910::/62\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCloud.westeurope\",\r\n \"id\": \"AzureCloud.westeurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"7\",\r\n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.69.0.0/17\",\r\n \"13.73.128.0/18\",\r\n \"13.73.224.0/21\",\r\n + \ \"13.80.0.0/15\",\r\n \"13.88.200.0/21\",\r\n \"13.93.0.0/17\",\r\n + \ \"13.94.128.0/17\",\r\n \"13.95.0.0/16\",\r\n \"13.104.145.192/26\",\r\n + \ \"13.104.146.0/26\",\r\n \"13.104.146.128/25\",\r\n \"13.104.158.176/28\",\r\n + \ \"13.104.209.0/24\",\r\n \"13.104.214.0/25\",\r\n \"13.104.218.128/25\",\r\n + \ \"13.105.22.0/24\",\r\n \"13.105.23.128/25\",\r\n \"13.105.28.32/28\",\r\n + \ \"13.105.29.128/25\",\r\n \"13.105.60.48/28\",\r\n \"13.105.60.96/27\",\r\n + \ \"13.105.60.128/27\",\r\n \"13.105.66.144/28\",\r\n \"20.38.108.0/23\",\r\n + \ \"20.38.200.0/22\",\r\n \"20.47.7.0/24\",\r\n \"20.47.18.0/23\",\r\n + \ \"20.47.30.0/24\",\r\n \"20.47.96.0/23\",\r\n \"20.47.115.0/24\",\r\n + \ \"20.47.118.0/24\",\r\n \"20.50.0.0/18\",\r\n \"20.50.128.0/17\",\r\n + \ \"20.54.128.0/17\",\r\n \"20.56.0.0/16\",\r\n \"20.60.26.0/23\",\r\n + \ \"20.60.130.0/24\",\r\n \"20.60.150.0/23\",\r\n \"20.60.196.0/23\",\r\n + \ \"20.60.222.0/23\",\r\n \"20.60.250.0/23\",\r\n \"20.61.0.0/16\",\r\n + \ \"20.67.0.0/17\",\r\n \"20.71.0.0/16\",\r\n \"20.73.0.0/16\",\r\n + \ \"20.76.0.0/16\",\r\n \"20.82.0.0/17\",\r\n \"20.86.0.0/16\",\r\n + \ \"20.93.128.0/17\",\r\n \"20.101.0.0/16\",\r\n \"20.103.0.0/16\",\r\n + \ \"20.105.128.0/17\",\r\n \"20.107.0.0/17\",\r\n \"20.135.24.0/23\",\r\n + \ \"20.135.140.0/22\",\r\n \"20.135.144.0/23\",\r\n \"20.143.1.0/24\",\r\n + \ \"20.150.8.0/23\",\r\n \"20.150.37.0/24\",\r\n \"20.150.42.0/24\",\r\n + \ \"20.150.74.0/24\",\r\n \"20.150.76.0/24\",\r\n \"20.150.83.0/24\",\r\n + \ \"20.150.122.0/24\",\r\n \"20.157.18.0/24\",\r\n \"20.157.33.0/24\",\r\n + \ \"20.157.97.0/24\",\r\n \"20.157.146.0/24\",\r\n \"20.157.158.0/24\",\r\n + \ \"20.190.137.0/24\",\r\n \"20.190.160.0/24\",\r\n \"20.202.2.0/24\",\r\n + \ \"20.209.10.0/23\",\r\n \"23.97.128.0/17\",\r\n \"23.98.46.0/24\",\r\n + \ \"23.100.0.0/20\",\r\n \"23.101.64.0/20\",\r\n \"40.67.192.0/19\",\r\n + \ \"40.68.0.0/16\",\r\n \"40.74.0.0/18\",\r\n \"40.78.210.0/24\",\r\n + \ \"40.79.205.192/27\",\r\n \"40.79.205.224/28\",\r\n \"40.79.206.0/27\",\r\n + \ \"40.82.92.0/22\",\r\n \"40.87.184.0/22\",\r\n \"40.90.17.64/27\",\r\n + \ \"40.90.18.192/26\",\r\n \"40.90.20.128/25\",\r\n \"40.90.21.0/25\",\r\n + \ \"40.90.130.0/27\",\r\n \"40.90.133.0/27\",\r\n \"40.90.134.64/26\",\r\n + \ \"40.90.134.128/26\",\r\n \"40.90.138.0/27\",\r\n \"40.90.141.32/27\",\r\n + \ \"40.90.141.160/27\",\r\n \"40.90.142.224/28\",\r\n \"40.90.144.192/27\",\r\n + \ \"40.90.145.192/27\",\r\n \"40.90.146.16/28\",\r\n \"40.90.146.128/27\",\r\n + \ \"40.90.150.128/25\",\r\n \"40.90.157.64/26\",\r\n \"40.90.159.0/24\",\r\n + \ \"40.91.28.0/22\",\r\n \"40.91.192.0/18\",\r\n \"40.93.65.0/24\",\r\n + \ \"40.112.36.128/25\",\r\n \"40.112.37.0/26\",\r\n \"40.112.38.192/26\",\r\n + \ \"40.112.96.0/19\",\r\n \"40.113.96.0/19\",\r\n \"40.113.128.0/18\",\r\n + \ \"40.114.128.0/17\",\r\n \"40.115.0.0/18\",\r\n \"40.118.0.0/17\",\r\n + \ \"40.119.128.0/19\",\r\n \"40.123.140.0/22\",\r\n \"40.126.9.0/24\",\r\n + \ \"40.126.32.0/24\",\r\n \"51.105.96.0/19\",\r\n \"51.105.128.0/17\",\r\n + \ \"51.124.0.0/16\",\r\n \"51.136.0.0/16\",\r\n \"51.137.0.0/17\",\r\n + \ \"51.137.192.0/18\",\r\n \"51.138.0.0/17\",\r\n \"51.144.0.0/16\",\r\n + \ \"51.145.128.0/17\",\r\n \"52.101.69.0/24\",\r\n \"52.101.70.0/23\",\r\n + \ \"52.101.72.0/23\",\r\n \"52.102.161.0/24\",\r\n \"52.103.33.0/24\",\r\n + \ \"52.103.161.0/24\",\r\n \"52.108.24.0/21\",\r\n \"52.108.56.0/21\",\r\n + \ \"52.108.80.0/24\",\r\n \"52.108.108.0/23\",\r\n \"52.108.110.0/24\",\r\n + \ \"52.109.88.0/22\",\r\n \"52.111.243.0/24\",\r\n \"52.112.14.0/23\",\r\n + \ \"52.112.17.0/24\",\r\n \"52.112.18.0/23\",\r\n \"52.112.71.0/24\",\r\n + \ \"52.112.83.0/24\",\r\n \"52.112.97.0/24\",\r\n \"52.112.98.0/23\",\r\n + \ \"52.112.110.0/23\",\r\n \"52.112.144.0/20\",\r\n \"52.112.197.0/24\",\r\n + \ \"52.112.216.0/21\",\r\n \"52.112.233.0/24\",\r\n \"52.112.237.0/24\",\r\n + \ \"52.112.238.0/24\",\r\n \"52.113.9.0/24\",\r\n \"52.113.37.0/24\",\r\n + \ \"52.113.83.0/24\",\r\n \"52.113.130.0/24\",\r\n \"52.113.144.0/21\",\r\n + \ \"52.113.199.0/24\",\r\n \"52.114.64.0/21\",\r\n \"52.114.72.0/22\",\r\n + \ \"52.114.116.0/22\",\r\n \"52.114.241.0/24\",\r\n \"52.114.242.0/24\",\r\n + \ \"52.114.252.0/22\",\r\n \"52.115.0.0/21\",\r\n \"52.115.8.0/22\",\r\n + \ \"52.120.128.0/21\",\r\n \"52.120.208.0/20\",\r\n \"52.121.24.0/21\",\r\n + \ \"52.121.64.0/20\",\r\n \"52.125.140.0/23\",\r\n \"52.136.192.0/18\",\r\n + \ \"52.137.0.0/18\",\r\n \"52.142.192.0/18\",\r\n \"52.143.0.0/18\",\r\n + \ \"52.143.194.0/24\",\r\n \"52.143.208.0/24\",\r\n \"52.148.192.0/18\",\r\n + \ \"52.149.64.0/18\",\r\n \"52.157.64.0/18\",\r\n \"52.157.128.0/17\",\r\n + \ \"52.166.0.0/16\",\r\n \"52.174.0.0/16\",\r\n \"52.178.0.0/17\",\r\n + \ \"52.232.0.0/17\",\r\n \"52.232.147.0/24\",\r\n \"52.233.128.0/17\",\r\n + \ \"52.236.128.0/17\",\r\n \"52.239.140.0/22\",\r\n \"52.239.212.0/23\",\r\n + \ \"52.239.242.0/23\",\r\n \"52.245.48.0/22\",\r\n \"52.245.124.0/22\",\r\n + \ \"65.52.128.0/19\",\r\n \"104.40.128.0/17\",\r\n \"104.44.89.160/27\",\r\n + \ \"104.44.90.192/27\",\r\n \"104.44.93.0/27\",\r\n \"104.44.93.192/27\",\r\n + \ \"104.44.95.80/28\",\r\n \"104.44.95.96/28\",\r\n \"104.45.0.0/18\",\r\n + \ \"104.45.64.0/20\",\r\n \"104.46.32.0/19\",\r\n \"104.47.128.0/18\",\r\n + \ \"104.47.216.64/26\",\r\n \"104.214.192.0/18\",\r\n \"137.116.192.0/19\",\r\n + \ \"137.117.128.0/17\",\r\n \"157.55.8.64/26\",\r\n \"157.55.8.144/28\",\r\n + \ \"157.56.117.64/27\",\r\n \"168.61.56.0/21\",\r\n \"168.63.0.0/19\",\r\n + \ \"168.63.96.0/19\",\r\n \"191.233.64.0/18\",\r\n \"191.237.232.0/22\",\r\n + \ \"191.239.200.0/22\",\r\n \"193.149.80.0/21\",\r\n \"213.199.128.0/20\",\r\n + \ \"213.199.180.32/28\",\r\n \"213.199.180.96/27\",\r\n \"213.199.180.192/27\",\r\n + \ \"213.199.183.0/24\",\r\n \"2603:1020:200::/46\",\r\n \"2603:1020:205::/48\",\r\n + \ \"2603:1020:206::/47\",\r\n \"2603:1026:2405::/48\",\r\n + \ \"2603:1026:2500:24::/64\",\r\n \"2603:1026:3000:140::/59\",\r\n + \ \"2603:1027:1:140::/59\",\r\n \"2a01:111:f403:c201::/64\",\r\n + \ \"2a01:111:f403:ca05::/64\",\r\n \"2a01:111:f403:ca06::/63\",\r\n + \ \"2a01:111:f403:ca08::/63\",\r\n \"2a01:111:f403:d201::/64\",\r\n + \ \"2a01:111:f403:da01::/64\",\r\n \"2a01:111:f403:e201::/64\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.westindia\",\r\n + \ \"id\": \"AzureCloud.westindia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.104.157.128/25\",\r\n + \ \"20.38.128.0/21\",\r\n \"20.40.8.0/21\",\r\n \"20.47.57.0/24\",\r\n + \ \"20.47.124.0/23\",\r\n \"20.60.216.0/23\",\r\n \"20.135.44.0/23\",\r\n + \ \"20.150.18.128/25\",\r\n \"20.150.43.0/25\",\r\n \"20.150.106.0/24\",\r\n + \ \"20.157.102.0/24\",\r\n \"20.157.136.0/24\",\r\n \"20.190.146.128/25\",\r\n + \ \"20.190.176.0/24\",\r\n \"20.192.64.0/19\",\r\n \"40.79.219.0/24\",\r\n + \ \"40.81.80.0/20\",\r\n \"40.87.220.0/22\",\r\n \"40.90.26.0/26\",\r\n + \ \"40.90.138.224/27\",\r\n \"40.126.18.128/25\",\r\n \"40.126.48.0/24\",\r\n + \ \"52.108.73.0/24\",\r\n \"52.108.94.0/24\",\r\n \"52.109.64.0/22\",\r\n + \ \"52.111.244.0/24\",\r\n \"52.113.134.0/24\",\r\n \"52.114.28.0/22\",\r\n + \ \"52.136.16.0/24\",\r\n \"52.136.32.0/19\",\r\n \"52.140.128.0/18\",\r\n + \ \"52.183.128.0/18\",\r\n \"52.239.135.192/26\",\r\n \"52.239.187.128/25\",\r\n + \ \"52.245.76.0/22\",\r\n \"52.249.64.0/19\",\r\n \"104.44.93.224/27\",\r\n + \ \"104.44.95.112/28\",\r\n \"104.47.212.0/23\",\r\n \"104.211.128.0/18\",\r\n + \ \"2603:1040:800::/46\",\r\n \"2603:1040:805::/48\",\r\n + \ \"2603:1040:806::/47\",\r\n \"2603:1046:1408::/48\",\r\n + \ \"2603:1046:1500::/64\",\r\n \"2603:1046:2000:20::/59\",\r\n + \ \"2603:1047:1:20::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCloud.westus\",\r\n \"id\": \"AzureCloud.westus\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"7\",\r\n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.64.0.0/16\",\r\n \"13.73.32.0/19\",\r\n \"13.83.0.0/16\",\r\n + \ \"13.86.128.0/17\",\r\n \"13.87.128.0/17\",\r\n \"13.88.0.0/17\",\r\n + \ \"13.88.128.0/18\",\r\n \"13.91.0.0/16\",\r\n \"13.93.128.0/17\",\r\n + \ \"13.104.144.192/27\",\r\n \"13.104.158.16/28\",\r\n \"13.104.158.64/26\",\r\n + \ \"13.104.208.96/27\",\r\n \"13.104.222.0/24\",\r\n \"13.104.223.0/25\",\r\n + \ \"13.105.17.64/26\",\r\n \"13.105.17.128/26\",\r\n \"13.105.19.128/25\",\r\n + \ \"13.105.96.64/27\",\r\n \"13.105.96.96/28\",\r\n \"13.105.97.0/27\",\r\n + \ \"20.43.192.0/18\",\r\n \"20.47.2.0/24\",\r\n \"20.47.22.0/23\",\r\n + \ \"20.47.110.0/24\",\r\n \"20.47.116.0/24\",\r\n \"20.49.120.0/21\",\r\n + \ \"20.57.192.0/19\",\r\n \"20.59.64.0/18\",\r\n \"20.60.1.0/24\",\r\n + \ \"20.60.34.0/23\",\r\n \"20.60.52.0/23\",\r\n \"20.60.80.0/23\",\r\n + \ \"20.60.168.0/23\",\r\n \"20.60.230.0/23\",\r\n \"20.60.232.0/23\",\r\n + \ \"20.66.0.0/17\",\r\n \"20.135.74.0/23\",\r\n \"20.150.34.0/23\",\r\n + \ \"20.150.91.0/24\",\r\n \"20.150.102.0/24\",\r\n \"20.157.32.0/24\",\r\n + \ \"20.157.57.0/24\",\r\n \"20.157.105.0/24\",\r\n \"20.157.130.0/24\",\r\n + \ \"20.184.128.0/17\",\r\n \"20.189.128.0/18\",\r\n \"20.190.132.0/24\",\r\n + \ \"20.190.153.0/24\",\r\n \"20.202.22.0/24\",\r\n \"23.99.0.0/18\",\r\n + \ \"23.99.64.0/19\",\r\n \"23.100.32.0/20\",\r\n \"23.101.192.0/20\",\r\n + \ \"40.65.0.0/18\",\r\n \"40.75.128.0/17\",\r\n \"40.78.0.0/17\",\r\n + \ \"40.78.216.0/24\",\r\n \"40.80.152.0/21\",\r\n \"40.81.0.0/20\",\r\n + \ \"40.82.248.0/21\",\r\n \"40.83.128.0/17\",\r\n \"40.85.144.0/20\",\r\n + \ \"40.86.160.0/19\",\r\n \"40.87.160.0/22\",\r\n \"40.90.17.96/27\",\r\n + \ \"40.90.18.128/26\",\r\n \"40.90.22.128/25\",\r\n \"40.90.23.0/25\",\r\n + \ \"40.90.25.192/26\",\r\n \"40.90.128.128/28\",\r\n \"40.90.131.192/27\",\r\n + \ \"40.90.135.0/26\",\r\n \"40.90.139.192/27\",\r\n \"40.90.146.0/28\",\r\n + \ \"40.90.148.128/27\",\r\n \"40.90.153.96/27\",\r\n \"40.90.156.128/26\",\r\n + \ \"40.93.0.0/23\",\r\n \"40.93.9.0/24\",\r\n \"40.112.128.0/17\",\r\n + \ \"40.118.128.0/17\",\r\n \"40.125.32.0/19\",\r\n \"40.126.4.0/24\",\r\n + \ \"40.126.25.0/24\",\r\n \"52.101.0.0/22\",\r\n \"52.101.16.0/22\",\r\n + \ \"52.101.41.0/24\",\r\n \"52.101.43.0/24\",\r\n \"52.101.44.0/23\",\r\n + \ \"52.102.128.0/24\",\r\n \"52.102.135.0/24\",\r\n \"52.102.158.0/24\",\r\n + \ \"52.103.0.0/24\",\r\n \"52.103.2.0/24\",\r\n \"52.103.9.0/24\",\r\n + \ \"52.103.128.0/24\",\r\n \"52.108.0.0/21\",\r\n \"52.108.78.0/24\",\r\n + \ \"52.109.0.0/22\",\r\n \"52.111.245.0/24\",\r\n \"52.112.106.0/23\",\r\n + \ \"52.112.114.0/24\",\r\n \"52.113.208.0/20\",\r\n \"52.114.152.0/21\",\r\n + \ \"52.114.172.0/22\",\r\n \"52.114.176.0/22\",\r\n \"52.114.184.0/23\",\r\n + \ \"52.115.56.0/22\",\r\n \"52.115.60.0/23\",\r\n \"52.115.93.0/24\",\r\n + \ \"52.115.140.0/22\",\r\n \"52.115.144.0/20\",\r\n \"52.120.96.0/19\",\r\n + \ \"52.121.36.0/22\",\r\n \"52.123.1.0/24\",\r\n \"52.137.128.0/17\",\r\n + \ \"52.153.0.0/18\",\r\n \"52.155.32.0/19\",\r\n \"52.157.0.0/18\",\r\n + \ \"52.159.128.0/17\",\r\n \"52.160.0.0/16\",\r\n \"52.180.0.0/17\",\r\n + \ \"52.190.128.0/17\",\r\n \"52.225.0.0/17\",\r\n \"52.232.149.0/24\",\r\n + \ \"52.234.0.0/17\",\r\n \"52.238.0.0/18\",\r\n \"52.239.0.0/17\",\r\n + \ \"52.239.160.0/22\",\r\n \"52.239.228.0/23\",\r\n \"52.239.254.0/23\",\r\n + \ \"52.241.0.0/16\",\r\n \"52.245.12.0/22\",\r\n \"52.245.108.0/22\",\r\n + \ \"52.246.0.0/17\",\r\n \"52.248.128.0/17\",\r\n \"52.250.192.0/18\",\r\n + \ \"52.254.128.0/17\",\r\n \"53.103.135.0/24\",\r\n \"65.52.112.0/20\",\r\n + \ \"104.40.0.0/17\",\r\n \"104.42.0.0/16\",\r\n \"104.44.88.0/27\",\r\n + \ \"104.44.91.0/27\",\r\n \"104.44.92.96/27\",\r\n \"104.44.94.0/28\",\r\n + \ \"104.44.95.128/27\",\r\n \"104.45.208.0/20\",\r\n \"104.45.224.0/19\",\r\n + \ \"104.209.0.0/18\",\r\n \"104.210.32.0/19\",\r\n \"137.116.184.0/21\",\r\n + \ \"137.117.0.0/19\",\r\n \"137.135.0.0/18\",\r\n \"138.91.64.0/19\",\r\n + \ \"138.91.128.0/17\",\r\n \"157.56.160.0/21\",\r\n \"168.61.0.0/19\",\r\n + \ \"168.61.64.0/20\",\r\n \"168.62.0.0/19\",\r\n \"168.62.192.0/19\",\r\n + \ \"168.63.88.0/23\",\r\n \"191.236.64.0/18\",\r\n \"191.238.70.0/23\",\r\n + \ \"191.239.0.0/18\",\r\n \"2603:1030:a00::/46\",\r\n \"2603:1030:a04::/48\",\r\n + \ \"2603:1030:a06::/48\",\r\n \"2603:1030:a07::/48\",\r\n + \ \"2603:1030:a08::/48\",\r\n \"2603:1030:a09::/56\",\r\n + \ \"2603:1030:a0a::/48\",\r\n \"2603:1036:2400::/48\",\r\n + \ \"2603:1036:2500:10::/64\",\r\n \"2603:1036:3000:1c0::/59\",\r\n + \ \"2603:1037:1:1c0::/59\",\r\n \"2a01:111:f100:3000::/52\",\r\n + \ \"2a01:111:f403:c000::/64\",\r\n \"2a01:111:f403:c800::/64\",\r\n + \ \"2a01:111:f403:c914::/62\",\r\n \"2a01:111:f403:c918::/64\",\r\n + \ \"2a01:111:f403:d000::/64\",\r\n \"2a01:111:f403:d800::/64\",\r\n + \ \"2a01:111:f403:e000::/64\",\r\n \"2a01:111:f403:f800::/62\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.westus2\",\r\n + \ \"id\": \"AzureCloud.westus2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\n + \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.66.128.0/17\",\r\n + \ \"13.77.128.0/18\",\r\n \"13.104.129.64/26\",\r\n \"13.104.145.0/26\",\r\n + \ \"13.104.208.192/26\",\r\n \"13.104.213.0/25\",\r\n \"13.104.220.0/25\",\r\n + \ \"13.105.14.0/25\",\r\n \"13.105.14.128/26\",\r\n \"13.105.18.160/27\",\r\n + \ \"13.105.36.0/27\",\r\n \"13.105.36.32/28\",\r\n \"13.105.36.64/27\",\r\n + \ \"13.105.36.128/26\",\r\n \"13.105.66.64/26\",\r\n \"20.36.0.0/19\",\r\n + \ \"20.38.99.0/24\",\r\n \"20.42.128.0/18\",\r\n \"20.47.62.0/23\",\r\n + \ \"20.47.120.0/23\",\r\n \"20.51.8.0/21\",\r\n \"20.51.64.0/18\",\r\n + \ \"20.57.128.0/18\",\r\n \"20.59.0.0/18\",\r\n \"20.60.20.0/24\",\r\n + \ \"20.60.68.0/22\",\r\n \"20.60.152.0/23\",\r\n \"20.60.228.0/23\",\r\n + \ \"20.64.128.0/17\",\r\n \"20.69.64.0/18\",\r\n \"20.69.128.0/18\",\r\n + \ \"20.72.192.0/18\",\r\n \"20.80.128.0/18\",\r\n \"20.83.64.0/18\",\r\n + \ \"20.83.192.0/18\",\r\n \"20.94.192.0/18\",\r\n \"20.98.64.0/18\",\r\n + \ \"20.99.128.0/17\",\r\n \"20.109.128.0/18\",\r\n \"20.112.0.0/17\",\r\n + \ \"20.114.0.0/18\",\r\n \"20.115.128.0/17\",\r\n \"20.135.18.0/23\",\r\n + \ \"20.135.228.0/22\",\r\n \"20.135.232.0/23\",\r\n \"20.150.68.0/24\",\r\n + \ \"20.150.78.0/24\",\r\n \"20.150.87.0/24\",\r\n \"20.150.107.0/24\",\r\n + \ \"20.157.50.0/23\",\r\n \"20.157.106.0/24\",\r\n \"20.187.0.0/18\",\r\n + \ \"20.190.0.0/18\",\r\n \"20.190.133.0/24\",\r\n \"20.190.154.0/24\",\r\n + \ \"20.191.64.0/18\",\r\n \"20.201.223.0/24\",\r\n \"20.201.231.0/24\",\r\n + \ \"20.202.23.0/24\",\r\n \"23.98.47.0/24\",\r\n \"23.102.192.0/21\",\r\n + \ \"23.102.203.0/24\",\r\n \"23.103.64.32/27\",\r\n \"23.103.64.64/27\",\r\n + \ \"23.103.66.0/23\",\r\n \"40.64.64.0/18\",\r\n \"40.64.128.0/21\",\r\n + \ \"40.65.64.0/18\",\r\n \"40.77.136.0/28\",\r\n \"40.77.136.64/28\",\r\n + \ \"40.77.139.128/25\",\r\n \"40.77.160.0/27\",\r\n \"40.77.162.0/24\",\r\n + \ \"40.77.164.0/24\",\r\n \"40.77.169.0/24\",\r\n \"40.77.175.64/27\",\r\n + \ \"40.77.180.0/23\",\r\n \"40.77.182.64/27\",\r\n \"40.77.185.128/25\",\r\n + \ \"40.77.186.0/23\",\r\n \"40.77.198.128/25\",\r\n \"40.77.199.128/26\",\r\n + \ \"40.77.200.0/25\",\r\n \"40.77.202.0/24\",\r\n \"40.77.224.96/27\",\r\n + \ \"40.77.230.0/24\",\r\n \"40.77.232.128/25\",\r\n \"40.77.234.224/27\",\r\n + \ \"40.77.236.128/27\",\r\n \"40.77.240.128/25\",\r\n \"40.77.241.0/24\",\r\n + \ \"40.77.242.0/23\",\r\n \"40.77.244.0/25\",\r\n \"40.77.247.0/24\",\r\n + \ \"40.77.249.0/24\",\r\n \"40.77.250.0/24\",\r\n \"40.77.254.128/25\",\r\n + \ \"40.78.208.32/30\",\r\n \"40.78.217.0/24\",\r\n \"40.78.240.0/20\",\r\n + \ \"40.79.206.128/27\",\r\n \"40.80.160.0/24\",\r\n \"40.82.36.0/22\",\r\n + \ \"40.87.232.0/21\",\r\n \"40.90.16.192/26\",\r\n \"40.90.131.32/27\",\r\n + \ \"40.90.132.48/28\",\r\n \"40.90.136.224/27\",\r\n \"40.90.138.208/28\",\r\n + \ \"40.90.139.32/27\",\r\n \"40.90.146.32/27\",\r\n \"40.90.148.192/27\",\r\n + \ \"40.90.153.0/26\",\r\n \"40.90.192.0/19\",\r\n \"40.91.0.0/22\",\r\n + \ \"40.91.64.0/18\",\r\n \"40.91.160.0/19\",\r\n \"40.93.7.0/24\",\r\n + \ \"40.93.10.0/24\",\r\n \"40.96.50.0/24\",\r\n \"40.96.61.0/24\",\r\n + \ \"40.96.63.0/24\",\r\n \"40.125.64.0/18\",\r\n \"40.126.5.0/24\",\r\n + \ \"40.126.26.0/24\",\r\n \"51.141.160.0/19\",\r\n \"51.143.0.0/17\",\r\n + \ \"52.96.11.0/24\",\r\n \"52.101.28.0/22\",\r\n \"52.101.42.0/24\",\r\n + \ \"52.101.46.0/23\",\r\n \"52.101.48.0/23\",\r\n \"52.101.50.0/24\",\r\n + \ \"52.102.134.0/24\",\r\n \"52.102.136.0/24\",\r\n \"52.103.8.0/24\",\r\n + \ \"52.103.10.0/24\",\r\n \"52.103.134.0/24\",\r\n \"52.103.136.0/24\",\r\n + \ \"52.108.72.0/24\",\r\n \"52.108.93.0/24\",\r\n \"52.109.24.0/22\",\r\n + \ \"52.111.246.0/24\",\r\n \"52.112.105.0/24\",\r\n \"52.112.109.0/24\",\r\n + \ \"52.112.115.0/24\",\r\n \"52.114.148.0/22\",\r\n \"52.115.55.0/24\",\r\n + \ \"52.123.5.0/24\",\r\n \"52.136.0.0/22\",\r\n \"52.137.64.0/18\",\r\n + \ \"52.143.64.0/18\",\r\n \"52.143.197.0/24\",\r\n \"52.143.211.0/24\",\r\n + \ \"52.148.128.0/18\",\r\n \"52.149.0.0/18\",\r\n \"52.151.0.0/18\",\r\n + \ \"52.156.64.0/18\",\r\n \"52.156.128.0/19\",\r\n \"52.158.224.0/19\",\r\n + \ \"52.175.192.0/18\",\r\n \"52.183.0.0/17\",\r\n \"52.191.128.0/18\",\r\n + \ \"52.229.0.0/18\",\r\n \"52.232.152.0/24\",\r\n \"52.233.64.0/18\",\r\n + \ \"52.235.64.0/18\",\r\n \"52.239.148.128/25\",\r\n \"52.239.176.128/25\",\r\n + \ \"52.239.193.0/24\",\r\n \"52.239.210.0/23\",\r\n \"52.239.236.0/23\",\r\n + \ \"52.245.52.0/22\",\r\n \"52.246.192.0/18\",\r\n \"52.247.192.0/18\",\r\n + \ \"52.250.0.0/17\",\r\n \"53.103.136.0/24\",\r\n \"65.52.111.0/24\",\r\n + \ \"65.55.32.128/28\",\r\n \"65.55.32.192/27\",\r\n \"65.55.32.224/28\",\r\n + \ \"65.55.33.176/28\",\r\n \"65.55.33.192/28\",\r\n \"65.55.35.192/27\",\r\n + \ \"65.55.44.8/29\",\r\n \"65.55.44.112/28\",\r\n \"65.55.51.0/24\",\r\n + \ \"65.55.105.160/27\",\r\n \"65.55.106.192/28\",\r\n \"65.55.106.240/28\",\r\n + \ \"65.55.107.0/28\",\r\n \"65.55.107.96/27\",\r\n \"65.55.110.0/24\",\r\n + \ \"65.55.120.0/24\",\r\n \"65.55.207.0/24\",\r\n \"65.55.209.0/25\",\r\n + \ \"65.55.210.0/24\",\r\n \"65.55.219.64/26\",\r\n \"65.55.250.0/24\",\r\n + \ \"65.55.252.0/24\",\r\n \"70.37.0.0/21\",\r\n \"70.37.8.0/22\",\r\n + \ \"70.37.16.0/20\",\r\n \"70.37.32.0/20\",\r\n \"104.44.89.128/27\",\r\n + \ \"104.44.89.192/27\",\r\n \"104.44.95.0/28\",\r\n \"131.253.12.160/28\",\r\n + \ \"131.253.12.228/30\",\r\n \"131.253.13.24/29\",\r\n \"131.253.13.88/30\",\r\n + \ \"131.253.13.128/27\",\r\n \"131.253.14.4/30\",\r\n \"131.253.14.8/31\",\r\n + \ \"131.253.14.96/27\",\r\n \"131.253.14.128/27\",\r\n \"131.253.14.192/29\",\r\n + \ \"131.253.15.192/28\",\r\n \"131.253.35.128/26\",\r\n \"131.253.40.48/29\",\r\n + \ \"131.253.40.128/27\",\r\n \"131.253.41.0/24\",\r\n \"134.170.222.0/24\",\r\n + \ \"137.116.176.0/21\",\r\n \"157.55.2.128/26\",\r\n \"157.55.12.64/26\",\r\n + \ \"157.55.13.64/26\",\r\n \"157.55.39.0/24\",\r\n \"157.55.55.228/30\",\r\n + \ \"157.55.55.232/29\",\r\n \"157.55.55.240/28\",\r\n \"157.55.106.0/26\",\r\n + \ \"157.55.154.128/25\",\r\n \"157.56.2.0/25\",\r\n \"157.56.3.128/25\",\r\n + \ \"157.56.19.224/27\",\r\n \"157.56.21.160/27\",\r\n \"157.56.21.192/27\",\r\n + \ \"157.56.80.0/25\",\r\n \"168.62.64.0/19\",\r\n \"199.30.24.0/23\",\r\n + \ \"199.30.27.0/25\",\r\n \"199.30.27.144/28\",\r\n \"199.30.27.160/27\",\r\n + \ \"199.30.31.192/26\",\r\n \"207.46.13.0/24\",\r\n \"207.68.174.192/28\",\r\n + \ \"209.240.212.0/23\",\r\n \"2603:1030:c00::/48\",\r\n \"2603:1030:c02::/47\",\r\n + \ \"2603:1030:c04::/48\",\r\n \"2603:1030:c05::/48\",\r\n + \ \"2603:1030:c06::/48\",\r\n \"2603:1030:c07::/48\",\r\n + \ \"2603:1030:d00::/47\",\r\n \"2603:1030:e01:2::/64\",\r\n + \ \"2603:1036:903::/64\",\r\n \"2603:1036:d20::/64\",\r\n + \ \"2603:1036:2409::/48\",\r\n \"2603:1036:2500:14::/64\",\r\n + \ \"2603:1036:3000:c0::/59\",\r\n \"2603:1037:1:c0::/59\",\r\n + \ \"2a01:111:f403:c004::/62\",\r\n \"2a01:111:f403:c804::/62\",\r\n + \ \"2a01:111:f403:c919::/64\",\r\n \"2a01:111:f403:c91a::/63\",\r\n + \ \"2a01:111:f403:c91c::/63\",\r\n \"2a01:111:f403:d004::/62\",\r\n + \ \"2a01:111:f403:d804::/62\",\r\n \"2a01:111:f403:f804::/62\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCloud.westus3\",\r\n + \ \"id\": \"AzureCloud.westus3\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"\",\r\n \"addressPrefixes\": [\r\n \"13.105.66.32/27\",\r\n + \ \"13.105.66.128/28\",\r\n \"13.105.66.160/27\",\r\n \"13.105.74.0/27\",\r\n + \ \"13.105.74.32/28\",\r\n \"13.105.74.64/27\",\r\n \"20.38.0.0/20\",\r\n + \ \"20.38.32.0/20\",\r\n \"20.38.160.0/20\",\r\n \"20.40.24.0/21\",\r\n + \ \"20.60.14.0/24\",\r\n \"20.60.38.0/23\",\r\n \"20.60.162.0/23\",\r\n + \ \"20.106.64.0/18\",\r\n \"20.135.6.0/23\",\r\n \"20.135.222.0/23\",\r\n + \ \"20.135.224.0/22\",\r\n \"20.143.0.0/24\",\r\n \"20.150.30.0/24\",\r\n + \ \"20.150.128.0/17\",\r\n \"20.157.40.0/24\",\r\n \"20.157.145.0/24\",\r\n + \ \"20.190.190.128/25\",\r\n \"20.209.4.0/23\",\r\n \"40.79.204.160/27\",\r\n + \ \"40.79.205.64/28\",\r\n \"40.79.205.96/27\",\r\n \"40.119.88.0/22\",\r\n + \ \"40.126.62.128/25\",\r\n \"40.126.202.0/24\",\r\n \"52.108.139.0/24\",\r\n + \ \"52.253.182.0/23\",\r\n \"52.253.184.0/24\",\r\n \"2603:1030:500::/47\",\r\n + \ \"2603:1030:503::/48\",\r\n \"2603:1030:504::/47\",\r\n + \ \"2603:1036:240c::/48\",\r\n \"2603:1036:2500:18::/63\",\r\n + \ \"2603:1036:2500:38::/64\",\r\n \"2603:1036:3000:e0::/59\",\r\n + \ \"2603:1037:1:e0::/59\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureCognitiveSearch\",\r\n \"id\": \"AzureCognitiveSearch\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCognitiveSearch\",\r\n \"addressPrefixes\": + [\r\n \"13.64.32.141/32\",\r\n \"13.83.22.45/32\",\r\n \"13.83.22.74/32\",\r\n + \ \"13.83.22.119/32\",\r\n \"13.86.5.51/32\",\r\n \"20.21.32.192/26\",\r\n + \ \"20.36.120.128/26\",\r\n \"20.37.64.128/26\",\r\n \"20.37.156.128/26\",\r\n + \ \"20.37.193.192/26\",\r\n \"20.37.224.128/26\",\r\n \"20.38.84.0/26\",\r\n + \ \"20.38.136.128/26\",\r\n \"20.39.8.192/26\",\r\n \"20.40.123.36/32\",\r\n + \ \"20.40.123.39/32\",\r\n \"20.40.123.46/32\",\r\n \"20.40.123.72/32\",\r\n + \ \"20.41.4.128/26\",\r\n \"20.41.65.64/26\",\r\n \"20.41.193.64/26\",\r\n + \ \"20.42.4.128/26\",\r\n \"20.42.24.90/32\",\r\n \"20.42.29.212/32\",\r\n + \ \"20.42.30.105/32\",\r\n \"20.42.34.190/32\",\r\n \"20.42.35.204/32\",\r\n + \ \"20.42.129.192/26\",\r\n \"20.42.225.192/26\",\r\n \"20.43.41.64/26\",\r\n + \ \"20.43.65.64/26\",\r\n \"20.43.130.128/26\",\r\n \"20.44.74.182/32\",\r\n + \ \"20.44.76.53/32\",\r\n \"20.44.76.61/32\",\r\n \"20.44.76.86/32\",\r\n + \ \"20.45.0.49/32\",\r\n \"20.45.2.122/32\",\r\n \"20.45.112.128/26\",\r\n + \ \"20.45.192.128/26\",\r\n \"20.72.17.0/26\",\r\n \"20.150.160.128/26\",\r\n + \ \"20.185.110.199/32\",\r\n \"20.189.106.128/26\",\r\n \"20.189.129.94/32\",\r\n + \ \"20.192.161.0/26\",\r\n \"20.192.225.64/26\",\r\n \"23.100.238.27/32\",\r\n + \ \"23.100.238.34/31\",\r\n \"23.100.238.37/32\",\r\n \"40.64.8.64/26\",\r\n + \ \"40.65.173.157/32\",\r\n \"40.65.175.212/32\",\r\n \"40.65.175.228/32\",\r\n + \ \"40.66.56.233/32\",\r\n \"40.67.48.128/26\",\r\n \"40.74.18.154/32\",\r\n + \ \"40.74.30.0/26\",\r\n \"40.80.57.64/26\",\r\n \"40.80.169.64/26\",\r\n + \ \"40.80.186.192/26\",\r\n \"40.80.216.231/32\",\r\n \"40.80.217.38/32\",\r\n + \ \"40.80.219.46/32\",\r\n \"40.81.9.100/32\",\r\n \"40.81.9.131/32\",\r\n + \ \"40.81.9.203/32\",\r\n \"40.81.9.209/32\",\r\n \"40.81.9.213/32\",\r\n + \ \"40.81.9.221/32\",\r\n \"40.81.10.36/32\",\r\n \"40.81.12.133/32\",\r\n + \ \"40.81.15.8/32\",\r\n \"40.81.15.39/32\",\r\n \"40.81.29.152/32\",\r\n + \ \"40.81.188.130/32\",\r\n \"40.81.191.58/32\",\r\n \"40.81.253.154/32\",\r\n + \ \"40.82.155.65/32\",\r\n \"40.82.253.0/26\",\r\n \"40.89.17.64/26\",\r\n + \ \"40.90.190.180/32\",\r\n \"40.90.240.17/32\",\r\n \"40.91.93.84/32\",\r\n + \ \"40.91.127.116/32\",\r\n \"40.91.127.241/32\",\r\n \"40.119.11.0/26\",\r\n + \ \"51.12.41.64/26\",\r\n \"51.12.193.64/26\",\r\n \"51.104.25.64/26\",\r\n + \ \"51.105.80.128/26\",\r\n \"51.105.88.128/26\",\r\n \"51.107.48.128/26\",\r\n + \ \"51.107.144.128/26\",\r\n \"51.116.48.96/28\",\r\n \"51.116.144.96/28\",\r\n + \ \"51.120.40.128/26\",\r\n \"51.120.224.128/26\",\r\n \"51.132.43.66/32\",\r\n + \ \"51.137.161.64/26\",\r\n \"51.143.104.54/32\",\r\n \"51.143.104.90/32\",\r\n + \ \"51.143.192.128/26\",\r\n \"51.145.124.157/32\",\r\n \"51.145.124.158/32\",\r\n + \ \"51.145.176.249/32\",\r\n \"51.145.177.212/32\",\r\n \"51.145.178.138/32\",\r\n + \ \"51.145.178.140/32\",\r\n \"52.136.48.128/26\",\r\n \"52.137.24.236/32\",\r\n + \ \"52.137.26.114/32\",\r\n \"52.137.26.155/32\",\r\n \"52.137.26.198/32\",\r\n + \ \"52.137.27.49/32\",\r\n \"52.137.56.115/32\",\r\n \"52.137.60.208/32\",\r\n + \ \"52.139.0.47/32\",\r\n \"52.139.0.49/32\",\r\n \"52.140.105.64/26\",\r\n + \ \"52.140.233.105/32\",\r\n \"52.150.139.0/26\",\r\n \"52.151.235.150/32\",\r\n + \ \"52.151.235.242/32\",\r\n \"52.151.235.244/32\",\r\n \"52.155.216.245/32\",\r\n + \ \"52.155.217.84/32\",\r\n \"52.155.221.242/32\",\r\n \"52.155.221.250/32\",\r\n + \ \"52.155.222.35/32\",\r\n \"52.155.222.56/32\",\r\n \"52.157.22.233/32\",\r\n + \ \"52.157.231.64/32\",\r\n \"52.158.28.181/32\",\r\n \"52.158.30.241/32\",\r\n + \ \"52.158.208.11/32\",\r\n \"52.184.80.221/32\",\r\n \"52.185.224.13/32\",\r\n + \ \"52.185.224.38/32\",\r\n \"52.188.217.235/32\",\r\n \"52.188.218.228/32\",\r\n + \ \"52.188.218.239/32\",\r\n \"52.228.81.64/26\",\r\n \"52.242.214.45/32\",\r\n + \ \"52.253.133.74/32\",\r\n \"52.253.229.120/32\",\r\n \"102.37.84.192/26\",\r\n + \ \"102.133.128.33/32\",\r\n \"102.133.217.128/26\",\r\n + \ \"104.45.64.0/32\",\r\n \"104.45.64.147/32\",\r\n \"104.45.64.224/32\",\r\n + \ \"104.45.65.30/32\",\r\n \"104.45.65.89/32\",\r\n \"191.233.9.0/26\",\r\n + \ \"191.233.26.156/32\",\r\n \"191.235.225.64/26\",\r\n \"2603:1000:4::180/121\",\r\n + \ \"2603:1000:104:1::180/121\",\r\n \"2603:1010:6:1::180/121\",\r\n + \ \"2603:1010:101::180/121\",\r\n \"2603:1010:304::180/121\",\r\n + \ \"2603:1010:404::180/121\",\r\n \"2603:1020:5:1::180/121\",\r\n + \ \"2603:1020:206:1::180/121\",\r\n \"2603:1020:305::180/121\",\r\n + \ \"2603:1020:405::180/121\",\r\n \"2603:1020:605::180/121\",\r\n + \ \"2603:1020:705:1::180/121\",\r\n \"2603:1020:805:1::180/121\",\r\n + \ \"2603:1020:905::180/121\",\r\n \"2603:1020:a04:1::180/121\",\r\n + \ \"2603:1020:b04::180/121\",\r\n \"2603:1020:c04:1::180/121\",\r\n + \ \"2603:1020:d04::180/121\",\r\n \"2603:1020:e04:1::180/121\",\r\n + \ \"2603:1020:f04::180/121\",\r\n \"2603:1020:1004::180/121\",\r\n + \ \"2603:1020:1104::180/121\",\r\n \"2603:1030:f:1::180/121\",\r\n + \ \"2603:1030:10:1::180/121\",\r\n \"2603:1030:104:1::180/121\",\r\n + \ \"2603:1030:107::180/121\",\r\n \"2603:1030:210:1::180/121\",\r\n + \ \"2603:1030:302::500/121\",\r\n \"2603:1030:40b:1::180/121\",\r\n + \ \"2603:1030:40c:1::180/121\",\r\n \"2603:1030:504:1::180/121\",\r\n + \ \"2603:1030:608::180/121\",\r\n \"2603:1030:807:1::180/121\",\r\n + \ \"2603:1030:a07::180/121\",\r\n \"2603:1030:b04::180/121\",\r\n + \ \"2603:1030:c06:1::180/121\",\r\n \"2603:1030:f05:1::180/121\",\r\n + \ \"2603:1030:1005::180/121\",\r\n \"2603:1040:5:1::180/121\",\r\n + \ \"2603:1040:207::180/121\",\r\n \"2603:1040:407:1::180/121\",\r\n + \ \"2603:1040:606::180/121\",\r\n \"2603:1040:806::180/121\",\r\n + \ \"2603:1040:904:1::180/121\",\r\n \"2603:1040:a06:1::180/121\",\r\n + \ \"2603:1040:b04::180/121\",\r\n \"2603:1040:c06::180/121\",\r\n + \ \"2603:1040:d04::180/121\",\r\n \"2603:1040:e05:1::/121\",\r\n + \ \"2603:1040:f05:1::180/121\",\r\n \"2603:1040:1002::380/121\",\r\n + \ \"2603:1040:1104::180/121\",\r\n \"2603:1050:6:1::180/121\",\r\n + \ \"2603:1050:403::180/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors\",\r\n \"id\": \"AzureConnectors\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.65.86.57/32\",\r\n \"13.66.140.128/28\",\r\n + \ \"13.66.145.96/27\",\r\n \"13.67.8.240/28\",\r\n \"13.67.15.32/27\",\r\n + \ \"13.69.64.208/28\",\r\n \"13.69.71.192/27\",\r\n \"13.69.227.208/28\",\r\n + \ \"13.69.231.192/27\",\r\n \"13.70.72.192/28\",\r\n \"13.70.78.224/27\",\r\n + \ \"13.70.136.174/32\",\r\n \"13.71.125.22/32\",\r\n \"13.71.127.26/32\",\r\n + \ \"13.71.153.19/32\",\r\n \"13.71.170.208/28\",\r\n \"13.71.175.160/27\",\r\n + \ \"13.71.195.32/28\",\r\n \"13.71.199.192/27\",\r\n \"13.72.243.10/32\",\r\n + \ \"13.73.21.230/32\",\r\n \"13.73.244.224/27\",\r\n \"13.75.36.64/28\",\r\n + \ \"13.75.110.131/32\",\r\n \"13.77.50.240/28\",\r\n \"13.77.55.160/27\",\r\n + \ \"13.78.108.0/28\",\r\n \"13.78.132.82/32\",\r\n \"13.86.223.32/27\",\r\n + \ \"13.87.56.224/28\",\r\n \"13.87.122.224/28\",\r\n \"13.89.171.80/28\",\r\n + \ \"13.89.178.64/27\",\r\n \"13.93.148.62/32\",\r\n \"20.21.43.0/26\",\r\n + \ \"20.36.107.0/28\",\r\n \"20.36.114.176/28\",\r\n \"20.36.117.160/27\",\r\n + \ \"20.37.74.192/28\",\r\n \"20.38.128.224/27\",\r\n \"20.43.123.0/27\",\r\n + \ \"20.44.3.0/28\",\r\n \"20.44.29.64/27\",\r\n \"20.45.90.208/28\",\r\n + \ \"20.45.90.224/27\",\r\n \"20.45.240.112/28\",\r\n \"20.45.241.128/27\",\r\n + \ \"20.47.232.80/28\",\r\n \"20.47.232.96/27\",\r\n \"20.48.200.192/27\",\r\n + \ \"20.48.200.224/28\",\r\n \"20.51.4.192/27\",\r\n \"20.51.4.224/28\",\r\n + \ \"20.52.93.80/28\",\r\n \"20.52.93.96/27\",\r\n \"20.53.0.0/27\",\r\n + \ \"20.53.52.64/27\",\r\n \"20.53.52.96/28\",\r\n \"20.53.60.16/28\",\r\n + \ \"20.53.60.32/27\",\r\n \"20.58.70.192/27\",\r\n \"20.58.70.224/28\",\r\n + \ \"20.59.77.0/27\",\r\n \"20.66.6.112/28\",\r\n \"20.69.4.0/27\",\r\n + \ \"20.69.4.32/28\",\r\n \"20.70.220.192/27\",\r\n \"20.70.220.224/28\",\r\n + \ \"20.72.27.0/26\",\r\n \"20.82.246.112/28\",\r\n \"20.83.220.208/28\",\r\n + \ \"20.83.220.224/27\",\r\n \"20.86.93.32/27\",\r\n \"20.86.93.64/28\",\r\n + \ \"20.88.66.32/27\",\r\n \"20.88.66.64/28\",\r\n \"20.88.153.176/28\",\r\n + \ \"20.88.153.192/27\",\r\n \"20.89.11.48/28\",\r\n \"20.89.11.64/27\",\r\n + \ \"20.90.129.0/27\",\r\n \"20.90.129.32/28\",\r\n \"20.92.3.64/27\",\r\n + \ \"20.92.3.96/28\",\r\n \"20.97.33.48/28\",\r\n \"20.97.33.64/27\",\r\n + \ \"20.98.144.224/27\",\r\n \"20.98.145.0/28\",\r\n \"20.98.192.80/28\",\r\n + \ \"20.98.192.96/27\",\r\n \"20.100.0.96/27\",\r\n \"20.100.0.128/28\",\r\n + \ \"20.150.129.176/28\",\r\n \"20.150.129.192/27\",\r\n \"20.150.170.240/28\",\r\n + \ \"20.150.173.64/26\",\r\n \"20.189.192.144/28\",\r\n \"20.189.192.160/27\",\r\n + \ \"20.192.32.64/26\",\r\n \"20.192.82.48/28\",\r\n \"20.192.82.64/27\",\r\n + \ \"20.192.152.64/27\",\r\n \"20.192.152.96/28\",\r\n \"20.192.168.64/27\",\r\n + \ \"20.192.168.96/28\",\r\n \"20.192.184.32/27\",\r\n \"20.193.206.192/26\",\r\n + \ \"20.195.82.240/28\",\r\n \"20.195.83.0/27\",\r\n \"20.200.194.160/27\",\r\n + \ \"20.200.194.192/28\",\r\n \"20.205.67.48/28\",\r\n \"20.205.67.64/27\",\r\n + \ \"20.206.0.0/26\",\r\n \"20.207.0.0/26\",\r\n \"23.100.208.0/27\",\r\n + \ \"40.64.8.48/28\",\r\n \"40.64.8.128/27\",\r\n \"40.67.58.240/28\",\r\n + \ \"40.67.60.224/27\",\r\n \"40.69.106.240/28\",\r\n \"40.69.111.0/27\",\r\n + \ \"40.70.146.208/28\",\r\n \"40.70.151.96/27\",\r\n \"40.71.11.80/28\",\r\n + \ \"40.71.15.160/27\",\r\n \"40.71.249.139/32\",\r\n \"40.71.249.205/32\",\r\n + \ \"40.74.100.224/28\",\r\n \"40.74.146.64/28\",\r\n \"40.78.194.240/28\",\r\n + \ \"40.78.202.96/28\",\r\n \"40.79.130.208/28\",\r\n \"40.79.148.96/27\",\r\n + \ \"40.79.178.240/28\",\r\n \"40.79.180.224/27\",\r\n \"40.79.189.64/27\",\r\n + \ \"40.80.180.64/27\",\r\n \"40.89.135.2/32\",\r\n \"40.91.208.65/32\",\r\n + \ \"40.112.195.87/32\",\r\n \"40.112.243.160/28\",\r\n \"40.114.40.132/32\",\r\n + \ \"40.120.8.0/27\",\r\n \"40.120.64.64/27\",\r\n \"40.120.86.16/28\",\r\n + \ \"40.120.86.32/27\",\r\n \"51.12.20.224/27\",\r\n \"51.12.22.128/28\",\r\n + \ \"51.12.29.112/28\",\r\n \"51.12.72.128/27\",\r\n \"51.12.98.240/28\",\r\n + \ \"51.12.102.0/26\",\r\n \"51.12.202.240/28\",\r\n \"51.12.205.192/26\",\r\n + \ \"51.13.139.160/27\",\r\n \"51.13.139.192/28\",\r\n \"51.103.142.22/32\",\r\n + \ \"51.105.77.96/27\",\r\n \"51.107.59.16/28\",\r\n \"51.107.60.224/27\",\r\n + \ \"51.107.86.217/32\",\r\n \"51.107.155.16/28\",\r\n \"51.107.156.224/27\",\r\n + \ \"51.107.246.112/28\",\r\n \"51.107.246.128/27\",\r\n \"51.107.254.32/27\",\r\n + \ \"51.107.254.64/28\",\r\n \"51.116.55.240/28\",\r\n \"51.116.59.16/28\",\r\n + \ \"51.116.60.192/27\",\r\n \"51.116.74.32/27\",\r\n \"51.116.155.80/28\",\r\n + \ \"51.116.158.96/27\",\r\n \"51.116.211.212/32\",\r\n \"51.116.236.78/32\",\r\n + \ \"51.120.98.224/28\",\r\n \"51.120.100.192/27\",\r\n \"51.120.218.240/28\",\r\n + \ \"51.120.220.192/27\",\r\n \"51.138.215.48/28\",\r\n \"51.138.215.64/27\",\r\n + \ \"51.140.61.124/32\",\r\n \"51.140.74.150/32\",\r\n \"51.140.80.51/32\",\r\n + \ \"51.140.148.0/28\",\r\n \"51.140.211.0/28\",\r\n \"51.140.212.224/27\",\r\n + \ \"51.141.47.105/32\",\r\n \"51.141.52.185/32\",\r\n \"51.141.124.13/32\",\r\n + \ \"52.136.133.184/32\",\r\n \"52.136.142.154/32\",\r\n \"52.136.189.16/28\",\r\n + \ \"52.136.189.32/27\",\r\n \"52.138.92.192/27\",\r\n \"52.139.111.0/27\",\r\n + \ \"52.139.111.32/28\",\r\n \"52.141.1.104/32\",\r\n \"52.141.36.214/32\",\r\n + \ \"52.146.138.32/27\",\r\n \"52.147.117.32/27\",\r\n \"52.147.117.64/28\",\r\n + \ \"52.161.101.204/32\",\r\n \"52.161.102.22/32\",\r\n \"52.162.107.160/28\",\r\n + \ \"52.162.111.192/27\",\r\n \"52.162.126.4/32\",\r\n \"52.162.242.161/32\",\r\n + \ \"52.171.130.92/32\",\r\n \"52.172.80.0/26\",\r\n \"52.172.211.12/32\",\r\n + \ \"52.172.212.129/32\",\r\n \"52.173.241.27/32\",\r\n \"52.173.245.164/32\",\r\n + \ \"52.174.88.118/32\",\r\n \"52.175.23.169/32\",\r\n \"52.178.150.68/32\",\r\n + \ \"52.183.78.157/32\",\r\n \"52.187.68.19/32\",\r\n \"52.225.129.144/32\",\r\n + \ \"52.231.18.208/28\",\r\n \"52.231.147.0/28\",\r\n \"52.231.148.224/27\",\r\n + \ \"52.231.163.10/32\",\r\n \"52.231.201.173/32\",\r\n \"52.232.188.154/32\",\r\n + \ \"52.237.24.126/32\",\r\n \"52.237.32.212/32\",\r\n \"52.237.214.72/32\",\r\n + \ \"52.242.30.112/32\",\r\n \"52.242.35.152/32\",\r\n \"52.255.48.202/32\",\r\n + \ \"65.52.250.208/28\",\r\n \"94.245.91.93/32\",\r\n \"102.37.64.0/27\",\r\n + \ \"102.37.84.128/27\",\r\n \"102.37.84.160/28\",\r\n \"102.37.166.80/28\",\r\n + \ \"102.37.166.96/27\",\r\n \"102.133.27.0/28\",\r\n \"102.133.72.85/32\",\r\n + \ \"102.133.155.0/28\",\r\n \"102.133.168.167/32\",\r\n \"102.133.253.0/27\",\r\n + \ \"104.41.59.51/32\",\r\n \"104.42.122.49/32\",\r\n \"104.209.247.23/32\",\r\n + \ \"104.211.81.192/28\",\r\n \"104.211.146.224/28\",\r\n + \ \"104.211.189.124/32\",\r\n \"104.211.189.218/32\",\r\n + \ \"104.214.19.48/28\",\r\n \"104.214.70.191/32\",\r\n \"104.214.164.0/27\",\r\n + \ \"104.214.165.128/26\",\r\n \"104.215.27.24/32\",\r\n \"104.215.61.248/32\",\r\n + \ \"168.61.140.0/27\",\r\n \"168.61.143.64/26\",\r\n \"191.232.191.157/32\",\r\n + \ \"191.233.51.0/26\",\r\n \"191.233.203.192/28\",\r\n \"191.233.207.160/27\",\r\n + \ \"191.238.76.112/28\",\r\n \"191.238.76.128/27\",\r\n \"2603:1000:4:402::180/122\",\r\n + \ \"2603:1000:104:402::180/122\",\r\n \"2603:1010:6:402::180/122\",\r\n + \ \"2603:1010:101:402::180/122\",\r\n \"2603:1010:304:402::180/122\",\r\n + \ \"2603:1010:404:402::180/122\",\r\n \"2603:1020:5:402::180/122\",\r\n + \ \"2603:1020:206:402::180/122\",\r\n \"2603:1020:305:402::180/122\",\r\n + \ \"2603:1020:405:402::180/122\",\r\n \"2603:1020:605:402::180/122\",\r\n + \ \"2603:1020:705:402::180/122\",\r\n \"2603:1020:805:402::180/122\",\r\n + \ \"2603:1020:905:402::180/122\",\r\n \"2603:1020:a04:402::180/122\",\r\n + \ \"2603:1020:b04:402::180/122\",\r\n \"2603:1020:c04:402::180/122\",\r\n + \ \"2603:1020:d04:402::180/122\",\r\n \"2603:1020:e04:402::180/122\",\r\n + \ \"2603:1020:f04:402::180/122\",\r\n \"2603:1020:1004:c02::80/122\",\r\n + \ \"2603:1020:1104:400::180/122\",\r\n \"2603:1030:f:400::980/122\",\r\n + \ \"2603:1030:10:402::180/122\",\r\n \"2603:1030:104:402::180/122\",\r\n + \ \"2603:1030:107:400::100/122\",\r\n \"2603:1030:210:402::180/122\",\r\n + \ \"2603:1030:40b:400::980/122\",\r\n \"2603:1030:40c:402::180/122\",\r\n + \ \"2603:1030:504:c02::80/122\",\r\n \"2603:1030:608:402::180/122\",\r\n + \ \"2603:1030:807:402::180/122\",\r\n \"2603:1030:a07:402::100/122\",\r\n + \ \"2603:1030:b04:402::180/122\",\r\n \"2603:1030:c06:400::980/122\",\r\n + \ \"2603:1030:f05:402::180/122\",\r\n \"2603:1030:1005:402::180/122\",\r\n + \ \"2603:1040:5:402::180/122\",\r\n \"2603:1040:207:402::180/122\",\r\n + \ \"2603:1040:407:402::180/122\",\r\n \"2603:1040:606:402::180/122\",\r\n + \ \"2603:1040:806:402::180/122\",\r\n \"2603:1040:904:402::180/122\",\r\n + \ \"2603:1040:a06:402::180/122\",\r\n \"2603:1040:b04:402::180/122\",\r\n + \ \"2603:1040:c06:402::180/122\",\r\n \"2603:1040:d04:c02::80/122\",\r\n + \ \"2603:1040:f05:402::180/122\",\r\n \"2603:1040:1002:400::c0/122\",\r\n + \ \"2603:1040:1104:400::180/122\",\r\n \"2603:1050:6:402::180/122\",\r\n + \ \"2603:1050:403:400::2c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.AustraliaCentral\",\r\n \"id\": + \"AzureConnectors.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.36.107.0/28\",\r\n + \ \"20.53.0.0/27\",\r\n \"20.53.52.64/27\",\r\n \"20.53.52.96/28\",\r\n + \ \"2603:1010:304:402::180/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.AustraliaCentral2\",\r\n \"id\": + \"AzureConnectors.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.36.114.176/28\",\r\n + \ \"20.36.117.160/27\",\r\n \"20.53.60.16/28\",\r\n \"20.53.60.32/27\",\r\n + \ \"2603:1010:404:402::180/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.AustraliaEast\",\r\n \"id\": + \"AzureConnectors.AustraliaEast\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.70.72.192/28\",\r\n \"13.70.78.224/27\",\r\n + \ \"13.72.243.10/32\",\r\n \"20.70.220.192/27\",\r\n \"20.70.220.224/28\",\r\n + \ \"52.237.214.72/32\",\r\n \"2603:1010:6:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.AustraliaSoutheast\",\r\n + \ \"id\": \"AzureConnectors.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.70.136.174/32\",\r\n + \ \"13.77.50.240/28\",\r\n \"13.77.55.160/27\",\r\n \"20.92.3.64/27\",\r\n + \ \"20.92.3.96/28\",\r\n \"52.255.48.202/32\",\r\n \"2603:1010:101:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.BrazilSouth\",\r\n + \ \"id\": \"AzureConnectors.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"104.41.59.51/32\",\r\n \"191.232.191.157/32\",\r\n + \ \"191.233.203.192/28\",\r\n \"191.233.207.160/27\",\r\n + \ \"191.238.76.112/28\",\r\n \"191.238.76.128/27\",\r\n \"2603:1050:6:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.BrazilSoutheast\",\r\n + \ \"id\": \"AzureConnectors.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.206.0.0/26\",\r\n \"191.233.51.0/26\",\r\n \"2603:1050:403:400::2c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CanadaCentral\",\r\n + \ \"id\": \"AzureConnectors.CanadaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.71.170.208/28\",\r\n \"13.71.175.160/27\",\r\n + \ \"20.48.200.192/27\",\r\n \"20.48.200.224/28\",\r\n \"52.237.24.126/32\",\r\n + \ \"52.237.32.212/32\",\r\n \"2603:1030:f05:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CanadaEast\",\r\n + \ \"id\": \"AzureConnectors.CanadaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"40.69.106.240/28\",\r\n \"40.69.111.0/27\",\r\n + \ \"52.139.111.0/27\",\r\n \"52.139.111.32/28\",\r\n \"52.242.30.112/32\",\r\n + \ \"52.242.35.152/32\",\r\n \"2603:1030:1005:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CentralIndia\",\r\n + \ \"id\": \"AzureConnectors.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.43.123.0/27\",\r\n \"20.192.168.64/27\",\r\n + \ \"20.192.168.96/28\",\r\n \"52.172.211.12/32\",\r\n \"52.172.212.129/32\",\r\n + \ \"104.211.81.192/28\",\r\n \"2603:1040:a06:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CentralUS\",\r\n + \ \"id\": \"AzureConnectors.CentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.89.171.80/28\",\r\n \"13.89.178.64/27\",\r\n + \ \"20.98.144.224/27\",\r\n \"20.98.145.0/28\",\r\n \"52.173.241.27/32\",\r\n + \ \"52.173.245.164/32\",\r\n \"2603:1030:10:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.CentralUSEUAP\",\r\n + \ \"id\": \"AzureConnectors.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.45.240.112/28\",\r\n \"20.45.241.128/27\",\r\n + \ \"40.78.202.96/28\",\r\n \"168.61.140.0/27\",\r\n \"168.61.143.64/26\",\r\n + \ \"2603:1030:f:400::980/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.EastAsia\",\r\n \"id\": \"AzureConnectors.EastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.75.36.64/28\",\r\n + \ \"13.75.110.131/32\",\r\n \"20.205.67.48/28\",\r\n \"20.205.67.64/27\",\r\n + \ \"52.175.23.169/32\",\r\n \"104.214.164.0/27\",\r\n \"104.214.165.128/26\",\r\n + \ \"2603:1040:207:402::180/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.EastUS\",\r\n \"id\": \"AzureConnectors.EastUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.88.153.176/28\",\r\n + \ \"20.88.153.192/27\",\r\n \"40.71.11.80/28\",\r\n \"40.71.15.160/27\",\r\n + \ \"40.71.249.139/32\",\r\n \"40.71.249.205/32\",\r\n \"40.114.40.132/32\",\r\n + \ \"2603:1030:210:402::180/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.EastUS2\",\r\n \"id\": \"AzureConnectors.EastUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.98.192.80/28\",\r\n + \ \"20.98.192.96/27\",\r\n \"40.70.146.208/28\",\r\n \"40.70.151.96/27\",\r\n + \ \"52.225.129.144/32\",\r\n \"52.232.188.154/32\",\r\n \"104.209.247.23/32\",\r\n + \ \"2603:1030:40c:402::180/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.EastUS2EUAP\",\r\n \"id\": + \"AzureConnectors.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.47.232.80/28\",\r\n \"20.47.232.96/27\",\r\n + \ \"40.74.146.64/28\",\r\n \"52.138.92.192/27\",\r\n \"2603:1030:40b:400::980/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.FranceCentral\",\r\n + \ \"id\": \"AzureConnectors.FranceCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"40.79.130.208/28\",\r\n \"40.79.148.96/27\",\r\n + \ \"40.89.135.2/32\",\r\n \"51.138.215.48/28\",\r\n \"51.138.215.64/27\",\r\n + \ \"2603:1020:805:402::180/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.FranceSouth\",\r\n \"id\": + \"AzureConnectors.FranceSouth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"40.79.178.240/28\",\r\n \"40.79.180.224/27\",\r\n + \ \"52.136.133.184/32\",\r\n \"52.136.142.154/32\",\r\n \"52.136.189.16/28\",\r\n + \ \"52.136.189.32/27\",\r\n \"2603:1020:905:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.GermanyNorth\",\r\n + \ \"id\": \"AzureConnectors.GermanyNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"51.116.55.240/28\",\r\n \"51.116.59.16/28\",\r\n + \ \"51.116.60.192/27\",\r\n \"51.116.74.32/27\",\r\n \"51.116.211.212/32\",\r\n + \ \"2603:1020:d04:402::180/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.GermanyWestCentral\",\r\n \"id\": + \"AzureConnectors.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.52.93.80/28\",\r\n \"20.52.93.96/27\",\r\n \"51.116.155.80/28\",\r\n + \ \"51.116.158.96/27\",\r\n \"51.116.236.78/32\",\r\n \"2603:1020:c04:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.JapanEast\",\r\n + \ \"id\": \"AzureConnectors.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.71.153.19/32\",\r\n \"13.73.21.230/32\",\r\n + \ \"13.78.108.0/28\",\r\n \"20.89.11.48/28\",\r\n \"20.89.11.64/27\",\r\n + \ \"40.79.189.64/27\",\r\n \"2603:1040:407:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.JapanWest\",\r\n + \ \"id\": \"AzureConnectors.JapanWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.189.192.144/28\",\r\n \"20.189.192.160/27\",\r\n + \ \"40.74.100.224/28\",\r\n \"40.80.180.64/27\",\r\n \"104.215.27.24/32\",\r\n + \ \"104.215.61.248/32\",\r\n \"2603:1040:606:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.JioIndiaCentral\",\r\n + \ \"id\": \"AzureConnectors.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.192.32.64/26\",\r\n + \ \"20.207.0.0/26\",\r\n \"2603:1040:1104:400::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.JioIndiaWest\",\r\n + \ \"id\": \"AzureConnectors.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.193.206.192/26\",\r\n \"40.64.8.48/28\",\r\n + \ \"40.64.8.128/27\",\r\n \"2603:1040:d04:c02::80/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.KoreaCentral\",\r\n + \ \"id\": \"AzureConnectors.KoreaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.44.29.64/27\",\r\n \"20.200.194.160/27\",\r\n + \ \"20.200.194.192/28\",\r\n \"52.141.1.104/32\",\r\n \"52.141.36.214/32\",\r\n + \ \"52.231.18.208/28\",\r\n \"2603:1040:f05:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.KoreaSouth\",\r\n + \ \"id\": \"AzureConnectors.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"52.147.117.32/27\",\r\n \"52.147.117.64/28\",\r\n + \ \"52.231.147.0/28\",\r\n \"52.231.148.224/27\",\r\n \"52.231.163.10/32\",\r\n + \ \"52.231.201.173/32\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureConnectors.NorthCentralUS\",\r\n \"id\": \"AzureConnectors.NorthCentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.51.4.192/27\",\r\n + \ \"20.51.4.224/28\",\r\n \"52.162.107.160/28\",\r\n \"52.162.111.192/27\",\r\n + \ \"52.162.126.4/32\",\r\n \"52.162.242.161/32\",\r\n \"2603:1030:608:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.NorthEurope\",\r\n + \ \"id\": \"AzureConnectors.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.69.227.208/28\",\r\n \"13.69.231.192/27\",\r\n + \ \"20.82.246.112/28\",\r\n \"52.146.138.32/27\",\r\n \"52.178.150.68/32\",\r\n + \ \"94.245.91.93/32\",\r\n \"2603:1020:5:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.NorwayEast\",\r\n + \ \"id\": \"AzureConnectors.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.100.0.96/27\",\r\n \"20.100.0.128/28\",\r\n \"51.120.98.224/28\",\r\n + \ \"51.120.100.192/27\",\r\n \"2603:1020:e04:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.NorwayWest\",\r\n + \ \"id\": \"AzureConnectors.NorwayWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"51.13.139.160/27\",\r\n \"51.13.139.192/28\",\r\n + \ \"51.120.218.240/28\",\r\n \"51.120.220.192/27\",\r\n \"2603:1020:f04:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SouthAfricaNorth\",\r\n + \ \"id\": \"AzureConnectors.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"102.37.166.80/28\",\r\n + \ \"102.37.166.96/27\",\r\n \"102.133.155.0/28\",\r\n \"102.133.168.167/32\",\r\n + \ \"102.133.253.0/27\",\r\n \"2603:1000:104:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SouthAfricaWest\",\r\n + \ \"id\": \"AzureConnectors.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"102.37.64.0/27\",\r\n + \ \"102.37.84.128/27\",\r\n \"102.37.84.160/28\",\r\n \"102.133.27.0/28\",\r\n + \ \"102.133.72.85/32\",\r\n \"2603:1000:4:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SouthCentralUS\",\r\n + \ \"id\": \"AzureConnectors.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"13.65.86.57/32\",\r\n + \ \"13.73.244.224/27\",\r\n \"20.97.33.48/28\",\r\n \"20.97.33.64/27\",\r\n + \ \"52.171.130.92/32\",\r\n \"104.214.19.48/28\",\r\n \"104.214.70.191/32\",\r\n + \ \"2603:1030:807:402::180/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.SouthCentralUSSTG\",\r\n \"id\": + \"AzureConnectors.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.44.3.0/28\",\r\n \"23.100.208.0/27\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SoutheastAsia\",\r\n + \ \"id\": \"AzureConnectors.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.67.8.240/28\",\r\n \"13.67.15.32/27\",\r\n \"20.195.82.240/28\",\r\n + \ \"20.195.83.0/27\",\r\n \"52.187.68.19/32\",\r\n \"2603:1040:5:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SouthIndia\",\r\n + \ \"id\": \"AzureConnectors.SouthIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.71.125.22/32\",\r\n \"13.71.127.26/32\",\r\n + \ \"20.192.152.64/27\",\r\n \"20.192.152.96/28\",\r\n \"20.192.184.32/27\",\r\n + \ \"40.78.194.240/28\",\r\n \"52.172.80.0/26\",\r\n \"2603:1040:c06:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SwedenCentral\",\r\n + \ \"id\": \"AzureConnectors.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"51.12.29.112/28\",\r\n \"51.12.72.128/27\",\r\n + \ \"51.12.98.240/28\",\r\n \"51.12.102.0/26\",\r\n \"2603:1020:1004:c02::80/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SwitzerlandNorth\",\r\n + \ \"id\": \"AzureConnectors.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"51.103.142.22/32\",\r\n \"51.107.59.16/28\",\r\n + \ \"51.107.60.224/27\",\r\n \"51.107.86.217/32\",\r\n \"51.107.246.112/28\",\r\n + \ \"51.107.246.128/27\",\r\n \"2603:1020:a04:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.SwitzerlandWest\",\r\n + \ \"id\": \"AzureConnectors.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"51.107.155.16/28\",\r\n \"51.107.156.224/27\",\r\n + \ \"51.107.254.32/27\",\r\n \"51.107.254.64/28\",\r\n \"2603:1020:b04:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.UAECentral\",\r\n + \ \"id\": \"AzureConnectors.UAECentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.37.74.192/28\",\r\n \"20.45.90.208/28\",\r\n + \ \"20.45.90.224/27\",\r\n \"40.120.8.0/27\",\r\n \"2603:1040:b04:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.UAENorth\",\r\n + \ \"id\": \"AzureConnectors.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"40.120.64.64/27\",\r\n \"40.120.86.16/28\",\r\n + \ \"40.120.86.32/27\",\r\n \"65.52.250.208/28\",\r\n \"2603:1040:904:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.UKSouth\",\r\n + \ \"id\": \"AzureConnectors.UKSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.90.129.0/27\",\r\n \"20.90.129.32/28\",\r\n \"51.105.77.96/27\",\r\n + \ \"51.140.61.124/32\",\r\n \"51.140.74.150/32\",\r\n \"51.140.80.51/32\",\r\n + \ \"51.140.148.0/28\",\r\n \"2603:1020:705:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.UKWest\",\r\n + \ \"id\": \"AzureConnectors.UKWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.58.70.192/27\",\r\n \"20.58.70.224/28\",\r\n + \ \"51.140.211.0/28\",\r\n \"51.140.212.224/27\",\r\n \"51.141.47.105/32\",\r\n + \ \"51.141.52.185/32\",\r\n \"51.141.124.13/32\",\r\n \"2603:1020:605:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.WestCentralUS\",\r\n + \ \"id\": \"AzureConnectors.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.71.195.32/28\",\r\n \"13.71.199.192/27\",\r\n + \ \"13.78.132.82/32\",\r\n \"20.69.4.0/27\",\r\n \"20.69.4.32/28\",\r\n + \ \"52.161.101.204/32\",\r\n \"52.161.102.22/32\",\r\n \"2603:1030:b04:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.WestEurope\",\r\n + \ \"id\": \"AzureConnectors.WestEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.69.64.208/28\",\r\n \"13.69.71.192/27\",\r\n + \ \"20.86.93.32/27\",\r\n \"20.86.93.64/28\",\r\n \"40.91.208.65/32\",\r\n + \ \"52.174.88.118/32\",\r\n \"2603:1020:206:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.WestIndia\",\r\n + \ \"id\": \"AzureConnectors.WestIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"20.38.128.224/27\",\r\n \"20.192.82.48/28\",\r\n + \ \"20.192.82.64/27\",\r\n \"104.211.146.224/28\",\r\n \"104.211.189.124/32\",\r\n + \ \"104.211.189.218/32\",\r\n \"2603:1040:806:402::180/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.WestUS\",\r\n + \ \"id\": \"AzureConnectors.WestUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.86.223.32/27\",\r\n \"13.93.148.62/32\",\r\n + \ \"20.59.77.0/27\",\r\n \"20.66.6.112/28\",\r\n \"40.112.195.87/32\",\r\n + \ \"40.112.243.160/28\",\r\n \"104.42.122.49/32\",\r\n \"2603:1030:a07:402::100/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureConnectors.WestUS2\",\r\n + \ \"id\": \"AzureConnectors.WestUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureConnectors\",\r\n \"addressPrefixes\": + [\r\n \"13.66.140.128/28\",\r\n \"13.66.145.96/27\",\r\n + \ \"20.83.220.208/28\",\r\n \"20.83.220.224/27\",\r\n \"52.183.78.157/32\",\r\n + \ \"2603:1030:c06:400::980/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureConnectors.WestUS3\",\r\n \"id\": \"AzureConnectors.WestUS3\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureConnectors\",\r\n \"addressPrefixes\": [\r\n \"20.150.129.176/28\",\r\n + \ \"20.150.129.192/27\",\r\n \"20.150.170.240/28\",\r\n \"20.150.173.64/26\",\r\n + \ \"2603:1030:504:c02::80/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry\",\r\n \"id\": \"AzureContainerRegistry\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"9\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n + \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.66.140.72/29\",\r\n \"13.66.146.0/24\",\r\n + \ \"13.66.147.0/25\",\r\n \"13.66.148.0/24\",\r\n \"13.67.8.120/29\",\r\n + \ \"13.67.14.0/24\",\r\n \"13.69.64.88/29\",\r\n \"13.69.106.80/29\",\r\n + \ \"13.69.110.0/24\",\r\n \"13.69.112.192/26\",\r\n \"13.69.227.88/29\",\r\n + \ \"13.69.236.0/23\",\r\n \"13.69.238.0/24\",\r\n \"13.70.72.136/29\",\r\n + \ \"13.70.78.0/25\",\r\n \"13.70.114.192/26\",\r\n \"13.71.170.56/29\",\r\n + \ \"13.71.176.0/24\",\r\n \"13.71.194.224/29\",\r\n \"13.73.245.64/26\",\r\n + \ \"13.73.245.128/25\",\r\n \"13.73.255.64/26\",\r\n \"13.74.107.80/29\",\r\n + \ \"13.74.110.0/24\",\r\n \"13.75.36.0/29\",\r\n \"13.77.50.80/29\",\r\n + \ \"13.78.106.200/29\",\r\n \"13.78.111.0/25\",\r\n \"13.87.56.96/29\",\r\n + \ \"13.87.122.96/29\",\r\n \"13.89.170.216/29\",\r\n \"13.89.175.0/25\",\r\n + \ \"13.89.178.192/26\",\r\n \"20.21.36.0/26\",\r\n \"20.21.42.128/26\",\r\n + \ \"20.21.44.128/25\",\r\n \"20.21.46.192/26\",\r\n \"20.21.66.128/26\",\r\n + \ \"20.21.69.0/25\",\r\n \"20.21.74.128/26\",\r\n \"20.21.77.0/25\",\r\n + \ \"20.37.69.0/26\",\r\n \"20.37.74.72/29\",\r\n \"20.38.132.192/26\",\r\n + \ \"20.38.140.192/26\",\r\n \"20.38.146.144/29\",\r\n \"20.38.149.0/25\",\r\n + \ \"20.39.15.128/25\",\r\n \"20.40.224.64/26\",\r\n \"20.41.69.128/26\",\r\n + \ \"20.41.199.192/26\",\r\n \"20.41.208.64/26\",\r\n \"20.42.66.0/23\",\r\n + \ \"20.42.74.64/26\",\r\n \"20.43.46.64/26\",\r\n \"20.43.121.128/26\",\r\n + \ \"20.43.123.64/26\",\r\n \"20.43.127.0/25\",\r\n \"20.44.2.24/29\",\r\n + \ \"20.44.11.0/25\",\r\n \"20.44.11.128/26\",\r\n \"20.44.12.0/25\",\r\n + \ \"20.44.19.64/26\",\r\n \"20.44.22.0/23\",\r\n \"20.44.26.144/29\",\r\n + \ \"20.44.29.128/25\",\r\n \"20.45.122.144/29\",\r\n \"20.45.125.0/25\",\r\n + \ \"20.45.199.128/25\",\r\n \"20.48.192.128/26\",\r\n \"20.49.82.16/29\",\r\n + \ \"20.49.84.64/26\",\r\n \"20.49.86.0/25\",\r\n \"20.49.90.16/29\",\r\n + \ \"20.49.92.0/24\",\r\n \"20.49.93.0/26\",\r\n \"20.49.102.128/26\",\r\n + \ \"20.49.115.0/26\",\r\n \"20.49.127.0/26\",\r\n \"20.50.72.128/26\",\r\n + \ \"20.50.200.0/24\",\r\n \"20.52.72.128/26\",\r\n \"20.52.88.64/26\",\r\n + \ \"20.53.0.192/26\",\r\n \"20.53.1.0/26\",\r\n \"20.53.41.128/26\",\r\n + \ \"20.61.97.128/25\",\r\n \"20.62.128.0/26\",\r\n \"20.65.0.0/24\",\r\n + \ \"20.72.18.128/26\",\r\n \"20.72.26.128/26\",\r\n \"20.72.30.0/25\",\r\n + \ \"20.83.192.64/26\",\r\n \"20.89.0.192/26\",\r\n \"20.99.8.192/26\",\r\n + \ \"20.135.26.64/26\",\r\n \"20.150.170.24/29\",\r\n \"20.150.173.128/26\",\r\n + \ \"20.150.174.0/25\",\r\n \"20.150.175.128/26\",\r\n \"20.150.178.144/29\",\r\n + \ \"20.150.181.192/26\",\r\n \"20.150.182.128/25\",\r\n \"20.150.186.144/29\",\r\n + \ \"20.150.189.192/26\",\r\n \"20.150.190.128/25\",\r\n \"20.150.225.64/26\",\r\n + \ \"20.150.241.0/26\",\r\n \"20.187.196.64/26\",\r\n \"20.189.169.0/24\",\r\n + \ \"20.189.171.128/25\",\r\n \"20.189.224.0/26\",\r\n \"20.191.160.128/26\",\r\n + \ \"20.192.32.0/26\",\r\n \"20.192.33.0/26\",\r\n \"20.192.33.128/25\",\r\n + \ \"20.192.50.0/26\",\r\n \"20.192.98.144/29\",\r\n \"20.192.101.64/26\",\r\n + \ \"20.192.101.128/26\",\r\n \"20.192.234.24/29\",\r\n \"20.192.236.0/26\",\r\n + \ \"20.193.96.64/26\",\r\n \"20.193.96.128/26\",\r\n \"20.193.160.64/26\",\r\n + \ \"20.193.192.128/26\",\r\n \"20.193.202.16/29\",\r\n \"20.193.204.128/26\",\r\n + \ \"20.193.205.0/25\",\r\n \"20.193.206.64/26\",\r\n \"20.194.66.16/29\",\r\n + \ \"20.194.68.0/25\",\r\n \"20.194.70.0/25\",\r\n \"20.194.80.128/26\",\r\n + \ \"20.194.81.0/25\",\r\n \"20.194.81.128/26\",\r\n \"20.194.128.0/25\",\r\n + \ \"20.195.64.128/26\",\r\n \"20.195.136.0/24\",\r\n \"20.195.137.0/25\",\r\n + \ \"20.195.152.192/26\",\r\n \"20.195.153.128/25\",\r\n \"20.205.74.128/26\",\r\n + \ \"20.205.77.0/25\",\r\n \"20.205.82.128/26\",\r\n \"20.205.85.0/25\",\r\n + \ \"20.208.18.128/26\",\r\n \"20.208.21.0/25\",\r\n \"23.98.82.112/29\",\r\n + \ \"23.98.86.128/25\",\r\n \"23.98.87.0/25\",\r\n \"23.98.112.0/25\",\r\n + \ \"40.64.112.0/24\",\r\n \"40.64.113.128/26\",\r\n \"40.64.135.128/25\",\r\n + \ \"40.67.58.24/29\",\r\n \"40.67.121.0/25\",\r\n \"40.67.122.128/26\",\r\n + \ \"40.69.106.80/29\",\r\n \"40.69.110.0/25\",\r\n \"40.69.116.0/26\",\r\n + \ \"40.70.146.88/29\",\r\n \"40.70.150.0/24\",\r\n \"40.71.10.216/29\",\r\n + \ \"40.74.100.160/29\",\r\n \"40.74.146.48/29\",\r\n \"40.74.149.128/25\",\r\n + \ \"40.74.151.64/26\",\r\n \"40.75.34.32/29\",\r\n \"40.78.194.80/29\",\r\n + \ \"40.78.196.192/26\",\r\n \"40.78.202.72/29\",\r\n \"40.78.226.208/29\",\r\n + \ \"40.78.231.0/24\",\r\n \"40.78.234.48/29\",\r\n \"40.78.239.128/25\",\r\n + \ \"40.78.242.160/29\",\r\n \"40.78.246.0/24\",\r\n \"40.78.250.96/29\",\r\n + \ \"40.79.130.56/29\",\r\n \"40.79.132.192/26\",\r\n \"40.79.138.32/29\",\r\n + \ \"40.79.141.0/25\",\r\n \"40.79.143.128/25\",\r\n \"40.79.146.32/29\",\r\n + \ \"40.79.148.128/25\",\r\n \"40.79.150.128/25\",\r\n \"40.79.154.104/29\",\r\n + \ \"40.79.162.32/29\",\r\n \"40.79.165.128/25\",\r\n \"40.79.166.0/25\",\r\n + \ \"40.79.170.0/29\",\r\n \"40.79.173.128/25\",\r\n \"40.79.174.0/25\",\r\n + \ \"40.79.178.80/29\",\r\n \"40.79.186.8/29\",\r\n \"40.79.189.128/25\",\r\n + \ \"40.79.190.0/25\",\r\n \"40.79.194.96/29\",\r\n \"40.79.197.128/25\",\r\n + \ \"40.80.50.144/29\",\r\n \"40.80.51.192/26\",\r\n \"40.80.53.64/26\",\r\n + \ \"40.80.54.128/25\",\r\n \"40.80.176.128/25\",\r\n \"40.80.181.0/26\",\r\n + \ \"40.89.23.64/26\",\r\n \"40.89.120.0/24\",\r\n \"40.89.121.0/25\",\r\n + \ \"40.112.242.160/29\",\r\n \"40.120.8.64/26\",\r\n \"40.120.9.0/26\",\r\n + \ \"40.120.66.0/25\",\r\n \"40.120.74.16/29\",\r\n \"40.120.77.0/25\",\r\n + \ \"40.124.64.0/25\",\r\n \"51.11.97.128/26\",\r\n \"51.11.193.0/26\",\r\n + \ \"51.11.193.128/25\",\r\n \"51.12.25.64/26\",\r\n \"51.12.32.0/25\",\r\n + \ \"51.12.32.128/26\",\r\n \"51.12.98.24/29\",\r\n \"51.12.100.192/26\",\r\n + \ \"51.12.101.0/26\",\r\n \"51.12.168.128/26\",\r\n \"51.12.199.192/26\",\r\n + \ \"51.12.202.24/29\",\r\n \"51.12.205.128/26\",\r\n \"51.12.206.128/25\",\r\n + \ \"51.12.226.144/29\",\r\n \"51.12.229.128/26\",\r\n \"51.12.230.0/25\",\r\n + \ \"51.12.234.144/29\",\r\n \"51.12.237.128/26\",\r\n \"51.12.238.0/25\",\r\n + \ \"51.13.0.0/25\",\r\n \"51.13.1.64/26\",\r\n \"51.13.128.128/25\",\r\n + \ \"51.13.129.0/26\",\r\n \"51.103.202.128/26\",\r\n \"51.103.205.0/25\",\r\n + \ \"51.104.9.128/25\",\r\n \"51.105.66.144/29\",\r\n \"51.105.69.128/25\",\r\n + \ \"51.105.70.0/25\",\r\n \"51.105.74.144/29\",\r\n \"51.105.77.128/25\",\r\n + \ \"51.107.53.64/26\",\r\n \"51.107.56.192/26\",\r\n \"51.107.58.24/29\",\r\n + \ \"51.107.148.128/26\",\r\n \"51.107.152.192/26\",\r\n \"51.107.154.24/29\",\r\n + \ \"51.107.192.0/26\",\r\n \"51.116.58.24/29\",\r\n \"51.116.154.88/29\",\r\n + \ \"51.116.158.128/25\",\r\n \"51.116.242.144/29\",\r\n \"51.116.250.144/29\",\r\n + \ \"51.116.254.64/26\",\r\n \"51.116.254.128/25\",\r\n \"51.120.98.160/29\",\r\n + \ \"51.120.106.144/29\",\r\n \"51.120.109.128/26\",\r\n \"51.120.110.0/25\",\r\n + \ \"51.120.210.144/29\",\r\n \"51.120.213.128/25\",\r\n \"51.120.214.0/26\",\r\n + \ \"51.120.218.24/29\",\r\n \"51.120.234.0/26\",\r\n \"51.132.192.0/25\",\r\n + \ \"51.137.166.192/26\",\r\n \"51.138.160.128/26\",\r\n \"51.140.146.200/29\",\r\n + \ \"51.140.151.64/26\",\r\n \"51.140.210.192/29\",\r\n \"51.140.215.0/25\",\r\n + \ \"51.143.208.0/26\",\r\n \"52.138.90.32/29\",\r\n \"52.138.93.0/24\",\r\n + \ \"52.138.226.80/29\",\r\n \"52.138.230.0/23\",\r\n \"52.140.110.192/26\",\r\n + \ \"52.146.131.128/26\",\r\n \"52.147.97.128/25\",\r\n \"52.150.156.64/26\",\r\n + \ \"52.162.104.192/26\",\r\n \"52.162.106.160/29\",\r\n \"52.167.106.80/29\",\r\n + \ \"52.167.110.0/24\",\r\n \"52.167.111.0/26\",\r\n \"52.168.112.192/26\",\r\n + \ \"52.168.114.0/23\",\r\n \"52.178.18.0/23\",\r\n \"52.178.20.0/24\",\r\n + \ \"52.182.138.208/29\",\r\n \"52.182.142.0/24\",\r\n \"52.231.18.56/29\",\r\n + \ \"52.231.20.128/26\",\r\n \"52.231.146.192/29\",\r\n \"52.236.186.80/29\",\r\n + \ \"52.236.191.0/24\",\r\n \"52.240.241.128/25\",\r\n \"52.240.244.0/25\",\r\n + \ \"52.246.154.144/29\",\r\n \"52.246.157.128/25\",\r\n \"52.246.158.0/25\",\r\n + \ \"65.52.248.192/26\",\r\n \"65.52.250.16/29\",\r\n \"102.37.65.64/26\",\r\n + \ \"102.37.72.128/26\",\r\n \"102.133.26.24/29\",\r\n \"102.133.122.144/29\",\r\n + \ \"102.133.124.192/26\",\r\n \"102.133.126.0/26\",\r\n \"102.133.154.24/29\",\r\n + \ \"102.133.156.192/26\",\r\n \"102.133.220.64/26\",\r\n + \ \"102.133.250.144/29\",\r\n \"102.133.253.64/26\",\r\n + \ \"102.133.253.128/26\",\r\n \"104.46.161.128/25\",\r\n + \ \"104.46.162.128/26\",\r\n \"104.46.177.128/26\",\r\n \"104.208.16.80/29\",\r\n + \ \"104.208.144.80/29\",\r\n \"104.211.81.136/29\",\r\n \"104.211.146.80/29\",\r\n + \ \"104.214.18.184/29\",\r\n \"104.214.161.128/25\",\r\n + \ \"104.214.165.0/26\",\r\n \"168.61.140.128/25\",\r\n \"168.61.141.0/24\",\r\n + \ \"168.61.142.192/26\",\r\n \"191.233.50.16/29\",\r\n \"191.233.54.64/26\",\r\n + \ \"191.233.54.128/26\",\r\n \"191.233.203.136/29\",\r\n + \ \"191.233.205.192/26\",\r\n \"191.234.139.0/26\",\r\n \"191.234.146.144/29\",\r\n + \ \"191.234.149.64/26\",\r\n \"191.234.150.0/26\",\r\n \"191.234.151.0/25\",\r\n + \ \"191.234.154.144/29\",\r\n \"191.234.157.192/26\",\r\n + \ \"2603:1000:4:402::90/125\",\r\n \"2603:1000:4:402::340/122\",\r\n + \ \"2603:1000:4:402::580/122\",\r\n \"2603:1000:104:402::90/125\",\r\n + \ \"2603:1000:104:402::340/122\",\r\n \"2603:1000:104:402::580/121\",\r\n + \ \"2603:1000:104:802::90/125\",\r\n \"2603:1000:104:802::2c0/122\",\r\n + \ \"2603:1000:104:802::400/121\",\r\n \"2603:1000:104:c02::90/125\",\r\n + \ \"2603:1000:104:c02::400/121\",\r\n \"2603:1010:6:402::90/125\",\r\n + \ \"2603:1010:6:402::340/122\",\r\n \"2603:1010:6:402::580/121\",\r\n + \ \"2603:1010:6:802::90/125\",\r\n \"2603:1010:6:802::2c0/122\",\r\n + \ \"2603:1010:6:802::400/121\",\r\n \"2603:1010:6:c02::90/125\",\r\n + \ \"2603:1010:6:c02::400/121\",\r\n \"2603:1010:101:402::90/125\",\r\n + \ \"2603:1010:101:402::340/122\",\r\n \"2603:1010:101:402::580/122\",\r\n + \ \"2603:1010:304:402::90/125\",\r\n \"2603:1010:304:402::340/122\",\r\n + \ \"2603:1010:304:402::580/122\",\r\n \"2603:1010:404:402::90/125\",\r\n + \ \"2603:1010:404:402::340/122\",\r\n \"2603:1010:404:402::580/122\",\r\n + \ \"2603:1020:5:402::90/125\",\r\n \"2603:1020:5:402::340/122\",\r\n + \ \"2603:1020:5:402::580/121\",\r\n \"2603:1020:5:802::90/125\",\r\n + \ \"2603:1020:5:802::2c0/122\",\r\n \"2603:1020:5:802::400/121\",\r\n + \ \"2603:1020:5:c02::90/125\",\r\n \"2603:1020:5:c02::400/121\",\r\n + \ \"2603:1020:206:402::90/125\",\r\n \"2603:1020:206:402::340/122\",\r\n + \ \"2603:1020:206:402::580/121\",\r\n \"2603:1020:206:802::90/125\",\r\n + \ \"2603:1020:206:802::2c0/122\",\r\n \"2603:1020:206:802::400/121\",\r\n + \ \"2603:1020:206:c02::90/125\",\r\n \"2603:1020:206:c02::400/121\",\r\n + \ \"2603:1020:305:402::90/125\",\r\n \"2603:1020:305:402::340/122\",\r\n + \ \"2603:1020:405:402::90/125\",\r\n \"2603:1020:405:402::340/122\",\r\n + \ \"2603:1020:605:402::90/125\",\r\n \"2603:1020:605:402::340/122\",\r\n + \ \"2603:1020:605:402::580/122\",\r\n \"2603:1020:705:402::90/125\",\r\n + \ \"2603:1020:705:402::340/122\",\r\n \"2603:1020:705:402::580/121\",\r\n + \ \"2603:1020:705:802::90/125\",\r\n \"2603:1020:705:802::2c0/122\",\r\n + \ \"2603:1020:705:802::400/121\",\r\n \"2603:1020:705:c02::90/125\",\r\n + \ \"2603:1020:705:c02::400/121\",\r\n \"2603:1020:805:402::90/125\",\r\n + \ \"2603:1020:805:402::340/122\",\r\n \"2603:1020:805:402::580/121\",\r\n + \ \"2603:1020:805:802::90/125\",\r\n \"2603:1020:805:802::2c0/122\",\r\n + \ \"2603:1020:805:802::400/121\",\r\n \"2603:1020:805:c02::90/125\",\r\n + \ \"2603:1020:805:c02::400/121\",\r\n \"2603:1020:905:402::90/125\",\r\n + \ \"2603:1020:905:402::340/122\",\r\n \"2603:1020:905:402::580/122\",\r\n + \ \"2603:1020:a04::348/125\",\r\n \"2603:1020:a04:402::90/125\",\r\n + \ \"2603:1020:a04:402::340/122\",\r\n \"2603:1020:a04:402::580/121\",\r\n + \ \"2603:1020:a04:802::90/125\",\r\n \"2603:1020:a04:802::2c0/122\",\r\n + \ \"2603:1020:a04:802::400/121\",\r\n \"2603:1020:a04:c02::90/125\",\r\n + \ \"2603:1020:a04:c02::400/121\",\r\n \"2603:1020:b04:402::90/125\",\r\n + \ \"2603:1020:b04:402::340/122\",\r\n \"2603:1020:b04:402::580/122\",\r\n + \ \"2603:1020:c04:402::90/125\",\r\n \"2603:1020:c04:402::340/122\",\r\n + \ \"2603:1020:c04:402::580/121\",\r\n \"2603:1020:c04:802::90/125\",\r\n + \ \"2603:1020:c04:802::2c0/122\",\r\n \"2603:1020:c04:802::400/121\",\r\n + \ \"2603:1020:c04:c02::90/125\",\r\n \"2603:1020:c04:c02::400/121\",\r\n + \ \"2603:1020:d04:402::90/125\",\r\n \"2603:1020:d04:402::340/122\",\r\n + \ \"2603:1020:d04:402::580/122\",\r\n \"2603:1020:e04::348/125\",\r\n + \ \"2603:1020:e04:402::90/125\",\r\n \"2603:1020:e04:402::340/122\",\r\n + \ \"2603:1020:e04:402::580/121\",\r\n \"2603:1020:e04:402::600/120\",\r\n + \ \"2603:1020:e04:802::90/125\",\r\n \"2603:1020:e04:802::2c0/122\",\r\n + \ \"2603:1020:e04:802::400/121\",\r\n \"2603:1020:e04:c02::90/125\",\r\n + \ \"2603:1020:e04:c02::400/121\",\r\n \"2603:1020:f04:402::90/125\",\r\n + \ \"2603:1020:f04:402::340/122\",\r\n \"2603:1020:f04:402::580/122\",\r\n + \ \"2603:1020:1004:1::1a0/125\",\r\n \"2603:1020:1004:400::90/125\",\r\n + \ \"2603:1020:1004:400::3b8/125\",\r\n \"2603:1020:1004:400::4c0/122\",\r\n + \ \"2603:1020:1004:400::500/121\",\r\n \"2603:1020:1004:800::150/125\",\r\n + \ \"2603:1020:1004:800::180/121\",\r\n \"2603:1020:1004:800::280/121\",\r\n + \ \"2603:1020:1004:c02::1b0/125\",\r\n \"2603:1020:1004:c02::300/121\",\r\n + \ \"2603:1020:1104::5a0/125\",\r\n \"2603:1020:1104:400::90/125\",\r\n + \ \"2603:1020:1104:400::380/121\",\r\n \"2603:1020:1104:400::540/122\",\r\n + \ \"2603:1030:f:1::2a8/125\",\r\n \"2603:1030:f:400::890/125\",\r\n + \ \"2603:1030:f:400::b40/122\",\r\n \"2603:1030:f:400::d80/122\",\r\n + \ \"2603:1030:f:400::e00/121\",\r\n \"2603:1030:10:402::90/125\",\r\n + \ \"2603:1030:10:402::340/122\",\r\n \"2603:1030:10:402::580/121\",\r\n + \ \"2603:1030:10:802::90/125\",\r\n \"2603:1030:10:802::2c0/122\",\r\n + \ \"2603:1030:10:802::400/121\",\r\n \"2603:1030:10:c02::90/125\",\r\n + \ \"2603:1030:10:c02::400/121\",\r\n \"2603:1030:104::348/125\",\r\n + \ \"2603:1030:104:402::90/125\",\r\n \"2603:1030:104:402::168/125\",\r\n + \ \"2603:1030:104:402::340/122\",\r\n \"2603:1030:104:402::580/122\",\r\n + \ \"2603:1030:104:402::780/121\",\r\n \"2603:1030:104:802::58/125\",\r\n + \ \"2603:1030:104:802::200/121\",\r\n \"2603:1030:107::580/125\",\r\n + \ \"2603:1030:107:400::18/125\",\r\n \"2603:1030:107:400::300/121\",\r\n + \ \"2603:1030:107:400::500/122\",\r\n \"2603:1030:210:402::90/125\",\r\n + \ \"2603:1030:210:402::340/122\",\r\n \"2603:1030:210:402::580/121\",\r\n + \ \"2603:1030:210:802::90/125\",\r\n \"2603:1030:210:802::2c0/122\",\r\n + \ \"2603:1030:210:802::400/121\",\r\n \"2603:1030:210:c02::90/125\",\r\n + \ \"2603:1030:210:c02::400/121\",\r\n \"2603:1030:302:402::c0/122\",\r\n + \ \"2603:1030:40b:400::890/125\",\r\n \"2603:1030:40b:400::b40/122\",\r\n + \ \"2603:1030:40b:800::90/125\",\r\n \"2603:1030:40b:800::2c0/122\",\r\n + \ \"2603:1030:40b:c00::90/125\",\r\n \"2603:1030:40b:c00::400/121\",\r\n + \ \"2603:1030:40c:402::90/125\",\r\n \"2603:1030:40c:402::340/122\",\r\n + \ \"2603:1030:40c:402::580/121\",\r\n \"2603:1030:40c:802::90/125\",\r\n + \ \"2603:1030:40c:802::2c0/122\",\r\n \"2603:1030:40c:802::400/121\",\r\n + \ \"2603:1030:40c:c02::90/125\",\r\n \"2603:1030:504::1a0/125\",\r\n + \ \"2603:1030:504:402::90/125\",\r\n \"2603:1030:504:402::3b8/125\",\r\n + \ \"2603:1030:504:402::480/121\",\r\n \"2603:1030:504:802::c0/125\",\r\n + \ \"2603:1030:504:802::150/125\",\r\n \"2603:1030:504:802::180/121\",\r\n + \ \"2603:1030:504:c02::140/122\",\r\n \"2603:1030:504:c02::300/121\",\r\n + \ \"2603:1030:504:c02::400/125\",\r\n \"2603:1030:608::2a8/125\",\r\n + \ \"2603:1030:608:402::90/125\",\r\n \"2603:1030:608:402::340/122\",\r\n + \ \"2603:1030:608:402::580/122\",\r\n \"2603:1030:608:402::600/121\",\r\n + \ \"2603:1030:807:402::90/125\",\r\n \"2603:1030:807:402::340/122\",\r\n + \ \"2603:1030:807:402::580/121\",\r\n \"2603:1030:807:802::90/125\",\r\n + \ \"2603:1030:807:802::2c0/122\",\r\n \"2603:1030:807:802::400/121\",\r\n + \ \"2603:1030:807:c02::90/125\",\r\n \"2603:1030:807:c02::400/121\",\r\n + \ \"2603:1030:a07:402::90/125\",\r\n \"2603:1030:a07:402::9c0/122\",\r\n + \ \"2603:1030:a07:402::a00/122\",\r\n \"2603:1030:b04:402::90/125\",\r\n + \ \"2603:1030:b04:402::340/122\",\r\n \"2603:1030:b04:402::580/122\",\r\n + \ \"2603:1030:c06:400::890/125\",\r\n \"2603:1030:c06:400::b40/122\",\r\n + \ \"2603:1030:c06:802::90/125\",\r\n \"2603:1030:c06:802::2c0/122\",\r\n + \ \"2603:1030:c06:c02::90/125\",\r\n \"2603:1030:c06:c02::400/121\",\r\n + \ \"2603:1030:f05:402::90/125\",\r\n \"2603:1030:f05:402::340/122\",\r\n + \ \"2603:1030:f05:402::580/121\",\r\n \"2603:1030:f05:802::90/125\",\r\n + \ \"2603:1030:f05:802::2c0/122\",\r\n \"2603:1030:f05:802::400/121\",\r\n + \ \"2603:1030:f05:c02::90/125\",\r\n \"2603:1030:f05:c02::400/121\",\r\n + \ \"2603:1030:1005:402::90/125\",\r\n \"2603:1030:1005:402::340/122\",\r\n + \ \"2603:1030:1005:402::580/122\",\r\n \"2603:1040:5:402::90/125\",\r\n + \ \"2603:1040:5:402::340/122\",\r\n \"2603:1040:5:402::580/121\",\r\n + \ \"2603:1040:5:802::90/125\",\r\n \"2603:1040:5:802::2c0/122\",\r\n + \ \"2603:1040:5:802::400/121\",\r\n \"2603:1040:5:c02::90/125\",\r\n + \ \"2603:1040:5:c02::400/121\",\r\n \"2603:1040:207::2a8/125\",\r\n + \ \"2603:1040:207:402::90/125\",\r\n \"2603:1040:207:402::340/122\",\r\n + \ \"2603:1040:207:402::580/122\",\r\n \"2603:1040:207:402::600/121\",\r\n + \ \"2603:1040:207:800::48/125\",\r\n \"2603:1040:207:800::180/121\",\r\n + \ \"2603:1040:207:c00::48/125\",\r\n \"2603:1040:207:c00::180/121\",\r\n + \ \"2603:1040:407:402::90/125\",\r\n \"2603:1040:407:402::340/122\",\r\n + \ \"2603:1040:407:402::580/121\",\r\n \"2603:1040:407:802::90/125\",\r\n + \ \"2603:1040:407:802::2c0/122\",\r\n \"2603:1040:407:802::400/121\",\r\n + \ \"2603:1040:407:c02::90/125\",\r\n \"2603:1040:407:c02::400/121\",\r\n + \ \"2603:1040:606:402::90/125\",\r\n \"2603:1040:606:402::340/122\",\r\n + \ \"2603:1040:606:402::580/122\",\r\n \"2603:1040:806:402::90/125\",\r\n + \ \"2603:1040:806:402::340/122\",\r\n \"2603:1040:806:402::580/122\",\r\n + \ \"2603:1040:904:402::90/125\",\r\n \"2603:1040:904:402::340/122\",\r\n + \ \"2603:1040:904:402::580/121\",\r\n \"2603:1040:904:802::90/125\",\r\n + \ \"2603:1040:904:802::2c0/122\",\r\n \"2603:1040:904:802::400/121\",\r\n + \ \"2603:1040:904:c02::90/125\",\r\n \"2603:1040:a06::448/125\",\r\n + \ \"2603:1040:a06:402::90/125\",\r\n \"2603:1040:a06:402::340/122\",\r\n + \ \"2603:1040:a06:402::580/121\",\r\n \"2603:1040:a06:802::90/125\",\r\n + \ \"2603:1040:a06:802::2c0/122\",\r\n \"2603:1040:a06:802::400/121\",\r\n + \ \"2603:1040:a06:c02::90/125\",\r\n \"2603:1040:a06:c02::400/121\",\r\n + \ \"2603:1040:b04:402::90/125\",\r\n \"2603:1040:b04:402::340/122\",\r\n + \ \"2603:1040:b04:402::580/122\",\r\n \"2603:1040:c06:402::90/125\",\r\n + \ \"2603:1040:c06:402::340/122\",\r\n \"2603:1040:c06:402::580/122\",\r\n + \ \"2603:1040:d04:1::1a0/125\",\r\n \"2603:1040:d04:400::90/125\",\r\n + \ \"2603:1040:d04:400::3b8/125\",\r\n \"2603:1040:d04:400::4c0/122\",\r\n + \ \"2603:1040:d04:400::500/121\",\r\n \"2603:1040:d04:800::150/125\",\r\n + \ \"2603:1040:d04:800::180/121\",\r\n \"2603:1040:d04:800::280/121\",\r\n + \ \"2603:1040:d04:c02::300/121\",\r\n \"2603:1040:e05:402::100/122\",\r\n + \ \"2603:1040:f05::348/125\",\r\n \"2603:1040:f05:402::90/125\",\r\n + \ \"2603:1040:f05:402::340/122\",\r\n \"2603:1040:f05:402::580/121\",\r\n + \ \"2603:1040:f05:402::600/120\",\r\n \"2603:1040:f05:402::700/121\",\r\n + \ \"2603:1040:f05:802::90/125\",\r\n \"2603:1040:f05:802::2c0/122\",\r\n + \ \"2603:1040:f05:802::400/121\",\r\n \"2603:1040:f05:c02::90/125\",\r\n + \ \"2603:1040:f05:c02::400/121\",\r\n \"2603:1040:1002::780/125\",\r\n + \ \"2603:1040:1002:400::48/125\",\r\n \"2603:1040:1002:400::280/121\",\r\n + \ \"2603:1040:1002:800::48/125\",\r\n \"2603:1040:1002:800::180/121\",\r\n + \ \"2603:1040:1002:c00::48/125\",\r\n \"2603:1040:1002:c00::180/121\",\r\n + \ \"2603:1040:1104::5a0/125\",\r\n \"2603:1040:1104:400::90/125\",\r\n + \ \"2603:1040:1104:400::380/121\",\r\n \"2603:1040:1104:400::480/122\",\r\n + \ \"2603:1050:6:402::90/125\",\r\n \"2603:1050:6:402::340/122\",\r\n + \ \"2603:1050:6:402::500/121\",\r\n \"2603:1050:6:802::90/125\",\r\n + \ \"2603:1050:6:802::2c0/122\",\r\n \"2603:1050:6:802::400/121\",\r\n + \ \"2603:1050:6:c02::90/125\",\r\n \"2603:1050:6:c02::400/121\",\r\n + \ \"2603:1050:403:400::98/125\",\r\n \"2603:1050:403:400::480/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.AustraliaEast\",\r\n + \ \"id\": \"AzureContainerRegistry.AustraliaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.70.72.136/29\",\r\n \"13.70.78.0/25\",\r\n \"13.70.114.192/26\",\r\n + \ \"20.53.41.128/26\",\r\n \"40.79.162.32/29\",\r\n \"40.79.165.128/25\",\r\n + \ \"40.79.166.0/25\",\r\n \"40.79.170.0/29\",\r\n \"40.79.173.128/25\",\r\n + \ \"40.79.174.0/25\",\r\n \"2603:1010:6:402::90/125\",\r\n + \ \"2603:1010:6:402::340/122\",\r\n \"2603:1010:6:402::580/121\",\r\n + \ \"2603:1010:6:802::90/125\",\r\n \"2603:1010:6:802::2c0/122\",\r\n + \ \"2603:1010:6:802::400/121\",\r\n \"2603:1010:6:c02::90/125\",\r\n + \ \"2603:1010:6:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.AustraliaSoutheast\",\r\n + \ \"id\": \"AzureContainerRegistry.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"13.77.50.80/29\",\r\n + \ \"104.46.161.128/25\",\r\n \"104.46.162.128/26\",\r\n \"104.46.177.128/26\",\r\n + \ \"2603:1010:101:402::90/125\",\r\n \"2603:1010:101:402::340/122\",\r\n + \ \"2603:1010:101:402::580/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.BrazilSouth\",\r\n \"id\": + \"AzureContainerRegistry.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.195.136.0/24\",\r\n \"20.195.137.0/25\",\r\n + \ \"20.195.152.192/26\",\r\n \"20.195.153.128/25\",\r\n \"191.233.203.136/29\",\r\n + \ \"191.233.205.192/26\",\r\n \"191.234.139.0/26\",\r\n \"191.234.146.144/29\",\r\n + \ \"191.234.149.64/26\",\r\n \"191.234.150.0/26\",\r\n \"191.234.151.0/25\",\r\n + \ \"191.234.154.144/29\",\r\n \"191.234.157.192/26\",\r\n + \ \"2603:1050:6:402::90/125\",\r\n \"2603:1050:6:402::340/122\",\r\n + \ \"2603:1050:6:402::500/121\",\r\n \"2603:1050:6:802::90/125\",\r\n + \ \"2603:1050:6:802::2c0/122\",\r\n \"2603:1050:6:802::400/121\",\r\n + \ \"2603:1050:6:c02::90/125\",\r\n \"2603:1050:6:c02::400/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.BrazilSoutheast\",\r\n + \ \"id\": \"AzureContainerRegistry.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"191.233.50.16/29\",\r\n \"191.233.54.64/26\",\r\n + \ \"191.233.54.128/26\",\r\n \"2603:1050:403:400::98/125\",\r\n + \ \"2603:1050:403:400::480/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.CanadaCentral\",\r\n \"id\": + \"AzureContainerRegistry.CanadaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.71.170.56/29\",\r\n \"13.71.176.0/25\",\r\n \"13.71.176.128/25\",\r\n + \ \"20.38.146.144/29\",\r\n \"20.38.149.0/25\",\r\n \"20.48.192.128/26\",\r\n + \ \"52.246.154.144/29\",\r\n \"52.246.157.128/25\",\r\n \"52.246.158.0/25\",\r\n + \ \"2603:1030:f05:402::90/125\",\r\n \"2603:1030:f05:402::340/122\",\r\n + \ \"2603:1030:f05:402::580/121\",\r\n \"2603:1030:f05:802::90/125\",\r\n + \ \"2603:1030:f05:802::2c0/122\",\r\n \"2603:1030:f05:802::400/121\",\r\n + \ \"2603:1030:f05:c02::90/125\",\r\n \"2603:1030:f05:c02::400/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.CanadaEast\",\r\n + \ \"id\": \"AzureContainerRegistry.CanadaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"40.69.106.80/29\",\r\n \"40.69.110.0/25\",\r\n \"40.69.116.0/26\",\r\n + \ \"40.89.23.64/26\",\r\n \"2603:1030:1005:402::90/125\",\r\n + \ \"2603:1030:1005:402::340/122\",\r\n \"2603:1030:1005:402::580/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.CentralIndia\",\r\n + \ \"id\": \"AzureContainerRegistry.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.43.121.128/26\",\r\n \"20.43.123.64/26\",\r\n + \ \"20.43.127.0/25\",\r\n \"20.192.98.144/29\",\r\n \"20.192.101.64/26\",\r\n + \ \"20.192.101.128/26\",\r\n \"40.80.50.144/29\",\r\n \"40.80.51.192/26\",\r\n + \ \"40.80.53.64/26\",\r\n \"40.80.54.128/25\",\r\n \"52.140.110.192/26\",\r\n + \ \"104.211.81.136/29\",\r\n \"2603:1040:a06::448/125\",\r\n + \ \"2603:1040:a06:402::90/125\",\r\n \"2603:1040:a06:402::340/122\",\r\n + \ \"2603:1040:a06:402::580/121\",\r\n \"2603:1040:a06:802::90/125\",\r\n + \ \"2603:1040:a06:802::2c0/122\",\r\n \"2603:1040:a06:802::400/121\",\r\n + \ \"2603:1040:a06:c02::90/125\",\r\n \"2603:1040:a06:c02::400/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.CentralUS\",\r\n + \ \"id\": \"AzureContainerRegistry.CentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.89.170.216/29\",\r\n \"13.89.175.0/25\",\r\n + \ \"13.89.178.192/26\",\r\n \"20.40.224.64/26\",\r\n \"20.44.11.0/25\",\r\n + \ \"20.44.11.128/26\",\r\n \"20.44.12.0/25\",\r\n \"52.182.138.208/29\",\r\n + \ \"52.182.142.0/25\",\r\n \"52.182.142.128/25\",\r\n \"104.208.16.80/29\",\r\n + \ \"2603:1030:10:402::90/125\",\r\n \"2603:1030:10:402::340/122\",\r\n + \ \"2603:1030:10:402::580/121\",\r\n \"2603:1030:10:802::90/125\",\r\n + \ \"2603:1030:10:802::2c0/122\",\r\n \"2603:1030:10:802::400/121\",\r\n + \ \"2603:1030:10:c02::90/125\",\r\n \"2603:1030:10:c02::400/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.CentralUSEUAP\",\r\n + \ \"id\": \"AzureContainerRegistry.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.45.199.128/25\",\r\n \"40.78.202.72/29\",\r\n + \ \"168.61.140.128/25\",\r\n \"168.61.141.0/25\",\r\n \"168.61.141.128/25\",\r\n + \ \"168.61.142.192/26\",\r\n \"2603:1030:f:1::2a8/125\",\r\n + \ \"2603:1030:f:400::890/125\",\r\n \"2603:1030:f:400::b40/122\",\r\n + \ \"2603:1030:f:400::d80/122\",\r\n \"2603:1030:f:400::e00/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.EastAsia\",\r\n + \ \"id\": \"AzureContainerRegistry.EastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.75.36.0/29\",\r\n \"20.187.196.64/26\",\r\n \"20.205.74.128/26\",\r\n + \ \"20.205.77.0/25\",\r\n \"20.205.82.128/26\",\r\n \"20.205.85.0/25\",\r\n + \ \"104.214.161.128/25\",\r\n \"104.214.165.0/26\",\r\n \"2603:1040:207::2a8/125\",\r\n + \ \"2603:1040:207:402::90/125\",\r\n \"2603:1040:207:402::340/122\",\r\n + \ \"2603:1040:207:402::580/122\",\r\n \"2603:1040:207:402::600/121\",\r\n + \ \"2603:1040:207:800::48/125\",\r\n \"2603:1040:207:800::180/121\",\r\n + \ \"2603:1040:207:c00::48/125\",\r\n \"2603:1040:207:c00::180/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.EastUS\",\r\n + \ \"id\": \"AzureContainerRegistry.EastUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.42.66.0/24\",\r\n \"20.42.67.0/24\",\r\n \"20.42.74.64/26\",\r\n + \ \"20.62.128.0/26\",\r\n \"40.71.10.216/29\",\r\n \"40.78.226.208/29\",\r\n + \ \"40.78.231.0/24\",\r\n \"40.79.154.104/29\",\r\n \"52.168.112.192/26\",\r\n + \ \"52.168.114.0/24\",\r\n \"52.168.115.0/24\",\r\n \"2603:1030:210:402::90/125\",\r\n + \ \"2603:1030:210:402::340/122\",\r\n \"2603:1030:210:402::580/121\",\r\n + \ \"2603:1030:210:802::90/125\",\r\n \"2603:1030:210:802::2c0/122\",\r\n + \ \"2603:1030:210:802::400/121\",\r\n \"2603:1030:210:c02::90/125\",\r\n + \ \"2603:1030:210:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.EastUS2\",\r\n \"id\": + \"AzureContainerRegistry.EastUS2\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.44.19.64/26\",\r\n \"20.44.22.0/24\",\r\n \"20.44.23.0/24\",\r\n + \ \"20.49.102.128/26\",\r\n \"20.65.0.0/24\",\r\n \"40.70.146.88/29\",\r\n + \ \"40.70.150.0/24\",\r\n \"52.167.106.80/29\",\r\n \"52.167.110.0/24\",\r\n + \ \"52.167.111.0/26\",\r\n \"104.208.144.80/29\",\r\n \"2603:1030:40c:402::90/125\",\r\n + \ \"2603:1030:40c:402::340/122\",\r\n \"2603:1030:40c:402::580/121\",\r\n + \ \"2603:1030:40c:802::90/125\",\r\n \"2603:1030:40c:802::2c0/122\",\r\n + \ \"2603:1030:40c:802::400/121\",\r\n \"2603:1030:40c:c02::90/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.EastUS2EUAP\",\r\n + \ \"id\": \"AzureContainerRegistry.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.39.15.128/25\",\r\n \"40.74.146.48/29\",\r\n + \ \"40.74.149.128/25\",\r\n \"40.74.151.64/26\",\r\n \"40.75.34.32/29\",\r\n + \ \"40.89.120.0/24\",\r\n \"40.89.121.0/25\",\r\n \"52.138.90.32/29\",\r\n + \ \"52.138.93.0/25\",\r\n \"52.138.93.128/25\",\r\n \"2603:1030:40b:400::890/125\",\r\n + \ \"2603:1030:40b:400::b40/122\",\r\n \"2603:1030:40b:800::90/125\",\r\n + \ \"2603:1030:40b:800::2c0/122\",\r\n \"2603:1030:40b:c00::90/125\",\r\n + \ \"2603:1030:40b:c00::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.FranceCentral\",\r\n \"id\": + \"AzureContainerRegistry.FranceCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.43.46.64/26\",\r\n \"40.79.130.56/29\",\r\n \"40.79.132.192/26\",\r\n + \ \"40.79.138.32/29\",\r\n \"40.79.141.0/26\",\r\n \"40.79.141.64/26\",\r\n + \ \"40.79.143.128/25\",\r\n \"40.79.146.32/29\",\r\n \"40.79.148.128/26\",\r\n + \ \"40.79.148.192/26\",\r\n \"40.79.150.128/25\",\r\n \"51.11.193.0/26\",\r\n + \ \"51.11.193.128/25\",\r\n \"2603:1020:805:402::90/125\",\r\n + \ \"2603:1020:805:402::340/122\",\r\n \"2603:1020:805:402::580/121\",\r\n + \ \"2603:1020:805:802::90/125\",\r\n \"2603:1020:805:802::2c0/122\",\r\n + \ \"2603:1020:805:802::400/121\",\r\n \"2603:1020:805:c02::90/125\",\r\n + \ \"2603:1020:805:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.FranceSouth\",\r\n \"id\": + \"AzureContainerRegistry.FranceSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"40.79.178.80/29\",\r\n \"51.138.160.128/26\",\r\n + \ \"2603:1020:905:402::90/125\",\r\n \"2603:1020:905:402::340/122\",\r\n + \ \"2603:1020:905:402::580/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.GermanyNorth\",\r\n \"id\": + \"AzureContainerRegistry.GermanyNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.52.72.128/26\",\r\n \"51.116.58.24/29\",\r\n + \ \"2603:1020:d04:402::90/125\",\r\n \"2603:1020:d04:402::340/122\",\r\n + \ \"2603:1020:d04:402::580/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.GermanyWestCentral\",\r\n + \ \"id\": \"AzureContainerRegistry.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.52.88.64/26\",\r\n \"51.116.154.88/29\",\r\n + \ \"51.116.158.128/26\",\r\n \"51.116.158.192/26\",\r\n \"51.116.242.144/29\",\r\n + \ \"51.116.250.144/29\",\r\n \"51.116.254.64/26\",\r\n \"51.116.254.128/25\",\r\n + \ \"2603:1020:c04:402::90/125\",\r\n \"2603:1020:c04:402::340/122\",\r\n + \ \"2603:1020:c04:402::580/121\",\r\n \"2603:1020:c04:802::90/125\",\r\n + \ \"2603:1020:c04:802::2c0/122\",\r\n \"2603:1020:c04:802::400/121\",\r\n + \ \"2603:1020:c04:c02::90/125\",\r\n \"2603:1020:c04:c02::400/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.JapanEast\",\r\n + \ \"id\": \"AzureContainerRegistry.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.78.106.200/29\",\r\n \"13.78.111.0/25\",\r\n + \ \"20.89.0.192/26\",\r\n \"20.191.160.128/26\",\r\n \"20.194.128.0/25\",\r\n + \ \"40.79.186.8/29\",\r\n \"40.79.189.128/25\",\r\n \"40.79.190.0/25\",\r\n + \ \"40.79.194.96/29\",\r\n \"40.79.197.128/25\",\r\n \"2603:1040:407:402::90/125\",\r\n + \ \"2603:1040:407:402::340/122\",\r\n \"2603:1040:407:402::580/121\",\r\n + \ \"2603:1040:407:802::90/125\",\r\n \"2603:1040:407:802::2c0/122\",\r\n + \ \"2603:1040:407:802::400/121\",\r\n \"2603:1040:407:c02::90/125\",\r\n + \ \"2603:1040:407:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.JapanWest\",\r\n \"id\": + \"AzureContainerRegistry.JapanWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.189.224.0/26\",\r\n \"40.74.100.160/29\",\r\n + \ \"40.80.176.128/25\",\r\n \"40.80.181.0/26\",\r\n \"2603:1040:606:402::90/125\",\r\n + \ \"2603:1040:606:402::340/122\",\r\n \"2603:1040:606:402::580/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.JioIndiaCentral\",\r\n + \ \"id\": \"AzureContainerRegistry.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"20.192.32.0/26\",\r\n + \ \"20.192.33.0/26\",\r\n \"20.192.33.128/25\",\r\n \"20.192.50.0/26\",\r\n + \ \"20.192.234.24/29\",\r\n \"20.192.236.0/26\",\r\n \"2603:1040:1104::5a0/125\",\r\n + \ \"2603:1040:1104:400::90/125\",\r\n \"2603:1040:1104:400::380/121\",\r\n + \ \"2603:1040:1104:400::480/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.JioIndiaWest\",\r\n \"id\": + \"AzureContainerRegistry.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.193.160.64/26\",\r\n \"20.193.192.128/26\",\r\n + \ \"20.193.202.16/29\",\r\n \"20.193.204.128/26\",\r\n \"20.193.205.0/25\",\r\n + \ \"20.193.206.64/26\",\r\n \"2603:1040:d04:1::1a0/125\",\r\n + \ \"2603:1040:d04:400::90/125\",\r\n \"2603:1040:d04:400::3b8/125\",\r\n + \ \"2603:1040:d04:400::4c0/122\",\r\n \"2603:1040:d04:400::500/121\",\r\n + \ \"2603:1040:d04:800::150/125\",\r\n \"2603:1040:d04:800::180/121\",\r\n + \ \"2603:1040:d04:800::280/121\",\r\n \"2603:1040:d04:c02::300/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.KoreaCentral\",\r\n + \ \"id\": \"AzureContainerRegistry.KoreaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.41.69.128/26\",\r\n \"20.44.26.144/29\",\r\n + \ \"20.44.29.128/26\",\r\n \"20.44.29.192/26\",\r\n \"20.194.66.16/29\",\r\n + \ \"20.194.68.0/26\",\r\n \"20.194.68.64/26\",\r\n \"20.194.70.0/25\",\r\n + \ \"20.194.80.128/26\",\r\n \"20.194.81.0/25\",\r\n \"20.194.81.128/26\",\r\n + \ \"52.231.18.56/29\",\r\n \"52.231.20.128/26\",\r\n \"2603:1040:f05::348/125\",\r\n + \ \"2603:1040:f05:402::90/125\",\r\n \"2603:1040:f05:402::340/122\",\r\n + \ \"2603:1040:f05:402::580/121\",\r\n \"2603:1040:f05:402::600/120\",\r\n + \ \"2603:1040:f05:402::700/121\",\r\n \"2603:1040:f05:802::90/125\",\r\n + \ \"2603:1040:f05:802::2c0/122\",\r\n \"2603:1040:f05:802::400/121\",\r\n + \ \"2603:1040:f05:c02::90/125\",\r\n \"2603:1040:f05:c02::400/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.KoreaSouth\",\r\n + \ \"id\": \"AzureContainerRegistry.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.135.26.64/26\",\r\n \"52.147.97.128/25\",\r\n + \ \"52.231.146.192/29\",\r\n \"2603:1040:e05:402::100/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.NorthCentralUS\",\r\n + \ \"id\": \"AzureContainerRegistry.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"20.49.115.0/26\",\r\n + \ \"52.162.104.192/26\",\r\n \"52.162.106.160/29\",\r\n \"52.240.241.128/25\",\r\n + \ \"52.240.244.0/25\",\r\n \"2603:1030:608::2a8/125\",\r\n + \ \"2603:1030:608:402::90/125\",\r\n \"2603:1030:608:402::340/122\",\r\n + \ \"2603:1030:608:402::580/122\",\r\n \"2603:1030:608:402::600/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.NorthEurope\",\r\n + \ \"id\": \"AzureContainerRegistry.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.69.227.88/29\",\r\n \"13.69.236.0/23\",\r\n \"13.69.238.0/24\",\r\n + \ \"13.74.107.80/29\",\r\n \"13.74.110.0/24\",\r\n \"20.50.72.128/26\",\r\n + \ \"52.138.226.80/29\",\r\n \"52.138.230.0/24\",\r\n \"52.138.231.0/24\",\r\n + \ \"52.146.131.128/26\",\r\n \"2603:1020:5:402::90/125\",\r\n + \ \"2603:1020:5:402::340/122\",\r\n \"2603:1020:5:402::580/121\",\r\n + \ \"2603:1020:5:802::90/125\",\r\n \"2603:1020:5:802::2c0/122\",\r\n + \ \"2603:1020:5:802::400/121\",\r\n \"2603:1020:5:c02::90/125\",\r\n + \ \"2603:1020:5:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.NorwayEast\",\r\n \"id\": + \"AzureContainerRegistry.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"7\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"51.13.0.0/25\",\r\n \"51.13.1.64/26\",\r\n \"51.120.98.160/29\",\r\n + \ \"51.120.106.144/29\",\r\n \"51.120.109.128/26\",\r\n \"51.120.110.0/25\",\r\n + \ \"51.120.210.144/29\",\r\n \"51.120.213.128/25\",\r\n \"51.120.214.0/26\",\r\n + \ \"51.120.234.0/26\",\r\n \"2603:1020:e04::348/125\",\r\n + \ \"2603:1020:e04:402::90/125\",\r\n \"2603:1020:e04:402::340/122\",\r\n + \ \"2603:1020:e04:402::580/121\",\r\n \"2603:1020:e04:402::600/120\",\r\n + \ \"2603:1020:e04:802::90/125\",\r\n \"2603:1020:e04:802::2c0/122\",\r\n + \ \"2603:1020:e04:802::400/121\",\r\n \"2603:1020:e04:c02::90/125\",\r\n + \ \"2603:1020:e04:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.NorwayWest\",\r\n \"id\": + \"AzureContainerRegistry.NorwayWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"51.13.128.128/25\",\r\n \"51.13.129.0/26\",\r\n + \ \"51.120.218.24/29\",\r\n \"2603:1020:f04:402::90/125\",\r\n + \ \"2603:1020:f04:402::340/122\",\r\n \"2603:1020:f04:402::580/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SouthAfricaNorth\",\r\n + \ \"id\": \"AzureContainerRegistry.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"102.37.72.128/26\",\r\n + \ \"102.133.122.144/29\",\r\n \"102.133.124.192/26\",\r\n + \ \"102.133.126.0/26\",\r\n \"102.133.154.24/29\",\r\n \"102.133.156.192/26\",\r\n + \ \"102.133.220.64/26\",\r\n \"102.133.250.144/29\",\r\n + \ \"102.133.253.64/26\",\r\n \"102.133.253.128/26\",\r\n + \ \"2603:1000:104:402::90/125\",\r\n \"2603:1000:104:402::340/122\",\r\n + \ \"2603:1000:104:402::580/121\",\r\n \"2603:1000:104:802::90/125\",\r\n + \ \"2603:1000:104:802::2c0/122\",\r\n \"2603:1000:104:802::400/121\",\r\n + \ \"2603:1000:104:c02::90/125\",\r\n \"2603:1000:104:c02::400/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SouthAfricaWest\",\r\n + \ \"id\": \"AzureContainerRegistry.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"102.37.65.64/26\",\r\n + \ \"102.133.26.24/29\",\r\n \"2603:1000:4:402::90/125\",\r\n + \ \"2603:1000:4:402::340/122\",\r\n \"2603:1000:4:402::580/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SouthCentralUS\",\r\n + \ \"id\": \"AzureContainerRegistry.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"13.73.245.64/26\",\r\n + \ \"13.73.245.128/25\",\r\n \"13.73.255.64/26\",\r\n \"20.45.122.144/29\",\r\n + \ \"20.45.125.0/25\",\r\n \"20.49.90.16/29\",\r\n \"20.49.92.0/25\",\r\n + \ \"20.49.92.128/25\",\r\n \"20.49.93.0/26\",\r\n \"40.124.64.0/25\",\r\n + \ \"104.214.18.184/29\",\r\n \"2603:1030:807:402::90/125\",\r\n + \ \"2603:1030:807:402::340/122\",\r\n \"2603:1030:807:402::580/121\",\r\n + \ \"2603:1030:807:802::90/125\",\r\n \"2603:1030:807:802::2c0/122\",\r\n + \ \"2603:1030:807:802::400/121\",\r\n \"2603:1030:807:c02::90/125\",\r\n + \ \"2603:1030:807:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.SouthCentralUSSTG\",\r\n + \ \"id\": \"AzureContainerRegistry.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.44.2.24/29\",\r\n \"2603:1030:302:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SoutheastAsia\",\r\n + \ \"id\": \"AzureContainerRegistry.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.67.8.120/29\",\r\n \"13.67.14.0/25\",\r\n \"13.67.14.128/25\",\r\n + \ \"20.195.64.128/26\",\r\n \"23.98.82.112/29\",\r\n \"23.98.86.128/25\",\r\n + \ \"23.98.87.0/25\",\r\n \"23.98.112.0/25\",\r\n \"40.78.234.48/29\",\r\n + \ \"40.78.239.128/25\",\r\n \"2603:1040:5:402::90/125\",\r\n + \ \"2603:1040:5:402::340/122\",\r\n \"2603:1040:5:402::580/121\",\r\n + \ \"2603:1040:5:802::90/125\",\r\n \"2603:1040:5:802::2c0/122\",\r\n + \ \"2603:1040:5:802::400/121\",\r\n \"2603:1040:5:c02::90/125\",\r\n + \ \"2603:1040:5:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.SouthIndia\",\r\n \"id\": + \"AzureContainerRegistry.SouthIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.41.199.192/26\",\r\n \"20.41.208.64/26\",\r\n + \ \"40.78.194.80/29\",\r\n \"40.78.196.192/26\",\r\n \"2603:1040:c06:402::90/125\",\r\n + \ \"2603:1040:c06:402::340/122\",\r\n \"2603:1040:c06:402::580/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SwedenCentral\",\r\n + \ \"id\": \"AzureContainerRegistry.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"51.12.25.64/26\",\r\n \"51.12.32.0/25\",\r\n \"51.12.32.128/26\",\r\n + \ \"51.12.98.24/29\",\r\n \"51.12.100.192/26\",\r\n \"51.12.101.0/26\",\r\n + \ \"51.12.226.144/29\",\r\n \"51.12.229.128/26\",\r\n \"51.12.230.0/25\",\r\n + \ \"51.12.234.144/29\",\r\n \"51.12.237.128/26\",\r\n \"51.12.238.0/25\",\r\n + \ \"2603:1020:1004:1::1a0/125\",\r\n \"2603:1020:1004:400::90/125\",\r\n + \ \"2603:1020:1004:400::3b8/125\",\r\n \"2603:1020:1004:400::4c0/122\",\r\n + \ \"2603:1020:1004:400::500/121\",\r\n \"2603:1020:1004:800::150/125\",\r\n + \ \"2603:1020:1004:800::180/121\",\r\n \"2603:1020:1004:800::280/121\",\r\n + \ \"2603:1020:1004:c02::1b0/125\",\r\n \"2603:1020:1004:c02::300/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SwitzerlandNorth\",\r\n + \ \"id\": \"AzureContainerRegistry.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.208.18.128/26\",\r\n \"20.208.21.0/25\",\r\n + \ \"51.103.202.128/26\",\r\n \"51.103.205.0/25\",\r\n \"51.107.53.64/26\",\r\n + \ \"51.107.56.192/26\",\r\n \"51.107.58.24/29\",\r\n \"2603:1020:a04::348/125\",\r\n + \ \"2603:1020:a04:402::90/125\",\r\n \"2603:1020:a04:402::340/122\",\r\n + \ \"2603:1020:a04:402::580/121\",\r\n \"2603:1020:a04:802::90/125\",\r\n + \ \"2603:1020:a04:802::2c0/122\",\r\n \"2603:1020:a04:802::400/121\",\r\n + \ \"2603:1020:a04:c02::90/125\",\r\n \"2603:1020:a04:c02::400/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.SwitzerlandWest\",\r\n + \ \"id\": \"AzureContainerRegistry.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"51.107.148.128/26\",\r\n \"51.107.152.192/26\",\r\n + \ \"51.107.154.24/29\",\r\n \"51.107.192.0/26\",\r\n \"2603:1020:b04:402::90/125\",\r\n + \ \"2603:1020:b04:402::340/122\",\r\n \"2603:1020:b04:402::580/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.UAECentral\",\r\n + \ \"id\": \"AzureContainerRegistry.UAECentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.37.69.0/26\",\r\n \"20.37.74.72/29\",\r\n \"40.120.8.64/26\",\r\n + \ \"40.120.9.0/26\",\r\n \"2603:1040:b04:402::90/125\",\r\n + \ \"2603:1040:b04:402::340/122\",\r\n \"2603:1040:b04:402::580/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.UAENorth\",\r\n + \ \"id\": \"AzureContainerRegistry.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.38.140.192/26\",\r\n \"40.120.66.0/25\",\r\n + \ \"40.120.74.16/29\",\r\n \"40.120.77.0/26\",\r\n \"40.120.77.64/26\",\r\n + \ \"65.52.248.192/26\",\r\n \"65.52.250.16/29\",\r\n \"2603:1040:904:402::90/125\",\r\n + \ \"2603:1040:904:402::340/122\",\r\n \"2603:1040:904:402::580/121\",\r\n + \ \"2603:1040:904:802::90/125\",\r\n \"2603:1040:904:802::2c0/122\",\r\n + \ \"2603:1040:904:802::400/121\",\r\n \"2603:1040:904:c02::90/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.UKSouth\",\r\n + \ \"id\": \"AzureContainerRegistry.UKSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"51.104.9.128/25\",\r\n \"51.105.66.144/29\",\r\n + \ \"51.105.69.128/25\",\r\n \"51.105.70.0/25\",\r\n \"51.105.74.144/29\",\r\n + \ \"51.105.77.128/25\",\r\n \"51.132.192.0/25\",\r\n \"51.140.146.200/29\",\r\n + \ \"51.140.151.64/26\",\r\n \"51.143.208.0/26\",\r\n \"2603:1020:705:402::90/125\",\r\n + \ \"2603:1020:705:402::340/122\",\r\n \"2603:1020:705:402::580/121\",\r\n + \ \"2603:1020:705:802::90/125\",\r\n \"2603:1020:705:802::2c0/122\",\r\n + \ \"2603:1020:705:802::400/121\",\r\n \"2603:1020:705:c02::90/125\",\r\n + \ \"2603:1020:705:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.UKWest\",\r\n \"id\": + \"AzureContainerRegistry.UKWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"51.11.97.128/26\",\r\n \"51.137.166.192/26\",\r\n + \ \"51.140.210.192/29\",\r\n \"51.140.215.0/25\",\r\n \"2603:1020:605:402::90/125\",\r\n + \ \"2603:1020:605:402::340/122\",\r\n \"2603:1020:605:402::580/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.WestCentralUS\",\r\n + \ \"id\": \"AzureContainerRegistry.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.71.194.224/29\",\r\n \"40.67.121.0/25\",\r\n + \ \"40.67.122.128/26\",\r\n \"52.150.156.64/26\",\r\n \"2603:1030:b04:402::90/125\",\r\n + \ \"2603:1030:b04:402::340/122\",\r\n \"2603:1030:b04:402::580/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.WestEurope\",\r\n + \ \"id\": \"AzureContainerRegistry.WestEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.69.64.88/29\",\r\n \"13.69.106.80/29\",\r\n \"13.69.110.0/24\",\r\n + \ \"13.69.112.192/26\",\r\n \"20.50.200.0/24\",\r\n \"20.61.97.128/25\",\r\n + \ \"52.178.18.0/23\",\r\n \"52.178.20.0/24\",\r\n \"52.236.186.80/29\",\r\n + \ \"52.236.191.0/24\",\r\n \"2603:1020:206:402::90/125\",\r\n + \ \"2603:1020:206:402::340/122\",\r\n \"2603:1020:206:402::580/121\",\r\n + \ \"2603:1020:206:802::90/125\",\r\n \"2603:1020:206:802::2c0/122\",\r\n + \ \"2603:1020:206:802::400/121\",\r\n \"2603:1020:206:c02::90/125\",\r\n + \ \"2603:1020:206:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.WestIndia\",\r\n \"id\": + \"AzureContainerRegistry.WestIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.38.132.192/26\",\r\n \"104.211.146.80/29\",\r\n + \ \"2603:1040:806:402::90/125\",\r\n \"2603:1040:806:402::340/122\",\r\n + \ \"2603:1040:806:402::580/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.WestUS\",\r\n \"id\": + \"AzureContainerRegistry.WestUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.49.127.0/26\",\r\n \"20.189.169.0/24\",\r\n \"20.189.171.128/25\",\r\n + \ \"40.112.242.160/29\",\r\n \"2603:1030:a07:402::90/125\",\r\n + \ \"2603:1030:a07:402::9c0/122\",\r\n \"2603:1030:a07:402::a00/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureContainerRegistry.WestUS2\",\r\n + \ \"id\": \"AzureContainerRegistry.WestUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"13.66.140.72/29\",\r\n \"13.66.146.0/24\",\r\n \"13.66.147.0/25\",\r\n + \ \"13.66.148.0/24\",\r\n \"20.83.192.64/26\",\r\n \"40.64.112.0/24\",\r\n + \ \"40.64.113.128/26\",\r\n \"40.64.135.128/25\",\r\n \"40.78.242.160/29\",\r\n + \ \"40.78.246.0/24\",\r\n \"40.78.250.96/29\",\r\n \"2603:1030:c06:400::890/125\",\r\n + \ \"2603:1030:c06:400::b40/122\",\r\n \"2603:1030:c06:802::90/125\",\r\n + \ \"2603:1030:c06:802::2c0/122\",\r\n \"2603:1030:c06:c02::90/125\",\r\n + \ \"2603:1030:c06:c02::400/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureContainerRegistry.WestUS3\",\r\n \"id\": + \"AzureContainerRegistry.WestUS3\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureContainerRegistry\",\r\n \"addressPrefixes\": + [\r\n \"20.150.170.24/29\",\r\n \"20.150.173.128/26\",\r\n + \ \"20.150.174.0/25\",\r\n \"20.150.175.128/26\",\r\n \"20.150.178.144/29\",\r\n + \ \"20.150.181.192/26\",\r\n \"20.150.182.128/25\",\r\n \"20.150.186.144/29\",\r\n + \ \"20.150.189.192/26\",\r\n \"20.150.190.128/25\",\r\n \"20.150.225.64/26\",\r\n + \ \"20.150.241.0/26\",\r\n \"2603:1030:504::1a0/125\",\r\n + \ \"2603:1030:504:402::90/125\",\r\n \"2603:1030:504:402::3b8/125\",\r\n + \ \"2603:1030:504:402::480/121\",\r\n \"2603:1030:504:802::c0/125\",\r\n + \ \"2603:1030:504:802::150/125\",\r\n \"2603:1030:504:802::180/121\",\r\n + \ \"2603:1030:504:c02::140/122\",\r\n \"2603:1030:504:c02::300/121\",\r\n + \ \"2603:1030:504:c02::400/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB\",\r\n \"id\": \"AzureCosmosDB\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"7\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n + \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n + \ \"addressPrefixes\": [\r\n \"13.64.69.151/32\",\r\n \"13.64.113.68/32\",\r\n + \ \"13.64.114.48/32\",\r\n \"13.64.194.140/32\",\r\n \"13.65.145.92/32\",\r\n + \ \"13.66.26.107/32\",\r\n \"13.66.82.75/32\",\r\n \"13.66.138.0/26\",\r\n + \ \"13.67.8.0/26\",\r\n \"13.68.28.135/32\",\r\n \"13.69.66.0/25\",\r\n + \ \"13.69.66.128/29\",\r\n \"13.69.112.0/25\",\r\n \"13.69.226.0/25\",\r\n + \ \"13.70.74.136/29\",\r\n \"13.71.115.125/32\",\r\n \"13.71.124.81/32\",\r\n + \ \"13.71.170.0/28\",\r\n \"13.71.194.0/26\",\r\n \"13.72.255.150/32\",\r\n + \ \"13.73.100.183/32\",\r\n \"13.73.254.224/27\",\r\n \"13.74.106.0/25\",\r\n + \ \"13.75.34.0/26\",\r\n \"13.75.134.84/32\",\r\n \"13.76.161.130/32\",\r\n + \ \"13.77.50.0/28\",\r\n \"13.78.51.35/32\",\r\n \"13.78.106.0/26\",\r\n + \ \"13.78.188.25/32\",\r\n \"13.79.34.236/32\",\r\n \"13.81.51.99/32\",\r\n + \ \"13.82.53.191/32\",\r\n \"13.84.150.178/32\",\r\n \"13.84.157.70/32\",\r\n + \ \"13.85.16.188/32\",\r\n \"13.87.56.0/27\",\r\n \"13.87.122.0/27\",\r\n + \ \"13.88.30.39/32\",\r\n \"13.88.253.180/32\",\r\n \"13.89.41.245/32\",\r\n + \ \"13.89.170.0/25\",\r\n \"13.89.190.186/32\",\r\n \"13.89.224.229/32\",\r\n + \ \"13.90.199.155/32\",\r\n \"13.91.246.52/32\",\r\n \"13.93.153.80/32\",\r\n + \ \"13.93.156.125/32\",\r\n \"13.93.207.66/32\",\r\n \"13.94.201.5/32\",\r\n + \ \"13.95.234.68/32\",\r\n \"20.21.34.160/27\",\r\n \"20.21.42.0/26\",\r\n + \ \"20.21.66.0/26\",\r\n \"20.21.74.0/26\",\r\n \"20.36.26.132/32\",\r\n + \ \"20.36.42.8/32\",\r\n \"20.36.75.163/32\",\r\n \"20.36.106.0/26\",\r\n + \ \"20.36.114.0/28\",\r\n \"20.36.123.96/27\",\r\n \"20.37.68.160/27\",\r\n + \ \"20.37.75.128/26\",\r\n \"20.37.228.32/27\",\r\n \"20.38.140.128/27\",\r\n + \ \"20.38.146.0/26\",\r\n \"20.39.15.64/27\",\r\n \"20.40.207.160/27\",\r\n + \ \"20.41.69.64/27\",\r\n \"20.41.199.128/27\",\r\n \"20.43.46.0/27\",\r\n + \ \"20.43.126.128/26\",\r\n \"20.44.2.64/26\",\r\n \"20.44.10.0/26\",\r\n + \ \"20.44.26.0/26\",\r\n \"20.45.115.160/27\",\r\n \"20.45.122.0/26\",\r\n + \ \"20.45.198.96/27\",\r\n \"20.48.192.32/27\",\r\n \"20.49.82.64/26\",\r\n + \ \"20.49.90.64/26\",\r\n \"20.49.102.64/27\",\r\n \"20.49.114.128/27\",\r\n + \ \"20.49.126.160/27\",\r\n \"20.53.41.0/27\",\r\n \"20.61.97.0/27\",\r\n + \ \"20.72.18.64/27\",\r\n \"20.72.26.64/26\",\r\n \"20.89.0.128/26\",\r\n + \ \"20.150.166.192/27\",\r\n \"20.150.170.64/26\",\r\n \"20.150.178.0/26\",\r\n + \ \"20.150.186.0/26\",\r\n \"20.187.196.0/27\",\r\n \"20.191.160.32/27\",\r\n + \ \"20.192.98.0/26\",\r\n \"20.192.166.192/27\",\r\n \"20.192.231.0/27\",\r\n + \ \"20.192.234.64/26\",\r\n \"20.193.202.64/26\",\r\n \"20.194.66.64/26\",\r\n + \ \"20.194.80.64/26\",\r\n \"20.205.74.0/26\",\r\n \"20.205.82.0/26\",\r\n + \ \"20.208.18.0/26\",\r\n \"23.96.180.213/32\",\r\n \"23.96.219.207/32\",\r\n + \ \"23.96.242.234/32\",\r\n \"23.98.82.0/26\",\r\n \"23.98.107.224/27\",\r\n + \ \"23.102.191.13/32\",\r\n \"23.102.239.134/32\",\r\n \"40.64.135.0/27\",\r\n + \ \"40.65.106.154/32\",\r\n \"40.65.114.105/32\",\r\n \"40.67.51.160/27\",\r\n + \ \"40.67.58.64/26\",\r\n \"40.68.44.85/32\",\r\n \"40.69.106.0/28\",\r\n + \ \"40.70.0.140/32\",\r\n \"40.70.220.202/32\",\r\n \"40.71.10.0/25\",\r\n + \ \"40.71.17.19/32\",\r\n \"40.71.203.37/32\",\r\n \"40.71.204.115/32\",\r\n + \ \"40.71.216.114/32\",\r\n \"40.74.98.0/26\",\r\n \"40.74.143.235/32\",\r\n + \ \"40.74.147.192/26\",\r\n \"40.75.32.32/29\",\r\n \"40.75.34.128/26\",\r\n + \ \"40.77.63.179/32\",\r\n \"40.78.194.0/28\",\r\n \"40.78.203.32/27\",\r\n + \ \"40.78.226.0/25\",\r\n \"40.78.236.192/26\",\r\n \"40.78.243.192/26\",\r\n + \ \"40.78.250.0/26\",\r\n \"40.79.39.162/32\",\r\n \"40.79.59.92/32\",\r\n + \ \"40.79.67.136/32\",\r\n \"40.79.130.0/28\",\r\n \"40.79.138.48/28\",\r\n + \ \"40.79.142.64/26\",\r\n \"40.79.146.48/28\",\r\n \"40.79.149.128/26\",\r\n + \ \"40.79.154.128/26\",\r\n \"40.79.163.72/29\",\r\n \"40.79.163.192/26\",\r\n + \ \"40.79.170.48/28\",\r\n \"40.79.174.192/26\",\r\n \"40.79.178.0/28\",\r\n + \ \"40.79.186.16/28\",\r\n \"40.79.191.0/26\",\r\n \"40.79.194.128/26\",\r\n + \ \"40.80.50.0/26\",\r\n \"40.80.63.160/27\",\r\n \"40.80.173.0/27\",\r\n + \ \"40.83.137.191/32\",\r\n \"40.85.178.211/32\",\r\n \"40.86.229.245/32\",\r\n + \ \"40.89.22.224/27\",\r\n \"40.89.67.208/32\",\r\n \"40.89.132.238/32\",\r\n + \ \"40.112.140.12/32\",\r\n \"40.112.241.0/24\",\r\n \"40.112.249.60/32\",\r\n + \ \"40.113.90.91/32\",\r\n \"40.114.240.253/32\",\r\n \"40.115.241.37/32\",\r\n + \ \"40.118.245.44/32\",\r\n \"40.118.245.251/32\",\r\n \"40.120.74.64/26\",\r\n + \ \"40.122.132.89/32\",\r\n \"40.122.174.140/32\",\r\n \"40.126.244.209/32\",\r\n + \ \"51.11.192.192/26\",\r\n \"51.12.43.0/27\",\r\n \"51.12.98.64/26\",\r\n + \ \"51.12.195.0/27\",\r\n \"51.12.202.64/26\",\r\n \"51.12.226.0/26\",\r\n + \ \"51.12.234.0/26\",\r\n \"51.103.202.0/26\",\r\n \"51.104.31.128/27\",\r\n + \ \"51.105.66.0/26\",\r\n \"51.105.74.0/26\",\r\n \"51.105.92.192/27\",\r\n + \ \"51.107.52.224/27\",\r\n \"51.107.58.64/26\",\r\n \"51.107.148.32/27\",\r\n + \ \"51.107.154.64/26\",\r\n \"51.116.50.224/27\",\r\n \"51.116.58.64/26\",\r\n + \ \"51.116.146.224/27\",\r\n \"51.116.154.128/26\",\r\n \"51.116.242.0/26\",\r\n + \ \"51.116.250.0/26\",\r\n \"51.120.44.128/27\",\r\n \"51.120.98.64/26\",\r\n + \ \"51.120.106.0/26\",\r\n \"51.120.210.0/26\",\r\n \"51.120.218.64/26\",\r\n + \ \"51.120.228.160/27\",\r\n \"51.137.166.128/27\",\r\n \"51.140.52.73/32\",\r\n + \ \"51.140.70.75/32\",\r\n \"51.140.75.146/32\",\r\n \"51.140.83.56/32\",\r\n + \ \"51.140.99.233/32\",\r\n \"51.140.146.0/27\",\r\n \"51.140.210.0/27\",\r\n + \ \"51.141.11.34/32\",\r\n \"51.141.25.77/32\",\r\n \"51.141.53.76/32\",\r\n + \ \"51.141.55.229/32\",\r\n \"51.143.189.37/32\",\r\n \"51.144.177.166/32\",\r\n + \ \"51.144.182.233/32\",\r\n \"52.136.52.64/27\",\r\n \"52.136.134.25/32\",\r\n + \ \"52.136.134.250/32\",\r\n \"52.136.136.70/32\",\r\n \"52.138.66.90/32\",\r\n + \ \"52.138.70.62/32\",\r\n \"52.138.92.0/26\",\r\n \"52.138.141.112/32\",\r\n + \ \"52.138.197.33/32\",\r\n \"52.138.201.47/32\",\r\n \"52.138.205.97/32\",\r\n + \ \"52.138.206.153/32\",\r\n \"52.138.227.192/26\",\r\n \"52.140.110.64/27\",\r\n + \ \"52.143.136.41/32\",\r\n \"52.146.79.160/27\",\r\n \"52.146.131.0/27\",\r\n + \ \"52.150.154.224/27\",\r\n \"52.151.16.118/32\",\r\n \"52.156.170.104/32\",\r\n + \ \"52.158.234.203/32\",\r\n \"52.161.13.67/32\",\r\n \"52.161.15.197/32\",\r\n + \ \"52.161.22.131/32\",\r\n \"52.161.100.126/32\",\r\n \"52.162.106.0/26\",\r\n + \ \"52.162.252.26/32\",\r\n \"52.163.63.20/32\",\r\n \"52.163.249.82/32\",\r\n + \ \"52.164.250.188/32\",\r\n \"52.165.42.204/32\",\r\n \"52.165.46.249/32\",\r\n + \ \"52.165.129.184/32\",\r\n \"52.165.229.112/32\",\r\n \"52.165.229.184/32\",\r\n + \ \"52.167.107.128/26\",\r\n \"52.168.28.222/32\",\r\n \"52.169.122.37/32\",\r\n + \ \"52.169.219.183/32\",\r\n \"52.170.204.83/32\",\r\n \"52.172.55.127/32\",\r\n + \ \"52.172.206.130/32\",\r\n \"52.173.148.217/32\",\r\n \"52.173.196.170/32\",\r\n + \ \"52.173.240.244/32\",\r\n \"52.174.253.239/32\",\r\n \"52.175.25.211/32\",\r\n + \ \"52.175.39.232/32\",\r\n \"52.176.0.136/32\",\r\n \"52.176.7.71/32\",\r\n + \ \"52.176.101.49/32\",\r\n \"52.176.155.127/32\",\r\n \"52.177.172.74/32\",\r\n + \ \"52.177.206.153/32\",\r\n \"52.178.108.222/32\",\r\n \"52.179.141.33/32\",\r\n + \ \"52.179.143.233/32\",\r\n \"52.179.200.0/25\",\r\n \"52.180.160.251/32\",\r\n + \ \"52.180.161.1/32\",\r\n \"52.180.177.137/32\",\r\n \"52.182.138.0/25\",\r\n + \ \"52.183.42.252/32\",\r\n \"52.183.66.36/32\",\r\n \"52.183.92.223/32\",\r\n + \ \"52.183.119.101/32\",\r\n \"52.184.152.241/32\",\r\n \"52.186.69.224/32\",\r\n + \ \"52.187.11.8/32\",\r\n \"52.187.12.93/32\",\r\n \"52.191.197.220/32\",\r\n + \ \"52.226.18.140/32\",\r\n \"52.226.21.178/32\",\r\n \"52.230.15.63/32\",\r\n + \ \"52.230.23.170/32\",\r\n \"52.230.70.94/32\",\r\n \"52.230.87.21/32\",\r\n + \ \"52.231.18.0/28\",\r\n \"52.231.25.123/32\",\r\n \"52.231.39.143/32\",\r\n + \ \"52.231.56.0/28\",\r\n \"52.231.146.0/27\",\r\n \"52.231.206.234/32\",\r\n + \ \"52.231.207.31/32\",\r\n \"52.232.59.220/32\",\r\n \"52.233.41.60/32\",\r\n + \ \"52.233.128.86/32\",\r\n \"52.235.40.247/32\",\r\n \"52.235.46.28/32\",\r\n + \ \"52.236.189.0/26\",\r\n \"52.237.20.252/32\",\r\n \"52.246.154.0/26\",\r\n + \ \"52.255.52.19/32\",\r\n \"52.255.58.221/32\",\r\n \"65.52.210.9/32\",\r\n + \ \"65.52.251.128/26\",\r\n \"102.133.26.64/26\",\r\n \"102.133.60.64/27\",\r\n + \ \"102.133.122.0/26\",\r\n \"102.133.154.64/26\",\r\n \"102.133.220.0/27\",\r\n + \ \"102.133.250.0/26\",\r\n \"104.41.52.61/32\",\r\n \"104.41.54.69/32\",\r\n + \ \"104.41.177.93/32\",\r\n \"104.45.16.183/32\",\r\n \"104.45.131.193/32\",\r\n + \ \"104.45.144.73/32\",\r\n \"104.46.177.64/27\",\r\n \"104.208.231.0/25\",\r\n + \ \"104.210.89.99/32\",\r\n \"104.210.217.251/32\",\r\n \"104.211.84.0/28\",\r\n + \ \"104.211.102.50/32\",\r\n \"104.211.146.0/28\",\r\n \"104.211.162.94/32\",\r\n + \ \"104.211.184.117/32\",\r\n \"104.211.188.174/32\",\r\n + \ \"104.211.227.84/32\",\r\n \"104.214.18.0/25\",\r\n \"104.214.23.192/27\",\r\n + \ \"104.214.26.177/32\",\r\n \"104.215.1.53/32\",\r\n \"104.215.21.39/32\",\r\n + \ \"104.215.55.227/32\",\r\n \"137.117.9.157/32\",\r\n \"157.55.170.133/32\",\r\n + \ \"168.61.142.128/26\",\r\n \"191.232.51.175/32\",\r\n \"191.232.53.203/32\",\r\n + \ \"191.233.11.192/27\",\r\n \"191.233.50.64/26\",\r\n \"191.233.204.128/27\",\r\n + \ \"191.234.138.160/27\",\r\n \"191.234.146.0/26\",\r\n \"191.234.154.0/26\",\r\n + \ \"191.234.179.157/32\",\r\n \"191.239.179.124/32\",\r\n + \ \"207.46.150.252/32\",\r\n \"2603:1000:4:402::c0/122\",\r\n + \ \"2603:1000:104:402::c0/122\",\r\n \"2603:1000:104:802::c0/122\",\r\n + \ \"2603:1000:104:c02::c0/122\",\r\n \"2603:1010:6:402::c0/122\",\r\n + \ \"2603:1010:6:802::c0/122\",\r\n \"2603:1010:6:c02::c0/122\",\r\n + \ \"2603:1010:101:402::c0/122\",\r\n \"2603:1010:304:402::c0/122\",\r\n + \ \"2603:1010:404:402::c0/122\",\r\n \"2603:1020:5:402::c0/122\",\r\n + \ \"2603:1020:5:802::c0/122\",\r\n \"2603:1020:5:c02::c0/122\",\r\n + \ \"2603:1020:206:402::c0/122\",\r\n \"2603:1020:206:802::c0/122\",\r\n + \ \"2603:1020:206:c02::c0/122\",\r\n \"2603:1020:305:402::c0/122\",\r\n + \ \"2603:1020:405:402::c0/122\",\r\n \"2603:1020:605:402::c0/122\",\r\n + \ \"2603:1020:705:402::c0/122\",\r\n \"2603:1020:705:802::c0/122\",\r\n + \ \"2603:1020:705:c02::c0/122\",\r\n \"2603:1020:805:402::c0/122\",\r\n + \ \"2603:1020:805:802::c0/122\",\r\n \"2603:1020:805:c02::c0/122\",\r\n + \ \"2603:1020:905:402::c0/122\",\r\n \"2603:1020:a04::6a0/123\",\r\n + \ \"2603:1020:a04:402::c0/122\",\r\n \"2603:1020:a04:802::c0/122\",\r\n + \ \"2603:1020:a04:c02::c0/122\",\r\n \"2603:1020:b04:402::c0/122\",\r\n + \ \"2603:1020:c04:402::c0/122\",\r\n \"2603:1020:c04:802::c0/122\",\r\n + \ \"2603:1020:c04:c02::c0/122\",\r\n \"2603:1020:d04:402::c0/122\",\r\n + \ \"2603:1020:e04::680/123\",\r\n \"2603:1020:e04:402::c0/122\",\r\n + \ \"2603:1020:e04:802::c0/122\",\r\n \"2603:1020:e04:c02::c0/122\",\r\n + \ \"2603:1020:f04:402::c0/122\",\r\n \"2603:1020:1004:1::60/123\",\r\n + \ \"2603:1020:1004:400::c0/122\",\r\n \"2603:1020:1004:400::280/122\",\r\n + \ \"2603:1020:1004:400::3c0/122\",\r\n \"2603:1020:1004:800::400/122\",\r\n + \ \"2603:1020:1004:c02::1c0/122\",\r\n \"2603:1020:1104::520/123\",\r\n + \ \"2603:1020:1104:400::c0/122\",\r\n \"2603:1030:f:2::2a0/123\",\r\n + \ \"2603:1030:f:400::8c0/122\",\r\n \"2603:1030:10:402::c0/122\",\r\n + \ \"2603:1030:10:802::c0/122\",\r\n \"2603:1030:10:c02::c0/122\",\r\n + \ \"2603:1030:104::680/123\",\r\n \"2603:1030:104:402::c0/122\",\r\n + \ \"2603:1030:104:402::5c0/122\",\r\n \"2603:1030:104:802::80/122\",\r\n + \ \"2603:1030:107::540/123\",\r\n \"2603:1030:107:400::40/122\",\r\n + \ \"2603:1030:210:402::c0/122\",\r\n \"2603:1030:210:802::c0/122\",\r\n + \ \"2603:1030:210:c02::c0/122\",\r\n \"2603:1030:40b:400::8c0/122\",\r\n + \ \"2603:1030:40b:800::c0/122\",\r\n \"2603:1030:40b:c00::c0/122\",\r\n + \ \"2603:1030:40c:402::c0/122\",\r\n \"2603:1030:40c:802::c0/122\",\r\n + \ \"2603:1030:40c:c02::c0/122\",\r\n \"2603:1030:504::60/123\",\r\n + \ \"2603:1030:504:402::c0/122\",\r\n \"2603:1030:504:402::280/122\",\r\n + \ \"2603:1030:504:402::3c0/122\",\r\n \"2603:1030:504:802::200/122\",\r\n + \ \"2603:1030:504:c02::3c0/122\",\r\n \"2603:1030:608:1::4c0/123\",\r\n + \ \"2603:1030:608:402::c0/122\",\r\n \"2603:1030:807:402::c0/122\",\r\n + \ \"2603:1030:807:802::c0/122\",\r\n \"2603:1030:807:c02::c0/122\",\r\n + \ \"2603:1030:a07:402::c0/122\",\r\n \"2603:1030:b04:402::c0/122\",\r\n + \ \"2603:1030:c06:400::8c0/122\",\r\n \"2603:1030:c06:802::c0/122\",\r\n + \ \"2603:1030:c06:c02::c0/122\",\r\n \"2603:1030:f05:402::c0/122\",\r\n + \ \"2603:1030:f05:802::c0/122\",\r\n \"2603:1030:f05:c02::c0/122\",\r\n + \ \"2603:1030:1005:402::c0/122\",\r\n \"2603:1040:5:402::c0/122\",\r\n + \ \"2603:1040:5:802::c0/122\",\r\n \"2603:1040:5:c02::c0/122\",\r\n + \ \"2603:1040:207:1::2a0/123\",\r\n \"2603:1040:207:402::c0/122\",\r\n + \ \"2603:1040:207:800::/122\",\r\n \"2603:1040:207:c00::/122\",\r\n + \ \"2603:1040:407:402::c0/122\",\r\n \"2603:1040:407:802::c0/122\",\r\n + \ \"2603:1040:407:c02::c0/122\",\r\n \"2603:1040:606:402::c0/122\",\r\n + \ \"2603:1040:806:402::c0/122\",\r\n \"2603:1040:904:402::c0/122\",\r\n + \ \"2603:1040:904:802::c0/122\",\r\n \"2603:1040:904:c02::c0/122\",\r\n + \ \"2603:1040:a06::780/123\",\r\n \"2603:1040:a06:402::c0/122\",\r\n + \ \"2603:1040:a06:802::c0/122\",\r\n \"2603:1040:a06:c02::c0/122\",\r\n + \ \"2603:1040:b04:402::c0/122\",\r\n \"2603:1040:c06:402::c0/122\",\r\n + \ \"2603:1040:d04:1::60/123\",\r\n \"2603:1040:d04:400::c0/122\",\r\n + \ \"2603:1040:d04:400::280/122\",\r\n \"2603:1040:d04:400::3c0/122\",\r\n + \ \"2603:1040:f05::680/123\",\r\n \"2603:1040:f05:402::c0/122\",\r\n + \ \"2603:1040:f05:802::c0/122\",\r\n \"2603:1040:f05:c02::c0/122\",\r\n + \ \"2603:1040:1002::740/123\",\r\n \"2603:1040:1002:400::/122\",\r\n + \ \"2603:1040:1002:800::/122\",\r\n \"2603:1040:1002:c00::/122\",\r\n + \ \"2603:1040:1104::520/123\",\r\n \"2603:1040:1104:400::c0/122\",\r\n + \ \"2603:1050:6:402::c0/122\",\r\n \"2603:1050:6:802::c0/122\",\r\n + \ \"2603:1050:6:c02::c0/122\",\r\n \"2603:1050:403:400::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.AustraliaCentral\",\r\n + \ \"id\": \"AzureCosmosDB.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.36.42.8/32\",\r\n + \ \"20.36.106.0/26\",\r\n \"20.37.228.32/27\",\r\n \"2603:1010:304:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.AustraliaCentral2\",\r\n + \ \"id\": \"AzureCosmosDB.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.36.75.163/32\",\r\n + \ \"20.36.114.0/28\",\r\n \"20.36.123.96/27\",\r\n \"2603:1010:404:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.AustraliaEast\",\r\n + \ \"id\": \"AzureCosmosDB.AustraliaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"13.70.74.136/29\",\r\n \"13.72.255.150/32\",\r\n + \ \"13.75.134.84/32\",\r\n \"20.53.41.0/27\",\r\n \"40.79.163.72/29\",\r\n + \ \"40.79.163.192/26\",\r\n \"40.79.170.48/28\",\r\n \"40.79.174.192/26\",\r\n + \ \"40.126.244.209/32\",\r\n \"52.156.170.104/32\",\r\n \"104.210.89.99/32\",\r\n + \ \"2603:1010:6:402::c0/122\",\r\n \"2603:1010:6:802::c0/122\",\r\n + \ \"2603:1010:6:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.AustraliaSoutheast\",\r\n \"id\": + \"AzureCosmosDB.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.73.100.183/32\",\r\n + \ \"13.77.50.0/28\",\r\n \"52.255.52.19/32\",\r\n \"52.255.58.221/32\",\r\n + \ \"104.46.177.64/27\",\r\n \"191.239.179.124/32\",\r\n \"2603:1010:101:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.BrazilSouth\",\r\n + \ \"id\": \"AzureCosmosDB.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"104.41.52.61/32\",\r\n \"104.41.54.69/32\",\r\n + \ \"191.232.51.175/32\",\r\n \"191.232.53.203/32\",\r\n \"191.233.204.128/27\",\r\n + \ \"191.234.138.160/27\",\r\n \"191.234.146.0/26\",\r\n \"191.234.154.0/26\",\r\n + \ \"191.234.179.157/32\",\r\n \"2603:1050:6:402::c0/122\",\r\n + \ \"2603:1050:6:802::c0/122\",\r\n \"2603:1050:6:c02::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.BrazilSoutheast\",\r\n + \ \"id\": \"AzureCosmosDB.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"191.233.11.192/27\",\r\n \"191.233.50.64/26\",\r\n + \ \"2603:1050:403:400::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.CanadaCentral\",\r\n \"id\": + \"AzureCosmosDB.CanadaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"13.71.170.0/28\",\r\n \"13.88.253.180/32\",\r\n + \ \"20.38.146.0/26\",\r\n \"20.48.192.32/27\",\r\n \"52.233.41.60/32\",\r\n + \ \"52.237.20.252/32\",\r\n \"52.246.154.0/26\",\r\n \"2603:1030:f05:402::c0/122\",\r\n + \ \"2603:1030:f05:802::c0/122\",\r\n \"2603:1030:f05:c02::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.CanadaEast\",\r\n + \ \"id\": \"AzureCosmosDB.CanadaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"40.69.106.0/28\",\r\n \"40.86.229.245/32\",\r\n + \ \"40.89.22.224/27\",\r\n \"52.235.40.247/32\",\r\n \"52.235.46.28/32\",\r\n + \ \"2603:1030:1005:402::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.CentralIndia\",\r\n \"id\": + \"AzureCosmosDB.CentralIndia\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"20.43.126.128/26\",\r\n \"20.192.98.0/26\",\r\n + \ \"40.80.50.0/26\",\r\n \"52.140.110.64/27\",\r\n \"52.172.206.130/32\",\r\n + \ \"104.211.84.0/28\",\r\n \"104.211.102.50/32\",\r\n \"2603:1040:a06::780/123\",\r\n + \ \"2603:1040:a06:402::c0/122\",\r\n \"2603:1040:a06:802::c0/122\",\r\n + \ \"2603:1040:a06:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.CentralUS\",\r\n \"id\": \"AzureCosmosDB.CentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.89.41.245/32\",\r\n + \ \"13.89.170.0/25\",\r\n \"13.89.190.186/32\",\r\n \"13.89.224.229/32\",\r\n + \ \"20.40.207.160/27\",\r\n \"20.44.10.0/26\",\r\n \"40.77.63.179/32\",\r\n + \ \"40.122.132.89/32\",\r\n \"40.122.174.140/32\",\r\n \"52.165.42.204/32\",\r\n + \ \"52.165.46.249/32\",\r\n \"52.165.129.184/32\",\r\n \"52.165.229.112/32\",\r\n + \ \"52.165.229.184/32\",\r\n \"52.173.148.217/32\",\r\n \"52.173.196.170/32\",\r\n + \ \"52.173.240.244/32\",\r\n \"52.176.0.136/32\",\r\n \"52.176.7.71/32\",\r\n + \ \"52.176.101.49/32\",\r\n \"52.176.155.127/32\",\r\n \"52.182.138.0/25\",\r\n + \ \"2603:1030:10:402::c0/122\",\r\n \"2603:1030:10:802::c0/122\",\r\n + \ \"2603:1030:10:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.CentralUSEUAP\",\r\n \"id\": + \"AzureCosmosDB.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"20.45.198.96/27\",\r\n \"40.78.203.32/27\",\r\n + \ \"52.180.160.251/32\",\r\n \"52.180.161.1/32\",\r\n \"52.180.177.137/32\",\r\n + \ \"168.61.142.128/26\",\r\n \"2603:1030:f:2::2a0/123\",\r\n + \ \"2603:1030:f:400::8c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.EastAsia\",\r\n \"id\": \"AzureCosmosDB.EastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.75.34.0/26\",\r\n + \ \"20.187.196.0/27\",\r\n \"20.205.74.0/26\",\r\n \"20.205.82.0/26\",\r\n + \ \"23.102.239.134/32\",\r\n \"52.175.25.211/32\",\r\n \"52.175.39.232/32\",\r\n + \ \"207.46.150.252/32\",\r\n \"2603:1040:207:1::2a0/123\",\r\n + \ \"2603:1040:207:402::c0/122\",\r\n \"2603:1040:207:800::/122\",\r\n + \ \"2603:1040:207:c00::/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.EastUS\",\r\n \"id\": \"AzureCosmosDB.EastUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.82.53.191/32\",\r\n + \ \"13.90.199.155/32\",\r\n \"40.71.10.0/25\",\r\n \"40.71.17.19/32\",\r\n + \ \"40.71.203.37/32\",\r\n \"40.71.204.115/32\",\r\n \"40.71.216.114/32\",\r\n + \ \"40.78.226.0/25\",\r\n \"40.79.154.128/26\",\r\n \"40.85.178.211/32\",\r\n + \ \"52.146.79.160/27\",\r\n \"52.168.28.222/32\",\r\n \"52.170.204.83/32\",\r\n + \ \"52.186.69.224/32\",\r\n \"52.191.197.220/32\",\r\n \"52.226.18.140/32\",\r\n + \ \"52.226.21.178/32\",\r\n \"104.45.131.193/32\",\r\n \"104.45.144.73/32\",\r\n + \ \"2603:1030:210:402::c0/122\",\r\n \"2603:1030:210:802::c0/122\",\r\n + \ \"2603:1030:210:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.EastUS2\",\r\n \"id\": \"AzureCosmosDB.EastUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.68.28.135/32\",\r\n + \ \"20.49.102.64/27\",\r\n \"40.70.0.140/32\",\r\n \"40.70.220.202/32\",\r\n + \ \"40.79.39.162/32\",\r\n \"40.79.59.92/32\",\r\n \"40.79.67.136/32\",\r\n + \ \"52.167.107.128/26\",\r\n \"52.177.172.74/32\",\r\n \"52.177.206.153/32\",\r\n + \ \"52.179.141.33/32\",\r\n \"52.179.143.233/32\",\r\n \"52.179.200.0/25\",\r\n + \ \"52.184.152.241/32\",\r\n \"104.208.231.0/25\",\r\n \"2603:1030:40c:402::c0/122\",\r\n + \ \"2603:1030:40c:802::c0/122\",\r\n \"2603:1030:40c:c02::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.EastUS2EUAP\",\r\n + \ \"id\": \"AzureCosmosDB.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"20.39.15.64/27\",\r\n \"40.74.147.192/26\",\r\n + \ \"40.75.32.32/29\",\r\n \"40.75.34.128/26\",\r\n \"40.89.67.208/32\",\r\n + \ \"52.138.66.90/32\",\r\n \"52.138.70.62/32\",\r\n \"52.138.92.0/26\",\r\n + \ \"2603:1030:40b:400::8c0/122\",\r\n \"2603:1030:40b:800::c0/122\",\r\n + \ \"2603:1030:40b:c00::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.FranceCentral\",\r\n \"id\": + \"AzureCosmosDB.FranceCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"20.43.46.0/27\",\r\n \"40.79.130.0/28\",\r\n \"40.79.138.48/28\",\r\n + \ \"40.79.142.64/26\",\r\n \"40.79.146.48/28\",\r\n \"40.79.149.128/26\",\r\n + \ \"40.89.132.238/32\",\r\n \"51.11.192.192/26\",\r\n \"52.143.136.41/32\",\r\n + \ \"2603:1020:805:402::c0/122\",\r\n \"2603:1020:805:802::c0/122\",\r\n + \ \"2603:1020:805:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.FranceSouth\",\r\n \"id\": \"AzureCosmosDB.FranceSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"40.79.178.0/28\",\r\n + \ \"51.105.92.192/27\",\r\n \"52.136.134.25/32\",\r\n \"52.136.134.250/32\",\r\n + \ \"52.136.136.70/32\",\r\n \"2603:1020:905:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.GermanyNorth\",\r\n + \ \"id\": \"AzureCosmosDB.GermanyNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"51.116.50.224/27\",\r\n \"51.116.58.64/26\",\r\n + \ \"2603:1020:d04:402::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.GermanyWestCentral\",\r\n \"id\": + \"AzureCosmosDB.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"51.116.146.224/27\",\r\n \"51.116.154.128/26\",\r\n + \ \"51.116.242.0/26\",\r\n \"51.116.250.0/26\",\r\n \"2603:1020:c04:402::c0/122\",\r\n + \ \"2603:1020:c04:802::c0/122\",\r\n \"2603:1020:c04:c02::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.JapanEast\",\r\n + \ \"id\": \"AzureCosmosDB.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"13.78.51.35/32\",\r\n \"13.78.106.0/26\",\r\n \"20.89.0.128/26\",\r\n + \ \"20.191.160.32/27\",\r\n \"40.79.186.16/28\",\r\n \"40.79.191.0/26\",\r\n + \ \"40.79.194.128/26\",\r\n \"40.115.241.37/32\",\r\n \"104.41.177.93/32\",\r\n + \ \"2603:1040:407:402::c0/122\",\r\n \"2603:1040:407:802::c0/122\",\r\n + \ \"2603:1040:407:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.JapanWest\",\r\n \"id\": \"AzureCosmosDB.JapanWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"40.74.98.0/26\",\r\n + \ \"40.74.143.235/32\",\r\n \"40.80.63.160/27\",\r\n \"104.215.1.53/32\",\r\n + \ \"104.215.21.39/32\",\r\n \"104.215.55.227/32\",\r\n \"2603:1040:606:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.JioIndiaCentral\",\r\n + \ \"id\": \"AzureCosmosDB.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.192.231.0/27\",\r\n + \ \"20.192.234.64/26\",\r\n \"2603:1040:1104::520/123\",\r\n + \ \"2603:1040:1104:400::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.JioIndiaWest\",\r\n \"id\": + \"AzureCosmosDB.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"20.192.166.192/27\",\r\n \"20.193.202.64/26\",\r\n + \ \"2603:1040:d04:1::60/123\",\r\n \"2603:1040:d04:400::c0/122\",\r\n + \ \"2603:1040:d04:400::280/122\",\r\n \"2603:1040:d04:400::3c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.KoreaCentral\",\r\n + \ \"id\": \"AzureCosmosDB.KoreaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"20.41.69.64/27\",\r\n \"20.44.26.0/26\",\r\n \"20.194.66.64/26\",\r\n + \ \"20.194.80.64/26\",\r\n \"52.231.18.0/28\",\r\n \"52.231.25.123/32\",\r\n + \ \"52.231.39.143/32\",\r\n \"52.231.56.0/28\",\r\n \"2603:1040:f05::680/123\",\r\n + \ \"2603:1040:f05:402::c0/122\",\r\n \"2603:1040:f05:802::c0/122\",\r\n + \ \"2603:1040:f05:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.KoreaSouth\",\r\n \"id\": \"AzureCosmosDB.KoreaSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"40.80.173.0/27\",\r\n + \ \"52.231.146.0/27\",\r\n \"52.231.206.234/32\",\r\n \"52.231.207.31/32\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.NorthCentralUS\",\r\n + \ \"id\": \"AzureCosmosDB.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.49.114.128/27\",\r\n + \ \"23.96.180.213/32\",\r\n \"23.96.219.207/32\",\r\n \"23.96.242.234/32\",\r\n + \ \"52.162.106.0/26\",\r\n \"52.162.252.26/32\",\r\n \"65.52.210.9/32\",\r\n + \ \"157.55.170.133/32\",\r\n \"2603:1030:608:1::4c0/123\",\r\n + \ \"2603:1030:608:402::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.NorthEurope\",\r\n \"id\": \"AzureCosmosDB.NorthEurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.69.226.0/25\",\r\n + \ \"13.74.106.0/25\",\r\n \"13.79.34.236/32\",\r\n \"40.113.90.91/32\",\r\n + \ \"52.138.141.112/32\",\r\n \"52.138.197.33/32\",\r\n \"52.138.201.47/32\",\r\n + \ \"52.138.205.97/32\",\r\n \"52.138.206.153/32\",\r\n \"52.138.227.192/26\",\r\n + \ \"52.146.131.0/27\",\r\n \"52.164.250.188/32\",\r\n \"52.169.122.37/32\",\r\n + \ \"52.169.219.183/32\",\r\n \"2603:1020:5:402::c0/122\",\r\n + \ \"2603:1020:5:802::c0/122\",\r\n \"2603:1020:5:c02::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.NorwayEast\",\r\n + \ \"id\": \"AzureCosmosDB.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"51.120.44.128/27\",\r\n \"51.120.98.64/26\",\r\n + \ \"51.120.106.0/26\",\r\n \"51.120.210.0/26\",\r\n \"2603:1020:e04::680/123\",\r\n + \ \"2603:1020:e04:402::c0/122\",\r\n \"2603:1020:e04:802::c0/122\",\r\n + \ \"2603:1020:e04:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.NorwayWest\",\r\n \"id\": \"AzureCosmosDB.NorwayWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"51.120.218.64/26\",\r\n + \ \"51.120.228.160/27\",\r\n \"2603:1020:f04:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.SouthAfricaNorth\",\r\n + \ \"id\": \"AzureCosmosDB.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"102.133.122.0/26\",\r\n + \ \"102.133.154.64/26\",\r\n \"102.133.220.0/27\",\r\n \"102.133.250.0/26\",\r\n + \ \"2603:1000:104:402::c0/122\",\r\n \"2603:1000:104:802::c0/122\",\r\n + \ \"2603:1000:104:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.SouthAfricaWest\",\r\n \"id\": + \"AzureCosmosDB.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"southafricawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"102.133.26.64/26\",\r\n \"102.133.60.64/27\",\r\n + \ \"2603:1000:4:402::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.SouthCentralUS\",\r\n \"id\": + \"AzureCosmosDB.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"southcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"13.65.145.92/32\",\r\n \"13.66.26.107/32\",\r\n + \ \"13.66.82.75/32\",\r\n \"13.73.254.224/27\",\r\n \"13.84.150.178/32\",\r\n + \ \"13.84.157.70/32\",\r\n \"13.85.16.188/32\",\r\n \"20.45.122.0/26\",\r\n + \ \"20.49.90.64/26\",\r\n \"23.102.191.13/32\",\r\n \"104.210.217.251/32\",\r\n + \ \"104.214.18.0/25\",\r\n \"104.214.23.192/27\",\r\n \"104.214.26.177/32\",\r\n + \ \"2603:1030:807:402::c0/122\",\r\n \"2603:1030:807:802::c0/122\",\r\n + \ \"2603:1030:807:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.SouthCentralUSSTG\",\r\n \"id\": + \"AzureCosmosDB.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"20.44.2.64/26\",\r\n \"20.45.115.160/27\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.SoutheastAsia\",\r\n + \ \"id\": \"AzureCosmosDB.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"13.67.8.0/26\",\r\n \"13.76.161.130/32\",\r\n \"23.98.82.0/26\",\r\n + \ \"23.98.107.224/27\",\r\n \"40.78.236.192/26\",\r\n \"52.163.63.20/32\",\r\n + \ \"52.163.249.82/32\",\r\n \"52.187.11.8/32\",\r\n \"52.187.12.93/32\",\r\n + \ \"52.230.15.63/32\",\r\n \"52.230.23.170/32\",\r\n \"52.230.70.94/32\",\r\n + \ \"52.230.87.21/32\",\r\n \"2603:1040:5:402::c0/122\",\r\n + \ \"2603:1040:5:802::c0/122\",\r\n \"2603:1040:5:c02::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.SouthIndia\",\r\n + \ \"id\": \"AzureCosmosDB.SouthIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"13.71.115.125/32\",\r\n \"13.71.124.81/32\",\r\n + \ \"20.41.199.128/27\",\r\n \"40.78.194.0/28\",\r\n \"52.172.55.127/32\",\r\n + \ \"104.211.227.84/32\",\r\n \"2603:1040:c06:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.SwedenCentral\",\r\n + \ \"id\": \"AzureCosmosDB.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"51.12.43.0/27\",\r\n \"51.12.98.64/26\",\r\n \"51.12.226.0/26\",\r\n + \ \"51.12.234.0/26\",\r\n \"2603:1020:1004:1::60/123\",\r\n + \ \"2603:1020:1004:400::c0/122\",\r\n \"2603:1020:1004:400::280/122\",\r\n + \ \"2603:1020:1004:400::3c0/122\",\r\n \"2603:1020:1004:800::400/122\",\r\n + \ \"2603:1020:1004:c02::1c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.SwitzerlandNorth\",\r\n \"id\": + \"AzureCosmosDB.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"20.208.18.0/26\",\r\n \"51.103.202.0/26\",\r\n \"51.107.52.224/27\",\r\n + \ \"51.107.58.64/26\",\r\n \"2603:1020:a04::6a0/123\",\r\n + \ \"2603:1020:a04:402::c0/122\",\r\n \"2603:1020:a04:802::c0/122\",\r\n + \ \"2603:1020:a04:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.SwitzerlandWest\",\r\n \"id\": + \"AzureCosmosDB.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"51.107.148.32/27\",\r\n \"51.107.154.64/26\",\r\n + \ \"2603:1020:b04:402::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.UAECentral\",\r\n \"id\": \"AzureCosmosDB.UAECentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.37.68.160/27\",\r\n + \ \"20.37.75.128/26\",\r\n \"2603:1040:b04:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.UAENorth\",\r\n + \ \"id\": \"AzureCosmosDB.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"20.38.140.128/27\",\r\n \"40.120.74.64/26\",\r\n + \ \"65.52.251.128/26\",\r\n \"2603:1040:904:402::c0/122\",\r\n + \ \"2603:1040:904:802::c0/122\",\r\n \"2603:1040:904:c02::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.UKSouth\",\r\n + \ \"id\": \"AzureCosmosDB.UKSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"51.104.31.128/27\",\r\n \"51.105.66.0/26\",\r\n + \ \"51.105.74.0/26\",\r\n \"51.140.52.73/32\",\r\n \"51.140.70.75/32\",\r\n + \ \"51.140.75.146/32\",\r\n \"51.140.83.56/32\",\r\n \"51.140.99.233/32\",\r\n + \ \"51.140.146.0/27\",\r\n \"51.143.189.37/32\",\r\n \"2603:1020:705:402::c0/122\",\r\n + \ \"2603:1020:705:802::c0/122\",\r\n \"2603:1020:705:c02::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.UKWest\",\r\n + \ \"id\": \"AzureCosmosDB.UKWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"51.137.166.128/27\",\r\n \"51.140.210.0/27\",\r\n + \ \"51.141.11.34/32\",\r\n \"51.141.25.77/32\",\r\n \"51.141.53.76/32\",\r\n + \ \"51.141.55.229/32\",\r\n \"2603:1020:605:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.WestCentralUS\",\r\n + \ \"id\": \"AzureCosmosDB.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"13.71.194.0/26\",\r\n \"13.78.188.25/32\",\r\n \"52.150.154.224/27\",\r\n + \ \"52.161.13.67/32\",\r\n \"52.161.15.197/32\",\r\n \"52.161.22.131/32\",\r\n + \ \"52.161.100.126/32\",\r\n \"2603:1030:b04:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.WestEurope\",\r\n + \ \"id\": \"AzureCosmosDB.WestEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"13.69.66.0/25\",\r\n \"13.69.66.128/29\",\r\n \"13.69.112.0/25\",\r\n + \ \"13.81.51.99/32\",\r\n \"13.94.201.5/32\",\r\n \"13.95.234.68/32\",\r\n + \ \"20.61.97.0/27\",\r\n \"40.68.44.85/32\",\r\n \"40.114.240.253/32\",\r\n + \ \"51.144.177.166/32\",\r\n \"51.144.182.233/32\",\r\n \"52.174.253.239/32\",\r\n + \ \"52.178.108.222/32\",\r\n \"52.232.59.220/32\",\r\n \"52.233.128.86/32\",\r\n + \ \"52.236.189.0/26\",\r\n \"104.45.16.183/32\",\r\n \"2603:1020:206:402::c0/122\",\r\n + \ \"2603:1020:206:802::c0/122\",\r\n \"2603:1020:206:c02::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.WestIndia\",\r\n + \ \"id\": \"AzureCosmosDB.WestIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"52.136.52.64/27\",\r\n \"104.211.146.0/28\",\r\n + \ \"104.211.162.94/32\",\r\n \"104.211.184.117/32\",\r\n + \ \"104.211.188.174/32\",\r\n \"2603:1040:806:402::c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureCosmosDB.WestUS\",\r\n + \ \"id\": \"AzureCosmosDB.WestUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureCosmosDB\",\r\n \"addressPrefixes\": + [\r\n \"13.64.69.151/32\",\r\n \"13.64.113.68/32\",\r\n + \ \"13.64.114.48/32\",\r\n \"13.64.194.140/32\",\r\n \"13.88.30.39/32\",\r\n + \ \"13.91.246.52/32\",\r\n \"13.93.153.80/32\",\r\n \"13.93.156.125/32\",\r\n + \ \"13.93.207.66/32\",\r\n \"20.49.126.160/27\",\r\n \"40.83.137.191/32\",\r\n + \ \"40.112.140.12/32\",\r\n \"40.112.241.0/24\",\r\n \"40.112.249.60/32\",\r\n + \ \"40.118.245.44/32\",\r\n \"40.118.245.251/32\",\r\n \"137.117.9.157/32\",\r\n + \ \"2603:1030:a07:402::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.WestUS2\",\r\n \"id\": \"AzureCosmosDB.WestUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"13.66.138.0/26\",\r\n + \ \"20.36.26.132/32\",\r\n \"40.64.135.0/27\",\r\n \"40.65.106.154/32\",\r\n + \ \"40.65.114.105/32\",\r\n \"40.78.243.192/26\",\r\n \"40.78.250.0/26\",\r\n + \ \"52.151.16.118/32\",\r\n \"52.158.234.203/32\",\r\n \"52.183.42.252/32\",\r\n + \ \"52.183.66.36/32\",\r\n \"52.183.92.223/32\",\r\n \"52.183.119.101/32\",\r\n + \ \"2603:1030:c06:400::8c0/122\",\r\n \"2603:1030:c06:802::c0/122\",\r\n + \ \"2603:1030:c06:c02::c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureCosmosDB.WestUS3\",\r\n \"id\": \"AzureCosmosDB.WestUS3\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureCosmosDB\",\r\n \"addressPrefixes\": [\r\n \"20.150.166.192/27\",\r\n + \ \"20.150.170.64/26\",\r\n \"20.150.178.0/26\",\r\n \"20.150.186.0/26\",\r\n + \ \"2603:1030:504::60/123\",\r\n \"2603:1030:504:402::c0/122\",\r\n + \ \"2603:1030:504:402::280/122\",\r\n \"2603:1030:504:402::3c0/122\",\r\n + \ \"2603:1030:504:802::200/122\",\r\n \"2603:1030:504:c02::3c0/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureDatabricks\",\r\n + \ \"id\": \"AzureDatabricks\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureDatabricks\",\r\n \"addressPrefixes\": + [\r\n \"13.70.105.50/32\",\r\n \"13.70.107.141/32\",\r\n + \ \"13.71.184.74/32\",\r\n \"13.71.187.166/32\",\r\n \"13.75.164.249/32\",\r\n + \ \"13.75.218.172/32\",\r\n \"13.78.18.152/32\",\r\n \"13.78.19.235/32\",\r\n + \ \"13.86.58.215/32\",\r\n \"13.88.249.244/32\",\r\n \"20.21.32.32/29\",\r\n + \ \"20.36.120.68/30\",\r\n \"20.37.64.68/30\",\r\n \"20.37.156.208/28\",\r\n + \ \"20.37.195.16/29\",\r\n \"20.37.224.68/30\",\r\n \"20.38.84.80/28\",\r\n + \ \"20.38.136.120/29\",\r\n \"20.39.8.68/30\",\r\n \"20.41.4.112/28\",\r\n + \ \"20.41.65.136/29\",\r\n \"20.41.192.68/30\",\r\n \"20.42.4.208/28\",\r\n + \ \"20.42.129.160/28\",\r\n \"20.42.224.68/30\",\r\n \"20.43.41.152/29\",\r\n + \ \"20.43.65.144/29\",\r\n \"20.43.130.96/28\",\r\n \"20.45.112.68/30\",\r\n + \ \"20.45.192.68/30\",\r\n \"20.46.12.200/29\",\r\n \"20.46.121.76/32\",\r\n + \ \"20.52.93.40/29\",\r\n \"20.72.16.32/29\",\r\n \"20.99.8.64/29\",\r\n + \ \"20.150.160.104/30\",\r\n \"20.150.160.208/29\",\r\n \"20.186.83.56/32\",\r\n + \ \"20.189.106.192/28\",\r\n \"20.192.160.32/29\",\r\n \"20.192.225.24/29\",\r\n + \ \"20.194.4.102/32\",\r\n \"23.97.106.142/32\",\r\n \"23.97.201.41/32\",\r\n + \ \"23.100.0.135/32\",\r\n \"23.100.226.13/32\",\r\n \"23.101.147.147/32\",\r\n + \ \"23.101.152.95/32\",\r\n \"40.67.48.68/30\",\r\n \"40.70.58.221/32\",\r\n + \ \"40.74.30.80/28\",\r\n \"40.80.56.68/30\",\r\n \"40.80.168.68/30\",\r\n + \ \"40.80.188.0/28\",\r\n \"40.82.248.112/28\",\r\n \"40.83.176.199/32\",\r\n + \ \"40.83.178.242/32\",\r\n \"40.85.223.25/32\",\r\n \"40.86.167.110/32\",\r\n + \ \"40.89.16.68/30\",\r\n \"40.89.168.225/32\",\r\n \"40.89.170.184/32\",\r\n + \ \"40.89.171.101/32\",\r\n \"40.118.174.12/32\",\r\n \"40.119.9.208/28\",\r\n + \ \"40.123.212.253/32\",\r\n \"40.123.218.63/32\",\r\n \"40.123.219.125/32\",\r\n + \ \"40.123.225.135/32\",\r\n \"40.127.5.82/32\",\r\n \"40.127.5.124/32\",\r\n + \ \"40.127.147.196/32\",\r\n \"51.12.41.16/30\",\r\n \"51.12.47.16/29\",\r\n + \ \"51.12.193.16/30\",\r\n \"51.12.198.200/29\",\r\n \"51.103.18.111/32\",\r\n + \ \"51.104.25.136/30\",\r\n \"51.105.80.68/30\",\r\n \"51.105.88.68/30\",\r\n + \ \"51.107.48.120/30\",\r\n \"51.107.144.68/30\",\r\n \"51.107.246.160/29\",\r\n + \ \"51.116.74.16/29\",\r\n \"51.120.40.120/30\",\r\n \"51.120.224.68/30\",\r\n + \ \"51.120.234.176/29\",\r\n \"51.137.160.120/29\",\r\n \"51.138.96.158/32\",\r\n + \ \"51.140.200.46/32\",\r\n \"51.140.203.27/32\",\r\n \"51.140.204.4/32\",\r\n + \ \"51.141.103.193/32\",\r\n \"51.143.192.68/30\",\r\n \"52.136.48.68/30\",\r\n + \ \"52.140.104.120/29\",\r\n \"52.141.6.71/32\",\r\n \"52.141.6.181/32\",\r\n + \ \"52.141.22.164/32\",\r\n \"52.146.50.16/32\",\r\n \"52.150.136.68/30\",\r\n + \ \"52.172.133.58/32\",\r\n \"52.187.0.85/32\",\r\n \"52.187.3.203/32\",\r\n + \ \"52.187.145.107/32\",\r\n \"52.228.81.136/29\",\r\n \"52.230.27.216/32\",\r\n + \ \"52.232.19.246/32\",\r\n \"52.246.160.72/32\",\r\n \"52.247.0.200/32\",\r\n + \ \"102.37.41.3/32\",\r\n \"102.133.56.68/30\",\r\n \"102.133.216.96/29\",\r\n + \ \"102.133.224.24/32\",\r\n \"104.41.54.118/32\",\r\n \"104.45.7.191/32\",\r\n + \ \"104.211.89.81/32\",\r\n \"104.211.101.14/32\",\r\n \"104.211.103.82/32\",\r\n + \ \"191.232.53.223/32\",\r\n \"191.233.8.32/29\",\r\n \"191.234.160.82/32\",\r\n + \ \"191.235.225.144/29\",\r\n \"2603:1000:4::160/123\",\r\n + \ \"2603:1000:104:1::160/123\",\r\n \"2603:1010:6:1::160/123\",\r\n + \ \"2603:1010:101::160/123\",\r\n \"2603:1010:304::160/123\",\r\n + \ \"2603:1010:404::160/123\",\r\n \"2603:1020:5:1::160/123\",\r\n + \ \"2603:1020:206:1::160/123\",\r\n \"2603:1020:305::160/123\",\r\n + \ \"2603:1020:405::160/123\",\r\n \"2603:1020:605::160/123\",\r\n + \ \"2603:1020:705:1::160/123\",\r\n \"2603:1020:805:1::160/123\",\r\n + \ \"2603:1020:905::160/123\",\r\n \"2603:1020:a04:1::160/123\",\r\n + \ \"2603:1020:b04::160/123\",\r\n \"2603:1020:c04:1::160/123\",\r\n + \ \"2603:1020:d04::160/123\",\r\n \"2603:1020:e04:1::160/123\",\r\n + \ \"2603:1020:f04::160/123\",\r\n \"2603:1020:1004::160/123\",\r\n + \ \"2603:1020:1104::160/123\",\r\n \"2603:1030:f:1::160/123\",\r\n + \ \"2603:1030:10:1::160/123\",\r\n \"2603:1030:104:1::160/123\",\r\n + \ \"2603:1030:107::160/123\",\r\n \"2603:1030:210:1::160/123\",\r\n + \ \"2603:1030:40b:1::160/123\",\r\n \"2603:1030:40c:1::160/123\",\r\n + \ \"2603:1030:504:1::160/123\",\r\n \"2603:1030:608::160/123\",\r\n + \ \"2603:1030:807:1::160/123\",\r\n \"2603:1030:a07::160/123\",\r\n + \ \"2603:1030:b04::160/123\",\r\n \"2603:1030:c06:1::160/123\",\r\n + \ \"2603:1030:f05:1::160/123\",\r\n \"2603:1030:1005::160/123\",\r\n + \ \"2603:1040:5:1::160/123\",\r\n \"2603:1040:207::160/123\",\r\n + \ \"2603:1040:407:1::160/123\",\r\n \"2603:1040:606::160/123\",\r\n + \ \"2603:1040:806::160/123\",\r\n \"2603:1040:904:1::160/123\",\r\n + \ \"2603:1040:a06:1::160/123\",\r\n \"2603:1040:b04::160/123\",\r\n + \ \"2603:1040:c06::160/123\",\r\n \"2603:1040:d04::160/123\",\r\n + \ \"2603:1040:f05:1::160/123\",\r\n \"2603:1040:1002::e0/123\",\r\n + \ \"2603:1040:1104::160/123\",\r\n \"2603:1050:6:1::160/123\",\r\n + \ \"2603:1050:403::160/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureDataExplorerManagement\",\r\n \"id\": + \"AzureDataExplorerManagement\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureDataExplorerManagement\",\r\n + \ \"addressPrefixes\": [\r\n \"13.64.38.225/32\",\r\n \"13.66.141.160/28\",\r\n + \ \"13.69.106.240/28\",\r\n \"13.69.229.176/28\",\r\n \"13.70.73.112/28\",\r\n + \ \"13.71.173.64/28\",\r\n \"13.71.196.64/28\",\r\n \"13.73.240.96/28\",\r\n + \ \"13.75.39.0/28\",\r\n \"13.77.52.240/28\",\r\n \"13.86.36.42/32\",\r\n + \ \"13.86.219.64/28\",\r\n \"13.87.57.224/28\",\r\n \"13.87.123.224/28\",\r\n + \ \"13.89.174.80/28\",\r\n \"20.21.37.0/28\",\r\n \"20.36.242.104/32\",\r\n + \ \"20.37.24.1/32\",\r\n \"20.39.97.38/32\",\r\n \"20.39.99.177/32\",\r\n + \ \"20.40.114.21/32\",\r\n \"20.40.161.39/32\",\r\n \"20.43.89.90/32\",\r\n + \ \"20.43.120.96/28\",\r\n \"20.44.16.96/28\",\r\n \"20.44.27.96/28\",\r\n + \ \"20.45.3.60/32\",\r\n \"20.46.13.240/28\",\r\n \"20.46.146.7/32\",\r\n + \ \"20.72.27.128/28\",\r\n \"20.99.9.224/28\",\r\n \"20.150.171.192/28\",\r\n + \ \"20.150.245.112/28\",\r\n \"20.185.100.27/32\",\r\n \"20.189.74.103/32\",\r\n + \ \"20.192.47.96/28\",\r\n \"20.192.235.128/28\",\r\n \"20.193.203.96/28\",\r\n + \ \"20.194.75.224/28\",\r\n \"20.195.78.80/28\",\r\n \"23.98.82.240/28\",\r\n + \ \"40.66.57.57/32\",\r\n \"40.66.57.91/32\",\r\n \"40.67.188.68/32\",\r\n + \ \"40.69.107.240/28\",\r\n \"40.71.13.176/28\",\r\n \"40.74.101.208/28\",\r\n + \ \"40.74.147.80/28\",\r\n \"40.78.195.240/28\",\r\n \"40.78.203.176/28\",\r\n + \ \"40.79.131.224/28\",\r\n \"40.79.179.208/28\",\r\n \"40.79.187.16/28\",\r\n + \ \"40.80.234.9/32\",\r\n \"40.80.250.168/32\",\r\n \"40.80.255.12/32\",\r\n + \ \"40.81.28.50/32\",\r\n \"40.81.43.47/32\",\r\n \"40.81.56.122/32\",\r\n + \ \"40.81.72.110/32\",\r\n \"40.81.88.112/32\",\r\n \"40.81.89.242/32\",\r\n + \ \"40.81.122.39/32\",\r\n \"40.81.154.254/32\",\r\n \"40.81.184.86/32\",\r\n + \ \"40.81.220.38/32\",\r\n \"40.81.248.53/32\",\r\n \"40.81.249.251/32\",\r\n + \ \"40.82.154.174/32\",\r\n \"40.82.156.149/32\",\r\n \"40.82.188.208/32\",\r\n + \ \"40.82.217.84/32\",\r\n \"40.82.236.24/32\",\r\n \"40.89.56.69/32\",\r\n + \ \"40.90.219.23/32\",\r\n \"40.91.74.95/32\",\r\n \"40.119.3.195/32\",\r\n + \ \"40.119.203.252/32\",\r\n \"51.12.20.48/28\",\r\n \"51.12.28.48/28\",\r\n + \ \"51.12.99.192/28\",\r\n \"51.12.203.192/28\",\r\n \"51.104.8.112/28\",\r\n + \ \"51.107.59.160/28\",\r\n \"51.107.98.201/32\",\r\n \"51.107.155.160/28\",\r\n + \ \"51.107.247.128/28\",\r\n \"51.116.59.160/28\",\r\n \"51.116.98.150/32\",\r\n + \ \"51.116.155.224/28\",\r\n \"51.120.99.80/28\",\r\n \"51.120.219.192/28\",\r\n + \ \"51.120.235.224/28\",\r\n \"51.140.212.0/28\",\r\n \"51.145.176.215/32\",\r\n + \ \"52.142.91.221/32\",\r\n \"52.159.55.120/32\",\r\n \"52.162.110.176/28\",\r\n + \ \"52.224.146.56/32\",\r\n \"52.231.148.16/28\",\r\n \"52.232.230.201/32\",\r\n + \ \"52.253.159.186/32\",\r\n \"52.253.225.186/32\",\r\n \"52.253.226.110/32\",\r\n + \ \"102.133.0.192/32\",\r\n \"102.133.28.112/28\",\r\n \"102.133.130.206/32\",\r\n + \ \"102.133.156.16/28\",\r\n \"104.211.147.224/28\",\r\n + \ \"191.233.25.183/32\",\r\n \"191.233.50.208/28\",\r\n \"191.233.205.0/28\",\r\n + \ \"2603:1000:4:1::380/121\",\r\n \"2603:1000:4:402::150/124\",\r\n + \ \"2603:1000:104:2::100/121\",\r\n \"2603:1000:104:402::150/124\",\r\n + \ \"2603:1010:6::600/121\",\r\n \"2603:1010:6:402::150/124\",\r\n + \ \"2603:1010:101:1::380/121\",\r\n \"2603:1010:101:402::150/124\",\r\n + \ \"2603:1010:304:1::380/121\",\r\n \"2603:1010:304:402::150/124\",\r\n + \ \"2603:1010:404:1::380/121\",\r\n \"2603:1010:404:402::150/124\",\r\n + \ \"2603:1020:5::600/121\",\r\n \"2603:1020:5:402::150/124\",\r\n + \ \"2603:1020:206::600/121\",\r\n \"2603:1020:206:402::150/124\",\r\n + \ \"2603:1020:305:402::150/124\",\r\n \"2603:1020:405:402::150/124\",\r\n + \ \"2603:1020:605:1::380/121\",\r\n \"2603:1020:605:402::150/124\",\r\n + \ \"2603:1020:705::600/121\",\r\n \"2603:1020:705:402::150/124\",\r\n + \ \"2603:1020:805::600/121\",\r\n \"2603:1020:805:402::150/124\",\r\n + \ \"2603:1020:905:1::380/121\",\r\n \"2603:1020:905:402::150/124\",\r\n + \ \"2603:1020:a04::600/121\",\r\n \"2603:1020:a04:402::150/124\",\r\n + \ \"2603:1020:b04:1::380/121\",\r\n \"2603:1020:b04:402::150/124\",\r\n + \ \"2603:1020:c04::600/121\",\r\n \"2603:1020:c04:402::150/124\",\r\n + \ \"2603:1020:d04:1::380/121\",\r\n \"2603:1020:d04:402::150/124\",\r\n + \ \"2603:1020:e04::600/121\",\r\n \"2603:1020:e04:402::150/124\",\r\n + \ \"2603:1020:f04:1::380/121\",\r\n \"2603:1020:f04:402::150/124\",\r\n + \ \"2603:1020:1004:2::100/121\",\r\n \"2603:1020:1004:800::d0/124\",\r\n + \ \"2603:1020:1104:1::600/121\",\r\n \"2603:1020:1104:400::150/124\",\r\n + \ \"2603:1030:f:2::380/121\",\r\n \"2603:1030:f:400::950/124\",\r\n + \ \"2603:1030:10::600/121\",\r\n \"2603:1030:10:402::150/124\",\r\n + \ \"2603:1030:104::600/121\",\r\n \"2603:1030:104:402::150/124\",\r\n + \ \"2603:1030:107:1::300/121\",\r\n \"2603:1030:107:400::e0/124\",\r\n + \ \"2603:1030:210::600/121\",\r\n \"2603:1030:210:402::150/124\",\r\n + \ \"2603:1030:40b:2::400/121\",\r\n \"2603:1030:40b:400::950/124\",\r\n + \ \"2603:1030:40c::600/121\",\r\n \"2603:1030:40c:402::150/124\",\r\n + \ \"2603:1030:504:2::180/121\",\r\n \"2603:1030:504:802::d0/124\",\r\n + \ \"2603:1030:608:1::380/121\",\r\n \"2603:1030:608:402::150/124\",\r\n + \ \"2603:1030:807::600/121\",\r\n \"2603:1030:807:402::150/124\",\r\n + \ \"2603:1030:a07:1::380/121\",\r\n \"2603:1030:a07:402::8d0/124\",\r\n + \ \"2603:1030:b04:1::380/121\",\r\n \"2603:1030:b04:402::150/124\",\r\n + \ \"2603:1030:c06:2::400/121\",\r\n \"2603:1030:c06:400::950/124\",\r\n + \ \"2603:1030:f05::600/121\",\r\n \"2603:1030:f05:402::150/124\",\r\n + \ \"2603:1030:1005:1::380/121\",\r\n \"2603:1030:1005:402::150/124\",\r\n + \ \"2603:1040:5::700/121\",\r\n \"2603:1040:5:402::150/124\",\r\n + \ \"2603:1040:207:1::380/121\",\r\n \"2603:1040:207:402::150/124\",\r\n + \ \"2603:1040:407::600/121\",\r\n \"2603:1040:407:402::150/124\",\r\n + \ \"2603:1040:606:1::380/121\",\r\n \"2603:1040:606:402::150/124\",\r\n + \ \"2603:1040:806:1::380/121\",\r\n \"2603:1040:806:402::150/124\",\r\n + \ \"2603:1040:904::600/121\",\r\n \"2603:1040:904:402::150/124\",\r\n + \ \"2603:1040:a06::700/121\",\r\n \"2603:1040:a06:402::150/124\",\r\n + \ \"2603:1040:b04:1::380/121\",\r\n \"2603:1040:b04:402::150/124\",\r\n + \ \"2603:1040:c06:1::380/121\",\r\n \"2603:1040:c06:402::150/124\",\r\n + \ \"2603:1040:d04:2::280/121\",\r\n \"2603:1040:d04:800::d0/124\",\r\n + \ \"2603:1040:e05::180/121\",\r\n \"2603:1040:f05::600/121\",\r\n + \ \"2603:1040:f05:402::150/124\",\r\n \"2603:1040:1002:1::180/123\",\r\n + \ \"2603:1040:1104:1::680/121\",\r\n \"2603:1040:1104:400::150/124\",\r\n + \ \"2603:1050:6::600/121\",\r\n \"2603:1050:6:402::150/124\",\r\n + \ \"2603:1050:403:1::400/121\",\r\n \"2603:1050:403:400::2b0/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureDataLake\",\r\n + \ \"id\": \"AzureDataLake\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureDataLake\",\r\n \"addressPrefixes\": + [\r\n \"40.90.138.133/32\",\r\n \"40.90.138.136/32\",\r\n + \ \"40.90.141.128/29\",\r\n \"40.90.141.167/32\",\r\n \"40.90.144.0/27\",\r\n + \ \"40.90.145.192/26\",\r\n \"65.52.108.31/32\",\r\n \"65.52.108.38/32\",\r\n + \ \"104.44.88.66/31\",\r\n \"104.44.88.106/31\",\r\n \"104.44.88.112/31\",\r\n + \ \"104.44.88.176/31\",\r\n \"104.44.88.184/29\",\r\n \"104.44.89.39/32\",\r\n + \ \"104.44.89.42/32\",\r\n \"104.44.90.128/27\",\r\n \"104.44.90.194/31\",\r\n + \ \"104.44.91.64/27\",\r\n \"104.44.91.160/27\",\r\n \"104.44.93.192/27\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureDeviceUpdate\",\r\n + \ \"id\": \"AzureDeviceUpdate\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureDeviceUpdate\",\r\n \"addressPrefixes\": + [\r\n \"20.37.71.192/28\",\r\n \"20.38.143.224/28\",\r\n + \ \"20.40.229.32/28\",\r\n \"20.45.116.224/28\",\r\n \"20.45.241.192/26\",\r\n + \ \"20.46.11.192/28\",\r\n \"20.48.196.112/28\",\r\n \"20.49.119.192/28\",\r\n + \ \"20.51.12.64/26\",\r\n \"20.51.20.64/28\",\r\n \"20.53.47.16/28\",\r\n + \ \"20.53.48.160/28\",\r\n \"20.53.56.96/28\",\r\n \"20.58.67.0/28\",\r\n + \ \"20.59.77.64/26\",\r\n \"20.61.102.96/28\",\r\n \"20.62.59.16/28\",\r\n + \ \"20.62.132.240/28\",\r\n \"20.62.135.128/27\",\r\n \"20.62.135.160/28\",\r\n + \ \"20.65.133.64/28\",\r\n \"20.66.3.208/28\",\r\n \"20.69.0.112/28\",\r\n + \ \"20.69.4.64/26\",\r\n \"20.69.4.128/26\",\r\n \"20.86.93.128/26\",\r\n + \ \"20.150.244.16/28\",\r\n \"20.189.225.240/28\",\r\n \"20.191.165.240/28\",\r\n + \ \"20.192.43.240/28\",\r\n \"20.192.48.112/28\",\r\n \"20.192.80.0/28\",\r\n + \ \"20.192.167.208/28\",\r\n \"20.194.73.224/28\",\r\n \"20.195.65.112/28\",\r\n + \ \"20.195.72.112/28\",\r\n \"20.205.67.192/26\",\r\n \"40.67.53.144/28\",\r\n + \ \"51.12.46.112/28\",\r\n \"51.12.198.96/28\",\r\n \"51.13.137.48/28\",\r\n + \ \"51.107.242.112/28\",\r\n \"51.107.250.224/28\",\r\n \"51.116.54.160/28\",\r\n + \ \"51.116.149.192/28\",\r\n \"51.120.233.80/28\",\r\n \"51.138.210.80/28\",\r\n + \ \"51.143.212.48/28\",\r\n \"52.136.185.128/28\",\r\n \"52.139.107.80/28\",\r\n + \ \"52.146.136.16/28\",\r\n \"52.147.112.192/28\",\r\n \"52.172.113.176/28\",\r\n + \ \"102.37.80.176/28\",\r\n \"102.37.160.128/28\",\r\n \"104.46.179.224/28\",\r\n + \ \"191.233.15.240/28\",\r\n \"191.234.142.240/28\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"AzureDevOps\",\r\n \"id\": + \"AzureDevOps\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": + {\r\n \"changeNumber\": \"1\",\r\n \"region\": \"\",\r\n \"state\": + \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureDevOps\",\r\n \"addressPrefixes\": [\r\n \"20.37.158.0/23\",\r\n + \ \"20.37.194.0/24\",\r\n \"20.39.13.0/26\",\r\n \"20.41.6.0/23\",\r\n + \ \"20.41.194.0/24\",\r\n \"20.42.5.0/24\",\r\n \"20.42.134.0/23\",\r\n + \ \"20.42.226.0/24\",\r\n \"20.45.196.64/26\",\r\n \"20.189.107.0/24\",\r\n + \ \"20.195.68.0/24\",\r\n \"40.74.28.0/23\",\r\n \"40.80.187.0/24\",\r\n + \ \"40.82.252.0/24\",\r\n \"40.119.10.0/24\",\r\n \"51.104.26.0/24\",\r\n + \ \"52.150.138.0/24\",\r\n \"52.228.82.0/24\",\r\n \"191.235.226.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureDevSpaces\",\r\n + \ \"id\": \"AzureDevSpaces\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureDevSpaces\",\r\n \"addressPrefixes\": + [\r\n \"13.69.71.144/28\",\r\n \"13.70.78.176/28\",\r\n + \ \"13.71.175.112/28\",\r\n \"13.71.199.96/28\",\r\n \"13.73.244.128/28\",\r\n + \ \"13.74.111.128/28\",\r\n \"13.78.111.144/28\",\r\n \"13.86.221.224/28\",\r\n + \ \"20.37.157.64/28\",\r\n \"20.37.195.80/28\",\r\n \"20.38.85.128/28\",\r\n + \ \"20.39.11.64/28\",\r\n \"20.41.5.128/28\",\r\n \"20.42.6.32/27\",\r\n + \ \"20.42.6.128/28\",\r\n \"20.42.64.64/26\",\r\n \"20.42.131.192/27\",\r\n + \ \"20.42.230.64/28\",\r\n \"20.43.65.208/28\",\r\n \"20.43.130.240/28\",\r\n + \ \"20.189.108.32/28\",\r\n \"40.69.110.176/28\",\r\n \"40.70.151.80/28\",\r\n + \ \"40.74.30.144/28\",\r\n \"40.75.35.224/28\",\r\n \"40.78.239.0/28\",\r\n + \ \"40.78.251.224/27\",\r\n \"40.82.253.112/28\",\r\n \"40.89.17.192/28\",\r\n + \ \"40.119.9.240/28\",\r\n \"51.104.25.208/28\",\r\n \"51.105.77.64/28\",\r\n + \ \"52.150.139.144/28\",\r\n \"52.182.141.128/28\",\r\n \"52.228.81.224/28\",\r\n + \ \"104.214.161.48/28\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureDigitalTwins\",\r\n \"id\": \"AzureDigitalTwins\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"7\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureDigitalTwins\",\r\n \"addressPrefixes\": + [\r\n \"20.21.36.64/27\",\r\n \"20.36.125.120/29\",\r\n + \ \"20.36.125.192/27\",\r\n \"20.37.70.112/29\",\r\n \"20.37.70.192/27\",\r\n + \ \"20.38.142.112/29\",\r\n \"20.38.142.192/27\",\r\n \"20.39.2.134/32\",\r\n + \ \"20.39.2.208/32\",\r\n \"20.39.2.237/32\",\r\n \"20.39.3.11/32\",\r\n + \ \"20.39.3.14/32\",\r\n \"20.39.3.17/32\",\r\n \"20.39.3.38/32\",\r\n + \ \"20.39.18.169/32\",\r\n \"20.40.225.48/29\",\r\n \"20.40.225.128/27\",\r\n + \ \"20.43.47.72/29\",\r\n \"20.43.47.96/27\",\r\n \"20.45.116.80/29\",\r\n + \ \"20.45.116.96/27\",\r\n \"20.46.10.56/29\",\r\n \"20.46.10.96/27\",\r\n + \ \"20.48.193.128/27\",\r\n \"20.48.193.160/29\",\r\n \"20.49.103.112/29\",\r\n + \ \"20.49.103.192/27\",\r\n \"20.49.118.8/29\",\r\n \"20.49.118.32/27\",\r\n + \ \"20.49.248.209/32\",\r\n \"20.49.249.56/32\",\r\n \"20.49.249.78/32\",\r\n + \ \"20.49.249.101/32\",\r\n \"20.49.249.106/32\",\r\n \"20.49.249.156/32\",\r\n + \ \"20.49.249.189/32\",\r\n \"20.49.249.208/32\",\r\n \"20.49.249.236/32\",\r\n + \ \"20.49.250.2/32\",\r\n \"20.50.211.192/32\",\r\n \"20.50.212.99/32\",\r\n + \ \"20.50.212.103/32\",\r\n \"20.50.212.140/32\",\r\n \"20.50.213.6/32\",\r\n + \ \"20.50.213.76/32\",\r\n \"20.50.213.88/32\",\r\n \"20.50.213.93/32\",\r\n + \ \"20.50.213.94/32\",\r\n \"20.50.213.120/32\",\r\n \"20.51.8.96/27\",\r\n + \ \"20.51.8.192/29\",\r\n \"20.51.16.176/29\",\r\n \"20.51.17.0/27\",\r\n + \ \"20.51.73.8/32\",\r\n \"20.51.73.11/32\",\r\n \"20.51.73.22/31\",\r\n + \ \"20.51.73.25/32\",\r\n \"20.51.73.26/31\",\r\n \"20.51.73.36/32\",\r\n + \ \"20.51.73.39/32\",\r\n \"20.51.73.44/32\",\r\n \"20.53.44.88/29\",\r\n + \ \"20.53.44.96/27\",\r\n \"20.53.48.0/27\",\r\n \"20.53.48.32/29\",\r\n + \ \"20.53.114.26/32\",\r\n \"20.53.114.71/32\",\r\n \"20.53.114.84/32\",\r\n + \ \"20.53.114.118/32\",\r\n \"20.58.66.0/27\",\r\n \"20.58.66.32/29\",\r\n + \ \"20.61.98.144/29\",\r\n \"20.61.99.0/27\",\r\n \"20.62.129.32/27\",\r\n + \ \"20.62.129.128/29\",\r\n \"20.65.130.72/29\",\r\n \"20.65.130.96/27\",\r\n + \ \"20.66.2.16/29\",\r\n \"20.66.2.128/27\",\r\n \"20.72.20.0/27\",\r\n + \ \"20.150.166.176/29\",\r\n \"20.150.167.128/27\",\r\n \"20.185.75.6/32\",\r\n + \ \"20.185.75.209/32\",\r\n \"20.187.197.16/29\",\r\n \"20.187.197.128/27\",\r\n + \ \"20.189.224.224/27\",\r\n \"20.189.225.64/29\",\r\n \"20.191.161.96/27\",\r\n + \ \"20.191.161.192/29\",\r\n \"20.192.166.176/29\",\r\n \"20.192.167.128/27\",\r\n + \ \"20.192.231.192/27\",\r\n \"20.192.231.224/29\",\r\n \"20.193.3.89/32\",\r\n + \ \"20.193.3.243/32\",\r\n \"20.193.7.70/32\",\r\n \"20.193.7.132/32\",\r\n + \ \"20.193.59.172/32\",\r\n \"20.193.59.253/32\",\r\n \"20.194.72.136/29\",\r\n + \ \"20.194.72.160/27\",\r\n \"23.98.108.184/29\",\r\n \"23.98.109.0/27\",\r\n + \ \"40.67.52.104/29\",\r\n \"40.67.52.192/27\",\r\n \"40.80.173.208/29\",\r\n + \ \"40.80.173.224/27\",\r\n \"40.119.241.130/32\",\r\n \"40.119.241.148/32\",\r\n + \ \"40.119.241.154/32\",\r\n \"40.119.242.73/32\",\r\n \"40.119.242.79/32\",\r\n + \ \"40.119.242.168/32\",\r\n \"40.119.242.232/32\",\r\n \"40.119.243.20/32\",\r\n + \ \"40.119.243.119/32\",\r\n \"40.119.243.178/32\",\r\n \"40.124.97.243/32\",\r\n + \ \"40.124.98.14/31\",\r\n \"40.124.98.23/32\",\r\n \"40.124.98.34/31\",\r\n + \ \"40.124.98.48/32\",\r\n \"40.124.98.52/32\",\r\n \"40.124.98.70/32\",\r\n + \ \"40.124.99.100/32\",\r\n \"51.12.43.144/29\",\r\n \"51.12.43.160/27\",\r\n + \ \"51.12.194.120/29\",\r\n \"51.12.195.192/27\",\r\n \"51.13.136.128/27\",\r\n + \ \"51.13.136.160/29\",\r\n \"51.104.141.227/32\",\r\n \"51.107.241.64/27\",\r\n + \ \"51.107.241.96/29\",\r\n \"51.107.249.80/29\",\r\n \"51.107.249.96/27\",\r\n + \ \"51.116.51.176/29\",\r\n \"51.116.54.0/27\",\r\n \"51.116.148.120/29\",\r\n + \ \"51.116.148.192/27\",\r\n \"51.120.232.40/29\",\r\n \"51.120.232.128/27\",\r\n + \ \"51.143.208.208/29\",\r\n \"51.143.208.224/27\",\r\n \"52.136.52.248/29\",\r\n + \ \"52.136.53.64/27\",\r\n \"52.136.184.80/29\",\r\n \"52.136.184.96/27\",\r\n + \ \"52.139.106.96/27\",\r\n \"52.140.111.112/29\",\r\n \"52.140.111.192/27\",\r\n + \ \"52.142.120.18/32\",\r\n \"52.142.120.22/32\",\r\n \"52.142.120.57/32\",\r\n + \ \"52.142.120.74/32\",\r\n \"52.142.120.90/32\",\r\n \"52.142.120.104/32\",\r\n + \ \"52.142.120.156/32\",\r\n \"52.146.132.192/27\",\r\n \"52.146.132.224/29\",\r\n + \ \"52.148.29.27/32\",\r\n \"52.149.20.142/32\",\r\n \"52.149.234.152/32\",\r\n + \ \"52.149.238.190/32\",\r\n \"52.149.239.34/32\",\r\n \"52.150.156.248/29\",\r\n + \ \"52.150.157.32/27\",\r\n \"52.153.153.146/32\",\r\n \"52.153.153.246/32\",\r\n + \ \"52.153.153.255/32\",\r\n \"52.153.154.13/32\",\r\n \"52.153.154.40/32\",\r\n + \ \"52.153.154.123/32\",\r\n \"52.153.154.158/32\",\r\n \"52.153.154.161/32\",\r\n + \ \"52.156.207.58/32\",\r\n \"52.156.207.195/32\",\r\n \"52.161.185.49/32\",\r\n + \ \"52.170.161.49/32\",\r\n \"52.170.162.28/32\",\r\n \"52.172.112.168/29\",\r\n + \ \"52.172.113.0/27\",\r\n \"52.186.106.218/32\",\r\n \"52.191.16.191/32\",\r\n + \ \"52.191.18.106/32\",\r\n \"52.247.76.74/32\",\r\n \"52.247.76.167/32\",\r\n + \ \"52.247.76.187/32\",\r\n \"52.247.76.199/32\",\r\n \"52.247.76.216/32\",\r\n + \ \"52.247.76.246/32\",\r\n \"52.247.76.252/32\",\r\n \"52.247.77.7/32\",\r\n + \ \"52.247.77.22/32\",\r\n \"52.247.77.26/32\",\r\n \"52.250.39.158/32\",\r\n + \ \"52.250.39.236/32\",\r\n \"52.250.39.246/32\",\r\n \"52.250.39.250/32\",\r\n + \ \"52.250.72.145/32\",\r\n \"52.250.73.36/32\",\r\n \"52.250.73.178/32\",\r\n + \ \"52.250.73.204/32\",\r\n \"52.250.74.3/32\",\r\n \"52.253.224.146/32\",\r\n + \ \"52.253.224.154/32\",\r\n \"102.37.80.0/27\",\r\n \"102.37.80.32/29\",\r\n + \ \"102.133.221.16/29\",\r\n \"102.133.221.32/27\",\r\n \"104.46.178.120/29\",\r\n + \ \"104.46.178.160/27\",\r\n \"191.233.15.16/29\",\r\n \"191.233.15.32/27\",\r\n + \ \"191.234.139.168/29\",\r\n \"191.234.142.0/27\",\r\n \"2603:1020:a04:2::580/121\",\r\n + \ \"2603:1020:e04::700/121\",\r\n \"2603:1020:1004:1::540/122\",\r\n + \ \"2603:1020:1004:2::/121\",\r\n \"2603:1020:1104:1::380/122\",\r\n + \ \"2603:1020:1104:1::680/121\",\r\n \"2603:1030:f:2::500/121\",\r\n + \ \"2603:1030:104::700/121\",\r\n \"2603:1030:107::5c0/122\",\r\n + \ \"2603:1030:504::560/123\",\r\n \"2603:1030:504:2::/121\",\r\n + \ \"2603:1030:608:3::680/121\",\r\n \"2603:1040:207:1::500/121\",\r\n + \ \"2603:1040:a06:2::200/121\",\r\n \"2603:1040:d04:1::540/122\",\r\n + \ \"2603:1040:d04:2::80/121\",\r\n \"2603:1040:f05::700/121\",\r\n + \ \"2603:1040:1002::7c0/123\",\r\n \"2603:1040:1002:1::/121\",\r\n + \ \"2603:1040:1104:1::380/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureEventGrid\",\r\n \"id\": \"AzureEventGrid\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventGrid\",\r\n \"addressPrefixes\": + [\r\n \"13.71.56.240/28\",\r\n \"13.71.57.0/28\",\r\n \"13.73.248.128/25\",\r\n + \ \"13.86.56.32/27\",\r\n \"13.86.56.160/27\",\r\n \"13.88.73.16/28\",\r\n + \ \"13.88.73.32/27\",\r\n \"13.88.135.208/28\",\r\n \"13.91.193.0/28\",\r\n + \ \"20.21.33.128/25\",\r\n \"20.36.121.0/25\",\r\n \"20.37.55.32/27\",\r\n + \ \"20.37.65.0/25\",\r\n \"20.37.82.224/27\",\r\n \"20.37.157.128/25\",\r\n + \ \"20.37.196.0/25\",\r\n \"20.37.225.0/25\",\r\n \"20.38.87.0/25\",\r\n + \ \"20.38.137.0/25\",\r\n \"20.39.11.128/25\",\r\n \"20.39.20.16/28\",\r\n + \ \"20.39.80.112/28\",\r\n \"20.39.80.128/28\",\r\n \"20.39.99.64/28\",\r\n + \ \"20.39.99.240/28\",\r\n \"20.40.152.128/27\",\r\n \"20.40.175.48/28\",\r\n + \ \"20.40.175.64/28\",\r\n \"20.41.66.0/25\",\r\n \"20.41.136.240/28\",\r\n + \ \"20.41.195.0/25\",\r\n \"20.42.7.0/25\",\r\n \"20.42.228.0/25\",\r\n + \ \"20.43.42.128/25\",\r\n \"20.43.66.128/25\",\r\n \"20.43.131.128/25\",\r\n + \ \"20.43.165.144/28\",\r\n \"20.43.172.128/27\",\r\n \"20.44.39.176/28\",\r\n + \ \"20.44.39.192/28\",\r\n \"20.44.168.64/28\",\r\n \"20.44.205.112/28\",\r\n + \ \"20.45.113.0/25\",\r\n \"20.45.195.0/25\",\r\n \"20.46.152.112/28\",\r\n + \ \"20.46.152.128/28\",\r\n \"20.49.96.0/25\",\r\n \"20.52.90.128/25\",\r\n + \ \"20.72.17.128/25\",\r\n \"20.150.164.0/25\",\r\n \"20.189.108.128/25\",\r\n + \ \"20.189.115.80/28\",\r\n \"20.189.123.80/28\",\r\n \"20.189.125.32/27\",\r\n + \ \"20.191.59.128/28\",\r\n \"20.191.59.176/28\",\r\n \"20.192.164.0/25\",\r\n + \ \"20.192.228.0/25\",\r\n \"20.193.34.0/28\",\r\n \"20.193.34.32/28\",\r\n + \ \"40.64.128.0/25\",\r\n \"40.67.49.0/25\",\r\n \"40.74.31.128/25\",\r\n + \ \"40.74.106.96/27\",\r\n \"40.80.58.0/25\",\r\n \"40.80.170.0/25\",\r\n + \ \"40.80.190.0/25\",\r\n \"40.80.236.192/27\",\r\n \"40.81.93.240/28\",\r\n + \ \"40.81.95.128/28\",\r\n \"40.82.254.128/25\",\r\n \"40.89.18.0/25\",\r\n + \ \"40.89.240.144/28\",\r\n \"40.114.160.176/28\",\r\n \"40.114.160.192/28\",\r\n + \ \"40.114.169.0/28\",\r\n \"40.127.155.192/28\",\r\n \"40.127.251.144/28\",\r\n + \ \"51.12.47.128/25\",\r\n \"51.12.199.0/25\",\r\n \"51.104.27.128/25\",\r\n + \ \"51.105.81.0/25\",\r\n \"51.105.89.0/25\",\r\n \"51.107.4.128/27\",\r\n + \ \"51.107.49.0/25\",\r\n \"51.107.99.32/27\",\r\n \"51.107.145.0/25\",\r\n + \ \"51.116.3.32/27\",\r\n \"51.116.72.0/25\",\r\n \"51.116.100.208/28\",\r\n + \ \"51.116.100.224/28\",\r\n \"51.120.4.0/27\",\r\n \"51.120.41.0/25\",\r\n + \ \"51.120.131.64/27\",\r\n \"51.120.225.0/25\",\r\n \"51.132.161.160/28\",\r\n + \ \"51.132.170.64/28\",\r\n \"51.137.16.224/28\",\r\n \"51.137.142.32/28\",\r\n + \ \"51.137.162.0/25\",\r\n \"51.143.193.0/25\",\r\n \"52.136.49.0/25\",\r\n + \ \"52.139.9.80/28\",\r\n \"52.139.11.16/28\",\r\n \"52.139.85.16/28\",\r\n + \ \"52.139.85.32/28\",\r\n \"52.140.106.0/25\",\r\n \"52.142.152.144/28\",\r\n + \ \"52.149.23.160/27\",\r\n \"52.149.48.80/28\",\r\n \"52.149.48.96/27\",\r\n + \ \"52.149.248.0/28\",\r\n \"52.149.248.64/27\",\r\n \"52.149.248.96/28\",\r\n + \ \"52.150.140.0/25\",\r\n \"52.154.57.48/28\",\r\n \"52.154.57.80/28\",\r\n + \ \"52.154.68.16/28\",\r\n \"52.154.68.32/28\",\r\n \"52.156.103.192/28\",\r\n + \ \"52.159.49.144/28\",\r\n \"52.159.51.160/28\",\r\n \"52.159.53.64/28\",\r\n + \ \"52.159.53.112/28\",\r\n \"52.160.136.16/28\",\r\n \"52.160.136.32/28\",\r\n + \ \"52.161.186.128/28\",\r\n \"52.161.186.208/28\",\r\n \"52.167.21.160/27\",\r\n + \ \"52.167.21.208/28\",\r\n \"52.167.21.224/28\",\r\n \"52.170.171.192/28\",\r\n + \ \"52.170.171.240/28\",\r\n \"52.177.38.160/27\",\r\n \"52.185.176.112/28\",\r\n + \ \"52.185.212.176/28\",\r\n \"52.185.212.192/28\",\r\n \"52.186.36.16/28\",\r\n + \ \"52.228.83.0/25\",\r\n \"52.231.112.192/28\",\r\n \"52.231.112.224/28\",\r\n + \ \"52.250.28.176/28\",\r\n \"52.250.32.160/28\",\r\n \"52.252.213.192/28\",\r\n + \ \"52.255.80.16/28\",\r\n \"52.255.82.160/28\",\r\n \"102.37.162.0/25\",\r\n + \ \"102.133.0.240/28\",\r\n \"102.133.1.0/28\",\r\n \"102.133.57.0/25\",\r\n + \ \"102.133.135.16/28\",\r\n \"102.133.135.32/28\",\r\n \"191.233.9.128/25\",\r\n + \ \"191.235.126.0/28\",\r\n \"191.235.126.144/28\",\r\n \"191.235.227.0/25\",\r\n + \ \"2603:1000:4::380/121\",\r\n \"2603:1000:104:1::380/121\",\r\n + \ \"2603:1010:6:1::380/121\",\r\n \"2603:1010:101::380/121\",\r\n + \ \"2603:1010:304::380/121\",\r\n \"2603:1010:404::380/121\",\r\n + \ \"2603:1020:5:1::380/121\",\r\n \"2603:1020:206:1::380/121\",\r\n + \ \"2603:1020:305::380/121\",\r\n \"2603:1020:405::380/121\",\r\n + \ \"2603:1020:605::380/121\",\r\n \"2603:1020:705:1::380/121\",\r\n + \ \"2603:1020:805:1::380/121\",\r\n \"2603:1020:905::380/121\",\r\n + \ \"2603:1020:a04:1::380/121\",\r\n \"2603:1020:b04::380/121\",\r\n + \ \"2603:1020:c04:1::380/121\",\r\n \"2603:1020:d04::380/121\",\r\n + \ \"2603:1020:e04:1::380/121\",\r\n \"2603:1020:f04::380/121\",\r\n + \ \"2603:1020:1004::380/121\",\r\n \"2603:1020:1104::280/121\",\r\n + \ \"2603:1030:f:1::380/121\",\r\n \"2603:1030:10:1::380/121\",\r\n + \ \"2603:1030:104:1::380/121\",\r\n \"2603:1030:107::280/121\",\r\n + \ \"2603:1030:210:1::380/121\",\r\n \"2603:1030:40b:1::380/121\",\r\n + \ \"2603:1030:40c:1::380/121\",\r\n \"2603:1030:504:1::380/121\",\r\n + \ \"2603:1030:608::380/121\",\r\n \"2603:1030:807:1::380/121\",\r\n + \ \"2603:1030:a07::380/121\",\r\n \"2603:1030:b04::380/121\",\r\n + \ \"2603:1030:c06:1::380/121\",\r\n \"2603:1030:f05:1::380/121\",\r\n + \ \"2603:1030:1005::380/121\",\r\n \"2603:1040:5:1::380/121\",\r\n + \ \"2603:1040:207::380/121\",\r\n \"2603:1040:407:1::380/121\",\r\n + \ \"2603:1040:606::380/121\",\r\n \"2603:1040:806::380/121\",\r\n + \ \"2603:1040:904:1::380/121\",\r\n \"2603:1040:a06:1::380/121\",\r\n + \ \"2603:1040:b04::380/121\",\r\n \"2603:1040:c06::380/121\",\r\n + \ \"2603:1040:d04::380/121\",\r\n \"2603:1040:f05:1::380/121\",\r\n + \ \"2603:1040:1002::480/121\",\r\n \"2603:1040:1104::280/121\",\r\n + \ \"2603:1050:6:1::380/121\",\r\n \"2603:1050:403::380/121\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureFrontDoor.Backend\",\r\n + \ \"id\": \"AzureFrontDoor.Backend\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.73.248.16/29\",\r\n \"20.21.37.40/29\",\r\n \"20.36.120.104/29\",\r\n + \ \"20.37.64.104/29\",\r\n \"20.37.156.120/29\",\r\n \"20.37.195.0/29\",\r\n + \ \"20.37.224.104/29\",\r\n \"20.38.84.72/29\",\r\n \"20.38.136.104/29\",\r\n + \ \"20.39.11.8/29\",\r\n \"20.41.4.88/29\",\r\n \"20.41.64.120/29\",\r\n + \ \"20.41.192.104/29\",\r\n \"20.42.4.120/29\",\r\n \"20.42.129.152/29\",\r\n + \ \"20.42.224.104/29\",\r\n \"20.43.41.136/29\",\r\n \"20.43.65.128/29\",\r\n + \ \"20.43.130.80/29\",\r\n \"20.45.112.104/29\",\r\n \"20.45.192.104/29\",\r\n + \ \"20.72.18.248/29\",\r\n \"20.150.160.96/29\",\r\n \"20.189.106.112/29\",\r\n + \ \"20.192.161.104/29\",\r\n \"20.192.225.48/29\",\r\n \"40.67.48.104/29\",\r\n + \ \"40.74.30.72/29\",\r\n \"40.80.56.104/29\",\r\n \"40.80.168.104/29\",\r\n + \ \"40.80.184.120/29\",\r\n \"40.82.248.248/29\",\r\n \"40.89.16.104/29\",\r\n + \ \"51.12.41.8/29\",\r\n \"51.12.193.8/29\",\r\n \"51.104.25.128/29\",\r\n + \ \"51.105.80.104/29\",\r\n \"51.105.88.104/29\",\r\n \"51.107.48.104/29\",\r\n + \ \"51.107.144.104/29\",\r\n \"51.120.40.104/29\",\r\n \"51.120.224.104/29\",\r\n + \ \"51.137.160.112/29\",\r\n \"51.143.192.104/29\",\r\n \"52.136.48.104/29\",\r\n + \ \"52.140.104.104/29\",\r\n \"52.150.136.120/29\",\r\n \"52.228.80.120/29\",\r\n + \ \"102.133.56.88/29\",\r\n \"102.133.216.88/29\",\r\n \"147.243.0.0/16\",\r\n + \ \"191.233.9.120/29\",\r\n \"191.235.225.128/29\",\r\n \"2603:1000:4::600/123\",\r\n + \ \"2603:1000:104::e0/123\",\r\n \"2603:1000:104::300/123\",\r\n + \ \"2603:1000:104:1::5c0/123\",\r\n \"2603:1000:104:1::7e0/123\",\r\n + \ \"2603:1010:6:1::5c0/123\",\r\n \"2603:1010:6:1::7e0/123\",\r\n + \ \"2603:1010:101::600/123\",\r\n \"2603:1010:304::600/123\",\r\n + \ \"2603:1010:404::600/123\",\r\n \"2603:1020:5:1::5c0/123\",\r\n + \ \"2603:1020:5:1::7e0/123\",\r\n \"2603:1020:206:1::5c0/123\",\r\n + \ \"2603:1020:206:1::7e0/123\",\r\n \"2603:1020:305::600/123\",\r\n + \ \"2603:1020:405::600/123\",\r\n \"2603:1020:605::600/123\",\r\n + \ \"2603:1020:705:1::5c0/123\",\r\n \"2603:1020:705:1::7e0/123\",\r\n + \ \"2603:1020:805:1::5c0/123\",\r\n \"2603:1020:805:1::7e0/123\",\r\n + \ \"2603:1020:905::600/123\",\r\n \"2603:1020:a04:1::5c0/123\",\r\n + \ \"2603:1020:a04:1::7e0/123\",\r\n \"2603:1020:b04::600/123\",\r\n + \ \"2603:1020:c04:1::5c0/123\",\r\n \"2603:1020:c04:1::7e0/123\",\r\n + \ \"2603:1020:d04::600/123\",\r\n \"2603:1020:e04:1::5c0/123\",\r\n + \ \"2603:1020:e04:1::7e0/123\",\r\n \"2603:1020:f04::600/123\",\r\n + \ \"2603:1020:1004::5c0/123\",\r\n \"2603:1020:1004::7e0/123\",\r\n + \ \"2603:1020:1104::680/123\",\r\n \"2603:1030:f:1::600/123\",\r\n + \ \"2603:1030:10:1::5c0/123\",\r\n \"2603:1030:10:1::7e0/123\",\r\n + \ \"2603:1030:104:1::5c0/123\",\r\n \"2603:1030:104:1::7e0/123\",\r\n + \ \"2603:1030:107::6a0/123\",\r\n \"2603:1030:210:1::5c0/123\",\r\n + \ \"2603:1030:210:1::7e0/123\",\r\n \"2603:1030:40b:1::5c0/123\",\r\n + \ \"2603:1030:40c:1::5c0/123\",\r\n \"2603:1030:40c:1::7e0/123\",\r\n + \ \"2603:1030:504:1::5c0/123\",\r\n \"2603:1030:504:1::7e0/123\",\r\n + \ \"2603:1030:608::600/123\",\r\n \"2603:1030:807:1::5c0/123\",\r\n + \ \"2603:1030:807:1::7e0/123\",\r\n \"2603:1030:a07::600/123\",\r\n + \ \"2603:1030:b04::600/123\",\r\n \"2603:1030:c06:1::5c0/123\",\r\n + \ \"2603:1030:f05:1::5c0/123\",\r\n \"2603:1030:f05:1::7e0/123\",\r\n + \ \"2603:1030:1005::600/123\",\r\n \"2603:1040:5::e0/123\",\r\n + \ \"2603:1040:5:1::5c0/123\",\r\n \"2603:1040:5:1::7e0/123\",\r\n + \ \"2603:1040:207::600/123\",\r\n \"2603:1040:407:1::5c0/123\",\r\n + \ \"2603:1040:407:1::7e0/123\",\r\n \"2603:1040:606::600/123\",\r\n + \ \"2603:1040:806::600/123\",\r\n \"2603:1040:904:1::5c0/123\",\r\n + \ \"2603:1040:904:1::7e0/123\",\r\n \"2603:1040:a06::e0/123\",\r\n + \ \"2603:1040:a06:1::5c0/123\",\r\n \"2603:1040:a06:1::7e0/123\",\r\n + \ \"2603:1040:b04::600/123\",\r\n \"2603:1040:c06::600/123\",\r\n + \ \"2603:1040:d04::5c0/123\",\r\n \"2603:1040:d04::7e0/123\",\r\n + \ \"2603:1040:f05:1::5c0/123\",\r\n \"2603:1040:f05:1::7e0/123\",\r\n + \ \"2603:1040:1002:1::1e0/123\",\r\n \"2603:1040:1104::680/123\",\r\n + \ \"2603:1050:6:1::5c0/123\",\r\n \"2603:1050:6:1::7e0/123\",\r\n + \ \"2603:1050:403::5c0/123\",\r\n \"2a01:111:20a::/48\",\r\n + \ \"2a01:111:2050::/44\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureFrontDoor.FirstParty\",\r\n \"id\": \"AzureFrontDoor.FirstParty\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureFrontDoor\",\r\n \"addressPrefixes\": + [\r\n \"13.107.3.0/24\",\r\n \"13.107.4.0/22\",\r\n \"13.107.9.0/24\",\r\n + \ \"13.107.12.0/23\",\r\n \"13.107.15.0/24\",\r\n \"13.107.16.0/24\",\r\n + \ \"13.107.18.0/23\",\r\n \"13.107.21.0/24\",\r\n \"13.107.22.0/24\",\r\n + \ \"13.107.37.0/24\",\r\n \"13.107.38.0/23\",\r\n \"13.107.40.0/24\",\r\n + \ \"13.107.42.0/23\",\r\n \"13.107.48.0/24\",\r\n \"13.107.50.0/24\",\r\n + \ \"13.107.52.0/24\",\r\n \"13.107.54.0/24\",\r\n \"13.107.56.0/24\",\r\n + \ \"13.107.64.0/18\",\r\n \"13.107.128.0/19\",\r\n \"13.107.228.0/23\",\r\n + \ \"13.107.245.0/24\",\r\n \"13.107.254.0/23\",\r\n \"131.253.3.0/24\",\r\n + \ \"131.253.21.0/24\",\r\n \"131.253.33.0/24\",\r\n \"150.171.32.0/19\",\r\n + \ \"202.89.233.96/28\",\r\n \"204.79.197.0/24\",\r\n \"2620:1ec:4::/46\",\r\n + \ \"2620:1ec:a::/47\",\r\n \"2620:1ec:c::/47\",\r\n \"2620:1ec:12::/47\",\r\n + \ \"2620:1ec:21::/48\",\r\n \"2620:1ec:22::/48\",\r\n \"2620:1ec:26::/63\",\r\n + \ \"2620:1ec:26:2::/64\",\r\n \"2620:1ec:28::/48\",\r\n \"2620:1ec:34::/48\",\r\n + \ \"2620:1ec:39::/48\",\r\n \"2620:1ec:3e::/47\",\r\n \"2620:1ec:42::/47\",\r\n + \ \"2620:1ec:44::/47\",\r\n \"2620:1ec:4a::/47\",\r\n \"2620:1ec:8f0::/44\",\r\n + \ \"2620:1ec:900::/44\",\r\n \"2620:1ec:a92::/48\",\r\n \"2620:1ec:c11::/48\",\r\n + \ \"2a01:111:2003::/48\",\r\n \"2a01:111:202c::/46\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureFrontDoor.Frontend\",\r\n + \ \"id\": \"AzureFrontDoor.Frontend\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"\",\r\n \"addressPrefixes\": + [\r\n \"13.73.248.8/29\",\r\n \"13.107.208.0/24\",\r\n \"13.107.213.0/24\",\r\n + \ \"13.107.219.0/24\",\r\n \"13.107.224.0/24\",\r\n \"13.107.226.0/23\",\r\n + \ \"13.107.231.0/24\",\r\n \"13.107.246.0/24\",\r\n \"13.107.253.0/24\",\r\n + \ \"20.21.37.32/29\",\r\n \"20.36.120.96/29\",\r\n \"20.37.64.96/29\",\r\n + \ \"20.37.156.112/29\",\r\n \"20.37.192.88/29\",\r\n \"20.37.224.96/29\",\r\n + \ \"20.38.84.64/29\",\r\n \"20.38.136.96/29\",\r\n \"20.39.11.0/29\",\r\n + \ \"20.41.4.80/29\",\r\n \"20.41.64.112/29\",\r\n \"20.41.192.96/29\",\r\n + \ \"20.42.4.112/29\",\r\n \"20.42.129.144/29\",\r\n \"20.42.224.96/29\",\r\n + \ \"20.43.41.128/29\",\r\n \"20.43.64.88/29\",\r\n \"20.43.128.104/29\",\r\n + \ \"20.45.112.96/29\",\r\n \"20.45.192.96/29\",\r\n \"20.72.18.240/29\",\r\n + \ \"20.150.160.72/29\",\r\n \"20.189.106.72/29\",\r\n \"20.192.161.96/29\",\r\n + \ \"20.192.225.40/29\",\r\n \"40.67.48.96/29\",\r\n \"40.74.30.64/29\",\r\n + \ \"40.80.56.96/29\",\r\n \"40.80.168.96/29\",\r\n \"40.80.184.112/29\",\r\n + \ \"40.82.248.72/29\",\r\n \"40.89.16.96/29\",\r\n \"40.90.64.0/22\",\r\n + \ \"40.90.68.0/24\",\r\n \"51.12.41.0/29\",\r\n \"51.12.193.0/29\",\r\n + \ \"51.104.24.88/29\",\r\n \"51.105.80.96/29\",\r\n \"51.105.88.96/29\",\r\n + \ \"51.107.48.96/29\",\r\n \"51.107.144.96/29\",\r\n \"51.120.40.96/29\",\r\n + \ \"51.120.224.96/29\",\r\n \"51.137.160.88/29\",\r\n \"51.143.192.96/29\",\r\n + \ \"52.136.48.96/29\",\r\n \"52.140.104.96/29\",\r\n \"52.150.136.112/29\",\r\n + \ \"52.228.80.112/29\",\r\n \"102.133.56.80/29\",\r\n \"102.133.216.80/29\",\r\n + \ \"104.212.67.0/24\",\r\n \"104.212.68.0/24\",\r\n \"191.233.9.112/29\",\r\n + \ \"191.235.224.88/29\",\r\n \"2603:1000:4::5e0/123\",\r\n + \ \"2603:1000:104::c0/123\",\r\n \"2603:1000:104::160/123\",\r\n + \ \"2603:1000:104:1::5a0/123\",\r\n \"2603:1000:104:1::7c0/123\",\r\n + \ \"2603:1010:6:1::5a0/123\",\r\n \"2603:1010:6:1::7c0/123\",\r\n + \ \"2603:1010:101::5e0/123\",\r\n \"2603:1010:304::5e0/123\",\r\n + \ \"2603:1010:404::5e0/123\",\r\n \"2603:1020:5:1::5a0/123\",\r\n + \ \"2603:1020:5:1::7c0/123\",\r\n \"2603:1020:206:1::5a0/123\",\r\n + \ \"2603:1020:206:1::7c0/123\",\r\n \"2603:1020:305::5e0/123\",\r\n + \ \"2603:1020:405::5e0/123\",\r\n \"2603:1020:605::5e0/123\",\r\n + \ \"2603:1020:705:1::5a0/123\",\r\n \"2603:1020:705:1::7c0/123\",\r\n + \ \"2603:1020:805:1::5a0/123\",\r\n \"2603:1020:805:1::7c0/123\",\r\n + \ \"2603:1020:905::5e0/123\",\r\n \"2603:1020:a04:1::5a0/123\",\r\n + \ \"2603:1020:a04:1::7c0/123\",\r\n \"2603:1020:b04::5e0/123\",\r\n + \ \"2603:1020:c04:1::5a0/123\",\r\n \"2603:1020:c04:1::7c0/123\",\r\n + \ \"2603:1020:d04::5e0/123\",\r\n \"2603:1020:e04:1::5a0/123\",\r\n + \ \"2603:1020:e04:1::7c0/123\",\r\n \"2603:1020:f04::5e0/123\",\r\n + \ \"2603:1020:1004::5a0/123\",\r\n \"2603:1020:1004::7c0/123\",\r\n + \ \"2603:1020:1104::5e0/123\",\r\n \"2603:1030:f:1::5e0/123\",\r\n + \ \"2603:1030:10:1::5a0/123\",\r\n \"2603:1030:10:1::7c0/123\",\r\n + \ \"2603:1030:104:1::5a0/123\",\r\n \"2603:1030:104:1::7c0/123\",\r\n + \ \"2603:1030:107::680/123\",\r\n \"2603:1030:210:1::5a0/123\",\r\n + \ \"2603:1030:210:1::7c0/123\",\r\n \"2603:1030:40b:1::5a0/123\",\r\n + \ \"2603:1030:40c:1::5a0/123\",\r\n \"2603:1030:40c:1::7c0/123\",\r\n + \ \"2603:1030:504:1::5a0/123\",\r\n \"2603:1030:504:1::7c0/123\",\r\n + \ \"2603:1030:608::5e0/123\",\r\n \"2603:1030:807:1::5a0/123\",\r\n + \ \"2603:1030:807:1::7c0/123\",\r\n \"2603:1030:a07::5e0/123\",\r\n + \ \"2603:1030:b04::5e0/123\",\r\n \"2603:1030:c06:1::5a0/123\",\r\n + \ \"2603:1030:f05:1::5a0/123\",\r\n \"2603:1030:f05:1::7c0/123\",\r\n + \ \"2603:1030:1005::5e0/123\",\r\n \"2603:1040:5::c0/123\",\r\n + \ \"2603:1040:5:1::5a0/123\",\r\n \"2603:1040:5:1::7c0/123\",\r\n + \ \"2603:1040:207::5e0/123\",\r\n \"2603:1040:407:1::5a0/123\",\r\n + \ \"2603:1040:407:1::7c0/123\",\r\n \"2603:1040:606::5e0/123\",\r\n + \ \"2603:1040:806::5e0/123\",\r\n \"2603:1040:904:1::5a0/123\",\r\n + \ \"2603:1040:904:1::7c0/123\",\r\n \"2603:1040:a06::c0/123\",\r\n + \ \"2603:1040:a06:1::5a0/123\",\r\n \"2603:1040:a06:1::7c0/123\",\r\n + \ \"2603:1040:b04::5e0/123\",\r\n \"2603:1040:c06::5e0/123\",\r\n + \ \"2603:1040:d04::5a0/123\",\r\n \"2603:1040:d04::7c0/123\",\r\n + \ \"2603:1040:f05:1::5a0/123\",\r\n \"2603:1040:f05:1::7c0/123\",\r\n + \ \"2603:1040:1002:1::1c0/123\",\r\n \"2603:1040:1104::5e0/123\",\r\n + \ \"2603:1050:6:1::5a0/123\",\r\n \"2603:1050:6:1::7c0/123\",\r\n + \ \"2603:1050:403::5a0/123\",\r\n \"2620:1ec:27::/48\",\r\n + \ \"2620:1ec:29::/48\",\r\n \"2620:1ec:40::/47\",\r\n \"2620:1ec:46::/47\",\r\n + \ \"2620:1ec:48::/47\",\r\n \"2620:1ec:bdf::/48\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"AzureInformationProtection\",\r\n + \ \"id\": \"AzureInformationProtection\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureInformationProtection\",\r\n + \ \"addressPrefixes\": [\r\n \"13.66.153.57/32\",\r\n \"13.66.245.220/32\",\r\n + \ \"13.66.251.171/32\",\r\n \"13.67.114.221/32\",\r\n \"13.68.179.152/32\",\r\n + \ \"13.76.139.8/32\",\r\n \"13.76.244.119/32\",\r\n \"13.77.166.40/32\",\r\n + \ \"13.77.203.47/32\",\r\n \"13.78.130.67/32\",\r\n \"13.78.130.185/32\",\r\n + \ \"13.78.178.191/32\",\r\n \"13.79.189.239/32\",\r\n \"13.79.189.241/32\",\r\n + \ \"13.82.198.231/32\",\r\n \"13.83.91.144/32\",\r\n \"13.92.58.123/32\",\r\n + \ \"13.92.61.93/32\",\r\n \"13.93.72.133/32\",\r\n \"13.93.75.214/32\",\r\n + \ \"13.94.98.184/32\",\r\n \"13.94.116.226/32\",\r\n \"23.97.70.206/32\",\r\n + \ \"23.99.106.184/32\",\r\n \"23.99.114.156/32\",\r\n \"23.99.251.107/32\",\r\n + \ \"23.101.112.34/32\",\r\n \"23.101.147.227/32\",\r\n \"23.101.163.169/32\",\r\n + \ \"40.69.191.65/32\",\r\n \"40.70.16.196/32\",\r\n \"40.76.94.49/32\",\r\n + \ \"40.83.177.47/32\",\r\n \"40.83.223.214/32\",\r\n \"40.87.2.166/32\",\r\n + \ \"40.87.67.213/32\",\r\n \"40.87.94.91/32\",\r\n \"40.114.2.72/32\",\r\n + \ \"40.117.180.9/32\",\r\n \"40.121.48.207/32\",\r\n \"40.121.49.153/32\",\r\n + \ \"40.121.90.82/32\",\r\n \"40.127.160.102/32\",\r\n \"40.127.175.173/32\",\r\n + \ \"51.136.18.12/32\",\r\n \"51.141.184.35/32\",\r\n \"51.143.32.47/32\",\r\n + \ \"51.143.88.135/32\",\r\n \"51.144.167.90/32\",\r\n \"51.145.146.97/32\",\r\n + \ \"52.162.33.18/32\",\r\n \"52.162.37.146/32\",\r\n \"52.162.88.200/32\",\r\n + \ \"52.162.95.132/32\",\r\n \"52.162.208.48/32\",\r\n \"52.163.61.51/32\",\r\n + \ \"52.163.85.21/32\",\r\n \"52.163.85.129/32\",\r\n \"52.163.87.92/32\",\r\n + \ \"52.163.89.155/32\",\r\n \"52.163.89.160/32\",\r\n \"52.165.189.139/32\",\r\n + \ \"52.167.1.118/32\",\r\n \"52.167.225.247/32\",\r\n \"52.167.226.2/32\",\r\n + \ \"52.167.227.104/32\",\r\n \"52.167.227.154/32\",\r\n \"52.173.21.111/32\",\r\n + \ \"52.173.89.54/32\",\r\n \"52.173.89.66/32\",\r\n \"52.173.93.137/32\",\r\n + \ \"52.176.44.178/32\",\r\n \"52.178.145.186/32\",\r\n \"52.178.147.96/32\",\r\n + \ \"52.179.136.129/32\",\r\n \"52.184.34.233/32\",\r\n \"52.184.35.49/32\",\r\n + \ \"52.232.110.114/32\",\r\n \"52.232.113.160/32\",\r\n \"52.232.118.97/32\",\r\n + \ \"52.232.119.81/32\",\r\n \"52.237.141.83/32\",\r\n \"52.237.141.229/32\",\r\n + \ \"52.250.56.125/32\",\r\n \"65.52.36.85/32\",\r\n \"65.52.55.108/32\",\r\n + \ \"65.52.176.250/32\",\r\n \"65.52.177.192/32\",\r\n \"65.52.184.44/32\",\r\n + \ \"65.52.184.218/32\",\r\n \"65.52.236.123/32\",\r\n \"70.37.163.131/32\",\r\n + \ \"94.245.88.160/32\",\r\n \"104.40.16.135/32\",\r\n \"104.40.30.29/32\",\r\n + \ \"104.41.143.145/32\",\r\n \"137.116.91.123/32\",\r\n \"137.117.47.75/32\",\r\n + \ \"138.91.121.248/32\",\r\n \"138.91.122.178/32\",\r\n \"157.55.177.248/32\",\r\n + \ \"157.55.185.205/32\",\r\n \"157.56.8.93/32\",\r\n \"157.56.8.135/32\",\r\n + \ \"157.56.9.127/32\",\r\n \"168.61.46.212/32\",\r\n \"168.62.5.167/32\",\r\n + \ \"168.62.8.139/32\",\r\n \"168.62.25.173/32\",\r\n \"168.62.25.179/32\",\r\n + \ \"168.62.48.148/32\",\r\n \"168.62.49.18/32\",\r\n \"168.62.52.244/32\",\r\n + \ \"168.62.53.73/32\",\r\n \"168.62.53.132/32\",\r\n \"168.62.54.75/32\",\r\n + \ \"168.62.54.211/32\",\r\n \"168.62.54.212/32\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"AzureIoTHub\",\r\n \"id\": + \"AzureIoTHub\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": + {\r\n \"changeNumber\": \"5\",\r\n \"region\": \"\",\r\n \"state\": + \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureIoTHub\",\r\n \"addressPrefixes\": [\r\n \"13.66.142.96/27\",\r\n + \ \"13.67.10.224/27\",\r\n \"13.67.234.22/32\",\r\n \"13.69.71.0/25\",\r\n + \ \"13.69.109.0/25\",\r\n \"13.69.192.43/32\",\r\n \"13.69.230.64/27\",\r\n + \ \"13.70.74.192/27\",\r\n \"13.70.182.204/32\",\r\n \"13.70.182.210/32\",\r\n + \ \"13.71.84.34/32\",\r\n \"13.71.113.127/32\",\r\n \"13.71.150.19/32\",\r\n + \ \"13.71.175.32/27\",\r\n \"13.71.196.224/27\",\r\n \"13.73.115.51/32\",\r\n + \ \"13.73.244.0/27\",\r\n \"13.73.252.128/25\",\r\n \"13.74.108.192/27\",\r\n + \ \"13.75.39.160/27\",\r\n \"13.76.83.155/32\",\r\n \"13.76.217.46/32\",\r\n + \ \"13.77.53.128/27\",\r\n \"13.78.109.160/27\",\r\n \"13.78.129.154/32\",\r\n + \ \"13.78.130.69/32\",\r\n \"13.79.172.43/32\",\r\n \"13.82.93.138/32\",\r\n + \ \"13.84.189.6/32\",\r\n \"13.85.68.113/32\",\r\n \"13.86.221.0/25\",\r\n + \ \"13.87.58.96/27\",\r\n \"13.87.124.96/27\",\r\n \"13.89.174.160/27\",\r\n + \ \"13.89.231.149/32\",\r\n \"13.94.40.72/32\",\r\n \"13.95.15.251/32\",\r\n + \ \"20.21.44.96/27\",\r\n \"20.21.67.160/27\",\r\n \"20.21.75.160/27\",\r\n + \ \"20.36.108.160/27\",\r\n \"20.36.117.64/27\",\r\n \"20.36.123.32/27\",\r\n + \ \"20.36.123.128/25\",\r\n \"20.37.67.128/25\",\r\n \"20.37.68.0/27\",\r\n + \ \"20.37.76.160/27\",\r\n \"20.37.198.160/27\",\r\n \"20.37.199.0/25\",\r\n + \ \"20.37.227.64/27\",\r\n \"20.37.227.128/25\",\r\n \"20.38.128.128/27\",\r\n + \ \"20.38.139.128/25\",\r\n \"20.38.140.0/27\",\r\n \"20.38.147.192/27\",\r\n + \ \"20.39.14.32/27\",\r\n \"20.39.14.128/25\",\r\n \"20.40.206.192/27\",\r\n + \ \"20.40.207.0/25\",\r\n \"20.41.68.96/27\",\r\n \"20.41.68.128/25\",\r\n + \ \"20.41.197.64/27\",\r\n \"20.41.197.128/25\",\r\n \"20.42.230.160/27\",\r\n + \ \"20.42.231.0/25\",\r\n \"20.43.44.160/27\",\r\n \"20.43.45.0/25\",\r\n + \ \"20.43.70.160/27\",\r\n \"20.43.71.0/25\",\r\n \"20.43.121.64/27\",\r\n + \ \"20.44.4.128/27\",\r\n \"20.44.8.224/27\",\r\n \"20.44.17.96/27\",\r\n + \ \"20.44.29.0/27\",\r\n \"20.45.114.224/27\",\r\n \"20.45.115.0/25\",\r\n + \ \"20.45.123.128/27\",\r\n \"20.45.198.32/27\",\r\n \"20.45.198.128/25\",\r\n + \ \"20.49.83.128/27\",\r\n \"20.49.91.128/27\",\r\n \"20.49.99.96/27\",\r\n + \ \"20.49.99.128/25\",\r\n \"20.49.109.128/25\",\r\n \"20.49.110.0/26\",\r\n + \ \"20.49.110.128/25\",\r\n \"20.49.113.32/27\",\r\n \"20.49.113.128/25\",\r\n + \ \"20.49.120.96/27\",\r\n \"20.49.120.128/25\",\r\n \"20.49.121.0/25\",\r\n + \ \"20.50.65.128/25\",\r\n \"20.50.68.0/27\",\r\n \"20.72.28.160/27\",\r\n + \ \"20.150.165.192/27\",\r\n \"20.150.166.0/25\",\r\n \"20.150.172.192/27\",\r\n + \ \"20.150.179.224/27\",\r\n \"20.150.187.224/27\",\r\n \"20.187.195.0/25\",\r\n + \ \"20.188.0.51/32\",\r\n \"20.188.3.145/32\",\r\n \"20.188.39.126/32\",\r\n + \ \"20.189.109.192/27\",\r\n \"20.192.99.224/27\",\r\n \"20.192.165.224/27\",\r\n + \ \"20.192.166.0/25\",\r\n \"20.192.230.32/27\",\r\n \"20.192.230.128/25\",\r\n + \ \"20.192.238.0/27\",\r\n \"20.193.206.0/27\",\r\n \"20.194.67.96/27\",\r\n + \ \"20.205.75.192/27\",\r\n \"20.205.83.192/27\",\r\n \"20.208.19.160/27\",\r\n + \ \"23.96.222.45/32\",\r\n \"23.96.223.89/32\",\r\n \"23.98.86.0/27\",\r\n + \ \"23.98.104.192/27\",\r\n \"23.98.106.0/25\",\r\n \"23.99.109.81/32\",\r\n + \ \"23.100.4.253/32\",\r\n \"23.100.8.130/32\",\r\n \"23.100.105.192/32\",\r\n + \ \"23.101.29.228/32\",\r\n \"23.102.235.31/32\",\r\n \"40.64.132.160/27\",\r\n + \ \"40.64.134.0/25\",\r\n \"40.67.51.0/25\",\r\n \"40.67.51.128/27\",\r\n + \ \"40.67.60.128/27\",\r\n \"40.69.108.128/27\",\r\n \"40.70.148.128/27\",\r\n + \ \"40.71.14.128/25\",\r\n \"40.74.66.139/32\",\r\n \"40.74.125.44/32\",\r\n + \ \"40.74.149.0/27\",\r\n \"40.75.35.96/27\",\r\n \"40.76.71.185/32\",\r\n + \ \"40.77.23.107/32\",\r\n \"40.78.22.17/32\",\r\n \"40.78.196.96/27\",\r\n + \ \"40.78.204.64/27\",\r\n \"40.78.229.128/25\",\r\n \"40.78.238.0/27\",\r\n + \ \"40.78.245.32/27\",\r\n \"40.78.251.160/27\",\r\n \"40.79.114.144/32\",\r\n + \ \"40.79.132.128/27\",\r\n \"40.79.139.32/27\",\r\n \"40.79.148.0/27\",\r\n + \ \"40.79.156.128/25\",\r\n \"40.79.163.32/27\",\r\n \"40.79.171.128/27\",\r\n + \ \"40.79.180.96/27\",\r\n \"40.79.187.224/27\",\r\n \"40.79.195.192/27\",\r\n + \ \"40.80.51.128/27\",\r\n \"40.80.62.64/27\",\r\n \"40.80.62.128/25\",\r\n + \ \"40.80.172.64/27\",\r\n \"40.80.172.128/25\",\r\n \"40.80.176.64/27\",\r\n + \ \"40.83.177.42/32\",\r\n \"40.84.53.157/32\",\r\n \"40.87.138.172/32\",\r\n + \ \"40.87.143.97/32\",\r\n \"40.89.20.192/27\",\r\n \"40.89.21.0/25\",\r\n + \ \"40.112.221.188/32\",\r\n \"40.112.223.235/32\",\r\n \"40.113.153.50/32\",\r\n + \ \"40.113.176.160/27\",\r\n \"40.113.176.192/27\",\r\n \"40.113.177.0/24\",\r\n + \ \"40.114.53.146/32\",\r\n \"40.118.27.192/32\",\r\n \"40.119.11.224/27\",\r\n + \ \"40.120.75.160/27\",\r\n \"40.127.132.17/32\",\r\n \"51.12.42.32/27\",\r\n + \ \"51.12.42.128/25\",\r\n \"51.12.100.64/27\",\r\n \"51.12.194.32/27\",\r\n + \ \"51.12.194.128/25\",\r\n \"51.12.204.64/27\",\r\n \"51.12.227.224/27\",\r\n + \ \"51.12.235.224/27\",\r\n \"51.103.203.160/27\",\r\n \"51.104.30.0/25\",\r\n + \ \"51.104.30.128/27\",\r\n \"51.105.69.0/27\",\r\n \"51.105.75.192/27\",\r\n + \ \"51.105.91.128/25\",\r\n \"51.105.92.0/27\",\r\n \"51.107.51.64/27\",\r\n + \ \"51.107.51.128/25\",\r\n \"51.107.60.96/27\",\r\n \"51.107.147.64/27\",\r\n + \ \"51.107.147.128/25\",\r\n \"51.107.156.96/27\",\r\n \"51.116.49.224/27\",\r\n + \ \"51.116.50.0/25\",\r\n \"51.116.60.96/27\",\r\n \"51.116.145.192/27\",\r\n + \ \"51.116.146.0/25\",\r\n \"51.116.158.0/27\",\r\n \"51.116.243.160/27\",\r\n + \ \"51.116.251.128/27\",\r\n \"51.120.43.128/25\",\r\n \"51.120.44.0/27\",\r\n + \ \"51.120.100.96/27\",\r\n \"51.120.107.224/27\",\r\n \"51.120.211.224/27\",\r\n + \ \"51.120.227.128/25\",\r\n \"51.120.228.0/27\",\r\n \"51.137.164.160/27\",\r\n + \ \"51.137.165.0/25\",\r\n \"51.140.84.251/32\",\r\n \"51.140.126.10/32\",\r\n + \ \"51.140.149.32/27\",\r\n \"51.140.212.160/27\",\r\n \"51.140.226.207/32\",\r\n + \ \"51.140.240.234/32\",\r\n \"51.141.49.253/32\",\r\n \"51.144.118.31/32\",\r\n + \ \"52.136.51.128/25\",\r\n \"52.136.52.0/27\",\r\n \"52.136.132.236/32\",\r\n + \ \"52.138.92.96/27\",\r\n \"52.138.229.0/27\",\r\n \"52.140.108.160/27\",\r\n + \ \"52.140.109.0/25\",\r\n \"52.147.10.141/32\",\r\n \"52.147.10.149/32\",\r\n + \ \"52.150.152.96/27\",\r\n \"52.150.153.128/25\",\r\n \"52.151.6.77/32\",\r\n + \ \"52.151.78.51/32\",\r\n \"52.158.236.252/32\",\r\n \"52.161.15.247/32\",\r\n + \ \"52.162.111.64/27\",\r\n \"52.163.212.39/32\",\r\n \"52.163.215.122/32\",\r\n + \ \"52.167.107.192/27\",\r\n \"52.167.155.89/32\",\r\n \"52.168.180.95/32\",\r\n + \ \"52.169.138.222/32\",\r\n \"52.172.203.144/32\",\r\n \"52.175.221.106/32\",\r\n + \ \"52.176.4.4/32\",\r\n \"52.176.92.27/32\",\r\n \"52.177.196.50/32\",\r\n + \ \"52.178.147.144/32\",\r\n \"52.179.159.231/32\",\r\n \"52.180.165.88/32\",\r\n + \ \"52.180.165.248/32\",\r\n \"52.180.177.125/32\",\r\n \"52.182.139.224/27\",\r\n + \ \"52.225.176.167/32\",\r\n \"52.225.177.25/32\",\r\n \"52.225.179.220/32\",\r\n + \ \"52.225.180.26/32\",\r\n \"52.225.180.217/32\",\r\n \"52.225.187.149/32\",\r\n + \ \"52.228.85.224/27\",\r\n \"52.228.86.0/25\",\r\n \"52.231.20.32/27\",\r\n + \ \"52.231.32.236/32\",\r\n \"52.231.148.128/27\",\r\n \"52.231.205.15/32\",\r\n + \ \"52.236.189.128/25\",\r\n \"52.237.27.123/32\",\r\n \"52.242.31.77/32\",\r\n + \ \"52.246.155.192/27\",\r\n \"52.250.225.32/27\",\r\n \"65.52.252.160/27\",\r\n + \ \"102.133.28.160/27\",\r\n \"102.133.59.0/25\",\r\n \"102.133.59.128/27\",\r\n + \ \"102.133.124.32/27\",\r\n \"102.133.156.64/27\",\r\n \"102.133.218.192/27\",\r\n + \ \"102.133.219.0/25\",\r\n \"102.133.251.128/27\",\r\n \"104.40.49.44/32\",\r\n + \ \"104.41.34.180/32\",\r\n \"104.43.252.98/32\",\r\n \"104.46.115.237/32\",\r\n + \ \"104.210.105.7/32\",\r\n \"104.211.18.153/32\",\r\n \"104.211.210.195/32\",\r\n + \ \"104.214.34.123/32\",\r\n \"137.117.83.38/32\",\r\n \"157.55.253.43/32\",\r\n + \ \"168.61.54.255/32\",\r\n \"168.61.208.218/32\",\r\n \"191.233.11.160/27\",\r\n + \ \"191.233.14.0/25\",\r\n \"191.233.54.0/27\",\r\n \"191.233.205.128/27\",\r\n + \ \"191.234.136.128/25\",\r\n \"191.234.137.0/27\",\r\n \"191.234.147.224/27\",\r\n + \ \"191.234.155.224/27\",\r\n \"207.46.138.102/32\",\r\n + \ \"2603:1000:4:402::300/123\",\r\n \"2603:1000:104:402::300/123\",\r\n + \ \"2603:1000:104:802::240/123\",\r\n \"2603:1000:104:c02::240/123\",\r\n + \ \"2603:1010:6:402::300/123\",\r\n \"2603:1010:6:802::240/123\",\r\n + \ \"2603:1010:6:c02::240/123\",\r\n \"2603:1010:101:402::300/123\",\r\n + \ \"2603:1010:304:402::300/123\",\r\n \"2603:1010:404:402::300/123\",\r\n + \ \"2603:1020:5:402::300/123\",\r\n \"2603:1020:5:802::240/123\",\r\n + \ \"2603:1020:5:c02::240/123\",\r\n \"2603:1020:206:402::300/123\",\r\n + \ \"2603:1020:206:802::240/123\",\r\n \"2603:1020:206:c02::240/123\",\r\n + \ \"2603:1020:305:402::300/123\",\r\n \"2603:1020:405:402::300/123\",\r\n + \ \"2603:1020:605:402::300/123\",\r\n \"2603:1020:705:402::300/123\",\r\n + \ \"2603:1020:705:802::240/123\",\r\n \"2603:1020:705:c02::240/123\",\r\n + \ \"2603:1020:805:402::300/123\",\r\n \"2603:1020:805:802::240/123\",\r\n + \ \"2603:1020:805:c02::240/123\",\r\n \"2603:1020:905:402::300/123\",\r\n + \ \"2603:1020:a04:402::300/123\",\r\n \"2603:1020:a04:802::240/123\",\r\n + \ \"2603:1020:a04:c02::240/123\",\r\n \"2603:1020:b04:402::300/123\",\r\n + \ \"2603:1020:c04:402::300/123\",\r\n \"2603:1020:c04:802::240/123\",\r\n + \ \"2603:1020:c04:c02::240/123\",\r\n \"2603:1020:d04:402::300/123\",\r\n + \ \"2603:1020:e04:402::300/123\",\r\n \"2603:1020:e04:802::240/123\",\r\n + \ \"2603:1020:e04:c02::240/123\",\r\n \"2603:1020:f04:402::300/123\",\r\n + \ \"2603:1020:1004:400::480/123\",\r\n \"2603:1020:1004:800::100/123\",\r\n + \ \"2603:1020:1004:800::240/123\",\r\n \"2603:1020:1004:c02::2a0/123\",\r\n + \ \"2603:1020:1104:400::300/123\",\r\n \"2603:1030:f:400::b00/123\",\r\n + \ \"2603:1030:10:402::300/123\",\r\n \"2603:1030:10:802::240/123\",\r\n + \ \"2603:1030:10:c02::240/123\",\r\n \"2603:1030:104:402::300/123\",\r\n + \ \"2603:1030:104:402::740/123\",\r\n \"2603:1030:104:802::1e0/123\",\r\n + \ \"2603:1030:107:400::280/123\",\r\n \"2603:1030:210:402::300/123\",\r\n + \ \"2603:1030:210:802::240/123\",\r\n \"2603:1030:210:c02::240/123\",\r\n + \ \"2603:1030:40b:400::b00/123\",\r\n \"2603:1030:40b:800::240/123\",\r\n + \ \"2603:1030:40b:c00::240/123\",\r\n \"2603:1030:40c:402::300/123\",\r\n + \ \"2603:1030:40c:802::240/123\",\r\n \"2603:1030:40c:c02::240/123\",\r\n + \ \"2603:1030:504:402::460/123\",\r\n \"2603:1030:504:802::100/123\",\r\n + \ \"2603:1030:504:c02::2a0/123\",\r\n \"2603:1030:608:402::300/123\",\r\n + \ \"2603:1030:807:402::300/123\",\r\n \"2603:1030:807:802::240/123\",\r\n + \ \"2603:1030:807:c02::240/123\",\r\n \"2603:1030:a07:402::980/123\",\r\n + \ \"2603:1030:b04:402::300/123\",\r\n \"2603:1030:c06:400::b00/123\",\r\n + \ \"2603:1030:c06:802::240/123\",\r\n \"2603:1030:c06:c02::240/123\",\r\n + \ \"2603:1030:f05:402::300/123\",\r\n \"2603:1030:f05:802::240/123\",\r\n + \ \"2603:1030:f05:c02::240/123\",\r\n \"2603:1030:1005:402::300/123\",\r\n + \ \"2603:1040:5:402::300/123\",\r\n \"2603:1040:5:802::240/123\",\r\n + \ \"2603:1040:5:c02::240/123\",\r\n \"2603:1040:207:402::300/123\",\r\n + \ \"2603:1040:207:800::e0/123\",\r\n \"2603:1040:207:c00::e0/123\",\r\n + \ \"2603:1040:407:402::300/123\",\r\n \"2603:1040:407:802::240/123\",\r\n + \ \"2603:1040:407:c02::240/123\",\r\n \"2603:1040:606:402::300/123\",\r\n + \ \"2603:1040:806:402::300/123\",\r\n \"2603:1040:904:402::300/123\",\r\n + \ \"2603:1040:904:802::240/123\",\r\n \"2603:1040:904:c02::240/123\",\r\n + \ \"2603:1040:a06:402::300/123\",\r\n \"2603:1040:a06:802::240/123\",\r\n + \ \"2603:1040:a06:c02::240/123\",\r\n \"2603:1040:b04:402::300/123\",\r\n + \ \"2603:1040:c06:402::300/123\",\r\n \"2603:1040:d04:400::480/123\",\r\n + \ \"2603:1040:d04:800::100/123\",\r\n \"2603:1040:d04:800::240/123\",\r\n + \ \"2603:1040:d04:c02::2a0/123\",\r\n \"2603:1040:f05:402::300/123\",\r\n + \ \"2603:1040:f05:802::240/123\",\r\n \"2603:1040:f05:c02::240/123\",\r\n + \ \"2603:1040:1002:400::200/123\",\r\n \"2603:1040:1002:800::e0/123\",\r\n + \ \"2603:1040:1002:c00::e0/123\",\r\n \"2603:1040:1104:400::300/123\",\r\n + \ \"2603:1050:6:402::300/123\",\r\n \"2603:1050:6:802::240/123\",\r\n + \ \"2603:1050:6:c02::240/123\",\r\n \"2603:1050:403:400::220/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault\",\r\n + \ \"id\": \"AzureKeyVault\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"7\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n + \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureKeyVault\",\r\n + \ \"addressPrefixes\": [\r\n \"13.66.138.88/30\",\r\n \"13.66.226.249/32\",\r\n + \ \"13.66.230.241/32\",\r\n \"13.67.8.104/30\",\r\n \"13.68.24.216/32\",\r\n + \ \"13.68.29.203/32\",\r\n \"13.68.104.240/32\",\r\n \"13.69.64.72/30\",\r\n + \ \"13.69.111.192/30\",\r\n \"13.69.227.72/30\",\r\n \"13.70.72.24/30\",\r\n + \ \"13.70.138.129/32\",\r\n \"13.71.170.40/30\",\r\n \"13.71.194.112/30\",\r\n + \ \"13.72.250.239/32\",\r\n \"13.74.10.39/32\",\r\n \"13.74.10.113/32\",\r\n + \ \"13.74.111.148/30\",\r\n \"13.75.34.144/30\",\r\n \"13.77.50.64/30\",\r\n + \ \"13.78.106.88/30\",\r\n \"13.80.247.19/32\",\r\n \"13.80.247.42/32\",\r\n + \ \"13.84.174.143/32\",\r\n \"13.87.34.51/32\",\r\n \"13.87.39.0/32\",\r\n + \ \"13.87.56.80/30\",\r\n \"13.87.122.80/30\",\r\n \"13.89.61.248/32\",\r\n + \ \"13.89.170.200/30\",\r\n \"20.21.37.112/30\",\r\n \"20.21.43.244/30\",\r\n + \ \"20.21.66.76/30\",\r\n \"20.21.74.76/30\",\r\n \"20.21.80.0/29\",\r\n + \ \"20.36.40.39/32\",\r\n \"20.36.40.42/32\",\r\n \"20.36.72.34/32\",\r\n + \ \"20.36.72.38/32\",\r\n \"20.36.106.64/30\",\r\n \"20.36.114.16/30\",\r\n + \ \"20.37.74.228/30\",\r\n \"20.38.149.196/30\",\r\n \"20.40.230.32/28\",\r\n + \ \"20.40.230.48/29\",\r\n \"20.42.64.44/30\",\r\n \"20.42.73.8/30\",\r\n + \ \"20.43.56.38/32\",\r\n \"20.43.56.66/32\",\r\n \"20.44.2.0/30\",\r\n + \ \"20.44.13.224/30\",\r\n \"20.44.19.172/30\",\r\n \"20.44.29.112/30\",\r\n + \ \"20.45.90.72/29\",\r\n \"20.45.90.80/30\",\r\n \"20.45.117.32/29\",\r\n + \ \"20.45.117.40/30\",\r\n \"20.45.123.240/30\",\r\n \"20.45.123.252/30\",\r\n + \ \"20.45.208.8/30\",\r\n \"20.45.241.176/29\",\r\n \"20.46.11.248/29\",\r\n + \ \"20.46.12.192/30\",\r\n \"20.48.197.104/29\",\r\n \"20.48.197.112/30\",\r\n + \ \"20.49.82.0/30\",\r\n \"20.49.90.0/30\",\r\n \"20.49.91.232/30\",\r\n + \ \"20.49.119.232/29\",\r\n \"20.49.119.240/28\",\r\n \"20.50.80.192/30\",\r\n + \ \"20.51.12.248/29\",\r\n \"20.51.13.64/30\",\r\n \"20.51.20.84/30\",\r\n + \ \"20.51.21.64/29\",\r\n \"20.52.88.144/29\",\r\n \"20.52.88.152/30\",\r\n + \ \"20.53.47.68/30\",\r\n \"20.53.47.200/29\",\r\n \"20.53.48.40/29\",\r\n + \ \"20.53.49.96/30\",\r\n \"20.53.57.40/29\",\r\n \"20.53.57.48/30\",\r\n + \ \"20.58.67.48/29\",\r\n \"20.58.67.56/30\",\r\n \"20.61.103.224/29\",\r\n + \ \"20.61.103.232/30\",\r\n \"20.62.60.128/27\",\r\n \"20.62.134.76/30\",\r\n + \ \"20.62.134.224/29\",\r\n \"20.65.134.48/28\",\r\n \"20.65.134.64/29\",\r\n + \ \"20.66.2.28/30\",\r\n \"20.66.5.128/29\",\r\n \"20.69.1.104/29\",\r\n + \ \"20.69.1.112/30\",\r\n \"20.72.21.148/30\",\r\n \"20.72.21.192/29\",\r\n + \ \"20.72.26.0/30\",\r\n \"20.83.221.96/28\",\r\n \"20.88.156.160/29\",\r\n + \ \"20.98.145.80/28\",\r\n \"20.98.192.176/28\",\r\n \"20.150.170.0/30\",\r\n + \ \"20.150.181.28/30\",\r\n \"20.150.181.164/30\",\r\n \"20.150.189.32/30\",\r\n + \ \"20.150.244.36/30\",\r\n \"20.150.245.56/29\",\r\n \"20.185.217.251/32\",\r\n + \ \"20.185.218.1/32\",\r\n \"20.186.41.83/32\",\r\n \"20.186.47.182/32\",\r\n + \ \"20.188.2.148/32\",\r\n \"20.188.2.156/32\",\r\n \"20.188.40.44/32\",\r\n + \ \"20.188.40.46/32\",\r\n \"20.189.228.136/29\",\r\n \"20.189.228.208/30\",\r\n + \ \"20.191.166.120/29\",\r\n \"20.191.167.128/30\",\r\n \"20.192.44.112/29\",\r\n + \ \"20.192.44.120/30\",\r\n \"20.192.50.216/29\",\r\n \"20.192.50.224/30\",\r\n + \ \"20.192.80.48/29\",\r\n \"20.192.80.56/30\",\r\n \"20.192.102.64/30\",\r\n + \ \"20.192.234.0/30\",\r\n \"20.193.194.44/30\",\r\n \"20.193.194.80/29\",\r\n + \ \"20.193.202.0/30\",\r\n \"20.194.66.0/30\",\r\n \"20.194.74.80/29\",\r\n + \ \"20.194.74.88/30\",\r\n \"20.195.67.192/29\",\r\n \"20.195.67.200/30\",\r\n + \ \"20.195.74.168/29\",\r\n \"20.195.74.176/30\",\r\n \"20.195.83.60/30\",\r\n + \ \"20.195.84.168/29\",\r\n \"20.195.146.68/30\",\r\n \"20.195.146.192/29\",\r\n + \ \"20.205.74.76/30\",\r\n \"20.205.82.76/30\",\r\n \"20.205.192.64/30\",\r\n + \ \"20.208.18.76/30\",\r\n \"23.96.210.207/32\",\r\n \"23.96.250.48/32\",\r\n + \ \"23.97.50.43/32\",\r\n \"23.97.120.25/32\",\r\n \"23.97.120.29/32\",\r\n + \ \"23.97.120.39/32\",\r\n \"23.97.120.57/32\",\r\n \"23.97.178.0/32\",\r\n + \ \"23.99.132.207/32\",\r\n \"23.100.57.24/32\",\r\n \"23.100.58.149/32\",\r\n + \ \"23.101.21.103/32\",\r\n \"23.101.21.193/32\",\r\n \"23.101.23.190/32\",\r\n + \ \"23.101.23.192/32\",\r\n \"23.101.159.107/32\",\r\n \"23.102.72.114/32\",\r\n + \ \"23.102.75.18/32\",\r\n \"40.65.188.244/32\",\r\n \"40.65.189.219/32\",\r\n + \ \"40.67.53.184/29\",\r\n \"40.67.53.224/30\",\r\n \"40.67.58.0/30\",\r\n + \ \"40.69.106.64/30\",\r\n \"40.70.146.72/30\",\r\n \"40.70.186.91/32\",\r\n + \ \"40.70.204.6/32\",\r\n \"40.70.204.32/32\",\r\n \"40.71.10.200/30\",\r\n + \ \"40.74.100.48/30\",\r\n \"40.74.150.68/30\",\r\n \"40.76.196.75/32\",\r\n + \ \"40.76.212.37/32\",\r\n \"40.78.194.64/30\",\r\n \"40.78.239.124/30\",\r\n + \ \"40.78.245.200/30\",\r\n \"40.78.253.68/30\",\r\n \"40.79.118.1/32\",\r\n + \ \"40.79.118.5/32\",\r\n \"40.79.130.40/30\",\r\n \"40.79.141.136/30\",\r\n + \ \"40.79.148.84/30\",\r\n \"40.79.163.156/30\",\r\n \"40.79.173.4/30\",\r\n + \ \"40.79.178.64/30\",\r\n \"40.79.191.192/30\",\r\n \"40.79.197.112/30\",\r\n + \ \"40.80.53.8/30\",\r\n \"40.84.47.24/32\",\r\n \"40.85.185.208/32\",\r\n + \ \"40.85.229.9/32\",\r\n \"40.85.231.231/32\",\r\n \"40.86.224.94/32\",\r\n + \ \"40.86.231.180/32\",\r\n \"40.87.69.184/32\",\r\n \"40.89.121.172/30\",\r\n + \ \"40.89.145.89/32\",\r\n \"40.89.145.93/32\",\r\n \"40.89.180.10/32\",\r\n + \ \"40.89.180.25/32\",\r\n \"40.91.193.78/32\",\r\n \"40.91.199.213/32\",\r\n + \ \"40.112.242.144/30\",\r\n \"40.117.157.122/32\",\r\n \"40.120.74.0/30\",\r\n + \ \"40.120.82.104/29\",\r\n \"40.120.82.112/30\",\r\n \"40.124.64.128/30\",\r\n + \ \"51.12.17.232/29\",\r\n \"51.12.17.240/30\",\r\n \"51.12.25.204/30\",\r\n + \ \"51.12.28.32/29\",\r\n \"51.12.98.0/30\",\r\n \"51.12.202.0/30\",\r\n + \ \"51.12.229.24/30\",\r\n \"51.12.237.24/30\",\r\n \"51.13.136.188/30\",\r\n + \ \"51.13.137.216/29\",\r\n \"51.103.202.76/30\",\r\n \"51.104.192.129/32\",\r\n + \ \"51.104.192.138/32\",\r\n \"51.105.4.67/32\",\r\n \"51.105.4.75/32\",\r\n + \ \"51.105.71.160/30\",\r\n \"51.105.77.56/30\",\r\n \"51.107.58.0/30\",\r\n + \ \"51.107.154.0/30\",\r\n \"51.107.241.116/30\",\r\n \"51.107.242.248/29\",\r\n + \ \"51.107.250.44/30\",\r\n \"51.107.251.104/29\",\r\n \"51.116.54.76/30\",\r\n + \ \"51.116.55.88/29\",\r\n \"51.116.58.0/30\",\r\n \"51.116.154.64/30\",\r\n + \ \"51.116.243.220/30\",\r\n \"51.116.251.188/30\",\r\n \"51.120.98.8/30\",\r\n + \ \"51.120.110.192/30\",\r\n \"51.120.214.128/30\",\r\n \"51.120.218.0/30\",\r\n + \ \"51.120.233.132/30\",\r\n \"51.120.234.128/29\",\r\n \"51.138.210.132/30\",\r\n + \ \"51.138.211.8/29\",\r\n \"51.140.146.56/30\",\r\n \"51.140.157.60/32\",\r\n + \ \"51.140.184.38/31\",\r\n \"51.140.210.80/30\",\r\n \"51.141.8.42/31\",\r\n + \ \"51.143.6.21/32\",\r\n \"51.143.212.184/29\",\r\n \"51.143.213.192/30\",\r\n + \ \"52.136.136.15/32\",\r\n \"52.136.136.16/32\",\r\n \"52.136.184.236/30\",\r\n + \ \"52.136.185.176/29\",\r\n \"52.138.73.5/32\",\r\n \"52.138.73.51/32\",\r\n + \ \"52.138.92.188/30\",\r\n \"52.138.160.103/32\",\r\n \"52.138.160.105/32\",\r\n + \ \"52.139.107.208/29\",\r\n \"52.139.107.216/30\",\r\n \"52.146.137.68/30\",\r\n + \ \"52.146.137.168/29\",\r\n \"52.147.113.72/29\",\r\n \"52.147.113.80/30\",\r\n + \ \"52.148.84.142/32\",\r\n \"52.148.84.145/32\",\r\n \"52.151.41.92/32\",\r\n + \ \"52.151.47.4/32\",\r\n \"52.151.75.86/32\",\r\n \"52.154.176.47/32\",\r\n + \ \"52.154.177.179/32\",\r\n \"52.157.162.137/32\",\r\n \"52.157.162.147/32\",\r\n + \ \"52.158.236.253/32\",\r\n \"52.158.239.35/32\",\r\n \"52.161.25.42/32\",\r\n + \ \"52.161.31.136/32\",\r\n \"52.161.31.139/32\",\r\n \"52.162.106.144/30\",\r\n + \ \"52.162.255.194/32\",\r\n \"52.165.21.159/32\",\r\n \"52.165.208.47/32\",\r\n + \ \"52.167.111.160/30\",\r\n \"52.167.143.179/32\",\r\n \"52.167.228.54/32\",\r\n + \ \"52.168.109.101/32\",\r\n \"52.169.232.147/32\",\r\n \"52.172.116.4/30\",\r\n + \ \"52.172.116.136/29\",\r\n \"52.173.90.250/32\",\r\n \"52.173.199.154/32\",\r\n + \ \"52.173.216.55/32\",\r\n \"52.175.236.86/32\",\r\n \"52.176.48.58/32\",\r\n + \ \"52.176.254.165/32\",\r\n \"52.177.71.51/32\",\r\n \"52.180.176.121/32\",\r\n + \ \"52.180.176.122/32\",\r\n \"52.182.143.192/30\",\r\n \"52.183.24.22/32\",\r\n + \ \"52.183.80.133/32\",\r\n \"52.183.93.92/32\",\r\n \"52.183.94.166/32\",\r\n + \ \"52.184.155.181/32\",\r\n \"52.184.158.37/32\",\r\n \"52.184.164.12/32\",\r\n + \ \"52.187.161.13/32\",\r\n \"52.187.163.139/32\",\r\n \"52.225.179.130/32\",\r\n + \ \"52.225.182.225/32\",\r\n \"52.225.188.225/32\",\r\n \"52.225.191.36/32\",\r\n + \ \"52.225.218.218/32\",\r\n \"52.231.18.40/30\",\r\n \"52.231.32.65/32\",\r\n + \ \"52.231.32.66/32\",\r\n \"52.231.146.80/30\",\r\n \"52.231.200.107/32\",\r\n + \ \"52.231.200.108/32\",\r\n \"52.236.189.80/30\",\r\n \"52.237.253.194/32\",\r\n + \ \"52.246.157.4/30\",\r\n \"52.247.193.69/32\",\r\n \"52.255.63.107/32\",\r\n + \ \"52.255.152.252/32\",\r\n \"52.255.152.255/32\",\r\n \"65.52.250.0/30\",\r\n + \ \"102.37.81.88/29\",\r\n \"102.37.81.128/30\",\r\n \"102.37.160.176/29\",\r\n + \ \"102.37.160.184/30\",\r\n \"102.133.26.0/30\",\r\n \"102.133.124.140/30\",\r\n + \ \"102.133.154.0/30\",\r\n \"102.133.251.220/30\",\r\n \"104.41.0.141/32\",\r\n + \ \"104.41.1.239/32\",\r\n \"104.41.162.219/32\",\r\n \"104.41.162.228/32\",\r\n + \ \"104.42.6.91/32\",\r\n \"104.42.136.180/32\",\r\n \"104.43.161.34/32\",\r\n + \ \"104.43.192.26/32\",\r\n \"104.44.136.42/32\",\r\n \"104.46.40.31/32\",\r\n + \ \"104.46.179.244/30\",\r\n \"104.46.183.152/29\",\r\n \"104.46.219.151/32\",\r\n + \ \"104.46.219.184/32\",\r\n \"104.208.26.47/32\",\r\n \"104.210.195.61/32\",\r\n + \ \"104.211.81.24/30\",\r\n \"104.211.98.11/32\",\r\n \"104.211.99.174/32\",\r\n + \ \"104.211.146.64/30\",\r\n \"104.211.166.82/32\",\r\n \"104.211.167.57/32\",\r\n + \ \"104.211.224.186/32\",\r\n \"104.211.225.134/32\",\r\n + \ \"104.214.18.168/30\",\r\n \"104.215.18.67/32\",\r\n \"104.215.31.67/32\",\r\n + \ \"104.215.94.76/32\",\r\n \"104.215.99.117/32\",\r\n \"104.215.139.166/32\",\r\n + \ \"104.215.140.132/32\",\r\n \"137.116.44.148/32\",\r\n + \ \"137.116.120.244/32\",\r\n \"137.116.233.191/32\",\r\n + \ \"168.62.108.27/32\",\r\n \"168.62.237.29/32\",\r\n \"168.63.167.27/32\",\r\n + \ \"168.63.219.200/32\",\r\n \"168.63.219.205/32\",\r\n \"191.233.50.0/30\",\r\n + \ \"191.233.203.24/30\",\r\n \"191.234.149.140/30\",\r\n + \ \"191.234.157.44/30\",\r\n \"191.238.72.76/30\",\r\n \"191.238.72.152/29\",\r\n + \ \"2603:1000:4::2a0/125\",\r\n \"2603:1000:4:402::80/125\",\r\n + \ \"2603:1000:104::660/125\",\r\n \"2603:1000:104:402::80/125\",\r\n + \ \"2603:1000:104:802::80/125\",\r\n \"2603:1000:104:c02::80/125\",\r\n + \ \"2603:1010:6::340/125\",\r\n \"2603:1010:6:402::80/125\",\r\n + \ \"2603:1010:6:802::80/125\",\r\n \"2603:1010:6:c02::80/125\",\r\n + \ \"2603:1010:101::2a0/125\",\r\n \"2603:1010:101:402::80/125\",\r\n + \ \"2603:1010:304::2a0/125\",\r\n \"2603:1010:304:402::80/125\",\r\n + \ \"2603:1010:404::2a0/125\",\r\n \"2603:1010:404:402::80/125\",\r\n + \ \"2603:1020:5::340/125\",\r\n \"2603:1020:5:402::80/125\",\r\n + \ \"2603:1020:5:802::80/125\",\r\n \"2603:1020:5:c02::80/125\",\r\n + \ \"2603:1020:206::340/125\",\r\n \"2603:1020:206:402::80/125\",\r\n + \ \"2603:1020:206:802::80/125\",\r\n \"2603:1020:206:c02::80/125\",\r\n + \ \"2603:1020:305:402::80/125\",\r\n \"2603:1020:405:402::80/125\",\r\n + \ \"2603:1020:605::2a0/125\",\r\n \"2603:1020:605:402::80/125\",\r\n + \ \"2603:1020:705::340/125\",\r\n \"2603:1020:705:402::80/125\",\r\n + \ \"2603:1020:705:802::80/125\",\r\n \"2603:1020:705:c02::80/125\",\r\n + \ \"2603:1020:805::340/125\",\r\n \"2603:1020:805:402::80/125\",\r\n + \ \"2603:1020:805:802::80/125\",\r\n \"2603:1020:805:c02::80/125\",\r\n + \ \"2603:1020:905::2a0/125\",\r\n \"2603:1020:905:402::80/125\",\r\n + \ \"2603:1020:a04::340/125\",\r\n \"2603:1020:a04:402::80/125\",\r\n + \ \"2603:1020:a04:802::80/125\",\r\n \"2603:1020:a04:c02::80/125\",\r\n + \ \"2603:1020:b04::2a0/125\",\r\n \"2603:1020:b04:402::80/125\",\r\n + \ \"2603:1020:c04::340/125\",\r\n \"2603:1020:c04:402::80/125\",\r\n + \ \"2603:1020:c04:802::80/125\",\r\n \"2603:1020:c04:c02::80/125\",\r\n + \ \"2603:1020:d04::2a0/125\",\r\n \"2603:1020:d04:402::80/125\",\r\n + \ \"2603:1020:e04::340/125\",\r\n \"2603:1020:e04:402::80/125\",\r\n + \ \"2603:1020:e04:802::80/125\",\r\n \"2603:1020:e04:c02::80/125\",\r\n + \ \"2603:1020:f04::2a0/125\",\r\n \"2603:1020:f04:402::80/125\",\r\n + \ \"2603:1020:1004:1::1f8/125\",\r\n \"2603:1020:1004:400::80/125\",\r\n + \ \"2603:1020:1004:400::2f8/125\",\r\n \"2603:1020:1004:800::140/125\",\r\n + \ \"2603:1020:1104:1::158/125\",\r\n \"2603:1020:1104:400::80/125\",\r\n + \ \"2603:1030:f:1::2a0/125\",\r\n \"2603:1030:f:400::880/125\",\r\n + \ \"2603:1030:10::340/125\",\r\n \"2603:1030:10:402::80/125\",\r\n + \ \"2603:1030:10:802::80/125\",\r\n \"2603:1030:10:c02::80/125\",\r\n + \ \"2603:1030:104::340/125\",\r\n \"2603:1030:104:402::80/125\",\r\n + \ \"2603:1030:107::738/125\",\r\n \"2603:1030:107:400::/125\",\r\n + \ \"2603:1030:107:400::10/125\",\r\n \"2603:1030:210::340/125\",\r\n + \ \"2603:1030:210:402::80/125\",\r\n \"2603:1030:210:802::80/125\",\r\n + \ \"2603:1030:210:c02::80/125\",\r\n \"2603:1030:40b:2::220/125\",\r\n + \ \"2603:1030:40b:400::880/125\",\r\n \"2603:1030:40b:800::80/125\",\r\n + \ \"2603:1030:40b:c00::80/125\",\r\n \"2603:1030:40c::340/125\",\r\n + \ \"2603:1030:40c:402::80/125\",\r\n \"2603:1030:40c:802::80/125\",\r\n + \ \"2603:1030:40c:c02::80/125\",\r\n \"2603:1030:504::1f8/125\",\r\n + \ \"2603:1030:504:402::80/125\",\r\n \"2603:1030:504:402::2f8/125\",\r\n + \ \"2603:1030:504:802::140/125\",\r\n \"2603:1030:608::2a0/125\",\r\n + \ \"2603:1030:608:402::80/125\",\r\n \"2603:1030:807::340/125\",\r\n + \ \"2603:1030:807:402::80/125\",\r\n \"2603:1030:807:802::80/125\",\r\n + \ \"2603:1030:807:c02::80/125\",\r\n \"2603:1030:a07::2a0/125\",\r\n + \ \"2603:1030:a07:402::80/125\",\r\n \"2603:1030:b04::2a0/125\",\r\n + \ \"2603:1030:b04:402::80/125\",\r\n \"2603:1030:c06:2::220/125\",\r\n + \ \"2603:1030:c06:400::880/125\",\r\n \"2603:1030:c06:802::80/125\",\r\n + \ \"2603:1030:c06:c02::80/125\",\r\n \"2603:1030:f05::340/125\",\r\n + \ \"2603:1030:f05:402::80/125\",\r\n \"2603:1030:f05:802::80/125\",\r\n + \ \"2603:1030:f05:c02::80/125\",\r\n \"2603:1030:1005::2a0/125\",\r\n + \ \"2603:1030:1005:402::80/125\",\r\n \"2603:1040:5::440/125\",\r\n + \ \"2603:1040:5:402::80/125\",\r\n \"2603:1040:5:802::80/125\",\r\n + \ \"2603:1040:5:c02::80/125\",\r\n \"2603:1040:207::2a0/125\",\r\n + \ \"2603:1040:207:402::80/125\",\r\n \"2603:1040:407::340/125\",\r\n + \ \"2603:1040:407:402::80/125\",\r\n \"2603:1040:407:802::80/125\",\r\n + \ \"2603:1040:407:c02::80/125\",\r\n \"2603:1040:606::2a0/125\",\r\n + \ \"2603:1040:606:402::80/125\",\r\n \"2603:1040:806::2a0/125\",\r\n + \ \"2603:1040:806:402::80/125\",\r\n \"2603:1040:904::340/125\",\r\n + \ \"2603:1040:904:402::80/125\",\r\n \"2603:1040:904:802::80/125\",\r\n + \ \"2603:1040:904:c02::80/125\",\r\n \"2603:1040:a06::440/125\",\r\n + \ \"2603:1040:a06:402::80/125\",\r\n \"2603:1040:a06:802::80/125\",\r\n + \ \"2603:1040:a06:c02::80/125\",\r\n \"2603:1040:b04::2a0/125\",\r\n + \ \"2603:1040:b04:402::80/125\",\r\n \"2603:1040:c06::2a0/125\",\r\n + \ \"2603:1040:c06:402::80/125\",\r\n \"2603:1040:d04:1::1f8/125\",\r\n + \ \"2603:1040:d04:400::80/125\",\r\n \"2603:1040:d04:400::2f8/125\",\r\n + \ \"2603:1040:d04:800::140/125\",\r\n \"2603:1040:e05::20/125\",\r\n + \ \"2603:1040:f05::340/125\",\r\n \"2603:1040:f05:402::80/125\",\r\n + \ \"2603:1040:f05:802::80/125\",\r\n \"2603:1040:f05:c02::80/125\",\r\n + \ \"2603:1040:1002:1::470/125\",\r\n \"2603:1040:1104:1::158/125\",\r\n + \ \"2603:1040:1104:400::80/125\",\r\n \"2603:1050:6::340/125\",\r\n + \ \"2603:1050:6:402::80/125\",\r\n \"2603:1050:6:802::80/125\",\r\n + \ \"2603:1050:6:c02::80/125\",\r\n \"2603:1050:403:1::220/125\",\r\n + \ \"2603:1050:403:400::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.AustraliaCentral\",\r\n \"id\": + \"AzureKeyVault.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"australiacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.36.40.39/32\",\r\n \"20.36.40.42/32\",\r\n \"20.36.106.64/30\",\r\n + \ \"20.53.48.40/29\",\r\n \"20.53.49.96/30\",\r\n \"2603:1010:304::2a0/125\",\r\n + \ \"2603:1010:304:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.AustraliaCentral2\",\r\n \"id\": + \"AzureKeyVault.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.36.72.34/32\",\r\n + \ \"20.36.72.38/32\",\r\n \"20.36.114.16/30\",\r\n \"20.53.57.40/29\",\r\n + \ \"20.53.57.48/30\",\r\n \"2603:1010:404::2a0/125\",\r\n + \ \"2603:1010:404:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.AustraliaEast\",\r\n \"id\": + \"AzureKeyVault.AustraliaEast\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"13.70.72.24/30\",\r\n \"13.72.250.239/32\",\r\n + \ \"20.53.47.68/30\",\r\n \"20.53.47.200/29\",\r\n \"40.79.163.156/30\",\r\n + \ \"40.79.173.4/30\",\r\n \"52.237.253.194/32\",\r\n \"2603:1010:6::340/125\",\r\n + \ \"2603:1010:6:402::80/125\",\r\n \"2603:1010:6:802::80/125\",\r\n + \ \"2603:1010:6:c02::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.AustraliaSoutheast\",\r\n \"id\": + \"AzureKeyVault.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.70.138.129/32\",\r\n + \ \"13.77.50.64/30\",\r\n \"52.255.63.107/32\",\r\n \"104.46.179.244/30\",\r\n + \ \"104.46.183.152/29\",\r\n \"2603:1010:101::2a0/125\",\r\n + \ \"2603:1010:101:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.BrazilSouth\",\r\n \"id\": \"AzureKeyVault.BrazilSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"104.41.0.141/32\",\r\n + \ \"104.41.1.239/32\",\r\n \"191.233.203.24/30\",\r\n \"191.234.149.140/30\",\r\n + \ \"191.234.157.44/30\",\r\n \"191.238.72.76/30\",\r\n \"191.238.72.152/29\",\r\n + \ \"2603:1050:6::340/125\",\r\n \"2603:1050:6:402::80/125\",\r\n + \ \"2603:1050:6:802::80/125\",\r\n \"2603:1050:6:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.BrazilSoutheast\",\r\n + \ \"id\": \"AzureKeyVault.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.195.146.68/30\",\r\n \"20.195.146.192/29\",\r\n + \ \"23.97.120.25/32\",\r\n \"23.97.120.29/32\",\r\n \"23.97.120.39/32\",\r\n + \ \"23.97.120.57/32\",\r\n \"191.233.50.0/30\",\r\n \"2603:1050:403:1::220/125\",\r\n + \ \"2603:1050:403:400::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.CanadaCentral\",\r\n \"id\": + \"AzureKeyVault.CanadaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"13.71.170.40/30\",\r\n \"20.38.149.196/30\",\r\n + \ \"20.48.197.104/29\",\r\n \"20.48.197.112/30\",\r\n \"40.85.229.9/32\",\r\n + \ \"40.85.231.231/32\",\r\n \"52.246.157.4/30\",\r\n \"2603:1030:f05::340/125\",\r\n + \ \"2603:1030:f05:402::80/125\",\r\n \"2603:1030:f05:802::80/125\",\r\n + \ \"2603:1030:f05:c02::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.CanadaEast\",\r\n \"id\": \"AzureKeyVault.CanadaEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"40.69.106.64/30\",\r\n + \ \"40.86.224.94/32\",\r\n \"40.86.231.180/32\",\r\n \"52.139.107.208/29\",\r\n + \ \"52.139.107.216/30\",\r\n \"2603:1030:1005::2a0/125\",\r\n + \ \"2603:1030:1005:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.CentralIndia\",\r\n \"id\": + \"AzureKeyVault.CentralIndia\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.192.44.112/29\",\r\n \"20.192.44.120/30\",\r\n + \ \"20.192.102.64/30\",\r\n \"40.80.53.8/30\",\r\n \"104.211.81.24/30\",\r\n + \ \"104.211.98.11/32\",\r\n \"104.211.99.174/32\",\r\n \"2603:1040:a06::440/125\",\r\n + \ \"2603:1040:a06:402::80/125\",\r\n \"2603:1040:a06:802::80/125\",\r\n + \ \"2603:1040:a06:c02::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.CentralUS\",\r\n \"id\": \"AzureKeyVault.CentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.89.61.248/32\",\r\n + \ \"13.89.170.200/30\",\r\n \"20.40.230.32/28\",\r\n \"20.40.230.48/29\",\r\n + \ \"20.44.13.224/30\",\r\n \"20.98.145.80/28\",\r\n \"23.99.132.207/32\",\r\n + \ \"52.154.176.47/32\",\r\n \"52.154.177.179/32\",\r\n \"52.165.21.159/32\",\r\n + \ \"52.165.208.47/32\",\r\n \"52.173.90.250/32\",\r\n \"52.173.199.154/32\",\r\n + \ \"52.173.216.55/32\",\r\n \"52.176.48.58/32\",\r\n \"52.182.143.192/30\",\r\n + \ \"104.43.161.34/32\",\r\n \"104.43.192.26/32\",\r\n \"104.208.26.47/32\",\r\n + \ \"2603:1030:10::340/125\",\r\n \"2603:1030:10:402::80/125\",\r\n + \ \"2603:1030:10:802::80/125\",\r\n \"2603:1030:10:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.CentralUSEUAP\",\r\n + \ \"id\": \"AzureKeyVault.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.45.208.8/30\",\r\n \"20.45.241.176/29\",\r\n + \ \"20.46.11.248/29\",\r\n \"20.46.12.192/30\",\r\n \"52.176.254.165/32\",\r\n + \ \"52.180.176.121/32\",\r\n \"52.180.176.122/32\",\r\n \"2603:1030:f:1::2a0/125\",\r\n + \ \"2603:1030:f:400::880/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.EastAsia\",\r\n \"id\": \"AzureKeyVault.EastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.75.34.144/30\",\r\n + \ \"20.195.74.168/29\",\r\n \"20.195.74.176/30\",\r\n \"20.205.74.76/30\",\r\n + \ \"20.205.82.76/30\",\r\n \"168.63.219.200/32\",\r\n \"168.63.219.205/32\",\r\n + \ \"2603:1040:207::2a0/125\",\r\n \"2603:1040:207:402::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.EastUS\",\r\n + \ \"id\": \"AzureKeyVault.EastUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.42.64.44/30\",\r\n \"20.42.73.8/30\",\r\n \"20.62.134.76/30\",\r\n + \ \"20.62.134.224/29\",\r\n \"20.88.156.160/29\",\r\n \"20.185.217.251/32\",\r\n + \ \"20.185.218.1/32\",\r\n \"40.71.10.200/30\",\r\n \"40.76.196.75/32\",\r\n + \ \"40.76.212.37/32\",\r\n \"40.85.185.208/32\",\r\n \"40.87.69.184/32\",\r\n + \ \"40.117.157.122/32\",\r\n \"52.168.109.101/32\",\r\n \"52.255.152.252/32\",\r\n + \ \"52.255.152.255/32\",\r\n \"137.116.120.244/32\",\r\n + \ \"2603:1030:210::340/125\",\r\n \"2603:1030:210:402::80/125\",\r\n + \ \"2603:1030:210:802::80/125\",\r\n \"2603:1030:210:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.EastUS2\",\r\n + \ \"id\": \"AzureKeyVault.EastUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"13.68.24.216/32\",\r\n \"13.68.29.203/32\",\r\n + \ \"13.68.104.240/32\",\r\n \"20.44.19.172/30\",\r\n \"20.62.60.128/27\",\r\n + \ \"20.98.192.176/28\",\r\n \"20.186.41.83/32\",\r\n \"20.186.47.182/32\",\r\n + \ \"23.101.159.107/32\",\r\n \"40.70.146.72/30\",\r\n \"40.70.186.91/32\",\r\n + \ \"40.70.204.6/32\",\r\n \"40.70.204.32/32\",\r\n \"40.84.47.24/32\",\r\n + \ \"52.167.111.160/30\",\r\n \"52.167.143.179/32\",\r\n \"52.167.228.54/32\",\r\n + \ \"52.177.71.51/32\",\r\n \"52.184.155.181/32\",\r\n \"52.184.158.37/32\",\r\n + \ \"52.184.164.12/32\",\r\n \"52.225.218.218/32\",\r\n \"137.116.44.148/32\",\r\n + \ \"2603:1030:40c::340/125\",\r\n \"2603:1030:40c:402::80/125\",\r\n + \ \"2603:1030:40c:802::80/125\",\r\n \"2603:1030:40c:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.EastUS2EUAP\",\r\n + \ \"id\": \"AzureKeyVault.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.51.20.84/30\",\r\n \"20.51.21.64/29\",\r\n \"40.74.150.68/30\",\r\n + \ \"40.79.118.1/32\",\r\n \"40.79.118.5/32\",\r\n \"40.89.121.172/30\",\r\n + \ \"52.138.73.5/32\",\r\n \"52.138.73.51/32\",\r\n \"52.138.92.188/30\",\r\n + \ \"52.225.179.130/32\",\r\n \"52.225.182.225/32\",\r\n \"52.225.188.225/32\",\r\n + \ \"52.225.191.36/32\",\r\n \"2603:1030:40b:2::220/125\",\r\n + \ \"2603:1030:40b:400::880/125\",\r\n \"2603:1030:40b:800::80/125\",\r\n + \ \"2603:1030:40b:c00::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.FranceCentral\",\r\n \"id\": + \"AzureKeyVault.FranceCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.43.56.38/32\",\r\n \"20.43.56.66/32\",\r\n \"20.188.40.44/32\",\r\n + \ \"20.188.40.46/32\",\r\n \"40.79.130.40/30\",\r\n \"40.79.141.136/30\",\r\n + \ \"40.79.148.84/30\",\r\n \"40.89.145.89/32\",\r\n \"40.89.145.93/32\",\r\n + \ \"40.89.180.10/32\",\r\n \"40.89.180.25/32\",\r\n \"51.138.210.132/30\",\r\n + \ \"51.138.211.8/29\",\r\n \"2603:1020:805::340/125\",\r\n + \ \"2603:1020:805:402::80/125\",\r\n \"2603:1020:805:802::80/125\",\r\n + \ \"2603:1020:805:c02::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.FranceSouth\",\r\n \"id\": \"AzureKeyVault.FranceSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"40.79.178.64/30\",\r\n + \ \"52.136.136.15/32\",\r\n \"52.136.136.16/32\",\r\n \"52.136.184.236/30\",\r\n + \ \"52.136.185.176/29\",\r\n \"2603:1020:905::2a0/125\",\r\n + \ \"2603:1020:905:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.GermanyNorth\",\r\n \"id\": + \"AzureKeyVault.GermanyNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"51.116.54.76/30\",\r\n \"51.116.55.88/29\",\r\n + \ \"51.116.58.0/30\",\r\n \"2603:1020:d04::2a0/125\",\r\n + \ \"2603:1020:d04:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.GermanyWestCentral\",\r\n \"id\": + \"AzureKeyVault.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.52.88.144/29\",\r\n \"20.52.88.152/30\",\r\n + \ \"51.116.154.64/30\",\r\n \"51.116.243.220/30\",\r\n \"51.116.251.188/30\",\r\n + \ \"2603:1020:c04::340/125\",\r\n \"2603:1020:c04:402::80/125\",\r\n + \ \"2603:1020:c04:802::80/125\",\r\n \"2603:1020:c04:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.JapanEast\",\r\n + \ \"id\": \"AzureKeyVault.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"13.78.106.88/30\",\r\n \"20.188.2.148/32\",\r\n + \ \"20.188.2.156/32\",\r\n \"20.191.166.120/29\",\r\n \"20.191.167.128/30\",\r\n + \ \"23.102.72.114/32\",\r\n \"23.102.75.18/32\",\r\n \"40.79.191.192/30\",\r\n + \ \"40.79.197.112/30\",\r\n \"104.41.162.219/32\",\r\n \"104.41.162.228/32\",\r\n + \ \"104.46.219.151/32\",\r\n \"104.46.219.184/32\",\r\n \"2603:1040:407::340/125\",\r\n + \ \"2603:1040:407:402::80/125\",\r\n \"2603:1040:407:802::80/125\",\r\n + \ \"2603:1040:407:c02::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.JapanWest\",\r\n \"id\": \"AzureKeyVault.JapanWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.189.228.136/29\",\r\n + \ \"20.189.228.208/30\",\r\n \"40.74.100.48/30\",\r\n \"104.215.18.67/32\",\r\n + \ \"104.215.31.67/32\",\r\n \"2603:1040:606::2a0/125\",\r\n + \ \"2603:1040:606:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.JioIndiaCentral\",\r\n \"id\": + \"AzureKeyVault.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.192.50.216/29\",\r\n \"20.192.50.224/30\",\r\n + \ \"20.192.234.0/30\",\r\n \"2603:1040:1104:1::158/125\",\r\n + \ \"2603:1040:1104:400::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.JioIndiaWest\",\r\n \"id\": + \"AzureKeyVault.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.193.194.44/30\",\r\n \"20.193.194.80/29\",\r\n + \ \"20.193.202.0/30\",\r\n \"2603:1040:d04:1::1f8/125\",\r\n + \ \"2603:1040:d04:400::80/125\",\r\n \"2603:1040:d04:400::2f8/125\",\r\n + \ \"2603:1040:d04:800::140/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.KoreaCentral\",\r\n \"id\": + \"AzureKeyVault.KoreaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.44.29.112/30\",\r\n \"20.194.66.0/30\",\r\n \"20.194.74.80/29\",\r\n + \ \"20.194.74.88/30\",\r\n \"52.231.18.40/30\",\r\n \"52.231.32.65/32\",\r\n + \ \"52.231.32.66/32\",\r\n \"2603:1040:f05::340/125\",\r\n + \ \"2603:1040:f05:402::80/125\",\r\n \"2603:1040:f05:802::80/125\",\r\n + \ \"2603:1040:f05:c02::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.KoreaSouth\",\r\n \"id\": \"AzureKeyVault.KoreaSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"52.147.113.72/29\",\r\n + \ \"52.147.113.80/30\",\r\n \"52.231.146.80/30\",\r\n \"52.231.200.107/32\",\r\n + \ \"52.231.200.108/32\",\r\n \"2603:1040:e05::20/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.NorthCentralUS\",\r\n + \ \"id\": \"AzureKeyVault.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.49.119.232/29\",\r\n + \ \"20.49.119.240/28\",\r\n \"23.96.210.207/32\",\r\n \"23.96.250.48/32\",\r\n + \ \"52.162.106.144/30\",\r\n \"52.162.255.194/32\",\r\n \"168.62.108.27/32\",\r\n + \ \"168.62.237.29/32\",\r\n \"2603:1030:608::2a0/125\",\r\n + \ \"2603:1030:608:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.NorthEurope\",\r\n \"id\": \"AzureKeyVault.NorthEurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.69.227.72/30\",\r\n + \ \"13.74.10.39/32\",\r\n \"13.74.10.113/32\",\r\n \"13.74.111.148/30\",\r\n + \ \"20.50.80.192/30\",\r\n \"23.100.57.24/32\",\r\n \"23.100.58.149/32\",\r\n + \ \"52.138.160.103/32\",\r\n \"52.138.160.105/32\",\r\n \"52.146.137.68/30\",\r\n + \ \"52.146.137.168/29\",\r\n \"52.169.232.147/32\",\r\n \"137.116.233.191/32\",\r\n + \ \"2603:1020:5::340/125\",\r\n \"2603:1020:5:402::80/125\",\r\n + \ \"2603:1020:5:802::80/125\",\r\n \"2603:1020:5:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.NorwayEast\",\r\n + \ \"id\": \"AzureKeyVault.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"51.120.98.8/30\",\r\n \"51.120.110.192/30\",\r\n + \ \"51.120.214.128/30\",\r\n \"51.120.233.132/30\",\r\n \"51.120.234.128/29\",\r\n + \ \"2603:1020:e04::340/125\",\r\n \"2603:1020:e04:402::80/125\",\r\n + \ \"2603:1020:e04:802::80/125\",\r\n \"2603:1020:e04:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.NorwayWest\",\r\n + \ \"id\": \"AzureKeyVault.NorwayWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"51.13.136.188/30\",\r\n \"51.13.137.216/29\",\r\n + \ \"51.120.218.0/30\",\r\n \"2603:1020:f04::2a0/125\",\r\n + \ \"2603:1020:f04:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.SouthAfricaNorth\",\r\n \"id\": + \"AzureKeyVault.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"southafricanorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"102.37.160.176/29\",\r\n \"102.37.160.184/30\",\r\n + \ \"102.133.124.140/30\",\r\n \"102.133.154.0/30\",\r\n \"102.133.251.220/30\",\r\n + \ \"2603:1000:104::660/125\",\r\n \"2603:1000:104:402::80/125\",\r\n + \ \"2603:1000:104:802::80/125\",\r\n \"2603:1000:104:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SouthAfricaWest\",\r\n + \ \"id\": \"AzureKeyVault.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"102.37.81.88/29\",\r\n + \ \"102.37.81.128/30\",\r\n \"102.133.26.0/30\",\r\n \"2603:1000:4::2a0/125\",\r\n + \ \"2603:1000:4:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.SouthCentralUS\",\r\n \"id\": + \"AzureKeyVault.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"southcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"13.84.174.143/32\",\r\n \"20.45.123.240/30\",\r\n + \ \"20.45.123.252/30\",\r\n \"20.49.90.0/30\",\r\n \"20.49.91.232/30\",\r\n + \ \"20.65.134.48/28\",\r\n \"20.65.134.64/29\",\r\n \"40.124.64.128/30\",\r\n + \ \"104.44.136.42/32\",\r\n \"104.210.195.61/32\",\r\n \"104.214.18.168/30\",\r\n + \ \"104.215.94.76/32\",\r\n \"104.215.99.117/32\",\r\n \"2603:1030:807::340/125\",\r\n + \ \"2603:1030:807:402::80/125\",\r\n \"2603:1030:807:802::80/125\",\r\n + \ \"2603:1030:807:c02::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.SouthCentralUSSTG\",\r\n \"id\": + \"AzureKeyVault.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.44.2.0/30\",\r\n \"20.45.117.32/29\",\r\n \"20.45.117.40/30\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SoutheastAsia\",\r\n + \ \"id\": \"AzureKeyVault.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"13.67.8.104/30\",\r\n \"20.195.67.192/29\",\r\n + \ \"20.195.67.200/30\",\r\n \"20.195.83.60/30\",\r\n \"20.195.84.168/29\",\r\n + \ \"20.205.192.64/30\",\r\n \"23.97.50.43/32\",\r\n \"23.101.21.103/32\",\r\n + \ \"23.101.21.193/32\",\r\n \"23.101.23.190/32\",\r\n \"23.101.23.192/32\",\r\n + \ \"40.65.188.244/32\",\r\n \"40.65.189.219/32\",\r\n \"40.78.239.124/30\",\r\n + \ \"52.148.84.142/32\",\r\n \"52.148.84.145/32\",\r\n \"52.187.161.13/32\",\r\n + \ \"52.187.163.139/32\",\r\n \"104.215.139.166/32\",\r\n + \ \"104.215.140.132/32\",\r\n \"168.63.167.27/32\",\r\n \"2603:1040:5::440/125\",\r\n + \ \"2603:1040:5:402::80/125\",\r\n \"2603:1040:5:802::80/125\",\r\n + \ \"2603:1040:5:c02::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.SouthIndia\",\r\n \"id\": \"AzureKeyVault.SouthIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"40.78.194.64/30\",\r\n + \ \"52.172.116.4/30\",\r\n \"52.172.116.136/29\",\r\n \"104.211.224.186/32\",\r\n + \ \"104.211.225.134/32\",\r\n \"2603:1040:c06::2a0/125\",\r\n + \ \"2603:1040:c06:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.SwedenCentral\",\r\n \"id\": + \"AzureKeyVault.SwedenCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"51.12.25.204/30\",\r\n \"51.12.28.32/29\",\r\n \"51.12.98.0/30\",\r\n + \ \"51.12.229.24/30\",\r\n \"51.12.237.24/30\",\r\n \"2603:1020:1004:1::1f8/125\",\r\n + \ \"2603:1020:1004:400::80/125\",\r\n \"2603:1020:1004:400::2f8/125\",\r\n + \ \"2603:1020:1004:800::140/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.SwitzerlandNorth\",\r\n \"id\": + \"AzureKeyVault.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.208.18.76/30\",\r\n \"51.103.202.76/30\",\r\n + \ \"51.107.58.0/30\",\r\n \"51.107.241.116/30\",\r\n \"51.107.242.248/29\",\r\n + \ \"2603:1020:a04::340/125\",\r\n \"2603:1020:a04:402::80/125\",\r\n + \ \"2603:1020:a04:802::80/125\",\r\n \"2603:1020:a04:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.SwitzerlandWest\",\r\n + \ \"id\": \"AzureKeyVault.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"51.107.154.0/30\",\r\n \"51.107.250.44/30\",\r\n + \ \"51.107.251.104/29\",\r\n \"2603:1020:b04::2a0/125\",\r\n + \ \"2603:1020:b04:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.UAECentral\",\r\n \"id\": \"AzureKeyVault.UAECentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.37.74.228/30\",\r\n + \ \"20.45.90.72/29\",\r\n \"20.45.90.80/30\",\r\n \"2603:1040:b04::2a0/125\",\r\n + \ \"2603:1040:b04:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.UAENorth\",\r\n \"id\": \"AzureKeyVault.UAENorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"40.120.74.0/30\",\r\n + \ \"40.120.82.104/29\",\r\n \"40.120.82.112/30\",\r\n \"65.52.250.0/30\",\r\n + \ \"2603:1040:904::340/125\",\r\n \"2603:1040:904:402::80/125\",\r\n + \ \"2603:1040:904:802::80/125\",\r\n \"2603:1040:904:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.UKSouth\",\r\n + \ \"id\": \"AzureKeyVault.UKSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"51.104.192.129/32\",\r\n \"51.104.192.138/32\",\r\n + \ \"51.105.4.67/32\",\r\n \"51.105.4.75/32\",\r\n \"51.105.71.160/30\",\r\n + \ \"51.105.77.56/30\",\r\n \"51.140.146.56/30\",\r\n \"51.140.157.60/32\",\r\n + \ \"51.140.184.38/31\",\r\n \"51.143.212.184/29\",\r\n \"51.143.213.192/30\",\r\n + \ \"52.151.75.86/32\",\r\n \"2603:1020:705::340/125\",\r\n + \ \"2603:1020:705:402::80/125\",\r\n \"2603:1020:705:802::80/125\",\r\n + \ \"2603:1020:705:c02::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.UKWest\",\r\n \"id\": \"AzureKeyVault.UKWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"20.58.67.48/29\",\r\n + \ \"20.58.67.56/30\",\r\n \"51.140.210.80/30\",\r\n \"51.141.8.42/31\",\r\n + \ \"2603:1020:605::2a0/125\",\r\n \"2603:1020:605:402::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.WestCentralUS\",\r\n + \ \"id\": \"AzureKeyVault.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"13.71.194.112/30\",\r\n \"20.69.1.104/29\",\r\n + \ \"20.69.1.112/30\",\r\n \"52.161.25.42/32\",\r\n \"52.161.31.136/32\",\r\n + \ \"52.161.31.139/32\",\r\n \"2603:1030:b04::2a0/125\",\r\n + \ \"2603:1030:b04:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.WestEurope\",\r\n \"id\": \"AzureKeyVault.WestEurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.69.64.72/30\",\r\n + \ \"13.69.111.192/30\",\r\n \"13.80.247.19/32\",\r\n \"13.80.247.42/32\",\r\n + \ \"20.61.103.224/29\",\r\n \"20.61.103.232/30\",\r\n \"23.97.178.0/32\",\r\n + \ \"40.91.193.78/32\",\r\n \"40.91.199.213/32\",\r\n \"52.157.162.137/32\",\r\n + \ \"52.157.162.147/32\",\r\n \"52.236.189.80/30\",\r\n \"104.46.40.31/32\",\r\n + \ \"2603:1020:206::340/125\",\r\n \"2603:1020:206:402::80/125\",\r\n + \ \"2603:1020:206:802::80/125\",\r\n \"2603:1020:206:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.WestIndia\",\r\n + \ \"id\": \"AzureKeyVault.WestIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.192.80.48/29\",\r\n \"20.192.80.56/30\",\r\n + \ \"104.211.146.64/30\",\r\n \"104.211.166.82/32\",\r\n \"104.211.167.57/32\",\r\n + \ \"2603:1040:806::2a0/125\",\r\n \"2603:1040:806:402::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.WestUS\",\r\n + \ \"id\": \"AzureKeyVault.WestUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.66.2.28/30\",\r\n \"20.66.5.128/29\",\r\n \"40.112.242.144/30\",\r\n + \ \"104.42.6.91/32\",\r\n \"104.42.136.180/32\",\r\n \"2603:1030:a07::2a0/125\",\r\n + \ \"2603:1030:a07:402::80/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureKeyVault.WestUS2\",\r\n \"id\": \"AzureKeyVault.WestUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureKeyVault\",\r\n \"addressPrefixes\": [\r\n \"13.66.138.88/30\",\r\n + \ \"13.66.226.249/32\",\r\n \"13.66.230.241/32\",\r\n \"20.51.12.248/29\",\r\n + \ \"20.51.13.64/30\",\r\n \"20.83.221.96/28\",\r\n \"40.78.245.200/30\",\r\n + \ \"40.78.253.68/30\",\r\n \"51.143.6.21/32\",\r\n \"52.151.41.92/32\",\r\n + \ \"52.151.47.4/32\",\r\n \"52.158.236.253/32\",\r\n \"52.158.239.35/32\",\r\n + \ \"52.175.236.86/32\",\r\n \"52.183.24.22/32\",\r\n \"52.183.80.133/32\",\r\n + \ \"52.183.93.92/32\",\r\n \"52.183.94.166/32\",\r\n \"52.247.193.69/32\",\r\n + \ \"2603:1030:c06:2::220/125\",\r\n \"2603:1030:c06:400::880/125\",\r\n + \ \"2603:1030:c06:802::80/125\",\r\n \"2603:1030:c06:c02::80/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureKeyVault.WestUS3\",\r\n + \ \"id\": \"AzureKeyVault.WestUS3\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureKeyVault\",\r\n \"addressPrefixes\": + [\r\n \"20.150.170.0/30\",\r\n \"20.150.181.28/30\",\r\n + \ \"20.150.181.164/30\",\r\n \"20.150.189.32/30\",\r\n \"20.150.244.36/30\",\r\n + \ \"20.150.245.56/29\",\r\n \"2603:1030:504::1f8/125\",\r\n + \ \"2603:1030:504:402::80/125\",\r\n \"2603:1030:504:402::2f8/125\",\r\n + \ \"2603:1030:504:802::140/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureMachineLearning\",\r\n \"id\": \"AzureMachineLearning\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureMachineLearning\",\r\n \"addressPrefixes\": + [\r\n \"13.66.87.135/32\",\r\n \"13.66.140.80/28\",\r\n + \ \"13.67.8.224/28\",\r\n \"13.69.64.192/28\",\r\n \"13.69.106.192/28\",\r\n + \ \"13.69.227.192/28\",\r\n \"13.70.72.144/28\",\r\n \"13.71.170.192/28\",\r\n + \ \"13.71.173.80/28\",\r\n \"13.71.194.240/28\",\r\n \"13.73.240.16/28\",\r\n + \ \"13.73.240.112/28\",\r\n \"13.73.240.240/28\",\r\n \"13.73.248.96/28\",\r\n + \ \"13.74.107.160/28\",\r\n \"13.75.36.16/28\",\r\n \"13.77.50.224/28\",\r\n + \ \"13.78.106.208/28\",\r\n \"13.86.195.35/32\",\r\n \"13.87.56.112/28\",\r\n + \ \"13.87.122.112/28\",\r\n \"13.87.160.129/32\",\r\n \"13.89.171.64/28\",\r\n + \ \"20.21.33.0/27\",\r\n \"20.36.106.80/28\",\r\n \"20.36.114.160/28\",\r\n + \ \"20.37.67.80/28\",\r\n \"20.37.74.208/28\",\r\n \"20.37.152.240/28\",\r\n + \ \"20.37.192.96/28\",\r\n \"20.38.80.96/28\",\r\n \"20.38.128.48/28\",\r\n + \ \"20.38.147.128/28\",\r\n \"20.39.1.205/32\",\r\n \"20.39.11.80/28\",\r\n + \ \"20.40.141.171/32\",\r\n \"20.40.231.32/28\",\r\n \"20.41.0.240/28\",\r\n + \ \"20.41.64.80/28\",\r\n \"20.41.197.0/28\",\r\n \"20.42.0.240/28\",\r\n + \ \"20.42.129.16/28\",\r\n \"20.42.227.48/28\",\r\n \"20.43.40.96/28\",\r\n + \ \"20.43.64.96/28\",\r\n \"20.43.120.112/28\",\r\n \"20.43.128.112/28\",\r\n + \ \"20.44.3.32/28\",\r\n \"20.44.26.224/28\",\r\n \"20.44.132.166/32\",\r\n + \ \"20.45.240.64/28\",\r\n \"20.46.13.192/28\",\r\n \"20.48.197.240/28\",\r\n + \ \"20.51.1.48/28\",\r\n \"20.51.14.48/28\",\r\n \"20.51.21.224/28\",\r\n + \ \"20.62.61.128/28\",\r\n \"20.62.135.208/28\",\r\n \"20.65.135.0/28\",\r\n + \ \"20.66.6.48/28\",\r\n \"20.69.1.240/28\",\r\n \"20.70.216.96/28\",\r\n + \ \"20.72.16.48/28\",\r\n \"20.82.244.0/28\",\r\n \"20.86.88.160/28\",\r\n + \ \"20.89.9.0/28\",\r\n \"20.99.8.96/27\",\r\n \"20.150.161.128/28\",\r\n + \ \"20.150.171.80/28\",\r\n \"20.150.179.64/28\",\r\n \"20.150.187.64/28\",\r\n + \ \"20.150.246.16/28\",\r\n \"20.188.219.157/32\",\r\n \"20.188.221.15/32\",\r\n + \ \"20.189.106.80/28\",\r\n \"20.189.229.176/28\",\r\n \"20.192.47.112/28\",\r\n + \ \"20.192.99.64/28\",\r\n \"20.192.160.48/28\",\r\n \"20.192.225.144/28\",\r\n + \ \"20.192.235.16/28\",\r\n \"20.193.194.176/28\",\r\n \"20.195.69.64/28\",\r\n + \ \"20.195.75.48/28\",\r\n \"20.195.75.96/27\",\r\n \"20.200.192.16/28\",\r\n + \ \"23.98.82.192/28\",\r\n \"23.100.232.216/32\",\r\n \"40.66.61.146/32\",\r\n + \ \"40.67.59.80/28\",\r\n \"40.69.106.224/28\",\r\n \"40.70.146.192/28\",\r\n + \ \"40.70.154.161/32\",\r\n \"40.71.11.64/28\",\r\n \"40.74.24.96/28\",\r\n + \ \"40.74.100.176/28\",\r\n \"40.74.147.48/28\",\r\n \"40.75.35.48/28\",\r\n + \ \"40.78.194.224/28\",\r\n \"40.78.202.80/28\",\r\n \"40.78.227.32/28\",\r\n + \ \"40.78.234.128/28\",\r\n \"40.78.242.176/28\",\r\n \"40.78.250.112/28\",\r\n + \ \"40.79.130.192/28\",\r\n \"40.79.138.128/28\",\r\n \"40.79.146.128/28\",\r\n + \ \"40.79.154.64/28\",\r\n \"40.79.162.48/28\",\r\n \"40.79.170.224/28\",\r\n + \ \"40.79.178.224/28\",\r\n \"40.79.186.160/28\",\r\n \"40.79.194.64/28\",\r\n + \ \"40.80.51.64/28\",\r\n \"40.80.57.176/28\",\r\n \"40.80.169.160/28\",\r\n + \ \"40.80.184.80/28\",\r\n \"40.80.188.96/28\",\r\n \"40.81.27.228/32\",\r\n + \ \"40.82.187.230/32\",\r\n \"40.82.248.80/28\",\r\n \"40.89.17.208/28\",\r\n + \ \"40.90.184.249/32\",\r\n \"40.91.77.76/32\",\r\n \"40.112.242.176/28\",\r\n + \ \"40.119.8.80/28\",\r\n \"51.11.24.49/32\",\r\n \"51.12.29.0/28\",\r\n + \ \"51.12.29.64/27\",\r\n \"51.12.47.32/28\",\r\n \"51.12.99.80/28\",\r\n + \ \"51.12.198.224/28\",\r\n \"51.12.203.80/28\",\r\n \"51.12.227.64/28\",\r\n + \ \"51.12.235.64/28\",\r\n \"51.104.8.64/27\",\r\n \"51.104.24.96/28\",\r\n + \ \"51.105.67.16/28\",\r\n \"51.105.75.128/28\",\r\n \"51.105.88.224/28\",\r\n + \ \"51.105.129.135/32\",\r\n \"51.107.59.48/28\",\r\n \"51.107.147.32/28\",\r\n + \ \"51.107.155.48/28\",\r\n \"51.107.247.64/27\",\r\n \"51.116.49.176/28\",\r\n + \ \"51.116.59.48/28\",\r\n \"51.116.155.112/28\",\r\n \"51.116.156.128/28\",\r\n + \ \"51.116.250.224/28\",\r\n \"51.120.99.64/28\",\r\n \"51.120.107.64/28\",\r\n + \ \"51.120.211.64/28\",\r\n \"51.120.219.80/28\",\r\n \"51.120.227.80/28\",\r\n + \ \"51.120.234.224/28\",\r\n \"51.137.161.224/28\",\r\n \"51.138.213.16/28\",\r\n + \ \"51.140.146.208/28\",\r\n \"51.140.210.208/28\",\r\n \"51.143.214.32/28\",\r\n + \ \"51.144.184.47/32\",\r\n \"52.138.90.144/28\",\r\n \"52.138.226.160/28\",\r\n + \ \"52.139.3.33/32\",\r\n \"52.140.107.96/28\",\r\n \"52.141.25.58/32\",\r\n + \ \"52.141.26.97/32\",\r\n \"52.148.163.43/32\",\r\n \"52.150.136.80/28\",\r\n + \ \"52.151.111.249/32\",\r\n \"52.155.90.254/32\",\r\n \"52.155.115.7/32\",\r\n + \ \"52.156.193.50/32\",\r\n \"52.162.106.176/28\",\r\n \"52.167.106.160/28\",\r\n + \ \"52.177.164.219/32\",\r\n \"52.182.139.32/28\",\r\n \"52.184.87.76/32\",\r\n + \ \"52.185.70.56/32\",\r\n \"52.228.80.80/28\",\r\n \"52.230.56.136/32\",\r\n + \ \"52.231.18.192/28\",\r\n \"52.231.146.208/28\",\r\n \"52.236.186.192/28\",\r\n + \ \"52.242.224.215/32\",\r\n \"52.246.155.128/28\",\r\n \"52.249.59.91/32\",\r\n + \ \"52.252.160.26/32\",\r\n \"52.253.131.79/32\",\r\n \"52.253.131.198/32\",\r\n + \ \"52.253.227.208/32\",\r\n \"52.255.214.109/32\",\r\n \"52.255.217.127/32\",\r\n + \ \"65.52.250.192/28\",\r\n \"102.37.163.32/28\",\r\n \"102.133.27.32/28\",\r\n + \ \"102.133.58.224/28\",\r\n \"102.133.122.224/27\",\r\n + \ \"102.133.155.32/28\",\r\n \"102.133.251.64/28\",\r\n \"104.208.16.160/28\",\r\n + \ \"104.208.144.160/28\",\r\n \"104.211.81.144/28\",\r\n + \ \"104.214.19.32/28\",\r\n \"191.233.8.48/28\",\r\n \"191.233.203.144/28\",\r\n + \ \"191.233.240.165/32\",\r\n \"191.233.242.167/32\",\r\n + \ \"191.234.147.64/28\",\r\n \"191.234.155.64/28\",\r\n \"191.235.224.96/28\",\r\n + \ \"191.238.73.80/28\",\r\n \"2603:1000:4::300/122\",\r\n + \ \"2603:1000:104:1::2c0/122\",\r\n \"2603:1010:6:1::2c0/122\",\r\n + \ \"2603:1010:101::300/122\",\r\n \"2603:1010:304::300/122\",\r\n + \ \"2603:1010:404::300/122\",\r\n \"2603:1020:5:1::2c0/122\",\r\n + \ \"2603:1020:206:1::2c0/122\",\r\n \"2603:1020:305::300/122\",\r\n + \ \"2603:1020:405::300/122\",\r\n \"2603:1020:605::300/122\",\r\n + \ \"2603:1020:705:1::2c0/122\",\r\n \"2603:1020:805:1::2c0/122\",\r\n + \ \"2603:1020:905::300/122\",\r\n \"2603:1020:a04:1::2c0/122\",\r\n + \ \"2603:1020:b04::300/122\",\r\n \"2603:1020:c04:1::2c0/122\",\r\n + \ \"2603:1020:d04::300/122\",\r\n \"2603:1020:e04:1::2c0/122\",\r\n + \ \"2603:1020:f04::300/122\",\r\n \"2603:1020:1004::2c0/122\",\r\n + \ \"2603:1020:1104::240/122\",\r\n \"2603:1030:f:1::300/122\",\r\n + \ \"2603:1030:10:1::2c0/122\",\r\n \"2603:1030:104:1::2c0/122\",\r\n + \ \"2603:1030:107::240/122\",\r\n \"2603:1030:210:1::2c0/122\",\r\n + \ \"2603:1030:40b:1::2c0/122\",\r\n \"2603:1030:40c:1::2c0/122\",\r\n + \ \"2603:1030:504:1::2c0/122\",\r\n \"2603:1030:608::300/122\",\r\n + \ \"2603:1030:807:1::2c0/122\",\r\n \"2603:1030:a07::300/122\",\r\n + \ \"2603:1030:b04::300/122\",\r\n \"2603:1030:c06:1::2c0/122\",\r\n + \ \"2603:1030:f05:1::2c0/122\",\r\n \"2603:1030:1005::300/122\",\r\n + \ \"2603:1040:5:1::2c0/122\",\r\n \"2603:1040:207::300/122\",\r\n + \ \"2603:1040:407:1::2c0/122\",\r\n \"2603:1040:606::300/122\",\r\n + \ \"2603:1040:806::300/122\",\r\n \"2603:1040:904:1::2c0/122\",\r\n + \ \"2603:1040:a06:1::2c0/122\",\r\n \"2603:1040:b04::300/122\",\r\n + \ \"2603:1040:c06::300/122\",\r\n \"2603:1040:d04::2c0/122\",\r\n + \ \"2603:1040:f05:1::2c0/122\",\r\n \"2603:1040:1002::440/122\",\r\n + \ \"2603:1040:1104::240/122\",\r\n \"2603:1050:6:1::2c0/122\",\r\n + \ \"2603:1050:403::2c0/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureMonitor\",\r\n \"id\": \"AzureMonitor\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"9\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureMonitor\",\r\n \"addressPrefixes\": + [\r\n \"13.65.96.175/32\",\r\n \"13.65.206.67/32\",\r\n + \ \"13.65.211.125/32\",\r\n \"13.66.36.144/32\",\r\n \"13.66.37.172/32\",\r\n + \ \"13.66.59.226/32\",\r\n \"13.66.60.151/32\",\r\n \"13.66.140.168/29\",\r\n + \ \"13.66.141.152/29\",\r\n \"13.66.143.218/32\",\r\n \"13.66.145.232/29\",\r\n + \ \"13.66.147.144/28\",\r\n \"13.66.160.124/32\",\r\n \"13.66.220.187/32\",\r\n + \ \"13.66.231.27/32\",\r\n \"13.67.9.192/28\",\r\n \"13.67.10.64/29\",\r\n + \ \"13.67.10.92/30\",\r\n \"13.67.15.0/32\",\r\n \"13.67.15.112/29\",\r\n + \ \"13.67.77.233/32\",\r\n \"13.67.89.191/32\",\r\n \"13.68.31.237/32\",\r\n + \ \"13.68.101.211/32\",\r\n \"13.68.106.77/32\",\r\n \"13.68.109.212/32\",\r\n + \ \"13.68.111.247/32\",\r\n \"13.69.51.175/32\",\r\n \"13.69.51.218/32\",\r\n + \ \"13.69.65.16/28\",\r\n \"13.69.66.136/29\",\r\n \"13.69.67.60/30\",\r\n + \ \"13.69.67.126/32\",\r\n \"13.69.106.88/29\",\r\n \"13.69.106.208/28\",\r\n + \ \"13.69.109.224/27\",\r\n \"13.69.111.200/29\",\r\n \"13.69.229.64/29\",\r\n + \ \"13.69.229.240/29\",\r\n \"13.69.233.0/30\",\r\n \"13.69.233.96/27\",\r\n + \ \"13.69.239.96/29\",\r\n \"13.70.72.232/29\",\r\n \"13.70.73.104/29\",\r\n + \ \"13.70.79.88/29\",\r\n \"13.70.79.96/27\",\r\n \"13.70.124.27/32\",\r\n + \ \"13.70.127.61/32\",\r\n \"13.71.172.128/28\",\r\n \"13.71.172.248/29\",\r\n + \ \"13.71.175.128/32\",\r\n \"13.71.175.216/29\",\r\n \"13.71.177.32/27\",\r\n + \ \"13.71.187.91/32\",\r\n \"13.71.191.47/32\",\r\n \"13.71.195.192/27\",\r\n + \ \"13.71.196.56/29\",\r\n \"13.71.199.116/32\",\r\n \"13.73.26.213/32\",\r\n + \ \"13.73.240.0/29\",\r\n \"13.73.242.32/29\",\r\n \"13.73.244.192/31\",\r\n + \ \"13.73.248.6/31\",\r\n \"13.73.253.104/29\",\r\n \"13.73.253.112/29\",\r\n + \ \"13.73.253.120/32\",\r\n \"13.74.107.88/30\",\r\n \"13.74.108.128/29\",\r\n + \ \"13.74.111.152/29\",\r\n \"13.75.38.0/28\",\r\n \"13.75.38.120/29\",\r\n + \ \"13.75.39.76/30\",\r\n \"13.75.117.221/32\",\r\n \"13.75.119.169/32\",\r\n + \ \"13.75.195.15/32\",\r\n \"13.76.85.243/32\",\r\n \"13.76.87.86/32\",\r\n + \ \"13.77.52.16/28\",\r\n \"13.77.53.48/29\",\r\n \"13.77.53.220/32\",\r\n + \ \"13.77.150.166/32\",\r\n \"13.77.155.39/32\",\r\n \"13.77.174.177/32\",\r\n + \ \"13.78.10.58/32\",\r\n \"13.78.13.189/32\",\r\n \"13.78.108.160/29\",\r\n + \ \"13.78.108.168/30\",\r\n \"13.78.109.112/29\",\r\n \"13.78.111.192/32\",\r\n + \ \"13.78.135.15/32\",\r\n \"13.78.145.11/32\",\r\n \"13.78.151.158/32\",\r\n + \ \"13.78.172.58/32\",\r\n \"13.78.189.112/32\",\r\n \"13.78.236.149/32\",\r\n + \ \"13.78.237.51/32\",\r\n \"13.80.134.255/32\",\r\n \"13.82.100.176/32\",\r\n + \ \"13.82.184.151/32\",\r\n \"13.84.134.59/32\",\r\n \"13.84.148.7/32\",\r\n + \ \"13.84.149.186/32\",\r\n \"13.84.173.179/32\",\r\n \"13.84.189.95/32\",\r\n + \ \"13.84.225.10/32\",\r\n \"13.85.70.142/32\",\r\n \"13.86.218.224/28\",\r\n + \ \"13.86.218.248/29\",\r\n \"13.86.223.128/26\",\r\n \"13.87.56.248/29\",\r\n + \ \"13.87.57.128/28\",\r\n \"13.87.122.248/29\",\r\n \"13.87.123.128/28\",\r\n + \ \"13.88.177.28/32\",\r\n \"13.88.230.43/32\",\r\n \"13.88.247.208/32\",\r\n + \ \"13.88.255.115/32\",\r\n \"13.89.42.127/32\",\r\n \"13.89.171.112/30\",\r\n + \ \"13.89.174.128/29\",\r\n \"13.89.179.0/29\",\r\n \"13.90.93.206/32\",\r\n + \ \"13.90.248.141/32\",\r\n \"13.90.249.229/32\",\r\n \"13.90.251.123/32\",\r\n + \ \"13.91.42.27/32\",\r\n \"13.91.102.27/32\",\r\n \"13.92.40.198/32\",\r\n + \ \"13.92.40.223/32\",\r\n \"13.92.138.16/32\",\r\n \"13.92.179.52/32\",\r\n + \ \"13.92.211.249/32\",\r\n \"13.92.232.146/32\",\r\n \"13.92.254.218/32\",\r\n + \ \"13.92.255.146/32\",\r\n \"13.93.215.80/32\",\r\n \"13.93.233.49/32\",\r\n + \ \"13.93.236.73/32\",\r\n \"13.94.39.13/32\",\r\n \"20.21.37.116/30\",\r\n + \ \"20.21.37.120/29\",\r\n \"20.21.39.224/29\",\r\n \"20.21.46.128/29\",\r\n + \ \"20.21.53.0/27\",\r\n \"20.21.67.200/29\",\r\n \"20.21.75.200/29\",\r\n + \ \"20.36.107.24/29\",\r\n \"20.36.107.160/28\",\r\n \"20.36.114.200/29\",\r\n + \ \"20.36.114.208/28\",\r\n \"20.36.125.224/27\",\r\n \"20.37.71.0/27\",\r\n + \ \"20.37.74.232/29\",\r\n \"20.37.74.240/28\",\r\n \"20.37.152.68/31\",\r\n + \ \"20.37.192.68/31\",\r\n \"20.37.195.26/31\",\r\n \"20.37.198.112/28\",\r\n + \ \"20.37.198.140/32\",\r\n \"20.37.198.232/29\",\r\n \"20.37.198.240/28\",\r\n + \ \"20.37.227.16/28\",\r\n \"20.37.227.100/31\",\r\n \"20.37.227.104/29\",\r\n + \ \"20.37.227.112/28\",\r\n \"20.38.80.68/31\",\r\n \"20.38.128.64/29\",\r\n + \ \"20.38.132.64/27\",\r\n \"20.38.143.0/27\",\r\n \"20.38.143.44/30\",\r\n + \ \"20.38.146.152/29\",\r\n \"20.38.147.144/29\",\r\n \"20.38.149.200/29\",\r\n + \ \"20.38.152.32/27\",\r\n \"20.39.14.0/28\",\r\n \"20.39.15.16/28\",\r\n + \ \"20.39.15.32/28\",\r\n \"20.40.124.0/32\",\r\n \"20.40.137.91/32\",\r\n + \ \"20.40.140.212/32\",\r\n \"20.40.160.120/32\",\r\n \"20.40.200.172/31\",\r\n + \ \"20.40.200.174/32\",\r\n \"20.40.206.128/28\",\r\n \"20.40.206.232/29\",\r\n + \ \"20.40.207.128/28\",\r\n \"20.40.228.0/26\",\r\n \"20.41.49.208/32\",\r\n + \ \"20.41.64.68/31\",\r\n \"20.41.67.112/28\",\r\n \"20.41.69.4/30\",\r\n + \ \"20.41.69.16/28\",\r\n \"20.41.69.48/31\",\r\n \"20.41.69.62/31\",\r\n + \ \"20.41.208.32/27\",\r\n \"20.42.0.68/31\",\r\n \"20.42.65.72/29\",\r\n + \ \"20.42.65.128/25\",\r\n \"20.42.73.16/29\",\r\n \"20.42.73.128/25\",\r\n + \ \"20.42.128.68/31\",\r\n \"20.42.230.112/28\",\r\n \"20.42.230.208/28\",\r\n + \ \"20.42.230.224/29\",\r\n \"20.42.230.232/31\",\r\n \"20.43.40.68/31\",\r\n + \ \"20.43.41.178/31\",\r\n \"20.43.44.128/28\",\r\n \"20.43.44.216/29\",\r\n + \ \"20.43.44.224/28\",\r\n \"20.43.64.68/31\",\r\n \"20.43.65.154/31\",\r\n + \ \"20.43.70.96/28\",\r\n \"20.43.70.192/29\",\r\n \"20.43.70.200/30\",\r\n + \ \"20.43.70.204/32\",\r\n \"20.43.70.224/29\",\r\n \"20.43.98.234/32\",\r\n + \ \"20.43.99.158/32\",\r\n \"20.43.120.0/29\",\r\n \"20.43.120.240/29\",\r\n + \ \"20.43.123.200/29\",\r\n \"20.43.128.68/31\",\r\n \"20.43.152.45/32\",\r\n + \ \"20.44.3.48/28\",\r\n \"20.44.8.0/28\",\r\n \"20.44.11.192/26\",\r\n + \ \"20.44.12.192/26\",\r\n \"20.44.13.232/29\",\r\n \"20.44.16.0/29\",\r\n + \ \"20.44.17.0/29\",\r\n \"20.44.26.152/29\",\r\n \"20.44.26.248/29\",\r\n + \ \"20.44.29.120/29\",\r\n \"20.44.73.196/32\",\r\n \"20.44.192.217/32\",\r\n + \ \"20.45.122.152/29\",\r\n \"20.45.123.80/29\",\r\n \"20.45.123.116/30\",\r\n + \ \"20.45.125.224/28\",\r\n \"20.45.127.64/29\",\r\n \"20.45.208.32/29\",\r\n + \ \"20.46.10.224/27\",\r\n \"20.46.12.196/30\",\r\n \"20.46.13.216/29\",\r\n + \ \"20.46.15.48/29\",\r\n \"20.47.217.0/29\",\r\n \"20.48.193.224/27\",\r\n + \ \"20.49.83.32/28\",\r\n \"20.49.84.32/27\",\r\n \"20.49.91.32/28\",\r\n + \ \"20.49.93.192/26\",\r\n \"20.49.95.48/29\",\r\n \"20.49.99.44/31\",\r\n + \ \"20.49.99.64/28\",\r\n \"20.49.102.24/29\",\r\n \"20.49.102.32/28\",\r\n + \ \"20.49.109.46/31\",\r\n \"20.49.109.80/28\",\r\n \"20.49.111.16/28\",\r\n + \ \"20.49.111.32/28\",\r\n \"20.49.114.20/30\",\r\n \"20.49.114.32/28\",\r\n + \ \"20.49.114.48/31\",\r\n \"20.49.120.64/28\",\r\n \"20.50.65.80/28\",\r\n + \ \"20.50.68.112/29\",\r\n \"20.50.68.120/30\",\r\n \"20.50.68.124/31\",\r\n + \ \"20.50.68.128/29\",\r\n \"20.50.80.200/29\",\r\n \"20.51.5.44/31\",\r\n + \ \"20.51.9.0/26\",\r\n \"20.51.17.64/27\",\r\n \"20.52.64.24/29\",\r\n + \ \"20.52.64.32/27\",\r\n \"20.52.72.64/27\",\r\n \"20.53.0.128/27\",\r\n + \ \"20.53.46.64/27\",\r\n \"20.53.48.64/27\",\r\n \"20.58.66.96/27\",\r\n + \ \"20.61.99.64/27\",\r\n \"20.62.132.0/25\",\r\n \"20.65.132.0/26\",\r\n + \ \"20.66.2.192/26\",\r\n \"20.72.20.48/28\",\r\n \"20.72.21.0/30\",\r\n + \ \"20.72.21.32/27\",\r\n \"20.72.28.192/27\",\r\n \"20.83.192.192/29\",\r\n + \ \"20.89.1.32/29\",\r\n \"20.98.192.0/27\",\r\n \"20.99.11.48/28\",\r\n + \ \"20.99.11.96/30\",\r\n \"20.150.167.184/29\",\r\n \"20.150.171.208/29\",\r\n + \ \"20.150.173.0/28\",\r\n \"20.150.178.152/29\",\r\n \"20.150.181.96/28\",\r\n + \ \"20.150.181.168/29\",\r\n \"20.150.182.32/27\",\r\n \"20.150.186.152/29\",\r\n + \ \"20.150.189.40/29\",\r\n \"20.150.225.8/29\",\r\n \"20.150.241.64/29\",\r\n + \ \"20.150.241.72/30\",\r\n \"20.150.241.96/27\",\r\n \"20.187.197.192/27\",\r\n + \ \"20.188.36.28/32\",\r\n \"20.189.81.24/32\",\r\n \"20.189.81.26/32\",\r\n + \ \"20.189.109.144/28\",\r\n \"20.189.111.0/28\",\r\n \"20.189.111.16/29\",\r\n + \ \"20.189.111.24/31\",\r\n \"20.189.172.0/25\",\r\n \"20.189.225.128/27\",\r\n + \ \"20.190.60.32/32\",\r\n \"20.190.60.38/32\",\r\n \"20.191.165.64/27\",\r\n + \ \"20.192.32.192/27\",\r\n \"20.192.43.96/27\",\r\n \"20.192.45.100/31\",\r\n + \ \"20.192.48.0/27\",\r\n \"20.192.50.192/28\",\r\n \"20.192.98.152/29\",\r\n + \ \"20.192.101.32/27\",\r\n \"20.192.102.72/29\",\r\n \"20.192.167.160/27\",\r\n + \ \"20.192.231.244/30\",\r\n \"20.192.235.144/28\",\r\n \"20.193.96.32/27\",\r\n + \ \"20.193.160.40/29\",\r\n \"20.193.194.24/29\",\r\n \"20.193.194.32/29\",\r\n + \ \"20.193.194.40/30\",\r\n \"20.193.203.112/28\",\r\n \"20.193.204.64/27\",\r\n + \ \"20.194.67.32/28\",\r\n \"20.194.67.216/29\",\r\n \"20.194.67.224/27\",\r\n + \ \"20.194.72.224/27\",\r\n \"20.195.74.188/31\",\r\n \"20.195.82.160/27\",\r\n + \ \"20.205.77.184/29\",\r\n \"20.205.83.232/29\",\r\n \"20.205.192.72/29\",\r\n + \ \"20.208.19.200/29\",\r\n \"23.96.28.38/32\",\r\n \"23.96.245.125/32\",\r\n + \ \"23.96.252.161/32\",\r\n \"23.96.252.216/32\",\r\n \"23.97.65.103/32\",\r\n + \ \"23.98.82.120/29\",\r\n \"23.98.82.208/28\",\r\n \"23.98.104.160/28\",\r\n + \ \"23.98.106.136/29\",\r\n \"23.98.106.144/30\",\r\n \"23.98.106.148/31\",\r\n + \ \"23.98.106.150/32\",\r\n \"23.98.106.152/29\",\r\n \"23.98.113.96/29\",\r\n + \ \"23.99.130.172/32\",\r\n \"23.100.90.7/32\",\r\n \"23.100.94.221/32\",\r\n + \ \"23.100.122.113/32\",\r\n \"23.100.228.32/32\",\r\n \"23.101.0.142/32\",\r\n + \ \"23.101.9.4/32\",\r\n \"23.101.13.65/32\",\r\n \"23.101.69.223/32\",\r\n + \ \"23.101.225.155/32\",\r\n \"23.101.232.120/32\",\r\n \"23.101.239.238/32\",\r\n + \ \"23.102.44.211/32\",\r\n \"23.102.45.216/32\",\r\n \"23.102.66.132/32\",\r\n + \ \"23.102.77.48/32\",\r\n \"23.102.181.197/32\",\r\n \"40.64.132.128/28\",\r\n + \ \"40.64.132.240/28\",\r\n \"40.64.134.128/29\",\r\n \"40.64.134.136/31\",\r\n + \ \"40.64.134.138/32\",\r\n \"40.67.52.224/27\",\r\n \"40.67.59.192/28\",\r\n + \ \"40.67.122.0/26\",\r\n \"40.67.122.96/29\",\r\n \"40.68.61.229/32\",\r\n + \ \"40.68.154.39/32\",\r\n \"40.69.81.159/32\",\r\n \"40.69.107.16/28\",\r\n + \ \"40.69.108.48/29\",\r\n \"40.69.111.128/27\",\r\n \"40.69.194.158/32\",\r\n + \ \"40.70.23.205/32\",\r\n \"40.70.148.0/30\",\r\n \"40.70.148.8/29\",\r\n + \ \"40.71.12.224/28\",\r\n \"40.71.12.240/30\",\r\n \"40.71.12.248/29\",\r\n + \ \"40.71.13.168/29\",\r\n \"40.71.14.112/30\",\r\n \"40.71.183.225/32\",\r\n + \ \"40.74.24.68/31\",\r\n \"40.74.36.208/32\",\r\n \"40.74.59.40/32\",\r\n + \ \"40.74.101.32/28\",\r\n \"40.74.101.200/29\",\r\n \"40.74.146.84/30\",\r\n + \ \"40.74.147.160/29\",\r\n \"40.74.150.32/27\",\r\n \"40.74.150.72/29\",\r\n + \ \"40.74.249.98/32\",\r\n \"40.75.34.40/29\",\r\n \"40.75.35.64/29\",\r\n + \ \"40.76.29.55/32\",\r\n \"40.76.53.225/32\",\r\n \"40.77.17.183/32\",\r\n + \ \"40.77.22.234/32\",\r\n \"40.77.24.27/32\",\r\n \"40.77.101.95/32\",\r\n + \ \"40.77.109.134/32\",\r\n \"40.78.23.86/32\",\r\n \"40.78.57.61/32\",\r\n + \ \"40.78.107.177/32\",\r\n \"40.78.195.16/28\",\r\n \"40.78.196.48/29\",\r\n + \ \"40.78.202.144/28\",\r\n \"40.78.203.240/29\",\r\n \"40.78.226.216/29\",\r\n + \ \"40.78.229.32/29\",\r\n \"40.78.234.56/29\",\r\n \"40.78.234.144/28\",\r\n + \ \"40.78.242.168/30\",\r\n \"40.78.243.16/29\",\r\n \"40.78.247.64/26\",\r\n + \ \"40.78.250.104/30\",\r\n \"40.78.250.208/29\",\r\n \"40.78.253.72/29\",\r\n + \ \"40.78.253.192/26\",\r\n \"40.79.130.240/29\",\r\n \"40.79.132.32/29\",\r\n + \ \"40.79.138.40/30\",\r\n \"40.79.138.144/29\",\r\n \"40.79.141.144/29\",\r\n + \ \"40.79.146.40/30\",\r\n \"40.79.146.144/29\",\r\n \"40.79.150.96/29\",\r\n + \ \"40.79.154.80/29\",\r\n \"40.79.156.32/29\",\r\n \"40.79.162.40/29\",\r\n + \ \"40.79.163.0/29\",\r\n \"40.79.165.64/28\",\r\n \"40.79.165.88/29\",\r\n + \ \"40.79.170.24/29\",\r\n \"40.79.170.240/29\",\r\n \"40.79.173.8/29\",\r\n + \ \"40.79.179.8/29\",\r\n \"40.79.179.16/28\",\r\n \"40.79.187.8/29\",\r\n + \ \"40.79.190.160/27\",\r\n \"40.79.191.200/29\",\r\n \"40.79.194.104/29\",\r\n + \ \"40.79.194.112/29\",\r\n \"40.79.197.120/29\",\r\n \"40.80.50.152/29\",\r\n + \ \"40.80.51.80/29\",\r\n \"40.80.54.32/29\",\r\n \"40.80.180.160/27\",\r\n + \ \"40.80.191.224/28\",\r\n \"40.81.58.225/32\",\r\n \"40.84.133.5/32\",\r\n + \ \"40.84.150.47/32\",\r\n \"40.84.189.107/32\",\r\n \"40.84.192.116/32\",\r\n + \ \"40.85.180.90/32\",\r\n \"40.85.201.168/32\",\r\n \"40.85.218.175/32\",\r\n + \ \"40.85.248.43/32\",\r\n \"40.86.89.165/32\",\r\n \"40.86.201.128/32\",\r\n + \ \"40.87.67.118/32\",\r\n \"40.87.138.220/32\",\r\n \"40.87.140.215/32\",\r\n + \ \"40.89.121.176/29\",\r\n \"40.89.153.171/32\",\r\n \"40.89.189.61/32\",\r\n + \ \"40.112.49.101/32\",\r\n \"40.112.74.241/32\",\r\n \"40.113.176.128/28\",\r\n + \ \"40.113.178.16/28\",\r\n \"40.113.178.32/28\",\r\n \"40.113.178.48/32\",\r\n + \ \"40.114.241.141/32\",\r\n \"40.115.54.120/32\",\r\n \"40.115.103.168/32\",\r\n + \ \"40.115.104.31/32\",\r\n \"40.117.80.207/32\",\r\n \"40.117.95.162/32\",\r\n + \ \"40.117.147.74/32\",\r\n \"40.117.190.239/32\",\r\n \"40.117.197.224/32\",\r\n + \ \"40.118.129.58/32\",\r\n \"40.119.4.128/32\",\r\n \"40.119.8.72/31\",\r\n + \ \"40.119.11.160/28\",\r\n \"40.119.11.180/30\",\r\n \"40.120.8.192/27\",\r\n + \ \"40.120.64.200/29\",\r\n \"40.120.75.32/28\",\r\n \"40.120.77.160/29\",\r\n + \ \"40.121.57.2/32\",\r\n \"40.121.61.208/32\",\r\n \"40.121.135.131/32\",\r\n + \ \"40.121.163.228/32\",\r\n \"40.121.165.150/32\",\r\n \"40.121.210.163/32\",\r\n + \ \"40.124.64.144/29\",\r\n \"40.124.64.192/26\",\r\n \"40.126.246.183/32\",\r\n + \ \"40.127.75.125/32\",\r\n \"40.127.84.197/32\",\r\n \"40.127.144.141/32\",\r\n + \ \"51.11.97.96/27\",\r\n \"51.11.192.40/29\",\r\n \"51.12.17.20/30\",\r\n + \ \"51.12.17.56/29\",\r\n \"51.12.17.128/29\",\r\n \"51.12.25.56/29\",\r\n + \ \"51.12.25.192/29\",\r\n \"51.12.25.200/30\",\r\n \"51.12.46.0/27\",\r\n + \ \"51.12.99.72/29\",\r\n \"51.12.102.192/27\",\r\n \"51.12.102.224/29\",\r\n + \ \"51.12.168.64/29\",\r\n \"51.12.195.224/27\",\r\n \"51.12.203.208/28\",\r\n + \ \"51.12.205.96/27\",\r\n \"51.12.226.152/29\",\r\n \"51.12.229.224/29\",\r\n + \ \"51.12.234.152/29\",\r\n \"51.12.237.32/27\",\r\n \"51.12.237.192/29\",\r\n + \ \"51.13.1.8/29\",\r\n \"51.13.128.32/27\",\r\n \"51.13.136.192/27\",\r\n + \ \"51.103.203.200/29\",\r\n \"51.104.8.104/29\",\r\n \"51.104.15.255/32\",\r\n + \ \"51.104.24.68/31\",\r\n \"51.104.25.142/31\",\r\n \"51.104.29.192/28\",\r\n + \ \"51.104.30.160/29\",\r\n \"51.104.30.168/32\",\r\n \"51.104.30.176/28\",\r\n + \ \"51.104.252.13/32\",\r\n \"51.104.255.249/32\",\r\n \"51.105.66.152/29\",\r\n + \ \"51.105.67.160/29\",\r\n \"51.105.70.128/27\",\r\n \"51.105.71.168/29\",\r\n + \ \"51.105.74.152/29\",\r\n \"51.105.75.144/29\",\r\n \"51.105.248.23/32\",\r\n + \ \"51.107.48.68/31\",\r\n \"51.107.48.126/31\",\r\n \"51.107.51.16/28\",\r\n + \ \"51.107.51.120/29\",\r\n \"51.107.52.192/30\",\r\n \"51.107.52.200/29\",\r\n + \ \"51.107.59.176/28\",\r\n \"51.107.75.144/32\",\r\n \"51.107.75.207/32\",\r\n + \ \"51.107.128.56/29\",\r\n \"51.107.128.96/27\",\r\n \"51.107.147.16/28\",\r\n + \ \"51.107.147.116/30\",\r\n \"51.107.148.0/28\",\r\n \"51.107.148.16/31\",\r\n + \ \"51.107.155.176/28\",\r\n \"51.107.156.48/29\",\r\n \"51.107.192.160/27\",\r\n + \ \"51.107.242.0/27\",\r\n \"51.107.243.172/31\",\r\n \"51.107.250.0/27\",\r\n + \ \"51.116.54.32/27\",\r\n \"51.116.59.176/28\",\r\n \"51.116.149.0/27\",\r\n + \ \"51.116.155.240/28\",\r\n \"51.116.242.152/29\",\r\n \"51.116.245.96/28\",\r\n + \ \"51.116.246.96/29\",\r\n \"51.116.250.152/29\",\r\n \"51.116.253.32/28\",\r\n + \ \"51.116.253.136/29\",\r\n \"51.120.40.68/31\",\r\n \"51.120.98.0/29\",\r\n + \ \"51.120.98.248/29\",\r\n \"51.120.106.152/29\",\r\n \"51.120.110.200/29\",\r\n + \ \"51.120.210.152/29\",\r\n \"51.120.213.64/27\",\r\n \"51.120.214.136/29\",\r\n + \ \"51.120.219.208/28\",\r\n \"51.120.232.34/31\",\r\n \"51.120.232.160/27\",\r\n + \ \"51.120.234.140/31\",\r\n \"51.120.235.240/28\",\r\n \"51.132.193.96/29\",\r\n + \ \"51.137.164.92/31\",\r\n \"51.137.164.112/28\",\r\n \"51.137.164.200/29\",\r\n + \ \"51.137.164.208/28\",\r\n \"51.138.160.80/29\",\r\n \"51.140.6.23/32\",\r\n + \ \"51.140.54.208/32\",\r\n \"51.140.60.235/32\",\r\n \"51.140.69.144/32\",\r\n + \ \"51.140.148.48/28\",\r\n \"51.140.151.160/29\",\r\n \"51.140.152.61/32\",\r\n + \ \"51.140.152.186/32\",\r\n \"51.140.163.207/32\",\r\n \"51.140.180.52/32\",\r\n + \ \"51.140.181.40/32\",\r\n \"51.140.211.160/28\",\r\n \"51.140.212.64/29\",\r\n + \ \"51.141.113.128/32\",\r\n \"51.143.88.183/32\",\r\n \"51.143.165.22/32\",\r\n + \ \"51.143.209.96/27\",\r\n \"51.144.41.38/32\",\r\n \"51.144.81.252/32\",\r\n + \ \"51.145.44.242/32\",\r\n \"52.136.53.96/27\",\r\n \"52.138.31.112/32\",\r\n + \ \"52.138.31.127/32\",\r\n \"52.138.90.48/30\",\r\n \"52.138.90.56/29\",\r\n + \ \"52.138.222.110/32\",\r\n \"52.138.226.88/29\",\r\n \"52.138.227.128/29\",\r\n + \ \"52.139.8.32/32\",\r\n \"52.139.106.160/27\",\r\n \"52.140.104.68/31\",\r\n + \ \"52.140.108.96/28\",\r\n \"52.140.108.216/29\",\r\n \"52.140.108.224/28\",\r\n + \ \"52.140.108.240/31\",\r\n \"52.141.22.149/32\",\r\n \"52.141.22.239/32\",\r\n + \ \"52.146.133.32/27\",\r\n \"52.147.97.64/27\",\r\n \"52.147.112.96/27\",\r\n + \ \"52.150.36.187/32\",\r\n \"52.150.152.48/28\",\r\n \"52.150.152.90/31\",\r\n + \ \"52.150.154.24/29\",\r\n \"52.150.154.32/28\",\r\n \"52.151.11.176/32\",\r\n + \ \"52.155.118.97/32\",\r\n \"52.155.162.238/32\",\r\n \"52.156.40.142/32\",\r\n + \ \"52.156.168.82/32\",\r\n \"52.161.8.76/32\",\r\n \"52.161.11.71/32\",\r\n + \ \"52.161.12.245/32\",\r\n \"52.162.87.50/32\",\r\n \"52.162.110.64/28\",\r\n + \ \"52.162.110.168/29\",\r\n \"52.162.214.75/32\",\r\n \"52.163.94.131/32\",\r\n + \ \"52.163.122.20/32\",\r\n \"52.164.120.183/32\",\r\n \"52.164.125.22/32\",\r\n + \ \"52.164.225.5/32\",\r\n \"52.165.27.187/32\",\r\n \"52.165.34.117/32\",\r\n + \ \"52.165.38.20/32\",\r\n \"52.165.150.242/32\",\r\n \"52.167.106.88/29\",\r\n + \ \"52.167.107.64/29\",\r\n \"52.167.109.72/29\",\r\n \"52.167.145.160/29\",\r\n + \ \"52.167.221.184/32\",\r\n \"52.168.112.64/32\",\r\n \"52.168.116.72/29\",\r\n + \ \"52.168.136.177/32\",\r\n \"52.169.4.236/32\",\r\n \"52.169.15.254/32\",\r\n + \ \"52.169.30.110/32\",\r\n \"52.169.64.244/32\",\r\n \"52.171.56.178/32\",\r\n + \ \"52.171.138.167/32\",\r\n \"52.172.113.64/27\",\r\n \"52.172.209.125/32\",\r\n + \ \"52.173.25.25/32\",\r\n \"52.173.33.254/32\",\r\n \"52.173.90.199/32\",\r\n + \ \"52.173.185.24/32\",\r\n \"52.173.196.209/32\",\r\n \"52.173.196.230/32\",\r\n + \ \"52.173.249.138/32\",\r\n \"52.175.198.74/32\",\r\n \"52.175.231.105/32\",\r\n + \ \"52.175.235.148/32\",\r\n \"52.176.42.206/32\",\r\n \"52.176.46.30/32\",\r\n + \ \"52.176.49.206/32\",\r\n \"52.176.55.135/32\",\r\n \"52.176.92.196/32\",\r\n + \ \"52.177.223.60/32\",\r\n \"52.178.17.224/29\",\r\n \"52.178.26.73/32\",\r\n + \ \"52.178.37.209/32\",\r\n \"52.179.192.178/32\",\r\n \"52.180.160.132/32\",\r\n + \ \"52.180.164.91/32\",\r\n \"52.180.178.187/32\",\r\n \"52.180.182.209/32\",\r\n + \ \"52.182.138.216/29\",\r\n \"52.182.139.48/29\",\r\n \"52.182.143.200/29\",\r\n + \ \"52.183.41.109/32\",\r\n \"52.183.66.112/32\",\r\n \"52.183.73.112/32\",\r\n + \ \"52.183.95.86/32\",\r\n \"52.183.127.155/32\",\r\n \"52.184.158.205/32\",\r\n + \ \"52.185.132.101/32\",\r\n \"52.185.132.170/32\",\r\n \"52.185.215.171/32\",\r\n + \ \"52.186.121.41/32\",\r\n \"52.186.126.31/32\",\r\n \"52.188.179.229/32\",\r\n + \ \"52.191.170.253/32\",\r\n \"52.191.197.52/32\",\r\n \"52.224.125.230/32\",\r\n + \ \"52.224.162.220/32\",\r\n \"52.224.235.3/32\",\r\n \"52.226.151.250/32\",\r\n + \ \"52.228.80.68/31\",\r\n \"52.228.81.162/31\",\r\n \"52.228.85.192/28\",\r\n + \ \"52.228.86.152/29\",\r\n \"52.228.86.160/28\",\r\n \"52.228.86.176/32\",\r\n + \ \"52.229.25.130/32\",\r\n \"52.229.37.75/32\",\r\n \"52.229.218.221/32\",\r\n + \ \"52.229.225.6/32\",\r\n \"52.230.224.237/32\",\r\n \"52.231.18.240/28\",\r\n + \ \"52.231.23.120/29\",\r\n \"52.231.28.204/32\",\r\n \"52.231.33.16/32\",\r\n + \ \"52.231.64.72/32\",\r\n \"52.231.67.208/32\",\r\n \"52.231.70.0/32\",\r\n + \ \"52.231.108.46/32\",\r\n \"52.231.111.52/32\",\r\n \"52.231.147.160/28\",\r\n + \ \"52.231.148.80/29\",\r\n \"52.232.35.33/32\",\r\n \"52.232.65.133/32\",\r\n + \ \"52.232.106.242/32\",\r\n \"52.236.186.88/29\",\r\n \"52.236.186.208/28\",\r\n + \ \"52.236.189.88/29\",\r\n \"52.237.34.41/32\",\r\n \"52.237.157.70/32\",\r\n + \ \"52.240.244.144/29\",\r\n \"52.242.230.209/32\",\r\n \"52.246.154.152/29\",\r\n + \ \"52.246.155.144/29\",\r\n \"52.246.157.16/28\",\r\n \"52.246.158.160/29\",\r\n + \ \"52.247.202.90/32\",\r\n \"52.250.228.8/29\",\r\n \"52.250.228.16/28\",\r\n + \ \"52.250.228.32/31\",\r\n \"65.52.2.145/32\",\r\n \"65.52.5.76/32\",\r\n + \ \"65.52.122.208/32\",\r\n \"65.52.250.232/29\",\r\n \"65.52.250.240/28\",\r\n + \ \"102.37.64.128/27\",\r\n \"102.37.72.240/29\",\r\n \"102.37.80.64/27\",\r\n + \ \"102.133.27.48/28\",\r\n \"102.133.28.64/29\",\r\n \"102.133.122.152/29\",\r\n + \ \"102.133.123.240/29\",\r\n \"102.133.126.64/27\",\r\n + \ \"102.133.126.152/29\",\r\n \"102.133.155.48/28\",\r\n + \ \"102.133.161.73/32\",\r\n \"102.133.162.233/32\",\r\n + \ \"102.133.216.68/31\",\r\n \"102.133.216.106/31\",\r\n + \ \"102.133.218.144/28\",\r\n \"102.133.218.244/30\",\r\n + \ \"102.133.219.128/28\",\r\n \"102.133.221.160/27\",\r\n + \ \"102.133.250.152/29\",\r\n \"102.133.251.80/29\",\r\n + \ \"102.133.254.224/29\",\r\n \"104.40.222.36/32\",\r\n \"104.41.61.169/32\",\r\n + \ \"104.41.152.101/32\",\r\n \"104.41.157.59/32\",\r\n \"104.41.224.134/32\",\r\n + \ \"104.42.40.28/32\",\r\n \"104.44.140.84/32\",\r\n \"104.45.136.42/32\",\r\n + \ \"104.45.230.69/32\",\r\n \"104.45.232.72/32\",\r\n \"104.46.123.164/32\",\r\n + \ \"104.46.162.64/27\",\r\n \"104.46.179.128/27\",\r\n \"104.208.33.155/32\",\r\n + \ \"104.208.34.98/32\",\r\n \"104.208.35.169/32\",\r\n \"104.208.144.88/29\",\r\n + \ \"104.209.156.106/32\",\r\n \"104.209.161.217/32\",\r\n + \ \"104.210.9.42/32\",\r\n \"104.211.79.84/32\",\r\n \"104.211.90.234/32\",\r\n + \ \"104.211.91.254/32\",\r\n \"104.211.92.54/32\",\r\n \"104.211.92.218/32\",\r\n + \ \"104.211.95.59/32\",\r\n \"104.211.96.228/32\",\r\n \"104.211.103.96/32\",\r\n + \ \"104.211.147.128/28\",\r\n \"104.211.216.161/32\",\r\n + \ \"104.214.70.219/32\",\r\n \"104.214.104.109/32\",\r\n + \ \"104.214.164.128/27\",\r\n \"104.214.166.96/29\",\r\n + \ \"104.215.81.124/32\",\r\n \"104.215.96.105/32\",\r\n \"104.215.100.22/32\",\r\n + \ \"104.215.103.78/32\",\r\n \"104.215.115.118/32\",\r\n + \ \"111.221.88.173/32\",\r\n \"137.116.82.175/32\",\r\n \"137.116.146.215/32\",\r\n + \ \"137.116.151.139/32\",\r\n \"137.116.226.81/32\",\r\n + \ \"137.117.144.33/32\",\r\n \"138.91.9.98/32\",\r\n \"138.91.32.98/32\",\r\n + \ \"138.91.37.93/32\",\r\n \"157.55.177.6/32\",\r\n \"168.61.142.0/27\",\r\n + \ \"168.61.179.178/32\",\r\n \"168.62.169.17/32\",\r\n \"168.63.174.169/32\",\r\n + \ \"168.63.242.221/32\",\r\n \"191.232.33.83/32\",\r\n \"191.232.161.75/32\",\r\n + \ \"191.232.213.23/32\",\r\n \"191.232.213.239/32\",\r\n + \ \"191.232.214.6/32\",\r\n \"191.232.239.181/32\",\r\n \"191.233.15.128/27\",\r\n + \ \"191.233.51.128/28\",\r\n \"191.233.203.232/29\",\r\n + \ \"191.233.204.248/29\",\r\n \"191.233.207.216/29\",\r\n + \ \"191.234.136.60/31\",\r\n \"191.234.136.80/28\",\r\n \"191.234.137.40/29\",\r\n + \ \"191.234.137.48/28\",\r\n \"191.234.146.152/29\",\r\n + \ \"191.234.149.40/29\",\r\n \"191.234.149.144/28\",\r\n + \ \"191.234.154.152/29\",\r\n \"191.234.157.48/28\",\r\n + \ \"191.234.157.160/29\",\r\n \"191.235.224.68/31\",\r\n + \ \"191.237.224.192/27\",\r\n \"191.239.251.90/32\",\r\n + \ \"207.46.224.101/32\",\r\n \"207.46.236.191/32\",\r\n \"2603:1000:4::780/121\",\r\n + \ \"2603:1000:4:1::280/123\",\r\n \"2603:1000:4:1::300/121\",\r\n + \ \"2603:1000:4:402::500/121\",\r\n \"2603:1000:104::4c0/122\",\r\n + \ \"2603:1000:104::600/122\",\r\n \"2603:1000:104:1::280/122\",\r\n + \ \"2603:1000:104:2::/123\",\r\n \"2603:1000:104:2::80/121\",\r\n + \ \"2603:1000:104:402::500/121\",\r\n \"2603:1010:2:3::c9/128\",\r\n + \ \"2603:1010:6::60/123\",\r\n \"2603:1010:6::1c0/122\",\r\n + \ \"2603:1010:6::300/123\",\r\n \"2603:1010:6::500/121\",\r\n + \ \"2603:1010:6:1::280/122\",\r\n \"2603:1010:6:402::500/121\",\r\n + \ \"2603:1010:101::780/121\",\r\n \"2603:1010:101:1::280/123\",\r\n + \ \"2603:1010:101:1::300/121\",\r\n \"2603:1010:101:402::500/121\",\r\n + \ \"2603:1010:300::88/128\",\r\n \"2603:1010:304::780/121\",\r\n + \ \"2603:1010:304:1::280/123\",\r\n \"2603:1010:304:1::300/121\",\r\n + \ \"2603:1010:304:402::500/121\",\r\n \"2603:1010:404::780/121\",\r\n + \ \"2603:1010:404:1::280/123\",\r\n \"2603:1010:404:1::300/121\",\r\n + \ \"2603:1010:404:402::500/121\",\r\n \"2603:1020:5::60/123\",\r\n + \ \"2603:1020:5::1c0/122\",\r\n \"2603:1020:5::300/123\",\r\n + \ \"2603:1020:5::360/123\",\r\n \"2603:1020:5::500/121\",\r\n + \ \"2603:1020:5:1::280/122\",\r\n \"2603:1020:5:402::500/121\",\r\n + \ \"2603:1020:200::682f:a517/128\",\r\n \"2603:1020:200::682f:a52a/128\",\r\n + \ \"2603:1020:200::682f:a6f1/128\",\r\n \"2603:1020:206::60/123\",\r\n + \ \"2603:1020:206::1c0/122\",\r\n \"2603:1020:206::300/123\",\r\n + \ \"2603:1020:206::360/123\",\r\n \"2603:1020:206::500/121\",\r\n + \ \"2603:1020:206:1::280/122\",\r\n \"2603:1020:206:402::500/121\",\r\n + \ \"2603:1020:305::780/121\",\r\n \"2603:1020:405::780/121\",\r\n + \ \"2603:1020:605::780/121\",\r\n \"2603:1020:605:1::280/123\",\r\n + \ \"2603:1020:605:1::300/121\",\r\n \"2603:1020:605:402::500/121\",\r\n + \ \"2603:1020:705::60/123\",\r\n \"2603:1020:705::1c0/122\",\r\n + \ \"2603:1020:705::300/123\",\r\n \"2603:1020:705::360/123\",\r\n + \ \"2603:1020:705::500/121\",\r\n \"2603:1020:705:1::280/122\",\r\n + \ \"2603:1020:705:402::500/121\",\r\n \"2603:1020:805::60/123\",\r\n + \ \"2603:1020:805::1c0/122\",\r\n \"2603:1020:805::300/123\",\r\n + \ \"2603:1020:805::360/123\",\r\n \"2603:1020:805::500/121\",\r\n + \ \"2603:1020:805:1::280/122\",\r\n \"2603:1020:805:402::500/121\",\r\n + \ \"2603:1020:905::780/121\",\r\n \"2603:1020:905:1::280/123\",\r\n + \ \"2603:1020:905:1::300/121\",\r\n \"2603:1020:905:402::500/121\",\r\n + \ \"2603:1020:a04::60/123\",\r\n \"2603:1020:a04::1c0/122\",\r\n + \ \"2603:1020:a04::300/123\",\r\n \"2603:1020:a04::360/123\",\r\n + \ \"2603:1020:a04::500/121\",\r\n \"2603:1020:a04:1::280/122\",\r\n + \ \"2603:1020:a04:402::500/121\",\r\n \"2603:1020:b04::780/121\",\r\n + \ \"2603:1020:b04:1::280/123\",\r\n \"2603:1020:b04:1::300/121\",\r\n + \ \"2603:1020:b04:402::500/121\",\r\n \"2603:1020:c01:2::b/128\",\r\n + \ \"2603:1020:c01:2::e/128\",\r\n \"2603:1020:c04::60/123\",\r\n + \ \"2603:1020:c04::1c0/122\",\r\n \"2603:1020:c04::300/123\",\r\n + \ \"2603:1020:c04::360/123\",\r\n \"2603:1020:c04::500/121\",\r\n + \ \"2603:1020:c04:1::280/122\",\r\n \"2603:1020:c04:402::500/121\",\r\n + \ \"2603:1020:d01:2::a/128\",\r\n \"2603:1020:d04::780/121\",\r\n + \ \"2603:1020:d04:1::280/123\",\r\n \"2603:1020:d04:1::300/121\",\r\n + \ \"2603:1020:d04:402::500/121\",\r\n \"2603:1020:e04::60/123\",\r\n + \ \"2603:1020:e04::1c0/122\",\r\n \"2603:1020:e04::300/123\",\r\n + \ \"2603:1020:e04::360/123\",\r\n \"2603:1020:e04::500/121\",\r\n + \ \"2603:1020:e04:1::280/122\",\r\n \"2603:1020:e04:402::500/121\",\r\n + \ \"2603:1020:f04::780/121\",\r\n \"2603:1020:f04:1::280/123\",\r\n + \ \"2603:1020:f04:1::300/121\",\r\n \"2603:1020:f04:402::500/121\",\r\n + \ \"2603:1020:1001:6::1/128\",\r\n \"2603:1020:1004::280/122\",\r\n + \ \"2603:1020:1004:1::380/121\",\r\n \"2603:1020:1004:2::180/121\",\r\n + \ \"2603:1020:1004:400::420/123\",\r\n \"2603:1020:1004:400::4a0/123\",\r\n + \ \"2603:1020:1004:400::580/121\",\r\n \"2603:1020:1004:c02::100/121\",\r\n + \ \"2603:1020:1101::3/128\",\r\n \"2603:1020:1104:1::160/123\",\r\n + \ \"2603:1020:1104:1::180/122\",\r\n \"2603:1020:1104:1::1c0/123\",\r\n + \ \"2603:1020:1104:1::4c0/123\",\r\n \"2603:1020:1104:1::500/121\",\r\n + \ \"2603:1020:1104:400::440/123\",\r\n \"2603:1020:1104:400::480/121\",\r\n + \ \"2603:1030:7:5::e/128\",\r\n \"2603:1030:7:5::17/128\",\r\n + \ \"2603:1030:7:5::29/128\",\r\n \"2603:1030:7:5::32/128\",\r\n + \ \"2603:1030:7:6::10/128\",\r\n \"2603:1030:7:6::14/128\",\r\n + \ \"2603:1030:7:6::1b/128\",\r\n \"2603:1030:7:6::37/128\",\r\n + \ \"2603:1030:7:6::3f/128\",\r\n \"2603:1030:8:5::8/128\",\r\n + \ \"2603:1030:f:1::780/121\",\r\n \"2603:1030:f:2::280/123\",\r\n + \ \"2603:1030:f:2::300/121\",\r\n \"2603:1030:f:400::d00/121\",\r\n + \ \"2603:1030:10::60/123\",\r\n \"2603:1030:10::1c0/122\",\r\n + \ \"2603:1030:10::300/123\",\r\n \"2603:1030:10::360/123\",\r\n + \ \"2603:1030:10::500/121\",\r\n \"2603:1030:10:1::280/122\",\r\n + \ \"2603:1030:10:402::500/121\",\r\n \"2603:1030:104::60/123\",\r\n + \ \"2603:1030:104::1c0/122\",\r\n \"2603:1030:104::300/123\",\r\n + \ \"2603:1030:104::360/123\",\r\n \"2603:1030:104::500/121\",\r\n + \ \"2603:1030:104:1::280/122\",\r\n \"2603:1030:104:402::500/121\",\r\n + \ \"2603:1030:107:1::80/121\",\r\n \"2603:1030:107:1::200/123\",\r\n + \ \"2603:1030:107:1::280/121\",\r\n \"2603:1030:107:400::3c0/123\",\r\n + \ \"2603:1030:107:400::480/121\",\r\n \"2603:1030:210::60/123\",\r\n + \ \"2603:1030:210::1c0/122\",\r\n \"2603:1030:210::300/123\",\r\n + \ \"2603:1030:210::360/123\",\r\n \"2603:1030:210::500/121\",\r\n + \ \"2603:1030:210:1::280/122\",\r\n \"2603:1030:210:402::500/121\",\r\n + \ \"2603:1030:302:402::80/123\",\r\n \"2603:1030:302:402::100/121\",\r\n + \ \"2603:1030:408:6::18/128\",\r\n \"2603:1030:408:6::2a/128\",\r\n + \ \"2603:1030:408:6::3f/128\",\r\n \"2603:1030:408:6::59/128\",\r\n + \ \"2603:1030:408:7::37/128\",\r\n \"2603:1030:408:7::39/128\",\r\n + \ \"2603:1030:408:7::3b/128\",\r\n \"2603:1030:408:7::48/128\",\r\n + \ \"2603:1030:408:7::4f/128\",\r\n \"2603:1030:409:2::6/128\",\r\n + \ \"2603:1030:409:2::b/128\",\r\n \"2603:1030:409:2::c/128\",\r\n + \ \"2603:1030:40b:1::280/122\",\r\n \"2603:1030:40b:2::80/121\",\r\n + \ \"2603:1030:40b:2::240/123\",\r\n \"2603:1030:40b:2::300/121\",\r\n + \ \"2603:1030:40b:400::d00/121\",\r\n \"2603:1030:40c::60/123\",\r\n + \ \"2603:1030:40c::1c0/122\",\r\n \"2603:1030:40c::300/123\",\r\n + \ \"2603:1030:40c::360/123\",\r\n \"2603:1030:40c::500/121\",\r\n + \ \"2603:1030:40c:1::280/122\",\r\n \"2603:1030:40c:402::500/121\",\r\n + \ \"2603:1030:504::380/121\",\r\n \"2603:1030:504::540/123\",\r\n + \ \"2603:1030:504::700/121\",\r\n \"2603:1030:504:1::280/122\",\r\n + \ \"2603:1030:504:c02::100/123\",\r\n \"2603:1030:504:c02::180/121\",\r\n + \ \"2603:1030:608::780/121\",\r\n \"2603:1030:608:1::280/123\",\r\n + \ \"2603:1030:608:1::300/121\",\r\n \"2603:1030:608:402::500/121\",\r\n + \ \"2603:1030:800:5::bfee:a401/128\",\r\n \"2603:1030:800:5::bfee:a418/128\",\r\n + \ \"2603:1030:800:5::bfee:a429/128\",\r\n \"2603:1030:800:5::bfee:a42a/128\",\r\n + \ \"2603:1030:800:5::bfee:a435/128\",\r\n \"2603:1030:807::60/123\",\r\n + \ \"2603:1030:807::1c0/122\",\r\n \"2603:1030:807::300/123\",\r\n + \ \"2603:1030:807::360/123\",\r\n \"2603:1030:807::500/121\",\r\n + \ \"2603:1030:807:1::280/122\",\r\n \"2603:1030:807:402::500/121\",\r\n + \ \"2603:1030:a07::780/121\",\r\n \"2603:1030:a07:1::280/123\",\r\n + \ \"2603:1030:a07:1::300/121\",\r\n \"2603:1030:a07:402::380/121\",\r\n + \ \"2603:1030:b00::68/128\",\r\n \"2603:1030:b00::ca/128\",\r\n + \ \"2603:1030:b00::e8/128\",\r\n \"2603:1030:b00::164/128\",\r\n + \ \"2603:1030:b00::2a1/128\",\r\n \"2603:1030:b00::4d9/128\",\r\n + \ \"2603:1030:b00::4db/128\",\r\n \"2603:1030:b00::50d/128\",\r\n + \ \"2603:1030:b04::780/121\",\r\n \"2603:1030:b04:1::280/123\",\r\n + \ \"2603:1030:b04:1::300/121\",\r\n \"2603:1030:b04:402::500/121\",\r\n + \ \"2603:1030:c02:2::285/128\",\r\n \"2603:1030:c02:2::2da/128\",\r\n + \ \"2603:1030:c02:2::4e1/128\",\r\n \"2603:1030:c06:1::280/122\",\r\n + \ \"2603:1030:c06:2::80/121\",\r\n \"2603:1030:c06:2::240/123\",\r\n + \ \"2603:1030:c06:2::300/121\",\r\n \"2603:1030:c06:400::d00/121\",\r\n + \ \"2603:1030:d00::1d/128\",\r\n \"2603:1030:d00::48/128\",\r\n + \ \"2603:1030:d00::5a/128\",\r\n \"2603:1030:d00::82/128\",\r\n + \ \"2603:1030:d00::84/128\",\r\n \"2603:1030:d00::9a/128\",\r\n + \ \"2603:1030:f05::60/123\",\r\n \"2603:1030:f05::1c0/122\",\r\n + \ \"2603:1030:f05::300/123\",\r\n \"2603:1030:f05::360/123\",\r\n + \ \"2603:1030:f05::500/121\",\r\n \"2603:1030:f05:1::280/122\",\r\n + \ \"2603:1030:f05:402::500/121\",\r\n \"2603:1030:1005::780/121\",\r\n + \ \"2603:1030:1005:1::280/123\",\r\n \"2603:1030:1005:1::300/121\",\r\n + \ \"2603:1030:1005:402::500/121\",\r\n \"2603:1040:5::160/123\",\r\n + \ \"2603:1040:5::2c0/122\",\r\n \"2603:1040:5::400/123\",\r\n + \ \"2603:1040:5::460/123\",\r\n \"2603:1040:5::600/121\",\r\n + \ \"2603:1040:5:1::280/122\",\r\n \"2603:1040:5:402::500/121\",\r\n + \ \"2603:1040:207::780/121\",\r\n \"2603:1040:207:1::280/123\",\r\n + \ \"2603:1040:207:1::300/121\",\r\n \"2603:1040:207:402::500/121\",\r\n + \ \"2603:1040:207:800::300/121\",\r\n \"2603:1040:407::60/123\",\r\n + \ \"2603:1040:407::1c0/122\",\r\n \"2603:1040:407::300/123\",\r\n + \ \"2603:1040:407::360/123\",\r\n \"2603:1040:407::500/121\",\r\n + \ \"2603:1040:407:1::280/122\",\r\n \"2603:1040:407:402::500/121\",\r\n + \ \"2603:1040:606::780/121\",\r\n \"2603:1040:606:1::280/123\",\r\n + \ \"2603:1040:606:1::300/121\",\r\n \"2603:1040:606:402::500/121\",\r\n + \ \"2603:1040:806::780/121\",\r\n \"2603:1040:806:1::280/123\",\r\n + \ \"2603:1040:806:1::300/121\",\r\n \"2603:1040:806:402::500/121\",\r\n + \ \"2603:1040:900:2::e/128\",\r\n \"2603:1040:904::60/123\",\r\n + \ \"2603:1040:904::1c0/122\",\r\n \"2603:1040:904::300/123\",\r\n + \ \"2603:1040:904::360/123\",\r\n \"2603:1040:904::500/121\",\r\n + \ \"2603:1040:904:1::280/122\",\r\n \"2603:1040:904:402::500/121\",\r\n + \ \"2603:1040:a06::160/123\",\r\n \"2603:1040:a06::2c0/122\",\r\n + \ \"2603:1040:a06::400/123\",\r\n \"2603:1040:a06::460/123\",\r\n + \ \"2603:1040:a06::600/121\",\r\n \"2603:1040:a06:1::280/122\",\r\n + \ \"2603:1040:a06:402::500/121\",\r\n \"2603:1040:b00:2::b/128\",\r\n + \ \"2603:1040:b04::780/121\",\r\n \"2603:1040:b04:1::280/123\",\r\n + \ \"2603:1040:b04:1::300/121\",\r\n \"2603:1040:b04:402::500/121\",\r\n + \ \"2603:1040:c06::780/121\",\r\n \"2603:1040:c06:1::280/123\",\r\n + \ \"2603:1040:c06:1::300/121\",\r\n \"2603:1040:c06:402::500/121\",\r\n + \ \"2603:1040:d01:4::7/128\",\r\n \"2603:1040:d04::280/122\",\r\n + \ \"2603:1040:d04:1::380/121\",\r\n \"2603:1040:d04:2::/123\",\r\n + \ \"2603:1040:d04:2::100/120\",\r\n \"2603:1040:d04:400::420/123\",\r\n + \ \"2603:1040:d04:400::580/121\",\r\n \"2603:1040:e05::40/123\",\r\n + \ \"2603:1040:e05::80/121\",\r\n \"2603:1040:e05:402::80/121\",\r\n + \ \"2603:1040:f05::60/123\",\r\n \"2603:1040:f05::1c0/122\",\r\n + \ \"2603:1040:f05::300/123\",\r\n \"2603:1040:f05::360/123\",\r\n + \ \"2603:1040:f05::500/121\",\r\n \"2603:1040:f05:1::280/122\",\r\n + \ \"2603:1040:f05:402::500/121\",\r\n \"2603:1040:1002:2::20/123\",\r\n + \ \"2603:1040:1002:2::40/122\",\r\n \"2603:1040:1002:2::80/123\",\r\n + \ \"2603:1040:1002:2::200/121\",\r\n \"2603:1040:1101:2::3/128\",\r\n + \ \"2603:1040:1104:1::160/123\",\r\n \"2603:1040:1104:1::180/122\",\r\n + \ \"2603:1040:1104:1::1c0/123\",\r\n \"2603:1040:1104:1::580/121\",\r\n + \ \"2603:1040:1104:400::460/123\",\r\n \"2603:1050:6::60/123\",\r\n + \ \"2603:1050:6::1c0/122\",\r\n \"2603:1050:6::300/123\",\r\n + \ \"2603:1050:6::360/123\",\r\n \"2603:1050:6::500/121\",\r\n + \ \"2603:1050:6:1::280/122\",\r\n \"2603:1050:6:402::580/121\",\r\n + \ \"2603:1050:6:c02::2a0/123\",\r\n \"2603:1050:403::280/122\",\r\n + \ \"2603:1050:403:1::80/121\",\r\n \"2603:1050:403:1::240/123\",\r\n + \ \"2603:1050:403:1::300/121\",\r\n \"2603:1050:403:400::580/121\",\r\n + \ \"2a01:111:f100:1003::4134:3677/128\",\r\n \"2a01:111:f100:1003::4134:36c2/128\",\r\n + \ \"2a01:111:f100:1003::4134:36d9/128\",\r\n \"2a01:111:f100:1003::4134:3707/128\",\r\n + \ \"2a01:111:f100:1003::4134:370d/128\",\r\n \"2a01:111:f100:1003::4134:3785/128\",\r\n + \ \"2a01:111:f100:1003::4134:37d9/128\",\r\n \"2a01:111:f100:1005::a83e:f7fe/128\",\r\n + \ \"2a01:111:f100:2000::a83e:3015/128\",\r\n \"2a01:111:f100:2000::a83e:301c/128\",\r\n + \ \"2a01:111:f100:2000::a83e:3022/128\",\r\n \"2a01:111:f100:2000::a83e:3070/128\",\r\n + \ \"2a01:111:f100:2000::a83e:3083/128\",\r\n \"2a01:111:f100:2000::a83e:3097/128\",\r\n + \ \"2a01:111:f100:2000::a83e:30a9/128\",\r\n \"2a01:111:f100:2000::a83e:30f3/128\",\r\n + \ \"2a01:111:f100:2000::a83e:313a/128\",\r\n \"2a01:111:f100:2000::a83e:32a5/128\",\r\n + \ \"2a01:111:f100:2000::a83e:3348/128\",\r\n \"2a01:111:f100:2000::a83e:335c/128\",\r\n + \ \"2a01:111:f100:2000::a83e:336c/128\",\r\n \"2a01:111:f100:2000::a83e:3370/128\",\r\n + \ \"2a01:111:f100:2000::a83e:337e/128\",\r\n \"2a01:111:f100:2000::a83e:33ad/128\",\r\n + \ \"2a01:111:f100:2000::a83e:3649/128\",\r\n \"2a01:111:f100:2002::8975:2c8c/128\",\r\n + \ \"2a01:111:f100:2002::8975:2ce6/128\",\r\n \"2a01:111:f100:2002::8975:2d44/128\",\r\n + \ \"2a01:111:f100:2002::8975:2d6a/128\",\r\n \"2a01:111:f100:2002::8975:2e91/128\",\r\n + \ \"2a01:111:f100:2002::8975:2eaa/128\",\r\n \"2a01:111:f100:2002::8975:2fc3/128\",\r\n + \ \"2a01:111:f100:3000::a83e:1840/128\",\r\n \"2a01:111:f100:3000::a83e:187a/128\",\r\n + \ \"2a01:111:f100:3000::a83e:187c/128\",\r\n \"2a01:111:f100:3000::a83e:18be/128\",\r\n + \ \"2a01:111:f100:3000::a83e:1913/128\",\r\n \"2a01:111:f100:3000::a83e:1978/128\",\r\n + \ \"2a01:111:f100:3000::a83e:197f/128\",\r\n \"2a01:111:f100:3000::a83e:1990/128\",\r\n + \ \"2a01:111:f100:3000::a83e:19b3/128\",\r\n \"2a01:111:f100:3000::a83e:19c0/128\",\r\n + \ \"2a01:111:f100:3000::a83e:1a00/128\",\r\n \"2a01:111:f100:3000::a83e:1a54/127\",\r\n + \ \"2a01:111:f100:3000::a83e:1a8e/128\",\r\n \"2a01:111:f100:3000::a83e:1a94/128\",\r\n + \ \"2a01:111:f100:3000::a83e:1a9f/128\",\r\n \"2a01:111:f100:3000::a83e:1adf/128\",\r\n + \ \"2a01:111:f100:3000::a83e:1b12/128\",\r\n \"2a01:111:f100:3001::8987:1164/128\",\r\n + \ \"2a01:111:f100:3001::8987:1179/128\",\r\n \"2a01:111:f100:3001::8987:11da/128\",\r\n + \ \"2a01:111:f100:3001::8987:11ea/128\",\r\n \"2a01:111:f100:3001::8987:12cf/128\",\r\n + \ \"2a01:111:f100:3001::a83e:a67/128\",\r\n \"2a01:111:f100:4002::9d37:c071/128\",\r\n + \ \"2a01:111:f100:4002::9d37:c0bd/128\",\r\n \"2a01:111:f100:6000::4134:a688/128\",\r\n + \ \"2a01:111:f100:6000::4134:a6cf/128\",\r\n \"2a01:111:f100:7000::6fdd:5343/128\",\r\n + \ \"2a01:111:f100:7000::6fdd:5431/128\",\r\n \"2a01:111:f100:9001::1761:91e4/128\",\r\n + \ \"2a01:111:f100:9001::1761:9323/128\",\r\n \"2a01:111:f100:9001::1761:958a/128\",\r\n + \ \"2a01:111:f100:9001::1761:9696/128\",\r\n \"2a01:111:f100:a001::4134:e463/128\",\r\n + \ \"2a01:111:f100:a001::a83f:5c0a/128\",\r\n \"2a01:111:f100:a001::a83f:5c0c/128\",\r\n + \ \"2a01:111:f100:a004::bfeb:8ba9/128\",\r\n \"2a01:111:f100:a004::bfeb:8c93/128\",\r\n + \ \"2a01:111:f100:a004::bfeb:8d32/128\",\r\n \"2a01:111:f100:a004::bfeb:8dc7/128\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"AzureOpenDatasets\",\r\n + \ \"id\": \"AzureOpenDatasets\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureOpenDatasets\",\r\n \"addressPrefixes\": + [\r\n \"13.73.248.32/28\",\r\n \"20.36.120.192/28\",\r\n + \ \"20.37.64.192/28\",\r\n \"20.37.156.224/28\",\r\n \"20.37.195.32/28\",\r\n + \ \"20.37.224.192/28\",\r\n \"20.38.84.112/28\",\r\n \"20.38.136.192/28\",\r\n + \ \"20.39.11.32/28\",\r\n \"20.41.4.192/28\",\r\n \"20.41.65.160/28\",\r\n + \ \"20.41.193.128/28\",\r\n \"20.42.4.224/28\",\r\n \"20.42.131.0/28\",\r\n + \ \"20.42.227.0/28\",\r\n \"20.43.41.160/28\",\r\n \"20.43.65.160/28\",\r\n + \ \"20.43.130.112/28\",\r\n \"20.45.112.192/28\",\r\n \"20.45.192.192/28\",\r\n + \ \"20.150.160.192/28\",\r\n \"20.189.106.208/28\",\r\n \"20.192.225.128/28\",\r\n + \ \"40.67.48.192/28\",\r\n \"40.74.30.112/28\",\r\n \"40.80.57.128/28\",\r\n + \ \"40.80.169.128/28\",\r\n \"40.80.188.32/28\",\r\n \"40.82.253.80/28\",\r\n + \ \"40.89.17.128/28\",\r\n \"51.12.41.32/28\",\r\n \"51.12.193.32/28\",\r\n + \ \"51.104.25.160/28\",\r\n \"51.105.80.192/28\",\r\n \"51.105.88.192/28\",\r\n + \ \"51.107.48.192/28\",\r\n \"51.107.144.192/28\",\r\n \"51.116.48.112/28\",\r\n + \ \"51.116.144.112/28\",\r\n \"51.120.40.192/28\",\r\n \"51.120.224.192/28\",\r\n + \ \"51.137.161.144/28\",\r\n \"51.143.192.192/28\",\r\n \"52.136.48.192/28\",\r\n + \ \"52.140.105.128/28\",\r\n \"52.150.139.80/28\",\r\n \"52.228.81.144/28\",\r\n + \ \"102.133.56.112/28\",\r\n \"102.133.216.112/28\",\r\n + \ \"191.235.225.160/28\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzurePortal\",\r\n \"id\": \"AzurePortal\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzurePortal\",\r\n \"addressPrefixes\": + [\r\n \"13.67.35.35/32\",\r\n \"13.67.35.77/32\",\r\n \"13.68.130.251/32\",\r\n + \ \"13.68.235.98/32\",\r\n \"13.69.112.176/28\",\r\n \"13.69.126.92/32\",\r\n + \ \"13.71.190.228/32\",\r\n \"13.73.249.32/27\",\r\n \"13.73.249.160/28\",\r\n + \ \"13.73.255.248/29\",\r\n \"13.77.1.236/32\",\r\n \"13.77.55.208/28\",\r\n + \ \"13.77.202.2/32\",\r\n \"13.78.49.187/32\",\r\n \"13.78.132.155/32\",\r\n + \ \"13.78.230.142/32\",\r\n \"13.88.220.109/32\",\r\n \"13.88.222.0/32\",\r\n + \ \"13.90.156.71/32\",\r\n \"13.92.138.76/32\",\r\n \"20.21.39.64/27\",\r\n + \ \"20.36.121.128/27\",\r\n \"20.36.122.56/30\",\r\n \"20.36.125.104/29\",\r\n + \ \"20.37.65.128/27\",\r\n \"20.37.66.56/30\",\r\n \"20.37.70.96/29\",\r\n + \ \"20.37.195.224/27\",\r\n \"20.37.196.252/30\",\r\n \"20.37.198.64/27\",\r\n + \ \"20.37.225.128/27\",\r\n \"20.37.226.56/30\",\r\n \"20.37.229.152/29\",\r\n + \ \"20.38.85.192/27\",\r\n \"20.38.87.224/27\",\r\n \"20.38.137.160/27\",\r\n + \ \"20.38.138.60/30\",\r\n \"20.38.142.88/29\",\r\n \"20.38.149.208/28\",\r\n + \ \"20.39.12.32/27\",\r\n \"20.39.12.232/30\",\r\n \"20.40.200.0/27\",\r\n + \ \"20.40.200.160/30\",\r\n \"20.40.224.226/31\",\r\n \"20.40.225.32/29\",\r\n + \ \"20.41.5.192/27\",\r\n \"20.41.65.224/27\",\r\n \"20.41.67.88/30\",\r\n + \ \"20.41.193.224/27\",\r\n \"20.41.197.16/30\",\r\n \"20.42.6.192/27\",\r\n + \ \"20.42.227.192/27\",\r\n \"20.42.228.220/30\",\r\n \"20.42.228.224/27\",\r\n + \ \"20.42.230.80/28\",\r\n \"20.43.42.64/27\",\r\n \"20.43.43.164/30\",\r\n + \ \"20.43.46.248/29\",\r\n \"20.43.66.64/27\",\r\n \"20.43.67.92/30\",\r\n + \ \"20.43.67.96/27\",\r\n \"20.43.70.64/28\",\r\n \"20.43.123.160/28\",\r\n + \ \"20.43.132.32/27\",\r\n \"20.44.19.32/28\",\r\n \"20.45.112.124/30\",\r\n + \ \"20.45.113.128/27\",\r\n \"20.45.116.64/29\",\r\n \"20.45.125.240/28\",\r\n + \ \"20.45.195.160/27\",\r\n \"20.45.197.192/27\",\r\n \"20.45.197.228/30\",\r\n + \ \"20.46.10.40/29\",\r\n \"20.47.232.32/28\",\r\n \"20.48.193.48/29\",\r\n + \ \"20.49.99.16/28\",\r\n \"20.49.99.32/30\",\r\n \"20.49.103.96/29\",\r\n + \ \"20.49.109.36/30\",\r\n \"20.49.109.44/31\",\r\n \"20.49.109.48/28\",\r\n + \ \"20.49.115.184/29\",\r\n \"20.49.120.0/27\",\r\n \"20.49.120.36/30\",\r\n + \ \"20.49.126.156/30\",\r\n \"20.49.127.224/28\",\r\n \"20.50.1.32/27\",\r\n + \ \"20.50.1.160/27\",\r\n \"20.50.1.200/30\",\r\n \"20.50.1.208/28\",\r\n + \ \"20.50.65.72/30\",\r\n \"20.51.16.120/29\",\r\n \"20.53.44.4/30\",\r\n + \ \"20.53.44.64/29\",\r\n \"20.61.98.128/29\",\r\n \"20.62.128.240/29\",\r\n + \ \"20.72.20.96/27\",\r\n \"20.150.161.192/27\",\r\n \"20.150.165.144/30\",\r\n + \ \"20.150.166.160/29\",\r\n \"20.187.197.0/29\",\r\n \"20.189.108.96/27\",\r\n + \ \"20.189.109.88/30\",\r\n \"20.189.109.160/27\",\r\n \"20.189.224.208/29\",\r\n + \ \"20.191.161.80/29\",\r\n \"20.192.161.192/27\",\r\n \"20.192.164.180/30\",\r\n + \ \"20.192.166.160/29\",\r\n \"20.192.228.128/27\",\r\n \"20.192.230.0/30\",\r\n + \ \"20.192.230.112/29\",\r\n \"20.194.72.56/29\",\r\n \"23.98.104.80/28\",\r\n + \ \"23.98.104.96/27\",\r\n \"23.98.104.128/30\",\r\n \"23.98.108.44/31\",\r\n + \ \"23.98.108.168/29\",\r\n \"23.102.65.134/32\",\r\n \"40.64.128.128/27\",\r\n + \ \"40.64.132.88/30\",\r\n \"40.64.132.96/28\",\r\n \"40.64.135.88/29\",\r\n + \ \"40.65.114.234/32\",\r\n \"40.67.48.124/30\",\r\n \"40.67.49.128/27\",\r\n + \ \"40.67.50.192/27\",\r\n \"40.67.52.88/29\",\r\n \"40.67.121.128/28\",\r\n + \ \"40.71.15.144/28\",\r\n \"40.78.239.48/28\",\r\n \"40.78.245.208/28\",\r\n + \ \"40.79.189.96/28\",\r\n \"40.80.58.128/27\",\r\n \"40.80.59.28/30\",\r\n + \ \"40.80.59.32/27\",\r\n \"40.80.169.224/27\",\r\n \"40.80.172.16/30\",\r\n + \ \"40.80.173.192/29\",\r\n \"40.80.190.160/27\",\r\n \"40.80.191.200/30\",\r\n + \ \"40.82.253.224/27\",\r\n \"40.84.132.239/32\",\r\n \"40.84.228.255/32\",\r\n + \ \"40.89.18.160/27\",\r\n \"40.89.20.132/30\",\r\n \"40.89.23.232/29\",\r\n + \ \"40.113.117.57/32\",\r\n \"40.114.78.132/32\",\r\n \"40.114.236.251/32\",\r\n + \ \"40.117.86.243/32\",\r\n \"40.117.237.78/32\",\r\n \"40.119.9.236/30\",\r\n + \ \"51.12.41.20/30\",\r\n \"51.12.41.160/27\",\r\n \"51.12.43.128/29\",\r\n + \ \"51.12.193.20/30\",\r\n \"51.12.193.160/27\",\r\n \"51.12.194.104/29\",\r\n + \ \"51.13.136.8/29\",\r\n \"51.104.27.96/27\",\r\n \"51.104.28.220/30\",\r\n + \ \"51.104.28.224/28\",\r\n \"51.105.80.124/30\",\r\n \"51.105.81.128/27\",\r\n + \ \"51.105.89.160/27\",\r\n \"51.105.90.152/30\",\r\n \"51.107.49.160/27\",\r\n + \ \"51.107.50.60/30\",\r\n \"51.107.53.240/29\",\r\n \"51.107.145.128/27\",\r\n + \ \"51.107.146.56/30\",\r\n \"51.107.149.248/29\",\r\n \"51.116.48.192/27\",\r\n + \ \"51.116.49.140/30\",\r\n \"51.116.51.160/29\",\r\n \"51.116.144.192/27\",\r\n + \ \"51.116.145.140/30\",\r\n \"51.116.148.104/29\",\r\n \"51.120.41.160/27\",\r\n + \ \"51.120.42.60/30\",\r\n \"51.120.225.128/27\",\r\n \"51.120.226.56/30\",\r\n + \ \"51.120.232.16/29\",\r\n \"51.137.162.160/27\",\r\n \"51.137.164.80/30\",\r\n + \ \"51.137.167.152/29\",\r\n \"51.140.69.25/32\",\r\n \"51.140.138.84/32\",\r\n + \ \"51.140.149.64/28\",\r\n \"51.143.192.124/30\",\r\n \"51.143.193.128/27\",\r\n + \ \"51.143.208.192/29\",\r\n \"51.145.3.27/32\",\r\n \"51.145.21.195/32\",\r\n + \ \"52.136.49.160/27\",\r\n \"52.136.51.72/30\",\r\n \"52.136.52.232/29\",\r\n + \ \"52.136.184.64/29\",\r\n \"52.140.105.224/27\",\r\n \"52.140.107.112/28\",\r\n + \ \"52.140.108.64/30\",\r\n \"52.140.111.96/29\",\r\n \"52.146.132.80/29\",\r\n + \ \"52.150.139.224/27\",\r\n \"52.150.140.216/30\",\r\n \"52.150.152.16/28\",\r\n + \ \"52.150.152.224/27\",\r\n \"52.150.156.232/29\",\r\n \"52.161.101.86/32\",\r\n + \ \"52.163.207.80/32\",\r\n \"52.172.112.152/29\",\r\n \"52.172.181.227/32\",\r\n + \ \"52.172.190.71/32\",\r\n \"52.172.191.4/32\",\r\n \"52.172.215.87/32\",\r\n + \ \"52.228.24.159/32\",\r\n \"52.228.83.160/27\",\r\n \"52.228.84.84/30\",\r\n + \ \"52.228.84.96/28\",\r\n \"52.233.66.46/32\",\r\n \"52.243.76.246/32\",\r\n + \ \"102.133.56.160/27\",\r\n \"102.133.58.192/30\",\r\n \"102.133.61.176/29\",\r\n + \ \"102.133.217.192/27\",\r\n \"102.133.218.56/30\",\r\n + \ \"102.133.221.0/29\",\r\n \"104.41.216.228/32\",\r\n \"104.42.195.92/32\",\r\n + \ \"104.46.178.96/29\",\r\n \"104.211.89.213/32\",\r\n \"104.211.101.116/32\",\r\n + \ \"104.214.117.155/32\",\r\n \"104.215.120.160/32\",\r\n + \ \"104.215.146.128/32\",\r\n \"137.116.247.179/32\",\r\n + \ \"191.233.10.96/27\",\r\n \"191.233.15.0/29\",\r\n \"191.234.136.0/27\",\r\n + \ \"191.234.136.48/30\",\r\n \"191.234.139.144/29\",\r\n + \ \"191.235.227.160/27\",\r\n \"213.199.128.226/32\",\r\n + \ \"2603:1000:4::700/121\",\r\n \"2603:1000:104::200/121\",\r\n + \ \"2603:1000:104::400/121\",\r\n \"2603:1000:104:1::680/121\",\r\n + \ \"2603:1010:6::100/121\",\r\n \"2603:1010:6:1::680/121\",\r\n + \ \"2603:1010:101::700/121\",\r\n \"2603:1010:304::700/121\",\r\n + \ \"2603:1010:404::700/121\",\r\n \"2603:1020:5::100/121\",\r\n + \ \"2603:1020:5:1::680/121\",\r\n \"2603:1020:206::100/121\",\r\n + \ \"2603:1020:206:1::680/121\",\r\n \"2603:1020:305::700/121\",\r\n + \ \"2603:1020:405::700/121\",\r\n \"2603:1020:605::700/121\",\r\n + \ \"2603:1020:705::100/121\",\r\n \"2603:1020:705:1::680/121\",\r\n + \ \"2603:1020:805::100/121\",\r\n \"2603:1020:805:1::680/121\",\r\n + \ \"2603:1020:905::700/121\",\r\n \"2603:1020:a04::100/121\",\r\n + \ \"2603:1020:a04:1::680/121\",\r\n \"2603:1020:b04::700/121\",\r\n + \ \"2603:1020:c04::100/121\",\r\n \"2603:1020:c04:1::680/121\",\r\n + \ \"2603:1020:d04::700/121\",\r\n \"2603:1020:e04::100/121\",\r\n + \ \"2603:1020:e04:1::680/121\",\r\n \"2603:1020:f04::700/121\",\r\n + \ \"2603:1020:1004::680/121\",\r\n \"2603:1020:1004:1::100/121\",\r\n + \ \"2603:1020:1104::780/121\",\r\n \"2603:1030:f:1::700/121\",\r\n + \ \"2603:1030:10::100/121\",\r\n \"2603:1030:10:1::680/121\",\r\n + \ \"2603:1030:104::100/121\",\r\n \"2603:1030:104:1::680/121\",\r\n + \ \"2603:1030:107:1::/121\",\r\n \"2603:1030:210::100/121\",\r\n + \ \"2603:1030:210:1::680/121\",\r\n \"2603:1030:40b:1::680/121\",\r\n + \ \"2603:1030:40c::100/121\",\r\n \"2603:1030:40c:1::680/121\",\r\n + \ \"2603:1030:504::100/121\",\r\n \"2603:1030:504:1::680/121\",\r\n + \ \"2603:1030:608::700/121\",\r\n \"2603:1030:807::100/121\",\r\n + \ \"2603:1030:807:1::680/121\",\r\n \"2603:1030:a07::700/121\",\r\n + \ \"2603:1030:b04::700/121\",\r\n \"2603:1030:c06:1::680/121\",\r\n + \ \"2603:1030:f05::100/121\",\r\n \"2603:1030:f05:1::680/121\",\r\n + \ \"2603:1030:1005::700/121\",\r\n \"2603:1040:5::200/121\",\r\n + \ \"2603:1040:5:1::680/121\",\r\n \"2603:1040:207::700/121\",\r\n + \ \"2603:1040:407::100/121\",\r\n \"2603:1040:407:1::680/121\",\r\n + \ \"2603:1040:606::700/121\",\r\n \"2603:1040:806::700/121\",\r\n + \ \"2603:1040:904::100/121\",\r\n \"2603:1040:904:1::680/121\",\r\n + \ \"2603:1040:a06::200/121\",\r\n \"2603:1040:a06:1::680/121\",\r\n + \ \"2603:1040:b04::700/121\",\r\n \"2603:1040:c06::700/121\",\r\n + \ \"2603:1040:d04::680/121\",\r\n \"2603:1040:d04:1::100/121\",\r\n + \ \"2603:1040:f05::100/121\",\r\n \"2603:1040:f05:1::680/121\",\r\n + \ \"2603:1040:1002:1::580/121\",\r\n \"2603:1040:1104::780/121\",\r\n + \ \"2603:1050:6::100/121\",\r\n \"2603:1050:6:1::680/121\",\r\n + \ \"2603:1050:403::680/121\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureRemoteRendering\",\r\n \"id\": \"AzureRemoteRendering\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureRemoteRendering\",\r\n \"addressPrefixes\": + [\r\n \"13.66.145.228/30\",\r\n \"13.69.233.132/30\",\r\n + \ \"13.70.79.84/30\",\r\n \"20.44.19.168/30\",\r\n \"20.45.126.120/30\",\r\n + \ \"20.49.103.240/28\",\r\n \"20.51.9.64/28\",\r\n \"20.51.17.96/28\",\r\n + \ \"20.53.44.240/28\",\r\n \"20.61.99.112/28\",\r\n \"20.62.129.224/28\",\r\n + \ \"20.65.132.80/28\",\r\n \"20.150.130.192/28\",\r\n \"20.191.165.112/28\",\r\n + \ \"20.195.64.224/28\",\r\n \"40.74.150.64/30\",\r\n \"40.78.239.120/30\",\r\n + \ \"40.79.197.44/30\",\r\n \"51.12.73.96/28\",\r\n \"51.140.149.88/30\",\r\n + \ \"51.143.209.144/28\",\r\n \"52.146.133.64/28\",\r\n \"52.168.112.88/30\",\r\n + \ \"52.178.17.8/30\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"AzureResourceManager\",\r\n \"id\": \"AzureResourceManager\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureResourceManager\",\r\n \"addressPrefixes\": + [\r\n \"13.66.141.176/28\",\r\n \"13.67.18.0/23\",\r\n \"13.69.67.32/28\",\r\n + \ \"13.69.114.0/23\",\r\n \"13.69.229.224/28\",\r\n \"13.69.234.0/23\",\r\n + \ \"13.70.74.64/28\",\r\n \"13.70.76.0/23\",\r\n \"13.71.173.192/28\",\r\n + \ \"13.71.196.80/28\",\r\n \"13.71.198.0/24\",\r\n \"13.73.240.224/28\",\r\n + \ \"13.73.246.0/23\",\r\n \"13.75.39.16/28\",\r\n \"13.77.53.32/28\",\r\n + \ \"13.77.55.0/25\",\r\n \"13.78.109.96/28\",\r\n \"13.86.219.80/28\",\r\n + \ \"13.86.222.0/24\",\r\n \"13.87.57.240/28\",\r\n \"13.87.60.0/23\",\r\n + \ \"13.87.123.240/28\",\r\n \"13.87.126.0/24\",\r\n \"13.89.180.0/23\",\r\n + \ \"20.21.44.0/26\",\r\n \"20.21.50.0/23\",\r\n \"20.36.108.48/28\",\r\n + \ \"20.36.110.0/23\",\r\n \"20.36.115.144/28\",\r\n \"20.36.118.0/23\",\r\n + \ \"20.36.126.0/23\",\r\n \"20.37.76.48/28\",\r\n \"20.37.78.0/23\",\r\n + \ \"20.37.230.0/23\",\r\n \"20.38.128.32/28\",\r\n \"20.38.130.0/23\",\r\n + \ \"20.38.150.0/23\",\r\n \"20.40.206.240/28\",\r\n \"20.40.226.0/23\",\r\n + \ \"20.41.70.0/23\",\r\n \"20.43.120.224/28\",\r\n \"20.43.124.0/23\",\r\n + \ \"20.44.3.240/28\",\r\n \"20.44.6.0/23\",\r\n \"20.44.8.16/28\",\r\n + \ \"20.44.16.112/28\",\r\n \"20.44.20.0/23\",\r\n \"20.44.30.0/24\",\r\n + \ \"20.45.88.0/23\",\r\n \"20.45.118.0/23\",\r\n \"20.46.8.0/23\",\r\n + \ \"20.48.194.0/23\",\r\n \"20.49.116.0/23\",\r\n \"20.50.68.96/28\",\r\n + \ \"20.51.10.0/23\",\r\n \"20.51.18.0/23\",\r\n \"20.53.42.0/23\",\r\n + \ \"20.58.64.0/23\",\r\n \"20.61.100.0/23\",\r\n \"20.62.56.0/23\",\r\n + \ \"20.62.130.0/23\",\r\n \"20.65.128.0/23\",\r\n \"20.66.0.0/23\",\r\n + \ \"20.72.28.64/26\",\r\n \"20.88.64.64/26\",\r\n \"20.150.225.128/26\",\r\n + \ \"20.150.242.0/23\",\r\n \"20.187.198.0/23\",\r\n \"20.189.168.0/24\",\r\n + \ \"20.189.226.0/23\",\r\n \"20.191.162.0/23\",\r\n \"20.192.32.128/26\",\r\n + \ \"20.192.40.0/23\",\r\n \"20.192.52.0/23\",\r\n \"20.193.196.0/23\",\r\n + \ \"20.193.204.0/26\",\r\n \"20.195.144.0/23\",\r\n \"23.98.110.0/23\",\r\n + \ \"40.67.54.0/23\",\r\n \"40.67.59.208/28\",\r\n \"40.67.62.0/23\",\r\n + \ \"40.67.120.0/24\",\r\n \"40.69.108.32/28\",\r\n \"40.69.112.0/22\",\r\n + \ \"40.71.13.224/28\",\r\n \"40.74.102.0/28\",\r\n \"40.75.35.32/28\",\r\n + \ \"40.75.38.0/23\",\r\n \"40.78.196.32/28\",\r\n \"40.78.198.0/23\",\r\n + \ \"40.78.203.224/28\",\r\n \"40.78.206.0/23\",\r\n \"40.78.234.176/28\",\r\n + \ \"40.78.254.0/23\",\r\n \"40.79.131.240/28\",\r\n \"40.79.134.0/23\",\r\n + \ \"40.79.158.0/23\",\r\n \"40.79.180.0/28\",\r\n \"40.79.182.0/23\",\r\n + \ \"40.79.198.0/23\",\r\n \"40.80.174.0/23\",\r\n \"40.80.178.0/23\",\r\n + \ \"40.113.178.0/28\",\r\n \"40.120.80.0/23\",\r\n \"51.11.64.0/24\",\r\n + \ \"51.11.96.0/24\",\r\n \"51.12.44.0/23\",\r\n \"51.12.101.64/26\",\r\n + \ \"51.12.196.0/23\",\r\n \"51.12.205.0/26\",\r\n \"51.104.8.224/28\",\r\n + \ \"51.105.78.0/23\",\r\n \"51.105.94.0/23\",\r\n \"51.107.54.0/23\",\r\n + \ \"51.107.60.32/28\",\r\n \"51.107.62.0/23\",\r\n \"51.107.150.0/23\",\r\n + \ \"51.107.156.32/28\",\r\n \"51.107.158.0/23\",\r\n \"51.116.52.0/23\",\r\n + \ \"51.116.60.32/28\",\r\n \"51.116.62.0/23\",\r\n \"51.116.150.0/23\",\r\n + \ \"51.116.156.32/28\",\r\n \"51.116.159.0/24\",\r\n \"51.120.46.0/23\",\r\n + \ \"51.120.100.32/28\",\r\n \"51.120.102.0/23\",\r\n \"51.120.220.32/28\",\r\n + \ \"51.120.222.0/23\",\r\n \"51.120.230.0/23\",\r\n \"51.138.208.0/23\",\r\n + \ \"51.140.212.16/28\",\r\n \"51.140.214.0/24\",\r\n \"51.143.210.0/23\",\r\n + \ \"52.136.54.0/23\",\r\n \"52.138.94.0/23\",\r\n \"52.139.104.0/23\",\r\n + \ \"52.146.134.0/23\",\r\n \"52.147.96.0/24\",\r\n \"52.150.158.0/23\",\r\n + \ \"52.162.110.224/28\",\r\n \"52.172.114.0/23\",\r\n \"52.231.19.208/28\",\r\n + \ \"52.231.22.0/24\",\r\n \"52.231.148.64/28\",\r\n \"52.231.150.0/24\",\r\n + \ \"52.240.242.0/23\",\r\n \"65.52.252.48/28\",\r\n \"65.52.254.0/23\",\r\n + \ \"102.133.28.16/28\",\r\n \"102.133.30.0/23\",\r\n \"102.133.62.0/23\",\r\n + \ \"102.133.123.224/28\",\r\n \"102.133.158.0/23\",\r\n \"102.133.222.0/23\",\r\n + \ \"104.46.160.0/24\",\r\n \"104.46.161.0/25\",\r\n \"104.46.180.0/23\",\r\n + \ \"104.214.162.0/23\",\r\n \"104.214.166.0/26\",\r\n \"168.61.138.0/23\",\r\n + \ \"168.61.143.192/26\",\r\n \"191.233.52.0/23\",\r\n \"191.233.205.16/28\",\r\n + \ \"191.234.140.0/23\",\r\n \"191.234.158.0/23\",\r\n \"2603:1000:4::6c0/122\",\r\n + \ \"2603:1000:4:402::280/122\",\r\n \"2603:1000:104::480/122\",\r\n + \ \"2603:1000:104:402::280/122\",\r\n \"2603:1010:6::180/122\",\r\n + \ \"2603:1010:6:402::280/122\",\r\n \"2603:1010:101::6c0/122\",\r\n + \ \"2603:1010:101:402::280/122\",\r\n \"2603:1010:304::6c0/122\",\r\n + \ \"2603:1010:304:402::280/122\",\r\n \"2603:1010:404::6c0/122\",\r\n + \ \"2603:1010:404:402::280/122\",\r\n \"2603:1020:5::180/122\",\r\n + \ \"2603:1020:5:402::280/122\",\r\n \"2603:1020:206::180/122\",\r\n + \ \"2603:1020:206:402::280/122\",\r\n \"2603:1020:305::6c0/122\",\r\n + \ \"2603:1020:305:402::280/122\",\r\n \"2603:1020:405::6c0/122\",\r\n + \ \"2603:1020:405:402::280/122\",\r\n \"2603:1020:605::6c0/122\",\r\n + \ \"2603:1020:605:402::280/122\",\r\n \"2603:1020:705::180/122\",\r\n + \ \"2603:1020:705:402::280/122\",\r\n \"2603:1020:805::180/122\",\r\n + \ \"2603:1020:805:402::280/122\",\r\n \"2603:1020:905::6c0/122\",\r\n + \ \"2603:1020:905:402::280/122\",\r\n \"2603:1020:a04::180/122\",\r\n + \ \"2603:1020:a04:2::700/120\",\r\n \"2603:1020:a04:402::280/122\",\r\n + \ \"2603:1020:b04::6c0/122\",\r\n \"2603:1020:b04:402::280/122\",\r\n + \ \"2603:1020:c04::180/122\",\r\n \"2603:1020:c04:402::280/122\",\r\n + \ \"2603:1020:d04::6c0/122\",\r\n \"2603:1020:d04:402::280/122\",\r\n + \ \"2603:1020:e04::180/122\",\r\n \"2603:1020:e04:3::300/120\",\r\n + \ \"2603:1020:e04:402::280/122\",\r\n \"2603:1020:f04::6c0/122\",\r\n + \ \"2603:1020:f04:402::280/122\",\r\n \"2603:1020:1004:1::400/120\",\r\n + \ \"2603:1020:1004:400::180/122\",\r\n \"2603:1020:1104:1::/120\",\r\n + \ \"2603:1020:1104:400::280/122\",\r\n \"2603:1030:f:1::6c0/122\",\r\n + \ \"2603:1030:f:2::700/120\",\r\n \"2603:1030:f:400::a80/122\",\r\n + \ \"2603:1030:10::180/122\",\r\n \"2603:1030:10:402::280/122\",\r\n + \ \"2603:1030:104::180/122\",\r\n \"2603:1030:104:402::280/122\",\r\n + \ \"2603:1030:107:1::100/120\",\r\n \"2603:1030:107:400::200/122\",\r\n + \ \"2603:1030:210::180/122\",\r\n \"2603:1030:210:402::280/122\",\r\n + \ \"2603:1030:40b:2::40/122\",\r\n \"2603:1030:40b:400::a80/122\",\r\n + \ \"2603:1030:40c::180/122\",\r\n \"2603:1030:40c:402::280/122\",\r\n + \ \"2603:1030:504::400/120\",\r\n \"2603:1030:504:402::180/122\",\r\n + \ \"2603:1030:608::6c0/122\",\r\n \"2603:1030:608:402::280/122\",\r\n + \ \"2603:1030:807::180/122\",\r\n \"2603:1030:807:402::280/122\",\r\n + \ \"2603:1030:a07::6c0/122\",\r\n \"2603:1030:a07:402::900/122\",\r\n + \ \"2603:1030:b04::6c0/122\",\r\n \"2603:1030:b04:402::280/122\",\r\n + \ \"2603:1030:c06:2::40/122\",\r\n \"2603:1030:c06:400::a80/122\",\r\n + \ \"2603:1030:f05::180/122\",\r\n \"2603:1030:f05:402::280/122\",\r\n + \ \"2603:1030:1005::6c0/122\",\r\n \"2603:1030:1005:402::280/122\",\r\n + \ \"2603:1040:5::280/122\",\r\n \"2603:1040:5:402::280/122\",\r\n + \ \"2603:1040:207::6c0/122\",\r\n \"2603:1040:207:2::300/120\",\r\n + \ \"2603:1040:207:402::280/122\",\r\n \"2603:1040:407::180/122\",\r\n + \ \"2603:1040:407:402::280/122\",\r\n \"2603:1040:606::6c0/122\",\r\n + \ \"2603:1040:606:402::280/122\",\r\n \"2603:1040:806::6c0/122\",\r\n + \ \"2603:1040:806:402::280/122\",\r\n \"2603:1040:904::180/122\",\r\n + \ \"2603:1040:904:402::280/122\",\r\n \"2603:1040:a06::280/122\",\r\n + \ \"2603:1040:a06:2::400/120\",\r\n \"2603:1040:a06:402::280/122\",\r\n + \ \"2603:1040:b04::6c0/122\",\r\n \"2603:1040:b04:402::280/122\",\r\n + \ \"2603:1040:c06::6c0/122\",\r\n \"2603:1040:c06:402::280/122\",\r\n + \ \"2603:1040:d04:1::400/120\",\r\n \"2603:1040:d04:400::180/122\",\r\n + \ \"2603:1040:f05::180/122\",\r\n \"2603:1040:f05:2::100/120\",\r\n + \ \"2603:1040:f05:402::280/122\",\r\n \"2603:1040:1002:1::600/120\",\r\n + \ \"2603:1040:1002:400::1c0/122\",\r\n \"2603:1040:1104:1::/120\",\r\n + \ \"2603:1040:1104:400::280/122\",\r\n \"2603:1050:6::180/122\",\r\n + \ \"2603:1050:6:402::280/122\",\r\n \"2603:1050:403:1::40/122\",\r\n + \ \"2603:1050:403:400::440/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureSignalR\",\r\n \"id\": \"AzureSignalR\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSignalR\",\r\n \"addressPrefixes\": + [\r\n \"13.66.145.0/26\",\r\n \"13.67.15.64/27\",\r\n \"13.69.113.0/24\",\r\n + \ \"13.69.232.128/25\",\r\n \"13.70.74.224/27\",\r\n \"13.71.199.32/27\",\r\n + \ \"13.73.244.64/27\",\r\n \"13.74.111.0/25\",\r\n \"13.78.109.224/27\",\r\n + \ \"13.89.175.128/26\",\r\n \"20.38.132.96/27\",\r\n \"20.38.143.192/27\",\r\n + \ \"20.38.149.224/27\",\r\n \"20.40.229.0/27\",\r\n \"20.42.64.128/25\",\r\n + \ \"20.42.72.0/25\",\r\n \"20.44.10.128/26\",\r\n \"20.44.17.128/26\",\r\n + \ \"20.45.123.192/27\",\r\n \"20.46.11.96/27\",\r\n \"20.48.196.192/27\",\r\n + \ \"20.49.91.192/27\",\r\n \"20.49.119.96/27\",\r\n \"20.51.12.32/27\",\r\n + \ \"20.51.17.224/27\",\r\n \"20.53.47.32/27\",\r\n \"20.61.102.64/27\",\r\n + \ \"20.62.59.32/27\",\r\n \"20.62.133.64/27\",\r\n \"20.65.132.224/27\",\r\n + \ \"20.66.3.224/27\",\r\n \"20.69.0.192/27\",\r\n \"20.82.247.128/25\",\r\n + \ \"20.86.94.128/25\",\r\n \"20.88.155.0/25\",\r\n \"20.150.174.160/27\",\r\n + \ \"20.150.244.160/27\",\r\n \"20.189.170.0/24\",\r\n \"20.189.229.224/27\",\r\n + \ \"20.191.166.64/27\",\r\n \"20.192.34.0/27\",\r\n \"20.192.44.64/27\",\r\n + \ \"20.192.55.192/27\",\r\n \"20.193.199.160/27\",\r\n \"20.193.205.224/27\",\r\n + \ \"20.194.73.192/27\",\r\n \"20.195.65.192/27\",\r\n \"20.195.72.192/27\",\r\n + \ \"20.195.84.0/25\",\r\n \"23.98.86.64/27\",\r\n \"40.69.108.192/26\",\r\n + \ \"40.69.110.128/27\",\r\n \"40.70.148.192/26\",\r\n \"40.71.15.0/25\",\r\n + \ \"40.74.98.160/27\",\r\n \"40.78.204.96/27\",\r\n \"40.78.238.64/26\",\r\n + \ \"40.78.238.128/25\",\r\n \"40.78.245.64/26\",\r\n \"40.78.253.0/26\",\r\n + \ \"40.79.132.160/27\",\r\n \"40.79.139.96/27\",\r\n \"40.79.148.32/27\",\r\n + \ \"40.79.163.96/27\",\r\n \"40.79.171.192/27\",\r\n \"40.79.189.0/27\",\r\n + \ \"40.79.197.0/27\",\r\n \"40.80.53.32/27\",\r\n \"40.120.64.160/27\",\r\n + \ \"51.12.17.160/27\",\r\n \"51.12.46.192/27\",\r\n \"51.12.101.192/27\",\r\n + \ \"51.12.168.0/27\",\r\n \"51.104.9.64/27\",\r\n \"51.105.69.32/27\",\r\n + \ \"51.105.77.0/27\",\r\n \"51.107.128.128/27\",\r\n \"51.107.192.192/27\",\r\n + \ \"51.107.242.192/27\",\r\n \"51.107.250.192/27\",\r\n \"51.116.149.96/27\",\r\n + \ \"51.116.246.32/27\",\r\n \"51.120.213.96/27\",\r\n \"51.120.233.96/27\",\r\n + \ \"51.138.210.96/27\",\r\n \"51.143.212.128/27\",\r\n \"52.136.53.224/27\",\r\n + \ \"52.138.92.224/27\",\r\n \"52.138.229.128/25\",\r\n \"52.139.107.96/27\",\r\n + \ \"52.146.136.32/27\",\r\n \"52.167.109.0/26\",\r\n \"52.178.16.0/24\",\r\n + \ \"52.182.141.64/26\",\r\n \"52.231.20.96/27\",\r\n \"52.231.20.192/26\",\r\n + \ \"52.236.190.0/24\",\r\n \"102.37.160.32/27\",\r\n \"102.133.126.96/27\",\r\n + \ \"104.214.164.160/27\",\r\n \"191.233.207.128/27\",\r\n + \ \"191.238.72.96/27\",\r\n \"2603:1000:4:2::100/120\",\r\n + \ \"2603:1000:104:2::600/120\",\r\n \"2603:1010:6:2::500/120\",\r\n + \ \"2603:1010:101:2::/120\",\r\n \"2603:1010:304:2::100/120\",\r\n + \ \"2603:1010:404:2::100/120\",\r\n \"2603:1020:5:4::/120\",\r\n + \ \"2603:1020:206:4::200/120\",\r\n \"2603:1020:605:2::100/120\",\r\n + \ \"2603:1020:705:2::500/120\",\r\n \"2603:1020:805:2::300/120\",\r\n + \ \"2603:1020:905:2::100/120\",\r\n \"2603:1020:a04:2::300/120\",\r\n + \ \"2603:1020:b04:2::100/120\",\r\n \"2603:1020:c04:2::300/120\",\r\n + \ \"2603:1020:d04:1::700/120\",\r\n \"2603:1020:e04:3::700/120\",\r\n + \ \"2603:1020:f04:3::100/120\",\r\n \"2603:1020:1004:2::600/120\",\r\n + \ \"2603:1020:1104:2::/120\",\r\n \"2603:1030:f:3::500/120\",\r\n + \ \"2603:1030:10:4::/120\",\r\n \"2603:1030:104:2::400/120\",\r\n + \ \"2603:1030:107:1::600/120\",\r\n \"2603:1030:210:5::/120\",\r\n + \ \"2603:1030:302::300/120\",\r\n \"2603:1030:40b:3::100/120\",\r\n + \ \"2603:1030:40c:4::/120\",\r\n \"2603:1030:504:2::500/120\",\r\n + \ \"2603:1030:608:1::700/120\",\r\n \"2603:1030:807:3::/120\",\r\n + \ \"2603:1030:a07:1::700/120\",\r\n \"2603:1030:b04:1::700/120\",\r\n + \ \"2603:1030:c06:2::700/120\",\r\n \"2603:1030:f05:2::500/120\",\r\n + \ \"2603:1030:1005:2::100/120\",\r\n \"2603:1040:5:3::/120\",\r\n + \ \"2603:1040:207:2::600/120\",\r\n \"2603:1040:407:2::300/120\",\r\n + \ \"2603:1040:606:2::100/120\",\r\n \"2603:1040:806:2::100/120\",\r\n + \ \"2603:1040:904:2::300/120\",\r\n \"2603:1040:a06:3::/120\",\r\n + \ \"2603:1040:b04:2::100/120\",\r\n \"2603:1040:c06:2::100/120\",\r\n + \ \"2603:1040:d04:2::600/120\",\r\n \"2603:1040:e05::600/120\",\r\n + \ \"2603:1040:f05:2::700/120\",\r\n \"2603:1040:1002::100/120\",\r\n + \ \"2603:1040:1104:2::/120\",\r\n \"2603:1050:6:2::300/120\",\r\n + \ \"2603:1050:403:2::100/120\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureSiteRecovery\",\r\n \"id\": \"AzureSiteRecovery\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSiteRecovery\",\r\n \"addressPrefixes\": + [\r\n \"13.66.141.240/28\",\r\n \"13.67.10.96/28\",\r\n + \ \"13.69.67.80/28\",\r\n \"13.69.107.80/28\",\r\n \"13.69.230.16/28\",\r\n + \ \"13.70.74.96/28\",\r\n \"13.70.159.158/32\",\r\n \"13.71.173.224/28\",\r\n + \ \"13.71.196.144/28\",\r\n \"13.73.242.192/28\",\r\n \"13.74.108.144/28\",\r\n + \ \"13.75.39.80/28\",\r\n \"13.77.53.64/28\",\r\n \"13.78.109.128/28\",\r\n + \ \"13.82.88.226/32\",\r\n \"13.84.148.14/32\",\r\n \"13.86.219.176/28\",\r\n + \ \"13.87.37.4/32\",\r\n \"13.87.58.48/28\",\r\n \"13.87.124.48/28\",\r\n + \ \"13.89.174.144/28\",\r\n \"20.21.32.0/28\",\r\n \"20.21.43.224/28\",\r\n + \ \"20.21.66.112/28\",\r\n \"20.21.74.112/28\",\r\n \"20.36.34.70/32\",\r\n + \ \"20.36.69.62/32\",\r\n \"20.36.108.96/28\",\r\n \"20.36.115.224/28\",\r\n + \ \"20.36.120.80/28\",\r\n \"20.37.64.80/28\",\r\n \"20.37.76.128/28\",\r\n + \ \"20.37.156.96/28\",\r\n \"20.37.192.112/28\",\r\n \"20.37.224.80/28\",\r\n + \ \"20.38.80.112/28\",\r\n \"20.38.128.80/28\",\r\n \"20.38.136.80/28\",\r\n + \ \"20.38.147.160/28\",\r\n \"20.39.8.80/28\",\r\n \"20.41.4.64/28\",\r\n + \ \"20.41.64.96/28\",\r\n \"20.41.192.80/28\",\r\n \"20.42.4.96/28\",\r\n + \ \"20.42.129.128/28\",\r\n \"20.42.224.80/28\",\r\n \"20.43.40.112/28\",\r\n + \ \"20.43.64.112/28\",\r\n \"20.43.121.16/28\",\r\n \"20.43.130.64/28\",\r\n + \ \"20.44.4.80/28\",\r\n \"20.44.8.176/28\",\r\n \"20.44.17.32/28\",\r\n + \ \"20.44.27.192/28\",\r\n \"20.45.75.232/32\",\r\n \"20.45.112.80/28\",\r\n + \ \"20.45.123.96/28\",\r\n \"20.45.192.80/28\",\r\n \"20.49.83.48/28\",\r\n + \ \"20.49.91.48/28\",\r\n \"20.72.16.0/28\",\r\n \"20.72.28.32/28\",\r\n + \ \"20.150.160.80/28\",\r\n \"20.150.172.48/28\",\r\n \"20.150.179.208/28\",\r\n + \ \"20.150.187.208/28\",\r\n \"20.189.106.96/28\",\r\n \"20.192.99.208/28\",\r\n + \ \"20.192.160.0/28\",\r\n \"20.192.225.0/28\",\r\n \"20.192.235.224/28\",\r\n + \ \"20.193.203.208/28\",\r\n \"20.194.67.48/28\",\r\n \"20.205.75.80/28\",\r\n + \ \"20.205.83.80/28\",\r\n \"20.208.18.112/28\",\r\n \"23.96.195.247/32\",\r\n + \ \"23.98.83.80/28\",\r\n \"40.67.48.80/28\",\r\n \"40.67.60.80/28\",\r\n + \ \"40.69.108.64/28\",\r\n \"40.69.144.231/32\",\r\n \"40.69.212.238/32\",\r\n + \ \"40.70.148.96/28\",\r\n \"40.71.14.0/28\",\r\n \"40.74.24.112/28\",\r\n + \ \"40.74.147.176/28\",\r\n \"40.75.35.80/28\",\r\n \"40.78.196.64/28\",\r\n + \ \"40.78.204.16/28\",\r\n \"40.78.229.48/28\",\r\n \"40.78.236.144/28\",\r\n + \ \"40.78.243.160/28\",\r\n \"40.78.251.96/28\",\r\n \"40.79.132.64/28\",\r\n + \ \"40.79.139.0/28\",\r\n \"40.79.146.192/28\",\r\n \"40.79.156.48/28\",\r\n + \ \"40.79.163.16/28\",\r\n \"40.79.171.96/28\",\r\n \"40.79.180.32/28\",\r\n + \ \"40.79.187.176/28\",\r\n \"40.79.195.160/28\",\r\n \"40.80.51.96/28\",\r\n + \ \"40.80.56.80/28\",\r\n \"40.80.168.80/28\",\r\n \"40.80.176.16/28\",\r\n + \ \"40.80.184.96/28\",\r\n \"40.82.248.96/28\",\r\n \"40.83.179.48/32\",\r\n + \ \"40.89.16.80/28\",\r\n \"40.119.9.192/28\",\r\n \"40.120.75.96/28\",\r\n + \ \"40.123.219.238/32\",\r\n \"51.12.47.0/28\",\r\n \"51.12.100.32/28\",\r\n + \ \"51.12.198.112/28\",\r\n \"51.12.204.32/28\",\r\n \"51.12.227.208/28\",\r\n + \ \"51.12.235.208/28\",\r\n \"51.103.202.112/28\",\r\n \"51.104.9.0/28\",\r\n + \ \"51.104.24.112/28\",\r\n \"51.105.67.192/28\",\r\n \"51.105.75.160/28\",\r\n + \ \"51.105.80.80/28\",\r\n \"51.105.88.80/28\",\r\n \"51.107.48.80/28\",\r\n + \ \"51.107.60.64/28\",\r\n \"51.107.68.31/32\",\r\n \"51.107.144.80/28\",\r\n + \ \"51.107.156.80/28\",\r\n \"51.107.231.223/32\",\r\n \"51.116.48.80/28\",\r\n + \ \"51.116.60.64/28\",\r\n \"51.116.144.80/28\",\r\n \"51.116.156.176/28\",\r\n + \ \"51.116.208.58/32\",\r\n \"51.116.243.128/28\",\r\n \"51.116.251.48/28\",\r\n + \ \"51.120.40.80/28\",\r\n \"51.120.100.64/28\",\r\n \"51.120.107.208/28\",\r\n + \ \"51.120.211.208/28\",\r\n \"51.120.220.64/28\",\r\n \"51.120.224.80/28\",\r\n + \ \"51.137.160.96/28\",\r\n \"51.140.43.158/32\",\r\n \"51.140.212.80/28\",\r\n + \ \"51.141.3.203/32\",\r\n \"51.143.192.80/28\",\r\n \"52.136.48.80/28\",\r\n + \ \"52.136.139.227/32\",\r\n \"52.138.92.64/28\",\r\n \"52.138.227.144/28\",\r\n + \ \"52.140.104.80/28\",\r\n \"52.143.138.106/32\",\r\n \"52.150.136.96/28\",\r\n + \ \"52.161.20.168/32\",\r\n \"52.162.111.0/28\",\r\n \"52.166.13.64/32\",\r\n + \ \"52.167.107.80/28\",\r\n \"52.172.46.220/32\",\r\n \"52.172.187.37/32\",\r\n + \ \"52.175.17.132/32\",\r\n \"52.175.146.69/32\",\r\n \"52.180.178.64/32\",\r\n + \ \"52.182.139.192/28\",\r\n \"52.183.45.166/32\",\r\n \"52.184.158.163/32\",\r\n + \ \"52.185.150.140/32\",\r\n \"52.187.58.193/32\",\r\n \"52.187.191.206/32\",\r\n + \ \"52.225.188.170/32\",\r\n \"52.228.36.192/32\",\r\n \"52.228.80.96/28\",\r\n + \ \"52.229.125.98/32\",\r\n \"52.231.20.16/28\",\r\n \"52.231.28.253/32\",\r\n + \ \"52.231.148.96/28\",\r\n \"52.231.198.185/32\",\r\n \"52.236.187.64/28\",\r\n + \ \"52.246.155.160/28\",\r\n \"65.52.252.192/28\",\r\n \"102.133.28.128/28\",\r\n + \ \"102.133.59.160/28\",\r\n \"102.133.72.51/32\",\r\n \"102.133.124.64/28\",\r\n + \ \"102.133.156.96/28\",\r\n \"102.133.160.44/32\",\r\n \"102.133.218.176/28\",\r\n + \ \"102.133.251.160/28\",\r\n \"104.210.113.114/32\",\r\n + \ \"104.211.177.6/32\",\r\n \"191.233.8.0/28\",\r\n \"191.233.51.192/28\",\r\n + \ \"191.233.205.80/28\",\r\n \"191.234.147.208/28\",\r\n + \ \"191.234.155.208/28\",\r\n \"191.234.185.172/32\",\r\n + \ \"191.235.224.112/28\",\r\n \"2603:1000:4::/123\",\r\n + \ \"2603:1000:4:402::2d0/125\",\r\n \"2603:1000:104:1::/123\",\r\n + \ \"2603:1000:104:402::2d0/125\",\r\n \"2603:1000:104:802::158/125\",\r\n + \ \"2603:1000:104:c02::158/125\",\r\n \"2603:1010:6:1::/123\",\r\n + \ \"2603:1010:6:402::2d0/125\",\r\n \"2603:1010:6:802::158/125\",\r\n + \ \"2603:1010:6:c02::158/125\",\r\n \"2603:1010:101::/123\",\r\n + \ \"2603:1010:101:402::2d0/125\",\r\n \"2603:1010:304::/123\",\r\n + \ \"2603:1010:304:402::2d0/125\",\r\n \"2603:1010:404::/123\",\r\n + \ \"2603:1010:404:402::2d0/125\",\r\n \"2603:1020:5:1::/123\",\r\n + \ \"2603:1020:5:402::2d0/125\",\r\n \"2603:1020:5:802::158/125\",\r\n + \ \"2603:1020:5:c02::158/125\",\r\n \"2603:1020:206:1::/123\",\r\n + \ \"2603:1020:206:402::2d0/125\",\r\n \"2603:1020:206:802::158/125\",\r\n + \ \"2603:1020:206:c02::158/125\",\r\n \"2603:1020:305::/123\",\r\n + \ \"2603:1020:305:402::2d0/125\",\r\n \"2603:1020:405::/123\",\r\n + \ \"2603:1020:405:402::2d0/125\",\r\n \"2603:1020:605::/123\",\r\n + \ \"2603:1020:605:402::2d0/125\",\r\n \"2603:1020:705:1::/123\",\r\n + \ \"2603:1020:705:402::2d0/125\",\r\n \"2603:1020:705:802::158/125\",\r\n + \ \"2603:1020:705:c02::158/125\",\r\n \"2603:1020:805:1::/123\",\r\n + \ \"2603:1020:805:402::2d0/125\",\r\n \"2603:1020:805:802::158/125\",\r\n + \ \"2603:1020:805:c02::158/125\",\r\n \"2603:1020:905::/123\",\r\n + \ \"2603:1020:905:402::2d0/125\",\r\n \"2603:1020:a04:1::/123\",\r\n + \ \"2603:1020:a04:402::2d0/125\",\r\n \"2603:1020:a04:802::158/125\",\r\n + \ \"2603:1020:a04:c02::158/125\",\r\n \"2603:1020:b04::/123\",\r\n + \ \"2603:1020:b04:402::2d0/125\",\r\n \"2603:1020:c04:1::/123\",\r\n + \ \"2603:1020:c04:402::2d0/125\",\r\n \"2603:1020:c04:802::158/125\",\r\n + \ \"2603:1020:c04:c02::158/125\",\r\n \"2603:1020:d04::/123\",\r\n + \ \"2603:1020:d04:402::2d0/125\",\r\n \"2603:1020:e04:1::/123\",\r\n + \ \"2603:1020:e04:402::2d0/125\",\r\n \"2603:1020:e04:802::158/125\",\r\n + \ \"2603:1020:e04:c02::158/125\",\r\n \"2603:1020:f04::/123\",\r\n + \ \"2603:1020:f04:402::2d0/125\",\r\n \"2603:1020:1004::/123\",\r\n + \ \"2603:1020:1004:400::1d0/125\",\r\n \"2603:1020:1004:400::2f0/125\",\r\n + \ \"2603:1020:1004:800::3e0/125\",\r\n \"2603:1020:1004:c02::3a0/125\",\r\n + \ \"2603:1020:1104::/123\",\r\n \"2603:1020:1104:400::2d0/125\",\r\n + \ \"2603:1030:f:1::/123\",\r\n \"2603:1030:f:400::ad0/125\",\r\n + \ \"2603:1030:10:1::/123\",\r\n \"2603:1030:10:402::2d0/125\",\r\n + \ \"2603:1030:10:802::158/125\",\r\n \"2603:1030:10:c02::158/125\",\r\n + \ \"2603:1030:104:1::/123\",\r\n \"2603:1030:104:402::2d0/125\",\r\n + \ \"2603:1030:104:402::700/125\",\r\n \"2603:1030:104:802::1a0/125\",\r\n + \ \"2603:1030:107::/123\",\r\n \"2603:1030:107:400::f8/125\",\r\n + \ \"2603:1030:210:1::/123\",\r\n \"2603:1030:210:402::2d0/125\",\r\n + \ \"2603:1030:210:802::158/125\",\r\n \"2603:1030:210:c02::158/125\",\r\n + \ \"2603:1030:40b:1::/123\",\r\n \"2603:1030:40b:400::ad0/125\",\r\n + \ \"2603:1030:40b:800::158/125\",\r\n \"2603:1030:40b:c00::158/125\",\r\n + \ \"2603:1030:40c:1::/123\",\r\n \"2603:1030:40c:402::2d0/125\",\r\n + \ \"2603:1030:40c:802::158/125\",\r\n \"2603:1030:40c:c02::158/125\",\r\n + \ \"2603:1030:504:1::/123\",\r\n \"2603:1030:504:402::1d0/125\",\r\n + \ \"2603:1030:504:402::2f0/125\",\r\n \"2603:1030:504:802::3e0/125\",\r\n + \ \"2603:1030:504:c02::390/125\",\r\n \"2603:1030:608::/123\",\r\n + \ \"2603:1030:608:402::2d0/125\",\r\n \"2603:1030:807:1::/123\",\r\n + \ \"2603:1030:807:402::2d0/125\",\r\n \"2603:1030:807:802::158/125\",\r\n + \ \"2603:1030:807:c02::158/125\",\r\n \"2603:1030:a07::/123\",\r\n + \ \"2603:1030:a07:402::950/125\",\r\n \"2603:1030:b04::/123\",\r\n + \ \"2603:1030:b04:402::2d0/125\",\r\n \"2603:1030:c06:1::/123\",\r\n + \ \"2603:1030:c06:400::ad0/125\",\r\n \"2603:1030:c06:802::158/125\",\r\n + \ \"2603:1030:c06:c02::158/125\",\r\n \"2603:1030:f05:1::/123\",\r\n + \ \"2603:1030:f05:402::2d0/125\",\r\n \"2603:1030:f05:802::158/125\",\r\n + \ \"2603:1030:f05:c02::158/125\",\r\n \"2603:1030:1005::/123\",\r\n + \ \"2603:1030:1005:402::2d0/125\",\r\n \"2603:1040:5:1::/123\",\r\n + \ \"2603:1040:5:402::2d0/125\",\r\n \"2603:1040:5:802::158/125\",\r\n + \ \"2603:1040:5:c02::158/125\",\r\n \"2603:1040:207::/123\",\r\n + \ \"2603:1040:207:402::2d0/125\",\r\n \"2603:1040:207:800::58/125\",\r\n + \ \"2603:1040:207:c00::58/125\",\r\n \"2603:1040:407:1::/123\",\r\n + \ \"2603:1040:407:402::2d0/125\",\r\n \"2603:1040:407:802::158/125\",\r\n + \ \"2603:1040:407:c02::158/125\",\r\n \"2603:1040:606::/123\",\r\n + \ \"2603:1040:606:402::2d0/125\",\r\n \"2603:1040:806::/123\",\r\n + \ \"2603:1040:806:402::2d0/125\",\r\n \"2603:1040:904:1::/123\",\r\n + \ \"2603:1040:904:402::2d0/125\",\r\n \"2603:1040:904:802::158/125\",\r\n + \ \"2603:1040:904:c02::158/125\",\r\n \"2603:1040:a06:1::/123\",\r\n + \ \"2603:1040:a06:402::2d0/125\",\r\n \"2603:1040:a06:802::158/125\",\r\n + \ \"2603:1040:a06:c02::158/125\",\r\n \"2603:1040:b04::/123\",\r\n + \ \"2603:1040:b04:402::2d0/125\",\r\n \"2603:1040:c06::/123\",\r\n + \ \"2603:1040:c06:402::2d0/125\",\r\n \"2603:1040:d04::/123\",\r\n + \ \"2603:1040:d04:400::1d0/125\",\r\n \"2603:1040:d04:400::2f0/125\",\r\n + \ \"2603:1040:d04:800::3e0/125\",\r\n \"2603:1040:f05:1::/123\",\r\n + \ \"2603:1040:f05:402::2d0/125\",\r\n \"2603:1040:f05:802::158/125\",\r\n + \ \"2603:1040:f05:c02::158/125\",\r\n \"2603:1040:1002::40/123\",\r\n + \ \"2603:1040:1002:400::188/125\",\r\n \"2603:1040:1002:800::58/125\",\r\n + \ \"2603:1040:1002:c00::58/125\",\r\n \"2603:1040:1104::/123\",\r\n + \ \"2603:1040:1104:400::2d0/125\",\r\n \"2603:1050:6:1::/123\",\r\n + \ \"2603:1050:6:402::2d0/125\",\r\n \"2603:1050:6:802::158/125\",\r\n + \ \"2603:1050:6:c02::158/125\",\r\n \"2603:1050:403::/123\",\r\n + \ \"2603:1050:403:400::1f0/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"AzureTrafficManager\",\r\n \"id\": \"AzureTrafficManager\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureTrafficManager\",\r\n \"addressPrefixes\": + [\r\n \"13.65.92.252/32\",\r\n \"13.65.95.152/32\",\r\n + \ \"13.75.124.254/32\",\r\n \"13.75.127.63/32\",\r\n \"13.75.152.253/32\",\r\n + \ \"13.75.153.124/32\",\r\n \"13.84.222.37/32\",\r\n \"23.96.236.252/32\",\r\n + \ \"23.101.191.199/32\",\r\n \"40.68.30.66/32\",\r\n \"40.68.31.178/32\",\r\n + \ \"40.78.67.110/32\",\r\n \"40.87.147.10/32\",\r\n \"40.87.151.34/32\",\r\n + \ \"40.114.5.197/32\",\r\n \"52.172.155.168/32\",\r\n \"52.172.158.37/32\",\r\n + \ \"52.173.90.107/32\",\r\n \"52.173.250.232/32\",\r\n \"52.240.144.45/32\",\r\n + \ \"52.240.151.125/32\",\r\n \"65.52.217.19/32\",\r\n \"104.41.187.209/32\",\r\n + \ \"104.41.190.203/32\",\r\n \"104.42.192.195/32\",\r\n \"104.45.149.110/32\",\r\n + \ \"104.215.91.84/32\",\r\n \"137.135.46.163/32\",\r\n \"137.135.47.215/32\",\r\n + \ \"137.135.80.149/32\",\r\n \"137.135.82.249/32\",\r\n \"191.232.208.52/32\",\r\n + \ \"191.232.214.62/32\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"BatchNodeManagement\",\r\n \"id\": \"BatchNodeManagement\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.65.192.161/32\",\r\n \"13.65.208.36/32\",\r\n + \ \"13.66.141.32/27\",\r\n \"13.66.225.240/32\",\r\n \"13.66.227.117/32\",\r\n + \ \"13.66.227.193/32\",\r\n \"13.67.9.160/27\",\r\n \"13.67.58.116/32\",\r\n + \ \"13.67.190.3/32\",\r\n \"13.67.237.249/32\",\r\n \"13.69.65.64/26\",\r\n + \ \"13.69.106.128/26\",\r\n \"13.69.125.173/32\",\r\n \"13.69.229.32/27\",\r\n + \ \"13.70.73.0/27\",\r\n \"13.71.144.135/32\",\r\n \"13.71.172.96/27\",\r\n + \ \"13.71.195.160/27\",\r\n \"13.73.117.100/32\",\r\n \"13.73.153.226/32\",\r\n + \ \"13.73.157.134/32\",\r\n \"13.73.249.64/27\",\r\n \"13.74.107.128/27\",\r\n + \ \"13.75.36.96/27\",\r\n \"13.77.52.128/27\",\r\n \"13.77.80.138/32\",\r\n + \ \"13.78.108.128/27\",\r\n \"13.78.145.2/32\",\r\n \"13.78.145.73/32\",\r\n + \ \"13.78.150.134/32\",\r\n \"13.78.187.18/32\",\r\n \"13.79.172.125/32\",\r\n + \ \"13.80.117.88/32\",\r\n \"13.81.1.133/32\",\r\n \"13.81.59.254/32\",\r\n + \ \"13.81.63.6/32\",\r\n \"13.81.104.137/32\",\r\n \"13.86.218.192/27\",\r\n + \ \"13.87.32.176/32\",\r\n \"13.87.32.218/32\",\r\n \"13.87.33.133/32\",\r\n + \ \"13.87.57.96/27\",\r\n \"13.87.123.96/27\",\r\n \"13.89.55.147/32\",\r\n + \ \"13.89.171.224/27\",\r\n \"13.91.55.167/32\",\r\n \"13.91.88.93/32\",\r\n + \ \"13.91.107.154/32\",\r\n \"13.92.114.103/32\",\r\n \"13.93.206.144/32\",\r\n + \ \"13.94.214.82/32\",\r\n \"13.95.9.27/32\",\r\n \"20.21.33.32/27\",\r\n + \ \"20.36.40.22/32\",\r\n \"20.36.47.197/32\",\r\n \"20.36.107.128/27\",\r\n + \ \"20.36.121.160/27\",\r\n \"20.37.65.160/27\",\r\n \"20.37.75.224/27\",\r\n + \ \"20.37.196.128/27\",\r\n \"20.37.225.160/27\",\r\n \"20.38.85.224/27\",\r\n + \ \"20.38.137.192/27\",\r\n \"20.38.146.224/27\",\r\n \"20.39.1.125/32\",\r\n + \ \"20.39.1.239/32\",\r\n \"20.39.2.44/32\",\r\n \"20.39.2.122/32\",\r\n + \ \"20.39.3.157/32\",\r\n \"20.39.3.186/32\",\r\n \"20.39.12.64/27\",\r\n + \ \"20.40.137.186/32\",\r\n \"20.40.149.165/32\",\r\n \"20.40.200.32/27\",\r\n + \ \"20.41.5.224/27\",\r\n \"20.41.66.128/27\",\r\n \"20.41.195.128/27\",\r\n + \ \"20.42.6.224/27\",\r\n \"20.42.227.224/27\",\r\n \"20.43.42.96/27\",\r\n + \ \"20.43.66.96/27\",\r\n \"20.43.132.64/27\",\r\n \"20.44.4.112/29\",\r\n + \ \"20.44.27.64/27\",\r\n \"20.45.113.160/27\",\r\n \"20.45.122.224/27\",\r\n + \ \"20.45.195.192/27\",\r\n \"20.49.83.64/27\",\r\n \"20.49.91.64/27\",\r\n + \ \"20.50.1.64/26\",\r\n \"20.72.17.64/27\",\r\n \"20.150.161.224/27\",\r\n + \ \"20.150.172.0/27\",\r\n \"20.150.179.96/27\",\r\n \"20.150.187.96/27\",\r\n + \ \"20.189.109.0/27\",\r\n \"20.192.99.96/27\",\r\n \"20.192.161.224/27\",\r\n + \ \"20.192.228.160/27\",\r\n \"20.192.235.192/27\",\r\n \"20.193.203.128/27\",\r\n + \ \"23.96.12.112/32\",\r\n \"23.96.101.73/32\",\r\n \"23.96.109.140/32\",\r\n + \ \"23.96.232.67/32\",\r\n \"23.97.48.186/32\",\r\n \"23.97.51.12/32\",\r\n + \ \"23.97.97.29/32\",\r\n \"23.97.180.74/32\",\r\n \"23.98.82.160/27\",\r\n + \ \"23.99.98.61/32\",\r\n \"23.99.107.229/32\",\r\n \"23.99.195.236/32\",\r\n + \ \"23.100.100.145/32\",\r\n \"23.100.103.112/32\",\r\n \"23.101.176.33/32\",\r\n + \ \"23.102.178.148/32\",\r\n \"23.102.185.64/32\",\r\n \"40.64.128.160/27\",\r\n + \ \"40.67.49.160/27\",\r\n \"40.67.60.0/27\",\r\n \"40.68.100.153/32\",\r\n + \ \"40.68.191.54/32\",\r\n \"40.68.218.90/32\",\r\n \"40.69.107.128/27\",\r\n + \ \"40.70.147.224/27\",\r\n \"40.71.12.192/27\",\r\n \"40.74.101.0/27\",\r\n + \ \"40.74.140.140/32\",\r\n \"40.74.149.48/29\",\r\n \"40.74.177.177/32\",\r\n + \ \"40.75.35.136/29\",\r\n \"40.77.18.99/32\",\r\n \"40.78.195.128/27\",\r\n + \ \"40.78.203.0/27\",\r\n \"40.78.227.0/27\",\r\n \"40.78.234.96/27\",\r\n + \ \"40.78.242.224/27\",\r\n \"40.78.250.160/27\",\r\n \"40.79.131.96/27\",\r\n + \ \"40.79.138.96/27\",\r\n \"40.79.146.96/27\",\r\n \"40.79.154.32/27\",\r\n + \ \"40.79.162.96/27\",\r\n \"40.79.170.192/27\",\r\n \"40.79.186.128/27\",\r\n + \ \"40.79.194.32/27\",\r\n \"40.80.50.224/27\",\r\n \"40.80.58.160/27\",\r\n + \ \"40.80.170.128/27\",\r\n \"40.80.190.192/27\",\r\n \"40.82.255.64/27\",\r\n + \ \"40.84.49.170/32\",\r\n \"40.84.62.82/32\",\r\n \"40.85.226.213/32\",\r\n + \ \"40.85.227.37/32\",\r\n \"40.86.224.98/32\",\r\n \"40.86.224.104/32\",\r\n + \ \"40.88.48.36/32\",\r\n \"40.89.18.192/27\",\r\n \"40.89.65.161/32\",\r\n + \ \"40.89.66.236/32\",\r\n \"40.89.67.77/32\",\r\n \"40.89.70.17/32\",\r\n + \ \"40.112.254.235/32\",\r\n \"40.115.50.9/32\",\r\n \"40.118.208.127/32\",\r\n + \ \"40.122.166.234/32\",\r\n \"51.12.41.192/27\",\r\n \"51.12.100.0/27\",\r\n + \ \"51.12.193.192/27\",\r\n \"51.12.204.0/27\",\r\n \"51.12.227.96/27\",\r\n + \ \"51.12.235.96/27\",\r\n \"51.104.28.0/27\",\r\n \"51.105.66.224/27\",\r\n + \ \"51.105.74.224/27\",\r\n \"51.105.81.160/27\",\r\n \"51.105.89.192/27\",\r\n + \ \"51.107.49.192/27\",\r\n \"51.107.59.224/27\",\r\n \"51.107.145.160/27\",\r\n + \ \"51.107.155.224/27\",\r\n \"51.116.48.224/27\",\r\n \"51.116.59.224/27\",\r\n + \ \"51.116.144.224/27\",\r\n \"51.116.154.32/27\",\r\n \"51.116.243.0/27\",\r\n + \ \"51.116.251.0/27\",\r\n \"51.120.41.192/27\",\r\n \"51.120.99.224/27\",\r\n + \ \"51.120.107.96/27\",\r\n \"51.120.211.96/27\",\r\n \"51.120.220.0/27\",\r\n + \ \"51.120.225.160/27\",\r\n \"51.137.162.192/27\",\r\n \"51.140.148.160/27\",\r\n + \ \"51.140.184.59/32\",\r\n \"51.140.184.61/32\",\r\n \"51.140.184.63/32\",\r\n + \ \"51.140.211.128/27\",\r\n \"51.141.8.61/32\",\r\n \"51.141.8.62/32\",\r\n + \ \"51.141.8.64/32\",\r\n \"51.143.193.160/27\",\r\n \"52.136.49.192/27\",\r\n + \ \"52.136.143.192/31\",\r\n \"52.137.105.46/32\",\r\n \"52.138.90.64/27\",\r\n + \ \"52.138.226.128/27\",\r\n \"52.140.106.128/27\",\r\n \"52.143.139.121/32\",\r\n + \ \"52.143.140.12/32\",\r\n \"52.148.148.46/32\",\r\n \"52.150.140.128/27\",\r\n + \ \"52.161.95.12/32\",\r\n \"52.161.107.48/32\",\r\n \"52.162.110.32/27\",\r\n + \ \"52.164.244.189/32\",\r\n \"52.164.245.81/32\",\r\n \"52.165.44.224/32\",\r\n + \ \"52.166.19.45/32\",\r\n \"52.167.106.128/27\",\r\n \"52.169.27.79/32\",\r\n + \ \"52.169.30.175/32\",\r\n \"52.169.235.90/32\",\r\n \"52.174.33.113/32\",\r\n + \ \"52.174.34.69/32\",\r\n \"52.174.35.218/32\",\r\n \"52.174.38.99/32\",\r\n + \ \"52.174.176.203/32\",\r\n \"52.174.179.66/32\",\r\n \"52.174.180.164/32\",\r\n + \ \"52.175.218.150/32\",\r\n \"52.178.149.188/32\",\r\n \"52.180.176.58/32\",\r\n + \ \"52.180.177.108/32\",\r\n \"52.180.177.206/32\",\r\n \"52.180.179.94/32\",\r\n + \ \"52.180.181.0/32\",\r\n \"52.180.181.239/32\",\r\n \"52.182.139.0/27\",\r\n + \ \"52.188.222.115/32\",\r\n \"52.189.217.254/32\",\r\n \"52.191.129.21/32\",\r\n + \ \"52.191.166.57/32\",\r\n \"52.225.185.38/32\",\r\n \"52.225.191.67/32\",\r\n + \ \"52.228.44.187/32\",\r\n \"52.228.83.192/27\",\r\n \"52.231.19.96/27\",\r\n + \ \"52.231.32.70/31\",\r\n \"52.231.32.82/32\",\r\n \"52.231.147.128/27\",\r\n + \ \"52.231.200.112/31\",\r\n \"52.231.200.126/32\",\r\n \"52.233.40.34/32\",\r\n + \ \"52.233.157.9/32\",\r\n \"52.233.157.78/32\",\r\n \"52.233.161.238/32\",\r\n + \ \"52.233.172.80/32\",\r\n \"52.235.41.66/32\",\r\n \"52.236.186.128/26\",\r\n + \ \"52.237.30.175/32\",\r\n \"52.242.22.129/32\",\r\n \"52.242.33.105/32\",\r\n + \ \"52.246.154.224/27\",\r\n \"52.249.60.22/32\",\r\n \"52.253.227.240/32\",\r\n + \ \"65.52.199.156/32\",\r\n \"65.52.199.188/32\",\r\n \"65.52.251.224/27\",\r\n + \ \"70.37.49.163/32\",\r\n \"102.133.27.192/27\",\r\n \"102.133.56.192/27\",\r\n + \ \"102.133.123.64/27\",\r\n \"102.133.155.192/27\",\r\n + \ \"102.133.217.224/27\",\r\n \"102.133.250.224/27\",\r\n + \ \"104.40.69.159/32\",\r\n \"104.40.183.25/32\",\r\n \"104.41.2.182/32\",\r\n + \ \"104.41.129.99/32\",\r\n \"104.43.128.78/32\",\r\n \"104.43.131.156/32\",\r\n + \ \"104.43.132.75/32\",\r\n \"104.45.13.8/32\",\r\n \"104.45.82.201/32\",\r\n + \ \"104.45.88.181/32\",\r\n \"104.46.232.208/32\",\r\n \"104.46.236.29/32\",\r\n + \ \"104.47.149.96/32\",\r\n \"104.208.16.128/27\",\r\n \"104.208.144.128/27\",\r\n + \ \"104.208.156.99/32\",\r\n \"104.208.157.18/32\",\r\n \"104.210.3.254/32\",\r\n + \ \"104.210.115.52/32\",\r\n \"104.211.82.96/27\",\r\n \"104.211.96.142/32\",\r\n + \ \"104.211.96.144/31\",\r\n \"104.211.147.96/27\",\r\n \"104.211.160.72/32\",\r\n + \ \"104.211.160.74/31\",\r\n \"104.211.224.117/32\",\r\n + \ \"104.211.224.119/32\",\r\n \"104.211.224.121/32\",\r\n + \ \"104.214.19.192/27\",\r\n \"104.214.65.153/32\",\r\n \"111.221.104.48/32\",\r\n + \ \"137.116.33.5/32\",\r\n \"137.116.33.29/32\",\r\n \"137.116.33.71/32\",\r\n + \ \"137.116.37.146/32\",\r\n \"137.116.46.180/32\",\r\n \"137.116.193.225/32\",\r\n + \ \"137.117.45.176/32\",\r\n \"137.117.109.143/32\",\r\n + \ \"138.91.1.114/32\",\r\n \"138.91.17.36/32\",\r\n \"157.55.167.71/32\",\r\n + \ \"157.55.210.88/32\",\r\n \"168.61.161.154/32\",\r\n \"168.61.209.228/32\",\r\n + \ \"168.62.4.114/32\",\r\n \"168.62.36.128/32\",\r\n \"168.62.168.27/32\",\r\n + \ \"168.63.5.53/32\",\r\n \"168.63.36.126/32\",\r\n \"168.63.133.23/32\",\r\n + \ \"168.63.208.148/32\",\r\n \"191.232.37.60/32\",\r\n \"191.233.10.0/27\",\r\n + \ \"191.233.76.85/32\",\r\n \"191.233.204.96/27\",\r\n \"191.234.147.96/27\",\r\n + \ \"191.234.155.96/27\",\r\n \"191.235.227.192/27\",\r\n + \ \"191.236.37.239/32\",\r\n \"191.236.38.142/32\",\r\n \"191.236.161.35/32\",\r\n + \ \"191.236.163.245/32\",\r\n \"191.236.164.44/32\",\r\n + \ \"191.239.18.3/32\",\r\n \"191.239.21.73/32\",\r\n \"191.239.40.217/32\",\r\n + \ \"191.239.64.139/32\",\r\n \"191.239.64.152/32\",\r\n \"191.239.160.161/32\",\r\n + \ \"191.239.160.185/32\",\r\n \"207.46.149.75/32\",\r\n \"207.46.225.72/32\",\r\n + \ \"2603:1000:4::400/122\",\r\n \"2603:1000:104:1::340/122\",\r\n + \ \"2603:1010:6:1::340/122\",\r\n \"2603:1010:101::400/122\",\r\n + \ \"2603:1010:304::400/122\",\r\n \"2603:1010:404::400/122\",\r\n + \ \"2603:1020:5:1::340/122\",\r\n \"2603:1020:206:1::340/122\",\r\n + \ \"2603:1020:305::400/122\",\r\n \"2603:1020:405::400/122\",\r\n + \ \"2603:1020:605::400/122\",\r\n \"2603:1020:705:1::340/122\",\r\n + \ \"2603:1020:805:1::340/122\",\r\n \"2603:1020:905::400/122\",\r\n + \ \"2603:1020:a04:1::340/122\",\r\n \"2603:1020:b04::400/122\",\r\n + \ \"2603:1020:c04:1::340/122\",\r\n \"2603:1020:d04::400/122\",\r\n + \ \"2603:1020:e04:1::340/122\",\r\n \"2603:1020:f04::400/122\",\r\n + \ \"2603:1020:1004::340/122\",\r\n \"2603:1020:1104::300/122\",\r\n + \ \"2603:1030:f:1::400/122\",\r\n \"2603:1030:10:1::340/122\",\r\n + \ \"2603:1030:104:1::340/122\",\r\n \"2603:1030:107::300/122\",\r\n + \ \"2603:1030:210:1::340/122\",\r\n \"2603:1030:40b:1::340/122\",\r\n + \ \"2603:1030:40c:1::340/122\",\r\n \"2603:1030:504:1::340/122\",\r\n + \ \"2603:1030:608::400/122\",\r\n \"2603:1030:807:1::340/122\",\r\n + \ \"2603:1030:a07::400/122\",\r\n \"2603:1030:b04::400/122\",\r\n + \ \"2603:1030:c06:1::340/122\",\r\n \"2603:1030:f05:1::340/122\",\r\n + \ \"2603:1030:1005::400/122\",\r\n \"2603:1040:5:1::340/122\",\r\n + \ \"2603:1040:207::400/122\",\r\n \"2603:1040:407:1::340/122\",\r\n + \ \"2603:1040:606::400/122\",\r\n \"2603:1040:806::400/122\",\r\n + \ \"2603:1040:904:1::340/122\",\r\n \"2603:1040:a06:1::340/122\",\r\n + \ \"2603:1040:b04::400/122\",\r\n \"2603:1040:c06::400/122\",\r\n + \ \"2603:1040:d04::340/122\",\r\n \"2603:1040:f05:1::340/122\",\r\n + \ \"2603:1040:1002::500/122\",\r\n \"2603:1040:1104::300/122\",\r\n + \ \"2603:1050:6:1::340/122\",\r\n \"2603:1050:403::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.AustraliaCentral\",\r\n + \ \"id\": \"BatchNodeManagement.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.36.40.22/32\",\r\n \"20.36.47.197/32\",\r\n \"20.36.107.128/27\",\r\n + \ \"20.37.225.160/27\",\r\n \"2603:1010:304::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.AustraliaEast\",\r\n + \ \"id\": \"BatchNodeManagement.AustraliaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.70.73.0/27\",\r\n + \ \"20.37.196.128/27\",\r\n \"40.79.162.96/27\",\r\n \"40.79.170.192/27\",\r\n + \ \"104.210.115.52/32\",\r\n \"191.239.64.139/32\",\r\n \"191.239.64.152/32\",\r\n + \ \"2603:1010:6:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.AustraliaSoutheast\",\r\n \"id\": + \"BatchNodeManagement.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.73.117.100/32\",\r\n \"13.77.52.128/27\",\r\n + \ \"20.42.227.224/27\",\r\n \"52.189.217.254/32\",\r\n \"191.239.160.161/32\",\r\n + \ \"191.239.160.185/32\",\r\n \"2603:1010:101::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.BrazilSouth\",\r\n + \ \"id\": \"BatchNodeManagement.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"23.97.97.29/32\",\r\n + \ \"104.41.2.182/32\",\r\n \"191.232.37.60/32\",\r\n \"191.233.204.96/27\",\r\n + \ \"191.234.147.96/27\",\r\n \"191.234.155.96/27\",\r\n \"191.235.227.192/27\",\r\n + \ \"2603:1050:6:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.BrazilSoutheast\",\r\n \"id\": + \"BatchNodeManagement.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"191.233.10.0/27\",\r\n + \ \"2603:1050:403::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.CanadaCentral\",\r\n \"id\": + \"BatchNodeManagement.CanadaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.71.172.96/27\",\r\n + \ \"20.38.146.224/27\",\r\n \"40.85.226.213/32\",\r\n \"40.85.227.37/32\",\r\n + \ \"52.228.44.187/32\",\r\n \"52.228.83.192/27\",\r\n \"52.233.40.34/32\",\r\n + \ \"52.237.30.175/32\",\r\n \"52.246.154.224/27\",\r\n \"2603:1030:f05:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.CanadaEast\",\r\n + \ \"id\": \"BatchNodeManagement.CanadaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"40.69.107.128/27\",\r\n + \ \"40.86.224.98/32\",\r\n \"40.86.224.104/32\",\r\n \"40.89.18.192/27\",\r\n + \ \"52.235.41.66/32\",\r\n \"52.242.22.129/32\",\r\n \"52.242.33.105/32\",\r\n + \ \"2603:1030:1005::400/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.CentralIndia\",\r\n \"id\": + \"BatchNodeManagement.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.192.99.96/27\",\r\n + \ \"40.80.50.224/27\",\r\n \"52.140.106.128/27\",\r\n \"104.211.82.96/27\",\r\n + \ \"104.211.96.142/32\",\r\n \"104.211.96.144/31\",\r\n \"2603:1040:a06:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.CentralUS\",\r\n + \ \"id\": \"BatchNodeManagement.CentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.67.190.3/32\",\r\n + \ \"13.67.237.249/32\",\r\n \"13.89.55.147/32\",\r\n \"13.89.171.224/27\",\r\n + \ \"20.40.200.32/27\",\r\n \"23.99.195.236/32\",\r\n \"40.77.18.99/32\",\r\n + \ \"40.122.166.234/32\",\r\n \"52.165.44.224/32\",\r\n \"52.182.139.0/27\",\r\n + \ \"104.43.128.78/32\",\r\n \"104.43.131.156/32\",\r\n \"104.43.132.75/32\",\r\n + \ \"104.208.16.128/27\",\r\n \"168.61.161.154/32\",\r\n \"168.61.209.228/32\",\r\n + \ \"2603:1030:10:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.CentralUSEUAP\",\r\n \"id\": + \"BatchNodeManagement.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.45.195.192/27\",\r\n + \ \"40.78.203.0/27\",\r\n \"52.180.176.58/32\",\r\n \"52.180.177.108/32\",\r\n + \ \"52.180.177.206/32\",\r\n \"52.180.179.94/32\",\r\n \"52.180.181.0/32\",\r\n + \ \"52.180.181.239/32\",\r\n \"2603:1030:f:1::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.EastAsia\",\r\n + \ \"id\": \"BatchNodeManagement.EastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.75.36.96/27\",\r\n + \ \"20.189.109.0/27\",\r\n \"23.99.98.61/32\",\r\n \"23.99.107.229/32\",\r\n + \ \"168.63.133.23/32\",\r\n \"168.63.208.148/32\",\r\n \"207.46.149.75/32\",\r\n + \ \"2603:1040:207::400/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.EastUS\",\r\n \"id\": + \"BatchNodeManagement.EastUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.92.114.103/32\",\r\n + \ \"20.42.6.224/27\",\r\n \"23.96.12.112/32\",\r\n \"23.96.101.73/32\",\r\n + \ \"23.96.109.140/32\",\r\n \"40.71.12.192/27\",\r\n \"40.78.227.0/27\",\r\n + \ \"40.79.154.32/27\",\r\n \"40.88.48.36/32\",\r\n \"52.188.222.115/32\",\r\n + \ \"104.41.129.99/32\",\r\n \"137.117.45.176/32\",\r\n \"137.117.109.143/32\",\r\n + \ \"168.62.36.128/32\",\r\n \"168.62.168.27/32\",\r\n \"191.236.37.239/32\",\r\n + \ \"191.236.38.142/32\",\r\n \"2603:1030:210:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.EastUS2\",\r\n + \ \"id\": \"BatchNodeManagement.EastUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.77.80.138/32\",\r\n + \ \"20.41.5.224/27\",\r\n \"40.70.147.224/27\",\r\n \"40.84.49.170/32\",\r\n + \ \"40.84.62.82/32\",\r\n \"52.167.106.128/27\",\r\n \"104.208.144.128/27\",\r\n + \ \"104.208.156.99/32\",\r\n \"104.208.157.18/32\",\r\n \"104.210.3.254/32\",\r\n + \ \"137.116.33.5/32\",\r\n \"137.116.33.29/32\",\r\n \"137.116.33.71/32\",\r\n + \ \"137.116.37.146/32\",\r\n \"137.116.46.180/32\",\r\n \"2603:1030:40c:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.EastUS2EUAP\",\r\n + \ \"id\": \"BatchNodeManagement.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.39.1.125/32\",\r\n + \ \"20.39.1.239/32\",\r\n \"20.39.2.44/32\",\r\n \"20.39.2.122/32\",\r\n + \ \"20.39.3.157/32\",\r\n \"20.39.3.186/32\",\r\n \"20.39.12.64/27\",\r\n + \ \"40.74.149.48/29\",\r\n \"40.75.35.136/29\",\r\n \"40.89.65.161/32\",\r\n + \ \"40.89.66.236/32\",\r\n \"40.89.67.77/32\",\r\n \"40.89.70.17/32\",\r\n + \ \"52.138.90.64/27\",\r\n \"52.225.185.38/32\",\r\n \"52.225.191.67/32\",\r\n + \ \"52.253.227.240/32\",\r\n \"2603:1030:40b:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.FranceCentral\",\r\n + \ \"id\": \"BatchNodeManagement.FranceCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.40.137.186/32\",\r\n + \ \"20.40.149.165/32\",\r\n \"20.43.42.96/27\",\r\n \"40.79.131.96/27\",\r\n + \ \"40.79.138.96/27\",\r\n \"40.79.146.96/27\",\r\n \"52.143.139.121/32\",\r\n + \ \"52.143.140.12/32\",\r\n \"2603:1020:805:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.FranceSouth\",\r\n + \ \"id\": \"BatchNodeManagement.FranceSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.105.89.192/27\",\r\n + \ \"52.136.143.192/31\",\r\n \"2603:1020:905::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.GermanyNorth\",\r\n + \ \"id\": \"BatchNodeManagement.GermanyNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.116.48.224/27\",\r\n + \ \"51.116.59.224/27\",\r\n \"2603:1020:d04::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.GermanyWestCentral\",\r\n + \ \"id\": \"BatchNodeManagement.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.116.144.224/27\",\r\n + \ \"51.116.154.32/27\",\r\n \"51.116.243.0/27\",\r\n \"51.116.251.0/27\",\r\n + \ \"2603:1020:c04:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.JapanEast\",\r\n \"id\": + \"BatchNodeManagement.JapanEast\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.71.144.135/32\",\r\n + \ \"13.78.108.128/27\",\r\n \"20.43.66.96/27\",\r\n \"23.100.100.145/32\",\r\n + \ \"23.100.103.112/32\",\r\n \"40.79.186.128/27\",\r\n \"40.79.194.32/27\",\r\n + \ \"138.91.1.114/32\",\r\n \"2603:1040:407:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.JapanWest\",\r\n + \ \"id\": \"BatchNodeManagement.JapanWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"40.74.101.0/27\",\r\n + \ \"40.74.140.140/32\",\r\n \"40.80.58.160/27\",\r\n \"104.46.232.208/32\",\r\n + \ \"104.46.236.29/32\",\r\n \"138.91.17.36/32\",\r\n \"2603:1040:606::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.JioIndiaCentral\",\r\n + \ \"id\": \"BatchNodeManagement.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \"addressPrefixes\": + [\r\n \"20.192.228.160/27\",\r\n \"20.192.235.192/27\",\r\n + \ \"2603:1040:1104::300/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.JioIndiaWest\",\r\n \"id\": + \"BatchNodeManagement.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.192.161.224/27\",\r\n + \ \"20.193.203.128/27\",\r\n \"2603:1040:d04::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.KoreaCentral\",\r\n + \ \"id\": \"BatchNodeManagement.KoreaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.41.66.128/27\",\r\n + \ \"20.44.27.64/27\",\r\n \"52.231.19.96/27\",\r\n \"52.231.32.70/31\",\r\n + \ \"52.231.32.82/32\",\r\n \"2603:1040:f05:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.KoreaSouth\",\r\n + \ \"id\": \"BatchNodeManagement.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"40.80.170.128/27\",\r\n + \ \"52.231.147.128/27\",\r\n \"52.231.200.112/31\",\r\n \"52.231.200.126/32\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.NorthCentralUS\",\r\n + \ \"id\": \"BatchNodeManagement.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \"addressPrefixes\": + [\r\n \"23.96.232.67/32\",\r\n \"40.80.190.192/27\",\r\n + \ \"52.162.110.32/27\",\r\n \"65.52.199.156/32\",\r\n \"65.52.199.188/32\",\r\n + \ \"157.55.167.71/32\",\r\n \"157.55.210.88/32\",\r\n \"191.236.161.35/32\",\r\n + \ \"191.236.163.245/32\",\r\n \"191.236.164.44/32\",\r\n + \ \"2603:1030:608::400/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.NorthEurope\",\r\n \"id\": + \"BatchNodeManagement.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.69.229.32/27\",\r\n + \ \"13.74.107.128/27\",\r\n \"13.79.172.125/32\",\r\n \"20.38.85.224/27\",\r\n + \ \"52.138.226.128/27\",\r\n \"52.164.244.189/32\",\r\n \"52.164.245.81/32\",\r\n + \ \"52.169.27.79/32\",\r\n \"52.169.30.175/32\",\r\n \"52.169.235.90/32\",\r\n + \ \"52.178.149.188/32\",\r\n \"104.45.82.201/32\",\r\n \"104.45.88.181/32\",\r\n + \ \"168.63.36.126/32\",\r\n \"2603:1020:5:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.NorwayEast\",\r\n + \ \"id\": \"BatchNodeManagement.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.120.41.192/27\",\r\n + \ \"51.120.99.224/27\",\r\n \"51.120.107.96/27\",\r\n \"51.120.211.96/27\",\r\n + \ \"2603:1020:e04:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.NorwayWest\",\r\n \"id\": + \"BatchNodeManagement.NorwayWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.120.220.0/27\",\r\n + \ \"51.120.225.160/27\",\r\n \"2603:1020:f04::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.SouthAfricaNorth\",\r\n + \ \"id\": \"BatchNodeManagement.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \"addressPrefixes\": + [\r\n \"102.133.123.64/27\",\r\n \"102.133.155.192/27\",\r\n + \ \"102.133.217.224/27\",\r\n \"102.133.250.224/27\",\r\n + \ \"2603:1000:104:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.SouthAfricaWest\",\r\n \"id\": + \"BatchNodeManagement.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \"addressPrefixes\": + [\r\n \"102.133.27.192/27\",\r\n \"102.133.56.192/27\",\r\n + \ \"2603:1000:4::400/122\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"BatchNodeManagement.SouthCentralUS\",\r\n \"id\": \"BatchNodeManagement.SouthCentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.65.192.161/32\",\r\n \"13.65.208.36/32\",\r\n + \ \"13.73.249.64/27\",\r\n \"20.45.122.224/27\",\r\n \"20.49.91.64/27\",\r\n + \ \"23.101.176.33/32\",\r\n \"23.102.178.148/32\",\r\n \"23.102.185.64/32\",\r\n + \ \"40.74.177.177/32\",\r\n \"52.249.60.22/32\",\r\n \"70.37.49.163/32\",\r\n + \ \"104.214.19.192/27\",\r\n \"104.214.65.153/32\",\r\n \"2603:1030:807:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.SouthCentralUSSTG\",\r\n + \ \"id\": \"BatchNodeManagement.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.44.4.112/29\",\r\n + \ \"20.45.113.160/27\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"BatchNodeManagement.SoutheastAsia\",\r\n \"id\": \"BatchNodeManagement.SoutheastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"BatchNodeManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.67.9.160/27\",\r\n \"13.67.58.116/32\",\r\n \"20.43.132.64/27\",\r\n + \ \"23.97.48.186/32\",\r\n \"23.97.51.12/32\",\r\n \"23.98.82.160/27\",\r\n + \ \"40.78.234.96/27\",\r\n \"111.221.104.48/32\",\r\n \"207.46.225.72/32\",\r\n + \ \"2603:1040:5:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.SouthIndia\",\r\n \"id\": + \"BatchNodeManagement.SouthIndia\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"southindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.41.195.128/27\",\r\n + \ \"40.78.195.128/27\",\r\n \"104.211.224.117/32\",\r\n \"104.211.224.119/32\",\r\n + \ \"104.211.224.121/32\",\r\n \"2603:1040:c06::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.SwedenCentral\",\r\n + \ \"id\": \"BatchNodeManagement.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.12.41.192/27\",\r\n + \ \"51.12.100.0/27\",\r\n \"51.12.227.96/27\",\r\n \"51.12.235.96/27\",\r\n + \ \"2603:1020:1004::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.SwitzerlandNorth\",\r\n \"id\": + \"BatchNodeManagement.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.107.49.192/27\",\r\n + \ \"51.107.59.224/27\",\r\n \"2603:1020:a04:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.SwitzerlandWest\",\r\n + \ \"id\": \"BatchNodeManagement.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.107.145.160/27\",\r\n + \ \"51.107.155.224/27\",\r\n \"2603:1020:b04::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.UAECentral\",\r\n + \ \"id\": \"BatchNodeManagement.UAECentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.37.65.160/27\",\r\n + \ \"20.37.75.224/27\",\r\n \"2603:1040:b04::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.UAENorth\",\r\n + \ \"id\": \"BatchNodeManagement.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.38.137.192/27\",\r\n + \ \"65.52.251.224/27\",\r\n \"2603:1040:904:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.UKSouth\",\r\n + \ \"id\": \"BatchNodeManagement.UKSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.104.28.0/27\",\r\n + \ \"51.105.66.224/27\",\r\n \"51.105.74.224/27\",\r\n \"51.140.148.160/27\",\r\n + \ \"51.140.184.59/32\",\r\n \"51.140.184.61/32\",\r\n \"51.140.184.63/32\",\r\n + \ \"2603:1020:705:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.UKWest\",\r\n \"id\": + \"BatchNodeManagement.UKWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"51.137.162.192/27\",\r\n + \ \"51.140.211.128/27\",\r\n \"51.141.8.61/32\",\r\n \"51.141.8.62/32\",\r\n + \ \"51.141.8.64/32\",\r\n \"2603:1020:605::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.WestCentralUS\",\r\n + \ \"id\": \"BatchNodeManagement.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.71.195.160/27\",\r\n + \ \"13.78.145.2/32\",\r\n \"13.78.145.73/32\",\r\n \"13.78.150.134/32\",\r\n + \ \"13.78.187.18/32\",\r\n \"52.150.140.128/27\",\r\n \"52.161.95.12/32\",\r\n + \ \"52.161.107.48/32\",\r\n \"2603:1030:b04::400/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.WestEurope\",\r\n + \ \"id\": \"BatchNodeManagement.WestEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.69.65.64/26\",\r\n + \ \"13.69.106.128/26\",\r\n \"13.69.125.173/32\",\r\n \"13.73.153.226/32\",\r\n + \ \"13.73.157.134/32\",\r\n \"13.80.117.88/32\",\r\n \"13.81.1.133/32\",\r\n + \ \"13.81.59.254/32\",\r\n \"13.81.63.6/32\",\r\n \"13.81.104.137/32\",\r\n + \ \"13.94.214.82/32\",\r\n \"13.95.9.27/32\",\r\n \"20.50.1.64/26\",\r\n + \ \"23.97.180.74/32\",\r\n \"40.68.100.153/32\",\r\n \"40.68.191.54/32\",\r\n + \ \"40.68.218.90/32\",\r\n \"40.115.50.9/32\",\r\n \"52.166.19.45/32\",\r\n + \ \"52.174.33.113/32\",\r\n \"52.174.34.69/32\",\r\n \"52.174.35.218/32\",\r\n + \ \"52.174.38.99/32\",\r\n \"52.174.176.203/32\",\r\n \"52.174.179.66/32\",\r\n + \ \"52.174.180.164/32\",\r\n \"52.233.157.9/32\",\r\n \"52.233.157.78/32\",\r\n + \ \"52.233.161.238/32\",\r\n \"52.233.172.80/32\",\r\n \"52.236.186.128/26\",\r\n + \ \"104.40.183.25/32\",\r\n \"104.45.13.8/32\",\r\n \"104.47.149.96/32\",\r\n + \ \"137.116.193.225/32\",\r\n \"168.63.5.53/32\",\r\n \"191.233.76.85/32\",\r\n + \ \"2603:1020:206:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.WestIndia\",\r\n \"id\": + \"BatchNodeManagement.WestIndia\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"52.136.49.192/27\",\r\n + \ \"104.211.147.96/27\",\r\n \"104.211.160.72/32\",\r\n \"104.211.160.74/31\",\r\n + \ \"2603:1040:806::400/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.WestUS\",\r\n \"id\": + \"BatchNodeManagement.WestUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.86.218.192/27\",\r\n + \ \"13.91.55.167/32\",\r\n \"13.91.88.93/32\",\r\n \"13.91.107.154/32\",\r\n + \ \"13.93.206.144/32\",\r\n \"40.82.255.64/27\",\r\n \"40.112.254.235/32\",\r\n + \ \"40.118.208.127/32\",\r\n \"104.40.69.159/32\",\r\n \"168.62.4.114/32\",\r\n + \ \"191.239.18.3/32\",\r\n \"191.239.21.73/32\",\r\n \"191.239.40.217/32\",\r\n + \ \"2603:1030:a07::400/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"BatchNodeManagement.WestUS2\",\r\n \"id\": + \"BatchNodeManagement.WestUS2\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"13.66.141.32/27\",\r\n + \ \"13.66.225.240/32\",\r\n \"13.66.227.117/32\",\r\n \"13.66.227.193/32\",\r\n + \ \"40.64.128.160/27\",\r\n \"40.78.242.224/27\",\r\n \"40.78.250.160/27\",\r\n + \ \"52.137.105.46/32\",\r\n \"52.148.148.46/32\",\r\n \"52.175.218.150/32\",\r\n + \ \"52.191.129.21/32\",\r\n \"52.191.166.57/32\",\r\n \"2603:1030:c06:1::340/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"BatchNodeManagement.WestUS3\",\r\n + \ \"id\": \"BatchNodeManagement.WestUS3\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"BatchNodeManagement\",\r\n \"addressPrefixes\": [\r\n \"20.150.161.224/27\",\r\n + \ \"20.150.172.0/27\",\r\n \"20.150.179.96/27\",\r\n \"20.150.187.96/27\",\r\n + \ \"2603:1030:504:1::340/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"CognitiveServicesManagement\",\r\n \"id\": + \"CognitiveServicesManagement\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"8\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"FW\"\r\n ],\r\n + \ \"systemService\": \"CognitiveServicesManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.64.73.207/32\",\r\n \"13.65.241.39/32\",\r\n + \ \"13.66.56.76/32\",\r\n \"13.66.141.232/29\",\r\n \"13.66.142.0/26\",\r\n + \ \"13.67.10.80/29\",\r\n \"13.67.10.128/26\",\r\n \"13.68.82.4/32\",\r\n + \ \"13.68.211.223/32\",\r\n \"13.69.67.64/28\",\r\n \"13.69.67.128/26\",\r\n + \ \"13.69.230.0/29\",\r\n \"13.69.230.32/29\",\r\n \"13.70.74.88/29\",\r\n + \ \"13.70.74.120/29\",\r\n \"13.70.127.50/32\",\r\n \"13.70.149.125/32\",\r\n + \ \"13.71.173.216/29\",\r\n \"13.71.173.248/29\",\r\n \"13.71.196.136/29\",\r\n + \ \"13.71.196.168/29\",\r\n \"13.73.242.48/29\",\r\n \"13.73.242.128/26\",\r\n + \ \"13.73.249.0/27\",\r\n \"13.73.249.96/27\",\r\n \"13.73.249.128/28\",\r\n + \ \"13.73.253.122/31\",\r\n \"13.73.254.200/29\",\r\n \"13.73.254.208/29\",\r\n + \ \"13.73.254.216/30\",\r\n \"13.73.255.32/27\",\r\n \"13.74.139.192/32\",\r\n + \ \"13.75.39.64/29\",\r\n \"13.75.39.96/29\",\r\n \"13.75.92.220/32\",\r\n + \ \"13.75.137.81/32\",\r\n \"13.75.163.9/32\",\r\n \"13.75.168.111/32\",\r\n + \ \"13.77.55.152/29\",\r\n \"13.77.170.155/32\",\r\n \"13.78.17.188/32\",\r\n + \ \"13.78.70.7/32\",\r\n \"13.78.185.44/32\",\r\n \"13.78.187.168/32\",\r\n + \ \"13.83.68.180/32\",\r\n \"13.84.42.205/32\",\r\n \"13.86.178.10/32\",\r\n + \ \"13.86.184.142/32\",\r\n \"13.86.219.128/27\",\r\n \"13.86.219.160/29\",\r\n + \ \"13.87.216.38/32\",\r\n \"13.88.14.63/32\",\r\n \"13.88.26.200/32\",\r\n + \ \"13.91.58.176/32\",\r\n \"13.91.138.229/32\",\r\n \"13.92.179.108/32\",\r\n + \ \"13.93.122.1/32\",\r\n \"13.94.26.39/32\",\r\n \"20.21.37.64/27\",\r\n + \ \"20.21.37.96/28\",\r\n \"20.21.39.0/26\",\r\n \"20.21.39.232/29\",\r\n + \ \"20.36.120.224/27\",\r\n \"20.36.121.192/27\",\r\n \"20.36.121.224/28\",\r\n + \ \"20.36.125.128/26\",\r\n \"20.37.64.224/27\",\r\n \"20.37.65.192/27\",\r\n + \ \"20.37.65.224/28\",\r\n \"20.37.68.36/30\",\r\n \"20.37.70.128/26\",\r\n + \ \"20.37.70.224/27\",\r\n \"20.37.71.208/28\",\r\n \"20.37.76.200/30\",\r\n + \ \"20.37.156.204/30\",\r\n \"20.37.157.96/27\",\r\n \"20.37.195.112/28\",\r\n + \ \"20.37.195.192/27\",\r\n \"20.37.196.160/27\",\r\n \"20.37.224.224/27\",\r\n + \ \"20.37.225.192/27\",\r\n \"20.37.225.224/28\",\r\n \"20.37.229.192/26\",\r\n + \ \"20.38.84.108/30\",\r\n \"20.38.85.160/27\",\r\n \"20.38.87.128/27\",\r\n + \ \"20.38.87.160/28\",\r\n \"20.38.136.240/28\",\r\n \"20.38.137.128/27\",\r\n + \ \"20.38.137.224/27\",\r\n \"20.38.141.12/30\",\r\n \"20.38.142.128/26\",\r\n + \ \"20.38.142.224/27\",\r\n \"20.38.143.240/28\",\r\n \"20.39.11.112/28\",\r\n + \ \"20.39.12.0/27\",\r\n \"20.39.12.96/27\",\r\n \"20.39.15.56/31\",\r\n + \ \"20.39.15.60/30\",\r\n \"20.40.24.42/32\",\r\n \"20.40.164.245/32\",\r\n + \ \"20.40.170.73/32\",\r\n \"20.40.187.210/32\",\r\n \"20.40.188.109/32\",\r\n + \ \"20.40.190.135/32\",\r\n \"20.40.190.225/32\",\r\n \"20.40.200.64/27\",\r\n + \ \"20.40.200.96/28\",\r\n \"20.40.207.152/29\",\r\n \"20.40.224.32/28\",\r\n + \ \"20.40.224.48/30\",\r\n \"20.40.224.56/29\",\r\n \"20.40.225.64/26\",\r\n + \ \"20.40.225.192/26\",\r\n \"20.40.229.64/28\",\r\n \"20.41.5.160/27\",\r\n + \ \"20.41.65.192/27\",\r\n \"20.41.66.160/27\",\r\n \"20.41.66.192/28\",\r\n + \ \"20.41.69.40/29\",\r\n \"20.41.69.56/30\",\r\n \"20.41.193.176/28\",\r\n + \ \"20.41.193.192/27\",\r\n \"20.41.195.160/27\",\r\n \"20.41.208.0/30\",\r\n + \ \"20.42.4.204/30\",\r\n \"20.42.6.144/28\",\r\n \"20.42.6.160/27\",\r\n + \ \"20.42.7.128/27\",\r\n \"20.42.131.240/28\",\r\n \"20.42.227.144/28\",\r\n + \ \"20.42.227.160/27\",\r\n \"20.42.228.128/27\",\r\n \"20.43.42.16/28\",\r\n + \ \"20.43.42.32/27\",\r\n \"20.43.43.0/27\",\r\n \"20.43.45.232/29\",\r\n + \ \"20.43.45.244/30\",\r\n \"20.43.47.0/26\",\r\n \"20.43.47.128/27\",\r\n + \ \"20.43.66.16/28\",\r\n \"20.43.66.32/27\",\r\n \"20.43.67.0/27\",\r\n + \ \"20.43.121.0/29\",\r\n \"20.43.121.32/29\",\r\n \"20.43.131.48/28\",\r\n + \ \"20.43.132.0/27\",\r\n \"20.43.132.96/27\",\r\n \"20.44.8.160/29\",\r\n + \ \"20.44.8.192/29\",\r\n \"20.44.17.16/29\",\r\n \"20.44.17.48/29\",\r\n + \ \"20.44.27.120/29\",\r\n \"20.44.27.216/29\",\r\n \"20.45.67.213/32\",\r\n + \ \"20.45.112.224/27\",\r\n \"20.45.113.192/27\",\r\n \"20.45.113.224/28\",\r\n + \ \"20.45.116.128/26\",\r\n \"20.45.116.240/28\",\r\n \"20.45.192.126/31\",\r\n + \ \"20.45.195.128/27\",\r\n \"20.45.195.224/27\",\r\n \"20.45.196.0/28\",\r\n + \ \"20.45.198.88/29\",\r\n \"20.45.199.36/30\",\r\n \"20.45.232.21/32\",\r\n + \ \"20.46.10.128/26\",\r\n \"20.46.10.192/27\",\r\n \"20.46.11.224/28\",\r\n + \ \"20.47.154.170/32\",\r\n \"20.48.192.64/29\",\r\n \"20.48.192.80/30\",\r\n + \ \"20.48.193.64/26\",\r\n \"20.48.193.192/27\",\r\n \"20.48.196.240/28\",\r\n + \ \"20.49.96.128/27\",\r\n \"20.49.96.160/28\",\r\n \"20.49.102.56/29\",\r\n + \ \"20.49.102.192/28\",\r\n \"20.49.102.208/30\",\r\n \"20.49.102.216/29\",\r\n + \ \"20.49.102.224/30\",\r\n \"20.49.103.128/26\",\r\n \"20.49.114.160/29\",\r\n + \ \"20.49.114.176/29\",\r\n \"20.49.114.184/30\",\r\n \"20.49.114.224/27\",\r\n + \ \"20.49.115.192/26\",\r\n \"20.49.118.64/27\",\r\n \"20.49.119.208/28\",\r\n + \ \"20.49.126.136/29\",\r\n \"20.49.126.144/29\",\r\n \"20.49.126.152/30\",\r\n + \ \"20.49.126.224/27\",\r\n \"20.50.1.16/28\",\r\n \"20.50.68.126/31\",\r\n + \ \"20.51.8.128/26\",\r\n \"20.51.8.224/27\",\r\n \"20.51.12.192/27\",\r\n + \ \"20.51.12.224/28\",\r\n \"20.51.16.192/26\",\r\n \"20.51.17.32/27\",\r\n + \ \"20.51.20.112/28\",\r\n \"20.52.64.16/29\",\r\n \"20.52.72.48/29\",\r\n + \ \"20.52.88.128/28\",\r\n \"20.52.135.226/32\",\r\n \"20.53.41.32/29\",\r\n + \ \"20.53.41.40/30\",\r\n \"20.53.41.48/28\",\r\n \"20.53.44.0/30\",\r\n + \ \"20.53.44.128/26\",\r\n \"20.53.44.192/27\",\r\n \"20.53.47.80/28\",\r\n + \ \"20.53.48.176/28\",\r\n \"20.53.56.112/28\",\r\n \"20.58.66.64/27\",\r\n + \ \"20.58.67.32/28\",\r\n \"20.61.96.168/29\",\r\n \"20.61.96.176/29\",\r\n + \ \"20.61.96.188/30\",\r\n \"20.61.97.64/27\",\r\n \"20.61.98.64/31\",\r\n + \ \"20.61.98.192/26\",\r\n \"20.61.99.32/27\",\r\n \"20.61.103.80/28\",\r\n + \ \"20.62.58.0/26\",\r\n \"20.62.59.96/28\",\r\n \"20.62.128.144/30\",\r\n + \ \"20.62.129.64/26\",\r\n \"20.62.129.160/27\",\r\n \"20.62.134.80/28\",\r\n + \ \"20.65.130.0/26\",\r\n \"20.65.130.128/26\",\r\n \"20.65.133.96/28\",\r\n + \ \"20.66.2.64/26\",\r\n \"20.66.2.160/27\",\r\n \"20.66.4.240/28\",\r\n + \ \"20.69.0.240/28\",\r\n \"20.72.20.64/27\",\r\n \"20.72.20.128/26\",\r\n + \ \"20.72.21.8/29\",\r\n \"20.99.11.16/28\",\r\n \"20.99.11.104/29\",\r\n + \ \"20.150.161.160/27\",\r\n \"20.150.164.128/27\",\r\n \"20.150.164.160/28\",\r\n + \ \"20.150.167.64/26\",\r\n \"20.150.174.136/29\",\r\n \"20.150.241.80/29\",\r\n + \ \"20.150.244.48/28\",\r\n \"20.150.244.128/27\",\r\n \"20.184.240.78/32\",\r\n + \ \"20.184.241.66/32\",\r\n \"20.184.241.238/32\",\r\n \"20.184.242.113/32\",\r\n + \ \"20.184.242.115/32\",\r\n \"20.184.242.189/32\",\r\n \"20.185.105.28/32\",\r\n + \ \"20.187.195.152/29\",\r\n \"20.187.196.192/30\",\r\n \"20.187.197.64/26\",\r\n + \ \"20.187.197.160/27\",\r\n \"20.189.108.64/27\",\r\n \"20.189.109.32/27\",\r\n + \ \"20.189.109.64/28\",\r\n \"20.189.111.200/30\",\r\n \"20.189.111.208/28\",\r\n + \ \"20.189.225.0/26\",\r\n \"20.189.225.96/27\",\r\n \"20.189.228.144/28\",\r\n + \ \"20.191.160.8/29\",\r\n \"20.191.160.20/30\",\r\n \"20.191.160.96/28\",\r\n + \ \"20.191.160.112/30\",\r\n \"20.191.161.128/26\",\r\n \"20.191.161.224/27\",\r\n + \ \"20.191.166.96/28\",\r\n \"20.192.44.96/28\",\r\n \"20.192.48.192/28\",\r\n + \ \"20.192.50.80/28\",\r\n \"20.192.50.208/29\",\r\n \"20.192.80.32/28\",\r\n + \ \"20.192.161.144/28\",\r\n \"20.192.161.160/27\",\r\n \"20.192.164.128/27\",\r\n + \ \"20.192.167.64/26\",\r\n \"20.192.184.84/30\",\r\n \"20.192.225.208/28\",\r\n + \ \"20.192.225.224/27\",\r\n \"20.192.228.192/27\",\r\n \"20.192.231.128/26\",\r\n + \ \"20.193.194.0/28\",\r\n \"20.193.194.48/29\",\r\n \"20.193.194.64/28\",\r\n + \ \"20.194.72.64/26\",\r\n \"20.194.72.192/27\",\r\n \"20.194.74.64/28\",\r\n + \ \"20.195.65.240/29\",\r\n \"20.195.72.240/28\",\r\n \"20.195.146.80/28\",\r\n + \ \"23.96.13.121/32\",\r\n \"23.96.229.148/32\",\r\n \"23.98.107.28/30\",\r\n + \ \"23.98.107.200/29\",\r\n \"23.98.107.208/28\",\r\n \"23.98.108.36/30\",\r\n + \ \"23.98.108.40/31\",\r\n \"23.98.108.192/26\",\r\n \"23.98.109.32/29\",\r\n + \ \"23.100.0.32/32\",\r\n \"23.100.57.171/32\",\r\n \"23.100.59.49/32\",\r\n + \ \"40.64.128.192/27\",\r\n \"40.64.134.140/30\",\r\n \"40.64.134.168/29\",\r\n + \ \"40.64.134.176/28\",\r\n \"40.64.135.80/29\",\r\n \"40.67.48.224/27\",\r\n + \ \"40.67.49.192/27\",\r\n \"40.67.49.224/28\",\r\n \"40.67.52.128/26\",\r\n + \ \"40.67.53.160/28\",\r\n \"40.69.73.194/32\",\r\n \"40.69.104.32/30\",\r\n + \ \"40.69.111.36/30\",\r\n \"40.70.47.165/32\",\r\n \"40.70.241.203/32\",\r\n + \ \"40.74.30.108/30\",\r\n \"40.74.31.64/26\",\r\n \"40.74.64.203/32\",\r\n + \ \"40.78.20.224/32\",\r\n \"40.78.204.0/29\",\r\n \"40.78.204.32/29\",\r\n + \ \"40.79.132.48/29\",\r\n \"40.79.132.80/29\",\r\n \"40.79.156.64/27\",\r\n + \ \"40.79.176.32/30\",\r\n \"40.79.187.168/29\",\r\n \"40.79.187.200/29\",\r\n + \ \"40.80.57.208/28\",\r\n \"40.80.57.224/27\",\r\n \"40.80.58.192/27\",\r\n + \ \"40.80.63.152/30\",\r\n \"40.80.63.224/28\",\r\n \"40.80.63.240/30\",\r\n + \ \"40.80.169.192/27\",\r\n \"40.80.170.160/27\",\r\n \"40.80.170.192/28\",\r\n + \ \"40.80.172.28/30\",\r\n \"40.80.176.0/28\",\r\n \"40.80.188.112/28\",\r\n + \ \"40.80.190.128/27\",\r\n \"40.80.190.224/27\",\r\n \"40.82.253.200/30\",\r\n + \ \"40.82.253.208/28\",\r\n \"40.82.255.0/26\",\r\n \"40.82.255.96/27\",\r\n + \ \"40.85.230.100/32\",\r\n \"40.86.227.247/32\",\r\n \"40.87.48.184/32\",\r\n + \ \"40.88.22.25/32\",\r\n \"40.89.17.240/28\",\r\n \"40.89.18.128/27\",\r\n + \ \"40.89.18.224/27\",\r\n \"40.89.23.36/30\",\r\n \"40.89.133.209/32\",\r\n + \ \"40.89.134.214/32\",\r\n \"40.112.254.71/32\",\r\n \"40.113.124.208/32\",\r\n + \ \"40.113.226.173/32\",\r\n \"40.115.248.103/32\",\r\n \"40.117.154.42/32\",\r\n + \ \"40.117.232.90/32\",\r\n \"40.119.11.216/29\",\r\n \"40.120.8.48/30\",\r\n + \ \"40.121.217.232/32\",\r\n \"40.122.42.111/32\",\r\n \"40.123.205.29/32\",\r\n + \ \"40.123.210.248/32\",\r\n \"40.123.214.182/32\",\r\n \"40.123.214.251/32\",\r\n + \ \"40.123.218.49/32\",\r\n \"40.127.76.4/32\",\r\n \"40.127.76.10/32\",\r\n + \ \"40.127.165.113/32\",\r\n \"51.11.97.80/29\",\r\n \"51.12.17.32/28\",\r\n + \ \"51.12.17.136/29\",\r\n \"51.12.17.144/28\",\r\n \"51.12.25.32/28\",\r\n + \ \"51.12.25.208/29\",\r\n \"51.12.41.48/28\",\r\n \"51.12.41.128/27\",\r\n + \ \"51.12.41.224/27\",\r\n \"51.12.43.192/26\",\r\n \"51.12.46.240/28\",\r\n + \ \"51.12.193.48/28\",\r\n \"51.12.193.128/27\",\r\n \"51.12.193.224/27\",\r\n + \ \"51.12.195.128/26\",\r\n \"51.13.1.0/29\",\r\n \"51.13.128.72/29\",\r\n + \ \"51.13.136.64/26\",\r\n \"51.13.137.192/28\",\r\n \"51.13.137.224/27\",\r\n + \ \"51.13.144.174/32\",\r\n \"51.103.144.46/32\",\r\n \"51.104.25.240/28\",\r\n + \ \"51.104.27.64/27\",\r\n \"51.104.28.32/27\",\r\n \"51.104.31.160/29\",\r\n + \ \"51.104.31.168/30\",\r\n \"51.104.31.176/28\",\r\n \"51.105.67.176/29\",\r\n + \ \"51.105.67.208/29\",\r\n \"51.105.80.224/27\",\r\n \"51.105.81.192/27\",\r\n + \ \"51.105.81.224/28\",\r\n \"51.105.89.128/27\",\r\n \"51.105.89.224/27\",\r\n + \ \"51.105.90.0/28\",\r\n \"51.105.92.52/30\",\r\n \"51.107.48.240/28\",\r\n + \ \"51.107.49.128/27\",\r\n \"51.107.49.224/27\",\r\n \"51.107.52.216/29\",\r\n + \ \"51.107.53.36/30\",\r\n \"51.107.53.40/29\",\r\n \"51.107.84.104/32\",\r\n + \ \"51.107.85.61/32\",\r\n \"51.107.128.24/29\",\r\n \"51.107.144.224/27\",\r\n + \ \"51.107.145.192/27\",\r\n \"51.107.145.224/28\",\r\n \"51.107.148.20/30\",\r\n + \ \"51.107.148.64/28\",\r\n \"51.107.192.72/29\",\r\n \"51.107.224.189/32\",\r\n + \ \"51.107.224.209/32\",\r\n \"51.107.241.0/26\",\r\n \"51.107.241.128/27\",\r\n + \ \"51.107.242.224/28\",\r\n \"51.107.249.0/26\",\r\n \"51.107.249.128/27\",\r\n + \ \"51.107.250.240/28\",\r\n \"51.116.48.144/28\",\r\n \"51.116.48.160/27\",\r\n + \ \"51.116.49.0/27\",\r\n \"51.116.51.192/26\",\r\n \"51.116.54.176/28\",\r\n + \ \"51.116.55.64/28\",\r\n \"51.116.144.144/28\",\r\n \"51.116.144.160/27\",\r\n + \ \"51.116.145.0/27\",\r\n \"51.116.148.128/26\",\r\n \"51.116.149.208/28\",\r\n + \ \"51.116.211.6/32\",\r\n \"51.120.40.240/28\",\r\n \"51.120.41.128/27\",\r\n + \ \"51.120.41.224/27\",\r\n \"51.120.78.154/32\",\r\n \"51.120.109.192/29\",\r\n + \ \"51.120.224.224/27\",\r\n \"51.120.225.192/27\",\r\n \"51.120.225.224/28\",\r\n + \ \"51.120.232.64/26\",\r\n \"51.120.233.144/28\",\r\n \"51.120.233.160/27\",\r\n + \ \"51.120.237.0/29\",\r\n \"51.124.95.46/32\",\r\n \"51.124.140.143/32\",\r\n + \ \"51.137.162.128/27\",\r\n \"51.137.162.224/27\",\r\n \"51.137.163.0/28\",\r\n + \ \"51.137.166.28/30\",\r\n \"51.137.166.44/30\",\r\n \"51.137.166.48/28\",\r\n + \ \"51.137.167.192/26\",\r\n \"51.138.40.194/32\",\r\n \"51.138.41.75/32\",\r\n + \ \"51.138.160.4/30\",\r\n \"51.138.210.144/28\",\r\n \"51.140.5.56/32\",\r\n + \ \"51.140.105.165/32\",\r\n \"51.140.202.0/32\",\r\n \"51.143.192.224/27\",\r\n + \ \"51.143.193.192/27\",\r\n \"51.143.193.224/28\",\r\n \"51.143.208.128/30\",\r\n + \ \"51.143.209.0/26\",\r\n \"51.143.209.64/27\",\r\n \"51.143.212.160/28\",\r\n + \ \"51.144.83.210/32\",\r\n \"52.136.48.240/28\",\r\n \"52.136.49.128/27\",\r\n + \ \"52.136.49.224/27\",\r\n \"52.136.53.0/26\",\r\n \"52.136.184.128/26\",\r\n + \ \"52.136.184.192/27\",\r\n \"52.136.185.160/28\",\r\n \"52.138.41.171/32\",\r\n + \ \"52.138.92.172/30\",\r\n \"52.139.106.0/26\",\r\n \"52.139.106.128/27\",\r\n + \ \"52.139.107.192/28\",\r\n \"52.140.105.192/27\",\r\n \"52.140.106.160/27\",\r\n + \ \"52.140.106.192/28\",\r\n \"52.140.110.96/29\",\r\n \"52.140.110.104/30\",\r\n + \ \"52.140.110.112/28\",\r\n \"52.140.110.160/30\",\r\n \"52.140.111.128/26\",\r\n + \ \"52.140.111.224/27\",\r\n \"52.142.81.236/32\",\r\n \"52.142.83.87/32\",\r\n + \ \"52.142.84.66/32\",\r\n \"52.142.85.51/32\",\r\n \"52.143.91.192/28\",\r\n + \ \"52.146.79.144/28\",\r\n \"52.146.79.224/27\",\r\n \"52.146.131.32/28\",\r\n + \ \"52.146.131.48/30\",\r\n \"52.146.131.96/27\",\r\n \"52.146.132.128/26\",\r\n + \ \"52.146.133.0/27\",\r\n \"52.146.137.16/28\",\r\n \"52.147.43.145/32\",\r\n + \ \"52.147.44.12/32\",\r\n \"52.147.97.4/30\",\r\n \"52.147.112.0/26\",\r\n + \ \"52.147.112.64/27\",\r\n \"52.147.112.208/28\",\r\n \"52.149.31.64/28\",\r\n + \ \"52.150.139.192/27\",\r\n \"52.150.140.160/27\",\r\n \"52.150.140.192/28\",\r\n + \ \"52.150.154.200/29\",\r\n \"52.150.154.208/28\",\r\n \"52.150.156.32/30\",\r\n + \ \"52.150.156.40/30\",\r\n \"52.150.157.64/26\",\r\n \"52.150.157.128/27\",\r\n + \ \"52.151.39.177/32\",\r\n \"52.152.207.160/28\",\r\n \"52.152.207.192/28\",\r\n + \ \"52.156.93.240/28\",\r\n \"52.156.103.64/27\",\r\n \"52.156.103.96/28\",\r\n + \ \"52.161.16.73/32\",\r\n \"52.162.110.248/29\",\r\n \"52.162.111.24/29\",\r\n + \ \"52.163.56.146/32\",\r\n \"52.168.112.0/26\",\r\n \"52.171.134.140/32\",\r\n + \ \"52.172.112.0/28\",\r\n \"52.172.112.16/29\",\r\n \"52.172.112.192/26\",\r\n + \ \"52.172.113.32/27\",\r\n \"52.172.116.16/28\",\r\n \"52.172.187.21/32\",\r\n + \ \"52.173.240.242/32\",\r\n \"52.174.60.141/32\",\r\n \"52.174.146.221/32\",\r\n + \ \"52.175.18.186/32\",\r\n \"52.175.35.166/32\",\r\n \"52.179.13.227/32\",\r\n + \ \"52.179.14.109/32\",\r\n \"52.179.113.96/27\",\r\n \"52.179.113.128/28\",\r\n + \ \"52.180.162.194/32\",\r\n \"52.180.166.172/32\",\r\n \"52.180.178.146/32\",\r\n + \ \"52.180.179.119/32\",\r\n \"52.183.33.203/32\",\r\n \"52.186.33.48/28\",\r\n + \ \"52.186.91.216/32\",\r\n \"52.187.20.181/32\",\r\n \"52.187.39.99/32\",\r\n + \ \"52.190.33.56/32\",\r\n \"52.190.33.61/32\",\r\n \"52.190.33.154/32\",\r\n + \ \"52.191.160.229/32\",\r\n \"52.191.173.81/32\",\r\n \"52.228.83.128/27\",\r\n + \ \"52.228.83.224/27\",\r\n \"52.228.84.0/28\",\r\n \"52.229.16.14/32\",\r\n + \ \"52.231.74.63/32\",\r\n \"52.231.79.142/32\",\r\n \"52.231.148.200/30\",\r\n + \ \"52.231.159.35/32\",\r\n \"52.233.163.218/32\",\r\n \"52.237.137.4/32\",\r\n + \ \"52.254.75.76/32\",\r\n \"52.255.83.208/28\",\r\n \"52.255.84.176/28\",\r\n + \ \"52.255.84.192/28\",\r\n \"52.255.124.16/28\",\r\n \"52.255.124.80/28\",\r\n + \ \"52.255.124.96/28\",\r\n \"65.52.205.19/32\",\r\n \"65.52.252.208/28\",\r\n + \ \"102.37.81.64/28\",\r\n \"102.37.160.144/28\",\r\n \"102.133.28.72/29\",\r\n + \ \"102.133.28.104/29\",\r\n \"102.133.56.144/28\",\r\n \"102.133.56.224/27\",\r\n + \ \"102.133.61.192/26\",\r\n \"102.133.75.174/32\",\r\n \"102.133.123.248/29\",\r\n + \ \"102.133.124.24/29\",\r\n \"102.133.124.88/29\",\r\n \"102.133.124.96/29\",\r\n + \ \"102.133.156.128/29\",\r\n \"102.133.161.242/32\",\r\n + \ \"102.133.162.109/32\",\r\n \"102.133.162.196/32\",\r\n + \ \"102.133.162.221/32\",\r\n \"102.133.163.185/32\",\r\n + \ \"102.133.217.80/28\",\r\n \"102.133.217.96/27\",\r\n \"102.133.218.0/27\",\r\n + \ \"102.133.220.192/30\",\r\n \"102.133.221.64/26\",\r\n + \ \"102.133.221.128/27\",\r\n \"102.133.236.198/32\",\r\n + \ \"104.42.100.80/32\",\r\n \"104.42.194.173/32\",\r\n \"104.42.239.93/32\",\r\n + \ \"104.46.112.239/32\",\r\n \"104.46.176.164/30\",\r\n \"104.46.176.176/28\",\r\n + \ \"104.46.178.4/30\",\r\n \"104.46.178.192/26\",\r\n \"104.46.179.0/27\",\r\n + \ \"104.46.183.128/28\",\r\n \"104.46.239.137/32\",\r\n \"104.211.88.173/32\",\r\n + \ \"104.211.222.193/32\",\r\n \"104.214.49.162/32\",\r\n + \ \"104.214.233.86/32\",\r\n \"104.215.9.217/32\",\r\n \"137.117.70.195/32\",\r\n + \ \"137.135.45.32/32\",\r\n \"137.135.64.59/32\",\r\n \"168.61.158.107/32\",\r\n + \ \"168.61.165.229/32\",\r\n \"168.63.20.177/32\",\r\n \"191.232.39.30/32\",\r\n + \ \"191.232.162.204/32\",\r\n \"191.233.10.48/28\",\r\n \"191.233.10.64/27\",\r\n + \ \"191.233.10.128/27\",\r\n \"191.233.15.64/26\",\r\n \"191.233.205.72/29\",\r\n + \ \"191.233.205.104/29\",\r\n \"191.234.138.136/29\",\r\n + \ \"191.234.138.148/30\",\r\n \"191.234.139.192/26\",\r\n + \ \"191.234.142.32/27\",\r\n \"191.235.227.128/27\",\r\n + \ \"191.235.227.224/27\",\r\n \"191.235.228.0/28\",\r\n \"191.238.72.80/28\",\r\n + \ \"2603:1000:4::680/122\",\r\n \"2603:1000:104::180/122\",\r\n + \ \"2603:1000:104::380/122\",\r\n \"2603:1000:104:1::640/122\",\r\n + \ \"2603:1010:6::80/122\",\r\n \"2603:1010:6:1::640/122\",\r\n + \ \"2603:1010:101::680/122\",\r\n \"2603:1010:304::680/122\",\r\n + \ \"2603:1010:404::680/122\",\r\n \"2603:1020:5::80/122\",\r\n + \ \"2603:1020:5:1::640/122\",\r\n \"2603:1020:206::80/122\",\r\n + \ \"2603:1020:206:1::640/122\",\r\n \"2603:1020:305::680/122\",\r\n + \ \"2603:1020:405::680/122\",\r\n \"2603:1020:605::680/122\",\r\n + \ \"2603:1020:705::80/122\",\r\n \"2603:1020:705:1::640/122\",\r\n + \ \"2603:1020:805::80/122\",\r\n \"2603:1020:805:1::640/122\",\r\n + \ \"2603:1020:905::680/122\",\r\n \"2603:1020:a04::80/122\",\r\n + \ \"2603:1020:a04::698/125\",\r\n \"2603:1020:a04:1::640/122\",\r\n + \ \"2603:1020:a04:2::680/121\",\r\n \"2603:1020:b04::680/122\",\r\n + \ \"2603:1020:c04::80/122\",\r\n \"2603:1020:c04:1::640/122\",\r\n + \ \"2603:1020:d04::680/122\",\r\n \"2603:1020:e04::80/122\",\r\n + \ \"2603:1020:e04::358/125\",\r\n \"2603:1020:e04:1::640/122\",\r\n + \ \"2603:1020:e04:2::/122\",\r\n \"2603:1020:e04:3::280/122\",\r\n + \ \"2603:1020:f04::680/122\",\r\n \"2603:1020:f04:2::/122\",\r\n + \ \"2603:1020:1004::640/122\",\r\n \"2603:1020:1004:1::80/122\",\r\n + \ \"2603:1020:1004:1::1f0/125\",\r\n \"2603:1020:1004:1::300/122\",\r\n + \ \"2603:1020:1004:1::740/122\",\r\n \"2603:1020:1104::700/121\",\r\n + \ \"2603:1020:1104:1::150/125\",\r\n \"2603:1020:1104:1::480/122\",\r\n + \ \"2603:1030:f:1::2b8/125\",\r\n \"2603:1030:f:1::680/122\",\r\n + \ \"2603:1030:f:2::600/121\",\r\n \"2603:1030:10::80/122\",\r\n + \ \"2603:1030:10:1::640/122\",\r\n \"2603:1030:104::80/122\",\r\n + \ \"2603:1030:104::6c8/125\",\r\n \"2603:1030:104:1::640/122\",\r\n + \ \"2603:1030:107::730/125\",\r\n \"2603:1030:107::740/122\",\r\n + \ \"2603:1030:107::780/122\",\r\n \"2603:1030:210::80/122\",\r\n + \ \"2603:1030:210:1::640/122\",\r\n \"2603:1030:40b:1::640/122\",\r\n + \ \"2603:1030:40c::80/122\",\r\n \"2603:1030:40c:1::640/122\",\r\n + \ \"2603:1030:504::80/122\",\r\n \"2603:1030:504::1f0/125\",\r\n + \ \"2603:1030:504::300/122\",\r\n \"2603:1030:504:1::640/122\",\r\n + \ \"2603:1030:504:2::200/122\",\r\n \"2603:1030:608::680/122\",\r\n + \ \"2603:1030:608:1::2b8/125\",\r\n \"2603:1030:807::80/122\",\r\n + \ \"2603:1030:807:1::640/122\",\r\n \"2603:1030:a07::680/122\",\r\n + \ \"2603:1030:b04::680/122\",\r\n \"2603:1030:c06:1::640/122\",\r\n + \ \"2603:1030:f05::80/122\",\r\n \"2603:1030:f05:1::640/122\",\r\n + \ \"2603:1030:1005::680/122\",\r\n \"2603:1040:5::180/122\",\r\n + \ \"2603:1040:5:1::640/122\",\r\n \"2603:1040:207::680/122\",\r\n + \ \"2603:1040:207:1::468/125\",\r\n \"2603:1040:207:2::40/122\",\r\n + \ \"2603:1040:207:2::200/122\",\r\n \"2603:1040:407::80/122\",\r\n + \ \"2603:1040:407:1::640/122\",\r\n \"2603:1040:606::680/122\",\r\n + \ \"2603:1040:806::680/122\",\r\n \"2603:1040:904::80/122\",\r\n + \ \"2603:1040:904:1::640/122\",\r\n \"2603:1040:a06::180/122\",\r\n + \ \"2603:1040:a06::7c8/125\",\r\n \"2603:1040:a06:1::640/122\",\r\n + \ \"2603:1040:a06:2::380/121\",\r\n \"2603:1040:b04::680/122\",\r\n + \ \"2603:1040:c06::680/122\",\r\n \"2603:1040:d04::640/122\",\r\n + \ \"2603:1040:d04:1::80/122\",\r\n \"2603:1040:d04:1::1f0/125\",\r\n + \ \"2603:1040:d04:1::300/122\",\r\n \"2603:1040:d04:1::740/122\",\r\n + \ \"2603:1040:f05::80/122\",\r\n \"2603:1040:f05::358/125\",\r\n + \ \"2603:1040:f05:1::640/122\",\r\n \"2603:1040:f05:2::80/121\",\r\n + \ \"2603:1040:1002:1::478/125\",\r\n \"2603:1040:1002:1::480/121\",\r\n + \ \"2603:1040:1002:1::500/122\",\r\n \"2603:1040:1104::700/121\",\r\n + \ \"2603:1040:1104:1::150/125\",\r\n \"2603:1040:1104:1::500/122\",\r\n + \ \"2603:1050:6::80/122\",\r\n \"2603:1050:6:1::640/122\",\r\n + \ \"2603:1050:403::640/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory\",\r\n \"id\": \"DataFactory\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"13.66.143.128/28\",\r\n \"13.67.10.208/28\",\r\n + \ \"13.69.67.192/28\",\r\n \"13.69.107.112/28\",\r\n \"13.69.112.128/28\",\r\n + \ \"13.69.230.96/28\",\r\n \"13.70.74.144/28\",\r\n \"13.71.175.80/28\",\r\n + \ \"13.71.199.0/28\",\r\n \"13.73.244.32/28\",\r\n \"13.73.253.96/29\",\r\n + \ \"13.74.108.224/28\",\r\n \"13.75.39.112/28\",\r\n \"13.77.53.160/28\",\r\n + \ \"13.78.109.192/28\",\r\n \"13.86.219.208/28\",\r\n \"13.89.174.192/28\",\r\n + \ \"13.104.248.64/27\",\r\n \"13.104.252.208/28\",\r\n \"13.104.252.224/28\",\r\n + \ \"13.104.253.48/28\",\r\n \"13.104.254.128/28\",\r\n \"20.21.46.64/28\",\r\n + \ \"20.21.48.0/23\",\r\n \"20.21.67.208/28\",\r\n \"20.21.75.208/28\",\r\n + \ \"20.36.117.208/28\",\r\n \"20.36.124.32/28\",\r\n \"20.36.124.128/25\",\r\n + \ \"20.36.125.0/26\",\r\n \"20.37.68.144/28\",\r\n \"20.37.69.128/25\",\r\n + \ \"20.37.70.0/26\",\r\n \"20.37.154.0/23\",\r\n \"20.37.156.0/26\",\r\n + \ \"20.37.193.0/25\",\r\n \"20.37.193.128/26\",\r\n \"20.37.198.224/29\",\r\n + \ \"20.37.228.16/28\",\r\n \"20.37.228.192/26\",\r\n \"20.37.229.0/25\",\r\n + \ \"20.38.80.192/26\",\r\n \"20.38.82.0/23\",\r\n \"20.38.141.16/28\",\r\n + \ \"20.38.141.128/25\",\r\n \"20.38.142.0/26\",\r\n \"20.38.147.224/28\",\r\n + \ \"20.38.152.0/28\",\r\n \"20.39.8.96/27\",\r\n \"20.39.8.128/26\",\r\n + \ \"20.39.15.0/29\",\r\n \"20.40.206.224/29\",\r\n \"20.41.2.0/23\",\r\n + \ \"20.41.4.0/26\",\r\n \"20.41.64.128/25\",\r\n \"20.41.65.0/26\",\r\n + \ \"20.41.69.8/29\",\r\n \"20.41.192.128/25\",\r\n \"20.41.193.0/26\",\r\n + \ \"20.41.197.112/29\",\r\n \"20.41.198.0/25\",\r\n \"20.41.198.128/26\",\r\n + \ \"20.42.2.0/23\",\r\n \"20.42.4.0/26\",\r\n \"20.42.64.0/28\",\r\n + \ \"20.42.129.64/26\",\r\n \"20.42.132.0/23\",\r\n \"20.42.225.0/25\",\r\n + \ \"20.42.225.128/26\",\r\n \"20.42.230.136/29\",\r\n \"20.43.40.128/25\",\r\n + \ \"20.43.41.0/26\",\r\n \"20.43.44.208/29\",\r\n \"20.43.64.128/25\",\r\n + \ \"20.43.65.0/26\",\r\n \"20.43.70.120/29\",\r\n \"20.43.121.48/28\",\r\n + \ \"20.43.128.128/25\",\r\n \"20.43.130.0/26\",\r\n \"20.44.10.64/28\",\r\n + \ \"20.44.17.80/28\",\r\n \"20.44.27.240/28\",\r\n \"20.45.123.160/28\",\r\n + \ \"20.45.208.16/28\",\r\n \"20.48.201.0/26\",\r\n \"20.49.83.224/28\",\r\n + \ \"20.49.95.32/28\",\r\n \"20.49.102.16/29\",\r\n \"20.49.111.0/29\",\r\n + \ \"20.49.114.24/29\",\r\n \"20.49.118.128/25\",\r\n \"20.50.68.56/29\",\r\n + \ \"20.52.64.0/28\",\r\n \"20.52.93.128/26\",\r\n \"20.53.0.48/28\",\r\n + \ \"20.53.45.0/24\",\r\n \"20.53.46.0/26\",\r\n \"20.58.71.0/26\",\r\n + \ \"20.65.130.192/26\",\r\n \"20.65.131.0/24\",\r\n \"20.72.22.0/23\",\r\n + \ \"20.72.28.48/28\",\r\n \"20.90.129.128/25\",\r\n \"20.90.130.0/24\",\r\n + \ \"20.99.12.0/23\",\r\n \"20.100.0.192/26\",\r\n \"20.150.162.0/23\",\r\n + \ \"20.150.173.16/28\",\r\n \"20.150.181.112/28\",\r\n \"20.150.190.64/28\",\r\n + \ \"20.189.104.128/25\",\r\n \"20.189.106.0/26\",\r\n \"20.189.109.232/29\",\r\n + \ \"20.189.192.192/26\",\r\n \"20.191.164.0/24\",\r\n \"20.191.165.0/26\",\r\n + \ \"20.192.42.0/24\",\r\n \"20.192.43.0/26\",\r\n \"20.192.102.80/28\",\r\n + \ \"20.192.152.0/26\",\r\n \"20.192.162.0/23\",\r\n \"20.192.184.96/28\",\r\n + \ \"20.192.226.0/23\",\r\n \"20.192.238.96/28\",\r\n \"20.193.205.144/28\",\r\n + \ \"20.194.67.192/28\",\r\n \"20.194.78.0/23\",\r\n \"20.195.64.0/25\",\r\n + \ \"20.200.195.0/26\",\r\n \"20.205.64.0/23\",\r\n \"20.205.67.128/26\",\r\n + \ \"20.205.77.160/28\",\r\n \"20.205.77.224/27\",\r\n \"20.205.83.240/28\",\r\n + \ \"20.208.2.0/23\",\r\n \"20.208.19.208/28\",\r\n \"23.98.83.112/28\",\r\n + \ \"23.98.106.128/29\",\r\n \"23.98.109.64/26\",\r\n \"23.98.109.128/25\",\r\n + \ \"40.64.132.232/29\",\r\n \"40.69.108.160/28\",\r\n \"40.69.111.48/28\",\r\n + \ \"40.70.148.160/28\",\r\n \"40.71.14.32/28\",\r\n \"40.74.24.192/26\",\r\n + \ \"40.74.26.0/23\",\r\n \"40.74.149.64/28\",\r\n \"40.75.35.144/28\",\r\n + \ \"40.78.196.128/28\",\r\n \"40.78.229.96/28\",\r\n \"40.78.236.176/28\",\r\n + \ \"40.78.245.16/28\",\r\n \"40.78.251.192/28\",\r\n \"40.79.132.112/28\",\r\n + \ \"40.79.139.80/28\",\r\n \"40.79.146.240/28\",\r\n \"40.79.163.80/28\",\r\n + \ \"40.79.171.160/28\",\r\n \"40.79.187.208/28\",\r\n \"40.79.195.224/28\",\r\n + \ \"40.80.51.160/28\",\r\n \"40.80.56.128/25\",\r\n \"40.80.57.0/26\",\r\n + \ \"40.80.62.24/29\",\r\n \"40.80.168.128/25\",\r\n \"40.80.169.0/26\",\r\n + \ \"40.80.172.112/29\",\r\n \"40.80.176.96/28\",\r\n \"40.80.185.0/24\",\r\n + \ \"40.80.186.0/25\",\r\n \"40.82.249.64/26\",\r\n \"40.82.250.0/23\",\r\n + \ \"40.89.16.128/25\",\r\n \"40.89.17.0/26\",\r\n \"40.89.20.224/29\",\r\n + \ \"40.113.176.232/29\",\r\n \"40.119.9.0/25\",\r\n \"40.119.9.128/26\",\r\n + \ \"40.120.8.56/29\",\r\n \"40.120.64.112/28\",\r\n \"40.120.75.112/28\",\r\n + \ \"40.120.86.64/26\",\r\n \"40.122.0.16/28\",\r\n \"51.12.18.0/23\",\r\n + \ \"51.12.26.0/23\",\r\n \"51.12.101.176/28\",\r\n \"51.12.206.16/28\",\r\n + \ \"51.12.229.64/28\",\r\n \"51.12.237.64/28\",\r\n \"51.13.128.0/28\",\r\n + \ \"51.103.203.208/28\",\r\n \"51.104.9.32/28\",\r\n \"51.104.24.128/25\",\r\n + \ \"51.104.25.0/26\",\r\n \"51.104.29.216/29\",\r\n \"51.105.67.240/28\",\r\n + \ \"51.105.75.240/28\",\r\n \"51.105.92.176/28\",\r\n \"51.105.93.64/26\",\r\n + \ \"51.105.93.128/25\",\r\n \"51.107.51.40/29\",\r\n \"51.107.52.0/25\",\r\n + \ \"51.107.52.128/26\",\r\n \"51.107.128.0/28\",\r\n \"51.107.148.80/28\",\r\n + \ \"51.107.149.0/25\",\r\n \"51.107.149.128/26\",\r\n \"51.107.192.80/28\",\r\n + \ \"51.107.246.192/26\",\r\n \"51.116.147.32/28\",\r\n \"51.116.147.64/26\",\r\n + \ \"51.116.147.128/25\",\r\n \"51.116.245.112/28\",\r\n \"51.116.245.176/28\",\r\n + \ \"51.116.253.48/28\",\r\n \"51.116.253.144/28\",\r\n \"51.120.44.208/28\",\r\n + \ \"51.120.45.64/26\",\r\n \"51.120.45.128/25\",\r\n \"51.120.100.224/28\",\r\n + \ \"51.120.109.96/28\",\r\n \"51.120.213.32/28\",\r\n \"51.120.228.224/27\",\r\n + \ \"51.120.229.64/26\",\r\n \"51.120.229.128/25\",\r\n \"51.120.238.0/23\",\r\n + \ \"51.137.160.128/25\",\r\n \"51.137.161.0/26\",\r\n \"51.137.164.192/29\",\r\n + \ \"51.138.160.16/28\",\r\n \"51.138.215.128/26\",\r\n \"51.140.212.112/28\",\r\n + \ \"52.138.92.128/28\",\r\n \"52.138.229.32/28\",\r\n \"52.139.111.64/26\",\r\n + \ \"52.140.104.128/25\",\r\n \"52.140.105.0/26\",\r\n \"52.140.108.208/29\",\r\n + \ \"52.150.136.192/26\",\r\n \"52.150.137.128/25\",\r\n \"52.150.154.16/29\",\r\n + \ \"52.150.155.0/24\",\r\n \"52.150.157.160/29\",\r\n \"52.150.157.192/26\",\r\n + \ \"52.162.111.48/28\",\r\n \"52.167.107.224/28\",\r\n \"52.176.232.16/28\",\r\n + \ \"52.182.141.16/28\",\r\n \"52.228.80.128/25\",\r\n \"52.228.81.0/26\",\r\n + \ \"52.228.86.144/29\",\r\n \"52.231.20.64/28\",\r\n \"52.231.148.160/28\",\r\n + \ \"52.231.151.32/28\",\r\n \"52.236.187.112/28\",\r\n \"52.246.155.224/28\",\r\n + \ \"52.250.228.0/29\",\r\n \"102.37.64.96/28\",\r\n \"102.37.72.224/28\",\r\n + \ \"102.37.166.128/26\",\r\n \"102.133.60.48/28\",\r\n \"102.133.60.192/26\",\r\n + \ \"102.133.61.0/25\",\r\n \"102.133.124.104/29\",\r\n \"102.133.127.160/28\",\r\n + \ \"102.133.156.136/29\",\r\n \"102.133.216.128/25\",\r\n + \ \"102.133.217.0/26\",\r\n \"102.133.218.248/29\",\r\n \"102.133.251.184/29\",\r\n + \ \"102.133.253.48/28\",\r\n \"104.46.179.64/26\",\r\n \"104.46.182.0/24\",\r\n + \ \"191.233.12.0/23\",\r\n \"191.233.54.224/28\",\r\n \"191.233.205.160/28\",\r\n + \ \"191.234.137.32/29\",\r\n \"191.234.142.64/26\",\r\n \"191.234.143.0/24\",\r\n + \ \"191.234.149.0/28\",\r\n \"191.234.157.0/28\",\r\n \"191.235.224.128/25\",\r\n + \ \"191.235.225.0/26\",\r\n \"2603:1000:4::440/122\",\r\n + \ \"2603:1000:4::500/121\",\r\n \"2603:1000:4:402::330/124\",\r\n + \ \"2603:1000:104::/121\",\r\n \"2603:1000:104::80/122\",\r\n + \ \"2603:1000:104::1c0/122\",\r\n \"2603:1000:104::280/121\",\r\n + \ \"2603:1000:104:1::480/121\",\r\n \"2603:1000:104:1::500/122\",\r\n + \ \"2603:1000:104:1::700/121\",\r\n \"2603:1000:104:1::780/122\",\r\n + \ \"2603:1000:104:402::330/124\",\r\n \"2603:1000:104:802::210/124\",\r\n + \ \"2603:1000:104:c02::210/124\",\r\n \"2603:1010:6:1::480/121\",\r\n + \ \"2603:1010:6:1::500/122\",\r\n \"2603:1010:6:1::700/121\",\r\n + \ \"2603:1010:6:1::780/122\",\r\n \"2603:1010:6:402::330/124\",\r\n + \ \"2603:1010:6:802::210/124\",\r\n \"2603:1010:6:c02::210/124\",\r\n + \ \"2603:1010:101::440/122\",\r\n \"2603:1010:101::500/121\",\r\n + \ \"2603:1010:101:402::330/124\",\r\n \"2603:1010:304::440/122\",\r\n + \ \"2603:1010:304::500/121\",\r\n \"2603:1010:304:402::330/124\",\r\n + \ \"2603:1010:404::440/122\",\r\n \"2603:1010:404::500/121\",\r\n + \ \"2603:1010:404:402::330/124\",\r\n \"2603:1020:5:1::480/121\",\r\n + \ \"2603:1020:5:1::500/122\",\r\n \"2603:1020:5:1::700/121\",\r\n + \ \"2603:1020:5:1::780/122\",\r\n \"2603:1020:5:402::330/124\",\r\n + \ \"2603:1020:5:802::210/124\",\r\n \"2603:1020:5:c02::210/124\",\r\n + \ \"2603:1020:206:1::480/121\",\r\n \"2603:1020:206:1::500/122\",\r\n + \ \"2603:1020:206:1::700/121\",\r\n \"2603:1020:206:1::780/122\",\r\n + \ \"2603:1020:206:402::330/124\",\r\n \"2603:1020:206:802::210/124\",\r\n + \ \"2603:1020:206:c02::210/124\",\r\n \"2603:1020:305::440/122\",\r\n + \ \"2603:1020:305::500/121\",\r\n \"2603:1020:305:402::330/124\",\r\n + \ \"2603:1020:405::440/122\",\r\n \"2603:1020:405::500/121\",\r\n + \ \"2603:1020:405:402::330/124\",\r\n \"2603:1020:605::440/122\",\r\n + \ \"2603:1020:605::500/121\",\r\n \"2603:1020:605:402::330/124\",\r\n + \ \"2603:1020:705:1::480/121\",\r\n \"2603:1020:705:1::500/122\",\r\n + \ \"2603:1020:705:1::700/121\",\r\n \"2603:1020:705:1::780/122\",\r\n + \ \"2603:1020:705:402::330/124\",\r\n \"2603:1020:705:802::210/124\",\r\n + \ \"2603:1020:705:c02::210/124\",\r\n \"2603:1020:805:1::480/121\",\r\n + \ \"2603:1020:805:1::500/122\",\r\n \"2603:1020:805:1::700/121\",\r\n + \ \"2603:1020:805:1::780/122\",\r\n \"2603:1020:805:402::330/124\",\r\n + \ \"2603:1020:805:802::210/124\",\r\n \"2603:1020:805:c02::210/124\",\r\n + \ \"2603:1020:905::440/122\",\r\n \"2603:1020:905::500/121\",\r\n + \ \"2603:1020:905:402::330/124\",\r\n \"2603:1020:a04:1::480/121\",\r\n + \ \"2603:1020:a04:1::500/122\",\r\n \"2603:1020:a04:1::700/121\",\r\n + \ \"2603:1020:a04:1::780/122\",\r\n \"2603:1020:a04:402::330/124\",\r\n + \ \"2603:1020:a04:802::210/124\",\r\n \"2603:1020:a04:c02::210/124\",\r\n + \ \"2603:1020:b04::440/122\",\r\n \"2603:1020:b04::500/121\",\r\n + \ \"2603:1020:b04:402::330/124\",\r\n \"2603:1020:c04:1::480/121\",\r\n + \ \"2603:1020:c04:1::500/122\",\r\n \"2603:1020:c04:1::700/121\",\r\n + \ \"2603:1020:c04:1::780/122\",\r\n \"2603:1020:c04:402::330/124\",\r\n + \ \"2603:1020:c04:802::210/124\",\r\n \"2603:1020:c04:c02::210/124\",\r\n + \ \"2603:1020:d04::440/122\",\r\n \"2603:1020:d04::500/121\",\r\n + \ \"2603:1020:d04:402::330/124\",\r\n \"2603:1020:e04:1::480/121\",\r\n + \ \"2603:1020:e04:1::500/122\",\r\n \"2603:1020:e04:1::700/121\",\r\n + \ \"2603:1020:e04:1::780/122\",\r\n \"2603:1020:e04:402::330/124\",\r\n + \ \"2603:1020:e04:802::210/124\",\r\n \"2603:1020:e04:c02::210/124\",\r\n + \ \"2603:1020:f04::440/122\",\r\n \"2603:1020:f04::500/121\",\r\n + \ \"2603:1020:f04:402::330/124\",\r\n \"2603:1020:1004::480/121\",\r\n + \ \"2603:1020:1004::500/122\",\r\n \"2603:1020:1004::700/121\",\r\n + \ \"2603:1020:1004::780/122\",\r\n \"2603:1020:1004:400::240/124\",\r\n + \ \"2603:1020:1004:800::340/124\",\r\n \"2603:1020:1004:c02::380/124\",\r\n + \ \"2603:1020:1104::600/121\",\r\n \"2603:1020:1104:400::500/124\",\r\n + \ \"2603:1030:f:1::440/122\",\r\n \"2603:1030:f:1::500/121\",\r\n + \ \"2603:1030:f:400::b30/124\",\r\n \"2603:1030:10:1::480/121\",\r\n + \ \"2603:1030:10:1::500/122\",\r\n \"2603:1030:10:1::700/121\",\r\n + \ \"2603:1030:10:1::780/122\",\r\n \"2603:1030:10:402::330/124\",\r\n + \ \"2603:1030:10:802::210/124\",\r\n \"2603:1030:10:c02::210/124\",\r\n + \ \"2603:1030:104:1::480/121\",\r\n \"2603:1030:104:1::500/122\",\r\n + \ \"2603:1030:104:1::700/121\",\r\n \"2603:1030:104:1::780/122\",\r\n + \ \"2603:1030:104:402::330/124\",\r\n \"2603:1030:104:802::40/124\",\r\n + \ \"2603:1030:107::600/121\",\r\n \"2603:1030:107:400::380/124\",\r\n + \ \"2603:1030:210:1::480/121\",\r\n \"2603:1030:210:1::500/122\",\r\n + \ \"2603:1030:210:1::700/121\",\r\n \"2603:1030:210:1::780/122\",\r\n + \ \"2603:1030:210:402::330/124\",\r\n \"2603:1030:210:802::210/124\",\r\n + \ \"2603:1030:210:c02::210/124\",\r\n \"2603:1030:40b:1::480/121\",\r\n + \ \"2603:1030:40b:1::500/122\",\r\n \"2603:1030:40b:400::b30/124\",\r\n + \ \"2603:1030:40b:800::210/124\",\r\n \"2603:1030:40b:c00::210/124\",\r\n + \ \"2603:1030:40c:1::480/121\",\r\n \"2603:1030:40c:1::500/122\",\r\n + \ \"2603:1030:40c:1::700/121\",\r\n \"2603:1030:40c:1::780/122\",\r\n + \ \"2603:1030:40c:402::330/124\",\r\n \"2603:1030:40c:802::210/124\",\r\n + \ \"2603:1030:40c:c02::210/124\",\r\n \"2603:1030:504:1::480/121\",\r\n + \ \"2603:1030:504:1::500/122\",\r\n \"2603:1030:504:1::700/121\",\r\n + \ \"2603:1030:504:1::780/122\",\r\n \"2603:1030:504:402::240/124\",\r\n + \ \"2603:1030:504:802::340/124\",\r\n \"2603:1030:504:c02::380/124\",\r\n + \ \"2603:1030:608::440/122\",\r\n \"2603:1030:608::500/121\",\r\n + \ \"2603:1030:608:402::330/124\",\r\n \"2603:1030:807:1::480/121\",\r\n + \ \"2603:1030:807:1::500/122\",\r\n \"2603:1030:807:1::700/121\",\r\n + \ \"2603:1030:807:1::780/122\",\r\n \"2603:1030:807:402::330/124\",\r\n + \ \"2603:1030:807:802::210/124\",\r\n \"2603:1030:807:c02::210/124\",\r\n + \ \"2603:1030:a07::440/122\",\r\n \"2603:1030:a07::500/121\",\r\n + \ \"2603:1030:a07:402::9b0/124\",\r\n \"2603:1030:b04::440/122\",\r\n + \ \"2603:1030:b04::500/121\",\r\n \"2603:1030:b04:402::330/124\",\r\n + \ \"2603:1030:c06:1::480/121\",\r\n \"2603:1030:c06:1::500/122\",\r\n + \ \"2603:1030:c06:400::b30/124\",\r\n \"2603:1030:c06:802::210/124\",\r\n + \ \"2603:1030:c06:c02::210/124\",\r\n \"2603:1030:f05:1::480/121\",\r\n + \ \"2603:1030:f05:1::500/122\",\r\n \"2603:1030:f05:1::700/121\",\r\n + \ \"2603:1030:f05:1::780/122\",\r\n \"2603:1030:f05:402::330/124\",\r\n + \ \"2603:1030:f05:802::210/124\",\r\n \"2603:1030:f05:c02::210/124\",\r\n + \ \"2603:1030:1005::440/122\",\r\n \"2603:1030:1005::500/121\",\r\n + \ \"2603:1030:1005:402::330/124\",\r\n \"2603:1040:5::/121\",\r\n + \ \"2603:1040:5::80/122\",\r\n \"2603:1040:5:1::480/121\",\r\n + \ \"2603:1040:5:1::500/122\",\r\n \"2603:1040:5:1::700/121\",\r\n + \ \"2603:1040:5:1::780/122\",\r\n \"2603:1040:5:402::330/124\",\r\n + \ \"2603:1040:5:802::210/124\",\r\n \"2603:1040:5:c02::210/124\",\r\n + \ \"2603:1040:207::440/122\",\r\n \"2603:1040:207::500/121\",\r\n + \ \"2603:1040:207:402::330/124\",\r\n \"2603:1040:207:800::70/124\",\r\n + \ \"2603:1040:207:c00::70/124\",\r\n \"2603:1040:407:1::480/121\",\r\n + \ \"2603:1040:407:1::500/122\",\r\n \"2603:1040:407:1::700/121\",\r\n + \ \"2603:1040:407:1::780/122\",\r\n \"2603:1040:407:402::330/124\",\r\n + \ \"2603:1040:407:802::210/124\",\r\n \"2603:1040:407:c02::210/124\",\r\n + \ \"2603:1040:606::440/122\",\r\n \"2603:1040:606::500/121\",\r\n + \ \"2603:1040:606:402::330/124\",\r\n \"2603:1040:806::440/122\",\r\n + \ \"2603:1040:806::500/121\",\r\n \"2603:1040:806:402::330/124\",\r\n + \ \"2603:1040:904:1::480/121\",\r\n \"2603:1040:904:1::500/122\",\r\n + \ \"2603:1040:904:1::700/121\",\r\n \"2603:1040:904:1::780/122\",\r\n + \ \"2603:1040:904:402::330/124\",\r\n \"2603:1040:904:802::210/124\",\r\n + \ \"2603:1040:904:c02::210/124\",\r\n \"2603:1040:a06::/121\",\r\n + \ \"2603:1040:a06::80/122\",\r\n \"2603:1040:a06:1::480/121\",\r\n + \ \"2603:1040:a06:1::500/122\",\r\n \"2603:1040:a06:1::700/121\",\r\n + \ \"2603:1040:a06:1::780/122\",\r\n \"2603:1040:a06:402::330/124\",\r\n + \ \"2603:1040:a06:802::210/124\",\r\n \"2603:1040:a06:c02::210/124\",\r\n + \ \"2603:1040:b04::440/122\",\r\n \"2603:1040:b04::500/121\",\r\n + \ \"2603:1040:b04:402::330/124\",\r\n \"2603:1040:c06::440/122\",\r\n + \ \"2603:1040:c06::500/121\",\r\n \"2603:1040:c06:402::330/124\",\r\n + \ \"2603:1040:d04::480/121\",\r\n \"2603:1040:d04::500/122\",\r\n + \ \"2603:1040:d04::700/121\",\r\n \"2603:1040:d04::780/122\",\r\n + \ \"2603:1040:d04:400::240/124\",\r\n \"2603:1040:d04:800::340/124\",\r\n + \ \"2603:1040:d04:c02::380/124\",\r\n \"2603:1040:f05:1::480/121\",\r\n + \ \"2603:1040:f05:1::500/122\",\r\n \"2603:1040:f05:1::700/121\",\r\n + \ \"2603:1040:f05:1::780/122\",\r\n \"2603:1040:f05:402::330/124\",\r\n + \ \"2603:1040:f05:802::210/124\",\r\n \"2603:1040:f05:c02::210/124\",\r\n + \ \"2603:1040:1002:1::380/121\",\r\n \"2603:1040:1002:400::230/124\",\r\n + \ \"2603:1040:1002:800::70/124\",\r\n \"2603:1040:1002:c00::70/124\",\r\n + \ \"2603:1040:1104::600/121\",\r\n \"2603:1040:1104:400::500/124\",\r\n + \ \"2603:1050:6:1::480/121\",\r\n \"2603:1050:6:1::500/122\",\r\n + \ \"2603:1050:6:1::700/121\",\r\n \"2603:1050:6:1::780/122\",\r\n + \ \"2603:1050:6:402::330/124\",\r\n \"2603:1050:6:802::210/124\",\r\n + \ \"2603:1050:6:c02::210/124\",\r\n \"2603:1050:403::480/121\",\r\n + \ \"2603:1050:403::500/122\",\r\n \"2603:1050:403:400::240/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.AustraliaEast\",\r\n + \ \"id\": \"DataFactory.AustraliaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.70.74.144/28\",\r\n + \ \"20.37.193.0/25\",\r\n \"20.37.193.128/26\",\r\n \"20.37.198.224/29\",\r\n + \ \"20.53.45.0/24\",\r\n \"20.53.46.0/26\",\r\n \"40.79.163.80/28\",\r\n + \ \"40.79.171.160/28\",\r\n \"2603:1010:6:1::480/121\",\r\n + \ \"2603:1010:6:1::500/122\",\r\n \"2603:1010:6:1::700/121\",\r\n + \ \"2603:1010:6:1::780/122\",\r\n \"2603:1010:6:402::330/124\",\r\n + \ \"2603:1010:6:802::210/124\",\r\n \"2603:1010:6:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.AustraliaSoutheast\",\r\n + \ \"id\": \"DataFactory.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"13.77.53.160/28\",\r\n \"20.42.225.0/25\",\r\n \"20.42.225.128/26\",\r\n + \ \"20.42.230.136/29\",\r\n \"104.46.179.64/26\",\r\n \"104.46.182.0/24\",\r\n + \ \"2603:1010:101::440/122\",\r\n \"2603:1010:101::500/121\",\r\n + \ \"2603:1010:101:402::330/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.BrazilSouth\",\r\n \"id\": \"DataFactory.BrazilSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"191.233.205.160/28\",\r\n \"191.234.137.32/29\",\r\n + \ \"191.234.142.64/26\",\r\n \"191.234.143.0/24\",\r\n \"191.234.149.0/28\",\r\n + \ \"191.234.157.0/28\",\r\n \"191.235.224.128/25\",\r\n \"191.235.225.0/26\",\r\n + \ \"2603:1050:6:1::480/121\",\r\n \"2603:1050:6:1::500/122\",\r\n + \ \"2603:1050:6:1::700/121\",\r\n \"2603:1050:6:1::780/122\",\r\n + \ \"2603:1050:6:402::330/124\",\r\n \"2603:1050:6:802::210/124\",\r\n + \ \"2603:1050:6:c02::210/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.BrazilSoutheast\",\r\n \"id\": + \"DataFactory.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"191.233.12.0/23\",\r\n + \ \"191.233.54.224/28\",\r\n \"2603:1050:403::480/121\",\r\n + \ \"2603:1050:403::500/122\",\r\n \"2603:1050:403:400::240/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.CanadaCentral\",\r\n + \ \"id\": \"DataFactory.CanadaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.71.175.80/28\",\r\n + \ \"20.38.147.224/28\",\r\n \"20.48.201.0/26\",\r\n \"52.228.80.128/25\",\r\n + \ \"52.228.81.0/26\",\r\n \"52.228.86.144/29\",\r\n \"52.246.155.224/28\",\r\n + \ \"2603:1030:f05:1::480/121\",\r\n \"2603:1030:f05:1::500/122\",\r\n + \ \"2603:1030:f05:1::700/121\",\r\n \"2603:1030:f05:1::780/122\",\r\n + \ \"2603:1030:f05:402::330/124\",\r\n \"2603:1030:f05:802::210/124\",\r\n + \ \"2603:1030:f05:c02::210/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.CanadaEast\",\r\n \"id\": \"DataFactory.CanadaEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"40.69.108.160/28\",\r\n \"40.69.111.48/28\",\r\n + \ \"40.89.16.128/25\",\r\n \"40.89.17.0/26\",\r\n \"40.89.20.224/29\",\r\n + \ \"52.139.111.64/26\",\r\n \"2603:1030:1005::440/122\",\r\n + \ \"2603:1030:1005::500/121\",\r\n \"2603:1030:1005:402::330/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.CentralIndia\",\r\n + \ \"id\": \"DataFactory.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.43.121.48/28\",\r\n + \ \"20.192.42.0/24\",\r\n \"20.192.43.0/26\",\r\n \"20.192.102.80/28\",\r\n + \ \"40.80.51.160/28\",\r\n \"52.140.104.128/25\",\r\n \"52.140.105.0/26\",\r\n + \ \"52.140.108.208/29\",\r\n \"2603:1040:a06::/121\",\r\n + \ \"2603:1040:a06::80/122\",\r\n \"2603:1040:a06:1::480/121\",\r\n + \ \"2603:1040:a06:1::500/122\",\r\n \"2603:1040:a06:1::700/121\",\r\n + \ \"2603:1040:a06:1::780/122\",\r\n \"2603:1040:a06:402::330/124\",\r\n + \ \"2603:1040:a06:802::210/124\",\r\n \"2603:1040:a06:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.CentralUS\",\r\n + \ \"id\": \"DataFactory.CentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.89.174.192/28\",\r\n + \ \"20.37.154.0/23\",\r\n \"20.37.156.0/26\",\r\n \"20.40.206.224/29\",\r\n + \ \"20.44.10.64/28\",\r\n \"52.182.141.16/28\",\r\n \"2603:1030:10:1::480/121\",\r\n + \ \"2603:1030:10:1::500/122\",\r\n \"2603:1030:10:1::700/121\",\r\n + \ \"2603:1030:10:1::780/122\",\r\n \"2603:1030:10:402::330/124\",\r\n + \ \"2603:1030:10:802::210/124\",\r\n \"2603:1030:10:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.EastAsia\",\r\n + \ \"id\": \"DataFactory.EastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.75.39.112/28\",\r\n + \ \"20.189.104.128/25\",\r\n \"20.189.106.0/26\",\r\n \"20.189.109.232/29\",\r\n + \ \"20.205.64.0/23\",\r\n \"20.205.67.128/26\",\r\n \"20.205.77.160/28\",\r\n + \ \"20.205.77.224/27\",\r\n \"20.205.83.240/28\",\r\n \"2603:1040:207::440/122\",\r\n + \ \"2603:1040:207::500/121\",\r\n \"2603:1040:207:402::330/124\",\r\n + \ \"2603:1040:207:800::70/124\",\r\n \"2603:1040:207:c00::70/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.EastUS\",\r\n + \ \"id\": \"DataFactory.EastUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.42.2.0/23\",\r\n + \ \"20.42.4.0/26\",\r\n \"20.42.64.0/28\",\r\n \"20.49.111.0/29\",\r\n + \ \"40.71.14.32/28\",\r\n \"40.78.229.96/28\",\r\n \"2603:1030:210:1::480/121\",\r\n + \ \"2603:1030:210:1::500/122\",\r\n \"2603:1030:210:1::700/121\",\r\n + \ \"2603:1030:210:1::780/122\",\r\n \"2603:1030:210:402::330/124\",\r\n + \ \"2603:1030:210:802::210/124\",\r\n \"2603:1030:210:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.EastUS2\",\r\n + \ \"id\": \"DataFactory.EastUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.41.2.0/23\",\r\n + \ \"20.41.4.0/26\",\r\n \"20.44.17.80/28\",\r\n \"20.49.102.16/29\",\r\n + \ \"40.70.148.160/28\",\r\n \"52.167.107.224/28\",\r\n \"2603:1030:40c:1::480/121\",\r\n + \ \"2603:1030:40c:1::500/122\",\r\n \"2603:1030:40c:1::700/121\",\r\n + \ \"2603:1030:40c:1::780/122\",\r\n \"2603:1030:40c:402::330/124\",\r\n + \ \"2603:1030:40c:802::210/124\",\r\n \"2603:1030:40c:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.EastUS2EUAP\",\r\n + \ \"id\": \"DataFactory.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.39.8.96/27\",\r\n + \ \"20.39.8.128/26\",\r\n \"20.39.15.0/29\",\r\n \"40.74.149.64/28\",\r\n + \ \"40.75.35.144/28\",\r\n \"52.138.92.128/28\",\r\n \"2603:1030:40b:1::480/121\",\r\n + \ \"2603:1030:40b:1::500/122\",\r\n \"2603:1030:40b:400::b30/124\",\r\n + \ \"2603:1030:40b:800::210/124\",\r\n \"2603:1030:40b:c00::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.FranceCentral\",\r\n + \ \"id\": \"DataFactory.FranceCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.43.40.128/25\",\r\n + \ \"20.43.41.0/26\",\r\n \"20.43.44.208/29\",\r\n \"40.79.132.112/28\",\r\n + \ \"40.79.139.80/28\",\r\n \"40.79.146.240/28\",\r\n \"51.138.215.128/26\",\r\n + \ \"2603:1020:805:1::480/121\",\r\n \"2603:1020:805:1::500/122\",\r\n + \ \"2603:1020:805:1::700/121\",\r\n \"2603:1020:805:1::780/122\",\r\n + \ \"2603:1020:805:402::330/124\",\r\n \"2603:1020:805:802::210/124\",\r\n + \ \"2603:1020:805:c02::210/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.GermanyWestCentral\",\r\n \"id\": + \"DataFactory.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.52.64.0/28\",\r\n + \ \"20.52.93.128/26\",\r\n \"51.116.147.32/28\",\r\n \"51.116.147.64/26\",\r\n + \ \"51.116.147.128/25\",\r\n \"51.116.245.112/28\",\r\n \"51.116.245.176/28\",\r\n + \ \"51.116.253.48/28\",\r\n \"51.116.253.144/28\",\r\n \"2603:1020:c04:1::480/121\",\r\n + \ \"2603:1020:c04:1::500/122\",\r\n \"2603:1020:c04:1::700/121\",\r\n + \ \"2603:1020:c04:1::780/122\",\r\n \"2603:1020:c04:402::330/124\",\r\n + \ \"2603:1020:c04:802::210/124\",\r\n \"2603:1020:c04:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.JapanEast\",\r\n + \ \"id\": \"DataFactory.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.78.109.192/28\",\r\n + \ \"20.43.64.128/25\",\r\n \"20.43.65.0/26\",\r\n \"20.43.70.120/29\",\r\n + \ \"20.191.164.0/24\",\r\n \"20.191.165.0/26\",\r\n \"40.79.187.208/28\",\r\n + \ \"40.79.195.224/28\",\r\n \"2603:1040:407:1::480/121\",\r\n + \ \"2603:1040:407:1::500/122\",\r\n \"2603:1040:407:1::700/121\",\r\n + \ \"2603:1040:407:1::780/122\",\r\n \"2603:1040:407:402::330/124\",\r\n + \ \"2603:1040:407:802::210/124\",\r\n \"2603:1040:407:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.JapanWest\",\r\n + \ \"id\": \"DataFactory.JapanWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.189.192.192/26\",\r\n + \ \"40.80.56.128/25\",\r\n \"40.80.57.0/26\",\r\n \"40.80.62.24/29\",\r\n + \ \"40.80.176.96/28\",\r\n \"2603:1040:606::440/122\",\r\n + \ \"2603:1040:606::500/121\",\r\n \"2603:1040:606:402::330/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.JioIndiaCentral\",\r\n + \ \"id\": \"DataFactory.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"20.192.226.0/23\",\r\n \"20.192.238.96/28\",\r\n + \ \"2603:1040:1104::600/121\",\r\n \"2603:1040:1104:400::500/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.JioIndiaWest\",\r\n + \ \"id\": \"DataFactory.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.104.252.224/28\",\r\n + \ \"20.192.162.0/23\",\r\n \"20.193.205.144/28\",\r\n \"2603:1040:d04::480/121\",\r\n + \ \"2603:1040:d04::500/122\",\r\n \"2603:1040:d04::700/121\",\r\n + \ \"2603:1040:d04::780/122\",\r\n \"2603:1040:d04:400::240/124\",\r\n + \ \"2603:1040:d04:800::340/124\",\r\n \"2603:1040:d04:c02::380/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.KoreaCentral\",\r\n + \ \"id\": \"DataFactory.KoreaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.41.64.128/25\",\r\n + \ \"20.41.65.0/26\",\r\n \"20.41.69.8/29\",\r\n \"20.44.27.240/28\",\r\n + \ \"20.194.67.192/28\",\r\n \"20.194.78.0/23\",\r\n \"20.200.195.0/26\",\r\n + \ \"52.231.20.64/28\",\r\n \"2603:1040:f05:1::480/121\",\r\n + \ \"2603:1040:f05:1::500/122\",\r\n \"2603:1040:f05:1::700/121\",\r\n + \ \"2603:1040:f05:1::780/122\",\r\n \"2603:1040:f05:402::330/124\",\r\n + \ \"2603:1040:f05:802::210/124\",\r\n \"2603:1040:f05:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.KoreaSouth\",\r\n + \ \"id\": \"DataFactory.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"40.80.168.128/25\",\r\n + \ \"40.80.169.0/26\",\r\n \"40.80.172.112/29\",\r\n \"52.231.148.160/28\",\r\n + \ \"52.231.151.32/28\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"DataFactory.NorthCentralUS\",\r\n \"id\": \"DataFactory.NorthCentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"20.49.114.24/29\",\r\n \"20.49.118.128/25\",\r\n + \ \"40.80.185.0/24\",\r\n \"40.80.186.0/25\",\r\n \"52.162.111.48/28\",\r\n + \ \"2603:1030:608::440/122\",\r\n \"2603:1030:608::500/121\",\r\n + \ \"2603:1030:608:402::330/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.NorthEurope\",\r\n \"id\": \"DataFactory.NorthEurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"13.69.230.96/28\",\r\n \"13.74.108.224/28\",\r\n + \ \"20.38.80.192/26\",\r\n \"20.38.82.0/23\",\r\n \"20.50.68.56/29\",\r\n + \ \"52.138.229.32/28\",\r\n \"2603:1020:5:1::480/121\",\r\n + \ \"2603:1020:5:1::500/122\",\r\n \"2603:1020:5:1::700/121\",\r\n + \ \"2603:1020:5:1::780/122\",\r\n \"2603:1020:5:402::330/124\",\r\n + \ \"2603:1020:5:802::210/124\",\r\n \"2603:1020:5:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.NorwayEast\",\r\n + \ \"id\": \"DataFactory.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.100.0.192/26\",\r\n + \ \"51.120.44.208/28\",\r\n \"51.120.45.64/26\",\r\n \"51.120.45.128/25\",\r\n + \ \"51.120.100.224/28\",\r\n \"51.120.109.96/28\",\r\n \"51.120.213.32/28\",\r\n + \ \"51.120.238.0/23\",\r\n \"2603:1020:e04:1::480/121\",\r\n + \ \"2603:1020:e04:1::500/122\",\r\n \"2603:1020:e04:1::700/121\",\r\n + \ \"2603:1020:e04:1::780/122\",\r\n \"2603:1020:e04:402::330/124\",\r\n + \ \"2603:1020:e04:802::210/124\",\r\n \"2603:1020:e04:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.SouthAfricaNorth\",\r\n + \ \"id\": \"DataFactory.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"102.37.72.224/28\",\r\n \"102.37.166.128/26\",\r\n + \ \"102.133.124.104/29\",\r\n \"102.133.127.160/28\",\r\n + \ \"102.133.156.136/29\",\r\n \"102.133.216.128/25\",\r\n + \ \"102.133.217.0/26\",\r\n \"102.133.218.248/29\",\r\n \"102.133.251.184/29\",\r\n + \ \"102.133.253.48/28\",\r\n \"2603:1000:104::/121\",\r\n + \ \"2603:1000:104::80/122\",\r\n \"2603:1000:104::1c0/122\",\r\n + \ \"2603:1000:104::280/121\",\r\n \"2603:1000:104:1::480/121\",\r\n + \ \"2603:1000:104:1::500/122\",\r\n \"2603:1000:104:1::700/121\",\r\n + \ \"2603:1000:104:1::780/122\",\r\n \"2603:1000:104:402::330/124\",\r\n + \ \"2603:1000:104:802::210/124\",\r\n \"2603:1000:104:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.SouthCentralUS\",\r\n + \ \"id\": \"DataFactory.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"13.73.244.32/28\",\r\n \"13.73.253.96/29\",\r\n + \ \"13.104.248.64/27\",\r\n \"13.104.252.208/28\",\r\n \"20.45.123.160/28\",\r\n + \ \"20.49.95.32/28\",\r\n \"20.65.130.192/26\",\r\n \"20.65.131.0/24\",\r\n + \ \"40.119.9.0/25\",\r\n \"40.119.9.128/26\",\r\n \"2603:1030:807:1::480/121\",\r\n + \ \"2603:1030:807:1::500/122\",\r\n \"2603:1030:807:1::700/121\",\r\n + \ \"2603:1030:807:1::780/122\",\r\n \"2603:1030:807:402::330/124\",\r\n + \ \"2603:1030:807:802::210/124\",\r\n \"2603:1030:807:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.SoutheastAsia\",\r\n + \ \"id\": \"DataFactory.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.67.10.208/28\",\r\n + \ \"20.43.128.128/25\",\r\n \"20.43.130.0/26\",\r\n \"20.195.64.0/25\",\r\n + \ \"23.98.83.112/28\",\r\n \"23.98.106.128/29\",\r\n \"23.98.109.64/26\",\r\n + \ \"23.98.109.128/25\",\r\n \"40.78.236.176/28\",\r\n \"2603:1040:5::/121\",\r\n + \ \"2603:1040:5::80/122\",\r\n \"2603:1040:5:1::480/121\",\r\n + \ \"2603:1040:5:1::500/122\",\r\n \"2603:1040:5:1::700/121\",\r\n + \ \"2603:1040:5:1::780/122\",\r\n \"2603:1040:5:402::330/124\",\r\n + \ \"2603:1040:5:802::210/124\",\r\n \"2603:1040:5:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.SouthIndia\",\r\n + \ \"id\": \"DataFactory.SouthIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.41.192.128/25\",\r\n + \ \"20.41.193.0/26\",\r\n \"20.41.197.112/29\",\r\n \"20.41.198.0/25\",\r\n + \ \"20.41.198.128/26\",\r\n \"20.192.152.0/26\",\r\n \"20.192.184.96/28\",\r\n + \ \"40.78.196.128/28\",\r\n \"2603:1040:c06::440/122\",\r\n + \ \"2603:1040:c06::500/121\",\r\n \"2603:1040:c06:402::330/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.SwedenCentral\",\r\n + \ \"id\": \"DataFactory.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"51.12.26.0/23\",\r\n + \ \"51.12.101.176/28\",\r\n \"51.12.229.64/28\",\r\n \"51.12.237.64/28\",\r\n + \ \"2603:1020:1004::480/121\",\r\n \"2603:1020:1004::500/122\",\r\n + \ \"2603:1020:1004::700/121\",\r\n \"2603:1020:1004::780/122\",\r\n + \ \"2603:1020:1004:400::240/124\",\r\n \"2603:1020:1004:800::340/124\",\r\n + \ \"2603:1020:1004:c02::380/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.SwitzerlandNorth\",\r\n \"id\": + \"DataFactory.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.208.2.0/23\",\r\n + \ \"20.208.19.208/28\",\r\n \"51.103.203.208/28\",\r\n \"51.107.51.40/29\",\r\n + \ \"51.107.52.0/25\",\r\n \"51.107.52.128/26\",\r\n \"51.107.128.0/28\",\r\n + \ \"51.107.246.192/26\",\r\n \"2603:1020:a04:1::480/121\",\r\n + \ \"2603:1020:a04:1::500/122\",\r\n \"2603:1020:a04:1::700/121\",\r\n + \ \"2603:1020:a04:1::780/122\",\r\n \"2603:1020:a04:402::330/124\",\r\n + \ \"2603:1020:a04:802::210/124\",\r\n \"2603:1020:a04:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.UAENorth\",\r\n + \ \"id\": \"DataFactory.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"20.38.141.16/28\",\r\n + \ \"20.38.141.128/25\",\r\n \"20.38.142.0/26\",\r\n \"20.38.152.0/28\",\r\n + \ \"40.120.64.112/28\",\r\n \"40.120.75.112/28\",\r\n \"40.120.86.64/26\",\r\n + \ \"2603:1040:904:1::480/121\",\r\n \"2603:1040:904:1::500/122\",\r\n + \ \"2603:1040:904:1::700/121\",\r\n \"2603:1040:904:1::780/122\",\r\n + \ \"2603:1040:904:402::330/124\",\r\n \"2603:1040:904:802::210/124\",\r\n + \ \"2603:1040:904:c02::210/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.UKSouth\",\r\n \"id\": \"DataFactory.UKSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"20.90.129.128/25\",\r\n \"20.90.130.0/24\",\r\n + \ \"51.104.9.32/28\",\r\n \"51.104.24.128/25\",\r\n \"51.104.25.0/26\",\r\n + \ \"51.104.29.216/29\",\r\n \"51.105.67.240/28\",\r\n \"51.105.75.240/28\",\r\n + \ \"2603:1020:705:1::480/121\",\r\n \"2603:1020:705:1::500/122\",\r\n + \ \"2603:1020:705:1::700/121\",\r\n \"2603:1020:705:1::780/122\",\r\n + \ \"2603:1020:705:402::330/124\",\r\n \"2603:1020:705:802::210/124\",\r\n + \ \"2603:1020:705:c02::210/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.UKWest\",\r\n \"id\": \"DataFactory.UKWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"20.58.71.0/26\",\r\n \"51.137.160.128/25\",\r\n + \ \"51.137.161.0/26\",\r\n \"51.137.164.192/29\",\r\n \"51.140.212.112/28\",\r\n + \ \"2603:1020:605::440/122\",\r\n \"2603:1020:605::500/121\",\r\n + \ \"2603:1020:605:402::330/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.WestCentralUS\",\r\n \"id\": \"DataFactory.WestCentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"13.71.199.0/28\",\r\n \"52.150.136.192/26\",\r\n + \ \"52.150.137.128/25\",\r\n \"52.150.154.16/29\",\r\n \"52.150.155.0/24\",\r\n + \ \"52.150.157.160/29\",\r\n \"52.150.157.192/26\",\r\n \"2603:1030:b04::440/122\",\r\n + \ \"2603:1030:b04::500/121\",\r\n \"2603:1030:b04:402::330/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.WestEurope\",\r\n + \ \"id\": \"DataFactory.WestEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.69.67.192/28\",\r\n + \ \"13.69.107.112/28\",\r\n \"13.69.112.128/28\",\r\n \"40.74.24.192/26\",\r\n + \ \"40.74.26.0/23\",\r\n \"40.113.176.232/29\",\r\n \"52.236.187.112/28\",\r\n + \ \"2603:1020:206:1::480/121\",\r\n \"2603:1020:206:1::500/122\",\r\n + \ \"2603:1020:206:1::700/121\",\r\n \"2603:1020:206:1::780/122\",\r\n + \ \"2603:1020:206:402::330/124\",\r\n \"2603:1020:206:802::210/124\",\r\n + \ \"2603:1020:206:c02::210/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"DataFactory.WestUS\",\r\n \"id\": \"DataFactory.WestUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"13.86.219.208/28\",\r\n \"40.82.249.64/26\",\r\n + \ \"40.82.250.0/23\",\r\n \"52.250.228.0/29\",\r\n \"2603:1030:a07::440/122\",\r\n + \ \"2603:1030:a07::500/121\",\r\n \"2603:1030:a07:402::9b0/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.WestUS2\",\r\n + \ \"id\": \"DataFactory.WestUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.66.143.128/28\",\r\n + \ \"20.42.129.64/26\",\r\n \"20.42.132.0/23\",\r\n \"40.64.132.232/29\",\r\n + \ \"40.78.245.16/28\",\r\n \"40.78.251.192/28\",\r\n \"2603:1030:c06:1::480/121\",\r\n + \ \"2603:1030:c06:1::500/122\",\r\n \"2603:1030:c06:400::b30/124\",\r\n + \ \"2603:1030:c06:802::210/124\",\r\n \"2603:1030:c06:c02::210/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactory.WestUS3\",\r\n + \ \"id\": \"DataFactory.WestUS3\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"DataFactory\",\r\n \"addressPrefixes\": [\r\n \"13.104.253.48/28\",\r\n + \ \"20.150.162.0/23\",\r\n \"20.150.173.16/28\",\r\n \"20.150.181.112/28\",\r\n + \ \"20.150.190.64/28\",\r\n \"2603:1030:504:1::480/121\",\r\n + \ \"2603:1030:504:1::500/122\",\r\n \"2603:1030:504:1::700/121\",\r\n + \ \"2603:1030:504:1::780/122\",\r\n \"2603:1030:504:402::240/124\",\r\n + \ \"2603:1030:504:802::340/124\",\r\n \"2603:1030:504:c02::380/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"DataFactoryManagement\",\r\n + \ \"id\": \"DataFactoryManagement\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"DataFactory\",\r\n \"addressPrefixes\": + [\r\n \"13.66.143.128/28\",\r\n \"13.67.10.208/28\",\r\n + \ \"13.69.67.192/28\",\r\n \"13.69.107.112/28\",\r\n \"13.69.112.128/28\",\r\n + \ \"13.69.230.96/28\",\r\n \"13.70.74.144/28\",\r\n \"13.71.175.80/28\",\r\n + \ \"13.71.199.0/28\",\r\n \"13.73.244.32/28\",\r\n \"13.73.253.96/29\",\r\n + \ \"13.74.108.224/28\",\r\n \"13.75.39.112/28\",\r\n \"13.77.53.160/28\",\r\n + \ \"13.78.109.192/28\",\r\n \"13.86.219.208/28\",\r\n \"13.89.174.192/28\",\r\n + \ \"13.104.248.64/27\",\r\n \"13.104.252.208/28\",\r\n \"13.104.252.224/28\",\r\n + \ \"13.104.253.48/28\",\r\n \"13.104.254.128/28\",\r\n \"20.21.46.64/28\",\r\n + \ \"20.21.67.208/28\",\r\n \"20.21.75.208/28\",\r\n \"20.36.117.208/28\",\r\n + \ \"20.36.124.32/28\",\r\n \"20.37.68.144/28\",\r\n \"20.37.198.224/29\",\r\n + \ \"20.37.228.16/28\",\r\n \"20.38.141.16/28\",\r\n \"20.38.147.224/28\",\r\n + \ \"20.38.152.0/28\",\r\n \"20.39.15.0/29\",\r\n \"20.40.206.224/29\",\r\n + \ \"20.41.69.8/29\",\r\n \"20.41.197.112/29\",\r\n \"20.42.64.0/28\",\r\n + \ \"20.42.230.136/29\",\r\n \"20.43.44.208/29\",\r\n \"20.43.70.120/29\",\r\n + \ \"20.43.121.48/28\",\r\n \"20.44.10.64/28\",\r\n \"20.44.17.80/28\",\r\n + \ \"20.44.27.240/28\",\r\n \"20.45.123.160/28\",\r\n \"20.45.208.16/28\",\r\n + \ \"20.49.83.224/28\",\r\n \"20.49.95.32/28\",\r\n \"20.49.102.16/29\",\r\n + \ \"20.49.111.0/29\",\r\n \"20.49.114.24/29\",\r\n \"20.50.68.56/29\",\r\n + \ \"20.52.64.0/28\",\r\n \"20.53.0.48/28\",\r\n \"20.72.28.48/28\",\r\n + \ \"20.150.173.16/28\",\r\n \"20.150.181.112/28\",\r\n \"20.150.190.64/28\",\r\n + \ \"20.189.109.232/29\",\r\n \"20.192.102.80/28\",\r\n \"20.192.184.96/28\",\r\n + \ \"20.192.238.96/28\",\r\n \"20.193.205.144/28\",\r\n \"20.194.67.192/28\",\r\n + \ \"20.205.77.160/28\",\r\n \"20.205.77.224/27\",\r\n \"20.205.83.240/28\",\r\n + \ \"20.208.19.208/28\",\r\n \"23.98.83.112/28\",\r\n \"23.98.106.128/29\",\r\n + \ \"40.64.132.232/29\",\r\n \"40.69.108.160/28\",\r\n \"40.69.111.48/28\",\r\n + \ \"40.70.148.160/28\",\r\n \"40.71.14.32/28\",\r\n \"40.74.149.64/28\",\r\n + \ \"40.75.35.144/28\",\r\n \"40.78.196.128/28\",\r\n \"40.78.229.96/28\",\r\n + \ \"40.78.236.176/28\",\r\n \"40.78.245.16/28\",\r\n \"40.78.251.192/28\",\r\n + \ \"40.79.132.112/28\",\r\n \"40.79.139.80/28\",\r\n \"40.79.146.240/28\",\r\n + \ \"40.79.163.80/28\",\r\n \"40.79.171.160/28\",\r\n \"40.79.187.208/28\",\r\n + \ \"40.79.195.224/28\",\r\n \"40.80.51.160/28\",\r\n \"40.80.62.24/29\",\r\n + \ \"40.80.172.112/29\",\r\n \"40.80.176.96/28\",\r\n \"40.89.20.224/29\",\r\n + \ \"40.113.176.232/29\",\r\n \"40.120.8.56/29\",\r\n \"40.120.64.112/28\",\r\n + \ \"40.120.75.112/28\",\r\n \"40.122.0.16/28\",\r\n \"51.12.101.176/28\",\r\n + \ \"51.12.206.16/28\",\r\n \"51.12.229.64/28\",\r\n \"51.12.237.64/28\",\r\n + \ \"51.13.128.0/28\",\r\n \"51.103.203.208/28\",\r\n \"51.104.9.32/28\",\r\n + \ \"51.104.29.216/29\",\r\n \"51.105.67.240/28\",\r\n \"51.105.75.240/28\",\r\n + \ \"51.105.92.176/28\",\r\n \"51.107.51.40/29\",\r\n \"51.107.128.0/28\",\r\n + \ \"51.107.148.80/28\",\r\n \"51.107.192.80/28\",\r\n \"51.116.147.32/28\",\r\n + \ \"51.116.245.112/28\",\r\n \"51.116.245.176/28\",\r\n \"51.116.253.48/28\",\r\n + \ \"51.116.253.144/28\",\r\n \"51.120.44.208/28\",\r\n \"51.120.100.224/28\",\r\n + \ \"51.120.109.96/28\",\r\n \"51.120.213.32/28\",\r\n \"51.120.228.224/27\",\r\n + \ \"51.137.164.192/29\",\r\n \"51.138.160.16/28\",\r\n \"51.140.212.112/28\",\r\n + \ \"52.138.92.128/28\",\r\n \"52.138.229.32/28\",\r\n \"52.140.108.208/29\",\r\n + \ \"52.150.154.16/29\",\r\n \"52.162.111.48/28\",\r\n \"52.167.107.224/28\",\r\n + \ \"52.176.232.16/28\",\r\n \"52.182.141.16/28\",\r\n \"52.228.86.144/29\",\r\n + \ \"52.231.20.64/28\",\r\n \"52.231.148.160/28\",\r\n \"52.231.151.32/28\",\r\n + \ \"52.236.187.112/28\",\r\n \"52.246.155.224/28\",\r\n \"52.250.228.0/29\",\r\n + \ \"102.37.64.96/28\",\r\n \"102.37.72.224/28\",\r\n \"102.133.60.48/28\",\r\n + \ \"102.133.124.104/29\",\r\n \"102.133.127.160/28\",\r\n + \ \"102.133.156.136/29\",\r\n \"102.133.218.248/29\",\r\n + \ \"102.133.251.184/29\",\r\n \"102.133.253.48/28\",\r\n + \ \"191.233.54.224/28\",\r\n \"191.233.205.160/28\",\r\n + \ \"191.234.137.32/29\",\r\n \"191.234.149.0/28\",\r\n \"191.234.157.0/28\",\r\n + \ \"2603:1000:4::440/122\",\r\n \"2603:1000:4:402::330/124\",\r\n + \ \"2603:1000:104::80/122\",\r\n \"2603:1000:104::1c0/122\",\r\n + \ \"2603:1000:104:1::500/122\",\r\n \"2603:1000:104:1::780/122\",\r\n + \ \"2603:1000:104:402::330/124\",\r\n \"2603:1000:104:802::210/124\",\r\n + \ \"2603:1000:104:c02::210/124\",\r\n \"2603:1010:6:1::500/122\",\r\n + \ \"2603:1010:6:1::780/122\",\r\n \"2603:1010:6:402::330/124\",\r\n + \ \"2603:1010:6:802::210/124\",\r\n \"2603:1010:6:c02::210/124\",\r\n + \ \"2603:1010:101::440/122\",\r\n \"2603:1010:101:402::330/124\",\r\n + \ \"2603:1010:304::440/122\",\r\n \"2603:1010:304:402::330/124\",\r\n + \ \"2603:1010:404::440/122\",\r\n \"2603:1010:404:402::330/124\",\r\n + \ \"2603:1020:5:1::500/122\",\r\n \"2603:1020:5:1::780/122\",\r\n + \ \"2603:1020:5:402::330/124\",\r\n \"2603:1020:5:802::210/124\",\r\n + \ \"2603:1020:5:c02::210/124\",\r\n \"2603:1020:206:1::500/122\",\r\n + \ \"2603:1020:206:1::780/122\",\r\n \"2603:1020:206:402::330/124\",\r\n + \ \"2603:1020:206:802::210/124\",\r\n \"2603:1020:206:c02::210/124\",\r\n + \ \"2603:1020:305::440/122\",\r\n \"2603:1020:305:402::330/124\",\r\n + \ \"2603:1020:405::440/122\",\r\n \"2603:1020:405:402::330/124\",\r\n + \ \"2603:1020:605::440/122\",\r\n \"2603:1020:605:402::330/124\",\r\n + \ \"2603:1020:705:1::500/122\",\r\n \"2603:1020:705:1::780/122\",\r\n + \ \"2603:1020:705:402::330/124\",\r\n \"2603:1020:705:802::210/124\",\r\n + \ \"2603:1020:705:c02::210/124\",\r\n \"2603:1020:805:1::500/122\",\r\n + \ \"2603:1020:805:1::780/122\",\r\n \"2603:1020:805:402::330/124\",\r\n + \ \"2603:1020:805:802::210/124\",\r\n \"2603:1020:805:c02::210/124\",\r\n + \ \"2603:1020:905::440/122\",\r\n \"2603:1020:905:402::330/124\",\r\n + \ \"2603:1020:a04:1::500/122\",\r\n \"2603:1020:a04:1::780/122\",\r\n + \ \"2603:1020:a04:402::330/124\",\r\n \"2603:1020:a04:802::210/124\",\r\n + \ \"2603:1020:a04:c02::210/124\",\r\n \"2603:1020:b04::440/122\",\r\n + \ \"2603:1020:b04:402::330/124\",\r\n \"2603:1020:c04:1::500/122\",\r\n + \ \"2603:1020:c04:1::780/122\",\r\n \"2603:1020:c04:402::330/124\",\r\n + \ \"2603:1020:c04:802::210/124\",\r\n \"2603:1020:c04:c02::210/124\",\r\n + \ \"2603:1020:d04::440/122\",\r\n \"2603:1020:d04:402::330/124\",\r\n + \ \"2603:1020:e04:1::500/122\",\r\n \"2603:1020:e04:1::780/122\",\r\n + \ \"2603:1020:e04:402::330/124\",\r\n \"2603:1020:e04:802::210/124\",\r\n + \ \"2603:1020:e04:c02::210/124\",\r\n \"2603:1020:f04::440/122\",\r\n + \ \"2603:1020:f04:402::330/124\",\r\n \"2603:1020:1004::500/122\",\r\n + \ \"2603:1020:1004::780/122\",\r\n \"2603:1020:1004:400::240/124\",\r\n + \ \"2603:1020:1004:800::340/124\",\r\n \"2603:1020:1004:c02::380/124\",\r\n + \ \"2603:1020:1104:400::500/124\",\r\n \"2603:1030:f:1::440/122\",\r\n + \ \"2603:1030:f:400::b30/124\",\r\n \"2603:1030:10:1::500/122\",\r\n + \ \"2603:1030:10:1::780/122\",\r\n \"2603:1030:10:402::330/124\",\r\n + \ \"2603:1030:10:802::210/124\",\r\n \"2603:1030:10:c02::210/124\",\r\n + \ \"2603:1030:104:1::500/122\",\r\n \"2603:1030:104:1::780/122\",\r\n + \ \"2603:1030:104:402::330/124\",\r\n \"2603:1030:104:802::40/124\",\r\n + \ \"2603:1030:107:400::380/124\",\r\n \"2603:1030:210:1::500/122\",\r\n + \ \"2603:1030:210:1::780/122\",\r\n \"2603:1030:210:402::330/124\",\r\n + \ \"2603:1030:210:802::210/124\",\r\n \"2603:1030:210:c02::210/124\",\r\n + \ \"2603:1030:40b:1::500/122\",\r\n \"2603:1030:40b:400::b30/124\",\r\n + \ \"2603:1030:40b:800::210/124\",\r\n \"2603:1030:40b:c00::210/124\",\r\n + \ \"2603:1030:40c:1::500/122\",\r\n \"2603:1030:40c:1::780/122\",\r\n + \ \"2603:1030:40c:402::330/124\",\r\n \"2603:1030:40c:802::210/124\",\r\n + \ \"2603:1030:40c:c02::210/124\",\r\n \"2603:1030:504:1::500/122\",\r\n + \ \"2603:1030:504:1::780/122\",\r\n \"2603:1030:504:402::240/124\",\r\n + \ \"2603:1030:504:802::340/124\",\r\n \"2603:1030:504:c02::380/124\",\r\n + \ \"2603:1030:608::440/122\",\r\n \"2603:1030:608:402::330/124\",\r\n + \ \"2603:1030:807:1::500/122\",\r\n \"2603:1030:807:1::780/122\",\r\n + \ \"2603:1030:807:402::330/124\",\r\n \"2603:1030:807:802::210/124\",\r\n + \ \"2603:1030:807:c02::210/124\",\r\n \"2603:1030:a07::440/122\",\r\n + \ \"2603:1030:a07:402::9b0/124\",\r\n \"2603:1030:b04::440/122\",\r\n + \ \"2603:1030:b04:402::330/124\",\r\n \"2603:1030:c06:1::500/122\",\r\n + \ \"2603:1030:c06:400::b30/124\",\r\n \"2603:1030:c06:802::210/124\",\r\n + \ \"2603:1030:c06:c02::210/124\",\r\n \"2603:1030:f05:1::500/122\",\r\n + \ \"2603:1030:f05:1::780/122\",\r\n \"2603:1030:f05:402::330/124\",\r\n + \ \"2603:1030:f05:802::210/124\",\r\n \"2603:1030:f05:c02::210/124\",\r\n + \ \"2603:1030:1005::440/122\",\r\n \"2603:1030:1005:402::330/124\",\r\n + \ \"2603:1040:5::80/122\",\r\n \"2603:1040:5:1::500/122\",\r\n + \ \"2603:1040:5:1::780/122\",\r\n \"2603:1040:5:402::330/124\",\r\n + \ \"2603:1040:5:802::210/124\",\r\n \"2603:1040:5:c02::210/124\",\r\n + \ \"2603:1040:207::440/122\",\r\n \"2603:1040:207:402::330/124\",\r\n + \ \"2603:1040:207:800::70/124\",\r\n \"2603:1040:207:c00::70/124\",\r\n + \ \"2603:1040:407:1::500/122\",\r\n \"2603:1040:407:1::780/122\",\r\n + \ \"2603:1040:407:402::330/124\",\r\n \"2603:1040:407:802::210/124\",\r\n + \ \"2603:1040:407:c02::210/124\",\r\n \"2603:1040:606::440/122\",\r\n + \ \"2603:1040:606:402::330/124\",\r\n \"2603:1040:806::440/122\",\r\n + \ \"2603:1040:806:402::330/124\",\r\n \"2603:1040:904:1::500/122\",\r\n + \ \"2603:1040:904:1::780/122\",\r\n \"2603:1040:904:402::330/124\",\r\n + \ \"2603:1040:904:802::210/124\",\r\n \"2603:1040:904:c02::210/124\",\r\n + \ \"2603:1040:a06::80/122\",\r\n \"2603:1040:a06:1::500/122\",\r\n + \ \"2603:1040:a06:1::780/122\",\r\n \"2603:1040:a06:402::330/124\",\r\n + \ \"2603:1040:a06:802::210/124\",\r\n \"2603:1040:a06:c02::210/124\",\r\n + \ \"2603:1040:b04::440/122\",\r\n \"2603:1040:b04:402::330/124\",\r\n + \ \"2603:1040:c06::440/122\",\r\n \"2603:1040:c06:402::330/124\",\r\n + \ \"2603:1040:d04::500/122\",\r\n \"2603:1040:d04::780/122\",\r\n + \ \"2603:1040:d04:400::240/124\",\r\n \"2603:1040:d04:800::340/124\",\r\n + \ \"2603:1040:d04:c02::380/124\",\r\n \"2603:1040:f05:1::500/122\",\r\n + \ \"2603:1040:f05:1::780/122\",\r\n \"2603:1040:f05:402::330/124\",\r\n + \ \"2603:1040:f05:802::210/124\",\r\n \"2603:1040:f05:c02::210/124\",\r\n + \ \"2603:1040:1002:400::230/124\",\r\n \"2603:1040:1002:800::70/124\",\r\n + \ \"2603:1040:1002:c00::70/124\",\r\n \"2603:1040:1104:400::500/124\",\r\n + \ \"2603:1050:6:1::500/122\",\r\n \"2603:1050:6:1::780/122\",\r\n + \ \"2603:1050:6:402::330/124\",\r\n \"2603:1050:6:802::210/124\",\r\n + \ \"2603:1050:6:c02::210/124\",\r\n \"2603:1050:403::500/122\",\r\n + \ \"2603:1050:403:400::240/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Dynamics365ForMarketingEmail\",\r\n \"id\": + \"Dynamics365ForMarketingEmail\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"13.66.138.128/25\",\r\n \"13.69.226.128/25\",\r\n + \ \"13.71.171.0/24\",\r\n \"13.74.106.128/25\",\r\n \"13.75.35.0/24\",\r\n + \ \"13.77.51.0/24\",\r\n \"13.78.107.0/24\",\r\n \"40.78.242.0/25\",\r\n + \ \"40.79.138.192/26\",\r\n \"40.120.64.224/27\",\r\n \"51.107.129.64/27\",\r\n + \ \"51.140.147.0/24\",\r\n \"65.52.252.128/27\",\r\n \"102.133.251.96/27\",\r\n + \ \"104.211.80.0/24\",\r\n \"191.233.202.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.AustraliaSoutheast\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"Dynamics365ForMarketingEmail\",\r\n \"addressPrefixes\": [\r\n \"13.77.51.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.BrazilSouth\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"191.233.202.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.CanadaCentral\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.CanadaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"13.71.171.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.CentralIndia\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"104.211.80.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.EastAsia\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.EastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"13.75.35.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.FranceCentral\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.FranceCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"40.79.138.192/26\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.JapanEast\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"13.78.107.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.NorthEurope\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"13.69.226.128/25\",\r\n \"13.74.106.128/25\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.SouthAfricaNorth\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"Dynamics365ForMarketingEmail\",\r\n \"addressPrefixes\": [\r\n \"102.133.251.96/27\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.UAENorth\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"40.120.64.224/27\",\r\n \"65.52.252.128/27\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.UKSouth\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.UKSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"51.140.147.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Dynamics365ForMarketingEmail.WestUS2\",\r\n + \ \"id\": \"Dynamics365ForMarketingEmail.WestUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"Dynamics365ForMarketingEmail\",\r\n + \ \"addressPrefixes\": [\r\n \"13.66.138.128/25\",\r\n \"40.78.242.0/25\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub\",\r\n + \ \"id\": \"EventHub\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n + \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureEventHub\",\r\n + \ \"addressPrefixes\": [\r\n \"13.64.195.117/32\",\r\n \"13.65.209.24/32\",\r\n + \ \"13.66.138.64/28\",\r\n \"13.66.145.128/26\",\r\n \"13.66.149.0/26\",\r\n + \ \"13.66.228.204/32\",\r\n \"13.66.230.42/32\",\r\n \"13.67.8.64/27\",\r\n + \ \"13.67.20.64/26\",\r\n \"13.68.20.101/32\",\r\n \"13.68.21.169/32\",\r\n + \ \"13.68.77.215/32\",\r\n \"13.69.64.0/26\",\r\n \"13.69.106.0/26\",\r\n + \ \"13.69.111.128/26\",\r\n \"13.69.227.0/26\",\r\n \"13.69.239.0/26\",\r\n + \ \"13.69.253.135/32\",\r\n \"13.69.255.140/32\",\r\n \"13.70.72.0/28\",\r\n + \ \"13.70.79.16/28\",\r\n \"13.70.114.64/26\",\r\n \"13.71.30.214/32\",\r\n + \ \"13.71.123.78/32\",\r\n \"13.71.154.11/32\",\r\n \"13.71.170.16/28\",\r\n + \ \"13.71.177.128/26\",\r\n \"13.71.194.64/27\",\r\n \"13.72.254.134/32\",\r\n + \ \"13.74.107.0/26\",\r\n \"13.75.34.64/26\",\r\n \"13.76.179.223/32\",\r\n + \ \"13.76.216.217/32\",\r\n \"13.77.50.32/27\",\r\n \"13.78.106.64/28\",\r\n + \ \"13.78.149.209/32\",\r\n \"13.78.150.233/32\",\r\n \"13.78.191.44/32\",\r\n + \ \"13.84.145.196/32\",\r\n \"13.87.34.139/32\",\r\n \"13.87.34.243/32\",\r\n + \ \"13.87.56.32/27\",\r\n \"13.87.122.32/27\",\r\n \"13.88.20.117/32\",\r\n + \ \"13.88.26.28/32\",\r\n \"13.89.58.37/32\",\r\n \"13.89.59.231/32\",\r\n + \ \"13.89.170.128/26\",\r\n \"13.89.178.112/28\",\r\n \"13.90.83.7/32\",\r\n + \ \"13.90.208.184/32\",\r\n \"13.91.61.11/32\",\r\n \"13.92.124.151/32\",\r\n + \ \"13.92.180.208/32\",\r\n \"13.92.190.184/32\",\r\n \"13.93.226.138/32\",\r\n + \ \"13.94.47.61/32\",\r\n \"20.21.38.0/24\",\r\n \"20.21.43.128/26\",\r\n + \ \"20.21.67.64/26\",\r\n \"20.21.75.64/26\",\r\n \"20.36.46.142/32\",\r\n + \ \"20.36.74.130/32\",\r\n \"20.36.106.192/27\",\r\n \"20.36.114.32/27\",\r\n + \ \"20.36.144.64/26\",\r\n \"20.37.74.0/27\",\r\n \"20.38.146.64/26\",\r\n + \ \"20.42.68.64/26\",\r\n \"20.42.74.0/26\",\r\n \"20.42.131.16/28\",\r\n + \ \"20.42.131.64/26\",\r\n \"20.43.126.64/26\",\r\n \"20.44.2.128/26\",\r\n + \ \"20.44.13.64/26\",\r\n \"20.44.26.64/26\",\r\n \"20.44.31.128/26\",\r\n + \ \"20.45.92.0/24\",\r\n \"20.45.117.128/26\",\r\n \"20.45.122.64/26\",\r\n + \ \"20.45.126.192/26\",\r\n \"20.45.240.128/25\",\r\n \"20.45.241.0/26\",\r\n + \ \"20.46.15.64/26\",\r\n \"20.47.216.64/26\",\r\n \"20.48.200.128/26\",\r\n + \ \"20.49.84.192/26\",\r\n \"20.49.93.64/27\",\r\n \"20.49.93.128/27\",\r\n + \ \"20.49.95.128/26\",\r\n \"20.50.72.64/26\",\r\n \"20.50.80.64/26\",\r\n + \ \"20.50.201.64/26\",\r\n \"20.51.3.0/24\",\r\n \"20.51.14.96/27\",\r\n + \ \"20.51.14.128/25\",\r\n \"20.51.22.128/26\",\r\n \"20.51.23.0/25\",\r\n + \ \"20.51.23.128/26\",\r\n \"20.52.64.128/26\",\r\n \"20.52.92.0/24\",\r\n + \ \"20.53.51.0/24\",\r\n \"20.53.59.0/24\",\r\n \"20.53.85.82/32\",\r\n + \ \"20.58.69.0/24\",\r\n \"20.62.62.0/24\",\r\n \"20.66.7.0/24\",\r\n + \ \"20.69.3.0/24\",\r\n \"20.70.219.0/24\",\r\n \"20.72.27.192/26\",\r\n + \ \"20.76.242.45/32\",\r\n \"20.82.245.0/24\",\r\n \"20.83.192.0/26\",\r\n + \ \"20.86.89.0/24\",\r\n \"20.88.65.0/24\",\r\n \"20.88.153.0/26\",\r\n + \ \"20.89.0.64/26\",\r\n \"20.89.10.0/24\",\r\n \"20.90.128.128/26\",\r\n + \ \"20.92.2.0/24\",\r\n \"20.97.32.192/26\",\r\n \"20.99.15.0/24\",\r\n + \ \"20.100.0.0/26\",\r\n \"20.150.160.224/27\",\r\n \"20.150.170.160/27\",\r\n + \ \"20.150.175.64/26\",\r\n \"20.150.178.64/26\",\r\n \"20.150.182.0/27\",\r\n + \ \"20.150.186.64/26\",\r\n \"20.150.189.128/26\",\r\n \"20.150.246.32/27\",\r\n + \ \"20.150.246.64/26\",\r\n \"20.150.246.128/25\",\r\n \"20.151.32.64/26\",\r\n + \ \"20.189.231.0/24\",\r\n \"20.192.33.64/26\",\r\n \"20.192.51.96/27\",\r\n + \ \"20.192.51.128/25\",\r\n \"20.192.55.0/26\",\r\n \"20.192.83.0/24\",\r\n + \ \"20.192.98.64/26\",\r\n \"20.192.102.0/26\",\r\n \"20.192.161.64/27\",\r\n + \ \"20.192.168.0/26\",\r\n \"20.192.225.160/27\",\r\n \"20.192.234.32/27\",\r\n + \ \"20.193.195.32/27\",\r\n \"20.193.195.64/26\",\r\n \"20.193.195.128/25\",\r\n + \ \"20.193.202.32/27\",\r\n \"20.193.204.192/26\",\r\n \"20.194.68.192/26\",\r\n + \ \"20.194.80.0/26\",\r\n \"20.194.128.192/26\",\r\n \"20.195.77.0/24\",\r\n + \ \"20.195.81.0/24\",\r\n \"20.195.97.0/32\",\r\n \"20.195.137.192/26\",\r\n + \ \"20.195.150.160/27\",\r\n \"20.195.150.192/26\",\r\n \"20.195.151.0/25\",\r\n + \ \"20.195.152.64/26\",\r\n \"20.200.193.0/24\",\r\n \"20.205.75.128/26\",\r\n + \ \"20.205.83.128/26\",\r\n \"20.208.19.64/26\",\r\n \"23.96.214.181/32\",\r\n + \ \"23.96.253.236/32\",\r\n \"23.97.67.90/32\",\r\n \"23.97.97.36/32\",\r\n + \ \"23.97.103.3/32\",\r\n \"23.97.120.51/32\",\r\n \"23.97.226.21/32\",\r\n + \ \"23.98.64.92/32\",\r\n \"23.98.65.24/32\",\r\n \"23.98.82.64/27\",\r\n + \ \"23.98.87.192/26\",\r\n \"23.98.112.192/26\",\r\n \"23.99.7.105/32\",\r\n + \ \"23.99.54.235/32\",\r\n \"23.99.60.253/32\",\r\n \"23.99.80.186/32\",\r\n + \ \"23.99.118.48/32\",\r\n \"23.99.128.69/32\",\r\n \"23.99.129.170/32\",\r\n + \ \"23.99.192.254/32\",\r\n \"23.99.196.56/32\",\r\n \"23.99.228.174/32\",\r\n + \ \"23.100.14.185/32\",\r\n \"23.100.100.84/32\",\r\n \"23.101.3.68/32\",\r\n + \ \"23.101.8.229/32\",\r\n \"23.102.0.186/32\",\r\n \"23.102.0.239/32\",\r\n + \ \"23.102.53.113/32\",\r\n \"23.102.128.15/32\",\r\n \"23.102.160.39/32\",\r\n + \ \"23.102.161.227/32\",\r\n \"23.102.163.4/32\",\r\n \"23.102.165.127/32\",\r\n + \ \"23.102.167.73/32\",\r\n \"23.102.180.26/32\",\r\n \"23.102.234.49/32\",\r\n + \ \"40.64.113.64/26\",\r\n \"40.67.58.128/26\",\r\n \"40.67.72.64/26\",\r\n + \ \"40.68.35.230/32\",\r\n \"40.68.39.15/32\",\r\n \"40.68.93.145/32\",\r\n + \ \"40.68.205.113/32\",\r\n \"40.68.217.242/32\",\r\n \"40.69.29.216/32\",\r\n + \ \"40.69.106.32/27\",\r\n \"40.69.217.246/32\",\r\n \"40.70.78.154/32\",\r\n + \ \"40.70.146.0/26\",\r\n \"40.71.10.128/26\",\r\n \"40.71.100.98/32\",\r\n + \ \"40.74.100.0/27\",\r\n \"40.74.141.187/32\",\r\n \"40.74.146.16/28\",\r\n + \ \"40.74.151.0/26\",\r\n \"40.75.34.0/28\",\r\n \"40.76.29.197/32\",\r\n + \ \"40.76.40.11/32\",\r\n \"40.76.194.119/32\",\r\n \"40.78.110.196/32\",\r\n + \ \"40.78.194.32/27\",\r\n \"40.78.202.32/27\",\r\n \"40.78.226.128/26\",\r\n + \ \"40.78.234.0/27\",\r\n \"40.78.242.128/28\",\r\n \"40.78.247.0/26\",\r\n + \ \"40.78.250.64/28\",\r\n \"40.78.253.128/26\",\r\n \"40.79.44.59/32\",\r\n + \ \"40.79.74.86/32\",\r\n \"40.79.130.16/28\",\r\n \"40.79.138.0/28\",\r\n + \ \"40.79.142.0/26\",\r\n \"40.79.146.0/28\",\r\n \"40.79.149.64/26\",\r\n + \ \"40.79.155.0/26\",\r\n \"40.79.162.0/28\",\r\n \"40.79.166.192/26\",\r\n + \ \"40.79.170.32/28\",\r\n \"40.79.174.128/26\",\r\n \"40.79.178.32/27\",\r\n + \ \"40.79.186.32/27\",\r\n \"40.79.191.128/26\",\r\n \"40.79.194.192/26\",\r\n + \ \"40.80.50.64/26\",\r\n \"40.83.191.202/32\",\r\n \"40.83.222.100/32\",\r\n + \ \"40.84.150.241/32\",\r\n \"40.84.185.67/32\",\r\n \"40.85.226.62/32\",\r\n + \ \"40.85.229.32/32\",\r\n \"40.86.77.12/32\",\r\n \"40.86.102.100/32\",\r\n + \ \"40.86.176.23/32\",\r\n \"40.86.225.142/32\",\r\n \"40.86.230.119/32\",\r\n + \ \"40.89.122.0/26\",\r\n \"40.112.185.115/32\",\r\n \"40.112.213.11/32\",\r\n + \ \"40.112.242.0/25\",\r\n \"40.115.79.2/32\",\r\n \"40.117.88.66/32\",\r\n + \ \"40.120.75.64/27\",\r\n \"40.120.78.0/26\",\r\n \"40.120.84.0/24\",\r\n + \ \"40.121.84.50/32\",\r\n \"40.121.141.232/32\",\r\n \"40.121.148.193/32\",\r\n + \ \"40.122.173.108/32\",\r\n \"40.122.213.155/32\",\r\n \"40.124.65.64/26\",\r\n + \ \"40.125.103.251/32\",\r\n \"40.127.83.123/32\",\r\n \"40.127.132.254/32\",\r\n + \ \"51.11.192.128/26\",\r\n \"51.12.21.0/24\",\r\n \"51.12.30.0/24\",\r\n + \ \"51.12.98.160/27\",\r\n \"51.12.102.64/26\",\r\n \"51.12.202.160/27\",\r\n + \ \"51.12.206.64/26\",\r\n \"51.12.226.64/26\",\r\n \"51.12.234.64/26\",\r\n + \ \"51.13.0.192/26\",\r\n \"51.13.140.0/24\",\r\n \"51.103.203.64/26\",\r\n + \ \"51.104.165.162/32\",\r\n \"51.105.66.64/26\",\r\n \"51.105.71.0/26\",\r\n + \ \"51.105.74.64/26\",\r\n \"51.107.58.128/27\",\r\n \"51.107.129.0/26\",\r\n + \ \"51.107.154.128/27\",\r\n \"51.107.245.0/24\",\r\n \"51.107.253.0/24\",\r\n + \ \"51.116.58.128/27\",\r\n \"51.116.73.0/24\",\r\n \"51.116.154.192/27\",\r\n + \ \"51.116.242.64/26\",\r\n \"51.116.245.192/27\",\r\n \"51.116.246.192/26\",\r\n + \ \"51.116.250.64/26\",\r\n \"51.116.254.0/26\",\r\n \"51.120.98.128/27\",\r\n + \ \"51.120.106.64/26\",\r\n \"51.120.210.64/26\",\r\n \"51.120.218.160/27\",\r\n + \ \"51.132.192.192/26\",\r\n \"51.138.214.0/24\",\r\n \"51.140.80.99/32\",\r\n + \ \"51.140.87.93/32\",\r\n \"51.140.125.8/32\",\r\n \"51.140.146.32/28\",\r\n + \ \"51.140.149.192/26\",\r\n \"51.140.189.52/32\",\r\n \"51.140.189.108/32\",\r\n + \ \"51.140.210.32/27\",\r\n \"51.141.14.113/32\",\r\n \"51.141.14.168/32\",\r\n + \ \"51.141.50.179/32\",\r\n \"51.144.238.23/32\",\r\n \"52.136.136.62/32\",\r\n + \ \"52.136.188.0/24\",\r\n \"52.138.90.0/28\",\r\n \"52.138.147.148/32\",\r\n + \ \"52.138.226.0/26\",\r\n \"52.139.4.118/32\",\r\n \"52.139.109.0/24\",\r\n + \ \"52.143.136.55/32\",\r\n \"52.147.115.0/24\",\r\n \"52.151.58.121/32\",\r\n + \ \"52.161.19.160/32\",\r\n \"52.161.24.64/32\",\r\n \"52.162.106.64/26\",\r\n + \ \"52.165.34.144/32\",\r\n \"52.165.179.109/32\",\r\n \"52.165.235.119/32\",\r\n + \ \"52.165.237.8/32\",\r\n \"52.167.106.0/26\",\r\n \"52.167.109.192/26\",\r\n + \ \"52.167.145.0/26\",\r\n \"52.168.14.144/32\",\r\n \"52.168.66.180/32\",\r\n + \ \"52.168.117.0/26\",\r\n \"52.168.146.69/32\",\r\n \"52.168.147.11/32\",\r\n + \ \"52.169.18.8/32\",\r\n \"52.172.119.0/24\",\r\n \"52.172.221.245/32\",\r\n + \ \"52.172.223.211/32\",\r\n \"52.173.199.106/32\",\r\n \"52.174.243.57/32\",\r\n + \ \"52.175.35.235/32\",\r\n \"52.176.47.198/32\",\r\n \"52.178.17.128/26\",\r\n + \ \"52.178.78.61/32\",\r\n \"52.178.211.227/32\",\r\n \"52.179.6.240/32\",\r\n + \ \"52.179.8.35/32\",\r\n \"52.179.157.59/32\",\r\n \"52.180.180.228/32\",\r\n + \ \"52.180.182.75/32\",\r\n \"52.182.138.128/26\",\r\n \"52.182.143.64/26\",\r\n + \ \"52.183.46.73/32\",\r\n \"52.183.86.102/32\",\r\n \"52.187.2.226/32\",\r\n + \ \"52.187.59.188/32\",\r\n \"52.187.61.82/32\",\r\n \"52.187.185.159/32\",\r\n + \ \"52.191.213.188/32\",\r\n \"52.191.228.245/32\",\r\n \"52.225.184.224/32\",\r\n + \ \"52.225.186.130/32\",\r\n \"52.226.36.235/32\",\r\n \"52.231.18.16/28\",\r\n + \ \"52.231.29.105/32\",\r\n \"52.231.32.85/32\",\r\n \"52.231.32.94/32\",\r\n + \ \"52.231.146.32/27\",\r\n \"52.231.200.144/32\",\r\n \"52.231.200.153/32\",\r\n + \ \"52.231.207.155/32\",\r\n \"52.232.27.189/32\",\r\n \"52.233.30.41/32\",\r\n + \ \"52.233.190.35/32\",\r\n \"52.233.192.247/32\",\r\n \"52.236.186.0/26\",\r\n + \ \"52.237.33.36/32\",\r\n \"52.237.33.104/32\",\r\n \"52.237.143.176/32\",\r\n + \ \"52.242.20.204/32\",\r\n \"52.243.36.161/32\",\r\n \"52.246.154.64/26\",\r\n + \ \"52.246.159.0/26\",\r\n \"65.52.129.16/32\",\r\n \"65.52.250.32/27\",\r\n + \ \"102.37.65.0/26\",\r\n \"102.37.72.64/26\",\r\n \"102.37.83.0/24\",\r\n + \ \"102.37.165.0/24\",\r\n \"102.133.26.128/26\",\r\n \"102.133.122.64/26\",\r\n + \ \"102.133.127.0/26\",\r\n \"102.133.154.128/26\",\r\n \"102.133.250.64/26\",\r\n + \ \"102.133.254.0/26\",\r\n \"104.40.26.199/32\",\r\n \"104.40.29.113/32\",\r\n + \ \"104.40.68.250/32\",\r\n \"104.40.69.64/32\",\r\n \"104.40.150.139/32\",\r\n + \ \"104.40.179.185/32\",\r\n \"104.40.216.174/32\",\r\n \"104.41.63.213/32\",\r\n + \ \"104.41.201.10/32\",\r\n \"104.42.97.95/32\",\r\n \"104.43.18.219/32\",\r\n + \ \"104.43.168.200/32\",\r\n \"104.43.192.43/32\",\r\n \"104.43.192.222/32\",\r\n + \ \"104.44.129.14/32\",\r\n \"104.44.129.59/32\",\r\n \"104.45.135.34/32\",\r\n + \ \"104.45.147.24/32\",\r\n \"104.46.32.56/32\",\r\n \"104.46.32.58/32\",\r\n + \ \"104.46.98.9/32\",\r\n \"104.46.98.73/32\",\r\n \"104.46.99.176/32\",\r\n + \ \"104.208.16.0/26\",\r\n \"104.208.144.0/26\",\r\n \"104.208.237.147/32\",\r\n + \ \"104.209.186.70/32\",\r\n \"104.210.14.49/32\",\r\n \"104.210.106.31/32\",\r\n + \ \"104.210.146.250/32\",\r\n \"104.211.81.0/28\",\r\n \"104.211.98.185/32\",\r\n + \ \"104.211.102.58/32\",\r\n \"104.211.146.32/27\",\r\n \"104.211.160.121/32\",\r\n + \ \"104.211.160.144/32\",\r\n \"104.211.224.190/32\",\r\n + \ \"104.211.224.238/32\",\r\n \"104.214.18.128/27\",\r\n + \ \"104.214.70.229/32\",\r\n \"137.116.48.46/32\",\r\n \"137.116.77.157/32\",\r\n + \ \"137.116.91.178/32\",\r\n \"137.116.157.26/32\",\r\n \"137.116.158.30/32\",\r\n + \ \"137.117.85.236/32\",\r\n \"137.117.89.253/32\",\r\n \"137.117.91.152/32\",\r\n + \ \"137.135.102.226/32\",\r\n \"138.91.1.105/32\",\r\n \"138.91.17.38/32\",\r\n + \ \"138.91.17.85/32\",\r\n \"138.91.193.184/32\",\r\n \"168.61.92.197/32\",\r\n + \ \"168.61.143.128/26\",\r\n \"168.61.148.205/32\",\r\n \"168.62.52.235/32\",\r\n + \ \"168.62.234.250/32\",\r\n \"168.62.237.3/32\",\r\n \"168.62.249.226/32\",\r\n + \ \"168.63.141.27/32\",\r\n \"191.233.9.64/27\",\r\n \"191.233.73.228/32\",\r\n + \ \"191.233.203.0/28\",\r\n \"191.234.146.64/26\",\r\n \"191.234.150.192/26\",\r\n + \ \"191.234.154.64/26\",\r\n \"191.236.32.73/32\",\r\n \"191.236.32.191/32\",\r\n + \ \"191.236.35.225/32\",\r\n \"191.236.128.253/32\",\r\n + \ \"191.236.129.107/32\",\r\n \"191.237.47.93/32\",\r\n \"191.237.129.158/32\",\r\n + \ \"191.237.224.0/26\",\r\n \"191.238.75.0/24\",\r\n \"191.238.99.131/32\",\r\n + \ \"191.238.160.221/32\",\r\n \"191.239.64.142/32\",\r\n + \ \"191.239.64.144/32\",\r\n \"191.239.160.45/32\",\r\n \"191.239.160.178/32\",\r\n + \ \"207.46.153.127/32\",\r\n \"207.46.154.16/32\",\r\n \"207.46.227.14/32\",\r\n + \ \"2603:1000:4::240/122\",\r\n \"2603:1000:4:2::/120\",\r\n + \ \"2603:1000:4:402::1c0/123\",\r\n \"2603:1000:104:1::240/122\",\r\n + \ \"2603:1000:104:2::500/120\",\r\n \"2603:1000:104:402::1c0/123\",\r\n + \ \"2603:1000:104:802::160/123\",\r\n \"2603:1000:104:c02::160/123\",\r\n + \ \"2603:1010:6:1::240/122\",\r\n \"2603:1010:6:2::400/120\",\r\n + \ \"2603:1010:6:402::1c0/123\",\r\n \"2603:1010:6:802::160/123\",\r\n + \ \"2603:1010:6:c02::160/123\",\r\n \"2603:1010:101::240/122\",\r\n + \ \"2603:1010:101:402::1c0/123\",\r\n \"2603:1010:304::240/122\",\r\n + \ \"2603:1010:304:2::/120\",\r\n \"2603:1010:304:402::1c0/123\",\r\n + \ \"2603:1010:404::240/122\",\r\n \"2603:1010:404:2::/120\",\r\n + \ \"2603:1010:404:402::1c0/123\",\r\n \"2603:1020:5:1::240/122\",\r\n + \ \"2603:1020:5:402::1c0/123\",\r\n \"2603:1020:5:802::160/123\",\r\n + \ \"2603:1020:5:c02::160/123\",\r\n \"2603:1020:206:1::240/122\",\r\n + \ \"2603:1020:206:4::100/120\",\r\n \"2603:1020:206:402::1c0/123\",\r\n + \ \"2603:1020:206:802::160/123\",\r\n \"2603:1020:206:c02::160/123\",\r\n + \ \"2603:1020:305::240/122\",\r\n \"2603:1020:305:402::1c0/123\",\r\n + \ \"2603:1020:405::240/122\",\r\n \"2603:1020:405:402::1c0/123\",\r\n + \ \"2603:1020:605::240/122\",\r\n \"2603:1020:605:2::/120\",\r\n + \ \"2603:1020:605:402::1c0/123\",\r\n \"2603:1020:705:1::240/122\",\r\n + \ \"2603:1020:705:2::400/120\",\r\n \"2603:1020:705:402::1c0/123\",\r\n + \ \"2603:1020:705:802::160/123\",\r\n \"2603:1020:705:c02::160/123\",\r\n + \ \"2603:1020:805:1::240/122\",\r\n \"2603:1020:805:2::200/120\",\r\n + \ \"2603:1020:805:402::1c0/123\",\r\n \"2603:1020:805:802::160/123\",\r\n + \ \"2603:1020:805:c02::160/123\",\r\n \"2603:1020:905::240/122\",\r\n + \ \"2603:1020:905:2::/120\",\r\n \"2603:1020:905:402::1c0/123\",\r\n + \ \"2603:1020:a04:1::240/122\",\r\n \"2603:1020:a04:2::200/120\",\r\n + \ \"2603:1020:a04:402::1c0/123\",\r\n \"2603:1020:a04:802::160/123\",\r\n + \ \"2603:1020:a04:c02::160/123\",\r\n \"2603:1020:b04::240/122\",\r\n + \ \"2603:1020:b04:2::/120\",\r\n \"2603:1020:b04:402::1c0/123\",\r\n + \ \"2603:1020:c04:1::240/122\",\r\n \"2603:1020:c04:2::200/120\",\r\n + \ \"2603:1020:c04:402::1c0/123\",\r\n \"2603:1020:c04:802::160/123\",\r\n + \ \"2603:1020:c04:c02::160/123\",\r\n \"2603:1020:d04::240/122\",\r\n + \ \"2603:1020:d04:1::600/120\",\r\n \"2603:1020:d04:402::1c0/123\",\r\n + \ \"2603:1020:e04:1::240/122\",\r\n \"2603:1020:e04:3::600/120\",\r\n + \ \"2603:1020:e04:402::1c0/123\",\r\n \"2603:1020:e04:802::160/123\",\r\n + \ \"2603:1020:e04:c02::160/123\",\r\n \"2603:1020:f04::240/122\",\r\n + \ \"2603:1020:f04:3::/120\",\r\n \"2603:1020:f04:402::1c0/123\",\r\n + \ \"2603:1020:1004::240/122\",\r\n \"2603:1020:1004:2::400/120\",\r\n + \ \"2603:1020:1004:400::2c0/123\",\r\n \"2603:1020:1004:c02::c0/123\",\r\n + \ \"2603:1020:1104:400::1c0/123\",\r\n \"2603:1030:f:1::240/122\",\r\n + \ \"2603:1030:f:3::200/122\",\r\n \"2603:1030:f:3::400/120\",\r\n + \ \"2603:1030:f:400::9c0/123\",\r\n \"2603:1030:10:1::240/122\",\r\n + \ \"2603:1030:10:402::1c0/123\",\r\n \"2603:1030:10:802::160/123\",\r\n + \ \"2603:1030:10:c02::160/123\",\r\n \"2603:1030:104:1::240/122\",\r\n + \ \"2603:1030:104:2::300/120\",\r\n \"2603:1030:104:402::1c0/123\",\r\n + \ \"2603:1030:104:402::660/123\",\r\n \"2603:1030:104:802::180/123\",\r\n + \ \"2603:1030:107:1::500/120\",\r\n \"2603:1030:107:400::140/123\",\r\n + \ \"2603:1030:210:1::240/122\",\r\n \"2603:1030:210:402::1c0/123\",\r\n + \ \"2603:1030:210:802::160/123\",\r\n \"2603:1030:210:c02::160/123\",\r\n + \ \"2603:1030:302::200/120\",\r\n \"2603:1030:40b:1::240/122\",\r\n + \ \"2603:1030:40b:2::4c0/122\",\r\n \"2603:1030:40b:3::/120\",\r\n + \ \"2603:1030:40b:400::9c0/123\",\r\n \"2603:1030:40b:800::160/123\",\r\n + \ \"2603:1030:40b:c00::160/123\",\r\n \"2603:1030:40c:1::240/122\",\r\n + \ \"2603:1030:40c:402::1c0/123\",\r\n \"2603:1030:40c:802::160/123\",\r\n + \ \"2603:1030:40c:c02::160/123\",\r\n \"2603:1030:504:1::240/122\",\r\n + \ \"2603:1030:504:2::400/120\",\r\n \"2603:1030:504:402::2c0/123\",\r\n + \ \"2603:1030:504:802::240/123\",\r\n \"2603:1030:504:c02::c0/123\",\r\n + \ \"2603:1030:608::240/122\",\r\n \"2603:1030:608:1::600/120\",\r\n + \ \"2603:1030:608:402::1c0/123\",\r\n \"2603:1030:807:1::240/122\",\r\n + \ \"2603:1030:807:402::1c0/123\",\r\n \"2603:1030:807:802::160/123\",\r\n + \ \"2603:1030:807:c02::160/123\",\r\n \"2603:1030:a07::240/122\",\r\n + \ \"2603:1030:a07:1::600/120\",\r\n \"2603:1030:a07:402::140/123\",\r\n + \ \"2603:1030:b04::240/122\",\r\n \"2603:1030:b04:1::600/120\",\r\n + \ \"2603:1030:b04:402::1c0/123\",\r\n \"2603:1030:c06:1::240/122\",\r\n + \ \"2603:1030:c06:2::600/120\",\r\n \"2603:1030:c06:400::9c0/123\",\r\n + \ \"2603:1030:c06:802::160/123\",\r\n \"2603:1030:c06:c02::160/123\",\r\n + \ \"2603:1030:f05:1::240/122\",\r\n \"2603:1030:f05:2::400/120\",\r\n + \ \"2603:1030:f05:402::1c0/123\",\r\n \"2603:1030:f05:802::160/123\",\r\n + \ \"2603:1030:f05:c02::160/123\",\r\n \"2603:1030:1005::240/122\",\r\n + \ \"2603:1030:1005:2::/120\",\r\n \"2603:1030:1005:402::1c0/123\",\r\n + \ \"2603:1040:5:1::240/122\",\r\n \"2603:1040:5:402::1c0/123\",\r\n + \ \"2603:1040:5:802::160/123\",\r\n \"2603:1040:5:c02::160/123\",\r\n + \ \"2603:1040:207::240/122\",\r\n \"2603:1040:207:2::100/120\",\r\n + \ \"2603:1040:207:402::1c0/123\",\r\n \"2603:1040:407:1::240/122\",\r\n + \ \"2603:1040:407:2::200/120\",\r\n \"2603:1040:407:402::1c0/123\",\r\n + \ \"2603:1040:407:802::160/123\",\r\n \"2603:1040:407:c02::160/123\",\r\n + \ \"2603:1040:606::240/122\",\r\n \"2603:1040:606:2::/120\",\r\n + \ \"2603:1040:606:402::1c0/123\",\r\n \"2603:1040:806::240/122\",\r\n + \ \"2603:1040:806:2::/120\",\r\n \"2603:1040:806:402::1c0/123\",\r\n + \ \"2603:1040:904:1::240/122\",\r\n \"2603:1040:904:2::200/120\",\r\n + \ \"2603:1040:904:402::1c0/123\",\r\n \"2603:1040:904:802::160/123\",\r\n + \ \"2603:1040:904:c02::160/123\",\r\n \"2603:1040:a06:1::240/122\",\r\n + \ \"2603:1040:a06:2::700/120\",\r\n \"2603:1040:a06:402::1c0/123\",\r\n + \ \"2603:1040:a06:802::160/123\",\r\n \"2603:1040:a06:c02::160/123\",\r\n + \ \"2603:1040:b04::240/122\",\r\n \"2603:1040:b04:2::/120\",\r\n + \ \"2603:1040:b04:402::1c0/123\",\r\n \"2603:1040:c06::240/122\",\r\n + \ \"2603:1040:c06:2::/120\",\r\n \"2603:1040:c06:402::1c0/123\",\r\n + \ \"2603:1040:d04::240/122\",\r\n \"2603:1040:d04:2::500/120\",\r\n + \ \"2603:1040:d04:400::2c0/123\",\r\n \"2603:1040:d04:c02::c0/123\",\r\n + \ \"2603:1040:e05::500/120\",\r\n \"2603:1040:f05:1::240/122\",\r\n + \ \"2603:1040:f05:2::600/120\",\r\n \"2603:1040:f05:402::1c0/123\",\r\n + \ \"2603:1040:f05:802::160/123\",\r\n \"2603:1040:f05:c02::160/123\",\r\n + \ \"2603:1040:1002:1::200/120\",\r\n \"2603:1040:1104:400::1c0/123\",\r\n + \ \"2603:1050:6:1::240/122\",\r\n \"2603:1050:6:2::200/120\",\r\n + \ \"2603:1050:6:402::1c0/123\",\r\n \"2603:1050:6:802::160/123\",\r\n + \ \"2603:1050:6:c02::160/123\",\r\n \"2603:1050:403::240/122\",\r\n + \ \"2603:1050:403:2::/120\",\r\n \"2603:1050:403:400::1c0/123\",\r\n + \ \"2603:10e1:100:2::1435:5552/128\",\r\n \"2603:10e1:100:2::144c:f22d/128\",\r\n + \ \"2603:10e1:100:2::14c3:6100/128\",\r\n \"2603:10e1:100:2::287d:67fb/128\",\r\n + \ \"2603:10e1:100:2::3368:a5a2/128\",\r\n \"2603:10e1:100:2::348b:476/128\",\r\n + \ \"2603:10e1:100:2::34bf:e4f5/128\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.AustraliaCentral\",\r\n \"id\": \"EventHub.AustraliaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"australiacentral\",\r\n \"state\": + \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.36.46.142/32\",\r\n + \ \"20.36.106.192/27\",\r\n \"20.53.51.0/24\",\r\n \"2603:1010:304::240/122\",\r\n + \ \"2603:1010:304:2::/120\",\r\n \"2603:1010:304:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.AustraliaCentral2\",\r\n + \ \"id\": \"EventHub.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.36.74.130/32\",\r\n + \ \"20.36.114.32/27\",\r\n \"20.53.59.0/24\",\r\n \"2603:1010:404::240/122\",\r\n + \ \"2603:1010:404:2::/120\",\r\n \"2603:1010:404:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.AustraliaEast\",\r\n + \ \"id\": \"EventHub.AustraliaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.70.72.0/28\",\r\n \"13.70.79.16/28\",\r\n \"13.70.114.64/26\",\r\n + \ \"13.72.254.134/32\",\r\n \"20.53.85.82/32\",\r\n \"20.70.219.0/24\",\r\n + \ \"40.79.162.0/28\",\r\n \"40.79.166.192/26\",\r\n \"40.79.170.32/28\",\r\n + \ \"40.79.174.128/26\",\r\n \"104.210.106.31/32\",\r\n \"191.239.64.142/32\",\r\n + \ \"191.239.64.144/32\",\r\n \"2603:1010:6:1::240/122\",\r\n + \ \"2603:1010:6:2::400/120\",\r\n \"2603:1010:6:402::1c0/123\",\r\n + \ \"2603:1010:6:802::160/123\",\r\n \"2603:1010:6:c02::160/123\",\r\n + \ \"2603:10e1:100:2::1435:5552/128\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.AustraliaSoutheast\",\r\n \"id\": + \"EventHub.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.77.50.32/27\",\r\n \"20.92.2.0/24\",\r\n \"40.115.79.2/32\",\r\n + \ \"40.127.83.123/32\",\r\n \"191.239.160.45/32\",\r\n \"191.239.160.178/32\",\r\n + \ \"2603:1010:101::240/122\",\r\n \"2603:1010:101:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.BrazilSouth\",\r\n + \ \"id\": \"EventHub.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.195.137.192/26\",\r\n \"20.195.152.64/26\",\r\n + \ \"23.97.97.36/32\",\r\n \"23.97.103.3/32\",\r\n \"104.41.63.213/32\",\r\n + \ \"191.233.203.0/28\",\r\n \"191.234.146.64/26\",\r\n \"191.234.150.192/26\",\r\n + \ \"191.234.154.64/26\",\r\n \"191.238.75.0/24\",\r\n \"2603:1050:6:1::240/122\",\r\n + \ \"2603:1050:6:2::200/120\",\r\n \"2603:1050:6:402::1c0/123\",\r\n + \ \"2603:1050:6:802::160/123\",\r\n \"2603:1050:6:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.BrazilSoutheast\",\r\n + \ \"id\": \"EventHub.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.195.150.160/27\",\r\n \"20.195.150.192/26\",\r\n + \ \"20.195.151.0/25\",\r\n \"23.97.120.51/32\",\r\n \"191.233.9.64/27\",\r\n + \ \"191.237.224.0/26\",\r\n \"2603:1050:403::240/122\",\r\n + \ \"2603:1050:403:2::/120\",\r\n \"2603:1050:403:400::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.CanadaCentral\",\r\n + \ \"id\": \"EventHub.CanadaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.71.170.16/28\",\r\n \"13.71.177.128/26\",\r\n + \ \"20.38.146.64/26\",\r\n \"20.48.200.128/26\",\r\n \"20.151.32.64/26\",\r\n + \ \"40.85.226.62/32\",\r\n \"40.85.229.32/32\",\r\n \"52.139.4.118/32\",\r\n + \ \"52.233.30.41/32\",\r\n \"52.237.33.36/32\",\r\n \"52.237.33.104/32\",\r\n + \ \"52.246.154.64/26\",\r\n \"52.246.159.0/26\",\r\n \"2603:1030:f05:1::240/122\",\r\n + \ \"2603:1030:f05:2::400/120\",\r\n \"2603:1030:f05:402::1c0/123\",\r\n + \ \"2603:1030:f05:802::160/123\",\r\n \"2603:1030:f05:c02::160/123\",\r\n + \ \"2603:10e1:100:2::348b:476/128\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.CanadaEast\",\r\n \"id\": \"EventHub.CanadaEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"40.69.106.32/27\",\r\n + \ \"40.86.225.142/32\",\r\n \"40.86.230.119/32\",\r\n \"52.139.109.0/24\",\r\n + \ \"52.242.20.204/32\",\r\n \"2603:1030:1005::240/122\",\r\n + \ \"2603:1030:1005:2::/120\",\r\n \"2603:1030:1005:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.CentralIndia\",\r\n + \ \"id\": \"EventHub.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.71.30.214/32\",\r\n \"20.43.126.64/26\",\r\n + \ \"20.192.98.64/26\",\r\n \"20.192.102.0/26\",\r\n \"20.192.168.0/26\",\r\n + \ \"40.80.50.64/26\",\r\n \"52.172.221.245/32\",\r\n \"52.172.223.211/32\",\r\n + \ \"104.211.81.0/28\",\r\n \"104.211.98.185/32\",\r\n \"104.211.102.58/32\",\r\n + \ \"2603:1040:a06:1::240/122\",\r\n \"2603:1040:a06:2::700/120\",\r\n + \ \"2603:1040:a06:402::1c0/123\",\r\n \"2603:1040:a06:802::160/123\",\r\n + \ \"2603:1040:a06:c02::160/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.CentralUS\",\r\n \"id\": \"EventHub.CentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.89.58.37/32\",\r\n + \ \"13.89.59.231/32\",\r\n \"13.89.170.128/26\",\r\n \"13.89.178.112/28\",\r\n + \ \"20.44.13.64/26\",\r\n \"23.99.128.69/32\",\r\n \"23.99.129.170/32\",\r\n + \ \"23.99.192.254/32\",\r\n \"23.99.196.56/32\",\r\n \"23.99.228.174/32\",\r\n + \ \"40.86.77.12/32\",\r\n \"40.86.102.100/32\",\r\n \"40.122.173.108/32\",\r\n + \ \"40.122.213.155/32\",\r\n \"52.165.34.144/32\",\r\n \"52.165.179.109/32\",\r\n + \ \"52.165.235.119/32\",\r\n \"52.165.237.8/32\",\r\n \"52.173.199.106/32\",\r\n + \ \"52.176.47.198/32\",\r\n \"52.182.138.128/26\",\r\n \"52.182.143.64/26\",\r\n + \ \"104.43.168.200/32\",\r\n \"104.43.192.43/32\",\r\n \"104.43.192.222/32\",\r\n + \ \"104.208.16.0/26\",\r\n \"168.61.148.205/32\",\r\n \"2603:1030:10:1::240/122\",\r\n + \ \"2603:1030:10:402::1c0/123\",\r\n \"2603:1030:10:802::160/123\",\r\n + \ \"2603:1030:10:c02::160/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.CentralUSEUAP\",\r\n \"id\": \"EventHub.CentralUSEUAP\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.45.240.128/25\",\r\n + \ \"20.45.241.0/26\",\r\n \"20.46.15.64/26\",\r\n \"40.78.202.32/27\",\r\n + \ \"52.180.180.228/32\",\r\n \"52.180.182.75/32\",\r\n \"168.61.143.128/26\",\r\n + \ \"2603:1030:f:1::240/122\",\r\n \"2603:1030:f:3::200/122\",\r\n + \ \"2603:1030:f:3::400/120\",\r\n \"2603:1030:f:400::9c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.EastAsia\",\r\n + \ \"id\": \"EventHub.EastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.75.34.64/26\",\r\n \"13.94.47.61/32\",\r\n \"20.195.77.0/24\",\r\n + \ \"20.205.75.128/26\",\r\n \"20.205.83.128/26\",\r\n \"23.97.67.90/32\",\r\n + \ \"23.99.118.48/32\",\r\n \"23.101.3.68/32\",\r\n \"23.101.8.229/32\",\r\n + \ \"23.102.234.49/32\",\r\n \"52.175.35.235/32\",\r\n \"168.63.141.27/32\",\r\n + \ \"207.46.153.127/32\",\r\n \"207.46.154.16/32\",\r\n \"2603:1040:207::240/122\",\r\n + \ \"2603:1040:207:2::100/120\",\r\n \"2603:1040:207:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.EastUS\",\r\n + \ \"id\": \"EventHub.EastUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \"region\": + \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.90.83.7/32\",\r\n \"13.90.208.184/32\",\r\n \"13.92.124.151/32\",\r\n + \ \"13.92.180.208/32\",\r\n \"13.92.190.184/32\",\r\n \"20.42.68.64/26\",\r\n + \ \"20.42.74.0/26\",\r\n \"20.88.153.0/26\",\r\n \"40.71.10.128/26\",\r\n + \ \"40.71.100.98/32\",\r\n \"40.76.29.197/32\",\r\n \"40.76.40.11/32\",\r\n + \ \"40.76.194.119/32\",\r\n \"40.78.226.128/26\",\r\n \"40.79.155.0/26\",\r\n + \ \"40.117.88.66/32\",\r\n \"40.121.84.50/32\",\r\n \"40.121.141.232/32\",\r\n + \ \"40.121.148.193/32\",\r\n \"52.168.14.144/32\",\r\n \"52.168.66.180/32\",\r\n + \ \"52.168.117.0/26\",\r\n \"52.168.146.69/32\",\r\n \"52.168.147.11/32\",\r\n + \ \"52.179.6.240/32\",\r\n \"52.179.8.35/32\",\r\n \"52.191.213.188/32\",\r\n + \ \"52.191.228.245/32\",\r\n \"52.226.36.235/32\",\r\n \"104.45.135.34/32\",\r\n + \ \"104.45.147.24/32\",\r\n \"137.117.85.236/32\",\r\n \"137.117.89.253/32\",\r\n + \ \"137.117.91.152/32\",\r\n \"137.135.102.226/32\",\r\n + \ \"168.62.52.235/32\",\r\n \"191.236.32.73/32\",\r\n \"191.236.32.191/32\",\r\n + \ \"191.236.35.225/32\",\r\n \"191.237.47.93/32\",\r\n \"2603:1030:210:1::240/122\",\r\n + \ \"2603:1030:210:402::1c0/123\",\r\n \"2603:1030:210:802::160/123\",\r\n + \ \"2603:1030:210:c02::160/123\",\r\n \"2603:10e1:100:2::34bf:e4f5/128\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.EastUS2\",\r\n + \ \"id\": \"EventHub.EastUS2\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.68.20.101/32\",\r\n \"13.68.21.169/32\",\r\n + \ \"13.68.77.215/32\",\r\n \"20.36.144.64/26\",\r\n \"20.62.62.0/24\",\r\n + \ \"40.70.78.154/32\",\r\n \"40.70.146.0/26\",\r\n \"40.79.44.59/32\",\r\n + \ \"40.79.74.86/32\",\r\n \"52.167.106.0/26\",\r\n \"52.167.109.192/26\",\r\n + \ \"52.167.145.0/26\",\r\n \"52.179.157.59/32\",\r\n \"104.46.98.9/32\",\r\n + \ \"104.46.98.73/32\",\r\n \"104.46.99.176/32\",\r\n \"104.208.144.0/26\",\r\n + \ \"104.208.237.147/32\",\r\n \"104.209.186.70/32\",\r\n + \ \"104.210.14.49/32\",\r\n \"137.116.48.46/32\",\r\n \"137.116.77.157/32\",\r\n + \ \"137.116.91.178/32\",\r\n \"191.237.129.158/32\",\r\n + \ \"2603:1030:40c:1::240/122\",\r\n \"2603:1030:40c:402::1c0/123\",\r\n + \ \"2603:1030:40c:802::160/123\",\r\n \"2603:1030:40c:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.EastUS2EUAP\",\r\n + \ \"id\": \"EventHub.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.47.216.64/26\",\r\n \"20.51.22.128/26\",\r\n + \ \"20.51.23.0/25\",\r\n \"20.51.23.128/26\",\r\n \"40.74.146.16/28\",\r\n + \ \"40.74.151.0/26\",\r\n \"40.75.34.0/28\",\r\n \"40.89.122.0/26\",\r\n + \ \"52.138.90.0/28\",\r\n \"52.225.184.224/32\",\r\n \"52.225.186.130/32\",\r\n + \ \"2603:1030:40b:1::240/122\",\r\n \"2603:1030:40b:2::4c0/122\",\r\n + \ \"2603:1030:40b:3::/120\",\r\n \"2603:1030:40b:400::9c0/123\",\r\n + \ \"2603:1030:40b:800::160/123\",\r\n \"2603:1030:40b:c00::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.FranceCentral\",\r\n + \ \"id\": \"EventHub.FranceCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"40.79.130.16/28\",\r\n \"40.79.138.0/28\",\r\n \"40.79.142.0/26\",\r\n + \ \"40.79.146.0/28\",\r\n \"40.79.149.64/26\",\r\n \"51.11.192.128/26\",\r\n + \ \"51.138.214.0/24\",\r\n \"52.143.136.55/32\",\r\n \"2603:1020:805:1::240/122\",\r\n + \ \"2603:1020:805:2::200/120\",\r\n \"2603:1020:805:402::1c0/123\",\r\n + \ \"2603:1020:805:802::160/123\",\r\n \"2603:1020:805:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.FranceSouth\",\r\n + \ \"id\": \"EventHub.FranceSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"40.79.178.32/27\",\r\n \"52.136.136.62/32\",\r\n + \ \"52.136.188.0/24\",\r\n \"2603:1020:905::240/122\",\r\n + \ \"2603:1020:905:2::/120\",\r\n \"2603:1020:905:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.GermanyNorth\",\r\n + \ \"id\": \"EventHub.GermanyNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"51.116.58.128/27\",\r\n \"51.116.73.0/24\",\r\n + \ \"2603:1020:d04::240/122\",\r\n \"2603:1020:d04:1::600/120\",\r\n + \ \"2603:1020:d04:402::1c0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.GermanyWestCentral\",\r\n \"id\": + \"EventHub.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.52.64.128/26\",\r\n \"20.52.92.0/24\",\r\n \"51.116.154.192/27\",\r\n + \ \"51.116.242.64/26\",\r\n \"51.116.245.192/27\",\r\n \"51.116.246.192/26\",\r\n + \ \"51.116.250.64/26\",\r\n \"51.116.254.0/26\",\r\n \"2603:1020:c04:1::240/122\",\r\n + \ \"2603:1020:c04:2::200/120\",\r\n \"2603:1020:c04:402::1c0/123\",\r\n + \ \"2603:1020:c04:802::160/123\",\r\n \"2603:1020:c04:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.JapanEast\",\r\n + \ \"id\": \"EventHub.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.71.154.11/32\",\r\n \"13.78.106.64/28\",\r\n + \ \"20.89.0.64/26\",\r\n \"20.89.10.0/24\",\r\n \"20.194.128.192/26\",\r\n + \ \"23.100.100.84/32\",\r\n \"40.79.186.32/27\",\r\n \"40.79.191.128/26\",\r\n + \ \"40.79.194.192/26\",\r\n \"52.243.36.161/32\",\r\n \"138.91.1.105/32\",\r\n + \ \"2603:1040:407:1::240/122\",\r\n \"2603:1040:407:2::200/120\",\r\n + \ \"2603:1040:407:402::1c0/123\",\r\n \"2603:1040:407:802::160/123\",\r\n + \ \"2603:1040:407:c02::160/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.JapanWest\",\r\n \"id\": \"EventHub.JapanWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.189.231.0/24\",\r\n + \ \"40.74.100.0/27\",\r\n \"40.74.141.187/32\",\r\n \"138.91.17.38/32\",\r\n + \ \"138.91.17.85/32\",\r\n \"2603:1040:606::240/122\",\r\n + \ \"2603:1040:606:2::/120\",\r\n \"2603:1040:606:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.JioIndiaCentral\",\r\n + \ \"id\": \"EventHub.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.192.33.64/26\",\r\n + \ \"20.192.51.96/27\",\r\n \"20.192.51.128/25\",\r\n \"20.192.55.0/26\",\r\n + \ \"20.192.225.160/27\",\r\n \"20.192.234.32/27\",\r\n \"2603:1040:1104:400::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.JioIndiaWest\",\r\n + \ \"id\": \"EventHub.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.192.161.64/27\",\r\n \"20.193.195.32/27\",\r\n + \ \"20.193.195.64/26\",\r\n \"20.193.195.128/25\",\r\n \"20.193.202.32/27\",\r\n + \ \"20.193.204.192/26\",\r\n \"2603:1040:d04::240/122\",\r\n + \ \"2603:1040:d04:2::500/120\",\r\n \"2603:1040:d04:400::2c0/123\",\r\n + \ \"2603:1040:d04:c02::c0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.KoreaCentral\",\r\n \"id\": \"EventHub.KoreaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.44.26.64/26\",\r\n + \ \"20.44.31.128/26\",\r\n \"20.194.68.192/26\",\r\n \"20.194.80.0/26\",\r\n + \ \"20.200.193.0/24\",\r\n \"52.231.18.16/28\",\r\n \"52.231.29.105/32\",\r\n + \ \"52.231.32.85/32\",\r\n \"52.231.32.94/32\",\r\n \"2603:1040:f05:1::240/122\",\r\n + \ \"2603:1040:f05:2::600/120\",\r\n \"2603:1040:f05:402::1c0/123\",\r\n + \ \"2603:1040:f05:802::160/123\",\r\n \"2603:1040:f05:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.KoreaSouth\",\r\n + \ \"id\": \"EventHub.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"52.147.115.0/24\",\r\n \"52.231.146.32/27\",\r\n + \ \"52.231.200.144/32\",\r\n \"52.231.200.153/32\",\r\n \"52.231.207.155/32\",\r\n + \ \"2603:1040:e05::500/120\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.NorthCentralUS\",\r\n \"id\": \"EventHub.NorthCentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.51.3.0/24\",\r\n + \ \"23.96.214.181/32\",\r\n \"23.96.253.236/32\",\r\n \"52.162.106.64/26\",\r\n + \ \"52.237.143.176/32\",\r\n \"168.62.234.250/32\",\r\n \"168.62.237.3/32\",\r\n + \ \"168.62.249.226/32\",\r\n \"191.236.128.253/32\",\r\n + \ \"191.236.129.107/32\",\r\n \"2603:1030:608::240/122\",\r\n + \ \"2603:1030:608:1::600/120\",\r\n \"2603:1030:608:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.NorthEurope\",\r\n + \ \"id\": \"EventHub.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.69.227.0/26\",\r\n \"13.69.239.0/26\",\r\n \"13.69.253.135/32\",\r\n + \ \"13.69.255.140/32\",\r\n \"13.74.107.0/26\",\r\n \"20.50.72.64/26\",\r\n + \ \"20.50.80.64/26\",\r\n \"20.82.245.0/24\",\r\n \"23.102.0.186/32\",\r\n + \ \"23.102.0.239/32\",\r\n \"23.102.53.113/32\",\r\n \"40.69.29.216/32\",\r\n + \ \"40.69.217.246/32\",\r\n \"40.127.132.254/32\",\r\n \"51.104.165.162/32\",\r\n + \ \"52.138.147.148/32\",\r\n \"52.138.226.0/26\",\r\n \"52.169.18.8/32\",\r\n + \ \"52.178.211.227/32\",\r\n \"104.41.201.10/32\",\r\n \"168.61.92.197/32\",\r\n + \ \"191.238.99.131/32\",\r\n \"2603:1020:5:1::240/122\",\r\n + \ \"2603:1020:5:402::1c0/123\",\r\n \"2603:1020:5:802::160/123\",\r\n + \ \"2603:1020:5:c02::160/123\",\r\n \"2603:10e1:100:2::3368:a5a2/128\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.NorwayEast\",\r\n + \ \"id\": \"EventHub.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.100.0.0/26\",\r\n \"51.13.0.192/26\",\r\n \"51.120.98.128/27\",\r\n + \ \"51.120.106.64/26\",\r\n \"51.120.210.64/26\",\r\n \"2603:1020:e04:1::240/122\",\r\n + \ \"2603:1020:e04:3::600/120\",\r\n \"2603:1020:e04:402::1c0/123\",\r\n + \ \"2603:1020:e04:802::160/123\",\r\n \"2603:1020:e04:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.NorwayWest\",\r\n + \ \"id\": \"EventHub.NorwayWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"51.13.140.0/24\",\r\n \"51.120.218.160/27\",\r\n + \ \"2603:1020:f04::240/122\",\r\n \"2603:1020:f04:3::/120\",\r\n + \ \"2603:1020:f04:402::1c0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.SouthAfricaNorth\",\r\n \"id\": \"EventHub.SouthAfricaNorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"southafricanorth\",\r\n \"state\": + \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"102.37.72.64/26\",\r\n + \ \"102.37.165.0/24\",\r\n \"102.133.122.64/26\",\r\n \"102.133.127.0/26\",\r\n + \ \"102.133.154.128/26\",\r\n \"102.133.250.64/26\",\r\n + \ \"102.133.254.0/26\",\r\n \"2603:1000:104:1::240/122\",\r\n + \ \"2603:1000:104:2::500/120\",\r\n \"2603:1000:104:402::1c0/123\",\r\n + \ \"2603:1000:104:802::160/123\",\r\n \"2603:1000:104:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.SouthAfricaWest\",\r\n + \ \"id\": \"EventHub.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"102.37.65.0/26\",\r\n + \ \"102.37.83.0/24\",\r\n \"102.133.26.128/26\",\r\n \"2603:1000:4::240/122\",\r\n + \ \"2603:1000:4:2::/120\",\r\n \"2603:1000:4:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.SouthCentralUS\",\r\n + \ \"id\": \"EventHub.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.65.209.24/32\",\r\n + \ \"13.84.145.196/32\",\r\n \"20.45.122.64/26\",\r\n \"20.45.126.192/26\",\r\n + \ \"20.49.93.64/27\",\r\n \"20.49.93.128/27\",\r\n \"20.49.95.128/26\",\r\n + \ \"20.97.32.192/26\",\r\n \"23.102.128.15/32\",\r\n \"23.102.160.39/32\",\r\n + \ \"23.102.161.227/32\",\r\n \"23.102.163.4/32\",\r\n \"23.102.165.127/32\",\r\n + \ \"23.102.167.73/32\",\r\n \"23.102.180.26/32\",\r\n \"40.84.150.241/32\",\r\n + \ \"40.84.185.67/32\",\r\n \"40.124.65.64/26\",\r\n \"104.44.129.14/32\",\r\n + \ \"104.44.129.59/32\",\r\n \"104.210.146.250/32\",\r\n \"104.214.18.128/27\",\r\n + \ \"104.214.70.229/32\",\r\n \"191.238.160.221/32\",\r\n + \ \"2603:1030:807:1::240/122\",\r\n \"2603:1030:807:402::1c0/123\",\r\n + \ \"2603:1030:807:802::160/123\",\r\n \"2603:1030:807:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.SouthCentralUSSTG\",\r\n + \ \"id\": \"EventHub.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.44.2.128/26\",\r\n \"20.45.117.128/26\",\r\n + \ \"2603:1030:302::200/120\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.SoutheastAsia\",\r\n \"id\": \"EventHub.SoutheastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.67.8.64/27\",\r\n + \ \"13.67.20.64/26\",\r\n \"13.76.179.223/32\",\r\n \"13.76.216.217/32\",\r\n + \ \"20.195.81.0/24\",\r\n \"20.195.97.0/32\",\r\n \"23.98.64.92/32\",\r\n + \ \"23.98.65.24/32\",\r\n \"23.98.82.64/27\",\r\n \"23.98.87.192/26\",\r\n + \ \"23.98.112.192/26\",\r\n \"40.78.234.0/27\",\r\n \"52.187.2.226/32\",\r\n + \ \"52.187.59.188/32\",\r\n \"52.187.61.82/32\",\r\n \"52.187.185.159/32\",\r\n + \ \"104.43.18.219/32\",\r\n \"137.116.157.26/32\",\r\n \"137.116.158.30/32\",\r\n + \ \"207.46.227.14/32\",\r\n \"2603:1040:5:1::240/122\",\r\n + \ \"2603:1040:5:402::1c0/123\",\r\n \"2603:1040:5:802::160/123\",\r\n + \ \"2603:1040:5:c02::160/123\",\r\n \"2603:10e1:100:2::14c3:6100/128\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.SouthIndia\",\r\n + \ \"id\": \"EventHub.SouthIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.71.123.78/32\",\r\n \"40.78.194.32/27\",\r\n + \ \"52.172.119.0/24\",\r\n \"104.211.224.190/32\",\r\n \"104.211.224.238/32\",\r\n + \ \"2603:1040:c06::240/122\",\r\n \"2603:1040:c06:2::/120\",\r\n + \ \"2603:1040:c06:402::1c0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.SwedenCentral\",\r\n \"id\": \"EventHub.SwedenCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"51.12.30.0/24\",\r\n + \ \"51.12.98.160/27\",\r\n \"51.12.102.64/26\",\r\n \"51.12.226.64/26\",\r\n + \ \"51.12.234.64/26\",\r\n \"2603:1020:1004::240/122\",\r\n + \ \"2603:1020:1004:2::400/120\",\r\n \"2603:1020:1004:400::2c0/123\",\r\n + \ \"2603:1020:1004:c02::c0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.SwitzerlandNorth\",\r\n \"id\": \"EventHub.SwitzerlandNorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.208.19.64/26\",\r\n + \ \"51.103.203.64/26\",\r\n \"51.107.58.128/27\",\r\n \"51.107.129.0/26\",\r\n + \ \"51.107.245.0/24\",\r\n \"2603:1020:a04:1::240/122\",\r\n + \ \"2603:1020:a04:2::200/120\",\r\n \"2603:1020:a04:402::1c0/123\",\r\n + \ \"2603:1020:a04:802::160/123\",\r\n \"2603:1020:a04:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.SwitzerlandWest\",\r\n + \ \"id\": \"EventHub.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"51.107.154.128/27\",\r\n \"51.107.253.0/24\",\r\n + \ \"2603:1020:b04::240/122\",\r\n \"2603:1020:b04:2::/120\",\r\n + \ \"2603:1020:b04:402::1c0/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.UAECentral\",\r\n \"id\": \"EventHub.UAECentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.37.74.0/27\",\r\n + \ \"20.45.92.0/24\",\r\n \"2603:1040:b04::240/122\",\r\n + \ \"2603:1040:b04:2::/120\",\r\n \"2603:1040:b04:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.UAENorth\",\r\n + \ \"id\": \"EventHub.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"40.120.75.64/27\",\r\n \"40.120.78.0/26\",\r\n \"40.120.84.0/24\",\r\n + \ \"65.52.250.32/27\",\r\n \"2603:1040:904:1::240/122\",\r\n + \ \"2603:1040:904:2::200/120\",\r\n \"2603:1040:904:402::1c0/123\",\r\n + \ \"2603:1040:904:802::160/123\",\r\n \"2603:1040:904:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.UKSouth\",\r\n + \ \"id\": \"EventHub.UKSouth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.90.128.128/26\",\r\n \"51.105.66.64/26\",\r\n + \ \"51.105.71.0/26\",\r\n \"51.105.74.64/26\",\r\n \"51.132.192.192/26\",\r\n + \ \"51.140.80.99/32\",\r\n \"51.140.87.93/32\",\r\n \"51.140.125.8/32\",\r\n + \ \"51.140.146.32/28\",\r\n \"51.140.149.192/26\",\r\n \"51.140.189.52/32\",\r\n + \ \"51.140.189.108/32\",\r\n \"2603:1020:705:1::240/122\",\r\n + \ \"2603:1020:705:2::400/120\",\r\n \"2603:1020:705:402::1c0/123\",\r\n + \ \"2603:1020:705:802::160/123\",\r\n \"2603:1020:705:c02::160/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.UKWest\",\r\n + \ \"id\": \"EventHub.UKWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.58.69.0/24\",\r\n \"51.140.210.32/27\",\r\n \"51.141.14.113/32\",\r\n + \ \"51.141.14.168/32\",\r\n \"51.141.50.179/32\",\r\n \"2603:1020:605::240/122\",\r\n + \ \"2603:1020:605:2::/120\",\r\n \"2603:1020:605:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.WestCentralUS\",\r\n + \ \"id\": \"EventHub.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.71.194.64/27\",\r\n \"13.78.149.209/32\",\r\n + \ \"13.78.150.233/32\",\r\n \"13.78.191.44/32\",\r\n \"20.69.3.0/24\",\r\n + \ \"52.161.19.160/32\",\r\n \"52.161.24.64/32\",\r\n \"2603:1030:b04::240/122\",\r\n + \ \"2603:1030:b04:1::600/120\",\r\n \"2603:1030:b04:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.WestEurope\",\r\n + \ \"id\": \"EventHub.WestEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.69.64.0/26\",\r\n \"13.69.106.0/26\",\r\n \"13.69.111.128/26\",\r\n + \ \"20.50.201.64/26\",\r\n \"20.76.242.45/32\",\r\n \"20.86.89.0/24\",\r\n + \ \"23.97.226.21/32\",\r\n \"23.100.14.185/32\",\r\n \"40.68.35.230/32\",\r\n + \ \"40.68.39.15/32\",\r\n \"40.68.93.145/32\",\r\n \"40.68.205.113/32\",\r\n + \ \"40.68.217.242/32\",\r\n \"51.144.238.23/32\",\r\n \"52.174.243.57/32\",\r\n + \ \"52.178.17.128/26\",\r\n \"52.178.78.61/32\",\r\n \"52.232.27.189/32\",\r\n + \ \"52.233.190.35/32\",\r\n \"52.233.192.247/32\",\r\n \"52.236.186.0/26\",\r\n + \ \"65.52.129.16/32\",\r\n \"104.40.150.139/32\",\r\n \"104.40.179.185/32\",\r\n + \ \"104.40.216.174/32\",\r\n \"104.46.32.56/32\",\r\n \"104.46.32.58/32\",\r\n + \ \"191.233.73.228/32\",\r\n \"2603:1020:206:1::240/122\",\r\n + \ \"2603:1020:206:4::100/120\",\r\n \"2603:1020:206:402::1c0/123\",\r\n + \ \"2603:1020:206:802::160/123\",\r\n \"2603:1020:206:c02::160/123\",\r\n + \ \"2603:10e1:100:2::144c:f22d/128\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.WestIndia\",\r\n \"id\": \"EventHub.WestIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"20.192.83.0/24\",\r\n + \ \"104.211.146.32/27\",\r\n \"104.211.160.121/32\",\r\n + \ \"104.211.160.144/32\",\r\n \"2603:1040:806::240/122\",\r\n + \ \"2603:1040:806:2::/120\",\r\n \"2603:1040:806:402::1c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.WestUS\",\r\n + \ \"id\": \"EventHub.WestUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"13.64.195.117/32\",\r\n \"13.88.20.117/32\",\r\n + \ \"13.88.26.28/32\",\r\n \"13.91.61.11/32\",\r\n \"13.93.226.138/32\",\r\n + \ \"20.66.7.0/24\",\r\n \"23.99.7.105/32\",\r\n \"23.99.54.235/32\",\r\n + \ \"23.99.60.253/32\",\r\n \"23.99.80.186/32\",\r\n \"40.78.110.196/32\",\r\n + \ \"40.83.191.202/32\",\r\n \"40.83.222.100/32\",\r\n \"40.86.176.23/32\",\r\n + \ \"40.112.185.115/32\",\r\n \"40.112.213.11/32\",\r\n \"40.112.242.0/25\",\r\n + \ \"104.40.26.199/32\",\r\n \"104.40.29.113/32\",\r\n \"104.40.68.250/32\",\r\n + \ \"104.40.69.64/32\",\r\n \"104.42.97.95/32\",\r\n \"138.91.193.184/32\",\r\n + \ \"2603:1030:a07::240/122\",\r\n \"2603:1030:a07:1::600/120\",\r\n + \ \"2603:1030:a07:402::140/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"EventHub.WestUS2\",\r\n \"id\": \"EventHub.WestUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureEventHub\",\r\n \"addressPrefixes\": [\r\n \"13.66.138.64/28\",\r\n + \ \"13.66.145.128/26\",\r\n \"13.66.149.0/26\",\r\n \"13.66.228.204/32\",\r\n + \ \"13.66.230.42/32\",\r\n \"20.42.131.16/28\",\r\n \"20.42.131.64/26\",\r\n + \ \"20.51.14.96/27\",\r\n \"20.51.14.128/25\",\r\n \"20.83.192.0/26\",\r\n + \ \"40.64.113.64/26\",\r\n \"40.78.242.128/28\",\r\n \"40.78.247.0/26\",\r\n + \ \"40.78.250.64/28\",\r\n \"40.78.253.128/26\",\r\n \"40.125.103.251/32\",\r\n + \ \"52.151.58.121/32\",\r\n \"52.183.46.73/32\",\r\n \"52.183.86.102/32\",\r\n + \ \"2603:1030:c06:1::240/122\",\r\n \"2603:1030:c06:2::600/120\",\r\n + \ \"2603:1030:c06:400::9c0/123\",\r\n \"2603:1030:c06:802::160/123\",\r\n + \ \"2603:1030:c06:c02::160/123\",\r\n \"2603:10e1:100:2::287d:67fb/128\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"EventHub.WestUS3\",\r\n + \ \"id\": \"EventHub.WestUS3\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureEventHub\",\r\n \"addressPrefixes\": + [\r\n \"20.150.160.224/27\",\r\n \"20.150.170.160/27\",\r\n + \ \"20.150.175.64/26\",\r\n \"20.150.178.64/26\",\r\n \"20.150.182.0/27\",\r\n + \ \"20.150.186.64/26\",\r\n \"20.150.189.128/26\",\r\n \"20.150.246.32/27\",\r\n + \ \"20.150.246.64/26\",\r\n \"20.150.246.128/25\",\r\n \"2603:1030:504:1::240/122\",\r\n + \ \"2603:1030:504:2::400/120\",\r\n \"2603:1030:504:402::2c0/123\",\r\n + \ \"2603:1030:504:802::240/123\",\r\n \"2603:1030:504:c02::c0/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"GatewayManager\",\r\n + \ \"id\": \"GatewayManager\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"GatewayManager\",\r\n \"addressPrefixes\": + [\r\n \"13.65.91.57/32\",\r\n \"13.66.140.144/29\",\r\n + \ \"13.67.9.128/29\",\r\n \"13.69.64.224/29\",\r\n \"13.69.227.224/29\",\r\n + \ \"13.70.72.208/29\",\r\n \"13.70.185.130/32\",\r\n \"13.71.170.240/29\",\r\n + \ \"13.71.194.232/29\",\r\n \"13.75.36.8/29\",\r\n \"13.77.0.146/32\",\r\n + \ \"13.77.50.88/29\",\r\n \"13.78.108.16/29\",\r\n \"13.78.188.33/32\",\r\n + \ \"13.85.74.21/32\",\r\n \"13.87.35.147/32\",\r\n \"13.87.36.246/32\",\r\n + \ \"13.87.56.104/29\",\r\n \"13.87.122.104/29\",\r\n \"13.89.171.96/29\",\r\n + \ \"13.91.249.235/32\",\r\n \"13.91.254.232/32\",\r\n \"13.92.84.128/32\",\r\n + \ \"13.93.112.146/32\",\r\n \"13.93.117.26/32\",\r\n \"20.21.32.64/26\",\r\n + \ \"20.36.42.151/32\",\r\n \"20.36.42.152/32\",\r\n \"20.36.74.91/32\",\r\n + \ \"20.36.74.113/32\",\r\n \"20.36.106.72/29\",\r\n \"20.36.114.24/29\",\r\n + \ \"20.36.120.72/29\",\r\n \"20.37.53.66/32\",\r\n \"20.37.53.76/32\",\r\n + \ \"20.37.64.72/29\",\r\n \"20.37.74.88/29\",\r\n \"20.37.152.72/29\",\r\n + \ \"20.37.192.72/29\",\r\n \"20.37.224.72/29\",\r\n \"20.38.80.72/29\",\r\n + \ \"20.38.136.72/29\",\r\n \"20.39.1.56/32\",\r\n \"20.39.1.58/32\",\r\n + \ \"20.39.8.72/29\",\r\n \"20.39.26.140/32\",\r\n \"20.39.26.246/32\",\r\n + \ \"20.40.173.147/32\",\r\n \"20.41.0.72/29\",\r\n \"20.41.64.72/29\",\r\n + \ \"20.41.192.72/29\",\r\n \"20.42.0.72/29\",\r\n \"20.42.128.72/29\",\r\n + \ \"20.42.224.72/29\",\r\n \"20.43.40.72/29\",\r\n \"20.43.64.72/29\",\r\n + \ \"20.43.128.72/29\",\r\n \"20.44.3.16/29\",\r\n \"20.45.112.72/29\",\r\n + \ \"20.45.192.72/29\",\r\n \"20.46.13.128/26\",\r\n \"20.51.6.64/26\",\r\n + \ \"20.54.106.86/32\",\r\n \"20.54.121.133/32\",\r\n \"20.72.16.64/26\",\r\n + \ \"20.74.0.115/32\",\r\n \"20.74.0.127/32\",\r\n \"20.99.8.0/26\",\r\n + \ \"20.150.160.64/29\",\r\n \"20.150.161.0/26\",\r\n \"20.150.171.64/29\",\r\n + \ \"20.189.104.72/29\",\r\n \"20.189.180.225/32\",\r\n \"20.189.181.8/32\",\r\n + \ \"20.192.47.0/26\",\r\n \"20.192.160.64/26\",\r\n \"20.192.224.192/26\",\r\n + \ \"20.193.142.141/32\",\r\n \"20.193.142.178/32\",\r\n \"20.194.75.128/26\",\r\n + \ \"20.195.37.65/32\",\r\n \"20.195.38.22/32\",\r\n \"20.195.78.0/26\",\r\n + \ \"23.100.231.72/32\",\r\n \"23.100.231.96/32\",\r\n \"23.101.173.90/32\",\r\n + \ \"40.67.48.72/29\",\r\n \"40.67.59.64/29\",\r\n \"40.69.106.88/29\",\r\n + \ \"40.70.146.224/29\",\r\n \"40.71.11.96/29\",\r\n \"40.74.24.72/29\",\r\n + \ \"40.74.100.168/29\",\r\n \"40.78.194.88/29\",\r\n \"40.78.202.112/29\",\r\n + \ \"40.79.130.224/29\",\r\n \"40.79.178.88/29\",\r\n \"40.80.56.72/29\",\r\n + \ \"40.80.168.72/29\",\r\n \"40.80.184.72/29\",\r\n \"40.81.94.172/32\",\r\n + \ \"40.81.94.182/32\",\r\n \"40.81.180.83/32\",\r\n \"40.81.182.82/32\",\r\n + \ \"40.81.189.24/32\",\r\n \"40.81.189.42/32\",\r\n \"40.82.236.2/32\",\r\n + \ \"40.82.236.13/32\",\r\n \"40.82.248.240/29\",\r\n \"40.88.222.179/32\",\r\n + \ \"40.88.223.53/32\",\r\n \"40.89.16.72/29\",\r\n \"40.89.217.100/32\",\r\n + \ \"40.89.217.109/32\",\r\n \"40.90.186.21/32\",\r\n \"40.90.186.91/32\",\r\n + \ \"40.91.89.36/32\",\r\n \"40.91.91.51/32\",\r\n \"40.112.242.168/29\",\r\n + \ \"40.115.248.200/32\",\r\n \"40.115.254.17/32\",\r\n \"40.119.8.64/29\",\r\n + \ \"40.124.139.107/32\",\r\n \"40.124.139.174/32\",\r\n \"51.12.40.192/26\",\r\n + \ \"51.12.192.192/26\",\r\n \"51.104.24.72/29\",\r\n \"51.105.80.72/29\",\r\n + \ \"51.105.88.72/29\",\r\n \"51.107.48.72/29\",\r\n \"51.107.59.32/29\",\r\n + \ \"51.107.144.72/29\",\r\n \"51.107.155.32/29\",\r\n \"51.107.247.0/26\",\r\n + \ \"51.116.48.72/29\",\r\n \"51.116.59.32/29\",\r\n \"51.116.144.72/29\",\r\n + \ \"51.116.155.96/29\",\r\n \"51.120.40.72/29\",\r\n \"51.120.98.168/29\",\r\n + \ \"51.120.219.64/29\",\r\n \"51.120.224.72/29\",\r\n \"51.120.235.128/26\",\r\n + \ \"51.137.160.72/29\",\r\n \"51.140.63.41/32\",\r\n \"51.140.114.209/32\",\r\n + \ \"51.140.148.16/29\",\r\n \"51.140.210.200/29\",\r\n \"51.141.25.80/32\",\r\n + \ \"51.141.29.178/32\",\r\n \"51.143.192.72/29\",\r\n \"52.136.48.72/29\",\r\n + \ \"52.136.137.15/32\",\r\n \"52.136.137.16/32\",\r\n \"52.138.70.115/32\",\r\n + \ \"52.138.71.153/32\",\r\n \"52.138.90.40/29\",\r\n \"52.139.87.129/32\",\r\n + \ \"52.139.87.150/32\",\r\n \"52.140.104.72/29\",\r\n \"52.142.152.114/32\",\r\n + \ \"52.142.154.100/32\",\r\n \"52.143.136.58/31\",\r\n \"52.143.250.137/32\",\r\n + \ \"52.143.251.22/32\",\r\n \"52.147.44.33/32\",\r\n \"52.148.30.6/32\",\r\n + \ \"52.149.24.100/32\",\r\n \"52.149.26.14/32\",\r\n \"52.150.136.72/29\",\r\n + \ \"52.159.19.113/32\",\r\n \"52.159.20.67/32\",\r\n \"52.159.21.124/32\",\r\n + \ \"52.161.28.251/32\",\r\n \"52.162.106.168/29\",\r\n \"52.163.241.22/32\",\r\n + \ \"52.163.246.27/32\",\r\n \"52.165.221.72/32\",\r\n \"52.169.225.171/32\",\r\n + \ \"52.169.231.163/32\",\r\n \"52.172.28.183/32\",\r\n \"52.172.31.29/32\",\r\n + \ \"52.172.204.73/32\",\r\n \"52.172.222.13/32\",\r\n \"52.173.250.124/32\",\r\n + \ \"52.177.204.204/32\",\r\n \"52.177.207.219/32\",\r\n \"52.179.10.142/32\",\r\n + \ \"52.180.178.35/32\",\r\n \"52.180.178.191/32\",\r\n \"52.180.182.210/32\",\r\n + \ \"52.184.255.23/32\",\r\n \"52.191.140.123/32\",\r\n \"52.191.170.38/32\",\r\n + \ \"52.228.80.72/29\",\r\n \"52.229.161.220/32\",\r\n \"52.229.166.101/32\",\r\n + \ \"52.231.18.224/29\",\r\n \"52.231.24.186/32\",\r\n \"52.231.35.84/32\",\r\n + \ \"52.231.146.200/29\",\r\n \"52.231.203.87/32\",\r\n \"52.231.204.175/32\",\r\n + \ \"52.237.24.145/32\",\r\n \"52.237.30.255/32\",\r\n \"52.237.208.51/32\",\r\n + \ \"52.237.215.149/32\",\r\n \"52.242.17.200/32\",\r\n \"52.242.28.83/32\",\r\n + \ \"52.251.12.161/32\",\r\n \"52.253.157.2/32\",\r\n \"52.253.159.209/32\",\r\n + \ \"52.253.232.235/32\",\r\n \"52.253.239.162/32\",\r\n \"65.52.250.24/29\",\r\n + \ \"70.37.160.97/32\",\r\n \"70.37.161.124/32\",\r\n \"102.133.27.16/29\",\r\n + \ \"102.133.56.72/29\",\r\n \"102.133.155.16/29\",\r\n \"102.133.216.72/29\",\r\n + \ \"104.211.81.208/29\",\r\n \"104.211.146.88/29\",\r\n \"104.211.188.0/32\",\r\n + \ \"104.211.191.94/32\",\r\n \"104.214.19.64/29\",\r\n \"104.215.50.115/32\",\r\n + \ \"104.215.52.27/32\",\r\n \"168.62.104.154/32\",\r\n \"168.62.208.162/32\",\r\n + \ \"168.62.209.95/32\",\r\n \"191.233.8.64/26\",\r\n \"191.233.203.208/29\",\r\n + \ \"191.233.245.75/32\",\r\n \"191.233.245.118/32\",\r\n + \ \"191.234.182.29/32\",\r\n \"191.235.81.58/32\",\r\n \"191.235.224.72/29\",\r\n + \ \"2603:1000:4::40/122\",\r\n \"2603:1000:104:1::40/122\",\r\n + \ \"2603:1010:6:1::40/122\",\r\n \"2603:1010:101::40/122\",\r\n + \ \"2603:1010:304::40/122\",\r\n \"2603:1010:404::40/122\",\r\n + \ \"2603:1020:5:1::40/122\",\r\n \"2603:1020:206:1::40/122\",\r\n + \ \"2603:1020:305::40/122\",\r\n \"2603:1020:405::40/122\",\r\n + \ \"2603:1020:605::40/122\",\r\n \"2603:1020:705:1::40/122\",\r\n + \ \"2603:1020:805:1::40/122\",\r\n \"2603:1020:905::40/122\",\r\n + \ \"2603:1020:a04:1::40/122\",\r\n \"2603:1020:b04::40/122\",\r\n + \ \"2603:1020:c04:1::40/122\",\r\n \"2603:1020:d04::40/122\",\r\n + \ \"2603:1020:e04:1::40/122\",\r\n \"2603:1020:f04::40/122\",\r\n + \ \"2603:1020:1004::40/122\",\r\n \"2603:1020:1104::40/122\",\r\n + \ \"2603:1030:f:1::40/122\",\r\n \"2603:1030:10:1::40/122\",\r\n + \ \"2603:1030:104:1::40/122\",\r\n \"2603:1030:107::40/122\",\r\n + \ \"2603:1030:210:1::40/122\",\r\n \"2603:1030:40b:1::40/122\",\r\n + \ \"2603:1030:40c:1::40/122\",\r\n \"2603:1030:504:1::40/122\",\r\n + \ \"2603:1030:608::40/122\",\r\n \"2603:1030:807:1::40/122\",\r\n + \ \"2603:1030:a07::40/122\",\r\n \"2603:1030:b04::40/122\",\r\n + \ \"2603:1030:c06:1::40/122\",\r\n \"2603:1030:f05:1::40/122\",\r\n + \ \"2603:1030:1005::40/122\",\r\n \"2603:1040:5:1::40/122\",\r\n + \ \"2603:1040:207::40/122\",\r\n \"2603:1040:407:1::40/122\",\r\n + \ \"2603:1040:606::40/122\",\r\n \"2603:1040:806::40/122\",\r\n + \ \"2603:1040:904:1::40/122\",\r\n \"2603:1040:a06:1::40/122\",\r\n + \ \"2603:1040:b04::40/122\",\r\n \"2603:1040:c06::40/122\",\r\n + \ \"2603:1040:d04::40/122\",\r\n \"2603:1040:f05:1::40/122\",\r\n + \ \"2603:1040:1002::80/122\",\r\n \"2603:1040:1104::40/122\",\r\n + \ \"2603:1050:6:1::40/122\",\r\n \"2603:1050:403::40/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"GuestAndHybridManagement\",\r\n + \ \"id\": \"GuestAndHybridManagement\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureAutomation\",\r\n \"addressPrefixes\": + [\r\n \"13.65.24.129/32\",\r\n \"13.66.138.94/31\",\r\n + \ \"13.66.141.224/29\",\r\n \"13.66.145.80/28\",\r\n \"13.67.8.110/31\",\r\n + \ \"13.67.10.72/29\",\r\n \"13.69.64.78/31\",\r\n \"13.69.67.48/29\",\r\n + \ \"13.69.107.64/29\",\r\n \"13.69.109.128/31\",\r\n \"13.69.109.176/28\",\r\n + \ \"13.69.227.78/31\",\r\n \"13.69.229.248/29\",\r\n \"13.70.72.30/31\",\r\n + \ \"13.70.74.80/29\",\r\n \"13.70.123.166/32\",\r\n \"13.71.170.46/31\",\r\n + \ \"13.71.173.208/29\",\r\n \"13.71.175.144/28\",\r\n \"13.71.194.118/31\",\r\n + \ \"13.71.196.128/29\",\r\n \"13.71.199.176/28\",\r\n \"13.73.242.40/29\",\r\n + \ \"13.73.242.210/31\",\r\n \"13.73.244.208/28\",\r\n \"13.74.107.92/31\",\r\n + \ \"13.74.108.136/29\",\r\n \"13.75.34.150/31\",\r\n \"13.75.39.104/29\",\r\n + \ \"13.77.1.26/32\",\r\n \"13.77.1.212/32\",\r\n \"13.77.50.70/31\",\r\n + \ \"13.77.53.56/29\",\r\n \"13.77.55.192/28\",\r\n \"13.78.59.184/32\",\r\n + \ \"13.78.106.94/31\",\r\n \"13.78.109.120/29\",\r\n \"13.78.111.208/28\",\r\n + \ \"13.86.219.200/29\",\r\n \"13.86.221.216/31\",\r\n \"13.86.223.64/28\",\r\n + \ \"13.87.56.86/31\",\r\n \"13.87.58.72/29\",\r\n \"13.87.122.86/31\",\r\n + \ \"13.87.124.72/29\",\r\n \"13.88.240.74/32\",\r\n \"13.88.244.195/32\",\r\n + \ \"13.89.170.206/31\",\r\n \"13.89.174.136/29\",\r\n \"13.89.178.96/28\",\r\n + \ \"13.94.240.75/32\",\r\n \"20.21.42.112/29\",\r\n \"20.21.53.176/28\",\r\n + \ \"20.21.66.88/29\",\r\n \"20.21.74.88/29\",\r\n \"20.21.80.8/29\",\r\n + \ \"20.21.80.16/31\",\r\n \"20.36.39.150/32\",\r\n \"20.36.106.70/31\",\r\n + \ \"20.36.108.128/29\",\r\n \"20.36.108.240/28\",\r\n \"20.36.114.22/31\",\r\n + \ \"20.36.117.32/29\",\r\n \"20.36.117.144/28\",\r\n \"20.37.74.226/31\",\r\n + \ \"20.37.76.120/29\",\r\n \"20.38.128.104/29\",\r\n \"20.38.128.168/31\",\r\n + \ \"20.38.132.0/28\",\r\n \"20.38.147.152/29\",\r\n \"20.38.149.128/31\",\r\n + \ \"20.40.231.60/31\",\r\n \"20.42.64.32/31\",\r\n \"20.42.72.128/31\",\r\n + \ \"20.42.72.144/28\",\r\n \"20.43.120.248/29\",\r\n \"20.43.121.120/31\",\r\n + \ \"20.43.123.48/28\",\r\n \"20.44.2.6/31\",\r\n \"20.44.4.104/29\",\r\n + \ \"20.44.8.200/29\",\r\n \"20.44.10.120/31\",\r\n \"20.44.17.8/29\",\r\n + \ \"20.44.17.216/31\",\r\n \"20.44.19.16/28\",\r\n \"20.44.27.112/29\",\r\n + \ \"20.44.29.48/31\",\r\n \"20.44.29.96/28\",\r\n \"20.45.90.94/31\",\r\n + \ \"20.45.93.144/28\",\r\n \"20.45.94.64/29\",\r\n \"20.45.123.88/29\",\r\n + \ \"20.45.123.232/31\",\r\n \"20.45.241.184/29\",\r\n \"20.45.242.0/28\",\r\n + \ \"20.45.242.16/31\",\r\n \"20.47.232.160/28\",\r\n \"20.47.232.176/29\",\r\n + \ \"20.48.201.74/31\",\r\n \"20.48.201.80/28\",\r\n \"20.48.202.0/29\",\r\n + \ \"20.49.82.24/29\",\r\n \"20.49.90.24/29\",\r\n \"20.51.5.2/31\",\r\n + \ \"20.51.5.8/29\",\r\n \"20.51.5.16/28\",\r\n \"20.51.14.78/31\",\r\n + \ \"20.51.21.250/31\",\r\n \"20.52.89.54/31\",\r\n \"20.52.93.216/29\",\r\n + \ \"20.52.94.96/28\",\r\n \"20.53.52.224/28\",\r\n \"20.53.52.240/29\",\r\n + \ \"20.53.52.248/31\",\r\n \"20.53.57.62/31\",\r\n \"20.53.60.80/28\",\r\n + \ \"20.53.60.192/29\",\r\n \"20.58.68.60/31\",\r\n \"20.58.71.72/29\",\r\n + \ \"20.58.71.224/28\",\r\n \"20.59.79.64/28\",\r\n \"20.62.63.252/31\",\r\n + \ \"20.66.6.88/29\",\r\n \"20.69.2.14/31\",\r\n \"20.69.4.200/29\",\r\n + \ \"20.69.4.208/28\",\r\n \"20.70.220.180/31\",\r\n \"20.70.221.16/28\",\r\n + \ \"20.70.221.192/29\",\r\n \"20.72.27.176/29\",\r\n \"20.82.246.152/29\",\r\n + \ \"20.83.221.112/28\",\r\n \"20.83.221.192/29\",\r\n \"20.86.92.252/31\",\r\n + \ \"20.88.154.18/31\",\r\n \"20.88.156.168/29\",\r\n \"20.88.156.176/28\",\r\n + \ \"20.89.11.118/31\",\r\n \"20.89.11.120/29\",\r\n \"20.89.11.224/28\",\r\n + \ \"20.90.129.72/29\",\r\n \"20.90.131.96/28\",\r\n \"20.90.131.112/31\",\r\n + \ \"20.92.3.224/28\",\r\n \"20.92.3.240/29\",\r\n \"20.92.3.248/31\",\r\n + \ \"20.97.32.188/31\",\r\n \"20.97.33.120/29\",\r\n \"20.97.33.224/28\",\r\n + \ \"20.98.145.72/29\",\r\n \"20.98.145.96/28\",\r\n \"20.98.192.224/28\",\r\n + \ \"20.98.192.240/29\",\r\n \"20.100.1.128/28\",\r\n \"20.100.1.144/29\",\r\n + \ \"20.100.1.152/31\",\r\n \"20.105.208.104/29\",\r\n \"20.105.208.112/28\",\r\n + \ \"20.111.0.32/28\",\r\n \"20.111.0.48/29\",\r\n \"20.150.129.250/31\",\r\n + \ \"20.150.130.32/28\",\r\n \"20.150.130.48/29\",\r\n \"20.150.171.216/29\",\r\n + \ \"20.150.172.224/31\",\r\n \"20.150.179.192/29\",\r\n \"20.150.181.24/31\",\r\n + \ \"20.150.181.176/28\",\r\n \"20.150.187.192/29\",\r\n \"20.150.189.24/31\",\r\n + \ \"20.189.193.16/28\",\r\n \"20.189.193.160/29\",\r\n \"20.189.228.220/31\",\r\n + \ \"20.192.50.230/31\",\r\n \"20.192.99.192/29\",\r\n \"20.192.101.24/31\",\r\n + \ \"20.192.152.148/31\",\r\n \"20.192.152.152/29\",\r\n \"20.192.153.64/28\",\r\n + \ \"20.192.168.148/31\",\r\n \"20.192.168.152/29\",\r\n \"20.192.169.96/28\",\r\n + \ \"20.192.184.64/28\",\r\n \"20.192.234.176/28\",\r\n \"20.192.235.8/29\",\r\n + \ \"20.192.238.120/31\",\r\n \"20.193.202.176/28\",\r\n \"20.193.203.192/29\",\r\n + \ \"20.194.66.24/29\",\r\n \"20.195.83.58/31\",\r\n \"20.195.84.176/28\",\r\n + \ \"20.195.85.0/29\",\r\n \"20.195.146.206/31\",\r\n \"20.200.194.236/31\",\r\n + \ \"20.200.194.240/28\",\r\n \"20.200.195.160/29\",\r\n \"20.205.67.112/28\",\r\n + \ \"20.205.68.96/29\",\r\n \"20.205.68.104/31\",\r\n \"20.205.74.88/29\",\r\n + \ \"20.205.82.88/29\",\r\n \"20.206.0.72/29\",\r\n \"20.206.0.80/28\",\r\n + \ \"20.207.0.88/29\",\r\n \"20.207.1.0/28\",\r\n \"20.208.4.96/31\",\r\n + \ \"20.208.18.88/29\",\r\n \"23.96.225.107/32\",\r\n \"23.96.225.182/32\",\r\n + \ \"23.98.83.64/29\",\r\n \"23.98.86.56/31\",\r\n \"40.64.8.178/31\",\r\n + \ \"40.64.8.184/29\",\r\n \"40.64.9.128/28\",\r\n \"40.67.60.96/29\",\r\n + \ \"40.67.60.108/31\",\r\n \"40.69.106.70/31\",\r\n \"40.69.108.88/29\",\r\n + \ \"40.69.110.240/28\",\r\n \"40.70.146.78/31\",\r\n \"40.70.148.48/29\",\r\n + \ \"40.71.10.206/31\",\r\n \"40.71.13.240/29\",\r\n \"40.71.30.252/32\",\r\n + \ \"40.74.146.82/31\",\r\n \"40.74.149.32/29\",\r\n \"40.74.150.16/28\",\r\n + \ \"40.75.35.128/29\",\r\n \"40.75.35.216/31\",\r\n \"40.78.194.70/31\",\r\n + \ \"40.78.196.88/29\",\r\n \"40.78.202.130/31\",\r\n \"40.78.203.248/29\",\r\n + \ \"40.78.229.40/29\",\r\n \"40.78.236.128/29\",\r\n \"40.78.238.56/31\",\r\n + \ \"40.78.239.32/28\",\r\n \"40.78.242.172/31\",\r\n \"40.78.243.24/29\",\r\n + \ \"40.78.250.108/31\",\r\n \"40.78.250.216/29\",\r\n \"40.79.130.46/31\",\r\n + \ \"40.79.132.40/29\",\r\n \"40.79.138.44/31\",\r\n \"40.79.138.152/29\",\r\n + \ \"40.79.139.208/28\",\r\n \"40.79.146.44/31\",\r\n \"40.79.146.152/29\",\r\n + \ \"40.79.156.40/29\",\r\n \"40.79.163.8/29\",\r\n \"40.79.163.152/31\",\r\n + \ \"40.79.170.248/29\",\r\n \"40.79.171.224/31\",\r\n \"40.79.173.16/28\",\r\n + \ \"40.79.178.70/31\",\r\n \"40.79.180.56/29\",\r\n \"40.79.180.208/28\",\r\n + \ \"40.79.187.160/29\",\r\n \"40.79.189.56/31\",\r\n \"40.79.194.120/29\",\r\n + \ \"40.79.197.32/31\",\r\n \"40.80.51.88/29\",\r\n \"40.80.53.0/31\",\r\n + \ \"40.80.176.48/29\",\r\n \"40.80.180.0/31\",\r\n \"40.80.180.96/28\",\r\n + \ \"40.85.168.201/32\",\r\n \"40.89.129.151/32\",\r\n \"40.89.132.62/32\",\r\n + \ \"40.89.137.16/32\",\r\n \"40.89.157.7/32\",\r\n \"40.114.77.89/32\",\r\n + \ \"40.114.85.4/32\",\r\n \"40.118.103.191/32\",\r\n \"40.120.8.32/28\",\r\n + \ \"40.120.64.48/28\",\r\n \"40.120.75.48/29\",\r\n \"40.120.86.146/31\",\r\n + \ \"40.120.86.152/29\",\r\n \"40.120.87.32/28\",\r\n \"51.11.97.0/31\",\r\n + \ \"51.11.97.64/28\",\r\n \"51.12.22.172/31\",\r\n \"51.12.22.176/28\",\r\n + \ \"51.12.22.192/29\",\r\n \"51.12.72.220/31\",\r\n \"51.12.73.64/28\",\r\n + \ \"51.12.73.80/29\",\r\n \"51.12.99.208/29\",\r\n \"51.12.203.72/29\",\r\n + \ \"51.12.227.192/29\",\r\n \"51.12.235.192/29\",\r\n \"51.13.141.224/28\",\r\n + \ \"51.13.141.240/29\",\r\n \"51.103.202.88/29\",\r\n \"51.104.8.240/29\",\r\n + \ \"51.104.9.96/31\",\r\n \"51.105.67.168/29\",\r\n \"51.105.69.80/31\",\r\n + \ \"51.105.75.152/29\",\r\n \"51.105.77.48/31\",\r\n \"51.105.77.80/28\",\r\n + \ \"51.107.60.80/29\",\r\n \"51.107.60.92/31\",\r\n \"51.107.60.208/28\",\r\n + \ \"51.107.156.72/29\",\r\n \"51.107.156.132/31\",\r\n \"51.107.156.208/28\",\r\n + \ \"51.107.247.200/29\",\r\n \"51.107.247.208/28\",\r\n \"51.107.251.188/31\",\r\n + \ \"51.107.254.224/28\",\r\n \"51.107.254.240/29\",\r\n \"51.116.55.174/31\",\r\n + \ \"51.116.60.80/29\",\r\n \"51.116.60.224/28\",\r\n \"51.116.74.24/29\",\r\n + \ \"51.116.74.80/28\",\r\n \"51.116.156.160/29\",\r\n \"51.116.158.56/31\",\r\n + \ \"51.116.158.80/28\",\r\n \"51.116.243.144/29\",\r\n \"51.116.243.216/31\",\r\n + \ \"51.116.251.32/29\",\r\n \"51.116.251.184/31\",\r\n \"51.120.100.80/29\",\r\n + \ \"51.120.100.92/31\",\r\n \"51.120.107.192/29\",\r\n \"51.120.109.24/31\",\r\n + \ \"51.120.109.48/28\",\r\n \"51.120.211.192/29\",\r\n \"51.120.213.24/31\",\r\n + \ \"51.120.220.80/29\",\r\n \"51.120.220.92/31\",\r\n \"51.120.220.176/28\",\r\n + \ \"51.120.228.38/31\",\r\n \"51.138.215.122/31\",\r\n \"51.140.6.15/32\",\r\n + \ \"51.140.51.174/32\",\r\n \"51.140.212.104/29\",\r\n \"52.136.186.118/31\",\r\n + \ \"52.136.189.88/29\",\r\n \"52.136.190.160/28\",\r\n \"52.138.90.52/31\",\r\n + \ \"52.138.92.80/29\",\r\n \"52.138.227.136/29\",\r\n \"52.138.229.64/31\",\r\n + \ \"52.138.229.80/28\",\r\n \"52.146.138.80/28\",\r\n \"52.146.139.192/31\",\r\n + \ \"52.147.97.0/31\",\r\n \"52.147.113.182/31\",\r\n \"52.147.117.104/29\",\r\n + \ \"52.147.117.112/28\",\r\n \"52.151.62.99/32\",\r\n \"52.161.14.192/32\",\r\n + \ \"52.161.28.108/32\",\r\n \"52.162.110.240/29\",\r\n \"52.162.111.128/31\",\r\n + \ \"52.163.228.23/32\",\r\n \"52.167.107.72/29\",\r\n \"52.167.109.64/31\",\r\n + \ \"52.169.105.82/32\",\r\n \"52.172.153.216/32\",\r\n \"52.172.155.142/32\",\r\n + \ \"52.178.223.62/32\",\r\n \"52.180.166.238/32\",\r\n \"52.180.179.25/32\",\r\n + \ \"52.182.139.56/29\",\r\n \"52.182.141.12/31\",\r\n \"52.182.141.144/28\",\r\n + \ \"52.183.5.195/32\",\r\n \"52.231.18.46/31\",\r\n \"52.231.20.0/29\",\r\n + \ \"52.231.64.18/32\",\r\n \"52.231.69.100/32\",\r\n \"52.231.148.120/29\",\r\n + \ \"52.231.148.208/28\",\r\n \"52.236.186.240/29\",\r\n \"52.236.189.72/31\",\r\n + \ \"52.240.241.64/28\",\r\n \"52.242.40.64/28\",\r\n \"52.242.40.80/29\",\r\n + \ \"52.242.40.88/31\",\r\n \"52.246.155.152/29\",\r\n \"52.246.157.0/31\",\r\n + \ \"52.250.228.34/31\",\r\n \"65.52.250.6/31\",\r\n \"65.52.252.120/29\",\r\n + \ \"102.37.64.32/28\",\r\n \"102.37.85.10/31\",\r\n \"102.37.85.16/28\",\r\n + \ \"102.37.85.192/29\",\r\n \"102.37.166.218/31\",\r\n \"102.37.167.96/28\",\r\n + \ \"102.37.167.112/29\",\r\n \"102.133.26.6/31\",\r\n \"102.133.28.144/29\",\r\n + \ \"102.133.124.16/29\",\r\n \"102.133.156.112/29\",\r\n + \ \"102.133.251.176/29\",\r\n \"102.133.253.32/28\",\r\n + \ \"104.41.9.106/32\",\r\n \"104.41.178.182/32\",\r\n \"104.208.163.218/32\",\r\n + \ \"104.209.137.89/32\",\r\n \"104.210.80.208/32\",\r\n \"104.210.158.71/32\",\r\n + \ \"104.214.164.32/28\",\r\n \"104.215.254.56/32\",\r\n \"168.61.140.48/28\",\r\n + \ \"191.232.170.251/32\",\r\n \"191.233.51.144/29\",\r\n + \ \"191.233.203.30/31\",\r\n \"191.233.205.64/29\",\r\n \"191.234.147.192/29\",\r\n + \ \"191.234.149.48/28\",\r\n \"191.234.149.136/31\",\r\n + \ \"191.234.155.192/29\",\r\n \"191.234.157.40/31\",\r\n + \ \"191.238.73.12/31\",\r\n \"191.238.77.32/28\",\r\n \"191.238.77.48/29\",\r\n + \ \"2603:1000:4:1::2a0/123\",\r\n \"2603:1000:4:402::2c0/124\",\r\n + \ \"2603:1000:104:3::/123\",\r\n \"2603:1000:104:402::2c0/124\",\r\n + \ \"2603:1000:104:802::200/124\",\r\n \"2603:1000:104:c02::200/124\",\r\n + \ \"2603:1010:6::6a0/123\",\r\n \"2603:1010:6:402::2c0/124\",\r\n + \ \"2603:1010:6:802::200/124\",\r\n \"2603:1010:6:c02::200/124\",\r\n + \ \"2603:1010:101:1::480/123\",\r\n \"2603:1010:101:402::2c0/124\",\r\n + \ \"2603:1010:304:1::2a0/123\",\r\n \"2603:1010:304:402::2c0/124\",\r\n + \ \"2603:1010:404:1::2a0/123\",\r\n \"2603:1010:404:402::2c0/124\",\r\n + \ \"2603:1020:5:4::200/123\",\r\n \"2603:1020:5:402::2c0/124\",\r\n + \ \"2603:1020:5:802::200/124\",\r\n \"2603:1020:5:c02::200/124\",\r\n + \ \"2603:1020:206::780/123\",\r\n \"2603:1020:206:402::2c0/124\",\r\n + \ \"2603:1020:206:802::200/124\",\r\n \"2603:1020:206:c02::200/124\",\r\n + \ \"2603:1020:305:402::2c0/124\",\r\n \"2603:1020:405:402::2c0/124\",\r\n + \ \"2603:1020:605:1::480/123\",\r\n \"2603:1020:605:402::2c0/124\",\r\n + \ \"2603:1020:705:2::700/123\",\r\n \"2603:1020:705:402::2c0/124\",\r\n + \ \"2603:1020:705:802::200/124\",\r\n \"2603:1020:705:c02::200/124\",\r\n + \ \"2603:1020:805::6a0/123\",\r\n \"2603:1020:805:402::2c0/124\",\r\n + \ \"2603:1020:805:802::200/124\",\r\n \"2603:1020:805:c02::200/124\",\r\n + \ \"2603:1020:905:1::2a0/123\",\r\n \"2603:1020:905:402::2c0/124\",\r\n + \ \"2603:1020:a04:3::a0/123\",\r\n \"2603:1020:a04:402::2c0/124\",\r\n + \ \"2603:1020:a04:802::200/124\",\r\n \"2603:1020:a04:c02::200/124\",\r\n + \ \"2603:1020:b04:1::480/123\",\r\n \"2603:1020:b04:402::2c0/124\",\r\n + \ \"2603:1020:c04::6a0/123\",\r\n \"2603:1020:c04:402::2c0/124\",\r\n + \ \"2603:1020:c04:802::200/124\",\r\n \"2603:1020:c04:c02::200/124\",\r\n + \ \"2603:1020:d04:1::2a0/123\",\r\n \"2603:1020:d04:402::2c0/124\",\r\n + \ \"2603:1020:e04:3::460/123\",\r\n \"2603:1020:e04:402::2c0/124\",\r\n + \ \"2603:1020:e04:802::200/124\",\r\n \"2603:1020:e04:c02::200/124\",\r\n + \ \"2603:1020:f04:1::2a0/123\",\r\n \"2603:1020:f04:402::2c0/124\",\r\n + \ \"2603:1020:1004:3::40/123\",\r\n \"2603:1020:1004:400::1c0/124\",\r\n + \ \"2603:1020:1004:400::2e0/124\",\r\n \"2603:1020:1004:400::3a0/124\",\r\n + \ \"2603:1020:1004:800::3d0/124\",\r\n \"2603:1020:1004:800::3f0/124\",\r\n + \ \"2603:1020:1004:c02::390/124\",\r\n \"2603:1020:1104:1::7a0/123\",\r\n + \ \"2603:1020:1104:400::2c0/124\",\r\n \"2603:1030:f:3::2a0/123\",\r\n + \ \"2603:1030:f:400::ac0/124\",\r\n \"2603:1030:10::780/123\",\r\n + \ \"2603:1030:10:402::2c0/124\",\r\n \"2603:1030:10:802::200/124\",\r\n + \ \"2603:1030:10:c02::200/124\",\r\n \"2603:1030:104:402::2c0/124\",\r\n + \ \"2603:1030:104:402::650/124\",\r\n \"2603:1030:104:402::710/124\",\r\n + \ \"2603:1030:104:802::70/124\",\r\n \"2603:1030:107:400::240/124\",\r\n + \ \"2603:1030:210::780/123\",\r\n \"2603:1030:210:402::2c0/124\",\r\n + \ \"2603:1030:210:802::200/124\",\r\n \"2603:1030:210:c02::200/124\",\r\n + \ \"2603:1030:40b:3::340/123\",\r\n \"2603:1030:40b:400::ac0/124\",\r\n + \ \"2603:1030:40b:800::200/124\",\r\n \"2603:1030:40b:c00::200/124\",\r\n + \ \"2603:1030:40c::760/123\",\r\n \"2603:1030:40c:402::2c0/124\",\r\n + \ \"2603:1030:40c:802::200/124\",\r\n \"2603:1030:40c:c02::200/124\",\r\n + \ \"2603:1030:504:2::2e0/123\",\r\n \"2603:1030:504:402::1c0/124\",\r\n + \ \"2603:1030:504:402::2e0/124\",\r\n \"2603:1030:504:402::3a0/124\",\r\n + \ \"2603:1030:504:402::440/124\",\r\n \"2603:1030:504:802::3c0/123\",\r\n + \ \"2603:1030:504:802::3f0/124\",\r\n \"2603:1030:504:c02::410/124\",\r\n + \ \"2603:1030:608:1::480/123\",\r\n \"2603:1030:608:402::2c0/124\",\r\n + \ \"2603:1030:608:402::5c0/123\",\r\n \"2603:1030:807:3::200/123\",\r\n + \ \"2603:1030:807:402::2c0/124\",\r\n \"2603:1030:807:802::200/124\",\r\n + \ \"2603:1030:807:c02::200/124\",\r\n \"2603:1030:a07:1::4e0/123\",\r\n + \ \"2603:1030:a07:402::940/124\",\r\n \"2603:1030:b04:1::480/123\",\r\n + \ \"2603:1030:b04:402::2c0/124\",\r\n \"2603:1030:c06:5::120/123\",\r\n + \ \"2603:1030:c06:400::ac0/124\",\r\n \"2603:1030:c06:802::200/124\",\r\n + \ \"2603:1030:c06:c02::200/124\",\r\n \"2603:1030:f05::6a0/123\",\r\n + \ \"2603:1030:f05:402::2c0/124\",\r\n \"2603:1030:f05:802::200/124\",\r\n + \ \"2603:1030:f05:c02::200/124\",\r\n \"2603:1030:1005:1::480/123\",\r\n + \ \"2603:1030:1005:402::2c0/124\",\r\n \"2603:1040:5:3::200/123\",\r\n + \ \"2603:1040:5:402::2c0/124\",\r\n \"2603:1040:5:802::200/124\",\r\n + \ \"2603:1040:5:c02::200/124\",\r\n \"2603:1040:207:402::2c0/124\",\r\n + \ \"2603:1040:207:800::60/124\",\r\n \"2603:1040:207:c00::60/124\",\r\n + \ \"2603:1040:407::6a0/123\",\r\n \"2603:1040:407:402::2c0/124\",\r\n + \ \"2603:1040:407:802::200/124\",\r\n \"2603:1040:407:c02::200/124\",\r\n + \ \"2603:1040:606:1::480/123\",\r\n \"2603:1040:606:402::2c0/124\",\r\n + \ \"2603:1040:806:402::2c0/124\",\r\n \"2603:1040:904::6a0/123\",\r\n + \ \"2603:1040:904:402::2c0/124\",\r\n \"2603:1040:904:802::200/124\",\r\n + \ \"2603:1040:904:c02::200/124\",\r\n \"2603:1040:a06:3::200/123\",\r\n + \ \"2603:1040:a06:402::2c0/124\",\r\n \"2603:1040:a06:802::200/124\",\r\n + \ \"2603:1040:a06:c02::200/124\",\r\n \"2603:1040:b04:1::2a0/123\",\r\n + \ \"2603:1040:b04:402::2c0/124\",\r\n \"2603:1040:c06:1::480/123\",\r\n + \ \"2603:1040:c06:402::2c0/124\",\r\n \"2603:1040:d04:2::320/123\",\r\n + \ \"2603:1040:d04:400::1c0/124\",\r\n \"2603:1040:d04:400::2e0/124\",\r\n + \ \"2603:1040:d04:400::3a0/124\",\r\n \"2603:1040:d04:800::3d0/124\",\r\n + \ \"2603:1040:d04:800::3f0/124\",\r\n \"2603:1040:e05:1::c0/123\",\r\n + \ \"2603:1040:f05:2::2a0/123\",\r\n \"2603:1040:f05:402::2c0/124\",\r\n + \ \"2603:1040:f05:802::200/124\",\r\n \"2603:1040:f05:c02::200/124\",\r\n + \ \"2603:1040:1002:2::500/121\",\r\n \"2603:1040:1002:400::190/124\",\r\n + \ \"2603:1040:1002:800::60/124\",\r\n \"2603:1040:1002:c00::60/124\",\r\n + \ \"2603:1040:1104:2::240/123\",\r\n \"2603:1040:1104:400::2c0/124\",\r\n + \ \"2603:1050:6::6a0/123\",\r\n \"2603:1050:6:402::2c0/124\",\r\n + \ \"2603:1050:6:802::200/124\",\r\n \"2603:1050:6:c02::200/124\",\r\n + \ \"2603:1050:403:1::260/123\",\r\n \"2603:1050:403:400::1e0/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight\",\r\n + \ \"id\": \"HDInsight\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"7\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"13.64.254.98/32\",\r\n \"13.66.141.144/29\",\r\n + \ \"13.67.9.152/29\",\r\n \"13.69.65.8/29\",\r\n \"13.69.229.72/29\",\r\n + \ \"13.70.73.96/29\",\r\n \"13.71.172.240/29\",\r\n \"13.71.196.48/29\",\r\n + \ \"13.73.240.8/29\",\r\n \"13.73.254.192/29\",\r\n \"13.74.153.132/32\",\r\n + \ \"13.75.38.112/29\",\r\n \"13.75.152.195/32\",\r\n \"13.76.136.249/32\",\r\n + \ \"13.76.245.160/32\",\r\n \"13.77.2.56/32\",\r\n \"13.77.2.94/32\",\r\n + \ \"13.77.52.8/29\",\r\n \"13.78.89.60/32\",\r\n \"13.78.125.90/32\",\r\n + \ \"13.82.225.233/32\",\r\n \"13.86.218.240/29\",\r\n \"13.87.58.32/29\",\r\n + \ \"13.87.124.32/29\",\r\n \"13.89.171.120/29\",\r\n \"20.21.37.56/29\",\r\n + \ \"20.36.36.33/32\",\r\n \"20.36.36.196/32\",\r\n \"20.36.123.88/29\",\r\n + \ \"20.37.68.40/29\",\r\n \"20.37.76.96/29\",\r\n \"20.37.228.0/29\",\r\n + \ \"20.38.139.88/29\",\r\n \"20.39.15.48/29\",\r\n \"20.40.207.144/29\",\r\n + \ \"20.41.69.32/29\",\r\n \"20.41.197.120/29\",\r\n \"20.43.45.224/29\",\r\n + \ \"20.43.120.8/29\",\r\n \"20.44.4.64/29\",\r\n \"20.44.16.8/29\",\r\n + \ \"20.44.26.240/29\",\r\n \"20.45.115.128/29\",\r\n \"20.45.198.80/29\",\r\n + \ \"20.48.192.24/29\",\r\n \"20.49.102.48/29\",\r\n \"20.49.114.56/29\",\r\n + \ \"20.49.126.128/29\",\r\n \"20.53.40.120/29\",\r\n \"20.61.96.160/29\",\r\n + \ \"20.72.20.40/29\",\r\n \"20.150.167.176/29\",\r\n \"20.150.172.232/29\",\r\n + \ \"20.188.39.64/32\",\r\n \"20.189.111.192/29\",\r\n \"20.191.160.0/29\",\r\n + \ \"20.192.48.216/29\",\r\n \"20.192.235.248/29\",\r\n \"20.193.194.16/29\",\r\n + \ \"20.193.203.200/29\",\r\n \"23.98.107.192/29\",\r\n \"23.99.5.239/32\",\r\n + \ \"23.101.196.19/32\",\r\n \"23.102.235.122/32\",\r\n \"40.64.134.160/29\",\r\n + \ \"40.67.50.248/29\",\r\n \"40.67.60.64/29\",\r\n \"40.69.107.8/29\",\r\n + \ \"40.71.13.160/29\",\r\n \"40.71.175.99/32\",\r\n \"40.74.101.192/29\",\r\n + \ \"40.74.125.69/32\",\r\n \"40.74.146.88/29\",\r\n \"40.78.195.8/29\",\r\n + \ \"40.78.202.136/29\",\r\n \"40.79.130.248/29\",\r\n \"40.79.180.16/29\",\r\n + \ \"40.79.187.0/29\",\r\n \"40.80.63.144/29\",\r\n \"40.80.172.120/29\",\r\n + \ \"40.89.22.88/29\",\r\n \"40.89.65.220/32\",\r\n \"40.89.68.134/32\",\r\n + \ \"40.89.157.135/32\",\r\n \"51.12.17.48/29\",\r\n \"51.12.25.48/29\",\r\n + \ \"51.104.8.96/29\",\r\n \"51.104.31.56/29\",\r\n \"51.105.92.56/29\",\r\n + \ \"51.107.52.208/29\",\r\n \"51.107.60.48/29\",\r\n \"51.107.148.24/29\",\r\n + \ \"51.107.156.56/29\",\r\n \"51.116.49.168/29\",\r\n \"51.116.60.48/29\",\r\n + \ \"51.116.145.168/29\",\r\n \"51.116.156.48/29\",\r\n \"51.120.43.88/29\",\r\n + \ \"51.120.100.48/29\",\r\n \"51.120.220.48/29\",\r\n \"51.120.228.40/29\",\r\n + \ \"51.137.166.32/29\",\r\n \"51.140.47.39/32\",\r\n \"51.140.52.16/32\",\r\n + \ \"51.140.211.24/29\",\r\n \"51.141.7.20/32\",\r\n \"51.141.13.110/32\",\r\n + \ \"52.136.52.40/29\",\r\n \"52.140.108.248/29\",\r\n \"52.146.79.136/29\",\r\n + \ \"52.146.130.184/29\",\r\n \"52.150.154.192/29\",\r\n \"52.161.10.167/32\",\r\n + \ \"52.161.23.15/32\",\r\n \"52.162.110.160/29\",\r\n \"52.164.210.96/32\",\r\n + \ \"52.166.243.90/32\",\r\n \"52.172.152.49/32\",\r\n \"52.172.153.209/32\",\r\n + \ \"52.174.36.244/32\",\r\n \"52.175.38.134/32\",\r\n \"52.175.211.210/32\",\r\n + \ \"52.175.222.222/32\",\r\n \"52.180.183.49/32\",\r\n \"52.180.183.58/32\",\r\n + \ \"52.228.37.66/32\",\r\n \"52.228.45.222/32\",\r\n \"52.229.123.172/32\",\r\n + \ \"52.229.127.96/32\",\r\n \"52.231.36.209/32\",\r\n \"52.231.39.142/32\",\r\n + \ \"52.231.147.24/29\",\r\n \"52.231.203.16/32\",\r\n \"52.231.205.214/32\",\r\n + \ \"65.52.252.96/29\",\r\n \"102.133.28.80/29\",\r\n \"102.133.60.32/29\",\r\n + \ \"102.133.124.0/29\",\r\n \"102.133.219.176/29\",\r\n \"104.46.176.168/29\",\r\n + \ \"104.210.84.115/32\",\r\n \"104.211.216.210/32\",\r\n + \ \"104.211.223.67/32\",\r\n \"138.91.29.150/32\",\r\n \"138.91.141.162/32\",\r\n + \ \"157.55.213.99/32\",\r\n \"157.56.8.38/32\",\r\n \"168.61.48.131/32\",\r\n + \ \"168.61.49.99/32\",\r\n \"191.233.10.184/29\",\r\n \"191.233.51.152/29\",\r\n + \ \"191.233.204.240/29\",\r\n \"191.234.138.128/29\",\r\n + \ \"191.235.84.104/32\",\r\n \"191.235.87.113/32\",\r\n \"2603:1000:4:402::320/124\",\r\n + \ \"2603:1000:104:402::320/124\",\r\n \"2603:1010:6:402::320/124\",\r\n + \ \"2603:1010:101:402::320/124\",\r\n \"2603:1010:304:402::320/124\",\r\n + \ \"2603:1010:404:402::320/124\",\r\n \"2603:1020:5:402::320/124\",\r\n + \ \"2603:1020:206:402::320/124\",\r\n \"2603:1020:305:402::320/124\",\r\n + \ \"2603:1020:405:402::320/124\",\r\n \"2603:1020:605:402::320/124\",\r\n + \ \"2603:1020:705:402::320/124\",\r\n \"2603:1020:805:402::320/124\",\r\n + \ \"2603:1020:905:402::320/124\",\r\n \"2603:1020:a04:3::40/124\",\r\n + \ \"2603:1020:a04:402::320/124\",\r\n \"2603:1020:b04:402::320/124\",\r\n + \ \"2603:1020:c04:402::320/124\",\r\n \"2603:1020:d04:402::320/124\",\r\n + \ \"2603:1020:e04::790/124\",\r\n \"2603:1020:e04:402::320/124\",\r\n + \ \"2603:1020:f04:402::320/124\",\r\n \"2603:1020:1004:1::1e0/124\",\r\n + \ \"2603:1020:1104:1::140/124\",\r\n \"2603:1030:f:2::4b0/124\",\r\n + \ \"2603:1030:f:400::b20/124\",\r\n \"2603:1030:10:402::320/124\",\r\n + \ \"2603:1030:104::7b0/124\",\r\n \"2603:1030:104:402::320/124\",\r\n + \ \"2603:1030:107::720/124\",\r\n \"2603:1030:210:402::320/124\",\r\n + \ \"2603:1030:40b:400::b20/124\",\r\n \"2603:1030:40c:402::320/124\",\r\n + \ \"2603:1030:504::1e0/124\",\r\n \"2603:1030:608:3::7b0/124\",\r\n + \ \"2603:1030:608:402::320/124\",\r\n \"2603:1030:807:402::320/124\",\r\n + \ \"2603:1030:a07:402::9a0/124\",\r\n \"2603:1030:b04:402::320/124\",\r\n + \ \"2603:1030:c06:400::b20/124\",\r\n \"2603:1030:f05:402::320/124\",\r\n + \ \"2603:1030:1005:402::320/124\",\r\n \"2603:1040:5:402::320/124\",\r\n + \ \"2603:1040:207:1::4d0/124\",\r\n \"2603:1040:207:402::320/124\",\r\n + \ \"2603:1040:407:402::320/124\",\r\n \"2603:1040:606:402::320/124\",\r\n + \ \"2603:1040:806:402::320/124\",\r\n \"2603:1040:904:402::320/124\",\r\n + \ \"2603:1040:a06:2::540/124\",\r\n \"2603:1040:a06:402::320/124\",\r\n + \ \"2603:1040:b04:402::320/124\",\r\n \"2603:1040:c06:402::320/124\",\r\n + \ \"2603:1040:d04:1::1e0/124\",\r\n \"2603:1040:f05::790/124\",\r\n + \ \"2603:1040:f05:402::320/124\",\r\n \"2603:1040:1002:1::460/124\",\r\n + \ \"2603:1040:1104:1::140/124\",\r\n \"2603:1050:6:402::320/124\",\r\n + \ \"2603:1050:403:400::420/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.AustraliaCentral\",\r\n \"id\": + \"HDInsight.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"australiacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"20.36.36.33/32\",\r\n \"20.36.36.196/32\",\r\n \"20.37.228.0/29\",\r\n + \ \"2603:1010:304:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.AustraliaEast\",\r\n \"id\": \"HDInsight.AustraliaEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.70.73.96/29\",\r\n + \ \"13.75.152.195/32\",\r\n \"20.53.40.120/29\",\r\n \"104.210.84.115/32\",\r\n + \ \"2603:1010:6:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.AustraliaSoutheast\",\r\n \"id\": + \"HDInsight.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"13.77.2.56/32\",\r\n \"13.77.2.94/32\",\r\n \"13.77.52.8/29\",\r\n + \ \"104.46.176.168/29\",\r\n \"2603:1010:101:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.BrazilSouth\",\r\n + \ \"id\": \"HDInsight.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"191.233.204.240/29\",\r\n \"191.234.138.128/29\",\r\n + \ \"191.235.84.104/32\",\r\n \"191.235.87.113/32\",\r\n \"2603:1050:6:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.BrazilSoutheast\",\r\n + \ \"id\": \"HDInsight.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"191.233.10.184/29\",\r\n \"191.233.51.152/29\",\r\n + \ \"2603:1050:403:400::420/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.CanadaCentral\",\r\n \"id\": \"HDInsight.CanadaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.71.172.240/29\",\r\n + \ \"20.48.192.24/29\",\r\n \"52.228.37.66/32\",\r\n \"52.228.45.222/32\",\r\n + \ \"2603:1030:f05:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.CanadaEast\",\r\n \"id\": \"HDInsight.CanadaEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"40.69.107.8/29\",\r\n + \ \"40.89.22.88/29\",\r\n \"52.229.123.172/32\",\r\n \"52.229.127.96/32\",\r\n + \ \"2603:1030:1005:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.CentralIndia\",\r\n \"id\": \"HDInsight.CentralIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.43.120.8/29\",\r\n + \ \"52.140.108.248/29\",\r\n \"52.172.152.49/32\",\r\n \"52.172.153.209/32\",\r\n + \ \"2603:1040:a06:2::540/124\",\r\n \"2603:1040:a06:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.CentralUS\",\r\n + \ \"id\": \"HDInsight.CentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"13.89.171.120/29\",\r\n \"20.40.207.144/29\",\r\n + \ \"2603:1030:10:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.CentralUSEUAP\",\r\n \"id\": \"HDInsight.CentralUSEUAP\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.45.198.80/29\",\r\n + \ \"40.78.202.136/29\",\r\n \"52.180.183.49/32\",\r\n \"52.180.183.58/32\",\r\n + \ \"2603:1030:f:2::4b0/124\",\r\n \"2603:1030:f:400::b20/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.EastAsia\",\r\n + \ \"id\": \"HDInsight.EastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"13.75.38.112/29\",\r\n \"20.189.111.192/29\",\r\n + \ \"23.102.235.122/32\",\r\n \"52.175.38.134/32\",\r\n \"2603:1040:207:1::4d0/124\",\r\n + \ \"2603:1040:207:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.EastUS\",\r\n \"id\": \"HDInsight.EastUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.82.225.233/32\",\r\n + \ \"40.71.13.160/29\",\r\n \"40.71.175.99/32\",\r\n \"52.146.79.136/29\",\r\n + \ \"168.61.48.131/32\",\r\n \"168.61.49.99/32\",\r\n \"2603:1030:210:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.EastUS2\",\r\n + \ \"id\": \"HDInsight.EastUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"20.44.16.8/29\",\r\n \"20.49.102.48/29\",\r\n \"2603:1030:40c:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.EastUS2EUAP\",\r\n + \ \"id\": \"HDInsight.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"20.39.15.48/29\",\r\n \"40.74.146.88/29\",\r\n \"40.89.65.220/32\",\r\n + \ \"40.89.68.134/32\",\r\n \"2603:1030:40b:400::b20/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.FranceCentral\",\r\n + \ \"id\": \"HDInsight.FranceCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"20.43.45.224/29\",\r\n \"20.188.39.64/32\",\r\n + \ \"40.79.130.248/29\",\r\n \"40.89.157.135/32\",\r\n \"2603:1020:805:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.FranceSouth\",\r\n + \ \"id\": \"HDInsight.FranceSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"40.79.180.16/29\",\r\n \"51.105.92.56/29\",\r\n + \ \"2603:1020:905:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.GermanyNorth\",\r\n \"id\": \"HDInsight.GermanyNorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.116.49.168/29\",\r\n + \ \"51.116.60.48/29\",\r\n \"2603:1020:d04:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.GermanyWestCentral\",\r\n + \ \"id\": \"HDInsight.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"51.116.145.168/29\",\r\n \"51.116.156.48/29\",\r\n + \ \"2603:1020:c04:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.JapanEast\",\r\n \"id\": \"HDInsight.JapanEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.78.89.60/32\",\r\n + \ \"13.78.125.90/32\",\r\n \"20.191.160.0/29\",\r\n \"40.79.187.0/29\",\r\n + \ \"2603:1040:407:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.JapanWest\",\r\n \"id\": \"HDInsight.JapanWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"40.74.101.192/29\",\r\n + \ \"40.74.125.69/32\",\r\n \"40.80.63.144/29\",\r\n \"138.91.29.150/32\",\r\n + \ \"2603:1040:606:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.JioIndiaCentral\",\r\n \"id\": \"HDInsight.JioIndiaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.192.48.216/29\",\r\n + \ \"20.192.235.248/29\",\r\n \"2603:1040:1104:1::140/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.JioIndiaWest\",\r\n + \ \"id\": \"HDInsight.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"20.193.194.16/29\",\r\n \"20.193.203.200/29\",\r\n + \ \"2603:1040:d04:1::1e0/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.KoreaCentral\",\r\n \"id\": \"HDInsight.KoreaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.41.69.32/29\",\r\n + \ \"20.44.26.240/29\",\r\n \"52.231.36.209/32\",\r\n \"52.231.39.142/32\",\r\n + \ \"2603:1040:f05::790/124\",\r\n \"2603:1040:f05:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.KoreaSouth\",\r\n + \ \"id\": \"HDInsight.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"40.80.172.120/29\",\r\n \"52.231.147.24/29\",\r\n + \ \"52.231.203.16/32\",\r\n \"52.231.205.214/32\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"HDInsight.NorthCentralUS\",\r\n + \ \"id\": \"HDInsight.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.49.114.56/29\",\r\n + \ \"52.162.110.160/29\",\r\n \"157.55.213.99/32\",\r\n \"157.56.8.38/32\",\r\n + \ \"2603:1030:608:3::7b0/124\",\r\n \"2603:1030:608:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.NorthEurope\",\r\n + \ \"id\": \"HDInsight.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"13.69.229.72/29\",\r\n \"13.74.153.132/32\",\r\n + \ \"52.146.130.184/29\",\r\n \"52.164.210.96/32\",\r\n \"2603:1020:5:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.NorwayEast\",\r\n + \ \"id\": \"HDInsight.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"51.120.43.88/29\",\r\n \"51.120.100.48/29\",\r\n + \ \"2603:1020:e04::790/124\",\r\n \"2603:1020:e04:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.NorwayWest\",\r\n + \ \"id\": \"HDInsight.NorwayWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"51.120.220.48/29\",\r\n \"51.120.228.40/29\",\r\n + \ \"2603:1020:f04:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.SouthAfricaNorth\",\r\n \"id\": + \"HDInsight.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"southafricanorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"102.133.124.0/29\",\r\n \"102.133.219.176/29\",\r\n + \ \"2603:1000:104:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.SouthAfricaWest\",\r\n \"id\": \"HDInsight.SouthAfricaWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"102.133.28.80/29\",\r\n + \ \"102.133.60.32/29\",\r\n \"2603:1000:4:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SouthCentralUS\",\r\n + \ \"id\": \"HDInsight.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.73.240.8/29\",\r\n + \ \"13.73.254.192/29\",\r\n \"2603:1030:807:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SouthCentralUSSTG\",\r\n + \ \"id\": \"HDInsight.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"20.44.4.64/29\",\r\n \"20.45.115.128/29\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"HDInsight.SoutheastAsia\",\r\n + \ \"id\": \"HDInsight.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"13.67.9.152/29\",\r\n \"13.76.136.249/32\",\r\n + \ \"13.76.245.160/32\",\r\n \"23.98.107.192/29\",\r\n \"2603:1040:5:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SouthIndia\",\r\n + \ \"id\": \"HDInsight.SouthIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"20.41.197.120/29\",\r\n \"40.78.195.8/29\",\r\n + \ \"104.211.216.210/32\",\r\n \"104.211.223.67/32\",\r\n + \ \"2603:1040:c06:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.SwedenCentral\",\r\n \"id\": \"HDInsight.SwedenCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.12.25.48/29\",\r\n + \ \"2603:1020:1004:1::1e0/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.SwitzerlandNorth\",\r\n \"id\": + \"HDInsight.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"51.107.52.208/29\",\r\n \"51.107.60.48/29\",\r\n + \ \"2603:1020:a04:3::40/124\",\r\n \"2603:1020:a04:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.SwitzerlandWest\",\r\n + \ \"id\": \"HDInsight.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"51.107.148.24/29\",\r\n \"51.107.156.56/29\",\r\n + \ \"2603:1020:b04:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.UAECentral\",\r\n \"id\": \"HDInsight.UAECentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"20.37.68.40/29\",\r\n + \ \"20.37.76.96/29\",\r\n \"2603:1040:b04:402::320/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.UAENorth\",\r\n + \ \"id\": \"HDInsight.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"20.38.139.88/29\",\r\n \"65.52.252.96/29\",\r\n + \ \"2603:1040:904:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.UKSouth\",\r\n \"id\": \"HDInsight.UKSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.104.8.96/29\",\r\n + \ \"51.104.31.56/29\",\r\n \"51.140.47.39/32\",\r\n \"51.140.52.16/32\",\r\n + \ \"2603:1020:705:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.UKWest\",\r\n \"id\": \"HDInsight.UKWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"51.137.166.32/29\",\r\n + \ \"51.140.211.24/29\",\r\n \"51.141.7.20/32\",\r\n \"51.141.13.110/32\",\r\n + \ \"2603:1020:605:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.WestCentralUS\",\r\n \"id\": \"HDInsight.WestCentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.71.196.48/29\",\r\n + \ \"52.150.154.192/29\",\r\n \"52.161.10.167/32\",\r\n \"52.161.23.15/32\",\r\n + \ \"2603:1030:b04:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.WestEurope\",\r\n \"id\": \"HDInsight.WestEurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.69.65.8/29\",\r\n + \ \"20.61.96.160/29\",\r\n \"52.166.243.90/32\",\r\n \"52.174.36.244/32\",\r\n + \ \"2603:1020:206:402::320/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"HDInsight.WestUS\",\r\n \"id\": \"HDInsight.WestUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"HDInsight\",\r\n \"addressPrefixes\": [\r\n \"13.64.254.98/32\",\r\n + \ \"13.86.218.240/29\",\r\n \"20.49.126.128/29\",\r\n \"23.99.5.239/32\",\r\n + \ \"23.101.196.19/32\",\r\n \"138.91.141.162/32\",\r\n \"2603:1030:a07:402::9a0/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.WestUS2\",\r\n + \ \"id\": \"HDInsight.WestUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"13.66.141.144/29\",\r\n \"40.64.134.160/29\",\r\n + \ \"52.175.211.210/32\",\r\n \"52.175.222.222/32\",\r\n \"2603:1030:c06:400::b20/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"HDInsight.WestUS3\",\r\n + \ \"id\": \"HDInsight.WestUS3\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"HDInsight\",\r\n \"addressPrefixes\": + [\r\n \"20.150.167.176/29\",\r\n \"20.150.172.232/29\",\r\n + \ \"2603:1030:504::1e0/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"LogicApps\",\r\n \"id\": \"LogicApps\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"LogicApps\",\r\n \"addressPrefixes\": + [\r\n \"13.65.39.247/32\",\r\n \"13.65.82.17/32\",\r\n \"13.65.82.190/32\",\r\n + \ \"13.65.86.56/32\",\r\n \"13.65.98.39/32\",\r\n \"13.66.52.232/32\",\r\n + \ \"13.66.128.68/32\",\r\n \"13.66.201.169/32\",\r\n \"13.66.210.167/32\",\r\n + \ \"13.66.224.169/32\",\r\n \"13.66.246.219/32\",\r\n \"13.67.13.224/27\",\r\n + \ \"13.67.91.135/32\",\r\n \"13.67.107.128/32\",\r\n \"13.67.110.109/32\",\r\n + \ \"13.67.236.76/32\",\r\n \"13.67.236.125/32\",\r\n \"13.69.71.160/27\",\r\n + \ \"13.69.109.144/28\",\r\n \"13.69.231.160/27\",\r\n \"13.69.233.16/28\",\r\n + \ \"13.70.78.192/27\",\r\n \"13.70.159.205/32\",\r\n \"13.71.146.140/32\",\r\n + \ \"13.71.158.3/32\",\r\n \"13.71.158.120/32\",\r\n \"13.71.184.150/32\",\r\n + \ \"13.71.186.1/32\",\r\n \"13.71.199.128/27\",\r\n \"13.71.199.160/28\",\r\n + \ \"13.73.4.207/32\",\r\n \"13.73.114.207/32\",\r\n \"13.73.115.153/32\",\r\n + \ \"13.73.244.144/28\",\r\n \"13.73.244.160/27\",\r\n \"13.75.89.159/32\",\r\n + \ \"13.75.94.173/32\",\r\n \"13.75.149.4/32\",\r\n \"13.75.153.66/32\",\r\n + \ \"13.76.4.194/32\",\r\n \"13.76.5.96/32\",\r\n \"13.76.133.155/32\",\r\n + \ \"13.77.3.139/32\",\r\n \"13.77.53.224/27\",\r\n \"13.77.55.128/28\",\r\n + \ \"13.77.56.167/32\",\r\n \"13.77.58.136/32\",\r\n \"13.77.149.159/32\",\r\n + \ \"13.77.152.21/32\",\r\n \"13.78.18.168/32\",\r\n \"13.78.20.232/32\",\r\n + \ \"13.78.21.155/32\",\r\n \"13.78.35.229/32\",\r\n \"13.78.42.223/32\",\r\n + \ \"13.78.43.164/32\",\r\n \"13.78.62.130/32\",\r\n \"13.78.84.187/32\",\r\n + \ \"13.78.111.160/27\",\r\n \"13.78.129.20/32\",\r\n \"13.78.137.179/32\",\r\n + \ \"13.78.137.247/32\",\r\n \"13.78.141.75/32\",\r\n \"13.78.148.140/32\",\r\n + \ \"13.78.151.161/32\",\r\n \"13.79.173.49/32\",\r\n \"13.84.41.46/32\",\r\n + \ \"13.84.43.45/32\",\r\n \"13.84.159.168/32\",\r\n \"13.85.79.155/32\",\r\n + \ \"13.86.221.240/28\",\r\n \"13.86.223.0/27\",\r\n \"13.87.58.144/28\",\r\n + \ \"13.87.58.160/27\",\r\n \"13.87.124.144/28\",\r\n \"13.87.124.160/27\",\r\n + \ \"13.88.249.209/32\",\r\n \"13.89.178.48/28\",\r\n \"13.91.252.184/32\",\r\n + \ \"13.92.98.111/32\",\r\n \"13.95.147.65/32\",\r\n \"13.95.155.53/32\",\r\n + \ \"20.21.46.80/28\",\r\n \"20.21.46.96/27\",\r\n \"20.36.108.192/27\",\r\n + \ \"20.36.108.224/28\",\r\n \"20.36.117.96/27\",\r\n \"20.36.117.128/28\",\r\n + \ \"20.37.76.208/28\",\r\n \"20.37.76.224/27\",\r\n \"20.38.128.176/28\",\r\n + \ \"20.38.128.192/27\",\r\n \"20.38.149.144/28\",\r\n \"20.38.149.160/27\",\r\n + \ \"20.40.32.19/32\",\r\n \"20.40.32.49/32\",\r\n \"20.40.32.59/32\",\r\n + \ \"20.40.32.60/31\",\r\n \"20.40.32.80/31\",\r\n \"20.40.32.85/32\",\r\n + \ \"20.40.32.87/32\",\r\n \"20.40.32.113/32\",\r\n \"20.40.32.116/32\",\r\n + \ \"20.40.32.162/32\",\r\n \"20.42.64.48/28\",\r\n \"20.42.72.160/27\",\r\n + \ \"20.43.121.192/27\",\r\n \"20.43.121.224/28\",\r\n \"20.44.4.176/28\",\r\n + \ \"20.44.4.192/27\",\r\n \"20.44.17.224/27\",\r\n \"20.45.64.29/32\",\r\n + \ \"20.45.64.87/32\",\r\n \"20.45.67.134/31\",\r\n \"20.45.67.170/32\",\r\n + \ \"20.45.71.213/32\",\r\n \"20.45.72.54/32\",\r\n \"20.45.72.72/32\",\r\n + \ \"20.45.75.193/32\",\r\n \"20.45.75.200/32\",\r\n \"20.45.75.236/32\",\r\n + \ \"20.45.79.239/32\",\r\n \"20.46.42.220/32\",\r\n \"20.46.46.173/32\",\r\n + \ \"20.72.30.160/28\",\r\n \"20.72.30.192/27\",\r\n \"20.150.172.240/28\",\r\n + \ \"20.150.173.192/27\",\r\n \"20.150.181.32/27\",\r\n \"20.188.33.169/32\",\r\n + \ \"20.188.39.105/32\",\r\n \"20.192.184.0/27\",\r\n \"20.192.238.128/27\",\r\n + \ \"20.192.238.160/28\",\r\n \"20.193.206.48/28\",\r\n \"20.193.206.128/27\",\r\n + \ \"23.96.200.77/32\",\r\n \"23.96.200.227/32\",\r\n \"23.96.203.46/32\",\r\n + \ \"23.96.210.49/32\",\r\n \"23.96.212.28/32\",\r\n \"23.96.253.219/32\",\r\n + \ \"23.97.68.172/32\",\r\n \"23.97.210.126/32\",\r\n \"23.97.211.179/32\",\r\n + \ \"23.97.218.130/32\",\r\n \"23.99.125.99/32\",\r\n \"23.100.29.190/32\",\r\n + \ \"23.100.82.16/32\",\r\n \"23.100.86.139/32\",\r\n \"23.100.87.24/32\",\r\n + \ \"23.100.87.56/32\",\r\n \"23.100.124.84/32\",\r\n \"23.100.127.172/32\",\r\n + \ \"23.101.132.208/32\",\r\n \"23.101.136.201/32\",\r\n \"23.101.139.153/32\",\r\n + \ \"23.101.183.225/32\",\r\n \"23.101.191.106/32\",\r\n \"23.102.70.174/32\",\r\n + \ \"40.67.60.176/28\",\r\n \"40.67.60.192/27\",\r\n \"40.68.209.23/32\",\r\n + \ \"40.68.222.65/32\",\r\n \"40.69.110.192/27\",\r\n \"40.69.110.224/28\",\r\n + \ \"40.70.26.154/32\",\r\n \"40.70.27.236/32\",\r\n \"40.70.27.253/32\",\r\n + \ \"40.70.29.214/32\",\r\n \"40.70.131.151/32\",\r\n \"40.74.64.207/32\",\r\n + \ \"40.74.66.200/32\",\r\n \"40.74.68.85/32\",\r\n \"40.74.74.21/32\",\r\n + \ \"40.74.76.213/32\",\r\n \"40.74.77.205/32\",\r\n \"40.74.81.13/32\",\r\n + \ \"40.74.85.215/32\",\r\n \"40.74.131.151/32\",\r\n \"40.74.132.29/32\",\r\n + \ \"40.74.136.23/32\",\r\n \"40.74.140.4/32\",\r\n \"40.74.140.162/32\",\r\n + \ \"40.74.140.173/32\",\r\n \"40.74.142.133/32\",\r\n \"40.74.143.215/32\",\r\n + \ \"40.74.149.96/27\",\r\n \"40.75.35.240/28\",\r\n \"40.77.31.87/32\",\r\n + \ \"40.77.111.254/32\",\r\n \"40.78.196.176/28\",\r\n \"40.78.204.208/28\",\r\n + \ \"40.78.204.224/27\",\r\n \"40.78.239.16/28\",\r\n \"40.78.245.144/28\",\r\n + \ \"40.78.245.160/27\",\r\n \"40.79.44.7/32\",\r\n \"40.79.139.144/28\",\r\n + \ \"40.79.139.160/27\",\r\n \"40.79.171.240/28\",\r\n \"40.79.180.160/27\",\r\n + \ \"40.79.180.192/28\",\r\n \"40.79.197.48/28\",\r\n \"40.80.180.16/28\",\r\n + \ \"40.80.180.32/27\",\r\n \"40.83.73.39/32\",\r\n \"40.83.75.165/32\",\r\n + \ \"40.83.77.208/32\",\r\n \"40.83.98.194/32\",\r\n \"40.83.100.69/32\",\r\n + \ \"40.83.127.19/32\",\r\n \"40.83.164.80/32\",\r\n \"40.84.25.234/32\",\r\n + \ \"40.84.30.147/32\",\r\n \"40.84.59.136/32\",\r\n \"40.84.138.132/32\",\r\n + \ \"40.85.241.105/32\",\r\n \"40.85.250.135/32\",\r\n \"40.85.250.212/32\",\r\n + \ \"40.85.252.47/32\",\r\n \"40.86.202.42/32\",\r\n \"40.86.203.228/32\",\r\n + \ \"40.86.216.241/32\",\r\n \"40.86.217.241/32\",\r\n \"40.86.226.149/32\",\r\n + \ \"40.86.228.93/32\",\r\n \"40.89.186.28/32\",\r\n \"40.89.186.30/32\",\r\n + \ \"40.89.188.169/32\",\r\n \"40.89.190.104/32\",\r\n \"40.89.191.161/32\",\r\n + \ \"40.112.90.39/32\",\r\n \"40.112.92.104/32\",\r\n \"40.112.95.216/32\",\r\n + \ \"40.113.1.181/32\",\r\n \"40.113.3.202/32\",\r\n \"40.113.4.18/32\",\r\n + \ \"40.113.10.90/32\",\r\n \"40.113.11.17/32\",\r\n \"40.113.12.95/32\",\r\n + \ \"40.113.18.211/32\",\r\n \"40.113.20.202/32\",\r\n \"40.113.22.12/32\",\r\n + \ \"40.113.94.31/32\",\r\n \"40.113.218.230/32\",\r\n \"40.114.8.21/32\",\r\n + \ \"40.114.12.31/32\",\r\n \"40.114.13.216/32\",\r\n \"40.114.14.143/32\",\r\n + \ \"40.114.40.186/32\",\r\n \"40.114.51.5/32\",\r\n \"40.114.82.191/32\",\r\n + \ \"40.115.78.70/32\",\r\n \"40.115.78.237/32\",\r\n \"40.117.99.79/32\",\r\n + \ \"40.117.100.228/32\",\r\n \"40.118.241.243/32\",\r\n \"40.118.244.241/32\",\r\n + \ \"40.119.166.152/32\",\r\n \"40.120.64.0/27\",\r\n \"40.120.64.32/28\",\r\n + \ \"40.121.91.41/32\",\r\n \"40.122.41.236/32\",\r\n \"40.122.46.197/32\",\r\n + \ \"40.122.170.198/32\",\r\n \"40.123.212.104/32\",\r\n \"40.123.216.73/32\",\r\n + \ \"40.123.217.165/32\",\r\n \"40.123.224.143/32\",\r\n \"40.123.224.227/32\",\r\n + \ \"40.123.228.182/32\",\r\n \"40.123.230.45/32\",\r\n \"40.123.231.179/32\",\r\n + \ \"40.123.231.186/32\",\r\n \"40.126.227.199/32\",\r\n \"40.126.240.14/32\",\r\n + \ \"40.126.249.73/32\",\r\n \"40.126.252.33/32\",\r\n \"40.126.252.85/32\",\r\n + \ \"40.126.252.107/32\",\r\n \"40.127.80.231/32\",\r\n \"40.127.83.170/32\",\r\n + \ \"40.127.84.38/32\",\r\n \"40.127.86.12/32\",\r\n \"40.127.91.18/32\",\r\n + \ \"40.127.93.92/32\",\r\n \"51.11.97.16/28\",\r\n \"51.11.97.32/27\",\r\n + \ \"51.12.100.112/28\",\r\n \"51.12.102.160/27\",\r\n \"51.12.204.112/28\",\r\n + \ \"51.12.204.192/27\",\r\n \"51.12.229.32/27\",\r\n \"51.103.128.52/32\",\r\n + \ \"51.103.132.236/32\",\r\n \"51.103.134.69/32\",\r\n \"51.103.134.138/32\",\r\n + \ \"51.103.135.51/32\",\r\n \"51.103.136.37/32\",\r\n \"51.103.136.209/32\",\r\n + \ \"51.103.136.210/32\",\r\n \"51.103.137.79/32\",\r\n \"51.103.138.28/32\",\r\n + \ \"51.103.138.96/32\",\r\n \"51.103.139.122/32\",\r\n \"51.104.9.112/28\",\r\n + \ \"51.105.69.96/27\",\r\n \"51.107.60.160/27\",\r\n \"51.107.60.192/28\",\r\n + \ \"51.107.156.160/27\",\r\n \"51.107.156.192/28\",\r\n \"51.107.225.151/32\",\r\n + \ \"51.107.225.163/32\",\r\n \"51.107.225.167/32\",\r\n \"51.107.225.179/32\",\r\n + \ \"51.107.225.180/32\",\r\n \"51.107.225.186/32\",\r\n \"51.107.225.190/32\",\r\n + \ \"51.107.231.86/32\",\r\n \"51.107.239.66/32\",\r\n \"51.107.239.83/32\",\r\n + \ \"51.107.239.112/32\",\r\n \"51.107.239.123/32\",\r\n \"51.116.60.144/28\",\r\n + \ \"51.116.60.160/27\",\r\n \"51.116.158.64/28\",\r\n \"51.116.168.104/32\",\r\n + \ \"51.116.168.222/32\",\r\n \"51.116.171.49/32\",\r\n \"51.116.171.209/32\",\r\n + \ \"51.116.175.0/32\",\r\n \"51.116.175.17/32\",\r\n \"51.116.175.51/32\",\r\n + \ \"51.116.208.37/32\",\r\n \"51.116.208.51/32\",\r\n \"51.116.208.64/32\",\r\n + \ \"51.116.208.132/32\",\r\n \"51.116.208.165/32\",\r\n \"51.116.208.175/32\",\r\n + \ \"51.116.208.192/32\",\r\n \"51.116.208.200/32\",\r\n \"51.116.208.217/32\",\r\n + \ \"51.116.208.222/32\",\r\n \"51.116.211.29/32\",\r\n \"51.116.211.168/32\",\r\n + \ \"51.116.233.22/32\",\r\n \"51.116.233.33/32\",\r\n \"51.116.233.35/32\",\r\n + \ \"51.116.233.40/32\",\r\n \"51.116.233.87/32\",\r\n \"51.116.243.224/27\",\r\n + \ \"51.120.100.160/27\",\r\n \"51.120.109.32/28\",\r\n \"51.120.220.128/27\",\r\n + \ \"51.120.220.160/28\",\r\n \"51.140.28.225/32\",\r\n \"51.140.73.85/32\",\r\n + \ \"51.140.74.14/32\",\r\n \"51.140.78.44/32\",\r\n \"51.140.78.71/32\",\r\n + \ \"51.140.79.109/32\",\r\n \"51.140.84.39/32\",\r\n \"51.140.137.190/32\",\r\n + \ \"51.140.142.28/32\",\r\n \"51.140.153.135/32\",\r\n \"51.140.155.81/32\",\r\n + \ \"51.140.158.24/32\",\r\n \"51.141.45.238/32\",\r\n \"51.141.47.136/32\",\r\n + \ \"51.141.48.98/32\",\r\n \"51.141.51.145/32\",\r\n \"51.141.53.164/32\",\r\n + \ \"51.141.54.185/32\",\r\n \"51.141.112.112/32\",\r\n \"51.141.113.36/32\",\r\n + \ \"51.141.114.77/32\",\r\n \"51.141.118.119/32\",\r\n \"51.141.119.63/32\",\r\n + \ \"51.141.119.150/32\",\r\n \"51.144.176.185/32\",\r\n \"51.144.182.201/32\",\r\n + \ \"52.143.156.55/32\",\r\n \"52.143.158.203/32\",\r\n \"52.143.162.83/32\",\r\n + \ \"52.143.164.15/32\",\r\n \"52.143.164.80/32\",\r\n \"52.147.97.16/28\",\r\n + \ \"52.147.97.32/27\",\r\n \"52.160.90.237/32\",\r\n \"52.160.92.112/32\",\r\n + \ \"52.161.8.128/32\",\r\n \"52.161.9.108/32\",\r\n \"52.161.18.218/32\",\r\n + \ \"52.161.19.82/32\",\r\n \"52.161.26.172/32\",\r\n \"52.161.27.190/32\",\r\n + \ \"52.162.111.144/28\",\r\n \"52.162.111.160/27\",\r\n \"52.162.208.216/32\",\r\n + \ \"52.162.213.231/32\",\r\n \"52.163.93.214/32\",\r\n \"52.163.228.93/32\",\r\n + \ \"52.163.230.166/32\",\r\n \"52.167.109.80/28\",\r\n \"52.169.218.253/32\",\r\n + \ \"52.169.220.174/32\",\r\n \"52.172.9.47/32\",\r\n \"52.172.49.43/32\",\r\n + \ \"52.172.50.24/32\",\r\n \"52.172.51.140/32\",\r\n \"52.172.52.0/32\",\r\n + \ \"52.172.55.231/32\",\r\n \"52.172.154.168/32\",\r\n \"52.172.157.194/32\",\r\n + \ \"52.172.184.192/32\",\r\n \"52.172.185.79/32\",\r\n \"52.172.186.159/32\",\r\n + \ \"52.172.191.194/32\",\r\n \"52.174.49.6/32\",\r\n \"52.174.54.218/32\",\r\n + \ \"52.175.33.254/32\",\r\n \"52.175.198.132/32\",\r\n \"52.178.165.215/32\",\r\n + \ \"52.178.166.21/32\",\r\n \"52.182.141.160/27\",\r\n \"52.183.29.132/32\",\r\n + \ \"52.183.30.10/32\",\r\n \"52.183.30.169/32\",\r\n \"52.183.39.67/32\",\r\n + \ \"52.187.65.81/32\",\r\n \"52.187.65.155/32\",\r\n \"52.187.226.96/32\",\r\n + \ \"52.187.226.139/32\",\r\n \"52.187.227.245/32\",\r\n \"52.187.229.130/32\",\r\n + \ \"52.187.231.161/32\",\r\n \"52.187.231.184/32\",\r\n \"52.189.214.42/32\",\r\n + \ \"52.189.216.28/32\",\r\n \"52.189.220.75/32\",\r\n \"52.189.222.77/32\",\r\n + \ \"52.228.39.244/32\",\r\n \"52.229.120.45/32\",\r\n \"52.229.125.57/32\",\r\n + \ \"52.229.126.25/32\",\r\n \"52.231.23.16/28\",\r\n \"52.231.23.32/27\",\r\n + \ \"52.232.128.155/32\",\r\n \"52.232.129.143/32\",\r\n \"52.232.133.109/32\",\r\n + \ \"52.233.29.79/32\",\r\n \"52.233.29.92/32\",\r\n \"52.233.30.218/32\",\r\n + \ \"65.52.8.225/32\",\r\n \"65.52.9.64/32\",\r\n \"65.52.9.96/32\",\r\n + \ \"65.52.10.183/32\",\r\n \"65.52.60.5/32\",\r\n \"65.52.175.34/32\",\r\n + \ \"65.52.185.96/32\",\r\n \"65.52.185.218/32\",\r\n \"65.52.186.153/32\",\r\n + \ \"65.52.186.190/32\",\r\n \"65.52.186.225/32\",\r\n \"65.52.211.164/32\",\r\n + \ \"70.37.50.6/32\",\r\n \"70.37.54.122/32\",\r\n \"102.133.28.208/28\",\r\n + \ \"102.133.28.224/27\",\r\n \"102.133.72.37/32\",\r\n \"102.133.72.98/32\",\r\n + \ \"102.133.72.113/32\",\r\n \"102.133.72.132/32\",\r\n \"102.133.72.145/32\",\r\n + \ \"102.133.72.173/32\",\r\n \"102.133.72.179/32\",\r\n \"102.133.72.183/32\",\r\n + \ \"102.133.72.184/32\",\r\n \"102.133.72.190/32\",\r\n \"102.133.75.169/32\",\r\n + \ \"102.133.75.191/32\",\r\n \"102.133.156.176/28\",\r\n + \ \"102.133.224.125/32\",\r\n \"102.133.226.199/32\",\r\n + \ \"102.133.227.103/32\",\r\n \"102.133.228.4/32\",\r\n \"102.133.228.6/32\",\r\n + \ \"102.133.228.9/32\",\r\n \"102.133.230.4/32\",\r\n \"102.133.230.82/32\",\r\n + \ \"102.133.231.9/32\",\r\n \"102.133.231.51/32\",\r\n \"102.133.231.117/32\",\r\n + \ \"102.133.231.188/32\",\r\n \"102.133.251.224/27\",\r\n + \ \"104.40.49.140/32\",\r\n \"104.40.54.74/32\",\r\n \"104.40.59.188/32\",\r\n + \ \"104.40.61.150/32\",\r\n \"104.40.62.178/32\",\r\n \"104.40.218.37/32\",\r\n + \ \"104.41.0.115/32\",\r\n \"104.41.33.103/32\",\r\n \"104.41.162.245/32\",\r\n + \ \"104.41.163.102/32\",\r\n \"104.41.168.76/32\",\r\n \"104.41.173.132/32\",\r\n + \ \"104.41.179.165/32\",\r\n \"104.41.181.59/32\",\r\n \"104.41.182.232/32\",\r\n + \ \"104.42.38.32/32\",\r\n \"104.42.49.145/32\",\r\n \"104.42.224.227/32\",\r\n + \ \"104.42.236.93/32\",\r\n \"104.43.166.135/32\",\r\n \"104.43.243.39/32\",\r\n + \ \"104.45.9.52/32\",\r\n \"104.45.153.81/32\",\r\n \"104.46.32.99/32\",\r\n + \ \"104.46.34.93/32\",\r\n \"104.46.34.208/32\",\r\n \"104.46.39.63/32\",\r\n + \ \"104.46.42.167/32\",\r\n \"104.46.98.208/32\",\r\n \"104.46.106.158/32\",\r\n + \ \"104.47.138.214/32\",\r\n \"104.208.25.27/32\",\r\n \"104.208.140.40/32\",\r\n + \ \"104.208.155.200/32\",\r\n \"104.208.158.174/32\",\r\n + \ \"104.209.131.77/32\",\r\n \"104.209.133.254/32\",\r\n + \ \"104.209.134.133/32\",\r\n \"104.210.89.222/32\",\r\n + \ \"104.210.89.244/32\",\r\n \"104.210.90.241/32\",\r\n \"104.210.91.55/32\",\r\n + \ \"104.210.144.48/32\",\r\n \"104.210.153.89/32\",\r\n \"104.211.73.195/32\",\r\n + \ \"104.211.74.145/32\",\r\n \"104.211.90.162/32\",\r\n \"104.211.90.169/32\",\r\n + \ \"104.211.101.108/32\",\r\n \"104.211.102.62/32\",\r\n + \ \"104.211.154.7/32\",\r\n \"104.211.154.59/32\",\r\n \"104.211.156.153/32\",\r\n + \ \"104.211.157.237/32\",\r\n \"104.211.158.123/32\",\r\n + \ \"104.211.158.127/32\",\r\n \"104.211.162.205/32\",\r\n + \ \"104.211.164.25/32\",\r\n \"104.211.164.80/32\",\r\n \"104.211.164.112/32\",\r\n + \ \"104.211.164.136/32\",\r\n \"104.211.165.81/32\",\r\n + \ \"104.211.225.152/32\",\r\n \"104.211.227.229/32\",\r\n + \ \"104.211.229.115/32\",\r\n \"104.211.230.126/32\",\r\n + \ \"104.211.230.129/32\",\r\n \"104.211.231.39/32\",\r\n + \ \"104.214.137.243/32\",\r\n \"104.214.161.64/27\",\r\n + \ \"104.214.161.96/28\",\r\n \"104.215.88.156/32\",\r\n \"104.215.89.144/32\",\r\n + \ \"104.215.90.86/32\",\r\n \"104.215.90.189/32\",\r\n \"104.215.90.203/32\",\r\n + \ \"104.215.93.125/32\",\r\n \"104.215.176.31/32\",\r\n \"104.215.176.81/32\",\r\n + \ \"104.215.177.5/32\",\r\n \"104.215.178.204/32\",\r\n \"104.215.179.133/32\",\r\n + \ \"104.215.180.203/32\",\r\n \"104.215.181.6/32\",\r\n \"111.221.85.72/32\",\r\n + \ \"111.221.85.74/32\",\r\n \"137.116.44.82/32\",\r\n \"137.116.80.70/32\",\r\n + \ \"137.116.85.245/32\",\r\n \"137.116.126.165/32\",\r\n + \ \"137.117.72.32/32\",\r\n \"137.135.106.54/32\",\r\n \"138.91.17.47/32\",\r\n + \ \"138.91.25.99/32\",\r\n \"138.91.26.45/32\",\r\n \"138.91.188.137/32\",\r\n + \ \"157.55.210.61/32\",\r\n \"157.55.212.238/32\",\r\n \"157.56.12.202/32\",\r\n + \ \"157.56.160.212/32\",\r\n \"157.56.162.53/32\",\r\n \"157.56.167.147/32\",\r\n + \ \"168.61.86.120/32\",\r\n \"168.61.152.201/32\",\r\n \"168.61.172.83/32\",\r\n + \ \"168.61.172.225/32\",\r\n \"168.61.173.172/32\",\r\n \"168.61.217.177/32\",\r\n + \ \"168.62.109.110/32\",\r\n \"168.62.219.52/32\",\r\n \"168.62.219.83/32\",\r\n + \ \"168.62.248.37/32\",\r\n \"168.62.249.81/32\",\r\n \"168.63.136.37/32\",\r\n + \ \"168.63.200.173/32\",\r\n \"191.232.32.19/32\",\r\n \"191.232.32.100/32\",\r\n + \ \"191.232.34.78/32\",\r\n \"191.232.34.249/32\",\r\n \"191.232.35.177/32\",\r\n + \ \"191.232.36.213/32\",\r\n \"191.233.54.240/28\",\r\n \"191.233.68.51/32\",\r\n + \ \"191.233.207.0/28\",\r\n \"191.233.207.32/27\",\r\n \"191.234.161.28/32\",\r\n + \ \"191.234.161.168/32\",\r\n \"191.234.162.131/32\",\r\n + \ \"191.234.162.178/32\",\r\n \"191.234.166.198/32\",\r\n + \ \"191.234.182.26/32\",\r\n \"191.235.82.221/32\",\r\n \"191.235.86.199/32\",\r\n + \ \"191.235.91.7/32\",\r\n \"191.235.94.220/32\",\r\n \"191.235.95.229/32\",\r\n + \ \"191.235.180.188/32\",\r\n \"191.237.255.116/32\",\r\n + \ \"191.238.41.107/32\",\r\n \"191.238.161.62/32\",\r\n \"191.238.163.65/32\",\r\n + \ \"191.239.67.132/32\",\r\n \"191.239.82.62/32\",\r\n \"191.239.161.74/32\",\r\n + \ \"191.239.177.86/32\",\r\n \"207.46.148.176/32\",\r\n \"2603:1000:4:402::3c0/124\",\r\n + \ \"2603:1000:4:402::3e0/123\",\r\n \"2603:1000:104:402::3c0/124\",\r\n + \ \"2603:1000:104:402::3e0/123\",\r\n \"2603:1010:6:402::3c0/124\",\r\n + \ \"2603:1010:6:402::3e0/123\",\r\n \"2603:1010:101:402::3c0/124\",\r\n + \ \"2603:1010:101:402::3e0/123\",\r\n \"2603:1010:304:402::3c0/124\",\r\n + \ \"2603:1010:304:402::3e0/123\",\r\n \"2603:1010:404:402::3c0/124\",\r\n + \ \"2603:1010:404:402::3e0/123\",\r\n \"2603:1020:5:402::3c0/124\",\r\n + \ \"2603:1020:5:402::3e0/123\",\r\n \"2603:1020:206:402::3c0/124\",\r\n + \ \"2603:1020:206:402::3e0/123\",\r\n \"2603:1020:305:402::3c0/124\",\r\n + \ \"2603:1020:305:402::3e0/123\",\r\n \"2603:1020:405:402::3c0/124\",\r\n + \ \"2603:1020:405:402::3e0/123\",\r\n \"2603:1020:605:402::3c0/124\",\r\n + \ \"2603:1020:605:402::3e0/123\",\r\n \"2603:1020:705:402::3c0/124\",\r\n + \ \"2603:1020:705:402::3e0/123\",\r\n \"2603:1020:805:402::3c0/124\",\r\n + \ \"2603:1020:805:402::3e0/123\",\r\n \"2603:1020:905:402::3c0/124\",\r\n + \ \"2603:1020:905:402::3e0/123\",\r\n \"2603:1020:a04:402::3c0/124\",\r\n + \ \"2603:1020:a04:402::3e0/123\",\r\n \"2603:1020:b04:402::3c0/124\",\r\n + \ \"2603:1020:b04:402::3e0/123\",\r\n \"2603:1020:c04:402::3c0/124\",\r\n + \ \"2603:1020:c04:402::3e0/123\",\r\n \"2603:1020:d04:402::3c0/124\",\r\n + \ \"2603:1020:d04:402::3e0/123\",\r\n \"2603:1020:e04:402::3c0/124\",\r\n + \ \"2603:1020:e04:402::3e0/123\",\r\n \"2603:1020:f04:402::3c0/124\",\r\n + \ \"2603:1020:f04:402::3e0/123\",\r\n \"2603:1020:1004:400::250/124\",\r\n + \ \"2603:1020:1004:400::260/123\",\r\n \"2603:1020:1104:400::510/124\",\r\n + \ \"2603:1020:1104:400::520/123\",\r\n \"2603:1030:f:400::bc0/124\",\r\n + \ \"2603:1030:f:400::be0/123\",\r\n \"2603:1030:10:402::3c0/124\",\r\n + \ \"2603:1030:10:402::3e0/123\",\r\n \"2603:1030:104:402::3c0/124\",\r\n + \ \"2603:1030:104:402::3e0/123\",\r\n \"2603:1030:107:400::390/124\",\r\n + \ \"2603:1030:107:400::3a0/123\",\r\n \"2603:1030:210:402::3c0/124\",\r\n + \ \"2603:1030:210:402::3e0/123\",\r\n \"2603:1030:40b:400::bc0/124\",\r\n + \ \"2603:1030:40b:400::be0/123\",\r\n \"2603:1030:40c:402::3c0/124\",\r\n + \ \"2603:1030:40c:402::3e0/123\",\r\n \"2603:1030:504:402::250/124\",\r\n + \ \"2603:1030:504:402::260/123\",\r\n \"2603:1030:608:402::3c0/124\",\r\n + \ \"2603:1030:608:402::3e0/123\",\r\n \"2603:1030:807:402::3c0/124\",\r\n + \ \"2603:1030:807:402::3e0/123\",\r\n \"2603:1030:a07:402::340/124\",\r\n + \ \"2603:1030:a07:402::360/123\",\r\n \"2603:1030:b04:402::3c0/124\",\r\n + \ \"2603:1030:b04:402::3e0/123\",\r\n \"2603:1030:c06:400::bc0/124\",\r\n + \ \"2603:1030:c06:400::be0/123\",\r\n \"2603:1030:f05:402::3c0/124\",\r\n + \ \"2603:1030:f05:402::3e0/123\",\r\n \"2603:1030:1005:402::3c0/124\",\r\n + \ \"2603:1030:1005:402::3e0/123\",\r\n \"2603:1040:5:402::3c0/124\",\r\n + \ \"2603:1040:5:402::3e0/123\",\r\n \"2603:1040:207:402::3c0/124\",\r\n + \ \"2603:1040:207:402::3e0/123\",\r\n \"2603:1040:407:402::3c0/124\",\r\n + \ \"2603:1040:407:402::3e0/123\",\r\n \"2603:1040:606:402::3c0/124\",\r\n + \ \"2603:1040:606:402::3e0/123\",\r\n \"2603:1040:806:402::3c0/124\",\r\n + \ \"2603:1040:806:402::3e0/123\",\r\n \"2603:1040:904:402::3c0/124\",\r\n + \ \"2603:1040:904:402::3e0/123\",\r\n \"2603:1040:a06:402::3c0/124\",\r\n + \ \"2603:1040:a06:402::3e0/123\",\r\n \"2603:1040:b04:402::3c0/124\",\r\n + \ \"2603:1040:b04:402::3e0/123\",\r\n \"2603:1040:c06:402::3c0/124\",\r\n + \ \"2603:1040:c06:402::3e0/123\",\r\n \"2603:1040:d04:400::250/124\",\r\n + \ \"2603:1040:d04:400::260/123\",\r\n \"2603:1040:f05:402::3c0/124\",\r\n + \ \"2603:1040:f05:402::3e0/123\",\r\n \"2603:1040:1002:400::3c0/124\",\r\n + \ \"2603:1040:1002:400::3e0/123\",\r\n \"2603:1040:1104:400::510/124\",\r\n + \ \"2603:1040:1104:400::520/123\",\r\n \"2603:1050:6:402::3c0/124\",\r\n + \ \"2603:1050:6:402::3e0/123\",\r\n \"2603:1050:403:400::180/123\",\r\n + \ \"2603:1050:403:400::250/124\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"LogicAppsManagement\",\r\n \"id\": \"LogicAppsManagement\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"LogicApps\",\r\n \"addressPrefixes\": + [\r\n \"13.65.39.247/32\",\r\n \"13.65.98.39/32\",\r\n \"13.66.128.68/32\",\r\n + \ \"13.66.224.169/32\",\r\n \"13.67.236.76/32\",\r\n \"13.69.109.144/28\",\r\n + \ \"13.69.233.16/28\",\r\n \"13.71.146.140/32\",\r\n \"13.71.199.160/28\",\r\n + \ \"13.73.115.153/32\",\r\n \"13.73.244.144/28\",\r\n \"13.75.89.159/32\",\r\n + \ \"13.75.153.66/32\",\r\n \"13.77.55.128/28\",\r\n \"13.78.43.164/32\",\r\n + \ \"13.78.62.130/32\",\r\n \"13.78.84.187/32\",\r\n \"13.78.137.247/32\",\r\n + \ \"13.79.173.49/32\",\r\n \"13.84.41.46/32\",\r\n \"13.84.43.45/32\",\r\n + \ \"13.85.79.155/32\",\r\n \"13.86.221.240/28\",\r\n \"13.87.58.144/28\",\r\n + \ \"13.87.124.144/28\",\r\n \"13.88.249.209/32\",\r\n \"13.89.178.48/28\",\r\n + \ \"13.91.252.184/32\",\r\n \"13.95.155.53/32\",\r\n \"20.21.46.80/28\",\r\n + \ \"20.36.108.224/28\",\r\n \"20.36.117.128/28\",\r\n \"20.37.76.208/28\",\r\n + \ \"20.38.128.176/28\",\r\n \"20.38.149.144/28\",\r\n \"20.40.32.49/32\",\r\n + \ \"20.40.32.59/32\",\r\n \"20.40.32.80/32\",\r\n \"20.40.32.162/32\",\r\n + \ \"20.42.64.48/28\",\r\n \"20.43.121.224/28\",\r\n \"20.44.4.176/28\",\r\n + \ \"20.45.64.29/32\",\r\n \"20.45.64.87/32\",\r\n \"20.45.71.213/32\",\r\n + \ \"20.45.75.193/32\",\r\n \"20.46.42.220/32\",\r\n \"20.46.46.173/32\",\r\n + \ \"20.72.30.160/28\",\r\n \"20.150.172.240/28\",\r\n \"20.192.238.160/28\",\r\n + \ \"20.193.206.48/28\",\r\n \"23.97.68.172/32\",\r\n \"40.67.60.176/28\",\r\n + \ \"40.69.110.224/28\",\r\n \"40.70.27.253/32\",\r\n \"40.74.66.200/32\",\r\n + \ \"40.74.81.13/32\",\r\n \"40.74.85.215/32\",\r\n \"40.74.140.173/32\",\r\n + \ \"40.75.35.240/28\",\r\n \"40.77.31.87/32\",\r\n \"40.77.111.254/32\",\r\n + \ \"40.78.196.176/28\",\r\n \"40.78.204.208/28\",\r\n \"40.78.239.16/28\",\r\n + \ \"40.78.245.144/28\",\r\n \"40.79.44.7/32\",\r\n \"40.79.139.144/28\",\r\n + \ \"40.79.171.240/28\",\r\n \"40.79.180.192/28\",\r\n \"40.79.197.48/28\",\r\n + \ \"40.80.180.16/28\",\r\n \"40.83.98.194/32\",\r\n \"40.84.25.234/32\",\r\n + \ \"40.84.59.136/32\",\r\n \"40.84.138.132/32\",\r\n \"40.85.241.105/32\",\r\n + \ \"40.86.202.42/32\",\r\n \"40.112.90.39/32\",\r\n \"40.115.78.70/32\",\r\n + \ \"40.115.78.237/32\",\r\n \"40.117.99.79/32\",\r\n \"40.117.100.228/32\",\r\n + \ \"40.120.64.32/28\",\r\n \"40.123.224.143/32\",\r\n \"40.123.224.227/32\",\r\n + \ \"51.11.97.16/28\",\r\n \"51.12.100.112/28\",\r\n \"51.12.204.112/28\",\r\n + \ \"51.103.128.52/32\",\r\n \"51.103.132.236/32\",\r\n \"51.103.134.138/32\",\r\n + \ \"51.103.136.209/32\",\r\n \"51.104.9.112/28\",\r\n \"51.107.60.192/28\",\r\n + \ \"51.107.156.192/28\",\r\n \"51.107.225.163/32\",\r\n \"51.107.225.167/32\",\r\n + \ \"51.107.225.180/32\",\r\n \"51.107.239.66/32\",\r\n \"51.116.60.144/28\",\r\n + \ \"51.116.158.64/28\",\r\n \"51.116.168.222/32\",\r\n \"51.116.171.209/32\",\r\n + \ \"51.116.175.0/32\",\r\n \"51.116.208.37/32\",\r\n \"51.116.208.64/32\",\r\n + \ \"51.116.208.132/32\",\r\n \"51.116.211.29/32\",\r\n \"51.116.233.40/32\",\r\n + \ \"51.120.109.32/28\",\r\n \"51.120.220.160/28\",\r\n \"51.140.78.71/32\",\r\n + \ \"51.140.79.109/32\",\r\n \"51.140.84.39/32\",\r\n \"51.140.155.81/32\",\r\n + \ \"51.141.48.98/32\",\r\n \"51.141.51.145/32\",\r\n \"51.141.53.164/32\",\r\n + \ \"51.141.119.150/32\",\r\n \"51.144.176.185/32\",\r\n \"52.147.97.16/28\",\r\n + \ \"52.160.90.237/32\",\r\n \"52.161.8.128/32\",\r\n \"52.161.19.82/32\",\r\n + \ \"52.161.26.172/32\",\r\n \"52.162.111.144/28\",\r\n \"52.163.93.214/32\",\r\n + \ \"52.167.109.80/28\",\r\n \"52.169.218.253/32\",\r\n \"52.169.220.174/32\",\r\n + \ \"52.172.9.47/32\",\r\n \"52.172.49.43/32\",\r\n \"52.172.51.140/32\",\r\n + \ \"52.172.157.194/32\",\r\n \"52.172.184.192/32\",\r\n \"52.172.191.194/32\",\r\n + \ \"52.174.49.6/32\",\r\n \"52.174.54.218/32\",\r\n \"52.183.30.10/32\",\r\n + \ \"52.183.39.67/32\",\r\n \"52.187.65.81/32\",\r\n \"52.187.65.155/32\",\r\n + \ \"52.187.231.161/32\",\r\n \"52.189.216.28/32\",\r\n \"52.229.125.57/32\",\r\n + \ \"52.231.23.16/28\",\r\n \"52.232.129.143/32\",\r\n \"52.232.133.109/32\",\r\n + \ \"52.233.29.79/32\",\r\n \"52.233.30.218/32\",\r\n \"65.52.9.64/32\",\r\n + \ \"65.52.211.164/32\",\r\n \"102.133.28.208/28\",\r\n \"102.133.72.145/32\",\r\n + \ \"102.133.72.173/32\",\r\n \"102.133.72.184/32\",\r\n \"102.133.72.190/32\",\r\n + \ \"102.133.156.176/28\",\r\n \"102.133.224.125/32\",\r\n + \ \"102.133.226.199/32\",\r\n \"102.133.228.4/32\",\r\n \"102.133.228.9/32\",\r\n + \ \"104.43.243.39/32\",\r\n \"104.210.89.222/32\",\r\n \"104.210.89.244/32\",\r\n + \ \"104.210.153.89/32\",\r\n \"104.211.73.195/32\",\r\n \"104.211.157.237/32\",\r\n + \ \"104.211.164.25/32\",\r\n \"104.211.164.112/32\",\r\n + \ \"104.211.165.81/32\",\r\n \"104.211.225.152/32\",\r\n + \ \"104.214.161.96/28\",\r\n \"104.215.181.6/32\",\r\n \"137.116.126.165/32\",\r\n + \ \"137.135.106.54/32\",\r\n \"138.91.188.137/32\",\r\n \"157.56.12.202/32\",\r\n + \ \"157.56.160.212/32\",\r\n \"168.62.249.81/32\",\r\n \"168.63.200.173/32\",\r\n + \ \"191.233.54.240/28\",\r\n \"191.233.207.0/28\",\r\n \"191.234.166.198/32\",\r\n + \ \"191.235.86.199/32\",\r\n \"191.235.94.220/32\",\r\n \"191.235.95.229/32\",\r\n + \ \"2603:1000:4:402::3c0/124\",\r\n \"2603:1000:104:402::3c0/124\",\r\n + \ \"2603:1010:6:402::3c0/124\",\r\n \"2603:1010:101:402::3c0/124\",\r\n + \ \"2603:1010:304:402::3c0/124\",\r\n \"2603:1010:404:402::3c0/124\",\r\n + \ \"2603:1020:5:402::3c0/124\",\r\n \"2603:1020:206:402::3c0/124\",\r\n + \ \"2603:1020:305:402::3c0/124\",\r\n \"2603:1020:405:402::3c0/124\",\r\n + \ \"2603:1020:605:402::3c0/124\",\r\n \"2603:1020:705:402::3c0/124\",\r\n + \ \"2603:1020:805:402::3c0/124\",\r\n \"2603:1020:905:402::3c0/124\",\r\n + \ \"2603:1020:a04:402::3c0/124\",\r\n \"2603:1020:b04:402::3c0/124\",\r\n + \ \"2603:1020:c04:402::3c0/124\",\r\n \"2603:1020:d04:402::3c0/124\",\r\n + \ \"2603:1020:e04:402::3c0/124\",\r\n \"2603:1020:f04:402::3c0/124\",\r\n + \ \"2603:1020:1004:400::250/124\",\r\n \"2603:1020:1104:400::510/124\",\r\n + \ \"2603:1030:f:400::bc0/124\",\r\n \"2603:1030:10:402::3c0/124\",\r\n + \ \"2603:1030:104:402::3c0/124\",\r\n \"2603:1030:107:400::390/124\",\r\n + \ \"2603:1030:210:402::3c0/124\",\r\n \"2603:1030:40b:400::bc0/124\",\r\n + \ \"2603:1030:40c:402::3c0/124\",\r\n \"2603:1030:504:402::250/124\",\r\n + \ \"2603:1030:608:402::3c0/124\",\r\n \"2603:1030:807:402::3c0/124\",\r\n + \ \"2603:1030:a07:402::340/124\",\r\n \"2603:1030:b04:402::3c0/124\",\r\n + \ \"2603:1030:c06:400::bc0/124\",\r\n \"2603:1030:f05:402::3c0/124\",\r\n + \ \"2603:1030:1005:402::3c0/124\",\r\n \"2603:1040:5:402::3c0/124\",\r\n + \ \"2603:1040:207:402::3c0/124\",\r\n \"2603:1040:407:402::3c0/124\",\r\n + \ \"2603:1040:606:402::3c0/124\",\r\n \"2603:1040:806:402::3c0/124\",\r\n + \ \"2603:1040:904:402::3c0/124\",\r\n \"2603:1040:a06:402::3c0/124\",\r\n + \ \"2603:1040:b04:402::3c0/124\",\r\n \"2603:1040:c06:402::3c0/124\",\r\n + \ \"2603:1040:d04:400::250/124\",\r\n \"2603:1040:f05:402::3c0/124\",\r\n + \ \"2603:1040:1002:400::3c0/124\",\r\n \"2603:1040:1104:400::510/124\",\r\n + \ \"2603:1050:6:402::3c0/124\",\r\n \"2603:1050:403:400::250/124\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"M365ManagementActivityApi\",\r\n + \ \"id\": \"M365ManagementActivityApi\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"M365ManagementActivityApi\",\r\n + \ \"addressPrefixes\": [\r\n \"13.69.109.192/29\",\r\n \"13.69.233.40/29\",\r\n + \ \"13.71.175.136/31\",\r\n \"13.78.111.196/31\",\r\n \"13.86.223.88/29\",\r\n + \ \"20.36.117.194/31\",\r\n \"20.37.76.206/31\",\r\n \"20.43.121.254/31\",\r\n + \ \"20.44.10.196/30\",\r\n \"20.44.19.8/30\",\r\n \"20.45.126.96/29\",\r\n + \ \"20.53.0.36/31\",\r\n \"20.192.184.82/31\",\r\n \"40.69.111.44/31\",\r\n + \ \"40.78.239.100/30\",\r\n \"40.79.139.196/31\",\r\n \"40.80.180.4/31\",\r\n + \ \"40.120.75.56/31\",\r\n \"51.105.69.82/31\",\r\n \"51.107.60.154/31\",\r\n + \ \"51.107.192.128/31\",\r\n \"51.116.60.242/31\",\r\n \"51.116.158.62/31\",\r\n + \ \"51.120.100.158/31\",\r\n \"51.120.220.120/31\",\r\n \"51.138.160.2/31\",\r\n + \ \"51.140.212.218/31\",\r\n \"52.162.111.136/30\",\r\n \"52.168.112.80/29\",\r\n + \ \"52.231.23.12/31\",\r\n \"52.231.148.204/31\",\r\n \"102.37.64.50/31\",\r\n + \ \"102.133.124.14/31\",\r\n \"104.214.164.52/30\",\r\n \"191.233.207.28/31\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftCloudAppSecurity\",\r\n + \ \"id\": \"MicrosoftCloudAppSecurity\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftCloudAppSecurity\",\r\n + \ \"addressPrefixes\": [\r\n \"13.64.26.88/32\",\r\n \"13.64.28.87/32\",\r\n + \ \"13.64.29.32/32\",\r\n \"13.64.29.161/32\",\r\n \"13.64.30.76/32\",\r\n + \ \"13.64.30.117/32\",\r\n \"13.64.30.118/32\",\r\n \"13.64.31.116/32\",\r\n + \ \"13.64.196.27/32\",\r\n \"13.64.198.19/32\",\r\n \"13.64.198.97/32\",\r\n + \ \"13.64.199.41/32\",\r\n \"13.64.252.115/32\",\r\n \"13.66.134.18/32\",\r\n + \ \"13.66.142.80/28\",\r\n \"13.66.158.8/32\",\r\n \"13.66.168.209/32\",\r\n + \ \"13.66.173.192/32\",\r\n \"13.66.210.205/32\",\r\n \"13.67.10.192/28\",\r\n + \ \"13.67.48.221/32\",\r\n \"13.69.67.96/28\",\r\n \"13.69.107.96/28\",\r\n + \ \"13.69.190.115/32\",\r\n \"13.69.230.48/28\",\r\n \"13.70.74.160/27\",\r\n + \ \"13.71.175.0/27\",\r\n \"13.71.196.192/27\",\r\n \"13.73.242.224/27\",\r\n + \ \"13.74.108.176/28\",\r\n \"13.74.168.152/32\",\r\n \"13.75.39.128/27\",\r\n + \ \"13.76.43.73/32\",\r\n \"13.76.129.255/32\",\r\n \"13.77.53.96/27\",\r\n + \ \"13.77.80.28/32\",\r\n \"13.77.136.80/32\",\r\n \"13.77.148.229/32\",\r\n + \ \"13.77.160.162/32\",\r\n \"13.77.163.148/32\",\r\n \"13.77.165.61/32\",\r\n + \ \"13.80.7.94/32\",\r\n \"13.80.22.71/32\",\r\n \"13.80.125.22/32\",\r\n + \ \"13.81.123.49/32\",\r\n \"13.81.204.189/32\",\r\n \"13.81.212.71/32\",\r\n + \ \"13.86.176.189/32\",\r\n \"13.86.176.211/32\",\r\n \"13.86.219.224/27\",\r\n + \ \"13.86.235.202/32\",\r\n \"13.86.239.236/32\",\r\n \"13.88.224.38/32\",\r\n + \ \"13.88.224.211/32\",\r\n \"13.88.224.222/32\",\r\n \"13.88.226.74/32\",\r\n + \ \"13.88.227.7/32\",\r\n \"13.89.178.0/28\",\r\n \"13.91.61.249/32\",\r\n + \ \"13.91.91.243/32\",\r\n \"13.91.98.185/32\",\r\n \"13.93.32.114/32\",\r\n + \ \"13.93.113.192/32\",\r\n \"13.93.196.52/32\",\r\n \"13.93.216.68/32\",\r\n + \ \"13.93.233.42/32\",\r\n \"13.95.1.33/32\",\r\n \"13.95.29.177/32\",\r\n + \ \"13.95.30.46/32\",\r\n \"20.36.220.93/32\",\r\n \"20.36.222.59/32\",\r\n + \ \"20.36.222.60/32\",\r\n \"20.36.240.76/32\",\r\n \"20.36.244.208/32\",\r\n + \ \"20.36.245.0/32\",\r\n \"20.36.245.182/32\",\r\n \"20.36.245.235/32\",\r\n + \ \"20.36.246.188/32\",\r\n \"20.36.248.40/32\",\r\n \"20.40.106.50/31\",\r\n + \ \"20.40.107.84/32\",\r\n \"20.40.132.195/32\",\r\n \"20.40.134.79/32\",\r\n + \ \"20.40.134.94/32\",\r\n \"20.40.160.184/32\",\r\n \"20.40.161.119/32\",\r\n + \ \"20.40.161.131/32\",\r\n \"20.40.161.132/32\",\r\n \"20.40.161.135/32\",\r\n + \ \"20.40.161.140/30\",\r\n \"20.40.161.160/31\",\r\n \"20.40.162.86/32\",\r\n + \ \"20.40.162.200/32\",\r\n \"20.40.163.88/32\",\r\n \"20.40.163.96/31\",\r\n + \ \"20.40.163.130/32\",\r\n \"20.40.163.133/32\",\r\n \"20.40.163.178/31\",\r\n + \ \"20.42.29.162/32\",\r\n \"20.42.31.48/32\",\r\n \"20.42.31.251/32\",\r\n + \ \"20.44.8.208/28\",\r\n \"20.44.17.64/28\",\r\n \"20.44.72.173/32\",\r\n + \ \"20.44.72.217/32\",\r\n \"20.44.73.253/32\",\r\n \"20.45.3.127/32\",\r\n + \ \"20.184.57.4/32\",\r\n \"20.184.57.218/32\",\r\n \"20.184.58.46/32\",\r\n + \ \"20.184.58.110/32\",\r\n \"20.184.60.77/32\",\r\n \"20.184.61.67/32\",\r\n + \ \"20.184.61.253/32\",\r\n \"20.184.63.158/32\",\r\n \"20.184.63.216/32\",\r\n + \ \"20.184.63.232/32\",\r\n \"20.188.72.248/32\",\r\n \"23.97.54.160/32\",\r\n + \ \"23.97.55.165/32\",\r\n \"23.98.83.96/28\",\r\n \"23.100.67.153/32\",\r\n + \ \"40.65.169.46/32\",\r\n \"40.65.169.97/32\",\r\n \"40.65.169.196/32\",\r\n + \ \"40.65.169.236/32\",\r\n \"40.65.170.17/32\",\r\n \"40.65.170.26/32\",\r\n + \ \"40.65.170.80/30\",\r\n \"40.65.170.112/31\",\r\n \"40.65.170.123/32\",\r\n + \ \"40.65.170.125/32\",\r\n \"40.65.170.128/32\",\r\n \"40.65.170.133/32\",\r\n + \ \"40.65.170.137/32\",\r\n \"40.65.233.253/32\",\r\n \"40.65.235.54/32\",\r\n + \ \"40.66.56.158/32\",\r\n \"40.66.57.164/32\",\r\n \"40.66.57.203/32\",\r\n + \ \"40.66.59.41/32\",\r\n \"40.66.59.193/32\",\r\n \"40.66.59.195/32\",\r\n + \ \"40.66.59.196/32\",\r\n \"40.66.59.246/32\",\r\n \"40.66.60.101/32\",\r\n + \ \"40.66.60.118/32\",\r\n \"40.66.60.180/32\",\r\n \"40.66.60.185/32\",\r\n + \ \"40.66.60.200/32\",\r\n \"40.66.60.206/31\",\r\n \"40.66.60.208/31\",\r\n + \ \"40.66.60.210/32\",\r\n \"40.66.60.215/32\",\r\n \"40.66.60.216/31\",\r\n + \ \"40.66.60.219/32\",\r\n \"40.66.60.220/31\",\r\n \"40.66.60.222/32\",\r\n + \ \"40.66.60.224/31\",\r\n \"40.66.60.226/32\",\r\n \"40.66.60.232/32\",\r\n + \ \"40.66.61.61/32\",\r\n \"40.66.61.158/32\",\r\n \"40.66.61.193/32\",\r\n + \ \"40.66.61.226/32\",\r\n \"40.66.62.7/32\",\r\n \"40.66.62.9/32\",\r\n + \ \"40.66.62.78/32\",\r\n \"40.66.62.130/32\",\r\n \"40.66.62.154/32\",\r\n + \ \"40.66.62.225/32\",\r\n \"40.66.63.148/32\",\r\n \"40.66.63.255/32\",\r\n + \ \"40.67.152.91/32\",\r\n \"40.67.152.227/32\",\r\n \"40.67.154.160/32\",\r\n + \ \"40.67.155.146/32\",\r\n \"40.67.159.55/32\",\r\n \"40.67.216.253/32\",\r\n + \ \"40.67.219.133/32\",\r\n \"40.67.251.0/32\",\r\n \"40.67.254.233/32\",\r\n + \ \"40.68.245.184/32\",\r\n \"40.69.108.96/27\",\r\n \"40.70.0.255/32\",\r\n + \ \"40.70.29.49/32\",\r\n \"40.70.29.200/32\",\r\n \"40.70.148.112/28\",\r\n + \ \"40.70.184.90/32\",\r\n \"40.71.14.16/28\",\r\n \"40.74.1.235/32\",\r\n + \ \"40.74.6.204/32\",\r\n \"40.76.78.217/32\",\r\n \"40.78.23.204/32\",\r\n + \ \"40.78.56.129/32\",\r\n \"40.78.229.64/28\",\r\n \"40.78.236.160/28\",\r\n + \ \"40.78.245.0/28\",\r\n \"40.78.251.128/28\",\r\n \"40.79.132.96/28\",\r\n + \ \"40.79.139.16/28\",\r\n \"40.79.146.224/28\",\r\n \"40.79.156.112/28\",\r\n + \ \"40.79.180.64/27\",\r\n \"40.80.219.49/32\",\r\n \"40.80.220.215/32\",\r\n + \ \"40.80.220.246/32\",\r\n \"40.80.221.77/32\",\r\n \"40.80.222.91/32\",\r\n + \ \"40.80.222.197/32\",\r\n \"40.81.56.80/32\",\r\n \"40.81.57.138/32\",\r\n + \ \"40.81.57.141/32\",\r\n \"40.81.57.144/32\",\r\n \"40.81.57.157/32\",\r\n + \ \"40.81.57.164/32\",\r\n \"40.81.57.169/32\",\r\n \"40.81.58.180/32\",\r\n + \ \"40.81.58.184/32\",\r\n \"40.81.58.193/32\",\r\n \"40.81.59.4/32\",\r\n + \ \"40.81.59.90/32\",\r\n \"40.81.59.93/32\",\r\n \"40.81.62.162/32\",\r\n + \ \"40.81.62.179/32\",\r\n \"40.81.62.193/32\",\r\n \"40.81.62.199/32\",\r\n + \ \"40.81.62.206/32\",\r\n \"40.81.62.209/32\",\r\n \"40.81.62.212/32\",\r\n + \ \"40.81.62.220/30\",\r\n \"40.81.62.224/32\",\r\n \"40.81.62.255/32\",\r\n + \ \"40.81.63.1/32\",\r\n \"40.81.63.2/32\",\r\n \"40.81.63.4/31\",\r\n + \ \"40.81.63.7/32\",\r\n \"40.81.63.8/32\",\r\n \"40.81.63.235/32\",\r\n + \ \"40.81.63.245/32\",\r\n \"40.81.63.248/32\",\r\n \"40.81.120.13/32\",\r\n + \ \"40.81.120.24/31\",\r\n \"40.81.120.97/32\",\r\n \"40.81.120.187/32\",\r\n + \ \"40.81.120.191/32\",\r\n \"40.81.120.192/32\",\r\n \"40.81.121.66/32\",\r\n + \ \"40.81.121.76/32\",\r\n \"40.81.121.78/32\",\r\n \"40.81.121.107/32\",\r\n + \ \"40.81.121.108/32\",\r\n \"40.81.121.111/32\",\r\n \"40.81.121.127/32\",\r\n + \ \"40.81.121.135/32\",\r\n \"40.81.121.140/32\",\r\n \"40.81.121.175/32\",\r\n + \ \"40.81.122.4/32\",\r\n \"40.81.122.62/31\",\r\n \"40.81.122.76/32\",\r\n + \ \"40.81.122.203/32\",\r\n \"40.81.123.124/32\",\r\n \"40.81.123.157/32\",\r\n + \ \"40.81.124.185/32\",\r\n \"40.81.124.219/32\",\r\n \"40.81.127.25/32\",\r\n + \ \"40.81.127.139/32\",\r\n \"40.81.127.140/31\",\r\n \"40.81.127.229/32\",\r\n + \ \"40.81.127.230/32\",\r\n \"40.81.127.239/32\",\r\n \"40.81.152.126/32\",\r\n + \ \"40.81.152.171/32\",\r\n \"40.81.152.172/32\",\r\n \"40.81.156.153/32\",\r\n + \ \"40.81.156.154/31\",\r\n \"40.81.156.156/32\",\r\n \"40.81.159.35/32\",\r\n + \ \"40.81.159.77/32\",\r\n \"40.82.184.80/32\",\r\n \"40.82.185.36/32\",\r\n + \ \"40.82.185.117/32\",\r\n \"40.82.185.229/32\",\r\n \"40.82.186.166/32\",\r\n + \ \"40.82.186.168/31\",\r\n \"40.82.186.176/31\",\r\n \"40.82.186.180/32\",\r\n + \ \"40.82.186.182/32\",\r\n \"40.82.186.185/32\",\r\n \"40.82.186.214/32\",\r\n + \ \"40.82.186.231/32\",\r\n \"40.82.187.161/32\",\r\n \"40.82.187.162/31\",\r\n + \ \"40.82.187.164/32\",\r\n \"40.82.187.177/32\",\r\n \"40.82.187.178/31\",\r\n + \ \"40.82.187.199/32\",\r\n \"40.82.187.200/32\",\r\n \"40.82.187.202/32\",\r\n + \ \"40.82.187.204/30\",\r\n \"40.82.187.208/30\",\r\n \"40.82.187.212/31\",\r\n + \ \"40.82.187.218/32\",\r\n \"40.82.187.223/32\",\r\n \"40.82.190.163/32\",\r\n + \ \"40.82.191.58/32\",\r\n \"40.84.2.83/32\",\r\n \"40.84.4.93/32\",\r\n + \ \"40.84.4.119/32\",\r\n \"40.84.5.28/32\",\r\n \"40.84.49.16/32\",\r\n + \ \"40.89.136.227/32\",\r\n \"40.89.137.101/32\",\r\n \"40.89.142.184/32\",\r\n + \ \"40.89.143.43/32\",\r\n \"40.90.184.197/32\",\r\n \"40.90.185.64/32\",\r\n + \ \"40.90.191.153/32\",\r\n \"40.90.218.196/31\",\r\n \"40.90.218.198/32\",\r\n + \ \"40.90.218.203/32\",\r\n \"40.90.219.121/32\",\r\n \"40.90.219.184/32\",\r\n + \ \"40.90.220.37/32\",\r\n \"40.90.220.190/32\",\r\n \"40.90.220.196/32\",\r\n + \ \"40.90.222.64/32\",\r\n \"40.91.74.37/32\",\r\n \"40.91.78.105/32\",\r\n + \ \"40.91.114.40/29\",\r\n \"40.91.114.48/31\",\r\n \"40.91.122.25/32\",\r\n + \ \"40.91.122.38/32\",\r\n \"40.91.126.157/32\",\r\n \"40.91.127.44/32\",\r\n + \ \"40.91.198.19/32\",\r\n \"40.113.121.176/32\",\r\n \"40.114.112.147/32\",\r\n + \ \"40.114.217.8/32\",\r\n \"40.115.24.65/32\",\r\n \"40.115.25.50/32\",\r\n + \ \"40.115.71.111/32\",\r\n \"40.118.63.137/32\",\r\n \"40.118.97.232/32\",\r\n + \ \"40.118.211.172/32\",\r\n \"40.119.145.130/32\",\r\n \"40.119.147.102/32\",\r\n + \ \"40.119.154.72/32\",\r\n \"40.119.203.98/31\",\r\n \"40.119.203.158/31\",\r\n + \ \"40.119.203.208/31\",\r\n \"40.119.207.131/32\",\r\n \"40.119.207.144/32\",\r\n + \ \"40.119.207.164/32\",\r\n \"40.119.207.166/32\",\r\n \"40.119.207.174/32\",\r\n + \ \"40.119.207.182/32\",\r\n \"40.119.207.193/32\",\r\n \"40.119.207.200/32\",\r\n + \ \"40.119.215.167/32\",\r\n \"40.121.134.1/32\",\r\n \"40.124.53.69/32\",\r\n + \ \"51.11.26.92/32\",\r\n \"51.11.26.95/32\",\r\n \"51.104.9.16/28\",\r\n + \ \"51.105.37.244/32\",\r\n \"51.105.67.224/28\",\r\n \"51.105.75.176/28\",\r\n + \ \"51.105.124.64/32\",\r\n \"51.105.124.80/32\",\r\n \"51.105.161.5/32\",\r\n + \ \"51.105.163.8/32\",\r\n \"51.105.163.43/32\",\r\n \"51.105.164.8/32\",\r\n + \ \"51.105.164.234/32\",\r\n \"51.105.164.241/32\",\r\n \"51.105.165.31/32\",\r\n + \ \"51.105.165.37/32\",\r\n \"51.105.165.63/32\",\r\n \"51.105.165.116/32\",\r\n + \ \"51.105.166.102/31\",\r\n \"51.105.166.106/32\",\r\n \"51.105.179.157/32\",\r\n + \ \"51.137.136.13/32\",\r\n \"51.137.136.14/32\",\r\n \"51.137.136.34/32\",\r\n + \ \"51.137.137.69/32\",\r\n \"51.137.137.118/32\",\r\n \"51.137.137.121/32\",\r\n + \ \"51.137.137.200/32\",\r\n \"51.137.137.237/32\",\r\n \"51.140.1.10/32\",\r\n + \ \"51.140.8.108/32\",\r\n \"51.140.8.180/32\",\r\n \"51.140.35.95/32\",\r\n + \ \"51.140.52.106/32\",\r\n \"51.140.78.213/32\",\r\n \"51.140.105.124/32\",\r\n + \ \"51.140.125.227/32\",\r\n \"51.140.164.179/32\",\r\n \"51.140.191.146/32\",\r\n + \ \"51.140.212.128/27\",\r\n \"51.140.230.246/32\",\r\n \"51.140.231.138/32\",\r\n + \ \"51.141.2.189/32\",\r\n \"51.141.7.11/32\",\r\n \"51.143.58.207/32\",\r\n + \ \"51.143.111.58/32\",\r\n \"51.143.120.236/32\",\r\n \"51.143.120.242/32\",\r\n + \ \"51.143.122.59/32\",\r\n \"51.143.122.60/32\",\r\n \"51.144.56.60/32\",\r\n + \ \"51.145.108.227/32\",\r\n \"51.145.108.250/32\",\r\n \"51.145.181.195/32\",\r\n + \ \"51.145.181.214/32\",\r\n \"52.137.56.200/32\",\r\n \"52.137.89.147/32\",\r\n + \ \"52.138.227.160/28\",\r\n \"52.139.1.70/32\",\r\n \"52.139.1.156/32\",\r\n + \ \"52.139.1.158/31\",\r\n \"52.139.1.200/32\",\r\n \"52.139.1.218/32\",\r\n + \ \"52.139.2.0/32\",\r\n \"52.139.16.105/32\",\r\n \"52.139.18.234/32\",\r\n + \ \"52.139.18.236/32\",\r\n \"52.139.19.71/32\",\r\n \"52.139.19.187/32\",\r\n + \ \"52.139.19.215/32\",\r\n \"52.139.19.247/32\",\r\n \"52.139.20.31/32\",\r\n + \ \"52.139.20.118/32\",\r\n \"52.139.21.70/32\",\r\n \"52.139.245.1/32\",\r\n + \ \"52.139.245.21/32\",\r\n \"52.139.245.40/32\",\r\n \"52.139.245.48/32\",\r\n + \ \"52.139.251.219/32\",\r\n \"52.139.252.105/32\",\r\n \"52.142.112.145/32\",\r\n + \ \"52.142.112.146/32\",\r\n \"52.142.116.135/32\",\r\n \"52.142.116.174/32\",\r\n + \ \"52.142.116.250/32\",\r\n \"52.142.117.183/32\",\r\n \"52.142.118.130/32\",\r\n + \ \"52.142.121.6/32\",\r\n \"52.142.121.75/32\",\r\n \"52.142.124.23/32\",\r\n + \ \"52.142.127.127/32\",\r\n \"52.142.220.179/32\",\r\n \"52.142.232.120/32\",\r\n + \ \"52.143.73.88/32\",\r\n \"52.143.74.31/32\",\r\n \"52.148.115.188/32\",\r\n + \ \"52.148.115.194/32\",\r\n \"52.148.115.238/32\",\r\n \"52.148.116.37/32\",\r\n + \ \"52.148.161.45/32\",\r\n \"52.148.161.53/32\",\r\n \"52.151.237.243/32\",\r\n + \ \"52.151.238.5/32\",\r\n \"52.151.244.65/32\",\r\n \"52.151.247.27/32\",\r\n + \ \"52.153.240.107/32\",\r\n \"52.155.161.88/32\",\r\n \"52.155.161.91/32\",\r\n + \ \"52.155.164.131/32\",\r\n \"52.155.166.50/32\",\r\n \"52.155.167.231/32\",\r\n + \ \"52.155.168.45/32\",\r\n \"52.155.177.13/32\",\r\n \"52.155.178.247/32\",\r\n + \ \"52.155.179.84/32\",\r\n \"52.155.180.208/30\",\r\n \"52.155.181.180/30\",\r\n + \ \"52.155.182.48/31\",\r\n \"52.155.182.50/32\",\r\n \"52.155.182.138/32\",\r\n + \ \"52.155.182.141/32\",\r\n \"52.156.197.208/32\",\r\n \"52.156.197.254/32\",\r\n + \ \"52.156.198.196/32\",\r\n \"52.156.202.7/32\",\r\n \"52.156.203.22/32\",\r\n + \ \"52.156.203.198/31\",\r\n \"52.156.204.24/32\",\r\n \"52.156.204.51/32\",\r\n + \ \"52.156.204.99/32\",\r\n \"52.156.204.139/32\",\r\n \"52.156.205.137/32\",\r\n + \ \"52.156.205.182/32\",\r\n \"52.156.205.222/32\",\r\n \"52.156.205.226/32\",\r\n + \ \"52.156.206.43/32\",\r\n \"52.156.206.45/32\",\r\n \"52.156.206.46/31\",\r\n + \ \"52.157.19.228/32\",\r\n \"52.157.20.142/32\",\r\n \"52.157.218.219/32\",\r\n + \ \"52.157.218.232/32\",\r\n \"52.157.232.110/32\",\r\n \"52.157.232.147/32\",\r\n + \ \"52.157.233.49/32\",\r\n \"52.157.233.92/32\",\r\n \"52.157.233.133/32\",\r\n + \ \"52.157.233.205/32\",\r\n \"52.157.234.160/32\",\r\n \"52.157.234.222/32\",\r\n + \ \"52.157.235.27/32\",\r\n \"52.157.235.144/32\",\r\n \"52.157.236.195/32\",\r\n + \ \"52.157.237.107/32\",\r\n \"52.157.237.213/32\",\r\n \"52.157.237.255/32\",\r\n + \ \"52.157.238.58/32\",\r\n \"52.157.239.110/32\",\r\n \"52.157.239.132/32\",\r\n + \ \"52.158.28.235/32\",\r\n \"52.167.107.96/28\",\r\n \"52.169.192.237/32\",\r\n + \ \"52.174.56.180/32\",\r\n \"52.177.85.43/32\",\r\n \"52.178.44.248/32\",\r\n + \ \"52.178.89.44/32\",\r\n \"52.179.155.177/32\",\r\n \"52.179.194.73/32\",\r\n + \ \"52.179.198.41/32\",\r\n \"52.182.139.208/28\",\r\n \"52.183.24.254/32\",\r\n + \ \"52.183.30.204/32\",\r\n \"52.183.75.62/32\",\r\n \"52.184.165.82/32\",\r\n + \ \"52.188.217.236/32\",\r\n \"52.189.208.36/32\",\r\n \"52.189.213.36/32\",\r\n + \ \"52.189.213.124/32\",\r\n \"52.189.218.253/32\",\r\n \"52.190.26.220/32\",\r\n + \ \"52.190.31.62/32\",\r\n \"52.191.129.65/32\",\r\n \"52.191.237.188/32\",\r\n + \ \"52.191.238.65/32\",\r\n \"52.224.188.157/32\",\r\n \"52.224.188.168/32\",\r\n + \ \"52.224.190.225/32\",\r\n \"52.224.191.62/32\",\r\n \"52.224.201.216/32\",\r\n + \ \"52.224.201.223/32\",\r\n \"52.224.202.86/32\",\r\n \"52.224.202.91/32\",\r\n + \ \"52.225.225.218/32\",\r\n \"52.225.231.232/32\",\r\n \"52.232.224.227/32\",\r\n + \ \"52.232.225.84/32\",\r\n \"52.232.228.217/32\",\r\n \"52.232.245.96/32\",\r\n + \ \"52.236.187.80/28\",\r\n \"52.249.25.160/32\",\r\n \"52.249.25.165/32\",\r\n + \ \"65.52.138.123/32\",\r\n \"65.52.229.200/32\",\r\n \"104.40.28.202/32\",\r\n + \ \"104.40.129.120/32\",\r\n \"104.42.15.41/32\",\r\n \"104.42.34.58/32\",\r\n + \ \"104.42.38.254/32\",\r\n \"104.42.54.24/32\",\r\n \"104.42.75.120/32\",\r\n + \ \"104.42.211.215/32\",\r\n \"104.45.7.95/32\",\r\n \"104.45.65.169/32\",\r\n + \ \"104.45.168.103/32\",\r\n \"104.45.168.104/32\",\r\n \"104.45.168.106/32\",\r\n + \ \"104.45.168.108/32\",\r\n \"104.45.168.111/32\",\r\n \"104.45.168.114/32\",\r\n + \ \"104.45.170.70/32\",\r\n \"104.45.170.127/32\",\r\n \"104.45.170.161/32\",\r\n + \ \"104.45.170.173/32\",\r\n \"104.45.170.174/31\",\r\n \"104.45.170.176/32\",\r\n + \ \"104.45.170.178/32\",\r\n \"104.45.170.180/32\",\r\n \"104.45.170.182/31\",\r\n + \ \"104.45.170.184/31\",\r\n \"104.45.170.186/32\",\r\n \"104.45.170.188/32\",\r\n + \ \"104.45.170.191/32\",\r\n \"104.45.170.194/32\",\r\n \"104.45.170.196/32\",\r\n + \ \"104.46.116.211/32\",\r\n \"104.46.121.72/32\",\r\n \"104.46.122.189/32\",\r\n + \ \"104.208.216.221/32\",\r\n \"104.209.35.177/32\",\r\n + \ \"104.209.168.251/32\",\r\n \"104.210.0.32/32\",\r\n \"104.211.9.226/32\",\r\n + \ \"104.214.225.33/32\",\r\n \"137.116.52.31/32\",\r\n \"138.91.147.71/32\",\r\n + \ \"168.63.38.153/32\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"MicrosoftContainerRegistry\",\r\n \"id\": \"MicrosoftContainerRegistry\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.66.140.64/29\",\r\n \"13.67.8.112/29\",\r\n + \ \"13.69.64.80/29\",\r\n \"13.69.106.72/29\",\r\n \"13.69.227.80/29\",\r\n + \ \"13.70.72.128/29\",\r\n \"13.71.170.48/29\",\r\n \"13.71.194.120/29\",\r\n + \ \"13.74.107.72/29\",\r\n \"13.75.34.152/29\",\r\n \"13.77.50.72/29\",\r\n + \ \"13.78.106.192/29\",\r\n \"13.87.56.88/29\",\r\n \"13.87.122.88/29\",\r\n + \ \"13.89.170.208/29\",\r\n \"20.21.42.64/29\",\r\n \"20.21.66.64/29\",\r\n + \ \"20.21.74.64/29\",\r\n \"20.37.74.64/29\",\r\n \"20.38.146.136/29\",\r\n + \ \"20.44.2.16/29\",\r\n \"20.44.26.136/29\",\r\n \"20.45.122.136/29\",\r\n + \ \"20.49.82.8/29\",\r\n \"20.49.90.8/29\",\r\n \"20.72.26.8/29\",\r\n + \ \"20.150.170.16/29\",\r\n \"20.150.178.136/29\",\r\n \"20.150.186.136/29\",\r\n + \ \"20.192.98.136/29\",\r\n \"20.192.234.16/29\",\r\n \"20.193.202.8/29\",\r\n + \ \"20.194.66.8/29\",\r\n \"20.205.74.64/29\",\r\n \"20.205.82.64/29\",\r\n + \ \"20.208.18.64/29\",\r\n \"23.98.82.104/29\",\r\n \"40.67.58.16/29\",\r\n + \ \"40.69.106.72/29\",\r\n \"40.70.146.80/29\",\r\n \"40.71.10.208/29\",\r\n + \ \"40.74.100.56/29\",\r\n \"40.74.146.40/29\",\r\n \"40.75.34.24/29\",\r\n + \ \"40.78.194.72/29\",\r\n \"40.78.202.64/29\",\r\n \"40.78.226.200/29\",\r\n + \ \"40.78.234.40/29\",\r\n \"40.78.242.152/29\",\r\n \"40.78.250.88/29\",\r\n + \ \"40.79.130.48/29\",\r\n \"40.79.138.24/29\",\r\n \"40.79.146.24/29\",\r\n + \ \"40.79.154.96/29\",\r\n \"40.79.162.24/29\",\r\n \"40.79.170.8/29\",\r\n + \ \"40.79.178.72/29\",\r\n \"40.79.186.0/29\",\r\n \"40.79.194.88/29\",\r\n + \ \"40.80.50.136/29\",\r\n \"40.112.242.152/29\",\r\n \"40.120.74.8/29\",\r\n + \ \"51.12.98.16/29\",\r\n \"51.12.202.16/29\",\r\n \"51.12.226.136/29\",\r\n + \ \"51.12.234.136/29\",\r\n \"51.103.202.64/29\",\r\n \"51.105.66.136/29\",\r\n + \ \"51.105.74.136/29\",\r\n \"51.107.58.16/29\",\r\n \"51.107.154.16/29\",\r\n + \ \"51.116.58.16/29\",\r\n \"51.116.154.80/29\",\r\n \"51.116.242.136/29\",\r\n + \ \"51.116.250.136/29\",\r\n \"51.120.98.24/29\",\r\n \"51.120.106.136/29\",\r\n + \ \"51.120.210.136/29\",\r\n \"51.120.218.16/29\",\r\n \"51.140.146.192/29\",\r\n + \ \"51.140.210.88/29\",\r\n \"52.138.90.24/29\",\r\n \"52.138.226.72/29\",\r\n + \ \"52.162.106.152/29\",\r\n \"52.167.106.72/29\",\r\n \"52.182.138.200/29\",\r\n + \ \"52.231.18.48/29\",\r\n \"52.231.146.88/29\",\r\n \"52.236.186.72/29\",\r\n + \ \"52.246.154.136/29\",\r\n \"65.52.250.8/29\",\r\n \"102.133.26.16/29\",\r\n + \ \"102.133.122.136/29\",\r\n \"102.133.154.16/29\",\r\n + \ \"102.133.250.136/29\",\r\n \"104.208.16.72/29\",\r\n \"104.208.144.72/29\",\r\n + \ \"104.211.81.128/29\",\r\n \"104.211.146.72/29\",\r\n \"104.214.18.176/29\",\r\n + \ \"191.233.50.8/29\",\r\n \"191.233.203.128/29\",\r\n \"191.234.146.136/29\",\r\n + \ \"191.234.154.136/29\",\r\n \"2603:1000:4:402::88/125\",\r\n + \ \"2603:1000:104:402::88/125\",\r\n \"2603:1000:104:802::88/125\",\r\n + \ \"2603:1000:104:c02::88/125\",\r\n \"2603:1010:6:402::88/125\",\r\n + \ \"2603:1010:6:802::88/125\",\r\n \"2603:1010:6:c02::88/125\",\r\n + \ \"2603:1010:101:402::88/125\",\r\n \"2603:1010:304:402::88/125\",\r\n + \ \"2603:1010:404:402::88/125\",\r\n \"2603:1020:5:402::88/125\",\r\n + \ \"2603:1020:5:802::88/125\",\r\n \"2603:1020:5:c02::88/125\",\r\n + \ \"2603:1020:206:402::88/125\",\r\n \"2603:1020:206:802::88/125\",\r\n + \ \"2603:1020:206:c02::88/125\",\r\n \"2603:1020:305:402::88/125\",\r\n + \ \"2603:1020:405:402::88/125\",\r\n \"2603:1020:605:402::88/125\",\r\n + \ \"2603:1020:705:402::88/125\",\r\n \"2603:1020:705:802::88/125\",\r\n + \ \"2603:1020:705:c02::88/125\",\r\n \"2603:1020:805:402::88/125\",\r\n + \ \"2603:1020:805:802::88/125\",\r\n \"2603:1020:805:c02::88/125\",\r\n + \ \"2603:1020:905:402::88/125\",\r\n \"2603:1020:a04:402::88/125\",\r\n + \ \"2603:1020:a04:802::88/125\",\r\n \"2603:1020:a04:c02::88/125\",\r\n + \ \"2603:1020:b04:402::88/125\",\r\n \"2603:1020:c04:402::88/125\",\r\n + \ \"2603:1020:c04:802::88/125\",\r\n \"2603:1020:c04:c02::88/125\",\r\n + \ \"2603:1020:d04:402::88/125\",\r\n \"2603:1020:e04:402::88/125\",\r\n + \ \"2603:1020:e04:802::88/125\",\r\n \"2603:1020:e04:c02::88/125\",\r\n + \ \"2603:1020:f04:402::88/125\",\r\n \"2603:1020:1004:400::88/125\",\r\n + \ \"2603:1020:1004:400::3b0/125\",\r\n \"2603:1020:1004:800::148/125\",\r\n + \ \"2603:1020:1004:c02::1a8/125\",\r\n \"2603:1020:1104:400::88/125\",\r\n + \ \"2603:1030:f:400::888/125\",\r\n \"2603:1030:10:402::88/125\",\r\n + \ \"2603:1030:10:802::88/125\",\r\n \"2603:1030:10:c02::88/125\",\r\n + \ \"2603:1030:104:402::88/125\",\r\n \"2603:1030:104:402::160/125\",\r\n + \ \"2603:1030:104:802::50/125\",\r\n \"2603:1030:107:400::8/125\",\r\n + \ \"2603:1030:210:402::88/125\",\r\n \"2603:1030:210:802::88/125\",\r\n + \ \"2603:1030:210:c02::88/125\",\r\n \"2603:1030:40b:400::888/125\",\r\n + \ \"2603:1030:40b:800::88/125\",\r\n \"2603:1030:40b:c00::88/125\",\r\n + \ \"2603:1030:40c:402::88/125\",\r\n \"2603:1030:40c:802::88/125\",\r\n + \ \"2603:1030:40c:c02::88/125\",\r\n \"2603:1030:504:402::88/125\",\r\n + \ \"2603:1030:504:402::3b0/125\",\r\n \"2603:1030:504:802::148/125\",\r\n + \ \"2603:1030:504:802::3e8/125\",\r\n \"2603:1030:504:c02::398/125\",\r\n + \ \"2603:1030:608:402::88/125\",\r\n \"2603:1030:807:402::88/125\",\r\n + \ \"2603:1030:807:802::88/125\",\r\n \"2603:1030:807:c02::88/125\",\r\n + \ \"2603:1030:a07:402::88/125\",\r\n \"2603:1030:b04:402::88/125\",\r\n + \ \"2603:1030:c06:400::888/125\",\r\n \"2603:1030:c06:802::88/125\",\r\n + \ \"2603:1030:c06:c02::88/125\",\r\n \"2603:1030:f05:402::88/125\",\r\n + \ \"2603:1030:f05:802::88/125\",\r\n \"2603:1030:f05:c02::88/125\",\r\n + \ \"2603:1030:1005:402::88/125\",\r\n \"2603:1040:5:402::88/125\",\r\n + \ \"2603:1040:5:802::88/125\",\r\n \"2603:1040:5:c02::88/125\",\r\n + \ \"2603:1040:207:402::88/125\",\r\n \"2603:1040:207:800::40/125\",\r\n + \ \"2603:1040:207:c00::40/125\",\r\n \"2603:1040:407:402::88/125\",\r\n + \ \"2603:1040:407:802::88/125\",\r\n \"2603:1040:407:c02::88/125\",\r\n + \ \"2603:1040:606:402::88/125\",\r\n \"2603:1040:806:402::88/125\",\r\n + \ \"2603:1040:904:402::88/125\",\r\n \"2603:1040:904:802::88/125\",\r\n + \ \"2603:1040:904:c02::88/125\",\r\n \"2603:1040:a06:402::88/125\",\r\n + \ \"2603:1040:a06:802::88/125\",\r\n \"2603:1040:a06:c02::88/125\",\r\n + \ \"2603:1040:b04:402::88/125\",\r\n \"2603:1040:c06:402::88/125\",\r\n + \ \"2603:1040:d04:400::88/125\",\r\n \"2603:1040:d04:400::3b0/125\",\r\n + \ \"2603:1040:d04:800::148/125\",\r\n \"2603:1040:f05:402::88/125\",\r\n + \ \"2603:1040:f05:802::88/125\",\r\n \"2603:1040:f05:c02::88/125\",\r\n + \ \"2603:1040:1002:400::40/125\",\r\n \"2603:1040:1002:800::40/125\",\r\n + \ \"2603:1040:1002:c00::40/125\",\r\n \"2603:1040:1104:400::88/125\",\r\n + \ \"2603:1050:6:402::88/125\",\r\n \"2603:1050:6:802::88/125\",\r\n + \ \"2603:1050:6:c02::88/125\",\r\n \"2603:1050:403:400::90/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.AustraliaEast\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.AustraliaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.70.72.128/29\",\r\n \"40.79.162.24/29\",\r\n + \ \"40.79.170.8/29\",\r\n \"2603:1010:6:402::88/125\",\r\n + \ \"2603:1010:6:802::88/125\",\r\n \"2603:1010:6:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.AustraliaSoutheast\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"13.77.50.72/29\",\r\n + \ \"2603:1010:101:402::88/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"MicrosoftContainerRegistry.BrazilSouth\",\r\n \"id\": + \"MicrosoftContainerRegistry.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"191.233.203.128/29\",\r\n \"191.234.146.136/29\",\r\n + \ \"191.234.154.136/29\",\r\n \"2603:1050:6:402::88/125\",\r\n + \ \"2603:1050:6:802::88/125\",\r\n \"2603:1050:6:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.BrazilSoutheast\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"191.233.50.8/29\",\r\n \"2603:1050:403:400::90/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.CanadaCentral\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.CanadaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.71.170.48/29\",\r\n \"20.38.146.136/29\",\r\n + \ \"52.246.154.136/29\",\r\n \"2603:1030:f05:402::88/125\",\r\n + \ \"2603:1030:f05:802::88/125\",\r\n \"2603:1030:f05:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.CanadaEast\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.CanadaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.69.106.72/29\",\r\n \"2603:1030:1005:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.CentralIndia\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"20.192.98.136/29\",\r\n \"40.80.50.136/29\",\r\n + \ \"104.211.81.128/29\",\r\n \"2603:1040:a06:402::88/125\",\r\n + \ \"2603:1040:a06:802::88/125\",\r\n \"2603:1040:a06:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.CentralUS\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.CentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.89.170.208/29\",\r\n \"52.182.138.200/29\",\r\n + \ \"104.208.16.72/29\",\r\n \"2603:1030:10:402::88/125\",\r\n + \ \"2603:1030:10:802::88/125\",\r\n \"2603:1030:10:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.CentralUSEUAP\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.78.202.64/29\",\r\n \"2603:1030:f:400::888/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.EastAsia\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.EastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.75.34.152/29\",\r\n \"20.205.74.64/29\",\r\n + \ \"20.205.82.64/29\",\r\n \"2603:1040:207:402::88/125\",\r\n + \ \"2603:1040:207:800::40/125\",\r\n \"2603:1040:207:c00::40/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.EastUS\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.EastUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.71.10.208/29\",\r\n \"40.78.226.200/29\",\r\n + \ \"40.79.154.96/29\",\r\n \"2603:1030:210:402::88/125\",\r\n + \ \"2603:1030:210:802::88/125\",\r\n \"2603:1030:210:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.EastUS2\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.EastUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.70.146.80/29\",\r\n \"52.167.106.72/29\",\r\n + \ \"104.208.144.72/29\",\r\n \"2603:1030:40c:402::88/125\",\r\n + \ \"2603:1030:40c:802::88/125\",\r\n \"2603:1030:40c:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.EastUS2EUAP\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.74.146.40/29\",\r\n \"40.75.34.24/29\",\r\n + \ \"52.138.90.24/29\",\r\n \"2603:1030:40b:400::888/125\",\r\n + \ \"2603:1030:40b:800::88/125\",\r\n \"2603:1030:40b:c00::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.FranceCentral\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.FranceCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.79.130.48/29\",\r\n \"40.79.138.24/29\",\r\n + \ \"40.79.146.24/29\",\r\n \"2603:1020:805:402::88/125\",\r\n + \ \"2603:1020:805:802::88/125\",\r\n \"2603:1020:805:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.FranceSouth\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.FranceSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.79.178.72/29\",\r\n \"2603:1020:905:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.GermanyNorth\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.GermanyNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"51.116.58.16/29\",\r\n \"2603:1020:d04:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.GermanyWestCentral\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"51.116.154.80/29\",\r\n \"51.116.242.136/29\",\r\n + \ \"51.116.250.136/29\",\r\n \"2603:1020:c04:402::88/125\",\r\n + \ \"2603:1020:c04:802::88/125\",\r\n \"2603:1020:c04:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.JapanEast\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.78.106.192/29\",\r\n \"40.79.186.0/29\",\r\n + \ \"40.79.194.88/29\",\r\n \"2603:1040:407:402::88/125\",\r\n + \ \"2603:1040:407:802::88/125\",\r\n \"2603:1040:407:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.JapanWest\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.JapanWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.74.100.56/29\",\r\n \"2603:1040:606:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.JioIndiaCentral\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"20.192.234.16/29\",\r\n + \ \"2603:1040:1104:400::88/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"MicrosoftContainerRegistry.JioIndiaWest\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"20.193.202.8/29\",\r\n \"2603:1040:d04:400::88/125\",\r\n + \ \"2603:1040:d04:400::3b0/125\",\r\n \"2603:1040:d04:800::148/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.KoreaCentral\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.KoreaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"20.44.26.136/29\",\r\n \"20.194.66.8/29\",\r\n + \ \"52.231.18.48/29\",\r\n \"2603:1040:f05:402::88/125\",\r\n + \ \"2603:1040:f05:802::88/125\",\r\n \"2603:1040:f05:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.KoreaSouth\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"52.231.146.88/29\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.NorthCentralUS\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"52.162.106.152/29\",\r\n + \ \"2603:1030:608:402::88/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"MicrosoftContainerRegistry.NorthEurope\",\r\n \"id\": + \"MicrosoftContainerRegistry.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.69.227.80/29\",\r\n \"13.74.107.72/29\",\r\n + \ \"52.138.226.72/29\",\r\n \"2603:1020:5:402::88/125\",\r\n + \ \"2603:1020:5:802::88/125\",\r\n \"2603:1020:5:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.NorwayEast\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"51.120.98.24/29\",\r\n \"51.120.106.136/29\",\r\n + \ \"51.120.210.136/29\",\r\n \"2603:1020:e04:402::88/125\",\r\n + \ \"2603:1020:e04:802::88/125\",\r\n \"2603:1020:e04:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.NorwayWest\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.NorwayWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"51.120.218.16/29\",\r\n \"2603:1020:f04:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SouthAfricaNorth\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"102.133.122.136/29\",\r\n + \ \"102.133.154.16/29\",\r\n \"102.133.250.136/29\",\r\n + \ \"2603:1000:104:402::88/125\",\r\n \"2603:1000:104:802::88/125\",\r\n + \ \"2603:1000:104:c02::88/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"MicrosoftContainerRegistry.SouthAfricaWest\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"102.133.26.16/29\",\r\n + \ \"2603:1000:4:402::88/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"MicrosoftContainerRegistry.SouthCentralUS\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"MicrosoftContainerRegistry\",\r\n \"addressPrefixes\": [\r\n \"20.45.122.136/29\",\r\n + \ \"20.49.90.8/29\",\r\n \"104.214.18.176/29\",\r\n \"2603:1030:807:402::88/125\",\r\n + \ \"2603:1030:807:802::88/125\",\r\n \"2603:1030:807:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SouthCentralUSSTG\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"20.44.2.16/29\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SoutheastAsia\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.67.8.112/29\",\r\n \"23.98.82.104/29\",\r\n + \ \"40.78.234.40/29\",\r\n \"2603:1040:5:402::88/125\",\r\n + \ \"2603:1040:5:802::88/125\",\r\n \"2603:1040:5:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SouthIndia\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.SouthIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.78.194.72/29\",\r\n \"2603:1040:c06:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SwedenCentral\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"51.12.98.16/29\",\r\n \"51.12.226.136/29\",\r\n + \ \"51.12.234.136/29\",\r\n \"2603:1020:1004:400::88/125\",\r\n + \ \"2603:1020:1004:400::3b0/125\",\r\n \"2603:1020:1004:800::148/125\",\r\n + \ \"2603:1020:1004:c02::1a8/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"MicrosoftContainerRegistry.SwitzerlandNorth\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"20.208.18.64/29\",\r\n \"51.103.202.64/29\",\r\n + \ \"51.107.58.16/29\",\r\n \"2603:1020:a04:402::88/125\",\r\n + \ \"2603:1020:a04:802::88/125\",\r\n \"2603:1020:a04:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.SwitzerlandWest\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"51.107.154.16/29\",\r\n \"2603:1020:b04:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.UAECentral\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.UAECentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"20.37.74.64/29\",\r\n \"2603:1040:b04:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.UAENorth\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.120.74.8/29\",\r\n \"65.52.250.8/29\",\r\n + \ \"2603:1040:904:402::88/125\",\r\n \"2603:1040:904:802::88/125\",\r\n + \ \"2603:1040:904:c02::88/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"MicrosoftContainerRegistry.UKSouth\",\r\n \"id\": + \"MicrosoftContainerRegistry.UKSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"51.105.66.136/29\",\r\n \"51.105.74.136/29\",\r\n + \ \"51.140.146.192/29\",\r\n \"2603:1020:705:402::88/125\",\r\n + \ \"2603:1020:705:802::88/125\",\r\n \"2603:1020:705:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.UKWest\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.UKWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"51.140.210.88/29\",\r\n \"2603:1020:605:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestCentralUS\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.71.194.120/29\",\r\n \"2603:1030:b04:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestEurope\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.WestEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.69.64.80/29\",\r\n \"13.69.106.72/29\",\r\n + \ \"52.236.186.72/29\",\r\n \"2603:1020:206:402::88/125\",\r\n + \ \"2603:1020:206:802::88/125\",\r\n \"2603:1020:206:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestIndia\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.WestIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"104.211.146.72/29\",\r\n \"2603:1040:806:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestUS\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.WestUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"40.112.242.152/29\",\r\n \"2603:1030:a07:402::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestUS2\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.WestUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"13.66.140.64/29\",\r\n \"40.78.242.152/29\",\r\n + \ \"40.78.250.88/29\",\r\n \"2603:1030:c06:400::888/125\",\r\n + \ \"2603:1030:c06:802::88/125\",\r\n \"2603:1030:c06:c02::88/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"MicrosoftContainerRegistry.WestUS3\",\r\n + \ \"id\": \"MicrosoftContainerRegistry.WestUS3\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"MicrosoftContainerRegistry\",\r\n + \ \"addressPrefixes\": [\r\n \"20.150.170.16/29\",\r\n \"20.150.178.136/29\",\r\n + \ \"20.150.186.136/29\",\r\n \"2603:1030:504:402::88/125\",\r\n + \ \"2603:1030:504:402::3b0/125\",\r\n \"2603:1030:504:802::148/125\",\r\n + \ \"2603:1030:504:802::3e8/125\",\r\n \"2603:1030:504:c02::398/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"PowerBI\",\r\n + \ \"id\": \"PowerBI\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"5\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"PowerBI\",\r\n \"addressPrefixes\": + [\r\n \"13.73.248.4/31\",\r\n \"13.73.248.48/28\",\r\n \"13.73.248.64/27\",\r\n + \ \"20.21.32.22/31\",\r\n \"20.21.36.124/30\",\r\n \"20.21.37.48/29\",\r\n + \ \"20.36.120.122/31\",\r\n \"20.36.120.124/30\",\r\n \"20.36.120.208/29\",\r\n + \ \"20.37.64.122/31\",\r\n \"20.37.64.124/30\",\r\n \"20.37.64.208/29\",\r\n + \ \"20.37.156.200/30\",\r\n \"20.37.156.240/28\",\r\n \"20.37.157.0/29\",\r\n + \ \"20.37.157.16/28\",\r\n \"20.37.157.32/27\",\r\n \"20.37.195.24/31\",\r\n + \ \"20.37.195.48/29\",\r\n \"20.37.195.64/28\",\r\n \"20.37.195.128/26\",\r\n + \ \"20.37.224.122/31\",\r\n \"20.37.224.124/30\",\r\n \"20.37.224.208/29\",\r\n + \ \"20.38.84.104/31\",\r\n \"20.38.84.128/25\",\r\n \"20.38.85.0/25\",\r\n + \ \"20.38.86.0/24\",\r\n \"20.38.136.70/31\",\r\n \"20.38.136.208/30\",\r\n + \ \"20.38.136.216/29\",\r\n \"20.39.11.26/31\",\r\n \"20.39.11.28/30\",\r\n + \ \"20.39.11.48/28\",\r\n \"20.40.230.60/30\",\r\n \"20.41.4.104/31\",\r\n + \ \"20.41.4.108/30\",\r\n \"20.41.4.208/28\",\r\n \"20.41.4.224/27\",\r\n + \ \"20.41.5.0/25\",\r\n \"20.41.65.146/31\",\r\n \"20.41.65.148/30\",\r\n + \ \"20.41.65.152/29\",\r\n \"20.41.192.122/31\",\r\n \"20.41.192.124/30\",\r\n + \ \"20.41.193.144/29\",\r\n \"20.42.0.70/31\",\r\n \"20.42.4.240/29\",\r\n + \ \"20.42.6.0/27\",\r\n \"20.42.6.64/26\",\r\n \"20.42.131.32/31\",\r\n + \ \"20.42.131.40/29\",\r\n \"20.42.131.48/29\",\r\n \"20.42.131.128/26\",\r\n + \ \"20.42.224.122/31\",\r\n \"20.42.227.16/28\",\r\n \"20.42.227.32/29\",\r\n + \ \"20.42.227.64/26\",\r\n \"20.43.41.176/31\",\r\n \"20.43.41.184/29\",\r\n + \ \"20.43.41.192/26\",\r\n \"20.43.65.152/31\",\r\n \"20.43.65.176/29\",\r\n + \ \"20.43.65.192/28\",\r\n \"20.43.65.224/27\",\r\n \"20.43.130.192/31\",\r\n + \ \"20.43.130.196/30\",\r\n \"20.43.130.200/29\",\r\n \"20.43.130.208/28\",\r\n + \ \"20.43.130.224/28\",\r\n \"20.43.131.0/27\",\r\n \"20.43.131.64/26\",\r\n + \ \"20.45.90.88/30\",\r\n \"20.45.94.80/29\",\r\n \"20.45.192.122/31\",\r\n + \ \"20.45.192.124/31\",\r\n \"20.45.192.208/30\",\r\n \"20.45.192.216/29\",\r\n + \ \"20.45.192.224/28\",\r\n \"20.45.242.48/29\",\r\n \"20.46.15.56/30\",\r\n + \ \"20.47.233.72/29\",\r\n \"20.48.196.232/29\",\r\n \"20.48.197.124/30\",\r\n + \ \"20.48.202.16/29\",\r\n \"20.48.202.24/30\",\r\n \"20.50.0.0/24\",\r\n + \ \"20.51.0.204/30\",\r\n \"20.51.1.32/28\",\r\n \"20.51.5.4/30\",\r\n + \ \"20.51.5.192/26\",\r\n \"20.51.14.76/31\",\r\n \"20.51.21.160/29\",\r\n + \ \"20.51.21.176/29\",\r\n \"20.51.21.240/29\",\r\n \"20.52.89.48/30\",\r\n + \ \"20.52.95.0/29\",\r\n \"20.53.49.108/30\",\r\n \"20.53.53.192/29\",\r\n + \ \"20.59.79.96/27\",\r\n \"20.59.79.192/28\",\r\n \"20.65.133.80/29\",\r\n + \ \"20.65.134.192/27\",\r\n \"20.65.134.224/28\",\r\n \"20.65.134.240/30\",\r\n + \ \"20.65.135.16/28\",\r\n \"20.69.4.224/28\",\r\n \"20.69.4.240/30\",\r\n + \ \"20.70.221.0/28\",\r\n \"20.70.221.224/27\",\r\n \"20.72.16.22/31\",\r\n + \ \"20.72.16.44/30\",\r\n \"20.72.20.32/29\",\r\n \"20.83.221.80/30\",\r\n + \ \"20.83.221.84/31\",\r\n \"20.83.221.208/29\",\r\n \"20.86.93.192/28\",\r\n + \ \"20.86.93.208/29\",\r\n \"20.87.80.8/29\",\r\n \"20.88.154.0/29\",\r\n + \ \"20.88.157.72/29\",\r\n \"20.88.157.96/27\",\r\n \"20.89.11.112/30\",\r\n + \ \"20.89.11.116/31\",\r\n \"20.89.11.248/29\",\r\n \"20.90.32.144/28\",\r\n + \ \"20.90.131.116/30\",\r\n \"20.90.132.64/28\",\r\n \"20.92.4.144/28\",\r\n + \ \"20.97.33.248/29\",\r\n \"20.97.34.128/26\",\r\n \"20.97.34.192/28\",\r\n + \ \"20.98.145.48/28\",\r\n \"20.98.145.64/30\",\r\n \"20.98.145.112/29\",\r\n + \ \"20.98.146.0/27\",\r\n \"20.98.192.168/30\",\r\n \"20.98.192.192/27\",\r\n + \ \"20.98.193.128/26\",\r\n \"20.98.193.192/29\",\r\n \"20.99.11.4/30\",\r\n + \ \"20.99.11.8/29\",\r\n \"20.100.1.168/29\",\r\n \"20.105.209.128/25\",\r\n + \ \"20.111.0.192/29\",\r\n \"20.150.160.110/31\",\r\n \"20.150.160.124/30\",\r\n + \ \"20.150.161.144/29\",\r\n \"20.189.104.70/31\",\r\n \"20.189.106.224/27\",\r\n + \ \"20.189.108.0/27\",\r\n \"20.189.193.176/29\",\r\n \"20.191.167.244/31\",\r\n + \ \"20.192.47.128/30\",\r\n \"20.192.47.132/31\",\r\n \"20.192.82.20/30\",\r\n + \ \"20.192.82.120/29\",\r\n \"20.192.84.128/29\",\r\n \"20.192.152.144/30\",\r\n + \ \"20.192.153.88/30\",\r\n \"20.192.160.22/31\",\r\n \"20.192.161.112/30\",\r\n + \ \"20.192.161.120/29\",\r\n \"20.192.168.144/30\",\r\n \"20.192.169.120/30\",\r\n + \ \"20.192.225.34/31\",\r\n \"20.192.225.36/30\",\r\n \"20.192.225.192/29\",\r\n + \ \"20.195.83.48/29\",\r\n \"20.195.85.16/30\",\r\n \"20.195.85.32/27\",\r\n + \ \"20.195.146.200/30\",\r\n \"20.200.192.8/30\",\r\n \"20.200.192.14/31\",\r\n + \ \"20.200.194.232/30\",\r\n \"20.200.195.176/30\",\r\n \"20.205.68.120/29\",\r\n + \ \"20.205.69.0/28\",\r\n \"20.206.0.96/29\",\r\n \"40.67.50.246/31\",\r\n + \ \"40.74.24.70/31\",\r\n \"40.74.30.128/29\",\r\n \"40.74.30.160/27\",\r\n + \ \"40.74.30.192/26\",\r\n \"40.74.31.0/26\",\r\n \"40.80.56.122/31\",\r\n + \ \"40.80.57.144/29\",\r\n \"40.80.57.160/28\",\r\n \"40.80.168.122/31\",\r\n + \ \"40.80.168.124/30\",\r\n \"40.80.169.144/29\",\r\n \"40.80.184.70/31\",\r\n + \ \"40.80.188.48/28\",\r\n \"40.80.188.64/27\",\r\n \"40.80.188.128/25\",\r\n + \ \"40.80.189.0/24\",\r\n \"40.82.248.68/31\",\r\n \"40.82.253.96/28\",\r\n + \ \"40.82.253.128/26\",\r\n \"40.82.254.0/25\",\r\n \"40.89.16.122/31\",\r\n + \ \"40.89.17.144/28\",\r\n \"40.89.17.160/27\",\r\n \"40.119.8.76/30\",\r\n + \ \"40.119.11.64/26\",\r\n \"40.120.82.124/30\",\r\n \"40.120.86.144/31\",\r\n + \ \"40.120.86.148/30\",\r\n \"40.120.87.52/30\",\r\n \"51.12.17.16/30\",\r\n + \ \"51.12.17.24/29\",\r\n \"51.12.17.246/31\",\r\n \"51.12.22.168/30\",\r\n + \ \"51.12.22.200/30\",\r\n \"51.12.25.8/29\",\r\n \"51.12.29.30/31\",\r\n + \ \"51.12.46.230/31\",\r\n \"51.12.47.28/30\",\r\n \"51.12.72.216/30\",\r\n + \ \"51.12.73.88/30\",\r\n \"51.12.198.210/31\",\r\n \"51.13.138.72/30\",\r\n + \ \"51.13.143.0/29\",\r\n \"51.104.25.140/31\",\r\n \"51.104.25.152/30\",\r\n + \ \"51.104.25.176/28\",\r\n \"51.104.25.192/29\",\r\n \"51.104.27.0/26\",\r\n + \ \"51.105.88.122/31\",\r\n \"51.105.88.124/30\",\r\n \"51.105.88.208/28\",\r\n + \ \"51.107.48.124/31\",\r\n \"51.107.48.208/30\",\r\n \"51.107.48.216/29\",\r\n + \ \"51.107.144.122/31\",\r\n \"51.107.144.124/30\",\r\n \"51.107.144.208/29\",\r\n + \ \"51.107.243.168/30\",\r\n \"51.107.247.224/29\",\r\n \"51.107.251.184/30\",\r\n + \ \"51.107.255.128/29\",\r\n \"51.116.48.68/31\",\r\n \"51.116.48.128/30\",\r\n + \ \"51.116.48.136/29\",\r\n \"51.116.55.168/30\",\r\n \"51.116.75.72/29\",\r\n + \ \"51.116.144.68/31\",\r\n \"51.116.144.128/30\",\r\n \"51.116.144.136/29\",\r\n + \ \"51.116.149.232/29\",\r\n \"51.120.40.124/31\",\r\n \"51.120.40.208/30\",\r\n + \ \"51.120.40.216/29\",\r\n \"51.120.224.122/31\",\r\n \"51.120.224.124/30\",\r\n + \ \"51.120.224.208/29\",\r\n \"51.120.237.12/30\",\r\n \"51.137.160.70/31\",\r\n + \ \"51.137.161.160/27\",\r\n \"51.137.161.192/27\",\r\n \"51.138.215.114/31\",\r\n + \ \"51.138.215.116/30\",\r\n \"51.138.215.120/31\",\r\n \"52.136.48.120/31\",\r\n + \ \"52.136.48.124/30\",\r\n \"52.136.48.208/29\",\r\n \"52.136.48.224/28\",\r\n + \ \"52.136.186.112/30\",\r\n \"52.136.190.184/29\",\r\n \"52.139.108.116/30\",\r\n + \ \"52.140.105.144/28\",\r\n \"52.140.105.160/28\",\r\n \"52.146.140.128/25\",\r\n + \ \"52.147.113.176/30\",\r\n \"52.147.119.8/29\",\r\n \"52.150.139.76/31\",\r\n + \ \"52.150.139.96/30\",\r\n \"52.150.139.112/28\",\r\n \"52.150.139.128/28\",\r\n + \ \"52.150.139.160/27\",\r\n \"52.172.116.184/30\",\r\n \"52.172.116.190/31\",\r\n + \ \"52.228.81.160/31\",\r\n \"52.228.81.168/29\",\r\n \"52.228.81.176/28\",\r\n + \ \"52.228.81.192/27\",\r\n \"52.242.40.92/30\",\r\n \"52.242.40.96/29\",\r\n + \ \"102.37.81.140/30\",\r\n \"102.37.85.208/29\",\r\n \"102.37.160.160/29\",\r\n + \ \"102.37.163.20/30\",\r\n \"102.133.56.98/31\",\r\n \"102.133.56.100/30\",\r\n + \ \"102.133.56.104/29\",\r\n \"102.133.216.104/31\",\r\n + \ \"102.133.216.108/30\",\r\n \"102.133.217.64/29\",\r\n + \ \"191.233.8.22/31\",\r\n \"191.233.10.32/30\",\r\n \"191.233.10.40/29\",\r\n + \ \"191.235.225.152/31\",\r\n \"191.235.225.156/30\",\r\n + \ \"191.235.225.176/28\",\r\n \"191.235.225.192/28\",\r\n + \ \"191.235.225.224/27\",\r\n \"191.238.72.128/28\",\r\n + \ \"191.238.76.176/29\",\r\n \"191.238.77.192/28\",\r\n \"191.238.77.208/29\",\r\n + \ \"191.238.77.216/30\",\r\n \"2603:1000:4::620/123\",\r\n + \ \"2603:1000:4::640/122\",\r\n \"2603:1000:104::100/122\",\r\n + \ \"2603:1000:104::140/123\",\r\n \"2603:1000:104::320/123\",\r\n + \ \"2603:1000:104::340/122\",\r\n \"2603:1000:104:1::5e0/123\",\r\n + \ \"2603:1000:104:1::600/122\",\r\n \"2603:1010:6::/122\",\r\n + \ \"2603:1010:6::40/123\",\r\n \"2603:1010:6:1::5e0/123\",\r\n + \ \"2603:1010:6:1::600/122\",\r\n \"2603:1010:101::620/123\",\r\n + \ \"2603:1010:101::640/122\",\r\n \"2603:1010:304::620/123\",\r\n + \ \"2603:1010:304::640/122\",\r\n \"2603:1010:404::620/123\",\r\n + \ \"2603:1010:404::640/122\",\r\n \"2603:1020:5::/122\",\r\n + \ \"2603:1020:5::40/123\",\r\n \"2603:1020:5:1::5e0/123\",\r\n + \ \"2603:1020:5:1::600/122\",\r\n \"2603:1020:206::/122\",\r\n + \ \"2603:1020:206::40/123\",\r\n \"2603:1020:206:1::5e0/123\",\r\n + \ \"2603:1020:206:1::600/122\",\r\n \"2603:1020:305::620/123\",\r\n + \ \"2603:1020:305::640/122\",\r\n \"2603:1020:405::620/123\",\r\n + \ \"2603:1020:405::640/122\",\r\n \"2603:1020:605::620/123\",\r\n + \ \"2603:1020:605::640/122\",\r\n \"2603:1020:705::/122\",\r\n + \ \"2603:1020:705::40/123\",\r\n \"2603:1020:705:1::5e0/123\",\r\n + \ \"2603:1020:705:1::600/122\",\r\n \"2603:1020:805::/122\",\r\n + \ \"2603:1020:805::40/123\",\r\n \"2603:1020:805:1::5e0/123\",\r\n + \ \"2603:1020:805:1::600/122\",\r\n \"2603:1020:905::620/123\",\r\n + \ \"2603:1020:905::640/122\",\r\n \"2603:1020:a04::/122\",\r\n + \ \"2603:1020:a04::40/123\",\r\n \"2603:1020:a04:1::5e0/123\",\r\n + \ \"2603:1020:a04:1::600/122\",\r\n \"2603:1020:b04::620/123\",\r\n + \ \"2603:1020:b04::640/122\",\r\n \"2603:1020:c04::/122\",\r\n + \ \"2603:1020:c04::40/123\",\r\n \"2603:1020:c04:1::5e0/123\",\r\n + \ \"2603:1020:c04:1::600/122\",\r\n \"2603:1020:d04::620/123\",\r\n + \ \"2603:1020:d04::640/122\",\r\n \"2603:1020:e04::/122\",\r\n + \ \"2603:1020:e04::40/123\",\r\n \"2603:1020:e04:1::5e0/123\",\r\n + \ \"2603:1020:e04:1::600/122\",\r\n \"2603:1020:f04::620/123\",\r\n + \ \"2603:1020:f04::640/122\",\r\n \"2603:1020:1004::5e0/123\",\r\n + \ \"2603:1020:1004::600/122\",\r\n \"2603:1020:1004:1::/122\",\r\n + \ \"2603:1020:1004:1::40/123\",\r\n \"2603:1020:1104::6a0/123\",\r\n + \ \"2603:1020:1104::6c0/122\",\r\n \"2603:1030:f:1::620/123\",\r\n + \ \"2603:1030:f:1::640/122\",\r\n \"2603:1030:10::/122\",\r\n + \ \"2603:1030:10::40/123\",\r\n \"2603:1030:10:1::5e0/123\",\r\n + \ \"2603:1030:10:1::600/122\",\r\n \"2603:1030:104::/122\",\r\n + \ \"2603:1030:104::40/123\",\r\n \"2603:1030:104:1::5e0/123\",\r\n + \ \"2603:1030:104:1::600/122\",\r\n \"2603:1030:107::6c0/122\",\r\n + \ \"2603:1030:107::700/123\",\r\n \"2603:1030:210::/122\",\r\n + \ \"2603:1030:210::40/123\",\r\n \"2603:1030:210:1::5e0/123\",\r\n + \ \"2603:1030:210:1::600/122\",\r\n \"2603:1030:40b:1::5e0/123\",\r\n + \ \"2603:1030:40b:1::600/122\",\r\n \"2603:1030:40c::/122\",\r\n + \ \"2603:1030:40c::40/123\",\r\n \"2603:1030:40c:1::5e0/123\",\r\n + \ \"2603:1030:40c:1::600/122\",\r\n \"2603:1030:504::/122\",\r\n + \ \"2603:1030:504::40/123\",\r\n \"2603:1030:504:1::5e0/123\",\r\n + \ \"2603:1030:504:1::600/122\",\r\n \"2603:1030:608::620/123\",\r\n + \ \"2603:1030:608::640/122\",\r\n \"2603:1030:807::/122\",\r\n + \ \"2603:1030:807::40/123\",\r\n \"2603:1030:807:1::5e0/123\",\r\n + \ \"2603:1030:807:1::600/122\",\r\n \"2603:1030:a07::620/123\",\r\n + \ \"2603:1030:a07::640/122\",\r\n \"2603:1030:b04::620/123\",\r\n + \ \"2603:1030:b04::640/122\",\r\n \"2603:1030:c06:1::5e0/123\",\r\n + \ \"2603:1030:c06:1::600/122\",\r\n \"2603:1030:f05::/122\",\r\n + \ \"2603:1030:f05::40/123\",\r\n \"2603:1030:f05:1::5e0/123\",\r\n + \ \"2603:1030:f05:1::600/122\",\r\n \"2603:1030:1005::620/123\",\r\n + \ \"2603:1030:1005::640/122\",\r\n \"2603:1040:5::100/122\",\r\n + \ \"2603:1040:5::140/123\",\r\n \"2603:1040:5:1::5e0/123\",\r\n + \ \"2603:1040:5:1::600/122\",\r\n \"2603:1040:207::620/123\",\r\n + \ \"2603:1040:207::640/122\",\r\n \"2603:1040:407::/122\",\r\n + \ \"2603:1040:407::40/123\",\r\n \"2603:1040:407:1::5e0/123\",\r\n + \ \"2603:1040:407:1::600/122\",\r\n \"2603:1040:606::620/123\",\r\n + \ \"2603:1040:606::640/122\",\r\n \"2603:1040:806::620/123\",\r\n + \ \"2603:1040:806::640/122\",\r\n \"2603:1040:904::/122\",\r\n + \ \"2603:1040:904::40/123\",\r\n \"2603:1040:904:1::5e0/123\",\r\n + \ \"2603:1040:904:1::600/122\",\r\n \"2603:1040:a06::100/122\",\r\n + \ \"2603:1040:a06::140/123\",\r\n \"2603:1040:a06:1::5e0/123\",\r\n + \ \"2603:1040:a06:1::600/122\",\r\n \"2603:1040:b04::620/123\",\r\n + \ \"2603:1040:b04::640/122\",\r\n \"2603:1040:c06::620/123\",\r\n + \ \"2603:1040:c06::640/122\",\r\n \"2603:1040:d04::5e0/123\",\r\n + \ \"2603:1040:d04::600/122\",\r\n \"2603:1040:d04:1::/122\",\r\n + \ \"2603:1040:d04:1::40/123\",\r\n \"2603:1040:f05::/122\",\r\n + \ \"2603:1040:f05::40/123\",\r\n \"2603:1040:f05:1::5e0/123\",\r\n + \ \"2603:1040:f05:1::600/122\",\r\n \"2603:1040:1002:1::400/122\",\r\n + \ \"2603:1040:1002:1::440/123\",\r\n \"2603:1040:1104::6a0/123\",\r\n + \ \"2603:1040:1104::6c0/122\",\r\n \"2603:1050:6::/122\",\r\n + \ \"2603:1050:6::40/123\",\r\n \"2603:1050:6:1::5e0/123\",\r\n + \ \"2603:1050:6:1::600/122\",\r\n \"2603:1050:403::5e0/123\",\r\n + \ \"2603:1050:403::600/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"PowerQueryOnline\",\r\n \"id\": \"PowerQueryOnline\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"PowerQueryOnline\",\r\n \"addressPrefixes\": + [\r\n \"20.21.32.20/31\",\r\n \"20.36.120.120/31\",\r\n + \ \"20.37.64.120/31\",\r\n \"20.37.152.70/31\",\r\n \"20.37.192.70/31\",\r\n + \ \"20.37.224.120/31\",\r\n \"20.38.80.70/31\",\r\n \"20.38.136.68/31\",\r\n + \ \"20.39.11.24/31\",\r\n \"20.41.0.68/30\",\r\n \"20.41.64.70/31\",\r\n + \ \"20.41.65.144/31\",\r\n \"20.41.192.120/31\",\r\n \"20.42.4.200/30\",\r\n + \ \"20.42.128.70/31\",\r\n \"20.42.129.184/29\",\r\n \"20.42.224.120/31\",\r\n + \ \"20.43.40.70/31\",\r\n \"20.43.64.70/31\",\r\n \"20.43.128.70/31\",\r\n + \ \"20.45.112.120/31\",\r\n \"20.45.192.120/31\",\r\n \"20.72.16.20/31\",\r\n + \ \"20.150.160.108/31\",\r\n \"20.189.104.68/31\",\r\n \"20.192.160.20/31\",\r\n + \ \"20.192.225.32/31\",\r\n \"40.67.48.120/31\",\r\n \"40.74.30.104/30\",\r\n + \ \"40.80.56.120/31\",\r\n \"40.80.168.120/31\",\r\n \"40.80.184.68/31\",\r\n + \ \"40.82.253.72/29\",\r\n \"40.89.16.120/31\",\r\n \"40.119.8.74/31\",\r\n + \ \"51.12.46.228/31\",\r\n \"51.12.198.208/31\",\r\n \"51.104.24.70/31\",\r\n + \ \"51.105.80.120/31\",\r\n \"51.105.88.120/31\",\r\n \"51.107.48.70/31\",\r\n + \ \"51.107.144.120/31\",\r\n \"51.116.48.70/31\",\r\n \"51.116.144.70/31\",\r\n + \ \"51.120.40.70/31\",\r\n \"51.120.224.120/31\",\r\n \"51.137.160.68/31\",\r\n + \ \"51.143.192.120/31\",\r\n \"52.140.104.70/31\",\r\n \"52.150.139.72/30\",\r\n + \ \"52.228.80.70/31\",\r\n \"102.133.56.96/31\",\r\n \"102.133.216.70/31\",\r\n + \ \"191.233.8.20/31\",\r\n \"191.235.224.70/31\",\r\n \"2603:1000:4::200/123\",\r\n + \ \"2603:1000:104:1::200/123\",\r\n \"2603:1010:6:1::200/123\",\r\n + \ \"2603:1010:101::200/123\",\r\n \"2603:1010:304::200/123\",\r\n + \ \"2603:1010:404::200/123\",\r\n \"2603:1020:5:1::200/123\",\r\n + \ \"2603:1020:206:1::200/123\",\r\n \"2603:1020:305::200/123\",\r\n + \ \"2603:1020:405::200/123\",\r\n \"2603:1020:605::200/123\",\r\n + \ \"2603:1020:705:1::200/123\",\r\n \"2603:1020:805:1::200/123\",\r\n + \ \"2603:1020:905::200/123\",\r\n \"2603:1020:a04:1::200/123\",\r\n + \ \"2603:1020:b04::200/123\",\r\n \"2603:1020:c04:1::200/123\",\r\n + \ \"2603:1020:d04::200/123\",\r\n \"2603:1020:e04:1::200/123\",\r\n + \ \"2603:1020:f04::200/123\",\r\n \"2603:1020:1004::200/123\",\r\n + \ \"2603:1020:1104::200/123\",\r\n \"2603:1030:f:1::200/123\",\r\n + \ \"2603:1030:10:1::200/123\",\r\n \"2603:1030:104:1::200/123\",\r\n + \ \"2603:1030:107::200/123\",\r\n \"2603:1030:210:1::200/123\",\r\n + \ \"2603:1030:40b:1::200/123\",\r\n \"2603:1030:40c:1::200/123\",\r\n + \ \"2603:1030:504:1::200/123\",\r\n \"2603:1030:608::200/123\",\r\n + \ \"2603:1030:807:1::200/123\",\r\n \"2603:1030:a07::200/123\",\r\n + \ \"2603:1030:b04::200/123\",\r\n \"2603:1030:c06:1::200/123\",\r\n + \ \"2603:1030:f05:1::200/123\",\r\n \"2603:1030:1005::200/123\",\r\n + \ \"2603:1040:5:1::200/123\",\r\n \"2603:1040:207::200/123\",\r\n + \ \"2603:1040:407:1::200/123\",\r\n \"2603:1040:606::200/123\",\r\n + \ \"2603:1040:806::200/123\",\r\n \"2603:1040:904:1::200/123\",\r\n + \ \"2603:1040:a06:1::200/123\",\r\n \"2603:1040:b04::200/123\",\r\n + \ \"2603:1040:c06::200/123\",\r\n \"2603:1040:d04::200/123\",\r\n + \ \"2603:1040:f05:1::200/123\",\r\n \"2603:1040:1002::400/123\",\r\n + \ \"2603:1040:1104::200/123\",\r\n \"2603:1050:6:1::200/123\",\r\n + \ \"2603:1050:403::200/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus\",\r\n \"id\": \"ServiceBus\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"8\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n + \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureServiceBus\",\r\n + \ \"addressPrefixes\": [\r\n \"13.66.138.80/29\",\r\n \"13.66.147.192/26\",\r\n + \ \"13.67.8.96/29\",\r\n \"13.67.20.0/26\",\r\n \"13.68.110.36/32\",\r\n + \ \"13.69.64.64/29\",\r\n \"13.69.106.64/29\",\r\n \"13.69.111.64/26\",\r\n + \ \"13.69.227.64/29\",\r\n \"13.69.233.192/26\",\r\n \"13.70.72.16/29\",\r\n + \ \"13.70.114.0/26\",\r\n \"13.70.186.33/32\",\r\n \"13.71.114.157/32\",\r\n + \ \"13.71.170.32/29\",\r\n \"13.71.177.64/26\",\r\n \"13.71.194.96/28\",\r\n + \ \"13.74.107.64/29\",\r\n \"13.74.142.88/32\",\r\n \"13.75.34.128/28\",\r\n + \ \"13.76.141.36/32\",\r\n \"13.77.50.16/28\",\r\n \"13.78.94.187/32\",\r\n + \ \"13.78.106.80/29\",\r\n \"13.85.81.218/32\",\r\n \"13.87.35.8/32\",\r\n + \ \"13.87.56.64/28\",\r\n \"13.87.122.64/28\",\r\n \"13.88.10.93/32\",\r\n + \ \"13.89.170.192/29\",\r\n \"13.89.178.128/26\",\r\n \"20.21.37.128/25\",\r\n + \ \"20.21.42.80/29\",\r\n \"20.21.42.96/28\",\r\n \"20.21.66.80/29\",\r\n + \ \"20.21.66.96/28\",\r\n \"20.21.74.80/29\",\r\n \"20.21.74.96/28\",\r\n + \ \"20.36.106.224/27\",\r\n \"20.36.114.128/27\",\r\n \"20.36.144.0/26\",\r\n + \ \"20.37.74.32/27\",\r\n \"20.38.146.128/29\",\r\n \"20.40.231.128/25\",\r\n + \ \"20.42.65.0/26\",\r\n \"20.42.68.0/26\",\r\n \"20.42.72.192/26\",\r\n + \ \"20.42.73.64/26\",\r\n \"20.43.126.0/26\",\r\n \"20.44.2.8/29\",\r\n + \ \"20.44.13.0/26\",\r\n \"20.44.26.128/29\",\r\n \"20.44.31.64/26\",\r\n + \ \"20.45.93.0/25\",\r\n \"20.45.117.192/26\",\r\n \"20.45.122.128/29\",\r\n + \ \"20.45.126.128/26\",\r\n \"20.45.240.0/26\",\r\n \"20.45.241.64/26\",\r\n + \ \"20.47.216.0/26\",\r\n \"20.48.199.128/25\",\r\n \"20.49.83.248/29\",\r\n + \ \"20.49.84.128/28\",\r\n \"20.49.91.224/29\",\r\n \"20.49.91.240/28\",\r\n + \ \"20.49.95.64/26\",\r\n \"20.50.72.0/26\",\r\n \"20.50.80.0/26\",\r\n + \ \"20.50.201.0/26\",\r\n \"20.51.1.128/25\",\r\n \"20.51.15.0/25\",\r\n + \ \"20.51.22.192/26\",\r\n \"20.51.23.192/26\",\r\n \"20.52.64.64/26\",\r\n + \ \"20.52.91.128/25\",\r\n \"20.53.50.128/25\",\r\n \"20.53.58.128/25\",\r\n + \ \"20.58.70.0/25\",\r\n \"20.62.63.0/25\",\r\n \"20.65.135.128/25\",\r\n + \ \"20.66.6.128/25\",\r\n \"20.69.2.128/25\",\r\n \"20.70.216.128/25\",\r\n + \ \"20.72.27.144/29\",\r\n \"20.72.27.160/28\",\r\n \"20.82.244.128/25\",\r\n + \ \"20.86.92.0/25\",\r\n \"20.88.64.128/25\",\r\n \"20.88.153.64/26\",\r\n + \ \"20.89.0.0/26\",\r\n \"20.89.9.128/25\",\r\n \"20.90.128.192/26\",\r\n + \ \"20.92.0.128/25\",\r\n \"20.99.11.128/25\",\r\n \"20.150.129.0/25\",\r\n + \ \"20.150.160.216/29\",\r\n \"20.150.170.8/29\",\r\n \"20.150.175.0/26\",\r\n + \ \"20.150.178.128/29\",\r\n \"20.150.182.64/28\",\r\n \"20.150.186.128/29\",\r\n + \ \"20.150.189.48/28\",\r\n \"20.150.189.64/26\",\r\n \"20.151.32.0/26\",\r\n + \ \"20.189.230.128/25\",\r\n \"20.192.32.240/28\",\r\n \"20.192.47.192/26\",\r\n + \ \"20.192.55.64/26\",\r\n \"20.192.55.128/26\",\r\n \"20.192.82.128/25\",\r\n + \ \"20.192.98.128/29\",\r\n \"20.192.101.192/26\",\r\n \"20.192.160.40/29\",\r\n + \ \"20.192.225.56/29\",\r\n \"20.192.234.8/29\",\r\n \"20.193.199.0/25\",\r\n + \ \"20.193.204.104/29\",\r\n \"20.193.204.112/28\",\r\n \"20.194.67.208/29\",\r\n + \ \"20.194.68.128/28\",\r\n \"20.194.128.128/26\",\r\n \"20.195.75.128/25\",\r\n + \ \"20.195.82.0/25\",\r\n \"20.195.137.128/26\",\r\n \"20.195.151.128/25\",\r\n + \ \"20.195.152.0/26\",\r\n \"20.200.192.128/25\",\r\n \"20.205.74.80/29\",\r\n + \ \"20.205.75.64/28\",\r\n \"20.205.82.80/29\",\r\n \"20.205.83.64/28\",\r\n + \ \"20.208.18.80/29\",\r\n \"20.208.18.96/28\",\r\n \"23.97.120.37/32\",\r\n + \ \"23.98.82.96/29\",\r\n \"23.98.87.128/26\",\r\n \"23.98.112.128/26\",\r\n + \ \"40.64.113.0/26\",\r\n \"40.65.108.146/32\",\r\n \"40.67.58.8/29\",\r\n + \ \"40.67.72.0/26\",\r\n \"40.68.127.68/32\",\r\n \"40.69.106.16/28\",\r\n + \ \"40.70.146.64/29\",\r\n \"40.70.151.128/26\",\r\n \"40.71.10.192/29\",\r\n + \ \"40.74.100.32/28\",\r\n \"40.74.122.78/32\",\r\n \"40.74.146.32/29\",\r\n + \ \"40.74.150.192/26\",\r\n \"40.75.34.16/29\",\r\n \"40.78.194.16/28\",\r\n + \ \"40.78.202.16/28\",\r\n \"40.78.226.192/29\",\r\n \"40.78.234.32/29\",\r\n + \ \"40.78.242.144/29\",\r\n \"40.78.247.192/26\",\r\n \"40.78.250.80/29\",\r\n + \ \"40.79.130.32/29\",\r\n \"40.79.138.16/29\",\r\n \"40.79.141.192/26\",\r\n + \ \"40.79.146.16/29\",\r\n \"40.79.149.0/26\",\r\n \"40.79.154.88/29\",\r\n + \ \"40.79.162.16/29\",\r\n \"40.79.166.128/26\",\r\n \"40.79.170.16/29\",\r\n + \ \"40.79.173.64/26\",\r\n \"40.79.178.16/28\",\r\n \"40.79.186.64/27\",\r\n + \ \"40.79.194.80/29\",\r\n \"40.80.50.128/29\",\r\n \"40.80.53.16/28\",\r\n + \ \"40.86.91.130/32\",\r\n \"40.89.121.192/26\",\r\n \"40.112.242.128/28\",\r\n + \ \"40.114.86.33/32\",\r\n \"40.120.74.24/29\",\r\n \"40.120.77.192/26\",\r\n + \ \"40.120.85.0/25\",\r\n \"40.124.65.0/26\",\r\n \"51.11.192.64/26\",\r\n + \ \"51.12.22.0/25\",\r\n \"51.12.29.128/25\",\r\n \"51.12.98.8/29\",\r\n + \ \"51.12.101.224/28\",\r\n \"51.12.202.8/29\",\r\n \"51.12.206.0/28\",\r\n + \ \"51.12.226.128/29\",\r\n \"51.12.229.80/28\",\r\n \"51.12.234.128/29\",\r\n + \ \"51.12.237.80/28\",\r\n \"51.13.0.128/26\",\r\n \"51.13.141.0/25\",\r\n + \ \"51.103.202.80/29\",\r\n \"51.103.202.96/28\",\r\n \"51.105.66.128/29\",\r\n + \ \"51.105.70.192/26\",\r\n \"51.105.74.128/29\",\r\n \"51.107.58.8/29\",\r\n + \ \"51.107.128.192/26\",\r\n \"51.107.154.8/29\",\r\n \"51.107.244.128/25\",\r\n + \ \"51.107.252.128/25\",\r\n \"51.116.58.8/29\",\r\n \"51.116.72.128/25\",\r\n + \ \"51.116.154.72/29\",\r\n \"51.116.242.128/29\",\r\n \"51.116.246.128/26\",\r\n + \ \"51.116.250.128/29\",\r\n \"51.116.253.192/26\",\r\n \"51.120.98.16/29\",\r\n + \ \"51.120.106.128/29\",\r\n \"51.120.109.208/28\",\r\n \"51.120.210.128/29\",\r\n + \ \"51.120.213.48/28\",\r\n \"51.120.218.8/29\",\r\n \"51.120.237.64/26\",\r\n + \ \"51.132.192.128/26\",\r\n \"51.138.213.128/25\",\r\n \"51.140.43.12/32\",\r\n + \ \"51.140.146.48/29\",\r\n \"51.140.149.128/26\",\r\n \"51.140.210.64/28\",\r\n + \ \"51.141.1.129/32\",\r\n \"52.136.187.128/25\",\r\n \"52.138.71.95/32\",\r\n + \ \"52.138.90.16/29\",\r\n \"52.138.226.64/29\",\r\n \"52.139.110.0/25\",\r\n + \ \"52.147.116.0/25\",\r\n \"52.161.17.198/32\",\r\n \"52.162.106.128/28\",\r\n + \ \"52.167.106.64/29\",\r\n \"52.167.109.128/26\",\r\n \"52.168.29.86/32\",\r\n + \ \"52.168.112.128/26\",\r\n \"52.168.116.192/26\",\r\n \"52.172.118.128/25\",\r\n + \ \"52.172.220.188/32\",\r\n \"52.178.17.64/26\",\r\n \"52.180.178.204/32\",\r\n + \ \"52.182.138.192/29\",\r\n \"52.182.143.0/26\",\r\n \"52.187.192.243/32\",\r\n + \ \"52.231.18.32/29\",\r\n \"52.231.23.128/26\",\r\n \"52.231.146.64/28\",\r\n + \ \"52.232.119.191/32\",\r\n \"52.233.33.226/32\",\r\n \"52.236.186.64/29\",\r\n + \ \"52.242.36.0/32\",\r\n \"52.246.154.128/29\",\r\n \"52.246.158.192/26\",\r\n + \ \"65.52.219.186/32\",\r\n \"65.52.250.64/27\",\r\n \"102.37.64.192/26\",\r\n + \ \"102.37.72.0/26\",\r\n \"102.37.84.0/25\",\r\n \"102.37.163.128/25\",\r\n + \ \"102.133.26.8/29\",\r\n \"102.133.122.128/29\",\r\n \"102.133.126.192/26\",\r\n + \ \"102.133.154.8/29\",\r\n \"102.133.250.128/29\",\r\n \"102.133.253.192/26\",\r\n + \ \"104.40.15.128/32\",\r\n \"104.45.239.115/32\",\r\n \"104.208.16.64/29\",\r\n + \ \"104.208.144.64/29\",\r\n \"104.211.81.16/29\",\r\n \"104.211.146.16/28\",\r\n + \ \"104.211.190.88/32\",\r\n \"104.214.18.160/29\",\r\n \"104.214.165.72/29\",\r\n + \ \"168.61.142.56/29\",\r\n \"191.232.184.253/32\",\r\n \"191.233.8.40/29\",\r\n + \ \"191.233.203.16/29\",\r\n \"191.234.146.128/29\",\r\n + \ \"191.234.150.128/26\",\r\n \"191.234.154.128/29\",\r\n + \ \"191.234.157.144/28\",\r\n \"191.235.170.182/32\",\r\n + \ \"191.237.224.64/26\",\r\n \"191.238.73.128/25\",\r\n \"207.46.138.15/32\",\r\n + \ \"2603:1000:4::220/123\",\r\n \"2603:1000:4:1::500/120\",\r\n + \ \"2603:1000:4:402::170/125\",\r\n \"2603:1000:104:1::220/123\",\r\n + \ \"2603:1000:104:2::400/120\",\r\n \"2603:1000:104:402::170/125\",\r\n + \ \"2603:1000:104:802::150/125\",\r\n \"2603:1000:104:c02::150/125\",\r\n + \ \"2603:1010:6::700/120\",\r\n \"2603:1010:6:1::220/123\",\r\n + \ \"2603:1010:6:402::170/125\",\r\n \"2603:1010:6:802::150/125\",\r\n + \ \"2603:1010:6:c02::150/125\",\r\n \"2603:1010:101::220/123\",\r\n + \ \"2603:1010:101:1::500/120\",\r\n \"2603:1010:101:402::170/125\",\r\n + \ \"2603:1010:304::220/123\",\r\n \"2603:1010:304:1::500/120\",\r\n + \ \"2603:1010:304:402::170/125\",\r\n \"2603:1010:404::220/123\",\r\n + \ \"2603:1010:404:1::500/120\",\r\n \"2603:1010:404:402::170/125\",\r\n + \ \"2603:1020:5::700/120\",\r\n \"2603:1020:5:1::220/123\",\r\n + \ \"2603:1020:5:402::170/125\",\r\n \"2603:1020:5:802::150/125\",\r\n + \ \"2603:1020:5:c02::150/125\",\r\n \"2603:1020:206:1::220/123\",\r\n + \ \"2603:1020:206:4::/120\",\r\n \"2603:1020:206:402::170/125\",\r\n + \ \"2603:1020:206:802::150/125\",\r\n \"2603:1020:206:c02::150/125\",\r\n + \ \"2603:1020:305::220/123\",\r\n \"2603:1020:305:402::170/125\",\r\n + \ \"2603:1020:405::220/123\",\r\n \"2603:1020:405:402::170/125\",\r\n + \ \"2603:1020:605::220/123\",\r\n \"2603:1020:605:1::500/120\",\r\n + \ \"2603:1020:605:402::170/125\",\r\n \"2603:1020:705::700/120\",\r\n + \ \"2603:1020:705:1::220/123\",\r\n \"2603:1020:705:402::170/125\",\r\n + \ \"2603:1020:705:802::150/125\",\r\n \"2603:1020:705:c02::150/125\",\r\n + \ \"2603:1020:805::700/120\",\r\n \"2603:1020:805:1::220/123\",\r\n + \ \"2603:1020:805:402::170/125\",\r\n \"2603:1020:805:802::150/125\",\r\n + \ \"2603:1020:805:c02::150/125\",\r\n \"2603:1020:905::220/123\",\r\n + \ \"2603:1020:905:1::500/120\",\r\n \"2603:1020:905:402::170/125\",\r\n + \ \"2603:1020:a04::700/120\",\r\n \"2603:1020:a04:1::220/123\",\r\n + \ \"2603:1020:a04:402::170/125\",\r\n \"2603:1020:a04:802::150/125\",\r\n + \ \"2603:1020:a04:c02::150/125\",\r\n \"2603:1020:b04::220/123\",\r\n + \ \"2603:1020:b04:1::500/120\",\r\n \"2603:1020:b04:402::170/125\",\r\n + \ \"2603:1020:c04::700/120\",\r\n \"2603:1020:c04:1::220/123\",\r\n + \ \"2603:1020:c04:402::170/125\",\r\n \"2603:1020:c04:802::150/125\",\r\n + \ \"2603:1020:c04:c02::150/125\",\r\n \"2603:1020:d04::220/123\",\r\n + \ \"2603:1020:d04:1::500/120\",\r\n \"2603:1020:d04:402::170/125\",\r\n + \ \"2603:1020:e04:1::220/123\",\r\n \"2603:1020:e04:3::500/120\",\r\n + \ \"2603:1020:e04:402::170/125\",\r\n \"2603:1020:e04:802::150/125\",\r\n + \ \"2603:1020:e04:c02::150/125\",\r\n \"2603:1020:f04::220/123\",\r\n + \ \"2603:1020:f04:1::500/120\",\r\n \"2603:1020:f04:402::170/125\",\r\n + \ \"2603:1020:1004::220/123\",\r\n \"2603:1020:1004:2::300/120\",\r\n + \ \"2603:1020:1004:800::e0/124\",\r\n \"2603:1020:1004:800::f0/125\",\r\n + \ \"2603:1020:1004:800::358/125\",\r\n \"2603:1020:1004:800::3c0/124\",\r\n + \ \"2603:1020:1004:800::3e8/125\",\r\n \"2603:1020:1004:c02::180/123\",\r\n + \ \"2603:1020:1004:c02::1a0/125\",\r\n \"2603:1020:1104:400::170/125\",\r\n + \ \"2603:1030:f:1::220/123\",\r\n \"2603:1030:f:3::240/122\",\r\n + \ \"2603:1030:f:3::300/120\",\r\n \"2603:1030:f:400::970/125\",\r\n + \ \"2603:1030:10:1::220/123\",\r\n \"2603:1030:10:402::170/125\",\r\n + \ \"2603:1030:10:802::150/125\",\r\n \"2603:1030:10:c02::150/125\",\r\n + \ \"2603:1030:104:1::220/123\",\r\n \"2603:1030:104:2::200/120\",\r\n + \ \"2603:1030:104:402::170/125\",\r\n \"2603:1030:104:402::640/124\",\r\n + \ \"2603:1030:104:802::68/125\",\r\n \"2603:1030:107:1::400/120\",\r\n + \ \"2603:1030:107:400::d8/125\",\r\n \"2603:1030:210:1::220/123\",\r\n + \ \"2603:1030:210:402::170/125\",\r\n \"2603:1030:210:802::150/125\",\r\n + \ \"2603:1030:210:c02::150/125\",\r\n \"2603:1030:302::100/120\",\r\n + \ \"2603:1030:40b:1::220/123\",\r\n \"2603:1030:40b:2::480/122\",\r\n + \ \"2603:1030:40b:2::500/120\",\r\n \"2603:1030:40b:400::970/125\",\r\n + \ \"2603:1030:40b:800::150/125\",\r\n \"2603:1030:40b:c00::150/125\",\r\n + \ \"2603:1030:40c:1::220/123\",\r\n \"2603:1030:40c:402::170/125\",\r\n + \ \"2603:1030:40c:802::150/125\",\r\n \"2603:1030:40c:c02::150/125\",\r\n + \ \"2603:1030:504:1::220/123\",\r\n \"2603:1030:504:2::300/120\",\r\n + \ \"2603:1030:504:802::e0/124\",\r\n \"2603:1030:504:802::f0/125\",\r\n + \ \"2603:1030:504:802::358/125\",\r\n \"2603:1030:608::220/123\",\r\n + \ \"2603:1030:608:1::500/120\",\r\n \"2603:1030:608:402::170/125\",\r\n + \ \"2603:1030:807::700/120\",\r\n \"2603:1030:807:1::220/123\",\r\n + \ \"2603:1030:807:402::170/125\",\r\n \"2603:1030:807:802::150/125\",\r\n + \ \"2603:1030:807:c02::150/125\",\r\n \"2603:1030:a07::220/123\",\r\n + \ \"2603:1030:a07:1::500/120\",\r\n \"2603:1030:a07:402::8f0/125\",\r\n + \ \"2603:1030:b04::220/123\",\r\n \"2603:1030:b04:1::500/120\",\r\n + \ \"2603:1030:b04:402::170/125\",\r\n \"2603:1030:c06:1::220/123\",\r\n + \ \"2603:1030:c06:2::500/120\",\r\n \"2603:1030:c06:400::970/125\",\r\n + \ \"2603:1030:c06:802::150/125\",\r\n \"2603:1030:c06:c02::150/125\",\r\n + \ \"2603:1030:f05::700/120\",\r\n \"2603:1030:f05:1::220/123\",\r\n + \ \"2603:1030:f05:402::170/125\",\r\n \"2603:1030:f05:802::150/125\",\r\n + \ \"2603:1030:f05:c02::150/125\",\r\n \"2603:1030:1005::220/123\",\r\n + \ \"2603:1030:1005:1::500/120\",\r\n \"2603:1030:1005:402::170/125\",\r\n + \ \"2603:1040:5:1::220/123\",\r\n \"2603:1040:5:402::170/125\",\r\n + \ \"2603:1040:5:802::150/125\",\r\n \"2603:1040:5:c02::150/125\",\r\n + \ \"2603:1040:207::220/123\",\r\n \"2603:1040:207:2::80/121\",\r\n + \ \"2603:1040:207:2::500/120\",\r\n \"2603:1040:207:402::170/125\",\r\n + \ \"2603:1040:407::700/120\",\r\n \"2603:1040:407:1::220/123\",\r\n + \ \"2603:1040:407:402::170/125\",\r\n \"2603:1040:407:802::150/125\",\r\n + \ \"2603:1040:407:c02::150/125\",\r\n \"2603:1040:606::220/123\",\r\n + \ \"2603:1040:606:1::500/120\",\r\n \"2603:1040:606:402::170/125\",\r\n + \ \"2603:1040:806::220/123\",\r\n \"2603:1040:806:1::500/120\",\r\n + \ \"2603:1040:806:402::170/125\",\r\n \"2603:1040:904::700/120\",\r\n + \ \"2603:1040:904:1::220/123\",\r\n \"2603:1040:904:402::170/125\",\r\n + \ \"2603:1040:904:802::150/125\",\r\n \"2603:1040:904:c02::150/125\",\r\n + \ \"2603:1040:a06:1::220/123\",\r\n \"2603:1040:a06:2::600/120\",\r\n + \ \"2603:1040:a06:402::170/125\",\r\n \"2603:1040:a06:802::150/125\",\r\n + \ \"2603:1040:a06:c02::150/125\",\r\n \"2603:1040:b04::220/123\",\r\n + \ \"2603:1040:b04:1::500/120\",\r\n \"2603:1040:b04:402::170/125\",\r\n + \ \"2603:1040:c06::220/123\",\r\n \"2603:1040:c06:1::500/120\",\r\n + \ \"2603:1040:c06:402::170/125\",\r\n \"2603:1040:d04::220/123\",\r\n + \ \"2603:1040:d04:2::400/120\",\r\n \"2603:1040:d04:800::e0/124\",\r\n + \ \"2603:1040:d04:800::f0/125\",\r\n \"2603:1040:d04:800::358/125\",\r\n + \ \"2603:1040:d04:800::3c0/125\",\r\n \"2603:1040:d04:800::3e8/125\",\r\n + \ \"2603:1040:e05::400/120\",\r\n \"2603:1040:f05:1::220/123\",\r\n + \ \"2603:1040:f05:2::300/120\",\r\n \"2603:1040:f05:402::170/125\",\r\n + \ \"2603:1040:f05:802::150/125\",\r\n \"2603:1040:f05:c02::150/125\",\r\n + \ \"2603:1040:1002:1::300/121\",\r\n \"2603:1040:1104:1::700/120\",\r\n + \ \"2603:1040:1104:400::170/125\",\r\n \"2603:1050:6::700/120\",\r\n + \ \"2603:1050:6:1::220/123\",\r\n \"2603:1050:6:402::170/125\",\r\n + \ \"2603:1050:6:802::150/125\",\r\n \"2603:1050:6:c02::150/125\",\r\n + \ \"2603:1050:403::220/123\",\r\n \"2603:1050:403:1::500/120\",\r\n + \ \"2603:1050:403:400::148/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.AustraliaCentral\",\r\n \"id\": + \"ServiceBus.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"australiacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.36.106.224/27\",\r\n + \ \"20.53.50.128/25\",\r\n \"2603:1010:304::220/123\",\r\n + \ \"2603:1010:304:1::500/120\",\r\n \"2603:1010:304:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.AustraliaCentral2\",\r\n + \ \"id\": \"ServiceBus.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.36.114.128/27\",\r\n \"20.53.58.128/25\",\r\n + \ \"2603:1010:404::220/123\",\r\n \"2603:1010:404:1::500/120\",\r\n + \ \"2603:1010:404:402::170/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.AustraliaEast\",\r\n \"id\": \"ServiceBus.AustraliaEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.70.72.16/29\",\r\n \"13.70.114.0/26\",\r\n \"20.70.216.128/25\",\r\n + \ \"40.79.162.16/29\",\r\n \"40.79.166.128/26\",\r\n \"40.79.170.16/29\",\r\n + \ \"40.79.173.64/26\",\r\n \"52.187.192.243/32\",\r\n \"2603:1010:6::700/120\",\r\n + \ \"2603:1010:6:1::220/123\",\r\n \"2603:1010:6:402::170/125\",\r\n + \ \"2603:1010:6:802::150/125\",\r\n \"2603:1010:6:c02::150/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.AustraliaSoutheast\",\r\n + \ \"id\": \"ServiceBus.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.70.186.33/32\",\r\n \"13.77.50.16/28\",\r\n \"20.92.0.128/25\",\r\n + \ \"2603:1010:101::220/123\",\r\n \"2603:1010:101:1::500/120\",\r\n + \ \"2603:1010:101:402::170/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.BrazilSouth\",\r\n \"id\": \"ServiceBus.BrazilSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.195.137.128/26\",\r\n \"20.195.152.0/26\",\r\n + \ \"191.232.184.253/32\",\r\n \"191.233.203.16/29\",\r\n + \ \"191.234.146.128/29\",\r\n \"191.234.150.128/26\",\r\n + \ \"191.234.154.128/29\",\r\n \"191.234.157.144/28\",\r\n + \ \"191.238.73.128/25\",\r\n \"2603:1050:6::700/120\",\r\n + \ \"2603:1050:6:1::220/123\",\r\n \"2603:1050:6:402::170/125\",\r\n + \ \"2603:1050:6:802::150/125\",\r\n \"2603:1050:6:c02::150/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.BrazilSoutheast\",\r\n + \ \"id\": \"ServiceBus.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.195.151.128/25\",\r\n + \ \"23.97.120.37/32\",\r\n \"191.233.8.40/29\",\r\n \"191.237.224.64/26\",\r\n + \ \"2603:1050:403::220/123\",\r\n \"2603:1050:403:1::500/120\",\r\n + \ \"2603:1050:403:400::148/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.CanadaCentral\",\r\n \"id\": \"ServiceBus.CanadaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.71.170.32/29\",\r\n \"13.71.177.64/26\",\r\n + \ \"20.38.146.128/29\",\r\n \"20.48.199.128/25\",\r\n \"20.151.32.0/26\",\r\n + \ \"52.233.33.226/32\",\r\n \"52.246.154.128/29\",\r\n \"52.246.158.192/26\",\r\n + \ \"2603:1030:f05::700/120\",\r\n \"2603:1030:f05:1::220/123\",\r\n + \ \"2603:1030:f05:402::170/125\",\r\n \"2603:1030:f05:802::150/125\",\r\n + \ \"2603:1030:f05:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.CanadaEast\",\r\n \"id\": \"ServiceBus.CanadaEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"40.69.106.16/28\",\r\n \"52.139.110.0/25\",\r\n + \ \"52.242.36.0/32\",\r\n \"2603:1030:1005::220/123\",\r\n + \ \"2603:1030:1005:1::500/120\",\r\n \"2603:1030:1005:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.CentralIndia\",\r\n + \ \"id\": \"ServiceBus.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.43.126.0/26\",\r\n + \ \"20.192.47.192/26\",\r\n \"20.192.98.128/29\",\r\n \"20.192.101.192/26\",\r\n + \ \"40.80.50.128/29\",\r\n \"40.80.53.16/28\",\r\n \"52.172.220.188/32\",\r\n + \ \"104.211.81.16/29\",\r\n \"2603:1040:a06:1::220/123\",\r\n + \ \"2603:1040:a06:2::600/120\",\r\n \"2603:1040:a06:402::170/125\",\r\n + \ \"2603:1040:a06:802::150/125\",\r\n \"2603:1040:a06:c02::150/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.CentralUS\",\r\n + \ \"id\": \"ServiceBus.CentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"13.89.170.192/29\",\r\n + \ \"13.89.178.128/26\",\r\n \"20.40.231.128/25\",\r\n \"20.44.13.0/26\",\r\n + \ \"40.86.91.130/32\",\r\n \"52.182.138.192/29\",\r\n \"52.182.143.0/26\",\r\n + \ \"104.208.16.64/29\",\r\n \"2603:1030:10:1::220/123\",\r\n + \ \"2603:1030:10:402::170/125\",\r\n \"2603:1030:10:802::150/125\",\r\n + \ \"2603:1030:10:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.CentralUSEUAP\",\r\n \"id\": \"ServiceBus.CentralUSEUAP\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.45.240.0/26\",\r\n \"20.45.241.64/26\",\r\n \"40.78.202.16/28\",\r\n + \ \"52.180.178.204/32\",\r\n \"168.61.142.56/29\",\r\n \"2603:1030:f:1::220/123\",\r\n + \ \"2603:1030:f:3::240/122\",\r\n \"2603:1030:f:3::300/120\",\r\n + \ \"2603:1030:f:400::970/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.EastAsia\",\r\n \"id\": \"ServiceBus.EastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.75.34.128/28\",\r\n \"20.195.75.128/25\",\r\n + \ \"20.205.74.80/29\",\r\n \"20.205.75.64/28\",\r\n \"20.205.82.80/29\",\r\n + \ \"20.205.83.64/28\",\r\n \"104.214.165.72/29\",\r\n \"207.46.138.15/32\",\r\n + \ \"2603:1040:207::220/123\",\r\n \"2603:1040:207:2::80/121\",\r\n + \ \"2603:1040:207:2::500/120\",\r\n \"2603:1040:207:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.EastUS\",\r\n + \ \"id\": \"ServiceBus.EastUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.42.65.0/26\",\r\n + \ \"20.42.68.0/26\",\r\n \"20.42.72.192/26\",\r\n \"20.42.73.64/26\",\r\n + \ \"20.88.153.64/26\",\r\n \"40.71.10.192/29\",\r\n \"40.78.226.192/29\",\r\n + \ \"40.79.154.88/29\",\r\n \"40.114.86.33/32\",\r\n \"52.168.29.86/32\",\r\n + \ \"52.168.112.128/26\",\r\n \"52.168.116.192/26\",\r\n \"2603:1030:210:1::220/123\",\r\n + \ \"2603:1030:210:402::170/125\",\r\n \"2603:1030:210:802::150/125\",\r\n + \ \"2603:1030:210:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.EastUS2\",\r\n \"id\": \"ServiceBus.EastUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.68.110.36/32\",\r\n \"20.36.144.0/26\",\r\n \"20.62.63.0/25\",\r\n + \ \"40.70.146.64/29\",\r\n \"40.70.151.128/26\",\r\n \"52.167.106.64/29\",\r\n + \ \"52.167.109.128/26\",\r\n \"104.208.144.64/29\",\r\n \"2603:1030:40c:1::220/123\",\r\n + \ \"2603:1030:40c:402::170/125\",\r\n \"2603:1030:40c:802::150/125\",\r\n + \ \"2603:1030:40c:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.EastUS2EUAP\",\r\n \"id\": \"ServiceBus.EastUS2EUAP\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.47.216.0/26\",\r\n \"20.51.22.192/26\",\r\n \"20.51.23.192/26\",\r\n + \ \"40.74.146.32/29\",\r\n \"40.74.150.192/26\",\r\n \"40.75.34.16/29\",\r\n + \ \"40.89.121.192/26\",\r\n \"52.138.71.95/32\",\r\n \"52.138.90.16/29\",\r\n + \ \"2603:1030:40b:1::220/123\",\r\n \"2603:1030:40b:2::480/122\",\r\n + \ \"2603:1030:40b:2::500/120\",\r\n \"2603:1030:40b:400::970/125\",\r\n + \ \"2603:1030:40b:800::150/125\",\r\n \"2603:1030:40b:c00::150/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.FranceCentral\",\r\n + \ \"id\": \"ServiceBus.FranceCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"40.79.130.32/29\",\r\n + \ \"40.79.138.16/29\",\r\n \"40.79.141.192/26\",\r\n \"40.79.146.16/29\",\r\n + \ \"40.79.149.0/26\",\r\n \"51.11.192.64/26\",\r\n \"51.138.213.128/25\",\r\n + \ \"2603:1020:805::700/120\",\r\n \"2603:1020:805:1::220/123\",\r\n + \ \"2603:1020:805:402::170/125\",\r\n \"2603:1020:805:802::150/125\",\r\n + \ \"2603:1020:805:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.FranceSouth\",\r\n \"id\": \"ServiceBus.FranceSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"40.79.178.16/28\",\r\n \"52.136.187.128/25\",\r\n + \ \"2603:1020:905::220/123\",\r\n \"2603:1020:905:1::500/120\",\r\n + \ \"2603:1020:905:402::170/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.GermanyNorth\",\r\n \"id\": \"ServiceBus.GermanyNorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"51.116.58.8/29\",\r\n \"51.116.72.128/25\",\r\n + \ \"2603:1020:d04::220/123\",\r\n \"2603:1020:d04:1::500/120\",\r\n + \ \"2603:1020:d04:402::170/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.GermanyWestCentral\",\r\n \"id\": + \"ServiceBus.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.52.64.64/26\",\r\n + \ \"20.52.91.128/25\",\r\n \"51.116.154.72/29\",\r\n \"51.116.242.128/29\",\r\n + \ \"51.116.246.128/26\",\r\n \"51.116.250.128/29\",\r\n \"51.116.253.192/26\",\r\n + \ \"2603:1020:c04::700/120\",\r\n \"2603:1020:c04:1::220/123\",\r\n + \ \"2603:1020:c04:402::170/125\",\r\n \"2603:1020:c04:802::150/125\",\r\n + \ \"2603:1020:c04:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.JapanEast\",\r\n \"id\": \"ServiceBus.JapanEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.78.94.187/32\",\r\n \"13.78.106.80/29\",\r\n + \ \"20.89.0.0/26\",\r\n \"20.89.9.128/25\",\r\n \"20.194.128.128/26\",\r\n + \ \"40.79.186.64/27\",\r\n \"40.79.194.80/29\",\r\n \"2603:1040:407::700/120\",\r\n + \ \"2603:1040:407:1::220/123\",\r\n \"2603:1040:407:402::170/125\",\r\n + \ \"2603:1040:407:802::150/125\",\r\n \"2603:1040:407:c02::150/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.JapanWest\",\r\n + \ \"id\": \"ServiceBus.JapanWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.189.230.128/25\",\r\n + \ \"40.74.100.32/28\",\r\n \"40.74.122.78/32\",\r\n \"2603:1040:606::220/123\",\r\n + \ \"2603:1040:606:1::500/120\",\r\n \"2603:1040:606:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.JioIndiaCentral\",\r\n + \ \"id\": \"ServiceBus.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.192.32.240/28\",\r\n \"20.192.55.64/26\",\r\n + \ \"20.192.55.128/26\",\r\n \"20.192.225.56/29\",\r\n \"20.192.234.8/29\",\r\n + \ \"2603:1040:1104:1::700/120\",\r\n \"2603:1040:1104:400::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.JioIndiaWest\",\r\n + \ \"id\": \"ServiceBus.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.192.160.40/29\",\r\n + \ \"20.193.199.0/25\",\r\n \"20.193.204.104/29\",\r\n \"20.193.204.112/28\",\r\n + \ \"2603:1040:d04::220/123\",\r\n \"2603:1040:d04:2::400/120\",\r\n + \ \"2603:1040:d04:800::e0/124\",\r\n \"2603:1040:d04:800::f0/125\",\r\n + \ \"2603:1040:d04:800::358/125\",\r\n \"2603:1040:d04:800::3c0/125\",\r\n + \ \"2603:1040:d04:800::3e8/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.KoreaCentral\",\r\n \"id\": \"ServiceBus.KoreaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"5\",\r\n \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.44.26.128/29\",\r\n \"20.44.31.64/26\",\r\n \"20.194.67.208/29\",\r\n + \ \"20.194.68.128/28\",\r\n \"20.200.192.128/25\",\r\n \"52.231.18.32/29\",\r\n + \ \"52.231.23.128/26\",\r\n \"2603:1040:f05:1::220/123\",\r\n + \ \"2603:1040:f05:2::300/120\",\r\n \"2603:1040:f05:402::170/125\",\r\n + \ \"2603:1040:f05:802::150/125\",\r\n \"2603:1040:f05:c02::150/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.KoreaSouth\",\r\n + \ \"id\": \"ServiceBus.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"52.147.116.0/25\",\r\n + \ \"52.231.146.64/28\",\r\n \"2603:1040:e05::400/120\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.NorthCentralUS\",\r\n + \ \"id\": \"ServiceBus.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.51.1.128/25\",\r\n \"52.162.106.128/28\",\r\n + \ \"65.52.219.186/32\",\r\n \"2603:1030:608::220/123\",\r\n + \ \"2603:1030:608:1::500/120\",\r\n \"2603:1030:608:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.NorthEurope\",\r\n + \ \"id\": \"ServiceBus.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"13.69.227.64/29\",\r\n + \ \"13.69.233.192/26\",\r\n \"13.74.107.64/29\",\r\n \"13.74.142.88/32\",\r\n + \ \"20.50.72.0/26\",\r\n \"20.50.80.0/26\",\r\n \"20.82.244.128/25\",\r\n + \ \"52.138.226.64/29\",\r\n \"191.235.170.182/32\",\r\n \"2603:1020:5::700/120\",\r\n + \ \"2603:1020:5:1::220/123\",\r\n \"2603:1020:5:402::170/125\",\r\n + \ \"2603:1020:5:802::150/125\",\r\n \"2603:1020:5:c02::150/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.NorwayEast\",\r\n + \ \"id\": \"ServiceBus.NorwayEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"6\",\r\n + \ \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"51.13.0.128/26\",\r\n + \ \"51.120.98.16/29\",\r\n \"51.120.106.128/29\",\r\n \"51.120.109.208/28\",\r\n + \ \"51.120.210.128/29\",\r\n \"51.120.213.48/28\",\r\n \"51.120.237.64/26\",\r\n + \ \"2603:1020:e04:1::220/123\",\r\n \"2603:1020:e04:3::500/120\",\r\n + \ \"2603:1020:e04:402::170/125\",\r\n \"2603:1020:e04:802::150/125\",\r\n + \ \"2603:1020:e04:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.NorwayWest\",\r\n \"id\": \"ServiceBus.NorwayWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"51.13.141.0/25\",\r\n \"51.120.218.8/29\",\r\n \"2603:1020:f04::220/123\",\r\n + \ \"2603:1020:f04:1::500/120\",\r\n \"2603:1020:f04:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SouthAfricaNorth\",\r\n + \ \"id\": \"ServiceBus.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"102.37.72.0/26\",\r\n \"102.37.163.128/25\",\r\n + \ \"102.133.122.128/29\",\r\n \"102.133.126.192/26\",\r\n + \ \"102.133.154.8/29\",\r\n \"102.133.250.128/29\",\r\n \"102.133.253.192/26\",\r\n + \ \"2603:1000:104:1::220/123\",\r\n \"2603:1000:104:2::400/120\",\r\n + \ \"2603:1000:104:402::170/125\",\r\n \"2603:1000:104:802::150/125\",\r\n + \ \"2603:1000:104:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.SouthAfricaWest\",\r\n \"id\": + \"ServiceBus.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"southafricawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"102.37.64.192/26\",\r\n + \ \"102.37.84.0/25\",\r\n \"102.133.26.8/29\",\r\n \"2603:1000:4::220/123\",\r\n + \ \"2603:1000:4:1::500/120\",\r\n \"2603:1000:4:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SouthCentralUS\",\r\n + \ \"id\": \"ServiceBus.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.85.81.218/32\",\r\n \"20.45.122.128/29\",\r\n + \ \"20.45.126.128/26\",\r\n \"20.49.91.224/29\",\r\n \"20.49.91.240/28\",\r\n + \ \"20.49.95.64/26\",\r\n \"20.65.135.128/25\",\r\n \"40.124.65.0/26\",\r\n + \ \"104.214.18.160/29\",\r\n \"2603:1030:807::700/120\",\r\n + \ \"2603:1030:807:1::220/123\",\r\n \"2603:1030:807:402::170/125\",\r\n + \ \"2603:1030:807:802::150/125\",\r\n \"2603:1030:807:c02::150/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SouthCentralUSSTG\",\r\n + \ \"id\": \"ServiceBus.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.44.2.8/29\",\r\n + \ \"20.45.117.192/26\",\r\n \"2603:1030:302::100/120\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SoutheastAsia\",\r\n + \ \"id\": \"ServiceBus.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"13.67.8.96/29\",\r\n + \ \"13.67.20.0/26\",\r\n \"13.76.141.36/32\",\r\n \"20.195.82.0/25\",\r\n + \ \"23.98.82.96/29\",\r\n \"23.98.87.128/26\",\r\n \"23.98.112.128/26\",\r\n + \ \"40.78.234.32/29\",\r\n \"2603:1040:5:1::220/123\",\r\n + \ \"2603:1040:5:402::170/125\",\r\n \"2603:1040:5:802::150/125\",\r\n + \ \"2603:1040:5:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.SouthIndia\",\r\n \"id\": \"ServiceBus.SouthIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.71.114.157/32\",\r\n \"40.78.194.16/28\",\r\n + \ \"52.172.118.128/25\",\r\n \"2603:1040:c06::220/123\",\r\n + \ \"2603:1040:c06:1::500/120\",\r\n \"2603:1040:c06:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.SwedenCentral\",\r\n + \ \"id\": \"ServiceBus.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"51.12.29.128/25\",\r\n + \ \"51.12.98.8/29\",\r\n \"51.12.101.224/28\",\r\n \"51.12.226.128/29\",\r\n + \ \"51.12.229.80/28\",\r\n \"51.12.234.128/29\",\r\n \"51.12.237.80/28\",\r\n + \ \"2603:1020:1004::220/123\",\r\n \"2603:1020:1004:2::300/120\",\r\n + \ \"2603:1020:1004:800::e0/124\",\r\n \"2603:1020:1004:800::f0/125\",\r\n + \ \"2603:1020:1004:800::358/125\",\r\n \"2603:1020:1004:800::3c0/124\",\r\n + \ \"2603:1020:1004:800::3e8/125\",\r\n \"2603:1020:1004:c02::180/123\",\r\n + \ \"2603:1020:1004:c02::1a0/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.SwitzerlandNorth\",\r\n \"id\": + \"ServiceBus.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.208.18.80/29\",\r\n + \ \"20.208.18.96/28\",\r\n \"51.103.202.80/29\",\r\n \"51.103.202.96/28\",\r\n + \ \"51.107.58.8/29\",\r\n \"51.107.128.192/26\",\r\n \"51.107.244.128/25\",\r\n + \ \"2603:1020:a04::700/120\",\r\n \"2603:1020:a04:1::220/123\",\r\n + \ \"2603:1020:a04:402::170/125\",\r\n \"2603:1020:a04:802::150/125\",\r\n + \ \"2603:1020:a04:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.SwitzerlandWest\",\r\n \"id\": + \"ServiceBus.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"51.107.154.8/29\",\r\n + \ \"51.107.252.128/25\",\r\n \"2603:1020:b04::220/123\",\r\n + \ \"2603:1020:b04:1::500/120\",\r\n \"2603:1020:b04:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.UAECentral\",\r\n + \ \"id\": \"ServiceBus.UAECentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.37.74.32/27\",\r\n + \ \"20.45.93.0/25\",\r\n \"2603:1040:b04::220/123\",\r\n + \ \"2603:1040:b04:1::500/120\",\r\n \"2603:1040:b04:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.UAENorth\",\r\n + \ \"id\": \"ServiceBus.UAENorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"40.120.74.24/29\",\r\n + \ \"40.120.77.192/26\",\r\n \"40.120.85.0/25\",\r\n \"65.52.250.64/27\",\r\n + \ \"2603:1040:904::700/120\",\r\n \"2603:1040:904:1::220/123\",\r\n + \ \"2603:1040:904:402::170/125\",\r\n \"2603:1040:904:802::150/125\",\r\n + \ \"2603:1040:904:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.UKSouth\",\r\n \"id\": \"ServiceBus.UKSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.90.128.192/26\",\r\n \"51.105.66.128/29\",\r\n + \ \"51.105.70.192/26\",\r\n \"51.105.74.128/29\",\r\n \"51.132.192.128/26\",\r\n + \ \"51.140.43.12/32\",\r\n \"51.140.146.48/29\",\r\n \"51.140.149.128/26\",\r\n + \ \"2603:1020:705::700/120\",\r\n \"2603:1020:705:1::220/123\",\r\n + \ \"2603:1020:705:402::170/125\",\r\n \"2603:1020:705:802::150/125\",\r\n + \ \"2603:1020:705:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.UKWest\",\r\n \"id\": \"ServiceBus.UKWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.58.70.0/25\",\r\n \"51.140.210.64/28\",\r\n \"51.141.1.129/32\",\r\n + \ \"2603:1020:605::220/123\",\r\n \"2603:1020:605:1::500/120\",\r\n + \ \"2603:1020:605:402::170/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.WestCentralUS\",\r\n \"id\": \"ServiceBus.WestCentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.71.194.96/28\",\r\n \"20.69.2.128/25\",\r\n \"52.161.17.198/32\",\r\n + \ \"2603:1030:b04::220/123\",\r\n \"2603:1030:b04:1::500/120\",\r\n + \ \"2603:1030:b04:402::170/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.WestEurope\",\r\n \"id\": \"ServiceBus.WestEurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"13.69.64.64/29\",\r\n \"13.69.106.64/29\",\r\n \"13.69.111.64/26\",\r\n + \ \"20.50.201.0/26\",\r\n \"20.86.92.0/25\",\r\n \"40.68.127.68/32\",\r\n + \ \"52.178.17.64/26\",\r\n \"52.232.119.191/32\",\r\n \"52.236.186.64/29\",\r\n + \ \"2603:1020:206:1::220/123\",\r\n \"2603:1020:206:4::/120\",\r\n + \ \"2603:1020:206:402::170/125\",\r\n \"2603:1020:206:802::150/125\",\r\n + \ \"2603:1020:206:c02::150/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"ServiceBus.WestIndia\",\r\n \"id\": \"ServiceBus.WestIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\"\r\n + \ ],\r\n \"systemService\": \"AzureServiceBus\",\r\n \"addressPrefixes\": + [\r\n \"20.192.82.128/25\",\r\n \"104.211.146.16/28\",\r\n + \ \"104.211.190.88/32\",\r\n \"2603:1040:806::220/123\",\r\n + \ \"2603:1040:806:1::500/120\",\r\n \"2603:1040:806:402::170/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.WestUS\",\r\n + \ \"id\": \"ServiceBus.WestUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"13.88.10.93/32\",\r\n + \ \"20.66.6.128/25\",\r\n \"40.112.242.128/28\",\r\n \"104.40.15.128/32\",\r\n + \ \"104.45.239.115/32\",\r\n \"2603:1030:a07::220/123\",\r\n + \ \"2603:1030:a07:1::500/120\",\r\n \"2603:1030:a07:402::8f0/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.WestUS2\",\r\n + \ \"id\": \"ServiceBus.WestUS2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"13.66.138.80/29\",\r\n + \ \"13.66.147.192/26\",\r\n \"20.51.15.0/25\",\r\n \"40.64.113.0/26\",\r\n + \ \"40.65.108.146/32\",\r\n \"40.78.242.144/29\",\r\n \"40.78.247.192/26\",\r\n + \ \"40.78.250.80/29\",\r\n \"2603:1030:c06:1::220/123\",\r\n + \ \"2603:1030:c06:2::500/120\",\r\n \"2603:1030:c06:400::970/125\",\r\n + \ \"2603:1030:c06:802::150/125\",\r\n \"2603:1030:c06:c02::150/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceBus.WestUS3\",\r\n + \ \"id\": \"ServiceBus.WestUS3\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\"\r\n ],\r\n \"systemService\": + \"AzureServiceBus\",\r\n \"addressPrefixes\": [\r\n \"20.150.129.0/25\",\r\n + \ \"20.150.160.216/29\",\r\n \"20.150.170.8/29\",\r\n \"20.150.175.0/26\",\r\n + \ \"20.150.178.128/29\",\r\n \"20.150.182.64/28\",\r\n \"20.150.186.128/29\",\r\n + \ \"20.150.189.48/28\",\r\n \"20.150.189.64/26\",\r\n \"2603:1030:504:1::220/123\",\r\n + \ \"2603:1030:504:2::300/120\",\r\n \"2603:1030:504:802::e0/124\",\r\n + \ \"2603:1030:504:802::f0/125\",\r\n \"2603:1030:504:802::358/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"ServiceFabric\",\r\n + \ \"id\": \"ServiceFabric\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"6\",\r\n \"region\": + \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n + \ \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"ServiceFabric\",\r\n \"addressPrefixes\": + [\r\n \"13.66.140.152/29\",\r\n \"13.66.167.194/32\",\r\n + \ \"13.66.226.151/32\",\r\n \"13.67.9.136/29\",\r\n \"13.69.64.232/29\",\r\n + \ \"13.69.109.136/30\",\r\n \"13.69.227.232/29\",\r\n \"13.70.72.216/29\",\r\n + \ \"13.70.78.172/30\",\r\n \"13.71.170.224/29\",\r\n \"13.71.170.248/29\",\r\n + \ \"13.71.195.48/29\",\r\n \"13.74.80.74/32\",\r\n \"13.74.111.144/30\",\r\n + \ \"13.75.36.80/29\",\r\n \"13.75.41.166/32\",\r\n \"13.75.42.35/32\",\r\n + \ \"13.77.52.0/29\",\r\n \"13.78.108.24/29\",\r\n \"13.78.147.125/32\",\r\n + \ \"13.80.117.236/32\",\r\n \"13.87.32.204/32\",\r\n \"13.87.56.240/29\",\r\n + \ \"13.87.122.240/29\",\r\n \"13.89.171.104/29\",\r\n \"13.91.7.211/32\",\r\n + \ \"13.91.252.58/32\",\r\n \"13.92.124.124/32\",\r\n \"20.21.42.76/30\",\r\n + \ \"20.21.66.72/30\",\r\n \"20.21.74.72/30\",\r\n \"20.36.40.70/32\",\r\n + \ \"20.36.72.79/32\",\r\n \"20.36.107.16/29\",\r\n \"20.36.114.192/29\",\r\n + \ \"20.37.74.80/29\",\r\n \"20.38.149.192/30\",\r\n \"20.42.64.40/30\",\r\n + \ \"20.42.72.132/30\",\r\n \"20.44.3.24/29\",\r\n \"20.44.10.124/30\",\r\n + \ \"20.44.19.0/30\",\r\n \"20.44.29.52/30\",\r\n \"20.45.79.240/32\",\r\n + \ \"20.45.123.244/30\",\r\n \"20.49.82.4/30\",\r\n \"20.49.90.4/30\",\r\n + \ \"20.72.26.4/30\",\r\n \"20.150.171.72/29\",\r\n \"20.150.181.160/30\",\r\n + \ \"20.150.189.28/30\",\r\n \"20.150.225.4/30\",\r\n \"20.184.2.84/32\",\r\n + \ \"20.192.32.224/30\",\r\n \"20.192.101.28/30\",\r\n \"20.192.235.0/29\",\r\n + \ \"20.193.202.24/29\",\r\n \"20.193.204.100/30\",\r\n \"20.194.66.4/30\",\r\n + \ \"20.205.74.72/30\",\r\n \"20.205.82.72/30\",\r\n \"20.208.18.72/30\",\r\n + \ \"23.96.200.228/32\",\r\n \"23.96.210.6/32\",\r\n \"23.96.214.100/32\",\r\n + \ \"23.98.86.60/30\",\r\n \"23.99.11.219/32\",\r\n \"23.100.199.230/32\",\r\n + \ \"40.67.59.72/29\",\r\n \"40.69.107.0/29\",\r\n \"40.69.166.6/32\",\r\n + \ \"40.70.146.232/29\",\r\n \"40.71.11.104/29\",\r\n \"40.74.100.240/29\",\r\n + \ \"40.74.146.56/29\",\r\n \"40.75.35.220/30\",\r\n \"40.76.203.148/32\",\r\n + \ \"40.76.205.181/32\",\r\n \"40.78.195.0/29\",\r\n \"40.78.202.120/29\",\r\n + \ \"40.78.238.60/30\",\r\n \"40.78.245.192/30\",\r\n \"40.78.253.64/30\",\r\n + \ \"40.79.114.102/32\",\r\n \"40.79.130.232/29\",\r\n \"40.79.139.192/30\",\r\n + \ \"40.79.148.80/30\",\r\n \"40.79.165.80/29\",\r\n \"40.79.171.228/30\",\r\n + \ \"40.79.173.0/30\",\r\n \"40.79.179.0/29\",\r\n \"40.79.189.60/30\",\r\n + \ \"40.79.197.36/30\",\r\n \"40.80.53.4/30\",\r\n \"40.84.62.189/32\",\r\n + \ \"40.84.133.64/32\",\r\n \"40.85.224.118/32\",\r\n \"40.86.230.174/32\",\r\n + \ \"40.89.168.15/32\",\r\n \"40.112.243.176/29\",\r\n \"40.113.23.157/32\",\r\n + \ \"40.113.88.37/32\",\r\n \"40.115.64.123/32\",\r\n \"40.115.113.228/32\",\r\n + \ \"40.120.74.4/30\",\r\n \"40.123.204.26/32\",\r\n \"51.12.99.64/29\",\r\n + \ \"51.12.101.168/30\",\r\n \"51.12.203.64/29\",\r\n \"51.12.204.240/30\",\r\n + \ \"51.12.229.28/30\",\r\n \"51.12.237.28/30\",\r\n \"51.103.202.72/30\",\r\n + \ \"51.105.69.84/30\",\r\n \"51.105.77.52/30\",\r\n \"51.107.59.40/29\",\r\n + \ \"51.107.76.20/32\",\r\n \"51.107.155.40/29\",\r\n \"51.107.239.250/32\",\r\n + \ \"51.116.59.40/29\",\r\n \"51.116.155.104/29\",\r\n \"51.116.208.26/32\",\r\n + \ \"51.116.232.27/32\",\r\n \"51.116.245.160/30\",\r\n \"51.116.253.128/30\",\r\n + \ \"51.120.68.23/32\",\r\n \"51.120.98.240/29\",\r\n \"51.120.109.28/30\",\r\n + \ \"51.120.164.23/32\",\r\n \"51.120.213.28/30\",\r\n \"51.120.219.72/29\",\r\n + \ \"51.140.148.24/29\",\r\n \"51.140.184.27/32\",\r\n \"51.140.211.16/29\",\r\n + \ \"51.141.8.30/32\",\r\n \"52.136.136.27/32\",\r\n \"52.138.70.82/32\",\r\n + \ \"52.138.92.168/30\",\r\n \"52.138.143.55/32\",\r\n \"52.138.229.68/30\",\r\n + \ \"52.143.136.15/32\",\r\n \"52.143.184.15/32\",\r\n \"52.151.38.144/32\",\r\n + \ \"52.158.236.247/32\",\r\n \"52.162.107.176/29\",\r\n \"52.163.90.165/32\",\r\n + \ \"52.163.94.113/32\",\r\n \"52.165.37.188/32\",\r\n \"52.167.0.27/32\",\r\n + \ \"52.167.109.68/30\",\r\n \"52.167.227.220/32\",\r\n \"52.174.163.204/32\",\r\n + \ \"52.174.164.254/32\",\r\n \"52.178.30.193/32\",\r\n \"52.180.176.84/32\",\r\n + \ \"52.182.141.56/30\",\r\n \"52.182.172.232/32\",\r\n \"52.225.184.94/32\",\r\n + \ \"52.225.185.159/32\",\r\n \"52.230.8.61/32\",\r\n \"52.231.18.232/29\",\r\n + \ \"52.231.32.81/32\",\r\n \"52.231.147.16/29\",\r\n \"52.231.200.124/32\",\r\n + \ \"52.236.161.75/32\",\r\n \"52.236.189.76/30\",\r\n \"52.246.157.8/30\",\r\n + \ \"65.52.250.224/29\",\r\n \"102.37.48.12/32\",\r\n \"102.133.27.24/29\",\r\n + \ \"102.133.72.31/32\",\r\n \"102.133.126.144/30\",\r\n \"102.133.155.24/29\",\r\n + \ \"102.133.160.28/32\",\r\n \"102.133.235.169/32\",\r\n + \ \"102.133.251.216/30\",\r\n \"104.41.9.53/32\",\r\n \"104.41.187.29/32\",\r\n + \ \"104.42.181.121/32\",\r\n \"104.43.213.84/32\",\r\n \"104.45.19.250/32\",\r\n + \ \"104.46.225.57/32\",\r\n \"104.210.107.69/32\",\r\n \"104.211.81.216/29\",\r\n + \ \"104.211.103.201/32\",\r\n \"104.211.146.240/29\",\r\n + \ \"104.211.164.163/32\",\r\n \"104.211.228.68/32\",\r\n + \ \"104.214.19.72/29\",\r\n \"104.214.165.68/30\",\r\n \"104.215.78.146/32\",\r\n + \ \"137.116.252.9/32\",\r\n \"137.135.33.49/32\",\r\n \"168.61.142.48/30\",\r\n + \ \"191.233.50.24/29\",\r\n \"191.233.203.216/29\",\r\n \"191.234.149.32/30\",\r\n + \ \"191.234.157.128/30\",\r\n \"207.46.234.62/32\",\r\n \"2603:1000:4:402::98/125\",\r\n + \ \"2603:1000:104:402::98/125\",\r\n \"2603:1000:104:802::98/125\",\r\n + \ \"2603:1000:104:c02::98/125\",\r\n \"2603:1010:6:402::98/125\",\r\n + \ \"2603:1010:6:802::98/125\",\r\n \"2603:1010:6:c02::98/125\",\r\n + \ \"2603:1010:101:402::98/125\",\r\n \"2603:1010:304:402::98/125\",\r\n + \ \"2603:1010:404:402::98/125\",\r\n \"2603:1020:5:402::98/125\",\r\n + \ \"2603:1020:5:802::98/125\",\r\n \"2603:1020:5:c02::98/125\",\r\n + \ \"2603:1020:206:402::98/125\",\r\n \"2603:1020:206:802::98/125\",\r\n + \ \"2603:1020:206:c02::98/125\",\r\n \"2603:1020:305:402::98/125\",\r\n + \ \"2603:1020:405:402::98/125\",\r\n \"2603:1020:605:402::98/125\",\r\n + \ \"2603:1020:705:402::98/125\",\r\n \"2603:1020:705:802::98/125\",\r\n + \ \"2603:1020:705:c02::98/125\",\r\n \"2603:1020:805:402::98/125\",\r\n + \ \"2603:1020:805:802::98/125\",\r\n \"2603:1020:805:c02::98/125\",\r\n + \ \"2603:1020:905:402::98/125\",\r\n \"2603:1020:a04:402::98/125\",\r\n + \ \"2603:1020:a04:802::98/125\",\r\n \"2603:1020:a04:c02::98/125\",\r\n + \ \"2603:1020:b04:402::98/125\",\r\n \"2603:1020:c04:402::98/125\",\r\n + \ \"2603:1020:c04:802::98/125\",\r\n \"2603:1020:c04:c02::98/125\",\r\n + \ \"2603:1020:d04:402::98/125\",\r\n \"2603:1020:e04:402::98/125\",\r\n + \ \"2603:1020:e04:802::98/125\",\r\n \"2603:1020:e04:c02::98/125\",\r\n + \ \"2603:1020:f04:402::98/125\",\r\n \"2603:1020:1004:400::98/125\",\r\n + \ \"2603:1020:1004:800::158/125\",\r\n \"2603:1020:1004:800::350/125\",\r\n + \ \"2603:1020:1004:c02::1b8/125\",\r\n \"2603:1020:1104:400::98/125\",\r\n + \ \"2603:1030:f:400::898/125\",\r\n \"2603:1030:10:402::98/125\",\r\n + \ \"2603:1030:10:802::98/125\",\r\n \"2603:1030:10:c02::98/125\",\r\n + \ \"2603:1030:104:402::98/125\",\r\n \"2603:1030:104:402::3d8/125\",\r\n + \ \"2603:1030:104:802::60/125\",\r\n \"2603:1030:107:400::d0/125\",\r\n + \ \"2603:1030:210:402::98/125\",\r\n \"2603:1030:210:802::98/125\",\r\n + \ \"2603:1030:210:c02::98/125\",\r\n \"2603:1030:40b:400::898/125\",\r\n + \ \"2603:1030:40b:800::98/125\",\r\n \"2603:1030:40b:c00::98/125\",\r\n + \ \"2603:1030:40c:402::98/125\",\r\n \"2603:1030:40c:802::98/125\",\r\n + \ \"2603:1030:40c:c02::98/125\",\r\n \"2603:1030:504:402::98/125\",\r\n + \ \"2603:1030:504:802::c8/125\",\r\n \"2603:1030:504:802::158/125\",\r\n + \ \"2603:1030:504:802::350/125\",\r\n \"2603:1030:504:c02::408/125\",\r\n + \ \"2603:1030:608:402::98/125\",\r\n \"2603:1030:807:402::98/125\",\r\n + \ \"2603:1030:807:802::98/125\",\r\n \"2603:1030:807:c02::98/125\",\r\n + \ \"2603:1030:a07:402::98/125\",\r\n \"2603:1030:b04:402::98/125\",\r\n + \ \"2603:1030:c06:400::898/125\",\r\n \"2603:1030:c06:802::98/125\",\r\n + \ \"2603:1030:c06:c02::98/125\",\r\n \"2603:1030:f05:402::98/125\",\r\n + \ \"2603:1030:f05:802::98/125\",\r\n \"2603:1030:f05:c02::98/125\",\r\n + \ \"2603:1030:1005:402::98/125\",\r\n \"2603:1040:5:402::98/125\",\r\n + \ \"2603:1040:5:802::98/125\",\r\n \"2603:1040:5:c02::98/125\",\r\n + \ \"2603:1040:207:402::98/125\",\r\n \"2603:1040:207:800::50/125\",\r\n + \ \"2603:1040:207:c00::50/125\",\r\n \"2603:1040:407:402::98/125\",\r\n + \ \"2603:1040:407:802::98/125\",\r\n \"2603:1040:407:c02::98/125\",\r\n + \ \"2603:1040:606:402::98/125\",\r\n \"2603:1040:806:402::98/125\",\r\n + \ \"2603:1040:904:402::98/125\",\r\n \"2603:1040:904:802::98/125\",\r\n + \ \"2603:1040:904:c02::98/125\",\r\n \"2603:1040:a06:402::98/125\",\r\n + \ \"2603:1040:a06:802::98/125\",\r\n \"2603:1040:a06:c02::98/125\",\r\n + \ \"2603:1040:b04:402::98/125\",\r\n \"2603:1040:c06:402::98/125\",\r\n + \ \"2603:1040:d04:400::98/125\",\r\n \"2603:1040:d04:800::158/125\",\r\n + \ \"2603:1040:d04:800::350/125\",\r\n \"2603:1040:f05:402::98/125\",\r\n + \ \"2603:1040:f05:802::98/125\",\r\n \"2603:1040:f05:c02::98/125\",\r\n + \ \"2603:1040:1002:400::58/125\",\r\n \"2603:1040:1002:800::50/125\",\r\n + \ \"2603:1040:1002:c00::50/125\",\r\n \"2603:1040:1104:400::98/125\",\r\n + \ \"2603:1050:6:402::98/125\",\r\n \"2603:1050:6:802::98/125\",\r\n + \ \"2603:1050:6:c02::98/125\",\r\n \"2603:1050:403:400::140/125\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql\",\r\n \"id\": + \"Sql\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": + {\r\n \"changeNumber\": \"6\",\r\n \"region\": \"\",\r\n \"state\": + \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\",\r\n \"VSE\"\r\n ],\r\n + \ \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n + \ \"13.65.31.249/32\",\r\n \"13.65.39.207/32\",\r\n \"13.65.85.183/32\",\r\n + \ \"13.65.200.105/32\",\r\n \"13.65.209.243/32\",\r\n \"13.65.253.67/32\",\r\n + \ \"13.66.60.72/32\",\r\n \"13.66.60.111/32\",\r\n \"13.66.62.124/32\",\r\n + \ \"13.66.136.0/26\",\r\n \"13.66.136.192/29\",\r\n \"13.66.137.0/26\",\r\n + \ \"13.66.226.202/32\",\r\n \"13.66.229.222/32\",\r\n \"13.66.230.19/32\",\r\n + \ \"13.66.230.60/32\",\r\n \"13.66.230.64/32\",\r\n \"13.66.230.103/32\",\r\n + \ \"13.67.16.0/26\",\r\n \"13.67.16.192/29\",\r\n \"13.67.17.0/26\",\r\n + \ \"13.67.48.255/32\",\r\n \"13.67.56.134/32\",\r\n \"13.67.59.217/32\",\r\n + \ \"13.67.215.62/32\",\r\n \"13.68.22.44/32\",\r\n \"13.68.30.216/32\",\r\n + \ \"13.68.87.133/32\",\r\n \"13.69.104.0/26\",\r\n \"13.69.104.192/26\",\r\n + \ \"13.69.105.0/26\",\r\n \"13.69.105.192/26\",\r\n \"13.69.111.32/27\",\r\n + \ \"13.69.112.168/29\",\r\n \"13.69.116.64/27\",\r\n \"13.69.116.96/30\",\r\n + \ \"13.69.116.128/25\",\r\n \"13.69.224.0/26\",\r\n \"13.69.224.192/26\",\r\n + \ \"13.69.225.0/26\",\r\n \"13.69.225.192/26\",\r\n \"13.69.233.136/29\",\r\n + \ \"13.70.112.0/27\",\r\n \"13.70.112.32/29\",\r\n \"13.70.113.0/27\",\r\n + \ \"13.70.114.128/27\",\r\n \"13.70.148.251/32\",\r\n \"13.70.155.163/32\",\r\n + \ \"13.71.168.0/27\",\r\n \"13.71.168.32/29\",\r\n \"13.71.169.0/27\",\r\n + \ \"13.71.177.192/27\",\r\n \"13.71.192.0/27\",\r\n \"13.71.193.0/27\",\r\n + \ \"13.71.193.32/29\",\r\n \"13.73.109.251/32\",\r\n \"13.74.104.64/26\",\r\n + \ \"13.74.104.128/26\",\r\n \"13.74.105.0/26\",\r\n \"13.74.105.128/26\",\r\n + \ \"13.74.105.192/29\",\r\n \"13.75.32.0/26\",\r\n \"13.75.32.192/29\",\r\n + \ \"13.75.33.0/26\",\r\n \"13.75.33.192/29\",\r\n \"13.75.105.141/32\",\r\n + \ \"13.75.108.188/32\",\r\n \"13.75.149.87/32\",\r\n \"13.76.90.3/32\",\r\n + \ \"13.76.247.54/32\",\r\n \"13.77.7.78/32\",\r\n \"13.77.48.0/27\",\r\n + \ \"13.77.49.0/27\",\r\n \"13.77.49.32/29\",\r\n \"13.78.61.196/32\",\r\n + \ \"13.78.104.0/27\",\r\n \"13.78.104.32/29\",\r\n \"13.78.105.0/27\",\r\n + \ \"13.78.121.203/32\",\r\n \"13.78.144.57/32\",\r\n \"13.78.145.25/32\",\r\n + \ \"13.78.148.71/32\",\r\n \"13.78.151.189/32\",\r\n \"13.78.151.207/32\",\r\n + \ \"13.78.178.116/32\",\r\n \"13.78.178.151/32\",\r\n \"13.78.248.32/27\",\r\n + \ \"13.84.223.76/32\",\r\n \"13.85.65.48/32\",\r\n \"13.85.68.115/32\",\r\n + \ \"13.85.69.107/32\",\r\n \"13.86.216.0/25\",\r\n \"13.86.216.128/26\",\r\n + \ \"13.86.216.192/27\",\r\n \"13.86.217.0/25\",\r\n \"13.86.217.128/26\",\r\n + \ \"13.86.217.192/27\",\r\n \"13.86.217.224/29\",\r\n \"13.87.16.64/27\",\r\n + \ \"13.87.17.0/27\",\r\n \"13.87.33.234/32\",\r\n \"13.87.34.7/32\",\r\n + \ \"13.87.34.19/32\",\r\n \"13.87.38.138/32\",\r\n \"13.87.120.0/27\",\r\n + \ \"13.87.121.0/27\",\r\n \"13.88.14.200/32\",\r\n \"13.88.29.70/32\",\r\n + \ \"13.88.249.189/32\",\r\n \"13.88.254.42/32\",\r\n \"13.89.36.110/32\",\r\n + \ \"13.89.37.61/32\",\r\n \"13.89.57.50/32\",\r\n \"13.89.57.115/32\",\r\n + \ \"13.89.168.0/26\",\r\n \"13.89.168.192/29\",\r\n \"13.89.169.0/26\",\r\n + \ \"13.91.4.219/32\",\r\n \"13.91.6.136/32\",\r\n \"13.91.41.153/32\",\r\n + \ \"13.91.44.56/32\",\r\n \"13.91.46.83/32\",\r\n \"13.91.47.72/32\",\r\n + \ \"13.93.165.251/32\",\r\n \"13.93.237.158/32\",\r\n \"20.21.40.64/27\",\r\n + \ \"20.21.41.64/27\",\r\n \"20.21.43.248/29\",\r\n \"20.21.53.32/27\",\r\n + \ \"20.21.53.64/26\",\r\n \"20.21.64.64/27\",\r\n \"20.21.65.64/27\",\r\n + \ \"20.21.67.192/29\",\r\n \"20.21.72.64/27\",\r\n \"20.21.73.64/27\",\r\n + \ \"20.21.75.192/29\",\r\n \"20.36.104.0/27\",\r\n \"20.36.105.0/27\",\r\n + \ \"20.36.105.32/29\",\r\n \"20.36.112.0/27\",\r\n \"20.36.113.0/27\",\r\n + \ \"20.36.113.32/29\",\r\n \"20.36.144.128/27\",\r\n \"20.36.145.0/26\",\r\n + \ \"20.37.71.64/26\",\r\n \"20.37.71.128/26\",\r\n \"20.37.72.64/27\",\r\n + \ \"20.37.72.96/29\",\r\n \"20.37.73.64/27\",\r\n \"20.37.73.96/29\",\r\n + \ \"20.38.143.64/26\",\r\n \"20.38.143.128/26\",\r\n \"20.38.144.0/27\",\r\n + \ \"20.38.144.32/29\",\r\n \"20.38.145.0/27\",\r\n \"20.38.152.24/29\",\r\n + \ \"20.40.228.128/25\",\r\n \"20.42.65.64/29\",\r\n \"20.42.65.96/27\",\r\n + \ \"20.42.68.192/27\",\r\n \"20.42.69.0/25\",\r\n \"20.42.73.0/29\",\r\n + \ \"20.42.73.32/27\",\r\n \"20.42.74.192/27\",\r\n \"20.42.75.0/25\",\r\n + \ \"20.43.47.192/26\",\r\n \"20.44.0.0/27\",\r\n \"20.44.1.0/27\",\r\n + \ \"20.44.24.0/27\",\r\n \"20.44.24.32/29\",\r\n \"20.44.25.0/27\",\r\n + \ \"20.45.120.0/27\",\r\n \"20.45.121.0/27\",\r\n \"20.45.121.32/29\",\r\n + \ \"20.46.11.32/27\",\r\n \"20.46.11.64/27\",\r\n \"20.46.11.128/26\",\r\n + \ \"20.48.196.32/27\",\r\n \"20.48.196.64/27\",\r\n \"20.48.196.128/26\",\r\n + \ \"20.49.80.0/27\",\r\n \"20.49.80.32/29\",\r\n \"20.49.81.0/27\",\r\n + \ \"20.49.88.0/27\",\r\n \"20.49.88.32/29\",\r\n \"20.49.89.0/27\",\r\n + \ \"20.49.89.32/29\",\r\n \"20.49.119.32/27\",\r\n \"20.49.119.64/27\",\r\n + \ \"20.49.119.128/26\",\r\n \"20.50.73.32/27\",\r\n \"20.50.201.224/27\",\r\n + \ \"20.50.202.0/26\",\r\n \"20.51.9.128/25\",\r\n \"20.51.17.160/27\",\r\n + \ \"20.51.17.192/27\",\r\n \"20.51.20.0/26\",\r\n \"20.53.46.128/25\",\r\n + \ \"20.53.48.96/27\",\r\n \"20.53.48.128/27\",\r\n \"20.53.48.192/26\",\r\n + \ \"20.53.56.32/27\",\r\n \"20.53.56.64/27\",\r\n \"20.53.56.128/26\",\r\n + \ \"20.58.66.128/25\",\r\n \"20.58.68.56/30\",\r\n \"20.61.99.192/26\",\r\n + \ \"20.61.102.0/26\",\r\n \"20.62.58.128/25\",\r\n \"20.62.132.160/27\",\r\n + \ \"20.62.132.192/27\",\r\n \"20.62.133.0/26\",\r\n \"20.65.132.160/27\",\r\n + \ \"20.65.132.192/27\",\r\n \"20.65.133.0/26\",\r\n \"20.66.3.64/26\",\r\n + \ \"20.66.3.128/26\",\r\n \"20.69.0.32/27\",\r\n \"20.69.0.64/27\",\r\n + \ \"20.69.0.128/26\",\r\n \"20.72.21.224/27\",\r\n \"20.72.24.64/27\",\r\n + \ \"20.72.24.128/27\",\r\n \"20.72.25.128/27\",\r\n \"20.88.64.0/27\",\r\n + \ \"20.89.1.64/27\",\r\n \"20.150.168.0/27\",\r\n \"20.150.168.32/29\",\r\n + \ \"20.150.169.0/27\",\r\n \"20.150.176.0/27\",\r\n \"20.150.176.32/29\",\r\n + \ \"20.150.177.0/27\",\r\n \"20.150.184.0/27\",\r\n \"20.150.184.32/29\",\r\n + \ \"20.150.185.0/27\",\r\n \"20.150.241.128/25\",\r\n \"20.189.172.224/27\",\r\n + \ \"20.189.225.160/27\",\r\n \"20.189.225.192/27\",\r\n \"20.189.228.0/26\",\r\n + \ \"20.191.165.160/27\",\r\n \"20.191.165.192/27\",\r\n \"20.191.166.0/26\",\r\n + \ \"20.192.43.160/27\",\r\n \"20.192.43.192/27\",\r\n \"20.192.44.0/26\",\r\n + \ \"20.192.48.32/27\",\r\n \"20.192.48.64/27\",\r\n \"20.192.48.128/26\",\r\n + \ \"20.192.96.0/27\",\r\n \"20.192.96.32/29\",\r\n \"20.192.97.0/27\",\r\n + \ \"20.192.167.224/27\",\r\n \"20.192.232.0/27\",\r\n \"20.192.233.0/27\",\r\n + \ \"20.192.233.32/29\",\r\n \"20.193.192.0/27\",\r\n \"20.193.192.64/26\",\r\n + \ \"20.193.200.0/27\",\r\n \"20.193.200.32/29\",\r\n \"20.193.201.0/27\",\r\n + \ \"20.194.64.0/27\",\r\n \"20.194.64.32/29\",\r\n \"20.194.65.0/27\",\r\n + \ \"20.194.73.64/26\",\r\n \"20.194.73.128/26\",\r\n \"20.194.80.192/27\",\r\n + \ \"20.194.129.64/27\",\r\n \"20.195.65.32/27\",\r\n \"20.195.65.64/27\",\r\n + \ \"20.195.65.128/26\",\r\n \"20.195.72.32/27\",\r\n \"20.195.72.64/27\",\r\n + \ \"20.195.72.128/26\",\r\n \"20.195.146.0/26\",\r\n \"20.205.72.64/27\",\r\n + \ \"20.205.73.64/27\",\r\n \"20.205.77.176/29\",\r\n \"20.205.77.200/29\",\r\n + \ \"20.205.80.64/27\",\r\n \"20.205.81.64/27\",\r\n \"20.205.83.224/29\",\r\n + \ \"20.208.16.64/27\",\r\n \"20.208.17.64/27\",\r\n \"20.208.19.192/29\",\r\n + \ \"23.96.89.109/32\",\r\n \"23.96.106.191/32\",\r\n \"23.96.178.199/32\",\r\n + \ \"23.96.202.229/32\",\r\n \"23.96.204.249/32\",\r\n \"23.96.205.215/32\",\r\n + \ \"23.96.214.69/32\",\r\n \"23.96.243.243/32\",\r\n \"23.96.247.75/32\",\r\n + \ \"23.96.249.37/32\",\r\n \"23.96.250.178/32\",\r\n \"23.97.68.51/32\",\r\n + \ \"23.97.74.21/32\",\r\n \"23.97.78.163/32\",\r\n \"23.97.167.46/32\",\r\n + \ \"23.97.169.19/32\",\r\n \"23.97.219.82/32\",\r\n \"23.97.221.176/32\",\r\n + \ \"23.98.55.75/32\",\r\n \"23.98.80.0/26\",\r\n \"23.98.80.192/29\",\r\n + \ \"23.98.81.0/26\",\r\n \"23.98.162.75/32\",\r\n \"23.98.162.76/31\",\r\n + \ \"23.98.162.78/32\",\r\n \"23.98.170.75/32\",\r\n \"23.98.170.76/31\",\r\n + \ \"23.99.4.210/32\",\r\n \"23.99.4.248/32\",\r\n \"23.99.10.185/32\",\r\n + \ \"23.99.34.75/32\",\r\n \"23.99.34.76/31\",\r\n \"23.99.34.78/32\",\r\n + \ \"23.99.37.235/32\",\r\n \"23.99.37.236/32\",\r\n \"23.99.57.14/32\",\r\n + \ \"23.99.80.243/32\",\r\n \"23.99.89.212/32\",\r\n \"23.99.90.75/32\",\r\n + \ \"23.99.91.130/32\",\r\n \"23.99.102.124/32\",\r\n \"23.99.118.196/32\",\r\n + \ \"23.99.160.139/32\",\r\n \"23.99.160.140/31\",\r\n \"23.99.160.142/32\",\r\n + \ \"23.99.205.183/32\",\r\n \"23.100.117.95/32\",\r\n \"23.100.119.70/32\",\r\n + \ \"23.101.18.228/32\",\r\n \"23.101.64.10/32\",\r\n \"23.101.165.167/32\",\r\n + \ \"23.101.167.45/32\",\r\n \"23.101.170.98/32\",\r\n \"23.102.16.130/32\",\r\n + \ \"23.102.23.219/32\",\r\n \"23.102.25.199/32\",\r\n \"23.102.52.155/32\",\r\n + \ \"23.102.57.142/32\",\r\n \"23.102.62.171/32\",\r\n \"23.102.69.95/32\",\r\n + \ \"23.102.71.13/32\",\r\n \"23.102.74.190/32\",\r\n \"23.102.172.251/32\",\r\n + \ \"23.102.173.220/32\",\r\n \"23.102.174.146/32\",\r\n \"23.102.179.187/32\",\r\n + \ \"23.102.206.35/32\",\r\n \"23.102.206.36/31\",\r\n \"40.67.53.0/25\",\r\n + \ \"40.67.56.0/27\",\r\n \"40.67.56.32/29\",\r\n \"40.67.57.0/27\",\r\n + \ \"40.68.37.158/32\",\r\n \"40.68.215.206/32\",\r\n \"40.68.220.16/32\",\r\n + \ \"40.69.104.0/27\",\r\n \"40.69.105.0/27\",\r\n \"40.69.105.32/29\",\r\n + \ \"40.69.132.90/32\",\r\n \"40.69.143.202/32\",\r\n \"40.69.169.120/32\",\r\n + \ \"40.69.189.48/32\",\r\n \"40.70.144.0/26\",\r\n \"40.70.144.192/29\",\r\n + \ \"40.70.145.0/26\",\r\n \"40.71.8.0/26\",\r\n \"40.71.8.192/26\",\r\n + \ \"40.71.9.0/26\",\r\n \"40.71.9.192/26\",\r\n \"40.71.83.113/32\",\r\n + \ \"40.71.196.33/32\",\r\n \"40.71.211.227/32\",\r\n \"40.71.226.18/32\",\r\n + \ \"40.74.51.145/32\",\r\n \"40.74.53.36/32\",\r\n \"40.74.60.91/32\",\r\n + \ \"40.74.96.0/27\",\r\n \"40.74.96.32/29\",\r\n \"40.74.97.0/27\",\r\n + \ \"40.74.114.22/32\",\r\n \"40.74.115.153/32\",\r\n \"40.74.135.185/32\",\r\n + \ \"40.74.144.0/27\",\r\n \"40.74.144.32/29\",\r\n \"40.74.145.0/27\",\r\n + \ \"40.74.145.32/29\",\r\n \"40.74.254.156/32\",\r\n \"40.75.32.0/27\",\r\n + \ \"40.75.32.40/29\",\r\n \"40.75.33.0/27\",\r\n \"40.75.33.32/29\",\r\n + \ \"40.76.2.172/32\",\r\n \"40.76.26.90/32\",\r\n \"40.76.42.44/32\",\r\n + \ \"40.76.65.222/32\",\r\n \"40.76.66.9/32\",\r\n \"40.76.193.221/32\",\r\n + \ \"40.76.209.171/32\",\r\n \"40.76.219.185/32\",\r\n \"40.77.30.201/32\",\r\n + \ \"40.78.16.122/32\",\r\n \"40.78.23.252/32\",\r\n \"40.78.31.250/32\",\r\n + \ \"40.78.57.109/32\",\r\n \"40.78.101.91/32\",\r\n \"40.78.110.18/32\",\r\n + \ \"40.78.111.189/32\",\r\n \"40.78.192.0/27\",\r\n \"40.78.192.32/29\",\r\n + \ \"40.78.193.0/27\",\r\n \"40.78.193.32/29\",\r\n \"40.78.200.128/29\",\r\n + \ \"40.78.201.128/29\",\r\n \"40.78.224.0/26\",\r\n \"40.78.224.128/26\",\r\n + \ \"40.78.225.0/26\",\r\n \"40.78.225.128/26\",\r\n \"40.78.232.0/26\",\r\n + \ \"40.78.232.192/29\",\r\n \"40.78.233.0/26\",\r\n \"40.78.240.0/26\",\r\n + \ \"40.78.240.192/29\",\r\n \"40.78.241.0/26\",\r\n \"40.78.248.0/26\",\r\n + \ \"40.78.248.192/29\",\r\n \"40.78.249.0/26\",\r\n \"40.79.84.180/32\",\r\n + \ \"40.79.128.0/27\",\r\n \"40.79.128.32/29\",\r\n \"40.79.129.0/27\",\r\n + \ \"40.79.136.0/27\",\r\n \"40.79.136.32/29\",\r\n \"40.79.137.0/27\",\r\n + \ \"40.79.144.0/27\",\r\n \"40.79.144.32/29\",\r\n \"40.79.145.0/27\",\r\n + \ \"40.79.152.0/26\",\r\n \"40.79.152.192/26\",\r\n \"40.79.153.0/26\",\r\n + \ \"40.79.153.192/26\",\r\n \"40.79.160.0/27\",\r\n \"40.79.160.32/29\",\r\n + \ \"40.79.161.0/27\",\r\n \"40.79.168.0/27\",\r\n \"40.79.168.32/29\",\r\n + \ \"40.79.169.0/27\",\r\n \"40.79.176.0/27\",\r\n \"40.79.176.40/29\",\r\n + \ \"40.79.177.0/27\",\r\n \"40.79.177.32/29\",\r\n \"40.79.184.0/27\",\r\n + \ \"40.79.184.32/29\",\r\n \"40.79.185.0/27\",\r\n \"40.79.191.224/27\",\r\n + \ \"40.79.192.0/27\",\r\n \"40.79.192.32/29\",\r\n \"40.79.193.0/27\",\r\n + \ \"40.80.48.0/27\",\r\n \"40.80.48.32/29\",\r\n \"40.80.49.0/27\",\r\n + \ \"40.83.178.165/32\",\r\n \"40.83.186.249/32\",\r\n \"40.84.5.64/32\",\r\n + \ \"40.84.54.249/32\",\r\n \"40.84.153.95/32\",\r\n \"40.84.155.210/32\",\r\n + \ \"40.84.156.165/32\",\r\n \"40.84.191.1/32\",\r\n \"40.84.193.16/32\",\r\n + \ \"40.84.195.189/32\",\r\n \"40.84.231.203/32\",\r\n \"40.85.102.50/32\",\r\n + \ \"40.85.224.249/32\",\r\n \"40.85.225.5/32\",\r\n \"40.86.75.134/32\",\r\n + \ \"40.86.226.166/32\",\r\n \"40.86.226.230/32\",\r\n \"40.112.139.250/32\",\r\n + \ \"40.112.240.0/27\",\r\n \"40.112.246.0/27\",\r\n \"40.113.14.53/32\",\r\n + \ \"40.113.16.190/32\",\r\n \"40.113.17.148/32\",\r\n \"40.113.20.38/32\",\r\n + \ \"40.113.93.91/32\",\r\n \"40.113.200.119/32\",\r\n \"40.114.40.118/32\",\r\n + \ \"40.114.43.106/32\",\r\n \"40.114.45.195/32\",\r\n \"40.114.46.128/32\",\r\n + \ \"40.114.46.212/32\",\r\n \"40.114.81.142/32\",\r\n \"40.114.240.125/32\",\r\n + \ \"40.114.240.162/32\",\r\n \"40.115.37.61/32\",\r\n \"40.115.51.118/32\",\r\n + \ \"40.115.52.141/32\",\r\n \"40.115.53.255/32\",\r\n \"40.115.61.208/32\",\r\n + \ \"40.117.42.73/32\",\r\n \"40.117.44.71/32\",\r\n \"40.117.90.115/32\",\r\n + \ \"40.117.97.189/32\",\r\n \"40.118.12.208/32\",\r\n \"40.118.129.167/32\",\r\n + \ \"40.118.170.1/32\",\r\n \"40.118.209.206/32\",\r\n \"40.118.244.227/32\",\r\n + \ \"40.118.249.123/32\",\r\n \"40.118.250.19/32\",\r\n \"40.120.72.0/27\",\r\n + \ \"40.120.72.32/29\",\r\n \"40.120.73.0/27\",\r\n \"40.121.143.204/32\",\r\n + \ \"40.121.149.49/32\",\r\n \"40.121.154.241/32\",\r\n \"40.121.158.30/32\",\r\n + \ \"40.122.205.105/32\",\r\n \"40.122.215.111/32\",\r\n \"40.124.8.76/32\",\r\n + \ \"40.124.64.136/29\",\r\n \"40.124.64.160/27\",\r\n \"40.124.65.128/27\",\r\n + \ \"40.126.228.153/32\",\r\n \"40.126.230.223/32\",\r\n \"40.126.232.113/32\",\r\n + \ \"40.126.233.152/32\",\r\n \"40.126.250.24/32\",\r\n \"40.127.82.69/32\",\r\n + \ \"40.127.83.164/32\",\r\n \"40.127.128.10/32\",\r\n \"40.127.135.67/32\",\r\n + \ \"40.127.137.209/32\",\r\n \"40.127.141.194/32\",\r\n \"40.127.177.139/32\",\r\n + \ \"40.127.190.50/32\",\r\n \"51.12.46.32/27\",\r\n \"51.12.46.64/27\",\r\n + \ \"51.12.46.128/26\",\r\n \"51.12.96.0/27\",\r\n \"51.12.96.32/29\",\r\n + \ \"51.12.97.0/27\",\r\n \"51.12.198.32/27\",\r\n \"51.12.198.64/27\",\r\n + \ \"51.12.198.128/26\",\r\n \"51.12.200.0/27\",\r\n \"51.12.200.32/29\",\r\n + \ \"51.12.201.0/27\",\r\n \"51.12.201.32/29\",\r\n \"51.12.224.0/27\",\r\n + \ \"51.12.224.32/29\",\r\n \"51.12.225.0/27\",\r\n \"51.12.232.0/27\",\r\n + \ \"51.12.232.32/29\",\r\n \"51.12.233.0/27\",\r\n \"51.13.136.224/27\",\r\n + \ \"51.13.137.0/27\",\r\n \"51.13.137.64/26\",\r\n \"51.103.200.64/27\",\r\n + \ \"51.103.201.64/27\",\r\n \"51.103.203.192/29\",\r\n \"51.105.64.0/27\",\r\n + \ \"51.105.64.32/29\",\r\n \"51.105.65.0/27\",\r\n \"51.105.72.0/27\",\r\n + \ \"51.105.72.32/29\",\r\n \"51.105.73.0/27\",\r\n \"51.107.56.0/27\",\r\n + \ \"51.107.56.32/29\",\r\n \"51.107.57.0/27\",\r\n \"51.107.152.0/27\",\r\n + \ \"51.107.153.0/27\",\r\n \"51.107.153.32/29\",\r\n \"51.107.242.32/27\",\r\n + \ \"51.107.242.64/27\",\r\n \"51.107.242.128/26\",\r\n \"51.107.250.64/26\",\r\n + \ \"51.107.250.128/26\",\r\n \"51.116.54.96/27\",\r\n \"51.116.54.128/27\",\r\n + \ \"51.116.54.192/26\",\r\n \"51.116.56.0/27\",\r\n \"51.116.57.0/27\",\r\n + \ \"51.116.57.32/29\",\r\n \"51.116.149.32/27\",\r\n \"51.116.149.64/27\",\r\n + \ \"51.116.149.128/26\",\r\n \"51.116.152.0/27\",\r\n \"51.116.152.32/29\",\r\n + \ \"51.116.153.0/27\",\r\n \"51.116.240.0/27\",\r\n \"51.116.240.32/29\",\r\n + \ \"51.116.241.0/27\",\r\n \"51.116.248.0/27\",\r\n \"51.116.248.32/29\",\r\n + \ \"51.116.249.0/27\",\r\n \"51.120.96.0/27\",\r\n \"51.120.96.32/29\",\r\n + \ \"51.120.97.0/27\",\r\n \"51.120.104.0/27\",\r\n \"51.120.104.32/29\",\r\n + \ \"51.120.105.0/27\",\r\n \"51.120.208.0/27\",\r\n \"51.120.208.32/29\",\r\n + \ \"51.120.209.0/27\",\r\n \"51.120.216.0/27\",\r\n \"51.120.217.0/27\",\r\n + \ \"51.120.217.32/29\",\r\n \"51.120.232.192/26\",\r\n \"51.120.233.0/26\",\r\n + \ \"51.132.193.64/27\",\r\n \"51.138.210.0/26\",\r\n \"51.140.77.9/32\",\r\n + \ \"51.140.114.26/32\",\r\n \"51.140.115.150/32\",\r\n \"51.140.144.0/27\",\r\n + \ \"51.140.144.32/29\",\r\n \"51.140.145.0/27\",\r\n \"51.140.151.128/27\",\r\n + \ \"51.140.180.9/32\",\r\n \"51.140.183.238/32\",\r\n \"51.140.184.11/32\",\r\n + \ \"51.140.208.64/27\",\r\n \"51.140.208.96/29\",\r\n \"51.140.209.0/27\",\r\n + \ \"51.140.209.32/29\",\r\n \"51.141.8.11/32\",\r\n \"51.141.15.53/32\",\r\n + \ \"51.141.25.212/32\",\r\n \"51.143.209.224/27\",\r\n \"51.143.212.0/27\",\r\n + \ \"51.143.212.64/26\",\r\n \"52.136.53.160/27\",\r\n \"52.136.53.192/27\",\r\n + \ \"52.136.185.0/25\",\r\n \"52.138.88.0/27\",\r\n \"52.138.88.32/29\",\r\n + \ \"52.138.89.0/27\",\r\n \"52.138.89.32/29\",\r\n \"52.138.224.0/26\",\r\n + \ \"52.138.224.128/26\",\r\n \"52.138.225.0/26\",\r\n \"52.138.225.128/26\",\r\n + \ \"52.138.229.72/29\",\r\n \"52.139.106.192/26\",\r\n \"52.139.107.0/26\",\r\n + \ \"52.146.133.128/25\",\r\n \"52.147.112.160/27\",\r\n \"52.161.15.204/32\",\r\n + \ \"52.161.100.158/32\",\r\n \"52.161.105.228/32\",\r\n \"52.161.128.32/27\",\r\n + \ \"52.162.104.0/26\",\r\n \"52.162.105.0/26\",\r\n \"52.162.105.192/28\",\r\n + \ \"52.162.125.1/32\",\r\n \"52.162.241.250/32\",\r\n \"52.165.184.67/32\",\r\n + \ \"52.166.76.0/32\",\r\n \"52.166.131.195/32\",\r\n \"52.167.104.0/26\",\r\n + \ \"52.167.104.192/29\",\r\n \"52.167.104.224/27\",\r\n \"52.167.105.0/26\",\r\n + \ \"52.167.111.144/28\",\r\n \"52.167.111.192/27\",\r\n \"52.167.117.226/32\",\r\n + \ \"52.167.145.64/26\",\r\n \"52.167.145.128/27\",\r\n \"52.168.116.64/29\",\r\n + \ \"52.168.117.96/27\",\r\n \"52.168.117.128/27\",\r\n \"52.168.117.160/29\",\r\n + \ \"52.168.118.0/25\",\r\n \"52.168.166.153/32\",\r\n \"52.168.169.124/32\",\r\n + \ \"52.168.183.223/32\",\r\n \"52.170.41.199/32\",\r\n \"52.170.97.16/32\",\r\n + \ \"52.170.98.29/32\",\r\n \"52.171.56.10/32\",\r\n \"52.172.24.47/32\",\r\n + \ \"52.172.43.208/32\",\r\n \"52.172.113.96/27\",\r\n \"52.172.113.128/27\",\r\n + \ \"52.172.113.192/26\",\r\n \"52.172.217.233/32\",\r\n \"52.172.221.154/32\",\r\n + \ \"52.173.205.59/32\",\r\n \"52.175.33.150/32\",\r\n \"52.176.43.167/32\",\r\n + \ \"52.176.59.12/32\",\r\n \"52.176.95.237/32\",\r\n \"52.176.100.98/32\",\r\n + \ \"52.177.185.181/32\",\r\n \"52.177.197.103/32\",\r\n \"52.177.200.215/32\",\r\n + \ \"52.178.17.192/27\",\r\n \"52.178.21.0/26\",\r\n \"52.178.21.64/27\",\r\n + \ \"52.179.16.95/32\",\r\n \"52.179.157.248/32\",\r\n \"52.179.165.160/32\",\r\n + \ \"52.179.167.70/32\",\r\n \"52.179.178.184/32\",\r\n \"52.180.176.154/31\",\r\n + \ \"52.180.183.226/32\",\r\n \"52.182.136.0/26\",\r\n \"52.182.136.192/29\",\r\n + \ \"52.182.137.0/26\",\r\n \"52.183.250.62/32\",\r\n \"52.184.192.175/32\",\r\n + \ \"52.184.231.0/32\",\r\n \"52.185.152.149/32\",\r\n \"52.187.15.214/32\",\r\n + \ \"52.187.76.130/32\",\r\n \"52.191.144.64/26\",\r\n \"52.191.152.64/26\",\r\n + \ \"52.191.172.187/32\",\r\n \"52.191.174.114/32\",\r\n \"52.225.188.46/32\",\r\n + \ \"52.225.188.113/32\",\r\n \"52.225.222.124/32\",\r\n \"52.228.24.103/32\",\r\n + \ \"52.228.35.221/32\",\r\n \"52.228.39.117/32\",\r\n \"52.229.17.93/32\",\r\n + \ \"52.229.122.195/32\",\r\n \"52.229.123.147/32\",\r\n \"52.229.124.23/32\",\r\n + \ \"52.231.16.0/27\",\r\n \"52.231.16.32/29\",\r\n \"52.231.17.0/27\",\r\n + \ \"52.231.32.42/31\",\r\n \"52.231.39.56/32\",\r\n \"52.231.144.0/27\",\r\n + \ \"52.231.145.0/27\",\r\n \"52.231.151.96/27\",\r\n \"52.231.200.86/31\",\r\n + \ \"52.231.206.133/32\",\r\n \"52.236.184.0/27\",\r\n \"52.236.184.32/29\",\r\n + \ \"52.236.184.128/25\",\r\n \"52.236.185.0/27\",\r\n \"52.236.185.128/25\",\r\n + \ \"52.237.28.86/32\",\r\n \"52.237.219.227/32\",\r\n \"52.242.26.53/32\",\r\n + \ \"52.242.29.91/32\",\r\n \"52.242.30.154/32\",\r\n \"52.242.36.107/32\",\r\n + \ \"52.243.32.19/32\",\r\n \"52.243.43.186/32\",\r\n \"52.246.152.0/27\",\r\n + \ \"52.246.152.32/29\",\r\n \"52.246.153.0/27\",\r\n \"52.246.251.248/32\",\r\n + \ \"52.255.48.161/32\",\r\n \"65.52.208.91/32\",\r\n \"65.52.213.108/32\",\r\n + \ \"65.52.214.127/32\",\r\n \"65.52.218.82/32\",\r\n \"65.52.225.245/32\",\r\n + \ \"65.52.226.209/32\",\r\n \"65.52.248.0/27\",\r\n \"65.52.248.32/29\",\r\n + \ \"65.52.249.0/27\",\r\n \"102.37.80.96/27\",\r\n \"102.37.80.128/27\",\r\n + \ \"102.37.80.192/26\",\r\n \"102.37.160.0/27\",\r\n \"102.37.160.64/26\",\r\n + \ \"102.133.24.0/27\",\r\n \"102.133.25.0/27\",\r\n \"102.133.25.32/29\",\r\n + \ \"102.133.120.0/27\",\r\n \"102.133.120.32/29\",\r\n \"102.133.121.0/27\",\r\n + \ \"102.133.152.0/27\",\r\n \"102.133.152.32/29\",\r\n \"102.133.153.0/27\",\r\n + \ \"102.133.221.224/27\",\r\n \"102.133.248.0/27\",\r\n \"102.133.248.32/29\",\r\n + \ \"102.133.249.0/27\",\r\n \"104.40.49.103/32\",\r\n \"104.40.54.130/32\",\r\n + \ \"104.40.82.151/32\",\r\n \"104.40.155.247/32\",\r\n \"104.40.168.64/26\",\r\n + \ \"104.40.168.192/26\",\r\n \"104.40.169.0/27\",\r\n \"104.40.169.32/29\",\r\n + \ \"104.40.169.128/25\",\r\n \"104.41.11.5/32\",\r\n \"104.41.13.213/32\",\r\n + \ \"104.41.13.233/32\",\r\n \"104.41.56.218/32\",\r\n \"104.41.152.74/32\",\r\n + \ \"104.41.168.103/32\",\r\n \"104.41.202.30/32\",\r\n \"104.41.208.104/32\",\r\n + \ \"104.41.210.68/32\",\r\n \"104.41.211.98/32\",\r\n \"104.42.127.95/32\",\r\n + \ \"104.42.136.93/32\",\r\n \"104.42.188.130/32\",\r\n \"104.42.192.190/32\",\r\n + \ \"104.42.231.253/32\",\r\n \"104.42.237.198/32\",\r\n \"104.42.238.205/32\",\r\n + \ \"104.43.15.0/32\",\r\n \"104.43.164.21/32\",\r\n \"104.43.203.72/32\",\r\n + \ \"104.45.11.99/32\",\r\n \"104.45.14.115/32\",\r\n \"104.45.158.30/32\",\r\n + \ \"104.46.38.143/32\",\r\n \"104.46.40.24/32\",\r\n \"104.46.100.189/32\",\r\n + \ \"104.46.108.148/32\",\r\n \"104.46.162.192/27\",\r\n \"104.46.179.160/27\",\r\n + \ \"104.46.179.192/27\",\r\n \"104.46.183.0/26\",\r\n \"104.47.157.97/32\",\r\n + \ \"104.208.21.0/26\",\r\n \"104.208.21.192/29\",\r\n \"104.208.22.0/26\",\r\n + \ \"104.208.28.16/32\",\r\n \"104.208.28.53/32\",\r\n \"104.208.149.0/26\",\r\n + \ \"104.208.150.0/26\",\r\n \"104.208.150.192/29\",\r\n \"104.208.161.78/32\",\r\n + \ \"104.208.163.201/32\",\r\n \"104.208.233.240/32\",\r\n + \ \"104.208.238.55/32\",\r\n \"104.208.241.224/32\",\r\n + \ \"104.209.186.94/32\",\r\n \"104.210.32.128/32\",\r\n \"104.210.105.215/32\",\r\n + \ \"104.211.85.0/27\",\r\n \"104.211.86.0/27\",\r\n \"104.211.86.32/29\",\r\n + \ \"104.211.96.159/32\",\r\n \"104.211.96.160/32\",\r\n \"104.211.144.0/27\",\r\n + \ \"104.211.144.32/29\",\r\n \"104.211.145.0/27\",\r\n \"104.211.145.32/29\",\r\n + \ \"104.211.160.80/31\",\r\n \"104.211.185.58/32\",\r\n \"104.211.190.46/32\",\r\n + \ \"104.211.224.146/31\",\r\n \"104.214.16.0/26\",\r\n \"104.214.16.192/26\",\r\n + \ \"104.214.17.0/26\",\r\n \"104.214.17.192/26\",\r\n \"104.214.67.25/32\",\r\n + \ \"104.214.73.137/32\",\r\n \"104.214.78.242/32\",\r\n \"104.214.148.156/32\",\r\n + \ \"104.214.150.17/32\",\r\n \"104.215.195.14/32\",\r\n \"104.215.196.52/32\",\r\n + \ \"111.221.106.161/32\",\r\n \"137.116.31.224/27\",\r\n + \ \"137.116.129.110/32\",\r\n \"137.116.203.91/32\",\r\n + \ \"137.135.51.212/32\",\r\n \"137.135.109.63/32\",\r\n \"137.135.186.126/32\",\r\n + \ \"137.135.189.158/32\",\r\n \"137.135.205.85/32\",\r\n + \ \"137.135.213.9/32\",\r\n \"138.91.48.99/32\",\r\n \"138.91.58.227/32\",\r\n + \ \"138.91.145.12/32\",\r\n \"138.91.160.189/32\",\r\n \"138.91.240.14/32\",\r\n + \ \"138.91.246.31/32\",\r\n \"138.91.247.51/32\",\r\n \"138.91.251.139/32\",\r\n + \ \"157.55.208.150/32\",\r\n \"168.61.136.0/27\",\r\n \"168.61.137.0/27\",\r\n + \ \"168.62.115.112/28\",\r\n \"168.62.232.188/32\",\r\n \"168.62.235.49/32\",\r\n + \ \"168.62.235.241/32\",\r\n \"168.62.239.29/32\",\r\n \"168.63.13.214/32\",\r\n + \ \"168.63.98.91/32\",\r\n \"168.63.175.68/32\",\r\n \"191.233.15.160/27\",\r\n + \ \"191.233.15.192/27\",\r\n \"191.233.48.0/27\",\r\n \"191.233.48.32/29\",\r\n + \ \"191.233.49.0/27\",\r\n \"191.233.69.227/32\",\r\n \"191.233.90.117/32\",\r\n + \ \"191.233.200.0/27\",\r\n \"191.233.200.32/29\",\r\n \"191.233.201.0/27\",\r\n + \ \"191.234.2.139/32\",\r\n \"191.234.2.140/31\",\r\n \"191.234.2.142/32\",\r\n + \ \"191.234.142.160/27\",\r\n \"191.234.142.192/27\",\r\n + \ \"191.234.144.0/27\",\r\n \"191.234.144.32/29\",\r\n \"191.234.145.0/27\",\r\n + \ \"191.234.152.0/26\",\r\n \"191.234.153.0/26\",\r\n \"191.234.157.136/29\",\r\n + \ \"191.235.170.58/32\",\r\n \"191.235.193.75/32\",\r\n \"191.235.193.76/31\",\r\n + \ \"191.235.193.78/32\",\r\n \"191.235.193.139/32\",\r\n + \ \"191.235.193.140/31\",\r\n \"191.235.209.79/32\",\r\n + \ \"191.236.119.31/32\",\r\n \"191.236.148.44/32\",\r\n \"191.236.153.120/32\",\r\n + \ \"191.237.20.112/32\",\r\n \"191.237.82.74/32\",\r\n \"191.237.219.202/32\",\r\n + \ \"191.237.232.75/32\",\r\n \"191.237.232.76/31\",\r\n \"191.237.232.78/32\",\r\n + \ \"191.237.232.235/32\",\r\n \"191.237.232.236/31\",\r\n + \ \"191.237.240.43/32\",\r\n \"191.237.240.44/32\",\r\n \"191.237.240.46/32\",\r\n + \ \"191.238.6.43/32\",\r\n \"191.238.6.44/31\",\r\n \"191.238.6.46/32\",\r\n + \ \"191.238.68.11/32\",\r\n \"191.238.68.12/31\",\r\n \"191.238.68.14/32\",\r\n + \ \"191.238.224.203/32\",\r\n \"191.238.230.40/32\",\r\n + \ \"191.239.12.154/32\",\r\n \"191.239.189.48/32\",\r\n \"191.239.192.109/32\",\r\n + \ \"191.239.224.107/32\",\r\n \"191.239.224.108/31\",\r\n + \ \"191.239.224.110/32\",\r\n \"207.46.139.82/32\",\r\n \"207.46.140.180/32\",\r\n + \ \"207.46.153.182/32\",\r\n \"2603:1000:4::280/123\",\r\n + \ \"2603:1000:4:1::200/121\",\r\n \"2603:1000:4:400::/123\",\r\n + \ \"2603:1000:4:401::/123\",\r\n \"2603:1000:104::640/123\",\r\n + \ \"2603:1000:104::680/121\",\r\n \"2603:1000:104:400::/123\",\r\n + \ \"2603:1000:104:401::/123\",\r\n \"2603:1000:104:800::/123\",\r\n + \ \"2603:1000:104:801::/123\",\r\n \"2603:1000:104:c00::/123\",\r\n + \ \"2603:1000:104:c01::/123\",\r\n \"2603:1010:6::320/123\",\r\n + \ \"2603:1010:6::380/121\",\r\n \"2603:1010:6:400::/123\",\r\n + \ \"2603:1010:6:401::/123\",\r\n \"2603:1010:6:800::/123\",\r\n + \ \"2603:1010:6:801::/123\",\r\n \"2603:1010:6:c00::/123\",\r\n + \ \"2603:1010:6:c01::/123\",\r\n \"2603:1010:101::280/123\",\r\n + \ \"2603:1010:101:1::200/121\",\r\n \"2603:1010:101:400::/123\",\r\n + \ \"2603:1010:304::280/123\",\r\n \"2603:1010:304:1::200/121\",\r\n + \ \"2603:1010:304:400::/123\",\r\n \"2603:1010:404::280/123\",\r\n + \ \"2603:1010:404:1::200/121\",\r\n \"2603:1010:404:400::/123\",\r\n + \ \"2603:1020:5::320/123\",\r\n \"2603:1020:5::380/121\",\r\n + \ \"2603:1020:5:400::/123\",\r\n \"2603:1020:5:401::/123\",\r\n + \ \"2603:1020:5:800::/123\",\r\n \"2603:1020:5:801::/123\",\r\n + \ \"2603:1020:5:c00::/123\",\r\n \"2603:1020:5:c01::/123\",\r\n + \ \"2603:1020:206::320/123\",\r\n \"2603:1020:206::380/121\",\r\n + \ \"2603:1020:206:400::/123\",\r\n \"2603:1020:206:401::/123\",\r\n + \ \"2603:1020:206:800::/123\",\r\n \"2603:1020:206:801::/123\",\r\n + \ \"2603:1020:206:c00::/123\",\r\n \"2603:1020:206:c01::/123\",\r\n + \ \"2603:1020:605::280/123\",\r\n \"2603:1020:605:1::200/121\",\r\n + \ \"2603:1020:605:400::/123\",\r\n \"2603:1020:705::320/123\",\r\n + \ \"2603:1020:705::380/121\",\r\n \"2603:1020:705:400::/123\",\r\n + \ \"2603:1020:705:401::/123\",\r\n \"2603:1020:705:800::/123\",\r\n + \ \"2603:1020:705:801::/123\",\r\n \"2603:1020:705:c00::/123\",\r\n + \ \"2603:1020:705:c01::/123\",\r\n \"2603:1020:805::320/123\",\r\n + \ \"2603:1020:805::380/121\",\r\n \"2603:1020:805:400::/123\",\r\n + \ \"2603:1020:805:401::/123\",\r\n \"2603:1020:805:800::/123\",\r\n + \ \"2603:1020:805:801::/123\",\r\n \"2603:1020:805:c00::/123\",\r\n + \ \"2603:1020:805:c01::/123\",\r\n \"2603:1020:905::280/123\",\r\n + \ \"2603:1020:905:1::200/121\",\r\n \"2603:1020:905:400::/123\",\r\n + \ \"2603:1020:a04::320/123\",\r\n \"2603:1020:a04::380/121\",\r\n + \ \"2603:1020:a04:400::/123\",\r\n \"2603:1020:a04:401::/123\",\r\n + \ \"2603:1020:a04:800::/123\",\r\n \"2603:1020:a04:801::/123\",\r\n + \ \"2603:1020:a04:c00::/123\",\r\n \"2603:1020:a04:c01::/123\",\r\n + \ \"2603:1020:b04::280/123\",\r\n \"2603:1020:b04:1::200/121\",\r\n + \ \"2603:1020:b04:400::/123\",\r\n \"2603:1020:c04::320/123\",\r\n + \ \"2603:1020:c04::380/121\",\r\n \"2603:1020:c04:400::/123\",\r\n + \ \"2603:1020:c04:401::/123\",\r\n \"2603:1020:c04:800::/123\",\r\n + \ \"2603:1020:c04:801::/123\",\r\n \"2603:1020:c04:c00::/123\",\r\n + \ \"2603:1020:c04:c01::/123\",\r\n \"2603:1020:d04::280/123\",\r\n + \ \"2603:1020:d04:1::200/121\",\r\n \"2603:1020:d04:400::/123\",\r\n + \ \"2603:1020:e04::320/123\",\r\n \"2603:1020:e04::380/121\",\r\n + \ \"2603:1020:e04:400::/123\",\r\n \"2603:1020:e04:401::/123\",\r\n + \ \"2603:1020:e04:800::/123\",\r\n \"2603:1020:e04:801::/123\",\r\n + \ \"2603:1020:e04:c00::/123\",\r\n \"2603:1020:e04:c01::/123\",\r\n + \ \"2603:1020:f04::280/123\",\r\n \"2603:1020:f04:1::200/121\",\r\n + \ \"2603:1020:f04:400::/123\",\r\n \"2603:1020:1004:1::520/123\",\r\n + \ \"2603:1020:1004:1::580/121\",\r\n \"2603:1020:1004:400::400/123\",\r\n + \ \"2603:1020:1004:402::/123\",\r\n \"2603:1020:1004:403::/123\",\r\n + \ \"2603:1020:1004:802::/123\",\r\n \"2603:1020:1004:803::/123\",\r\n + \ \"2603:1020:1004:c03::/123\",\r\n \"2603:1020:1004:c04::/123\",\r\n + \ \"2603:1020:1104::500/123\",\r\n \"2603:1020:1104:1::300/121\",\r\n + \ \"2603:1020:1104:400::420/123\",\r\n \"2603:1020:1104:402::/123\",\r\n + \ \"2603:1030:f:1::280/123\",\r\n \"2603:1030:f:2::200/121\",\r\n + \ \"2603:1030:f:402::/122\",\r\n \"2603:1030:f:403::/122\",\r\n + \ \"2603:1030:10::320/123\",\r\n \"2603:1030:10::380/121\",\r\n + \ \"2603:1030:10:400::/123\",\r\n \"2603:1030:10:401::/123\",\r\n + \ \"2603:1030:10:800::/123\",\r\n \"2603:1030:10:801::/123\",\r\n + \ \"2603:1030:10:c00::/123\",\r\n \"2603:1030:10:c01::/123\",\r\n + \ \"2603:1030:104::320/123\",\r\n \"2603:1030:104::380/121\",\r\n + \ \"2603:1030:104:400::/123\",\r\n \"2603:1030:104:401::/123\",\r\n + \ \"2603:1030:107:1::380/123\",\r\n \"2603:1030:107:401::40/122\",\r\n + \ \"2603:1030:107:402::40/123\",\r\n \"2603:1030:210::320/123\",\r\n + \ \"2603:1030:210::380/121\",\r\n \"2603:1030:210:400::/123\",\r\n + \ \"2603:1030:210:401::/123\",\r\n \"2603:1030:210:800::/123\",\r\n + \ \"2603:1030:210:801::/123\",\r\n \"2603:1030:210:c00::/123\",\r\n + \ \"2603:1030:210:c01::/123\",\r\n \"2603:1030:40b:2::200/123\",\r\n + \ \"2603:1030:40b:2::280/121\",\r\n \"2603:1030:40b:402::/122\",\r\n + \ \"2603:1030:40b:403::/122\",\r\n \"2603:1030:40b:802::/122\",\r\n + \ \"2603:1030:40b:803::/122\",\r\n \"2603:1030:40b:c02::/122\",\r\n + \ \"2603:1030:40b:c03::/122\",\r\n \"2603:1030:40c::320/123\",\r\n + \ \"2603:1030:40c::380/121\",\r\n \"2603:1030:40c:400::/123\",\r\n + \ \"2603:1030:40c:401::/123\",\r\n \"2603:1030:40c:800::/123\",\r\n + \ \"2603:1030:40c:801::/123\",\r\n \"2603:1030:40c:c00::/123\",\r\n + \ \"2603:1030:40c:c01::/123\",\r\n \"2603:1030:504::520/123\",\r\n + \ \"2603:1030:504::580/121\",\r\n \"2603:1030:504:400::/123\",\r\n + \ \"2603:1030:504:401::/123\",\r\n \"2603:1030:504:800::/123\",\r\n + \ \"2603:1030:504:801::/123\",\r\n \"2603:1030:504:c00::/123\",\r\n + \ \"2603:1030:504:c01::/123\",\r\n \"2603:1030:608::280/123\",\r\n + \ \"2603:1030:608:1::200/121\",\r\n \"2603:1030:608:400::/123\",\r\n + \ \"2603:1030:807::320/123\",\r\n \"2603:1030:807::380/121\",\r\n + \ \"2603:1030:807:400::/123\",\r\n \"2603:1030:807:401::/123\",\r\n + \ \"2603:1030:807:800::/123\",\r\n \"2603:1030:807:801::/123\",\r\n + \ \"2603:1030:807:c00::/123\",\r\n \"2603:1030:807:c01::/123\",\r\n + \ \"2603:1030:a07::280/123\",\r\n \"2603:1030:a07:1::200/121\",\r\n + \ \"2603:1030:a07:400::/123\",\r\n \"2603:1030:b04::280/123\",\r\n + \ \"2603:1030:b04:1::200/121\",\r\n \"2603:1030:b04:400::/123\",\r\n + \ \"2603:1030:c06:2::200/123\",\r\n \"2603:1030:c06:2::280/121\",\r\n + \ \"2603:1030:c06:401::/123\",\r\n \"2603:1030:c06:402::/123\",\r\n + \ \"2603:1030:c06:800::/123\",\r\n \"2603:1030:c06:801::/123\",\r\n + \ \"2603:1030:c06:c00::/123\",\r\n \"2603:1030:c06:c01::/123\",\r\n + \ \"2603:1030:f05::320/123\",\r\n \"2603:1030:f05::380/121\",\r\n + \ \"2603:1030:f05:400::/123\",\r\n \"2603:1030:f05:401::/123\",\r\n + \ \"2603:1030:f05:800::/123\",\r\n \"2603:1030:f05:801::/123\",\r\n + \ \"2603:1030:f05:c00::/123\",\r\n \"2603:1030:f05:c01::/123\",\r\n + \ \"2603:1030:1005::280/123\",\r\n \"2603:1030:1005:1::200/121\",\r\n + \ \"2603:1030:1005:400::/123\",\r\n \"2603:1040:5::420/123\",\r\n + \ \"2603:1040:5::480/121\",\r\n \"2603:1040:5:400::/123\",\r\n + \ \"2603:1040:5:401::/123\",\r\n \"2603:1040:5:800::/123\",\r\n + \ \"2603:1040:5:801::/123\",\r\n \"2603:1040:5:c00::/123\",\r\n + \ \"2603:1040:5:c01::/123\",\r\n \"2603:1040:207::280/123\",\r\n + \ \"2603:1040:207:1::200/121\",\r\n \"2603:1040:207:400::/123\",\r\n + \ \"2603:1040:207:401::/123\",\r\n \"2603:1040:407::320/123\",\r\n + \ \"2603:1040:407::380/121\",\r\n \"2603:1040:407:400::/123\",\r\n + \ \"2603:1040:407:401::/123\",\r\n \"2603:1040:407:800::/123\",\r\n + \ \"2603:1040:407:801::/123\",\r\n \"2603:1040:407:c00::/123\",\r\n + \ \"2603:1040:407:c01::/123\",\r\n \"2603:1040:606::280/123\",\r\n + \ \"2603:1040:606:1::200/121\",\r\n \"2603:1040:606:400::/123\",\r\n + \ \"2603:1040:806::280/123\",\r\n \"2603:1040:806:1::200/121\",\r\n + \ \"2603:1040:806:400::/123\",\r\n \"2603:1040:904::320/123\",\r\n + \ \"2603:1040:904::380/121\",\r\n \"2603:1040:904:400::/123\",\r\n + \ \"2603:1040:904:401::/123\",\r\n \"2603:1040:904:800::/123\",\r\n + \ \"2603:1040:904:801::/123\",\r\n \"2603:1040:904:c00::/123\",\r\n + \ \"2603:1040:904:c01::/123\",\r\n \"2603:1040:a06::420/123\",\r\n + \ \"2603:1040:a06::480/121\",\r\n \"2603:1040:a06:400::/123\",\r\n + \ \"2603:1040:a06:401::/123\",\r\n \"2603:1040:a06:800::/123\",\r\n + \ \"2603:1040:a06:801::/123\",\r\n \"2603:1040:a06:c00::/123\",\r\n + \ \"2603:1040:a06:c01::/123\",\r\n \"2603:1040:b04::280/123\",\r\n + \ \"2603:1040:b04:1::200/121\",\r\n \"2603:1040:b04:400::/123\",\r\n + \ \"2603:1040:c06::280/123\",\r\n \"2603:1040:c06:1::200/121\",\r\n + \ \"2603:1040:c06:400::/123\",\r\n \"2603:1040:c06:401::/123\",\r\n + \ \"2603:1040:d04:1::520/123\",\r\n \"2603:1040:d04:1::580/121\",\r\n + \ \"2603:1040:d04:400::400/123\",\r\n \"2603:1040:d04:402::/123\",\r\n + \ \"2603:1040:d04:403::/123\",\r\n \"2603:1040:d04:802::/123\",\r\n + \ \"2603:1040:d04:803::/123\",\r\n \"2603:1040:d04:c03::/123\",\r\n + \ \"2603:1040:d04:c04::/123\",\r\n \"2603:1040:e05::/123\",\r\n + \ \"2603:1040:f05::320/123\",\r\n \"2603:1040:f05::380/121\",\r\n + \ \"2603:1040:f05:400::/123\",\r\n \"2603:1040:f05:401::/123\",\r\n + \ \"2603:1040:f05:800::/123\",\r\n \"2603:1040:f05:801::/123\",\r\n + \ \"2603:1040:f05:c00::/123\",\r\n \"2603:1040:f05:c01::/123\",\r\n + \ \"2603:1040:1002:2::c0/123\",\r\n \"2603:1040:1002:2::280/121\",\r\n + \ \"2603:1040:1104::500/123\",\r\n \"2603:1040:1104:1::300/121\",\r\n + \ \"2603:1040:1104:400::440/123\",\r\n \"2603:1040:1104:402::/123\",\r\n + \ \"2603:1050:6::320/123\",\r\n \"2603:1050:6::380/121\",\r\n + \ \"2603:1050:6:400::/123\",\r\n \"2603:1050:6:401::/123\",\r\n + \ \"2603:1050:6:800::/123\",\r\n \"2603:1050:6:801::/123\",\r\n + \ \"2603:1050:6:c00::/122\",\r\n \"2603:1050:6:c01::/122\",\r\n + \ \"2603:1050:403:1::200/123\",\r\n \"2603:1050:403:1::280/121\",\r\n + \ \"2603:1050:403:402::/123\",\r\n \"2603:1050:403:403::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.AustraliaCentral\",\r\n + \ \"id\": \"Sql.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.36.104.0/27\",\r\n + \ \"20.36.105.0/27\",\r\n \"20.36.105.32/29\",\r\n \"20.53.48.96/27\",\r\n + \ \"20.53.48.128/27\",\r\n \"20.53.48.192/26\",\r\n \"2603:1010:304::280/123\",\r\n + \ \"2603:1010:304:1::200/121\",\r\n \"2603:1010:304:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.AustraliaCentral2\",\r\n + \ \"id\": \"Sql.AustraliaCentral2\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiacentral2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.36.112.0/27\",\r\n + \ \"20.36.113.0/27\",\r\n \"20.36.113.32/29\",\r\n \"20.53.56.32/27\",\r\n + \ \"20.53.56.64/27\",\r\n \"20.53.56.128/26\",\r\n \"2603:1010:404::280/123\",\r\n + \ \"2603:1010:404:1::200/121\",\r\n \"2603:1010:404:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.AustraliaEast\",\r\n + \ \"id\": \"Sql.AustraliaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"13.70.112.0/27\",\r\n \"13.70.112.32/29\",\r\n \"13.70.113.0/27\",\r\n + \ \"13.70.114.128/27\",\r\n \"13.75.149.87/32\",\r\n \"20.53.46.128/25\",\r\n + \ \"40.79.160.0/27\",\r\n \"40.79.160.32/29\",\r\n \"40.79.161.0/27\",\r\n + \ \"40.79.168.0/27\",\r\n \"40.79.168.32/29\",\r\n \"40.79.169.0/27\",\r\n + \ \"40.126.228.153/32\",\r\n \"40.126.230.223/32\",\r\n \"40.126.232.113/32\",\r\n + \ \"40.126.233.152/32\",\r\n \"40.126.250.24/32\",\r\n \"52.237.219.227/32\",\r\n + \ \"104.210.105.215/32\",\r\n \"2603:1010:6::320/123\",\r\n + \ \"2603:1010:6::380/121\",\r\n \"2603:1010:6:400::/123\",\r\n + \ \"2603:1010:6:401::/123\",\r\n \"2603:1010:6:800::/123\",\r\n + \ \"2603:1010:6:801::/123\",\r\n \"2603:1010:6:c00::/123\",\r\n + \ \"2603:1010:6:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.AustraliaSoutheast\",\r\n \"id\": \"Sql.AustraliaSoutheast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"australiasoutheast\",\r\n \"state\": + \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.70.148.251/32\",\r\n + \ \"13.70.155.163/32\",\r\n \"13.73.109.251/32\",\r\n \"13.77.7.78/32\",\r\n + \ \"13.77.48.0/27\",\r\n \"13.77.49.0/27\",\r\n \"13.77.49.32/29\",\r\n + \ \"40.127.82.69/32\",\r\n \"40.127.83.164/32\",\r\n \"52.255.48.161/32\",\r\n + \ \"104.46.162.192/27\",\r\n \"104.46.179.160/27\",\r\n \"104.46.179.192/27\",\r\n + \ \"104.46.183.0/26\",\r\n \"191.239.189.48/32\",\r\n \"191.239.192.109/32\",\r\n + \ \"2603:1010:101::280/123\",\r\n \"2603:1010:101:1::200/121\",\r\n + \ \"2603:1010:101:400::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.BrazilSouth\",\r\n \"id\": \"Sql.BrazilSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"104.41.11.5/32\",\r\n + \ \"104.41.13.213/32\",\r\n \"104.41.13.233/32\",\r\n \"104.41.56.218/32\",\r\n + \ \"191.233.200.0/27\",\r\n \"191.233.200.32/29\",\r\n \"191.233.201.0/27\",\r\n + \ \"191.234.142.160/27\",\r\n \"191.234.142.192/27\",\r\n + \ \"191.234.144.0/27\",\r\n \"191.234.144.32/29\",\r\n \"191.234.145.0/27\",\r\n + \ \"191.234.152.0/26\",\r\n \"191.234.153.0/26\",\r\n \"191.234.157.136/29\",\r\n + \ \"2603:1050:6::320/123\",\r\n \"2603:1050:6::380/121\",\r\n + \ \"2603:1050:6:400::/123\",\r\n \"2603:1050:6:401::/123\",\r\n + \ \"2603:1050:6:800::/123\",\r\n \"2603:1050:6:801::/123\",\r\n + \ \"2603:1050:6:c00::/122\",\r\n \"2603:1050:6:c01::/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.BrazilSoutheast\",\r\n + \ \"id\": \"Sql.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"20.195.146.0/26\",\r\n \"191.233.15.160/27\",\r\n + \ \"191.233.15.192/27\",\r\n \"191.233.48.0/27\",\r\n \"191.233.48.32/29\",\r\n + \ \"191.233.49.0/27\",\r\n \"2603:1050:403:1::200/123\",\r\n + \ \"2603:1050:403:1::280/121\",\r\n \"2603:1050:403:402::/123\",\r\n + \ \"2603:1050:403:403::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.CanadaCentral\",\r\n \"id\": \"Sql.CanadaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.71.168.0/27\",\r\n + \ \"13.71.168.32/29\",\r\n \"13.71.169.0/27\",\r\n \"13.71.177.192/27\",\r\n + \ \"13.88.249.189/32\",\r\n \"13.88.254.42/32\",\r\n \"20.38.144.0/27\",\r\n + \ \"20.38.144.32/29\",\r\n \"20.38.145.0/27\",\r\n \"20.48.196.32/27\",\r\n + \ \"20.48.196.64/27\",\r\n \"20.48.196.128/26\",\r\n \"40.85.224.249/32\",\r\n + \ \"40.85.225.5/32\",\r\n \"52.228.24.103/32\",\r\n \"52.228.35.221/32\",\r\n + \ \"52.228.39.117/32\",\r\n \"52.237.28.86/32\",\r\n \"52.246.152.0/27\",\r\n + \ \"52.246.152.32/29\",\r\n \"52.246.153.0/27\",\r\n \"2603:1030:f05::320/123\",\r\n + \ \"2603:1030:f05::380/121\",\r\n \"2603:1030:f05:400::/123\",\r\n + \ \"2603:1030:f05:401::/123\",\r\n \"2603:1030:f05:800::/123\",\r\n + \ \"2603:1030:f05:801::/123\",\r\n \"2603:1030:f05:c00::/123\",\r\n + \ \"2603:1030:f05:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.CanadaEast\",\r\n \"id\": \"Sql.CanadaEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"40.69.104.0/27\",\r\n + \ \"40.69.105.0/27\",\r\n \"40.69.105.32/29\",\r\n \"40.86.226.166/32\",\r\n + \ \"40.86.226.230/32\",\r\n \"52.139.106.192/26\",\r\n \"52.139.107.0/26\",\r\n + \ \"52.229.122.195/32\",\r\n \"52.229.123.147/32\",\r\n \"52.229.124.23/32\",\r\n + \ \"52.242.26.53/32\",\r\n \"52.242.29.91/32\",\r\n \"52.242.30.154/32\",\r\n + \ \"52.242.36.107/32\",\r\n \"2603:1030:1005::280/123\",\r\n + \ \"2603:1030:1005:1::200/121\",\r\n \"2603:1030:1005:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.CentralIndia\",\r\n + \ \"id\": \"Sql.CentralIndia\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"20.192.43.160/27\",\r\n \"20.192.43.192/27\",\r\n + \ \"20.192.44.0/26\",\r\n \"20.192.96.0/27\",\r\n \"20.192.96.32/29\",\r\n + \ \"20.192.97.0/27\",\r\n \"40.80.48.0/27\",\r\n \"40.80.48.32/29\",\r\n + \ \"40.80.49.0/27\",\r\n \"52.172.217.233/32\",\r\n \"52.172.221.154/32\",\r\n + \ \"104.211.85.0/27\",\r\n \"104.211.86.0/27\",\r\n \"104.211.86.32/29\",\r\n + \ \"104.211.96.159/32\",\r\n \"104.211.96.160/32\",\r\n \"2603:1040:a06::420/123\",\r\n + \ \"2603:1040:a06::480/121\",\r\n \"2603:1040:a06:400::/123\",\r\n + \ \"2603:1040:a06:401::/123\",\r\n \"2603:1040:a06:800::/123\",\r\n + \ \"2603:1040:a06:801::/123\",\r\n \"2603:1040:a06:c00::/123\",\r\n + \ \"2603:1040:a06:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.CentralUS\",\r\n \"id\": \"Sql.CentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"centralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.67.215.62/32\",\r\n + \ \"13.89.36.110/32\",\r\n \"13.89.37.61/32\",\r\n \"13.89.57.50/32\",\r\n + \ \"13.89.57.115/32\",\r\n \"13.89.168.0/26\",\r\n \"13.89.168.192/29\",\r\n + \ \"13.89.169.0/26\",\r\n \"20.40.228.128/25\",\r\n \"23.99.160.139/32\",\r\n + \ \"23.99.160.140/31\",\r\n \"23.99.160.142/32\",\r\n \"23.99.205.183/32\",\r\n + \ \"40.69.132.90/32\",\r\n \"40.69.143.202/32\",\r\n \"40.69.169.120/32\",\r\n + \ \"40.69.189.48/32\",\r\n \"40.77.30.201/32\",\r\n \"40.86.75.134/32\",\r\n + \ \"40.113.200.119/32\",\r\n \"40.122.205.105/32\",\r\n \"40.122.215.111/32\",\r\n + \ \"52.165.184.67/32\",\r\n \"52.173.205.59/32\",\r\n \"52.176.43.167/32\",\r\n + \ \"52.176.59.12/32\",\r\n \"52.176.95.237/32\",\r\n \"52.176.100.98/32\",\r\n + \ \"52.182.136.0/26\",\r\n \"52.182.136.192/29\",\r\n \"52.182.137.0/26\",\r\n + \ \"104.43.164.21/32\",\r\n \"104.43.203.72/32\",\r\n \"104.208.21.0/26\",\r\n + \ \"104.208.21.192/29\",\r\n \"104.208.22.0/26\",\r\n \"104.208.28.16/32\",\r\n + \ \"104.208.28.53/32\",\r\n \"2603:1030:10::320/123\",\r\n + \ \"2603:1030:10::380/121\",\r\n \"2603:1030:10:400::/123\",\r\n + \ \"2603:1030:10:401::/123\",\r\n \"2603:1030:10:800::/123\",\r\n + \ \"2603:1030:10:801::/123\",\r\n \"2603:1030:10:c00::/123\",\r\n + \ \"2603:1030:10:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.CentralUSEUAP\",\r\n \"id\": \"Sql.CentralUSEUAP\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.46.11.32/27\",\r\n + \ \"20.46.11.64/27\",\r\n \"20.46.11.128/26\",\r\n \"40.78.200.128/29\",\r\n + \ \"40.78.201.128/29\",\r\n \"52.180.176.154/31\",\r\n \"52.180.183.226/32\",\r\n + \ \"168.61.136.0/27\",\r\n \"168.61.137.0/27\",\r\n \"2603:1030:f:1::280/123\",\r\n + \ \"2603:1030:f:2::200/121\",\r\n \"2603:1030:f:402::/122\",\r\n + \ \"2603:1030:f:403::/122\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.EastAsia\",\r\n \"id\": \"Sql.EastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.75.32.0/26\",\r\n + \ \"13.75.32.192/29\",\r\n \"13.75.33.0/26\",\r\n \"13.75.33.192/29\",\r\n + \ \"13.75.105.141/32\",\r\n \"13.75.108.188/32\",\r\n \"20.195.72.32/27\",\r\n + \ \"20.195.72.64/27\",\r\n \"20.195.72.128/26\",\r\n \"20.205.72.64/27\",\r\n + \ \"20.205.73.64/27\",\r\n \"20.205.77.176/29\",\r\n \"20.205.77.200/29\",\r\n + \ \"20.205.80.64/27\",\r\n \"20.205.81.64/27\",\r\n \"20.205.83.224/29\",\r\n + \ \"23.97.68.51/32\",\r\n \"23.97.74.21/32\",\r\n \"23.97.78.163/32\",\r\n + \ \"23.99.102.124/32\",\r\n \"23.99.118.196/32\",\r\n \"52.175.33.150/32\",\r\n + \ \"191.234.2.139/32\",\r\n \"191.234.2.140/31\",\r\n \"191.234.2.142/32\",\r\n + \ \"207.46.139.82/32\",\r\n \"207.46.140.180/32\",\r\n \"207.46.153.182/32\",\r\n + \ \"2603:1040:207::280/123\",\r\n \"2603:1040:207:1::200/121\",\r\n + \ \"2603:1040:207:400::/123\",\r\n \"2603:1040:207:401::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.EastUS\",\r\n + \ \"id\": \"Sql.EastUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"20.42.65.64/29\",\r\n \"20.42.65.96/27\",\r\n \"20.42.68.192/27\",\r\n + \ \"20.42.69.0/25\",\r\n \"20.42.73.0/29\",\r\n \"20.42.73.32/27\",\r\n + \ \"20.42.74.192/27\",\r\n \"20.42.75.0/25\",\r\n \"20.62.132.160/27\",\r\n + \ \"20.62.132.192/27\",\r\n \"20.62.133.0/26\",\r\n \"23.96.89.109/32\",\r\n + \ \"23.96.106.191/32\",\r\n \"40.71.8.0/26\",\r\n \"40.71.8.192/26\",\r\n + \ \"40.71.9.0/26\",\r\n \"40.71.9.192/26\",\r\n \"40.71.83.113/32\",\r\n + \ \"40.71.196.33/32\",\r\n \"40.71.211.227/32\",\r\n \"40.71.226.18/32\",\r\n + \ \"40.76.2.172/32\",\r\n \"40.76.26.90/32\",\r\n \"40.76.42.44/32\",\r\n + \ \"40.76.65.222/32\",\r\n \"40.76.66.9/32\",\r\n \"40.76.193.221/32\",\r\n + \ \"40.76.209.171/32\",\r\n \"40.76.219.185/32\",\r\n \"40.78.224.0/26\",\r\n + \ \"40.78.224.128/26\",\r\n \"40.78.225.0/26\",\r\n \"40.78.225.128/26\",\r\n + \ \"40.79.152.0/26\",\r\n \"40.79.152.192/26\",\r\n \"40.79.153.0/26\",\r\n + \ \"40.79.153.192/26\",\r\n \"40.114.40.118/32\",\r\n \"40.114.43.106/32\",\r\n + \ \"40.114.45.195/32\",\r\n \"40.114.46.128/32\",\r\n \"40.114.46.212/32\",\r\n + \ \"40.114.81.142/32\",\r\n \"40.117.42.73/32\",\r\n \"40.117.44.71/32\",\r\n + \ \"40.117.90.115/32\",\r\n \"40.117.97.189/32\",\r\n \"40.121.143.204/32\",\r\n + \ \"40.121.149.49/32\",\r\n \"40.121.154.241/32\",\r\n \"40.121.158.30/32\",\r\n + \ \"52.168.116.64/29\",\r\n \"52.168.117.96/27\",\r\n \"52.168.117.128/27\",\r\n + \ \"52.168.117.160/29\",\r\n \"52.168.118.0/25\",\r\n \"52.168.166.153/32\",\r\n + \ \"52.168.169.124/32\",\r\n \"52.168.183.223/32\",\r\n \"52.170.41.199/32\",\r\n + \ \"52.170.97.16/32\",\r\n \"52.170.98.29/32\",\r\n \"52.179.16.95/32\",\r\n + \ \"104.41.152.74/32\",\r\n \"104.45.158.30/32\",\r\n \"137.135.109.63/32\",\r\n + \ \"191.237.20.112/32\",\r\n \"191.237.82.74/32\",\r\n \"191.238.6.43/32\",\r\n + \ \"191.238.6.44/31\",\r\n \"191.238.6.46/32\",\r\n \"2603:1030:210::320/123\",\r\n + \ \"2603:1030:210::380/121\",\r\n \"2603:1030:210:400::/123\",\r\n + \ \"2603:1030:210:401::/123\",\r\n \"2603:1030:210:800::/123\",\r\n + \ \"2603:1030:210:801::/123\",\r\n \"2603:1030:210:c00::/123\",\r\n + \ \"2603:1030:210:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.EastUS2\",\r\n \"id\": \"Sql.EastUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.68.22.44/32\",\r\n + \ \"13.68.30.216/32\",\r\n \"13.68.87.133/32\",\r\n \"20.36.144.128/27\",\r\n + \ \"20.36.145.0/26\",\r\n \"20.62.58.128/25\",\r\n \"23.102.206.35/32\",\r\n + \ \"23.102.206.36/31\",\r\n \"40.70.144.0/26\",\r\n \"40.70.144.192/29\",\r\n + \ \"40.70.145.0/26\",\r\n \"40.79.84.180/32\",\r\n \"40.84.5.64/32\",\r\n + \ \"40.84.54.249/32\",\r\n \"52.167.104.0/26\",\r\n \"52.167.104.192/29\",\r\n + \ \"52.167.104.224/27\",\r\n \"52.167.105.0/26\",\r\n \"52.167.111.144/28\",\r\n + \ \"52.167.111.192/27\",\r\n \"52.167.117.226/32\",\r\n \"52.167.145.64/26\",\r\n + \ \"52.167.145.128/27\",\r\n \"52.177.185.181/32\",\r\n \"52.177.197.103/32\",\r\n + \ \"52.177.200.215/32\",\r\n \"52.179.157.248/32\",\r\n \"52.179.165.160/32\",\r\n + \ \"52.179.167.70/32\",\r\n \"52.179.178.184/32\",\r\n \"52.184.192.175/32\",\r\n + \ \"52.184.231.0/32\",\r\n \"52.225.222.124/32\",\r\n \"104.46.100.189/32\",\r\n + \ \"104.46.108.148/32\",\r\n \"104.208.149.0/26\",\r\n \"104.208.150.0/26\",\r\n + \ \"104.208.150.192/29\",\r\n \"104.208.161.78/32\",\r\n + \ \"104.208.163.201/32\",\r\n \"104.208.233.240/32\",\r\n + \ \"104.208.238.55/32\",\r\n \"104.208.241.224/32\",\r\n + \ \"104.209.186.94/32\",\r\n \"191.239.224.107/32\",\r\n + \ \"191.239.224.108/31\",\r\n \"191.239.224.110/32\",\r\n + \ \"2603:1030:40c::320/123\",\r\n \"2603:1030:40c::380/121\",\r\n + \ \"2603:1030:40c:400::/123\",\r\n \"2603:1030:40c:401::/123\",\r\n + \ \"2603:1030:40c:800::/123\",\r\n \"2603:1030:40c:801::/123\",\r\n + \ \"2603:1030:40c:c00::/123\",\r\n \"2603:1030:40c:c01::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.EastUS2EUAP\",\r\n + \ \"id\": \"Sql.EastUS2EUAP\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"eastus2euap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"20.51.17.160/27\",\r\n \"20.51.17.192/27\",\r\n + \ \"20.51.20.0/26\",\r\n \"40.74.144.0/27\",\r\n \"40.74.144.32/29\",\r\n + \ \"40.74.145.0/27\",\r\n \"40.74.145.32/29\",\r\n \"40.75.32.0/27\",\r\n + \ \"40.75.32.40/29\",\r\n \"40.75.33.0/27\",\r\n \"40.75.33.32/29\",\r\n + \ \"52.138.88.0/27\",\r\n \"52.138.88.32/29\",\r\n \"52.138.89.0/27\",\r\n + \ \"52.138.89.32/29\",\r\n \"52.225.188.46/32\",\r\n \"52.225.188.113/32\",\r\n + \ \"2603:1030:40b:2::200/123\",\r\n \"2603:1030:40b:2::280/121\",\r\n + \ \"2603:1030:40b:402::/122\",\r\n \"2603:1030:40b:403::/122\",\r\n + \ \"2603:1030:40b:802::/122\",\r\n \"2603:1030:40b:803::/122\",\r\n + \ \"2603:1030:40b:c02::/122\",\r\n \"2603:1030:40b:c03::/122\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.EastUS2Stage\",\r\n + \ \"id\": \"Sql.EastUS2Stage\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"137.116.31.224/27\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.FranceCentral\",\r\n \"id\": \"Sql.FranceCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.43.47.192/26\",\r\n + \ \"40.79.128.0/27\",\r\n \"40.79.128.32/29\",\r\n \"40.79.129.0/27\",\r\n + \ \"40.79.136.0/27\",\r\n \"40.79.136.32/29\",\r\n \"40.79.137.0/27\",\r\n + \ \"40.79.144.0/27\",\r\n \"40.79.144.32/29\",\r\n \"40.79.145.0/27\",\r\n + \ \"51.138.210.0/26\",\r\n \"2603:1020:805::320/123\",\r\n + \ \"2603:1020:805::380/121\",\r\n \"2603:1020:805:400::/123\",\r\n + \ \"2603:1020:805:401::/123\",\r\n \"2603:1020:805:800::/123\",\r\n + \ \"2603:1020:805:801::/123\",\r\n \"2603:1020:805:c00::/123\",\r\n + \ \"2603:1020:805:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.FranceSouth\",\r\n \"id\": \"Sql.FranceSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"40.79.176.0/27\",\r\n + \ \"40.79.176.40/29\",\r\n \"40.79.177.0/27\",\r\n \"40.79.177.32/29\",\r\n + \ \"52.136.185.0/25\",\r\n \"2603:1020:905::280/123\",\r\n + \ \"2603:1020:905:1::200/121\",\r\n \"2603:1020:905:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.GermanyNorth\",\r\n + \ \"id\": \"Sql.GermanyNorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"germanyn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"51.116.54.96/27\",\r\n \"51.116.54.128/27\",\r\n + \ \"51.116.54.192/26\",\r\n \"51.116.56.0/27\",\r\n \"51.116.57.0/27\",\r\n + \ \"51.116.57.32/29\",\r\n \"2603:1020:d04::280/123\",\r\n + \ \"2603:1020:d04:1::200/121\",\r\n \"2603:1020:d04:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.GermanyWestCentral\",\r\n + \ \"id\": \"Sql.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"51.116.149.32/27\",\r\n \"51.116.149.64/27\",\r\n + \ \"51.116.149.128/26\",\r\n \"51.116.152.0/27\",\r\n \"51.116.152.32/29\",\r\n + \ \"51.116.153.0/27\",\r\n \"51.116.240.0/27\",\r\n \"51.116.240.32/29\",\r\n + \ \"51.116.241.0/27\",\r\n \"51.116.248.0/27\",\r\n \"51.116.248.32/29\",\r\n + \ \"51.116.249.0/27\",\r\n \"2603:1020:c04::320/123\",\r\n + \ \"2603:1020:c04::380/121\",\r\n \"2603:1020:c04:400::/123\",\r\n + \ \"2603:1020:c04:401::/123\",\r\n \"2603:1020:c04:800::/123\",\r\n + \ \"2603:1020:c04:801::/123\",\r\n \"2603:1020:c04:c00::/123\",\r\n + \ \"2603:1020:c04:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.JapanEast\",\r\n \"id\": \"Sql.JapanEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.78.61.196/32\",\r\n + \ \"13.78.104.0/27\",\r\n \"13.78.104.32/29\",\r\n \"13.78.105.0/27\",\r\n + \ \"13.78.121.203/32\",\r\n \"20.89.1.64/27\",\r\n \"20.191.165.160/27\",\r\n + \ \"20.191.165.192/27\",\r\n \"20.191.166.0/26\",\r\n \"20.194.129.64/27\",\r\n + \ \"23.102.69.95/32\",\r\n \"23.102.71.13/32\",\r\n \"23.102.74.190/32\",\r\n + \ \"40.79.184.0/27\",\r\n \"40.79.184.32/29\",\r\n \"40.79.185.0/27\",\r\n + \ \"40.79.191.224/27\",\r\n \"40.79.192.0/27\",\r\n \"40.79.192.32/29\",\r\n + \ \"40.79.193.0/27\",\r\n \"52.185.152.149/32\",\r\n \"52.243.32.19/32\",\r\n + \ \"52.243.43.186/32\",\r\n \"104.41.168.103/32\",\r\n \"191.237.240.43/32\",\r\n + \ \"191.237.240.44/32\",\r\n \"191.237.240.46/32\",\r\n \"2603:1040:407::320/123\",\r\n + \ \"2603:1040:407::380/121\",\r\n \"2603:1040:407:400::/123\",\r\n + \ \"2603:1040:407:401::/123\",\r\n \"2603:1040:407:800::/123\",\r\n + \ \"2603:1040:407:801::/123\",\r\n \"2603:1040:407:c00::/123\",\r\n + \ \"2603:1040:407:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.JapanWest\",\r\n \"id\": \"Sql.JapanWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.189.225.160/27\",\r\n + \ \"20.189.225.192/27\",\r\n \"20.189.228.0/26\",\r\n \"40.74.96.0/27\",\r\n + \ \"40.74.96.32/29\",\r\n \"40.74.97.0/27\",\r\n \"40.74.114.22/32\",\r\n + \ \"40.74.115.153/32\",\r\n \"40.74.135.185/32\",\r\n \"104.214.148.156/32\",\r\n + \ \"104.214.150.17/32\",\r\n \"191.238.68.11/32\",\r\n \"191.238.68.12/31\",\r\n + \ \"191.238.68.14/32\",\r\n \"2603:1040:606::280/123\",\r\n + \ \"2603:1040:606:1::200/121\",\r\n \"2603:1040:606:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.JioIndiaCentral\",\r\n + \ \"id\": \"Sql.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.192.48.32/27\",\r\n + \ \"20.192.48.64/27\",\r\n \"20.192.48.128/26\",\r\n \"20.192.232.0/27\",\r\n + \ \"20.192.233.0/27\",\r\n \"20.192.233.32/29\",\r\n \"2603:1040:1104::500/123\",\r\n + \ \"2603:1040:1104:1::300/121\",\r\n \"2603:1040:1104:400::440/123\",\r\n + \ \"2603:1040:1104:402::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.JioIndiaWest\",\r\n \"id\": \"Sql.JioIndiaWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.192.167.224/27\",\r\n + \ \"20.193.192.0/27\",\r\n \"20.193.192.64/26\",\r\n \"20.193.200.0/27\",\r\n + \ \"20.193.200.32/29\",\r\n \"20.193.201.0/27\",\r\n \"2603:1040:d04:1::520/123\",\r\n + \ \"2603:1040:d04:1::580/121\",\r\n \"2603:1040:d04:400::400/123\",\r\n + \ \"2603:1040:d04:402::/123\",\r\n \"2603:1040:d04:403::/123\",\r\n + \ \"2603:1040:d04:802::/123\",\r\n \"2603:1040:d04:803::/123\",\r\n + \ \"2603:1040:d04:c03::/123\",\r\n \"2603:1040:d04:c04::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.KoreaCentral\",\r\n + \ \"id\": \"Sql.KoreaCentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"20.44.24.0/27\",\r\n \"20.44.24.32/29\",\r\n \"20.44.25.0/27\",\r\n + \ \"20.194.64.0/27\",\r\n \"20.194.64.32/29\",\r\n \"20.194.65.0/27\",\r\n + \ \"20.194.73.64/26\",\r\n \"20.194.73.128/26\",\r\n \"20.194.80.192/27\",\r\n + \ \"52.231.16.0/27\",\r\n \"52.231.16.32/29\",\r\n \"52.231.17.0/27\",\r\n + \ \"52.231.32.42/31\",\r\n \"52.231.39.56/32\",\r\n \"2603:1040:f05::320/123\",\r\n + \ \"2603:1040:f05::380/121\",\r\n \"2603:1040:f05:400::/123\",\r\n + \ \"2603:1040:f05:401::/123\",\r\n \"2603:1040:f05:800::/123\",\r\n + \ \"2603:1040:f05:801::/123\",\r\n \"2603:1040:f05:c00::/123\",\r\n + \ \"2603:1040:f05:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.KoreaSouth\",\r\n \"id\": \"Sql.KoreaSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"52.147.112.160/27\",\r\n + \ \"52.231.144.0/27\",\r\n \"52.231.145.0/27\",\r\n \"52.231.151.96/27\",\r\n + \ \"52.231.200.86/31\",\r\n \"52.231.206.133/32\",\r\n \"2603:1040:e05::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.NorthCentralUS\",\r\n + \ \"id\": \"Sql.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.49.119.32/27\",\r\n + \ \"20.49.119.64/27\",\r\n \"20.49.119.128/26\",\r\n \"23.96.178.199/32\",\r\n + \ \"23.96.202.229/32\",\r\n \"23.96.204.249/32\",\r\n \"23.96.205.215/32\",\r\n + \ \"23.96.214.69/32\",\r\n \"23.96.243.243/32\",\r\n \"23.96.247.75/32\",\r\n + \ \"23.96.249.37/32\",\r\n \"23.96.250.178/32\",\r\n \"23.98.55.75/32\",\r\n + \ \"23.101.165.167/32\",\r\n \"23.101.167.45/32\",\r\n \"23.101.170.98/32\",\r\n + \ \"52.162.104.0/26\",\r\n \"52.162.105.0/26\",\r\n \"52.162.105.192/28\",\r\n + \ \"52.162.125.1/32\",\r\n \"52.162.241.250/32\",\r\n \"65.52.208.91/32\",\r\n + \ \"65.52.213.108/32\",\r\n \"65.52.214.127/32\",\r\n \"65.52.218.82/32\",\r\n + \ \"157.55.208.150/32\",\r\n \"168.62.232.188/32\",\r\n \"168.62.235.49/32\",\r\n + \ \"168.62.235.241/32\",\r\n \"168.62.239.29/32\",\r\n \"191.236.148.44/32\",\r\n + \ \"191.236.153.120/32\",\r\n \"2603:1030:608::280/123\",\r\n + \ \"2603:1030:608:1::200/121\",\r\n \"2603:1030:608:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.NorthCentralUSStage\",\r\n + \ \"id\": \"Sql.NorthCentralUSStage\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"168.62.115.112/28\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.NorthEurope\",\r\n + \ \"id\": \"Sql.NorthEurope\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"13.69.224.0/26\",\r\n \"13.69.224.192/26\",\r\n + \ \"13.69.225.0/26\",\r\n \"13.69.225.192/26\",\r\n \"13.69.233.136/29\",\r\n + \ \"13.74.104.64/26\",\r\n \"13.74.104.128/26\",\r\n \"13.74.105.0/26\",\r\n + \ \"13.74.105.128/26\",\r\n \"13.74.105.192/29\",\r\n \"20.50.73.32/27\",\r\n + \ \"23.102.16.130/32\",\r\n \"23.102.23.219/32\",\r\n \"23.102.25.199/32\",\r\n + \ \"23.102.52.155/32\",\r\n \"23.102.57.142/32\",\r\n \"23.102.62.171/32\",\r\n + \ \"40.85.102.50/32\",\r\n \"40.113.14.53/32\",\r\n \"40.113.16.190/32\",\r\n + \ \"40.113.17.148/32\",\r\n \"40.113.20.38/32\",\r\n \"40.113.93.91/32\",\r\n + \ \"40.127.128.10/32\",\r\n \"40.127.135.67/32\",\r\n \"40.127.137.209/32\",\r\n + \ \"40.127.141.194/32\",\r\n \"40.127.177.139/32\",\r\n \"40.127.190.50/32\",\r\n + \ \"52.138.224.0/26\",\r\n \"52.138.224.128/26\",\r\n \"52.138.225.0/26\",\r\n + \ \"52.138.225.128/26\",\r\n \"52.138.229.72/29\",\r\n \"52.146.133.128/25\",\r\n + \ \"65.52.225.245/32\",\r\n \"65.52.226.209/32\",\r\n \"104.41.202.30/32\",\r\n + \ \"104.41.208.104/32\",\r\n \"104.41.210.68/32\",\r\n \"104.41.211.98/32\",\r\n + \ \"137.135.186.126/32\",\r\n \"137.135.189.158/32\",\r\n + \ \"137.135.205.85/32\",\r\n \"137.135.213.9/32\",\r\n \"138.91.48.99/32\",\r\n + \ \"138.91.58.227/32\",\r\n \"191.235.170.58/32\",\r\n \"191.235.193.75/32\",\r\n + \ \"191.235.193.76/31\",\r\n \"191.235.193.78/32\",\r\n \"191.235.193.139/32\",\r\n + \ \"191.235.193.140/31\",\r\n \"191.235.209.79/32\",\r\n + \ \"191.237.219.202/32\",\r\n \"2603:1020:5::320/123\",\r\n + \ \"2603:1020:5::380/121\",\r\n \"2603:1020:5:400::/123\",\r\n + \ \"2603:1020:5:401::/123\",\r\n \"2603:1020:5:800::/123\",\r\n + \ \"2603:1020:5:801::/123\",\r\n \"2603:1020:5:c00::/123\",\r\n + \ \"2603:1020:5:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.NorwayEast\",\r\n \"id\": \"Sql.NorwayEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"51.120.96.0/27\",\r\n + \ \"51.120.96.32/29\",\r\n \"51.120.97.0/27\",\r\n \"51.120.104.0/27\",\r\n + \ \"51.120.104.32/29\",\r\n \"51.120.105.0/27\",\r\n \"51.120.208.0/27\",\r\n + \ \"51.120.208.32/29\",\r\n \"51.120.209.0/27\",\r\n \"51.120.232.192/26\",\r\n + \ \"51.120.233.0/26\",\r\n \"2603:1020:e04::320/123\",\r\n + \ \"2603:1020:e04::380/121\",\r\n \"2603:1020:e04:400::/123\",\r\n + \ \"2603:1020:e04:401::/123\",\r\n \"2603:1020:e04:800::/123\",\r\n + \ \"2603:1020:e04:801::/123\",\r\n \"2603:1020:e04:c00::/123\",\r\n + \ \"2603:1020:e04:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.NorwayWest\",\r\n \"id\": \"Sql.NorwayWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"51.13.136.224/27\",\r\n + \ \"51.13.137.0/27\",\r\n \"51.13.137.64/26\",\r\n \"51.120.216.0/27\",\r\n + \ \"51.120.217.0/27\",\r\n \"51.120.217.32/29\",\r\n \"2603:1020:f04::280/123\",\r\n + \ \"2603:1020:f04:1::200/121\",\r\n \"2603:1020:f04:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.SouthAfricaNorth\",\r\n + \ \"id\": \"Sql.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"102.37.160.0/27\",\r\n + \ \"102.37.160.64/26\",\r\n \"102.133.120.0/27\",\r\n \"102.133.120.32/29\",\r\n + \ \"102.133.121.0/27\",\r\n \"102.133.152.0/27\",\r\n \"102.133.152.32/29\",\r\n + \ \"102.133.153.0/27\",\r\n \"102.133.221.224/27\",\r\n \"102.133.248.0/27\",\r\n + \ \"102.133.248.32/29\",\r\n \"102.133.249.0/27\",\r\n \"2603:1000:104::640/123\",\r\n + \ \"2603:1000:104::680/121\",\r\n \"2603:1000:104:400::/123\",\r\n + \ \"2603:1000:104:401::/123\",\r\n \"2603:1000:104:800::/123\",\r\n + \ \"2603:1000:104:801::/123\",\r\n \"2603:1000:104:c00::/123\",\r\n + \ \"2603:1000:104:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.SouthAfricaWest\",\r\n \"id\": \"Sql.SouthAfricaWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"102.37.80.96/27\",\r\n + \ \"102.37.80.128/27\",\r\n \"102.37.80.192/26\",\r\n \"102.133.24.0/27\",\r\n + \ \"102.133.25.0/27\",\r\n \"102.133.25.32/29\",\r\n \"2603:1000:4::280/123\",\r\n + \ \"2603:1000:4:1::200/121\",\r\n \"2603:1000:4:400::/123\",\r\n + \ \"2603:1000:4:401::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.SouthCentralUS\",\r\n \"id\": \"Sql.SouthCentralUS\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.65.31.249/32\",\r\n + \ \"13.65.39.207/32\",\r\n \"13.65.85.183/32\",\r\n \"13.65.200.105/32\",\r\n + \ \"13.65.209.243/32\",\r\n \"13.65.253.67/32\",\r\n \"13.66.60.72/32\",\r\n + \ \"13.66.60.111/32\",\r\n \"13.66.62.124/32\",\r\n \"13.84.223.76/32\",\r\n + \ \"13.85.65.48/32\",\r\n \"13.85.68.115/32\",\r\n \"13.85.69.107/32\",\r\n + \ \"20.45.120.0/27\",\r\n \"20.45.121.0/27\",\r\n \"20.45.121.32/29\",\r\n + \ \"20.49.88.0/27\",\r\n \"20.49.88.32/29\",\r\n \"20.49.89.0/27\",\r\n + \ \"20.49.89.32/29\",\r\n \"20.65.132.160/27\",\r\n \"20.65.132.192/27\",\r\n + \ \"20.65.133.0/26\",\r\n \"23.98.162.75/32\",\r\n \"23.98.162.76/31\",\r\n + \ \"23.98.162.78/32\",\r\n \"23.98.170.75/32\",\r\n \"23.98.170.76/31\",\r\n + \ \"23.102.172.251/32\",\r\n \"23.102.173.220/32\",\r\n \"23.102.174.146/32\",\r\n + \ \"23.102.179.187/32\",\r\n \"40.74.254.156/32\",\r\n \"40.84.153.95/32\",\r\n + \ \"40.84.155.210/32\",\r\n \"40.84.156.165/32\",\r\n \"40.84.191.1/32\",\r\n + \ \"40.84.193.16/32\",\r\n \"40.84.195.189/32\",\r\n \"40.84.231.203/32\",\r\n + \ \"40.124.8.76/32\",\r\n \"40.124.64.136/29\",\r\n \"40.124.64.160/27\",\r\n + \ \"40.124.65.128/27\",\r\n \"52.171.56.10/32\",\r\n \"52.183.250.62/32\",\r\n + \ \"104.214.16.0/26\",\r\n \"104.214.16.192/26\",\r\n \"104.214.17.0/26\",\r\n + \ \"104.214.17.192/26\",\r\n \"104.214.67.25/32\",\r\n \"104.214.73.137/32\",\r\n + \ \"104.214.78.242/32\",\r\n \"191.238.224.203/32\",\r\n + \ \"191.238.230.40/32\",\r\n \"2603:1030:807::320/123\",\r\n + \ \"2603:1030:807::380/121\",\r\n \"2603:1030:807:400::/123\",\r\n + \ \"2603:1030:807:401::/123\",\r\n \"2603:1030:807:800::/123\",\r\n + \ \"2603:1030:807:801::/123\",\r\n \"2603:1030:807:c00::/123\",\r\n + \ \"2603:1030:807:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.SouthCentralUSSTG\",\r\n \"id\": \"Sql.SouthCentralUSSTG\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.44.0.0/27\",\r\n + \ \"20.44.1.0/27\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Sql.SoutheastAsia\",\r\n \"id\": \"Sql.SoutheastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.67.16.0/26\",\r\n + \ \"13.67.16.192/29\",\r\n \"13.67.17.0/26\",\r\n \"13.67.48.255/32\",\r\n + \ \"13.67.56.134/32\",\r\n \"13.67.59.217/32\",\r\n \"13.76.90.3/32\",\r\n + \ \"13.76.247.54/32\",\r\n \"20.195.65.32/27\",\r\n \"20.195.65.64/27\",\r\n + \ \"20.195.65.128/26\",\r\n \"23.98.80.0/26\",\r\n \"23.98.80.192/29\",\r\n + \ \"23.98.81.0/26\",\r\n \"23.100.117.95/32\",\r\n \"23.100.119.70/32\",\r\n + \ \"23.101.18.228/32\",\r\n \"40.78.232.0/26\",\r\n \"40.78.232.192/29\",\r\n + \ \"40.78.233.0/26\",\r\n \"52.187.15.214/32\",\r\n \"52.187.76.130/32\",\r\n + \ \"104.43.15.0/32\",\r\n \"104.215.195.14/32\",\r\n \"104.215.196.52/32\",\r\n + \ \"111.221.106.161/32\",\r\n \"137.116.129.110/32\",\r\n + \ \"168.63.175.68/32\",\r\n \"2603:1040:5::420/123\",\r\n + \ \"2603:1040:5::480/121\",\r\n \"2603:1040:5:400::/123\",\r\n + \ \"2603:1040:5:401::/123\",\r\n \"2603:1040:5:800::/123\",\r\n + \ \"2603:1040:5:801::/123\",\r\n \"2603:1040:5:c00::/123\",\r\n + \ \"2603:1040:5:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.SouthIndia\",\r\n \"id\": \"Sql.SouthIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"40.78.192.0/27\",\r\n + \ \"40.78.192.32/29\",\r\n \"40.78.193.0/27\",\r\n \"40.78.193.32/29\",\r\n + \ \"52.172.24.47/32\",\r\n \"52.172.43.208/32\",\r\n \"52.172.113.96/27\",\r\n + \ \"52.172.113.128/27\",\r\n \"52.172.113.192/26\",\r\n \"104.211.224.146/31\",\r\n + \ \"2603:1040:c06::280/123\",\r\n \"2603:1040:c06:1::200/121\",\r\n + \ \"2603:1040:c06:400::/123\",\r\n \"2603:1040:c06:401::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.SwedenCentral\",\r\n + \ \"id\": \"Sql.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"51.12.46.32/27\",\r\n \"51.12.46.64/27\",\r\n \"51.12.46.128/26\",\r\n + \ \"51.12.96.0/27\",\r\n \"51.12.96.32/29\",\r\n \"51.12.97.0/27\",\r\n + \ \"51.12.224.0/27\",\r\n \"51.12.224.32/29\",\r\n \"51.12.225.0/27\",\r\n + \ \"51.12.232.0/27\",\r\n \"51.12.232.32/29\",\r\n \"51.12.233.0/27\",\r\n + \ \"2603:1020:1004:1::520/123\",\r\n \"2603:1020:1004:1::580/121\",\r\n + \ \"2603:1020:1004:400::400/123\",\r\n \"2603:1020:1004:402::/123\",\r\n + \ \"2603:1020:1004:403::/123\",\r\n \"2603:1020:1004:802::/123\",\r\n + \ \"2603:1020:1004:803::/123\",\r\n \"2603:1020:1004:c03::/123\",\r\n + \ \"2603:1020:1004:c04::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.SwitzerlandNorth\",\r\n \"id\": \"Sql.SwitzerlandNorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.208.16.64/27\",\r\n + \ \"20.208.17.64/27\",\r\n \"20.208.19.192/29\",\r\n \"51.103.200.64/27\",\r\n + \ \"51.103.201.64/27\",\r\n \"51.103.203.192/29\",\r\n \"51.107.56.0/27\",\r\n + \ \"51.107.56.32/29\",\r\n \"51.107.57.0/27\",\r\n \"51.107.242.32/27\",\r\n + \ \"51.107.242.64/27\",\r\n \"51.107.242.128/26\",\r\n \"2603:1020:a04::320/123\",\r\n + \ \"2603:1020:a04::380/121\",\r\n \"2603:1020:a04:400::/123\",\r\n + \ \"2603:1020:a04:401::/123\",\r\n \"2603:1020:a04:800::/123\",\r\n + \ \"2603:1020:a04:801::/123\",\r\n \"2603:1020:a04:c00::/123\",\r\n + \ \"2603:1020:a04:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.SwitzerlandWest\",\r\n \"id\": \"Sql.SwitzerlandWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"51.107.152.0/27\",\r\n + \ \"51.107.153.0/27\",\r\n \"51.107.153.32/29\",\r\n \"51.107.250.64/26\",\r\n + \ \"51.107.250.128/26\",\r\n \"2603:1020:b04::280/123\",\r\n + \ \"2603:1020:b04:1::200/121\",\r\n \"2603:1020:b04:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.UAECentral\",\r\n + \ \"id\": \"Sql.UAECentral\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"uaecentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"20.37.71.64/26\",\r\n \"20.37.71.128/26\",\r\n \"20.37.72.64/27\",\r\n + \ \"20.37.72.96/29\",\r\n \"20.37.73.64/27\",\r\n \"20.37.73.96/29\",\r\n + \ \"2603:1040:b04::280/123\",\r\n \"2603:1040:b04:1::200/121\",\r\n + \ \"2603:1040:b04:400::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.UAENorth\",\r\n \"id\": \"Sql.UAENorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"uaenorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.38.143.64/26\",\r\n + \ \"20.38.143.128/26\",\r\n \"20.38.152.24/29\",\r\n \"40.120.72.0/27\",\r\n + \ \"40.120.72.32/29\",\r\n \"40.120.73.0/27\",\r\n \"65.52.248.0/27\",\r\n + \ \"65.52.248.32/29\",\r\n \"65.52.249.0/27\",\r\n \"2603:1040:904::320/123\",\r\n + \ \"2603:1040:904::380/121\",\r\n \"2603:1040:904:400::/123\",\r\n + \ \"2603:1040:904:401::/123\",\r\n \"2603:1040:904:800::/123\",\r\n + \ \"2603:1040:904:801::/123\",\r\n \"2603:1040:904:c00::/123\",\r\n + \ \"2603:1040:904:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.UKSouth\",\r\n \"id\": \"Sql.UKSouth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"uksouth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"51.105.64.0/27\",\r\n + \ \"51.105.64.32/29\",\r\n \"51.105.65.0/27\",\r\n \"51.105.72.0/27\",\r\n + \ \"51.105.72.32/29\",\r\n \"51.105.73.0/27\",\r\n \"51.132.193.64/27\",\r\n + \ \"51.140.77.9/32\",\r\n \"51.140.114.26/32\",\r\n \"51.140.115.150/32\",\r\n + \ \"51.140.144.0/27\",\r\n \"51.140.144.32/29\",\r\n \"51.140.145.0/27\",\r\n + \ \"51.140.151.128/27\",\r\n \"51.140.180.9/32\",\r\n \"51.140.183.238/32\",\r\n + \ \"51.140.184.11/32\",\r\n \"51.143.209.224/27\",\r\n \"51.143.212.0/27\",\r\n + \ \"51.143.212.64/26\",\r\n \"2603:1020:705::320/123\",\r\n + \ \"2603:1020:705::380/121\",\r\n \"2603:1020:705:400::/123\",\r\n + \ \"2603:1020:705:401::/123\",\r\n \"2603:1020:705:800::/123\",\r\n + \ \"2603:1020:705:801::/123\",\r\n \"2603:1020:705:c00::/123\",\r\n + \ \"2603:1020:705:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.UKWest\",\r\n \"id\": \"Sql.UKWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"ukwest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"20.58.66.128/25\",\r\n + \ \"20.58.68.56/30\",\r\n \"51.140.208.64/27\",\r\n \"51.140.208.96/29\",\r\n + \ \"51.140.209.0/27\",\r\n \"51.140.209.32/29\",\r\n \"51.141.8.11/32\",\r\n + \ \"51.141.15.53/32\",\r\n \"51.141.25.212/32\",\r\n \"2603:1020:605::280/123\",\r\n + \ \"2603:1020:605:1::200/121\",\r\n \"2603:1020:605:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.WestCentralUS\",\r\n + \ \"id\": \"Sql.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"13.71.192.0/27\",\r\n \"13.71.193.0/27\",\r\n \"13.71.193.32/29\",\r\n + \ \"13.78.144.57/32\",\r\n \"13.78.145.25/32\",\r\n \"13.78.148.71/32\",\r\n + \ \"13.78.151.189/32\",\r\n \"13.78.151.207/32\",\r\n \"13.78.178.116/32\",\r\n + \ \"13.78.178.151/32\",\r\n \"13.78.248.32/27\",\r\n \"20.69.0.32/27\",\r\n + \ \"20.69.0.64/27\",\r\n \"20.69.0.128/26\",\r\n \"52.161.15.204/32\",\r\n + \ \"52.161.100.158/32\",\r\n \"52.161.105.228/32\",\r\n \"52.161.128.32/27\",\r\n + \ \"2603:1030:b04::280/123\",\r\n \"2603:1030:b04:1::200/121\",\r\n + \ \"2603:1030:b04:400::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.WestEurope\",\r\n \"id\": \"Sql.WestEurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.69.104.0/26\",\r\n + \ \"13.69.104.192/26\",\r\n \"13.69.105.0/26\",\r\n \"13.69.105.192/26\",\r\n + \ \"13.69.111.32/27\",\r\n \"13.69.112.168/29\",\r\n \"13.69.116.64/27\",\r\n + \ \"13.69.116.96/30\",\r\n \"13.69.116.128/25\",\r\n \"20.50.201.224/27\",\r\n + \ \"20.50.202.0/26\",\r\n \"20.61.99.192/26\",\r\n \"20.61.102.0/26\",\r\n + \ \"23.97.167.46/32\",\r\n \"23.97.169.19/32\",\r\n \"23.97.219.82/32\",\r\n + \ \"23.97.221.176/32\",\r\n \"23.101.64.10/32\",\r\n \"40.68.37.158/32\",\r\n + \ \"40.68.215.206/32\",\r\n \"40.68.220.16/32\",\r\n \"40.74.51.145/32\",\r\n + \ \"40.74.53.36/32\",\r\n \"40.74.60.91/32\",\r\n \"40.114.240.125/32\",\r\n + \ \"40.114.240.162/32\",\r\n \"40.115.37.61/32\",\r\n \"40.115.51.118/32\",\r\n + \ \"40.115.52.141/32\",\r\n \"40.115.53.255/32\",\r\n \"40.115.61.208/32\",\r\n + \ \"40.118.12.208/32\",\r\n \"52.166.76.0/32\",\r\n \"52.166.131.195/32\",\r\n + \ \"52.178.17.192/27\",\r\n \"52.178.21.0/26\",\r\n \"52.178.21.64/27\",\r\n + \ \"52.236.184.0/27\",\r\n \"52.236.184.32/29\",\r\n \"52.236.184.128/25\",\r\n + \ \"52.236.185.0/27\",\r\n \"52.236.185.128/25\",\r\n \"104.40.155.247/32\",\r\n + \ \"104.40.168.64/26\",\r\n \"104.40.168.192/26\",\r\n \"104.40.169.0/27\",\r\n + \ \"104.40.169.32/29\",\r\n \"104.40.169.128/25\",\r\n \"104.45.11.99/32\",\r\n + \ \"104.45.14.115/32\",\r\n \"104.46.38.143/32\",\r\n \"104.46.40.24/32\",\r\n + \ \"104.47.157.97/32\",\r\n \"137.116.203.91/32\",\r\n \"168.63.13.214/32\",\r\n + \ \"168.63.98.91/32\",\r\n \"191.233.69.227/32\",\r\n \"191.233.90.117/32\",\r\n + \ \"191.237.232.75/32\",\r\n \"191.237.232.76/31\",\r\n \"191.237.232.78/32\",\r\n + \ \"191.237.232.235/32\",\r\n \"191.237.232.236/31\",\r\n + \ \"2603:1020:206::320/123\",\r\n \"2603:1020:206::380/121\",\r\n + \ \"2603:1020:206:400::/123\",\r\n \"2603:1020:206:401::/123\",\r\n + \ \"2603:1020:206:800::/123\",\r\n \"2603:1020:206:801::/123\",\r\n + \ \"2603:1020:206:c00::/123\",\r\n \"2603:1020:206:c01::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.WestIndia\",\r\n + \ \"id\": \"Sql.WestIndia\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"westindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"52.136.53.160/27\",\r\n \"52.136.53.192/27\",\r\n + \ \"104.211.144.0/27\",\r\n \"104.211.144.32/29\",\r\n \"104.211.145.0/27\",\r\n + \ \"104.211.145.32/29\",\r\n \"104.211.160.80/31\",\r\n \"104.211.185.58/32\",\r\n + \ \"104.211.190.46/32\",\r\n \"2603:1040:806::280/123\",\r\n + \ \"2603:1040:806:1::200/121\",\r\n \"2603:1040:806:400::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.WestUS\",\r\n + \ \"id\": \"Sql.WestUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"4\",\r\n \"region\": + \"westus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"13.86.216.0/25\",\r\n \"13.86.216.128/26\",\r\n + \ \"13.86.216.192/27\",\r\n \"13.86.217.0/25\",\r\n \"13.86.217.128/26\",\r\n + \ \"13.86.217.192/27\",\r\n \"13.86.217.224/29\",\r\n \"13.88.14.200/32\",\r\n + \ \"13.88.29.70/32\",\r\n \"13.91.4.219/32\",\r\n \"13.91.6.136/32\",\r\n + \ \"13.91.41.153/32\",\r\n \"13.91.44.56/32\",\r\n \"13.91.46.83/32\",\r\n + \ \"13.91.47.72/32\",\r\n \"13.93.165.251/32\",\r\n \"13.93.237.158/32\",\r\n + \ \"20.66.3.64/26\",\r\n \"20.66.3.128/26\",\r\n \"20.189.172.224/27\",\r\n + \ \"23.99.4.210/32\",\r\n \"23.99.4.248/32\",\r\n \"23.99.10.185/32\",\r\n + \ \"23.99.34.75/32\",\r\n \"23.99.34.76/31\",\r\n \"23.99.34.78/32\",\r\n + \ \"23.99.37.235/32\",\r\n \"23.99.37.236/32\",\r\n \"23.99.57.14/32\",\r\n + \ \"23.99.80.243/32\",\r\n \"23.99.89.212/32\",\r\n \"23.99.90.75/32\",\r\n + \ \"23.99.91.130/32\",\r\n \"40.78.16.122/32\",\r\n \"40.78.23.252/32\",\r\n + \ \"40.78.31.250/32\",\r\n \"40.78.57.109/32\",\r\n \"40.78.101.91/32\",\r\n + \ \"40.78.110.18/32\",\r\n \"40.78.111.189/32\",\r\n \"40.83.178.165/32\",\r\n + \ \"40.83.186.249/32\",\r\n \"40.112.139.250/32\",\r\n \"40.112.240.0/27\",\r\n + \ \"40.112.246.0/27\",\r\n \"40.118.129.167/32\",\r\n \"40.118.170.1/32\",\r\n + \ \"40.118.209.206/32\",\r\n \"40.118.244.227/32\",\r\n \"40.118.249.123/32\",\r\n + \ \"40.118.250.19/32\",\r\n \"104.40.49.103/32\",\r\n \"104.40.54.130/32\",\r\n + \ \"104.40.82.151/32\",\r\n \"104.42.127.95/32\",\r\n \"104.42.136.93/32\",\r\n + \ \"104.42.188.130/32\",\r\n \"104.42.192.190/32\",\r\n \"104.42.231.253/32\",\r\n + \ \"104.42.237.198/32\",\r\n \"104.42.238.205/32\",\r\n \"104.210.32.128/32\",\r\n + \ \"137.135.51.212/32\",\r\n \"138.91.145.12/32\",\r\n \"138.91.160.189/32\",\r\n + \ \"138.91.240.14/32\",\r\n \"138.91.246.31/32\",\r\n \"138.91.247.51/32\",\r\n + \ \"138.91.251.139/32\",\r\n \"191.236.119.31/32\",\r\n \"191.239.12.154/32\",\r\n + \ \"2603:1030:a07::280/123\",\r\n \"2603:1030:a07:1::200/121\",\r\n + \ \"2603:1030:a07:400::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Sql.WestUS2\",\r\n \"id\": \"Sql.WestUS2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"westus2\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureSQL\",\r\n \"addressPrefixes\": [\r\n \"13.66.136.0/26\",\r\n + \ \"13.66.136.192/29\",\r\n \"13.66.137.0/26\",\r\n \"13.66.226.202/32\",\r\n + \ \"13.66.229.222/32\",\r\n \"13.66.230.19/32\",\r\n \"13.66.230.60/32\",\r\n + \ \"13.66.230.64/32\",\r\n \"13.66.230.103/32\",\r\n \"20.51.9.128/25\",\r\n + \ \"40.78.240.0/26\",\r\n \"40.78.240.192/29\",\r\n \"40.78.241.0/26\",\r\n + \ \"40.78.248.0/26\",\r\n \"40.78.248.192/29\",\r\n \"40.78.249.0/26\",\r\n + \ \"52.191.144.64/26\",\r\n \"52.191.152.64/26\",\r\n \"52.191.172.187/32\",\r\n + \ \"52.191.174.114/32\",\r\n \"52.229.17.93/32\",\r\n \"52.246.251.248/32\",\r\n + \ \"2603:1030:c06:2::200/123\",\r\n \"2603:1030:c06:2::280/121\",\r\n + \ \"2603:1030:c06:401::/123\",\r\n \"2603:1030:c06:402::/123\",\r\n + \ \"2603:1030:c06:800::/123\",\r\n \"2603:1030:c06:801::/123\",\r\n + \ \"2603:1030:c06:c00::/123\",\r\n \"2603:1030:c06:c01::/123\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Sql.WestUS3\",\r\n + \ \"id\": \"Sql.WestUS3\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"1\",\r\n \"region\": + \"westus3\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureSQL\",\r\n \"addressPrefixes\": + [\r\n \"20.150.168.0/27\",\r\n \"20.150.168.32/29\",\r\n + \ \"20.150.169.0/27\",\r\n \"20.150.176.0/27\",\r\n \"20.150.176.32/29\",\r\n + \ \"20.150.177.0/27\",\r\n \"20.150.184.0/27\",\r\n \"20.150.184.32/29\",\r\n + \ \"20.150.185.0/27\",\r\n \"20.150.241.128/25\",\r\n \"2603:1030:504::520/123\",\r\n + \ \"2603:1030:504::580/121\",\r\n \"2603:1030:504:400::/123\",\r\n + \ \"2603:1030:504:401::/123\",\r\n \"2603:1030:504:800::/123\",\r\n + \ \"2603:1030:504:801::/123\",\r\n \"2603:1030:504:c00::/123\",\r\n + \ \"2603:1030:504:c01::/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"SqlManagement\",\r\n \"id\": \"SqlManagement\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"SqlManagement\",\r\n \"addressPrefixes\": + [\r\n \"13.64.155.40/32\",\r\n \"13.66.140.96/27\",\r\n + \ \"13.66.141.192/27\",\r\n \"13.67.8.192/27\",\r\n \"13.67.10.32/27\",\r\n + \ \"13.69.64.96/27\",\r\n \"13.69.67.0/27\",\r\n \"13.69.106.96/27\",\r\n + \ \"13.69.107.32/27\",\r\n \"13.69.227.96/27\",\r\n \"13.69.229.192/27\",\r\n + \ \"13.70.72.160/27\",\r\n \"13.70.73.224/27\",\r\n \"13.71.119.167/32\",\r\n + \ \"13.71.123.234/32\",\r\n \"13.71.170.160/27\",\r\n \"13.71.173.96/27\",\r\n + \ \"13.71.195.0/27\",\r\n \"13.71.196.96/27\",\r\n \"13.73.240.192/27\",\r\n + \ \"13.73.242.0/27\",\r\n \"13.73.249.176/28\",\r\n \"13.74.107.96/27\",\r\n + \ \"13.74.107.224/27\",\r\n \"13.75.36.32/27\",\r\n \"13.75.39.32/27\",\r\n + \ \"13.77.50.192/27\",\r\n \"13.77.53.0/27\",\r\n \"13.78.106.224/27\",\r\n + \ \"13.78.109.64/27\",\r\n \"13.78.181.246/32\",\r\n \"13.78.182.82/32\",\r\n + \ \"13.84.52.76/32\",\r\n \"13.86.219.96/27\",\r\n \"13.87.39.133/32\",\r\n + \ \"13.87.39.173/32\",\r\n \"13.87.56.192/27\",\r\n \"13.87.58.0/27\",\r\n + \ \"13.87.122.192/27\",\r\n \"13.87.124.0/27\",\r\n \"13.89.170.224/27\",\r\n + \ \"13.89.174.96/27\",\r\n \"13.92.242.41/32\",\r\n \"13.94.47.38/32\",\r\n + \ \"13.104.248.32/27\",\r\n \"13.104.248.96/27\",\r\n \"20.21.39.240/28\",\r\n + \ \"20.21.46.0/26\",\r\n \"20.21.67.224/27\",\r\n \"20.21.69.128/27\",\r\n + \ \"20.21.75.224/27\",\r\n \"20.21.77.128/27\",\r\n \"20.36.46.202/32\",\r\n + \ \"20.36.46.220/32\",\r\n \"20.36.75.75/32\",\r\n \"20.36.75.114/32\",\r\n + \ \"20.36.108.0/27\",\r\n \"20.36.108.64/27\",\r\n \"20.36.115.160/27\",\r\n + \ \"20.36.115.192/27\",\r\n \"20.36.123.0/28\",\r\n \"20.37.67.64/28\",\r\n + \ \"20.37.76.0/27\",\r\n \"20.37.76.64/27\",\r\n \"20.37.198.96/28\",\r\n + \ \"20.37.227.0/28\",\r\n \"20.38.87.208/28\",\r\n \"20.38.128.0/27\",\r\n + \ \"20.38.139.64/28\",\r\n \"20.38.146.192/27\",\r\n \"20.38.147.32/27\",\r\n + \ \"20.39.12.240/28\",\r\n \"20.40.200.176/28\",\r\n \"20.41.67.96/28\",\r\n + \ \"20.41.197.32/28\",\r\n \"20.42.131.34/31\",\r\n \"20.42.230.96/28\",\r\n + \ \"20.43.43.176/28\",\r\n \"20.43.70.80/28\",\r\n \"20.43.120.192/27\",\r\n + \ \"20.44.4.0/26\",\r\n \"20.44.8.128/27\",\r\n \"20.44.16.160/27\",\r\n + \ \"20.44.26.192/27\",\r\n \"20.44.27.160/27\",\r\n \"20.45.75.228/32\",\r\n + \ \"20.45.75.230/32\",\r\n \"20.45.114.208/28\",\r\n \"20.45.122.192/27\",\r\n + \ \"20.45.126.32/27\",\r\n \"20.45.197.240/28\",\r\n \"20.47.216.224/27\",\r\n + \ \"20.49.83.160/27\",\r\n \"20.49.83.192/27\",\r\n \"20.49.91.160/27\",\r\n + \ \"20.49.93.96/27\",\r\n \"20.49.99.48/28\",\r\n \"20.49.109.64/28\",\r\n + \ \"20.49.113.16/28\",\r\n \"20.49.120.48/28\",\r\n \"20.50.1.224/28\",\r\n + \ \"20.51.13.68/30\",\r\n \"20.69.2.8/30\",\r\n \"20.72.21.16/28\",\r\n + \ \"20.72.28.224/27\",\r\n \"20.72.30.128/27\",\r\n \"20.150.165.160/28\",\r\n + \ \"20.150.170.32/27\",\r\n \"20.150.170.128/27\",\r\n \"20.150.172.96/27\",\r\n + \ \"20.150.178.192/26\",\r\n \"20.150.186.192/26\",\r\n \"20.187.194.208/28\",\r\n + \ \"20.192.98.192/26\",\r\n \"20.192.165.192/28\",\r\n \"20.192.230.16/28\",\r\n + \ \"20.192.238.32/27\",\r\n \"20.192.238.64/27\",\r\n \"20.193.205.160/27\",\r\n + \ \"20.193.205.192/27\",\r\n \"20.194.67.128/26\",\r\n \"20.205.75.224/27\",\r\n + \ \"20.205.77.128/27\",\r\n \"20.205.78.0/25\",\r\n \"20.205.85.128/26\",\r\n + \ \"20.208.19.224/27\",\r\n \"20.208.21.128/27\",\r\n \"23.96.185.63/32\",\r\n + \ \"23.96.243.93/32\",\r\n \"23.97.120.24/32\",\r\n \"23.98.82.128/27\",\r\n + \ \"23.98.83.32/27\",\r\n \"23.98.104.144/28\",\r\n \"23.99.97.255/32\",\r\n + \ \"40.64.132.112/28\",\r\n \"40.65.124.161/32\",\r\n \"40.67.50.224/28\",\r\n + \ \"40.67.58.32/27\",\r\n \"40.67.60.32/27\",\r\n \"40.69.106.192/27\",\r\n + \ \"40.69.108.0/27\",\r\n \"40.69.161.215/32\",\r\n \"40.70.72.228/32\",\r\n + \ \"40.70.146.96/27\",\r\n \"40.70.148.64/27\",\r\n \"40.71.10.224/27\",\r\n + \ \"40.71.13.192/27\",\r\n \"40.71.215.148/32\",\r\n \"40.74.100.192/27\",\r\n + \ \"40.74.101.224/27\",\r\n \"40.74.147.0/27\",\r\n \"40.74.147.96/27\",\r\n + \ \"40.74.147.128/27\",\r\n \"40.74.254.227/32\",\r\n \"40.75.34.64/27\",\r\n + \ \"40.75.35.0/27\",\r\n \"40.78.194.192/27\",\r\n \"40.78.196.0/27\",\r\n + \ \"40.78.203.128/27\",\r\n \"40.78.203.192/27\",\r\n \"40.78.226.224/27\",\r\n + \ \"40.78.229.0/27\",\r\n \"40.78.234.64/27\",\r\n \"40.78.234.224/27\",\r\n + \ \"40.78.242.192/27\",\r\n \"40.78.243.128/27\",\r\n \"40.78.250.128/27\",\r\n + \ \"40.78.251.64/27\",\r\n \"40.79.32.162/32\",\r\n \"40.79.130.160/27\",\r\n + \ \"40.79.132.0/27\",\r\n \"40.79.138.64/27\",\r\n \"40.79.138.160/27\",\r\n + \ \"40.79.146.64/27\",\r\n \"40.79.146.160/27\",\r\n \"40.79.154.0/27\",\r\n + \ \"40.79.154.224/27\",\r\n \"40.79.156.0/27\",\r\n \"40.79.162.64/27\",\r\n + \ \"40.79.162.160/27\",\r\n \"40.79.170.160/27\",\r\n \"40.79.171.0/27\",\r\n + \ \"40.79.178.192/27\",\r\n \"40.79.179.224/27\",\r\n \"40.79.186.96/27\",\r\n + \ \"40.79.187.128/27\",\r\n \"40.79.194.0/27\",\r\n \"40.79.195.128/27\",\r\n + \ \"40.80.50.192/27\",\r\n \"40.80.51.32/27\",\r\n \"40.80.62.0/28\",\r\n + \ \"40.80.172.32/28\",\r\n \"40.89.20.144/28\",\r\n \"40.112.243.128/27\",\r\n + \ \"40.120.75.192/26\",\r\n \"40.123.207.224/32\",\r\n \"40.123.219.239/32\",\r\n + \ \"40.126.238.47/32\",\r\n \"40.127.3.232/32\",\r\n \"51.12.42.0/28\",\r\n + \ \"51.12.98.32/27\",\r\n \"51.12.98.128/27\",\r\n \"51.12.194.0/28\",\r\n + \ \"51.12.202.32/27\",\r\n \"51.12.202.128/27\",\r\n \"51.12.226.192/26\",\r\n + \ \"51.12.234.192/26\",\r\n \"51.103.203.224/27\",\r\n \"51.103.205.128/27\",\r\n + \ \"51.104.8.192/27\",\r\n \"51.104.28.240/28\",\r\n \"51.105.66.192/27\",\r\n + \ \"51.105.67.128/27\",\r\n \"51.105.74.192/27\",\r\n \"51.105.75.32/27\",\r\n + \ \"51.105.83.0/28\",\r\n \"51.105.90.160/28\",\r\n \"51.107.51.0/28\",\r\n + \ \"51.107.58.32/27\",\r\n \"51.107.60.0/27\",\r\n \"51.107.147.0/28\",\r\n + \ \"51.107.154.32/27\",\r\n \"51.107.156.0/27\",\r\n \"51.116.49.144/28\",\r\n + \ \"51.116.58.32/27\",\r\n \"51.116.60.0/27\",\r\n \"51.116.145.144/28\",\r\n + \ \"51.116.154.96/27\",\r\n \"51.116.156.0/27\",\r\n \"51.116.242.192/26\",\r\n + \ \"51.116.243.32/27\",\r\n \"51.116.250.192/27\",\r\n \"51.116.253.96/27\",\r\n + \ \"51.120.43.64/28\",\r\n \"51.120.98.32/27\",\r\n \"51.120.100.0/27\",\r\n + \ \"51.120.106.192/26\",\r\n \"51.120.210.192/26\",\r\n \"51.120.218.32/27\",\r\n + \ \"51.120.218.128/27\",\r\n \"51.120.227.64/28\",\r\n \"51.137.164.96/28\",\r\n + \ \"51.140.121.92/32\",\r\n \"51.140.127.51/32\",\r\n \"51.140.146.224/27\",\r\n + \ \"51.140.210.224/27\",\r\n \"51.140.212.32/27\",\r\n \"51.141.38.88/32\",\r\n + \ \"51.141.39.175/32\",\r\n \"51.143.195.0/28\",\r\n \"52.136.51.80/28\",\r\n + \ \"52.136.139.224/32\",\r\n \"52.136.140.157/32\",\r\n \"52.138.90.96/27\",\r\n + \ \"52.138.226.96/27\",\r\n \"52.138.226.224/27\",\r\n \"52.140.108.80/28\",\r\n + \ \"52.143.136.162/32\",\r\n \"52.143.139.82/32\",\r\n \"52.150.139.78/31\",\r\n + \ \"52.150.152.32/28\",\r\n \"52.162.107.128/27\",\r\n \"52.162.110.192/27\",\r\n + \ \"52.164.200.174/32\",\r\n \"52.165.237.178/32\",\r\n \"52.166.50.138/32\",\r\n + \ \"52.167.106.96/27\",\r\n \"52.167.106.224/27\",\r\n \"52.169.6.70/32\",\r\n + \ \"52.172.193.99/32\",\r\n \"52.172.204.185/32\",\r\n \"52.173.243.204/32\",\r\n + \ \"52.175.156.251/32\",\r\n \"52.182.138.224/27\",\r\n \"52.182.139.96/27\",\r\n + \ \"52.183.64.43/32\",\r\n \"52.185.145.40/32\",\r\n \"52.185.154.136/32\",\r\n + \ \"52.187.185.17/32\",\r\n \"52.225.130.171/32\",\r\n \"52.228.84.112/28\",\r\n + \ \"52.230.122.197/32\",\r\n \"52.231.18.160/27\",\r\n \"52.231.19.224/27\",\r\n + \ \"52.231.30.200/32\",\r\n \"52.231.34.21/32\",\r\n \"52.231.146.224/27\",\r\n + \ \"52.231.148.32/27\",\r\n \"52.231.202.76/32\",\r\n \"52.231.206.187/32\",\r\n + \ \"52.233.30.2/32\",\r\n \"52.233.38.82/32\",\r\n \"52.233.130.100/32\",\r\n + \ \"52.235.36.131/32\",\r\n \"52.236.186.96/27\",\r\n \"52.236.187.32/27\",\r\n + \ \"52.237.244.169/32\",\r\n \"52.242.36.170/32\",\r\n \"52.243.87.200/32\",\r\n + \ \"52.246.154.192/27\",\r\n \"52.246.155.32/27\",\r\n \"52.255.51.21/32\",\r\n + \ \"65.52.252.0/27\",\r\n \"65.52.252.64/27\",\r\n \"102.133.27.224/27\",\r\n + \ \"102.133.28.32/27\",\r\n \"102.133.58.208/28\",\r\n \"102.133.72.35/32\",\r\n + \ \"102.133.72.42/32\",\r\n \"102.133.122.192/27\",\r\n \"102.133.123.192/27\",\r\n + \ \"102.133.155.224/27\",\r\n \"102.133.156.32/27\",\r\n + \ \"102.133.160.35/32\",\r\n \"102.133.218.128/28\",\r\n + \ \"102.133.250.192/27\",\r\n \"102.133.251.32/27\",\r\n + \ \"104.42.96.175/32\",\r\n \"104.208.16.96/27\",\r\n \"104.208.144.96/27\",\r\n + \ \"104.211.81.160/27\",\r\n \"104.211.146.192/27\",\r\n + \ \"104.211.187.232/32\",\r\n \"104.214.19.0/27\",\r\n \"104.214.108.80/32\",\r\n + \ \"104.215.17.87/32\",\r\n \"191.232.163.58/32\",\r\n \"191.233.11.128/28\",\r\n + \ \"191.233.54.32/27\",\r\n \"191.233.54.192/27\",\r\n \"191.233.203.160/27\",\r\n + \ \"191.233.205.32/27\",\r\n \"191.234.136.64/28\",\r\n \"191.234.146.192/26\",\r\n + \ \"191.234.154.192/26\",\r\n \"2603:1000:4:402::380/122\",\r\n + \ \"2603:1000:104:402::380/122\",\r\n \"2603:1000:104:802::260/123\",\r\n + \ \"2603:1000:104:802::280/123\",\r\n \"2603:1000:104:c02::260/123\",\r\n + \ \"2603:1000:104:c02::280/123\",\r\n \"2603:1010:6:402::380/122\",\r\n + \ \"2603:1010:6:802::260/123\",\r\n \"2603:1010:6:802::280/123\",\r\n + \ \"2603:1010:6:c02::260/123\",\r\n \"2603:1010:6:c02::280/123\",\r\n + \ \"2603:1010:101:402::380/122\",\r\n \"2603:1010:304:402::380/122\",\r\n + \ \"2603:1010:404:402::380/122\",\r\n \"2603:1020:5:402::380/122\",\r\n + \ \"2603:1020:5:802::260/123\",\r\n \"2603:1020:5:802::280/123\",\r\n + \ \"2603:1020:5:c02::260/123\",\r\n \"2603:1020:5:c02::280/123\",\r\n + \ \"2603:1020:206:402::380/122\",\r\n \"2603:1020:206:802::260/123\",\r\n + \ \"2603:1020:206:802::280/123\",\r\n \"2603:1020:206:c02::260/123\",\r\n + \ \"2603:1020:206:c02::280/123\",\r\n \"2603:1020:305:402::380/122\",\r\n + \ \"2603:1020:405:402::380/122\",\r\n \"2603:1020:605:402::380/122\",\r\n + \ \"2603:1020:705:402::380/122\",\r\n \"2603:1020:705:802::260/123\",\r\n + \ \"2603:1020:705:802::280/123\",\r\n \"2603:1020:705:c02::260/123\",\r\n + \ \"2603:1020:705:c02::280/123\",\r\n \"2603:1020:805:402::380/122\",\r\n + \ \"2603:1020:805:802::260/123\",\r\n \"2603:1020:805:802::280/123\",\r\n + \ \"2603:1020:805:c02::260/123\",\r\n \"2603:1020:805:c02::280/123\",\r\n + \ \"2603:1020:905:402::380/122\",\r\n \"2603:1020:a04:3::80/123\",\r\n + \ \"2603:1020:a04:402::380/122\",\r\n \"2603:1020:a04:802::260/123\",\r\n + \ \"2603:1020:a04:802::280/123\",\r\n \"2603:1020:a04:c02::260/123\",\r\n + \ \"2603:1020:a04:c02::280/123\",\r\n \"2603:1020:b04:402::380/122\",\r\n + \ \"2603:1020:c04:402::380/122\",\r\n \"2603:1020:c04:802::260/123\",\r\n + \ \"2603:1020:c04:802::280/123\",\r\n \"2603:1020:c04:c02::260/123\",\r\n + \ \"2603:1020:c04:c02::280/123\",\r\n \"2603:1020:d04:402::380/122\",\r\n + \ \"2603:1020:e04:3::400/123\",\r\n \"2603:1020:e04:402::380/122\",\r\n + \ \"2603:1020:e04:802::260/123\",\r\n \"2603:1020:e04:802::280/123\",\r\n + \ \"2603:1020:e04:c02::260/123\",\r\n \"2603:1020:e04:c02::280/123\",\r\n + \ \"2603:1020:f04:402::380/122\",\r\n \"2603:1020:1004:1::500/123\",\r\n + \ \"2603:1020:1004:400::200/122\",\r\n \"2603:1020:1004:800::300/122\",\r\n + \ \"2603:1020:1004:c02::2c0/122\",\r\n \"2603:1020:1104:1::1e0/123\",\r\n + \ \"2603:1020:1104:400::340/122\",\r\n \"2603:1030:f:2::6e0/123\",\r\n + \ \"2603:1030:f:400::b80/122\",\r\n \"2603:1030:10:402::380/122\",\r\n + \ \"2603:1030:10:802::260/123\",\r\n \"2603:1030:10:802::280/123\",\r\n + \ \"2603:1030:10:c02::260/123\",\r\n \"2603:1030:10:c02::280/123\",\r\n + \ \"2603:1030:104:2::60/123\",\r\n \"2603:1030:104:402::380/122\",\r\n + \ \"2603:1030:104:802::/122\",\r\n \"2603:1030:107:1::220/123\",\r\n + \ \"2603:1030:107:400::2c0/122\",\r\n \"2603:1030:210:402::380/122\",\r\n + \ \"2603:1030:210:802::260/123\",\r\n \"2603:1030:210:802::280/123\",\r\n + \ \"2603:1030:210:c02::260/123\",\r\n \"2603:1030:210:c02::280/123\",\r\n + \ \"2603:1030:40b:400::b80/122\",\r\n \"2603:1030:40b:800::260/123\",\r\n + \ \"2603:1030:40b:800::280/123\",\r\n \"2603:1030:40b:c00::260/123\",\r\n + \ \"2603:1030:40b:c00::280/123\",\r\n \"2603:1030:40c:402::380/122\",\r\n + \ \"2603:1030:40c:802::260/123\",\r\n \"2603:1030:40c:802::280/123\",\r\n + \ \"2603:1030:40c:c02::260/123\",\r\n \"2603:1030:40c:c02::280/123\",\r\n + \ \"2603:1030:504::500/123\",\r\n \"2603:1030:504:402::200/122\",\r\n + \ \"2603:1030:504:802::300/122\",\r\n \"2603:1030:504:c02::2c0/122\",\r\n + \ \"2603:1030:608:402::380/122\",\r\n \"2603:1030:807:402::380/122\",\r\n + \ \"2603:1030:807:802::260/123\",\r\n \"2603:1030:807:802::280/123\",\r\n + \ \"2603:1030:807:c02::260/123\",\r\n \"2603:1030:807:c02::280/123\",\r\n + \ \"2603:1030:a07:402::300/122\",\r\n \"2603:1030:b04:402::380/122\",\r\n + \ \"2603:1030:c06:400::b80/122\",\r\n \"2603:1030:c06:802::260/123\",\r\n + \ \"2603:1030:c06:802::280/123\",\r\n \"2603:1030:c06:c02::260/123\",\r\n + \ \"2603:1030:c06:c02::280/123\",\r\n \"2603:1030:f05:402::380/122\",\r\n + \ \"2603:1030:f05:802::260/123\",\r\n \"2603:1030:f05:802::280/123\",\r\n + \ \"2603:1030:f05:c02::260/123\",\r\n \"2603:1030:f05:c02::280/123\",\r\n + \ \"2603:1030:1005:402::380/122\",\r\n \"2603:1040:5:402::380/122\",\r\n + \ \"2603:1040:5:802::260/123\",\r\n \"2603:1040:5:802::280/123\",\r\n + \ \"2603:1040:5:c02::260/123\",\r\n \"2603:1040:5:c02::280/123\",\r\n + \ \"2603:1040:207:2::280/123\",\r\n \"2603:1040:207:402::380/122\",\r\n + \ \"2603:1040:207:800::280/122\",\r\n \"2603:1040:207:c00::280/122\",\r\n + \ \"2603:1040:407:402::380/122\",\r\n \"2603:1040:407:802::260/123\",\r\n + \ \"2603:1040:407:802::280/123\",\r\n \"2603:1040:407:c02::260/123\",\r\n + \ \"2603:1040:407:c02::280/123\",\r\n \"2603:1040:606:402::380/122\",\r\n + \ \"2603:1040:806:402::380/122\",\r\n \"2603:1040:904:402::380/122\",\r\n + \ \"2603:1040:904:802::260/123\",\r\n \"2603:1040:904:802::280/123\",\r\n + \ \"2603:1040:904:c02::260/123\",\r\n \"2603:1040:904:c02::280/123\",\r\n + \ \"2603:1040:a06:2::580/123\",\r\n \"2603:1040:a06:402::380/122\",\r\n + \ \"2603:1040:a06:802::260/123\",\r\n \"2603:1040:a06:802::280/123\",\r\n + \ \"2603:1040:a06:c02::260/123\",\r\n \"2603:1040:a06:c02::280/123\",\r\n + \ \"2603:1040:b04:402::380/122\",\r\n \"2603:1040:c06:402::380/122\",\r\n + \ \"2603:1040:d04:1::500/123\",\r\n \"2603:1040:d04:400::200/122\",\r\n + \ \"2603:1040:d04:800::300/122\",\r\n \"2603:1040:d04:c02::2c0/122\",\r\n + \ \"2603:1040:f05:2::240/123\",\r\n \"2603:1040:f05:402::380/122\",\r\n + \ \"2603:1040:f05:802::260/123\",\r\n \"2603:1040:f05:802::280/123\",\r\n + \ \"2603:1040:f05:c02::260/123\",\r\n \"2603:1040:f05:c02::280/123\",\r\n + \ \"2603:1040:1002:2::a0/123\",\r\n \"2603:1040:1002:400::380/122\",\r\n + \ \"2603:1040:1002:800::280/122\",\r\n \"2603:1040:1002:c00::280/122\",\r\n + \ \"2603:1040:1104:1::1e0/123\",\r\n \"2603:1040:1104:400::340/122\",\r\n + \ \"2603:1050:6:402::380/122\",\r\n \"2603:1050:6:802::260/123\",\r\n + \ \"2603:1050:6:802::280/123\",\r\n \"2603:1050:6:c02::260/123\",\r\n + \ \"2603:1050:6:c02::280/123\",\r\n \"2603:1050:403:400::260/123\",\r\n + \ \"2603:1050:403:400::280/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"Storage\",\r\n \"id\": \"Storage\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"5\",\r\n + \ \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\",\r\n + \ \"VSE\"\r\n ],\r\n \"systemService\": \"AzureStorage\",\r\n + \ \"addressPrefixes\": [\r\n \"13.65.107.32/28\",\r\n \"13.65.160.16/28\",\r\n + \ \"13.65.160.48/28\",\r\n \"13.65.160.64/28\",\r\n \"13.66.176.16/28\",\r\n + \ \"13.66.176.48/28\",\r\n \"13.66.232.64/28\",\r\n \"13.66.232.208/28\",\r\n + \ \"13.66.232.224/28\",\r\n \"13.66.234.0/27\",\r\n \"13.67.155.16/28\",\r\n + \ \"13.68.120.64/28\",\r\n \"13.68.163.32/28\",\r\n \"13.68.165.64/28\",\r\n + \ \"13.68.167.240/28\",\r\n \"13.69.40.16/28\",\r\n \"13.70.99.16/28\",\r\n + \ \"13.70.99.48/28\",\r\n \"13.70.99.64/28\",\r\n \"13.70.208.16/28\",\r\n + \ \"13.71.200.64/28\",\r\n \"13.71.200.96/28\",\r\n \"13.71.200.240/28\",\r\n + \ \"13.71.202.16/28\",\r\n \"13.71.202.32/28\",\r\n \"13.71.202.64/27\",\r\n + \ \"13.72.235.64/28\",\r\n \"13.72.235.96/27\",\r\n \"13.72.235.144/28\",\r\n + \ \"13.72.237.48/28\",\r\n \"13.72.237.64/28\",\r\n \"13.73.8.16/28\",\r\n + \ \"13.73.8.32/28\",\r\n \"13.74.208.64/28\",\r\n \"13.74.208.112/28\",\r\n + \ \"13.74.208.144/28\",\r\n \"13.75.240.16/28\",\r\n \"13.75.240.32/28\",\r\n + \ \"13.75.240.64/27\",\r\n \"13.76.104.16/28\",\r\n \"13.77.8.16/28\",\r\n + \ \"13.77.8.32/28\",\r\n \"13.77.8.64/28\",\r\n \"13.77.8.96/28\",\r\n + \ \"13.77.8.128/27\",\r\n \"13.77.8.160/28\",\r\n \"13.77.8.192/27\",\r\n + \ \"13.77.112.16/28\",\r\n \"13.77.112.32/28\",\r\n \"13.77.112.112/28\",\r\n + \ \"13.77.112.128/28\",\r\n \"13.77.115.16/28\",\r\n \"13.77.115.32/28\",\r\n + \ \"13.77.184.64/28\",\r\n \"13.78.152.64/28\",\r\n \"13.78.240.16/28\",\r\n + \ \"13.79.176.16/28\",\r\n \"13.79.176.48/28\",\r\n \"13.79.176.80/28\",\r\n + \ \"13.82.33.32/28\",\r\n \"13.82.152.16/28\",\r\n \"13.82.152.48/28\",\r\n + \ \"13.82.152.80/28\",\r\n \"13.83.72.16/28\",\r\n \"13.84.56.16/28\",\r\n + \ \"13.85.88.16/28\",\r\n \"13.85.200.128/28\",\r\n \"13.87.40.64/28\",\r\n + \ \"13.87.40.96/28\",\r\n \"13.88.144.112/28\",\r\n \"13.88.144.240/28\",\r\n + \ \"13.88.145.64/28\",\r\n \"13.88.145.96/28\",\r\n \"13.88.145.128/28\",\r\n + \ \"13.93.168.80/28\",\r\n \"13.93.168.112/28\",\r\n \"13.93.168.144/28\",\r\n + \ \"13.95.96.176/28\",\r\n \"13.95.240.16/28\",\r\n \"13.95.240.32/28\",\r\n + \ \"13.95.240.64/27\",\r\n \"20.38.96.0/19\",\r\n \"20.47.0.0/18\",\r\n + \ \"20.60.0.0/16\",\r\n \"20.150.0.0/17\",\r\n \"20.157.32.0/19\",\r\n + \ \"20.157.128.0/18\",\r\n \"20.209.0.0/16\",\r\n \"23.96.64.64/26\",\r\n + \ \"23.97.112.64/26\",\r\n \"23.98.49.0/26\",\r\n \"23.98.49.192/26\",\r\n + \ \"23.98.55.0/26\",\r\n \"23.98.55.112/28\",\r\n \"23.98.55.144/28\",\r\n + \ \"23.98.56.0/26\",\r\n \"23.98.57.64/26\",\r\n \"23.98.160.64/26\",\r\n + \ \"23.98.162.192/26\",\r\n \"23.98.168.0/24\",\r\n \"23.98.192.64/26\",\r\n + \ \"23.98.255.64/26\",\r\n \"23.99.32.64/26\",\r\n \"23.99.34.224/28\",\r\n + \ \"23.99.37.96/28\",\r\n \"23.99.47.32/28\",\r\n \"23.99.160.64/26\",\r\n + \ \"23.99.160.192/28\",\r\n \"23.102.206.0/28\",\r\n \"23.102.206.128/28\",\r\n + \ \"23.102.206.192/28\",\r\n \"40.68.176.16/28\",\r\n \"40.68.176.48/28\",\r\n + \ \"40.68.232.16/28\",\r\n \"40.68.232.48/28\",\r\n \"40.69.176.16/28\",\r\n + \ \"40.70.88.0/28\",\r\n \"40.71.104.16/28\",\r\n \"40.71.104.32/28\",\r\n + \ \"40.71.240.16/28\",\r\n \"40.78.72.16/28\",\r\n \"40.78.112.64/28\",\r\n + \ \"40.79.8.16/28\",\r\n \"40.79.48.16/28\",\r\n \"40.79.88.16/28\",\r\n + \ \"40.83.24.16/28\",\r\n \"40.83.24.80/28\",\r\n \"40.83.24.96/27\",\r\n + \ \"40.83.104.176/28\",\r\n \"40.83.104.208/28\",\r\n \"40.83.225.32/28\",\r\n + \ \"40.83.227.16/28\",\r\n \"40.84.8.32/28\",\r\n \"40.84.11.80/28\",\r\n + \ \"40.85.105.32/28\",\r\n \"40.85.232.64/28\",\r\n \"40.85.232.96/28\",\r\n + \ \"40.85.232.144/28\",\r\n \"40.85.235.32/27\",\r\n \"40.85.235.80/28\",\r\n + \ \"40.85.235.96/28\",\r\n \"40.86.232.64/28\",\r\n \"40.86.232.96/28\",\r\n + \ \"40.86.232.128/28\",\r\n \"40.86.232.176/28\",\r\n \"40.86.232.192/28\",\r\n + \ \"40.112.152.16/28\",\r\n \"40.112.224.16/28\",\r\n \"40.112.224.48/28\",\r\n + \ \"40.113.27.176/28\",\r\n \"40.114.152.16/28\",\r\n \"40.114.152.48/28\",\r\n + \ \"40.115.169.32/28\",\r\n \"40.115.175.16/28\",\r\n \"40.115.175.32/28\",\r\n + \ \"40.115.227.80/28\",\r\n \"40.115.229.16/28\",\r\n \"40.115.229.32/28\",\r\n + \ \"40.115.231.64/27\",\r\n \"40.115.231.112/28\",\r\n \"40.115.231.128/28\",\r\n + \ \"40.116.120.16/28\",\r\n \"40.116.232.16/28\",\r\n \"40.116.232.48/28\",\r\n + \ \"40.116.232.96/28\",\r\n \"40.117.48.80/28\",\r\n \"40.117.48.112/28\",\r\n + \ \"40.117.104.16/28\",\r\n \"40.118.72.176/28\",\r\n \"40.118.73.48/28\",\r\n + \ \"40.118.73.176/28\",\r\n \"40.118.73.208/28\",\r\n \"40.122.96.16/28\",\r\n + \ \"40.122.216.16/28\",\r\n \"40.123.16.16/28\",\r\n \"51.140.16.16/28\",\r\n + \ \"51.140.16.32/28\",\r\n \"51.140.168.64/27\",\r\n \"51.140.168.112/28\",\r\n + \ \"51.140.168.128/28\",\r\n \"51.140.232.64/27\",\r\n \"51.140.232.112/28\",\r\n + \ \"51.140.232.128/28\",\r\n \"51.140.232.160/27\",\r\n \"51.141.128.0/24\",\r\n + \ \"51.141.129.64/26\",\r\n \"51.141.129.128/25\",\r\n \"51.141.130.0/25\",\r\n + \ \"52.161.112.16/28\",\r\n \"52.161.112.32/28\",\r\n \"52.161.168.16/28\",\r\n + \ \"52.161.168.32/28\",\r\n \"52.162.56.16/28\",\r\n \"52.162.56.32/28\",\r\n + \ \"52.162.56.64/27\",\r\n \"52.162.56.112/28\",\r\n \"52.162.56.128/28\",\r\n + \ \"52.163.176.16/28\",\r\n \"52.163.232.16/28\",\r\n \"52.164.112.16/28\",\r\n + \ \"52.164.232.16/28\",\r\n \"52.164.232.32/28\",\r\n \"52.164.232.64/28\",\r\n + \ \"52.165.104.16/28\",\r\n \"52.165.104.32/28\",\r\n \"52.165.104.64/27\",\r\n + \ \"52.165.104.112/28\",\r\n \"52.165.104.144/28\",\r\n \"52.165.104.160/28\",\r\n + \ \"52.165.136.32/28\",\r\n \"52.165.240.64/28\",\r\n \"52.166.80.32/27\",\r\n + \ \"52.166.80.80/28\",\r\n \"52.166.80.96/28\",\r\n \"52.167.88.80/28\",\r\n + \ \"52.167.88.112/28\",\r\n \"52.167.240.16/28\",\r\n \"52.169.168.32/27\",\r\n + \ \"52.169.240.16/28\",\r\n \"52.169.240.32/28\",\r\n \"52.169.240.64/28\",\r\n + \ \"52.171.144.32/27\",\r\n \"52.171.144.80/28\",\r\n \"52.171.144.96/28\",\r\n + \ \"52.171.144.128/28\",\r\n \"52.172.16.16/28\",\r\n \"52.172.16.80/28\",\r\n + \ \"52.172.16.96/28\",\r\n \"52.172.16.128/27\",\r\n \"52.173.152.64/28\",\r\n + \ \"52.173.152.96/28\",\r\n \"52.174.8.32/28\",\r\n \"52.174.224.16/28\",\r\n + \ \"52.174.224.32/28\",\r\n \"52.174.224.64/27\",\r\n \"52.174.224.112/28\",\r\n + \ \"52.174.224.128/28\",\r\n \"52.175.40.128/28\",\r\n \"52.175.112.16/28\",\r\n + \ \"52.176.224.64/28\",\r\n \"52.176.224.96/28\",\r\n \"52.177.208.80/28\",\r\n + \ \"52.178.168.32/27\",\r\n \"52.178.168.80/28\",\r\n \"52.178.168.96/28\",\r\n + \ \"52.178.168.128/27\",\r\n \"52.179.24.16/28\",\r\n \"52.179.144.32/28\",\r\n + \ \"52.179.144.64/28\",\r\n \"52.179.240.16/28\",\r\n \"52.179.240.48/28\",\r\n + \ \"52.179.240.64/28\",\r\n \"52.179.240.96/27\",\r\n \"52.179.240.144/28\",\r\n + \ \"52.179.240.160/28\",\r\n \"52.179.240.192/27\",\r\n \"52.179.240.240/28\",\r\n + \ \"52.179.241.0/28\",\r\n \"52.179.241.32/27\",\r\n \"52.180.40.16/28\",\r\n + \ \"52.180.40.32/28\",\r\n \"52.180.184.16/28\",\r\n \"52.182.176.16/28\",\r\n + \ \"52.182.176.32/28\",\r\n \"52.182.176.64/27\",\r\n \"52.183.48.16/28\",\r\n + \ \"52.183.104.16/28\",\r\n \"52.183.104.32/28\",\r\n \"52.184.40.16/28\",\r\n + \ \"52.184.40.32/28\",\r\n \"52.184.168.32/28\",\r\n \"52.184.168.96/27\",\r\n + \ \"52.185.56.80/28\",\r\n \"52.185.56.96/28\",\r\n \"52.185.56.144/28\",\r\n + \ \"52.185.56.160/28\",\r\n \"52.185.112.16/28\",\r\n \"52.185.112.48/28\",\r\n + \ \"52.185.112.80/28\",\r\n \"52.185.112.112/28\",\r\n \"52.185.233.0/24\",\r\n + \ \"52.186.112.32/27\",\r\n \"52.187.141.32/27\",\r\n \"52.189.177.0/24\",\r\n + \ \"52.190.240.16/28\",\r\n \"52.190.240.32/28\",\r\n \"52.190.240.64/27\",\r\n + \ \"52.190.240.112/28\",\r\n \"52.190.240.128/28\",\r\n \"52.191.176.16/28\",\r\n + \ \"52.191.176.32/28\",\r\n \"52.225.40.32/27\",\r\n \"52.225.136.16/28\",\r\n + \ \"52.225.136.32/28\",\r\n \"52.225.240.0/28\",\r\n \"52.226.8.32/27\",\r\n + \ \"52.226.8.80/28\",\r\n \"52.226.8.96/28\",\r\n \"52.226.8.128/27\",\r\n + \ \"52.228.232.0/28\",\r\n \"52.229.80.64/27\",\r\n \"52.230.240.16/28\",\r\n + \ \"52.230.240.32/28\",\r\n \"52.230.240.64/27\",\r\n \"52.230.240.112/28\",\r\n + \ \"52.230.240.128/28\",\r\n \"52.230.240.160/27\",\r\n \"52.231.80.64/27\",\r\n + \ \"52.231.80.112/28\",\r\n \"52.231.80.128/28\",\r\n \"52.231.80.160/27\",\r\n + \ \"52.231.168.64/27\",\r\n \"52.231.168.112/28\",\r\n \"52.231.168.128/28\",\r\n + \ \"52.231.208.16/28\",\r\n \"52.231.208.32/28\",\r\n \"52.232.232.16/28\",\r\n + \ \"52.232.232.32/28\",\r\n \"52.232.232.80/28\",\r\n \"52.232.232.96/28\",\r\n + \ \"52.232.232.128/27\",\r\n \"52.232.232.176/28\",\r\n \"52.232.232.192/28\",\r\n + \ \"52.234.176.48/28\",\r\n \"52.234.176.64/28\",\r\n \"52.234.176.96/27\",\r\n + \ \"52.236.40.16/28\",\r\n \"52.236.40.32/28\",\r\n \"52.236.240.48/28\",\r\n + \ \"52.236.240.64/28\",\r\n \"52.237.104.16/28\",\r\n \"52.237.104.32/28\",\r\n + \ \"52.238.56.16/28\",\r\n \"52.238.56.32/28\",\r\n \"52.238.56.64/27\",\r\n + \ \"52.238.56.112/28\",\r\n \"52.238.56.128/28\",\r\n \"52.238.56.160/27\",\r\n + \ \"52.238.200.32/27\",\r\n \"52.239.104.16/28\",\r\n \"52.239.104.32/28\",\r\n + \ \"52.239.128.0/20\",\r\n \"52.239.144.0/22\",\r\n \"52.239.148.0/27\",\r\n + \ \"52.239.148.64/26\",\r\n \"52.239.148.128/25\",\r\n \"52.239.149.0/24\",\r\n + \ \"52.239.150.0/23\",\r\n \"52.239.152.0/21\",\r\n \"52.239.160.0/22\",\r\n + \ \"52.239.164.0/24\",\r\n \"52.239.165.0/26\",\r\n \"52.239.165.160/27\",\r\n + \ \"52.239.165.192/26\",\r\n \"52.239.167.0/24\",\r\n \"52.239.168.0/21\",\r\n + \ \"52.239.176.128/25\",\r\n \"52.239.177.0/24\",\r\n \"52.239.178.0/23\",\r\n + \ \"52.239.180.0/22\",\r\n \"52.239.184.0/22\",\r\n \"52.239.188.0/23\",\r\n + \ \"52.239.190.0/24\",\r\n \"52.239.191.0/28\",\r\n \"52.239.192.0/21\",\r\n + \ \"52.239.200.0/22\",\r\n \"52.239.205.0/24\",\r\n \"52.239.206.0/23\",\r\n + \ \"52.239.208.0/20\",\r\n \"52.239.224.0/19\",\r\n \"52.240.48.16/28\",\r\n + \ \"52.240.48.32/28\",\r\n \"52.240.60.16/28\",\r\n \"52.240.60.32/28\",\r\n + \ \"52.240.60.64/27\",\r\n \"52.241.88.16/28\",\r\n \"52.241.88.32/28\",\r\n + \ \"52.241.88.64/27\",\r\n \"52.245.40.0/24\",\r\n \"104.41.232.16/28\",\r\n + \ \"104.42.200.16/28\",\r\n \"104.46.31.16/28\",\r\n \"104.208.0.16/28\",\r\n + \ \"104.208.0.48/28\",\r\n \"104.208.128.16/28\",\r\n \"104.208.248.16/28\",\r\n + \ \"104.211.104.64/28\",\r\n \"104.211.104.96/28\",\r\n \"104.211.104.128/28\",\r\n + \ \"104.211.109.0/28\",\r\n \"104.211.109.32/27\",\r\n \"104.211.109.80/28\",\r\n + \ \"104.211.109.96/28\",\r\n \"104.211.168.16/28\",\r\n \"104.211.232.16/28\",\r\n + \ \"104.211.232.48/28\",\r\n \"104.211.232.80/28\",\r\n \"104.211.232.176/28\",\r\n + \ \"104.214.40.16/28\",\r\n \"104.214.80.16/28\",\r\n \"104.214.80.48/28\",\r\n + \ \"104.214.152.16/28\",\r\n \"104.214.152.176/28\",\r\n + \ \"104.214.243.32/28\",\r\n \"104.215.32.16/28\",\r\n \"104.215.32.32/28\",\r\n + \ \"104.215.32.64/27\",\r\n \"104.215.35.32/27\",\r\n \"104.215.104.64/28\",\r\n + \ \"104.215.240.64/28\",\r\n \"104.215.240.96/28\",\r\n \"137.116.1.0/25\",\r\n + \ \"137.116.2.0/25\",\r\n \"137.116.3.0/25\",\r\n \"137.116.3.128/26\",\r\n + \ \"137.116.96.0/25\",\r\n \"137.116.96.128/26\",\r\n \"137.135.192.64/26\",\r\n + \ \"137.135.192.192/26\",\r\n \"137.135.193.192/26\",\r\n + \ \"137.135.194.0/25\",\r\n \"137.135.194.192/26\",\r\n \"138.91.96.64/26\",\r\n + \ \"138.91.96.128/26\",\r\n \"138.91.128.128/26\",\r\n \"138.91.129.0/26\",\r\n + \ \"157.56.216.0/26\",\r\n \"168.61.57.64/26\",\r\n \"168.61.57.128/25\",\r\n + \ \"168.61.58.0/26\",\r\n \"168.61.58.128/26\",\r\n \"168.61.59.64/26\",\r\n + \ \"168.61.61.0/26\",\r\n \"168.61.61.192/26\",\r\n \"168.61.120.32/27\",\r\n + \ \"168.61.120.64/27\",\r\n \"168.61.121.0/26\",\r\n \"168.61.128.192/26\",\r\n + \ \"168.61.129.0/25\",\r\n \"168.61.130.64/26\",\r\n \"168.61.130.128/25\",\r\n + \ \"168.61.131.0/26\",\r\n \"168.61.131.128/25\",\r\n \"168.61.132.0/26\",\r\n + \ \"168.62.0.0/26\",\r\n \"168.62.1.128/26\",\r\n \"168.62.32.0/26\",\r\n + \ \"168.62.32.192/26\",\r\n \"168.62.33.128/26\",\r\n \"168.62.96.128/25\",\r\n + \ \"168.62.128.128/26\",\r\n \"168.63.0.0/26\",\r\n \"168.63.2.64/26\",\r\n + \ \"168.63.3.32/27\",\r\n \"168.63.3.64/27\",\r\n \"168.63.32.0/26\",\r\n + \ \"168.63.33.192/26\",\r\n \"168.63.89.64/26\",\r\n \"168.63.89.128/26\",\r\n + \ \"168.63.113.32/27\",\r\n \"168.63.113.64/27\",\r\n \"168.63.128.0/26\",\r\n + \ \"168.63.128.128/25\",\r\n \"168.63.129.128/25\",\r\n \"168.63.130.0/26\",\r\n + \ \"168.63.130.128/26\",\r\n \"168.63.131.0/26\",\r\n \"168.63.156.64/26\",\r\n + \ \"168.63.156.192/26\",\r\n \"168.63.160.0/26\",\r\n \"168.63.160.192/26\",\r\n + \ \"168.63.161.64/26\",\r\n \"168.63.161.160/27\",\r\n \"168.63.161.192/26\",\r\n + \ \"168.63.162.32/27\",\r\n \"168.63.162.64/26\",\r\n \"168.63.162.144/28\",\r\n + \ \"168.63.162.192/26\",\r\n \"168.63.163.128/26\",\r\n \"168.63.180.64/26\",\r\n + \ \"191.232.216.32/27\",\r\n \"191.232.221.16/28\",\r\n \"191.232.221.32/28\",\r\n + \ \"191.233.128.0/24\",\r\n \"191.235.192.192/26\",\r\n \"191.235.193.32/28\",\r\n + \ \"191.235.248.0/23\",\r\n \"191.235.250.0/25\",\r\n \"191.235.255.192/26\",\r\n + \ \"191.237.32.128/28\",\r\n \"191.237.32.208/28\",\r\n \"191.237.32.240/28\",\r\n + \ \"191.237.160.64/26\",\r\n \"191.237.160.224/28\",\r\n + \ \"191.237.232.32/28\",\r\n \"191.237.232.128/28\",\r\n + \ \"191.237.238.32/28\",\r\n \"191.238.0.0/26\",\r\n \"191.238.0.224/28\",\r\n + \ \"191.238.64.64/26\",\r\n \"191.238.64.192/28\",\r\n \"191.238.66.0/26\",\r\n + \ \"191.239.192.0/26\",\r\n \"191.239.203.0/28\",\r\n \"191.239.224.0/26\",\r\n + \ \"2603:1000:5::/48\",\r\n \"2603:1000:105::/48\",\r\n \"2603:1010:7::/48\",\r\n + \ \"2603:1010:206::/48\",\r\n \"2603:1010:305::/48\",\r\n + \ \"2603:1010:405::/48\",\r\n \"2603:1020:6::/48\",\r\n \"2603:1020:101::/48\",\r\n + \ \"2603:1020:207::/48\",\r\n \"2603:1020:606::/48\",\r\n + \ \"2603:1020:706::/48\",\r\n \"2603:1020:806::/48\",\r\n + \ \"2603:1020:906::/48\",\r\n \"2603:1020:a05::/48\",\r\n + \ \"2603:1020:b05::/48\",\r\n \"2603:1020:c05::/48\",\r\n + \ \"2603:1020:d05::/48\",\r\n \"2603:1020:e05::/48\",\r\n + \ \"2603:1020:f05::/48\",\r\n \"2603:1020:1005::/48\",\r\n + \ \"2603:1020:1105::/48\",\r\n \"2603:1020:1106::/47\",\r\n + \ \"2603:1020:1201::/48\",\r\n \"2603:1020:1301::/48\",\r\n + \ \"2603:1030:11::/48\",\r\n \"2603:1030:12::/48\",\r\n \"2603:1030:108::/47\",\r\n + \ \"2603:1030:213::/48\",\r\n \"2603:1030:40f::/48\",\r\n + \ \"2603:1030:410::/48\",\r\n \"2603:1030:505::/48\",\r\n + \ \"2603:1030:609::/48\",\r\n \"2603:1030:80b::/48\",\r\n + \ \"2603:1030:80c::/48\",\r\n \"2603:1030:a0a::/48\",\r\n + \ \"2603:1030:b06::/48\",\r\n \"2603:1030:d01::/48\",\r\n + \ \"2603:1030:f08::/48\",\r\n \"2603:1030:1006::/48\",\r\n + \ \"2603:1040:6::/48\",\r\n \"2603:1040:104::/48\",\r\n \"2603:1040:208::/48\",\r\n + \ \"2603:1040:408::/48\",\r\n \"2603:1040:607::/48\",\r\n + \ \"2603:1040:807::/48\",\r\n \"2603:1040:905::/48\",\r\n + \ \"2603:1040:a07::/48\",\r\n \"2603:1040:b05::/48\",\r\n + \ \"2603:1040:c07::/48\",\r\n \"2603:1040:d00::/48\",\r\n + \ \"2603:1040:e06::/48\",\r\n \"2603:1040:f06::/48\",\r\n + \ \"2603:1040:1004::/48\",\r\n \"2603:1040:1100::/48\",\r\n + \ \"2603:1050:7::/48\",\r\n \"2603:1050:214::/48\",\r\n \"2603:1050:404::/48\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.AustraliaCentral\",\r\n + \ \"id\": \"Storage.AustraliaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.35.0/24\",\r\n + \ \"20.60.214.0/23\",\r\n \"20.150.124.0/24\",\r\n \"20.157.138.0/24\",\r\n + \ \"52.239.216.0/23\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.AustraliaCentral2\",\r\n \"id\": \"Storage.AustraliaCentral2\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"australiacentral2\",\r\n \"state\": + \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.36.0/24\",\r\n + \ \"20.150.103.0/24\",\r\n \"52.239.218.0/23\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.AustraliaEast\",\r\n + \ \"id\": \"Storage.AustraliaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"australiaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.70.99.16/28\",\r\n \"13.70.99.48/28\",\r\n \"13.70.99.64/28\",\r\n + \ \"13.72.235.64/28\",\r\n \"13.72.235.96/27\",\r\n \"13.72.235.144/28\",\r\n + \ \"13.72.237.48/28\",\r\n \"13.72.237.64/28\",\r\n \"13.75.240.16/28\",\r\n + \ \"13.75.240.32/28\",\r\n \"13.75.240.64/27\",\r\n \"20.38.112.0/23\",\r\n + \ \"20.47.37.0/24\",\r\n \"20.60.72.0/22\",\r\n \"20.60.182.0/23\",\r\n + \ \"20.150.66.0/24\",\r\n \"20.150.92.0/24\",\r\n \"20.150.117.0/24\",\r\n + \ \"20.157.44.0/24\",\r\n \"20.157.155.0/24\",\r\n \"52.239.130.0/23\",\r\n + \ \"52.239.226.0/24\",\r\n \"104.46.31.16/28\",\r\n \"191.238.66.0/26\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.AustraliaSoutheast\",\r\n + \ \"id\": \"Storage.AustraliaSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"australiasoutheast\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"13.77.8.16/28\",\r\n + \ \"13.77.8.32/28\",\r\n \"13.77.8.64/28\",\r\n \"13.77.8.96/28\",\r\n + \ \"13.77.8.128/27\",\r\n \"13.77.8.160/28\",\r\n \"13.77.8.192/27\",\r\n + \ \"20.47.38.0/24\",\r\n \"20.60.32.0/23\",\r\n \"20.150.12.0/23\",\r\n + \ \"20.150.119.0/24\",\r\n \"20.157.45.0/24\",\r\n \"52.239.132.0/23\",\r\n + \ \"52.239.225.0/24\",\r\n \"191.239.192.0/26\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.BrazilSouth\",\r\n + \ \"id\": \"Storage.BrazilSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"brazilsouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.39.0/24\",\r\n \"20.60.36.0/23\",\r\n \"20.150.111.0/24\",\r\n + \ \"20.157.55.0/24\",\r\n \"20.209.12.0/23\",\r\n \"23.97.112.64/26\",\r\n + \ \"191.232.216.32/27\",\r\n \"191.232.221.16/28\",\r\n \"191.232.221.32/28\",\r\n + \ \"191.233.128.0/24\",\r\n \"191.235.248.0/23\",\r\n \"191.235.250.0/25\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.BrazilSoutheast\",\r\n + \ \"id\": \"Storage.BrazilSoutheast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"brazilse\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.150.73.0/24\",\r\n \"20.150.80.0/24\",\r\n \"20.150.123.0/24\",\r\n + \ \"20.157.42.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.CanadaCentral\",\r\n \"id\": \"Storage.CanadaCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"canadacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.114.0/25\",\r\n + \ \"20.47.40.0/24\",\r\n \"20.60.42.0/23\",\r\n \"20.60.242.0/23\",\r\n + \ \"20.150.16.0/24\",\r\n \"20.150.31.0/24\",\r\n \"20.150.71.0/24\",\r\n + \ \"20.150.100.0/24\",\r\n \"20.157.52.0/24\",\r\n \"20.157.148.0/24\",\r\n + \ \"40.85.232.64/28\",\r\n \"40.85.232.96/28\",\r\n \"40.85.232.144/28\",\r\n + \ \"40.85.235.32/27\",\r\n \"40.85.235.80/28\",\r\n \"40.85.235.96/28\",\r\n + \ \"52.239.148.64/26\",\r\n \"52.239.189.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.CanadaEast\",\r\n + \ \"id\": \"Storage.CanadaEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"canadaeast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.38.121.128/25\",\r\n \"20.47.41.0/24\",\r\n \"20.60.142.0/23\",\r\n + \ \"20.150.1.0/25\",\r\n \"20.150.40.128/25\",\r\n \"20.150.113.0/24\",\r\n + \ \"20.157.161.0/24\",\r\n \"40.86.232.64/28\",\r\n \"40.86.232.96/28\",\r\n + \ \"40.86.232.128/28\",\r\n \"40.86.232.176/28\",\r\n \"40.86.232.192/28\",\r\n + \ \"52.229.80.64/27\",\r\n \"52.239.164.128/26\",\r\n \"52.239.190.0/25\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.CentralIndia\",\r\n + \ \"id\": \"Storage.CentralIndia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"centralindia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.38.126.0/23\",\r\n \"20.47.42.0/24\",\r\n \"20.60.84.0/23\",\r\n + \ \"20.150.114.0/24\",\r\n \"20.157.139.0/24\",\r\n \"52.239.135.64/26\",\r\n + \ \"52.239.202.0/24\",\r\n \"104.211.104.64/28\",\r\n \"104.211.104.96/28\",\r\n + \ \"104.211.104.128/28\",\r\n \"104.211.109.0/28\",\r\n \"104.211.109.32/27\",\r\n + \ \"104.211.109.80/28\",\r\n \"104.211.109.96/28\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.CentralUS\",\r\n \"id\": + \"Storage.CentralUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": + {\r\n \"changeNumber\": \"4\",\r\n \"region\": \"centralus\",\r\n + \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n + \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n + \ \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.67.155.16/28\",\r\n \"20.38.96.0/23\",\r\n \"20.38.122.0/23\",\r\n + \ \"20.47.58.0/23\",\r\n \"20.60.18.0/24\",\r\n \"20.60.30.0/23\",\r\n + \ \"20.60.178.0/23\",\r\n \"20.60.194.0/23\",\r\n \"20.60.240.0/23\",\r\n + \ \"20.60.244.0/23\",\r\n \"20.150.43.128/25\",\r\n \"20.150.58.0/24\",\r\n + \ \"20.150.63.0/24\",\r\n \"20.150.77.0/24\",\r\n \"20.150.89.0/24\",\r\n + \ \"20.150.95.0/24\",\r\n \"20.157.34.0/23\",\r\n \"20.157.142.0/23\",\r\n + \ \"23.99.160.64/26\",\r\n \"23.99.160.192/28\",\r\n \"40.69.176.16/28\",\r\n + \ \"40.83.24.16/28\",\r\n \"40.83.24.80/28\",\r\n \"40.122.96.16/28\",\r\n + \ \"40.122.216.16/28\",\r\n \"52.165.104.16/28\",\r\n \"52.165.104.32/28\",\r\n + \ \"52.165.104.64/27\",\r\n \"52.165.104.112/28\",\r\n \"52.165.136.32/28\",\r\n + \ \"52.165.240.64/28\",\r\n \"52.173.152.64/28\",\r\n \"52.173.152.96/28\",\r\n + \ \"52.176.224.64/28\",\r\n \"52.176.224.96/28\",\r\n \"52.180.184.16/28\",\r\n + \ \"52.182.176.16/28\",\r\n \"52.182.176.32/28\",\r\n \"52.182.176.64/27\",\r\n + \ \"52.185.56.80/28\",\r\n \"52.185.56.96/28\",\r\n \"52.185.56.144/28\",\r\n + \ \"52.185.56.160/28\",\r\n \"52.185.112.16/28\",\r\n \"52.185.112.48/28\",\r\n + \ \"52.185.112.112/28\",\r\n \"52.228.232.0/28\",\r\n \"52.230.240.16/28\",\r\n + \ \"52.230.240.32/28\",\r\n \"52.230.240.64/27\",\r\n \"52.230.240.112/28\",\r\n + \ \"52.230.240.128/28\",\r\n \"52.230.240.160/27\",\r\n \"52.238.200.32/27\",\r\n + \ \"52.239.150.0/23\",\r\n \"52.239.177.32/27\",\r\n \"52.239.177.64/26\",\r\n + \ \"52.239.177.128/25\",\r\n \"52.239.195.0/24\",\r\n \"52.239.234.0/23\",\r\n + \ \"104.208.0.16/28\",\r\n \"104.208.0.48/28\",\r\n \"168.61.128.192/26\",\r\n + \ \"168.61.129.0/25\",\r\n \"168.61.130.64/26\",\r\n \"168.61.130.128/25\",\r\n + \ \"168.61.131.0/26\",\r\n \"168.61.131.128/25\",\r\n \"168.61.132.0/26\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.CentralUSEUAP\",\r\n + \ \"id\": \"Storage.CentralUSEUAP\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"centraluseuap\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.5.0/24\",\r\n \"20.60.24.0/23\",\r\n \"20.150.23.0/24\",\r\n + \ \"20.150.47.0/25\",\r\n \"40.83.24.96/27\",\r\n \"52.165.104.144/28\",\r\n + \ \"52.165.104.160/28\",\r\n \"52.185.112.80/28\",\r\n \"52.239.177.0/27\",\r\n + \ \"52.239.238.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.EastAsia\",\r\n \"id\": \"Storage.EastAsia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"eastasia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.43.0/24\",\r\n + \ \"20.60.86.0/23\",\r\n \"20.60.131.0/24\",\r\n \"20.60.254.0/23\",\r\n + \ \"20.150.1.128/25\",\r\n \"20.150.22.0/24\",\r\n \"20.150.96.0/24\",\r\n + \ \"20.157.53.0/24\",\r\n \"40.83.104.176/28\",\r\n \"40.83.104.208/28\",\r\n + \ \"52.175.40.128/28\",\r\n \"52.175.112.16/28\",\r\n \"52.184.40.16/28\",\r\n + \ \"52.184.40.32/28\",\r\n \"52.239.128.0/24\",\r\n \"52.239.224.0/24\",\r\n + \ \"168.63.128.0/26\",\r\n \"168.63.128.128/25\",\r\n \"168.63.129.128/25\",\r\n + \ \"168.63.130.0/26\",\r\n \"168.63.130.128/26\",\r\n \"168.63.131.0/26\",\r\n + \ \"168.63.156.64/26\",\r\n \"168.63.156.192/26\",\r\n \"191.237.238.32/28\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.EastUS\",\r\n + \ \"id\": \"Storage.EastUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"eastus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.68.163.32/28\",\r\n \"13.68.165.64/28\",\r\n + \ \"13.68.167.240/28\",\r\n \"13.82.33.32/28\",\r\n \"13.82.152.16/28\",\r\n + \ \"13.82.152.48/28\",\r\n \"13.82.152.80/28\",\r\n \"20.38.98.0/24\",\r\n + \ \"20.47.1.0/24\",\r\n \"20.47.16.0/23\",\r\n \"20.47.31.0/24\",\r\n + \ \"20.60.0.0/24\",\r\n \"20.60.2.0/23\",\r\n \"20.60.6.0/23\",\r\n + \ \"20.60.60.0/22\",\r\n \"20.60.128.0/23\",\r\n \"20.60.134.0/23\",\r\n + \ \"20.60.146.0/23\",\r\n \"20.60.220.0/23\",\r\n \"20.150.32.0/23\",\r\n + \ \"20.150.90.0/24\",\r\n \"20.157.39.0/24\",\r\n \"20.157.59.0/24\",\r\n + \ \"20.157.132.0/24\",\r\n \"20.157.147.0/24\",\r\n \"20.209.0.0/23\",\r\n + \ \"23.96.64.64/26\",\r\n \"40.71.104.16/28\",\r\n \"40.71.104.32/28\",\r\n + \ \"40.71.240.16/28\",\r\n \"40.117.48.80/28\",\r\n \"40.117.48.112/28\",\r\n + \ \"40.117.104.16/28\",\r\n \"52.179.24.16/28\",\r\n \"52.186.112.32/27\",\r\n + \ \"52.226.8.32/27\",\r\n \"52.226.8.80/28\",\r\n \"52.226.8.96/28\",\r\n + \ \"52.226.8.128/27\",\r\n \"52.234.176.48/28\",\r\n \"52.234.176.64/28\",\r\n + \ \"52.234.176.96/27\",\r\n \"52.239.152.0/22\",\r\n \"52.239.168.0/22\",\r\n + \ \"52.239.207.192/26\",\r\n \"52.239.214.0/23\",\r\n \"52.239.220.0/23\",\r\n + \ \"52.239.246.0/23\",\r\n \"52.239.252.0/24\",\r\n \"52.240.48.16/28\",\r\n + \ \"52.240.48.32/28\",\r\n \"52.240.60.16/28\",\r\n \"52.240.60.32/28\",\r\n + \ \"52.240.60.64/27\",\r\n \"138.91.96.64/26\",\r\n \"138.91.96.128/26\",\r\n + \ \"168.62.32.0/26\",\r\n \"168.62.32.192/26\",\r\n \"168.62.33.128/26\",\r\n + \ \"191.237.32.128/28\",\r\n \"191.237.32.208/28\",\r\n \"191.237.32.240/28\",\r\n + \ \"191.238.0.0/26\",\r\n \"191.238.0.224/28\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.EastUS2\",\r\n \"id\": + \"Storage.EastUS2\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": + {\r\n \"changeNumber\": \"4\",\r\n \"region\": \"eastus2\",\r\n + \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n + \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n + \ \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.68.120.64/28\",\r\n \"13.77.112.16/28\",\r\n + \ \"13.77.112.32/28\",\r\n \"13.77.112.112/28\",\r\n \"13.77.112.128/28\",\r\n + \ \"13.77.115.16/28\",\r\n \"13.77.115.32/28\",\r\n \"20.38.100.0/23\",\r\n + \ \"20.47.60.0/23\",\r\n \"20.60.56.0/22\",\r\n \"20.60.88.0/22\",\r\n + \ \"20.60.132.0/23\",\r\n \"20.60.180.0/23\",\r\n \"20.60.224.0/23\",\r\n + \ \"20.60.236.0/23\",\r\n \"20.150.29.0/24\",\r\n \"20.150.36.0/24\",\r\n + \ \"20.150.50.0/23\",\r\n \"20.150.72.0/24\",\r\n \"20.150.82.0/24\",\r\n + \ \"20.150.88.0/24\",\r\n \"20.157.36.0/23\",\r\n \"20.157.48.0/23\",\r\n + \ \"20.157.62.0/23\",\r\n \"23.102.206.0/28\",\r\n \"23.102.206.128/28\",\r\n + \ \"23.102.206.192/28\",\r\n \"40.79.8.16/28\",\r\n \"40.79.48.16/28\",\r\n + \ \"40.84.8.32/28\",\r\n \"40.84.11.80/28\",\r\n \"40.123.16.16/28\",\r\n + \ \"52.167.88.80/28\",\r\n \"52.167.88.112/28\",\r\n \"52.167.240.16/28\",\r\n + \ \"52.177.208.80/28\",\r\n \"52.179.144.32/28\",\r\n \"52.179.144.64/28\",\r\n + \ \"52.179.240.16/28\",\r\n \"52.179.240.48/28\",\r\n \"52.179.240.64/28\",\r\n + \ \"52.179.240.96/27\",\r\n \"52.179.240.144/28\",\r\n \"52.179.240.160/28\",\r\n + \ \"52.179.240.192/27\",\r\n \"52.179.240.240/28\",\r\n \"52.179.241.0/28\",\r\n + \ \"52.179.241.32/27\",\r\n \"52.184.168.96/27\",\r\n \"52.225.136.16/28\",\r\n + \ \"52.225.136.32/28\",\r\n \"52.225.240.0/28\",\r\n \"52.232.232.16/28\",\r\n + \ \"52.232.232.32/28\",\r\n \"52.232.232.80/28\",\r\n \"52.232.232.96/28\",\r\n + \ \"52.232.232.128/27\",\r\n \"52.232.232.176/28\",\r\n \"52.232.232.192/28\",\r\n + \ \"52.239.156.0/24\",\r\n \"52.239.157.0/25\",\r\n \"52.239.157.128/26\",\r\n + \ \"52.239.157.192/27\",\r\n \"52.239.172.0/22\",\r\n \"52.239.184.0/25\",\r\n + \ \"52.239.184.160/28\",\r\n \"52.239.184.192/27\",\r\n \"52.239.185.32/27\",\r\n + \ \"52.239.192.0/26\",\r\n \"52.239.192.64/28\",\r\n \"52.239.192.96/27\",\r\n + \ \"52.239.192.160/27\",\r\n \"52.239.192.192/26\",\r\n \"52.239.198.0/25\",\r\n + \ \"52.239.198.192/26\",\r\n \"52.239.206.0/24\",\r\n \"52.239.207.32/28\",\r\n + \ \"52.239.207.64/26\",\r\n \"52.239.207.128/27\",\r\n \"52.239.222.0/23\",\r\n + \ \"104.208.128.16/28\",\r\n \"104.208.248.16/28\",\r\n \"137.116.1.0/25\",\r\n + \ \"137.116.2.0/26\",\r\n \"137.116.2.96/29\",\r\n \"137.116.2.104/30\",\r\n + \ \"137.116.2.108/32\",\r\n \"137.116.2.110/31\",\r\n \"137.116.2.112/32\",\r\n + \ \"137.116.2.114/32\",\r\n \"137.116.2.116/30\",\r\n \"137.116.2.120/29\",\r\n + \ \"137.116.3.0/25\",\r\n \"137.116.3.128/26\",\r\n \"137.116.96.0/25\",\r\n + \ \"137.116.96.128/26\",\r\n \"191.237.160.64/26\",\r\n \"191.237.160.224/28\",\r\n + \ \"191.239.224.0/26\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.EastUS2EUAP\",\r\n \"id\": \"Storage.EastUS2EUAP\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"eastus2euap\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.6.0/24\",\r\n + \ \"20.60.154.0/23\",\r\n \"20.60.184.0/23\",\r\n \"20.60.238.0/23\",\r\n + \ \"20.150.108.0/24\",\r\n \"20.157.58.0/24\",\r\n \"20.157.149.0/24\",\r\n + \ \"40.70.88.0/30\",\r\n \"40.70.88.4/31\",\r\n \"40.70.88.6/32\",\r\n + \ \"40.70.88.8/31\",\r\n \"40.70.88.10/32\",\r\n \"40.70.88.12/32\",\r\n + \ \"40.70.88.14/31\",\r\n \"40.79.88.16/30\",\r\n \"40.79.88.20/31\",\r\n + \ \"40.79.88.22/32\",\r\n \"40.79.88.24/31\",\r\n \"40.79.88.26/32\",\r\n + \ \"40.79.88.28/32\",\r\n \"40.79.88.30/31\",\r\n \"52.184.168.32/30\",\r\n + \ \"52.184.168.36/31\",\r\n \"52.184.168.38/32\",\r\n \"52.184.168.40/31\",\r\n + \ \"52.184.168.42/32\",\r\n \"52.184.168.44/32\",\r\n \"52.184.168.46/31\",\r\n + \ \"52.239.157.224/27\",\r\n \"52.239.165.192/26\",\r\n \"52.239.184.176/28\",\r\n + \ \"52.239.184.224/27\",\r\n \"52.239.185.0/28\",\r\n \"52.239.192.128/27\",\r\n + \ \"52.239.198.128/27\",\r\n \"52.239.230.0/24\",\r\n \"52.239.239.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.EastUS2Stage\",\r\n + \ \"id\": \"Storage.EastUS2Stage\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"eastus2\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"137.116.2.64/27\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.FranceCentral\",\r\n \"id\": \"Storage.FranceCentral\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"3\",\r\n \"region\": \"centralfrance\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.44.0/24\",\r\n + \ \"20.60.13.0/24\",\r\n \"20.60.156.0/23\",\r\n \"20.150.61.0/24\",\r\n + \ \"20.157.129.0/24\",\r\n \"20.209.8.0/23\",\r\n \"52.239.134.0/24\",\r\n + \ \"52.239.194.0/24\",\r\n \"52.239.241.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.FranceSouth\",\r\n + \ \"id\": \"Storage.FranceSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southfrance\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.28.0/24\",\r\n \"20.60.11.0/24\",\r\n \"20.60.188.0/23\",\r\n + \ \"20.150.19.0/24\",\r\n \"20.157.156.0/24\",\r\n \"52.239.135.0/26\",\r\n + \ \"52.239.196.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.GermanyNorth\",\r\n \"id\": \"Storage.GermanyNorth\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"germanyn\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.115.0/24\",\r\n + \ \"20.47.45.0/24\",\r\n \"20.150.60.0/24\",\r\n \"20.150.112.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.GermanyWestCentral\",\r\n + \ \"id\": \"Storage.GermanyWestCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"germanywc\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.38.118.0/24\",\r\n \"20.47.27.0/24\",\r\n \"20.60.22.0/23\",\r\n + \ \"20.150.54.0/24\",\r\n \"20.150.125.0/24\",\r\n \"20.157.160.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.JapanEast\",\r\n + \ \"id\": \"Storage.JapanEast\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"japaneast\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.73.8.16/28\",\r\n \"13.73.8.32/28\",\r\n \"20.38.116.0/23\",\r\n + \ \"20.47.12.0/24\",\r\n \"20.60.172.0/23\",\r\n \"20.60.248.0/23\",\r\n + \ \"20.150.85.0/24\",\r\n \"20.150.105.0/24\",\r\n \"20.157.38.0/24\",\r\n + \ \"20.157.144.0/24\",\r\n \"23.98.57.64/26\",\r\n \"40.115.169.32/28\",\r\n + \ \"40.115.175.16/28\",\r\n \"40.115.175.32/28\",\r\n \"40.115.227.80/28\",\r\n + \ \"40.115.229.16/28\",\r\n \"40.115.229.32/28\",\r\n \"40.115.231.64/27\",\r\n + \ \"40.115.231.112/28\",\r\n \"40.115.231.128/28\",\r\n \"52.239.144.0/23\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.JapanWest\",\r\n + \ \"id\": \"Storage.JapanWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"japanwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.10.0/24\",\r\n \"20.60.12.0/24\",\r\n \"20.60.186.0/23\",\r\n + \ \"20.150.10.0/23\",\r\n \"20.157.56.0/24\",\r\n \"20.209.16.0/23\",\r\n + \ \"23.98.56.0/26\",\r\n \"52.239.146.0/23\",\r\n \"104.214.152.16/28\",\r\n + \ \"104.214.152.176/28\",\r\n \"104.215.32.16/28\",\r\n \"104.215.32.32/28\",\r\n + \ \"104.215.32.64/27\",\r\n \"104.215.35.32/27\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.JioIndiaCentral\",\r\n + \ \"id\": \"Storage.JioIndiaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiacentral\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.60.170.0/23\",\r\n + \ \"20.150.64.0/24\",\r\n \"20.150.109.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.JioIndiaWest\",\r\n + \ \"id\": \"Storage.JioIndiaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"jioindiawest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.60.54.0/23\",\r\n \"20.150.65.0/24\",\r\n \"20.150.97.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.KoreaCentral\",\r\n + \ \"id\": \"Storage.KoreaCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"koreacentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.46.0/24\",\r\n \"20.60.16.0/24\",\r\n \"20.60.200.0/23\",\r\n + \ \"20.150.4.0/23\",\r\n \"20.157.140.0/24\",\r\n \"52.231.80.64/27\",\r\n + \ \"52.231.80.112/28\",\r\n \"52.231.80.128/28\",\r\n \"52.231.80.160/27\",\r\n + \ \"52.239.148.0/27\",\r\n \"52.239.164.192/26\",\r\n \"52.239.190.128/26\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.KoreaSouth\",\r\n + \ \"id\": \"Storage.KoreaSouth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"koreasouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.47.0/24\",\r\n \"20.60.202.0/23\",\r\n \"20.150.14.0/23\",\r\n + \ \"20.157.137.0/24\",\r\n \"52.231.168.64/27\",\r\n \"52.231.168.112/28\",\r\n + \ \"52.231.168.128/28\",\r\n \"52.231.208.16/28\",\r\n \"52.231.208.32/28\",\r\n + \ \"52.239.165.0/26\",\r\n \"52.239.165.160/27\",\r\n \"52.239.190.192/26\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.NorthCentralUS\",\r\n + \ \"id\": \"Storage.NorthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.3.0/24\",\r\n + \ \"20.47.15.0/24\",\r\n \"20.60.28.0/23\",\r\n \"20.60.82.0/23\",\r\n + \ \"20.150.17.0/25\",\r\n \"20.150.25.0/24\",\r\n \"20.150.49.0/24\",\r\n + \ \"20.150.67.0/24\",\r\n \"20.150.126.0/24\",\r\n \"20.157.47.0/24\",\r\n + \ \"23.98.49.0/26\",\r\n \"23.98.49.192/26\",\r\n \"23.98.55.0/26\",\r\n + \ \"23.98.55.112/28\",\r\n \"23.98.55.144/28\",\r\n \"40.116.120.16/28\",\r\n + \ \"40.116.232.16/28\",\r\n \"40.116.232.48/28\",\r\n \"40.116.232.96/28\",\r\n + \ \"52.162.56.16/28\",\r\n \"52.162.56.32/28\",\r\n \"52.162.56.64/27\",\r\n + \ \"52.162.56.112/28\",\r\n \"52.162.56.128/28\",\r\n \"52.239.149.0/24\",\r\n + \ \"52.239.186.0/24\",\r\n \"52.239.253.0/24\",\r\n \"157.56.216.0/26\",\r\n + \ \"168.62.96.128/26\",\r\n \"168.62.96.210/32\",\r\n \"168.62.96.224/27\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.NorthCentralUSStage\",\r\n + \ \"id\": \"Storage.NorthCentralUSStage\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"northcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"168.62.96.192/29\",\r\n + \ \"168.62.96.200/30\",\r\n \"168.62.96.204/32\",\r\n \"168.62.96.206/31\",\r\n + \ \"168.62.96.208/32\",\r\n \"168.62.96.212/30\",\r\n \"168.62.96.216/29\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.NorthEurope\",\r\n + \ \"id\": \"Storage.NorthEurope\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"4\",\r\n + \ \"region\": \"northeurope\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.70.208.16/28\",\r\n \"13.74.208.64/28\",\r\n + \ \"13.74.208.112/28\",\r\n \"13.74.208.144/28\",\r\n \"13.79.176.16/28\",\r\n + \ \"13.79.176.48/28\",\r\n \"13.79.176.80/28\",\r\n \"20.38.102.0/23\",\r\n + \ \"20.47.8.0/24\",\r\n \"20.47.20.0/23\",\r\n \"20.47.32.0/24\",\r\n + \ \"20.60.19.0/24\",\r\n \"20.60.40.0/23\",\r\n \"20.60.144.0/23\",\r\n + \ \"20.60.204.0/23\",\r\n \"20.60.246.0/23\",\r\n \"20.150.26.0/24\",\r\n + \ \"20.150.47.128/25\",\r\n \"20.150.48.0/24\",\r\n \"20.150.75.0/24\",\r\n + \ \"20.150.84.0/24\",\r\n \"20.150.104.0/24\",\r\n \"20.157.60.0/24\",\r\n + \ \"20.157.159.0/24\",\r\n \"20.209.14.0/23\",\r\n \"40.85.105.32/28\",\r\n + \ \"40.113.27.176/28\",\r\n \"52.164.112.16/28\",\r\n \"52.164.232.16/28\",\r\n + \ \"52.164.232.32/28\",\r\n \"52.164.232.64/28\",\r\n \"52.169.168.32/27\",\r\n + \ \"52.169.240.16/28\",\r\n \"52.169.240.32/28\",\r\n \"52.169.240.64/28\",\r\n + \ \"52.178.168.32/27\",\r\n \"52.178.168.80/28\",\r\n \"52.178.168.96/28\",\r\n + \ \"52.178.168.128/27\",\r\n \"52.236.40.16/28\",\r\n \"52.236.40.32/28\",\r\n + \ \"52.239.136.0/22\",\r\n \"52.239.205.0/24\",\r\n \"52.239.248.0/24\",\r\n + \ \"52.245.40.0/24\",\r\n \"104.41.232.16/28\",\r\n \"137.135.192.64/26\",\r\n + \ \"137.135.192.192/26\",\r\n \"137.135.193.192/26\",\r\n + \ \"137.135.194.0/25\",\r\n \"137.135.194.192/26\",\r\n \"168.61.120.32/27\",\r\n + \ \"168.61.120.64/27\",\r\n \"168.61.121.0/26\",\r\n \"168.63.32.0/26\",\r\n + \ \"168.63.33.192/26\",\r\n \"191.235.192.192/26\",\r\n \"191.235.193.32/28\",\r\n + \ \"191.235.255.192/26\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.NorwayEast\",\r\n \"id\": \"Storage.NorwayEast\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"norwaye\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.120.0/24\",\r\n + \ \"20.47.48.0/24\",\r\n \"20.60.206.0/23\",\r\n \"20.150.53.0/24\",\r\n + \ \"20.150.121.0/24\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.NorwayWest\",\r\n \"id\": \"Storage.NorwayWest\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"1\",\r\n \"region\": \"norwayw\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.49.0/24\",\r\n + \ \"20.60.15.0/24\",\r\n \"20.150.0.0/24\",\r\n \"20.150.56.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.SouthAfricaNorth\",\r\n + \ \"id\": \"Storage.SouthAfricaNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southafricanorth\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.114.128/25\",\r\n + \ \"20.47.50.0/24\",\r\n \"20.60.190.0/23\",\r\n \"20.150.21.0/24\",\r\n + \ \"20.150.62.0/24\",\r\n \"20.150.101.0/24\",\r\n \"52.239.232.0/25\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.SouthAfricaWest\",\r\n + \ \"id\": \"Storage.SouthAfricaWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"southafricawest\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.38.121.0/25\",\r\n + \ \"20.47.51.0/24\",\r\n \"20.60.8.0/24\",\r\n \"20.60.210.0/23\",\r\n + \ \"20.150.20.0/25\",\r\n \"52.239.232.128/25\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.SouthCentralUS\",\r\n + \ \"id\": \"Storage.SouthCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southcentralus\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"13.65.107.32/28\",\r\n + \ \"13.65.160.16/28\",\r\n \"13.65.160.48/28\",\r\n \"13.65.160.64/28\",\r\n + \ \"13.84.56.16/28\",\r\n \"13.85.88.16/28\",\r\n \"13.85.200.128/28\",\r\n + \ \"20.38.104.0/23\",\r\n \"20.47.0.0/27\",\r\n \"20.47.24.0/23\",\r\n + \ \"20.47.29.0/24\",\r\n \"20.60.48.0/22\",\r\n \"20.60.64.0/22\",\r\n + \ \"20.60.140.0/23\",\r\n \"20.60.148.0/23\",\r\n \"20.60.160.0/23\",\r\n + \ \"20.150.20.128/25\",\r\n \"20.150.38.0/23\",\r\n \"20.150.70.0/24\",\r\n + \ \"20.150.79.0/24\",\r\n \"20.150.93.0/24\",\r\n \"20.150.94.0/24\",\r\n + \ \"20.157.43.0/24\",\r\n \"20.157.54.0/24\",\r\n \"20.157.134.0/24\",\r\n + \ \"23.98.160.64/26\",\r\n \"23.98.162.192/26\",\r\n \"23.98.168.0/24\",\r\n + \ \"23.98.192.64/26\",\r\n \"23.98.255.64/26\",\r\n \"52.171.144.32/27\",\r\n + \ \"52.171.144.80/28\",\r\n \"52.171.144.96/28\",\r\n \"52.171.144.128/28\",\r\n + \ \"52.185.233.0/24\",\r\n \"52.189.177.0/24\",\r\n \"52.239.158.0/23\",\r\n + \ \"52.239.178.0/23\",\r\n \"52.239.180.0/22\",\r\n \"52.239.199.0/24\",\r\n + \ \"52.239.200.0/23\",\r\n \"52.239.203.0/24\",\r\n \"52.239.208.0/23\",\r\n + \ \"104.214.40.16/28\",\r\n \"104.214.80.16/28\",\r\n \"104.214.80.48/28\",\r\n + \ \"104.215.104.64/28\",\r\n \"168.62.128.128/26\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.SouthCentralUSSTG\",\r\n + \ \"id\": \"Storage.SouthCentralUSSTG\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"usstagec\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.38.110.0/23\",\r\n \"20.47.14.0/24\",\r\n \"20.60.9.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.SoutheastAsia\",\r\n + \ \"id\": \"Storage.SoutheastAsia\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"southeastasia\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.76.104.16/28\",\r\n \"20.47.9.0/24\",\r\n \"20.47.33.0/24\",\r\n + \ \"20.60.136.0/24\",\r\n \"20.60.138.0/23\",\r\n \"20.150.17.128/25\",\r\n + \ \"20.150.28.0/24\",\r\n \"20.150.86.0/24\",\r\n \"20.150.127.0/24\",\r\n + \ \"20.157.128.0/24\",\r\n \"52.163.176.16/28\",\r\n \"52.163.232.16/28\",\r\n + \ \"52.187.141.32/27\",\r\n \"52.237.104.16/28\",\r\n \"52.237.104.32/28\",\r\n + \ \"52.239.129.0/24\",\r\n \"52.239.197.0/24\",\r\n \"52.239.227.0/24\",\r\n + \ \"52.239.249.0/24\",\r\n \"104.215.240.64/28\",\r\n \"104.215.240.96/28\",\r\n + \ \"168.63.160.0/26\",\r\n \"168.63.160.192/26\",\r\n \"168.63.161.64/26\",\r\n + \ \"168.63.161.160/27\",\r\n \"168.63.161.192/26\",\r\n \"168.63.162.32/27\",\r\n + \ \"168.63.162.64/26\",\r\n \"168.63.162.144/28\",\r\n \"168.63.162.192/26\",\r\n + \ \"168.63.163.128/26\",\r\n \"168.63.180.64/26\",\r\n \"191.238.64.64/26\",\r\n + \ \"191.238.64.192/28\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.SouthIndia\",\r\n \"id\": \"Storage.SouthIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"southindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.52.0/24\",\r\n + \ \"20.60.10.0/24\",\r\n \"20.60.226.0/23\",\r\n \"20.150.24.0/24\",\r\n + \ \"20.157.135.0/24\",\r\n \"52.172.16.16/28\",\r\n \"52.172.16.80/28\",\r\n + \ \"52.172.16.96/28\",\r\n \"52.172.16.128/27\",\r\n \"52.239.135.128/26\",\r\n + \ \"52.239.188.0/24\",\r\n \"104.211.232.16/28\",\r\n \"104.211.232.48/28\",\r\n + \ \"104.211.232.80/28\",\r\n \"104.211.232.176/28\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.SwedenCentral\",\r\n + \ \"id\": \"Storage.SwedenCentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"1\",\r\n + \ \"region\": \"swedencentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.60.78.0/23\",\r\n \"20.60.234.0/23\",\r\n \"20.60.252.0/23\",\r\n + \ \"20.150.44.0/24\",\r\n \"20.150.120.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.SwitzerlandNorth\",\r\n + \ \"id\": \"Storage.SwitzerlandNorth\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"switzerlandn\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.53.0/24\",\r\n \"20.60.174.0/23\",\r\n \"20.150.59.0/24\",\r\n + \ \"20.150.118.0/24\",\r\n \"52.239.251.0/24\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.SwitzerlandWest\",\r\n + \ \"id\": \"Storage.SwitzerlandWest\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"switzerlandw\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.26.0/24\",\r\n \"20.60.176.0/23\",\r\n \"20.150.55.0/24\",\r\n + \ \"20.150.116.0/24\",\r\n \"20.157.133.0/24\",\r\n \"52.239.250.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.UAECentral\",\r\n + \ \"id\": \"Storage.UAECentral\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"2\",\r\n + \ \"region\": \"uaecentral\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.54.0/24\",\r\n \"20.150.6.0/23\",\r\n \"20.150.115.0/24\",\r\n + \ \"20.157.131.0/24\",\r\n \"52.239.233.0/25\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.UAENorth\",\r\n \"id\": + \"Storage.UAENorth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": + {\r\n \"changeNumber\": \"3\",\r\n \"region\": \"uaenorth\",\r\n + \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n + \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n + \ \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.38.124.0/23\",\r\n \"20.47.55.0/24\",\r\n \"20.60.21.0/24\",\r\n + \ \"20.60.212.0/23\",\r\n \"20.157.141.0/24\",\r\n \"52.239.233.128/25\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.UKSouth\",\r\n + \ \"id\": \"Storage.UKSouth\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"3\",\r\n \"region\": + \"uksouth\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.38.106.0/23\",\r\n \"20.47.11.0/24\",\r\n \"20.47.34.0/24\",\r\n + \ \"20.60.17.0/24\",\r\n \"20.60.166.0/23\",\r\n \"20.150.18.0/25\",\r\n + \ \"20.150.40.0/25\",\r\n \"20.150.41.0/24\",\r\n \"20.150.69.0/24\",\r\n + \ \"20.157.157.0/24\",\r\n \"20.209.6.0/23\",\r\n \"51.140.16.16/28\",\r\n + \ \"51.140.16.32/28\",\r\n \"51.140.168.64/27\",\r\n \"51.140.168.112/28\",\r\n + \ \"51.140.168.128/28\",\r\n \"51.141.128.32/27\",\r\n \"51.141.129.64/26\",\r\n + \ \"51.141.130.0/25\",\r\n \"52.239.187.0/25\",\r\n \"52.239.231.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.UKWest\",\r\n + \ \"id\": \"Storage.UKWest\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n + \ \"properties\": {\r\n \"changeNumber\": \"2\",\r\n \"region\": + \"ukwest\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.47.56.0/24\",\r\n \"20.60.164.0/23\",\r\n \"20.150.2.0/23\",\r\n + \ \"20.150.52.0/24\",\r\n \"20.150.110.0/24\",\r\n \"20.157.46.0/24\",\r\n + \ \"51.140.232.64/27\",\r\n \"51.140.232.112/28\",\r\n \"51.140.232.128/28\",\r\n + \ \"51.140.232.160/27\",\r\n \"51.141.128.0/27\",\r\n \"51.141.128.64/26\",\r\n + \ \"51.141.128.128/25\",\r\n \"51.141.129.128/26\",\r\n \"52.239.240.0/24\"\r\n + \ ]\r\n }\r\n },\r\n {\r\n \"name\": \"Storage.WestCentralUS\",\r\n + \ \"id\": \"Storage.WestCentralUS\",\r\n \"serviceTagChangeNumber\": + \"75\",\r\n \"properties\": {\r\n \"changeNumber\": \"3\",\r\n + \ \"region\": \"westcentralus\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.71.200.64/28\",\r\n \"13.71.200.96/28\",\r\n + \ \"13.71.200.240/28\",\r\n \"13.71.202.16/28\",\r\n \"13.71.202.32/28\",\r\n + \ \"13.71.202.64/27\",\r\n \"13.78.152.64/28\",\r\n \"13.78.240.16/28\",\r\n + \ \"20.47.4.0/24\",\r\n \"20.60.4.0/24\",\r\n \"20.60.218.0/23\",\r\n + \ \"20.150.81.0/24\",\r\n \"20.150.98.0/24\",\r\n \"20.157.41.0/24\",\r\n + \ \"52.161.112.16/28\",\r\n \"52.161.112.32/28\",\r\n \"52.161.168.16/28\",\r\n + \ \"52.161.168.32/28\",\r\n \"52.239.164.0/25\",\r\n \"52.239.167.0/24\",\r\n + \ \"52.239.244.0/23\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.WestEurope\",\r\n \"id\": \"Storage.WestEurope\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"4\",\r\n \"region\": \"westeurope\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"13.69.40.16/28\",\r\n + \ \"13.95.96.176/28\",\r\n \"13.95.240.16/28\",\r\n \"13.95.240.32/28\",\r\n + \ \"13.95.240.64/27\",\r\n \"20.38.108.0/23\",\r\n \"20.47.7.0/24\",\r\n + \ \"20.47.18.0/23\",\r\n \"20.47.30.0/24\",\r\n \"20.60.26.0/23\",\r\n + \ \"20.60.130.0/24\",\r\n \"20.60.150.0/23\",\r\n \"20.60.196.0/23\",\r\n + \ \"20.60.222.0/23\",\r\n \"20.60.250.0/23\",\r\n \"20.150.8.0/23\",\r\n + \ \"20.150.37.0/24\",\r\n \"20.150.42.0/24\",\r\n \"20.150.74.0/24\",\r\n + \ \"20.150.76.0/24\",\r\n \"20.150.83.0/24\",\r\n \"20.150.122.0/24\",\r\n + \ \"20.157.33.0/24\",\r\n \"20.157.146.0/24\",\r\n \"20.157.158.0/24\",\r\n + \ \"20.209.10.0/23\",\r\n \"40.68.176.16/28\",\r\n \"40.68.176.48/28\",\r\n + \ \"40.68.232.16/28\",\r\n \"40.68.232.48/28\",\r\n \"40.114.152.16/28\",\r\n + \ \"40.114.152.48/28\",\r\n \"40.118.72.176/28\",\r\n \"40.118.73.48/28\",\r\n + \ \"40.118.73.176/28\",\r\n \"40.118.73.208/28\",\r\n \"52.166.80.32/27\",\r\n + \ \"52.166.80.80/28\",\r\n \"52.166.80.96/28\",\r\n \"52.174.8.32/28\",\r\n + \ \"52.174.224.16/28\",\r\n \"52.174.224.32/28\",\r\n \"52.174.224.64/27\",\r\n + \ \"52.174.224.112/28\",\r\n \"52.174.224.128/28\",\r\n \"52.236.240.48/28\",\r\n + \ \"52.236.240.64/28\",\r\n \"52.239.140.0/22\",\r\n \"52.239.212.0/23\",\r\n + \ \"52.239.242.0/23\",\r\n \"104.214.243.32/28\",\r\n \"168.61.57.64/26\",\r\n + \ \"168.61.57.128/25\",\r\n \"168.61.58.0/26\",\r\n \"168.61.58.128/26\",\r\n + \ \"168.61.59.64/26\",\r\n \"168.61.61.0/26\",\r\n \"168.61.61.192/26\",\r\n + \ \"168.63.0.0/26\",\r\n \"168.63.2.64/26\",\r\n \"168.63.3.32/27\",\r\n + \ \"168.63.3.64/27\",\r\n \"168.63.113.32/27\",\r\n \"168.63.113.64/27\",\r\n + \ \"191.237.232.32/28\",\r\n \"191.237.232.128/28\",\r\n + \ \"191.239.203.0/28\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"Storage.WestIndia\",\r\n \"id\": \"Storage.WestIndia\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"westindia\",\r\n \"state\": \"GA\",\r\n + \ \"networkFeatures\": [\r\n \"API\",\r\n \"NSG\",\r\n + \ \"UDR\",\r\n \"FW\"\r\n ],\r\n \"systemService\": + \"AzureStorage\",\r\n \"addressPrefixes\": [\r\n \"20.47.57.0/24\",\r\n + \ \"20.60.216.0/23\",\r\n \"20.150.18.128/25\",\r\n \"20.150.43.0/25\",\r\n + \ \"20.150.106.0/24\",\r\n \"20.157.136.0/24\",\r\n \"52.239.135.192/26\",\r\n + \ \"52.239.187.128/25\",\r\n \"104.211.168.16/28\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.WestUS\",\r\n \"id\": + \"Storage.WestUS\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": + {\r\n \"changeNumber\": \"5\",\r\n \"region\": \"westus\",\r\n + \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n + \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n + \ \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.83.72.16/28\",\r\n \"13.88.144.112/28\",\r\n + \ \"13.88.144.240/28\",\r\n \"13.88.145.64/28\",\r\n \"13.88.145.96/28\",\r\n + \ \"13.88.145.128/28\",\r\n \"13.93.168.80/28\",\r\n \"13.93.168.112/28\",\r\n + \ \"13.93.168.144/28\",\r\n \"20.47.2.0/24\",\r\n \"20.47.22.0/23\",\r\n + \ \"20.60.1.0/24\",\r\n \"20.60.34.0/23\",\r\n \"20.60.52.0/23\",\r\n + \ \"20.60.80.0/23\",\r\n \"20.60.168.0/23\",\r\n \"20.60.230.0/23\",\r\n + \ \"20.60.232.0/23\",\r\n \"20.150.34.0/23\",\r\n \"20.150.91.0/24\",\r\n + \ \"20.150.102.0/24\",\r\n \"20.157.32.0/24\",\r\n \"20.157.57.0/24\",\r\n + \ \"20.157.130.0/24\",\r\n \"23.99.32.64/26\",\r\n \"23.99.34.224/28\",\r\n + \ \"23.99.37.96/28\",\r\n \"23.99.47.32/28\",\r\n \"40.78.72.16/28\",\r\n + \ \"40.78.112.64/28\",\r\n \"40.83.225.32/28\",\r\n \"40.83.227.16/28\",\r\n + \ \"40.112.152.16/28\",\r\n \"40.112.224.16/28\",\r\n \"40.112.224.48/28\",\r\n + \ \"52.180.40.16/28\",\r\n \"52.180.40.32/28\",\r\n \"52.190.240.16/28\",\r\n + \ \"52.190.240.32/28\",\r\n \"52.190.240.64/27\",\r\n \"52.190.240.112/28\",\r\n + \ \"52.190.240.128/28\",\r\n \"52.225.40.32/27\",\r\n \"52.238.56.16/28\",\r\n + \ \"52.238.56.32/28\",\r\n \"52.238.56.64/27\",\r\n \"52.238.56.112/28\",\r\n + \ \"52.238.56.128/28\",\r\n \"52.238.56.160/27\",\r\n \"52.239.104.16/28\",\r\n + \ \"52.239.104.32/28\",\r\n \"52.239.160.0/22\",\r\n \"52.239.228.0/23\",\r\n + \ \"52.239.254.0/23\",\r\n \"52.241.88.16/28\",\r\n \"52.241.88.32/28\",\r\n + \ \"52.241.88.64/27\",\r\n \"104.42.200.16/28\",\r\n \"138.91.128.128/26\",\r\n + \ \"138.91.129.0/26\",\r\n \"168.62.0.0/26\",\r\n \"168.62.1.128/26\",\r\n + \ \"168.63.89.64/26\",\r\n \"168.63.89.128/26\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.WestUS2\",\r\n \"id\": + \"Storage.WestUS2\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": + {\r\n \"changeNumber\": \"3\",\r\n \"region\": \"westus2\",\r\n + \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n + \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n + \ \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"13.66.176.16/28\",\r\n \"13.66.176.48/28\",\r\n + \ \"13.66.232.64/28\",\r\n \"13.66.232.208/28\",\r\n \"13.66.232.224/28\",\r\n + \ \"13.66.234.0/27\",\r\n \"13.77.184.64/28\",\r\n \"20.38.99.0/24\",\r\n + \ \"20.47.62.0/23\",\r\n \"20.60.20.0/24\",\r\n \"20.60.68.0/22\",\r\n + \ \"20.60.152.0/23\",\r\n \"20.60.228.0/23\",\r\n \"20.150.68.0/24\",\r\n + \ \"20.150.78.0/24\",\r\n \"20.150.87.0/24\",\r\n \"20.150.107.0/24\",\r\n + \ \"20.157.50.0/23\",\r\n \"52.183.48.16/28\",\r\n \"52.183.104.16/28\",\r\n + \ \"52.183.104.32/28\",\r\n \"52.191.176.16/28\",\r\n \"52.191.176.32/28\",\r\n + \ \"52.239.148.128/25\",\r\n \"52.239.176.128/25\",\r\n \"52.239.193.0/24\",\r\n + \ \"52.239.210.0/23\",\r\n \"52.239.236.0/23\"\r\n ]\r\n + \ }\r\n },\r\n {\r\n \"name\": \"Storage.WestUS3\",\r\n \"id\": + \"Storage.WestUS3\",\r\n \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": + {\r\n \"changeNumber\": \"1\",\r\n \"region\": \"westus3\",\r\n + \ \"state\": \"GA\",\r\n \"networkFeatures\": [\r\n \"API\",\r\n + \ \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n ],\r\n + \ \"systemService\": \"AzureStorage\",\r\n \"addressPrefixes\": + [\r\n \"20.60.14.0/24\",\r\n \"20.60.38.0/23\",\r\n \"20.60.162.0/23\",\r\n + \ \"20.150.30.0/24\",\r\n \"20.157.40.0/24\",\r\n \"20.157.145.0/24\",\r\n + \ \"20.209.4.0/23\"\r\n ]\r\n }\r\n },\r\n {\r\n + \ \"name\": \"StorageSyncService\",\r\n \"id\": \"StorageSyncService\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"7\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"StorageSyncService\",\r\n \"addressPrefixes\": + [\r\n \"13.70.176.196/32\",\r\n \"13.73.248.112/29\",\r\n + \ \"13.75.153.240/32\",\r\n \"13.76.81.46/32\",\r\n \"20.21.42.120/29\",\r\n + \ \"20.36.120.216/29\",\r\n \"20.37.64.216/29\",\r\n \"20.37.157.80/29\",\r\n + \ \"20.37.195.96/29\",\r\n \"20.37.224.216/29\",\r\n \"20.38.85.152/29\",\r\n + \ \"20.38.136.224/29\",\r\n \"20.39.11.96/29\",\r\n \"20.41.5.144/29\",\r\n + \ \"20.41.65.184/29\",\r\n \"20.41.193.160/29\",\r\n \"20.42.4.248/29\",\r\n + \ \"20.42.131.224/29\",\r\n \"20.42.227.128/29\",\r\n \"20.43.42.8/29\",\r\n + \ \"20.43.66.0/29\",\r\n \"20.43.131.40/29\",\r\n \"20.45.71.151/32\",\r\n + \ \"20.45.112.216/29\",\r\n \"20.45.192.248/29\",\r\n \"20.45.208.0/29\",\r\n + \ \"20.50.1.0/29\",\r\n \"20.72.27.184/29\",\r\n \"20.150.172.40/29\",\r\n + \ \"20.189.108.56/29\",\r\n \"20.192.32.232/29\",\r\n \"20.193.205.128/29\",\r\n + \ \"23.100.106.151/32\",\r\n \"23.102.225.54/32\",\r\n \"40.67.48.208/29\",\r\n + \ \"40.80.57.192/29\",\r\n \"40.80.169.176/29\",\r\n \"40.80.188.24/29\",\r\n + \ \"40.82.253.192/29\",\r\n \"40.89.17.232/29\",\r\n \"40.112.150.67/32\",\r\n + \ \"40.113.94.67/32\",\r\n \"40.123.47.110/32\",\r\n \"40.123.216.130/32\",\r\n + \ \"51.12.101.240/29\",\r\n \"51.12.204.248/29\",\r\n \"51.104.25.224/29\",\r\n + \ \"51.105.80.208/29\",\r\n \"51.105.88.248/29\",\r\n \"51.107.48.224/29\",\r\n + \ \"51.107.144.216/29\",\r\n \"51.116.60.244/30\",\r\n \"51.116.245.168/30\",\r\n + \ \"51.120.40.224/29\",\r\n \"51.120.224.216/29\",\r\n \"51.137.161.240/29\",\r\n + \ \"51.140.67.72/32\",\r\n \"51.140.202.34/32\",\r\n \"51.143.192.208/29\",\r\n + \ \"52.136.48.216/29\",\r\n \"52.136.131.99/32\",\r\n \"52.140.105.184/29\",\r\n + \ \"52.143.166.54/32\",\r\n \"52.150.139.104/29\",\r\n \"52.161.25.233/32\",\r\n + \ \"52.176.149.179/32\",\r\n \"52.183.27.204/32\",\r\n \"52.225.171.85/32\",\r\n + \ \"52.228.42.41/32\",\r\n \"52.228.81.248/29\",\r\n \"52.231.67.75/32\",\r\n + \ \"52.231.159.38/32\",\r\n \"52.235.36.119/32\",\r\n \"65.52.62.167/32\",\r\n + \ \"102.133.56.128/29\",\r\n \"102.133.75.173/32\",\r\n \"102.133.175.72/32\",\r\n + \ \"104.40.191.8/32\",\r\n \"104.41.148.238/32\",\r\n \"104.41.161.113/32\",\r\n + \ \"104.208.61.223/32\",\r\n \"104.210.219.252/32\",\r\n + \ \"104.211.73.56/32\",\r\n \"104.211.231.18/32\",\r\n \"104.214.165.88/29\",\r\n + \ \"191.233.9.96/29\",\r\n \"191.235.225.216/29\",\r\n \"191.237.253.115/32\",\r\n + \ \"2603:1000:4::340/123\",\r\n \"2603:1000:104:1::300/123\",\r\n + \ \"2603:1010:6:1::300/123\",\r\n \"2603:1010:101::340/123\",\r\n + \ \"2603:1010:304::340/123\",\r\n \"2603:1010:404::340/123\",\r\n + \ \"2603:1020:5:1::300/123\",\r\n \"2603:1020:206:1::300/123\",\r\n + \ \"2603:1020:305::340/123\",\r\n \"2603:1020:405::340/123\",\r\n + \ \"2603:1020:605::340/123\",\r\n \"2603:1020:705:1::300/123\",\r\n + \ \"2603:1020:805:1::300/123\",\r\n \"2603:1020:905::340/123\",\r\n + \ \"2603:1020:a04:1::300/123\",\r\n \"2603:1020:b04::340/123\",\r\n + \ \"2603:1020:c04:1::300/123\",\r\n \"2603:1020:d04::340/123\",\r\n + \ \"2603:1020:e04:1::300/123\",\r\n \"2603:1020:e04:802::2a0/123\",\r\n + \ \"2603:1020:f04::340/123\",\r\n \"2603:1020:1004::300/123\",\r\n + \ \"2603:1020:1004:800::120/123\",\r\n \"2603:1020:1104:400::320/123\",\r\n + \ \"2603:1030:f:1::340/123\",\r\n \"2603:1030:f:400::dc0/123\",\r\n + \ \"2603:1030:10:1::300/123\",\r\n \"2603:1030:104:1::300/123\",\r\n + \ \"2603:1030:104:402::760/123\",\r\n \"2603:1030:107:400::2a0/123\",\r\n + \ \"2603:1030:210:1::300/123\",\r\n \"2603:1030:40b:1::300/123\",\r\n + \ \"2603:1030:40c:1::300/123\",\r\n \"2603:1030:504:1::300/123\",\r\n + \ \"2603:1030:504:802::120/123\",\r\n \"2603:1030:608::340/123\",\r\n + \ \"2603:1030:608:402::5e0/123\",\r\n \"2603:1030:807:1::300/123\",\r\n + \ \"2603:1030:a07::340/123\",\r\n \"2603:1030:b04::340/123\",\r\n + \ \"2603:1030:c06:1::300/123\",\r\n \"2603:1030:f05:1::300/123\",\r\n + \ \"2603:1030:1005::340/123\",\r\n \"2603:1040:5:1::300/123\",\r\n + \ \"2603:1040:207::340/123\",\r\n \"2603:1040:207:402::5c0/123\",\r\n + \ \"2603:1040:407:1::300/123\",\r\n \"2603:1040:606::340/123\",\r\n + \ \"2603:1040:806::340/123\",\r\n \"2603:1040:904:1::300/123\",\r\n + \ \"2603:1040:a06:1::300/123\",\r\n \"2603:1040:a06:802::2a0/123\",\r\n + \ \"2603:1040:b04::340/123\",\r\n \"2603:1040:c06::340/123\",\r\n + \ \"2603:1040:d04::300/123\",\r\n \"2603:1040:d04:800::120/123\",\r\n + \ \"2603:1040:f05:1::300/123\",\r\n \"2603:1040:f05:802::2a0/123\",\r\n + \ \"2603:1040:1002:400::240/123\",\r\n \"2603:1040:1104:400::320/123\",\r\n + \ \"2603:1050:6:1::300/123\",\r\n \"2603:1050:6:802::2a0/123\",\r\n + \ \"2603:1050:403::300/123\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"WindowsAdminCenter\",\r\n \"id\": \"WindowsAdminCenter\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"2\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"WindowsAdminCenter\",\r\n \"addressPrefixes\": + [\r\n \"13.73.255.240/29\",\r\n \"20.21.34.136/29\",\r\n + \ \"20.36.125.96/29\",\r\n \"20.37.68.232/29\",\r\n \"20.37.229.144/29\",\r\n + \ \"20.38.142.80/29\",\r\n \"20.40.224.232/29\",\r\n \"20.43.46.240/29\",\r\n + \ \"20.45.115.136/29\",\r\n \"20.46.10.32/29\",\r\n \"20.48.192.88/29\",\r\n + \ \"20.49.102.232/29\",\r\n \"20.49.115.176/29\",\r\n \"20.51.8.80/29\",\r\n + \ \"20.51.16.112/29\",\r\n \"20.53.44.8/29\",\r\n \"20.61.98.72/29\",\r\n + \ \"20.62.128.152/29\",\r\n \"20.66.2.0/29\",\r\n \"20.72.17.120/29\",\r\n + \ \"20.150.161.152/29\",\r\n \"20.187.196.200/29\",\r\n \"20.191.160.120/29\",\r\n + \ \"20.192.161.128/29\",\r\n \"20.192.230.8/29\",\r\n \"20.194.72.48/29\",\r\n + \ \"23.98.108.160/29\",\r\n \"40.67.52.80/29\",\r\n \"40.80.63.248/29\",\r\n + \ \"40.80.173.136/29\",\r\n \"40.89.23.224/29\",\r\n \"51.12.42.72/29\",\r\n + \ \"51.12.194.96/29\",\r\n \"51.13.136.0/29\",\r\n \"51.107.53.56/29\",\r\n + \ \"51.107.149.240/29\",\r\n \"51.116.51.40/29\",\r\n \"51.116.148.96/29\",\r\n + \ \"51.120.44.200/29\",\r\n \"51.137.167.144/29\",\r\n \"51.143.208.136/29\",\r\n + \ \"52.136.52.224/29\",\r\n \"52.136.184.8/29\",\r\n \"52.140.110.168/29\",\r\n + \ \"52.146.131.56/29\",\r\n \"52.150.156.224/29\",\r\n \"52.172.112.144/29\",\r\n + \ \"102.133.60.40/29\",\r\n \"102.133.220.200/29\",\r\n \"104.46.178.8/29\",\r\n + \ \"191.233.14.200/29\",\r\n \"191.234.138.152/29\",\r\n + \ \"2603:1020:a04::690/125\",\r\n \"2603:1020:e04::350/125\",\r\n + \ \"2603:1020:1004:1::1a8/125\",\r\n \"2603:1020:1104::5a8/125\",\r\n + \ \"2603:1030:f:1::2b0/125\",\r\n \"2603:1030:104::6c0/125\",\r\n + \ \"2603:1030:107::588/125\",\r\n \"2603:1030:504::1a8/125\",\r\n + \ \"2603:1030:608:1::2b0/125\",\r\n \"2603:1040:207:1::460/125\",\r\n + \ \"2603:1040:a06::7c0/125\",\r\n \"2603:1040:d04:1::1a8/125\",\r\n + \ \"2603:1040:f05::350/125\",\r\n \"2603:1040:1002::788/125\",\r\n + \ \"2603:1040:1104::5a8/125\"\r\n ]\r\n }\r\n },\r\n + \ {\r\n \"name\": \"WindowsVirtualDesktop\",\r\n \"id\": \"WindowsVirtualDesktop\",\r\n + \ \"serviceTagChangeNumber\": \"75\",\r\n \"properties\": {\r\n \"changeNumber\": + \"6\",\r\n \"region\": \"\",\r\n \"state\": \"GA\",\r\n \"networkFeatures\": + [\r\n \"API\",\r\n \"NSG\",\r\n \"UDR\",\r\n \"FW\"\r\n + \ ],\r\n \"systemService\": \"WindowsVirtualDesktop\",\r\n \"addressPrefixes\": + [\r\n \"13.66.251.49/32\",\r\n \"13.67.68.78/32\",\r\n \"13.68.24.173/32\",\r\n + \ \"13.68.76.104/32\",\r\n \"13.69.82.138/32\",\r\n \"13.69.156.85/32\",\r\n + \ \"13.70.40.201/32\",\r\n \"13.70.120.215/32\",\r\n \"13.71.5.20/32\",\r\n + \ \"13.71.67.87/32\",\r\n \"13.71.81.161/32\",\r\n \"13.71.95.31/32\",\r\n + \ \"13.71.113.6/32\",\r\n \"13.73.237.154/32\",\r\n \"13.75.114.143/32\",\r\n + \ \"13.75.171.61/32\",\r\n \"13.75.198.169/32\",\r\n \"13.76.88.89/32\",\r\n + \ \"13.76.195.19/32\",\r\n \"13.76.230.148/32\",\r\n \"13.77.45.213/32\",\r\n + \ \"13.77.140.58/32\",\r\n \"13.79.243.194/32\",\r\n \"13.88.221.28/32\",\r\n + \ \"13.88.254.98/32\",\r\n \"20.36.33.29/32\",\r\n \"20.36.33.170/32\",\r\n + \ \"20.36.35.190/32\",\r\n \"20.36.38.195/32\",\r\n \"20.36.39.50/32\",\r\n + \ \"20.36.39.171/32\",\r\n \"20.36.41.74/32\",\r\n \"20.41.77.252/32\",\r\n + \ \"20.45.64.86/32\",\r\n \"20.45.67.112/32\",\r\n \"20.45.67.185/32\",\r\n + \ \"20.45.79.3/32\",\r\n \"20.45.79.24/32\",\r\n \"20.45.79.91/32\",\r\n + \ \"20.45.79.96/32\",\r\n \"20.45.79.168/32\",\r\n \"20.46.46.252/32\",\r\n + \ \"20.74.148.158/32\",\r\n \"20.74.152.13/32\",\r\n \"20.74.154.246/32\",\r\n + \ \"20.74.156.183/32\",\r\n \"20.74.178.102/32\",\r\n \"20.74.182.99/32\",\r\n + \ \"20.96.12.123/32\",\r\n \"20.151.111.129/32\",\r\n \"20.188.3.1/32\",\r\n + \ \"20.188.39.108/32\",\r\n \"20.188.41.240/32\",\r\n \"20.188.45.82/32\",\r\n + \ \"20.190.43.99/32\",\r\n \"20.203.0.247/32\",\r\n \"20.203.7.51/32\",\r\n + \ \"20.203.18.112/32\",\r\n \"20.203.26.163/32\",\r\n \"23.97.108.170/32\",\r\n + \ \"23.98.66.174/32\",\r\n \"23.98.133.187/32\",\r\n \"23.99.141.138/32\",\r\n + \ \"23.100.50.154/32\",\r\n \"23.100.98.36/32\",\r\n \"23.101.5.54/32\",\r\n + \ \"23.101.220.135/32\",\r\n \"23.102.229.113/32\",\r\n \"40.65.122.222/32\",\r\n + \ \"40.68.18.120/32\",\r\n \"40.69.31.73/32\",\r\n \"40.69.90.166/32\",\r\n + \ \"40.69.102.46/32\",\r\n \"40.69.149.151/32\",\r\n \"40.70.189.87/32\",\r\n + \ \"40.74.84.253/32\",\r\n \"40.74.113.202/32\",\r\n \"40.74.118.163/32\",\r\n + \ \"40.74.136.34/32\",\r\n \"40.75.30.117/32\",\r\n \"40.80.80.48/32\",\r\n + \ \"40.83.79.39/32\",\r\n \"40.85.241.159/32\",\r\n \"40.86.204.245/32\",\r\n + \ \"40.86.205.216/32\",\r\n \"40.86.208.118/32\",\r\n \"40.86.222.183/32\",\r\n + \ \"40.89.129.146/32\",\r\n \"40.89.154.76/32\",\r\n \"40.113.199.138/32\",\r\n + \ \"40.113.200.58/32\",\r\n \"40.114.241.90/32\",\r\n \"40.115.136.175/32\",\r\n + \ \"40.120.39.124/32\",\r\n \"40.122.28.196/32\",\r\n \"40.122.212.20/32\",\r\n + \ \"40.123.228.58/32\",\r\n \"40.127.3.207/32\",\r\n \"51.11.13.248/32\",\r\n + \ \"51.11.241.142/32\",\r\n \"51.104.49.88/32\",\r\n \"51.105.54.123/32\",\r\n + \ \"51.107.68.172/32\",\r\n \"51.107.69.35/32\",\r\n \"51.107.78.168/32\",\r\n + \ \"51.107.85.67/32\",\r\n \"51.107.85.110/32\",\r\n \"51.107.86.7/32\",\r\n + \ \"51.107.86.99/32\",\r\n \"51.116.171.102/32\",\r\n \"51.116.182.248/32\",\r\n + \ \"51.116.225.43/32\",\r\n \"51.116.225.44/32\",\r\n \"51.116.225.55/32\",\r\n + \ \"51.116.236.74/32\",\r\n \"51.116.236.84/32\",\r\n \"51.120.69.158/32\",\r\n + \ \"51.120.70.135/32\",\r\n \"51.120.70.141/32\",\r\n \"51.120.77.155/32\",\r\n + \ \"51.120.78.142/32\",\r\n \"51.120.79.212/32\",\r\n \"51.120.88.120/32\",\r\n + \ \"51.132.29.107/32\",\r\n \"51.136.28.200/32\",\r\n \"51.137.89.79/32\",\r\n + \ \"51.140.57.159/32\",\r\n \"51.140.206.110/32\",\r\n \"51.140.231.223/32\",\r\n + \ \"51.140.255.55/32\",\r\n \"51.141.30.31/32\",\r\n \"51.141.122.89/32\",\r\n + \ \"51.141.173.236/32\",\r\n \"51.143.39.79/32\",\r\n \"51.143.164.192/32\",\r\n + \ \"51.143.169.107/32\",\r\n \"51.145.17.75/32\",\r\n \"52.137.2.50/32\",\r\n + \ \"52.138.9.153/32\",\r\n \"52.138.20.115/32\",\r\n \"52.138.28.23/32\",\r\n + \ \"52.141.37.201/32\",\r\n \"52.141.56.101/32\",\r\n \"52.142.161.0/32\",\r\n + \ \"52.142.162.226/32\",\r\n \"52.143.96.87/32\",\r\n \"52.143.182.208/32\",\r\n + \ \"52.147.3.93/32\",\r\n \"52.147.160.158/32\",\r\n \"52.151.53.196/32\",\r\n + \ \"52.155.111.124/32\",\r\n \"52.156.171.127/32\",\r\n \"52.163.209.255/32\",\r\n + \ \"52.164.126.124/32\",\r\n \"52.165.218.15/32\",\r\n \"52.167.163.135/32\",\r\n + \ \"52.167.171.53/32\",\r\n \"52.169.5.116/32\",\r\n \"52.171.36.33/32\",\r\n + \ \"52.172.34.74/32\",\r\n \"52.172.40.215/32\",\r\n \"52.172.133.5/32\",\r\n + \ \"52.172.194.109/32\",\r\n \"52.172.210.235/32\",\r\n \"52.172.217.34/32\",\r\n + \ \"52.172.223.46/32\",\r\n \"52.173.89.168/32\",\r\n \"52.175.144.120/32\",\r\n + \ \"52.175.253.156/32\",\r\n \"52.177.123.162/32\",\r\n \"52.177.172.247/32\",\r\n + \ \"52.183.19.64/32\",\r\n \"52.183.130.137/32\",\r\n \"52.185.202.152/32\",\r\n + \ \"52.187.127.152/32\",\r\n \"52.189.194.14/32\",\r\n \"52.189.215.151/32\",\r\n + \ \"52.189.233.158/32\",\r\n \"52.191.129.231/32\",\r\n \"52.228.29.164/32\",\r\n + \ \"52.229.117.254/32\",\r\n \"52.229.125.45/32\",\r\n \"52.229.207.180/32\",\r\n + \ \"52.231.13.193/32\",\r\n \"52.231.38.211/32\",\r\n \"52.231.93.224/32\",\r\n + \ \"52.231.98.58/32\",\r\n \"52.231.155.130/32\",\r\n \"52.231.156.19/32\",\r\n + \ \"52.231.164.163/32\",\r\n \"52.231.166.199/32\",\r\n \"52.231.195.7/32\",\r\n + \ \"52.231.197.195/32\",\r\n \"52.231.206.162/32\",\r\n \"52.233.16.198/32\",\r\n + \ \"52.237.20.14/32\",\r\n \"52.237.201.246/32\",\r\n \"52.237.253.245/32\",\r\n + \ \"52.242.86.101/32\",\r\n \"52.243.65.107/32\",\r\n \"52.243.74.213/32\",\r\n + \ \"52.246.165.140/32\",\r\n \"52.246.177.221/32\",\r\n \"52.246.191.98/32\",\r\n + \ \"52.247.122.225/32\",\r\n \"52.247.123.0/32\",\r\n \"52.255.40.105/32\",\r\n + \ \"52.255.61.145/32\",\r\n \"65.52.71.120/32\",\r\n \"65.52.158.177/32\",\r\n + \ \"70.37.83.67/32\",\r\n \"70.37.86.126/32\",\r\n \"70.37.99.24/32\",\r\n + \ \"102.37.42.159/32\",\r\n \"102.133.64.36/32\",\r\n \"102.133.64.68/32\",\r\n + \ \"102.133.64.91/32\",\r\n \"102.133.64.111/32\",\r\n \"102.133.72.250/32\",\r\n + \ \"102.133.75.8/32\",\r\n \"102.133.75.32/32\",\r\n \"102.133.75.35/32\",\r\n + \ \"102.133.161.220/32\",\r\n \"102.133.166.135/32\",\r\n + \ \"102.133.172.191/32\",\r\n \"102.133.175.200/32\",\r\n + \ \"102.133.224.81/32\",\r\n \"102.133.234.139/32\",\r\n + \ \"104.40.156.194/32\",\r\n \"104.41.5.162/32\",\r\n \"104.41.45.182/32\",\r\n + \ \"104.41.166.159/32\",\r\n \"104.43.169.4/32\",\r\n \"104.46.237.209/32\",\r\n + \ \"104.208.28.82/32\",\r\n \"104.209.233.222/32\",\r\n \"104.210.150.160/32\",\r\n + \ \"104.211.78.17/32\",\r\n \"104.211.114.61/32\",\r\n \"104.211.138.88/32\",\r\n + \ \"104.211.140.190/32\",\r\n \"104.211.155.114/32\",\r\n + \ \"104.211.165.123/32\",\r\n \"104.211.184.150/32\",\r\n + \ \"104.211.188.151/32\",\r\n \"104.211.211.213/32\",\r\n + \ \"104.211.216.230/32\",\r\n \"104.211.222.50/32\",\r\n + \ \"104.211.242.104/32\",\r\n \"104.214.60.144/32\",\r\n + \ \"104.214.237.23/32\",\r\n \"104.215.51.3/32\",\r\n \"104.215.103.51/32\",\r\n + \ \"104.215.112.85/32\",\r\n \"137.116.49.12/32\",\r\n \"137.116.248.148/32\",\r\n + \ \"137.117.171.26/32\",\r\n \"137.135.243.65/32\",\r\n \"138.91.44.13/32\",\r\n + \ \"168.61.167.193/32\",\r\n \"168.63.31.54/32\",\r\n \"168.63.71.119/32\",\r\n + \ \"168.63.137.213/32\",\r\n \"191.232.49.74/32\",\r\n \"191.232.166.149/32\",\r\n + \ \"191.232.235.70/32\",\r\n \"191.232.238.73/32\",\r\n \"191.234.191.63/32\",\r\n + \ \"191.235.65.127/32\",\r\n \"191.235.72.175/32\",\r\n \"191.235.73.211/32\",\r\n + \ \"191.235.78.126/32\",\r\n \"191.239.248.16/32\"\r\n ]\r\n + \ }\r\n }\r\n ],\r\n \"nextLink\": \"\"\r\n}" headers: cache-control: - no-cache content-length: - - '1528044' + - '1600228' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:56 GMT + - Fri, 05 Nov 2021 10:10:31 GMT expires: - '-1' pragma: @@ -22656,7 +19575,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ff0ee73b-f606-4d11-a4ed-c2bd79425f9e + - 57702900-5597-45db-8462-825989eb9bea status: code: 200 message: OK @@ -22675,20 +19594,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\"\ - ,\r\n \"etag\": \"W/\\\"c6b3a3a8-8dc5-43fd-931a-edb2c466a317\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - access\": \"Allow\",\r\n \"routeFilterRuleType\": \"Community\",\r\n \ - \ \"communities\": [\r\n \"12076:51004\"\r\n ]\r\n },\r\n \"type\"\ - : \"Microsoft.Network/routeFilters/routeFilterRules\"\r\n}" + string: "{\r\n \"name\": \"myRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\",\r\n + \ \"etag\": \"W/\\\"cc4d6dc7-5982-44d0-be63-30be5a5499db\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"access\": \"Allow\",\r\n + \ \"routeFilterRuleType\": \"Community\",\r\n \"communities\": [\r\n + \ \"12076:51004\"\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/routeFilters/routeFilterRules\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2ffa6279-5962-4608-a556-260099719f26?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5090352f-07e9-42c0-92e2-e11ddbd04910?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -22696,7 +19615,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:34:57 GMT + - Fri, 05 Nov 2021 10:10:31 GMT expires: - '-1' pragma: @@ -22709,9 +19628,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9962e95f-aec9-4915-b979-4459c1edf867 + - 09c17bb2-b91e-4c8b-983f-0a72a63ae9aa x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1195' status: code: 201 message: Created @@ -22725,9 +19644,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/2ffa6279-5962-4608-a556-260099719f26?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/5090352f-07e9-42c0-92e2-e11ddbd04910?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -22739,7 +19659,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:35:07 GMT + - Fri, 05 Nov 2021 10:10:41 GMT expires: - '-1' pragma: @@ -22756,7 +19676,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b2a2f9e9-53b8-4917-bde4-94f1aaa80b70 + - 75f83eca-f815-429e-bc33-e7bd29fc58a8 status: code: 200 message: OK @@ -22770,17 +19690,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\"\ - ,\r\n \"etag\": \"W/\\\"828af937-a8b7-424b-b027-7ca80af8111e\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - access\": \"Allow\",\r\n \"routeFilterRuleType\": \"Community\",\r\n \ - \ \"communities\": [\r\n \"12076:51004\"\r\n ]\r\n },\r\n \"type\"\ - : \"Microsoft.Network/routeFilters/routeFilterRules\"\r\n}" + string: "{\r\n \"name\": \"myRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\",\r\n + \ \"etag\": \"W/\\\"2e3d7945-9d4d-4e69-aaa8-5f55a2a125cd\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"access\": \"Allow\",\r\n + \ \"routeFilterRuleType\": \"Community\",\r\n \"communities\": [\r\n + \ \"12076:51004\"\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/routeFilters/routeFilterRules\"\r\n}" headers: cache-control: - no-cache @@ -22789,9 +19709,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:35:08 GMT + - Fri, 05 Nov 2021 10:10:41 GMT etag: - - W/"828af937-a8b7-424b-b027-7ca80af8111e" + - W/"2e3d7945-9d4d-4e69-aaa8-5f55a2a125cd" expires: - '-1' pragma: @@ -22808,7 +19728,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e590b7bc-ee13-4f92-ad74-f497b5d690a2 + - d8e3104a-96f9-4e17-8ea0-63c8bf118514 status: code: 200 message: OK @@ -22822,17 +19742,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\"\ - ,\r\n \"etag\": \"W/\\\"828af937-a8b7-424b-b027-7ca80af8111e\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - access\": \"Allow\",\r\n \"routeFilterRuleType\": \"Community\",\r\n \ - \ \"communities\": [\r\n \"12076:51004\"\r\n ]\r\n },\r\n \"type\"\ - : \"Microsoft.Network/routeFilters/routeFilterRules\"\r\n}" + string: "{\r\n \"name\": \"myRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\",\r\n + \ \"etag\": \"W/\\\"2e3d7945-9d4d-4e69-aaa8-5f55a2a125cd\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"access\": \"Allow\",\r\n + \ \"routeFilterRuleType\": \"Community\",\r\n \"communities\": [\r\n + \ \"12076:51004\"\r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/routeFilters/routeFilterRules\"\r\n}" headers: cache-control: - no-cache @@ -22841,9 +19761,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:35:08 GMT + - Fri, 05 Nov 2021 10:10:41 GMT etag: - - W/"828af937-a8b7-424b-b027-7ca80af8111e" + - W/"2e3d7945-9d4d-4e69-aaa8-5f55a2a125cd" expires: - '-1' pragma: @@ -22860,7 +19780,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8b794bb0-e25f-43c9-9f69-e8678a7851c2 + - 246726b5-bedb-4fc5-8888-d99095634d7b status: code: 200 message: OK @@ -22874,23 +19794,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRouteFilter\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter\"\ - ,\r\n \"etag\": \"W/\\\"828af937-a8b7-424b-b027-7ca80af8111e\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/routeFilters\",\r\n \"location\": \"eastus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"rules\": [\r\n \ - \ {\r\n \"name\": \"myRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\"\ - ,\r\n \"etag\": \"W/\\\"828af937-a8b7-424b-b027-7ca80af8111e\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"access\": \"Allow\",\r\n \"routeFilterRuleType\"\ - : \"Community\",\r\n \"communities\": [\r\n \"12076:51004\"\ - \r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/routeFilters/routeFilterRules\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myRouteFilter\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter\",\r\n + \ \"etag\": \"W/\\\"2e3d7945-9d4d-4e69-aaa8-5f55a2a125cd\\\"\",\r\n \"type\": + \"Microsoft.Network/routeFilters\",\r\n \"location\": \"eastus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"rules\": [\r\n {\r\n \"name\": \"myRule\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\",\r\n + \ \"etag\": \"W/\\\"2e3d7945-9d4d-4e69-aaa8-5f55a2a125cd\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"access\": \"Allow\",\r\n \"routeFilterRuleType\": \"Community\",\r\n + \ \"communities\": [\r\n \"12076:51004\"\r\n ]\r\n + \ },\r\n \"type\": \"Microsoft.Network/routeFilters/routeFilterRules\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -22899,9 +19820,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:35:08 GMT + - Fri, 05 Nov 2021 10:10:41 GMT etag: - - W/"828af937-a8b7-424b-b027-7ca80af8111e" + - W/"2e3d7945-9d4d-4e69-aaa8-5f55a2a125cd" expires: - '-1' pragma: @@ -22918,7 +19839,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 69b3d3d4-4377-4c5b-8c53-085dfb2af6ff + - e4906baf-3318-4c7e-ba33-1240ce4d3643 status: code: 200 message: OK @@ -22936,23 +19857,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRouteFilter\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter\"\ - ,\r\n \"etag\": \"W/\\\"3c444970-f445-4993-b63d-f770b8831015\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/routeFilters\",\r\n \"location\": \"eastus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"rules\": [\r\n \ - \ {\r\n \"name\": \"myRule\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\"\ - ,\r\n \"etag\": \"W/\\\"3c444970-f445-4993-b63d-f770b8831015\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"access\": \"Allow\",\r\n \"routeFilterRuleType\"\ - : \"Community\",\r\n \"communities\": [\r\n \"12076:51004\"\ - \r\n ]\r\n },\r\n \"type\": \"Microsoft.Network/routeFilters/routeFilterRules\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myRouteFilter\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter\",\r\n + \ \"etag\": \"W/\\\"726f2e73-665f-4058-9d61-5c22794906d7\\\"\",\r\n \"type\": + \"Microsoft.Network/routeFilters\",\r\n \"location\": \"eastus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"rules\": [\r\n {\r\n \"name\": \"myRule\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule\",\r\n + \ \"etag\": \"W/\\\"726f2e73-665f-4058-9d61-5c22794906d7\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"access\": \"Allow\",\r\n \"routeFilterRuleType\": \"Community\",\r\n + \ \"communities\": [\r\n \"12076:51004\"\r\n ]\r\n + \ },\r\n \"type\": \"Microsoft.Network/routeFilters/routeFilterRules\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -22963,7 +19885,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:35:12 GMT + - Fri, 05 Nov 2021 10:10:42 GMT expires: - '-1' pragma: @@ -22980,9 +19902,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a6df7c82-5b42-46ff-aaf8-8905a6a2ab86 + - fac1d61d-51e1-4ca2-b1ea-d82d796ee23a x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1194' status: code: 200 message: OK @@ -22998,25 +19920,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter/routeFilterRules/myRule?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/37893029-adee-41a7-88e9-74edf87e6284?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/6d1483c3-a60b-40da-9fd6-9c42681478a7?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:35:12 GMT + - Fri, 05 Nov 2021 10:10:42 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/37893029-adee-41a7-88e9-74edf87e6284?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/6d1483c3-a60b-40da-9fd6-9c42681478a7?api-version=2021-05-01 pragma: - no-cache server: @@ -23027,7 +19950,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 687c99c9-c117-454e-a1a0-28cf26fb6f96 + - 9ce37219-70b2-4ad1-b283-ccfc0da19a57 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -23043,9 +19966,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/37893029-adee-41a7-88e9-74edf87e6284?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/6d1483c3-a60b-40da-9fd6-9c42681478a7?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -23057,7 +19981,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:35:23 GMT + - Fri, 05 Nov 2021 10:10:52 GMT expires: - '-1' pragma: @@ -23074,7 +19998,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - be6b25c8-81c3-447e-9d0e-c996a5ba348c + - bbeb22bd-6597-48c9-81be-1aed61281f9d status: code: 200 message: OK @@ -23090,9 +20014,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeFilters/myRouteFilter?api-version=2021-05-01 response: body: string: '' @@ -23100,17 +20025,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a5b9c7f0-8881-450b-879a-25a69e2488f3?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c1845658-fd05-433a-be5b-04a2f7d6c058?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:35:24 GMT + - Fri, 05 Nov 2021 10:10:53 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/a5b9c7f0-8881-450b-879a-25a69e2488f3?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operationResults/c1845658-fd05-433a-be5b-04a2f7d6c058?api-version=2021-05-01 pragma: - no-cache server: @@ -23121,7 +20046,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - f3b53300-4859-462d-b818-4cfdd2cc78df + - 768b543a-f109-4564-bbe7-d9e5468d65f8 x-ms-ratelimit-remaining-subscription-deletes: - '14998' status: @@ -23137,9 +20062,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/a5b9c7f0-8881-450b-879a-25a69e2488f3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/eastus/operations/c1845658-fd05-433a-be5b-04a2f7d6c058?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -23151,7 +20077,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:35:34 GMT + - Fri, 05 Nov 2021 10:11:03 GMT expires: - '-1' pragma: @@ -23168,7 +20094,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - c967b33c-d3f6-4600-a655-af22757cd25f + - 24b8b826-135d-4fdd-a855-a9cbadb78201 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_route_table.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_route_table.test_network.yaml index 3d6db383b852..6bbad6e804a9 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_route_table.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_route_table.test_network.yaml @@ -13,22 +13,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRouteTable\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable\"\ - ,\r\n \"etag\": \"W/\\\"0ef35be7-5c90-4fc9-b6d6-15b71880e1c6\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/routeTables\",\r\n \"location\": \"westus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \ - \ \"resourceGuid\": \"02f9db21-4a99-4504-a714-c0c4dbc40521\",\r\n \"\ - disableBgpRoutePropagation\": false,\r\n \"routes\": []\r\n }\r\n}" + string: "{\r\n \"name\": \"myRouteTable\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable\",\r\n + \ \"etag\": \"W/\\\"442c93bf-1a9f-4918-9522-d95b871cf00a\\\"\",\r\n \"type\": + \"Microsoft.Network/routeTables\",\r\n \"location\": \"westus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"resourceGuid\": \"e244c7b8-2545-44d9-9339-f0dcb126345e\",\r\n + \ \"disableBgpRoutePropagation\": false,\r\n \"routes\": []\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/51bcf954-f08c-402b-ad26-884d1dddde81?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5b295553-e0da-436e-8f2d-f40b1cfcda76?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -36,7 +36,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:35:50 GMT + - Fri, 05 Nov 2021 10:11:07 GMT expires: - '-1' pragma: @@ -49,7 +49,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3e345a04-4dd7-4a1e-8c1f-5e6846c8893e + - 8ab57748-5622-4246-81d4-8282a946bc6c x-ms-ratelimit-remaining-subscription-writes: - '1195' status: @@ -65,9 +65,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/51bcf954-f08c-402b-ad26-884d1dddde81?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5b295553-e0da-436e-8f2d-f40b1cfcda76?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -79,7 +80,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:00 GMT + - Fri, 05 Nov 2021 10:11:17 GMT expires: - '-1' pragma: @@ -96,7 +97,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 305c7bb8-752a-4ff6-bc2d-0b79a01c4ad2 + - 0f6a3747-6a1c-4e3b-bee5-23ee9920a578 status: code: 200 message: OK @@ -110,17 +111,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRouteTable\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable\"\ - ,\r\n \"etag\": \"W/\\\"5e8bee34-723e-497a-a64d-feb9cd16113d\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/routeTables\",\r\n \"location\": \"westus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"02f9db21-4a99-4504-a714-c0c4dbc40521\",\r\n \"\ - disableBgpRoutePropagation\": false,\r\n \"routes\": []\r\n }\r\n}" + string: "{\r\n \"name\": \"myRouteTable\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable\",\r\n + \ \"etag\": \"W/\\\"5dac7131-0aa1-4efe-8b9b-4dfa0cfd03c7\\\"\",\r\n \"type\": + \"Microsoft.Network/routeTables\",\r\n \"location\": \"westus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"e244c7b8-2545-44d9-9339-f0dcb126345e\",\r\n + \ \"disableBgpRoutePropagation\": false,\r\n \"routes\": []\r\n }\r\n}" headers: cache-control: - no-cache @@ -129,9 +130,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:00 GMT + - Fri, 05 Nov 2021 10:11:17 GMT etag: - - W/"5e8bee34-723e-497a-a64d-feb9cd16113d" + - W/"5dac7131-0aa1-4efe-8b9b-4dfa0cfd03c7" expires: - '-1' pragma: @@ -148,7 +149,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7f057963-6aec-4bb2-96c8-6ed4b41f0465 + - c2c605cb-cfbc-4fdb-8ed2-6871126a1adc status: code: 200 message: OK @@ -166,20 +167,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\"\ - ,\r\n \"etag\": \"W/\\\"e8c97aa4-c773-488a-a7ad-1696b9e27d94\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"\ - addressPrefix\": \"10.0.3.0/24\",\r\n \"nextHopType\": \"VirtualNetworkGateway\"\ - ,\r\n \"hasBgpOverride\": false\r\n },\r\n \"type\": \"Microsoft.Network/routeTables/routes\"\ - \r\n}" + string: "{\r\n \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\",\r\n + \ \"etag\": \"W/\\\"db732fa3-ecfc-4b85-956f-d26f4e81ea5e\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"addressPrefix\": \"10.0.3.0/24\",\r\n + \ \"nextHopType\": \"VirtualNetworkGateway\",\r\n \"hasBgpOverride\": + false\r\n },\r\n \"type\": \"Microsoft.Network/routeTables/routes\"\r\n}" headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/58baff23-fdca-460b-99f7-f82772ef1f3d?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/fde1ce04-70cb-4d65-962a-e82a1d121a4a?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -187,7 +188,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:01 GMT + - Fri, 05 Nov 2021 10:11:18 GMT expires: - '-1' pragma: @@ -200,7 +201,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 55fcb8e4-359e-4e0a-9bcf-f2353ae3c582 + - 3dd3c0df-b4a9-4507-abdb-deed606e253c x-ms-ratelimit-remaining-subscription-writes: - '1194' status: @@ -216,9 +217,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/58baff23-fdca-460b-99f7-f82772ef1f3d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/fde1ce04-70cb-4d65-962a-e82a1d121a4a?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -230,7 +232,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:11 GMT + - Fri, 05 Nov 2021 10:11:28 GMT expires: - '-1' pragma: @@ -247,7 +249,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2bfa2e45-d8d4-46fc-9160-4743795e2403 + - 83f0c0b9-31a4-4d46-ba77-89b875d193c0 status: code: 200 message: OK @@ -261,17 +263,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\"\ - ,\r\n \"etag\": \"W/\\\"6d9b1d5e-2d37-4d37-8c03-3b4d7e0afc43\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.3.0/24\",\r\n \"nextHopType\": \"VirtualNetworkGateway\"\ - ,\r\n \"hasBgpOverride\": false\r\n },\r\n \"type\": \"Microsoft.Network/routeTables/routes\"\ - \r\n}" + string: "{\r\n \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\",\r\n + \ \"etag\": \"W/\\\"f4de3db1-2e9e-4019-b110-1165b6c55f7a\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.3.0/24\",\r\n + \ \"nextHopType\": \"VirtualNetworkGateway\",\r\n \"hasBgpOverride\": + false\r\n },\r\n \"type\": \"Microsoft.Network/routeTables/routes\"\r\n}" headers: cache-control: - no-cache @@ -280,9 +282,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:11 GMT + - Fri, 05 Nov 2021 10:11:28 GMT etag: - - W/"6d9b1d5e-2d37-4d37-8c03-3b4d7e0afc43" + - W/"f4de3db1-2e9e-4019-b110-1165b6c55f7a" expires: - '-1' pragma: @@ -299,7 +301,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b74747f0-bd0c-42d3-8442-99bc9af95766 + - ce3d1fc3-55fd-45d3-a024-117cda287f79 status: code: 200 message: OK @@ -313,17 +315,17 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\"\ - ,\r\n \"etag\": \"W/\\\"6d9b1d5e-2d37-4d37-8c03-3b4d7e0afc43\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - addressPrefix\": \"10.0.3.0/24\",\r\n \"nextHopType\": \"VirtualNetworkGateway\"\ - ,\r\n \"hasBgpOverride\": false\r\n },\r\n \"type\": \"Microsoft.Network/routeTables/routes\"\ - \r\n}" + string: "{\r\n \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\",\r\n + \ \"etag\": \"W/\\\"f4de3db1-2e9e-4019-b110-1165b6c55f7a\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressPrefix\": \"10.0.3.0/24\",\r\n + \ \"nextHopType\": \"VirtualNetworkGateway\",\r\n \"hasBgpOverride\": + false\r\n },\r\n \"type\": \"Microsoft.Network/routeTables/routes\"\r\n}" headers: cache-control: - no-cache @@ -332,9 +334,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:12 GMT + - Fri, 05 Nov 2021 10:11:28 GMT etag: - - W/"6d9b1d5e-2d37-4d37-8c03-3b4d7e0afc43" + - W/"f4de3db1-2e9e-4019-b110-1165b6c55f7a" expires: - '-1' pragma: @@ -351,7 +353,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 90101de7-f642-4fef-a3e8-bb53fb4db202 + - 1c69cfc6-20ba-4bc9-9bd1-bff8bacb7a51 status: code: 200 message: OK @@ -365,24 +367,24 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRouteTable\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable\"\ - ,\r\n \"etag\": \"W/\\\"6d9b1d5e-2d37-4d37-8c03-3b4d7e0afc43\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/routeTables\",\r\n \"location\": \"westus\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n\ - \ \"resourceGuid\": \"02f9db21-4a99-4504-a714-c0c4dbc40521\",\r\n \"\ - disableBgpRoutePropagation\": false,\r\n \"routes\": [\r\n {\r\n \ - \ \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\"\ - ,\r\n \"etag\": \"W/\\\"6d9b1d5e-2d37-4d37-8c03-3b4d7e0afc43\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressPrefix\": \"10.0.3.0/24\",\r\n \"nextHopType\"\ - : \"VirtualNetworkGateway\",\r\n \"hasBgpOverride\": false\r\n \ - \ },\r\n \"type\": \"Microsoft.Network/routeTables/routes\"\r\n\ - \ }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myRouteTable\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable\",\r\n + \ \"etag\": \"W/\\\"f4de3db1-2e9e-4019-b110-1165b6c55f7a\\\"\",\r\n \"type\": + \"Microsoft.Network/routeTables\",\r\n \"location\": \"westus\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"e244c7b8-2545-44d9-9339-f0dcb126345e\",\r\n + \ \"disableBgpRoutePropagation\": false,\r\n \"routes\": [\r\n {\r\n + \ \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\",\r\n + \ \"etag\": \"W/\\\"f4de3db1-2e9e-4019-b110-1165b6c55f7a\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.3.0/24\",\r\n \"nextHopType\": + \"VirtualNetworkGateway\",\r\n \"hasBgpOverride\": false\r\n },\r\n + \ \"type\": \"Microsoft.Network/routeTables/routes\"\r\n }\r\n + \ ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -391,9 +393,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:12 GMT + - Fri, 05 Nov 2021 10:11:28 GMT etag: - - W/"6d9b1d5e-2d37-4d37-8c03-3b4d7e0afc43" + - W/"f4de3db1-2e9e-4019-b110-1165b6c55f7a" expires: - '-1' pragma: @@ -410,7 +412,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 4ba7281b-9baa-44af-b64e-9c6b41308387 + - 5f0c9b0f-61d2-45ca-b7bb-9f0daacde4f2 status: code: 200 message: OK @@ -428,25 +430,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myRouteTable\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable\"\ - ,\r\n \"etag\": \"W/\\\"57bc3c68-50bf-416a-a072-5611d45e6088\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/routeTables\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"resourceGuid\": \"02f9db21-4a99-4504-a714-c0c4dbc40521\",\r\n \ - \ \"disableBgpRoutePropagation\": false,\r\n \"routes\": [\r\n {\r\ - \n \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\"\ - ,\r\n \"etag\": \"W/\\\"57bc3c68-50bf-416a-a072-5611d45e6088\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressPrefix\": \"10.0.3.0/24\",\r\n \"nextHopType\"\ - : \"VirtualNetworkGateway\",\r\n \"hasBgpOverride\": false\r\n \ - \ },\r\n \"type\": \"Microsoft.Network/routeTables/routes\"\r\n\ - \ }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"myRouteTable\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable\",\r\n + \ \"etag\": \"W/\\\"af7ad038-8ab0-4bb7-9561-9d3654d3e41e\\\"\",\r\n \"type\": + \"Microsoft.Network/routeTables\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"resourceGuid\": \"e244c7b8-2545-44d9-9339-f0dcb126345e\",\r\n + \ \"disableBgpRoutePropagation\": false,\r\n \"routes\": [\r\n {\r\n + \ \"name\": \"myRoute\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute\",\r\n + \ \"etag\": \"W/\\\"af7ad038-8ab0-4bb7-9561-9d3654d3e41e\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"addressPrefix\": \"10.0.3.0/24\",\r\n \"nextHopType\": + \"VirtualNetworkGateway\",\r\n \"hasBgpOverride\": false\r\n },\r\n + \ \"type\": \"Microsoft.Network/routeTables/routes\"\r\n }\r\n + \ ]\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -457,7 +459,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:16 GMT + - Fri, 05 Nov 2021 10:11:28 GMT expires: - '-1' pragma: @@ -474,7 +476,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1527b66a-8d35-4b06-bed6-256cae046825 + - e70c0348-3855-46dd-b544-24f28952768e x-ms-ratelimit-remaining-subscription-writes: - '1193' status: @@ -492,25 +494,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable/routes/myRoute?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/da679bb4-5098-43ea-a4ad-f49172289075?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9763ac1d-9173-44c3-8a1e-ec699c3a039d?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:36:17 GMT + - Fri, 05 Nov 2021 10:11:29 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/da679bb4-5098-43ea-a4ad-f49172289075?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/9763ac1d-9173-44c3-8a1e-ec699c3a039d?api-version=2021-05-01 pragma: - no-cache server: @@ -521,7 +524,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9e63d2ae-293b-43f2-9f40-d7166a974bcd + - dc02860f-6246-4a6a-ae74-20cccecd094a x-ms-ratelimit-remaining-subscription-deletes: - '14997' status: @@ -537,9 +540,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/da679bb4-5098-43ea-a4ad-f49172289075?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/9763ac1d-9173-44c3-8a1e-ec699c3a039d?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -551,7 +555,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:27 GMT + - Fri, 05 Nov 2021 10:11:38 GMT expires: - '-1' pragma: @@ -568,7 +572,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 15a94ae7-5748-4f47-acb4-614e40ec7ba9 + - ef9cb443-e5af-4e39-88f7-a0d84184f132 status: code: 200 message: OK @@ -584,9 +588,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/routeTables/myRouteTable?api-version=2021-05-01 response: body: string: '' @@ -594,17 +599,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/e0775761-0f91-4d04-b92b-4af2cd348a8e?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2152faeb-61a4-4f7a-8072-d19f19afa900?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 07:36:28 GMT + - Fri, 05 Nov 2021 10:11:39 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/e0775761-0f91-4d04-b92b-4af2cd348a8e?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/2152faeb-61a4-4f7a-8072-d19f19afa900?api-version=2021-05-01 pragma: - no-cache server: @@ -615,7 +620,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d6ef63e0-5948-4194-b8bc-da61c603e5f2 + - 8c825c10-3db3-4b8c-997c-c6a062ce2c43 x-ms-ratelimit-remaining-subscription-deletes: - '14996' status: @@ -631,9 +636,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/e0775761-0f91-4d04-b92b-4af2cd348a8e?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2152faeb-61a4-4f7a-8072-d19f19afa900?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -645,7 +651,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:39 GMT + - Fri, 05 Nov 2021 10:11:49 GMT expires: - '-1' pragma: @@ -662,7 +668,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7e05a768-3262-4e31-95b2-3a467091c1e3 + - 14705ecd-fcfa-424c-97ee-8a0697c50224 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_wan_hub.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_wan_hub.test_network.yaml index 3193a3fcbb7a..6d84b23e923a 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_wan_hub.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_wan_hub.test_network.yaml @@ -14,23 +14,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualwan76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"6b94917f-aa72-44b2-908a-b9432a52168e\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Updating\",\r\n \"disableVpnEncryption\"\ - : false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\"\ - : \"None\",\r\n \"type\": \"Basic\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualwan76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\",\r\n + \ \"etag\": \"W/\\\"26fa65ab-3deb-4ac6-863a-1485e04fe5eb\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": + true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\": + \"Basic\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f75bd5ce-2c3a-415c-8b0a-c3f31fb82b1f?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ab982c71-0a6f-49a0-93cd-05cd3078e905?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -38,7 +39,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:36:58 GMT + - Fri, 05 Nov 2021 10:11:54 GMT expires: - '-1' pragma: @@ -51,7 +52,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 13a93de9-698d-41d3-bf4e-29df53e95021 + - e9f81b59-f3cb-4a38-aa54-135f947d7d90 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -67,9 +68,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/f75bd5ce-2c3a-415c-8b0a-c3f31fb82b1f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ab982c71-0a6f-49a0-93cd-05cd3078e905?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -81,7 +83,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:37:09 GMT + - Fri, 05 Nov 2021 10:12:03 GMT expires: - '-1' pragma: @@ -98,7 +100,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1e08efd7-f1a7-4adc-8590-e97b81d83c65 + - 128f7931-1556-4553-a42c-0a3f3e5cac7a status: code: 200 message: OK @@ -112,18 +114,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualwan76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"c3f4365e-3e12-4be9-8777-c8e3590cdf22\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\"\ - : false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\"\ - : \"None\",\r\n \"type\": \"Basic\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualwan76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\",\r\n + \ \"etag\": \"W/\\\"0e1f1791-66e1-48d3-8c3a-823411f9219d\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": + true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\": + \"Basic\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -132,9 +135,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:37:09 GMT + - Fri, 05 Nov 2021 10:12:03 GMT etag: - - W/"c3f4365e-3e12-4be9-8777-c8e3590cdf22" + - W/"0e1f1791-66e1-48d3-8c3a-823411f9219d" expires: - '-1' pragma: @@ -151,7 +154,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2b0c459a-6f21-4ac0-9a56-5a76464423ab + - b6b03bb1-7886-40ae-b929-990b94176993 status: code: 200 message: OK @@ -174,37 +177,37 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"vnpsite76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"ebf98dc5-6012-4db4-aab1-d4d58774fd64\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/vpnSites\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Updating\",\r\n \"addressSpace\": {\r\ - \n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n \ - \ },\r\n \"deviceProperties\": {\r\n \"linkSpeedInMbps\": 0\r\n\ - \ },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - \r\n },\r\n \"isSecuritySite\": false,\r\n \"o365Policy\": {\r\n\ - \ \"breakOutCategories\": {\r\n \"optimize\": false,\r\n \ - \ \"allow\": false,\r\n \"default\": false\r\n }\r\n },\r\ - \n \"vpnSiteLinks\": [\r\n {\r\n \"name\": \"vpnSiteLink1\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\ - ,\r\n \"etag\": \"W/\\\"ebf98dc5-6012-4db4-aab1-d4d58774fd64\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"ipAddress\": \"50.50.50.56\",\r\n \"bgpProperties\"\ - : {\r\n \"asn\": 1234,\r\n \"bgpPeeringAddress\": \"\ - 192.168.0.0\"\r\n },\r\n \"linkProperties\": {\r\n \ - \ \"linkProviderName\": \"vendor1\",\r\n \"linkSpeedInMbps\"\ - : 0\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/vpnSites/vpnSiteLinks\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"vnpsite76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\",\r\n + \ \"etag\": \"W/\\\"ed522e7c-bf97-40a1-b867-522d04b5a2b7\\\"\",\r\n \"type\": + \"Microsoft.Network/vpnSites\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n + \ \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"deviceProperties\": + {\r\n \"linkSpeedInMbps\": 0\r\n },\r\n \"virtualWan\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\r\n + \ },\r\n \"isSecuritySite\": false,\r\n \"o365Policy\": {\r\n \"breakOutCategories\": + {\r\n \"optimize\": false,\r\n \"allow\": false,\r\n \"default\": + false\r\n }\r\n },\r\n \"vpnSiteLinks\": [\r\n {\r\n \"name\": + \"vpnSiteLink1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\",\r\n + \ \"etag\": \"W/\\\"ed522e7c-bf97-40a1-b867-522d04b5a2b7\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Updating\",\r\n + \ \"ipAddress\": \"50.50.50.56\",\r\n \"bgpProperties\": + {\r\n \"asn\": 1234,\r\n \"bgpPeeringAddress\": \"192.168.0.0\"\r\n + \ },\r\n \"linkProperties\": {\r\n \"linkProviderName\": + \"vendor1\",\r\n \"linkSpeedInMbps\": 0\r\n }\r\n },\r\n + \ \"type\": \"Microsoft.Network/vpnSites/vpnSiteLinks\"\r\n }\r\n + \ ]\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7a0ed2dc-13b9-4ea0-bc29-b2dce5e1666d?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/257d5a37-d64f-4046-8887-29af319671cd?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -212,7 +215,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:37:14 GMT + - Fri, 05 Nov 2021 10:12:05 GMT expires: - '-1' pragma: @@ -225,7 +228,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6665f94f-3e42-42a8-89a5-6ef4d76a2ff9 + - 6f67b50f-1189-4042-a6b6-67e445d485ce x-ms-ratelimit-remaining-subscription-writes: - '1198' status: @@ -241,9 +244,56 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7a0ed2dc-13b9-4ea0-bc29-b2dce5e1666d?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/257d5a37-d64f-4046-8887-29af319671cd?api-version=2021-05-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 05 Nov 2021 10:12:15 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - aca30f11-26d4-4e1c-8a4e-39076aacf924 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/257d5a37-d64f-4046-8887-29af319671cd?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -255,7 +305,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:37:24 GMT + - Fri, 05 Nov 2021 10:12:24 GMT expires: - '-1' pragma: @@ -272,7 +322,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1f8ae079-a7eb-4d23-aaf7-fd6f38929e66 + - 585ae8ba-30cf-4e6d-87e9-55abb6947a4f status: code: 200 message: OK @@ -286,32 +336,32 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"vnpsite76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"9a955031-dbf2-4f68-a4c9-077aa73055e9\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/vpnSites\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressSpace\":\ - \ {\r\n \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\ - \n },\r\n \"deviceProperties\": {\r\n \"linkSpeedInMbps\": 0\r\n\ - \ },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - \r\n },\r\n \"isSecuritySite\": false,\r\n \"o365Policy\": {\r\n\ - \ \"breakOutCategories\": {\r\n \"optimize\": false,\r\n \ - \ \"allow\": false,\r\n \"default\": false\r\n }\r\n },\r\ - \n \"vpnSiteLinks\": [\r\n {\r\n \"name\": \"vpnSiteLink1\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\ - ,\r\n \"etag\": \"W/\\\"9a955031-dbf2-4f68-a4c9-077aa73055e9\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"ipAddress\": \"50.50.50.56\",\r\n \"bgpProperties\"\ - : {\r\n \"asn\": 1234,\r\n \"bgpPeeringAddress\": \"\ - 192.168.0.0\"\r\n },\r\n \"linkProperties\": {\r\n \ - \ \"linkProviderName\": \"vendor1\",\r\n \"linkSpeedInMbps\"\ - : 0\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/vpnSites/vpnSiteLinks\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"vnpsite76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\",\r\n + \ \"etag\": \"W/\\\"442d9c6b-76b1-4584-a457-48d060c93686\\\"\",\r\n \"type\": + \"Microsoft.Network/vpnSites\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n + \ \"10.0.0.0/16\"\r\n ]\r\n },\r\n \"deviceProperties\": + {\r\n \"linkSpeedInMbps\": 0\r\n },\r\n \"virtualWan\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\r\n + \ },\r\n \"isSecuritySite\": false,\r\n \"o365Policy\": {\r\n \"breakOutCategories\": + {\r\n \"optimize\": false,\r\n \"allow\": false,\r\n \"default\": + false\r\n }\r\n },\r\n \"vpnSiteLinks\": [\r\n {\r\n \"name\": + \"vpnSiteLink1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\",\r\n + \ \"etag\": \"W/\\\"442d9c6b-76b1-4584-a457-48d060c93686\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"ipAddress\": \"50.50.50.56\",\r\n \"bgpProperties\": + {\r\n \"asn\": 1234,\r\n \"bgpPeeringAddress\": \"192.168.0.0\"\r\n + \ },\r\n \"linkProperties\": {\r\n \"linkProviderName\": + \"vendor1\",\r\n \"linkSpeedInMbps\": 0\r\n }\r\n },\r\n + \ \"type\": \"Microsoft.Network/vpnSites/vpnSiteLinks\"\r\n }\r\n + \ ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -320,9 +370,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:37:25 GMT + - Fri, 05 Nov 2021 10:12:24 GMT etag: - - W/"9a955031-dbf2-4f68-a4c9-077aa73055e9" + - W/"442d9c6b-76b1-4584-a457-48d060c93686" expires: - '-1' pragma: @@ -339,7 +389,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1d1aa246-e0d2-4cfe-afa1-d9aa56b7f99d + - f7dd13b9-a648-4a03-8ae7-446329b8028e status: code: 200 message: OK @@ -359,27 +409,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualhubx76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"f43af828-aabd-445c-bda4-f53c7d84afd8\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Updating\",\r\n \"virtualHubRouteTableV2s\"\ - : [],\r\n \"addressPrefix\": \"10.168.0.0/24\",\r\n \"virtualRouterAsn\"\ - : 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"\ - routes\": []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - \r\n },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"None\",\r\ - \n \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\"\ - : \"ExpressRoute\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualhubx76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\",\r\n + \ \"etag\": \"W/\\\"6d7ccf64-e18c-4848-b4cc-71e9309f0936\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"virtualHubRouteTableV2s\": [],\r\n \"addressPrefix\": + \"10.168.0.0/24\",\r\n \"virtualRouterAsn\": 0,\r\n \"virtualRouterIps\": + [],\r\n \"routeTable\": {\r\n \"routes\": []\r\n },\r\n \"virtualWan\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\r\n + \ },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"None\",\r\n \"allowBranchToBranchTraffic\": + false,\r\n \"preferredRoutingGateway\": \"ExpressRoute\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/279ba545-300b-4b8b-a75d-9d2da967cdf1?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/330ec0e0-d2cc-4e77-870f-bc312f0627d7?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -387,7 +437,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:37:29 GMT + - Fri, 05 Nov 2021 10:12:26 GMT expires: - '-1' pragma: @@ -400,7 +450,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e54c7696-e421-4568-97de-97696a1e601a + - 6907b12b-d875-4371-912e-b3c5097cad20 x-ms-ratelimit-remaining-subscription-writes: - '1197' status: @@ -416,9 +466,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/279ba545-300b-4b8b-a75d-9d2da967cdf1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/330ec0e0-d2cc-4e77-870f-bc312f0627d7?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -430,7 +481,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:37:39 GMT + - Fri, 05 Nov 2021 10:12:36 GMT expires: - '-1' pragma: @@ -447,7 +498,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 39060058-4b0a-4708-ab44-c71c1f6e653d + - a4ca40f6-3ee4-4c76-97ac-b192e6dcba2c status: code: 200 message: OK @@ -461,9 +512,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/279ba545-300b-4b8b-a75d-9d2da967cdf1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/330ec0e0-d2cc-4e77-870f-bc312f0627d7?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -475,7 +527,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:37:49 GMT + - Fri, 05 Nov 2021 10:12:47 GMT expires: - '-1' pragma: @@ -492,7 +544,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8bb1becf-852d-40f3-9ab9-0dab940f3811 + - b7681533-3331-46e6-a27d-dc5c8123d590 status: code: 200 message: OK @@ -506,9 +558,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/279ba545-300b-4b8b-a75d-9d2da967cdf1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/330ec0e0-d2cc-4e77-870f-bc312f0627d7?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -520,7 +573,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:38:10 GMT + - Fri, 05 Nov 2021 10:13:07 GMT expires: - '-1' pragma: @@ -537,7 +590,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 94256687-ac8d-44f1-b9e8-1d827d445b51 + - c4f155c9-715a-46a2-ae69-1bca39f63cbb status: code: 200 message: OK @@ -551,9 +604,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/279ba545-300b-4b8b-a75d-9d2da967cdf1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/330ec0e0-d2cc-4e77-870f-bc312f0627d7?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -565,7 +619,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:38:30 GMT + - Fri, 05 Nov 2021 10:13:26 GMT expires: - '-1' pragma: @@ -582,7 +636,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 327ccc9c-1080-45db-89be-bbea64e3f22a + - d9686f35-ac6d-4eea-9ca3-a1cf686423f3 status: code: 200 message: OK @@ -596,9 +650,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/279ba545-300b-4b8b-a75d-9d2da967cdf1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/330ec0e0-d2cc-4e77-870f-bc312f0627d7?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -610,7 +665,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:39:11 GMT + - Fri, 05 Nov 2021 10:14:07 GMT expires: - '-1' pragma: @@ -627,7 +682,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ae89ecde-e4ed-42b9-977f-b0198dab593e + - 497eba8a-6f34-4cc9-b62b-366fe009ae8a status: code: 200 message: OK @@ -641,9 +696,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/279ba545-300b-4b8b-a75d-9d2da967cdf1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/330ec0e0-d2cc-4e77-870f-bc312f0627d7?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -655,7 +711,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:39:51 GMT + - Fri, 05 Nov 2021 10:14:47 GMT expires: - '-1' pragma: @@ -672,7 +728,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - be43f4b3-66da-4d7c-9ccb-fb8d8fd82369 + - bc46e4ee-31bc-45e4-9c83-f96b9a4217ee status: code: 200 message: OK @@ -686,9 +742,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/279ba545-300b-4b8b-a75d-9d2da967cdf1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/330ec0e0-d2cc-4e77-870f-bc312f0627d7?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -700,7 +757,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:41:12 GMT + - Fri, 05 Nov 2021 10:16:07 GMT expires: - '-1' pragma: @@ -717,7 +774,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 951e24ff-8598-4c59-8d33-0f3f7a868864 + - e1b48f4b-c7bf-4a0d-8010-e23d2af6b4ec status: code: 200 message: OK @@ -731,9 +788,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/279ba545-300b-4b8b-a75d-9d2da967cdf1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/330ec0e0-d2cc-4e77-870f-bc312f0627d7?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -745,7 +803,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:43:53 GMT + - Fri, 05 Nov 2021 10:18:47 GMT expires: - '-1' pragma: @@ -762,7 +820,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 00406754-a735-4da4-8a4b-b5a0605b8879 + - c2293937-ecb9-4268-a824-5aa67cd2acc5 status: code: 200 message: OK @@ -776,22 +834,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualhubx76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"257c9479-faba-48bd-9ef4-c74e9e2850f5\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\"\ - : [],\r\n \"addressPrefix\": \"10.168.0.0/24\",\r\n \"virtualRouterAsn\"\ - : 0,\r\n \"virtualRouterIps\": [],\r\n \"routeTable\": {\r\n \"\ - routes\": []\r\n },\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - \r\n },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"Provisioning\"\ - ,\r\n \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\"\ - : \"ExpressRoute\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualhubx76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\",\r\n + \ \"etag\": \"W/\\\"2994f8bc-b030-4bc4-b84d-63b5186f48b1\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"virtualHubRouteTableV2s\": [],\r\n \"addressPrefix\": + \"10.168.0.0/24\",\r\n \"virtualRouterAsn\": 0,\r\n \"virtualRouterIps\": + [],\r\n \"routeTable\": {\r\n \"routes\": []\r\n },\r\n \"virtualWan\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\r\n + \ },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"Provisioning\",\r\n + \ \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\": + \"ExpressRoute\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -800,7 +859,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:43:54 GMT + - Fri, 05 Nov 2021 10:18:47 GMT expires: - '-1' pragma: @@ -817,7 +876,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - adf0e257-f860-4ecb-84f0-e457f97a7d48 + - e214211e-7fb7-4f52-bacf-da1f448784d4 status: code: 200 message: OK @@ -842,69 +901,64 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"vpngateway76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"3abf7655-7320-45d3-9218-1d35ee4d2e5f\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/vpnGateways\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Updating\",\r\n \"connections\": [\r\ - \n {\r\n \"name\": \"vpnConnection1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1\"\ - ,\r\n \"etag\": \"W/\\\"3abf7655-7320-45d3-9218-1d35ee4d2e5f\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/vpnGateways/vpnConnections\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"routingConfiguration\": {\r\n \"associatedRouteTable\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\ - \r\n },\r\n \"propagatedRouteTables\": {\r\n \ - \ \"labels\": [\r\n \"default\"\r\n ],\r\ - \n \"ids\": [\r\n {\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\ - \r\n }\r\n ]\r\n },\r\n \ - \ \"vnetRoutes\": {\r\n \"staticRoutes\": []\r\n }\r\ - \n },\r\n \"enableInternetSecurity\": false,\r\n \ - \ \"remoteVpnSite\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\ - \r\n },\r\n \"vpnLinkConnections\": [\r\n {\r\ - \n \"name\": \"Connection-Link1\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link1\"\ - ,\r\n \"etag\": \"W/\\\"3abf7655-7320-45d3-9218-1d35ee4d2e5f\\\ - \"\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Updating\",\r\n \"vpnSiteLink\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\ - \r\n },\r\n \"connectionBandwidth\": 200,\r\n\ - \ \"ipsecPolicies\": [],\r\n \"vpnConnectionProtocolType\"\ - : \"IKEv2\",\r\n \"sharedKey\": \"key\",\r\n \ - \ \"ingressBytesTransferred\": 0,\r\n \"egressBytesTransferred\"\ - : 0,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \ - \ \"enableBgp\": false,\r\n \"enableRateLimiting\"\ - : false,\r\n \"useLocalAzureIpAddress\": false,\r\n \ - \ \"usePolicyBasedTrafficSelectors\": false,\r\n \"\ - routingWeight\": 0,\r\n \"dpdTimeoutSeconds\": 0,\r\n \ - \ \"vpnLinkConnectionMode\": \"Default\"\r\n },\r\n\ - \ \"type\": \"Microsoft.Network/vpnGateways/vpnConnections/vpnLinkConnections\"\ - \r\n }\r\n ],\r\n \"ingressBytesTransferred\"\ - : 0,\r\n \"egressBytesTransferred\": 0\r\n }\r\n }\r\n\ - \ ],\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - \r\n },\r\n \"bgpSettings\": {\r\n \"asn\": 65515,\r\n \"\ - peerWeight\": 0\r\n },\r\n \"vpnGatewayScaleUnit\": 1,\r\n \"packetCaptureDiagnosticState\"\ - : \"None\",\r\n \"ipConfigurations\": [],\r\n \"natRules\": [],\r\n\ - \ \"enableBgpRouteTranslationForNat\": false,\r\n \"isRoutingPreferenceInternet\"\ - : false\r\n }\r\n}" + string: "{\r\n \"name\": \"vpngateway76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\",\r\n + \ \"etag\": \"W/\\\"34788021-60b5-4db5-8e1c-c7e636140dfa\\\"\",\r\n \"type\": + \"Microsoft.Network/vpnGateways\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"connections\": [\r\n {\r\n \"name\": \"vpnConnection1\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1\",\r\n + \ \"etag\": \"W/\\\"34788021-60b5-4db5-8e1c-c7e636140dfa\\\"\",\r\n + \ \"type\": \"Microsoft.Network/vpnGateways/vpnConnections\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"routingConfiguration\": + {\r\n \"associatedRouteTable\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\r\n + \ },\r\n \"propagatedRouteTables\": {\r\n \"labels\": + [\r\n \"default\"\r\n ],\r\n \"ids\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\r\n + \ }\r\n ]\r\n },\r\n \"vnetRoutes\": + {\r\n \"staticRoutes\": []\r\n }\r\n },\r\n + \ \"enableInternetSecurity\": false,\r\n \"remoteVpnSite\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\r\n + \ },\r\n \"vpnLinkConnections\": [\r\n {\r\n \"name\": + \"Connection-Link1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link1\",\r\n + \ \"etag\": \"W/\\\"34788021-60b5-4db5-8e1c-c7e636140dfa\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"vpnSiteLink\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\r\n + \ },\r\n \"connectionBandwidth\": 200,\r\n \"ipsecPolicies\": + [],\r\n \"vpnConnectionProtocolType\": \"IKEv2\",\r\n \"sharedKey\": + \"key\",\r\n \"ingressBytesTransferred\": 0,\r\n \"egressBytesTransferred\": + 0,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \"enableBgp\": + false,\r\n \"enableRateLimiting\": false,\r\n \"useLocalAzureIpAddress\": + false,\r\n \"usePolicyBasedTrafficSelectors\": false,\r\n \"routingWeight\": + 0,\r\n \"dpdTimeoutSeconds\": 0,\r\n \"vpnLinkConnectionMode\": + \"Default\",\r\n \"vpnGatewayCustomBgpAddresses\": []\r\n },\r\n + \ \"type\": \"Microsoft.Network/vpnGateways/vpnConnections/vpnLinkConnections\"\r\n + \ }\r\n ],\r\n \"ingressBytesTransferred\": 0,\r\n + \ \"egressBytesTransferred\": 0\r\n }\r\n }\r\n ],\r\n + \ \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\r\n + \ },\r\n \"bgpSettings\": {\r\n \"asn\": 65515,\r\n \"peerWeight\": + 0\r\n },\r\n \"vpnGatewayScaleUnit\": 1,\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"ipConfigurations\": [],\r\n \"natRules\": [],\r\n \"enableBgpRouteTranslationForNat\": + false,\r\n \"isRoutingPreferenceInternet\": false\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 cache-control: - no-cache content-length: - - '4515' + - '4568' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:44:03 GMT + - Fri, 05 Nov 2021 10:18:49 GMT expires: - '-1' pragma: @@ -917,9 +971,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cca30d68-5f5c-47e5-8db3-1bc65365339a + - f342a7c0-59a8-4a7d-85b0-5a0ef9866193 x-ms-ratelimit-remaining-subscription-writes: - - '1199' + - '1188' status: code: 201 message: Created @@ -933,9 +987,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -947,7 +1002,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:44:13 GMT + - Fri, 05 Nov 2021 10:18:59 GMT expires: - '-1' pragma: @@ -964,7 +1019,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - abb29b9e-d735-4aa9-bb57-2bbf81fe08fd + - bb19de3c-af26-426b-9baf-00a929291dea status: code: 200 message: OK @@ -978,9 +1033,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -992,7 +1048,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:44:23 GMT + - Fri, 05 Nov 2021 10:19:09 GMT expires: - '-1' pragma: @@ -1009,7 +1065,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1cc833d4-6401-4f17-8a94-05b66cba5444 + - ce8888fa-b42a-41ea-a7e5-1e2836086001 status: code: 200 message: OK @@ -1023,9 +1079,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1037,7 +1094,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:44:44 GMT + - Fri, 05 Nov 2021 10:19:30 GMT expires: - '-1' pragma: @@ -1054,7 +1111,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1b07a5b6-8a65-4d7a-9815-4d1586f75f49 + - ea0e7f33-c1e9-4419-81b7-0984409d8b2f status: code: 200 message: OK @@ -1068,9 +1125,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1082,7 +1140,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:45:04 GMT + - Fri, 05 Nov 2021 10:19:50 GMT expires: - '-1' pragma: @@ -1099,7 +1157,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 340ae381-26c9-440d-a271-2b5126988412 + - 2f074c80-6ecb-47bd-96fd-99e431bb4c4e status: code: 200 message: OK @@ -1113,9 +1171,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1127,7 +1186,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:45:45 GMT + - Fri, 05 Nov 2021 10:20:30 GMT expires: - '-1' pragma: @@ -1144,7 +1203,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5fd3c088-bf80-404a-bbc5-754c016346da + - f49464de-5310-45c0-a3fe-8d4237b727ca status: code: 200 message: OK @@ -1158,9 +1217,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1172,7 +1232,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:46:25 GMT + - Fri, 05 Nov 2021 10:21:10 GMT expires: - '-1' pragma: @@ -1189,7 +1249,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 40b0d13f-975c-449d-8654-9a9ae0afb0c0 + - 606d01bf-b598-4ce8-8dfd-00c81c5c2bb8 status: code: 200 message: OK @@ -1203,9 +1263,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1217,7 +1278,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:47:46 GMT + - Fri, 05 Nov 2021 10:22:30 GMT expires: - '-1' pragma: @@ -1234,7 +1295,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 51a86a2d-fd71-47b6-a53e-14b9fe61139e + - a2165761-b3d0-4ab4-a8d7-fc7379e39548 status: code: 200 message: OK @@ -1248,9 +1309,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1262,7 +1324,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:50:28 GMT + - Fri, 05 Nov 2021 10:25:10 GMT expires: - '-1' pragma: @@ -1279,7 +1341,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 713aa2c2-9772-4fb4-b21b-ee5a9efe1c7e + - fb799c52-7c4d-4616-a8d3-64d6a12bead5 status: code: 200 message: OK @@ -1293,9 +1355,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1307,7 +1370,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:52:08 GMT + - Fri, 05 Nov 2021 10:26:50 GMT expires: - '-1' pragma: @@ -1324,7 +1387,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ac818c1b-9e21-48dd-bd99-babbf9ad33f9 + - 790e66cd-af59-40c3-a0d9-a8933bc669fd status: code: 200 message: OK @@ -1338,9 +1401,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1352,7 +1416,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:53:48 GMT + - Fri, 05 Nov 2021 10:28:30 GMT expires: - '-1' pragma: @@ -1369,7 +1433,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7e2d7344-c4f3-4361-9783-c38cc0fe01b0 + - 06d7e339-c11c-4761-8701-224db5895d3d status: code: 200 message: OK @@ -1383,9 +1447,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1397,7 +1462,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:55:29 GMT + - Fri, 05 Nov 2021 10:30:10 GMT expires: - '-1' pragma: @@ -1414,7 +1479,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 54036543-3c7a-4b5b-9a38-10a92a55d015 + - 1a0de0dd-2ffe-49fd-8237-c5875537cc16 status: code: 200 message: OK @@ -1428,9 +1493,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1442,7 +1508,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:57:10 GMT + - Fri, 05 Nov 2021 10:31:50 GMT expires: - '-1' pragma: @@ -1459,7 +1525,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 94619151-367e-4432-860d-2aab01882372 + - 3a467ab6-1adb-4ec2-a509-b47efe70f6d1 status: code: 200 message: OK @@ -1473,9 +1539,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1487,7 +1554,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 07:58:51 GMT + - Fri, 05 Nov 2021 10:33:31 GMT expires: - '-1' pragma: @@ -1504,7 +1571,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 13b65851-971a-40c3-a2b4-0f6c1a697dcc + - 95489913-5653-42a0-8fdd-d8048e334a8c status: code: 200 message: OK @@ -1518,9 +1585,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1532,7 +1600,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:00:32 GMT + - Fri, 05 Nov 2021 10:35:11 GMT expires: - '-1' pragma: @@ -1549,7 +1617,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 22251f21-6898-4feb-bc38-827749c18ec4 + - 7427ad10-4091-46db-8fff-083b26e13126 status: code: 200 message: OK @@ -1563,9 +1631,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1577,7 +1646,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:02:12 GMT + - Fri, 05 Nov 2021 10:36:51 GMT expires: - '-1' pragma: @@ -1594,7 +1663,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ba673ad9-83aa-47c8-b47f-9b403f16493b + - 3581def3-bc79-4582-b6c3-bfc537116407 status: code: 200 message: OK @@ -1608,9 +1677,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1622,7 +1692,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:03:53 GMT + - Fri, 05 Nov 2021 10:38:31 GMT expires: - '-1' pragma: @@ -1639,7 +1709,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ac702f7f-bff3-4569-aa48-605a9ec27ce5 + - 7857958e-79bf-484a-8c2b-bea40c101ff9 status: code: 200 message: OK @@ -1653,9 +1723,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1667,7 +1738,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:05:33 GMT + - Fri, 05 Nov 2021 10:40:11 GMT expires: - '-1' pragma: @@ -1684,7 +1755,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - baa654b8-3ec5-4fed-b83e-fb2f857b0df6 + - c682723d-b2c2-42c2-83f6-d6494b966af6 status: code: 200 message: OK @@ -1698,9 +1769,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -1712,7 +1784,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:07:13 GMT + - Fri, 05 Nov 2021 10:41:51 GMT expires: - '-1' pragma: @@ -1729,7 +1801,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ccfeeff3-47c4-48a4-82f1-7fd0c1ae3bff + - 53dcfee7-9bc8-4846-8df1-ab77e67e464e status: code: 200 message: OK @@ -1743,9 +1815,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7b77fa61-f1e0-44a9-94d2-a87f3c0afb96?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/7cb3bfcf-1c65-4a53-ad56-df409a9352f2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1757,7 +1830,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:08:54 GMT + - Fri, 05 Nov 2021 10:43:32 GMT expires: - '-1' pragma: @@ -1774,7 +1847,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0e14219e-fa3b-4010-97e0-ef2bbd384839 + - f0aa60d9-be66-445e-8d1d-651f1a3ece1a status: code: 200 message: OK @@ -1788,78 +1861,72 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"vpngateway76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"bd0c868b-b8b0-4b2e-878b-db5509165af1\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/vpnGateways\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"connections\": [\r\ - \n {\r\n \"name\": \"vpnConnection1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1\"\ - ,\r\n \"etag\": \"W/\\\"bd0c868b-b8b0-4b2e-878b-db5509165af1\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/vpnGateways/vpnConnections\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"routingConfiguration\": {\r\n \"associatedRouteTable\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\ - \r\n },\r\n \"propagatedRouteTables\": {\r\n \ - \ \"labels\": [\r\n \"default\"\r\n ],\r\ - \n \"ids\": [\r\n {\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\ - \r\n }\r\n ]\r\n },\r\n \ - \ \"vnetRoutes\": {\r\n \"staticRoutes\": []\r\n }\r\ - \n },\r\n \"enableInternetSecurity\": false,\r\n \ - \ \"remoteVpnSite\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\ - \r\n },\r\n \"vpnLinkConnections\": [\r\n {\r\ - \n \"name\": \"Connection-Link1\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link1\"\ - ,\r\n \"etag\": \"W/\\\"bd0c868b-b8b0-4b2e-878b-db5509165af1\\\ - \"\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"vpnSiteLink\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\ - \r\n },\r\n \"connectionBandwidth\": 200,\r\n\ - \ \"ipsecPolicies\": [],\r\n \"vpnConnectionProtocolType\"\ - : \"IKEv2\",\r\n \"sharedKey\": \"key\",\r\n \ - \ \"ingressBytesTransferred\": 0,\r\n \"egressBytesTransferred\"\ - : 0,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \ - \ \"enableBgp\": false,\r\n \"enableRateLimiting\"\ - : false,\r\n \"useLocalAzureIpAddress\": false,\r\n \ - \ \"usePolicyBasedTrafficSelectors\": false,\r\n \"\ - routingWeight\": 0,\r\n \"dpdTimeoutSeconds\": 0,\r\n \ - \ \"vpnLinkConnectionMode\": \"Default\"\r\n },\r\n\ - \ \"type\": \"Microsoft.Network/vpnGateways/vpnConnections/vpnLinkConnections\"\ - \r\n }\r\n ],\r\n \"ingressBytesTransferred\"\ - : 0,\r\n \"egressBytesTransferred\": 0\r\n }\r\n }\r\n\ - \ ],\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - \r\n },\r\n \"bgpSettings\": {\r\n \"asn\": 65515,\r\n \"\ - peerWeight\": 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n \ - \ \"ipconfigurationId\": \"Instance0\",\r\n \"defaultBgpIpAddresses\"\ - : [\r\n \"10.168.0.12\"\r\n ],\r\n \"customBgpIpAddresses\"\ - : [],\r\n \"tunnelIpAddresses\": [\r\n \"137.135.61.82\"\ - ,\r\n \"10.168.0.4\"\r\n ]\r\n },\r\n {\r\ - \n \"ipconfigurationId\": \"Instance1\",\r\n \"defaultBgpIpAddresses\"\ - : [\r\n \"10.168.0.13\"\r\n ],\r\n \"customBgpIpAddresses\"\ - : [],\r\n \"tunnelIpAddresses\": [\r\n \"138.91.88.132\"\ - ,\r\n \"10.168.0.5\"\r\n ]\r\n }\r\n ]\r\n\ - \ },\r\n \"vpnGatewayScaleUnit\": 1,\r\n \"packetCaptureDiagnosticState\"\ - : \"None\",\r\n \"ipConfigurations\": [\r\n {\r\n \"id\": \"\ - Instance0\",\r\n \"publicIpAddress\": \"137.135.61.82\",\r\n \ - \ \"privateIpAddress\": \"10.168.0.4\"\r\n },\r\n {\r\n \ - \ \"id\": \"Instance1\",\r\n \"publicIpAddress\": \"138.91.88.132\"\ - ,\r\n \"privateIpAddress\": \"10.168.0.5\"\r\n }\r\n ],\r\n\ - \ \"natRules\": [],\r\n \"enableBgpRouteTranslationForNat\": false,\r\ - \n \"isRoutingPreferenceInternet\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"vpngateway76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\",\r\n + \ \"etag\": \"W/\\\"2004ffa9-0534-4a9e-afc3-25a65045de94\\\"\",\r\n \"type\": + \"Microsoft.Network/vpnGateways\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"connections\": [\r\n {\r\n \"name\": \"vpnConnection1\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1\",\r\n + \ \"etag\": \"W/\\\"2004ffa9-0534-4a9e-afc3-25a65045de94\\\"\",\r\n + \ \"type\": \"Microsoft.Network/vpnGateways/vpnConnections\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"routingConfiguration\": + {\r\n \"associatedRouteTable\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\r\n + \ },\r\n \"propagatedRouteTables\": {\r\n \"labels\": + [\r\n \"default\"\r\n ],\r\n \"ids\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\r\n + \ }\r\n ]\r\n },\r\n \"vnetRoutes\": + {\r\n \"staticRoutes\": []\r\n }\r\n },\r\n + \ \"enableInternetSecurity\": false,\r\n \"remoteVpnSite\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\r\n + \ },\r\n \"vpnLinkConnections\": [\r\n {\r\n \"name\": + \"Connection-Link1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link1\",\r\n + \ \"etag\": \"W/\\\"2004ffa9-0534-4a9e-afc3-25a65045de94\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"vpnSiteLink\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\r\n + \ },\r\n \"connectionBandwidth\": 200,\r\n \"ipsecPolicies\": + [],\r\n \"vpnConnectionProtocolType\": \"IKEv2\",\r\n \"sharedKey\": + \"key\",\r\n \"ingressBytesTransferred\": 0,\r\n \"egressBytesTransferred\": + 0,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \"enableBgp\": + false,\r\n \"enableRateLimiting\": false,\r\n \"useLocalAzureIpAddress\": + false,\r\n \"usePolicyBasedTrafficSelectors\": false,\r\n \"routingWeight\": + 0,\r\n \"dpdTimeoutSeconds\": 0,\r\n \"vpnLinkConnectionMode\": + \"Default\",\r\n \"vpnGatewayCustomBgpAddresses\": []\r\n },\r\n + \ \"type\": \"Microsoft.Network/vpnGateways/vpnConnections/vpnLinkConnections\"\r\n + \ }\r\n ],\r\n \"ingressBytesTransferred\": 0,\r\n + \ \"egressBytesTransferred\": 0\r\n }\r\n }\r\n ],\r\n + \ \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\r\n + \ },\r\n \"bgpSettings\": {\r\n \"asn\": 65515,\r\n \"peerWeight\": + 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n \"ipconfigurationId\": + \"Instance0\",\r\n \"defaultBgpIpAddresses\": [\r\n \"10.168.0.13\"\r\n + \ ],\r\n \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"168.62.5.172\",\r\n \"10.168.0.4\"\r\n ]\r\n + \ },\r\n {\r\n \"ipconfigurationId\": \"Instance1\",\r\n + \ \"defaultBgpIpAddresses\": [\r\n \"10.168.0.12\"\r\n + \ ],\r\n \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"168.62.6.21\",\r\n \"10.168.0.5\"\r\n ]\r\n + \ }\r\n ]\r\n },\r\n \"vpnGatewayScaleUnit\": 1,\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"ipConfigurations\": [\r\n {\r\n \"id\": \"Instance0\",\r\n + \ \"publicIpAddress\": \"168.62.5.172\",\r\n \"privateIpAddress\": + \"10.168.0.4\"\r\n },\r\n {\r\n \"id\": \"Instance1\",\r\n + \ \"publicIpAddress\": \"168.62.6.21\",\r\n \"privateIpAddress\": + \"10.168.0.5\"\r\n }\r\n ],\r\n \"natRules\": [],\r\n \"enableBgpRouteTranslationForNat\": + false,\r\n \"isRoutingPreferenceInternet\": false\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '5410' + - '5457' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:08:54 GMT + - Fri, 05 Nov 2021 10:43:32 GMT expires: - '-1' pragma: @@ -1876,7 +1943,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8833446a-c017-47f7-acd3-f21489741d88 + - 234f37e5-58ba-45d4-a4e6-6d9dd4dd2d3f status: code: 200 message: OK @@ -1895,24 +1962,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"mySecurityPartnerProvider76dc116f\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"e4c0f14d-faf6-44c8-807e-2441ff3bbc6a\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/securityPartnerProviders\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"\ - properties\": {\r\n \"provisioningState\": \"Updating\",\r\n \"securityProviderName\"\ - : \"ZScaler\",\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"mySecurityPartnerProvider76dc116f\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\",\r\n + \ \"etag\": \"W/\\\"3325ae37-c90a-4664-b26a-ef99c9c3f866\\\"\",\r\n \"type\": + \"Microsoft.Network/securityPartnerProviders\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n + \ \"provisioningState\": \"Updating\",\r\n \"securityProviderName\": + \"ZScaler\",\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\r\n + \ }\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3f2fbdcd-450c-43b5-94f8-bb6e35e60c7f?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3e9b85fb-d419-491c-b863-26b5cee573f4?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -1920,7 +1988,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:04 GMT + - Fri, 05 Nov 2021 10:43:34 GMT expires: - '-1' pragma: @@ -1933,9 +2001,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 59e8133b-0093-4e30-9021-e3a1c9c81ee2 + - 834d4cf0-facb-4f1a-9919-94b071a26eb2 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1193' status: code: 201 message: Created @@ -1949,9 +2017,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3f2fbdcd-450c-43b5-94f8-bb6e35e60c7f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3e9b85fb-d419-491c-b863-26b5cee573f4?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -1963,7 +2032,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:15 GMT + - Fri, 05 Nov 2021 10:43:44 GMT expires: - '-1' pragma: @@ -1980,7 +2049,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - bf8ae78f-5bff-452c-85ac-50017fe9cda7 + - e49784fb-a66b-4157-810f-f0b4a19fb1a0 status: code: 200 message: OK @@ -1994,19 +2063,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"mySecurityPartnerProvider76dc116f\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"5232ce8a-cf51-4458-8c44-909f854cd5bf\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/securityPartnerProviders\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"\ - properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"securityProviderName\"\ - : \"ZScaler\",\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"mySecurityPartnerProvider76dc116f\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\",\r\n + \ \"etag\": \"W/\\\"3c446e5f-cf48-46bf-93e7-f542c2e4f0fd\\\"\",\r\n \"type\": + \"Microsoft.Network/securityPartnerProviders\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"securityProviderName\": + \"ZScaler\",\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\r\n + \ }\r\n }\r\n}" headers: cache-control: - no-cache @@ -2015,7 +2085,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:15 GMT + - Fri, 05 Nov 2021 10:43:44 GMT expires: - '-1' pragma: @@ -2032,7 +2102,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a9dc27f7-8e17-43f4-be64-06b8ccfd5e35 + - 2e2946e8-f02b-4360-a19e-76c7bfc85b55 status: code: 200 message: OK @@ -2046,26 +2116,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualhubx76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"2c755dc2-1696-451d-94c4-a2cdd50ee2d1\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"virtualHubRouteTableV2s\"\ - : [],\r\n \"addressPrefix\": \"10.168.0.0/24\",\r\n \"virtualRouterAsn\"\ - : 65515,\r\n \"virtualRouterIps\": [\r\n \"10.168.0.68\",\r\n \ - \ \"10.168.0.69\"\r\n ],\r\n \"routeTable\": {\r\n \"routes\"\ - : []\r\n },\r\n \"securityProviderName\": \"zscaler\",\r\n \"virtualWan\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - \r\n },\r\n \"vpnGateway\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\"\ - \r\n },\r\n \"securityPartnerProvider\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\"\ - \r\n },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"Provisioned\"\ - ,\r\n \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\"\ - : \"ExpressRoute\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualhubx76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\",\r\n + \ \"etag\": \"W/\\\"efa3a7f2-3ced-4456-9266-2d40291f761f\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"virtualHubRouteTableV2s\": [],\r\n \"addressPrefix\": + \"10.168.0.0/24\",\r\n \"virtualRouterAsn\": 65515,\r\n \"virtualRouterIps\": + [\r\n \"10.168.0.68\",\r\n \"10.168.0.69\"\r\n ],\r\n \"routeTable\": + {\r\n \"routes\": []\r\n },\r\n \"securityProviderName\": \"zscaler\",\r\n + \ \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\r\n + \ },\r\n \"vpnGateway\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\"\r\n + \ },\r\n \"securityPartnerProvider\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\"\r\n + \ },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"Provisioned\",\r\n + \ \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\": + \"ExpressRoute\"\r\n }\r\n}" headers: cache-control: - no-cache @@ -2074,7 +2144,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:15 GMT + - Fri, 05 Nov 2021 10:43:44 GMT expires: - '-1' pragma: @@ -2091,7 +2161,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d085768c-1c2a-4a1d-a44c-8a12a295836a + - 1471b1cf-565b-481c-ba54-3f3066d589c7 status: code: 200 message: OK @@ -2105,78 +2175,72 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"vpngateway76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"bd0c868b-b8b0-4b2e-878b-db5509165af1\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/vpnGateways\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"connections\": [\r\ - \n {\r\n \"name\": \"vpnConnection1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1\"\ - ,\r\n \"etag\": \"W/\\\"bd0c868b-b8b0-4b2e-878b-db5509165af1\\\"\"\ - ,\r\n \"type\": \"Microsoft.Network/vpnGateways/vpnConnections\",\r\ - \n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"routingConfiguration\": {\r\n \"associatedRouteTable\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\ - \r\n },\r\n \"propagatedRouteTables\": {\r\n \ - \ \"labels\": [\r\n \"default\"\r\n ],\r\ - \n \"ids\": [\r\n {\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\ - \r\n }\r\n ]\r\n },\r\n \ - \ \"vnetRoutes\": {\r\n \"staticRoutes\": []\r\n }\r\ - \n },\r\n \"enableInternetSecurity\": false,\r\n \ - \ \"remoteVpnSite\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\ - \r\n },\r\n \"vpnLinkConnections\": [\r\n {\r\ - \n \"name\": \"Connection-Link1\",\r\n \"id\": \"\ - /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link1\"\ - ,\r\n \"etag\": \"W/\\\"bd0c868b-b8b0-4b2e-878b-db5509165af1\\\ - \"\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"vpnSiteLink\": {\r\n \ - \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\ - \r\n },\r\n \"connectionBandwidth\": 200,\r\n\ - \ \"ipsecPolicies\": [],\r\n \"vpnConnectionProtocolType\"\ - : \"IKEv2\",\r\n \"sharedKey\": \"key\",\r\n \ - \ \"ingressBytesTransferred\": 0,\r\n \"egressBytesTransferred\"\ - : 0,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \ - \ \"enableBgp\": false,\r\n \"enableRateLimiting\"\ - : false,\r\n \"useLocalAzureIpAddress\": false,\r\n \ - \ \"usePolicyBasedTrafficSelectors\": false,\r\n \"\ - routingWeight\": 0,\r\n \"dpdTimeoutSeconds\": 0,\r\n \ - \ \"vpnLinkConnectionMode\": \"Default\"\r\n },\r\n\ - \ \"type\": \"Microsoft.Network/vpnGateways/vpnConnections/vpnLinkConnections\"\ - \r\n }\r\n ],\r\n \"ingressBytesTransferred\"\ - : 0,\r\n \"egressBytesTransferred\": 0\r\n }\r\n }\r\n\ - \ ],\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - \r\n },\r\n \"bgpSettings\": {\r\n \"asn\": 65515,\r\n \"\ - peerWeight\": 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n \ - \ \"ipconfigurationId\": \"Instance0\",\r\n \"defaultBgpIpAddresses\"\ - : [\r\n \"10.168.0.12\"\r\n ],\r\n \"customBgpIpAddresses\"\ - : [],\r\n \"tunnelIpAddresses\": [\r\n \"137.135.61.82\"\ - ,\r\n \"10.168.0.4\"\r\n ]\r\n },\r\n {\r\ - \n \"ipconfigurationId\": \"Instance1\",\r\n \"defaultBgpIpAddresses\"\ - : [\r\n \"10.168.0.13\"\r\n ],\r\n \"customBgpIpAddresses\"\ - : [],\r\n \"tunnelIpAddresses\": [\r\n \"138.91.88.132\"\ - ,\r\n \"10.168.0.5\"\r\n ]\r\n }\r\n ]\r\n\ - \ },\r\n \"vpnGatewayScaleUnit\": 1,\r\n \"packetCaptureDiagnosticState\"\ - : \"None\",\r\n \"ipConfigurations\": [\r\n {\r\n \"id\": \"\ - Instance0\",\r\n \"publicIpAddress\": \"137.135.61.82\",\r\n \ - \ \"privateIpAddress\": \"10.168.0.4\"\r\n },\r\n {\r\n \ - \ \"id\": \"Instance1\",\r\n \"publicIpAddress\": \"138.91.88.132\"\ - ,\r\n \"privateIpAddress\": \"10.168.0.5\"\r\n }\r\n ],\r\n\ - \ \"natRules\": [],\r\n \"enableBgpRouteTranslationForNat\": false,\r\ - \n \"isRoutingPreferenceInternet\": false\r\n }\r\n}" + string: "{\r\n \"name\": \"vpngateway76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\",\r\n + \ \"etag\": \"W/\\\"2004ffa9-0534-4a9e-afc3-25a65045de94\\\"\",\r\n \"type\": + \"Microsoft.Network/vpnGateways\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"connections\": [\r\n {\r\n \"name\": \"vpnConnection1\",\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1\",\r\n + \ \"etag\": \"W/\\\"2004ffa9-0534-4a9e-afc3-25a65045de94\\\"\",\r\n + \ \"type\": \"Microsoft.Network/vpnGateways/vpnConnections\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"routingConfiguration\": + {\r\n \"associatedRouteTable\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\r\n + \ },\r\n \"propagatedRouteTables\": {\r\n \"labels\": + [\r\n \"default\"\r\n ],\r\n \"ids\": + [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f/hubRouteTables/defaultRouteTable\"\r\n + \ }\r\n ]\r\n },\r\n \"vnetRoutes\": + {\r\n \"staticRoutes\": []\r\n }\r\n },\r\n + \ \"enableInternetSecurity\": false,\r\n \"remoteVpnSite\": + {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\r\n + \ },\r\n \"vpnLinkConnections\": [\r\n {\r\n \"name\": + \"Connection-Link1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/vpnConnections/vpnConnection1/vpnLinkConnections/Connection-Link1\",\r\n + \ \"etag\": \"W/\\\"2004ffa9-0534-4a9e-afc3-25a65045de94\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"vpnSiteLink\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\r\n + \ },\r\n \"connectionBandwidth\": 200,\r\n \"ipsecPolicies\": + [],\r\n \"vpnConnectionProtocolType\": \"IKEv2\",\r\n \"sharedKey\": + \"key\",\r\n \"ingressBytesTransferred\": 0,\r\n \"egressBytesTransferred\": + 0,\r\n \"packetCaptureDiagnosticState\": \"None\",\r\n \"enableBgp\": + false,\r\n \"enableRateLimiting\": false,\r\n \"useLocalAzureIpAddress\": + false,\r\n \"usePolicyBasedTrafficSelectors\": false,\r\n \"routingWeight\": + 0,\r\n \"dpdTimeoutSeconds\": 0,\r\n \"vpnLinkConnectionMode\": + \"Default\",\r\n \"vpnGatewayCustomBgpAddresses\": []\r\n },\r\n + \ \"type\": \"Microsoft.Network/vpnGateways/vpnConnections/vpnLinkConnections\"\r\n + \ }\r\n ],\r\n \"ingressBytesTransferred\": 0,\r\n + \ \"egressBytesTransferred\": 0\r\n }\r\n }\r\n ],\r\n + \ \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\r\n + \ },\r\n \"bgpSettings\": {\r\n \"asn\": 65515,\r\n \"peerWeight\": + 0,\r\n \"bgpPeeringAddresses\": [\r\n {\r\n \"ipconfigurationId\": + \"Instance0\",\r\n \"defaultBgpIpAddresses\": [\r\n \"10.168.0.13\"\r\n + \ ],\r\n \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"168.62.5.172\",\r\n \"10.168.0.4\"\r\n ]\r\n + \ },\r\n {\r\n \"ipconfigurationId\": \"Instance1\",\r\n + \ \"defaultBgpIpAddresses\": [\r\n \"10.168.0.12\"\r\n + \ ],\r\n \"customBgpIpAddresses\": [],\r\n \"tunnelIpAddresses\": + [\r\n \"168.62.6.21\",\r\n \"10.168.0.5\"\r\n ]\r\n + \ }\r\n ]\r\n },\r\n \"vpnGatewayScaleUnit\": 1,\r\n \"packetCaptureDiagnosticState\": + \"None\",\r\n \"ipConfigurations\": [\r\n {\r\n \"id\": \"Instance0\",\r\n + \ \"publicIpAddress\": \"168.62.5.172\",\r\n \"privateIpAddress\": + \"10.168.0.4\"\r\n },\r\n {\r\n \"id\": \"Instance1\",\r\n + \ \"publicIpAddress\": \"168.62.6.21\",\r\n \"privateIpAddress\": + \"10.168.0.5\"\r\n }\r\n ],\r\n \"natRules\": [],\r\n \"enableBgpRouteTranslationForNat\": + false,\r\n \"isRoutingPreferenceInternet\": false\r\n }\r\n}" headers: cache-control: - no-cache content-length: - - '5410' + - '5457' content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:16 GMT + - Fri, 05 Nov 2021 10:43:44 GMT expires: - '-1' pragma: @@ -2193,7 +2257,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - cbd27f4e-2c82-408d-ab22-d0e1331116aa + - 147f9373-802a-4494-9b0a-e1aeba9c1ba5 status: code: 200 message: OK @@ -2207,22 +2271,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualwan76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"e5ec5360-e910-4ee6-98c6-2d6601daf9db\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\"\ - : {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\"\ - : false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\"\ - : \"None\",\r\n \"type\": \"Basic\",\r\n \"virtualHubs\": [\r\n \ - \ {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - \r\n }\r\n ],\r\n \"vpnSites\": [\r\n {\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualwan76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\",\r\n + \ \"etag\": \"W/\\\"349152b1-aa4e-4339-98b3-4ba8d02f5738\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\": + true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\": + \"Basic\",\r\n \"virtualHubs\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\r\n + \ }\r\n ],\r\n \"vpnSites\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: cache-control: - no-cache @@ -2231,9 +2294,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:16 GMT + - Fri, 05 Nov 2021 10:43:45 GMT etag: - - W/"e5ec5360-e910-4ee6-98c6-2d6601daf9db" + - W/"349152b1-aa4e-4339-98b3-4ba8d02f5738" expires: - '-1' pragma: @@ -2250,7 +2313,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b8388e88-33cf-4e6d-91c1-2df331bbe90c + - b8f9c207-dcf2-4428-af94-7b8fcd979d4d status: code: 200 message: OK @@ -2264,19 +2327,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"vpnSiteLink1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\ - ,\r\n \"etag\": \"W/\\\"9a955031-dbf2-4f68-a4c9-077aa73055e9\\\"\",\r\n \ - \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"\ - ipAddress\": \"50.50.50.56\",\r\n \"bgpProperties\": {\r\n \"asn\"\ - : 1234,\r\n \"bgpPeeringAddress\": \"192.168.0.0\"\r\n },\r\n \"\ - linkProperties\": {\r\n \"linkProviderName\": \"vendor1\",\r\n \"\ - linkSpeedInMbps\": 0\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/vpnSites/vpnSiteLinks\"\ - \r\n}" + string: "{\r\n \"name\": \"vpnSiteLink1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\",\r\n + \ \"etag\": \"W/\\\"442d9c6b-76b1-4584-a457-48d060c93686\\\"\",\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"ipAddress\": \"50.50.50.56\",\r\n + \ \"bgpProperties\": {\r\n \"asn\": 1234,\r\n \"bgpPeeringAddress\": + \"192.168.0.0\"\r\n },\r\n \"linkProperties\": {\r\n \"linkProviderName\": + \"vendor1\",\r\n \"linkSpeedInMbps\": 0\r\n }\r\n },\r\n \"type\": + \"Microsoft.Network/vpnSites/vpnSiteLinks\"\r\n}" headers: cache-control: - no-cache @@ -2285,9 +2348,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:16 GMT + - Fri, 05 Nov 2021 10:43:45 GMT etag: - - W/"9a955031-dbf2-4f68-a4c9-077aa73055e9" + - W/"442d9c6b-76b1-4584-a457-48d060c93686" expires: - '-1' pragma: @@ -2304,7 +2367,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - eaeabce6-d0db-4cdb-806a-8c4081f6dc9a + - f984b3fd-d73a-4483-b0f6-71b94c289cbc status: code: 200 message: OK @@ -2318,19 +2381,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"mySecurityPartnerProvider76dc116f\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"316ae615-fcf1-4324-b2f3-f33753eac8f6\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/securityPartnerProviders\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"\ - properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n \"securityProviderName\"\ - : \"ZScaler\",\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"mySecurityPartnerProvider76dc116f\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\",\r\n + \ \"etag\": \"W/\\\"dab414f5-5fc2-4d3b-b93d-bb79f839daa7\\\"\",\r\n \"type\": + \"Microsoft.Network/securityPartnerProviders\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"key1\": \"value1\"\r\n },\r\n \"properties\": {\r\n + \ \"provisioningState\": \"Succeeded\",\r\n \"securityProviderName\": + \"ZScaler\",\r\n \"virtualHub\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\r\n + \ }\r\n }\r\n}" headers: cache-control: - no-cache @@ -2339,7 +2403,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:17 GMT + - Fri, 05 Nov 2021 10:43:45 GMT expires: - '-1' pragma: @@ -2356,7 +2420,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 99af8f5a-9b96-40a2-8ee3-0f535bd0edb3 + - d194b9ae-590c-4b75-8a99-f38d8858682b status: code: 200 message: OK @@ -2372,25 +2436,26 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: POST - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/reset?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f/reset?api-version=2021-05-01 response: body: string: '' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 08:09:17 GMT + - Fri, 05 Nov 2021 10:43:45 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 pragma: - no-cache server: @@ -2401,7 +2466,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 37b083b1-d1e2-43a7-8ea4-6cd2799ffe44 + - 79bc9319-7ecd-4177-b327-7d6ed26d8251 x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -2417,9 +2482,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2431,7 +2497,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:28 GMT + - Fri, 05 Nov 2021 10:43:55 GMT expires: - '-1' pragma: @@ -2448,7 +2514,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6e255357-d892-440d-9929-20212d6d55a7 + - 5884c14f-b222-4333-be1b-26711dd7d2a0 status: code: 200 message: OK @@ -2462,9 +2528,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2476,7 +2543,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:38 GMT + - Fri, 05 Nov 2021 10:44:05 GMT expires: - '-1' pragma: @@ -2493,7 +2560,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 5c17e1fa-9ada-4331-abfd-3abca2504425 + - 74712e4c-0c6f-4a37-b1dc-2c3b0661c6c7 status: code: 200 message: OK @@ -2507,9 +2574,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2521,7 +2589,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:09:58 GMT + - Fri, 05 Nov 2021 10:44:24 GMT expires: - '-1' pragma: @@ -2538,7 +2606,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 465b5df0-c208-4f54-a69c-0d38bcbe182a + - 7cd9c9f8-61ab-425b-a7d2-b22b89b67508 status: code: 200 message: OK @@ -2552,9 +2620,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2566,7 +2635,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:10:40 GMT + - Fri, 05 Nov 2021 10:45:05 GMT expires: - '-1' pragma: @@ -2583,7 +2652,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 0b6aa846-4566-445a-8c81-6689a53257c3 + - e621caae-5539-4819-a8c6-251017c7b988 status: code: 200 message: OK @@ -2597,9 +2666,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2611,7 +2681,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:11:59 GMT + - Fri, 05 Nov 2021 10:46:25 GMT expires: - '-1' pragma: @@ -2628,7 +2698,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 01163104-a78b-412e-acfb-b16ad5139d56 + - d049977f-c732-45e7-ab27-c3d8343fad92 status: code: 200 message: OK @@ -2642,9 +2712,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2656,7 +2727,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:14:41 GMT + - Fri, 05 Nov 2021 10:49:05 GMT expires: - '-1' pragma: @@ -2673,7 +2744,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - ebc7e5d7-e6f9-4722-a093-295a97dfd8cf + - afdebf5b-02d5-4ee0-8473-25a8a5efd80a status: code: 200 message: OK @@ -2687,9 +2758,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2701,7 +2773,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:16:21 GMT + - Fri, 05 Nov 2021 10:50:45 GMT expires: - '-1' pragma: @@ -2718,7 +2790,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 6c7044a9-c1ae-43fc-bf2b-8c0f14d48cad + - b749213c-e435-448f-b5d2-96a11d221475 status: code: 200 message: OK @@ -2732,9 +2804,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2746,7 +2819,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:18:02 GMT + - Fri, 05 Nov 2021 10:52:26 GMT expires: - '-1' pragma: @@ -2763,7 +2836,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 27ebbe9a-b7c4-487b-b2b2-90d4f33da94b + - a877a4e1-4da5-4fe4-b2a9-c7cc938eb14c status: code: 200 message: OK @@ -2777,9 +2850,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2791,7 +2865,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:19:42 GMT + - Fri, 05 Nov 2021 10:54:06 GMT expires: - '-1' pragma: @@ -2808,7 +2882,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - a34dcaca-9d92-47ad-9b6f-a358c804e60e + - 97d90188-edc7-43a0-9e9b-8f1685005ee9 status: code: 200 message: OK @@ -2822,9 +2896,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2836,7 +2911,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:21:23 GMT + - Fri, 05 Nov 2021 10:55:46 GMT expires: - '-1' pragma: @@ -2853,7 +2928,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7ae869fc-ea16-4053-ac9d-f484587f5905 + - 02e06ca8-a0c1-4c04-89d8-c6d2becfd0df status: code: 200 message: OK @@ -2867,9 +2942,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -2881,7 +2957,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:23:03 GMT + - Fri, 05 Nov 2021 10:57:25 GMT expires: - '-1' pragma: @@ -2898,7 +2974,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 44066f51-293a-48e3-8a74-948b8b8f1ecd + - 4f917b88-5a73-4953-a887-49acd710b1f5 status: code: 200 message: OK @@ -2912,9 +2988,56 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 + response: + body: + string: "{\r\n \"status\": \"InProgress\"\r\n}" + headers: + cache-control: + - no-cache + content-length: + - '30' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 05 Nov 2021 10:59:06 GMT + expires: + - '-1' + pragma: + - no-cache + server: + - Microsoft-HTTPAPI/2.0 + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-ms-arm-service-request-id: + - ba2d3a88-268d-4ab5-8570-a6ed34f063cd + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\",\r\n \"properties\": {}\r\n}" @@ -2926,7 +3049,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:24:44 GMT + - Fri, 05 Nov 2021 11:00:46 GMT expires: - '-1' pragma: @@ -2943,7 +3066,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7f44c741-eb85-4d08-bc52-5754ec3427ef + - 5461e104-8438-42e8-a057-a7d9e088f774 status: code: 200 message: OK @@ -2957,15 +3080,16 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 response: body: string: 'null' headers: azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -2973,11 +3097,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:24:44 GMT + - Fri, 05 Nov 2021 11:00:46 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/4727cafc-a804-4889-be91-485ff73f5aed?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/d2b5ed53-c193-4e4a-903d-7bc4d63ccce2?api-version=2021-05-01 pragma: - no-cache server: @@ -2992,7 +3116,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 37b083b1-d1e2-43a7-8ea4-6cd2799ffe44 + - 79bc9319-7ecd-4177-b327-7d6ed26d8251 status: code: 200 message: OK @@ -3010,26 +3134,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualhubx76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"2e635005-c2e4-4621-a9ef-5c0999737509\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Updating\"\ - ,\r\n \"virtualHubRouteTableV2s\": [],\r\n \"addressPrefix\": \"10.168.0.0/24\"\ - ,\r\n \"virtualRouterAsn\": 65515,\r\n \"virtualRouterIps\": [\r\n \ - \ \"10.168.0.68\",\r\n \"10.168.0.69\"\r\n ],\r\n \"routeTable\"\ - : {\r\n \"routes\": []\r\n },\r\n \"securityProviderName\": \"\ - zscaler\",\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - \r\n },\r\n \"vpnGateway\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\"\ - \r\n },\r\n \"securityPartnerProvider\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\"\ - \r\n },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"Provisioned\"\ - ,\r\n \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\"\ - : \"ExpressRoute\"\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualhubx76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\",\r\n + \ \"etag\": \"W/\\\"ce7baec6-9a01-4b24-98d7-ac45a2a023ec\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualHubs\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Updating\",\r\n \"virtualHubRouteTableV2s\": + [],\r\n \"addressPrefix\": \"10.168.0.0/24\",\r\n \"virtualRouterAsn\": + 65515,\r\n \"virtualRouterIps\": [\r\n \"10.168.0.68\",\r\n \"10.168.0.69\"\r\n + \ ],\r\n \"routeTable\": {\r\n \"routes\": []\r\n },\r\n \"securityProviderName\": + \"zscaler\",\r\n \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\r\n + \ },\r\n \"vpnGateway\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f\"\r\n + \ },\r\n \"securityPartnerProvider\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\"\r\n + \ },\r\n \"sku\": \"Basic\",\r\n \"routingState\": \"Provisioned\",\r\n + \ \"allowBranchToBranchTraffic\": false,\r\n \"preferredRoutingGateway\": + \"ExpressRoute\"\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -3040,7 +3164,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:24:50 GMT + - Fri, 05 Nov 2021 11:00:47 GMT expires: - '-1' pragma: @@ -3057,9 +3181,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 569108a3-998d-41ff-9127-6924b8d54c01 + - 7f2ce2e1-2ee7-43c1-9d85-876c2d429f26 x-ms-ratelimit-remaining-subscription-writes: - - '1198' + - '1195' status: code: 200 message: OK @@ -3077,22 +3201,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"virtualwan76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"63a510f7-22f8-4721-a72c-122cec949de6\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"disableVpnEncryption\": false,\r\n \"allowBranchToBranchTraffic\"\ - : true,\r\n \"office365LocalBreakoutCategory\": \"None\",\r\n \"type\"\ - : \"Basic\",\r\n \"virtualHubs\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - \r\n }\r\n ],\r\n \"vpnSites\": [\r\n {\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"virtualwan76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\",\r\n + \ \"etag\": \"W/\\\"30914466-9960-4da8-a54a-d427f7124ecb\\\"\",\r\n \"type\": + \"Microsoft.Network/virtualWans\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"disableVpnEncryption\": + false,\r\n \"allowBranchToBranchTraffic\": true,\r\n \"office365LocalBreakoutCategory\": + \"None\",\r\n \"type\": \"Basic\",\r\n \"virtualHubs\": [\r\n {\r\n + \ \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\r\n + \ }\r\n ],\r\n \"vpnSites\": [\r\n {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\r\n + \ }\r\n ]\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -3103,7 +3227,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:24:53 GMT + - Fri, 05 Nov 2021 11:00:48 GMT expires: - '-1' pragma: @@ -3120,9 +3244,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 40e38b4c-f80f-4dae-930f-1e5a773205a6 + - c37ccbdb-2a18-42e2-aa39-510a2b22f417 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1194' status: code: 200 message: OK @@ -3140,33 +3264,32 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"vnpsite76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"980bef9e-a1bd-47a0-af45-e5c6003845d5\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/vpnSites\",\r\n \"location\": \"westus\"\ - ,\r\n \"tags\": {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\ - \r\n },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"addressSpace\": {\r\n \"addressPrefixes\": [\r\n \"\ - 10.0.0.0/16\"\r\n ]\r\n },\r\n \"deviceProperties\": {\r\n \ - \ \"linkSpeedInMbps\": 0\r\n },\r\n \"virtualWan\": {\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\ - \r\n },\r\n \"isSecuritySite\": false,\r\n \"o365Policy\": {\r\n\ - \ \"breakOutCategories\": {\r\n \"optimize\": false,\r\n \ - \ \"allow\": false,\r\n \"default\": false\r\n }\r\n },\r\ - \n \"vpnSiteLinks\": [\r\n {\r\n \"name\": \"vpnSiteLink1\"\ - ,\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\"\ - ,\r\n \"etag\": \"W/\\\"980bef9e-a1bd-47a0-af45-e5c6003845d5\\\"\"\ - ,\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\ - ,\r\n \"ipAddress\": \"50.50.50.56\",\r\n \"bgpProperties\"\ - : {\r\n \"asn\": 1234,\r\n \"bgpPeeringAddress\": \"\ - 192.168.0.0\"\r\n },\r\n \"linkProperties\": {\r\n \ - \ \"linkProviderName\": \"vendor1\",\r\n \"linkSpeedInMbps\"\ - : 0\r\n }\r\n },\r\n \"type\": \"Microsoft.Network/vpnSites/vpnSiteLinks\"\ - \r\n }\r\n ]\r\n }\r\n}" + string: "{\r\n \"name\": \"vnpsite76dc116f\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f\",\r\n + \ \"etag\": \"W/\\\"f02f291a-8bde-4e35-b4c7-742b0e082915\\\"\",\r\n \"type\": + \"Microsoft.Network/vpnSites\",\r\n \"location\": \"westus\",\r\n \"tags\": + {\r\n \"key1\": \"value1\",\r\n \"key2\": \"value2\"\r\n },\r\n \"properties\": + {\r\n \"provisioningState\": \"Succeeded\",\r\n \"addressSpace\": {\r\n + \ \"addressPrefixes\": [\r\n \"10.0.0.0/16\"\r\n ]\r\n },\r\n + \ \"deviceProperties\": {\r\n \"linkSpeedInMbps\": 0\r\n },\r\n + \ \"virtualWan\": {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f\"\r\n + \ },\r\n \"isSecuritySite\": false,\r\n \"o365Policy\": {\r\n \"breakOutCategories\": + {\r\n \"optimize\": false,\r\n \"allow\": false,\r\n \"default\": + false\r\n }\r\n },\r\n \"vpnSiteLinks\": [\r\n {\r\n \"name\": + \"vpnSiteLink1\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f/vpnSiteLinks/vpnSiteLink1\",\r\n + \ \"etag\": \"W/\\\"f02f291a-8bde-4e35-b4c7-742b0e082915\\\"\",\r\n + \ \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"ipAddress\": \"50.50.50.56\",\r\n \"bgpProperties\": + {\r\n \"asn\": 1234,\r\n \"bgpPeeringAddress\": \"192.168.0.0\"\r\n + \ },\r\n \"linkProperties\": {\r\n \"linkProviderName\": + \"vendor1\",\r\n \"linkSpeedInMbps\": 0\r\n }\r\n },\r\n + \ \"type\": \"Microsoft.Network/vpnSites/vpnSiteLinks\"\r\n }\r\n + \ ]\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -3177,7 +3300,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:24:55 GMT + - Fri, 05 Nov 2021 11:00:49 GMT expires: - '-1' pragma: @@ -3194,9 +3317,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1de0371a-3f4c-40a5-b063-23360366dd1a + - fd5be449-f67a-41d0-83ec-c40f3d466e97 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1193' status: code: 200 message: OK @@ -3214,20 +3337,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PATCH - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"mySecurityPartnerProvider76dc116f\",\r\n \"id\"\ - : \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\"\ - ,\r\n \"etag\": \"W/\\\"d2796a11-9869-4ba5-a54e-8a41c766a101\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/securityPartnerProviders\",\r\n \"location\"\ - : \"westus\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\"\ - : \"value2\"\r\n },\r\n \"properties\": {\r\n \"provisioningState\":\ - \ \"Succeeded\",\r\n \"securityProviderName\": \"ZScaler\",\r\n \"virtualHub\"\ - : {\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\ - \r\n }\r\n }\r\n}" + string: "{\r\n \"name\": \"mySecurityPartnerProvider76dc116f\",\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f\",\r\n + \ \"etag\": \"W/\\\"6d79f792-c99d-4d99-8fd7-90ec6a701271\\\"\",\r\n \"type\": + \"Microsoft.Network/securityPartnerProviders\",\r\n \"location\": \"westus\",\r\n + \ \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"value2\"\r\n + \ },\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\n + \ \"securityProviderName\": \"ZScaler\",\r\n \"virtualHub\": {\r\n \"id\": + \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f\"\r\n + \ }\r\n }\r\n}" headers: azure-asyncnotification: - Enabled @@ -3238,7 +3362,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:24:57 GMT + - Fri, 05 Nov 2021 11:00:49 GMT expires: - '-1' pragma: @@ -3255,9 +3379,9 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d8d308a1-24ec-46e4-8b80-451c803a9f51 + - abaf1891-f5d2-475b-8b33-edec3cd273bd x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1192' status: code: 200 message: OK @@ -3273,9 +3397,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/securityPartnerProviders/mySecurityPartnerProvider76dc116f?api-version=2021-05-01 response: body: string: '' @@ -3283,17 +3408,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/78abf3bb-82d2-4324-ab3d-ef0ad5ae71f0?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4ec9e5ea-7948-4cd3-91e3-f01a39bb7be4?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 08:24:58 GMT + - Fri, 05 Nov 2021 11:00:50 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/78abf3bb-82d2-4324-ab3d-ef0ad5ae71f0?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/4ec9e5ea-7948-4cd3-91e3-f01a39bb7be4?api-version=2021-05-01 pragma: - no-cache server: @@ -3304,7 +3429,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b8507e7a-9289-4dba-bfa3-5e33c7e20d49 + - 4350ff57-4d95-4c16-9e83-f807e903a417 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -3320,9 +3445,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/78abf3bb-82d2-4324-ab3d-ef0ad5ae71f0?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/4ec9e5ea-7948-4cd3-91e3-f01a39bb7be4?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -3334,7 +3460,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:25:09 GMT + - Fri, 05 Nov 2021 11:01:00 GMT expires: - '-1' pragma: @@ -3351,7 +3477,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b706c85b-a45c-410c-b26e-3e87589aeea6 + - fae7323c-858a-4830-b125-b92a270fc536 status: code: 200 message: OK @@ -3367,9 +3493,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnGateways/vpngateway76dc116f?api-version=2021-05-01 response: body: string: '' @@ -3377,17 +3504,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 08:25:10 GMT + - Fri, 05 Nov 2021 11:01:00 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 pragma: - no-cache server: @@ -3398,7 +3525,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e6426d82-cda6-4b2b-9be4-c94bb18cbbdc + - 2215d865-af15-4ab3-9950-54a8639b4108 x-ms-ratelimit-remaining-subscription-deletes: - '14998' status: @@ -3414,9 +3541,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3428,7 +3556,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:25:20 GMT + - Fri, 05 Nov 2021 11:01:10 GMT expires: - '-1' pragma: @@ -3445,7 +3573,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - aee9759d-2cb5-4be2-871b-0c97b1ba83c0 + - 7cab8b0b-b1e9-4814-bdd4-bfb144c4b030 status: code: 200 message: OK @@ -3459,9 +3587,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3473,7 +3602,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:25:31 GMT + - Fri, 05 Nov 2021 11:01:20 GMT expires: - '-1' pragma: @@ -3490,7 +3619,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e2370457-2a39-44ba-833f-b86a12e51ff0 + - 899154b2-8021-4614-8bbd-511f31367fc5 status: code: 200 message: OK @@ -3504,9 +3633,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3518,7 +3648,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:25:52 GMT + - Fri, 05 Nov 2021 11:01:40 GMT expires: - '-1' pragma: @@ -3535,7 +3665,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 744df0c4-2fdf-46a4-89cd-41ab6396c131 + - 2546ee3b-eb92-454b-b3c9-f2316137c8cf status: code: 200 message: OK @@ -3549,9 +3679,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3563,7 +3694,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:26:13 GMT + - Fri, 05 Nov 2021 11:01:59 GMT expires: - '-1' pragma: @@ -3580,7 +3711,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - fca0e1e3-0cd5-4bff-a1ba-6f7eae3bd8f9 + - c42c4c27-7561-43ad-806a-e8a7ec519e07 status: code: 200 message: OK @@ -3594,9 +3725,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3608,7 +3740,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:26:53 GMT + - Fri, 05 Nov 2021 11:02:40 GMT expires: - '-1' pragma: @@ -3625,7 +3757,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b9dff227-e62c-4990-a81b-34b038704d60 + - eb44d60b-ae36-4eb7-8acd-d3e09346b226 status: code: 200 message: OK @@ -3639,9 +3771,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3653,7 +3786,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:27:33 GMT + - Fri, 05 Nov 2021 11:03:20 GMT expires: - '-1' pragma: @@ -3670,7 +3803,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e5d8ea6d-618c-465c-a819-328fe368c635 + - 902d5793-de76-48d7-8d47-9e9f0782e678 status: code: 200 message: OK @@ -3684,9 +3817,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3698,7 +3832,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:28:53 GMT + - Fri, 05 Nov 2021 11:04:40 GMT expires: - '-1' pragma: @@ -3715,7 +3849,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 158cb803-f7f2-4215-833e-c1267672878f + - a5f154ce-b711-4f1d-ad76-394bf184f122 status: code: 200 message: OK @@ -3729,9 +3863,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3743,7 +3878,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:31:34 GMT + - Fri, 05 Nov 2021 11:07:20 GMT expires: - '-1' pragma: @@ -3760,7 +3895,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 66fbf83a-183c-4184-9963-30201ff68b96 + - fcc92207-00fb-44cf-8339-7da4e9be81ed status: code: 200 message: OK @@ -3774,9 +3909,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3788,7 +3924,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:33:16 GMT + - Fri, 05 Nov 2021 11:09:01 GMT expires: - '-1' pragma: @@ -3805,7 +3941,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 85732ef2-523d-42e7-8a99-bafa3821aa38 + - d828785f-db96-4a42-9d5a-0e48dcf80216 status: code: 200 message: OK @@ -3819,9 +3955,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3833,7 +3970,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:34:56 GMT + - Fri, 05 Nov 2021 11:10:41 GMT expires: - '-1' pragma: @@ -3850,7 +3987,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - d5741c00-a9f8-4340-a4c1-8f5604288497 + - a5e73b8a-ee9f-45cb-bbd3-9ab9ac50d0ec status: code: 200 message: OK @@ -3864,9 +4001,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3878,7 +4016,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:36:37 GMT + - Fri, 05 Nov 2021 11:12:21 GMT expires: - '-1' pragma: @@ -3895,7 +4033,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - e2e9819c-312b-4fc1-8d91-bce528f601b0 + - 1e747d4f-e49b-49b0-9f7b-dfc6a822bcea status: code: 200 message: OK @@ -3909,9 +4047,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -3923,7 +4062,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:38:17 GMT + - Fri, 05 Nov 2021 11:14:01 GMT expires: - '-1' pragma: @@ -3940,7 +4079,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9a8ef699-547a-4577-bc70-02e5c77d0e29 + - 7e0f42f0-ce22-4253-b486-8354c1bab1a4 status: code: 200 message: OK @@ -3954,9 +4093,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/53b57be1-196e-4293-ad3f-e3a6b58b5fb3?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ebf7cb1e-d239-45ef-9f6f-de39fb6fed30?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -3968,7 +4108,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:39:58 GMT + - Fri, 05 Nov 2021 11:15:42 GMT expires: - '-1' pragma: @@ -3985,7 +4125,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 570e56f6-ec06-4d63-99cf-0661d9727ff2 + - 24d3af3c-791c-498e-a590-e0e6572b80b1 status: code: 200 message: OK @@ -4001,9 +4141,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualHubs/virtualhubx76dc116f?api-version=2021-05-01 response: body: string: '' @@ -4011,17 +4152,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 08:40:01 GMT + - Fri, 05 Nov 2021 11:15:42 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 pragma: - no-cache server: @@ -4032,7 +4173,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 3aeb100a-3f24-4ec8-8178-ab6285f153bc + - 582b1660-31ce-4ae5-b279-dc375f8c3296 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -4048,54 +4189,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 - response: - body: - string: "{\r\n \"status\": \"InProgress\"\r\n}" - headers: - cache-control: - - no-cache - content-length: - - '30' - content-type: - - application/json; charset=utf-8 - date: - - Sat, 09 Oct 2021 08:40:11 GMT - expires: - - '-1' - pragma: - - no-cache - server: - - Microsoft-HTTPAPI/2.0 - - Microsoft-HTTPAPI/2.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - transfer-encoding: - - chunked - vary: - - Accept-Encoding - x-content-type-options: - - nosniff - x-ms-arm-service-request-id: - - 6eb5bb3f-ec09-4dd4-9734-4bea10f5d839 - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4107,7 +4204,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:40:22 GMT + - Fri, 05 Nov 2021 11:15:52 GMT expires: - '-1' pragma: @@ -4124,7 +4221,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 7a476503-201f-4098-a802-17d77dddc7c4 + - 5bffc577-9f42-45b7-b6b1-8a7863338c9c status: code: 200 message: OK @@ -4138,9 +4235,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4152,7 +4250,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:40:42 GMT + - Fri, 05 Nov 2021 11:16:02 GMT expires: - '-1' pragma: @@ -4169,7 +4267,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - b8b9516d-9ffa-45eb-bba9-6ae5790892f4 + - f784eaf3-7cf1-4c3a-9035-43f2c0fd33ce status: code: 200 message: OK @@ -4183,9 +4281,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4197,7 +4296,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:41:02 GMT + - Fri, 05 Nov 2021 11:16:22 GMT expires: - '-1' pragma: @@ -4214,7 +4313,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 8723a1f7-84f1-4847-af66-62adfcfe8515 + - 6bbb4d7b-4670-465a-b738-eb0922bc5572 status: code: 200 message: OK @@ -4228,9 +4327,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4242,7 +4342,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:41:43 GMT + - Fri, 05 Nov 2021 11:16:41 GMT expires: - '-1' pragma: @@ -4259,7 +4359,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 163aafae-74e4-4873-8569-ea74c02ded18 + - ec27dd61-56de-4935-98ee-46ad0328f306 status: code: 200 message: OK @@ -4273,9 +4373,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4287,7 +4388,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:42:23 GMT + - Fri, 05 Nov 2021 11:17:22 GMT expires: - '-1' pragma: @@ -4304,7 +4405,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 57b967e3-fb31-456a-b105-17a6dcdd124a + - 7485395c-db96-4977-bf0e-668aa4dd22c8 status: code: 200 message: OK @@ -4318,9 +4419,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4332,7 +4434,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:43:44 GMT + - Fri, 05 Nov 2021 11:18:02 GMT expires: - '-1' pragma: @@ -4349,7 +4451,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 27c33d9f-b704-46dc-bc7f-af18eb736aec + - 1fe26ea7-445a-4544-9f1b-85917d7e69a0 status: code: 200 message: OK @@ -4363,9 +4465,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4377,7 +4480,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:46:24 GMT + - Fri, 05 Nov 2021 11:19:22 GMT expires: - '-1' pragma: @@ -4394,7 +4497,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - dc169866-6f82-4d64-a682-83887e7efa77 + - d23a74a5-ee98-48ad-af27-1896590a374d status: code: 200 message: OK @@ -4408,9 +4511,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4422,7 +4526,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:48:06 GMT + - Fri, 05 Nov 2021 11:22:02 GMT expires: - '-1' pragma: @@ -4439,7 +4543,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 29cc364e-b0a7-4d12-9a94-d11d142fb400 + - 2f268c09-ebf8-4bdc-9f73-521b50476fbf status: code: 200 message: OK @@ -4453,9 +4557,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"InProgress\"\r\n}" @@ -4467,7 +4572,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:49:46 GMT + - Fri, 05 Nov 2021 11:23:42 GMT expires: - '-1' pragma: @@ -4484,7 +4589,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 1a59a985-764d-4ae2-98bd-231f6c0400f1 + - 1bdff57c-3093-41b0-ace8-d898708016c7 status: code: 200 message: OK @@ -4498,9 +4603,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/2420b6b3-f1f3-4470-9f50-edc5d63eb571?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3516f9c8-5e1e-49fc-b27d-d17ef197a1f0?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -4512,7 +4618,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:51:27 GMT + - Fri, 05 Nov 2021 11:25:22 GMT expires: - '-1' pragma: @@ -4529,7 +4635,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 9c903e42-28cc-4409-a816-aaad97986305 + - 1302c3ea-99f6-4771-9515-3e187d5945e3 status: code: 200 message: OK @@ -4545,9 +4651,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/vpnSites/vnpsite76dc116f?api-version=2021-05-01 response: body: string: '' @@ -4555,17 +4662,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ece6b1c4-8dc6-4000-afb2-d820f88e42be?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ba40b764-d1ac-4c5e-b3fb-2a228491585d?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 08:51:28 GMT + - Fri, 05 Nov 2021 11:25:23 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/ece6b1c4-8dc6-4000-afb2-d820f88e42be?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/ba40b764-d1ac-4c5e-b3fb-2a228491585d?api-version=2021-05-01 pragma: - no-cache server: @@ -4576,7 +4683,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 94e1155c-8448-4c41-a88b-7afc5e3c817b + - c9b27ad6-a0b0-4899-81f3-eb0608451d25 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -4592,9 +4699,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ece6b1c4-8dc6-4000-afb2-d820f88e42be?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/ba40b764-d1ac-4c5e-b3fb-2a228491585d?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -4606,7 +4714,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:51:38 GMT + - Fri, 05 Nov 2021 11:25:33 GMT expires: - '-1' pragma: @@ -4623,7 +4731,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 90179023-e075-47e2-b065-62e84fbf93b0 + - 82735f27-1815-47c0-824a-e34066947c52 status: code: 200 message: OK @@ -4639,9 +4747,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/virtualWans/virtualwan76dc116f?api-version=2021-05-01 response: body: string: '' @@ -4649,17 +4758,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3c62005b-3d86-4417-9aaa-0242483526e5?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/0544d33c-5774-4ebd-82c2-f76dc70238cb?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 08:51:39 GMT + - Fri, 05 Nov 2021 11:25:33 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/3c62005b-3d86-4417-9aaa-0242483526e5?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/0544d33c-5774-4ebd-82c2-f76dc70238cb?api-version=2021-05-01 pragma: - no-cache server: @@ -4670,7 +4779,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 61b05bdd-e198-4010-871c-a3ed5fbafa93 + - 4d7c8714-74f8-45b6-a128-6af46751c865 x-ms-ratelimit-remaining-subscription-deletes: - '14998' status: @@ -4686,9 +4795,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/3c62005b-3d86-4417-9aaa-0242483526e5?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/0544d33c-5774-4ebd-82c2-f76dc70238cb?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -4700,7 +4810,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:51:49 GMT + - Fri, 05 Nov 2021 11:25:43 GMT expires: - '-1' pragma: @@ -4717,7 +4827,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 2c367e19-bade-4bfe-b3e4-abce93a34f12 + - 5dc923b0-e77c-4f7b-9bed-6ec48695ea31 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_web_application_firewall_policy.test_network.yaml b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_web_application_firewall_policy.test_network.yaml index d52c65adede3..5c484390d755 100644 --- a/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_web_application_firewall_policy.test_network.yaml +++ b/sdk/network/azure-mgmt-network/tests/recordings/test_cli_mgmt_network_web_application_firewall_policy.test_network.yaml @@ -14,28 +14,28 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: PUT - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy\"\ - ,\r\n \"etag\": \"W/\\\"d63f06b1-6087-4aff-8083-d8a88db9dbbb\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies\"\ - ,\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Updating\",\r\n \"customRules\": [],\r\n \"policySettings\": {\r\ - \n \"requestBodyCheck\": true,\r\n \"maxRequestBodySizeInKb\": 128,\r\ - \n \"fileUploadLimitInMb\": 100,\r\n \"state\": \"Disabled\",\r\n\ - \ \"mode\": \"Detection\"\r\n },\r\n \"managedRules\": {\r\n \ - \ \"managedRuleSets\": [\r\n {\r\n \"ruleSetType\": \"\ - OWASP\",\r\n \"ruleSetVersion\": \"3.0\",\r\n \"ruleGroupOverrides\"\ - : []\r\n }\r\n ],\r\n \"exclusions\": []\r\n }\r\n }\r\ - \n}" + string: "{\r\n \"name\": \"myPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy\",\r\n + \ \"etag\": \"W/\\\"947032f3-5aae-4525-b7bb-39fb0946e9f8\\\"\",\r\n \"type\": + \"Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies\",\r\n + \ \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": + \"Updating\",\r\n \"customRules\": [],\r\n \"policySettings\": {\r\n + \ \"requestBodyCheck\": true,\r\n \"maxRequestBodySizeInKb\": 128,\r\n + \ \"fileUploadLimitInMb\": 100,\r\n \"state\": \"Disabled\",\r\n + \ \"mode\": \"Detection\"\r\n },\r\n \"managedRules\": {\r\n \"managedRuleSets\": + [\r\n {\r\n \"ruleSetType\": \"OWASP\",\r\n \"ruleSetVersion\": + \"3.0\",\r\n \"ruleGroupOverrides\": []\r\n }\r\n ],\r\n + \ \"exclusions\": []\r\n }\r\n }\r\n}" headers: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/8f63c0e6-3330-47a6-9da9-cc48b1457e40?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/5ad675ac-341f-4776-a146-29cef6d47f49?api-version=2021-05-01 cache-control: - no-cache content-length: @@ -43,7 +43,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:52:08 GMT + - Fri, 05 Nov 2021 11:25:49 GMT expires: - '-1' pragma: @@ -56,7 +56,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 32fd5ea9-26f8-433e-af32-935eca594aba + - 754cba13-67e7-45ca-8438-7b723160ab7c x-ms-ratelimit-remaining-subscription-writes: - '1199' status: @@ -72,23 +72,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy?api-version=2021-05-01 response: body: - string: "{\r\n \"name\": \"myPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy\"\ - ,\r\n \"etag\": \"W/\\\"82edf669-9480-47d1-a152-64c5312a050f\\\"\",\r\n \ - \ \"type\": \"Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies\"\ - ,\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\"\ - : \"Succeeded\",\r\n \"customRules\": [],\r\n \"policySettings\": {\r\ - \n \"requestBodyCheck\": true,\r\n \"maxRequestBodySizeInKb\": 128,\r\ - \n \"fileUploadLimitInMb\": 100,\r\n \"state\": \"Disabled\",\r\n\ - \ \"mode\": \"Detection\"\r\n },\r\n \"managedRules\": {\r\n \ - \ \"managedRuleSets\": [\r\n {\r\n \"ruleSetType\": \"\ - OWASP\",\r\n \"ruleSetVersion\": \"3.0\",\r\n \"ruleGroupOverrides\"\ - : []\r\n }\r\n ],\r\n \"exclusions\": []\r\n }\r\n }\r\ - \n}" + string: "{\r\n \"name\": \"myPolicy\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy\",\r\n + \ \"etag\": \"W/\\\"b0f3bb8d-ab9f-415d-bd65-713691088c6b\\\"\",\r\n \"type\": + \"Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies\",\r\n + \ \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": + \"Succeeded\",\r\n \"customRules\": [],\r\n \"policySettings\": {\r\n + \ \"requestBodyCheck\": true,\r\n \"maxRequestBodySizeInKb\": 128,\r\n + \ \"fileUploadLimitInMb\": 100,\r\n \"state\": \"Disabled\",\r\n + \ \"mode\": \"Detection\"\r\n },\r\n \"managedRules\": {\r\n \"managedRuleSets\": + [\r\n {\r\n \"ruleSetType\": \"OWASP\",\r\n \"ruleSetVersion\": + \"3.0\",\r\n \"ruleGroupOverrides\": []\r\n }\r\n ],\r\n + \ \"exclusions\": []\r\n }\r\n }\r\n}" headers: cache-control: - no-cache @@ -97,9 +97,9 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:52:08 GMT + - Fri, 05 Nov 2021 11:25:49 GMT etag: - - W/"82edf669-9480-47d1-a152-64c5312a050f" + - W/"b0f3bb8d-ab9f-415d-bd65-713691088c6b" expires: - '-1' pragma: @@ -116,7 +116,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 321e771c-ccdf-4bde-822e-8ebc44388f1f + - c34c6866-536a-4dc6-b658-d29d805c249d status: code: 200 message: OK @@ -132,9 +132,10 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: DELETE - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.Network/ApplicationGatewayWebApplicationFirewallPolicies/myPolicy?api-version=2021-05-01 response: body: string: '' @@ -142,17 +143,17 @@ interactions: azure-asyncnotification: - Enabled azure-asyncoperation: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/fc285dbb-b5e7-4af6-a5b7-2e48852ed3b6?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/66ee475d-4535-49af-8351-bf826c7e1c31?api-version=2021-05-01 cache-control: - no-cache content-length: - '0' date: - - Sat, 09 Oct 2021 08:52:09 GMT + - Fri, 05 Nov 2021 11:25:50 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/fc285dbb-b5e7-4af6-a5b7-2e48852ed3b6?api-version=2021-03-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operationResults/66ee475d-4535-49af-8351-bf826c7e1c31?api-version=2021-05-01 pragma: - no-cache server: @@ -163,7 +164,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 558fc977-6d6e-4ab2-a0ae-1e7c7f6a1716 + - 9f2b6f60-8638-47f1-8562-3623586e47d0 x-ms-ratelimit-remaining-subscription-deletes: - '14999' status: @@ -179,9 +180,10 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-network/19.1.0 Python/3.6.9 (Linux-5.4.72-microsoft-standard-WSL2-x86_64-with-Ubuntu-18.04-bionic) + - azsdk-python-azure-mgmt-network/19.3.0 Python/3.8.12 (Linux-5.11.0-1020-azure-x86_64-with-glibc2.2.5) + VSTS_0fb41ef4-5012-48a9-bf39-4ee3de03ee35_build_2500_0 method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/fc285dbb-b5e7-4af6-a5b7-2e48852ed3b6?api-version=2021-03-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Network/locations/westus/operations/66ee475d-4535-49af-8351-bf826c7e1c31?api-version=2021-05-01 response: body: string: "{\r\n \"status\": \"Succeeded\"\r\n}" @@ -193,7 +195,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Sat, 09 Oct 2021 08:52:20 GMT + - Fri, 05 Nov 2021 11:26:00 GMT expires: - '-1' pragma: @@ -210,7 +212,7 @@ interactions: x-content-type-options: - nosniff x-ms-arm-service-request-id: - - 81b8c0eb-4e5f-49b2-a720-6acd6bdf8813 + - 57407045-0c6f-4668-ba6e-6b45c1f0c5b8 status: code: 200 message: OK diff --git a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py index c109f163bdf3..6650e694e58b 100644 --- a/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py +++ b/sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py @@ -149,7 +149,7 @@ def create_virtual_hub(self, location, group_name, virtual_wan_name, virtual_hub try: result = result.result() except HttpResponseError as e: - self.assertEquals(str(e), "(InternalServerError) An error occurred.") + self.assertEqual(str(e), "(InternalServerError) An error occurred.") return result def create_vm(self, group_name, location, vm_name, network_name, subnet_name, interface_name): diff --git a/sdk/purview/azure-purview-administration/CHANGELOG.md b/sdk/purview/azure-purview-administration/CHANGELOG.md new file mode 100644 index 000000000000..95354f560749 --- /dev/null +++ b/sdk/purview/azure-purview-administration/CHANGELOG.md @@ -0,0 +1,16 @@ +# Release History + +## 1.0.0b2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0b1 (2021-09-29) + +- This is the initial release of the Azure Purview Administration library. +- This package includes the operations of `azure-purview-account` that was previously released diff --git a/sdk/purview/azure-purview-administration/MANIFEST.in b/sdk/purview/azure-purview-administration/MANIFEST.in new file mode 100644 index 000000000000..c5a07332e6c6 --- /dev/null +++ b/sdk/purview/azure-purview-administration/MANIFEST.in @@ -0,0 +1,7 @@ +recursive-include tests *.py +recursive-include samples *.py *.md +include *.md +include azure/__init__.py +include azure/purview/__init__.py +include azure/purview/administration/account/py.typed +include azure/purview/administration/metadatapolicies/py.typed \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/README.md b/sdk/purview/azure-purview-administration/README.md new file mode 100644 index 000000000000..d9a5530ee44c --- /dev/null +++ b/sdk/purview/azure-purview-administration/README.md @@ -0,0 +1,178 @@ +# Azure Purview Administration client library for Python + +Azure Purview is a fully managed cloud service. + +**Please rely heavily on the [service's documentation][account_product_documentation] to use this library** + +[Source code][source_code] | [Package (PyPI)][account_pypi] | [API reference documentation][account_ref_docs]| [Product documentation][account_product_documentation] + +## _Disclaimer_ + +_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ + +## Getting started + +### Prerequisites + +- Python 2.7, or 3.6 or later is required to use this package. +- You must have an [Azure subscription][azure_subscription] and a [Purview][purview_resource] to use this package. + +#### Create a Purview Resource + +Follow [these][purview_resource] instructions to create your Purview resource + +### Install the package + +Install the Azure Purview Account client library for Python with [pip][pip]: + +```bash +pip install azure-purview-administration +``` + +### Authenticate the client + +To use an [Azure Active Directory (AAD) token credential][authenticate_with_token], +provide an instance of the desired credential type obtained from the +[azure-identity][azure_identity_credentials] library. + +To authenticate with AAD, you must first [pip][pip] install [`azure-identity`][azure_identity_pip] and +[enable AAD authentication on your Purview resource][enable_aad] + +After setup, you can choose which type of [credential][azure_identity_credentials] from azure.identity to use. +As an example, [DefaultAzureCredential][default_azure_credential] +can be used to authenticate the client: + +Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: +AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET + +Use the returned token credential to authenticate the client: + +```python +from azure.purview.administration.account import PurviewAccountClient +from azure.purview.administration.metadatapolicies import PurviewMetadataPoliciesClient +from azure.identity import DefaultAzureCredential + +credential = DefaultAzureCredential() +endpoint = "https://.purview.azure.com" +account_client = PurviewAccountClient(endpoint=endpoint, credential=credential) +metadatapolicy_client = PurviewMetadataPoliciesClient(endpoint=endpoint, credential=credential) +``` + +## Key concepts + +### Client + +The package contains two kinds of client: `PurviewAccountClient` and `PurviewMetadataPoliciesClient`. You could use them +with one package according to your requirements. + +## Examples + +The following section shows you how to initialize and authenticate your client, then list all of your keys. + +- [Get Keys](#get-keys "Get All Keys") + +### Get Keys + +```python +from azure.purview.administration.account import PurviewAccountClient +from azure.identity import DefaultAzureCredential + +credential = DefaultAzureCredential() +client = PurviewAccountClient(endpoint="https://.purview.azure.com", credential=credential) +response = client.accounts.get_access_keys() +print(response) +``` + +The following section shows you how to initialize and authenticate your client, then list all of your roles. + +- [List_Roles](#list-roles "List Roles") + +### List Roles + +```python +from azure.purview.administration.metadatapolicies import PurviewMetadataPoliciesClient +from azure.identity import DefaultAzureCredential + +credential = DefaultAzureCredential() +client = PurviewMetadataPoliciesClient(endpoint="https://.purview.azure.com", credential=credential) +response = client.metadata_roles.list() +result = [item for item in response] +print(result) +``` + +## Troubleshooting + +### General + +The Purview client will raise exceptions if status code of your responses is not defined. + +### Logging + +This library uses the standard +[logging][python_logging] library for logging. +Basic information about HTTP sessions (URLs, headers, etc.) is logged at INFO +level. + +Detailed DEBUG level logging, including request/response bodies and unredacted +headers, can be enabled on a client with the `logging_enable` keyword argument: + +```python +import sys +import logging +from azure.identity import DefaultAzureCredential +from azure.purview.administration.account import PurviewAccountClient + +# Create a logger for the 'azure' SDK +logger = logging.getLogger('azure') +logger.setLevel(logging.DEBUG) + +# Configure a console output +handler = logging.StreamHandler(stream=sys.stdout) +logger.addHandler(handler) + +endpoint = "https://.purview.azure.com" +credential = DefaultAzureCredential() + +# This client will log detailed information about its HTTP sessions, at DEBUG level +client = PurviewAccountClient(endpoint=endpoint, credential=credential, logging_enable=True) +``` + +Similarly, `logging_enable` can enable detailed logging for a single call, +even when it isn't enabled for the client: + +```python +result = client.accounts.get_access_keys(logging_enable=True) +``` + +## Next steps + +For more generic samples, see our [client docs][request_builders_and_client]. + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit [cla.microsoft.com][cla]. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][code_of_conduct]. For more information see the [Code of Conduct FAQ][coc_faq] or contact [opencode@microsoft.com][coc_contact] with any additional questions or comments. + + + +[source_code]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/purview/ +[account_pypi]: https://pypi.org/project/azure-purview-catalog/#history +[account_ref_docs]: https://azure.github.io/azure-sdk-for-python/ +[account_product_documentation]: https://azure.microsoft.com/services/purview/ +[azure_subscription]: https://azure.microsoft.com/free/ +[purview_resource]: https://docs.microsoft.com/azure/purview/create-catalog-portal +[pip]: https://pypi.org/project/pip/ +[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials +[azure_identity_pip]: https://pypi.org/project/azure-identity/ +[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential +[enable_aad]: https://docs.microsoft.com/azure/purview/create-catalog-portal#add-a-security-principal-to-a-data-plane-role +[python_logging]: https://docs.python.org/3.5/library/logging.html +[cla]: https://cla.microsoft.com +[code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ +[coc_contact]: mailto:opencode@microsoft.com +[request_builders_and_client]: https://aka.ms/azsdk/python/protocol/quickstart diff --git a/sdk/purview/azure-purview-administration/azure/__init__.py b/sdk/purview/azure-purview-administration/azure/__init__.py new file mode 100644 index 000000000000..5960c353a898 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/azure/purview/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/__init__.py new file mode 100644 index 000000000000..5960c353a898 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/__init__.py new file mode 100644 index 000000000000..5960c353a898 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/_version.py b/sdk/purview/azure-purview-administration/azure/purview/administration/_version.py new file mode 100644 index 000000000000..49fbeb446e68 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/_version.py @@ -0,0 +1,8 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b2" diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/__init__.py new file mode 100644 index 000000000000..e3a34f9e8ab9 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._azure_quota_extension_api import AzureQuotaExtensionAPI +from ._version import VERSION + +__version__ = VERSION +__all__ = ['AzureQuotaExtensionAPI'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_configuration.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_configuration.py new file mode 100644 index 000000000000..09e0ba82e54d --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class PurviewAccountClientConfiguration(Configuration): + """Configuration for PurviewAccountClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/account/. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + """ + + def __init__( + self, + endpoint, # type: str + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + super(PurviewAccountClientConfiguration, self).__init__(**kwargs) + + self.endpoint = endpoint + self.credential = credential + self.api_version = "2019-11-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) + kwargs.setdefault('sdk_moniker', 'purview-administration/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_purview_account_client.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_purview_account_client.py new file mode 100644 index 000000000000..a5520853c3e6 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_purview_account_client.py @@ -0,0 +1,103 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import TYPE_CHECKING + +from azure.core import PipelineClient +from msrest import Deserializer, Serializer + +from ._configuration import PurviewAccountClientConfiguration +from .operations import AccountsOperations, CollectionsOperations, ResourceSetRulesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Dict, Optional + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + +class PurviewAccountClient(object): + """Creates a Microsoft.Purview data plane account client. + + :ivar accounts: AccountsOperations operations + :vartype accounts: azure.purview.administration.account.operations.AccountsOperations + :ivar collections: CollectionsOperations operations + :vartype collections: azure.purview.administration.account.operations.CollectionsOperations + :ivar resource_set_rules: ResourceSetRulesOperations operations + :vartype resource_set_rules: + azure.purview.administration.account.operations.ResourceSetRulesOperations + :param endpoint: The account endpoint of your Purview account. Example: + https://{accountName}.purview.azure.com/account/. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + """ + + def __init__( + self, + endpoint, # type: str + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + _endpoint = '{endpoint}' + self._config = PurviewAccountClientConfiguration(endpoint, credential, **kwargs) + self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + self.accounts = AccountsOperations(self._client, self._config, self._serialize, self._deserialize) + self.collections = CollectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.resource_set_rules = ResourceSetRulesOperations(self._client, self._config, self._serialize, self._deserialize) + + + def send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> PurviewAccountClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_vendor.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/_version.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/__init__.py new file mode 100644 index 000000000000..774d140f5a52 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._microsoft_service_linker import MicrosoftServiceLinker +__all__ = ['MicrosoftServiceLinker'] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_configuration.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_configuration.py new file mode 100644 index 000000000000..b24a81bfaa07 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class PurviewAccountClientConfiguration(Configuration): + """Configuration for PurviewAccountClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: The account endpoint of your Purview account. Example: https://{accountName}.purview.azure.com/account/. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + """ + + def __init__( + self, + endpoint: str, + credential: "AsyncTokenCredential", + **kwargs: Any + ) -> None: + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + super(PurviewAccountClientConfiguration, self).__init__(**kwargs) + + self.endpoint = endpoint + self.credential = credential + self.api_version = "2019-11-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) + kwargs.setdefault('sdk_moniker', 'purview-administration/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_purview_account_client.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_purview_account_client.py new file mode 100644 index 000000000000..612425f842a5 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/_purview_account_client.py @@ -0,0 +1,98 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, Optional, TYPE_CHECKING + +from azure.core import AsyncPipelineClient +from azure.core.rest import AsyncHttpResponse, HttpRequest +from msrest import Deserializer, Serializer + +from ._configuration import PurviewAccountClientConfiguration +from .operations import AccountsOperations, CollectionsOperations, ResourceSetRulesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + from azure.core.credentials_async import AsyncTokenCredential + +class PurviewAccountClient: + """Creates a Microsoft.Purview data plane account client. + + :ivar accounts: AccountsOperations operations + :vartype accounts: azure.purview.administration.account.aio.operations.AccountsOperations + :ivar collections: CollectionsOperations operations + :vartype collections: azure.purview.administration.account.aio.operations.CollectionsOperations + :ivar resource_set_rules: ResourceSetRulesOperations operations + :vartype resource_set_rules: + azure.purview.administration.account.aio.operations.ResourceSetRulesOperations + :param endpoint: The account endpoint of your Purview account. Example: + https://{accountName}.purview.azure.com/account/. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + """ + + def __init__( + self, + endpoint: str, + credential: "AsyncTokenCredential", + **kwargs: Any + ) -> None: + _endpoint = '{endpoint}' + self._config = PurviewAccountClientConfiguration(endpoint, credential, **kwargs) + self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + self.accounts = AccountsOperations(self._client, self._config, self._serialize, self._deserialize) + self.collections = CollectionsOperations(self._client, self._config, self._serialize, self._deserialize) + self.resource_set_rules = ResourceSetRulesOperations(self._client, self._config, self._serialize, self._deserialize) + + + def send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "PurviewAccountClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/__init__.py new file mode 100644 index 000000000000..ae7fd0373d9b --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/__init__.py @@ -0,0 +1,17 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import AccountsOperations +from ._operations import CollectionsOperations +from ._operations import ResourceSetRulesOperations + +__all__ = [ + 'AccountsOperations', + 'CollectionsOperations', + 'ResourceSetRulesOperations', +] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/_operations.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/_operations.py new file mode 100644 index 000000000000..0e8eb5c31a36 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/aio/operations/_operations.py @@ -0,0 +1,1674 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 functools +from json import loads as _loads +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async + +from ..._vendor import _convert_request +from ...operations._operations import build_accounts_get_access_keys_request, build_accounts_get_account_properties_request, build_accounts_regenerate_access_key_request, build_accounts_update_account_properties_request, build_collections_create_or_update_collection_request, build_collections_delete_collection_request, build_collections_get_collection_path_request, build_collections_get_collection_request, build_collections_list_child_collection_names_request, build_collections_list_collections_request, build_resource_set_rules_create_or_update_resource_set_rule_request, build_resource_set_rules_delete_resource_set_rule_request, build_resource_set_rules_get_resource_set_rule_request, build_resource_set_rules_list_resource_set_rules_request + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class AccountsOperations: + """AccountsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get_account_properties( + self, + **kwargs: Any + ) -> Any: + """Get an account. + + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "id": "str", # Optional. Gets or sets the identifier. + "identity": { + "principalId": "str", # Optional. Service principal object Id. + "tenantId": "str", # Optional. Tenant Id. + "type": "SystemAssigned" # Optional. Default value is "SystemAssigned". Identity Type. Possible values include: "SystemAssigned". + }, + "location": "str", # Optional. Gets or sets the location. + "name": "str", # Optional. Gets or sets the name. + "properties": { + "cloudConnectors": { + "awsExternalId": "str" # Optional. AWS external identifier."nConfigured in AWS to allow use of the role arn used for scanning. + }, + "createdAt": "2020-02-20 00:00:00", # Optional. Gets the time at which the entity was created. + "createdBy": "str", # Optional. Gets the creator of the entity. + "createdByObjectId": "str", # Optional. Gets the creators of the entity's object id. + "endpoints": { + "catalog": "str", # Optional. Gets the catalog endpoint. + "guardian": "str", # Optional. Gets the guardian endpoint. + "scan": "str" # Optional. Gets the scan endpoint. + }, + "friendlyName": "str", # Optional. Gets or sets the friendly name. + "managedResourceGroupName": "str", # Optional. Gets or sets the managed resource group name. + "managedResources": { + "eventHubNamespace": "str", # Optional. Gets the managed event hub namespace resource identifier. + "resourceGroup": "str", # Optional. Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. + "storageAccount": "str" # Optional. Gets the managed storage account resource identifier. + }, + "privateEndpointConnections": [ + { + "id": "str", # Optional. Gets or sets the identifier. + "name": "str", # Optional. Gets or sets the name. + "properties": { + "privateEndpoint": { + "id": "str" # Optional. The private endpoint identifier. + }, + "privateLinkServiceConnectionState": { + "actionsRequired": "str", # Optional. The required actions. + "description": "str", # Optional. The description. + "status": "str" # Optional. The status. Possible values include: "Unknown", "Pending", "Approved", "Rejected", "Disconnected". + }, + "provisioningState": "str" # Optional. The provisioning state. + }, + "type": "str" # Optional. Gets or sets the type. + } + ], + "provisioningState": "str", # Optional. Gets or sets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", "Succeeded", "Canceled". + "publicNetworkAccess": "Enabled" # Optional. Default value is "Enabled". Gets or sets the public network access. Possible values include: "NotSpecified", "Enabled", "Disabled". Default value: "Enabled". + }, + "sku": { + "capacity": 0, # Optional. Gets or sets the sku capacity. Possible values include: 4, 16. + "name": "Standard" # Optional. Default value is "Standard". Gets or sets the sku name. Possible values include: "Standard". + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + }, + "tags": { + "str": "str" # Optional. A set of tags. Tags on the azure resource. + }, + "type": "str" # Optional. Gets or sets the type. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_accounts_get_account_properties_request( + template_url=self.get_account_properties.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_account_properties.metadata = {'url': '/'} # type: ignore + + + @distributed_trace_async + async def update_account_properties( + self, + account_update_parameters: Any, + **kwargs: Any + ) -> Any: + """Updates an account. + + :param account_update_parameters: + :type account_update_parameters: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + account_update_parameters = { + "friendlyName": "str" # Optional. The friendly name for the azure resource. + } + + # response body for status code(s): 200 + response.json() == { + "id": "str", # Optional. Gets or sets the identifier. + "identity": { + "principalId": "str", # Optional. Service principal object Id. + "tenantId": "str", # Optional. Tenant Id. + "type": "SystemAssigned" # Optional. Default value is "SystemAssigned". Identity Type. Possible values include: "SystemAssigned". + }, + "location": "str", # Optional. Gets or sets the location. + "name": "str", # Optional. Gets or sets the name. + "properties": { + "cloudConnectors": { + "awsExternalId": "str" # Optional. AWS external identifier."nConfigured in AWS to allow use of the role arn used for scanning. + }, + "createdAt": "2020-02-20 00:00:00", # Optional. Gets the time at which the entity was created. + "createdBy": "str", # Optional. Gets the creator of the entity. + "createdByObjectId": "str", # Optional. Gets the creators of the entity's object id. + "endpoints": { + "catalog": "str", # Optional. Gets the catalog endpoint. + "guardian": "str", # Optional. Gets the guardian endpoint. + "scan": "str" # Optional. Gets the scan endpoint. + }, + "friendlyName": "str", # Optional. Gets or sets the friendly name. + "managedResourceGroupName": "str", # Optional. Gets or sets the managed resource group name. + "managedResources": { + "eventHubNamespace": "str", # Optional. Gets the managed event hub namespace resource identifier. + "resourceGroup": "str", # Optional. Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. + "storageAccount": "str" # Optional. Gets the managed storage account resource identifier. + }, + "privateEndpointConnections": [ + { + "id": "str", # Optional. Gets or sets the identifier. + "name": "str", # Optional. Gets or sets the name. + "properties": { + "privateEndpoint": { + "id": "str" # Optional. The private endpoint identifier. + }, + "privateLinkServiceConnectionState": { + "actionsRequired": "str", # Optional. The required actions. + "description": "str", # Optional. The description. + "status": "str" # Optional. The status. Possible values include: "Unknown", "Pending", "Approved", "Rejected", "Disconnected". + }, + "provisioningState": "str" # Optional. The provisioning state. + }, + "type": "str" # Optional. Gets or sets the type. + } + ], + "provisioningState": "str", # Optional. Gets or sets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", "Succeeded", "Canceled". + "publicNetworkAccess": "Enabled" # Optional. Default value is "Enabled". Gets or sets the public network access. Possible values include: "NotSpecified", "Enabled", "Disabled". Default value: "Enabled". + }, + "sku": { + "capacity": 0, # Optional. Gets or sets the sku capacity. Possible values include: 4, 16. + "name": "Standard" # Optional. Default value is "Standard". Gets or sets the sku name. Possible values include: "Standard". + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + }, + "tags": { + "str": "str" # Optional. A set of tags. Tags on the azure resource. + }, + "type": "str" # Optional. Gets or sets the type. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = account_update_parameters + + request = build_accounts_update_account_properties_request( + content_type=content_type, + json=json, + template_url=self.update_account_properties.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_account_properties.metadata = {'url': '/'} # type: ignore + + + @distributed_trace_async + async def get_access_keys( + self, + **kwargs: Any + ) -> Any: + """List the authorization keys associated with this account. + + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "atlasKafkaPrimaryEndpoint": "str", # Optional. Gets or sets the primary connection string. + "atlasKafkaSecondaryEndpoint": "str" # Optional. Gets or sets the secondary connection string. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_accounts_get_access_keys_request( + template_url=self.get_access_keys.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_access_keys.metadata = {'url': '/listkeys'} # type: ignore + + + @distributed_trace_async + async def regenerate_access_key( + self, + key_options: Any, + **kwargs: Any + ) -> Any: + """Regenerate the authorization keys associated with this data catalog. + + :param key_options: + :type key_options: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + key_options = { + "keyType": "str" # Optional. The access key type. Possible values include: "PrimaryAtlasKafkaKey", "SecondaryAtlasKafkaKey". + } + + # response body for status code(s): 200 + response.json() == { + "atlasKafkaPrimaryEndpoint": "str", # Optional. Gets or sets the primary connection string. + "atlasKafkaSecondaryEndpoint": "str" # Optional. Gets or sets the secondary connection string. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = key_options + + request = build_accounts_regenerate_access_key_request( + content_type=content_type, + json=json, + template_url=self.regenerate_access_key.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + regenerate_access_key.metadata = {'url': '/regeneratekeys'} # type: ignore + +class CollectionsOperations: + """CollectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get_collection( + self, + collection_name: str, + **kwargs: Any + ) -> Any: + """Get a collection. + + :param collection_name: + :type collection_name: str + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded". + "description": "str", # Optional. Gets or sets the description. + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str", # Optional. Gets the name. + "parentCollection": { + "referenceName": "str", # Optional. Gets or sets the reference name. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property. + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + } + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_collections_get_collection_request( + collection_name=collection_name, + template_url=self.get_collection.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore + + + @distributed_trace_async + async def create_or_update_collection( + self, + collection_name: str, + collection: Any, + **kwargs: Any + ) -> Any: + """Creates or updates a collection entity. + + :param collection_name: + :type collection_name: str + :param collection: + :type collection: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + collection = { + "collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded". + "description": "str", # Optional. Gets or sets the description. + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str", # Optional. Gets the name. + "parentCollection": { + "referenceName": "str", # Optional. Gets or sets the reference name. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property. + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + } + } + + # response body for status code(s): 200 + response.json() == { + "collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded". + "description": "str", # Optional. Gets or sets the description. + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str", # Optional. Gets the name. + "parentCollection": { + "referenceName": "str", # Optional. Gets or sets the reference name. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property. + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + } + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = collection + + request = build_collections_create_or_update_collection_request( + collection_name=collection_name, + content_type=content_type, + json=json, + template_url=self.create_or_update_collection.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore + + + @distributed_trace_async + async def delete_collection( + self, + collection_name: str, + **kwargs: Any + ) -> None: + """Deletes a Collection entity. + + :param collection_name: + :type collection_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_collections_delete_collection_request( + collection_name=collection_name, + template_url=self.delete_collection.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + delete_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore + + + @distributed_trace + def list_collections( + self, + *, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable[Any]: + """List the collections in the account. + + :keyword skip_token: + :paramtype skip_token: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.async_paging.AsyncItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "count": 0.0, # Optional. Total item count. + "nextLink": "str", # Optional. The Url of next result page. + "value": [ + { + "collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded". + "description": "str", # Optional. Gets or sets the description. + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str", # Optional. Gets the name. + "parentCollection": { + "referenceName": "str", # Optional. Gets or sets the reference name. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property. + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + } + } + ] + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_collections_list_collections_request( + skip_token=skip_token, + template_url=self.list_collections.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_collections_list_collections_request( + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["value"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_collections.metadata = {'url': '/collections'} # type: ignore + + @distributed_trace + def list_child_collection_names( + self, + collection_name: str, + *, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable[Any]: + """Lists the child collections names in the collection. + + :param collection_name: + :type collection_name: str + :keyword skip_token: + :paramtype skip_token: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.async_paging.AsyncItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "count": 0.0, # Optional. Total item count. + "nextLink": "str", # Optional. The Url of next result page. + "value": [ + { + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str" # Optional. Gets the name. + } + ] + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_collections_list_child_collection_names_request( + collection_name=collection_name, + skip_token=skip_token, + template_url=self.list_child_collection_names.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_collections_list_child_collection_names_request( + collection_name=collection_name, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["value"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_child_collection_names.metadata = {'url': '/collections/{collectionName}/getChildCollectionNames'} # type: ignore + + @distributed_trace_async + async def get_collection_path( + self, + collection_name: str, + **kwargs: Any + ) -> Any: + """Gets the parent name and parent friendly name chains that represent the collection path. + + :param collection_name: + :type collection_name: str + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "parentFriendlyNameChain": [ + "str" # Optional. The friendly names of ancestors starting from the default (root) collection and ending with the immediate parent. + ], + "parentNameChain": [ + "str" # Optional. The names of ancestors starting from the default (root) collection and ending with the immediate parent. + ] + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_collections_get_collection_path_request( + collection_name=collection_name, + template_url=self.get_collection_path.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_collection_path.metadata = {'url': '/collections/{collectionName}/getCollectionPath'} # type: ignore + +class ResourceSetRulesOperations: + """ResourceSetRulesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace_async + async def get_resource_set_rule( + self, + **kwargs: Any + ) -> Any: + """Get a resource set config service model. + + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "advancedResourceSet": { + "modifiedAt": "2020-02-20 00:00:00", # Optional. Date at which ResourceSetProcessing property of the account is updated. + "resourceSetProcessing": "str" # Optional. The advanced resource property of the account. Possible values include: "Default", "Advanced". + }, + "name": "str", # Optional. The name of the rule. + "pathPatternConfig": { + "acceptedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "complexReplacers": [ + { + "createdBy": "str", # Optional. The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "str", # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "typeName": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "normalizationRules": [ + { + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "dynamicReplacement": bool, # Optional. The configuration rules for path pattern extraction. + "entityTypes": [ + "str" # Optional. The configuration rules for path pattern extraction. + ], + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str", # Optional. The configuration rules for path pattern extraction. + "version": 0.0 # Optional. The configuration rules for path pattern extraction. + } + ], + "regexReplacers": [ + { + "condition": "str", # Optional. The configuration rules for path pattern extraction. + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Required. + "doNotReplaceRegex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "rejectedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "scopedRules": [ + { + "bindingUrl": "str", # Required. + "rules": [ + { + "displayName": "str", # Optional. The configuration rules for path pattern extraction. + "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "qualifiedName": "str" # Required. + } + ], + "storeType": "str" # Required. + } + ], + "version": 0 # Optional. The configuration rules for path pattern extraction. + } + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_resource_set_rules_get_resource_set_rule_request( + template_url=self.get_resource_set_rule.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore + + + @distributed_trace_async + async def create_or_update_resource_set_rule( + self, + resource_set_rule_config: Any, + **kwargs: Any + ) -> Any: + """Creates or updates an resource set config. + + :param resource_set_rule_config: + :type resource_set_rule_config: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + resource_set_rule_config = { + "advancedResourceSet": { + "modifiedAt": "2020-02-20 00:00:00", # Optional. Date at which ResourceSetProcessing property of the account is updated. + "resourceSetProcessing": "str" # Optional. The advanced resource property of the account. Possible values include: "Default", "Advanced". + }, + "name": "str", # Optional. The name of the rule. + "pathPatternConfig": { + "acceptedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "complexReplacers": [ + { + "createdBy": "str", # Optional. The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "str", # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "typeName": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "normalizationRules": [ + { + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "dynamicReplacement": bool, # Optional. The configuration rules for path pattern extraction. + "entityTypes": [ + "str" # Optional. The configuration rules for path pattern extraction. + ], + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str", # Optional. The configuration rules for path pattern extraction. + "version": 0.0 # Optional. The configuration rules for path pattern extraction. + } + ], + "regexReplacers": [ + { + "condition": "str", # Optional. The configuration rules for path pattern extraction. + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Required. + "doNotReplaceRegex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "rejectedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "scopedRules": [ + { + "bindingUrl": "str", # Required. + "rules": [ + { + "displayName": "str", # Optional. The configuration rules for path pattern extraction. + "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "qualifiedName": "str" # Required. + } + ], + "storeType": "str" # Required. + } + ], + "version": 0 # Optional. The configuration rules for path pattern extraction. + } + } + + # response body for status code(s): 200 + response.json() == { + "advancedResourceSet": { + "modifiedAt": "2020-02-20 00:00:00", # Optional. Date at which ResourceSetProcessing property of the account is updated. + "resourceSetProcessing": "str" # Optional. The advanced resource property of the account. Possible values include: "Default", "Advanced". + }, + "name": "str", # Optional. The name of the rule. + "pathPatternConfig": { + "acceptedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "complexReplacers": [ + { + "createdBy": "str", # Optional. The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "str", # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "typeName": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "normalizationRules": [ + { + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "dynamicReplacement": bool, # Optional. The configuration rules for path pattern extraction. + "entityTypes": [ + "str" # Optional. The configuration rules for path pattern extraction. + ], + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str", # Optional. The configuration rules for path pattern extraction. + "version": 0.0 # Optional. The configuration rules for path pattern extraction. + } + ], + "regexReplacers": [ + { + "condition": "str", # Optional. The configuration rules for path pattern extraction. + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Required. + "doNotReplaceRegex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "rejectedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "scopedRules": [ + { + "bindingUrl": "str", # Required. + "rules": [ + { + "displayName": "str", # Optional. The configuration rules for path pattern extraction. + "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "qualifiedName": "str" # Required. + } + ], + "storeType": "str" # Required. + } + ], + "version": 0 # Optional. The configuration rules for path pattern extraction. + } + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = resource_set_rule_config + + request = build_resource_set_rules_create_or_update_resource_set_rule_request( + content_type=content_type, + json=json, + template_url=self.create_or_update_resource_set_rule.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore + + + @distributed_trace_async + async def delete_resource_set_rule( + self, + **kwargs: Any + ) -> None: + """Deletes a ResourceSetRuleConfig resource. + + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_resource_set_rules_delete_resource_set_rule_request( + template_url=self.delete_resource_set_rule.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + delete_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore + + + @distributed_trace + def list_resource_set_rules( + self, + *, + skip_token: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable[Any]: + """Get a resource set config service model. + + :keyword skip_token: + :paramtype skip_token: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.async_paging.AsyncItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "count": 0.0, # Optional. Total item count. + "nextLink": "str", # Optional. The Url of next result page. + "value": [ + { + "advancedResourceSet": { + "modifiedAt": "2020-02-20 00:00:00", # Optional. Date at which ResourceSetProcessing property of the account is updated. + "resourceSetProcessing": "str" # Optional. The advanced resource property of the account. Possible values include: "Default", "Advanced". + }, + "name": "str", # Optional. The name of the rule. + "pathPatternConfig": { + "acceptedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "complexReplacers": [ + { + "createdBy": "str", # Optional. The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "str", # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "typeName": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "normalizationRules": [ + { + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "dynamicReplacement": bool, # Optional. The configuration rules for path pattern extraction. + "entityTypes": [ + "str" # Optional. The configuration rules for path pattern extraction. + ], + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str", # Optional. The configuration rules for path pattern extraction. + "version": 0.0 # Optional. The configuration rules for path pattern extraction. + } + ], + "regexReplacers": [ + { + "condition": "str", # Optional. The configuration rules for path pattern extraction. + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Required. + "doNotReplaceRegex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "rejectedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "scopedRules": [ + { + "bindingUrl": "str", # Required. + "rules": [ + { + "displayName": "str", # Optional. The configuration rules for path pattern extraction. + "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "qualifiedName": "str" # Required. + } + ], + "storeType": "str" # Required. + } + ], + "version": 0 # Optional. The configuration rules for path pattern extraction. + } + } + ] + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_resource_set_rules_list_resource_set_rules_request( + skip_token=skip_token, + template_url=self.list_resource_set_rules.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_resource_set_rules_list_resource_set_rules_request( + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["value"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_resource_set_rules.metadata = {'url': '/resourceSetRuleConfigs'} # type: ignore diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/__init__.py new file mode 100644 index 000000000000..ae7fd0373d9b --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/__init__.py @@ -0,0 +1,17 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import AccountsOperations +from ._operations import CollectionsOperations +from ._operations import ResourceSetRulesOperations + +__all__ = [ + 'AccountsOperations', + 'CollectionsOperations', + 'ResourceSetRulesOperations', +] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/_operations.py b/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/_operations.py new file mode 100644 index 000000000000..9a08329942ea --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/operations/_operations.py @@ -0,0 +1,2116 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 functools +from json import loads as _loads +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer + +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +# fmt: off + +def build_accounts_get_account_properties_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_accounts_update_account_properties_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PATCH", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_accounts_get_access_keys_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/listkeys') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_accounts_regenerate_access_key_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/regeneratekeys') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_collections_get_collection_request( + collection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/collections/{collectionName}') + path_format_arguments = { + "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_collections_create_or_update_collection_request( + collection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/collections/{collectionName}') + path_format_arguments = { + "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_collections_delete_collection_request( + collection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/collections/{collectionName}') + path_format_arguments = { + "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_collections_list_collections_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/collections') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_collections_list_child_collection_names_request( + collection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/collections/{collectionName}/getChildCollectionNames') + path_format_arguments = { + "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_collections_get_collection_path_request( + collection_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/collections/{collectionName}/getCollectionPath') + path_format_arguments = { + "collectionName": _SERIALIZER.url("collection_name", collection_name, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_resource_set_rules_get_resource_set_rule_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/resourceSetRuleConfigs/defaultResourceSetRuleConfig') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_resource_set_rules_create_or_update_resource_set_rule_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/resourceSetRuleConfigs/defaultResourceSetRuleConfig') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_resource_set_rules_delete_resource_set_rule_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/resourceSetRuleConfigs/defaultResourceSetRuleConfig') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_resource_set_rules_list_resource_set_rules_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + api_version = "2019-11-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/resourceSetRuleConfigs') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + if skip_token is not None: + query_parameters['$skipToken'] = _SERIALIZER.query("skip_token", skip_token, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class AccountsOperations(object): + """AccountsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get_account_properties( + self, + **kwargs # type: Any + ): + # type: (...) -> Any + """Get an account. + + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "id": "str", # Optional. Gets or sets the identifier. + "identity": { + "principalId": "str", # Optional. Service principal object Id. + "tenantId": "str", # Optional. Tenant Id. + "type": "SystemAssigned" # Optional. Default value is "SystemAssigned". Identity Type. Possible values include: "SystemAssigned". + }, + "location": "str", # Optional. Gets or sets the location. + "name": "str", # Optional. Gets or sets the name. + "properties": { + "cloudConnectors": { + "awsExternalId": "str" # Optional. AWS external identifier."nConfigured in AWS to allow use of the role arn used for scanning. + }, + "createdAt": "2020-02-20 00:00:00", # Optional. Gets the time at which the entity was created. + "createdBy": "str", # Optional. Gets the creator of the entity. + "createdByObjectId": "str", # Optional. Gets the creators of the entity's object id. + "endpoints": { + "catalog": "str", # Optional. Gets the catalog endpoint. + "guardian": "str", # Optional. Gets the guardian endpoint. + "scan": "str" # Optional. Gets the scan endpoint. + }, + "friendlyName": "str", # Optional. Gets or sets the friendly name. + "managedResourceGroupName": "str", # Optional. Gets or sets the managed resource group name. + "managedResources": { + "eventHubNamespace": "str", # Optional. Gets the managed event hub namespace resource identifier. + "resourceGroup": "str", # Optional. Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. + "storageAccount": "str" # Optional. Gets the managed storage account resource identifier. + }, + "privateEndpointConnections": [ + { + "id": "str", # Optional. Gets or sets the identifier. + "name": "str", # Optional. Gets or sets the name. + "properties": { + "privateEndpoint": { + "id": "str" # Optional. The private endpoint identifier. + }, + "privateLinkServiceConnectionState": { + "actionsRequired": "str", # Optional. The required actions. + "description": "str", # Optional. The description. + "status": "str" # Optional. The status. Possible values include: "Unknown", "Pending", "Approved", "Rejected", "Disconnected". + }, + "provisioningState": "str" # Optional. The provisioning state. + }, + "type": "str" # Optional. Gets or sets the type. + } + ], + "provisioningState": "str", # Optional. Gets or sets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", "Succeeded", "Canceled". + "publicNetworkAccess": "Enabled" # Optional. Default value is "Enabled". Gets or sets the public network access. Possible values include: "NotSpecified", "Enabled", "Disabled". Default value: "Enabled". + }, + "sku": { + "capacity": 0, # Optional. Gets or sets the sku capacity. Possible values include: 4, 16. + "name": "Standard" # Optional. Default value is "Standard". Gets or sets the sku name. Possible values include: "Standard". + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + }, + "tags": { + "str": "str" # Optional. A set of tags. Tags on the azure resource. + }, + "type": "str" # Optional. Gets or sets the type. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_accounts_get_account_properties_request( + template_url=self.get_account_properties.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_account_properties.metadata = {'url': '/'} # type: ignore + + + @distributed_trace + def update_account_properties( + self, + account_update_parameters, # type: Any + **kwargs # type: Any + ): + # type: (...) -> Any + """Updates an account. + + :param account_update_parameters: + :type account_update_parameters: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + account_update_parameters = { + "friendlyName": "str" # Optional. The friendly name for the azure resource. + } + + # response body for status code(s): 200 + response.json() == { + "id": "str", # Optional. Gets or sets the identifier. + "identity": { + "principalId": "str", # Optional. Service principal object Id. + "tenantId": "str", # Optional. Tenant Id. + "type": "SystemAssigned" # Optional. Default value is "SystemAssigned". Identity Type. Possible values include: "SystemAssigned". + }, + "location": "str", # Optional. Gets or sets the location. + "name": "str", # Optional. Gets or sets the name. + "properties": { + "cloudConnectors": { + "awsExternalId": "str" # Optional. AWS external identifier."nConfigured in AWS to allow use of the role arn used for scanning. + }, + "createdAt": "2020-02-20 00:00:00", # Optional. Gets the time at which the entity was created. + "createdBy": "str", # Optional. Gets the creator of the entity. + "createdByObjectId": "str", # Optional. Gets the creators of the entity's object id. + "endpoints": { + "catalog": "str", # Optional. Gets the catalog endpoint. + "guardian": "str", # Optional. Gets the guardian endpoint. + "scan": "str" # Optional. Gets the scan endpoint. + }, + "friendlyName": "str", # Optional. Gets or sets the friendly name. + "managedResourceGroupName": "str", # Optional. Gets or sets the managed resource group name. + "managedResources": { + "eventHubNamespace": "str", # Optional. Gets the managed event hub namespace resource identifier. + "resourceGroup": "str", # Optional. Gets the managed resource group resource identifier. This resource group will host resource dependencies for the account. + "storageAccount": "str" # Optional. Gets the managed storage account resource identifier. + }, + "privateEndpointConnections": [ + { + "id": "str", # Optional. Gets or sets the identifier. + "name": "str", # Optional. Gets or sets the name. + "properties": { + "privateEndpoint": { + "id": "str" # Optional. The private endpoint identifier. + }, + "privateLinkServiceConnectionState": { + "actionsRequired": "str", # Optional. The required actions. + "description": "str", # Optional. The description. + "status": "str" # Optional. The status. Possible values include: "Unknown", "Pending", "Approved", "Rejected", "Disconnected". + }, + "provisioningState": "str" # Optional. The provisioning state. + }, + "type": "str" # Optional. Gets or sets the type. + } + ], + "provisioningState": "str", # Optional. Gets or sets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "SoftDeleting", "SoftDeleted", "Failed", "Succeeded", "Canceled". + "publicNetworkAccess": "Enabled" # Optional. Default value is "Enabled". Gets or sets the public network access. Possible values include: "NotSpecified", "Enabled", "Disabled". Default value: "Enabled". + }, + "sku": { + "capacity": 0, # Optional. Gets or sets the sku capacity. Possible values include: 4, 16. + "name": "Standard" # Optional. Default value is "Standard". Gets or sets the sku name. Possible values include: "Standard". + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + }, + "tags": { + "str": "str" # Optional. A set of tags. Tags on the azure resource. + }, + "type": "str" # Optional. Gets or sets the type. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = account_update_parameters + + request = build_accounts_update_account_properties_request( + content_type=content_type, + json=json, + template_url=self.update_account_properties.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update_account_properties.metadata = {'url': '/'} # type: ignore + + + @distributed_trace + def get_access_keys( + self, + **kwargs # type: Any + ): + # type: (...) -> Any + """List the authorization keys associated with this account. + + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "atlasKafkaPrimaryEndpoint": "str", # Optional. Gets or sets the primary connection string. + "atlasKafkaSecondaryEndpoint": "str" # Optional. Gets or sets the secondary connection string. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_accounts_get_access_keys_request( + template_url=self.get_access_keys.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_access_keys.metadata = {'url': '/listkeys'} # type: ignore + + + @distributed_trace + def regenerate_access_key( + self, + key_options, # type: Any + **kwargs # type: Any + ): + # type: (...) -> Any + """Regenerate the authorization keys associated with this data catalog. + + :param key_options: + :type key_options: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + key_options = { + "keyType": "str" # Optional. The access key type. Possible values include: "PrimaryAtlasKafkaKey", "SecondaryAtlasKafkaKey". + } + + # response body for status code(s): 200 + response.json() == { + "atlasKafkaPrimaryEndpoint": "str", # Optional. Gets or sets the primary connection string. + "atlasKafkaSecondaryEndpoint": "str" # Optional. Gets or sets the secondary connection string. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = key_options + + request = build_accounts_regenerate_access_key_request( + content_type=content_type, + json=json, + template_url=self.regenerate_access_key.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + regenerate_access_key.metadata = {'url': '/regeneratekeys'} # type: ignore + +class CollectionsOperations(object): + """CollectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get_collection( + self, + collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Any + """Get a collection. + + :param collection_name: + :type collection_name: str + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded". + "description": "str", # Optional. Gets or sets the description. + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str", # Optional. Gets the name. + "parentCollection": { + "referenceName": "str", # Optional. Gets or sets the reference name. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property. + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + } + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_collections_get_collection_request( + collection_name=collection_name, + template_url=self.get_collection.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore + + + @distributed_trace + def create_or_update_collection( + self, + collection_name, # type: str + collection, # type: Any + **kwargs # type: Any + ): + # type: (...) -> Any + """Creates or updates a collection entity. + + :param collection_name: + :type collection_name: str + :param collection: + :type collection: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + collection = { + "collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded". + "description": "str", # Optional. Gets or sets the description. + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str", # Optional. Gets the name. + "parentCollection": { + "referenceName": "str", # Optional. Gets or sets the reference name. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property. + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + } + } + + # response body for status code(s): 200 + response.json() == { + "collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded". + "description": "str", # Optional. Gets or sets the description. + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str", # Optional. Gets the name. + "parentCollection": { + "referenceName": "str", # Optional. Gets or sets the reference name. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property. + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + } + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = collection + + request = build_collections_create_or_update_collection_request( + collection_name=collection_name, + content_type=content_type, + json=json, + template_url=self.create_or_update_collection.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore + + + @distributed_trace + def delete_collection( + self, + collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a Collection entity. + + :param collection_name: + :type collection_name: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_collections_delete_collection_request( + collection_name=collection_name, + template_url=self.delete_collection.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + delete_collection.metadata = {'url': '/collections/{collectionName}'} # type: ignore + + + @distributed_trace + def list_collections( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable[Any] + """List the collections in the account. + + :keyword skip_token: + :paramtype skip_token: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.paging.ItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "count": 0.0, # Optional. Total item count. + "nextLink": "str", # Optional. The Url of next result page. + "value": [ + { + "collectionProvisioningState": "str", # Optional. Gets the state of the provisioning. Possible values include: "Unknown", "Creating", "Moving", "Deleting", "Failed", "Succeeded". + "description": "str", # Optional. Gets or sets the description. + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str", # Optional. Gets the name. + "parentCollection": { + "referenceName": "str", # Optional. Gets or sets the reference name. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". Gets or sets the reference type property. + }, + "systemData": { + "createdAt": "2020-02-20 00:00:00", # Optional. The timestamp of resource creation (UTC). + "createdBy": "str", # Optional. The identity that created the resource. + "createdByType": "str", # Optional. The type of identity that created the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + "lastModifiedAt": "2020-02-20 00:00:00", # Optional. The timestamp of the last modification the resource (UTC). + "lastModifiedBy": "str", # Optional. The identity that last modified the resource. + "lastModifiedByType": "str" # Optional. The type of identity that last modified the resource. Possible values include: "User", "Application", "ManagedIdentity", "Key". + } + } + ] + } + """ + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_collections_list_collections_request( + skip_token=skip_token, + template_url=self.list_collections.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_collections_list_collections_request( + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["value"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_collections.metadata = {'url': '/collections'} # type: ignore + + @distributed_trace + def list_child_collection_names( + self, + collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable[Any] + """Lists the child collections names in the collection. + + :param collection_name: + :type collection_name: str + :keyword skip_token: + :paramtype skip_token: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.paging.ItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "count": 0.0, # Optional. Total item count. + "nextLink": "str", # Optional. The Url of next result page. + "value": [ + { + "friendlyName": "str", # Optional. Gets or sets the friendly name of the collection. + "name": "str" # Optional. Gets the name. + } + ] + } + """ + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_collections_list_child_collection_names_request( + collection_name=collection_name, + skip_token=skip_token, + template_url=self.list_child_collection_names.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_collections_list_child_collection_names_request( + collection_name=collection_name, + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["value"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_child_collection_names.metadata = {'url': '/collections/{collectionName}/getChildCollectionNames'} # type: ignore + + @distributed_trace + def get_collection_path( + self, + collection_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Any + """Gets the parent name and parent friendly name chains that represent the collection path. + + :param collection_name: + :type collection_name: str + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "parentFriendlyNameChain": [ + "str" # Optional. The friendly names of ancestors starting from the default (root) collection and ending with the immediate parent. + ], + "parentNameChain": [ + "str" # Optional. The names of ancestors starting from the default (root) collection and ending with the immediate parent. + ] + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_collections_get_collection_path_request( + collection_name=collection_name, + template_url=self.get_collection_path.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_collection_path.metadata = {'url': '/collections/{collectionName}/getCollectionPath'} # type: ignore + +class ResourceSetRulesOperations(object): + """ResourceSetRulesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def get_resource_set_rule( + self, + **kwargs # type: Any + ): + # type: (...) -> Any + """Get a resource set config service model. + + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "advancedResourceSet": { + "modifiedAt": "2020-02-20 00:00:00", # Optional. Date at which ResourceSetProcessing property of the account is updated. + "resourceSetProcessing": "str" # Optional. The advanced resource property of the account. Possible values include: "Default", "Advanced". + }, + "name": "str", # Optional. The name of the rule. + "pathPatternConfig": { + "acceptedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "complexReplacers": [ + { + "createdBy": "str", # Optional. The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "str", # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "typeName": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "normalizationRules": [ + { + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "dynamicReplacement": bool, # Optional. The configuration rules for path pattern extraction. + "entityTypes": [ + "str" # Optional. The configuration rules for path pattern extraction. + ], + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str", # Optional. The configuration rules for path pattern extraction. + "version": 0.0 # Optional. The configuration rules for path pattern extraction. + } + ], + "regexReplacers": [ + { + "condition": "str", # Optional. The configuration rules for path pattern extraction. + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Required. + "doNotReplaceRegex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "rejectedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "scopedRules": [ + { + "bindingUrl": "str", # Required. + "rules": [ + { + "displayName": "str", # Optional. The configuration rules for path pattern extraction. + "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "qualifiedName": "str" # Required. + } + ], + "storeType": "str" # Required. + } + ], + "version": 0 # Optional. The configuration rules for path pattern extraction. + } + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_resource_set_rules_get_resource_set_rule_request( + template_url=self.get_resource_set_rule.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore + + + @distributed_trace + def create_or_update_resource_set_rule( + self, + resource_set_rule_config, # type: Any + **kwargs # type: Any + ): + # type: (...) -> Any + """Creates or updates an resource set config. + + :param resource_set_rule_config: + :type resource_set_rule_config: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + resource_set_rule_config = { + "advancedResourceSet": { + "modifiedAt": "2020-02-20 00:00:00", # Optional. Date at which ResourceSetProcessing property of the account is updated. + "resourceSetProcessing": "str" # Optional. The advanced resource property of the account. Possible values include: "Default", "Advanced". + }, + "name": "str", # Optional. The name of the rule. + "pathPatternConfig": { + "acceptedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "complexReplacers": [ + { + "createdBy": "str", # Optional. The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "str", # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "typeName": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "normalizationRules": [ + { + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "dynamicReplacement": bool, # Optional. The configuration rules for path pattern extraction. + "entityTypes": [ + "str" # Optional. The configuration rules for path pattern extraction. + ], + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str", # Optional. The configuration rules for path pattern extraction. + "version": 0.0 # Optional. The configuration rules for path pattern extraction. + } + ], + "regexReplacers": [ + { + "condition": "str", # Optional. The configuration rules for path pattern extraction. + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Required. + "doNotReplaceRegex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "rejectedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "scopedRules": [ + { + "bindingUrl": "str", # Required. + "rules": [ + { + "displayName": "str", # Optional. The configuration rules for path pattern extraction. + "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "qualifiedName": "str" # Required. + } + ], + "storeType": "str" # Required. + } + ], + "version": 0 # Optional. The configuration rules for path pattern extraction. + } + } + + # response body for status code(s): 200 + response.json() == { + "advancedResourceSet": { + "modifiedAt": "2020-02-20 00:00:00", # Optional. Date at which ResourceSetProcessing property of the account is updated. + "resourceSetProcessing": "str" # Optional. The advanced resource property of the account. Possible values include: "Default", "Advanced". + }, + "name": "str", # Optional. The name of the rule. + "pathPatternConfig": { + "acceptedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "complexReplacers": [ + { + "createdBy": "str", # Optional. The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "str", # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "typeName": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "normalizationRules": [ + { + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "dynamicReplacement": bool, # Optional. The configuration rules for path pattern extraction. + "entityTypes": [ + "str" # Optional. The configuration rules for path pattern extraction. + ], + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str", # Optional. The configuration rules for path pattern extraction. + "version": 0.0 # Optional. The configuration rules for path pattern extraction. + } + ], + "regexReplacers": [ + { + "condition": "str", # Optional. The configuration rules for path pattern extraction. + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Required. + "doNotReplaceRegex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "rejectedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "scopedRules": [ + { + "bindingUrl": "str", # Required. + "rules": [ + { + "displayName": "str", # Optional. The configuration rules for path pattern extraction. + "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "qualifiedName": "str" # Required. + } + ], + "storeType": "str" # Required. + } + ], + "version": 0 # Optional. The configuration rules for path pattern extraction. + } + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = resource_set_rule_config + + request = build_resource_set_rules_create_or_update_resource_set_rule_request( + content_type=content_type, + json=json, + template_url=self.create_or_update_resource_set_rule.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + create_or_update_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore + + + @distributed_trace + def delete_resource_set_rule( + self, + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a ResourceSetRuleConfig resource. + + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_resource_set_rules_delete_resource_set_rule_request( + template_url=self.delete_resource_set_rule.metadata['url'], + ) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + delete_resource_set_rule.metadata = {'url': '/resourceSetRuleConfigs/defaultResourceSetRuleConfig'} # type: ignore + + + @distributed_trace + def list_resource_set_rules( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable[Any] + """Get a resource set config service model. + + :keyword skip_token: + :paramtype skip_token: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.paging.ItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "count": 0.0, # Optional. Total item count. + "nextLink": "str", # Optional. The Url of next result page. + "value": [ + { + "advancedResourceSet": { + "modifiedAt": "2020-02-20 00:00:00", # Optional. Date at which ResourceSetProcessing property of the account is updated. + "resourceSetProcessing": "str" # Optional. The advanced resource property of the account. Possible values include: "Default", "Advanced". + }, + "name": "str", # Optional. The name of the rule. + "pathPatternConfig": { + "acceptedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "complexReplacers": [ + { + "createdBy": "str", # Optional. The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "str", # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "typeName": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "createdBy": "str", # Required. + "enableDefaultPatterns": bool, # Required. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "normalizationRules": [ + { + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Optional. The configuration rules for path pattern extraction. + "dynamicReplacement": bool, # Optional. The configuration rules for path pattern extraction. + "entityTypes": [ + "str" # Optional. The configuration rules for path pattern extraction. + ], + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str", # Optional. The configuration rules for path pattern extraction. + "version": 0.0 # Optional. The configuration rules for path pattern extraction. + } + ], + "regexReplacers": [ + { + "condition": "str", # Optional. The configuration rules for path pattern extraction. + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "description": "str", # Optional. The configuration rules for path pattern extraction. + "disableRecursiveReplacerApplication": bool, # Optional. The configuration rules for path pattern extraction. + "disabled": bool, # Required. + "doNotReplaceRegex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "regex": { + "maxDigits": 0, # Optional. The configuration rules for path pattern extraction. + "maxLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDashes": 0, # Optional. The configuration rules for path pattern extraction. + "minDigits": 0, # Optional. The configuration rules for path pattern extraction. + "minDigitsOrLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minDots": 0, # Optional. The configuration rules for path pattern extraction. + "minHex": 0, # Optional. The configuration rules for path pattern extraction. + "minLetters": 0, # Optional. The configuration rules for path pattern extraction. + "minUnderscores": 0, # Optional. The configuration rules for path pattern extraction. + "options": 0, # Optional. The configuration rules for path pattern extraction. + "regexStr": "str" # Optional. The configuration rules for path pattern extraction. + }, + "replaceWith": "str" # Optional. The configuration rules for path pattern extraction. + } + ], + "rejectedPatterns": [ + { + "createdBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "filterType": "Pattern", # Optional. Default value is "Pattern". Possible values include: "Pattern", "Regex". Default value: "Pattern". + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "modifiedBy": "AzureDataCatalog", # Optional. Default value is "AzureDataCatalog". The configuration rules for path pattern extraction. + "name": "str", # Required. + "path": "str" # Required. + } + ], + "scopedRules": [ + { + "bindingUrl": "str", # Required. + "rules": [ + { + "displayName": "str", # Optional. The configuration rules for path pattern extraction. + "isResourceSet": True, # Optional. Default value is True. The configuration rules for path pattern extraction. + "lastUpdatedTimestamp": 0.0, # Optional. The configuration rules for path pattern extraction. + "name": "str", # Optional. The configuration rules for path pattern extraction. + "qualifiedName": "str" # Required. + } + ], + "storeType": "str" # Required. + } + ], + "version": 0 # Optional. The configuration rules for path pattern extraction. + } + } + ] + } + """ + skip_token = kwargs.pop('skip_token', None) # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_resource_set_rules_list_resource_set_rules_request( + skip_token=skip_token, + template_url=self.list_resource_set_rules.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_resource_set_rules_list_resource_set_rules_request( + skip_token=skip_token, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["value"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_resource_set_rules.metadata = {'url': '/resourceSetRuleConfigs'} # type: ignore diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/account/py.typed b/sdk/purview/azure-purview-administration/azure/purview/administration/account/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/account/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/__init__.py new file mode 100644 index 000000000000..354f986dae6d --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._purview_metadata_policies_client import PurviewMetadataPoliciesClient +from ._version import VERSION + +__version__ = VERSION +__all__ = ['PurviewMetadataPoliciesClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_configuration.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_configuration.py new file mode 100644 index 000000000000..4e9cf8fe48ec --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_configuration.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class PurviewMetadataPoliciesClientConfiguration(Configuration): + """Configuration for PurviewMetadataPoliciesClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: The endpoint of your Purview account. Example: https://{accountName}.purview.azure.com. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + """ + + def __init__( + self, + endpoint, # type: str + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + super(PurviewMetadataPoliciesClientConfiguration, self).__init__(**kwargs) + + self.endpoint = endpoint + self.credential = credential + self.api_version = "2021-07-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) + kwargs.setdefault('sdk_moniker', 'purview-administration/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_purview_metadata_policies_client.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_purview_metadata_policies_client.py new file mode 100644 index 000000000000..c6d5dff382dd --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_purview_metadata_policies_client.py @@ -0,0 +1,101 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import TYPE_CHECKING + +from azure.core import PipelineClient +from msrest import Deserializer, Serializer + +from ._configuration import PurviewMetadataPoliciesClientConfiguration +from .operations import MetadataPolicyOperations, MetadataRolesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Dict, Optional + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + +class PurviewMetadataPoliciesClient(object): + """PurviewMetadataPoliciesClient. + + :ivar metadata_roles: MetadataRolesOperations operations + :vartype metadata_roles: + azure.purview.administration.metadatapolicies.operations.MetadataRolesOperations + :ivar metadata_policy: MetadataPolicyOperations operations + :vartype metadata_policy: + azure.purview.administration.metadatapolicies.operations.MetadataPolicyOperations + :param endpoint: The endpoint of your Purview account. Example: + https://{accountName}.purview.azure.com. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + """ + + def __init__( + self, + endpoint, # type: str + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + _endpoint = '{Endpoint}/policyStore' + self._config = PurviewMetadataPoliciesClientConfiguration(endpoint, credential, **kwargs) + self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + self.metadata_roles = MetadataRolesOperations(self._client, self._config, self._serialize, self._deserialize) + self.metadata_policy = MetadataPolicyOperations(self._client, self._config, self._serialize, self._deserialize) + + + def send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> PurviewMetadataPoliciesClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_vendor.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_version.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/__init__.py new file mode 100644 index 000000000000..3afd8b91b730 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._purview_metadata_policies_client import PurviewMetadataPoliciesClient +__all__ = ['PurviewMetadataPoliciesClient'] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_configuration.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_configuration.py new file mode 100644 index 000000000000..c1de758cd465 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_configuration.py @@ -0,0 +1,66 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class PurviewMetadataPoliciesClientConfiguration(Configuration): + """Configuration for PurviewMetadataPoliciesClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: The endpoint of your Purview account. Example: https://{accountName}.purview.azure.com. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + """ + + def __init__( + self, + endpoint: str, + credential: "AsyncTokenCredential", + **kwargs: Any + ) -> None: + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + super(PurviewMetadataPoliciesClientConfiguration, self).__init__(**kwargs) + + self.endpoint = endpoint + self.credential = credential + self.api_version = "2021-07-01-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) + kwargs.setdefault('sdk_moniker', 'purview-administration/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_purview_metadata_policies_client.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_purview_metadata_policies_client.py new file mode 100644 index 000000000000..ff807921b6a8 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/_purview_metadata_policies_client.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, Optional, TYPE_CHECKING + +from azure.core import AsyncPipelineClient +from azure.core.rest import AsyncHttpResponse, HttpRequest +from msrest import Deserializer, Serializer + +from ._configuration import PurviewMetadataPoliciesClientConfiguration +from .operations import MetadataPolicyOperations, MetadataRolesOperations + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + from azure.core.credentials_async import AsyncTokenCredential + +class PurviewMetadataPoliciesClient: + """PurviewMetadataPoliciesClient. + + :ivar metadata_roles: MetadataRolesOperations operations + :vartype metadata_roles: + azure.purview.administration.metadatapolicies.aio.operations.MetadataRolesOperations + :ivar metadata_policy: MetadataPolicyOperations operations + :vartype metadata_policy: + azure.purview.administration.metadatapolicies.aio.operations.MetadataPolicyOperations + :param endpoint: The endpoint of your Purview account. Example: + https://{accountName}.purview.azure.com. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + """ + + def __init__( + self, + endpoint: str, + credential: "AsyncTokenCredential", + **kwargs: Any + ) -> None: + _endpoint = '{Endpoint}/policyStore' + self._config = PurviewMetadataPoliciesClientConfiguration(endpoint, credential, **kwargs) + self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + self.metadata_roles = MetadataRolesOperations(self._client, self._config, self._serialize, self._deserialize) + self.metadata_policy = MetadataPolicyOperations(self._client, self._config, self._serialize, self._deserialize) + + + def send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "PurviewMetadataPoliciesClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/__init__.py new file mode 100644 index 000000000000..2e16550e3e30 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import MetadataRolesOperations +from ._operations import MetadataPolicyOperations + +__all__ = [ + 'MetadataRolesOperations', + 'MetadataPolicyOperations', +] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/_operations.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/_operations.py new file mode 100644 index 000000000000..dbeb3d8bff36 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/aio/operations/_operations.py @@ -0,0 +1,616 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 functools +from json import loads as _loads +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async + +from ..._vendor import _convert_request +from ...operations._operations import build_metadata_policy_get_request, build_metadata_policy_list_all_request, build_metadata_policy_update_request, build_metadata_roles_list_request + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class MetadataRolesOperations: + """MetadataRolesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs: Any + ) -> AsyncIterable[Any]: + """Lists roles for Purview Account. + + :return: An iterator like instance of JSON object + :rtype: ~azure.core.async_paging.AsyncItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "nextLink": "str", # Optional. + "values": [ + { + "id": "str", # Optional. The Id of role. + "name": "str", # Optional. The name of role. + "properties": { + "cnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "description": "str", # Optional. The description of role. + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "friendlyName": "str", # Optional. The friendly name of role. + "provisioningState": "str", # Optional. The provisioningState of role. + "roleType": "str", # Optional. The type of role. + "version": 0.0 # Optional. The version of role. + }, + "type": "str" # Optional. The type of role. + } + ] + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_metadata_roles_list_request( + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_metadata_roles_list_request( + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["values"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/metadataRoles'} # type: ignore +class MetadataPolicyOperations: + """MetadataPolicyOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_all( + self, + *, + collection_name: Optional[str] = None, + **kwargs: Any + ) -> AsyncIterable[Any]: + """List or Get metadata policies. + + :keyword collection_name: The name of an existing collection for which one policy needs to be + fetched. + :paramtype collection_name: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.async_paging.AsyncItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "nextLink": "str", # Optional. + "values": [ + { + "id": "str", # Optional. The id of policy. + "name": "str", # Optional. The name of policy. + "properties": { + "attributeRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "id": "str", # Optional. The id for rule. + "kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + "name": "str" # Optional. The name for rule. + } + ], + "collection": { + "referenceName": "str", # Optional. The name of reference. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference. + }, + "decisionRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit". + "kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + } + ], + "description": "str", # Optional. The description of policy. + "parentCollectionName": "str" # Optional. The parent collection of the policy. + }, + "version": 0 # Optional. The version of policy. + } + ] + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_metadata_policy_list_all_request( + collection_name=collection_name, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_metadata_policy_list_all_request( + collection_name=collection_name, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + async def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["values"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return AsyncItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/metadataPolicies'} # type: ignore + + @distributed_trace_async + async def update( + self, + policy_id: str, + body: Any = None, + **kwargs: Any + ) -> Any: + """Updates a metadata policy. + + :param policy_id: Unique policy id. + :type policy_id: str + :param body: Policy to be updated. + :type body: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "id": "str", # Optional. The id of policy. + "name": "str", # Optional. The name of policy. + "properties": { + "attributeRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "id": "str", # Optional. The id for rule. + "kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + "name": "str" # Optional. The name for rule. + } + ], + "collection": { + "referenceName": "str", # Optional. The name of reference. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference. + }, + "decisionRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit". + "kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + } + ], + "description": "str", # Optional. The description of policy. + "parentCollectionName": "str" # Optional. The parent collection of the policy. + }, + "version": 0 # Optional. The version of policy. + } + + # response body for status code(s): 200 + response.json() == { + "id": "str", # Optional. The id of policy. + "name": "str", # Optional. The name of policy. + "properties": { + "attributeRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "id": "str", # Optional. The id for rule. + "kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + "name": "str" # Optional. The name for rule. + } + ], + "collection": { + "referenceName": "str", # Optional. The name of reference. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference. + }, + "decisionRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit". + "kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + } + ], + "description": "str", # Optional. The description of policy. + "parentCollectionName": "str" # Optional. The parent collection of the policy. + }, + "version": 0 # Optional. The version of policy. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + json = body + else: + json = None + + request = build_metadata_policy_update_request( + policy_id=policy_id, + content_type=content_type, + json=json, + template_url=self.update.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': '/metadataPolicies/{policyId}'} # type: ignore + + + @distributed_trace_async + async def get( + self, + policy_id: str, + **kwargs: Any + ) -> Any: + """Gets a metadata policy. + + :param policy_id: Id of an existing policy that needs to be fetched. + :type policy_id: str + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "id": "str", # Optional. The id of policy. + "name": "str", # Optional. The name of policy. + "properties": { + "attributeRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "id": "str", # Optional. The id for rule. + "kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + "name": "str" # Optional. The name for rule. + } + ], + "collection": { + "referenceName": "str", # Optional. The name of reference. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference. + }, + "decisionRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit". + "kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + } + ], + "description": "str", # Optional. The description of policy. + "parentCollectionName": "str" # Optional. The parent collection of the policy. + }, + "version": 0 # Optional. The version of policy. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_metadata_policy_get_request( + policy_id=policy_id, + template_url=self.get.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/metadataPolicies/{policyId}'} # type: ignore + diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/__init__.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/__init__.py new file mode 100644 index 000000000000..2e16550e3e30 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/__init__.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import MetadataRolesOperations +from ._operations import MetadataPolicyOperations + +__all__ = [ + 'MetadataRolesOperations', + 'MetadataPolicyOperations', +] diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/_operations.py b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/_operations.py new file mode 100644 index 000000000000..2b11961f4278 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/operations/_operations.py @@ -0,0 +1,750 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 functools +from json import loads as _loads +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer + +from .._vendor import _convert_request, _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +# fmt: off + +def build_metadata_roles_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-07-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/metadataRoles') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_metadata_policy_list_all_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + collection_name = kwargs.pop('collection_name', None) # type: Optional[str] + + api_version = "2021-07-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/metadataPolicies') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if collection_name is not None: + query_parameters['collectionName'] = _SERIALIZER.query("collection_name", collection_name, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_metadata_policy_update_request( + policy_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + api_version = "2021-07-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/metadataPolicies/{policyId}') + path_format_arguments = { + "policyId": _SERIALIZER.url("policy_id", policy_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_metadata_policy_get_request( + policy_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = "2021-07-01-preview" + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/metadataPolicies/{policyId}') + path_format_arguments = { + "policyId": _SERIALIZER.url("policy_id", policy_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class MetadataRolesOperations(object): + """MetadataRolesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable[Any] + """Lists roles for Purview Account. + + :return: An iterator like instance of JSON object + :rtype: ~azure.core.paging.ItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "nextLink": "str", # Optional. + "values": [ + { + "id": "str", # Optional. The Id of role. + "name": "str", # Optional. The name of role. + "properties": { + "cnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "description": "str", # Optional. The description of role. + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "friendlyName": "str", # Optional. The friendly name of role. + "provisioningState": "str", # Optional. The provisioningState of role. + "roleType": "str", # Optional. The type of role. + "version": 0.0 # Optional. The version of role. + }, + "type": "str" # Optional. The type of role. + } + ] + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_metadata_roles_list_request( + template_url=self.list.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_metadata_roles_list_request( + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["values"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/metadataRoles'} # type: ignore +class MetadataPolicyOperations(object): + """MetadataPolicyOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an 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. + """ + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + @distributed_trace + def list_all( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable[Any] + """List or Get metadata policies. + + :keyword collection_name: The name of an existing collection for which one policy needs to be + fetched. + :paramtype collection_name: str + :return: An iterator like instance of JSON object + :rtype: ~azure.core.paging.ItemPaged[Any] + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "nextLink": "str", # Optional. + "values": [ + { + "id": "str", # Optional. The id of policy. + "name": "str", # Optional. The name of policy. + "properties": { + "attributeRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "id": "str", # Optional. The id for rule. + "kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + "name": "str" # Optional. The name for rule. + } + ], + "collection": { + "referenceName": "str", # Optional. The name of reference. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference. + }, + "decisionRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit". + "kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + } + ], + "description": "str", # Optional. The description of policy. + "parentCollectionName": "str" # Optional. The parent collection of the policy. + }, + "version": 0 # Optional. The version of policy. + } + ] + } + """ + collection_name = kwargs.pop('collection_name', None) # type: Optional[str] + + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + def prepare_request(next_link=None): + if not next_link: + + request = build_metadata_policy_list_all_request( + collection_name=collection_name, + template_url=self.list_all.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + else: + + request = build_metadata_policy_list_all_request( + collection_name=collection_name, + template_url=next_link, + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.method = "GET" + return request + + def extract_data(pipeline_response): + deserialized = _loads(pipeline_response.http_response.body()) + list_of_elem = deserialized["values"] + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.get("nextLink", None), iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + + return ItemPaged( + get_next, extract_data + ) + list_all.metadata = {'url': '/metadataPolicies'} # type: ignore + + @distributed_trace + def update( + self, + policy_id, # type: str + body=None, # type: Any + **kwargs # type: Any + ): + # type: (...) -> Any + """Updates a metadata policy. + + :param policy_id: Unique policy id. + :type policy_id: str + :param body: Policy to be updated. + :type body: Any + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # JSON input template you can fill out and use as your body input. + body = { + "id": "str", # Optional. The id of policy. + "name": "str", # Optional. The name of policy. + "properties": { + "attributeRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "id": "str", # Optional. The id for rule. + "kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + "name": "str" # Optional. The name for rule. + } + ], + "collection": { + "referenceName": "str", # Optional. The name of reference. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference. + }, + "decisionRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit". + "kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + } + ], + "description": "str", # Optional. The description of policy. + "parentCollectionName": "str" # Optional. The parent collection of the policy. + }, + "version": 0 # Optional. The version of policy. + } + + # response body for status code(s): 200 + response.json() == { + "id": "str", # Optional. The id of policy. + "name": "str", # Optional. The name of policy. + "properties": { + "attributeRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "id": "str", # Optional. The id for rule. + "kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + "name": "str" # Optional. The name for rule. + } + ], + "collection": { + "referenceName": "str", # Optional. The name of reference. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference. + }, + "decisionRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit". + "kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + } + ], + "description": "str", # Optional. The description of policy. + "parentCollectionName": "str" # Optional. The parent collection of the policy. + }, + "version": 0 # Optional. The version of policy. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + if body is not None: + json = body + else: + json = None + + request = build_metadata_policy_update_request( + policy_id=policy_id, + content_type=content_type, + json=json, + template_url=self.update.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + update.metadata = {'url': '/metadataPolicies/{policyId}'} # type: ignore + + + @distributed_trace + def get( + self, + policy_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Any + """Gets a metadata policy. + + :param policy_id: Id of an existing policy that needs to be fetched. + :type policy_id: str + :return: JSON object + :rtype: Any + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "id": "str", # Optional. The id of policy. + "name": "str", # Optional. The name of policy. + "properties": { + "attributeRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "id": "str", # Optional. The id for rule. + "kind": "str", # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + "name": "str" # Optional. The name for rule. + } + ], + "collection": { + "referenceName": "str", # Optional. The name of reference. + "type": "CollectionReference" # Optional. Default value is "CollectionReference". The type of reference. + }, + "decisionRules": [ + { + "dnfCondition": [ + [ + { + "attributeName": "str", # Optional. AttributeName. + "attributeValueExcludedIn": [ + "str" # Optional. List of values excluded for attribute. + ], + "attributeValueExcludes": "str", # Optional. Value excluded for attribute. + "attributeValueIncludedIn": [ + "str" # Optional. List of values for attribute. + ], + "attributeValueIncludes": "str" # Optional. Value for attribute. + } + ] + ], + "effect": "str", # Optional. The effect for rule. Possible values include: "Deny", "Permit". + "kind": "str" # Optional. The kind of rule. Possible values include: "decisionrule", "attributerule". + } + ], + "description": "str", # Optional. The description of policy. + "parentCollectionName": "str" # Optional. The parent collection of the policy. + }, + "version": 0 # Optional. The version of policy. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[Any] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + + request = build_metadata_policy_get_request( + policy_id=policy_id, + template_url=self.get.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client.send_request(request, stream=False, _return_pipeline_response=True, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get.metadata = {'url': '/metadataPolicies/{policyId}'} # type: ignore + diff --git a/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/py.typed b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/purview/azure-purview-administration/azure/purview/administration/metadatapolicies/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/dev_requirements.txt b/sdk/purview/azure-purview-administration/dev_requirements.txt new file mode 100644 index 000000000000..45bdbbd581f4 --- /dev/null +++ b/sdk/purview/azure-purview-administration/dev_requirements.txt @@ -0,0 +1,5 @@ +-e ../../../tools/azure-sdk-tools +-e ../../../tools/azure-devtools +-e ../../identity/azure-identity +../../nspkg/azure-purview-nspkg +aiohttp>=3.0; python_version >= '3.5' \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/sdk_packaging.toml b/sdk/purview/azure-purview-administration/sdk_packaging.toml new file mode 100644 index 000000000000..58287ec51a84 --- /dev/null +++ b/sdk/purview/azure-purview-administration/sdk_packaging.toml @@ -0,0 +1,9 @@ +[packaging] +auto_update = false +package_name = "azure-purview-administration" +package_pprint_name = "Azure Purview Administration" +is_stable = false +is_arm = false + +# Package owners should uncomment and set this doc id. +# package_doc_id = "purview-account" \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/setup.cfg b/sdk/purview/azure-purview-administration/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/purview/azure-purview-administration/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/purview/azure-purview-administration/setup.py b/sdk/purview/azure-purview-administration/setup.py new file mode 100644 index 000000000000..1869a553dad6 --- /dev/null +++ b/sdk/purview/azure-purview-administration/setup.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-purview-administration" +PACKAGE_PPRINT_NAME = "Azure Purview Administration" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + "\n\n" + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + "Development Status :: 4 - Beta", + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.purview', + ]), + install_requires=[ + "azure-core<2.0.0,>=1.18.0", + "msrest>=0.6.21", + 'six>=1.11.0', + ], + extras_require={ + ":python_version<'3.0'": ['azure-purview-nspkg'], + ":python_version<'3.5'": ['typing'], + } +) \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/swagger/README.md b/sdk/purview/azure-purview-administration/swagger/README.md new file mode 100644 index 000000000000..0a2bb1f57cc8 --- /dev/null +++ b/sdk/purview/azure-purview-administration/swagger/README.md @@ -0,0 +1,68 @@ +# Azure Purview for Python + +> see https://aka.ms/autorest + +### Setup + +Install Autorest v3 + +```ps +npm install -g autorest +``` + +### Generation + +```ps +cd +autorest +``` + +### Settings + +``` yaml +license-header: MICROSOFT_MIT_NO_VERSION +package-name: azure-purview-administration +no-namespace-folders: true +package-version: 1.0.0b1 +version-tolerant: true +``` + +### Python multi-client + +Generate all API versions currently shipped for this package + +```yaml +batch: + - tag: package-account + - tag: package-metadatapolicies +``` + +### Tag: package-account + +These settings apply only when `--tag=package-account` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-account' +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.Account/preview/2019-11-01-preview/account.json +output-folder: ../azure/purview/administration/account +namespace: azure.purview.administration.account +clear-output-folder: true +title: PurviewAccountClient +add-credential: true +credential-scopes: https://purview.azure.net/.default +``` + +### Tag: package-metadatapolicies + +These settings apply only when `--tag=package-metadatapolicies` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-metadatapolicies' +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.MetadataPolicies/preview/2021-07-01-preview/purviewMetadataPolicy.json +output-folder: ../azure/purview/administration/metadatapolicies +namespace: azure.purview.administration.metadatapolicies +clear-output-folder: true +title: PurviewMetadataPoliciesClient +add-credential: true +credential-scopes: https://purview.azure.net/.default +``` \ No newline at end of file diff --git a/sdk/purview/azure-purview-administration/tests/_util.py b/sdk/purview/azure-purview-administration/tests/_util.py new file mode 100644 index 000000000000..50ee62f8e5d7 --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/_util.py @@ -0,0 +1,19 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from azure_devtools.scenario_tests import RecordingProcessor +import json + + +class PurviewScanningRecordingProcessor(RecordingProcessor): + def process_response(self, response): + try: + body = json.loads(response["body"]["string"]) + for value in body["value"]: + value["properties"]["subscriptionId"] = "000" + response["body"]["string"] = json.dumps(body) + finally: + return response diff --git a/sdk/purview/azure-purview-administration/tests/conftest.py b/sdk/purview/azure-purview-administration/tests/conftest.py new file mode 100644 index 000000000000..755d2a9305fa --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/conftest.py @@ -0,0 +1,15 @@ +# coding=utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +import sys + + +# Ignore async tests for Python < 3.5 +collect_ignore_glob = [] +if sys.version_info < (3, 5): + collect_ignore_glob.append("*_async.py") + diff --git a/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_basic_smoke_test.yaml b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_basic_smoke_test.yaml new file mode 100644 index 000000000000..bfa40ee25d97 --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_basic_smoke_test.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_account.account.purview.azure.com/listkeys?api-version=2019-11-01-preview + response: + body: + string: '{"atlasKafkaPrimaryEndpoint":"000","atlasKafkaSecondaryEndpoint":"000"}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Oct 2021 06:38:56 GMT + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_collections_list.yaml b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_collections_list.yaml new file mode 100644 index 000000000000..41b73d345ae4 --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_collections_list.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_account.account.purview.azure.com/collections?api-version=2019-11-01-preview + response: + body: + string: '{"value": [{"name": "purview-msyyc", "friendlyName": "purview-msyyc", + "description": "The root collection.", "systemData": "000", "collectionProvisioningState": + "Succeeded"}], "count": 1}' + headers: + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Oct 2021 06:38:59 GMT + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + transfer-encoding: + - chunked + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_meta_policy_smoke_test.yaml b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_meta_policy_smoke_test.yaml new file mode 100644 index 000000000000..d3a84569e73d --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_meta_policy_smoke_test.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_account.account.purview.azure.com/policyStore/metadataPolicies?api-version=2021-07-01-preview + response: + body: + string: '{"values":[{"name":"policy_purview-msyyc","id":"2b6db6a7-2955-43ed-8372-0982730e48ef","version":5,"properties":{"description":"","decisionRules":[{"kind":"decisionrule","effect":"Permit","dnfCondition":[[{"attributeName":"resource.purview.collection","attributeValueIncludes":"purview-msyyc"},{"fromRule":"permission:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"permission:purview-msyyc"}]]}],"attributeRules":[{"kind":"attributerule","id":"purviewmetadatarole_builtin_collection-administrator:purview-msyyc","name":"purviewmetadatarole_builtin_collection-administrator:purview-msyyc","dnfCondition":[[{"attributeName":"principal.microsoft.id","attributeValueIncludedIn":["3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","a7a853f3-da55-40e9-a48a-e5a5717e8b98"]},{"fromRule":"purviewmetadatarole_builtin_collection-administrator","attributeName":"derived.purview.role","attributeValueIncludes":"purviewmetadatarole_builtin_collection-administrator"}]]},{"kind":"attributerule","id":"purviewmetadatarole_builtin_purview-reader:purview-msyyc","name":"purviewmetadatarole_builtin_purview-reader:purview-msyyc","dnfCondition":[[{"attributeName":"principal.microsoft.id","attributeValueIncludedIn":["3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","a7a853f3-da55-40e9-a48a-e5a5717e8b98"]},{"fromRule":"purviewmetadatarole_builtin_purview-reader","attributeName":"derived.purview.role","attributeValueIncludes":"purviewmetadatarole_builtin_purview-reader"}]]},{"kind":"attributerule","id":"purviewmetadatarole_builtin_data-curator:purview-msyyc","name":"purviewmetadatarole_builtin_data-curator:purview-msyyc","dnfCondition":[[{"attributeName":"principal.microsoft.id","attributeValueIncludedIn":["3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","a7a853f3-da55-40e9-a48a-e5a5717e8b98"]},{"fromRule":"purviewmetadatarole_builtin_data-curator","attributeName":"derived.purview.role","attributeValueIncludes":"purviewmetadatarole_builtin_data-curator"}]]},{"kind":"attributerule","id":"purviewmetadatarole_builtin_data-source-administrator:purview-msyyc","name":"purviewmetadatarole_builtin_data-source-administrator:purview-msyyc","dnfCondition":[[{"attributeName":"principal.microsoft.id","attributeValueIncludedIn":["3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","a7a853f3-da55-40e9-a48a-e5a5717e8b98"]},{"fromRule":"purviewmetadatarole_builtin_data-source-administrator","attributeName":"derived.purview.role","attributeValueIncludes":"purviewmetadatarole_builtin_data-source-administrator"}]]},{"kind":"attributerule","id":"permission:purview-msyyc","name":"permission:purview-msyyc","dnfCondition":[[{"fromRule":"purviewmetadatarole_builtin_collection-administrator:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"purviewmetadatarole_builtin_collection-administrator:purview-msyyc"}],[{"fromRule":"purviewmetadatarole_builtin_purview-reader:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"purviewmetadatarole_builtin_purview-reader:purview-msyyc"}],[{"fromRule":"purviewmetadatarole_builtin_data-curator:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"purviewmetadatarole_builtin_data-curator:purview-msyyc"}],[{"fromRule":"purviewmetadatarole_builtin_data-source-administrator:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"purviewmetadatarole_builtin_data-source-administrator:purview-msyyc"}]]}],"collection":{"type":"CollectionReference","referenceName":"purview-msyyc"}}}]}' + headers: + api-supported-versions: + - 2021-07-01-preview, 2021-07-01 + content-length: + - '3530' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Oct 2021 06:39:02 GMT + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_meta_roles_smoke_test.yaml b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_meta_roles_smoke_test.yaml new file mode 100644 index 000000000000..c98c4bcf1fe1 --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke.test_meta_roles_smoke_test.yaml @@ -0,0 +1,70 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_account.account.purview.azure.com/policyStore/metadataRoles?api-version=2021-07-01-preview + response: + body: + string: '{"values":[{"id":"purviewmetadatarole_builtin_data-curator","name":"data-curator","type":"Microsoft.Purview/role","properties":{"provisioningState":"Provisioned","roleType":"BuiltIn","friendlyName":"Data + Curator","cnfCondition":[[{"attributeName":"request.azure.dataAction","attributeValueIncludedIn":["Microsoft.Purview/accounts/data/read","Microsoft.Purview/accounts/data/write","Microsoft.Purview/accounts/collection/read"]}]],"version":1}},{"id":"purviewmetadatarole_builtin_data-source-administrator","name":"data-source-administrator","type":"Microsoft.Purview/role","properties":{"provisioningState":"Provisioned","roleType":"BuiltIn","friendlyName":"Data + Source Administrator","cnfCondition":[[{"attributeName":"request.azure.dataAction","attributeValueIncludedIn":["Microsoft.Purview/accounts/scan/read","Microsoft.Purview/accounts/scan/write","Microsoft.Purview/accounts/collection/read"]}]],"version":1}},{"id":"purviewmetadatarole_builtin_collection-administrator","name":"collection-administrator","type":"Microsoft.Purview/role","properties":{"provisioningState":"Provisioned","roleType":"BuiltIn","friendlyName":"Collection + Administrator","cnfCondition":[[{"attributeName":"request.azure.dataAction","attributeValueIncludedIn":["Microsoft.Purview/accounts/collection/read","Microsoft.Purview/accounts/collection/write"]}]],"version":1}},{"id":"purviewmetadatarole_builtin_purview-reader","name":"purview-reader","type":"Microsoft.Purview/role","properties":{"provisioningState":"Provisioned","roleType":"BuiltIn","friendlyName":"Purview + Reader","cnfCondition":[[{"attributeName":"request.azure.dataAction","attributeValueIncludedIn":["Microsoft.Purview/accounts/data/read","Microsoft.Purview/accounts/collection/read"]}]],"version":1}}],"nextLink":"https://fake_account.account.purview.azure.com/policyStore/metadataRoles?api-version=2021-07-01-preview&skipToken=%2BRID%3A~OCYSANC6p-wJCT0AAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23ISV%3A2%23IEO%3A65551%23QCF%3A4%23FPC%3AAgH09PQEAAmJBoA%3D"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-07-01-preview, 2021-07-01 + content-length: + - '1991' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Oct 2021 06:39:04 GMT + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_account.account.purview.azure.com/policyStore/metadataRoles?api-version=2021-07-01-preview&skipToken=%2BRID%3A~OCYSANC6p-wJCT0AAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23ISV%3A2%23IEO%3A65551%23QCF%3A4%23FPC%3AAgH09PQEAAmJBoA%3D + response: + body: + string: '{"values":[]}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-07-01-preview, 2021-07-01 + content-length: + - '13' + content-type: + - application/json; charset=utf-8 + date: + - Fri, 08 Oct 2021 06:39:04 GMT + server: + - Kestrel + strict-transport-security: + - max-age=31536000; includeSubDomains + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_basic_smoke_test.yaml b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_basic_smoke_test.yaml new file mode 100644 index 000000000000..97c696d6e5fa --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_basic_smoke_test.yaml @@ -0,0 +1,24 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://fake_account.account.purview.azure.com/listkeys?api-version=2019-11-01-preview + response: + body: + string: '{"atlasKafkaPrimaryEndpoint":"000","atlasKafkaSecondaryEndpoint":"000"}' + headers: + content-type: application/json; charset=utf-8 + date: Fri, 08 Oct 2021 06:40:01 GMT + server: Kestrel + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://purview-msyyc.purview.azure.com/listkeys?api-version=2019-11-01-preview +version: 1 diff --git a/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_collections_list.yaml b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_collections_list.yaml new file mode 100644 index 000000000000..2825da50c2b5 --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_collections_list.yaml @@ -0,0 +1,26 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_account.account.purview.azure.com/collections?api-version=2019-11-01-preview + response: + body: + string: '{"value": [{"name": "purview-msyyc", "friendlyName": "purview-msyyc", + "description": "The root collection.", "systemData": "000", "collectionProvisioningState": + "Succeeded"}], "count": 1}' + headers: + content-type: application/json; charset=utf-8 + date: Fri, 08 Oct 2021 06:40:03 GMT + server: Kestrel + strict-transport-security: max-age=31536000; includeSubDomains + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://purview-msyyc.purview.azure.com/collections?api-version=2019-11-01-preview +version: 1 diff --git a/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_metadata_policy_smoke_async.yaml b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_metadata_policy_smoke_async.yaml new file mode 100644 index 000000000000..0eeb2f64922f --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_metadata_policy_smoke_async.yaml @@ -0,0 +1,25 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_account.account.purview.azure.com/policyStore/metadataPolicies?api-version=2021-07-01-preview + response: + body: + string: '{"values":[{"name":"policy_purview-msyyc","id":"2b6db6a7-2955-43ed-8372-0982730e48ef","version":5,"properties":{"description":"","decisionRules":[{"kind":"decisionrule","effect":"Permit","dnfCondition":[[{"attributeName":"resource.purview.collection","attributeValueIncludes":"purview-msyyc"},{"fromRule":"permission:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"permission:purview-msyyc"}]]}],"attributeRules":[{"kind":"attributerule","id":"purviewmetadatarole_builtin_collection-administrator:purview-msyyc","name":"purviewmetadatarole_builtin_collection-administrator:purview-msyyc","dnfCondition":[[{"attributeName":"principal.microsoft.id","attributeValueIncludedIn":["3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","a7a853f3-da55-40e9-a48a-e5a5717e8b98"]},{"fromRule":"purviewmetadatarole_builtin_collection-administrator","attributeName":"derived.purview.role","attributeValueIncludes":"purviewmetadatarole_builtin_collection-administrator"}]]},{"kind":"attributerule","id":"purviewmetadatarole_builtin_purview-reader:purview-msyyc","name":"purviewmetadatarole_builtin_purview-reader:purview-msyyc","dnfCondition":[[{"attributeName":"principal.microsoft.id","attributeValueIncludedIn":["3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","a7a853f3-da55-40e9-a48a-e5a5717e8b98"]},{"fromRule":"purviewmetadatarole_builtin_purview-reader","attributeName":"derived.purview.role","attributeValueIncludes":"purviewmetadatarole_builtin_purview-reader"}]]},{"kind":"attributerule","id":"purviewmetadatarole_builtin_data-curator:purview-msyyc","name":"purviewmetadatarole_builtin_data-curator:purview-msyyc","dnfCondition":[[{"attributeName":"principal.microsoft.id","attributeValueIncludedIn":["3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","a7a853f3-da55-40e9-a48a-e5a5717e8b98"]},{"fromRule":"purviewmetadatarole_builtin_data-curator","attributeName":"derived.purview.role","attributeValueIncludes":"purviewmetadatarole_builtin_data-curator"}]]},{"kind":"attributerule","id":"purviewmetadatarole_builtin_data-source-administrator:purview-msyyc","name":"purviewmetadatarole_builtin_data-source-administrator:purview-msyyc","dnfCondition":[[{"attributeName":"principal.microsoft.id","attributeValueIncludedIn":["3bd37d68-b234-4fcd-bc83-0fedb27ccf5c","a7a853f3-da55-40e9-a48a-e5a5717e8b98"]},{"fromRule":"purviewmetadatarole_builtin_data-source-administrator","attributeName":"derived.purview.role","attributeValueIncludes":"purviewmetadatarole_builtin_data-source-administrator"}]]},{"kind":"attributerule","id":"permission:purview-msyyc","name":"permission:purview-msyyc","dnfCondition":[[{"fromRule":"purviewmetadatarole_builtin_collection-administrator:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"purviewmetadatarole_builtin_collection-administrator:purview-msyyc"}],[{"fromRule":"purviewmetadatarole_builtin_purview-reader:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"purviewmetadatarole_builtin_purview-reader:purview-msyyc"}],[{"fromRule":"purviewmetadatarole_builtin_data-curator:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"purviewmetadatarole_builtin_data-curator:purview-msyyc"}],[{"fromRule":"purviewmetadatarole_builtin_data-source-administrator:purview-msyyc","attributeName":"derived.purview.permission","attributeValueIncludes":"purviewmetadatarole_builtin_data-source-administrator:purview-msyyc"}]]}],"collection":{"type":"CollectionReference","referenceName":"purview-msyyc"}}}]}' + headers: + api-supported-versions: 2021-07-01-preview, 2021-07-01 + content-length: '3530' + content-type: application/json; charset=utf-8 + date: Fri, 08 Oct 2021 06:40:05 GMT + server: Kestrel + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://purview-msyyc.purview.azure.com/policyStore/metadataPolicies?api-version=2021-07-01-preview +version: 1 diff --git a/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_metadata_role_smoke_async.yaml b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_metadata_role_smoke_async.yaml new file mode 100644 index 000000000000..9c8a62645d42 --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/recordings/test_smoke_async.test_metadata_role_smoke_async.yaml @@ -0,0 +1,52 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_account.account.purview.azure.com/policyStore/metadataRoles?api-version=2021-07-01-preview + response: + body: + string: '{"values":[{"id":"purviewmetadatarole_builtin_data-curator","name":"data-curator","type":"Microsoft.Purview/role","properties":{"provisioningState":"Provisioned","roleType":"BuiltIn","friendlyName":"Data + Curator","cnfCondition":[[{"attributeName":"request.azure.dataAction","attributeValueIncludedIn":["Microsoft.Purview/accounts/data/read","Microsoft.Purview/accounts/data/write","Microsoft.Purview/accounts/collection/read"]}]],"version":1}},{"id":"purviewmetadatarole_builtin_data-source-administrator","name":"data-source-administrator","type":"Microsoft.Purview/role","properties":{"provisioningState":"Provisioned","roleType":"BuiltIn","friendlyName":"Data + Source Administrator","cnfCondition":[[{"attributeName":"request.azure.dataAction","attributeValueIncludedIn":["Microsoft.Purview/accounts/scan/read","Microsoft.Purview/accounts/scan/write","Microsoft.Purview/accounts/collection/read"]}]],"version":1}},{"id":"purviewmetadatarole_builtin_collection-administrator","name":"collection-administrator","type":"Microsoft.Purview/role","properties":{"provisioningState":"Provisioned","roleType":"BuiltIn","friendlyName":"Collection + Administrator","cnfCondition":[[{"attributeName":"request.azure.dataAction","attributeValueIncludedIn":["Microsoft.Purview/accounts/collection/read","Microsoft.Purview/accounts/collection/write"]}]],"version":1}},{"id":"purviewmetadatarole_builtin_purview-reader","name":"purview-reader","type":"Microsoft.Purview/role","properties":{"provisioningState":"Provisioned","roleType":"BuiltIn","friendlyName":"Purview + Reader","cnfCondition":[[{"attributeName":"request.azure.dataAction","attributeValueIncludedIn":["Microsoft.Purview/accounts/data/read","Microsoft.Purview/accounts/collection/read"]}]],"version":1}}],"nextLink":"https://fake_account.account.purview.azure.com/policyStore/metadataRoles?api-version=2021-07-01-preview&skipToken=%2BRID%3A~OCYSANC6p-wJCT0AAAAAAA%3D%3D%23RT%3A1%23TRC%3A5%23ISV%3A2%23IEO%3A65551%23QCF%3A4%23FPC%3AAgH09PQEAAmJBoA%3D"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-07-01-preview, 2021-07-01 + content-length: '1991' + content-type: application/json; charset=utf-8 + date: Fri, 08 Oct 2021 06:40:07 GMT + server: Kestrel + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://purview-msyyc.purview.azure.com/policyStore/metadataRoles?api-version=2021-07-01-preview +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-purview-administration/1.0.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://fake_account.account.purview.azure.com/policyStore/metadataRoles?api-version=2021-07-01-preview&skipToken=%2BRID:~OCYSANC6p-wJCT0AAAAAAA%3D%3D%23RT:1%23TRC:5%23ISV:2%23IEO:65551%23QCF:4%23FPC:AgH09PQEAAmJBoA%3D + response: + body: + string: '{"values":[]}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-07-01-preview, 2021-07-01 + content-length: '13' + content-type: application/json; charset=utf-8 + date: Fri, 08 Oct 2021 06:40:07 GMT + server: Kestrel + strict-transport-security: max-age=31536000; includeSubDomains + status: + code: 200 + message: OK + url: https://purview-msyyc.purview.azure.com/policyStore/metadataRoles?api-version=2021-07-01-preview&skipToken=%2BRID:~OCYSANC6p-wJCT0AAAAAAA%3D%3D%23RT:1%23TRC:5%23ISV:2%23IEO:65551%23QCF:4%23FPC:AgH09PQEAAmJBoA%3D +version: 1 diff --git a/sdk/purview/azure-purview-administration/tests/test_smoke.py b/sdk/purview/azure-purview-administration/tests/test_smoke.py new file mode 100644 index 000000000000..94c82de3b2b2 --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/test_smoke.py @@ -0,0 +1,45 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +from testcase import PurviewAccountTest, PurviewAccountPowerShellPreparer +from testcase import PurviewMetaPolicyTest, PurviewMetaPolicyPowerShellPreparer +from _util import PurviewAccountRecordingProcessor, PurviewAccountCollectionsRecordingProcessor + + +class PurviewAccountSmokeTest(PurviewAccountTest): + + @PurviewAccountPowerShellPreparer() + def test_basic_smoke_test(self, purviewaccount_endpoint): + self.recording_processors.append(PurviewAccountRecordingProcessor()) + client = self.create_client(endpoint=purviewaccount_endpoint) + response = client.accounts.get_access_keys() + assert set(response.keys()) == set(['atlasKafkaPrimaryEndpoint', 'atlasKafkaSecondaryEndpoint']) + + @PurviewAccountPowerShellPreparer() + def test_collections_list(self, purviewaccount_endpoint): + self.recording_processors.append(PurviewAccountCollectionsRecordingProcessor()) + client = self.create_client(endpoint=purviewaccount_endpoint) + response = client.collections.list_collections() + result = [item for item in response] + for item in result: + assert set(item.keys()) == set(['name', 'friendlyName', 'description', 'systemData', 'collectionProvisioningState']) + + +class PurviewMetaPolicySmokeTest(PurviewMetaPolicyTest): + + @PurviewMetaPolicyPowerShellPreparer() + def test_meta_policy_smoke_test(self, purviewmetapolicy_endpoint): + client = self.create_client(endpoint=purviewmetapolicy_endpoint) + response = client.metadata_policy.list_all() + result = [item for item in response] + assert len(result) >= 1 + + @PurviewMetaPolicyPowerShellPreparer() + def test_meta_roles_smoke_test(self, purviewmetapolicy_endpoint): + client = self.create_client(endpoint=purviewmetapolicy_endpoint) + response = client.metadata_roles.list() + result = [item for item in response] + assert len(result) >= 4 diff --git a/sdk/purview/azure-purview-administration/tests/test_smoke_async.py b/sdk/purview/azure-purview-administration/tests/test_smoke_async.py new file mode 100644 index 000000000000..2210174de70f --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/test_smoke_async.py @@ -0,0 +1,45 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +from testcase import PurviewAccountPowerShellPreparer, PurviewMetaPolicyPowerShellPreparer +from testcase_async import PurviewAccountTestAsync, PurviewMetaPolicyTestAsync +from _util import PurviewAccountRecordingProcessor, PurviewAccountCollectionsRecordingProcessor + + +class PurviewAccountSmokeTestAsync(PurviewAccountTestAsync): + + @PurviewAccountPowerShellPreparer() + async def test_basic_smoke_test(self, purviewaccount_endpoint): + self.recording_processors.append(PurviewAccountRecordingProcessor()) + client = self.create_async_client(endpoint=purviewaccount_endpoint) + response = await client.accounts.get_access_keys() + assert set(response.keys()) == set(['atlasKafkaPrimaryEndpoint', 'atlasKafkaSecondaryEndpoint']) + + @PurviewAccountPowerShellPreparer() + async def test_collections_list(self, purviewaccount_endpoint): + self.recording_processors.append(PurviewAccountCollectionsRecordingProcessor()) + client = self.create_async_client(endpoint=purviewaccount_endpoint) + response = client.collections.list_collections() + result = [item async for item in response] + for item in result: + assert set(item.keys()) == set(['name', 'friendlyName', 'description', 'systemData', 'collectionProvisioningState']) + + +class PurviewMetaDataPolicySmokeTestAsync(PurviewMetaPolicyTestAsync): + + @PurviewMetaPolicyPowerShellPreparer() + async def test_metadata_policy_smoke_async(self, purviewmetapolicy_endpoint): + client = self.create_async_client(endpoint=purviewmetapolicy_endpoint) + response = client.metadata_policy.list_all() + result = [item async for item in response] + assert len(result) >= 1 + + @PurviewMetaPolicyPowerShellPreparer() + async def test_metadata_role_smoke_async(self, purviewmetapolicy_endpoint): + client = self.create_async_client(endpoint=purviewmetapolicy_endpoint) + response = client.metadata_roles.list() + result = [item async for item in response] + assert len(result) >= 4 diff --git a/sdk/purview/azure-purview-administration/tests/testcase.py b/sdk/purview/azure-purview-administration/tests/testcase.py new file mode 100644 index 000000000000..f725222b5c43 --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/testcase.py @@ -0,0 +1,50 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import functools +from devtools_testutils import AzureTestCase, PowerShellPreparer +from azure.purview.administration.account import PurviewAccountClient +from azure.purview.administration.metadatapolicies import PurviewMetadataPoliciesClient + + +class PurviewAccountTest(AzureTestCase): + def __init__(self, method_name, **kwargs): + super(PurviewAccountTest, self).__init__(method_name, **kwargs) + + def create_client(self, endpoint): + credential = self.get_credential(PurviewAccountClient) + return self.create_client_from_credential( + PurviewAccountClient, + credential=credential, + endpoint=endpoint, + ) + + +PurviewAccountPowerShellPreparer = functools.partial( + PowerShellPreparer, + "purviewaccount", + purviewaccount_endpoint="https://fake_account.account.purview.azure.com" +) + + +class PurviewMetaPolicyTest(AzureTestCase): + def __init__(self, method_name, **kwargs): + super(PurviewMetaPolicyTest, self).__init__(method_name, **kwargs) + + def create_client(self, endpoint): + credential = self.get_credential(PurviewMetadataPoliciesClient) + return self.create_client_from_credential( + PurviewMetadataPoliciesClient, + credential=credential, + endpoint=endpoint, + ) + + +PurviewMetaPolicyPowerShellPreparer = functools.partial( + PowerShellPreparer, + "purviewmetapolicy", + purviewmetapolicy_endpoint="https://fake_account.account.purview.azure.com" +) diff --git a/sdk/purview/azure-purview-administration/tests/testcase_async.py b/sdk/purview/azure-purview-administration/tests/testcase_async.py new file mode 100644 index 000000000000..6fbab7190e9a --- /dev/null +++ b/sdk/purview/azure-purview-administration/tests/testcase_async.py @@ -0,0 +1,35 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from devtools_testutils import AzureTestCase +from azure.purview.administration.account.aio import PurviewAccountClient as AsyncPurviewAccountClient +from azure.purview.administration.metadatapolicies.aio import PurviewMetadataPoliciesClient as AsyncPurviewMetadataPoliciesClient + + +class PurviewAccountTestAsync(AzureTestCase): + def __init__(self, method_name, **kwargs): + super(PurviewAccountTestAsync, self).__init__(method_name, **kwargs) + + def create_async_client(self, endpoint): + credential = self.get_credential(AsyncPurviewAccountClient, is_async=True) + return self.create_client_from_credential( + AsyncPurviewAccountClient, + credential=credential, + endpoint=endpoint, + ) + + +class PurviewMetaPolicyTestAsync(AzureTestCase): + def __init__(self, method_name, **kwargs): + super(PurviewMetaPolicyTestAsync, self).__init__(method_name, **kwargs) + + def create_async_client(self, endpoint): + credential = self.get_credential(AsyncPurviewMetadataPoliciesClient, is_async=True) + return self.create_client_from_credential( + AsyncPurviewMetadataPoliciesClient, + credential=credential, + endpoint=endpoint, + ) diff --git a/sdk/purview/azure-purview-catalog/CHANGELOG.md b/sdk/purview/azure-purview-catalog/CHANGELOG.md index d5e2bb89200a..7d4529c30aa6 100644 --- a/sdk/purview/azure-purview-catalog/CHANGELOG.md +++ b/sdk/purview/azure-purview-catalog/CHANGELOG.md @@ -1,11 +1,20 @@ # Release History +## 1.0.0b3 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0b2 (2021-09-29) **Features** - Add convenience operations to client - - Api version has gone from `2021-05-01-preview` ot `2021-09-01` **Breaking changes** diff --git a/sdk/purview/azure-purview-catalog/README.md b/sdk/purview/azure-purview-catalog/README.md index 1ce34f87a162..cde184af04b7 100644 --- a/sdk/purview/azure-purview-catalog/README.md +++ b/sdk/purview/azure-purview-catalog/README.md @@ -10,6 +10,10 @@ Azure Purview Catalog is a fully managed cloud service whose users can discover [Source code][source_code] | [Package (PyPI)][catalog_pypi] | [API reference documentation][catalog_ref_docs]| [Product documentation][catalog_product_documentation] +## _Disclaimer_ + +_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ + ## Getting started ### Prerequisites @@ -52,7 +56,7 @@ from azure.purview.catalog import PurviewCatalogClient from azure.identity import DefaultAzureCredential credential = DefaultAzureCredential() -client = PurviewCatalogClient(endpoint="https://.catalog.purview.azure.com", credential=credential) +client = PurviewCatalogClient(endpoint="https://.purview.azure.com", credential=credential) ``` ## Key concepts @@ -76,7 +80,7 @@ from azure.identity import DefaultAzureCredential from azure.core.exceptions import HttpResponseError credential = DefaultAzureCredential() -client = PurviewCatalogClient(endpoint="https://.catalog.purview.azure.com", credential=credential) +client = PurviewCatalogClient(endpoint="https://.purview.azure.com", credential=credential) try: response = client.types.get_all_type_definitions() # print out all of your entity definitions @@ -116,7 +120,7 @@ logger.setLevel(logging.DEBUG) handler = logging.StreamHandler(stream=sys.stdout) logger.addHandler(handler) -endpoint = "https://.catalog.purview.azure.com" +endpoint = "https://.purview.azure.com" credential = DefaultAzureCredential() # This client will log detailed information about its HTTP sessions, at DEBUG level @@ -157,6 +161,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential [request_builders_and_client]: https://aka.ms/azsdk/python/protocol/quickstart [enable_aad]: https://docs.microsoft.com/azure/purview/create-catalog-portal#add-a-security-principal-to-a-data-plane-role +[azure_core]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md [python_logging]: https://docs.python.org/3.5/library/logging.html [cla]: https://cla.microsoft.com [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_configuration.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_configuration.py index ecd736bcfcc5..e2c0316ceab7 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_configuration.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_configuration.py @@ -47,7 +47,7 @@ def __init__( self.endpoint = endpoint self.credential = credential - self.api_version = "2021-09-01" + self.api_version = "2021-05-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) kwargs.setdefault('sdk_moniker', 'purview-catalog/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_version.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_version.py index dfa6ee022f15..20971492f129 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/_version.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0b3" diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_configuration.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_configuration.py index 937f049b044e..94b7531193b3 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_configuration.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/aio/_configuration.py @@ -44,7 +44,7 @@ def __init__( self.endpoint = endpoint self.credential = credential - self.api_version = "2021-09-01" + self.api_version = "2021-05-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://purview.azure.net/.default']) kwargs.setdefault('sdk_moniker', 'purview-catalog/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_operations.py b/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_operations.py index e20cd5528152..2ff0da1724c6 100644 --- a/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_operations.py +++ b/sdk/purview/azure-purview-catalog/azure/purview/catalog/operations/_operations.py @@ -1702,7 +1702,7 @@ def build_glossary_import_glossary_terms_via_csv_request_initial( content_type = kwargs.pop('content_type', None) # type: Optional[str] include_term_hierarchy = kwargs.pop('include_term_hierarchy', False) # type: Optional[bool] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/glossary/{glossaryGuid}/terms/import') @@ -1741,7 +1741,7 @@ def build_glossary_import_glossary_terms_via_csv_by_glossary_name_request_initia content_type = kwargs.pop('content_type', None) # type: Optional[str] include_term_hierarchy = kwargs.pop('include_term_hierarchy', False) # type: Optional[bool] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/glossary/name/{glossaryName}/terms/import') @@ -1777,7 +1777,7 @@ def build_glossary_get_import_csv_operation_status_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/glossary/terms/import/{operationGuid}') @@ -1812,7 +1812,7 @@ def build_glossary_export_glossary_terms_as_csv_request( content_type = kwargs.pop('content_type', None) # type: Optional[str] include_term_hierarchy = kwargs.pop('include_term_hierarchy', False) # type: Optional[bool] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "text/csv" # Construct URL url = kwargs.pop("template_url", '/glossary/{glossaryGuid}/terms/export') @@ -1852,7 +1852,7 @@ def build_glossary_list_terms_by_glossary_name_request( offset = kwargs.pop('offset', None) # type: Optional[int] include_term_hierarchy = kwargs.pop('include_term_hierarchy', False) # type: Optional[bool] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/glossary/name/{glossaryName}/terms') @@ -1891,7 +1891,7 @@ def build_discovery_query_request( # type: (...) -> HttpRequest content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/search/query') @@ -1921,7 +1921,7 @@ def build_discovery_suggest_request( # type: (...) -> HttpRequest content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/search/suggest') @@ -1951,7 +1951,7 @@ def build_discovery_browse_request( # type: (...) -> HttpRequest content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/browse') @@ -1981,7 +1981,7 @@ def build_discovery_auto_complete_request( # type: (...) -> HttpRequest content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/search/autocomplete') @@ -2060,7 +2060,7 @@ def build_lineage_next_page_lineage_request( offset = kwargs.pop('offset', None) # type: Optional[int] limit = kwargs.pop('limit', None) # type: Optional[int] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/lineage/{guid}/next/') @@ -2679,7 +2679,7 @@ def build_types_get_term_template_def_by_guid_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/types/termtemplatedef/guid/{guid}') @@ -2711,7 +2711,7 @@ def build_types_get_term_template_def_by_name_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/types/termtemplatedef/name/{name}') @@ -2745,7 +2745,7 @@ def build_collection_create_or_update_request( # type: (...) -> HttpRequest content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/collections/{collection}/entity') @@ -2781,7 +2781,7 @@ def build_collection_create_or_update_bulk_request( # type: (...) -> HttpRequest content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/collections/{collection}/entity/bulk') @@ -2817,7 +2817,7 @@ def build_collection_move_entities_to_collection_request( # type: (...) -> HttpRequest content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2021-09-01" + api_version = "2021-05-01-preview" accept = "application/json" # Construct URL url = kwargs.pop("template_url", '/collections/{collection}/entity/moveHere') diff --git a/sdk/purview/azure-purview-catalog/setup.py b/sdk/purview/azure-purview-catalog/setup.py index 43f38c4a7cea..e08897cdef1c 100644 --- a/sdk/purview/azure-purview-catalog/setup.py +++ b/sdk/purview/azure-purview-catalog/setup.py @@ -68,6 +68,7 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'License :: OSI Approved :: MIT License', ], zip_safe=False, diff --git a/sdk/purview/azure-purview-catalog/swagger/README.md b/sdk/purview/azure-purview-catalog/swagger/README.md index b6cb636770c2..9d836a8f7dce 100644 --- a/sdk/purview/azure-purview-catalog/swagger/README.md +++ b/sdk/purview/azure-purview-catalog/swagger/README.md @@ -20,7 +20,7 @@ autorest ### Settings ```yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-09-01/purviewcatalog.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/purview/data-plane/Azure.Analytics.Purview.Catalog/preview/2021-05-01-preview/purviewcatalog.json output-folder: ../azure/purview/catalog namespace: azure.purview.catalog package-name: azure-purview-catalog diff --git a/sdk/purview/azure-purview-catalog/tests/recordings/test_smoke.test_basic_smoke_test.yaml b/sdk/purview/azure-purview-catalog/tests/recordings/test_smoke.test_basic_smoke_test.yaml index fb94e512755d..e13ed2015ae0 100644 --- a/sdk/purview/azure-purview-catalog/tests/recordings/test_smoke.test_basic_smoke_test.yaml +++ b/sdk/purview/azure-purview-catalog/tests/recordings/test_smoke.test_basic_smoke_test.yaml @@ -9,9 +9,9 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-purview-catalog/1.0.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-purview-catalog/1.0.0b3 Python/3.7.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_account.catalog.purview.azure.com/catalog/api/atlas/v2/types/typedefs?includeTermTemplate=false + uri: https://fake_account.purview.azure.com/catalog/api/atlas/v2/types/typedefs?includeTermTemplate=false response: body: string: "{\"enumDefs\":[{\"category\":\"ENUM\",\"guid\":\"6e30d01e-f5d0-9799-08e7-09b4f276c09c\",\"createdBy\":\"admin\",\"updatedBy\":\"admin\",\"createTime\":1615787943686,\"updateTime\":1615787943686,\"version\":1,\"name\":\"glossary_term_status_value\",\"description\":\"glossary_term_status_value\",\"typeVersion\":\"1.0\",\"lastModifiedTS\":\"1\",\"elementDefs\":[{\"value\":\"Approved\",\"ordinal\":0},{\"value\":\"Alert\",\"ordinal\":1},{\"value\":\"Expired\",\"ordinal\":2},{\"value\":\"Draft\",\"ordinal\":3}]},{\"category\":\"ENUM\",\"guid\":\"42185ddb-29be-e911-ea52-890154eb07c0\",\"createdBy\":\"admin\",\"updatedBy\":\"admin\",\"createTime\":1615787943608,\"updateTime\":1615787943973,\"version\":2,\"name\":\"AtlasGlossaryTermRelationshipStatus\",\"description\":\"TermRelationshipStatus @@ -1095,7 +1095,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Tue, 28 Sep 2021 05:49:25 GMT + - Thu, 21 Oct 2021 05:46:58 GMT expires: - '0' pragma: diff --git a/sdk/purview/azure-purview-catalog/tests/recordings/test_smoke_async.test_basic_smoke_test.yaml b/sdk/purview/azure-purview-catalog/tests/recordings/test_smoke_async.test_basic_smoke_test.yaml index c9b18ef120ee..b08717d96805 100644 --- a/sdk/purview/azure-purview-catalog/tests/recordings/test_smoke_async.test_basic_smoke_test.yaml +++ b/sdk/purview/azure-purview-catalog/tests/recordings/test_smoke_async.test_basic_smoke_test.yaml @@ -5,9 +5,9 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-purview-catalog/1.0.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-purview-catalog/1.0.0b3 Python/3.7.3 (Windows-10-10.0.19041-SP0) method: GET - uri: https://fake_account.catalog.purview.azure.com/catalog/api/atlas/v2/types/typedefs?includeTermTemplate=false + uri: https://fake_account.purview.azure.com/catalog/api/atlas/v2/types/typedefs?includeTermTemplate=false response: body: string: "{\"enumDefs\":[{\"category\":\"ENUM\",\"guid\":\"6e30d01e-f5d0-9799-08e7-09b4f276c09c\",\"createdBy\":\"admin\",\"updatedBy\":\"admin\",\"createTime\":1615787943686,\"updateTime\":1615787943686,\"version\":1,\"name\":\"glossary_term_status_value\",\"description\":\"glossary_term_status_value\",\"typeVersion\":\"1.0\",\"lastModifiedTS\":\"1\",\"elementDefs\":[{\"value\":\"Approved\",\"ordinal\":0},{\"value\":\"Alert\",\"ordinal\":1},{\"value\":\"Expired\",\"ordinal\":2},{\"value\":\"Draft\",\"ordinal\":3}]},{\"category\":\"ENUM\",\"guid\":\"42185ddb-29be-e911-ea52-890154eb07c0\",\"createdBy\":\"admin\",\"updatedBy\":\"admin\",\"createTime\":1615787943608,\"updateTime\":1615787943973,\"version\":2,\"name\":\"AtlasGlossaryTermRelationshipStatus\",\"description\":\"TermRelationshipStatus @@ -1083,7 +1083,7 @@ interactions: ''unsafe-eval'' blob: data:; connect-src ''self''; img-src ''self'' blob: data:; style-src ''self'' ''unsafe-inline'';font-src ''self'' data:' content-type: application/json; charset=utf-8 - date: Tue, 28 Sep 2021 05:49:58 GMT + date: Thu, 21 Oct 2021 05:47:17 GMT expires: '0' pragma: no-cache server: AzurePurview diff --git a/sdk/purview/azure-purview-catalog/tests/testcase.py b/sdk/purview/azure-purview-catalog/tests/testcase.py index 76811331f8fc..d2349c29496d 100644 --- a/sdk/purview/azure-purview-catalog/tests/testcase.py +++ b/sdk/purview/azure-purview-catalog/tests/testcase.py @@ -23,5 +23,5 @@ def create_client(self, endpoint): PurviewCatalogPowerShellPreparer = functools.partial( PowerShellPreparer, "purviewcatalog", - purviewcatalog_endpoint="https://fake_account.catalog.purview.azure.com" + purviewcatalog_endpoint="https://fake_account.purview.azure.com" ) diff --git a/sdk/purview/azure-purview-scanning/CHANGELOG.md b/sdk/purview/azure-purview-scanning/CHANGELOG.md index 87b5c044ebfe..8316be0a8ae5 100644 --- a/sdk/purview/azure-purview-scanning/CHANGELOG.md +++ b/sdk/purview/azure-purview-scanning/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0b3 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0b2 (2021-09-29) **Features** diff --git a/sdk/purview/azure-purview-scanning/README.md b/sdk/purview/azure-purview-scanning/README.md index 6e09e75dc30d..f48ecfa8307d 100644 --- a/sdk/purview/azure-purview-scanning/README.md +++ b/sdk/purview/azure-purview-scanning/README.md @@ -10,6 +10,10 @@ Azure Purview Scanning is a fully managed cloud service whose users can scan you [Source code][source_code] | [Package (PyPI)][scanning_pypi] | [API reference documentation][scanning_ref_docs]| [Product documentation][scanning_product_documentation] +## _Disclaimer_ + +_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ + ## Getting started ### Prerequisites @@ -156,6 +160,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential [request_builders_and_client]: https://aka.ms/azsdk/python/protocol/quickstart [enable_aad]: https://docs.microsoft.com/azure/purview/create-catalog-portal#add-a-security-principal-to-a-data-plane-role +[azure_core]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md [python_logging]: https://docs.python.org/3.5/library/logging.html [cla]: https://cla.microsoft.com [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ diff --git a/sdk/purview/azure-purview-scanning/azure/purview/scanning/_version.py b/sdk/purview/azure-purview-scanning/azure/purview/scanning/_version.py index dfa6ee022f15..20971492f129 100644 --- a/sdk/purview/azure-purview-scanning/azure/purview/scanning/_version.py +++ b/sdk/purview/azure-purview-scanning/azure/purview/scanning/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0b3" diff --git a/sdk/purview/azure-purview-scanning/setup.py b/sdk/purview/azure-purview-scanning/setup.py index b0c6a88eadf9..d59e71d7bc51 100644 --- a/sdk/purview/azure-purview-scanning/setup.py +++ b/sdk/purview/azure-purview-scanning/setup.py @@ -68,6 +68,7 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'License :: OSI Approved :: MIT License', ], zip_safe=False, diff --git a/sdk/purview/ci.yml b/sdk/purview/ci.yml index ec7853234383..c647395dd3be 100644 --- a/sdk/purview/ci.yml +++ b/sdk/purview/ci.yml @@ -35,3 +35,5 @@ extends: safeName: azurepurviewscanning - name: azure-purview-catalog safeName: azurepurviewcatalog + - name: azure-purview-administration + safeName: azurepurviewadministration diff --git a/sdk/quota/azure-mgmt-quota/CHANGELOG.md b/sdk/quota/azure-mgmt-quota/CHANGELOG.md index e399913622d6..5550654cf70a 100644 --- a/sdk/quota/azure-mgmt-quota/CHANGELOG.md +++ b/sdk/quota/azure-mgmt-quota/CHANGELOG.md @@ -1,5 +1,16 @@ # Release History +## 1.0.0b2 (2021-11-01) + +**Features** + + - Added operation group QuotaOperationOperations + +**Breaking changes** + + - Parameter limit_object_type of model LimitObject is now required + - Removed operation group OperationOperations + ## 1.0.0b1 (2021-09-07) * Initial Release diff --git a/sdk/quota/azure-mgmt-quota/_meta.json b/sdk/quota/azure-mgmt-quota/_meta.json index d10a9618d290..c011ed505d51 100644 --- a/sdk/quota/azure-mgmt-quota/_meta.json +++ b/sdk/quota/azure-mgmt-quota/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "17c68996ed7e30574adb5a51311954990932f768", + "commit": "348665d474283df6a73d6a2ec6defef271251f13", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/quota/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/quota/resource-manager/readme.md" diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_azure_quota_extension_api.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_azure_quota_extension_api.py index 8a48b3a48d0c..625493b8b8f7 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_azure_quota_extension_api.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_azure_quota_extension_api.py @@ -22,7 +22,7 @@ from .operations import UsagesOperations from .operations import QuotaOperations from .operations import QuotaRequestStatusOperations -from .operations import OperationOperations +from .operations import QuotaOperationOperations from . import models @@ -35,8 +35,8 @@ class AzureQuotaExtensionAPI(object): :vartype quota: azure.mgmt.quota.operations.QuotaOperations :ivar quota_request_status: QuotaRequestStatusOperations operations :vartype quota_request_status: azure.mgmt.quota.operations.QuotaRequestStatusOperations - :ivar operation: OperationOperations operations - :vartype operation: azure.mgmt.quota.operations.OperationOperations + :ivar quota_operation: QuotaOperationOperations operations + :vartype quota_operation: azure.mgmt.quota.operations.QuotaOperationOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param str base_url: Service URL @@ -66,7 +66,7 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.quota_request_status = QuotaRequestStatusOperations( self._client, self._config, self._serialize, self._deserialize) - self.operation = OperationOperations( + self.quota_operation = QuotaOperationOperations( self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_metadata.json b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_metadata.json index 96aa0db20c72..9319b687bfc5 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_metadata.json +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_metadata.json @@ -89,6 +89,6 @@ "usages": "UsagesOperations", "quota": "QuotaOperations", "quota_request_status": "QuotaRequestStatusOperations", - "operation": "OperationOperations" + "quota_operation": "QuotaOperationOperations" } } \ No newline at end of file diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_version.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_version.py index e5754a47ce68..dfa6ee022f15 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_version.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0b2" diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/_azure_quota_extension_api.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/_azure_quota_extension_api.py index 5390e9b8e7ce..b71939d8524c 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/_azure_quota_extension_api.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/_azure_quota_extension_api.py @@ -20,7 +20,7 @@ from .operations import UsagesOperations from .operations import QuotaOperations from .operations import QuotaRequestStatusOperations -from .operations import OperationOperations +from .operations import QuotaOperationOperations from .. import models @@ -33,8 +33,8 @@ class AzureQuotaExtensionAPI(object): :vartype quota: azure.mgmt.quota.aio.operations.QuotaOperations :ivar quota_request_status: QuotaRequestStatusOperations operations :vartype quota_request_status: azure.mgmt.quota.aio.operations.QuotaRequestStatusOperations - :ivar operation: OperationOperations operations - :vartype operation: azure.mgmt.quota.aio.operations.OperationOperations + :ivar quota_operation: QuotaOperationOperations operations + :vartype quota_operation: azure.mgmt.quota.aio.operations.QuotaOperationOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param str base_url: Service URL @@ -63,7 +63,7 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.quota_request_status = QuotaRequestStatusOperations( self._client, self._config, self._serialize, self._deserialize) - self.operation = OperationOperations( + self.quota_operation = QuotaOperationOperations( self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_quota_operation_operations.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_quota_operation_operations.py new file mode 100644 index 000000000000..1b874a4117f7 --- /dev/null +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/aio/operations/_quota_operation_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class QuotaOperationOperations: + """QuotaOperationOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.quota.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs: Any + ) -> AsyncIterable["_models.OperationList"]: + """GET quota operations. + + List all the operations supported by the Microsoft.Quota resource provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.quota.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.Quota/operations'} # type: ignore diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/__init__.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/__init__.py index 5be9e5f27a73..4e46eef56772 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/__init__.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/__init__.py @@ -14,7 +14,6 @@ from ._models_py3 import ExceptionResponse from ._models_py3 import LimitJsonObject from ._models_py3 import LimitObject - from ._models_py3 import LimitValue from ._models_py3 import OperationDisplay from ._models_py3 import OperationList from ._models_py3 import OperationResponse @@ -42,7 +41,6 @@ from ._models import ExceptionResponse # type: ignore from ._models import LimitJsonObject # type: ignore from ._models import LimitObject # type: ignore - from ._models import LimitValue # type: ignore from ._models import OperationDisplay # type: ignore from ._models import OperationList # type: ignore from ._models import OperationResponse # type: ignore @@ -78,7 +76,6 @@ 'ExceptionResponse', 'LimitJsonObject', 'LimitObject', - 'LimitValue', 'OperationDisplay', 'OperationList', 'OperationResponse', diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models.py index 2dec4fb51c19..e39626514d18 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models.py @@ -166,7 +166,7 @@ class LimitJsonObject(msrest.serialization.Model): """LimitJson abstract class. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LimitValue. + sub-classes are: LimitObject. All required parameters must be populated in order to send to Azure. @@ -184,7 +184,7 @@ class LimitJsonObject(msrest.serialization.Model): } _subtype_map = { - 'limit_object_type': {'LimitValue': 'LimitValue'} + 'limit_object_type': {'LimitValue': 'LimitObject'} } def __init__( @@ -195,75 +195,40 @@ def __init__( self.limit_object_type = None # type: Optional[str] -class LimitObject(msrest.serialization.Model): +class LimitObject(LimitJsonObject): """The resource quota limit value. All required parameters must be populated in order to send to Azure. - :param value: Required. The quota/limit value. - :type value: int - :param limit_object_type: The limit object type. Possible values include: "LimitValue". + :param limit_object_type: Required. The limit object type.Constant filled by server. Possible + values include: "LimitValue". :type limit_object_type: str or ~azure.mgmt.quota.models.LimitType - :param limit_type: The quota or usages limit types. Possible values include: "Independent", - "Shared". - :type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'int'}, - 'limit_object_type': {'key': 'limitObjectType', 'type': 'str'}, - 'limit_type': {'key': 'limitType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LimitObject, self).__init__(**kwargs) - self.value = kwargs['value'] - self.limit_object_type = kwargs.get('limit_object_type', None) - self.limit_type = kwargs.get('limit_type', None) - - -class LimitValue(LimitJsonObject, LimitObject): - """The resource quota limit. - - All required parameters must be populated in order to send to Azure. - :param value: Required. The quota/limit value. :type value: int :param limit_type: The quota or usages limit types. Possible values include: "Independent", "Shared". :type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes - :param limit_object_type: Required. The limit object type.Constant filled by server. Possible - values include: "LimitValue". - :type limit_object_type: str or ~azure.mgmt.quota.models.LimitType """ _validation = { - 'value': {'required': True}, 'limit_object_type': {'required': True}, + 'value': {'required': True}, } _attribute_map = { + 'limit_object_type': {'key': 'limitObjectType', 'type': 'str'}, 'value': {'key': 'value', 'type': 'int'}, 'limit_type': {'key': 'limitType', 'type': 'str'}, - 'limit_object_type': {'key': 'limitObjectType', 'type': 'str'}, } def __init__( self, **kwargs ): - super(LimitValue, self).__init__(**kwargs) + super(LimitObject, self).__init__(**kwargs) + self.limit_object_type = 'LimitValue' # type: str self.value = kwargs['value'] self.limit_type = kwargs.get('limit_type', None) - self.limit_object_type = 'LimitValue' # type: str - self.limit_object_type = 'LimitValue' # type: str class OperationDisplay(msrest.serialization.Model): diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models_py3.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models_py3.py index fe580dfba37d..88a6eb5d100a 100644 --- a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models_py3.py +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/models/_models_py3.py @@ -178,7 +178,7 @@ class LimitJsonObject(msrest.serialization.Model): """LimitJson abstract class. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LimitValue. + sub-classes are: LimitObject. All required parameters must be populated in order to send to Azure. @@ -196,7 +196,7 @@ class LimitJsonObject(msrest.serialization.Model): } _subtype_map = { - 'limit_object_type': {'LimitValue': 'LimitValue'} + 'limit_object_type': {'LimitValue': 'LimitObject'} } def __init__( @@ -207,68 +207,30 @@ def __init__( self.limit_object_type = None # type: Optional[str] -class LimitObject(msrest.serialization.Model): +class LimitObject(LimitJsonObject): """The resource quota limit value. All required parameters must be populated in order to send to Azure. - :param value: Required. The quota/limit value. - :type value: int - :param limit_object_type: The limit object type. Possible values include: "LimitValue". + :param limit_object_type: Required. The limit object type.Constant filled by server. Possible + values include: "LimitValue". :type limit_object_type: str or ~azure.mgmt.quota.models.LimitType - :param limit_type: The quota or usages limit types. Possible values include: "Independent", - "Shared". - :type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes - """ - - _validation = { - 'value': {'required': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'int'}, - 'limit_object_type': {'key': 'limitObjectType', 'type': 'str'}, - 'limit_type': {'key': 'limitType', 'type': 'str'}, - } - - def __init__( - self, - *, - value: int, - limit_object_type: Optional[Union[str, "LimitType"]] = None, - limit_type: Optional[Union[str, "QuotaLimitTypes"]] = None, - **kwargs - ): - super(LimitObject, self).__init__(**kwargs) - self.value = value - self.limit_object_type = limit_object_type - self.limit_type = limit_type - - -class LimitValue(LimitJsonObject, LimitObject): - """The resource quota limit. - - All required parameters must be populated in order to send to Azure. - :param value: Required. The quota/limit value. :type value: int :param limit_type: The quota or usages limit types. Possible values include: "Independent", "Shared". :type limit_type: str or ~azure.mgmt.quota.models.QuotaLimitTypes - :param limit_object_type: Required. The limit object type.Constant filled by server. Possible - values include: "LimitValue". - :type limit_object_type: str or ~azure.mgmt.quota.models.LimitType """ _validation = { - 'value': {'required': True}, 'limit_object_type': {'required': True}, + 'value': {'required': True}, } _attribute_map = { + 'limit_object_type': {'key': 'limitObjectType', 'type': 'str'}, 'value': {'key': 'value', 'type': 'int'}, 'limit_type': {'key': 'limitType', 'type': 'str'}, - 'limit_object_type': {'key': 'limitObjectType', 'type': 'str'}, } def __init__( @@ -278,11 +240,10 @@ def __init__( limit_type: Optional[Union[str, "QuotaLimitTypes"]] = None, **kwargs ): - super(LimitValue, self).__init__(value=value, limit_type=limit_type, **kwargs) + super(LimitObject, self).__init__(**kwargs) + self.limit_object_type = 'LimitValue' # type: str self.value = value self.limit_type = limit_type - self.limit_object_type = 'LimitValue' # type: str - self.limit_object_type = 'LimitValue' # type: str class OperationDisplay(msrest.serialization.Model): diff --git a/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/operations/_quota_operation_operations.py b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/operations/_quota_operation_operations.py new file mode 100644 index 000000000000..b13d9b64324e --- /dev/null +++ b/sdk/quota/azure-mgmt-quota/azure/mgmt/quota/operations/_quota_operation_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class QuotaOperationOperations(object): + """QuotaOperationOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.quota.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.OperationList"] + """GET quota operations. + + List all the operations supported by the Microsoft.Quota resource provider. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either OperationList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.quota.models.OperationList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-03-15-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('OperationList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ExceptionResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/providers/Microsoft.Quota/operations'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md index f19efb3856f5..a6cb10ac0dd1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/CHANGELOG.md @@ -1,5 +1,39 @@ # Release History +## 3.0.0 (2021-10-19) + +**Features** + + - Model GenericProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureSqlProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureFileshareProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureIaaSVMProtectionPolicy has a new parameter resource_guard_operation_requests + - Model BackupResourceVaultConfig has a new parameter resource_guard_operation_requests + - Model AzureIaaSVMProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureIaaSClassicComputeVMProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureFileShareProtectionPolicy has a new parameter resource_guard_operation_requests + - Model DPMProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureVmWorkloadSAPAseDatabaseProtectedItem has a new parameter resource_guard_operation_requests + - Model ProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureVmWorkloadSAPHanaDatabaseProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureVmWorkloadProtectionPolicy has a new parameter resource_guard_operation_requests + - Model AzureIaaSComputeVMProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureFileshareProtectedItemAutoGenerated has a new parameter resource_guard_operation_requests + - Model MabProtectionPolicy has a new parameter resource_guard_operation_requests + - Model MabFileFolderProtectedItem has a new parameter resource_guard_operation_requests + - Model GenericProtectionPolicy has a new parameter resource_guard_operation_requests + - Model AzureVmWorkloadSQLDatabaseProtectedItem has a new parameter resource_guard_operation_requests + - Model AzureSqlProtectionPolicy has a new parameter resource_guard_operation_requests + - Model ProtectionPolicy has a new parameter resource_guard_operation_requests + - Model AzureVmWorkloadProtectedItem has a new parameter resource_guard_operation_requests + - Added operation group ResourceGuardProxyOperations + - Added operation group BackupResourceStorageConfigsNonCRROperations + - Added operation group ResourceGuardProxiesOperations + +**Breaking changes** + + - Operation SecurityPINsOperations.get has a new signature + ## 2.0.0 (2021-07-26) **Features** diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json index 07efe9eeb0c1..c79fa0f25239 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "69c20e89a4f94f99cdbc627f5c33812732b2fa32", + "commit": "33998161763a845ec4160ab09bb5de7d70befb37", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/recoveryservicesbackup/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/recoveryservicesbackup/resource-manager/readme.md" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json index cfc20b01486a..6861dba04dd3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_metadata.json @@ -1,6 +1,6 @@ { "chosen_version": "", - "total_api_version_list": ["2018-12-20", "2021-06-01"], + "total_api_version_list": ["2018-12-20", "2021-08-01"], "client": { "name": "RecoveryServicesBackupClient", "filename": "_recovery_services_backup_client", @@ -98,6 +98,7 @@ "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { + "backup_resource_storage_configs_non_crr": "BackupResourceStorageConfigsNonCRROperations", "protection_intent": "ProtectionIntentOperations", "backup_status": "BackupStatusOperations", "feature_support": "FeatureSupportOperations", @@ -140,6 +141,8 @@ "backup_protection_containers": "BackupProtectionContainersOperations", "security_pins": "SecurityPINsOperations", "recovery_points_recommended_for_move": "RecoveryPointsRecommendedForMoveOperations", + "resource_guard_proxies": "ResourceGuardProxiesOperations", + "resource_guard_proxy": "ResourceGuardProxyOperations", "backup_usage_summaries_crr": "BackupUsageSummariesCRROperations", "aad_properties": "AadPropertiesOperations", "cross_region_restore": "CrossRegionRestoreOperations", diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py index 2ea5aff9a86c..117a2c2f0d77 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_recovery_services_backup_client.py @@ -19,6 +19,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import RecoveryServicesBackupClientConfiguration +from .operations import BackupResourceStorageConfigsNonCRROperations from .operations import ProtectionIntentOperations from .operations import BackupStatusOperations from .operations import FeatureSupportOperations @@ -62,6 +63,8 @@ from .operations import BackupProtectionContainersOperations from .operations import SecurityPINsOperations from .operations import RecoveryPointsRecommendedForMoveOperations +from .operations import ResourceGuardProxiesOperations +from .operations import ResourceGuardProxyOperations from .operations import BackupUsageSummariesCRROperations from .operations import AadPropertiesOperations from .operations import CrossRegionRestoreOperations @@ -78,6 +81,8 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): """Open API 2.0 Specs for Azure RecoveryServices Backup service. + :ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations operations + :vartype backup_resource_storage_configs_non_crr: azure.mgmt.recoveryservicesbackup.operations.BackupResourceStorageConfigsNonCRROperations :ivar protection_intent: ProtectionIntentOperations operations :vartype protection_intent: azure.mgmt.recoveryservicesbackup.operations.ProtectionIntentOperations :ivar backup_status: BackupStatusOperations operations @@ -162,6 +167,10 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): :vartype security_pins: azure.mgmt.recoveryservicesbackup.operations.SecurityPINsOperations :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMoveOperations operations :vartype recovery_points_recommended_for_move: azure.mgmt.recoveryservicesbackup.operations.RecoveryPointsRecommendedForMoveOperations + :ivar resource_guard_proxies: ResourceGuardProxiesOperations operations + :vartype resource_guard_proxies: azure.mgmt.recoveryservicesbackup.operations.ResourceGuardProxiesOperations + :ivar resource_guard_proxy: ResourceGuardProxyOperations operations + :vartype resource_guard_proxy: azure.mgmt.recoveryservicesbackup.operations.ResourceGuardProxyOperations :ivar backup_usage_summaries_crr: BackupUsageSummariesCRROperations operations :vartype backup_usage_summaries_crr: azure.mgmt.recoveryservicesbackup.operations.BackupUsageSummariesCRROperations :ivar aad_properties: AadPropertiesOperations operations @@ -208,6 +217,8 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self.backup_resource_storage_configs_non_crr = BackupResourceStorageConfigsNonCRROperations( + self._client, self._config, self._serialize, self._deserialize) self.protection_intent = ProtectionIntentOperations( self._client, self._config, self._serialize, self._deserialize) self.backup_status = BackupStatusOperations( @@ -292,6 +303,10 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.recovery_points_recommended_for_move = RecoveryPointsRecommendedForMoveOperations( self._client, self._config, self._serialize, self._deserialize) + self.resource_guard_proxies = ResourceGuardProxiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_guard_proxy = ResourceGuardProxyOperations( + self._client, self._config, self._serialize, self._deserialize) self.backup_usage_summaries_crr = BackupUsageSummariesCRROperations( self._client, self._config, self._serialize, self._deserialize) self.aad_properties = AadPropertiesOperations( diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_version.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_version.py index 48944bf3938a..cac9f5d10f8b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_version.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "3.0.0" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py index 16e044d07a34..005ca4363a81 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/_recovery_services_backup_client.py @@ -17,6 +17,7 @@ from azure.core.credentials_async import AsyncTokenCredential from ._configuration import RecoveryServicesBackupClientConfiguration +from .operations import BackupResourceStorageConfigsNonCRROperations from .operations import ProtectionIntentOperations from .operations import BackupStatusOperations from .operations import FeatureSupportOperations @@ -60,6 +61,8 @@ from .operations import BackupProtectionContainersOperations from .operations import SecurityPINsOperations from .operations import RecoveryPointsRecommendedForMoveOperations +from .operations import ResourceGuardProxiesOperations +from .operations import ResourceGuardProxyOperations from .operations import BackupUsageSummariesCRROperations from .operations import AadPropertiesOperations from .operations import CrossRegionRestoreOperations @@ -76,6 +79,8 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): """Open API 2.0 Specs for Azure RecoveryServices Backup service. + :ivar backup_resource_storage_configs_non_crr: BackupResourceStorageConfigsNonCRROperations operations + :vartype backup_resource_storage_configs_non_crr: azure.mgmt.recoveryservicesbackup.aio.operations.BackupResourceStorageConfigsNonCRROperations :ivar protection_intent: ProtectionIntentOperations operations :vartype protection_intent: azure.mgmt.recoveryservicesbackup.aio.operations.ProtectionIntentOperations :ivar backup_status: BackupStatusOperations operations @@ -160,6 +165,10 @@ class RecoveryServicesBackupClient(RecoveryServicesBackupClientOperationsMixin): :vartype security_pins: azure.mgmt.recoveryservicesbackup.aio.operations.SecurityPINsOperations :ivar recovery_points_recommended_for_move: RecoveryPointsRecommendedForMoveOperations operations :vartype recovery_points_recommended_for_move: azure.mgmt.recoveryservicesbackup.aio.operations.RecoveryPointsRecommendedForMoveOperations + :ivar resource_guard_proxies: ResourceGuardProxiesOperations operations + :vartype resource_guard_proxies: azure.mgmt.recoveryservicesbackup.aio.operations.ResourceGuardProxiesOperations + :ivar resource_guard_proxy: ResourceGuardProxyOperations operations + :vartype resource_guard_proxy: azure.mgmt.recoveryservicesbackup.aio.operations.ResourceGuardProxyOperations :ivar backup_usage_summaries_crr: BackupUsageSummariesCRROperations operations :vartype backup_usage_summaries_crr: azure.mgmt.recoveryservicesbackup.aio.operations.BackupUsageSummariesCRROperations :ivar aad_properties: AadPropertiesOperations operations @@ -205,6 +214,8 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self.backup_resource_storage_configs_non_crr = BackupResourceStorageConfigsNonCRROperations( + self._client, self._config, self._serialize, self._deserialize) self.protection_intent = ProtectionIntentOperations( self._client, self._config, self._serialize, self._deserialize) self.backup_status = BackupStatusOperations( @@ -289,6 +300,10 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.recovery_points_recommended_for_move = RecoveryPointsRecommendedForMoveOperations( self._client, self._config, self._serialize, self._deserialize) + self.resource_guard_proxies = ResourceGuardProxiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.resource_guard_proxy = ResourceGuardProxyOperations( + self._client, self._config, self._serialize, self._deserialize) self.backup_usage_summaries_crr = BackupUsageSummariesCRROperations( self._client, self._config, self._serialize, self._deserialize) self.aad_properties = AadPropertiesOperations( diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py index 0a98531d9680..18922f7c05ca 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/__init__.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._backup_resource_storage_configs_non_crr_operations import BackupResourceStorageConfigsNonCRROperations from ._protection_intent_operations import ProtectionIntentOperations from ._backup_status_operations import BackupStatusOperations from ._feature_support_operations import FeatureSupportOperations @@ -49,6 +50,8 @@ from ._backup_protection_containers_operations import BackupProtectionContainersOperations from ._security_pins_operations import SecurityPINsOperations from ._recovery_points_recommended_for_move_operations import RecoveryPointsRecommendedForMoveOperations +from ._resource_guard_proxies_operations import ResourceGuardProxiesOperations +from ._resource_guard_proxy_operations import ResourceGuardProxyOperations from ._backup_usage_summaries_crr_operations import BackupUsageSummariesCRROperations from ._aad_properties_operations import AadPropertiesOperations from ._cross_region_restore_operations import CrossRegionRestoreOperations @@ -61,6 +64,7 @@ from ._backup_protected_items_crr_operations import BackupProtectedItemsCrrOperations __all__ = [ + 'BackupResourceStorageConfigsNonCRROperations', 'ProtectionIntentOperations', 'BackupStatusOperations', 'FeatureSupportOperations', @@ -104,6 +108,8 @@ 'BackupProtectionContainersOperations', 'SecurityPINsOperations', 'RecoveryPointsRecommendedForMoveOperations', + 'ResourceGuardProxiesOperations', + 'ResourceGuardProxyOperations', 'BackupUsageSummariesCRROperations', 'AadPropertiesOperations', 'CrossRegionRestoreOperations', diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py index a8648df9e8fd..1ce4e0ebec45 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_engines_operations.py @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -159,7 +159,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py index 12dd1d525f70..430595b7536c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_jobs_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py index 2bdbab07d5a5..95133fff9367 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_results_operations.py @@ -72,7 +72,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py index a848ba1bf576..8cd176c631cf 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_operation_statuses_operations.py @@ -70,7 +70,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py index abe7feee2d52..3967929896a4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_policies_operations.py @@ -69,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py index d6e649b7727b..21bae8c191ff 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protectable_items_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py index 9e7706723a1f..c7bad3d93cee 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protected_items_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py index 5a067d472b8a..29ee2e76da4f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_containers_operations.py @@ -67,7 +67,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py index dd4c941cbd02..05f6e525d95b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_protection_intent_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py index 380a1a2f1816..68c83bd32ee8 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_encryption_configs_operations.py @@ -63,7 +63,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py new file mode 100644 index 000000000000..788b63884e92 --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_storage_configs_non_crr_operations.py @@ -0,0 +1,234 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class BackupResourceStorageConfigsNonCRROperations: + """BackupResourceStorageConfigsNonCRROperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + vault_name: str, + resource_group_name: str, + **kwargs: Any + ) -> "_models.BackupResourceConfigResource": + """Fetches resource storage config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupResourceConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + async def update( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.BackupResourceConfigResource", + **kwargs: Any + ) -> "_models.BackupResourceConfigResource": + """Updates vault storage model type. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault storage config request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupResourceConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + async def patch( + self, + vault_name: str, + resource_group_name: str, + parameters: "_models.BackupResourceConfigResource", + **kwargs: Any + ) -> None: + """Updates vault storage model type. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault storage config request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + patch.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py index 4837887d3a44..b2e18c702187 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_resource_vault_configs_operations.py @@ -63,7 +63,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -126,7 +126,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -194,7 +194,7 @@ async def put( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py index 853085e4a96e..dc0c7c2f02d1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_status_operations.py @@ -64,7 +64,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py index ccd39a29c7a1..bc52e2816490 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_usage_summaries_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py index 27965454c664..11e174ca0e70 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backup_workload_items_operations.py @@ -78,7 +78,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py index c4068d3fd280..11146ac1dccb 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_backups_operations.py @@ -77,7 +77,7 @@ async def trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py index b7436131a7b4..d14c3bbf0275 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_bms_prepare_data_move_operation_result_operations.py @@ -66,7 +66,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py index 6a0b2bf41970..c7997ded8267 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_export_jobs_operation_results_operations.py @@ -69,7 +69,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py index 2878e0f6cdfb..11b4fa1f718b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_feature_support_operations.py @@ -64,7 +64,7 @@ async def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py index 9c7c34ed3808..792f2c1d5a72 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_item_level_recovery_connections_operations.py @@ -84,7 +84,7 @@ async def provision( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -165,7 +165,7 @@ async def revoke( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py index 90f3de5325e8..faf0003b1264 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_cancellations_operations.py @@ -67,7 +67,7 @@ async def trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py index f96f4fe26602..2c414b6ef84f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_details_operations.py @@ -66,7 +66,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py index 543669073af5..a1f8619f45fe 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_job_operation_results_operations.py @@ -69,7 +69,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py index 4258dc1a2327..147c1894dd63 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_jobs_operations.py @@ -66,7 +66,7 @@ async def export( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py index d228620b4d73..6e3cee0cc621 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operation_operations.py @@ -66,7 +66,7 @@ async def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py index c86191e6d7e6..05afdd6d1eb2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py index a079b5c712ed..c2b3f37d920a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_connection_operations.py @@ -68,7 +68,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -119,7 +119,7 @@ async def _put_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -254,7 +254,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py index 7c06a988accb..854defc51872 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_private_endpoint_operations.py @@ -71,7 +71,7 @@ async def get_operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py index a912d6bf5014..8586ab983b2c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protectable_containers_operations.py @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py index 2013cabcec05..8bc5e8d6d19c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_results_operations.py @@ -76,7 +76,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py index b3126631a033..8bb130c80e31 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_item_operation_statuses_operations.py @@ -79,7 +79,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py index eebff3edd3cb..b07aeeee5605 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protected_items_operations.py @@ -77,7 +77,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -156,7 +156,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -236,7 +236,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py index 3160cc7cfca2..bd672d6b34c7 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_operation_results_operations.py @@ -73,7 +73,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py index 27477da5f7d7..bfd7be202c44 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_container_refresh_operation_results_operations.py @@ -70,7 +70,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py index 8917dcf0b8d6..86a68423c19f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_containers_operations.py @@ -69,7 +69,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -142,7 +142,7 @@ async def register( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -220,7 +220,7 @@ async def unregister( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -290,7 +290,7 @@ async def inquire( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -359,7 +359,7 @@ async def refresh( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py index cc235a6c6e7e..4bc44e635772 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_intent_operations.py @@ -74,7 +74,7 @@ async def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -145,7 +145,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -215,7 +215,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -287,7 +287,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self.delete.metadata['url'] # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py index 65fb2e01eeaa..780f9cf3c709 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policies_operations.py @@ -70,7 +70,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -138,7 +138,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -194,7 +194,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py index 7f2085e9859c..a55b144a34b7 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_results_operations.py @@ -70,7 +70,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py index 20033855cb0c..2516e3ee1c39 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_protection_policy_operation_statuses_operations.py @@ -74,7 +74,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py index 270103f291df..95bb1a0d204a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_operations.py @@ -76,7 +76,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -170,7 +170,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_recommended_for_move_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_recommended_for_move_operations.py index 64abf5ad501d..333dfbbb404e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_recommended_for_move_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_points_recommended_for_move_operations.py @@ -76,7 +76,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = "application/json" accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py index 51ce3c0f9b53..826126f917c1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_recovery_services_backup_client_operations.py @@ -48,7 +48,7 @@ async def get_operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ async def _bms_prepare_data_move_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -218,7 +218,7 @@ async def _bms_trigger_data_move_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -342,7 +342,7 @@ async def _move_recovery_point_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_network_interfaces_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py similarity index 78% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_network_interfaces_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py index 951adf93ca5d..10327e979ac2 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_load_balancer_network_interfaces_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxies_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerNetworkInterfacesOperations: - """LoadBalancerNetworkInterfacesOperations async operations. +class ResourceGuardProxiesOperations: + """ResourceGuardProxiesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~azure.mgmt.recoveryservicesbackup.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -41,30 +41,31 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - def list( + def get( self, + vault_name: str, resource_group_name: str, - load_balancer_name: str, **kwargs: Any - ) -> AsyncIterable["_models.NetworkInterfaceListResult"]: - """Gets associated load balancer network interfaces. + ) -> AsyncIterable["_models.ResourceGuardProxyBaseResourceList"]: + """List the ResourceGuardProxies under vault. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either ResourceGuardProxyBaseResourceList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-08-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -73,10 +74,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -92,7 +93,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('ResourceGuardProxyBaseResourceList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -113,4 +114,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py new file mode 100644 index 000000000000..a4729c9db30e --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_resource_guard_proxy_operations.py @@ -0,0 +1,299 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ResourceGuardProxyOperations: + """ResourceGuardProxyOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + vault_name: str, + resource_group_name: str, + resource_guard_proxy_name: str, + **kwargs: Any + ) -> "_models.ResourceGuardProxyBaseResource": + """Returns ResourceGuardProxy under vault and with the name referenced in request. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardProxyBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardProxyBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + async def put( + self, + vault_name: str, + resource_group_name: str, + resource_guard_proxy_name: str, + **kwargs: Any + ) -> "_models.ResourceGuardProxyBaseResource": + """Add or Update ResourceGuardProxy under vault + Secures vault critical operations. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardProxyBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardProxyBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + async def delete( + self, + vault_name: str, + resource_group_name: str, + resource_guard_proxy_name: str, + **kwargs: Any + ) -> None: + """Delete ResourceGuardProxy under vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + async def unlock_delete( + self, + vault_name: str, + resource_group_name: str, + resource_guard_proxy_name: str, + parameters: "_models.UnlockDeleteRequest", + **kwargs: Any + ) -> "_models.UnlockDeleteResponse": + """Secures delete ResourceGuardProxy operations. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UnlockDeleteResponse, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnlockDeleteResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.unlock_delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'UnlockDeleteRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UnlockDeleteResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + unlock_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py index 491d644e6fda..33a0889d3743 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_restores_operations.py @@ -58,7 +58,7 @@ async def _trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py index 5a175d092d5d..65bb65fe414f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/aio/operations/_security_pins_operations.py @@ -44,6 +44,7 @@ async def get( self, vault_name: str, resource_group_name: str, + parameters: Optional["_models.SecurityPinBase"] = None, **kwargs: Any ) -> "_models.TokenInformation": """Get the security PIN. @@ -53,6 +54,8 @@ async def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :param parameters: security pin request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.SecurityPinBase :keyword callable cls: A custom type or function that will be passed the direct response :return: TokenInformation, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.TokenInformation @@ -63,7 +66,8 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL @@ -81,9 +85,16 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'SecurityPinBase') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py index 95a67b27e4ee..f41e1a2c24a3 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/__init__.py @@ -186,7 +186,9 @@ from ._models_py3 import IaasVMRecoveryPoint from ._models_py3 import IaasVMRecoveryPointAutoGenerated from ._models_py3 import IaasVMRestoreRequest + from ._models_py3 import IaasVMRestoreRequestAutoGenerated from ._models_py3 import IaasVMRestoreWithRehydrationRequest + from ._models_py3 import IdentityBasedRestoreDetails from ._models_py3 import IdentityInfo from ._models_py3 import InquiryInfo from ._models_py3 import InquiryValidation @@ -267,6 +269,10 @@ from ._models_py3 import RecoveryPointResourceList from ._models_py3 import RecoveryPointTierInformation from ._models_py3 import Resource + from ._models_py3 import ResourceGuardOperationDetail + from ._models_py3 import ResourceGuardProxyBase + from ._models_py3 import ResourceGuardProxyBaseResource + from ._models_py3 import ResourceGuardProxyBaseResourceList from ._models_py3 import ResourceHealthDetails from ._models_py3 import ResourceList from ._models_py3 import RestoreFileSpecs @@ -277,6 +283,7 @@ from ._models_py3 import SQLDataDirectory from ._models_py3 import SQLDataDirectoryMapping from ._models_py3 import SchedulePolicy + from ._models_py3 import SecurityPinBase from ._models_py3 import Settings from ._models_py3 import SimpleRetentionPolicy from ._models_py3 import SimpleSchedulePolicy @@ -285,6 +292,8 @@ from ._models_py3 import TargetRestoreInfo from ._models_py3 import TokenInformation from ._models_py3 import TriggerDataMoveRequest + from ._models_py3 import UnlockDeleteRequest + from ._models_py3 import UnlockDeleteResponse from ._models_py3 import ValidateIaasVMRestoreOperationRequest from ._models_py3 import ValidateOperationRequest from ._models_py3 import ValidateOperationResponse @@ -485,7 +494,9 @@ from ._models import IaasVMRecoveryPoint # type: ignore from ._models import IaasVMRecoveryPointAutoGenerated # type: ignore from ._models import IaasVMRestoreRequest # type: ignore + from ._models import IaasVMRestoreRequestAutoGenerated # type: ignore from ._models import IaasVMRestoreWithRehydrationRequest # type: ignore + from ._models import IdentityBasedRestoreDetails # type: ignore from ._models import IdentityInfo # type: ignore from ._models import InquiryInfo # type: ignore from ._models import InquiryValidation # type: ignore @@ -566,6 +577,10 @@ from ._models import RecoveryPointResourceList # type: ignore from ._models import RecoveryPointTierInformation # type: ignore from ._models import Resource # type: ignore + from ._models import ResourceGuardOperationDetail # type: ignore + from ._models import ResourceGuardProxyBase # type: ignore + from ._models import ResourceGuardProxyBaseResource # type: ignore + from ._models import ResourceGuardProxyBaseResourceList # type: ignore from ._models import ResourceHealthDetails # type: ignore from ._models import ResourceList # type: ignore from ._models import RestoreFileSpecs # type: ignore @@ -576,6 +591,7 @@ from ._models import SQLDataDirectory # type: ignore from ._models import SQLDataDirectoryMapping # type: ignore from ._models import SchedulePolicy # type: ignore + from ._models import SecurityPinBase # type: ignore from ._models import Settings # type: ignore from ._models import SimpleRetentionPolicy # type: ignore from ._models import SimpleSchedulePolicy # type: ignore @@ -584,6 +600,8 @@ from ._models import TargetRestoreInfo # type: ignore from ._models import TokenInformation # type: ignore from ._models import TriggerDataMoveRequest # type: ignore + from ._models import UnlockDeleteRequest # type: ignore + from ._models import UnlockDeleteResponse # type: ignore from ._models import ValidateIaasVMRestoreOperationRequest # type: ignore from ._models import ValidateOperationRequest # type: ignore from ._models import ValidateOperationResponse # type: ignore @@ -848,7 +866,9 @@ 'IaasVMRecoveryPoint', 'IaasVMRecoveryPointAutoGenerated', 'IaasVMRestoreRequest', + 'IaasVMRestoreRequestAutoGenerated', 'IaasVMRestoreWithRehydrationRequest', + 'IdentityBasedRestoreDetails', 'IdentityInfo', 'InquiryInfo', 'InquiryValidation', @@ -929,6 +949,10 @@ 'RecoveryPointResourceList', 'RecoveryPointTierInformation', 'Resource', + 'ResourceGuardOperationDetail', + 'ResourceGuardProxyBase', + 'ResourceGuardProxyBaseResource', + 'ResourceGuardProxyBaseResourceList', 'ResourceHealthDetails', 'ResourceList', 'RestoreFileSpecs', @@ -939,6 +963,7 @@ 'SQLDataDirectory', 'SQLDataDirectoryMapping', 'SchedulePolicy', + 'SecurityPinBase', 'Settings', 'SimpleRetentionPolicy', 'SimpleSchedulePolicy', @@ -947,6 +972,8 @@ 'TargetRestoreInfo', 'TokenInformation', 'TriggerDataMoveRequest', + 'UnlockDeleteRequest', + 'UnlockDeleteResponse', 'ValidateIaasVMRestoreOperationRequest', 'ValidateOperationRequest', 'ValidateOperationResponse', diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py index 0b985ae2553c..d6c2ee83e4e7 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models.py @@ -789,6 +789,9 @@ class ProtectedItem(msrest.serialization.Model): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] """ _validation = { @@ -810,6 +813,7 @@ class ProtectedItem(msrest.serialization.Model): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, } _subtype_map = { @@ -835,6 +839,7 @@ def __init__( self.deferred_delete_time_remaining = kwargs.get('deferred_delete_time_remaining', None) self.is_deferred_delete_schedule_upcoming = kwargs.get('is_deferred_delete_schedule_upcoming', None) self.is_rehydrate = kwargs.get('is_rehydrate', None) + self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) class AzureFileshareProtectedItem(ProtectedItem): @@ -881,6 +886,9 @@ class AzureFileshareProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the fileshare represented by this backup item. :type friendly_name: str :param protection_status: Backup status of this backup item. @@ -919,6 +927,7 @@ class AzureFileshareProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -987,6 +996,9 @@ class AzureFileshareProtectedItemAutoGenerated(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the fileshare represented by this backup item. :type friendly_name: str :param protection_status: Backup status of this backup item. @@ -1028,6 +1040,7 @@ class AzureFileshareProtectedItemAutoGenerated(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -1112,6 +1125,8 @@ class ProtectionPolicy(msrest.serialization.Model): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] """ _validation = { @@ -1121,6 +1136,7 @@ class ProtectionPolicy(msrest.serialization.Model): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, } _subtype_map = { @@ -1134,6 +1150,7 @@ def __init__( super(ProtectionPolicy, self).__init__(**kwargs) self.protected_items_count = kwargs.get('protected_items_count', None) self.backup_management_type = None # type: Optional[str] + self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) class AzureFileShareProtectionPolicy(ProtectionPolicy): @@ -1146,6 +1163,8 @@ class AzureFileShareProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param work_load_type: Type of workload for the backup management. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", @@ -1167,6 +1186,7 @@ class AzureFileShareProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, @@ -1381,7 +1401,7 @@ class RestoreRequest(msrest.serialization.Model): """Base class for restore request. Workload-specific restore requests are derived from this class. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequest. + sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequestAutoGenerated. All required parameters must be populated in order to send to Azure. @@ -1399,7 +1419,7 @@ class RestoreRequest(msrest.serialization.Model): } _subtype_map = { - 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequestAutoGenerated'} } def __init__( @@ -1733,6 +1753,9 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the VM represented by this backup item. :type friendly_name: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this @@ -1783,6 +1806,7 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -1865,6 +1889,9 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the VM represented by this backup item. :type friendly_name: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this @@ -1915,6 +1942,7 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -2083,6 +2111,9 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the VM represented by this backup item. :type friendly_name: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this @@ -2133,6 +2164,7 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -2532,6 +2564,8 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param instant_rp_details: :type instant_rp_details: ~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails :param schedule_policy: Backup schedule specified as part of backup policy. @@ -2552,6 +2586,7 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'instant_rp_details': {'key': 'instantRPDetails', 'type': 'InstantRPAdditionalDetails'}, 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, @@ -2981,6 +3016,9 @@ class AzureSqlProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. :type protected_item_data_id: str @@ -3012,6 +3050,7 @@ class AzureSqlProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, @@ -3066,6 +3105,8 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param retention_policy: Retention policy details. :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ @@ -3077,6 +3118,7 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } @@ -3832,6 +3874,9 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the DB represented by this backup item. :type friendly_name: str :param server_name: Host/Cluster Name for instance or AG. @@ -3887,6 +3932,7 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -3965,6 +4011,8 @@ class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param work_load_type: Type of workload for the backup management. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", @@ -3987,6 +4035,7 @@ class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, 'settings': {'key': 'settings', 'type': 'Settings'}, 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, @@ -4049,6 +4098,9 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the DB represented by this backup item. :type friendly_name: str :param server_name: Host/Cluster Name for instance or AG. @@ -4104,6 +4156,7 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -4405,6 +4458,9 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the DB represented by this backup item. :type friendly_name: str :param server_name: Host/Cluster Name for instance or AG. @@ -4460,6 +4516,7 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -4825,6 +4882,9 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the DB represented by this backup item. :type friendly_name: str :param server_name: Host/Cluster Name for instance or AG. @@ -4880,6 +4940,7 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -7218,6 +7279,8 @@ class BackupResourceVaultConfig(msrest.serialization.Model): "Invalid", "Enabled", "Disabled". :type soft_delete_feature_state: str or ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] """ _attribute_map = { @@ -7226,6 +7289,7 @@ class BackupResourceVaultConfig(msrest.serialization.Model): 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, } def __init__( @@ -7238,6 +7302,7 @@ def __init__( self.storage_type_state = kwargs.get('storage_type_state', None) self.enhanced_security_state = kwargs.get('enhanced_security_state', None) self.soft_delete_feature_state = kwargs.get('soft_delete_feature_state', None) + self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) class BackupResourceVaultConfigResource(Resource): @@ -8739,6 +8804,9 @@ class DPMProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the managed item. :type friendly_name: str :param backup_engine_name: Backup Management server protecting this backup item. @@ -8770,6 +8838,7 @@ class DPMProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -9185,6 +9254,9 @@ class GenericProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the container. :type friendly_name: str :param policy_state: Indicates consistency of policy object and policy applied to this backup @@ -9221,6 +9293,7 @@ class GenericProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'policy_state': {'key': 'policyState', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -9253,6 +9326,8 @@ class GenericProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param sub_protection_policy: List of sub-protection policies which includes schedule and retention. :type sub_protection_policy: @@ -9271,6 +9346,7 @@ class GenericProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, 'time_zone': {'key': 'timeZone', 'type': 'str'}, 'fabric_name': {'key': 'fabricName', 'type': 'str'}, @@ -9745,6 +9821,133 @@ def __init__( self.identity_info = kwargs.get('identity_info', None) +class IaasVMRestoreRequestAutoGenerated(RestoreRequest): + """IaaS VM workload-specific restore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. This property will be used as the discriminator for deciding the + specific types in the polymorphic chain of types.Constant filled by server. + :type object_type: str + :param recovery_point_id: ID of the backup copy to be recovered. + :type recovery_point_id: str + :param recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :type source_resource_id: str + :param target_virtual_machine_id: This is the complete ARM Id of the VM that will be created. + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :type target_virtual_machine_id: str + :param target_resource_group_id: This is the ARM Id of the resource group that you want to + create for this Virtual machine and other artifacts. + For e.g. /subscriptions/{subId}/resourcegroups/{rg}. + :type target_resource_group_id: str + :param storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to + be restored. + :type storage_account_id: str + :param virtual_network_id: This is the virtual network Id of the vnet that will be attached to + the virtual machine. + User will be validated for join action permissions in the linked access. + :type virtual_network_id: str + :param subnet_id: Subnet ID, is the subnet ID associated with the to be restored VM. For + Classic VMs it would be + {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource + ID used to represent + the subnet. + :type subnet_id: str + :param target_domain_name_id: Fully qualified ARM ID of the domain name to be associated to the + VM being restored. This applies only to Classic + Virtual Machines. + :type target_domain_name_id: str + :param region: Region in which the virtual machine is restored. + :type region: str + :param affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :type affinity_group: str + :param create_new_cloud_service: Should a new cloud service be created while restoring the VM. + If this is false, VM will be restored to the same + cloud service as it was at the time of backup. + :type create_new_cloud_service: bool + :param original_storage_account_option: Original Storage Account Option. + :type original_storage_account_option: bool + :param encryption_details: Details needed if the VM was encrypted at the time of backup. + :type encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :param restore_disk_lun_list: List of Disk LUNs for partial restore. + :type restore_disk_lun_list: list[int] + :param restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :type restore_with_managed_disks: bool + :param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be encrypted + at rest during restore with customer managed key. + :type disk_encryption_set_id: str + :param zones: Target zone where the VM and its disks should be restored. + :type zones: list[str] + :param identity_info: Managed Identity information required to access customer storage account. + :type identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :param identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :type identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, + 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, + 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, + } + + def __init__( + self, + **kwargs + ): + super(IaasVMRestoreRequestAutoGenerated, self).__init__(**kwargs) + self.object_type = 'IaasVMRestoreRequest' # type: str + self.recovery_point_id = kwargs.get('recovery_point_id', None) + self.recovery_type = kwargs.get('recovery_type', None) + self.source_resource_id = kwargs.get('source_resource_id', None) + self.target_virtual_machine_id = kwargs.get('target_virtual_machine_id', None) + self.target_resource_group_id = kwargs.get('target_resource_group_id', None) + self.storage_account_id = kwargs.get('storage_account_id', None) + self.virtual_network_id = kwargs.get('virtual_network_id', None) + self.subnet_id = kwargs.get('subnet_id', None) + self.target_domain_name_id = kwargs.get('target_domain_name_id', None) + self.region = kwargs.get('region', None) + self.affinity_group = kwargs.get('affinity_group', None) + self.create_new_cloud_service = kwargs.get('create_new_cloud_service', None) + self.original_storage_account_option = kwargs.get('original_storage_account_option', None) + self.encryption_details = kwargs.get('encryption_details', None) + self.restore_disk_lun_list = kwargs.get('restore_disk_lun_list', None) + self.restore_with_managed_disks = kwargs.get('restore_with_managed_disks', None) + self.disk_encryption_set_id = kwargs.get('disk_encryption_set_id', None) + self.zones = kwargs.get('zones', None) + self.identity_info = kwargs.get('identity_info', None) + self.identity_based_restore_details = kwargs.get('identity_based_restore_details', None) + + class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): """IaaS VM workload-specific restore with integrated rehydration of recovery point. @@ -9852,6 +10055,29 @@ def __init__( self.recovery_point_rehydration_info = kwargs.get('recovery_point_rehydration_info', None) +class IdentityBasedRestoreDetails(msrest.serialization.Model): + """IaaS VM workload specific restore details for restores using managed identity. + + :param object_type: Gets the class type. + :type object_type: str + :param target_storage_account_id: Fully qualified ARM ID of the target storage account. + :type target_storage_account_id: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'target_storage_account_id': {'key': 'targetStorageAccountId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IdentityBasedRestoreDetails, self).__init__(**kwargs) + self.object_type = kwargs.get('object_type', None) + self.target_storage_account_id = kwargs.get('target_storage_account_id', None) + + class IdentityInfo(msrest.serialization.Model): """Encapsulates Managed Identity related information. @@ -10640,6 +10866,9 @@ class MabFileFolderProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of this backup item. :type friendly_name: str :param computer_name: Name of the computer associated with this backup item. @@ -10676,6 +10905,7 @@ class MabFileFolderProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'computer_name': {'key': 'computerName', 'type': 'str'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, @@ -10883,6 +11113,8 @@ class MabProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param schedule_policy: Backup schedule of backup policy. :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy :param retention_policy: Retention policy details. @@ -10896,6 +11128,7 @@ class MabProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } @@ -12472,6 +12705,130 @@ def __init__( self.extended_info = kwargs.get('extended_info', None) +class ResourceGuardOperationDetail(msrest.serialization.Model): + """ResourceGuardOperationDetail. + + :param vault_critical_operation: + :type vault_critical_operation: str + :param default_resource_request: + :type default_resource_request: str + """ + + _attribute_map = { + 'vault_critical_operation': {'key': 'vaultCriticalOperation', 'type': 'str'}, + 'default_resource_request': {'key': 'defaultResourceRequest', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuardOperationDetail, self).__init__(**kwargs) + self.vault_critical_operation = kwargs.get('vault_critical_operation', None) + self.default_resource_request = kwargs.get('default_resource_request', None) + + +class ResourceGuardProxyBase(msrest.serialization.Model): + """ResourceGuardProxyBase. + + :param resource_guard_resource_id: + :type resource_guard_resource_id: str + :param resource_guard_operation_details: + :type resource_guard_operation_details: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardOperationDetail] + :param last_updated_time: + :type last_updated_time: str + :param description: + :type description: str + """ + + _attribute_map = { + 'resource_guard_resource_id': {'key': 'resourceGuardResourceId', 'type': 'str'}, + 'resource_guard_operation_details': {'key': 'resourceGuardOperationDetails', 'type': '[ResourceGuardOperationDetail]'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuardProxyBase, self).__init__(**kwargs) + self.resource_guard_resource_id = kwargs.get('resource_guard_resource_id', None) + self.resource_guard_operation_details = kwargs.get('resource_guard_operation_details', None) + self.last_updated_time = kwargs.get('last_updated_time', None) + self.description = kwargs.get('description', None) + + +class ResourceGuardProxyBaseResource(Resource): + """ResourceGuardProxyBaseResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ResourceGuardProxyBaseResource properties. + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ResourceGuardProxyBase'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuardProxyBaseResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) + + +class ResourceGuardProxyBaseResourceList(ResourceList): + """List of ResourceGuardProxyBase resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ResourceGuardProxyBaseResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceGuardProxyBaseResourceList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class RestoreFileSpecs(msrest.serialization.Model): """Restore file specs like file path, type and target folder path info. @@ -12571,6 +12928,25 @@ def __init__( self.duration_type = kwargs.get('duration_type', None) +class SecurityPinBase(msrest.serialization.Model): + """Base class for get security pin request body. + + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] + """ + + _attribute_map = { + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(SecurityPinBase, self).__init__(**kwargs) + self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) + + class Settings(msrest.serialization.Model): """Common settings field for backup management. @@ -12893,6 +13269,49 @@ def __init__( self.pause_gc = kwargs.get('pause_gc', None) +class UnlockDeleteRequest(msrest.serialization.Model): + """Request body of unlock delete API. + + :param resource_guard_operation_requests: + :type resource_guard_operation_requests: list[str] + :param resource_to_be_deleted: + :type resource_to_be_deleted: str + """ + + _attribute_map = { + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'resource_to_be_deleted': {'key': 'resourceToBeDeleted', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UnlockDeleteRequest, self).__init__(**kwargs) + self.resource_guard_operation_requests = kwargs.get('resource_guard_operation_requests', None) + self.resource_to_be_deleted = kwargs.get('resource_to_be_deleted', None) + + +class UnlockDeleteResponse(msrest.serialization.Model): + """Response of Unlock Delete API. + + :param unlock_delete_expiry_time: This is the time when unlock delete privileges will get + expired. + :type unlock_delete_expiry_time: str + """ + + _attribute_map = { + 'unlock_delete_expiry_time': {'key': 'unlockDeleteExpiryTime', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UnlockDeleteResponse, self).__init__(**kwargs) + self.unlock_delete_expiry_time = kwargs.get('unlock_delete_expiry_time', None) + + class ValidateOperationRequest(msrest.serialization.Model): """Base class for validate operation request. diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py index e359fd7f2ef6..73c58d14c797 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/models/_models_py3.py @@ -881,6 +881,9 @@ class ProtectedItem(msrest.serialization.Model): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] """ _validation = { @@ -902,6 +905,7 @@ class ProtectedItem(msrest.serialization.Model): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, } _subtype_map = { @@ -924,6 +928,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, **kwargs ): super(ProtectedItem, self).__init__(**kwargs) @@ -941,6 +946,7 @@ def __init__( self.deferred_delete_time_remaining = deferred_delete_time_remaining self.is_deferred_delete_schedule_upcoming = is_deferred_delete_schedule_upcoming self.is_rehydrate = is_rehydrate + self.resource_guard_operation_requests = resource_guard_operation_requests class AzureFileshareProtectedItem(ProtectedItem): @@ -987,6 +993,9 @@ class AzureFileshareProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the fileshare represented by this backup item. :type friendly_name: str :param protection_status: Backup status of this backup item. @@ -1025,6 +1034,7 @@ class AzureFileshareProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -1050,6 +1060,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, protection_status: Optional[str] = None, protection_state: Optional[Union[str, "ProtectionState"]] = None, @@ -1059,7 +1070,7 @@ def __init__( extended_info: Optional["AzureFileshareProtectedItemExtendedInfo"] = None, **kwargs ): - super(AzureFileshareProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) + super(AzureFileshareProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.protected_item_type = 'AzureFileShareProtectedItem' # type: str self.friendly_name = friendly_name self.protection_status = protection_status @@ -1114,6 +1125,9 @@ class AzureFileshareProtectedItemAutoGenerated(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the fileshare represented by this backup item. :type friendly_name: str :param protection_status: Backup status of this backup item. @@ -1155,6 +1169,7 @@ class AzureFileshareProtectedItemAutoGenerated(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -1181,6 +1196,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, protection_status: Optional[str] = None, protection_state: Optional[Union[str, "ProtectionState"]] = None, @@ -1191,7 +1207,7 @@ def __init__( extended_info: Optional["AzureFileshareProtectedItemExtendedInfo"] = None, **kwargs ): - super(AzureFileshareProtectedItemAutoGenerated, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) + super(AzureFileshareProtectedItemAutoGenerated, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.protected_item_type = 'AzureFileShareProtectedItem' # type: str self.friendly_name = friendly_name self.protection_status = protection_status @@ -1265,6 +1281,8 @@ class ProtectionPolicy(msrest.serialization.Model): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] """ _validation = { @@ -1274,6 +1292,7 @@ class ProtectionPolicy(msrest.serialization.Model): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, } _subtype_map = { @@ -1284,11 +1303,13 @@ def __init__( self, *, protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, **kwargs ): super(ProtectionPolicy, self).__init__(**kwargs) self.protected_items_count = protected_items_count self.backup_management_type = None # type: Optional[str] + self.resource_guard_operation_requests = resource_guard_operation_requests class AzureFileShareProtectionPolicy(ProtectionPolicy): @@ -1301,6 +1322,8 @@ class AzureFileShareProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param work_load_type: Type of workload for the backup management. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", @@ -1322,6 +1345,7 @@ class AzureFileShareProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, @@ -1332,13 +1356,14 @@ def __init__( self, *, protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, work_load_type: Optional[Union[str, "WorkloadType"]] = None, schedule_policy: Optional["SchedulePolicy"] = None, retention_policy: Optional["RetentionPolicy"] = None, time_zone: Optional[str] = None, **kwargs ): - super(AzureFileShareProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + super(AzureFileShareProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'AzureStorage' # type: str self.work_load_type = work_load_type self.schedule_policy = schedule_policy @@ -1550,7 +1575,7 @@ class RestoreRequest(msrest.serialization.Model): """Base class for restore request. Workload-specific restore requests are derived from this class. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequest. + sub-classes are: AzureFileShareRestoreRequest, AzureWorkloadRestoreRequest, IaasVMRestoreRequestAutoGenerated. All required parameters must be populated in order to send to Azure. @@ -1568,7 +1593,7 @@ class RestoreRequest(msrest.serialization.Model): } _subtype_map = { - 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequest'} + 'object_type': {'AzureFileShareRestoreRequest': 'AzureFileShareRestoreRequest', 'AzureWorkloadRestoreRequest': 'AzureWorkloadRestoreRequest', 'IaasVMRestoreRequest': 'IaasVMRestoreRequestAutoGenerated'} } def __init__( @@ -1937,6 +1962,9 @@ class AzureIaaSVMProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the VM represented by this backup item. :type friendly_name: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this @@ -1987,6 +2015,7 @@ class AzureIaaSVMProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -2021,6 +2050,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, virtual_machine_id: Optional[str] = None, protection_status: Optional[str] = None, @@ -2035,7 +2065,7 @@ def __init__( extended_properties: Optional["ExtendedProperties"] = None, **kwargs ): - super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) + super(AzureIaaSVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.protected_item_type = 'AzureIaaSVMProtectedItem' # type: str self.friendly_name = friendly_name self.virtual_machine_id = virtual_machine_id @@ -2095,6 +2125,9 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the VM represented by this backup item. :type friendly_name: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this @@ -2145,6 +2178,7 @@ class AzureIaaSClassicComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -2175,6 +2209,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, virtual_machine_id: Optional[str] = None, protection_status: Optional[str] = None, @@ -2189,7 +2224,7 @@ def __init__( extended_properties: Optional["ExtendedProperties"] = None, **kwargs ): - super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) + super(AzureIaaSClassicComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) self.protected_item_type = 'Microsoft.ClassicCompute/virtualMachines' # type: str @@ -2353,6 +2388,9 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the VM represented by this backup item. :type friendly_name: str :param virtual_machine_id: Fully qualified ARM ID of the virtual machine represented by this @@ -2403,6 +2441,7 @@ class AzureIaaSComputeVMProtectedItem(AzureIaaSVMProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'virtual_machine_id': {'key': 'virtualMachineId', 'type': 'str'}, 'protection_status': {'key': 'protectionStatus', 'type': 'str'}, @@ -2433,6 +2472,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, virtual_machine_id: Optional[str] = None, protection_status: Optional[str] = None, @@ -2447,7 +2487,7 @@ def __init__( extended_properties: Optional["ExtendedProperties"] = None, **kwargs ): - super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) + super(AzureIaaSComputeVMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, virtual_machine_id=virtual_machine_id, protection_status=protection_status, protection_state=protection_state, health_status=health_status, health_details=health_details, kpis_healths=kpis_healths, last_backup_status=last_backup_status, last_backup_time=last_backup_time, protected_item_data_id=protected_item_data_id, extended_info=extended_info, extended_properties=extended_properties, **kwargs) self.protected_item_type = 'Microsoft.Compute/virtualMachines' # type: str @@ -2869,6 +2909,8 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param instant_rp_details: :type instant_rp_details: ~azure.mgmt.recoveryservicesbackup.models.InstantRPAdditionalDetails :param schedule_policy: Backup schedule specified as part of backup policy. @@ -2889,6 +2931,7 @@ class AzureIaaSVMProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'instant_rp_details': {'key': 'instantRPDetails', 'type': 'InstantRPAdditionalDetails'}, 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, @@ -2900,6 +2943,7 @@ def __init__( self, *, protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, instant_rp_details: Optional["InstantRPAdditionalDetails"] = None, schedule_policy: Optional["SchedulePolicy"] = None, retention_policy: Optional["RetentionPolicy"] = None, @@ -2907,7 +2951,7 @@ def __init__( time_zone: Optional[str] = None, **kwargs ): - super(AzureIaaSVMProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + super(AzureIaaSVMProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'AzureIaasVM' # type: str self.instant_rp_details = instant_rp_details self.schedule_policy = schedule_policy @@ -3369,6 +3413,9 @@ class AzureSqlProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param protected_item_data_id: Internal ID of a backup item. Used by Azure SQL Backup engine to contact Recovery Services. :type protected_item_data_id: str @@ -3400,6 +3447,7 @@ class AzureSqlProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'protected_item_data_id': {'key': 'protectedItemDataId', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, 'extended_info': {'key': 'extendedInfo', 'type': 'AzureSqlProtectedItemExtendedInfo'}, @@ -3421,12 +3469,13 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, protected_item_data_id: Optional[str] = None, protection_state: Optional[Union[str, "ProtectedItemState"]] = None, extended_info: Optional["AzureSqlProtectedItemExtendedInfo"] = None, **kwargs ): - super(AzureSqlProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) + super(AzureSqlProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.protected_item_type = 'Microsoft.Sql/servers/databases' # type: str self.protected_item_data_id = protected_item_data_id self.protection_state = protection_state @@ -3475,6 +3524,8 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param retention_policy: Retention policy details. :type retention_policy: ~azure.mgmt.recoveryservicesbackup.models.RetentionPolicy """ @@ -3486,6 +3537,7 @@ class AzureSqlProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } @@ -3493,10 +3545,11 @@ def __init__( self, *, protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, retention_policy: Optional["RetentionPolicy"] = None, **kwargs ): - super(AzureSqlProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + super(AzureSqlProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'AzureSql' # type: str self.retention_policy = retention_policy @@ -4336,6 +4389,9 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the DB represented by this backup item. :type friendly_name: str :param server_name: Host/Cluster Name for instance or AG. @@ -4391,6 +4447,7 @@ class AzureVmWorkloadProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -4426,6 +4483,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, server_name: Optional[str] = None, parent_name: Optional[str] = None, @@ -4441,7 +4499,7 @@ def __init__( kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, **kwargs ): - super(AzureVmWorkloadProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) + super(AzureVmWorkloadProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.protected_item_type = 'AzureVmWorkloadProtectedItem' # type: str self.friendly_name = friendly_name self.server_name = server_name @@ -4500,6 +4558,8 @@ class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param work_load_type: Type of workload for the backup management. Possible values include: "Invalid", "VM", "FileFolder", "AzureSqlDb", "SQLDB", "Exchange", "Sharepoint", "VMwareVM", "SystemState", "Client", "GenericDataSource", "SQLDataBase", "AzureFileShare", @@ -4522,6 +4582,7 @@ class AzureVmWorkloadProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'work_load_type': {'key': 'workLoadType', 'type': 'str'}, 'settings': {'key': 'settings', 'type': 'Settings'}, 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, @@ -4532,13 +4593,14 @@ def __init__( self, *, protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, work_load_type: Optional[Union[str, "WorkloadType"]] = None, settings: Optional["Settings"] = None, sub_protection_policy: Optional[List["SubProtectionPolicy"]] = None, make_policy_consistent: Optional[bool] = None, **kwargs ): - super(AzureVmWorkloadProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + super(AzureVmWorkloadProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'AzureWorkload' # type: str self.work_load_type = work_load_type self.settings = settings @@ -4590,6 +4652,9 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the DB represented by this backup item. :type friendly_name: str :param server_name: Host/Cluster Name for instance or AG. @@ -4645,6 +4710,7 @@ class AzureVmWorkloadSAPAseDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -4676,6 +4742,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, server_name: Optional[str] = None, parent_name: Optional[str] = None, @@ -4691,7 +4758,7 @@ def __init__( kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, **kwargs ): - super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) + super(AzureVmWorkloadSAPAseDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) self.protected_item_type = 'AzureVmWorkloadSAPAseDatabase' # type: str @@ -5019,6 +5086,9 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the DB represented by this backup item. :type friendly_name: str :param server_name: Host/Cluster Name for instance or AG. @@ -5074,6 +5144,7 @@ class AzureVmWorkloadSAPHanaDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -5105,6 +5176,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, server_name: Optional[str] = None, parent_name: Optional[str] = None, @@ -5120,7 +5192,7 @@ def __init__( kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, **kwargs ): - super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) + super(AzureVmWorkloadSAPHanaDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) self.protected_item_type = 'AzureVmWorkloadSAPHanaDatabase' # type: str @@ -5525,6 +5597,9 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the DB represented by this backup item. :type friendly_name: str :param server_name: Host/Cluster Name for instance or AG. @@ -5580,6 +5655,7 @@ class AzureVmWorkloadSQLDatabaseProtectedItem(AzureVmWorkloadProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'server_name': {'key': 'serverName', 'type': 'str'}, 'parent_name': {'key': 'parentName', 'type': 'str'}, @@ -5611,6 +5687,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, server_name: Optional[str] = None, parent_name: Optional[str] = None, @@ -5626,7 +5703,7 @@ def __init__( kpis_healths: Optional[Dict[str, "KPIResourceHealthDetails"]] = None, **kwargs ): - super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) + super(AzureVmWorkloadSQLDatabaseProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, friendly_name=friendly_name, server_name=server_name, parent_name=parent_name, parent_type=parent_type, protection_status=protection_status, protection_state=protection_state, last_backup_status=last_backup_status, last_backup_time=last_backup_time, last_backup_error_detail=last_backup_error_detail, protected_item_data_source_id=protected_item_data_source_id, protected_item_health_status=protected_item_health_status, extended_info=extended_info, kpis_healths=kpis_healths, **kwargs) self.protected_item_type = 'AzureVmWorkloadSQLDatabase' # type: str @@ -8245,6 +8322,8 @@ class BackupResourceVaultConfig(msrest.serialization.Model): "Invalid", "Enabled", "Disabled". :type soft_delete_feature_state: str or ~azure.mgmt.recoveryservicesbackup.models.SoftDeleteFeatureState + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] """ _attribute_map = { @@ -8253,6 +8332,7 @@ class BackupResourceVaultConfig(msrest.serialization.Model): 'storage_type_state': {'key': 'storageTypeState', 'type': 'str'}, 'enhanced_security_state': {'key': 'enhancedSecurityState', 'type': 'str'}, 'soft_delete_feature_state': {'key': 'softDeleteFeatureState', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, } def __init__( @@ -8263,6 +8343,7 @@ def __init__( storage_type_state: Optional[Union[str, "StorageTypeState"]] = None, enhanced_security_state: Optional[Union[str, "EnhancedSecurityState"]] = None, soft_delete_feature_state: Optional[Union[str, "SoftDeleteFeatureState"]] = None, + resource_guard_operation_requests: Optional[List[str]] = None, **kwargs ): super(BackupResourceVaultConfig, self).__init__(**kwargs) @@ -8271,6 +8352,7 @@ def __init__( self.storage_type_state = storage_type_state self.enhanced_security_state = enhanced_security_state self.soft_delete_feature_state = soft_delete_feature_state + self.resource_guard_operation_requests = resource_guard_operation_requests class BackupResourceVaultConfigResource(Resource): @@ -9975,6 +10057,9 @@ class DPMProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the managed item. :type friendly_name: str :param backup_engine_name: Backup Management server protecting this backup item. @@ -10006,6 +10091,7 @@ class DPMProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'backup_engine_name': {'key': 'backupEngineName', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -10028,13 +10114,14 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, backup_engine_name: Optional[str] = None, protection_state: Optional[Union[str, "ProtectedItemState"]] = None, extended_info: Optional["DPMProtectedItemExtendedInfo"] = None, **kwargs ): - super(DPMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) + super(DPMProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.protected_item_type = 'DPMProtectedItem' # type: str self.friendly_name = friendly_name self.backup_engine_name = backup_engine_name @@ -10478,6 +10565,9 @@ class GenericProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of the container. :type friendly_name: str :param policy_state: Indicates consistency of policy object and policy applied to this backup @@ -10514,6 +10604,7 @@ class GenericProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'policy_state': {'key': 'policyState', 'type': 'str'}, 'protection_state': {'key': 'protectionState', 'type': 'str'}, @@ -10538,6 +10629,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, policy_state: Optional[str] = None, protection_state: Optional[Union[str, "ProtectionState"]] = None, @@ -10546,7 +10638,7 @@ def __init__( fabric_name: Optional[str] = None, **kwargs ): - super(GenericProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) + super(GenericProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.protected_item_type = 'GenericProtectedItem' # type: str self.friendly_name = friendly_name self.policy_state = policy_state @@ -10566,6 +10658,8 @@ class GenericProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param sub_protection_policy: List of sub-protection policies which includes schedule and retention. :type sub_protection_policy: @@ -10584,6 +10678,7 @@ class GenericProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'sub_protection_policy': {'key': 'subProtectionPolicy', 'type': '[SubProtectionPolicy]'}, 'time_zone': {'key': 'timeZone', 'type': 'str'}, 'fabric_name': {'key': 'fabricName', 'type': 'str'}, @@ -10593,12 +10688,13 @@ def __init__( self, *, protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, sub_protection_policy: Optional[List["SubProtectionPolicy"]] = None, time_zone: Optional[str] = None, fabric_name: Optional[str] = None, **kwargs ): - super(GenericProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + super(GenericProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'GenericProtectionPolicy' # type: str self.sub_protection_policy = sub_protection_policy self.time_zone = time_zone @@ -11124,6 +11220,154 @@ def __init__( self.identity_info = identity_info +class IaasVMRestoreRequestAutoGenerated(RestoreRequest): + """IaaS VM workload-specific restore. + + All required parameters must be populated in order to send to Azure. + + :param object_type: Required. This property will be used as the discriminator for deciding the + specific types in the polymorphic chain of types.Constant filled by server. + :type object_type: str + :param recovery_point_id: ID of the backup copy to be recovered. + :type recovery_point_id: str + :param recovery_type: Type of this recovery. Possible values include: "Invalid", + "OriginalLocation", "AlternateLocation", "RestoreDisks", "Offline". + :type recovery_type: str or ~azure.mgmt.recoveryservicesbackup.models.RecoveryType + :param source_resource_id: Fully qualified ARM ID of the VM which is being recovered. + :type source_resource_id: str + :param target_virtual_machine_id: This is the complete ARM Id of the VM that will be created. + For e.g. + /subscriptions/{subId}/resourcegroups/{rg}/provider/Microsoft.Compute/virtualmachines/{vm}. + :type target_virtual_machine_id: str + :param target_resource_group_id: This is the ARM Id of the resource group that you want to + create for this Virtual machine and other artifacts. + For e.g. /subscriptions/{subId}/resourcegroups/{rg}. + :type target_resource_group_id: str + :param storage_account_id: Fully qualified ARM ID of the storage account to which the VM has to + be restored. + :type storage_account_id: str + :param virtual_network_id: This is the virtual network Id of the vnet that will be attached to + the virtual machine. + User will be validated for join action permissions in the linked access. + :type virtual_network_id: str + :param subnet_id: Subnet ID, is the subnet ID associated with the to be restored VM. For + Classic VMs it would be + {VnetID}/Subnet/{SubnetName} and, for the Azure Resource Manager VMs it would be ARM resource + ID used to represent + the subnet. + :type subnet_id: str + :param target_domain_name_id: Fully qualified ARM ID of the domain name to be associated to the + VM being restored. This applies only to Classic + Virtual Machines. + :type target_domain_name_id: str + :param region: Region in which the virtual machine is restored. + :type region: str + :param affinity_group: Affinity group associated to VM to be restored. Used only for Classic + Compute Virtual Machines. + :type affinity_group: str + :param create_new_cloud_service: Should a new cloud service be created while restoring the VM. + If this is false, VM will be restored to the same + cloud service as it was at the time of backup. + :type create_new_cloud_service: bool + :param original_storage_account_option: Original Storage Account Option. + :type original_storage_account_option: bool + :param encryption_details: Details needed if the VM was encrypted at the time of backup. + :type encryption_details: ~azure.mgmt.recoveryservicesbackup.models.EncryptionDetails + :param restore_disk_lun_list: List of Disk LUNs for partial restore. + :type restore_disk_lun_list: list[int] + :param restore_with_managed_disks: Flag to denote of an Unmanaged disk VM should be restored + with Managed disks. + :type restore_with_managed_disks: bool + :param disk_encryption_set_id: DiskEncryptionSet's ID - needed if the VM needs to be encrypted + at rest during restore with customer managed key. + :type disk_encryption_set_id: str + :param zones: Target zone where the VM and its disks should be restored. + :type zones: list[str] + :param identity_info: Managed Identity information required to access customer storage account. + :type identity_info: ~azure.mgmt.recoveryservicesbackup.models.IdentityInfo + :param identity_based_restore_details: IaaS VM workload specific restore details for restores + using managed identity. + :type identity_based_restore_details: + ~azure.mgmt.recoveryservicesbackup.models.IdentityBasedRestoreDetails + """ + + _validation = { + 'object_type': {'required': True}, + } + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'recovery_point_id': {'key': 'recoveryPointId', 'type': 'str'}, + 'recovery_type': {'key': 'recoveryType', 'type': 'str'}, + 'source_resource_id': {'key': 'sourceResourceId', 'type': 'str'}, + 'target_virtual_machine_id': {'key': 'targetVirtualMachineId', 'type': 'str'}, + 'target_resource_group_id': {'key': 'targetResourceGroupId', 'type': 'str'}, + 'storage_account_id': {'key': 'storageAccountId', 'type': 'str'}, + 'virtual_network_id': {'key': 'virtualNetworkId', 'type': 'str'}, + 'subnet_id': {'key': 'subnetId', 'type': 'str'}, + 'target_domain_name_id': {'key': 'targetDomainNameId', 'type': 'str'}, + 'region': {'key': 'region', 'type': 'str'}, + 'affinity_group': {'key': 'affinityGroup', 'type': 'str'}, + 'create_new_cloud_service': {'key': 'createNewCloudService', 'type': 'bool'}, + 'original_storage_account_option': {'key': 'originalStorageAccountOption', 'type': 'bool'}, + 'encryption_details': {'key': 'encryptionDetails', 'type': 'EncryptionDetails'}, + 'restore_disk_lun_list': {'key': 'restoreDiskLunList', 'type': '[int]'}, + 'restore_with_managed_disks': {'key': 'restoreWithManagedDisks', 'type': 'bool'}, + 'disk_encryption_set_id': {'key': 'diskEncryptionSetId', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'identity_info': {'key': 'identityInfo', 'type': 'IdentityInfo'}, + 'identity_based_restore_details': {'key': 'identityBasedRestoreDetails', 'type': 'IdentityBasedRestoreDetails'}, + } + + def __init__( + self, + *, + recovery_point_id: Optional[str] = None, + recovery_type: Optional[Union[str, "RecoveryType"]] = None, + source_resource_id: Optional[str] = None, + target_virtual_machine_id: Optional[str] = None, + target_resource_group_id: Optional[str] = None, + storage_account_id: Optional[str] = None, + virtual_network_id: Optional[str] = None, + subnet_id: Optional[str] = None, + target_domain_name_id: Optional[str] = None, + region: Optional[str] = None, + affinity_group: Optional[str] = None, + create_new_cloud_service: Optional[bool] = None, + original_storage_account_option: Optional[bool] = None, + encryption_details: Optional["EncryptionDetails"] = None, + restore_disk_lun_list: Optional[List[int]] = None, + restore_with_managed_disks: Optional[bool] = None, + disk_encryption_set_id: Optional[str] = None, + zones: Optional[List[str]] = None, + identity_info: Optional["IdentityInfo"] = None, + identity_based_restore_details: Optional["IdentityBasedRestoreDetails"] = None, + **kwargs + ): + super(IaasVMRestoreRequestAutoGenerated, self).__init__(**kwargs) + self.object_type = 'IaasVMRestoreRequest' # type: str + self.recovery_point_id = recovery_point_id + self.recovery_type = recovery_type + self.source_resource_id = source_resource_id + self.target_virtual_machine_id = target_virtual_machine_id + self.target_resource_group_id = target_resource_group_id + self.storage_account_id = storage_account_id + self.virtual_network_id = virtual_network_id + self.subnet_id = subnet_id + self.target_domain_name_id = target_domain_name_id + self.region = region + self.affinity_group = affinity_group + self.create_new_cloud_service = create_new_cloud_service + self.original_storage_account_option = original_storage_account_option + self.encryption_details = encryption_details + self.restore_disk_lun_list = restore_disk_lun_list + self.restore_with_managed_disks = restore_with_managed_disks + self.disk_encryption_set_id = disk_encryption_set_id + self.zones = zones + self.identity_info = identity_info + self.identity_based_restore_details = identity_based_restore_details + + class IaasVMRestoreWithRehydrationRequest(IaasVMRestoreRequest): """IaaS VM workload-specific restore with integrated rehydration of recovery point. @@ -11252,6 +11496,32 @@ def __init__( self.recovery_point_rehydration_info = recovery_point_rehydration_info +class IdentityBasedRestoreDetails(msrest.serialization.Model): + """IaaS VM workload specific restore details for restores using managed identity. + + :param object_type: Gets the class type. + :type object_type: str + :param target_storage_account_id: Fully qualified ARM ID of the target storage account. + :type target_storage_account_id: str + """ + + _attribute_map = { + 'object_type': {'key': 'objectType', 'type': 'str'}, + 'target_storage_account_id': {'key': 'targetStorageAccountId', 'type': 'str'}, + } + + def __init__( + self, + *, + object_type: Optional[str] = None, + target_storage_account_id: Optional[str] = None, + **kwargs + ): + super(IdentityBasedRestoreDetails, self).__init__(**kwargs) + self.object_type = object_type + self.target_storage_account_id = target_storage_account_id + + class IdentityInfo(msrest.serialization.Model): """Encapsulates Managed Identity related information. @@ -12119,6 +12389,9 @@ class MabFileFolderProtectedItem(ProtectedItem): :type is_deferred_delete_schedule_upcoming: bool :param is_rehydrate: Flag to identify that deferred deleted DS is to be moved into Pause state. :type is_rehydrate: bool + :param resource_guard_operation_requests: ResourceGuardOperationRequests on which LAC check + will be performed. + :type resource_guard_operation_requests: list[str] :param friendly_name: Friendly name of this backup item. :type friendly_name: str :param computer_name: Name of the computer associated with this backup item. @@ -12155,6 +12428,7 @@ class MabFileFolderProtectedItem(ProtectedItem): 'deferred_delete_time_remaining': {'key': 'deferredDeleteTimeRemaining', 'type': 'str'}, 'is_deferred_delete_schedule_upcoming': {'key': 'isDeferredDeleteScheduleUpcoming', 'type': 'bool'}, 'is_rehydrate': {'key': 'isRehydrate', 'type': 'bool'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, 'computer_name': {'key': 'computerName', 'type': 'str'}, 'last_backup_status': {'key': 'lastBackupStatus', 'type': 'str'}, @@ -12180,6 +12454,7 @@ def __init__( deferred_delete_time_remaining: Optional[str] = None, is_deferred_delete_schedule_upcoming: Optional[bool] = None, is_rehydrate: Optional[bool] = None, + resource_guard_operation_requests: Optional[List[str]] = None, friendly_name: Optional[str] = None, computer_name: Optional[str] = None, last_backup_status: Optional[str] = None, @@ -12189,7 +12464,7 @@ def __init__( extended_info: Optional["MabFileFolderProtectedItemExtendedInfo"] = None, **kwargs ): - super(MabFileFolderProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, **kwargs) + super(MabFileFolderProtectedItem, self).__init__(backup_management_type=backup_management_type, workload_type=workload_type, container_name=container_name, source_resource_id=source_resource_id, policy_id=policy_id, last_recovery_point=last_recovery_point, backup_set_name=backup_set_name, create_mode=create_mode, deferred_delete_time_in_utc=deferred_delete_time_in_utc, is_scheduled_for_deferred_delete=is_scheduled_for_deferred_delete, deferred_delete_time_remaining=deferred_delete_time_remaining, is_deferred_delete_schedule_upcoming=is_deferred_delete_schedule_upcoming, is_rehydrate=is_rehydrate, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.protected_item_type = 'MabFileFolderProtectedItem' # type: str self.friendly_name = friendly_name self.computer_name = computer_name @@ -12412,6 +12687,8 @@ class MabProtectionPolicy(ProtectionPolicy): :param backup_management_type: Required. This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.Constant filled by server. :type backup_management_type: str + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] :param schedule_policy: Backup schedule of backup policy. :type schedule_policy: ~azure.mgmt.recoveryservicesbackup.models.SchedulePolicy :param retention_policy: Retention policy details. @@ -12425,6 +12702,7 @@ class MabProtectionPolicy(ProtectionPolicy): _attribute_map = { 'protected_items_count': {'key': 'protectedItemsCount', 'type': 'int'}, 'backup_management_type': {'key': 'backupManagementType', 'type': 'str'}, + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, 'schedule_policy': {'key': 'schedulePolicy', 'type': 'SchedulePolicy'}, 'retention_policy': {'key': 'retentionPolicy', 'type': 'RetentionPolicy'}, } @@ -12433,11 +12711,12 @@ def __init__( self, *, protected_items_count: Optional[int] = None, + resource_guard_operation_requests: Optional[List[str]] = None, schedule_policy: Optional["SchedulePolicy"] = None, retention_policy: Optional["RetentionPolicy"] = None, **kwargs ): - super(MabProtectionPolicy, self).__init__(protected_items_count=protected_items_count, **kwargs) + super(MabProtectionPolicy, self).__init__(protected_items_count=protected_items_count, resource_guard_operation_requests=resource_guard_operation_requests, **kwargs) self.backup_management_type = 'MAB' # type: str self.schedule_policy = schedule_policy self.retention_policy = retention_policy @@ -14177,6 +14456,146 @@ def __init__( self.extended_info = extended_info +class ResourceGuardOperationDetail(msrest.serialization.Model): + """ResourceGuardOperationDetail. + + :param vault_critical_operation: + :type vault_critical_operation: str + :param default_resource_request: + :type default_resource_request: str + """ + + _attribute_map = { + 'vault_critical_operation': {'key': 'vaultCriticalOperation', 'type': 'str'}, + 'default_resource_request': {'key': 'defaultResourceRequest', 'type': 'str'}, + } + + def __init__( + self, + *, + vault_critical_operation: Optional[str] = None, + default_resource_request: Optional[str] = None, + **kwargs + ): + super(ResourceGuardOperationDetail, self).__init__(**kwargs) + self.vault_critical_operation = vault_critical_operation + self.default_resource_request = default_resource_request + + +class ResourceGuardProxyBase(msrest.serialization.Model): + """ResourceGuardProxyBase. + + :param resource_guard_resource_id: + :type resource_guard_resource_id: str + :param resource_guard_operation_details: + :type resource_guard_operation_details: + list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardOperationDetail] + :param last_updated_time: + :type last_updated_time: str + :param description: + :type description: str + """ + + _attribute_map = { + 'resource_guard_resource_id': {'key': 'resourceGuardResourceId', 'type': 'str'}, + 'resource_guard_operation_details': {'key': 'resourceGuardOperationDetails', 'type': '[ResourceGuardOperationDetail]'}, + 'last_updated_time': {'key': 'lastUpdatedTime', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_guard_resource_id: Optional[str] = None, + resource_guard_operation_details: Optional[List["ResourceGuardOperationDetail"]] = None, + last_updated_time: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(ResourceGuardProxyBase, self).__init__(**kwargs) + self.resource_guard_resource_id = resource_guard_resource_id + self.resource_guard_operation_details = resource_guard_operation_details + self.last_updated_time = last_updated_time + self.description = description + + +class ResourceGuardProxyBaseResource(Resource): + """ResourceGuardProxyBaseResource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource Id represents the complete path to the resource. + :vartype id: str + :ivar name: Resource name associated with the resource. + :vartype name: str + :ivar type: Resource type represents the complete path of the form + Namespace/ResourceType/ResourceType/... + :vartype type: str + :param location: Resource location. + :type location: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param e_tag: Optional ETag. + :type e_tag: str + :param properties: ResourceGuardProxyBaseResource properties. + :type properties: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBase + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'e_tag': {'key': 'eTag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ResourceGuardProxyBase'}, + } + + def __init__( + self, + *, + location: Optional[str] = None, + tags: Optional[Dict[str, str]] = None, + e_tag: Optional[str] = None, + properties: Optional["ResourceGuardProxyBase"] = None, + **kwargs + ): + super(ResourceGuardProxyBaseResource, self).__init__(location=location, tags=tags, e_tag=e_tag, **kwargs) + self.properties = properties + + +class ResourceGuardProxyBaseResourceList(ResourceList): + """List of ResourceGuardProxyBase resources. + + :param next_link: The uri to fetch the next page of resources. Call ListNext() fetches next + page of resources. + :type next_link: str + :param value: List of resources. + :type value: list[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource] + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ResourceGuardProxyBaseResource]'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + value: Optional[List["ResourceGuardProxyBaseResource"]] = None, + **kwargs + ): + super(ResourceGuardProxyBaseResourceList, self).__init__(next_link=next_link, **kwargs) + self.value = value + + class RestoreFileSpecs(msrest.serialization.Model): """Restore file specs like file path, type and target folder path info. @@ -14288,6 +14707,27 @@ def __init__( self.duration_type = duration_type +class SecurityPinBase(msrest.serialization.Model): + """Base class for get security pin request body. + + :param resource_guard_operation_requests: ResourceGuard Operation Requests. + :type resource_guard_operation_requests: list[str] + """ + + _attribute_map = { + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + } + + def __init__( + self, + *, + resource_guard_operation_requests: Optional[List[str]] = None, + **kwargs + ): + super(SecurityPinBase, self).__init__(**kwargs) + self.resource_guard_operation_requests = resource_guard_operation_requests + + class Settings(msrest.serialization.Model): """Common settings field for backup management. @@ -14653,6 +15093,54 @@ def __init__( self.pause_gc = pause_gc +class UnlockDeleteRequest(msrest.serialization.Model): + """Request body of unlock delete API. + + :param resource_guard_operation_requests: + :type resource_guard_operation_requests: list[str] + :param resource_to_be_deleted: + :type resource_to_be_deleted: str + """ + + _attribute_map = { + 'resource_guard_operation_requests': {'key': 'resourceGuardOperationRequests', 'type': '[str]'}, + 'resource_to_be_deleted': {'key': 'resourceToBeDeleted', 'type': 'str'}, + } + + def __init__( + self, + *, + resource_guard_operation_requests: Optional[List[str]] = None, + resource_to_be_deleted: Optional[str] = None, + **kwargs + ): + super(UnlockDeleteRequest, self).__init__(**kwargs) + self.resource_guard_operation_requests = resource_guard_operation_requests + self.resource_to_be_deleted = resource_to_be_deleted + + +class UnlockDeleteResponse(msrest.serialization.Model): + """Response of Unlock Delete API. + + :param unlock_delete_expiry_time: This is the time when unlock delete privileges will get + expired. + :type unlock_delete_expiry_time: str + """ + + _attribute_map = { + 'unlock_delete_expiry_time': {'key': 'unlockDeleteExpiryTime', 'type': 'str'}, + } + + def __init__( + self, + *, + unlock_delete_expiry_time: Optional[str] = None, + **kwargs + ): + super(UnlockDeleteResponse, self).__init__(**kwargs) + self.unlock_delete_expiry_time = unlock_delete_expiry_time + + class ValidateOperationRequest(msrest.serialization.Model): """Base class for validate operation request. diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py index 0a98531d9680..18922f7c05ca 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/__init__.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._backup_resource_storage_configs_non_crr_operations import BackupResourceStorageConfigsNonCRROperations from ._protection_intent_operations import ProtectionIntentOperations from ._backup_status_operations import BackupStatusOperations from ._feature_support_operations import FeatureSupportOperations @@ -49,6 +50,8 @@ from ._backup_protection_containers_operations import BackupProtectionContainersOperations from ._security_pins_operations import SecurityPINsOperations from ._recovery_points_recommended_for_move_operations import RecoveryPointsRecommendedForMoveOperations +from ._resource_guard_proxies_operations import ResourceGuardProxiesOperations +from ._resource_guard_proxy_operations import ResourceGuardProxyOperations from ._backup_usage_summaries_crr_operations import BackupUsageSummariesCRROperations from ._aad_properties_operations import AadPropertiesOperations from ._cross_region_restore_operations import CrossRegionRestoreOperations @@ -61,6 +64,7 @@ from ._backup_protected_items_crr_operations import BackupProtectedItemsCrrOperations __all__ = [ + 'BackupResourceStorageConfigsNonCRROperations', 'ProtectionIntentOperations', 'BackupStatusOperations', 'FeatureSupportOperations', @@ -104,6 +108,8 @@ 'BackupProtectionContainersOperations', 'SecurityPINsOperations', 'RecoveryPointsRecommendedForMoveOperations', + 'ResourceGuardProxiesOperations', + 'ResourceGuardProxyOperations', 'BackupUsageSummariesCRROperations', 'AadPropertiesOperations', 'CrossRegionRestoreOperations', diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py index 6295460a8ea6..18b91322a7f2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_engines_operations.py @@ -76,7 +76,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -165,7 +165,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py index 65406020c59b..d4c27b63eb60 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_jobs_operations.py @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py index a6c92cfa8eb5..da93e057c37a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_results_operations.py @@ -77,7 +77,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py index 87178f9dc6d9..b2fc5c5eaef4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_operation_statuses_operations.py @@ -75,7 +75,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py index 8cde0c49cc06..96e3059e557c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_policies_operations.py @@ -74,7 +74,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py index abd525c31de6..fb64b6e5649a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protectable_items_operations.py @@ -77,7 +77,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py index 2b57c9320978..dfd4b29c25e4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protected_items_operations.py @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py index a2927c0b715c..29e77faa867c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_containers_operations.py @@ -72,7 +72,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py index a5edf8a05865..89f4f6241b10 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_protection_intent_operations.py @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py index 3ae3df4f4b3c..c2318886521d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_encryption_configs_operations.py @@ -68,7 +68,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_operations.py new file mode 100644 index 000000000000..db0a78c1b91d --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_storage_configs_non_crr_operations.py @@ -0,0 +1,241 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class BackupResourceStorageConfigsNonCRROperations(object): + """BackupResourceStorageConfigsNonCRROperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupResourceConfigResource" + """Fetches resource storage config. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupResourceConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + def update( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.BackupResourceConfigResource" + **kwargs # type: Any + ): + # type: (...) -> "_models.BackupResourceConfigResource" + """Updates vault storage model type. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault storage config request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: BackupResourceConfigResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.BackupResourceConfigResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('BackupResourceConfigResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore + + def patch( + self, + vault_name, # type: str + resource_group_name, # type: str + parameters, # type: "_models.BackupResourceConfigResource" + **kwargs # type: Any + ): + # type: (...) -> None + """Updates vault storage model type. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param parameters: Vault storage config request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.BackupResourceConfigResource + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.patch.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'BackupResourceConfigResource') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.NewErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + patch.metadata = {'url': '/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupstorageconfig/vaultstorageconfig'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py index 93ebd61fe2d5..0e194112cafe 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_resource_vault_configs_operations.py @@ -68,7 +68,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -132,7 +132,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -201,7 +201,7 @@ def put( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py index 2b9213b04ef8..b42bedf4d2d1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_status_operations.py @@ -69,7 +69,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py index b8af42f9cd50..c484700883cd 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_usage_summaries_operations.py @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py index 6b4ecd249fbf..ba086d19548e 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backup_workload_items_operations.py @@ -83,7 +83,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py index 0e8ed8e2ccca..29c41688404b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_backups_operations.py @@ -82,7 +82,7 @@ def trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py index 3e598895f507..f860d252bca6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_bms_prepare_data_move_operation_result_operations.py @@ -71,7 +71,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py index 68025e2ce1c8..875e6b29abcf 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_export_jobs_operation_results_operations.py @@ -74,7 +74,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py index 1f52b2e0fd28..073ade8447fe 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_feature_support_operations.py @@ -69,7 +69,7 @@ def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py index 344d99da69cb..a30950df6363 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_item_level_recovery_connections_operations.py @@ -89,7 +89,7 @@ def provision( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -171,7 +171,7 @@ def revoke( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py index de8ff974f9de..2713c58df457 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_cancellations_operations.py @@ -72,7 +72,7 @@ def trigger( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py index 37de125a591f..b92495c6777f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_details_operations.py @@ -71,7 +71,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py index 4d9895766519..e9aef23b51d4 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_job_operation_results_operations.py @@ -74,7 +74,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py index 78533be7feac..25692cfce608 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_jobs_operations.py @@ -71,7 +71,7 @@ def export( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py index 184f8a5652dc..e9ba5a00de5b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operation_operations.py @@ -71,7 +71,7 @@ def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py index d4a22446df43..cec78994caad 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py index c4660ecc5d4d..1b40295b6cc6 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_connection_operations.py @@ -73,7 +73,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -125,7 +125,7 @@ def _put_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -262,7 +262,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py index be9746ed6dea..540984fde373 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_private_endpoint_operations.py @@ -76,7 +76,7 @@ def get_operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py index 1389fb21a75a..0ca0df5b9c3a 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protectable_containers_operations.py @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py index e0231a44f4c0..686c9dc62299 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_results_operations.py @@ -81,7 +81,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py index 2d56f47d66b7..494d84541d12 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_item_operation_statuses_operations.py @@ -84,7 +84,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py index e664efdc9b60..97efdc1f6d6f 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protected_items_operations.py @@ -82,7 +82,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -162,7 +162,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -243,7 +243,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py index 120e47e4dd08..300a25276d95 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_operation_results_operations.py @@ -78,7 +78,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py index f1145f8470b1..2b720baee343 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_container_refresh_operation_results_operations.py @@ -75,7 +75,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py index a1d9a8108867..f39c58d3806b 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_containers_operations.py @@ -74,7 +74,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -148,7 +148,7 @@ def register( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -227,7 +227,7 @@ def unregister( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -298,7 +298,7 @@ def inquire( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -368,7 +368,7 @@ def refresh( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py index 656c5e94bdd9..68c9cb1a77b2 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_intent_operations.py @@ -79,7 +79,7 @@ def validate( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -151,7 +151,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -222,7 +222,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -295,7 +295,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" # Construct URL url = self.delete.metadata['url'] # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py index d41474a08d4f..2b48ce38183c 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policies_operations.py @@ -75,7 +75,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -144,7 +144,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -201,7 +201,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py index 1d096bc974ee..d219d859a1a9 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_results_operations.py @@ -75,7 +75,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py index 577fe0377219..7569d503d056 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_protection_policy_operation_statuses_operations.py @@ -79,7 +79,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py index 7bfd67b2d9a9..cd3d10fc73a1 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_operations.py @@ -81,7 +81,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -176,7 +176,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py index 614f98bc81b6..893f3cb6071d 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_points_recommended_for_move_operations.py @@ -81,7 +81,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = "application/json" accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py index a885e02a4da0..48810877fd87 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_recovery_services_backup_client_operations.py @@ -53,7 +53,7 @@ def get_operation_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -104,7 +104,7 @@ def _bms_prepare_data_move_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -226,7 +226,7 @@ def _bms_trigger_data_move_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -352,7 +352,7 @@ def _move_recovery_point_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_network_interfaces_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py similarity index 77% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_network_interfaces_operations.py rename to sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py index 054bc6fa2e88..b18a52a35e25 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_load_balancer_network_interfaces_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxies_operations.py @@ -23,14 +23,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class LoadBalancerNetworkInterfacesOperations(object): - """LoadBalancerNetworkInterfacesOperations operations. +class ResourceGuardProxiesOperations(object): + """ResourceGuardProxiesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_09_01.models + :type models: ~azure.mgmt.recoveryservicesbackup.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,31 +45,32 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def list( + def get( self, + vault_name, # type: str resource_group_name, # type: str - load_balancer_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.NetworkInterfaceListResult"] - """Gets associated load balancer network interfaces. + # type: (...) -> Iterable["_models.ResourceGuardProxyBaseResourceList"] + """List the ResourceGuardProxies under vault. - :param resource_group_name: The name of the resource group. + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. :type resource_group_name: str - :param load_balancer_name: The name of the load balancer. - :type load_balancer_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either NetworkInterfaceListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_09_01.models.NetworkInterfaceListResult] + :return: An iterator like instance of either ResourceGuardProxyBaseResourceList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResourceList] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.NetworkInterfaceListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResourceList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-09-01" - accept = "application/json, text/json" + api_version = "2021-08-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -78,10 +79,10 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.get.metadata['url'] # type: ignore path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'loadBalancerName': self._serialize.url("load_balancer_name", load_balancer_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -97,7 +98,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('NetworkInterfaceListResult', pipeline_response) + deserialized = self._deserialize('ResourceGuardProxyBaseResourceList', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -118,4 +119,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/loadBalancers/{loadBalancerName}/networkInterfaces'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py new file mode 100644 index 000000000000..de4740f8635c --- /dev/null +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_resource_guard_proxy_operations.py @@ -0,0 +1,307 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ResourceGuardProxyOperations(object): + """ResourceGuardProxyOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.recoveryservicesbackup.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + vault_name, # type: str + resource_group_name, # type: str + resource_guard_proxy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceGuardProxyBaseResource" + """Returns ResourceGuardProxy under vault and with the name referenced in request. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardProxyBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardProxyBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + def put( + self, + vault_name, # type: str + resource_group_name, # type: str + resource_guard_proxy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.ResourceGuardProxyBaseResource" + """Add or Update ResourceGuardProxy under vault + Secures vault critical operations. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: ResourceGuardProxyBaseResource, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.ResourceGuardProxyBaseResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceGuardProxyBaseResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self.put.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.put(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('ResourceGuardProxyBaseResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + put.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + def delete( + self, + vault_name, # type: str + resource_group_name, # type: str + resource_guard_proxy_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete ResourceGuardProxy under vault. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}'} # type: ignore + + def unlock_delete( + self, + vault_name, # type: str + resource_group_name, # type: str + resource_guard_proxy_name, # type: str + parameters, # type: "_models.UnlockDeleteRequest" + **kwargs # type: Any + ): + # type: (...) -> "_models.UnlockDeleteResponse" + """Secures delete ResourceGuardProxy operations. + + :param vault_name: The name of the recovery services vault. + :type vault_name: str + :param resource_group_name: The name of the resource group where the recovery services vault is + present. + :type resource_group_name: str + :param resource_guard_proxy_name: + :type resource_guard_proxy_name: str + :param parameters: Request body for operation. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteRequest + :keyword callable cls: A custom type or function that will be passed the direct response + :return: UnlockDeleteResponse, or the result of cls(response) + :rtype: ~azure.mgmt.recoveryservicesbackup.models.UnlockDeleteResponse + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.UnlockDeleteResponse"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.unlock_delete.metadata['url'] # type: ignore + path_format_arguments = { + 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGuardProxyName': self._serialize.url("resource_guard_proxy_name", resource_guard_proxy_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'UnlockDeleteRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('UnlockDeleteResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + unlock_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupResourceGuardProxies/{resourceGuardProxyName}/unlockDelete'} # type: ignore diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py index 1602aa24f719..7ebb62e219cb 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_restores_operations.py @@ -63,7 +63,7 @@ def _trigger_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py index 5f64f2359a27..06c421b4db77 100644 --- a/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py +++ b/sdk/recoveryservices/azure-mgmt-recoveryservicesbackup/azure/mgmt/recoveryservicesbackup/operations/_security_pins_operations.py @@ -48,6 +48,7 @@ def get( self, vault_name, # type: str resource_group_name, # type: str + parameters=None, # type: Optional["_models.SecurityPinBase"] **kwargs # type: Any ): # type: (...) -> "_models.TokenInformation" @@ -58,6 +59,8 @@ def get( :param resource_group_name: The name of the resource group where the recovery services vault is present. :type resource_group_name: str + :param parameters: security pin request. + :type parameters: ~azure.mgmt.recoveryservicesbackup.models.SecurityPinBase :keyword callable cls: A custom type or function that will be passed the direct response :return: TokenInformation, or the result of cls(response) :rtype: ~azure.mgmt.recoveryservicesbackup.models.TokenInformation @@ -68,7 +71,8 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-06-01" + api_version = "2021-08-01" + content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL @@ -86,9 +90,16 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.post(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + if parameters is not None: + body_content = self._serialize.body(parameters, 'SecurityPinBase') + else: + body_content = None + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response diff --git a/sdk/remoterendering/TestResources/testBox.fbx b/sdk/remoterendering/TestResources/testBox.fbx new file mode 100644 index 000000000000..13b967f33315 --- /dev/null +++ b/sdk/remoterendering/TestResources/testBox.fbx @@ -0,0 +1,346 @@ +; FBX 7.5.0 project file +; ---------------------------------------------------- + +FBXHeaderExtension: { + FBXHeaderVersion: 1003 + FBXVersion: 7500 + CreationTimeStamp: { + Version: 1000 + Year: 2021 + Month: 1 + Day: 24 + Hour: 10 + Minute: 15 + Second: 0 + Millisecond: 529 + } + Creator: "FBX SDK/FBX Plugins version 2018.1.1" + SceneInfo: "SceneInfo::GlobalInfo", "UserData" { + Type: "UserData" + Version: 100 + MetaData: { + Version: 100 + Title: "Exported .fbx from Lift" + Subject: "fbx" + Author: "" + Keywords: "Microsoft Community Paint" + Revision: "rev. 1.0" + Comment: "" + } + Properties70: { + P: "DocumentUrl", "KString", "Url", "", "testBox.fbx" + P: "SrcDocumentUrl", "KString", "Url", "", "testBox.fbx" + P: "Original", "Compound", "", "" + P: "Original|ApplicationVendor", "KString", "", "", "" + P: "Original|ApplicationName", "KString", "", "", "" + P: "Original|ApplicationVersion", "KString", "", "", "" + P: "Original|DateTime_GMT", "DateTime", "", "", "" + P: "Original|FileName", "KString", "", "", "" + P: "LastSaved", "Compound", "", "" + P: "LastSaved|ApplicationVendor", "KString", "", "", "" + P: "LastSaved|ApplicationName", "KString", "", "", "" + P: "LastSaved|ApplicationVersion", "KString", "", "", "" + P: "LastSaved|DateTime_GMT", "DateTime", "", "", "" + } + } +} +GlobalSettings: { + Version: 1000 + Properties70: { + P: "UpAxis", "int", "Integer", "",1 + P: "UpAxisSign", "int", "Integer", "",1 + P: "FrontAxis", "int", "Integer", "",2 + P: "FrontAxisSign", "int", "Integer", "",1 + P: "CoordAxis", "int", "Integer", "",0 + P: "CoordAxisSign", "int", "Integer", "",1 + P: "OriginalUpAxis", "int", "Integer", "",-1 + P: "OriginalUpAxisSign", "int", "Integer", "",1 + P: "UnitScaleFactor", "double", "Number", "",100 + P: "OriginalUnitScaleFactor", "double", "Number", "",1 + P: "AmbientColor", "ColorRGB", "Color", "",0,0,0 + P: "DefaultCamera", "KString", "", "", "Producer Perspective" + P: "TimeMode", "enum", "", "",0 + P: "TimeProtocol", "enum", "", "",2 + P: "SnapOnFrameMode", "enum", "", "",0 + P: "TimeSpanStart", "KTime", "Time", "",0 + P: "TimeSpanStop", "KTime", "Time", "",46186158000 + P: "CustomFrameRate", "double", "Number", "",-1 + P: "TimeMarker", "Compound", "", "" + P: "CurrentTimeMarker", "int", "Integer", "",-1 + } +} + +; Documents Description +;------------------------------------------------------------------ + +Documents: { + Count: 1 + Document: 2520542649728, "Scene", "Scene" { + Properties70: { + P: "SourceObject", "object", "", "" + P: "ActiveAnimStackName", "KString", "", "", "" + } + RootNode: 0 + } +} + +; Document References +;------------------------------------------------------------------ + +References: { +} + +; Object definitions +;------------------------------------------------------------------ + +Definitions: { + Version: 100 + Count: 4 + ObjectType: "GlobalSettings" { + Count: 1 + } + ObjectType: "Model" { + Count: 1 + PropertyTemplate: "FbxNode" { + Properties70: { + P: "QuaternionInterpolate", "enum", "", "",0 + P: "RotationOffset", "Vector3D", "Vector", "",0,0,0 + P: "RotationPivot", "Vector3D", "Vector", "",0,0,0 + P: "ScalingOffset", "Vector3D", "Vector", "",0,0,0 + P: "ScalingPivot", "Vector3D", "Vector", "",0,0,0 + P: "TranslationActive", "bool", "", "",0 + P: "TranslationMin", "Vector3D", "Vector", "",0,0,0 + P: "TranslationMax", "Vector3D", "Vector", "",0,0,0 + P: "TranslationMinX", "bool", "", "",0 + P: "TranslationMinY", "bool", "", "",0 + P: "TranslationMinZ", "bool", "", "",0 + P: "TranslationMaxX", "bool", "", "",0 + P: "TranslationMaxY", "bool", "", "",0 + P: "TranslationMaxZ", "bool", "", "",0 + P: "RotationOrder", "enum", "", "",0 + P: "RotationSpaceForLimitOnly", "bool", "", "",0 + P: "RotationStiffnessX", "double", "Number", "",0 + P: "RotationStiffnessY", "double", "Number", "",0 + P: "RotationStiffnessZ", "double", "Number", "",0 + P: "AxisLen", "double", "Number", "",10 + P: "PreRotation", "Vector3D", "Vector", "",0,0,0 + P: "PostRotation", "Vector3D", "Vector", "",0,0,0 + P: "RotationActive", "bool", "", "",0 + P: "RotationMin", "Vector3D", "Vector", "",0,0,0 + P: "RotationMax", "Vector3D", "Vector", "",0,0,0 + P: "RotationMinX", "bool", "", "",0 + P: "RotationMinY", "bool", "", "",0 + P: "RotationMinZ", "bool", "", "",0 + P: "RotationMaxX", "bool", "", "",0 + P: "RotationMaxY", "bool", "", "",0 + P: "RotationMaxZ", "bool", "", "",0 + P: "InheritType", "enum", "", "",0 + P: "ScalingActive", "bool", "", "",0 + P: "ScalingMin", "Vector3D", "Vector", "",0,0,0 + P: "ScalingMax", "Vector3D", "Vector", "",1,1,1 + P: "ScalingMinX", "bool", "", "",0 + P: "ScalingMinY", "bool", "", "",0 + P: "ScalingMinZ", "bool", "", "",0 + P: "ScalingMaxX", "bool", "", "",0 + P: "ScalingMaxY", "bool", "", "",0 + P: "ScalingMaxZ", "bool", "", "",0 + P: "GeometricTranslation", "Vector3D", "Vector", "",0,0,0 + P: "GeometricRotation", "Vector3D", "Vector", "",0,0,0 + P: "GeometricScaling", "Vector3D", "Vector", "",1,1,1 + P: "MinDampRangeX", "double", "Number", "",0 + P: "MinDampRangeY", "double", "Number", "",0 + P: "MinDampRangeZ", "double", "Number", "",0 + P: "MaxDampRangeX", "double", "Number", "",0 + P: "MaxDampRangeY", "double", "Number", "",0 + P: "MaxDampRangeZ", "double", "Number", "",0 + P: "MinDampStrengthX", "double", "Number", "",0 + P: "MinDampStrengthY", "double", "Number", "",0 + P: "MinDampStrengthZ", "double", "Number", "",0 + P: "MaxDampStrengthX", "double", "Number", "",0 + P: "MaxDampStrengthY", "double", "Number", "",0 + P: "MaxDampStrengthZ", "double", "Number", "",0 + P: "PreferedAngleX", "double", "Number", "",0 + P: "PreferedAngleY", "double", "Number", "",0 + P: "PreferedAngleZ", "double", "Number", "",0 + P: "LookAtProperty", "object", "", "" + P: "UpVectorProperty", "object", "", "" + P: "Show", "bool", "", "",1 + P: "NegativePercentShapeSupport", "bool", "", "",1 + P: "DefaultAttributeIndex", "int", "Integer", "",-1 + P: "Freeze", "bool", "", "",0 + P: "LODBox", "bool", "", "",0 + P: "Lcl Translation", "Lcl Translation", "", "A",0,0,0 + P: "Lcl Rotation", "Lcl Rotation", "", "A",0,0,0 + P: "Lcl Scaling", "Lcl Scaling", "", "A",1,1,1 + P: "Visibility", "Visibility", "", "A",1 + P: "Visibility Inheritance", "Visibility Inheritance", "", "",1 + } + } + } + ObjectType: "Material" { + Count: 1 + PropertyTemplate: "FbxSurfacePhong" { + Properties70: { + P: "ShadingModel", "KString", "", "", "Phong" + P: "MultiLayer", "bool", "", "",0 + P: "EmissiveColor", "Color", "", "A",0,0,0 + P: "EmissiveFactor", "Number", "", "A",1 + P: "AmbientColor", "Color", "", "A",0.2,0.2,0.2 + P: "AmbientFactor", "Number", "", "A",1 + P: "DiffuseColor", "Color", "", "A",0.8,0.8,0.8 + P: "DiffuseFactor", "Number", "", "A",1 + P: "Bump", "Vector3D", "Vector", "",0,0,0 + P: "NormalMap", "Vector3D", "Vector", "",0,0,0 + P: "BumpFactor", "double", "Number", "",1 + P: "TransparentColor", "Color", "", "A",0,0,0 + P: "TransparencyFactor", "Number", "", "A",0 + P: "DisplacementColor", "ColorRGB", "Color", "",0,0,0 + P: "DisplacementFactor", "double", "Number", "",1 + P: "VectorDisplacementColor", "ColorRGB", "Color", "",0,0,0 + P: "VectorDisplacementFactor", "double", "Number", "",1 + P: "SpecularColor", "Color", "", "A",0.2,0.2,0.2 + P: "SpecularFactor", "Number", "", "A",1 + P: "ShininessExponent", "Number", "", "A",20 + P: "ReflectionColor", "Color", "", "A",0,0,0 + P: "ReflectionFactor", "Number", "", "A",1 + } + } + } + ObjectType: "Geometry" { + Count: 1 + PropertyTemplate: "FbxMesh" { + Properties70: { + P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8 + P: "BBoxMin", "Vector3D", "Vector", "",0,0,0 + P: "BBoxMax", "Vector3D", "Vector", "",0,0,0 + P: "Primary Visibility", "bool", "", "",1 + P: "Casts Shadows", "bool", "", "",1 + P: "Receive Shadows", "bool", "", "",1 + } + } + } +} + +; Object properties +;------------------------------------------------------------------ + +Objects: { + Geometry: 2520544655040, "Geometry::mesh_id43", "Mesh" { + Properties70: { + P: "BBoxMin", "Vector3D", "Vector", "",-100,-100,-100 + P: "BBoxMax", "Vector3D", "Vector", "",100,100,100 + } + Vertices: *72 { + a: 100,100,-100,-100,-100,-100,-100,100,-100,100,-100,-100,-100,100,100,100,-100,100,100,100,100,-100,-100,100,100,100,100,100,-100,-100,100,100,-100,100,-100,100,-100,100,-100,-100,-100,100,-100,100,100,-100,-100,-100,-100,100,-100,100,100,100,100,100,-100,-100,100,100,-100,-100,100,100,-100,-100,100,-100,100,-100,-100,-100 + } + PolygonVertexIndex: *36 { + a: 0,1,-3,0,3,-2,4,5,-7,4,7,-6,8,9,-11,8,11,-10,12,13,-15,12,15,-14,16,17,-19,16,19,-18,20,21,-23,20,23,-22 + } + GeometryVersion: 124 + LayerElementNormal: 0 { + Version: 102 + Name: "" + MappingInformationType: "ByVertice" + ReferenceInformationType: "Direct" + Normals: *72 { + a: 0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,1,0,0,1,0,0,1,0,0,1,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0 + } + NormalsW: *24 { + a: 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + } + } + LayerElementColor: 0 { + Version: 101 + Name: "VertexColors" + MappingInformationType: "ByVertice" + ReferenceInformationType: "IndexToDirect" + Colors: *96 { + a: 0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1,0.980392156862745,0.843137254901961,0.388235294117647,1 + } + } + LayerElementUV: 0 { + Version: 101 + Name: "" + MappingInformationType: "ByVertice" + ReferenceInformationType: "Direct" + } + LayerElementMaterial: 0 { + Version: 101 + Name: "" + MappingInformationType: "AllSame" + ReferenceInformationType: "IndexToDirect" + Materials: *1 { + a: 0 + } + } + Layer: 0 { + Version: 100 + LayerElement: { + Type: "LayerElementNormal" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementMaterial" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementColor" + TypedIndex: 0 + } + LayerElement: { + Type: "LayerElementUV" + TypedIndex: 0 + } + } + } + Model: 2520544652560, "Model::root", "Mesh" { + Version: 232 + Properties70: { + P: "ScalingMax", "Vector3D", "Vector", "",0,0,0 + P: "GeometricTranslation", "Vector3D", "Vector", "",0.029182942584157,0.0412420704960823,0.200006887316704 + P: "GeometricRotation", "Vector3D", "Vector", "",19.5286376895952,-30.3983310953995,0 + P: "GeometricScaling", "Vector3D", "Vector", "",0.00176811746427344,0.00159080407945701,0.00159080401671689 + P: "DefaultAttributeIndex", "int", "Integer", "",0 + } + Shading: T + Culling: "CullingOff" + } + Material: 2520544654560, "Material::Material_50", "" { + Version: 102 + ShadingModel: "phong" + MultiLayer: 0 + Properties70: { + P: "DiffuseColor", "Color", "", "A",0.992156862745098,0.925490196078431,0.650980392156863 + P: "SpecularColor", "Color", "", "A",0.0352941176470588,0.0352941176470588,0.0352941176470588 + P: "ShininessExponent", "Number", "", "A",62.8694496154785 + P: "Emissive", "Vector3D", "Vector", "",0,0,0 + P: "Ambient", "Vector3D", "Vector", "",0.2,0.2,0.2 + P: "Diffuse", "Vector3D", "Vector", "",0.992156862745098,0.925490196078431,0.650980392156863 + P: "Specular", "Vector3D", "Vector", "",0.0352941176470588,0.0352941176470588,0.0352941176470588 + P: "Shininess", "double", "Number", "",62.8694496154785 + P: "Opacity", "double", "Number", "",1 + P: "Reflectivity", "double", "Number", "",0 + } + } +} + +; Object connections +;------------------------------------------------------------------ + +Connections: { + + ;Model::root, Model::RootNode + C: "OO",2520544652560,0 + + ;Geometry::mesh_id43, Model::root + C: "OO",2520544655040,2520544652560 + + ;Material::Material_50, Model::root + C: "OO",2520544654560,2520544652560 +} +;Takes section +;---------------------------------------------------- + +Takes: { + Current: "" +} diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/CHANGELOG.md b/sdk/remoterendering/azure-mixedreality-remoterendering/CHANGELOG.md new file mode 100644 index 000000000000..df0da6845bc4 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (2021-11-15) + +- Initial release. diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/MANIFEST.in b/sdk/remoterendering/azure-mixedreality-remoterendering/MANIFEST.in new file mode 100644 index 000000000000..50593a99f3a3 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/MANIFEST.in @@ -0,0 +1,7 @@ +include *.md +include azure/__init__.py +include azure/mixedreality/__init__.py +include LICENSE.txt +recursive-include tests *.py +recursive-include samples *.py *.md +include azure/mixedreality/remoterendering/py.typed \ No newline at end of file diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/README.md b/sdk/remoterendering/azure-mixedreality-remoterendering/README.md new file mode 100644 index 000000000000..b7545fc00572 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/README.md @@ -0,0 +1,380 @@ +[![Build Status](https://dev.azure.com/azure-sdk/public/_apis/build/status/azure-sdk-for-python.client?branchName=master)](https://dev.azure.com/azure-sdk/public/_build/latest?definitionId=46?branchName=master) + +# Azure Remote Rendering client library for Python + +Azure Remote Rendering (ARR) is a service that enables you to render high-quality, interactive 3D content in the cloud and stream it in real time to devices, such as the HoloLens 2. + +This SDK offers functionality to convert assets to the format expected by the runtime, and also to manage +the lifetime of remote rendering sessions. + +This SDK supports version "2021-01-01" of the [Remote Rendering REST API](https://docs.microsoft.com/rest/api/mixedreality/2021-01-01/remote-rendering). + +> NOTE: Once a session is running, a client application will connect to it using one of the "runtime SDKs". +> These SDKs are designed to best support the needs of an interactive application doing 3d rendering. +> They are available in ([.net](https://docs.microsoft.com/dotnet/api/microsoft.azure.remoterendering) +> or ([C++](https://docs.microsoft.com/cpp/api/remote-rendering/)). + +[Product documentation](https://docs.microsoft.com/azure/remote-rendering/) + +## _Disclaimer_ + +_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ + +# Getting started + +## Prerequisites + +You will need an [Azure subscription](https://azure.microsoft.com/free/dotnet/) and an [Azure Remote Rendering account](https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account) to use this package. + +In order to follow this tutorial it is highly recommended that you [link your storage account with your ARR account](https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts). + +## Install the package + +Install the Azure Remote Rendering client library for Python with [pip][pip]: + +```bash +pip install --pre azure-mixedreality-remoterendering +``` + +## Create and authenticate the client + +Constructing a remote rendering client requires an authenticated account, and a remote rendering endpoint. +For an account created in the eastus region, the account domain will have the form "eastus.mixedreality.azure.com". +There are several different forms of authentication: + +- Account Key authentication + - Account keys enable you to get started quickly with using Azure Remote Rendering. But before you deploy your application to production, we recommend that you update your app to use Azure AD authentication. +- Azure Active Directory (AD) token authentication + - If you're building an enterprise application and your company is using Azure AD as its identity system, you can use user-based Azure AD authentication in your app. You then grant access to your Azure Remote Rendering accounts by using your existing Azure AD security groups. You can also grant access directly to users in your organization. + - Otherwise, we recommend that you obtain Azure AD tokens from a web service that supports your app. We recommend this method for production applications because it allows you to avoid embedding the credentials for access in your client application. + +See [here](https://docs.microsoft.com/azure/remote-rendering/how-tos/authentication) for detailed instructions and information. + +In all the following examples, the client is constructed with a `endpoint` parameter. +The available endpoints correspond to regions, and the choice of endpoint determines the region in which the service performs its work. +An example is `https://remoterendering.eastus2.mixedreality.azure.com`. + +A full list of endpoints in supported regions can be found in the [Azure Remote Rendering region list](https://docs.microsoft.com/azure/remote-rendering/reference/regions). + +> NOTE: For converting assets, it is preferable to pick a region close to the storage containing the assets. + +> NOTE: For rendering, it is strongly recommended that you pick the closest region to the devices using the service. +> The time taken to communicate with the server impacts the quality of the experience. + +### Authenticating with account key authentication + +Use the `AzureKeyCredential` object to use an account identifier and account key to authenticate: + +```python +from azure.core.credentials import AzureKeyCredential +from azure.mixedreality.remoterendering import RemoteRenderingClient + +account_id = "" +account_domain = "" +account_key = "" +arr_endpoint = "" + +key_credential = AzureKeyCredential(account_key) +client = RemoteRenderingClient( + endpoint=arr_endpoint, + account_id=account_id, + account_domain=account_domain, + credential=key_credential +) +``` + +### Authenticating with a static access token + +You can pass a Mixed Reality access token as an `AccessToken` previously retrieved from the +[Mixed Reality STS service](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/mixedreality/azure-mixedreality-authentication) +to be used with a Mixed Reality client library: + +```python +from azure.mixedreality.authentication import MixedRealityStsClient +from azure.mixedreality.remoterendering import RemoteRenderingClient +account_id = "" +account_domain = "" +account_key = "" + +key_credential = AzureKeyCredential(account_key) + +client = MixedRealityStsClient(account_id, account_domain, key_credential) + +token = client.get_token() + +client = RemoteRenderingClient( + endpoint=arr_endpoint, + account_id=account_id, + account_domain=account_domain, + credential=token, +) +``` + +### Authenticating with an Azure Active Directory Credential + +Account key authentication is used in most of the examples, but you can also authenticate with Azure Active Directory +using the [Azure Identity library][azure_identity]. This is the recommended method for production applications. To use +the [DefaultAzureCredential][defaultazurecredential] provider shown below, or other credential providers provided with +the Azure SDK, please install the `@azure/identity` package: + +You will also need to [register a new AAD application][register_aad_app] and grant access to your Mixed Reality resource +by assigning the appropriate role for your Mixed Reality service to your service principal. + +```python +from azure.identity import DefaultAzureCredential +from azure.mixedreality.remoterendering import RemoteRenderingClient + +account_id = "" +account_domain = "" +default_credential = DefaultAzureCredential() + +client = RemoteRenderingClient( + endpoint=arr_endpoint, + account_id=account_id, + account_domain=account_domain, + credential=default_credential +) +``` + +## Key concepts + +### RemoteRenderingClient + +The `RemoteRenderingClient` is the client library used to access the RemoteRenderingService. +It provides methods to create and manage asset conversions and rendering sessions. + +### Long-Running Operations +Long-running operations are operations which consist of an initial request sent to the service to start an operation, +followed by polling the service at intervals to determine whether the operation has completed or failed, and if it has +succeeded, to get the result. + +Methods that convert assets, or spin up rendering sessions are modelled as long-running operations. +The client exposes a `begin_` method that returns an LROPoller or AsyncLROPoller. +Callers should wait for the operation to complete by calling result() on the poller object returned from the +`begin_` method. Sample code snippets are provided to illustrate using long-running operations +[below](#examples "Examples"). + +## Examples + +- [Convert an asset](#convert-an-asset) +- [List conversions](#list-conversions) +- [Create a session](#create-a-session) +- [Extend the lease time of a session](#extend-the-lease-time-of-a-session) +- [List sessions](#list-sessions) +- [Stop a session](#stop-a-session) + +### Convert an asset + +We assume that a RemoteRenderingClient has been constructed as described in the [Authenticate the Client](#authenticate-the-client) section. +The following snippet describes how to request that "box.fbx", found at at a path of "/input/box/box.fbx" of the blob container at the given storage container URI, gets converted. + +Converting an asset can take anywhere from seconds to hours. +This code uses an existing conversion poller and polls regularly until the conversion has finished or failed. +The default polling period is 5 seconds. +Note that a conversion poller can be retrieved using the client.get_asset_conversion_poller using the id of an existing conversion and a client. + +Once the conversion process finishes the output is written to the specified output container under a path of "/output//box.arrAsset". +The path can be retrieved from the output.asset_uri of a successful conversion. + +```python + conversion_id = str(uuid.uuid4()) # A randomly generated uuid is a good choice for a conversion_id. + + input_settings = AssetConversionInputSettings( + storage_container_uri="", + relative_input_asset_path="box.fbx", + blob_prefix="input/box" + ) + output_settings = AssetConversionOutputSettings( + storage_container_uri="", + blob_prefix="output/"+conversion_id, + output_asset_filename="convertedBox.arrAsset" #if no output_asset_filename .arrAsset will be the name of the resulting converted asset + ) + try: + conversion_poller = client.begin_asset_conversion( + conversion_id=conversion_id, + input_settings=input_settings, + output_settings=output_settings + ) + + print("Conversion with id:", conversion_id, "created. Waiting for completion.") + conversion = conversion_poller.result() + print("conversion output:", conversion.output.asset_uri) + + except Exception as e: + print("Conversion failed", e) +``` + +### List conversions + +You can get information about your conversions using the `list_asset_conversions` method. +This method may return conversions which have yet to start, conversions which are running and conversions which have finished. +In this example, we list all conversions and print id and creation ad as well as the output asset URIs of successful conversions. + +```python + print("conversions:") + for c in client.list_asset_conversions(): + print( + "\t conversion: id:", + c.id, + "status:", + c.status, + "created on:", + c.created_on.strftime("%m/%d/%Y, %H:%M:%S"), + ) + if c.status == AssetConversionStatus.SUCCEEDED: + print("\t\tconversion result URI:", c.output.asset_uri) +``` + +### Create a session + +We assume that a RemoteRenderingClient has been constructed as described in the [Authenticate the Client](#authenticate-the-client) section. +The following snippet describes how to request that a new rendering session be started. + +```python + print("starting rendering session with id:", session_id) + try: + session_poller = client.begin_rendering_session( + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=20 + ) + print( + "rendering session with id:", + session_id, + "created. Waiting for session to be ready.", + ) + session = session_poller.result() + print( + "session with id:", + session.id, + "is ready. lease_time_minutes:", + session.lease_time_minutes, + ) + except Exception as e: + print("Session startup failed", e) +``` + +### Extend the lease time of a session + +If a session is approaching its maximum lease time, but you want to keep it alive, you will need to make a call to +increase its maximum lease time. +This example shows how to query the current properties and then extend the lease if it will expire soon. + +> NOTE: The runtime SDKs also offer this functionality, and in many typical scenarios, you would use them to +> extend the session lease. + +```python + session = client.get_rendering_session(session_id) + if session.lease_time_minutes - session.elapsed_time_minutes < 2: + session = client.update_rendering_session( + session_id=session_id, lease_time_minutes=session.lease_time_minutes + 10 + ) +``` + +### List sessions + +You can get information about your sessions using the `list_rendering_sessions` method of the client. +This method may return sessions which have yet to start and sessions which are ready. + +```python + print("sessions:") + rendering_sessions = client.list_rendering_sessions() + for session in rendering_sessions: + print( + "\t session: id:", + session.id, + "status:", + session.status, + "created on:", + session.created_on.strftime("%m/%d/%Y, %H:%M:%S"), + ) +``` + +### Stop a Session + +The following code will stop a running session with given id. Since running sessions incur ongoing costs it is +recommended to stop sessions which are not needed anymore. + +```python + client.stop_rendering_session(session_id) + print("session with id:", session_id, "stopped") +``` + +## Troubleshooting + +For general troubleshooting advice concerning Azure Remote Rendering, see [the Troubleshoot page](https://docs.microsoft.com/azure/remote-rendering/resources/troubleshoot) for remote rendering at docs.microsoft.com. + +The client methods and waiting for poller results will throw exceptions if the request failed. + +If the asset in a conversion is invalid, the conversion poller will throw an exception with an error containing details. +Once the conversion service is able to process the file, a <assetName>.result.json file will be written to the output container. +If the input asset is invalid, then that file will contain a more detailed description of the problem. + +Similarly, sometimes when a session is requested, the session ends up in an error state. +The poller will throw an exception containing details of the error in this case. Session errors are usually transient +and requesting a new session should succeed. + +### Logging + +This library uses the standard +[logging][python_logging] library for logging. + +Basic information about HTTP sessions (URLs, headers, etc.) is logged at `INFO` level. + +Detailed `DEBUG` level logging, including request/response bodies and **unredacted** +headers, can be enabled on the client or per-operation with the `logging_enable` keyword argument. + +See full SDK logging documentation with examples [here][sdk_logging_docs]. + +### Optional Configuration + +Optional keyword arguments can be passed in at the client and per-operation level. +The azure-core [reference documentation][azure_core_ref_docs] +describes available configurations for retries, logging, transport protocols, and more. + +### Exceptions + +The Remote Rendering client library will raise exceptions defined in [Azure Core][azure_core_exceptions]. + +### Async APIs + +This library also includes a complete async API supported on Python 3.5+. To use it, you must +first install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/). Async clients +are found under the `azure.mixedreality.remoterendering.aio` namespace. + + + +## Next steps + +- Read the [Product documentation](https://docs.microsoft.com/azure/remote-rendering/) +- Learn about the runtime SDKs: + - .NET: https://docs.microsoft.com/dotnet/api/microsoft.azure.remoterendering + - C++: https://docs.microsoft.com/cpp/api/remote-rendering/ + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. + +If you'd like to contribute to this library, please read the +[contributing guide](https://github.com/Azure/azure-sdk-for-python/blob/master/CONTRIBUTING.md) to learn more about how +to build and test the code. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fsdk%remoterendering%2Fazure-mixedreality-remoterendering%2FREADME.png) + +[azure_core_ref_docs]: https://aka.ms/azsdk/python/core/docs +[azure_core_exceptions]: https://aka.ms/azsdk/python/core/docs#module-azure.core.exceptions +[azure_sub]: https://azure.microsoft.com/free/ +[azure_portal]: https://portal.azure.com +[azure_identity]: https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/identity/azure-identity + +[pip]: https://pypi.org/project/pip/ +[sdk_logging_docs]: https://docs.microsoft.com/azure/developer/python/azure-sdk-logging \ No newline at end of file diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/__init__.py new file mode 100644 index 000000000000..fd0c3846b033 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/__init__.py @@ -0,0 +1,8 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path( + __path__, __name__) # type: ignore diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/__init__.py new file mode 100644 index 000000000000..fd0c3846b033 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/__init__.py @@ -0,0 +1,8 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- + +__path__ = __import__('pkgutil').extend_path( + __path__, __name__) # type: ignore diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/__init__.py new file mode 100644 index 000000000000..e7f330b6ef57 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/__init__.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- + +from ._remote_rendering_client import RemoteRenderingClient +from ._version import VERSION + +from ._generated.models import (AssetConversion, AssetConversionInputSettings, + AssetConversionOutput, AssetConversionOutputSettings, + AssetConversionSettings, AssetConversionStatus, RemoteRenderingError, + RenderingSession, RenderingSessionSize, RenderingSessionStatus) + +__all__ = [ + "RemoteRenderingClient", + "AssetConversion", + "AssetConversionSettings", + "AssetConversionInputSettings", + "AssetConversionOutputSettings", + "AssetConversionStatus", + "AssetConversionOutput", + "RenderingSession", + "RenderingSessionSize", + "RenderingSessionStatus", + "RemoteRenderingError" +] + +__version__ = VERSION diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_api_version.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_api_version.py new file mode 100644 index 000000000000..3470b513fc9a --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_api_version.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class RemoteRenderingApiVersion(str, Enum): + """Remote Rendering API versions supported by this package""" + + #: This is the default version + V2021_01_01 = "2021-01-01" + + +def validate_api_version(api_version): + # type: (str) -> None + """Raise ValueError if api_version is invalid """ + if not api_version: + return + + try: + api_version = RemoteRenderingApiVersion(api_version) + except ValueError: + raise ValueError( + "Unsupported API version '{}'. Please select from:\n{}".format( + api_version, ", ".join(v.value for v in RemoteRenderingApiVersion) + ) + ) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/__init__.py new file mode 100644 index 000000000000..0aa283066ae0 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._remote_rendering_rest_client import RemoteRenderingRestClient +__all__ = ['RemoteRenderingRestClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_configuration.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_configuration.py new file mode 100644 index 000000000000..64d03c4681ff --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_configuration.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + +VERSION = "unknown" + +class RemoteRenderingRestClientConfiguration(Configuration): + """Configuration for RemoteRenderingRestClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: The endpoint to use e.g. https://remoterendering.eastus.mixedreality.azure.com. A list can be found at https://docs.microsoft.com/azure/remote-rendering/reference/regions. + :type endpoint: str + """ + + def __init__( + self, + endpoint, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + super(RemoteRenderingRestClientConfiguration, self).__init__(**kwargs) + + self.endpoint = endpoint + self.api_version = "2021-01-01" + kwargs.setdefault('sdk_moniker', 'remoterenderingrestclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_remote_rendering_rest_client.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_remote_rendering_rest_client.py new file mode 100644 index 000000000000..98b3b278f7e1 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/_remote_rendering_rest_client.py @@ -0,0 +1,62 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core import PipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + +from ._configuration import RemoteRenderingRestClientConfiguration +from .operations import RemoteRenderingOperations +from . import models + + +class RemoteRenderingRestClient(object): + """Describing the `Azure Remote Rendering `_ REST API for rendering sessions and asset conversions. + +All requests to these APIs must be authenticated using the Secure Token Service as described in the `Azure Remote rendering documentation chapter about authentication `_. + + :ivar remote_rendering: RemoteRenderingOperations operations + :vartype remote_rendering: azure.mixedreality.remoterendering._generated.operations.RemoteRenderingOperations + :param endpoint: The endpoint to use e.g. https://remoterendering.eastus.mixedreality.azure.com. A list can be found at https://docs.microsoft.com/azure/remote-rendering/reference/regions. + :type endpoint: str + """ + + def __init__( + self, + endpoint, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + base_url = '{endpoint}' + self._config = RemoteRenderingRestClientConfiguration(endpoint, **kwargs) + self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.remote_rendering = RemoteRenderingOperations( + self._client, self._config, self._serialize, self._deserialize) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> RemoteRenderingRestClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/__init__.py new file mode 100644 index 000000000000..4e2cceac54f5 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._remote_rendering_rest_client_async import RemoteRenderingRestClient +__all__ = ['RemoteRenderingRestClient'] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_configuration_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_configuration_async.py new file mode 100644 index 000000000000..f2a43ad51f82 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_configuration_async.py @@ -0,0 +1,52 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +VERSION = "unknown" + +class RemoteRenderingRestClientConfiguration(Configuration): + """Configuration for RemoteRenderingRestClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param endpoint: The endpoint to use e.g. https://remoterendering.eastus.mixedreality.azure.com. A list can be found at https://docs.microsoft.com/azure/remote-rendering/reference/regions. + :type endpoint: str + """ + + def __init__( + self, + endpoint: str, + **kwargs: Any + ) -> None: + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + super(RemoteRenderingRestClientConfiguration, self).__init__(**kwargs) + + self.endpoint = endpoint + self.api_version = "2021-01-01" + kwargs.setdefault('sdk_moniker', 'remoterenderingrestclient/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_remote_rendering_rest_client_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_remote_rendering_rest_client_async.py new file mode 100644 index 000000000000..1c14b1e231d9 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/_remote_rendering_rest_client_async.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any + +from azure.core import AsyncPipelineClient +from msrest import Deserializer, Serializer + +from ._configuration_async import RemoteRenderingRestClientConfiguration +from .operations_async import RemoteRenderingOperations +from .. import models + + +class RemoteRenderingRestClient(object): + """Describing the `Azure Remote Rendering `_ REST API for rendering sessions and asset conversions. + +All requests to these APIs must be authenticated using the Secure Token Service as described in the `Azure Remote rendering documentation chapter about authentication `_. + + :ivar remote_rendering: RemoteRenderingOperations operations + :vartype remote_rendering: azure.mixedreality.remoterendering._generated.aio.operations_async.RemoteRenderingOperations + :param endpoint: The endpoint to use e.g. https://remoterendering.eastus.mixedreality.azure.com. A list can be found at https://docs.microsoft.com/azure/remote-rendering/reference/regions. + :type endpoint: str + """ + + def __init__( + self, + endpoint: str, + **kwargs: Any + ) -> None: + base_url = '{endpoint}' + self._config = RemoteRenderingRestClientConfiguration(endpoint, **kwargs) + self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.remote_rendering = RemoteRenderingOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "RemoteRenderingRestClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/__init__.py new file mode 100644 index 000000000000..95b63f50c90d --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._remote_rendering_operations_async import RemoteRenderingOperations + +__all__ = [ + 'RemoteRenderingOperations', +] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/_remote_rendering_operations_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/_remote_rendering_operations_async.py new file mode 100644 index 000000000000..348e32d320ae --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/aio/operations_async/_remote_rendering_operations_async.py @@ -0,0 +1,620 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest + +from ... import models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class RemoteRenderingOperations: + """RemoteRenderingOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mixedreality.remoterendering._generated.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_conversion( + self, + account_id: str, + conversion_id: str, + body: "models.CreateAssetConversionSettings", + **kwargs + ) -> "models.AssetConversion": + """Creates a conversion using an asset stored in an Azure Blob Storage account. + + Creates a conversion using an asset stored in an Azure Blob Storage account. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param conversion_id: An ID uniquely identifying the conversion for the given account. The ID + is case sensitive, can contain any combination of alphanumeric characters including hyphens and + underscores, and cannot contain more than 256 characters. + :type conversion_id: str + :param body: Request body configuring the settings for an asset conversion. + :type body: ~azure.mixedreality.remoterendering._generated.models.CreateAssetConversionSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssetConversion, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.AssetConversion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AssetConversion"] + error_map = { + 404: ResourceNotFoundError, + 400: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 409: lambda response: ResourceExistsError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_conversion.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'conversion_id': self._serialize.url("conversion_id", conversion_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'CreateAssetConversionSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + deserialized = self._deserialize('AssetConversion', pipeline_response) + + if response.status_code == 201: + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + deserialized = self._deserialize('AssetConversion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_conversion.metadata = {'url': '/accounts/{account_id}/conversions/{conversion_id}'} # type: ignore + + async def get_conversion( + self, + account_id: str, + conversion_id: str, + **kwargs + ) -> "models.AssetConversion": + """Gets the status of a particular conversion. + + Gets the status of a particular conversion. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param conversion_id: An ID uniquely identifying the conversion for the given account. The ID + is case sensitive, can contain any combination of alphanumeric characters including hyphens and + underscores, and cannot contain more than 256 characters. + :type conversion_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssetConversion, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.AssetConversion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AssetConversion"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + # Construct URL + url = self.get_conversion.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'conversion_id': self._serialize.url("conversion_id", conversion_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + deserialized = self._deserialize('AssetConversion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get_conversion.metadata = {'url': '/accounts/{account_id}/conversions/{conversion_id}'} # type: ignore + + def list_conversions( + self, + account_id: str, + **kwargs + ) -> AsyncIterable["models.ConversionList"]: + """Gets a list of all conversions. + + Gets a list of all conversions. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConversionList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mixedreality.remoterendering._generated.models.ConversionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConversionList"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_conversions.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ConversionList', pipeline_response) + list_of_elem = deserialized.conversions + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_conversions.metadata = {'url': '/accounts/{account_id}/conversions'} # type: ignore + + async def create_session( + self, + account_id: str, + session_id: str, + body: "models.CreateRenderingSessionSettings", + **kwargs + ) -> "models.RenderingSession": + """Creates a new rendering session. + + Creates a new rendering session. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param session_id: An ID uniquely identifying the rendering session for the given account. The + ID is case sensitive, can contain any combination of alphanumeric characters including hyphens + and underscores, and cannot contain more than 256 characters. + :type session_id: str + :param body: Settings of the session to be created. + :type body: ~azure.mixedreality.remoterendering._generated.models.CreateRenderingSessionSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RenderingSession, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + error_map = { + 404: ResourceNotFoundError, + 400: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 409: lambda response: ResourceExistsError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_session.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'session_id': self._serialize.url("session_id", session_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'CreateRenderingSessionSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('RenderingSession', pipeline_response) + + if response.status_code == 201: + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + deserialized = self._deserialize('RenderingSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + async def get_session( + self, + account_id: str, + session_id: str, + **kwargs + ) -> "models.RenderingSession": + """Gets the properties of a particular rendering session. + + Gets the properties of a particular rendering session. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param session_id: An ID uniquely identifying the rendering session for the given account. The + ID is case sensitive, can contain any combination of alphanumeric characters including hyphens + and underscores, and cannot contain more than 256 characters. + :type session_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RenderingSession, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + # Construct URL + url = self.get_session.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'session_id': self._serialize.url("session_id", session_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize('RenderingSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + async def update_session( + self, + account_id: str, + session_id: str, + body: "models.UpdateSessionSettings", + **kwargs + ) -> "models.RenderingSession": + """Updates the max lease time of a particular rendering session. + + Updates the max lease time of a particular rendering session. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param session_id: An ID uniquely identifying the rendering session for the given account. The + ID is case sensitive, can contain any combination of alphanumeric characters including hyphens + and underscores, and cannot contain more than 256 characters. + :type session_id: str + :param body: Settings used to update the session. + :type body: ~azure.mixedreality.remoterendering._generated.models.UpdateSessionSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RenderingSession, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 422: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.update_session.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'session_id': self._serialize.url("session_id", session_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'UpdateSessionSettings') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize('RenderingSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + async def stop_session( + self, + account_id: str, + session_id: str, + **kwargs + ) -> None: + """Stops a particular rendering session. + + Stops a particular rendering session. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param session_id: An ID uniquely identifying the rendering session for the given account. The + ID is case sensitive, can contain any combination of alphanumeric characters including hyphens + and underscores, and cannot contain more than 256 characters. + :type session_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + # Construct URL + url = self.stop_session.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'session_id': self._serialize.url("session_id", session_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + + if cls: + return cls(pipeline_response, None, response_headers) + + stop_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}/:stop'} # type: ignore + + def list_sessions( + self, + account_id: str, + **kwargs + ) -> AsyncIterable["models.SessionsList"]: + """Gets a list of all rendering sessions. + + Gets a list of all rendering sessions. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SessionsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mixedreality.remoterendering._generated.models.SessionsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SessionsList"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_sessions.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SessionsList', pipeline_response) + list_of_elem = deserialized.sessions + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_sessions.metadata = {'url': '/accounts/{account_id}/sessions'} # type: ignore diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/__init__.py new file mode 100644 index 000000000000..231006f9c25b --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/__init__.py @@ -0,0 +1,61 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import AssetConversion + from ._models_py3 import AssetConversionInputSettings + from ._models_py3 import AssetConversionOutput + from ._models_py3 import AssetConversionOutputSettings + from ._models_py3 import AssetConversionSettings + from ._models_py3 import ConversionList + from ._models_py3 import CreateAssetConversionSettings + from ._models_py3 import CreateRenderingSessionSettings + from ._models_py3 import ErrorResponse + from ._models_py3 import RemoteRenderingError + from ._models_py3 import RenderingSession + from ._models_py3 import SessionsList + from ._models_py3 import UpdateSessionSettings +except (SyntaxError, ImportError): + from ._models import AssetConversion # type: ignore + from ._models import AssetConversionInputSettings # type: ignore + from ._models import AssetConversionOutput # type: ignore + from ._models import AssetConversionOutputSettings # type: ignore + from ._models import AssetConversionSettings # type: ignore + from ._models import ConversionList # type: ignore + from ._models import CreateAssetConversionSettings # type: ignore + from ._models import CreateRenderingSessionSettings # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import RemoteRenderingError # type: ignore + from ._models import RenderingSession # type: ignore + from ._models import SessionsList # type: ignore + from ._models import UpdateSessionSettings # type: ignore + +from ._remote_rendering_rest_client_enums import ( + AssetConversionStatus, + RenderingSessionSize, + RenderingSessionStatus, +) + +__all__ = [ + 'AssetConversion', + 'AssetConversionInputSettings', + 'AssetConversionOutput', + 'AssetConversionOutputSettings', + 'AssetConversionSettings', + 'ConversionList', + 'CreateAssetConversionSettings', + 'CreateRenderingSessionSettings', + 'ErrorResponse', + 'RemoteRenderingError', + 'RenderingSession', + 'SessionsList', + 'UpdateSessionSettings', + 'AssetConversionStatus', + 'RenderingSessionSize', + 'RenderingSessionStatus', +] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models.py new file mode 100644 index 000000000000..a70239a592ae --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models.py @@ -0,0 +1,538 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AssetConversion(msrest.serialization.Model): + """The properties of the conversion. + + 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 id: Required. The ID of the conversion supplied when the conversion was created. + :type id: str + :param settings: Required. Conversion settings describe the origin of input files and + destination of output files. + :type settings: ~azure.mixedreality.remoterendering._generated.models.AssetConversionSettings + :ivar output: Information about the output of a successful conversion. Only present when the + status of the conversion is 'Succeeded'. + :vartype output: ~azure.mixedreality.remoterendering._generated.models.AssetConversionOutput + :param error: Required. The error object containing details about the conversion failure. + :type error: ~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError + :param status: Required. The status of the conversion. Terminal states are 'Cancelled', + 'Failed', and 'Succeeded'. Possible values include: "NotStarted", "Running", "Cancelled", + "Failed", "Succeeded". + :type status: str or + ~azure.mixedreality.remoterendering._generated.models.AssetConversionStatus + :param created_on: Required. The time when the conversion was created. Date and time in ISO + 8601 format. + :type created_on: ~datetime.datetime + """ + + _validation = { + 'id': {'required': True}, + 'settings': {'required': True}, + 'output': {'readonly': True}, + 'error': {'required': True}, + 'status': {'required': True}, + 'created_on': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'AssetConversionSettings'}, + 'output': {'key': 'output', 'type': 'AssetConversionOutput'}, + 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, + 'status': {'key': 'status', 'type': 'str'}, + 'created_on': {'key': 'creationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(AssetConversion, self).__init__(**kwargs) + self.id = kwargs['id'] + self.settings = kwargs['settings'] + self.output = None + self.error = kwargs['error'] + self.status = kwargs['status'] + self.created_on = kwargs['created_on'] + + +class AssetConversionInputSettings(msrest.serialization.Model): + """Conversion input settings describe the origin of conversion input. + + All required parameters must be populated in order to send to Azure. + + :param storage_container_uri: Required. The URI of the Azure blob storage container containing + the input model. + :type storage_container_uri: str + :param storage_container_read_list_sas: An Azure blob storage container shared access signature + giving read and list access to the storage container. Optional. If not provided, the Azure + Remote Rendering account needs to be linked with the storage account containing the blob + container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an- + account#link-storage-accounts for details. For security purposes this field will never be + filled out in responses bodies. + :type storage_container_read_list_sas: str + :param blob_prefix: Only Blobs starting with this prefix will be downloaded to perform the + conversion. Optional. If not provided, all Blobs from the container will be downloaded. + :type blob_prefix: str + :param relative_input_asset_path: Required. The relative path starting at blobPrefix (or at the + container root if blobPrefix is not provided) to the input model. Must point to a file with a + supported file format ending. See https://docs.microsoft.com/azure/remote-rendering/how- + tos/conversion/model-conversion for details. + :type relative_input_asset_path: str + """ + + _validation = { + 'storage_container_uri': {'required': True}, + 'relative_input_asset_path': {'required': True}, + } + + _attribute_map = { + 'storage_container_uri': {'key': 'storageContainerUri', 'type': 'str'}, + 'storage_container_read_list_sas': {'key': 'storageContainerReadListSas', 'type': 'str'}, + 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, + 'relative_input_asset_path': {'key': 'relativeInputAssetPath', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AssetConversionInputSettings, self).__init__(**kwargs) + self.storage_container_uri = kwargs['storage_container_uri'] + self.storage_container_read_list_sas = kwargs.get('storage_container_read_list_sas', None) + self.blob_prefix = kwargs.get('blob_prefix', None) + self.relative_input_asset_path = kwargs['relative_input_asset_path'] + + +class AssetConversionOutput(msrest.serialization.Model): + """Information about the output of a successful conversion. Only present when the status of the conversion is 'Succeeded'. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar asset_uri: URI of the asset generated by the conversion process. + :vartype asset_uri: str + """ + + _validation = { + 'asset_uri': {'readonly': True}, + } + + _attribute_map = { + 'asset_uri': {'key': 'outputAssetUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AssetConversionOutput, self).__init__(**kwargs) + self.asset_uri = None + + +class AssetConversionOutputSettings(msrest.serialization.Model): + """Conversion output settings describe the destination of conversion output. + + All required parameters must be populated in order to send to Azure. + + :param storage_container_uri: Required. The URI of the Azure blob storage container where the + result of the conversion should be written to. + :type storage_container_uri: str + :param storage_container_write_sas: An Azure blob storage container shared access signature + giving write access to the storage container. Optional. If not provided, the Azure Remote + Rendering account needs to be linked with the storage account containing the blob container. + See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage- + accounts for details. For security purposes this field will never be filled out in responses + bodies. + :type storage_container_write_sas: str + :param blob_prefix: A prefix which gets prepended in front of all files produced by the + conversion process. Will be treated as a virtual folder. Optional. If not provided, output + files will be stored at the container root. + :type blob_prefix: str + :param output_asset_filename: The file name of the output asset. Must end in '.arrAsset'. + Optional. If not provided, file name will the same name as the input asset, with '.arrAsset' + extension. + :type output_asset_filename: str + """ + + _validation = { + 'storage_container_uri': {'required': True}, + } + + _attribute_map = { + 'storage_container_uri': {'key': 'storageContainerUri', 'type': 'str'}, + 'storage_container_write_sas': {'key': 'storageContainerWriteSas', 'type': 'str'}, + 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, + 'output_asset_filename': {'key': 'outputAssetFilename', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AssetConversionOutputSettings, self).__init__(**kwargs) + self.storage_container_uri = kwargs['storage_container_uri'] + self.storage_container_write_sas = kwargs.get('storage_container_write_sas', None) + self.blob_prefix = kwargs.get('blob_prefix', None) + self.output_asset_filename = kwargs.get('output_asset_filename', None) + + +class AssetConversionSettings(msrest.serialization.Model): + """Conversion settings describe the origin of input files and destination of output files. + + All required parameters must be populated in order to send to Azure. + + :param input_settings: Required. Conversion input settings describe the origin of conversion + input. + :type input_settings: + ~azure.mixedreality.remoterendering._generated.models.AssetConversionInputSettings + :param output_settings: Required. Conversion output settings describe the destination of + conversion output. + :type output_settings: + ~azure.mixedreality.remoterendering._generated.models.AssetConversionOutputSettings + """ + + _validation = { + 'input_settings': {'required': True}, + 'output_settings': {'required': True}, + } + + _attribute_map = { + 'input_settings': {'key': 'inputLocation', 'type': 'AssetConversionInputSettings'}, + 'output_settings': {'key': 'outputLocation', 'type': 'AssetConversionOutputSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(AssetConversionSettings, self).__init__(**kwargs) + self.input_settings = kwargs['input_settings'] + self.output_settings = kwargs['output_settings'] + + +class ConversionList(msrest.serialization.Model): + """List of conversions. + + 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 conversions: Required. The list of conversions. + :type conversions: list[~azure.mixedreality.remoterendering._generated.models.AssetConversion] + :ivar next_link: If more conversions are available this field will contain a URL where the next + batch of conversions can be requested. This URL will need the same authentication as all calls + to the Azure Remote Rendering API. + :vartype next_link: str + """ + + _validation = { + 'conversions': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'conversions': {'key': 'conversions', 'type': '[AssetConversion]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ConversionList, self).__init__(**kwargs) + self.conversions = kwargs['conversions'] + self.next_link = None + + +class CreateAssetConversionSettings(msrest.serialization.Model): + """Request to start a conversion. + + All required parameters must be populated in order to send to Azure. + + :param settings: Required. Conversion settings describe the origin of input files and + destination of output files. + :type settings: ~azure.mixedreality.remoterendering._generated.models.AssetConversionSettings + """ + + _validation = { + 'settings': {'required': True}, + } + + _attribute_map = { + 'settings': {'key': 'settings', 'type': 'AssetConversionSettings'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateAssetConversionSettings, self).__init__(**kwargs) + self.settings = kwargs['settings'] + + +class CreateRenderingSessionSettings(msrest.serialization.Model): + """Settings of the session to be created. + + All required parameters must be populated in order to send to Azure. + + :param lease_time_minutes: Required. The time in minutes the session will run after reaching + the 'Ready' state. It has to be between 0 and 1440. + :type lease_time_minutes: int + :param size: Required. The size of the server used for the rendering session. The size impacts + the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote- + rendering/reference/vm-sizes for details. Possible values include: "Standard", "Premium". + :type size: str or ~azure.mixedreality.remoterendering._generated.models.RenderingSessionSize + """ + + _validation = { + 'lease_time_minutes': {'required': True}, + 'size': {'required': True}, + } + + _attribute_map = { + 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(CreateRenderingSessionSettings, self).__init__(**kwargs) + self.lease_time_minutes = kwargs['lease_time_minutes'] + self.size = kwargs['size'] + + +class ErrorResponse(msrest.serialization.Model): + """The error response containing details of why the request failed. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. The error object containing details of why the request failed. + :type error: ~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs['error'] + + +class RemoteRenderingError(msrest.serialization.Model): + """The error object containing details of why the request failed. + + 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 code: Required. Error code. + :type code: str + :param message: Required. A human-readable representation of the error. + :type message: str + :ivar details: An array of details about specific errors that led to this reported error. + :vartype details: + list[~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError] + :ivar target: The target of the particular error (e.g., the name of the property in error). + :vartype target: str + :ivar inner_error: An object containing more specific information than the current object about + the error. + :vartype inner_error: + ~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + 'details': {'readonly': True}, + 'target': {'readonly': True}, + 'inner_error': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[RemoteRenderingError]'}, + 'target': {'key': 'target', 'type': 'str'}, + 'inner_error': {'key': 'innerError', 'type': 'RemoteRenderingError'}, + } + + def __init__( + self, + **kwargs + ): + super(RemoteRenderingError, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.details = None + self.target = None + self.inner_error = None + + +class RenderingSession(msrest.serialization.Model): + """The properties of a rendering session. + + 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 id: Required. The ID of the session supplied when the session was created. + :type id: str + :ivar arr_inspector_port: The TCP port at which the Azure Remote Rendering Inspector tool is + hosted. + :vartype arr_inspector_port: int + :ivar handshake_port: The TCP port used for the handshake when establishing a connection. + :vartype handshake_port: int + :ivar elapsed_time_minutes: Amount of time in minutes the session is or was in the 'Ready' + state. Time is rounded down to a full minute. + :vartype elapsed_time_minutes: int + :ivar hostname: The hostname under which the rendering session is reachable. + :vartype hostname: str + :ivar lease_time_minutes: The time in minutes the session will run after reaching the 'Ready' + state. + :vartype lease_time_minutes: int + :param size: Required. The size of the server used for the rendering session. The size impacts + the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote- + rendering/reference/vm-sizes for details. Possible values include: "Standard", "Premium". + :type size: str or ~azure.mixedreality.remoterendering._generated.models.RenderingSessionSize + :param status: Required. The status of the rendering session. Terminal states are 'Error', + 'Expired', and 'Stopped'. Possible values include: "Error", "Expired", "Starting", "Ready", + "Stopped". + :type status: str or + ~azure.mixedreality.remoterendering._generated.models.RenderingSessionStatus + :ivar teraflops: The computational power of the rendering session GPU measured in teraflops. + :vartype teraflops: float + :ivar error: The error object containing details about the rendering session startup failure. + :vartype error: ~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError + :ivar created_on: The time when the rendering session was created. Date and time in ISO 8601 + format. + :vartype created_on: ~datetime.datetime + """ + + _validation = { + 'id': {'required': True}, + 'arr_inspector_port': {'readonly': True, 'maximum': 65534, 'minimum': 49152}, + 'handshake_port': {'readonly': True, 'maximum': 65534, 'minimum': 49152}, + 'elapsed_time_minutes': {'readonly': True}, + 'hostname': {'readonly': True}, + 'lease_time_minutes': {'readonly': True}, + 'size': {'required': True}, + 'status': {'required': True}, + 'teraflops': {'readonly': True}, + 'error': {'readonly': True}, + 'created_on': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'arr_inspector_port': {'key': 'arrInspectorPort', 'type': 'int'}, + 'handshake_port': {'key': 'handshakePort', 'type': 'int'}, + 'elapsed_time_minutes': {'key': 'elapsedTimeMinutes', 'type': 'int'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, + 'size': {'key': 'size', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'teraflops': {'key': 'teraflops', 'type': 'float'}, + 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, + 'created_on': {'key': 'creationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(RenderingSession, self).__init__(**kwargs) + self.id = kwargs['id'] + self.arr_inspector_port = None + self.handshake_port = None + self.elapsed_time_minutes = None + self.hostname = None + self.lease_time_minutes = None + self.size = kwargs['size'] + self.status = kwargs['status'] + self.teraflops = None + self.error = None + self.created_on = None + + +class SessionsList(msrest.serialization.Model): + """The result of a list sessions request. + + 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 sessions: Required. The list of rendering sessions. Does not include sessions in + 'Stopped' state. + :type sessions: list[~azure.mixedreality.remoterendering._generated.models.RenderingSession] + :ivar next_link: If more rendering sessions are available this field will contain a URL where + the next batch of sessions can be requested. This URL will need the same authentication as all + calls to the Azure Remote Rendering API. + :vartype next_link: str + """ + + _validation = { + 'sessions': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'sessions': {'key': 'sessions', 'type': '[RenderingSession]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SessionsList, self).__init__(**kwargs) + self.sessions = kwargs['sessions'] + self.next_link = None + + +class UpdateSessionSettings(msrest.serialization.Model): + """Settings used to update the session. + + All required parameters must be populated in order to send to Azure. + + :param lease_time_minutes: Required. Update to the time the session will run after it reached + the 'Ready' state. It has to be larger than the current value of maxLeaseTimeMinutes and less + than 1440. + :type lease_time_minutes: int + """ + + _validation = { + 'lease_time_minutes': {'required': True}, + } + + _attribute_map = { + 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + super(UpdateSessionSettings, self).__init__(**kwargs) + self.lease_time_minutes = kwargs['lease_time_minutes'] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models_py3.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models_py3.py new file mode 100644 index 000000000000..1603b2006645 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_models_py3.py @@ -0,0 +1,582 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._remote_rendering_rest_client_enums import * + + +class AssetConversion(msrest.serialization.Model): + """The properties of the conversion. + + 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 id: Required. The ID of the conversion supplied when the conversion was created. + :type id: str + :param settings: Required. Conversion settings describe the origin of input files and + destination of output files. + :type settings: ~azure.mixedreality.remoterendering._generated.models.AssetConversionSettings + :ivar output: Information about the output of a successful conversion. Only present when the + status of the conversion is 'Succeeded'. + :vartype output: ~azure.mixedreality.remoterendering._generated.models.AssetConversionOutput + :param error: Required. The error object containing details about the conversion failure. + :type error: ~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError + :param status: Required. The status of the conversion. Terminal states are 'Cancelled', + 'Failed', and 'Succeeded'. Possible values include: "NotStarted", "Running", "Cancelled", + "Failed", "Succeeded". + :type status: str or + ~azure.mixedreality.remoterendering._generated.models.AssetConversionStatus + :param created_on: Required. The time when the conversion was created. Date and time in ISO + 8601 format. + :type created_on: ~datetime.datetime + """ + + _validation = { + 'id': {'required': True}, + 'settings': {'required': True}, + 'output': {'readonly': True}, + 'error': {'required': True}, + 'status': {'required': True}, + 'created_on': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'settings': {'key': 'settings', 'type': 'AssetConversionSettings'}, + 'output': {'key': 'output', 'type': 'AssetConversionOutput'}, + 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, + 'status': {'key': 'status', 'type': 'str'}, + 'created_on': {'key': 'creationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + id: str, + settings: "AssetConversionSettings", + error: "RemoteRenderingError", + status: Union[str, "AssetConversionStatus"], + created_on: datetime.datetime, + **kwargs + ): + super(AssetConversion, self).__init__(**kwargs) + self.id = id + self.settings = settings + self.output = None + self.error = error + self.status = status + self.created_on = created_on + + +class AssetConversionInputSettings(msrest.serialization.Model): + """Conversion input settings describe the origin of conversion input. + + All required parameters must be populated in order to send to Azure. + + :param storage_container_uri: Required. The URI of the Azure blob storage container containing + the input model. + :type storage_container_uri: str + :param storage_container_read_list_sas: An Azure blob storage container shared access signature + giving read and list access to the storage container. Optional. If not provided, the Azure + Remote Rendering account needs to be linked with the storage account containing the blob + container. See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an- + account#link-storage-accounts for details. For security purposes this field will never be + filled out in responses bodies. + :type storage_container_read_list_sas: str + :param blob_prefix: Only Blobs starting with this prefix will be downloaded to perform the + conversion. Optional. If not provided, all Blobs from the container will be downloaded. + :type blob_prefix: str + :param relative_input_asset_path: Required. The relative path starting at blobPrefix (or at the + container root if blobPrefix is not provided) to the input model. Must point to a file with a + supported file format ending. See https://docs.microsoft.com/azure/remote-rendering/how- + tos/conversion/model-conversion for details. + :type relative_input_asset_path: str + """ + + _validation = { + 'storage_container_uri': {'required': True}, + 'relative_input_asset_path': {'required': True}, + } + + _attribute_map = { + 'storage_container_uri': {'key': 'storageContainerUri', 'type': 'str'}, + 'storage_container_read_list_sas': {'key': 'storageContainerReadListSas', 'type': 'str'}, + 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, + 'relative_input_asset_path': {'key': 'relativeInputAssetPath', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_container_uri: str, + relative_input_asset_path: str, + storage_container_read_list_sas: Optional[str] = None, + blob_prefix: Optional[str] = None, + **kwargs + ): + super(AssetConversionInputSettings, self).__init__(**kwargs) + self.storage_container_uri = storage_container_uri + self.storage_container_read_list_sas = storage_container_read_list_sas + self.blob_prefix = blob_prefix + self.relative_input_asset_path = relative_input_asset_path + + +class AssetConversionOutput(msrest.serialization.Model): + """Information about the output of a successful conversion. Only present when the status of the conversion is 'Succeeded'. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar asset_uri: URI of the asset generated by the conversion process. + :vartype asset_uri: str + """ + + _validation = { + 'asset_uri': {'readonly': True}, + } + + _attribute_map = { + 'asset_uri': {'key': 'outputAssetUri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AssetConversionOutput, self).__init__(**kwargs) + self.asset_uri = None + + +class AssetConversionOutputSettings(msrest.serialization.Model): + """Conversion output settings describe the destination of conversion output. + + All required parameters must be populated in order to send to Azure. + + :param storage_container_uri: Required. The URI of the Azure blob storage container where the + result of the conversion should be written to. + :type storage_container_uri: str + :param storage_container_write_sas: An Azure blob storage container shared access signature + giving write access to the storage container. Optional. If not provided, the Azure Remote + Rendering account needs to be linked with the storage account containing the blob container. + See https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage- + accounts for details. For security purposes this field will never be filled out in responses + bodies. + :type storage_container_write_sas: str + :param blob_prefix: A prefix which gets prepended in front of all files produced by the + conversion process. Will be treated as a virtual folder. Optional. If not provided, output + files will be stored at the container root. + :type blob_prefix: str + :param output_asset_filename: The file name of the output asset. Must end in '.arrAsset'. + Optional. If not provided, file name will the same name as the input asset, with '.arrAsset' + extension. + :type output_asset_filename: str + """ + + _validation = { + 'storage_container_uri': {'required': True}, + } + + _attribute_map = { + 'storage_container_uri': {'key': 'storageContainerUri', 'type': 'str'}, + 'storage_container_write_sas': {'key': 'storageContainerWriteSas', 'type': 'str'}, + 'blob_prefix': {'key': 'blobPrefix', 'type': 'str'}, + 'output_asset_filename': {'key': 'outputAssetFilename', 'type': 'str'}, + } + + def __init__( + self, + *, + storage_container_uri: str, + storage_container_write_sas: Optional[str] = None, + blob_prefix: Optional[str] = None, + output_asset_filename: Optional[str] = None, + **kwargs + ): + super(AssetConversionOutputSettings, self).__init__(**kwargs) + self.storage_container_uri = storage_container_uri + self.storage_container_write_sas = storage_container_write_sas + self.blob_prefix = blob_prefix + self.output_asset_filename = output_asset_filename + + +class AssetConversionSettings(msrest.serialization.Model): + """Conversion settings describe the origin of input files and destination of output files. + + All required parameters must be populated in order to send to Azure. + + :param input_settings: Required. Conversion input settings describe the origin of conversion + input. + :type input_settings: + ~azure.mixedreality.remoterendering._generated.models.AssetConversionInputSettings + :param output_settings: Required. Conversion output settings describe the destination of + conversion output. + :type output_settings: + ~azure.mixedreality.remoterendering._generated.models.AssetConversionOutputSettings + """ + + _validation = { + 'input_settings': {'required': True}, + 'output_settings': {'required': True}, + } + + _attribute_map = { + 'input_settings': {'key': 'inputLocation', 'type': 'AssetConversionInputSettings'}, + 'output_settings': {'key': 'outputLocation', 'type': 'AssetConversionOutputSettings'}, + } + + def __init__( + self, + *, + input_settings: "AssetConversionInputSettings", + output_settings: "AssetConversionOutputSettings", + **kwargs + ): + super(AssetConversionSettings, self).__init__(**kwargs) + self.input_settings = input_settings + self.output_settings = output_settings + + +class ConversionList(msrest.serialization.Model): + """List of conversions. + + 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 conversions: Required. The list of conversions. + :type conversions: list[~azure.mixedreality.remoterendering._generated.models.AssetConversion] + :ivar next_link: If more conversions are available this field will contain a URL where the next + batch of conversions can be requested. This URL will need the same authentication as all calls + to the Azure Remote Rendering API. + :vartype next_link: str + """ + + _validation = { + 'conversions': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'conversions': {'key': 'conversions', 'type': '[AssetConversion]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + conversions: List["AssetConversion"], + **kwargs + ): + super(ConversionList, self).__init__(**kwargs) + self.conversions = conversions + self.next_link = None + + +class CreateAssetConversionSettings(msrest.serialization.Model): + """Request to start a conversion. + + All required parameters must be populated in order to send to Azure. + + :param settings: Required. Conversion settings describe the origin of input files and + destination of output files. + :type settings: ~azure.mixedreality.remoterendering._generated.models.AssetConversionSettings + """ + + _validation = { + 'settings': {'required': True}, + } + + _attribute_map = { + 'settings': {'key': 'settings', 'type': 'AssetConversionSettings'}, + } + + def __init__( + self, + *, + settings: "AssetConversionSettings", + **kwargs + ): + super(CreateAssetConversionSettings, self).__init__(**kwargs) + self.settings = settings + + +class CreateRenderingSessionSettings(msrest.serialization.Model): + """Settings of the session to be created. + + All required parameters must be populated in order to send to Azure. + + :param lease_time_minutes: Required. The time in minutes the session will run after reaching + the 'Ready' state. It has to be between 0 and 1440. + :type lease_time_minutes: int + :param size: Required. The size of the server used for the rendering session. The size impacts + the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote- + rendering/reference/vm-sizes for details. Possible values include: "Standard", "Premium". + :type size: str or ~azure.mixedreality.remoterendering._generated.models.RenderingSessionSize + """ + + _validation = { + 'lease_time_minutes': {'required': True}, + 'size': {'required': True}, + } + + _attribute_map = { + 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, + 'size': {'key': 'size', 'type': 'str'}, + } + + def __init__( + self, + *, + lease_time_minutes: int, + size: Union[str, "RenderingSessionSize"], + **kwargs + ): + super(CreateRenderingSessionSettings, self).__init__(**kwargs) + self.lease_time_minutes = lease_time_minutes + self.size = size + + +class ErrorResponse(msrest.serialization.Model): + """The error response containing details of why the request failed. + + All required parameters must be populated in order to send to Azure. + + :param error: Required. The error object containing details of why the request failed. + :type error: ~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, + } + + def __init__( + self, + *, + error: "RemoteRenderingError", + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class RemoteRenderingError(msrest.serialization.Model): + """The error object containing details of why the request failed. + + 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 code: Required. Error code. + :type code: str + :param message: Required. A human-readable representation of the error. + :type message: str + :ivar details: An array of details about specific errors that led to this reported error. + :vartype details: + list[~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError] + :ivar target: The target of the particular error (e.g., the name of the property in error). + :vartype target: str + :ivar inner_error: An object containing more specific information than the current object about + the error. + :vartype inner_error: + ~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + 'details': {'readonly': True}, + 'target': {'readonly': True}, + 'inner_error': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[RemoteRenderingError]'}, + 'target': {'key': 'target', 'type': 'str'}, + 'inner_error': {'key': 'innerError', 'type': 'RemoteRenderingError'}, + } + + def __init__( + self, + *, + code: str, + message: str, + **kwargs + ): + super(RemoteRenderingError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = None + self.target = None + self.inner_error = None + + +class RenderingSession(msrest.serialization.Model): + """The properties of a rendering session. + + 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 id: Required. The ID of the session supplied when the session was created. + :type id: str + :ivar arr_inspector_port: The TCP port at which the Azure Remote Rendering Inspector tool is + hosted. + :vartype arr_inspector_port: int + :ivar handshake_port: The TCP port used for the handshake when establishing a connection. + :vartype handshake_port: int + :ivar elapsed_time_minutes: Amount of time in minutes the session is or was in the 'Ready' + state. Time is rounded down to a full minute. + :vartype elapsed_time_minutes: int + :ivar hostname: The hostname under which the rendering session is reachable. + :vartype hostname: str + :ivar lease_time_minutes: The time in minutes the session will run after reaching the 'Ready' + state. + :vartype lease_time_minutes: int + :param size: Required. The size of the server used for the rendering session. The size impacts + the number of polygons the server can render. Refer to https://docs.microsoft.com/azure/remote- + rendering/reference/vm-sizes for details. Possible values include: "Standard", "Premium". + :type size: str or ~azure.mixedreality.remoterendering._generated.models.RenderingSessionSize + :param status: Required. The status of the rendering session. Terminal states are 'Error', + 'Expired', and 'Stopped'. Possible values include: "Error", "Expired", "Starting", "Ready", + "Stopped". + :type status: str or + ~azure.mixedreality.remoterendering._generated.models.RenderingSessionStatus + :ivar teraflops: The computational power of the rendering session GPU measured in teraflops. + :vartype teraflops: float + :ivar error: The error object containing details about the rendering session startup failure. + :vartype error: ~azure.mixedreality.remoterendering._generated.models.RemoteRenderingError + :ivar created_on: The time when the rendering session was created. Date and time in ISO 8601 + format. + :vartype created_on: ~datetime.datetime + """ + + _validation = { + 'id': {'required': True}, + 'arr_inspector_port': {'readonly': True, 'maximum': 65534, 'minimum': 49152}, + 'handshake_port': {'readonly': True, 'maximum': 65534, 'minimum': 49152}, + 'elapsed_time_minutes': {'readonly': True}, + 'hostname': {'readonly': True}, + 'lease_time_minutes': {'readonly': True}, + 'size': {'required': True}, + 'status': {'required': True}, + 'teraflops': {'readonly': True}, + 'error': {'readonly': True}, + 'created_on': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'arr_inspector_port': {'key': 'arrInspectorPort', 'type': 'int'}, + 'handshake_port': {'key': 'handshakePort', 'type': 'int'}, + 'elapsed_time_minutes': {'key': 'elapsedTimeMinutes', 'type': 'int'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, + 'size': {'key': 'size', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'teraflops': {'key': 'teraflops', 'type': 'float'}, + 'error': {'key': 'error', 'type': 'RemoteRenderingError'}, + 'created_on': {'key': 'creationTime', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + id: str, + size: Union[str, "RenderingSessionSize"], + status: Union[str, "RenderingSessionStatus"], + **kwargs + ): + super(RenderingSession, self).__init__(**kwargs) + self.id = id + self.arr_inspector_port = None + self.handshake_port = None + self.elapsed_time_minutes = None + self.hostname = None + self.lease_time_minutes = None + self.size = size + self.status = status + self.teraflops = None + self.error = None + self.created_on = None + + +class SessionsList(msrest.serialization.Model): + """The result of a list sessions request. + + 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 sessions: Required. The list of rendering sessions. Does not include sessions in + 'Stopped' state. + :type sessions: list[~azure.mixedreality.remoterendering._generated.models.RenderingSession] + :ivar next_link: If more rendering sessions are available this field will contain a URL where + the next batch of sessions can be requested. This URL will need the same authentication as all + calls to the Azure Remote Rendering API. + :vartype next_link: str + """ + + _validation = { + 'sessions': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'sessions': {'key': 'sessions', 'type': '[RenderingSession]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + sessions: List["RenderingSession"], + **kwargs + ): + super(SessionsList, self).__init__(**kwargs) + self.sessions = sessions + self.next_link = None + + +class UpdateSessionSettings(msrest.serialization.Model): + """Settings used to update the session. + + All required parameters must be populated in order to send to Azure. + + :param lease_time_minutes: Required. Update to the time the session will run after it reached + the 'Ready' state. It has to be larger than the current value of maxLeaseTimeMinutes and less + than 1440. + :type lease_time_minutes: int + """ + + _validation = { + 'lease_time_minutes': {'required': True}, + } + + _attribute_map = { + 'lease_time_minutes': {'key': 'maxLeaseTimeMinutes', 'type': 'int'}, + } + + def __init__( + self, + *, + lease_time_minutes: int, + **kwargs + ): + super(UpdateSessionSettings, self).__init__(**kwargs) + self.lease_time_minutes = lease_time_minutes diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_remote_rendering_rest_client_enums.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_remote_rendering_rest_client_enums.py new file mode 100644 index 000000000000..dc98ad743f46 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/models/_remote_rendering_rest_client_enums.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AssetConversionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of the conversion. Terminal states are 'Cancelled', 'Failed', and 'Succeeded'. + """ + + NOT_STARTED = "NotStarted" #: The conversion was created but hasn't started. + RUNNING = "Running" #: The conversion is running. + CANCELLED = "Cancelled" #: The conversion was cancelled. This is a terminal state. + FAILED = "Failed" #: The conversion has failed. Check the 'error' field for more details. This is a terminal state. + SUCCEEDED = "Succeeded" #: The conversion has succeeded. Check the 'output' field for output asset location. This is a terminal state. + +class RenderingSessionSize(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The size of the server used for the rendering session. The size impacts the number of polygons + the server can render. Refer to https://docs.microsoft.com/azure/remote-rendering/reference/vm- + sizes for details. + """ + + STANDARD = "Standard" #: Standard rendering session size. + PREMIUM = "Premium" #: Premium rendering session size. + +class RenderingSessionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The status of the rendering session. Terminal states are 'Error', 'Expired', and 'Stopped'. + """ + + ERROR = "Error" #: The rendering session has encountered an error, and is unusable. This is a terminal state. + EXPIRED = "Expired" #: The rendering session enters the 'Expired' state when it has been in the 'Ready' state longer than its lease time. This is a terminal state. + STARTING = "Starting" #: The rendering session is starting, but not accepting incoming connections yet. + READY = "Ready" #: The rendering session is ready for incoming connections. + STOPPED = "Stopped" #: The rendering session has been stopped with the 'Stop Session' operation. This is a terminal state. diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/__init__.py new file mode 100644 index 000000000000..dd0822aab99b --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._remote_rendering_operations import RemoteRenderingOperations + +__all__ = [ + 'RemoteRenderingOperations', +] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/_remote_rendering_operations.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/_remote_rendering_operations.py new file mode 100644 index 000000000000..3badd06cebba --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/operations/_remote_rendering_operations.py @@ -0,0 +1,632 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from .. import models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class RemoteRenderingOperations(object): + """RemoteRenderingOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mixedreality.remoterendering._generated.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_conversion( + self, + account_id, # type: str + conversion_id, # type: str + body, # type: "models.CreateAssetConversionSettings" + **kwargs # type: Any + ): + # type: (...) -> "models.AssetConversion" + """Creates a conversion using an asset stored in an Azure Blob Storage account. + + Creates a conversion using an asset stored in an Azure Blob Storage account. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param conversion_id: An ID uniquely identifying the conversion for the given account. The ID + is case sensitive, can contain any combination of alphanumeric characters including hyphens and + underscores, and cannot contain more than 256 characters. + :type conversion_id: str + :param body: Request body configuring the settings for an asset conversion. + :type body: ~azure.mixedreality.remoterendering._generated.models.CreateAssetConversionSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssetConversion, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.AssetConversion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AssetConversion"] + error_map = { + 404: ResourceNotFoundError, + 400: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 409: lambda response: ResourceExistsError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_conversion.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'conversion_id': self._serialize.url("conversion_id", conversion_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'CreateAssetConversionSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + deserialized = self._deserialize('AssetConversion', pipeline_response) + + if response.status_code == 201: + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + deserialized = self._deserialize('AssetConversion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_conversion.metadata = {'url': '/accounts/{account_id}/conversions/{conversion_id}'} # type: ignore + + def get_conversion( + self, + account_id, # type: str + conversion_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.AssetConversion" + """Gets the status of a particular conversion. + + Gets the status of a particular conversion. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param conversion_id: An ID uniquely identifying the conversion for the given account. The ID + is case sensitive, can contain any combination of alphanumeric characters including hyphens and + underscores, and cannot contain more than 256 characters. + :type conversion_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: AssetConversion, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.AssetConversion + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.AssetConversion"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + # Construct URL + url = self.get_conversion.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'conversion_id': self._serialize.url("conversion_id", conversion_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + deserialized = self._deserialize('AssetConversion', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + get_conversion.metadata = {'url': '/accounts/{account_id}/conversions/{conversion_id}'} # type: ignore + + def list_conversions( + self, + account_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.ConversionList"] + """Gets a list of all conversions. + + Gets a list of all conversions. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ConversionList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mixedreality.remoterendering._generated.models.ConversionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.ConversionList"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_conversions.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ConversionList', pipeline_response) + list_of_elem = deserialized.conversions + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_conversions.metadata = {'url': '/accounts/{account_id}/conversions'} # type: ignore + + def create_session( + self, + account_id, # type: str + session_id, # type: str + body, # type: "models.CreateRenderingSessionSettings" + **kwargs # type: Any + ): + # type: (...) -> "models.RenderingSession" + """Creates a new rendering session. + + Creates a new rendering session. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param session_id: An ID uniquely identifying the rendering session for the given account. The + ID is case sensitive, can contain any combination of alphanumeric characters including hyphens + and underscores, and cannot contain more than 256 characters. + :type session_id: str + :param body: Settings of the session to be created. + :type body: ~azure.mixedreality.remoterendering._generated.models.CreateRenderingSessionSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RenderingSession, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + error_map = { + 404: ResourceNotFoundError, + 400: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 409: lambda response: ResourceExistsError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.create_session.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'session_id': self._serialize.url("session_id", session_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'CreateRenderingSessionSettings') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + if response.status_code == 200: + deserialized = self._deserialize('RenderingSession', pipeline_response) + + if response.status_code == 201: + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + deserialized = self._deserialize('RenderingSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + def get_session( + self, + account_id, # type: str + session_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "models.RenderingSession" + """Gets the properties of a particular rendering session. + + Gets the properties of a particular rendering session. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param session_id: An ID uniquely identifying the rendering session for the given account. The + ID is case sensitive, can contain any combination of alphanumeric characters including hyphens + and underscores, and cannot contain more than 256 characters. + :type session_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RenderingSession, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + # Construct URL + url = self.get_session.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'session_id': self._serialize.url("session_id", session_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize('RenderingSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + def update_session( + self, + account_id, # type: str + session_id, # type: str + body, # type: "models.UpdateSessionSettings" + **kwargs # type: Any + ): + # type: (...) -> "models.RenderingSession" + """Updates the max lease time of a particular rendering session. + + Updates the max lease time of a particular rendering session. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param session_id: An ID uniquely identifying the rendering session for the given account. The + ID is case sensitive, can contain any combination of alphanumeric characters including hyphens + and underscores, and cannot contain more than 256 characters. + :type session_id: str + :param body: Settings used to update the session. + :type body: ~azure.mixedreality.remoterendering._generated.models.UpdateSessionSettings + :keyword callable cls: A custom type or function that will be passed the direct response + :return: RenderingSession, or the result of cls(response) + :rtype: ~azure.mixedreality.remoterendering._generated.models.RenderingSession + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.RenderingSession"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 422: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + content_type = kwargs.pop("content_type", "application/json") + + # Construct URL + url = self.update_session.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'session_id': self._serialize.url("session_id", session_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = 'application/json' + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(body, 'UpdateSessionSettings') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + deserialized = self._deserialize('RenderingSession', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}'} # type: ignore + + def stop_session( + self, + account_id, # type: str + session_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Stops a particular rendering session. + + Stops a particular rendering session. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :param session_id: An ID uniquely identifying the rendering session for the given account. The + ID is case sensitive, can contain any combination of alphanumeric characters including hyphens + and underscores, and cannot contain more than 256 characters. + :type session_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + # Construct URL + url = self.stop_session.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + 'session_id': self._serialize.url("session_id", session_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + response_headers = {} + response_headers['MS-CV']=self._deserialize('str', response.headers.get('MS-CV')) + + if cls: + return cls(pipeline_response, None, response_headers) + + stop_session.metadata = {'url': '/accounts/{account_id}/sessions/{session_id}/:stop'} # type: ignore + + def list_sessions( + self, + account_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["models.SessionsList"] + """Gets a list of all rendering sessions. + + Gets a list of all rendering sessions. + + :param account_id: The Azure Remote Rendering account ID. + :type account_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SessionsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mixedreality.remoterendering._generated.models.SessionsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["models.SessionsList"] + error_map = { + 404: ResourceNotFoundError, + 409: ResourceExistsError, + 500: lambda response: HttpResponseError(response=response, model=self._deserialize(models.ErrorResponse, response)), + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-01-01" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = 'application/json' + + if not next_link: + # Construct URL + url = self.list_sessions.metadata['url'] # type: ignore + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + path_format_arguments = { + 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + 'account_id': self._serialize.url("account_id", account_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SessionsList', pipeline_response) + list_of_elem = deserialized.sessions + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_sessions.metadata = {'url': '/accounts/{account_id}/sessions'} # type: ignore diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/py.typed b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_generated/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_polling.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_polling.py new file mode 100644 index 000000000000..01ddb8cd06ab --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_polling.py @@ -0,0 +1,175 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +import base64 +import time +from functools import partial +from typing import TYPE_CHECKING + +from azure.core.polling import PollingMethod +from azure.core.exceptions import HttpResponseError, ODataV4Format + +from ._generated.models import (AssetConversion, AssetConversionStatus, + RenderingSession, RenderingSessionStatus) + +# pylint: disable=unsubscriptable-object +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Union + + from azure.core.credentials import TokenCredential + + from ._generated import RemoteRenderingRestClient + + +class RemoteRenderingPolling(PollingMethod): + """ Abstract base class for polling. + """ + + def __init__(self, account_id, is_terminated, polling_interval=5): + # type: (str, Callable, int) -> None + self._account_id = account_id + self._response = None # type: Union[AssetConversion, RenderingSession, None] + self._client = None # type: Union[RemoteRenderingRestClient, None] + self._query_status = None + self._is_terminated = is_terminated + self._polling_interval = polling_interval + + def _update_status(self): + # type: () -> None + if self._query_status is None: + raise Exception("this poller has not been initialized") + self._response = self._query_status() # pylint: disable=E1102 + if self._response.error is not None: + error = HttpResponseError("Polling returned a status indicating an error state.", model=self._response) + error.error = ODataV4Format(self._response.error.serialize()) + raise error + + def initialize(self, client, initial_response, deserialization_callback): + # type: (Any, Any, Callable) -> None + self._client = client + self._response = initial_response + + def run(self): + # type: () -> None + while not self.finished(): + self._update_status() + if not self.finished(): + time.sleep(self._polling_interval) + + def status(self): + # type: () -> str + raise NotImplementedError("This method needs to be implemented") + + def finished(self): + # type: () -> bool + if self._response is None: + return False + if self._response.status is None: + return False + return self._is_terminated(self._response.status) + + def resource(self): + # type: () -> Union[AssetConversion, RenderingSession, None] + if not self.finished(): + return None + return self._response + + def get_continuation_token(self): + # type() -> str + + # returns a Base64 encoded string of "::" + return base64.b64encode(("1:"+self._account_id+":"+self._response.id).encode('ascii')).decode('ascii') + + +class ConversionPolling(RemoteRenderingPolling): + def __init__(self, account_id, polling_interval=5): + # type: (str, int) -> None + def is_terminated(status): + return status in [ + AssetConversionStatus.FAILED, + AssetConversionStatus.SUCCEEDED + ] + + super(ConversionPolling, self).__init__(account_id=account_id, + is_terminated=is_terminated, + polling_interval=polling_interval) + + def initialize(self, client, initial_response, deserialization_callback): + # type: (Any, Any, Any, Callable) -> None + super(ConversionPolling, self).initialize(client=client, + initial_response=initial_response, + deserialization_callback=deserialization_callback) + self._query_status = partial( + self._client.remote_rendering.get_conversion, + account_id=self._account_id, + conversion_id=initial_response.id) + + def status(self): + # type: () -> str + if self._response is None: + return AssetConversionStatus.NOT_STARTED + return self._response.status + + @classmethod + def from_continuation_token(cls, continuation_token, client, **kwargs): # pylint: disable=W0221 + # type(str, RemoteRenderingRestClient, Any) -> Tuple + + version, account_id, conversion_id = base64.b64decode( + continuation_token.encode('ascii')).decode('ascii').split(":") + + if version != "1": + raise ValueError("Cannot continue from continuation token from a different/newer client version.") + + initial_response = client.remote_rendering.get_conversion( + account_id=account_id, + conversion_id=conversion_id, + **kwargs) + + return client, initial_response, None + + +class SessionPolling(RemoteRenderingPolling): + def __init__(self, account_id, polling_interval=2): + # type: (str, int) -> None + def is_terminated(status): + return status in [ + RenderingSessionStatus.EXPIRED, + RenderingSessionStatus.ERROR, + RenderingSessionStatus.STOPPED, + RenderingSessionStatus.READY + ] + super(SessionPolling, self).__init__(account_id=account_id, + is_terminated=is_terminated, + polling_interval=polling_interval) + + def initialize(self, client, initial_response, deserialization_callback): + # type: (Any, Any, Any, Callable) -> None + super(SessionPolling, self).initialize(client, initial_response, deserialization_callback) + self._query_status = partial( + self._client.remote_rendering.get_session, account_id=self._account_id, session_id=initial_response.id) + + def status(self): + # type: () -> str + if self._response is None: + return RenderingSessionStatus.STARTING + return self._response.status + + @classmethod + def from_continuation_token(cls, continuation_token, client, **kwargs): # pylint: disable=W0221 + # type(str, RemoteRenderingRestClient, Any) -> Tuple + + version, account_id, session_id = base64.b64decode( + continuation_token.encode('ascii')).decode('ascii').split(":") + + if version != "1": + raise ValueError("Cannot continue from continuation token from a different/newer client version.") + + initial_response = client.remote_rendering.get_session( + account_id=account_id, + session_id=session_id, + **kwargs) + + return client, initial_response, None diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_remote_rendering_client.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_remote_rendering_client.py new file mode 100644 index 000000000000..e1ef95afca49 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_remote_rendering_client.py @@ -0,0 +1,361 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from azure.core.credentials import AccessToken, AzureKeyCredential +from azure.core.paging import ItemPaged +from azure.core.pipeline.policies import BearerTokenCredentialPolicy +from azure.core.polling import LROPoller +from azure.core.tracing.decorator import distributed_trace + +from ._api_version import RemoteRenderingApiVersion, validate_api_version +from ._generated import RemoteRenderingRestClient + +from ._generated.models import (AssetConversion, AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionSettings, + CreateAssetConversionSettings, + CreateRenderingSessionSettings, + RenderingSession, RenderingSessionSize, + UpdateSessionSettings) +from ._polling import ConversionPolling, SessionPolling +from ._shared.authentication_endpoint import construct_endpoint_url +from ._shared.mixed_reality_token_credential import get_mixedreality_credential +from ._shared.mixedreality_account_key_credential import \ + MixedRealityAccountKeyCredential +from ._shared.static_access_token_credential import StaticAccessTokenCredential +from ._version import SDK_MONIKER + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Union + + from azure.core.credentials import TokenCredential + + +class RemoteRenderingClient(object): + """A client for the Azure Remote Rendering Service. + + This client offers functionality to convert assets to the format expected by the runtime, and also to manage the + lifetime of remote rendering sessions. + + :param str endpoint: + The rendering service endpoint. This determines the region in which the rendering session is created and + asset conversions are performed. + :param str account_id: The Azure Remote Rendering account identifier. + :param str account_domain: + The Azure Remote Rendering account domain. For example, for an account created in the eastus region, this + will have the form "eastus.mixedreality.azure.com" + :param credential: Authentication for the Azure Remote + Rendering account. Can be of the form of an AzureKeyCredential, TokenCredential or an AccessToken acquired + from the Mixed Reality Secure Token Service (STS). + :type credential: Union[TokenCredential, AzureKeyCredential, AccessToken] + :keyword api_version: + The API version of the service to use for requests. It defaults to the latest service version. + Setting to an older version may result in reduced feature compatibility. + :paramtype api_version: str or ~azure.mixedreality.remoterenderings.RemoteRenderingApiVersion + """ + + def __init__(self, endpoint, account_id, account_domain, credential, **kwargs): + # type: (str, str, str, Union[TokenCredential, AccessToken], Any) -> None + self._api_version = kwargs.pop( + "api_version", RemoteRenderingApiVersion.V2021_01_01 + ) + validate_api_version(self._api_version) + + if not endpoint: + raise ValueError("endpoint cannot be None") + + if not account_id: + raise ValueError("account_id cannot be None") + + if not account_domain: + raise ValueError("account_domain cannot be None") + + if not credential: + raise ValueError("credential cannot be None") + + if isinstance(credential, AccessToken): + cred = StaticAccessTokenCredential(credential) # type: TokenCredential + elif isinstance(credential, AzureKeyCredential): + cred = MixedRealityAccountKeyCredential( + account_id=account_id, account_key=credential) + else: + cred = credential + + self.polling_interval = kwargs.pop("polling_interval", 5) + endpoint_url = kwargs.pop( + 'authentication_endpoint_url', construct_endpoint_url(account_domain)) + # otherwise assume it is a TokenCredential and simply pass it through + pipeline_credential = get_mixedreality_credential( + account_id=account_id, account_domain=account_domain, credential=cred, endpoint_url=endpoint_url) + + if pipeline_credential is None: + raise ValueError("credential is not of type TokenCredential, AzureKeyCredential or AccessToken") + + authentication_policy = BearerTokenCredentialPolicy( + pipeline_credential, endpoint_url + '/.default') + + self._account_id = account_id + + self._client = RemoteRenderingRestClient( + endpoint=endpoint, + authentication_policy=authentication_policy, + sdk_moniker=SDK_MONIKER, + api_version=self._api_version, + **kwargs) + + @distributed_trace + def begin_asset_conversion(self, conversion_id, input_settings, output_settings, **kwargs): + # type: (str, AssetConversionInputSettings, AssetConversionOutputSettings, Any) -> LROPoller[AssetConversion] + """ + Start a new asset conversion with the given options. + :param str conversion_id: + An ID uniquely identifying the conversion for the remote rendering account. The ID is case sensitive, can + contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain + more than 256 characters. + :param ~azure.mixedreality.remoterendering.AssetConversionInputSettings input_settings: Options for the + input of the conversion. + :param ~azure.mixedreality.remoterendering.AssetConversionOutputSettings output_settings: Options for the + output of the conversion. + :return: A poller for the created asset conversion + :rtype: ~azure.core.polling.LROPoller[AssetConversion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + polling_interval = kwargs.pop("polling_interval", self.polling_interval) + + initial_state = self._client.remote_rendering.create_conversion( + account_id=self._account_id, + conversion_id=conversion_id, + body=CreateAssetConversionSettings(settings=AssetConversionSettings( + input_settings=input_settings, output_settings=output_settings)), + **kwargs) + + polling_method = ConversionPolling(account_id=self._account_id, polling_interval=polling_interval) + return LROPoller(client=self._client, + initial_response=initial_state, + deserialization_callback=lambda: None, + polling_method=polling_method) + + @distributed_trace + def get_asset_conversion(self, conversion_id, **kwargs): + # type: (str, Any) -> AssetConversion + """ + Retrieve the state of a previously created conversion. + :param str conversion_id: + The identifier of the conversion to retrieve. + :return: Information about the ongoing conversion process. + :rtype: ~azure.mixedreality.remoterendering.models.AssetConversion + :raises ~azure.core.exceptions.HttpResponseError: + """ + return self._client.remote_rendering.get_conversion( + account_id=self._account_id, conversion_id=conversion_id, **kwargs) + + @distributed_trace + def get_asset_conversion_poller(self, **kwargs): + # type: (Any) -> LROPoller[AssetConversion] + """ + Returns a poller for an existing conversion by conversion id or a continuation token retrieved from a previous + poller. + :keyword conversion_id: The conversion id of a previously created conversion. + :paramtype conversion_id: str + :keyword continuation_token: + A continuation token retrieved from a poller of a conversion. + :paramtype continuation_token: str + :return: A poller for the created asset conversion + :rtype: ~azure.core.polling.LROPoller[AssetConversion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + + conversion_id = kwargs.pop("conversion_id", None) # type: Union[str,None] + continuation_token = kwargs.pop("continuation_token", None) # type: Union[str,None] + + if conversion_id is None and continuation_token is None: + raise ValueError( + "Either conversion_id or continuation_token needs to be supplied.") + + if conversion_id is not None and continuation_token is not None: + raise ValueError( + "Parameters conversion_id and continuation_token are mutual exclusive. Supply only one of the two.") + + polling_interval = kwargs.pop("polling_interval", self.polling_interval) + polling_method = ConversionPolling(account_id=self._account_id, polling_interval=polling_interval) + if continuation_token is not None: + return LROPoller.from_continuation_token(continuation_token=continuation_token, + polling_method=polling_method, + client=self._client) + + if conversion_id is not None: + initial_state = self._client.remote_rendering.get_conversion( + account_id=self._account_id, + conversion_id=conversion_id, + **kwargs) + + return LROPoller(client=self._client, + initial_response=initial_state, + deserialization_callback=lambda: None, + polling_method=polling_method) + + @distributed_trace + def list_asset_conversions(self, **kwargs): + # type: (...) -> ItemPaged[AssetConversion] + """ Gets conversions for the remote rendering account. + :rtype: ItemPaged[AssetConversion] + :raises ~azure.core.exceptions.HttpResponseError: + """ + return self._client.remote_rendering.list_conversions(account_id=self._account_id, **kwargs) # type: ignore + + @distributed_trace + def begin_rendering_session(self, session_id, size, lease_time_minutes, **kwargs): + # type: (str, Union[str, RenderingSessionSize], int, Any) -> LROPoller[RenderingSession] + """ + :param str session_id: An ID uniquely identifying the rendering session for the given account. The ID is case + sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and + cannot contain more than 256 characters. + :param size: Size of the server used for the rendering session. Remote Rendering with Standard size server has + a maximum scene size of 20 million polygons. Remote Rendering with Premium size does not enforce a hard + maximum, but performance may be degraded if your content exceeds the rendering capabilities of the service. + :param int lease_time_minutes: The time in minutes the session will run after reaching the 'Ready' state. + :type size: str or ~azure.mixedreality.remoterendering.RenderingSessionSize + :return: A poller for the created rendering session + :rtype: LROPoller[RenderingSession] + :raises ~azure.core.exceptions.HttpResponseError: + """ + settings = CreateRenderingSessionSettings( + size=size, lease_time_minutes=lease_time_minutes) + initial_state = self._client.remote_rendering.create_session( + account_id=self._account_id, + session_id=session_id, + body=settings, + **kwargs) + polling_interval = kwargs.pop("polling_interval", self.polling_interval) + polling_method = SessionPolling(account_id=self._account_id, polling_interval=polling_interval) + return LROPoller(client=self._client, + initial_response=initial_state, + deserialization_callback=lambda: None, + polling_method=polling_method) + + @distributed_trace + def get_rendering_session(self, session_id, **kwargs): + # type: (str, Any) -> RenderingSession + ''' + Returns the properties of a previously generated rendering session. + :param str session_id: The identifier of the rendering session. + :return: Properties of the rendering session + :rtype: ~azure.mixedreality.remoterendering.models.RenderingSession + :raises ~azure.core.exceptions.HttpResponseError: + ''' + return self._client.remote_rendering.get_session( + account_id=self._account_id, + session_id=session_id, + **kwargs) + + def get_rendering_session_poller(self, **kwargs): + # type: (Any) -> LROPoller[RenderingSession] + """ + Returns a poller for an existing rendering session by session id or a continuation token retrieved from a + previous poller. + :keyword session_id: The conversion id of a previously created conversion. + :paramtype session_id: str + :keyword continuation_token: + A continuation token retrieved from a poller of a session. + :paramtype continuation_token: str + :raises ~azure.core.exceptions.HttpResponseError: + """ + + session_id = kwargs.pop("session_id", None) # type: Union[str,None] + continuation_token = kwargs.pop("continuation_token", None) # type: Union[str,None] + + if session_id is None and continuation_token is None: + raise ValueError( + "Either session_id or continuation_token needs to be supplied.") + + if session_id is not None and continuation_token is not None: + raise ValueError( + "Parameters session_id and continuation_token are mutual exclusive. Supply only one of the two.") + + polling_interval = kwargs.pop("polling_interval", self.polling_interval) + if continuation_token is not None: + polling_method = SessionPolling(account_id=self._account_id, polling_interval=polling_interval) + return LROPoller.from_continuation_token(continuation_token=continuation_token, + polling_method=polling_method, + client=self._client) + + if session_id is not None: + initial_state = self._client.remote_rendering.get_session( + account_id=self._account_id, + session_id=session_id, + **kwargs) + + polling_method = SessionPolling(account_id=self._account_id, polling_interval=polling_interval) + return LROPoller(client=self._client, + initial_response=initial_state, + deserialization_callback=lambda: None, + polling_method=polling_method) + + @distributed_trace + def stop_rendering_session(self, session_id, **kwargs): + # type: (str, Any) -> None + """ + :param str session_id: The identifier of the session to be stopped. + :return: None + :rtype: None + :raises ~azure.core.exceptions.HttpResponseError: + """ + self._client.remote_rendering.stop_session( + account_id=self._account_id, session_id=session_id, **kwargs) + + @distributed_trace + def update_rendering_session(self, session_id, **kwargs): + # type: (str, Any) -> RenderingSession + """ + Updates an already existing rendering session. + :param str session_id: The identifier of the session to be updated. + :keyword lease_time_minutes: The new lease time of the rendering session. Has to be strictly larger than + the previous lease time. + :paramtype lease_time_minutes: int + :return: The properties of the updated session + :rtype: ~azure.mixedreality.remoterendering.models.RenderingSession + :raises ~azure.core.exceptions.HttpResponseError: + """ + + lease_time_minutes = kwargs.pop("lease_time_minutes", None) # type: Union[int,None] + if lease_time_minutes is not None: + return self._client.remote_rendering.update_session(account_id=self._account_id, + session_id=session_id, + body=UpdateSessionSettings( + lease_time_minutes=lease_time_minutes), + **kwargs) + + # if no param to update has been provided the unchanged session is returned + return self._client.remote_rendering.get_session(account_id=self._account_id, + session_id=session_id, + **kwargs) + + @distributed_trace + def list_rendering_sessions(self, **kwargs): + # type: (...) -> ItemPaged[RenderingSession] + """ + List rendering sessions in the 'Ready' or 'Starting' state. Does not return stopped or failed rendering + sessions. + :rtype: ItemPaged[RenderingSession] + :raises ~azure.core.exceptions.HttpResponseError: + """ + return self._client.remote_rendering.list_sessions(account_id=self._account_id, **kwargs) # type: ignore + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> RemoteRenderingClient + self._client.__enter__() # pylint:disable=no-member + return self + + def __exit__(self, *args): + # type: (*Any) -> None + self._client.__exit__(*args) # pylint:disable=no-member diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/INFO.md b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/INFO.md new file mode 100644 index 000000000000..738dabd25ef8 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/INFO.md @@ -0,0 +1 @@ +This is utility code from sdk\mixedreality\azure-mixedreality-authentication\azure\mixedreality\authentication\_shared copied in here to prevent exposing internal details \ No newline at end of file diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/__init__.py new file mode 100644 index 000000000000..5b396cd202e8 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/__init__.py @@ -0,0 +1,5 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/__init__.py new file mode 100644 index 000000000000..5b396cd202e8 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/__init__.py @@ -0,0 +1,5 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixed_reality_token_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixed_reality_token_credential.py new file mode 100644 index 000000000000..9cedc7444af4 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixed_reality_token_credential.py @@ -0,0 +1,68 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from azure.mixedreality.authentication.aio import MixedRealityStsClient +from .static_access_token_credential import StaticAccessTokenCredential + +if TYPE_CHECKING: + from typing import Any + from azure.core.credentials import AccessToken + from azure.core.credentials_async import AsyncTokenCredential + + +def get_mixedreality_credential( + account_id: str, + account_domain: str, + endpoint_url: str, + credential: "AsyncTokenCredential", + **kwargs): + if isinstance(credential, StaticAccessTokenCredential): + return credential + + return MixedRealityTokenCredential( + account_id=account_id, + account_domain=account_domain, + endpoint_url=endpoint_url, + credential=credential, + **kwargs) + + +class MixedRealityTokenCredential(object): + """ Represents a token credential that can be used to access a Mixed Reality service. + This implements the TokenCredential protocol. + + :param str account_id: The Mixed Reality service account identifier. + :param str endpoint_url: The Mixed Reality STS service endpoint. + :param TokenCredential credential: The credential used to access the Mixed Reality service. + """ + + def __init__( + self, + account_id: str, + account_domain: str, + endpoint_url: str, + credential: "AsyncTokenCredential", + **kwargs): + self.stsClient = MixedRealityStsClient( + account_id=account_id, + account_domain=account_domain, + custom_endpoint_url=endpoint_url, + credential=credential, + **kwargs) + + async def get_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": # pylint: disable=unused-argument + return await self.stsClient.get_token(**kwargs) + + async def close(self) -> None: + self.stsClient.close() + + async def __aenter__(self): + await self.stsClient.__aenter__() + return self + + async def __aexit__(self, exc_type, exc_value, traceback) -> None: + await self.stsClient.__aexit__() diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixedreality_account_key_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixedreality_account_key_credential.py new file mode 100644 index 000000000000..9b34b848ad59 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/mixedreality_account_key_credential.py @@ -0,0 +1,56 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from datetime import date, datetime + +from azure.core.credentials import AccessToken + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + from azure.core.credentials import AzureKeyCredential + +ACCOUNT_KEY_VALID_YEARS = 10 + + +class MixedRealityAccountKeyCredential(object): + """ Represents an object used for Mixed Reality account key authentication. + + :param str account_id: The Mixed Reality service account identifier. + :param AzureKeyCredential account_key: The Mixed Reality service account primary or secondary key credential. + """ + + def __init__(self, account_id, account_key): + # type: (str, AzureKeyCredential) -> None + self.account_id = account_id + self.account_key = account_key + + async def get_token(self, *scopes: str, **kwargs: "Any") -> "AccessToken": # pylint: disable=unused-argument + token = self.account_id + ":" + self.account_key.key + + # No way to know when an account key might expire, so we'll set the + # access token wrapping it to expire 10 years in the future. + expiration_date = _add_years(datetime.now(), ACCOUNT_KEY_VALID_YEARS) + expiration_timestamp = int(expiration_date.timestamp()) + + return AccessToken(token, expiration_timestamp) + + async def close(self) -> None: + pass + + async def __aenter__(self): + pass + + async def __aexit__(self, exc_type, exc_value, traceback) -> None: + pass + + +def _add_years(date_to_update, years): + try: + return date_to_update.replace(year=date_to_update.year + years) + except ValueError: + return date_to_update + (date(date_to_update.year + years, 1, 1) - date(date_to_update.year, 1, 1)) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/static_access_token_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/static_access_token_credential.py new file mode 100644 index 000000000000..fccbd6f1a2b0 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/aio/static_access_token_credential.py @@ -0,0 +1,38 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + from azure.core.credentials_async import AsyncTokenCredential + from azure.core.credentials import AccessToken + +class StaticAccessTokenCredential(object): + """ Represents a static access token credential. + This implements the AsyncTokenCredential protocol. + + :param AccessToken access_token: An access token. + """ + + def __init__(self, access_token: "AccessToken"): + self._access_token = access_token + + async def get_token( + self, + #pylint: disable=unused-argument + *scopes: str, + **kwargs: "Any") -> "AccessToken": + return self._access_token + + async def close(self) -> None: + pass + + async def __aenter__(self): + pass + + async def __aexit__(self, exc_type, exc_value, traceback) -> None: + pass diff --git a/sdk/storage/azure-storage-file-datalake/tests/fake_credentials.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/authentication_endpoint.py similarity index 70% rename from sdk/storage/azure-storage-file-datalake/tests/fake_credentials.py rename to sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/authentication_endpoint.py index f3e51df2debb..72bdcc70fd96 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/fake_credentials.py +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/authentication_endpoint.py @@ -4,4 +4,6 @@ # license information. # -------------------------------------------------------------------------- -STORAGE_DATA_LAKE_ACCOUNT_FAKE_KEY = "NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==" +def construct_endpoint_url(account_domain): + # type: (str) -> str + return 'https://sts.' + account_domain diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixed_reality_token_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixed_reality_token_credential.py new file mode 100644 index 000000000000..849d484cff87 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixed_reality_token_credential.py @@ -0,0 +1,50 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from azure.mixedreality.authentication import MixedRealityStsClient +from .static_access_token_credential import StaticAccessTokenCredential + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Union + from azure.core.credentials import AccessToken, TokenCredential + + +def get_mixedreality_credential(account_id, account_domain, endpoint_url, credential, **kwargs): + # type: (str, str, str, TokenCredential, Any) -> TokenCredential + if isinstance(credential, StaticAccessTokenCredential): + return credential + + return MixedRealityTokenCredential( + account_id=account_id, + account_domain=account_domain, + endpoint_url=endpoint_url, + credential=credential, + **kwargs) + + +class MixedRealityTokenCredential(object): + """ Represents a token credential that can be used to access a Mixed Reality service. + This implements the TokenCredential protocol. + + :param str account_id: The Mixed Reality service account identifier. + :param str endpoint_url: The Mixed Reality STS service endpoint. + :param TokenCredential credential: The credential used to access the Mixed Reality service. + """ + + def __init__(self, account_id, account_domain, endpoint_url, credential, **kwargs): + # type: (str, str, str, TokenCredential, Any) -> None + self.stsClient = MixedRealityStsClient( + account_id=account_id, + account_domain=account_domain, + custom_endpoint_url=endpoint_url, + credential=credential, + **kwargs) + + def get_token(self, *scopes, **kwargs): # pylint: disable=unused-argument + # type: (*str, **Any) -> AccessToken + return self.stsClient.get_token(**kwargs) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixedreality_account_key_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixedreality_account_key_credential.py new file mode 100644 index 000000000000..a7ec1ca5db63 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/mixedreality_account_key_credential.py @@ -0,0 +1,46 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +from datetime import date, datetime +import time + +from azure.core.credentials import AzureKeyCredential, AccessToken + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + +ACCOUNT_KEY_VALID_YEARS = 10 + +class MixedRealityAccountKeyCredential(object): + """ Represents an object used for Mixed Reality account key authentication. + + :param str account_id: The Mixed Reality service account identifier. + :param AzureKeyCredential account_key: The Mixed Reality service account primary or secondary key credential. + """ + + def __init__(self, account_id, account_key): + # type: (str, AzureKeyCredential) -> None + self.account_id = account_id + self.account_key = account_key + + def get_token(self, *scopes, **kwargs): #pylint: disable=unused-argument + # type: (*str, **Any) -> AccessToken + + token = self.account_id + ":" + self.account_key.key + + # No way to know when an account key might expire, so we'll set the + # access token wrapping it to expire 10 years in the future. + expiration_date = _add_years(datetime.now(), ACCOUNT_KEY_VALID_YEARS) + expiration_timestamp = int(time.mktime(expiration_date.timetuple())) + + return AccessToken(token, expiration_timestamp) + +def _add_years(date_to_update, years): + try: + return date_to_update.replace(year=date_to_update.year + years) + except ValueError: + return date_to_update + (date(date_to_update.year + years, 1, 1) - date(date_to_update.year, 1, 1)) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/static_access_token_credential.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/static_access_token_credential.py new file mode 100644 index 000000000000..712f4e20738f --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_shared/static_access_token_credential.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + from azure.core.credentials import TokenCredential + from azure.core.credentials import AccessToken + +class StaticAccessTokenCredential(object): + """ Represents a static access token credential. + This implements the TokenCredential protocol. + + :param AccessToken access_token: An access token. + """ + + def __init__(self, access_token): + # type: (AccessToken) -> None + self._access_token = access_token + + def get_token(self, *scopes, **kwargs): #pylint: disable=unused-argument + # type: (*str, **Any) -> AccessToken + return self._access_token diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_version.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_version.py new file mode 100644 index 000000000000..6907454ba035 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/_version.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- + +# matches SEMVER +VERSION = "1.0.0b1" + +SDK_MONIKER = "mixedreality-remoterendering/{}".format(VERSION) # type: str diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/__init__.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/__init__.py new file mode 100644 index 000000000000..1f5e515d93c8 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/__init__.py @@ -0,0 +1,11 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- + +from ._remote_rendering_client_async import RemoteRenderingClient + +__all__ = [ + 'RemoteRenderingClient' +] diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_polling_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_polling_async.py new file mode 100644 index 000000000000..90319eec3068 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_polling_async.py @@ -0,0 +1,181 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------- +import asyncio +import base64 +from functools import partial +from typing import TYPE_CHECKING + +from azure.core.polling import AsyncPollingMethod +from azure.core.exceptions import HttpResponseError, ODataV4Format + +from .._generated.aio import RemoteRenderingRestClient +from .._generated.models import (AssetConversion, AssetConversionInputSettings, + AssetConversionStatus, + RenderingSession, RenderingSessionSize, + RenderingSessionStatus) + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Union + + +# pylint: disable=unsubscriptable-object + + +class RemoteRenderingPollingAsync(AsyncPollingMethod): + """ABC class for remote rendering operations. + """ + + def __init__(self, account_id, is_terminated, polling_interval=5): + # type: (str, Callable, int) -> None + self._account_id = account_id + self._response = None # type: Union[AssetConversion, RenderingSession, None] + self._client = None # type: Union[RemoteRenderingRestClient, None] + self._query_status = None # type: Union[partial, None] + self._is_terminated = is_terminated + self._polling_interval = polling_interval + + async def _update_status(self): + # type: () -> None + if self._query_status is None: + raise Exception("this poller has not been initialized") + self._response = await self._query_status() # pylint: disable=E1102 + if self._response is not None and self._response.error is not None: + error = HttpResponseError("Polling returned a status indicating an error state.", model=self._response) + error.error = ODataV4Format(self._response.error.serialize()) + raise error + + def initialize(self, client, initial_response, deserialization_callback): + # type: (Any, Any, Callable) -> None + self._client = client + self._response = initial_response + + async def run(self): + # type: () -> None + while not self.finished(): + await self._update_status() + if not self.finished(): + await asyncio.sleep(self._polling_interval) + + def status(self): + # type: () -> str + raise NotImplementedError("This method needs to be implemented in a derived class.") + + def finished(self): + # type: () -> bool + if self._response is None: + return False + if self._response.status is None: + return False + return self._is_terminated(self._response.status) + + def resource(self): + # type: () -> Union[AssetConversion, RenderingSession, None] + if not self.finished(): + return None + return self._response + + def get_continuation_token(self): + # type() -> str + + # returns a Base64 encoded string of "::" + return base64.b64encode(("1:"+self._account_id+":"+self._response.id).encode('ascii')).decode('ascii') + + +class ConversionPollingAsync(RemoteRenderingPollingAsync): + def __init__(self, account_id, polling_interval=5): + # type: (str, int) -> None + def is_terminated(status): + return status in [ + AssetConversionStatus.FAILED, + AssetConversionStatus.SUCCEEDED + ] + super(ConversionPollingAsync, self).__init__(account_id=account_id, + is_terminated=is_terminated, + polling_interval=polling_interval) + + def initialize(self, client, initial_response, deserialization_callback): + # type: (RemoteRenderingRestClient, AssetConversion, Callable) -> None + super().initialize(client, initial_response, deserialization_callback) + if self._client is not None: + self._query_status = partial( + self._client.remote_rendering.get_conversion, + account_id=self._account_id, + conversion_id=initial_response.id) + + def status(self): + # type: () -> str + if self._response is None: + return AssetConversionStatus.NOT_STARTED + return self._response.status + + @classmethod + async def initial_response_from_continuation_token(cls, + continuation_token, + client, + **kwargs): # pylint: disable=W0221 + # type(str, RemoteRenderingRestClient, Any) -> Tuple + + version, account_id, conversion_id = base64.b64decode( + continuation_token.encode('ascii')).decode('ascii').split(":") + + if version != "1": + raise ValueError("Cannot continue from continuation token from a different/newer client version.") + + initial_response = await client.remote_rendering.get_conversion( + account_id=account_id, + conversion_id=conversion_id, + **kwargs) + + return initial_response + + +class SessionPollingAsync(RemoteRenderingPollingAsync): + def __init__(self, account_id, polling_interval=2): + # type: (str, int) -> None + def is_terminated(status): + return status in [ + RenderingSessionStatus.EXPIRED, + RenderingSessionStatus.ERROR, + RenderingSessionStatus.STOPPED, + RenderingSessionStatus.READY + ] + super(SessionPollingAsync, self).__init__(account_id=account_id, + is_terminated=is_terminated, + polling_interval=polling_interval) + + def initialize(self, client, initial_response, deserialization_callback): + # type: (RemoteRenderingRestClient, RenderingSession, Callable) -> None + super().initialize(client, initial_response, deserialization_callback) + if self._client is not None: + self._query_status = partial( + self._client.remote_rendering.get_session, account_id=self._account_id, session_id=initial_response.id) + + def status(self): + # type: () -> str + if self._response is None: + return RenderingSessionStatus.STARTING + return self._response.status + + @classmethod + async def initial_response_from_continuation_token(cls, + continuation_token, + client, + **kwargs): # pylint: disable=W0221 + # type(str, RemoteRenderingRestClient, Any) -> Tuple + + version, account_id, session_id = base64.b64decode( + continuation_token.encode('ascii')).decode('ascii').split(":") + + if version != "1": + raise ValueError("Cannot continue from continuation token from a different/newer client version.") + + initial_response = await client.remote_rendering.get_session( + account_id=account_id, + session_id=session_id, + **kwargs) + + return initial_response diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_remote_rendering_client_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_remote_rendering_client_async.py new file mode 100644 index 000000000000..bf10e1ecd877 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/azure/mixedreality/remoterendering/aio/_remote_rendering_client_async.py @@ -0,0 +1,358 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + + +from typing import TYPE_CHECKING, Any, Callable, Union + +from azure.core.async_paging import AsyncItemPaged +from azure.core.credentials import AccessToken, AzureKeyCredential +from azure.core.pipeline.policies import AsyncBearerTokenCredentialPolicy +from azure.core.polling import AsyncLROPoller +from azure.core.tracing.decorator_async import distributed_trace_async + +from .._api_version import RemoteRenderingApiVersion, validate_api_version +from .._generated.aio import RemoteRenderingRestClient +from .._generated.models import (AssetConversion, AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionSettings, + CreateAssetConversionSettings, + CreateRenderingSessionSettings, + RenderingSession, RenderingSessionSize, + UpdateSessionSettings) +from .._shared.aio.mixed_reality_token_credential import \ + get_mixedreality_credential +from .._shared.aio.mixedreality_account_key_credential import \ + MixedRealityAccountKeyCredential +from .._shared.aio.static_access_token_credential import \ + StaticAccessTokenCredential +from .._shared.authentication_endpoint import construct_endpoint_url +from .._version import SDK_MONIKER +from ._polling_async import ConversionPollingAsync, SessionPollingAsync + +if TYPE_CHECKING: + from azure.core.credentials_async import AsyncTokenCredential + +# pylint: disable=unsubscriptable-object + + +class RemoteRenderingClient(object): + """A client for the Azure Remote Rendering Service. + + This client offers functionality to convert assets to the format expected by the runtime, and also to manage the + lifetime of remote rendering sessions. + + :param endpoint: + The rendering service endpoint. This determines the region in which the rendering session is created and + asset conversions are performed. + :type endpoint: str + :param account_id: The Azure Remote Rendering account identifier. + :type account_id: str + :param account_domain: + The Azure Remote Rendering account domain. For example, for an account created in the eastus region, this + will have the form "eastus.mixedreality.azure.com" + :type account_domain: str + :param credential: Authentication for the Azure Remote + Rendering account. Can be of the form of an AzureKeyCredential, AsyncTokenCredential or an AccessToken acquired + from the Mixed Reality Secure Token Service (STS). + :type credential: Union[AsyncTokenCredential, AzureKeyCredential, AccessToken] + :keyword api_version: + The API version of the service to use for requests. It defaults to the latest service version. + Setting to an older version may result in reduced feature compatibility. + :paramtype api_version: str or ~azure.mixedreality.remoterenderings.RemoteRenderingApiVersion + """ + + def __init__(self, + endpoint: str, + account_id: str, + account_domain: str, + credential: Union["AsyncTokenCredential", AzureKeyCredential, AccessToken], + **kwargs) -> None: + + self._api_version = kwargs.pop( + "api_version", RemoteRenderingApiVersion.V2021_01_01 + ) + validate_api_version(self._api_version) + + self._account_id = account_id + + if not endpoint: + raise ValueError("endpoint cannot be None") + + if not account_id: + raise ValueError("account_id cannot be None") + + if not account_domain: + raise ValueError("account_domain cannot be None") + + if not credential: + raise ValueError("credential cannot be None") + + endpoint_url = kwargs.pop( + 'authentication_endpoint_url', construct_endpoint_url(account_domain)) # type: str + + if isinstance(credential, AccessToken): + cred = StaticAccessTokenCredential(credential) # type: AsyncTokenCredential + elif isinstance(credential, AzureKeyCredential): + cred = MixedRealityAccountKeyCredential( + account_id=account_id, account_key=credential) + else: + cred = credential + # otherwise assume it is a TokenCredential and simply pass it through + pipeline_credential = get_mixedreality_credential( + account_id=account_id, account_domain=account_domain, credential=cred, endpoint_url=endpoint_url) + + self.polling_interval = kwargs.pop("polling_interval", 5) + + authentication_policy = AsyncBearerTokenCredentialPolicy( + pipeline_credential, endpoint_url + '/.default') + + self._account_id = account_id + + self._client = RemoteRenderingRestClient( + endpoint=endpoint, + authentication_policy=authentication_policy, + sdk_moniker=SDK_MONIKER, + api_version=self._api_version, + **kwargs) + + @distributed_trace_async + async def begin_asset_conversion(self, + conversion_id: str, + input_settings: AssetConversionInputSettings, + output_settings: AssetConversionOutputSettings, + **kwargs) -> AsyncLROPoller[AssetConversion]: + """ + Start a new asset conversion with the given options. + :param str conversion_id: + An ID uniquely identifying the conversion for the remote rendering account. The ID is case sensitive, can + contain any combination of alphanumeric characters including hyphens and underscores, and cannot contain + more than 256 characters. + :param ~azure.mixedreality.remoterendering.AssetConversionInputSettings input_settings: Options for the + input of the conversion + :param ~azure.mixedreality.remoterendering.AssetConversionOutputSettings output_settings: Options for the + output of the conversion. + :return: A poller for the created asset conversion + :rtype: ~azure.core.polling.AsyncLROPoller[AssetConversion] + """ + polling_interval = kwargs.pop("polling_interval", self.polling_interval) + polling_method = ConversionPollingAsync(account_id=self._account_id, polling_interval=polling_interval) + settings = AssetConversionSettings(input_settings=input_settings, output_settings=output_settings) + initial_state = await self._client.remote_rendering.create_conversion(account_id=self._account_id, + conversion_id=conversion_id, + body=CreateAssetConversionSettings( + settings=settings), + **kwargs) + return AsyncLROPoller(client=self._client, + initial_response=initial_state, + deserialization_callback=lambda: None, + polling_method=polling_method) + + @distributed_trace_async + async def get_asset_conversion(self, conversion_id: str, **kwargs) -> AssetConversion: + """ + Retrieve the state of a previously created conversion. + :param str conversion_id: + The identifier of the conversion to retrieve. + :return: Information about the ongoing conversion process. + :rtype: ~azure.mixedreality.remoterendering.AssetConversion + """ + return await self._client.remote_rendering.get_conversion(account_id=self._account_id, + conversion_id=conversion_id, + **kwargs) + + async def get_asset_conversion_poller(self, **kwargs): + # type: (Any) -> AsyncLROPoller[AssetConversion] + """ + Returns a poller for an existing conversion by conversion id or a continuation token retrieved from a previous + poller. + :keyword conversion_id: The conversion id of a previously created conversion. + :paramtype conversion_id: str + :keyword continuation_token: + A continuation token retrieved from a poller of a conversion. + :paramtype continuation_token: str + :return: A poller for the created asset conversion + :rtype: ~azure.core.polling.AsyncLROPoller[AssetConversion] + """ + + conversion_id = kwargs.pop("conversion_id", None) # type: Union[str,None] + continuation_token = kwargs.pop("continuation_token", None) # type: Union[str,None] + + if conversion_id is None and continuation_token is None: + raise ValueError( + "Either conversion_id or continuation_token needs to be supplied.") + + if conversion_id is not None and continuation_token is not None: + raise ValueError( + "Parameters conversion_id and continuation_token are mutual exclusive. Supply only one of the two.") + polling_interval = kwargs.pop("polling_interval", self.polling_interval) + polling_method = ConversionPollingAsync(account_id=self._account_id, polling_interval=polling_interval) + if continuation_token is not None: + initial_state = await ConversionPollingAsync.initial_response_from_continuation_token( + continuation_token, + client=self._client, + **kwargs) + + if conversion_id is not None: + initial_state = await self._client.remote_rendering.get_conversion( + account_id=self._account_id, + conversion_id=conversion_id, + **kwargs) + + return AsyncLROPoller(client=self._client, + initial_response=initial_state, + deserialization_callback=lambda: None, + polling_method=polling_method) + + @distributed_trace_async + async def list_asset_conversions(self, **kwargs): + # type: (...) -> AsyncItemPaged[AssetConversion] + """ + Gets conversions for the remote rendering account. + :rtype: AsyncItemPaged[AssetConversion] + """ + return self._client.remote_rendering.list_conversions(account_id=self._account_id, **kwargs) # type: ignore + + @distributed_trace_async + async def begin_rendering_session(self, + session_id: str, + size: Union[str, RenderingSessionSize], + lease_time_minutes: int, + **kwargs) -> AsyncLROPoller[RenderingSession]: + """ + :param session_id: An ID uniquely identifying the rendering session for the given account. The ID is case + sensitive, can contain any combination of alphanumeric characters including hyphens and underscores, and + cannot contain more than 256 characters. + :type session_id: str + :param size: Size of the server used for the rendering session. Remote Rendering with Standard size server has + a maximum scene size of 20 million polygons. Remote Rendering with Premium size does not enforce a hard + maximum, but performance may be degraded if your content exceeds the rendering capabilities of the service. + :type size: str or ~azure.mixedreality.remoterendering.RenderingSessionSize + :param lease_time_minutes: The time in minutes the session will run after reaching the 'Ready' state. + :type lease_time_minutes: int + :return: A poller for the created rendering session + :rtype: AsyncLROPoller[RenderingSession] + """ + polling_interval = kwargs.pop("polling_interval", self.polling_interval) + polling_method = SessionPollingAsync(account_id=self._account_id, polling_interval=polling_interval) + settings = CreateRenderingSessionSettings( + size=size, lease_time_minutes=lease_time_minutes) + initial_state = await self._client.remote_rendering.create_session(account_id=self._account_id, + session_id=session_id, + body=settings, + **kwargs) + return AsyncLROPoller(client=self._client, + initial_response=initial_state, + deserialization_callback=lambda: None, + polling_method=polling_method) + + @distributed_trace_async + async def get_rendering_session(self, session_id: str, **kwargs) -> RenderingSession: + ''' + Returns the properties of a previously generated rendering session. + :param str session_id: The identifier of the rendering session. + :return: Properties of the rendering session + :rtype: ~azure.mixedreality.remoterendering.RenderingSession + ''' + return await self._client.remote_rendering.get_session(self._account_id, session_id=session_id, **kwargs) + + async def get_rendering_session_poller(self, **kwargs): + # type: (Any) -> AsyncLROPoller[RenderingSession] + """ + Returns a poller for an existing rendering session by session id or a continuation token retrieved from a + previous poller. + :keyword session_id: The conversion id of a previously created conversion. + :paramtype session_id: str + :keyword continuation_token: + A continuation token retrieved from a poller of a session. + :paramtype continuation_token: str + :return: A poller for the created rendering session + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mixedreality.remoterendering.RenderingSession] + """ + + session_id = kwargs.pop("session_id", None) # type: Union[str,None] + continuation_token = kwargs.pop("continuation_token", None) # type: Union[str,None] + + if session_id is None and continuation_token is None: + raise ValueError( + "Either session_id or continuation_token needs to be supplied.") + + if session_id is not None and continuation_token is not None: + raise ValueError( + "Parameters session_id and continuation_token are mutual exclusive. Supply only one of the two.") + polling_interval = kwargs.pop("polling_interval", self.polling_interval) + polling_method = SessionPollingAsync(account_id=self._account_id, polling_interval=polling_interval) + if continuation_token is not None: + initial_state = await SessionPollingAsync.initial_response_from_continuation_token( + continuation_token=continuation_token, + client=self._client, **kwargs) + + if session_id is not None: + initial_state = await self._client.remote_rendering.get_session( + account_id=self._account_id, + session_id=session_id, + **kwargs) + + return AsyncLROPoller(client=self._client, + initial_response=initial_state, + deserialization_callback=lambda: None, + polling_method=polling_method) + + @distributed_trace_async + async def update_rendering_session(self, + session_id: str, + **kwargs) -> RenderingSession: + """ + Updates an already existing rendering session. + :param str session_id: The identifier of the session to be updated. + :keyword lease_time_minutes: The new lease time of the rendering session. Has to be strictly larger than + the previous lease time. + :paramtype lease_time_minutes: int + :rtype: ~azure.mixedreality.remoterendering.models.RenderingSession + :raises ~azure.core.exceptions.HttpResponseError: + """ + lease_time_minutes = kwargs.pop("lease_time_minutes", None) # type: Union[int,None] + if lease_time_minutes is not None: + return await self._client.remote_rendering.update_session(account_id=self._account_id, + session_id=session_id, + body=UpdateSessionSettings( + lease_time_minutes=lease_time_minutes), + **kwargs) + + # if no param to update has been provided the unchanged session is returned + return await self._client.remote_rendering.get_session(self._account_id, session_id=session_id, **kwargs) + + @distributed_trace_async + async def stop_rendering_session(self, session_id: str, **kwargs) -> None: + """ + :param str session_id: The identifier of the session to be stopped. + :return: None + :rtype: None + """ + return await self._client.remote_rendering.stop_session(account_id=self._account_id, + session_id=session_id, + **kwargs) + + @distributed_trace_async + async def list_rendering_sessions( + self, + **kwargs): + # type: (...) -> AsyncItemPaged[RenderingSession] + """ + List rendering sessions in the 'Ready' or 'Starting' state. Does not return stopped or failed rendering + sessions. + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mixedreality.remoterendering.RenderingSession] + """ + return self._client.remote_rendering.list_sessions(account_id=self._account_id, **kwargs) # type: ignore + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "RemoteRenderingClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *args) -> None: + await self._client.__aexit__(*args) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/dev_requirements.txt b/sdk/remoterendering/azure-mixedreality-remoterendering/dev_requirements.txt new file mode 100644 index 000000000000..60cacd4e638f --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/dev_requirements.txt @@ -0,0 +1,8 @@ +-e ../../../tools/azure-sdk-tools +../../core/azure-core +../../nspkg/azure-mixedreality-nspkg +../../mixedreality/azure-mixedreality-authentication +aiohttp>=3.0; python_version >= '3.5' +-e ../../identity/azure-identity +-e ../../../tools/azure-devtools + diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/mypy.ini b/sdk/remoterendering/azure-mixedreality-remoterendering/mypy.ini new file mode 100644 index 000000000000..491c5b42e3f7 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/mypy.ini @@ -0,0 +1,12 @@ +[mypy] +python_version = 3.6 +warn_unused_configs = True +ignore_missing_imports = True + +# Per-module options: + +[mypy-azure.mixedreality.remoterendering._generated.*] +ignore_errors = True + +[mypy-azure.core.*] +ignore_errors = True \ No newline at end of file diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample.py b/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample.py new file mode 100644 index 000000000000..f17be5426a15 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample.py @@ -0,0 +1,207 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: remote_rendering_client_sample.py +DESCRIPTION: + These samples demonstrate creating a remote rendering client, converting an asset into the format used in rendering + sessions, listing created asset conversions, starting a rendering session, extending the lifetime of a rendering + session, stopping a rendering session and listing rendering sessions. + +USAGE: + python remote_rendering_client_sample.py + Set the environment variables with your own values before running the sample: + ARR_SERVICE_ENDPOINT - the endpoint of the Azure Remote Rendering service in the desired region. + e.g. "https://remoterendering.eastus.mixedreality.azure.com" for the East US region + Supported regions can be found at https://docs.microsoft.com/en-us/azure/remote-rendering/reference/regions + ARR_ACCOUNT_DOMAIN - the Remote Rendering account domain. e.g. "eastus.mixedreality.azure.com" + ARR_ACCOUNT_ID - the Remote Rendering account identifier. + ARR_ACCOUNT_KEY - the Remote Rendering account primary or secondary key. +""" + +import logging +import os +import sys +import time +import uuid + +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline.policies import NetworkTraceLoggingPolicy +from azure.mixedreality.authentication import MixedRealityStsClient +from azure.mixedreality.remoterendering import (AssetConversion, + AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionStatus, + RemoteRenderingClient, + RenderingSessionSize, + RenderingSessionStatus) + +# Create a logger for the 'azure' SDK +logger = logging.getLogger("azure") +logger.setLevel(logging.DEBUG) + +# Configure a console output +handler = logging.StreamHandler(stream=sys.stdout) +logger.addHandler(handler) + +# Enable network trace logging. This will be logged at DEBUG level. +# By default, logging is disabled. +logging_policy_enabled = os.environ.get("ARR_LOGGING_ENABLED", None) + +logging_policy = None +if logging_policy_enabled: + logging_policy = NetworkTraceLoggingPolicy() + logging_policy.enable_http_logger = True + +arr_endpoint = os.environ.get("ARR_SERVICE_ENDPOINT", None) +if not arr_endpoint: + raise ValueError("Set ARR_SERVICE_ENDPOINT env before run this sample.") + +account_id = os.environ.get("ARR_ACCOUNT_ID", None) +if not account_id: + raise ValueError("Set ARR_ACCOUNT_ID env before run this sample.") + +account_domain = os.environ.get("ARR_ACCOUNT_DOMAIN", None) +if not account_domain: + raise ValueError("Set ARR_ACCOUNT_DOMAIN env before run this sample.") + +account_key = os.environ.get("ARR_ACCOUNT_KEY", None) +if not account_key: + raise ValueError("Set ARR_ACCOUNT_KEY env before run this sample.") + +storage_container_uri = os.environ.get("ARR_STORAGE_CONTAINER_URI", None) +if not storage_container_uri: + raise ValueError("Set ARR_STORAGE_CONTAINER_URI env before run this sample.") + +input_blob_prefix = os.environ.get("ARR_STORAGE_INPUT_BLOB_PREFIX", None) +# if no input_blob_prefix is specified the whole content of the storage container will be retrieved for conversions +# this is not recommended since copying lots of unneeded files will slow down conversions + +relative_input_asset_path = os.environ.get("ARR_STORAGE_INPUT_ASSET_PATH", None) +if not relative_input_asset_path: + raise ValueError("Set ARR_STORAGE_INPUT_ASSET_PATH env before run this sample.") + +# use AzureKeyCredentials to authenticate to the service - other auth options include AAD and getting +# STS token using the mixed reality STS client +key_credential = AzureKeyCredential(account_key) + +client = RemoteRenderingClient( + endpoint=arr_endpoint, + account_id=account_id, + account_domain=account_domain, + credential=key_credential, + logging_policy=logging_policy +) + + +def perform_asset_conversion(): + try: + # a UUID is a good conversion ID - guaranteed to be unique on an account + conversion_id = str(uuid.uuid4()) + + # In order to convert a model the input model needs to be retrieved from blob storage and the result of the + # conversion process will be written back to blob storage + # The subset of files which will be retrieved from the given input storage container is controlled by the + # input_settings blob_prefix more details at: + # https://docs.microsoft.com/en-us/azure/remote-rendering/resources/troubleshoot#conversion-file-download-errors + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=input_blob_prefix, # if not specified all files from the input container will be retrieved + relative_input_asset_path=relative_input_asset_path, + # container_read_list_sas #if storage is not linked with the ARR account provide a SAS here to grant access. + ) + + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, # Note: different input/output containers can be specified + blob_prefix="output/"+conversion_id, + # output_asset_filename= convertedAsset.arrAsset # if not specified the output will be ".arrAsset". + # container_write_sas #if storage is not linked with the ARR account provide a SAS here to grant access. + ) + + conversion_poller = client.begin_asset_conversion(conversion_id=conversion_id, + input_settings=input_settings, + output_settings=output_settings) + + print("conversion with id:", conversion_id, "created. Waiting for completion.") + conversion = conversion_poller.result() + print("conversion with id:", conversion_id, "finished with result:", conversion.status) + print(conversion.output.asset_uri) + + # a poller can also be acquired by id + # id_poller = await client.get_asset_conversion_poller(conversion_id=conversion_id) + # conversion = await id_poller.result() + + # we can also get the status of an individual asset conversion like this: + conversion = client.get_asset_conversion(conversion_id) + print("individual conversion retrieved with id:", conversion.id) + print("\tconversion status:", conversion.status) + + except Exception as e: + print("An error occurred: ", e) + + +def list_all_asset_conversions(): + print("listing conversions for remote rendering account: ", account_id) + print("conversions:") + conversions = client.list_asset_conversions() + for c in conversions: + created_on = c.created_on.strftime("%m/%d/%Y, %H:%M:%S") + print("\t conversion: id:", c.id, "status:", c.status, "created on:", created_on) + if c.status == AssetConversionStatus.SUCCEEDED: + print("\t\tconversion result URI:", c.output.asset_uri) + + +def demonstrate_rendering_session_lifecycle(): + try: + # a UUID is a good session ID - guaranteed to be unique on an account + session_id = str(uuid.uuid4()) + print("starting rendering session with id:", session_id) + session_poller = client.begin_rendering_session( + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=5) + print("rendering session with id:", session_id, "created. Waiting for session to be ready.",) + + session = session_poller.result() + print("session with id:", session.id, "is ready. lease_time_minutes:", session.lease_time_minutes,) + + # a poller can also be acquired by a id if a session already exists + # id_poller = client.get_rendering_session_poller(session_id=session_id) + # session = id_poller.result() + + # one can now connect to the rendering session using the runtime SDK on a Hololens 2 + print(session) + + # we can also get the properties of an individual session by id: + session = client.get_rendering_session(session_id) + print(session) + + # if the session should run longer than initially requested we can extend the lifetime of the session + session = client.get_rendering_session(session_id) + if session.lease_time_minutes - session.elapsed_time_minutes < 2: + session = client.update_rendering_session( + session_id=session_id, lease_time_minutes=session.lease_time_minutes + 10) + print("session with id:", session.id, "updated. New lease time:", session.lease_time_minutes, "minutes",) + + # once we do not need the session anymore we can stop the session + client.stop_rendering_session(session_id) + print("session with id:", session_id, "stopped") + except Exception as e: + print("An error occurred: ", e) + + +def list_all_rendering_sessions(): + print("listing sessions for account:", account_id) + print("sessions:") + rendering_sessions = client.list_rendering_sessions() + for session in rendering_sessions: + created_on = session.created_on.strftime("%m/%d/%Y, %H:%M:%S") + print("\t session: id:", session.id, "status:", session.status, "created on:", created_on,) + + +if __name__ == "__main__": + perform_asset_conversion() + # list_all_asset_conversions() + demonstrate_rendering_session_lifecycle() + list_all_rendering_sessions() diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample_async.py new file mode 100644 index 000000000000..b2974a89a5d3 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/samples/remote_rendering_client_sample_async.py @@ -0,0 +1,212 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: remote_rendering_client_sample_async.py +DESCRIPTION: + These samples demonstrate creating a remote rendering client, converting an asset into the format used in rendering + sessions, listing created asset conversions, starting a rendering session, extending the lifetime of a rendering + session, stopping a rendering session and listing rendering sessions. + +USAGE: + python remote_rendering_client_sample_async.py + Set the environment variables with your own values before running the sample: + ARR_SERVICE_ENDPOINT - the endpoint of the Azure Remote Rendering service in the desired region. + e.g. "https://remoterendering.eastus.mixedreality.azure.com" for the East US region + Supported regions can be found at https://docs.microsoft.com/en-us/azure/remote-rendering/reference/regions + ARR_ACCOUNT_DOMAIN - the Remote Rendering account domain. e.g. "eastus.mixedreality.azure.com" + ARR_ACCOUNT_ID - the Remote Rendering account identifier. + ARR_ACCOUNT_KEY - the Remote Rendering account primary or secondary key. +""" + +import asyncio +import logging +import os +import sys +import time +import uuid + +from azure.core.async_paging import AsyncItemPaged +from azure.core.credentials import AzureKeyCredential +from azure.mixedreality.remoterendering import (AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionStatus, + RenderingSession, + RenderingSessionSize, + RenderingSessionStatus) +from azure.mixedreality.remoterendering.aio import RemoteRenderingClient + +# Create a logger for the 'azure' SDK +logger = logging.getLogger("azure") +logger.setLevel(logging.DEBUG) + +# Configure a console output +handler = logging.StreamHandler(stream=sys.stdout) +logger.addHandler(handler) + +# Enable network trace logging. This will be logged at DEBUG level. +# By default, logging is disabled. +logging_policy_enabled = os.environ.get("ARR_LOGGING_ENABLED", None) + +logging_policy = None +if logging_policy_enabled: + logging_policy = NetworkTraceLoggingPolicy() + logging_policy.enable_http_logger = True + +arr_endpoint = os.environ.get("ARR_SERVICE_ENDPOINT", None) +if not arr_endpoint: + raise ValueError("Set ARR_SERVICE_ENDPOINT env before run this sample.") + +account_id = os.environ.get("ARR_ACCOUNT_ID", None) +if not account_id: + raise ValueError("Set ARR_ACCOUNT_ID env before run this sample.") + +account_domain = os.environ.get("ARR_ACCOUNT_DOMAIN", None) +if not account_domain: + raise ValueError("Set ARR_ACCOUNT_DOMAIN env before run this sample.") + +account_key = os.environ.get("ARR_ACCOUNT_KEY", None) +if not account_key: + raise ValueError("Set ARR_ACCOUNT_KEY env before run this sample.") + +storage_container_uri = os.environ.get("ARR_STORAGE_CONTAINER_URI", None) +if not storage_container_uri: + raise ValueError("Set ARR_STORAGE_CONTAINER_URI env before run this sample.") + +input_blob_prefix = os.environ.get("ARR_STORAGE_INPUT_BLOB_PREFIX", None) +# if no input_blob_prefix is specified the whole content of the storage container will be retrieved for conversions +# this is not recommended since copying lots of unneeded files will slow down conversions + +relative_input_asset_path = os.environ.get("ARR_STORAGE_INPUT_ASSET_PATH", None) +if not relative_input_asset_path: + raise ValueError("Set ARR_STORAGE_INPUT_ASSET_PATH env before run this sample.") + +# use AzureKeyCredentials to authenticate to the service - other auth options include AAD and getting +# STS token using the mixed reality STS client +key_credential = AzureKeyCredential(account_key) + +client = RemoteRenderingClient( + endpoint=arr_endpoint, + account_id=account_id, + account_domain=account_domain, + credential=key_credential, + logging_policy=logging_policy +) + + +async def perform_asset_conversion(): + try: + # a UUID is a good conversion ID - guaranteed to be unique on an account + conversion_id = str(uuid.uuid4()) + + # In order to convert a model the input model needs to be retrieved from blob storage and the result of the + # conversion process will be written back to blob storage + # The subset of files which will be retrieved from the given input storage container is controlled by the + # input_settings blob_prefix more details at: + # https://docs.microsoft.com/en-us/azure/remote-rendering/resources/troubleshoot#conversion-file-download-errors + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=input_blob_prefix, # if not specified all files from the input container will be retrieved + relative_input_asset_path=relative_input_asset_path, + # container_read_list_sas #if storage is not linked with the ARR account provide a SAS here to grant access. + ) + + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, # Note: different input/output containers can be specified + blob_prefix="output/"+conversion_id, + # output_asset_filename= convertedAsset.arrAsset # if not specified the output will be ".arrAsset". + # container_write_sas #if storage is not linked with the ARR account provide a SAS here to grant access. + ) + + conversion_poller = await client.begin_asset_conversion(conversion_id=conversion_id, + input_settings=input_settings, + output_settings=output_settings) + + print("conversion with id:", conversion_id, "created. Waiting for completion.") + conversion = await conversion_poller.result() + print("conversion with id:", conversion_id, "finished with result:", conversion.status) + print(conversion.output.asset_uri) + + # a poller can also be acquired by id + # id_poller = await client.get_asset_conversion_poller(conversion_id=conversion_id) + # conversion = await id_poller.result() + + # we can also get the status of an individual asset conversion like this: + conversion = await client.get_asset_conversion(conversion_id) + print("individual conversion retrieved with id:", conversion.id) + print("\tconversion status:", conversion.status) + + except Exception as e: + print("An error occurred: ", e) + + +async def list_all_asset_conversions(): + print("listing conversions for remote rendering account: ", account_id) + print("conversions:") + conversions = await client.list_asset_conversions() + async for c in conversions: + created_on = c.created_on.strftime("%m/%d/%Y, %H:%M:%S") + print("\t conversion: id:", c.id, "status:", c.status, "created on:", created_on) + if c.status == AssetConversionStatus.SUCCEEDED: + print("\t\tconversion result URI:", c.output.asset_uri) + + +async def demonstrate_rendering_session_lifecycle(): + try: + # a UUID is a good session ID - guaranteed to be unique on an account + session_id = str(uuid.uuid4()) + print("starting rendering session with id:", session_id) + session_poller = await client.begin_rendering_session( + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=5) + print("rendering session with id:", session_id, "created. Waiting for session to be ready.") + + session = await session_poller.result() + print("session with id:", session.id, "is ready. lease_time_minutes:", session.lease_time_minutes) + + # a poller can also be acquired by id + # id_poller = await client.get_rendering_session_poller(session_id=session_id) + # session = await id_poller.result() + + # one can now connect to the rendering session using the runtime SDK on a Hololens 2 + print(session) + + # we can also get the properties of an individual session by id: + session = await client.get_rendering_session(session_id) + print(session) + + # if the session should run longer than initially requested we can extend the lifetime of the session + session = client.get_rendering_session(session_id) + if session.lease_time_minutes - session.elapsed_time_minutes < 2: + session = await client.update_rendering_session( + session_id=session_id, lease_time_minutes=session.lease_time_minutes + 10) + print("session with id:", session.id, "updated. New lease time:", session.lease_time_minutes, "minutes") + + # once we do not need the session anymore we can stop the session + await client.stop_rendering_session(session_id) + print("session with id:", session_id, "stopped") + except Exception as e: + print("An error occurred: ", e) + + +async def list_all_rendering_sessions(): + print("listing sessions for account:", account_id) + print("sessions:") + rendering_sessions = await client.list_rendering_sessions() + async for session in rendering_sessions: + print("\t session: id:", session.id, "status:", session.status, + "created on:", session.created_on.strftime("%m/%d/%Y, %H:%M:%S")) + + +async def main(): + async with client: + await perform_asset_conversion() + await list_all_asset_conversions() + await demonstrate_rendering_session_lifecycle() + await list_all_rendering_sessions() + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/sdk_packaging.toml b/sdk/remoterendering/azure-mixedreality-remoterendering/sdk_packaging.toml new file mode 100644 index 000000000000..773788868685 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/sdk_packaging.toml @@ -0,0 +1,7 @@ +[packaging] +auto_update = false +package_name = "azure-mixedreality-remoterendering" +package_pprint_name = "Azure Remote Rendering" +package_doc_id = "" +is_stable = false +is_arm = false diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/setup.cfg b/sdk/remoterendering/azure-mixedreality-remoterendering/setup.cfg new file mode 100644 index 000000000000..e2170fa288fc --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/setup.cfg @@ -0,0 +1,5 @@ +[bdist_wheel] +universal=1 + +[metadata] +long_description_content_type=text/markdown \ No newline at end of file diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/setup.py b/sdk/remoterendering/azure-mixedreality-remoterendering/setup.py new file mode 100644 index 000000000000..68618a222037 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/setup.py @@ -0,0 +1,80 @@ +from setuptools import setup, find_packages +import os +from io import open +import re + + +# this setup.py is set up in a specific way to keep the azure* and azure-mgmt-* namespaces WORKING all the way +# up from python 2.7. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging + +PACKAGE_NAME = "azure-mixedreality-remoterendering" +PACKAGE_PPRINT_NAME = "Azure Remote Rendering" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + long_description = f.read() + +with open("CHANGELOG.md", encoding="utf-8") as f: + long_description += f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format( + PACKAGE_PPRINT_NAME), + + # ensure that these are updated to reflect the package owners' information + long_description=long_description, + url='https://github.com/Azure/azure-sdk-for-python', + author='Microsoft Corporation', + author_email='azuresdkengsysadmins@microsoft.com', + + license='MIT License', + # ensure that the development status reflects the status of your package + classifiers=[ + "Development Status :: 4 - Beta", + + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', + ], + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mixedreality' + ]), + install_requires=[ + 'azure-core<2.0.0,>=1.6.0', + 'azure-mixedreality-authentication>=1.0.0b1', + 'msrest>=0.5.0' + ], + extras_require={ + ":python_version<'3.0'": ['futures', 'azure-mixedreality-nspkg'], + ":python_version<'3.4'": ['enum34>=1.0.4'], + ":python_version<'3.5'": ["typing"] + }, + project_urls={ + 'Bug Reports': 'https://github.com/Azure/azure-sdk-for-python/issues', + 'Source': 'https://github.com/Azure/azure-sdk-python', + } +) diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/swagger/AUTOREST.md b/sdk/remoterendering/azure-mixedreality-remoterendering/swagger/AUTOREST.md new file mode 100644 index 000000000000..75a096c51a67 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/swagger/AUTOREST.md @@ -0,0 +1,233 @@ +# Azure Remote Rendering Service client library for Python + +## Setup + +```ps +npm install -g autorest +``` + +## Generation + +```ps +cd +autorest AUTOREST.md +``` + +### Code generation settings + +```yaml +title: RemoteRenderingRestClient +input-file: https://raw.githubusercontent.com/rikogeln/azure-rest-api-specs/c90870a194ab90b29760ab06ea7d18c4573a7d93/specification/mixedreality/data-plane/Microsoft.MixedReality/stable/2021-01-01/mr-arr.json +output-folder: ../azure/mixedreality/remoterendering/_generated +namespace: azure.mixedreality.remoterendering._generated +no-namespace-folders: true +license-header: MICROSOFT_MIT_NO_VERSION +enable-xml: false +clear-output-folder: true +vanilla: true +python: true +v3: true +no-async: false +``` + +### Directive renaming conversion "creationTime" property to "createdOn" + +``` yaml +directive: + from: swagger-document + where: '$.definitions.conversion.properties.creationTime' + transform: > + $["x-ms-client-name"] = "createdOn"; +``` + +### Directive renaming conversion to asset_conversion + +``` yaml +directive: + from: swagger-document + where: '$.definitions.conversion' + transform: > + $["x-ms-client-name"] = "asset_conversion"; +``` + +### Directive renaming create_conversion_settings to create_asset_conversion_settings + +``` yaml +directive: + from: swagger-document + where: '$.definitions.create_conversion_settings' + transform: > + $["x-ms-client-name"] = "create_asset_conversion_settings"; +``` + +### Directive renaming conversion output outputAssetUri property to assetUri + +``` yaml +directive: + from: swagger-document + where: '$.definitions.conversion.properties.output.properties.outputAssetUri' + transform: > + $["x-ms-client-name"] = "assetUri"; +``` + +### Directive renaming conversion_input_settings to asset_conversion_input_settings + +``` yaml +directive: + from: swagger-document + where: '$.definitions.conversion_input_settings' + transform: > + $["x-ms-client-name"] = "asset_conversion_input_settings"; +``` + +### Directive renaming conversion_output to asset_conversion_output + +``` yaml +directive: + - from: swagger-document + where: $.definitions + transform: > + $["AssetConversionOutput"] = $.conversion.properties.output; + $.conversion.properties["output"] = {"$ref": "#/definitions/AssetConversionOutput"}; +``` + +### Directive renaming conversion_output_settings to asset_conversion_output_settings + +``` yaml +directive: + from: swagger-document + where: '$.definitions.conversion_output_settings' + transform: > + $["x-ms-client-name"] = "asset_conversion_output_settings"; +``` + +### Directive renaming conversion_settings to asset_conversion_settings + +``` yaml +directive: + from: swagger-document + where: '$.definitions.conversion_settings' + transform: > + $["x-ms-client-name"] = "asset_conversion_settings"; +``` + +### Directive renaming conversion_status to asset_conversion_status + +``` yaml +directive: + from: swagger-document + where: '$.definitions.conversion_status' + transform: > + $["x-ms-enum"].name = "asset_conversion_status"; +``` + +### Directive renaming session creationTime property to createdOn + +``` yaml +directive: + from: swagger-document + where: '$.definitions.session_properties.properties.creationTime' + transform: > + $["x-ms-client-name"] = "createdOn"; +``` + +### Directive renaming session maxLeaseTimeMinutes property to leaseTimeMinutes + +``` yaml +directive: + from: swagger-document + where: '$.definitions.session_properties.properties.maxLeaseTimeMinutes' + transform: > + $["x-ms-client-name"] = "leaseTimeMinutes"; +``` + +### Directive renaming create_session_settings maxLeaseTimeMinutes property to leaseTimeMinutes + +``` yaml +directive: + from: swagger-document + where: '$.definitions.create_session_settings.properties.maxLeaseTimeMinutes' + transform: > + $["x-ms-client-name"] = "leaseTimeMinutes"; +``` + +### Directive renaming update_session_settings maxLeaseTimeMinutes property to leaseTimeMinutes + +``` yaml +directive: + from: swagger-document + where: '$.definitions.update_session_settings.properties.maxLeaseTimeMinutes' + transform: > + $["x-ms-client-name"] = "leaseTimeMinutes"; +``` + + +### Directive renaming conversion settings inputLocation property to inputSettings + +``` yaml +directive: + from: swagger-document + where: '$.definitions.conversion_settings.properties.inputLocation' + transform: > + $["x-ms-client-name"] = "inputSettings"; +``` + +### Directive renaming conversion settings outputLocation property to outputSettings + +``` yaml +directive: + from: swagger-document + where: '$.definitions.conversion_settings.properties.outputLocation' + transform: > + $["x-ms-client-name"] = "outputSettings"; +``` + +### Directive renaming session_properties to rendering_session + +``` yaml +directive: + from: swagger-document + where: '$.definitions.session_properties' + transform: > + $["x-ms-client-name"] = "rendering_session"; +``` + +### Directive renaming create_session_settings to create_rendering_session_settings + +``` yaml +directive: + from: swagger-document + where: '$.definitions.create_session_settings' + transform: > + $["x-ms-client-name"] = "create_rendering_session_settings"; +``` + +### Directive renaming session_status to rendering_session_status + +``` yaml +directive: + from: swagger-document + where: '$.definitions.session_status' + transform: > + $["x-ms-enum"].name = "rendering_session_status"; +``` + +### Directive renaming session_size to rendering_session_size + +``` yaml +directive: + from: swagger-document + where: '$.definitions.session_size' + transform: > + $["x-ms-enum"].name = "rendering_session_size"; +``` + +### Directive renaming error to remote_rendering_error + +``` yaml +directive: + from: swagger-document + where: '$.definitions.error' + transform: > + $["x-ms-client-name"] = "remote_rendering_error"; +``` diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/conftest.py b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/conftest.py new file mode 100644 index 000000000000..9f69fcac8bdc --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/conftest.py @@ -0,0 +1,11 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import sys + +# Ignore collection of async tests for Python 2 +collect_ignore_glob = [] +if sys.version_info < (3, 5): + collect_ignore_glob.append("*_async.py") diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/preparers.py b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/preparers.py new file mode 100644 index 000000000000..ba581eefbe26 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/preparers.py @@ -0,0 +1,60 @@ + +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +import os +import functools +from devtools_testutils import PowerShellPreparer, AzureMgmtPreparer +from azure.core.credentials import AzureKeyCredential + +ENABLE_LOGGER = os.getenv('ENABLE_LOGGER', "False") + +RemoteRenderingPreparer = functools.partial( + PowerShellPreparer, 'remoterendering', + remoterendering_arr_service_endpoint="https://remoterendering.eastus.mixedreality.azure.com", + remoterendering_arr_account_domain="eastus.mixedreality.azure.com", + remoterendering_arr_account_id="70a8e4d2-816a-4d03-a800-aeb20126ae51", + remoterendering_arr_account_key="fakeZmFrZV9hY29jdW50X2tleQ==", + remoterendering_arr_storage_account_name="arrstorageaccount", + remoterendering_arr_blob_container_name="test", + remoterendering_storage_endpoint_suffix="core.windows.net", + remoterendering_arr_sas_token="sv=2015-04-05&sr=c&se=2122-03-10T16%3A13%3A40.0000000Z&sp=rwl&sig=fakeSig" +) + + +class RemoteRendererClientPreparer(AzureMgmtPreparer): + def __init__(self, client_cls, client_kwargs={}, **kwargs): + super(RemoteRendererClientPreparer, self).__init__( + name_prefix='', + random_name_length=42, + ) + self.client_kwargs = client_kwargs + self.client_cls = client_cls + + def create_resource(self, name, **kwargs): + polling_interval = 5 + if self.is_live: + remoterendering_arr_service_endpoint = os.environ["REMOTERENDERING_ARR_SERVICE_ENDPOINT"] + remoterendering_arr_account_id = os.environ["REMOTERENDERING_ARR_ACCOUNT_ID"] + remoterendering_arr_account_domain = os.environ["REMOTERENDERING_ARR_ACCOUNT_DOMAIN"] + remoterendering_arr_account_key = os.environ["REMOTERENDERING_ARR_ACCOUNT_KEY"] + else: + remoterendering_arr_service_endpoint = "https://remoterendering.eastus.mixedreality.azure.com" + remoterendering_arr_account_id = "70a8e4d2-816a-4d03-a800-aeb20126ae51" + remoterendering_arr_account_domain = "eastus.mixedreality.azure.com" + remoterendering_arr_account_key = "ZmFrZV9hY2NvdW50X2tleQ==" # this is a fake key BASE64 fake_account_key + polling_interval = 0 + + key_credential = AzureKeyCredential(remoterendering_arr_account_key) + client = self.client_cls( + endpoint=remoterendering_arr_service_endpoint, + account_id=remoterendering_arr_account_id, + account_domain=remoterendering_arr_account_domain, + credential=key_credential, polling_interval=polling_interval) + + kwargs.update({"client": client}) + return kwargs diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_missing_asset.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_missing_asset.yaml new file mode 100644 index 000000000000..ec782aabdb93 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_missing_asset.yaml @@ -0,0 +1,512 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - XsqieKTr3SHySlZa8PGeBe + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: + - no-store,no-cache + content-length: + - '1240' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:58:49 GMT + ms-cv: + - umVwuX/QV0mIDrSi/WHG+w.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"settings": {"inputLocation": {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "storageContainerReadListSas": "?sv=2015-04-05&sr=c&se=2122-03-10T16%3A13%3A40.0000000Z&sp=rwl&sig=fakeSig", + "blobPrefix": "Input", "relativeInputAssetPath": "testBoxWhichDoesNotExist.fbx"}, + "outputLocation": {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "storageContainerWriteSas": "?sv=2015-04-05&sr=c&se=2122-03-10T16%3A13%3A40.0000000Z&sp=rwl&sig=fakeSig", + "blobPrefix": "5147aa0f-485a-429f-8d04-bd0b2458cf79"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '683' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + content-length: + - '515' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:58:50 GMT + ms-cv: + - eEk8JQV3oky8ArgYfCuFIA.0 + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '515' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:58:50 GMT + ms-cv: + - dc0/HpCg802KCguWLOjEaA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:58:55 GMT + ms-cv: + - Wh0+eot9iECiDi26Y6fjqA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:00 GMT + ms-cv: + - Elybhx8iwEq6vzRJZFr+JA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:06 GMT + ms-cv: + - zsA2mqTO10GSPgVYAIOTaw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:11 GMT + ms-cv: + - xS8wtAsA4UqRI524vtHokw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:16 GMT + ms-cv: + - J3bco+u+LkmL6JTEuwyDkw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:21 GMT + ms-cv: + - L0s/Mx8i9kC6W+8PsR8rdg.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:27 GMT + ms-cv: + - 9ptNhLUlmUCkwk6cRAH0LA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:32 GMT + ms-cv: + - MdegPwE5yEaF5UVe9d4Abw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:37 GMT + ms-cv: + - 8FBcq23i/U+lJCK5ZUiaOA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '512' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:42 GMT + ms-cv: + - /qx3Si/MYU2w6haNWZKZBg.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/5147aa0f-485a-429f-8d04-bd0b2458cf79?api-version=2021-01-01 + response: + body: + string: '{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '621' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:59:48 GMT + ms-cv: + - KnI6kSQ1L0qzAQoLtJXD5w.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_no_access.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_no_access.yaml new file mode 100644 index 000000000000..9653033271c3 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_no_access.yaml @@ -0,0 +1,80 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - H9NLFwo+RveSJaH/6wrvL9 + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: + - no-store,no-cache + content-length: + - '1240' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:54:26 GMT + ms-cv: + - H4xguOAWTEOTfQnT7MJHhw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"settings": {"inputLocation": {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "blobPrefix": "Input", "relativeInputAssetPath": "testBox.fbx"}, "outputLocation": + {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "blobPrefix": "b3bea9f9-db26-45af-a4a1-dc007c1c2ce9"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '325' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/b3bea9f9-db26-45af-a4a1-dc007c1c2ce9?api-version=2021-01-01 + response: + body: + string: '{"error":{"code":"DelegatedResourceAccessError","message":"Error accessing + connected storage account due to insufficient permissions. Check if the Mixed + Reality resource has correct permissions assigned. Documentation on how to + link Remote Rendering Accounts to storage can be found here: https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts."}}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + content-length: + - '390' + content-type: + - application/json; charset=utf-8 + date: + - Tue, 23 Mar 2021 11:54:27 GMT + ms-cv: + - cq5BbyP2UEO1b/xLwwujUg.0 + x-content-type-options: + - nosniff + status: + code: 403 + message: Forbidden +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_unauthorized.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_unauthorized.yaml new file mode 100644 index 000000000000..9f5f8336ce3c --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_conversion_unauthorized.yaml @@ -0,0 +1,32 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - L2BEJKiUe4aEOg7wMOouqb + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Mon, 22 Mar 2021 17:10:14 GMT + ms-cv: + - Qb5vWRMyn0KjE1Axx0LwQQ.0 + x-content-type-options: + - nosniff + status: + code: 401 + message: Unauthorized +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_session_request.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_session_request.yaml new file mode 100644 index 000000000000..227c219b391f --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_failed_session_request.yaml @@ -0,0 +1,75 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - R+KpW1V4BfPqmpqO3QOUbL + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: + - no-store,no-cache + content-length: + - '1240' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:38:14 GMT + ms-cv: + - Kpu9NSuv/E2mJllG1lCWNQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"maxLeaseTimeMinutes": -4, "size": "Standard"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '47' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/8240a701-54f5-4094-9bd4-652e714cb1ad?api-version=2021-01-01 + response: + body: + string: '{"error":{"code":"BadRequest","message":"The maxLeaseTimeMinutes value + cannot be negative."}}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + content-length: + - '93' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:38:14 GMT + ms-cv: + - c2laxdukq0yFdLHN4e4epw.0 + x-content-type-options: + - nosniff + status: + code: 400 + message: Bad Request +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_simple_conversion.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_simple_conversion.yaml new file mode 100644 index 000000000000..9a2b30a9b370 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_simple_conversion.yaml @@ -0,0 +1,528 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - QVohNO99RsWAyPLds7urai + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: + - no-store,no-cache + content-length: + - '1240' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:46:48 GMT + ms-cv: + - APiTG5FFkUqfi57uMy4NuA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"settings": {"inputLocation": {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "storageContainerReadListSas": "?sv=2015-04-05&sr=c&se=2122-03-10T16%3A13%3A40.0000000Z&sp=rwl&sig=fakeSig", + "blobPrefix": "Input", "relativeInputAssetPath": "testBox.fbx"}, "outputLocation": + {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "storageContainerWriteSas": "?sv=2015-04-05&sr=c&se=2122-03-10T16%3A13%3A40.0000000Z&sp=rwl&sig=fakeSig", + "blobPrefix": "11b5d55d-b228-4291-8883-df3865a32088"}}}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '666' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + content-length: + - '481' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:46:49 GMT + ms-cv: + - BHVJIEpw4EOMZqBenXS9EQ.0 + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '481' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:46:49 GMT + ms-cv: + - Mm7VZyz0CEm6yb+iqgg6Gw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:46:55 GMT + ms-cv: + - +dGBa/YIPkOlhYNYDPYoOw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:01 GMT + ms-cv: + - dg1O28ul8UKXfI21Ir7RgQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:06 GMT + ms-cv: + - PEVTFCBNNU+N+VoWhVJbQA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:11 GMT + ms-cv: + - Kov3lladX0SHqQtnSjnUPA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:17 GMT + ms-cv: + - LHsM8UTEXUK+e8heMKD+ZA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:22 GMT + ms-cv: + - dlZrPGtnEkKgOWhIPbs9Zw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:27 GMT + ms-cv: + - ybBh1saZcUifBxxRjHnntA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:33 GMT + ms-cv: + - +FK16Rs08kmCTt7IYSzjyQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '478' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:38 GMT + ms-cv: + - EGAmXkbgNUyaV072kCcwvQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/11b5d55d-b228-4291-8883-df3865a32088?api-version=2021-01-01 + response: + body: + string: '{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/11b5d55d-b228-4291-8883-df3865a32088/testBox.arrAsset"},"error":null,"status":"Succeeded"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '615' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:45 GMT + ms-cv: + - 1SGpcqRTHUqxmSbnjZBo0Q.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions?api-version=2021-01-01 + response: + body: + string: '{"conversions":[{"id":"9b0f30a1-f43f-492c-893d-6b3c05464bf4","creationTime":"2021-03-09T18:18:03.1675785Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"9b0f30a1-f43f-492c-893d-6b3c05464bf4/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"f19299d2-eef7-4d82-84b0-047defcf236e","creationTime":"2021-03-09T18:18:30.881044Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"f19299d2-eef7-4d82-84b0-047defcf236e/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"6f494a77-3e94-45ca-ace8-d90335637122","creationTime":"2021-03-09T18:19:24.0118432Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"6f494a77-3e94-45ca-ace8-d90335637122/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"5277192c-0bf7-4c61-bda5-e44153a6d2a2","creationTime":"2021-03-09T18:30:42.2644192Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"5277192c-0bf7-4c61-bda5-e44153a6d2a2/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"6abcdd46-5b8c-4d31-bbac-122bdbdf4c3f","creationTime":"2021-03-09T18:34:54.4977297Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"6abcdd46-5b8c-4d31-bbac-122bdbdf4c3f/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"2e6ddbf4-2170-4171-a72b-56c3be518c3a","creationTime":"2021-03-09T18:35:44.2592196Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"2e6ddbf4-2170-4171-a72b-56c3be518c3a/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"ae975581-34ba-4a7b-8444-f978215e66b6","creationTime":"2021-03-09T18:37:24.4419477Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"ae975581-34ba-4a7b-8444-f978215e66b6/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/ae975581-34ba-4a7b-8444-f978215e66b6/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"9bce520b-c6da-4f0f-a825-e8950b46e2ab","creationTime":"2021-03-10T16:31:25.1246608Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"9bce520b-c6da-4f0f-a825-e8950b46e2ab/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InputContainerAccessDenied","message":"Access + to the input blob container was denied. Invalid access rights or invalid shared + access signature."},"status":"Failed"},{"id":"a5cc69da-9cb3-4511-9812-b0456f96d422","creationTime":"2021-03-10T16:35:19.7770288Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"a5cc69da-9cb3-4511-9812-b0456f96d422/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InputContainerAccessDenied","message":"Access + to the input blob container was denied. Invalid access rights or invalid shared + access signature."},"status":"Failed"},{"id":"80039b19-c1a9-48c4-9d3c-05bbc3f2c0a8","creationTime":"2021-03-10T16:43:16.7373357Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"80039b19-c1a9-48c4-9d3c-05bbc3f2c0a8/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/80039b19-c1a9-48c4-9d3c-05bbc3f2c0a8/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"042dbe77-cd35-4fb7-a522-8b9096592acc","creationTime":"2021-03-10T19:28:42.8057122Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"042dbe77-cd35-4fb7-a522-8b9096592acc/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/042dbe77-cd35-4fb7-a522-8b9096592acc/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"10e5a4a2-312c-4bbe-93db-976438a4635d","creationTime":"2021-03-11T18:07:50.2393836Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"10e5a4a2-312c-4bbe-93db-976438a4635d/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/10e5a4a2-312c-4bbe-93db-976438a4635d/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"d141d3ec-8f25-4417-9a48-a143daa7f2d0","creationTime":"2021-03-11T19:05:54.277069Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"d141d3ec-8f25-4417-9a48-a143daa7f2d0/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/d141d3ec-8f25-4417-9a48-a143daa7f2d0/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"391b3052-0a7b-4831-b772-124719c7bb04","creationTime":"2021-03-11T19:15:27.484726Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"391b3052-0a7b-4831-b772-124719c7bb04/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/391b3052-0a7b-4831-b772-124719c7bb04/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"c8f38fa8-099c-48fc-bf5c-0a6e72baacc7","creationTime":"2021-03-12T17:38:44.7556604Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"c8f38fa8-099c-48fc-bf5c-0a6e72baacc7/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/c8f38fa8-099c-48fc-bf5c-0a6e72baacc7/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"c2ea2df4-7b1b-4ee2-97b5-226c52e5f5e5","creationTime":"2021-03-12T17:55:55.4377703Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"c2ea2df4-7b1b-4ee2-97b5-226c52e5f5e5/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/c2ea2df4-7b1b-4ee2-97b5-226c52e5f5e5/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"e1bbad8b-29bf-4dfd-983d-e6ba8c6003d3","creationTime":"2021-03-15T17:54:15.7509006Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"e1bbad8b-29bf-4dfd-983d-e6ba8c6003d3/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/e1bbad8b-29bf-4dfd-983d-e6ba8c6003d3/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"d87d2d17-225c-4f60-8d8a-51dadc36e3e2","creationTime":"2021-03-15T17:55:32.0413519Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"d87d2d17-225c-4f60-8d8a-51dadc36e3e2/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/d87d2d17-225c-4f60-8d8a-51dadc36e3e2/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"cb6b9ce3-3b83-4ca2-acb5-1d3acab0b191","creationTime":"2021-03-15T17:56:57.9605113Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"cb6b9ce3-3b83-4ca2-acb5-1d3acab0b191/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/cb6b9ce3-3b83-4ca2-acb5-1d3acab0b191/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"6970613e-bed3-4e84-a32e-8515db024599","creationTime":"2021-03-15T18:09:23.7342303Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"6970613e-bed3-4e84-a32e-8515db024599/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/6970613e-bed3-4e84-a32e-8515db024599/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"a67d29e5-61d1-4c3d-ad9c-552837a7dd61","creationTime":"2021-03-16T11:11:25.6714785Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"a67d29e5-61d1-4c3d-ad9c-552837a7dd61/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/a67d29e5-61d1-4c3d-ad9c-552837a7dd61/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"77fb083c-e55b-4d2b-941e-06649ac0f7f7","creationTime":"2021-03-16T11:12:09.0107221Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"77fb083c-e55b-4d2b-941e-06649ac0f7f7/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/77fb083c-e55b-4d2b-941e-06649ac0f7f7/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"53d31310-15de-4cac-bbff-bf30658e2e86","creationTime":"2021-03-19T17:00:00.1763042Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"53d31310-15de-4cac-bbff-bf30658e2e86/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"9c98f810-681e-466d-894b-171e311008ad","creationTime":"2021-03-19T17:04:03.5760141Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"9c98f810-681e-466d-894b-171e311008ad/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"79a37901-c798-4112-8bf4-be8038e3fbce","creationTime":"2021-03-19T17:10:49.0512631Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"79a37901-c798-4112-8bf4-be8038e3fbce/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"df0bf778-e005-4162-be4a-56d9d8e9a83c","creationTime":"2021-03-19T17:12:15.8909541Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"df0bf778-e005-4162-be4a-56d9d8e9a83c/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/df0bf778-e005-4162-be4a-56d9d8e9a83c/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"029783c8-179e-4455-b606-252b044c4f0b","creationTime":"2021-03-19T17:22:39.4520987Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"029783c8-179e-4455-b606-252b044c4f0b/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"e4963baf-4d21-4029-951c-225188ebe339","creationTime":"2021-03-19T17:23:45.9155238Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"e4963baf-4d21-4029-951c-225188ebe339/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/e4963baf-4d21-4029-951c-225188ebe339/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"fcf1d2a7-1d0e-4e16-a4b6-6af1a046dce2","creationTime":"2021-03-19T17:37:07.6491193Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"fcf1d2a7-1d0e-4e16-a4b6-6af1a046dce2/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"f628ef31-aab0-4b53-af70-bea568cae3bb","creationTime":"2021-03-19T17:38:08.9989001Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"f628ef31-aab0-4b53-af70-bea568cae3bb/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/f628ef31-aab0-4b53-af70-bea568cae3bb/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"1b976dcd-816a-43b0-93c6-3c7ee6749cc3","creationTime":"2021-03-19T17:39:59.6177173Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1b976dcd-816a-43b0-93c6-3c7ee6749cc3/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"cf598ca1-4924-4120-b02b-4e237889f392","creationTime":"2021-03-19T17:41:01.4026308Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"cf598ca1-4924-4120-b02b-4e237889f392/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/cf598ca1-4924-4120-b02b-4e237889f392/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"8bfef2cf-36eb-45f8-8d10-97fb307e4a7c","creationTime":"2021-03-19T17:48:01.2574813Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"8bfef2cf-36eb-45f8-8d10-97fb307e4a7c/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"5c14703a-917d-4020-b6d9-37a0c2431529","creationTime":"2021-03-19T17:49:06.4439118Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5c14703a-917d-4020-b6d9-37a0c2431529/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/5c14703a-917d-4020-b6d9-37a0c2431529/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"1f54c360-9fea-48a4-a950-1a46ab3adc3d","creationTime":"2021-03-19T18:05:09.8734976Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1f54c360-9fea-48a4-a950-1a46ab3adc3d/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"babdf5d4-5e7d-47f2-b384-822a04551348","creationTime":"2021-03-19T18:06:17.8273073Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"babdf5d4-5e7d-47f2-b384-822a04551348/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/babdf5d4-5e7d-47f2-b384-822a04551348/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"ded52e40-8643-41d2-8571-c30dcf1df2ec","creationTime":"2021-03-19T18:17:11.8584239Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"ded52e40-8643-41d2-8571-c30dcf1df2ec/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"f8a14b8e-d5cf-4860-9c3f-070fb016b326","creationTime":"2021-03-22T17:07:12.8212152Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"f8a14b8e-d5cf-4860-9c3f-070fb016b326/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"0632c21e-5782-49b5-ba6e-a21352b9b2ac","creationTime":"2021-03-22T17:10:16.8367277Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"0632c21e-5782-49b5-ba6e-a21352b9b2ac/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/0632c21e-5782-49b5-ba6e-a21352b9b2ac/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"bf3b7e9f-39d1-4a98-8a19-65596209d440","creationTime":"2021-03-22T17:14:27.7063026Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"bf3b7e9f-39d1-4a98-8a19-65596209d440/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"cfc534b3-3d46-4185-a080-98afc6097dba","creationTime":"2021-03-22T17:15:30.0686997Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"cfc534b3-3d46-4185-a080-98afc6097dba/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/cfc534b3-3d46-4185-a080-98afc6097dba/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"c228b814-e29a-4389-be1c-96e7c0ea668d","creationTime":"2021-03-22T18:46:15.4801039Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"c228b814-e29a-4389-be1c-96e7c0ea668d/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/c228b814-e29a-4389-be1c-96e7c0ea668d/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"9872dd7b-6d11-408a-bbf9-cfe3abaf58a7","creationTime":"2021-03-22T19:24:27.492717Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"9872dd7b-6d11-408a-bbf9-cfe3abaf58a7/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/9872dd7b-6d11-408a-bbf9-cfe3abaf58a7/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"cddfc170-ec9a-428a-a9d7-2cd069387b30","creationTime":"2021-03-22T19:31:14.5486469Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"cddfc170-ec9a-428a-a9d7-2cd069387b30/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/cddfc170-ec9a-428a-a9d7-2cd069387b30/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"e8f23a70-3146-4119-a9d0-9ed813e6c6f1","creationTime":"2021-03-22T19:40:31.3253184Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"e8f23a70-3146-4119-a9d0-9ed813e6c6f1/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/e8f23a70-3146-4119-a9d0-9ed813e6c6f1/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"023f5b84-f142-4d5f-bf86-cc3a68fdde6f","creationTime":"2021-03-22T19:40:51.3227567Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"023f5b84-f142-4d5f-bf86-cc3a68fdde6f/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/023f5b84-f142-4d5f-bf86-cc3a68fdde6f/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"1eabd0a4-eb68-42e0-8678-9d73d555ee28","creationTime":"2021-03-22T19:41:11.156701Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1eabd0a4-eb68-42e0-8678-9d73d555ee28/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/1eabd0a4-eb68-42e0-8678-9d73d555ee28/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/11b5d55d-b228-4291-8883-df3865a32088/testBox.arrAsset"},"error":null,"status":"Succeeded"}],"@nextLink":null}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + content-length: + - '29423' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 19:47:45 GMT + ms-cv: + - Zy8uzLuR60y3N8LP6q5I3w.0 + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_simple_session.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_simple_session.yaml new file mode 100644 index 000000000000..28a72a170877 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client.test_simple_session.yaml @@ -0,0 +1,1508 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - rYMXram6J3KCsUkTE9Jqwq + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: + - no-store,no-cache + content-length: + - '1240' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:21 GMT + ms-cv: + - sdL/SnyhrUerGJbRGpvIlA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"maxLeaseTimeMinutes": 15, "size": "Standard"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '46' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:22 GMT + ms-cv: + - XaDMIRtuPEGUl+PaYUhojQ.0 + x-content-type-options: + - nosniff + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:22 GMT + ms-cv: + - 6rA2yUZGc0Wt6gdkLCcJeg.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:27 GMT + ms-cv: + - hYCfiSEpFEOGDPquZQS7Ag.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:33 GMT + ms-cv: + - jXtqA+G2FEmcvHaagrcf8w.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:38 GMT + ms-cv: + - oy/awXw5h0GxjGoGKAzCew.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:43 GMT + ms-cv: + - MdW3h6c5LUWFcGrAhO8WRg.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:48 GMT + ms-cv: + - P9mVcOIetEOH6ea/6+v0NA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:53 GMT + ms-cv: + - 1xAfzxAZeUGmL90JB6tipw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:11:58 GMT + ms-cv: + - vR3b+6ZW0Ui1oXw6qbVc2Q.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:04 GMT + ms-cv: + - xJnp2g2+gE6J+cTdhdSzLQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:09 GMT + ms-cv: + - jDJrVrkO3UO014KPMow+wA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:14 GMT + ms-cv: + - pfRi3xotkki5myS5i6CJdw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:19 GMT + ms-cv: + - Y2bw9IdqekW5NqbwOS68zw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:24 GMT + ms-cv: + - 8tTOktDqpkezySiKtfmwvw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:29 GMT + ms-cv: + - L5VAX+kn+UO7onv0YAvL+Q.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:34 GMT + ms-cv: + - EErF4IkwJkS5D2z/wxv2KQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:40 GMT + ms-cv: + - 2s1HFektW0OPUxDZaaOCvg.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:45 GMT + ms-cv: + - jlqUE0bmt0ekvRwU75q1hg.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:50 GMT + ms-cv: + - vj+LHXUv1kqas+i2TWFHpg.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:12:56 GMT + ms-cv: + - 1LkjbjPRVEy4DZQwDKFjCw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:01 GMT + ms-cv: + - IN8vNZRiBU+FTu/xmSodsQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:06 GMT + ms-cv: + - DcnDwwvF7UKi3t5GSHIxDQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:11 GMT + ms-cv: + - kqN7S7o0V0aHCOPR4Zps8g.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:18 GMT + ms-cv: + - WjZMHssqZkOBH/tqOzueDQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:22 GMT + ms-cv: + - htOb8fUMaEadf1DSwTGsEA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:27 GMT + ms-cv: + - gd3P1foUMEG0b53mnN9TPg.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:32 GMT + ms-cv: + - WbT6c2xm30+m9jOVFX8LMA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:37 GMT + ms-cv: + - yIewXEoDvkWTwv2iphP+Kw.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:43 GMT + ms-cv: + - McvDK98iGEm5Oam+9+ahfQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:48 GMT + ms-cv: + - woDtfdTeG0SFXmSa594Lag.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:53 GMT + ms-cv: + - 8ut/MA5wYEWnxO5VPoV10Q.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:13:58 GMT + ms-cv: + - 0+m03B7XUkayRr9gMHlRhA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:14:03 GMT + ms-cv: + - E39W3jgjtU6lP1C5p6Gw9Q.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:14:08 GMT + ms-cv: + - rOwfOJ4FJEuyeDbJ60jcQA.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:14:13 GMT + ms-cv: + - JiSVlhdZTUWlBotxtvaQNQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '180' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:14:19 GMT + ms-cv: + - Ud+PWOAWFEOEmpt/qPPivQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","arrInspectorPort":55792,"handshakePort":49636,"elapsedTimeMinutes":0,"hostname":"823736284-319ed84f-dfbd-4ec6-8ada-643fccd8f978.remoterendering.vm.eastus.mixedreality.azure.com","maxLeaseTimeMinutes":15,"size":"Standard","status":"Ready","teraflops":8.1}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:14:24 GMT + ms-cv: + - JNZjoXI0m0iduNGVVThKbQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: '{"maxLeaseTimeMinutes": 20}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '26' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PATCH + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","arrInspectorPort":55792,"handshakePort":49636,"elapsedTimeMinutes":0,"hostname":"823736284-319ed84f-dfbd-4ec6-8ada-643fccd8f978.remoterendering.vm.eastus.mixedreality.azure.com","maxLeaseTimeMinutes":20,"size":"Standard","status":"Ready","teraflops":8.1}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + content-length: + - '350' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:14:24 GMT + ms-cv: + - i06fX0wkd0SiZbLvHeBBLQ.0 + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions?api-version=2021-01-01 + response: + body: + string: '{"sessions":[{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","arrInspectorPort":55792,"handshakePort":49636,"elapsedTimeMinutes":0,"hostname":"823736284-319ed84f-dfbd-4ec6-8ada-643fccd8f978.remoterendering.vm.eastus.mixedreality.azure.com","maxLeaseTimeMinutes":5,"size":"Standard","status":"Ready","teraflops":8.1}]}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '365' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:14:24 GMT + ms-cv: + - EsKdWWItd0iuct1Y33gKig.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0/:stop?api-version=2021-01-01 + response: + body: + string: '' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + date: + - Mon, 22 Mar 2021 17:14:25 GMT + ms-cv: + - ngfRPC5tY02LR3n1poW01w.0 + x-content-type-options: + - nosniff + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dcb143c5-31c7-4eba-9a9d-d878444de6e0?api-version=2021-01-01 + response: + body: + string: '{"id":"dcb143c5-31c7-4eba-9a9d-d878444de6e0","creationTime":"2021-03-22T17:11:23.214787+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":20,"size":"Standard","status":"Stopped","teraflops":8.1}' + headers: + api-supported-versions: + - 2021-01-01-preview, 2021-01-01 + cache-control: + - no-store,no-cache + content-length: + - '195' + content-type: + - application/json; charset=utf-8 + date: + - Mon, 22 Mar 2021 17:14:25 GMT + ms-cv: + - usjjKbLKAkKQyUu6dNkkAQ.0 + pragma: + - no-cache + x-content-type-options: + - nosniff + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_missing_asset.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_missing_asset.yaml new file mode 100644 index 000000000000..7010e177d2a3 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_missing_asset.yaml @@ -0,0 +1,661 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - 2tFESDFSj4mrvUcoDWFYkN + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: no-store,no-cache + content-length: '1240' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:20:51 GMT + ms-cv: z3O9/VwOKU6pT6jzSQi7WA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://sts.eastus2.mixedreality.azure.com/Accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/token?api-version=2019-02-28-preview +- request: + body: '{"settings": {"inputLocation": {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "storageContainerReadListSas": "?sv=2015-04-05&sr=c&se=2122-03-10T16%3A13%3A40.0000000Z&sp=rwl&sig=fakeSig", + "blobPrefix": "Input", "relativeInputAssetPath": "testBoxWhichDoesNotExist.fbx"}, + "outputLocation": {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "storageContainerWriteSas": "?sv=2015-04-05&sr=c&se=2122-03-10T16%3A13%3A40.0000000Z&sp=rwl&sig=fakeSig", + "blobPrefix": "3ff6ab5c-600a-4892-bae9-348f215b1fa4"}}}' + headers: + Accept: + - application/json + Content-Length: + - '683' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:20:51 GMT + ms-cv: wpY9ErA9tEqdYSRG3dlKrg.0 + x-content-type-options: nosniff + status: + code: 201 + message: Created + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:20:52 GMT + ms-cv: vlUdCqqs3UuveV3aU7Ac9Q.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:20:57 GMT + ms-cv: KQYNakkYxkiJTYiQ0zRXuQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:02 GMT + ms-cv: vLt3FNUcyUuJVDGdqYwZ1w.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:07 GMT + ms-cv: sFz65G5t3E2G27YEzhkH8Q.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:13 GMT + ms-cv: gCxVNWQvqUO7cskGAJdRSw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:18 GMT + ms-cv: ZeUryxCwb0Kfe1N0dGPtRw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:23 GMT + ms-cv: 1IrECs4W4k245AyPxSkEFg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:28 GMT + ms-cv: aN44kLKQWE6plGhxoaholw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:34 GMT + ms-cv: /50DQovyuk25s3RLFHRAHw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:39 GMT + ms-cv: cEupRnRgQEa7+JWKX1Ld9g.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:44 GMT + ms-cv: BeW2BFXngECAn3HOm4rO/A.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '515' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:49 GMT + ms-cv: mpvTxLdRZ0CML6eqQVNXVw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:21:54 GMT + ms-cv: Hp/HiWRC9UyJQRAPnHIcgA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:00 GMT + ms-cv: VjHAmAtfF0C0Uz3VCnMCYg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:05 GMT + ms-cv: y9hdJP2S3kyQS5SuykHW7g.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:10 GMT + ms-cv: hEGfGFKz1Eq4NmJdnX+YEQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:15 GMT + ms-cv: og6uia6u0U6qizc4qeRSUg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:21 GMT + ms-cv: cyuWO5WE7UarCnHzyshHsw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:26 GMT + ms-cv: CCTtStSdaEibf0TJwD5SPQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:31 GMT + ms-cv: IhwkX04fBEawJRY0q+nIzA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:36 GMT + ms-cv: QrP2hxFhEEym1hxxDNTCrw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:41 GMT + ms-cv: TsPtBE1zgkqX9dXXsKStHw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '512' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:47 GMT + ms-cv: EbgTEe0d6ESoZpJKrVNKWw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 + response: + body: + string: '{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '621' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:52 GMT + ms-cv: x9CN90ArUEa4HpsMcBbsbw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/3ff6ab5c-600a-4892-bae9-348f215b1fa4?api-version=2021-01-01 +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_no_access.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_no_access.yaml new file mode 100644 index 000000000000..baa9df15f5fd --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_no_access.yaml @@ -0,0 +1,61 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - xslZIVxpomqC7bNGAz9GrY + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: no-store,no-cache + content-length: '1240' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:53 GMT + ms-cv: 0cEKxiG5uk66Z8n/fVe7cg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://sts.eastus2.mixedreality.azure.com/Accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/token?api-version=2019-02-28-preview +- request: + body: '{"settings": {"inputLocation": {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "blobPrefix": "Input", "relativeInputAssetPath": "testBox.fbx"}, "outputLocation": + {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "blobPrefix": "b994f753-8835-426f-9b04-af990407acca"}}}' + headers: + Accept: + - application/json + Content-Length: + - '325' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/b994f753-8835-426f-9b04-af990407acca?api-version=2021-01-01 + response: + body: + string: '{"error":{"code":"DelegatedResourceAccessError","message":"Error accessing + connected storage account due to insufficient permissions. Check if the Mixed + Reality resource has correct permissions assigned. Documentation on how to + link Remote Rendering Accounts to storage can be found here: https://docs.microsoft.com/azure/remote-rendering/how-tos/create-an-account#link-storage-accounts."}}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + content-length: '390' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:54 GMT + ms-cv: goePbmbsSUK8Y3cAJpL4GQ.0 + x-content-type-options: nosniff + status: + code: 403 + message: Forbidden + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/b994f753-8835-426f-9b04-af990407acca?api-version=2021-01-01 +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_unauthorized.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_unauthorized.yaml new file mode 100644 index 000000000000..f3364afa3e4c --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_conversion_unauthorized.yaml @@ -0,0 +1,25 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - LNs1BzhxdWK+E8HIkAm6rs + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '' + headers: + content-length: '0' + date: Tue, 23 Mar 2021 13:22:55 GMT + ms-cv: AAtLiNdfs0e+CBc/O6wMUQ.0 + x-content-type-options: nosniff + status: + code: 401 + message: Unauthorized + url: https://sts.eastus2.mixedreality.azure.com/Accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/token?api-version=2019-02-28-preview +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_session_request.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_session_request.yaml new file mode 100644 index 000000000000..5bbe3c94cf6e --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_failed_session_request.yaml @@ -0,0 +1,56 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - jvcT+KJ4cAxRUnsu6R4hDu + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: no-store,no-cache + content-length: '1240' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:55 GMT + ms-cv: rlIUliGgt0Sm1bwyhWH0IA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://sts.eastus2.mixedreality.azure.com/Accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/token?api-version=2019-02-28-preview +- request: + body: '{"maxLeaseTimeMinutes": -4, "size": "Standard"}' + headers: + Accept: + - application/json + Content-Length: + - '47' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/dbab9c99-6971-4fbd-84c3-b00445ec3c04?api-version=2021-01-01 + response: + body: + string: '{"error":{"code":"BadRequest","message":"The maxLeaseTimeMinutes value + cannot be negative."}}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + content-length: '93' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:56 GMT + ms-cv: pjy05HpGokaJq/T25+P7MA.0 + x-content-type-options: nosniff + status: + code: 400 + message: Bad Request + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/dbab9c99-6971-4fbd-84c3-b00445ec3c04?api-version=2021-01-01 +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_simple_conversion.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_simple_conversion.yaml new file mode 100644 index 000000000000..a7f5fe4c5b6c --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_simple_conversion.yaml @@ -0,0 +1,533 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - Aznc4CcBrwlR+l/Jru2QHu + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: no-store,no-cache + content-length: '1240' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:56 GMT + ms-cv: dHWGozT0Z0yorJvvjHBw7A.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://sts.eastus2.mixedreality.azure.com/Accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/token?api-version=2019-02-28-preview +- request: + body: '{"settings": {"inputLocation": {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "storageContainerReadListSas": "?sv=2015-04-05&sr=c&se=2122-03-10T16%3A13%3A40.0000000Z&sp=rwl&sig=fakeSig", + "blobPrefix": "Input", "relativeInputAssetPath": "testBox.fbx"}, "outputLocation": + {"storageContainerUri": "https://arrstorageaccount.blob.core.windows.net/test", + "storageContainerWriteSas": "?sv=2015-04-05&sr=c&se=2122-03-10T16%3A13%3A40.0000000Z&sp=rwl&sig=fakeSig", + "blobPrefix": "1724f808-17c6-4058-93c8-f39c2a84b0b7"}}}' + headers: + Accept: + - application/json + Content-Length: + - '666' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + content-length: '481' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:57 GMT + ms-cv: mPb6a2lBlUiB7/DsmIl/Xg.0 + x-content-type-options: nosniff + status: + code: 201 + message: Created + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '481' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:57 GMT + ms-cv: 9XO9frtshk+p0DRl/PJxGA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '481' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:22:58 GMT + ms-cv: o2JY6vAF2UyoE+UQ2PPzXQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '481' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:03 GMT + ms-cv: IjKBKz9NBEWd2grbhbmyWA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"NotStarted"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '481' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:08 GMT + ms-cv: VAMr2wMolEe9TRvFXgP5BQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:13 GMT + ms-cv: cH0j3XHWX0mgbEQetnHryQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:19 GMT + ms-cv: y8MqfjPbU0qQVl3QmfJmjQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:24 GMT + ms-cv: RFE3w3igwkKkkfZTnqfmTw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:29 GMT + ms-cv: uFk0fwn2UUuOJMZ7ha6mjQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:34 GMT + ms-cv: DJIIh8G5fkytd8KuEdNBaw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:39 GMT + ms-cv: JZCmcBiRbUy9ohlp7oGDxA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:45 GMT + ms-cv: TXKoCpSrcEurXhJWSBnk7g.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:50 GMT + ms-cv: nA707bNhOEqiQ2JYdkru1g.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:23:55 GMT + ms-cv: WKHQlFPfjEmoxV9pA0/Qhg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:00 GMT + ms-cv: G1uA0Fop/UaIKfkm1hcIVg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"error":null,"status":"Running"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '478' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:05 GMT + ms-cv: BhW1QfBQXEOL+0qS1ekEvg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 + response: + body: + string: '{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/1724f808-17c6-4058-93c8-f39c2a84b0b7/testBox.arrAsset"},"error":null,"status":"Succeeded"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '615' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:11 GMT + ms-cv: 1fuhnZ4nZkKNGWhQE1D1qw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions/1724f808-17c6-4058-93c8-f39c2a84b0b7?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions?api-version=2021-01-01 + response: + body: + string: '{"conversions":[{"id":"9b0f30a1-f43f-492c-893d-6b3c05464bf4","creationTime":"2021-03-09T18:18:03.1675785Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"9b0f30a1-f43f-492c-893d-6b3c05464bf4/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"f19299d2-eef7-4d82-84b0-047defcf236e","creationTime":"2021-03-09T18:18:30.881044Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"f19299d2-eef7-4d82-84b0-047defcf236e/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"6f494a77-3e94-45ca-ace8-d90335637122","creationTime":"2021-03-09T18:19:24.0118432Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"6f494a77-3e94-45ca-ace8-d90335637122/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"5277192c-0bf7-4c61-bda5-e44153a6d2a2","creationTime":"2021-03-09T18:30:42.2644192Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"5277192c-0bf7-4c61-bda5-e44153a6d2a2/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"6abcdd46-5b8c-4d31-bbac-122bdbdf4c3f","creationTime":"2021-03-09T18:34:54.4977297Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"6abcdd46-5b8c-4d31-bbac-122bdbdf4c3f/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"2e6ddbf4-2170-4171-a72b-56c3be518c3a","creationTime":"2021-03-09T18:35:44.2592196Z","settings":{"inputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"(''https://arrstorageaccount.blob.core.windows.net/test'',)","blobPrefix":"2e6ddbf4-2170-4171-a72b-56c3be518c3a/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InternalServerError","message":"Unexpected + internal server error encountered."},"status":"Failed"},{"id":"ae975581-34ba-4a7b-8444-f978215e66b6","creationTime":"2021-03-09T18:37:24.4419477Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"ae975581-34ba-4a7b-8444-f978215e66b6/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/ae975581-34ba-4a7b-8444-f978215e66b6/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"9bce520b-c6da-4f0f-a825-e8950b46e2ab","creationTime":"2021-03-10T16:31:25.1246608Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"9bce520b-c6da-4f0f-a825-e8950b46e2ab/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InputContainerAccessDenied","message":"Access + to the input blob container was denied. Invalid access rights or invalid shared + access signature."},"status":"Failed"},{"id":"a5cc69da-9cb3-4511-9812-b0456f96d422","creationTime":"2021-03-10T16:35:19.7770288Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"a5cc69da-9cb3-4511-9812-b0456f96d422/","outputAssetFilename":"testBox.arrAsset"}},"error":{"code":"InputContainerAccessDenied","message":"Access + to the input blob container was denied. Invalid access rights or invalid shared + access signature."},"status":"Failed"},{"id":"80039b19-c1a9-48c4-9d3c-05bbc3f2c0a8","creationTime":"2021-03-10T16:43:16.7373357Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"80039b19-c1a9-48c4-9d3c-05bbc3f2c0a8/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/80039b19-c1a9-48c4-9d3c-05bbc3f2c0a8/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"042dbe77-cd35-4fb7-a522-8b9096592acc","creationTime":"2021-03-10T19:28:42.8057122Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"042dbe77-cd35-4fb7-a522-8b9096592acc/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/042dbe77-cd35-4fb7-a522-8b9096592acc/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"10e5a4a2-312c-4bbe-93db-976438a4635d","creationTime":"2021-03-11T18:07:50.2393836Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"10e5a4a2-312c-4bbe-93db-976438a4635d/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/10e5a4a2-312c-4bbe-93db-976438a4635d/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"d141d3ec-8f25-4417-9a48-a143daa7f2d0","creationTime":"2021-03-11T19:05:54.277069Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"d141d3ec-8f25-4417-9a48-a143daa7f2d0/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/d141d3ec-8f25-4417-9a48-a143daa7f2d0/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"391b3052-0a7b-4831-b772-124719c7bb04","creationTime":"2021-03-11T19:15:27.484726Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"391b3052-0a7b-4831-b772-124719c7bb04/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/391b3052-0a7b-4831-b772-124719c7bb04/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"c8f38fa8-099c-48fc-bf5c-0a6e72baacc7","creationTime":"2021-03-12T17:38:44.7556604Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"c8f38fa8-099c-48fc-bf5c-0a6e72baacc7/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/c8f38fa8-099c-48fc-bf5c-0a6e72baacc7/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"c2ea2df4-7b1b-4ee2-97b5-226c52e5f5e5","creationTime":"2021-03-12T17:55:55.4377703Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"c2ea2df4-7b1b-4ee2-97b5-226c52e5f5e5/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/c2ea2df4-7b1b-4ee2-97b5-226c52e5f5e5/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"e1bbad8b-29bf-4dfd-983d-e6ba8c6003d3","creationTime":"2021-03-15T17:54:15.7509006Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"e1bbad8b-29bf-4dfd-983d-e6ba8c6003d3/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/e1bbad8b-29bf-4dfd-983d-e6ba8c6003d3/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"d87d2d17-225c-4f60-8d8a-51dadc36e3e2","creationTime":"2021-03-15T17:55:32.0413519Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"d87d2d17-225c-4f60-8d8a-51dadc36e3e2/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/d87d2d17-225c-4f60-8d8a-51dadc36e3e2/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"cb6b9ce3-3b83-4ca2-acb5-1d3acab0b191","creationTime":"2021-03-15T17:56:57.9605113Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"cb6b9ce3-3b83-4ca2-acb5-1d3acab0b191/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/cb6b9ce3-3b83-4ca2-acb5-1d3acab0b191/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"6970613e-bed3-4e84-a32e-8515db024599","creationTime":"2021-03-15T18:09:23.7342303Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"6970613e-bed3-4e84-a32e-8515db024599/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/6970613e-bed3-4e84-a32e-8515db024599/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"a67d29e5-61d1-4c3d-ad9c-552837a7dd61","creationTime":"2021-03-16T11:11:25.6714785Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"a67d29e5-61d1-4c3d-ad9c-552837a7dd61/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/a67d29e5-61d1-4c3d-ad9c-552837a7dd61/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"77fb083c-e55b-4d2b-941e-06649ac0f7f7","creationTime":"2021-03-16T11:12:09.0107221Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"77fb083c-e55b-4d2b-941e-06649ac0f7f7/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/77fb083c-e55b-4d2b-941e-06649ac0f7f7/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"53d31310-15de-4cac-bbff-bf30658e2e86","creationTime":"2021-03-19T17:00:00.1763042Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"53d31310-15de-4cac-bbff-bf30658e2e86/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"9c98f810-681e-466d-894b-171e311008ad","creationTime":"2021-03-19T17:04:03.5760141Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"9c98f810-681e-466d-894b-171e311008ad/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"79a37901-c798-4112-8bf4-be8038e3fbce","creationTime":"2021-03-19T17:10:49.0512631Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"79a37901-c798-4112-8bf4-be8038e3fbce/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"df0bf778-e005-4162-be4a-56d9d8e9a83c","creationTime":"2021-03-19T17:12:15.8909541Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"df0bf778-e005-4162-be4a-56d9d8e9a83c/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/df0bf778-e005-4162-be4a-56d9d8e9a83c/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"029783c8-179e-4455-b606-252b044c4f0b","creationTime":"2021-03-19T17:22:39.4520987Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"029783c8-179e-4455-b606-252b044c4f0b/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"e4963baf-4d21-4029-951c-225188ebe339","creationTime":"2021-03-19T17:23:45.9155238Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"e4963baf-4d21-4029-951c-225188ebe339/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/e4963baf-4d21-4029-951c-225188ebe339/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"fcf1d2a7-1d0e-4e16-a4b6-6af1a046dce2","creationTime":"2021-03-19T17:37:07.6491193Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"fcf1d2a7-1d0e-4e16-a4b6-6af1a046dce2/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"f628ef31-aab0-4b53-af70-bea568cae3bb","creationTime":"2021-03-19T17:38:08.9989001Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"f628ef31-aab0-4b53-af70-bea568cae3bb/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/f628ef31-aab0-4b53-af70-bea568cae3bb/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"1b976dcd-816a-43b0-93c6-3c7ee6749cc3","creationTime":"2021-03-19T17:39:59.6177173Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1b976dcd-816a-43b0-93c6-3c7ee6749cc3/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"cf598ca1-4924-4120-b02b-4e237889f392","creationTime":"2021-03-19T17:41:01.4026308Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"cf598ca1-4924-4120-b02b-4e237889f392/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/cf598ca1-4924-4120-b02b-4e237889f392/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"8bfef2cf-36eb-45f8-8d10-97fb307e4a7c","creationTime":"2021-03-19T17:48:01.2574813Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"8bfef2cf-36eb-45f8-8d10-97fb307e4a7c/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"5c14703a-917d-4020-b6d9-37a0c2431529","creationTime":"2021-03-19T17:49:06.4439118Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5c14703a-917d-4020-b6d9-37a0c2431529/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/5c14703a-917d-4020-b6d9-37a0c2431529/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"1f54c360-9fea-48a4-a950-1a46ab3adc3d","creationTime":"2021-03-19T18:05:09.8734976Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1f54c360-9fea-48a4-a950-1a46ab3adc3d/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"babdf5d4-5e7d-47f2-b384-822a04551348","creationTime":"2021-03-19T18:06:17.8273073Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"babdf5d4-5e7d-47f2-b384-822a04551348/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/babdf5d4-5e7d-47f2-b384-822a04551348/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"ded52e40-8643-41d2-8571-c30dcf1df2ec","creationTime":"2021-03-19T18:17:11.8584239Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"ded52e40-8643-41d2-8571-c30dcf1df2ec/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"f8a14b8e-d5cf-4860-9c3f-070fb016b326","creationTime":"2021-03-22T17:07:12.8212152Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"f8a14b8e-d5cf-4860-9c3f-070fb016b326/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"0632c21e-5782-49b5-ba6e-a21352b9b2ac","creationTime":"2021-03-22T17:10:16.8367277Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"0632c21e-5782-49b5-ba6e-a21352b9b2ac/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/0632c21e-5782-49b5-ba6e-a21352b9b2ac/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"bf3b7e9f-39d1-4a98-8a19-65596209d440","creationTime":"2021-03-22T17:14:27.7063026Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"bf3b7e9f-39d1-4a98-8a19-65596209d440/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"cfc534b3-3d46-4185-a080-98afc6097dba","creationTime":"2021-03-22T17:15:30.0686997Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"cfc534b3-3d46-4185-a080-98afc6097dba/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/cfc534b3-3d46-4185-a080-98afc6097dba/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"c228b814-e29a-4389-be1c-96e7c0ea668d","creationTime":"2021-03-22T18:46:15.4801039Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"c228b814-e29a-4389-be1c-96e7c0ea668d/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/c228b814-e29a-4389-be1c-96e7c0ea668d/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"9872dd7b-6d11-408a-bbf9-cfe3abaf58a7","creationTime":"2021-03-22T19:24:27.492717Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"9872dd7b-6d11-408a-bbf9-cfe3abaf58a7/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/9872dd7b-6d11-408a-bbf9-cfe3abaf58a7/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"cddfc170-ec9a-428a-a9d7-2cd069387b30","creationTime":"2021-03-22T19:31:14.5486469Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"cddfc170-ec9a-428a-a9d7-2cd069387b30/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/cddfc170-ec9a-428a-a9d7-2cd069387b30/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"e8f23a70-3146-4119-a9d0-9ed813e6c6f1","creationTime":"2021-03-22T19:40:31.3253184Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"e8f23a70-3146-4119-a9d0-9ed813e6c6f1/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/e8f23a70-3146-4119-a9d0-9ed813e6c6f1/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"023f5b84-f142-4d5f-bf86-cc3a68fdde6f","creationTime":"2021-03-22T19:40:51.3227567Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"023f5b84-f142-4d5f-bf86-cc3a68fdde6f/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/023f5b84-f142-4d5f-bf86-cc3a68fdde6f/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"1eabd0a4-eb68-42e0-8678-9d73d555ee28","creationTime":"2021-03-22T19:41:11.156701Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1eabd0a4-eb68-42e0-8678-9d73d555ee28/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/1eabd0a4-eb68-42e0-8678-9d73d555ee28/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"11b5d55d-b228-4291-8883-df3865a32088","creationTime":"2021-03-22T19:46:49.6665492Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"11b5d55d-b228-4291-8883-df3865a32088/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/11b5d55d-b228-4291-8883-df3865a32088/testBox.arrAsset"},"error":null,"status":"Succeeded"},{"id":"70be9154-ee8c-43ed-a7da-918ecef5eb3b","creationTime":"2021-03-23T11:49:11.4455919Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"70be9154-ee8c-43ed-a7da-918ecef5eb3b/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"44001c37-5e9c-48b5-ac18-8eae3be5f5d3","creationTime":"2021-03-23T11:52:19.5361733Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"44001c37-5e9c-48b5-ac18-8eae3be5f5d3/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"}],"@nextLink":"https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions?api-version=2021-01-01&skiptoken=1%3AW3sidG9rZW4iOiIrUklEOn5pMWhOQUlhMDJMOXZId0FBQUFBQUFBPT0jUlQ6MSNUUkM6NTAjSVNWOjIjSUVPOjY1NTY3I1FDRjozI0ZQQzpBZ0VBQUFBR0FHK2ZBY0FEQnc9PSIsInJhbmdlIjp7Im1pbiI6IiIsIm1heCI6IkZGIn19XQ"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + content-length: '30993' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:11 GMT + ms-cv: Rt97XE50F06K5vehwZbAxg.0 + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/conversions?api-version=2021-01-01&skiptoken=1:W3sidG9rZW4iOiIrUklEOn5pMWhOQUlhMDJMOXZId0FBQUFBQUFBPT0jUlQ6MSNUUkM6NTAjSVNWOjIjSUVPOjY1NTY3I1FDRjozI0ZQQzpBZ0VBQUFBR0FHK2ZBY0FEQnc9PSIsInJhbmdlIjp7Im1pbiI6IiIsIm1heCI6IkZGIn19XQ + response: + body: + string: '{"conversions":[{"id":"5450566d-8263-4c9d-8a98-bec2f60ca2d1","creationTime":"2021-03-23T11:52:43.9191719Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5450566d-8263-4c9d-8a98-bec2f60ca2d1/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"5147aa0f-485a-429f-8d04-bd0b2458cf79","creationTime":"2021-03-23T11:58:50.7610327Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"5147aa0f-485a-429f-8d04-bd0b2458cf79/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"bf2bc58f-08d6-42aa-8d9d-6aa0fdb65bef","creationTime":"2021-03-23T13:18:55.3796887Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"bf2bc58f-08d6-42aa-8d9d-6aa0fdb65bef/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"3ff6ab5c-600a-4892-bae9-348f215b1fa4","creationTime":"2021-03-23T13:20:52.4717661Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBoxWhichDoesNotExist.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"3ff6ab5c-600a-4892-bae9-348f215b1fa4/","outputAssetFilename":"testBoxWhichDoesNotExist.arrAsset"}},"error":{"code":"ConversionProcessFailed","message":"Invalid + input provided. Check logs in output container for details."},"status":"Failed"},{"id":"1724f808-17c6-4058-93c8-f39c2a84b0b7","creationTime":"2021-03-23T13:22:58.1978779Z","settings":{"inputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"Input/","relativeInputAssetPath":"testBox.fbx"},"outputLocation":{"storageContainerUri":"https://arrstorageaccount.blob.core.windows.net/test","blobPrefix":"1724f808-17c6-4058-93c8-f39c2a84b0b7/","outputAssetFilename":"testBox.arrAsset"}},"output":{"outputAssetUri":"https://arrstorageaccount.blob.core.windows.net/test/1724f808-17c6-4058-93c8-f39c2a84b0b7/testBox.arrAsset"},"error":null,"status":"Succeeded"}],"@nextLink":null}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + content-length: '3138' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:11 GMT + ms-cv: fjxqBH8abEuy6MXUDSZ4zA.0 + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/conversions?api-version=2021-01-01&skiptoken=1:W3sidG9rZW4iOiIrUklEOn5pMWhOQUlhMDJMOXZId0FBQUFBQUFBPT0jUlQ6MSNUUkM6NTAjSVNWOjIjSUVPOjY1NTY3I1FDRjozI0ZQQzpBZ0VBQUFBR0FHK2ZBY0FEQnc9PSIsInJhbmdlIjp7Im1pbiI6IiIsIm1heCI6IkZGIn19XQ +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_simple_session.yaml b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_simple_session.yaml new file mode 100644 index 000000000000..09497ede1237 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/recordings/test_client_async.test_simple_session.yaml @@ -0,0 +1,1076 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-authentication/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + X-MRC-CV: + - 76YWo81ZJRcKImaUbAzGdY + method: GET + uri: https://sts.eastus.mixedreality.azure.com/Accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/token?api-version=2019-02-28-preview + response: + body: + string: '{"AccessToken":"faketoken.eyJleHAiOjIxNDc0ODM2NDd9.faketoken"}' + headers: + cache-control: no-store,no-cache + content-length: '1240' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:12 GMT + ms-cv: knRX6aZxeE2nt9RNlJCq0A.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://sts.eastus2.mixedreality.azure.com/Accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/token?api-version=2019-02-28-preview +- request: + body: '{"maxLeaseTimeMinutes": 15, "size": "Standard"}' + headers: + Accept: + - application/json + Content-Length: + - '46' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PUT + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:13 GMT + ms-cv: 8EKINz25lU+aoBK86PAk2A.0 + x-content-type-options: nosniff + status: + code: 201 + message: Created + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:13 GMT + ms-cv: fpu386LDKUqCQuK8Jdr0Qw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:13 GMT + ms-cv: 8363lMe1F0S11YN+KJVgIQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:18 GMT + ms-cv: OhGZqjyO6UWaBjdSYorl1Q.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:23 GMT + ms-cv: +c6hIVGdPU2xi8RyLijsDA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:28 GMT + ms-cv: jjFnvfnxD0GOp041OjIsvQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:33 GMT + ms-cv: yXeDAGRsiU+vdMVW5t8Lsw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:39 GMT + ms-cv: xQzzlqNJIEu4TQHvrX1rDw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:44 GMT + ms-cv: qgpWqPefk0GiSHDclJ2IMg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:49 GMT + ms-cv: KK3RPAFHY06c5h3KBpaD5Q.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:54 GMT + ms-cv: wDCsoOn0akmjzFln90S/VQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:24:59 GMT + ms-cv: gObf9vHlQkSQwgqzj9Rjhw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:04 GMT + ms-cv: uxfH45gcJk+qrWYA61LuIw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:09 GMT + ms-cv: j6ymF8OMyEigc5Ry98rdHw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:14 GMT + ms-cv: bUOE25xCT02fPDd8oTXsIg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:19 GMT + ms-cv: kwrZJsq7Ok6pA5WmU+Xjzw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:25 GMT + ms-cv: skM6qk5RkUqWGN4OeM8lrA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:30 GMT + ms-cv: YmKsWnTSNEOe9InkiYJ8pQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:35 GMT + ms-cv: j7+UVXZ+bUq89rTP09Fj8w.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:40 GMT + ms-cv: uV61Eoe180G33G1LCY4XDA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:45 GMT + ms-cv: QAvjsUOqtEqnc1qgYkRJ9Q.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:50 GMT + ms-cv: HqyB0XX0mUeschaZJWskXg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:25:55 GMT + ms-cv: i/sNCRTAXUCZk1184aU9+A.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:00 GMT + ms-cv: AyWD2w1eYES9yPIGpjp2Kg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:06 GMT + ms-cv: 3XxHqkFbNUaYcoLlAnMQsg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:11 GMT + ms-cv: GwyXOABHVUKPpsrrxizVxA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:16 GMT + ms-cv: sf6Z1dBf1E2DuuhVirkMVA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:21 GMT + ms-cv: sf8NWlU5PUmUx5WJQzZXdw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:26 GMT + ms-cv: eTuDQMCs9kKd6Ue0+DQDDg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:31 GMT + ms-cv: scg+bVsz1U6twEUccGaf1Q.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:36 GMT + ms-cv: kB2KpGerk0a6Y0Sc0dOZsA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:41 GMT + ms-cv: clkoFE1cikmHuEn27Wl/hg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:46 GMT + ms-cv: xk0MKFgVXE2leoAmlLCSbA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:52 GMT + ms-cv: 7e0Q2ni1Ikuu/9M+33Q+iw.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:26:57 GMT + ms-cv: AzwdZOlPEk2NPVe41wfWCA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:27:02 GMT + ms-cv: 9/4aCv4XWUuoADgyu/Hx4Q.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":15,"size":"Standard","status":"Starting"}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '181' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:27:07 GMT + ms-cv: WDdjuECpSE+5UUQxSUEMGg.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","arrInspectorPort":63910,"handshakePort":65353,"elapsedTimeMinutes":0,"hostname":"823736284-60fc7e44-5610-40c4-add9-fe5d851fd8d2.remoterendering.vm.eastus.mixedreality.azure.com","maxLeaseTimeMinutes":15,"size":"Standard","status":"Ready","teraflops":8.1}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '351' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:27:12 GMT + ms-cv: stOqmH+N2k2g1jeug0RJ/A.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: '{"maxLeaseTimeMinutes": 20}' + headers: + Accept: + - application/json + Content-Length: + - '26' + Content-Type: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: PATCH + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","arrInspectorPort":63910,"handshakePort":65353,"elapsedTimeMinutes":0,"hostname":"823736284-60fc7e44-5610-40c4-add9-fe5d851fd8d2.remoterendering.vm.eastus.mixedreality.azure.com","maxLeaseTimeMinutes":20,"size":"Standard","status":"Ready","teraflops":8.1}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + content-length: '351' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:27:12 GMT + ms-cv: dNyD7aGyikikugBfDeqjUw.0 + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions?api-version=2021-01-01 + response: + body: + string: '{"sessions":[{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","arrInspectorPort":63910,"handshakePort":65353,"elapsedTimeMinutes":0,"hostname":"823736284-60fc7e44-5610-40c4-add9-fe5d851fd8d2.remoterendering.vm.eastus.mixedreality.azure.com","maxLeaseTimeMinutes":5,"size":"Standard","status":"Ready","teraflops":8.1}]}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '366' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:27:13 GMT + ms-cv: H1XJvunYZkSeEjIfQHtSFQ.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions?api-version=2021-01-01 +- request: + body: null + headers: + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e/:stop?api-version=2021-01-01 + response: + body: + string: '' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + date: Tue, 23 Mar 2021 13:27:13 GMT + ms-cv: 1J1piFQyKkCieSOYLf8SgA.0 + x-content-type-options: nosniff + status: + code: 204 + message: No Content + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e/:stop?api-version=2021-01-01 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-mixedreality-remoterendering/1.0.0b1 Python/3.9.1 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://remoterendering.eastus.mixedreality.azure.com/accounts/70a8e4d2-816a-4d03-a800-aeb20126ae51/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 + response: + body: + string: '{"id":"f3fd6db9-86c6-4bee-b652-fb1fc0dde08e","creationTime":"2021-03-23T13:24:13.2901358+00:00","elapsedTimeMinutes":0,"maxLeaseTimeMinutes":20,"size":"Standard","status":"Stopped","teraflops":8.1}' + headers: + api-supported-versions: 2021-01-01-preview, 2021-01-01 + cache-control: no-store,no-cache + content-length: '196' + content-type: application/json; charset=utf-8 + date: Tue, 23 Mar 2021 13:27:13 GMT + ms-cv: AxoC8Q69lEm65dwzXEe9FA.0 + pragma: no-cache + x-content-type-options: nosniff + status: + code: 200 + message: OK + url: https://remoterendering.eastus2.mixedreality.azure.com/accounts/cea4d2db-47b8-4dd1-913e-cfafd6635ce2/sessions/f3fd6db9-86c6-4bee-b652-fb1fc0dde08e?api-version=2021-01-01 +version: 1 diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client.py b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client.py new file mode 100644 index 000000000000..cdbe0dcbb6e8 --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client.py @@ -0,0 +1,356 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +import os +import time +import uuid +import functools +import pytest +from azure.core.credentials import AzureKeyCredential +from azure.core.exceptions import HttpResponseError +from azure.mixedreality.remoterendering import (AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionStatus, + RemoteRenderingClient, + RenderingSession, + RenderingSessionSize, + RenderingSessionStatus) + +from devtools_testutils import AzureTestCase, PowerShellPreparer + +from preparers import RemoteRenderingPreparer +from preparers import RemoteRendererClientPreparer as ClientPreparer + +RemoteRendererClientPreparer = functools.partial(ClientPreparer, RemoteRenderingClient) + + +def create_remote_rendering_client(remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key): + + key_credential = AzureKeyCredential(remoterendering_arr_account_key) + + client = RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=remoterendering_arr_account_id, + account_domain=remoterendering_arr_account_domain, + credential=key_credential) + + return client + + +class ClientTests(AzureTestCase): + def get_var(self, variable_name, default_or_playback_value): + if self.is_live: + return os.environ.get(variable_name, default_or_playback_value) + + return default_or_playback_value + + @RemoteRenderingPreparer() + def test_create_client(self, + remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key): + client = create_remote_rendering_client(remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key) + + assert client is not None + + @RemoteRenderingPreparer() + def test_create_client_with_invalid_arguments(self, + remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key): + + key_credential = AzureKeyCredential(remoterendering_arr_account_key) + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=None, + account_id=remoterendering_arr_account_id, + account_domain=remoterendering_arr_account_domain, + credential=key_credential) + + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=None, + account_domain=remoterendering_arr_account_domain, + credential=key_credential) + + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=remoterendering_arr_account_id, + account_domain=None, + credential=key_credential) + + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=remoterendering_arr_account_id, + account_domain=remoterendering_arr_account_domain, + credential=None) + + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=remoterendering_arr_account_id, + account_domain=remoterendering_arr_account_domain, + credential=key_credential, + authentication_endpoint_url="#") + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + def test_simple_conversion(self, + client, + remoterendering_arr_storage_account_name, + remoterendering_storage_endpoint_suffix, + remoterendering_arr_blob_container_name, + remoterendering_arr_sas_token + ): + + if self.is_live: + conversion_id = str(uuid.uuid4()) + else: + conversion_id = "11b5d55d-b228-4291-8883-df3865a32088" + + storage_container_uri = "https://"+remoterendering_arr_storage_account_name + \ + ".blob."+remoterendering_storage_endpoint_suffix+"/"+remoterendering_arr_blob_container_name + + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + relative_input_asset_path="testBox.fbx", + blob_prefix="Input", + storage_container_read_list_sas="?"+remoterendering_arr_sas_token + ) + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=conversion_id, + storage_container_write_sas="?"+remoterendering_arr_sas_token + ) + + conversion_poller = client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) + + conversion = client.get_asset_conversion(conversion_id) + assert conversion.id == conversion_id + assert conversion.settings.input_settings.relative_input_asset_path == input_settings.relative_input_asset_path + assert conversion.status != AssetConversionStatus.FAILED + + finished_conversion = conversion_poller.result() + + assert finished_conversion.id == conversion_id + assert finished_conversion.settings.input_settings.relative_input_asset_path == input_settings.relative_input_asset_path + assert finished_conversion.status == AssetConversionStatus.SUCCEEDED + finished_conversion.output.asset_uri.endswith(conversion_id+"/testBox.arrAsset") + + foundConversion = False + conversions = client.list_asset_conversions() + for c in conversions: + if(c.id == conversion_id): + foundConversion = True + break + assert foundConversion == True + + @RemoteRenderingPreparer() + def test_failed_conversion_unauthorized(self, + remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key, + remoterendering_arr_storage_account_name, + remoterendering_storage_endpoint_suffix, + remoterendering_arr_blob_container_name, + remoterendering_arr_sas_token + ): + client = create_remote_rendering_client(remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + "thisisnotthekey") + + if self.is_live: + conversion_id = str(uuid.uuid4()) + else: + conversion_id = "c228b814-e29a-4389-be1c-96e7c0ea668d" + + storage_container_uri = "https://"+remoterendering_arr_storage_account_name + \ + ".blob."+remoterendering_storage_endpoint_suffix+"/"+remoterendering_arr_blob_container_name + + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + relative_input_asset_path="testBox.fbx", + blob_prefix="Input" + # Do not provide SAS access to the container, and assume the test account is not linked to the storage. + ) + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=conversion_id + # Do not provide SAS access to the container, and assume the test account is not linked to the storage. + ) + + with pytest.raises(HttpResponseError) as excinfo: + # make the request which cannot access the storage account + conversion_poller = client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) + + exception = excinfo.value + assert exception.status_code == 401 + assert "Unauthorized" in exception.message + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + def test_failed_conversion_no_access(self, + client, + remoterendering_arr_storage_account_name, + remoterendering_storage_endpoint_suffix, + remoterendering_arr_blob_container_name, + remoterendering_arr_sas_token + ): + + if self.is_live: + conversion_id = str(uuid.uuid4()) + else: + conversion_id = "b3bea9f9-db26-45af-a4a1-dc007c1c2ce9" + + storage_container_uri = "https://"+remoterendering_arr_storage_account_name + \ + ".blob."+remoterendering_storage_endpoint_suffix+"/"+remoterendering_arr_blob_container_name + + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + relative_input_asset_path="testBox.fbx", + blob_prefix="Input" + # Do not provide SAS access to the container, and assume the test account is not linked to the storage. + ) + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=conversion_id + # Do not provide SAS access to the container, and assume the test account is not linked to the storage. + ) + + with pytest.raises(HttpResponseError) as excinfo: + # make the request which cannot access the storage account + conversion_poller = client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) + + assert excinfo.value.status_code == 403 + error_details = excinfo.value + assert "storage" in error_details.message + assert "permissions" in error_details.message + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + def test_failed_conversion_missing_asset(self, + client, + remoterendering_arr_storage_account_name, + remoterendering_storage_endpoint_suffix, + remoterendering_arr_blob_container_name, + remoterendering_arr_sas_token + ): + + if self.is_live: + conversion_id = str(uuid.uuid4()) + else: + conversion_id = "5147aa0f-485a-429f-8d04-bd0b2458cf79" + + storage_container_uri = "https://"+remoterendering_arr_storage_account_name + \ + ".blob."+remoterendering_storage_endpoint_suffix+"/"+remoterendering_arr_blob_container_name + + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + relative_input_asset_path="testBoxWhichDoesNotExist.fbx", + blob_prefix="Input", + storage_container_read_list_sas="?"+remoterendering_arr_sas_token + ) + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=conversion_id, + storage_container_write_sas="?"+remoterendering_arr_sas_token + ) + + with pytest.raises(HttpResponseError) as excinfo: + # make the request which fails in polling because of the missing asset + conversion_poller = client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings) + conversion_poller.result() + + error_details = excinfo.value + assert "invalid input" in error_details.error.message.lower() + assert "logs" in error_details.error.message.lower() + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + def test_simple_session(self, + client + ): + if self.is_live: + session_id = str(uuid.uuid4()) + else: + session_id = "dcb143c5-31c7-4eba-9a9d-d878444de6e0" + + session_poller = client.begin_rendering_session( + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=15) + + session = client.get_rendering_session(session_id) + assert session.id == session_id + assert session.size == RenderingSessionSize.STANDARD + + assert session.lease_time_minutes == 15 + assert session.status != RenderingSessionStatus.ERROR + + ready_session = session_poller.result() + assert ready_session.id == session_id + assert ready_session.size == RenderingSessionSize.STANDARD + assert ready_session.lease_time_minutes == 15 + assert ready_session.status == RenderingSessionStatus.READY + + assert ready_session.hostname + assert ready_session.arr_inspector_port is not None + assert ready_session.handshake_port is not None + + extended_session = client.update_rendering_session(session_id=session_id, lease_time_minutes=20) + assert extended_session.id == session_id + assert extended_session.size == RenderingSessionSize.STANDARD + assert extended_session.lease_time_minutes == 15 or extended_session.lease_time_minutes == 20 + assert extended_session.status == RenderingSessionStatus.READY + + foundSession = False + for s in client.list_rendering_sessions(): + if s.id == session_id: + foundSession = True + break + assert foundSession == True + + client.stop_rendering_session(session_id) + stopped_session = client.get_rendering_session(session_id) + assert stopped_session.status == RenderingSessionStatus.STOPPED + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + def test_failed_session_request(self, + client + ): + if self.is_live: + session_id = str(uuid.uuid4()) + else: + session_id = "8240a701-54f5-4094-9bd4-652e714cb1ad" + + with pytest.raises(HttpResponseError) as excinfo: + # Make an invalid request (negative lease time). + session_poller = client.begin_rendering_session( + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=-4) + + assert excinfo.value.status_code == 400 + exception = excinfo.value + assert "lease" in exception.message.lower() + assert "negative" in exception.message.lower() diff --git a/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client_async.py b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client_async.py new file mode 100644 index 000000000000..e6893aeb42ed --- /dev/null +++ b/sdk/remoterendering/azure-mixedreality-remoterendering/tests/test_client_async.py @@ -0,0 +1,355 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +import os +import time +import uuid +import functools +import pytest +from azure.core.credentials import AzureKeyCredential +from azure.core.exceptions import HttpResponseError +from azure.mixedreality.remoterendering.aio import RemoteRenderingClient +from azure.mixedreality.remoterendering import (AssetConversionInputSettings, + AssetConversionOutputSettings, + AssetConversionStatus, + RenderingSession, + RenderingSessionSize, + RenderingSessionStatus) + + +from devtools_testutils import AzureTestCase, PowerShellPreparer + +from preparers import RemoteRenderingPreparer +from preparers import RemoteRendererClientPreparer as ClientPreparer + +RemoteRendererClientPreparer = functools.partial(ClientPreparer, RemoteRenderingClient) + + +def create_remote_rendering_client(remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key): + + key_credential = AzureKeyCredential(remoterendering_arr_account_key) + + client = RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=remoterendering_arr_account_id, + account_domain=remoterendering_arr_account_domain, + credential=key_credential) + + return client + + +class ClientTests(AzureTestCase): + def get_var(self, variable_name, default_or_playback_value): + if self.is_live: + return os.environ.get(variable_name, default_or_playback_value) + + return default_or_playback_value + + @RemoteRenderingPreparer() + def test_create_client(self, + remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key): + client = create_remote_rendering_client(remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key) + + assert client is not None + + @RemoteRenderingPreparer() + def test_create_client_with_invalid_arguments(self, + remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key): + + key_credential = AzureKeyCredential(remoterendering_arr_account_key) + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=None, + account_id=remoterendering_arr_account_id, + account_domain=remoterendering_arr_account_domain, + credential=key_credential) + + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=None, + account_domain=remoterendering_arr_account_domain, + credential=key_credential) + + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=remoterendering_arr_account_id, + account_domain=None, + credential=key_credential) + + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=remoterendering_arr_account_id, + account_domain=remoterendering_arr_account_domain, + credential=None) + + with pytest.raises(ValueError): + RemoteRenderingClient( + endpoint=remoterendering_arr_service_endpoint, + account_id=remoterendering_arr_account_id, + account_domain=remoterendering_arr_account_domain, + credential=key_credential, + authentication_endpoint_url="#") + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + async def test_simple_conversion(self, + client, + remoterendering_arr_storage_account_name, + remoterendering_storage_endpoint_suffix, + remoterendering_arr_blob_container_name, + remoterendering_arr_sas_token + ): + + if self.is_live: + conversion_id = str(uuid.uuid4()) + else: + conversion_id = "1724f808-17c6-4058-93c8-f39c2a84b0b7" + + storage_container_uri = "https://"+remoterendering_arr_storage_account_name + \ + ".blob."+remoterendering_storage_endpoint_suffix+"/"+remoterendering_arr_blob_container_name + + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + relative_input_asset_path="testBox.fbx", + blob_prefix="Input", + storage_container_read_list_sas="?"+remoterendering_arr_sas_token + ) + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=conversion_id, + storage_container_write_sas="?"+remoterendering_arr_sas_token + ) + + conversion_poller = await client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) + + conversion = await client.get_asset_conversion(conversion_id) + assert conversion.id == conversion_id + assert conversion.settings.input_settings.relative_input_asset_path == input_settings.relative_input_asset_path + assert conversion.status != AssetConversionStatus.FAILED + + finished_conversion = await conversion_poller.result() + + assert finished_conversion.id == conversion_id + assert finished_conversion.settings.input_settings.relative_input_asset_path == input_settings.relative_input_asset_path + assert finished_conversion.status == AssetConversionStatus.SUCCEEDED + finished_conversion.output.asset_uri.endswith(conversion_id+"/testBox.arrAsset") + + foundConversion = False + conversions = await client.list_asset_conversions() + async for c in conversions: + if(c.id == conversion_id): + foundConversion = True + break + assert foundConversion == True + + @RemoteRenderingPreparer() + async def test_failed_conversion_unauthorized(self, + remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + remoterendering_arr_account_key, + remoterendering_arr_storage_account_name, + remoterendering_storage_endpoint_suffix, + remoterendering_arr_blob_container_name, + remoterendering_arr_sas_token + ): + client = create_remote_rendering_client(remoterendering_arr_service_endpoint, + remoterendering_arr_account_id, + remoterendering_arr_account_domain, + "thisisnotthekey") + + if self.is_live: + conversion_id = str(uuid.uuid4()) + else: + conversion_id = "1724f808-17c6-4058-93c8-f39c2a84b0b7" + + storage_container_uri = "https://"+remoterendering_arr_storage_account_name + \ + ".blob."+remoterendering_storage_endpoint_suffix+"/"+remoterendering_arr_blob_container_name + + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + relative_input_asset_path="testBox.fbx", + blob_prefix="Input" + # Do not provide SAS access to the container, and assume the test account is not linked to the storage. + ) + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=conversion_id + # Do not provide SAS access to the container, and assume the test account is not linked to the storage. + ) + + with pytest.raises(HttpResponseError) as excinfo: + # make the request which cannot access the storage account + conversion_poller = await client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) + + exception = excinfo.value + assert exception.status_code == 401 + assert "Unauthorized" in exception.message + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + async def test_failed_conversion_no_access(self, + client, + remoterendering_arr_storage_account_name, + remoterendering_storage_endpoint_suffix, + remoterendering_arr_blob_container_name, + remoterendering_arr_sas_token + ): + if self.is_live: + conversion_id = str(uuid.uuid4()) + else: + conversion_id = "b994f753-8835-426f-9b04-af990407acca" + + storage_container_uri = "https://"+remoterendering_arr_storage_account_name + \ + ".blob."+remoterendering_storage_endpoint_suffix+"/"+remoterendering_arr_blob_container_name + + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + relative_input_asset_path="testBox.fbx", + blob_prefix="Input" + # Do not provide SAS access to the container, and assume the test account is not linked to the storage. + ) + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=conversion_id + # Do not provide SAS access to the container, and assume the test account is not linked to the storage. + ) + + with pytest.raises(HttpResponseError) as excinfo: + # make the request which cannot access the storage account + conversion_poller = await client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) + + assert excinfo.value.status_code == 403 + error_details = excinfo.value + assert "storage" in error_details.message + assert "permissions" in error_details.message + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + async def test_failed_conversion_missing_asset(self, + client, + remoterendering_arr_storage_account_name, + remoterendering_storage_endpoint_suffix, + remoterendering_arr_blob_container_name, + remoterendering_arr_sas_token + ): + if self.is_live: + conversion_id = str(uuid.uuid4()) + else: + conversion_id = "3ff6ab5c-600a-4892-bae9-348f215b1fa4" + + storage_container_uri = "https://"+remoterendering_arr_storage_account_name + \ + ".blob."+remoterendering_storage_endpoint_suffix+"/"+remoterendering_arr_blob_container_name + + input_settings = AssetConversionInputSettings( + storage_container_uri=storage_container_uri, + relative_input_asset_path="testBoxWhichDoesNotExist.fbx", + blob_prefix="Input", + storage_container_read_list_sas="?"+remoterendering_arr_sas_token + ) + output_settings = AssetConversionOutputSettings( + storage_container_uri=storage_container_uri, + blob_prefix=conversion_id, + storage_container_write_sas="?"+remoterendering_arr_sas_token + ) + with pytest.raises(HttpResponseError) as excinfo: + conversion_poller = await client.begin_asset_conversion( + conversion_id=conversion_id, input_settings=input_settings, output_settings=output_settings + ) + await conversion_poller.result() + + error_details = excinfo.value + assert "invalid input" in error_details.error.message.lower() + assert "logs" in error_details.error.message.lower() + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + async def test_simple_session(self, + client + ): + + if self.is_live: + session_id = str(uuid.uuid4()) + else: + session_id = "f3fd6db9-86c6-4bee-b652-fb1fc0dde08e" + + session_poller = await client.begin_rendering_session( + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=15) + + session = await client.get_rendering_session(session_id) + assert session.id == session_id + assert session.size == RenderingSessionSize.STANDARD + + assert session.lease_time_minutes == 15 + assert session.status != RenderingSessionStatus.ERROR + + ready_session = await session_poller.result() + assert ready_session.id == session_id + assert ready_session.size == RenderingSessionSize.STANDARD + assert ready_session.lease_time_minutes == 15 + assert ready_session.status == RenderingSessionStatus.READY + + assert ready_session.hostname + assert ready_session.arr_inspector_port is not None + assert ready_session.handshake_port is not None + + extended_session = await client.update_rendering_session(session_id=session_id, lease_time_minutes=20) + assert extended_session.id == session_id + assert extended_session.size == RenderingSessionSize.STANDARD + assert extended_session.lease_time_minutes == 15 or extended_session.lease_time_minutes == 20 + assert extended_session.status == RenderingSessionStatus.READY + + foundSession = False + async for s in await client.list_rendering_sessions(): + if s.id == session_id: + foundSession = True + break + assert foundSession == True + + await client.stop_rendering_session(session_id) + stopped_session = await client.get_rendering_session(session_id) + assert stopped_session.status == RenderingSessionStatus.STOPPED + + @RemoteRenderingPreparer() + @RemoteRendererClientPreparer() + async def test_failed_session_request(self, + client + ): + if self.is_live: + session_id = str(uuid.uuid4()) + else: + session_id = "dbab9c99-6971-4fbd-84c3-b00445ec3c04" + + with pytest.raises(HttpResponseError) as excinfo: + # Make an invalid request (negative lease time). + session_poller = await client.begin_rendering_session( + session_id=session_id, size=RenderingSessionSize.STANDARD, lease_time_minutes=-4) + + assert excinfo.value.status_code == 400 + exception = excinfo.value + assert "lease" in exception.message.lower() + assert "negative" in exception.message.lower() diff --git a/sdk/remoterendering/ci.yml b/sdk/remoterendering/ci.yml new file mode 100644 index 000000000000..d8ab44e91ce9 --- /dev/null +++ b/sdk/remoterendering/ci.yml @@ -0,0 +1,34 @@ +# NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. + +trigger: + branches: + include: + - master + - main + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/remoterendering/ + +pr: + branches: + include: + - master + - main + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/remoterendering/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: remoterendering + Artifacts: + - name: azure-mixedreality-remoterendering + safeName: azuremixedrealityremoterendering \ No newline at end of file diff --git a/sdk/remoterendering/test-resources-post.ps1 b/sdk/remoterendering/test-resources-post.ps1 new file mode 100644 index 000000000000..313be36db99b --- /dev/null +++ b/sdk/remoterendering/test-resources-post.ps1 @@ -0,0 +1,30 @@ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. + +# This script is used to generate the Test Configuration file for Storage live tests. +# It is invoked by the https://github.com/Azure/azure-sdk-for-python/blob/master/eng/common/TestResources/New-TestResources.ps1 +# script after the ARM template, defined in https://github.com/Azure/azure-sdk-for-net/blob/arm-template-storage/sdk/storage/test-resources.json, +# is finished being deployed. The ARM template is responsible for creating the Storage accounts needed for live tests. + +param ( + [hashtable] $DeploymentOutputs, + [string] $TenantId, + [string] $TestApplicationId, + [string] $TestApplicationSecret +) + +# outputs from the ARM deployment passed in from New-TestResources +$StorageAccountName = $DeploymentOutputs['REMOTERENDERING_ARR_STORAGE_ACCOUNT_NAME'] +$StorageAccountKey = $DeploymentOutputs['REMOTERENDERING_ARR_STORAGE_ACCOUNT_KEY'] +$BlobContainerName = $DeploymentOutputs['REMOTERENDERING_ARR_BLOB_CONTAINER_NAME'] + +$LocalFilePath = Join-Path $PSScriptRoot "TestResources\testBox.fbx" +$TargetBlob = "Input/testBox.fbx" + +Write-Verbose ( "Copying test asset to blob storage") + +$StorageContext = New-AzStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey + +$blob = Set-AzStorageBlobContent -File $LocalFilePath -Blob $TargetBlob -Container $BlobContainerName -Context $StorageContext -Force + +Write-Verbose ("Test asset successfully copied to blob storage") diff --git a/sdk/remoterendering/test-resources.json b/sdk/remoterendering/test-resources.json new file mode 100644 index 000000000000..441732ff8796 --- /dev/null +++ b/sdk/remoterendering/test-resources.json @@ -0,0 +1,121 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "type": "string", + "defaultValue": "[resourceGroup().name]", + "metadata": { + "description": "The base resource name." + } + }, + "tenantId": { + "type": "string", + "defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "metadata": { + "description": "The tenant ID to which the application and resources belong." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "The location of the resource. By default, this is the same as the resource group." + } + }, + "baseTime": { + "type": "string", + "defaultValue": "[utcNow('u')]" + } + }, + "variables": { + "apiVersion": "2020-05-01", + "arrApiVersion": "2020-04-06-preview", + "arrAccountName": "[concat(parameters('baseName'), '-arr-account')]", + "storageApiVersion": "2019-06-01", + "storageAccountName": "[parameters('baseName')]", + "blobContainerName": "test", + "blobContainerResourceName": "[concat(variables('storageAccountName'), '/default/', variables('blobContainerName'))]", + "sasProperties": { + "signedPermission": "rwl", + "signedExpiry": "[dateTimeAdd(parameters('baseTime'), 'P1D')]", + "signedResource": "c", + "canonicalizedResource": "[concat('/blob/', variables('storageAccountName'), '/', variables('blobContainerName'))]" + } + }, + "resources": [ + { + "type": "Microsoft.MixedReality/remoteRenderingAccounts", + "name": "[variables('arrAccountName')]", + "apiVersion": "[variables('arrApiVersion')]", + "location": "[parameters('location')]", + "properties": {}, + "identity": { "type": "systemAssigned" } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('storageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_RAGRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "supportsHttpsTrafficOnly": true, + "encryption": { + "keySource": "Microsoft.Storage", + "services": { + "blob": { + "enabled": true + } + }, + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "[variables('storageApiVersion')]", + "name": "[variables('blobContainerResourceName')]", + "dependsOn": [ + "[variables('storageAccountName')]" + ] + } + ], + "outputs": { + "REMOTERENDERING_ARR_ACCOUNT_ID": { + "type": "string", + "value": "[reference(variables('arrAccountName')).accountId]" + }, + "REMOTERENDERING_ARR_ACCOUNT_DOMAIN": { + "type": "string", + "value": "[reference(variables('arrAccountName')).accountDomain]" + }, + "REMOTERENDERING_ARR_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.MixedReality/remoteRenderingAccounts', variables('arrAccountName')), variables('arrApiVersion')).primaryKey]" + }, + "REMOTERENDERING_ARR_STORAGE_ACCOUNT_NAME": { + "type": "string", + "value": "[variables('storageAccountName')]" + }, + "REMOTERENDERING_ARR_STORAGE_ACCOUNT_KEY": { + "type": "string", + "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName')), variables('storageApiVersion')).keys[0].value]" + }, + "REMOTERENDERING_ARR_BLOB_CONTAINER_NAME": { + "type": "string", + "value": "[variables('blobContainerName')]" + }, + "REMOTERENDERING_ARR_SAS_TOKEN": { + "type": "string", + "value": "[listServiceSas(variables('storageAccountName'), variables('storageApiVersion'), variables('sasProperties')).serviceSasToken]" + }, + "REMOTERENDERING_ARR_SERVICE_ENDPOINT": { + "type": "string", + "value": "[concat('https://remoterendering.', parameters('location'), '.mixedreality.azure.com')]" + } + } +} \ No newline at end of file diff --git a/sdk/remoterendering/tests.yml b/sdk/remoterendering/tests.yml new file mode 100644 index 000000000000..3c289561e12e --- /dev/null +++ b/sdk/remoterendering/tests.yml @@ -0,0 +1,13 @@ +trigger: none + +stages: + - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml + parameters: + ServiceDirectory: remoterendering + EnvVars: + AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) + AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) + TEST_MODE: 'RunLiveNoRecord' + AZURE_SKIP_LIVE_RECORDING: 'True' + AZURE_TEST_RUN_LIVE: 'true' diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/CHANGELOG.md b/sdk/resourceconnector/azure-mgmt-resourceconnector/CHANGELOG.md new file mode 100644 index 000000000000..0525db150dbe --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/CHANGELOG.md @@ -0,0 +1,5 @@ +# Release History + +## 1.0.0b1 (2021-11-12) + +* Initial Release diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/LICENSE.txt b/sdk/resourceconnector/azure-mgmt-resourceconnector/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/MANIFEST.in b/sdk/resourceconnector/azure-mgmt-resourceconnector/MANIFEST.in new file mode 100644 index 000000000000..ef61eb0e3527 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/MANIFEST.in @@ -0,0 +1,6 @@ +include _meta.json +recursive-include tests *.py *.yaml +include *.md +include azure/__init__.py +include azure/mgmt/__init__.py +include LICENSE.txt diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/README.md b/sdk/resourceconnector/azure-mgmt-resourceconnector/README.md new file mode 100644 index 000000000000..482f904c8aa0 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/README.md @@ -0,0 +1,27 @@ +# Microsoft Azure SDK for Python + +This is the Microsoft Azure Resourceconnector Management Client Library. +This package has been tested with Python 2.7, 3.6+. +For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). + + +# Usage + + +To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt) + + + +For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/) +Code samples for this package can be found at [Resourceconnector Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com. +Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples) + + +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) +section of the project. + + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-resourceconnector%2FREADME.png) diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/_meta.json b/sdk/resourceconnector/azure-mgmt-resourceconnector/_meta.json new file mode 100644 index 000000000000..2149c6b7cebb --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "f7e5dc7bd9f9982c2044b176fe556982f7202c2b", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/resourceconnector/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/resourceconnector/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/__init__.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/__init__.py new file mode 100644 index 000000000000..8db66d3d0f0f --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/__init__.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/__init__.py new file mode 100644 index 000000000000..8db66d3d0f0f --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__path__ = __import__("pkgutil").extend_path(__path__, __name__) diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/__init__.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/__init__.py new file mode 100644 index 000000000000..e1b52bea343b --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/__init__.py @@ -0,0 +1,19 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._appliances import Appliances +from ._version import VERSION + +__version__ = VERSION +__all__ = ['Appliances'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_appliances.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_appliances.py new file mode 100644 index 000000000000..17bd40a89764 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_appliances.py @@ -0,0 +1,89 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Optional + + from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse + +from ._configuration import AppliancesConfiguration +from .operations import AppliancesOperations +from . import models + + +class Appliances(object): + """The appliances Rest API spec. + + :ivar appliances: AppliancesOperations operations + :vartype appliances: appliances.operations.AppliancesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + base_url=None, # type: Optional[str] + **kwargs # type: Any + ): + # type: (...) -> None + if not base_url: + base_url = 'https://management.azure.com' + self._config = AppliancesConfiguration(credential, subscription_id, **kwargs) + self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.appliances = AppliancesOperations( + self._client, self._config, self._serialize, self._deserialize) + + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> Appliances + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_configuration.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_configuration.py new file mode 100644 index 000000000000..561042ce4dc6 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_configuration.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class AppliancesConfiguration(Configuration): + """Configuration for Appliances. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential, # type: "TokenCredential" + subscription_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(AppliancesConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-10-31-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-resourceconnector/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_metadata.json b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_metadata.json new file mode 100644 index 000000000000..b462cf4eb974 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_metadata.json @@ -0,0 +1,103 @@ +{ + "chosen_version": "2021-10-31-preview", + "total_api_version_list": ["2021-10-31-preview"], + "client": { + "name": "Appliances", + "filename": "_appliances", + "description": "The appliances Rest API spec.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppliancesConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"AppliancesConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "The ID of the target subscription.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "appliances": "AppliancesOperations" + } +} \ No newline at end of file diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_version.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_version.py new file mode 100644 index 000000000000..e5754a47ce68 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/_version.py @@ -0,0 +1,9 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +VERSION = "1.0.0b1" diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/__init__.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/__init__.py new file mode 100644 index 000000000000..388939e4efad --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/__init__.py @@ -0,0 +1,10 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._appliances import Appliances +__all__ = ['Appliances'] diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_appliances.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_appliances.py new file mode 100644 index 000000000000..ac2536660afe --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_appliances.py @@ -0,0 +1,82 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, Optional, TYPE_CHECKING + +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + +from ._configuration import AppliancesConfiguration +from .operations import AppliancesOperations +from .. import models + + +class Appliances(object): + """The appliances Rest API spec. + + :ivar appliances: AppliancesOperations operations + :vartype appliances: appliances.aio.operations.AppliancesOperations + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + base_url: Optional[str] = None, + **kwargs: Any + ) -> None: + if not base_url: + base_url = 'https://management.azure.com' + self._config = AppliancesConfiguration(credential, subscription_id, **kwargs) + self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False + self._deserialize = Deserializer(client_models) + + self.appliances = AppliancesOperations( + self._client, self._config, self._serialize, self._deserialize) + + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "Appliances": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_configuration.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_configuration.py new file mode 100644 index 000000000000..3c3fdb3ac9eb --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/_configuration.py @@ -0,0 +1,67 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class AppliancesConfiguration(Configuration): + """Configuration for Appliances. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :param subscription_id: The ID of the target subscription. + :type subscription_id: str + """ + + def __init__( + self, + credential: "AsyncTokenCredential", + subscription_id: str, + **kwargs: Any + ) -> None: + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + super(AppliancesConfiguration, self).__init__(**kwargs) + + self.credential = credential + self.subscription_id = subscription_id + self.api_version = "2021-10-31-preview" + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'mgmt-resourceconnector/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/__init__.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/__init__.py new file mode 100644 index 000000000000..caf9d7f5a769 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._appliances_operations import AppliancesOperations + +__all__ = [ + 'AppliancesOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_networks_operations.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/_appliances_operations.py similarity index 60% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_networks_operations.py rename to sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/_appliances_operations.py index 5f2c25c20220..9d58f96a2b77 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_virtual_networks_operations.py +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/aio/operations/_appliances_operations.py @@ -21,14 +21,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworksOperations: - """VirtualNetworksOperations async operations. +class AppliancesOperations: + """AppliancesOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~appliances.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -43,154 +43,252 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def _delete_initial( + def list_operations( self, - resource_group_name: str, - virtual_network_name: str, **kwargs: Any - ) -> None: - cls = kwargs.pop('cls', None) # type: ClsType[None] + ) -> AsyncIterable["_models.ApplianceOperationsList"]: + """Lists all available Appliances operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplianceOperationsList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~appliances.models.ApplianceOperationsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplianceOperationsList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-10-31-preview" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApplianceOperationsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_operations.metadata = {'url': '/providers/Microsoft.ResourceConnector/operations'} # type: ignore + + def list_by_subscription( + self, + **kwargs: Any + ) -> AsyncIterable["_models.ApplianceListResult"]: + """Gets a list of Appliances in a subscription. + + Gets a list of Appliances in the specified subscription. The operation returns properties of + each Appliance. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplianceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~appliances.models.ApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } - url = self._client.format_url(url, **path_format_arguments) + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-31-preview" + accept = "application/json" - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApplianceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - if cls: - return cls(pipeline_response, None, {}) + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - async def begin_delete( + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/appliances'} # type: ignore + + def list_by_resource_group( self, resource_group_name: str, - virtual_network_name: str, **kwargs: Any - ) -> AsyncLROPoller[None]: - """Deletes the specified virtual network. + ) -> AsyncIterable["_models.ApplianceListResult"]: + """Gets a list of Appliances in the specified subscription and resource group. + + Gets a list of Appliances in the specified subscription and resource group. The operation + returns properties of each Appliance. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :return: An iterator like instance of either ApplianceListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~appliances.models.ApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = await self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - cls=lambda x,y,z: x, - **kwargs - ) + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-31-preview" + accept = "application/json" - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_long_running_output(pipeline_response): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('ApplianceListResult', pipeline_response) + list_of_elem = deserialized.value if cls: - return cls(pipeline_response, None, {}) + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } + async def get_next(next_link=None): + request = prepare_request(next_link) - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = AsyncNoPolling() - else: polling_method = polling - if cont_token: - return AsyncLROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances'} # type: ignore async def get( self, resource_group_name: str, - virtual_network_name: str, - expand: Optional[str] = None, + resource_name: str, **kwargs: Any - ) -> "_models.VirtualNetwork": - """Gets the specified virtual network by resource group. + ) -> "_models.Appliance": + """Gets an Appliance. + + Gets the details of an Appliance with a specified resource group and name. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param expand: Expands referenced resources. - :type expand: str + :param resource_name: Appliances name. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.VirtualNetwork + :return: Appliance, or the result of cls(response) + :rtype: ~appliances.models.Appliance :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Appliance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-10-31-preview" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -202,38 +300,39 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore async def _create_or_update_initial( self, resource_group_name: str, - virtual_network_name: str, - parameters: "_models.VirtualNetwork", + resource_name: str, + parameters: "_models.Appliance", **kwargs: Any - ) -> "_models.VirtualNetwork": - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + ) -> "_models.Appliance": + cls = kwargs.pop('cls', None) # type: ClsType["_models.Appliance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-10-31-preview" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -247,7 +346,7 @@ async def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetwork') + body_content = self._serialize.body(parameters, 'Appliance') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -255,47 +354,50 @@ async def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore async def begin_create_or_update( self, resource_group_name: str, - virtual_network_name: str, - parameters: "_models.VirtualNetwork", + resource_name: str, + parameters: "_models.Appliance", **kwargs: Any - ) -> AsyncLROPoller["_models.VirtualNetwork"]: - """Creates or updates a virtual network in the specified resource group. + ) -> AsyncLROPoller["_models.Appliance"]: + """Creates or updates an Appliance. - :param resource_group_name: The name of the resource group. + Creates or updates an Appliance in the specified Subscription and Resource Group. + + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VirtualNetwork + :param resource_name: Appliances name. + :type resource_name: str + :param parameters: Parameters supplied to create or update an Appliance. + :type parameters: ~appliances.models.Appliance :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncLROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetwork] + :return: An instance of AsyncLROPoller that returns either Appliance or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~appliances.models.Appliance] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Appliance"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -304,7 +406,7 @@ async def begin_create_or_update( if cont_token is None: raw_result = await self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -314,19 +416,19 @@ async def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } - if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -338,277 +440,248 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore - def list_all( + async def _delete_initial( self, + resource_group_name: str, + resource_name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkListResult"]: - """Gets all virtual networks in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-10-31-preview" + accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - async def get_next(next_link=None): - request = prepare_request(next_link) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return pipeline_response + if cls: + return cls(pipeline_response, None, {}) - return AsyncItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore - def list( + async def begin_delete( self, resource_group_name: str, + resource_name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkListResult"]: - """Gets all virtual networks in a resource group. + ) -> AsyncLROPoller[None]: + """Deletes an Appliance. - :param resource_group_name: The name of the resource group. + Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. + + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :param resource_name: Appliances name. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListResult', pipeline_response) - list_of_elem = deserialized.value + def get_long_running_output(pipeline_response): if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) - - async def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + return cls(pipeline_response, None, {}) - return pipeline_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - return AsyncItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks'} # type: ignore + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore - async def check_ip_address_availability( + async def update( self, resource_group_name: str, - virtual_network_name: str, - ip_address: Optional[str] = None, + resource_name: str, + tags: Optional[Dict[str, str]] = None, **kwargs: Any - ) -> "_models.IPAddressAvailabilityResult": - """Checks whether a private IP address is available for use. + ) -> "_models.Appliance": + """Updates an Appliance. + + Updates an Appliance with the specified Resource Name in the specified Resource Group and + Subscription. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param ip_address: The private IP address to be verified. - :type ip_address: str + :param resource_name: Appliances name. + :type resource_name: str + :param tags: Resource tags. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response - :return: IPAddressAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.IPAddressAvailabilityResult + :return: Appliance, or the result of cls(response) + :rtype: ~appliances.models.Appliance :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.IPAddressAvailabilityResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Appliance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + + _parameters = _models.PatchableAppliance(tags=tags) + api_version = "2021-10-31-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.check_ip_address_availability.metadata['url'] # type: ignore + url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - if ip_address is not None: - query_parameters['ipAddress'] = self._serialize.query("ip_address", ip_address, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_parameters, 'PatchableAppliance') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('IPAddressAvailabilityResult', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_ip_address_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore - def list_usage( + async def list_cluster_user_credential( self, resource_group_name: str, - virtual_network_name: str, + resource_name: str, **kwargs: Any - ) -> AsyncIterable["_models.VirtualNetworkListUsageResult"]: - """Lists usage stats. + ) -> "_models.ApplianceListCredentialResults": + """Returns the cluster user credential. - :param resource_group_name: The name of the resource group. + Returns the cluster user credentials for the dedicated appliance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param resource_name: Appliances name. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListUsageResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkListUsageResult] + :return: ApplianceListCredentialResults, or the result of cls(response) + :rtype: ~appliances.models.ApplianceListCredentialResults :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListUsageResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplianceListCredentialResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + api_version = "2021-10-31-preview" + accept = "application/json" - if not next_link: - # Construct URL - url = self.list_usage.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.list_cluster_user_credential.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - async def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListUsageResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, AsyncList(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - async def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('ApplianceListCredentialResults', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return AsyncItemPaged( - get_next, extract_data - ) - list_usage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages'} # type: ignore + return deserialized + list_cluster_user_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential'} # type: ignore diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/__init__.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/__init__.py new file mode 100644 index 000000000000..31329eb0c527 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/__init__.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Appliance + from ._models_py3 import ApplianceCredentialKubeconfig + from ._models_py3 import ApplianceListCredentialResults + from ._models_py3 import ApplianceListResult + from ._models_py3 import ApplianceOperation + from ._models_py3 import ApplianceOperationsList + from ._models_py3 import AppliancePropertiesInfrastructureConfig + from ._models_py3 import ErrorAdditionalInfo + from ._models_py3 import ErrorDetail + from ._models_py3 import ErrorResponse + from ._models_py3 import HybridConnectionConfig + from ._models_py3 import Identity + from ._models_py3 import PatchableAppliance + from ._models_py3 import Resource + from ._models_py3 import SystemData + from ._models_py3 import TrackedResource +except (SyntaxError, ImportError): + from ._models import Appliance # type: ignore + from ._models import ApplianceCredentialKubeconfig # type: ignore + from ._models import ApplianceListCredentialResults # type: ignore + from ._models import ApplianceListResult # type: ignore + from ._models import ApplianceOperation # type: ignore + from ._models import ApplianceOperationsList # type: ignore + from ._models import AppliancePropertiesInfrastructureConfig # type: ignore + from ._models import ErrorAdditionalInfo # type: ignore + from ._models import ErrorDetail # type: ignore + from ._models import ErrorResponse # type: ignore + from ._models import HybridConnectionConfig # type: ignore + from ._models import Identity # type: ignore + from ._models import PatchableAppliance # type: ignore + from ._models import Resource # type: ignore + from ._models import SystemData # type: ignore + from ._models import TrackedResource # type: ignore + +from ._appliances_enums import ( + AccessProfileType, + CreatedByType, + Distro, + Provider, + ResourceIdentityType, + Status, +) + +__all__ = [ + 'Appliance', + 'ApplianceCredentialKubeconfig', + 'ApplianceListCredentialResults', + 'ApplianceListResult', + 'ApplianceOperation', + 'ApplianceOperationsList', + 'AppliancePropertiesInfrastructureConfig', + 'ErrorAdditionalInfo', + 'ErrorDetail', + 'ErrorResponse', + 'HybridConnectionConfig', + 'Identity', + 'PatchableAppliance', + 'Resource', + 'SystemData', + 'TrackedResource', + 'AccessProfileType', + 'CreatedByType', + 'Distro', + 'Provider', + 'ResourceIdentityType', + 'Status', +] diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_appliances_enums.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_appliances_enums.py new file mode 100644 index 000000000000..54f2b7855dc4 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_appliances_enums.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessProfileType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name which contains the role of the kubeconfig. + """ + + CLUSTER_USER = "clusterUser" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" + +class Distro(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Represents a supported Fabric/Infra. (AKSEdge etc...). + """ + + AKS_EDGE = "AKSEdge" + +class Provider(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Information about the connected appliance. + """ + + VM_WARE = "VMWare" + HCI = "HCI" + SCVMM = "SCVMM" + +class ResourceIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The identity type. + """ + + SYSTEM_ASSIGNED = "SystemAssigned" + NONE = "None" + +class Status(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Appliance’s health and state of connection to on-prem + """ + + WAITING_FOR_HEARTBEAT = "WaitingForHeartbeat" + VALIDATING = "Validating" + CONNECTED = "Connected" + RUNNING = "Running" diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_models.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_models.py new file mode 100644 index 000000000000..018ebe5ab293 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_models.py @@ -0,0 +1,598 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + + 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. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.location = kwargs['location'] + + +class Appliance(TrackedResource): + """Appliances definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + :param identity: Identity for the resource. + :type identity: ~appliances.models.Identity + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~appliances.models.SystemData + :param distro: Represents a supported Fabric/Infra. (AKSEdge etc...). Possible values include: + "AKSEdge". Default value: "AKSEdge". + :type distro: str or ~appliances.models.Distro + :param infrastructure_config: Contains infrastructure information about the Appliance. + :type infrastructure_config: ~appliances.models.AppliancePropertiesInfrastructureConfig + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param public_key: Certificates pair used to download MSI certificate from HIS. + :type public_key: str + :ivar status: Appliance’s health and state of connection to on-prem. Possible values include: + "WaitingForHeartbeat", "Validating", "Connected", "Running". + :vartype status: str or ~appliances.models.Status + :ivar version: Version of the Appliance. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'distro': {'key': 'properties.distro', 'type': 'str'}, + 'infrastructure_config': {'key': 'properties.infrastructureConfig', 'type': 'AppliancePropertiesInfrastructureConfig'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'public_key': {'key': 'properties.publicKey', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Appliance, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) + self.system_data = None + self.distro = kwargs.get('distro', "AKSEdge") + self.infrastructure_config = kwargs.get('infrastructure_config', None) + self.provisioning_state = None + self.public_key = kwargs.get('public_key', None) + self.status = None + self.version = None + + +class ApplianceCredentialKubeconfig(msrest.serialization.Model): + """Cluster User Credential appliance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name which contains the role of the kubeconfig. Possible values include: + "clusterUser". + :vartype name: str or ~appliances.models.AccessProfileType + :ivar value: Contains the kubeconfig value. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceCredentialKubeconfig, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ApplianceListCredentialResults(msrest.serialization.Model): + """The List Cluster User Credential appliance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Listener” access + token from notification service (NS). + :vartype hybrid_connection_config: ~appliances.models.HybridConnectionConfig + :ivar kubeconfigs: The list of appliance kubeconfigs. + :vartype kubeconfigs: list[~appliances.models.ApplianceCredentialKubeconfig] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[ApplianceCredentialKubeconfig]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceListCredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + +class ApplianceListResult(msrest.serialization.Model): + """The List Appliances operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar next_link: The URL to use for getting the next set of results. + :vartype next_link: str + :ivar value: The list of Appliances. + :vartype value: list[~appliances.models.Appliance] + """ + + _validation = { + 'next_link': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Appliance]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceListResult, self).__init__(**kwargs) + self.next_link = None + self.value = None + + +class ApplianceOperation(msrest.serialization.Model): + """Appliances operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar is_data_action: Is this Operation a data plane operation. + :vartype is_data_action: bool + :ivar name: The name of the compute operation. + :vartype name: str + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar description: The description of the operation. + :vartype description: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + """ + + _validation = { + 'is_data_action': {'readonly': True}, + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + 'description': {'readonly': True}, + 'operation': {'readonly': True}, + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + } + + _attribute_map = { + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceOperation, self).__init__(**kwargs) + self.is_data_action = None + self.name = None + self.origin = None + self.description = None + self.operation = None + self.provider = None + self.resource = None + + +class ApplianceOperationsList(msrest.serialization.Model): + """Lists of Appliances operations. + + All required parameters must be populated in order to send to Azure. + + :param next_link: Next page of operations. + :type next_link: str + :param value: Required. Array of applianceOperation. + :type value: list[~appliances.models.ApplianceOperation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ApplianceOperation]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceOperationsList, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.value = kwargs['value'] + + +class AppliancePropertiesInfrastructureConfig(msrest.serialization.Model): + """Contains infrastructure information about the Appliance. + + :param provider: Information about the connected appliance. Possible values include: "VMWare", + "HCI", "SCVMM". + :type provider: str or ~appliances.models.Provider + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AppliancePropertiesInfrastructureConfig, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~appliances.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~appliances.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~appliances.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) + + +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Listener” access token from notification service (NS). + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the notification service. + :vartype relay: str + :ivar token: Listener access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class Identity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: "SystemAssigned", "None". + :type type: str or ~appliances.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = kwargs.get('type', None) + + +class PatchableAppliance(msrest.serialization.Model): + """The Appliances patchable resource definition. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(PatchableAppliance, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + + +class SystemData(msrest.serialization.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 ~appliances.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~appliances.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **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) diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_models_py3.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_models_py3.py new file mode 100644 index 000000000000..22f5443a559c --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/models/_models_py3.py @@ -0,0 +1,631 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._appliances_enums import * + + +class Resource(msrest.serialization.Model): + """Common fields that are returned in the response for all Azure Resource Manager resources. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + + +class TrackedResource(Resource): + """The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location'. + + 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. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(TrackedResource, self).__init__(**kwargs) + self.tags = tags + self.location = location + + +class Appliance(TrackedResource): + """Appliances definition. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + :param identity: Identity for the resource. + :type identity: ~appliances.models.Identity + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~appliances.models.SystemData + :param distro: Represents a supported Fabric/Infra. (AKSEdge etc...). Possible values include: + "AKSEdge". Default value: "AKSEdge". + :type distro: str or ~appliances.models.Distro + :param infrastructure_config: Contains infrastructure information about the Appliance. + :type infrastructure_config: ~appliances.models.AppliancePropertiesInfrastructureConfig + :ivar provisioning_state: The current deployment or provisioning state, which only appears in + the response. + :vartype provisioning_state: str + :param public_key: Certificates pair used to download MSI certificate from HIS. + :type public_key: str + :ivar status: Appliance’s health and state of connection to on-prem. Possible values include: + "WaitingForHeartbeat", "Validating", "Connected", "Running". + :vartype status: str or ~appliances.models.Status + :ivar version: Version of the Appliance. + :vartype version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'required': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'status': {'readonly': True}, + 'version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'distro': {'key': 'properties.distro', 'type': 'str'}, + 'infrastructure_config': {'key': 'properties.infrastructureConfig', 'type': 'AppliancePropertiesInfrastructureConfig'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'public_key': {'key': 'properties.publicKey', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'version': {'key': 'properties.version', 'type': 'str'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + identity: Optional["Identity"] = None, + distro: Optional[Union[str, "Distro"]] = "AKSEdge", + infrastructure_config: Optional["AppliancePropertiesInfrastructureConfig"] = None, + public_key: Optional[str] = None, + **kwargs + ): + super(Appliance, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.system_data = None + self.distro = distro + self.infrastructure_config = infrastructure_config + self.provisioning_state = None + self.public_key = public_key + self.status = None + self.version = None + + +class ApplianceCredentialKubeconfig(msrest.serialization.Model): + """Cluster User Credential appliance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Name which contains the role of the kubeconfig. Possible values include: + "clusterUser". + :vartype name: str or ~appliances.models.AccessProfileType + :ivar value: Contains the kubeconfig value. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceCredentialKubeconfig, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ApplianceListCredentialResults(msrest.serialization.Model): + """The List Cluster User Credential appliance. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hybrid_connection_config: Contains the REP (rendezvous endpoint) and “Listener” access + token from notification service (NS). + :vartype hybrid_connection_config: ~appliances.models.HybridConnectionConfig + :ivar kubeconfigs: The list of appliance kubeconfigs. + :vartype kubeconfigs: list[~appliances.models.ApplianceCredentialKubeconfig] + """ + + _validation = { + 'hybrid_connection_config': {'readonly': True}, + 'kubeconfigs': {'readonly': True}, + } + + _attribute_map = { + 'hybrid_connection_config': {'key': 'hybridConnectionConfig', 'type': 'HybridConnectionConfig'}, + 'kubeconfigs': {'key': 'kubeconfigs', 'type': '[ApplianceCredentialKubeconfig]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceListCredentialResults, self).__init__(**kwargs) + self.hybrid_connection_config = None + self.kubeconfigs = None + + +class ApplianceListResult(msrest.serialization.Model): + """The List Appliances operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar next_link: The URL to use for getting the next set of results. + :vartype next_link: str + :ivar value: The list of Appliances. + :vartype value: list[~appliances.models.Appliance] + """ + + _validation = { + 'next_link': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[Appliance]'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceListResult, self).__init__(**kwargs) + self.next_link = None + self.value = None + + +class ApplianceOperation(msrest.serialization.Model): + """Appliances operation. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar is_data_action: Is this Operation a data plane operation. + :vartype is_data_action: bool + :ivar name: The name of the compute operation. + :vartype name: str + :ivar origin: The origin of the compute operation. + :vartype origin: str + :ivar description: The description of the operation. + :vartype description: str + :ivar operation: The display name of the compute operation. + :vartype operation: str + :ivar provider: The resource provider for the operation. + :vartype provider: str + :ivar resource: The display name of the resource the operation applies to. + :vartype resource: str + """ + + _validation = { + 'is_data_action': {'readonly': True}, + 'name': {'readonly': True}, + 'origin': {'readonly': True}, + 'description': {'readonly': True}, + 'operation': {'readonly': True}, + 'provider': {'readonly': True}, + 'resource': {'readonly': True}, + } + + _attribute_map = { + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'name': {'key': 'name', 'type': 'str'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'description': {'key': 'display.description', 'type': 'str'}, + 'operation': {'key': 'display.operation', 'type': 'str'}, + 'provider': {'key': 'display.provider', 'type': 'str'}, + 'resource': {'key': 'display.resource', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApplianceOperation, self).__init__(**kwargs) + self.is_data_action = None + self.name = None + self.origin = None + self.description = None + self.operation = None + self.provider = None + self.resource = None + + +class ApplianceOperationsList(msrest.serialization.Model): + """Lists of Appliances operations. + + All required parameters must be populated in order to send to Azure. + + :param next_link: Next page of operations. + :type next_link: str + :param value: Required. Array of applianceOperation. + :type value: list[~appliances.models.ApplianceOperation] + """ + + _validation = { + 'value': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'value': {'key': 'value', 'type': '[ApplianceOperation]'}, + } + + def __init__( + self, + *, + value: List["ApplianceOperation"], + next_link: Optional[str] = None, + **kwargs + ): + super(ApplianceOperationsList, self).__init__(**kwargs) + self.next_link = next_link + self.value = value + + +class AppliancePropertiesInfrastructureConfig(msrest.serialization.Model): + """Contains infrastructure information about the Appliance. + + :param provider: Information about the connected appliance. Possible values include: "VMWare", + "HCI", "SCVMM". + :type provider: str or ~appliances.models.Provider + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[Union[str, "Provider"]] = None, + **kwargs + ): + super(AppliancePropertiesInfrastructureConfig, self).__init__(**kwargs) + self.provider = provider + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~appliances.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~appliances.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~appliances.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class HybridConnectionConfig(msrest.serialization.Model): + """Contains the REP (rendezvous endpoint) and “Listener” access token from notification service (NS). + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_time: Timestamp when this token will be expired. + :vartype expiration_time: long + :ivar hybrid_connection_name: Name of the connection. + :vartype hybrid_connection_name: str + :ivar relay: Name of the notification service. + :vartype relay: str + :ivar token: Listener access token. + :vartype token: str + """ + + _validation = { + 'expiration_time': {'readonly': True}, + 'hybrid_connection_name': {'readonly': True}, + 'relay': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_time': {'key': 'expirationTime', 'type': 'long'}, + 'hybrid_connection_name': {'key': 'hybridConnectionName', 'type': 'str'}, + 'relay': {'key': 'relay', 'type': 'str'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HybridConnectionConfig, self).__init__(**kwargs) + self.expiration_time = None + self.hybrid_connection_name = None + self.relay = None + self.token = None + + +class Identity(msrest.serialization.Model): + """Identity for the resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar principal_id: The principal ID of resource identity. + :vartype principal_id: str + :ivar tenant_id: The tenant ID of resource. + :vartype tenant_id: str + :param type: The identity type. Possible values include: "SystemAssigned", "None". + :type type: str or ~appliances.models.ResourceIdentityType + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "ResourceIdentityType"]] = None, + **kwargs + ): + super(Identity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + + +class PatchableAppliance(msrest.serialization.Model): + """The Appliances patchable resource definition. + + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + *, + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(PatchableAppliance, self).__init__(**kwargs) + self.tags = tags + + +class SystemData(msrest.serialization.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 ~appliances.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~appliances.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/__init__.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/__init__.py new file mode 100644 index 000000000000..caf9d7f5a769 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._appliances_operations import AppliancesOperations + +__all__ = [ + 'AppliancesOperations', +] diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_networks_operations.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/_appliances_operations.py similarity index 59% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_networks_operations.py rename to sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/_appliances_operations.py index bc6d1b0969fb..3551702c6cea 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/_virtual_networks_operations.py +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/operations/_appliances_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class VirtualNetworksOperations(object): - """VirtualNetworksOperations operations. +class AppliancesOperations(object): + """AppliancesOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~appliances.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,157 +47,256 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def list_operations( self, - resource_group_name, # type: str - virtual_network_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Iterable["_models.ApplianceOperationsList"] + """Lists all available Appliances operations. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplianceOperationsList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~appliances.models.ApplianceOperationsList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplianceOperationsList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-10-31-preview" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_operations.metadata['url'] # type: ignore + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApplianceOperationsList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_operations.metadata = {'url': '/providers/Microsoft.ResourceConnector/operations'} # type: ignore + + def list_by_subscription( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ApplianceListResult"] + """Gets a list of Appliances in a subscription. + + Gets a list of Appliances in the specified subscription. The operation returns properties of + each Appliance. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ApplianceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~appliances.models.ApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } - url = self._client.format_url(url, **path_format_arguments) + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-31-preview" + accept = "application/json" - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + if not next_link: + # Construct URL + url = self.list_by_subscription.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def extract_data(pipeline_response): + deserialized = self._deserialize('ApplianceListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - if cls: - return cls(pipeline_response, None, {}) + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - def begin_delete( + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/appliances'} # type: ignore + + def list_by_resource_group( self, resource_group_name, # type: str - virtual_network_name, # type: str **kwargs # type: Any ): - # type: (...) -> LROPoller[None] - """Deletes the specified virtual network. + # type: (...) -> Iterable["_models.ApplianceListResult"] + """Gets a list of Appliances in the specified subscription and resource group. + + Gets a list of Appliances in the specified subscription and resource group. The operation + returns properties of each Appliance. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :return: An iterator like instance of either ApplianceListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~appliances.models.ApplianceListResult] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval - ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - cls=lambda x,y,z: x, - **kwargs - ) + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplianceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-31-preview" + accept = "application/json" - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_long_running_output(pipeline_response): + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ApplianceListResult', pipeline_response) + list_of_elem = deserialized.value if cls: - return cls(pipeline_response, None, {}) + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } + def get_next(next_link=None): + request = prepare_request(next_link) - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances'} # type: ignore def get( self, resource_group_name, # type: str - virtual_network_name, # type: str - expand=None, # type: Optional[str] + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetwork" - """Gets the specified virtual network by resource group. + # type: (...) -> "_models.Appliance" + """Gets an Appliance. - :param resource_group_name: The name of the resource group. + Gets the details of an Appliance with a specified resource group and name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param expand: Expands referenced resources. - :type expand: str + :param resource_name: Appliances name. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: VirtualNetwork, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.VirtualNetwork + :return: Appliance, or the result of cls(response) + :rtype: ~appliances.models.Appliance :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Appliance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-10-31-preview" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -209,39 +308,40 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore def _create_or_update_initial( self, resource_group_name, # type: str - virtual_network_name, # type: str - parameters, # type: "_models.VirtualNetwork" + resource_name, # type: str + parameters, # type: "_models.Appliance" **kwargs # type: Any ): - # type: (...) -> "_models.VirtualNetwork" - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + # type: (...) -> "_models.Appliance" + cls = kwargs.pop('cls', None) # type: ClsType["_models.Appliance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" + api_version = "2021-10-31-preview" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) @@ -255,7 +355,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'VirtualNetwork') + body_content = self._serialize.body(parameters, 'Appliance') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -263,48 +363,51 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore def begin_create_or_update( self, resource_group_name, # type: str - virtual_network_name, # type: str - parameters, # type: "_models.VirtualNetwork" + resource_name, # type: str + parameters, # type: "_models.Appliance" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.VirtualNetwork"] - """Creates or updates a virtual network in the specified resource group. + # type: (...) -> LROPoller["_models.Appliance"] + """Creates or updates an Appliance. + + Creates or updates an Appliance in the specified Subscription and Resource Group. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param parameters: Parameters supplied to the create or update virtual network operation. - :type parameters: ~azure.mgmt.network.v2017_08_01.models.VirtualNetwork + :param resource_name: Appliances name. + :type resource_name: str + :param parameters: Parameters supplied to create or update an Appliance. + :type parameters: ~appliances.models.Appliance :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either VirtualNetwork or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_08_01.models.VirtualNetwork] + :return: An instance of LROPoller that returns either Appliance or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~appliances.models.Appliance] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Appliance"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -313,7 +416,7 @@ def begin_create_or_update( if cont_token is None: raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, + resource_name=resource_name, parameters=parameters, cls=lambda x,y,z: x, **kwargs @@ -323,19 +426,19 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('VirtualNetwork', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -347,281 +450,252 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore - def list_all( + def _delete_initial( self, + resource_group_name, # type: str + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkListResult"] - """Gets all virtual networks in a subscription. - - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-10-31-preview" + accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_all.metadata['url'] # type: ignore - path_format_arguments = { - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) - def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - def get_next(next_link=None): - request = prepare_request(next_link) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + if response.status_code not in [202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - return pipeline_response + if cls: + return cls(pipeline_response, None, {}) - return ItemPaged( - get_next, extract_data - ) - list_all.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualNetworks'} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore - def list( + def begin_delete( self, resource_group_name, # type: str + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkListResult"] - """Gets all virtual networks in a resource group. + # type: (...) -> LROPoller[None] + """Deletes an Appliance. + + Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :param resource_name: Appliances name. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkListResult] - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" - - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - 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'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) - def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListResult', pipeline_response) - list_of_elem = deserialized.value + def get_long_running_output(pipeline_response): if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) - - def get_next(next_link=None): - request = prepare_request(next_link) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + return cls(pipeline_response, None, {}) - return pipeline_response + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } - return ItemPaged( - get_next, extract_data - ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks'} # type: ignore + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore - def check_ip_address_availability( + def update( self, resource_group_name, # type: str - virtual_network_name, # type: str - ip_address=None, # type: Optional[str] + resource_name, # type: str + tags=None, # type: Optional[Dict[str, str]] **kwargs # type: Any ): - # type: (...) -> "_models.IPAddressAvailabilityResult" - """Checks whether a private IP address is available for use. + # type: (...) -> "_models.Appliance" + """Updates an Appliance. + + Updates an Appliance with the specified Resource Name in the specified Resource Group and + Subscription. - :param resource_group_name: The name of the resource group. + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param ip_address: The private IP address to be verified. - :type ip_address: str + :param resource_name: Appliances name. + :type resource_name: str + :param tags: Resource tags. + :type tags: dict[str, str] :keyword callable cls: A custom type or function that will be passed the direct response - :return: IPAddressAvailabilityResult, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_08_01.models.IPAddressAvailabilityResult + :return: Appliance, or the result of cls(response) + :rtype: ~appliances.models.Appliance :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.IPAddressAvailabilityResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.Appliance"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + + _parameters = _models.PatchableAppliance(tags=tags) + api_version = "2021-10-31-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL - url = self.check_ip_address_availability.metadata['url'] # type: ignore + url = self.update.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] - if ip_address is not None: - query_parameters['ipAddress'] = self._serialize.query("ip_address", ip_address, 'str') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - request = self._client.get(url, query_parameters, header_parameters) + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(_parameters, 'PatchableAppliance') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('IPAddressAvailabilityResult', pipeline_response) + deserialized = self._deserialize('Appliance', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - check_ip_address_availability.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/CheckIPAddressAvailability'} # type: ignore + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}'} # type: ignore - def list_usage( + def list_cluster_user_credential( self, resource_group_name, # type: str - virtual_network_name, # type: str + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.VirtualNetworkListUsageResult"] - """Lists usage stats. + # type: (...) -> "_models.ApplianceListCredentialResults" + """Returns the cluster user credential. - :param resource_group_name: The name of the resource group. + Returns the cluster user credentials for the dedicated appliance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str + :param resource_name: Appliances name. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either VirtualNetworkListUsageResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_08_01.models.VirtualNetworkListUsageResult] + :return: ApplianceListCredentialResults, or the result of cls(response) + :rtype: ~appliances.models.ApplianceListCredentialResults :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListUsageResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplianceListCredentialResults"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-10-31-preview" + accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_usage.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct URL + url = self.list_cluster_user_credential.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str', max_length=63, min_length=1, pattern=r'^[a-zA-Z0-9]$|^[a-zA-Z0-9][-_a-zA-Z0-9]{0,61}[a-zA-Z0-9]$'), + } + url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('VirtualNetworkListUsageResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def get_next(next_link=None): - request = prepare_request(next_link) + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + deserialized = self._deserialize('ApplianceListCredentialResults', pipeline_response) - return pipeline_response + if cls: + return cls(pipeline_response, deserialized, {}) - return ItemPaged( - get_next, extract_data - ) - list_usage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/usages'} # type: ignore + return deserialized + list_cluster_user_credential.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential'} # type: ignore diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/py.typed b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/azure/mgmt/resourceconnector/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/sdk_packaging.toml b/sdk/resourceconnector/azure-mgmt-resourceconnector/sdk_packaging.toml new file mode 100644 index 000000000000..565cab7fc0b1 --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/sdk_packaging.toml @@ -0,0 +1,9 @@ +[packaging] +package_name = "azure-mgmt-resourceconnector" +package_nspkg = "azure-mgmt-nspkg" +package_pprint_name = "Resourceconnector Management" +package_doc_id = "" +is_stable = false +is_arm = true +need_msrestazure = false +need_azuremgmtcore = true diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/setup.cfg b/sdk/resourceconnector/azure-mgmt-resourceconnector/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/resourceconnector/azure-mgmt-resourceconnector/setup.py b/sdk/resourceconnector/azure-mgmt-resourceconnector/setup.py new file mode 100644 index 000000000000..02c95214cb8e --- /dev/null +++ b/sdk/resourceconnector/azure-mgmt-resourceconnector/setup.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-resourceconnector" +PACKAGE_PPRINT_NAME = "Resourceconnector Management" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.md', encoding='utf-8') as f: + readme = f.read() +with open('CHANGELOG.md', encoding='utf-8') as f: + changelog = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + changelog, + long_description_content_type='text/markdown', + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), + install_requires=[ + 'msrest>=0.6.21', + 'azure-common~=1.1', + 'azure-mgmt-core>=1.2.0,<2.0.0', + ], + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } +) diff --git a/sdk/resourceconnector/ci.yml b/sdk/resourceconnector/ci.yml new file mode 100644 index 000000000000..d6b1a019fd4a --- /dev/null +++ b/sdk/resourceconnector/ci.yml @@ -0,0 +1,33 @@ +# DO NOT EDIT THIS FILE +# This file is generated automatically and any changes will be lost. + +trigger: + branches: + include: + - main + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/resourceconnector/ + +pr: + branches: + include: + - main + - feature/* + - hotfix/* + - release/* + - restapi* + paths: + include: + - sdk/resourceconnector/ + +extends: + template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml + parameters: + ServiceDirectory: resourceconnector + Artifacts: + - name: azure-mgmt-resourceconnector + safeName: azuremgmtresourceconnector diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/CHANGELOG.md b/sdk/schemaregistry/azure-schemaregistry-avroserializer/CHANGELOG.md index eb4f375965e6..10329729013e 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/CHANGELOG.md +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/CHANGELOG.md @@ -1,14 +1,37 @@ # Release History -## 1.0.0b4 (Unreleased) +## 1.0.0b4 (2021-11-11) ### Features Added +- Async version of `AvroSerializer` has been added under `azure.schemaregistry.serializer.avroserializer.aio`. +- Depends on `azure-schemaregistry>=1.0.0,<2.0.0`. + ### Breaking Changes -### Bugs Fixed +- `SchemaParseError`, `SchemaSerializationError`, and `SchemaDeserializationError` have been introduced under `azure.schemaregistry.serializer.avroserializer.exceptions` and will be raised for corresponding operations. + - `SchemaParseError` and `SchemaSerializationError` may be raised for errors when calling `serialize` on `AvroSerializer`. + - `SchemaParseError` and `SchemaDeserializationError` may be raised for errors when calling `deserialize` on `AvroSerializer`. + +## 1.0.0b3 (2021-10-06) + +### Features Added + +- `auto_register_schemas` keyword argument has been added to `AvroSerializer`, which will allow for automatically registering schemas passed in to the `serialize`, when set to `True`, otherwise `False` by default. +- `value` parameter in `serialize` on `AvroSerializer` takes type `Mapping` rather than `Dict`. +- Depends on `azure-schemaregistry==1.0.0b3`. + +### Breaking Changes -### Other Changes +- `SchemaRegistryAvroSerializer` has been renamed `AvroSerializer`. +- `schema_registry` parameter in the `AvroSerializer` constructor has been renamed `client`. +- `schema_group` parameter in the `AvroSerializer` constructor has been renamed `group_name`. +- `data` parameter in the `serialize` and `deserialize` methods on `AvroSerializer` has been renamed `value`. +- `schema` parameter in the `serialize` method on `AvroSerializer` no longer accepts argument of type `bytes`. +- `AvroSerializer` constructor no longer takes in the `codec` keyword argument. +- The following positional arguments are now required keyword arguments: + - `client` and `group_name` in `AvroSerializer` constructor + - `schema` in `serialize` on `AvroSerializer` ## 1.0.0b3 (2021-10-06) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/MANIFEST.in b/sdk/schemaregistry/azure-schemaregistry-avroserializer/MANIFEST.in index 90e5d6eb2bd7..33df8f2dea60 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/MANIFEST.in +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/MANIFEST.in @@ -1,6 +1,5 @@ include *.md include azure/__init__.py include azure/schemaregistry/__init__.py -include azure/schemaregistry/serializer/__init__.py recursive-include tests *.py -recursive-include samples *.py \ No newline at end of file +recursive-include samples *.py diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/README.md b/sdk/schemaregistry/azure-schemaregistry-avroserializer/README.md index 49f1251ca60c..843d5e28bfdb 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/README.md +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/README.md @@ -27,9 +27,24 @@ To use this package, you must have: * Python 2.7, 3.6 or later - [Install Python][python] ### Authenticate the client -Interaction with Schema Registry Avro Serializer starts with an instance of AvroSerializer class. You need the fully qualified namespace, AAD credential and schema group name to instantiate the client object. +Interaction with the Schema Registry Avro Serializer starts with an instance of AvroSerializer class, which takes the schema group name and the [Schema Registry Client][schemaregistry_client] class. The client constructor takes the Event Hubs fully qualified namespace and and Azure Active Directory credential: -**Create client using the azure-identity library:** +* The fully qualified namespace of the Schema Registry instance should follow the format: `.servicebus.windows.net`. + +* An AAD credential that implements the [TokenCredential][token_credential_interface] protocol should be passed to the constructor. There are implementations of the `TokenCredential` protocol available in the +[azure-identity package][pypi_azure_identity]. To use the credential types provided by `azure-identity`, please install the Azure Identity client library for Python with [pip][pip]: + +```Bash +pip install azure-identity +``` + +* Additionally, to use the async API supported on Python 3.6+, you must first install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/): + +```Bash +pip install aiohttp +``` + +**Create AvroSerializer using the azure-schemaregistry library:** ```python from azure.schemaregistry import SchemaRegistryClient @@ -37,6 +52,7 @@ from azure.schemaregistry.serializer.avroserializer import AvroSerializer from azure.identity import DefaultAzureCredential credential = DefaultAzureCredential() +# Namespace should be similar to: '.servicebus.windows.net' fully_qualified_namespace = '<< FULLY QUALIFIED NAMESPACE OF THE SCHEMA REGISTRY >>' group_name = '<< GROUP NAME OF THE SCHEMA >>' schema_registry_client = SchemaRegistryClient(fully_qualified_namespace, credential) @@ -86,7 +102,7 @@ The following sections provide several code snippets covering some of the most c ### Serialization Use `AvroSerializer.serialize` method to serialize dict data with the given avro schema. -The method would automatically register the schema to the Schema Registry Service and keep the schema cached for future serialization usage. +The method would use a schema previously registered to the Schema Registry service and keep the schema cached for future serialization usage. It is also possible to avoid pre-registering the schema to the service and automatically register with the `serialize` method by instantiating the `AvroSerializer` with the keyword argument `auto_register_schemas=True`. ```python import os @@ -97,11 +113,10 @@ from azure.identity import DefaultAzureCredential token_credential = DefaultAzureCredential() fully_qualified_namespace = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] group_name = "" +name = "example.avro.User" +format = "Avro" -schema_registry_client = SchemaRegistryClient(fully_qualified_namespace, token_credential) -serializer = AvroSerializer(client=schema_registry_client, group_name=group_name) - -schema_string = """ +definition = """ {"namespace": "example.avro", "type": "record", "name": "User", @@ -112,15 +127,19 @@ schema_string = """ ] }""" +schema_registry_client = SchemaRegistryClient(fully_qualified_namespace, token_credential) +schema_register_client.register(group_name, name, definition, format) +serializer = AvroSerializer(client=schema_registry_client, group_name=group_name) + with serializer: dict_data = {"name": "Ben", "favorite_number": 7, "favorite_color": "red"} - encoded_bytes = serializer.serialize(dict_data, schema=schema_string) + encoded_bytes = serializer.serialize(dict_data, schema=definition) ``` ### Deserialization Use `AvroSerializer.deserialize` method to deserialize raw bytes into dict data. -The method would automatically retrieve the schema from the Schema Registry Service and keep the schema cached for future deserialization usage. +The method automatically retrieves the schema from the Schema Registry Service and keeps the schema cached for future deserialization usage. ```python import os @@ -157,7 +176,7 @@ group_name = "" eventhub_connection_str = os.environ['EVENT_HUB_CONN_STR'] eventhub_name = os.environ['EVENT_HUB_NAME'] -schema_string = """ +definition = """ {"namespace": "example.avro", "type": "record", "name": "User", @@ -169,7 +188,7 @@ schema_string = """ }""" schema_registry_client = SchemaRegistryClient(fully_qualified_namespace, token_credential) -avro_serializer = AvroSerializer(client=schema_registry_client, group_name=group_name) +avro_serializer = AvroSerializer(client=schema_registry_client, group_name=group_name, auto_register_schemas=True) eventhub_producer = EventHubProducerClient.from_connection_string( conn_str=eventhub_connection_str, @@ -179,7 +198,7 @@ eventhub_producer = EventHubProducerClient.from_connection_string( with eventhub_producer, avro_serializer: event_data_batch = eventhub_producer.create_batch() dict_data = {"name": "Bob", "favorite_number": 7, "favorite_color": "red"} - payload_bytes = avro_serializer.serialize(dict_data, schema=schema_string) + payload_bytes = avro_serializer.serialize(dict_data, schema=definition) event_data_batch.add(EventData(body=payload_bytes)) eventhub_producer.send_batch(event_data_batch) ``` @@ -287,9 +306,11 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio [azure_sub]: https://azure.microsoft.com/free/ [python_logging]: https://docs.python.org/3/library/logging.html [sr_avro_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples -[api_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-schemaregistry-avroserializer/latest/index.html +[api_reference]: https://docs.microsoft.com/python/api/overview/azure/schemaregistry-avroserializer-readme [source_code]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer [change_log]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/CHANGELOG.md [schemaregistry_client]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry [schemaregistry_service]: https://aka.ms/schemaregistry -[eventhubs_repo]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventhub/azure-eventhub \ No newline at end of file +[eventhubs_repo]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventhub/azure-eventhub +[token_credential_interface]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core/azure/core/credentials.py +[pypi_azure_identity]: https://pypi.org/project/azure-identity/ \ No newline at end of file diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_abstract_avro_serializer.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_abstract_avro_serializer.py new file mode 100644 index 000000000000..77b0dc9bf34d --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_abstract_avro_serializer.py @@ -0,0 +1,65 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from typing import BinaryIO, TypeVar, Union +from abc import abstractmethod + +ObjectType = TypeVar("ObjectType") + +class AbstractAvroObjectSerializer(object): + """ + An Avro serializer used for serializing/deserializing an Avro RecordSchema. + """ + + @abstractmethod + def get_schema_fullname( + self, + schema, # type: str + ): + # type: (str) -> str + """ + Returns the namespace-qualified name of the provided schema. + Schema must be a Avro RecordSchema: + https://avro.apache.org/docs/1.10.0/gettingstartedpython.html#Defining+a+schema + :param schema: An Avro RecordSchema + :type schema: str + :rtype: str + """ + + + @abstractmethod + def serialize( + self, + data, # type: ObjectType + schema, # type: str + ): + # type: (ObjectType, str) -> bytes + """Convert the provided value to it's binary representation and write it to the stream. + Schema must be a Avro RecordSchema: + https://avro.apache.org/docs/1.10.0/gettingstartedpython.html#Defining+a+schema + :param data: An object to serialize + :type data: ObjectType + :param schema: An Avro RecordSchema + :type schema: str + :returns: Encoded bytes + :rtype: bytes + """ + + @abstractmethod + def deserialize( + self, + data, # type: Union[bytes, BinaryIO] + schema, # type: str + ): + # type: (Union[bytes, BinaryIO], str) -> ObjectType + """Read the binary representation into a specific type. + Return type will be ignored, since the schema is deduced from the provided bytes. + :param data: A stream of bytes or bytes directly + :type data: BinaryIO or bytes + :param schema: An Avro RecordSchema + :type schema: str + :returns: An instantiated object + :rtype: ObjectType + """ diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_avro_serializer.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_apache_avro_serializer.py similarity index 62% rename from sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_avro_serializer.py rename to sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_apache_avro_serializer.py index 0f40857e6e93..7f3c07345daf 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_avro_serializer.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_apache_avro_serializer.py @@ -1,28 +1,8 @@ -# -------------------------------------------------------------------------- -# +# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + try: from functools import lru_cache except ImportError: @@ -32,10 +12,12 @@ import avro from avro.io import DatumWriter, DatumReader, BinaryDecoder, BinaryEncoder +from ._abstract_avro_serializer import AbstractAvroObjectSerializer + ObjectType = TypeVar("ObjectType") -class AvroObjectSerializer(object): +class ApacheAvroObjectSerializer(AbstractAvroObjectSerializer): def __init__(self, codec=None): """A Avro serializer using avro lib from Apache. @@ -44,13 +26,21 @@ def __init__(self, codec=None): self._writer_codec = codec @lru_cache(maxsize=128) - def _get_schema_writer(self, schema): # pylint: disable=no-self-use - schema = avro.schema.parse(schema) + def parse_schema(self, schema): # pylint: disable=no-self-use + return avro.schema.parse(schema) + + def get_schema_fullname(self, schema): + parsed_schema = self.parse_schema(schema) + return parsed_schema.fullname + + @lru_cache(maxsize=128) + def get_schema_writer(self, schema): # pylint: disable=no-self-use + schema = self.parse_schema(schema) return DatumWriter(schema) @lru_cache(maxsize=128) - def _get_schema_reader(self, schema): # pylint: disable=no-self-use - schema = avro.schema.parse(schema) + def get_schema_reader(self, schema): # pylint: disable=no-self-use + schema = self.parse_schema(schema) return DatumReader(writers_schema=schema) # pylint: disable=no-self-use @@ -66,14 +56,14 @@ def serialize( :param data: An object to serialize :type data: ObjectType :param schema: An Avro RecordSchema - :type schema: Union[str, bytes, avro.schema.Schema] + :type schema: str :returns: Encoded bytes :rtype: bytes """ if not schema: raise ValueError("Schema is required in Avro serializer.") - writer = self._get_schema_writer(str(schema)) + writer = self.get_schema_writer(schema) stream = BytesIO() with stream: @@ -93,14 +83,14 @@ def deserialize( :param data: A stream of bytes or bytes directly :type data: BinaryIO or bytes :param schema: An Avro RecordSchema - :type schema: Union[str, bytes, avro.schema.Schema] + :type schema: str :returns: An instantiated object :rtype: ObjectType """ if not hasattr(data, 'read'): data = BytesIO(data) - reader = self._get_schema_reader(str(schema)) + reader = self.get_schema_reader(schema) with data: bin_decoder = BinaryDecoder(data) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_schema_registry_avro_serializer.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_schema_registry_avro_serializer.py index 58613a1f9a52..ded28b28c37c 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_schema_registry_avro_serializer.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/_schema_registry_avro_serializer.py @@ -29,10 +29,14 @@ from backports.functools_lru_cache import lru_cache from io import BytesIO from typing import Any, Dict, Mapping -import avro +from .exceptions import ( + SchemaParseError, + SchemaSerializationError, + SchemaDeserializationError, +) +from ._apache_avro_serializer import ApacheAvroObjectSerializer as AvroObjectSerializer from ._constants import SCHEMA_ID_START_INDEX, SCHEMA_ID_LENGTH, DATA_START_INDEX -from ._avro_serializer import AvroObjectSerializer class AvroSerializer(object): @@ -45,7 +49,7 @@ class AvroSerializer(object): :paramtype client: ~azure.schemaregistry.SchemaRegistryClient :keyword str group_name: Required. Schema group under which schema should be registered. :keyword bool auto_register_schemas: When true, register new schemas passed to serialize. - Otherwise, and by default, fail if it has not been pre-registered in the registry. + Otherwise, and by default, serialization will fail if the schema has not been pre-registered in the registry. """ @@ -53,19 +57,21 @@ def __init__(self, **kwargs): # type: (Any) -> None try: self._schema_group = kwargs.pop("group_name") - self._schema_registry_client = kwargs.pop("client") # type: "SchemaRegistryClient" + self._schema_registry_client = kwargs.pop( + "client" + ) # type: "SchemaRegistryClient" except KeyError as e: raise TypeError("'{}' is a required keyword.".format(e.args[0])) self._avro_serializer = AvroObjectSerializer(codec=kwargs.get("codec")) self._auto_register_schemas = kwargs.get("auto_register_schemas", False) self._auto_register_schema_func = ( - self._schema_registry_client.register_schema - if self._auto_register_schemas - else self._schema_registry_client.get_schema_properties - ) + self._schema_registry_client.register_schema + if self._auto_register_schemas + else self._schema_registry_client.get_schema_properties + ) def __enter__(self): - # type: () -> SchemaRegistryAvroSerializer + # type: () -> AvroSerializer self._schema_registry_client.__enter__() return self @@ -89,8 +95,7 @@ def _get_schema_id(self, schema_name, schema_str, **kwargs): :param schema_name: Name of the schema :type schema_name: str - :param schema: Schema object - :type schema: avro.schema.Schema + :param str schema_str: Schema string :return: Schema Id :rtype: str """ @@ -108,17 +113,13 @@ def _get_schema(self, schema_id, **kwargs): :param str schema_id: Schema id :return: Schema content + :rtype: str """ schema_str = self._schema_registry_client.get_schema( schema_id, **kwargs - ).schema_definition + ).definition return schema_str - @classmethod - @lru_cache(maxsize=128) - def _parse_schema(cls, schema): - return avro.schema.parse(schema) - def serialize(self, value, **kwargs): # type: (Mapping[str, Any], Any) -> bytes """ @@ -126,11 +127,18 @@ def serialize(self, value, **kwargs): denoting record format identifier. The following 32 bytes denoting schema id returned by schema registry service. The remaining bytes are the real data payload. + Schema must be an Avro RecordSchema: + https://avro.apache.org/docs/1.10.0/gettingstartedpython.html#Defining+a+schema + :param value: The data to be encoded. :type value: Mapping[str, Any] :keyword schema: Required. The schema used to encode the data. :paramtype schema: str :rtype: bytes + :raises ~azure.schemaregistry.serializer.avroserializer.exceptions.SchemaParseError: + Indicates an issue with parsing schema. + :raises ~azure.schemaregistry.serializer.avroserializer.exceptions.SchemaSerializationError: + Indicates an issue with serializing data for provided schema. """ try: raw_input_schema = kwargs.pop("schema") @@ -139,8 +147,26 @@ def serialize(self, value, **kwargs): cached_schema = AvroSerializer._parse_schema(raw_input_schema) record_format_identifier = b"\0\0\0\0" - schema_id = self._get_schema_id(cached_schema.fullname, str(cached_schema), **kwargs) - data_bytes = self._avro_serializer.serialize(value, cached_schema) + + try: + schema_fullname = self._avro_serializer.get_schema_fullname( + raw_input_schema + ) + except Exception as e: # pylint:disable=broad-except + SchemaParseError( + "Cannot parse schema: {}".format(raw_input_schema), error=e + ).raise_with_traceback() + + schema_id = self._get_schema_id(schema_fullname, raw_input_schema, **kwargs) + try: + data_bytes = self._avro_serializer.serialize(value, raw_input_schema) + except Exception as e: # pylint:disable=broad-except + SchemaSerializationError( + "Cannot serialize value '{}' for schema: {}".format( + value, raw_input_schema + ), + error=e, + ).raise_with_traceback() stream = BytesIO() @@ -158,8 +184,15 @@ def deserialize(self, value, **kwargs): """ Decode bytes data. + Data must follow format of associated Avro RecordSchema: + https://avro.apache.org/docs/1.10.0/gettingstartedpython.html#Defining+a+schema + :param bytes value: The bytes data needs to be decoded. :rtype: Dict[str, Any] + :raises ~azure.schemaregistry.serializer.avroserializer.exceptions.SchemaParseError: + Indicates an issue with parsing schema. + :raises ~azure.schemaregistry.serializer.avroserializer.exceptions.SchemaDeserializationError: + Indicates an issue with deserializing value. """ # record_format_identifier = data[0:4] # The first 4 bytes are retained for future record format identifier. schema_id = value[ @@ -167,7 +200,15 @@ def deserialize(self, value, **kwargs): ].decode("utf-8") schema_definition = self._get_schema(schema_id, **kwargs) - dict_value = self._avro_serializer.deserialize( - value[DATA_START_INDEX:], schema_definition - ) + try: + dict_value = self._avro_serializer.deserialize( + value[DATA_START_INDEX:], schema_definition + ) + except Exception as e: # pylint:disable=broad-except + SchemaDeserializationError( + "Cannot deserialize value '{}' for schema: {}".format( + value[DATA_START_INDEX], schema_definition + ), + error=e, + ).raise_with_traceback() return dict_value diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/serializer/__init__.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/__init__.py similarity index 92% rename from sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/serializer/__init__.py rename to sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/__init__.py index 80f86cb969ec..14d743e38828 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/serializer/__init__.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/__init__.py @@ -23,4 +23,8 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore +from ._schema_registry_avro_serializer_async import AvroSerializer + +__all__ = [ + "AvroSerializer" +] diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/_async_lru.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/_async_lru.py new file mode 100644 index 000000000000..c51dfdf0c9dd --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/_async_lru.py @@ -0,0 +1,230 @@ +# -------------------------------------------------------------------------- +# The MIT License +# +# Copyright (c) 2018 aio-libs team https://github.com/aio-libs/ +# Copyright (c) 2017 Ocean S. A. https://ocean.io/ +# Copyright (c) 2016-2017 WikiBusiness Corporation http://wikibusiness.org/ +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +# THE SOFTWARE. +# -------------------------------------------------------------------------- +# Copying over `async_lru.py`[https://github.com/aio-libs/async-lru/blob/master/async_lru.py] +# from `aio-libs`[https://github.com/aio-libs/async-lru] for the following reasons: +# 1. There has not been an official release of `async_lru` in 2 years. +# 2. The last update to the library was a year ago, so it seems the library is +# not being actively maintained. + +import asyncio +from collections import OrderedDict +from functools import _CacheInfo, _make_key, partial, wraps + + +__version__ = "1.0.2" + +__all__ = ("alru_cache",) + + +def unpartial(fn): + while hasattr(fn, "func"): + fn = fn.func + + return fn + + +def _done_callback(fut, task): + if task.cancelled(): + fut.cancel() + return + + exc = task.exception() + if exc is not None: + fut.set_exception(exc) + return + + fut.set_result(task.result()) + + +def _cache_invalidate(wrapped, typed, *args, **kwargs): + # pylint: disable=protected-access + key = _make_key(args, kwargs, typed) + + exists = key in wrapped._cache + + if exists: + wrapped._cache.pop(key) + + return exists + + +def _cache_clear(wrapped): + # pylint: disable=protected-access + wrapped.hits = wrapped.misses = 0 + wrapped._cache = OrderedDict() + wrapped.tasks = set() + + +def _open(wrapped): + if not wrapped.closed: + raise RuntimeError("alru_cache is not closed") + + # pylint: disable=protected-access + was_closed = ( + wrapped.hits == wrapped.misses == len(wrapped.tasks) == len(wrapped._cache) == 0 + ) + + if not was_closed: + raise RuntimeError("alru_cache was not closed correctly") + + wrapped.closed = False + + +def _close(wrapped, *, cancel=False, return_exceptions=True): + if wrapped.closed: + raise RuntimeError("alru_cache is closed") + + wrapped.closed = True + + if cancel: + for task in wrapped.tasks: + if not task.done(): # not sure is it possible + task.cancel() + + return _wait_closed(wrapped, return_exceptions=return_exceptions) + + +async def _wait_closed(wrapped, *, return_exceptions): + wait_closed = asyncio.gather(*wrapped.tasks, return_exceptions=return_exceptions) + + wait_closed.add_done_callback(partial(_close_waited, wrapped)) + + ret = await wait_closed + + # hack to get _close_waited callback to be executed + await asyncio.sleep(0) + + return ret + + +def _close_waited(wrapped, _): + wrapped.cache_clear() + + +def _cache_info(wrapped, maxsize): + # pylint: disable=protected-access + return _CacheInfo( + wrapped.hits, + wrapped.misses, + maxsize, + len(wrapped._cache), + ) + + +def __cache_touch(wrapped, key): + # pylint: disable=protected-access + try: + wrapped._cache.move_to_end(key) + except KeyError: # not sure is it possible + pass + + +def _cache_hit(wrapped, key): + wrapped.hits += 1 + __cache_touch(wrapped, key) + + +def _cache_miss(wrapped, key): + wrapped.misses += 1 + __cache_touch(wrapped, key) + + +def alru_cache( + fn=None, + maxsize=128, + typed=False, + *, + cache_exceptions=True, +): + def wrapper(fn): + # pylint: disable=protected-access + _origin = unpartial(fn) + + if not asyncio.iscoroutinefunction(_origin): + raise RuntimeError("Coroutine function is required, got {}".format(fn)) + + # functools.partialmethod support + if hasattr(fn, "_make_unbound_method"): + fn = fn._make_unbound_method() + + @wraps(fn) + async def wrapped(*fn_args, **fn_kwargs): + if wrapped.closed: + raise RuntimeError("alru_cache is closed for {}".format(wrapped)) + + loop = asyncio.get_event_loop() + + key = _make_key(fn_args, fn_kwargs, typed) + + fut = wrapped._cache.get(key) + + if fut is not None: + if not fut.done(): + _cache_hit(wrapped, key) + return await asyncio.shield(fut) + + exc = fut._exception + + if exc is None or cache_exceptions: + _cache_hit(wrapped, key) + return fut.result() + + # exception here and cache_exceptions == False + wrapped._cache.pop(key) + + fut = loop.create_future() + task = loop.create_task(fn(*fn_args, **fn_kwargs)) + task.add_done_callback(partial(_done_callback, fut)) + + wrapped.tasks.add(task) + task.add_done_callback(wrapped.tasks.remove) + + wrapped._cache[key] = fut + + if maxsize is not None and len(wrapped._cache) > maxsize: + wrapped._cache.popitem(last=False) + + _cache_miss(wrapped, key) + return await asyncio.shield(fut) + + _cache_clear(wrapped) + wrapped._origin = _origin + wrapped.closed = False + wrapped.cache_info = partial(_cache_info, wrapped, maxsize) + wrapped.cache_clear = partial(_cache_clear, wrapped) + wrapped.invalidate = partial(_cache_invalidate, wrapped, typed) + wrapped.close = partial(_close, wrapped) + wrapped.open = partial(_open, wrapped) + + return wrapped + + if fn is None: + return wrapper + + if callable(fn) or hasattr(fn, "_make_unbound_method"): + return wrapper(fn) + + raise NotImplementedError("{} decorating is not supported".format(fn)) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/_schema_registry_avro_serializer_async.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/_schema_registry_avro_serializer_async.py new file mode 100644 index 000000000000..18ae156b290d --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/aio/_schema_registry_avro_serializer_async.py @@ -0,0 +1,197 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +from io import BytesIO +from typing import Any, Dict, Mapping +from ._async_lru import alru_cache +from .._constants import SCHEMA_ID_START_INDEX, SCHEMA_ID_LENGTH, DATA_START_INDEX +from .._apache_avro_serializer import ApacheAvroObjectSerializer as AvroObjectSerializer +from ..exceptions import ( + SchemaParseError, + SchemaSerializationError, + SchemaDeserializationError, +) + + +class AvroSerializer(object): + """ + AvroSerializer provides the ability to serialize and deserialize data according + to the given avro schema. It would automatically register, get and cache the schema. + + :keyword client: Required. The schema registry client + which is used to register schema and retrieve schema from the service. + :paramtype client: ~azure.schemaregistry.aio.SchemaRegistryClient + :keyword str group_name: Required. Schema group under which schema should be registered. + :keyword bool auto_register_schemas: When true, register new schemas passed to serialize. + Otherwise, and by default, serialization will fail if the schema has not been pre-registered in the registry. + + """ + + def __init__(self, **kwargs): + # type: (Any) -> None + try: + self._schema_group = kwargs.pop("group_name") + self._schema_registry_client = kwargs.pop("client") # type: "SchemaRegistryClient" + except KeyError as e: + raise TypeError("'{}' is a required keyword.".format(e.args[0])) + self._avro_serializer = AvroObjectSerializer(codec=kwargs.get("codec")) + self._auto_register_schemas = kwargs.get("auto_register_schemas", False) + self._auto_register_schema_func = ( + self._schema_registry_client.register_schema + if self._auto_register_schemas + else self._schema_registry_client.get_schema_properties + ) + + async def __aenter__(self): + # type: () -> AvroSerializer + await self._schema_registry_client.__aenter__() + return self + + async def __aexit__(self, *exc_details): + # type: (Any) -> None + await self._schema_registry_client.__aexit__(*exc_details) + + async def close(self): + # type: () -> None + """This method is to close the sockets opened by the client. + It need not be used when using with a context manager. + """ + await self._schema_registry_client.close() + + @alru_cache(maxsize=128, cache_exceptions=False) + async def _get_schema_id(self, schema_name, schema_str, **kwargs): + # type: (str, str, Any) -> str + """ + Get schema id from local cache with the given schema. + If there is no item in the local cache, get schema id from the service and cache it. + + :param schema_name: Name of the schema + :type schema_name: str + :param str schema_str: Schema string + :return: Schema Id + :rtype: str + """ + schema_properties = await self._auto_register_schema_func( + self._schema_group, schema_name, schema_str, "Avro", **kwargs + ) + return schema_properties.id + + @alru_cache(maxsize=128, cache_exceptions=False) + async def _get_schema(self, schema_id, **kwargs): + # type: (str, Any) -> str + """ + Get schema definition from local cache with the given schema id. + If there is no item in the local cache, get schema from the service and cache it. + + :param str schema_id: Schema id + :return: Schema definition + """ + schema = await self._schema_registry_client.get_schema( + schema_id, **kwargs + ) + return schema.definition + + async def serialize(self, value, **kwargs): + # type: (Mapping[str, Any], Any) -> bytes + """ + Encode data with the given schema. The returns bytes are consisted of: The first 4 bytes + denoting record format identifier. The following 32 bytes denoting schema id returned by schema registry + service. The remaining bytes are the real data payload. + + Schema must be an Avro RecordSchema: + https://avro.apache.org/docs/1.10.0/gettingstartedpython.html#Defining+a+schema + + :param value: The data to be encoded. + :type value: Mapping[str, Any] + :keyword schema: Required. The schema used to encode the data. + :paramtype schema: str + :rtype: bytes + :raises ~azure.schemaregistry.serializer.avroserializer.exceptions.SchemaParseError: + Indicates an issue with parsing schema. + :raises ~azure.schemaregistry.serializer.avroserializer.exceptions.SchemaSerializationError: + Indicates an issue with serializing data for provided schema. + """ + try: + raw_input_schema = kwargs.pop("schema") + except KeyError as e: + raise TypeError("'{}' is a required keyword.".format(e.args[0])) + record_format_identifier = b"\0\0\0\0" + + try: + schema_fullname = self._avro_serializer.get_schema_fullname(raw_input_schema) + except Exception as e: # pylint:disable=broad-except + SchemaParseError("Cannot parse schema: {}".format(raw_input_schema), error=e).raise_with_traceback() + + schema_id = await self._get_schema_id(schema_fullname, raw_input_schema, **kwargs) + try: + data_bytes = self._avro_serializer.serialize(value, raw_input_schema) + except Exception as e: # pylint:disable=broad-except + SchemaSerializationError( + "Cannot serialize value '{}' for schema: {}".format(value, raw_input_schema), + error=e + ).raise_with_traceback() + + stream = BytesIO() + + stream.write(record_format_identifier) + stream.write(schema_id.encode("utf-8")) + stream.write(data_bytes) + stream.flush() + + payload = stream.getvalue() + stream.close() + return payload + + async def deserialize(self, value, **kwargs): + # type: (bytes, Any) -> Dict[str, Any] + """ + Decode bytes data. + + Data must follow format of associated Avro RecordSchema: + https://avro.apache.org/docs/1.10.0/gettingstartedpython.html#Defining+a+schema + + :param bytes value: The bytes data needs to be decoded. + :rtype: Dict[str, Any] + :raises ~azure.schemaregistry.serializer.avroserializer.exceptions.SchemaParseError: + Indicates an issue with parsing schema. + :raises ~azure.schemaregistry.serializer.avroserializer.exceptions.SchemaDeserializationError: + Indicates an issue with deserializing value. + """ + # record_format_identifier = data[0:4] # The first 4 bytes are retained for future record format identifier. + schema_id = value[ + SCHEMA_ID_START_INDEX : (SCHEMA_ID_START_INDEX + SCHEMA_ID_LENGTH) + ].decode("utf-8") + schema_definition = await self._get_schema(schema_id, **kwargs) + + try: + dict_value = self._avro_serializer.deserialize( + value[DATA_START_INDEX:], schema_definition + ) + except Exception as e: # pylint:disable=broad-except + SchemaDeserializationError( + "Cannot deserialize value '{}' for schema: {}".format(value[DATA_START_INDEX], schema_definition), + error=e + ).raise_with_traceback() + return dict_value diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/exceptions.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/exceptions.py new file mode 100644 index 000000000000..b8b19892b1cf --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/azure/schemaregistry/serializer/avroserializer/exceptions.py @@ -0,0 +1,69 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +from azure.core.exceptions import AzureError + +class SchemaParseError(AzureError): + """Error parsing a JSON schema. + :param str message: The message object stringified as 'message' attribute + :keyword error: The original exception, if any + + :ivar str message: A stringified version of the message parameter + :ivar inner_exception: The exception passed with the 'error' kwarg + :vartype inner_exception: Exception + :ivar exc_type: The exc_type from sys.exc_info() + :ivar exc_value: The exc_value from sys.exc_info() + :ivar exc_traceback: The exc_traceback from sys.exc_info() + :ivar exc_msg: A string formatting of message parameter, exc_type and exc_value + """ + + +class SchemaSerializationError(AzureError): + """Error serializing a JSON schema. + :param str message: The message object stringified as 'message' attribute + :keyword error: The original exception, if any + + :ivar str message: A stringified version of the message parameter + :ivar inner_exception: The exception passed with the 'error' kwarg + :vartype inner_exception: Exception + :ivar exc_type: The exc_type from sys.exc_info() + :ivar exc_value: The exc_value from sys.exc_info() + :ivar exc_traceback: The exc_traceback from sys.exc_info() + :ivar exc_msg: A string formatting of message parameter, exc_type and exc_value + """ + +class SchemaDeserializationError(AzureError): + """Error deserializing a JSON schema. + :param str message: The message object stringified as 'message' attribute + :keyword error: The original exception, if any + + :ivar str message: A stringified version of the message parameter + :ivar inner_exception: The exception passed with the 'error' kwarg + :vartype inner_exception: Exception + :ivar exc_type: The exc_type from sys.exc_info() + :ivar exc_value: The exc_value from sys.exc_info() + :ivar exc_traceback: The exc_traceback from sys.exc_info() + :ivar exc_msg: A string formatting of message parameter, exc_type and exc_value + """ diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/dev_requirements.txt b/sdk/schemaregistry/azure-schemaregistry-avroserializer/dev_requirements.txt index c2d5098aa720..d53cebff6287 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/dev_requirements.txt +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/dev_requirements.txt @@ -1,4 +1,4 @@ -e ../../../tools/azure-devtools -e ../../../tools/azure-sdk-tools -e ../../identity/azure-identity -../azure-schemaregistry \ No newline at end of file +aiohttp>=3.0; python_version >= '3.5' \ No newline at end of file diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/README.md b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/README.md index efb9eca6a478..45d3e1dc7b10 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/README.md +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/README.md @@ -14,12 +14,12 @@ These are code samples that show common scenario operations with the Schema Regi Several Schema Registry Avro Serializer Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Schema Registry Avro Serializer: -* [avro_serializer.py][avro_serializer_sample] - Examples for common Schema Registry Avro Serializer tasks: +* [avro_serializer.py][avro_serializer_sample] ([async version][avro_serializer_async_sample]) - Examples for common Schema Registry Avro Serializer tasks: * Serialize data according to the given schema * Deserialize data -* [eventhub_send_integration.py][eventhub_send_integration_sample] - Examples for integration with EventHub in sending tasks: +* [eventhub_send_integration.py][eventhub_send_integration_sample] ([async version][eventhub_send_integration_async_sample]) - Examples for integration with EventHub in sending tasks: * Serialize data with the given schema and send `EventData` to Event Hubs. -* [eventhub_receive_integration.py][eventhub_receive_integration_sample] - Examples for integration with EventHub in receiving tasks: +* [eventhub_receive_integration.py][eventhub_receive_integration_sample] ([async version][eventhub_receive_integration_async_sample]) - Examples for integration with EventHub in receiving tasks: * Receive `EventData` from Event Hubs and deserialize the received bytes. ## Prerequisites @@ -50,7 +50,10 @@ Check out the [API reference documentation][api_reference] to learn more about what you can do with the Azure Schema Registry Avro Serializer library. -[avro_serializer_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/avro_serializer.py -[eventhub_send_integration_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_send_integration.py -[eventhub_receive_integration_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_receive_integration.py -[api_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-schemaregistry-avroserializer/latest/index.html +[avro_serializer_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/avro_serializer.py +[eventhub_send_integration_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/eventhub_send_integration.py +[eventhub_receive_integration_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/eventhub_receive_integration.py +[avro_serializer_async_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/avro_serializer_async.py +[eventhub_send_integration_async_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_send_integration_async.py +[eventhub_receive_integration_async_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_receive_integration_async.py +[api_reference]: https://docs.microsoft.com/python/api/overview/azure/schemaregistry-avroserializer-readme diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/avro_serializer_async.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/avro_serializer_async.py new file mode 100644 index 000000000000..20595010e117 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/avro_serializer_async.py @@ -0,0 +1,93 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import os +import asyncio + +from azure.identity.aio import ClientSecretCredential +from azure.schemaregistry.aio import SchemaRegistryClient +from azure.schemaregistry.serializer.avroserializer.aio import AvroSerializer + +TENANT_ID=os.environ['AZURE_TENANT_ID'] +CLIENT_ID=os.environ['AZURE_CLIENT_ID'] +CLIENT_SECRET=os.environ['AZURE_CLIENT_SECRET'] + +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE=os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] +GROUP_NAME=os.environ['SCHEMAREGISTRY_GROUP'] +SCHEMA_STRING = """ +{"namespace": "example.avro", + "type": "record", + "name": "User", + "fields": [ + {"name": "name", "type": "string"}, + {"name": "favorite_number", "type": ["int", "null"]}, + {"name": "favorite_color", "type": ["string", "null"]} + ] +}""" + + +token_credential = ClientSecretCredential( + tenant_id=TENANT_ID, + client_id=CLIENT_ID, + client_secret=CLIENT_SECRET +) + + +async def serialize(serializer): + dict_data_ben = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + dict_data_alice = {"name": u"Alice", "favorite_number": 15, "favorite_color": u"green"} + + # Schema would be automatically registered into Schema Registry and cached locally. + payload_ben = await serializer.serialize(dict_data_ben, schema=SCHEMA_STRING) + # The second call won't trigger a service call. + payload_alice = await serializer.serialize(dict_data_alice, schema=SCHEMA_STRING) + + print('Encoded bytes are: ', payload_ben) + print('Encoded bytes are: ', payload_alice) + return [payload_ben, payload_alice] + + +async def deserialize(serializer, bytes_payload): + # serializer.deserialize would extract the schema id from the payload, + # retrieve schema from Schema Registry and cache the schema locally. + # If the schema id is the local cache, the call won't trigger a service call. + dict_data = await serializer.deserialize(bytes_payload) + + print('Deserialized data is: ', dict_data) + return dict_data + + +async def main(): + schema_registry = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, credential=token_credential) + serializer = AvroSerializer(client=schema_registry, group_name=GROUP_NAME, auto_register_schemas=True) + bytes_data_ben, bytes_data_alice = await serialize(serializer) + dict_data_ben = await deserialize(serializer, bytes_data_ben) + dict_data_alice = await deserialize(serializer, bytes_data_alice) + await serializer.close() + await token_credential.close() + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_receive_integration_async.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_receive_integration_async.py new file mode 100644 index 000000000000..df9b21482378 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_receive_integration_async.py @@ -0,0 +1,73 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +""" +Examples to show receiving events from EventHub with AvroSerializer integrated for data deserialization. +""" + +# pylint: disable=C0111 +import os +import asyncio +from azure.eventhub.aio import EventHubConsumerClient +from azure.identity.aio import DefaultAzureCredential +from azure.schemaregistry.aio import SchemaRegistryClient +from azure.schemaregistry.serializer.avroserializer.aio import AvroSerializer + +EVENTHUB_CONNECTION_STR = os.environ['EVENT_HUB_CONN_STR'] +EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] + +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] +GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] + + +# create an EventHubConsumerClient instance +eventhub_consumer = EventHubConsumerClient.from_connection_string( + conn_str=EVENTHUB_CONNECTION_STR, + consumer_group='$Default', + eventhub_name=EVENTHUB_NAME, +) +# create a AvroSerializer instance +azure_credential = DefaultAzureCredential() +avro_serializer = AvroSerializer( + client=SchemaRegistryClient( + fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, + credential=azure_credential + ), + group_name=GROUP_NAME, + auto_register_schemas=True +) + +async def on_event(partition_context, event): + print("Received event from partition: {}.".format(partition_context.partition_id)) + + bytes_payload = b"".join(b for b in event.body) + print('The received bytes of the EventData is {}.'.format(bytes_payload)) + + # Use the deserialize method to convert bytes to dict object. + # The deserialize method would extract the schema id from the payload, and automatically retrieve the Avro Schema + # from the Schema Registry Service. The schema would be cached locally for future usage. + deserialized_data = await avro_serializer.deserialize(bytes_payload) + print('The dict data after deserialization is {}'.format(deserialized_data)) + + +async def main(): + try: + async with eventhub_consumer, avro_serializer: + await eventhub_consumer.receive( + on_event=on_event, + starting_position="-1", # "-1" is from the beginning of the partition. + ) + except KeyboardInterrupt: + print('Stopped receiving.') + finally: + await avro_serializer.close() + await azure_credential.close() + await eventhub_consumer.close() + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_send_integration_async.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_send_integration_async.py new file mode 100644 index 000000000000..4d1dfe687d7a --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/async_samples/eventhub_send_integration_async.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python + +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +""" +Examples to show sending event to EventHub with AvroSerializer integrated for data serialization. +""" + +# pylint: disable=C0111 + +import os +import asyncio +from azure.eventhub import EventData +from azure.eventhub.aio import EventHubProducerClient +from azure.identity.aio import DefaultAzureCredential +from azure.schemaregistry.aio import SchemaRegistryClient +from azure.schemaregistry.serializer.avroserializer.aio import AvroSerializer + +EVENTHUB_CONNECTION_STR = os.environ['EVENT_HUB_CONN_STR'] +EVENTHUB_NAME = os.environ['EVENT_HUB_NAME'] + +SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] +GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] + +SCHEMA_STRING = """ +{"namespace": "example.avro", + "type": "record", + "name": "User", + "fields": [ + {"name": "name", "type": "string"}, + {"name": "favorite_number", "type": ["int", "null"]}, + {"name": "favorite_color", "type": ["string", "null"]} + ] +}""" + +# create an EventHubProducerClient instance +eventhub_producer = EventHubProducerClient.from_connection_string( + conn_str=EVENTHUB_CONNECTION_STR, + eventhub_name=EVENTHUB_NAME +) +# create a AvroSerializer instance +azure_credential = DefaultAzureCredential() +avro_serializer = AvroSerializer( + client=SchemaRegistryClient( + fully_qualified_namespace=SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE, + credential=azure_credential + ), + group_name=GROUP_NAME, + auto_register_schemas=True +) + +async def send_event_data_batch(producer, serializer): + event_data_batch = await producer.create_batch() + + dict_data = {"name": "Bob", "favorite_number": 7, "favorite_color": "red"} + # Use the serialize method to convert dict object to bytes with the given avro schema. + # The serialize method would automatically register the schema into the Schema Registry Service and + # schema would be cached locally for future usage. + payload_bytes = await serializer.serialize(value=dict_data, schema=SCHEMA_STRING) + print('The bytes of serialized dict data is {}.'.format(payload_bytes)) + + event_data = EventData(body=payload_bytes) # pass the bytes data to the body of an EventData + event_data_batch.add(event_data) + await producer.send_batch(event_data_batch) + print('Send is done.') + + +async def main(): + + await send_event_data_batch(eventhub_producer, avro_serializer) + await avro_serializer.close() + await azure_credential.close() + await eventhub_producer.close() + +if __name__ == "__main__": + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/avro_serializer.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/avro_serializer.py similarity index 100% rename from sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/avro_serializer.py rename to sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/avro_serializer.py diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_receive_integration.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/eventhub_receive_integration.py similarity index 100% rename from sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_receive_integration.py rename to sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/eventhub_receive_integration.py diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_send_integration.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/eventhub_send_integration.py similarity index 100% rename from sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/eventhub_send_integration.py rename to sdk/schemaregistry/azure-schemaregistry-avroserializer/samples/sync_samples/eventhub_send_integration.py diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/setup.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/setup.py index 87ccade7399e..46326ffeb12d 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/setup.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/setup.py @@ -38,11 +38,10 @@ # Exclude packages that will be covered by PEP420 or nspkg 'azure', 'azure.schemaregistry', - 'azure.schemaregistry.serializer' ] install_packages = [ - 'azure-schemaregistry==1.0.0b3', - 'avro<2.0.0,>=1.10.0', + 'azure-schemaregistry>=1.0.0,<2.0.0', + 'avro==1.10.0', 'backports.functools-lru-cache >= 1.6.4; python_version == "2.7"' ] diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/conftest.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/conftest.py new file mode 100644 index 000000000000..dc548de50415 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/conftest.py @@ -0,0 +1,16 @@ +# ------------------------------------------------------------------------ +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ------------------------------------------------------------------------- + +import os +import sys +import uuid + +import pytest + +# Ignore async tests for Python < 3.5 +collect_ignore_glob = [] +if sys.version_info < (3, 5): + collect_ignore_glob.append("*_async.py") diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml index 8cc336c7d639..27e450ae7cd6 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml @@ -1,8 +1,6 @@ interactions: - request: - body: '{"type": "record", "name": "User", "namespace": "example.avro", "fields": - [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, - {"type": ["string", "null"], "name": "favorite_color"}]}' + body: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' headers: Accept: - application/json @@ -11,44 +9,42 @@ interactions: Connection: - keep-alive Content-Length: - - '221' + - '201' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/example.avro.User?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.User?api-version=2021-10 response: body: - string: '{"id":"ad9a2f239f2b40e5b058f494bea52bca"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Mon, 04 Oct 2021 18:52:03 GMT + - Fri, 05 Nov 2021 23:17:01 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - ad9a2f239f2b40e5b058f494bea52bca + - 8bed862d53c8482880a546b063f8f6ef schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ad9a2f239f2b40e5b058f494bea52bca?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: + - example.avro.User schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content - request: body: '{"type": "record", "name": "User", "namespace": "example.avro", "fields": [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, @@ -63,75 +59,75 @@ interactions: Content-Length: - '221' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: POST - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/example.avro.User?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.User:get-id?api-version=2021-10 response: body: - string: '{"id":"ad9a2f239f2b40e5b058f494bea52bca"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Mon, 04 Oct 2021 18:52:03 GMT + - Fri, 05 Nov 2021 23:17:01 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - ad9a2f239f2b40e5b058f494bea52bca + - 8bed862d53c8482880a546b063f8f6ef schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ad9a2f239f2b40e5b058f494bea52bca?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: + - example.avro.User schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content - request: body: null headers: Accept: - - text/plain; charset=utf-8 + - application/json; serialization=Avro Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/ad9a2f239f2b40e5b058f494bea52bca?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 response: body: - string: '{"type":"record","name":"User","namespace":"example.avro","fields":[{"type":"string","name":"name"},{"type":["int","null"],"name":"favorite_number"},{"type":["string","null"],"name":"favorite_color"}]}' + string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' headers: content-type: - - application/json + - application/json;serialization=Avro date: - - Mon, 04 Oct 2021 18:52:03 GMT + - Fri, 05 Nov 2021 23:17:01 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - ad9a2f239f2b40e5b058f494bea52bca + - 8bed862d53c8482880a546b063f8f6ef schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ad9a2f239f2b40e5b058f494bea52bca?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: + - example.avro.User schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml index e4ed567df1ee..43c228cb5301 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml @@ -1,8 +1,6 @@ interactions: - request: - body: '{"type": "record", "name": "User", "namespace": "example.avro", "fields": - [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, - {"type": ["string", "null"], "name": "favorite_color"}]}' + body: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' headers: Accept: - application/json @@ -11,44 +9,42 @@ interactions: Connection: - keep-alive Content-Length: - - '221' + - '201' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: POST - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/example.avro.User?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.User:get-id?api-version=2021-10 response: body: - string: '{"id":"ad9a2f239f2b40e5b058f494bea52bca"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Mon, 04 Oct 2021 18:52:04 GMT + - Fri, 05 Nov 2021 23:17:02 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - ad9a2f239f2b40e5b058f494bea52bca + - 8bed862d53c8482880a546b063f8f6ef schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ad9a2f239f2b40e5b058f494bea52bca?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: + - example.avro.User schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content - request: body: '{"type": "record", "name": "User", "namespace": "example.avro", "fields": [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, @@ -63,75 +59,75 @@ interactions: Content-Length: - '221' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: POST - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/example.avro.User?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.User:get-id?api-version=2021-10 response: body: - string: '{"id":"ad9a2f239f2b40e5b058f494bea52bca"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Mon, 04 Oct 2021 18:52:05 GMT + - Fri, 05 Nov 2021 23:17:03 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - ad9a2f239f2b40e5b058f494bea52bca + - 8bed862d53c8482880a546b063f8f6ef schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ad9a2f239f2b40e5b058f494bea52bca?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: + - example.avro.User schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content - request: body: null headers: Accept: - - text/plain; charset=utf-8 + - application/json; serialization=Avro Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/ad9a2f239f2b40e5b058f494bea52bca?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 response: body: - string: '{"type":"record","name":"User","namespace":"example.avro","fields":[{"type":"string","name":"name"},{"type":["int","null"],"name":"favorite_number"},{"type":["string","null"],"name":"favorite_color"}]}' + string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' headers: content-type: - - application/json + - application/json;serialization=Avro date: - - Mon, 04 Oct 2021 18:52:05 GMT + - Fri, 05 Nov 2021 23:17:03 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - ad9a2f239f2b40e5b058f494bea52bca + - 8bed862d53c8482880a546b063f8f6ef schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ad9a2f239f2b40e5b058f494bea52bca?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: + - example.avro.User schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_parse_error_schema_as_record.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_parse_error_schema_as_record.yaml new file mode 100644 index 000000000000..db54bb0c2f81 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_parse_error_schema_as_record.yaml @@ -0,0 +1,94 @@ +interactions: +- request: + body: "{\n \"name\":\"User\",\n \"namespace\":\"example.avro.error\",\n + \ \"type\":\"error\",\n \"fields\":[{\"name\":\"name\",\"type\":\"string\"}]\n + \ }" + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '167' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.error.User?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Fri, 05 Nov 2021 23:17:05 GMT + location: + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.error.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema + schema-id: + - 126ed9b72e0941ce9ec06ce47051bc63 + schema-id-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/126ed9b72e0941ce9ec06ce47051bc63?api-version=2021-10 + schema-name: + - example.avro.error.User + schema-version: + - '1' + schema-versions-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.error.User/versions?api-version=2021-10 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/126ed9b72e0941ce9ec06ce47051bc63?api-version=2021-10 + response: + body: + string: '{"name":"User","namespace":"example.avro.error","type":"error","fields":[{"name":"name","type":"string"}]}' + headers: + content-type: + - application/json;serialization=Avro + date: + - Fri, 05 Nov 2021 23:17:05 GMT + location: + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.error.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema + schema-id: + - 126ed9b72e0941ce9ec06ce47051bc63 + schema-id-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/126ed9b72e0941ce9ec06ce47051bc63?api-version=2021-10 + schema-name: + - example.avro.error.User + schema-version: + - '1' + schema-versions-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.error.User/versions?api-version=2021-10 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_parse_record_name.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_parse_record_name.yaml new file mode 100644 index 000000000000..6fd66e14703e --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_parse_record_name.yaml @@ -0,0 +1,185 @@ +interactions: +- request: + body: "{\n \"namespace\": \"thrownaway\",\n \"name\":\"User.avro\",\n + \ \"type\":\"record\",\n \"fields\":[{\"name\":\"name\",\"type\":\"string\"}]\n + \ }" + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '166' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/User.avro?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Fri, 05 Nov 2021 23:17:07 GMT + location: + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/User.avro/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema + schema-id: + - c785cfbccd2e43a69e0a95e61506da4c + schema-id-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/c785cfbccd2e43a69e0a95e61506da4c?api-version=2021-10 + schema-name: + - User.avro + schema-version: + - '1' + schema-versions-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/User.avro/versions?api-version=2021-10 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/c785cfbccd2e43a69e0a95e61506da4c?api-version=2021-10 + response: + body: + string: '{"namespace":"thrownaway","name":"User.avro","type":"record","fields":[{"name":"name","type":"string"}]}' + headers: + content-type: + - application/json;serialization=Avro + date: + - Fri, 05 Nov 2021 23:17:07 GMT + location: + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/User.avro/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema + schema-id: + - c785cfbccd2e43a69e0a95e61506da4c + schema-id-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/c785cfbccd2e43a69e0a95e61506da4c?api-version=2021-10 + schema-name: + - User.avro + schema-version: + - '1' + schema-versions-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/User.avro/versions?api-version=2021-10 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: "{\n \"name\":\"User\",\n \"type\":\"record\",\n \"fields\":[{\"name\":\"name\",\"type\":\"string\"}]\n + \ }" + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '122' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/User?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Fri, 05 Nov 2021 23:17:08 GMT + location: + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema + schema-id: + - 31b0db60056a4d43b880870cf7139c72 + schema-id-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/31b0db60056a4d43b880870cf7139c72?api-version=2021-10 + schema-name: + - User + schema-version: + - '1' + schema-versions-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/User/versions?api-version=2021-10 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/31b0db60056a4d43b880870cf7139c72?api-version=2021-10 + response: + body: + string: '{"name":"User","type":"record","fields":[{"name":"name","type":"string"}]}' + headers: + content-type: + - application/json;serialization=Avro + date: + - Fri, 05 Nov 2021 23:17:08 GMT + location: + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema + schema-id: + - 31b0db60056a4d43b880870cf7139c72 + schema-id-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/31b0db60056a4d43b880870cf7139c72?api-version=2021-10 + schema-name: + - User + schema-version: + - '1' + schema-versions-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/User/versions?api-version=2021-10 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_serialize_primitive.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_serialize_primitive.yaml new file mode 100644 index 000000000000..5f149706108c --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_serialize_primitive.yaml @@ -0,0 +1,48 @@ +interactions: +- request: + body: '{"type": "null"}' + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '16' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/null?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Fri, 05 Nov 2021 23:17:09 GMT + location: + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/null/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema + schema-id: + - fa716f435d9947039d5eab85735f3fd8 + schema-id-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/fa716f435d9947039d5eab85735f3fd8?api-version=2021-10 + schema-name: + - 'null' + schema-version: + - '1' + schema-versions-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/null/versions?api-version=2021-10 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 204 + message: No Content +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_serialize_record.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_serialize_record.yaml new file mode 100644 index 000000000000..d4d59267260b --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer.test_serialize_record.yaml @@ -0,0 +1,96 @@ +interactions: +- request: + body: "{\n \"name\":\"User\",\n \"namespace\":\"example.avro.populatedrecord\",\n + \ \"type\":\"record\",\n \"fields\":[\n {\"name\":\"name\",\"type\":\"string\"},\n + \ {\"name\":\"age\",\"type\":\"int\"},\n {\"name\":\"married\",\"type\":\"boolean\"},\n + \ {\"name\":\"height\",\"type\":\"float\"},\n {\"name\":\"randb\",\"type\":\"bytes\"}\n + \ ]\n }" + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '405' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.populatedrecord.User?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Fri, 05 Nov 2021 23:17:12 GMT + location: + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.populatedrecord.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema + schema-id: + - e151432d25624815913f3fe5e9e90139 + schema-id-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/e151432d25624815913f3fe5e9e90139?api-version=2021-10 + schema-name: + - example.avro.populatedrecord.User + schema-version: + - '1' + schema-versions-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.populatedrecord.User/versions?api-version=2021-10 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 204 + message: No Content +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/e151432d25624815913f3fe5e9e90139?api-version=2021-10 + response: + body: + string: '{"name":"User","namespace":"example.avro.populatedrecord","type":"record","fields":[{"name":"name","type":"string"},{"name":"age","type":"int"},{"name":"married","type":"boolean"},{"name":"height","type":"float"},{"name":"randb","type":"bytes"}]}' + headers: + content-type: + - application/json;serialization=Avro + date: + - Fri, 05 Nov 2021 23:17:13 GMT + location: + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.populatedrecord.User/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema + schema-id: + - e151432d25624815913f3fe5e9e90139 + schema-id-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/e151432d25624815913f3fe5e9e90139?api-version=2021-10 + schema-name: + - example.avro.populatedrecord.User + schema-version: + - '1' + schema-versions-location: + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.populatedrecord.User/versions?api-version=2021-10 + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml new file mode 100644 index 000000000000..a4c3927c75a4 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_basic_sr_avro_serializer_with_auto_register_schemas.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: '{"type": "record", "name": "User", "namespace": "example.avro", "fields": + [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, + {"type": ["string", "null"], "name": "favorite_color"}]}' + headers: + Accept: + - application/json + Content-Length: + - '221' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.User?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: '0' + date: Fri, 05 Nov 2021 23:17:13 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 8bed862d53c8482880a546b063f8f6ef + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: example.avro.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/example.avro.User?api-version=2021-10 +- request: + body: '{"type": "record", "name": "User", "namespace": "example.avro", "fields": + [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, + {"type": ["string", "null"], "name": "favorite_color"}]}' + headers: + Accept: + - application/json + Content-Length: + - '221' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.User:get-id?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: '0' + date: Fri, 05 Nov 2021 23:17:14 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 8bed862d53c8482880a546b063f8f6ef + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: example.avro.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/example.avro.User:get-id?api-version=2021-10 +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + response: + body: + string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' + headers: + content-type: application/json;serialization=Avro + date: Fri, 05 Nov 2021 23:17:14 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 8bed862d53c8482880a546b063f8f6ef + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: example.avro.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml new file mode 100644 index 000000000000..8195aed69c20 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_basic_sr_avro_serializer_without_auto_register_schemas.yaml @@ -0,0 +1,99 @@ +interactions: +- request: + body: '{"type": "record", "name": "User", "namespace": "example.avro", "fields": + [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, + {"type": ["string", "null"], "name": "favorite_color"}]}' + headers: + Accept: + - application/json + Content-Length: + - '221' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.User?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: '0' + date: Fri, 05 Nov 2021 23:17:16 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 8bed862d53c8482880a546b063f8f6ef + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: example.avro.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/example.avro.User?api-version=2021-10 +- request: + body: '{"type": "record", "name": "User", "namespace": "example.avro", "fields": + [{"type": "string", "name": "name"}, {"type": ["int", "null"], "name": "favorite_number"}, + {"type": ["string", "null"], "name": "favorite_color"}]}' + headers: + Accept: + - application/json + Content-Length: + - '221' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: POST + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.User:get-id?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: '0' + date: Fri, 05 Nov 2021 23:17:17 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 8bed862d53c8482880a546b063f8f6ef + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: example.avro.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/example.avro.User:get-id?api-version=2021-10 +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + response: + body: + string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' + headers: + content-type: application/json;serialization=Avro + date: Fri, 05 Nov 2021 23:17:17 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 8bed862d53c8482880a546b063f8f6ef + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 + schema-name: example.avro.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/8bed862d53c8482880a546b063f8f6ef?api-version=2021-10 +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_parse_error_schema_as_record.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_parse_error_schema_as_record.yaml new file mode 100644 index 000000000000..28f2f6b27e41 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_parse_error_schema_as_record.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: "{\n \"name\":\"User\",\n \"namespace\":\"example.avro.error\",\n + \ \"type\":\"error\",\n \"fields\":[{\"name\":\"name\",\"type\":\"string\"}]\n + \ }" + headers: + Accept: + - application/json + Content-Length: + - '167' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.error.User?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: '0' + date: Fri, 05 Nov 2021 23:17:18 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.error.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 126ed9b72e0941ce9ec06ce47051bc63 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/126ed9b72e0941ce9ec06ce47051bc63?api-version=2021-10 + schema-name: example.avro.error.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.error.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/example.avro.error.User?api-version=2021-10 +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/126ed9b72e0941ce9ec06ce47051bc63?api-version=2021-10 + response: + body: + string: '{"name":"User","namespace":"example.avro.error","type":"error","fields":[{"name":"name","type":"string"}]}' + headers: + content-type: application/json;serialization=Avro + date: Fri, 05 Nov 2021 23:17:19 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.error.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 126ed9b72e0941ce9ec06ce47051bc63 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/126ed9b72e0941ce9ec06ce47051bc63?api-version=2021-10 + schema-name: example.avro.error.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.error.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/126ed9b72e0941ce9ec06ce47051bc63?api-version=2021-10 +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_parse_record_name.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_parse_record_name.yaml new file mode 100644 index 000000000000..8474a78fb1ad --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_parse_record_name.yaml @@ -0,0 +1,127 @@ +interactions: +- request: + body: "{\n \"namespace\": \"thrownaway\",\n \"name\":\"User.avro\",\n + \ \"type\":\"record\",\n \"fields\":[{\"name\":\"name\",\"type\":\"string\"}]\n + \ }" + headers: + Accept: + - application/json + Content-Length: + - '166' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/User.avro?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: '0' + date: Fri, 05 Nov 2021 23:17:19 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/User.avro/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: c785cfbccd2e43a69e0a95e61506da4c + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/c785cfbccd2e43a69e0a95e61506da4c?api-version=2021-10 + schema-name: User.avro + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/User.avro/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/User.avro?api-version=2021-10 +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/c785cfbccd2e43a69e0a95e61506da4c?api-version=2021-10 + response: + body: + string: '{"namespace":"thrownaway","name":"User.avro","type":"record","fields":[{"name":"name","type":"string"}]}' + headers: + content-type: application/json;serialization=Avro + date: Fri, 05 Nov 2021 23:17:20 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/User.avro/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: c785cfbccd2e43a69e0a95e61506da4c + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/c785cfbccd2e43a69e0a95e61506da4c?api-version=2021-10 + schema-name: User.avro + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/User.avro/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/c785cfbccd2e43a69e0a95e61506da4c?api-version=2021-10 +- request: + body: "{\n \"name\":\"User\",\n \"type\":\"record\",\n \"fields\":[{\"name\":\"name\",\"type\":\"string\"}]\n + \ }" + headers: + Accept: + - application/json + Content-Length: + - '122' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/User?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: '0' + date: Fri, 05 Nov 2021 23:17:20 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 31b0db60056a4d43b880870cf7139c72 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/31b0db60056a4d43b880870cf7139c72?api-version=2021-10 + schema-name: User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/User?api-version=2021-10 +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/31b0db60056a4d43b880870cf7139c72?api-version=2021-10 + response: + body: + string: '{"name":"User","type":"record","fields":[{"name":"name","type":"string"}]}' + headers: + content-type: application/json;serialization=Avro + date: Fri, 05 Nov 2021 23:17:21 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 31b0db60056a4d43b880870cf7139c72 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/31b0db60056a4d43b880870cf7139c72?api-version=2021-10 + schema-name: User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/31b0db60056a4d43b880870cf7139c72?api-version=2021-10 +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_serialize_primitive.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_serialize_primitive.yaml new file mode 100644 index 000000000000..66cd2e2c3875 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_serialize_primitive.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"type": "null"}' + headers: + Accept: + - application/json + Content-Length: + - '16' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/null?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: '0' + date: Fri, 05 Nov 2021 23:17:23 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/null/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: fa716f435d9947039d5eab85735f3fd8 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/fa716f435d9947039d5eab85735f3fd8?api-version=2021-10 + schema-name: 'null' + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/null/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/null?api-version=2021-10 +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_serialize_record.yaml b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_serialize_record.yaml new file mode 100644 index 000000000000..5474d6fc8054 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/recordings/test_avro_serializer_async.test_serialize_record.yaml @@ -0,0 +1,67 @@ +interactions: +- request: + body: "{\n \"name\":\"User\",\n \"namespace\":\"example.avro.populatedrecord\",\n + \ \"type\":\"record\",\n \"fields\":[\n {\"name\":\"name\",\"type\":\"string\"},\n + \ {\"name\":\"age\",\"type\":\"int\"},\n {\"name\":\"married\",\"type\":\"boolean\"},\n + \ {\"name\":\"height\",\"type\":\"float\"},\n {\"name\":\"randb\",\"type\":\"bytes\"}\n + \ ]\n }" + headers: + Accept: + - application/json + Content-Length: + - '405' + Content-Type: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/example.avro.populatedrecord.User?api-version=2021-10 + response: + body: + string: '' + headers: + content-length: '0' + date: Fri, 05 Nov 2021 23:17:24 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.populatedrecord.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: e151432d25624815913f3fe5e9e90139 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/e151432d25624815913f3fe5e9e90139?api-version=2021-10 + schema-name: example.avro.populatedrecord.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.populatedrecord.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/example.avro.populatedrecord.User?api-version=2021-10 +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/e151432d25624815913f3fe5e9e90139?api-version=2021-10 + response: + body: + string: '{"name":"User","namespace":"example.avro.populatedrecord","type":"record","fields":[{"name":"name","type":"string"},{"name":"age","type":"int"},{"name":"married","type":"boolean"},{"name":"height","type":"float"},{"name":"randb","type":"bytes"}]}' + headers: + content-type: application/json;serialization=Avro + date: Fri, 05 Nov 2021 23:17:24 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/example.avro.populatedrecord.User/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: e151432d25624815913f3fe5e9e90139 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/e151432d25624815913f3fe5e9e90139?api-version=2021-10 + schema-name: example.avro.populatedrecord.User + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/example.avro.populatedrecord.User/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/e151432d25624815913f3fe5e9e90139?api-version=2021-10 +version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer.py index b925800685a7..0df57de0328a 100644 --- a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer.py +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer.py @@ -1,3 +1,9 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), to # deal in the Software without restriction, including without limitation the @@ -20,13 +26,17 @@ import functools import pytest import uuid -import avro -import avro.io +import json from io import BytesIO from azure.schemaregistry import SchemaRegistryClient from azure.schemaregistry.serializer.avroserializer import AvroSerializer -from azure.schemaregistry.serializer.avroserializer._avro_serializer import AvroObjectSerializer +from azure.schemaregistry.serializer.avroserializer.exceptions import SchemaParseError, SchemaSerializationError, SchemaDeserializationError + +import avro +from avro.io import AvroTypeException +from azure.schemaregistry.serializer.avroserializer._apache_avro_serializer import ApacheAvroObjectSerializer as AvroObjectSerializer + from azure.identity import ClientSecretCredential from azure.core.exceptions import ClientAuthenticationError, ServiceRequestError, HttpResponseError @@ -44,18 +54,18 @@ def test_raw_avro_serializer(self): raw_avro_object_serializer = AvroObjectSerializer() # encoding part - encoded_payload = raw_avro_object_serializer.serialize(dict_data, schema) + encoded_payload = raw_avro_object_serializer.serialize(dict_data, schema_str) # decoding part - decoded_data = raw_avro_object_serializer.deserialize(encoded_payload, schema) + decoded_data = raw_avro_object_serializer.deserialize(encoded_payload, schema_str) assert decoded_data["name"] == u"Ben" assert decoded_data["favorite_number"] == 7 assert decoded_data["favorite_color"] == u"red" dict_data_missing_optional_fields = {"name": u"Alice"} - encoded_payload = raw_avro_object_serializer.serialize(dict_data_missing_optional_fields, schema) - decoded_data = raw_avro_object_serializer.deserialize(encoded_payload, schema) + encoded_payload = raw_avro_object_serializer.serialize(dict_data_missing_optional_fields, schema_str) + decoded_data = raw_avro_object_serializer.deserialize(encoded_payload, schema_str) assert decoded_data["name"] == u"Alice" assert not decoded_data["favorite_number"] @@ -67,12 +77,12 @@ def test_raw_avro_serializer_negative(self): raw_avro_object_serializer = AvroObjectSerializer() dict_data_wrong_type = {"name": u"Ben", "favorite_number": u"something", "favorite_color": u"red"} - with pytest.raises(avro.io.AvroTypeException): - raw_avro_object_serializer.serialize(dict_data_wrong_type, schema) + with pytest.raises(AvroTypeException): # avro.io.AvroTypeException + raw_avro_object_serializer.serialize(dict_data_wrong_type, schema_str) dict_data_missing_required_field = {"favorite_number": 7, "favorite_color": u"red"} - with pytest.raises(avro.io.AvroTypeException): - raw_avro_object_serializer.serialize(dict_data_missing_required_field, schema) + with pytest.raises(AvroTypeException): # avro.io.AvroTypeException + raw_avro_object_serializer.serialize(dict_data_missing_required_field, schema_str) @SchemaRegistryPowerShellPreparer() def test_basic_sr_avro_serializer_with_auto_register_schemas(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): @@ -117,3 +127,302 @@ def test_basic_sr_avro_serializer_without_auto_register_schemas(self, schemaregi assert decoded_data["favorite_color"] == u"red" sr_avro_serializer.close() + + + ################################################################# + ######################### PARSE SCHEMAS ######################### + ################################################################# + + @SchemaRegistryPowerShellPreparer() + def test_parse_invalid_json_string(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_basic_client(SchemaRegistryClient, fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + invalid_schema = { + "name":"User", + "type":"record", + "namespace":"example.avro", + "fields":[{"name":"name","type":"string"}] + } + invalid_schema_string = "{}".format(invalid_schema) + with pytest.raises(SchemaParseError): # caught avro SchemaParseError + sr_avro_serializer.serialize({"name": u"Ben"}, schema=invalid_schema_string) + + ######################### PRIMITIVES ######################### + + @SchemaRegistryPowerShellPreparer() + def test_parse_primitive_types(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_basic_client(SchemaRegistryClient, fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + primitive_string = "string" + with pytest.raises(SchemaParseError) as e: + sr_avro_serializer.serialize("hello", schema=primitive_string) + + ######################### type fixed ######################### + + @SchemaRegistryPowerShellPreparer() + def test_parse_fixed_types(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_basic_client(SchemaRegistryClient, fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + # avro bug: should give warning from IgnoredLogicalType error since precision < 0 + #fixed_type_ignore_logical_type_error = """{"type": "fixed", "size": 4, "namespace":"example.avro", "name":"User", "precision": -1}""" + #sr_avro_serializer.serialize({}, schema=fixed_type_ignore_logical_type_error) + + schema_no_size = """{"type": "fixed", "name":"User"}""" + with pytest.raises(SchemaParseError): # caught AvroException + sr_avro_serializer.serialize({}, schema=schema_no_size) + + schema_no_name = """{"type": "fixed", "size": 3}""" + with pytest.raises(SchemaParseError): # caught SchemaParseError + sr_avro_serializer.serialize({}, schema=schema_no_name) + + schema_wrong_name = """{"type": "fixed", "name": 1, "size": 3}""" + with pytest.raises(SchemaParseError): # caught SchemaParseError + sr_avro_serializer.serialize({}, schema=schema_wrong_name) + + schema_wrong_namespace = """{"type": "fixed", "name": "User", "size": 3, "namespace": 1}""" + with pytest.raises(SchemaParseError): # caught SchemaParseError + sr_avro_serializer.serialize({}, schema=schema_wrong_namespace) + + ######################### type unspecified ######################### + + @SchemaRegistryPowerShellPreparer() + def test_parse_invalid_type(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_basic_client(SchemaRegistryClient, fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + schema_no_type = """{ + "name": "User", + "namespace":"example.avro", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): # caught avro SchemaParseError + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_no_type) + + schema_wrong_type_type = """{ + "name":"User", + "type":1, + "namespace":"example.avro", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_wrong_type_type) + + ######################### RECORD SCHEMA ######################### + + @SchemaRegistryPowerShellPreparer() + def test_parse_record_name(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_basic_client(SchemaRegistryClient, fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + schema_name_has_dot = """{ + "namespace": "thrownaway", + "name":"User.avro", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + encoded_schema = sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_name_has_dot) + schema_id = encoded_schema[4:36].decode("utf-8") + registered_schema = sr_client.get_schema(schema_id) + decoded_registered_schema = json.loads(registered_schema.definition) + + # ensure that namespace is saved as part of name before . in registered schema + assert decoded_registered_schema["name"] == "User.avro" + assert decoded_registered_schema["namespace"] == "thrownaway" + + schema_name_no_namespace = """{ + "name":"User", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + encoded_schema = sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_name_no_namespace) + schema_id = encoded_schema[4:36].decode("utf-8") + registered_schema = sr_client.get_schema(schema_id) + decoded_registered_schema = json.loads(registered_schema.definition) + + assert decoded_registered_schema["name"] == "User" + assert "namespace" not in decoded_registered_schema + + schema_invalid_fullname = """{ + "name":"abc", + "type":"record", + "namespace":"9example.avro", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_invalid_fullname) + + schema_invalid_name_in_fullname = """{ + "name":"1abc", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_invalid_name_in_fullname) + + schema_invalid_name_reserved_type = """{ + "name":"record", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_invalid_name_reserved_type) + + schema_wrong_type_name = """{ + "name":1, + "type":"record", + "namespace":"example.avro", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_wrong_type_name) + + schema_no_name = """{ + "namespace":"example.avro", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_no_name) + + @SchemaRegistryPowerShellPreparer() + def test_parse_error_schema_as_record(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_basic_client(SchemaRegistryClient, fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + schema_error_type = """{ + "name":"User", + "namespace":"example.avro.error", + "type":"error", + "fields":[{"name":"name","type":"string"}] + }""" + encoded_data = sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_error_type) + schema_id = encoded_data[4:36].decode("utf-8") + registered_schema = sr_client.get_schema(schema_id) + decoded_registered_schema = json.loads(registered_schema.definition) + assert decoded_registered_schema["type"] == "error" + + @SchemaRegistryPowerShellPreparer() + def test_parse_record_fields(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_basic_client(SchemaRegistryClient, fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + schema_no_fields = """{ + "name":"User", + "namespace":"example.avro", + "type":"record" + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_no_fields) + + schema_wrong_type_fields = """{ + "name":"User", + "namespace":"example.avro", + "type":"record" + "fields": "hello" + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_wrong_type_fields) + + schema_wrong_field_item_type = """{ + "name":"User", + "namespace":"example.avro", + "type":"record" + "fields": ["hello"] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_wrong_field_item_type) + + schema_record_field_no_name= """{ + "name":"User", + "namespace":"example.avro", + "type":"record", + "fields":[{"type":"string"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_record_field_no_name) + + schema_record_field_wrong_type_name= """{ + "name":"User", + "namespace":"example.avro", + "type":"record", + "fields":[{"name": 1, "type":"string"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_record_field_wrong_type_name) + + schema_record_field_with_invalid_order = """{ + "name":"User", + "namespace":"example.avro.order", + "type":"record", + "fields":[{"name":"name","type":"string","order":"fake_order"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_record_field_with_invalid_order) + + schema_record_duplicate_fields = """{ + "name":"User", + "namespace":"example.avro", + "type":"record", + "fields":[{"name":"name","type":"string"}, {"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_record_duplicate_fields) + + schema_field_type_invalid = """{ + "name":"User", + "namespace":"example.avro", + "type":"record", + "fields":[{"name":"name","type":1}] + }""" + with pytest.raises(SchemaParseError): + sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_field_type_invalid) + + ################################################################# + #################### SERIALIZE AND DESERIALIZE ################## + ################################################################# + + @SchemaRegistryPowerShellPreparer() + def test_serialize_primitive(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_basic_client(SchemaRegistryClient, fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + null_type = """{"type": "null"}""" + encoded_data = sr_avro_serializer.serialize(None, schema=null_type) + assert len(encoded_data) == 36 # assert no data encoded + + @SchemaRegistryPowerShellPreparer() + def test_serialize_record(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_basic_client(SchemaRegistryClient, fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + # add below to schema fields later if needed + # {"name":"example.innerrec","type":"record","fields":[{"name":"a","type":"int"}]}, + # {"name":"innerenum","type":"enum","symbols":["FOO", "BAR"]}, + # {"name":"innerarray","type":"array","items":"int"}, + # {"name":"innermap","type":"map","values":"int"}, + # {"name":"innerfixed","type":"fixed","size":74} + schema_record = """{ + "name":"User", + "namespace":"example.avro.populatedrecord", + "type":"record", + "fields":[ + {"name":"name","type":"string"}, + {"name":"age","type":"int"}, + {"name":"married","type":"boolean"}, + {"name":"height","type":"float"}, + {"name":"randb","type":"bytes"} + ] + }""" + data = { + "name": u"Ben", + "age": 3, + "married": False, + "height": 13.5, + "randb": b"\u00FF" + } + + encoded_data = sr_avro_serializer.serialize(data, schema=schema_record) + decoded_data = sr_avro_serializer.deserialize(encoded_data) + assert decoded_data == data diff --git a/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer_async.py b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer_async.py new file mode 100644 index 000000000000..44337bfcc12c --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry-avroserializer/tests/test_avro_serializer_async.py @@ -0,0 +1,396 @@ +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import functools +import pytest +import uuid +import json +from io import BytesIO +import pytest + +import avro +from avro.io import AvroTypeException + + +from azure.schemaregistry.aio import SchemaRegistryClient +from azure.schemaregistry.serializer.avroserializer.aio import AvroSerializer +from azure.schemaregistry.serializer.avroserializer.exceptions import SchemaParseError, SchemaSerializationError, SchemaDeserializationError +from azure.identity.aio import ClientSecretCredential +from azure.core.exceptions import ClientAuthenticationError, ServiceRequestError, HttpResponseError + +from devtools_testutils import AzureTestCase, PowerShellPreparer + +SchemaRegistryPowerShellPreparer = functools.partial(PowerShellPreparer, "schemaregistry", schemaregistry_fully_qualified_namespace="fake_resource.servicebus.windows.net/", schemaregistry_group="fakegroup") + +class AvroSerializerAsyncTests(AzureTestCase): + + def create_client(self, fully_qualified_namespace): + credential = self.get_credential(SchemaRegistryClient, is_async=True) + return self.create_client_from_credential(SchemaRegistryClient, credential, fully_qualified_namespace=fully_qualified_namespace, is_async=True) + + @pytest.mark.asyncio + @SchemaRegistryPowerShellPreparer() + async def test_basic_sr_avro_serializer_with_auto_register_schemas(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + async with sr_client: + schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" + schema_str = "{\"type\": \"record\", \"name\": \"User\", \"namespace\": \"example.avro\", \"fields\": [{\"type\": \"string\", \"name\": \"name\"}, {\"type\": [\"int\", \"null\"], \"name\": \"favorite_number\"}, {\"type\": [\"string\", \"null\"], \"name\": \"favorite_color\"}]}" + schema = avro.schema.parse(schema_str) + + dict_data = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + encoded_data = await sr_avro_serializer.serialize(dict_data, schema=schema_str) + + assert encoded_data[0:4] == b'\0\0\0\0' + schema_properties = await sr_client.get_schema_properties(schemaregistry_group, schema.fullname, str(schema), "Avro") + schema_id = schema_properties.id + assert encoded_data[4:36] == schema_id.encode("utf-8") + + decoded_data = await sr_avro_serializer.deserialize(encoded_data) + assert decoded_data["name"] == u"Ben" + assert decoded_data["favorite_number"] == 7 + assert decoded_data["favorite_color"] == u"red" + + @pytest.mark.asyncio + @SchemaRegistryPowerShellPreparer() + async def test_basic_sr_avro_serializer_without_auto_register_schemas(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + async with sr_client: + schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" + schema_str = "{\"type\": \"record\", \"name\": \"User\", \"namespace\": \"example.avro\", \"fields\": [{\"type\": \"string\", \"name\": \"name\"}, {\"type\": [\"int\", \"null\"], \"name\": \"favorite_number\"}, {\"type\": [\"string\", \"null\"], \"name\": \"favorite_color\"}]}" + schema = avro.schema.parse(schema_str) + + dict_data = {"name": u"Ben", "favorite_number": 7, "favorite_color": u"red"} + encoded_data = await sr_avro_serializer.serialize(dict_data, schema=schema_str) + + assert encoded_data[0:4] == b'\0\0\0\0' + schema_properties = await sr_client.get_schema_properties(schemaregistry_group, schema.fullname, str(schema), "Avro") + schema_id = schema_properties.id + assert encoded_data[4:36] == schema_id.encode("utf-8") + + decoded_data = await sr_avro_serializer.deserialize(encoded_data) + assert decoded_data["name"] == u"Ben" + assert decoded_data["favorite_number"] == 7 + assert decoded_data["favorite_color"] == u"red" + + ################################################################# + ######################### PARSE SCHEMAS ######################### + ################################################################# + + @SchemaRegistryPowerShellPreparer() + async def test_parse_invalid_json_string(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + invalid_schema = { + "name":"User", + "type":"record", + "namespace":"example.avro", + "fields":[{"name":"name","type":"string"}] + } + invalid_schema_string = "{}".format(invalid_schema) + with pytest.raises(SchemaParseError): # caught avro SchemaParseError + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=invalid_schema_string) + + ######################### PRIMITIVES ######################### + + @SchemaRegistryPowerShellPreparer() + async def test_parse_primitive_types(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + primitive_string = "string" + with pytest.raises(SchemaParseError) as e: + await sr_avro_serializer.serialize("hello", schema=primitive_string) + + ######################### type fixed ######################### + + @SchemaRegistryPowerShellPreparer() + async def test_parse_fixed_types(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + # avro bug: should give warning from IgnoredLogicalType error since precision < 0 + #fixed_type_ignore_logical_type_error = """{"type": "fixed", "size": 4, "namespace":"example.avro", "name":"User", "precision": -1}""" + #await sr_avro_serializer.serialize({}, schema=fixed_type_ignore_logical_type_error) + + schema_no_size = """{"type": "fixed", "name":"User"}""" + with pytest.raises(SchemaParseError): # caught AvroException + await sr_avro_serializer.serialize({}, schema=schema_no_size) + + schema_no_name = """{"type": "fixed", "size": 3}""" + with pytest.raises(SchemaParseError): # caught SchemaParseError + await sr_avro_serializer.serialize({}, schema=schema_no_name) + + schema_wrong_name = """{"type": "fixed", "name": 1, "size": 3}""" + with pytest.raises(SchemaParseError): # caught SchemaParseError + await sr_avro_serializer.serialize({}, schema=schema_wrong_name) + + schema_wrong_namespace = """{"type": "fixed", "name": "User", "size": 3, "namespace": 1}""" + with pytest.raises(SchemaParseError): # caught SchemaParseError + await sr_avro_serializer.serialize({}, schema=schema_wrong_namespace) + + ######################### type unspecified ######################### + + @SchemaRegistryPowerShellPreparer() + async def test_parse_invalid_type(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + schema_no_type = """{ + "name": "User", + "namespace":"example.avro", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): # caught avro SchemaParseError + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_no_type) + + schema_wrong_type_type = """{ + "name":"User", + "type":1, + "namespace":"example.avro", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_wrong_type_type) + + ######################### RECORD SCHEMA ######################### + + @SchemaRegistryPowerShellPreparer() + async def test_parse_record_name(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + schema_name_has_dot = """{ + "namespace": "thrownaway", + "name":"User.avro", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + encoded_schema = await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_name_has_dot) + schema_id = encoded_schema[4:36].decode("utf-8") + registered_schema = await sr_client.get_schema(schema_id) + decoded_registered_schema = json.loads(registered_schema.definition) + + assert decoded_registered_schema["name"] == "User.avro" + assert decoded_registered_schema["namespace"] == "thrownaway" + + schema_name_no_namespace = """{ + "name":"User", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + encoded_schema = await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_name_no_namespace) + schema_id = encoded_schema[4:36].decode("utf-8") + registered_schema = await sr_client.get_schema(schema_id) + decoded_registered_schema = json.loads(registered_schema.definition) + + assert decoded_registered_schema["name"] == "User" + assert "namespace" not in decoded_registered_schema + + schema_invalid_fullname = """{ + "name":"abc", + "type":"record", + "namespace":"9example.avro", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_invalid_fullname) + + schema_invalid_name_in_fullname = """{ + "name":"1abc", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_invalid_name_in_fullname) + + schema_invalid_name_reserved_type = """{ + "name":"record", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_invalid_name_reserved_type) + + schema_wrong_type_name = """{ + "name":1, + "type":"record", + "namespace":"example.avro", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_wrong_type_name) + + schema_no_name = """{ + "namespace":"example.avro", + "type":"record", + "fields":[{"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_no_name) + + @SchemaRegistryPowerShellPreparer() + async def test_parse_error_schema_as_record(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + schema_error_type = """{ + "name":"User", + "namespace":"example.avro.error", + "type":"error", + "fields":[{"name":"name","type":"string"}] + }""" + encoded_data = await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_error_type) + schema_id = encoded_data[4:36].decode("utf-8") + registered_schema = await sr_client.get_schema(schema_id) + decoded_registered_schema = json.loads(registered_schema.definition) + assert decoded_registered_schema["type"] == "error" + + @SchemaRegistryPowerShellPreparer() + async def test_parse_record_fields(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + schema_no_fields = """{ + "name":"User", + "namespace":"example.avro", + "type":"record" + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_no_fields) + + schema_wrong_type_fields = """{ + "name":"User", + "namespace":"example.avro", + "type":"record" + "fields": "hello" + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_wrong_type_fields) + + schema_wrong_field_item_type = """{ + "name":"User", + "namespace":"example.avro", + "type":"record" + "fields": ["hello"] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_wrong_field_item_type) + + schema_record_field_no_name= """{ + "name":"User", + "namespace":"example.avro", + "type":"record", + "fields":[{"type":"string"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_record_field_no_name) + + schema_record_field_wrong_type_name= """{ + "name":"User", + "namespace":"example.avro", + "type":"record", + "fields":[{"name": 1, "type":"string"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_record_field_wrong_type_name) + + schema_record_field_with_invalid_order = """{ + "name":"User", + "namespace":"example.avro.order", + "type":"record", + "fields":[{"name":"name","type":"string","order":"fake_order"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_record_field_with_invalid_order) + + schema_record_duplicate_fields = """{ + "name":"User", + "namespace":"example.avro", + "type":"record", + "fields":[{"name":"name","type":"string"}, {"name":"name","type":"string"}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_record_duplicate_fields) + + schema_field_type_invalid = """{ + "name":"User", + "namespace":"example.avro", + "type":"record", + "fields":[{"name":"name","type":1}] + }""" + with pytest.raises(SchemaParseError): + await sr_avro_serializer.serialize({"name": u"Ben"}, schema=schema_field_type_invalid) + + ################################################################# + #################### SERIALIZE AND DESERIALIZE ################## + ################################################################# + + @SchemaRegistryPowerShellPreparer() + async def test_serialize_primitive(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + null_type = """{"type": "null"}""" + encoded_data = await sr_avro_serializer.serialize(None, schema=null_type) + assert len(encoded_data) == 36 # assert no data encoded + + @SchemaRegistryPowerShellPreparer() + async def test_serialize_record(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): + sr_client = self.create_client(fully_qualified_namespace=schemaregistry_fully_qualified_namespace) + sr_avro_serializer = AvroSerializer(client=sr_client, group_name=schemaregistry_group, auto_register_schemas=True) + + # add below to schema later if possible + # {"name":"example.innerrec","type":"record","fields":[{"name":"a","type":"int"}]}, + # {"name":"innerenum","type":"enum","symbols":["FOO", "BAR"]}, + # {"name":"innerarray","type":"array","items":"int"}, + # {"name":"innermap","type":"map","values":"int"}, + # {"name":"innerfixed","type":"fixed","size":74} + schema_record = """{ + "name":"User", + "namespace":"example.avro.populatedrecord", + "type":"record", + "fields":[ + {"name":"name","type":"string"}, + {"name":"age","type":"int"}, + {"name":"married","type":"boolean"}, + {"name":"height","type":"float"}, + {"name":"randb","type":"bytes"} + ] + }""" + data = { + "name": u"Ben", + "age": 3, + "married": False, + "height": 13.5, + "randb": b"\u00FF" + } + + encoded_data = await sr_avro_serializer.serialize(data, schema=schema_record) + decoded_data = await sr_avro_serializer.deserialize(encoded_data) + assert decoded_data == data diff --git a/sdk/schemaregistry/azure-schemaregistry/CHANGELOG.md b/sdk/schemaregistry/azure-schemaregistry/CHANGELOG.md index ebde833452a0..a966f83288b1 100644 --- a/sdk/schemaregistry/azure-schemaregistry/CHANGELOG.md +++ b/sdk/schemaregistry/azure-schemaregistry/CHANGELOG.md @@ -1,9 +1,31 @@ # Release History -## 1.0.0b4 (Unreleased) +## 1.0.0 (2021-11-10) + +**Note:** This is the first stable release of our efforts to create a user-friendly and Pythonic client library for Azure Schema Registry. ### Features Added +- `SchemaRegistryClient` is the top-level client class interacting with the Azure Schema Registry Service. It provides three methods: + - `register_schema`: Store schema in the service by providing schema group name, schema name, schema definition, and schema format. + - `get_schema`: Get schema definition and its properties by schema id. + - `get_schema_properties`: Get schema properties by providing schema group name, schema name, schema definition, and schema format. +- `SchemaProperties` has the following instance variables: `id` and `format`: + - The type of `format` has been changed from `str` to `SchemaFormat`. +- `Schema` has the following properties: `properties` and `definition`. +- `SchemaFormat` provides the schema format to be stored by the service. Currently, the only supported format is `Avro`. +- `api_version` has been added as a keyword arg to the sync and async `SchemaRegistryClient` constructors. + +### Breaking Changes + +- `version` instance variable in `SchemaProperties` has been removed. +- `schema_definition` instance variable in `Schema` has been renamed `definition`. +- `id` parameter in `get_schema` method on sync and async `SchemaRegistryClient` has been renamed `schema_id`. +- `schema_definition` parameter in `register_schema` and `get_schema_properties` methods on sync and async `SchemaRegistryClient` has been renamed `definition`. +- `serializer` namespace has been removed from `azure.schemaregistry`. + +## 1.0.0b3 (2021-10-05) + ### Breaking Changes ### Bugs Fixed diff --git a/sdk/schemaregistry/azure-schemaregistry/README.md b/sdk/schemaregistry/azure-schemaregistry/README.md index 3369dc50d9a6..aef9e1f628d5 100644 --- a/sdk/schemaregistry/azure-schemaregistry/README.md +++ b/sdk/schemaregistry/azure-schemaregistry/README.md @@ -14,10 +14,10 @@ _Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For ### Install the package -Install the Azure Schema Registry client library and Azure Identity client library for Python with [pip][pip]: +Install the Azure Schema Registry client library for Python with [pip][pip]: ```Bash -pip install azure-schemaregistry azure-identity +pip install azure-schemaregistry ``` ### Prerequisites: @@ -27,7 +27,23 @@ To use this package, you must have: * Python 2.7, 3.6 or later - [Install Python][python] ### Authenticate the client -Interaction with Schema Registry starts with an instance of SchemaRegistryClient class. You need the fully qualified namespace and AAD credential to instantiate the client object. + +Interaction with Schema Registry starts with an instance of SchemaRegistryClient class. The client constructor takes the fully qualified namespace and an Azure Active Directory credential: + +* The fully qualified namespace of the Schema Registry instance should follow the format: `.servicebus.windows.net`. + +* An AAD credential that implements the [TokenCredential][token_credential_interface] protocol should be passed to the constructor. There are implementations of the `TokenCredential` protocol available in the +[azure-identity package][pypi_azure_identity]. To use the credential types provided by `azure-identity`, please install the Azure Identity client library for Python with [pip][pip]: + +```Bash +pip install azure-identity +``` + +* Additionally, to use the async API supported on Python 3.6+, you must first install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/): + +```Bash +pip install aiohttp +``` **Create client using the azure-identity library:** @@ -43,7 +59,9 @@ schema_registry_client = SchemaRegistryClient(fully_qualified_namespace, credent ## Key concepts -- Schema: Schema is the organization or structure for data. +- Schema: Schema is the organization or structure for data. More detailed information can be found [here][schemas]. + +- Schema Group: A logical group of similar schemas based on business criteria, which can hold multiple versions of a schema. More detailed information can be found [here][schema_groups]. - SchemaRegistryClient: `SchemaRegistryClient` provides the API for storing and retrieving schemas in schema registry. @@ -67,10 +85,10 @@ from azure.schemaregistry import SchemaRegistryClient token_credential = DefaultAzureCredential() fully_qualified_namespace = os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] -group_name = "" -name = "" +group_name = os.environ['SCHEMA_REGISTRY_GROUP'] +name = "your-schema-name" format = "Avro" -schema_definition = """ +definition = """ {"namespace": "example.avro", "type": "record", "name": "User", @@ -84,13 +102,13 @@ schema_definition = """ schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=fully_qualified_namespace, credential=token_credential) with schema_registry_client: - schema_properties = schema_registry_client.register_schema(group_name, name, schema_definition, format) + schema_properties = schema_registry_client.register_schema(group_name, name, definition, format) id = schema_properties.id ``` ### Get the schema by id -Get the schema content and its properties by schema id. +Get the schema definition and its properties by schema id. ```python import os @@ -100,17 +118,18 @@ from azure.schemaregistry import SchemaRegistryClient token_credential = DefaultAzureCredential() fully_qualified_namespace = os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] -id = '' +schema_id = 'your-schema-id' schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=fully_qualified_namespace, credential=token_credential) with schema_registry_client: - schema = schema_registry_client.get_schema(id) - schema_definition = schema.schema_definition + schema = schema_registry_client.get_schema(schema_id) + definition = schema.definition + properties = schema.properties ``` ### Get the id of a schema -Get the schema id of a schema by schema content and its properties. +Get the schema id of a schema by schema definition and its properties. ```python import os @@ -120,10 +139,10 @@ from azure.schemaregistry import SchemaRegistryClient token_credential = DefaultAzureCredential() fully_qualified_namespace = os.environ['SCHEMA_REGISTRY_FULLY_QUALIFIED_NAMESPACE'] -group_name = "" -name = "" +group_name = os.environ['SCHEMA_REGISTRY_GROUP'] +name = "your-schema-name" format = "Avro" -schema_definition = """ +definition = """ {"namespace": "example.avro", "type": "record", "name": "User", @@ -137,7 +156,7 @@ schema_definition = """ schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=fully_qualified_namespace, credential=token_credential) with schema_registry_client: - schema_properties = schema_registry_client.register_schema(group_name, name, schema_definition, format) + schema_properties = schema_registry_client.register_schema(group_name, name, definition, format) id = schema_properties.id ``` @@ -186,13 +205,6 @@ schema_registry_client.get_schema(id, logging_enable=True) Please take a look at the [samples][sr_samples] directory for detailed examples of how to use this library to register and retrieve schema to/from Schema Registry. -### Event Hubs and Avro Serializer - -We provide [azure-schemaregistry-avroserializer][schemaregistry_avroserializer_pypi] library as serializer -implementation to serialize/deserialize avro data integrated with `azure-schemaregistry` for automatic schema registration and retrieval. -It integrates nicely with the [EventHubs SDK][eventhubs_repo]. -For more information and sample codes, please refer to the [Azure Schema Registry Avro Serializer SDK][schemaregistry_avroserializer_repo]. - ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a @@ -215,10 +227,12 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio [azure_sub]: https://azure.microsoft.com/free/ [python_logging]: https://docs.python.org/3/library/logging.html [sr_samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry/samples -[api_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-schemaregistry/latest/index.html +[api_reference]: https://docs.microsoft.com/python/api/overview/azure/schemaregistry-readme [source_code]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry [change_log]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry/CHANGELOG.md +[schemas]: https://docs.microsoft.com/azure/event-hubs/schema-registry-overview#schemas +[schema_groups]: https://docs.microsoft.com/azure/event-hubs/schema-registry-overview#schema-groups [schemaregistry_service]: https://aka.ms/schemaregistry -[schemaregistry_avroserializer_repo]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry-avroserializer [schemaregistry_avroserializer_pypi]: https://pypi.org/project/azure-schemaregistry-avroserializer/ -[eventhubs_repo]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventhub/azure-eventhub \ No newline at end of file +[token_credential_interface]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/core/azure-core/azure/core/credentials.py +[pypi_azure_identity]: https://pypi.org/project/azure-identity/ \ No newline at end of file diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/__init__.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/__init__.py index 861214080424..a63ec495a201 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/__init__.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/__init__.py @@ -27,10 +27,11 @@ __version__ = VERSION from ._schema_registry_client import SchemaRegistryClient -from ._common._constants import SchemaFormat +from ._common._constants import SchemaFormat, ApiVersion from ._common._schema import Schema, SchemaProperties __all__ = [ + "ApiVersion", "SchemaRegistryClient", "SchemaFormat", "Schema", diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_constants.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_constants.py index 48973ddb7673..4266eb71b36f 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_constants.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_constants.py @@ -27,4 +27,21 @@ class SchemaFormat(str, Enum): - AVRO = "avro" + """ + Represents the format of the schema to be stored by the Schema Registry service. + """ + + AVRO = "Avro" + """Represents the Apache Avro schema format.""" + + +class ApiVersion(str, Enum): + """ + Represents the Schema Registry API version to use for requests. + """ + + V2021_10 = "2021-10" + """This is the default version.""" + + +DEFAULT_VERSION = ApiVersion.V2021_10 diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_response_handlers.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_response_handlers.py index fe6301610094..42b9171272e6 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_response_handlers.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_response_handlers.py @@ -24,26 +24,25 @@ # # -------------------------------------------------------------------------- from ._schema import SchemaProperties, Schema +from ._constants import SchemaFormat def _parse_schema_properties_dict(response): - return { - 'id': response.headers.get('schema-id'), - 'format': response.headers.get('serialization-type'), - 'version': int(response.headers.get('schema-version')) - } + return {"id": response.headers.get("schema-id")} -def _parse_response_schema_properties(response): +def _parse_response_schema_properties(response, format): + # pylint:disable=redefined-builtin properties_dict = _parse_schema_properties_dict(response) - properties_dict['id'] = response.json()["id"] - return SchemaProperties( - **properties_dict - ) + properties_dict["format"] = SchemaFormat(format) + return SchemaProperties(**properties_dict) def _parse_response_schema(response): + # pylint:disable=redefined-builtin + schema_props_dict = _parse_schema_properties_dict(response) + format = response.headers.get("content-type").split("serialization=")[1] + schema_props_dict["format"] = SchemaFormat(format) return Schema( - schema_definition=response.text(), - properties=SchemaProperties(**_parse_schema_properties_dict(response)) + definition=response.text(), properties=SchemaProperties(**schema_props_dict) ) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_schema.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_schema.py index cd706e3329e0..d35886a04a8c 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_schema.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_common/_schema.py @@ -31,57 +31,36 @@ class SchemaProperties(object): Meta properties of a schema. :ivar id: References specific schema in registry namespace. - :type id: str + :vartype id: str :ivar format: Format for the schema being stored. - :type format: str - :ivar version: Version of the returned schema. - :type version: int - - .. admonition:: Example: - - .. literalinclude:: ../samples/sync_samples/sample_code_schemaregistry.py - :start-after: [START print_schema_properties] - :end-before: [END print_schema_properties] - :language: python - :dedent: 4 - :caption: SchemaProperties object. - + :vartype format: ~azure.schemaregistry.SchemaFormat """ - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): # type: (Any) -> None - self.id = kwargs.pop('id') - self.format = kwargs.pop('format') - self.version = kwargs.pop('version') + self.id = kwargs.pop("id") + self.format = kwargs.pop("format") + + def __repr__(self): + return "SchemaProperties(id={}, format={})".format(self.id, self.format)[:1024] class Schema(object): """ The schema content of a schema, along with id and meta properties. - :ivar schema_definition: The content of the schema. - :type schema_definition: str + :ivar definition: The content of the schema. + :vartype definition: str :ivar properties: The properties of the schema. - :type properties: SchemaProperties - - .. admonition:: Example: - - .. literalinclude:: ../samples/sync_samples/sample_code_schemaregistry.py - :start-after: [START print_schema] - :end-before: [END print_schema] - :language: python - :dedent: 4 - :caption: Schema object. - + :vartype properties: SchemaProperties """ - def __init__( - self, - **kwargs - ): + def __init__(self, **kwargs): # type: (Any) -> None - self.schema_definition = kwargs.pop("schema_definition") + self.definition = kwargs.pop("definition") self.properties = kwargs.pop("properties") + + def __repr__(self): + return "Schema(definition={}, properties={})".format( + self.definition, self.properties + )[:1024] diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_azure_schema_registry.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_azure_schema_registry.py index 88b91b022989..00add03ba263 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_azure_schema_registry.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_azure_schema_registry.py @@ -16,35 +16,37 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Dict + from typing import Any, Dict, Optional from azure.core.credentials import TokenCredential from azure.core.rest import HttpRequest, HttpResponse class AzureSchemaRegistry(object): - """Azure Schema Registry is as a central schema repository, complete with support for versioning, management, compatibility checking, and RBAC. + """Azure Schema Registry is as a central schema repository, with support for versioning, management, compatibility checking, and RBAC. - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential :param endpoint: The Schema Registry service endpoint, for example - my-namespace.servicebus.windows.net. + my-namespace.servicebus.windows.net. :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( self, - credential, # type: "TokenCredential" endpoint, # type: str + credential, # type: "TokenCredential" **kwargs # type: Any ): # type: (...) -> None - base_url = 'https://{endpoint}' - self._config = AzureSchemaRegistryConfiguration(credential, endpoint, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + _endpoint = 'https://{endpoint}' + self._config = AzureSchemaRegistryConfiguration(endpoint=endpoint, credential=credential, **kwargs) + self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) - client_models = {} # type: Dict[str, Any] - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False @@ -59,17 +61,14 @@ def send_request( We have helper methods to create requests specific to this service in `azure.schemaregistry._generated.rest`. Use these helper methods to create the request you pass to this method. - >>> from azure.schemaregistry._generated.rest import schema - >>> request = schema.build_get_by_id_request(schema_id, **kwargs) - + >>> from azure.schemaregistry._generated.rest import schema_groups + >>> request = schema_groups.build_list_request(**kwargs) + >>> response = client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - For advanced cases, you can also create your own :class:`~azure.core.rest.HttpRequest` - and pass it in. - :param request: The network request you want to make. Required. :type request: ~azure.core.rest.HttpRequest :keyword bool stream: Whether the response payload will be streamed. Defaults to False. @@ -79,8 +78,9 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, **kwargs) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_configuration.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_configuration.py index fb4ed293de7f..56aeb7d31ae5 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_configuration.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_configuration.py @@ -26,28 +26,32 @@ class AzureSchemaRegistryConfiguration(Configuration): Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials.TokenCredential :param endpoint: The Schema Registry service endpoint, for example my-namespace.servicebus.windows.net. :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( self, - credential, # type: "TokenCredential" endpoint, # type: str + credential, # type: "TokenCredential" **kwargs # type: Any ): # type: (...) -> None - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") + super(AzureSchemaRegistryConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-10") # type: str + if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") - super(AzureSchemaRegistryConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") - self.credential = credential self.endpoint = endpoint - self.api_version = "2020-09-01-preview" + self.credential = credential + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://eventhubs.azure.net/.default']) kwargs.setdefault('sdk_moniker', 'azureschemaregistry/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_vendor.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_vendor.py new file mode 100644 index 000000000000..e12b61dea670 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_vendor.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + + + + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_version.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_version.py index 20971492f129..c47f66669f1b 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_version.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b3" +VERSION = "1.0.0" diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/__init__.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/__init__.py index ae36d95dbeb0..364c2835fe35 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/__init__.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/__init__.py @@ -8,3 +8,9 @@ from ._azure_schema_registry import AzureSchemaRegistry __all__ = ['AzureSchemaRegistry'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/_azure_schema_registry.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/_azure_schema_registry.py index 7257cb3e6be2..a0cbea419d8b 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/_azure_schema_registry.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/_azure_schema_registry.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING +from typing import Any, Awaitable, Optional, TYPE_CHECKING from azure.core import AsyncPipelineClient from azure.core.rest import AsyncHttpResponse, HttpRequest @@ -22,28 +22,30 @@ from azure.core.credentials_async import AsyncTokenCredential class AzureSchemaRegistry: - """Azure Schema Registry is as a central schema repository, complete with support for versioning, management, compatibility checking, and RBAC. + """Azure Schema Registry is as a central schema repository, with support for versioning, management, compatibility checking, and RBAC. - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param endpoint: The Schema Registry service endpoint, for example - my-namespace.servicebus.windows.net. + my-namespace.servicebus.windows.net. :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( self, - credential: "AsyncTokenCredential", endpoint: str, + credential: "AsyncTokenCredential", **kwargs: Any ) -> None: - base_url = 'https://{endpoint}' - self._config = AzureSchemaRegistryConfiguration(credential, endpoint, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + _endpoint = 'https://{endpoint}' + self._config = AzureSchemaRegistryConfiguration(endpoint=endpoint, credential=credential, **kwargs) + self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) - client_models = {} # type: Dict[str, Any] - self._serialize = Serializer(client_models) - self._deserialize = Deserializer(client_models) + self._serialize = Serializer() + self._deserialize = Deserializer() self._serialize.client_side_validation = False @@ -57,17 +59,14 @@ def send_request( We have helper methods to create requests specific to this service in `azure.schemaregistry._generated.rest`. Use these helper methods to create the request you pass to this method. - >>> from azure.schemaregistry._generated.rest import schema - >>> request = schema.build_get_by_id_request(schema_id, **kwargs) - + >>> from azure.schemaregistry._generated.rest import schema_groups + >>> request = schema_groups.build_list_request(**kwargs) + >>> response = await client.send_request(request) For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart - For advanced cases, you can also create your own :class:`~azure.core.rest.HttpRequest` - and pass it in. - :param request: The network request you want to make. Required. :type request: ~azure.core.rest.HttpRequest :keyword bool stream: Whether the response payload will be streamed. Defaults to False. @@ -77,8 +76,9 @@ def send_request( request_copy = deepcopy(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) return self._client.send_request(request_copy, **kwargs) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/_configuration.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/_configuration.py index 4be551f17646..7d69074ed25c 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/_configuration.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/aio/_configuration.py @@ -24,27 +24,31 @@ class AzureSchemaRegistryConfiguration(Configuration): Note that all parameters used to create this instance are saved as instance attributes. - :param credential: Credential needed for the client to connect to Azure. - :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param endpoint: The Schema Registry service endpoint, for example my-namespace.servicebus.windows.net. :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str """ def __init__( self, - credential: "AsyncTokenCredential", endpoint: str, + credential: "AsyncTokenCredential", **kwargs: Any ) -> None: - if credential is None: - raise ValueError("Parameter 'credential' must not be None.") + super(AzureSchemaRegistryConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-10") # type: str + if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") - super(AzureSchemaRegistryConfiguration, self).__init__(**kwargs) + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") - self.credential = credential self.endpoint = endpoint - self.api_version = "2020-09-01-preview" + self.credential = credential + self.api_version = api_version self.credential_scopes = kwargs.pop('credential_scopes', ['https://eventhubs.azure.net/.default']) kwargs.setdefault('sdk_moniker', 'azureschemaregistry/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/__init__.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/__init__.py index d2eef77ebb1e..6a8648c12d82 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/__init__.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/__init__.py @@ -8,15 +8,18 @@ try: from ._request_builders_py3 import build_get_by_id_request + from ._request_builders_py3 import build_get_versions_request from ._request_builders_py3 import build_query_id_by_content_request from ._request_builders_py3 import build_register_request except (SyntaxError, ImportError): from ._request_builders import build_get_by_id_request # type: ignore + from ._request_builders import build_get_versions_request # type: ignore from ._request_builders import build_query_id_by_content_request # type: ignore from ._request_builders import build_register_request # type: ignore __all__ = [ 'build_get_by_id_request', + 'build_get_versions_request', 'build_query_id_by_content_request', 'build_register_request', ] diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/_request_builders.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/_request_builders.py index f8de4d17024c..209859062d0f 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/_request_builders.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/_request_builders.py @@ -7,46 +7,121 @@ # -------------------------------------------------------------------------- from typing import TYPE_CHECKING -from azure.core.pipeline.transport._base import _format_url_section from azure.core.rest import HttpRequest from msrest import Serializer +from ..._vendor import _format_url_section + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Optional + from typing import Any, IO, Optional, TypeVar + T = TypeVar('T') + JSONType = Any _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False # fmt: off def build_get_by_id_request( - schema_id, # type: str + id, # type: str **kwargs # type: Any ): # type: (...) -> HttpRequest """Get a registered schema by its unique ID reference. Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique - within a namespace. + within a namespace. Operation response type is based on serialization of schema requested. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. - :param schema_id: References specific schema in registry namespace. - :type schema_id: str + :param id: References specific schema in registry namespace. + :type id: str + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.core.rest.HttpRequest """ - api_version = "2020-09-01-preview" - accept = "text/plain; charset=utf-8" + api_version = kwargs.pop('api_version', "2021-10") # type: str + + accept = "application/json; serialization=Avro" # Construct URL - url = kwargs.pop("template_url", '/$schemagroups/getSchemaById/{schema-id}') + url = kwargs.pop("template_url", '/$schemaGroups/$schemas/{id}') path_format_arguments = { - 'schema-id': _SERIALIZER.url("schema_id", schema_id, 'str'), + "id": _SERIALIZER.url("id", id, 'str'), } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_versions_request( + group_name, # type: str + schema_name, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + """Get list schema versions. + + Gets the list of all versions of one schema. + + See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder + into your code flow. + + :param group_name: Schema group under which schema is registered. Group's serialization type + should match the serialization type specified in the request. + :type group_name: str + :param schema_name: Name of schema being registered. + :type schema_name: str + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's + `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to + incorporate this response into your code flow. + :rtype: ~azure.core.rest.HttpRequest + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "schemaVersions": [ + 0 # Optional. Array of schema groups. + ] + } + """ + + api_version = kwargs.pop('api_version', "2021-10") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/$schemaGroups/{groupName}/schemas/{schemaName}/versions') + path_format_arguments = { + "groupName": _SERIALIZER.url("group_name", group_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str', max_length=50, min_length=0, pattern=r'^[A-Za-z0-9][A-Za-z0-9_-]*$'), + } + url = _format_url_section(url, **path_format_arguments) # Construct parameters @@ -83,30 +158,31 @@ def build_query_id_by_content_request( :param group_name: Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. :type group_name: str - :param schema_name: Name of the registered schema. + :param schema_name: Name of requested schema. :type schema_name: str + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword content: Pass in binary content you want in the body of the request (typically bytes, a byte iterator, or stream input). String representation (UTF-8) of the registered schema. :paramtype content: any - :keyword serialization_type: Serialization type for the schema being registered. "avro" - :paramtype serialization_type: str :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.core.rest.HttpRequest """ + api_version = kwargs.pop('api_version', "2021-10") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - serialization_type = kwargs.pop('serialization_type') # type: str - api_version = "2020-09-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/$schemagroups/{group-name}/schemas/{schema-name}') + url = kwargs.pop("template_url", '/$schemaGroups/{groupName}/schemas/{schemaName}:get-id') path_format_arguments = { - 'group-name': _SERIALIZER.url("group_name", group_name, 'str'), - 'schema-name': _SERIALIZER.url("schema_name", schema_name, 'str'), + "groupName": _SERIALIZER.url("group_name", group_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str', max_length=50, min_length=0, pattern=r'^[A-Za-z0-9][A-Za-z0-9_-]*$'), } + url = _format_url_section(url, **path_format_arguments) # Construct parameters @@ -115,7 +191,6 @@ def build_query_id_by_content_request( # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Serialization-Type'] = _SERIALIZER.header("serialization_type", serialization_type, 'str') if content_type is not None: header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') @@ -149,29 +224,30 @@ def build_register_request( :type group_name: str :param schema_name: Name of schema being registered. :type schema_name: str + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword content: Pass in binary content you want in the body of the request (typically bytes, a byte iterator, or stream input). String representation (UTF-8) of the schema being registered. :paramtype content: any - :keyword serialization_type: Serialization type for the schema being registered. "avro" - :paramtype serialization_type: str :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.core.rest.HttpRequest """ + api_version = kwargs.pop('api_version', "2021-10") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - serialization_type = kwargs.pop('serialization_type') # type: str - api_version = "2020-09-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/$schemagroups/{group-name}/schemas/{schema-name}') + url = kwargs.pop("template_url", '/$schemaGroups/{groupName}/schemas/{schemaName}') path_format_arguments = { - 'group-name': _SERIALIZER.url("group_name", group_name, 'str'), - 'schema-name': _SERIALIZER.url("schema_name", schema_name, 'str'), + "groupName": _SERIALIZER.url("group_name", group_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str', max_length=50, min_length=0, pattern=r'^[A-Za-z0-9][A-Za-z0-9_-]*$'), } + url = _format_url_section(url, **path_format_arguments) # Construct parameters @@ -180,7 +256,6 @@ def build_register_request( # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Serialization-Type'] = _SERIALIZER.header("serialization_type", serialization_type, 'str') if content_type is not None: header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/_request_builders_py3.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/_request_builders_py3.py index 5199ea168200..1ef4d48b10f4 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/_request_builders_py3.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema/_request_builders_py3.py @@ -5,42 +5,116 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, Optional +from typing import Any, IO, Optional, TypeVar -from azure.core.pipeline.transport._base import _format_url_section from azure.core.rest import HttpRequest from msrest import Serializer +from ..._vendor import _format_url_section +T = TypeVar('T') +JSONType = Any + _SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False def build_get_by_id_request( - schema_id: str, + id: str, **kwargs: Any ) -> HttpRequest: """Get a registered schema by its unique ID reference. Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique - within a namespace. + within a namespace. Operation response type is based on serialization of schema requested. + + See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder + into your code flow. + + :param id: References specific schema in registry namespace. + :type id: str + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's + `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to + incorporate this response into your code flow. + :rtype: ~azure.core.rest.HttpRequest + """ + + api_version = kwargs.pop('api_version', "2021-10") # type: str + + accept = "application/json; serialization=Avro" + # Construct URL + url = kwargs.pop("template_url", '/$schemaGroups/$schemas/{id}') + path_format_arguments = { + "id": _SERIALIZER.url("id", id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_get_versions_request( + group_name: str, + schema_name: str, + **kwargs: Any +) -> HttpRequest: + """Get list schema versions. + + Gets the list of all versions of one schema. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder into your code flow. - :param schema_id: References specific schema in registry namespace. - :type schema_id: str + :param group_name: Schema group under which schema is registered. Group's serialization type + should match the serialization type specified in the request. + :type group_name: str + :param schema_name: Name of schema being registered. + :type schema_name: str + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.core.rest.HttpRequest + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "schemaVersions": [ + 0 # Optional. Array of schema groups. + ] + } """ - api_version = "2020-09-01-preview" - accept = "text/plain; charset=utf-8" + api_version = kwargs.pop('api_version', "2021-10") # type: str + + accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/$schemagroups/getSchemaById/{schema-id}') + url = kwargs.pop("template_url", '/$schemaGroups/{groupName}/schemas/{schemaName}/versions') path_format_arguments = { - 'schema-id': _SERIALIZER.url("schema_id", schema_id, 'str'), + "groupName": _SERIALIZER.url("group_name", group_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str', max_length=50, min_length=0, pattern=r'^[A-Za-z0-9][A-Za-z0-9_-]*$'), } + url = _format_url_section(url, **path_format_arguments) # Construct parameters @@ -65,7 +139,6 @@ def build_query_id_by_content_request( schema_name: str, *, content: Any, - serialization_type: str, **kwargs: Any ) -> HttpRequest: """Get ID for existing schema. @@ -79,29 +152,31 @@ def build_query_id_by_content_request( :param group_name: Schema group under which schema is registered. Group's serialization type should match the serialization type specified in the request. :type group_name: str - :param schema_name: Name of the registered schema. + :param schema_name: Name of requested schema. :type schema_name: str + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword content: Pass in binary content you want in the body of the request (typically bytes, a byte iterator, or stream input). String representation (UTF-8) of the registered schema. :paramtype content: any - :keyword serialization_type: Serialization type for the schema being registered. "avro" - :paramtype serialization_type: str :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.core.rest.HttpRequest """ + api_version = kwargs.pop('api_version', "2021-10") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/$schemagroups/{group-name}/schemas/{schema-name}') + url = kwargs.pop("template_url", '/$schemaGroups/{groupName}/schemas/{schemaName}:get-id') path_format_arguments = { - 'group-name': _SERIALIZER.url("group_name", group_name, 'str'), - 'schema-name': _SERIALIZER.url("schema_name", schema_name, 'str'), + "groupName": _SERIALIZER.url("group_name", group_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str', max_length=50, min_length=0, pattern=r'^[A-Za-z0-9][A-Za-z0-9_-]*$'), } + url = _format_url_section(url, **path_format_arguments) # Construct parameters @@ -110,7 +185,6 @@ def build_query_id_by_content_request( # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Serialization-Type'] = _SERIALIZER.header("serialization_type", serialization_type, 'str') if content_type is not None: header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') @@ -130,7 +204,6 @@ def build_register_request( schema_name: str, *, content: Any, - serialization_type: str, **kwargs: Any ) -> HttpRequest: """Register new schema. @@ -147,28 +220,30 @@ def build_register_request( :type group_name: str :param schema_name: Name of schema being registered. :type schema_name: str + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword content: Pass in binary content you want in the body of the request (typically bytes, a byte iterator, or stream input). String representation (UTF-8) of the schema being registered. :paramtype content: any - :keyword serialization_type: Serialization type for the schema being registered. "avro" - :paramtype serialization_type: str :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this response into your code flow. :rtype: ~azure.core.rest.HttpRequest """ + api_version = kwargs.pop('api_version', "2021-10") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] - api_version = "2020-09-01-preview" accept = "application/json" # Construct URL - url = kwargs.pop("template_url", '/$schemagroups/{group-name}/schemas/{schema-name}') + url = kwargs.pop("template_url", '/$schemaGroups/{groupName}/schemas/{schemaName}') path_format_arguments = { - 'group-name': _SERIALIZER.url("group_name", group_name, 'str'), - 'schema-name': _SERIALIZER.url("schema_name", schema_name, 'str'), + "groupName": _SERIALIZER.url("group_name", group_name, 'str'), + "schemaName": _SERIALIZER.url("schema_name", schema_name, 'str', max_length=50, min_length=0, pattern=r'^[A-Za-z0-9][A-Za-z0-9_-]*$'), } + url = _format_url_section(url, **path_format_arguments) # Construct parameters @@ -177,7 +252,6 @@ def build_register_request( # Construct headers header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - header_parameters['Serialization-Type'] = _SERIALIZER.header("serialization_type", serialization_type, 'str') if content_type is not None: header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/__init__.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/__init__.py new file mode 100644 index 000000000000..c1b19b7971e4 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + +try: + from ._request_builders_py3 import build_list_request +except (SyntaxError, ImportError): + from ._request_builders import build_list_request # type: ignore + +__all__ = [ + 'build_list_request', +] diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/_request_builders.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/_request_builders.py new file mode 100644 index 000000000000..91a9f28a9b03 --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/_request_builders.py @@ -0,0 +1,77 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING + +from azure.core.rest import HttpRequest +from msrest import Serializer + +from ..._vendor import _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, IO, Optional, TypeVar + T = TypeVar('T') + JSONType = Any + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + +# fmt: off + +def build_list_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + """Get list of schema groups. + + Gets the list of schema groups user is authorized to access. + + See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder + into your code flow. + + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's + `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to + incorporate this response into your code flow. + :rtype: ~azure.core.rest.HttpRequest + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "schemaGroups": [ + "str" # Optional. Array of schema groups. + ] + } + """ + + api_version = kwargs.pop('api_version', "2021-10") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/$schemaGroups') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/_request_builders_py3.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/_request_builders_py3.py new file mode 100644 index 000000000000..c1164ecf777e --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_generated/rest/schema_groups/_request_builders_py3.py @@ -0,0 +1,71 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, IO, Optional, TypeVar + +from azure.core.rest import HttpRequest +from msrest import Serializer + +from ..._vendor import _format_url_section +T = TypeVar('T') +JSONType = Any + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False + + +def build_list_request( + **kwargs: Any +) -> HttpRequest: + """Get list of schema groups. + + Gets the list of schema groups user is authorized to access. + + See https://aka.ms/azsdk/python/protocol/quickstart for how to incorporate this request builder + into your code flow. + + :keyword api_version: Api Version. The default value is "2021-10". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: Returns an :class:`~azure.core.rest.HttpRequest` that you will pass to the client's + `send_request` method. See https://aka.ms/azsdk/python/protocol/quickstart for how to + incorporate this response into your code flow. + :rtype: ~azure.core.rest.HttpRequest + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "schemaGroups": [ + "str" # Optional. Array of schema groups. + ] + } + """ + + api_version = kwargs.pop('api_version', "2021-10") # type: str + + accept = "application/json" + # Construct URL + url = kwargs.pop("template_url", '/$schemaGroups') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py index 7f41db19957f..25737915d65c 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py @@ -25,7 +25,8 @@ # -------------------------------------------------------------------------- from typing import Any, TYPE_CHECKING, Union -from ._common._constants import SchemaFormat +from ._utils import get_http_request_kwargs +from ._common._constants import SchemaFormat, DEFAULT_VERSION from ._common._schema import Schema, SchemaProperties from ._common._response_handlers import ( _parse_response_schema, @@ -41,13 +42,14 @@ class SchemaRegistryClient(object): """ - SchemaRegistryClient is as a central schema repository for enterprise-level data infrastructure, - complete with support for versioning and management. + SchemaRegistryClient is a client for registering and retrieving schemas from the Azure Schema Registry service. - :param str fully_qualified_namespace: The Schema Registry service fully qualified host name, - for example my-namespace.servicebus.windows.net. - :param credential: To authenticate to manage the entities of the SchemaRegistry namespace. - :type credential: TokenCredential + :param str fully_qualified_namespace: The Schema Registry service fully qualified host name. + For example: my-namespace.servicebus.windows.net. + :param credential: To authenticate managing the entities of the SchemaRegistry namespace. + :type credential: ~azure.core.credentials.TokenCredential + :keyword str api_version: The Schema Registry service API version to use for requests. + Default value and only accepted value currently is "2021-10". .. admonition:: Example: @@ -62,8 +64,12 @@ class SchemaRegistryClient(object): def __init__(self, fully_qualified_namespace, credential, **kwargs): # type: (str, TokenCredential, Any) -> None + api_version = kwargs.pop("api_version", DEFAULT_VERSION) self._generated_client = AzureSchemaRegistry( - credential=credential, endpoint=fully_qualified_namespace, **kwargs + credential=credential, + endpoint=fully_qualified_namespace, + api_version=api_version, + **kwargs ) def __enter__(self): @@ -83,7 +89,12 @@ def close(self): self._generated_client.close() def register_schema( - self, group_name, name, schema_definition, format, **kwargs # pylint:disable=redefined-builtin + self, + group_name, + name, + definition, + format, + **kwargs # pylint:disable=redefined-builtin ): # type: (str, str, str, Union[str, SchemaFormat], Any) -> SchemaProperties """ @@ -93,11 +104,12 @@ def register_schema( :param str group_name: Schema group under which schema should be registered. :param str name: Name of schema being registered. - :param str schema_definition: String representation of the schema being registered. + :param str definition: String representation of the schema being registered. :param format: Format for the schema being registered. For now Avro is the only supported schema format by the service. :type format: Union[str, SchemaFormat] - :rtype: SchemaProperties + :rtype: ~azure.schemaregistry.SchemaProperties + :raises: :class:`~azure.core.exceptions.HttpResponseError` .. admonition:: Example: @@ -114,27 +126,31 @@ def register_schema( except AttributeError: pass + format = format.capitalize() + http_request_kwargs = get_http_request_kwargs(kwargs) request = schema_rest.build_register_request( group_name=group_name, schema_name=name, - content=schema_definition, - serialization_type=format, - content_type=kwargs.pop("content_type", "application/json"), - **kwargs + content=definition, + content_type=kwargs.pop( + "content_type", "application/json; serialization={}".format(format) + ), + **http_request_kwargs ) - response = self._generated_client.send_request(request) + response = self._generated_client.send_request(request, **kwargs) response.raise_for_status() - return _parse_response_schema_properties(response) + return _parse_response_schema_properties(response, format) - def get_schema(self, id, **kwargs): # pylint:disable=redefined-builtin + def get_schema(self, schema_id, **kwargs): # type: (str, Any) -> Schema """ Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique within a namespace. - :param str id: References specific schema in registry namespace. - :rtype: Schema + :param str schema_id: References specific schema in registry namespace. + :rtype: ~azure.schemaregistry.Schema + :raises: :class:`~azure.core.exceptions.HttpResponseError` .. admonition:: Example: @@ -146,25 +162,34 @@ def get_schema(self, id, **kwargs): # pylint:disable=redefined-builtin :caption: Get schema by id. """ - request = schema_rest.build_get_by_id_request(schema_id=id) + http_request_kwargs = get_http_request_kwargs(kwargs) + request = schema_rest.build_get_by_id_request( + id=schema_id, **http_request_kwargs + ) response = self._generated_client.send_request(request, **kwargs) response.raise_for_status() return _parse_response_schema(response) def get_schema_properties( - self, group_name, name, schema_definition, format, **kwargs # pylint:disable=redefined-builtin + self, + group_name, + name, + definition, + format, + **kwargs # pylint:disable=redefined-builtin ): # type: (str, str, str, Union[str, SchemaFormat], Any) -> SchemaProperties """ - Gets the ID referencing an existing schema within the specified schema group, + Gets the schema properties corresponding to an existing schema within the specified schema group, as matched by schema definition comparison. :param str group_name: Schema group under which schema should be registered. :param str name: Name of schema being registered. - :param str schema_definition: String representation of the schema being registered. + :param str definition: String representation of the schema being registered. :param format: Format for the schema being registered. :type format: Union[str, SchemaFormat] - :rtype: SchemaProperties + :rtype: ~azure.schemaregistry.SchemaProperties + :raises: :class:`~azure.core.exceptions.HttpResponseError` .. admonition:: Example: @@ -181,15 +206,18 @@ def get_schema_properties( except AttributeError: pass + format = format.capitalize() + http_request_kwargs = get_http_request_kwargs(kwargs) request = schema_rest.build_query_id_by_content_request( group_name=group_name, schema_name=name, - content=schema_definition, - serialization_type=format, - content_type=kwargs.pop("content_type", "application/json"), - **kwargs + content=definition, + content_type=kwargs.pop( + "content_type", "application/json; serialization={}".format(format) + ), + **http_request_kwargs ) response = self._generated_client.send_request(request, **kwargs) response.raise_for_status() - return _parse_response_schema_properties(response) + return _parse_response_schema_properties(response, format) diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_utils.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_utils.py new file mode 100644 index 000000000000..cca868951e8b --- /dev/null +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_utils.py @@ -0,0 +1,12 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + + +def get_http_request_kwargs(kwargs): + http_request_keywords = ["params", "headers", "json", "data", "files"] + http_request_kwargs = { + key: kwargs.pop(key, None) for key in http_request_keywords if key in kwargs + } + return http_request_kwargs diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_version.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_version.py index fe9309359a58..01c256eaa2ec 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_version.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_version.py @@ -24,4 +24,4 @@ # # -------------------------------------------------------------------------- -VERSION = "1.0.0b4" +VERSION = "1.0.0" diff --git a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_schema_registry_client_async.py b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_schema_registry_client_async.py index 242284a4cd6e..840815a6844f 100644 --- a/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_schema_registry_client_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/aio/_schema_registry_client_async.py @@ -25,7 +25,8 @@ # -------------------------------------------------------------------------- from typing import Any, TYPE_CHECKING, Union -from .._common._constants import SchemaFormat +from .._utils import get_http_request_kwargs +from .._common._constants import SchemaFormat, DEFAULT_VERSION from .._common._schema import Schema, SchemaProperties from .._common._response_handlers import ( _parse_response_schema, @@ -41,13 +42,14 @@ class SchemaRegistryClient(object): """ - SchemaRegistryClient is as a central schema repository for enterprise-level data infrastructure, - complete with support for versioning and management. + SchemaRegistryClient is a client for registering and retrieving schemas from the Azure Schema Registry service. - :param str fully_qualified_namespace: The Schema Registry service fully qualified host name, - for example my-namespace.servicebus.windows.net. - :param credential: To authenticate to manage the entities of the SchemaRegistry namespace. - :type credential: AsyncTokenCredential + :param str fully_qualified_namespace: The Schema Registry service fully qualified host name. + For example: my-namespace.servicebus.windows.net. + :param credential: To authenticate managing the entities of the SchemaRegistry namespace. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :keyword str api_version: The Schema Registry service API version to use for requests. + Default value and only accepted value currently is "2021-10". .. admonition:: Example: @@ -59,13 +61,20 @@ class SchemaRegistryClient(object): :caption: Create a new instance of the SchemaRegistryClient. """ + def __init__( self, fully_qualified_namespace: str, credential: "AsyncTokenCredential", **kwargs: Any ) -> None: - self._generated_client = AzureSchemaRegistry(credential, fully_qualified_namespace, **kwargs) + api_version = kwargs.pop("api_version", DEFAULT_VERSION) + self._generated_client = AzureSchemaRegistry( + credential=credential, + endpoint=fully_qualified_namespace, + api_version=api_version, + **kwargs + ) async def __aenter__(self): await self._generated_client.__aenter__() @@ -75,7 +84,7 @@ async def __aexit__(self, *args): await self._generated_client.__aexit__(*args) async def close(self) -> None: - """ This method is to close the sockets opened by the client. + """This method is to close the sockets opened by the client. It need not be used when using with a context manager. """ await self._generated_client.close() @@ -84,7 +93,7 @@ async def register_schema( self, group_name: str, name: str, - schema_definition: str, + definition: str, format: Union[str, SchemaFormat], # pylint:disable=redefined-builtin **kwargs: Any ) -> SchemaProperties: @@ -95,11 +104,12 @@ async def register_schema( :param str group_name: Schema group under which schema should be registered. :param str name: Name of schema being registered. - :param str schema_definition: String representation of the schema being registered. + :param str definition: String representation of the schema being registered. :param format: Format for the schema being registered. For now Avro is the only supported schema format by the service. - :type format: Union[str, SchemaFormat] - :rtype: SchemaProperties + :type format: Union[str, ~azure.schemaregistry.SchemaFormat] + :rtype: ~azure.schemaregistry.SchemaProperties + :raises: :class:`~azure.core.exceptions.HttpResponseError` .. admonition:: Example: @@ -116,30 +126,30 @@ async def register_schema( except AttributeError: pass + format = format.capitalize() + http_request_kwargs = get_http_request_kwargs(kwargs) request = schema_rest.build_register_request( group_name=group_name, schema_name=name, - content=schema_definition, - serialization_type=format, - content_type=kwargs.pop("content_type", "application/json"), - **kwargs + content=definition, + content_type=kwargs.pop( + "content_type", "application/json; serialization={}".format(format) + ), + **http_request_kwargs ) - response = await self._generated_client.send_request(request) + response = await self._generated_client.send_request(request, **kwargs) response.raise_for_status() - return _parse_response_schema_properties(response) + return _parse_response_schema_properties(response, format) - async def get_schema( - self, - id: str, # pylint:disable=redefined-builtin - **kwargs: Any - ) -> Schema: + async def get_schema(self, schema_id: str, **kwargs: Any) -> Schema: """ Gets a registered schema by its unique ID. Azure Schema Registry guarantees that ID is unique within a namespace. - :param str id: References specific schema in registry namespace. - :rtype: Schema + :param str schema_id: References specific schema in registry namespace. + :rtype: ~azure.schemaregistry.Schema + :raises: :class:`~azure.core.exceptions.HttpResponseError` .. admonition:: Example: @@ -151,7 +161,10 @@ async def get_schema( :caption: Get schema by id. """ - request = schema_rest.build_get_by_id_request(schema_id=id) + http_request_kwargs = get_http_request_kwargs(kwargs) + request = schema_rest.build_get_by_id_request( + id=schema_id, **http_request_kwargs + ) response = await self._generated_client.send_request(request, **kwargs) response.raise_for_status() return _parse_response_schema(response) @@ -160,20 +173,21 @@ async def get_schema_properties( self, group_name: str, name: str, - schema_definition: str, + definition: str, format: Union[str, SchemaFormat], # pylint:disable=redefined-builtin **kwargs: Any ) -> SchemaProperties: """ - Gets the ID referencing an existing schema within the specified schema group, + Gets the schema properties corresponding to an existing schema within the specified schema group, as matched by schema defintion comparison. :param str group_name: Schema group under which schema should be registered. :param str name: Name of schema being registered. - :param str schema_definition: String representation of the schema being registered. + :param str definition: String representation of the schema being registered. :param format: Format for the schema being registered. - :type format: Union[str, SchemaFormat] - :rtype: SchemaProperties + :type format: Union[str, ~azure.schemaregistry.SchemaFormat] + :rtype: ~azure.schemaregistry.SchemaProperties + :raises: :class:`~azure.core.exceptions.HttpResponseError` .. admonition:: Example: @@ -190,15 +204,18 @@ async def get_schema_properties( except AttributeError: pass + format = format.capitalize() + http_request_kwargs = get_http_request_kwargs(kwargs) request = schema_rest.build_query_id_by_content_request( group_name=group_name, schema_name=name, - content=schema_definition, - serialization_type=format, - content_type=kwargs.pop("content_type", "application/json"), - **kwargs + content=definition, + content_type=kwargs.pop( + "content_type", "application/json; serialization={}".format(format) + ), + **http_request_kwargs ) response = await self._generated_client.send_request(request, **kwargs) response.raise_for_status() - return _parse_response_schema_properties(response) + return _parse_response_schema_properties(response, format) diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/README.md b/sdk/schemaregistry/azure-schemaregistry/samples/README.md index 0b7d11707b5d..c0f23c4b99d2 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/README.md +++ b/sdk/schemaregistry/azure-schemaregistry/samples/README.md @@ -31,10 +31,16 @@ If you do not have an existing Azure account, you may sign up for a free trial o 1. Install the Azure Schema Registry client library and Azure Identity client library for Python with [pip](https://pypi.org/project/pip/): ```bash -pip install azure-schemaregistry azure-identity +pip install azure-schemaregistry ``` -2. Clone or download this sample repository +To run samples utilizing the Azure Active Directory for authentication, please install the azure-identity library: + +```bash +pip install azure-identity +``` + +2. Clone or download this sample repository. 3. Open the sample folder in Visual Studio Code or your IDE of choice. ## Running the samples @@ -51,4 +57,4 @@ what you can do with the Azure Schema Registry client library. [schema_registry_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py [schema_registry_async_sample]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py -[api_reference]: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-schemaregistry/latest/index.html +[api_reference]: https://docs.microsoft.com/python/api/overview/azure/schemaregistry-readme diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py index 6838c04d68ea..f5471ddda41a 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/sample_code_schemaregistry_async.py @@ -23,56 +23,95 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- +""" +FILE: sample_code_schemaregistry_async.py +DESCRIPTION: + This sample demonstrates asynchronously authenticating the SchemaRegistryClient and registering a schema, + retrieving a schema by its ID, and retrieving schema properties. +USAGE: + python sample_code_schemaregistry_async.py + Set the environment variables with your own values before running the sample: + 1) SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE - The schema registry fully qualified namespace, + which should follow the format: `.servicebus.windows.net` + 2) SCHEMAREGISTRY_GROUP - The name of the schema group. + +This example uses the async DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on the async DefaultAzureCredential, see + https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. +""" import os import asyncio +import json from azure.schemaregistry.aio import SchemaRegistryClient -from azure.schemaregistry import SchemaFormat -from azure.identity.aio import ClientSecretCredential, DefaultAzureCredential +from azure.identity.aio import DefaultAzureCredential def create_client(): # [START create_sr_client_async] - SCHEMAREGISTRY_FQN = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] + SCHEMAREGISTRY_FQN = os.environ["SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE"] token_credential = DefaultAzureCredential() - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) + schema_registry_client = SchemaRegistryClient( + fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential + ) # [END create_sr_client_async] - TENANT_ID = os.environ['AZURE_TENANT_ID'] - CLIENT_ID = os.environ['AZURE_CLIENT_ID'] - CLIENT_SECRET = os.environ['AZURE_CLIENT_SECRET'] - token_credential = ClientSecretCredential(TENANT_ID, CLIENT_ID, CLIENT_SECRET) - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) return schema_registry_client, token_credential async def register_schema(schema_registry_client): # [START register_schema_async] - GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] - NAME = 'your-schema-name' - FORMAT = SchemaFormat.AVRO - SCHEMA_DEFINITION = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" - schema_properties = await schema_registry_client.register_schema(GROUP_NAME, NAME, SCHEMA_DEFINITION, FORMAT) + GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] + NAME = "your-schema-name" + FORMAT = "Avro" + SCHEMA_JSON = { + "namespace": "example.avro", + "type": "record", + "name": "User", + "fields": [ + {"name": "name", "type": "string"}, + {"name": "favorite_number", "type": ["int", "null"]}, + {"name": "favorite_color", "type": ["string", "null"]}, + ], + } + DEFINITION = json.dumps(SCHEMA_JSON, separators=(",", ":")) + schema_properties = await schema_registry_client.register_schema( + GROUP_NAME, NAME, DEFINITION, FORMAT + ) schema_id = schema_properties.id # [END register_schema_async] return schema_id -async def get_schema(schema_registry_client, id): +async def get_schema(schema_registry_client, schema_id): # [START get_schema_async] - schema = await schema_registry_client.get_schema(id) - schema_definition = schema.schema_definition + schema = await schema_registry_client.get_schema(schema_id) + definition = schema.definition + properties = schema.properties # [END get_schema_async] - return schema_definition + print(definition) + print(properties) + return definition async def get_schema_id(schema_registry_client): - group_name = os.environ['SCHEMAREGISTRY_GROUP'] - name = 'your-schema-name' - format = SchemaFormat.AVRO - schema_definition = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" - # [START get_schema_id_async] - schema_properties = await schema_registry_client.get_schema_properties(group_name, name, schema_definition, format) + group_name = os.environ["SCHEMAREGISTRY_GROUP"] + name = "your-schema-name" + format = "Avro" + schema_json = { + "namespace": "example.avro", + "type": "record", + "name": "User", + "fields": [ + {"name": "name", "type": "string"}, + {"name": "favorite_number", "type": ["int", "null"]}, + {"name": "favorite_color", "type": ["string", "null"]}, + ], + } + definition = json.dumps(schema_json, separators=(",", ":")) + schema_properties = await schema_registry_client.get_schema_properties( + group_name, name, definition, format + ) schema_id = schema_properties.id # [END get_schema_id_async] return schema_id @@ -81,11 +120,11 @@ async def get_schema_id(schema_registry_client): async def main(): client, credential = create_client() async with client, credential: - id = await register_schema(client) - schema = await get_schema(client, id) - id = await get_schema_id(client) + schema_id = await register_schema(client) + schema = await get_schema(client, schema_id) + schema_id = await get_schema_id(client) -if __name__ == '__main__': +if __name__ == "__main__": loop = asyncio.get_event_loop() loop.run_until_complete(main()) diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py index 6a156865647c..eaa9a86e5f39 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/async_samples/schema_registry_async.py @@ -3,67 +3,94 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- - -""" -Example to show basic usage of schema registry asynchronously: - - register a schema - - get schema by id - - get schema id """ +FILE: schema_registry_async.py +DESCRIPTION: + This sample demonstrates asynchronously authenticating the SchemaRegistryClient and basic usage, including: + - registering a schema + - getting a schema by its ID + - getting schema id. +USAGE: + python schema_registry_async.py + Set the environment variables with your own values before running the sample: + 1) SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE - The schema registry fully qualified namespace, + which should follow the format: `.servicebus.windows.net` + 2) SCHEMAREGISTRY_GROUP - The name of the schema group. -import asyncio +This example uses the async DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on the async DefaultAzureCredential, see + https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. +""" import os +import asyncio +import json -from azure.identity.aio import ClientSecretCredential +from azure.identity.aio import DefaultAzureCredential from azure.schemaregistry.aio import SchemaRegistryClient from azure.schemaregistry import SchemaFormat -TENANT_ID = os.environ['AZURE_TENANT_ID'] -CLIENT_ID = os.environ['AZURE_CLIENT_ID'] -CLIENT_SECRET = os.environ['AZURE_CLIENT_SECRET'] - -SCHEMAREGISTRY_FQN = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] -NAME = 'your-schema-name' +SCHEMAREGISTRY_FQN = os.environ["SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE"] +GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] +NAME = "your-schema-name" FORMAT = SchemaFormat.AVRO -SCHEMA_STRING = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" +SCHEMA_JSON = { + "namespace": "example.avro", + "type": "record", + "name": "User", + "fields": [ + {"name": "name", "type": "string"}, + {"name": "favorite_number", "type": ["int", "null"]}, + {"name": "favorite_color", "type": ["string", "null"]}, + ], +} +DEFINITION = json.dumps(SCHEMA_JSON, separators=(",", ":")) -async def register_schema(client, group_name, name, schema_string, format): +async def register_schema(client, group_name, name, definition, format): print("Registering schema...") - schema_properties = await client.register_schema(group_name, name, schema_string, format) + schema_properties = await client.register_schema( + group_name, name, definition, format + ) print("Schema registered, returned schema id is {}".format(schema_properties.id)) print("Schema properties are {}".format(schema_properties)) return schema_properties.id -async def get_schema_by_id(client, id): +async def get_schema_by_id(client, schema_id): print("Getting schema by id...") - schema = await client.get_schema(id) - print("The schema string of schema id: {} string is {}".format(id, schema.schema_definition)) - print("Schema properties are {}".format(id)) - return schema.schema_definition + schema = await client.get_schema(schema_id) + print( + "The schema string of schema id: {} string is {}".format( + schema_id, schema.definition + ) + ) + print("Schema properties are {}".format(schema_id)) + return schema.definition -async def get_schema_id(client, group_name, name, schema_string, format): +async def get_schema_id(client, group_name, name, definition, format): print("Getting schema id...") - schema_properties = await client.get_schema_properties(group_name, name, schema_string, format) + schema_properties = await client.get_schema_properties( + group_name, name, definition, format + ) print("The schema id is: {}".format(schema_properties.id)) print("Schema properties are {}".format(schema_properties)) return schema_properties.id async def main(): - token_credential = ClientSecretCredential( - tenant_id=TENANT_ID, - client_id=CLIENT_ID, - client_secret=CLIENT_SECRET + token_credential = DefaultAzureCredential() + schema_registry_client = SchemaRegistryClient( + fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential ) - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) async with token_credential, schema_registry_client: - schema_id = await register_schema(schema_registry_client, GROUP_NAME, NAME, SCHEMA_STRING, FORMAT) + schema_id = await register_schema( + schema_registry_client, GROUP_NAME, NAME, DEFINITION, FORMAT + ) schema_str = await get_schema_by_id(schema_registry_client, schema_id) - schema_id = await get_schema_id(schema_registry_client, GROUP_NAME, NAME, SCHEMA_STRING, FORMAT) + schema_id = await get_schema_id( + schema_registry_client, GROUP_NAME, NAME, DEFINITION, FORMAT + ) loop = asyncio.get_event_loop() diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py index 8c3138b68647..0ad140718454 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/sample_code_schemaregistry.py @@ -23,73 +23,102 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- +""" +FILE: sample_code_schemaregistry.py +DESCRIPTION: + This sample demonstrates authenticating the SchemaRegistryClient and registering a schema, + retrieving a schema by its ID, and retrieving schema properties. +USAGE: + python sample_code_schemaregistry.py + Set the environment variables with your own values before running the sample: + 1) SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE - The schema registry fully qualified namespace, + which should follow the format: `.servicebus.windows.net` + 2) SCHEMAREGISTRY_GROUP - The name of the schema group. + +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see + https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. +""" import os +import json -from azure.schemaregistry import SchemaRegistryClient, SchemaFormat -from azure.identity import ClientSecretCredential, DefaultAzureCredential +from azure.schemaregistry import SchemaRegistryClient +from azure.identity import DefaultAzureCredential def create_client(): # [START create_sr_client_sync] - SCHEMAREGISTRY_FQN = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] + SCHEMAREGISTRY_FQN = os.environ["SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE"] token_credential = DefaultAzureCredential() - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) + schema_registry_client = SchemaRegistryClient( + fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential + ) # [END create_sr_client_sync] - TENANT_ID = os.environ['AZURE_TENANT_ID'] - CLIENT_ID = os.environ['AZURE_CLIENT_ID'] - CLIENT_SECRET = os.environ['AZURE_CLIENT_SECRET'] - token_credential = ClientSecretCredential(TENANT_ID, CLIENT_ID, CLIENT_SECRET) - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) return schema_registry_client def register_schema(schema_registry_client): # [START register_schema_sync] - GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] - NAME = 'your-schema-name' - FORMAT = SchemaFormat.AVRO - SCHEMA_DEFINITION = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" - schema_properties = schema_registry_client.register_schema(GROUP_NAME, NAME, SCHEMA_DEFINITION, FORMAT) + GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] + NAME = "your-schema-name" + FORMAT = "Avro" + SCHEMA_JSON = { + "namespace": "example.avro", + "type": "record", + "name": "User", + "fields": [ + {"name": "name", "type": "string"}, + {"name": "favorite_number", "type": ["int", "null"]}, + {"name": "favorite_color", "type": ["string", "null"]}, + ], + } + DEFINTION = json.dumps(SCHEMA_JSON, separators=(",", ":")) + schema_properties = schema_registry_client.register_schema( + GROUP_NAME, NAME, DEFINTION, FORMAT + ) schema_id = schema_properties.id # [END register_schema_sync] - - # [START print_schema_properties] - print(schema_properties.id) - print(schema_properties.format) - print(schema_properties.version) - # [END print_schema_properties] - return schema_id -def get_schema(schema_registry_client, id): +def get_schema(schema_registry_client, schema_id): # [START get_schema_sync] - schema = schema_registry_client.get_schema(id) - schema_definition = schema.schema_definition + schema = schema_registry_client.get_schema(schema_id) + definition = schema.definition + properties = schema.properties # [END get_schema_sync] - - # [START print_schema] - print(schema.schema_definition) - print(schema.properties) - # [END print_schema] + print(definition) + print(properties) return schema def get_schema_id(schema_registry_client): - group_name = os.environ['SCHEMAREGISTRY_GROUP'] - name = 'your-schema-name' - format = SchemaFormat.AVRO - schema_definition = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" # [START get_schema_id_sync] - schema_properties = schema_registry_client.get_schema_properties(group_name, name, schema_definition, format) + group_name = os.environ["SCHEMAREGISTRY_GROUP"] + name = "your-schema-name" + format = "Avro" + schema_json = { + "namespace": "example.avro", + "type": "record", + "name": "User", + "fields": [ + {"name": "name", "type": "string"}, + {"name": "favorite_number", "type": ["int", "null"]}, + {"name": "favorite_color", "type": ["string", "null"]}, + ], + } + definition = json.dumps(schema_json, separators=(",", ":")) + schema_properties = schema_registry_client.get_schema_properties( + group_name, name, definition, format + ) schema_id = schema_properties.id # [END get_schema_id_sync] return schema_id -if __name__ == '__main__': +if __name__ == "__main__": client = create_client() with client: - id = register_schema(client) - schema = get_schema(client, id) - id = get_schema_id(client) + schema_id = register_schema(client) + schema = get_schema(client, schema_id) + schema_id = get_schema_id(client) diff --git a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py index 842cfc694e21..9c143a85063d 100644 --- a/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py +++ b/sdk/schemaregistry/azure-schemaregistry/samples/sync_samples/schema_registry.py @@ -23,28 +23,34 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- - """ -Example to show basic usage of schema registry: - - register a schema - - get schema by id - - get schema id +FILE: schema_registry.py +DESCRIPTION: + This sample demonstrates authenticating the SchemaRegistryClient and basic usage, including: + - registering a schema + - getting a schema by its ID + - getting schema id. +USAGE: + python schema_registry.py + Set the environment variables with your own values before running the sample: + 1) SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE - The schema registry fully qualified namespace, + which should follow the format: `.servicebus.windows.net` + 2) SCHEMAREGISTRY_GROUP - The name of the schema group. + +This example uses DefaultAzureCredential, which requests a token from Azure Active Directory. +For more information on DefaultAzureCredential, see + https://docs.microsoft.com/python/api/overview/azure/identity-readme?view=azure-python#defaultazurecredential. """ - - import os import json -from azure.identity import ClientSecretCredential +from azure.identity import DefaultAzureCredential from azure.schemaregistry import SchemaRegistryClient, SchemaFormat -TENANT_ID = os.environ['AZURE_TENANT_ID'] -CLIENT_ID = os.environ['AZURE_CLIENT_ID'] -CLIENT_SECRET = os.environ['AZURE_CLIENT_SECRET'] -SCHEMAREGISTRY_FQN = os.environ['SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE'] -GROUP_NAME = os.environ['SCHEMAREGISTRY_GROUP'] -NAME = 'your-schema-name' +SCHEMAREGISTRY_FQN = os.environ["SCHEMAREGISTRY_FULLY_QUALIFIED_NAMESPACE"] +GROUP_NAME = os.environ["SCHEMAREGISTRY_GROUP"] +NAME = "your-schema-name" FORMAT = SchemaFormat.AVRO SCHEMA_JSON = { @@ -52,55 +58,54 @@ "type": "record", "name": "User", "fields": [ - { - "name": "name", - "type": "string" - }, - { - "name": "favorite_number", - "type": ["int", "null"]}, - { - "name": "favorite_color", - "type": ["string", "null"] - } - ] + {"name": "name", "type": "string"}, + {"name": "favorite_number", "type": ["int", "null"]}, + {"name": "favorite_color", "type": ["string", "null"]}, + ], } - -SCHEMA_STRING = json.dumps(SCHEMA_JSON, separators=(',', ':')) +DEFINITION = json.dumps(SCHEMA_JSON, separators=(",", ":")) -def register_schema(client, group_name, name, schema_string, format): +def register_schema(client, group_name, name, definition, format): print("Registering schema...") - schema_properties = client.register_schema(group_name, name, schema_string, format) + schema_properties = client.register_schema( + group_name, name, definition, format + ) print("Schema registered, returned schema id is {}".format(schema_properties.id)) print("Schema properties are {}".format(schema_properties)) return schema_properties.id -def get_schema_by_id(client, id): +def get_schema_by_id(client, schema_id): print("Getting schema by id...") - schema = client.get_schema(id) - print("The schema string of schema id: {} string is {}".format(id, schema.schema_definition)) - print("Schema properties are {}".format(id)) - return schema.schema_definition + schema = client.get_schema(schema_id) + print( + "The schema string of schema id: {} string is {}".format(id, schema.definition) + ) + print("Schema properties are {}".format(schema_id)) + return schema.definition -def get_schema_id(client, group_name, name, schema_string, format): +def get_schema_id(client, group_name, name, definition, format): print("Getting schema id...") - schema_properties = client.get_schema_properties(group_name, name, schema_string, format) + schema_properties = client.get_schema_properties( + group_name, name, definition, format + ) print("The schema id is: {}".format(schema_properties.id)) print("Schema properties are {}".format(schema_properties)) return schema_properties.id -if __name__ == '__main__': - token_credential = ClientSecretCredential( - tenant_id=TENANT_ID, - client_id=CLIENT_ID, - client_secret=CLIENT_SECRET +if __name__ == "__main__": + token_credential = DefaultAzureCredential() + schema_registry_client = SchemaRegistryClient( + fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential ) - schema_registry_client = SchemaRegistryClient(fully_qualified_namespace=SCHEMAREGISTRY_FQN, credential=token_credential) with schema_registry_client: - schema_id = register_schema(schema_registry_client, GROUP_NAME, NAME, SCHEMA_STRING, FORMAT) + schema_id = register_schema( + schema_registry_client, GROUP_NAME, NAME, DEFINITION, FORMAT + ) schema_str = get_schema_by_id(schema_registry_client, schema_id) - schema_id = get_schema_id(schema_registry_client, GROUP_NAME, NAME, SCHEMA_STRING, FORMAT) + schema_id = get_schema_id( + schema_registry_client, GROUP_NAME, NAME, DEFINITION, FORMAT + ) diff --git a/sdk/schemaregistry/azure-schemaregistry/setup.py b/sdk/schemaregistry/azure-schemaregistry/setup.py index e803b719c12f..cd6c30485e34 100644 --- a/sdk/schemaregistry/azure-schemaregistry/setup.py +++ b/sdk/schemaregistry/azure-schemaregistry/setup.py @@ -53,7 +53,7 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', @@ -69,7 +69,7 @@ packages=find_packages(exclude=exclude_packages), install_requires=[ 'msrest>=0.5.0', - 'azure-core<2.0.0,>=1.19.0' + 'azure-core<2.0.0,>=1.20.0' ], extras_require={ ":python_version<'3.0'": ['azure-nspkg'] diff --git a/sdk/schemaregistry/azure-schemaregistry/swagger/README.md b/sdk/schemaregistry/azure-schemaregistry/swagger/README.md index 6f152ad06608..bda6a428bc57 100644 --- a/sdk/schemaregistry/azure-schemaregistry/swagger/README.md +++ b/sdk/schemaregistry/azure-schemaregistry/swagger/README.md @@ -6,11 +6,11 @@ ```ps cd C:\Work\SchemaRegistry\ autorest --reset -autorest --use=D:\Projects\autorest.python --low-level-client --modelerfour.lenient-model-deduplication +autorest --low-level-client --modelerfour.lenient-model-deduplication README.md ``` ### Settings ``` yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/1e23d91e875e4464e57667639e06408cef99868d/specification/schemaregistry/data-plane/Microsoft.EventHub/preview/2020-09-01-preview/schemaregistry.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/schemaregistry/data-plane/Microsoft.EventHub/stable/2021-10/schemaregistry.json output-folder: ../azure/schemaregistry/_generated namespace: azure.schemaregistry._generated no-namespace-folders: true @@ -19,5 +19,5 @@ clear-output-folder: true python: true add-credential: true credential-scopes: "https://eventhubs.azure.net/.default" -package-version: "1.0.0b3" +package-version: "1.0.0" ``` diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_basic_async.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_basic_async.yaml index acbe6c787c8f..88d17b3ca492 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_basic_async.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_basic_async.yaml @@ -7,32 +7,59 @@ interactions: Content-Length: - '201' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-basic-asynce5e1482?api-version=2021-10 response: body: - string: '{"id":"ccc58199c8974f60be5b8de153ae9771"}' + string: '' headers: - content-type: application/json - date: Wed, 29 Sep 2021 16:52:39 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482/versions/1?api-version=2020-09-01-preview - schema-id: ccc58199c8974f60be5b8de153ae9771 - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ccc58199c8974f60be5b8de153ae9771?api-version=2020-09-01-preview + content-length: '0' + date: Mon, 08 Nov 2021 19:21:34 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 1051144b7fa7490ba07184606fd25d21 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/1051144b7fa7490ba07184606fd25d21?api-version=2021-10 + schema-name: test-schema-basic-asynce5e1482 schema-version: '1' - schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482/versions?api-version=2020-09-01-preview - serialization-type: Avro + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482/versions?api-version=2021-10 + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482?api-version=2021-10 +- request: + body: null + headers: + Accept: + - application/json; serialization=Avro + User-Agent: + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/1051144b7fa7490ba07184606fd25d21?api-version=2021-10 + response: + body: + string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' + headers: + content-type: application/json;serialization=Avro + date: Mon, 08 Nov 2021 19:21:34 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 1051144b7fa7490ba07184606fd25d21 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/1051144b7fa7490ba07184606fd25d21?api-version=2021-10 + schema-name: test-schema-basic-asynce5e1482 + schema-version: '1' + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482/versions?api-version=2021-10 server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482?api-version=2020-09-01-preview + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/1051144b7fa7490ba07184606fd25d21?api-version=2021-10 - request: body: null headers: @@ -69,30 +96,28 @@ interactions: Content-Length: - '201' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: POST - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-basic-asynce5e1482:get-id?api-version=2021-10 response: body: - string: '{"id":"ccc58199c8974f60be5b8de153ae9771"}' + string: '' headers: - content-type: application/json - date: Wed, 29 Sep 2021 16:52:40 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482/versions/1?api-version=2020-09-01-preview - schema-id: ccc58199c8974f60be5b8de153ae9771 - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/ccc58199c8974f60be5b8de153ae9771?api-version=2020-09-01-preview + content-length: '0' + date: Mon, 08 Nov 2021 19:21:35 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-basic-asynce5e1482/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 1051144b7fa7490ba07184606fd25d21 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/1051144b7fa7490ba07184606fd25d21?api-version=2021-10 + schema-name: test-schema-basic-asynce5e1482 schema-version: '1' - schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482/versions?api-version=2020-09-01-preview - serialization-type: Avro + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482/versions?api-version=2021-10 server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 - transfer-encoding: chunked status: - code: 200 - message: OK - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482?api-version=2020-09-01-preview + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/test-schema-basic-asynce5e1482:get-id?api-version=2021-10 version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_negative_no_schema_async.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_negative_no_schema_async.yaml index 41d8d1375848..d767ac97ca84 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_negative_no_schema_async.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_negative_no_schema_async.yaml @@ -3,49 +3,49 @@ interactions: body: null headers: Accept: - - text/plain; charset=utf-8 + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/a?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/a?api-version=2021-10 response: body: string: '{"Code":400,"Detail":"SubCode=40000, UnknownType:The request is invalid. - [MGResponseHttpError=BadRequest]. TrackingId:dbfa19f5-29c4-4278-a562-7abb97e16e07_G27, - SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/a, - Timestamp:2021-09-29T16:52:41"}' + [MGResponseHttpError=BadRequest]. TrackingId:22b913ba-a4d9-4799-8f94-a6c248869d77_G28, + SystemTracker:fake_resource.servicebus.windows.net/:$schemaGroups\/$schemas\/a, + Timestamp:2021-11-08T19:21:36"}' headers: content-type: application/json - date: Wed, 29 Sep 2021 16:52:41 GMT + date: Mon, 08 Nov 2021 19:21:35 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/getSchemaById/a?api-version=2020-09-01-preview + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/a?api-version=2021-10 - request: body: null headers: Accept: - - text/plain; charset=utf-8 + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2021-10 response: body: string: '{"Code":404,"Detail":"Schema id aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa does - not exist. TrackingId:87072604-c61d-4dce-bd60-077162e0aa78_G27, SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, - Timestamp:2021-09-29T16:52:41"}' + not exist. TrackingId:fae7aad8-cc69-417b-b713-86c4760011ed_G28, SystemTracker:fake_resource.servicebus.windows.net/:$schemaGroups\/$schemas\/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, + Timestamp:2021-11-08T19:21:36"}' headers: content-type: application/json - date: Wed, 29 Sep 2021 16:52:41 GMT + date: Mon, 08 Nov 2021 19:21:36 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 404 message: Not Found - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/getSchemaById/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2020-09-01-preview + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2021-10 version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_same_twice_async.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_same_twice_async.yaml index 838dc9163ded..7e8859e333aa 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_same_twice_async.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_same_twice_async.yaml @@ -7,32 +7,30 @@ interactions: Content-Length: - '179' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-twice-async7bfd16a1?api-version=2021-10 response: body: - string: '{"id":"80ff968ac6744d8da0498ee8cc1e19ab"}' + string: '' headers: - content-type: application/json - date: Wed, 29 Sep 2021 16:52:48 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1/versions/1?api-version=2020-09-01-preview - schema-id: 80ff968ac6744d8da0498ee8cc1e19ab - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/80ff968ac6744d8da0498ee8cc1e19ab?api-version=2020-09-01-preview + content-length: '0' + date: Mon, 08 Nov 2021 19:21:43 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 3ad6620ea8f240059625d5922a912de0 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/3ad6620ea8f240059625d5922a912de0?api-version=2021-10 + schema-name: test-schema-twice-async7bfd16a1 schema-version: '1' - schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1/versions?api-version=2020-09-01-preview - serialization-type: Avro + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1/versions?api-version=2021-10 server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 - transfer-encoding: chunked status: - code: 200 - message: OK - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1?api-version=2020-09-01-preview + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1?api-version=2021-10 - request: body: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"age","type":["int","null"]},{"name":"city","type":["string","null"]}]}' headers: @@ -41,30 +39,28 @@ interactions: Content-Length: - '179' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-twice-async7bfd16a1?api-version=2021-10 response: body: - string: '{"id":"80ff968ac6744d8da0498ee8cc1e19ab"}' + string: '' headers: - content-type: application/json - date: Wed, 29 Sep 2021 16:52:48 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1/versions/1?api-version=2020-09-01-preview - schema-id: 80ff968ac6744d8da0498ee8cc1e19ab - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/80ff968ac6744d8da0498ee8cc1e19ab?api-version=2020-09-01-preview + content-length: '0' + date: Mon, 08 Nov 2021 19:21:44 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-twice-async7bfd16a1/versions/1?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 3ad6620ea8f240059625d5922a912de0 + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/3ad6620ea8f240059625d5922a912de0?api-version=2021-10 + schema-name: test-schema-twice-async7bfd16a1 schema-version: '1' - schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1/versions?api-version=2020-09-01-preview - serialization-type: Avro + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1/versions?api-version=2021-10 server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 - transfer-encoding: chunked status: - code: 200 - message: OK - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1?api-version=2020-09-01-preview + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/test-schema-twice-async7bfd16a1?api-version=2021-10 version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_update_async.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_update_async.yaml index 502771bd0c8b..638779b51a8f 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_update_async.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/recordings/test_schema_registry_async.test_schema_update_async.yaml @@ -7,32 +7,30 @@ interactions: Content-Length: - '201' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-update-async24591503?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-update-async24591503?api-version=2021-10 response: body: - string: '{"id":"61ca9598e1f94f4e8e0e77732673143d"}' + string: '' headers: - content-type: application/json - date: Wed, 29 Sep 2021 16:52:49 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/5?api-version=2020-09-01-preview - schema-id: 61ca9598e1f94f4e8e0e77732673143d - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/61ca9598e1f94f4e8e0e77732673143d?api-version=2020-09-01-preview + content-length: '0' + date: Mon, 08 Nov 2021 19:21:46 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/5?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: 1469921a33fa425d99f8a6e187e8c97e + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/1469921a33fa425d99f8a6e187e8c97e?api-version=2021-10 + schema-name: test-schema-update-async24591503 schema-version: '5' - schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503/versions?api-version=2020-09-01-preview - serialization-type: Avro + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503/versions?api-version=2021-10 server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 - transfer-encoding: chunked status: - code: 200 - message: OK - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503?api-version=2020-09-01-preview + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/test-schema-update-async24591503?api-version=2021-10 - request: body: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_food","type":["string","null"]}]}' headers: @@ -41,58 +39,57 @@ interactions: Content-Length: - '200' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-update-async24591503?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-update-async24591503?api-version=2021-10 response: body: - string: '{"id":"a5b1a7a9955445d3b133f7cbb1f89c92"}' + string: '' headers: - content-type: application/json - date: Wed, 29 Sep 2021 16:52:49 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/6?api-version=2020-09-01-preview - schema-id: a5b1a7a9955445d3b133f7cbb1f89c92 - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/a5b1a7a9955445d3b133f7cbb1f89c92?api-version=2020-09-01-preview + content-length: '0' + date: Mon, 08 Nov 2021 19:21:46 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/6?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: d80c13495d934eefb2f7653563ac63ff + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/d80c13495d934eefb2f7653563ac63ff?api-version=2021-10 + schema-name: test-schema-update-async24591503 schema-version: '6' - schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503/versions?api-version=2020-09-01-preview - serialization-type: Avro + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503/versions?api-version=2021-10 server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 - transfer-encoding: chunked status: - code: 200 - message: OK - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503?api-version=2020-09-01-preview + code: 204 + message: No Content + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/swathip-test-schema/schemas/test-schema-update-async24591503?api-version=2021-10 - request: body: null headers: Accept: - - text/plain; charset=utf-8 + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/a5b1a7a9955445d3b133f7cbb1f89c92?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/d80c13495d934eefb2f7653563ac63ff?api-version=2021-10 response: body: string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_food","type":["string","null"]}]}' headers: - content-type: application/json - date: Wed, 29 Sep 2021 16:52:49 GMT - location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/6?api-version=2020-09-01-preview - schema-id: a5b1a7a9955445d3b133f7cbb1f89c92 - schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/a5b1a7a9955445d3b133f7cbb1f89c92?api-version=2020-09-01-preview + content-type: application/json;serialization=Avro + date: Mon, 08 Nov 2021 19:21:47 GMT + location: https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-update-async24591503/versions/6?api-version=2021-10 + schema-group-name: swathip-test-schema + schema-id: d80c13495d934eefb2f7653563ac63ff + schema-id-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/d80c13495d934eefb2f7653563ac63ff?api-version=2021-10 + schema-name: test-schema-update-async24591503 schema-version: '6' - schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503/versions?api-version=2020-09-01-preview - serialization-type: Avro + schema-versions-location: https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update-async24591503/versions?api-version=2021-10 server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://swathip-test-eventhubs.servicebus.windows.net/$schemagroups/getSchemaById/a5b1a7a9955445d3b133f7cbb1f89c92?api-version=2020-09-01-preview + url: https://swathip-test-eventhubs.servicebus.windows.net/$schemaGroups/$schemas/d80c13495d934eefb2f7653563ac63ff?api-version=2021-10 version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/test_schema_registry_async.py b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/test_schema_registry_async.py index 01b08ff2b6e4..1932949f70e8 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/test_schema_registry_async.py +++ b/sdk/schemaregistry/azure-schemaregistry/tests/async_tests/test_schema_registry_async.py @@ -44,26 +44,23 @@ def create_client(self, fully_qualified_namespace): async def test_schema_basic_async(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): client = self.create_client(schemaregistry_fully_qualified_namespace) async with client: - schema_name = self.get_resource_name('test-schema-basic-async') + name = self.get_resource_name('test-schema-basic-async') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" format = "Avro" - schema_properties = await client.register_schema(schemaregistry_group, schema_name, schema_str, format) + schema_properties = await client.register_schema(schemaregistry_group, name, schema_str, format, logging_enable=True) assert schema_properties.id is not None - assert schema_properties.version is 1 assert schema_properties.format == "Avro" - returned_schema = await client.get_schema(id=schema_properties.id) + returned_schema = await client.get_schema(schema_id=schema_properties.id, logging_enable=True) assert returned_schema.properties.id == schema_properties.id - assert returned_schema.properties.version == 1 assert returned_schema.properties.format == "Avro" - assert returned_schema.schema_definition == schema_str + assert returned_schema.definition == schema_str - returned_schema_properties = await client.get_schema_properties(schemaregistry_group, schema_name, schema_str, format) + returned_schema_properties = await client.get_schema_properties(schemaregistry_group, name, schema_str, format, logging_enable=True) assert returned_schema_properties.id == schema_properties.id - assert returned_schema_properties.version == 1 assert returned_schema_properties.format == "Avro" await client._generated_client._config.credential.close() @@ -71,28 +68,25 @@ async def test_schema_basic_async(self, schemaregistry_fully_qualified_namespace async def test_schema_update_async(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): client = self.create_client(schemaregistry_fully_qualified_namespace) async with client: - schema_name = self.get_resource_name('test-schema-update-async') + name = self.get_resource_name('test-schema-update-async') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" format = "Avro" - schema_properties = await client.register_schema(schemaregistry_group, schema_name, schema_str, format) + schema_properties = await client.register_schema(schemaregistry_group, name, schema_str, format) assert schema_properties.id is not None - assert schema_properties.version != 0 assert schema_properties.format == "Avro" schema_str_new = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_food","type":["string","null"]}]}""" - new_schema_properties = await client.register_schema(schemaregistry_group, schema_name, schema_str_new, format) + new_schema_properties = await client.register_schema(schemaregistry_group, name, schema_str_new, format) assert new_schema_properties.id is not None - assert new_schema_properties.version == schema_properties.version + 1 assert new_schema_properties.format == "Avro" - new_schema = await client.get_schema(id=new_schema_properties.id) + new_schema = await client.get_schema(schema_id=new_schema_properties.id) assert new_schema.properties.id != schema_properties.id assert new_schema.properties.id == new_schema_properties.id - assert new_schema.schema_definition == schema_str_new - assert new_schema.properties.version == schema_properties.version + 1 + assert new_schema.definition == schema_str_new assert new_schema.properties.format == "Avro" await client._generated_client._config.credential.close() @@ -100,12 +94,12 @@ async def test_schema_update_async(self, schemaregistry_fully_qualified_namespac @SchemaRegistryPowerShellPreparer() async def test_schema_same_twice_async(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): client = self.create_client(schemaregistry_fully_qualified_namespace) - schema_name = self.get_resource_name('test-schema-twice-async') + name = self.get_resource_name('test-schema-twice-async') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"age","type":["int","null"]},{"name":"city","type":["string","null"]}]}""" format = "Avro" async with client: - schema_properties = await client.register_schema(schemaregistry_group, schema_name, schema_str, format) - schema_properties_second = await client.register_schema(schemaregistry_group, schema_name, schema_str, format) + schema_properties = await client.register_schema(schemaregistry_group, name, schema_str, format) + schema_properties_second = await client.register_schema(schemaregistry_group, name, schema_str, format) assert schema_properties.id == schema_properties_second.id await client._generated_client._config.credential.close() @@ -114,21 +108,21 @@ async def test_schema_negative_wrong_credential_async(self, schemaregistry_fully credential = ClientSecretCredential(tenant_id="fake", client_id="fake", client_secret="fake") client = SchemaRegistryClient(fully_qualified_namespace=schemaregistry_fully_qualified_namespace, credential=credential) async with client, credential: - schema_name = self.get_resource_name('test-schema-negative-async') + name = self.get_resource_name('test-schema-negative-async') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" format = "Avro" with pytest.raises(ClientAuthenticationError): - await client.register_schema(schemaregistry_group, schema_name, schema_str, format) + await client.register_schema(schemaregistry_group, name, schema_str, format) @SchemaRegistryPowerShellPreparer() async def test_schema_negative_wrong_endpoint_async(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): client = self.create_client("nonexist.servicebus.windows.net") async with client: - schema_name = self.get_resource_name('test-schema-nonexist-async') + name = self.get_resource_name('test-schema-nonexist-async') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" format = "Avro" with pytest.raises(ServiceRequestError): - await client.register_schema(schemaregistry_group, schema_name, schema_str, format) + await client.register_schema(schemaregistry_group, name, schema_str, format) await client._generated_client._config.credential.close() @SchemaRegistryPowerShellPreparer() diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_basic.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_basic.yaml index 328f7761d583..b3133bdc6097 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_basic.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_basic.yaml @@ -11,75 +11,75 @@ interactions: Content-Length: - '201' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-basic31c70f88?api-version=2021-10 response: body: - string: '{"id":"694cab9feec74728bb431fe3a7bf75f0"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Wed, 29 Sep 2021 16:52:26 GMT + - Mon, 08 Nov 2021 19:21:14 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - 694cab9feec74728bb431fe3a7bf75f0 + - 5eb8476d1f6f46f09bee600d88839a9f schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/694cab9feec74728bb431fe3a7bf75f0?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/5eb8476d1f6f46f09bee600d88839a9f?api-version=2021-10 + schema-name: + - test-schema-basic31c70f88 schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic31c70f88/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic31c70f88/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content - request: body: null headers: Accept: - - text/plain; charset=utf-8 + - application/json; serialization=Avro Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/694cab9feec74728bb431fe3a7bf75f0?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/5eb8476d1f6f46f09bee600d88839a9f?api-version=2021-10 response: body: string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}' headers: content-type: - - application/json + - application/json;serialization=Avro date: - - Wed, 29 Sep 2021 16:52:26 GMT + - Mon, 08 Nov 2021 19:21:15 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - 694cab9feec74728bb431fe3a7bf75f0 + - 5eb8476d1f6f46f09bee600d88839a9f schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/694cab9feec74728bb431fe3a7bf75f0?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/5eb8476d1f6f46f09bee600d88839a9f?api-version=2021-10 + schema-name: + - test-schema-basic31c70f88 schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic31c70f88/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic31c70f88/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -101,40 +101,38 @@ interactions: Content-Length: - '201' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: POST - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-basic31c70f88:get-id?api-version=2021-10 response: body: - string: '{"id":"694cab9feec74728bb431fe3a7bf75f0"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Wed, 29 Sep 2021 16:52:27 GMT + - Mon, 08 Nov 2021 19:21:15 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-basic31c70f88/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - 694cab9feec74728bb431fe3a7bf75f0 + - 5eb8476d1f6f46f09bee600d88839a9f schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/694cab9feec74728bb431fe3a7bf75f0?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/5eb8476d1f6f46f09bee600d88839a9f?api-version=2021-10 + schema-name: + - test-schema-basic31c70f88 schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic31c70f88/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-basic31c70f88/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_negative_no_schema.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_negative_no_schema.yaml index 601d2162551e..bb88cfc1a811 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_negative_no_schema.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_negative_no_schema.yaml @@ -3,26 +3,26 @@ interactions: body: null headers: Accept: - - text/plain; charset=utf-8 + - application/json; serialization=Avro Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/a?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/a?api-version=2021-10 response: body: string: '{"Code":400,"Detail":"SubCode=40000, UnknownType:The request is invalid. - [MGResponseHttpError=BadRequest]. TrackingId:70e92116-f53e-4bac-a8c0-d4911d73b78b_G6, - SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/a, - Timestamp:2021-09-29T16:52:28"}' + [MGResponseHttpError=BadRequest]. TrackingId:452ca5f5-1a75-4f0e-89a1-ed2d4db27174_G21, + SystemTracker:fake_resource.servicebus.windows.net/:$schemaGroups\/$schemas\/a, + Timestamp:2021-11-08T19:21:17"}' headers: content-type: - application/json date: - - Wed, 29 Sep 2021 16:52:28 GMT + - Mon, 08 Nov 2021 19:21:17 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -36,25 +36,25 @@ interactions: body: null headers: Accept: - - text/plain; charset=utf-8 + - application/json; serialization=Avro Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa?api-version=2021-10 response: body: string: '{"Code":404,"Detail":"Schema id aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa does - not exist. TrackingId:ce867010-7173-41b3-9ad5-f3970933b3b4_G6, SystemTracker:swathip-test-eventhubs.servicebus.windows.net:$schemagroups\/getSchemaById\/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, - Timestamp:2021-09-29T16:52:29"}' + not exist. TrackingId:7f75b398-997b-4d32-ad30-f0d9b084e27b_G21, SystemTracker:fake_resource.servicebus.windows.net/:$schemaGroups\/$schemas\/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, + Timestamp:2021-11-08T19:21:18"}' headers: content-type: - application/json date: - - Wed, 29 Sep 2021 16:52:28 GMT + - Mon, 08 Nov 2021 19:21:17 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_same_twice.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_same_twice.yaml index 5793ebd3966f..a2f73d41d758 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_same_twice.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_same_twice.yaml @@ -11,42 +11,40 @@ interactions: Content-Length: - '179' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-twice863b11a7?api-version=2021-10 response: body: - string: '{"id":"18f60ef48371403a8a14b118d5bb7b77"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Wed, 29 Sep 2021 16:52:36 GMT + - Mon, 08 Nov 2021 19:21:29 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - 18f60ef48371403a8a14b118d5bb7b77 + - bdc1e883287a477f99e003cc3573c94c schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/18f60ef48371403a8a14b118d5bb7b77?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/bdc1e883287a477f99e003cc3573c94c?api-version=2021-10 + schema-name: + - test-schema-twice863b11a7 schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice863b11a7/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice863b11a7/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content - request: body: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"age","type":["int","null"]},{"name":"city","type":["string","null"]}]}' headers: @@ -59,40 +57,38 @@ interactions: Content-Length: - '179' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-twice863b11a7?api-version=2021-10 response: body: - string: '{"id":"18f60ef48371403a8a14b118d5bb7b77"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Wed, 29 Sep 2021 16:52:36 GMT + - Mon, 08 Nov 2021 19:21:30 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7/versions/1?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-twice863b11a7/versions/1?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - 18f60ef48371403a8a14b118d5bb7b77 + - bdc1e883287a477f99e003cc3573c94c schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/18f60ef48371403a8a14b118d5bb7b77?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/bdc1e883287a477f99e003cc3573c94c?api-version=2021-10 + schema-name: + - test-schema-twice863b11a7 schema-version: - '1' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice863b11a7/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-twice863b11a7/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content version: 1 diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_update.yaml b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_update.yaml index fdccdada7bf1..205531dbb29b 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_update.yaml +++ b/sdk/schemaregistry/azure-schemaregistry/tests/recordings/test_schema_registry.test_schema_update.yaml @@ -11,42 +11,40 @@ interactions: Content-Length: - '201' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-update423f1009?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-update423f1009?api-version=2021-10 response: body: - string: '{"id":"95e1b9b2b37f47ec8b5c3ad1cc8a59b0"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Wed, 29 Sep 2021 16:52:38 GMT + - Mon, 08 Nov 2021 19:21:31 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/5?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/5?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - 95e1b9b2b37f47ec8b5c3ad1cc8a59b0 + - e401c27b2ba443cd8d6b7c7329b5a9ef schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/95e1b9b2b37f47ec8b5c3ad1cc8a59b0?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/e401c27b2ba443cd8d6b7c7329b5a9ef?api-version=2021-10 + schema-name: + - test-schema-update423f1009 schema-version: - '5' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update423f1009/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update423f1009/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content - request: body: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_food","type":["string","null"]}]}' headers: @@ -59,75 +57,75 @@ interactions: Content-Length: - '200' Content-Type: - - application/json - Serialization-Type: - - Avro + - application/json; serialization=Avro User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: PUT - uri: https://fake_resource.servicebus.windows.net/$schemagroups/fakegroup/schemas/test-schema-update423f1009?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/fakegroup/schemas/test-schema-update423f1009?api-version=2021-10 response: body: - string: '{"id":"15ccba13dd0f4491aaebaa0d5d1c8269"}' + string: '' headers: - content-type: - - application/json + content-length: + - '0' date: - - Wed, 29 Sep 2021 16:52:38 GMT + - Mon, 08 Nov 2021 19:21:32 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/6?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/6?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - 15ccba13dd0f4491aaebaa0d5d1c8269 + - 8e24e9210b434524a795f8991d16f967 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/15ccba13dd0f4491aaebaa0d5d1c8269?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8e24e9210b434524a795f8991d16f967?api-version=2021-10 + schema-name: + - test-schema-update423f1009 schema-version: - '6' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update423f1009/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update423f1009/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: - max-age=31536000 - transfer-encoding: - - chunked status: - code: 200 - message: OK + code: 204 + message: No Content - request: body: null headers: Accept: - - text/plain; charset=utf-8 + - application/json; serialization=Avro Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - - azsdk-python-azureschemaregistry/1.0.0b3 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-azureschemaregistry/1.0.0 Python/3.9.0 (Windows-10-10.0.22000-SP0) method: GET - uri: https://fake_resource.servicebus.windows.net/$schemagroups/getSchemaById/15ccba13dd0f4491aaebaa0d5d1c8269?api-version=2020-09-01-preview + uri: https://fake_resource.servicebus.windows.net/$schemaGroups/$schemas/8e24e9210b434524a795f8991d16f967?api-version=2021-10 response: body: string: '{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_food","type":["string","null"]}]}' headers: content-type: - - application/json + - application/json;serialization=Avro date: - - Wed, 29 Sep 2021 16:52:38 GMT + - Mon, 08 Nov 2021 19:21:33 GMT location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/6?api-version=2020-09-01-preview + - https://fake_resource.servicebus.windows.net/:443/$schemagroups/fakegroup/schemas/test-schema-update423f1009/versions/6?api-version=2021-10 + schema-group-name: + - swathip-test-schema schema-id: - - 15ccba13dd0f4491aaebaa0d5d1c8269 + - 8e24e9210b434524a795f8991d16f967 schema-id-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/getschemabyid/15ccba13dd0f4491aaebaa0d5d1c8269?api-version=2020-09-01-preview + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/$schemas/8e24e9210b434524a795f8991d16f967?api-version=2021-10 + schema-name: + - test-schema-update423f1009 schema-version: - '6' schema-versions-location: - - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update423f1009/versions?api-version=2020-09-01-preview - serialization-type: - - Avro + - https://swathip-test-eventhubs.servicebus.windows.net:443/$schemagroups/swathip-test-schema/schemas/test-schema-update423f1009/versions?api-version=2021-10 server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/schemaregistry/azure-schemaregistry/tests/test_schema_registry.py b/sdk/schemaregistry/azure-schemaregistry/tests/test_schema_registry.py index 907617a311bf..7fd2f1a02da5 100644 --- a/sdk/schemaregistry/azure-schemaregistry/tests/test_schema_registry.py +++ b/sdk/schemaregistry/azure-schemaregistry/tests/test_schema_registry.py @@ -39,83 +39,77 @@ def create_client(self, fully_qualified_namespace): @SchemaRegistryPowerShellPreparer() def test_schema_basic(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): client = self.create_client(schemaregistry_fully_qualified_namespace) - schema_name = self.get_resource_name('test-schema-basic') + name = self.get_resource_name('test-schema-basic') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" format = "Avro" - schema_properties = client.register_schema(schemaregistry_group, schema_name, schema_str, format) + schema_properties = client.register_schema(schemaregistry_group, name, schema_str, format, logging_enable=True) assert schema_properties.id is not None - assert schema_properties.version is 1 assert schema_properties.format == "Avro" - returned_schema = client.get_schema(id=schema_properties.id) + returned_schema = client.get_schema(schema_id=schema_properties.id, logging_enable=True) assert returned_schema.properties.id == schema_properties.id - assert returned_schema.properties.version == 1 assert returned_schema.properties.format == "Avro" - assert returned_schema.schema_definition == schema_str + assert returned_schema.definition == schema_str - returned_schema_properties = client.get_schema_properties(schemaregistry_group, schema_name, schema_str, format) + returned_schema_properties = client.get_schema_properties(schemaregistry_group, name, schema_str, format, logging_enable=True) assert returned_schema_properties.id == schema_properties.id - assert returned_schema_properties.version == 1 assert returned_schema_properties.format == "Avro" @SchemaRegistryPowerShellPreparer() def test_schema_update(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): client = self.create_client(schemaregistry_fully_qualified_namespace) - schema_name = self.get_resource_name('test-schema-update') + name = self.get_resource_name('test-schema-update') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" format = "Avro" - schema_properties = client.register_schema(schemaregistry_group, schema_name, schema_str, format) + schema_properties = client.register_schema(schemaregistry_group, name, schema_str, format) assert schema_properties.id is not None - assert schema_properties.version != 0 assert schema_properties.format == "Avro" schema_str_new = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_food","type":["string","null"]}]}""" - new_schema_properties = client.register_schema(schemaregistry_group, schema_name, schema_str_new, format) + new_schema_properties = client.register_schema(schemaregistry_group, name, schema_str_new, format) assert new_schema_properties.id is not None - assert new_schema_properties.version == schema_properties.version + 1 assert new_schema_properties.format == "Avro" - new_schema = client.get_schema(id=new_schema_properties.id) + new_schema = client.get_schema(schema_id=new_schema_properties.id) assert new_schema.properties.id != schema_properties.id assert new_schema.properties.id == new_schema_properties.id - assert new_schema.schema_definition == schema_str_new - assert new_schema.properties.version == schema_properties.version + 1 + assert new_schema.definition == schema_str_new assert new_schema.properties.format == "Avro" @SchemaRegistryPowerShellPreparer() def test_schema_same_twice(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): client = self.create_client(schemaregistry_fully_qualified_namespace) - schema_name = self.get_resource_name('test-schema-twice') + name = self.get_resource_name('test-schema-twice') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"age","type":["int","null"]},{"name":"city","type":["string","null"]}]}""" format = "Avro" - schema_properties = client.register_schema(schemaregistry_group, schema_name, schema_str, format) - schema_properties_second = client.register_schema(schemaregistry_group, schema_name, schema_str, format) + schema_properties = client.register_schema(schemaregistry_group, name, schema_str, format) + schema_properties_second = client.register_schema(schemaregistry_group, name, schema_str, format) assert schema_properties.id == schema_properties_second.id @SchemaRegistryPowerShellPreparer() def test_schema_negative_wrong_credential(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): credential = ClientSecretCredential(tenant_id="fake", client_id="fake", client_secret="fake") client = SchemaRegistryClient(fully_qualified_namespace=schemaregistry_fully_qualified_namespace, credential=credential) - schema_name = self.get_resource_name('test-schema-negative') + name = self.get_resource_name('test-schema-negative') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" format = "Avro" with pytest.raises(ClientAuthenticationError): - client.register_schema(schemaregistry_group, schema_name, schema_str, format) + client.register_schema(schemaregistry_group, name, schema_str, format) @SchemaRegistryPowerShellPreparer() def test_schema_negative_wrong_endpoint(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): client = self.create_client("nonexist.servicebus.windows.net") - schema_name = self.get_resource_name('test-schema-nonexist') + name = self.get_resource_name('test-schema-nonexist') schema_str = """{"namespace":"example.avro","type":"record","name":"User","fields":[{"name":"name","type":"string"},{"name":"favorite_number","type":["int","null"]},{"name":"favorite_color","type":["string","null"]}]}""" format = "Avro" with pytest.raises(ServiceRequestError): - client.register_schema(schemaregistry_group, schema_name, schema_str, format) + client.register_schema(schemaregistry_group, name, schema_str, format) @SchemaRegistryPowerShellPreparer() def test_schema_negative_no_schema(self, schemaregistry_fully_qualified_namespace, schemaregistry_group, **kwargs): diff --git a/sdk/schemaregistry/tests.yml b/sdk/schemaregistry/tests.yml index b29323def858..0f7e7316a77b 100644 --- a/sdk/schemaregistry/tests.yml +++ b/sdk/schemaregistry/tests.yml @@ -6,8 +6,6 @@ stages: ServiceDirectory: schemaregistry TestTimeoutInMinutes: 300 BuildTargetingString: azure-schemaregistry* - AllocateResourceGroup: false - DeployArmTemplate: true EnvVars: AZURE_SUBSCRIPTION_ID: $(azure-subscription-id) AZURE_TENANT_ID: $(python-schema-registry-sdk-test-tenant-id) diff --git a/sdk/search/azure-search-documents/CHANGELOG.md b/sdk/search/azure-search-documents/CHANGELOG.md index b2b387e291f7..c3f792b781ad 100644 --- a/sdk/search/azure-search-documents/CHANGELOG.md +++ b/sdk/search/azure-search-documents/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 11.3.0b5 (Unreleased) +## 11.3.0b6 (Unreleased) ### Features Added @@ -10,6 +10,17 @@ ### Other Changes +## 11.3.0b5 (2021-11-09) + +### Features Added + +- Added properties to `SearchClient.search`: `session_id`, `scoring_statistics`. +- Added properties to `SearchIndexerDataSourceConnection`: `identity`, `encryption_key`. +- Added `select` property to the following `SearchIndexClient` operations: `get_synonym_maps`, `list_indexes`. +- Added `select` property to the following `SearchIndexersClient` operations: `get_data_source_connections`, `get_indexers`, `get_skillsets`. +- Added operations to `SearchIndexerClient`: `reset_skills`, `reset_documents`. +- Added model: `DocumentKeysOrIds` + ## 11.3.0b4 (2021-10-05) ### Features Added diff --git a/sdk/search/azure-search-documents/azure/search/documents/_search_client.py b/sdk/search/azure-search-documents/azure/search/documents/_search_client.py index 79fce398aad8..d7801844bb31 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_search_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_search_client.py @@ -226,6 +226,18 @@ def search(self, search_text, **kwargs): # pylint:disable=too-many-locals $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. + :keyword scoring_statistics: A value that specifies whether we want to calculate scoring + statistics (such as document frequency) globally for more consistent scoring, or locally, for + lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally + before scoring. Using global scoring statistics can increase latency of search queries. + Possible values include: "local", "global". + :paramtype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics + :keyword str session_id: A value to be used to create a sticky session, which can help getting more + consistent results. As long as the same sessionId is used, a best-effort attempt will be made + to target the same replica set. Be wary that reusing the same sessionID values repeatedly can + interfere with the load balancing of the requests across replicas and adversely affect the + performance of the search service. The value used as sessionId cannot start with a '_' + character. :rtype: SearchItemPaged[dict] .. admonition:: Example: @@ -274,6 +286,8 @@ def search(self, search_text, **kwargs): # pylint:disable=too-many-locals select = kwargs.pop("select", None) skip = kwargs.pop("skip", None) top = kwargs.pop("top", None) + session_id = kwargs.pop("session_id", None) + scoring_statistics = kwargs.pop("scoring_statistics", None) query_answer = kwargs.pop("query_answer", None) query_answer_count = kwargs.pop("query_answer_count", None) @@ -312,6 +326,8 @@ def search(self, search_text, **kwargs): # pylint:disable=too-many-locals select=select if isinstance(select, six.string_types) else None, skip=skip, top=top, + session_id=session_id, + scoring_statistics=scoring_statistics ) if isinstance(select, list): query.select(select) diff --git a/sdk/search/azure-search-documents/azure/search/documents/_version.py b/sdk/search/azure-search-documents/azure/search/documents/_version.py index 9e9c2a2ca756..a78bd89212be 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/_version.py +++ b/sdk/search/azure-search-documents/azure/search/documents/_version.py @@ -3,6 +3,6 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "11.3.0b5" # type: str +VERSION = "11.3.0b6" # type: str SDK_MONIKER = "search-documents/{}".format(VERSION) # type: str diff --git a/sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py b/sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py index 65a51b4610da..fafa78592533 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py +++ b/sdk/search/azure-search-documents/azure/search/documents/aio/_search_client_async.py @@ -205,6 +205,19 @@ async def search(self, search_text, **kwargs): # pylint:disable=too-many-locals $skip to implement client-side paging of search results. If results are truncated due to server-side paging, the response will include a continuation token that can be used to issue another Search request for the next page of results. + :keyword scoring_statistics: A value that specifies whether we want to calculate scoring + statistics (such as document frequency) globally for more consistent scoring, or locally, for + lower latency. The default is 'local'. Use 'global' to aggregate scoring statistics globally + before scoring. Using global scoring statistics can increase latency of search queries. + Possible values include: "local", "global". + :paramtype scoring_statistics: str or ~azure.search.documents.models.ScoringStatistics + :keyword session_id: A value to be used to create a sticky session, which can help getting more + consistent results. As long as the same sessionId is used, a best-effort attempt will be made + to target the same replica set. Be wary that reusing the same sessionID values repeatedly can + interfere with the load balancing of the requests across replicas and adversely affect the + performance of the search service. The value used as sessionId cannot start with a '_' + character. + :paramtype session_id: str :rtype: AsyncSearchItemPaged[dict] .. admonition:: Example: @@ -253,6 +266,8 @@ async def search(self, search_text, **kwargs): # pylint:disable=too-many-locals select = kwargs.pop("select", None) skip = kwargs.pop("skip", None) top = kwargs.pop("top", None) + session_id = kwargs.pop("session_id", None) + scoring_statistics = kwargs.pop("scoring_statistics", None) query_answer = kwargs.pop("query_answer", None) query_answer_count = kwargs.pop("query_answer_count", None) @@ -291,6 +306,8 @@ async def search(self, search_text, **kwargs): # pylint:disable=too-many-locals select=select if isinstance(select, six.string_types) else None, skip=skip, top=top, + session_id=session_id, + scoring_statistics=scoring_statistics ) if isinstance(select, list): query.select(select) diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py index fa5906f32b53..e01be47a27e2 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_index_client.py @@ -97,12 +97,18 @@ def list_indexes(self, **kwargs): # type: (**Any) -> ItemPaged[SearchIndex] """List the indexes in an Azure Search service. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :return: List of indexes :rtype: ~azure.core.paging.ItemPaged[~azure.search.documents.indexes.models.SearchIndex] :raises: ~azure.core.exceptions.HttpResponseError """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) # pylint:disable=protected-access return self._client.indexes.list( cls=lambda objs: [SearchIndex._from_generated(x) for x in objs], **kwargs @@ -306,6 +312,10 @@ def get_synonym_maps(self, **kwargs): # type: (**Any) -> List[SynonymMap] """List the Synonym Maps in an Azure Search service. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :return: List of synonym maps :rtype: list[~azure.search.documents.indexes.models.SynonymMap] :raises: ~azure.core.exceptions.HttpResponseError @@ -321,6 +331,8 @@ def get_synonym_maps(self, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) result = self._client.synonym_maps.list(**kwargs) # pylint:disable=protected-access return [SynonymMap._from_generated(x) for x in result.synonym_maps] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_indexer_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_indexer_client.py index c7e55716c554..6d507807c632 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_indexer_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/_search_indexer_client.py @@ -27,7 +27,7 @@ if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports - from ._generated.models import SearchIndexer, SearchIndexerStatus + from ._generated.models import SearchIndexer, SearchIndexerStatus, DocumentKeysOrIds from typing import Any, Optional, Sequence, Union from azure.core.credentials import TokenCredential @@ -161,6 +161,10 @@ def get_indexers(self, **kwargs): # type: (**Any) -> Sequence[SearchIndexer] """Lists all indexers available for a search service. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :return: List of all the SearchIndexers. :rtype: `list[~azure.search.documents.indexes.models.SearchIndexer]` @@ -174,6 +178,8 @@ def get_indexers(self, **kwargs): :caption: List all the SearchIndexers """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) result = self._client.indexers.list(**kwargs) return result.indexers @@ -279,6 +285,30 @@ def reset_indexer(self, name, **kwargs): kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) self._client.indexers.reset(name, **kwargs) + @distributed_trace + def reset_documents(self, indexer, keys_or_ids, **kwargs): + # type: (Union[str, SearchIndexer], DocumentKeysOrIds, **Any) -> None + """Resets specific documents in the datasource to be selectively re-ingested by the indexer. + + :param indexer: The indexer to reset documents for. + :type indexer: str or ~azure.search.documents.indexes.models.SearchIndexer + :param keys_or_ids: + :type keys_or_ids: ~azure.search.documents.indexes.models.DocumentKeysOrIds + :return: None, or the result of cls(response) + :keyword overwrite: If false, keys or ids will be appended to existing ones. If true, only the + keys or ids in this payload will be queued to be re-ingested. The default is false. + :paramtype overwrite: bool + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + kwargs["keys_or_ids"] = keys_or_ids + try: + name = indexer.name + except AttributeError: + name = indexer + return self._client.indexers.reset_docs(name, **kwargs) + @distributed_trace def get_indexer_status(self, name, **kwargs): # type: (str, **Any) -> SearchIndexerStatus @@ -390,6 +420,10 @@ def get_data_source_connections(self, **kwargs): # type: (**Any) -> Sequence[SearchIndexerDataSourceConnection] """Lists all data source connections available for a search service. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :return: List of all the data source connections. :rtype: `list[~azure.search.documents.indexes.models.SearchIndexerDataSourceConnection]` @@ -403,6 +437,8 @@ def get_data_source_connections(self, **kwargs): :caption: List all the SearchIndexerDataSourceConnections """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) result = self._client.data_sources.list(**kwargs) # pylint:disable=protected-access return [ @@ -465,6 +501,10 @@ def get_skillsets(self, **kwargs): # type: (**Any) -> List[SearchIndexerSkillset] """List the SearchIndexerSkillsets in an Azure Search service. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :return: List of SearchIndexerSkillsets :rtype: list[~azure.search.documents.indexes.models.SearchIndexerSkillset] :raises: ~azure.core.exceptions.HttpResponseError @@ -480,6 +520,8 @@ def get_skillsets(self, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) result = self._client.skillsets.list(**kwargs) return [SearchIndexerSkillset._from_generated(skillset) for skillset in result.skillsets] # pylint:disable=protected-access @@ -529,8 +571,8 @@ def delete_skillset(self, skillset, **kwargs): the SearchIndexerSkillset model must be provided instead of the name. It is enough to provide the name of the skillset to delete unconditionally - :param name: The SearchIndexerSkillset to delete - :type name: str or ~azure.search.documents.indexes.models.SearchIndexerSkillset + :param skillset: The SearchIndexerSkillset to delete + :type skillset: str or ~azure.search.documents.indexes.models.SearchIndexerSkillset :keyword match_condition: The match condition to use upon the etag :type match_condition: ~azure.core.MatchConditions @@ -617,6 +659,26 @@ def create_or_update_skillset(self, skillset, **kwargs): ) return SearchIndexerSkillset._from_generated(result) # pylint:disable=protected-access + @distributed_trace + def reset_skills(self, skillset, skill_names, **kwargs): + # type: (Union[str, SearchIndexerSkillset], List[str], **Any) -> None + """Reset an existing skillset in a search service. + + :param skillset: The SearchIndexerSkillset to reset + :type skillset: str or ~azure.search.documents.indexes.models.SearchIndexerSkillset + :param skill_names: the names of skills to be reset. + :type skill_names: list[str] + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + try: + name = skillset.name + except AttributeError: + name = skillset + return self._client.skillsets.reset_skills(name, skill_names, **kwargs) + def _validate_skillset(skillset): """Validates any multi-version skills in the skillset to verify that unsupported parameters are not supplied by the user. diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_index_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_index_client.py index d20618583fd2..27e51a82357b 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_index_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_index_client.py @@ -103,13 +103,18 @@ def list_indexes(self, **kwargs): # type: (**Any) -> AsyncItemPaged[SearchIndex] """List the indexes in an Azure Search service. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :return: List of indexes :rtype: ~azure.core.async_paging.AsyncItemPaged[:class:`~azure.search.documents.indexes.models.SearchIndex`] :raises: ~azure.core.exceptions.HttpResponseError """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) - + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) # pylint:disable=protected-access return self._client.indexes.list( cls=lambda objs: [SearchIndex._from_generated(x) for x in objs], **kwargs @@ -313,6 +318,10 @@ async def get_synonym_maps(self, **kwargs): # type: (**Any) -> List[SynonymMap] """List the Synonym Maps in an Azure Search service. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :return: List of synonym maps :rtype: list[~azure.search.documents.indexes.models.SynonymMap] :raises: ~azure.core.exceptions.HttpResponseError @@ -328,6 +337,8 @@ async def get_synonym_maps(self, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) result = await self._client.synonym_maps.list(**kwargs) # pylint:disable=protected-access return [SynonymMap._from_generated(x) for x in result.synonym_maps] diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_indexer_client.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_indexer_client.py index d0e589f9a39e..83836d099c1f 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_indexer_client.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/aio/_search_indexer_client.py @@ -25,7 +25,7 @@ if TYPE_CHECKING: # pylint:disable=unused-import,ungrouped-imports - from .._generated.models import SearchIndexer, SearchIndexerStatus + from .._generated.models import SearchIndexer, SearchIndexerStatus, DocumentKeysOrIds from typing import Any, Optional, Sequence from azure.core.credentials_async import AsyncTokenCredential @@ -162,6 +162,10 @@ async def get_indexers(self, **kwargs): # type: (**Any) -> Sequence[SearchIndexer] """Lists all indexers available for a search service. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :return: List of all the SearchIndexers. :rtype: `list[~azure.search.documents.indexes.models.SearchIndexer]` @@ -175,6 +179,8 @@ async def get_indexers(self, **kwargs): :caption: List all the SearchIndexers """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) result = await self._client.indexers.list(**kwargs) return result.indexers @@ -272,6 +278,31 @@ async def reset_indexer(self, name, **kwargs): kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) await self._client.indexers.reset(name, **kwargs) + @distributed_trace_async + async def reset_documents(self, indexer, keys_or_ids, **kwargs): + # type: (Union[str, SearchIndexer], DocumentKeysOrIds, **Any) -> None + """Resets specific documents in the datasource to be selectively re-ingested by the indexer. + + :param indexer: The indexer to reset documents for. + :type indexer: str or ~azure.search.documents.indexes.models.SearchIndexer + :param keys_or_ids: + :type keys_or_ids: ~azure.search.documents.indexes.models.DocumentKeysOrIds + :return: None, or the result of cls(response) + :keyword overwrite: If false, keys or ids will be appended to existing ones. If true, only the + keys or ids in this payload will be queued to be re-ingested. The default is false. + :paramtype overwrite: bool + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + kwargs["keys_or_ids"] = keys_or_ids + try: + name = indexer.name + except AttributeError: + name = indexer + result = await self._client.indexers.reset_docs(name, **kwargs) + return result + @distributed_trace_async async def get_indexer_status(self, name, **kwargs): # type: (str, **Any) -> SearchIndexerStatus @@ -393,6 +424,10 @@ async def get_data_source_connection(self, name, **kwargs): # type: (str, **Any) -> SearchIndexerDataSourceConnection """Retrieves a data source connection definition. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :param name: The name of the data source connection to retrieve. :type name: str :return: The SearchIndexerDataSourceConnection that is fetched. @@ -406,6 +441,8 @@ async def get_data_source_connection(self, name, **kwargs): :caption: Retrieve a SearchIndexerDataSourceConnection """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) result = await self._client.data_sources.get(name, **kwargs) # pylint:disable=protected-access return SearchIndexerDataSourceConnection._from_generated(result) @@ -453,6 +490,10 @@ async def get_skillsets(self, **kwargs): # type: (**Any) -> List[SearchIndexerSkillset] """List the SearchIndexerSkillsets in an Azure Search service. + :keyword select: Selects which top-level properties of the skillsets to retrieve. Specified as a + list of JSON property names, or '*' for all properties. The default is all + properties. + :paramtype select: list[str] :return: List of SearchIndexerSkillsets :rtype: list[~azure.search.documents.indexes.models.SearchIndexerSkillset] :raises: ~azure.core.exceptions.HttpResponseError @@ -468,6 +509,8 @@ async def get_skillsets(self, **kwargs): """ kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + if kwargs.get('select', None): + kwargs['select'] = ','.join(kwargs['select']) result = await self._client.skillsets.list(**kwargs) return [SearchIndexerSkillset._from_generated(skillset) for skillset in result.skillsets] # pylint:disable=protected-access @@ -517,8 +560,8 @@ async def delete_skillset(self, skillset, **kwargs): the SearchIndexerSkillset model must be provided instead of the name. It is enough to provide the name of the skillset to delete unconditionally - :param name: The SearchIndexerSkillset to delete - :type name: str or ~azure.search.documents.indexes.models.SearchIndexerSkillset + :param skillset: The SearchIndexerSkillset to delete + :type skillset: str or ~azure.search.documents.indexes.models.SearchIndexerSkillset :keyword match_condition: The match condition to use upon the etag :type match_condition: ~azure.core.MatchConditions @@ -601,3 +644,24 @@ async def create_or_update_skillset(self, skillset, **kwargs): **kwargs ) return SearchIndexerSkillset._from_generated(result) # pylint:disable=protected-access + + @distributed_trace_async + async def reset_skills(self, skillset, skill_names, **kwargs): + # type: (Union[str, SearchIndexerSkillset], List[str], **Any) -> None + """Reset an existing skillset in a search service. + + :param skillset: The SearchIndexerSkillset to reset + :type skillset: str or ~azure.search.documents.indexes.models.SearchIndexerSkillset + :param skill_names: the names of skills to be reset. + :type skill_names: list[str] + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + kwargs["headers"] = self._merge_client_headers(kwargs.get("headers")) + try: + name = skillset.name + except AttributeError: + name = skillset + result = await self._client.skillsets.reset_skills(name, skill_names, **kwargs) + return result diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py index 58af2c002d11..d2b6c5d64960 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/__init__.py @@ -52,6 +52,7 @@ DistanceScoringFunction, DistanceScoringParameters, DocumentExtractionSkill, + DocumentKeysOrIds, EdgeNGramTokenFilter, EdgeNGramTokenizer, EdgeNGramTokenFilterSide, @@ -199,6 +200,7 @@ "DistanceScoringFunction", "DistanceScoringParameters", "DocumentExtractionSkill", + "DocumentKeysOrIds", "EdgeNGramTokenFilter", "EdgeNGramTokenizer", "ElisionTokenFilter", diff --git a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py index 9a88f0e0b1b7..5800abac4e3c 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py +++ b/sdk/search/azure-search-documents/azure/search/documents/indexes/models/_models.py @@ -849,6 +849,21 @@ class SearchIndexerDataSourceConnection(msrest.serialization.Model): ~azure.search.documents.models.DataDeletionDetectionPolicy :keyword e_tag: The ETag of the data source. :paramtype e_tag: str + :keyword identity: An explicit managed identity to use for this datasource. If not specified and + the connection string is a managed identity, the system-assigned managed identity is used. If + not specified, the value remains unchanged. If "none" is specified, the value of this property + is cleared. + :paramtype identity: ~azure.search.documents.indexes.models.SearchIndexerDataIdentity + :keyword encryption_key: A description of an encryption key that you create in Azure Key Vault. + This key is used to provide an additional level of encryption-at-rest for your datasource + definition when you want full assurance that no one, not even Microsoft, can decrypt your data + source definition in Azure Cognitive Search. Once you have encrypted your data source + definition, it will always remain encrypted. Azure Cognitive Search will ignore attempts to set + this property to null. You can change this property as needed if you want to rotate your + encryption key; Your datasource definition will be unaffected. Encryption with customer-managed + keys is not available for free search services, and is only available for paid services created + on or after January 1, 2019. + :paramtype encryption_key: ~azure.search.documents.indexes.models.SearchResourceEncryptionKey """ _validation = { @@ -872,7 +887,9 @@ class SearchIndexerDataSourceConnection(msrest.serialization.Model): "key": "dataDeletionDetectionPolicy", "type": "DataDeletionDetectionPolicy", }, + 'encryption_key': {'key': 'encryptionKey', 'type': 'SearchResourceEncryptionKey'}, "e_tag": {"key": "@odata\\.etag", "type": "str"}, + 'identity': {'key': 'identity', 'type': 'SearchIndexerDataIdentity'}, } def __init__(self, **kwargs): @@ -889,6 +906,8 @@ def __init__(self, **kwargs): "data_deletion_detection_policy", None ) self.e_tag = kwargs.get("e_tag", None) + self.encryption_key = kwargs.get("encryption_key", None) + self.identity = kwargs.get("identity", None) def _to_generated(self): if self.connection_string is None or self.connection_string == "": @@ -905,6 +924,8 @@ def _to_generated(self): data_change_detection_policy=self.data_change_detection_policy, data_deletion_detection_policy=self.data_deletion_detection_policy, e_tag=self.e_tag, + encryption_key=self.encryption_key, + identity=self.identity ) @classmethod @@ -925,6 +946,8 @@ def _from_generated(cls, search_indexer_data_source): data_change_detection_policy=search_indexer_data_source.data_change_detection_policy, data_deletion_detection_policy=search_indexer_data_source.data_deletion_detection_policy, e_tag=search_indexer_data_source.e_tag, + encryption_key=search_indexer_data_source.encryption_key, + identity=search_indexer_data_source.identity ) diff --git a/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py b/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py index c93b4ac66b9c..23213d7bb771 100644 --- a/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py +++ b/sdk/search/azure-search-documents/azure/search/documents/models/__init__.py @@ -35,7 +35,8 @@ QueryLanguage, QuerySpellerType, QueryType, - SearchMode, + ScoringStatistics, + SearchMode ) from .._search_client import odata @@ -52,5 +53,6 @@ "QueryLanguage", "QuerySpellerType", "QueryType", + "ScoringStatistics", "SearchMode", ) diff --git a/sdk/search/azure-search-documents/dev_requirements.txt b/sdk/search/azure-search-documents/dev_requirements.txt index 95de8e158b79..358a869e3d62 100644 --- a/sdk/search/azure-search-documents/dev_requirements.txt +++ b/sdk/search/azure-search-documents/dev_requirements.txt @@ -2,4 +2,4 @@ -e ../../../tools/azure-sdk-tools ../../core/azure-core ../../nspkg/azure-search-nspkg -aiohttp>=3.0; python_version >= '3.5' \ No newline at end of file +aiohttp>=3.0; python_version >= '3.5' diff --git a/sdk/search/azure-search-documents/setup.py b/sdk/search/azure-search-documents/setup.py index bcaace8b39ba..b3d918a47a86 100644 --- a/sdk/search/azure-search-documents/setup.py +++ b/sdk/search/azure-search-documents/setup.py @@ -82,7 +82,7 @@ "azure-core<2.0.0,>=1.19.0", "msrest>=0.6.21", "azure-common~=1.1", - "typing-extensions" + "typing-extensions>=3.7.4.3" ], extras_require={ ":python_version<'3.0'": ['futures', 'azure-search-nspkg'], diff --git a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_skillset.yaml b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_skillset.yaml index 3d61e40be4f7..ef03d1f947e9 100644 --- a/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_skillset.yaml +++ b/sdk/search/azure-search-documents/tests/async_tests/recordings/test_search_index_client_skillset_live_async.test_create_skillset.yaml @@ -1,45 +1,46 @@ interactions: - request: body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "organizations", "targetName": "organizationsS1"}], "includeTypelessEntities": - true}, {"@odata.type": "#Microsoft.Skills.Text.V3.EntityRecognitionSkill", "inputs": - [{"name": "text", "source": "/document/content"}], "outputs": [{"name": "organizations", - "targetName": "organizationsS2"}], "modelVersion": "3"}, {"@odata.type": "#Microsoft.Skills.Text.SentimentSkill", + "name": "skill1", "inputs": [{"name": "text", "source": "/document/content"}], + "outputs": [{"name": "organizations", "targetName": "organizationsS1"}], "includeTypelessEntities": + true}, {"@odata.type": "#Microsoft.Skills.Text.V3.EntityRecognitionSkill", "name": + "skill2", "inputs": [{"name": "text", "source": "/document/content"}], "outputs": + [{"name": "organizations", "targetName": "organizationsS2"}], "modelVersion": + "3"}, {"@odata.type": "#Microsoft.Skills.Text.SentimentSkill", "name": "skill3", "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": "score", "targetName": "scoreS3"}]}, {"@odata.type": "#Microsoft.Skills.Text.V3.SentimentSkill", - "inputs": [{"name": "text", "source": "/document/content"}], "outputs": [{"name": - "confidenceScores", "targetName": "scoreS4"}], "includeOpinionMining": true}, - {"@odata.type": "#Microsoft.Skills.Text.V3.EntityLinkingSkill", "inputs": [{"name": - "text", "source": "/document/content"}], "outputs": [{"name": "entities", "targetName": - "entitiesS5"}], "minimumPrecision": 0.5}]}' + "name": "skill4", "inputs": [{"name": "text", "source": "/document/content"}], + "outputs": [{"name": "confidenceScores", "targetName": "scoreS4"}], "includeOpinionMining": + true}, {"@odata.type": "#Microsoft.Skills.Text.V3.EntityLinkingSkill", "name": + "skill5", "inputs": [{"name": "text", "source": "/document/content"}], "outputs": + [{"name": "entities", "targetName": "entitiesS5"}], "minimumPrecision": 0.5}]}' headers: Accept: - application/json;odata.metadata=minimal Content-Length: - - '1121' + - '1211' Content-Type: - application/json User-Agent: - - azsdk-python-search-documents/11.3.0b3 Python/3.9.2 (Windows-10-10.0.19041-SP0) + - azsdk-python-search-documents/11.3.0b5 Python/3.9.2 (Windows-10-10.0.19041-SP0) method: POST uri: https://search75151acc.search.windows.net/skillsets?api-version=2021-04-30-Preview response: body: - string: '{"@odata.context":"https://search75151acc.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D96E6933515CD0\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS1"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityRecognitionSkill","name":null,"description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"modelVersion":"3","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS2"}]},{"@odata.type":"#Microsoft.Skills.Text.SentimentSkill","name":null,"description":null,"context":null,"defaultLanguageCode":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"score","targetName":"scoreS3"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.SentimentSkill","name":null,"description":null,"context":null,"defaultLanguageCode":null,"modelVersion":null,"includeOpinionMining":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"confidenceScores","targetName":"scoreS4"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityLinkingSkill","name":null,"description":null,"context":null,"defaultLanguageCode":null,"minimumPrecision":0.5,"modelVersion":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"entities","targetName":"entitiesS5"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + string: '{"@odata.context":"https://search75151acc.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D99B0399B12612\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"skill1","description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS1"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityRecognitionSkill","name":"skill2","description":null,"context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"modelVersion":"3","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS2"}]},{"@odata.type":"#Microsoft.Skills.Text.SentimentSkill","name":"skill3","description":null,"context":null,"defaultLanguageCode":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"score","targetName":"scoreS3"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.SentimentSkill","name":"skill4","description":null,"context":null,"defaultLanguageCode":null,"modelVersion":null,"includeOpinionMining":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"confidenceScores","targetName":"scoreS4"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityLinkingSkill","name":"skill5","description":null,"context":null,"defaultLanguageCode":null,"minimumPrecision":0.5,"modelVersion":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"entities","targetName":"entitiesS5"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' headers: cache-control: no-cache - content-length: '1894' + content-length: '1914' content-type: application/json; odata.metadata=minimal - date: Thu, 02 Sep 2021 23:27:16 GMT - elapsed-time: '200' - etag: W/"0x8D96E6933515CD0" + date: Fri, 29 Oct 2021 17:43:21 GMT + elapsed-time: '2316' + etag: W/"0x8D99B0399B12612" expires: '-1' location: https://search75151acc.search.windows.net/skillsets('test-ss')?api-version=2021-04-30-Preview odata-version: '4.0' pragma: no-cache preference-applied: odata.include-annotations="*" - request-id: 5036e3d3-0c45-11ec-89fe-74c63bed1137 + request-id: b51a3cc3-38df-11ec-aeae-74c63bed1137 strict-transport-security: max-age=15724800; includeSubDomains status: code: 201 @@ -51,28 +52,55 @@ interactions: Accept: - application/json;odata.metadata=minimal User-Agent: - - azsdk-python-search-documents/11.3.0b3 Python/3.9.2 (Windows-10-10.0.19041-SP0) + - azsdk-python-search-documents/11.3.0b5 Python/3.9.2 (Windows-10-10.0.19041-SP0) method: GET uri: https://search75151acc.search.windows.net/skillsets?api-version=2021-04-30-Preview response: body: - string: '{"@odata.context":"https://search75151acc.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D96E6933515CD0\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS1"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityRecognitionSkill","name":"#2","description":null,"context":"/document","categories":["Product","Phone - Number","Person","Quantity","IP Address","Organization","URL","Email","Event","Skill","Location","PersonType","Address","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"modelVersion":"3","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS2"}]},{"@odata.type":"#Microsoft.Skills.Text.SentimentSkill","name":"#3","description":null,"context":"/document","defaultLanguageCode":"en","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"score","targetName":"scoreS3"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.SentimentSkill","name":"#4","description":null,"context":"/document","defaultLanguageCode":"en","modelVersion":null,"includeOpinionMining":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"confidenceScores","targetName":"scoreS4"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityLinkingSkill","name":"#5","description":null,"context":"/document","defaultLanguageCode":"en","minimumPrecision":0.5,"modelVersion":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"entities","targetName":"entitiesS5"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + string: '{"@odata.context":"https://search75151acc.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D99B0399B12612\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"skill1","description":null,"context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS1"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityRecognitionSkill","name":"skill2","description":null,"context":"/document","categories":["Product","PhoneNumber","Person","Quantity","Organization","IPAddress","URL","Email","Event","Skill","Location","PersonType","Address","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"modelVersion":"3","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS2"}]},{"@odata.type":"#Microsoft.Skills.Text.SentimentSkill","name":"skill3","description":null,"context":"/document","defaultLanguageCode":"en","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"score","targetName":"scoreS3"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.SentimentSkill","name":"skill4","description":null,"context":"/document","defaultLanguageCode":"en","modelVersion":null,"includeOpinionMining":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"confidenceScores","targetName":"scoreS4"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityLinkingSkill","name":"skill5","description":null,"context":"/document","defaultLanguageCode":"en","minimumPrecision":0.5,"modelVersion":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"entities","targetName":"entitiesS5"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' headers: cache-control: no-cache content-length: '795' content-type: application/json; odata.metadata=minimal - date: Thu, 02 Sep 2021 23:27:16 GMT - elapsed-time: '39' + date: Fri, 29 Oct 2021 17:43:21 GMT + elapsed-time: '115' expires: '-1' odata-version: '4.0' pragma: no-cache preference-applied: odata.include-annotations="*" - request-id: 507bb3fc-0c45-11ec-b9ee-74c63bed1137 + request-id: b6a87364-38df-11ec-bfe5-74c63bed1137 strict-transport-security: max-age=15724800; includeSubDomains vary: Accept-Encoding status: code: 200 message: OK url: https://search75151acc.search.windows.net/skillsets?api-version=2021-04-30-Preview +- request: + body: '{"skillNames": ["skill1", "skill2", "skill3", "skill4", "skill5"]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Content-Length: + - '66' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.3.0b5 Python/3.9.2 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://search75151acc.search.windows.net/skillsets('test-ss')/search.resetskills?api-version=2021-04-30-Preview + response: + body: + string: '' + headers: + cache-control: no-cache + date: Fri, 29 Oct 2021 17:43:21 GMT + elapsed-time: '75' + expires: '-1' + pragma: no-cache + request-id: b6c43de3-38df-11ec-93a9-74c63bed1137 + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content + url: https://search75151acc.search.windows.net/skillsets('test-ss')/search.resetskills?api-version=2021-04-30-Preview version: 1 diff --git a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py index 1544e53a34cb..62822e042f33 100644 --- a/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py +++ b/sdk/search/azure-search-documents/tests/async_tests/test_search_index_client_skillset_live_async.py @@ -59,31 +59,36 @@ async def test_create_skillset(self, api_key, endpoint, index_name, **kwargs): client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) name = "test-ss" - s1 = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s1 = EntityRecognitionSkill(name="skill1", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS1")], description="Skill Version 1", model_version="1", include_typeless_entities=True) - s2 = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s2 = EntityRecognitionSkill(name="skill2", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS2")], skill_version=EntityRecognitionSkillVersion.LATEST, description="Skill Version 3", model_version="3", include_typeless_entities=True) - s3 = SentimentSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s3 = SentimentSkill(name="skill3", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="score", target_name="scoreS3")], skill_version=SentimentSkillVersion.V1, description="Sentiment V1", include_opinion_mining=True) - s4 = SentimentSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s4 = SentimentSkill(name="skill4", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="confidenceScores", target_name="scoreS4")], skill_version=SentimentSkillVersion.V3, description="Sentiment V3", include_opinion_mining=True) - s5 = EntityLinkingSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s5 = EntityLinkingSkill(name="skill5", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="entities", target_name="entitiesS5")], minimum_precision=0.5) @@ -108,6 +113,8 @@ async def test_create_skillset(self, api_key, endpoint, index_name, **kwargs): assert len(await client.get_skillsets()) == 1 + await client.reset_skills(result, [x.name for x in result.skills]) + @SearchResourceGroupPreparer(random_name_enabled=True) @SearchServicePreparer(schema=SCHEMA, index_batch=BATCH) async def test_delete_skillset(self, api_key, endpoint, index_name, **kwargs): diff --git a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_skillset.yaml b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_skillset.yaml index 0e61e15a6ac6..9e9d0439ce64 100644 --- a/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_skillset.yaml +++ b/sdk/search/azure-search-documents/tests/recordings/test_search_index_client_skillset_live.test_create_skillset.yaml @@ -1,19 +1,21 @@ interactions: - request: body: '{"name": "test-ss", "description": "desc", "skills": [{"@odata.type": "#Microsoft.Skills.Text.EntityRecognitionSkill", - "description": "Skill Version 1", "inputs": [{"name": "text", "source": "/document/content"}], - "outputs": [{"name": "organizations", "targetName": "organizationsS1"}], "includeTypelessEntities": - true}, {"@odata.type": "#Microsoft.Skills.Text.V3.EntityRecognitionSkill", "description": - "Skill Version 3", "inputs": [{"name": "text", "source": "/document/content"}], - "outputs": [{"name": "organizations", "targetName": "organizationsS2"}], "modelVersion": - "3"}, {"@odata.type": "#Microsoft.Skills.Text.SentimentSkill", "description": - "Sentiment V1", "inputs": [{"name": "text", "source": "/document/content"}], - "outputs": [{"name": "score", "targetName": "scoreS3"}]}, {"@odata.type": "#Microsoft.Skills.Text.V3.SentimentSkill", - "description": "Sentiment V3", "inputs": [{"name": "text", "source": "/document/content"}], - "outputs": [{"name": "confidenceScores", "targetName": "scoreS4"}], "includeOpinionMining": - true}, {"@odata.type": "#Microsoft.Skills.Text.V3.EntityLinkingSkill", "inputs": - [{"name": "text", "source": "/document/content"}], "outputs": [{"name": "entities", - "targetName": "entitiesS5"}], "minimumPrecision": 0.5}]}' + "name": "skill1", "description": "Skill Version 1", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizationsS1"}], "includeTypelessEntities": true}, {"@odata.type": "#Microsoft.Skills.Text.V3.EntityRecognitionSkill", + "name": "skill2", "description": "Skill Version 3", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "organizations", "targetName": + "organizationsS2"}], "modelVersion": "3"}, {"@odata.type": "#Microsoft.Skills.Text.SentimentSkill", + "name": "skill3", "description": "Sentiment V1", "inputs": [{"name": "text", + "source": "/document/content"}], "outputs": [{"name": "score", "targetName": + "scoreS3"}]}, {"@odata.type": "#Microsoft.Skills.Text.V3.SentimentSkill", "name": + "skill4", "description": "Sentiment V3", "inputs": [{"name": "text", "source": + "/document/content"}], "outputs": [{"name": "confidenceScores", "targetName": + "scoreS4"}], "includeOpinionMining": true}, {"@odata.type": "#Microsoft.Skills.Text.V3.EntityLinkingSkill", + "name": "skill5", "inputs": [{"name": "text", "source": "/document/content"}], + "outputs": [{"name": "entities", "targetName": "entitiesS5"}], "minimumPrecision": + 0.5}]}' headers: Accept: - application/json;odata.metadata=minimal @@ -22,33 +24,33 @@ interactions: Connection: - keep-alive Content-Length: - - '1251' + - '1341' Content-Type: - application/json User-Agent: - - azsdk-python-search-documents/11.3.0b4 Python/3.9.2 (Windows-10-10.0.19041-SP0) + - azsdk-python-search-documents/11.3.0b5 Python/3.9.2 (Windows-10-10.0.19041-SP0) method: POST uri: https://searchd998184f.search.windows.net/skillsets?api-version=2021-04-30-Preview response: body: - string: '{"@odata.context":"https://searchd998184f.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D977C13CD227F9\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":null,"description":"Skill - Version 1","context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS1"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityRecognitionSkill","name":null,"description":"Skill - Version 3","context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"modelVersion":"3","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS2"}]},{"@odata.type":"#Microsoft.Skills.Text.SentimentSkill","name":null,"description":"Sentiment - V1","context":null,"defaultLanguageCode":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"score","targetName":"scoreS3"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.SentimentSkill","name":null,"description":"Sentiment - V3","context":null,"defaultLanguageCode":null,"modelVersion":null,"includeOpinionMining":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"confidenceScores","targetName":"scoreS4"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityLinkingSkill","name":null,"description":null,"context":null,"defaultLanguageCode":null,"minimumPrecision":0.5,"modelVersion":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"entities","targetName":"entitiesS5"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' + string: '{"@odata.context":"https://searchd998184f.search.windows.net/$metadata#skillsets/$entity","@odata.etag":"\"0x8D99B03895900E6\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"skill1","description":"Skill + Version 1","context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"includeTypelessEntities":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS1"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityRecognitionSkill","name":"skill2","description":"Skill + Version 3","context":null,"categories":[],"defaultLanguageCode":null,"minimumPrecision":null,"modelVersion":"3","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS2"}]},{"@odata.type":"#Microsoft.Skills.Text.SentimentSkill","name":"skill3","description":"Sentiment + V1","context":null,"defaultLanguageCode":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"score","targetName":"scoreS3"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.SentimentSkill","name":"skill4","description":"Sentiment + V3","context":null,"defaultLanguageCode":null,"modelVersion":null,"includeOpinionMining":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"confidenceScores","targetName":"scoreS4"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityLinkingSkill","name":"skill5","description":null,"context":null,"defaultLanguageCode":null,"minimumPrecision":0.5,"modelVersion":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"entities","targetName":"entitiesS5"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}' headers: cache-control: - no-cache content-length: - - '1940' + - '1960' content-type: - application/json; odata.metadata=minimal date: - - Tue, 14 Sep 2021 20:50:08 GMT + - Fri, 29 Oct 2021 17:42:54 GMT elapsed-time: - - '2192' + - '2093' etag: - - W/"0x8D977C13CD227F9" + - W/"0x8D99B03895900E6" expires: - '-1' location: @@ -60,7 +62,7 @@ interactions: preference-applied: - odata.include-annotations="*" request-id: - - 5895d1df-159d-11ec-ab13-74c63bed1137 + - a4e19c2b-38df-11ec-9ba5-74c63bed1137 strict-transport-security: - max-age=15724800; includeSubDomains status: @@ -76,28 +78,27 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-search-documents/11.3.0b4 Python/3.9.2 (Windows-10-10.0.19041-SP0) + - azsdk-python-search-documents/11.3.0b5 Python/3.9.2 (Windows-10-10.0.19041-SP0) method: GET uri: https://searchd998184f.search.windows.net/skillsets?api-version=2021-04-30-Preview response: body: - string: '{"@odata.context":"https://searchd998184f.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D977C13CD227F9\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"#1","description":"Skill - Version 1","context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS1"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityRecognitionSkill","name":"#2","description":"Skill - Version 3","context":"/document","categories":["Product","Phone Number","Person","Quantity","IP - Address","Organization","URL","Email","Event","Skill","Location","PersonType","Address","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"modelVersion":"3","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS2"}]},{"@odata.type":"#Microsoft.Skills.Text.SentimentSkill","name":"#3","description":"Sentiment - V1","context":"/document","defaultLanguageCode":"en","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"score","targetName":"scoreS3"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.SentimentSkill","name":"#4","description":"Sentiment - V3","context":"/document","defaultLanguageCode":"en","modelVersion":null,"includeOpinionMining":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"confidenceScores","targetName":"scoreS4"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityLinkingSkill","name":"#5","description":null,"context":"/document","defaultLanguageCode":"en","minimumPrecision":0.5,"modelVersion":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"entities","targetName":"entitiesS5"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' + string: '{"@odata.context":"https://searchd998184f.search.windows.net/$metadata#skillsets","value":[{"@odata.etag":"\"0x8D99B03895900E6\"","name":"test-ss","description":"desc","skills":[{"@odata.type":"#Microsoft.Skills.Text.EntityRecognitionSkill","name":"skill1","description":"Skill + Version 1","context":"/document","categories":["Person","Quantity","Organization","URL","Email","Location","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"includeTypelessEntities":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS1"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityRecognitionSkill","name":"skill2","description":"Skill + Version 3","context":"/document","categories":["Product","PhoneNumber","Person","Quantity","Organization","IPAddress","URL","Email","Event","Skill","Location","PersonType","Address","DateTime"],"defaultLanguageCode":"en","minimumPrecision":null,"modelVersion":"3","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"organizations","targetName":"organizationsS2"}]},{"@odata.type":"#Microsoft.Skills.Text.SentimentSkill","name":"skill3","description":"Sentiment + V1","context":"/document","defaultLanguageCode":"en","inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"score","targetName":"scoreS3"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.SentimentSkill","name":"skill4","description":"Sentiment + V3","context":"/document","defaultLanguageCode":"en","modelVersion":null,"includeOpinionMining":true,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"confidenceScores","targetName":"scoreS4"}]},{"@odata.type":"#Microsoft.Skills.Text.V3.EntityLinkingSkill","name":"skill5","description":null,"context":"/document","defaultLanguageCode":"en","minimumPrecision":0.5,"modelVersion":null,"inputs":[{"name":"text","source":"/document/content","sourceContext":null,"inputs":[]}],"outputs":[{"name":"entities","targetName":"entitiesS5"}]}],"cognitiveServices":null,"knowledgeStore":null,"encryptionKey":null}]}' headers: cache-control: - no-cache content-length: - - '2196' + - '2214' content-type: - application/json; odata.metadata=minimal date: - - Tue, 14 Sep 2021 20:50:08 GMT + - Fri, 29 Oct 2021 17:42:54 GMT elapsed-time: - - '118' + - '100' expires: - '-1' odata-version: @@ -107,7 +108,7 @@ interactions: preference-applied: - odata.include-annotations="*" request-id: - - 59ff6a42-159d-11ec-b22c-74c63bed1137 + - a65031ef-38df-11ec-ab76-74c63bed1137 strict-transport-security: - max-age=15724800; includeSubDomains vary: @@ -115,4 +116,42 @@ interactions: status: code: 200 message: OK +- request: + body: '{"skillNames": ["skill1", "skill2", "skill3", "skill4", "skill5"]}' + headers: + Accept: + - application/json;odata.metadata=minimal + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '66' + Content-Type: + - application/json + User-Agent: + - azsdk-python-search-documents/11.3.0b5 Python/3.9.2 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://searchd998184f.search.windows.net/skillsets('test-ss')/search.resetskills?api-version=2021-04-30-Preview + response: + body: + string: '' + headers: + cache-control: + - no-cache + date: + - Fri, 29 Oct 2021 17:42:54 GMT + elapsed-time: + - '47' + expires: + - '-1' + pragma: + - no-cache + request-id: + - a66c4a6c-38df-11ec-ae2d-74c63bed1137 + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 204 + message: No Content version: 1 diff --git a/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py b/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py index b0fc016d2633..a2eda6d5f787 100644 --- a/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py +++ b/sdk/search/azure-search-documents/tests/test_search_index_client_skillset_live.py @@ -44,28 +44,33 @@ def test_create_skillset(self, api_key, endpoint, index_name, **kwargs): client = SearchIndexerClient(endpoint, AzureKeyCredential(api_key)) name = "test-ss" - s1 = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s1 = EntityRecognitionSkill(name="skill1", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS1")], description="Skill Version 1", include_typeless_entities=True) - s2 = EntityRecognitionSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s2 = EntityRecognitionSkill(name="skill2", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="organizations", target_name="organizationsS2")], skill_version=EntityRecognitionSkillVersion.LATEST, description="Skill Version 3", model_version="3") - s3 = SentimentSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s3 = SentimentSkill(name="skill3", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="score", target_name="scoreS3")], skill_version=SentimentSkillVersion.V1, description="Sentiment V1") - s4 = SentimentSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s4 = SentimentSkill(name="skill4", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="confidenceScores", target_name="scoreS4")], skill_version=SentimentSkillVersion.V3, description="Sentiment V3", include_opinion_mining=True) - s5 = EntityLinkingSkill(inputs=[InputFieldMappingEntry(name="text", source="/document/content")], + s5 = EntityLinkingSkill(name="skill5", + inputs=[InputFieldMappingEntry(name="text", source="/document/content")], outputs=[OutputFieldMappingEntry(name="entities", target_name="entitiesS5")], minimum_precision=0.5) @@ -94,6 +99,8 @@ def test_create_skillset(self, api_key, endpoint, index_name, **kwargs): assert len(client.get_skillsets()) == 1 + client.reset_skills(result, [x.name for x in result.skills]) + def test_create_skillset_validation(self, **kwargs): with pytest.raises(ValueError) as err: diff --git a/sdk/search/tests.yml b/sdk/search/tests.yml index 8fc28198a354..4b377630dac9 100644 --- a/sdk/search/tests.yml +++ b/sdk/search/tests.yml @@ -1,14 +1,17 @@ trigger: none stages: - - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml + - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - BuildTargetingString: $(BuildTargetingString) + BuildTargetingString: azure-search-documents + # TODO: change/remove location back to default westus2 after search RP fixes deletion metadata issue + # https://github.com/Azure/azure-sdk-tools/issues/2216 + Location: 'eastus2' ServiceDirectory: search EnvVars: - AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) - AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) - AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) - AZURE_CLIENT_OID: $(aad-azure-sdk-test-client-oid) + AZURE_CLIENT_ID: $(SEARCH_CLIENT_ID) + AZURE_CLIENT_SECRET: $(SEARCH_CLIENT_SECRET) + AZURE_TENANT_ID: $(SEARCH_TENANT_ID) + AZURE_CLIENT_OID: $(SEARCH_CLIENT_OID) TEST_MODE: 'RunLiveNoRecord' AZURE_SKIP_LIVE_RECORDING: 'True' diff --git a/sdk/servicebus/azure-servicebus/CHANGELOG.md b/sdk/servicebus/azure-servicebus/CHANGELOG.md index a37dd99fee48..f3f593f7275f 100644 --- a/sdk/servicebus/azure-servicebus/CHANGELOG.md +++ b/sdk/servicebus/azure-servicebus/CHANGELOG.md @@ -1,6 +1,21 @@ # Release History -## 7.3.5 (Unreleased) +## 7.4.0 (2021-11-09) + +### Features Added + +- GA the support to create and update queues and topics of large message size to `ServiceBusAdministrationClient`. This feature is only available for Service Bus of Premium Tier. + - Methods`create_queue`, `create_topic`, `update_queue`, `update_topic` on `ServiceBusAdministrationClient` now take a new keyword argument `max_message_size_in_kilobytes`. + - `QueueProperties` and `TopicProperties` now have a new instance variable `max_message_size_in_kilobytes`. +- The constructor of`ServiceBusAdministrationClient` as well as `ServiceBusAdministrationClient.from_connection_string` now take keyword argument `api_version` to configure the Service Bus API version. Supported service versions are "2021-05" and "2017-04". +- Added new enum class `azure.servicebus.management.ApiVersion` to represent the supported Service Bus API versions. + +## 7.3.4 (2021-10-06) + +- Fixed bug that `ServiceBusReceiver` can not connect to sessionful entity with session id being empty string. +- Fixed bug that `ServiceBusMessage.partition_key` can not parse empty string properly. + +## 7.4.0b1 (2021-10-06) ### Features Added diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py index 856ea8a7e0c8..fd4de2e3ac9c 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py @@ -293,9 +293,15 @@ def partition_key(self): """ p_key = None try: - p_key = self._raw_amqp_message.annotations.get( # type: ignore - _X_OPT_PARTITION_KEY # type: ignore - ) or self._raw_amqp_message.annotations.get(ANNOTATION_SYMBOL_PARTITION_KEY) # type: ignore + # opt_p_key is used on the incoming message + opt_p_key = self._raw_amqp_message.annotations.get(_X_OPT_PARTITION_KEY) # type: ignore + if opt_p_key is not None: + p_key = opt_p_key + # symbol_p_key is used on the outgoing message + symbol_p_key = self._raw_amqp_message.annotations.get(ANNOTATION_SYMBOL_PARTITION_KEY) # type: ignore + if symbol_p_key is not None: + p_key = symbol_p_key + return p_key.decode("UTF-8") # type: ignore except (AttributeError, UnicodeDecodeError): return p_key @@ -310,7 +316,7 @@ def partition_key(self, value): ) ) - if value and self.session_id and value != self.session_id: + if value and self.session_id is not None and value != self.session_id: raise ValueError( "partition_key:{} cannot be set to a different value than session_id:{}".format( value, self.session_id diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py index 1405667d7288..ead8b2d95949 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py @@ -156,7 +156,7 @@ def __init__(self, fully_qualified_namespace, credential, **kwargs): self._populate_attributes(**kwargs) self._session = ( - ServiceBusSession(self._session_id, self) if self._session_id else None + None if self._session_id is None else ServiceBusSession(self._session_id, self) ) def __iter__(self): diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/_version.py b/sdk/servicebus/azure-servicebus/azure/servicebus/_version.py index a57ad9e4f954..810dff03b579 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/_version.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/_version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "7.3.5" +VERSION = "7.4.0" diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py index 80eb4d5f0495..a920bd32c44d 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py @@ -160,7 +160,7 @@ def __init__( self._populate_attributes(**kwargs) self._session = ( - ServiceBusSession(self._session_id, self) if self._session_id else None + None if self._session_id is None else ServiceBusSession(self._session_id, self) ) # Python 3.5 does not allow for yielding from a coroutine, so instead of the try-finally functional wrapper diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py index 30057523cb85..a30b92cf89c7 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_management_client_async.py @@ -59,6 +59,7 @@ ServiceBusManagementClient as ServiceBusManagementClientImpl, ) from ...management import _constants as constants +from ...management._api_version import DEFAULT_VERSION from ._shared_key_policy_async import AsyncServiceBusSharedKeyCredentialPolicy from ...management._models import ( QueueRuntimeProperties, @@ -96,6 +97,9 @@ class ServiceBusAdministrationClient: # pylint:disable=too-many-public-methods :param str fully_qualified_namespace: The fully qualified host name for the Service Bus namespace. :param credential: To authenticate to manage the entities of the ServiceBus namespace. :type credential: AsyncTokenCredential + :keyword str api_version: The Service Bus API version to use for requests. Default value is the most + recent service version that is compatible with the current SDK. Setting to an older version may result + in reduced feature compatibility. """ def __init__( @@ -106,6 +110,7 @@ def __init__( ) -> None: self.fully_qualified_namespace = fully_qualified_namespace + self._api_version = kwargs.pop("api_version", DEFAULT_VERSION) self._credential = credential self._endpoint = "https://" + fully_qualified_namespace self._config = ServiceBusManagementClientConfiguration(self._endpoint, **kwargs) @@ -160,7 +165,7 @@ async def _get_entity_element(self, entity_name, enrich=False, **kwargs): await self._impl.entity.get( entity_name, enrich=enrich, - api_version=constants.API_VERSION, + api_version=self._api_version, **kwargs ), ) @@ -179,7 +184,7 @@ async def _get_subscription_element( topic_name, subscription_name, enrich=enrich, - api_version=constants.API_VERSION, + api_version=self._api_version, **kwargs ), ) @@ -201,7 +206,7 @@ async def _get_rule_element( subscription_name, rule_name, enrich=False, - api_version=constants.API_VERSION, + api_version=self._api_version, **kwargs ), ) @@ -238,6 +243,9 @@ def from_connection_string( :param str conn_str: The connection string of the Service Bus Namespace. :rtype: ~azure.servicebus.management.aio.ServiceBusAdministrationClient + :keyword str api_version: The Service Bus API version to use for requests. Default value is the most + recent service version that is compatible with the current SDK. Setting to an older version may result + in reduced feature compatibility. """ ( endpoint, @@ -347,7 +355,7 @@ async def create_queue(self, queue_name: str, **kwargs) -> QueueProperties: :paramtype forward_dead_lettered_messages_to: str :keyword max_message_size_in_kilobytes: The maximum size in kilobytes of message payload that can be accepted by the queue. This feature is only available when using a Premium namespace - and service version "2021-05" or higher. + and Service Bus API version "2021-05" or higher. The minimum allowed value is 1024 while the maximum allowed value is 102400. Default value is 1024. :paramtype max_message_size_in_kilobytes: int @@ -406,7 +414,7 @@ async def create_queue(self, queue_name: str, **kwargs) -> QueueProperties: await self._impl.entity.put( queue_name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, **kwargs ), ) @@ -449,7 +457,7 @@ async def update_queue( await self._impl.entity.put( queue.name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, if_match="*", **kwargs ) @@ -467,7 +475,7 @@ async def delete_queue(self, queue_name: str, **kwargs) -> None: raise ValueError("queue_name must not be None or empty") with _handle_response_error(): await self._impl.entity.delete( - queue_name, api_version=constants.API_VERSION, **kwargs + queue_name, api_version=self._api_version, **kwargs ) def list_queues(self, **kwargs: Any) -> AsyncItemPaged[QueueProperties]: @@ -489,6 +497,7 @@ def entry_to_qd(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_entities, constants.ENTITY_TYPE_QUEUES), + api_version=self._api_version, **kwargs ) return AsyncItemPaged(get_next, extract_data) @@ -514,6 +523,7 @@ def entry_to_qr(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_entities, constants.ENTITY_TYPE_QUEUES), + api_version=self._api_version, **kwargs ) return AsyncItemPaged(get_next, extract_data) @@ -595,8 +605,8 @@ async def create_topic(self, topic_name: str, **kwargs) -> TopicProperties: :keyword user_metadata: Metadata associated with the topic. :paramtype user_metadata: str :keyword max_message_size_in_kilobytes: The maximum size in kilobytes of message payload that - can be accepted by the topic. This feature is only available when using a Premium namespace - and service version "2021-05" or higher. + can be accepted by the queue. This feature is only available when using a Premium namespace + and Service Bus API version "2021-05" or higher. The minimum allowed value is 1024 while the maximum allowed value is 102400. Default value is 1024. :paramtype max_message_size_in_kilobytes: int @@ -641,7 +651,7 @@ async def create_topic(self, topic_name: str, **kwargs) -> TopicProperties: await self._impl.entity.put( topic_name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, **kwargs ), ) @@ -682,7 +692,7 @@ async def update_topic( await self._impl.entity.put( topic.name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, if_match="*", **kwargs ) @@ -696,7 +706,7 @@ async def delete_topic(self, topic_name: str, **kwargs) -> None: _validate_entity_name_type(topic_name) await self._impl.entity.delete( - topic_name, api_version=constants.API_VERSION, **kwargs + topic_name, api_version=self._api_version, **kwargs ) def list_topics(self, **kwargs: Any) -> AsyncItemPaged[TopicProperties]: @@ -718,6 +728,7 @@ def entry_to_topic(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_entities, constants.ENTITY_TYPE_TOPICS), + api_version=self._api_version, **kwargs ) return AsyncItemPaged(get_next, extract_data) @@ -743,6 +754,7 @@ def entry_to_topic(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_entities, constants.ENTITY_TYPE_TOPICS), + api_version=self._api_version, **kwargs ) return AsyncItemPaged(get_next, extract_data) @@ -894,7 +906,7 @@ async def create_subscription( topic_name, subscription_name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, **kwargs ), ) @@ -943,7 +955,7 @@ async def update_subscription( topic_name, subscription.name, request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, if_match="*", **kwargs ) @@ -961,7 +973,7 @@ async def delete_subscription( _validate_topic_and_subscription_types(topic_name, subscription_name) await self._impl.subscription.delete( - topic_name, subscription_name, api_version=constants.API_VERSION, **kwargs + topic_name, subscription_name, api_version=self._api_version, **kwargs ) def list_subscriptions( @@ -987,6 +999,7 @@ def entry_to_subscription(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_subscriptions, topic_name), + api_version=self._api_version, **kwargs ) return AsyncItemPaged(get_next, extract_data) @@ -1014,6 +1027,7 @@ def entry_to_subscription(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_subscriptions, topic_name), + api_version=self._api_version, **kwargs ) return AsyncItemPaged(get_next, extract_data) @@ -1089,7 +1103,7 @@ async def create_rule( subscription_name, # type: ignore rule_name, request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, **kwargs ) entry = RuleDescriptionEntry.deserialize(entry_ele) @@ -1142,7 +1156,7 @@ async def update_rule( subscription_name, rule.name, request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, if_match="*", **kwargs ) @@ -1166,7 +1180,7 @@ async def delete_rule( topic_name, subscription_name, rule_name, - api_version=constants.API_VERSION, + api_version=self._api_version, **kwargs ) @@ -1200,6 +1214,7 @@ def entry_to_rule(ele, entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_rules, topic_name, subscription_name), + api_version=self._api_version, **kwargs ) return AsyncItemPaged(get_next, extract_data) @@ -1210,7 +1225,7 @@ async def get_namespace_properties(self, **kwargs) -> NamespaceProperties: :rtype: ~azure.servicebus.management.NamespaceProperties """ entry_el = await self._impl.namespace.get( - api_version=constants.API_VERSION, **kwargs + api_version=self._api_version, **kwargs ) namespace_entry = NamespacePropertiesEntry.deserialize(entry_el) return NamespaceProperties._from_internal_entity( diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_utils.py b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_utils.py index 0660b05a3a05..345bc93f0966 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_utils.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/aio/management/_utils.py @@ -9,6 +9,7 @@ import urllib.parse as urlparse from ...management import _constants as constants +from ...management._api_version import DEFAULT_VERSION from ...management._handle_response_error import _handle_response_error # This module defines functions get_next_template and extract_data_template. @@ -126,7 +127,7 @@ async def get_next_template( XML ElementTree to call a partial function created from `extrat_data_template`. """ - api_version = constants.API_VERSION + api_version = kwargs.pop("api_version", DEFAULT_VERSION) if args[0]: # It's next link. It's None for the first page. queries = urlparse.parse_qs(urlparse.urlparse(args[0]).query) start_index = int(queries[constants.LIST_OP_SKIP][0]) diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/management/__init__.py b/sdk/servicebus/azure-servicebus/azure/servicebus/management/__init__.py index 2739203efe63..4bd28cbff9c1 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/management/__init__.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/management/__init__.py @@ -12,6 +12,7 @@ MessagingSku, NamespaceType, ) +from ._api_version import ApiVersion from ._models import ( QueueRuntimeProperties, @@ -52,4 +53,5 @@ "NamespaceProperties", "MessagingSku", "NamespaceType", + "ApiVersion" ] diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_api_version.py b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_api_version.py new file mode 100644 index 000000000000..b96e2772455a --- /dev/null +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_api_version.py @@ -0,0 +1,14 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# -------------------------------------------------------------------------------------------- + +from enum import Enum + + +class ApiVersion(str, Enum): + V2021_05 = "2021-05" + V2017_04 = "2017-04" + + +DEFAULT_VERSION = ApiVersion.V2021_05 diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_constants.py b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_constants.py index 1a848d7c26c0..d0bd53acd911 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_constants.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_constants.py @@ -5,7 +5,6 @@ # Generated API parameters API_VERSION_PARAM_NAME = "api-version" -API_VERSION = "2021-05" ENTITY_TYPE_QUEUES = "queues" ENTITY_TYPE_TOPICS = "topics" LIST_OP_SKIP = "$skip" diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_management_client.py b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_management_client.py index 2b434269a45f..f7545396270a 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_management_client.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_management_client.py @@ -71,6 +71,7 @@ ServiceBusManagementClient as ServiceBusManagementClientImpl, ) from . import _constants as constants +from ._api_version import DEFAULT_VERSION from ._models import ( QueueRuntimeProperties, QueueProperties, @@ -96,11 +97,15 @@ class ServiceBusAdministrationClient: # pylint:disable=too-many-public-methods :param str fully_qualified_namespace: The fully qualified host name for the Service Bus namespace. :param credential: To authenticate to manage the entities of the ServiceBus namespace. :type credential: TokenCredential + :keyword str api_version: The Service Bus API version to use for requests. Default value is the most + recent service version that is compatible with the current SDK. Setting to an older version may result + in reduced feature compatibility. """ def __init__(self, fully_qualified_namespace, credential, **kwargs): # type: (str, TokenCredential, Dict[str, Any]) -> None self.fully_qualified_namespace = fully_qualified_namespace + self._api_version = kwargs.pop("api_version", DEFAULT_VERSION) self._credential = credential self._endpoint = "https://" + fully_qualified_namespace self._config = ServiceBusManagementClientConfiguration(self._endpoint, **kwargs) @@ -155,7 +160,7 @@ def _get_entity_element(self, entity_name, enrich=False, **kwargs): self._impl.entity.get( entity_name, enrich=enrich, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore **kwargs ), ) @@ -173,7 +178,7 @@ def _get_subscription_element( topic_name, subscription_name, enrich=enrich, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore **kwargs ), ) @@ -193,7 +198,7 @@ def _get_rule_element(self, topic_name, subscription_name, rule_name, **kwargs): subscription_name, rule_name, enrich=False, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore **kwargs ), ) @@ -228,6 +233,9 @@ def from_connection_string(cls, conn_str, **kwargs): """Create a client from connection string. :param str conn_str: The connection string of the Service Bus Namespace. + :keyword str api_version: The Service Bus API version to use for requests. Default value is the most + recent service version that is compatible with the current SDK. Setting to an older version may result + in reduced feature compatibility. :rtype: ~azure.servicebus.management.ServiceBusAdministrationClient """ ( @@ -339,7 +347,7 @@ def create_queue(self, queue_name, **kwargs): :paramtype forward_dead_lettered_messages_to: str :keyword max_message_size_in_kilobytes: The maximum size in kilobytes of message payload that can be accepted by the queue. This feature is only available when using a Premium namespace - and service version "2021-05" or higher. + and Service Bus API version "2021-05" or higher. The minimum allowed value is 1024 while the maximum allowed value is 102400. Default value is 1024. :paramtype max_message_size_in_kilobytes: int @@ -398,7 +406,7 @@ def create_queue(self, queue_name, **kwargs): self._impl.entity.put( queue_name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore **kwargs ), ) @@ -440,7 +448,7 @@ def update_queue(self, queue, **kwargs): self._impl.entity.put( queue.name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore if_match="*", **kwargs ) @@ -459,7 +467,7 @@ def delete_queue(self, queue_name, **kwargs): raise ValueError("queue_name must not be None or empty") with _handle_response_error(): self._impl.entity.delete( - queue_name, api_version=constants.API_VERSION, **kwargs # type: ignore + queue_name, api_version=self._api_version, **kwargs # type: ignore ) def list_queues(self, **kwargs): @@ -482,6 +490,7 @@ def entry_to_qd(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_entities, constants.ENTITY_TYPE_QUEUES), + api_version=self._api_version, # type: ignore **kwargs ) return ItemPaged(get_next, extract_data) @@ -506,6 +515,7 @@ def entry_to_qr(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_entities, constants.ENTITY_TYPE_QUEUES), + api_version=self._api_version, # type: ignore **kwargs ) return ItemPaged(get_next, extract_data) @@ -588,8 +598,8 @@ def create_topic(self, topic_name, **kwargs): :keyword user_metadata: Metadata associated with the topic. :paramtype user_metadata: str :keyword max_message_size_in_kilobytes: The maximum size in kilobytes of message payload that - can be accepted by the topic. This feature is only available when using a Premium namespace - and service version "2021-05" or higher. + can be accepted by the queue. This feature is only available when using a Premium namespace + and Service Bus API version "2021-05" or higher. The minimum allowed value is 1024 while the maximum allowed value is 102400. Default value is 1024. :paramtype max_message_size_in_kilobytes: int @@ -633,7 +643,7 @@ def create_topic(self, topic_name, **kwargs): self._impl.entity.put( topic_name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore **kwargs ), ) @@ -673,7 +683,7 @@ def update_topic(self, topic, **kwargs): self._impl.entity.put( topic.name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore if_match="*", **kwargs ) @@ -688,7 +698,7 @@ def delete_topic(self, topic_name, **kwargs): _validate_entity_name_type(topic_name) self._impl.entity.delete( - topic_name, api_version=constants.API_VERSION, **kwargs + topic_name, api_version=self._api_version, **kwargs # type: ignore ) def list_topics(self, **kwargs): @@ -711,6 +721,7 @@ def entry_to_topic(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_entities, constants.ENTITY_TYPE_TOPICS), + api_version=self._api_version, # type: ignore **kwargs ) return ItemPaged(get_next, extract_data) @@ -735,6 +746,7 @@ def entry_to_topic(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_entities, constants.ENTITY_TYPE_TOPICS), + api_version=self._api_version, # type: ignore **kwargs ) return ItemPaged(get_next, extract_data) @@ -884,7 +896,7 @@ def create_subscription(self, topic_name, subscription_name, **kwargs): topic_name, subscription_name, # type: ignore request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore **kwargs ), ) @@ -930,7 +942,7 @@ def update_subscription(self, topic_name, subscription, **kwargs): topic_name, subscription.name, request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore if_match="*", **kwargs ) @@ -947,7 +959,7 @@ def delete_subscription(self, topic_name, subscription_name, **kwargs): _validate_topic_and_subscription_types(topic_name, subscription_name) self._impl.subscription.delete( - topic_name, subscription_name, api_version=constants.API_VERSION, **kwargs + topic_name, subscription_name, api_version=self._api_version, **kwargs # type: ignore ) def list_subscriptions(self, topic_name, **kwargs): @@ -972,6 +984,7 @@ def entry_to_subscription(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_subscriptions, topic_name), + api_version=self._api_version, # type: ignore **kwargs ) return ItemPaged(get_next, extract_data) @@ -998,6 +1011,7 @@ def entry_to_subscription(entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_subscriptions, topic_name), + api_version=self._api_version, # type: ignore **kwargs ) return ItemPaged(get_next, extract_data) @@ -1070,7 +1084,7 @@ def create_rule(self, topic_name, subscription_name, rule_name, **kwargs): subscription_name, # type: ignore rule_name, request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore **kwargs ) entry = RuleDescriptionEntry.deserialize(entry_ele) @@ -1119,7 +1133,7 @@ def update_rule(self, topic_name, subscription_name, rule, **kwargs): subscription_name, rule.name, request_body, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore if_match="*", **kwargs ) @@ -1142,7 +1156,7 @@ def delete_rule(self, topic_name, subscription_name, rule_name, **kwargs): topic_name, subscription_name, rule_name, - api_version=constants.API_VERSION, + api_version=self._api_version, # type: ignore **kwargs ) @@ -1175,6 +1189,7 @@ def entry_to_rule(ele, entry): get_next = functools.partial( get_next_template, functools.partial(self._impl.list_rules, topic_name, subscription_name), + api_version=self._api_version, # type: ignore **kwargs ) return ItemPaged(get_next, extract_data) @@ -1185,7 +1200,7 @@ def get_namespace_properties(self, **kwargs): :rtype: ~azure.servicebus.management.NamespaceProperties """ - entry_el = self._impl.namespace.get(api_version=constants.API_VERSION, **kwargs) + entry_el = self._impl.namespace.get(api_version=self._api_version, **kwargs) # type: ignore namespace_entry = NamespacePropertiesEntry.deserialize(entry_el) return NamespaceProperties._from_internal_entity( namespace_entry.title, namespace_entry.content.namespace_properties diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_models.py b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_models.py index c251f832d5bb..ce8536abafd7 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_models.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_models.py @@ -247,7 +247,7 @@ class QueueProperties(DictMixin): # pylint:disable=too-many-instance-attributes :type forward_dead_lettered_messages_to: str :ivar max_message_size_in_kilobytes: The maximum size in kilobytes of message payload that can be accepted by the queue. This feature is only available when using a Premium namespace - and service version "2021-05" or higher. + and Service Bus API version "2021-05" or higher. :type max_message_size_in_kilobytes: int """ @@ -551,7 +551,7 @@ class TopicProperties(DictMixin): # pylint:disable=too-many-instance-attributes :type user_metadata: str :ivar max_message_size_in_kilobytes: The maximum size in kilobytes of message payload that can be accepted by the topic. This feature is only available when using a Premium namespace - and service version "2021-05" or higher. + and Service Bus API version "2021-05" or higher. :type max_message_size_in_kilobytes: int """ diff --git a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_utils.py b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_utils.py index 311b1a61277f..fbf5e8fbd755 100644 --- a/sdk/servicebus/azure-servicebus/azure/servicebus/management/_utils.py +++ b/sdk/servicebus/azure-servicebus/azure/servicebus/management/_utils.py @@ -9,6 +9,7 @@ import six from . import _constants as constants +from ._api_version import DEFAULT_VERSION from ._handle_response_error import _handle_response_error if TYPE_CHECKING: @@ -84,7 +85,7 @@ def get_next_template(list_func, *args, **kwargs): """ start_index = kwargs.pop("start_index", 0) max_page_size = kwargs.pop("max_page_size", 100) - api_version = constants.API_VERSION + api_version = kwargs.pop("api_version", DEFAULT_VERSION) if args[0]: queries = urlparse.parse_qs(urlparse.urlparse(args[0]).query) start_index = int(queries[constants.LIST_OP_SKIP][0]) diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_namespaces_async.test_async_mgmt_namespace_get_properties.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_namespaces_async.test_async_mgmt_namespace_get_properties.yaml index 1a5d1b27fd23..7bd823583762 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_namespaces_async.test_async_mgmt_namespace_get_properties.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_namespaces_async.test_async_mgmt_namespace_get_properties.yaml @@ -10,18 +10,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$namespaceinfo?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$namespaceinfo?api-version=2021-05servicebustestkv3s7h2dmw2021-09-28T19:02:39Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/$namespaceinfo?api-version=2021-05servicebustestkjdemkkogk2021-10-21T05:19:15Zservicebustestkjdemkkogk2021-09-28T19:01:38.607ZStandard2021-09-28T19:01:38.607Zservicebustestkv3s7h2dmwMessaging + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">2021-10-21T05:18:14.32ZStandard2021-10-21T05:18:14.32ZservicebustestkjdemkkogkMessaging headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:39 GMT + date: Thu, 21 Oct 2021 05:19:15 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$namespaceinfo?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$namespaceinfo?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_basic_v2017_04.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_basic_v2017_04.yaml new file mode 100644 index 000000000000..9335772efadf --- /dev/null +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_basic_v2017_04.yaml @@ -0,0 +1,356 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:19:16Z + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:19:15 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T05:19:16Z2021-10-21T05:19:16ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:16.73Z2021-10-21T05:19:16.84ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: application/atom+xml;type=entry;charset=utf-8 + date: Thu, 21 Oct 2021 05:19:16 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 201 + message: Created + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:19:17Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T05:19:16Z2021-10-21T05:19:16ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:16.73Z2021-10-21T05:19:16.84Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:19:17 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04test_queue2021-10-21T05:19:16Z2021-10-21T05:19:16ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:16.73Z2021-10-21T05:19:16.84Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: application/atom+xml;type=entry;charset=utf-8 + date: Thu, 21 Oct 2021 05:19:17 GMT + etag: '637703903568400000' + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 21 Oct 2021 05:19:17 GMT + etag: '637703903568400000' + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:19:18Z + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:19:18 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/queue_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'QueueDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:f70e5d6a-28bf-44e6-b744-3f893b6fb006_G3, SystemTracker:servicebustestsbname.servicebus.windows.net:queue_can_not_be_created, + Timestamp:2021-10-21T05:19:19 + headers: + content-type: application/xml; charset=utf-8 + date: Thu, 21 Oct 2021 05:19:18 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 400 + message: Bad Request + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue_can_not_be_created?api-version=2017-04 +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T05:19:19Z2021-10-21T05:19:19ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:19.527Z2021-10-21T05:19:19.577ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: application/atom+xml;type=entry;charset=utf-8 + date: Thu, 21 Oct 2021 05:19:19 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 201 + message: Created + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:19:20Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T05:19:19Z2021-10-21T05:19:19ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:19.527Z2021-10-21T05:19:19.577Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:19:20 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04test_queue2021-10-21T05:19:19Z2021-10-21T05:19:19ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:19.527Z2021-10-21T05:19:19.577Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: application/atom+xml;type=entry;charset=utf-8 + date: Thu, 21 Oct 2021 05:19:20 GMT + etag: '637703903595770000' + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 21 Oct 2021 05:19:20 GMT + etag: '637703903595770000' + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:19:21Z + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:19:20 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/queue_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'QueueDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:7c4fad60-72c2-4e89-824b-b249c5cf3f14_G8, SystemTracker:servicebustestsbname.servicebus.windows.net:queue_can_not_be_created, + Timestamp:2021-10-21T05:19:21 + headers: + content-type: application/xml; charset=utf-8 + date: Thu, 21 Oct 2021 05:19:21 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 400 + message: Bad Request + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue_can_not_be_created?api-version=2017-04 +version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_by_name.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_by_name.yaml index 8551c38b0861..dd4949a8c4b8 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_by_name.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_by_name.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:40Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:22Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:40 GMT + date: Thu, 21 Oct 2021 05:19:21 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/eidk?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/eidk?api-version=2021-05eidk2021-09-28T19:02:40Z2021-09-28T19:02:40Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/eidk?api-version=2021-05eidk2021-10-21T05:19:22Z2021-10-21T05:19:22ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:40.94Z2021-09-28T19:02:40.987ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:22.737Z2021-10-21T05:19:22.787ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:41 GMT + date: Thu, 21 Oct 2021 05:19:22 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/eidk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/eidk?api-version=2021-05 - request: body: null headers: @@ -65,23 +65,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/eidk?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/eidk?enrich=false&api-version=2021-05eidk2021-09-28T19:02:40Z2021-09-28T19:02:40Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/eidk?enrich=false&api-version=2021-05eidk2021-10-21T05:19:22Z2021-10-21T05:19:22ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:40.94Z2021-09-28T19:02:40.987Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:22.737Z2021-10-21T05:19:22.787Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:41 GMT - etag: '637684525609870000' + date: Thu, 21 Oct 2021 05:19:22 GMT + etag: '637703903627870000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/eidk?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/eidk?enrich=false&api-version=2021-05 - request: body: null headers: @@ -96,12 +96,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:02:41 GMT - etag: '637684525609870000' + date: Thu, 21 Oct 2021 05:19:23 GMT + etag: '637703903627870000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/eidk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/eidk?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_duplicate.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_duplicate.yaml index 93e85960591a..d9aefbe5d676 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_duplicate.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_duplicate.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:42Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:24Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:42 GMT + date: Thu, 21 Oct 2021 05:19:23 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/eriodk?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/eriodk?api-version=2021-05eriodk2021-09-28T19:02:43Z2021-09-28T19:02:43Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/eriodk?api-version=2021-05eriodk2021-10-21T05:19:24Z2021-10-21T05:19:24ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:43.14Z2021-09-28T19:02:43.277ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:24.627Z2021-10-21T05:19:24.68ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:43 GMT + date: Thu, 21 Oct 2021 05:19:24 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/eriodk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/eriodk?api-version=2021-05 - request: body: ' @@ -74,19 +74,19 @@ interactions: body: string: 409SubCode=40900. Conflict. You're requesting an operation that isn't allowed in the resource's current state. To know more - visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:94a43831-010c-477b-be19-e16d5564e1d5_G15, - SystemTracker:servicebustestsbname.servicebus.windows.net:eriodk, Timestamp:2021-09-28T19:02:43 + visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:ea187417-ac0e-4c17-825e-90b0883d1ca6_G2, + SystemTracker:servicebustestsbname.servicebus.windows.net:eriodk, Timestamp:2021-10-21T05:19:25 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:02:43 GMT - etag: '637684525632770000' + date: Thu, 21 Oct 2021 05:19:24 GMT + etag: '637703903646800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 409 message: Conflict - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/eriodk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/eriodk?api-version=2021-05 - request: body: null headers: @@ -101,12 +101,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:02:44 GMT - etag: '637684525632770000' + date: Thu, 21 Oct 2021 05:19:25 GMT + etag: '637703903646800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/eriodk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/eriodk?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_with_queue_description.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_with_queue_description.yaml index 96485f77e67c..abd17d22ff04 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_with_queue_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_create_with_queue_description.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustest4ckckqanz3.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T22:19:00Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:26Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 22:18:59 GMT + date: Thu, 21 Oct 2021 05:19:25 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustest4ckckqanz3.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,26 +39,26 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/aghadh?api-version=2021-05 response: body: - string: https://servicebustest4ckckqanz3.servicebus.windows.net/aghadh?api-version=2021-05aghadh2021-09-28T22:19:00Z2021-09-28T22:19:00Zservicebustest4ckckqanz3https://servicebustestkjdemkkogk.servicebus.windows.net/aghadh?api-version=2021-05aghadh2021-10-21T05:19:26Z2021-10-21T05:19:26ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T22:19:00.527Z2021-09-28T22:19:00.61ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:19:26.623Z2021-10-21T05:19:26.72ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 22:19:00 GMT + date: Thu, 21 Oct 2021 05:19:26 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustest4ckckqanz3.servicebus.windows.net/aghadh?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/aghadh?api-version=2021-05 - request: body: ' PT13S3072truePT11MtruePT12M14truePT10Mtruetruesb://servicebustest4ckckqanz3.servicebus.windows.net/aghadhsb://servicebustest4ckckqanz3.servicebus.windows.net/aghadh' + type="application/xml">PT13S3072truePT11MtruePT12M14truePT10Mtruetruesb://servicebustestkjdemkkogk.servicebus.windows.net/aghadhsb://servicebustestkjdemkkogk.servicebus.windows.net/aghadh' headers: Accept: - application/xml @@ -67,35 +67,35 @@ interactions: Content-Type: - application/atom+xml ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustest4ckckqanz3.servicebus.windows.net%2Faghadh&sig=jZNjjOJFep9D2eCpuqpBb6fuMBKabHyQyXNTLXIIQWM%3d&se=1632871140&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Faghadh&sig=AdvDn42GchdSInXh54DvvJ6Chknd9mbKPEScBAJi2DY%3d&se=1634797167&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustest4ckckqanz3.servicebus.windows.net%2Faghadh&sig=jZNjjOJFep9D2eCpuqpBb6fuMBKabHyQyXNTLXIIQWM%3d&se=1632871140&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Faghadh&sig=AdvDn42GchdSInXh54DvvJ6Chknd9mbKPEScBAJi2DY%3d&se=1634797167&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/dkldf?api-version=2021-05 response: body: - string: https://servicebustest4ckckqanz3.servicebus.windows.net/dkldf?api-version=2021-05dkldf2021-09-28T22:19:01Z2021-09-28T22:19:01Zservicebustest4ckckqanz3https://servicebustestkjdemkkogk.servicebus.windows.net/dkldf?api-version=2021-05dkldf2021-10-21T05:19:27Z2021-10-21T05:19:27ZservicebustestkjdemkkogkPT13S49152falsetruePT11MtruePT12M14true00falseActive2021-09-28T22:19:01.43Z2021-09-28T22:19:01.673ZfalsePT10MtrueAvailabletruesb://servicebustest4ckckqanz3.servicebus.windows.net/aghadhsb://servicebustest4ckckqanz3.servicebus.windows.net/aghadh256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S49152falsetruePT11MtruePT12M14true00falseActive2021-10-21T05:19:27.56Z2021-10-21T05:19:27.683ZfalsePT10MtrueAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/aghadhsb://servicebustestkjdemkkogk.servicebus.windows.net/aghadh256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 22:19:01 GMT + date: Thu, 21 Oct 2021 05:19:27 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustest4ckckqanz3.servicebus.windows.net/dkldf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkldf?api-version=2021-05 - request: body: ' PT13S3072truePT11M2StruePT12M3S14truePT10M1Struetruesb://servicebustest4ckckqanz3.servicebus.windows.net/aghadhsb://servicebustest4ckckqanz3.servicebus.windows.net/aghadh' + type="application/xml">PT13S3072truePT11M2StruePT12M3S14truePT10M1Struetruesb://servicebustestkjdemkkogk.servicebus.windows.net/aghadhsb://servicebustestkjdemkkogk.servicebus.windows.net/aghadh' headers: Accept: - application/xml @@ -104,30 +104,30 @@ interactions: Content-Type: - application/atom+xml ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustest4ckckqanz3.servicebus.windows.net%2Faghadh&sig=PH31yj6dBUShEchHolpNpZ35yUEBkQjewAdKVqq%2bQ4Y%3d&se=1632871141&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Faghadh&sig=3YmxM%2fokSIKZqSN01FibydIH6nBzNz3xh6eku0j%2byZg%3d&se=1634797168&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustest4ckckqanz3.servicebus.windows.net%2Faghadh&sig=PH31yj6dBUShEchHolpNpZ35yUEBkQjewAdKVqq%2bQ4Y%3d&se=1632871141&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Faghadh&sig=3YmxM%2fokSIKZqSN01FibydIH6nBzNz3xh6eku0j%2byZg%3d&se=1634797168&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/vjiqjx?api-version=2021-05 response: body: - string: https://servicebustest4ckckqanz3.servicebus.windows.net/vjiqjx?api-version=2021-05vjiqjx2021-09-28T22:19:02Z2021-09-28T22:19:02Zservicebustest4ckckqanz3https://servicebustestkjdemkkogk.servicebus.windows.net/vjiqjx?api-version=2021-05vjiqjx2021-10-21T05:19:28Z2021-10-21T05:19:28ZservicebustestkjdemkkogkPT13S49152falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T22:19:02.493Z2021-09-28T22:19:02.633ZfalsePT10M1StrueAvailabletruesb://servicebustest4ckckqanz3.servicebus.windows.net/aghadhsb://servicebustest4ckckqanz3.servicebus.windows.net/aghadh256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S49152falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:19:28.45Z2021-10-21T05:19:28.56ZfalsePT10M1StrueAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/aghadhsb://servicebustestkjdemkkogk.servicebus.windows.net/aghadh256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 22:19:02 GMT + date: Thu, 21 Oct 2021 05:19:28 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustest4ckckqanz3.servicebus.windows.net/vjiqjx?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/vjiqjx?api-version=2021-05 - request: body: ' @@ -147,18 +147,18 @@ interactions: response: body: string: 400SubCode=40000. Bad Request. To know more - visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:bbbcd5fd-1ed0-4f3d-9040-3c9715d55898_G6, - SystemTracker:servicebustestsbname.servicebus.windows.net:clpqza, Timestamp:2021-09-28T22:19:03 + visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:25ba2d0a-0ad9-425c-8527-bbd013e471e9_G7, + SystemTracker:servicebustestsbname.servicebus.windows.net:clpqza, Timestamp:2021-10-21T05:19:29 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 22:19:02 GMT + date: Thu, 21 Oct 2021 05:19:28 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustest4ckckqanz3.servicebus.windows.net/clpqza?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/clpqza?api-version=2021-05 - request: body: null headers: @@ -170,23 +170,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05 response: body: - string: https://servicebustest4ckckqanz3.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05dkldf2021-09-28T22:19:01Z2021-09-28T22:19:01Zservicebustest4ckckqanz3https://servicebustestkjdemkkogk.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05dkldf2021-10-21T05:19:27Z2021-10-21T05:19:27ZservicebustestkjdemkkogkPT13S49152falsetruePT11MtruePT12M14true00falseActive2021-09-28T22:19:01.43Z2021-09-28T22:19:01.673Z0001-01-01T00:00:00Zfalse00000PT10MtrueAvailabletruesb://servicebustest4ckckqanz3.servicebus.windows.net/aghadhsb://servicebustest4ckckqanz3.servicebus.windows.net/aghadh256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S49152falsetruePT11MtruePT12M14true00falseActive2021-10-21T05:19:27.56Z2021-10-21T05:19:27.683Z0001-01-01T00:00:00Zfalse00000PT10MtrueAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/aghadhsb://servicebustestkjdemkkogk.servicebus.windows.net/aghadh256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 22:19:03 GMT - etag: '637684643416730000' + date: Thu, 21 Oct 2021 05:19:28 GMT + etag: '637703903676830000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustest4ckckqanz3.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05 - request: body: null headers: @@ -198,23 +198,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05 response: body: - string: https://servicebustest4ckckqanz3.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05vjiqjx2021-09-28T22:19:02Z2021-09-28T22:19:02Zservicebustest4ckckqanz3https://servicebustestkjdemkkogk.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05vjiqjx2021-10-21T05:19:28Z2021-10-21T05:19:28ZservicebustestkjdemkkogkPT13S49152falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T22:19:02.493Z2021-09-28T22:19:02.633Z0001-01-01T00:00:00Zfalse00000PT10M1StrueAvailabletruesb://servicebustest4ckckqanz3.servicebus.windows.net/aghadhsb://servicebustest4ckckqanz3.servicebus.windows.net/aghadh256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S49152falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:19:28.45Z2021-10-21T05:19:28.56Z0001-01-01T00:00:00Zfalse00000PT10M1StrueAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/aghadhsb://servicebustestkjdemkkogk.servicebus.windows.net/aghadh256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 22:19:03 GMT - etag: '637684643426330000' + date: Thu, 21 Oct 2021 05:19:28 GMT + etag: '637703903685600000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustest4ckckqanz3.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05 - request: body: null headers: @@ -229,14 +229,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 22:19:03 GMT - etag: '637684643416730000' + date: Thu, 21 Oct 2021 05:19:29 GMT + etag: '637703903676830000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustest4ckckqanz3.servicebus.windows.net/dkldf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkldf?api-version=2021-05 - request: body: null headers: @@ -251,14 +251,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 22:19:04 GMT - etag: '637684643426330000' + date: Thu, 21 Oct 2021 05:19:29 GMT + etag: '637703903685600000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustest4ckckqanz3.servicebus.windows.net/vjiqjx?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/vjiqjx?api-version=2021-05 - request: body: null headers: @@ -273,12 +273,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 22:19:04 GMT - etag: '637684643406100000' + date: Thu, 21 Oct 2021 05:19:30 GMT + etag: '637703903667200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustest4ckckqanz3.servicebus.windows.net/aghadh?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/aghadh?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_basic.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_basic.yaml index 9cf9f63904b9..5f15fe1c50dc 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_basic.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:50Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:31Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:50 GMT + date: Thu, 21 Oct 2021 05:19:31 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:51Z2021-09-28T19:02:51Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:32Z2021-10-21T05:19:32ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:51.107Z2021-09-28T19:02:51.14ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:32.157Z2021-10-21T05:19:32.227ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:51 GMT + date: Thu, 21 Oct 2021 05:19:32 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -65,23 +65,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:52Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:51Z2021-09-28T19:02:51Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:33Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:32Z2021-10-21T05:19:32ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:51.107Z2021-09-28T19:02:51.14Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:32.157Z2021-10-21T05:19:32.227Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:51 GMT + date: Thu, 21 Oct 2021 05:19:32 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -100,21 +100,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:02:52Z2021-09-28T19:02:52Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:19:33Z2021-10-21T05:19:33ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:52.447Z2021-09-28T19:02:52.473ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:33.537Z2021-10-21T05:19:33.77ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:52 GMT + date: Thu, 21 Oct 2021 05:19:33 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 - request: body: null headers: @@ -126,29 +126,29 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:53Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:51Z2021-09-28T19:02:51Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:34Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:32Z2021-10-21T05:19:32ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:51.107Z2021-09-28T19:02:51.14Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:32.157Z2021-10-21T05:19:32.227Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:02:52Z2021-09-28T19:02:52Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:19:33Z2021-10-21T05:19:33ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:52.447Z2021-09-28T19:02:52.473Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:33.537Z2021-10-21T05:19:33.77Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:53 GMT + date: Thu, 21 Oct 2021 05:19:33 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -163,14 +163,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:02:53 GMT - etag: '637684525711400000' + date: Thu, 21 Oct 2021 05:19:34 GMT + etag: '637703903722270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -182,23 +182,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:54Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:02:52Z2021-09-28T19:02:52Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:35Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:19:33Z2021-10-21T05:19:33ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:52.447Z2021-09-28T19:02:52.473Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:33.537Z2021-10-21T05:19:33.77Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:54 GMT + date: Thu, 21 Oct 2021 05:19:34 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -213,14 +213,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:02:54 GMT - etag: '637684525724730000' + date: Thu, 21 Oct 2021 05:19:35 GMT + etag: '637703903737700000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 - request: body: null headers: @@ -232,15 +232,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:55Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:36Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:54 GMT + date: Thu, 21 Oct 2021 05:19:35 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_negtive.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_negtive.yaml index 260f6278735a..d163dd2cb14b 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_negtive.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_negtive.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:55Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:37Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:55 GMT + date: Thu, 21 Oct 2021 05:19:36 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:55Z2021-09-28T19:02:55Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:37Z2021-10-21T05:19:37ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:55.967Z2021-09-28T19:02:55.993ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:37.47Z2021-10-21T05:19:37.553ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:55 GMT + date: Thu, 21 Oct 2021 05:19:37 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -65,23 +65,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:56Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:55Z2021-09-28T19:02:55Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:38Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:37Z2021-10-21T05:19:37ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:55.967Z2021-09-28T19:02:55.993Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:37.47Z2021-10-21T05:19:37.553Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:56 GMT + date: Thu, 21 Oct 2021 05:19:38 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -96,14 +96,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:02:56 GMT - etag: '637684525759930000' + date: Thu, 21 Oct 2021 05:19:38 GMT + etag: '637703903775530000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -115,17 +115,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:57Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:39Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:57 GMT + date: Thu, 21 Oct 2021 05:19:39 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -138,18 +138,18 @@ interactions: response: body: string: 404No service is hosted at the specified - address. TrackingId:9fd55427-6813-4db8-a0bf-f1800177cbad_G7, SystemTracker:servicebustestsbname.servicebus.windows.net:test_queue, - Timestamp:2021-09-28T19:02:58 + address. TrackingId:09747ac3-3365-4f22-bf59-c4172ae6343d_G9, SystemTracker:servicebustestsbname.servicebus.windows.net:test_queue, + Timestamp:2021-10-21T05:19:39 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:02:57 GMT + date: Thu, 21 Oct 2021 05:19:39 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 404 message: Not Found - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -162,16 +162,16 @@ interactions: response: body: string: 404No service is hosted at the specified - address. TrackingId:a955fe64-3650-4c9a-9d2d-f34f20dd0520_G7, SystemTracker:servicebustestsbname.servicebus.windows.net:non_existing_queue, - Timestamp:2021-09-28T19:02:58 + address. TrackingId:e3faf94c-4e5a-490d-aa59-b729aef6ae48_G9, SystemTracker:servicebustestsbname.servicebus.windows.net:non_existing_queue, + Timestamp:2021-10-21T05:19:40 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:02:58 GMT + date: Thu, 21 Oct 2021 05:19:40 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 404 message: Not Found - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/non_existing_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/non_existing_queue?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_one_and_check_not_existing.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_one_and_check_not_existing.yaml index a6b3506da044..fdb215b7fc6b 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_one_and_check_not_existing.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_delete_one_and_check_not_existing.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:59Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:40Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:58 GMT + date: Thu, 21 Oct 2021 05:19:40 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue0?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue0?api-version=2021-05queue02021-09-28T19:02:59Z2021-09-28T19:02:59Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue0?api-version=2021-05queue02021-10-21T05:19:41Z2021-10-21T05:19:41ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:59.673Z2021-09-28T19:02:59.71ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:41.113Z2021-10-21T05:19:41.187ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:02:59 GMT + date: Thu, 21 Oct 2021 05:19:41 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue0?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue0?api-version=2021-05 - request: body: ' @@ -72,21 +72,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue1?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue1?api-version=2021-05queue12021-09-28T19:03:00Z2021-09-28T19:03:00Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue1?api-version=2021-05queue12021-10-21T05:19:42Z2021-10-21T05:19:42ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:00.56Z2021-09-28T19:03:00.627ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:42.017Z2021-10-21T05:19:42.083ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:00 GMT + date: Thu, 21 Oct 2021 05:19:42 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue1?api-version=2021-05 - request: body: ' @@ -105,21 +105,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue2?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue2?api-version=2021-05queue22021-09-28T19:03:01Z2021-09-28T19:03:01Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue2?api-version=2021-05queue22021-10-21T05:19:42Z2021-10-21T05:19:43ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:01.453Z2021-09-28T19:03:01.513ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:42.92Z2021-10-21T05:19:43.127ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:01 GMT + date: Thu, 21 Oct 2021 05:19:43 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue2?api-version=2021-05 - request: body: ' @@ -138,21 +138,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue3?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue3?api-version=2021-05queue32021-09-28T19:03:02Z2021-09-28T19:03:02Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue3?api-version=2021-05queue32021-10-21T05:19:44Z2021-10-21T05:19:44ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:02.337Z2021-09-28T19:03:02.363ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:44.06Z2021-10-21T05:19:44.11ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:02 GMT + date: Thu, 21 Oct 2021 05:19:44 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue3?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue3?api-version=2021-05 - request: body: ' @@ -171,21 +171,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue4?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue4?api-version=2021-05queue42021-09-28T19:03:03Z2021-09-28T19:03:03Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue4?api-version=2021-05queue42021-10-21T05:19:44Z2021-10-21T05:19:45ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:03.357Z2021-09-28T19:03:03.397ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:44.96Z2021-10-21T05:19:45.087ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:03 GMT + date: Thu, 21 Oct 2021 05:19:45 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue4?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue4?api-version=2021-05 - request: body: ' @@ -204,21 +204,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue5?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue5?api-version=2021-05queue52021-09-28T19:03:04Z2021-09-28T19:03:04Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue5?api-version=2021-05queue52021-10-21T05:19:45Z2021-10-21T05:19:45ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:04.217Z2021-09-28T19:03:04.25ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:45.853Z2021-10-21T05:19:45.893ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:04 GMT + date: Thu, 21 Oct 2021 05:19:46 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue5?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue5?api-version=2021-05 - request: body: ' @@ -237,21 +237,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue6?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue6?api-version=2021-05queue62021-09-28T19:03:05Z2021-09-28T19:03:05Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue6?api-version=2021-05queue62021-10-21T05:19:46Z2021-10-21T05:19:46ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:05.103Z2021-09-28T19:03:05.157ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:46.733Z2021-10-21T05:19:46.783ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:05 GMT + date: Thu, 21 Oct 2021 05:19:46 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue6?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue6?api-version=2021-05 - request: body: ' @@ -270,21 +270,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue7?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue7?api-version=2021-05queue72021-09-28T19:03:06Z2021-09-28T19:03:06Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue7?api-version=2021-05queue72021-10-21T05:19:47Z2021-10-21T05:19:47ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:06.13Z2021-09-28T19:03:06.187ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:47.653Z2021-10-21T05:19:47.707ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:06 GMT + date: Thu, 21 Oct 2021 05:19:47 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue7?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue7?api-version=2021-05 - request: body: ' @@ -303,21 +303,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue8?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue8?api-version=2021-05queue82021-09-28T19:03:07Z2021-09-28T19:03:07Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue8?api-version=2021-05queue82021-10-21T05:19:48Z2021-10-21T05:19:48ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:07.02Z2021-09-28T19:03:07.07ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:48.607Z2021-10-21T05:19:48.643ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:07 GMT + date: Thu, 21 Oct 2021 05:19:48 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue8?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue8?api-version=2021-05 - request: body: ' @@ -336,21 +336,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue9?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue9?api-version=2021-05queue92021-09-28T19:03:07Z2021-09-28T19:03:07Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue9?api-version=2021-05queue92021-10-21T05:19:49Z2021-10-21T05:19:49ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:07.9Z2021-09-28T19:03:07.927ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:49.473Z2021-10-21T05:19:49.507ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:08 GMT + date: Thu, 21 Oct 2021 05:19:49 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue9?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue9?api-version=2021-05 - request: body: null headers: @@ -365,14 +365,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:08 GMT - etag: '637684525797100000' + date: Thu, 21 Oct 2021 05:19:50 GMT + etag: '637703903811870000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue0?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue0?api-version=2021-05 - request: body: null headers: @@ -384,71 +384,71 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:09Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/queue1?api-version=2021-05queue12021-09-28T19:03:00Z2021-09-28T19:03:00Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:50Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue1?api-version=2021-05queue12021-10-21T05:19:42Z2021-10-21T05:19:42ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:00.56Z2021-09-28T19:03:00.627Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:42.0250261Z2021-10-21T05:19:42.0250261Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue2?api-version=2021-05queue22021-09-28T19:03:01Z2021-09-28T19:03:01Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue2?api-version=2021-05queue22021-10-21T05:19:42Z2021-10-21T05:19:43ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:01.453Z2021-09-28T19:03:01.513Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:42.92Z2021-10-21T05:19:43.127Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue3?api-version=2021-05queue32021-09-28T19:03:02Z2021-09-28T19:03:02Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue3?api-version=2021-05queue32021-10-21T05:19:44Z2021-10-21T05:19:44ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:02.337Z2021-09-28T19:03:02.363Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:44.06Z2021-10-21T05:19:44.11Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue4?api-version=2021-05queue42021-09-28T19:03:03Z2021-09-28T19:03:03Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue4?api-version=2021-05queue42021-10-21T05:19:44Z2021-10-21T05:19:45ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:03.357Z2021-09-28T19:03:03.397Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:44.9648137Z2021-10-21T05:19:44.9648137Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue5?api-version=2021-05queue52021-09-28T19:03:04Z2021-09-28T19:03:04Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue5?api-version=2021-05queue52021-10-21T05:19:45Z2021-10-21T05:19:45ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:04.217Z2021-09-28T19:03:04.25Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:45.853Z2021-10-21T05:19:45.893Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue6?api-version=2021-05queue62021-09-28T19:03:05Z2021-09-28T19:03:05Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue6?api-version=2021-05queue62021-10-21T05:19:46Z2021-10-21T05:19:46ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:05.103Z2021-09-28T19:03:05.157Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:46.7374422Z2021-10-21T05:19:46.7374422Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue7?api-version=2021-05queue72021-09-28T19:03:06Z2021-09-28T19:03:06Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue7?api-version=2021-05queue72021-10-21T05:19:47Z2021-10-21T05:19:47ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:06.13Z2021-09-28T19:03:06.187Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:47.653Z2021-10-21T05:19:47.707Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue8?api-version=2021-05queue82021-09-28T19:03:07Z2021-09-28T19:03:07Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue8?api-version=2021-05queue82021-10-21T05:19:48Z2021-10-21T05:19:48ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:07.02Z2021-09-28T19:03:07.07Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:48.607Z2021-10-21T05:19:48.643Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue9?api-version=2021-05queue92021-09-28T19:03:07Z2021-09-28T19:03:07Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/queue9?api-version=2021-05queue92021-10-21T05:19:49Z2021-10-21T05:19:49ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:07.9Z2021-09-28T19:03:07.927Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:49.473Z2021-10-21T05:19:49.507Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:09 GMT + date: Thu, 21 Oct 2021 05:19:50 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -463,14 +463,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:09 GMT - etag: '637684525806270000' + date: Thu, 21 Oct 2021 05:19:51 GMT + etag: '637703903820830000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue1?api-version=2021-05 - request: body: null headers: @@ -485,14 +485,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:10 GMT - etag: '637684525815130000' + date: Thu, 21 Oct 2021 05:19:51 GMT + etag: '637703903831270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue2?api-version=2021-05 - request: body: null headers: @@ -507,14 +507,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:10 GMT - etag: '637684525823630000' + date: Thu, 21 Oct 2021 05:19:52 GMT + etag: '637703903841100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue3?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue3?api-version=2021-05 - request: body: null headers: @@ -529,14 +529,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:11 GMT - etag: '637684525833970000' + date: Thu, 21 Oct 2021 05:19:52 GMT + etag: '637703903850870000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue4?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue4?api-version=2021-05 - request: body: null headers: @@ -551,14 +551,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:11 GMT - etag: '637684525842500000' + date: Thu, 21 Oct 2021 05:19:53 GMT + etag: '637703903858930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue5?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue5?api-version=2021-05 - request: body: null headers: @@ -573,14 +573,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:12 GMT - etag: '637684525851570000' + date: Thu, 21 Oct 2021 05:19:53 GMT + etag: '637703903867830000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue6?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue6?api-version=2021-05 - request: body: null headers: @@ -595,14 +595,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:12 GMT - etag: '637684525861870000' + date: Thu, 21 Oct 2021 05:19:54 GMT + etag: '637703903877070000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue7?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue7?api-version=2021-05 - request: body: null headers: @@ -617,14 +617,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:13 GMT - etag: '637684525870700000' + date: Thu, 21 Oct 2021 05:19:54 GMT + etag: '637703903886430000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue8?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue8?api-version=2021-05 - request: body: null headers: @@ -639,14 +639,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:13 GMT - etag: '637684525879270000' + date: Thu, 21 Oct 2021 05:19:55 GMT + etag: '637703903895070000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/queue9?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/queue9?api-version=2021-05 - request: body: null headers: @@ -658,15 +658,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:14Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:55Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:14 GMT + date: Thu, 21 Oct 2021 05:19:55 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_get_runtime_properties_basic.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_get_runtime_properties_basic.yaml index 814c16c7dcb2..38b1640dedef 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_get_runtime_properties_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_get_runtime_properties_basic.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:15Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:56Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:14 GMT + date: Thu, 21 Oct 2021 05:19:55 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:03:15Z2021-09-28T19:03:15Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:56Z2021-10-21T05:19:56ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:15.51Z2021-09-28T19:03:15.563ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:56.617Z2021-10-21T05:19:56.657ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:15 GMT + date: Thu, 21 Oct 2021 05:19:56 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -65,23 +65,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?enrich=false&api-version=2021-05test_queue2021-09-28T19:03:15Z2021-09-28T19:03:15Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?enrich=false&api-version=2021-05test_queue2021-10-21T05:19:56Z2021-10-21T05:19:56ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:15.51Z2021-09-28T19:03:15.563Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:56.617Z2021-10-21T05:19:56.657Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:15 GMT - etag: '637684525955630000' + date: Thu, 21 Oct 2021 05:19:56 GMT + etag: '637703903966570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?enrich=false&api-version=2021-05 - request: body: null headers: @@ -96,12 +96,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:15 GMT - etag: '637684525955630000' + date: Thu, 21 Oct 2021 05:19:57 GMT + etag: '637703903966570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_get_runtime_properties_negative.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_get_runtime_properties_negative.yaml index 0638e35b5a97..25eb7b4b6f81 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_get_runtime_properties_negative.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_get_runtime_properties_negative.yaml @@ -12,16 +12,16 @@ interactions: body: string: Publicly Listed ServicesThis is the list of publicly-listed - services currently available.uuid:3e7da870-4374-49c6-a3d7-4a91c6fdccd9;id=63402021-09-28T19:03:17ZService + services currently available.uuid:1f9fd359-4818-4e6a-919f-e14a8506e396;id=194412021-10-21T05:19:58ZService Bus 1.1 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:16 GMT + date: Thu, 21 Oct 2021 05:19:57 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/non_existing_queue?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/non_existing_queue?enrich=false&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_basic.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_basic.yaml index bb24350f6057..3a1cdc603237 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_basic.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:17Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:58Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:17 GMT + date: Thu, 21 Oct 2021 05:19:58 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -32,17 +32,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:18Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:59Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:18 GMT + date: Thu, 21 Oct 2021 05:19:59 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -61,21 +61,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:03:18Z2021-09-28T19:03:18Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:59Z2021-10-21T05:19:59ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:18.917Z2021-09-28T19:03:18.953ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:59.81Z2021-10-21T05:19:59.863ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:19 GMT + date: Thu, 21 Oct 2021 05:20:00 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -87,23 +87,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:19Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:03:18Z2021-09-28T19:03:18Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:00Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:59Z2021-10-21T05:19:59ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:18.917Z2021-09-28T19:03:18.953Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:59.81Z2021-10-21T05:19:59.863Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:19 GMT + date: Thu, 21 Oct 2021 05:20:00 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -118,14 +118,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:20 GMT - etag: '637684525989530000' + date: Thu, 21 Oct 2021 05:20:01 GMT + etag: '637703903998630000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -137,17 +137,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:20Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:01Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:20 GMT + date: Thu, 21 Oct 2021 05:20:01 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -159,17 +159,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:21Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:02Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:20 GMT + date: Thu, 21 Oct 2021 05:20:01 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -188,21 +188,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:03:21Z2021-09-28T19:03:21Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:20:02Z2021-10-21T05:20:02ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:21.633Z2021-09-28T19:03:21.67ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:20:02.667Z2021-10-21T05:20:02.69ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:21 GMT + date: Thu, 21 Oct 2021 05:20:02 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -214,23 +214,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:22Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:03:21Z2021-09-28T19:03:21Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:03Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:20:02Z2021-10-21T05:20:02ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:21.633Z2021-09-28T19:03:21.67Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:20:02.667Z2021-10-21T05:20:02.69Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:21 GMT + date: Thu, 21 Oct 2021 05:20:03 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -245,14 +245,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:22 GMT - etag: '637684526016700000' + date: Thu, 21 Oct 2021 05:20:03 GMT + etag: '637703904026900000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -264,15 +264,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:23Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:04Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:22 GMT + date: Thu, 21 Oct 2021 05:20:04 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_runtime_properties_basic.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_runtime_properties_basic.yaml index dd11485f9168..958d81c25429 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_runtime_properties_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_runtime_properties_basic.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:24Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:05Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:24 GMT + date: Thu, 21 Oct 2021 05:20:04 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -32,17 +32,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:24Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:05Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:24 GMT + date: Thu, 21 Oct 2021 05:20:04 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -54,17 +54,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:24Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:06Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:24 GMT + date: Thu, 21 Oct 2021 05:20:05 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -83,21 +83,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:03:25Z2021-09-28T19:03:25Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:20:06Z2021-10-21T05:20:06ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:25.417Z2021-09-28T19:03:25.447ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:20:06.49Z2021-10-21T05:20:06.567ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:25 GMT + date: Thu, 21 Oct 2021 05:20:07 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -109,23 +109,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:26Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:03:25Z2021-09-28T19:03:25Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:07Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:20:06Z2021-10-21T05:20:06ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:25.417Z2021-09-28T19:03:25.447Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:20:06.49Z2021-10-21T05:20:06.567Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:26 GMT + date: Thu, 21 Oct 2021 05:20:07 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -137,23 +137,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:26Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:03:25Z2021-09-28T19:03:25Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:08Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:20:06Z2021-10-21T05:20:06ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:25.417Z2021-09-28T19:03:25.447Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:20:06.49Z2021-10-21T05:20:06.567Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:26 GMT + date: Thu, 21 Oct 2021 05:20:07 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -168,14 +168,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:27 GMT - etag: '637684526054470000' + date: Thu, 21 Oct 2021 05:20:08 GMT + etag: '637703904065670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_queue?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_queue?api-version=2021-05 - request: body: null headers: @@ -187,15 +187,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:27Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:08Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:27 GMT + date: Thu, 21 Oct 2021 05:20:08 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_with_negative_credential.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_with_negative_credential.yaml index 7ff95c81bab1..f3526e64367b 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_with_negative_credential.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_with_negative_credential.yaml @@ -10,19 +10,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: 401claim is empty or token is invalid. TrackingId:da2c8494-eda9-41e1-877e-61ca9deac4ef_G12, + string: 401claim is empty or token is invalid. TrackingId:521db8a3-19e3-4cca-a399-03d036526ac7_G2, SystemTracker:servicebustestsbname.servicebus.windows.net:$Resources/queues, - Timestamp:2021-09-28T19:03:28 + Timestamp:2021-10-21T05:20:09 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:03:27 GMT + date: Thu, 21 Oct 2021 05:20:08 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 401 message: Unauthorized - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -34,17 +34,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: 401claim is empty or token is invalid. TrackingId:16e9cc9a-40c7-4338-af41-dd8b7a4aa048_G6, + string: 401claim is empty or token is invalid. TrackingId:eb5ecd4a-e351-47ff-addb-b7f7390470ca_G10, SystemTracker:servicebustestsbname.servicebus.windows.net:$Resources/queues, - Timestamp:2021-09-28T19:03:28 + Timestamp:2021-10-21T05:20:09 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:03:27 GMT + date: Thu, 21 Oct 2021 05:20:08 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 401 message: Unauthorized - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_with_special_chars.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_with_special_chars.yaml index 9d721b4277e2..472046f5f225 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_with_special_chars.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_list_with_special_chars.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:28Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:10Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:27 GMT + date: Thu, 21 Oct 2021 05:20:09 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -32,17 +32,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:29Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:10Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:28 GMT + date: Thu, 21 Oct 2021 05:20:09 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -61,21 +61,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:03:29Z2021-09-28T19:03:29Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:20:10Z2021-10-21T05:20:11ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:29.463Z2021-09-28T19:03:29.52ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:20:10.963Z2021-10-21T05:20:11.03ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:28 GMT + date: Thu, 21 Oct 2021 05:20:10 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 - request: body: null headers: @@ -87,23 +87,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:30Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:03:29Z2021-09-28T19:03:29Zservicebustestkv3s7h2dmwQueueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:11Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:20:10Z2021-10-21T05:20:11ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:03:29.463Z2021-09-28T19:03:29.52Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:20:10.963Z2021-10-21T05:20:11.03Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:30 GMT + date: Thu, 21 Oct 2021 05:20:11 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -118,14 +118,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:03:30 GMT - etag: '637684526095200000' + date: Thu, 21 Oct 2021 05:20:11 GMT + etag: '637703904110300000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 - request: body: null headers: @@ -137,15 +137,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:03:31Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:12Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:03:31 GMT + date: Thu, 21 Oct 2021 05:20:12 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_premium_create_with_queue_description.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_premium_create_with_queue_description.yaml index 12fb09eaec84..7e44e2192c01 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_premium_create_with_queue_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_premium_create_with_queue_description.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestv73qvndifp.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:10Z + string: Queueshttps://servicebustestruiyxx3yqv.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:47Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:10 GMT + date: Thu, 21 Oct 2021 05:21:46 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkldf?api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/dkldf?api-version=2021-05dkldf2021-09-28T19:05:10Z2021-09-28T19:05:11Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/dkldf?api-version=2021-05dkldf2021-10-21T05:21:48Z2021-10-21T05:21:48Zservicebustestruiyxx3yqvPT13S3072falsetruePT11MtruePT12M14true00falseActive2021-09-28T19:05:10.557Z2021-09-28T19:05:11.2ZtruePT10MfalseAvailablefalse12345 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsetruePT11MtruePT12M14true00falseActive2021-10-21T05:21:48.193Z2021-10-21T05:21:48.977ZtruePT10MfalseAvailablefalse12345 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:11 GMT + date: Thu, 21 Oct 2021 05:21:48 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestv73qvndifp.servicebus.windows.net/dkldf?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/dkldf?api-version=2021-05 - request: body: ' @@ -72,21 +72,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/vjiqjx?api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/vjiqjx?api-version=2021-05vjiqjx2021-09-28T19:05:12Z2021-09-28T19:05:12Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/vjiqjx?api-version=2021-05vjiqjx2021-10-21T05:21:49Z2021-10-21T05:21:49Zservicebustestruiyxx3yqvPT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:05:12.01Z2021-09-28T19:05:12.073ZtruePT10M1SfalseAvailablefalse1024 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:49.723Z2021-10-21T05:21:49.8ZtruePT10M1SfalseAvailablefalse1024 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:12 GMT + date: Thu, 21 Oct 2021 05:21:50 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestv73qvndifp.servicebus.windows.net/vjiqjx?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/vjiqjx?api-version=2021-05 - request: body: ' @@ -111,18 +111,18 @@ interactions: Parameter name: MaxMessageSizeInKilobytes - Actual value was 1023. TrackingId:640e3dd9-6482-43c8-b456-d721cb653278_G12, - SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-09-28T19:05:13' + Actual value was 1023. TrackingId:0fd82403-1958-4856-8223-aa468255e064_G12, + SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-10-21T05:21:50' headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:05:12 GMT + date: Thu, 21 Oct 2021 05:21:50 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustestv73qvndifp.servicebus.windows.net/rekocd?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/rekocd?api-version=2021-05 - request: body: ' @@ -147,18 +147,18 @@ interactions: Parameter name: MaxMessageSizeInKilobytes - Actual value was 102401. TrackingId:d28c3a88-563c-4660-adab-2d61f23e9665_G12, - SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-09-28T19:05:13' + Actual value was 102401. TrackingId:5e061b5e-b6b0-4883-8edb-977414f906e7_G12, + SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-10-21T05:21:51' headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:05:13 GMT + date: Thu, 21 Oct 2021 05:21:50 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustestv73qvndifp.servicebus.windows.net/rekocd?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/rekocd?api-version=2021-05 - request: body: null headers: @@ -170,23 +170,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05dkldf2021-09-28T19:05:10Z2021-09-28T19:05:11Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05dkldf2021-10-21T05:21:48Z2021-10-21T05:21:48Zservicebustestruiyxx3yqvPT13S3072falsetruePT11MtruePT12M14true00falseActive2021-09-28T19:05:10.557Z2021-09-28T19:05:11.2Z0001-01-01T00:00:00ZtruePT13S3072falsetruePT11MtruePT12M14true00falseActive2021-10-21T05:21:48.3585622Z2021-10-21T05:21:48.4210578Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailablefalse12345 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:13 GMT - etag: '637684527112000000' + date: Thu, 21 Oct 2021 05:21:50 GMT + etag: '637703905089770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/dkldf?enrich=false&api-version=2021-05 - request: body: null headers: @@ -198,30 +198,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05vjiqjx2021-09-28T19:05:12Z2021-09-28T19:05:12Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05vjiqjx2021-10-21T05:21:49Z2021-10-21T05:21:49Zservicebustestruiyxx3yqvPT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:05:12.01Z2021-09-28T19:05:12.073Z0001-01-01T00:00:00ZtruePT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:49.723Z2021-10-21T05:21:49.8Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailablefalse1024 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:13 GMT - etag: '637684527120730000' + date: Thu, 21 Oct 2021 05:21:50 GMT + etag: '637703905098000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05 - request: body: ' PT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:05:12.010Z2021-09-28T19:05:12.073Z0001-01-01T00:00:00.000Ztrue00000PT10M1SfalseAvailablefalse54321' + />Active2021-10-21T05:21:49.723Z2021-10-21T05:21:49.800Z0001-01-01T00:00:00.000Ztrue00000PT10M1SfalseAvailablefalse54321' headers: Accept: - application/xml @@ -237,23 +237,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/vjiqjx?api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/vjiqjx?api-version=2021-05vjiqjx2021-09-28T19:05:13Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/vjiqjx?api-version=2021-05vjiqjx2021-10-21T05:21:51Zservicebustestruiyxx3yqvPT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:05:12.01Z2021-09-28T19:05:12.073Z0001-01-01T00:00:00ZtruePT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:49.723Z2021-10-21T05:21:49.8Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailablefalse54321 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:13 GMT - etag: '637684527120730000' + date: Thu, 21 Oct 2021 05:21:51 GMT + etag: '637703905098000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/vjiqjx?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/vjiqjx?api-version=2021-05 - request: body: null headers: @@ -265,23 +265,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05vjiqjx2021-09-28T19:05:12Z2021-09-28T19:05:13Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05vjiqjx2021-10-21T05:21:49Z2021-10-21T05:21:51Zservicebustestruiyxx3yqvPT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:05:12.01Z2021-09-28T19:05:13.74Z0001-01-01T00:00:00ZtruePT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:49.723Z2021-10-21T05:21:51.22Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailablefalse54321 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:13 GMT - etag: '637684527137400000' + date: Thu, 21 Oct 2021 05:21:51 GMT + etag: '637703905112200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/vjiqjx?enrich=false&api-version=2021-05 - request: body: null headers: @@ -296,14 +296,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:13 GMT - etag: '637684527112000000' + date: Thu, 21 Oct 2021 05:21:51 GMT + etag: '637703905089770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/dkldf?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/dkldf?api-version=2021-05 - request: body: null headers: @@ -318,12 +318,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:15 GMT - etag: '637684527137400000' + date: Thu, 21 Oct 2021 05:21:52 GMT + etag: '637703905112200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/vjiqjx?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/vjiqjx?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_update_invalid.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_update_invalid.yaml index 8b855aa61607..e8f6cc177e0f 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_update_invalid.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_update_invalid.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:15Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:53Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:15 GMT + date: Thu, 21 Oct 2021 05:21:52 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,27 +39,27 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/vbmfm?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/vbmfm?api-version=2021-05vbmfm2021-09-28T19:05:16Z2021-09-28T19:05:16Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/vbmfm?api-version=2021-05vbmfm2021-10-21T05:21:53Z2021-10-21T05:21:53ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:05:16.02Z2021-09-28T19:05:16.067ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:21:53.887Z2021-10-21T05:21:53.927ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:15 GMT + date: Thu, 21 Oct 2021 05:21:53 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/vbmfm?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/vbmfm?api-version=2021-05 - request: body: ' PT1M1024falsetrueP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:16.020Z2021-09-28T19:05:16.067ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:53.887Z2021-10-21T05:21:53.927ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -77,25 +77,25 @@ interactions: body: string: 400SubCode=40000. The value for the RequiresSession property of an existing Queue cannot be changed. To know more visit https://aka.ms/sbResourceMgrExceptions. - . TrackingId:0727a3e7-7cb0-4f03-b8d2-93056d141ebe_G13, SystemTracker:servicebustestsbname.servicebus.windows.net:vbmfm, - Timestamp:2021-09-28T19:05:16 + . TrackingId:29da31f9-84d9-4622-a43b-56378369c5c7_G6, SystemTracker:servicebustestsbname.servicebus.windows.net:vbmfm, + Timestamp:2021-10-21T05:21:54 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:05:15 GMT - etag: '637684527160670000' + date: Thu, 21 Oct 2021 05:21:53 GMT + etag: '637703905139270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/vbmfm?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/vbmfm?api-version=2021-05 - request: body: ' PT1M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:16.020Z2021-09-28T19:05:16.067ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:53.887Z2021-10-21T05:21:53.927ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -113,24 +113,24 @@ interactions: body: string: 404SubCode=40400. Not Found. The Operation doesn't exist. To know more visit https://aka.ms/sbResourceMgrExceptions. - . TrackingId:b942426c-70f6-4b04-8550-8be90654f62c_G13, SystemTracker:servicebustestsbname.servicebus.windows.net:dkfrgx, - Timestamp:2021-09-28T19:05:17 + . TrackingId:fd6e32ee-9036-4ed1-a376-9dd1276492dd_G6, SystemTracker:servicebustestsbname.servicebus.windows.net:dkfrgx, + Timestamp:2021-10-21T05:21:55 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:05:16 GMT + date: Thu, 21 Oct 2021 05:21:54 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 404 message: Not Found - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfrgx?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkfrgx?api-version=2021-05 - request: body: ' P25D1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:16.020Z2021-09-28T19:05:16.067ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:53.887Z2021-10-21T05:21:53.927ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -152,19 +152,19 @@ interactions: Parameter name: LockDuration - Actual value was 25.00:00:00. TrackingId:103757c6-e32d-4d67-9c7c-28925c19e773_G13, - SystemTracker:servicebustestsbname.servicebus.windows.net:vbmfm, Timestamp:2021-09-28T19:05:17' + Actual value was 25.00:00:00. TrackingId:3b39bf7d-7335-4fb5-bfef-566fb12963dc_G6, + SystemTracker:servicebustestsbname.servicebus.windows.net:vbmfm, Timestamp:2021-10-21T05:21:55' headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:05:16 GMT - etag: '637684527160670000' + date: Thu, 21 Oct 2021 05:21:54 GMT + etag: '637703905139270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/vbmfm?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/vbmfm?api-version=2021-05 - request: body: null headers: @@ -179,12 +179,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:17 GMT - etag: '637684527160670000' + date: Thu, 21 Oct 2021 05:21:55 GMT + etag: '637703905139270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/vbmfm?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/vbmfm?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_update_success.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_update_success.yaml index 82287b17a45c..c850d8f11dcb 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_update_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_async_mgmt_queue_update_success.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:18Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:56Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:18 GMT + date: Thu, 21 Oct 2021 05:21:56 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-09-28T19:05:19Z2021-09-28T19:05:19Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-10-21T05:21:56Z2021-10-21T05:21:57ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:19.15ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:57ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:19 GMT + date: Thu, 21 Oct 2021 05:21:56 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05 - request: body: ' @@ -72,27 +72,27 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkfjaks?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfjaks?api-version=2021-05dkfjaks2021-09-28T19:05:20Z2021-09-28T19:05:20Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dkfjaks?api-version=2021-05dkfjaks2021-10-21T05:21:57Z2021-10-21T05:21:57ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:20.113Z2021-09-28T19:05:20.16ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:57.873Z2021-10-21T05:21:57.9ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT + date: Thu, 21 Oct 2021 05:21:57 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfjaks?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkfjaks?api-version=2021-05 - request: body: ' PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:19.150ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:56.967Z2021-10-21T05:21:57.000ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -108,22 +108,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-09-28T19:05:20Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-10-21T05:21:58ZservicebustestkjdemkkogkPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:19.15ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:57ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT - etag: '637684527191500000' + date: Thu, 21 Oct 2021 05:21:57 GMT + etag: '637703905170000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05 - request: body: null headers: @@ -135,30 +135,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-09-28T19:05:19Z2021-09-28T19:05:20Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-10-21T05:21:56Z2021-10-21T05:21:58ZservicebustestkjdemkkogkPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:20.62Z0001-01-01T00:00:00ZtruePT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:58.343Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT - etag: '637684527206200000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905183430000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 - request: body: ' PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:20.620Z0001-01-01T00:00:00.000Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfjakssb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfjaks256' + />Active2021-10-21T05:21:56.967Z2021-10-21T05:21:58.343Z0001-01-01T00:00:00.000Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestkjdemkkogk.servicebus.windows.net/dkfjakssb://servicebustestkjdemkkogk.servicebus.windows.net/dkfjaks256' headers: Accept: - application/xml @@ -169,32 +169,32 @@ interactions: If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fdkfjaks&sig=88FSQbIHvMlDPM7oL%2fHvwTZYGQuSRLd%2bvxOeE5leplU%3d&se=1632859520&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fdkfjaks&sig=bM%2b4UvG5iC6uRhYymI8nyZzyk5RcXkaalilV2D2Zqqo%3d&se=1634797318&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fdkfjaks&sig=88FSQbIHvMlDPM7oL%2fHvwTZYGQuSRLd%2bvxOeE5leplU%3d&se=1632859520&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fdkfjaks&sig=bM%2b4UvG5iC6uRhYymI8nyZzyk5RcXkaalilV2D2Zqqo%3d&se=1634797318&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-09-28T19:05:20Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-10-21T05:21:58ZservicebustestkjdemkkogkPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:20.62Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfjakssb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfjaks256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:58.343Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestkjdemkkogk.servicebus.windows.net/dkfjakssb://servicebustestkjdemkkogk.servicebus.windows.net/dkfjaks256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT - etag: '637684527206200000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905183430000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05 - request: body: null headers: @@ -206,30 +206,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-09-28T19:05:19Z2021-09-28T19:05:20Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-10-21T05:21:56Z2021-10-21T05:21:58ZservicebustestkjdemkkogkPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:20.847Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfjakssb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfjaks256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:58.567Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestkjdemkkogk.servicebus.windows.net/dkfjakssb://servicebustestkjdemkkogk.servicebus.windows.net/dkfjaks256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT - etag: '637684527208470000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905185670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 - request: body: ' PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:20.847Z0001-01-01T00:00:00.000Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:56.967Z2021-10-21T05:21:58.567Z0001-01-01T00:00:00.000Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -245,23 +245,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-09-28T19:05:21Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-10-21T05:21:58ZservicebustestkjdemkkogkPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:20.847Z0001-01-01T00:00:00ZtruePT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:58.567Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT - etag: '637684527208470000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905185670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05 - request: body: null headers: @@ -273,30 +273,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-09-28T19:05:19Z2021-09-28T19:05:21Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-10-21T05:21:56Z2021-10-21T05:21:58ZservicebustestkjdemkkogkPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.077Z0001-01-01T00:00:00ZtruePT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:58.78Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT - etag: '637684527210770000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905187800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 - request: body: ' PT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.077Z0001-01-01T00:00:00.000Ztrue00000PT10MfalseAvailabletruesb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfjsb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj256' + />Active2021-10-21T05:21:56.967Z2021-10-21T05:21:58.780Z0001-01-01T00:00:00.000Ztrue00000PT10MfalseAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfjsb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj256' headers: Accept: - application/xml @@ -307,32 +307,32 @@ interactions: If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fewuidfj&sig=GlpwFSg0Lsg6S96fT4pFfRAo%2fjglgYJfZjQrKigu1e0%3d&se=1632859520&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fewuidfj&sig=QnHw0tpL6Ril7Bm%2biaBl17pSNUgoVKwrgUuGJuioa60%3d&se=1634797319&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fewuidfj&sig=GlpwFSg0Lsg6S96fT4pFfRAo%2fjglgYJfZjQrKigu1e0%3d&se=1632859520&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fewuidfj&sig=QnHw0tpL6Ril7Bm%2biaBl17pSNUgoVKwrgUuGJuioa60%3d&se=1634797319&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-09-28T19:05:21Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-10-21T05:21:59ZservicebustestkjdemkkogkPT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.077Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfjsb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:58.78Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfjsb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT - etag: '637684527210770000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905187800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05 - request: body: null headers: @@ -344,30 +344,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-09-28T19:05:19Z2021-09-28T19:05:21Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-10-21T05:21:56Z2021-10-21T05:21:59ZservicebustestkjdemkkogkPT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.283Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfjsb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:59.01Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfjsb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT - etag: '637684527212830000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905190100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 - request: body: ' PT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.283Z0001-01-01T00:00:00.000Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfjsb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj256' + />Active2021-10-21T05:21:56.967Z2021-10-21T05:21:59.010Z0001-01-01T00:00:00.000Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfjsb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj256' headers: Accept: - application/xml @@ -378,32 +378,32 @@ interactions: If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fewuidfj&sig=O2b%2bdwja8Au9AYjVZ9vOo9n9tHkw1OUb%2beJgdb7O5ng%3d&se=1632859521&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fewuidfj&sig=QnHw0tpL6Ril7Bm%2biaBl17pSNUgoVKwrgUuGJuioa60%3d&se=1634797319&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fewuidfj&sig=O2b%2bdwja8Au9AYjVZ9vOo9n9tHkw1OUb%2beJgdb7O5ng%3d&se=1632859521&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fewuidfj&sig=QnHw0tpL6Ril7Bm%2biaBl17pSNUgoVKwrgUuGJuioa60%3d&se=1634797319&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-09-28T19:05:21Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-10-21T05:21:59ZservicebustestkjdemkkogkPT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.283Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfjsb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:59.01Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfjsb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:20 GMT - etag: '637684527212830000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905190100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05 - request: body: null headers: @@ -415,30 +415,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-09-28T19:05:19Z2021-09-28T19:05:21Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-10-21T05:21:56Z2021-10-21T05:21:59ZservicebustestkjdemkkogkPT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.5Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfjsb://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:59.233Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfjsb://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:21 GMT - etag: '637684527215000000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905192330000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 - request: body: ' PT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.500Z0001-01-01T00:00:00.000Ztrue00000PT15MfalseAvailablefalse256' + />Active2021-10-21T05:21:56.967Z2021-10-21T05:21:59.233Z0001-01-01T00:00:00.000Ztrue00000PT15MfalseAvailablefalse256' headers: Accept: - application/xml @@ -454,23 +454,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-09-28T19:05:21Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05ewuidfj2021-10-21T05:21:59ZservicebustestkjdemkkogkPT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.5Z0001-01-01T00:00:00ZtruePT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:59.233Z0001-01-01T00:00:00Ztrue00000PT15MfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:21 GMT - etag: '637684527215000000' + date: Thu, 21 Oct 2021 05:21:58 GMT + etag: '637703905192330000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05 - request: body: null headers: @@ -482,23 +482,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-09-28T19:05:19Z2021-09-28T19:05:21Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05ewuidfj2021-10-21T05:21:56Z2021-10-21T05:21:59ZservicebustestkjdemkkogkPT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-09-28T19:05:19.083Z2021-09-28T19:05:21.917Z0001-01-01T00:00:00ZtruePT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-10-21T05:21:56.967Z2021-10-21T05:21:59.45Z0001-01-01T00:00:00Ztrue00000PT15MfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:21 GMT - etag: '637684527219170000' + date: Thu, 21 Oct 2021 05:21:59 GMT + etag: '637703905194500000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?enrich=false&api-version=2021-05 - request: body: null headers: @@ -513,14 +513,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:22 GMT - etag: '637684527219170000' + date: Thu, 21 Oct 2021 05:21:59 GMT + etag: '637703905194500000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/ewuidfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/ewuidfj?api-version=2021-05 - request: body: null headers: @@ -535,12 +535,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:22 GMT - etag: '637684527201600000' + date: Thu, 21 Oct 2021 05:22:00 GMT + etag: '637703905179000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfjaks?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkfjaks?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_mgmt_queue_async_update_dict_error.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_mgmt_queue_async_update_dict_error.yaml index ad6f786571cc..008b8ba6953c 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_mgmt_queue_async_update_dict_error.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_mgmt_queue_async_update_dict_error.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:23Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:01Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:22 GMT + date: Thu, 21 Oct 2021 05:22:00 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:05:24Z2021-09-28T19:05:24Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:01Z2021-10-21T05:22:01ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:05:24.197Z2021-09-28T19:05:24.24ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:22:01.573Z2021-10-21T05:22:01.637ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:23 GMT + date: Thu, 21 Oct 2021 05:22:01 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: null headers: @@ -68,12 +68,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:24 GMT - etag: '637684527242400000' + date: Thu, 21 Oct 2021 05:22:02 GMT + etag: '637703905216370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_mgmt_queue_async_update_dict_success.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_mgmt_queue_async_update_dict_success.yaml index 0336861cdb56..dc1c8356191d 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_mgmt_queue_async_update_dict_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_queues_async.test_mgmt_queue_async_update_dict_success.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:25Z + string: Queueshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:03Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:25 GMT + date: Thu, 21 Oct 2021 05:22:03 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:05:26Z2021-09-28T19:05:26Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:03Z2021-10-21T05:22:03ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:05:26.127Z2021-09-28T19:05:26.193ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:22:03.513Z2021-10-21T05:22:03.54ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:26 GMT + date: Thu, 21 Oct 2021 05:22:03 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: ' @@ -75,22 +75,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:05:26Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:04ZservicebustestkjdemkkogkPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10trueActiveP10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:26 GMT - etag: '637684527261930000' + date: Thu, 21 Oct 2021 05:22:03 GMT + etag: '637703905235400000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: null headers: @@ -102,29 +102,29 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:05:26Z2021-09-28T19:05:26Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:22:03Z2021-10-21T05:22:04ZservicebustestkjdemkkogkPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:05:26.127Z2021-09-28T19:05:26.79Z0001-01-01T00:00:00ZtruePT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:22:03.513Z2021-10-21T05:22:04Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:26 GMT - etag: '637684527267900000' + date: Thu, 21 Oct 2021 05:22:04 GMT + etag: '637703905240000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 - request: body: ' PT13S3072falsefalsePT11MtruePT12M14trueActivePT10MfalseAvailabletruesb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruidsb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid256' + />ActivePT10MfalseAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/fjruidsb://servicebustestkjdemkkogk.servicebus.windows.net/fjruid256' headers: Accept: - application/xml @@ -135,31 +135,31 @@ interactions: If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Ffjruid&sig=zfaxY9549NnqRjwA5Zb0dtXpLh57n4WnWicoZ99GHHQ%3d&se=1632859526&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Ffjruid&sig=C76yHIGGCMFHAsxmihXYadRVA6OFnrMslHfX1RLqitg%3d&se=1634797324&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Ffjruid&sig=zfaxY9549NnqRjwA5Zb0dtXpLh57n4WnWicoZ99GHHQ%3d&se=1632859526&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Ffjruid&sig=C76yHIGGCMFHAsxmihXYadRVA6OFnrMslHfX1RLqitg%3d&se=1634797324&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:05:27Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:04ZservicebustestkjdemkkogkPT13S3072falsefalsePT11MtruePT12M14trueActivePT10MfalseAvailabletruesb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruidsb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11MtruePT12M14trueActivePT10MfalseAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/fjruidsb://servicebustestkjdemkkogk.servicebus.windows.net/fjruid256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:26 GMT - etag: '637684527267900000' + date: Thu, 21 Oct 2021 05:22:04 GMT + etag: '637703905240000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: null headers: @@ -171,23 +171,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:05:26Z2021-09-28T19:05:26Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:22:03Z2021-10-21T05:22:04ZservicebustestkjdemkkogkPT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-09-28T19:05:26.127Z2021-09-28T19:05:26.99Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruidsb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-10-21T05:22:03.513Z2021-10-21T05:22:04.25Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestkjdemkkogk.servicebus.windows.net/fjruidsb://servicebustestkjdemkkogk.servicebus.windows.net/fjruid256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:26 GMT - etag: '637684527269900000' + date: Thu, 21 Oct 2021 05:22:04 GMT + etag: '637703905242500000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 - request: body: ' @@ -209,22 +209,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:05:27Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:04ZservicebustestkjdemkkogkPT18S2048falsefalsePT16MfalsePT17M15falseActivePT15MfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:26 GMT - etag: '637684527269900000' + date: Thu, 21 Oct 2021 05:22:04 GMT + etag: '637703905242500000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: null headers: @@ -236,23 +236,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:05:26Z2021-09-28T19:05:27Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:22:03Z2021-10-21T05:22:04ZservicebustestkjdemkkogkPT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-09-28T19:05:26.127Z2021-09-28T19:05:27.21Z0001-01-01T00:00:00ZtruePT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-10-21T05:22:03.513Z2021-10-21T05:22:04.483Z0001-01-01T00:00:00Ztrue00000PT15MfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:26 GMT - etag: '637684527272100000' + date: Thu, 21 Oct 2021 05:22:04 GMT + etag: '637703905244830000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 - request: body: null headers: @@ -267,12 +267,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:27 GMT - etag: '637684527272100000' + date: Thu, 21 Oct 2021 05:22:05 GMT + etag: '637703905244830000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_create.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_create.yaml index 2e7e56022397..f1eb09873f51 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_create.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_create.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:28Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:05Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:28 GMT + date: Thu, 21 Oct 2021 05:22:05 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-09-28T19:05:28Z2021-09-28T19:05:29Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-10-21T05:22:06Z2021-10-21T05:22:06ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:28.907Z2021-09-28T19:05:29.017ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:06.037Z2021-10-21T05:22:06.067ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:29 GMT + date: Thu, 21 Oct 2021 05:22:06 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-09-28T19:05:29Z2021-09-28T19:05:29Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-10-21T05:22:06Z2021-10-21T05:22:06ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:29.9342072Z2021-09-28T19:05:29.9342072Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:06.7391026Z2021-10-21T05:22:06.7391026Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:30 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 - request: body: ' @@ -115,9 +115,9 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-09-28T19:05:30Z2021-09-28T19:05:30Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-10-21T05:22:06Z2021-10-21T05:22:06Ztestcidkey_stringstr1key_int2020-07-05T11:12:13key_durationP1DT2H3MSET Priority = @param20@param2020-07-05T11:12:13true2021-09-28T19:05:30.7154528Ztest_rule_1 + i:type="d6p1:dateTime" xmlns:d6p1="http://www.w3.org/2001/XMLSchema">2020-07-05T11:12:13
true2021-10-21T05:22:06.8483967Ztest_rule_1 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:30 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 - request: body: null headers: @@ -150,9 +150,9 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?enrich=false&api-version=2021-05test_rule_12021-09-28T19:05:30Z2021-09-28T19:05:30Zsb://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?enrich=false&api-version=2021-05test_rule_12021-10-21T05:22:06Z2021-10-21T05:22:06Ztestcidkey_stringstr1key_int2020-07-05T11:12:13key_durationP1DT2H3MSET Priority = @param20@param2020-07-05T11:12:13true2021-09-28T19:05:30.7145222Ztest_rule_1 + i:type="d6p1:dateTime" xmlns:d6p1="http://www.w3.org/2001/XMLSchema">2020-07-05T11:12:13
true2021-10-21T05:22:06.8496532Ztest_rule_1 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:30 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?enrich=false&api-version=2021-05 - request: body: ' @@ -196,26 +196,26 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-09-28T19:05:30Z2021-09-28T19:05:30Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-10-21T05:22:07Z2021-10-21T05:22:07ZPriority = @param1 AND Level = @param220@param1str1@param21true2021-09-28T19:05:30.918579Ztest_rule_2 + i:type="EmptyRuleAction"/>2021-10-21T05:22:07.0358966Ztest_rule_2 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:30 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 - request: body: null headers: @@ -227,26 +227,26 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?enrich=false&api-version=2021-05test_rule_22021-09-28T19:05:30Z2021-09-28T19:05:30Zsb://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?enrich=false&api-version=2021-05test_rule_22021-10-21T05:22:07Z2021-10-21T05:22:07ZPriority = @param1 AND Level = @param220@param1str1@param21true2021-09-28T19:05:30.9176397Ztest_rule_2 + i:type="EmptyRuleAction"/>2021-10-21T05:22:07.037185Ztest_rule_2 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:30 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?enrich=false&api-version=2021-05 - request: body: ' @@ -267,23 +267,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-09-28T19:05:31Z2021-09-28T19:05:31Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-10-21T05:22:07Z2021-10-21T05:22:07Z1=1202021-09-28T19:05:31.0123299Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:22:07.1296571Ztest_rule_3 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:30 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 - request: body: null headers: @@ -295,23 +295,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?enrich=false&api-version=2021-05test_rule_32021-09-28T19:05:31Z2021-09-28T19:05:31Zsb://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?enrich=false&api-version=2021-05test_rule_32021-10-21T05:22:07Z2021-10-21T05:22:07Z1=1202021-09-28T19:05:31.0113559Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:22:07.1153114Ztest_rule_3 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:30 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?enrich=false&api-version=2021-05 - request: body: ' @@ -332,23 +332,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05test_rule_42021-09-28T19:05:31Z2021-09-28T19:05:31Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05test_rule_42021-10-21T05:22:07Z2021-10-21T05:22:07Z1=1202021-09-28T19:05:31.1217003Ztest_rule_4 + i:type="EmptyRuleAction"/>2021-10-21T05:22:07.1921451Ztest_rule_4 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:30 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05 - request: body: null headers: @@ -360,23 +360,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?enrich=false&api-version=2021-05test_rule_42021-09-28T19:05:31Z2021-09-28T19:05:31Zsb://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?enrich=false&api-version=2021-05test_rule_42021-10-21T05:22:07Z2021-10-21T05:22:07Z1=1202021-09-28T19:05:31.1207368Ztest_rule_4 + i:type="EmptyRuleAction"/>2021-10-21T05:22:07.1934095Ztest_rule_4 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:31 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?enrich=false&api-version=2021-05 - request: body: null headers: @@ -391,14 +391,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:31 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 - request: body: null headers: @@ -413,14 +413,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:31 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:06 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 - request: body: null headers: @@ -435,14 +435,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:31 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:07 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 - request: body: null headers: @@ -457,14 +457,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:31 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:07 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05 - request: body: null headers: @@ -479,14 +479,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:31 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:07 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 - request: body: null headers: @@ -501,12 +501,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:32 GMT - etag: '637684527290170000' + date: Thu, 21 Oct 2021 05:22:07 GMT + etag: '637703905260670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_create_duplicate.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_create_duplicate.yaml index b9cd7c99cf9b..d2405a4554b4 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_create_duplicate.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_create_duplicate.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:32Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:08Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:32 GMT + date: Thu, 21 Oct 2021 05:22:07 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-09-28T19:05:33Z2021-09-28T19:05:33Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-10-21T05:22:08Z2021-10-21T05:22:08ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:33.32Z2021-09-28T19:05:33.37ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:08.907Z2021-10-21T05:22:08.943ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:33 GMT + date: Thu, 21 Oct 2021 05:22:08 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05kkaqo2021-09-28T19:05:33Z2021-09-28T19:05:33Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05kkaqo2021-10-21T05:22:09Z2021-10-21T05:22:09ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:33.9094405Z2021-09-28T19:05:33.9094405Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:09.4328275Z2021-10-21T05:22:09.4328275Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:33 GMT - etag: '637684527333700000' + date: Thu, 21 Oct 2021 05:22:08 GMT + etag: '637703905289430000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 - request: body: ' @@ -108,24 +108,24 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05rule2021-09-28T19:05:34Z2021-09-28T19:05:34Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05rule2021-10-21T05:22:09Z2021-10-21T05:22:09ZPriority = 'low'20true2021-09-28T19:05:34.0500681Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:09.5109257Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:34 GMT - etag: '637684527333700000' + date: Thu, 21 Oct 2021 05:22:08 GMT + etag: '637703905289430000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05 - request: body: ' @@ -147,19 +147,19 @@ interactions: response: body: string: 409The messaging entity 'servicebustestsbname:Topic:dqkodq|kkaqo|rule' - already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:9f613bf1-8b0d-4f99-bdef-0fffebc62097_B14, - SystemTracker:NoSystemTracker, Timestamp:2021-09-28T19:05:34 + already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:33cda021-b7b2-4408-9f6b-868fd244a7ce_B12, + SystemTracker:NoSystemTracker, Timestamp:2021-10-21T05:22:09 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:05:35 GMT - etag: '637684527333700000' + date: Thu, 21 Oct 2021 05:22:10 GMT + etag: '637703905289430000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 409 message: Conflict - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05 - request: body: null headers: @@ -174,14 +174,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:35 GMT - etag: '637684527333700000' + date: Thu, 21 Oct 2021 05:22:10 GMT + etag: '637703905289430000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05 - request: body: null headers: @@ -196,14 +196,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:35 GMT - etag: '637684527333700000' + date: Thu, 21 Oct 2021 05:22:10 GMT + etag: '637703905289430000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 - request: body: null headers: @@ -218,12 +218,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:35 GMT - etag: '637684527333700000' + date: Thu, 21 Oct 2021 05:22:10 GMT + etag: '637703905289430000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_list_and_delete.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_list_and_delete.yaml index 8b5afdcb874e..660555d80250 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_list_and_delete.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_list_and_delete.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:36Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:11Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:35 GMT + date: Thu, 21 Oct 2021 05:22:11 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-09-28T19:05:36Z2021-09-28T19:05:36Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-10-21T05:22:12Z2021-10-21T05:22:12ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:36.76Z2021-09-28T19:05:36.837ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:12.33Z2021-10-21T05:22:12.397ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:36 GMT + date: Thu, 21 Oct 2021 05:22:12 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-09-28T19:05:37Z2021-09-28T19:05:37Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-10-21T05:22:12Z2021-10-21T05:22:12ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:37.3377431Z2021-09-28T19:05:37.3377431Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:12.9139879Z2021-10-21T05:22:12.9139879Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:12 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 - request: body: null headers: @@ -99,25 +99,25 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 response: body: - string: Ruleshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:38Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-09-28T19:05:37Z2021-09-28T19:05:37ZRuleshttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:13Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-10-21T05:22:12Z2021-10-21T05:22:12Z1=1202021-09-28T19:05:37.6610098Z$Default + i:type="EmptyRuleAction"/>2021-10-21T05:22:12.9264077Z$Default headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:12 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -138,24 +138,24 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-09-28T19:05:38Z2021-09-28T19:05:38Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-10-21T05:22:13Z2021-10-21T05:22:13ZPriority = 'low'20true2021-09-28T19:05:38.2910022Ztest_rule_1 + i:type="EmptyRuleAction"/>2021-10-21T05:22:13.101491Ztest_rule_1 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:12 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 - request: body: ' @@ -176,24 +176,24 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-09-28T19:05:38Z2021-09-28T19:05:38Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-10-21T05:22:13Z2021-10-21T05:22:13ZPriority = 'middle'20true2021-09-28T19:05:38.3533691Ztest_rule_2 + i:type="EmptyRuleAction"/>2021-10-21T05:22:13.1959551Ztest_rule_2 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:12 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 - request: body: ' @@ -214,24 +214,24 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-09-28T19:05:38Z2021-09-28T19:05:38Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-10-21T05:22:13Z2021-10-21T05:22:13ZPriority = 'high'20true2021-09-28T19:05:38.4315528Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:22:13.2733777Ztest_rule_3 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:13 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 - request: body: null headers: @@ -243,46 +243,46 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 response: body: - string: Ruleshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:38Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-09-28T19:05:37Z2021-09-28T19:05:37ZRuleshttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:13Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-10-21T05:22:12Z2021-10-21T05:22:12Z1=1202021-09-28T19:05:37.6610098Z$Defaulthttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-09-28T19:05:38Z2021-09-28T19:05:38Z2021-10-21T05:22:12.9264077Z$Defaulthttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-10-21T05:22:13Z2021-10-21T05:22:13ZPriority = 'low'20true2021-09-28T19:05:38.3016331Ztest_rule_1https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-09-28T19:05:38Z2021-09-28T19:05:38Z2021-10-21T05:22:13.1138971Ztest_rule_1https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-10-21T05:22:13Z2021-10-21T05:22:13ZPriority = 'middle'20true2021-09-28T19:05:38.3641678Ztest_rule_2https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-09-28T19:05:38Z2021-09-28T19:05:38Z2021-10-21T05:22:13.2076802Ztest_rule_2https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-10-21T05:22:13Z2021-10-21T05:22:13ZPriority = 'high'20true2021-09-28T19:05:38.4422924Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:22:13.2701773Ztest_rule_3 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:13 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -297,14 +297,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:13 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 - request: body: null headers: @@ -316,39 +316,39 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 response: body: - string: Ruleshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:38Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-09-28T19:05:37Z2021-09-28T19:05:37ZRuleshttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:14Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-10-21T05:22:12Z2021-10-21T05:22:12Z1=1202021-09-28T19:05:37.6610098Z$Defaulthttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-09-28T19:05:38Z2021-09-28T19:05:38Z2021-10-21T05:22:12.9264077Z$Defaulthttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-10-21T05:22:13Z2021-10-21T05:22:13ZPriority = 'low'20true2021-09-28T19:05:38.3016331Ztest_rule_1https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-09-28T19:05:38Z2021-09-28T19:05:38Z2021-10-21T05:22:13.1138971Ztest_rule_1https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-10-21T05:22:13Z2021-10-21T05:22:13ZPriority = 'high'20true2021-09-28T19:05:38.4422924Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:22:13.2701773Ztest_rule_3 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:13 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -363,14 +363,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:13 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 - request: body: null headers: @@ -385,14 +385,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:14 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 - request: body: null headers: @@ -404,25 +404,25 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 response: body: - string: Ruleshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:38Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-09-28T19:05:37Z2021-09-28T19:05:37ZRuleshttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:14Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-10-21T05:22:12Z2021-10-21T05:22:12Z1=1202021-09-28T19:05:37.6610098Z$Default + i:type="EmptyRuleAction"/>2021-10-21T05:22:12.9264077Z$Default headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:37 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:14 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -437,14 +437,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:38 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:14 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 - request: body: null headers: @@ -459,12 +459,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:38 GMT - etag: '637684527368370000' + date: Thu, 21 Oct 2021 05:22:14 GMT + etag: '637703905323970000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_update_invalid.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_update_invalid.yaml index 6325904ef4b3..5b44e2691f8b 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_update_invalid.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_update_invalid.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:40Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:15Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:39 GMT + date: Thu, 21 Oct 2021 05:22:15 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:05:40Z2021-09-28T19:05:40Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:16Z2021-10-21T05:22:16ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:40.563Z2021-09-28T19:05:40.803ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:16.237Z2021-10-21T05:22:16.307ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:40 GMT + date: Thu, 21 Oct 2021 05:22:16 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:41Z2021-09-28T19:05:41Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:16Z2021-10-21T05:22:16ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:41.2544714Z2021-09-28T19:05:41.2544714Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:16.8182648Z2021-10-21T05:22:16.8182648Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:41 GMT - etag: '637684527408030000' + date: Thu, 21 Oct 2021 05:22:16 GMT + etag: '637703905363070000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: ' @@ -108,24 +108,24 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-09-28T19:05:41Z2021-09-28T19:05:41Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-10-21T05:22:17Z2021-10-21T05:22:17ZPriority = 'low'20true2021-09-28T19:05:41.8170131Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:17.0682789Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:41 GMT - etag: '637684527408030000' + date: Thu, 21 Oct 2021 05:22:16 GMT + etag: '637703905363070000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 - request: body: null headers: @@ -137,31 +137,31 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:05:41Z2021-09-28T19:05:41Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:22:17Z2021-10-21T05:22:17ZPriority = 'low'20true2021-09-28T19:05:41.8179539Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:17.0771954Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:41 GMT - etag: '637684527408030000' + date: Thu, 21 Oct 2021 05:22:16 GMT + etag: '637703905363070000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 - request: body: ' Priority = ''low''20true2021-09-28T19:05:41.817953Ziewdm' + xsi:type="EmptyRuleAction" />2021-10-21T05:22:17.077195Ziewdm' headers: Accept: - application/xml @@ -178,19 +178,19 @@ interactions: response: body: string: 404Entity 'servicebustestsbname:Topic:fjrui|eqkovc|iewdm' - was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:15e13a38-b44a-449f-a45e-36c04049c419_B6, - SystemTracker:NoSystemTracker, Timestamp:2021-09-28T19:05:41 + was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:2bb344c3-3703-4643-a3db-26136ed85af1_B7, + SystemTracker:NoSystemTracker, Timestamp:2021-10-21T05:22:17 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:05:42 GMT - etag: '637684527408030000' + date: Thu, 21 Oct 2021 05:22:17 GMT + etag: '637703905363070000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 404 message: Not Found - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/iewdm?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/iewdm?api-version=2021-05 - request: body: null headers: @@ -205,14 +205,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:42 GMT - etag: '637684527408030000' + date: Thu, 21 Oct 2021 05:22:17 GMT + etag: '637703905363070000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 - request: body: null headers: @@ -227,14 +227,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:42 GMT - etag: '637684527408030000' + date: Thu, 21 Oct 2021 05:22:17 GMT + etag: '637703905363070000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -249,12 +249,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:43 GMT - etag: '637684527408030000' + date: Thu, 21 Oct 2021 05:22:18 GMT + etag: '637703905363070000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_update_success.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_update_success.yaml index cba13f268300..9c5561fe7cd5 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_update_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_async_mgmt_rule_update_success.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:44Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:19Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:44 GMT + date: Thu, 21 Oct 2021 05:22:18 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:05:44Z2021-09-28T19:05:44Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:19Z2021-10-21T05:22:19ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:44.63Z2021-09-28T19:05:44.66ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:19.69Z2021-10-21T05:22:19.727ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:44 GMT + date: Thu, 21 Oct 2021 05:22:19 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:45Z2021-09-28T19:05:45Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:20Z2021-10-21T05:22:20ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:45.1028855Z2021-09-28T19:05:45.1028855Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:20.1411203Z2021-10-21T05:22:20.1411203Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:45 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:20 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: ' @@ -108,24 +108,24 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-09-28T19:05:45Z2021-09-28T19:05:45Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-10-21T05:22:20Z2021-10-21T05:22:20ZPriority = 'low'20true2021-09-28T19:05:45.2435125Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:20.4380038Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:45 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:20 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 - request: body: null headers: @@ -137,31 +137,31 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:05:45Z2021-09-28T19:05:45Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:22:20Z2021-10-21T05:22:20ZPriority = 'low'20true2021-09-28T19:05:45.245435Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:20.4304741Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:45 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:20 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 - request: body: ' testcidSET Priority = ''low''20true2021-09-28T19:05:45.245435Zrule' + xsi:type="SqlRuleAction">SET Priority = ''low''20true2021-10-21T05:22:20.430474Zrule' headers: Accept: - application/xml @@ -177,23 +177,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-09-28T19:05:45Z2021-09-28T19:05:45Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-10-21T05:22:20Z2021-10-21T05:22:20ZtestcidSET Priority = 'low'20true2021-09-28T19:05:45.3997676Zrule + i:type="SqlRuleAction">SET Priority = 'low'20true2021-10-21T05:22:20.6098887Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:45 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:20 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 - request: body: null headers: @@ -205,30 +205,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:05:45Z2021-09-28T19:05:45Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:22:20Z2021-10-21T05:22:20ZtestcidSET Priority = 'low'20true2021-09-28T19:05:45.245435Zrule + i:type="SqlRuleAction">SET Priority = 'low'20true2021-10-21T05:22:20.4304741Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:45 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:20 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 - request: body: ' updatedcid2021-09-28T19:05:45.245435Zrule' + xsi:type="EmptyRuleAction" />2021-10-21T05:22:20.430474Zrule' headers: Accept: - application/xml @@ -244,23 +244,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-09-28T19:05:45Z2021-09-28T19:05:45Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-10-21T05:22:20Z2021-10-21T05:22:20Zupdatedcid2021-09-28T19:05:45.649768Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:20.8442742Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:45 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:20 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 - request: body: null headers: @@ -272,23 +272,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:05:45Z2021-09-28T19:05:45Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:22:20Z2021-10-21T05:22:20Zupdatedcid2021-09-28T19:05:45.245435Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:20.4304741Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:45 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:20 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 - request: body: null headers: @@ -303,14 +303,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:45 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:20 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 - request: body: null headers: @@ -325,14 +325,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:45 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:20 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -347,12 +347,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:46 GMT - etag: '637684527446600000' + date: Thu, 21 Oct 2021 05:22:21 GMT + etag: '637703905397270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_mgmt_rule_async_update_dict_error.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_mgmt_rule_async_update_dict_error.yaml index a1d7d5caeff1..e84d49e098de 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_mgmt_rule_async_update_dict_error.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_mgmt_rule_async_update_dict_error.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:47Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:22Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:46 GMT + date: Thu, 21 Oct 2021 05:22:21 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:05:47Z2021-09-28T19:05:47Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:22Z2021-10-21T05:22:22ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:47.453Z2021-09-28T19:05:47.573ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:22.56Z2021-10-21T05:22:22.617ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:47 GMT + date: Thu, 21 Oct 2021 05:22:22 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:48Z2021-09-28T19:05:48Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:23Z2021-10-21T05:22:23ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:48.0382244Z2021-09-28T19:05:48.0382244Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:23.1050927Z2021-10-21T05:22:23.1050927Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:47 GMT - etag: '637684527475730000' + date: Thu, 21 Oct 2021 05:22:22 GMT + etag: '637703905426170000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: ' @@ -108,24 +108,24 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-09-28T19:05:48Z2021-09-28T19:05:48Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-10-21T05:22:23Z2021-10-21T05:22:23ZPriority = 'low'20true2021-09-28T19:05:48.4601131Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:23.3081969Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:47 GMT - etag: '637684527475730000' + date: Thu, 21 Oct 2021 05:22:22 GMT + etag: '637703905426170000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 - request: body: null headers: @@ -140,14 +140,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:47 GMT - etag: '637684527475730000' + date: Thu, 21 Oct 2021 05:22:22 GMT + etag: '637703905426170000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 - request: body: null headers: @@ -162,14 +162,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:48 GMT - etag: '637684527475730000' + date: Thu, 21 Oct 2021 05:22:22 GMT + etag: '637703905426170000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -184,12 +184,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:48 GMT - etag: '637684527475730000' + date: Thu, 21 Oct 2021 05:22:23 GMT + etag: '637703905426170000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_mgmt_rule_async_update_dict_success.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_mgmt_rule_async_update_dict_success.yaml index 6df7a2c617f3..b6818bc7bc7c 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_mgmt_rule_async_update_dict_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_rules_async.test_mgmt_rule_async_update_dict_success.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:49Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:24Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:49 GMT + date: Thu, 21 Oct 2021 05:22:24 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:05:50Z2021-09-28T19:05:50Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:25Z2021-10-21T05:22:25ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:50.23Z2021-09-28T19:05:50.317ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:25.167Z2021-10-21T05:22:25.327ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:50 GMT + date: Thu, 21 Oct 2021 05:22:25 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-09-28T19:05:50Z2021-09-28T19:05:50Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-10-21T05:22:25Z2021-10-21T05:22:25ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:50.8235286Z2021-09-28T19:05:50.8235286Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:25.7744059Z2021-10-21T05:22:25.7744059Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:51 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:25 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 - request: body: ' @@ -108,24 +108,24 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-09-28T19:05:51Z2021-09-28T19:05:51Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-10-21T05:22:26Z2021-10-21T05:22:26ZPriority = 'low'20true2021-09-28T19:05:51.0735281Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:26.0712521Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:51 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:26 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 - request: body: null headers: @@ -137,31 +137,31 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:05:51Z2021-09-28T19:05:51Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:22:26Z2021-10-21T05:22:26ZPriority = 'low'20true2021-09-28T19:05:51.0743454Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:26.0773354Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:51 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:26 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 - request: body: ' testcidSET Priority = ''low''20true2021-09-28T19:05:51.074345Zrule' + xsi:type="SqlRuleAction">SET Priority = ''low''20true2021-10-21T05:22:26.077335Zrule' headers: Accept: - application/xml @@ -177,23 +177,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-09-28T19:05:51Z2021-09-28T19:05:51Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-10-21T05:22:26Z2021-10-21T05:22:26ZtestcidSET Priority = 'low'20true2021-09-28T19:05:51.2297808Zrule + i:type="SqlRuleAction">SET Priority = 'low'20true2021-10-21T05:22:26.2431566Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:51 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:26 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 - request: body: null headers: @@ -205,30 +205,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:05:51Z2021-09-28T19:05:51Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:22:26Z2021-10-21T05:22:26ZtestcidSET Priority = 'low'20true2021-09-28T19:05:51.0743454Zrule + i:type="SqlRuleAction">SET Priority = 'low'20true2021-10-21T05:22:26.0773354Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:51 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:26 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 - request: body: ' updatedcid2021-09-28T19:05:51.074345Zrule' + xsi:type="EmptyRuleAction" />2021-10-21T05:22:26.077335Zrule' headers: Accept: - application/xml @@ -244,23 +244,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-09-28T19:05:51Z2021-09-28T19:05:51Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-10-21T05:22:26Z2021-10-21T05:22:26Zupdatedcid2021-09-28T19:05:51.386029Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:26.3525571Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:51 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:26 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 - request: body: null headers: @@ -272,23 +272,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:05:51Z2021-09-28T19:05:51Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:22:26Z2021-10-21T05:22:26Zupdatedcid2021-09-28T19:05:51.0743454Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:22:26.0773354Zrule headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:51 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:26 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 - request: body: null headers: @@ -303,14 +303,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:51 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:26 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 - request: body: null headers: @@ -325,14 +325,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:51 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:26 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 - request: body: null headers: @@ -347,12 +347,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:52 GMT - etag: '637684527503170000' + date: Thu, 21 Oct 2021 05:22:26 GMT + etag: '637703905453270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_by_name.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_by_name.yaml index 417122d617e6..e6b710a0131b 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_by_name.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_by_name.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:52Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:27Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:52 GMT + date: Thu, 21 Oct 2021 05:22:27 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-09-28T19:05:52Z2021-09-28T19:05:52Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-10-21T05:22:27Z2021-10-21T05:22:27ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:52.963Z2021-09-28T19:05:52.99ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:27.837Z2021-10-21T05:22:27.91ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:53 GMT + date: Thu, 21 Oct 2021 05:22:28 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-09-28T19:05:53Z2021-09-28T19:05:53Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-10-21T05:22:28Z2021-10-21T05:22:28ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:53.4563813Z2021-09-28T19:05:53.4563813Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:28.3319395Z2021-10-21T05:22:28.3319395Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:53 GMT - etag: '637684527529900000' + date: Thu, 21 Oct 2021 05:22:28 GMT + etag: '637703905479100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 - request: body: null headers: @@ -99,23 +99,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?enrich=false&api-version=2021-05sub_testkkk2021-09-28T19:05:53Z2021-09-28T19:05:53Zsb://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?enrich=false&api-version=2021-05sub_testkkk2021-10-21T05:22:28Z2021-10-21T05:22:28ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:53.459063Z2021-09-28T19:05:53.459063Z2021-09-28T19:05:53.46ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:28.3433166Z2021-10-21T05:22:28.3433166Z2021-10-21T05:22:28.3433166Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:53 GMT - etag: '637684527529900000' + date: Thu, 21 Oct 2021 05:22:28 GMT + etag: '637703905479100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?enrich=false&api-version=2021-05 - request: body: null headers: @@ -130,14 +130,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:53 GMT - etag: '637684527529900000' + date: Thu, 21 Oct 2021 05:22:28 GMT + etag: '637703905479100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 - request: body: null headers: @@ -152,12 +152,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:53 GMT - etag: '637684527529900000' + date: Thu, 21 Oct 2021 05:22:28 GMT + etag: '637703905479100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_duplicate.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_duplicate.yaml index 241e08f2dd96..f2ac4683302b 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_duplicate.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_duplicate.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:54Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:29Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:54 GMT + date: Thu, 21 Oct 2021 05:22:28 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-09-28T19:05:55Z2021-09-28T19:05:55Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-10-21T05:22:29Z2021-10-21T05:22:30ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:55.043Z2021-09-28T19:05:55.083ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:29.92Z2021-10-21T05:22:30.02ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:55 GMT + date: Thu, 21 Oct 2021 05:22:29 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05kkaqo2021-09-28T19:05:55Z2021-09-28T19:05:55Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05kkaqo2021-10-21T05:22:30Z2021-10-21T05:22:30ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:55.5503645Z2021-09-28T19:05:55.5503645Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:30.5012606Z2021-10-21T05:22:30.5012606Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:55 GMT - etag: '637684527550830000' + date: Thu, 21 Oct 2021 05:22:30 GMT + etag: '637703905500200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 - request: body: ' @@ -107,19 +107,19 @@ interactions: response: body: string: 409The messaging entity 'servicebustestsbname:Topic:dqkodq|kkaqo' - already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:f3b4447b-685e-4e7d-922d-4c384e115053_B11, - SystemTracker:NoSystemTracker, Timestamp:2021-09-28T19:05:55 + already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:afea0647-4d40-4b7f-b3b1-0c8919e8658c_B9, + SystemTracker:NoSystemTracker, Timestamp:2021-10-21T05:22:30 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:05:56 GMT - etag: '637684527550830000' + date: Thu, 21 Oct 2021 05:22:31 GMT + etag: '637703905500200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 409 message: Conflict - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 - request: body: null headers: @@ -134,14 +134,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:56 GMT - etag: '637684527550830000' + date: Thu, 21 Oct 2021 05:22:31 GMT + etag: '637703905500200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 - request: body: null headers: @@ -156,12 +156,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:57 GMT - etag: '637684527550830000' + date: Thu, 21 Oct 2021 05:22:31 GMT + etag: '637703905500200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_with_forward_to.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_with_forward_to.yaml index f573c94ad4b1..9f3aa3ba6e40 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_with_forward_to.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_with_forward_to.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:57Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:32Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:57 GMT + date: Thu, 21 Oct 2021 05:22:32 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkfthj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfthj?api-version=2021-05dkfthj2021-09-28T19:05:58Z2021-09-28T19:05:58Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dkfthj?api-version=2021-05dkfthj2021-10-21T05:22:33Z2021-10-21T05:22:33ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:05:58.417Z2021-09-28T19:05:58.443ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:22:33.113Z2021-10-21T05:22:33.177ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:58 GMT + date: Thu, 21 Oct 2021 05:22:33 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfthj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkfthj?api-version=2021-05 - request: body: ' @@ -72,26 +72,26 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidkforward?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidkforward?api-version=2021-05iweidkforward2021-09-28T19:05:59Z2021-09-28T19:05:59Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/iweidkforward?api-version=2021-05iweidkforward2021-10-21T05:22:34Z2021-10-21T05:22:34ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:59.293Z2021-09-28T19:05:59.343ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:34.017Z2021-10-21T05:22:34.123ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:59 GMT + date: Thu, 21 Oct 2021 05:22:34 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidkforward?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidkforward?api-version=2021-05 - request: body: ' sb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfthjsb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfthj' + type="application/xml">sb://servicebustestkjdemkkogk.servicebus.windows.net/dkfthjsb://servicebustestkjdemkkogk.servicebus.windows.net/dkfthj' headers: Accept: - application/xml @@ -100,31 +100,31 @@ interactions: Content-Type: - application/atom+xml ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fdkfthj&sig=HReeXJI0esmAaDMypHZnc852te1ws5IB4alHM1o1BC8%3d&se=1632859559&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fdkfthj&sig=Fmy07jH4Pn1I6hCVR7d44wPbnHA%2fr8KbaG8hzivie%2bw%3d&se=1634797354&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fdkfthj&sig=HReeXJI0esmAaDMypHZnc852te1ws5IB4alHM1o1BC8%3d&se=1632859559&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fdkfthj&sig=Fmy07jH4Pn1I6hCVR7d44wPbnHA%2fr8KbaG8hzivie%2bw%3d&se=1634797354&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05kdosakoforward2021-09-28T19:05:59Z2021-09-28T19:05:59Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05kdosakoforward2021-10-21T05:22:34Z2021-10-21T05:22:34ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfthj2021-09-28T19:05:59.8819861Z2021-09-28T19:05:59.8819861Z0001-01-01T00:00:00sb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfthjP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/dkfthj2021-10-21T05:22:34.6199863Z2021-10-21T05:22:34.6199863Z0001-01-01T00:00:00sb://servicebustestkjdemkkogk.servicebus.windows.net/dkfthjP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:59 GMT - etag: '637684527593430000' + date: Thu, 21 Oct 2021 05:22:34 GMT + etag: '637703905541230000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05 - request: body: null headers: @@ -136,23 +136,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?enrich=false&api-version=2021-05kdosakoforward2021-09-28T19:05:59Z2021-09-28T19:05:59Zsb://servicebustestkjdemkkogk.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?enrich=false&api-version=2021-05kdosakoforward2021-10-21T05:22:34Z2021-10-21T05:22:34ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfthj2021-09-28T19:05:59.87103Z2021-09-28T19:05:59.87103Z2021-09-28T19:05:59.87103Z00000sb://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfthjP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/dkfthj2021-10-21T05:22:34.6127471Z2021-10-21T05:22:34.6127471Z2021-10-21T05:22:34.613Z00000sb://servicebustestkjdemkkogk.servicebus.windows.net/dkfthjP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:05:59 GMT - etag: '637684527593430000' + date: Thu, 21 Oct 2021 05:22:34 GMT + etag: '637703905541230000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?enrich=false&api-version=2021-05 - request: body: null headers: @@ -167,14 +167,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:05:59 GMT - etag: '637684527593430000' + date: Thu, 21 Oct 2021 05:22:34 GMT + etag: '637703905541230000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05 - request: body: null headers: @@ -189,14 +189,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:00 GMT - etag: '637684527593430000' + date: Thu, 21 Oct 2021 05:22:35 GMT + etag: '637703905541230000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidkforward?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidkforward?api-version=2021-05 - request: body: null headers: @@ -211,12 +211,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:01 GMT - etag: '637684527584430000' + date: Thu, 21 Oct 2021 05:22:35 GMT + etag: '637703905531770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkfthj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkfthj?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_with_subscription_description.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_with_subscription_description.yaml index 3c786781f880..5d6c28756ef6 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_with_subscription_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_create_with_subscription_description.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:01Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:36Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:01 GMT + date: Thu, 21 Oct 2021 05:22:35 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-09-28T19:06:02Z2021-09-28T19:06:02Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-10-21T05:22:36Z2021-10-21T05:22:37ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:02.34Z2021-09-28T19:06:02.38ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:36.91Z2021-10-21T05:22:37.233ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:02 GMT + date: Thu, 21 Oct 2021 05:22:37 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05kdosako2021-09-28T19:06:02Z2021-09-28T19:06:02Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05kdosako2021-10-21T05:22:37Z2021-10-21T05:22:37ZPT13StruePT11Mtruetrue014trueActive2021-09-28T19:06:02.8074807Z2021-09-28T19:06:02.8074807Z0001-01-01T00:00:00PT10MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13StruePT11Mtruetrue014trueActive2021-10-21T05:22:37.7120709Z2021-10-21T05:22:37.7120709Z0001-01-01T00:00:00PT10MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:02 GMT - etag: '637684527623800000' + date: Thu, 21 Oct 2021 05:22:37 GMT + etag: '637703905572330000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05 - request: body: null headers: @@ -99,23 +99,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk/subscriptions/kdosako?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/kdosako?enrich=false&api-version=2021-05kdosako2021-09-28T19:06:02Z2021-09-28T19:06:02Zsb://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/kdosako?enrich=false&api-version=2021-05kdosako2021-10-21T05:22:37Z2021-10-21T05:22:37ZPT13StruePT11Mtruetrue014trueActive2021-09-28T19:06:02.8054075Z2021-09-28T19:06:02.8054075Z2021-09-28T19:06:02.807ZPT13StruePT11Mtruetrue014trueActive2021-10-21T05:22:37.7089455Z2021-10-21T05:22:37.7089455Z2021-10-21T05:22:37.71Z00000PT10MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:02 GMT - etag: '637684527623800000' + date: Thu, 21 Oct 2021 05:22:37 GMT + etag: '637703905572330000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/kdosako?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/kdosako?enrich=false&api-version=2021-05 - request: body: ' @@ -134,22 +134,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk/subscriptions/owazmq?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/owazmq?api-version=2021-05owazmq2021-09-28T19:06:03Z2021-09-28T19:06:03Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/owazmq?api-version=2021-05owazmq2021-10-21T05:22:37Z2021-10-21T05:22:37ZPT13StruePT11Mtruetrue014trueActive2021-09-28T19:06:03.0418559Z2021-09-28T19:06:03.0418559Z0001-01-01T00:00:00PT10MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13StruePT11Mtruetrue014trueActive2021-10-21T05:22:37.8526109Z2021-10-21T05:22:37.8526109Z0001-01-01T00:00:00PT10MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:02 GMT - etag: '637684527623800000' + date: Thu, 21 Oct 2021 05:22:37 GMT + etag: '637703905572330000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/owazmq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/owazmq?api-version=2021-05 - request: body: null headers: @@ -161,23 +161,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk/subscriptions/owazmq?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/owazmq?enrich=false&api-version=2021-05owazmq2021-09-28T19:06:03Z2021-09-28T19:06:03Zsb://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/owazmq?enrich=false&api-version=2021-05owazmq2021-10-21T05:22:37Z2021-10-21T05:22:37ZPT13StruePT11Mtruetrue014trueActive2021-09-28T19:06:03.0397887Z2021-09-28T19:06:03.0397887Z2021-09-28T19:06:03.0397887ZPT13StruePT11Mtruetrue014trueActive2021-10-21T05:22:37.8495729Z2021-10-21T05:22:37.8495729Z2021-10-21T05:22:37.8495729Z00000PT10MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:02 GMT - etag: '637684527623800000' + date: Thu, 21 Oct 2021 05:22:37 GMT + etag: '637703905572330000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/owazmq?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/owazmq?enrich=false&api-version=2021-05 - request: body: null headers: @@ -192,14 +192,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:02 GMT - etag: '637684527623800000' + date: Thu, 21 Oct 2021 05:22:37 GMT + etag: '637703905572330000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05 - request: body: null headers: @@ -214,14 +214,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:02 GMT - etag: '637684527623800000' + date: Thu, 21 Oct 2021 05:22:37 GMT + etag: '637703905572330000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk/subscriptions/owazmq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk/subscriptions/owazmq?api-version=2021-05 - request: body: null headers: @@ -236,12 +236,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:03 GMT - etag: '637684527623800000' + date: Thu, 21 Oct 2021 05:22:37 GMT + etag: '637703905572330000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iweidk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_delete.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_delete.yaml index 26e8a4d7fd95..0a3d927a8843 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_delete.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_delete.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:04Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:39Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:03 GMT + date: Thu, 21 Oct 2021 05:22:38 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda?api-version=2021-05test_topicgda2021-09-28T19:06:04Z2021-09-28T19:06:04Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda?api-version=2021-05test_topicgda2021-10-21T05:22:39Z2021-10-21T05:22:39ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:04.573Z2021-09-28T19:06:04.647ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:39.507Z2021-10-21T05:22:39.537ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:04 GMT + date: Thu, 21 Oct 2021 05:22:39 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-09-28T19:06:05Z2021-09-28T19:06:05Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-10-21T05:22:39Z2021-10-21T05:22:39ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:05.1509077Z2021-09-28T19:06:05.1509077Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:39.9896964Z2021-10-21T05:22:39.9896964Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:05 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:39 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05 - request: body: null headers: @@ -99,25 +99,25 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:05Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-09-28T19:06:05Z2021-09-28T19:06:05ZSubscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:40Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-10-21T05:22:39Z2021-10-21T05:22:39ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:05.1465527Z2021-09-28T19:06:05.1465527Z2021-09-28T19:06:05.147ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:39.9838801Z2021-10-21T05:22:39.9838801Z2021-10-21T05:22:39.9838801Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:05 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:39 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -136,22 +136,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-09-28T19:06:05Z2021-09-28T19:06:05Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-10-21T05:22:40Z2021-10-21T05:22:40ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:05.6977945Z2021-09-28T19:06:05.6977945Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:40.1349608Z2021-10-21T05:22:40.1349608Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:05 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:40 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05 - request: body: null headers: @@ -163,31 +163,31 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:05Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-09-28T19:06:05Z2021-09-28T19:06:05ZSubscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:40Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-10-21T05:22:39Z2021-10-21T05:22:39ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:05.1465527Z2021-09-28T19:06:05.1465527Z2021-09-28T19:06:05.147ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:39.9838801Z2021-10-21T05:22:39.9838801Z2021-10-21T05:22:39.9838801Z00000P10675199DT2H48M5.4775807SAvailablefalsehttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-09-28T19:06:05Z2021-09-28T19:06:05Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-10-21T05:22:40Z2021-10-21T05:22:40ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:05.6934514Z2021-09-28T19:06:05.6934514Z2021-09-28T19:06:05.6934514ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:40.1401282Z2021-10-21T05:22:40.1401282Z2021-10-21T05:22:40.1401282Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:05 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:40 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -199,23 +199,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?enrich=false&api-version=2021-05test_sub1da2021-09-28T19:06:05Z2021-09-28T19:06:05Zsb://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?enrich=false&api-version=2021-05test_sub1da2021-10-21T05:22:39Z2021-10-21T05:22:39ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:05.1465527Z2021-09-28T19:06:05.1465527Z2021-09-28T19:06:05.147ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:39.9838801Z2021-10-21T05:22:39.9838801Z2021-10-21T05:22:39.9838801Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:05 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:40 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?enrich=false&api-version=2021-05 - request: body: null headers: @@ -230,14 +230,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:05 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:40 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05 - request: body: null headers: @@ -249,25 +249,25 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:06Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-09-28T19:06:05Z2021-09-28T19:06:05ZSubscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:40Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-10-21T05:22:40Z2021-10-21T05:22:40ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:05.6934514Z2021-09-28T19:06:05.6934514Z2021-09-28T19:06:05.6934514ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:40.1401282Z2021-10-21T05:22:40.1401282Z2021-10-21T05:22:40.1401282Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:05 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:40 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -282,14 +282,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:05 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:40 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05 - request: body: null headers: @@ -301,19 +301,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:06Z + string: Subscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:40Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:05 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:40 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -328,12 +328,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:06 GMT - etag: '637684527646470000' + date: Thu, 21 Oct 2021 05:22:40 GMT + etag: '637703905595370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topicgda?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topicgda?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_get_runtime_properties_basic.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_get_runtime_properties_basic.yaml index 923d7d66e17f..3d93d18937c1 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_get_runtime_properties_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_get_runtime_properties_basic.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:07Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:41Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:06 GMT + date: Thu, 21 Oct 2021 05:22:40 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dcvxqa?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dcvxqa?api-version=2021-05dcvxqa2021-09-28T19:06:07Z2021-09-28T19:06:07Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dcvxqa?api-version=2021-05dcvxqa2021-10-21T05:22:41Z2021-10-21T05:22:41ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:07.653Z2021-09-28T19:06:07.7ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:41.823Z2021-10-21T05:22:41.87ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:07 GMT + date: Thu, 21 Oct 2021 05:22:41 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dcvxqa?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dcvxqa?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05xvazzag2021-09-28T19:06:08Z2021-09-28T19:06:08Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05xvazzag2021-10-21T05:22:42Z2021-10-21T05:22:42ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:08.1646744Z2021-09-28T19:06:08.1646744Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:42.4012476Z2021-10-21T05:22:42.4012476Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:08 GMT - etag: '637684527677000000' + date: Thu, 21 Oct 2021 05:22:41 GMT + etag: '637703905618700000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05 - request: body: null headers: @@ -99,23 +99,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?enrich=false&api-version=2021-05xvazzag2021-09-28T19:06:08Z2021-09-28T19:06:08Zsb://servicebustestkjdemkkogk.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?enrich=false&api-version=2021-05xvazzag2021-10-21T05:22:42Z2021-10-21T05:22:42ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:08.1648232Z2021-09-28T19:06:08.1648232Z2021-09-28T19:06:08.1648232ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:42.4000268Z2021-10-21T05:22:42.4000268Z2021-10-21T05:22:42.4000268Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:08 GMT - etag: '637684527677000000' + date: Thu, 21 Oct 2021 05:22:41 GMT + etag: '637703905618700000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?enrich=false&api-version=2021-05 - request: body: null headers: @@ -130,14 +130,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:08 GMT - etag: '637684527677000000' + date: Thu, 21 Oct 2021 05:22:41 GMT + etag: '637703905618700000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05 - request: body: null headers: @@ -152,12 +152,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:08 GMT - etag: '637684527677000000' + date: Thu, 21 Oct 2021 05:22:42 GMT + etag: '637703905618700000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dcvxqa?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dcvxqa?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_list.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_list.yaml index e4ae0cd78ce9..7576a0e6daa3 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_list.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_list.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:09Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:43Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:08 GMT + date: Thu, 21 Oct 2021 05:22:43 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc?api-version=2021-05lkoqxc2021-09-28T19:06:09Z2021-09-28T19:06:09Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc?api-version=2021-05lkoqxc2021-10-21T05:22:44Z2021-10-21T05:22:44ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:09.94Z2021-09-28T19:06:09.98ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:44.13Z2021-10-21T05:22:44.157ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:09 GMT + date: Thu, 21 Oct 2021 05:22:44 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc?api-version=2021-05 - request: body: null headers: @@ -65,19 +65,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:10Z + string: Subscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:44Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:09 GMT - etag: '637684527699800000' + date: Thu, 21 Oct 2021 05:22:44 GMT + etag: '637703905641570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -96,22 +96,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05testsub12021-09-28T19:06:10Z2021-09-28T19:06:10Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05testsub12021-10-21T05:22:44Z2021-10-21T05:22:44ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:10.570911Z2021-09-28T19:06:10.570911Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:44.658564Z2021-10-21T05:22:44.658564Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:10 GMT - etag: '637684527699800000' + date: Thu, 21 Oct 2021 05:22:44 GMT + etag: '637703905641570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05 - request: body: ' @@ -130,22 +130,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05testsub22021-09-28T19:06:10Z2021-09-28T19:06:10Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05testsub22021-10-21T05:22:44Z2021-10-21T05:22:44ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:10.7427652Z2021-09-28T19:06:10.7427652Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:44.9397959Z2021-10-21T05:22:44.9397959Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:10 GMT - etag: '637684527699800000' + date: Thu, 21 Oct 2021 05:22:44 GMT + etag: '637703905641570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05 - request: body: null headers: @@ -157,31 +157,31 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:10Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05testsub12021-09-28T19:06:10Z2021-09-28T19:06:10ZSubscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:45Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05testsub12021-10-21T05:22:44Z2021-10-21T05:22:44ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:10.572381Z2021-09-28T19:06:10.572381Z2021-09-28T19:06:10.573ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:44.6714067Z2021-10-21T05:22:44.6714067Z2021-10-21T05:22:44.6714067Z00000P10675199DT2H48M5.4775807SAvailablefalsehttps://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05testsub22021-09-28T19:06:10Z2021-09-28T19:06:10Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05testsub22021-10-21T05:22:44Z2021-10-21T05:22:44ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:10.7442245Z2021-09-28T19:06:10.7442245Z2021-09-28T19:06:10.7442245ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:44.9526274Z2021-10-21T05:22:44.9526274Z2021-10-21T05:22:44.9526274Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:10 GMT - etag: '637684527699800000' + date: Thu, 21 Oct 2021 05:22:44 GMT + etag: '637703905641570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -196,14 +196,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:10 GMT - etag: '637684527699800000' + date: Thu, 21 Oct 2021 05:22:44 GMT + etag: '637703905641570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05 - request: body: null headers: @@ -218,14 +218,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:10 GMT - etag: '637684527699800000' + date: Thu, 21 Oct 2021 05:22:44 GMT + etag: '637703905641570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05 - request: body: null headers: @@ -237,19 +237,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:10Z + string: Subscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:45Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:10 GMT - etag: '637684527699800000' + date: Thu, 21 Oct 2021 05:22:44 GMT + etag: '637703905641570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -264,12 +264,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:10 GMT - etag: '637684527699800000' + date: Thu, 21 Oct 2021 05:22:45 GMT + etag: '637703905641570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/lkoqxc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/lkoqxc?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_list_runtime_properties.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_list_runtime_properties.yaml index 43bfd92cdd34..445c3a796691 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_list_runtime_properties.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_list_runtime_properties.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:12Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:46Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:11 GMT + date: Thu, 21 Oct 2021 05:22:45 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv?api-version=2021-05dkoamv2021-09-28T19:06:12Z2021-09-28T19:06:12Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv?api-version=2021-05dkoamv2021-10-21T05:22:46Z2021-10-21T05:22:46ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:12.527Z2021-09-28T19:06:12.553ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:46.643Z2021-10-21T05:22:46.693ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:12 GMT + date: Thu, 21 Oct 2021 05:22:46 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv?api-version=2021-05 - request: body: null headers: @@ -65,19 +65,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:12Z + string: Subscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:47Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:12 GMT - etag: '637684527725530000' + date: Thu, 21 Oct 2021 05:22:46 GMT + etag: '637703905666930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -89,19 +89,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:13Z + string: Subscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:47Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:12 GMT - etag: '637684527725530000' + date: Thu, 21 Oct 2021 05:22:46 GMT + etag: '637703905666930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -120,22 +120,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-09-28T19:06:13Z2021-09-28T19:06:13Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-10-21T05:22:47Z2021-10-21T05:22:47ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:13.0761947Z2021-09-28T19:06:13.0761947Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:47.3020785Z2021-10-21T05:22:47.3020785Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:12 GMT - etag: '637684527725530000' + date: Thu, 21 Oct 2021 05:22:46 GMT + etag: '637703905666930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05 - request: body: null headers: @@ -147,25 +147,25 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:13Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-09-28T19:06:13Z2021-09-28T19:06:13ZSubscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:47Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-10-21T05:22:47Z2021-10-21T05:22:47ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:13.0760036Z2021-09-28T19:06:13.0760036Z2021-09-28T19:06:13.077ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:47.2987181Z2021-10-21T05:22:47.2987181Z2021-10-21T05:22:47.3Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:12 GMT - etag: '637684527725530000' + date: Thu, 21 Oct 2021 05:22:46 GMT + etag: '637703905666930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -177,25 +177,25 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:13Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-09-28T19:06:13Z2021-09-28T19:06:13ZSubscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:47Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-10-21T05:22:47Z2021-10-21T05:22:47ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:13.0760036Z2021-09-28T19:06:13.0760036Z2021-09-28T19:06:13.077ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:47.2987181Z2021-10-21T05:22:47.2987181Z2021-10-21T05:22:47.3Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:12 GMT - etag: '637684527725530000' + date: Thu, 21 Oct 2021 05:22:46 GMT + etag: '637703905666930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -210,14 +210,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:12 GMT - etag: '637684527725530000' + date: Thu, 21 Oct 2021 05:22:47 GMT + etag: '637703905666930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05 - request: body: null headers: @@ -229,19 +229,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:13Z + string: Subscriptionshttps://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:47Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:13 GMT - etag: '637684527725530000' + date: Thu, 21 Oct 2021 05:22:47 GMT + etag: '637703905666930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -256,12 +256,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:13 GMT - etag: '637684527725530000' + date: Thu, 21 Oct 2021 05:22:47 GMT + etag: '637703905666930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dkoamv?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkoamv?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_update_invalid.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_update_invalid.yaml index aaf780c074b7..56029e65d8d1 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_update_invalid.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_update_invalid.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:14Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:48Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:14 GMT + date: Thu, 21 Oct 2021 05:22:48 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjfj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-09-28T19:06:14Z2021-09-28T19:06:15Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-10-21T05:22:49Z2021-10-21T05:22:49ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:14.987Z2021-09-28T19:06:15.113ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:49.13Z2021-10-21T05:22:49.253ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:15 GMT + date: Thu, 21 Oct 2021 05:22:49 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj?api-version=2021-05 - request: body: ' @@ -72,27 +72,27 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05kwqxc2021-09-28T19:06:15Z2021-09-28T19:06:15Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05kwqxc2021-10-21T05:22:49Z2021-10-21T05:22:49ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:15.5737131Z2021-09-28T19:06:15.5737131Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:49.763377Z2021-10-21T05:22:49.763377Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:15 GMT - etag: '637684527751130000' + date: Thu, 21 Oct 2021 05:22:49 GMT + etag: '637703905692530000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05 - request: body: ' PT1MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:06:15.573713Z2021-09-28T19:06:15.573713Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' + type="application/xml">PT1MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:49.763377Z2021-10-21T05:22:49.763377Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml @@ -109,24 +109,24 @@ interactions: response: body: string: 404Entity 'servicebustestsbname:Topic:dfjfj|iewdm' - was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:a7614085-127f-4561-81ec-1caf1a7920e7_B4, - SystemTracker:NoSystemTracker, Timestamp:2021-09-28T19:06:15 + was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:c9b9442f-38d8-44fd-b6c3-24112a27418f_B2, + SystemTracker:NoSystemTracker, Timestamp:2021-10-21T05:22:50 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:06:16 GMT - etag: '637684527751130000' + date: Thu, 21 Oct 2021 05:22:50 GMT + etag: '637703905692530000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 404 message: Not Found - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj/subscriptions/iewdm?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj/subscriptions/iewdm?api-version=2021-05 - request: body: ' P25DfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:06:15.573713Z2021-09-28T19:06:15.573713Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' + type="application/xml">P25DfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:49.763377Z2021-10-21T05:22:49.763377Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml @@ -148,19 +148,19 @@ interactions: Parameter name: LockDuration - Actual value was 25.00:00:00. TrackingId:b31ff5ad-ac8b-4cba-8b72-ba757835981b_G9, - SystemTracker:servicebustestsbname:Topic:dfjfj, Timestamp:2021-09-28T19:06:16' + Actual value was 25.00:00:00. TrackingId:3934b2ab-fce1-4559-85d4-9bbac4052ed4_G4, + SystemTracker:servicebustestsbname:Topic:dfjfj, Timestamp:2021-10-21T05:22:51' headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:06:17 GMT - etag: '637684527751130000' + date: Thu, 21 Oct 2021 05:22:51 GMT + etag: '637703905692530000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj/subscriptions/dfjfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj/subscriptions/dfjfj?api-version=2021-05 - request: body: null headers: @@ -175,14 +175,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:17 GMT - etag: '637684527751130000' + date: Thu, 21 Oct 2021 05:22:51 GMT + etag: '637703905692530000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05 - request: body: null headers: @@ -197,12 +197,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:18 GMT - etag: '637684527751130000' + date: Thu, 21 Oct 2021 05:22:52 GMT + etag: '637703905692530000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_update_success.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_update_success.yaml index cd220dd801cf..da70a654da2c 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_update_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_async_mgmt_subscription_update_success.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:18Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:52Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:18 GMT + date: Thu, 21 Oct 2021 05:22:51 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfkla?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfkla?api-version=2021-05dfkla2021-09-28T19:06:19Z2021-09-28T19:06:19Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dfkla?api-version=2021-05dfkla2021-10-21T05:22:53Z2021-10-21T05:22:53ZservicebustestkjdemkkogkPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:06:19.41Z2021-09-28T19:06:19.47ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:22:53.427Z2021-10-21T05:22:53.473ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:19 GMT + date: Thu, 21 Oct 2021 05:22:53 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfkla?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfkla?api-version=2021-05 - request: body: ' @@ -72,21 +72,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:06:20Z2021-09-28T19:06:20Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:54Z2021-10-21T05:22:54ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:20.24Z2021-09-28T19:06:20.807ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:54.363Z2021-10-21T05:22:54.477ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:20 GMT + date: Thu, 21 Oct 2021 05:22:54 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: ' @@ -105,27 +105,27 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:21.2897569Z2021-09-28T19:06:21.2897569Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:55.0780438Z2021-10-21T05:22:55.0780438Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: ' PT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:06:21.289756Z2021-09-28T19:06:21.289756Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' + type="application/xml">PT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:55.078043Z2021-10-21T05:22:55.078043Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml @@ -141,22 +141,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:06:21.3678785Z2021-09-28T19:06:21.3678785Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:55.2186685Z2021-10-21T05:22:55.2186685Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -168,34 +168,34 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:06:21.2906522Z2021-09-28T19:06:21.3844023Z2021-09-28T19:06:21.2906522ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:55.0755422Z2021-10-21T05:22:55.2320975Z2021-10-21T05:22:55.077Z00000P10675199DT2H48M5.477539SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: ' PT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:06:21.290652Z2021-09-28T19:06:21.384402Z2021-09-28T19:06:21.290652Z00000PT10MAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:55.075542Z2021-10-21T05:22:55.232097Z2021-10-21T05:22:55.077Z00000PT10MAvailable' headers: Accept: - application/xml Content-Length: - - '1382' + - '1379' Content-Type: - application/atom+xml If-Match: @@ -206,22 +206,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:06:21.4791842Z2021-09-28T19:06:21.4791842Z0001-01-01T00:00:00PT10MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:55.3124142Z2021-10-21T05:22:55.3124142Z0001-01-01T00:00:00PT10MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -233,64 +233,64 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:06:21.2906522Z2021-09-28T19:06:21.4937789Z2021-09-28T19:06:21.2906522ZPT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:55.0755422Z2021-10-21T05:22:55.3258927Z2021-10-21T05:22:55.077Z00000PT10MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: ' PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui2021-09-28T19:06:21.290652Z2021-09-28T19:06:21.493778Z2021-09-28T19:06:21.290652Z00000sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruiPT10MAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui2021-10-21T05:22:55.075542Z2021-10-21T05:22:55.325892Z2021-10-21T05:22:55.077Z00000sb://servicebustestkjdemkkogk.servicebus.windows.net/fjruiPT10MAvailable' headers: Accept: - application/xml Content-Length: - - '1584' + - '1581' Content-Type: - application/atom+xml If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Ffjrui&sig=sbi6nDY1uH%2fJqZMbzUtaUAQI2r%2fiVYFX3CtBa2%2fK0BI%3d&se=1632859581&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Ffjrui&sig=37HSHCuIb%2fls9vEGlcqecfM67Ikm3t%2bB9UhmFKPcnS0%3d&se=1634797375&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Ffjrui&sig=sbi6nDY1uH%2fJqZMbzUtaUAQI2r%2fiVYFX3CtBa2%2fK0BI%3d&se=1632859581&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Ffjrui&sig=37HSHCuIb%2fls9vEGlcqecfM67Ikm3t%2bB9UhmFKPcnS0%3d&se=1634797375&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui2021-09-28T19:06:21.5866313Z2021-09-28T19:06:21.5866313Z0001-01-01T00:00:00sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui2021-10-21T05:22:55.4374139Z2021-10-21T05:22:55.4374139Z0001-01-01T00:00:00sb://servicebustestkjdemkkogk.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -302,64 +302,64 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui2021-09-28T19:06:21.2906522Z2021-09-28T19:06:21.6187852Z2021-09-28T19:06:21.2906522Z00000sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui2021-10-21T05:22:55.0755422Z2021-10-21T05:22:55.4508895Z2021-10-21T05:22:55.077Z00000sb://servicebustestkjdemkkogk.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: ' PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/dfkla2021-09-28T19:06:21.290652Z2021-09-28T19:06:21.618785Z2021-09-28T19:06:21.290652Z00000sb://servicebustestkv3s7h2dmw.servicebus.windows.net/dfklaP10675199DT2H48M5.477539SAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/dfkla2021-10-21T05:22:55.075542Z2021-10-21T05:22:55.450889Z2021-10-21T05:22:55.077Z00000sb://servicebustestkjdemkkogk.servicebus.windows.net/dfklaP10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml Content-Length: - - '1604' + - '1601' Content-Type: - application/atom+xml If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fdfkla&sig=NTx9EICAg5izNVzll%2bpK%2bX6uF0R3iBrUkhb7GAsH4tg%3d&se=1632859581&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fdfkla&sig=CxrwY8DbARKVzR7QBI36TtXMBDCqnEAVyKMkBCXW80k%3d&se=1634797375&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Fdfkla&sig=NTx9EICAg5izNVzll%2bpK%2bX6uF0R3iBrUkhb7GAsH4tg%3d&se=1632859581&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Fdfkla&sig=CxrwY8DbARKVzR7QBI36TtXMBDCqnEAVyKMkBCXW80k%3d&se=1634797375&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/dfkla2021-09-28T19:06:21.6960505Z2021-09-28T19:06:21.6960505Z0001-01-01T00:00:00sb://servicebustestkv3s7h2dmw.servicebus.windows.net/dfklaP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/dfkla2021-10-21T05:22:55.5311668Z2021-10-21T05:22:55.5311668Z0001-01-01T00:00:00sb://servicebustestkjdemkkogk.servicebus.windows.net/dfklaP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -371,34 +371,34 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/dfkla2021-09-28T19:06:21.2906522Z2021-09-28T19:06:21.7125319Z2021-09-28T19:06:21.2906522Z00000sb://servicebustestkv3s7h2dmw.servicebus.windows.net/dfklaP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/dfkla2021-10-21T05:22:55.0755422Z2021-10-21T05:22:55.5289774Z2021-10-21T05:22:55.077Z00000sb://servicebustestkjdemkkogk.servicebus.windows.net/dfklaP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: ' PT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:06:21.290652Z2021-09-28T19:06:21.712531Z2021-09-28T19:06:21.290652Z00000P10675199DT2H48M5.477539SAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:55.075542Z2021-10-21T05:22:55.528977Z2021-10-21T05:22:55.077Z00000P10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml Content-Length: - - '1402' + - '1399' Content-Type: - application/atom+xml If-Match: @@ -409,22 +409,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:06:21.7898144Z2021-09-28T19:06:21.7898144Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:55.6405505Z2021-10-21T05:22:55.6405505Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -436,34 +436,34 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:06:21.2906522Z2021-09-28T19:06:21.7906848Z2021-09-28T19:06:21.2906522ZPT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:55.0755422Z2021-10-21T05:22:55.6539773Z2021-10-21T05:22:55.077Z00000P10675199DT2H48M5.477539SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: ' PT3M3SfalsePT11M2Struetrue014trueActive2021-09-28T19:06:21.290652Z2021-09-28T19:06:21.790684Z2021-09-28T19:06:21.290652Z00000PT10M1SAvailable' + type="application/xml">PT3M3SfalsePT11M2Struetrue014trueActive2021-10-21T05:22:55.075542Z2021-10-21T05:22:55.653977Z2021-10-21T05:22:55.077Z00000PT10M1SAvailable' headers: Accept: - application/xml Content-Length: - - '1387' + - '1384' Content-Type: - application/atom+xml If-Match: @@ -474,22 +474,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT3M3SfalsePT11M2Struetrue014trueActive2021-09-28T19:06:21.8991299Z2021-09-28T19:06:21.8991299Z0001-01-01T00:00:00PT10M1SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT3M3SfalsePT11M2Struetrue014trueActive2021-10-21T05:22:55.734292Z2021-10-21T05:22:55.734292Z0001-01-01T00:00:00PT10M1SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -501,34 +501,34 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT3M3SfalsePT11M2Struetrue014trueActive2021-09-28T19:06:21.2906522Z2021-09-28T19:06:21.9000281Z2021-09-28T19:06:21.2906522ZPT3M3SfalsePT11M2Struetrue014trueActive2021-10-21T05:22:55.0755422Z2021-10-21T05:22:55.7394284Z2021-10-21T05:22:55.077Z00000PT10M1SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: ' PT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:06:21.290652Z2021-09-28T19:06:21.900028Z2021-09-28T19:06:21.290652Z00000PT15MAvailable' + type="application/xml">PT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:22:55.075542Z2021-10-21T05:22:55.739428Z2021-10-21T05:22:55.077Z00000PT15MAvailable' headers: Accept: - application/xml Content-Length: - - '1383' + - '1380' Content-Type: - application/atom+xml If-Match: @@ -539,22 +539,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:21Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:06:21.9928816Z2021-09-28T19:06:21.9928816Z0001-01-01T00:00:00PT15MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:22:55.8280423Z2021-10-21T05:22:55.8280423Z0001-01-01T00:00:00PT15MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -566,23 +566,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:21Z2021-09-28T19:06:22Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:55Z2021-10-21T05:22:55ZPT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:06:21.2906522Z2021-09-28T19:06:22.0094153Z2021-09-28T19:06:21.2906522ZPT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:22:55.0755422Z2021-10-21T05:22:55.8331659Z2021-10-21T05:22:55.077Z00000PT15MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: null headers: @@ -597,14 +597,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:21 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:55 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -619,14 +619,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:22 GMT - etag: '637684527808070000' + date: Thu, 21 Oct 2021 05:22:56 GMT + etag: '637703905744770000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: null headers: @@ -641,12 +641,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:22 GMT - etag: '637684527794700000' + date: Thu, 21 Oct 2021 05:22:56 GMT + etag: '637703905734730000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfkla?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfkla?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_mgmt_subscription_async_update_dict_error.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_mgmt_subscription_async_update_dict_error.yaml index efcd55d056b4..ef0e635e79a4 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_mgmt_subscription_async_update_dict_error.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_mgmt_subscription_async_update_dict_error.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:23Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:57Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:22 GMT + date: Thu, 21 Oct 2021 05:22:57 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:06:24Z2021-09-28T19:06:24Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:57Z2021-10-21T05:22:57ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:24.1Z2021-09-28T19:06:24.153ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:57.87Z2021-10-21T05:22:57.927ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:24 GMT + date: Thu, 21 Oct 2021 05:22:58 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:24Z2021-09-28T19:06:24Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:58Z2021-10-21T05:22:58ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:24.6824879Z2021-09-28T19:06:24.6824879Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:58.3715526Z2021-10-21T05:22:58.3715526Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:24 GMT - etag: '637684527841530000' + date: Thu, 21 Oct 2021 05:22:58 GMT + etag: '637703905779270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -102,14 +102,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:24 GMT - etag: '637684527841530000' + date: Thu, 21 Oct 2021 05:22:58 GMT + etag: '637703905779270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -124,12 +124,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:24 GMT - etag: '637684527841530000' + date: Thu, 21 Oct 2021 05:22:59 GMT + etag: '637703905779270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_mgmt_subscription_async_update_dict_success.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_mgmt_subscription_async_update_dict_success.yaml index a88731f31e12..d77fdfb5c38a 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_mgmt_subscription_async_update_dict_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_subscriptions_async.test_mgmt_subscription_async_update_dict_success.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:25Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:59Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:25 GMT + date: Thu, 21 Oct 2021 05:22:59 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:06:26Z2021-09-28T19:06:26Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:23:00Z2021-10-21T05:23:00ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:26.353Z2021-09-28T19:06:26.42ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:00.11Z2021-10-21T05:23:00.18ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:26 GMT + date: Thu, 21 Oct 2021 05:23:00 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: ' @@ -72,22 +72,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:27Z2021-09-28T19:06:27Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:23:00Z2021-10-21T05:23:00ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:06:27.1600172Z2021-09-28T19:06:27.1600172Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:23:00.7157721Z2021-10-21T05:23:00.7157721Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:00 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: ' @@ -108,22 +108,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:27Z2021-09-28T19:06:27Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:23:00Z2021-10-21T05:23:00ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:06:27.4100177Z2021-09-28T19:06:27.4100177Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:23:00.8876632Z2021-10-21T05:23:00.8876632Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:00 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -135,23 +135,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:27Z2021-09-28T19:06:27Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:23:00Z2021-10-21T05:23:00ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:06:27.1637921Z2021-09-28T19:06:27.4294224Z2021-09-28T19:06:27.1637921ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:23:00.7139176Z2021-10-21T05:23:00.8857708Z2021-10-21T05:23:00.7139176Z00000P10675199DT2H48M5.477539SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:00 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: ' @@ -172,22 +172,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:27Z2021-09-28T19:06:27Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:23:00Z2021-10-21T05:23:00ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:06:27.5350237Z2021-09-28T19:06:27.5350237Z0001-01-01T00:00:00PT10MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:23:00.9813874Z2021-10-21T05:23:00.9813874Z0001-01-01T00:00:00PT10MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:00 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -199,28 +199,28 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:27Z2021-09-28T19:06:27Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:23:00Z2021-10-21T05:23:00ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:06:27.1637921Z2021-09-28T19:06:27.5544151Z2021-09-28T19:06:27.1637921ZPT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:23:00.7139176Z2021-10-21T05:23:00.9951852Z2021-10-21T05:23:00.7139176Z00000PT10MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:00 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: ' PT12SfalsePT11Mtruetrue14trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruisb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruiPT10MAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue14trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/fjruisb://servicebustestkjdemkkogk.servicebus.windows.net/fjruiPT10MAvailable' headers: Accept: - application/xml @@ -231,31 +231,31 @@ interactions: If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Ffjrui&sig=KKyZxSReFnC8fWA%2fnkNvZOlTHu1Ts3YtsnpVTH28v68%3d&se=1632859587&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Ffjrui&sig=Uhl%2fNA2oLWgxVFSQEW5j4g2pJbI4jTyhMgNhbA00YKA%3d&se=1634797381&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkv3s7h2dmw.servicebus.windows.net%2Ffjrui&sig=KKyZxSReFnC8fWA%2fnkNvZOlTHu1Ts3YtsnpVTH28v68%3d&se=1632859587&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkjdemkkogk.servicebus.windows.net%2Ffjrui&sig=Uhl%2fNA2oLWgxVFSQEW5j4g2pJbI4jTyhMgNhbA00YKA%3d&se=1634797381&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:27Z2021-09-28T19:06:27Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:23:01Z2021-10-21T05:23:01ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui2021-09-28T19:06:27.6443997Z2021-09-28T19:06:27.6443997Z0001-01-01T00:00:00sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui2021-10-21T05:23:01.0907585Z2021-10-21T05:23:01.0907585Z0001-01-01T00:00:00sb://servicebustestkjdemkkogk.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:00 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -267,23 +267,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:27Z2021-09-28T19:06:27Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:23:00Z2021-10-21T05:23:01ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui2021-09-28T19:06:27.1637921Z2021-09-28T19:06:27.6637997Z2021-09-28T19:06:27.1637921Z00000sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui2021-10-21T05:23:00.7139176Z2021-10-21T05:23:01.1045461Z2021-10-21T05:23:00.7139176Z00000sb://servicebustestkjdemkkogk.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:00 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: ' @@ -304,22 +304,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:06:27Z2021-09-28T19:06:27Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:23:01Z2021-10-21T05:23:01ZPT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:06:27.7537703Z2021-09-28T19:06:27.7537703Z0001-01-01T00:00:00PT15MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:23:01.1854176Z2021-10-21T05:23:01.1854176Z0001-01-01T00:00:00PT15MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:01 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -331,23 +331,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:06:27Z2021-09-28T19:06:27Zsb://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:23:00Z2021-10-21T05:23:01ZPT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:06:27.1637921Z2021-09-28T19:06:27.7575509Z2021-09-28T19:06:27.1637921ZPT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:23:00.7139176Z2021-10-21T05:23:01.1826706Z2021-10-21T05:23:00.7139176Z00000PT15MAvailablefalse headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:01 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 - request: body: null headers: @@ -362,14 +362,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:27 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:01 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 - request: body: null headers: @@ -384,12 +384,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:28 GMT - etag: '637684527864200000' + date: Thu, 21 Oct 2021 05:23:01 GMT + etag: '637703905801800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_basic_v2017_04.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_basic_v2017_04.yaml new file mode 100644 index 000000000000..509c8b50c5fa --- /dev/null +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_basic_v2017_04.yaml @@ -0,0 +1,356 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:23:02Z + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:23:01 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:23:02Z2021-10-21T05:23:02ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:02.65Z2021-10-21T05:23:02.717ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: application/atom+xml;type=entry;charset=utf-8 + date: Thu, 21 Oct 2021 05:23:02 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 201 + message: Created + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:23:03Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:23:02Z2021-10-21T05:23:02ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:02.65Z2021-10-21T05:23:02.717Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:23:02 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04test_topic2021-10-21T05:23:02Z2021-10-21T05:23:02ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:02.65Z2021-10-21T05:23:02.717Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: application/atom+xml;type=entry;charset=utf-8 + date: Thu, 21 Oct 2021 05:23:02 GMT + etag: '637703905827170000' + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 21 Oct 2021 05:23:03 GMT + etag: '637703905827170000' + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:23:04Z + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:23:03 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/topic_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'TopicDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:3bfe1379-653c-488f-b23a-a5907351db91_G7, SystemTracker:servicebustestsbname.servicebus.windows.net:topic_can_not_be_created, + Timestamp:2021-10-21T05:23:04 + headers: + content-type: application/xml; charset=utf-8 + date: Thu, 21 Oct 2021 05:23:04 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 400 + message: Bad Request + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_can_not_be_created?api-version=2017-04 +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:23:05Z2021-10-21T05:23:05ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:05.313Z2021-10-21T05:23:05.367ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: application/atom+xml;type=entry;charset=utf-8 + date: Thu, 21 Oct 2021 05:23:05 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 201 + message: Created + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:23:06Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:23:05Z2021-10-21T05:23:05ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:05.313Z2021-10-21T05:23:05.367Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:23:06 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04test_topic2021-10-21T05:23:05Z2021-10-21T05:23:05ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:05.313Z2021-10-21T05:23:05.367Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: application/atom+xml;type=entry;charset=utf-8 + date: Thu, 21 Oct 2021 05:23:06 GMT + etag: '637703905853670000' + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 21 Oct 2021 05:23:06 GMT + etag: '637703905853670000' + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2017-04 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:23:07Z + headers: + content-type: application/atom+xml;type=feed;charset=utf-8 + date: Thu, 21 Oct 2021 05:23:06 GMT + server: Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + status: + code: 200 + message: OK + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/topic_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'TopicDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:6d7328a4-d74a-4c37-9c3b-47844b42b6c3_G4, SystemTracker:servicebustestsbname.servicebus.windows.net:topic_can_not_be_created, + Timestamp:2021-10-21T05:23:07 + headers: + content-type: application/xml; charset=utf-8 + date: Thu, 21 Oct 2021 05:23:07 GMT + server: Microsoft-HTTPAPI/2.0 + strict-transport-security: max-age=31536000 + transfer-encoding: chunked + status: + code: 400 + message: Bad Request + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_can_not_be_created?api-version=2017-04 +version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_by_name.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_by_name.yaml index 748fb39920f6..9e14c089b170 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_by_name.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_by_name.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:28Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:07Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:27 GMT + date: Thu, 21 Oct 2021 05:23:07 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-09-28T19:06:29Z2021-09-28T19:06:29Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-10-21T05:23:08Z2021-10-21T05:23:08ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:29.253Z2021-09-28T19:06:29.29ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:08.34Z2021-10-21T05:23:08.453ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:29 GMT + date: Thu, 21 Oct 2021 05:23:08 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05 - request: body: null headers: @@ -65,23 +65,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?enrich=false&api-version=2021-05topic_testaddf2021-09-28T19:06:29Z2021-09-28T19:06:29Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?enrich=false&api-version=2021-05topic_testaddf2021-10-21T05:23:08Z2021-10-21T05:23:08ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:29.253Z2021-09-28T19:06:29.29Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:08.34Z2021-10-21T05:23:08.453Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:29 GMT - etag: '637684527892900000' + date: Thu, 21 Oct 2021 05:23:08 GMT + etag: '637703905884530000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?enrich=false&api-version=2021-05 - request: body: null headers: @@ -96,12 +96,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:30 GMT - etag: '637684527892900000' + date: Thu, 21 Oct 2021 05:23:09 GMT + etag: '637703905884530000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/topic_testaddf?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/topic_testaddf?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_duplicate.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_duplicate.yaml index 885c620fdf97..1dcbbabb4649 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_duplicate.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_duplicate.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:30Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:10Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:30 GMT + date: Thu, 21 Oct 2021 05:23:09 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-09-28T19:06:31Z2021-09-28T19:06:31Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-10-21T05:23:10Z2021-10-21T05:23:10ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:31.38Z2021-09-28T19:06:31.41ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:10.48Z2021-10-21T05:23:10.567ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:31 GMT + date: Thu, 21 Oct 2021 05:23:10 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05 - request: body: ' @@ -74,19 +74,19 @@ interactions: body: string: 409SubCode=40900. Conflict. You're requesting an operation that isn't allowed in the resource's current state. To know more - visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:aec02faf-39ec-4da4-94c3-89375629a6a7_G8, - SystemTracker:servicebustestsbname.servicebus.windows.net:dqkodq, Timestamp:2021-09-28T19:06:31 + visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:12bcd4fd-1e6a-40d3-9888-36256f2a27fd_G8, + SystemTracker:servicebustestsbname.servicebus.windows.net:dqkodq, Timestamp:2021-10-21T05:23:11 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:06:31 GMT - etag: '637684527914100000' + date: Thu, 21 Oct 2021 05:23:10 GMT + etag: '637703905905670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 409 message: Conflict - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05 - request: body: null headers: @@ -101,12 +101,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:32 GMT - etag: '637684527914100000' + date: Thu, 21 Oct 2021 05:23:11 GMT + etag: '637703905905670000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dqkodq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dqkodq?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_with_topic_description.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_with_topic_description.yaml index 815a70f9bc33..5c34c427afa8 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_with_topic_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_create_with_topic_description.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestqvutex6xoh.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T22:18:14Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:12Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 22:18:14 GMT + date: Thu, 21 Oct 2021 05:23:11 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestqvutex6xoh.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?api-version=2021-05 response: body: - string: https://servicebustestqvutex6xoh.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-09-28T22:18:14Z2021-09-28T22:18:14Zservicebustestqvutex6xohhttps://servicebustestkjdemkkogk.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-10-21T05:23:12Z2021-10-21T05:23:12ZservicebustestkjdemkkogkPT11M49152falsePT12Mtrue0falsefalseActive2021-09-28T22:18:14.627Z2021-09-28T22:18:14.777ZfalsePT10MtrueAvailablefalsetrue256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT11M49152falsePT12Mtrue0falsefalseActive2021-10-21T05:23:12.753Z2021-10-21T05:23:12.973ZfalsePT10MtrueAvailablefalsetrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 22:18:15 GMT + date: Thu, 21 Oct 2021 05:23:12 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestqvutex6xoh.servicebus.windows.net/iweidk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk?api-version=2021-05 - request: body: null headers: @@ -65,23 +65,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestqvutex6xoh.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-09-28T22:18:14Z2021-09-28T22:18:14Zservicebustestqvutex6xohhttps://servicebustestkjdemkkogk.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-10-21T05:23:12Z2021-10-21T05:23:12ZservicebustestkjdemkkogkPT11M49152falsePT12Mtrue0falsefalseActive2021-09-28T22:18:14.627Z2021-09-28T22:18:14.777Z0001-01-01T00:00:00ZfalsePT11M49152falsePT12Mtrue0falsefalseActive2021-10-21T05:23:12.753Z2021-10-21T05:23:12.973Z0001-01-01T00:00:00Zfalse000000PT10MtrueAvailablefalsetrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 22:18:15 GMT - etag: '637684642947770000' + date: Thu, 21 Oct 2021 05:23:12 GMT + etag: '637703905929730000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestqvutex6xoh.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 - request: body: ' @@ -100,21 +100,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkozq?api-version=2021-05 response: body: - string: https://servicebustestqvutex6xoh.servicebus.windows.net/dkozq?api-version=2021-05dkozq2021-09-28T22:18:15Z2021-09-28T22:18:15Zservicebustestqvutex6xohhttps://servicebustestkjdemkkogk.servicebus.windows.net/dkozq?api-version=2021-05dkozq2021-10-21T05:23:13Z2021-10-21T05:23:14ZservicebustestkjdemkkogkPT11M49152falsePT12Mtrue0falsefalseActive2021-09-28T22:18:15.543Z2021-09-28T22:18:15.733ZfalsePT10MtrueAvailablefalsetrue256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT11M49152falsePT12Mtrue0falsefalseActive2021-10-21T05:23:13.907Z2021-10-21T05:23:14ZfalsePT10MtrueAvailablefalsetrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 22:18:16 GMT + date: Thu, 21 Oct 2021 05:23:13 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestqvutex6xoh.servicebus.windows.net/dkozq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkozq?api-version=2021-05 - request: body: null headers: @@ -126,23 +126,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestqvutex6xoh.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05dkozq2021-09-28T22:18:15Z2021-09-28T22:18:15Zservicebustestqvutex6xohhttps://servicebustestkjdemkkogk.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05dkozq2021-10-21T05:23:13Z2021-10-21T05:23:14ZservicebustestkjdemkkogkPT11M49152falsePT12Mtrue0falsefalseActive2021-09-28T22:18:15.543Z2021-09-28T22:18:15.733Z0001-01-01T00:00:00ZfalsePT11M49152falsePT12Mtrue0falsefalseActive2021-10-21T05:23:13.907Z2021-10-21T05:23:14Z0001-01-01T00:00:00Zfalse000000PT10MtrueAvailablefalsetrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 22:18:16 GMT - etag: '637684642957330000' + date: Thu, 21 Oct 2021 05:23:13 GMT + etag: '637703905940000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestqvutex6xoh.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05 - request: body: ' @@ -162,18 +162,18 @@ interactions: response: body: string: 400SubCode=40000. Bad Request. To know more - visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:ea57b839-3818-4642-a91d-02b599a09c0b_G13, - SystemTracker:servicebustestsbname.servicebus.windows.net:famviq, Timestamp:2021-09-28T22:18:16 + visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:00d39985-e2bd-4a47-8718-05ba9438eddd_G15, + SystemTracker:servicebustestsbname.servicebus.windows.net:famviq, Timestamp:2021-10-21T05:23:14 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 22:18:16 GMT + date: Thu, 21 Oct 2021 05:23:14 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustestqvutex6xoh.servicebus.windows.net/famviq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/famviq?api-version=2021-05 - request: body: null headers: @@ -188,14 +188,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 22:18:17 GMT - etag: '637684642947770000' + date: Thu, 21 Oct 2021 05:23:14 GMT + etag: '637703905929730000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestqvutex6xoh.servicebus.windows.net/iweidk?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iweidk?api-version=2021-05 - request: body: null headers: @@ -210,12 +210,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 22:18:17 GMT - etag: '637684642957330000' + date: Thu, 21 Oct 2021 05:23:15 GMT + etag: '637703905940000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestqvutex6xoh.servicebus.windows.net/dkozq?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dkozq?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_delete.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_delete.yaml index 750c73dbf099..abd82f16d5ea 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_delete.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_delete.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:37Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:16Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:37 GMT + date: Thu, 21 Oct 2021 05:23:15 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:06:38Z2021-09-28T19:06:38Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:23:16Z2021-10-21T05:23:16ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:38.16Z2021-09-28T19:06:38.317ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:16.76Z2021-10-21T05:23:16.787ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:38 GMT + date: Thu, 21 Oct 2021 05:23:16 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05 - request: body: null headers: @@ -65,23 +65,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:39Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:06:38Z2021-09-28T19:06:38Zservicebustestkv3s7h2dmwTopicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:17Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:23:16Z2021-10-21T05:23:16ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:38.16Z2021-09-28T19:06:38.317Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:16.76Z2021-10-21T05:23:16.787Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:38 GMT + date: Thu, 21 Oct 2021 05:23:16 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -100,21 +100,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:06:39Z2021-09-28T19:06:39Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:23:18Z2021-10-21T05:23:18ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:39.543Z2021-09-28T19:06:39.777ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:18.033Z2021-10-21T05:23:18.127ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:39 GMT + date: Thu, 21 Oct 2021 05:23:17 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 - request: body: null headers: @@ -126,29 +126,29 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:40Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:06:38Z2021-09-28T19:06:38Zservicebustestkv3s7h2dmwTopicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:18Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:23:16Z2021-10-21T05:23:16ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:38.16Z2021-09-28T19:06:38.317Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:16.76Z2021-10-21T05:23:16.787Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:06:39Z2021-09-28T19:06:39Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:23:18Z2021-10-21T05:23:18ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:39.543Z2021-09-28T19:06:39.777Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:18.033Z2021-10-21T05:23:18.127Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:40 GMT + date: Thu, 21 Oct 2021 05:23:18 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -160,23 +160,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05test_topic2021-09-28T19:06:38Z2021-09-28T19:06:38Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05test_topic2021-10-21T05:23:16Z2021-10-21T05:23:16ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:38.16Z2021-09-28T19:06:38.317Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:16.76Z2021-10-21T05:23:16.787Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:40 GMT - etag: '637684527983170000' + date: Thu, 21 Oct 2021 05:23:18 GMT + etag: '637703905967870000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05 - request: body: null headers: @@ -191,14 +191,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:40 GMT - etag: '637684527983170000' + date: Thu, 21 Oct 2021 05:23:18 GMT + etag: '637703905967870000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05 - request: body: null headers: @@ -210,23 +210,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:42Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:06:39Z2021-09-28T19:06:39Zservicebustestkv3s7h2dmwTopicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:19Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:23:18Z2021-10-21T05:23:18ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:39.543Z2021-09-28T19:06:39.777Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:18.033Z2021-10-21T05:23:18.127Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:41 GMT + date: Thu, 21 Oct 2021 05:23:19 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -238,23 +238,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/txt%2F.-_123?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt/.-_123?enrich=false&api-version=2021-05txt/.-_1232021-09-28T19:06:39Z2021-09-28T19:06:39Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/txt/.-_123?enrich=false&api-version=2021-05txt/.-_1232021-10-21T05:23:18Z2021-10-21T05:23:18ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:39.543Z2021-09-28T19:06:39.777Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:18.033Z2021-10-21T05:23:18.127Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:41 GMT - etag: '637684527997770000' + date: Thu, 21 Oct 2021 05:23:19 GMT + etag: '637703905981270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt%2F.-_123?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/txt%2F.-_123?enrich=false&api-version=2021-05 - request: body: null headers: @@ -269,14 +269,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:41 GMT - etag: '637684527997770000' + date: Thu, 21 Oct 2021 05:23:19 GMT + etag: '637703905981270000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 - request: body: null headers: @@ -288,15 +288,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:43Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:20Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:42 GMT + date: Thu, 21 Oct 2021 05:23:19 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_get_runtime_properties_basic.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_get_runtime_properties_basic.yaml index dac05dcc84a9..cc010a9e8cba 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_get_runtime_properties_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_get_runtime_properties_basic.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:43Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:21Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:43 GMT + date: Thu, 21 Oct 2021 05:23:20 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:06:44Z2021-09-28T19:06:44Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:23:21Z2021-10-21T05:23:21ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:44.087Z2021-09-28T19:06:44.137ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:21.723Z2021-10-21T05:23:21.757ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:44 GMT + date: Thu, 21 Oct 2021 05:23:21 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05 - request: body: null headers: @@ -65,23 +65,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05test_topic2021-09-28T19:06:44Z2021-09-28T19:06:44Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05test_topic2021-10-21T05:23:21Z2021-10-21T05:23:21ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:44.087Z2021-09-28T19:06:44.137Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:21.723Z2021-10-21T05:23:21.757Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:44 GMT - etag: '637684528041370000' + date: Thu, 21 Oct 2021 05:23:21 GMT + etag: '637703906017570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05 - request: body: null headers: @@ -96,12 +96,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:45 GMT - etag: '637684528041370000' + date: Thu, 21 Oct 2021 05:23:22 GMT + etag: '637703906017570000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_list.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_list.yaml index 5d3a57434b48..c4285bede78d 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_list.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_list.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:45Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:23Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:44 GMT + date: Thu, 21 Oct 2021 05:23:23 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -32,17 +32,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:46Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:23Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:46 GMT + date: Thu, 21 Oct 2021 05:23:23 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -61,21 +61,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic_1?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic_1?api-version=2021-05test_topic_12021-09-28T19:06:47Z2021-09-28T19:06:47Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic_1?api-version=2021-05test_topic_12021-10-21T05:23:24Z2021-10-21T05:23:24ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:47.54Z2021-09-28T19:06:47.613ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:24.237Z2021-10-21T05:23:24.31ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:47 GMT + date: Thu, 21 Oct 2021 05:23:24 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic_1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic_1?api-version=2021-05 - request: body: ' @@ -94,21 +94,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic_2?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic_2?api-version=2021-05test_topic_22021-09-28T19:06:48Z2021-09-28T19:06:48Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic_2?api-version=2021-05test_topic_22021-10-21T05:23:25Z2021-10-21T05:23:25ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:48.583Z2021-09-28T19:06:48.623ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:25.09Z2021-10-21T05:23:25.12ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:48 GMT + date: Thu, 21 Oct 2021 05:23:25 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic_2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic_2?api-version=2021-05 - request: body: null headers: @@ -120,29 +120,29 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:49Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic_1?api-version=2021-05test_topic_12021-09-28T19:06:47Z2021-09-28T19:06:47Zservicebustestkv3s7h2dmwTopicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:25Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic_1?api-version=2021-05test_topic_12021-10-21T05:23:24Z2021-10-21T05:23:24ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:47.54Z2021-09-28T19:06:47.613Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:24.237Z2021-10-21T05:23:24.31Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic_2?api-version=2021-05test_topic_22021-09-28T19:06:48Z2021-09-28T19:06:48Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic_2?api-version=2021-05test_topic_22021-10-21T05:23:25Z2021-10-21T05:23:25ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:48.583Z2021-09-28T19:06:48.623Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:25.09Z2021-10-21T05:23:25.12Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:48 GMT + date: Thu, 21 Oct 2021 05:23:25 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -157,14 +157,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:49 GMT - etag: '637684528076130000' + date: Thu, 21 Oct 2021 05:23:26 GMT + etag: '637703906043100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic_1?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic_1?api-version=2021-05 - request: body: null headers: @@ -179,14 +179,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:49 GMT - etag: '637684528086230000' + date: Thu, 21 Oct 2021 05:23:26 GMT + etag: '637703906051200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic_2?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic_2?api-version=2021-05 - request: body: null headers: @@ -198,15 +198,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:50Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:27Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:50 GMT + date: Thu, 21 Oct 2021 05:23:26 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_list_runtime_properties.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_list_runtime_properties.yaml index 8fb2a6f97bd4..3068fd0abf55 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_list_runtime_properties.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_list_runtime_properties.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:51Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:27Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:51 GMT + date: Thu, 21 Oct 2021 05:23:27 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -32,17 +32,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:52Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:28Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:51 GMT + date: Thu, 21 Oct 2021 05:23:27 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -54,17 +54,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:52Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:28Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:52 GMT + date: Thu, 21 Oct 2021 05:23:27 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -83,21 +83,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:06:52Z2021-09-28T19:06:52Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:23:29Z2021-10-21T05:23:29ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:52.963Z2021-09-28T19:06:52.99ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:29.247Z2021-10-21T05:23:29.32ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:53 GMT + date: Thu, 21 Oct 2021 05:23:28 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05 - request: body: null headers: @@ -109,23 +109,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:53Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:06:52Z2021-09-28T19:06:52Zservicebustestkv3s7h2dmwTopicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:30Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:23:29Z2021-10-21T05:23:29ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:52.963Z2021-09-28T19:06:52.99Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:29.247Z2021-10-21T05:23:29.32Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:53 GMT + date: Thu, 21 Oct 2021 05:23:29 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -137,23 +137,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:54Zhttps://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:06:52Z2021-09-28T19:06:52Zservicebustestkv3s7h2dmwTopicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:30Zhttps://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:23:29Z2021-10-21T05:23:29ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:52.963Z2021-09-28T19:06:52.99Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:29.247Z2021-10-21T05:23:29.32Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:54 GMT + date: Thu, 21 Oct 2021 05:23:29 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: null headers: @@ -168,14 +168,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:54 GMT - etag: '637684528129900000' + date: Thu, 21 Oct 2021 05:23:30 GMT + etag: '637703906093200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/test_topic?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/test_topic?api-version=2021-05 - request: body: null headers: @@ -187,15 +187,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:55Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:31Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:55 GMT + date: Thu, 21 Oct 2021 05:23:30 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_premium_create_with_topic_description.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_premium_create_with_topic_description.yaml index c9c28282e18d..2cb526759fca 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_premium_create_with_topic_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_premium_create_with_topic_description.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestv73qvndifp.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:56Z + string: Topicshttps://servicebustestruiyxx3yqv.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:32Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:56 GMT + date: Thu, 21 Oct 2021 05:23:31 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-09-28T19:06:56Z2021-09-28T19:06:56Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-10-21T05:23:32Z2021-10-21T05:23:32Zservicebustestruiyxx3yqvPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:56.553Z2021-09-28T19:06:56.783ZtruePT10MfalseAvailablefalsefalse12345 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:23:32.557Z2021-10-21T05:23:32.91ZtruePT10MfalseAvailablefalsefalse12345 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:57 GMT + date: Thu, 21 Oct 2021 05:23:33 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestv73qvndifp.servicebus.windows.net/iweidk?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/iweidk?api-version=2021-05 - request: body: null headers: @@ -65,23 +65,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-09-28T19:06:56Z2021-09-28T19:06:56Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-10-21T05:23:32Z2021-10-21T05:23:32Zservicebustestruiyxx3yqvPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:56.553Z2021-09-28T19:06:56.783Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:23:32.557Z2021-10-21T05:23:32.91Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsefalse12345 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:57 GMT - etag: '637684528167830000' + date: Thu, 21 Oct 2021 05:23:33 GMT + etag: '637703906129100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 - request: body: ' @@ -100,21 +100,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkozq?api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/dkozq?api-version=2021-05dkozq2021-09-28T19:06:57Z2021-09-28T19:06:57Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/dkozq?api-version=2021-05dkozq2021-10-21T05:23:33Z2021-10-21T05:23:33Zservicebustestruiyxx3yqvPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:57.727Z2021-09-28T19:06:57.793ZtruePT10MfalseAvailablefalsefalse1024 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:23:33.82Z2021-10-21T05:23:33.9ZtruePT10MfalseAvailablefalsefalse1024 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:57 GMT + date: Thu, 21 Oct 2021 05:23:34 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestv73qvndifp.servicebus.windows.net/dkozq?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/dkozq?api-version=2021-05 - request: body: null headers: @@ -126,23 +126,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05dkozq2021-09-28T19:06:57Z2021-09-28T19:06:57Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05dkozq2021-10-21T05:23:33Z2021-10-21T05:23:33Zservicebustestruiyxx3yqvPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:57.727Z2021-09-28T19:06:57.793Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:23:33.82Z2021-10-21T05:23:33.9Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsefalse1024 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:57 GMT - etag: '637684528177930000' + date: Thu, 21 Oct 2021 05:23:34 GMT + etag: '637703906139000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05 - request: body: ' @@ -167,18 +167,18 @@ interactions: Parameter name: MaxMessageSizeInKilobytes - Actual value was 1023. TrackingId:dd7069e5-124e-47fb-b76f-d5dcede657e5_G8, - SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-09-28T19:06:58' + Actual value was 1023. TrackingId:8471c1b8-0118-4f8e-8cc5-3bd3b516bc46_G5, + SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-10-21T05:23:34' headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:06:58 GMT + date: Thu, 21 Oct 2021 05:23:34 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustestv73qvndifp.servicebus.windows.net/rekocd?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/rekocd?api-version=2021-05 - request: body: ' @@ -203,25 +203,25 @@ interactions: Parameter name: MaxMessageSizeInKilobytes - Actual value was 102401. TrackingId:54ee2055-7b67-43b4-aa77-7fc276add8ca_G8, - SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-09-28T19:06:59' + Actual value was 102401. TrackingId:c777db06-7a95-4b19-8d89-ef4cb70f04f6_G5, + SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-10-21T05:23:35' headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:06:58 GMT + date: Thu, 21 Oct 2021 05:23:34 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustestv73qvndifp.servicebus.windows.net/rekocd?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/rekocd?api-version=2021-05 - request: body: ' PT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:57.727Z2021-09-28T19:06:57.793Z0001-01-01T00:00:00.000Ztrue000000PT10MfalseAvailablefalsefalse54321' + />Active2021-10-21T05:23:33.820Z2021-10-21T05:23:33.900Z0001-01-01T00:00:00.000Ztrue000000PT10MfalseAvailablefalsefalse54321' headers: Accept: - application/xml @@ -237,23 +237,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkozq?api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/dkozq?api-version=2021-05dkozq2021-09-28T19:06:59Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/dkozq?api-version=2021-05dkozq2021-10-21T05:23:35Zservicebustestruiyxx3yqvPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:57.727Z2021-09-28T19:06:57.793Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:23:33.82Z2021-10-21T05:23:33.9Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsefalse54321 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:58 GMT - etag: '637684528177930000' + date: Thu, 21 Oct 2021 05:23:34 GMT + etag: '637703906139000000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/dkozq?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/dkozq?api-version=2021-05 - request: body: null headers: @@ -265,23 +265,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestv73qvndifp.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05dkozq2021-09-28T19:06:57Z2021-09-28T19:06:59Zservicebustestv73qvndifphttps://servicebustestruiyxx3yqv.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05dkozq2021-10-21T05:23:33Z2021-10-21T05:23:35Zservicebustestruiyxx3yqvPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:57.727Z2021-09-28T19:06:59.257Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:23:33.82Z2021-10-21T05:23:35.06Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsefalse54321 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:06:58 GMT - etag: '637684528192570000' + date: Thu, 21 Oct 2021 05:23:35 GMT + etag: '637703906150600000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/dkozq?enrich=false&api-version=2021-05 - request: body: null headers: @@ -296,14 +296,14 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:59 GMT - etag: '637684528167830000' + date: Thu, 21 Oct 2021 05:23:35 GMT + etag: '637703906129100000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/iweidk?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/iweidk?api-version=2021-05 - request: body: null headers: @@ -318,12 +318,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:06:59 GMT - etag: '637684528192570000' + date: Thu, 21 Oct 2021 05:23:36 GMT + etag: '637703906150600000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestv73qvndifp.servicebus.windows.net/dkozq?api-version=2021-05 + url: https://servicebustestruiyxx3yqv.servicebus.windows.net/dkozq?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_update_invalid.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_update_invalid.yaml index 8862d8a47abb..a80435f50f89 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_update_invalid.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_update_invalid.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:07:01Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:36Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:00 GMT + date: Thu, 21 Oct 2021 05:23:36 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,27 +39,27 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjfj?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-09-28T19:07:01Z2021-09-28T19:07:01Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-10-21T05:23:37Z2021-10-21T05:23:37ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:07:01.443Z2021-09-28T19:07:01.487ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:37.24Z2021-10-21T05:23:37.283ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:01 GMT + date: Thu, 21 Oct 2021 05:23:37 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj?api-version=2021-05 - request: body: ' P10675199DT2H48M5.477539S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:07:01.443Z2021-09-28T19:07:01.487ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' + />Active2021-10-21T05:23:37.240Z2021-10-21T05:23:37.283ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' headers: Accept: - application/xml @@ -77,24 +77,24 @@ interactions: body: string: 404SubCode=40400. Not Found. The Operation doesn't exist. To know more visit https://aka.ms/sbResourceMgrExceptions. - . TrackingId:2cec81bb-45b1-4a7f-8459-a72ab514210d_G6, SystemTracker:servicebustestsbname.servicebus.windows.net:iewdm, - Timestamp:2021-09-28T19:07:02 + . TrackingId:45cb6027-7431-447e-b927-4307be9b5d0a_G1, SystemTracker:servicebustestsbname.servicebus.windows.net:iewdm, + Timestamp:2021-10-21T05:23:38 headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:07:02 GMT + date: Thu, 21 Oct 2021 05:23:38 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 404 message: Not Found - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/iewdm?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/iewdm?api-version=2021-05 - request: body: ' P10675199DT2H48M5.477539S1024falseP25Dtrue0falsefalseActive2021-09-28T19:07:01.443Z2021-09-28T19:07:01.487ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' + />Active2021-10-21T05:23:37.240Z2021-10-21T05:23:37.283ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' headers: Accept: - application/xml @@ -115,19 +115,19 @@ interactions: Parameter name: DuplicateDetectionHistoryTimeWindow - Actual value was 25.00:00:00. TrackingId:c46f60d9-13cd-4a98-b3c7-733d61f38a3c_G6, - SystemTracker:servicebustestsbname.servicebus.windows.net:dfjfj, Timestamp:2021-09-28T19:07:02' + Actual value was 25.00:00:00. TrackingId:5c5840cd-66fb-4a88-9212-a40625780ed2_G1, + SystemTracker:servicebustestsbname.servicebus.windows.net:dfjfj, Timestamp:2021-10-21T05:23:38' headers: content-type: application/xml; charset=utf-8 - date: Tue, 28 Sep 2021 19:07:02 GMT - etag: '637684528214870000' + date: Thu, 21 Oct 2021 05:23:38 GMT + etag: '637703906172830000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 400 message: Bad Request - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj?api-version=2021-05 - request: body: null headers: @@ -142,12 +142,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:07:02 GMT - etag: '637684528214870000' + date: Thu, 21 Oct 2021 05:23:38 GMT + etag: '637703906172830000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/dfjfj?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/dfjfj?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_update_success.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_update_success.yaml index 8f18cc40c1df..2a4f5a2ecbed 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_update_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_async_mgmt_topic_update_success.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:07:03Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:39Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:03 GMT + date: Thu, 21 Oct 2021 05:23:39 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,27 +39,27 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:07:04Z2021-09-28T19:07:04Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:23:39Z2021-10-21T05:23:39ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:04.43ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:39.833Z2021-10-21T05:23:39.86ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:04 GMT + date: Thu, 21 Oct 2021 05:23:40 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: ' PT2M1024falsePT10Mtrue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:04.430ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' + />Active2021-10-21T05:23:39.833Z2021-10-21T05:23:39.860ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' headers: Accept: - application/xml @@ -75,22 +75,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:07:04Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:23:40ZservicebustestkjdemkkogkPT2M1024falsePT10Mtrue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:04.43ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2M1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:39.833Z2021-10-21T05:23:39.86ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:04 GMT - etag: '637684528244300000' + date: Thu, 21 Oct 2021 05:23:40 GMT + etag: '637703906198600000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: null headers: @@ -102,30 +102,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:07:04Z2021-09-28T19:07:04Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:23:39Z2021-10-21T05:23:40ZservicebustestkjdemkkogkPT2M1024falsePT10Mtrue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:04.887Z0001-01-01T00:00:00ZtruePT2M1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:39.833Z2021-10-21T05:23:40.293Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.477539SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:04 GMT - etag: '637684528248870000' + date: Thu, 21 Oct 2021 05:23:40 GMT + etag: '637703906202930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 - request: body: ' PT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:04.887Z0001-01-01T00:00:00.000Ztrue000000PT10MfalseAvailablefalsetrue256' + />Active2021-10-21T05:23:39.833Z2021-10-21T05:23:40.293Z0001-01-01T00:00:00.000Ztrue000000PT10MfalseAvailablefalsetrue256' headers: Accept: - application/xml @@ -141,23 +141,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:07:05Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:23:40ZservicebustestkjdemkkogkPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:04.887Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:23:39.833Z2021-10-21T05:23:40.293Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsetrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:04 GMT - etag: '637684528248870000' + date: Thu, 21 Oct 2021 05:23:40 GMT + etag: '637703906202930000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: null headers: @@ -169,30 +169,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:07:04Z2021-09-28T19:07:05Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:23:39Z2021-10-21T05:23:40ZservicebustestkjdemkkogkPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:05.133Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:23:39.833Z2021-10-21T05:23:40.52Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsetrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:04 GMT - etag: '637684528251330000' + date: Thu, 21 Oct 2021 05:23:40 GMT + etag: '637703906205200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 - request: body: ' PT11M2S3072falsePT12M3Strue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:05.133Z0001-01-01T00:00:00.000Ztrue000000PT10M1SfalseAvailablefalsetrue256' + />Active2021-10-21T05:23:39.833Z2021-10-21T05:23:40.520Z0001-01-01T00:00:00.000Ztrue000000PT10M1SfalseAvailablefalsetrue256' headers: Accept: - application/xml @@ -208,23 +208,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:07:05Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:23:40ZservicebustestkjdemkkogkPT11M2S3072falsePT12M3Strue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:05.133Z0001-01-01T00:00:00ZtruePT11M2S3072falsePT12M3Strue0falsefalseActive2021-10-21T05:23:39.833Z2021-10-21T05:23:40.52Z0001-01-01T00:00:00Ztrue000000PT10M1SfalseAvailablefalsetrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:04 GMT - etag: '637684528251330000' + date: Thu, 21 Oct 2021 05:23:40 GMT + etag: '637703906205200000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: null headers: @@ -236,30 +236,30 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:07:04Z2021-09-28T19:07:05Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:23:39Z2021-10-21T05:23:40ZservicebustestkjdemkkogkPT11M2S3072falsePT12M3Strue0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:05.363Z0001-01-01T00:00:00ZtruePT11M2S3072falsePT12M3Strue0falsefalseActive2021-10-21T05:23:39.833Z2021-10-21T05:23:40.737Z0001-01-01T00:00:00Ztrue000000PT10M1SfalseAvailablefalsetrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:04 GMT - etag: '637684528253630000' + date: Thu, 21 Oct 2021 05:23:40 GMT + etag: '637703906207370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 - request: body: ' PT15M2048falsePT16Mfalse0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:05.363Z0001-01-01T00:00:00.000Zfalse000000PT14MfalseAvailablefalsefalse256' + />Active2021-10-21T05:23:39.833Z2021-10-21T05:23:40.737Z0001-01-01T00:00:00.000Zfalse000000PT14MfalseAvailablefalsefalse256' headers: Accept: - application/xml @@ -275,23 +275,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:07:05Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:23:40ZservicebustestkjdemkkogkPT15M2048falsePT16Mfalse0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:05.363Z0001-01-01T00:00:00ZfalsePT15M2048falsePT16Mfalse0falsefalseActive2021-10-21T05:23:39.833Z2021-10-21T05:23:40.737Z0001-01-01T00:00:00Zfalse000000PT14MfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:04 GMT - etag: '637684528253630000' + date: Thu, 21 Oct 2021 05:23:40 GMT + etag: '637703906207370000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 - request: body: null headers: @@ -303,23 +303,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:07:04Z2021-09-28T19:07:05Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:23:39Z2021-10-21T05:23:40ZservicebustestkjdemkkogkPT15M2048falsePT16Mfalse0falsefalseActive2021-09-28T19:07:04.357Z2021-09-28T19:07:05.58Z0001-01-01T00:00:00ZfalsePT15M2048falsePT16Mfalse0falsefalseActive2021-10-21T05:23:39.833Z2021-10-21T05:23:40.95Z0001-01-01T00:00:00Zfalse000000PT14MfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:04 GMT - etag: '637684528255800000' + date: Thu, 21 Oct 2021 05:23:41 GMT + etag: '637703906209500000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 - request: body: null headers: @@ -334,12 +334,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:07:05 GMT - etag: '637684528255800000' + date: Thu, 21 Oct 2021 05:23:41 GMT + etag: '637703906209500000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjrui?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjrui?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_mgmt_topic_async_update_dict_error.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_mgmt_topic_async_update_dict_error.yaml index 1f5a861a042c..eae709363332 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_mgmt_topic_async_update_dict_error.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_mgmt_topic_async_update_dict_error.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:07:06Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:42Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:06 GMT + date: Thu, 21 Oct 2021 05:23:41 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:07:07Z2021-09-28T19:07:07Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:23:42Z2021-10-21T05:23:42ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:07:07.307Z2021-09-28T19:07:07.343ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:42.51Z2021-10-21T05:23:42.603ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:07 GMT + date: Thu, 21 Oct 2021 05:23:42 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: null headers: @@ -68,12 +68,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:07:07 GMT - etag: '637684528273430000' + date: Thu, 21 Oct 2021 05:23:42 GMT + etag: '637703906226030000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_mgmt_topic_async_update_dict_success.yaml b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_mgmt_topic_async_update_dict_success.yaml index ac61acb8d8ab..b535762b9c27 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_mgmt_topic_async_update_dict_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/recordings/test_mgmt_topics_async.test_mgmt_topic_async_update_dict_success.yaml @@ -10,17 +10,17 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:07:08Z + string: Topicshttps://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:23:43Z headers: content-type: application/atom+xml;type=feed;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:07 GMT + date: Thu, 21 Oct 2021 05:23:43 GMT server: Microsoft-HTTPAPI/2.0 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 - request: body: ' @@ -39,21 +39,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:07:09Z2021-09-28T19:07:09Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:23:44Z2021-10-21T05:23:44ZservicebustestkjdemkkogkP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:07:09.117Z2021-09-28T19:07:09.18ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:44.417Z2021-10-21T05:23:44.48ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:08 GMT + date: Thu, 21 Oct 2021 05:23:44 GMT server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 201 message: Created - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: ' @@ -75,22 +75,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:07:09Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:23:45ZservicebustestkjdemkkogkPT2M1024falsePT10Mtrue0ActivetrueP10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:08 GMT - etag: '637684528291800000' + date: Thu, 21 Oct 2021 05:23:44 GMT + etag: '637703906244800000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: null headers: @@ -102,23 +102,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:07:09Z2021-09-28T19:07:09Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:23:44Z2021-10-21T05:23:44ZservicebustestkjdemkkogkPT2M1024falsePT10Mtrue0falsefalseActive2021-09-28T19:07:09.117Z2021-09-28T19:07:09.67Z0001-01-01T00:00:00ZtruePT2M1024falsePT10Mtrue0falsefalseActive2021-10-21T05:23:44.417Z2021-10-21T05:23:44.99Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.477539SfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:08 GMT - etag: '637684528296700000' + date: Thu, 21 Oct 2021 05:23:44 GMT + etag: '637703906249900000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 - request: body: ' @@ -140,22 +140,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:07:09Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:23:45ZservicebustestkjdemkkogkPT11M3072falsePT12Mtrue0ActivetruePT10MfalseAvailabletrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:08 GMT - etag: '637684528296700000' + date: Thu, 21 Oct 2021 05:23:44 GMT + etag: '637703906249900000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: null headers: @@ -167,23 +167,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:07:09Z2021-09-28T19:07:09Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:23:44Z2021-10-21T05:23:45ZservicebustestkjdemkkogkPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:07:09.117Z2021-09-28T19:07:09.81Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:23:44.417Z2021-10-21T05:23:45.13Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsetrue256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:09 GMT - etag: '637684528298100000' + date: Thu, 21 Oct 2021 05:23:44 GMT + etag: '637703906251300000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 - request: body: ' @@ -205,22 +205,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:07:10Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:23:45ZservicebustestkjdemkkogkPT15M2048falsePT16Mfalse0ActivefalsePT14MfalseAvailablefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:09 GMT - etag: '637684528298100000' + date: Thu, 21 Oct 2021 05:23:44 GMT + etag: '637703906251300000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 - request: body: null headers: @@ -232,23 +232,23 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:07:09Z2021-09-28T19:07:10Zservicebustestkv3s7h2dmwhttps://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:23:44Z2021-10-21T05:23:45ZservicebustestkjdemkkogkPT15M2048falsePT16Mfalse0falsefalseActive2021-09-28T19:07:09.117Z2021-09-28T19:07:10.053Z0001-01-01T00:00:00ZfalsePT15M2048falsePT16Mfalse0falsefalseActive2021-10-21T05:23:44.417Z2021-10-21T05:23:45.34Z0001-01-01T00:00:00Zfalse000000PT14MfalseAvailablefalsefalse256 headers: content-type: application/atom+xml;type=entry;charset=utf-8 - date: Tue, 28 Sep 2021 19:07:09 GMT - etag: '637684528300530000' + date: Thu, 21 Oct 2021 05:23:44 GMT + etag: '637703906253400000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 transfer-encoding: chunked status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 - request: body: null headers: @@ -263,12 +263,12 @@ interactions: string: '' headers: content-length: '0' - date: Tue, 28 Sep 2021 19:07:09 GMT - etag: '637684528300530000' + date: Thu, 21 Oct 2021 05:23:45 GMT + etag: '637703906253400000' server: Microsoft-HTTPAPI/2.0 strict-transport-security: max-age=31536000 status: code: 200 message: OK - url: https://servicebustestkv3s7h2dmw.servicebus.windows.net/fjruid?api-version=2021-05 + url: https://servicebustestkjdemkkogk.servicebus.windows.net/fjruid?api-version=2021-05 version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/test_mgmt_queues_async.py b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/test_mgmt_queues_async.py index 8454af260a11..f9dadf2a53be 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/test_mgmt_queues_async.py +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/test_mgmt_queues_async.py @@ -9,6 +9,7 @@ import msrest from azure.core.exceptions import HttpResponseError, ResourceNotFoundError, ResourceExistsError from azure.servicebus.aio.management import ServiceBusAdministrationClient +from azure.servicebus.management import ApiVersion from azure.servicebus.management import QueueProperties from azure.servicebus.aio._base_handler_async import ServiceBusSharedKeyCredential from azure.servicebus._common.utils import utc_now @@ -759,3 +760,41 @@ async def test_mgmt_queue_async_update_dict_error(self, servicebus_namespace_con await mgmt_service.update_queue(queue_description_only_name) finally: await mgmt_service.delete_queue(queue_name) + + @CachedResourceGroupPreparer(name_prefix='servicebustest') + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + async def test_async_mgmt_queue_basic_v2017_04(self, servicebus_namespace_connection_string, + servicebus_namespace, servicebus_namespace_key_name, + servicebus_namespace_primary_key): + mgmt_service = ServiceBusAdministrationClient.from_connection_string(servicebus_namespace_connection_string, api_version=ApiVersion.V2017_04) + await clear_queues(mgmt_service) + + await mgmt_service.create_queue("test_queue") + queues = await async_pageable_to_list(mgmt_service.list_queues()) + assert len(queues) == 1 and queues[0].name == "test_queue" + queue = await mgmt_service.get_queue("test_queue") + assert queue.name == "test_queue" + await mgmt_service.delete_queue("test_queue") + queues = await async_pageable_to_list(mgmt_service.list_queues()) + assert len(queues) == 0 + + with pytest.raises(HttpResponseError): + await mgmt_service.create_queue("queue_can_not_be_created", max_message_size_in_kilobytes=1024) + + fully_qualified_namespace = servicebus_namespace.name + '.servicebus.windows.net' + mgmt_service = ServiceBusAdministrationClient( + fully_qualified_namespace, + credential=ServiceBusSharedKeyCredential(servicebus_namespace_key_name, servicebus_namespace_primary_key), + api_version=ApiVersion.V2017_04 + ) + await mgmt_service.create_queue("test_queue") + queues = await async_pageable_to_list(mgmt_service.list_queues()) + assert len(queues) == 1 and queues[0].name == "test_queue" + queue = await mgmt_service.get_queue("test_queue") + assert queue.name == "test_queue" + await mgmt_service.delete_queue("test_queue") + queues = await async_pageable_to_list(mgmt_service.list_queues()) + assert len(queues) == 0 + + with pytest.raises(HttpResponseError): + await mgmt_service.create_queue("queue_can_not_be_created", max_message_size_in_kilobytes=1024) diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/test_mgmt_topics_async.py b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/test_mgmt_topics_async.py index dbb9dc9d9800..60746935fbc4 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/test_mgmt_topics_async.py +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/mgmt_tests/test_mgmt_topics_async.py @@ -10,6 +10,8 @@ import msrest from azure.servicebus.aio.management import ServiceBusAdministrationClient from azure.servicebus.management import TopicProperties +from azure.servicebus.aio._base_handler_async import ServiceBusSharedKeyCredential +from azure.servicebus.management import ApiVersion from utilities import get_logger from azure.core.exceptions import HttpResponseError, ResourceExistsError @@ -473,3 +475,41 @@ async def test_mgmt_topic_async_update_dict_error(self, servicebus_namespace_con await mgmt_service.update_topic(topic_description_only_name) finally: await mgmt_service.delete_topic(topic_name) + + @CachedResourceGroupPreparer(name_prefix='servicebustest') + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + async def test_async_mgmt_topic_basic_v2017_04(self, servicebus_namespace_connection_string, servicebus_namespace, + servicebus_namespace_key_name, servicebus_namespace_primary_key): + mgmt_service = ServiceBusAdministrationClient.from_connection_string(servicebus_namespace_connection_string, api_version=ApiVersion.V2017_04) + await clear_topics(mgmt_service) + + await mgmt_service.create_topic("test_topic") + topics = await async_pageable_to_list(mgmt_service.list_topics()) + assert len(topics) == 1 and topics[0].name == "test_topic" + topic = await mgmt_service.get_topic("test_topic") + assert topic.name == "test_topic" + await mgmt_service.delete_topic("test_topic") + topics = await async_pageable_to_list(mgmt_service.list_topics()) + assert len(topics) == 0 + + with pytest.raises(HttpResponseError): + await mgmt_service.create_topic("topic_can_not_be_created", max_message_size_in_kilobytes=1024) + + fully_qualified_namespace = servicebus_namespace.name + '.servicebus.windows.net' + mgmt_service = ServiceBusAdministrationClient( + fully_qualified_namespace, + credential=ServiceBusSharedKeyCredential(servicebus_namespace_key_name, servicebus_namespace_primary_key), + api_version=ApiVersion.V2017_04 + ) + + await mgmt_service.create_topic("test_topic") + topics = await async_pageable_to_list(mgmt_service.list_topics()) + assert len(topics) == 1 and topics[0].name == "test_topic" + topic = await mgmt_service.get_topic("test_topic") + assert topic.name == "test_topic" + await mgmt_service.delete_topic("test_topic") + topics = await async_pageable_to_list(mgmt_service.list_topics()) + assert len(topics) == 0 + + with pytest.raises(HttpResponseError): + await mgmt_service.create_topic("topic_can_not_be_created", max_message_size_in_kilobytes=1024) diff --git a/sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py b/sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py index 32ca5ff3ab2d..d63be9ec3ff7 100644 --- a/sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py +++ b/sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py @@ -78,6 +78,27 @@ async def test_async_session_by_session_client_conn_str_receive_handler_peeklock assert count == 3 + session_id = "" + async with sb_client.get_queue_sender(servicebus_queue.name) as sender: + for i in range(3): + message = ServiceBusMessage("Handler message no. {}".format(i), session_id=session_id) + await sender.send_messages(message) + + with pytest.raises(ServiceBusError): + await sb_client.get_queue_receiver(servicebus_queue.name, max_wait_time=5)._open_with_retry() + + receiver = sb_client.get_queue_receiver(servicebus_queue.name, session_id=session_id, max_wait_time=5) + count = 0 + async for message in receiver: + print_message(_logger, message) + assert message.session_id == session_id + count += 1 + await receiver.complete_message(message) + + await receiver.close() + + assert count == 3 + @pytest.mark.liveTest @pytest.mark.live_test_only @CachedResourceGroupPreparer(name_prefix='servicebustest') diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_namespaces.test_mgmt_namespace_get_properties.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_namespaces.test_mgmt_namespace_get_properties.yaml index 3bf71da2ce89..7edf03ce4ce0 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_namespaces.test_mgmt_namespace_get_properties.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_namespaces.test_mgmt_namespace_get_properties.yaml @@ -14,16 +14,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$namespaceinfo?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/$namespaceinfo?api-version=2021-05servicebustestappwyrpk4k2021-09-28T19:01:40Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/$namespaceinfo?api-version=2021-05servicebustestaweyco6xnr2021-10-21T05:18:27Zservicebustestaweyco6xnr2021-09-28T19:00:40.38ZStandard2021-09-28T19:00:40.38Zservicebustestappwyrpk4kMessaging + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">2021-10-21T05:17:26.17ZStandard2021-10-21T05:17:26.17Zservicebustestaweyco6xnrMessaging headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:39 GMT + - Thu, 21 Oct 2021 05:18:26 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_basic_v2017_04.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_basic_v2017_04.yaml new file mode 100644 index 000000000000..6da2952bff78 --- /dev/null +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_basic_v2017_04.yaml @@ -0,0 +1,461 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:18:27Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:27 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: https://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T05:18:28Z2021-10-21T05:18:28Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:28.453Z2021-10-21T05:18:28.53ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:28 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:18:29Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T05:18:28Z2021-10-21T05:18:28Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:28.453Z2021-10-21T05:18:28.53Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:29 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04test_queue2021-10-21T05:18:28Z2021-10-21T05:18:28Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:28.453Z2021-10-21T05:18:28.53Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:29 GMT + etag: + - '637703903085300000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 21 Oct 2021 05:18:29 GMT + etag: + - '637703903085300000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:18:30Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:30 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/queue_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'QueueDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:77a37da6-f0fc-4b15-81e8-143311a7c686_G13, SystemTracker:servicebustestsbname.servicebus.windows.net:queue_can_not_be_created, + Timestamp:2021-10-21T05:18:30 + headers: + content-type: + - application/xml; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:30 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 400 + message: Bad Request +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: https://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T05:18:31Z2021-10-21T05:18:31Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:31.143Z2021-10-21T05:18:31.243ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:31 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:18:32Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T05:18:31Z2021-10-21T05:18:31Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:31.143Z2021-10-21T05:18:31.243Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:31 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?enrich=false&api-version=2017-04test_queue2021-10-21T05:18:31Z2021-10-21T05:18:31Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:31.143Z2021-10-21T05:18:31.243Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:31 GMT + etag: + - '637703903112430000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 21 Oct 2021 05:18:32 GMT + etag: + - '637703903112430000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T05:18:33Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:33 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/queue_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'QueueDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:25b5b240-7117-4e4b-aed3-f43512a502b1_G9, SystemTracker:NoSystemTracker, + Timestamp:2021-10-21T05:18:33 + headers: + content-type: + - application/xml; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:18:33 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 400 + message: Bad Request +version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_by_name.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_by_name.yaml index d4f9815139af..62130caf6d09 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_by_name.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_by_name.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:01:41Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:34Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:40 GMT + - Thu, 21 Oct 2021 05:18:33 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue_testaddf?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue_testaddf?api-version=2021-05queue_testaddf2021-09-28T19:01:41Z2021-09-28T19:01:41Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue_testaddf?api-version=2021-05queue_testaddf2021-10-21T05:18:34Z2021-10-21T05:18:34Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:41.66Z2021-09-28T19:01:41.687ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:34.68Z2021-10-21T05:18:34.737ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:41 GMT + - Thu, 21 Oct 2021 05:18:34 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,19 +84,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue_testaddf?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue_testaddf?enrich=false&api-version=2021-05queue_testaddf2021-09-28T19:01:41Z2021-09-28T19:01:41Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue_testaddf?enrich=false&api-version=2021-05queue_testaddf2021-10-21T05:18:34Z2021-10-21T05:18:34Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:41.66Z2021-09-28T19:01:41.687Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:34.68Z2021-10-21T05:18:34.737Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:41 GMT + - Thu, 21 Oct 2021 05:18:34 GMT etag: - - '637684525016870000' + - '637703903147370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -128,9 +128,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:01:42 GMT + - Thu, 21 Oct 2021 05:18:35 GMT etag: - - '637684525016870000' + - '637703903147370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_duplicate.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_duplicate.yaml index 443bfaa0c558..95702c7b6256 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_duplicate.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_duplicate.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:01:43Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:36Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:42 GMT + - Thu, 21 Oct 2021 05:18:36 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/rtofdk?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/rtofdk?api-version=2021-05rtofdk2021-09-28T19:01:43Z2021-09-28T19:01:43Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/rtofdk?api-version=2021-05rtofdk2021-10-21T05:18:36Z2021-10-21T05:18:36Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:43.707Z2021-09-28T19:01:43.743ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:36.647Z2021-10-21T05:18:36.74ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:43 GMT + - Thu, 21 Oct 2021 05:18:37 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -93,15 +93,15 @@ interactions: body: string: 409SubCode=40900. Conflict. You're requesting an operation that isn't allowed in the resource's current state. To know more - visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:6852ecba-9594-4c27-8933-0f6076cd6840_G8, - SystemTracker:servicebustestsbname.servicebus.windows.net:rtofdk, Timestamp:2021-09-28T19:01:44 + visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:338776e0-c75c-4e6b-aada-b0404f52333c_G8, + SystemTracker:servicebustestsbname.servicebus.windows.net:rtofdk, Timestamp:2021-10-21T05:18:37 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:43 GMT + - Thu, 21 Oct 2021 05:18:37 GMT etag: - - '637684525037430000' + - '637703903167400000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -133,9 +133,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:01:44 GMT + - Thu, 21 Oct 2021 05:18:37 GMT etag: - - '637684525037430000' + - '637703903167400000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_with_queue_description.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_with_queue_description.yaml index d0b11a079c91..62852124543d 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_with_queue_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_create_with_queue_description.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestkxdmegmltc.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T22:19:03Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:38Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 22:19:03 GMT + - Thu, 21 Oct 2021 05:18:37 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/aghadh?api-version=2021-05 response: body: - string: https://servicebustestkxdmegmltc.servicebus.windows.net/aghadh?api-version=2021-05aghadh2021-09-28T22:19:03Z2021-09-28T22:19:03Zservicebustestkxdmegmltchttps://servicebustestaweyco6xnr.servicebus.windows.net/aghadh?api-version=2021-05aghadh2021-10-21T05:18:38Z2021-10-21T05:18:38Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T22:19:03.93Z2021-09-28T22:19:03.96ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:18:38.873Z2021-10-21T05:18:38.973ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 22:19:03 GMT + - Thu, 21 Oct 2021 05:18:38 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -73,7 +73,7 @@ interactions: body: ' PT13S3072truePT11MtruePT12M14truePT10Mtruetruesb://servicebustestkxdmegmltc.servicebus.windows.net/aghadhsb://servicebustestkxdmegmltc.servicebus.windows.net/aghadh' + type="application/xml">PT13S3072truePT11MtruePT12M14truePT10Mtruetruesb://servicebustestaweyco6xnr.servicebus.windows.net/aghadhsb://servicebustestaweyco6xnr.servicebus.windows.net/aghadh' headers: Accept: - application/xml @@ -86,25 +86,25 @@ interactions: Content-Type: - application/atom+xml ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkxdmegmltc.servicebus.windows.net%2Faghadh&sig=KBXPKuLIIoySgVB0wTSGT3%2b3unw8u9ba88HQPkX%2fEXc%3d&se=1632871144&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Faghadh&sig=mkz3I1UdkqTvjj30NGHWOlkw8DhKcnYdCcLcuRifILk%3d&se=1634797119&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkxdmegmltc.servicebus.windows.net%2Faghadh&sig=KBXPKuLIIoySgVB0wTSGT3%2b3unw8u9ba88HQPkX%2fEXc%3d&se=1632871144&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Faghadh&sig=mkz3I1UdkqTvjj30NGHWOlkw8DhKcnYdCcLcuRifILk%3d&se=1634797119&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/iweidk?api-version=2021-05 response: body: - string: https://servicebustestkxdmegmltc.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-09-28T22:19:04Z2021-09-28T22:19:04Zservicebustestkxdmegmltchttps://servicebustestaweyco6xnr.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-10-21T05:18:39Z2021-10-21T05:18:39Zservicebustestaweyco6xnrPT13S49152falsetruePT11MtruePT12M14true00falseActive2021-09-28T22:19:04.833Z2021-09-28T22:19:04.99ZfalsePT10MtrueAvailabletruesb://servicebustestkxdmegmltc.servicebus.windows.net/aghadhsb://servicebustestkxdmegmltc.servicebus.windows.net/aghadh256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S49152falsetruePT11MtruePT12M14true00falseActive2021-10-21T05:18:39.77Z2021-10-21T05:18:39.903ZfalsePT10MtrueAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/aghadhsb://servicebustestaweyco6xnr.servicebus.windows.net/aghadh256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 22:19:05 GMT + - Thu, 21 Oct 2021 05:18:39 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -118,7 +118,7 @@ interactions: body: ' PT13S3072truePT11M2StruePT12M3S14truePT10M1Struetruesb://servicebustestkxdmegmltc.servicebus.windows.net/aghadhsb://servicebustestkxdmegmltc.servicebus.windows.net/aghadh' + type="application/xml">PT13S3072truePT11M2StruePT12M3S14truePT10M1Struetruesb://servicebustestaweyco6xnr.servicebus.windows.net/aghadhsb://servicebustestaweyco6xnr.servicebus.windows.net/aghadh' headers: Accept: - application/xml @@ -131,25 +131,25 @@ interactions: Content-Type: - application/atom+xml ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkxdmegmltc.servicebus.windows.net%2Faghadh&sig=tCjQ5s5ZseN61DYd9WscGhYRw5dkXPju7DSiYYdInAE%3d&se=1632871145&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Faghadh&sig=agrNsE9UQNoYlw6LcQDD%2fPr69QxMoa7jykP3cya8b9Q%3d&se=1634797120&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestkxdmegmltc.servicebus.windows.net%2Faghadh&sig=tCjQ5s5ZseN61DYd9WscGhYRw5dkXPju7DSiYYdInAE%3d&se=1632871145&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Faghadh&sig=agrNsE9UQNoYlw6LcQDD%2fPr69QxMoa7jykP3cya8b9Q%3d&se=1634797120&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/vladsk?api-version=2021-05 response: body: - string: https://servicebustestkxdmegmltc.servicebus.windows.net/vladsk?api-version=2021-05vladsk2021-09-28T22:19:05Z2021-09-28T22:19:06Zservicebustestkxdmegmltchttps://servicebustestaweyco6xnr.servicebus.windows.net/vladsk?api-version=2021-05vladsk2021-10-21T05:18:40Z2021-10-21T05:18:40Zservicebustestaweyco6xnrPT13S49152falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T22:19:05.917Z2021-09-28T22:19:06.12ZfalsePT10M1StrueAvailabletruesb://servicebustestkxdmegmltc.servicebus.windows.net/aghadhsb://servicebustestkxdmegmltc.servicebus.windows.net/aghadh256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S49152falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:18:40.677Z2021-10-21T05:18:40.773ZfalsePT10M1StrueAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/aghadhsb://servicebustestaweyco6xnr.servicebus.windows.net/aghadh256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 22:19:06 GMT + - Thu, 21 Oct 2021 05:18:40 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -182,13 +182,13 @@ interactions: response: body: string: 400SubCode=40000. Bad Request. To know more - visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:8bebcfae-4fe3-4a2a-aa45-ec2943469609_G12, - SystemTracker:servicebustestsbname.servicebus.windows.net:famviq, Timestamp:2021-09-28T22:19:07 + visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:ab62a566-3a94-4505-be11-6d4aecb1e492_G5, + SystemTracker:servicebustestsbname.servicebus.windows.net:famviq, Timestamp:2021-10-21T05:18:41 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 22:19:06 GMT + - Thu, 21 Oct 2021 05:18:40 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -213,19 +213,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkxdmegmltc.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-09-28T22:19:04Z2021-09-28T22:19:04Zservicebustestkxdmegmltchttps://servicebustestaweyco6xnr.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-10-21T05:18:39Z2021-10-21T05:18:39Zservicebustestaweyco6xnrPT13S49152falsetruePT11MtruePT12M14true00falseActive2021-09-28T22:19:04.833Z2021-09-28T22:19:04.99Z0001-01-01T00:00:00Zfalse00000PT10MtrueAvailabletruesb://servicebustestkxdmegmltc.servicebus.windows.net/aghadhsb://servicebustestkxdmegmltc.servicebus.windows.net/aghadh256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S49152falsetruePT11MtruePT12M14true00falseActive2021-10-21T05:18:39.77Z2021-10-21T05:18:39.903Z0001-01-01T00:00:00Zfalse00000PT10MtrueAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/aghadhsb://servicebustestaweyco6xnr.servicebus.windows.net/aghadh256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 22:19:06 GMT + - Thu, 21 Oct 2021 05:18:40 GMT etag: - - '637684643449900000' + - '637703903199030000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -250,19 +250,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/vladsk?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestkxdmegmltc.servicebus.windows.net/vladsk?enrich=false&api-version=2021-05vladsk2021-09-28T22:19:05Z2021-09-28T22:19:06Zservicebustestkxdmegmltchttps://servicebustestaweyco6xnr.servicebus.windows.net/vladsk?enrich=false&api-version=2021-05vladsk2021-10-21T05:18:40Z2021-10-21T05:18:40Zservicebustestaweyco6xnrPT13S49152falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T22:19:05.917Z2021-09-28T22:19:06.12Z0001-01-01T00:00:00Zfalse00000PT10M1StrueAvailabletruesb://servicebustestkxdmegmltc.servicebus.windows.net/aghadhsb://servicebustestkxdmegmltc.servicebus.windows.net/aghadh256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S49152falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:18:40.677Z2021-10-21T05:18:40.773Z0001-01-01T00:00:00Zfalse00000PT10M1StrueAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/aghadhsb://servicebustestaweyco6xnr.servicebus.windows.net/aghadh256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 22:19:06 GMT + - Thu, 21 Oct 2021 05:18:41 GMT etag: - - '637684643461200000' + - '637703903207730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -294,9 +294,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 22:19:07 GMT + - Thu, 21 Oct 2021 05:18:41 GMT etag: - - '637684643449900000' + - '637703903199030000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -326,9 +326,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 22:19:07 GMT + - Thu, 21 Oct 2021 05:18:42 GMT etag: - - '637684643461200000' + - '637703903207730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -358,9 +358,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 22:19:08 GMT + - Thu, 21 Oct 2021 05:18:42 GMT etag: - - '637684643439600000' + - '637703903189730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_basic.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_basic.yaml index ba7231b33700..3c4e4960445e 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_basic.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:01:53Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:43Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:53 GMT + - Thu, 21 Oct 2021 05:18:43 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:01:53Z2021-09-28T19:01:53Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:18:44Z2021-10-21T05:18:44Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:53.813Z2021-09-28T19:01:53.877ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:44.36Z2021-10-21T05:18:44.407ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:54 GMT + - Thu, 21 Oct 2021 05:18:44 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,19 +84,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:01:54Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:01:53Z2021-09-28T19:01:53Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:45Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:18:44Z2021-10-21T05:18:44Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:53.813Z2021-09-28T19:01:53.877Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:44.36Z2021-10-21T05:18:44.407Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:54 GMT + - Thu, 21 Oct 2021 05:18:44 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -126,16 +126,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:01:55Z2021-09-28T19:01:55Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:18:45Z2021-10-21T05:18:45Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:55.24Z2021-09-28T19:01:55.287ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:45.7Z2021-10-21T05:18:45.757ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:55 GMT + - Thu, 21 Oct 2021 05:18:45 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -160,25 +160,25 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:01:56Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:01:53Z2021-09-28T19:01:53Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:46Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:18:44Z2021-10-21T05:18:44Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:53.813Z2021-09-28T19:01:53.877Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:44.36Z2021-10-21T05:18:44.407Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:01:55Z2021-09-28T19:01:55Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:18:45Z2021-10-21T05:18:45Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:55.24Z2021-09-28T19:01:55.287Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:45.7Z2021-10-21T05:18:45.757Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:55 GMT + - Thu, 21 Oct 2021 05:18:46 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -208,9 +208,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:01:56 GMT + - Thu, 21 Oct 2021 05:18:46 GMT etag: - - '637684525138770000' + - '637703903244070000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -233,19 +233,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:01:57Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:01:55Z2021-09-28T19:01:55Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:47Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:18:45Z2021-10-21T05:18:45Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:55.24Z2021-09-28T19:01:55.287Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:45.7Z2021-10-21T05:18:45.757Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:56 GMT + - Thu, 21 Oct 2021 05:18:47 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -275,9 +275,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:01:57 GMT + - Thu, 21 Oct 2021 05:18:47 GMT etag: - - '637684525152870000' + - '637703903257570000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -300,13 +300,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:01:57Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:48Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:57 GMT + - Thu, 21 Oct 2021 05:18:48 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_negtive.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_negtive.yaml index f0a8cf51223e..d569cbd1834a 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_negtive.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_negtive.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:01:58Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:48Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:58 GMT + - Thu, 21 Oct 2021 05:18:48 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:01:58Z2021-09-28T19:01:59Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:18:49Z2021-10-21T05:18:49Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:58.997Z2021-09-28T19:01:59.04ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:49.353Z2021-10-21T05:18:49.417ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:59 GMT + - Thu, 21 Oct 2021 05:18:49 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,19 +84,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:01:59Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:01:58Z2021-09-28T19:01:59Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:50Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:18:49Z2021-10-21T05:18:49Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:01:58.997Z2021-09-28T19:01:59.04Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:49.353Z2021-10-21T05:18:49.417Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:01:59 GMT + - Thu, 21 Oct 2021 05:18:49 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -126,9 +126,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:00 GMT + - Thu, 21 Oct 2021 05:18:50 GMT etag: - - '637684525190400000' + - '637703903294170000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -151,13 +151,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:00Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:51Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:00 GMT + - Thu, 21 Oct 2021 05:18:50 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -183,13 +183,13 @@ interactions: response: body: string: 404No service is hosted at the specified - address. TrackingId:a6090849-377f-4468-b9b5-094e825fbba8_G9, SystemTracker:servicebustestsbname.servicebus.windows.net:test_queue, - Timestamp:2021-09-28T19:02:01 + address. TrackingId:807a992f-4178-4b05-b833-fb5aac0a3b23_G6, SystemTracker:servicebustestsbname.servicebus.windows.net:test_queue, + Timestamp:2021-10-21T05:18:51 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:01 GMT + - Thu, 21 Oct 2021 05:18:51 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -217,13 +217,13 @@ interactions: response: body: string: 404No service is hosted at the specified - address. TrackingId:7f8cebfa-298b-4288-9ada-81cd2b609e68_G9, SystemTracker:servicebustestsbname.servicebus.windows.net:non_existing_queue, - Timestamp:2021-09-28T19:02:01 + address. TrackingId:6c3160e7-087b-4a14-a820-22e9c61c5a49_G6, SystemTracker:servicebustestsbname.servicebus.windows.net:non_existing_queue, + Timestamp:2021-10-21T05:18:52 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:01 GMT + - Thu, 21 Oct 2021 05:18:51 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_one_and_check_not_existing.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_one_and_check_not_existing.yaml index a22dc1c97d1b..cf081686d3f0 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_one_and_check_not_existing.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_delete_one_and_check_not_existing.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:02Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:18:52Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:02 GMT + - Thu, 21 Oct 2021 05:18:51 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue0?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue0?api-version=2021-05queue02021-09-28T19:02:02Z2021-09-28T19:02:02Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue0?api-version=2021-05queue02021-10-21T05:18:52Z2021-10-21T05:18:52Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:02.72Z2021-09-28T19:02:02.977ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:52.847Z2021-10-21T05:18:52.87ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:03 GMT + - Thu, 21 Oct 2021 05:18:52 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,16 +91,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue1?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue1?api-version=2021-05queue12021-09-28T19:02:03Z2021-09-28T19:02:03Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue1?api-version=2021-05queue12021-10-21T05:18:53Z2021-10-21T05:18:53Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:03.907Z2021-09-28T19:02:03.997ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:53.827Z2021-10-21T05:18:53.86ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:04 GMT + - Thu, 21 Oct 2021 05:18:53 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -132,16 +132,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue2?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue2?api-version=2021-05queue22021-09-28T19:02:04Z2021-09-28T19:02:05Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue2?api-version=2021-05queue22021-10-21T05:18:54Z2021-10-21T05:18:54Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:04.817Z2021-09-28T19:02:05.01ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:54.8Z2021-10-21T05:18:54.86ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:05 GMT + - Thu, 21 Oct 2021 05:18:54 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -173,16 +173,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue3?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue3?api-version=2021-05queue32021-09-28T19:02:05Z2021-09-28T19:02:05Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue3?api-version=2021-05queue32021-10-21T05:18:55Z2021-10-21T05:18:55Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:05.91Z2021-09-28T19:02:05.953ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:55.78Z2021-10-21T05:18:55.83ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:06 GMT + - Thu, 21 Oct 2021 05:18:55 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -214,16 +214,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue4?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue4?api-version=2021-05queue42021-09-28T19:02:06Z2021-09-28T19:02:06Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue4?api-version=2021-05queue42021-10-21T05:18:56Z2021-10-21T05:18:56Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:06.717Z2021-09-28T19:02:06.747ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:56.757Z2021-10-21T05:18:56.79ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:07 GMT + - Thu, 21 Oct 2021 05:18:56 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -255,16 +255,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue5?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue5?api-version=2021-05queue52021-09-28T19:02:07Z2021-09-28T19:02:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue5?api-version=2021-05queue52021-10-21T05:18:57Z2021-10-21T05:18:57Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:07.65Z2021-09-28T19:02:07.687ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:57.69Z2021-10-21T05:18:57.83ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:08 GMT + - Thu, 21 Oct 2021 05:18:57 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -296,16 +296,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue6?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue6?api-version=2021-05queue62021-09-28T19:02:08Z2021-09-28T19:02:08Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue6?api-version=2021-05queue62021-10-21T05:18:58Z2021-10-21T05:18:58Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:08.57Z2021-09-28T19:02:08.6ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:58.573Z2021-10-21T05:18:58.6ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:08 GMT + - Thu, 21 Oct 2021 05:18:59 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -337,16 +337,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue7?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue7?api-version=2021-05queue72021-09-28T19:02:09Z2021-09-28T19:02:09Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue7?api-version=2021-05queue72021-10-21T05:18:59Z2021-10-21T05:18:59Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:09.48Z2021-09-28T19:02:09.507ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:59.53Z2021-10-21T05:18:59.56ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:09 GMT + - Thu, 21 Oct 2021 05:18:59 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -378,16 +378,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue8?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue8?api-version=2021-05queue82021-09-28T19:02:10Z2021-09-28T19:02:10Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue8?api-version=2021-05queue82021-10-21T05:19:00Z2021-10-21T05:19:00Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:10.37Z2021-09-28T19:02:10.427ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:00.453Z2021-10-21T05:19:00.48ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:10 GMT + - Thu, 21 Oct 2021 05:19:00 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -419,16 +419,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/queue9?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/queue9?api-version=2021-05queue92021-09-28T19:02:11Z2021-09-28T19:02:11Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue9?api-version=2021-05queue92021-10-21T05:19:01Z2021-10-21T05:19:01Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:11.287Z2021-09-28T19:02:11.323ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:01.41Z2021-10-21T05:19:01.46ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:11 GMT + - Thu, 21 Oct 2021 05:19:01 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -460,9 +460,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:12 GMT + - Thu, 21 Oct 2021 05:19:02 GMT etag: - - '637684525229770000' + - '637703903328700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -485,67 +485,67 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:12Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/queue1?api-version=2021-05queue12021-09-28T19:02:03Z2021-09-28T19:02:03Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:02Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/queue1?api-version=2021-05queue12021-10-21T05:18:53Z2021-10-21T05:18:53Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:03.907Z2021-09-28T19:02:03.997Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:53.827Z2021-10-21T05:18:53.86Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/queue2?api-version=2021-05queue22021-09-28T19:02:04Z2021-09-28T19:02:05Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue2?api-version=2021-05queue22021-10-21T05:18:54Z2021-10-21T05:18:54Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:04.817Z2021-09-28T19:02:05.01Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:54.8Z2021-10-21T05:18:54.86Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/queue3?api-version=2021-05queue32021-09-28T19:02:05Z2021-09-28T19:02:05Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue3?api-version=2021-05queue32021-10-21T05:18:55Z2021-10-21T05:18:55Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:05.91Z2021-09-28T19:02:05.953Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:55.7809515Z2021-10-21T05:18:55.7809515Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/queue4?api-version=2021-05queue42021-09-28T19:02:06Z2021-09-28T19:02:06Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue4?api-version=2021-05queue42021-10-21T05:18:56Z2021-10-21T05:18:56Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:06.717Z2021-09-28T19:02:06.747Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:56.757Z2021-10-21T05:18:56.79Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/queue5?api-version=2021-05queue52021-09-28T19:02:07Z2021-09-28T19:02:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue5?api-version=2021-05queue52021-10-21T05:18:57Z2021-10-21T05:18:57Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:07.65Z2021-09-28T19:02:07.687Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:57.69Z2021-10-21T05:18:57.83Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/queue6?api-version=2021-05queue62021-09-28T19:02:08Z2021-09-28T19:02:08Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue6?api-version=2021-05queue62021-10-21T05:18:58Z2021-10-21T05:18:58Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:08.57Z2021-09-28T19:02:08.6Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:58.5820763Z2021-10-21T05:18:58.5820763Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/queue7?api-version=2021-05queue72021-09-28T19:02:09Z2021-09-28T19:02:09Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue7?api-version=2021-05queue72021-10-21T05:18:59Z2021-10-21T05:18:59Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:09.48Z2021-09-28T19:02:09.507Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:18:59.53Z2021-10-21T05:18:59.56Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/queue8?api-version=2021-05queue82021-09-28T19:02:10Z2021-09-28T19:02:10Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue8?api-version=2021-05queue82021-10-21T05:19:00Z2021-10-21T05:19:00Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:10.3764248Z2021-09-28T19:02:10.3764248Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:00.453Z2021-10-21T05:19:00.48Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/queue9?api-version=2021-05queue92021-09-28T19:02:11Z2021-09-28T19:02:11Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/queue9?api-version=2021-05queue92021-10-21T05:19:01Z2021-10-21T05:19:01Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:11.287Z2021-09-28T19:02:11.323Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:01.41Z2021-10-21T05:19:01.46Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:12 GMT + - Thu, 21 Oct 2021 05:19:02 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -575,9 +575,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:13 GMT + - Thu, 21 Oct 2021 05:19:03 GMT etag: - - '637684525239970000' + - '637703903338600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -607,9 +607,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:13 GMT + - Thu, 21 Oct 2021 05:19:03 GMT etag: - - '637684525250100000' + - '637703903348600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -639,9 +639,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:14 GMT + - Thu, 21 Oct 2021 05:19:04 GMT etag: - - '637684525259530000' + - '637703903358300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -671,9 +671,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:14 GMT + - Thu, 21 Oct 2021 05:19:04 GMT etag: - - '637684525267470000' + - '637703903367900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -703,9 +703,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:15 GMT + - Thu, 21 Oct 2021 05:19:05 GMT etag: - - '637684525276870000' + - '637703903378300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -735,9 +735,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:15 GMT + - Thu, 21 Oct 2021 05:19:05 GMT etag: - - '637684525286000000' + - '637703903386000000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -767,9 +767,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:16 GMT + - Thu, 21 Oct 2021 05:19:06 GMT etag: - - '637684525295070000' + - '637703903395600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -799,9 +799,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:16 GMT + - Thu, 21 Oct 2021 05:19:06 GMT etag: - - '637684525304270000' + - '637703903404800000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -831,9 +831,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:17 GMT + - Thu, 21 Oct 2021 05:19:07 GMT etag: - - '637684525313230000' + - '637703903414600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -856,13 +856,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:17Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:07Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:17 GMT + - Thu, 21 Oct 2021 05:19:07 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_get_runtime_properties_basic.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_get_runtime_properties_basic.yaml index 795f3abb81cc..a646dae249d9 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_get_runtime_properties_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_get_runtime_properties_basic.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:18Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:08Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:18 GMT + - Thu, 21 Oct 2021 05:19:07 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:18Z2021-09-28T19:02:19Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:08Z2021-10-21T05:19:08Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:18.98Z2021-09-28T19:02:19.067ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:08.69Z2021-10-21T05:19:08.75ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:19 GMT + - Thu, 21 Oct 2021 05:19:08 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,19 +84,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?enrich=false&api-version=2021-05test_queue2021-09-28T19:02:18Z2021-09-28T19:02:19Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?enrich=false&api-version=2021-05test_queue2021-10-21T05:19:08Z2021-10-21T05:19:08Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:18.98Z2021-09-28T19:02:19.067Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:08.69Z2021-10-21T05:19:08.75Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:19 GMT + - Thu, 21 Oct 2021 05:19:08 GMT etag: - - '637684525390670000' + - '637703903487500000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -128,9 +128,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:19 GMT + - Thu, 21 Oct 2021 05:19:09 GMT etag: - - '637684525390670000' + - '637703903487500000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_get_runtime_properties_negative.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_get_runtime_properties_negative.yaml index 0f8cea5a1564..e9b779678e03 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_get_runtime_properties_negative.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_get_runtime_properties_negative.yaml @@ -16,13 +16,13 @@ interactions: body: string: Publicly Listed ServicesThis is the list of publicly-listed - services currently available.uuid:c4422ea9-78c4-4053-b550-0ef5187077a4;id=67382021-09-28T19:02:20ZService + services currently available.uuid:b4774077-8c51-4963-afa2-7de390ed4dea;id=265042021-10-21T05:19:10ZService Bus 1.1 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:20 GMT + - Thu, 21 Oct 2021 05:19:10 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_basic.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_basic.yaml index d81cda0eed7a..53d122ce9acd 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_basic.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:21Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:11Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:21 GMT + - Thu, 21 Oct 2021 05:19:10 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -43,13 +43,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:21Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:11Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:21 GMT + - Thu, 21 Oct 2021 05:19:10 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -79,16 +79,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:22Z2021-09-28T19:02:22Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:12Z2021-10-21T05:19:12Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:22.427Z2021-09-28T19:02:22.47ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:12.01Z2021-10-21T05:19:12.093ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:22 GMT + - Thu, 21 Oct 2021 05:19:12 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -113,19 +113,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:23Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:22Z2021-09-28T19:02:22Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:12Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:12Z2021-10-21T05:19:12Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:22.427Z2021-09-28T19:02:22.47Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:12.01Z2021-10-21T05:19:12.093Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:23 GMT + - Thu, 21 Oct 2021 05:19:12 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -155,9 +155,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:23 GMT + - Thu, 21 Oct 2021 05:19:13 GMT etag: - - '637684525424700000' + - '637703903520930000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -180,13 +180,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:24Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:13Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:24 GMT + - Thu, 21 Oct 2021 05:19:13 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -209,13 +209,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:24Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:14Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:24 GMT + - Thu, 21 Oct 2021 05:19:13 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -245,16 +245,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:25Z2021-09-28T19:02:25Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:14Z2021-10-21T05:19:14Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:25.11Z2021-09-28T19:02:25.157ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:14.823Z2021-10-21T05:19:14.907ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:25 GMT + - Thu, 21 Oct 2021 05:19:14 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -279,19 +279,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:26Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:25Z2021-09-28T19:02:25Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:15Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:14Z2021-10-21T05:19:14Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:25.11Z2021-09-28T19:02:25.157Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:14.823Z2021-10-21T05:19:14.907Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:25 GMT + - Thu, 21 Oct 2021 05:19:14 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -321,9 +321,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:26 GMT + - Thu, 21 Oct 2021 05:19:15 GMT etag: - - '637684525451570000' + - '637703903549070000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -346,13 +346,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:26Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:16Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:26 GMT + - Thu, 21 Oct 2021 05:19:15 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_runtime_properties_basic.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_runtime_properties_basic.yaml index 7198ae4a79a5..987dfc15dfae 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_runtime_properties_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_runtime_properties_basic.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:27Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:17Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:27 GMT + - Thu, 21 Oct 2021 05:19:16 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -43,13 +43,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:27Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:17Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:27 GMT + - Thu, 21 Oct 2021 05:19:17 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -72,13 +72,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:28Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:18Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:28 GMT + - Thu, 21 Oct 2021 05:19:17 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -108,16 +108,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:28Z2021-09-28T19:02:28Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:18Z2021-10-21T05:19:18Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:28.893Z2021-09-28T19:02:28.947ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:18.503Z2021-10-21T05:19:18.53ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:29 GMT + - Thu, 21 Oct 2021 05:19:18 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -142,19 +142,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:29Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:28Z2021-09-28T19:02:28Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:19Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:18Z2021-10-21T05:19:18Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:28.893Z2021-09-28T19:02:28.947Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:18.503Z2021-10-21T05:19:18.53Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:29 GMT + - Thu, 21 Oct 2021 05:19:18 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -177,19 +177,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:30Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-09-28T19:02:28Z2021-09-28T19:02:28Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:19Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T05:19:18Z2021-10-21T05:19:18Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:28.893Z2021-09-28T19:02:28.947Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:18.503Z2021-10-21T05:19:18.53Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:30 GMT + - Thu, 21 Oct 2021 05:19:19 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -219,9 +219,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:30 GMT + - Thu, 21 Oct 2021 05:19:19 GMT etag: - - '637684525489470000' + - '637703903585300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -244,13 +244,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:31Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:20Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:31 GMT + - Thu, 21 Oct 2021 05:19:20 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_with_negative_credential.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_with_negative_credential.yaml index 028efd3a9c13..0a14c9578c30 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_with_negative_credential.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_with_negative_credential.yaml @@ -14,14 +14,14 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: 401claim is empty or token is invalid. TrackingId:7c20107c-37d6-4518-b38b-f9d8ab223689_G8, + string: 401claim is empty or token is invalid. TrackingId:96585ada-573e-4f68-908c-816183e87729_G11, SystemTracker:servicebustestsbname.servicebus.windows.net:$Resources/queues, - Timestamp:2021-09-28T19:02:31 + Timestamp:2021-10-21T05:19:21 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:31 GMT + - Thu, 21 Oct 2021 05:19:20 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -46,14 +46,14 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: 401claim is empty or token is invalid. TrackingId:243cf4dc-f994-42f6-8169-4c7a7a2c8b25_G0, + string: 401claim is empty or token is invalid. TrackingId:4dcbc0ed-8012-48b3-ad41-2b03bb2fb478_G12, SystemTracker:servicebustestsbname.servicebus.windows.net:$Resources/queues, - Timestamp:2021-09-28T19:02:31 + Timestamp:2021-10-21T05:19:21 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:31 GMT + - Thu, 21 Oct 2021 05:19:20 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_with_special_chars.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_with_special_chars.yaml index 96a0b8f7947f..782e8d55e4cd 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_with_special_chars.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_list_with_special_chars.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:32Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:21Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:32 GMT + - Thu, 21 Oct 2021 05:19:21 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -43,13 +43,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:32Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:22Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:32 GMT + - Thu, 21 Oct 2021 05:19:22 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -79,16 +79,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:02:33Z2021-09-28T19:02:33Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:19:22Z2021-10-21T05:19:22Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:33.463Z2021-09-28T19:02:33.49ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:22.883Z2021-10-21T05:19:22.907ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:33 GMT + - Thu, 21 Oct 2021 05:19:23 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -113,19 +113,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:34Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:02:33Z2021-09-28T19:02:33Zservicebustestappwyrpk4kQueueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:23Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:19:22Z2021-10-21T05:19:22Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:02:33.463Z2021-09-28T19:02:33.49Z0001-01-01T00:00:00ZtruePT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:19:22.883Z2021-10-21T05:19:22.907Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:34 GMT + - Thu, 21 Oct 2021 05:19:23 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -155,9 +155,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:02:34 GMT + - Thu, 21 Oct 2021 05:19:24 GMT etag: - - '637684525534900000' + - '637703903629070000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -180,13 +180,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:02:35Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:19:24Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:02:35 GMT + - Thu, 21 Oct 2021 05:19:24 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_premium_create_with_queue_description.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_premium_create_with_queue_description.yaml index c8c9ab18a15f..20f20513a37a 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_premium_create_with_queue_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_premium_create_with_queue_description.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestmstsf53wi2.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:11Z + string: Queueshttps://servicebustestny3npghbcb.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:20:59Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:10 GMT + - Thu, 21 Oct 2021 05:20:59 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-09-28T19:04:11Z2021-09-28T19:04:12Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-10-21T05:21:00Z2021-10-21T05:21:00Zservicebustestny3npghbcbPT13S3072falsetruePT11MtruePT12M14true00falseActive2021-09-28T19:04:11.51Z2021-09-28T19:04:12.12ZtruePT10MfalseAvailablefalse12345 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsetruePT11MtruePT12M14true00falseActive2021-10-21T05:21:00.127Z2021-10-21T05:21:00.837ZtruePT10MfalseAvailablefalse12345 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:11 GMT + - Thu, 21 Oct 2021 05:21:01 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,16 +91,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/cpqmva?api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/cpqmva?api-version=2021-05cpqmva2021-09-28T19:04:13Z2021-09-28T19:04:13Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/cpqmva?api-version=2021-05cpqmva2021-10-21T05:21:01Z2021-10-21T05:21:01Zservicebustestny3npghbcbPT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:04:13.12Z2021-09-28T19:04:13.183ZtruePT10M1SfalseAvailablefalse1024 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:01.847Z2021-10-21T05:21:01.917ZtruePT10M1SfalseAvailablefalse1024 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:12 GMT + - Thu, 21 Oct 2021 05:21:02 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -138,13 +138,13 @@ interactions: Parameter name: MaxMessageSizeInKilobytes - Actual value was 1023. TrackingId:ccdba1cf-1978-47a4-a056-e9d1d047be45_G11, - SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-09-28T19:04:14' + Actual value was 1023. TrackingId:8f1de016-5af0-421c-9c97-473e658b1c05_G7, + SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-10-21T05:21:02' headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:14 GMT + - Thu, 21 Oct 2021 05:21:02 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -182,13 +182,13 @@ interactions: Parameter name: MaxMessageSizeInKilobytes - Actual value was 102401. TrackingId:6a8a410e-a1a0-4e82-a028-a158b77a850a_G11, - SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-09-28T19:04:14' + Actual value was 102401. TrackingId:d385ee5f-7928-440a-988d-7756ed8987e2_G7, + SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-10-21T05:21:03' headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:14 GMT + - Thu, 21 Oct 2021 05:21:02 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -213,19 +213,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-09-28T19:04:11Z2021-09-28T19:04:12Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-10-21T05:21:00Z2021-10-21T05:21:00Zservicebustestny3npghbcbPT13S3072falsetruePT11MtruePT12M14true00falseActive2021-09-28T19:04:11.51Z2021-09-28T19:04:12.12Z0001-01-01T00:00:00ZtruePT13S3072falsetruePT11MtruePT12M14true00falseActive2021-10-21T05:21:00.127Z2021-10-21T05:21:00.837Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailablefalse12345 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:14 GMT + - Thu, 21 Oct 2021 05:21:03 GMT etag: - - '637684526521200000' + - '637703904608370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -250,19 +250,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/cpqmva?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/cpqmva?enrich=false&api-version=2021-05cpqmva2021-09-28T19:04:13Z2021-09-28T19:04:13Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/cpqmva?enrich=false&api-version=2021-05cpqmva2021-10-21T05:21:01Z2021-10-21T05:21:01Zservicebustestny3npghbcbPT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:04:13.12Z2021-09-28T19:04:13.183Z0001-01-01T00:00:00ZtruePT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:01.847Z2021-10-21T05:21:01.917Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailablefalse1024 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:14 GMT + - Thu, 21 Oct 2021 05:21:03 GMT etag: - - '637684526531830000' + - '637703904619170000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -278,7 +278,7 @@ interactions: PT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:04:13.120Z2021-09-28T19:04:13.183Z0001-01-01T00:00:00.000Ztrue00000PT10M1SfalseAvailablefalse54321' + />Active2021-10-21T05:21:01.847Z2021-10-21T05:21:01.917Z0001-01-01T00:00:00.000Ztrue00000PT10M1SfalseAvailablefalse54321' headers: Accept: - application/xml @@ -298,19 +298,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/cpqmva?api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/cpqmva?api-version=2021-05cpqmva2021-09-28T19:04:14Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/cpqmva?api-version=2021-05cpqmva2021-10-21T05:21:03Zservicebustestny3npghbcbPT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:04:13.12Z2021-09-28T19:04:13.183Z0001-01-01T00:00:00ZtruePT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:01.847Z2021-10-21T05:21:01.917Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailablefalse54321 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:14 GMT + - Thu, 21 Oct 2021 05:21:03 GMT etag: - - '637684526531830000' + - '637703904619170000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -335,19 +335,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/cpqmva?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/cpqmva?enrich=false&api-version=2021-05cpqmva2021-09-28T19:04:13Z2021-09-28T19:04:14Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/cpqmva?enrich=false&api-version=2021-05cpqmva2021-10-21T05:21:01Z2021-10-21T05:21:03Zservicebustestny3npghbcbPT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-09-28T19:04:13.12Z2021-09-28T19:04:14.873Z0001-01-01T00:00:00ZtruePT13S3072falsetruePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:01.847Z2021-10-21T05:21:03.487Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailablefalse54321 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:15 GMT + - Thu, 21 Oct 2021 05:21:03 GMT etag: - - '637684526548730000' + - '637703904634870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -379,9 +379,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:15 GMT + - Thu, 21 Oct 2021 05:21:03 GMT etag: - - '637684526521200000' + - '637703904608370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -411,9 +411,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:16 GMT + - Thu, 21 Oct 2021 05:21:04 GMT etag: - - '637684526548730000' + - '637703904634870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_dict_error.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_dict_error.yaml index 8e92f29f0f64..b63483168e30 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_dict_error.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_dict_error.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:16Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:05Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:16 GMT + - Thu, 21 Oct 2021 05:21:04 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjdfj?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dfjdfj?api-version=2021-05dfjdfj2021-09-28T19:04:17Z2021-09-28T19:04:17Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dfjdfj?api-version=2021-05dfjdfj2021-10-21T05:21:05Z2021-10-21T05:21:05Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:04:17.43Z2021-09-28T19:04:17.51ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:21:05.543Z2021-10-21T05:21:05.587ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:17 GMT + - Thu, 21 Oct 2021 05:21:05 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,9 +91,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:17 GMT + - Thu, 21 Oct 2021 05:21:06 GMT etag: - - '637684526575100000' + - '637703904655870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_dict_success.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_dict_success.yaml index c18cc56e1eb9..e2f4106b5504 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_dict_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_dict_success.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:19Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:07Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:18 GMT + - Thu, 21 Oct 2021 05:21:06 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:04:19Z2021-09-28T19:04:19Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:21:07Z2021-10-21T05:21:07Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:04:19.477Z2021-09-28T19:04:19.607ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:21:07.517Z2021-10-21T05:21:07.573ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:19 GMT + - Thu, 21 Oct 2021 05:21:07 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -94,18 +94,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:04:20Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:21:08Zservicebustestaweyco6xnrPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10trueActiveP10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:20 GMT + - Thu, 21 Oct 2021 05:21:07 GMT etag: - - '637684526596070000' + - '637703904675730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -130,19 +130,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:04:19Z2021-09-28T19:04:20Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:21:07Z2021-10-21T05:21:08Zservicebustestaweyco6xnrPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:19.477Z2021-09-28T19:04:20.117Z0001-01-01T00:00:00ZtruePT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:07.517Z2021-10-21T05:21:08.023Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:20 GMT + - Thu, 21 Oct 2021 05:21:07 GMT etag: - - '637684526601170000' + - '637703904680230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -157,7 +157,7 @@ interactions: PT13S3072falsefalsePT11MtruePT12M14trueActivePT10MfalseAvailabletruesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruidsb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid256' + />ActivePT10MfalseAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruidsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid256' headers: Accept: - application/xml @@ -172,27 +172,27 @@ interactions: If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjruid&sig=1FjXK6jYRVJGond7%2fFVwWb9P2%2fUZp1ObVdLpQEuqhxU%3d&se=1632859459&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjruid&sig=vXBkjrWjddoDfOO0KxjNvCy30O9GNWpbmKTtfuO94EA%3d&se=1634797268&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjruid&sig=1FjXK6jYRVJGond7%2fFVwWb9P2%2fUZp1ObVdLpQEuqhxU%3d&se=1632859459&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjruid&sig=vXBkjrWjddoDfOO0KxjNvCy30O9GNWpbmKTtfuO94EA%3d&se=1634797268&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:04:20Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:21:08Zservicebustestaweyco6xnrPT13S3072falsefalsePT11MtruePT12M14trueActivePT10MfalseAvailabletruesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruidsb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11MtruePT12M14trueActivePT10MfalseAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruidsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:20 GMT + - Thu, 21 Oct 2021 05:21:07 GMT etag: - - '637684526601170000' + - '637703904680230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -217,19 +217,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:04:19Z2021-09-28T19:04:20Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:21:07Z2021-10-21T05:21:08Zservicebustestaweyco6xnrPT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-09-28T19:04:19.477Z2021-09-28T19:04:20.23Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruidsb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-10-21T05:21:07.517Z2021-10-21T05:21:08.253Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruidsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:20 GMT + - Thu, 21 Oct 2021 05:21:08 GMT etag: - - '637684526602300000' + - '637703904682530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -264,18 +264,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:04:20Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:21:08Zservicebustestaweyco6xnrPT18S2048falsefalsePT16MfalsePT17M15falseActivePT15MfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:20 GMT + - Thu, 21 Oct 2021 05:21:08 GMT etag: - - '637684526602300000' + - '637703904682530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -300,19 +300,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:04:19Z2021-09-28T19:04:20Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:21:07Z2021-10-21T05:21:08Zservicebustestaweyco6xnrPT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-09-28T19:04:19.477Z2021-09-28T19:04:20.44Z0001-01-01T00:00:00ZtruePT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-10-21T05:21:07.517Z2021-10-21T05:21:08.49Z0001-01-01T00:00:00Ztrue00000PT15MfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:20 GMT + - Thu, 21 Oct 2021 05:21:08 GMT etag: - - '637684526604400000' + - '637703904684900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -344,9 +344,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:21 GMT + - Thu, 21 Oct 2021 05:21:08 GMT etag: - - '637684526604400000' + - '637703904684900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_invalid.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_invalid.yaml index 42de4d6ec02f..fdd222ad6f30 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_invalid.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_invalid.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:21Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:09Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:21 GMT + - Thu, 21 Oct 2021 05:21:09 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjfj?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-09-28T19:04:22Z2021-09-28T19:04:22Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-10-21T05:21:10Z2021-10-21T05:21:10Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:04:22.12Z2021-09-28T19:04:22.19ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:21:10.423Z2021-10-21T05:21:10.467ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:22 GMT + - Thu, 21 Oct 2021 05:21:10 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -74,7 +74,7 @@ interactions: PT1M1024falsetrueP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:22.120Z2021-09-28T19:04:22.190ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:10.423Z2021-10-21T05:21:10.467ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -96,15 +96,15 @@ interactions: body: string: 400SubCode=40000. The value for the RequiresSession property of an existing Queue cannot be changed. To know more visit https://aka.ms/sbResourceMgrExceptions. - . TrackingId:b206ec50-35d1-4782-a0cf-e2892e952841_G1, SystemTracker:servicebustestsbname.servicebus.windows.net:dfjfj, - Timestamp:2021-09-28T19:04:22 + . TrackingId:ae1a3e1c-c06d-4ac7-9cbd-124580d1fa0b_G3, SystemTracker:servicebustestsbname.servicebus.windows.net:dfjfj, + Timestamp:2021-10-21T05:21:10 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:22 GMT + - Thu, 21 Oct 2021 05:21:10 GMT etag: - - '637684526621900000' + - '637703904704670000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -119,7 +119,7 @@ interactions: PT1M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:22.120Z2021-09-28T19:04:22.190ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:10.423Z2021-10-21T05:21:10.467ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -141,13 +141,13 @@ interactions: body: string: 404SubCode=40400. Not Found. The Operation doesn't exist. To know more visit https://aka.ms/sbResourceMgrExceptions. - . TrackingId:98a549cc-08ca-4898-9bb8-a65e4cbc886e_G1, SystemTracker:servicebustestsbname.servicebus.windows.net:iewdm, - Timestamp:2021-09-28T19:04:23 + . TrackingId:c9ee15af-c1fa-4806-87ea-51774a354cb6_G3, SystemTracker:servicebustestsbname.servicebus.windows.net:iewdm, + Timestamp:2021-10-21T05:21:11 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:22 GMT + - Thu, 21 Oct 2021 05:21:10 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -162,7 +162,7 @@ interactions: P25D1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:22.120Z2021-09-28T19:04:22.190ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:10.423Z2021-10-21T05:21:10.467ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -188,15 +188,15 @@ interactions: Parameter name: LockDuration - Actual value was 25.00:00:00. TrackingId:579119c5-30a7-4459-89e9-c353d3792346_G1, - SystemTracker:servicebustestsbname.servicebus.windows.net:dfjfj, Timestamp:2021-09-28T19:04:23' + Actual value was 25.00:00:00. TrackingId:49e129a4-b4bb-476d-a768-9f68e90f5871_G3, + SystemTracker:servicebustestsbname.servicebus.windows.net:dfjfj, Timestamp:2021-10-21T05:21:11' headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:23 GMT + - Thu, 21 Oct 2021 05:21:10 GMT etag: - - '637684526621900000' + - '637703904704670000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -228,9 +228,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:23 GMT + - Thu, 21 Oct 2021 05:21:11 GMT etag: - - '637684526621900000' + - '637703904704670000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_success.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_success.yaml index 2e156b7504d2..ec5b9d3b9e07 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_update_success.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 response: body: - string: Queueshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:24Z + string: Queueshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:13Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:24 GMT + - Thu, 21 Oct 2021 05:21:12 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:04:25Z2021-09-28T19:04:25Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:21:13Z2021-10-21T05:21:13Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:25.51ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:21:13.463Z2021-10-21T05:21:13.587ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:25 GMT + - Thu, 21 Oct 2021 05:21:13 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,16 +91,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/sagho?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/sagho?api-version=2021-05sagho2021-09-28T19:04:26Z2021-09-28T19:04:26Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/sagho?api-version=2021-05sagho2021-10-21T05:21:14Z2021-10-21T05:21:14Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:26.34Z2021-09-28T19:04:26.377ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:14.44Z2021-10-21T05:21:14.47ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:26 GMT + - Thu, 21 Oct 2021 05:21:14 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -115,7 +115,7 @@ interactions: PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:25.460Z2021-09-28T19:04:25.510ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:13.463Z2021-10-21T05:21:13.587ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -135,18 +135,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:04:26Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:21:15Zservicebustestaweyco6xnrPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:25.51ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:13.463Z2021-10-21T05:21:13.587ZtrueP10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:26 GMT + - Thu, 21 Oct 2021 05:21:14 GMT etag: - - '637684526655100000' + - '637703904735870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -171,19 +171,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:04:25Z2021-09-28T19:04:26Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:21:13Z2021-10-21T05:21:14Zservicebustestaweyco6xnrPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:26.837Z0001-01-01T00:00:00ZtruePT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:13.4760212Z2021-10-21T05:21:15.0007779Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:26 GMT + - Thu, 21 Oct 2021 05:21:14 GMT etag: - - '637684526668370000' + - '637703904749900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -199,7 +199,7 @@ interactions: PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:25.460Z2021-09-28T19:04:26.837Z0001-01-01T00:00:00.000Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestappwyrpk4k.servicebus.windows.net/saghosb://servicebustestappwyrpk4k.servicebus.windows.net/sagho256' + />Active2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.000777Z0001-01-01T00:00:00.000Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestaweyco6xnr.servicebus.windows.net/saghosb://servicebustestaweyco6xnr.servicebus.windows.net/sagho256' headers: Accept: - application/xml @@ -208,34 +208,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1978' + - '1984' Content-Type: - application/atom+xml If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Fsagho&sig=l1UB9NYeTS1Mplsob8ta81JSvGwE8%2bWa%2bu4V8Ycx1nM%3d&se=1632859466&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Fsagho&sig=dZrcnHjeipjL%2bLes71P%2bx0%2ba7gPN805ZYM6oAixRgX8%3d&se=1634797275&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Fsagho&sig=l1UB9NYeTS1Mplsob8ta81JSvGwE8%2bWa%2bu4V8Ycx1nM%3d&se=1632859466&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Fsagho&sig=dZrcnHjeipjL%2bLes71P%2bx0%2ba7gPN805ZYM6oAixRgX8%3d&se=1634797275&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:04:27Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:21:15Zservicebustestaweyco6xnrPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:26.837Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestappwyrpk4k.servicebus.windows.net/saghosb://servicebustestappwyrpk4k.servicebus.windows.net/sagho256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.000777Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestaweyco6xnr.servicebus.windows.net/saghosb://servicebustestaweyco6xnr.servicebus.windows.net/sagho256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:26 GMT + - Thu, 21 Oct 2021 05:21:14 GMT etag: - - '637684526668370000' + - '637703904749900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -260,19 +260,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:04:25Z2021-09-28T19:04:27Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:21:13Z2021-10-21T05:21:15Zservicebustestaweyco6xnrPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:27.097Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestappwyrpk4k.servicebus.windows.net/saghosb://servicebustestappwyrpk4k.servicebus.windows.net/sagho256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:13.4760212Z2021-10-21T05:21:15.2351723Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalsesb://servicebustestaweyco6xnr.servicebus.windows.net/saghosb://servicebustestaweyco6xnr.servicebus.windows.net/sagho256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:26 GMT + - Thu, 21 Oct 2021 05:21:14 GMT etag: - - '637684526670970000' + - '637703904752330000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -288,7 +288,7 @@ interactions: PT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:25.460Z2021-09-28T19:04:27.097Z0001-01-01T00:00:00.000Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256' + />Active2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.235172Z0001-01-01T00:00:00.000Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256' headers: Accept: - application/xml @@ -297,7 +297,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1776' + - '1782' Content-Type: - application/atom+xml If-Match: @@ -308,19 +308,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:04:27Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:21:15Zservicebustestaweyco6xnrPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:27.097Z0001-01-01T00:00:00ZtruePT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.235172Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:27 GMT + - Thu, 21 Oct 2021 05:21:14 GMT etag: - - '637684526670970000' + - '637703904752330000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -345,19 +345,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:04:25Z2021-09-28T19:04:27Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:21:13Z2021-10-21T05:21:15Zservicebustestaweyco6xnrPT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:27.33Z0001-01-01T00:00:00ZtruePT2M1024falsefalseP10675199DT2H48M5.477539SfalsePT10M10true00falseActive2021-10-21T05:21:13.4760212Z2021-10-21T05:21:15.4695682Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:27 GMT + - Thu, 21 Oct 2021 05:21:14 GMT etag: - - '637684526673300000' + - '637703904754670000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -373,7 +373,7 @@ interactions: PT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-09-28T19:04:25.460Z2021-09-28T19:04:27.330Z0001-01-01T00:00:00.000Ztrue00000PT10MfalseAvailabletruesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruisb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui256' + />Active2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.469568Z0001-01-01T00:00:00.000Ztrue00000PT10MfalseAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruisb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui256' headers: Accept: - application/xml @@ -382,34 +382,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1937' + - '1943' Content-Type: - application/atom+xml If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjrui&sig=6PdBlNhOvEGEvcaifjIzQn5KCJlU0BBNIO4fZr4%2f29M%3d&se=1632859467&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjrui&sig=FClNLJ6nnmIwcayhbrMAIh2EmBZS8r76V9vebLveuhA%3d&se=1634797275&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjrui&sig=6PdBlNhOvEGEvcaifjIzQn5KCJlU0BBNIO4fZr4%2f29M%3d&se=1632859467&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjrui&sig=FClNLJ6nnmIwcayhbrMAIh2EmBZS8r76V9vebLveuhA%3d&se=1634797275&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:04:27Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:21:15Zservicebustestaweyco6xnrPT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:27.33Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruisb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.469568Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruisb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:27 GMT + - Thu, 21 Oct 2021 05:21:14 GMT etag: - - '637684526673300000' + - '637703904754670000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -434,19 +434,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:04:25Z2021-09-28T19:04:27Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:21:13Z2021-10-21T05:21:15Zservicebustestaweyco6xnrPT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:27.533Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruisb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11MtruePT12M14true00falseActive2021-10-21T05:21:13.4760212Z2021-10-21T05:21:15.7195309Z0001-01-01T00:00:00Ztrue00000PT10MfalseAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruisb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:27 GMT + - Thu, 21 Oct 2021 05:21:15 GMT etag: - - '637684526675330000' + - '637703904757130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -462,7 +462,7 @@ interactions: PT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-09-28T19:04:25.460Z2021-09-28T19:04:27.533Z0001-01-01T00:00:00.000Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruisb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui256' + />Active2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.71953Z0001-01-01T00:00:00.000Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruisb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui256' headers: Accept: - application/xml @@ -471,34 +471,34 @@ interactions: Connection: - keep-alive Content-Length: - - '1943' + - '1948' Content-Type: - application/atom+xml If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjrui&sig=6PdBlNhOvEGEvcaifjIzQn5KCJlU0BBNIO4fZr4%2f29M%3d&se=1632859467&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjrui&sig=cybNpXHyn0HU5gLMN5sH9N%2bsFEQedFVPIlU8Xp5OW%2bg%3d&se=1634797276&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjrui&sig=6PdBlNhOvEGEvcaifjIzQn5KCJlU0BBNIO4fZr4%2f29M%3d&se=1632859467&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjrui&sig=cybNpXHyn0HU5gLMN5sH9N%2bsFEQedFVPIlU8Xp5OW%2bg%3d&se=1634797276&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:04:27Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:21:15Zservicebustestaweyco6xnrPT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:27.533Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruisb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.71953Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruisb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:27 GMT + - Thu, 21 Oct 2021 05:21:15 GMT etag: - - '637684526675330000' + - '637703904757130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -523,19 +523,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:04:25Z2021-09-28T19:04:27Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:21:13Z2021-10-21T05:21:15Zservicebustestaweyco6xnrPT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:27.767Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruisb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13S3072falsefalsePT11M2StruePT12M3S14true00falseActive2021-10-21T05:21:13.4760212Z2021-10-21T05:21:15.9382854Z0001-01-01T00:00:00Ztrue00000PT10M1SfalseAvailabletruesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruisb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:27 GMT + - Thu, 21 Oct 2021 05:21:15 GMT etag: - - '637684526677670000' + - '637703904759300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -551,7 +551,7 @@ interactions: PT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-09-28T19:04:25.460Z2021-09-28T19:04:27.767Z0001-01-01T00:00:00.000Ztrue00000PT15MfalseAvailablefalse256' + />Active2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.938285Z0001-01-01T00:00:00.000Ztrue00000PT15MfalseAvailablefalse256' headers: Accept: - application/xml @@ -560,7 +560,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1738' + - '1744' Content-Type: - application/atom+xml If-Match: @@ -571,19 +571,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:04:28Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:21:16Zservicebustestaweyco6xnrPT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:27.767Z0001-01-01T00:00:00ZtruePT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-10-21T05:21:13.476021Z2021-10-21T05:21:15.938285Z0001-01-01T00:00:00Ztrue00000PT15MfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:27 GMT + - Thu, 21 Oct 2021 05:21:15 GMT etag: - - '637684526677670000' + - '637703904759300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -608,19 +608,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:04:25Z2021-09-28T19:04:28Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:21:13Z2021-10-21T05:21:16Zservicebustestaweyco6xnrPT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-09-28T19:04:25.46Z2021-09-28T19:04:28.023Z0001-01-01T00:00:00ZtruePT18S2048falsefalsePT16MfalsePT17M15false00falseActive2021-10-21T05:21:13.4760212Z2021-10-21T05:21:16.203941Z0001-01-01T00:00:00Ztrue00000PT15MfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:27 GMT + - Thu, 21 Oct 2021 05:21:15 GMT etag: - - '637684526680230000' + - '637703904761830000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -652,9 +652,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:28 GMT + - Thu, 21 Oct 2021 05:21:15 GMT etag: - - '637684526680230000' + - '637703904761830000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -684,9 +684,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:28 GMT + - Thu, 21 Oct 2021 05:21:16 GMT etag: - - '637684526663770000' + - '637703904744700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_v2017_04.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_v2017_04.yaml new file mode 100644 index 000000000000..3bfa3d5e3899 --- /dev/null +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_queues.test_mgmt_queue_v2017_04.yaml @@ -0,0 +1,403 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestkgj2gt2e2y.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T04:54:20Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:20 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestkgj2gt2e2y.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T04:54:20Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:20 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: https://servicebustestkgj2gt2e2y.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T04:54:21Z2021-10-21T04:54:21Zservicebustestkgj2gt2e2yPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T04:54:21.273Z2021-10-21T04:54:21.387ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:21 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestkgj2gt2e2y.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T04:54:22Zhttps://servicebustestkgj2gt2e2y.servicebus.windows.net/test_queue?api-version=2017-04test_queue2021-10-21T04:54:21Z2021-10-21T04:54:21Zservicebustestkgj2gt2e2yPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T04:54:21.273Z2021-10-21T04:54:21.387Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:21 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 21 Oct 2021 04:54:22 GMT + etag: + - '637703888613870000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Queueshttps://servicebustestkgj2gt2e2y.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2017-042021-10-21T04:54:23Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:22 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + response: + body: + string: Queueshttps://servicebustestkgj2gt2e2y.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T04:54:23Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:23 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 + response: + body: + string: https://servicebustestkgj2gt2e2y.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T04:54:23Z2021-10-21T04:54:24Zservicebustestkgj2gt2e2yPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T04:54:23.917Z2021-10-21T04:54:24.017ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:24 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + response: + body: + string: Queueshttps://servicebustestkgj2gt2e2y.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T04:54:24Zhttps://servicebustestkgj2gt2e2y.servicebus.windows.net/test_queue?api-version=2021-05test_queue2021-10-21T04:54:23Z2021-10-21T04:54:24Zservicebustestkgj2gt2e2yPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T04:54:23.917Z2021-10-21T04:54:24.017Z0001-01-01T00:00:00Ztrue00000P10675199DT2H48M5.4775807SfalseAvailablefalse256 + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:24 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_queue?api-version=2021-05 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 21 Oct 2021 04:54:25 GMT + etag: + - '637703888640170000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-05 + response: + body: + string: Queueshttps://servicebustestkgj2gt2e2y.servicebus.windows.net/$Resources/queues?$skip=0&$top=100&api-version=2021-052021-10-21T04:54:25Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:25 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/queue_can_not_be_created?api-version=2021-05 + response: + body: + string: 400SubCode=40000. Bad Request. To know more + visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:b9750e91-6034-4603-a541-6cc04e934d96_G12, + SystemTracker:servicebustestsbname.servicebus.windows.net:queue_can_not_be_created, + Timestamp:2021-10-21T04:54:26 + headers: + content-type: + - application/xml; charset=utf-8 + date: + - Thu, 21 Oct 2021 04:54:26 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 400 + message: Bad Request +version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_create.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_create.yaml index 0e7fa65969bf..26a63696fb27 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_create.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_create.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:29Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:18Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:29 GMT + - Thu, 21 Oct 2021 05:21:18 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-09-28T19:04:30Z2021-09-28T19:04:30Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-10-21T05:21:18Z2021-10-21T05:21:18Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:30.267Z2021-09-28T19:04:30.313ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:18.643Z2021-10-21T05:21:18.69ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:30 GMT + - Thu, 21 Oct 2021 05:21:19 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-09-28T19:04:30Z2021-09-28T19:04:30Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-10-21T05:21:19Z2021-10-21T05:21:19ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:30.7995031Z2021-09-28T19:04:30.7995031Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:19.1411164Z2021-10-21T05:21:19.1411164Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:30 GMT + - Thu, 21 Oct 2021 05:21:19 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -143,9 +143,9 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-09-28T19:04:31Z2021-09-28T19:04:31Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-10-21T05:21:19Z2021-10-21T05:21:19Ztestcidkey_stringstr1key_int2020-07-05T11:12:13key_durationP1DT2H3MSET Priority = @param20@param2020-07-05T11:12:13true2021-09-28T19:04:31.0807783Ztest_rule_1 + i:type="d6p1:dateTime" xmlns:d6p1="http://www.w3.org/2001/XMLSchema">2020-07-05T11:12:13true2021-10-21T05:21:19.3911229Ztest_rule_1 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:30 GMT + - Thu, 21 Oct 2021 05:21:19 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -187,9 +187,9 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?enrich=false&api-version=2021-05test_rule_12021-09-28T19:04:31Z2021-09-28T19:04:31Zsb://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?enrich=false&api-version=2021-05test_rule_12021-10-21T05:21:19Z2021-10-21T05:21:19Ztestcidkey_stringstr1key_int2020-07-05T11:12:13key_durationP1DT2H3MSET Priority = @param20@param2020-07-05T11:12:13true2021-09-28T19:04:31.0959133Ztest_rule_1 + i:type="d6p1:dateTime" xmlns:d6p1="http://www.w3.org/2001/XMLSchema">2020-07-05T11:12:13true2021-10-21T05:21:19.4031415Ztest_rule_1 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:30 GMT + - Thu, 21 Oct 2021 05:21:19 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -242,22 +242,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-09-28T19:04:31Z2021-09-28T19:04:31Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-10-21T05:21:19Z2021-10-21T05:21:19ZPriority = @param1 AND Level = @param220@param1str1@param21true2021-09-28T19:04:31.330754Ztest_rule_2 + i:type="EmptyRuleAction"/>2021-10-21T05:21:19.5942496Ztest_rule_2 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:30 GMT + - Thu, 21 Oct 2021 05:21:19 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -282,22 +282,22 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?enrich=false&api-version=2021-05test_rule_22021-09-28T19:04:31Z2021-09-28T19:04:31Zsb://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?enrich=false&api-version=2021-05test_rule_22021-10-21T05:21:19Z2021-10-21T05:21:19ZPriority = @param1 AND Level = @param220@param1str1@param21true2021-09-28T19:04:31.3303045Ztest_rule_2 + i:type="EmptyRuleAction"/>2021-10-21T05:21:19.7312314Ztest_rule_2 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:30 GMT + - Thu, 21 Oct 2021 05:21:19 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -331,19 +331,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-09-28T19:04:31Z2021-09-28T19:04:31Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-10-21T05:21:19Z2021-10-21T05:21:19Z1=1202021-09-28T19:04:31.4870059Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:21:19.8133497Ztest_rule_3 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:30 GMT + - Thu, 21 Oct 2021 05:21:19 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -368,19 +368,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?enrich=false&api-version=2021-05test_rule_32021-09-28T19:04:31Z2021-09-28T19:04:31Zsb://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?enrich=false&api-version=2021-05test_rule_32021-10-21T05:21:19Z2021-10-21T05:21:19Z1=1202021-09-28T19:04:31.4865644Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:21:19.8250182Ztest_rule_3 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:31 GMT + - Thu, 21 Oct 2021 05:21:19 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -414,19 +414,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05test_rule_42021-09-28T19:04:31Z2021-09-28T19:04:31Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?api-version=2021-05test_rule_42021-10-21T05:21:19Z2021-10-21T05:21:19Z1=1202021-09-28T19:04:31.6276308Ztest_rule_4 + i:type="EmptyRuleAction"/>2021-10-21T05:21:19.9227074Ztest_rule_4 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:31 GMT + - Thu, 21 Oct 2021 05:21:19 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -451,19 +451,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?enrich=false&api-version=2021-05test_rule_42021-09-28T19:04:31Z2021-09-28T19:04:31Zsb://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_4?enrich=false&api-version=2021-05test_rule_42021-10-21T05:21:19Z2021-10-21T05:21:19Z1=1202021-09-28T19:04:31.6271795Ztest_rule_4 + i:type="EmptyRuleAction"/>2021-10-21T05:21:19.9343715Ztest_rule_4 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:31 GMT + - Thu, 21 Oct 2021 05:21:19 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -495,9 +495,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:31 GMT + - Thu, 21 Oct 2021 05:21:20 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -527,9 +527,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:31 GMT + - Thu, 21 Oct 2021 05:21:20 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -559,9 +559,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:31 GMT + - Thu, 21 Oct 2021 05:21:20 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -591,9 +591,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:31 GMT + - Thu, 21 Oct 2021 05:21:20 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -623,9 +623,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:31 GMT + - Thu, 21 Oct 2021 05:21:20 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -655,9 +655,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:32 GMT + - Thu, 21 Oct 2021 05:21:21 GMT etag: - - '637684526703130000' + - '637703904786900000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_create_duplicate.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_create_duplicate.yaml index 26dc79806bac..8d2c13a2a160 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_create_duplicate.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_create_duplicate.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:33Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:21Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:32 GMT + - Thu, 21 Oct 2021 05:21:21 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-09-28T19:04:33Z2021-09-28T19:04:34Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-10-21T05:21:22Z2021-10-21T05:21:22Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:33.997Z2021-09-28T19:04:34.113ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:22.12Z2021-10-21T05:21:22.17ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:33 GMT + - Thu, 21 Oct 2021 05:21:22 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05kkaqo2021-09-28T19:04:34Z2021-09-28T19:04:34Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05kkaqo2021-10-21T05:21:22Z2021-10-21T05:21:22ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:34.625158Z2021-09-28T19:04:34.625158Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:22.6206528Z2021-10-21T05:21:22.6206528Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:33 GMT + - Thu, 21 Oct 2021 05:21:22 GMT etag: - - '637684526741130000' + - '637703904821700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -136,20 +136,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05rule2021-09-28T19:04:34Z2021-09-28T19:04:34Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/dqkodq/subscriptions/kkaqo/rules/rule?api-version=2021-05rule2021-10-21T05:21:22Z2021-10-21T05:21:22ZPriority = 'low'20true2021-09-28T19:04:34.8439156Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:22.7768794Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:34 GMT + - Thu, 21 Oct 2021 05:21:22 GMT etag: - - '637684526741130000' + - '637703904821700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -184,15 +184,15 @@ interactions: response: body: string: 409The messaging entity 'servicebustestsbname:Topic:dqkodq|kkaqo|rule' - already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:36cc689a-459a-4992-955e-801b4ef59ba1_B10, - SystemTracker:NoSystemTracker, Timestamp:2021-09-28T19:04:35 + already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:21d3e93d-f48d-4eda-8d5c-1eb9e884c956_B4, + SystemTracker:NoSystemTracker, Timestamp:2021-10-21T05:21:22 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:35 GMT + - Thu, 21 Oct 2021 05:21:23 GMT etag: - - '637684526741130000' + - '637703904821700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -224,9 +224,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:35 GMT + - Thu, 21 Oct 2021 05:21:23 GMT etag: - - '637684526741130000' + - '637703904821700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -256,9 +256,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:35 GMT + - Thu, 21 Oct 2021 05:21:23 GMT etag: - - '637684526741130000' + - '637703904821700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -288,9 +288,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:35 GMT + - Thu, 21 Oct 2021 05:21:24 GMT etag: - - '637684526741130000' + - '637703904821700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_list_and_delete.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_list_and_delete.yaml index fd208efbb9de..70967b0cfadb 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_list_and_delete.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_list_and_delete.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:37Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:24Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:36 GMT + - Thu, 21 Oct 2021 05:21:24 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-09-28T19:04:37Z2021-09-28T19:04:37Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-10-21T05:21:25Z2021-10-21T05:21:25Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:37.613Z2021-09-28T19:04:37.647ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:25.363Z2021-10-21T05:21:25.423ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:37 GMT + - Thu, 21 Oct 2021 05:21:25 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-09-28T19:04:38Z2021-09-28T19:04:38Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-10-21T05:21:25Z2021-10-21T05:21:25ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:38.1588895Z2021-09-28T19:04:38.1588895Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:25.8754032Z2021-10-21T05:21:25.8754032Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:37 GMT + - Thu, 21 Oct 2021 05:21:25 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -127,21 +127,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 response: body: - string: Ruleshttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:38Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-09-28T19:04:38Z2021-09-28T19:04:38ZRuleshttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:26Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-10-21T05:21:25Z2021-10-21T05:21:25Z1=1202021-09-28T19:04:38.1526595Z$Default + i:type="EmptyRuleAction"/>2021-10-21T05:21:25.8826287Z$Default headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:37 GMT + - Thu, 21 Oct 2021 05:21:25 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -175,20 +175,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-09-28T19:04:38Z2021-09-28T19:04:38Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-10-21T05:21:26Z2021-10-21T05:21:26ZPriority = 'low'20true2021-09-28T19:04:38.5026393Ztest_rule_1 + i:type="EmptyRuleAction"/>2021-10-21T05:21:26.0316618Ztest_rule_1 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:37 GMT + - Thu, 21 Oct 2021 05:21:25 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -222,20 +222,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-09-28T19:04:38Z2021-09-28T19:04:38Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-10-21T05:21:26Z2021-10-21T05:21:26ZPriority = 'middle'20true2021-09-28T19:04:38.6588864Ztest_rule_2 + i:type="EmptyRuleAction"/>2021-10-21T05:21:26.1254057Ztest_rule_2 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:38 GMT + - Thu, 21 Oct 2021 05:21:25 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -269,20 +269,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-09-28T19:04:38Z2021-09-28T19:04:38Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-10-21T05:21:26Z2021-10-21T05:21:26ZPriority = 'high'20true2021-09-28T19:04:38.8308137Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:21:26.2972801Ztest_rule_3 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:38 GMT + - Thu, 21 Oct 2021 05:21:25 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -307,42 +307,42 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 response: body: - string: Ruleshttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:38Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-09-28T19:04:38Z2021-09-28T19:04:38ZRuleshttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:26Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-10-21T05:21:25Z2021-10-21T05:21:25Z1=1202021-09-28T19:04:38.1526595Z$Defaulthttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-09-28T19:04:38Z2021-09-28T19:04:38Z2021-10-21T05:21:25.8826287Z$Defaulthttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-10-21T05:21:26Z2021-10-21T05:21:26ZPriority = 'low'20true2021-09-28T19:04:38.5120027Ztest_rule_1https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-09-28T19:04:38Z2021-09-28T19:04:38Z2021-10-21T05:21:26.0388305Ztest_rule_1https://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_2?api-version=2021-05test_rule_22021-10-21T05:21:26Z2021-10-21T05:21:26ZPriority = 'middle'20true2021-09-28T19:04:38.6526249Ztest_rule_2https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-09-28T19:04:38Z2021-09-28T19:04:38Z2021-10-21T05:21:26.1169886Ztest_rule_2https://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-10-21T05:21:26Z2021-10-21T05:21:26ZPriority = 'high'20true2021-09-28T19:04:38.8401224Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:21:26.3045037Ztest_rule_3 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:38 GMT + - Thu, 21 Oct 2021 05:21:25 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -374,9 +374,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:38 GMT + - Thu, 21 Oct 2021 05:21:25 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -399,35 +399,35 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 response: body: - string: Ruleshttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:39Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-09-28T19:04:38Z2021-09-28T19:04:38ZRuleshttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:26Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-10-21T05:21:25Z2021-10-21T05:21:25Z1=1202021-09-28T19:04:38.1526595Z$Defaulthttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-09-28T19:04:38Z2021-09-28T19:04:38Z2021-10-21T05:21:25.8826287Z$Defaulthttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_1?api-version=2021-05test_rule_12021-10-21T05:21:26Z2021-10-21T05:21:26ZPriority = 'low'20true2021-09-28T19:04:38.5120027Ztest_rule_1https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-09-28T19:04:38Z2021-09-28T19:04:38Z2021-10-21T05:21:26.0388305Ztest_rule_1https://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/test_rule_3?api-version=2021-05test_rule_32021-10-21T05:21:26Z2021-10-21T05:21:26ZPriority = 'high'20true2021-09-28T19:04:38.8401224Ztest_rule_3 + i:type="EmptyRuleAction"/>2021-10-21T05:21:26.3045037Ztest_rule_3 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:38 GMT + - Thu, 21 Oct 2021 05:21:25 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -459,9 +459,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:38 GMT + - Thu, 21 Oct 2021 05:21:25 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -491,9 +491,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:38 GMT + - Thu, 21 Oct 2021 05:21:26 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -516,21 +516,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-05 response: body: - string: Ruleshttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:39Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-09-28T19:04:38Z2021-09-28T19:04:38ZRuleshttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:26Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk/rules/$Default?api-version=2021-05$Default2021-10-21T05:21:25Z2021-10-21T05:21:25Z1=1202021-09-28T19:04:38.1526595Z$Default + i:type="EmptyRuleAction"/>2021-10-21T05:21:25.8826287Z$Default headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:38 GMT + - Thu, 21 Oct 2021 05:21:26 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -562,9 +562,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:38 GMT + - Thu, 21 Oct 2021 05:21:26 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -594,9 +594,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:39 GMT + - Thu, 21 Oct 2021 05:21:26 GMT etag: - - '637684526776470000' + - '637703904854230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_dict_error.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_dict_error.yaml index 298f385eb5d3..982347b0e5bc 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_dict_error.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_dict_error.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:40Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:27Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:40 GMT + - Thu, 21 Oct 2021 05:21:27 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:04:40Z2021-09-28T19:04:41Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:21:28Z2021-10-21T05:21:28Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:40.977Z2021-09-28T19:04:41.05ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:28.273Z2021-10-21T05:21:28.373ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:41 GMT + - Thu, 21 Oct 2021 05:21:28 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-09-28T19:04:41Z2021-09-28T19:04:41Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-10-21T05:21:28Z2021-10-21T05:21:28ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:41.5736318Z2021-09-28T19:04:41.5736318Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:28.8530452Z2021-10-21T05:21:28.8530452Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:41 GMT + - Thu, 21 Oct 2021 05:21:28 GMT etag: - - '637684526810500000' + - '637703904883730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -136,20 +136,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-09-28T19:04:41Z2021-09-28T19:04:41Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-10-21T05:21:29Z2021-10-21T05:21:29ZPriority = 'low'20true2021-09-28T19:04:41.6829611Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:29.0717664Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:41 GMT + - Thu, 21 Oct 2021 05:21:28 GMT etag: - - '637684526810500000' + - '637703904883730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -181,9 +181,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:41 GMT + - Thu, 21 Oct 2021 05:21:28 GMT etag: - - '637684526810500000' + - '637703904883730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -213,9 +213,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:41 GMT + - Thu, 21 Oct 2021 05:21:28 GMT etag: - - '637684526810500000' + - '637703904883730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -245,9 +245,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:42 GMT + - Thu, 21 Oct 2021 05:21:29 GMT etag: - - '637684526810500000' + - '637703904883730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_dict_success.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_dict_success.yaml index f629ae47b780..8e80fa00fc64 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_dict_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_dict_success.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:42Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:30Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:42 GMT + - Thu, 21 Oct 2021 05:21:30 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:04:43Z2021-09-28T19:04:43Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:21:30Z2021-10-21T05:21:30Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:43.383Z2021-09-28T19:04:43.42ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:30.827Z2021-10-21T05:21:30.86ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:42 GMT + - Thu, 21 Oct 2021 05:21:31 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-09-28T19:04:43Z2021-09-28T19:04:43Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-10-21T05:21:31Z2021-10-21T05:21:31ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:43.8758856Z2021-09-28T19:04:43.8758856Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:31.3010534Z2021-10-21T05:21:31.3010534Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:43 GMT + - Thu, 21 Oct 2021 05:21:31 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -136,20 +136,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-09-28T19:04:44Z2021-09-28T19:04:44Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-10-21T05:21:31Z2021-10-21T05:21:31ZPriority = 'low'20true2021-09-28T19:04:44.1103501Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:31.4416285Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:43 GMT + - Thu, 21 Oct 2021 05:21:31 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -174,20 +174,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:04:44Z2021-09-28T19:04:44Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:21:31Z2021-10-21T05:21:31ZPriority = 'low'20true2021-09-28T19:04:44.1068015Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:31.4330885Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:43 GMT + - Thu, 21 Oct 2021 05:21:31 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -203,7 +203,7 @@ interactions: testcidSET Priority = ''low''20true2021-09-28T19:04:44.106801Zrule' + xsi:type="SqlRuleAction">SET Priority = ''low''20true2021-10-21T05:21:31.433088Zrule' headers: Accept: - application/xml @@ -223,19 +223,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-09-28T19:04:44Z2021-09-28T19:04:44Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-10-21T05:21:31Z2021-10-21T05:21:31ZtestcidSET Priority = 'low'20true2021-09-28T19:04:44.2665033Zrule + i:type="SqlRuleAction">SET Priority = 'low'20true2021-10-21T05:21:31.5510372Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:43 GMT + - Thu, 21 Oct 2021 05:21:31 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -260,19 +260,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:04:44Z2021-09-28T19:04:44Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:21:31Z2021-10-21T05:21:31ZtestcidSET Priority = 'low'20true2021-09-28T19:04:44.1068015Zrule + i:type="SqlRuleAction">SET Priority = 'low'20true2021-10-21T05:21:31.4330885Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:43 GMT + - Thu, 21 Oct 2021 05:21:31 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -288,7 +288,7 @@ interactions: updatedcid2021-09-28T19:04:44.106801Zrule' + xsi:type="EmptyRuleAction" />2021-10-21T05:21:31.433088Zrule' headers: Accept: - application/xml @@ -308,19 +308,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-09-28T19:04:44Z2021-09-28T19:04:44Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?api-version=2021-05rule2021-10-21T05:21:31Z2021-10-21T05:21:31Zupdatedcid2021-09-28T19:04:44.4071486Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:31.6916371Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:43 GMT + - Thu, 21 Oct 2021 05:21:31 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -345,19 +345,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:04:44Z2021-09-28T19:04:44Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:21:31Z2021-10-21T05:21:31Zupdatedcid2021-09-28T19:04:44.1068015Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:31.4330885Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:43 GMT + - Thu, 21 Oct 2021 05:21:31 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -389,9 +389,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:43 GMT + - Thu, 21 Oct 2021 05:21:31 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -421,9 +421,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:43 GMT + - Thu, 21 Oct 2021 05:21:31 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -453,9 +453,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:44 GMT + - Thu, 21 Oct 2021 05:21:32 GMT etag: - - '637684526834200000' + - '637703904908600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_invalid.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_invalid.yaml index 213989eee78c..5dd0b65810fc 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_invalid.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_invalid.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:45Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:33Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:45 GMT + - Thu, 21 Oct 2021 05:21:32 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:04:46Z2021-09-28T19:04:46Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:21:33Z2021-10-21T05:21:33Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:46.083Z2021-09-28T19:04:46.11ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:33.587Z2021-10-21T05:21:33.63ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:46 GMT + - Thu, 21 Oct 2021 05:21:33 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:04:46Z2021-09-28T19:04:46Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:21:34Z2021-10-21T05:21:34ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:46.5784543Z2021-09-28T19:04:46.5784543Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:34.0847835Z2021-10-21T05:21:34.0847835Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:46 GMT + - Thu, 21 Oct 2021 05:21:34 GMT etag: - - '637684526861100000' + - '637703904936300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -136,20 +136,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-09-28T19:04:46Z2021-09-28T19:04:46Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-10-21T05:21:34Z2021-10-21T05:21:34ZPriority = 'low'20true2021-09-28T19:04:46.7815283Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:34.3348121Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:46 GMT + - Thu, 21 Oct 2021 05:21:34 GMT etag: - - '637684526861100000' + - '637703904936300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -174,20 +174,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:04:46Z2021-09-28T19:04:46Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:21:34Z2021-10-21T05:21:34ZPriority = 'low'20true2021-09-28T19:04:46.7760934Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:34.3242269Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:46 GMT + - Thu, 21 Oct 2021 05:21:34 GMT etag: - - '637684526861100000' + - '637703904936300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -203,7 +203,7 @@ interactions: Priority = ''low''20true2021-09-28T19:04:46.776093Ziewdm' + xsi:type="EmptyRuleAction" />2021-10-21T05:21:34.324226Ziewdm' headers: Accept: - application/xml @@ -224,15 +224,15 @@ interactions: response: body: string: 404Entity 'servicebustestsbname:Topic:fjrui|eqkovc|iewdm' - was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:d7fe1734-e21b-4b92-8e25-a762f21fa722_B7, - SystemTracker:NoSystemTracker, Timestamp:2021-09-28T19:04:46 + was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:6b3405cd-aa0f-4cc8-9214-7cbc72acf08c_B9, + SystemTracker:NoSystemTracker, Timestamp:2021-10-21T05:21:34 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:47 GMT + - Thu, 21 Oct 2021 05:21:35 GMT etag: - - '637684526861100000' + - '637703904936300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -264,9 +264,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:47 GMT + - Thu, 21 Oct 2021 05:21:35 GMT etag: - - '637684526861100000' + - '637703904936300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -296,9 +296,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:47 GMT + - Thu, 21 Oct 2021 05:21:35 GMT etag: - - '637684526861100000' + - '637703904936300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -328,9 +328,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:48 GMT + - Thu, 21 Oct 2021 05:21:35 GMT etag: - - '637684526861100000' + - '637703904936300000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_success.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_success.yaml index da2a5e639db3..1ba344e9eb76 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_rules.test_mgmt_rule_update_success.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:49Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:36Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:48 GMT + - Thu, 21 Oct 2021 05:21:35 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:04:49Z2021-09-28T19:04:49Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:21:36Z2021-10-21T05:21:37Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:49.617Z2021-09-28T19:04:49.66ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:36.953Z2021-10-21T05:21:37.013ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:49 GMT + - Thu, 21 Oct 2021 05:21:36 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:04:50Z2021-09-28T19:04:50Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:21:37Z2021-10-21T05:21:37ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:50.1697806Z2021-09-28T19:04:50.1697806Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:37.5706999Z2021-10-21T05:21:37.5706999Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:49 GMT + - Thu, 21 Oct 2021 05:21:36 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -136,20 +136,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-09-28T19:04:50Z2021-09-28T19:04:50Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-10-21T05:21:37Z2021-10-21T05:21:37ZPriority = 'low'20true2021-09-28T19:04:50.3572924Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:37.7581523Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:49 GMT + - Thu, 21 Oct 2021 05:21:37 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -174,20 +174,20 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:04:50Z2021-09-28T19:04:50Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:21:37Z2021-10-21T05:21:37ZPriority = 'low'20true2021-09-28T19:04:50.3617179Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:37.7536548Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:49 GMT + - Thu, 21 Oct 2021 05:21:37 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -203,7 +203,7 @@ interactions: testcidSET Priority = ''low''20true2021-09-28T19:04:50.361717Zrule' + xsi:type="SqlRuleAction">SET Priority = ''low''20true2021-10-21T05:21:37.753654Zrule' headers: Accept: - application/xml @@ -223,19 +223,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-09-28T19:04:50Z2021-09-28T19:04:50Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-10-21T05:21:37Z2021-10-21T05:21:37ZtestcidSET Priority = 'low'20true2021-09-28T19:04:50.5291671Zrule + i:type="SqlRuleAction">SET Priority = 'low'20true2021-10-21T05:21:37.9300148Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:49 GMT + - Thu, 21 Oct 2021 05:21:37 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -260,19 +260,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:04:50Z2021-09-28T19:04:50Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:21:37Z2021-10-21T05:21:37ZtestcidSET Priority = 'low'20true2021-09-28T19:04:50.3617179Zrule + i:type="SqlRuleAction">SET Priority = 'low'20true2021-10-21T05:21:37.7536548Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:49 GMT + - Thu, 21 Oct 2021 05:21:37 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -288,7 +288,7 @@ interactions: updatedcid2021-09-28T19:04:50.361717Zrule' + xsi:type="EmptyRuleAction" />2021-10-21T05:21:37.753654Zrule' headers: Accept: - application/xml @@ -308,19 +308,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-09-28T19:04:50Z2021-09-28T19:04:50Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?api-version=2021-05rule2021-10-21T05:21:38Z2021-10-21T05:21:38Zupdatedcid2021-09-28T19:04:50.7479078Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:38.1175151Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:50 GMT + - Thu, 21 Oct 2021 05:21:37 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -345,19 +345,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-09-28T19:04:50Z2021-09-28T19:04:50Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc/rules/rule?enrich=false&api-version=2021-05rule2021-10-21T05:21:37Z2021-10-21T05:21:37Zupdatedcid2021-09-28T19:04:50.3617179Zrule + i:type="EmptyRuleAction"/>2021-10-21T05:21:37.7536548Zrule headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:50 GMT + - Thu, 21 Oct 2021 05:21:37 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -389,9 +389,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:50 GMT + - Thu, 21 Oct 2021 05:21:37 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -421,9 +421,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:50 GMT + - Thu, 21 Oct 2021 05:21:37 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -453,9 +453,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:50 GMT + - Thu, 21 Oct 2021 05:21:38 GMT etag: - - '637684526896600000' + - '637703904970130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_by_name.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_by_name.yaml index 65a087a66ed3..26660d2a56b7 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_by_name.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_by_name.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:52Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:39Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:51 GMT + - Thu, 21 Oct 2021 05:21:39 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-09-28T19:04:52Z2021-09-28T19:04:52Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-10-21T05:21:39Z2021-10-21T05:21:39Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:52.5Z2021-09-28T19:04:52.53ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:39.803Z2021-10-21T05:21:39.87ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:52 GMT + - Thu, 21 Oct 2021 05:21:40 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-09-28T19:04:53Z2021-09-28T19:04:53Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?api-version=2021-05sub_testkkk2021-10-21T05:21:40Z2021-10-21T05:21:40ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:53.0013543Z2021-09-28T19:04:53.0013543Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:40.3925469Z2021-10-21T05:21:40.3925469Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:52 GMT + - Thu, 21 Oct 2021 05:21:40 GMT etag: - - '637684526925300000' + - '637703904998700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -127,19 +127,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?enrich=false&api-version=2021-05sub_testkkk2021-09-28T19:04:52Z2021-09-28T19:04:52Zsb://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf/subscriptions/sub_testkkk?enrich=false&api-version=2021-05sub_testkkk2021-10-21T05:21:40Z2021-10-21T05:21:40ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:52.9974232Z2021-09-28T19:04:52.9974232Z2021-09-28T19:04:52.9974232ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:40.3895964Z2021-10-21T05:21:40.3895964Z2021-10-21T05:21:40.39Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:52 GMT + - Thu, 21 Oct 2021 05:21:40 GMT etag: - - '637684526925300000' + - '637703904998700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -171,9 +171,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:52 GMT + - Thu, 21 Oct 2021 05:21:40 GMT etag: - - '637684526925300000' + - '637703904998700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -203,9 +203,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:52 GMT + - Thu, 21 Oct 2021 05:21:40 GMT etag: - - '637684526925300000' + - '637703904998700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_duplicate.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_duplicate.yaml index 9fdc3f6a75ab..32a84aad7725 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_duplicate.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_duplicate.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:54Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:41Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:54 GMT + - Thu, 21 Oct 2021 05:21:41 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-09-28T19:04:54Z2021-09-28T19:04:54Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-10-21T05:21:42Z2021-10-21T05:21:42Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:54.91Z2021-09-28T19:04:54.96ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:42.12Z2021-10-21T05:21:42.18ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:55 GMT + - Thu, 21 Oct 2021 05:21:42 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05kkaqo2021-09-28T19:04:55Z2021-09-28T19:04:55Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/dqkodq/subscriptions/kkaqo?api-version=2021-05kkaqo2021-10-21T05:21:42Z2021-10-21T05:21:42ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:04:55.4832836Z2021-09-28T19:04:55.4832836Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:42.6353564Z2021-10-21T05:21:42.6353564Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:55 GMT + - Thu, 21 Oct 2021 05:21:42 GMT etag: - - '637684526949600000' + - '637703905021800000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -135,15 +135,15 @@ interactions: response: body: string: 409The messaging entity 'servicebustestsbname:Topic:dqkodq|kkaqo' - already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:54565b43-60de-486e-81f7-ec75c525220c_B11, - SystemTracker:NoSystemTracker, Timestamp:2021-09-28T19:04:55 + already exists. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:2ec96a7b-0627-494d-a37a-91c40bea0701_B14, + SystemTracker:NoSystemTracker, Timestamp:2021-10-21T05:21:42 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:56 GMT + - Thu, 21 Oct 2021 05:21:43 GMT etag: - - '637684526949600000' + - '637703905021800000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -175,9 +175,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:56 GMT + - Thu, 21 Oct 2021 05:21:43 GMT etag: - - '637684526949600000' + - '637703905021800000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -207,9 +207,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:56 GMT + - Thu, 21 Oct 2021 05:21:44 GMT etag: - - '637684526949600000' + - '637703905021800000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_with_forward_to.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_with_forward_to.yaml index 9962b7ae2283..6a5aa82034f4 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_with_forward_to.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_with_forward_to.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:04:57Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:44Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:57 GMT + - Thu, 21 Oct 2021 05:21:44 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkfthj?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dkfthj?api-version=2021-05dkfthj2021-09-28T19:04:58Z2021-09-28T19:04:58Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dkfthj?api-version=2021-05dkfthj2021-10-21T05:21:45Z2021-10-21T05:21:45Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:04:58Z2021-09-28T19:04:58.05ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:21:45.207Z2021-10-21T05:21:45.267ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:58 GMT + - Thu, 21 Oct 2021 05:21:45 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,16 +91,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidkforward?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/iweidkforward?api-version=2021-05iweidkforward2021-09-28T19:04:58Z2021-09-28T19:04:58Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/iweidkforward?api-version=2021-05iweidkforward2021-10-21T05:21:46Z2021-10-21T05:21:46Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:04:58.863Z2021-09-28T19:04:58.9ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:46.127Z2021-10-21T05:21:46.157ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:59 GMT + - Thu, 21 Oct 2021 05:21:46 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -114,7 +114,7 @@ interactions: body: ' sb://servicebustestappwyrpk4k.servicebus.windows.net/dkfthjsb://servicebustestappwyrpk4k.servicebus.windows.net/dkfthj' + type="application/xml">sb://servicebustestaweyco6xnr.servicebus.windows.net/dkfthjsb://servicebustestaweyco6xnr.servicebus.windows.net/dkfthj' headers: Accept: - application/xml @@ -127,27 +127,27 @@ interactions: Content-Type: - application/atom+xml ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Fdkfthj&sig=7TtVex826m6SSVIP4uY996LuxgKXF8C1szz%2fgiE7u%2fA%3d&se=1632859498&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Fdkfthj&sig=CmZdSv2GLAIVvM5jrHrTUsMumzX4EjOk3quuwusmdt0%3d&se=1634797306&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Fdkfthj&sig=7TtVex826m6SSVIP4uY996LuxgKXF8C1szz%2fgiE7u%2fA%3d&se=1632859498&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Fdkfthj&sig=CmZdSv2GLAIVvM5jrHrTUsMumzX4EjOk3quuwusmdt0%3d&se=1634797306&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05kdosakoforward2021-09-28T19:04:59Z2021-09-28T19:04:59Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?api-version=2021-05kdosakoforward2021-10-21T05:21:46Z2021-10-21T05:21:46ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/dkfthj2021-09-28T19:04:59.3817116Z2021-09-28T19:04:59.3817116Z0001-01-01T00:00:00sb://servicebustestappwyrpk4k.servicebus.windows.net/dkfthjP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/dkfthj2021-10-21T05:21:46.6331204Z2021-10-21T05:21:46.6331204Z0001-01-01T00:00:00sb://servicebustestaweyco6xnr.servicebus.windows.net/dkfthjP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:59 GMT + - Thu, 21 Oct 2021 05:21:46 GMT etag: - - '637684526989000000' + - '637703905061570000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -172,19 +172,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?enrich=false&api-version=2021-05kdosakoforward2021-09-28T19:04:59Z2021-09-28T19:04:59Zsb://servicebustestaweyco6xnr.servicebus.windows.net/iweidkforward/subscriptions/kdosakoforward?enrich=false&api-version=2021-05kdosakoforward2021-10-21T05:21:46Z2021-10-21T05:21:46ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/dkfthj2021-09-28T19:04:59.38558Z2021-09-28T19:04:59.38558Z2021-09-28T19:04:59.387Z00000sb://servicebustestappwyrpk4k.servicebus.windows.net/dkfthjP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/dkfthj2021-10-21T05:21:46.6310135Z2021-10-21T05:21:46.6310135Z2021-10-21T05:21:46.6310135Z00000sb://servicebustestaweyco6xnr.servicebus.windows.net/dkfthjP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:04:59 GMT + - Thu, 21 Oct 2021 05:21:46 GMT etag: - - '637684526989000000' + - '637703905061570000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -216,9 +216,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:04:59 GMT + - Thu, 21 Oct 2021 05:21:46 GMT etag: - - '637684526989000000' + - '637703905061570000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -248,9 +248,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:00 GMT + - Thu, 21 Oct 2021 05:21:46 GMT etag: - - '637684526989000000' + - '637703905061570000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -280,9 +280,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:00 GMT + - Thu, 21 Oct 2021 05:21:47 GMT etag: - - '637684526980500000' + - '637703905052670000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_with_subscription_description.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_with_subscription_description.yaml index 01bf6221620e..5aa946a0c4f1 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_with_subscription_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_create_with_subscription_description.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:01Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:48Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:00 GMT + - Thu, 21 Oct 2021 05:21:47 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-09-28T19:05:01Z2021-09-28T19:05:01Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-10-21T05:21:48Z2021-10-21T05:21:48Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:01.48Z2021-09-28T19:05:01.563ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:48.583Z2021-10-21T05:21:48.66ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:01 GMT + - Thu, 21 Oct 2021 05:21:48 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05kdosako2021-09-28T19:05:02Z2021-09-28T19:05:02Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/iweidk/subscriptions/kdosako?api-version=2021-05kdosako2021-10-21T05:21:49Z2021-10-21T05:21:49ZPT13StruePT11Mtruetrue014trueActive2021-09-28T19:05:02.0568431Z2021-09-28T19:05:02.0568431Z0001-01-01T00:00:00PT10MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13StruePT11Mtruetrue014trueActive2021-10-21T05:21:49.1031669Z2021-10-21T05:21:49.1031669Z0001-01-01T00:00:00PT10MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:01 GMT + - Thu, 21 Oct 2021 05:21:48 GMT etag: - - '637684527015630000' + - '637703905086600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -127,19 +127,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk/subscriptions/kdosako?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/iweidk/subscriptions/kdosako?enrich=false&api-version=2021-05kdosako2021-09-28T19:05:02Z2021-09-28T19:05:02Zsb://servicebustestaweyco6xnr.servicebus.windows.net/iweidk/subscriptions/kdosako?enrich=false&api-version=2021-05kdosako2021-10-21T05:21:49Z2021-10-21T05:21:49ZPT13StruePT11Mtruetrue014trueActive2021-09-28T19:05:02.068326Z2021-09-28T19:05:02.068326Z2021-09-28T19:05:02.068326ZPT13StruePT11Mtruetrue014trueActive2021-10-21T05:21:49.1132928Z2021-10-21T05:21:49.1132928Z2021-10-21T05:21:49.1132928Z00000PT10MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:01 GMT + - Thu, 21 Oct 2021 05:21:48 GMT etag: - - '637684527015630000' + - '637703905086600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -171,18 +171,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk/subscriptions/pfkxmq?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/iweidk/subscriptions/pfkxmq?api-version=2021-05pfkxmq2021-09-28T19:05:02Z2021-09-28T19:05:02Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/iweidk/subscriptions/pfkxmq?api-version=2021-05pfkxmq2021-10-21T05:21:49Z2021-10-21T05:21:49ZPT13StruePT11Mtruetrue014trueActive2021-09-28T19:05:02.3380859Z2021-09-28T19:05:02.3380859Z0001-01-01T00:00:00PT10MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT13StruePT11Mtruetrue014trueActive2021-10-21T05:21:49.4468968Z2021-10-21T05:21:49.4468968Z0001-01-01T00:00:00PT10MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:01 GMT + - Thu, 21 Oct 2021 05:21:48 GMT etag: - - '637684527015630000' + - '637703905086600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -207,19 +207,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk/subscriptions/pfkxmq?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/iweidk/subscriptions/pfkxmq?enrich=false&api-version=2021-05pfkxmq2021-09-28T19:05:02Z2021-09-28T19:05:02Zsb://servicebustestaweyco6xnr.servicebus.windows.net/iweidk/subscriptions/pfkxmq?enrich=false&api-version=2021-05pfkxmq2021-10-21T05:21:49Z2021-10-21T05:21:49ZPT13StruePT11Mtruetrue014trueActive2021-09-28T19:05:02.3339502Z2021-09-28T19:05:02.3339502Z2021-09-28T19:05:02.3339502ZPT13StruePT11Mtruetrue014trueActive2021-10-21T05:21:49.4570162Z2021-10-21T05:21:49.4570162Z2021-10-21T05:21:49.4570162Z00000PT10MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:01 GMT + - Thu, 21 Oct 2021 05:21:48 GMT etag: - - '637684527015630000' + - '637703905086600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -251,9 +251,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:01 GMT + - Thu, 21 Oct 2021 05:21:48 GMT etag: - - '637684527015630000' + - '637703905086600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -283,9 +283,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:01 GMT + - Thu, 21 Oct 2021 05:21:48 GMT etag: - - '637684527015630000' + - '637703905086600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -315,9 +315,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:02 GMT + - Thu, 21 Oct 2021 05:21:49 GMT etag: - - '637684527015630000' + - '637703905086600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_delete.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_delete.yaml index b5575c8fd291..bd4231f17136 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_delete.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_delete.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:03Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:50Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:03 GMT + - Thu, 21 Oct 2021 05:21:50 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda?api-version=2021-05test_topicgda2021-09-28T19:05:03Z2021-09-28T19:05:03Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda?api-version=2021-05test_topicgda2021-10-21T05:21:51Z2021-10-21T05:21:51Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:03.86Z2021-09-28T19:05:03.923ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:51.12Z2021-10-21T05:21:51.153ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:03 GMT + - Thu, 21 Oct 2021 05:21:51 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-09-28T19:05:04Z2021-09-28T19:05:04Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-10-21T05:21:51Z2021-10-21T05:21:51ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:04.3741863Z2021-09-28T19:05:04.3741863Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:51.6302787Z2021-10-21T05:21:51.6302787Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:04 GMT + - Thu, 21 Oct 2021 05:21:51 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -127,21 +127,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:04Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-09-28T19:05:04Z2021-09-28T19:05:04ZSubscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:51Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-10-21T05:21:51Z2021-10-21T05:21:51ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:04.3772829Z2021-09-28T19:05:04.3772829Z2021-09-28T19:05:04.3772829ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:51.6299491Z2021-10-21T05:21:51.6299491Z2021-10-21T05:21:51.63Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:04 GMT + - Thu, 21 Oct 2021 05:21:51 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -173,18 +173,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-09-28T19:05:04Z2021-09-28T19:05:04Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-10-21T05:21:51Z2021-10-21T05:21:51ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:04.5616863Z2021-09-28T19:05:04.5616863Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:51.8490327Z2021-10-21T05:21:51.8490327Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:04 GMT + - Thu, 21 Oct 2021 05:21:51 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -209,27 +209,27 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:04Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-09-28T19:05:04Z2021-09-28T19:05:04ZSubscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:51Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?api-version=2021-05test_sub1da2021-10-21T05:21:51Z2021-10-21T05:21:51ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:04.3772829Z2021-09-28T19:05:04.3772829Z2021-09-28T19:05:04.3772829ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:51.6299491Z2021-10-21T05:21:51.6299491Z2021-10-21T05:21:51.63Z00000P10675199DT2H48M5.4775807SAvailablefalsehttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-09-28T19:05:04Z2021-09-28T19:05:04Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-10-21T05:21:51Z2021-10-21T05:21:51ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:04.5648368Z2021-09-28T19:05:04.5648368Z2021-09-28T19:05:04.5648368ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:51.8487375Z2021-10-21T05:21:51.8487375Z2021-10-21T05:21:51.8487375Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:04 GMT + - Thu, 21 Oct 2021 05:21:51 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -254,19 +254,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?enrich=false&api-version=2021-05test_sub1da2021-09-28T19:05:04Z2021-09-28T19:05:04Zsb://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions/test_sub1da?enrich=false&api-version=2021-05test_sub1da2021-10-21T05:21:51Z2021-10-21T05:21:51ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:04.3772829Z2021-09-28T19:05:04.3772829Z2021-09-28T19:05:04.3772829ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:51.6299491Z2021-10-21T05:21:51.6299491Z2021-10-21T05:21:51.63Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:04 GMT + - Thu, 21 Oct 2021 05:21:51 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -298,9 +298,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:04 GMT + - Thu, 21 Oct 2021 05:21:51 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -323,21 +323,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:04Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-09-28T19:05:04Z2021-09-28T19:05:04ZSubscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:52Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions/test_sub2gcv?api-version=2021-05test_sub2gcv2021-10-21T05:21:51Z2021-10-21T05:21:51ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:04.5648368Z2021-09-28T19:05:04.5648368Z2021-09-28T19:05:04.5648368ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:51.8487375Z2021-10-21T05:21:51.8487375Z2021-10-21T05:21:51.8487375Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:04 GMT + - Thu, 21 Oct 2021 05:21:51 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -369,9 +369,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:04 GMT + - Thu, 21 Oct 2021 05:21:51 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -394,15 +394,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:04Z + string: Subscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topicgda/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:52Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:04 GMT + - Thu, 21 Oct 2021 05:21:51 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -434,9 +434,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:05 GMT + - Thu, 21 Oct 2021 05:21:52 GMT etag: - - '637684527039230000' + - '637703905111530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_get_runtime_properties_basic.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_get_runtime_properties_basic.yaml index 0be3b436c793..5827a58aab28 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_get_runtime_properties_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_get_runtime_properties_basic.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:05Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:53Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:05 GMT + - Thu, 21 Oct 2021 05:21:52 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dcvxqa?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dcvxqa?api-version=2021-05dcvxqa2021-09-28T19:05:06Z2021-09-28T19:05:06Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dcvxqa?api-version=2021-05dcvxqa2021-10-21T05:21:53Z2021-10-21T05:21:53Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:06.347Z2021-09-28T19:05:06.377ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:53.633Z2021-10-21T05:21:53.693ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:06 GMT + - Thu, 21 Oct 2021 05:21:53 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05xvazzag2021-09-28T19:05:06Z2021-09-28T19:05:06Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?api-version=2021-05xvazzag2021-10-21T05:21:54Z2021-10-21T05:21:54ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:06.8198089Z2021-09-28T19:05:06.8198089Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:54.222156Z2021-10-21T05:21:54.222156Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:06 GMT + - Thu, 21 Oct 2021 05:21:53 GMT etag: - - '637684527063770000' + - '637703905136930000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -127,19 +127,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?enrich=false&api-version=2021-05xvazzag2021-09-28T19:05:06Z2021-09-28T19:05:06Zsb://servicebustestaweyco6xnr.servicebus.windows.net/dcvxqa/subscriptions/xvazzag?enrich=false&api-version=2021-05xvazzag2021-10-21T05:21:54Z2021-10-21T05:21:54ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:06.8263492Z2021-09-28T19:05:06.8263492Z2021-09-28T19:05:06.827ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:54.2104308Z2021-10-21T05:21:54.2104308Z2021-10-21T05:21:54.2104308Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:06 GMT + - Thu, 21 Oct 2021 05:21:53 GMT etag: - - '637684527063770000' + - '637703905136930000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -171,9 +171,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:06 GMT + - Thu, 21 Oct 2021 05:21:53 GMT etag: - - '637684527063770000' + - '637703905136930000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -203,9 +203,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:07 GMT + - Thu, 21 Oct 2021 05:21:54 GMT etag: - - '637684527063770000' + - '637703905136930000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_list.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_list.yaml index f649eb1ede0e..0cadf02d53d0 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_list.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_list.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:08Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:55Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:07 GMT + - Thu, 21 Oct 2021 05:21:55 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/lkoqxc?api-version=2021-05lkoqxc2021-09-28T19:05:08Z2021-09-28T19:05:08Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/lkoqxc?api-version=2021-05lkoqxc2021-10-21T05:21:56Z2021-10-21T05:21:56Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:08.59Z2021-09-28T19:05:08.627ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:56.07Z2021-10-21T05:21:56.227ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:08 GMT + - Thu, 21 Oct 2021 05:21:56 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,15 +84,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:09Z + string: Subscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:56Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:08 GMT + - Thu, 21 Oct 2021 05:21:56 GMT etag: - - '637684527086270000' + - '637703905162270000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -124,18 +124,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05testsub12021-09-28T19:05:09Z2021-09-28T19:05:09Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05testsub12021-10-21T05:21:56Z2021-10-21T05:21:56ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:09.1193777Z2021-09-28T19:05:09.1193777Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:56.7802839Z2021-10-21T05:21:56.7802839Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:08 GMT + - Thu, 21 Oct 2021 05:21:56 GMT etag: - - '637684527086270000' + - '637703905162270000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -167,18 +167,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05testsub22021-09-28T19:05:09Z2021-09-28T19:05:09Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05testsub22021-10-21T05:21:57Z2021-10-21T05:21:57ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:09.3225051Z2021-09-28T19:05:09.3225051Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:57.0459016Z2021-10-21T05:21:57.0459016Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:08 GMT + - Thu, 21 Oct 2021 05:21:56 GMT etag: - - '637684527086270000' + - '637703905162270000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -203,27 +203,27 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:09Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05testsub12021-09-28T19:05:09Z2021-09-28T19:05:09ZSubscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:57Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/lkoqxc/subscriptions/testsub1?api-version=2021-05testsub12021-10-21T05:21:56Z2021-10-21T05:21:56ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:09.1279801Z2021-09-28T19:05:09.1279801Z2021-09-28T19:05:09.1279801ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:56.7658706Z2021-10-21T05:21:56.7658706Z2021-10-21T05:21:56.767Z00000P10675199DT2H48M5.4775807SAvailablefalsehttps://servicebustestappwyrpk4k.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05testsub22021-09-28T19:05:09Z2021-09-28T19:05:09Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/lkoqxc/subscriptions/testsub2?api-version=2021-05testsub22021-10-21T05:21:57Z2021-10-21T05:21:57ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:09.3154639Z2021-09-28T19:05:09.3154639Z2021-09-28T19:05:09.3154639ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:57.0471267Z2021-10-21T05:21:57.0471267Z2021-10-21T05:21:57.0471267Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:08 GMT + - Thu, 21 Oct 2021 05:21:56 GMT etag: - - '637684527086270000' + - '637703905162270000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -255,9 +255,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:08 GMT + - Thu, 21 Oct 2021 05:21:57 GMT etag: - - '637684527086270000' + - '637703905162270000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -287,9 +287,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:08 GMT + - Thu, 21 Oct 2021 05:21:57 GMT etag: - - '637684527086270000' + - '637703905162270000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -312,15 +312,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:09Z + string: Subscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/lkoqxc/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:57Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:08 GMT + - Thu, 21 Oct 2021 05:21:57 GMT etag: - - '637684527086270000' + - '637703905162270000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -352,9 +352,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:09 GMT + - Thu, 21 Oct 2021 05:21:57 GMT etag: - - '637684527086270000' + - '637703905162270000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_list_runtime_properties.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_list_runtime_properties.yaml index 5d09f4871697..716c8918b722 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_list_runtime_properties.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_list_runtime_properties.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:10Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:58Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:10 GMT + - Thu, 21 Oct 2021 05:21:58 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dkoamv?api-version=2021-05dkoamv2021-09-28T19:05:11Z2021-09-28T19:05:11Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dkoamv?api-version=2021-05dkoamv2021-10-21T05:21:58Z2021-10-21T05:21:58Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:11.143Z2021-09-28T19:05:11.19ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:21:58.837Z2021-10-21T05:21:58.887ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:11 GMT + - Thu, 21 Oct 2021 05:21:59 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,15 +84,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:11Z + string: Subscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:59Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:11 GMT + - Thu, 21 Oct 2021 05:21:59 GMT etag: - - '637684527111900000' + - '637703905188870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -117,15 +117,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:11Z + string: Subscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:59Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:11 GMT + - Thu, 21 Oct 2021 05:21:59 GMT etag: - - '637684527111900000' + - '637703905188870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -157,18 +157,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-09-28T19:05:11Z2021-09-28T19:05:11Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-10-21T05:21:59Z2021-10-21T05:21:59ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:11.8452694Z2021-09-28T19:05:11.8452694Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:59.4068659Z2021-10-21T05:21:59.4068659Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:12 GMT + - Thu, 21 Oct 2021 05:21:59 GMT etag: - - '637684527111900000' + - '637703905188870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -193,21 +193,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:12Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-09-28T19:05:11Z2021-09-28T19:05:11ZSubscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:59Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-10-21T05:21:59Z2021-10-21T05:21:59ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:11.844377Z2021-09-28T19:05:11.844377Z2021-09-28T19:05:11.844377ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:59.4027056Z2021-10-21T05:21:59.4027056Z2021-10-21T05:21:59.403Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:12 GMT + - Thu, 21 Oct 2021 05:21:59 GMT etag: - - '637684527111900000' + - '637703905188870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -232,21 +232,21 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:12Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-09-28T19:05:11Z2021-09-28T19:05:11ZSubscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:59Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/dkoamv/subscriptions/cxqplc?api-version=2021-05cxqplc2021-10-21T05:21:59Z2021-10-21T05:21:59ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:11.844377Z2021-09-28T19:05:11.844377Z2021-09-28T19:05:11.844377ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:21:59.4027056Z2021-10-21T05:21:59.4027056Z2021-10-21T05:21:59.403Z00000P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:12 GMT + - Thu, 21 Oct 2021 05:21:59 GMT etag: - - '637684527111900000' + - '637703905188870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -278,9 +278,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:12 GMT + - Thu, 21 Oct 2021 05:21:59 GMT etag: - - '637684527111900000' + - '637703905188870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -303,15 +303,15 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-05 response: body: - string: Subscriptionshttps://servicebustestappwyrpk4k.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:12Z + string: Subscriptionshttps://servicebustestaweyco6xnr.servicebus.windows.net/dkoamv/subscriptions?$skip=0&$top=100&api-version=2021-052021-10-21T05:21:59Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:12 GMT + - Thu, 21 Oct 2021 05:21:59 GMT etag: - - '637684527111900000' + - '637703905188870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -343,9 +343,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:12 GMT + - Thu, 21 Oct 2021 05:22:00 GMT etag: - - '637684527111900000' + - '637703905188870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_dict_error.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_dict_error.yaml index 8727e4cb17fd..304cd126e441 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_dict_error.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_dict_error.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:13Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:00Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:13 GMT + - Thu, 21 Oct 2021 05:22:00 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjdfj?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dfjdfj?api-version=2021-05dfjdfj2021-09-28T19:05:13Z2021-09-28T19:05:13Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dfjdfj?api-version=2021-05dfjdfj2021-10-21T05:22:01Z2021-10-21T05:22:01Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:13.853Z2021-09-28T19:05:13.903ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:01.23Z2021-10-21T05:22:01.277ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:13 GMT + - Thu, 21 Oct 2021 05:22:01 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjdfj/subscriptions/kwqxd?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dfjdfj/subscriptions/kwqxd?api-version=2021-05kwqxd2021-09-28T19:05:14Z2021-09-28T19:05:14Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/dfjdfj/subscriptions/kwqxd?api-version=2021-05kwqxd2021-10-21T05:22:01Z2021-10-21T05:22:01ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:14.3602209Z2021-09-28T19:05:14.3602209Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:01.7356824Z2021-10-21T05:22:01.7356824Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:14 GMT + - Thu, 21 Oct 2021 05:22:01 GMT etag: - - '637684527139030000' + - '637703905212770000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -134,9 +134,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:14 GMT + - Thu, 21 Oct 2021 05:22:01 GMT etag: - - '637684527139030000' + - '637703905212770000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -166,9 +166,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:14 GMT + - Thu, 21 Oct 2021 05:22:02 GMT etag: - - '637684527139030000' + - '637703905212770000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_dict_success.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_dict_success.yaml index 00e327e57843..7b36f4ab7687 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_dict_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_dict_success.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:15Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:03Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:15 GMT + - Thu, 21 Oct 2021 05:22:03 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:05:16Z2021-09-28T19:05:16Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:03Z2021-10-21T05:22:03Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:16.04Z2021-09-28T19:05:16.08ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:03.623Z2021-10-21T05:22:03.66ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:03 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-09-28T19:05:16Z2021-09-28T19:05:16Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-10-21T05:22:04Z2021-10-21T05:22:04ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:16.5321735Z2021-09-28T19:05:16.5321735Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:04.1275171Z2021-10-21T05:22:04.1275171Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -136,18 +136,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-09-28T19:05:16Z2021-09-28T19:05:16Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-10-21T05:22:04Z2021-10-21T05:22:04ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:05:16.7196705Z2021-09-28T19:05:16.7196705Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:04.2056576Z2021-10-21T05:22:04.2056576Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -172,19 +172,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05eqkovcd2021-09-28T19:05:16Z2021-09-28T19:05:16Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05eqkovcd2021-10-21T05:22:04Z2021-10-21T05:22:04ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:05:16.5392247Z2021-09-28T19:05:16.7581952Z2021-09-28T19:05:16.54ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:04.1198844Z2021-10-21T05:22:04.1980141Z2021-10-21T05:22:04.12Z00000P10675199DT2H48M5.477539SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -218,18 +218,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-09-28T19:05:16Z2021-09-28T19:05:16Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-10-21T05:22:04Z2021-10-21T05:22:04ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:05:16.8446667Z2021-09-28T19:05:16.8446667Z0001-01-01T00:00:00PT10MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:04.2838011Z2021-10-21T05:22:04.2838011Z0001-01-01T00:00:00PT10MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -254,19 +254,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05eqkovcd2021-09-28T19:05:16Z2021-09-28T19:05:16Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05eqkovcd2021-10-21T05:22:04Z2021-10-21T05:22:04ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:05:16.5392247Z2021-09-28T19:05:16.8835796Z2021-09-28T19:05:16.54ZPT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:04.1198844Z2021-10-21T05:22:04.291794Z2021-10-21T05:22:04.12Z00000PT10MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -280,7 +280,7 @@ interactions: body: ' PT12SfalsePT11Mtruetrue14trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruidsb://servicebustestappwyrpk4k.servicebus.windows.net/fjruidPT10MAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue14trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruidsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruidPT10MAvailable' headers: Accept: - application/xml @@ -295,27 +295,27 @@ interactions: If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjruid&sig=XwmCkZBJX5aDufNd3%2bC6mDzGEOtt5xoEmFj9kUqNLUM%3d&se=1632859516&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjruid&sig=gV2SHa7sR46Z8qkqmoctelMl2VbSz5xhInrkLjFVX74%3d&se=1634797324&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjruid&sig=XwmCkZBJX5aDufNd3%2bC6mDzGEOtt5xoEmFj9kUqNLUM%3d&se=1632859516&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjruid&sig=gV2SHa7sR46Z8qkqmoctelMl2VbSz5xhInrkLjFVX74%3d&se=1634797324&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-09-28T19:05:16Z2021-09-28T19:05:16Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-10-21T05:22:04Z2021-10-21T05:22:04ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid2021-09-28T19:05:16.9696671Z2021-09-28T19:05:16.9696671Z0001-01-01T00:00:00sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruidP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid2021-10-21T05:22:04.377529Z2021-10-21T05:22:04.377529Z0001-01-01T00:00:00sb://servicebustestaweyco6xnr.servicebus.windows.net/fjruidP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -340,19 +340,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05eqkovcd2021-09-28T19:05:16Z2021-09-28T19:05:16Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05eqkovcd2021-10-21T05:22:04Z2021-10-21T05:22:04ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid2021-09-28T19:05:16.5392247Z2021-09-28T19:05:16.9773627Z2021-09-28T19:05:16.54Z00000sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruidP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid2021-10-21T05:22:04.1198844Z2021-10-21T05:22:04.3855113Z2021-10-21T05:22:04.12Z00000sb://servicebustestaweyco6xnr.servicebus.windows.net/fjruidP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -386,18 +386,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-09-28T19:05:17Z2021-09-28T19:05:17Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?api-version=2021-05eqkovcd2021-10-21T05:22:04Z2021-10-21T05:22:04ZPT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:05:17.1415451Z2021-09-28T19:05:17.1415451Z0001-01-01T00:00:00PT15MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:22:04.4713051Z2021-10-21T05:22:04.4713051Z0001-01-01T00:00:00PT15MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -422,19 +422,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05eqkovcd2021-09-28T19:05:16Z2021-09-28T19:05:17Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjruid/subscriptions/eqkovcd?enrich=false&api-version=2021-05eqkovcd2021-10-21T05:22:04Z2021-10-21T05:22:04ZPT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:05:16.5392247Z2021-09-28T19:05:17.1648524Z2021-09-28T19:05:16.54ZPT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:22:04.1198844Z2021-10-21T05:22:04.4792601Z2021-10-21T05:22:04.12Z00000PT15MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -466,9 +466,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:16 GMT + - Thu, 21 Oct 2021 05:22:04 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -498,9 +498,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:17 GMT + - Thu, 21 Oct 2021 05:22:05 GMT etag: - - '637684527160800000' + - '637703905236600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_invalid.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_invalid.yaml index 88af496757e3..ba48f6612788 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_invalid.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_invalid.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:18Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:05Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:18 GMT + - Thu, 21 Oct 2021 05:22:05 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjfj?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-09-28T19:05:18Z2021-09-28T19:05:19Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-10-21T05:22:06Z2021-10-21T05:22:06Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:18.87Z2021-09-28T19:05:19.113ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:06.08Z2021-10-21T05:22:06.153ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:19 GMT + - Thu, 21 Oct 2021 05:22:06 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,18 +91,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05kwqxc2021-09-28T19:05:19Z2021-09-28T19:05:19Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/dfjfj/subscriptions/kwqxc?api-version=2021-05kwqxc2021-10-21T05:22:06Z2021-10-21T05:22:06ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:19.611918Z2021-09-28T19:05:19.611918Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:06.6804127Z2021-10-21T05:22:06.6804127Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:19 GMT + - Thu, 21 Oct 2021 05:22:06 GMT etag: - - '637684527191130000' + - '637703905261530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -116,7 +116,7 @@ interactions: body: ' PT1MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:05:19.611918Z2021-09-28T19:05:19.611918Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' + type="application/xml">PT1MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:06.680412Z2021-10-21T05:22:06.680412Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml @@ -137,15 +137,15 @@ interactions: response: body: string: 404Entity 'servicebustestsbname:Topic:dfjfj|iewdm' - was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:c8daecfb-314b-4295-8d50-ff19c9fe22c0_B2, - SystemTracker:NoSystemTracker, Timestamp:2021-09-28T19:05:19 + was not found. To know more visit https://aka.ms/sbResourceMgrExceptions. TrackingId:dc9e43db-20a8-4bea-8dc1-7cf2b202071a_B4, + SystemTracker:NoSystemTracker, Timestamp:2021-10-21T05:22:06 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:20 GMT + - Thu, 21 Oct 2021 05:22:07 GMT etag: - - '637684527191130000' + - '637703905261530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -159,7 +159,7 @@ interactions: body: ' P25DfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:05:19.611918Z2021-09-28T19:05:19.611918Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' + type="application/xml">P25DfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:06.680412Z2021-10-21T05:22:06.680412Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml @@ -185,15 +185,15 @@ interactions: Parameter name: LockDuration - Actual value was 25.00:00:00. TrackingId:bc0029ee-abd9-426e-9b6e-a726ce1dc76d_G13, - SystemTracker:servicebustestsbname:Topic:dfjfj, Timestamp:2021-09-28T19:05:20' + Actual value was 25.00:00:00. TrackingId:fb4f2132-5799-498a-975e-5891faa44be4_G8, + SystemTracker:servicebustestsbname:Topic:dfjfj, Timestamp:2021-10-21T05:22:07' headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:21 GMT + - Thu, 21 Oct 2021 05:22:08 GMT etag: - - '637684527191130000' + - '637703905261530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -225,9 +225,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:21 GMT + - Thu, 21 Oct 2021 05:22:08 GMT etag: - - '637684527191130000' + - '637703905261530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -257,9 +257,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:21 GMT + - Thu, 21 Oct 2021 05:22:08 GMT etag: - - '637684527191130000' + - '637703905261530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_success.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_success.yaml index 42fc61b66dbb..ee399fe3ad9c 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_subscriptions.test_mgmt_subscription_update_success.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:22Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:09Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:22 GMT + - Thu, 21 Oct 2021 05:22:09 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfkla?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dfkla?api-version=2021-05dfkla2021-09-28T19:05:23Z2021-09-28T19:05:23Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dfkla?api-version=2021-05dfkla2021-10-21T05:22:10Z2021-10-21T05:22:10Zservicebustestaweyco6xnrPT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-09-28T19:05:23.453Z2021-09-28T19:05:23.483ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1M1024falsefalseP10675199DT2H48M5.4775807SfalsePT10M10true00falseActive2021-10-21T05:22:10.23Z2021-10-21T05:22:10.253ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:22 GMT + - Thu, 21 Oct 2021 05:22:10 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,16 +91,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:05:24Z2021-09-28T19:05:24Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:11Z2021-10-21T05:22:11Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:24.357Z2021-09-28T19:05:24.397ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:11.107Z2021-10-21T05:22:11.16ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:23 GMT + - Thu, 21 Oct 2021 05:22:11 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -132,18 +132,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:24Z2021-09-28T19:05:24Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:11Z2021-10-21T05:22:11ZPT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-09-28T19:05:24.8769244Z2021-09-28T19:05:24.8769244Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT1MfalseP10675199DT2H48M5.4775807Sfalsetrue010trueActive2021-10-21T05:22:11.6259366Z2021-10-21T05:22:11.6259366Z0001-01-01T00:00:00P10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:23 GMT + - Thu, 21 Oct 2021 05:22:11 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -157,7 +157,7 @@ interactions: body: ' PT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:05:24.876924Z2021-09-28T19:05:24.876924Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' + type="application/xml">PT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:11.625936Z2021-10-21T05:22:11.625936Z0001-01-01T00:00:00.000ZP10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml @@ -177,18 +177,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:24Z2021-09-28T19:05:24Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:12Z2021-10-21T05:22:12ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:05:24.9863273Z2021-09-28T19:05:24.9863273Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:12.0165705Z2021-10-21T05:22:12.0165705Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:11 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -213,19 +213,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:05:24Z2021-09-28T19:05:25Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:11Z2021-10-21T05:22:12ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-09-28T19:05:24.8630409Z2021-09-28T19:05:25.0036255Z2021-09-28T19:05:24.8630409ZPT2MfalseP10675199DT2H48M5.477539Sfalsetrue010trueActive2021-10-21T05:22:11.6327199Z2021-10-21T05:22:12.0545972Z2021-10-21T05:22:11.633Z00000P10675199DT2H48M5.477539SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -240,7 +240,7 @@ interactions: PT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:05:24.86304Z2021-09-28T19:05:25.003625Z2021-09-28T19:05:24.86304Z00000PT10MAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:11.632719Z2021-10-21T05:22:12.054597Z2021-10-21T05:22:11.633Z00000PT10MAvailable' headers: Accept: - application/xml @@ -249,7 +249,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1380' + - '1379' Content-Type: - application/atom+xml If-Match: @@ -260,18 +260,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:25Z2021-09-28T19:05:25Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:12Z2021-10-21T05:22:12ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:05:25.1269158Z2021-09-28T19:05:25.1269158Z0001-01-01T00:00:00PT10MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:12.1571957Z2021-10-21T05:22:12.1571957Z0001-01-01T00:00:00PT10MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -296,19 +296,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:05:24Z2021-09-28T19:05:25Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:11Z2021-10-21T05:22:12ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:05:24.8630409Z2021-09-28T19:05:25.1286351Z2021-09-28T19:05:24.8630409ZPT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:11.6327199Z2021-10-21T05:22:12.1639839Z2021-10-21T05:22:11.633Z00000PT10MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -323,7 +323,7 @@ interactions: PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui2021-09-28T19:05:24.86304Z2021-09-28T19:05:25.128635Z2021-09-28T19:05:24.86304Z00000sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruiPT10MAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui2021-10-21T05:22:11.632719Z2021-10-21T05:22:12.163983Z2021-10-21T05:22:11.633Z00000sb://servicebustestaweyco6xnr.servicebus.windows.net/fjruiPT10MAvailable' headers: Accept: - application/xml @@ -332,33 +332,33 @@ interactions: Connection: - keep-alive Content-Length: - - '1582' + - '1581' Content-Type: - application/atom+xml If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjrui&sig=0V%2fiRqgyJgHFoXHoLBbtQKFdT4oD5ukFSISOQ5j%2f8pM%3d&se=1632859524&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjrui&sig=CiW5aqQuVhyK6XBxzoCSuJm4356r0adO%2bbNqVwKiKis%3d&se=1634797332&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Ffjrui&sig=0V%2fiRqgyJgHFoXHoLBbtQKFdT4oD5ukFSISOQ5j%2f8pM%3d&se=1632859524&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Ffjrui&sig=CiW5aqQuVhyK6XBxzoCSuJm4356r0adO%2bbNqVwKiKis%3d&se=1634797332&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:25Z2021-09-28T19:05:25Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:12Z2021-10-21T05:22:12ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui2021-09-28T19:05:25.2987922Z2021-09-28T19:05:25.2987922Z0001-01-01T00:00:00sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui2021-10-21T05:22:12.2821952Z2021-10-21T05:22:12.2821952Z0001-01-01T00:00:00sb://servicebustestaweyco6xnr.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -383,19 +383,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:05:24Z2021-09-28T19:05:25Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:11Z2021-10-21T05:22:12ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui2021-09-28T19:05:24.8630409Z2021-09-28T19:05:25.3161252Z2021-09-28T19:05:24.8630409Z00000sb://servicebustestappwyrpk4k.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui2021-10-21T05:22:11.6327199Z2021-10-21T05:22:12.3046763Z2021-10-21T05:22:11.633Z00000sb://servicebustestaweyco6xnr.servicebus.windows.net/fjruiP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -410,7 +410,7 @@ interactions: PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/dfkla2021-09-28T19:05:24.86304Z2021-09-28T19:05:25.316125Z2021-09-28T19:05:24.86304Z00000sb://servicebustestappwyrpk4k.servicebus.windows.net/dfklaP10675199DT2H48M5.477539SAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/dfkla2021-10-21T05:22:11.632719Z2021-10-21T05:22:12.304676Z2021-10-21T05:22:11.633Z00000sb://servicebustestaweyco6xnr.servicebus.windows.net/dfklaP10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml @@ -419,33 +419,33 @@ interactions: Connection: - keep-alive Content-Length: - - '1602' + - '1601' Content-Type: - application/atom+xml If-Match: - '*' ServiceBusDlqSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Fdfkla&sig=HxBnRRxZAXemCgNqpTWyJLX1K%2bBtWkZ2f8GgdcocKjc%3d&se=1632859524&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Fdfkla&sig=CoJbkj8U3KTgLTAnQMgUg2OJHp4RF9pRPyIyMsDu%2b5Q%3d&se=1634797332&skn=RootManageSharedAccessKey ServiceBusSupplementaryAuthorization: - - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestappwyrpk4k.servicebus.windows.net%2Fdfkla&sig=HxBnRRxZAXemCgNqpTWyJLX1K%2bBtWkZ2f8GgdcocKjc%3d&se=1632859524&skn=RootManageSharedAccessKey + - SharedAccessSignature sr=sb%3A%2F%2Fservicebustestaweyco6xnr.servicebus.windows.net%2Fdfkla&sig=CoJbkj8U3KTgLTAnQMgUg2OJHp4RF9pRPyIyMsDu%2b5Q%3d&se=1634797332&skn=RootManageSharedAccessKey User-Agent: - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) method: PUT uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:25Z2021-09-28T19:05:25Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:12Z2021-10-21T05:22:12ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/dfkla2021-09-28T19:05:25.4550415Z2021-09-28T19:05:25.4550415Z0001-01-01T00:00:00sb://servicebustestappwyrpk4k.servicebus.windows.net/dfklaP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/dfkla2021-10-21T05:22:12.391599Z2021-10-21T05:22:12.391599Z0001-01-01T00:00:00sb://servicebustestaweyco6xnr.servicebus.windows.net/dfklaP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -470,19 +470,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:05:24Z2021-09-28T19:05:25Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:11Z2021-10-21T05:22:12ZPT12SfalsePT11Mtruetrue014trueActivesb://servicebustestappwyrpk4k.servicebus.windows.net/dfkla2021-09-28T19:05:24.8630409Z2021-09-28T19:05:25.4568125Z2021-09-28T19:05:24.8630409Z00000sb://servicebustestappwyrpk4k.servicebus.windows.net/dfklaP10675199DT2H48M5.4775807SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActivesb://servicebustestaweyco6xnr.servicebus.windows.net/dfkla2021-10-21T05:22:11.6327199Z2021-10-21T05:22:12.4139779Z2021-10-21T05:22:11.633Z00000sb://servicebustestaweyco6xnr.servicebus.windows.net/dfklaP10675199DT2H48M5.4775807SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -497,7 +497,7 @@ interactions: PT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:05:24.86304Z2021-09-28T19:05:25.456812Z2021-09-28T19:05:24.86304Z00000P10675199DT2H48M5.477539SAvailable' + type="application/xml">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:11.632719Z2021-10-21T05:22:12.413977Z2021-10-21T05:22:11.633Z00000P10675199DT2H48M5.477539SAvailable' headers: Accept: - application/xml @@ -506,7 +506,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1400' + - '1399' Content-Type: - application/atom+xml If-Match: @@ -517,18 +517,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:25Z2021-09-28T19:05:25Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:12Z2021-10-21T05:22:12ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:05:25.5800888Z2021-09-28T19:05:25.5800888Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:12.5198113Z2021-10-21T05:22:12.5198113Z0001-01-01T00:00:00P10675199DT2H48M5.477539SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -553,19 +553,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:05:24Z2021-09-28T19:05:25Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:11Z2021-10-21T05:22:12ZPT12SfalsePT11Mtruetrue014trueActive2021-09-28T19:05:24.8630409Z2021-09-28T19:05:25.5817846Z2021-09-28T19:05:24.8630409ZPT12SfalsePT11Mtruetrue014trueActive2021-10-21T05:22:11.6327199Z2021-10-21T05:22:12.523361Z2021-10-21T05:22:11.633Z00000P10675199DT2H48M5.477539SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -580,7 +580,7 @@ interactions: PT3M3SfalsePT11M2Struetrue014trueActive2021-09-28T19:05:24.86304Z2021-09-28T19:05:25.581784Z2021-09-28T19:05:24.86304Z00000PT10M1SAvailable' + type="application/xml">PT3M3SfalsePT11M2Struetrue014trueActive2021-10-21T05:22:11.632719Z2021-10-21T05:22:12.523361Z2021-10-21T05:22:11.633Z00000PT10M1SAvailable' headers: Accept: - application/xml @@ -589,7 +589,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1385' + - '1384' Content-Type: - application/atom+xml If-Match: @@ -600,18 +600,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:25Z2021-09-28T19:05:25Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:12Z2021-10-21T05:22:12ZPT3M3SfalsePT11M2Struetrue014trueActive2021-09-28T19:05:25.7050912Z2021-09-28T19:05:25.7050912Z0001-01-01T00:00:00PT10M1SAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT3M3SfalsePT11M2Struetrue014trueActive2021-10-21T05:22:12.6415743Z2021-10-21T05:22:12.6415743Z0001-01-01T00:00:00PT10M1SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -636,19 +636,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:05:24Z2021-09-28T19:05:25Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:11Z2021-10-21T05:22:12ZPT3M3SfalsePT11M2Struetrue014trueActive2021-09-28T19:05:24.8630409Z2021-09-28T19:05:25.7067931Z2021-09-28T19:05:24.8630409ZPT3M3SfalsePT11M2Struetrue014trueActive2021-10-21T05:22:11.6327199Z2021-10-21T05:22:12.6483507Z2021-10-21T05:22:11.633Z00000PT10M1SAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -663,7 +663,7 @@ interactions: PT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:05:24.86304Z2021-09-28T19:05:25.706793Z2021-09-28T19:05:24.86304Z00000PT15MAvailable' + type="application/xml">PT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:22:11.632719Z2021-10-21T05:22:12.64835Z2021-10-21T05:22:11.633Z00000PT15MAvailable' headers: Accept: - application/xml @@ -672,7 +672,7 @@ interactions: Connection: - keep-alive Content-Length: - - '1381' + - '1379' Content-Type: - application/atom+xml If-Match: @@ -683,18 +683,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-09-28T19:05:25Z2021-09-28T19:05:25Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?api-version=2021-05eqkovc2021-10-21T05:22:12Z2021-10-21T05:22:12ZPT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:05:25.8144198Z2021-09-28T19:05:25.8144198Z0001-01-01T00:00:00PT15MAvailablefalse + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:22:12.7353237Z2021-10-21T05:22:12.7353237Z0001-01-01T00:00:00PT15MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -719,19 +719,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05 response: body: - string: sb://servicebustestappwyrpk4k.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-09-28T19:05:24Z2021-09-28T19:05:25Zsb://servicebustestaweyco6xnr.servicebus.windows.net/fjrui/subscriptions/eqkovc?enrich=false&api-version=2021-05eqkovc2021-10-21T05:22:11Z2021-10-21T05:22:12ZPT17SfalsePT16Mfalsetrue015trueActive2021-09-28T19:05:24.8630409Z2021-09-28T19:05:25.8161249Z2021-09-28T19:05:24.8630409ZPT17SfalsePT16Mfalsetrue015trueActive2021-10-21T05:22:11.6327199Z2021-10-21T05:22:12.7421045Z2021-10-21T05:22:11.633Z00000PT15MAvailablefalse headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:24 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -763,9 +763,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:25 GMT + - Thu, 21 Oct 2021 05:22:12 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -795,9 +795,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:25 GMT + - Thu, 21 Oct 2021 05:22:13 GMT etag: - - '637684527243970000' + - '637703905311600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -827,9 +827,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:26 GMT + - Thu, 21 Oct 2021 05:22:13 GMT etag: - - '637684527234830000' + - '637703905302530000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_queue_basic_v2017_04.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_queue_basic_v2017_04.yaml new file mode 100644 index 000000000000..b3c56692a9f7 --- /dev/null +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_queue_basic_v2017_04.yaml @@ -0,0 +1,461 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestzigzmm4q35.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:06:37Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:37 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: https://servicebustestzigzmm4q35.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:06:37Z2021-10-21T05:06:37Zservicebustestzigzmm4q35P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:06:37.663Z2021-10-21T05:06:37.753ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:38 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestzigzmm4q35.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:06:38Zhttps://servicebustestzigzmm4q35.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:06:37Z2021-10-21T05:06:37Zservicebustestzigzmm4q35P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:06:37.663Z2021-10-21T05:06:37.753Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:38 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestzigzmm4q35.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04test_topic2021-10-21T05:06:37Z2021-10-21T05:06:37Zservicebustestzigzmm4q35P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:06:37.663Z2021-10-21T05:06:37.753Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:38 GMT + etag: + - '637703895977530000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 21 Oct 2021 05:06:38 GMT + etag: + - '637703895977530000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestzigzmm4q35.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:06:39Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:39 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/topic_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'TopicDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:b33c398c-a1e7-4aa1-b96a-c96c8aea4622_G6, SystemTracker:servicebustestsbname.servicebus.windows.net:topic_can_not_be_created, + Timestamp:2021-10-21T05:06:39 + headers: + content-type: + - application/xml; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:39 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 400 + message: Bad Request +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: https://servicebustestzigzmm4q35.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:06:40Z2021-10-21T05:06:40Zservicebustestzigzmm4q35P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:06:40.38Z2021-10-21T05:06:40.45ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:39 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestzigzmm4q35.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:06:41Zhttps://servicebustestzigzmm4q35.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:06:40Z2021-10-21T05:06:40Zservicebustestzigzmm4q35P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:06:40.38Z2021-10-21T05:06:40.45Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:40 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestzigzmm4q35.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04test_topic2021-10-21T05:06:40Z2021-10-21T05:06:40Zservicebustestzigzmm4q35P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:06:40.38Z2021-10-21T05:06:40.45Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:40 GMT + etag: + - '637703896004500000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 21 Oct 2021 05:06:40 GMT + etag: + - '637703896004500000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestzigzmm4q35.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:06:42Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:42 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/topic_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'TopicDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:78bfa1e5-66c2-475e-8799-61d37e461ff3_G13, SystemTracker:servicebustestsbname.servicebus.windows.net:topic_can_not_be_created, + Timestamp:2021-10-21T05:06:42 + headers: + content-type: + - application/xml; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:06:42 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 400 + message: Bad Request +version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_basic_v2017_04.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_basic_v2017_04.yaml new file mode 100644 index 000000000000..b2334fbfea9b --- /dev/null +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_basic_v2017_04.yaml @@ -0,0 +1,461 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:22:14Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:14 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: https://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:22:14Z2021-10-21T05:22:15Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:14.97Z2021-10-21T05:22:15ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:15 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:22:15Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:22:14Z2021-10-21T05:22:15Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:14.97Z2021-10-21T05:22:15Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:15 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04test_topic2021-10-21T05:22:14Z2021-10-21T05:22:15Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:14.97Z2021-10-21T05:22:15Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:15 GMT + etag: + - '637703905350000000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 21 Oct 2021 05:22:16 GMT + etag: + - '637703905350000000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:22:16Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:16 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/topic_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'TopicDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:dd4bbb98-32e1-4f4a-9399-c0d1342d1c9a_G6, SystemTracker:servicebustestsbname.servicebus.windows.net:topic_can_not_be_created, + Timestamp:2021-10-21T05:22:17 + headers: + content-type: + - application/xml; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:17 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 400 + message: Bad Request +- request: + body: ' + + ' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '248' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: https://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:22:17Z2021-10-21T05:22:17Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:17.723Z2021-10-21T05:22:17.78ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:17 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:22:18Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2017-04test_topic2021-10-21T05:22:17Z2021-10-21T05:22:17Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:17.723Z2021-10-21T05:22:17.78Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:17 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04 + response: + body: + string: https://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?enrich=false&api-version=2017-04test_topic2021-10-21T05:22:17Z2021-10-21T05:22:17Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:17.723Z2021-10-21T05:22:17.78Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse + headers: + content-type: + - application/atom+xml;type=entry;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:17 GMT + etag: + - '637703905377800000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: DELETE + uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2017-04 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 21 Oct 2021 05:22:18 GMT + etag: + - '637703905377800000' + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: GET + uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-04 + response: + body: + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2017-042021-10-21T05:22:19Z + headers: + content-type: + - application/atom+xml;type=feed;charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:18 GMT + server: + - Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: ' + + 1024' + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '324' + Content-Type: + - application/atom+xml + User-Agent: + - azsdk-python-servicebusmanagementclient/2021-05 Python/3.7.10 (Windows-10-10.0.22000-SP0) + method: PUT + uri: https://servicebustestsbname.servicebus.windows.net/topic_can_not_be_created?api-version=2017-04 + response: + body: + string: 400SubCode=40000. The entity description + of type 'TopicDescription' has unsupported properties for api-version '2017-04' + in the request. Try including the correct api-version query string in the + request. TrackingId:fe1c634e-74d4-46a9-adca-eb3bc498f627_G7, SystemTracker:servicebustestsbname.servicebus.windows.net:topic_can_not_be_created, + Timestamp:2021-10-21T05:22:20 + headers: + content-type: + - application/xml; charset=utf-8 + date: + - Thu, 21 Oct 2021 05:22:19 GMT + server: + - Microsoft-HTTPAPI/2.0 + strict-transport-security: + - max-age=31536000 + transfer-encoding: + - chunked + status: + code: 400 + message: Bad Request +version: 1 diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_by_name.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_by_name.yaml index 1d938708f42c..cee30c7b4111 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_by_name.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_by_name.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:27Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:20Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:27 GMT + - Thu, 21 Oct 2021 05:22:20 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-09-28T19:05:28Z2021-09-28T19:05:28Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf?api-version=2021-05topic_testaddf2021-10-21T05:22:21Z2021-10-21T05:22:21Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:28.333Z2021-09-28T19:05:28.403ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:21.163Z2021-10-21T05:22:21.2ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:28 GMT + - Thu, 21 Oct 2021 05:22:21 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,19 +84,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/topic_testaddf?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/topic_testaddf?enrich=false&api-version=2021-05topic_testaddf2021-09-28T19:05:28Z2021-09-28T19:05:28Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/topic_testaddf?enrich=false&api-version=2021-05topic_testaddf2021-10-21T05:22:21Z2021-10-21T05:22:21Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:28.333Z2021-09-28T19:05:28.403Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:21.163Z2021-10-21T05:22:21.2Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:28 GMT + - Thu, 21 Oct 2021 05:22:21 GMT etag: - - '637684527284030000' + - '637703905412000000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -128,9 +128,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:29 GMT + - Thu, 21 Oct 2021 05:22:22 GMT etag: - - '637684527284030000' + - '637703905412000000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_duplicate.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_duplicate.yaml index e85417093256..35b5a2986a8c 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_duplicate.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_duplicate.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:29Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:22Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:29 GMT + - Thu, 21 Oct 2021 05:22:21 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dqkodq?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-09-28T19:05:30Z2021-09-28T19:05:30Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dqkodq?api-version=2021-05dqkodq2021-10-21T05:22:23Z2021-10-21T05:22:23Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:30.44Z2021-09-28T19:05:30.473ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:23.097Z2021-10-21T05:22:23.133ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:30 GMT + - Thu, 21 Oct 2021 05:22:22 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -93,15 +93,15 @@ interactions: body: string: 409SubCode=40900. Conflict. You're requesting an operation that isn't allowed in the resource's current state. To know more - visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:1e820553-4060-4e18-b26c-c82f1567a06f_G5, - SystemTracker:servicebustestsbname.servicebus.windows.net:dqkodq, Timestamp:2021-09-28T19:05:30 + visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:26d442ad-6fba-4048-b783-633653879044_G3, + SystemTracker:servicebustestsbname.servicebus.windows.net:dqkodq, Timestamp:2021-10-21T05:22:23 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:30 GMT + - Thu, 21 Oct 2021 05:22:22 GMT etag: - - '637684527304730000' + - '637703905431330000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -133,9 +133,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:31 GMT + - Thu, 21 Oct 2021 05:22:23 GMT etag: - - '637684527304730000' + - '637703905431330000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_with_topic_description.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_with_topic_description.yaml index 3fa5cc0e4bee..85b767437c6f 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_with_topic_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_create_with_topic_description.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestmmj5i6jihq.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T22:18:13Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:24Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 22:18:13 GMT + - Thu, 21 Oct 2021 05:22:24 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?api-version=2021-05 response: body: - string: https://servicebustestmmj5i6jihq.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-09-28T22:18:14Z2021-09-28T22:18:14Zservicebustestmmj5i6jihqhttps://servicebustestaweyco6xnr.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-10-21T05:22:25Z2021-10-21T05:22:25Zservicebustestaweyco6xnrPT11M49152falsePT12Mtrue0falsefalseActive2021-09-28T22:18:14.38Z2021-09-28T22:18:14.787ZfalsePT10MtrueAvailablefalsetrue256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT11M49152falsePT12Mtrue0falsefalseActive2021-10-21T05:22:25.14Z2021-10-21T05:22:25.337ZfalsePT10MtrueAvailablefalsetrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 22:18:14 GMT + - Thu, 21 Oct 2021 05:22:25 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,19 +84,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestmmj5i6jihq.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-09-28T22:18:14Z2021-09-28T22:18:14Zservicebustestmmj5i6jihqhttps://servicebustestaweyco6xnr.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-10-21T05:22:25Z2021-10-21T05:22:25Zservicebustestaweyco6xnrPT11M49152falsePT12Mtrue0falsefalseActive2021-09-28T22:18:14.38Z2021-09-28T22:18:14.787Z0001-01-01T00:00:00ZfalsePT11M49152falsePT12Mtrue0falsefalseActive2021-10-21T05:22:25.14Z2021-10-21T05:22:25.337Z0001-01-01T00:00:00Zfalse000000PT10MtrueAvailablefalsetrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 22:18:14 GMT + - Thu, 21 Oct 2021 05:22:25 GMT etag: - - '637684642947870000' + - '637703905453370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -128,16 +128,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/djsadq?api-version=2021-05 response: body: - string: https://servicebustestmmj5i6jihq.servicebus.windows.net/djsadq?api-version=2021-05djsadq2021-09-28T22:18:15Z2021-09-28T22:18:15Zservicebustestmmj5i6jihqhttps://servicebustestaweyco6xnr.servicebus.windows.net/djsadq?api-version=2021-05djsadq2021-10-21T05:22:26Z2021-10-21T05:22:26Zservicebustestaweyco6xnrPT11M49152falsePT12Mtrue0falsefalseActive2021-09-28T22:18:15.693Z2021-09-28T22:18:15.87ZfalsePT10MtrueAvailablefalsetrue256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT11M49152falsePT12Mtrue0falsefalseActive2021-10-21T05:22:26.26Z2021-10-21T05:22:26.373ZfalsePT10MtrueAvailablefalsetrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 22:18:15 GMT + - Thu, 21 Oct 2021 05:22:26 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -162,19 +162,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/djsadq?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestmmj5i6jihq.servicebus.windows.net/djsadq?enrich=false&api-version=2021-05djsadq2021-09-28T22:18:15Z2021-09-28T22:18:15Zservicebustestmmj5i6jihqhttps://servicebustestaweyco6xnr.servicebus.windows.net/djsadq?enrich=false&api-version=2021-05djsadq2021-10-21T05:22:26Z2021-10-21T05:22:26Zservicebustestaweyco6xnrPT11M49152falsePT12Mtrue0falsefalseActive2021-09-28T22:18:15.693Z2021-09-28T22:18:15.87Z0001-01-01T00:00:00ZfalsePT11M49152falsePT12Mtrue0falsefalseActive2021-10-21T05:22:26.26Z2021-10-21T05:22:26.373Z0001-01-01T00:00:00Zfalse000000PT10MtrueAvailablefalsetrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 22:18:15 GMT + - Thu, 21 Oct 2021 05:22:26 GMT etag: - - '637684642958700000' + - '637703905463730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -207,13 +207,13 @@ interactions: response: body: string: 400SubCode=40000. Bad Request. To know more - visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:925506b1-5e6a-481f-b349-9c67dfdce5ef_G0, - SystemTracker:servicebustestsbname.servicebus.windows.net:famviq, Timestamp:2021-09-28T22:18:16 + visit https://aka.ms/sbResourceMgrExceptions. . TrackingId:c9fb4a46-b7d0-4257-9eae-3d1cc8d7b8d4_G13, + SystemTracker:servicebustestsbname.servicebus.windows.net:famviq, Timestamp:2021-10-21T05:22:27 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 22:18:16 GMT + - Thu, 21 Oct 2021 05:22:26 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -245,9 +245,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 22:18:16 GMT + - Thu, 21 Oct 2021 05:22:27 GMT etag: - - '637684642947870000' + - '637703905453370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -277,9 +277,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 22:18:17 GMT + - Thu, 21 Oct 2021 05:22:27 GMT etag: - - '637684642958700000' + - '637703905463730000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_delete.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_delete.yaml index 430177ca6202..8deb4204e524 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_delete.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_delete.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:36Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:28Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:36 GMT + - Thu, 21 Oct 2021 05:22:27 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:05:37Z2021-09-28T19:05:37Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:22:29Z2021-10-21T05:22:29Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:37.33Z2021-09-28T19:05:37.37ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:29.203Z2021-10-21T05:22:29.237ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:37 GMT + - Thu, 21 Oct 2021 05:22:28 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,19 +84,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:38Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:05:37Z2021-09-28T19:05:37Zservicebustestappwyrpk4kTopicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:30Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:22:29Z2021-10-21T05:22:29Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:37.33Z2021-09-28T19:05:37.37Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:29.203Z2021-10-21T05:22:29.237Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:38 GMT + - Thu, 21 Oct 2021 05:22:29 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -126,16 +126,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/txt%2F.-_123?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:05:38Z2021-09-28T19:05:38Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:22:30Z2021-10-21T05:22:30Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:38.703Z2021-09-28T19:05:38.747ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:30.593Z2021-10-21T05:22:30.62ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:39 GMT + - Thu, 21 Oct 2021 05:22:30 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -160,25 +160,25 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:39Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:05:37Z2021-09-28T19:05:37Zservicebustestappwyrpk4kTopicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:31Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:22:29Z2021-10-21T05:22:29Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:37.33Z2021-09-28T19:05:37.37Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:29.203Z2021-10-21T05:22:29.237Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:05:38Z2021-09-28T19:05:38Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:22:30Z2021-10-21T05:22:30Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:38.703Z2021-09-28T19:05:38.747Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:30.593Z2021-10-21T05:22:30.62Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:39 GMT + - Thu, 21 Oct 2021 05:22:30 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -201,19 +201,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05test_topic2021-09-28T19:05:37Z2021-09-28T19:05:37Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05test_topic2021-10-21T05:22:29Z2021-10-21T05:22:29Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:37.33Z2021-09-28T19:05:37.37Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:29.203Z2021-10-21T05:22:29.237Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:39 GMT + - Thu, 21 Oct 2021 05:22:30 GMT etag: - - '637684527373700000' + - '637703905492370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -245,9 +245,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:40 GMT + - Thu, 21 Oct 2021 05:22:30 GMT etag: - - '637684527373700000' + - '637703905492370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -270,19 +270,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:40Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-09-28T19:05:38Z2021-09-28T19:05:38Zservicebustestappwyrpk4kTopicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:32Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/txt/.-_123?api-version=2021-05txt/.-_1232021-10-21T05:22:30Z2021-10-21T05:22:30Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:38.703Z2021-09-28T19:05:38.747Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:30.593Z2021-10-21T05:22:30.62Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:40 GMT + - Thu, 21 Oct 2021 05:22:31 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -305,19 +305,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/txt%2F.-_123?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/txt/.-_123?enrich=false&api-version=2021-05txt/.-_1232021-09-28T19:05:38Z2021-09-28T19:05:38Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/txt/.-_123?enrich=false&api-version=2021-05txt/.-_1232021-10-21T05:22:30Z2021-10-21T05:22:30Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:38.703Z2021-09-28T19:05:38.747Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:30.593Z2021-10-21T05:22:30.62Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:40 GMT + - Thu, 21 Oct 2021 05:22:31 GMT etag: - - '637684527387470000' + - '637703905506200000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -349,9 +349,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:41 GMT + - Thu, 21 Oct 2021 05:22:31 GMT etag: - - '637684527387470000' + - '637703905506200000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -374,13 +374,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:41Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:33Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:41 GMT + - Thu, 21 Oct 2021 05:22:33 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_get_runtime_properties_basic.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_get_runtime_properties_basic.yaml index fbbf7609d14c..2428e22b196e 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_get_runtime_properties_basic.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_get_runtime_properties_basic.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:41Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:33Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:41 GMT + - Thu, 21 Oct 2021 05:22:33 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:05:42Z2021-09-28T19:05:42Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:22:34Z2021-10-21T05:22:34Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:42.38Z2021-09-28T19:05:42.443ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:34.37Z2021-10-21T05:22:34.44ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:42 GMT + - Thu, 21 Oct 2021 05:22:34 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,19 +84,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05test_topic2021-09-28T19:05:42Z2021-09-28T19:05:42Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?enrich=false&api-version=2021-05test_topic2021-10-21T05:22:34Z2021-10-21T05:22:34Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:42.38Z2021-09-28T19:05:42.443Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:34.37Z2021-10-21T05:22:34.44Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:42 GMT + - Thu, 21 Oct 2021 05:22:34 GMT etag: - - '637684527424430000' + - '637703905544400000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -128,9 +128,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:42 GMT + - Thu, 21 Oct 2021 05:22:35 GMT etag: - - '637684527424430000' + - '637703905544400000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_list.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_list.yaml index b6b555d96112..1fe58860873a 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_list.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_list.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:44Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:36Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:44 GMT + - Thu, 21 Oct 2021 05:22:35 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -43,13 +43,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:44Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:36Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:44 GMT + - Thu, 21 Oct 2021 05:22:36 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -79,16 +79,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic_1?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topic_1?api-version=2021-05test_topic_12021-09-28T19:05:45Z2021-09-28T19:05:45Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic_1?api-version=2021-05test_topic_12021-10-21T05:22:36Z2021-10-21T05:22:37Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:45.08Z2021-09-28T19:05:45.14ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:36.96Z2021-10-21T05:22:37.293ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:45 GMT + - Thu, 21 Oct 2021 05:22:37 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -120,16 +120,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic_2?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topic_2?api-version=2021-05test_topic_22021-09-28T19:05:45Z2021-09-28T19:05:46Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic_2?api-version=2021-05test_topic_22021-10-21T05:22:38Z2021-10-21T05:22:38Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:45.977Z2021-09-28T19:05:46.05ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:38.077Z2021-10-21T05:22:38.123ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:46 GMT + - Thu, 21 Oct 2021 05:22:38 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -154,25 +154,25 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:47Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topic_1?api-version=2021-05test_topic_12021-09-28T19:05:45Z2021-09-28T19:05:45Zservicebustestappwyrpk4kTopicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:38Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic_1?api-version=2021-05test_topic_12021-10-21T05:22:36Z2021-10-21T05:22:37Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:45.08Z2021-09-28T19:05:45.14Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:36.96Z2021-10-21T05:22:37.293Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256https://servicebustestappwyrpk4k.servicebus.windows.net/test_topic_2?api-version=2021-05test_topic_22021-09-28T19:05:45Z2021-09-28T19:05:46Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic_2?api-version=2021-05test_topic_22021-10-21T05:22:38Z2021-10-21T05:22:38Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:45.977Z2021-09-28T19:05:46.05Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:38.077Z2021-10-21T05:22:38.123Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:46 GMT + - Thu, 21 Oct 2021 05:22:38 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -202,9 +202,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:47 GMT + - Thu, 21 Oct 2021 05:22:39 GMT etag: - - '637684527451400000' + - '637703905572930000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -234,9 +234,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:48 GMT + - Thu, 21 Oct 2021 05:22:39 GMT etag: - - '637684527460500000' + - '637703905581230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -259,13 +259,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:48Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:40Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:48 GMT + - Thu, 21 Oct 2021 05:22:40 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_list_runtime_properties.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_list_runtime_properties.yaml index 79105e34de3a..834147bb35e7 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_list_runtime_properties.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_list_runtime_properties.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:49Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:40Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:49 GMT + - Thu, 21 Oct 2021 05:22:40 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -43,13 +43,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:49Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:41Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:49 GMT + - Thu, 21 Oct 2021 05:22:40 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -72,13 +72,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:50Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:41Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:50 GMT + - Thu, 21 Oct 2021 05:22:41 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -108,16 +108,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/test_topic?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:05:50Z2021-09-28T19:05:50Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:22:42Z2021-10-21T05:22:42Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:50.59Z2021-09-28T19:05:50.613ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:42.32Z2021-10-21T05:22:42.417ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:50 GMT + - Thu, 21 Oct 2021 05:22:42 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -142,19 +142,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:51Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:05:50Z2021-09-28T19:05:50Zservicebustestappwyrpk4kTopicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:43Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:22:42Z2021-10-21T05:22:42Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:50.59Z2021-09-28T19:05:50.613Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:42.32Z2021-10-21T05:22:42.417Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:51 GMT + - Thu, 21 Oct 2021 05:22:42 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -177,19 +177,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:52Zhttps://servicebustestappwyrpk4k.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-09-28T19:05:50Z2021-09-28T19:05:50Zservicebustestappwyrpk4kTopicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:43Zhttps://servicebustestaweyco6xnr.servicebus.windows.net/test_topic?api-version=2021-05test_topic2021-10-21T05:22:42Z2021-10-21T05:22:42Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:50.59Z2021-09-28T19:05:50.613Z0001-01-01T00:00:00ZtrueP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:42.32Z2021-10-21T05:22:42.417Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:51 GMT + - Thu, 21 Oct 2021 05:22:42 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -219,9 +219,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:52 GMT + - Thu, 21 Oct 2021 05:22:43 GMT etag: - - '637684527506130000' + - '637703905624170000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -244,13 +244,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:52Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:44Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:52 GMT + - Thu, 21 Oct 2021 05:22:43 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_premium_create_with_topic_description.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_premium_create_with_topic_description.yaml index 1e4f732f8c8c..62c4f03bc858 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_premium_create_with_topic_description.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_premium_create_with_topic_description.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestmstsf53wi2.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:53Z + string: Topicshttps://servicebustestny3npghbcb.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:45Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:52 GMT + - Thu, 21 Oct 2021 05:22:44 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-09-28T19:05:54Z2021-09-28T19:05:54Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/iweidk?api-version=2021-05iweidk2021-10-21T05:22:45Z2021-10-21T05:22:45Zservicebustestny3npghbcbPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:05:54.023Z2021-09-28T19:05:54.233ZtruePT10MfalseAvailablefalsefalse12345 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:22:45.55Z2021-10-21T05:22:45.797ZtruePT10MfalseAvailablefalsefalse12345 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:53 GMT + - Thu, 21 Oct 2021 05:22:45 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -84,19 +84,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-09-28T19:05:54Z2021-09-28T19:05:54Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/iweidk?enrich=false&api-version=2021-05iweidk2021-10-21T05:22:45Z2021-10-21T05:22:45Zservicebustestny3npghbcbPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:05:54.023Z2021-09-28T19:05:54.233Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:22:45.55Z2021-10-21T05:22:45.797Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsefalse12345 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:54 GMT + - Thu, 21 Oct 2021 05:22:45 GMT etag: - - '637684527542330000' + - '637703905657970000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -128,16 +128,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/cdasmc?api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/cdasmc?api-version=2021-05cdasmc2021-09-28T19:05:55Z2021-09-28T19:05:55Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/cdasmc?api-version=2021-05cdasmc2021-10-21T05:22:46Z2021-10-21T05:22:46Zservicebustestny3npghbcbPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:05:55.18Z2021-09-28T19:05:55.257ZtruePT10MfalseAvailablefalsefalse1024 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:22:46.687Z2021-10-21T05:22:46.76ZtruePT10MfalseAvailablefalsefalse1024 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:54 GMT + - Thu, 21 Oct 2021 05:22:46 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -162,19 +162,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/cdasmc?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/cdasmc?enrich=false&api-version=2021-05cdasmc2021-09-28T19:05:55Z2021-09-28T19:05:55Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/cdasmc?enrich=false&api-version=2021-05cdasmc2021-10-21T05:22:46Z2021-10-21T05:22:46Zservicebustestny3npghbcbPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:05:55.18Z2021-09-28T19:05:55.257Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:22:46.687Z2021-10-21T05:22:46.76Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsefalse1024 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:54 GMT + - Thu, 21 Oct 2021 05:22:46 GMT etag: - - '637684527552570000' + - '637703905667600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -190,7 +190,7 @@ interactions: PT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:05:55.180Z2021-09-28T19:05:55.257Z0001-01-01T00:00:00.000Ztrue000000PT10MfalseAvailablefalsefalse54321' + />Active2021-10-21T05:22:46.687Z2021-10-21T05:22:46.760Z0001-01-01T00:00:00.000Ztrue000000PT10MfalseAvailablefalsefalse54321' headers: Accept: - application/xml @@ -210,19 +210,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/cdasmc?api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/cdasmc?api-version=2021-05cdasmc2021-09-28T19:05:55Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/cdasmc?api-version=2021-05cdasmc2021-10-21T05:22:47Zservicebustestny3npghbcbPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:05:55.18Z2021-09-28T19:05:55.257Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:22:46.687Z2021-10-21T05:22:46.76Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsefalse54321 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:55 GMT + - Thu, 21 Oct 2021 05:22:46 GMT etag: - - '637684527552570000' + - '637703905667600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -247,19 +247,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/cdasmc?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestmstsf53wi2.servicebus.windows.net/cdasmc?enrich=false&api-version=2021-05cdasmc2021-09-28T19:05:55Z2021-09-28T19:05:55Zservicebustestmstsf53wi2https://servicebustestny3npghbcb.servicebus.windows.net/cdasmc?enrich=false&api-version=2021-05cdasmc2021-10-21T05:22:46Z2021-10-21T05:22:47Zservicebustestny3npghbcbPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:05:55.18Z2021-09-28T19:05:55.787Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:22:46.687Z2021-10-21T05:22:47.343Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsefalse54321 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:55 GMT + - Thu, 21 Oct 2021 05:22:46 GMT etag: - - '637684527557870000' + - '637703905673430000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -297,13 +297,13 @@ interactions: Parameter name: MaxMessageSizeInKilobytes - Actual value was 1023. TrackingId:85d12f2f-ee1a-4d1f-b53d-25af44f580bb_G7, - SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-09-28T19:05:56' + Actual value was 1023. TrackingId:2616d783-dfff-4a27-9fbc-c196f35e9f69_G0, + SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-10-21T05:22:47' headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:55 GMT + - Thu, 21 Oct 2021 05:22:47 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -341,13 +341,13 @@ interactions: Parameter name: MaxMessageSizeInKilobytes - Actual value was 102401. TrackingId:ca1b13be-8b58-4578-8c93-8dcd4e09f418_G7, - SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-09-28T19:05:56' + Actual value was 102401. TrackingId:c6d3ca3c-f3fc-4f03-9a95-0a9391166f33_G0, + SystemTracker:servicebustestsbname.servicebus.windows.net:rekocd, Timestamp:2021-10-21T05:22:48' headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:56 GMT + - Thu, 21 Oct 2021 05:22:47 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -379,9 +379,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:56 GMT + - Thu, 21 Oct 2021 05:22:48 GMT etag: - - '637684527542330000' + - '637703905657970000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -411,9 +411,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:58 GMT + - Thu, 21 Oct 2021 05:22:48 GMT etag: - - '637684527557870000' + - '637703905673430000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_dict_error.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_dict_error.yaml index 2365386fe169..2b760d7bfb5f 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_dict_error.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_dict_error.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:05:58Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:50Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:58 GMT + - Thu, 21 Oct 2021 05:22:49 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjdfj?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dfjdfj?api-version=2021-05dfjdfj2021-09-28T19:05:59Z2021-09-28T19:05:59Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dfjdfj?api-version=2021-05dfjdfj2021-10-21T05:22:50Z2021-10-21T05:22:50Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:05:59.11Z2021-09-28T19:05:59.183ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:50.547Z2021-10-21T05:22:50.603ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:05:59 GMT + - Thu, 21 Oct 2021 05:22:50 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -91,9 +91,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:05:59 GMT + - Thu, 21 Oct 2021 05:22:51 GMT etag: - - '637684527591830000' + - '637703905706030000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_dict_success.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_dict_success.yaml index 9a17dc715098..a5fb386ed24b 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_dict_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_dict_success.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:00Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:52Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:00 GMT + - Thu, 21 Oct 2021 05:22:52 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:06:01Z2021-09-28T19:06:01Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:52Z2021-10-21T05:22:52Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:01.13Z2021-09-28T19:06:01.17ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:52.673Z2021-10-21T05:22:52.827ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:01 GMT + - Thu, 21 Oct 2021 05:22:53 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -94,18 +94,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:06:01Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:53Zservicebustestaweyco6xnrPT2M1024falsePT10Mtrue0ActivetrueP10675199DT2H48M5.477539SfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:01 GMT + - Thu, 21 Oct 2021 05:22:53 GMT etag: - - '637684527611700000' + - '637703905728270000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -130,19 +130,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:06:01Z2021-09-28T19:06:01Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:22:52Z2021-10-21T05:22:53Zservicebustestaweyco6xnrPT2M1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:01.13Z2021-09-28T19:06:01.677Z0001-01-01T00:00:00ZtruePT2M1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:52.673Z2021-10-21T05:22:53.32Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.477539SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:01 GMT + - Thu, 21 Oct 2021 05:22:53 GMT etag: - - '637684527616770000' + - '637703905733200000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -177,18 +177,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:06:01Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:53Zservicebustestaweyco6xnrPT11M3072falsePT12Mtrue0ActivetruePT10MfalseAvailabletrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:01 GMT + - Thu, 21 Oct 2021 05:22:53 GMT etag: - - '637684527616770000' + - '637703905733200000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -213,19 +213,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:06:01Z2021-09-28T19:06:01Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:22:52Z2021-10-21T05:22:53Zservicebustestaweyco6xnrPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:01.13Z2021-09-28T19:06:01.897Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:22:52.673Z2021-10-21T05:22:53.457Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsetrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:01 GMT + - Thu, 21 Oct 2021 05:22:53 GMT etag: - - '637684527618970000' + - '637703905734570000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -260,18 +260,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-09-28T19:06:02Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?api-version=2021-05fjruid2021-10-21T05:22:53Zservicebustestaweyco6xnrPT15M2048falsePT16Mfalse0ActivefalsePT14MfalseAvailablefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:02 GMT + - Thu, 21 Oct 2021 05:22:53 GMT etag: - - '637684527618970000' + - '637703905734570000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -296,19 +296,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-09-28T19:06:01Z2021-09-28T19:06:02Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjruid?enrich=false&api-version=2021-05fjruid2021-10-21T05:22:52Z2021-10-21T05:22:53Zservicebustestaweyco6xnrPT15M2048falsePT16Mfalse0falsefalseActive2021-09-28T19:06:01.13Z2021-09-28T19:06:02.173Z0001-01-01T00:00:00ZfalsePT15M2048falsePT16Mfalse0falsefalseActive2021-10-21T05:22:52.673Z2021-10-21T05:22:53.687Z0001-01-01T00:00:00Zfalse000000PT14MfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:02 GMT + - Thu, 21 Oct 2021 05:22:53 GMT etag: - - '637684527621730000' + - '637703905736870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -340,9 +340,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:06:02 GMT + - Thu, 21 Oct 2021 05:22:54 GMT etag: - - '637684527621730000' + - '637703905736870000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_invalid.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_invalid.yaml index e352c0ba82ef..eec434597064 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_invalid.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_invalid.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:03Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:54Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:03 GMT + - Thu, 21 Oct 2021 05:22:54 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/dfjfj?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-09-28T19:06:03Z2021-09-28T19:06:03Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/dfjfj?api-version=2021-05dfjfj2021-10-21T05:22:55Z2021-10-21T05:22:55Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:03.83Z2021-09-28T19:06:03.867ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:55.283Z2021-10-21T05:22:55.323ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:04 GMT + - Thu, 21 Oct 2021 05:22:55 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -74,7 +74,7 @@ interactions: P10675199DT2H48M5.477539S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:03.830Z2021-09-28T19:06:03.867ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' + />Active2021-10-21T05:22:55.283Z2021-10-21T05:22:55.323ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' headers: Accept: - application/xml @@ -96,13 +96,13 @@ interactions: body: string: 404SubCode=40400. Not Found. The Operation doesn't exist. To know more visit https://aka.ms/sbResourceMgrExceptions. - . TrackingId:fc204950-20c5-4dfc-9fb3-add4016980b0_G1, SystemTracker:servicebustestsbname.servicebus.windows.net:iewdm, - Timestamp:2021-09-28T19:06:04 + . TrackingId:b4a77aee-f2c8-43c1-b863-ba08779b3e6b_G11, SystemTracker:servicebustestsbname.servicebus.windows.net:iewdm, + Timestamp:2021-10-21T05:22:56 headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:04 GMT + - Thu, 21 Oct 2021 05:22:55 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -117,7 +117,7 @@ interactions: P10675199DT2H48M5.477539S1024falseP25Dtrue0falsefalseActive2021-09-28T19:06:03.830Z2021-09-28T19:06:03.867ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' + />Active2021-10-21T05:22:55.283Z2021-10-21T05:22:55.323ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' headers: Accept: - application/xml @@ -142,15 +142,15 @@ interactions: Parameter name: DuplicateDetectionHistoryTimeWindow - Actual value was 25.00:00:00. TrackingId:a25d0d53-26c5-437c-8f6c-dbc3fd1dc344_G1, - SystemTracker:servicebustestsbname.servicebus.windows.net:dfjfj, Timestamp:2021-09-28T19:06:05' + Actual value was 25.00:00:00. TrackingId:92c698f3-8446-45dc-81a4-820f9e930fc9_G11, + SystemTracker:servicebustestsbname.servicebus.windows.net:dfjfj, Timestamp:2021-10-21T05:22:56' headers: content-type: - application/xml; charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:04 GMT + - Thu, 21 Oct 2021 05:22:55 GMT etag: - - '637684527638670000' + - '637703905753230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -182,9 +182,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:06:05 GMT + - Thu, 21 Oct 2021 05:22:56 GMT etag: - - '637684527638670000' + - '637703905753230000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_success.yaml b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_success.yaml index 2083d7fda2da..5d9a219a8f3c 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_success.yaml +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/recordings/test_mgmt_topics.test_mgmt_topic_update_success.yaml @@ -14,13 +14,13 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-05 response: body: - string: Topicshttps://servicebustestappwyrpk4k.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-09-28T19:06:06Z + string: Topicshttps://servicebustestaweyco6xnr.servicebus.windows.net/$Resources/topics?$skip=0&$top=100&api-version=2021-052021-10-21T05:22:57Z headers: content-type: - application/atom+xml;type=feed;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:05 GMT + - Thu, 21 Oct 2021 05:22:57 GMT server: - Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -50,16 +50,16 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:06:06Z2021-09-28T19:06:06Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:58Z2021-10-21T05:22:58Zservicebustestaweyco6xnrP10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:06.597ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">P10675199DT2H48M5.4775807S1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:58.137Z2021-10-21T05:22:58.17ZtrueP10675199DT2H48M5.4775807SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:06 GMT + - Thu, 21 Oct 2021 05:22:58 GMT server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -74,7 +74,7 @@ interactions: PT2M1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:06.597ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' + />Active2021-10-21T05:22:58.137Z2021-10-21T05:22:58.170ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256' headers: Accept: - application/xml @@ -94,18 +94,18 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:06:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:58Zservicebustestaweyco6xnrPT2M1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:06.597ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256 + xmlns:i="http://www.w3.org/2001/XMLSchema-instance">PT2M1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:58.137Z2021-10-21T05:22:58.17ZtrueP10675199DT2H48M5.477539SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:06 GMT + - Thu, 21 Oct 2021 05:22:58 GMT etag: - - '637684527665970000' + - '637703905781700000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -130,19 +130,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:06:06Z2021-09-28T19:06:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:22:58Z2021-10-21T05:22:58Zservicebustestaweyco6xnrPT2M1024falsePT10Mtrue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.04Z0001-01-01T00:00:00ZtruePT2M1024falsePT10Mtrue0falsefalseActive2021-10-21T05:22:58.137Z2021-10-21T05:22:58.637Z0001-01-01T00:00:00Ztrue000000P10675199DT2H48M5.477539SfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:06 GMT + - Thu, 21 Oct 2021 05:22:58 GMT etag: - - '637684527670400000' + - '637703905786370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -158,7 +158,7 @@ interactions: PT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.040Z0001-01-01T00:00:00.000Ztrue000000PT10MfalseAvailablefalsetrue256' + />Active2021-10-21T05:22:58.137Z2021-10-21T05:22:58.637Z0001-01-01T00:00:00.000Ztrue000000PT10MfalseAvailablefalsetrue256' headers: Accept: - application/xml @@ -178,19 +178,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:06:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:58Zservicebustestaweyco6xnrPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.04Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:22:58.137Z2021-10-21T05:22:58.637Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsetrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:06 GMT + - Thu, 21 Oct 2021 05:22:58 GMT etag: - - '637684527670400000' + - '637703905786370000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -215,19 +215,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:06:06Z2021-09-28T19:06:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:22:58Z2021-10-21T05:22:58Zservicebustestaweyco6xnrPT11M3072falsePT12Mtrue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.283Z0001-01-01T00:00:00ZtruePT11M3072falsePT12Mtrue0falsefalseActive2021-10-21T05:22:58.137Z2021-10-21T05:22:58.86Z0001-01-01T00:00:00Ztrue000000PT10MfalseAvailablefalsetrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:06 GMT + - Thu, 21 Oct 2021 05:22:58 GMT etag: - - '637684527672830000' + - '637703905788600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -243,7 +243,7 @@ interactions: PT11M2S3072falsePT12M3Strue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.283Z0001-01-01T00:00:00.000Ztrue000000PT10M1SfalseAvailablefalsetrue256' + />Active2021-10-21T05:22:58.137Z2021-10-21T05:22:58.860Z0001-01-01T00:00:00.000Ztrue000000PT10M1SfalseAvailablefalsetrue256' headers: Accept: - application/xml @@ -263,19 +263,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:06:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:59Zservicebustestaweyco6xnrPT11M2S3072falsePT12M3Strue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.283Z0001-01-01T00:00:00ZtruePT11M2S3072falsePT12M3Strue0falsefalseActive2021-10-21T05:22:58.137Z2021-10-21T05:22:58.86Z0001-01-01T00:00:00Ztrue000000PT10M1SfalseAvailablefalsetrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:06 GMT + - Thu, 21 Oct 2021 05:22:58 GMT etag: - - '637684527672830000' + - '637703905788600000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -300,19 +300,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:06:06Z2021-09-28T19:06:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:22:58Z2021-10-21T05:22:59Zservicebustestaweyco6xnrPT11M2S3072falsePT12M3Strue0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.42Z0001-01-01T00:00:00ZtruePT11M2S3072falsePT12M3Strue0falsefalseActive2021-10-21T05:22:58.137Z2021-10-21T05:22:59.113Z0001-01-01T00:00:00Ztrue000000PT10M1SfalseAvailablefalsetrue256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:06 GMT + - Thu, 21 Oct 2021 05:22:58 GMT etag: - - '637684527674200000' + - '637703905791130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -328,7 +328,7 @@ interactions: PT15M2048falsePT16Mfalse0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.420Z0001-01-01T00:00:00.000Zfalse000000PT14MfalseAvailablefalsefalse256' + />Active2021-10-21T05:22:58.137Z2021-10-21T05:22:59.113Z0001-01-01T00:00:00.000Zfalse000000PT14MfalseAvailablefalsefalse256' headers: Accept: - application/xml @@ -348,19 +348,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-09-28T19:06:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?api-version=2021-05fjrui2021-10-21T05:22:59Zservicebustestaweyco6xnrPT15M2048falsePT16Mfalse0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.42Z0001-01-01T00:00:00ZfalsePT15M2048falsePT16Mfalse0falsefalseActive2021-10-21T05:22:58.137Z2021-10-21T05:22:59.113Z0001-01-01T00:00:00Zfalse000000PT14MfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:06 GMT + - Thu, 21 Oct 2021 05:22:58 GMT etag: - - '637684527674200000' + - '637703905791130000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -385,19 +385,19 @@ interactions: uri: https://servicebustestsbname.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05 response: body: - string: https://servicebustestappwyrpk4k.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-09-28T19:06:06Z2021-09-28T19:06:07Zservicebustestappwyrpk4khttps://servicebustestaweyco6xnr.servicebus.windows.net/fjrui?enrich=false&api-version=2021-05fjrui2021-10-21T05:22:58Z2021-10-21T05:22:59Zservicebustestaweyco6xnrPT15M2048falsePT16Mfalse0falsefalseActive2021-09-28T19:06:06.553Z2021-09-28T19:06:07.637Z0001-01-01T00:00:00ZfalsePT15M2048falsePT16Mfalse0falsefalseActive2021-10-21T05:22:58.137Z2021-10-21T05:22:59.317Z0001-01-01T00:00:00Zfalse000000PT14MfalseAvailablefalsefalse256 headers: content-type: - application/atom+xml;type=entry;charset=utf-8 date: - - Tue, 28 Sep 2021 19:06:06 GMT + - Thu, 21 Oct 2021 05:22:59 GMT etag: - - '637684527676370000' + - '637703905793170000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: @@ -429,9 +429,9 @@ interactions: content-length: - '0' date: - - Tue, 28 Sep 2021 19:06:07 GMT + - Thu, 21 Oct 2021 05:22:59 GMT etag: - - '637684527676370000' + - '637703905793170000' server: - Microsoft-HTTPAPI/2.0 strict-transport-security: diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/test_mgmt_queues.py b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/test_mgmt_queues.py index a0e8db371fe8..75318fefc99f 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/test_mgmt_queues.py +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/test_mgmt_queues.py @@ -11,7 +11,7 @@ import functools import msrest -from azure.servicebus.management import ServiceBusAdministrationClient, QueueProperties +from azure.servicebus.management import ServiceBusAdministrationClient, QueueProperties, ApiVersion from azure.servicebus._common.utils import utc_now from utilities import get_logger from azure.core.exceptions import HttpResponseError, ServiceRequestError, ResourceNotFoundError, ResourceExistsError @@ -786,3 +786,40 @@ def test_mgmt_queue_update_dict_error(self, servicebus_namespace_connection_stri mgmt_service.update_queue(queue_description_only_name) finally: mgmt_service.delete_queue(queue_name) + + @CachedResourceGroupPreparer(name_prefix='servicebustest') + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + def test_mgmt_queue_basic_v2017_04(self, servicebus_namespace_connection_string, servicebus_namespace, + servicebus_namespace_key_name, servicebus_namespace_primary_key): + mgmt_service = ServiceBusAdministrationClient.from_connection_string(servicebus_namespace_connection_string, api_version=ApiVersion.V2017_04) + clear_queues(mgmt_service) + + mgmt_service.create_queue("test_queue") + queues = list(mgmt_service.list_queues()) + assert len(queues) == 1 and queues[0].name == "test_queue" + queue = mgmt_service.get_queue("test_queue") + assert queue.name == "test_queue" + mgmt_service.delete_queue("test_queue") + queues = list(mgmt_service.list_queues()) + assert len(queues) == 0 + + with pytest.raises(HttpResponseError): + mgmt_service.create_queue("queue_can_not_be_created", max_message_size_in_kilobytes=1024) + + fully_qualified_namespace = servicebus_namespace.name + '.servicebus.windows.net' + mgmt_service = ServiceBusAdministrationClient( + fully_qualified_namespace, + credential=ServiceBusSharedKeyCredential(servicebus_namespace_key_name, servicebus_namespace_primary_key), + api_version=ApiVersion.V2017_04 + ) + mgmt_service.create_queue("test_queue") + queues = list(mgmt_service.list_queues()) + assert len(queues) == 1 and queues[0].name == "test_queue" + queue = mgmt_service.get_queue("test_queue") + assert queue.name == "test_queue" + mgmt_service.delete_queue("test_queue") + queues = list(mgmt_service.list_queues()) + assert len(queues) == 0 + + with pytest.raises(HttpResponseError): + mgmt_service.create_queue("queue_can_not_be_created", max_message_size_in_kilobytes=1024) diff --git a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/test_mgmt_topics.py b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/test_mgmt_topics.py index 21752e60210f..5f59c8d57ee4 100644 --- a/sdk/servicebus/azure-servicebus/tests/mgmt_tests/test_mgmt_topics.py +++ b/sdk/servicebus/azure-servicebus/tests/mgmt_tests/test_mgmt_topics.py @@ -8,7 +8,8 @@ import datetime import msrest -from azure.servicebus.management import ServiceBusAdministrationClient, TopicProperties +from azure.servicebus.management import ServiceBusAdministrationClient, TopicProperties, ApiVersion +from azure.servicebus._base_handler import ServiceBusSharedKeyCredential from utilities import get_logger from azure.core.exceptions import HttpResponseError, ResourceExistsError @@ -485,3 +486,41 @@ def test_mgmt_topic_update_dict_error(self, servicebus_namespace_connection_stri mgmt_service.update_topic(topic_description_only_name) finally: mgmt_service.delete_topic(topic_name) + + @CachedResourceGroupPreparer(name_prefix='servicebustest') + @CachedServiceBusNamespacePreparer(name_prefix='servicebustest') + def test_mgmt_topic_basic_v2017_04(self, servicebus_namespace_connection_string, servicebus_namespace, + servicebus_namespace_key_name, servicebus_namespace_primary_key): + mgmt_service = ServiceBusAdministrationClient.from_connection_string(servicebus_namespace_connection_string, api_version=ApiVersion.V2017_04) + clear_topics(mgmt_service) + + mgmt_service.create_topic("test_topic") + topics = list(mgmt_service.list_topics()) + assert len(topics) == 1 and topics[0].name == "test_topic" + topic = mgmt_service.get_topic("test_topic") + assert topic.name == "test_topic" + mgmt_service.delete_topic("test_topic") + topics = list(mgmt_service.list_topics()) + assert len(topics) == 0 + + with pytest.raises(HttpResponseError): + mgmt_service.create_topic("topic_can_not_be_created", max_message_size_in_kilobytes=1024) + + fully_qualified_namespace = servicebus_namespace.name + '.servicebus.windows.net' + mgmt_service = ServiceBusAdministrationClient( + fully_qualified_namespace, + credential=ServiceBusSharedKeyCredential(servicebus_namespace_key_name, servicebus_namespace_primary_key), + api_version=ApiVersion.V2017_04 + ) + + mgmt_service.create_topic("test_topic") + topics = list(mgmt_service.list_topics()) + assert len(topics) == 1 and topics[0].name == "test_topic" + topic = mgmt_service.get_topic("test_topic") + assert topic.name == "test_topic" + mgmt_service.delete_topic("test_topic") + topics = list(mgmt_service.list_topics()) + assert len(topics) == 0 + + with pytest.raises(HttpResponseError): + mgmt_service.create_topic("topic_can_not_be_created", max_message_size_in_kilobytes=1024) diff --git a/sdk/servicebus/azure-servicebus/tests/test_sessions.py b/sdk/servicebus/azure-servicebus/tests/test_sessions.py index 6250367b0b20..cb328143bdb4 100644 --- a/sdk/servicebus/azure-servicebus/tests/test_sessions.py +++ b/sdk/servicebus/azure-servicebus/tests/test_sessions.py @@ -113,6 +113,63 @@ def test_session_by_session_client_conn_str_receive_handler_peeklock(self, servi assert received_cnt_dic['0'] == 2 and received_cnt_dic['1'] == 2 and received_cnt_dic['2'] == 2 assert count == 6 + session_id = "" + sender = sb_client.get_queue_sender(servicebus_queue.name) + receiver = sb_client.get_queue_receiver(servicebus_queue.name, session_id=session_id, max_wait_time=5) + + with sender, receiver: + for i in range(3): + message = ServiceBusMessage("Handler message no. {}".format(i)) + + message.partition_key = 'pkey' + + message.session_id = session_id + message.partition_key = session_id + message.application_properties = {'key': 'value'} + message.subject = 'label' + message.content_type = 'application/text' + message.correlation_id = 'cid' + message.message_id = str(i) + message.to = 'to' + message.reply_to = 'reply_to' + message.reply_to_session_id = 'reply_to_session_id' + + with pytest.raises(ValueError): + message.partition_key = 'pkey' + + sender.send_messages(message) + + with pytest.raises(ServiceBusError): + receiver = sb_client.get_queue_receiver(servicebus_queue.name, max_wait_time=5)._open_with_retry() + + count = 0 + received_cnt_dic = {} + for message in receiver: + print_message(_logger, message) + assert message.delivery_count == 0 + assert message.application_properties + assert message.application_properties[b'key'] == b'value' + assert message.subject == 'label' + assert message.content_type == 'application/text' + assert message.correlation_id == 'cid' + assert message.partition_key == session_id + assert message.to == 'to' + assert message.reply_to == 'reply_to' + assert message.sequence_number + assert message.enqueued_time_utc + assert message.session_id == session_id + assert message.reply_to_session_id == 'reply_to_session_id' + count += 1 + receiver.complete_message(message) + if message.message_id not in received_cnt_dic: + received_cnt_dic[message.message_id] = 1 + sender.send_messages(message) + else: + received_cnt_dic[message.message_id] += 1 + + assert received_cnt_dic['0'] == 2 and received_cnt_dic['1'] == 2 and received_cnt_dic['2'] == 2 + assert count == 6 + @pytest.mark.liveTest @pytest.mark.live_test_only @CachedResourceGroupPreparer(name_prefix='servicebustest') diff --git a/sdk/servicebus/tests.yml b/sdk/servicebus/tests.yml index e40693078864..547413d3276c 100644 --- a/sdk/servicebus/tests.yml +++ b/sdk/servicebus/tests.yml @@ -5,7 +5,6 @@ stages: parameters: ServiceDirectory: servicebus TestTimeoutInMinutes: 300 - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true BuildTargetingString: azure-servicebus* diff --git a/sdk/signalr/azure-mgmt-signalr/CHANGELOG.md b/sdk/signalr/azure-mgmt-signalr/CHANGELOG.md index ac29e6f5df26..40d52b827b02 100644 --- a/sdk/signalr/azure-mgmt-signalr/CHANGELOG.md +++ b/sdk/signalr/azure-mgmt-signalr/CHANGELOG.md @@ -1,5 +1,17 @@ # Release History +## 1.0.0 (2021-11-01) + +**Features** + + - Model SignalRResource has a new parameter disable_aad_auth + - Model SignalRResource has a new parameter host_name_prefix + - Model SignalRResource has a new parameter resource_log_configuration + - Model SignalRResource has a new parameter disable_local_auth + - Model SignalRResource has a new parameter public_network_access + - Model PrivateEndpointConnection has a new parameter group_ids + - Added operation SignalROperations.list_skus + ## 1.0.0b2 (2021-05-20) **Features** diff --git a/sdk/signalr/azure-mgmt-signalr/_meta.json b/sdk/signalr/azure-mgmt-signalr/_meta.json index a14cf9bbf590..816b6e8dac99 100644 --- a/sdk/signalr/azure-mgmt-signalr/_meta.json +++ b/sdk/signalr/azure-mgmt-signalr/_meta.json @@ -1,11 +1,11 @@ { - "autorest": "3.4.2", + "autorest": "3.4.5", "use": [ - "@autorest/python@5.8.0", - "@autorest/modelerfour@4.19.1" + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" ], - "commit": "74c8e0649bf06efe190743fa091bb71e23f5b3e1", + "commit": "1df76adb301b0b1f78375aacd19005f151ef6f72", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/signalr/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.1 --version=3.4.2", + "autorest_command": "autorest specification/signalr/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/signalr/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py index 2d686e7f49cf..65b7152fe3bb 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-04-01-preview" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-signalr/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_metadata.json b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_metadata.json index 4ecbc40f1b53..d0c88e64bba7 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_metadata.json +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-04-01-preview", - "total_api_version_list": ["2021-04-01-preview"], + "chosen_version": "2021-10-01", + "total_api_version_list": ["2021-10-01"], "client": { "name": "SignalRManagementClient", "filename": "_signal_rmanagement_client", diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_version.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_version.py index dfa6ee022f15..c47f66669f1b 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_version.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0" diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/_configuration.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/_configuration.py index 471d5f251764..62afbf258629 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/_configuration.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-04-01-preview" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-signalr/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_operations.py index 0d4ce600b6c4..cb8a1b283a52 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_r_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_r_operations.py index c403ac2f397f..4b6acc9b28cb 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_r_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_r_operations.py @@ -65,7 +65,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -122,7 +122,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -193,7 +193,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -268,7 +268,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -317,7 +317,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -447,7 +447,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -558,7 +558,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -697,7 +697,7 @@ async def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -746,7 +746,7 @@ async def _regenerate_key_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -872,7 +872,7 @@ async def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -970,3 +970,63 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart'} # type: ignore + + async def list_skus( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.SkuList": + """List all available skus of the resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuList, or the result of cls(response) + :rtype: ~azure.mgmt.signalr.models.SkuList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SkuList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/skus'} # type: ignore diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rprivate_endpoint_connections_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rprivate_endpoint_connections_operations.py index a59f734b95c0..ed7b08643ce2 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rprivate_endpoint_connections_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rprivate_endpoint_connections_operations.py @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -145,7 +145,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -212,7 +212,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -267,7 +267,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rprivate_link_resources_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rprivate_link_resources_operations.py index 0d6ecbac56ec..bc3e1f4a243a 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rprivate_link_resources_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rprivate_link_resources_operations.py @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rshared_private_link_resources_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rshared_private_link_resources_operations.py index cc88f8189091..2a70e20bc36d 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rshared_private_link_resources_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_signal_rshared_private_link_resources_operations.py @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -145,7 +145,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_usages_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_usages_operations.py index 38350e149f88..b3defc85405c 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_usages_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/aio/operations/_usages_operations.py @@ -60,7 +60,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py index 163dca8ae020..e1b1d8d2d5f2 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/__init__.py @@ -32,6 +32,8 @@ from ._models_py3 import ProxyResource from ._models_py3 import RegenerateKeyParameters from ._models_py3 import Resource + from ._models_py3 import ResourceLogCategory + from ._models_py3 import ResourceLogConfiguration from ._models_py3 import ResourceSku from ._models_py3 import ServerlessUpstreamSettings from ._models_py3 import ServiceSpecification @@ -49,6 +51,9 @@ from ._models_py3 import SignalRUsage from ._models_py3 import SignalRUsageList from ._models_py3 import SignalRUsageName + from ._models_py3 import Sku + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuList from ._models_py3 import SystemData from ._models_py3 import TrackedResource from ._models_py3 import UpstreamAuthSettings @@ -80,6 +85,8 @@ from ._models import ProxyResource # type: ignore from ._models import RegenerateKeyParameters # type: ignore from ._models import Resource # type: ignore + from ._models import ResourceLogCategory # type: ignore + from ._models import ResourceLogConfiguration # type: ignore from ._models import ResourceSku # type: ignore from ._models import ServerlessUpstreamSettings # type: ignore from ._models import ServiceSpecification # type: ignore @@ -97,6 +104,9 @@ from ._models import SignalRUsage # type: ignore from ._models import SignalRUsageList # type: ignore from ._models import SignalRUsageName # type: ignore + from ._models import Sku # type: ignore + from ._models import SkuCapacity # type: ignore + from ._models import SkuList # type: ignore from ._models import SystemData # type: ignore from ._models import TrackedResource # type: ignore from ._models import UpstreamAuthSettings # type: ignore @@ -111,6 +121,7 @@ ManagedIdentityType, PrivateLinkServiceConnectionStatus, ProvisioningState, + ScaleType, ServiceKind, SharedPrivateLinkResourceStatus, SignalRRequestType, @@ -144,6 +155,8 @@ 'ProxyResource', 'RegenerateKeyParameters', 'Resource', + 'ResourceLogCategory', + 'ResourceLogConfiguration', 'ResourceSku', 'ServerlessUpstreamSettings', 'ServiceSpecification', @@ -161,6 +174,9 @@ 'SignalRUsage', 'SignalRUsageList', 'SignalRUsageName', + 'Sku', + 'SkuCapacity', + 'SkuList', 'SystemData', 'TrackedResource', 'UpstreamAuthSettings', @@ -173,6 +189,7 @@ 'ManagedIdentityType', 'PrivateLinkServiceConnectionStatus', 'ProvisioningState', + 'ScaleType', 'ServiceKind', 'SharedPrivateLinkResourceStatus', 'SignalRRequestType', diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py index 07ca84c24caf..1141dda2a3e1 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models.py @@ -607,6 +607,8 @@ class PrivateEndpointConnection(ProxyResource): :vartype provisioning_state: str or ~azure.mgmt.signalr.models.ProvisioningState :param private_endpoint: Private endpoint associated with the private endpoint connection. :type private_endpoint: ~azure.mgmt.signalr.models.PrivateEndpoint + :ivar group_ids: Group IDs. + :vartype group_ids: list[str] :param private_link_service_connection_state: Connection state. :type private_link_service_connection_state: ~azure.mgmt.signalr.models.PrivateLinkServiceConnectionState @@ -618,6 +620,7 @@ class PrivateEndpointConnection(ProxyResource): 'type': {'readonly': True}, 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'group_ids': {'readonly': True}, } _attribute_map = { @@ -627,6 +630,7 @@ class PrivateEndpointConnection(ProxyResource): 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'group_ids': {'key': 'properties.groupIds', 'type': '[str]'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } @@ -638,6 +642,7 @@ def __init__( self.system_data = None self.provisioning_state = None self.private_endpoint = kwargs.get('private_endpoint', None) + self.group_ids = None self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) @@ -774,7 +779,7 @@ class RegenerateKeyParameters(msrest.serialization.Model): """Parameters describes the request to regenerate access keys. :param key_type: The keyType to regenerate. Must be either 'primary' or - 'secondary'(case-insensitive). Possible values include: "Primary", "Secondary". + 'secondary'(case-insensitive). Possible values include: "Primary", "Secondary", "Salt". :type key_type: str or ~azure.mgmt.signalr.models.KeyType """ @@ -790,6 +795,52 @@ def __init__( self.key_type = kwargs.get('key_type', None) +class ResourceLogCategory(msrest.serialization.Model): + """Resource log category configuration of a Microsoft.SignalRService resource. + + :param name: Gets or sets the resource log category's name. + Available values: ConnectivityLogs, MessagingLogs. + Case insensitive. + :type name: str + :param enabled: Indicates whether or the resource log category is enabled. + Available values: true, false. + Case insensitive. + :type enabled: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceLogCategory, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.enabled = kwargs.get('enabled', None) + + +class ResourceLogConfiguration(msrest.serialization.Model): + """Resource log configuration of a Microsoft.SignalRService resource. + + :param categories: Gets or sets the list of category configurations. + :type categories: list[~azure.mgmt.signalr.models.ResourceLogCategory] + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[ResourceLogCategory]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceLogConfiguration, self).__init__(**kwargs) + self.categories = kwargs.get('categories', None) + + class ResourceSku(msrest.serialization.Model): """The billing information of the resource. @@ -1053,7 +1104,7 @@ def __init__( class SignalRFeature(msrest.serialization.Model): - """Feature of a SignalR resource, which controls the SignalR runtime behavior. + """Feature of a resource, which controls the runtime behavior. All required parameters must be populated in order to send to Azure. @@ -1255,6 +1306,8 @@ class SignalRResource(TrackedResource): list[~azure.mgmt.signalr.models.SharedPrivateLinkResource] :param tls: TLS settings. :type tls: ~azure.mgmt.signalr.models.SignalRTlsSettings + :ivar host_name_prefix: Deprecated. + :vartype host_name_prefix: str :param features: List of the featureFlags. FeatureFlags that are not included in the parameters for the update operation will not be @@ -1264,12 +1317,31 @@ class SignalRResource(TrackedResource): But keep in mind, the default value doesn't mean "false". It varies in terms of different FeatureFlags. :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param resource_log_configuration: Resource log configuration of a Microsoft.SignalRService + resource. + If resourceLogConfiguration isn't null or empty, it will override options + "EnableConnectivityLog" and "EnableMessagingLogs" in features. + Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in features. + :type resource_log_configuration: ~azure.mgmt.signalr.models.ResourceLogConfiguration :param cors: Cross-Origin Resource Sharing (CORS) settings. :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings :param upstream: Upstream settings when the service is in server-less mode. :type upstream: ~azure.mgmt.signalr.models.ServerlessUpstreamSettings :param network_ac_ls: Network ACLs. :type network_ac_ls: ~azure.mgmt.signalr.models.SignalRNetworkACLs + :param public_network_access: Enable or disable public network access. Default to "Enabled". + When it's Enabled, network ACLs still apply. + When it's Disabled, public network access is always disabled no matter what you set in network + ACLs. + :type public_network_access: str + :param disable_local_auth: DisableLocalAuth + Enable or disable local auth with AccessKey + When set as true, connection with AccessKey=xxx won't work. + :type disable_local_auth: bool + :param disable_aad_auth: DisableLocalAuth + Enable or disable aad auth + When set as true, connection with AuthType=aad won't work. + :type disable_aad_auth: bool """ _validation = { @@ -1285,6 +1357,7 @@ class SignalRResource(TrackedResource): 'version': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, 'shared_private_link_resources': {'readonly': True}, + 'host_name_prefix': {'readonly': True}, } _attribute_map = { @@ -1306,10 +1379,15 @@ class SignalRResource(TrackedResource): 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, 'tls': {'key': 'properties.tls', 'type': 'SignalRTlsSettings'}, + 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, 'features': {'key': 'properties.features', 'type': '[SignalRFeature]'}, + 'resource_log_configuration': {'key': 'properties.resourceLogConfiguration', 'type': 'ResourceLogConfiguration'}, 'cors': {'key': 'properties.cors', 'type': 'SignalRCorsSettings'}, 'upstream': {'key': 'properties.upstream', 'type': 'ServerlessUpstreamSettings'}, 'network_ac_ls': {'key': 'properties.networkACLs', 'type': 'SignalRNetworkACLs'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'disable_aad_auth': {'key': 'properties.disableAadAuth', 'type': 'bool'}, } def __init__( @@ -1330,10 +1408,15 @@ def __init__( self.private_endpoint_connections = None self.shared_private_link_resources = None self.tls = kwargs.get('tls', None) + self.host_name_prefix = None self.features = kwargs.get('features', None) + self.resource_log_configuration = kwargs.get('resource_log_configuration', None) self.cors = kwargs.get('cors', None) self.upstream = kwargs.get('upstream', None) self.network_ac_ls = kwargs.get('network_ac_ls', None) + self.public_network_access = kwargs.get('public_network_access', "Enabled") + self.disable_local_auth = kwargs.get('disable_local_auth', False) + self.disable_aad_auth = kwargs.get('disable_aad_auth', False) class SignalRResourceList(msrest.serialization.Model): @@ -1377,7 +1460,7 @@ def __init__( **kwargs ): super(SignalRTlsSettings, self).__init__(**kwargs) - self.client_cert_enabled = kwargs.get('client_cert_enabled', None) + self.client_cert_enabled = kwargs.get('client_cert_enabled', True) class SignalRUsage(msrest.serialization.Model): @@ -1465,6 +1548,118 @@ def __init__( self.localized_value = kwargs.get('localized_value', None) +class Sku(msrest.serialization.Model): + """Describes an available sku.". + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_type: The resource type that this object applies to. + :vartype resource_type: str + :ivar sku: The exact set of keys that define this sku. + :vartype sku: ~azure.mgmt.signalr.models.ResourceSku + :ivar capacity: Specifies the unit of the resource. + :vartype capacity: ~azure.mgmt.signalr.models.SkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class SkuCapacity(msrest.serialization.Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar minimum: The lowest permitted capacity for this resource. + :vartype minimum: int + :ivar maximum: The highest permitted capacity for this resource. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar allowed_values: Allows capacity value list. + :vartype allowed_values: list[int] + :ivar scale_type: The scale type applicable to the sku. Possible values include: "None", + "Manual", "Automatic". + :vartype scale_type: str or ~azure.mgmt.signalr.models.ScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'allowed_values': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'allowed_values': {'key': 'allowedValues', 'type': '[int]'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.allowed_values = None + self.scale_type = None + + +class SkuList(msrest.serialization.Model): + """The list skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of skus available for the resource. + :vartype value: list[~azure.mgmt.signalr.models.Sku] + :ivar next_link: The URL the client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Sku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py index 387ecffeb956..e019dca6fb79 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_models_py3.py @@ -668,6 +668,8 @@ class PrivateEndpointConnection(ProxyResource): :vartype provisioning_state: str or ~azure.mgmt.signalr.models.ProvisioningState :param private_endpoint: Private endpoint associated with the private endpoint connection. :type private_endpoint: ~azure.mgmt.signalr.models.PrivateEndpoint + :ivar group_ids: Group IDs. + :vartype group_ids: list[str] :param private_link_service_connection_state: Connection state. :type private_link_service_connection_state: ~azure.mgmt.signalr.models.PrivateLinkServiceConnectionState @@ -679,6 +681,7 @@ class PrivateEndpointConnection(ProxyResource): 'type': {'readonly': True}, 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'group_ids': {'readonly': True}, } _attribute_map = { @@ -688,6 +691,7 @@ class PrivateEndpointConnection(ProxyResource): 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'group_ids': {'key': 'properties.groupIds', 'type': '[str]'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } @@ -702,6 +706,7 @@ def __init__( self.system_data = None self.provisioning_state = None self.private_endpoint = private_endpoint + self.group_ids = None self.private_link_service_connection_state = private_link_service_connection_state @@ -853,7 +858,7 @@ class RegenerateKeyParameters(msrest.serialization.Model): """Parameters describes the request to regenerate access keys. :param key_type: The keyType to regenerate. Must be either 'primary' or - 'secondary'(case-insensitive). Possible values include: "Primary", "Secondary". + 'secondary'(case-insensitive). Possible values include: "Primary", "Secondary", "Salt". :type key_type: str or ~azure.mgmt.signalr.models.KeyType """ @@ -871,6 +876,57 @@ def __init__( self.key_type = key_type +class ResourceLogCategory(msrest.serialization.Model): + """Resource log category configuration of a Microsoft.SignalRService resource. + + :param name: Gets or sets the resource log category's name. + Available values: ConnectivityLogs, MessagingLogs. + Case insensitive. + :type name: str + :param enabled: Indicates whether or the resource log category is enabled. + Available values: true, false. + Case insensitive. + :type enabled: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + enabled: Optional[str] = None, + **kwargs + ): + super(ResourceLogCategory, self).__init__(**kwargs) + self.name = name + self.enabled = enabled + + +class ResourceLogConfiguration(msrest.serialization.Model): + """Resource log configuration of a Microsoft.SignalRService resource. + + :param categories: Gets or sets the list of category configurations. + :type categories: list[~azure.mgmt.signalr.models.ResourceLogCategory] + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[ResourceLogCategory]'}, + } + + def __init__( + self, + *, + categories: Optional[List["ResourceLogCategory"]] = None, + **kwargs + ): + super(ResourceLogConfiguration, self).__init__(**kwargs) + self.categories = categories + + class ResourceSku(msrest.serialization.Model): """The billing information of the resource. @@ -1159,7 +1215,7 @@ def __init__( class SignalRFeature(msrest.serialization.Model): - """Feature of a SignalR resource, which controls the SignalR runtime behavior. + """Feature of a resource, which controls the runtime behavior. All required parameters must be populated in order to send to Azure. @@ -1377,6 +1433,8 @@ class SignalRResource(TrackedResource): list[~azure.mgmt.signalr.models.SharedPrivateLinkResource] :param tls: TLS settings. :type tls: ~azure.mgmt.signalr.models.SignalRTlsSettings + :ivar host_name_prefix: Deprecated. + :vartype host_name_prefix: str :param features: List of the featureFlags. FeatureFlags that are not included in the parameters for the update operation will not be @@ -1386,12 +1444,31 @@ class SignalRResource(TrackedResource): But keep in mind, the default value doesn't mean "false". It varies in terms of different FeatureFlags. :type features: list[~azure.mgmt.signalr.models.SignalRFeature] + :param resource_log_configuration: Resource log configuration of a Microsoft.SignalRService + resource. + If resourceLogConfiguration isn't null or empty, it will override options + "EnableConnectivityLog" and "EnableMessagingLogs" in features. + Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in features. + :type resource_log_configuration: ~azure.mgmt.signalr.models.ResourceLogConfiguration :param cors: Cross-Origin Resource Sharing (CORS) settings. :type cors: ~azure.mgmt.signalr.models.SignalRCorsSettings :param upstream: Upstream settings when the service is in server-less mode. :type upstream: ~azure.mgmt.signalr.models.ServerlessUpstreamSettings :param network_ac_ls: Network ACLs. :type network_ac_ls: ~azure.mgmt.signalr.models.SignalRNetworkACLs + :param public_network_access: Enable or disable public network access. Default to "Enabled". + When it's Enabled, network ACLs still apply. + When it's Disabled, public network access is always disabled no matter what you set in network + ACLs. + :type public_network_access: str + :param disable_local_auth: DisableLocalAuth + Enable or disable local auth with AccessKey + When set as true, connection with AccessKey=xxx won't work. + :type disable_local_auth: bool + :param disable_aad_auth: DisableLocalAuth + Enable or disable aad auth + When set as true, connection with AuthType=aad won't work. + :type disable_aad_auth: bool """ _validation = { @@ -1407,6 +1484,7 @@ class SignalRResource(TrackedResource): 'version': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, 'shared_private_link_resources': {'readonly': True}, + 'host_name_prefix': {'readonly': True}, } _attribute_map = { @@ -1428,10 +1506,15 @@ class SignalRResource(TrackedResource): 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, 'tls': {'key': 'properties.tls', 'type': 'SignalRTlsSettings'}, + 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, 'features': {'key': 'properties.features', 'type': '[SignalRFeature]'}, + 'resource_log_configuration': {'key': 'properties.resourceLogConfiguration', 'type': 'ResourceLogConfiguration'}, 'cors': {'key': 'properties.cors', 'type': 'SignalRCorsSettings'}, 'upstream': {'key': 'properties.upstream', 'type': 'ServerlessUpstreamSettings'}, 'network_ac_ls': {'key': 'properties.networkACLs', 'type': 'SignalRNetworkACLs'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'disable_aad_auth': {'key': 'properties.disableAadAuth', 'type': 'bool'}, } def __init__( @@ -1444,9 +1527,13 @@ def __init__( identity: Optional["ManagedIdentity"] = None, tls: Optional["SignalRTlsSettings"] = None, features: Optional[List["SignalRFeature"]] = None, + resource_log_configuration: Optional["ResourceLogConfiguration"] = None, cors: Optional["SignalRCorsSettings"] = None, upstream: Optional["ServerlessUpstreamSettings"] = None, network_ac_ls: Optional["SignalRNetworkACLs"] = None, + public_network_access: Optional[str] = "Enabled", + disable_local_auth: Optional[bool] = False, + disable_aad_auth: Optional[bool] = False, **kwargs ): super(SignalRResource, self).__init__(location=location, tags=tags, **kwargs) @@ -1463,10 +1550,15 @@ def __init__( self.private_endpoint_connections = None self.shared_private_link_resources = None self.tls = tls + self.host_name_prefix = None self.features = features + self.resource_log_configuration = resource_log_configuration self.cors = cors self.upstream = upstream self.network_ac_ls = network_ac_ls + self.public_network_access = public_network_access + self.disable_local_auth = disable_local_auth + self.disable_aad_auth = disable_aad_auth class SignalRResourceList(msrest.serialization.Model): @@ -1511,7 +1603,7 @@ class SignalRTlsSettings(msrest.serialization.Model): def __init__( self, *, - client_cert_enabled: Optional[bool] = None, + client_cert_enabled: Optional[bool] = True, **kwargs ): super(SignalRTlsSettings, self).__init__(**kwargs) @@ -1615,6 +1707,118 @@ def __init__( self.localized_value = localized_value +class Sku(msrest.serialization.Model): + """Describes an available sku.". + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_type: The resource type that this object applies to. + :vartype resource_type: str + :ivar sku: The exact set of keys that define this sku. + :vartype sku: ~azure.mgmt.signalr.models.ResourceSku + :ivar capacity: Specifies the unit of the resource. + :vartype capacity: ~azure.mgmt.signalr.models.SkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class SkuCapacity(msrest.serialization.Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar minimum: The lowest permitted capacity for this resource. + :vartype minimum: int + :ivar maximum: The highest permitted capacity for this resource. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar allowed_values: Allows capacity value list. + :vartype allowed_values: list[int] + :ivar scale_type: The scale type applicable to the sku. Possible values include: "None", + "Manual", "Automatic". + :vartype scale_type: str or ~azure.mgmt.signalr.models.ScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'allowed_values': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'allowed_values': {'key': 'allowedValues', 'type': '[int]'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.allowed_values = None + self.scale_type = None + + +class SkuList(msrest.serialization.Model): + """The list skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of skus available for the resource. + :vartype value: list[~azure.mgmt.signalr.models.Sku] + :ivar next_link: The URL the client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Sku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_signal_rmanagement_client_enums.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_signal_rmanagement_client_enums.py index 9ae5f499548c..2ce46e801b80 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_signal_rmanagement_client_enums.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/models/_signal_rmanagement_client_enums.py @@ -72,6 +72,7 @@ class KeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PRIMARY = "Primary" SECONDARY = "Secondary" + SALT = "Salt" class ManagedIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Represent the identity type: systemAssigned, userAssigned, None @@ -105,6 +106,14 @@ class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DELETING = "Deleting" MOVING = "Moving" +class ScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The scale type applicable to the sku. + """ + + NONE = "None" + MANUAL = "Manual" + AUTOMATIC = "Automatic" + class ServiceKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The kind of the service - e.g. "SignalR" for "Microsoft.SignalRService/SignalR" """ diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py index 6f79e6f51b7a..b108ff5d6061 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_r_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_r_operations.py index ebb77c118874..a81113e9cac0 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_r_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_r_operations.py @@ -70,7 +70,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -128,7 +128,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -200,7 +200,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -276,7 +276,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -326,7 +326,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -458,7 +458,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -571,7 +571,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -712,7 +712,7 @@ def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -762,7 +762,7 @@ def _regenerate_key_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -890,7 +890,7 @@ def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -989,3 +989,64 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/restart'} # type: ignore + + def list_skus( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SkuList" + """List all available skus of the resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuList, or the result of cls(response) + :rtype: ~azure.mgmt.signalr.models.SkuList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SkuList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/signalR/{resourceName}/skus'} # type: ignore diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_endpoint_connections_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_endpoint_connections_operations.py index 98c308ae629e..eb7677c02c64 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_endpoint_connections_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_endpoint_connections_operations.py @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -151,7 +151,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -219,7 +219,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -275,7 +275,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_link_resources_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_link_resources_operations.py index 847613b41b01..812deefbe653 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_link_resources_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rprivate_link_resources_operations.py @@ -69,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rshared_private_link_resources_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rshared_private_link_resources_operations.py index 3c858ccd271e..6f432fbf67e1 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rshared_private_link_resources_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_signal_rshared_private_link_resources_operations.py @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -151,7 +151,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL diff --git a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py index 35e906fd3db2..6012549d1460 100644 --- a/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py +++ b/sdk/signalr/azure-mgmt-signalr/azure/mgmt/signalr/operations/_usages_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/storage/azure-storage-blob-changefeed/tests/_shared/testcase.py b/sdk/storage/azure-storage-blob-changefeed/tests/_shared/testcase.py deleted file mode 100644 index b427b770b64d..000000000000 --- a/sdk/storage/azure-storage-blob-changefeed/tests/_shared/testcase.py +++ /dev/null @@ -1,452 +0,0 @@ -# coding: utf-8 -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -from __future__ import division -from contextlib import contextmanager -import copy -import inspect -import os -import os.path -import time -from datetime import datetime, timedelta - -try: - import unittest.mock as mock -except ImportError: - import mock - -import zlib -import math -import sys -import string -import random -import re -import logging -from devtools_testutils import ( - AzureMgmtTestCase, - AzureMgmtPreparer, - ResourceGroupPreparer, - StorageAccountPreparer, - FakeResource, -) -from azure_devtools.scenario_tests import RecordingProcessor, AzureTestError, create_random_name -try: - from cStringIO import StringIO # Python 2 -except ImportError: - from io import StringIO - -from azure.core.credentials import AccessToken -from azure.storage.blob import generate_account_sas, AccountSasPermissions, ResourceTypes -from azure.mgmt.storage.models import StorageAccount, Endpoints - -try: - from devtools_testutils import mgmt_settings_real as settings -except ImportError: - from devtools_testutils import mgmt_settings_fake as settings - -import pytest - - -LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' - -class FakeTokenCredential(object): - """Protocol for classes able to provide OAuth tokens. - :param str scopes: Lets you specify the type of access needed. - """ - def __init__(self): - self.token = AccessToken("YOU SHALL NOT PASS", 0) - - def get_token(self, *args): - return self.token - - -class XMSRequestIDBody(RecordingProcessor): - """This process is used for Storage batch call only, to avoid the echo policy. - """ - def process_response(self, response): - content_type = None - for key, value in response.get('headers', {}).items(): - if key.lower() == 'content-type': - content_type = (value[0] if isinstance(value, list) else value).lower() - break - - if content_type and 'multipart/mixed' in content_type: - response['body']['string'] = re.sub(b"x-ms-client-request-id: [a-f0-9-]+\r\n", b"", response['body']['string']) - - return response - - -class GlobalStorageAccountPreparer(AzureMgmtPreparer): - def __init__(self): - super(GlobalStorageAccountPreparer, self).__init__( - name_prefix='', - random_name_length=42 - ) - - def create_resource(self, name, **kwargs): - storage_account = StorageTestCase._STORAGE_ACCOUNT - if self.is_live: - self.test_class_instance.scrubber.register_name_pair( - storage_account.name, - "storagename" - ) - else: - name = "storagename" - storage_account.name = name - storage_account.primary_endpoints.blob = 'https://{}.{}.core.windows.net'.format(name, 'blob') - storage_account.primary_endpoints.queue = 'https://{}.{}.core.windows.net'.format(name, 'queue') - storage_account.primary_endpoints.table = 'https://{}.{}.core.windows.net'.format(name, 'table') - storage_account.primary_endpoints.file = 'https://{}.{}.core.windows.net'.format(name, 'file') - - return { - 'location': 'westus', - 'resource_group': StorageTestCase._RESOURCE_GROUP, - 'storage_account': storage_account, - 'storage_account_key': StorageTestCase._STORAGE_KEY, - 'storage_account_cs': StorageTestCase._STORAGE_CONNECTION_STRING, - } - -class GlobalResourceGroupPreparer(AzureMgmtPreparer): - def __init__(self): - super(GlobalResourceGroupPreparer, self).__init__( - name_prefix='', - random_name_length=42 - ) - - def create_resource(self, name, **kwargs): - rg = StorageTestCase._RESOURCE_GROUP - if self.is_live: - self.test_class_instance.scrubber.register_name_pair( - rg.name, - "rgname" - ) - else: - rg = FakeResource( - name="rgname", - id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname" - ) - - return { - 'location': 'westus', - 'resource_group': rg, - } - - -class StorageTestCase(AzureMgmtTestCase): - - def __init__(self, *args, **kwargs): - super(StorageTestCase, self).__init__(*args, **kwargs) - self.replay_processors.append(XMSRequestIDBody()) - - def connection_string(self, account, key): - return "DefaultEndpointsProtocol=https;AccountName=" + account.name + ";AccountKey=" + str(key) + ";EndpointSuffix=core.windows.net" - - def account_url(self, storage_account, storage_type): - """Return an url of storage account. - - :param str storage_account: Storage account name - :param str storage_type: The Storage type part of the URL. Should be "blob", or "queue", etc. - """ - try: - if storage_type == "blob": - return storage_account.primary_endpoints.blob.rstrip("/") - if storage_type == "queue": - return storage_account.primary_endpoints.queue.rstrip("/") - if storage_type == "file": - return storage_account.primary_endpoints.file.rstrip("/") - else: - raise ValueError("Unknown storage type {}".format(storage_type)) - except AttributeError: # Didn't find "primary_endpoints" - return 'https://{}.{}.core.windows.net'.format(storage_account, storage_type) - - def configure_logging(self): - try: - enable_logging = self.get_settings_value("ENABLE_LOGGING") - except AzureTestError: - enable_logging = True # That's the default value in fake settings - - self.enable_logging() if enable_logging else self.disable_logging() - - def enable_logging(self): - handler = logging.StreamHandler() - handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) - self.logger.handlers = [handler] - self.logger.setLevel(logging.INFO) - self.logger.propagate = True - self.logger.disabled = False - - def disable_logging(self): - self.logger.propagate = False - self.logger.disabled = True - self.logger.handlers = [] - - def sleep(self, seconds): - if self.is_live: - time.sleep(seconds) - - def get_random_bytes(self, size): - # recordings don't like random stuff. making this more - # deterministic. - return b'a'*size - - def get_random_text_data(self, size): - '''Returns random unicode text data exceeding the size threshold for - chunking blob upload.''' - checksum = zlib.adler32(self.qualified_test_name.encode()) & 0xffffffff - rand = random.Random(checksum) - text = u'' - words = [u'hello', u'world', u'python', u'啊齄丂狛狜'] - while (len(text) < size): - index = int(rand.random()*(len(words) - 1)) - text = text + u' ' + words[index] - - return text - - @staticmethod - def _set_test_proxy(service, settings): - if settings.USE_PROXY: - service.set_proxy( - settings.PROXY_HOST, - settings.PROXY_PORT, - settings.PROXY_USER, - settings.PROXY_PASSWORD, - ) - - def assertNamedItemInContainer(self, container, item_name, msg=None): - def _is_string(obj): - if sys.version_info >= (3,): - return isinstance(obj, str) - else: - return isinstance(obj, basestring) - for item in container: - if _is_string(item): - if item == item_name: - return - elif isinstance(item, dict): - if item_name == item['name']: - return - elif item.name == item_name: - return - elif hasattr(item, 'snapshot') and item.snapshot == item_name: - return - - - standardMsg = '{0} not found in {1}'.format( - repr(item_name), [str(c) for c in container]) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertNamedItemNotInContainer(self, container, item_name, msg=None): - for item in container: - if item.name == item_name: - standardMsg = '{0} unexpectedly found in {1}'.format( - repr(item_name), repr(container)) - self.fail(self._formatMessage(msg, standardMsg)) - - def assert_upload_progress(self, size, max_chunk_size, progress, unknown_size=False): - '''Validates that the progress chunks align with our chunking procedure.''' - index = 0 - total = None if unknown_size else size - small_chunk_size = size % max_chunk_size - self.assertEqual(len(progress), math.ceil(size / max_chunk_size)) - for i in progress: - self.assertTrue(i[0] % max_chunk_size == 0 or i[0] % max_chunk_size == small_chunk_size) - self.assertEqual(i[1], total) - - def assert_download_progress(self, size, max_chunk_size, max_get_size, progress): - '''Validates that the progress chunks align with our chunking procedure.''' - if size <= max_get_size: - self.assertEqual(len(progress), 1) - self.assertTrue(progress[0][0], size) - self.assertTrue(progress[0][1], size) - else: - small_chunk_size = (size - max_get_size) % max_chunk_size - self.assertEqual(len(progress), 1 + math.ceil((size - max_get_size) / max_chunk_size)) - - self.assertTrue(progress[0][0], max_get_size) - self.assertTrue(progress[0][1], size) - for i in progress[1:]: - self.assertTrue(i[0] % max_chunk_size == 0 or i[0] % max_chunk_size == small_chunk_size) - self.assertEqual(i[1], size) - - def generate_oauth_token(self): - if self.is_live: - from azure.identity import ClientSecretCredential - return ClientSecretCredential( - self.get_settings_value("TENANT_ID"), - self.get_settings_value("CLIENT_ID"), - self.get_settings_value("CLIENT_SECRET"), - ) - return self.generate_fake_token() - - def generate_sas_token(self): - fake_key = 'a'*30 + 'b'*30 - - return '?' + generate_account_sas( - account_name = 'test', # name of the storage account - account_key = fake_key, # key for the storage account - resource_types = ResourceTypes(object=True), - permission = AccountSasPermissions(read=True,list=True), - start = datetime.now() - timedelta(hours = 24), - expiry = datetime.now() + timedelta(days = 8) - ) - - def generate_fake_token(self): - return FakeTokenCredential() - - -def not_for_emulator(test): - def skip_test_if_targeting_emulator(self): - test(self) - return skip_test_if_targeting_emulator - - -class LogCaptured(object): - def __init__(self, test_case=None): - # accept the test case so that we may reset logging after capturing logs - self.test_case = test_case - - def __enter__(self): - # enable logging - # it is possible that the global logging flag is turned off - self.test_case.enable_logging() - - # create a string stream to send the logs to - self.log_stream = StringIO() - - # the handler needs to be stored so that we can remove it later - self.handler = logging.StreamHandler(self.log_stream) - self.handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) - - # get and enable the logger to send the outputs to the string stream - self.logger = logging.getLogger('azure.storage') - self.logger.level = logging.DEBUG - self.logger.addHandler(self.handler) - - # the stream is returned to the user so that the capture logs can be retrieved - return self.log_stream - - def __exit__(self, exc_type, exc_val, exc_tb): - # stop the handler, and close the stream to exit - self.logger.removeHandler(self.handler) - self.log_stream.close() - - # reset logging since we messed with the setting - self.test_case.configure_logging() - - -@pytest.fixture(scope="session") -def storage_account(): - test_case = AzureMgmtTestCase("__init__") - rg_preparer = ResourceGroupPreparer(random_name_enabled=True, name_prefix='pystorage') - storage_preparer = StorageAccountPreparer(random_name_enabled=True, name_prefix='pyacrstorage') - - # Create - subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", None) - location = os.environ.get("AZURE_LOCATION", "westus") - - existing_rg_name = os.environ.get("AZURE_RESOURCEGROUP_NAME") - existing_storage_name = os.environ.get("AZURE_STORAGE_ACCOUNT_NAME") - existing_storage_key = os.environ.get("AZURE_STORAGE_ACCOUNT_KEY") - storage_connection_string = os.environ.get("AZURE_STORAGE_CONNECTION_STRING") - - i_need_to_create_rg = not (existing_rg_name or existing_storage_name or storage_connection_string) - got_storage_info_from_env = existing_storage_name or storage_connection_string - - try: - if i_need_to_create_rg: - rg_name, rg_kwargs = rg_preparer._prepare_create_resource(test_case) - rg = rg_kwargs['resource_group'] - else: - rg_name = existing_rg_name or "no_rg_needed" - rg = FakeResource( - name=rg_name, - id="/subscriptions/{}/resourceGroups/{}".format(subscription_id, rg_name) - ) - StorageTestCase._RESOURCE_GROUP = rg - - try: - if got_storage_info_from_env: - - if storage_connection_string: - storage_connection_string_parts = dict([ - part.split('=', 1) - for part in storage_connection_string.split(";") - ]) - - storage_account = None - if existing_storage_name: - storage_name = existing_storage_name - storage_account = StorageAccount( - location=location, - ) - storage_account.name = storage_name - storage_account.id = storage_name - storage_account.primary_endpoints=Endpoints() - storage_account.primary_endpoints.blob = 'https://{}.{}.core.windows.net'.format(storage_name, 'blob') - storage_account.primary_endpoints.queue = 'https://{}.{}.core.windows.net'.format(storage_name, 'queue') - storage_account.primary_endpoints.table = 'https://{}.{}.core.windows.net'.format(storage_name, 'table') - storage_account.primary_endpoints.file = 'https://{}.{}.core.windows.net'.format(storage_name, 'file') - storage_key = existing_storage_key - - if not storage_connection_string: - # It means I have received a storage name from env - storage_connection_string=";".join([ - "DefaultEndpointsProtocol=https", - "AccountName={}".format(storage_name), - "AccountKey={}".format(storage_key), - "BlobEndpoint={}".format(storage_account.primary_endpoints.blob), - "TableEndpoint={}".format(storage_account.primary_endpoints.table), - "QueueEndpoint={}".format(storage_account.primary_endpoints.queue), - "FileEndpoint={}".format(storage_account.primary_endpoints.file), - ]) - - if not storage_account: - # It means I have received a connection string - storage_name = storage_connection_string_parts["AccountName"] - storage_account = StorageAccount( - location=location, - ) - - def build_service_endpoint(service): - return "{}://{}.{}.{}".format( - storage_connection_string_parts.get("DefaultEndpointsProtocol", "https"), - storage_connection_string_parts["AccountName"], - service, - storage_connection_string_parts["EndpointSuffix"], # Let it fail if we don't even have that - ) - - storage_account.name = storage_name - storage_account.id = storage_name - storage_account.primary_endpoints=Endpoints() - storage_account.primary_endpoints.blob = storage_connection_string_parts.get("BlobEndpoint", build_service_endpoint("blob")) - storage_account.primary_endpoints.queue = storage_connection_string_parts.get("QueueEndpoint", build_service_endpoint("queue")) - storage_account.primary_endpoints.file = storage_connection_string_parts.get("FileEndpoint", build_service_endpoint("file")) - storage_account.secondary_endpoints=Endpoints() - storage_account.secondary_endpoints.blob = storage_connection_string_parts.get("BlobSecondaryEndpoint", build_service_endpoint("blob")) - storage_account.secondary_endpoints.queue = storage_connection_string_parts.get("QueueSecondaryEndpoint", build_service_endpoint("queue")) - storage_account.secondary_endpoints.file = storage_connection_string_parts.get("FileSecondaryEndpoint", build_service_endpoint("file")) - storage_key = storage_connection_string_parts["AccountKey"] - - else: - storage_name, storage_kwargs = storage_preparer._prepare_create_resource(test_case, **rg_kwargs) - storage_account = storage_kwargs['storage_account'] - storage_key = storage_kwargs['storage_account_key'] - storage_connection_string = storage_kwargs['storage_account_cs'] - - StorageTestCase._STORAGE_ACCOUNT = storage_account - StorageTestCase._STORAGE_KEY = storage_key - StorageTestCase._STORAGE_CONNECTION_STRING = storage_connection_string - yield - finally: - if not got_storage_info_from_env: - storage_preparer.remove_resource( - storage_name, - resource_group=rg - ) - finally: - if i_need_to_create_rg: - rg_preparer.remove_resource(rg_name) - StorageTestCase._RESOURCE_GROUP = None diff --git a/sdk/storage/azure-storage-blob-changefeed/tests/conftest.py b/sdk/storage/azure-storage-blob-changefeed/tests/conftest.py index c4ac68255457..321cda36dfe8 100644 --- a/sdk/storage/azure-storage-blob-changefeed/tests/conftest.py +++ b/sdk/storage/azure-storage-blob-changefeed/tests/conftest.py @@ -27,15 +27,8 @@ import sys # fixture needs to be visible from conftest -from _shared.testcase import storage_account # Ignore async tests for Python < 3.5 collect_ignore_glob = [] if sys.version_info < (3, 5) or platform.python_implementation() == "PyPy": collect_ignore_glob.append("*_async.py") - -def pytest_configure(config): - # register an additional marker - config.addinivalue_line( - "usefixtures", "storage_account" - ) diff --git a/sdk/storage/azure-storage-blob-changefeed/tests/_shared/__init__.py b/sdk/storage/azure-storage-blob-changefeed/tests/settings/__init__.py similarity index 100% rename from sdk/storage/azure-storage-blob-changefeed/tests/_shared/__init__.py rename to sdk/storage/azure-storage-blob-changefeed/tests/settings/__init__.py diff --git a/sdk/storage/azure-storage-file-share/tests/_shared/settings_fake.py b/sdk/storage/azure-storage-blob-changefeed/tests/settings/settings_fake.py similarity index 65% rename from sdk/storage/azure-storage-file-share/tests/_shared/settings_fake.py rename to sdk/storage/azure-storage-blob-changefeed/tests/settings/settings_fake.py index 7dba7c692a84..2dd5c4fe04a7 100644 --- a/sdk/storage/azure-storage-file-share/tests/_shared/settings_fake.py +++ b/sdk/storage/azure-storage-blob-changefeed/tests/settings/settings_fake.py @@ -4,14 +4,15 @@ # license information. # -------------------------------------------------------------------------- -STORAGE_ACCOUNT_NAME = "" -STORAGE_ACCOUNT_KEY = "" +STORAGE_ACCOUNT_NAME = "fakename" +STORAGE_ACCOUNT_KEY = "fakekey" + +TENANT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_SECRET = "00000000-0000-0000-0000-000000000000" ACCOUNT_URL_SUFFIX = 'core.windows.net' RUN_IN_LIVE = "False" SKIP_LIVE_RECORDING = "True" PROTOCOL = "https" - -ENABLE_LOGGING = True - diff --git a/sdk/storage/azure-storage-blob-changefeed/tests/settings/testcase.py b/sdk/storage/azure-storage-blob-changefeed/tests/settings/testcase.py new file mode 100644 index 000000000000..5aa204271b27 --- /dev/null +++ b/sdk/storage/azure-storage-blob-changefeed/tests/settings/testcase.py @@ -0,0 +1,60 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from __future__ import division + +import functools +import os.path + +try: + import unittest.mock as mock +except ImportError: + import mock + +import logging +from devtools_testutils import ( + PowerShellPreparer, ACCOUNT_FAKE_KEY) + +try: + from cStringIO import StringIO # Python 2 +except ImportError: + from io import StringIO +try: + # Running locally - use configuration in settings_real.py + from .settings_real import * +except ImportError: + # Running on the pipeline - use fake values in order to create rg, etc. + from .settings_fake import * + +try: + from devtools_testutils import mgmt_settings_real as settings +except ImportError: + from devtools_testutils import mgmt_settings_fake as settings + + +LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' +os.environ['STORAGE_ACCOUNT_NAME'] = os.environ.get('STORAGE_ACCOUNT_NAME', None) or STORAGE_ACCOUNT_NAME +os.environ['STORAGE_ACCOUNT_KEY'] = os.environ.get('STORAGE_ACCOUNT_KEY', None) or STORAGE_ACCOUNT_KEY + +os.environ['AZURE_TEST_RUN_LIVE'] = os.environ.get('AZURE_TEST_RUN_LIVE', None) or RUN_IN_LIVE +os.environ['AZURE_SKIP_LIVE_RECORDING'] = os.environ.get('AZURE_SKIP_LIVE_RECORDING', None) or SKIP_LIVE_RECORDING +os.environ['PROTOCOL'] = PROTOCOL +os.environ['ACCOUNT_URL_SUFFIX'] = ACCOUNT_URL_SUFFIX + +os.environ['STORAGE_TENANT_ID'] = os.environ.get('STORAGE_TENANT_ID', None) or TENANT_ID +os.environ['STORAGE_CLIENT_ID'] = os.environ.get('STORAGE_CLIENT_ID', None) or CLIENT_ID +os.environ['STORAGE_CLIENT_SECRET'] = os.environ.get('STORAGE_CLIENT_SECRET', None) or CLIENT_SECRET + +ChangeFeedPreparer = functools.partial( + PowerShellPreparer, "storage", + storage_account_name="storagename", + storage_account_key=ACCOUNT_FAKE_KEY, +) + +def not_for_emulator(test): + def skip_test_if_targeting_emulator(self): + test(self) + return skip_test_if_targeting_emulator diff --git a/sdk/storage/azure-storage-blob-changefeed/tests/test_change_feed.py b/sdk/storage/azure-storage-blob-changefeed/tests/test_change_feed.py index 56bdfb078053..290f05bf0e5a 100644 --- a/sdk/storage/azure-storage-blob-changefeed/tests/test_change_feed.py +++ b/sdk/storage/azure-storage-blob-changefeed/tests/test_change_feed.py @@ -13,18 +13,19 @@ from math import ceil -from _shared.testcase import StorageTestCase, GlobalStorageAccountPreparer from azure.storage.blob.changefeed import ( ChangeFeedClient, ) +from devtools_testutils.storage import StorageTestCase +from settings.testcase import ChangeFeedPreparer @pytest.mark.playback_test_only class StorageChangeFeedTest(StorageTestCase): # --Test cases for change feed ----------------------------------------- - @GlobalStorageAccountPreparer() - def test_get_change_feed_events_by_page(self, resource_group, location, storage_account, storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + @ChangeFeedPreparer() + def test_get_change_feed_events_by_page(self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) results_per_page = 10 change_feed = cf_client.list_changes(results_per_page=results_per_page).by_page() @@ -54,9 +55,9 @@ def test_get_change_feed_events_by_page(self, resource_group, location, storage_ for i in range(0, len(one_page)): self.assertTrue(merged_two_pages[i].get('id') == one_page[i].get('id')) - @GlobalStorageAccountPreparer() - def test_get_all_change_feed_events(self, resource_group, location, storage_account, storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + @ChangeFeedPreparer() + def test_get_all_change_feed_events(self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) change_feed = cf_client.list_changes() all_events = list(change_feed) total_events = len(all_events) @@ -74,10 +75,9 @@ def test_get_all_change_feed_events(self, resource_group, location, storage_acco self.assertEqual(ceil(len(all_events)*1.0/results_per_page), len(pages)) self.assertEqual(total_events, event_number_in_all_pages) - @GlobalStorageAccountPreparer() - def test_get_change_feed_events_with_continuation_token(self, resource_group, location, storage_account, - storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + @ChangeFeedPreparer() + def test_get_change_feed_events_with_continuation_token(self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) # To get the total events number start_time = datetime(2020, 8, 18) end_time = datetime(2020, 8, 19) @@ -100,9 +100,9 @@ def test_get_change_feed_events_with_continuation_token(self, resource_group, lo # Assert the self.assertEqual(total_events, len(events_per_page1) + len(rest_events)) - @GlobalStorageAccountPreparer() - def test_get_change_feed_events_in_a_time_range(self, resource_group, location, storage_account, storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + @ChangeFeedPreparer() + def test_get_change_feed_events_in_a_time_range(self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) start_time = datetime(2020, 8, 12) end_time = datetime(2020, 8, 18) change_feed = cf_client.list_changes(start_time=start_time, end_time=end_time, results_per_page=2).by_page() @@ -113,18 +113,18 @@ def test_get_change_feed_events_in_a_time_range(self, resource_group, location, self.assertIsNot(len(events), 0) - @GlobalStorageAccountPreparer() - def test_change_feed_does_not_fail_on_empty_event_stream(self, resource_group, location, storage_account, storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + @ChangeFeedPreparer() + def test_change_feed_does_not_fail_on_empty_event_stream(self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) start_time = datetime(2300, 8, 19) change_feed = cf_client.list_changes(start_time=start_time) events = list(change_feed) self.assertEqual(len(events), 0) - @GlobalStorageAccountPreparer() - def test_read_change_feed_tail_where_3_shards_have_data(self, resource_group, location, storage_account, storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + @ChangeFeedPreparer() + def test_read_change_feed_tail_where_3_shards_have_data(self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) # to read until the end start_time = datetime(2020, 8, 19, 23) @@ -180,9 +180,9 @@ def test_read_change_feed_tail_where_3_shards_have_data(self, resource_group, lo events3.append(event) self.assertNotEqual(events2, 0) - @GlobalStorageAccountPreparer() - def test_read_change_feed_tail_where_only_1_shard_has_data(self, resource_group, location, storage_account, storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + @ChangeFeedPreparer() + def test_read_change_feed_tail_where_only_1_shard_has_data(self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) # to read until the end start_time = datetime(2020, 8, 20, 1) @@ -220,9 +220,9 @@ def test_read_change_feed_tail_where_only_1_shard_has_data(self, resource_group, self.assertIsNot(len(events2), 0) - @GlobalStorageAccountPreparer() - def test_read_change_feed_with_3_shards_in_a_time_range(self, resource_group, location, storage_account, storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + @ChangeFeedPreparer() + def test_read_change_feed_with_3_shards_in_a_time_range(self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) # to get continuation token start_time = datetime(2020, 8, 19, 22) @@ -249,10 +249,10 @@ def test_read_change_feed_with_3_shards_in_a_time_range(self, resource_group, lo end_time_str = (end_time + timedelta(hours=1)).isoformat() self.assertTrue(events[len(events) - 1]['eventTime'] < end_time_str) - @GlobalStorageAccountPreparer() + @ChangeFeedPreparer() def test_read_3_shards_change_feed_during_a_time_range_in_multiple_times_gives_same_result_as_reading_all( - self, resource_group, location, storage_account, storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) # to read until the end start_time = datetime(2020, 8, 5, 17) @@ -311,9 +311,9 @@ def test_read_3_shards_change_feed_during_a_time_range_in_multiple_times_gives_s self.assertEqual(len(dict_token3['CurrentSegmentCursor']['ShardCursors']), 3) self.assertEqual(len(events)+len(events2)+len(events3), len(all_events)) - @GlobalStorageAccountPreparer() - def test_list_3_shards_events_works_with_1_shard_cursor(self, resource_group, location, storage_account, storage_account_key): - cf_client = ChangeFeedClient(self.account_url(storage_account, "blob"), storage_account_key) + @ChangeFeedPreparer() + def test_list_3_shards_events_works_with_1_shard_cursor(self, storage_account_name, storage_account_key): + cf_client = ChangeFeedClient(self.account_url(storage_account_name, "blob"), storage_account_key) start_time = datetime(2020, 8, 5, 17) end_time = datetime(2020, 8, 5, 17, 15) change_feed = cf_client.list_changes(results_per_page=1, start_time=start_time, end_time=end_time).by_page() diff --git a/sdk/storage/azure-storage-blob/CHANGELOG.md b/sdk/storage/azure-storage-blob/CHANGELOG.md index 6d927065b034..4f45c5a331e5 100644 --- a/sdk/storage/azure-storage-blob/CHANGELOG.md +++ b/sdk/storage/azure-storage-blob/CHANGELOG.md @@ -1,5 +1,26 @@ # Release History +## 12.10.0b2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 12.10.0b1 (2021-11-08) +**New Features** +- Account level SAS tokens now support two new permissions: + - `permanent_delete` +- Encryption Scope is now supported for Sync Blob Copy (`copy_from_url()`) +- Encryption Scope is now supported as a SAS permission + +**Fixes** +- Blob Client Typing annotation issues have been resolved, specifically `invalid type inference` issues (#19906) +- Duplicate type signature issue has been resolved (#19739) + ## 12.9.0 (2021-09-15) **Stable release of preview features** - Added support for service version 2020-10-02 (STG78) diff --git a/sdk/storage/azure-storage-blob/README.md b/sdk/storage/azure-storage-blob/README.md index 2756a3b01edb..a788684d12d2 100644 --- a/sdk/storage/azure-storage-blob/README.md +++ b/sdk/storage/azure-storage-blob/README.md @@ -123,6 +123,14 @@ The `credential` parameter may be provided in a number of different forms, depen from azure.storage.blob import BlobServiceClient service = BlobServiceClient(account_url="https://.blob.core.windows.net", credential="") ``` + + If you are using **customized url** (which means the url is not in this format `.blob.core.windows.net`), + please instantiate the client using the credential below: + ```python + from azure.storage.blob import BlobServiceClient + service = BlobServiceClient(account_url="https://.blob.core.windows.net", + credential={"account_name": "", "account_key":""}) + ``` 4. To use [anonymous public read access](https://docs.microsoft.com/azure/storage/blobs/storage-manage-access-to-resources), simply omit the credential parameter. @@ -337,6 +345,8 @@ Other optional configuration keyword arguments that can be specified on the clie * __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request. * __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at the client level to enable it for all requests. +* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at +the client level to enable it for all requests. * __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}` ## Troubleshooting diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py index 957384e1c1d0..3b0e7eea9256 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_client.py @@ -8,8 +8,8 @@ from io import BytesIO from typing import ( # pylint: disable=unused-import Union, Optional, Any, IO, Iterable, AnyStr, Dict, List, Tuple, - TYPE_CHECKING -) + TYPE_CHECKING, + TypeVar, Type) try: from urllib.parse import urlparse, quote, unquote @@ -74,6 +74,8 @@ 'The require_encryption flag is set, but encryption is not supported' ' for this method.') +ClassType = TypeVar("ClassType") + class BlobClient(StorageAccountHostsMixin): # pylint: disable=too-many-public-methods """A client to interact with a specific blob, although that blob may not yet exist. @@ -202,7 +204,7 @@ def _encode_source_url(self, source_url): @classmethod def from_blob_url(cls, blob_url, credential=None, snapshot=None, **kwargs): - # type: (str, Optional[Any], Optional[Union[str, Dict[str, Any]]], Any) -> BlobClient + # type: (Type[ClassType], str, Optional[Any], Optional[Union[str, Dict[str, Any]]], Any) -> ClassType """Create BlobClient from a blob url. This doesn't support customized blob url with '/' in blob name. :param str blob_url: @@ -272,13 +274,14 @@ def from_blob_url(cls, blob_url, credential=None, snapshot=None, **kwargs): @classmethod def from_connection_string( - cls, conn_str, # type: str + cls, # type: Type[ClassType] + conn_str, # type: str container_name, # type: str blob_name, # type: str snapshot=None, # type: Optional[str] credential=None, # type: Optional[Any] **kwargs # type: Any - ): # type: (...) -> BlobClient + ): # type: (...) -> ClassType """Create BlobClient from a Connection String. :param str conn_str: @@ -1869,9 +1872,21 @@ def _start_copy_from_url_options(self, source_url, metadata=None, incremental_co tier = kwargs.pop('premium_page_blob_tier', None) or kwargs.pop('standard_blob_tier', None) requires_sync = kwargs.pop('requires_sync', None) + encryption_scope_str = kwargs.pop('encryption_scope', None) source_authorization = kwargs.pop('source_authorization', None) + + if not requires_sync and encryption_scope_str: + raise ValueError("Encryption_scope is only supported for sync copy, please specify requires_sync=True") if source_authorization and incremental_copy: raise ValueError("Source authorization tokens are not applicable for incremental copying.") + # + # TODO: refactor start_copy_from_url api in _blob_client.py. Call _generated/_blob_operations.py copy_from_url + # when requires_sync=True is set. + # Currently both sync copy and async copy are calling _generated/_blob_operations.py start_copy_from_url. + # As sync copy diverges more from async copy, more problem will surface. + if encryption_scope_str: + headers.update({'x-ms-encryption-scope': encryption_scope_str}) + if requires_sync is True: headers['x-ms-requires-sync'] = str(requires_sync) if source_authorization: @@ -2056,6 +2071,17 @@ def start_copy_from_url(self, source_url, metadata=None, incremental_copy=False, Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is the prefix of the source_authorization string. This option is only available when `incremental_copy` is set to False and `requires_sync` is set to True. + + .. versionadded:: 12.9.0 + + :keyword str encryption_scope: + A predefined encryption scope used to encrypt the data on the sync copied blob. An encryption + scope can be created using the Management API and referenced here by name. If a default + encryption scope has been defined at the container, this value will override it if the + container-level scope is configured to allow overrides. Otherwise an error will be raised. + + .. versionadded:: 12.10.0 + :returns: A dictionary of copy properties (etag, last_modified, copy_id, copy_status). :rtype: dict[str, Union[str, ~datetime.datetime]] diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_service_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_service_client.py index 2b8a99a2fa9b..9dddb113ff72 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_service_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_blob_service_client.py @@ -8,8 +8,8 @@ import warnings from typing import ( # pylint: disable=unused-import Union, Optional, Any, Iterable, Dict, List, - TYPE_CHECKING -) + TYPE_CHECKING, + TypeVar) try: @@ -52,6 +52,8 @@ FilteredBlob ) +ClassType = TypeVar("ClassType") + class BlobServiceClient(StorageAccountHostsMixin): """A client to interact with the Blob Service at the account level. @@ -144,10 +146,11 @@ def _format_url(self, hostname): @classmethod def from_connection_string( - cls, conn_str, # type: str + cls, # type: Type[ClassType] + conn_str, # type: str credential=None, # type: Optional[Any] **kwargs # type: Any - ): # type: (...) -> BlobServiceClient + ): # type: (...) -> ClassType """Create BlobServiceClient from a Connection String. :param str conn_str: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py index afa10add6feb..8b0a96ba55f7 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_container_client.py @@ -8,8 +8,8 @@ import functools from typing import ( # pylint: disable=unused-import Union, Optional, Any, Iterable, AnyStr, Dict, List, Tuple, IO, Iterator, - TYPE_CHECKING -) + TYPE_CHECKING, + TypeVar) try: @@ -69,6 +69,9 @@ def _get_blob_name(blob): return blob +ClassType = TypeVar("ClassType") + + class ContainerClient(StorageAccountHostsMixin): # pylint: disable=too-many-public-methods """A client to interact with a specific container, although that container may not yet exist. @@ -170,7 +173,7 @@ def _format_url(self, hostname): @classmethod def from_container_url(cls, container_url, credential=None, **kwargs): - # type: (str, Optional[Any], Any) -> ContainerClient + # type: (Type[ClassType], str, Optional[Any], Any) -> ClassType """Create ContainerClient from a container url. :param str container_url: @@ -213,11 +216,12 @@ def from_container_url(cls, container_url, credential=None, **kwargs): @classmethod def from_connection_string( - cls, conn_str, # type: str + cls, # type: Type[ClassType] + conn_str, # type: str container_name, # type: str credential=None, # type: Optional[Any] **kwargs # type: Any - ): # type: (...) -> ContainerClient + ): # type: (...) -> ClassType """Create ContainerClient from a Connection String. :param str conn_str: diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/_configuration.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/_configuration.py index 1c0d9c86c093..ce8d4369abdc 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/_configuration.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/_configuration.py @@ -38,7 +38,7 @@ def __init__( super(AzureBlobStorageConfiguration, self).__init__(**kwargs) self.url = url - self.version = "2020-10-02" + self.version = "2020-12-06" kwargs.setdefault('sdk_moniker', 'azureblobstorage/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/_configuration.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/_configuration.py index bb5c7494306b..c42bf9977c7d 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/_configuration.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/_configuration.py @@ -33,7 +33,7 @@ def __init__( super(AzureBlobStorageConfiguration, self).__init__(**kwargs) self.url = url - self.version = "2020-10-02" + self.version = "2020-12-06" kwargs.setdefault('sdk_moniker', 'azureblobstorage/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_blob_operations.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_blob_operations.py index e8ab38248ae5..46a5ad21ca32 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_blob_operations.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_blob_operations.py @@ -2139,6 +2139,7 @@ async def copy_from_url( source_modified_access_conditions: Optional["_models.SourceModifiedAccessConditions"] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, + cpk_scope_info: Optional["_models.CpkScopeInfo"] = None, **kwargs: Any ) -> None: """The Copy From URL operation copies a blob or an internet resource to a new blob. It will not @@ -2188,6 +2189,8 @@ async def copy_from_url( :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions :param lease_access_conditions: Parameter group. :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions + :param cpk_scope_info: Parameter group. + :type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -2209,6 +2212,9 @@ async def copy_from_url( _if_none_match = None _if_tags = None _lease_id = None + _encryption_scope = None + if cpk_scope_info is not None: + _encryption_scope = cpk_scope_info.encryption_scope if lease_access_conditions is not None: _lease_id = lease_access_conditions.lease_id if modified_access_conditions is not None: @@ -2280,6 +2286,8 @@ async def copy_from_url( header_parameters['x-ms-legal-hold'] = self._serialize.header("legal_hold", legal_hold, 'bool') if copy_source_authorization is not None: header_parameters['x-ms-copy-source-authorization'] = self._serialize.header("copy_source_authorization", copy_source_authorization, 'str') + if _encryption_scope is not None: + header_parameters['x-ms-encryption-scope'] = self._serialize.header("encryption_scope", _encryption_scope, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.put(url, query_parameters, header_parameters) @@ -2303,6 +2311,7 @@ async def copy_from_url( response_headers['x-ms-copy-status']=self._deserialize('str', response.headers.get('x-ms-copy-status')) response_headers['Content-MD5']=self._deserialize('bytearray', response.headers.get('Content-MD5')) response_headers['x-ms-content-crc64']=self._deserialize('bytearray', response.headers.get('x-ms-content-crc64')) + response_headers['x-ms-encryption-scope']=self._deserialize('str', response.headers.get('x-ms-encryption-scope')) if cls: return cls(pipeline_response, None, response_headers) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_directory_operations.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_directory_operations.py deleted file mode 100644 index 12e49a1e7bd9..000000000000 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/aio/operations/_directory_operations.py +++ /dev/null @@ -1,742 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest - -from ... import models as _models - -T = TypeVar('T') -ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] - -class DirectoryOperations: - """DirectoryOperations async operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.storage.blob.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer) -> None: - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - async def create( - self, - timeout: Optional[int] = None, - directory_properties: Optional[str] = None, - posix_permissions: Optional[str] = None, - posix_umask: Optional[str] = None, - request_id_parameter: Optional[str] = None, - directory_http_headers: Optional["_models.DirectoryHttpHeaders"] = None, - lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, - modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs: Any - ) -> None: - """Create a directory. By default, the destination is overwritten and if the destination already - exists and has a lease the lease is broken. This operation supports conditional HTTP requests. - For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. - To fail if the destination already exists, use a conditional request with If-None-Match: "*". - - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param directory_properties: Optional. User-defined properties to be stored with the file or - directory, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", - where each value is base64 encoded. - :type directory_properties: str - :param posix_permissions: Optional and only valid if Hierarchical Namespace is enabled for the - account. Sets POSIX access permissions for the file owner, the file owning group, and others. - Each class may be granted read, write, or execute permission. The sticky bit is also - supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. - :type posix_permissions: str - :param posix_umask: Only valid if Hierarchical Namespace is enabled for the account. This umask - restricts permission settings for file and directory, and will only be applied when default Acl - does not exist in parent directory. If the umask bit has set, it means that the corresponding - permission will be disabled. Otherwise the corresponding permission will be determined by the - permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified, - a default umask - 0027 will be used. - :type posix_umask: str - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param directory_http_headers: Parameter group. - :type directory_http_headers: ~azure.storage.blob.models.DirectoryHttpHeaders - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _cache_control = None - _content_type = None - _content_encoding = None - _content_language = None - _content_disposition = None - _lease_id = None - _if_modified_since = None - _if_unmodified_since = None - _if_match = None - _if_none_match = None - if directory_http_headers is not None: - _cache_control = directory_http_headers.cache_control - _content_type = directory_http_headers.content_type - _content_encoding = directory_http_headers.content_encoding - _content_language = directory_http_headers.content_language - _content_disposition = directory_http_headers.content_disposition - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - resource = "directory" - accept = "application/xml" - - # Construct URL - url = self.create.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['resource'] = self._serialize.query("resource", resource, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if directory_properties is not None: - header_parameters['x-ms-properties'] = self._serialize.header("directory_properties", directory_properties, 'str') - if posix_permissions is not None: - header_parameters['x-ms-permissions'] = self._serialize.header("posix_permissions", posix_permissions, 'str') - if posix_umask is not None: - header_parameters['x-ms-umask'] = self._serialize.header("posix_umask", posix_umask, 'str') - if _cache_control is not None: - header_parameters['x-ms-cache-control'] = self._serialize.header("cache_control", _cache_control, 'str') - if _content_type is not None: - header_parameters['x-ms-content-type'] = self._serialize.header("content_type", _content_type, 'str') - if _content_encoding is not None: - header_parameters['x-ms-content-encoding'] = self._serialize.header("content_encoding", _content_encoding, 'str') - if _content_language is not None: - header_parameters['x-ms-content-language'] = self._serialize.header("content_language", _content_language, 'str') - if _content_disposition is not None: - header_parameters['x-ms-content-disposition'] = self._serialize.header("content_disposition", _content_disposition, 'str') - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.put(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - - if cls: - return cls(pipeline_response, None, response_headers) - - create.metadata = {'url': '/{filesystem}/{path}'} # type: ignore - - async def rename( - self, - rename_source: str, - timeout: Optional[int] = None, - marker: Optional[str] = None, - path_rename_mode: Optional[Union[str, "_models.PathRenameMode"]] = None, - directory_properties: Optional[str] = None, - posix_permissions: Optional[str] = None, - posix_umask: Optional[str] = None, - source_lease_id: Optional[str] = None, - request_id_parameter: Optional[str] = None, - directory_http_headers: Optional["_models.DirectoryHttpHeaders"] = None, - lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, - modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - source_modified_access_conditions: Optional["_models.SourceModifiedAccessConditions"] = None, - **kwargs: Any - ) -> None: - """Rename a directory. By default, the destination is overwritten and if the destination already - exists and has a lease the lease is broken. This operation supports conditional HTTP requests. - For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. - To fail if the destination already exists, use a conditional request with If-None-Match: "*". - - :param rename_source: The file or directory to be renamed. The value must have the following - format: "/{filesysystem}/{path}". If "x-ms-properties" is specified, the properties will - overwrite the existing properties; otherwise, the existing properties will be preserved. - :type rename_source: str - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param marker: When renaming a directory, the number of paths that are renamed with each - invocation is limited. If the number of paths to be renamed exceeds this limit, a continuation - token is returned in this response header. When a continuation token is returned in the - response, it must be specified in a subsequent invocation of the rename operation to continue - renaming the directory. - :type marker: str - :param path_rename_mode: Determines the behavior of the rename operation. - :type path_rename_mode: str or ~azure.storage.blob.models.PathRenameMode - :param directory_properties: Optional. User-defined properties to be stored with the file or - directory, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", - where each value is base64 encoded. - :type directory_properties: str - :param posix_permissions: Optional and only valid if Hierarchical Namespace is enabled for the - account. Sets POSIX access permissions for the file owner, the file owning group, and others. - Each class may be granted read, write, or execute permission. The sticky bit is also - supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. - :type posix_permissions: str - :param posix_umask: Only valid if Hierarchical Namespace is enabled for the account. This umask - restricts permission settings for file and directory, and will only be applied when default Acl - does not exist in parent directory. If the umask bit has set, it means that the corresponding - permission will be disabled. Otherwise the corresponding permission will be determined by the - permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified, - a default umask - 0027 will be used. - :type posix_umask: str - :param source_lease_id: A lease ID for the source path. If specified, the source path must have - an active lease and the lease ID must match. - :type source_lease_id: str - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param directory_http_headers: Parameter group. - :type directory_http_headers: ~azure.storage.blob.models.DirectoryHttpHeaders - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :param source_modified_access_conditions: Parameter group. - :type source_modified_access_conditions: ~azure.storage.blob.models.SourceModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _cache_control = None - _content_type = None - _content_encoding = None - _content_language = None - _content_disposition = None - _lease_id = None - _if_modified_since = None - _if_unmodified_since = None - _if_match = None - _if_none_match = None - _source_if_modified_since = None - _source_if_unmodified_since = None - _source_if_match = None - _source_if_none_match = None - if directory_http_headers is not None: - _cache_control = directory_http_headers.cache_control - _content_type = directory_http_headers.content_type - _content_encoding = directory_http_headers.content_encoding - _content_language = directory_http_headers.content_language - _content_disposition = directory_http_headers.content_disposition - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - if source_modified_access_conditions is not None: - _source_if_modified_since = source_modified_access_conditions.source_if_modified_since - _source_if_unmodified_since = source_modified_access_conditions.source_if_unmodified_since - _source_if_match = source_modified_access_conditions.source_if_match - _source_if_none_match = source_modified_access_conditions.source_if_none_match - accept = "application/xml" - - # Construct URL - url = self.rename.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if marker is not None: - query_parameters['continuation'] = self._serialize.query("marker", marker, 'str') - if path_rename_mode is not None: - query_parameters['mode'] = self._serialize.query("path_rename_mode", path_rename_mode, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-rename-source'] = self._serialize.header("rename_source", rename_source, 'str') - if directory_properties is not None: - header_parameters['x-ms-properties'] = self._serialize.header("directory_properties", directory_properties, 'str') - if posix_permissions is not None: - header_parameters['x-ms-permissions'] = self._serialize.header("posix_permissions", posix_permissions, 'str') - if posix_umask is not None: - header_parameters['x-ms-umask'] = self._serialize.header("posix_umask", posix_umask, 'str') - if _cache_control is not None: - header_parameters['x-ms-cache-control'] = self._serialize.header("cache_control", _cache_control, 'str') - if _content_type is not None: - header_parameters['x-ms-content-type'] = self._serialize.header("content_type", _content_type, 'str') - if _content_encoding is not None: - header_parameters['x-ms-content-encoding'] = self._serialize.header("content_encoding", _content_encoding, 'str') - if _content_language is not None: - header_parameters['x-ms-content-language'] = self._serialize.header("content_language", _content_language, 'str') - if _content_disposition is not None: - header_parameters['x-ms-content-disposition'] = self._serialize.header("content_disposition", _content_disposition, 'str') - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if source_lease_id is not None: - header_parameters['x-ms-source-lease-id'] = self._serialize.header("source_lease_id", source_lease_id, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - if _source_if_modified_since is not None: - header_parameters['x-ms-source-if-modified-since'] = self._serialize.header("source_if_modified_since", _source_if_modified_since, 'rfc-1123') - if _source_if_unmodified_since is not None: - header_parameters['x-ms-source-if-unmodified-since'] = self._serialize.header("source_if_unmodified_since", _source_if_unmodified_since, 'rfc-1123') - if _source_if_match is not None: - header_parameters['x-ms-source-if-match'] = self._serialize.header("source_if_match", _source_if_match, 'str') - if _source_if_none_match is not None: - header_parameters['x-ms-source-if-none-match'] = self._serialize.header("source_if_none_match", _source_if_none_match, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.put(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - - if cls: - return cls(pipeline_response, None, response_headers) - - rename.metadata = {'url': '/{filesystem}/{path}'} # type: ignore - - async def delete( - self, - recursive_directory_delete: bool, - timeout: Optional[int] = None, - marker: Optional[str] = None, - request_id_parameter: Optional[str] = None, - lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, - modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs: Any - ) -> None: - """Deletes the directory. - - :param recursive_directory_delete: If "true", all paths beneath the directory will be deleted. - If "false" and the directory is non-empty, an error occurs. - :type recursive_directory_delete: bool - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param marker: When renaming a directory, the number of paths that are renamed with each - invocation is limited. If the number of paths to be renamed exceeds this limit, a continuation - token is returned in this response header. When a continuation token is returned in the - response, it must be specified in a subsequent invocation of the rename operation to continue - renaming the directory. - :type marker: str - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _lease_id = None - _if_modified_since = None - _if_unmodified_since = None - _if_match = None - _if_none_match = None - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - accept = "application/xml" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - query_parameters['recursive'] = self._serialize.query("recursive_directory_delete", recursive_directory_delete, 'bool') - if marker is not None: - query_parameters['continuation'] = self._serialize.query("marker", marker, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - - if cls: - return cls(pipeline_response, None, response_headers) - - delete.metadata = {'url': '/{filesystem}/{path}'} # type: ignore - - async def set_access_control( - self, - timeout: Optional[int] = None, - owner: Optional[str] = None, - group: Optional[str] = None, - posix_permissions: Optional[str] = None, - posix_acl: Optional[str] = None, - request_id_parameter: Optional[str] = None, - lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, - modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs: Any - ) -> None: - """Set the owner, group, permissions, or access control list for a directory. - - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param owner: Optional. The owner of the blob or directory. - :type owner: str - :param group: Optional. The owning group of the blob or directory. - :type group: str - :param posix_permissions: Optional and only valid if Hierarchical Namespace is enabled for the - account. Sets POSIX access permissions for the file owner, the file owning group, and others. - Each class may be granted read, write, or execute permission. The sticky bit is also - supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. - :type posix_permissions: str - :param posix_acl: Sets POSIX access control rights on files and directories. The value is a - comma-separated list of access control entries. Each access control entry (ACE) consists of a - scope, a type, a user or group identifier, and permissions in the format - "[scope:][type]:[id]:[permissions]". - :type posix_acl: str - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _lease_id = None - _if_match = None - _if_none_match = None - _if_modified_since = None - _if_unmodified_since = None - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - action = "setAccessControl" - accept = "application/xml" - - # Construct URL - url = self.set_access_control.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['action'] = self._serialize.query("action", action, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if owner is not None: - header_parameters['x-ms-owner'] = self._serialize.header("owner", owner, 'str') - if group is not None: - header_parameters['x-ms-group'] = self._serialize.header("group", group, 'str') - if posix_permissions is not None: - header_parameters['x-ms-permissions'] = self._serialize.header("posix_permissions", posix_permissions, 'str') - if posix_acl is not None: - header_parameters['x-ms-acl'] = self._serialize.header("posix_acl", posix_acl, 'str') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.patch(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - - if cls: - return cls(pipeline_response, None, response_headers) - - set_access_control.metadata = {'url': '/{filesystem}/{path}'} # type: ignore - - async def get_access_control( - self, - timeout: Optional[int] = None, - upn: Optional[bool] = None, - request_id_parameter: Optional[str] = None, - lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, - modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs: Any - ) -> None: - """Get the owner, group, permissions, or access control list for a directory. - - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If - "true", the identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response - headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If - "false", the values will be returned as Azure Active Directory Object IDs. The default value is - false. - :type upn: bool - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _lease_id = None - _if_match = None - _if_none_match = None - _if_modified_since = None - _if_unmodified_since = None - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - action = "getAccessControl" - accept = "application/xml" - - # Construct URL - url = self.get_access_control.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['action'] = self._serialize.query("action", action, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if upn is not None: - query_parameters['upn'] = self._serialize.query("upn", upn, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.head(url, query_parameters, header_parameters) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) - response_headers['x-ms-owner']=self._deserialize('str', response.headers.get('x-ms-owner')) - response_headers['x-ms-group']=self._deserialize('str', response.headers.get('x-ms-group')) - response_headers['x-ms-permissions']=self._deserialize('str', response.headers.get('x-ms-permissions')) - response_headers['x-ms-acl']=self._deserialize('str', response.headers.get('x-ms-acl')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - - if cls: - return cls(pipeline_response, None, response_headers) - - get_access_control.metadata = {'url': '/{filesystem}/{path}'} # type: ignore diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_azure_blob_storage_enums.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_azure_blob_storage_enums.py index 2597f6f970be..31325457b829 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_azure_blob_storage_enums.py @@ -175,6 +175,7 @@ class ListContainersIncludeType(with_metaclass(_CaseInsensitiveEnumMeta, str, En METADATA = "metadata" DELETED = "deleted" + SYSTEM = "system" class PremiumPageBlobAccessTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -329,7 +330,7 @@ class StorageErrorCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SEQUENCE_NUMBER_CONDITION_NOT_MET = "SequenceNumberConditionNotMet" SEQUENCE_NUMBER_INCREMENT_TOO_LARGE = "SequenceNumberIncrementTooLarge" SNAPSHOT_COUNT_EXCEEDED = "SnapshotCountExceeded" - SNAPHOT_OPERATION_RATE_EXCEEDED = "SnaphotOperationRateExceeded" + SNAPSHOT_OPERATION_RATE_EXCEEDED = "SnapshotOperationRateExceeded" SNAPSHOTS_PRESENT = "SnapshotsPresent" SOURCE_CONDITION_NOT_MET = "SourceConditionNotMet" SYSTEM_IN_USE = "SystemInUse" diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_models.py index 42addb4cbe54..20f2544a5b88 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_models.py @@ -259,10 +259,10 @@ class BlobItemInternal(msrest.serialization.Model): :type metadata: ~azure.storage.blob.models.BlobMetadata :param blob_tags: Blob tags. :type blob_tags: ~azure.storage.blob.models.BlobTags - :param object_replication_metadata: Dictionary of :code:``. - :type object_replication_metadata: dict[str, str] :param has_versions_only: :type has_versions_only: bool + :param object_replication_metadata: Dictionary of :code:``. + :type object_replication_metadata: dict[str, str] """ _validation = { @@ -281,8 +281,8 @@ class BlobItemInternal(msrest.serialization.Model): 'properties': {'key': 'Properties', 'type': 'BlobPropertiesInternal'}, 'metadata': {'key': 'Metadata', 'type': 'BlobMetadata'}, 'blob_tags': {'key': 'BlobTags', 'type': 'BlobTags'}, - 'object_replication_metadata': {'key': 'OrMetadata', 'type': '{str}'}, 'has_versions_only': {'key': 'HasVersionsOnly', 'type': 'bool'}, + 'object_replication_metadata': {'key': 'OrMetadata', 'type': '{str}'}, } _xml_map = { 'name': 'Blob' @@ -301,8 +301,8 @@ def __init__( self.properties = kwargs['properties'] self.metadata = kwargs.get('metadata', None) self.blob_tags = kwargs.get('blob_tags', None) - self.object_replication_metadata = kwargs.get('object_replication_metadata', None) self.has_versions_only = kwargs.get('has_versions_only', None) + self.object_replication_metadata = kwargs.get('object_replication_metadata', None) class BlobMetadata(msrest.serialization.Model): diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_models_py3.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_models_py3.py index 3b243ec7078b..e065b4e03dee 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_models_py3.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/models/_models_py3.py @@ -290,10 +290,10 @@ class BlobItemInternal(msrest.serialization.Model): :type metadata: ~azure.storage.blob.models.BlobMetadata :param blob_tags: Blob tags. :type blob_tags: ~azure.storage.blob.models.BlobTags - :param object_replication_metadata: Dictionary of :code:``. - :type object_replication_metadata: dict[str, str] :param has_versions_only: :type has_versions_only: bool + :param object_replication_metadata: Dictionary of :code:``. + :type object_replication_metadata: dict[str, str] """ _validation = { @@ -312,8 +312,8 @@ class BlobItemInternal(msrest.serialization.Model): 'properties': {'key': 'Properties', 'type': 'BlobPropertiesInternal'}, 'metadata': {'key': 'Metadata', 'type': 'BlobMetadata'}, 'blob_tags': {'key': 'BlobTags', 'type': 'BlobTags'}, - 'object_replication_metadata': {'key': 'OrMetadata', 'type': '{str}'}, 'has_versions_only': {'key': 'HasVersionsOnly', 'type': 'bool'}, + 'object_replication_metadata': {'key': 'OrMetadata', 'type': '{str}'}, } _xml_map = { 'name': 'Blob' @@ -330,8 +330,8 @@ def __init__( is_current_version: Optional[bool] = None, metadata: Optional["BlobMetadata"] = None, blob_tags: Optional["BlobTags"] = None, - object_replication_metadata: Optional[Dict[str, str]] = None, has_versions_only: Optional[bool] = None, + object_replication_metadata: Optional[Dict[str, str]] = None, **kwargs ): super(BlobItemInternal, self).__init__(**kwargs) @@ -343,8 +343,8 @@ def __init__( self.properties = properties self.metadata = metadata self.blob_tags = blob_tags - self.object_replication_metadata = object_replication_metadata self.has_versions_only = has_versions_only + self.object_replication_metadata = object_replication_metadata class BlobMetadata(msrest.serialization.Model): diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/operations/_blob_operations.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/operations/_blob_operations.py index a7d8341159dc..e041221239fa 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/operations/_blob_operations.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/operations/_blob_operations.py @@ -2160,6 +2160,7 @@ def copy_from_url( source_modified_access_conditions=None, # type: Optional["_models.SourceModifiedAccessConditions"] modified_access_conditions=None, # type: Optional["_models.ModifiedAccessConditions"] lease_access_conditions=None, # type: Optional["_models.LeaseAccessConditions"] + cpk_scope_info=None, # type: Optional["_models.CpkScopeInfo"] **kwargs # type: Any ): # type: (...) -> None @@ -2210,6 +2211,8 @@ def copy_from_url( :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions :param lease_access_conditions: Parameter group. :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions + :param cpk_scope_info: Parameter group. + :type cpk_scope_info: ~azure.storage.blob.models.CpkScopeInfo :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -2231,6 +2234,9 @@ def copy_from_url( _if_none_match = None _if_tags = None _lease_id = None + _encryption_scope = None + if cpk_scope_info is not None: + _encryption_scope = cpk_scope_info.encryption_scope if lease_access_conditions is not None: _lease_id = lease_access_conditions.lease_id if modified_access_conditions is not None: @@ -2302,6 +2308,8 @@ def copy_from_url( header_parameters['x-ms-legal-hold'] = self._serialize.header("legal_hold", legal_hold, 'bool') if copy_source_authorization is not None: header_parameters['x-ms-copy-source-authorization'] = self._serialize.header("copy_source_authorization", copy_source_authorization, 'str') + if _encryption_scope is not None: + header_parameters['x-ms-encryption-scope'] = self._serialize.header("encryption_scope", _encryption_scope, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.put(url, query_parameters, header_parameters) @@ -2325,6 +2333,7 @@ def copy_from_url( response_headers['x-ms-copy-status']=self._deserialize('str', response.headers.get('x-ms-copy-status')) response_headers['Content-MD5']=self._deserialize('bytearray', response.headers.get('Content-MD5')) response_headers['x-ms-content-crc64']=self._deserialize('bytearray', response.headers.get('x-ms-content-crc64')) + response_headers['x-ms-encryption-scope']=self._deserialize('str', response.headers.get('x-ms-encryption-scope')) if cls: return cls(pipeline_response, None, response_headers) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/operations/_directory_operations.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/operations/_directory_operations.py deleted file mode 100644 index 0ebb32d05eed..000000000000 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_generated/operations/_directory_operations.py +++ /dev/null @@ -1,751 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -import datetime -from typing import TYPE_CHECKING -import warnings - -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from .. import models as _models - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union - - T = TypeVar('T') - ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] - -class DirectoryOperations(object): - """DirectoryOperations operations. - - You should not instantiate this class directly. Instead, you should create a Client instance that - instantiates it for you and attaches it as an attribute. - - :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.storage.blob.models - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - """ - - models = _models - - def __init__(self, client, config, serializer, deserializer): - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self._config = config - - def create( - self, - timeout=None, # type: Optional[int] - directory_properties=None, # type: Optional[str] - posix_permissions=None, # type: Optional[str] - posix_umask=None, # type: Optional[str] - request_id_parameter=None, # type: Optional[str] - directory_http_headers=None, # type: Optional["_models.DirectoryHttpHeaders"] - lease_access_conditions=None, # type: Optional["_models.LeaseAccessConditions"] - modified_access_conditions=None, # type: Optional["_models.ModifiedAccessConditions"] - **kwargs # type: Any - ): - # type: (...) -> None - """Create a directory. By default, the destination is overwritten and if the destination already - exists and has a lease the lease is broken. This operation supports conditional HTTP requests. - For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. - To fail if the destination already exists, use a conditional request with If-None-Match: "*". - - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param directory_properties: Optional. User-defined properties to be stored with the file or - directory, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", - where each value is base64 encoded. - :type directory_properties: str - :param posix_permissions: Optional and only valid if Hierarchical Namespace is enabled for the - account. Sets POSIX access permissions for the file owner, the file owning group, and others. - Each class may be granted read, write, or execute permission. The sticky bit is also - supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. - :type posix_permissions: str - :param posix_umask: Only valid if Hierarchical Namespace is enabled for the account. This umask - restricts permission settings for file and directory, and will only be applied when default Acl - does not exist in parent directory. If the umask bit has set, it means that the corresponding - permission will be disabled. Otherwise the corresponding permission will be determined by the - permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified, - a default umask - 0027 will be used. - :type posix_umask: str - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param directory_http_headers: Parameter group. - :type directory_http_headers: ~azure.storage.blob.models.DirectoryHttpHeaders - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _cache_control = None - _content_type = None - _content_encoding = None - _content_language = None - _content_disposition = None - _lease_id = None - _if_modified_since = None - _if_unmodified_since = None - _if_match = None - _if_none_match = None - if directory_http_headers is not None: - _cache_control = directory_http_headers.cache_control - _content_type = directory_http_headers.content_type - _content_encoding = directory_http_headers.content_encoding - _content_language = directory_http_headers.content_language - _content_disposition = directory_http_headers.content_disposition - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - resource = "directory" - accept = "application/xml" - - # Construct URL - url = self.create.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['resource'] = self._serialize.query("resource", resource, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if directory_properties is not None: - header_parameters['x-ms-properties'] = self._serialize.header("directory_properties", directory_properties, 'str') - if posix_permissions is not None: - header_parameters['x-ms-permissions'] = self._serialize.header("posix_permissions", posix_permissions, 'str') - if posix_umask is not None: - header_parameters['x-ms-umask'] = self._serialize.header("posix_umask", posix_umask, 'str') - if _cache_control is not None: - header_parameters['x-ms-cache-control'] = self._serialize.header("cache_control", _cache_control, 'str') - if _content_type is not None: - header_parameters['x-ms-content-type'] = self._serialize.header("content_type", _content_type, 'str') - if _content_encoding is not None: - header_parameters['x-ms-content-encoding'] = self._serialize.header("content_encoding", _content_encoding, 'str') - if _content_language is not None: - header_parameters['x-ms-content-language'] = self._serialize.header("content_language", _content_language, 'str') - if _content_disposition is not None: - header_parameters['x-ms-content-disposition'] = self._serialize.header("content_disposition", _content_disposition, 'str') - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.put(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - - if cls: - return cls(pipeline_response, None, response_headers) - - create.metadata = {'url': '/{filesystem}/{path}'} # type: ignore - - def rename( - self, - rename_source, # type: str - timeout=None, # type: Optional[int] - marker=None, # type: Optional[str] - path_rename_mode=None, # type: Optional[Union[str, "_models.PathRenameMode"]] - directory_properties=None, # type: Optional[str] - posix_permissions=None, # type: Optional[str] - posix_umask=None, # type: Optional[str] - source_lease_id=None, # type: Optional[str] - request_id_parameter=None, # type: Optional[str] - directory_http_headers=None, # type: Optional["_models.DirectoryHttpHeaders"] - lease_access_conditions=None, # type: Optional["_models.LeaseAccessConditions"] - modified_access_conditions=None, # type: Optional["_models.ModifiedAccessConditions"] - source_modified_access_conditions=None, # type: Optional["_models.SourceModifiedAccessConditions"] - **kwargs # type: Any - ): - # type: (...) -> None - """Rename a directory. By default, the destination is overwritten and if the destination already - exists and has a lease the lease is broken. This operation supports conditional HTTP requests. - For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. - To fail if the destination already exists, use a conditional request with If-None-Match: "*". - - :param rename_source: The file or directory to be renamed. The value must have the following - format: "/{filesysystem}/{path}". If "x-ms-properties" is specified, the properties will - overwrite the existing properties; otherwise, the existing properties will be preserved. - :type rename_source: str - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param marker: When renaming a directory, the number of paths that are renamed with each - invocation is limited. If the number of paths to be renamed exceeds this limit, a continuation - token is returned in this response header. When a continuation token is returned in the - response, it must be specified in a subsequent invocation of the rename operation to continue - renaming the directory. - :type marker: str - :param path_rename_mode: Determines the behavior of the rename operation. - :type path_rename_mode: str or ~azure.storage.blob.models.PathRenameMode - :param directory_properties: Optional. User-defined properties to be stored with the file or - directory, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", - where each value is base64 encoded. - :type directory_properties: str - :param posix_permissions: Optional and only valid if Hierarchical Namespace is enabled for the - account. Sets POSIX access permissions for the file owner, the file owning group, and others. - Each class may be granted read, write, or execute permission. The sticky bit is also - supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. - :type posix_permissions: str - :param posix_umask: Only valid if Hierarchical Namespace is enabled for the account. This umask - restricts permission settings for file and directory, and will only be applied when default Acl - does not exist in parent directory. If the umask bit has set, it means that the corresponding - permission will be disabled. Otherwise the corresponding permission will be determined by the - permission. A 4-digit octal notation (e.g. 0022) is supported here. If no umask was specified, - a default umask - 0027 will be used. - :type posix_umask: str - :param source_lease_id: A lease ID for the source path. If specified, the source path must have - an active lease and the lease ID must match. - :type source_lease_id: str - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param directory_http_headers: Parameter group. - :type directory_http_headers: ~azure.storage.blob.models.DirectoryHttpHeaders - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :param source_modified_access_conditions: Parameter group. - :type source_modified_access_conditions: ~azure.storage.blob.models.SourceModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _cache_control = None - _content_type = None - _content_encoding = None - _content_language = None - _content_disposition = None - _lease_id = None - _if_modified_since = None - _if_unmodified_since = None - _if_match = None - _if_none_match = None - _source_if_modified_since = None - _source_if_unmodified_since = None - _source_if_match = None - _source_if_none_match = None - if directory_http_headers is not None: - _cache_control = directory_http_headers.cache_control - _content_type = directory_http_headers.content_type - _content_encoding = directory_http_headers.content_encoding - _content_language = directory_http_headers.content_language - _content_disposition = directory_http_headers.content_disposition - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - if source_modified_access_conditions is not None: - _source_if_modified_since = source_modified_access_conditions.source_if_modified_since - _source_if_unmodified_since = source_modified_access_conditions.source_if_unmodified_since - _source_if_match = source_modified_access_conditions.source_if_match - _source_if_none_match = source_modified_access_conditions.source_if_none_match - accept = "application/xml" - - # Construct URL - url = self.rename.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if marker is not None: - query_parameters['continuation'] = self._serialize.query("marker", marker, 'str') - if path_rename_mode is not None: - query_parameters['mode'] = self._serialize.query("path_rename_mode", path_rename_mode, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['x-ms-rename-source'] = self._serialize.header("rename_source", rename_source, 'str') - if directory_properties is not None: - header_parameters['x-ms-properties'] = self._serialize.header("directory_properties", directory_properties, 'str') - if posix_permissions is not None: - header_parameters['x-ms-permissions'] = self._serialize.header("posix_permissions", posix_permissions, 'str') - if posix_umask is not None: - header_parameters['x-ms-umask'] = self._serialize.header("posix_umask", posix_umask, 'str') - if _cache_control is not None: - header_parameters['x-ms-cache-control'] = self._serialize.header("cache_control", _cache_control, 'str') - if _content_type is not None: - header_parameters['x-ms-content-type'] = self._serialize.header("content_type", _content_type, 'str') - if _content_encoding is not None: - header_parameters['x-ms-content-encoding'] = self._serialize.header("content_encoding", _content_encoding, 'str') - if _content_language is not None: - header_parameters['x-ms-content-language'] = self._serialize.header("content_language", _content_language, 'str') - if _content_disposition is not None: - header_parameters['x-ms-content-disposition'] = self._serialize.header("content_disposition", _content_disposition, 'str') - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if source_lease_id is not None: - header_parameters['x-ms-source-lease-id'] = self._serialize.header("source_lease_id", source_lease_id, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - if _source_if_modified_since is not None: - header_parameters['x-ms-source-if-modified-since'] = self._serialize.header("source_if_modified_since", _source_if_modified_since, 'rfc-1123') - if _source_if_unmodified_since is not None: - header_parameters['x-ms-source-if-unmodified-since'] = self._serialize.header("source_if_unmodified_since", _source_if_unmodified_since, 'rfc-1123') - if _source_if_match is not None: - header_parameters['x-ms-source-if-match'] = self._serialize.header("source_if_match", _source_if_match, 'str') - if _source_if_none_match is not None: - header_parameters['x-ms-source-if-none-match'] = self._serialize.header("source_if_none_match", _source_if_none_match, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.put(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [201]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Content-Length']=self._deserialize('long', response.headers.get('Content-Length')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - - if cls: - return cls(pipeline_response, None, response_headers) - - rename.metadata = {'url': '/{filesystem}/{path}'} # type: ignore - - def delete( - self, - recursive_directory_delete, # type: bool - timeout=None, # type: Optional[int] - marker=None, # type: Optional[str] - request_id_parameter=None, # type: Optional[str] - lease_access_conditions=None, # type: Optional["_models.LeaseAccessConditions"] - modified_access_conditions=None, # type: Optional["_models.ModifiedAccessConditions"] - **kwargs # type: Any - ): - # type: (...) -> None - """Deletes the directory. - - :param recursive_directory_delete: If "true", all paths beneath the directory will be deleted. - If "false" and the directory is non-empty, an error occurs. - :type recursive_directory_delete: bool - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param marker: When renaming a directory, the number of paths that are renamed with each - invocation is limited. If the number of paths to be renamed exceeds this limit, a continuation - token is returned in this response header. When a continuation token is returned in the - response, it must be specified in a subsequent invocation of the rename operation to continue - renaming the directory. - :type marker: str - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _lease_id = None - _if_modified_since = None - _if_unmodified_since = None - _if_match = None - _if_none_match = None - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - accept = "application/xml" - - # Construct URL - url = self.delete.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - query_parameters['recursive'] = self._serialize.query("recursive_directory_delete", recursive_directory_delete, 'bool') - if marker is not None: - query_parameters['continuation'] = self._serialize.query("marker", marker, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) - response_headers['x-ms-client-request-id']=self._deserialize('str', response.headers.get('x-ms-client-request-id')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - - if cls: - return cls(pipeline_response, None, response_headers) - - delete.metadata = {'url': '/{filesystem}/{path}'} # type: ignore - - def set_access_control( - self, - timeout=None, # type: Optional[int] - owner=None, # type: Optional[str] - group=None, # type: Optional[str] - posix_permissions=None, # type: Optional[str] - posix_acl=None, # type: Optional[str] - request_id_parameter=None, # type: Optional[str] - lease_access_conditions=None, # type: Optional["_models.LeaseAccessConditions"] - modified_access_conditions=None, # type: Optional["_models.ModifiedAccessConditions"] - **kwargs # type: Any - ): - # type: (...) -> None - """Set the owner, group, permissions, or access control list for a directory. - - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param owner: Optional. The owner of the blob or directory. - :type owner: str - :param group: Optional. The owning group of the blob or directory. - :type group: str - :param posix_permissions: Optional and only valid if Hierarchical Namespace is enabled for the - account. Sets POSIX access permissions for the file owner, the file owning group, and others. - Each class may be granted read, write, or execute permission. The sticky bit is also - supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. - :type posix_permissions: str - :param posix_acl: Sets POSIX access control rights on files and directories. The value is a - comma-separated list of access control entries. Each access control entry (ACE) consists of a - scope, a type, a user or group identifier, and permissions in the format - "[scope:][type]:[id]:[permissions]". - :type posix_acl: str - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _lease_id = None - _if_match = None - _if_none_match = None - _if_modified_since = None - _if_unmodified_since = None - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - action = "setAccessControl" - accept = "application/xml" - - # Construct URL - url = self.set_access_control.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['action'] = self._serialize.query("action", action, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if owner is not None: - header_parameters['x-ms-owner'] = self._serialize.header("owner", owner, 'str') - if group is not None: - header_parameters['x-ms-group'] = self._serialize.header("group", group, 'str') - if posix_permissions is not None: - header_parameters['x-ms-permissions'] = self._serialize.header("posix_permissions", posix_permissions, 'str') - if posix_acl is not None: - header_parameters['x-ms-acl'] = self._serialize.header("posix_acl", posix_acl, 'str') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.patch(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - - if cls: - return cls(pipeline_response, None, response_headers) - - set_access_control.metadata = {'url': '/{filesystem}/{path}'} # type: ignore - - def get_access_control( - self, - timeout=None, # type: Optional[int] - upn=None, # type: Optional[bool] - request_id_parameter=None, # type: Optional[str] - lease_access_conditions=None, # type: Optional["_models.LeaseAccessConditions"] - modified_access_conditions=None, # type: Optional["_models.ModifiedAccessConditions"] - **kwargs # type: Any - ): - # type: (...) -> None - """Get the owner, group, permissions, or access control list for a directory. - - :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting - Timeouts for Blob Service Operations.`. - :type timeout: int - :param upn: Optional. Valid only when Hierarchical Namespace is enabled for the account. If - "true", the identity values returned in the x-ms-owner, x-ms-group, and x-ms-acl response - headers will be transformed from Azure Active Directory Object IDs to User Principal Names. If - "false", the values will be returned as Azure Active Directory Object IDs. The default value is - false. - :type upn: bool - :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character - limit that is recorded in the analytics logs when storage analytics logging is enabled. - :type request_id_parameter: str - :param lease_access_conditions: Parameter group. - :type lease_access_conditions: ~azure.storage.blob.models.LeaseAccessConditions - :param modified_access_conditions: Parameter group. - :type modified_access_conditions: ~azure.storage.blob.models.ModifiedAccessConditions - :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - - _lease_id = None - _if_match = None - _if_none_match = None - _if_modified_since = None - _if_unmodified_since = None - if lease_access_conditions is not None: - _lease_id = lease_access_conditions.lease_id - if modified_access_conditions is not None: - _if_match = modified_access_conditions.if_match - _if_none_match = modified_access_conditions.if_none_match - _if_modified_since = modified_access_conditions.if_modified_since - _if_unmodified_since = modified_access_conditions.if_unmodified_since - action = "getAccessControl" - accept = "application/xml" - - # Construct URL - url = self.get_access_control.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['action'] = self._serialize.query("action", action, 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - if upn is not None: - query_parameters['upn'] = self._serialize.query("upn", upn, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if _lease_id is not None: - header_parameters['x-ms-lease-id'] = self._serialize.header("lease_id", _lease_id, 'str') - if _if_match is not None: - header_parameters['If-Match'] = self._serialize.header("if_match", _if_match, 'str') - if _if_none_match is not None: - header_parameters['If-None-Match'] = self._serialize.header("if_none_match", _if_none_match, 'str') - if _if_modified_since is not None: - header_parameters['If-Modified-Since'] = self._serialize.header("if_modified_since", _if_modified_since, 'rfc-1123') - if _if_unmodified_since is not None: - header_parameters['If-Unmodified-Since'] = self._serialize.header("if_unmodified_since", _if_unmodified_since, 'rfc-1123') - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.head(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.DataLakeStorageError, response) - raise HttpResponseError(response=response, model=error) - - response_headers = {} - response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) - response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) - response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) - response_headers['x-ms-owner']=self._deserialize('str', response.headers.get('x-ms-owner')) - response_headers['x-ms-group']=self._deserialize('str', response.headers.get('x-ms-group')) - response_headers['x-ms-permissions']=self._deserialize('str', response.headers.get('x-ms-permissions')) - response_headers['x-ms-acl']=self._deserialize('str', response.headers.get('x-ms-acl')) - response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) - response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) - - if cls: - return cls(pipeline_response, None, response_headers) - - get_access_control.metadata = {'url': '/{filesystem}/{path}'} # type: ignore diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_models.py index e13b085e6cb5..724e1892305c 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_models.py @@ -920,6 +920,8 @@ class ContainerSasPermissions(object): :keyword bool set_immutability_policy: To enable operations related to set/delete immutability policy. To get immutability policy, you just need read permission. + :keyword bool permanent_delete: + To enable permanent delete on the blob is permitted. """ def __init__(self, read=False, write=False, delete=False, list=False, delete_previous_version=False, tag=False, **kwargs): # pylint: disable=redefined-builtin @@ -928,12 +930,14 @@ def __init__(self, read=False, write=False, delete=False, self.delete = delete self.list = list self.delete_previous_version = delete_previous_version + self.permanent_delete = kwargs.pop('permanent_delete', False) self.tag = tag self.set_immutability_policy = kwargs.pop('set_immutability_policy', False) self._str = (('r' if self.read else '') + ('w' if self.write else '') + ('d' if self.delete else '') + ('x' if self.delete_previous_version else '') + + ('y' if self.permanent_delete else '') + ('l' if self.list else '') + ('t' if self.tag else '') + ('i' if self.set_immutability_policy else '')) @@ -959,11 +963,12 @@ def from_string(cls, permission): p_delete = 'd' in permission p_list = 'l' in permission p_delete_previous_version = 'x' in permission + p_permanent_delete = 'y' in permission p_tag = 't' in permission p_set_immutability_policy = 'i' in permission parsed = cls(read=p_read, write=p_write, delete=p_delete, list=p_list, delete_previous_version=p_delete_previous_version, tag=p_tag, - set_immutability_policy=p_set_immutability_policy) + set_immutability_policy=p_set_immutability_policy, permanent_delete=p_permanent_delete) return parsed @@ -992,6 +997,8 @@ class BlobSasPermissions(object): :keyword bool set_immutability_policy: To enable operations related to set/delete immutability policy. To get immutability policy, you just need read permission. + :keyword bool permanent_delete: + To enable permanent delete on the blob is permitted. """ def __init__(self, read=False, add=False, create=False, write=False, delete=False, delete_previous_version=False, tag=True, **kwargs): @@ -1001,6 +1008,7 @@ def __init__(self, read=False, add=False, create=False, write=False, self.write = write self.delete = delete self.delete_previous_version = delete_previous_version + self.permanent_delete = kwargs.pop('permanent_delete', False) self.tag = tag self.set_immutability_policy = kwargs.pop('set_immutability_policy', False) self._str = (('r' if self.read else '') + @@ -1009,6 +1017,7 @@ def __init__(self, read=False, add=False, create=False, write=False, ('w' if self.write else '') + ('d' if self.delete else '') + ('x' if self.delete_previous_version else '') + + ('y' if self.permanent_delete else '') + ('t' if self.tag else '') + ('i' if self.set_immutability_policy else '')) @@ -1034,12 +1043,13 @@ def from_string(cls, permission): p_write = 'w' in permission p_delete = 'd' in permission p_delete_previous_version = 'x' in permission + p_permanent_delete = 'y' in permission p_tag = 't' in permission p_set_immutability_policy = 'i' in permission parsed = cls(read=p_read, add=p_add, create=p_create, write=p_write, delete=p_delete, delete_previous_version=p_delete_previous_version, tag=p_tag, - set_immutability_policy=p_set_immutability_policy) + set_immutability_policy=p_set_immutability_policy, permanent_delete=p_permanent_delete) return parsed diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_serialize.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_serialize.py index d44c5ade481b..84ed536f3546 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_serialize.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_serialize.py @@ -39,7 +39,8 @@ '2020-04-08', '2020-06-12', '2020-08-04', - '2020-10-02' + '2020-10-02', + '2020-12-06' ] diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py index 6f6052a642f3..22e7b7522ae9 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/models.py @@ -331,6 +331,9 @@ class AccountSasPermissions(object): :keyword bool set_immutability_policy: To enable operations related to set/delete immutability policy. To get immutability policy, you just need read permission. + :keyword bool permanent_delete: + To enable permanent delete on the blob is permitted. + Valid for Object resource type of Blob only. """ def __init__(self, read=False, write=False, delete=False, list=False, # pylint: disable=redefined-builtin @@ -339,6 +342,7 @@ def __init__(self, read=False, write=False, delete=False, self.write = write self.delete = delete self.delete_previous_version = delete_previous_version + self.permanent_delete = kwargs.pop('permanent_delete', False) self.list = list self.add = add self.create = create @@ -351,6 +355,7 @@ def __init__(self, read=False, write=False, delete=False, ('w' if self.write else '') + ('d' if self.delete else '') + ('x' if self.delete_previous_version else '') + + ('y' if self.permanent_delete else '') + ('l' if self.list else '') + ('a' if self.add else '') + ('c' if self.create else '') + @@ -381,6 +386,7 @@ def from_string(cls, permission): p_write = 'w' in permission p_delete = 'd' in permission p_delete_previous_version = 'x' in permission + p_permanent_delete = 'y' in permission p_list = 'l' in permission p_add = 'a' in permission p_create = 'c' in permission @@ -391,7 +397,8 @@ def from_string(cls, permission): p_set_immutability_policy = 'i' in permission parsed = cls(read=p_read, write=p_write, delete=p_delete, delete_previous_version=p_delete_previous_version, list=p_list, add=p_add, create=p_create, update=p_update, process=p_process, tag=p_tag, - filter_by_tags=p_filter_by_tags, set_immutability_policy=p_set_immutability_policy) + filter_by_tags=p_filter_by_tags, set_immutability_policy=p_set_immutability_policy, + permanent_delete=p_permanent_delete) return parsed diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py index 00068a7ba112..c6c6bb9aa5cc 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/policies.py @@ -12,7 +12,6 @@ from io import SEEK_SET, UnsupportedOperation import logging import uuid -import types from typing import Any, TYPE_CHECKING from wsgiref.handlers import format_date_time try: @@ -183,11 +182,15 @@ class StorageLoggingPolicy(NetworkTraceLoggingPolicy): This accepts both global configuration, and per-request level with "enable_http_logger" """ + def __init__(self, logging_enable=False, **kwargs): + self.logging_body = kwargs.pop("logging_body", False) + super(StorageLoggingPolicy, self).__init__(logging_enable=logging_enable, **kwargs) def on_request(self, request): # type: (PipelineRequest, Any) -> None http_request = request.http_request options = request.context.options + self.logging_body = self.logging_body or options.pop("logging_body", False) if options.pop("logging_enable", self.enable_http_logger): request.context["logging_enable"] = True if not _LOGGER.isEnabledFor(logging.DEBUG): @@ -216,11 +219,11 @@ def on_request(self, request): _LOGGER.debug(" %r: %r", header, value) _LOGGER.debug("Request body:") - # We don't want to log the binary data of a file upload. - if isinstance(http_request.body, types.GeneratorType): - _LOGGER.debug("File upload") - else: + if self.logging_body: _LOGGER.debug(str(http_request.body)) + else: + # We don't want to log the binary data of a file upload. + _LOGGER.debug("Hidden body, please use logging_body to show body") except Exception as err: # pylint: disable=broad-except _LOGGER.debug("Failed to log request: %r", err) @@ -240,19 +243,24 @@ def on_response(self, request, response): _LOGGER.debug("Response content:") pattern = re.compile(r'attachment; ?filename=["\w.]+', re.IGNORECASE) header = response.http_response.headers.get('content-disposition') + resp_content_type = response.http_response.headers.get("content-type", "") if header and pattern.match(header): filename = header.partition('=')[2] _LOGGER.debug("File attachments: %s", filename) - elif response.http_response.headers.get("content-type", "").endswith("octet-stream"): + elif resp_content_type.endswith("octet-stream"): _LOGGER.debug("Body contains binary data.") - elif response.http_response.headers.get("content-type", "").startswith("image"): + elif resp_content_type.startswith("image"): _LOGGER.debug("Body contains image data.") - else: - if response.context.options.get('stream', False): + + if self.logging_body and resp_content_type.startswith("text"): + _LOGGER.debug(response.http_response.text()) + elif self.logging_body: + try: + _LOGGER.debug(response.http_response.body()) + except ValueError: _LOGGER.debug("Body is streamable") - else: - _LOGGER.debug(response.http_response.text()) + except Exception as err: # pylint: disable=broad-except _LOGGER.debug("Failed to log response: %s", repr(err)) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/response_handlers.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/response_handlers.py index e5a351417e60..4d90a17f4db8 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/response_handlers.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/response_handlers.py @@ -97,6 +97,10 @@ def process_storage_error(storage_error): # pylint:disable=too-many-statements error_dict = {} try: error_body = ContentDecodePolicy.deserialize_from_http_generics(storage_error.response) + try: + error_body = error_body or storage_error.response.reason + except AttributeError: + error_body = '' # If it is an XML response if isinstance(error_body, Element): error_dict = { @@ -108,7 +112,7 @@ def process_storage_error(storage_error): # pylint:disable=too-many-statements error_dict = error_body.get('error', {}) elif not error_code: _LOGGER.warning( - 'Unexpected return type % from ContentDecodePolicy.deserialize_from_http_generics.', type(error_body)) + 'Unexpected return type %s from ContentDecodePolicy.deserialize_from_http_generics.', type(error_body)) error_dict = {'message': str(error_body)} # If we extracted from a Json or XML response diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/shared_access_signature.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/shared_access_signature.py index 07aad5ffa1c8..d2ebfc4b8095 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/shared_access_signature.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared/shared_access_signature.py @@ -39,6 +39,9 @@ class QueryStringConstants(object): SIGNED_KEY_SERVICE = 'sks' SIGNED_KEY_VERSION = 'skv' + # for blob only + SIGNED_ENCRYPTION_SCOPE = 'ses' + # for ADLS SIGNED_AUTHORIZED_OID = 'saoid' SIGNED_UNAUTHORIZED_OID = 'suoid' @@ -74,6 +77,8 @@ def to_list(): QueryStringConstants.SIGNED_KEY_EXPIRY, QueryStringConstants.SIGNED_KEY_SERVICE, QueryStringConstants.SIGNED_KEY_VERSION, + # for blob only + QueryStringConstants.SIGNED_ENCRYPTION_SCOPE, # for ADLS QueryStringConstants.SIGNED_AUTHORIZED_OID, QueryStringConstants.SIGNED_UNAUTHORIZED_OID, @@ -104,7 +109,7 @@ def __init__(self, account_name, account_key, x_ms_version=X_MS_VERSION): self.x_ms_version = x_ms_version def generate_account(self, services, resource_types, permission, expiry, start=None, - ip=None, protocol=None): + ip=None, protocol=None, **kwargs): ''' Generates a shared access signature for the account. Use the returned signature with the sas_token parameter of the service @@ -149,6 +154,7 @@ def generate_account(self, services, resource_types, permission, expiry, start=N sas = _SharedAccessHelper() sas.add_base(permission, expiry, start, ip, protocol, self.x_ms_version) sas.add_account(services, resource_types) + sas.add_encryption_scope(**kwargs) sas.add_account_signature(self.account_name, self.account_key) return sas.get_token() @@ -162,6 +168,9 @@ def _add_query(self, name, val): if val: self.query_dict[name] = _str(val) if val is not None else None + def add_encryption_scope(self, **kwargs): + self._add_query(QueryStringConstants.SIGNED_ENCRYPTION_SCOPE, kwargs.pop('encryption_scope', None)) + def add_base(self, permission, expiry, start, ip, protocol, x_ms_version): if isinstance(start, date): start = _to_utc_datetime(start) @@ -211,7 +220,8 @@ def get_value_to_append(query): get_value_to_append(QueryStringConstants.SIGNED_EXPIRY) + get_value_to_append(QueryStringConstants.SIGNED_IP) + get_value_to_append(QueryStringConstants.SIGNED_PROTOCOL) + - get_value_to_append(QueryStringConstants.SIGNED_VERSION)) + get_value_to_append(QueryStringConstants.SIGNED_VERSION) + + get_value_to_append(QueryStringConstants.SIGNED_ENCRYPTION_SCOPE)) self._add_query(QueryStringConstants.SIGNED_SIGNATURE, sign_string(account_key, string_to_sign)) diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared_access_signature.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared_access_signature.py index 890ef1b2eeac..c2bbbe0b7776 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_shared_access_signature.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_shared_access_signature.py @@ -10,7 +10,7 @@ from ._shared import sign_string, url_quote from ._shared.constants import X_MS_VERSION -from ._shared.models import Services +from ._shared.models import Services, UserDelegationKey from ._shared.shared_access_signature import SharedAccessSignature, _SharedAccessHelper, \ QueryStringConstants @@ -19,7 +19,6 @@ from ..blob import ( ResourceTypes, AccountSasPermissions, - UserDelegationKey, ContainerSasPermissions, BlobSasPermissions ) @@ -133,6 +132,7 @@ def generate_blob(self, container_name, blob_name, snapshot=None, version_id=Non sas.add_override_response_headers(cache_control, content_disposition, content_encoding, content_language, content_type) + sas.add_encryption_scope(**kwargs) sas.add_info_for_hns_account(**kwargs) sas.add_resource_signature(self.account_name, self.account_key, resource_path, user_delegation_key=self.user_delegation_key) @@ -208,6 +208,7 @@ def generate_container(self, container_name, permission=None, expiry=None, sas.add_override_response_headers(cache_control, content_disposition, content_encoding, content_language, content_type) + sas.add_encryption_scope(**kwargs) sas.add_info_for_hns_account(**kwargs) sas.add_resource_signature(self.account_name, self.account_key, container_name, user_delegation_key=self.user_delegation_key) @@ -271,6 +272,7 @@ def add_resource_signature(self, account_name, account_key, path, user_delegatio self.get_value_to_append(QueryStringConstants.SIGNED_VERSION) + self.get_value_to_append(QueryStringConstants.SIGNED_RESOURCE) + self.get_value_to_append(BlobQueryStringConstants.SIGNED_TIMESTAMP) + + self.get_value_to_append(QueryStringConstants.SIGNED_ENCRYPTION_SCOPE) + self.get_value_to_append(QueryStringConstants.SIGNED_CACHE_CONTROL) + self.get_value_to_append(QueryStringConstants.SIGNED_CONTENT_DISPOSITION) + self.get_value_to_append(QueryStringConstants.SIGNED_CONTENT_ENCODING) + @@ -345,6 +347,8 @@ def generate_account_sas( restricts the request to those IP addresses. :keyword str protocol: Specifies the protocol permitted for a request made. The default value is https. + :keyword str encryption_scope: + Specifies the encryption scope for a request made so that all write operations will be service encrypted. :return: A Shared Access Signature (sas) token. :rtype: str @@ -449,6 +453,8 @@ def generate_container_sas( :keyword str content_type: Response header value for Content-Type when resource is accessed using this shared access signature. + :keyword str encryption_scope: + Specifies the encryption scope for a request made so that all write operations will be service encrypted. :return: A Shared Access Signature (sas) token. :rtype: str @@ -463,7 +469,8 @@ def generate_container_sas( """ if not user_delegation_key and not account_key: raise ValueError("Either user_delegation_key or account_key must be provided.") - + if isinstance(account_key, UserDelegationKey): + user_delegation_key = account_key if user_delegation_key: sas = BlobSharedAccessSignature(account_name, user_delegation_key=user_delegation_key) else: @@ -570,11 +577,15 @@ def generate_blob_sas( :keyword str content_type: Response header value for Content-Type when resource is accessed using this shared access signature. + :keyword str encryption_scope: + Specifies the encryption scope for a request made so that all write operations will be service encrypted. :return: A Shared Access Signature (sas) token. :rtype: str """ if not user_delegation_key and not account_key: raise ValueError("Either user_delegation_key or account_key must be provided.") + if isinstance(account_key, UserDelegationKey): + user_delegation_key = account_key version_id = kwargs.pop('version_id', None) if version_id and snapshot: raise ValueError("snapshot and version_id cannot be set at the same time.") diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/_version.py b/sdk/storage/azure-storage-blob/azure/storage/blob/_version.py index 68dc9539e3f5..c7e10507372c 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/_version.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/_version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.9.0" +VERSION = "12.10.0b2" diff --git a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py index 5ecaaff43a09..e36433460865 100644 --- a/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py +++ b/sdk/storage/azure-storage-blob/azure/storage/blob/aio/_blob_client_async.py @@ -1275,6 +1275,17 @@ async def start_copy_from_url(self, source_url, metadata=None, incremental_copy= Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is the prefix of the source_authorization string. This option is only available when `incremental_copy` is set to False and `requires_sync` is set to True. + + .. versionadded:: 12.9.0 + + :keyword str encryption_scope: + A predefined encryption scope used to encrypt the data on the sync copied blob. An encryption + scope can be created using the Management API and referenced here by name. If a default + encryption scope has been defined at the container, this value will override it if the + container-level scope is configured to allow overrides. Otherwise an error will be raised. + + .. versionadded:: 12.10.0 + :returns: A dictionary of copy properties (etag, last_modified, copy_id, copy_status). :rtype: dict[str, Union[str, ~datetime.datetime]] diff --git a/sdk/storage/azure-storage-blob/migration_guide.md b/sdk/storage/azure-storage-blob/migration_guide.md new file mode 100644 index 000000000000..83fa9d421d4f --- /dev/null +++ b/sdk/storage/azure-storage-blob/migration_guide.md @@ -0,0 +1,1640 @@ +# Storage Blob Service SDK Migration Guide from <= 2.x to 12.x + +In this section, we list the main changes you need to be aware of when converting your Storage Blob SDK library from version <= 2.X to version 12.X. +In version 12 we also support asynchronous APIs. + +## Converting Core Classes +<= 2.X synchronous classes have been replaced. New asynchronous counterparts added. + +| <= 2.X Classes (Clients) | V12 Clients | NEW Asynchronous clients | +|---:|---:|---:| +| BlockBlobService | BlobServiceClient | BlobServiceClient | +| PageBlobService | ContainerClient | ContainerClient | +| AppendBlobService | BlobClient | BlobClient | +| | | | + +## Version <= 2.X to Version 12 API Mapping + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Version <= 2.X +

+
+

+ Version 12.X +

+
+

+ Note: Any class means any of BlockBlobService, + AppendBlobService or PageBlobService class. +

+
+
+

+ API Name +

+
+

+ Class(es) it belongs to +

+
+

+ API Name +

+
+

+ Class(es) it belongs to +

+
+

+ make_blob_url +

+
+

+ Any class +

+
+

+ It’s an attribute on BlobClient, you can instantiate a + BlobClient and call blob_client.url to get the url. +

+
+

+ BlobClient +

+
+

+ make_container_url +

+
+

+ Any class +

+
+

+ It’s an attribute on ContainerClient, you can instantiate a + ContainerClient and call container_client.url to get the url. +

+
+

+ ContainerClient +

+
+

+ generate_account_shared_access_signature +

+
+

+ Any class +

+
+

+ generate_account_sas +

+
+

+ It’s not a class method. +

+

+ Just import from azure.storage.blob directly +

+
+

+ generate_container_shared_access_signature +

+
+

+ Any class +

+
+

+ generate_container_sas +

+
+

+ It’s not a class method. +

+

+ Just import from azure.storage.blob directly +

+
+

+ generate_blob_shared_access_signature +

+
+

+ Any class +

+
+

+ generate_blob_sas +

+
+

+ It’s not a class method. +

+

+ Just import from azure.storage.blob directly +

+
+

+ get_user_delegation_key +

+
+

+ Any class +

+
+

+ get_user_delegation_key +

+
+

+ BlobServiceClient +

+
+

+ get_blob_service_stats +

+
+

+ Any class +

+
+

+ get_service_stats +

+
+

+ BlobServiceClient +

+
+

+ set_blob_service_properties +

+
+

+ Any class +

+
+

+ set_service_properties +

+
+

+ BlobServiceClient +

+
+

+ get_blob_service_properties +

+
+

+ Any class +

+
+

+ get_service_properties +

+
+

+ BlobServiceClient +

+
+

+ get_blob_account_information +

+
+

+ Any class +

+
+

+ get_account_information +

+
+

+ BlobServiceClient, ContainerClient or BlobClient +

+
+

+ list_containers +

+
+

+ Any class +

+
+

+ list_containers +

+
+

+ BlobServiceClient +

+
+

+ create_container +

+
+

+ Any class +

+
+

+ create_container +

+
+

+ BlobServiceClient or ContainerClient +

+
+

+ get_container_properties +

+
+

+ Any class +

+
+

+ get_container_properties +

+
+

+ ContainerClient +

+
+

+ get_container_metadata +

+
+

+ Any class +

+
+

+ set_container_metadata +

+
+

+ Any class +

+
+

+ set_container_metadata +

+
+

+ ContainerClient +

+
+

+ get_container_acl +

+
+

+ Any class +

+
+

+ get_container_access_policy +

+
+

+ ContainerClient +

+
+

+ set_container_acl +

+
+

+ Any class +

+
+

+ set_container_access_policy +

+
+

+ ContainerClient +

+
+

+ delete_container +

+
+

+ Any class +

+
+

+ delete_container +

+
+

+ ContainerClient +

+
+

+ acquire_container_lease +

+
+

+ Any class +

+
+

+ acquire_lease +

+
+

+ ContainerClient +

+

+ or BlobLeaseClient obtained by calling acquire_lease. +

+
+

+ renew_container_lease +

+
+

+ Any class +

+
+

+ renew +

+
+

+ BlobLeaseClient +

+

+ This client can be obtained by calling acquire_lease on + ContainerClient. +

+
+

+ release_container_lease +

+
+

+ Any class +

+
+

+ release +

+
+

+ break_container_lease +

+
+

+ Any class +

+
+

+ break +

+
+

+ change_container_lease +

+
+

+ Any class +

+
+

+ change +

+
+

+ list_blobs +

+
+

+ Any class +

+
+

+ list_blobs +

+
+

+ ContainerClient +

+
+

+ list_blob_names +

+
+

+ Any class +

+
+

+ We are considering adding it back. +

+
+

+ N/A +

+
+

+ get_blob_properties +

+
+

+ Any class +

+
+

+ get_blob_properties +

+
+

+ BlobClient +

+
+

+ get_blob_metadata +

+
+

+ Any class +

+
+

+ set_blob_properties +

+
+

+ Any class +

+
+

+ set_http_headers +

+
+

+ BlobClient +

+
+

+ set_blob_metadata +

+
+

+ Any class +

+
+

+ set_blob_metadata +

+
+

+ BlobClient +

+
+

+ exists +

+
+

+ Any class +

+
+

+ exists +

+
+

+ BlobClient +

+
+

+ get_blob_to_path +

+
+

+ Any class +

+
+

+ download_blob +

+
+

+ BlobClient +

+
+

+ get_blob_to_stream +

+
+

+ Any class +

+
+

+ get_blob_to_bytes +

+
+

+ Any class +

+
+

+ get_blob_to_text +

+
+

+ Any class +

+
+

+ acquire_blob_lease +

+
+

+ Any class +

+
+

+ acquire_lease +

+
+

+ BlobClient +

+

+ or BlobLeaseClient obtained by calling acquire_lease. +

+
+

+ renew_blob_lease +

+
+

+ Any class +

+
+

+ renew +

+
+

+ BlobLeaseClient +

+

+ This client can be obtained by calling acquire_lease on + BlobClient. +

+

+ BlobClient +

+
+

+ release_blob_lease +

+
+

+ Any class +

+
+

+ release +

+
+

+ break_blob_lease +

+
+

+ Any class +

+
+

+ break +

+
+

+ change_blob_lease +

+
+

+ Any class +

+
+

+ change +

+
+

+ snapshot_blob +

+
+

+ Any class +

+
+

+ create_snapshot +

+
+

+ BlobClient +

+
+

+ copy_blob +

+
+

+ Any class +

+
+

+ start_copy_from_url +

+
+

+ BlobClient +

+
+

+ abort_copy_blob +

+
+

+ Any class +

+
+

+ abort_copy +

+
+

+ BlobClient +

+
+

+ delete_blob +

+
+

+ Any class +

+
+

+ delete_blob +

+
+

+ ContainerClient or BlobClient +

+
+

+ batch_delete_blobs +

+
+

+ Any class +

+
+

+ delete_blobs +

+
+

+ ContainerClient. +

+

+ We will consider adding this api to BlobServiceClient if we + get any customer ask. +

+
+

+ undelete_blob +

+
+

+ Any class +

+
+

+ undelete_blob +

+
+

+ BlobClient +

+
+

+ put_block +

+
+

+ BlockBlobService +

+
+

+ Stage_block +

+
+

+ BlobClient +

+
+

+ put_block_list +

+
+

+ BlockBlobService +

+
+

+ commit_block_list +

+
+

+ BlobClient +

+
+

+ get_block_list +

+
+

+ BlockBlobService +

+
+

+ get_block_list +

+
+

+ BlobClient +

+
+

+ put_block_from_url +

+
+

+ BlockBlobService +

+
+

+ stage_block_from_url +

+
+

+ BlobClient +

+
+

+ create_blob_from_path +

+
+

+ BlockBlobService or PageBlobService +

+
+

+ upload_blob +

+
+

+ BlobClient +

+
+

+ create_blob_from_stream +

+
+

+ BlockBlobService or PageBlobService +

+
+

+ create_blob_from_bytes +

+
+

+ BlockBlobService or PageBlobService +

+
+

+ create_blob_from_text +

+
+

+ BlockBlobService or PageBlobService +

+
+

+ append_blob_from_path +

+
+

+ AppendBlobService +

+
+

+ append_blob_from_bytes +

+
+

+ AppendBlobService +

+
+

+ append_blob_from_text +

+
+

+ AppendBlobService +

+
+

+ append_blob_from_stream +

+
+

+ AppendBlobService +

+
+

+ set_standard_blob_tier +

+
+

+ BlockBlobService +

+
+

+ set_standard_blob_tier +

+
+

+ BlobClient +

+
+

+ batch_set_standard_blob_tier +

+
+

+ BlockBlobService +

+
+

+ set_standard_blob_tier_blobs +

+
+

+ ContainerClient +

+
+

+ create_blob +

+
+

+ AppendBlobService +

+
+

+ create_append_blob +

+
+

+ BlobClient +

+
+

+ append_block +

+
+

+ AppendBlobService +

+
+

+ append_block +

+
+

+ BlobClient +

+
+

+ append_block_from_url +

+
+

+ AppendBlobService +

+
+

+ append_block_from_url +

+
+

+ BlobClient +

+
+

+ create_blob +

+
+

+ PageBlobService +

+
+

+ create_page_blob +

+
+

+ BlobClient +

+
+

+ set_premium_page_blob_tier +

+
+

+ PageBlobService +

+
+

+ set_premium_page_blob_tier +

+
+

+ BlobClient +

+
+

+ incremental_copy_blob +

+
+

+ PageBlobService +

+
+

+ start_copy_from_url +

+
+

+ BlobClient +

+
+

+ update_page +

+
+

+ PageBlobService +

+
+

+ upload_page +

+
+

+ BlobClient +

+
+

+ update_page_from_url +

+
+

+ PageBlobService +

+
+

+ upload_pages_from_url +

+
+

+ BlobClient +

+
+

+ clear_page +

+
+

+ PageBlobService +

+
+

+ clear_page +

+
+

+ BlobClient +

+
+

+ get_page_ranges +

+
+

+ PageBlobService +

+
+

+ get_page_ranges +

+
+

+ BlobClient +

+
+

+ get_page_ranges_diff +

+
+

+ PageBlobService +

+
+

+ BlobClient +

+
+

+ set_sequence_number +

+
+

+ PageBlobService +

+
+

+ set_sequence_number +

+
+

+ BlobClient +

+
+

+ resize_blob +

+
+

+ PageBlobService +

+
+

+ resize_blob +

+
+

+ BlobClient +

+
+ +## Build Client with Shared Key Credential +Instantiate client in Version 2.X +```python +from azure.storage.blob import BlockBlobService +service = BlockBlobService("", "", endpoint_suffix="") +``` + +Initiate client in Version 12. +```python +from azure.storage.blob import BlobServiceClient + +service = BlobServiceClient(account_url="https://.blob.core.windows.net/", credential={'account_name': "", 'account_key': ""}) +``` + +## Build Client with SAS token + +In version 2.X, to generate the SAS token, you needed to instantiate any of `BlockBlobService`, `AppendBlobService` or `PageBlobService`, then use the class method to generate different level of sas. +```python +from azure.storage.blob import BlockBlobService +from azure.storage.common import ( + ResourceTypes, + AccountPermissions, +) +from datetime import datetime, timedelta + +service = BlockBlobService("", "", endpoint_suffix="") + +token = service.generate_account_shared_access_signature( + ResourceTypes.CONTAINER, + AccountPermissions.READ, + datetime.utcnow() + timedelta(hours=1), +) + +# Create a service and use the SAS +sas_service = BlockBlobService( + account_name="", + sas_token=token, +) +``` + +In V12, SAS token generation is a standalone api, it's no longer a class method. +```python +from datetime import datetime, timedelta +from azure.storage.blob import BlobServiceClient, generate_account_sas, ResourceTypes, AccountSasPermissions + +sas_token = generate_account_sas( + account_name="", + account_key="", + resource_types=ResourceTypes(service=True), + permission=AccountSasPermissions(read=True), + expiry=datetime.utcnow() + timedelta(hours=1) +) + +blob_service_client = BlobServiceClient(account_url="https://.blob.core.windows.net", credential=sas_token) +``` + +## Build Client with OAuth Credentials +V 2.X using oauth credential to instantiate a service client. +```python +from azure.storage.common import ( + TokenCredential, +) +import adal + +context = adal.AuthenticationContext( + str.format("{}/{}", "", ""), + api_version=None, validate_authority=True) + +token = context.acquire_token_with_client_credentials( + "https://storage.azure.com", + "", + "")["accessToken"] +token_credential = TokenCredential(token) + +service = BlockBlobService("", token_credential=token_credential) +``` + +In V12, you can leverage azure-identity package. +```python +from azure.identity import ClientSecretCredential +token_credential = ClientSecretCredential( + "", + "", + "" +) + +# Instantiate a BlobServiceClient using a token credential +from azure.storage.blob import BlobServiceClient +blob_service_client = BlobServiceClient("https://.blob.core.windows.net", credential=token_credential) +``` + + + +## Download Blob +In V2.X, you can call `get_blob_to_stream`, `get_blob_to_path`, `get_blob_to_bytes`, `get_blob_to_text`. These APIs return +a Blob object. +Here's an example of `get_blob_to_text`. +```python +from azure.storage.blob import BlockBlobService +service = BlockBlobService("", "", endpoint_suffix="") +blob_object = service.get_blob_to_text("", "") +text_content = blob_object.content +``` + +In V12, the download operation can be done through the download_blob API. +Here's the equivalent of `get_blob_to_text`. +```python +from azure.storage.blob import BlobServiceClient +service_client = BlobServiceClient(account_url="https://.blob.core.windows.net/", credential={'account_name': "", 'account_key': ""}) +blob_client = service_client.get_blob_client("", "") +stream_downloader = blob_client.download_blob(max_concurrency=2, encoding='UTF-8') +text_content = stream_downloader.readall() +``` diff --git a/sdk/storage/azure-storage-blob/samples/blob_samples_proxy_configuration.py b/sdk/storage/azure-storage-blob/samples/blob_samples_proxy_configuration.py index d84225da6412..b3102918efb5 100644 --- a/sdk/storage/azure-storage-blob/samples/blob_samples_proxy_configuration.py +++ b/sdk/storage/azure-storage-blob/samples/blob_samples_proxy_configuration.py @@ -27,7 +27,6 @@ import sys from azure.storage.blob import BlobServiceClient -from azure.storage.blob._shared.base_client import create_configuration # Retrieve connection string from environment variables connection_string = os.environ.get('AZURE_STORAGE_CONNECTION_STRING', None) @@ -44,14 +43,12 @@ http_proxy = 'http://10.10.1.10:1180' https_proxy = 'http://user:password@10.10.1.10:1180/' -# Create a storage Configuration object and update the proxy policy. -config = create_configuration(storage_sdk='blob') -config.proxy_policy.proxies = { +proxies = { 'http': http_proxy, 'https': https_proxy } # Construct the BlobServiceClient, including the customized configuation. -service_client = BlobServiceClient.from_connection_string(connection_string, _configuration=config) +service_client = BlobServiceClient.from_connection_string(connection_string, proxies=proxies) containers = list(service_client.list_containers(logging_enable=True)) print("{} containers.".format(len(containers))) diff --git a/sdk/storage/azure-storage-blob/setup.py b/sdk/storage/azure-storage-blob/setup.py index dad24446aab3..bd10142bbae8 100644 --- a/sdk/storage/azure-storage-blob/setup.py +++ b/sdk/storage/azure-storage-blob/setup.py @@ -72,7 +72,7 @@ author_email='ascl@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob', classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/sdk/storage/azure-storage-blob/swagger/README.md b/sdk/storage/azure-storage-blob/swagger/README.md index f2630c27649f..c27f8a6efc02 100644 --- a/sdk/storage/azure-storage-blob/swagger/README.md +++ b/sdk/storage/azure-storage-blob/swagger/README.md @@ -16,7 +16,7 @@ autorest --v3 --python ### Settings ``` yaml -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.BlobStorage/preview/2020-10-02/blob.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/storage-dataplane-preview/specification/storage/data-plane/Microsoft.BlobStorage/preview/2020-12-06/blob.json output-folder: ../azure/storage/blob/_generated namespace: azure.storage.blob no-namespace-folders: true @@ -128,4 +128,15 @@ directive: $[property]["parameters"] = $[property]["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/ContainerName"))}); } } +``` + +### Change to OrMetadata +``` yaml +directive: +- from: swagger-document + where: $.definitions.BlobItemInternal + transform: | + $.properties.OrMetadata = $.properties.ObjectReplicationMetadata; + $.properties.OrMetadata["x-ms-client-name"] = "ObjectReplicationMetadata"; + delete $.properties.ObjectReplicationMetadata; ``` \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/tests/_shared/testcase.py b/sdk/storage/azure-storage-blob/tests/_shared/testcase.py deleted file mode 100644 index 8c5db62d4efa..000000000000 --- a/sdk/storage/azure-storage-blob/tests/_shared/testcase.py +++ /dev/null @@ -1,269 +0,0 @@ -# coding: utf-8 -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -from __future__ import division -import os.path -import time -import os -import logging -from devtools_testutils import ( - AzureMgmtTestCase, - AzureMgmtPreparer, - ResourceGroupPreparer, - StorageAccountPreparer, - FakeResource, -) -try: - from cStringIO import StringIO # Python 2 -except ImportError: - from io import StringIO - -from azure.core.exceptions import ResourceNotFoundError, HttpResponseError -from azure.mgmt.storage.models import StorageAccount, Endpoints -try: - # Running locally - use configuration in settings_real.py - from .settings_real import * -except ImportError: - # Running on the pipeline - use fake values in order to create rg, etc. - from .settings_fake import * - -import pytest - -from devtools_testutils.storage import StorageTestCase - -LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' -os.environ['AZURE_STORAGE_ACCOUNT_NAME'] = STORAGE_ACCOUNT_NAME -os.environ['AZURE_STORAGE_ACCOUNT_KEY'] = STORAGE_ACCOUNT_KEY -os.environ['AZURE_TEST_RUN_LIVE'] = os.environ.get('AZURE_TEST_RUN_LIVE', None) or RUN_IN_LIVE -os.environ['AZURE_SKIP_LIVE_RECORDING'] = os.environ.get('AZURE_SKIP_LIVE_RECORDING', None) or SKIP_LIVE_RECORDING - - -class GlobalStorageAccountPreparer(AzureMgmtPreparer): - def __init__(self): - super(GlobalStorageAccountPreparer, self).__init__( - name_prefix='', - random_name_length=42 - ) - - def create_resource(self, name, **kwargs): - storage_account = StorageTestCase._STORAGE_ACCOUNT - if self.is_live: - self.test_class_instance.scrubber.register_name_pair( - storage_account.name, - "storagename" - ) - self.test_class_instance.scrubber.register_name_pair( - ":.{43}=\r", - ":fake_shared_key=\r" - ) - else: - name = "storagename" - storage_account.name = name - storage_account.primary_endpoints.blob = 'https://{}.{}.core.windows.net'.format(name, 'blob') - storage_account.primary_endpoints.queue = 'https://{}.{}.core.windows.net'.format(name, 'queue') - storage_account.primary_endpoints.table = 'https://{}.{}.core.windows.net'.format(name, 'table') - storage_account.primary_endpoints.file = 'https://{}.{}.core.windows.net'.format(name, 'file') - - return { - 'location': 'westus', - 'resource_group': StorageTestCase._RESOURCE_GROUP, - 'storage_account': storage_account, - 'storage_account_key': StorageTestCase._STORAGE_KEY, - 'storage_account_cs': StorageTestCase._STORAGE_CONNECTION_STRING, - } - - -class GlobalResourceGroupPreparer(AzureMgmtPreparer): - def __init__(self): - super(GlobalResourceGroupPreparer, self).__init__( - name_prefix='', - random_name_length=42 - ) - - def create_resource(self, name, **kwargs): - rg = StorageTestCase._RESOURCE_GROUP - if self.is_live: - self.test_class_instance.scrubber.register_name_pair( - rg.name, - "rgname" - ) - else: - rg = FakeResource( - name="rgname", - id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname" - ) - - return { - 'location': 'westus', - 'resource_group': rg, - } - - -def not_for_emulator(test): - def skip_test_if_targeting_emulator(self): - test(self) - return skip_test_if_targeting_emulator - - -class LogCaptured(object): - def __init__(self, test_case=None): - # accept the test case so that we may reset logging after capturing logs - self.test_case = test_case - - def __enter__(self): - # enable logging - # it is possible that the global logging flag is turned off - self.test_case.enable_logging() - - # create a string stream to send the logs to - self.log_stream = StringIO() - - # the handler needs to be stored so that we can remove it later - self.handler = logging.StreamHandler(self.log_stream) - self.handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) - - # get and enable the logger to send the outputs to the string stream - self.logger = logging.getLogger('azure.storage') - self.logger.level = logging.DEBUG - self.logger.addHandler(self.handler) - - # the stream is returned to the user so that the capture logs can be retrieved - return self.log_stream - - def __exit__(self, exc_type, exc_val, exc_tb): - # stop the handler, and close the stream to exit - self.logger.removeHandler(self.handler) - self.log_stream.close() - - # reset logging since we messed with the setting - self.test_case.configure_logging() - - -@pytest.fixture(scope="session") -def storage_account(): - test_case = AzureMgmtTestCase("__init__") - rg_preparer = ResourceGroupPreparer(random_name_enabled=True, name_prefix='pystorage') - storage_preparer = StorageAccountPreparer(random_name_enabled=True, name_prefix='pyacrstorage') - - # Create - subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", None) - location = os.environ.get("AZURE_LOCATION", "westus") - - existing_rg_name = os.environ.get("AZURE_RESOURCEGROUP_NAME") - existing_storage_name = os.environ.get("AZURE_STORAGE_ACCOUNT_NAME") - existing_storage_key = os.environ.get("AZURE_STORAGE_ACCOUNT_KEY") - storage_connection_string = os.environ.get("AZURE_STORAGE_CONNECTION_STRING") - - i_need_to_create_rg = not (existing_rg_name or existing_storage_name or storage_connection_string) - got_storage_info_from_env = existing_storage_name or storage_connection_string - - try: - if i_need_to_create_rg: - rg_name, rg_kwargs = rg_preparer._prepare_create_resource(test_case) - rg = rg_kwargs['resource_group'] - else: - rg_name = existing_rg_name or "no_rg_needed" - rg = FakeResource( - name=rg_name, - id="/subscriptions/{}/resourceGroups/{}".format(subscription_id, rg_name) - ) - StorageTestCase._RESOURCE_GROUP = rg - - try: - if got_storage_info_from_env: - - if storage_connection_string: - storage_connection_string_parts = dict([ - part.split('=', 1) - for part in storage_connection_string.split(";") - ]) - - storage_account = None - if existing_storage_name: - storage_name = existing_storage_name - storage_account = StorageAccount( - location=location, - ) - storage_account.name = storage_name - storage_account.id = storage_name - storage_account.primary_endpoints = Endpoints() - storage_account.primary_endpoints.blob = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'blob', ACCOUNT_URL_SUFFIX) - storage_account.primary_endpoints.queue = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'queue', ACCOUNT_URL_SUFFIX) - storage_account.primary_endpoints.table = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'table', ACCOUNT_URL_SUFFIX) - storage_account.primary_endpoints.file = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'file', ACCOUNT_URL_SUFFIX) - storage_key = existing_storage_key - - if not storage_connection_string: - # It means I have received a storage name from env - storage_connection_string=";".join([ - "DefaultEndpointsProtocol=https", - "AccountName={}".format(storage_name), - "AccountKey={}".format(storage_key), - "BlobEndpoint={}".format(storage_account.primary_endpoints.blob), - "TableEndpoint={}".format(storage_account.primary_endpoints.table), - "QueueEndpoint={}".format(storage_account.primary_endpoints.queue), - "FileEndpoint={}".format(storage_account.primary_endpoints.file), - ]) - - if not storage_account: - # It means I have received a connection string - storage_name = storage_connection_string_parts["AccountName"] - storage_account = StorageAccount( - location=location, - ) - - def build_service_endpoint(service): - return "{}://{}.{}.{}".format( - storage_connection_string_parts.get("DefaultEndpointsProtocol", "https"), - storage_connection_string_parts["AccountName"], - service, - storage_connection_string_parts["EndpointSuffix"], # Let it fail if we don't even have that - ) - - storage_account.name = storage_name - storage_account.id = storage_name - storage_account.primary_endpoints=Endpoints() - storage_account.primary_endpoints.blob = storage_connection_string_parts.get("BlobEndpoint", build_service_endpoint("blob")) - storage_account.primary_endpoints.queue = storage_connection_string_parts.get("QueueEndpoint", build_service_endpoint("queue")) - storage_account.primary_endpoints.file = storage_connection_string_parts.get("FileEndpoint", build_service_endpoint("file")) - storage_account.secondary_endpoints=Endpoints() - storage_account.secondary_endpoints.blob = storage_connection_string_parts.get("BlobSecondaryEndpoint", build_service_endpoint("blob")) - storage_account.secondary_endpoints.queue = storage_connection_string_parts.get("QueueSecondaryEndpoint", build_service_endpoint("queue")) - storage_account.secondary_endpoints.file = storage_connection_string_parts.get("FileSecondaryEndpoint", build_service_endpoint("file")) - storage_key = storage_connection_string_parts["AccountKey"] - - else: - for i in range(5): - try: - time.sleep(i) if i == 0 else time.sleep(2 ** i) - storage_name, storage_kwargs = storage_preparer._prepare_create_resource( - test_case, **rg_kwargs) - break - # Some tests may be running on the storage account and a conflict may occur. Backoff & Retry. - except HttpResponseError: - continue - storage_account = storage_kwargs['storage_account'] - storage_key = storage_kwargs['storage_account_key'] - storage_connection_string = storage_kwargs['storage_account_cs'] - - StorageTestCase._STORAGE_ACCOUNT = storage_account - StorageTestCase._STORAGE_KEY = storage_key - StorageTestCase._STORAGE_CONNECTION_STRING = storage_connection_string - yield - finally: - if not got_storage_info_from_env: - storage_preparer.remove_resource( - storage_name, - resource_group=rg - ) - finally: - if i_need_to_create_rg: - try: - rg_preparer.remove_resource(rg_name) - # This covers the case where another test had already removed the resource group - except ResourceNotFoundError: - pass - StorageTestCase._RESOURCE_GROUP = None diff --git a/sdk/storage/azure-storage-blob/tests/conftest.py b/sdk/storage/azure-storage-blob/tests/conftest.py index c4ac68255457..321cda36dfe8 100644 --- a/sdk/storage/azure-storage-blob/tests/conftest.py +++ b/sdk/storage/azure-storage-blob/tests/conftest.py @@ -27,15 +27,8 @@ import sys # fixture needs to be visible from conftest -from _shared.testcase import storage_account # Ignore async tests for Python < 3.5 collect_ignore_glob = [] if sys.version_info < (3, 5) or platform.python_implementation() == "PyPy": collect_ignore_glob.append("*_async.py") - -def pytest_configure(config): - # register an additional marker - config.addinivalue_line( - "usefixtures", "storage_account" - ) diff --git a/sdk/storage/azure-storage-blob/tests/get_blob_to_stream_async.temp.4ebacace-c663-4994-b478-01affe7284f1.dat b/sdk/storage/azure-storage-blob/tests/get_blob_to_stream_async.temp.4ebacace-c663-4994-b478-01affe7284f1.dat deleted file mode 100644 index 05ad26d38a2b..000000000000 --- a/sdk/storage/azure-storage-blob/tests/get_blob_to_stream_async.temp.4ebacace-c663-4994-b478-01affe7284f1.dat +++ /dev/null @@ -1 +0,0 @@ -aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ No newline at end of file diff --git a/sdk/storage/azure-storage-blob/tests/perfstress_tests/README.md b/sdk/storage/azure-storage-blob/tests/perfstress_tests/README.md index fbe153c8f370..9519a5564cdc 100644 --- a/sdk/storage/azure-storage-blob/tests/perfstress_tests/README.md +++ b/sdk/storage/azure-storage-blob/tests/perfstress_tests/README.md @@ -44,7 +44,7 @@ These options are available for all perf tests: - `-w --warm-up=5` Number of seconds to spend warming up the connection before measuring begins. Default is 5. - `--sync` Whether to run the tests in sync or async. Default is False (async). This flag must be used for Storage legacy tests, which do not support async. - `--no-cleanup` Whether to keep newly created resources after test run. Default is False (resources will be deleted). -- `-x --test-proxy` Whether to run the tests against the test proxy server. Specfiy the URL for the proxy endpoint (e.g. "https://localhost:5001"). WARNING: When using with Legacy tests - only HTTPS is supported. +- `-x --test-proxies` Whether to run the tests against the test proxy server. Specfiy the URL(s) for the proxy endpoint(s) (e.g. "https://localhost:5001"). WARNING: When using with Legacy tests - only HTTPS is supported. - `--profile` Whether to run the perftest with cProfile. If enabled (default is False), the output file of the **last completed single iteration** will be written to the current working directory in the format `"cProfile---.pstats"`. ### Common Blob command line options diff --git a/sdk/storage/azure-storage-blob/tests/perfstress_tests/T1_legacy_tests/_test_base_legacy.py b/sdk/storage/azure-storage-blob/tests/perfstress_tests/T1_legacy_tests/_test_base_legacy.py index a5a3d607f972..2cc007240ba9 100644 --- a/sdk/storage/azure-storage-blob/tests/perfstress_tests/T1_legacy_tests/_test_base_legacy.py +++ b/sdk/storage/azure-storage-blob/tests/perfstress_tests/T1_legacy_tests/_test_base_legacy.py @@ -37,7 +37,7 @@ def __init__(self, arguments): super().__init__(arguments) connection_string = self.get_from_env("AZURE_STORAGE_CONNECTION_STRING") session = None - if self.args.test_proxy: + if self.args.test_proxies: session = requests.Session() session.verify = False if not _LegacyServiceTest.service_client or self.args.no_client_share: @@ -50,7 +50,7 @@ def __init__(self, arguments): self.async_service_client = None self.service_client = _LegacyServiceTest.service_client - if self.args.test_proxy: + if self.args.test_proxies: self.service_client.request_callback = functools.partial( test_proxy_callback, self._test_proxy_policy diff --git a/sdk/storage/azure-storage-blob/tests/perfstress_tests/_test_base.py b/sdk/storage/azure-storage-blob/tests/perfstress_tests/_test_base.py index ca46e67ffccb..3405d9fadbed 100644 --- a/sdk/storage/azure-storage-blob/tests/perfstress_tests/_test_base.py +++ b/sdk/storage/azure-storage-blob/tests/perfstress_tests/_test_base.py @@ -20,7 +20,7 @@ class _ServiceTest(PerfStressTest): def __init__(self, arguments): super().__init__(arguments) connection_string = self.get_from_env("AZURE_STORAGE_CONNECTION_STRING") - if self.args.test_proxy: + if self.args.test_proxies: self._client_kwargs['_additional_pipeline_policies'] = self._client_kwargs['per_retry_policies'] self._client_kwargs['max_single_put_size'] = self.args.max_put_size self._client_kwargs['max_block_size'] = self.args.max_block_size diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats.test_blob_service_stats.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats.test_blob_service_stats.yaml index 2028a90d48e0..fbd1b8a25032 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats.test_blob_service_stats.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats.test_blob_service_stats.yaml @@ -9,13 +9,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:44:33 GMT + - Thu, 07 Oct 2021 05:47:15 GMT x-ms-version: - - '2019-02-02' + - '2020-10-02' method: GET - uri: https://pyacrstoragestorname-secondary.blob.core.windows.net/?restype=service&comp=stats + uri: https://storagename-secondary.blob.core.windows.net/?restype=service&comp=stats response: body: string: "\uFEFFunavailable" @@ -23,13 +23,15 @@ interactions: content-type: - application/xml date: - - Fri, 25 Oct 2019 18:44:33 GMT + - Thu, 07 Oct 2021 05:47:15 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked + vary: + - Origin x-ms-version: - - '2019-02-02' + - '2020-10-02' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats.test_blob_service_stats_when_unavailable.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats.test_blob_service_stats_when_unavailable.yaml index 5bc36871165e..ad0ad426b121 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats.test_blob_service_stats_when_unavailable.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats.test_blob_service_stats_when_unavailable.yaml @@ -9,13 +9,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:45:05 GMT + - Thu, 07 Oct 2021 05:47:19 GMT x-ms-version: - - '2019-02-02' + - '2020-10-02' method: GET - uri: https://pyacrstoragestorname-secondary.blob.core.windows.net/?restype=service&comp=stats + uri: https://storagename-secondary.blob.core.windows.net/?restype=service&comp=stats response: body: string: "\uFEFFunavailable" @@ -23,13 +23,15 @@ interactions: content-type: - application/xml date: - - Fri, 25 Oct 2019 18:45:08 GMT + - Thu, 07 Oct 2021 05:47:20 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked + vary: + - Origin x-ms-version: - - '2019-02-02' + - '2020-10-02' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats_async.test_blob_service_stats_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats_async.test_blob_service_stats_async.yaml index 76150b77582e..54923f00622b 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats_async.test_blob_service_stats_async.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats_async.test_blob_service_stats_async.yaml @@ -5,32 +5,25 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:45:40 GMT + - Thu, 07 Oct 2021 05:47:03 GMT x-ms-version: - - '2019-02-02' + - '2020-10-02' method: GET - uri: https://pyacrstoragestorname-secondary.blob.core.windows.net/?restype=service&comp=stats + uri: https://storagename-secondary.blob.core.windows.net/?restype=service&comp=stats response: body: - string: "\uFEFFliveFri, - 25 Oct 2019 18:43:29 GMT" + string: "\uFEFFunavailable" headers: content-type: application/xml - date: Fri, 25 Oct 2019 18:45:39 GMT + date: Thu, 07 Oct 2021 05:47:03 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-02-02' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorageukghczwxdjgp-secondary.blob.core.windows.net - - / - - restype=service&comp=stats - - '' + url: https://emilydevtest-secondary.blob.core.windows.net/?restype=service&comp=stats version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats_async.test_blob_service_stats_when_unavailable_async.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats_async.test_blob_service_stats_when_unavailable_async.yaml index ca17e0969674..0d23add1f2c9 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats_async.test_blob_service_stats_when_unavailable_async.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_service_stats_async.test_blob_service_stats_when_unavailable_async.yaml @@ -5,31 +5,25 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 25 Oct 2019 18:46:02 GMT + - Thu, 07 Oct 2021 05:47:08 GMT x-ms-version: - - '2019-02-02' + - '2020-10-02' method: GET - uri: https://pyacrstoragestorname-secondary.blob.core.windows.net/?restype=service&comp=stats + uri: https://storagename-secondary.blob.core.windows.net/?restype=service&comp=stats response: body: string: "\uFEFFunavailable" headers: content-type: application/xml - date: Fri, 25 Oct 2019 18:46:02 GMT + date: Thu, 07 Oct 2021 05:47:08 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-02-02' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorageaxjsxydtp4nt-secondary.blob.core.windows.net - - / - - restype=service&comp=stats - - '' + url: https://emilydevtest-secondary.blob.core.windows.net/?restype=service&comp=stats version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_commit_block_list_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_commit_block_list_with_tags.yaml index 3a399e5f6550..9a29156e7cf6 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_commit_block_list_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_commit_block_list_with_tags.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 17:34:01 GMT + - Thu, 07 Oct 2021 06:28:34 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containercd831351?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containercd831351?restype=container&timeout=5 response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Tue, 04 Aug 2020 17:34:01 GMT + - Thu, 07 Oct 2021 06:28:34 GMT etag: - - '"0x8D8389C93E3221B"' + - '"0x8D9895BB09018CA"' last-modified: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:34 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -41,7 +41,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -51,17 +51,17 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:34 GMT x-ms-tags: - condition%20tag=test%20tag x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containercd831351/blobcd831351 + uri: https://storagename.blob.core.windows.net/containercd831351/blobcd831351 response: body: string: '' @@ -71,11 +71,11 @@ interactions: content-md5: - 1B2M2Y8AsgTpgAmY7PhCfg== date: - - Tue, 04 Aug 2020 17:34:01 GMT + - Thu, 07 Oct 2021 06:28:34 GMT etag: - - '"0x8D8389C93F3B2E6"' + - '"0x8D9895BB09AA2C2"' last-modified: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:34 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,9 +83,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' - x-ms-version-id: - - '2020-08-04T17:34:02.1210621Z' + - '2020-08-04' status: code: 201 message: Created @@ -93,7 +91,7 @@ interactions: body: AAA headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -103,13 +101,13 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:34 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containercd831351/blobcd831351?blockid=MQ%3D%3D&comp=block + uri: https://storagename.blob.core.windows.net/containercd831351/blobcd831351?comp=block&blockid=MQ%3D%3D response: body: string: '' @@ -117,7 +115,7 @@ interactions: content-length: - '0' date: - - Tue, 04 Aug 2020 17:34:01 GMT + - Thu, 07 Oct 2021 06:28:34 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -125,7 +123,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -133,7 +131,7 @@ interactions: body: BBB headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -143,13 +141,13 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:34 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containercd831351/blobcd831351?blockid=Mg%3D%3D&comp=block + uri: https://storagename.blob.core.windows.net/containercd831351/blobcd831351?comp=block&blockid=Mg%3D%3D response: body: string: '' @@ -157,7 +155,7 @@ interactions: content-length: - '0' date: - - Tue, 04 Aug 2020 17:34:01 GMT + - Thu, 07 Oct 2021 06:28:34 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -165,7 +163,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -173,7 +171,7 @@ interactions: body: CCC headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -183,13 +181,13 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:34 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containercd831351/blobcd831351?blockid=Mw%3D%3D&comp=block + uri: https://storagename.blob.core.windows.net/containercd831351/blobcd831351?comp=block&blockid=Mw%3D%3D response: body: string: '' @@ -197,7 +195,7 @@ interactions: content-length: - '0' date: - - Tue, 04 Aug 2020 17:34:01 GMT + - Thu, 07 Oct 2021 06:28:34 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -205,7 +203,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -215,7 +213,7 @@ interactions: MQ==Mg==Mw==' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -223,36 +221,36 @@ interactions: Content-Length: - '125' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:34 GMT x-ms-if-tags: - '"condition tag"=''wrong tag''' x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containercd831351/blobcd831351?comp=blocklist + uri: https://storagename.blob.core.windows.net/containercd831351/blobcd831351?comp=blocklist response: body: string: "\uFEFFConditionNotMetThe - condition specified using HTTP conditional header(s) is not met.\nRequestId:6bbb2889-201e-005c-1385-6a18f8000000\nTime:2020-08-04T17:34:02.6199338Z" + condition specified using HTTP conditional header(s) is not met.\nRequestId:bf0703fd-f01e-00d7-7844-bb02c1000000\nTime:2021-10-07T06:28:35.1581928Z" headers: content-length: - '252' content-type: - application/xml date: - - Tue, 04 Aug 2020 17:34:01 GMT + - Thu, 07 Oct 2021 06:28:34 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: - ConditionNotMet x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 412 message: The condition specified using HTTP conditional header(s) is not met. @@ -262,7 +260,7 @@ interactions: MQ==Mg==Mw==' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -270,19 +268,19 @@ interactions: Content-Length: - '125' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:35 GMT x-ms-if-tags: - '"condition tag"=''test tag''' x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containercd831351/blobcd831351?comp=blocklist + uri: https://storagename.blob.core.windows.net/containercd831351/blobcd831351?comp=blocklist response: body: string: '' @@ -290,11 +288,11 @@ interactions: content-length: - '0' date: - - Tue, 04 Aug 2020 17:34:01 GMT + - Thu, 07 Oct 2021 06:28:34 GMT etag: - - '"0x8D8389C944D54F6"' + - '"0x8D9895BB0E1F1CF"' last-modified: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:35 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -302,9 +300,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' - x-ms-version-id: - - '2020-08-04T17:34:02.7094813Z' + - '2020-08-04' status: code: 201 message: Created @@ -318,13 +314,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:35 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/containercd831351/blobcd831351?comp=tags + uri: https://storagename.blob.core.windows.net/containercd831351/blobcd831351?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" @@ -334,11 +330,13 @@ interactions: content-type: - application/xml date: - - Tue, 04 Aug 2020 17:34:02 GMT + - Thu, 07 Oct 2021 06:28:34 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_create_append_blob_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_create_append_blob_with_tags.yaml index acc668dd2c1d..35b4c885c778 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_create_append_blob_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_create_append_blob_with_tags.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:56:20 GMT + - Thu, 07 Oct 2021 06:28:35 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerde1e138c?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containerde1e138c?restype=container&timeout=5 response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:56:20 GMT + - Thu, 07 Oct 2021 06:28:35 GMT etag: - - '"0x8D822082F2C0A6F"' + - '"0x8D9895BB12E4F81"' last-modified: - - Mon, 06 Jul 2020 23:56:21 GMT + - Thu, 07 Oct 2021 06:28:35 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -41,7 +41,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -49,17 +49,17 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - AppendBlob x-ms-date: - - Mon, 06 Jul 2020 23:56:22 GMT + - Thu, 07 Oct 2021 06:28:35 GMT x-ms-tags: - '%2B-.%2F%3A%3D_%20=firsttag&tag2=%2B-.%2F%3A%3D_&%2B-.%2F%3A%3D_1=%2B-.%2F%3A%3D_' x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerde1e138c/blobde1e138c + uri: https://storagename.blob.core.windows.net/containerde1e138c/blobde1e138c response: body: string: '' @@ -67,17 +67,17 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:56:21 GMT + - Thu, 07 Oct 2021 06:28:35 GMT etag: - - '"0x8D822082F3AAF49"' + - '"0x8D9895BB1385EC6"' last-modified: - - Mon, 06 Jul 2020 23:56:22 GMT + - Thu, 07 Oct 2021 06:28:35 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -91,13 +91,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:56:22 GMT + - Thu, 07 Oct 2021 06:28:35 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/containerde1e138c/blobde1e138c?comp=tags + uri: https://storagename.blob.core.windows.net/containerde1e138c/blobde1e138c?comp=tags response: body: string: "\uFEFF\n+-./:=_ @@ -108,11 +108,13 @@ interactions: content-type: - application/xml date: - - Mon, 06 Jul 2020 23:56:21 GMT + - Thu, 07 Oct 2021 06:28:35 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_create_page_blob_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_create_page_blob_with_tags.yaml index a89ac199660b..0bf360d2cf4e 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_create_page_blob_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_create_page_blob_with_tags.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:56:43 GMT + - Thu, 07 Oct 2021 06:28:36 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerb6e012b1?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containerb6e012b1?restype=container&timeout=5 response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:56:43 GMT + - Thu, 07 Oct 2021 06:28:35 GMT etag: - - '"0x8D822083C5E203B"' + - '"0x8D9895BB19E3255"' last-modified: - - Mon, 06 Jul 2020 23:56:44 GMT + - Thu, 07 Oct 2021 06:28:36 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -41,7 +41,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -49,19 +49,19 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-content-length: - '512' x-ms-blob-type: - PageBlob x-ms-date: - - Mon, 06 Jul 2020 23:56:44 GMT + - Thu, 07 Oct 2021 06:28:36 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerb6e012b1/blobb6e012b1 + uri: https://storagename.blob.core.windows.net/containerb6e012b1/blobb6e012b1 response: body: string: '' @@ -69,17 +69,17 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:56:43 GMT + - Thu, 07 Oct 2021 06:28:35 GMT etag: - - '"0x8D822083C6CC0A3"' + - '"0x8D9895BB1AD55BC"' last-modified: - - Mon, 06 Jul 2020 23:56:44 GMT + - Thu, 07 Oct 2021 06:28:36 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -93,13 +93,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:56:44 GMT + - Thu, 07 Oct 2021 06:28:36 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/containerb6e012b1/blobb6e012b1?comp=tags + uri: https://storagename.blob.core.windows.net/containerb6e012b1/blobb6e012b1?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" @@ -109,11 +109,13 @@ interactions: content-type: - application/xml date: - - Mon, 06 Jul 2020 23:56:43 GMT + - Thu, 07 Oct 2021 06:28:36 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_filter_blobs.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_filter_blobs.yaml index 25ab5e6a1d9b..efbee0106fae 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_filter_blobs.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_filter_blobs.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,38 +11,37 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT - uri: https://storagename.blob.core.windows.net/containerd79a0d11?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containerd79a0d11?restype=container&timeout=5 response: body: - string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:820fefb8-101e-0017-8075-b473c9000000\nTime:2020-11-06T19:43:26.7136424Z" + string: '' headers: content-length: - - '230' - content-type: - - application/xml + - '0' date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:36 GMT + etag: + - '"0x8D9895BB20EEB4B"' + last-modified: + - Thu, 07 Oct 2021 06:28:37 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: - - ContainerAlreadyExists x-ms-version: - - '2020-04-08' + - '2020-08-04' status: - code: 409 - message: The specified container already exists. + code: 201 + message: Created - request: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -50,38 +49,37 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container1d79a0d11?restype=container response: body: - string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:820feff2-101e-0017-3575-b473c9000000\nTime:2020-11-06T19:43:26.7946995Z" + string: '' headers: content-length: - - '230' - content-type: - - application/xml + - '0' date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:36 GMT + etag: + - '"0x8D9895BB2179F71"' + last-modified: + - Thu, 07 Oct 2021 06:28:37 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: - - ContainerAlreadyExists x-ms-version: - - '2020-04-08' + - '2020-08-04' status: - code: 409 - message: The specified container already exists. + code: 201 + message: Created - request: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -89,38 +87,37 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container2d79a0d11?restype=container response: body: - string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:820ff013-101e-0017-5075-b473c9000000\nTime:2020-11-06T19:43:26.8517405Z" + string: '' headers: content-length: - - '230' - content-type: - - application/xml + - '0' date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:36 GMT + etag: + - '"0x8D9895BB220538D"' + last-modified: + - Thu, 07 Oct 2021 06:28:37 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: - - ContainerAlreadyExists x-ms-version: - - '2020-04-08' + - '2020-08-04' status: - code: 409 - message: The specified container already exists. + code: 201 + message: Created - request: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -128,38 +125,37 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container3d79a0d11?restype=container response: body: - string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:820ff01c-101e-0017-5675-b473c9000000\nTime:2020-11-06T19:43:26.9087810Z" + string: '' headers: content-length: - - '230' - content-type: - - application/xml + - '0' date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:36 GMT + etag: + - '"0x8D9895BB229CB22"' + last-modified: + - Thu, 07 Oct 2021 06:28:37 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: - - ContainerAlreadyExists x-ms-version: - - '2020-04-08' + - '2020-08-04' status: - code: 409 - message: The specified container already exists. + code: 201 + message: Created - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -169,15 +165,15 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/containerd79a0d11/blob1 response: @@ -189,11 +185,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT etag: - - '"0x8D8828C3B00FC83"' + - '"0x8D9895BB235B12A"' last-modified: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -201,9 +197,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2020-04-08' - x-ms-version-id: - - '2020-11-06T19:43:26.9887891Z' + - '2020-08-04' status: code: 201 message: Created @@ -211,7 +205,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -221,15 +215,15 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 19:43:27 GMT + - Thu, 07 Oct 2021 06:28:37 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container1d79a0d11/blob2 response: @@ -241,11 +235,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT etag: - - '"0x8D8828C3B0BACE8"' + - '"0x8D9895BB23F28C3"' last-modified: - - Fri, 06 Nov 2020 19:43:27 GMT + - Thu, 07 Oct 2021 06:28:37 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -253,9 +247,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2020-04-08' - x-ms-version-id: - - '2020-11-06T19:43:27.0588408Z' + - '2020-08-04' status: code: 201 message: Created @@ -263,7 +255,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -273,15 +265,15 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 19:43:27 GMT + - Thu, 07 Oct 2021 06:28:37 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container2d79a0d11/blob3 response: @@ -293,11 +285,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT etag: - - '"0x8D8828C3B191CC5"' + - '"0x8D9895BB2485226"' last-modified: - - Fri, 06 Nov 2020 19:43:27 GMT + - Thu, 07 Oct 2021 06:28:37 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -305,9 +297,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2020-04-08' - x-ms-version-id: - - '2020-11-06T19:43:27.1479018Z' + - '2020-08-04' status: code: 201 message: Created @@ -315,7 +305,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -325,15 +315,15 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 19:43:27 GMT + - Thu, 07 Oct 2021 06:28:37 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container3d79a0d11/blob4 response: @@ -345,11 +335,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Fri, 06 Nov 2020 19:43:26 GMT + - Thu, 07 Oct 2021 06:28:37 GMT etag: - - '"0x8D8828C3B270205"' + - '"0x8D9895BB2512D5B"' last-modified: - - Fri, 06 Nov 2020 19:43:27 GMT + - Thu, 07 Oct 2021 06:28:37 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -357,9 +347,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2020-04-08' - x-ms-version-id: - - '2020-11-06T19:43:27.2389673Z' + - '2020-08-04' status: code: 201 message: Created @@ -373,23 +361,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:43:37 GMT + - Thu, 07 Oct 2021 06:28:47 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: GET - uri: https://storagename.blob.core.windows.net/?where=tag1%3D%27firsttag%27%20and%20tag2%3D%27secondtag%27&maxresults=2&comp=blobs + uri: https://storagename.blob.core.windows.net/?comp=blobs&where=tag1%3D%27firsttag%27%20and%20tag2%3D%27secondtag%27&maxresults=2 response: body: string: "\uFEFF\ntag1='firsttag' - and tag2='secondtag'2blob2container12fd60f8etag1firsttagtag2secondtagblob2container1d79a0d11tag1firsttagtag2secondtag2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ2QjQ3MDYwN0ZBNDdBITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhMzI5OTE2MzEtZmU0OC00MmU5LThiMWItMDA5YjU0ZGVkM2JjITAwMDAwNCF0YWcxIQ--" + and tag2='secondtag'2blob2container1d79a0d11tag1firsttagtag2secondtagblob3container2d79a0d11tag1firsttagtag2secondtag2!244!MDAwMDM1IWNvbnRhaW5lcjNkNzlhMGQxMQEwMUQ3QkI0NDhGQjJGRDA1ITAwMDAwNSFibG9iNCEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhNGJkM2VjYjEtMjkxMi00MjZiLTg4ODUtMDY3ZDYzZDNhNjVhITAwMDAwNCF0YWcxIQ--" headers: content-type: - application/xml date: - - Fri, 06 Nov 2020 19:43:37 GMT + - Thu, 07 Oct 2021 06:28:47 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -397,7 +385,7 @@ interactions: vary: - Origin x-ms-version: - - '2020-04-08' + - '2020-08-04' status: code: 200 message: OK @@ -411,23 +399,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:43:37 GMT + - Thu, 07 Oct 2021 06:28:48 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: GET - uri: https://storagename.blob.core.windows.net/?where=tag1%3D%27firsttag%27%20and%20tag2%3D%27secondtag%27&marker=2%21244%21MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ2QjQ3MDYwN0ZBNDdBITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhMzI5OTE2MzEtZmU0OC00MmU5LThiMWItMDA5YjU0ZGVkM2JjITAwMDAwNCF0YWcxIQ--&maxresults=2&comp=blobs + uri: https://storagename.blob.core.windows.net/?comp=blobs&where=tag1%3D%27firsttag%27%20and%20tag2%3D%27secondtag%27&marker=2%21244%21MDAwMDM1IWNvbnRhaW5lcjNkNzlhMGQxMQEwMUQ3QkI0NDhGQjJGRDA1ITAwMDAwNSFibG9iNCEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhNGJkM2VjYjEtMjkxMi00MjZiLTg4ODUtMDY3ZDYzZDNhNjVhITAwMDAwNCF0YWcxIQ--&maxresults=2 response: body: string: "\uFEFF\n2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ2QjQ3MDYwN0ZBNDdBITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhMzI5OTE2MzEtZmU0OC00MmU5LThiMWItMDA5YjU0ZGVkM2JjITAwMDAwNCF0YWcxIQ--tag1='firsttag' - and tag2='secondtag'2blob3container22fd60f8etag1firsttagtag2secondtagblob3container2d79a0d11tag1firsttagtag2secondtag2!240!MDAwMDM0IWNvbnRhaW5lcjJmZDYwZjhlATAxRDZCNDcwNjA2NDc2NjIhMDAwMDA1IWJsb2IxITAwMDAxNiEIAAAACAAAAGZpcnN0dGFnITAwMDAwMSEwITAwMDAyOCE5OTk5LTEyLTMxVDIzOjU5OjU5Ljk5OTk5OTlaITAwMDAzNiFlYTY0ZTA3Mi0wZGJiLTRkYTgtYmUzYi01ZjdiOTYxNDYyNTchMDAwMDA0IXRhZzEh" + ServiceEndpoint=\"https://storagename.blob.core.windows.net/\">2!244!MDAwMDM1IWNvbnRhaW5lcjNkNzlhMGQxMQEwMUQ3QkI0NDhGQjJGRDA1ITAwMDAwNSFibG9iNCEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhNGJkM2VjYjEtMjkxMi00MjZiLTg4ODUtMDY3ZDYzZDNhNjVhITAwMDAwNCF0YWcxIQ--tag1='firsttag' + and tag2='secondtag'2blob4container3d79a0d11tag1firsttagtag2secondtagblobb6e012b1containerb6e012b1tag1firsttagtag2secondtag2!252!MDAwMDM0IWNvbnRhaW5lcmNiZmIxMzNkATAxRDdCQjQzOTUyMTgzRkIhMDAwMDEyIWJsb2JjYmZiMTMzZCEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhNWNlNDc4NWUtNWFmOC00ODMzLThkNWMtZGRlZWUxNjFjOTVkITAwMDAwNCF0YWcxIQ--" headers: content-type: - application/xml date: - - Fri, 06 Nov 2020 19:43:37 GMT + - Thu, 07 Oct 2021 06:28:48 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: @@ -435,7 +423,7 @@ interactions: vary: - Origin x-ms-version: - - '2020-04-08' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_properties_returns_tags_num.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_properties_returns_tags_num.yaml index f9c06d48d568..4bc562ca64ed 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_properties_returns_tags_num.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_properties_returns_tags_num.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:57:05 GMT + - Thu, 07 Oct 2021 06:28:48 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container8f371733?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container8f371733?restype=container&timeout=5 response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT etag: - - '"0x8D8220849C76B40"' + - '"0x8D9895BB901FD68"' last-modified: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -41,7 +41,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -51,17 +51,17 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container8f371733/blob8f371733 + uri: https://storagename.blob.core.windows.net/container8f371733/blob8f371733 response: body: string: '' @@ -71,11 +71,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT etag: - - '"0x8D8220849D6522E"' + - '"0x8D9895BB9105124"' last-modified: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +83,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -91,19 +91,19 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: HEAD - uri: https://pytagstoragestorname.blob.core.windows.net/container8f371733/blob8f371733 + uri: https://storagename.blob.core.windows.net/container8f371733/blob8f371733 response: body: string: '' @@ -117,13 +117,15 @@ interactions: content-type: - application/octet-stream date: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT etag: - - '"0x8D8220849D6522E"' + - '"0x8D9895BB9105124"' last-modified: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-access-tier: - Hot x-ms-access-tier-inferred: @@ -131,7 +133,7 @@ interactions: x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -141,7 +143,7 @@ interactions: x-ms-tag-count: - '3' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 200 message: OK @@ -155,15 +157,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:49 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container8f371733/blob8f371733 + uri: https://storagename.blob.core.windows.net/container8f371733/blob8f371733 response: body: string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -177,19 +179,21 @@ interactions: content-type: - application/octet-stream date: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT etag: - - '"0x8D8220849D6522E"' + - '"0x8D9895BB9105124"' last-modified: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-blob-content-md5: - yaNM/IXZgmmMasifdgcavQ== x-ms-blob-type: - BlockBlob x-ms-creation-time: - - Mon, 06 Jul 2020 23:57:06 GMT + - Thu, 07 Oct 2021 06:28:48 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -199,7 +203,7 @@ interactions: x-ms-tag-count: - '3' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 206 message: Partial Content diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_tags.yaml index bd65ee67676b..34b383e66865 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_tags.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:57:33 GMT + - Thu, 07 Oct 2021 06:28:49 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containere45e0d66?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containere45e0d66?restype=container&timeout=5 response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:57:34 GMT + - Thu, 07 Oct 2021 06:28:49 GMT etag: - - '"0x8D822085ABA2E73"' + - '"0x8D9895BB9453B1A"' last-modified: - - Mon, 06 Jul 2020 23:57:35 GMT + - Thu, 07 Oct 2021 06:28:49 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -41,7 +41,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -51,17 +51,15 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jul 2020 23:57:35 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:28:49 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containere45e0d66/blobe45e0d66 + uri: https://storagename.blob.core.windows.net/containere45e0d66/blobe45e0d66 response: body: string: '' @@ -71,11 +69,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Mon, 06 Jul 2020 23:57:34 GMT + - Thu, 07 Oct 2021 06:28:49 GMT etag: - - '"0x8D822085AC90E64"' + - '"0x8D9895BB94DDA6A"' last-modified: - - Mon, 06 Jul 2020 23:57:35 GMT + - Thu, 07 Oct 2021 06:28:49 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +81,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -93,7 +91,7 @@ interactions: tag1firsttagtag2secondtagtag3thirdtag' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -101,25 +99,25 @@ interactions: Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:57:35 GMT + - Thu, 07 Oct 2021 06:28:49 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containere45e0d66/blobe45e0d66?comp=tags + uri: https://storagename.blob.core.windows.net/containere45e0d66/blobe45e0d66?comp=tags response: body: string: '' headers: date: - - Mon, 06 Jul 2020 23:57:34 GMT + - Thu, 07 Oct 2021 06:28:49 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 204 message: No Content @@ -133,13 +131,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:57:35 GMT + - Thu, 07 Oct 2021 06:28:49 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/containere45e0d66/blobe45e0d66?comp=tags + uri: https://storagename.blob.core.windows.net/containere45e0d66/blobe45e0d66?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" @@ -149,11 +147,13 @@ interactions: content-type: - application/xml date: - - Mon, 06 Jul 2020 23:57:34 GMT + - Thu, 07 Oct 2021 06:28:49 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_tags_for_a_snapshot.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_tags_for_a_snapshot.yaml index 81894132f93f..9e7e5afe13b8 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_tags_for_a_snapshot.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_get_blob_tags_for_a_snapshot.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:58:01 GMT + - Thu, 07 Oct 2021 06:28:49 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerde23139b?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containerde23139b?restype=container&timeout=5 response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:58:01 GMT + - Thu, 07 Oct 2021 06:28:49 GMT etag: - - '"0x8D822086B0D42A4"' + - '"0x8D9895BB9A96325"' last-modified: - - Mon, 06 Jul 2020 23:58:02 GMT + - Thu, 07 Oct 2021 06:28:49 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -41,7 +41,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -51,17 +51,17 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jul 2020 23:58:02 GMT + - Thu, 07 Oct 2021 06:28:49 GMT x-ms-tags: - '%2B-.%2F%3A%3D_%20=firsttag&tag2=%2B-.%2F%3A%3D_&%2B-.%2F%3A%3D_1=%2B-.%2F%3A%3D_' x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerde23139b/blobde23139b + uri: https://storagename.blob.core.windows.net/containerde23139b/blobde23139b response: body: string: '' @@ -71,11 +71,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Mon, 06 Jul 2020 23:58:01 GMT + - Thu, 07 Oct 2021 06:28:49 GMT etag: - - '"0x8D822086B1F530A"' + - '"0x8D9895BB9B36547"' last-modified: - - Mon, 06 Jul 2020 23:58:02 GMT + - Thu, 07 Oct 2021 06:28:50 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +83,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -91,7 +91,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -99,13 +99,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:58:02 GMT + - Thu, 07 Oct 2021 06:28:50 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerde23139b/blobde23139b?comp=snapshot + uri: https://storagename.blob.core.windows.net/containerde23139b/blobde23139b?comp=snapshot response: body: string: '' @@ -113,19 +113,19 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:58:01 GMT + - Thu, 07 Oct 2021 06:28:49 GMT etag: - - '"0x8D822086B1F530A"' + - '"0x8D9895BB9B36547"' last-modified: - - Mon, 06 Jul 2020 23:58:02 GMT + - Thu, 07 Oct 2021 06:28:50 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: - 'false' x-ms-snapshot: - - '2020-07-06T23:58:02.6233767Z' + - '2021-10-07T06:28:50.1037509Z' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -139,13 +139,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:58:02 GMT + - Thu, 07 Oct 2021 06:28:50 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/containerde23139b/blobde23139b?snapshot=2020-07-06T23:58:02.6233767Z&comp=tags + uri: https://storagename.blob.core.windows.net/containerde23139b/blobde23139b?comp=tags&snapshot=2021-10-07T06:28:50.1037509Z response: body: string: "\uFEFF\n+-./:=_ @@ -156,11 +156,13 @@ interactions: content-type: - application/xml date: - - Mon, 06 Jul 2020 23:58:01 GMT + - Thu, 07 Oct 2021 06:28:49 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_list_blobs_returns_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_list_blobs_returns_tags.yaml index 42c395cda009..396b6bfeb781 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_list_blobs_returns_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_list_blobs_returns_tags.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:58:26 GMT + - Thu, 07 Oct 2021 06:28:50 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container845a11c7?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container845a11c7?restype=container&timeout=5 response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:58:27 GMT + - Thu, 07 Oct 2021 06:28:49 GMT etag: - - '"0x8D822087A6CB2BF"' + - '"0x8D9895BBA17FE84"' last-modified: - - Mon, 06 Jul 2020 23:58:28 GMT + - Thu, 07 Oct 2021 06:28:50 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -41,7 +41,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -51,17 +51,17 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jul 2020 23:58:28 GMT + - Thu, 07 Oct 2021 06:28:50 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container845a11c7/blob845a11c7 + uri: https://storagename.blob.core.windows.net/container845a11c7/blob845a11c7 response: body: string: '' @@ -71,11 +71,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Mon, 06 Jul 2020 23:58:27 GMT + - Thu, 07 Oct 2021 06:28:49 GMT etag: - - '"0x8D822087A7C0DF5"' + - '"0x8D9895BBA228ED9"' last-modified: - - Mon, 06 Jul 2020 23:58:28 GMT + - Thu, 07 Oct 2021 06:28:50 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +83,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -97,19 +97,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:58:28 GMT + - Thu, 07 Oct 2021 06:28:50 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container845a11c7?include=tags&restype=container&comp=list + uri: https://storagename.blob.core.windows.net/container845a11c7?restype=container&comp=list&include=tags response: body: string: "\uFEFFblob845a11c7Mon, - 06 Jul 2020 23:58:28 GMTMon, 06 Jul 2020 23:58:28 - GMT0x8D822087A7C0DF51024application/octet-streamblob845a11c7Thu, + 07 Oct 2021 06:28:50 GMTThu, 07 Oct 2021 06:28:50 + GMT0x8D9895BBA228ED91024application/octet-streamyaNM/IXZgmmMasifdgcavQ==BlockBlobHottrueunlockedavailabletrue3tag1firsttagtag2secondtagtag3thirdtag" @@ -117,13 +117,15 @@ interactions: content-type: - application/xml date: - - Mon, 06 Jul 2020 23:58:27 GMT + - Thu, 07 Oct 2021 06:28:49 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked + vary: + - Origin x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags.yaml index 3d9b721b857a..c16dd34f26b3 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,37 +11,38 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 02 Jul 2020 21:57:59 GMT + - Thu, 07 Oct 2021 06:28:50 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containere4fa0d72?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containere4fa0d72?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:d3bd2d96-801e-0090-4344-bb699a000000\nTime:2021-10-07T06:28:51.0912378Z" headers: content-length: - - '0' + - '230' + content-type: + - application/xml date: - - Thu, 02 Jul 2020 21:58:00 GMT - etag: - - '"0x8D81ED2FD0162E6"' - last-modified: - - Thu, 02 Jul 2020 21:58:00 GMT + - Thu, 07 Oct 2021 06:28:50 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - ContainerAlreadyExists x-ms-version: - - '2019-12-12' + - '2020-08-04' status: - code: 201 - message: Created + code: 409 + message: The specified container already exists. - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -51,17 +52,15 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Thu, 02 Jul 2020 21:58:01 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:28:51 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containere4fa0d72/blobe4fa0d72 + uri: https://storagename.blob.core.windows.net/containere4fa0d72/blobe4fa0d72 response: body: string: '' @@ -71,11 +70,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Thu, 02 Jul 2020 21:58:00 GMT + - Thu, 07 Oct 2021 06:28:50 GMT etag: - - '"0x8D81ED2FD11D648"' + - '"0x8D9895BBA5FA2DE"' last-modified: - - Thu, 02 Jul 2020 21:58:01 GMT + - Thu, 07 Oct 2021 06:28:51 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +82,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -93,7 +92,7 @@ interactions: tag1firsttagtag2secondtagtag3thirdtag' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -101,25 +100,25 @@ interactions: Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 02 Jul 2020 21:58:05 GMT + - Thu, 07 Oct 2021 06:28:51 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containere4fa0d72/blobe4fa0d72?comp=tags + uri: https://storagename.blob.core.windows.net/containere4fa0d72/blobe4fa0d72?comp=tags response: body: string: '' headers: date: - - Thu, 02 Jul 2020 21:58:05 GMT + - Thu, 07 Oct 2021 06:28:50 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 204 message: No Content diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags_for_a_version.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags_for_a_version.yaml index c3823641d3fb..529846a2a093 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags_for_a_version.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags_for_a_version.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,37 +11,38 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 13 May 2020 06:33:24 GMT + - Thu, 07 Oct 2021 06:28:51 GMT x-ms-version: - - '2019-10-10' + - '2020-08-04' method: PUT - uri: https://storagename.blob.core.windows.net/containercbfb133d?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containercbfb133d?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:160190ea-701e-00e6-7344-bbe3d2000000\nTime:2021-10-07T06:28:51.7038150Z" headers: content-length: - - '0' + - '230' + content-type: + - application/xml date: - - Wed, 13 May 2020 06:33:24 GMT - etag: - - '"0x8D7F7078A3E3EF2"' - last-modified: - - Wed, 13 May 2020 06:33:25 GMT + - Thu, 07 Oct 2021 06:28:51 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - ContainerAlreadyExists x-ms-version: - - '2019-10-10' + - '2020-08-04' status: - code: 201 - message: Created + code: 409 + message: The specified container already exists. - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -51,15 +52,13 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Wed, 13 May 2020 06:33:25 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:28:51 GMT x-ms-version: - - '2019-10-10' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/containercbfb133d/blobcbfb133d response: @@ -71,11 +70,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Wed, 13 May 2020 06:33:24 GMT + - Thu, 07 Oct 2021 06:28:51 GMT etag: - - '"0x8D7F7078A5DE1D5"' + - '"0x8D9895BBAC6B4A2"' last-modified: - - Wed, 13 May 2020 06:33:25 GMT + - Thu, 07 Oct 2021 06:28:51 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,9 +82,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-10-10' - x-ms-version-id: - - '2020-05-13T06:33:25.4454741Z' + - '2020-08-04' status: code: 201 message: Created @@ -93,7 +90,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -103,15 +100,13 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Wed, 13 May 2020 06:33:25 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:28:51 GMT x-ms-version: - - '2019-10-10' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/containercbfb133d/blobcbfb133d response: @@ -123,11 +118,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Wed, 13 May 2020 06:33:24 GMT + - Thu, 07 Oct 2021 06:28:51 GMT etag: - - '"0x8D7F7078A7B5A38"' + - '"0x8D9895BBAD0534E"' last-modified: - - Wed, 13 May 2020 06:33:25 GMT + - Thu, 07 Oct 2021 06:28:51 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -135,9 +130,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-10-10' - x-ms-version-id: - - '2020-05-13T06:33:25.6406111Z' + - '2020-08-04' status: code: 201 message: Created @@ -147,7 +140,7 @@ interactions: tag1firsttagtag2secondtagtag3thirdtag' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -155,25 +148,25 @@ interactions: Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 13 May 2020 06:33:25 GMT + - Thu, 07 Oct 2021 06:28:51 GMT x-ms-version: - - '2019-10-10' + - '2020-08-04' method: PUT - uri: https://storagename.blob.core.windows.net/containercbfb133d/blobcbfb133d?versionid=2020-05-13T06%3A33%3A25.4454741Z&comp=tags + uri: https://storagename.blob.core.windows.net/containercbfb133d/blobcbfb133d?comp=tags response: body: string: '' headers: date: - - Wed, 13 May 2020 06:33:24 GMT + - Thu, 07 Oct 2021 06:28:51 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-10-10' + - '2020-08-04' status: code: 204 message: No Content diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags_with_lease.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags_with_lease.yaml index 0117c5523fa3..7382a8e51e20 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags_with_lease.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_set_blob_tags_with_lease.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,38 +11,37 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT - uri: https://storagename.blob.core.windows.net/container942b11f6?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container942b11f6?restype=container&timeout=5 response: body: - string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:6b2d2938-f01e-000f-1885-b4acae000000\nTime:2020-11-06T21:43:47.5808008Z" + string: '' headers: content-length: - - '230' - content-type: - - application/xml + - '0' date: - - Fri, 06 Nov 2020 21:43:46 GMT + - Thu, 07 Oct 2021 06:29:03 GMT + etag: + - '"0x8D9895BC1E6A43D"' + last-modified: + - Thu, 07 Oct 2021 06:29:03 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-error-code: - - ContainerAlreadyExists x-ms-version: - - '2020-04-08' + - '2020-08-04' status: - code: 409 - message: The specified container already exists. + code: 201 + message: Created - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -52,13 +51,13 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container942b11f6/blob942b11f6 response: @@ -70,11 +69,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT etag: - - '"0x8D8829D0ADB38C6"' + - '"0x8D9895BC1EF5BA0"' last-modified: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -82,9 +81,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2020-04-08' - x-ms-version-id: - - '2020-11-06T21:43:47.6540614Z' + - '2020-08-04' status: code: 201 message: Created @@ -92,7 +89,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -100,17 +97,17 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT x-ms-lease-action: - acquire x-ms-lease-duration: - '-1' x-ms-proposed-lease-id: - - 2e317d7c-4e67-4f47-b3e4-c65dc53e30d4 + - 9070aa16-2b94-46ba-a6d1-060de8a0bf50 x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container942b11f6/blob942b11f6?comp=lease response: @@ -120,17 +117,17 @@ interactions: content-length: - '0' date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT etag: - - '"0x8D8829D0ADB38C6"' + - '"0x8D9895BC1EF5BA0"' last-modified: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-lease-id: - - 2e317d7c-4e67-4f47-b3e4-c65dc53e30d4 + - 9070aa16-2b94-46ba-a6d1-060de8a0bf50 x-ms-version: - - '2020-04-08' + - '2020-08-04' status: code: 201 message: Created @@ -140,7 +137,7 @@ interactions: tag1firsttagtag2secondtagtag3thirdtag' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -148,32 +145,32 @@ interactions: Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container942b11f6/blob942b11f6?comp=tags response: body: string: "\uFEFF\nLeaseIdMissingThere - is currently a lease on the blob and no lease ID was specified in the request.\nRequestId:6b2d29d0-f01e-000f-2785-b4acae000000\nTime:2020-11-06T21:43:47.9960936Z" + is currently a lease on the blob and no lease ID was specified in the request.\nRequestId:589954c0-301e-0071-0444-bbb5df000000\nTime:2021-10-07T06:29:04.0935326Z" headers: content-length: - '268' content-type: - application/xml date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: - LeaseIdMissing x-ms-version: - - '2020-04-08' + - '2020-08-04' status: code: 412 message: There is currently a lease on the blob and no lease ID was specified @@ -184,7 +181,7 @@ interactions: tag1firsttagtag2secondtagtag3thirdtag' headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -192,15 +189,15 @@ interactions: Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:43:48 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-lease-id: - - 2e317d7c-4e67-4f47-b3e4-c65dc53e30d4 + - 9070aa16-2b94-46ba-a6d1-060de8a0bf50 x-ms-version: - - '2020-04-08' + - '2020-08-04' method: PUT uri: https://storagename.blob.core.windows.net/container942b11f6/blob942b11f6?comp=tags response: @@ -208,11 +205,11 @@ interactions: string: '' headers: date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2020-04-08' + - '2020-08-04' status: code: 204 message: No Content @@ -226,11 +223,11 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:43:48 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-version: - - '2020-04-08' + - '2020-08-04' method: GET uri: https://storagename.blob.core.windows.net/container942b11f6/blob942b11f6?comp=tags response: @@ -242,13 +239,13 @@ interactions: content-type: - application/xml date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 vary: - Origin x-ms-version: - - '2020-04-08' + - '2020-08-04' status: code: 200 message: OK @@ -262,26 +259,26 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:43:48 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-lease-id: - '''d92e6954-3274-4715-811c-727ca7145303''' x-ms-version: - - '2020-04-08' + - '2020-08-04' method: GET uri: https://storagename.blob.core.windows.net/container942b11f6/blob942b11f6?comp=tags response: body: string: "\uFEFF\nInvalidHeaderValueThe - value for one of the HTTP headers is not in the correct format.\nRequestId:6b2d2b0d-f01e-000f-4a85-b4acae000000\nTime:2020-11-06T21:43:48.2933032Zx-ms-lease-id'd92e6954-3274-4715-811c-727ca7145303'" + value for one of the HTTP headers is not in the correct format.\nRequestId:589955ba-301e-0071-6144-bbb5df000000\nTime:2021-10-07T06:29:04.4327717Zx-ms-lease-id'd92e6954-3274-4715-811c-727ca7145303'" headers: content-length: - '368' content-type: - application/xml date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 vary: @@ -289,7 +286,7 @@ interactions: x-ms-error-code: - InvalidHeaderValue x-ms-version: - - '2020-04-08' + - '2020-08-04' status: code: 400 message: The value for one of the HTTP headers is not in the correct format. @@ -303,13 +300,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:43:48 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-lease-id: - - 2e317d7c-4e67-4f47-b3e4-c65dc53e30d4 + - 9070aa16-2b94-46ba-a6d1-060de8a0bf50 x-ms-version: - - '2020-04-08' + - '2020-08-04' method: GET uri: https://storagename.blob.core.windows.net/container942b11f6/blob942b11f6?comp=tags response: @@ -321,13 +318,13 @@ interactions: content-type: - application/xml date: - - Fri, 06 Nov 2020 21:43:47 GMT + - Thu, 07 Oct 2021 06:29:03 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 vary: - Origin x-ms-version: - - '2020-04-08' + - '2020-08-04' status: code: 200 message: OK @@ -335,7 +332,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -343,13 +340,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:43:48 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-lease-id: - - 2e317d7c-4e67-4f47-b3e4-c65dc53e30d4 + - 9070aa16-2b94-46ba-a6d1-060de8a0bf50 x-ms-version: - - '2020-04-08' + - '2020-08-04' method: DELETE uri: https://storagename.blob.core.windows.net/container942b11f6/blob942b11f6 response: @@ -359,13 +356,13 @@ interactions: content-length: - '0' date: - - Fri, 06 Nov 2020 21:43:48 GMT + - Thu, 07 Oct 2021 06:29:03 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-delete-type-permanent: - - 'false' + - 'true' x-ms-version: - - '2020-04-08' + - '2020-08-04' status: code: 202 message: Accepted diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_start_copy_from_url_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_start_copy_from_url_with_tags.yaml index c4ff36d50ac2..b0e1ec025f1f 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_start_copy_from_url_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_start_copy_from_url_with_tags.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:58:48 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerf9181450?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containerf9181450?restype=container&timeout=5 response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:03 GMT etag: - - '"0x8D82208872303C9"' + - '"0x8D9895BC2828EE6"' last-modified: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -41,7 +41,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -51,17 +51,15 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jul 2020 23:58:49 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerf9181450/blobf9181450 + uri: https://storagename.blob.core.windows.net/containerf9181450/blobf9181450 response: body: string: '' @@ -71,11 +69,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT etag: - - '"0x8D8220887351537"' + - '"0x8D9895BC28B69A7"' last-modified: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +81,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -91,7 +89,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -99,17 +97,17 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-copy-source: - - https://pytagstorageztp3t3ozwoax.blob.core.windows.net/containerf9181450/blobf9181450 + - https://emilydevtest.blob.core.windows.net/containerf9181450/blobf9181450 x-ms-date: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerf9181450/blob1copy + uri: https://storagename.blob.core.windows.net/containerf9181450/blob1copy response: body: string: '' @@ -117,19 +115,19 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT etag: - - '"0x8D822088746A495"' + - '"0x8D9895BC2968F3A"' last-modified: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-copy-id: - - b1c7cc26-c675-4b90-80f3-0edf5f303b75 + - ff05312e-b8c1-4727-86ca-a092364fac35 x-ms-copy-status: - success x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 202 message: Accepted @@ -143,15 +141,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/containerf9181450/blob1copy + uri: https://storagename.blob.core.windows.net/containerf9181450/blob1copy response: body: string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -165,29 +163,31 @@ interactions: content-type: - application/octet-stream date: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT etag: - - '"0x8D822088746A495"' + - '"0x8D9895BC2968F3A"' last-modified: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-blob-content-md5: - yaNM/IXZgmmMasifdgcavQ== x-ms-blob-type: - BlockBlob x-ms-copy-completion-time: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-copy-id: - - b1c7cc26-c675-4b90-80f3-0edf5f303b75 + - ff05312e-b8c1-4727-86ca-a092364fac35 x-ms-copy-progress: - 1024/1024 x-ms-copy-source: - - https://pytagstorageztp3t3ozwoax.blob.core.windows.net/containerf9181450/blobf9181450 + - https://emilydevtest.blob.core.windows.net/containerf9181450/blobf9181450 x-ms-copy-status: - success x-ms-creation-time: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT x-ms-lease-state: - available x-ms-lease-status: @@ -197,7 +197,7 @@ interactions: x-ms-tag-count: - '3' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 206 message: Partial Content @@ -211,13 +211,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:05 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/containerf9181450/blob1copy?comp=tags + uri: https://storagename.blob.core.windows.net/containerf9181450/blob1copy?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" @@ -227,11 +227,13 @@ interactions: content-type: - application/xml date: - - Mon, 06 Jul 2020 23:58:49 GMT + - Thu, 07 Oct 2021 06:29:04 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_upload_block_blob_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_upload_block_blob_with_tags.yaml index 7005d018faf6..79fe26ec58c5 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_upload_block_blob_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags.test_upload_block_blob_with_tags.yaml @@ -3,7 +3,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:59:10 GMT + - Thu, 07 Oct 2021 06:29:05 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containercc271330?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containercc271330?restype=container&timeout=5 response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Mon, 06 Jul 2020 23:59:12 GMT + - Thu, 07 Oct 2021 06:29:05 GMT etag: - - '"0x8D8220894A1EFBE"' + - '"0x8D9895BC2E61BFD"' last-modified: - - Mon, 06 Jul 2020 23:59:12 GMT + - Thu, 07 Oct 2021 06:29:05 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -41,7 +41,7 @@ interactions: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -51,17 +51,17 @@ interactions: Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Mon, 06 Jul 2020 23:59:12 GMT + - Thu, 07 Oct 2021 06:29:05 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-08-04' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containercc271330/blobcc271330 + uri: https://storagename.blob.core.windows.net/containercc271330/blobcc271330 response: body: string: '' @@ -71,11 +71,11 @@ interactions: content-md5: - yaNM/IXZgmmMasifdgcavQ== date: - - Mon, 06 Jul 2020 23:59:12 GMT + - Thu, 07 Oct 2021 06:29:05 GMT etag: - - '"0x8D8220894B24E9D"' + - '"0x8D9895BC2F0CD72"' last-modified: - - Mon, 06 Jul 2020 23:59:12 GMT + - Thu, 07 Oct 2021 06:29:05 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +83,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 201 message: Created @@ -97,13 +97,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Mon, 06 Jul 2020 23:59:12 GMT + - Thu, 07 Oct 2021 06:29:05 GMT x-ms-version: - - '2019-12-12' + - '2020-08-04' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/containercc271330/blobcc271330?comp=tags + uri: https://storagename.blob.core.windows.net/containercc271330/blobcc271330?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" @@ -113,11 +113,13 @@ interactions: content-type: - application/xml date: - - Mon, 06 Jul 2020 23:59:12 GMT + - Thu, 07 Oct 2021 06:29:06 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-version: - - '2019-12-12' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_commit_block_list_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_commit_block_list_with_tags.yaml index 743e6b5d61f1..7dfb82f2dbab 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_commit_block_list_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_commit_block_list_with_tags.yaml @@ -2,251 +2,264 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:42:51 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container4b1215ce?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container4b1215ce?restype=container&timeout=5 response: body: string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:39beb34f-101e-001a-088f-6a2c7f000000\nTime:2020-08-04T18:42:51.3755546Z" + specified container already exists.\nRequestId:4242c6ab-801e-0064-7145-bba26c000000\nTime:2021-10-07T06:38:14.4769138Z" headers: content-length: '230' content-type: application/xml - date: Tue, 04 Aug 2020 18:42:50 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: ContainerAlreadyExists - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 409 message: The specified container already exists. - url: https://emilyeuap.blob.core.windows.net/container4b1215ce?timeout=5&restype=container + url: https://emilydevtest.blob.core.windows.net/container4b1215ce?restype=container&timeout=5 - request: body: null headers: + Accept: + - application/xml Content-Length: - '0' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 04 Aug 2020 18:42:51 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-tags: - condition%20tag=test%20tag x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container4b1215ce/blob4b1215ce + uri: https://storagename.blob.core.windows.net/container4b1215ce/blob4b1215ce response: body: string: '' headers: content-length: '0' content-md5: 1B2M2Y8AsgTpgAmY7PhCfg== - date: Tue, 04 Aug 2020 18:42:50 GMT - etag: '"0x8D838A6313D7895"' - last-modified: Tue, 04 Aug 2020 18:42:51 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT + etag: '"0x8D9895D0A287AFC"' + last-modified: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: AAAAAAAAAAA= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' - x-ms-version-id: '2020-08-04T18:42:51.4773925Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://emilyeuap.blob.core.windows.net/container4b1215ce/blob4b1215ce + url: https://emilydevtest.blob.core.windows.net/container4b1215ce/blob4b1215ce - request: body: AAA headers: + Accept: + - application/xml Content-Length: - '3' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:42:51 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container4b1215ce/blob4b1215ce?blockid=MQ%3D%3D&comp=block + uri: https://storagename.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=block&blockid=MQ%3D%3D response: body: string: '' headers: content-length: '0' - date: Tue, 04 Aug 2020 18:42:50 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: Cc/2Kr4DuKg= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://emilyeuap.blob.core.windows.net/container4b1215ce/blob4b1215ce?blockid=MQ%3D%3D&comp=block + url: https://emilydevtest.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=block&blockid=MQ%3D%3D - request: body: BBB headers: + Accept: + - application/xml Content-Length: - '3' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:42:51 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container4b1215ce/blob4b1215ce?blockid=Mg%3D%3D&comp=block + uri: https://storagename.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=block&blockid=Mg%3D%3D response: body: string: '' headers: content-length: '0' - date: Tue, 04 Aug 2020 18:42:50 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: +3yuPEA7IqE= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://emilyeuap.blob.core.windows.net/container4b1215ce/blob4b1215ce?blockid=Mg%3D%3D&comp=block + url: https://emilydevtest.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=block&blockid=Mg%3D%3D - request: body: CCC headers: + Accept: + - application/xml Content-Length: - '3' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:42:51 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container4b1215ce/blob4b1215ce?blockid=Mw%3D%3D&comp=block + uri: https://storagename.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=block&blockid=Mw%3D%3D response: body: string: '' headers: content-length: '0' - date: Tue, 04 Aug 2020 18:42:50 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: VRJmMeosVKY= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://emilyeuap.blob.core.windows.net/container4b1215ce/blob4b1215ce?blockid=Mw%3D%3D&comp=block + url: https://emilydevtest.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=block&blockid=Mw%3D%3D - request: body: ' MQ==Mg==Mw==' headers: + Accept: + - application/xml Content-Length: - '125' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:42:51 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-if-tags: - '"condition tag"=''wrong tag''' x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=blocklist + uri: https://storagename.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=blocklist response: body: string: "\uFEFFConditionNotMetThe - condition specified using HTTP conditional header(s) is not met.\nRequestId:39beb37f-101e-001a-2e8f-6a2c7f000000\nTime:2020-08-04T18:42:51.9029296Z" + condition specified using HTTP conditional header(s) is not met.\nRequestId:4242c6e0-801e-0064-2045-bba26c000000\nTime:2021-10-07T06:38:14.6520374Z" headers: content-length: '252' content-type: application/xml - date: Tue, 04 Aug 2020 18:42:50 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: ConditionNotMet - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 412 message: The condition specified using HTTP conditional header(s) is not met. - url: https://emilyeuap.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=blocklist + url: https://emilydevtest.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=blocklist - request: body: ' MQ==Mg==Mw==' headers: + Accept: + - application/xml Content-Length: - '125' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:42:52 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-if-tags: - '"condition tag"=''test tag''' x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=blocklist + uri: https://storagename.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=blocklist response: body: string: '' headers: content-length: '0' - date: Tue, 04 Aug 2020 18:42:51 GMT - etag: '"0x8D838A6318BA6DA"' - last-modified: Tue, 04 Aug 2020 18:42:51 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT + etag: '"0x8D9895D0A42975D"' + last-modified: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: dAoQ5rLgKr0= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' - x-ms-version-id: '2020-08-04T18:42:51.9907593Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://emilyeuap.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=blocklist + url: https://emilydevtest.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=blocklist - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:42:52 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=tags + uri: https://storagename.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" headers: content-length: '220' content-type: application/xml - date: Tue, 04 Aug 2020 18:42:51 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://emilyeuap.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=tags + url: https://emilydevtest.blob.core.windows.net/container4b1215ce/blob4b1215ce?comp=tags version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_create_append_blob_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_create_append_blob_with_tags.yaml index 0b3073568bb0..c495c9faacd0 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_create_append_blob_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_create_append_blob_with_tags.yaml @@ -2,73 +2,78 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:09:25 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container5e2a1609?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container5e2a1609?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:e5d38726-001e-00a1-5045-bb8889000000\nTime:2021-10-07T06:38:14.9777618Z" headers: - content-length: '0' - date: Tue, 07 Jul 2020 00:09:26 GMT - etag: '"0x8D8220A0325FE1E"' - last-modified: Tue, 07 Jul 2020 00:09:27 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://pytagstoragee3pbw5vvvwuh.blob.core.windows.net/container5e2a1609?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/container5e2a1609?restype=container&timeout=5 - request: body: null headers: + Accept: + - application/xml Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - AppendBlob x-ms-date: - - Tue, 07 Jul 2020 00:09:27 GMT + - Thu, 07 Oct 2021 06:38:14 GMT x-ms-tags: - '%2B-.%2F%3A%3D_%20=firsttag&tag2=%2B-.%2F%3A%3D_&%2B-.%2F%3A%3D_1=%2B-.%2F%3A%3D_' x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container5e2a1609/blob5e2a1609 + uri: https://storagename.blob.core.windows.net/container5e2a1609/blob5e2a1609 response: body: string: '' headers: content-length: '0' - date: Tue, 07 Jul 2020 00:09:26 GMT - etag: '"0x8D8220A03345B66"' - last-modified: Tue, 07 Jul 2020 00:09:27 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT + etag: '"0x8D9895D0A7485D8"' + last-modified: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstoragee3pbw5vvvwuh.blob.core.windows.net/container5e2a1609/blob5e2a1609 + url: https://emilydevtest.blob.core.windows.net/container5e2a1609/blob5e2a1609 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:09:27 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container5e2a1609/blob5e2a1609?comp=tags + uri: https://storagename.blob.core.windows.net/container5e2a1609/blob5e2a1609?comp=tags response: body: string: "\uFEFF\n+-./:=_ @@ -76,11 +81,12 @@ interactions: headers: content-length: '225' content-type: application/xml - date: Tue, 07 Jul 2020 00:09:26 GMT + date: Thu, 07 Oct 2021 06:38:14 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://pytagstoragee3pbw5vvvwuh.blob.core.windows.net/container5e2a1609/blob5e2a1609?comp=tags + url: https://emilydevtest.blob.core.windows.net/container5e2a1609/blob5e2a1609?comp=tags version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_create_page_blob_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_create_page_blob_with_tags.yaml index ca6ac72f6c94..b5a14206f9a7 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_create_page_blob_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_create_page_blob_with_tags.yaml @@ -2,86 +2,92 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:09:47 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container31f2152e?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container31f2152e?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:28040c1f-001e-0055-7f45-bb437f000000\nTime:2021-10-07T06:38:15.2795017Z" headers: - content-length: '0' - date: Tue, 07 Jul 2020 00:09:48 GMT - etag: '"0x8D8220A1007EDE0"' - last-modified: Tue, 07 Jul 2020 00:09:48 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://pytagstorage2uigvmmt4tuo.blob.core.windows.net/container31f2152e?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/container31f2152e?restype=container&timeout=5 - request: body: null headers: + Accept: + - application/xml Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-content-length: - '512' x-ms-blob-type: - PageBlob x-ms-date: - - Tue, 07 Jul 2020 00:09:48 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container31f2152e/blob31f2152e + uri: https://storagename.blob.core.windows.net/container31f2152e/blob31f2152e response: body: string: '' headers: content-length: '0' - date: Tue, 07 Jul 2020 00:09:48 GMT - etag: '"0x8D8220A1015F24A"' - last-modified: Tue, 07 Jul 2020 00:09:48 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT + etag: '"0x8D9895D0AA2A312"' + last-modified: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstorage2uigvmmt4tuo.blob.core.windows.net/container31f2152e/blob31f2152e + url: https://emilydevtest.blob.core.windows.net/container31f2152e/blob31f2152e - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:09:48 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container31f2152e/blob31f2152e?comp=tags + uri: https://storagename.blob.core.windows.net/container31f2152e/blob31f2152e?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" headers: content-length: '220' content-type: application/xml - date: Tue, 07 Jul 2020 00:09:48 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://pytagstorage2uigvmmt4tuo.blob.core.windows.net/container31f2152e/blob31f2152e?comp=tags + url: https://emilydevtest.blob.core.windows.net/container31f2152e/blob31f2152e?comp=tags version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_filter_blobs.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_filter_blobs.yaml index 6290de18b2a4..d9131d9817ed 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_filter_blobs.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_filter_blobs.yaml @@ -2,124 +2,134 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:44:38 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT - uri: https://storagename.blob.core.windows.net/container2fd60f8e?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container2fd60f8e?restype=container&timeout=5 response: body: string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:1bf4f8c6-801e-0015-4b75-b4cd71000000\nTime:2020-11-06T19:44:38.6773417Z" + specified container already exists.\nRequestId:245e0969-501e-00bc-0c45-bb8535000000\nTime:2021-10-07T06:38:15.6208399Z" headers: content-length: '230' content-type: application/xml - date: Fri, 06 Nov 2020 19:44:38 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: ContainerAlreadyExists - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 409 message: The specified container already exists. - url: https://seanmcccanary3.blob.core.windows.net/container2fd60f8e?timeout=5&restype=container + url: https://emilydevtest.blob.core.windows.net/container2fd60f8e?restype=container&timeout=5 - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:44:38 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/container12fd60f8e?restype=container response: body: string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:1bf4f8d5-801e-0015-5175-b4cd71000000\nTime:2020-11-06T19:44:38.7594004Z" + specified container already exists.\nRequestId:245e0976-501e-00bc-1445-bb8535000000\nTime:2021-10-07T06:38:15.6328485Z" headers: content-length: '230' content-type: application/xml - date: Fri, 06 Nov 2020 19:44:38 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: ContainerAlreadyExists - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 409 message: The specified container already exists. - url: https://seanmcccanary3.blob.core.windows.net/container12fd60f8e?restype=container + url: https://emilydevtest.blob.core.windows.net/container12fd60f8e?restype=container - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:44:38 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/container22fd60f8e?restype=container response: body: string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:1bf4f8d9-801e-0015-5475-b4cd71000000\nTime:2020-11-06T19:44:38.8284490Z" + specified container already exists.\nRequestId:245e097e-501e-00bc-1a45-bb8535000000\nTime:2021-10-07T06:38:15.6448571Z" headers: content-length: '230' content-type: application/xml - date: Fri, 06 Nov 2020 19:44:38 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: ContainerAlreadyExists - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 409 message: The specified container already exists. - url: https://seanmcccanary3.blob.core.windows.net/container22fd60f8e?restype=container + url: https://emilydevtest.blob.core.windows.net/container22fd60f8e?restype=container - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:44:38 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/container32fd60f8e?restype=container response: body: string: "\uFEFFContainerAlreadyExistsThe - specified container already exists.\nRequestId:1bf4f8e6-801e-0015-6075-b4cd71000000\nTime:2020-11-06T19:44:38.8844884Z" + specified container already exists.\nRequestId:245e0987-501e-00bc-1f45-bb8535000000\nTime:2021-10-07T06:38:15.6568661Z" headers: content-length: '230' content-type: application/xml - date: Fri, 06 Nov 2020 19:44:38 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: ContainerAlreadyExists - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 409 message: The specified container already exists. - url: https://seanmcccanary3.blob.core.windows.net/container32fd60f8e?restype=container + url: https://emilydevtest.blob.core.windows.net/container32fd60f8e?restype=container - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 19:44:38 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/container2fd60f8e/blob1 response: @@ -128,35 +138,36 @@ interactions: headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Fri, 06 Nov 2020 19:44:38 GMT - etag: '"0x8D8828C65F4D6FC"' - last-modified: Fri, 06 Nov 2020 19:44:39 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT + etag: '"0x8D9895D0ADBBEB3"' + last-modified: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2020-04-08' - x-ms-version-id: '2020-11-06T19:44:39.0512140Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://seanmcccanary3.blob.core.windows.net/container2fd60f8e/blob1 + url: https://emilydevtest.blob.core.windows.net/container2fd60f8e/blob1 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 19:44:39 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/container12fd60f8e/blob2 response: @@ -165,35 +176,36 @@ interactions: headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Fri, 06 Nov 2020 19:44:38 GMT - etag: '"0x8D8828C66018375"' - last-modified: Fri, 06 Nov 2020 19:44:39 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT + etag: '"0x8D9895D0ADE573B"' + last-modified: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2020-04-08' - x-ms-version-id: '2020-11-06T19:44:39.1342725Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://seanmcccanary3.blob.core.windows.net/container12fd60f8e/blob2 + url: https://emilydevtest.blob.core.windows.net/container12fd60f8e/blob2 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 19:44:39 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/container22fd60f8e/blob3 response: @@ -202,35 +214,36 @@ interactions: headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Fri, 06 Nov 2020 19:44:38 GMT - etag: '"0x8D8828C660BBE8E"' - last-modified: Fri, 06 Nov 2020 19:44:39 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT + etag: '"0x8D9895D0AE0C8AB"' + last-modified: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2020-04-08' - x-ms-version-id: '2020-11-06T19:44:39.2013214Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://seanmcccanary3.blob.core.windows.net/container22fd60f8e/blob3 + url: https://emilydevtest.blob.core.windows.net/container22fd60f8e/blob3 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 19:44:39 GMT + - Thu, 07 Oct 2021 06:38:15 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/container32fd60f8e/blob4 response: @@ -239,74 +252,73 @@ interactions: headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Fri, 06 Nov 2020 19:44:38 GMT - etag: '"0x8D8828C6619076A"' - last-modified: Fri, 06 Nov 2020 19:44:39 GMT + date: Thu, 07 Oct 2021 06:38:15 GMT + etag: '"0x8D9895D0AE36133"' + last-modified: Thu, 07 Oct 2021 06:38:15 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2020-04-08' - x-ms-version-id: '2020-11-06T19:44:39.2893843Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://seanmcccanary3.blob.core.windows.net/container32fd60f8e/blob4 + url: https://emilydevtest.blob.core.windows.net/container32fd60f8e/blob4 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:50:02 GMT + - Thu, 07 Oct 2021 06:38:25 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: GET - uri: https://storagename.blob.core.windows.net/?where=%22tag1%22%3D'firsttag'%20and%20%22tag2%22%3D'secondtag'&maxresults=2&comp=blobs + uri: https://storagename.blob.core.windows.net/?comp=blobs&where=%22tag1%22%3D'firsttag'%20and%20%22tag2%22%3D'secondtag'&maxresults=2 response: body: string: "\uFEFF\n"tag1"='firsttag' - and "tag2"='secondtag'2blob2container12fd60f8etag1firsttagtag2secondtagblob2container1d79a0d11tag1firsttagtag2secondtag2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ2QjQ3MDYwN0ZBNDdBITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhNGY3YjQ2NWYtODM0My00M2ZlLTg5YjItYzkzOTVhMTMwN2RmITAwMDAwNCF0YWcxIQ--" + and "tag2"='secondtag'2blob2container12fd60f8etag1firsttagtag2secondtagblob2container1d79a0d11tag1firsttagtag2secondtag2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ3QkI0NUNENDE4QjZDITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhMjRmOWQxNDEtNzAyYS00YmY2LTlhMDQtNmYxNzg2OTAxNDE0ITAwMDAwNCF0YWcxIQ--" headers: content-type: application/xml - date: Fri, 06 Nov 2020 19:50:03 GMT + date: Thu, 07 Oct 2021 06:38:26 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked vary: Origin - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://seanmcccanary3.blob.core.windows.net/?where=%22tag1%22%3D'firsttag'%20and%20%22tag2%22%3D'secondtag'&maxresults=2&comp=blobs + url: https://emilydevtest.blob.core.windows.net/?comp=blobs&where=%22tag1%22%3D'firsttag'%20and%20%22tag2%22%3D'secondtag'&maxresults=2 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 19:50:04 GMT + - Thu, 07 Oct 2021 06:38:27 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: GET - uri: https://storagename.blob.core.windows.net/?where=%22tag1%22%3D'firsttag'%20and%20%22tag2%22%3D'secondtag'&marker=2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ2QjQ3MDYwN0ZBNDdBITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhNGY3YjQ2NWYtODM0My00M2ZlLTg5YjItYzkzOTVhMTMwN2RmITAwMDAwNCF0YWcxIQ--&maxresults=2&comp=blobs + uri: https://storagename.blob.core.windows.net/?comp=blobs&where=%22tag1%22%3D'firsttag'%20and%20%22tag2%22%3D'secondtag'&marker=2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ3QkI0NUNENDE4QjZDITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhMjRmOWQxNDEtNzAyYS00YmY2LTlhMDQtNmYxNzg2OTAxNDE0ITAwMDAwNCF0YWcxIQ--&maxresults=2 response: body: string: "\uFEFF\n2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ2QjQ3MDYwN0ZBNDdBITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhNGY3YjQ2NWYtODM0My00M2ZlLTg5YjItYzkzOTVhMTMwN2RmITAwMDAwNCF0YWcxIQ--"tag1"='firsttag' - and "tag2"='secondtag'2blob3container22fd60f8etag1firsttagtag2secondtagblob3container2d79a0d11tag1firsttagtag2secondtag2!240!MDAwMDM0IWNvbnRhaW5lcjJmZDYwZjhlATAxRDZCNDcwNjA2NDc2NjIhMDAwMDA1IWJsb2IxITAwMDAxNiEIAAAACAAAAGZpcnN0dGFnITAwMDAwMSEwITAwMDAyOCE5OTk5LTEyLTMxVDIzOjU5OjU5Ljk5OTk5OTlaITAwMDAzNiEwZGJkMTMwZi0yNzU0LTRiYjUtOTg2OC01ZGZkYzM2OGY3ZTkhMDAwMDA0IXRhZzEh" + ServiceEndpoint=\"https://storagename.blob.core.windows.net/\">2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ3QkI0NUNENDE4QjZDITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhMjRmOWQxNDEtNzAyYS00YmY2LTlhMDQtNmYxNzg2OTAxNDE0ITAwMDAwNCF0YWcxIQ--"tag1"='firsttag' + and "tag2"='secondtag'2blob3container22fd60f8etag1firsttagtag2secondtagblob232b19b0container232b19b0tag1firsttagtag2secondtag2!244!MDAwMDM1IWNvbnRhaW5lcjJkNzlhMGQxMQEwMUQ3QkI0NDhGQTlBQzg3ITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhZTlhYjMyNjYtMGRlMS00Yzk4LTkwNjAtODZjYTY5ZTY3NTFkITAwMDAwNCF0YWcxIQ--" headers: content-type: application/xml - date: Fri, 06 Nov 2020 19:50:03 GMT + date: Thu, 07 Oct 2021 06:38:26 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked vary: Origin - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://seanmcccanary3.blob.core.windows.net/?where=%22tag1%22%3D'firsttag'%20and%20%22tag2%22%3D'secondtag'&marker=2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ2QjQ3MDYwN0ZBNDdBITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhNGY3YjQ2NWYtODM0My00M2ZlLTg5YjItYzkzOTVhMTMwN2RmITAwMDAwNCF0YWcxIQ--&maxresults=2&comp=blobs + url: https://emilydevtest.blob.core.windows.net/?comp=blobs&where=%22tag1%22%3D'firsttag'%20and%20%22tag2%22%3D'secondtag'&marker=2!244!MDAwMDM1IWNvbnRhaW5lcjIyZmQ2MGY4ZQEwMUQ3QkI0NUNENDE4QjZDITAwMDAwNSFibG9iMyEwMDAwMTYhCAAAAAgAAABmaXJzdHRhZyEwMDAwMDEhMCEwMDAwMjghOTk5OS0xMi0zMVQyMzo1OTo1OS45OTk5OTk5WiEwMDAwMzYhMjRmOWQxNDEtNzAyYS00YmY2LTlhMDQtNmYxNzg2OTAxNDE0ITAwMDAwNCF0YWcxIQ--&maxresults=2 version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_properties_returns_tags_num.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_properties_returns_tags_num.yaml index 0e42b05f186a..53d32fa04a28 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_properties_returns_tags_num.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_properties_returns_tags_num.yaml @@ -2,75 +2,82 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:10:09 GMT + - Thu, 07 Oct 2021 06:38:27 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container232b19b0?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container232b19b0?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:b1247925-401e-0036-5145-bbde84000000\nTime:2021-10-07T06:38:27.1873999Z" headers: - content-length: '0' - date: Tue, 07 Jul 2020 00:10:10 GMT - etag: '"0x8D8220A1D71D9DF"' - last-modified: Tue, 07 Jul 2020 00:10:11 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:38:26 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://pytagstoragepvwx5tt5nvei.blob.core.windows.net/container232b19b0?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/container232b19b0?restype=container&timeout=5 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 07 Jul 2020 00:10:11 GMT + - Thu, 07 Oct 2021 06:38:27 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container232b19b0/blob232b19b0 + uri: https://storagename.blob.core.windows.net/container232b19b0/blob232b19b0 response: body: string: '' headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Tue, 07 Jul 2020 00:10:10 GMT - etag: '"0x8D8220A1D7E8E88"' - last-modified: Tue, 07 Jul 2020 00:10:11 GMT + date: Thu, 07 Oct 2021 06:38:26 GMT + etag: '"0x8D9895D11BBB6D0"' + last-modified: Thu, 07 Oct 2021 06:38:27 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstoragepvwx5tt5nvei.blob.core.windows.net/container232b19b0/blob232b19b0 + url: https://emilydevtest.blob.core.windows.net/container232b19b0/blob232b19b0 - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:10:11 GMT + - Thu, 07 Oct 2021 06:38:27 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: HEAD - uri: https://pytagstoragestorname.blob.core.windows.net/container232b19b0/blob232b19b0 + uri: https://storagename.blob.core.windows.net/container232b19b0/blob232b19b0 response: body: string: '' @@ -79,38 +86,39 @@ interactions: content-length: '1024' content-md5: yaNM/IXZgmmMasifdgcavQ== content-type: application/octet-stream - date: Tue, 07 Jul 2020 00:10:10 GMT - etag: '"0x8D8220A1D7E8E88"' - last-modified: Tue, 07 Jul 2020 00:10:11 GMT + date: Thu, 07 Oct 2021 06:38:26 GMT + etag: '"0x8D9895D11BBB6D0"' + last-modified: Thu, 07 Oct 2021 06:38:27 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin x-ms-access-tier: Hot x-ms-access-tier-inferred: 'true' x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Jul 2020 00:10:11 GMT + x-ms-creation-time: Thu, 07 Oct 2021 06:37:41 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-server-encrypted: 'true' x-ms-tag-count: '3' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://pytagstoragepvwx5tt5nvei.blob.core.windows.net/container232b19b0/blob232b19b0 + url: https://emilydevtest.blob.core.windows.net/container232b19b0/blob232b19b0 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:10:11 GMT + - Thu, 07 Oct 2021 06:38:27 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container232b19b0/blob232b19b0 + uri: https://storagename.blob.core.windows.net/container232b19b0/blob232b19b0 response: body: string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -119,20 +127,21 @@ interactions: content-length: '1024' content-range: bytes 0-1023/1024 content-type: application/octet-stream - date: Tue, 07 Jul 2020 00:10:10 GMT - etag: '"0x8D8220A1D7E8E88"' - last-modified: Tue, 07 Jul 2020 00:10:11 GMT + date: Thu, 07 Oct 2021 06:38:26 GMT + etag: '"0x8D9895D11BBB6D0"' + last-modified: Thu, 07 Oct 2021 06:38:27 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin x-ms-blob-content-md5: yaNM/IXZgmmMasifdgcavQ== x-ms-blob-type: BlockBlob - x-ms-creation-time: Tue, 07 Jul 2020 00:10:11 GMT + x-ms-creation-time: Thu, 07 Oct 2021 06:37:41 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-server-encrypted: 'true' x-ms-tag-count: '3' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 206 message: Partial Content - url: https://pytagstoragepvwx5tt5nvei.blob.core.windows.net/container232b19b0/blob232b19b0 + url: https://emilydevtest.blob.core.windows.net/container232b19b0/blob232b19b0 version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_tags.yaml index 88e0ff5530a5..b846c96b2ce0 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_tags.yaml @@ -2,116 +2,122 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:10:32 GMT + - Thu, 07 Oct 2021 06:38:27 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container3f170fe3?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container3f170fe3?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:b37af670-d01e-0034-2d45-bb603c000000\nTime:2021-10-07T06:38:27.5475346Z" headers: - content-length: '0' - date: Tue, 07 Jul 2020 00:10:32 GMT - etag: '"0x8D8220A2A99B0F3"' - last-modified: Tue, 07 Jul 2020 00:10:33 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:38:27 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://pytagstoragezlab7ba4uru5.blob.core.windows.net/container3f170fe3?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/container3f170fe3?restype=container&timeout=5 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 07 Jul 2020 00:10:33 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:38:27 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container3f170fe3/blob3f170fe3 + uri: https://storagename.blob.core.windows.net/container3f170fe3/blob3f170fe3 response: body: string: '' headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Tue, 07 Jul 2020 00:10:32 GMT - etag: '"0x8D8220A2AA645A4"' - last-modified: Tue, 07 Jul 2020 00:10:33 GMT + date: Thu, 07 Oct 2021 06:38:27 GMT + etag: '"0x8D9895D11F2610C"' + last-modified: Thu, 07 Oct 2021 06:38:27 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstoragezlab7ba4uru5.blob.core.windows.net/container3f170fe3/blob3f170fe3 + url: https://emilydevtest.blob.core.windows.net/container3f170fe3/blob3f170fe3 - request: body: ' tag1firsttagtag2secondtagtag3thirdtag' headers: + Accept: + - application/xml Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:10:33 GMT + - Thu, 07 Oct 2021 06:38:27 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container3f170fe3/blob3f170fe3?comp=tags + uri: https://storagename.blob.core.windows.net/container3f170fe3/blob3f170fe3?comp=tags response: body: string: '' headers: - date: Tue, 07 Jul 2020 00:10:32 GMT + date: Thu, 07 Oct 2021 06:38:27 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 204 message: No Content - url: https://pytagstoragezlab7ba4uru5.blob.core.windows.net/container3f170fe3/blob3f170fe3?comp=tags + url: https://emilydevtest.blob.core.windows.net/container3f170fe3/blob3f170fe3?comp=tags - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:10:33 GMT + - Thu, 07 Oct 2021 06:38:27 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container3f170fe3/blob3f170fe3?comp=tags + uri: https://storagename.blob.core.windows.net/container3f170fe3/blob3f170fe3?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" headers: content-length: '220' content-type: application/xml - date: Tue, 07 Jul 2020 00:10:32 GMT + date: Thu, 07 Oct 2021 06:38:27 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://pytagstoragezlab7ba4uru5.blob.core.windows.net/container3f170fe3/blob3f170fe3?comp=tags + url: https://emilydevtest.blob.core.windows.net/container3f170fe3/blob3f170fe3?comp=tags version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_tags_for_a_snapshot.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_tags_for_a_snapshot.yaml index c1211ceee743..be4769fbd02e 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_tags_for_a_snapshot.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_get_blob_tags_for_a_snapshot.yaml @@ -2,104 +2,111 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:10:53 GMT + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container5e2f1618?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container5e2f1618?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:9aba1356-901e-0047-7345-bb38af000000\nTime:2021-10-07T06:38:28.1407028Z" headers: - content-length: '0' - date: Tue, 07 Jul 2020 00:10:54 GMT - etag: '"0x8D8220A375F7DD4"' - last-modified: Tue, 07 Jul 2020 00:10:54 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://pytagstorage5fa7hibmhu5j.blob.core.windows.net/container5e2f1618?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/container5e2f1618?restype=container&timeout=5 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 07 Jul 2020 00:10:54 GMT + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-tags: - '%2B-.%2F%3A%3D_%20=firsttag&tag2=%2B-.%2F%3A%3D_&%2B-.%2F%3A%3D_1=%2B-.%2F%3A%3D_' x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container5e2f1618/blob5e2f1618 + uri: https://storagename.blob.core.windows.net/container5e2f1618/blob5e2f1618 response: body: string: '' headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Tue, 07 Jul 2020 00:10:54 GMT - etag: '"0x8D8220A376D066D"' - last-modified: Tue, 07 Jul 2020 00:10:54 GMT + date: Thu, 07 Oct 2021 06:38:28 GMT + etag: '"0x8D9895D124CC65B"' + last-modified: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstorage5fa7hibmhu5j.blob.core.windows.net/container5e2f1618/blob5e2f1618 + url: https://emilydevtest.blob.core.windows.net/container5e2f1618/blob5e2f1618 - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:10:54 GMT + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container5e2f1618/blob5e2f1618?comp=snapshot + uri: https://storagename.blob.core.windows.net/container5e2f1618/blob5e2f1618?comp=snapshot response: body: string: '' headers: content-length: '0' - date: Tue, 07 Jul 2020 00:10:54 GMT - etag: '"0x8D8220A376D066D"' - last-modified: Tue, 07 Jul 2020 00:10:54 GMT + date: Thu, 07 Oct 2021 06:38:28 GMT + etag: '"0x8D9895D124CC65B"' + last-modified: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-request-server-encrypted: 'false' - x-ms-snapshot: '2020-07-07T00:10:54.8745121Z' - x-ms-version: '2019-12-12' + x-ms-snapshot: '2021-10-07T06:38:28.1771189Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstorage5fa7hibmhu5j.blob.core.windows.net/container5e2f1618/blob5e2f1618?comp=snapshot + url: https://emilydevtest.blob.core.windows.net/container5e2f1618/blob5e2f1618?comp=snapshot - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:10:54 GMT + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container5e2f1618/blob5e2f1618?snapshot=2020-07-07T00:10:54.8745121Z&comp=tags + uri: https://storagename.blob.core.windows.net/container5e2f1618/blob5e2f1618?comp=tags&snapshot=2021-10-07T06:38:28.1771189Z response: body: string: "\uFEFF\n+-./:=_ @@ -107,11 +114,12 @@ interactions: headers: content-length: '225' content-type: application/xml - date: Tue, 07 Jul 2020 00:10:54 GMT + date: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://pytagstorage5fa7hibmhu5j.blob.core.windows.net/container5e2f1618/blob5e2f1618?snapshot=2020-07-07T00:10:54.8745121Z&comp=tags + url: https://emilydevtest.blob.core.windows.net/container5e2f1618/blob5e2f1618?comp=tags&snapshot=2021-10-07T06:38:28.1771189Z version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_list_blobs_returns_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_list_blobs_returns_tags.yaml index ddc09fb5bde3..318cad391b41 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_list_blobs_returns_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_list_blobs_returns_tags.yaml @@ -2,94 +2,100 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:11:19 GMT + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerf7e61444?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containerf7e61444?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:d7a3f2b3-f01e-00c7-4945-bbc7a9000000\nTime:2021-10-07T06:38:28.7416303Z" headers: - content-length: '0' - date: Tue, 07 Jul 2020 00:11:19 GMT - etag: '"0x8D8220A46C46EEF"' - last-modified: Tue, 07 Jul 2020 00:11:20 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://pytagstoragehealkfv7bdxx.blob.core.windows.net/containerf7e61444?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/containerf7e61444?restype=container&timeout=5 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 07 Jul 2020 00:11:20 GMT + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/containerf7e61444/blobf7e61444 + uri: https://storagename.blob.core.windows.net/containerf7e61444/blobf7e61444 response: body: string: '' headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Tue, 07 Jul 2020 00:11:19 GMT - etag: '"0x8D8220A46D2E645"' - last-modified: Tue, 07 Jul 2020 00:11:20 GMT + date: Thu, 07 Oct 2021 06:38:28 GMT + etag: '"0x8D9895D12A752BD"' + last-modified: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstoragehealkfv7bdxx.blob.core.windows.net/containerf7e61444/blobf7e61444 + url: https://emilydevtest.blob.core.windows.net/containerf7e61444/blobf7e61444 - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:11:20 GMT + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/containerf7e61444?include=tags&restype=container&comp=list + uri: https://storagename.blob.core.windows.net/containerf7e61444?restype=container&comp=list&include=tags response: body: string: "\uFEFFblobf7e61444Tue, - 07 Jul 2020 00:11:20 GMTTue, 07 Jul 2020 00:11:20 - GMT0x8D8220A46D2E6451024application/octet-streamblobf7e61444Thu, + 07 Oct 2021 06:37:44 GMTThu, 07 Oct 2021 06:38:28 + GMT0x8D9895D12A752BD1024application/octet-streamyaNM/IXZgmmMasifdgcavQ==BlockBlobHottrueunlockedavailabletrue3tag1firsttagtag2secondtagtag3thirdtag" headers: content-type: application/xml - date: Tue, 07 Jul 2020 00:11:19 GMT + date: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2019-12-12' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://pytagstoragehealkfv7bdxx.blob.core.windows.net/containerf7e61444?include=tags&restype=container&comp=list + url: https://emilydevtest.blob.core.windows.net/containerf7e61444?restype=container&comp=list&include=tags version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags.yaml index bf68a2cbcc96..4af16af93e61 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags.yaml @@ -2,90 +2,95 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 02 Jul 2020 22:02:57 GMT + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container3fb30fef?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container3fb30fef?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:a95f48df-b01e-0022-7e45-bb96eb000000\nTime:2021-10-07T06:38:28.9163391Z" headers: - content-length: '0' - date: Thu, 02 Jul 2020 22:02:59 GMT - etag: '"0x8D81ED3AEC98D93"' - last-modified: Thu, 02 Jul 2020 22:02:59 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://pytagstoragerz54mm7n4hqa.blob.core.windows.net/container3fb30fef?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/container3fb30fef?restype=container&timeout=5 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Thu, 02 Jul 2020 22:02:59 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container3fb30fef/blob3fb30fef + uri: https://storagename.blob.core.windows.net/container3fb30fef/blob3fb30fef response: body: string: '' headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Thu, 02 Jul 2020 22:02:59 GMT - etag: '"0x8D81ED3AED626CE"' - last-modified: Thu, 02 Jul 2020 22:02:59 GMT + date: Thu, 07 Oct 2021 06:38:28 GMT + etag: '"0x8D9895D12C1E46C"' + last-modified: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstoragerz54mm7n4hqa.blob.core.windows.net/container3fb30fef/blob3fb30fef + url: https://emilydevtest.blob.core.windows.net/container3fb30fef/blob3fb30fef - request: body: ' tag1firsttagtag2secondtagtag3thirdtag' headers: + Accept: + - application/xml Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Thu, 02 Jul 2020 22:02:59 GMT + - Thu, 07 Oct 2021 06:38:28 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container3fb30fef/blob3fb30fef?comp=tags + uri: https://storagename.blob.core.windows.net/container3fb30fef/blob3fb30fef?comp=tags response: body: string: '' headers: - date: Thu, 02 Jul 2020 22:02:59 GMT + date: Thu, 07 Oct 2021 06:38:28 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 204 message: No Content - url: https://pytagstoragerz54mm7n4hqa.blob.core.windows.net/container3fb30fef/blob3fb30fef?comp=tags + url: https://emilydevtest.blob.core.windows.net/container3fb30fef/blob3fb30fef?comp=tags version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags_for_a_version.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags_for_a_version.yaml index b260088367a3..8c6e8199d7de 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags_for_a_version.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags_for_a_version.yaml @@ -2,45 +2,48 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 13 May 2020 07:08:42 GMT + - Thu, 07 Oct 2021 06:42:13 GMT x-ms-version: - - '2019-10-10' + - '2020-10-02' method: PUT - uri: https://storagename.blob.core.windows.net/container498a15ba?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container498a15ba?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:d9511c68-201e-0052-0f46-bb2f1c000000\nTime:2021-10-07T06:42:13.5039724Z" headers: - content-length: '0' - date: Wed, 13 May 2020 07:08:42 GMT - etag: '"0x8D7F70C78A76D7B"' - last-modified: Wed, 13 May 2020 07:08:43 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:42:13 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-10-10' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://huxfrancec.blob.core.windows.net/container498a15ba?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/container498a15ba?restype=container&timeout=5 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Wed, 13 May 2020 07:08:43 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:42:13 GMT x-ms-version: - - '2019-10-10' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/container498a15ba/blob498a15ba response: @@ -49,35 +52,34 @@ interactions: headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Wed, 13 May 2020 07:08:43 GMT - etag: '"0x8D7F70C78C1A5C8"' - last-modified: Wed, 13 May 2020 07:08:43 GMT + date: Thu, 07 Oct 2021 06:42:13 GMT + etag: '"0x8D9895D98A06CFF"' + last-modified: Thu, 07 Oct 2021 06:42:13 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-10-10' - x-ms-version-id: '2020-05-13T07:08:43.3839560Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://huxfrancec.blob.core.windows.net/container498a15ba/blob498a15ba + url: https://emilydevtest.blob.core.windows.net/container498a15ba/blob498a15ba - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Wed, 13 May 2020 07:08:43 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:42:13 GMT x-ms-version: - - '2019-10-10' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/container498a15ba/blob498a15ba response: @@ -86,44 +88,45 @@ interactions: headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Wed, 13 May 2020 07:08:43 GMT - etag: '"0x8D7F70C78DAFEBD"' - last-modified: Wed, 13 May 2020 07:08:43 GMT + date: Thu, 07 Oct 2021 06:42:13 GMT + etag: '"0x8D9895D98A46557"' + last-modified: Thu, 07 Oct 2021 06:42:13 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-10-10' - x-ms-version-id: '2020-05-13T07:08:43.5520740Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://huxfrancec.blob.core.windows.net/container498a15ba/blob498a15ba + url: https://emilydevtest.blob.core.windows.net/container498a15ba/blob498a15ba - request: body: ' tag1firsttagtag2secondtagtag3thirdtag' headers: + Accept: + - application/xml Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.2 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 13 May 2020 07:08:43 GMT + - Thu, 07 Oct 2021 06:42:13 GMT x-ms-version: - - '2019-10-10' + - '2020-10-02' method: PUT - uri: https://storagename.blob.core.windows.net/container498a15ba/blob498a15ba?versionid=2020-05-13T07:08:43.3839560Z&comp=tags + uri: https://storagename.blob.core.windows.net/container498a15ba/blob498a15ba?comp=tags response: body: string: '' headers: - date: Wed, 13 May 2020 07:08:43 GMT + date: Thu, 07 Oct 2021 06:42:13 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-10-10' + x-ms-version: '2020-10-02' status: code: 204 message: No Content - url: https://huxfrancec.blob.core.windows.net/container498a15ba/blob498a15ba?versionid=2020-05-13T07:08:43.3839560Z&comp=tags + url: https://emilydevtest.blob.core.windows.net/container498a15ba/blob498a15ba?comp=tags version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags_with_lease.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags_with_lease.yaml index 5ec08a3549a1..0f135b6d38d9 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags_with_lease.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_set_blob_tags_with_lease.yaml @@ -2,43 +2,48 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:47:53 GMT + - Thu, 07 Oct 2021 06:38:29 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT - uri: https://storagename.blob.core.windows.net/containera431473?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/containera431473?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:eea87068-701e-00bb-1245-bbe956000000\nTime:2021-10-07T06:38:29.8747487Z" headers: - content-length: '0' - date: Fri, 06 Nov 2020 21:47:52 GMT - etag: '"0x8D8829D9D9E464C"' - last-modified: Fri, 06 Nov 2020 21:47:53 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2020-04-08' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://seanmcccanary3.blob.core.windows.net/containera431473?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/containera431473?restype=container&timeout=5 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Fri, 06 Nov 2020 21:47:53 GMT + - Thu, 07 Oct 2021 06:38:29 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/containera431473/bloba431473 response: @@ -47,33 +52,34 @@ interactions: headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Fri, 06 Nov 2020 21:47:53 GMT - etag: '"0x8D8829D9DA61294"' - last-modified: Fri, 06 Nov 2020 21:47:53 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT + etag: '"0x8D9895D1353DE86"' + last-modified: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2020-04-08' - x-ms-version-id: '2020-11-06T21:47:53.9308180Z' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://seanmcccanary3.blob.core.windows.net/containera431473/bloba431473 + url: https://emilydevtest.blob.core.windows.net/containera431473/bloba431473 - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:47:53 GMT + - Thu, 07 Oct 2021 06:38:29 GMT x-ms-lease-action: - acquire x-ms-lease-duration: - '-1' x-ms-proposed-lease-id: - - c4582a27-fa57-40db-8cc8-379fde913433 + - c69e8acf-e5b4-46d4-a2bd-da0c98e7fcf1 x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/containera431473/bloba431473?comp=lease response: @@ -81,90 +87,94 @@ interactions: string: '' headers: content-length: '0' - date: Fri, 06 Nov 2020 21:47:53 GMT - etag: '"0x8D8829D9DA61294"' - last-modified: Fri, 06 Nov 2020 21:47:53 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT + etag: '"0x8D9895D1353DE86"' + last-modified: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-lease-id: c4582a27-fa57-40db-8cc8-379fde913433 - x-ms-version: '2020-04-08' + x-ms-lease-id: c69e8acf-e5b4-46d4-a2bd-da0c98e7fcf1 + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://seanmcccanary3.blob.core.windows.net/containera431473/bloba431473?comp=lease + url: https://emilydevtest.blob.core.windows.net/containera431473/bloba431473?comp=lease - request: body: ' tag1firsttagtag2secondtagtag3thirdtag' headers: + Accept: + - application/xml Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:47:54 GMT + - Thu, 07 Oct 2021 06:38:29 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/containera431473/bloba431473?comp=tags response: body: string: "\uFEFF\nLeaseIdMissingThere - is currently a lease on the blob and no lease ID was specified in the request.\nRequestId:dccdd42d-401e-0035-4086-b4b6d6000000\nTime:2020-11-06T21:47:54.1899339Z" + is currently a lease on the blob and no lease ID was specified in the request.\nRequestId:eea87082-701e-00bb-2a45-bbe956000000\nTime:2021-10-07T06:38:30.0718876Z" headers: content-length: '268' content-type: application/xml - date: Fri, 06 Nov 2020 21:47:53 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-error-code: LeaseIdMissing - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 412 message: There is currently a lease on the blob and no lease ID was specified in the request. - url: https://seanmcccanary3.blob.core.windows.net/containera431473/bloba431473?comp=tags + url: https://emilydevtest.blob.core.windows.net/containera431473/bloba431473?comp=tags - request: body: ' tag1firsttagtag2secondtagtag3thirdtag' headers: + Accept: + - application/xml Content-Length: - '217' Content-Type: - - application/xml; charset=utf-8 + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:47:54 GMT + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-lease-id: - - c4582a27-fa57-40db-8cc8-379fde913433 + - c69e8acf-e5b4-46d4-a2bd-da0c98e7fcf1 x-ms-version: - - '2020-04-08' + - '2020-10-02' method: PUT uri: https://storagename.blob.core.windows.net/containera431473/bloba431473?comp=tags response: body: string: '' headers: - date: Fri, 06 Nov 2020 21:47:53 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 204 message: No Content - url: https://seanmcccanary3.blob.core.windows.net/containera431473/bloba431473?comp=tags + url: https://emilydevtest.blob.core.windows.net/containera431473/bloba431473?comp=tags - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:47:54 GMT + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-version: - - '2020-04-08' + - '2020-10-02' method: GET uri: https://storagename.blob.core.windows.net/containera431473/bloba431473?comp=tags response: @@ -173,58 +183,58 @@ interactions: headers: content-length: '220' content-type: application/xml - date: Fri, 06 Nov 2020 21:47:53 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 vary: Origin - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://seanmcccanary3.blob.core.windows.net/containera431473/bloba431473?comp=tags + url: https://emilydevtest.blob.core.windows.net/containera431473/bloba431473?comp=tags - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:47:54 GMT + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-lease-id: - '''d92e6954-3274-4715-811c-727ca7145303''' x-ms-version: - - '2020-04-08' + - '2020-10-02' method: GET uri: https://storagename.blob.core.windows.net/containera431473/bloba431473?comp=tags response: body: string: "\uFEFF\nInvalidHeaderValueThe - value for one of the HTTP headers is not in the correct format.\nRequestId:dccdd4c8-401e-0035-4986-b4b6d6000000\nTime:2020-11-06T21:47:54.3740649Zx-ms-lease-id'd92e6954-3274-4715-811c-727ca7145303'" + value for one of the HTTP headers is not in the correct format.\nRequestId:eea87106-701e-00bb-2245-bbe956000000\nTime:2021-10-07T06:38:30.2099850Zx-ms-lease-id'd92e6954-3274-4715-811c-727ca7145303'" headers: content-length: '368' content-type: application/xml - date: Fri, 06 Nov 2020 21:47:53 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 vary: Origin x-ms-error-code: InvalidHeaderValue - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 400 message: The value for one of the HTTP headers is not in the correct format. - url: https://seanmcccanary3.blob.core.windows.net/containera431473/bloba431473?comp=tags + url: https://emilydevtest.blob.core.windows.net/containera431473/bloba431473?comp=tags - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:47:54 GMT + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-lease-id: - - c4582a27-fa57-40db-8cc8-379fde913433 + - c69e8acf-e5b4-46d4-a2bd-da0c98e7fcf1 x-ms-version: - - '2020-04-08' + - '2020-10-02' method: GET uri: https://storagename.blob.core.windows.net/containera431473/bloba431473?comp=tags response: @@ -233,25 +243,27 @@ interactions: headers: content-length: '220' content-type: application/xml - date: Fri, 06 Nov 2020 21:47:53 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 vary: Origin - x-ms-version: '2020-04-08' + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://seanmcccanary3.blob.core.windows.net/containera431473/bloba431473?comp=tags + url: https://emilydevtest.blob.core.windows.net/containera431473/bloba431473?comp=tags - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.6.0b2 Python/3.7.3 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Fri, 06 Nov 2020 21:47:54 GMT + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-lease-id: - - c4582a27-fa57-40db-8cc8-379fde913433 + - c69e8acf-e5b4-46d4-a2bd-da0c98e7fcf1 x-ms-version: - - '2020-04-08' + - '2020-10-02' method: DELETE uri: https://storagename.blob.core.windows.net/containera431473/bloba431473 response: @@ -259,12 +271,12 @@ interactions: string: '' headers: content-length: '0' - date: Fri, 06 Nov 2020 21:47:53 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-delete-type-permanent: 'false' - x-ms-version: '2020-04-08' + x-ms-delete-type-permanent: 'true' + x-ms-version: '2020-10-02' status: code: 202 message: Accepted - url: https://seanmcccanary3.blob.core.windows.net/containera431473/bloba431473 + url: https://emilydevtest.blob.core.windows.net/containera431473/bloba431473 version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_start_copy_from_url_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_start_copy_from_url_with_tags.yaml index 70a6a01b5cab..73ece0abc02f 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_start_copy_from_url_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_start_copy_from_url_with_tags.yaml @@ -2,110 +2,115 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:11:41 GMT + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container7ba116cd?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container7ba116cd?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:f2ba588f-501e-0005-5f45-bb812f000000\nTime:2021-10-07T06:38:30.3681457Z" headers: - content-length: '0' - date: Tue, 07 Jul 2020 00:11:42 GMT - etag: '"0x8D8220A541AC9E9"' - last-modified: Tue, 07 Jul 2020 00:11:42 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:38:29 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://pytagstorageceztkm7a6kdx.blob.core.windows.net/container7ba116cd?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/container7ba116cd?restype=container&timeout=5 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 07 Jul 2020 00:11:43 GMT - x-ms-tags: - - '' + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container7ba116cd/blob7ba116cd + uri: https://storagename.blob.core.windows.net/container7ba116cd/blob7ba116cd response: body: string: '' headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Tue, 07 Jul 2020 00:11:42 GMT - etag: '"0x8D8220A54273E1D"' - last-modified: Tue, 07 Jul 2020 00:11:42 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT + etag: '"0x8D9895D139F25E6"' + last-modified: Thu, 07 Oct 2021 06:38:30 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstorageceztkm7a6kdx.blob.core.windows.net/container7ba116cd/blob7ba116cd + url: https://emilydevtest.blob.core.windows.net/container7ba116cd/blob7ba116cd - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-copy-source: - - https://pytagstorageceztkm7a6kdx.blob.core.windows.net/container7ba116cd/blob7ba116cd + - https://emilydevtest.blob.core.windows.net/container7ba116cd/blob7ba116cd x-ms-date: - - Tue, 07 Jul 2020 00:11:43 GMT + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container7ba116cd/blob1copy + uri: https://storagename.blob.core.windows.net/container7ba116cd/blob1copy response: body: string: '' headers: content-length: '0' - date: Tue, 07 Jul 2020 00:11:42 GMT - etag: '"0x8D8220A54348764"' - last-modified: Tue, 07 Jul 2020 00:11:43 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT + etag: '"0x8D9895D13A3937F"' + last-modified: Thu, 07 Oct 2021 06:38:30 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-copy-id: 30bde605-9ead-4b48-8c10-e55c9b6f2562 + x-ms-copy-id: 7c5e2a33-9eda-44f9-9d81-031a5c17be34 x-ms-copy-status: success - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 202 message: Accepted - url: https://pytagstorageceztkm7a6kdx.blob.core.windows.net/container7ba116cd/blob1copy + url: https://emilydevtest.blob.core.windows.net/container7ba116cd/blob1copy - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:11:43 GMT + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-range: - bytes=0-33554431 x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container7ba116cd/blob1copy + uri: https://storagename.blob.core.windows.net/container7ba116cd/blob1copy response: body: string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -114,51 +119,53 @@ interactions: content-length: '1024' content-range: bytes 0-1023/1024 content-type: application/octet-stream - date: Tue, 07 Jul 2020 00:11:42 GMT - etag: '"0x8D8220A54348764"' - last-modified: Tue, 07 Jul 2020 00:11:43 GMT + date: Thu, 07 Oct 2021 06:38:29 GMT + etag: '"0x8D9895D13A3937F"' + last-modified: Thu, 07 Oct 2021 06:38:30 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin x-ms-blob-content-md5: yaNM/IXZgmmMasifdgcavQ== x-ms-blob-type: BlockBlob - x-ms-copy-completion-time: Tue, 07 Jul 2020 00:11:43 GMT - x-ms-copy-id: 30bde605-9ead-4b48-8c10-e55c9b6f2562 + x-ms-copy-completion-time: Thu, 07 Oct 2021 06:38:30 GMT + x-ms-copy-id: 7c5e2a33-9eda-44f9-9d81-031a5c17be34 x-ms-copy-progress: 1024/1024 - x-ms-copy-source: https://pytagstorageceztkm7a6kdx.blob.core.windows.net/container7ba116cd/blob7ba116cd + x-ms-copy-source: https://emilydevtest.blob.core.windows.net/container7ba116cd/blob7ba116cd x-ms-copy-status: success - x-ms-creation-time: Tue, 07 Jul 2020 00:11:43 GMT + x-ms-creation-time: Thu, 07 Oct 2021 06:37:46 GMT x-ms-lease-state: available x-ms-lease-status: unlocked x-ms-server-encrypted: 'true' x-ms-tag-count: '3' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 206 message: Partial Content - url: https://pytagstorageceztkm7a6kdx.blob.core.windows.net/container7ba116cd/blob1copy + url: https://emilydevtest.blob.core.windows.net/container7ba116cd/blob1copy - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:11:43 GMT + - Thu, 07 Oct 2021 06:38:30 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container7ba116cd/blob1copy?comp=tags + uri: https://storagename.blob.core.windows.net/container7ba116cd/blob1copy?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" headers: content-length: '220' content-type: application/xml - date: Tue, 07 Jul 2020 00:11:43 GMT + date: Thu, 07 Oct 2021 06:39:03 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://pytagstorageceztkm7a6kdx.blob.core.windows.net/container7ba116cd/blob1copy?comp=tags + url: https://emilydevtest.blob.core.windows.net/container7ba116cd/blob1copy?comp=tags version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_upload_block_blob_with_tags.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_upload_block_blob_with_tags.yaml index 7d9729656dcd..68ae602bcd52 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_upload_block_blob_with_tags.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_blob_tags_async.test_upload_block_blob_with_tags.yaml @@ -2,88 +2,94 @@ interactions: - request: body: null headers: + Accept: + - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:12:04 GMT + - Thu, 07 Oct 2021 06:39:04 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container49b615ad?timeout=5&restype=container + uri: https://storagename.blob.core.windows.net/container49b615ad?restype=container&timeout=5 response: body: - string: '' + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:f455faff-101e-00bd-0346-bbdae9000000\nTime:2021-10-07T06:39:04.1786800Z" headers: - content-length: '0' - date: Tue, 07 Jul 2020 00:12:05 GMT - etag: '"0x8D8220A61A3816F"' - last-modified: Tue, 07 Jul 2020 00:12:05 GMT + content-length: '230' + content-type: application/xml + date: Thu, 07 Oct 2021 06:39:03 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-10-02' status: - code: 201 - message: Created - url: https://pytagstoragefx2x7srleg3i.blob.core.windows.net/container49b615ad?timeout=5&restype=container + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/container49b615ad?restype=container&timeout=5 - request: body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa headers: + Accept: + - application/xml Content-Length: - '1024' Content-Type: - application/octet-stream User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 07 Jul 2020 00:12:05 GMT + - Thu, 07 Oct 2021 06:39:04 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/container49b615ad/blob49b615ad + uri: https://storagename.blob.core.windows.net/container49b615ad/blob49b615ad response: body: string: '' headers: content-length: '0' content-md5: yaNM/IXZgmmMasifdgcavQ== - date: Tue, 07 Jul 2020 00:12:05 GMT - etag: '"0x8D8220A61B1FEA4"' - last-modified: Tue, 07 Jul 2020 00:12:05 GMT + date: Thu, 07 Oct 2021 06:39:03 GMT + etag: '"0x8D9895D27C9A1FE"' + last-modified: Thu, 07 Oct 2021 06:39:04 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: ov8U1LLnyKc= x-ms-request-server-encrypted: 'true' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 201 message: Created - url: https://pytagstoragefx2x7srleg3i.blob.core.windows.net/container49b615ad/blob49b615ad + url: https://emilydevtest.blob.core.windows.net/container49b615ad/blob49b615ad - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.3.3 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 07 Jul 2020 00:12:05 GMT + - Thu, 07 Oct 2021 06:39:04 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://pytagstoragestorname.blob.core.windows.net/container49b615ad/blob49b615ad?comp=tags + uri: https://storagename.blob.core.windows.net/container49b615ad/blob49b615ad?comp=tags response: body: string: "\uFEFF\ntag1firsttagtag2secondtagtag3thirdtag" headers: content-length: '220' content-type: application/xml - date: Tue, 07 Jul 2020 00:12:05 GMT + date: Thu, 07 Oct 2021 06:39:03 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 - x-ms-version: '2019-12-12' + vary: Origin + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://pytagstoragefx2x7srleg3i.blob.core.windows.net/container49b615ad/blob49b615ad?comp=tags + url: https://emilydevtest.blob.core.windows.net/container49b615ad/blob49b615ad?comp=tags version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob.test_get_block_list_no_blocks.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob.test_get_block_list_no_blocks.yaml index 2974f969baa6..3f20cd31169c 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob.test_get_block_list_no_blocks.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_block_blob.test_get_block_list_no_blocks.yaml @@ -3,7 +3,45 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 07 Oct 2021 06:49:42 GMT + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainera4381254?restype=container + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 07 Oct 2021 06:49:41 GMT + etag: + - '"0x8D9895EA4515386"' + last-modified: + - Thu, 07 Oct 2021 06:49:42 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -11,13 +49,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:48:38 GMT + - Thu, 07 Oct 2021 06:49:42 GMT x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://storagenamestorname.blob.core.windows.net/utcontainera4381254?restype=container + uri: https://storagename.blob.core.windows.net/utcontainersource1a4381254?restype=container response: body: string: '' @@ -25,15 +63,15 @@ interactions: content-length: - '0' date: - - Tue, 04 Aug 2020 18:48:38 GMT + - Thu, 07 Oct 2021 06:49:41 GMT etag: - - '"0x8D838A70033E184"' + - '"0x8D9895EA461AA49"' last-modified: - - Tue, 04 Aug 2020 18:48:38 GMT + - Thu, 07 Oct 2021 06:49:42 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2019-12-12' + - '2020-10-02' status: code: 201 message: Created @@ -41,7 +79,7 @@ interactions: body: null headers: Accept: - - '*/*' + - application/xml Accept-Encoding: - gzip, deflate Connection: @@ -50,20 +88,18 @@ interactions: - '0' Content-Type: - application/octet-stream - If-None-Match: - - '*' User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Tue, 04 Aug 2020 18:48:38 GMT + - Thu, 07 Oct 2021 06:49:42 GMT x-ms-tags: - tag1=firsttag&tag2=secondtag&tag3=thirdtag x-ms-version: - - '2019-12-12' + - '2020-10-02' method: PUT - uri: https://storagenamestorname.blob.core.windows.net/utcontainera4381254/bloba4381254 + uri: https://storagename.blob.core.windows.net/utcontainera4381254/bloba4381254 response: body: string: '' @@ -73,11 +109,11 @@ interactions: content-md5: - 1B2M2Y8AsgTpgAmY7PhCfg== date: - - Tue, 04 Aug 2020 18:48:38 GMT + - Thu, 07 Oct 2021 06:49:41 GMT etag: - - '"0x8D838A700421C3B"' + - '"0x8D9895EA470D41D"' last-modified: - - Tue, 04 Aug 2020 18:48:38 GMT + - Thu, 07 Oct 2021 06:49:42 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -85,9 +121,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2019-12-12' - x-ms-version-id: - - '2020-08-04T18:48:38.7951675Z' + - '2020-10-02' status: code: 201 message: Created @@ -101,32 +135,34 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:48:39 GMT + - Thu, 07 Oct 2021 06:49:42 GMT x-ms-if-tags: - '"condition tag"=''wrong tag''' x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://storagenamestorname.blob.core.windows.net/utcontainera4381254/bloba4381254?blocklisttype=all&comp=blocklist + uri: https://storagename.blob.core.windows.net/utcontainera4381254/bloba4381254?comp=blocklist&blocklisttype=all response: body: string: "\uFEFFConditionNotMetThe - condition specified using HTTP conditional header(s) is not met.\nRequestId:c48d70c3-501e-0034-558f-6a7e68000000\nTime:2020-08-04T18:48:38.9260731Z" + condition specified using HTTP conditional header(s) is not met.\nRequestId:bbd97715-701e-00ab-7947-bb2c3e000000\nTime:2021-10-07T06:49:43.0112957Z" headers: content-length: - '252' content-type: - application/xml date: - - Tue, 04 Aug 2020 18:48:38 GMT + - Thu, 07 Oct 2021 06:49:42 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin x-ms-error-code: - ConditionNotMet x-ms-version: - - '2019-12-12' + - '2020-10-02' status: code: 412 message: The condition specified using HTTP conditional header(s) is not met. @@ -140,15 +176,15 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:48:39 GMT + - Thu, 07 Oct 2021 06:49:43 GMT x-ms-if-tags: - '"tag1"=''firsttag''' x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://storagenamestorname.blob.core.windows.net/utcontainera4381254/bloba4381254?blocklisttype=all&comp=blocklist + uri: https://storagename.blob.core.windows.net/utcontainera4381254/bloba4381254?comp=blocklist&blocklisttype=all response: body: string: "\uFEFFConditionNotMetThe - condition specified using HTTP conditional header(s) is not met.\nRequestId:e3c58b0c-501e-001b-7490-6a73a3000000\nTime:2020-08-04T18:49:42.5205312Z" + condition specified using HTTP conditional header(s) is not met.\nRequestId:4e6bcff5-c01e-0075-0b49-bb38d8000000\nTime:2021-10-07T07:01:25.1789213Z" headers: content-length: '252' content-type: application/xml - date: Tue, 04 Aug 2020 18:49:41 GMT + date: Thu, 07 Oct 2021 07:01:24 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin x-ms-error-code: ConditionNotMet - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 412 message: The condition specified using HTTP conditional header(s) is not met. - url: https://emilyeuap.blob.core.windows.net/utcontainer1c7814d1/blob1c7814d1?blocklisttype=all&comp=blocklist + url: https://emilydevtest.blob.core.windows.net/utcontainer1c7814d1/blob1c7814d1?comp=blocklist&blocklisttype=all - request: body: null headers: Accept: - application/xml User-Agent: - - azsdk-python-storage-blob/12.4.0b1 Python/3.7.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Tue, 04 Aug 2020 18:49:42 GMT + - Thu, 07 Oct 2021 07:01:25 GMT x-ms-if-tags: - '"tag1"=''firsttag''' x-ms-version: - - '2019-12-12' + - '2020-10-02' method: GET - uri: https://storagenamestorname.blob.core.windows.net/utcontainer1c7814d1/blob1c7814d1?blocklisttype=all&comp=blocklist + uri: https://storagename.blob.core.windows.net/utcontainer1c7814d1/blob1c7814d1?comp=blocklist&blocklisttype=all response: body: string: "\uFEFF" headers: content-type: application/xml - date: Tue, 04 Aug 2020 18:49:42 GMT - etag: '"0x8D838A7263152BF"' - last-modified: Tue, 04 Aug 2020 18:49:42 GMT + date: Thu, 07 Oct 2021 07:01:24 GMT + etag: '"0x8D9896046F2777B"' + last-modified: Thu, 07 Oct 2021 07:01:24 GMT server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked + vary: Origin x-ms-blob-content-length: '0' - x-ms-version: '2019-12-12' + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: https://emilyeuap.blob.core.windows.net/utcontainer1c7814d1/blob1c7814d1?blocklisttype=all&comp=blocklist + url: https://emilydevtest.blob.core.windows.net/utcontainer1c7814d1/blob1c7814d1?comp=blocklist&blocklisttype=all version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_logging.test_logging_request_and_response_body.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_logging.test_logging_request_and_response_body.yaml new file mode 100644 index 000000000000..a7a7f2afe918 --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_logging.test_logging_request_and_response_body.yaml @@ -0,0 +1,253 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 22 Jul 2021 00:58:15 GMT + x-ms-version: + - '2020-08-04' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer21d61510?restype=container + response: + body: + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:e1cc4389-801e-00bf-1f94-7e6451000000\nTime:2021-07-22T00:58:15.9669124Z" + headers: + content-length: + - '230' + content-type: + - application/xml + date: + - Thu, 22 Jul 2021 00:58:15 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: + - ContainerAlreadyExists + x-ms-version: + - '2020-08-04' + status: + code: 409 + message: The specified container already exists. +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '4096' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Thu, 22 Jul 2021 00:58:16 GMT + x-ms-version: + - '2020-08-04' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer21d61510/srcblob21d61510 + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - IaGZxT9CKjgOILFi+26+nA== + date: + - Thu, 22 Jul 2021 00:58:15 GMT + etag: + - '"0x8D94CABC9EBBC01"' + last-modified: + - Thu, 22 Jul 2021 00:58:16 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - Ep3PX5ZZvPI= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-08-04' + status: + code: 201 + message: Created +- request: + body: testloggingbody + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '15' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Thu, 22 Jul 2021 00:58:16 GMT + x-ms-version: + - '2020-08-04' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainer21d61510/testloggingblob21d61510 + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - kiWDMg2eTMJ7rcIxBGHjdQ== + date: + - Thu, 22 Jul 2021 00:58:15 GMT + etag: + - '"0x8D94CABC9FF6EAB"' + last-modified: + - Thu, 22 Jul 2021 00:58:16 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: + - V9QvlmP+jQ4= + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-08-04' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 22 Jul 2021 00:58:16 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2020-08-04' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer21d61510/testloggingblob21d61510 + response: + body: + string: testloggingbody + headers: + accept-ranges: + - bytes + content-length: + - '15' + content-range: + - bytes 0-14/15 + content-type: + - application/octet-stream + date: + - Thu, 22 Jul 2021 00:58:15 GMT + etag: + - '"0x8D94CABC9FF6EAB"' + last-modified: + - Thu, 22 Jul 2021 00:58:16 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - kiWDMg2eTMJ7rcIxBGHjdQ== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Thu, 22 Jul 2021 00:18:58 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2020-08-04' + status: + code: 206 + message: Partial Content +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 22 Jul 2021 00:58:16 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2020-08-04' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainer21d61510/testloggingblob21d61510 + response: + body: + string: testloggingbody + headers: + accept-ranges: + - bytes + content-length: + - '15' + content-range: + - bytes 0-14/15 + content-type: + - application/octet-stream + date: + - Thu, 22 Jul 2021 00:58:15 GMT + etag: + - '"0x8D94CABC9FF6EAB"' + last-modified: + - Thu, 22 Jul 2021 00:58:16 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-blob-content-md5: + - kiWDMg2eTMJ7rcIxBGHjdQ== + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Thu, 22 Jul 2021 00:18:58 GMT + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2020-08-04' + status: + code: 206 + message: Partial Content +version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_logging_async.test_logging_request_and_response_body.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_logging_async.test_logging_request_and_response_body.yaml new file mode 100644 index 000000000000..71ab0b488355 --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_logging_async.test_logging_request_and_response_body.yaml @@ -0,0 +1,141 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 22 Jul 2021 00:58:07 GMT + x-ms-version: + - '2020-08-04' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainera9a0178d?restype=container + response: + body: + string: "\uFEFFContainerAlreadyExistsThe + specified container already exists.\nRequestId:841a715d-701e-00bb-2394-7ee956000000\nTime:2021-07-22T00:58:07.4850376Z" + headers: + content-length: '230' + content-type: application/xml + date: Thu, 22 Jul 2021 00:58:06 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-error-code: ContainerAlreadyExists + x-ms-version: '2020-08-04' + status: + code: 409 + message: The specified container already exists. + url: https://emilydevtest.blob.core.windows.net/utcontainera9a0178d?restype=container +- request: + body: testloggingbody + headers: + Accept: + - application/xml + Content-Length: + - '15' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Thu, 22 Jul 2021 00:58:07 GMT + x-ms-version: + - '2020-08-04' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainera9a0178d/testloggingbloba9a0178d + response: + body: + string: '' + headers: + content-length: '0' + content-md5: kiWDMg2eTMJ7rcIxBGHjdQ== + date: Thu, 22 Jul 2021 00:58:06 GMT + etag: '"0x8D94CABC4D57331"' + last-modified: Thu, 22 Jul 2021 00:58:07 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: V9QvlmP+jQ4= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-08-04' + status: + code: 201 + message: Created + url: https://emilydevtest.blob.core.windows.net/utcontainera9a0178d/testloggingbloba9a0178d +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 22 Jul 2021 00:58:07 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2020-08-04' + method: GET + uri: https://storagename.blob.core.windows.net/utcontainera9a0178d/testloggingbloba9a0178d + response: + body: + string: testloggingbody + headers: + accept-ranges: bytes + content-length: '15' + content-range: bytes 0-14/15 + content-type: application/octet-stream + date: Thu, 22 Jul 2021 00:58:06 GMT + etag: '"0x8D94CABC4D57331"' + last-modified: Thu, 22 Jul 2021 00:58:07 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin + x-ms-blob-content-md5: kiWDMg2eTMJ7rcIxBGHjdQ== + x-ms-blob-type: BlockBlob + x-ms-creation-time: Thu, 22 Jul 2021 00:34:21 GMT + x-ms-lease-state: available + x-ms-lease-status: unlocked + x-ms-server-encrypted: 'true' + x-ms-version: '2020-08-04' + status: + code: 206 + message: Partial Content + url: https://emilydevtest.blob.core.windows.net/utcontainera9a0178d/testloggingbloba9a0178d +- request: + body: testloggingbody + headers: + Accept: + - application/xml + Content-Length: + - '15' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-storage-blob/12.9.0b1 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-blob-type: + - BlockBlob + x-ms-date: + - Thu, 22 Jul 2021 00:58:07 GMT + x-ms-version: + - '2020-08-04' + method: PUT + uri: https://storagename.blob.core.windows.net/utcontainera9a0178d/testloggingbloba9a0178d + response: + body: + string: '' + headers: + content-length: '0' + content-md5: kiWDMg2eTMJ7rcIxBGHjdQ== + date: Thu, 22 Jul 2021 00:58:06 GMT + etag: '"0x8D94CABC4DC2B2A"' + last-modified: Thu, 22 Jul 2021 00:58:07 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-content-crc64: V9QvlmP+jQ4= + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-08-04' + status: + code: 201 + message: Created + url: https://emilydevtest.blob.core.windows.net/utcontainera9a0178d/testloggingbloba9a0178d +version: 1 diff --git a/sdk/storage/azure-storage-blob/tests/recordings/test_quick_query.test_quick_query_input_in_parquet_format.yaml b/sdk/storage/azure-storage-blob/tests/recordings/test_quick_query.test_quick_query_input_in_parquet_format.yaml index 674b1ccc6110..76a4304fde5d 100644 --- a/sdk/storage/azure-storage-blob/tests/recordings/test_quick_query.test_quick_query_input_in_parquet_format.yaml +++ b/sdk/storage/azure-storage-blob/tests/recordings/test_quick_query.test_quick_query_input_in_parquet_format.yaml @@ -17,7 +17,7 @@ interactions: x-ms-version: - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/utqqcontainerb38317df?restype=container + uri: https://storagename.blob.core.windows.net/utqqcontainerb38317df?restype=container response: body: string: '' @@ -1465,7 +1465,7 @@ interactions: x-ms-version: - '2020-10-02' method: PUT - uri: https://pytagstoragestorname.blob.core.windows.net/utqqcontainerb38317df/csvfileb38317df + uri: https://storagename.blob.core.windows.net/utqqcontainerb38317df/csvfileb38317df response: body: string: '' @@ -1515,7 +1515,7 @@ interactions: x-ms-version: - '2020-10-02' method: POST - uri: https://pytagstoragestorname.blob.core.windows.net/utqqcontainerb38317df/csvfileb38317df?comp=query + uri: https://storagename.blob.core.windows.net/utqqcontainerb38317df/csvfileb38317df?comp=query response: body: string: !!binary | diff --git a/sdk/storage/azure-storage-blob/tests/_shared/__init__.py b/sdk/storage/azure-storage-blob/tests/settings/__init__.py similarity index 100% rename from sdk/storage/azure-storage-blob/tests/_shared/__init__.py rename to sdk/storage/azure-storage-blob/tests/settings/__init__.py diff --git a/sdk/storage/azure-storage-blob/tests/settings/settings_fake.py b/sdk/storage/azure-storage-blob/tests/settings/settings_fake.py new file mode 100644 index 000000000000..9381c68f8aa6 --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/settings/settings_fake.py @@ -0,0 +1,28 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +STORAGE_ACCOUNT_NAME = "fakename" +STORAGE_ACCOUNT_KEY = "fakekey" + +SECONDARY_STORAGE_ACCOUNT_NAME = "fakename" +SECONDARY_STORAGE_ACCOUNT_KEY = "fakekey" +BLOB_STORAGE_ACCOUNT_NAME = "fakename" +BLOB_STORAGE_ACCOUNT_KEY = "fakekey" +VERSIONED_STORAGE_ACCOUNT_NAME = "fakename" +VERSIONED_STORAGE_ACCOUNT_KEY = "fakekey" +PREMIUM_STORAGE_ACCOUNT_NAME = "fakename" +PREMIUM_STORAGE_ACCOUNT_KEY = "fakekey" +STORAGE_RESOURCE_GROUP_NAME = "fakename" + +TENANT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_SECRET = "00000000-0000-0000-0000-000000000000" + +ACCOUNT_URL_SUFFIX = 'core.windows.net' +RUN_IN_LIVE = "False" +SKIP_LIVE_RECORDING = "True" + +PROTOCOL = "https" diff --git a/sdk/storage/azure-storage-blob/tests/settings/testcase.py b/sdk/storage/azure-storage-blob/tests/settings/testcase.py new file mode 100644 index 000000000000..98410336c77a --- /dev/null +++ b/sdk/storage/azure-storage-blob/tests/settings/testcase.py @@ -0,0 +1,71 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from __future__ import division + +import functools +import os +import logging +from devtools_testutils import ( + PowerShellPreparer, ACCOUNT_FAKE_KEY) + +try: + from cStringIO import StringIO # Python 2 +except ImportError: + from io import StringIO + +try: + # Running locally - use configuration in settings_real.py + from .settings_real import * +except ImportError: + # Running on the pipeline - use fake values in order to create rg, etc. + from .settings_fake import * + + +LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' +os.environ['STORAGE_ACCOUNT_NAME'] = os.environ.get('STORAGE_ACCOUNT_NAME', None) or STORAGE_ACCOUNT_NAME +os.environ['STORAGE_ACCOUNT_KEY'] = os.environ.get('STORAGE_ACCOUNT_KEY', None) or STORAGE_ACCOUNT_KEY +os.environ['SECONDARY_STORAGE_ACCOUNT_NAME'] = os.environ.get('SECONDARY_STORAGE_ACCOUNT_NAME', None) or SECONDARY_STORAGE_ACCOUNT_NAME +os.environ['SECONDARY_STORAGE_ACCOUNT_KEY'] = os.environ.get('SECONDARY_STORAGE_ACCOUNT_KEY', None) or SECONDARY_STORAGE_ACCOUNT_KEY +os.environ['BLOB_STORAGE_ACCOUNT_NAME'] = os.environ.get('BLOB_STORAGE_ACCOUNT_NAME', None) or BLOB_STORAGE_ACCOUNT_NAME +os.environ['BLOB_STORAGE_ACCOUNT_KEY'] = os.environ.get('BLOB_STORAGE_ACCOUNT_KEY', None) or BLOB_STORAGE_ACCOUNT_KEY +os.environ['VERSIONED_STORAGE_ACCOUNT_NAME'] = os.environ.get('VERSIONED_STORAGE_ACCOUNT_NAME', None) or VERSIONED_STORAGE_ACCOUNT_NAME +os.environ['VERSIONED_STORAGE_ACCOUNT_KEY'] = os.environ.get('VERSIONED_STORAGE_ACCOUNT_KEY', None) or VERSIONED_STORAGE_ACCOUNT_KEY +os.environ['PREMIUM_STORAGE_ACCOUNT_NAME'] = os.environ.get('PREMIUM_STORAGE_ACCOUNT_NAME', None) or PREMIUM_STORAGE_ACCOUNT_NAME +os.environ['PREMIUM_STORAGE_ACCOUNT_KEY'] = os.environ.get('PREMIUM_STORAGE_ACCOUNT_KEY', None) or PREMIUM_STORAGE_ACCOUNT_KEY +os.environ['STORAGE_RESOURCE_GROUP_NAME'] = os.environ.get('STORAGE_RESOURCE_GROUP_NAME', None) or STORAGE_RESOURCE_GROUP_NAME + + +os.environ['AZURE_TEST_RUN_LIVE'] = os.environ.get('AZURE_TEST_RUN_LIVE', None) or RUN_IN_LIVE +os.environ['AZURE_SKIP_LIVE_RECORDING'] = os.environ.get('AZURE_SKIP_LIVE_RECORDING', None) or SKIP_LIVE_RECORDING +os.environ['PROTOCOL'] = PROTOCOL +os.environ['ACCOUNT_URL_SUFFIX'] = ACCOUNT_URL_SUFFIX + +os.environ['STORAGE_TENANT_ID'] = os.environ.get('STORAGE_TENANT_ID', None) or TENANT_ID +os.environ['STORAGE_CLIENT_ID'] = os.environ.get('STORAGE_CLIENT_ID', None) or CLIENT_ID +os.environ['STORAGE_CLIENT_SECRET'] = os.environ.get('STORAGE_CLIENT_SECRET', None) or CLIENT_SECRET + +BlobPreparer = functools.partial( + PowerShellPreparer, "storage", + storage_account_name="storagename", + storage_account_key=ACCOUNT_FAKE_KEY, + secondary_storage_account_name="pyrmtstoragestorname", + secondary_storage_account_key=ACCOUNT_FAKE_KEY, + blob_storage_account_name="storagenamestorname", + blob_storage_account_key=ACCOUNT_FAKE_KEY, + versioned_storage_account_name="storagenamestorname", + versioned_storage_account_key=ACCOUNT_FAKE_KEY, + premium_storage_account_name='pyacrstoragestorname', + premium_storage_account_key=ACCOUNT_FAKE_KEY, + storage_resource_group_name="rgname", + +) + + +def not_for_emulator(test): + def skip_test_if_targeting_emulator(self): + test(self) + return skip_test_if_targeting_emulator diff --git a/sdk/storage/azure-storage-blob/tests/test_append_blob.py b/sdk/storage/azure-storage-blob/tests/test_append_blob.py index a7852904e25a..9ab6ce30bfa4 100644 --- a/sdk/storage/azure-storage-blob/tests/test_append_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_append_blob.py @@ -16,7 +16,6 @@ from datetime import datetime, timedelta from azure.mgmt.storage import StorageManagementClient -from devtools_testutils import BlobAccountPreparer, ResourceGroupPreparer, CachedResourceGroupPreparer from azure.core import MatchConditions from azure.core.exceptions import ResourceNotFoundError, ResourceModifiedError, HttpResponseError @@ -29,7 +28,7 @@ BlobSasPermissions, BlobImmutabilityPolicyMode, ImmutabilityPolicy) from azure.storage.blob._shared.policies import StorageContentValidation -from _shared.testcase import GlobalStorageAccountPreparer, StorageAccountPreparer, GlobalResourceGroupPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -96,10 +95,10 @@ def read(self, count): # --Test cases for block blobs -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob_name = self._get_blob_reference() @@ -114,10 +113,10 @@ def test_create_blob(self, resource_group, location, storage_account, storage_ac self.assertEqual(blob_properties.last_modified, create_resp.get('last_modified')) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_properties_using_vid(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_properties_using_vid(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob_name = self._get_blob_reference() @@ -135,9 +134,9 @@ def test_get_blob_properties_using_vid(self, resource_group, location, storage_a self.assertEqual(blob_properties.etag, create_resp.get('etag')) self.assertEqual(blob_properties.last_modified, create_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_create_blob_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_create_blob_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -151,9 +150,9 @@ def test_create_blob_with_lease_id(self, resource_group, location, storage_accou self.assertEqual(blob_properties.etag, create_resp.get('etag')) self.assertEqual(blob_properties.last_modified, create_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_create_blob_with_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_create_blob_with_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) metadata = {'hello': 'world', 'number': '42'} blob_name = self._get_blob_reference() @@ -166,9 +165,9 @@ def test_create_blob_with_metadata(self, resource_group, location, storage_accou md = blob.get_blob_properties().metadata self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() - def test_append_block(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_block(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -183,9 +182,9 @@ def test_append_block(self, resource_group, location, storage_account, storage_a # Assert self.assertBlobEqual(blob, b'block 0block 1block 2block 3block 4') - @GlobalStorageAccountPreparer() - def test_append_block_unicode(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_unicode(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -198,10 +197,9 @@ def test_append_block_unicode(self, resource_group, location, storage_account, s self.assertIsNotNone(resp['etag']) self.assertIsNotNone(resp['last_modified']) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - def test_append_block_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + @BlobPreparer() + def test_append_block_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), blob_storage_account_key, max_block_size=4 * 1024) self._setup(bsc) tags = {"tag1 name": "my tag", "tag2": "secondtag", "tag3": "thirdtag"} @@ -215,9 +213,9 @@ def test_append_block_with_if_tags(self, resource_group, location, storage_accou self.assertIsNotNone(resp['etag']) self.assertIsNotNone(resp['last_modified']) - @GlobalStorageAccountPreparer() - def test_append_block_with_md5(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_with_md5(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -230,10 +228,10 @@ def test_append_block_with_md5(self, resource_group, location, storage_account, # Assert - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_oauth(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_oauth(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -248,11 +246,10 @@ def test_append_block_from_url_with_oauth(self, resource_group, location, storag destination_blob_data = destination_blob_client.download_blob().readall() self.assertEqual(source_blob_data, destination_blob_data) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - def test_append_block_from_url(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url(self, blob_storage_account_name, blob_storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), blob_storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -305,10 +302,10 @@ def test_append_block_from_url(self, resource_group, location, storage_account, destination_blob_client.append_block_from_url(source_blob_client.url + '?' + sas, source_length=LARGE_BLOB_SIZE) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_and_validate_content_md5(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_and_validate_content_md5(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -345,10 +342,10 @@ def test_append_block_from_url_and_validate_content_md5(self, resource_group, lo source_content_md5=StorageContentValidation.get_content_md5( b"POTATO")) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_source_if_modified(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_source_if_modified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -390,10 +387,10 @@ def test_append_block_from_url_with_source_if_modified(self, resource_group, loc source_if_modified_since=source_blob_properties.get( 'last_modified')) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_source_if_unmodified(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_source_if_unmodified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -435,10 +432,10 @@ def test_append_block_from_url_with_source_if_unmodified(self, resource_group, l if_unmodified_since=source_blob_properties.get('last_modified') - timedelta( hours=15)) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_source_if_match(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_source_if_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -480,10 +477,10 @@ def test_append_block_from_url_with_source_if_match(self, resource_group, locati source_etag='0x111111111111111', source_match_condition=MatchConditions.IfNotModified) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_source_if_none_match(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_source_if_none_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -525,10 +522,10 @@ def test_append_block_from_url_with_source_if_none_match(self, resource_group, l source_etag=source_blob_properties.get('etag'), source_match_condition=MatchConditions.IfModified) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_if_match(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_if_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -573,10 +570,10 @@ def test_append_block_from_url_with_if_match(self, resource_group, location, sto etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_if_none_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -616,10 +613,10 @@ def test_append_block_from_url_with_if_none_match(self, resource_group, location etag=destination_blob_properties.get('etag'), match_condition=MatchConditions.IfModified) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_maxsize_condition(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_maxsize_condition(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -658,10 +655,10 @@ def test_append_block_from_url_with_maxsize_condition(self, resource_group, loca source_offset=0, source_length=LARGE_BLOB_SIZE, maxsize_condition=LARGE_BLOB_SIZE + 1) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_appendpos_condition(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_appendpos_condition(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -700,10 +697,10 @@ def test_append_block_from_url_with_appendpos_condition(self, resource_group, lo source_offset=0, source_length=LARGE_BLOB_SIZE, appendpos_condition=0) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_if_modified(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_if_modified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -744,10 +741,10 @@ def test_append_block_from_url_with_if_modified(self, resource_group, location, if_modified_since=destination_blob_properties.get( 'last_modified')) - @GlobalStorageAccountPreparer() - def test_append_block_from_url_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url_with_if_unmodified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(source_blob_data, bsc) @@ -788,9 +785,9 @@ def test_append_block_from_url_with_if_unmodified(self, resource_group, location if_unmodified_since=source_properties.get( 'last_modified') - timedelta(minutes=15)) - @GlobalStorageAccountPreparer() - def test_create_append_blob_with_no_overwrite(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_create_append_blob_with_no_overwrite(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob_name = self._get_blob_reference() blob = bsc.get_blob_client( @@ -823,9 +820,9 @@ def test_create_append_blob_with_no_overwrite(self, resource_group, location, st self.assertEqual(props.metadata, {'blobdata': 'Data1'}) self.assertEqual(props.size, LARGE_BLOB_SIZE + LARGE_BLOB_SIZE + 512) - @GlobalStorageAccountPreparer() - def test_create_append_blob_with_overwrite(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_create_append_blob_with_overwrite(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob_name = self._get_blob_reference() blob = bsc.get_blob_client( @@ -856,9 +853,9 @@ def test_create_append_blob_with_overwrite(self, resource_group, location, stora self.assertEqual(props.blob_type, BlobType.AppendBlob) self.assertEqual(props.size, LARGE_BLOB_SIZE + 512) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -872,9 +869,9 @@ def test_append_blob_from_bytes(self, resource_group, location, storage_account, self.assertEqual(blob_properties.etag, append_resp['etag']) self.assertEqual(blob_properties.last_modified, append_resp['last_modified']) - @GlobalStorageAccountPreparer() - def test_append_blob_from_0_bytes(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_0_bytes(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -888,9 +885,9 @@ def test_append_blob_from_0_bytes(self, resource_group, location, storage_accoun self.assertIsNone(append_resp.get('etag')) self.assertIsNone(append_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_progress(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_progress(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = b'abcdefghijklmnopqrstuvwxyz' @@ -909,9 +906,9 @@ def progress_gen(upload): self.assertBlobEqual(blob, data) self.assert_upload_progress(len(data), self.config.max_block_size, progress) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_index(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_index(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -922,10 +919,9 @@ def test_append_blob_from_bytes_with_index(self, resource_group, location, stora # Assert self.assertBlobEqual(blob, data[3:]) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_index_and_count(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_index_and_count(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -936,10 +932,9 @@ def test_append_blob_from_bytes_with_index_and_count(self, resource_group, locat # Assert self.assertBlobEqual(blob, data[3:8]) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_chunked_upload(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_chunked_upload(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -953,10 +948,9 @@ def test_append_blob_from_bytes_chunked_upload(self, resource_group, location, s self.assertEqual(blob_properties.etag, append_resp['etag']) self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_progress_chunked_upload(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_progress_chunked_upload(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -981,10 +975,9 @@ def progress_gen(upload): self.assertBlobEqual(blob, data) self.assert_upload_progress(len(data), self.config.max_block_size, progress) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_chunked_upload_with_index_and_count(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_chunked_upload_with_index_and_count(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -997,9 +990,9 @@ def test_append_blob_from_bytes_chunked_upload_with_index_and_count(self, resour # Assert self.assertBlobEqual(blob, data[index:index + blob_size]) - @GlobalStorageAccountPreparer() - def test_append_blob_from_path_chunked_upload(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_path_chunked_upload(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1019,10 +1012,9 @@ def test_append_blob_from_path_chunked_upload(self, resource_group, location, st self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_append_blob_from_path_with_progress_chunked_upload(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_path_with_progress_chunked_upload(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1054,10 +1046,9 @@ def progress_gen(upload): self.assert_upload_progress(len(data), self.config.max_block_size, progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_append_blob_from_stream_chunked_upload(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_stream_chunked_upload(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1076,10 +1067,9 @@ def test_append_blob_from_stream_chunked_upload(self, resource_group, location, self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_app_blob_from_stream_nonseekable_chnked_upload_known_size(self, resource_group, location, - storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_app_blob_from_stream_nonseekable_chnked_upload_known_size(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1097,10 +1087,9 @@ def test_app_blob_from_stream_nonseekable_chnked_upload_known_size(self, resourc self.assertBlobEqual(blob, data[:blob_size]) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_app_blob_from_stream_nonseekable_chnked_upload_unk_size(self, resource_group, location, - storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_app_blob_from_stream_nonseekable_chnked_upload_unk_size(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1117,10 +1106,9 @@ def test_app_blob_from_stream_nonseekable_chnked_upload_unk_size(self, resource_ self.assertBlobEqual(blob, data) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_append_blob_from_stream_with_multiple_appends(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_stream_with_multiple_appends(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1141,10 +1129,9 @@ def test_append_blob_from_stream_with_multiple_appends(self, resource_group, loc self.assertBlobEqual(blob, data) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_append_blob_from_stream_chunked_upload_with_count(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_stream_chunked_upload_with_count(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1162,11 +1149,10 @@ def test_append_blob_from_stream_chunked_upload_with_count(self, resource_group, self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_append_blob_from_stream_chunked_upload_with_count_parallel(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_append_blob_from_stream_chunked_upload_with_count_parallel(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1186,9 +1172,9 @@ def test_append_blob_from_stream_chunked_upload_with_count_parallel(self, resour self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_append_blob_from_text(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_text(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) text = u'hello 啊齄丂狛狜 world' @@ -1203,9 +1189,9 @@ def test_append_blob_from_text(self, resource_group, location, storage_account, self.assertEqual(blob_properties.etag, append_resp.get('etag')) self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_append_blob_from_text_with_encoding(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_text_with_encoding(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) text = u'hello 啊齄丂狛狜 world' @@ -1217,10 +1203,9 @@ def test_append_blob_from_text_with_encoding(self, resource_group, location, sto # Assert self.assertBlobEqual(blob, data) - @GlobalStorageAccountPreparer() - def test_append_blob_from_text_with_encoding_and_progress(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_text_with_encoding_and_progress(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) text = u'hello 啊齄丂狛狜 world' @@ -1239,9 +1224,9 @@ def progress_gen(upload): # Assert self.assert_upload_progress(len(data), self.config.max_block_size, progress) - @GlobalStorageAccountPreparer() - def test_append_blob_from_text_chunked_upload(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_text_chunked_upload(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = self.get_random_text_data(LARGE_BLOB_SIZE) @@ -1253,9 +1238,9 @@ def test_append_blob_from_text_chunked_upload(self, resource_group, location, st # Assert self.assertBlobEqual(blob, encoded_data) - @GlobalStorageAccountPreparer() - def test_append_blob_with_md5(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_with_md5(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) data = b'hello world' @@ -1265,9 +1250,9 @@ def test_append_blob_with_md5(self, resource_group, location, storage_account, s # Assert - @GlobalStorageAccountPreparer() - def test_seal_append_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_seal_append_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) resp = blob.seal_append_blob() @@ -1281,9 +1266,9 @@ def test_seal_append_blob(self, resource_group, location, storage_account, stora self.assertEqual(prop.metadata['isseal'], 'yes') - @GlobalStorageAccountPreparer() - def test_seal_append_blob_with_append_condition(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_seal_append_blob_with_append_condition(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) with self.assertRaises(HttpResponseError): @@ -1292,9 +1277,9 @@ def test_seal_append_blob_with_append_condition(self, resource_group, location, resp = blob.seal_append_blob(appendpos_condition=0) self.assertTrue(resp['blob_sealed']) - @GlobalStorageAccountPreparer() - def test_copy_sealed_blob_will_get_a_sealed_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_copy_sealed_blob_will_get_a_sealed_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -1308,9 +1293,9 @@ def test_copy_sealed_blob_will_get_a_sealed_blob(self, resource_group, location, with self.assertRaises(HttpResponseError): copied_blob.append_block("abc") - @GlobalStorageAccountPreparer() - def test_copy_unsealed_blob_will_get_a_sealed_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_copy_unsealed_blob_will_get_a_sealed_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -1328,9 +1313,9 @@ def test_copy_unsealed_blob_will_get_a_sealed_blob(self, resource_group, locatio if blob.name == "copiedblob2": self.assertTrue(blob.is_append_blob_sealed) - @GlobalStorageAccountPreparer() - def test_copy_sealed_blob_with_seal_blob_will_get_a_sealed_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_copy_sealed_blob_with_seal_blob_will_get_a_sealed_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -1343,10 +1328,9 @@ def test_copy_sealed_blob_with_seal_blob_will_get_a_sealed_blob(self, resource_g self.assertIsNone(prop.is_append_blob_sealed) copied_blob3.append_block("abc") - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - def test_create_append_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + def test_create_append_blob_with_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + bsc = BlobServiceClient(self.account_url(versioned_storage_account_name, "blob"), versioned_storage_account_key, max_block_size=4 * 1024) self._setup(bsc) container_name = self.get_resource_name('vlwcontainer') @@ -1356,7 +1340,7 @@ def test_create_append_blob_with_immutability_policy(self, resource_group, locat mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -1380,6 +1364,6 @@ def test_create_append_blob_with_immutability_policy(self, resource_group, locat blob.delete_immutability_policy() blob.set_legal_hold(False) blob.delete_blob() - mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-blob/tests/test_append_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_append_blob_async.py index 0d64f29bf209..a2b7e6bc7663 100644 --- a/sdk/storage/azure-storage-blob/tests/test_append_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_append_blob_async.py @@ -33,7 +33,7 @@ ContainerClient, BlobClient, ) -from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer, StorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -111,10 +111,10 @@ def read(self, count): return self.wrapped_file.read(count) # --Test cases for append blobs -------------------------------------------- - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_oauth(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_oauth(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = await self._create_source_blob(source_blob_data, bsc) @@ -131,9 +131,9 @@ async def test_append_block_from_url_with_oauth(self, resource_group, location, destination_blob_data = await destination_blob.readall() self.assertEqual(source_blob_data, destination_blob_data) - @GlobalStorageAccountPreparer() - async def test_create_blob_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_create_blob_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob_name = self._get_blob_reference() @@ -149,10 +149,10 @@ async def test_create_blob_async(self, resource_group, location, storage_account self.assertEqual(blob_properties.last_modified, create_resp.get('last_modified')) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_using_vid(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + async def test_get_blob_properties_using_vid(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob_name = self._get_blob_reference() @@ -169,11 +169,10 @@ async def test_get_blob_properties_using_vid(self, resource_group, location, sto self.assertEqual(blob_properties.etag, create_resp.get('etag')) self.assertEqual(blob_properties.last_modified, create_resp.get('last_modified')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_lease_id_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + async def test_create_blob_with_lease_id_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -188,10 +187,9 @@ async def test_create_blob_with_lease_id_async(self, resource_group, location, s self.assertEqual(blob_properties.etag, create_resp.get('etag')) self.assertEqual(blob_properties.last_modified, create_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - async def test_create_blob_with_metadata_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_create_blob_with_metadata_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) metadata = {'hello': 'world', 'number': '42'} @@ -205,9 +203,9 @@ async def test_create_blob_with_metadata_async(self, resource_group, location, s md = await blob.get_blob_properties() self.assertDictEqual(md.metadata, metadata) - @GlobalStorageAccountPreparer() - async def test_append_block_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_block_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -223,9 +221,9 @@ async def test_append_block_async(self, resource_group, location, storage_accoun # Assert await self.assertBlobEqual(blob, b'block 0block 1block 2block 3block 4') - @GlobalStorageAccountPreparer() - async def test_append_block_unicode_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_block_unicode_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -239,11 +237,10 @@ async def test_append_block_unicode_async(self, resource_group, location, storag # Assert - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + async def test_append_block_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), blob_storage_account_key, max_block_size=4 * 1024) await self._setup(bsc) tags = {"tag1 name": "my tag", "tag2": "secondtag", "tag3": "thirdtag"} @@ -257,9 +254,9 @@ async def test_append_block_with_if_tags(self, resource_group, location, storage self.assertIsNotNone(resp['etag']) self.assertIsNotNone(resp['last_modified']) - @GlobalStorageAccountPreparer() - async def test_append_block_with_md5_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_block_with_md5_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -273,11 +270,10 @@ async def test_append_block_with_md5_async(self, resource_group, location, stora # Assert - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - async def test_append_block_from_url_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_async(self, blob_storage_account_name, blob_storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), blob_storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -332,10 +328,10 @@ async def test_append_block_from_url_async(self, resource_group, location, stora await destination_blob_client.append_block_from_url(source_blob_client.url + '?' + sas, source_length=LARGE_BLOB_SIZE) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_and_validate_content_md5_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_and_validate_content_md5_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -373,10 +369,10 @@ async def test_append_block_from_url_and_validate_content_md5_async(self, resour source_content_md5=StorageContentValidation.get_content_md5( b"POTATO")) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_source_if_modified_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_source_if_modified_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -419,10 +415,10 @@ async def test_append_block_from_url_with_source_if_modified_async(self, resourc source_if_modified_since=source_blob_properties.get( 'last_modified')) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_source_if_unmodified_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_source_if_unmodified_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -466,10 +462,10 @@ async def test_append_block_from_url_with_source_if_unmodified_async(self, resou if_unmodified_since=source_blob_properties.get('last_modified') - timedelta( hours=15)) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_source_if_match_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_source_if_match_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -512,10 +508,10 @@ async def test_append_block_from_url_with_source_if_match_async(self, resource_g source_etag='0x111111111111111', source_match_condition=MatchConditions.IfNotModified) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_source_if_none_match_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_source_if_none_match_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -558,10 +554,10 @@ async def test_append_block_from_url_with_source_if_none_match_async(self, resou source_etag=source_properties.get('etag'), source_match_condition=MatchConditions.IfModified) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_if_match_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_if_match_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -607,10 +603,10 @@ async def test_append_block_from_url_with_if_match_async(self, resource_group, l etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_if_none_match_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_if_none_match_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -652,10 +648,10 @@ async def test_append_block_from_url_with_if_none_match_async(self, resource_gro etag=destination_blob_properties.get('etag'), match_condition=MatchConditions.IfModified) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_maxsize_condition_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_maxsize_condition_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -696,10 +692,10 @@ async def test_append_block_from_url_with_maxsize_condition_async(self, resource source_length=LARGE_BLOB_SIZE, maxsize_condition=LARGE_BLOB_SIZE + 1) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_appendpos_condition_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_appendpos_condition_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -740,10 +736,10 @@ async def test_append_block_from_url_with_appendpos_condition_async(self, resour source_length=LARGE_BLOB_SIZE, appendpos_condition=0) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_if_modified_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_if_modified_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -786,10 +782,10 @@ async def test_append_block_from_url_with_if_modified_async(self, resource_group if_modified_since=destination_blob_properties.get( 'last_modified')) - @GlobalStorageAccountPreparer() - async def test_append_block_from_url_with_if_unmodified_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_append_block_from_url_with_if_unmodified_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -832,10 +828,9 @@ async def test_append_block_from_url_with_if_unmodified_async(self, resource_gro if_unmodified_since=destination_blob_properties.get( 'last_modified') - timedelta(minutes=15)) - @GlobalStorageAccountPreparer() - async def test_create_append_blob_with_no_overwrite_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_create_append_blob_with_no_overwrite_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob_name = self._get_blob_reference() @@ -869,10 +864,9 @@ async def test_create_append_blob_with_no_overwrite_async(self, resource_group, self.assertEqual(props.metadata, {'blobdata': 'Data1'}) self.assertEqual(props.size, LARGE_BLOB_SIZE + LARGE_BLOB_SIZE + 512) - @GlobalStorageAccountPreparer() - async def test_create_append_blob_with_overwrite_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_create_append_blob_with_overwrite_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob_name = self._get_blob_reference() @@ -904,9 +898,9 @@ async def test_create_append_blob_with_overwrite_async(self, resource_group, loc self.assertEqual(props.blob_type, BlobType.AppendBlob) self.assertEqual(props.size, LARGE_BLOB_SIZE + 512) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_bytes_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_bytes_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -921,9 +915,9 @@ async def test_append_blob_from_bytes_async(self, resource_group, location, stor self.assertEqual(blob_properties.etag, append_resp['etag']) self.assertEqual(blob_properties.last_modified, append_resp['last_modified']) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_0_bytes_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_0_bytes_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -938,10 +932,9 @@ async def test_append_blob_from_0_bytes_async(self, resource_group, location, st self.assertIsNone(append_resp.get('etag')) self.assertIsNone(append_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_bytes_with_progress_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_bytes_with_progress_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -961,10 +954,9 @@ def progress_gen(upload): await self.assertBlobEqual(blob, data) self.assert_upload_progress(len(data), self.config.max_block_size, progress) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_bytes_with_index_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_bytes_with_index_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -976,10 +968,9 @@ async def test_append_blob_from_bytes_with_index_async(self, resource_group, loc # Assert await self.assertBlobEqual(blob, data[3:]) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_bytes_with_index_and_count_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_bytes_with_index_and_count_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -991,10 +982,9 @@ async def test_append_blob_from_bytes_with_index_and_count_async(self, resource_ # Assert await self.assertBlobEqual(blob, data[3:8]) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_bytes_chunked_upload_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_bytes_chunked_upload_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1009,10 +999,9 @@ async def test_append_blob_from_bytes_chunked_upload_async(self, resource_group, self.assertEqual(blob_properties.etag, append_resp['etag']) self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - async def test_app_blob_from_bytes_progress_chnked_upload_async(self, resource_group, location, - storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_app_blob_from_bytes_progress_chnked_upload_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1038,11 +1027,9 @@ def progress_gen(upload): await self.assertBlobEqual(blob, data) self.assert_upload_progress(len(data), self.config.max_block_size, progress) - @GlobalStorageAccountPreparer() - async def test_appblob_frm_bytes_chnked_upload_w_idx_n_count_async(self, resource_group, location, - storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_appblob_frm_bytes_chnked_upload_w_idx_n_count_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1056,10 +1043,9 @@ async def test_appblob_frm_bytes_chnked_upload_w_idx_n_count_async(self, resourc # Assert await self.assertBlobEqual(blob, data[index:index + blob_size]) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_path_chunked_upload_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_path_chunked_upload_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1080,10 +1066,9 @@ async def test_append_blob_from_path_chunked_upload_async(self, resource_group, self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_path_with_progress_chunked_upload_async(self, resource_group, location, - storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_path_with_progress_chunked_upload_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1116,10 +1101,9 @@ def progress_gen(upload): self.assert_upload_progress(len(data), self.config.max_block_size, progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_stream_chunked_upload_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_stream_chunked_upload_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1139,11 +1123,9 @@ async def test_append_blob_from_stream_chunked_upload_async(self, resource_group self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_stream_non_seekable_chunked_upload_known_size_async(self, resource_group, location, - storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_stream_non_seekable_chunked_upload_known_size_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1162,11 +1144,9 @@ async def test_append_blob_from_stream_non_seekable_chunked_upload_known_size_as await self.assertBlobEqual(blob, data[:blob_size]) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_stream_non_seekable_chunked_upload_unknown_size_async(self, resource_group, - location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_stream_non_seekable_chunked_upload_unknown_size_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1184,10 +1164,9 @@ async def test_append_blob_from_stream_non_seekable_chunked_upload_unknown_size_ await self.assertBlobEqual(blob, data) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_stream_with_multiple_appends_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_stream_with_multiple_appends_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1209,10 +1188,9 @@ async def test_append_blob_from_stream_with_multiple_appends_async(self, resourc await self.assertBlobEqual(blob, data) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_stream_chunked_upload_with_count_async(self, resource_group, location, - storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_stream_chunked_upload_with_count_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1231,12 +1209,10 @@ async def test_append_blob_from_stream_chunked_upload_with_count_async(self, res self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - async def test_append_blob_from_stream_chunked_upload_with_count_parallel_async(self, resource_group, location, - storage_account, - storage_account_key): + @BlobPreparer() + async def test_append_blob_from_stream_chunked_upload_with_count_parallel_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1257,9 +1233,9 @@ async def test_append_blob_from_stream_chunked_upload_with_count_parallel_async( self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_text_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_text_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1275,10 +1251,9 @@ async def test_append_blob_from_text_async(self, resource_group, location, stora self.assertEqual(blob_properties.etag, append_resp.get('etag')) self.assertEqual(blob_properties.last_modified, append_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_text_with_encoding_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_text_with_encoding_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1291,10 +1266,9 @@ async def test_append_blob_from_text_with_encoding_async(self, resource_group, l # Assert await self.assertBlobEqual(blob, data) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_text_with_encoding_and_progress_async(self, resource_group, location, - storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_text_with_encoding_and_progress_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1314,10 +1288,9 @@ def progress_gen(upload): # Assert self.assert_upload_progress(len(data), self.config.max_block_size, progress) - @GlobalStorageAccountPreparer() - async def test_append_blob_from_text_chunked_upload_async(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_from_text_chunked_upload_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1330,9 +1303,9 @@ async def test_append_blob_from_text_chunked_upload_async(self, resource_group, # Assert await self.assertBlobEqual(blob, encoded_data) - @GlobalStorageAccountPreparer() - async def test_append_blob_with_md5_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024, + @BlobPreparer() + async def test_append_blob_with_md5_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1341,10 +1314,10 @@ async def test_append_blob_with_md5_async(self, resource_group, location, storag # Act await blob.append_block(data, validate_content=True) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_seal_append_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + async def test_seal_append_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) await self._setup(bsc) blob = await self._create_blob(bsc) resp = await blob.seal_append_blob() @@ -1358,10 +1331,10 @@ async def test_seal_append_blob(self, resource_group, location, storage_account, self.assertEqual(prop.metadata['isseal'], 'yes') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_seal_append_blob_with_append_condition(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + async def test_seal_append_blob_with_append_condition(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) await self._setup(bsc) blob = await self._create_blob(bsc) with self.assertRaises(HttpResponseError): @@ -1370,11 +1343,10 @@ async def test_seal_append_blob_with_append_condition(self, resource_group, loca resp = await blob.seal_append_blob(appendpos_condition=0) self.assertTrue(resp['blob_sealed']) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_sealed_blob_will_get_a_sealed_blob(self, resource_group, location, storage_account, - storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + async def test_copy_sealed_blob_will_get_a_sealed_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1388,10 +1360,10 @@ async def test_copy_sealed_blob_will_get_a_sealed_blob(self, resource_group, loc with self.assertRaises(HttpResponseError): await copied_blob.append_block("abc") - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_unsealed_blob_will_get_a_sealed_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + async def test_copy_unsealed_blob_will_get_a_sealed_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1409,10 +1381,10 @@ async def test_copy_unsealed_blob_will_get_a_sealed_blob(self, resource_group, l if blob.name == "copiedblob2": self.assertTrue(blob.is_append_blob_sealed) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_sealed_blob_with_seal_blob_will_get_a_sealed_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + async def test_copy_sealed_blob_with_seal_blob_will_get_a_sealed_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_block_size=4 * 1024) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1426,10 +1398,9 @@ async def test_copy_sealed_blob_with_seal_blob_will_get_a_sealed_blob(self, reso self.assertIsNone(prop.is_append_blob_sealed) await copied_blob3.append_block("abc") - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - async def test_create_append_blob_with_immutability_policy_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, max_block_size=4 * 1024) + @BlobPreparer() + async def test_create_append_blob_with_immutability_policy_async(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + bsc = BlobServiceClient(self.account_url(versioned_storage_account_name, "blob"), versioned_storage_account_key, max_block_size=4 * 1024) await self._setup(bsc) container_name = self.get_resource_name('vlwcontainerasync') @@ -1439,7 +1410,7 @@ async def test_create_append_blob_with_immutability_policy_async(self, resource_ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + await mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -1463,6 +1434,6 @@ async def test_create_append_blob_with_immutability_policy_async(self, resource_ await blob.delete_immutability_policy() await blob.set_legal_hold(False) await blob.delete_blob() - await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + await mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_access_conditions.py b/sdk/storage/azure-storage-blob/tests/test_blob_access_conditions.py index 4965bf819bb1..199cc5b11ef2 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_access_conditions.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_access_conditions.py @@ -30,7 +30,7 @@ AccountSasPermissions, generate_container_sas, ContainerClient, CustomerProvidedEncryptionKey, ) from fake_credentials import CPK_KEY_HASH, CPK_KEY_VALUE -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -71,11 +71,11 @@ def _create_container_and_append_blob(self, container_name, blob_name, bsc): return container, blob # --Test cases for blob service -------------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() def test_get_blob_service_client_from_container( - self, resource_group, location, storage_account, storage_account_key): + self, storage_account_name, storage_account_key): bsc1 = BlobServiceClient( - self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container_client1 = self._create_container(self.container_name, bsc1) container_client1.get_container_properties() @@ -101,10 +101,10 @@ def test_get_blob_service_client_from_container( cc2_md1 = container_client2.get_container_properties().metadata self.assertDictEqual(cc2_md1, cc1_md1) - @GlobalStorageAccountPreparer() - def test_get_container_client_from_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_container_client_from_blob(self, storage_account_name, storage_account_key): bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container_client1 = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) @@ -136,9 +136,9 @@ def test_get_container_client_from_blob(self, resource_group, location, storage_ self.assertEqual(blob_client1_data, blob_client2_data) - @GlobalStorageAccountPreparer() - def test_set_container_metadata_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_container_metadata_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -152,9 +152,9 @@ def test_set_container_metadata_with_if_modified(self, resource_group, location, md = container.get_container_properties().metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() - def test_set_container_metadata_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_container_metadata_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -168,9 +168,9 @@ def test_set_container_metadata_with_if_modified_fail(self, resource_group, loca # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_container_acl_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -186,9 +186,9 @@ def test_set_container_acl_with_if_modified(self, resource_group, location, stor acl = container.get_container_access_policy() self.assertIsNotNone(acl) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_container_acl_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -204,9 +204,9 @@ def test_set_container_acl_with_if_modified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_container_acl_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -222,9 +222,9 @@ def test_set_container_acl_with_if_unmodified(self, resource_group, location, st acl = container.get_container_access_policy() self.assertIsNotNone(acl) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_container_acl_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -240,9 +240,9 @@ def test_set_container_acl_with_if_unmodified_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_lease_container_acquire_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_container_acquire_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -254,9 +254,9 @@ def test_lease_container_acquire_with_if_modified(self, resource_group, location # Assert - @GlobalStorageAccountPreparer() - def test_lease_container_acquire_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_container_acquire_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -269,9 +269,9 @@ def test_lease_container_acquire_with_if_modified_fail(self, resource_group, loc # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_lease_container_acquire_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_container_acquire_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -283,9 +283,9 @@ def test_lease_container_acquire_with_if_unmodified(self, resource_group, locati # Assert - @GlobalStorageAccountPreparer() - def test_lease_container_acquire_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_container_acquire_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -298,9 +298,9 @@ def test_lease_container_acquire_with_if_unmodified_fail(self, resource_group, l # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_delete_container_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_container_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -313,9 +313,9 @@ def test_delete_container_with_if_modified(self, resource_group, location, stora with self.assertRaises(ResourceNotFoundError): container.get_container_properties() - @GlobalStorageAccountPreparer() - def test_delete_container_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_container_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -327,9 +327,9 @@ def test_delete_container_with_if_modified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_delete_container_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_container_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -341,9 +341,9 @@ def test_delete_container_with_if_unmodified(self, resource_group, location, sto with self.assertRaises(ResourceNotFoundError): container.get_container_properties() - @GlobalStorageAccountPreparer() - def test_delete_container_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_container_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container = self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -354,8 +354,8 @@ def test_delete_container_with_if_unmodified_fail(self, resource_group, location self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_multi_put_block_contains_headers(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_multi_put_block_contains_headers(self, storage_account_name, storage_account_key): counter = list() def _validate_headers(request): @@ -364,7 +364,7 @@ def _validate_headers(request): self.assertEqual(header, 'test_value') bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), storage_account_key, max_single_put_size=100, max_block_size=50) + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=100, max_block_size=50) self._setup() data = self.get_random_bytes(2 * 100) self._create_container(self.container_name, bsc) @@ -376,9 +376,9 @@ def _validate_headers(request): ) self.assertEqual(len(counter), 5) - @GlobalStorageAccountPreparer() - def test_put_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() data = b'hello world' container, blob = self._create_container_and_block_blob( @@ -392,9 +392,9 @@ def test_put_blob_with_if_modified(self, resource_group, location, storage_accou # Assert self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() - def test_put_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() data = b'hello world' container, blob = self._create_container_and_block_blob( @@ -409,9 +409,9 @@ def test_put_blob_with_if_modified_fail(self, resource_group, location, storage_ # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_put_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() data = b'hello world' container, blob = self._create_container_and_block_blob( @@ -425,9 +425,9 @@ def test_put_blob_with_if_unmodified(self, resource_group, location, storage_acc # Assert self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() - def test_put_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() data = b'hello world' container, blob = self._create_container_and_block_blob( @@ -442,9 +442,9 @@ def test_put_blob_with_if_unmodified_fail(self, resource_group, location, storag # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_put_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() data = b'hello world' container, blob = self._create_container_and_block_blob( @@ -462,9 +462,9 @@ def test_put_blob_with_if_match(self, resource_group, location, storage_account, with self.assertRaises(ValueError): blob.upload_blob(data, length=len(data), match_condition=MatchConditions.IfNotModified) - @GlobalStorageAccountPreparer() - def test_put_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() data = b'hello world' container, blob = self._create_container_and_block_blob( @@ -482,9 +482,9 @@ def test_put_blob_with_if_match_fail(self, resource_group, location, storage_acc # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_put_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() data = b'hello world' container, blob = self._create_container_and_block_blob( @@ -500,9 +500,9 @@ def test_put_blob_with_if_none_match(self, resource_group, location, storage_acc with self.assertRaises(ValueError): blob.upload_blob(data, length=len(data), match_condition=MatchConditions.IfModified) - @GlobalStorageAccountPreparer() - def test_put_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() data = b'hello world' container, blob = self._create_container_and_block_blob( @@ -516,9 +516,9 @@ def test_put_blob_with_if_none_match_fail(self, resource_group, location, storag # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -531,9 +531,9 @@ def test_get_blob_with_if_modified(self, resource_group, location, storage_accou # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() - def test_get_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -547,9 +547,9 @@ def test_get_blob_with_if_modified_fail(self, resource_group, location, storage_ # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -562,9 +562,9 @@ def test_get_blob_with_if_unmodified(self, resource_group, location, storage_acc # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() - def test_get_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -578,9 +578,9 @@ def test_get_blob_with_if_unmodified_fail(self, resource_group, location, storag # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -592,9 +592,9 @@ def test_get_blob_with_if_match(self, resource_group, location, storage_account, # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() - def test_get_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -606,9 +606,9 @@ def test_get_blob_with_if_match_fail(self, resource_group, location, storage_acc # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -619,9 +619,9 @@ def test_get_blob_with_if_none_match(self, resource_group, location, storage_acc # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() - def test_get_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -634,9 +634,9 @@ def test_get_blob_with_if_none_match_fail(self, resource_group, location, storag # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_set_blob_properties_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_properties_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -654,9 +654,9 @@ def test_set_blob_properties_with_if_modified(self, resource_group, location, st self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) - @GlobalStorageAccountPreparer() - def test_set_blob_properties_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_properties_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -673,9 +673,9 @@ def test_set_blob_properties_with_if_modified_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_set_blob_properties_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_properties_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -693,9 +693,9 @@ def test_set_blob_properties_with_if_unmodified(self, resource_group, location, self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) - @GlobalStorageAccountPreparer() - def test_set_blob_properties_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_properties_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -713,9 +713,9 @@ def test_set_blob_properties_with_if_unmodified_fail(self, resource_group, locat self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_get_properties_last_access_time(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + @BlobPreparer() + def test_get_properties_last_access_time(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob(self.container_name, 'blob1', b'hello world', bsc) @@ -730,9 +730,9 @@ def test_get_properties_last_access_time(self, resource_group, location, storage self.assertGreater(new_lat, lat) self.assertIsInstance(blob.download_blob().properties.last_accessed_on, datetime) - @GlobalStorageAccountPreparer() - def test_set_blob_properties_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_properties_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -750,9 +750,9 @@ def test_set_blob_properties_with_if_match(self, resource_group, location, stora self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) - @GlobalStorageAccountPreparer() - def test_set_blob_properties_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_properties_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -768,9 +768,9 @@ def test_set_blob_properties_with_if_match_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_set_blob_properties_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_properties_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -787,9 +787,9 @@ def test_set_blob_properties_with_if_none_match(self, resource_group, location, self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) - @GlobalStorageAccountPreparer() - def test_set_blob_properties_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_properties_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -806,9 +806,9 @@ def test_set_blob_properties_with_if_none_match_fail(self, resource_group, locat # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_properties_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_properties_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -825,9 +825,9 @@ def test_get_blob_properties_with_if_modified(self, resource_group, location, st self.assertEqual(properties.lease.status, 'unlocked') @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_if_blob_exists(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_if_blob_exists(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -855,11 +855,11 @@ def test_if_blob_exists(self, resource_group, location, storage_account, storage self.assertEqual(blob_snapshot.exists(), True) self.assertEqual(blob.exists(), True) - @GlobalStorageAccountPreparer() - def test_if_blob_with_cpk_exists(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_if_blob_with_cpk_exists(self, storage_account_name, storage_account_key): container_name = self.get_resource_name("testcontainer1") cc = ContainerClient( - self.account_url(storage_account, "blob"), credential=storage_account_key, container_name=container_name, + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name=container_name, connection_data_block_size=4 * 1024) cc.create_container() self._setup() @@ -869,9 +869,9 @@ def test_if_blob_with_cpk_exists(self, resource_group, location, storage_account # Act self.assertTrue(blob_client.exists()) - @GlobalStorageAccountPreparer() - def test_get_blob_properties_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_properties_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -885,9 +885,9 @@ def test_get_blob_properties_with_if_modified_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_properties_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_properties_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -903,9 +903,9 @@ def test_get_blob_properties_with_if_unmodified(self, resource_group, location, self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') - @GlobalStorageAccountPreparer() - def test_get_blob_properties_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_properties_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -919,9 +919,9 @@ def test_get_blob_properties_with_if_unmodified_fail(self, resource_group, locat # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_properties_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_properties_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -937,9 +937,9 @@ def test_get_blob_properties_with_if_match(self, resource_group, location, stora self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') - @GlobalStorageAccountPreparer() - def test_get_blob_properties_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_properties_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -952,9 +952,9 @@ def test_get_blob_properties_with_if_match_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_properties_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_properties_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -969,9 +969,9 @@ def test_get_blob_properties_with_if_none_match(self, resource_group, location, self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') - @GlobalStorageAccountPreparer() - def test_get_blob_properties_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_properties_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -985,9 +985,9 @@ def test_get_blob_properties_with_if_none_match_fail(self, resource_group, locat # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_metadata_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_metadata_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1001,9 +1001,9 @@ def test_get_blob_metadata_with_if_modified(self, resource_group, location, stor # Assert self.assertIsNotNone(md) - @GlobalStorageAccountPreparer() - def test_get_blob_metadata_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_metadata_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1018,9 +1018,9 @@ def test_get_blob_metadata_with_if_modified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_metadata_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_metadata_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1034,9 +1034,9 @@ def test_get_blob_metadata_with_if_unmodified(self, resource_group, location, st # Assert self.assertIsNotNone(md) - @GlobalStorageAccountPreparer() - def test_get_blob_metadata_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_metadata_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1051,9 +1051,9 @@ def test_get_blob_metadata_with_if_unmodified_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_metadata_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_metadata_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1066,9 +1066,9 @@ def test_get_blob_metadata_with_if_match(self, resource_group, location, storage # Assert self.assertIsNotNone(md) - @GlobalStorageAccountPreparer() - def test_get_blob_metadata_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_metadata_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1081,9 +1081,9 @@ def test_get_blob_metadata_with_if_match_fail(self, resource_group, location, st # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_blob_metadata_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_metadata_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1095,9 +1095,9 @@ def test_get_blob_metadata_with_if_none_match(self, resource_group, location, st # Assert self.assertIsNotNone(md) - @GlobalStorageAccountPreparer() - def test_get_blob_metadata_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_blob_metadata_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1111,9 +1111,9 @@ def test_get_blob_metadata_with_if_none_match_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_set_blob_metadata_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_metadata_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1129,9 +1129,9 @@ def test_set_blob_metadata_with_if_modified(self, resource_group, location, stor md = blob.get_blob_properties().metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() - def test_set_blob_metadata_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_metadata_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1147,9 +1147,9 @@ def test_set_blob_metadata_with_if_modified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_set_blob_metadata_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_metadata_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1165,9 +1165,9 @@ def test_set_blob_metadata_with_if_unmodified(self, resource_group, location, st md = blob.get_blob_properties().metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() - def test_set_blob_metadata_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_metadata_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1183,9 +1183,9 @@ def test_set_blob_metadata_with_if_unmodified_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_set_blob_metadata_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_metadata_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1200,9 +1200,9 @@ def test_set_blob_metadata_with_if_match(self, resource_group, location, storage md = blob.get_blob_properties().metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() - def test_set_blob_metadata_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_metadata_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1216,9 +1216,9 @@ def test_set_blob_metadata_with_if_match_fail(self, resource_group, location, st # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_set_blob_metadata_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_metadata_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1232,9 +1232,9 @@ def test_set_blob_metadata_with_if_none_match(self, resource_group, location, st md = blob.get_blob_properties().metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() - def test_set_blob_metadata_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_set_blob_metadata_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1249,9 +1249,9 @@ def test_set_blob_metadata_with_if_none_match_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_delete_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() test_datetime = (datetime.utcnow() - timedelta(minutes=15)) @@ -1265,9 +1265,9 @@ def test_delete_blob_with_if_modified(self, resource_group, location, storage_ac # Assert self.assertIsNone(resp) - @GlobalStorageAccountPreparer() - def test_delete_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() test_datetime = (datetime.utcnow() + timedelta(minutes=15)) @@ -1282,9 +1282,9 @@ def test_delete_blob_with_if_modified_fail(self, resource_group, location, stora # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_delete_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() test_datetime = (datetime.utcnow() + timedelta(minutes=15)) @@ -1298,9 +1298,9 @@ def test_delete_blob_with_if_unmodified(self, resource_group, location, storage_ # Assert self.assertIsNone(resp) - @GlobalStorageAccountPreparer() - def test_delete_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() test_datetime = (datetime.utcnow() - timedelta(minutes=15)) @@ -1315,9 +1315,9 @@ def test_delete_blob_with_if_unmodified_fail(self, resource_group, location, sto # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_delete_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1331,9 +1331,9 @@ def test_delete_blob_with_if_match(self, resource_group, location, storage_accou # Assert self.assertIsNone(resp) - @GlobalStorageAccountPreparer() - def test_delete_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1346,9 +1346,9 @@ def test_delete_blob_with_if_match_fail(self, resource_group, location, storage_ # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_delete_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1360,9 +1360,9 @@ def test_delete_blob_with_if_none_match(self, resource_group, location, storage_ # Assert self.assertIsNone(resp) - @GlobalStorageAccountPreparer() - def test_delete_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_delete_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1376,9 +1376,9 @@ def test_delete_blob_with_if_none_match_fail(self, resource_group, location, sto # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_snapshot_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_snapshot_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1393,9 +1393,9 @@ def test_snapshot_blob_with_if_modified(self, resource_group, location, storage_ self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() - def test_snapshot_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_snapshot_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1410,9 +1410,9 @@ def test_snapshot_blob_with_if_modified_fail(self, resource_group, location, sto # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_snapshot_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_snapshot_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1427,9 +1427,9 @@ def test_snapshot_blob_with_if_unmodified(self, resource_group, location, storag self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() - def test_snapshot_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_snapshot_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1444,9 +1444,9 @@ def test_snapshot_blob_with_if_unmodified_fail(self, resource_group, location, s # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_snapshot_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_snapshot_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1460,9 +1460,9 @@ def test_snapshot_blob_with_if_match(self, resource_group, location, storage_acc self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() - def test_snapshot_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_snapshot_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1475,9 +1475,9 @@ def test_snapshot_blob_with_if_match_fail(self, resource_group, location, storag # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_snapshot_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_snapshot_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1490,9 +1490,9 @@ def test_snapshot_blob_with_if_none_match(self, resource_group, location, storag self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() - def test_snapshot_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_snapshot_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1506,9 +1506,9 @@ def test_snapshot_blob_with_if_none_match_fail(self, resource_group, location, s # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1528,9 +1528,9 @@ def test_lease_blob_with_if_modified(self, resource_group, location, storage_acc self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1545,9 +1545,9 @@ def test_lease_blob_with_if_modified_fail(self, resource_group, location, storag # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1567,9 +1567,9 @@ def test_lease_blob_with_if_unmodified(self, resource_group, location, storage_a self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1584,9 +1584,9 @@ def test_lease_blob_with_if_unmodified_fail(self, resource_group, location, stor # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1607,9 +1607,9 @@ def test_lease_blob_with_if_match(self, resource_group, location, storage_accoun self.assertIsNotNone(lease.etag) self.assertEqual(lease.etag, etag) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1622,9 +1622,9 @@ def test_lease_blob_with_if_match_fail(self, resource_group, location, storage_a # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1643,9 +1643,9 @@ def test_lease_blob_with_if_none_match(self, resource_group, location, storage_a self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_lease_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1659,9 +1659,9 @@ def test_lease_blob_with_if_none_match_fail(self, resource_group, location, stor # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_put_block_list_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1680,9 +1680,9 @@ def test_put_block_list_with_if_modified(self, resource_group, location, storage self.assertEqual(content.readall(), b'AAABBBCCC') @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_put_block_list_returns_vid(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_returns_vid(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1701,9 +1701,9 @@ def test_put_block_list_returns_vid(self, resource_group, location, storage_acco content = blob.download_blob() self.assertEqual(content.readall(), b'AAABBBCCC') - @GlobalStorageAccountPreparer() - def test_put_block_list_with_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_with_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1724,9 +1724,9 @@ def test_put_block_list_with_metadata(self, resource_group, location, storage_ac self.assertEqual(content.readall(), b'AAABBBCCC') self.assertEqual(properties.metadata, metadata) - @GlobalStorageAccountPreparer() - def test_put_block_list_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1745,9 +1745,9 @@ def test_put_block_list_with_if_modified_fail(self, resource_group, location, st # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_put_block_list_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1765,9 +1765,9 @@ def test_put_block_list_with_if_unmodified(self, resource_group, location, stora content = blob.download_blob() self.assertEqual(content.readall(), b'AAABBBCCC') - @GlobalStorageAccountPreparer() - def test_put_block_list_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1786,9 +1786,9 @@ def test_put_block_list_with_if_unmodified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_put_block_list_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1805,9 +1805,9 @@ def test_put_block_list_with_if_match(self, resource_group, location, storage_ac content = blob.download_blob() self.assertEqual(content.readall(), b'AAABBBCCC') - @GlobalStorageAccountPreparer() - def test_put_block_list_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1824,9 +1824,9 @@ def test_put_block_list_with_if_match_fail(self, resource_group, location, stora # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_put_block_list_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1842,9 +1842,9 @@ def test_put_block_list_with_if_none_match(self, resource_group, location, stora content = blob.download_blob() self.assertEqual(content.readall(), b'AAABBBCCC') - @GlobalStorageAccountPreparer() - def test_put_block_list_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_put_block_list_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1861,9 +1861,9 @@ def test_put_block_list_with_if_none_match_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_update_page_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_update_page_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1877,9 +1877,9 @@ def test_update_page_with_if_modified(self, resource_group, location, storage_ac # Assert - @GlobalStorageAccountPreparer() - def test_update_page_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_update_page_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1895,9 +1895,9 @@ def test_update_page_with_if_modified_fail(self, resource_group, location, stora # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_update_page_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_update_page_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1911,9 +1911,9 @@ def test_update_page_with_if_unmodified(self, resource_group, location, storage_ # Assert - @GlobalStorageAccountPreparer() - def test_update_page_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_update_page_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1929,9 +1929,9 @@ def test_update_page_with_if_unmodified_fail(self, resource_group, location, sto # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_update_page_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_update_page_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1944,9 +1944,9 @@ def test_update_page_with_if_match(self, resource_group, location, storage_accou # Assert - @GlobalStorageAccountPreparer() - def test_update_page_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_update_page_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1960,9 +1960,9 @@ def test_update_page_with_if_match_fail(self, resource_group, location, storage_ # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_update_page_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_update_page_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1974,9 +1974,9 @@ def test_update_page_with_if_none_match(self, resource_group, location, storage_ # Assert - @GlobalStorageAccountPreparer() - def test_update_page_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_update_page_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1991,9 +1991,9 @@ def test_update_page_with_if_none_match_fail(self, resource_group, location, sto # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_iter_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_iter_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2011,9 +2011,9 @@ def test_get_page_ranges_iter_with_if_modified(self, resource_group, location, s self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_iter_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_iter_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2030,9 +2030,9 @@ def test_get_page_ranges_iter_with_if_modified_fail(self, resource_group, locati # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_iter_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_iter_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2050,9 +2050,9 @@ def test_get_page_ranges_iter_with_if_unmodified(self, resource_group, location, self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_iter_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_iter_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2069,9 +2069,9 @@ def test_get_page_ranges_iter_with_if_unmodified_fail(self, resource_group, loca # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_iter_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_iter_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2088,9 +2088,9 @@ def test_get_page_ranges_iter_with_if_match(self, resource_group, location, stor self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_iter_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_iter_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2105,9 +2105,9 @@ def test_get_page_ranges_iter_with_if_match_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_iter_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_iter_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2123,9 +2123,9 @@ def test_get_page_ranges_iter_with_if_none_match(self, resource_group, location, self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_iter_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_iter_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2142,9 +2142,9 @@ def test_get_page_ranges_iter_with_if_none_match_fail(self, resource_group, loca # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_append_block_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() - @@ -2158,9 +2158,9 @@ def test_append_block_with_if_modified(self, resource_group, location, storage_a content = blob.download_blob().readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) - @GlobalStorageAccountPreparer() - def test_append_block_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() + @@ -2173,9 +2173,9 @@ def test_append_block_with_if_modified_fail(self, resource_group, location, stor # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_append_block_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() + @@ -2189,9 +2189,9 @@ def test_append_block_with_if_unmodified(self, resource_group, location, storage content = blob.download_blob().readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) - @GlobalStorageAccountPreparer() - def test_append_block_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() - @@ -2204,9 +2204,9 @@ def test_append_block_with_if_unmodified_fail(self, resource_group, location, st # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_append_block_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_append_blob(self.container_name, 'blob1', bsc) @@ -2220,9 +2220,9 @@ def test_append_block_with_if_match(self, resource_group, location, storage_acco content = blob.download_blob().readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) - @GlobalStorageAccountPreparer() - def test_append_block_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_append_blob(self.container_name, 'blob1', bsc) @@ -2234,9 +2234,9 @@ def test_append_block_with_if_match_fail(self, resource_group, location, storage # Assert #self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_append_block_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_append_blob(self.container_name, 'blob1', bsc) @@ -2249,9 +2249,9 @@ def test_append_block_with_if_none_match(self, resource_group, location, storage content = blob.download_blob().readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) - @GlobalStorageAccountPreparer() - def test_append_block_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_block_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container, blob = self._create_container_and_append_blob(self.container_name, 'blob1', bsc) @@ -2264,9 +2264,9 @@ def test_append_block_with_if_none_match_fail(self, resource_group, location, st # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() blob_name = self.get_resource_name("blob") container, blob = self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2280,9 +2280,9 @@ def test_append_blob_from_bytes_with_if_modified(self, resource_group, location, content = blob.download_blob().readall() self.assertEqual(data, content) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() blob_name = self.get_resource_name("blob") container, blob = self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2295,9 +2295,9 @@ def test_append_blob_from_bytes_with_if_modified_fail(self, resource_group, loca self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() blob_name = self.get_resource_name("blob") container, blob = self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2311,9 +2311,9 @@ def test_append_blob_from_bytes_with_if_unmodified(self, resource_group, locatio content = blob.download_blob().readall() self.assertEqual(data, content) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() blob_name = self.get_resource_name("blob") container, blob = self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2326,9 +2326,9 @@ def test_append_blob_from_bytes_with_if_unmodified_fail(self, resource_group, lo self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() blob_name = self.get_resource_name("blob") container, blob = self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2342,9 +2342,9 @@ def test_append_blob_from_bytes_with_if_match(self, resource_group, location, st content = blob.download_blob().readall() self.assertEqual(data, content) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() blob_name = self.get_resource_name("blob") container, blob = self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2357,9 +2357,9 @@ def test_append_blob_from_bytes_with_if_match_fail(self, resource_group, locatio self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() blob_name = self.get_resource_name("blob") container, blob = self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2373,9 +2373,9 @@ def test_append_blob_from_bytes_with_if_none_match(self, resource_group, locatio content = blob.download_blob().readall() self.assertEqual(data, content) - @GlobalStorageAccountPreparer() - def test_append_blob_from_bytes_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + @BlobPreparer() + def test_append_blob_from_bytes_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() blob_name = self.get_resource_name("blob") container, blob = self._create_container_and_append_blob(self.container_name, blob_name, bsc) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_access_conditions_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_access_conditions_async.py index 77507753e739..ce53cfe9ac19 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_access_conditions_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_access_conditions_async.py @@ -29,7 +29,7 @@ generate_container_sas, CustomerProvidedEncryptionKey, ) from fake_credentials import CPK_KEY_HASH, CPK_KEY_VALUE -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase from azure.storage.blob.aio import ( @@ -86,12 +86,12 @@ async def _create_container_and_append_blob(self, container_name, blob_name, bsc # --Test cases for blob service -------------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_get_blob_service_client_from_container( - self, resource_group, location, storage_account, storage_account_key): + self, storage_account_name, storage_account_key): bsc1 = BlobServiceClient( - self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container_client1 = await self._create_container(self.container_name, bsc1) await container_client1.get_container_properties() @@ -119,11 +119,11 @@ async def test_get_blob_service_client_from_container( cc2_md1 = cc2_props.metadata self.assertDictEqual(cc2_md1, cc1_md1) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_container_client_from_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_get_container_client_from_blob(self, storage_account_name, storage_account_key): bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() container_client1 = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - timedelta(minutes=15)) @@ -159,10 +159,10 @@ async def test_get_container_client_from_blob(self, resource_group, location, st self.assertEqual(blob_client1_data, blob_client2_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_metadata_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_container_metadata_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -176,10 +176,10 @@ async def test_set_container_metadata_with_if_modified(self, resource_group, loc md = (await container.get_container_properties()).metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_md_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_container_md_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -193,10 +193,10 @@ async def test_set_container_md_with_if_modified_fail(self, resource_group, loca # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -212,10 +212,10 @@ async def test_set_container_acl_with_if_modified(self, resource_group, location acl = await container.get_container_access_policy() self.assertIsNotNone(acl) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -231,10 +231,10 @@ async def test_set_container_acl_with_if_modified_fail(self, resource_group, loc # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -251,10 +251,10 @@ async def test_set_container_acl_with_if_unmodified(self, resource_group, locati self.assertIsNotNone(acl) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -270,10 +270,10 @@ async def test_set_container_acl_with_if_unmodified_fail(self, resource_group, l # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_acquire_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_container_acquire_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -285,10 +285,10 @@ async def test_lease_container_acquire_with_if_modified(self, resource_group, lo # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_cont_acquire_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_cont_acquire_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -301,10 +301,10 @@ async def test_lease_cont_acquire_with_if_modified_fail(self, resource_group, lo # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_acquire_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_container_acquire_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -316,10 +316,10 @@ async def test_lease_container_acquire_with_if_unmodified(self, resource_group, # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_acquire_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_container_acquire_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -332,10 +332,10 @@ async def test_lease_container_acquire_with_if_unmodified_fail(self, resource_gr # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_container_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_container_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -348,10 +348,10 @@ async def test_delete_container_with_if_modified(self, resource_group, location, with self.assertRaises(ResourceNotFoundError): await container.get_container_properties() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_container_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_container_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -362,10 +362,10 @@ async def test_delete_container_with_if_modified_fail(self, resource_group, loca # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_container_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_container_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() + @@ -377,10 +377,10 @@ async def test_delete_container_with_if_unmodified(self, resource_group, locatio with self.assertRaises(ResourceNotFoundError): await container.get_container_properties() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_container_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_container_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container = await self._create_container(self.container_name, bsc) test_datetime = (datetime.utcnow() - @@ -391,9 +391,9 @@ async def test_delete_container_with_if_unmodified_fail(self, resource_group, lo self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_multi_put_block_contains_headers(self, resource_group, location, storage_account, storage_account_key): + async def test_multi_put_block_contains_headers(self, storage_account_name, storage_account_key): counter = list() def _validate_headers(request): @@ -402,7 +402,7 @@ def _validate_headers(request): self.assertEqual(header, 'test_value') bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), storage_account_key, max_single_put_size=100, max_block_size=50) + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=100, max_block_size=50) self._setup() data = self.get_random_bytes(2 * 100) await self._create_container(self.container_name, bsc) @@ -414,10 +414,10 @@ def _validate_headers(request): ) self.assertEqual(len(counter), 5) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( @@ -431,10 +431,10 @@ async def test_put_blob_with_if_modified(self, resource_group, location, storage # Assert self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( @@ -449,10 +449,10 @@ async def test_put_blob_with_if_modified_fail(self, resource_group, location, st # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( @@ -466,10 +466,10 @@ async def test_put_blob_with_if_unmodified(self, resource_group, location, stora # Assert self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( @@ -484,10 +484,10 @@ async def test_put_blob_with_if_unmodified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( @@ -500,10 +500,10 @@ async def test_put_blob_with_if_match(self, resource_group, location, storage_ac # Assert self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( @@ -518,10 +518,10 @@ async def test_put_blob_with_if_match_fail(self, resource_group, location, stora # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( @@ -533,10 +533,10 @@ async def test_put_blob_with_if_none_match(self, resource_group, location, stora # Assert self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() data = b'hello world' container, blob = await self._create_container_and_block_blob( @@ -550,10 +550,10 @@ async def test_put_blob_with_if_none_match_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -567,10 +567,10 @@ async def test_get_blob_with_if_modified(self, resource_group, location, storage # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -584,10 +584,10 @@ async def test_get_blob_with_if_modified_fail(self, resource_group, location, st # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -601,10 +601,10 @@ async def test_get_blob_with_if_unmodified(self, resource_group, location, stora # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -618,10 +618,10 @@ async def test_get_blob_with_if_unmodified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -634,10 +634,10 @@ async def test_get_blob_with_if_match(self, resource_group, location, storage_ac # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -649,10 +649,10 @@ async def test_get_blob_with_if_match_fail(self, resource_group, location, stora # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -664,10 +664,10 @@ async def test_get_blob_with_if_none_match(self, resource_group, location, stora # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -680,10 +680,10 @@ async def test_get_blob_with_if_none_match_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_props_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_props_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -701,10 +701,10 @@ async def test_set_blob_props_with_if_modified(self, resource_group, location, s self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_props_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_props_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -721,10 +721,10 @@ async def test_set_blob_props_with_if_modified_fail(self, resource_group, locati # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_props_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_props_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -742,10 +742,10 @@ async def test_set_blob_props_with_if_unmodified(self, resource_group, location, self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_props_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_props_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -762,10 +762,10 @@ async def test_set_blob_props_with_if_unmodified_fail(self, resource_group, loca # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_props_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_props_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -783,10 +783,10 @@ async def test_set_blob_props_with_if_match(self, resource_group, location, stor self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_props_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_props_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -802,10 +802,10 @@ async def test_set_blob_props_with_if_match_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_props_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_props_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -822,10 +822,10 @@ async def test_set_blob_props_with_if_none_match(self, resource_group, location, self.assertEqual(content_settings.content_language, properties.content_settings.content_language) self.assertEqual(content_settings.content_disposition, properties.content_settings.content_disposition) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_props_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_props_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -843,10 +843,10 @@ async def test_set_blob_props_with_if_none_match_fail(self, resource_group, loca self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_if_blob_exists(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024) + async def test_if_blob_exists(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -876,12 +876,12 @@ async def test_if_blob_exists(self, resource_group, location, storage_account, s self.assertEqual(await blob_snapshot.exists(), True) self.assertEqual(await blob.exists(), True) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_if_blob_with_cpk_exists(self, resource_group, location, storage_account, storage_account_key): + async def test_if_blob_with_cpk_exists(self, storage_account_name, storage_account_key): container_name = self.get_resource_name("testcontainer1") cc = ContainerClient( - self.account_url(storage_account, "blob"), credential=storage_account_key, container_name=container_name, + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name=container_name, connection_data_block_size=4 * 1024) await cc.create_container() self._setup() @@ -891,10 +891,10 @@ async def test_if_blob_with_cpk_exists(self, resource_group, location, storage_a # Act self.assertTrue(await blob_client.exists()) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_properties_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -910,10 +910,10 @@ async def test_get_blob_properties_with_if_modified(self, resource_group, locati self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_properties_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -927,10 +927,10 @@ async def test_get_blob_properties_with_if_modified_fail(self, resource_group, l # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_properties_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -946,10 +946,10 @@ async def test_get_blob_properties_with_if_unmodified(self, resource_group, loca self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_properties_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -963,10 +963,10 @@ async def test_get_blob_properties_with_if_unmodified_fail(self, resource_group, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_properties_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -982,10 +982,10 @@ async def test_get_blob_properties_with_if_match(self, resource_group, location, self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_properties_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -998,10 +998,10 @@ async def test_get_blob_properties_with_if_match_fail(self, resource_group, loca # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_properties_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1016,10 +1016,10 @@ async def test_get_blob_properties_with_if_none_match(self, resource_group, loca self.assertEqual(properties.size, 11) self.assertEqual(properties.lease.status, 'unlocked') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_properties_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1033,10 +1033,10 @@ async def test_get_blob_properties_with_if_none_match_fail(self, resource_group, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_metadata_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1050,10 +1050,10 @@ async def test_get_blob_metadata_with_if_modified(self, resource_group, location # Assert self.assertIsNotNone(md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_metadata_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1068,10 +1068,10 @@ async def test_get_blob_metadata_with_if_modified_fail(self, resource_group, loc # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_metadata_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1085,10 +1085,10 @@ async def test_get_blob_metadata_with_if_unmodified(self, resource_group, locati # Assert self.assertIsNotNone(md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_metadata_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1103,10 +1103,10 @@ async def test_get_blob_metadata_with_if_unmodified_fail(self, resource_group, l # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_metadata_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1119,10 +1119,10 @@ async def test_get_blob_metadata_with_if_match(self, resource_group, location, s # Assert self.assertIsNotNone(md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_metadata_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1135,10 +1135,10 @@ async def test_get_blob_metadata_with_if_match_fail(self, resource_group, locati # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_metadata_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1150,10 +1150,10 @@ async def test_get_blob_metadata_with_if_none_match(self, resource_group, locati # Assert self.assertIsNotNone(md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_blob_metadata_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1167,10 +1167,10 @@ async def test_get_blob_metadata_with_if_none_match_fail(self, resource_group, l # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_metadata_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1186,10 +1186,10 @@ async def test_set_blob_metadata_with_if_modified(self, resource_group, location md = (await blob.get_blob_properties()).metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_metadata_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1205,10 +1205,10 @@ async def test_set_blob_metadata_with_if_modified_fail(self, resource_group, loc # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_metadata_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1224,10 +1224,10 @@ async def test_set_blob_metadata_with_if_unmodified(self, resource_group, locati md = (await blob.get_blob_properties()).metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_metadata_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1243,10 +1243,10 @@ async def test_set_blob_metadata_with_if_unmodified_fail(self, resource_group, l # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_metadata_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1261,10 +1261,10 @@ async def test_set_blob_metadata_with_if_match(self, resource_group, location, s md = (await blob.get_blob_properties()).metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_metadata_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1278,10 +1278,10 @@ async def test_set_blob_metadata_with_if_match_fail(self, resource_group, locati # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_metadata_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1295,10 +1295,10 @@ async def test_set_blob_metadata_with_if_none_match(self, resource_group, locati md = (await blob.get_blob_properties()).metadata self.assertDictEqual(metadata, md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_blob_metadata_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1313,10 +1313,10 @@ async def test_set_blob_metadata_with_if_none_match_fail(self, resource_group, l # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() test_datetime = (datetime.utcnow() - timedelta(minutes=15)) @@ -1330,10 +1330,10 @@ async def test_delete_blob_with_if_modified(self, resource_group, location, stor # Assert self.assertIsNone(resp) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() test_datetime = (datetime.utcnow() + timedelta(minutes=15)) @@ -1348,10 +1348,10 @@ async def test_delete_blob_with_if_modified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() test_datetime = (datetime.utcnow() + timedelta(minutes=15)) @@ -1365,10 +1365,10 @@ async def test_delete_blob_with_if_unmodified(self, resource_group, location, st # Assert self.assertIsNone(resp) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() test_datetime = (datetime.utcnow() - timedelta(minutes=15)) @@ -1383,10 +1383,10 @@ async def test_delete_blob_with_if_unmodified_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1400,10 +1400,10 @@ async def test_delete_blob_with_if_match(self, resource_group, location, storage # Assert self.assertIsNone(resp) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1416,10 +1416,10 @@ async def test_delete_blob_with_if_match_fail(self, resource_group, location, st # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1431,10 +1431,10 @@ async def test_delete_blob_with_if_none_match(self, resource_group, location, st # Assert self.assertIsNone(resp) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_delete_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1448,10 +1448,10 @@ async def test_delete_blob_with_if_none_match_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_snapshot_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1466,10 +1466,10 @@ async def test_snapshot_blob_with_if_modified(self, resource_group, location, st self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_snapshot_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1484,10 +1484,10 @@ async def test_snapshot_blob_with_if_modified_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_snapshot_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1502,10 +1502,10 @@ async def test_snapshot_blob_with_if_unmodified(self, resource_group, location, self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_snapshot_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1520,10 +1520,10 @@ async def test_snapshot_blob_with_if_unmodified_fail(self, resource_group, locat # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_snapshot_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1537,10 +1537,10 @@ async def test_snapshot_blob_with_if_match(self, resource_group, location, stora self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_snapshot_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1553,10 +1553,10 @@ async def test_snapshot_blob_with_if_match_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_snapshot_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1569,10 +1569,10 @@ async def test_snapshot_blob_with_if_none_match(self, resource_group, location, self.assertIsNotNone(resp) self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_snapshot_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1586,10 +1586,10 @@ async def test_snapshot_blob_with_if_none_match_fail(self, resource_group, locat # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_blob_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1609,10 +1609,10 @@ async def test_lease_blob_with_if_modified(self, resource_group, location, stora self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_blob_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1627,10 +1627,10 @@ async def test_lease_blob_with_if_modified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_blob_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1650,10 +1650,10 @@ async def test_lease_blob_with_if_unmodified(self, resource_group, location, sto self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_blob_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1668,10 +1668,10 @@ async def test_lease_blob_with_if_unmodified_fail(self, resource_group, location # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_blob_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1692,10 +1692,10 @@ async def test_lease_blob_with_if_match(self, resource_group, location, storage_ self.assertIsNotNone(lease.etag) self.assertEqual(lease.etag, etag) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_blob_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1708,10 +1708,10 @@ async def test_lease_blob_with_if_match_fail(self, resource_group, location, sto # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_blob_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1730,10 +1730,10 @@ async def test_lease_blob_with_if_none_match(self, resource_group, location, sto self.assertIsInstance(lease, BlobLeaseClient) self.assertIsNotNone(lease.id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_lease_blob_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_block_blob( self.container_name, 'blob1', b'hello world', bsc) @@ -1747,10 +1747,10 @@ async def test_lease_blob_with_if_none_match_fail(self, resource_group, location # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_list_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_block_list_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1771,10 +1771,10 @@ async def test_put_block_list_with_if_modified(self, resource_group, location, s self.assertEqual(content, b'AAABBBCCC') @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_list_returns_vid(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_block_list_returns_vid(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1795,10 +1795,10 @@ async def test_put_block_list_returns_vid(self, resource_group, location, storag content = await content.readall() self.assertEqual(content, b'AAABBBCCC') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_list_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_block_list_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1818,10 +1818,10 @@ async def test_put_block_list_with_if_modified_fail(self, resource_group, locati # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_list_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_block_list_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1841,10 +1841,10 @@ async def test_put_block_list_with_if_unmodified(self, resource_group, location, content = await content.readall() self.assertEqual(content, b'AAABBBCCC') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_list_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_block_list_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1864,10 +1864,10 @@ async def test_put_block_list_with_if_unmodified_fail(self, resource_group, loca # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_list_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_block_list_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1886,10 +1886,10 @@ async def test_put_block_list_with_if_match(self, resource_group, location, stor content = await content.readall() self.assertEqual(content, b'AAABBBCCC') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_list_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_block_list_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1907,10 +1907,10 @@ async def test_put_block_list_with_if_match_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_list_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_block_list_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1928,10 +1928,10 @@ async def test_put_block_list_with_if_none_match(self, resource_group, location, content = await content.readall() self.assertEqual(content, b'AAABBBCCC') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_list_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_block_list_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_block_blob( self.container_name, 'blob1', b'', bsc) @@ -1949,10 +1949,10 @@ async def test_put_block_list_with_if_none_match_fail(self, resource_group, loca # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1966,10 +1966,10 @@ async def test_update_page_with_if_modified(self, resource_group, location, stor # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -1985,10 +1985,10 @@ async def test_update_page_with_if_modified_fail(self, resource_group, location, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -2002,10 +2002,10 @@ async def test_update_page_with_if_unmodified(self, resource_group, location, st # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -2021,10 +2021,10 @@ async def test_update_page_with_if_unmodified_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -2037,10 +2037,10 @@ async def test_update_page_with_if_match(self, resource_group, location, storage # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -2054,10 +2054,10 @@ async def test_update_page_with_if_match_fail(self, resource_group, location, st # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -2069,10 +2069,10 @@ async def test_update_page_with_if_none_match(self, resource_group, location, st # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() await self._create_container_and_page_blob( self.container_name, 'blob1', 1024, bsc) @@ -2087,10 +2087,10 @@ async def test_update_page_with_if_none_match_fail(self, resource_group, locatio # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_iter_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_iter_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2107,10 +2107,10 @@ async def test_get_page_ranges_iter_with_if_modified(self, resource_group, locat self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_iter_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_iter_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2126,10 +2126,10 @@ async def test_get_page_ranges_iter_with_if_modified_fail(self, resource_group, # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_iter_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_iter_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2146,10 +2146,10 @@ async def test_get_page_ranges_iter_with_if_unmodified(self, resource_group, loc self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_iter_with_if_unmod_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_iter_with_if_unmod_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2165,10 +2165,10 @@ async def test_get_page_ranges_iter_with_if_unmod_fail(self, resource_group, loc # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_iter_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_iter_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2184,10 +2184,10 @@ async def test_get_page_ranges_iter_with_if_match(self, resource_group, location self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_iter_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_iter_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2201,10 +2201,10 @@ async def test_get_page_ranges_iter_with_if_match_fail(self, resource_group, loc # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_iter_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_iter_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2219,10 +2219,10 @@ async def test_get_page_ranges_iter_with_if_none_match(self, resource_group, loc self.assertEqual(ranges[0][0], {'start': 0, 'end': 511}) self.assertEqual(ranges[0][1], {'start': 1024, 'end': 1535}) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_iter_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_iter_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_page_blob( self.container_name, 'blob1', 2048, bsc) @@ -2238,10 +2238,10 @@ async def test_get_page_ranges_iter_if_none_match_fail(self, resource_group, loc # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_block_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() - @@ -2256,10 +2256,10 @@ async def test_append_block_with_if_modified(self, resource_group, location, sto content = await content.readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_with_if_modified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_block_with_if_modified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() + @@ -2272,10 +2272,10 @@ async def test_append_block_with_if_modified_fail(self, resource_group, location # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_block_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() + @@ -2290,10 +2290,10 @@ async def test_append_block_with_if_unmodified(self, resource_group, location, s content = await content.readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_with_if_unmodified_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_block_with_if_unmodified_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) test_datetime = (datetime.utcnow() - @@ -2306,10 +2306,10 @@ async def test_append_block_with_if_unmodified_fail(self, resource_group, locati # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_block_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) @@ -2324,10 +2324,10 @@ async def test_append_block_with_if_match(self, resource_group, location, storag content = await content.readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_block_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) @@ -2339,10 +2339,10 @@ async def test_append_block_with_if_match_fail(self, resource_group, location, s # Assert #self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_block_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) @@ -2356,10 +2356,10 @@ async def test_append_block_with_if_none_match(self, resource_group, location, s content = await content.readall() self.assertEqual(b'block 0block 1block 2block 3block 4', content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_with_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_block_with_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() container, blob = await self._create_container_and_append_blob(self.container_name, 'blob1', bsc) @@ -2372,10 +2372,10 @@ async def test_append_block_with_if_none_match_fail(self, resource_group, locati # Assert self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_blob_from_bytes_with_if_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_blob_from_bytes_with_if_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2390,10 +2390,10 @@ async def test_append_blob_from_bytes_with_if_modified(self, resource_group, loc content = await content.readall() self.assertEqual(data, content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_apnd_blob_from_bytes_with_if_mod_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_apnd_blob_from_bytes_with_if_mod_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2406,10 +2406,10 @@ async def test_apnd_blob_from_bytes_with_if_mod_fail(self, resource_group, locat self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_blob_from_bytes_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_blob_from_bytes_with_if_unmodified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2424,10 +2424,10 @@ async def test_append_blob_from_bytes_with_if_unmodified(self, resource_group, l content = await content.readall() self.assertEqual(data, content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_blob_from_bytes_with_if_unmod_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_blob_from_bytes_with_if_unmod_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2440,10 +2440,10 @@ async def test_append_blob_from_bytes_with_if_unmod_fail(self, resource_group, l self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_blob_from_bytes_with_if_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_blob_from_bytes_with_if_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2458,10 +2458,10 @@ async def test_append_blob_from_bytes_with_if_match(self, resource_group, locati content = await content.readall() self.assertEqual(data, content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_blob_from_bytes_with_if_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_blob_from_bytes_with_if_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2474,10 +2474,10 @@ async def test_append_blob_from_bytes_with_if_match_fail(self, resource_group, l self.assertEqual(StorageErrorCode.condition_not_met, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_blob_from_bytes_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_append_blob_from_bytes_with_if_none_match(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) @@ -2492,10 +2492,10 @@ async def test_append_blob_from_bytes_with_if_none_match(self, resource_group, l content = await content.readall() self.assertEqual(data, content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_apnd_blob_from_bytes_if_none_match_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_apnd_blob_from_bytes_if_none_match_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, connection_data_block_size=4 * 1024, transport=AiohttpTestTransport()) self._setup() blob_name = self.get_resource_name("blob") container, blob = await self._create_container_and_append_blob(self.container_name, blob_name, bsc) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_api_version.py b/sdk/storage/azure-storage-blob/tests/test_blob_api_version.py index b3f7498386e9..d387b6b32676 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_api_version.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_api_version.py @@ -19,7 +19,7 @@ ) from azure.storage.blob._shared.constants import X_MS_VERSION from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ TEST_BLOB_PREFIX = 'blob' @@ -135,10 +135,10 @@ def test_invalid_api_version(self): api_version="foo") self.assertTrue(str(error.value).startswith("Unsupported API version 'foo'.")) - @GlobalStorageAccountPreparer() - def test_old_api_get_page_ranges_succeeds(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_old_api_get_page_ranges_succeeds(self, storage_account_name, storage_account_key): bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_api_version_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_api_version_async.py index d6e73cd79334..9ed52eaac509 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_api_version_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_api_version_async.py @@ -16,7 +16,7 @@ ContainerClient, BlobClient, ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -133,11 +133,11 @@ def test_invalid_api_version(self): api_version="foo") self.assertTrue(str(error.value).startswith("Unsupported API version 'foo'.")) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_old_api_get_page_ranges_succeeds_async(self, resource_group, location, storage_account, storage_account_key): + async def test_old_api_get_page_ranges_succeeds_async(self, storage_account_name, storage_account_key): bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_client.py b/sdk/storage/azure-storage-blob/tests/test_blob_client.py index 5956f7a92e85..3a418bc054de 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_client.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_client.py @@ -16,7 +16,7 @@ BlobClient, ) from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -47,79 +47,79 @@ def validate_standard_account_endpoints(self, service, url_type, name, storage_a self.assertTrue('{}-secondary.{}.core.windows.net'.format(name, url_type) in service.secondary_endpoint) # --Direct Parameters Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_key(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_key(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') # Assert - self.validate_standard_account_endpoints(service, url, storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, url, storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_blob_client_with_complete_blob_url(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_client_with_complete_blob_url(self, storage_account_name, storage_account_key): # Arrange - blob_url = self.account_url(storage_account, "blob") + "/foourl/barurl" + blob_url = self.account_url(storage_account_name, "blob") + "/foourl/barurl" service = BlobClient(blob_url, credential=storage_account_key, container_name='foo', blob_name='bar') # Assert self.assertEqual(service.scheme, 'https') self.assertEqual(service.container_name, 'foo') self.assertEqual(service.blob_name, 'bar') - self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Act service = service_type[0].from_connection_string( - self.connection_string(storage_account, storage_account_key), container_name="test", blob_name="test") + self.connection_string(storage_account_name, storage_account_key), container_name="test", blob_name="test") # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_sas(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "blob"), credential=self.sas_token, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=self.sas_token, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertTrue(service.url.endswith(self.sas_token)) self.assertIsNone(service.credential) - @GlobalStorageAccountPreparer() - def test_create_service_with_sas_credential(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_sas_credential(self, storage_account_name, storage_account_key): # Arrange sas_credential = AzureSasCredential(self.sas_token) for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "blob"), credential=sas_credential, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=sas_credential, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertFalse(service.url.endswith(self.sas_token)) self.assertEqual(service.credential, sas_credential) - @GlobalStorageAccountPreparer() - def test_create_service_with_sas_credential_url_raises_if_sas_is_in_uri(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_sas_credential_url_raises_if_sas_is_in_uri(self, storage_account_name, storage_account_key): # Arrange sas_credential = AzureSasCredential(self.sas_token) @@ -127,80 +127,80 @@ def test_create_service_with_sas_credential_url_raises_if_sas_is_in_uri(self, re # Act with self.assertRaises(ValueError): service = service_type( - self.account_url(storage_account, "blob") + "?sig=foo", credential=sas_credential, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob") + "?sig=foo", credential=sas_credential, container_name='foo', blob_name='bar') - @GlobalStorageAccountPreparer() - def test_create_service_with_token(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_token(self, storage_account_name, storage_account_key): for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "blob"), credential=self.token_credential, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=self.token_credential, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertEqual(service.credential, self.token_credential) - self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) - @GlobalStorageAccountPreparer() - def test_create_service_with_token_and_http(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_token_and_http(self, storage_account_name, storage_account_key): for service_type in SERVICES: # Act with self.assertRaises(ValueError): - url = self.account_url(storage_account, "blob").replace('https', 'http') + url = self.account_url(storage_account_name, "blob").replace('https', 'http') service_type(url, credential=self.token_credential, container_name='foo', blob_name='bar') - @GlobalStorageAccountPreparer() - def test_create_service_china(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_china(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act - url = self.account_url(storage_account, "blob").replace('core.windows.net', 'core.chinacloudapi.cn') + url = self.account_url(storage_account_name, "blob").replace('core.windows.net', 'core.chinacloudapi.cn') service = service_type[0]( url, credential=storage_account_key, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith( - 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) self.assertTrue(service.secondary_endpoint.startswith( - 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) - @GlobalStorageAccountPreparer() - def test_create_service_protocol(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_protocol(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act - url = self.account_url(storage_account, "blob").replace('https', 'http') + url = self.account_url(storage_account_name, "blob").replace('https', 'http') service = service_type[0]( url, credential=storage_account_key, container_name='foo', blob_name='bar') # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_blob_service_anonymous(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_service_anonymous(self, storage_account_name, storage_account_key): # Arrange BLOB_SERVICES = [BlobServiceClient, ContainerClient, BlobClient] for service_type in BLOB_SERVICES: # Act - service = service_type(self.account_url(storage_account, "blob"), container_name='foo', blob_name='bar') + service = service_type(self.account_url(storage_account_name, "blob"), container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertIsNone(service.credential) - @GlobalStorageAccountPreparer() - def test_create_blob_service_custom_domain(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_service_custom_domain(self, storage_account_name, storage_account_key): # Arrange BLOB_SERVICES = [BlobServiceClient, ContainerClient, BlobClient] @@ -208,42 +208,42 @@ def test_create_blob_service_custom_domain(self, resource_group, location, stora # Act service = service_type( 'www.mydomain.com', - credential={'account_name': storage_account.name, 'account_key': storage_account_key}, + credential={'account_name': storage_account_name, 'account_key': storage_account_key}, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.blob.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.blob.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_create_service_with_socket_timeout(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_socket_timeout(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act default_service = service_type[0]( - self.account_url(storage_account, "blob"), credential=storage_account_key, + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') service = service_type[0]( - self.account_url(storage_account, "blob"), credential=storage_account_key, + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar', connection_timeout=22) # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) assert service._client._client._pipeline._transport.connection_config.timeout == 22 assert default_service._client._client._pipeline._transport.connection_config.timeout in [20, (20, 2000)] # --Connection String Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_key(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string_key(self, storage_account_name, storage_account_key): # Arrange - conn_string = 'AccountName={};AccountKey={};'.format(storage_account.name, storage_account_key) + conn_string = 'AccountName={};AccountKey={};'.format(storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act @@ -251,13 +251,13 @@ def test_create_service_with_connection_string_key(self, resource_group, locatio conn_string, container_name='foo', blob_name='bar') # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string_sas(self, storage_account_name, storage_account_key): # Arrange - conn_string = 'AccountName={};SharedAccessSignature={};'.format(storage_account.name, self.sas_token) + conn_string = 'AccountName={};SharedAccessSignature={};'.format(storage_account_name, self.sas_token) for service_type in SERVICES: # Act @@ -266,16 +266,16 @@ def test_create_service_with_connection_string_sas(self, resource_group, locatio # Assert self.assertIsNotNone(service) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertTrue(service.url.endswith(self.sas_token)) self.assertIsNone(service.credential) - self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_endpoint_protocol(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string_endpoint_protocol(self, storage_account_name, storage_account_key): # Arrange conn_string = 'AccountName={};AccountKey={};DefaultEndpointsProtocol=http;EndpointSuffix=core.chinacloudapi.cn;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act @@ -283,29 +283,29 @@ def test_create_service_with_connection_string_endpoint_protocol(self, resource_ # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue( service.primary_endpoint.startswith( - 'http://{}.{}.core.chinacloudapi.cn/'.format(storage_account.name, service_type[1]))) + 'http://{}.{}.core.chinacloudapi.cn/'.format(storage_account_name, service_type[1]))) self.assertTrue( service.secondary_endpoint.startswith( - 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_emulated(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string_emulated(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): - conn_string = 'UseDevelopmentStorage=true;'.format(storage_account.name, storage_account_key) + conn_string = 'UseDevelopmentStorage=true;'.format(storage_account_name, storage_account_key) # Act with self.assertRaises(ValueError): service = service_type[0].from_connection_string(conn_string, container_name="foo", blob_name="bar") - @GlobalStorageAccountPreparer() - def test_create_service_with_cstr_anonymous(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_cstr_anonymous(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'BlobEndpoint=www.mydomain.com;' @@ -321,48 +321,48 @@ def test_create_service_with_cstr_anonymous(self, resource_group, location, stor with self.assertRaises(ValueError): service.secondary_endpoint - @GlobalStorageAccountPreparer() - def test_create_service_with_cstr_custom_domain(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_cstr_custom_domain(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};BlobEndpoint=www.mydomain.com;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string(conn_string, container_name="foo", blob_name="bar") # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.blob.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.blob.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_create_service_with_cstr_cust_dmn_trailing_slash(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_cstr_cust_dmn_trailing_slash(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};BlobEndpoint=www.mydomain.com/;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string(conn_string, container_name="foo", blob_name="bar") # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.blob.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.blob.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_create_service_with_cstr_custom_domain_sec_override(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_cstr_custom_domain_sec_override(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};BlobEndpoint=www.mydomain.com/;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string( @@ -370,18 +370,18 @@ def test_create_service_with_cstr_custom_domain_sec_override(self, resource_grou # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com/')) - @GlobalStorageAccountPreparer() - def test_create_service_with_cstr_fails_if_sec_without_prim(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_cstr_fails_if_sec_without_prim(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Arrange conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;'.format( - storage_account.name, storage_account_key, + storage_account_name, storage_account_key, _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) # Act @@ -390,12 +390,12 @@ def test_create_service_with_cstr_fails_if_sec_without_prim(self, resource_group with self.assertRaises(ValueError): service = service_type[0].from_connection_string(conn_string, container_name="foo", blob_name="bar") - @GlobalStorageAccountPreparer() - def test_create_service_with_cstr_succeeds_if_sec_with_prim(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_cstr_succeeds_if_sec_with_prim(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Arrange conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;{}=www-sec.mydomain.com;'.format( - storage_account.name, + storage_account_name, storage_account_key, _CONNECTION_ENDPOINTS.get(service_type[1]), _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) @@ -405,8 +405,8 @@ def test_create_service_with_cstr_succeeds_if_sec_with_prim(self, resource_group # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com/')) @@ -494,10 +494,10 @@ def test_create_client_for_emulator(self): self.assertEqual(container_client.account_name, "devstoreaccount1") - @GlobalStorageAccountPreparer() - def test_request_callback_signed_header(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_request_callback_signed_header(self, storage_account_name, storage_account_key): # Arrange - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) name = self.get_resource_name('cont') # Act @@ -513,10 +513,10 @@ def callback(request): finally: service.delete_container(name) - @GlobalStorageAccountPreparer() - def test_response_callback(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_response_callback(self, storage_account_name, storage_account_key): # Arrange - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) name = self.get_resource_name('cont') container = service.get_container_client(name) @@ -530,14 +530,14 @@ def callback(response): self.assertTrue(exists) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_client_request_id_echo(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_client_request_id_echo(self, storage_account_name, storage_account_key): # client request id is different for every request, so it will never match the recorded one pytest.skip("Issue tracked here: https://github.com/Azure/azure-sdk-for-python/issues/8098") # Arrange request_id_header_name = 'x-ms-client-request-id' - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) # Act make the client request ID slightly different def callback(response): @@ -556,9 +556,9 @@ def callback(response): # Assert the client request ID validation is not throwing when the ID is not echoed service.get_service_properties(raw_response_hook=callback) - @GlobalStorageAccountPreparer() - def test_user_agent_default(self, resource_group, location, storage_account, storage_account_key): - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_user_agent_default(self, storage_account_name, storage_account_key): + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -566,11 +566,11 @@ def callback(response): service.get_service_properties(raw_response_hook=callback) - @GlobalStorageAccountPreparer() - def test_user_agent_custom(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_user_agent_custom(self, storage_account_name, storage_account_key): custom_app = "TestApp/v1.0" service = BlobServiceClient( - self.account_url(storage_account, "blob"), credential=storage_account_key, user_agent=custom_app) + self.account_url(storage_account_name, "blob"), credential=storage_account_key, user_agent=custom_app) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -590,9 +590,9 @@ def callback(response): service.get_service_properties(raw_response_hook=callback, user_agent="TestApp/v2.0") - @GlobalStorageAccountPreparer() - def test_user_agent_append(self, resource_group, location, storage_account, storage_account_key): - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_user_agent_append(self, storage_account_name, storage_account_key): + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -618,26 +618,26 @@ def test_error_with_malformed_conn_str(self): self.assertEqual( str(e.exception), "Connection string missing required connection details.") - @GlobalStorageAccountPreparer() - def test_closing_pipeline_client(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_closing_pipeline_client(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') # Assert with service: assert hasattr(service, 'close') service.close() - @GlobalStorageAccountPreparer() - def test_closing_pipeline_client_simple(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_closing_pipeline_client_simple(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') service.close() # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_client_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_client_async.py index e2640507f059..28bdda1e4f3d 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_client_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_client_async.py @@ -15,7 +15,7 @@ ContainerClient, BlobClient, ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -46,66 +46,66 @@ def validate_standard_account_endpoints(self, service, url_type, account_name, a self.assertTrue('{}-secondary.{}.core.windows.net'.format(account_name, url_type) in service.secondary_endpoint) # --Direct Parameters Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_key_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_key_async(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') # Assert - self.validate_standard_account_endpoints(service, url, storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, url, storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string_async(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Act service = service_type[0].from_connection_string( - self.connection_string(storage_account, storage_account_key), container_name="test", blob_name="test") + self.connection_string(storage_account_name, storage_account_key), container_name="test", blob_name="test") # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_sas_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_sas_async(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "blob"), credential=self.sas_token, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=self.sas_token, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertTrue(service.url.endswith(self.sas_token)) self.assertIsNone(service.credential) - @GlobalStorageAccountPreparer() - def test_create_service_with_sas_credential_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_sas_credential_async(self, storage_account_name, storage_account_key): # Arrange sas_credential = AzureSasCredential(self.sas_token) for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "blob"), credential=sas_credential, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=sas_credential, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertFalse(service.url.endswith(self.sas_token)) self.assertEqual(service.credential, sas_credential) - @GlobalStorageAccountPreparer() - def test_create_service_with_sas_credential_url_raises_if_sas_is_in_uri_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_sas_credential_url_raises_if_sas_is_in_uri_async(self, storage_account_name, storage_account_key): # Arrange sas_credential = AzureSasCredential(self.sas_token) @@ -113,80 +113,80 @@ def test_create_service_with_sas_credential_url_raises_if_sas_is_in_uri_async(se # Act with self.assertRaises(ValueError): service = service_type( - self.account_url(storage_account, "blob") + "?sig=foo", credential=sas_credential, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob") + "?sig=foo", credential=sas_credential, container_name='foo', blob_name='bar') - @GlobalStorageAccountPreparer() - def test_create_service_with_token_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_token_async(self, storage_account_name, storage_account_key): for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "blob"), credential=self.token_credential, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=self.token_credential, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertEqual(service.credential, self.token_credential) - self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) - @GlobalStorageAccountPreparer() - def test_create_service_with_token_and_http_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_token_and_http_async(self, storage_account_name, storage_account_key): for service_type in SERVICES: # Act with self.assertRaises(ValueError): - url = self.account_url(storage_account, "blob").replace('https', 'http') + url = self.account_url(storage_account_name, "blob").replace('https', 'http') service_type(url, credential=self.token_credential, container_name='foo', blob_name='bar') - @GlobalStorageAccountPreparer() - def test_create_service_china_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_china_async(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act - url = self.account_url(storage_account, "blob").replace('core.windows.net', 'core.chinacloudapi.cn') + url = self.account_url(storage_account_name, "blob").replace('core.windows.net', 'core.chinacloudapi.cn') service = service_type[0]( url, credential=storage_account_key, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith( - 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) self.assertTrue(service.secondary_endpoint.startswith( - 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) - @GlobalStorageAccountPreparer() - def test_create_service_protocol_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_protocol_async(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act - url = self.account_url(storage_account, "blob").replace('https', 'http') + url = self.account_url(storage_account_name, "blob").replace('https', 'http') service = service_type[0]( url, credential=storage_account_key, container_name='foo', blob_name='bar') # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_blob_service_anonymous_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_service_anonymous_async(self, storage_account_name, storage_account_key): # Arrange BLOB_SERVICES = [BlobServiceClient, ContainerClient, BlobClient] for service_type in BLOB_SERVICES: # Act - service = service_type(self.account_url(storage_account, "blob"), container_name='foo', blob_name='bar') + service = service_type(self.account_url(storage_account_name, "blob"), container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertIsNone(service.credential) - self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) - @GlobalStorageAccountPreparer() - def test_create_blob_service_custom_domain_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_service_custom_domain_async(self, storage_account_name, storage_account_key): # Arrange BLOB_SERVICES = [BlobServiceClient, ContainerClient, BlobClient] @@ -194,41 +194,41 @@ def test_create_blob_service_custom_domain_async(self, resource_group, location, # Act service = service_type( 'www.mydomain.com', - credential={'account_name': storage_account.name, 'account_key': storage_account_key}, + credential={'account_name': storage_account_name, 'account_key': storage_account_key}, container_name='foo', blob_name='bar') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.blob.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.blob.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_create_service_with_socket_timeout_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_socket_timeout_async(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act default_service = service_type[0]( - self.account_url(storage_account, "blob"), credential=storage_account_key, + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') service = service_type[0]( - self.account_url(storage_account, "blob"), credential=storage_account_key, + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar', connection_timeout=22) # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) assert service._client._client._pipeline._transport.connection_config.timeout == 22 assert default_service._client._client._pipeline._transport.connection_config.timeout in [20, (20, 2000)] # --Connection String Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_key_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string_key_async(self, storage_account_name, storage_account_key): # Arrange - conn_string = 'AccountName={};AccountKey={};'.format(storage_account.name, storage_account_key) + conn_string = 'AccountName={};AccountKey={};'.format(storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act @@ -236,13 +236,13 @@ def test_create_service_with_connection_string_key_async(self, resource_group, l conn_string, container_name='foo', blob_name='bar') # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_sas_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string_sas_async(self, storage_account_name, storage_account_key): # Arrange - conn_string = 'AccountName={};SharedAccessSignature={};'.format(storage_account.name, self.sas_token) + conn_string = 'AccountName={};SharedAccessSignature={};'.format(storage_account_name, self.sas_token) for service_type in SERVICES: # Act @@ -251,28 +251,28 @@ def test_create_service_with_connection_string_sas_async(self, resource_group, l # Assert self.assertIsNotNone(service) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.blob.core.windows.net')) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.blob.core.windows.net')) self.assertTrue(service.url.endswith(self.sas_token)) self.assertIsNone(service.credential) - self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) - @GlobalStorageAccountPreparer() - def test_create_blob_client_with_complete_blob_url_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_client_with_complete_blob_url_async(self, storage_account_name, storage_account_key): # Arrange - blob_url = self.account_url(storage_account, "blob") + "/foourl/barurl" + blob_url = self.account_url(storage_account_name, "blob") + "/foourl/barurl" service = BlobClient(blob_url, credential=storage_account_key, container_name='foo', blob_name='bar') # Assert self.assertEqual(service.scheme, 'https') self.assertEqual(service.container_name, 'foo') self.assertEqual(service.blob_name, 'bar') - self.assertEqual(service.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) - @GlobalStorageAccountPreparer() - def test_creat_serv_w_connstr_endpoint_protocol_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_creat_serv_w_connstr_endpoint_protocol_async(self, storage_account_name, storage_account_key): # Arrange conn_string = 'AccountName={};AccountKey={};DefaultEndpointsProtocol=http;EndpointSuffix=core.chinacloudapi.cn;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act @@ -280,29 +280,29 @@ def test_creat_serv_w_connstr_endpoint_protocol_async(self, resource_group, loca # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue( service.primary_endpoint.startswith( - 'http://{}.{}.core.chinacloudapi.cn/'.format(storage_account.name, service_type[1]))) + 'http://{}.{}.core.chinacloudapi.cn/'.format(storage_account_name, service_type[1]))) self.assertTrue( service.secondary_endpoint.startswith( - 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_emulated_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string_emulated_async(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): - conn_string = 'UseDevelopmentStorage=true;'.format(storage_account.name, storage_account_key) + conn_string = 'UseDevelopmentStorage=true;'.format(storage_account_name, storage_account_key) # Act with self.assertRaises(ValueError): service = service_type[0].from_connection_string(conn_string, container_name="foo", blob_name="bar") - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_anonymous_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_service_with_connection_string_anonymous_async(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'BlobEndpoint=www.mydomain.com;' @@ -318,48 +318,48 @@ def test_create_service_with_connection_string_anonymous_async(self, resource_gr with self.assertRaises(ValueError): service.secondary_endpoint - @GlobalStorageAccountPreparer() - def test_creat_serv_w_connstr_custm_domain_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_creat_serv_w_connstr_custm_domain_async(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};BlobEndpoint=www.mydomain.com;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string(conn_string, container_name="foo", blob_name="bar") # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.blob.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.blob.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_creat_serv_w_connstr_custm_dom_trailing_slash_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_creat_serv_w_connstr_custm_dom_trailing_slash_async(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};BlobEndpoint=www.mydomain.com/;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string(conn_string, container_name="foo", blob_name="bar") # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.blob.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.blob.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_creat_serv_w_connstr_custm_dom_2ndry_override_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_creat_serv_w_connstr_custm_dom_2ndry_override_async(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};BlobEndpoint=www.mydomain.com/;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string( @@ -367,18 +367,18 @@ def test_creat_serv_w_connstr_custm_dom_2ndry_override_async(self, resource_grou # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com/')) - @GlobalStorageAccountPreparer() - def test_creat_serv_w_connstr_fail_if_2ndry_wo_primary_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_creat_serv_w_connstr_fail_if_2ndry_wo_primary_async(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Arrange conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;'.format( - storage_account.name, storage_account_key, + storage_account_name, storage_account_key, _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) # Act @@ -387,12 +387,12 @@ def test_creat_serv_w_connstr_fail_if_2ndry_wo_primary_async(self, resource_grou with self.assertRaises(ValueError): service = service_type[0].from_connection_string(conn_string, container_name="foo", blob_name="bar") - @GlobalStorageAccountPreparer() - def test_creat_serv_w_connstr_pass_if_2ndry_w_primary_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_creat_serv_w_connstr_pass_if_2ndry_w_primary_async(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Arrange conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;{}=www-sec.mydomain.com;'.format( - storage_account.name, + storage_account_name, storage_account_key, _CONNECTION_ENDPOINTS.get(service_type[1]), _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) @@ -402,8 +402,8 @@ def test_creat_serv_w_connstr_pass_if_2ndry_w_primary_async(self, resource_group # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com/')) @@ -476,11 +476,11 @@ def test_create_blob_client_with_sub_directory_path_in_blob_name(self): self.assertEqual(blob_client.blob_name, "dir1/sub000/2010_Unit150_Ivan097_img0003.jpg") self.assertEqual(blob_client.url, blob_emulator_url) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_request_callback_signed_header_async(self, resource_group, location, storage_account, storage_account_key): + async def test_request_callback_signed_header_async(self, storage_account_name, storage_account_key): # Arrange - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) name = self.get_resource_name('cont') # Act @@ -496,11 +496,11 @@ def callback(request): finally: await service.delete_container(name) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_response_callback_async(self, resource_group, location, storage_account, storage_account_key): + async def test_response_callback_async(self, storage_account_name, storage_account_key): # Arrange - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) name = self.get_resource_name('cont') container = service.get_container_client(name) @@ -513,10 +513,10 @@ def callback(response): exists = await container.get_container_properties(raw_response_hook=callback) self.assertTrue(exists) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_user_agent_default_async(self, resource_group, location, storage_account, storage_account_key): - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + async def test_user_agent_default_async(self, storage_account_name, storage_account_key): + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -524,12 +524,12 @@ def callback(response): await service.get_service_properties(raw_response_hook=callback) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_user_agent_custom_async(self, resource_group, location, storage_account, storage_account_key): + async def test_user_agent_custom_async(self, storage_account_name, storage_account_key): custom_app = "TestApp/v1.0" service = BlobServiceClient( - self.account_url(storage_account, "blob"), credential=storage_account_key, user_agent=custom_app) + self.account_url(storage_account_name, "blob"), credential=storage_account_key, user_agent=custom_app) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -549,10 +549,10 @@ def callback(response): await service.get_service_properties(raw_response_hook=callback, user_agent="TestApp/v2.0") - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_user_agent_append_async(self, resource_group, location, storage_account, storage_account_key): - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + async def test_user_agent_append_async(self, storage_account_name, storage_account_key): + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -563,30 +563,30 @@ def callback(response): await service.get_service_properties(raw_response_hook=callback, user_agent='customer_user_agent') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_closing_pipeline_client(self, resource_group, location, storage_account, storage_account_key): + async def test_closing_pipeline_client(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') # Assert async with service: assert hasattr(service, 'close') await service.close() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_closing_pipeline_client_simple(self, resource_group, location, storage_account, storage_account_key): + async def test_closing_pipeline_client_simple(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') + self.account_url(storage_account_name, "blob"), credential=storage_account_key, container_name='foo', blob_name='bar') await service.close() # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_encryption.py b/sdk/storage/azure-storage-blob/tests/test_blob_encryption.py index fe2b38b32b5b..e409c6ce2e8b 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_encryption.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_encryption.py @@ -41,7 +41,7 @@ KeyResolver, RSAKeyWrapper, ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -55,9 +55,9 @@ class StorageBlobEncryptionTest(StorageTestCase): # --Helpers----------------------------------------------------------------- - def _setup(self, storage_account, key): + def _setup(self, storage_account_name, key): self.bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=key, max_single_put_size=32 * 1024, max_block_size=4 * 1024, @@ -94,10 +94,10 @@ def _create_small_blob(self, blob_type): # --Test cases for blob encryption ---------------------------------------- - @GlobalStorageAccountPreparer() - def test_missing_attribute_kek_wrap(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_missing_attribute_kek_wrap(self, storage_account_name, storage_account_key): # In the shared method _generate_blob_encryption_key - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True valid_key = KeyWrapper('key1') @@ -126,9 +126,9 @@ def test_missing_attribute_kek_wrap(self, resource_group, location, storage_acco with self.assertRaises(AttributeError): self._create_small_blob(BlobType.BlockBlob) - @GlobalStorageAccountPreparer() - def test_invalid_value_kek_wrap(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_invalid_value_kek_wrap(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') @@ -149,10 +149,10 @@ def test_invalid_value_kek_wrap(self, resource_group, location, storage_account, with self.assertRaises(AttributeError): self._create_small_blob(BlobType.BlockBlob) - @GlobalStorageAccountPreparer() - def test_missing_attribute_kek_unwrap(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_missing_attribute_kek_unwrap(self, storage_account_name, storage_account_key): # Shared between all services in decrypt_blob - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True valid_key = KeyWrapper('key1') self.bsc.key_encryption_key = valid_key @@ -176,9 +176,9 @@ def test_missing_attribute_kek_unwrap(self, resource_group, location, storage_ac blob.download_blob().content_as_bytes() @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_invalid_value_kek_unwrap(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_invalid_value_kek_unwrap(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = self._create_small_blob(BlobType.BlockBlob) @@ -191,9 +191,9 @@ def test_invalid_value_kek_unwrap(self, resource_group, location, storage_accoun blob.download_blob().content_as_bytes() self.assertEqual(str(e.exception), 'Decryption failed.') - @GlobalStorageAccountPreparer() - def test_get_blob_kek(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_kek(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = self._create_small_blob(BlobType.BlockBlob) @@ -205,9 +205,9 @@ def test_get_blob_kek(self, resource_group, location, storage_account, storage_a self.assertEqual(b"".join(list(content.chunks())), self.bytes) - @GlobalStorageAccountPreparer() - def test_get_blob_resolver(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_resolver(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') key_resolver = KeyResolver() @@ -223,11 +223,11 @@ def test_get_blob_resolver(self, resource_group, location, storage_account, stor self.assertEqual(content, self.bytes) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_kek_RSA(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_kek_RSA(self, storage_account_name, storage_account_key): # We can only generate random RSA keys, so this must be run live or # the playback test will fail due to a change in kek values. - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = RSAKeyWrapper('key2') blob = self._create_small_blob(BlobType.BlockBlob) @@ -239,9 +239,9 @@ def test_get_blob_kek_RSA(self, resource_group, location, storage_account, stora self.assertEqual(b"".join(list(content.chunks())), self.bytes) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_nonmatching_kid(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_nonmatching_kid(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = self._create_small_blob(BlobType.BlockBlob) @@ -254,9 +254,9 @@ def test_get_blob_nonmatching_kid(self, resource_group, location, storage_accoun blob.download_blob().content_as_bytes() self.assertEqual(str(e.exception), 'Decryption failed.') - @GlobalStorageAccountPreparer() - def test_put_blob_invalid_stream_type(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_blob_invalid_stream_type(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') small_stream = StringIO(u'small') @@ -276,11 +276,10 @@ def test_put_blob_invalid_stream_type(self, resource_group, location, storage_ac self.assertTrue('Blob data should be of type bytes.' in str(e.exception)) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_put_blob_chunking_required_mult_of_block_size(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_put_blob_chunking_required_mult_of_block_size(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes( @@ -296,11 +295,10 @@ def test_put_blob_chunking_required_mult_of_block_size(self, resource_group, loc self.assertEqual(content, blob_content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_put_blob_chunking_required_non_mult_of_block_size(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_put_blob_chunking_required_non_mult_of_block_size(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = urandom(self.config.max_single_put_size + 1) @@ -315,11 +313,10 @@ def test_put_blob_chunking_required_non_mult_of_block_size(self, resource_group, self.assertEqual(content, blob_content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_put_blob_chunking_required_range_specified(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_put_blob_chunking_required_range_specified(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(self.config.max_single_put_size * 2) @@ -336,9 +333,9 @@ def test_put_blob_chunking_required_range_specified(self, resource_group, locati # Assert self.assertEqual(content[:self.config.max_single_put_size + 53], blob_content) - @GlobalStorageAccountPreparer() - def test_put_block_blob_single_shot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_block_blob_single_shot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = b'small' @@ -352,9 +349,9 @@ def test_put_block_blob_single_shot(self, resource_group, location, storage_acco # Assert self.assertEqual(content, blob_content) - @GlobalStorageAccountPreparer() - def test_put_blob_range(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_blob_range(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') content = b'Random repeats' * self.config.max_single_put_size * 5 @@ -374,9 +371,9 @@ def test_put_blob_range(self, resource_group, location, storage_account, storage # Assert self.assertEqual(content[2:2 + self.config.max_single_put_size + 5], blob_content) - @GlobalStorageAccountPreparer() - def test_put_blob_empty(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_blob_empty(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = b'' @@ -390,9 +387,9 @@ def test_put_blob_empty(self, resource_group, location, storage_account, storage # Assert self.assertEqual(content, blob_content) - @GlobalStorageAccountPreparer() - def test_put_blob_serial_upload_chunking(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_blob_serial_upload_chunking(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(self.config.max_single_put_size + 1) @@ -406,9 +403,9 @@ def test_put_blob_serial_upload_chunking(self, resource_group, location, storage # Assert self.assertEqual(content, blob_content) - @GlobalStorageAccountPreparer() - def test_get_blob_range_beginning_to_middle(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_range_beginning_to_middle(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -422,9 +419,9 @@ def test_get_blob_range_beginning_to_middle(self, resource_group, location, stor # Assert self.assertEqual(content[:50], blob_content) - @GlobalStorageAccountPreparer() - def test_get_blob_range_middle_to_end(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_range_middle_to_end(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -440,9 +437,9 @@ def test_get_blob_range_middle_to_end(self, resource_group, location, storage_ac self.assertEqual(content[100:], blob_content) self.assertEqual(content[100:], blob_content2) - @GlobalStorageAccountPreparer() - def test_get_blob_range_middle_to_middle(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_range_middle_to_middle(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -456,10 +453,9 @@ def test_get_blob_range_middle_to_middle(self, resource_group, location, storage # Assert self.assertEqual(content[5:98], blob_content) - @GlobalStorageAccountPreparer() - def test_get_blob_range_aligns_on_16_byte_block(self, resource_group, location, storage_account, - storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_range_aligns_on_16_byte_block(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -473,10 +469,9 @@ def test_get_blob_range_aligns_on_16_byte_block(self, resource_group, location, # Assert self.assertEqual(content[48:64], blob_content) - @GlobalStorageAccountPreparer() - def test_get_blob_range_expanded_to_beginning_block_align(self, resource_group, location, storage_account, - storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_range_expanded_to_beginning_block_align(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -490,10 +485,9 @@ def test_get_blob_range_expanded_to_beginning_block_align(self, resource_group, # Assert self.assertEqual(content[5:55], blob_content) - @GlobalStorageAccountPreparer() - def test_get_blob_range_expanded_to_beginning_iv(self, resource_group, location, storage_account, - storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_range_expanded_to_beginning_iv(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -507,9 +501,9 @@ def test_get_blob_range_expanded_to_beginning_iv(self, resource_group, location, # Assert self.assertEqual(content[22:42], blob_content) - @GlobalStorageAccountPreparer() - def test_put_blob_strict_mode(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_blob_strict_mode(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True content = urandom(512) @@ -536,9 +530,9 @@ def test_put_blob_strict_mode(self, resource_group, location, storage_account, s blob.upload_blob('To encrypt', blob_type=service) self._teardown(file_name) - @GlobalStorageAccountPreparer() - def test_get_blob_strict_mode_no_policy(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_strict_mode_no_policy(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = self._create_small_blob(BlobType.BlockBlob) @@ -550,10 +544,9 @@ def test_get_blob_strict_mode_no_policy(self, resource_group, location, storage_ with self.assertRaises(ValueError): blob.download_blob().content_as_bytes() - @GlobalStorageAccountPreparer() - def test_get_blob_strict_mode_unencrypted_blob(self, resource_group, location, storage_account, - storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_strict_mode_unencrypted_blob(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self._create_small_blob(BlobType.BlockBlob) # Act @@ -564,9 +557,9 @@ def test_get_blob_strict_mode_unencrypted_blob(self, resource_group, location, s with self.assertRaises(HttpResponseError): blob.download_blob().content_as_bytes() - @GlobalStorageAccountPreparer() - def test_invalid_methods_fail_block(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_invalid_methods_fail_block(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') blob_name = self._get_blob_reference(BlobType.BlockBlob) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -580,9 +573,9 @@ def test_invalid_methods_fail_block(self, resource_group, location, storage_acco blob.commit_block_list(['block1']) self.assertEqual(str(e.exception), _ERROR_UNSUPPORTED_METHOD_FOR_ENCRYPTION) - @GlobalStorageAccountPreparer() - def test_invalid_methods_fail_append(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_invalid_methods_fail_append(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') blob_name = self._get_blob_reference(BlobType.AppendBlob) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -601,9 +594,9 @@ def test_invalid_methods_fail_append(self, resource_group, location, storage_acc blob.upload_blob(b'To encrypt', blob_type=BlobType.AppendBlob) self.assertEqual(str(e.exception), _ERROR_UNSUPPORTED_METHOD_FOR_ENCRYPTION) - @GlobalStorageAccountPreparer() - def test_invalid_methods_fail_page(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_invalid_methods_fail_page(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') blob_name = self._get_blob_reference(BlobType.PageBlob) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -617,9 +610,9 @@ def test_invalid_methods_fail_page(self, resource_group, location, storage_accou blob.create_page_blob(512) self.assertEqual(str(e.exception), _ERROR_UNSUPPORTED_METHOD_FOR_ENCRYPTION) - @GlobalStorageAccountPreparer() - def test_validate_encryption(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_validate_encryption(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True kek = KeyWrapper('key1') self.bsc.key_encryption_key = kek @@ -643,9 +636,9 @@ def test_validate_encryption(self, resource_group, location, storage_account, st self.assertEqual(self.bytes, content) - @GlobalStorageAccountPreparer() - def test_create_block_blob_from_star(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_create_block_blob_from_star(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self._create_blob_from_star(BlobType.BlockBlob, self.bytes, self.bytes) stream = BytesIO(self.bytes) @@ -660,9 +653,9 @@ def test_create_block_blob_from_star(self, resource_group, location, storage_acc self._create_blob_from_star(BlobType.BlockBlob, b'To encrypt', 'To encrypt') self._teardown(file_name) - @GlobalStorageAccountPreparer() - def test_create_page_blob_from_star(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_create_page_blob_from_star(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) content = self.get_random_bytes(512) self._create_blob_from_star(BlobType.PageBlob, content, content) @@ -690,9 +683,9 @@ def _create_blob_from_star(self, blob_type, content, data, **kwargs): self.assertEqual(content, blob_content) blob.delete_blob() - @GlobalStorageAccountPreparer() - def test_get_blob_to_star(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_star(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = self._create_small_blob(BlobType.BlockBlob) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_encryption_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_encryption_async.py index e67220966d54..7a5fe38c8dc8 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_encryption_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_encryption_async.py @@ -43,7 +43,7 @@ KeyResolver, RSAKeyWrapper, ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -73,12 +73,12 @@ async def send(self, request, **config): class StorageBlobEncryptionTestAsync(AsyncStorageTestCase): # --Helpers----------------------------------------------------------------- - async def _setup(self, storage_account, key): + async def _setup(self, storage_account_name, key): # test chunking functionality by reducing the threshold # for chunking and the size of each chunk, otherwise # the tests would take too long to execute self.bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=key, max_single_put_size=32 * 1024, max_block_size=4 * 1024, @@ -118,12 +118,11 @@ async def _create_small_blob(self, blob_type): # --Test cases for blob encryption ---------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_missing_attribute_kek_wrap_async(self, resource_group, location, storage_account, - storage_account_key): + async def test_missing_attribute_kek_wrap_async(self, storage_account_name, storage_account_key): # In the shared method _generate_blob_encryption_key - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True valid_key = KeyWrapper('key1') @@ -152,10 +151,10 @@ async def test_missing_attribute_kek_wrap_async(self, resource_group, location, with self.assertRaises(AttributeError): await self._create_small_blob(BlobType.BlockBlob) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_invalid_value_kek_wrap_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_invalid_value_kek_wrap_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') @@ -176,12 +175,11 @@ async def test_invalid_value_kek_wrap_async(self, resource_group, location, stor with self.assertRaises(AttributeError): await self._create_small_blob(BlobType.BlockBlob) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_missing_attribute_kek_unwrap_async(self, resource_group, location, storage_account, - storage_account_key): + async def test_missing_attribute_kek_unwrap_async(self, storage_account_name, storage_account_key): # Shared between all services in decrypt_blob - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True valid_key = KeyWrapper('key1') self.bsc.key_encryption_key = valid_key @@ -205,10 +203,10 @@ async def test_missing_attribute_kek_unwrap_async(self, resource_group, location await (await blob.download_blob()).content_as_bytes() @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_invalid_value_kek_unwrap_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_invalid_value_kek_unwrap_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = await self._create_small_blob(BlobType.BlockBlob) @@ -221,10 +219,10 @@ async def test_invalid_value_kek_unwrap_async(self, resource_group, location, st await (await blob.download_blob()).content_as_bytes() self.assertEqual(str(e.exception), 'Decryption failed.') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_kek_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_kek_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = await self._create_small_blob(BlobType.BlockBlob) @@ -235,10 +233,10 @@ async def test_get_blob_kek_async(self, resource_group, location, storage_accoun # Assert self.assertEqual(content, self.bytes) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_resolver_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_resolver_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') key_resolver = KeyResolver() @@ -254,13 +252,13 @@ async def test_get_blob_resolver_async(self, resource_group, location, storage_a self.assertEqual(content, self.bytes) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_kek_RSA_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_kek_RSA_async(self, storage_account_name, storage_account_key): # We can only generate random RSA keys, so this must be run live or # the playback test will fail due to a change in kek values. - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = RSAKeyWrapper('key2') blob = await self._create_small_blob(BlobType.BlockBlob) @@ -275,10 +273,10 @@ async def test_get_blob_kek_RSA_async(self, resource_group, location, storage_ac self.assertEqual(data, self.bytes) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_nonmatching_kid_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_nonmatching_kid_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = await self._create_small_blob(BlobType.BlockBlob) @@ -291,11 +289,10 @@ async def test_get_blob_nonmatching_kid_async(self, resource_group, location, st await (await blob.download_blob()).content_as_bytes() self.assertEqual(str(e.exception), 'Decryption failed.') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_invalid_stream_type_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_put_blob_invalid_stream_type_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') small_stream = StringIO(u'small') @@ -315,12 +312,11 @@ async def test_put_blob_invalid_stream_type_async(self, resource_group, location self.assertTrue('Blob data should be of type bytes.' in str(e.exception)) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_chnking_reqd_mult_of_block_size_async(self, resource_group, location, storage_account, - storage_account_key): + async def test_put_blob_chnking_reqd_mult_of_block_size_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes( @@ -336,12 +332,11 @@ async def test_put_blob_chnking_reqd_mult_of_block_size_async(self, resource_gro self.assertEqual(content, blob_content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_chnking_reqd_non_mult_of_block_size_async(self, resource_group, location, - storage_account, storage_account_key): + async def test_put_blob_chnking_reqd_non_mult_of_block_size_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = urandom(self.config.max_single_put_size + 1) @@ -356,12 +351,11 @@ async def test_put_blob_chnking_reqd_non_mult_of_block_size_async(self, resource self.assertEqual(content, blob_content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_chunking_required_range_specified_async(self, resource_group, location, storage_account, - storage_account_key): + async def test_put_blob_chunking_required_range_specified_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(self.config.max_single_put_size * 2) @@ -378,11 +372,10 @@ async def test_put_blob_chunking_required_range_specified_async(self, resource_g # Assert self.assertEqual(content[:self.config.max_single_put_size + 53], blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_blob_single_shot_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_put_block_blob_single_shot_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = b'small' @@ -396,10 +389,10 @@ async def test_put_block_blob_single_shot_async(self, resource_group, location, # Assert self.assertEqual(content, blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_range_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_put_blob_range_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') content = b'Random repeats' * self.config.max_single_put_size * 5 @@ -419,10 +412,10 @@ async def test_put_blob_range_async(self, resource_group, location, storage_acco # Assert self.assertEqual(content[2:2 + self.config.max_single_put_size + 5], blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_empty_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_put_blob_empty_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = b'' @@ -436,11 +429,10 @@ async def test_put_blob_empty_async(self, resource_group, location, storage_acco # Assert self.assertEqual(content, blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_serial_upload_chunking_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_put_blob_serial_upload_chunking_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(self.config.max_single_put_size + 1) @@ -454,11 +446,10 @@ async def test_put_blob_serial_upload_chunking_async(self, resource_group, locat # Assert self.assertEqual(content, blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_range_beginning_to_middle_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_range_beginning_to_middle_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -472,11 +463,10 @@ async def test_get_blob_range_beginning_to_middle_async(self, resource_group, lo # Assert self.assertEqual(content[:50], blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_range_middle_to_end_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_range_middle_to_end_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -492,11 +482,10 @@ async def test_get_blob_range_middle_to_end_async(self, resource_group, location self.assertEqual(content[100:], blob_content) self.assertEqual(content[100:], blob_content2) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_range_middle_to_middle_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_range_middle_to_middle_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -510,11 +499,10 @@ async def test_get_blob_range_middle_to_middle_async(self, resource_group, locat # Assert self.assertEqual(content[5:98], blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_range_aligns_on_16_byte_block_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_range_aligns_on_16_byte_block_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -528,11 +516,10 @@ async def test_get_blob_range_aligns_on_16_byte_block_async(self, resource_group # Assert self.assertEqual(content[48:64], blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_range_expnded_to_begin_bloc_align_async(self, resource_group, location, - storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_range_expnded_to_begin_bloc_align_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -546,11 +533,10 @@ async def test_get_blob_range_expnded_to_begin_bloc_align_async(self, resource_g # Assert self.assertEqual(content[5:55], blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_range_expanded_to_beginning_iv_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_range_expanded_to_beginning_iv_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') self.bsc.require_encryption = True content = self.get_random_bytes(128) @@ -564,10 +550,10 @@ async def test_get_blob_range_expanded_to_beginning_iv_async(self, resource_grou # Assert self.assertEqual(content[22:42], blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_blob_strict_mode_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_put_blob_strict_mode_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True content = urandom(512) @@ -594,11 +580,10 @@ async def test_put_blob_strict_mode_async(self, resource_group, location, storag await blob.upload_blob('To encrypt', blob_type=service) self._teardown(file_name) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_strict_mode_no_policy_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_strict_mode_no_policy_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = await self._create_small_blob(BlobType.BlockBlob) @@ -610,11 +595,10 @@ async def test_get_blob_strict_mode_no_policy_async(self, resource_group, locati with self.assertRaises(ValueError): await (await blob.download_blob()).content_as_bytes() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_strict_mode_unencrypted_blob_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_strict_mode_unencrypted_blob_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) blob = await self._create_small_blob(BlobType.BlockBlob) # Act @@ -625,11 +609,10 @@ async def test_get_blob_strict_mode_unencrypted_blob_async(self, resource_group, with self.assertRaises(HttpResponseError): await (await blob.download_blob()).content_as_bytes() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_invalid_methods_fail_block_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_invalid_methods_fail_block_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') blob_name = self._get_blob_reference(BlobType.BlockBlob) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -643,11 +626,10 @@ async def test_invalid_methods_fail_block_async(self, resource_group, location, await blob.commit_block_list(['block1']) self.assertEqual(str(e.exception), _ERROR_UNSUPPORTED_METHOD_FOR_ENCRYPTION) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_invalid_methods_fail_append_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_invalid_methods_fail_append_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') blob_name = self._get_blob_reference(BlobType.AppendBlob) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -666,11 +648,10 @@ async def test_invalid_methods_fail_append_async(self, resource_group, location, await blob.upload_blob(b'To encrypt', blob_type=BlobType.AppendBlob) self.assertEqual(str(e.exception), _ERROR_UNSUPPORTED_METHOD_FOR_ENCRYPTION) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_invalid_methods_fail_page_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_invalid_methods_fail_page_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.key_encryption_key = KeyWrapper('key1') blob_name = self._get_blob_reference(BlobType.PageBlob) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -684,10 +665,10 @@ async def test_invalid_methods_fail_page_async(self, resource_group, location, s await blob.create_page_blob(512) self.assertEqual(str(e.exception), _ERROR_UNSUPPORTED_METHOD_FOR_ENCRYPTION) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_validate_encryption_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_validate_encryption_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True kek = KeyWrapper('key1') self.bsc.key_encryption_key = kek @@ -711,11 +692,10 @@ async def test_validate_encryption_async(self, resource_group, location, storage self.assertEqual(self.bytes, content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_block_blob_from_star_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_create_block_blob_from_star_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) await self._create_blob_from_star(BlobType.BlockBlob, "blob1", self.bytes, self.bytes) stream = BytesIO(self.bytes) @@ -730,11 +710,10 @@ async def test_create_block_blob_from_star_async(self, resource_group, location, await self._create_blob_from_star(BlobType.BlockBlob, "blob4", b'To encrypt', 'To encrypt') self._teardown(file_name) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_page_blob_from_star_async(self, resource_group, location, storage_account, - storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_create_page_blob_from_star_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) content = self.get_random_bytes(512) await self._create_blob_from_star(BlobType.PageBlob, "blob1", content, content) @@ -758,10 +737,10 @@ async def _create_blob_from_star(self, blob_type, blob_name, content, data, **kw blob_content = await (await blob.download_blob()).content_as_bytes() self.assertEqual(content, blob_content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_star_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_get_blob_to_star_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) self.bsc.require_encryption = True self.bsc.key_encryption_key = KeyWrapper('key1') blob = await self._create_small_blob(BlobType.BlockBlob) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_retry.py b/sdk/storage/azure-storage-blob/tests/test_blob_retry.py index d88be2c8cece..79fdc2e5d803 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_retry.py @@ -15,7 +15,7 @@ ) from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, ResponseCallback from azure.core.exceptions import ResourceExistsError, HttpResponseError -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # test constants @@ -52,10 +52,10 @@ def tell(self): return self.wrapped_stream.tell() @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_retry_put_block_with_seekable_stream(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_retry_put_block_with_seekable_stream(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, retry_policy=self.retry) self._setup(bsc) blob_name = self.get_resource_name('blob') @@ -84,11 +84,10 @@ def test_retry_put_block_with_seekable_stream(self, resource_group, location, st self.assertEqual(content, data) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_retry_put_block_with_non_seekable_stream(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_retry_put_block_with_non_seekable_stream(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, retry_policy=self.retry) self._setup(bsc) blob_name = self.get_resource_name('blob') @@ -118,11 +117,10 @@ def test_retry_put_block_with_non_seekable_stream(self, resource_group, location self.assertEqual(content, data) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_retry_put_block_with_non_seekable_stream_fail(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_retry_put_block_with_non_seekable_stream_fail(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, retry_policy=self.retry) self._setup(bsc) blob_name = self.get_resource_name('blob') diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_retry_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_retry_async.py index 3e66c7003211..fbbe0d79d536 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_retry_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_retry_async.py @@ -18,7 +18,7 @@ from azure.core.exceptions import ResourceExistsError, HttpResponseError from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # test constants @@ -66,14 +66,13 @@ def tell(self): return self.wrapped_stream.tell() @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retry_put_block_with_seekable_stream_async(self, resource_group, location, storage_account, - storage_account_key): + async def test_retry_put_block_with_seekable_stream_async(self, storage_account_name, storage_account_key): pytest.skip("Aiohttp closes stream after request - cannot rewind.") # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, retry_policy=self.retry, transport=AiohttpTestTransport()) await self._setup(bsc) blob_name = self.get_resource_name('blob') @@ -102,12 +101,11 @@ async def test_retry_put_block_with_seekable_stream_async(self, resource_group, self.assertEqual(content, data) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retry_put_block_with_non_seekable_stream_async(self, resource_group, location, storage_account, - storage_account_key): + async def test_retry_put_block_with_non_seekable_stream_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, retry_policy=self.retry, transport=AiohttpTestTransport()) await self._setup(bsc) blob_name = self.get_resource_name('blob') @@ -137,12 +135,11 @@ async def test_retry_put_block_with_non_seekable_stream_async(self, resource_gro self.assertEqual(content, data) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retry_put_block_with_non_seekable_stream_fail_async(self, resource_group, location, storage_account, - storage_account_key): + async def test_retry_put_block_with_non_seekable_stream_fail_async(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, retry_policy=self.retry, transport=AiohttpTestTransport()) await self._setup(bsc) blob_name = self.get_resource_name('blob') diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py index a4bd7697c1ef..a322f5cbce57 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties.py @@ -21,7 +21,7 @@ StaticWebsite, ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -106,10 +106,10 @@ def _assert_retention_equal(self, ret1, ret2): # --Test cases per service --------------------------------------- - @GlobalStorageAccountPreparer() - def test_blob_service_properties(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_blob_service_properties(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) # Act resp = bsc.set_service_properties( analytics_logging=BlobAnalyticsLogging(), @@ -126,16 +126,16 @@ def test_blob_service_properties(self, resource_group, location, storage_account self.assertEqual('2014-02-14', props['target_version']) # --Test cases per feature --------------------------------------- - @GlobalStorageAccountPreparer() - def test_empty_set_service_properties_exception(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_empty_set_service_properties_exception(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) with self.assertRaises(ValueError): bsc.set_service_properties() - @GlobalStorageAccountPreparer() - def test_set_default_service_version(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_set_default_service_version(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) # Act bsc.set_service_properties(target_version='2014-02-14') @@ -143,9 +143,9 @@ def test_set_default_service_version(self, resource_group, location, storage_acc received_props = bsc.get_service_properties() self.assertEqual(received_props['target_version'], '2014-02-14') - @GlobalStorageAccountPreparer() - def test_set_delete_retention_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_delete_retention_policy(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) delete_retention_policy = RetentionPolicy(enabled=True, days=2) # Act @@ -155,9 +155,9 @@ def test_set_delete_retention_policy(self, resource_group, location, storage_acc received_props = bsc.get_service_properties() self._assert_delete_retention_policy_equal(received_props['delete_retention_policy'], delete_retention_policy) - @GlobalStorageAccountPreparer() - def test_set_delete_retention_policy_edge_cases(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_delete_retention_policy_edge_cases(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) delete_retention_policy = RetentionPolicy(enabled=True, days=1) bsc.set_service_properties(delete_retention_policy=delete_retention_policy) @@ -193,9 +193,9 @@ def test_set_delete_retention_policy_edge_cases(self, resource_group, location, received_props = bsc.get_service_properties() self._assert_delete_retention_policy_not_equal(received_props['delete_retention_policy'], delete_retention_policy) - @GlobalStorageAccountPreparer() - def test_set_disabled_delete_retention_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_disabled_delete_retention_policy(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) delete_retention_policy = RetentionPolicy(enabled=False) # Act @@ -205,9 +205,9 @@ def test_set_disabled_delete_retention_policy(self, resource_group, location, st received_props = bsc.get_service_properties() self._assert_delete_retention_policy_equal(received_props['delete_retention_policy'], delete_retention_policy) - @GlobalStorageAccountPreparer() - def test_set_static_website_properties(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_static_website_properties(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) static_website = StaticWebsite( enabled=True, index_document="index.html", @@ -220,9 +220,9 @@ def test_set_static_website_properties(self, resource_group, location, storage_a received_props = bsc.get_service_properties() self._assert_static_website_equal(received_props['static_website'], static_website) - @GlobalStorageAccountPreparer() - def test_set_static_website_properties_with_default_index_document_path(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_static_website_properties_with_default_index_document_path(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) static_website = StaticWebsite( enabled=True, error_document404_path="errors/error/404error.html", @@ -235,9 +235,9 @@ def test_set_static_website_properties_with_default_index_document_path(self, re received_props = bsc.get_service_properties() self._assert_static_website_equal(received_props['static_website'], static_website) - @GlobalStorageAccountPreparer() - def test_set_static_website_properties_missing_field(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_static_website_properties_missing_field(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) # Case1: Arrange both missing static_website = StaticWebsite(enabled=True) @@ -269,9 +269,9 @@ def test_set_static_website_properties_missing_field(self, resource_group, locat received_props = bsc.get_service_properties() self._assert_static_website_equal(received_props['static_website'], static_website) - @GlobalStorageAccountPreparer() - def test_disabled_static_website_properties(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_disabled_static_website_properties(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) static_website = StaticWebsite(enabled=False, index_document="index.html", error_document404_path="errors/error/404error.html") @@ -282,9 +282,9 @@ def test_disabled_static_website_properties(self, resource_group, location, stor received_props = bsc.get_service_properties() self._assert_static_website_equal(received_props['static_website'], StaticWebsite(enabled=False)) - @GlobalStorageAccountPreparer() - def test_set_static_website_props_dont_impact_other_props(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_static_website_props_dont_impact_other_props(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] @@ -320,9 +320,9 @@ def test_set_static_website_props_dont_impact_other_props(self, resource_group, self._assert_static_website_equal(received_props['static_website'], static_website) self._assert_cors_equal(received_props['cors'], cors) - @GlobalStorageAccountPreparer() - def test_set_logging(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_logging(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) logging = BlobAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -332,9 +332,9 @@ def test_set_logging(self, resource_group, location, storage_account, storage_ac received_props = bsc.get_service_properties() self._assert_logging_equal(received_props['analytics_logging'], logging) - @GlobalStorageAccountPreparer() - def test_set_hour_metrics(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_hour_metrics(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -344,9 +344,9 @@ def test_set_hour_metrics(self, resource_group, location, storage_account, stora received_props = bsc.get_service_properties() self._assert_metrics_equal(received_props['hour_metrics'], hour_metrics) - @GlobalStorageAccountPreparer() - def test_set_minute_metrics(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_minute_metrics(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) @@ -357,9 +357,9 @@ def test_set_minute_metrics(self, resource_group, location, storage_account, sto received_props = bsc.get_service_properties() self._assert_metrics_equal(received_props['minute_metrics'], minute_metrics) - @GlobalStorageAccountPreparer() - def test_set_cors(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_set_cors(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] @@ -384,16 +384,16 @@ def test_set_cors(self, resource_group, location, storage_account, storage_accou self._assert_cors_equal(received_props['cors'], cors) # --Test cases for errors --------------------------------------- - @GlobalStorageAccountPreparer() - def test_retention_no_days(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_retention_no_days(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) self.assertRaises(ValueError, RetentionPolicy, True, None) - @GlobalStorageAccountPreparer() - def test_too_many_cors_rules(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_too_many_cors_rules(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) cors = [] for i in range(0, 6): cors.append(CorsRule(['www.xyz.com'], ['GET'])) @@ -402,9 +402,9 @@ def test_too_many_cors_rules(self, resource_group, location, storage_account, st self.assertRaises(HttpResponseError, bsc.set_service_properties, None, None, None, cors) - @GlobalStorageAccountPreparer() - def test_retention_too_long(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key) + @BlobPreparer() + def test_retention_too_long(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=366)) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py index 342f74f25dea..fe75d38c0765 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_service_properties_async.py @@ -28,7 +28,7 @@ RetentionPolicy, StaticWebsite, ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase @@ -121,17 +121,17 @@ def _assert_retention_equal(self, ret1, ret2): self.assertEqual(ret1.days, ret2.days) # --Test cases per service --------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_empty_set_service_properties_exception(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_empty_set_service_properties_exception(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) with self.assertRaises(ValueError): await bsc.set_service_properties() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_blob_service_properties(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_blob_service_properties(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) # Act resp = await bsc.set_service_properties( @@ -149,10 +149,10 @@ async def test_blob_service_properties(self, resource_group, location, storage_a self.assertEqual('2014-02-14', props['target_version']) # --Test cases per feature --------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_default_service_version(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_default_service_version(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) # Act await bsc.set_service_properties(target_version='2014-02-14') @@ -161,10 +161,10 @@ async def test_set_default_service_version(self, resource_group, location, stora received_props = await bsc.get_service_properties() self.assertEqual(received_props['target_version'], '2014-02-14') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_delete_retention_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_delete_retention_policy(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) delete_retention_policy = RetentionPolicy(enabled=True, days=2) # Act @@ -174,11 +174,11 @@ async def test_set_delete_retention_policy(self, resource_group, location, stora received_props = await bsc.get_service_properties() self._assert_delete_retention_policy_equal(received_props['delete_retention_policy'], delete_retention_policy) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_delete_retention_policy_edge_cases(self, resource_group, location, storage_account, storage_account_key): + async def test_set_delete_retention_policy_edge_cases(self, storage_account_name, storage_account_key): # Should work with minimum settings - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) delete_retention_policy = RetentionPolicy(enabled=True, days=1) await bsc.set_service_properties(delete_retention_policy=delete_retention_policy) @@ -215,10 +215,10 @@ async def test_set_delete_retention_policy_edge_cases(self, resource_group, loca received_props = await bsc.get_service_properties() self._assert_delete_retention_policy_not_equal(received_props['delete_retention_policy'], delete_retention_policy) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_disabled_delete_retention_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_disabled_delete_retention_policy(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) delete_retention_policy = RetentionPolicy(enabled=False) # Act @@ -228,10 +228,10 @@ async def test_set_disabled_delete_retention_policy(self, resource_group, locati received_props = await bsc.get_service_properties() self._assert_delete_retention_policy_equal(received_props['delete_retention_policy'], delete_retention_policy) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_static_website_properties(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_static_website_properties(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) static_website = StaticWebsite( enabled=True, index_document="index.html", @@ -244,10 +244,10 @@ async def test_set_static_website_properties(self, resource_group, location, sto received_props = await bsc.get_service_properties() self._assert_static_website_equal(received_props['static_website'], static_website) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_static_website_properties_with_default_index_document_path(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_static_website_properties_with_default_index_document_path(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) static_website = StaticWebsite( enabled=True, error_document404_path="errors/error/404error.html", @@ -260,11 +260,11 @@ async def test_set_static_website_properties_with_default_index_document_path(se received_props = await bsc.get_service_properties() self._assert_static_website_equal(received_props['static_website'], static_website) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_static_web_props_missing_field(self, resource_group, location, storage_account, storage_account_key): + async def test_set_static_web_props_missing_field(self, storage_account_name, storage_account_key): # Case1: Arrange both missing - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) static_website = StaticWebsite(enabled=True) @@ -295,10 +295,10 @@ async def test_set_static_web_props_missing_field(self, resource_group, location received_props = await bsc.get_service_properties() self._assert_static_website_equal(received_props['static_website'], static_website) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_disabled_static_website_properties(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_disabled_static_website_properties(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) static_website = StaticWebsite(enabled=False, index_document="index.html", error_document404_path="errors/error/404error.html") @@ -309,10 +309,10 @@ async def test_disabled_static_website_properties(self, resource_group, location received_props = await bsc.get_service_properties() self._assert_static_website_equal(received_props['static_website'], StaticWebsite(enabled=False)) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_static_webprops_no_impact_other_props(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_static_webprops_no_impact_other_props(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] @@ -336,7 +336,7 @@ async def test_set_static_webprops_no_impact_other_props(self, resource_group, l received_props = await bsc.get_service_properties() self._assert_cors_equal(received_props['cors'], cors) - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) static_website = StaticWebsite(enabled=True, index_document="index.html", error_document404_path="errors/error/404error.html") @@ -348,10 +348,10 @@ async def test_set_static_webprops_no_impact_other_props(self, resource_group, l self._assert_static_website_equal(received_props['static_website'], static_website) self._assert_cors_equal(received_props['cors'], cors) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_logging(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_logging(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) logging = BlobAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -361,10 +361,10 @@ async def test_set_logging(self, resource_group, location, storage_account, stor received_props = await bsc.get_service_properties() self._assert_logging_equal(received_props['analytics_logging'], logging) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_hour_metrics(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_hour_metrics(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -374,10 +374,10 @@ async def test_set_hour_metrics(self, resource_group, location, storage_account, received_props = await bsc.get_service_properties() self._assert_metrics_equal(received_props['hour_metrics'], hour_metrics) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_minute_metrics(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_minute_metrics(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) @@ -388,10 +388,10 @@ async def test_set_minute_metrics(self, resource_group, location, storage_accoun received_props = await bsc.get_service_properties() self._assert_metrics_equal(received_props['minute_metrics'], minute_metrics) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_cors(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_set_cors(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] @@ -415,18 +415,18 @@ async def test_set_cors(self, resource_group, location, storage_account, storage received_props = await bsc.get_service_properties() self._assert_cors_equal(received_props['cors'], cors) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retention_no_days(self, resource_group, location, storage_account, storage_account_key): + async def test_retention_no_days(self, storage_account_name, storage_account_key): # Assert self.assertRaises(ValueError, RetentionPolicy, True, None) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_too_many_cors_rules(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_too_many_cors_rules(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) cors = [] for i in range(0, 6): cors.append(CorsRule(['www.xyz.com'], ['GET'])) @@ -435,10 +435,10 @@ async def test_too_many_cors_rules(self, resource_group, location, storage_accou with self.assertRaises(HttpResponseError): await bsc.set_service_properties(None, None, None, cors) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retention_too_long(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_retention_too_long(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport()) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=366)) diff --git a/sdk/storage/azure-storage-blob/tests/test_blob_service_stats.py b/sdk/storage/azure-storage-blob/tests/test_blob_service_stats.py index 1de16c8a6538..89694c7b28df 100644 --- a/sdk/storage/azure-storage-blob/tests/test_blob_service_stats.py +++ b/sdk/storage/azure-storage-blob/tests/test_blob_service_stats.py @@ -7,10 +7,9 @@ import pytest from azure.storage.blob import BlobServiceClient -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from devtools_testutils.storage import StorageTestCase -from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer +from settings.testcase import BlobPreparer SERVICE_UNAVAILABLE_RESP_BODY = 'unavailable 0) self.assertIsNone(blobs[0].snapshot) - @GlobalStorageAccountPreparer() - def test_delete_blob_with_snapshots(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_delete_blob_with_snapshots(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) blob.create_snapshot() @@ -952,10 +946,10 @@ def test_delete_blob_with_snapshots(self, resource_group, location, storage_acco self.assertEqual(len(blobs), 0) - @GlobalStorageAccountPreparer() - def test_soft_delete_blob_without_snapshots(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_soft_delete_blob_without_snapshots(self, storage_account_name, storage_account_key): try: - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self._enable_soft_delete() blob_name = self._create_block_blob() @@ -988,10 +982,10 @@ def test_soft_delete_blob_without_snapshots(self, resource_group, location, stor self._disable_soft_delete() - @GlobalStorageAccountPreparer() - def test_soft_delete_single_blob_snapshot(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_soft_delete_single_blob_snapshot(self, storage_account_name, storage_account_key): try: - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self._enable_soft_delete() blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1035,10 +1029,10 @@ def test_soft_delete_single_blob_snapshot(self, resource_group, location, storag self._disable_soft_delete() - @GlobalStorageAccountPreparer() - def test_soft_delete_only_snapshots_of_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_soft_delete_only_snapshots_of_blob(self, storage_account_name, storage_account_key): try: - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self._enable_soft_delete() blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1079,10 +1073,10 @@ def test_soft_delete_only_snapshots_of_blob(self, resource_group, location, stor self._disable_soft_delete() - @GlobalStorageAccountPreparer() - def test_soft_delete_blob_including_all_snapshots(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_soft_delete_blob_including_all_snapshots(self, storage_account_name, storage_account_key): try: - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self._enable_soft_delete() blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1118,10 +1112,10 @@ def test_soft_delete_blob_including_all_snapshots(self, resource_group, location self._disable_soft_delete() - @GlobalStorageAccountPreparer() - def test_soft_delete_with_leased_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_soft_delete_with_leased_blob(self, storage_account_name, storage_account_key): try: - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) self._enable_soft_delete() blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1157,10 +1151,10 @@ def test_soft_delete_with_leased_blob(self, resource_group, location, storage_ac finally: self._disable_soft_delete() - @GlobalStorageAccountPreparer() - def test_start_copy_from_url_with_oauth(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_start_copy_from_url_with_oauth(self, storage_account_name, storage_account_key): # Arrange - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) # Create source blob source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = self._create_source_blob(data=source_blob_data) @@ -1179,15 +1173,15 @@ def test_start_copy_from_url_with_oauth(self, resource_group, location, storage_ destination_blob_data = destination_blob_client.download_blob().readall() self.assertEqual(source_blob_data, destination_blob_data) - @GlobalStorageAccountPreparer() - def test_copy_blob_with_existing_blob(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_copy_blob_with_existing_blob(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(storage_account_name, "blob"), self.container_name, blob_name) copyblob = self.bsc.get_blob_client(self.container_name, 'blob1copy') copy = copyblob.start_copy_from_url(sourceblob) @@ -1201,10 +1195,9 @@ def test_copy_blob_with_existing_blob(self, resource_group, location, storage_ac copy_content = copyblob.download_blob().readall() self.assertEqual(copy_content, self.byte_data) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - def test_copy_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_copy_blob_with_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: @@ -1213,12 +1206,12 @@ def test_copy_blob_with_immutability_policy(self, resource_group, location, stor mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) blob_name = self._create_block_blob() # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(versioned_storage_account_name, "blob"), self.container_name, blob_name) copyblob = self.bsc.get_blob_client(container_name, 'blob1copy') immutability_policy = ImmutabilityPolicy(expiry_time=datetime.utcnow() + timedelta(seconds=5), @@ -1241,12 +1234,11 @@ def test_copy_blob_with_immutability_policy(self, resource_group, location, stor copyblob.delete_immutability_policy() copyblob.set_legal_hold(False) copyblob.delete_blob() - mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - def test_async_copy_blob_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_async_copy_blob_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): + self._setup(blob_storage_account_name, blob_storage_account_key) source_tags = {"source": "source tag"} blob_name = self._create_block_blob(overwrite=True, tags=source_tags) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1254,7 +1246,7 @@ def test_async_copy_blob_with_if_tags(self, resource_group, location, storage_ac # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(blob_storage_account_name, "blob"), self.container_name, blob_name) copyblob = self.bsc.get_blob_client(self.container_name, 'blob1copy') copyblob.upload_blob("abc", overwrite=True) @@ -1291,15 +1283,15 @@ def test_async_copy_blob_with_if_tags(self, resource_group, location, storage_ac self.assertEqual(copy_content, self.byte_data) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_copy_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_copy_blob_returns_vid(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(storage_account_name, "blob"), self.container_name, blob_name) copyblob = self.bsc.get_blob_client(self.container_name, 'blob1copy') copy = copyblob.start_copy_from_url(sourceblob) @@ -1314,17 +1306,17 @@ def test_copy_blob_returns_vid(self, resource_group, location, storage_account, copy_content = copyblob.download_blob().readall() self.assertEqual(copy_content, self.byte_data) - @GlobalStorageAccountPreparer() - def test_copy_blob_with_blob_tier_specified(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_copy_blob_with_blob_tier_specified(self, storage_account_name, storage_account_key): pytest.skip("Unable to set premium account") # Arrange - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() self.bsc.get_blob_client(self.container_name, blob_name) # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(storage_account_name, "blob"), self.container_name, blob_name) copyblob = self.bsc.get_blob_client(self.container_name, 'blob1copy') blob_tier = StandardBlobTier.Cool @@ -1336,16 +1328,16 @@ def test_copy_blob_with_blob_tier_specified(self, resource_group, location, stor self.assertEqual(copy_blob_properties.blob_tier, blob_tier) - @GlobalStorageAccountPreparer() - def test_copy_blob_with_rehydrate_priority(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_copy_blob_with_rehydrate_priority(self, storage_account_name, storage_account_key): # Arrange pytest.skip("Unabe to set up premium storage account type") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(storage_account_name, "blob"), self.container_name, blob_name) blob_tier = StandardBlobTier.Archive rehydrate_priority = RehydratePriority.high @@ -1381,11 +1373,10 @@ def test_copy_blob_with_rehydrate_priority(self, resource_group, location, stora # self.assertEqual(props.copy.status, 'success') # self.assertIsNotNone(props.copy.id) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_copy_blob_async_private_blob_no_sas(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key) - self._setup_remote(rmt, rmt_key) + @BlobPreparer() + def test_copy_blob_async_private_blob_no_sas(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key) + self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) self._create_remote_container() source_blob = self._create_remote_block_blob() @@ -1397,12 +1388,11 @@ def test_copy_blob_async_private_blob_no_sas(self, resource_group, location, sto with self.assertRaises(ClientAuthenticationError): target_blob.start_copy_from_url(source_blob.url) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_copy_blob_async_private_blob_with_sas(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_copy_blob_async_private_blob_with_sas(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - self._setup_remote(rmt, rmt_key) + self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) self._create_remote_container() source_blob = self._create_remote_block_blob(blob_data=data) sas_token = generate_blob_sas( @@ -1428,9 +1418,9 @@ def test_copy_blob_async_private_blob_with_sas(self, resource_group, location, s self.assertEqual(actual_data.readall(), data) - @GlobalStorageAccountPreparer() - def test_abort_copy_blob(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_abort_copy_blob(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_blob = "https://www.gutenberg.org/files/59466/59466-0.txt" copied_blob = self.bsc.get_blob_client(self.container_name, '59466-0.txt') @@ -1448,9 +1438,9 @@ def test_abort_copy_blob(self, resource_group, location, storage_account, storag self.assertEqual(actual_data.properties.copy.status, 'aborted') - @GlobalStorageAccountPreparer() - def test_abort_copy_blob_with_synchronous_copy_fails(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_abort_copy_blob_with_synchronous_copy_fails(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_blob_name = self._create_block_blob() source_blob = self.bsc.get_blob_client(self.container_name, source_blob_name) @@ -1466,9 +1456,9 @@ def test_abort_copy_blob_with_synchronous_copy_fails(self, resource_group, locat self.assertEqual(copy_resp['copy_status'], 'success') - @GlobalStorageAccountPreparer() - def test_snapshot_blob(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_snapshot_blob(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() # Act @@ -1480,9 +1470,9 @@ def test_snapshot_blob(self, resource_group, location, storage_account, storage_ self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() - def test_lease_blob_acquire_and_release(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_lease_blob_acquire_and_release(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() # Act @@ -1496,9 +1486,9 @@ def test_lease_blob_acquire_and_release(self, resource_group, location, storage_ self.assertIsNotNone(lease2) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_duration(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_lease_blob_with_duration(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() # Act @@ -1512,9 +1502,9 @@ def test_lease_blob_with_duration(self, resource_group, location, storage_accoun blob.upload_blob(b'hello 3', length=7, lease=lease) - @GlobalStorageAccountPreparer() - def test_lease_blob_with_proposed_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_lease_blob_with_proposed_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() # Act @@ -1526,9 +1516,9 @@ def test_lease_blob_with_proposed_lease_id(self, resource_group, location, stora self.assertEqual(lease.id, lease_id) - @GlobalStorageAccountPreparer() - def test_lease_blob_change_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_lease_blob_change_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() # Act @@ -1544,9 +1534,9 @@ def test_lease_blob_change_lease_id(self, resource_group, location, storage_acco self.assertEqual(lease.id, lease_id) - @GlobalStorageAccountPreparer() - def test_lease_blob_break_period(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_lease_blob_break_period(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() # Act @@ -1566,9 +1556,9 @@ def test_lease_blob_break_period(self, resource_group, location, storage_account self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() - def test_lease_blob_acquire_and_renew(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_lease_blob_acquire_and_renew(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() # Act @@ -1581,9 +1571,9 @@ def test_lease_blob_acquire_and_renew(self, resource_group, location, storage_ac self.assertEqual(first_id, lease.id) - @GlobalStorageAccountPreparer() - def test_lease_blob_acquire_twice_fails(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_lease_blob_acquire_twice_fails(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) lease = blob.acquire_lease() @@ -1596,9 +1586,9 @@ def test_lease_blob_acquire_twice_fails(self, resource_group, location, storage_ self.assertIsNotNone(lease.id) - @GlobalStorageAccountPreparer() - def test_unicode_get_blob_unicode_name(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_unicode_get_blob_unicode_name(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = '啊齄丂狛狜' blob = self.bsc.get_blob_client(self.container_name, blob_name) blob.upload_blob(b'hello world') @@ -1610,9 +1600,9 @@ def test_unicode_get_blob_unicode_name(self, resource_group, location, storage_a self.assertEqual(data.readall(), b'hello world') - @GlobalStorageAccountPreparer() - def test_create_blob_blob_unicode_data(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_create_blob_blob_unicode_data(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1624,9 +1614,9 @@ def test_create_blob_blob_unicode_data(self, resource_group, location, storage_a self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() - def test_no_sas_private_blob(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_no_sas_private_blob(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1638,9 +1628,9 @@ def test_no_sas_private_blob(self, resource_group, location, storage_account, st self.assertNotEqual(-1, response.text.find('ResourceNotFound')) - @GlobalStorageAccountPreparer() - def test_no_sas_public_blob(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_no_sas_public_blob(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) data = b'a public blob can be read without a shared access signature' blob_name = 'blob1.txt' container_name = self._get_container_reference() @@ -1658,9 +1648,9 @@ def test_no_sas_public_blob(self, resource_group, location, storage_account, sto self.assertEqual(data, response.content) - @GlobalStorageAccountPreparer() - def test_public_access_blob(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_public_access_blob(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) data = b'public access blob' blob_name = 'blob1.txt' container_name = self._get_container_reference() @@ -1679,11 +1669,11 @@ def test_public_access_blob(self, resource_group, location, storage_account, sto self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_sas_access_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_sas_access_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1706,23 +1696,26 @@ def test_sas_access_blob(self, resource_group, location, storage_account, storag self.assertEqual(self.byte_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_sas_access_blob_snapshot(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_sas_access_blob_snapshot(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob_client = self.bsc.get_blob_client(self.container_name, blob_name) blob_snapshot = blob_client.create_snapshot() blob_snapshot_client = self.bsc.get_blob_client(self.container_name, blob_name, snapshot=blob_snapshot) + permission = BlobSasPermissions(read=True, write=True, delete=True, delete_previous_version=True, + permanent_delete=True, list=True, add=True, create=True, update=True) + self.assertIn('y', str(permission)) token = generate_blob_sas( blob_snapshot_client.account_name, blob_snapshot_client.container_name, blob_snapshot_client.blob_name, snapshot=blob_snapshot_client.snapshot, account_key=blob_snapshot_client.credential.account_key, - permission=BlobSasPermissions(read=True, delete=True), + permission=permission, expiry=datetime.utcnow() + timedelta(hours=1), ) @@ -1742,11 +1735,11 @@ def test_sas_access_blob_snapshot(self, resource_group, location, storage_accoun service.get_blob_properties() @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_sas_signed_identifier(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_sas_signed_identifier(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() container = self.bsc.get_container_client(self.container_name) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1776,11 +1769,11 @@ def test_sas_signed_identifier(self, resource_group, location, storage_account, self.assertEqual(self.byte_data, result) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_account_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_account_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() token = generate_account_sas( @@ -1806,12 +1799,11 @@ def test_account_sas(self, resource_group, location, storage_account, storage_ac self.assertTrue(container_response.ok) @pytest.mark.live_test_only - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - def test_set_immutability_policy_using_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_set_immutability_policy_using_sas(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: @@ -1820,7 +1812,7 @@ def test_set_immutability_policy_using_sas(self, resource_group, location, stora mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) blob_name = self.get_resource_name('vlwblob') blob_client = self.bsc.get_blob_client(container_name, blob_name) @@ -1887,21 +1879,25 @@ def test_set_immutability_policy_using_sas(self, resource_group, location, stora blob_client.delete_immutability_policy() blob_client.set_legal_hold(False) blob_client.delete_blob() - mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_account_sas_credential(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_account_sas_credential(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() + account_sas_permission = AccountSasPermissions(read=True, write=True, delete=True, add=True, + permanent_delete=True, list=True) + self.assertIn('y', str(account_sas_permission)) + token = generate_account_sas( self.bsc.account_name, self.bsc.credential.account_key, ResourceTypes(container=True, object=True), - AccountSasPermissions(read=True), + account_sas_permission, datetime.utcnow() + timedelta(hours=1), ) @@ -1917,14 +1913,14 @@ def test_account_sas_credential(self, resource_group, location, storage_account, self.assertEqual(blob_name, blob_properties.name) self.assertEqual(self.container_name, container_properties.name) - @GlobalStorageAccountPreparer() - def test_get_user_delegation_key(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_user_delegation_key(self, storage_account_name, storage_account_key): # Act - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) token_credential = self.generate_oauth_token() # Action 1: make sure token works - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential) start = datetime.utcnow() expiry = datetime.utcnow() + timedelta(hours=1) @@ -1950,13 +1946,13 @@ def test_get_user_delegation_key(self, resource_group, location, storage_account self.assertEqual(user_delegation_key_1.value, user_delegation_key_2.value) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_user_delegation_sas_for_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_user_delegation_sas_for_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only byte_data = self.get_random_bytes(1024) # Arrange token_credential = self.generate_oauth_token() - service_client = BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential) + service_client = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential) user_delegation_key = service_client.get_user_delegation_key(datetime.utcnow(), datetime.utcnow() + timedelta(hours=1)) @@ -1969,7 +1965,6 @@ def test_user_delegation_sas_for_blob(self, resource_group, location, storage_ac blob_client.container_name, blob_client.blob_name, snapshot=blob_client.snapshot, - account_key=storage_account_key, permission=BlobSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), user_delegation_key=user_delegation_key, @@ -1983,35 +1978,35 @@ def test_user_delegation_sas_for_blob(self, resource_group, location, storage_ac # Assert self.assertEqual(byte_data, content.readall()) - @GlobalStorageAccountPreparer() - def test_token_credential(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_token_credential(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) token_credential = self.generate_oauth_token() # Action 1: make sure token works - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential) result = service.get_service_properties() self.assertIsNotNone(result) # Action 2: change token value to make request fail fake_credential = self.generate_fake_token() - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=fake_credential) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=fake_credential) with self.assertRaises(ClientAuthenticationError): service.get_service_properties() # Action 3: update token to make it working again - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential) result = service.get_service_properties() self.assertIsNotNone(result) @pytest.mark.skipif(sys.version_info < (3, 0), reason="Batch not supported on Python 2.7") - @GlobalStorageAccountPreparer() - def test_token_credential_with_batch_operation(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_token_credential_with_batch_operation(self, storage_account_name, storage_account_key): # Setup container_name = self._get_container_reference() blob_name = self._get_blob_reference() token_credential = self.generate_oauth_token() - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential) container = service.get_container_client(container_name) try: container.create_container() @@ -2029,11 +2024,11 @@ def test_token_credential_with_batch_operation(self, resource_group, location, s container.delete_container() @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_shared_read_access_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_shared_read_access_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2057,11 +2052,11 @@ def test_shared_read_access_blob(self, resource_group, location, storage_account self.assertEqual(self.byte_data, response.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_shared_read_access_blob_with_content_query_params(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_shared_read_access_blob_with_content_query_params(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2094,11 +2089,11 @@ def test_shared_read_access_blob_with_content_query_params(self, resource_group, self.assertEqual(response.headers['content-type'], 'text') @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_shared_write_access_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_shared_write_access_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) updated_data = b'updated blob data' blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2125,11 +2120,11 @@ def test_shared_write_access_blob(self, resource_group, location, storage_accoun self.assertEqual(updated_data, data.readall()) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_shared_delete_access_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_shared_delete_access_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2154,10 +2149,10 @@ def test_shared_delete_access_blob(self, resource_group, location, storage_accou sas_blob.download_blob() - @GlobalStorageAccountPreparer() - def test_get_account_information(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_account_information(self, storage_account_name, storage_account_key): # Act - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) info = self.bsc.get_account_information() # Assert @@ -2165,10 +2160,10 @@ def test_get_account_information(self, resource_group, location, storage_account self.assertIsNotNone(info.get('account_kind')) - @GlobalStorageAccountPreparer() - def test_get_account_information_with_container_name(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_account_information_with_container_name(self, storage_account_name, storage_account_key): # Act - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) # Container name gets ignored container = self.bsc.get_container_client("missing") info = container.get_account_information() @@ -2178,10 +2173,10 @@ def test_get_account_information_with_container_name(self, resource_group, locat self.assertIsNotNone(info.get('account_kind')) - @GlobalStorageAccountPreparer() - def test_get_account_information_with_blob_name(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_account_information_with_blob_name(self, storage_account_name, storage_account_key): # Act - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) # Both container and blob names get ignored blob = self.bsc.get_blob_client("missing", "missing") info = blob.get_account_information() @@ -2191,17 +2186,21 @@ def test_get_account_information_with_blob_name(self, resource_group, location, self.assertIsNotNone(info.get('account_kind')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_account_information_with_container_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_account_information_with_container_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) container = self.bsc.get_container_client(self.container_name) + permission = ContainerSasPermissions(read=True, write=True, delete=True, delete_previous_version=True, + list=True, tag=True, set_immutability_policy=True, + permanent_delete=True) + self.assertIn('y', str(permission)) token = generate_container_sas( container.account_name, container.container_name, account_key=container.credential.account_key, - permission=ContainerSasPermissions(read=True), + permission=permission, expiry=datetime.utcnow() + timedelta(hours=1), ) sas_container = ContainerClient.from_container_url(container.url, credential=token) @@ -2214,11 +2213,11 @@ def test_get_account_information_with_container_sas(self, resource_group, locati self.assertIsNotNone(info.get('account_kind')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_account_information_with_blob_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_account_information_with_blob_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2241,12 +2240,11 @@ def test_get_account_information_with_blob_sas(self, resource_group, location, s self.assertIsNotNone(info.get('account_kind')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_download_to_file_with_sas(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_download_to_file_with_sas(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - self._setup_remote(rmt, rmt_key) + self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) self._create_remote_container() source_blob = self._create_remote_block_blob(blob_data=data) sas_token = generate_blob_sas( @@ -2271,12 +2269,11 @@ def test_download_to_file_with_sas(self, resource_group, location, storage_accou self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_download_to_file_with_credential(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_download_to_file_with_credential(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - self._setup_remote(rmt, rmt_key) + self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) self._create_remote_container() source_blob = self._create_remote_block_blob(blob_data=data) FILE_PATH = 'to_file_with_credential.temp.{}.dat'.format(str(uuid.uuid4())) @@ -2284,7 +2281,7 @@ def test_download_to_file_with_credential(self, resource_group, location, storag download_blob_from_url( source_blob.url, FILE_PATH, max_concurrency=2, - credential=rmt_key) + credential=secondary_storage_account_key) # Assert with open(FILE_PATH, 'rb') as stream: actual = stream.read() @@ -2292,12 +2289,11 @@ def test_download_to_file_with_credential(self, resource_group, location, storag self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_download_to_stream_with_credential(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_download_to_stream_with_credential(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - self._setup_remote(rmt, rmt_key) + self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) self._create_remote_container() source_blob = self._create_remote_block_blob(blob_data=data) FILE_PATH = 'download_to_stream_with_credential.temp.{}.dat'.format(str(uuid.uuid4())) @@ -2306,7 +2302,7 @@ def test_download_to_stream_with_credential(self, resource_group, location, stor download_blob_from_url( source_blob.url, stream, max_concurrency=2, - credential=rmt_key) + credential=secondary_storage_account_key) # Assert with open(FILE_PATH, 'rb') as stream: @@ -2315,19 +2311,18 @@ def test_download_to_stream_with_credential(self, resource_group, location, stor self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_download_to_file_with_existing_file(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_download_to_file_with_existing_file(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - self._setup_remote(rmt, rmt_key) + self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) self._create_remote_container() source_blob = self._create_remote_block_blob(blob_data=data) FILE_PATH = 'file_with_existing_file.temp.{}.dat'.format(str(uuid.uuid4())) # Act download_blob_from_url( source_blob.url, FILE_PATH, - credential=rmt_key) + credential=secondary_storage_account_key) with self.assertRaises(ValueError): download_blob_from_url(source_blob.url, FILE_PATH) @@ -2339,25 +2334,24 @@ def test_download_to_file_with_existing_file(self, resource_group, location, sto self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_download_to_file_with_existing_file_overwrite(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_download_to_file_with_existing_file_overwrite(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - self._setup_remote(rmt, rmt_key) + self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) self._create_remote_container() source_blob = self._create_remote_block_blob(blob_data=data) FILE_PATH = 'file_with_existing_file_overwrite.temp.{}.dat'.format(str(uuid.uuid4())) # Act download_blob_from_url( source_blob.url, FILE_PATH, - credential=rmt_key) + credential=secondary_storage_account_key) data2 = b'ABCDEFGH' * 1024 * 1024 source_blob = self._create_remote_block_blob(blob_data=data2) download_blob_from_url( source_blob.url, FILE_PATH, overwrite=True, - credential=rmt_key) + credential=secondary_storage_account_key) # Assert with open(FILE_PATH, 'rb') as stream: @@ -2366,11 +2360,11 @@ def test_download_to_file_with_existing_file_overwrite(self, resource_group, loc self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_upload_to_url_bytes_with_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_to_url_bytes_with_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2395,11 +2389,11 @@ def test_upload_to_url_bytes_with_sas(self, resource_group, location, storage_ac self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_upload_to_url_bytes_with_credential(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_to_url_bytes_with_credential(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2414,11 +2408,11 @@ def test_upload_to_url_bytes_with_credential(self, resource_group, location, sto self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_upload_to_url_bytes_with_existing_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_to_url_bytes_with_existing_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2434,11 +2428,11 @@ def test_upload_to_url_bytes_with_existing_blob(self, resource_group, location, self.assertEqual(b"existing_data", content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_upload_to_url_bytes_with_existing_blob_overwrite(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_to_url_bytes_with_existing_blob_overwrite(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2456,11 +2450,11 @@ def test_upload_to_url_bytes_with_existing_blob_overwrite(self, resource_group, self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_upload_to_url_text_with_credential(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_to_url_text_with_credential(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) data = '12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2477,11 +2471,11 @@ def test_upload_to_url_text_with_credential(self, resource_group, location, stor self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_upload_to_url_file_with_credential(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_to_url_file_with_credential(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only FILE_PATH = 'upload_to_url_file_with_credential.temp.{}.dat'.format(str(uuid.uuid4())) - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 with open(FILE_PATH, 'wb') as stream: stream.write(data) @@ -2514,11 +2508,11 @@ def test_set_blob_permission(self): self.assertEqual(permission.write, True) self.assertEqual(permission._str, 'rwdx') - @GlobalStorageAccountPreparer() - def test_transport_closed_only_once(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_transport_closed_only_once(self, storage_account_name, storage_account_key): container_name = self.get_resource_name('utcontainersync') transport = RequestsTransport() - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=transport) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=transport) blob_name = self._get_blob_reference() with bsc: bsc.get_service_properties() @@ -2529,9 +2523,9 @@ def test_transport_closed_only_once(self, resource_group, location, storage_acco assert transport.session is not None @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_set_blob_tier_for_a_version(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_set_blob_tier_for_a_version(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self.get_resource_name("blobtodelete") blob = self.bsc.get_blob_client(self.container_name, blob_name) data_for_the_first_version = "abc" @@ -2554,12 +2548,12 @@ def test_set_blob_tier_for_a_version(self, resource_group, location, storage_acc self.assertEqual(origin_props.blob_tier, 'Cool') @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_access_token_refresh_after_retry(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_access_token_refresh_after_retry(self, storage_account_name, storage_account_key): def fail_response(response): response.http_response.status_code = 408 token_credential = self.generate_fake_token() - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential, retry_total=4) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential, retry_total=4) self.container_name = self.get_resource_name('retrytest') container = bsc.get_container_client(self.container_name) with self.assertRaises(Exception): @@ -2567,10 +2561,9 @@ def fail_response(response): # Assert that the token attempts to refresh 4 times (i.e, get_token called 4 times) self.assertEqual(token_credential.get_token_count, 4) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - def test_blob_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_blob_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: @@ -2579,7 +2572,7 @@ def test_blob_immutability_policy(self, resource_group, location, storage_accoun mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -2608,12 +2601,11 @@ def test_blob_immutability_policy(self, resource_group, location, storage_accoun blob.delete_immutability_policy() blob.set_legal_hold(False) blob.delete_blob() - mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - def test_blob_legal_hold(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_blob_legal_hold(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: @@ -2622,7 +2614,7 @@ def test_blob_legal_hold(self, resource_group, location, storage_account, storag mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -2647,12 +2639,11 @@ def test_blob_legal_hold(self, resource_group, location, storage_account, storag blob.delete_immutability_policy() blob.set_legal_hold(False) blob.delete_blob() - mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - def test_download_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_download_blob_with_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: token_credential = self.generate_oauth_token() @@ -2660,7 +2651,7 @@ def test_download_blob_with_immutability_policy(self, resource_group, location, mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -2688,12 +2679,11 @@ def test_download_blob_with_immutability_policy(self, resource_group, location, blob.delete_immutability_policy() blob.set_legal_hold(False) blob.delete_blob() - mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - def test_list_blobs_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_list_blobs_with_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: token_credential = self.generate_oauth_token() @@ -2701,7 +2691,7 @@ def test_list_blobs_with_immutability_policy(self, resource_group, location, sto mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -2725,6 +2715,6 @@ def test_list_blobs_with_immutability_policy(self, resource_group, location, sto blob.delete_immutability_policy() blob.set_legal_hold(False) blob.delete_blob() - mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py index 2247ed8df781..431218806fc4 100644 --- a/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_common_blob_async.py @@ -53,9 +53,7 @@ AccountSasPermissions, StandardBlobTier, RehydratePriority, BlobImmutabilityPolicyMode, ImmutabilityPolicy) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, BlobAccountPreparer, \ - CachedResourceGroupPreparer -from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -79,8 +77,8 @@ async def send(self, request, **config): class StorageCommonBlobAsyncTest(AsyncStorageTestCase): # --Helpers----------------------------------------------------------------- - async def _setup(self, storage_account, key): - self.bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=key, transport=AiohttpTestTransport()) + async def _setup(self, storage_account_name, key): + self.bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=key, transport=AiohttpTestTransport()) self.container_name = self.get_resource_name('utcontainer') self.source_container_name = self.get_resource_name('utcontainersource') self.byte_data = self.get_random_bytes(1024) @@ -105,8 +103,8 @@ async def _create_blob(self, tags=None, data=b'', **kwargs): await blob.upload_blob(data, tags=tags, overwrite=True, **kwargs) return blob - async def _setup_remote(self, storage_account, key): - self.bsc2 = BlobServiceClient(self.account_url(storage_account, "blob"), credential=key) + async def _setup_remote(self, storage_account_name, key): + self.bsc2 = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=key) self.remote_container_name = 'rmt' def _teardown(self, FILE_PATH): @@ -185,11 +183,11 @@ def _assert_blob_not_soft_deleted(self, blob): self.assertIsNone(blob.remaining_retention_days) # -- Common test cases for blobs ---------------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_start_copy_from_url_with_oauth(self, resource_group, location, storage_account, storage_account_key): + async def test_start_copy_from_url_with_oauth(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) # Create source blob source_blob_data = self.get_random_bytes(LARGE_BLOB_SIZE) source_blob_client = await self._create_source_blob(data=source_blob_data) @@ -210,11 +208,11 @@ async def test_start_copy_from_url_with_oauth(self, resource_group, location, st destination_blob_data = await destination_blob.readall() self.assertEqual(source_blob_data, destination_blob_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_blob_exists(self, resource_group, location, storage_account, storage_account_key): + async def test_blob_exists(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -224,11 +222,10 @@ async def test_blob_exists(self, resource_group, location, storage_account, stor # Assert self.assertTrue(exists) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_blob_exists_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_blob_exists_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): + await self._setup(blob_storage_account_name, blob_storage_account_key) tags = {"tag1 name": "my tag", "tag2": "secondtag", "tag3": "thirdtag"} blob_name = await self._create_block_blob(overwrite=True, tags=tags) @@ -240,11 +237,11 @@ async def test_blob_exists_with_if_tags(self, resource_group, location, storage_ await blob.get_blob_properties(if_tags_match_condition="\"tag1\"='first tag'") await blob.get_blob_properties(if_tags_match_condition="\"tag1 name\"='my tag' AND \"tag2\"='secondtag'") - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_blob_not_exists(self, resource_group, location, storage_account, storage_account_key): + async def test_blob_not_exists(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() # Act @@ -253,11 +250,11 @@ async def test_blob_not_exists(self, resource_group, location, storage_account, await blob.get_blob_properties() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_blob_snapshot_exists(self, resource_group, location, storage_account, storage_account_key): + async def test_blob_snapshot_exists(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) snapshot = await blob.create_snapshot() @@ -270,10 +267,10 @@ async def test_blob_snapshot_exists(self, resource_group, location, storage_acco self.assertTrue(prop) self.assertEqual(snapshot['snapshot'], prop.snapshot) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_blob_from_generator(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_upload_blob_from_generator(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() # Act raw_data = self.get_random_bytes(3 * 1024 * 1024) + b"hello random text" @@ -290,11 +287,11 @@ def data_generator(): # Assert self.assertEqual(data, raw_data*2) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_blob_snapshot_not_exists(self, resource_group, location, storage_account, storage_account_key): + async def test_blob_snapshot_not_exists(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -303,12 +300,12 @@ async def test_blob_snapshot_not_exists(self, resource_group, location, storage_ await blob.get_blob_properties() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_blob_container_not_exists(self, resource_group, location, storage_account, storage_account_key): + async def test_blob_container_not_exists(self, storage_account_name, storage_account_key): # In this case both the blob and container do not exist # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() # Act @@ -317,11 +314,11 @@ async def test_blob_container_not_exists(self, resource_group, location, storage await blob.get_blob_properties() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_question_mark(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_with_question_mark(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = '?ques?tion?' blob_data = u'???' @@ -336,11 +333,11 @@ async def test_create_blob_with_question_mark(self, resource_group, location, st content = data.decode('utf-8') self.assertEqual(content, blob_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_equal_sign(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_with_equal_sign(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = '=ques=tion!' blob_data = u'???' @@ -355,11 +352,11 @@ async def test_create_blob_with_equal_sign(self, resource_group, location, stora content = data.decode('utf-8') self.assertEqual(content, blob_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_special_chars(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_with_special_chars(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) # Act for c in '-._ /()$=\',~': blob_name = '{0}a{0}a{0}'.format(c) @@ -372,12 +369,11 @@ async def test_create_blob_with_special_chars(self, resource_group, location, st self.assertEqual(content, blob_data) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_and_download_blob_with_vid(self, resource_group, location, storage_account, - storage_account_key): + async def test_create_blob_and_download_blob_with_vid(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) # Act for c in '-._ /()$=\',~': blob_name = '{0}a{0}a{0}'.format(c) @@ -391,11 +387,11 @@ async def test_create_blob_and_download_blob_with_vid(self, resource_group, loca self.assertEqual(content, blob_data) # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_lease_id(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_with_lease_id(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) lease = await blob.acquire_lease() @@ -411,11 +407,11 @@ async def test_create_blob_with_lease_id(self, resource_group, location, storage self.assertEqual(content, data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_metadata(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_with_metadata(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() metadata = {'hello': 'world', 'number': '42'} @@ -429,10 +425,10 @@ async def test_create_blob_with_metadata(self, resource_group, location, storage md = (await blob.get_blob_properties()).metadata self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_generator_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_create_blob_with_generator_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) # Act def gen(): @@ -448,10 +444,10 @@ def gen(): self.assertEqual(content, b"helloworld! eom") @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_requests_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_create_blob_with_requests_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) # Act uri = "https://en.wikipedia.org/wiki/Microsoft" data = requests.get(uri, stream=True) @@ -461,10 +457,10 @@ async def test_create_blob_with_requests_async(self, resource_group, location, s self.assertIsNotNone(resp.get('etag')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_aiohttp_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_create_blob_with_aiohttp_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, "gutenberg_async") # Act uri = "https://www.gutenberg.org/files/59466/59466-0.txt" @@ -474,11 +470,11 @@ async def test_create_blob_with_aiohttp_async(self, resource_group, location, st resp = await blob.upload_blob(data=text, overwrite=True) self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_existing_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_with_existing_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -490,11 +486,11 @@ async def test_get_blob_with_existing_blob(self, resource_group, location, stora self.assertEqual(content, self.byte_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_snapshot(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_with_snapshot(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) snap = await blob.create_snapshot() @@ -509,11 +505,11 @@ async def test_get_blob_with_snapshot(self, resource_group, location, storage_ac self.assertEqual(content, self.byte_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_snapshot_previous(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_with_snapshot_previous(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) snap = await blob.create_snapshot() @@ -534,11 +530,11 @@ async def test_get_blob_with_snapshot_previous(self, resource_group, location, s self.assertEqual(blob_latest_bytes, b'hello world again') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_range(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_with_range(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -550,11 +546,11 @@ async def test_get_blob_with_range(self, resource_group, location, storage_accou self.assertEqual(content, self.byte_data[:5]) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_lease(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_with_lease(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) lease = await blob.acquire_lease() @@ -568,11 +564,11 @@ async def test_get_blob_with_lease(self, resource_group, location, storage_accou self.assertEqual(content, self.byte_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_non_existing_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_with_non_existing_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() # Act @@ -582,11 +578,11 @@ async def test_get_blob_with_non_existing_blob(self, resource_group, location, s # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_properties_with_existing_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_set_blob_properties_with_existing_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -602,11 +598,9 @@ async def test_set_blob_properties_with_existing_blob(self, resource_group, loca self.assertEqual(props.content_settings.content_language, 'spanish') self.assertEqual(props.content_settings.content_disposition, 'inline') - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_properties_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + @BlobPreparer() + async def test_set_blob_properties_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): + await self._setup(blob_storage_account_name, blob_storage_account_key) tags = {"tag1 name": "my tag", "tag2": "secondtag", "tag3": "thirdtag"} blob_name = await self._create_block_blob(tags=tags, overwrite=True) @@ -629,11 +623,11 @@ async def test_set_blob_properties_with_if_tags(self, resource_group, location, self.assertEqual(props.content_settings.content_language, 'spanish') self.assertEqual(props.content_settings.content_disposition, 'inline') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_properties_with_blob_settings_param(self, resource_group, location, storage_account, storage_account_key): + async def test_set_blob_properties_with_blob_settings_param(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) props = await blob.get_blob_properties() @@ -649,11 +643,11 @@ async def test_set_blob_properties_with_blob_settings_param(self, resource_group self.assertEqual(props.content_settings.content_disposition, 'inline') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_properties(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -667,11 +661,11 @@ async def test_get_blob_properties(self, resource_group, location, storage_accou self.assertEqual(props.lease.status, 'unlocked') self.assertIsNotNone(props.creation_time) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_returns_rehydrate_priority(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_properties_returns_rehydrate_priority(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob(standard_blob_tier=StandardBlobTier.Archive) # Act @@ -685,11 +679,11 @@ async def test_get_blob_properties_returns_rehydrate_priority(self, resource_gro self.assertEqual(props.size, len(self.byte_data)) self.assertEqual(props.rehydrate_priority, 'High') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_fail(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_properties_fail(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -705,11 +699,11 @@ async def test_get_blob_properties_fail(self, resource_group, location, storage_ # This test is to validate that the ErrorCode is retrieved from the header during a # GET request. This is preferred to relying on the ErrorCode in the body. - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata_fail(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_metadata_fail(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -722,11 +716,11 @@ async def test_get_blob_metadata_fail(self, resource_group, location, storage_ac # TODO: No error code returned # self.assertEqual(StorageErrorCode.invalid_query_parameter_value, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_server_encryption(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_server_encryption(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -737,11 +731,11 @@ async def test_get_blob_server_encryption(self, resource_group, location, storag self.assertTrue(data.properties.server_encrypted) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_server_encryption(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_properties_server_encryption(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -752,12 +746,12 @@ async def test_get_blob_properties_server_encryption(self, resource_group, locat self.assertTrue(props.server_encrypted) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_server_encryption(self, resource_group, location, storage_account, storage_account_key): + async def test_list_blobs_server_encryption(self, storage_account_name, storage_account_key): # test can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) await self._create_block_blob() container = self.bsc.get_container_client(self.container_name) blob_list = [] @@ -771,12 +765,12 @@ async def test_list_blobs_server_encryption(self, resource_group, location, stor self.assertTrue(blob.server_encrypted) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_no_server_encryption(self, resource_group, location, storage_account, storage_account_key): + async def test_no_server_encryption(self, storage_account_name, storage_account_key): pytest.skip("Aiohttp headers dict (CIMultiDictProxy) is immutable.") # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -790,11 +784,11 @@ def callback(response): self.assertFalse(props.server_encrypted) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_snapshot(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_properties_with_snapshot(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() container = self.bsc.get_container_client(self.container_name) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -815,11 +809,11 @@ async def test_get_blob_properties_with_snapshot(self, resource_group, location, self.assertEqual(props.size, len(self.byte_data)) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_properties_with_leased_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_properties_with_leased_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) lease = await blob.acquire_lease() @@ -836,11 +830,11 @@ async def test_get_blob_properties_with_leased_blob(self, resource_group, locati self.assertEqual(props.lease.duration, 'infinite') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_metadata(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_metadata(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -851,13 +845,13 @@ async def test_get_blob_metadata(self, resource_group, location, storage_account self.assertIsNotNone(md) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_upper_case(self, resource_group, location, storage_account, storage_account_key): + async def test_set_blob_metadata_with_upper_case(self, storage_account_name, storage_account_key): # bug in devtools...converts upper case header to lowercase # passes live. # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) metadata = {'hello': ' world ', ' number ': '42', 'UP': 'UPval'} blob_name = await self._create_block_blob() @@ -874,13 +868,11 @@ async def test_set_blob_metadata_with_upper_case(self, resource_group, location, self.assertFalse('up' in md) @pytest.mark.live_test_only - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_with_if_tags(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_set_blob_metadata_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): # bug in devtools...converts upper case header to lowercase # passes live. - await self._setup(storage_account, storage_account_key) + await self._setup(blob_storage_account_name, blob_storage_account_key) tags = {"tag1 name": "my tag", "tag2": "secondtag", "tag3": "thirdtag"} metadata = {'hello': ' world ', ' number ': '42', 'UP': 'UPval'} blob_name = await self._create_block_blob(tags=tags, overwrite=True) @@ -901,13 +893,13 @@ async def test_set_blob_metadata_with_if_tags(self, resource_group, location, st @pytest.mark.playback_test_only @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_blob_metadata_returns_vid(self, resource_group, location, storage_account, storage_account_key): + async def test_set_blob_metadata_returns_vid(self, storage_account_name, storage_account_key): # bug in devtools...converts upper case header to lowercase # passes live. # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42', 'UP': 'UPval'} blob_name = await self._create_block_blob() @@ -924,11 +916,11 @@ async def test_set_blob_metadata_returns_vid(self, resource_group, location, sto self.assertEqual(md['UP'], 'UPval') self.assertFalse('up' in md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_existing_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blob_with_existing_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -938,11 +930,9 @@ async def test_delete_blob_with_existing_blob(self, resource_group, location, st # Assert self.assertIsNone(resp) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + @BlobPreparer() + async def test_delete_blob_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): + await self._setup(blob_storage_account_name, blob_storage_account_key) tags = {"tag1 name": "my tag", "tag2": "secondtag", "tag3": "thirdtag"} blob_name = await self._create_block_blob(tags=tags, overwrite=True) @@ -959,11 +949,11 @@ async def test_delete_blob_with_if_tags(self, resource_group, location, storage_ self.assertIsNone(resp) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_specific_blob_version(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_specific_blob_version(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self.get_resource_name("blobtodelete") # Act @@ -987,10 +977,10 @@ async def test_delete_specific_blob_version(self, resource_group, location, stor @pytest.mark.playback_test_only @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_version_with_blob_sas(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_delete_blob_version_with_blob_sas(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob_client = self.bsc.get_blob_client(self.container_name, blob_name) resp = await blob_client.upload_blob(b'abcde', overwrite=True) @@ -1018,11 +1008,11 @@ async def test_delete_blob_version_with_blob_sas(self, resource_group, location, async for blob in self.bsc.get_container_client(self.container_name).list_blobs(include="versions"): self.assertNotEqual(blob.version_id, version_id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_non_existing_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blob_with_non_existing_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() # Act @@ -1033,11 +1023,11 @@ async def test_delete_blob_with_non_existing_blob(self, resource_group, location # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_snapshot(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blob_snapshot(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) snap = await blob.create_snapshot() @@ -1057,11 +1047,11 @@ async def test_delete_blob_snapshot(self, resource_group, location, storage_acco self.assertIsNone(blobs[0].snapshot) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_snapshots(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blob_snapshots(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) await blob.create_snapshot() @@ -1078,11 +1068,11 @@ async def test_delete_blob_snapshots(self, resource_group, location, storage_acc self.assertIsNone(blobs[0].snapshot) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_snapshot_returns_vid(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_snapshot_returns_vid(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) container = self.bsc.get_container_client(self.container_name) blob_name = await self._create_block_blob() @@ -1108,11 +1098,11 @@ async def test_create_blob_snapshot_returns_vid(self, resource_group, location, self.assertIsNone(blobs[0].snapshot) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blob_with_snapshots(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blob_with_snapshots(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) await blob.create_snapshot() @@ -1131,12 +1121,12 @@ async def test_delete_blob_with_snapshots(self, resource_group, location, storag self.assertEqual(len(blobs), 0) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_soft_delete_blob_without_snapshots(self, resource_group, location, storage_account, storage_account_key): + async def test_soft_delete_blob_without_snapshots(self, storage_account_name, storage_account_key): try: # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) await self._enable_soft_delete() blob_name = await self._create_block_blob() @@ -1176,12 +1166,12 @@ async def test_soft_delete_blob_without_snapshots(self, resource_group, location await self._disable_soft_delete() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_soft_delete_single_blob_snapshot(self, resource_group, location, storage_account, storage_account_key): + async def test_soft_delete_single_blob_snapshot(self, storage_account_name, storage_account_key): try: # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) await self._enable_soft_delete() blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1231,12 +1221,12 @@ async def test_soft_delete_single_blob_snapshot(self, resource_group, location, await self._disable_soft_delete() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_soft_delete_only_snapshots_of_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_soft_delete_only_snapshots_of_blob(self, storage_account_name, storage_account_key): try: # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) await self._enable_soft_delete() blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1283,12 +1273,12 @@ async def test_soft_delete_only_snapshots_of_blob(self, resource_group, location await self._disable_soft_delete() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_soft_delete_blob_including_all_snapshots(self, resource_group, location, storage_account, storage_account_key): + async def test_soft_delete_blob_including_all_snapshots(self, storage_account_name, storage_account_key): try: # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) await self._enable_soft_delete() blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1330,12 +1320,12 @@ async def test_soft_delete_blob_including_all_snapshots(self, resource_group, lo await self._disable_soft_delete() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_soft_delete_with_leased_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_soft_delete_with_leased_blob(self, storage_account_name, storage_account_key): try: # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) await self._enable_soft_delete() blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1377,11 +1367,9 @@ async def test_soft_delete_with_leased_blob(self, resource_group, location, stor finally: await self._disable_soft_delete() - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - @AsyncStorageTestCase.await_prepared_test - async def test_async_copy_blob_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + @BlobPreparer() + async def test_async_copy_blob_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): + await self._setup(blob_storage_account_name, blob_storage_account_key) source_tags = {"source": "source tag"} blob_name = await self._create_block_blob(overwrite=True, tags=source_tags) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1389,7 +1377,7 @@ async def test_async_copy_blob_with_if_tags(self, resource_group, location, stor # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(blob_storage_account_name, "blob"), self.container_name, blob_name) copyblob = self.bsc.get_blob_client(self.container_name, 'blob1copy') await copyblob.upload_blob("abc", overwrite=True) @@ -1426,17 +1414,17 @@ async def test_async_copy_blob_with_if_tags(self, resource_group, location, stor self.assertEqual(copy_content, self.byte_data) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key): + async def test_copy_blob_returns_vid(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(storage_account_name, "blob"), self.container_name, blob_name) copyblob = self.bsc.get_blob_client(self.container_name, 'blob1copy') copy = await copyblob.start_copy_from_url(sourceblob) @@ -1451,17 +1439,17 @@ async def test_copy_blob_returns_vid(self, resource_group, location, storage_acc copy_content = await (await copyblob.download_blob()).readall() self.assertEqual(copy_content, self.byte_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_blob_with_existing_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_copy_blob_with_existing_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(storage_account_name, "blob"), self.container_name, blob_name) copyblob = self.bsc.get_blob_client(self.container_name, 'blob1copy') copy = await copyblob.start_copy_from_url(sourceblob) @@ -1475,10 +1463,9 @@ async def test_copy_blob_with_existing_blob(self, resource_group, location, stor copy_content = await (await copyblob.download_blob()).readall() self.assertEqual(copy_content, self.byte_data) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - async def test_copy_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + @BlobPreparer() + async def test_copy_blob_with_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + await self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: @@ -1487,12 +1474,12 @@ async def test_copy_blob_with_immutability_policy(self, resource_group, location mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + await mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) blob_name = await self._create_block_blob() # Act sourceblob = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), self.container_name, blob_name) + self.account_url(versioned_storage_account_name, "blob"), self.container_name, blob_name) copyblob = self.bsc.get_blob_client(container_name, 'blob1copy') @@ -1517,9 +1504,9 @@ async def test_copy_blob_with_immutability_policy(self, resource_group, location await copyblob.delete_immutability_policy() await copyblob.set_legal_hold(False) await copyblob.delete_blob() - await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + await mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) - # @GlobalStorageAccountPreparer() + # @BlobPreparer() # @AsyncStorageTestCase.await_prepared_test # TODO: external copy was supported since 2019-02-02 # async def test_copy_blob_with_external_blob_fails(self): @@ -1543,13 +1530,12 @@ async def test_copy_blob_with_immutability_policy(self, resource_group, location # loop = asyncio.get_event_loop() # loop.run_until_complete(self._test_copy_blob_with_external_blob_fails()) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_blob_async_private_blob_no_sas(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): + async def test_copy_blob_async_private_blob_no_sas(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) - await self._setup_remote(rmt, rmt_key) + await self._setup(storage_account_name, storage_account_key) + await self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) await self._create_remote_container() source_blob = await self._create_remote_block_blob() @@ -1562,14 +1548,13 @@ async def test_copy_blob_async_private_blob_no_sas(self, resource_group, locatio await target_blob.start_copy_from_url(source_blob.url) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_blob_async_private_blob_with_sas(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): + async def test_copy_blob_async_private_blob_with_sas(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - await self._setup_remote(rmt, rmt_key) + await self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) await self._create_remote_container() source_blob = await self._create_remote_block_blob(blob_data=data) sas_token = generate_blob_sas( @@ -1595,11 +1580,11 @@ async def test_copy_blob_async_private_blob_with_sas(self, resource_group, locat self.assertEqual(actual_data, data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_abort_copy_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_abort_copy_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) source_blob = "https://www.gutenberg.org/files/59466/59466-0.txt" copied_blob = self.bsc.get_blob_client(self.container_name, '59466-0.txt') @@ -1618,11 +1603,11 @@ async def test_abort_copy_blob(self, resource_group, location, storage_account, self.assertEqual(actual_data.properties.copy.status, 'aborted') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_abort_copy_blob_with_synchronous_copy_fails(self, resource_group, location, storage_account, storage_account_key): + async def test_abort_copy_blob_with_synchronous_copy_fails(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) source_blob_name = await self._create_block_blob() source_blob = self.bsc.get_blob_client(self.container_name, source_blob_name) @@ -1638,11 +1623,11 @@ async def test_abort_copy_blob_with_synchronous_copy_fails(self, resource_group, self.assertEqual(copy_resp['copy_status'], 'success') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_snapshot_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -1654,11 +1639,11 @@ async def test_snapshot_blob(self, resource_group, location, storage_account, st self.assertIsNotNone(resp['snapshot']) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_acquire_and_release(self, resource_group, location, storage_account, storage_account_key): + async def test_lease_blob_acquire_and_release(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -1672,11 +1657,11 @@ async def test_lease_blob_acquire_and_release(self, resource_group, location, st self.assertIsNotNone(lease2) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_duration(self, resource_group, location, storage_account, storage_account_key): + async def test_lease_blob_with_duration(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -1690,11 +1675,11 @@ async def test_lease_blob_with_duration(self, resource_group, location, storage_ await blob.upload_blob(b'hello 3', length=7, lease=lease) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_with_proposed_lease_id(self, resource_group, location, storage_account, storage_account_key): + async def test_lease_blob_with_proposed_lease_id(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -1706,11 +1691,11 @@ async def test_lease_blob_with_proposed_lease_id(self, resource_group, location, self.assertEqual(lease.id, lease_id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_change_lease_id(self, resource_group, location, storage_account, storage_account_key): + async def test_lease_blob_change_lease_id(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -1726,11 +1711,11 @@ async def test_lease_blob_change_lease_id(self, resource_group, location, storag self.assertEqual(lease.id, lease_id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_break_period(self, resource_group, location, storage_account, storage_account_key): + async def test_lease_blob_break_period(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -1750,11 +1735,11 @@ async def test_lease_blob_break_period(self, resource_group, location, storage_a self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_acquire_and_renew(self, resource_group, location, storage_account, storage_account_key): + async def test_lease_blob_acquire_and_renew(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() # Act @@ -1767,11 +1752,11 @@ async def test_lease_blob_acquire_and_renew(self, resource_group, location, stor self.assertEqual(first_id, lease.id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_blob_acquire_twice_fails(self, resource_group, location, storage_account, storage_account_key): + async def test_lease_blob_acquire_twice_fails(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) lease = await blob.acquire_lease() @@ -1784,11 +1769,11 @@ async def test_lease_blob_acquire_twice_fails(self, resource_group, location, st self.assertIsNotNone(lease.id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_get_blob_unicode_name(self, resource_group, location, storage_account, storage_account_key): + async def test_unicode_get_blob_unicode_name(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = '啊齄丂狛狜' blob = self.bsc.get_blob_client(self.container_name, blob_name) await blob.upload_blob(b'hello world') @@ -1801,11 +1786,11 @@ async def test_unicode_get_blob_unicode_name(self, resource_group, location, sto self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_blob_unicode_data(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_blob_unicode_data(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1817,11 +1802,11 @@ async def test_create_blob_blob_unicode_data(self, resource_group, location, sto self.assertIsNotNone(resp.get('etag')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_no_sas_private_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_no_sas_private_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1833,11 +1818,11 @@ async def test_no_sas_private_blob(self, resource_group, location, storage_accou self.assertNotEqual(-1, response.text.find('ResourceNotFound')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_no_sas_public_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_no_sas_public_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'a public blob can be read without a shared access signature' blob_name = 'blob1.txt' container_name = self._get_container_reference() @@ -1855,11 +1840,11 @@ async def test_no_sas_public_blob(self, resource_group, location, storage_accoun self.assertEqual(data, response.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_public_access_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_public_access_blob(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'public access blob' blob_name = 'blob1.txt' container_name = self._get_container_reference() @@ -1878,23 +1863,27 @@ async def test_public_access_blob(self, resource_group, location, storage_accoun self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_access_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_sas_access_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) + permission = BlobSasPermissions(read=True, write=True, delete=True, delete_previous_version=True, + permanent_delete=True, list=True, add=True, create=True, update=True) + self.assertIn('y', str(permission)) + token = generate_blob_sas( blob.account_name, blob.container_name, blob.blob_name, snapshot=blob.snapshot, account_key=blob.credential.account_key, - permission=BlobSasPermissions(read=True), + permission=permission, expiry=datetime.utcnow() + timedelta(hours=1), ) @@ -1907,13 +1896,13 @@ async def test_sas_access_blob(self, resource_group, location, storage_account, self.assertEqual(self.byte_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_signed_identifier(self, resource_group, location, storage_account, storage_account_key): + async def test_sas_signed_identifier(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() container = self.bsc.get_container_client(self.container_name) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -1943,20 +1932,24 @@ async def test_sas_signed_identifier(self, resource_group, location, storage_acc self.assertEqual(self.byte_data, result) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_account_sas(self, resource_group, location, storage_account, storage_account_key): + async def test_account_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() + account_sas_permission = AccountSasPermissions(read=True, write=True, delete=True, add=True, + permanent_delete=True, list=True) + self.assertIn('y', str(account_sas_permission)) + token = generate_account_sas( self.bsc.account_name, self.bsc.credential.account_key, ResourceTypes(container=True, object=True), - AccountSasPermissions(read=True), + account_sas_permission, datetime.utcnow() + timedelta(hours=1), ) @@ -1975,11 +1968,11 @@ async def test_account_sas(self, resource_group, location, storage_account, stor self.assertTrue(container_response.ok) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - async def test_account_sas_credential(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_account_sas_credential(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() token = generate_account_sas( @@ -2003,37 +1996,37 @@ async def test_account_sas_credential(self, resource_group, location, storage_ac self.assertEqual(self.container_name, container_properties.name) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_token_credential(self, resource_group, location, storage_account, storage_account_key): + async def test_token_credential(self, storage_account_name, storage_account_key): - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) token_credential = self.generate_oauth_token() # Action 1: make sure token works - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential, transport=AiohttpTestTransport()) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential, transport=AiohttpTestTransport()) result = await service.get_service_properties() self.assertIsNotNone(result) # Action 2: change token value to make request fail fake_credential = self.generate_fake_token() - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=fake_credential, transport=AiohttpTestTransport()) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=fake_credential, transport=AiohttpTestTransport()) with self.assertRaises(ClientAuthenticationError): await service.get_service_properties() # Action 3: update token to make it working again - service = BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential, transport=AiohttpTestTransport()) + service = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential, transport=AiohttpTestTransport()) result = await service.get_service_properties() self.assertIsNotNone(result) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_token_credential_with_batch_operation(self, resource_group, location, storage_account, storage_account_key): + async def test_token_credential_with_batch_operation(self, storage_account_name, storage_account_key): # Setup container_name = self._get_container_reference() blob_name = self._get_blob_reference() token_credential = self.generate_oauth_token() - async with BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential) as service: + async with BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential) as service: container = service.get_container_client(container_name) try: await container.create_container() @@ -2051,12 +2044,12 @@ async def test_token_credential_with_batch_operation(self, resource_group, locat await container.delete_container() @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_read_access_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_read_access_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) # Arrange blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2081,13 +2074,13 @@ async def test_shared_read_access_blob(self, resource_group, location, storage_a self.assertEqual(self.byte_data, response.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_read_access_blob_with_content_query_params(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_read_access_blob_with_content_query_params(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2120,13 +2113,13 @@ async def test_shared_read_access_blob_with_content_query_params(self, resource_ self.assertEqual(response.headers['content-type'], 'text') @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_write_access_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_write_access_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) updated_data = b'updated blob data' blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2153,13 +2146,13 @@ async def test_shared_write_access_blob(self, resource_group, location, storage_ self.assertEqual(updated_data, data) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_delete_access_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_delete_access_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2184,11 +2177,11 @@ async def test_shared_delete_access_blob(self, resource_group, location, storage await sas_blob.download_blob() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_account_information(self, resource_group, location, storage_account, storage_account_key): + async def test_get_account_information(self, storage_account_name, storage_account_key): # Act - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) info = await self.bsc.get_account_information() # Assert @@ -2196,12 +2189,12 @@ async def test_get_account_information(self, resource_group, location, storage_a self.assertIsNotNone(info.get('account_kind')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_account_information_with_container_name(self, resource_group, location, storage_account, storage_account_key): + async def test_get_account_information_with_container_name(self, storage_account_name, storage_account_key): # Act # Container name gets ignored - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) container = self.bsc.get_container_client("missing") info = await container.get_account_information() @@ -2210,12 +2203,12 @@ async def test_get_account_information_with_container_name(self, resource_group, self.assertIsNotNone(info.get('account_kind')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_account_information_with_blob_name(self, resource_group, location, storage_account, storage_account_key): + async def test_get_account_information_with_blob_name(self, storage_account_name, storage_account_key): # Act # Both container and blob names get ignored - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client("missing", "missing") info = await blob.get_account_information() @@ -2224,19 +2217,23 @@ async def test_get_account_information_with_blob_name(self, resource_group, loca self.assertIsNotNone(info.get('account_kind')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_account_information_with_container_sas(self, resource_group, location, storage_account, storage_account_key): + async def test_get_account_information_with_container_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) container = self.bsc.get_container_client(self.container_name) + permission = ContainerSasPermissions(read=True, write=True, delete=True, delete_previous_version=True, + list=True, tag=True, set_immutability_policy=True, + permanent_delete=True) + self.assertIn('y', str(permission)) token = generate_container_sas( container.account_name, container.container_name, account_key=container.credential.account_key, - permission=ContainerSasPermissions(read=True), + permission=permission, expiry=datetime.utcnow() + timedelta(hours=1), ) sas_container = ContainerClient.from_container_url(container.url, credential=token) @@ -2249,13 +2246,13 @@ async def test_get_account_information_with_container_sas(self, resource_group, self.assertIsNotNone(info.get('account_kind')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_account_information_with_blob_sas(self, resource_group, location, storage_account, storage_account_key): + async def test_get_account_information_with_blob_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = await self._create_block_blob() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2278,14 +2275,13 @@ async def test_get_account_information_with_blob_sas(self, resource_group, locat self.assertIsNotNone(info.get('account_kind')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_download_to_file_with_sas(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): + async def test_download_to_file_with_sas(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - await self._setup_remote(rmt, rmt_key) + await self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) await self._create_remote_container() source_blob = await self._create_remote_block_blob(blob_data=data) sas_token = generate_blob_sas( @@ -2310,14 +2306,13 @@ async def test_download_to_file_with_sas(self, resource_group, location, storage self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_download_to_file_with_credential(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): + async def test_download_to_file_with_credential(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - await self._setup_remote(rmt, rmt_key) + await self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) await self._create_remote_container() source_blob = await self._create_remote_block_blob(blob_data=data) FILE_PATH = 'to_file_with_credential.async.{}.dat'.format(str(uuid.uuid4())) @@ -2325,7 +2320,7 @@ async def test_download_to_file_with_credential(self, resource_group, location, await download_blob_from_url( source_blob.url, FILE_PATH, max_concurrency=2, - credential=rmt_key) + credential=secondary_storage_account_key) # Assert with open(FILE_PATH, 'rb') as stream: @@ -2334,14 +2329,13 @@ async def test_download_to_file_with_credential(self, resource_group, location, self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_download_to_stream_with_credential(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): + async def test_download_to_stream_with_credential(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - await self._setup_remote(rmt, rmt_key) + await self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) await self._create_remote_container() source_blob = await self._create_remote_block_blob(blob_data=data) FILE_PATH = 'to_stream_with_credential.async.{}.dat'.format(str(uuid.uuid4())) @@ -2350,7 +2344,7 @@ async def test_download_to_stream_with_credential(self, resource_group, location await download_blob_from_url( source_blob.url, stream, max_concurrency=2, - credential=rmt_key) + credential=secondary_storage_account_key) # Assert with open(FILE_PATH, 'rb') as stream: @@ -2359,21 +2353,20 @@ async def test_download_to_stream_with_credential(self, resource_group, location self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_download_to_file_with_existing_file(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): + async def test_download_to_file_with_existing_file(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - await self._setup_remote(rmt, rmt_key) + await self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) await self._create_remote_container() source_blob = await self._create_remote_block_blob(blob_data=data) FILE_PATH = 'with_existing_file.async.{}.dat'.format(str(uuid.uuid4())) # Act await download_blob_from_url( source_blob.url, FILE_PATH, - credential=rmt_key) + credential=secondary_storage_account_key) with self.assertRaises(ValueError): await download_blob_from_url(source_blob.url, FILE_PATH) @@ -2385,27 +2378,26 @@ async def test_download_to_file_with_existing_file(self, resource_group, locatio self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_download_to_file_with_existing_file_overwrite(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): + async def test_download_to_file_with_existing_file_overwrite(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 - await self._setup_remote(rmt, rmt_key) + await self._setup_remote(secondary_storage_account_name, secondary_storage_account_key) await self._create_remote_container() source_blob = await self._create_remote_block_blob(blob_data=data) FILE_PATH = 'existing_file_overwrite.async.{}.dat'.format(str(uuid.uuid4())) # Act await download_blob_from_url( source_blob.url, FILE_PATH, - credential=rmt_key) + credential=secondary_storage_account_key) data2 = b'ABCDEFGH' * 1024 * 1024 source_blob = await self._create_remote_block_blob(blob_data=data2) await download_blob_from_url( source_blob.url, FILE_PATH, overwrite=True, - credential=rmt_key) + credential=secondary_storage_account_key) # Assert with open(FILE_PATH, 'rb') as stream: @@ -2414,13 +2406,13 @@ async def test_download_to_file_with_existing_file_overwrite(self, resource_grou self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_to_url_bytes_with_sas(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_to_url_bytes_with_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2445,13 +2437,13 @@ async def test_upload_to_url_bytes_with_sas(self, resource_group, location, stor self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_to_url_bytes_with_credential(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_to_url_bytes_with_credential(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2466,13 +2458,13 @@ async def test_upload_to_url_bytes_with_credential(self, resource_group, locatio self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_to_url_bytes_with_existing_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_to_url_bytes_with_existing_blob(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2488,13 +2480,13 @@ async def test_upload_to_url_bytes_with_existing_blob(self, resource_group, loca self.assertEqual(b"existing_data", content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_to_url_bytes_with_existing_blob_overwrite(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_to_url_bytes_with_existing_blob_overwrite(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2512,13 +2504,13 @@ async def test_upload_to_url_bytes_with_existing_blob_overwrite(self, resource_g self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_to_url_text_with_credential(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_to_url_text_with_credential(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = '12345678' * 1024 * 1024 blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -2534,13 +2526,13 @@ async def test_upload_to_url_text_with_credential(self, resource_group, location self.assertEqual(data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_to_url_file_with_credential(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_to_url_file_with_credential(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) data = b'12345678' * 1024 * 1024 FILE_PATH = 'url_file_with_credential.async.{}.dat'.format(str(uuid.uuid4())) with open(FILE_PATH, 'wb') as stream: @@ -2559,12 +2551,12 @@ async def test_upload_to_url_file_with_credential(self, resource_group, location self.assertEqual(data, content) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_transport_closed_only_once(self, resource_group, location, storage_account, storage_account_key): + async def test_transport_closed_only_once(self, storage_account_name, storage_account_key): container_name = self.get_resource_name('utcontainerasync') transport = AioHttpTransport() - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, transport=transport) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=transport) blob_name = self._get_blob_reference() async with bsc: await bsc.get_service_properties() @@ -2574,10 +2566,9 @@ async def test_transport_closed_only_once(self, resource_group, location, storag await bsc.get_service_properties() assert transport.session is not None - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - async def test_blob_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + @BlobPreparer() + async def test_blob_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + await self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: @@ -2586,7 +2577,7 @@ async def test_blob_immutability_policy(self, resource_group, location, storage_ mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + await mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -2617,12 +2608,11 @@ async def test_blob_immutability_policy(self, resource_group, location, storage_ await blob.delete_immutability_policy() await blob.set_legal_hold(False) await blob.delete_blob() - await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + await mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - async def test_blob_legal_hold(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + @BlobPreparer() + async def test_blob_legal_hold(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + await self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: @@ -2631,7 +2621,7 @@ async def test_blob_legal_hold(self, resource_group, location, storage_account, mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + await mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -2656,12 +2646,11 @@ async def test_blob_legal_hold(self, resource_group, location, storage_account, await blob.delete_immutability_policy() await blob.set_legal_hold(False) await blob.delete_blob() - await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + await mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - async def test_download_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + @BlobPreparer() + async def test_download_blob_with_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + await self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: token_credential = self.generate_oauth_token() @@ -2669,7 +2658,7 @@ async def test_download_blob_with_immutability_policy(self, resource_group, loca mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + await mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -2700,12 +2689,11 @@ async def test_download_blob_with_immutability_policy(self, resource_group, loca await blob.delete_immutability_policy() await blob.set_legal_hold(False) await blob.delete_blob() - await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + await mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - async def test_list_blobs_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + @BlobPreparer() + async def test_list_blobs_with_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + await self._setup(versioned_storage_account_name, versioned_storage_account_key) container_name = self.get_resource_name('vlwcontainer') if self.is_live: token_credential = self.generate_oauth_token() @@ -2713,7 +2701,7 @@ async def test_list_blobs_with_immutability_policy(self, resource_group, locatio mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + await mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) # Act blob_name = self.get_resource_name('vlwblob') @@ -2740,6 +2728,6 @@ async def test_list_blobs_with_immutability_policy(self, resource_group, locatio await blob.delete_immutability_policy() await blob.set_legal_hold(False) await blob.delete_blob() - await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + await mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-blob/tests/test_container.py b/sdk/storage/azure-storage-blob/tests/test_container.py index 19982645ac6f..313cca2cb791 100644 --- a/sdk/storage/azure-storage-blob/tests/test_container.py +++ b/sdk/storage/azure-storage-blob/tests/test_container.py @@ -13,9 +13,10 @@ import pytest import requests -from devtools_testutils import ResourceGroupPreparer, BlobAccountPreparer, CachedResourceGroupPreparer -from _shared.testcase import StorageTestCase, LogCaptured, GlobalStorageAccountPreparer, GlobalResourceGroupPreparer, StorageAccountPreparer +from settings.testcase import BlobPreparer +from devtools_testutils.storage import LogCaptured + from azure.core import MatchConditions from azure.core.exceptions import HttpResponseError, ResourceNotFoundError, ResourceExistsError, ResourceModifiedError from azure.storage.blob import ( @@ -53,9 +54,9 @@ def _create_container(self, bsc, prefix=TEST_CONTAINER_PREFIX): return container #--Test cases for containers ----------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_create_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._get_container_reference() # Act @@ -65,9 +66,9 @@ def test_create_container(self, resource_group, location, storage_account, stora # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() - def test_create_container_with_already_existing_container_fail_on_exist(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_create_container_with_already_existing_container_fail_on_exist(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._get_container_reference() # Act @@ -79,9 +80,9 @@ def test_create_container_with_already_existing_container_fail_on_exist(self, re # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() - def test_create_container_with_public_access_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_create_container_with_public_access_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._get_container_reference() # Act @@ -91,9 +92,9 @@ def test_create_container_with_public_access_container(self, resource_group, loc # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() - def test_create_container_with_public_access_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_create_container_with_public_access_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._get_container_reference() # Act @@ -104,7 +105,7 @@ def test_create_container_with_public_access_blob(self, resource_group, location blob.upload_blob(u'xyz') anonymous_service = BlobClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), container_name=container_name, blob_name="blob1") @@ -112,9 +113,9 @@ def test_create_container_with_public_access_blob(self, resource_group, location self.assertTrue(created) anonymous_service.download_blob() - @GlobalStorageAccountPreparer() - def test_create_container_with_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_create_container_with_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._get_container_reference() metadata = {'hello': 'world', 'number': '42'} @@ -127,9 +128,9 @@ def test_create_container_with_metadata(self, resource_group, location, storage_ md = container.get_container_properties().metadata self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() - def test_container_exists_with_lease(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_container_exists_with_lease(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) container.acquire_lease() @@ -140,9 +141,9 @@ def test_container_exists_with_lease(self, resource_group, location, storage_acc self.assertTrue(exists) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_rename_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_rename_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) old_name1 = self._get_container_reference(prefix="oldcontainer1") old_name2 = self._get_container_reference(prefix="oldcontainer2") new_name = self._get_container_reference(prefix="newcontainer") @@ -162,10 +163,10 @@ def test_rename_container(self, resource_group, location, storage_account, stora self.assertEqual(new_name, new_container.get_container_properties().name) @pytest.mark.skip(reason="Feature not yet enabled. Make sure to record this test once enabled.") - @GlobalStorageAccountPreparer() + @BlobPreparer() def test_rename_container_with_container_client( - self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) old_name1 = self._get_container_reference(prefix="oldcontainer1") old_name2 = self._get_container_reference(prefix="oldcontainer2") new_name = self._get_container_reference(prefix="newcontainer") @@ -187,9 +188,9 @@ def test_rename_container_with_container_client( self.assertEqual(new_name, new_container.get_container_properties().name) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_rename_container_with_source_lease(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_rename_container_with_source_lease(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) old_name = self._get_container_reference(prefix="old") new_name = self._get_container_reference(prefix="new") container = bsc.get_container_client(old_name) @@ -202,9 +203,9 @@ def test_rename_container_with_source_lease(self, resource_group, location, stor new_container = bsc._rename_container(name=old_name, new_name=new_name, lease=container_lease_id) self.assertEqual(new_name, new_container.get_container_properties().name) - @GlobalStorageAccountPreparer() - def test_unicode_create_container_unicode_name(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_unicode_create_container_unicode_name(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = u'啊齄丂狛狜' container = bsc.get_container_client(container_name) @@ -213,9 +214,9 @@ def test_unicode_create_container_unicode_name(self, resource_group, location, s # not supported - container name must be alphanumeric, lowercase container.create_container() - @GlobalStorageAccountPreparer() - def test_list_containers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_containers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -230,9 +231,9 @@ def test_list_containers(self, resource_group, location, storage_account, storag self.assertIsNotNone(containers[0].has_legal_hold) self.assertIsNotNone(containers[0].immutable_storage_with_versioning_enabled) - @GlobalStorageAccountPreparer() - def test_list_containers_with_prefix(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_containers_with_prefix(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -245,9 +246,9 @@ def test_list_containers_with_prefix(self, resource_group, location, storage_acc self.assertEqual(containers[0].name, container.container_name) self.assertIsNone(containers[0].metadata) - @GlobalStorageAccountPreparer() - def test_list_containers_with_include_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_containers_with_include_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) metadata = {'hello': 'world', 'number': '42'} resp = container.set_container_metadata(metadata) @@ -264,9 +265,9 @@ def test_list_containers_with_include_metadata(self, resource_group, location, s self.assertNamedItemInContainer(containers, container.container_name) self.assertDictEqual(containers[0].metadata, metadata) - @GlobalStorageAccountPreparer() - def test_list_containers_with_public_access(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_containers_with_public_access(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) access_policy = AccessPolicy(permission=ContainerSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), @@ -284,9 +285,9 @@ def test_list_containers_with_public_access(self, resource_group, location, stor self.assertNamedItemInContainer(containers, container.container_name) self.assertEqual(containers[0].public_access, PublicAccess.Blob) - @GlobalStorageAccountPreparer() - def test_list_containers_with_num_results_and_marker(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_containers_with_num_results_and_marker(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) prefix = 'listcontainersync' container_names = [] for i in range(0, 4): @@ -312,9 +313,9 @@ def test_list_containers_with_num_results_and_marker(self, resource_group, locat self.assertNamedItemInContainer(containers2, container_names[2]) self.assertNamedItemInContainer(containers2, container_names[3]) - @GlobalStorageAccountPreparer() - def test_set_container_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) metadata = {'hello': 'world', 'number': '43'} container = self._create_container(bsc) @@ -324,9 +325,9 @@ def test_set_container_metadata(self, resource_group, location, storage_account, # Assert self.assertDictEqual(metadata_from_response, metadata) - @GlobalStorageAccountPreparer() - def test_set_container_metadata_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_metadata_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) metadata = {'hello': 'world', 'number': '43'} container = self._create_container(bsc) lease_id = container.acquire_lease() @@ -338,9 +339,9 @@ def test_set_container_metadata_with_lease_id(self, resource_group, location, st md = container.get_container_properties().metadata self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() - def test_set_container_metadata_with_non_existing_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_metadata_with_non_existing_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._get_container_reference() container = bsc.get_container_client(container_name) @@ -350,9 +351,9 @@ def test_set_container_metadata_with_non_existing_container(self, resource_group # Assert - @GlobalStorageAccountPreparer() - def test_get_container_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_get_container_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) metadata = {'hello': 'world', 'number': '42'} container = self._create_container(bsc) container.set_container_metadata(metadata) @@ -363,9 +364,9 @@ def test_get_container_metadata(self, resource_group, location, storage_account, # Assert self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() - def test_get_container_metadata_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_get_container_metadata_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) metadata = {'hello': 'world', 'number': '42'} container = self._create_container(bsc) container.set_container_metadata(metadata) @@ -377,9 +378,9 @@ def test_get_container_metadata_with_lease_id(self, resource_group, location, st # Assert self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() - def test_container_exists(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_container_exists(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container1 = self._create_container(bsc, prefix="container1") container2_name = self._get_container_reference(prefix="container2") @@ -388,9 +389,9 @@ def test_container_exists(self, resource_group, location, storage_account, stora self.assertTrue(container1.exists()) self.assertFalse(container2.exists()) - @GlobalStorageAccountPreparer() - def test_get_container_properties(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_get_container_properties(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) metadata = {'hello': 'world', 'number': '42'} container = self._create_container(bsc) container.set_container_metadata(metadata) @@ -409,9 +410,9 @@ def test_get_container_properties(self, resource_group, location, storage_accoun self.assertIsNotNone(props.has_immutability_policy) self.assertIsNotNone(props.has_legal_hold) - @GlobalStorageAccountPreparer() - def test_get_container_properties_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_get_container_properties_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) metadata = {'hello': 'world', 'number': '42'} container = self._create_container(bsc) container.set_container_metadata(metadata) @@ -428,9 +429,9 @@ def test_get_container_properties_with_lease_id(self, resource_group, location, self.assertEqual(props.lease.state, 'leased') self.assertEqual(props.lease.status, 'locked') - @GlobalStorageAccountPreparer() - def test_get_container_acl(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_get_container_acl(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -441,9 +442,9 @@ def test_get_container_acl(self, resource_group, location, storage_account, stor self.assertIsNone(acl.get('public_access')) self.assertEqual(len(acl.get('signed_identifiers')), 0) - @GlobalStorageAccountPreparer() - def test_get_container_acl_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_get_container_acl_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) lease_id = container.acquire_lease() @@ -454,9 +455,9 @@ def test_get_container_acl_with_lease_id(self, resource_group, location, storage self.assertIsNotNone(acl) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_set_container_acl(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -475,9 +476,9 @@ def test_set_container_acl(self, resource_group, location, storage_account, stor self.assertEqual(len(acl.get('signed_identifiers')), 1) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_one_signed_identifier(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_with_one_signed_identifier(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -492,9 +493,9 @@ def test_set_container_acl_with_one_signed_identifier(self, resource_group, loca self.assertIsNotNone(response.get('etag')) self.assertIsNotNone(response.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_one_signed_identifier(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_with_one_signed_identifier(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -509,9 +510,9 @@ def test_set_container_acl_with_one_signed_identifier(self, resource_group, loca self.assertIsNotNone(response.get('etag')) self.assertIsNotNone(response.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) lease_id = container.acquire_lease() @@ -528,9 +529,9 @@ def test_set_container_acl_with_lease_id(self, resource_group, location, storage self.assertIsNotNone(acl) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_public_access(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_with_public_access(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -541,9 +542,9 @@ def test_set_container_acl_with_public_access(self, resource_group, location, st self.assertIsNotNone(acl) self.assertEqual('container', acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_empty_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_with_empty_signed_identifiers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -555,9 +556,9 @@ def test_set_container_acl_with_empty_signed_identifiers(self, resource_group, l self.assertEqual(len(acl.get('signed_identifiers')), 0) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_empty_access_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_with_empty_access_policy(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) identifier = {'empty': None} @@ -570,9 +571,9 @@ def test_set_container_acl_with_empty_access_policy(self, resource_group, locati self.assertEqual('empty', acl.get('signed_identifiers')[0].id) self.assertIsNone(acl.get('signed_identifiers')[0].access_policy) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_with_signed_identifiers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -588,9 +589,9 @@ def test_set_container_acl_with_signed_identifiers(self, resource_group, locatio self.assertEqual('testid', acl.get('signed_identifiers')[0].id) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_empty_identifiers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_with_empty_identifiers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) identifiers = {i: None for i in range(2)} @@ -605,9 +606,9 @@ def test_set_container_acl_with_empty_identifiers(self, resource_group, location self.assertIsNone(acl.get('signed_identifiers')[0].access_policy) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_set_container_acl_with_three_identifiers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_with_three_identifiers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) access_policy = AccessPolicy(permission=ContainerSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), @@ -625,9 +626,9 @@ def test_set_container_acl_with_three_identifiers(self, resource_group, location self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_set_container_acl_too_many_ids(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_set_container_acl_too_many_ids(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._create_container(bsc) # Act @@ -643,9 +644,9 @@ def test_set_container_acl_too_many_ids(self, resource_group, location, storage_ 'Too many access policies provided. The server does not support setting more than 5 access policies on a single resource.' ) - @GlobalStorageAccountPreparer() - def test_lease_container_acquire_and_release(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_lease_container_acquire_and_release(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -654,9 +655,9 @@ def test_lease_container_acquire_and_release(self, resource_group, location, sto # Assert - @GlobalStorageAccountPreparer() - def test_lease_container_renew(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_lease_container_renew(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) lease = container.acquire_lease(lease_duration=15) self.sleep(10) @@ -673,9 +674,9 @@ def test_lease_container_renew(self, resource_group, location, storage_account, self.sleep(10) container.delete_container() - @GlobalStorageAccountPreparer() - def test_lease_container_break_period(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_lease_container_break_period(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -687,9 +688,9 @@ def test_lease_container_break_period(self, resource_group, location, storage_ac with self.assertRaises(HttpResponseError): container.delete_container(lease=lease) - @GlobalStorageAccountPreparer() - def test_lease_container_break_released_lease_fails(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_lease_container_break_released_lease_fails(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) lease = container.acquire_lease() lease.release() @@ -700,9 +701,9 @@ def test_lease_container_break_released_lease_fails(self, resource_group, locati # Assert - @GlobalStorageAccountPreparer() - def test_lease_container_with_duration(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_lease_container_with_duration(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -714,9 +715,9 @@ def test_lease_container_with_duration(self, resource_group, location, storage_a self.sleep(15) container.acquire_lease() - @GlobalStorageAccountPreparer() - def test_lease_container_twice(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_lease_container_twice(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -726,9 +727,9 @@ def test_lease_container_twice(self, resource_group, location, storage_account, lease2 = container.acquire_lease(lease_id=lease.id) self.assertEqual(lease.id, lease2.id) - @GlobalStorageAccountPreparer() - def test_lease_container_with_proposed_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_lease_container_with_proposed_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -738,9 +739,9 @@ def test_lease_container_with_proposed_lease_id(self, resource_group, location, # Assert self.assertEqual(proposed_lease_id, lease.id) - @GlobalStorageAccountPreparer() - def test_lease_container_change_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_lease_container_change_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -757,9 +758,9 @@ def test_lease_container_change_lease_id(self, resource_group, location, storage self.assertNotEqual(lease_id1, lease_id) self.assertEqual(lease_id2, lease_id) - @GlobalStorageAccountPreparer() - def test_delete_container_with_existing_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_delete_container_with_existing_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) # Act @@ -768,9 +769,9 @@ def test_delete_container_with_existing_container(self, resource_group, location # Assert self.assertIsNone(deleted) - @GlobalStorageAccountPreparer() - def test_delete_container_with_non_existing_container_fail_not_exist(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_delete_container_with_non_existing_container_fail_not_exist(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._get_container_reference() container = bsc.get_container_client(container_name) @@ -784,9 +785,9 @@ def test_delete_container_with_non_existing_container_fail_not_exist(self, resou # Assert - @GlobalStorageAccountPreparer() - def test_delete_container_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_delete_container_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) lease = container.acquire_lease(lease_duration=15) @@ -799,10 +800,10 @@ def test_delete_container_with_lease_id(self, resource_group, location, storage_ container.get_container_properties() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_undelete_container(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_undelete_container(self, storage_account_name, storage_account_key): # TODO: container soft delete should enabled by SRP call or use ARM, so make this test as playback only. - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_client = self._create_container(bsc) # Act @@ -825,17 +826,17 @@ def test_undelete_container(self, resource_group, location, storage_account, sto @pytest.mark.live_test_only # sas token is dynamically generated @pytest.mark.playback_test_only # we need container soft delete enabled account - @GlobalStorageAccountPreparer() - def test_restore_with_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_restore_with_sas(self, storage_account_name, storage_account_key): # TODO: container soft delete should enabled by SRP call or use ARM, so make this test as playback only. token = generate_account_sas( - storage_account.name, + storage_account_name, storage_account_key, ResourceTypes(service=True, container=True), AccountSasPermissions(read=True, write=True, list=True, delete=True), datetime.utcnow() + timedelta(hours=1), ) - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), token) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), token) container_client = self._create_container(bsc) container_client.delete_container() # to make sure the container deleted @@ -855,9 +856,9 @@ def test_restore_with_sas(self, resource_group, location, storage_account, stora props = restored_ctn_client.get_container_properties() self.assertIsNotNone(props) - @GlobalStorageAccountPreparer() - def test_list_names(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_names(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' @@ -871,9 +872,9 @@ def test_list_names(self, resource_group, location, storage_account, storage_acc self.assertEqual(blobs, ['blob1', 'blob2']) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_list_blobs_contains_last_access_time(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_contains_last_access_time(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' @@ -884,9 +885,9 @@ def test_list_blobs_contains_last_access_time(self, resource_group, location, st for blob_properties in container.list_blobs(): self.assertIsInstance(blob_properties.last_accessed_on, datetime) - @GlobalStorageAccountPreparer() - def test_list_blobs_returns_rehydrate_priority(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_returns_rehydrate_priority(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' @@ -899,9 +900,9 @@ def test_list_blobs_returns_rehydrate_priority(self, resource_group, location, s if blob_properties.name == blob_client.blob_name: self.assertEqual(blob_properties.rehydrate_priority, "Standard") - @GlobalStorageAccountPreparer() - def test_list_blobs(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' container.get_blob_client('blob1').upload_blob(data) @@ -922,9 +923,9 @@ def test_list_blobs(self, resource_group, location, storage_account, storage_acc self.assertIsNotNone(blobs[0].creation_time) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_list_blobs_with_object_replication_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_with_object_replication_policy(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' b_c = container.get_blob_client('blob1') @@ -946,9 +947,9 @@ def test_list_blobs_with_object_replication_policy(self, resource_group, locatio # Assert self.assertIsNot(number_of_blobs_with_policy, 0) - @GlobalStorageAccountPreparer() - def test_list_blobs_leased_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_leased_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' blob1 = container.get_blob_client('blob1') @@ -968,9 +969,9 @@ def test_list_blobs_leased_blob(self, resource_group, location, storage_account, self.assertEqual(resp[0].lease.status, 'locked') self.assertEqual(resp[0].lease.state, 'leased') - @GlobalStorageAccountPreparer() - def test_list_blobs_with_prefix(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_with_prefix(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' container.get_blob_client('blob_a1').upload_blob(data) @@ -986,9 +987,9 @@ def test_list_blobs_with_prefix(self, resource_group, location, storage_account, self.assertNamedItemInContainer(resp, 'blob_a1') self.assertNamedItemInContainer(resp, 'blob_a2') - @GlobalStorageAccountPreparer() - def test_list_blobs_with_num_results(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_with_num_results(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' container.get_blob_client('blob_a1').upload_blob(data) @@ -1006,9 +1007,9 @@ def test_list_blobs_with_num_results(self, resource_group, location, storage_acc self.assertNamedItemInContainer(blobs, 'blob_a1') self.assertNamedItemInContainer(blobs, 'blob_a2') - @GlobalStorageAccountPreparer() - def test_list_blobs_with_include_snapshots(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_with_include_snapshots(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' blob1 = container.get_blob_client('blob1') @@ -1028,9 +1029,9 @@ def test_list_blobs_with_include_snapshots(self, resource_group, location, stora self.assertEqual(blobs[2].name, 'blob2') self.assertIsNone(blobs[2].snapshot) - @GlobalStorageAccountPreparer() - def test_list_blobs_with_include_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_with_include_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) # pytest.skip("Waiting on metadata XML fix in msrest") container = self._create_container(bsc) data = b'hello world' @@ -1057,10 +1058,9 @@ def test_list_blobs_with_include_metadata(self, resource_group, location, storag self.assertEqual(blobs[1].content_settings.content_language, 'spanish') self.assertEqual(blobs[1].content_settings.content_disposition, 'inline') - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - def test_list_blobs_include_deletedwithversion(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_include_deletedwithversion(self, versioned_storage_account_name, versioned_storage_account_key): + bsc = BlobServiceClient(self.account_url(versioned_storage_account_name, "blob"), versioned_storage_account_key) # pytest.skip("Waiting on metadata XML fix in msrest") container = self._create_container(bsc) data = b'hello world' @@ -1093,9 +1093,9 @@ def test_list_blobs_include_deletedwithversion(self, resource_group, location, s self.assertEqual(blobs[2].name, 'blob3') self.assertFalse(blobs[2].has_versions_only) - @GlobalStorageAccountPreparer() - def test_list_blobs_with_include_uncommittedblobs(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_with_include_uncommittedblobs(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' blob1 = container.get_blob_client('blob1') @@ -1114,14 +1114,14 @@ def test_list_blobs_with_include_uncommittedblobs(self, resource_group, location self.assertEqual(blobs[0].name, 'blob1') self.assertEqual(blobs[1].name, 'blob2') - @GlobalStorageAccountPreparer() - def test_list_blobs_with_include_copy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_with_include_copy(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' container.get_blob_client('blob1').upload_blob(data, metadata={'status': 'original'}) sourceblob = 'https://{0}.blob.core.windows.net/{1}/blob1'.format( - storage_account.name, + storage_account_name, container.container_name) blobcopy = container.get_blob_client('blob1copy') @@ -1151,9 +1151,9 @@ def test_list_blobs_with_include_copy(self, resource_group, location, storage_ac self.assertEqual(blobs[1].copy.progress, '11/11') self.assertNotEqual(blobs[1].copy.completion_time, None) - @GlobalStorageAccountPreparer() - def test_list_blobs_with_delimiter(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_with_delimiter(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' @@ -1177,10 +1177,10 @@ def test_batch_delete_empty_blob_list(self): blob_list = list() container_client.delete_blobs(*blob_list) - @GlobalStorageAccountPreparer() - def test_delete_blobs_simple(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_delete_blobs_simple(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' @@ -1205,13 +1205,13 @@ def test_delete_blobs_simple(self, resource_group, location, storage_account, st assert response[2].status_code == 202 @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_batch_blobs_with_container_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_batch_blobs_with_container_sas(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._get_container_reference() sas_token = generate_container_sas( - storage_account.name, + storage_account_name, container_name, account_key=storage_account_key, permission=ContainerSasPermissions(read=True, write=True, delete=True, list=True), @@ -1242,11 +1242,10 @@ def test_batch_blobs_with_container_sas(self, resource_group, location, storage_ assert response[1].status_code == 202 assert response[2].status_code == 202 - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - def test_delete_blobs_with_if_tags(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_delete_blobs_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), blob_storage_account_key) container = self._create_container(bsc) data = b'hello world' tags = {"tag1": "firsttag", "tag2": "secondtag", "tag3": "thirdtag"} @@ -1283,17 +1282,17 @@ def test_delete_blobs_with_if_tags(self, resource_group, location, storage_accou assert response[2].status_code == 202 @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_delete_blobs_and_snapshot_using_sas(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_delete_blobs_and_snapshot_using_sas(self, storage_account_name, storage_account_key): # Arrange sas_token = generate_account_sas( - storage_account.name, + storage_account_name, account_key=storage_account_key, resource_types=ResourceTypes(object=True, container=True), permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), expiry=datetime.utcnow() + timedelta(hours=1) ) - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), sas_token) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), sas_token) container = self._create_container(bsc) data = b'hello world' @@ -1333,10 +1332,10 @@ def test_delete_blobs_and_snapshot_using_sas(self, resource_group, location, sto assert response[2].status_code == 202 assert response[3].status_code == 202 - @GlobalStorageAccountPreparer() - def test_delete_blobs_simple_no_raise(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_delete_blobs_simple_no_raise(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' @@ -1359,10 +1358,10 @@ def test_delete_blobs_simple_no_raise(self, resource_group, location, storage_ac assert response[1].status_code == 202 assert response[2].status_code == 202 - @GlobalStorageAccountPreparer() - def test_delete_blobs_snapshot(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_delete_blobs_snapshot(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc, prefix="test") data = b'hello world' @@ -1395,9 +1394,9 @@ def test_delete_blobs_snapshot(self, resource_group, location, storage_account, blobs = list(container.list_blobs(include='snapshots')) assert len(blobs) == 3 # 3 blobs - @GlobalStorageAccountPreparer() - def test_standard_blob_tier_set_tier_api_batch(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_standard_blob_tier_set_tier_api_batch(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) tiers = [StandardBlobTier.Archive, StandardBlobTier.Cool, StandardBlobTier.Hot] @@ -1446,9 +1445,9 @@ def test_standard_blob_tier_set_tier_api_batch(self, resource_group, location, s ) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_batch_set_standard_blob_tier_for_version(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_batch_set_standard_blob_tier_for_version(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) container.upload_blob("blob1", "hello world") container.upload_blob("blob2", "hello world") @@ -1505,10 +1504,9 @@ def test_batch_set_standard_blob_tier_for_version(self, resource_group, location raise_on_any_failure=False ) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - def test_standard_blob_tier_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_standard_blob_tier_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), blob_storage_account_key) container = self._create_container(bsc) tier = StandardBlobTier.Cool tags = {"tag1": "firsttag", "tag2": "secondtag", "tag3": "thirdtag"} @@ -1561,17 +1559,16 @@ def test_standard_blob_tier_with_if_tags(self, resource_group, location, storage ) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_standard_blob_tier_set_tiers_with_sas(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_standard_blob_tier_set_tiers_with_sas(self, storage_account_name, storage_account_key): sas_token = generate_account_sas( - storage_account.name, + storage_account_name, account_key=storage_account_key, resource_types=ResourceTypes(object=True, container=True), permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), expiry=datetime.utcnow() + timedelta(hours=1) ) - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), sas_token) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), sas_token) container = self._create_container(bsc) tiers = [StandardBlobTier.Archive, StandardBlobTier.Cool, StandardBlobTier.Hot] @@ -1620,9 +1617,9 @@ def test_standard_blob_tier_set_tiers_with_sas(self, resource_group, location, s @pytest.mark.skip(reason="Wasn't able to get premium account with batch enabled") # once we have premium tests, still we don't want to test Py 2.7 # @pytest.mark.skipif(sys.version_info < (3, 0), reason="Batch not supported on Python 2.7") - @GlobalStorageAccountPreparer() - def test_premium_tier_set_tier_api_batch(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_premium_tier_set_tier_api_batch(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) url = self._get_premium_account_url() credential = self._get_premium_shared_key_credential() pbs = BlobServiceClient(url, credential=credential) @@ -1669,9 +1666,9 @@ def test_premium_tier_set_tier_api_batch(self, resource_group, location, storage finally: container.delete_container() - @GlobalStorageAccountPreparer() - def test_walk_blobs_with_delimiter(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_walk_blobs_with_delimiter(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' @@ -1695,9 +1692,9 @@ def recursive_walk(prefix): self.assertEqual(len(blob_list), 4) self.assertEqual(blob_list, ['a/blob1', 'a/blob2', 'b/c/blob3', 'blob4']) - @GlobalStorageAccountPreparer() - def test_list_blobs_with_include_multiple(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_list_blobs_with_include_multiple(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) pytest.skip("Waiting on metadata XML fix in msrest") container = self._create_container(bsc) data = b'hello world' @@ -1726,10 +1723,10 @@ def test_list_blobs_with_include_multiple(self, resource_group, location, storag self.assertEqual(blobs[2].metadata['name'], 'car') @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_shared_access_container(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_shared_access_container(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) blob_name = 'blob1' data = b'hello world' @@ -1753,10 +1750,10 @@ def test_shared_access_container(self, resource_group, location, storage_account self.assertTrue(response.ok) self.assertEqual(data, response.content) - @GlobalStorageAccountPreparer() - def test_web_container_normal_operations_working(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_web_container_normal_operations_working(self, storage_account_name, storage_account_key): web_container = "$web" - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) # create the web container in case it does not exist yet container = bsc.get_container_client(web_container) @@ -1787,13 +1784,13 @@ def test_web_container_normal_operations_working(self, resource_group, location, container.delete_container() @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_user_delegation_sas_for_container(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_user_delegation_sas_for_container(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange token_credential = self.generate_oauth_token() - service_client = BlobServiceClient(self.account_url(storage_account, "blob"), credential=token_credential) + service_client = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=token_credential) user_delegation_key = service_client.get_user_delegation_key(datetime.utcnow(), datetime.utcnow() + timedelta(hours=1)) @@ -1833,9 +1830,9 @@ def test_set_container_permission(self): self.assertEqual(permission.write, True) self.assertEqual(permission._str, 'rwxl') - @GlobalStorageAccountPreparer() - def test_download_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + def test_download_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = self._create_container(bsc) data = b'hello world' blob_name = self.get_resource_name("blob") @@ -1847,9 +1844,9 @@ def test_download_blob(self, resource_group, location, storage_account, storage_ assert downloaded.readall() == data - @GlobalStorageAccountPreparer() - def test_download_blob_in_chunks_where_maxsinglegetsize_is_multiple_of_chunksize(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + @BlobPreparer() + def test_download_blob_in_chunks_where_maxsinglegetsize_is_multiple_of_chunksize(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_single_get_size=1024, max_chunk_get_size=512) container = self._create_container(bsc) @@ -1872,9 +1869,9 @@ def test_download_blob_in_chunks_where_maxsinglegetsize_is_multiple_of_chunksize self.assertEqual(downloaded_data, data) - @GlobalStorageAccountPreparer() - def test_download_blob_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + @BlobPreparer() + def test_download_blob_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_single_get_size=38, max_chunk_get_size=38) container = self._create_container(bsc, prefix="cont") @@ -1892,10 +1889,10 @@ def test_download_blob_modified(self, resource_group, location, storage_account, with self.assertRaises(ResourceModifiedError): data += next(chunks) - @GlobalStorageAccountPreparer() + @BlobPreparer() def test_download_blob_in_chunks_where_maxsinglegetsize_not_multiple_of_chunksize( - self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_single_get_size=1024, max_chunk_get_size=666) container = self._create_container(bsc) @@ -1918,9 +1915,9 @@ def test_download_blob_in_chunks_where_maxsinglegetsize_not_multiple_of_chunksiz self.assertEqual(downloaded_data, data) - @GlobalStorageAccountPreparer() - def test_download_blob_in_chunks_where_maxsinglegetsize_smallert_than_chunksize(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + @BlobPreparer() + def test_download_blob_in_chunks_where_maxsinglegetsize_smallert_than_chunksize(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_single_get_size=215, max_chunk_get_size=512) container = self._create_container(bsc) diff --git a/sdk/storage/azure-storage-blob/tests/test_container_async.py b/sdk/storage/azure-storage-blob/tests/test_container_async.py index eb6bcaf15673..2484b544af67 100644 --- a/sdk/storage/azure-storage-blob/tests/test_container_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_container_async.py @@ -38,7 +38,8 @@ PartialBatchErrorException, generate_account_sas, ResourceTypes, AccountSasPermissions) -from _shared.testcase import LogCaptured, GlobalStorageAccountPreparer, GlobalResourceGroupPreparer +from settings.testcase import BlobPreparer +from devtools_testutils.storage import LogCaptured from devtools_testutils.storage.aio import AsyncStorageTestCase from azure.storage.blob.aio import ( BlobServiceClient, @@ -84,10 +85,10 @@ async def _to_list(self, async_iterator): return result #--Test cases for containers ----------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_create_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container_name = self._get_container_reference() # Act @@ -97,10 +98,10 @@ async def test_create_container(self, resource_group, location, storage_account, # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_cntnr_w_existing_cntnr_fail_on_exist(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_create_cntnr_w_existing_cntnr_fail_on_exist(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container_name = self._get_container_reference() # Act @@ -112,10 +113,10 @@ async def test_create_cntnr_w_existing_cntnr_fail_on_exist(self, resource_group, # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_container_with_public_access_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_create_container_with_public_access_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container_name = self._get_container_reference() # Act @@ -125,10 +126,10 @@ async def test_create_container_with_public_access_container(self, resource_grou # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_container_with_public_access_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_create_container_with_public_access_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container_name = self._get_container_reference() # Act @@ -139,7 +140,7 @@ async def test_create_container_with_public_access_blob(self, resource_group, lo await blob.upload_blob(u'xyz') anonymous_service = BlobClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), container_name=container_name, blob_name="blob1") @@ -147,10 +148,10 @@ async def test_create_container_with_public_access_blob(self, resource_group, lo self.assertTrue(created) await anonymous_service.download_blob() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_container_with_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_create_container_with_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container_name = self._get_container_reference() metadata = {'hello': 'world', 'number': '42'} @@ -164,10 +165,10 @@ async def test_create_container_with_metadata(self, resource_group, location, st md = md_cr.metadata self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_container_exists_with_lease(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_container_exists_with_lease(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) await container.acquire_lease() @@ -178,10 +179,10 @@ async def test_container_exists_with_lease(self, resource_group, location, stora self.assertTrue(exists) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_rename_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + async def test_rename_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) old_name1 = self._get_container_reference(prefix="oldcontainer1") old_name2 = self._get_container_reference(prefix="oldcontainer2") new_name = self._get_container_reference(prefix="newcontainer") @@ -201,9 +202,9 @@ async def test_rename_container(self, resource_group, location, storage_account, props = await new_container.get_container_properties() self.assertEqual(new_name, props.name) - @GlobalStorageAccountPreparer() - async def test_download_blob_modified(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + @BlobPreparer() + async def test_download_blob_modified(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, max_single_get_size=38, max_chunk_get_size=38) container = await self._create_container(bsc, prefix="cont1") @@ -222,11 +223,11 @@ async def test_download_blob_modified(self, resource_group, location, storage_ac data += await chunks.__anext__() @pytest.mark.skip(reason="Feature not yet enabled. Make sure to record this test once enabled.") - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_rename_container_with_container_client( - self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) old_name1 = self._get_container_reference(prefix="oldcontainer1") old_name2 = self._get_container_reference(prefix="oldcontainer2") new_name = self._get_container_reference(prefix="newcontainer") @@ -249,10 +250,10 @@ async def test_rename_container_with_container_client( self.assertEqual(new_name, new_container_props.name) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_rename_container_with_source_lease(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + async def test_rename_container_with_source_lease(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) old_name = self._get_container_reference(prefix="old") new_name = self._get_container_reference(prefix="new") container = bsc.get_container_client(old_name) @@ -266,10 +267,10 @@ async def test_rename_container_with_source_lease(self, resource_group, location props = await new_container.get_container_properties() self.assertEqual(new_name, props.name) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_create_container_unicode_name(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_unicode_create_container_unicode_name(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container_name = u'啊齄丂狛狜' container = bsc.get_container_client(container_name) @@ -280,10 +281,10 @@ async def test_unicode_create_container_unicode_name(self, resource_group, locat # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_containers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_containers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -301,10 +302,10 @@ async def test_list_containers(self, resource_group, location, storage_account, self.assertIsNotNone(containers[0].has_legal_hold) self.assertIsNotNone(containers[0].immutable_storage_with_versioning_enabled) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_containers_with_prefix(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_containers_with_prefix(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -319,10 +320,10 @@ async def test_list_containers_with_prefix(self, resource_group, location, stora self.assertEqual(containers[0].name, container.container_name) self.assertIsNone(containers[0].metadata) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_containers_with_include_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_containers_with_include_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) metadata = {'hello': 'world', 'number': '42'} resp = await container.set_container_metadata(metadata) @@ -341,10 +342,10 @@ async def test_list_containers_with_include_metadata(self, resource_group, locat self.assertNamedItemInContainer(containers, container.container_name) self.assertDictEqual(containers[0].metadata, metadata) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_containers_with_public_access(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_containers_with_public_access(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) access_policy = AccessPolicy(permission=ContainerSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), @@ -364,10 +365,10 @@ async def test_list_containers_with_public_access(self, resource_group, location self.assertNamedItemInContainer(containers, container.container_name) self.assertEqual(containers[0].public_access, PublicAccess.Blob) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_containers_with_num_results_and_marker(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_containers_with_num_results_and_marker(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) prefix = 'listcontainerasync' container_names = [] for i in range(0, 4): @@ -398,10 +399,10 @@ async def test_list_containers_with_num_results_and_marker(self, resource_group, self.assertNamedItemInContainer(containers2, container_names[2]) self.assertNamedItemInContainer(containers2, container_names[3]) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) metadata = {'hello': 'world', 'number': '43'} container = await self._create_container(bsc) @@ -412,10 +413,10 @@ async def test_set_container_metadata(self, resource_group, location, storage_ac # Assert self.assertDictEqual(metadata_from_response, metadata) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_metadata_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_metadata_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) metadata = {'hello': 'world', 'number': '43'} container = await self._create_container(bsc) lease_id = await container.acquire_lease() @@ -428,10 +429,10 @@ async def test_set_container_metadata_with_lease_id(self, resource_group, locati md = md.metadata self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_metadata_with_non_existing_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_metadata_with_non_existing_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container_name = self._get_container_reference() container = bsc.get_container_client(container_name) @@ -441,10 +442,10 @@ async def test_set_container_metadata_with_non_existing_container(self, resource # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_container_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_get_container_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) metadata = {'hello': 'world', 'number': '42'} container = await self._create_container(bsc) await container.set_container_metadata(metadata) @@ -456,10 +457,10 @@ async def test_get_container_metadata(self, resource_group, location, storage_ac # Assert self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_container_metadata_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_get_container_metadata_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) metadata = {'hello': 'world', 'number': '42'} container = await self._create_container(bsc) await container.set_container_metadata(metadata) @@ -472,11 +473,11 @@ async def test_get_container_metadata_with_lease_id(self, resource_group, locati # Assert self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_container_exists(self, resource_group, location, storage_account, storage_account_key): + async def test_container_exists(self, storage_account_name, storage_account_key): bsc = BlobServiceClient(self.account_url( - storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container1 = await self._create_container(bsc, prefix="container1") container2_name = self._get_container_reference(prefix="container2") @@ -485,11 +486,11 @@ async def test_container_exists(self, resource_group, location, storage_account, self.assertTrue(await container1.exists()) self.assertFalse(await container2.exists()) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_container_properties(self, resource_group, location, storage_account, storage_account_key): + async def test_get_container_properties(self, storage_account_name, storage_account_key): bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) metadata = {'hello': 'world', 'number': '42'} container = await self._create_container(bsc) await container.set_container_metadata(metadata) @@ -508,10 +509,10 @@ async def test_get_container_properties(self, resource_group, location, storage_ self.assertIsNotNone(props.has_immutability_policy) self.assertIsNotNone(props.has_legal_hold) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_container_properties_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_get_container_properties_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) metadata = {'hello': 'world', 'number': '42'} container = await self._create_container(bsc) await container.set_container_metadata(metadata) @@ -528,10 +529,10 @@ async def test_get_container_properties_with_lease_id(self, resource_group, loca self.assertEqual(props.lease.state, 'leased') self.assertEqual(props.lease.status, 'locked') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_container_acl(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_get_container_acl(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -542,10 +543,10 @@ async def test_get_container_acl(self, resource_group, location, storage_account self.assertIsNone(acl.get('public_access')) self.assertEqual(len(acl.get('signed_identifiers')), 0) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_container_acl_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_get_container_acl_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) lease_id = await container.acquire_lease() @@ -556,10 +557,10 @@ async def test_get_container_acl_with_lease_id(self, resource_group, location, s self.assertIsNotNone(acl) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_acl(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -578,10 +579,10 @@ async def test_set_container_acl(self, resource_group, location, storage_account self.assertEqual(len(acl.get('signed_identifiers')), 1) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_one_signed_identifier(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_one_signed_identifier(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) from dateutil.tz import tzutc container = await self._create_container(bsc) @@ -597,10 +598,10 @@ async def test_set_container_acl_with_one_signed_identifier(self, resource_group self.assertIsNotNone(response.get('etag')) self.assertIsNotNone(response.get('last_modified')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) lease_id = await container.acquire_lease() @@ -616,10 +617,10 @@ async def test_set_container_acl_with_lease_id(self, resource_group, location, s self.assertIsNotNone(acl) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_public_access(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_public_access(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -634,10 +635,10 @@ async def test_set_container_acl_with_public_access(self, resource_group, locati self.assertIsNotNone(acl) self.assertEqual('container', acl.get('public_access')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_empty_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_empty_signed_identifiers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -649,10 +650,10 @@ async def test_set_container_acl_with_empty_signed_identifiers(self, resource_gr self.assertEqual(len(acl.get('signed_identifiers')), 0) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_signed_identifiers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -668,10 +669,10 @@ async def test_set_container_acl_with_signed_identifiers(self, resource_group, l self.assertEqual('testid', acl.get('signed_identifiers')[0].id) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_empty_identifiers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_empty_identifiers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) identifiers = {i: None for i in range(0, 3)} @@ -686,10 +687,10 @@ async def test_set_container_acl_with_empty_identifiers(self, resource_group, lo self.assertIsNone(acl.get('signed_identifiers')[0].access_policy) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_with_three_identifiers(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_acl_with_three_identifiers(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) access_policy = AccessPolicy(permission=ContainerSasPermissions(read=True), expiry=datetime.utcnow() + timedelta(hours=1), @@ -707,10 +708,10 @@ async def test_set_container_acl_with_three_identifiers(self, resource_group, lo self.assertIsNotNone(acl.get('signed_identifiers')[0].access_policy) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_container_acl_too_many_ids(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_container_acl_too_many_ids(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container_name = await self._create_container(bsc) # Act @@ -726,10 +727,10 @@ async def test_set_container_acl_too_many_ids(self, resource_group, location, st 'Too many access policies provided. The server does not support setting more than 5 access policies on a single resource.' ) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_acquire_and_release(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_lease_container_acquire_and_release(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -738,10 +739,10 @@ async def test_lease_container_acquire_and_release(self, resource_group, locatio # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_renew(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_lease_container_renew(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) lease = await container.acquire_lease(lease_duration=15) self.sleep(10) @@ -758,10 +759,10 @@ async def test_lease_container_renew(self, resource_group, location, storage_acc self.sleep(10) await container.delete_container() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_break_period(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_lease_container_break_period(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -773,10 +774,10 @@ async def test_lease_container_break_period(self, resource_group, location, stor with self.assertRaises(HttpResponseError): await container.delete_container(lease=lease) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_break_released_lease_fails(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_lease_container_break_released_lease_fails(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) lease = await container.acquire_lease() await lease.release() @@ -787,10 +788,10 @@ async def test_lease_container_break_released_lease_fails(self, resource_group, # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_with_duration(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_lease_container_with_duration(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -802,10 +803,10 @@ async def test_lease_container_with_duration(self, resource_group, location, sto self.sleep(15) await container.acquire_lease() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_twice(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_lease_container_twice(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -815,10 +816,10 @@ async def test_lease_container_twice(self, resource_group, location, storage_acc lease2 = await container.acquire_lease(lease_id=lease.id) self.assertEqual(lease.id, lease2.id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_with_proposed_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_lease_container_with_proposed_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -828,10 +829,10 @@ async def test_lease_container_with_proposed_lease_id(self, resource_group, loca # Assert self.assertEqual(proposed_lease_id, lease.id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_container_change_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_lease_container_change_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -848,10 +849,10 @@ async def test_lease_container_change_lease_id(self, resource_group, location, s self.assertNotEqual(lease_id1, lease_id) self.assertEqual(lease_id2, lease_id) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_container_with_existing_container(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_delete_container_with_existing_container(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) # Act @@ -860,10 +861,10 @@ async def test_delete_container_with_existing_container(self, resource_group, lo # Assert self.assertIsNone(deleted) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_cntnr_w_nonexisting_cntnr_fail_not_exist(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_delete_cntnr_w_nonexisting_cntnr_fail_not_exist(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container_name = self._get_container_reference() container = bsc.get_container_client(container_name) @@ -875,10 +876,10 @@ async def test_delete_cntnr_w_nonexisting_cntnr_fail_not_exist(self, resource_gr log_as_str = log_captured.getvalue() #self.assertTrue('ERROR' in log_as_str) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_container_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_delete_container_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) lease = await container.acquire_lease(lease_duration=15) @@ -891,11 +892,11 @@ async def test_delete_container_with_lease_id(self, resource_group, location, st await container.get_container_properties() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_undelete_container(self, resource_group, location, storage_account, storage_account_key): + async def test_undelete_container(self, storage_account_name, storage_account_key): # TODO: container soft delete should enabled by SRP call or use ARM, so make this test as playback only. - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_client = await self._create_container(bsc) # Act @@ -918,10 +919,10 @@ async def test_undelete_container(self, resource_group, location, storage_accoun props = await restored_ctn_client.get_container_properties() self.assertIsNotNone(props) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_names(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_names(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' @@ -936,10 +937,10 @@ async def test_list_names(self, resource_group, location, storage_account, stora self.assertEqual(blobs, ['blob1', 'blob2']) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_returns_rehydrate_priority(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_returns_rehydrate_priority(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' @@ -952,10 +953,10 @@ async def test_list_blobs_returns_rehydrate_priority(self, resource_group, locat if blob_properties.name == blob_client.blob_name: self.assertEqual(blob_properties.rehydrate_priority, "Standard") - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' cr0 = container.get_blob_client('blob1') @@ -980,10 +981,10 @@ async def test_list_blobs(self, resource_group, location, storage_account, stora self.assertIsNotNone(blobs[0].creation_time) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_with_object_replication_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + async def test_list_blobs_with_object_replication_policy(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container = await self._create_container(bsc) data = b'hello world' b_c = container.get_blob_client('blob1') @@ -1005,10 +1006,10 @@ async def test_list_blobs_with_object_replication_policy(self, resource_group, l # Assert self.assertIsNot(number_of_blobs_with_policy, 0) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_leased_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_leased_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' blob1 = container.get_blob_client('blob1') @@ -1029,10 +1030,10 @@ async def test_list_blobs_leased_blob(self, resource_group, location, storage_ac self.assertEqual(resp[0].lease.status, 'locked') self.assertEqual(resp[0].lease.state, 'leased') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_with_prefix(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_with_prefix(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' c0 = container.get_blob_client('blob_a1') @@ -1053,10 +1054,10 @@ async def test_list_blobs_with_prefix(self, resource_group, location, storage_ac self.assertNamedItemInContainer(resp, 'blob_a1') self.assertNamedItemInContainer(resp, 'blob_a2') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_with_num_results(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_with_num_results(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' c0 = container.get_blob_client('blob_a1') @@ -1080,10 +1081,10 @@ async def test_list_blobs_with_num_results(self, resource_group, location, stora self.assertNamedItemInContainer(generator.current_page, 'blob_a1') self.assertNamedItemInContainer(generator.current_page, 'blob_a2') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_with_include_snapshots(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_with_include_snapshots(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' blob1 = container.get_blob_client('blob1') @@ -1105,10 +1106,10 @@ async def test_list_blobs_with_include_snapshots(self, resource_group, location, self.assertEqual(blobs[2].name, 'blob2') self.assertIsNone(blobs[2].snapshot) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_with_include_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_with_include_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' blob1 = container.get_blob_client('blob1') @@ -1131,11 +1132,9 @@ async def test_list_blobs_with_include_metadata(self, resource_group, location, self.assertEqual(blobs[1].metadata['number'], '2') self.assertEqual(blobs[1].metadata['name'], 'car') - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", - random_name_enabled=True) - async def test_list_blobs_include_deletedwithversion_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + @BlobPreparer() + async def test_list_blobs_include_deletedwithversion_async(self, versioned_storage_account_name, versioned_storage_account_key): + bsc = BlobServiceClient(self.account_url(versioned_storage_account_name, "blob"), versioned_storage_account_key) # pytest.skip("Waiting on metadata XML fix in msrest") container = await self._create_container(bsc) data = b'hello world' @@ -1173,10 +1172,10 @@ async def test_list_blobs_include_deletedwithversion_async(self, resource_group, self.assertEqual(blobs[2].name, 'blob3') self.assertFalse(blobs[2].has_versions_only) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_with_include_uncommittedblobs(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_with_include_uncommittedblobs(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' blob1 = container.get_blob_client('blob1') @@ -1197,15 +1196,15 @@ async def test_list_blobs_with_include_uncommittedblobs(self, resource_group, lo self.assertEqual(blobs[0].name, 'blob1') self.assertEqual(blobs[1].name, 'blob2') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_with_include_copy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_with_include_copy(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' await (container.get_blob_client('blob1')).upload_blob(data, metadata={'status': 'original'}) sourceblob = 'https://{0}.blob.core.windows.net/{1}/blob1'.format( - storage_account.name, + storage_account_name, container.container_name) blobcopy = container.get_blob_client('blob1copy') @@ -1237,10 +1236,10 @@ async def test_list_blobs_with_include_copy(self, resource_group, location, stor self.assertEqual(blobs[1].copy.progress, '11/11') self.assertNotEqual(blobs[1].copy.completion_time, None) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_with_delimiter(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_with_delimiter(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' @@ -1270,11 +1269,11 @@ def test_batch_delete_empty_blob_list(self): blob_list = list() container_client.delete_blobs(*blob_list) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blobs_simple(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blobs_simple(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' @@ -1298,15 +1297,15 @@ async def test_delete_blobs_simple(self, resource_group, location, storage_accou assert response[2].status_code == 202 @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test async def test_batch_blobs_with_container_sas( - self, resource_group, location, storage_account, storage_account_key): + self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) container_name = self._get_container_reference("testcont") sas_token = generate_container_sas( - storage_account.name, + storage_account_name, container_name, account_key=storage_account_key, permission=ContainerSasPermissions(read=True, write=True, delete=True, list=True), @@ -1336,12 +1335,11 @@ async def test_batch_blobs_with_container_sas( assert response[1].status_code == 202 assert response[2].status_code == 202 - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blobs_with_if_tags(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blobs_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), blob_storage_account_key) container = await self._create_container(bsc) data = b'hello world' tags = {"tag1": "firsttag", "tag2": "secondtag", "tag3": "thirdtag"} @@ -1382,18 +1380,18 @@ async def test_delete_blobs_with_if_tags(self, resource_group, location, storage assert response[2].status_code == 202 @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blobs_and_snapshot_using_sas(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blobs_and_snapshot_using_sas(self, storage_account_name, storage_account_key): # Arrange sas_token = generate_account_sas( - storage_account.name, + storage_account_name, account_key=storage_account_key, resource_types=ResourceTypes(object=True, container=True), permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), expiry=datetime.utcnow() + timedelta(hours=1) ) - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), sas_token) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), sas_token) container = await self._create_container(bsc) data = b'hello world' @@ -1435,11 +1433,11 @@ async def test_delete_blobs_and_snapshot_using_sas(self, resource_group, locatio assert response[2].status_code == 202 assert response[3].status_code == 202 - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blobs_simple_no_raise(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blobs_simple_no_raise(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' @@ -1462,11 +1460,11 @@ async def test_delete_blobs_simple_no_raise(self, resource_group, location, stor assert response[1].status_code == 202 assert response[2].status_code == 202 - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_blobs_snapshot(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_blobs_snapshot(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' @@ -1499,10 +1497,10 @@ async def test_delete_blobs_snapshot(self, resource_group, location, storage_acc blobs = await self._to_list(container.list_blobs(include='snapshots')) assert len(blobs) == 3 # 3 blobs - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_standard_blob_tier_set_tier_api_batch(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_standard_blob_tier_set_tier_api_batch(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) tiers = [StandardBlobTier.Archive, StandardBlobTier.Cool, StandardBlobTier.Hot] @@ -1544,11 +1542,10 @@ async def test_standard_blob_tier_set_tier_api_batch(self, resource_group, locat 'blob3', ) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_standard_blob_tier_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + async def test_standard_blob_tier_with_if_tags(self, blob_storage_account_name, blob_storage_account_key): + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), blob_storage_account_key) container = await self._create_container(bsc) tier = StandardBlobTier.Cool tags = {"tag1": "firsttag", "tag2": "secondtag", "tag3": "thirdtag"} @@ -1603,18 +1600,17 @@ async def test_standard_blob_tier_with_if_tags(self, resource_group, location, s ) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_standard_blob_tier_set_tiers_with_sas(self, resource_group, location, storage_account, - storage_account_key): + async def test_standard_blob_tier_set_tiers_with_sas(self, storage_account_name, storage_account_key): sas_token = generate_account_sas( - storage_account.name, + storage_account_name, account_key=storage_account_key, resource_types=ResourceTypes(object=True, container=True), permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), expiry=datetime.utcnow() + timedelta(hours=1) ) - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), sas_token) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), sas_token) container = await self._create_container(bsc) tiers = [StandardBlobTier.Archive, StandardBlobTier.Cool, StandardBlobTier.Hot] @@ -1660,10 +1656,10 @@ async def test_standard_blob_tier_set_tiers_with_sas(self, resource_group, locat ) @pytest.mark.skip(reason="Wasn't able to get premium account with batch enabled") - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_premium_tier_set_tier_api_batch(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_premium_tier_set_tier_api_batch(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) url = self._get_premium_account_url() credential = self._get_premium_shared_key_credential() pbs = BlobServiceClient(url, credential=credential) @@ -1713,10 +1709,10 @@ async def test_premium_tier_set_tier_api_batch(self, resource_group, location, s 'blob3', ) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_walk_blobs_with_delimiter(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_walk_blobs_with_delimiter(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' @@ -1744,10 +1740,10 @@ async def recursive_walk(prefix): self.assertEqual(len(blob_list), 4) self.assertEqual(blob_list, ['a/blob1', 'a/blob2', 'b/c/blob3', 'blob4']) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs_with_include_multiple(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_list_blobs_with_include_multiple(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' blob1 = container.get_blob_client('blob1') @@ -1778,11 +1774,11 @@ async def test_list_blobs_with_include_multiple(self, resource_group, location, self.assertEqual(blobs[2].metadata['name'], 'car') @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_access_container(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_access_container(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) blob_name = 'blob1' data = b'hello world' @@ -1806,11 +1802,11 @@ async def test_shared_access_container(self, resource_group, location, storage_a self.assertTrue(response.ok) self.assertEqual(data, response.content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_web_container_normal_operations_working(self, resource_group, location, storage_account, storage_account_key): + async def test_web_container_normal_operations_working(self, storage_account_name, storage_account_key): web_container = "web" - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) # create the web container in case it does not exist yet container = bsc.get_container_client(web_container) @@ -1840,10 +1836,10 @@ async def test_web_container_normal_operations_working(self, resource_group, loc # delete container await container.delete_container() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_download_blob_async(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + async def test_download_blob_async(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) container = await self._create_container(bsc) data = b'hello world' blob_name = self.get_resource_name("blob") @@ -1856,9 +1852,9 @@ async def test_download_blob_async(self, resource_group, location, storage_accou raw = await downloaded.readall() assert raw == data - @GlobalStorageAccountPreparer() - async def test_download_blob_in_chunks_where_maxsinglegetsize_is_multiple_of_chunksize(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + @BlobPreparer() + async def test_download_blob_in_chunks_where_maxsinglegetsize_is_multiple_of_chunksize(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport(), max_single_get_size=1024, max_chunk_get_size=512) @@ -1882,9 +1878,9 @@ async def test_download_blob_in_chunks_where_maxsinglegetsize_is_multiple_of_chu self.assertEqual(downloaded_data, data) - @GlobalStorageAccountPreparer() - async def test_download_blob_in_chunks_where_maxsinglegetsize_not_multiple_of_chunksize(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + @BlobPreparer() + async def test_download_blob_in_chunks_where_maxsinglegetsize_not_multiple_of_chunksize(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport(), max_single_get_size=1024, max_chunk_get_size=666) @@ -1908,9 +1904,9 @@ async def test_download_blob_in_chunks_where_maxsinglegetsize_not_multiple_of_ch self.assertEqual(downloaded_data, data) - @GlobalStorageAccountPreparer() - async def test_download_blob_in_chunks_where_maxsinglegetsize_smallert_than_chunksize(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, + @BlobPreparer() + async def test_download_blob_in_chunks_where_maxsinglegetsize_smallert_than_chunksize(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport(), max_single_get_size=215, max_chunk_get_size=512) diff --git a/sdk/storage/azure-storage-blob/tests/test_cpk.py b/sdk/storage/azure-storage-blob/tests/test_cpk.py index 733e06530ef4..720348bced59 100644 --- a/sdk/storage/azure-storage-blob/tests/test_cpk.py +++ b/sdk/storage/azure-storage-blob/tests/test_cpk.py @@ -19,7 +19,7 @@ generate_blob_sas ) from azure.storage.blob import CustomerProvidedEncryptionKey, BlobSasPermissions -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from devtools_testutils.storage import StorageTestCase @@ -80,13 +80,13 @@ def _create_page_blob(self, bsc, cpk=None): # -- Test cases for APIs supporting CPK ---------------------------------------------- - @GlobalStorageAccountPreparer() - def test_put_block_and_put_block_list(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_put_block_and_put_block_list(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -125,13 +125,13 @@ def test_put_block_and_put_block_list(self, resource_group, location, storage_ac self._teardown(bsc) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_block_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_block_blob_with_chunks(self, storage_account_name, storage_account_key): # parallel operation # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -169,13 +169,13 @@ def test_create_block_blob_with_chunks(self, resource_group, location, storage_a self._teardown(bsc) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_block_blob_with_sub_streams(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_block_blob_with_sub_streams(self, storage_account_name, storage_account_key): # problem with the recording framework can only run live # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -209,13 +209,13 @@ def test_create_block_blob_with_sub_streams(self, resource_group, location, stor self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_create_block_blob_with_single_chunk(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_block_blob_with_single_chunk(self, storage_account_name, storage_account_key): # Act # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -247,13 +247,13 @@ def test_create_block_blob_with_single_chunk(self, resource_group, location, sto self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_put_block_from_url_and_commit_with_cpk(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_put_block_from_url_and_commit_with_cpk(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -318,13 +318,13 @@ def test_put_block_from_url_and_commit_with_cpk(self, resource_group, location, self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_append_block(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -355,13 +355,13 @@ def test_append_block(self, resource_group, location, storage_account, storage_a self.assertEqual(blob.readall(), b'AAABBBCCC') self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) - @GlobalStorageAccountPreparer() - def test_append_block_from_url(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -411,13 +411,13 @@ def test_append_block_from_url(self, resource_group, location, storage_account, self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_create_append_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_append_blob_with_chunks(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -449,13 +449,13 @@ def test_create_append_blob_with_chunks(self, resource_group, location, storage_ self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_update_page(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_update_page(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -491,13 +491,13 @@ def test_update_page(self, resource_group, location, storage_account, storage_ac self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_update_page_from_url(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_update_page_from_url(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -551,13 +551,13 @@ def test_update_page_from_url(self, resource_group, location, storage_account, s self._teardown(bsc) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_page_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_page_blob_with_chunks(self, storage_account_name, storage_account_key): # Act # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -616,13 +616,13 @@ def test_create_page_blob_with_chunks(self, resource_group, location, storage_ac # blob = blob_client.download_blob(512, 1023, cpk=TEST_ENCRYPTION_KEY) # self.assertEqual(blob.readall(), data[512:]) - @GlobalStorageAccountPreparer() - def test_get_set_blob_metadata(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_set_blob_metadata(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -662,13 +662,13 @@ def test_get_set_blob_metadata(self, resource_group, location, storage_account, self.assertFalse('Up' in md) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_snapshot_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_snapshot_blob(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, diff --git a/sdk/storage/azure-storage-blob/tests/test_cpk_async.py b/sdk/storage/azure-storage-blob/tests/test_cpk_async.py index 6d70c30dcfd5..0d255571148f 100644 --- a/sdk/storage/azure-storage-blob/tests/test_cpk_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_cpk_async.py @@ -16,7 +16,7 @@ from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.storage.blob import BlobType, BlobBlock, CustomerProvidedEncryptionKey, BlobSasPermissions, generate_blob_sas from azure.storage.blob.aio import BlobServiceClient -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -86,14 +86,14 @@ async def _create_page_blob(self, bsc, cpk=None): # -- Test cases for APIs supporting CPK ---------------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_and_put_block_list(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_and_put_block_list(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -132,13 +132,13 @@ async def test_put_block_and_put_block_list(self, resource_group, location, stor self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_block_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + async def test_create_block_blob_with_chunks(self, storage_account_name, storage_account_key): # parallel operation # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -174,9 +174,9 @@ async def test_create_block_blob_with_chunks(self, resource_group, location, sto self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_block_blob_with_sub_streams(self, resource_group, location, storage_account, storage_account_key): + async def test_create_block_blob_with_sub_streams(self, storage_account_name, storage_account_key): # problem with the recording framework can only run live # Act @@ -184,7 +184,7 @@ async def test_create_block_blob_with_sub_streams(self, resource_group, location # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -218,14 +218,14 @@ async def test_create_block_blob_with_sub_streams(self, resource_group, location self.assertEqual(blob.properties.last_modified, upload_response['last_modified']) self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_block_blob_with_single_chunk(self, resource_group, location, storage_account, storage_account_key): + async def test_create_block_blob_with_single_chunk(self, storage_account_name, storage_account_key): # Act # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -256,14 +256,14 @@ async def test_create_block_blob_with_single_chunk(self, resource_group, locatio self.assertEqual(blob.properties.last_modified, upload_response['last_modified']) self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_from_url_and_commit(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_from_url_and_commit(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -328,14 +328,14 @@ async def test_put_block_from_url_and_commit(self, resource_group, location, sto self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block(self, resource_group, location, storage_account, storage_account_key): + async def test_append_block(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -366,14 +366,14 @@ async def test_append_block(self, resource_group, location, storage_account, sto self.assertEqual(await blob.readall(), b'AAABBBCCC') self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_from_url(self, resource_group, location, storage_account, storage_account_key): + async def test_append_block_from_url(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -422,14 +422,14 @@ async def test_append_block_from_url(self, resource_group, location, storage_acc self.assertEqual(await blob.readall(), self.byte_data[0: 4 * 1024]) self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_append_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + async def test_create_append_blob_with_chunks(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -460,14 +460,14 @@ async def test_create_append_blob_with_chunks(self, resource_group, location, st self.assertEqual(await blob.readall(), self.byte_data) self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page(self, resource_group, location, storage_account, storage_account_key): + async def test_update_page(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -502,14 +502,14 @@ async def test_update_page(self, resource_group, location, storage_account, stor self.assertEqual(await blob.readall(), self.byte_data) self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_from_url(self, resource_group, location, storage_account, storage_account_key): + async def test_update_page_from_url(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -562,13 +562,13 @@ async def test_update_page_from_url(self, resource_group, location, storage_acco self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_page_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + async def test_create_page_blob_with_chunks(self, storage_account_name, storage_account_key): # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -601,14 +601,14 @@ async def test_create_page_blob_with_chunks(self, resource_group, location, stor self.assertEqual(await blob.readall(), self.byte_data) self.assertEqual(blob.properties.encryption_key_sha256, TEST_ENCRYPTION_KEY.key_hash) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_set_blob_metadata(self, resource_group, location, storage_account, storage_account_key): + async def test_get_set_blob_metadata(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -647,14 +647,14 @@ async def test_get_set_blob_metadata(self, resource_group, location, storage_acc self.assertEqual(md['up'], 'upval') self.assertFalse('Up' in md) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_snapshot_blob(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, diff --git a/sdk/storage/azure-storage-blob/tests/test_cpk_n.py b/sdk/storage/azure-storage-blob/tests/test_cpk_n.py index 1311742453b6..d7bdd9b5f6f8 100644 --- a/sdk/storage/azure-storage-blob/tests/test_cpk_n.py +++ b/sdk/storage/azure-storage-blob/tests/test_cpk_n.py @@ -15,9 +15,10 @@ BlobBlock, BlobSasPermissions, ContainerEncryptionScope, - generate_blob_sas + generate_blob_sas, + generate_account_sas, ResourceTypes, AccountSasPermissions, generate_container_sas, ContainerSasPermissions ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -30,6 +31,8 @@ "default_encryption_scope": "containerscope", "prevent_encryption_scope_override": True } +TEST_SAS_ENCRYPTION_SCOPE = "testscope1" +TEST_SAS_ENCRYPTION_SCOPE_2 = "testscope2" # ------------------------------------------------------------------------------ @@ -42,7 +45,10 @@ def _setup(self, bsc): self.byte_data = self.get_random_bytes(64 * 1024) if self.is_live: - bsc.create_container(self.container_name) + try: + bsc.create_container(self.container_name) + except: + pass def _teardown(self, bsc): if self.is_live: @@ -58,11 +64,11 @@ def _teardown(self, bsc): def _get_blob_reference(self): return self.get_resource_name("cpk") - def _create_block_blob(self, bsc, blob_name=None, data=None, encryption_scope=None, max_concurrency=1): + def _create_block_blob(self, bsc, blob_name=None, data=None, encryption_scope=None, max_concurrency=1, overwrite=False): blob_name = blob_name if blob_name else self._get_blob_reference() blob_client = bsc.get_blob_client(self.container_name, blob_name) data = data if data else b'' - resp = blob_client.upload_blob(data, encryption_scope=encryption_scope, max_concurrency=max_concurrency) + resp = blob_client.upload_blob(data, encryption_scope=encryption_scope, max_concurrency=max_concurrency, overwrite=overwrite) return blob_client, resp def _create_append_blob(self, bsc, encryption_scope=None): @@ -84,11 +90,11 @@ def _create_page_blob(self, bsc, encryption_scope=None): # -- Test cases for APIs supporting CPK ---------------------------------------------- @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_put_block_and_put_block_list(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_put_block_and_put_block_list(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -122,15 +128,140 @@ def test_put_block_and_put_block_list(self, resource_group, location, storage_ac self.assertEqual(blob.properties.encryption_scope, TEST_ENCRYPTION_KEY_SCOPE) self._teardown(bsc) + @pytest.mark.live_test_only + @BlobPreparer() + def test_put_block_and_put_block_list_with_blob_sas(self, storage_account_name, storage_account_key): + # Arrange + bsc = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=storage_account_key, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + self._setup(bsc) + + blob_name = self._get_blob_reference() + token1 = generate_blob_sas( + storage_account_name, + self.container_name, + blob_name, + account_key=storage_account_key, + permission=BlobSasPermissions(read=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE, + ) + blob_client = BlobServiceClient(self.account_url(storage_account_name, "blob"), token1)\ + .get_blob_client(self.container_name, blob_name) + + blob_client.stage_block('1', b'AAA') + blob_client.stage_block('2', b'BBB') + blob_client.stage_block('3', b'CCC') + + # Act + block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')] + put_block_list_resp = blob_client.commit_block_list(block_list) + + # Assert + self.assertIsNotNone(put_block_list_resp['etag']) + self.assertIsNotNone(put_block_list_resp['last_modified']) + self.assertTrue(put_block_list_resp['request_server_encrypted']) + self.assertEqual(put_block_list_resp['encryption_scope'], TEST_SAS_ENCRYPTION_SCOPE) + + # Act get the blob content + blob = blob_client.download_blob() + + # Assert content was retrieved with the cpk + self.assertEqual(blob.readall(), b'AAABBBCCC') + self.assertEqual(blob.properties.etag, put_block_list_resp['etag']) + self.assertEqual(blob.properties.last_modified, put_block_list_resp['last_modified']) + self.assertEqual(blob.properties.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + self._teardown(bsc) + + @pytest.mark.live_test_only + @BlobPreparer() + def test_put_block_and_put_block_list_with_blob_sas_fails(self, storage_account_name, storage_account_key): + # Arrange + bsc = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=storage_account_key, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + self._setup(bsc) + + blob_name = self._get_blob_reference() + token1 = generate_blob_sas( + storage_account_name, + self.container_name, + blob_name, + account_key=storage_account_key, + permission=BlobSasPermissions(read=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE, + ) + blob_client = BlobServiceClient(self.account_url(storage_account_name, "blob"), token1)\ + .get_blob_client(self.container_name, blob_name) + + # both ses in SAS and encryption_scopes are both set and have DIFFERENT values will throw exception + with self.assertRaises(HttpResponseError): + blob_client.stage_block('1', b'AAA', encryption_scope=TEST_ENCRYPTION_KEY_SCOPE) + + # both ses in SAS and encryption_scopes are both set and have SAME values will succeed + blob_client.stage_block('1', b'AAA', encryption_scope=TEST_SAS_ENCRYPTION_SCOPE) + + # Act + block_list = [BlobBlock(block_id='1')] + # both ses in SAS and encryption_scopes are both set and have DIFFERENT values will throw exception + with self.assertRaises(HttpResponseError): + blob_client.commit_block_list(block_list, encryption_scope=TEST_ENCRYPTION_KEY_SCOPE) + + # both ses in SAS and encryption_scopes are both set and have SAME values will succeed + put_block_list_resp = blob_client.commit_block_list(block_list, encryption_scope=TEST_SAS_ENCRYPTION_SCOPE) + + # Assert + self.assertIsNotNone(put_block_list_resp['etag']) + self.assertIsNotNone(put_block_list_resp['last_modified']) + self.assertTrue(put_block_list_resp['request_server_encrypted']) + self.assertEqual(put_block_list_resp['encryption_scope'], TEST_SAS_ENCRYPTION_SCOPE) + + # generate a sas with a different encryption scope + token2 = generate_blob_sas( + storage_account_name, + self.container_name, + blob_name, + account_key=storage_account_key, + permission=BlobSasPermissions(read=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_ENCRYPTION_KEY_SCOPE, + ) + blob_client_diff_encryption_scope_sas = BlobServiceClient(self.account_url(storage_account_name, "blob"), token2)\ + .get_blob_client(self.container_name, blob_name) + + # blob can be downloaded successfully no matter which encryption scope is used on the blob actually + # the encryption scope on blob is TEST_SAS_ENCRYPTION_SCOPE and ses is TEST_ENCRYPTION_KEY_SCOPE in SAS token, + # while we can still download the blob successfully + blob = blob_client_diff_encryption_scope_sas.download_blob() + + # Assert content was retrieved with the cpk + self.assertEqual(blob.readall(), b'AAA') + self.assertEqual(blob.properties.etag, put_block_list_resp['etag']) + self.assertEqual(blob.properties.last_modified, put_block_list_resp['last_modified']) + self.assertEqual(blob.properties.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + self._teardown(bsc) + @pytest.mark.live_test_only @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_create_block_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_block_blob_with_chunks(self, storage_account_name, storage_account_key): # parallel operation # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -164,13 +295,13 @@ def test_create_block_blob_with_chunks(self, resource_group, location, storage_a @pytest.mark.live_test_only @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_create_block_blob_with_sub_streams(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_block_blob_with_sub_streams(self, storage_account_name, storage_account_key): # problem with the recording framework can only run live # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -200,13 +331,13 @@ def test_create_block_blob_with_sub_streams(self, resource_group, location, stor self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_create_block_blob_with_single_chunk(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_block_blob_with_single_chunk(self, storage_account_name, storage_account_key): # Act # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -233,13 +364,13 @@ def test_create_block_blob_with_single_chunk(self, resource_group, location, sto self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_put_block_from_url_and_commit_with_cpk(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_put_block_from_url_and_commit_with_cpk(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -303,13 +434,13 @@ def test_put_block_from_url_and_commit_with_cpk(self, resource_group, location, self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_append_block(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -336,13 +467,13 @@ def test_append_block(self, resource_group, location, storage_account, storage_a self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_append_block_from_url(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_append_block_from_url(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -388,13 +519,13 @@ def test_append_block_from_url(self, resource_group, location, storage_account, self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_create_append_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_append_blob_with_chunks(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -423,13 +554,13 @@ def test_create_append_blob_with_chunks(self, resource_group, location, storage_ self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_update_page(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_update_page(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -461,13 +592,13 @@ def test_update_page(self, resource_group, location, storage_account, storage_ac self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_update_page_from_url(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_update_page_from_url(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -516,13 +647,13 @@ def test_update_page_from_url(self, resource_group, location, storage_account, s @pytest.mark.live_test_only @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_create_page_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_page_blob_with_chunks(self, storage_account_name, storage_account_key): # Act # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -551,13 +682,13 @@ def test_create_page_blob_with_chunks(self, resource_group, location, storage_ac self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_get_set_blob_metadata(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_set_blob_metadata(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -594,13 +725,13 @@ def test_get_set_blob_metadata(self, resource_group, location, storage_account, self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_snapshot_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_snapshot_blob(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -622,11 +753,11 @@ def test_snapshot_blob(self, resource_group, location, storage_account, storage_ self._teardown(bsc) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_list_blobs(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_list_blobs(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -647,12 +778,224 @@ def test_list_blobs(self, resource_group, location, storage_account, storage_acc self._teardown(bsc) + @pytest.mark.live_test_only + @BlobPreparer() + def test_list_blobs_using_container_encryption_scope_sas(self, storage_account_name, storage_account_key): + # Arrange + bsc = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=storage_account_key, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + self._setup(bsc) + + token = generate_container_sas( + storage_account_name, + self.container_name, + storage_account_key, + permission=ContainerSasPermissions(read=True, write=True, list=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE + ) + bsc_with_sas_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=token, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + # blob is encrypted using TEST_SAS_ENCRYPTION_SCOPE + blob_client, _ = self._create_block_blob(bsc_with_sas_credential, blob_name="blockblob", data=b'AAABBBCCC', overwrite=True) + self._create_append_blob(bsc_with_sas_credential) + + # generate a token with TEST_ENCRYPTION_KEY_SCOPE + token2 = generate_container_sas( + storage_account_name, + self.container_name, + storage_account_key, + permission=ContainerSasPermissions(read=True, write=True, list=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_ENCRYPTION_KEY_SCOPE + ) + bsc_with_diff_sas_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=token2, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + container_client = bsc_with_diff_sas_credential.get_container_client(self.container_name) + + # The ses field in SAS token when list blobs is different from the encryption scope used on creating blob, while + # list blobs should also succeed + generator = container_client.list_blobs(include="metadata") + for blob in generator: + self.assertIsNotNone(blob) + # Assert: every listed blob has encryption_scope + # and the encryption scope is the same as the one on blob creation + self.assertEqual(blob.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + + self._teardown(bsc) + + @pytest.mark.live_test_only + @BlobPreparer() + def test_copy_with_account_encryption_scope_sas(self, storage_account_name, storage_account_key): + # Arrange + sas_token = generate_account_sas( + storage_account_name, + account_key=storage_account_key, + resource_types=ResourceTypes(object=True, container=True), + permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE_2 + ) + bsc_with_sas_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=sas_token, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + + self._setup(bsc_with_sas_credential) + # blob is encrypted using TEST_SAS_ENCRYPTION_SCOPE_2 + blob_client, _ = self._create_block_blob(bsc_with_sas_credential, blob_name="blockblob", data=b'AAABBBCCC', overwrite=True) + + # + sas_token2 = generate_account_sas( + storage_account_name, + account_key=storage_account_key, + resource_types=ResourceTypes(object=True, container=True), + permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE + ) + bsc_with_account_key_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=sas_token2, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + copied_blob = self.get_resource_name('copiedblob') + copied_blob_client = bsc_with_account_key_credential.get_blob_client(self.container_name, copied_blob) + + # TODO: to confirm with Sean/Heidi ses in SAS cannot be set for async copy. + # The test failed for async copy (without requires_sync=True) + copied_blob_client.start_copy_from_url(blob_client.url, requires_sync=True) + + props = copied_blob_client.get_blob_properties() + + self.assertEqual(props.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + + self._teardown(bsc_with_sas_credential) + + @pytest.mark.live_test_only + @BlobPreparer() + def test_copy_blob_from_url_with_ecryption_scope(self, storage_account_name, storage_account_key): + # Arrange + + # create sas for source blob + sas_token = generate_account_sas( + storage_account_name, + account_key=storage_account_key, + resource_types=ResourceTypes(object=True, container=True), + permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + bsc_with_sas_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=sas_token, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + + self._setup(bsc_with_sas_credential) + blob_client, _ = self._create_block_blob(bsc_with_sas_credential, blob_name="blockblob", data=b'AAABBBCCC', overwrite=True) + + bsc = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=storage_account_key, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + copied_blob = self.get_resource_name('copiedblob') + copied_blob_client = bsc.get_blob_client(self.container_name, copied_blob) + + copied_blob_client.start_copy_from_url(blob_client.url, requires_sync=True, + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE) + + props = copied_blob_client.get_blob_properties() + + self.assertEqual(props.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + + self._teardown(bsc_with_sas_credential) + + @pytest.mark.live_test_only + @BlobPreparer() + def test_copy_with_user_delegation_encryption_scope_sas(self, storage_account_name, storage_account_key): + # Arrange + # to get user delegation key + oauth_token_credential = self.generate_oauth_token() + service_client = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=oauth_token_credential, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + + user_delegation_key = service_client.get_user_delegation_key(datetime.utcnow(), + datetime.utcnow() + timedelta(hours=1)) + + self._setup(service_client) + + blob_name = self.get_resource_name('blob') + + sas_token = generate_blob_sas( + storage_account_name, + self.container_name, + blob_name, + account_key=user_delegation_key, + permission=BlobSasPermissions(read=True, write=True, create=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE + ) + bsc_with_delegation_sas = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=sas_token, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + + # blob is encrypted using TEST_SAS_ENCRYPTION_SCOPE + blob_client, _ = self._create_block_blob(bsc_with_delegation_sas, blob_name=blob_name, data=b'AAABBBCCC', overwrite=True) + props = blob_client.get_blob_properties() + + self.assertEqual(props.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + + self._teardown(service_client) + @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_create_container_with_default_cpk_n(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_container_with_default_cpk_n(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -682,11 +1025,11 @@ def test_create_container_with_default_cpk_n(self, resource_group, location, sto container_client.delete_container() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_create_container_with_default_cpk_n_deny_override(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_container_with_default_cpk_n_deny_override(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, diff --git a/sdk/storage/azure-storage-blob/tests/test_cpk_n_async.py b/sdk/storage/azure-storage-blob/tests/test_cpk_n_async.py index 0a72d552d8d3..42de916d8dc5 100644 --- a/sdk/storage/azure-storage-blob/tests/test_cpk_n_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_cpk_n_async.py @@ -12,9 +12,10 @@ from azure.core.exceptions import HttpResponseError from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy -from azure.storage.blob import BlobType, BlobBlock, BlobSasPermissions, generate_blob_sas, ContainerEncryptionScope +from azure.storage.blob import BlobType, BlobBlock, BlobSasPermissions, generate_blob_sas, ContainerEncryptionScope, \ + generate_container_sas, ContainerSasPermissions, generate_account_sas, ResourceTypes, AccountSasPermissions from azure.storage.blob.aio import BlobServiceClient -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -27,6 +28,8 @@ "default_encryption_scope": "containerscope", "prevent_encryption_scope_override": True } +TEST_SAS_ENCRYPTION_SCOPE = "testscope1" +TEST_SAS_ENCRYPTION_SCOPE_2 = "testscope2" # ------------------------------------------------------------------------------ @@ -48,7 +51,10 @@ async def _setup(self, bsc): self.byte_data = self.get_random_bytes(64 * 1024) self.container_name = self.get_resource_name('utcontainer') if self.is_live: - await bsc.create_container(self.container_name) + try: + await bsc.create_container(self.container_name) + except: + pass def _teardown(self, bsc): @@ -66,11 +72,11 @@ def _teardown(self, bsc): def _get_blob_reference(self): return self.get_resource_name("cpk") - async def _create_block_blob(self, bsc, blob_name=None, data=None, encryption_scope=None, max_concurrency=1): + async def _create_block_blob(self, bsc, blob_name=None, data=None, encryption_scope=None, max_concurrency=1, overwrite=False): blob_name = blob_name if blob_name else self._get_blob_reference() blob_client = bsc.get_blob_client(self.container_name, blob_name) data = data if data else b'' - resp = await blob_client.upload_blob(data, encryption_scope=encryption_scope, max_concurrency=max_concurrency) + resp = await blob_client.upload_blob(data, encryption_scope=encryption_scope, max_concurrency=max_concurrency, overwrite=overwrite) return blob_client, resp async def _create_append_blob(self, bsc, encryption_scope=None): @@ -92,12 +98,12 @@ async def _create_page_blob(self, bsc, encryption_scope=None): # -- Test cases for APIs supporting CPK ---------------------------------------------- @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_and_put_block_list(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_and_put_block_list(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -131,15 +137,142 @@ async def test_put_block_and_put_block_list(self, resource_group, location, stor self.assertEqual(blob.properties.last_modified, put_block_list_resp['last_modified']) self.assertEqual(blob.properties.encryption_scope, TEST_ENCRYPTION_KEY_SCOPE) + @pytest.mark.live_test_only + @BlobPreparer() + async def test_put_block_and_put_block_list_with_blob_sas(self, storage_account_name, storage_account_key): + # Arrange + bsc = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=storage_account_key, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + await self._setup(bsc) + + blob_name = self._get_blob_reference() + token1 = generate_blob_sas( + storage_account_name, + self.container_name, + blob_name, + account_key=storage_account_key, + permission=BlobSasPermissions(read=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE, + ) + blob_client = BlobServiceClient(self.account_url(storage_account_name, "blob"), token1)\ + .get_blob_client(self.container_name, blob_name) + + await blob_client.stage_block('1', b'AAA') + await blob_client.stage_block('2', b'BBB') + await blob_client.stage_block('3', b'CCC') + + # Act + block_list = [BlobBlock(block_id='1'), BlobBlock(block_id='2'), BlobBlock(block_id='3')] + put_block_list_resp = await blob_client.commit_block_list(block_list) + + # Assert + self.assertIsNotNone(put_block_list_resp['etag']) + self.assertIsNotNone(put_block_list_resp['last_modified']) + self.assertTrue(put_block_list_resp['request_server_encrypted']) + self.assertEqual(put_block_list_resp['encryption_scope'], TEST_SAS_ENCRYPTION_SCOPE) + + # Act get the blob content + blob = await blob_client.download_blob() + content = await blob.readall() + + # Assert content was retrieved with the cpk + self.assertEqual(content, b'AAABBBCCC') + self.assertEqual(blob.properties.etag, put_block_list_resp['etag']) + self.assertEqual(blob.properties.last_modified, put_block_list_resp['last_modified']) + self.assertEqual(blob.properties.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + self._teardown(bsc) + + @pytest.mark.live_test_only + @BlobPreparer() + async def test_put_block_and_put_block_list_with_blob_sas_fails(self, storage_account_name, storage_account_key): + # Arrange + bsc = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=storage_account_key, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + await self._setup(bsc) + + blob_name = self._get_blob_reference() + token1 = generate_blob_sas( + storage_account_name, + self.container_name, + blob_name, + account_key=storage_account_key, + permission=BlobSasPermissions(read=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE, + ) + blob_client = BlobServiceClient(self.account_url(storage_account_name, "blob"), token1)\ + .get_blob_client(self.container_name, blob_name) + + # both ses in SAS and encryption_scopes are both set and have DIFFERENT values will throw exception + with self.assertRaises(HttpResponseError): + await blob_client.stage_block('1', b'AAA', encryption_scope=TEST_ENCRYPTION_KEY_SCOPE) + + # both ses in SAS and encryption_scopes are both set and have SAME values will succeed + await blob_client.stage_block('1', b'AAA', encryption_scope=TEST_SAS_ENCRYPTION_SCOPE) + + # Act + block_list = [BlobBlock(block_id='1')] + # both ses in SAS and encryption_scopes are both set and have DIFFERENT values will throw exception + with self.assertRaises(HttpResponseError): + await blob_client.commit_block_list(block_list, encryption_scope=TEST_ENCRYPTION_KEY_SCOPE) + + # both ses in SAS and encryption_scopes are both set and have SAME values will succeed + put_block_list_resp = await blob_client.commit_block_list(block_list, encryption_scope=TEST_SAS_ENCRYPTION_SCOPE) + + # Assert + self.assertIsNotNone(put_block_list_resp['etag']) + self.assertIsNotNone(put_block_list_resp['last_modified']) + self.assertTrue(put_block_list_resp['request_server_encrypted']) + self.assertEqual(put_block_list_resp['encryption_scope'], TEST_SAS_ENCRYPTION_SCOPE) + + # generate a sas with a different encryption scope + token2 = generate_blob_sas( + storage_account_name, + self.container_name, + blob_name, + account_key=storage_account_key, + permission=BlobSasPermissions(read=True, write=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_ENCRYPTION_KEY_SCOPE, + ) + blob_client_diff_encryption_scope_sas = BlobServiceClient(self.account_url(storage_account_name, "blob"), token2)\ + .get_blob_client(self.container_name, blob_name) + + # blob can be downloaded successfully no matter which encryption scope is used on the blob actually + # the encryption scope on blob is TEST_SAS_ENCRYPTION_SCOPE and ses is TEST_ENCRYPTION_KEY_SCOPE in SAS token, + # while we can still download the blob successfully + blob = await blob_client_diff_encryption_scope_sas.download_blob() + content = await blob.readall() + + # Assert content was retrieved with the cpk + self.assertEqual(content, b'AAA') + self.assertEqual(blob.properties.etag, put_block_list_resp['etag']) + self.assertEqual(blob.properties.last_modified, put_block_list_resp['last_modified']) + self.assertEqual(blob.properties.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + self._teardown(bsc) + @pytest.mark.live_test_only @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_block_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + async def test_create_block_blob_with_chunks(self, storage_account_name, storage_account_key): # parallel operation # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -172,9 +305,9 @@ async def test_create_block_blob_with_chunks(self, resource_group, location, sto @pytest.mark.live_test_only @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_block_blob_with_sub_streams(self, resource_group, location, storage_account, storage_account_key): + async def test_create_block_blob_with_sub_streams(self, storage_account_name, storage_account_key): # problem with the recording framework can only run live # Act @@ -182,7 +315,7 @@ async def test_create_block_blob_with_sub_streams(self, resource_group, location # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -213,14 +346,14 @@ async def test_create_block_blob_with_sub_streams(self, resource_group, location self.assertEqual(blob.properties.encryption_scope, TEST_ENCRYPTION_KEY_SCOPE) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_block_blob_with_single_chunk(self, resource_group, location, storage_account, storage_account_key): + async def test_create_block_blob_with_single_chunk(self, storage_account_name, storage_account_key): # Act # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -248,14 +381,14 @@ async def test_create_block_blob_with_single_chunk(self, resource_group, locatio self.assertEqual(blob.properties.encryption_scope, TEST_ENCRYPTION_KEY_SCOPE) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_from_url_and_commit(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_from_url_and_commit(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -321,14 +454,14 @@ async def test_put_block_from_url_and_commit(self, resource_group, location, sto @pytest.mark.live_test_only @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block(self, resource_group, location, storage_account, storage_account_key): + async def test_append_block(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -356,14 +489,14 @@ async def test_append_block(self, resource_group, location, storage_account, sto self.assertEqual(blob.properties.encryption_scope, TEST_ENCRYPTION_KEY_SCOPE) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_append_block_from_url(self, resource_group, location, storage_account, storage_account_key): + async def test_append_block_from_url(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -408,14 +541,14 @@ async def test_append_block_from_url(self, resource_group, location, storage_acc self.assertEqual(blob.properties.encryption_scope, TEST_ENCRYPTION_KEY_SCOPE) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_append_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + async def test_create_append_blob_with_chunks(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -443,14 +576,14 @@ async def test_create_append_blob_with_chunks(self, resource_group, location, st self.assertEqual(blob.properties.encryption_scope, TEST_ENCRYPTION_KEY_SCOPE) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page(self, resource_group, location, storage_account, storage_account_key): + async def test_update_page(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -481,14 +614,14 @@ async def test_update_page(self, resource_group, location, storage_account, stor self.assertEqual(blob.properties.encryption_scope, TEST_ENCRYPTION_KEY_SCOPE) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_from_url(self, resource_group, location, storage_account, storage_account_key): + async def test_update_page_from_url(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -536,13 +669,13 @@ async def test_update_page_from_url(self, resource_group, location, storage_acco @pytest.mark.live_test_only @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_page_blob_with_chunks(self, resource_group, location, storage_account, storage_account_key): + async def test_create_page_blob_with_chunks(self, storage_account_name, storage_account_key): # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -572,14 +705,14 @@ async def test_create_page_blob_with_chunks(self, resource_group, location, stor self.assertEqual(blob.properties.encryption_scope, TEST_ENCRYPTION_KEY_SCOPE) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_set_blob_metadata(self, resource_group, location, storage_account, storage_account_key): + async def test_get_set_blob_metadata(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -615,14 +748,14 @@ async def test_get_set_blob_metadata(self, resource_group, location, storage_acc self.assertFalse('Up' in md) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_snapshot_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_snapshot_blob(self, storage_account_name, storage_account_key): # Arrange # test chunking functionality by reducing the size of each chunk, # otherwise the tests would take too long to execute bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), storage_account_key, max_single_put_size=1024, min_large_block_upload_threshold=1024, @@ -643,12 +776,12 @@ async def test_snapshot_blob(self, resource_group, location, storage_account, st self.assertIsNotNone(blob_snapshot) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_blobs(self, resource_group, location, storage_account, storage_account_key): + async def test_list_blobs(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -669,14 +802,225 @@ async def test_list_blobs(self, resource_group, location, storage_account, stora self._teardown(bsc) + @pytest.mark.live_test_only + @BlobPreparer() + async def test_list_blobs_using_container_encryption_scope_sas(self, storage_account_name, storage_account_key): + # Arrange + bsc = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=storage_account_key, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + await self._setup(bsc) + + token = generate_container_sas( + storage_account_name, + self.container_name, + storage_account_key, + permission=ContainerSasPermissions(read=True, write=True, list=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE + ) + bsc_with_sas_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=token, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + # blob is encrypted using TEST_SAS_ENCRYPTION_SCOPE + blob_client, _ = await self._create_block_blob(bsc_with_sas_credential, blob_name="blockblob", data=b'AAABBBCCC', overwrite=True) + await self._create_append_blob(bsc_with_sas_credential) + + # generate a token with TEST_ENCRYPTION_KEY_SCOPE + token2 = generate_container_sas( + storage_account_name, + self.container_name, + storage_account_key, + permission=ContainerSasPermissions(read=True, write=True, list=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_ENCRYPTION_KEY_SCOPE + ) + bsc_with_diff_sas_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=token2, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + container_client = bsc_with_diff_sas_credential.get_container_client(self.container_name) + + # The ses field in SAS token when list blobs is different from the encryption scope used on creating blob, while + # list blobs should also succeed + generator = container_client.list_blobs(include="metadata") + async for blob in generator: + self.assertIsNotNone(blob) + # Assert: every listed blob has encryption_scope + # and the encryption scope is the same as the one on blob creation + self.assertEqual(blob.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + + self._teardown(bsc) + + @pytest.mark.live_test_only + @BlobPreparer() + async def test_copy_with_account_encryption_scope_sas(self, storage_account_name, storage_account_key): + # Arrange + sas_token = generate_account_sas( + storage_account_name, + account_key=storage_account_key, + resource_types=ResourceTypes(object=True, container=True), + permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE_2 + ) + bsc_with_sas_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=sas_token, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + + await self._setup(bsc_with_sas_credential) + # blob is encrypted using TEST_SAS_ENCRYPTION_SCOPE_2 + blob_client, _ = await self._create_block_blob(bsc_with_sas_credential, blob_name="blockblob", data=b'AAABBBCCC', overwrite=True) + + # + sas_token2 = generate_account_sas( + storage_account_name, + account_key=storage_account_key, + resource_types=ResourceTypes(object=True, container=True), + permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE + ) + bsc_with_account_key_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=sas_token2, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + copied_blob = self.get_resource_name('copiedblob') + copied_blob_client = bsc_with_account_key_credential.get_blob_client(self.container_name, copied_blob) + + # TODO: to confirm with Sean/Heidi ses in SAS cannot be set for async copy. + # The test failed for async copy (without requires_sync=True) + await copied_blob_client.start_copy_from_url(blob_client.url, requires_sync=True) + + props = await copied_blob_client.get_blob_properties() + + self.assertEqual(props.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + + self._teardown(bsc_with_sas_credential) + + @pytest.mark.live_test_only + @BlobPreparer() + async def test_copy_blob_from_url_with_ecryption_scope(self, storage_account_name, storage_account_key): + # Arrange + + # create sas for source blob + sas_token = generate_account_sas( + storage_account_name, + account_key=storage_account_key, + resource_types=ResourceTypes(object=True, container=True), + permission=AccountSasPermissions(read=True, write=True, delete=True, list=True), + expiry=datetime.utcnow() + timedelta(hours=1), + ) + bsc_with_sas_credential = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=sas_token, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + + await self._setup(bsc_with_sas_credential) + blob_client, _ = await self._create_block_blob(bsc_with_sas_credential, blob_name="blockblob", data=b'AAABBBCCC', overwrite=True) + + bsc = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=storage_account_key, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + copied_blob = self.get_resource_name('copiedblob') + copied_blob_client = bsc.get_blob_client(self.container_name, copied_blob) + + await copied_blob_client.start_copy_from_url(blob_client.url, requires_sync=True, + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE) + + props = await copied_blob_client.get_blob_properties() + + self.assertEqual(props.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + + self._teardown(bsc_with_sas_credential) + + @pytest.mark.live_test_only + @BlobPreparer() + async def test_copy_with_user_delegation_encryption_scope_sas(self, storage_account_name, storage_account_key): + # Arrange + # to get user delegation key + oauth_token_credential = self.generate_oauth_token() + service_client = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=oauth_token_credential, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + + user_delegation_key = await service_client.get_user_delegation_key(datetime.utcnow(), + datetime.utcnow() + timedelta(hours=1)) + + await self._setup(service_client) + + blob_name = self.get_resource_name('blob') + + sas_token = generate_blob_sas( + storage_account_name, + self.container_name, + blob_name, + account_key=user_delegation_key, + permission=BlobSasPermissions(read=True, write=True, create=True, delete=True), + expiry=datetime.utcnow() + timedelta(hours=1), + encryption_scope=TEST_SAS_ENCRYPTION_SCOPE + ) + bsc_with_delegation_sas = BlobServiceClient( + self.account_url(storage_account_name, "blob"), + credential=sas_token, + connection_data_block_size=1024, + max_single_put_size=1024, + min_large_block_upload_threshold=1024, + max_block_size=1024, + max_page_size=1024) + + # blob is encrypted using TEST_SAS_ENCRYPTION_SCOPE + blob_client, _ = await self._create_block_blob(bsc_with_delegation_sas, blob_name=blob_name, data=b'AAABBBCCC', overwrite=True) + props = await blob_client.get_blob_properties() + + self.assertEqual(props.encryption_scope, TEST_SAS_ENCRYPTION_SCOPE) + + self._teardown(service_client) + @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_container_with_default_cpk_n(self, resource_group, location, storage_account, - storage_account_key): + async def test_create_container_with_default_cpk_n(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, @@ -708,13 +1052,12 @@ async def test_create_container_with_default_cpk_n(self, resource_group, locatio await container_client.delete_container() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_container_with_default_cpk_n_deny_override(self, resource_group, location, storage_account, - storage_account_key): + async def test_create_container_with_default_cpk_n_deny_override(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=1024, max_single_put_size=1024, diff --git a/sdk/storage/azure-storage-blob/tests/test_get_blob.py b/sdk/storage/azure-storage-blob/tests/test_get_blob.py index 2240cf28d0f3..6ea7bc0dc25c 100644 --- a/sdk/storage/azure-storage-blob/tests/test_get_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_get_blob.py @@ -20,7 +20,7 @@ StorageErrorCode, BlobProperties ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -30,12 +30,12 @@ # ------------------------------------------------------------------------------ class StorageGetBlobTest(StorageTestCase): - def _setup(self, storage_account, key): + def _setup(self, storage_account_name, key): # test chunking functionality by reducing the threshold # for chunking and the size of each chunk, otherwise # the tests would take too long to execute self.bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=key, max_single_get_size=1024, max_chunk_get_size=1024) @@ -84,9 +84,9 @@ def seekable(self): # -- Get test cases for blobs ---------------------------------------------- - @GlobalStorageAccountPreparer() - def test_unicode_get_blob_unicode_data(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_unicode_get_blob_unicode_data(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_data = u'hello world啊齄丂狛狜'.encode('utf-8') blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -99,9 +99,9 @@ def test_unicode_get_blob_unicode_data(self, resource_group, location, storage_a self.assertIsInstance(content.properties, BlobProperties) self.assertEqual(content.readall(), blob_data) - @GlobalStorageAccountPreparer() - def test_unicode_get_blob_binary_data(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_unicode_get_blob_binary_data(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) base64_data = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==' binary_data = base64.b64decode(base64_data) @@ -116,9 +116,9 @@ def test_unicode_get_blob_binary_data(self, resource_group, location, storage_ac self.assertIsInstance(content.properties, BlobProperties) self.assertEqual(content.readall(), binary_data) - @GlobalStorageAccountPreparer() - def test_get_blob_no_content(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_no_content(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_data = b'' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -132,11 +132,11 @@ def test_get_blob_no_content(self, resource_group, location, storage_account, st self.assertEqual(0, content.properties.size) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_to_bytes(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_to_bytes(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -146,11 +146,11 @@ def test_get_blob_to_bytes(self, resource_group, location, storage_account, stor self.assertEqual(self.byte_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_ranged_get_blob_to_bytes_with_single_byte(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_ranged_get_blob_to_bytes_with_single_byte(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -167,9 +167,9 @@ def test_ranged_get_blob_to_bytes_with_single_byte(self, resource_group, locatio self.assertEqual(1, len(content)) self.assertEqual(self.byte_data[5], content[0]) - @GlobalStorageAccountPreparer() - def test_ranged_get_blob_to_bytes_with_zero_byte(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_ranged_get_blob_to_bytes_with_zero_byte(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_data = b'' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -185,9 +185,9 @@ def test_ranged_get_blob_to_bytes_with_zero_byte(self, resource_group, location, blob.download_blob(offset=3, length=5) self.assertEqual(StorageErrorCode.invalid_range, e.exception.error_code) - @GlobalStorageAccountPreparer() - def test_ranged_get_blob_with_missing_start_range(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_ranged_get_blob_with_missing_start_range(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_data = b'foobar' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -199,11 +199,11 @@ def test_ranged_get_blob_with_missing_start_range(self, resource_group, location blob.download_blob(length=3) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_to_bytes_snapshot(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_to_bytes_snapshot(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) snapshot_ref = blob.create_snapshot() snapshot = self.bsc.get_blob_client(self.container_name, self.byte_blob, snapshot=snapshot_ref) @@ -217,11 +217,11 @@ def test_get_blob_to_bytes_snapshot(self, resource_group, location, storage_acco self.assertEqual(self.byte_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_to_bytes_with_progress(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_to_bytes_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -241,9 +241,9 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() - def test_get_blob_to_bytes_non_parallel(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_bytes_non_parallel(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -263,9 +263,9 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() - def test_get_blob_to_bytes_small(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_bytes_small(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_data = self.get_random_bytes(1024) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -290,11 +290,11 @@ def callback(response): progress) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_to_stream(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_to_stream(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -311,11 +311,11 @@ def test_get_blob_to_stream(self, resource_group, location, storage_account, sto self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_to_stream_with_progress(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_to_stream_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -341,9 +341,9 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_blob_to_stream_non_parallel(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_stream_non_parallel(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -370,9 +370,9 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_blob_to_stream_small(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_stream_small(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_data = self.get_random_bytes(1024) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -405,11 +405,11 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_ranged_get_blob_to_path(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_ranged_get_blob_to_path(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -427,11 +427,11 @@ def test_ranged_get_blob_to_path(self, resource_group, location, storage_account self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_ranged_get_blob_to_path_with_progress(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_ranged_get_blob_to_path_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -464,9 +464,9 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_ranged_get_blob_to_path_small(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_ranged_get_blob_to_path_small(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -482,9 +482,9 @@ def test_ranged_get_blob_to_path_small(self, resource_group, location, storage_a self.assertEqual(self.byte_data[1:5], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_ranged_get_blob_to_path_non_parallel(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_ranged_get_blob_to_path_non_parallel(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -501,11 +501,11 @@ def test_ranged_get_blob_to_path_non_parallel(self, resource_group, location, st self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_ranged_get_blob_to_path_invalid_range_parallel(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_ranged_get_blob_to_path_invalid_range_parallel(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_size = self.config.max_single_get_size + 1 blob_data = self.get_random_bytes(blob_size) blob_name = self._get_blob_reference() @@ -527,11 +527,11 @@ def test_ranged_get_blob_to_path_invalid_range_parallel(self, resource_group, lo self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_ranged_get_blob_to_path_invalid_range_non_parallel(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_ranged_get_blob_to_path_invalid_range_non_parallel(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_size = 1024 blob_data = self.get_random_bytes(blob_size) blob_name = self._get_blob_reference() @@ -555,11 +555,11 @@ def test_ranged_get_blob_to_path_invalid_range_non_parallel(self, resource_group # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_to_text(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_to_text(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) text_blob = self.get_resource_name('textblob') text_data = self.get_random_text_data(self.config.max_single_get_size + 1) blob = self.bsc.get_blob_client(self.container_name, text_blob) @@ -573,11 +573,11 @@ def test_get_blob_to_text(self, resource_group, location, storage_account, stora self.assertEqual(text_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_to_text_with_progress(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_to_text_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) text_blob = self.get_resource_name('textblob') text_data = self.get_random_text_data(self.config.max_single_get_size + 1) blob = self.bsc.get_blob_client(self.container_name, text_blob) @@ -605,9 +605,9 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() - def test_get_blob_to_text_non_parallel(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_text_non_parallel(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) text_blob = self._get_blob_reference() text_data = self.get_random_text_data(self.config.max_single_get_size + 1) blob = self.bsc.get_blob_client(self.container_name, text_blob) @@ -635,9 +635,9 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() - def test_get_blob_to_text_small(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_text_small(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_data = self.get_random_text_data(1024) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -662,9 +662,9 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() - def test_get_blob_to_text_with_encoding(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_text_with_encoding(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -677,9 +677,9 @@ def test_get_blob_to_text_with_encoding(self, resource_group, location, storage_ # Assert self.assertEqual(text, content) - @GlobalStorageAccountPreparer() - def test_get_blob_to_text_with_encoding_and_progress(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_text_with_encoding_and_progress(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -704,9 +704,9 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() - def test_get_blob_non_seekable(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_non_seekable(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -724,11 +724,11 @@ def test_get_blob_non_seekable(self, resource_group, location, storage_account, self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_non_seekable_parallel(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_non_seekable_parallel(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -741,9 +741,9 @@ def test_get_blob_non_seekable_parallel(self, resource_group, location, storage_ properties = downloader.readinto(non_seekable_stream) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_blob_to_stream_exact_get_size(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_to_stream_exact_get_size(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() byte_data = self.get_random_bytes(self.config.max_single_get_size) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -773,9 +773,9 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_blob_exact_get_size(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_get_blob_exact_get_size(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() byte_data = self.get_random_bytes(self.config.max_single_get_size) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -800,11 +800,11 @@ def callback(response): progress) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_exact_chunk_size(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_exact_chunk_size(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() byte_data = self.get_random_bytes( self.config.max_single_get_size + @@ -831,11 +831,11 @@ def callback(response): progress) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_to_stream_with_md5(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_to_stream_with_md5(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -852,11 +852,11 @@ def test_get_blob_to_stream_with_md5(self, resource_group, location, storage_acc self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_with_md5(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_with_md5(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -866,11 +866,11 @@ def test_get_blob_with_md5(self, resource_group, location, storage_account, stor self.assertEqual(self.byte_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_range_to_stream_with_overall_md5(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_range_to_stream_with_overall_md5(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) props = blob.get_blob_properties() props.content_settings.content_md5 = b'MDAwMDAwMDA=' @@ -889,14 +889,14 @@ def test_get_blob_range_to_stream_with_overall_md5(self, resource_group, locatio self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_range_with_overall_md5(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_range_with_overall_md5(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) content = blob.download_blob(offset=0, length=1024, validate_content=True) - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) props = blob.get_blob_properties() props.content_settings.content_md5 = b'MDAwMDAwMDA=' blob.set_http_headers(props.content_settings) @@ -909,14 +909,14 @@ def test_get_blob_range_with_overall_md5(self, resource_group, location, storage self.assertEqual(b'MDAwMDAwMDA=', content.properties.content_settings.content_md5) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_get_blob_range_with_range_md5(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_get_blob_range_with_range_md5(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) content = blob.download_blob(offset=0, length=1024, validate_content=True) - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) props = blob.get_blob_properties() props.content_settings.content_md5 = None blob.set_http_headers(props.content_settings) diff --git a/sdk/storage/azure-storage-blob/tests/test_get_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_get_blob_async.py index 06f7e89e1518..6132227c61ab 100644 --- a/sdk/storage/azure-storage-blob/tests/test_get_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_get_blob_async.py @@ -27,7 +27,7 @@ ContainerClient, BlobClient, ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -51,9 +51,9 @@ class StorageGetBlobTestAsync(AsyncStorageTestCase): # --Helpers----------------------------------------------------------------- - async def _setup(self, storage_account, key): + async def _setup(self, storage_account_name, key): self.bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=key, max_single_get_size=32 * 1024, max_chunk_get_size=4 * 1024, @@ -97,11 +97,11 @@ def seekable(self): # -- Get test cases for blobs ---------------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_get_blob_unicode_data_async(self, resource_group, location, storage_account, storage_account_key): + async def test_unicode_get_blob_unicode_data_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_data = u'hello world啊齄丂狛狜'.encode('utf-8') blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -114,11 +114,11 @@ async def test_unicode_get_blob_unicode_data_async(self, resource_group, locatio self.assertIsInstance(content.properties, BlobProperties) self.assertEqual(await content.readall(), blob_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_get_blob_binary_data_async(self, resource_group, location, storage_account, storage_account_key): + async def test_unicode_get_blob_binary_data_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) base64_data = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==' binary_data = base64.b64decode(base64_data) @@ -133,11 +133,11 @@ async def test_unicode_get_blob_binary_data_async(self, resource_group, location self.assertIsInstance(content.properties, BlobProperties) self.assertEqual(await content.readall(), binary_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_no_content_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_no_content_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_data = b'' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -151,13 +151,13 @@ async def test_get_blob_no_content_async(self, resource_group, location, storage self.assertEqual(0, content.properties.size) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_bytes_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_bytes_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -167,13 +167,13 @@ async def test_get_blob_to_bytes_async(self, resource_group, location, storage_a self.assertEqual(self.byte_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_blob_to_bytes_with_single_byte_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_blob_to_bytes_with_single_byte_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -190,10 +190,10 @@ async def test_ranged_get_blob_to_bytes_with_single_byte_async(self, resource_gr self.assertEqual(1, len(content)) self.assertEqual(self.byte_data[5], content[0]) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_blob_to_bytes_with_zero_byte_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_ranged_get_blob_to_bytes_with_zero_byte_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) blob_data = b'' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -209,10 +209,10 @@ async def test_ranged_get_blob_to_bytes_with_zero_byte_async(self, resource_grou await blob.download_blob(offset=3, length=5) self.assertEqual(StorageErrorCode.invalid_range, e.exception.error_code) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_blob_with_missing_start_range_async(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_ranged_get_blob_with_missing_start_range_async(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) blob_data = b'foobar' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -224,13 +224,13 @@ async def test_ranged_get_blob_with_missing_start_range_async(self, resource_gro await blob.download_blob(length=3) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_bytes_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_bytes_snapshot_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) snapshot_ref = await blob.create_snapshot() snapshot = self.bsc.get_blob_client(self.container_name, self.byte_blob, snapshot=snapshot_ref) @@ -244,13 +244,13 @@ async def test_get_blob_to_bytes_snapshot_async(self, resource_group, location, self.assertEqual(self.byte_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_bytes_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_bytes_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -270,11 +270,11 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_bytes_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_bytes_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -294,11 +294,11 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_bytes_small_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_bytes_small_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_data = self.get_random_bytes(1024) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -323,13 +323,13 @@ def callback(response): progress) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_stream_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_stream_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -346,9 +346,9 @@ async def test_get_blob_to_stream_async(self, resource_group, location, storage_ self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_readinto_raises_exceptions(self, resource_group, location, storage_account, storage_account_key): + async def test_readinto_raises_exceptions(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live callback_counter = {'value': 0} @@ -358,7 +358,7 @@ def callback(response): raise ValueError() # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -369,13 +369,13 @@ def callback(response): await downloader.readinto(stream) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_stream_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_stream_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -401,11 +401,11 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_stream_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_stream_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -432,11 +432,11 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_stream_small_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_stream_small_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_data = self.get_random_bytes(1024) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -469,13 +469,13 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_blob_to_path_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_blob_to_path_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -493,13 +493,13 @@ async def test_ranged_get_blob_to_path_async(self, resource_group, location, sto self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_blob_to_path_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_blob_to_path_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) progress = [] blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) @@ -532,11 +532,11 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_blob_to_path_small_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_blob_to_path_small_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -552,11 +552,11 @@ async def test_ranged_get_blob_to_path_small_async(self, resource_group, locatio self.assertEqual(self.byte_data[1:5], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_blob_to_path_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_blob_to_path_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -573,13 +573,13 @@ async def test_ranged_get_blob_to_path_non_parallel_async(self, resource_group, self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_blob_to_path_invalid_range_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_blob_to_path_invalid_range_parallel_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_size = self.config.max_single_get_size + 1 blob_data = self.get_random_bytes(blob_size) blob_name = self._get_blob_reference() @@ -601,13 +601,13 @@ async def test_ranged_get_blob_to_path_invalid_range_parallel_async(self, resour self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_blob_to_path_invalid_range_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_blob_to_path_invalid_range_non_parallel_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_size = 1024 blob_data = self.get_random_bytes(blob_size) blob_name = self._get_blob_reference() @@ -630,13 +630,13 @@ async def test_ranged_get_blob_to_path_invalid_range_non_parallel_async(self, re # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_text_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_text_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text_blob = self.get_resource_name('textblob') text_data = self.get_random_text_data(self.config.max_single_get_size + 1) blob = self.bsc.get_blob_client(self.container_name, text_blob) @@ -650,13 +650,13 @@ async def test_get_blob_to_text_async(self, resource_group, location, storage_ac self.assertEqual(text_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_text_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_text_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text_blob = self.get_resource_name('textblob') text_data = self.get_random_text_data(self.config.max_single_get_size + 1) blob = self.bsc.get_blob_client(self.container_name, text_blob) @@ -684,11 +684,11 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_text_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_text_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text_blob = self._get_blob_reference() text_data = self.get_random_text_data(self.config.max_single_get_size + 1) blob = self.bsc.get_blob_client(self.container_name, text_blob) @@ -716,11 +716,11 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_text_small_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_text_small_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_data = self.get_random_text_data(1024) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -745,11 +745,11 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_text_with_encoding_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_text_with_encoding_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -762,11 +762,11 @@ async def test_get_blob_to_text_with_encoding_async(self, resource_group, locati # Assert self.assertEqual(text, content) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_text_with_encoding_and_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_text_with_encoding_and_progress_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -791,11 +791,11 @@ def callback(response): self.config.max_single_get_size, progress) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_non_seekable_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_non_seekable_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -813,13 +813,13 @@ async def test_get_blob_non_seekable_async(self, resource_group, location, stora self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_non_seekable_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_non_seekable_parallel_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -832,11 +832,11 @@ async def test_get_blob_non_seekable_parallel_async(self, resource_group, locati properties = await downloader.readinto(non_seekable_stream) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_stream_exact_get_size_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_stream_exact_get_size_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() byte_data = self.get_random_bytes(self.config.max_single_get_size) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -866,11 +866,11 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_exact_get_size_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_exact_get_size_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() byte_data = self.get_random_bytes(self.config.max_single_get_size) blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -895,13 +895,13 @@ def callback(response): progress) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_exact_chunk_size_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_exact_chunk_size_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() byte_data = self.get_random_bytes( self.config.max_single_get_size + @@ -928,13 +928,13 @@ def callback(response): progress) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_to_stream_with_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_to_stream_with_md5_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -951,13 +951,13 @@ async def test_get_blob_to_stream_with_md5_async(self, resource_group, location, self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_with_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_with_md5_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) # Act @@ -967,13 +967,13 @@ async def test_get_blob_with_md5_async(self, resource_group, location, storage_a self.assertEqual(self.byte_data, content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_range_to_stream_with_overall_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_range_to_stream_with_overall_md5_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) props = await blob.get_blob_properties() props.content_settings.content_md5 = b'MDAwMDAwMDA=' @@ -992,12 +992,12 @@ async def test_get_blob_range_to_stream_with_overall_md5_async(self, resource_gr self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_range_with_overall_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_range_with_overall_md5_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) content = await blob.download_blob(offset=0, length=1024, validate_content=True) @@ -1013,12 +1013,12 @@ async def test_get_blob_range_with_overall_md5_async(self, resource_group, locat self.assertEqual(b'MDAwMDAwMDA=', content.properties.content_settings.content_md5) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_blob_range_with_range_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_blob_range_with_range_md5_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = self.bsc.get_blob_client(self.container_name, self.byte_blob) content = await blob.download_blob(offset=0, length=1024, validate_content=True) diff --git a/sdk/storage/azure-storage-blob/tests/test_large_block_blob.py b/sdk/storage/azure-storage-blob/tests/test_large_block_blob.py index 1896fe58fc9d..972bc30f294a 100644 --- a/sdk/storage/azure-storage-blob/tests/test_large_block_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_large_block_blob.py @@ -10,9 +10,7 @@ from os import path, remove, sys, urandom import platform -import unittest import uuid -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.storage.blob import ( BlobServiceClient, ContainerClient, @@ -25,7 +23,7 @@ else: from cStringIO import StringIO as BytesIO -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -38,12 +36,12 @@ pytest.skip("Skip tests for Pypy", allow_module_level=True) class StorageLargeBlockBlobTest(StorageTestCase): - def _setup(self, storage_account, key): + def _setup(self, storage_account_name, key): # test chunking functionality by reducing the threshold # for chunking and the size of each chunk, otherwise # the tests would take too long to execute self.bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=key, max_single_put_size=32 * 1024, max_block_size=2 * 1024 * 1024, @@ -81,10 +79,9 @@ def assertBlobEqual(self, container_name, blob_name, expected_data): # --Test cases for block blobs -------------------------------------------- @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_put_block_bytes_large(self, resource_group, location, storage_account, storage_account_key): - - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_block_bytes_large(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self._create_blob() # Act @@ -99,10 +96,9 @@ def test_put_block_bytes_large(self, resource_group, location, storage_account, # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_put_block_bytes_large_with_md5(self, resource_group, location, storage_account, storage_account_key): - - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_block_bytes_large_with_md5(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self._create_blob() # Act @@ -117,10 +113,9 @@ def test_put_block_bytes_large_with_md5(self, resource_group, location, storage_ assert 'request_id' in resp @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_put_block_stream_large(self, resource_group, location, storage_account, storage_account_key): - - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_block_stream_large(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self._create_blob() # Act @@ -138,10 +133,9 @@ def test_put_block_stream_large(self, resource_group, location, storage_account, # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_put_block_stream_large_with_md5(self, resource_group, location, storage_account, storage_account_key): - - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_block_stream_large_with_md5(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self._create_blob() # Act @@ -160,11 +154,11 @@ def test_put_block_stream_large_with_md5(self, resource_group, location, storage # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_large_blob_from_path(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_large_blob_from_path(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -184,11 +178,11 @@ def test_create_large_blob_from_path(self, resource_group, location, storage_acc self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_large_blob_from_path_with_md5(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_large_blob_from_path_with_md5(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -205,10 +199,9 @@ def test_create_large_blob_from_path_with_md5(self, resource_group, location, st self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_large_blob_from_path_non_parallel(self, resource_group, location, storage_account, storage_account_key): - - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_create_large_blob_from_path_non_parallel(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(self.get_random_bytes(100)) @@ -225,11 +218,11 @@ def test_create_large_blob_from_path_non_parallel(self, resource_group, location self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_large_blob_from_path_with_progress(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_large_blob_from_path_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -254,11 +247,11 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_large_blob_from_path_with_properties(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_large_blob_from_path_with_properties(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -281,11 +274,11 @@ def test_create_large_blob_from_path_with_properties(self, resource_group, locat self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_large_blob_from_stream_chunked_upload(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_large_blob_from_stream_chunked_upload(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -302,11 +295,11 @@ def test_create_large_blob_from_stream_chunked_upload(self, resource_group, loca self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_creat_lrgblob_frm_stream_w_progress_chnkd_upload(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_creat_lrgblob_frm_stream_w_progress_chnkd_upload(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -331,10 +324,10 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_large_blob_from_stream_chunked_upload_with_count(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_large_blob_from_stream_chunked_upload_with_count(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -352,11 +345,11 @@ def test_create_large_blob_from_stream_chunked_upload_with_count(self, resource_ self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_creat_lrgblob_frm_strm_chnkd_uplod_w_count_n_props(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_creat_lrgblob_frm_strm_chnkd_uplod_w_count_n_props(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -381,11 +374,11 @@ def test_creat_lrgblob_frm_strm_chnkd_uplod_w_count_n_props(self, resource_group self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_creat_lrg_blob_frm_stream_chnked_upload_w_props(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_creat_lrg_blob_frm_stream_chnked_upload_w_props(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) diff --git a/sdk/storage/azure-storage-blob/tests/test_large_block_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_large_block_blob_async.py index 644f3d2b8ca3..6283a81a27d9 100644 --- a/sdk/storage/azure-storage-blob/tests/test_large_block_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_large_block_blob_async.py @@ -30,7 +30,7 @@ else: from cStringIO import StringIO as BytesIO -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -54,12 +54,12 @@ async def send(self, request, **config): class StorageLargeBlockBlobTestAsync(AsyncStorageTestCase): # --Helpers----------------------------------------------------------------- - async def _setup(self, storage_account, key): + async def _setup(self, storage_account_name, key): # test chunking functionality by reducing the threshold # for chunking and the size of each chunk, otherwise # the tests would take too long to execute self.bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=key, max_single_put_size=32 * 1024, max_block_size=2 * 1024 * 1024, @@ -100,11 +100,11 @@ async def assertBlobEqual(self, container_name, blob_name, expected_data): # --Test cases for block blobs -------------------------------------------- @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_bytes_large_async(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_bytes_large_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = await self._create_blob() # Act @@ -118,11 +118,11 @@ async def test_put_block_bytes_large_async(self, resource_group, location, stora # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_bytes_large_with_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_bytes_large_with_md5_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = await self._create_blob() # Act @@ -137,11 +137,11 @@ async def test_put_block_bytes_large_with_md5_async(self, resource_group, locati assert 'request_id' in resp @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_stream_large_async(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_stream_large_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = await self._create_blob() # Act @@ -159,11 +159,11 @@ async def test_put_block_stream_large_async(self, resource_group, location, stor # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_stream_large_with_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_stream_large_with_md5_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob = await self._create_blob() # Act @@ -182,13 +182,13 @@ async def test_put_block_stream_large_with_md5_async(self, resource_group, locat # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_large_blob_from_path_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_large_blob_from_path_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -210,13 +210,13 @@ async def test_create_large_blob_from_path_async(self, resource_group, location, self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_large_blob_from_path_with_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_large_blob_from_path_with_md5_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -235,12 +235,12 @@ async def test_create_large_blob_from_path_with_md5_async(self, resource_group, self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_large_blob_from_path_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_large_blob_from_path_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(self.get_random_bytes(100)) @@ -259,13 +259,13 @@ async def test_create_large_blob_from_path_non_parallel_async(self, resource_gro self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_large_blob_from_path_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_large_blob_from_path_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) FILE_PATH = 'large_blob_from_path_with_progress_asyn.temp.{}.dat'.format(str(uuid.uuid4())) @@ -292,13 +292,13 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_large_blob_from_path_with_properties_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_large_blob_from_path_with_properties_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -323,13 +323,13 @@ async def test_create_large_blob_from_path_with_properties_async(self, resource_ self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_creat_lrg_blob_frm_stream_chnkd_upload_async(self, resource_group, location, storage_account, storage_account_key): + async def test_creat_lrg_blob_frm_stream_chnkd_upload_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -348,13 +348,13 @@ async def test_creat_lrg_blob_frm_stream_chnkd_upload_async(self, resource_group self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_creat_lrgblob_frm_strm_w_prgrss_chnkduplod_async(self, resource_group, location, storage_account, storage_account_key): + async def test_creat_lrgblob_frm_strm_w_prgrss_chnkduplod_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -381,13 +381,13 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_creat_lrgblob_frm_strm_chnkd_uplod_w_cnt_async(self, resource_group, location, storage_account, storage_account_key): + async def test_creat_lrgblob_frm_strm_chnkd_uplod_w_cnt_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -407,13 +407,13 @@ async def test_creat_lrgblob_frm_strm_chnkd_uplod_w_cnt_async(self, resource_gro self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_creat_lrg_frm_stream_chnk_upload_w_cntnprops(self, resource_group, location, storage_account, storage_account_key): + async def test_creat_lrg_frm_stream_chnk_upload_w_cntnprops(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) @@ -440,13 +440,13 @@ async def test_creat_lrg_frm_stream_chnk_upload_w_cntnprops(self, resource_group self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_large_from_stream_chunk_upld_with_props(self, resource_group, location, storage_account, storage_account_key): + async def test_create_large_from_stream_chunk_upld_with_props(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) data = bytearray(urandom(LARGE_BLOB_SIZE)) diff --git a/sdk/storage/azure-storage-blob/tests/test_largest_block_blob.py b/sdk/storage/azure-storage-blob/tests/test_largest_block_blob.py index be2d8b1dea71..c9f868f001e3 100644 --- a/sdk/storage/azure-storage-blob/tests/test_largest_block_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_largest_block_blob.py @@ -19,7 +19,7 @@ ) from azure.storage.blob._shared.base_client import _format_shared_key_credential -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -36,10 +36,10 @@ pytest.skip("Skip tests for Pypy", allow_module_level=True) class StorageLargestBlockBlobTest(StorageTestCase): - def _setup(self, storage_account, key, additional_policies=None, min_large_block_upload_threshold=1 * 1024 * 1024, + def _setup(self, storage_account_name, key, additional_policies=None, min_large_block_upload_threshold=1 * 1024 * 1024, max_single_put_size=32 * 1024): self.bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=key, max_single_put_size=max_single_put_size, max_block_size=LARGEST_BLOCK_SIZE, @@ -72,9 +72,9 @@ def _create_blob(self): # --Test cases for block blobs -------------------------------------------- @pytest.mark.live_test_only @pytest.mark.skip(reason="This takes really long time") - @GlobalStorageAccountPreparer() - def test_put_block_bytes_largest(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_block_bytes_largest(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self._create_blob() # Act @@ -99,11 +99,11 @@ def test_put_block_bytes_largest(self, resource_group, location, storage_account self.assertEqual(block_list[0][0].size, LARGEST_BLOCK_SIZE) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_put_block_bytes_largest_without_network(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_put_block_bytes_largest_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy]) + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy]) blob = self._create_blob() # Act @@ -130,9 +130,9 @@ def test_put_block_bytes_largest_without_network(self, resource_group, location, @pytest.mark.live_test_only @pytest.mark.skip(reason="This takes really long time") - @GlobalStorageAccountPreparer() - def test_put_block_stream_largest(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_put_block_stream_largest(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob = self._create_blob() # Act @@ -159,11 +159,11 @@ def test_put_block_stream_largest(self, resource_group, location, storage_accoun self.assertEqual(block_list[0][0].size, LARGEST_BLOCK_SIZE) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_put_block_stream_largest_without_network(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_put_block_stream_largest_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy]) + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy]) blob = self._create_blob() # Act @@ -192,9 +192,9 @@ def test_put_block_stream_largest_without_network(self, resource_group, location @pytest.mark.live_test_only @pytest.mark.skip(reason="This takes really long time") - @GlobalStorageAccountPreparer() - def test_create_largest_blob_from_path(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @BlobPreparer() + def test_create_largest_blob_from_path(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) FILE_PATH = 'largest_blob_from_path.temp.{}.dat'.format(str(uuid.uuid4())) @@ -238,11 +238,11 @@ def test_substream_for_single_thread_upload_large_block(self): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_largest_blob_from_path_without_network(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_largest_blob_from_path_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy]) + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy]) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) FILE_PATH = 'largest_blob_from_path.temp.{}.dat'.format(str(uuid.uuid4())) @@ -264,11 +264,11 @@ def test_create_largest_blob_from_path_without_network(self, resource_group, loc @pytest.mark.skip(reason="This takes really long time") @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_largest_blob_from_stream_without_network(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_largest_blob_from_stream_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy]) + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy]) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -284,11 +284,11 @@ def test_create_largest_blob_from_stream_without_network(self, resource_group, l self.assertEqual(payload_dropping_policy.put_block_sizes[0], LARGEST_BLOCK_SIZE) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_largest_blob_from_stream_single_upload_without_network(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_largest_blob_from_stream_single_upload_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy], + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy], max_single_put_size=LARGEST_SINGLE_UPLOAD_SIZE+1) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) diff --git a/sdk/storage/azure-storage-blob/tests/test_largest_block_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_largest_block_blob_async.py index 92239fdfa471..908d0199df21 100644 --- a/sdk/storage/azure-storage-blob/tests/test_largest_block_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_largest_block_blob_async.py @@ -27,7 +27,7 @@ from azure.storage.blob._shared.constants import CONNECTION_TIMEOUT, READ_TIMEOUT from devtools_testutils.storage.aio import AsyncStorageTestCase -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer # ------------------------------------------------------------------------------ TEST_BLOB_PREFIX = 'largestblob' @@ -51,10 +51,10 @@ async def send(self, request, **config): class StorageLargestBlockBlobTestAsync(AsyncStorageTestCase): - async def _setup(self, storage_account, key, additional_policies=None, min_large_block_upload_threshold=1 * 1024 * 1024, + async def _setup(self, storage_account_name, key, additional_policies=None, min_large_block_upload_threshold=1 * 1024 * 1024, max_single_put_size=32 * 1024): self.bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=key, max_single_put_size=max_single_put_size, max_block_size=LARGEST_BLOCK_SIZE, @@ -91,10 +91,10 @@ async def _create_blob(self): # --Test cases for block blobs -------------------------------------------- @pytest.mark.live_test_only @pytest.mark.skip(reason="This takes really long time") - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_bytes_largest(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_put_block_bytes_largest(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) blob = await self._create_blob() # Act @@ -119,12 +119,12 @@ async def test_put_block_bytes_largest(self, resource_group, location, storage_a self.assertEqual(block_list[0][0].size, LARGEST_BLOCK_SIZE) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_bytes_largest_without_network(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_bytes_largest_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - await self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy]) + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + await self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy]) blob = await self._create_blob() # Act @@ -151,10 +151,10 @@ async def test_put_block_bytes_largest_without_network(self, resource_group, loc @pytest.mark.live_test_only @pytest.mark.skip(reason="This takes really long time") - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_stream_largest(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_put_block_stream_largest(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) blob = await self._create_blob() # Act @@ -181,12 +181,12 @@ async def test_put_block_stream_largest(self, resource_group, location, storage_ self.assertEqual(block_list[0][0].size, LARGEST_BLOCK_SIZE) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_block_stream_largest_without_network(self, resource_group, location, storage_account, storage_account_key): + async def test_put_block_stream_largest_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - await self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy]) + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + await self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy]) blob = await self._create_blob() # Act @@ -215,10 +215,10 @@ async def test_put_block_stream_largest_without_network(self, resource_group, lo @pytest.mark.live_test_only @pytest.mark.skip(reason="This takes really long time") - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_largest_blob_from_path(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + async def test_create_largest_blob_from_path(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) FILE_PATH = 'largest_blob_from_path.temp.{}.dat'.format(str(uuid.uuid4())) @@ -237,12 +237,12 @@ async def test_create_largest_blob_from_path(self, resource_group, location, sto self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_largest_blob_from_path_without_network(self, resource_group, location, storage_account, storage_account_key): + async def test_create_largest_blob_from_path_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - await self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy]) + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + await self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy]) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) FILE_PATH = 'largest_blob_from_path.temp.{}.dat'.format(str(uuid.uuid4())) @@ -264,12 +264,12 @@ async def test_create_largest_blob_from_path_without_network(self, resource_grou @pytest.mark.skip(reason="This takes really long time") @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_largest_blob_from_stream_without_network(self, resource_group, location, storage_account, storage_account_key): + async def test_create_largest_blob_from_stream_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - await self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy]) + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + await self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy]) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) @@ -285,13 +285,13 @@ async def test_create_largest_blob_from_stream_without_network(self, resource_gr self.assertEqual(payload_dropping_policy.put_block_sizes[0], LARGEST_BLOCK_SIZE) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_largest_blob_from_stream_single_upload_without_network(self, resource_group, location, storage_account, storage_account_key): + async def test_create_largest_blob_from_stream_single_upload_without_network(self, storage_account_name, storage_account_key): payload_dropping_policy = PayloadDroppingPolicy() - credential_policy = _format_shared_key_credential(storage_account.name, storage_account_key) - await self._setup(storage_account, storage_account_key, [payload_dropping_policy, credential_policy], - max_single_put_size=LARGEST_SINGLE_UPLOAD_SIZE+1) + credential_policy = _format_shared_key_credential(storage_account_name, storage_account_key) + await self._setup(storage_account_name, storage_account_key, [payload_dropping_policy, credential_policy], + max_single_put_size=LARGEST_SINGLE_UPLOAD_SIZE + 1) blob_name = self._get_blob_reference() blob = self.bsc.get_blob_client(self.container_name, blob_name) diff --git a/sdk/storage/azure-storage-blob/tests/test_logging.py b/sdk/storage/azure-storage-blob/tests/test_logging.py index b04e7f05a0a5..08c18bdb7ad5 100644 --- a/sdk/storage/azure-storage-blob/tests/test_logging.py +++ b/sdk/storage/azure-storage-blob/tests/test_logging.py @@ -19,11 +19,10 @@ generate_blob_sas, generate_container_sas ) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.storage.blob._shared.shared_access_signature import QueryStringConstants -from devtools_testutils.storage import StorageTestCase +from devtools_testutils.storage import StorageTestCase, LogCaptured -from _shared.testcase import LogCaptured, GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer if sys.version_info >= (3,): from urllib.parse import parse_qs, quote, urlparse @@ -43,8 +42,11 @@ def _setup(self, bsc): source_blob = bsc.get_blob_client(self.container_name, self.source_blob_name) if self.is_live: - bsc.create_container(self.container_name) - source_blob.upload_blob(self.source_blob_data) + try: + bsc.create_container(self.container_name) + except: + pass + source_blob.upload_blob(self.source_blob_data, overwrite=True) # generate a SAS so that it is accessible with a URL sas_token = generate_blob_sas( @@ -58,11 +60,33 @@ def _setup(self, bsc): ) sas_source = BlobClient.from_blob_url(source_blob.url, credential=sas_token) self.source_blob_url = sas_source.url + + @BlobPreparer() + def test_logging_request_and_response_body(self, storage_account_name, storage_account_key): + # Arrange + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, logging_enable=True) + self._setup(bsc) + container = bsc.get_container_client(self.container_name) + request_body = 'testloggingbody' + blob_name = self.get_resource_name("testloggingblob") + blob_client = container.get_blob_client(blob_name) + blob_client.upload_blob(request_body, overwrite=True) + # Act + with LogCaptured(self) as log_captured: + blob_client.download_blob() + log_as_str = log_captured.getvalue() + self.assertFalse(request_body in log_as_str) + + with LogCaptured(self) as log_captured: + blob_client.download_blob(logging_body=True) + log_as_str = log_captured.getvalue() + self.assertTrue(request_body in log_as_str) + self.assertEqual(log_as_str.count(request_body), 1) - @GlobalStorageAccountPreparer() - def test_authorization_is_scrubbed_off(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_authorization_is_scrubbed_off(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) self._setup(bsc) container = bsc.get_container_client(self.container_name) # Act @@ -76,10 +100,10 @@ def test_authorization_is_scrubbed_off(self, resource_group, location, storage_a self.assertFalse('SharedKey' in log_as_str) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_sas_signature_is_scrubbed_off(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_sas_signature_is_scrubbed_off(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) self._setup(bsc) # Arrange container = bsc.get_container_client(self.container_name) @@ -107,10 +131,10 @@ def test_sas_signature_is_scrubbed_off(self, resource_group, location, storage_a self.assertFalse(signed_signature in log_as_str) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_copy_source_sas_is_scrubbed_off(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_copy_source_sas_is_scrubbed_off(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) self._setup(bsc) # Arrange dest_blob_name = self.get_resource_name('destblob') diff --git a/sdk/storage/azure-storage-blob/tests/test_logging_async.py b/sdk/storage/azure-storage-blob/tests/test_logging_async.py index d0ed5ae7e0a0..2e58e0fb7ab6 100644 --- a/sdk/storage/azure-storage-blob/tests/test_logging_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_logging_async.py @@ -29,9 +29,10 @@ from azure.storage.blob._shared.shared_access_signature import QueryStringConstants -from _shared.testcase import ( - LogCaptured, GlobalStorageAccountPreparer +from settings.testcase import ( + BlobPreparer ) +from devtools_testutils.storage import LogCaptured from devtools_testutils.storage.aio import AsyncStorageTestCase @@ -83,10 +84,31 @@ async def _setup(self, bsc): except: pass - @GlobalStorageAccountPreparer() - @AsyncStorageTestCase.await_prepared_test - async def test_authorization_is_scrubbed_off(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key, transport=AiohttpTestTransport()) + @BlobPreparer() + async def test_logging_request_and_response_body(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport(), logging_enable=True) + await self._setup(bsc) + # Arrange + container = bsc.get_container_client(self.container_name) + request_body = 'testloggingbody' + blob_name = self.get_resource_name("testloggingblob") + blob_client = container.get_blob_client(blob_name) + await blob_client.upload_blob(request_body, overwrite=True) + # Act + with LogCaptured(self) as log_captured: + await blob_client.download_blob() + log_as_str = log_captured.getvalue() + self.assertFalse(request_body in log_as_str) + + with LogCaptured(self) as log_captured: + await blob_client.upload_blob(request_body, overwrite=True, logging_body=True) + log_as_str = log_captured.getvalue() + self.assertTrue(request_body in log_as_str) + self.assertEqual(log_as_str.count(request_body), 1) + + @BlobPreparer() + async def test_authorization_is_scrubbed_off(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key, transport=AiohttpTestTransport()) await self._setup(bsc) # Arrange container = bsc.get_container_client(self.container_name) @@ -101,12 +123,12 @@ async def test_authorization_is_scrubbed_off(self, resource_group, location, sto self.assertFalse('SharedKey' in log_as_str) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_signature_is_scrubbed_off(self, resource_group, location, storage_account, storage_account_key): + async def test_sas_signature_is_scrubbed_off(self, storage_account_name, storage_account_key): # Test can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) await self._setup(bsc) # Arrange container = bsc.get_container_client(self.container_name) @@ -134,11 +156,11 @@ async def test_sas_signature_is_scrubbed_off(self, resource_group, location, sto self.assertFalse(signed_signature in log_as_str) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_source_sas_is_scrubbed_off(self, resource_group, location, storage_account, storage_account_key): + async def test_copy_source_sas_is_scrubbed_off(self, storage_account_name, storage_account_key): # Test can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), storage_account_key) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), storage_account_key) await self._setup(bsc) # Arrange dest_blob_name = self.get_resource_name('destblob') diff --git a/sdk/storage/azure-storage-blob/tests/test_ors.py b/sdk/storage/azure-storage-blob/tests/test_ors.py index 7791b28a85a4..694461aa96ad 100644 --- a/sdk/storage/azure-storage-blob/tests/test_ors.py +++ b/sdk/storage/azure-storage-blob/tests/test_ors.py @@ -6,7 +6,7 @@ # license information. # -------------------------------------------------------------------------- import pytest -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase from azure.storage.blob import ( @@ -49,11 +49,11 @@ def test_deserialize_ors_policies(self): self.assertEqual(result[1].rules[1].status, 'Failed' if result[1].rules[1].rule_id == '222' else 'Completed') @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_ors_source(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_ors_source(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) blob = bsc.get_blob_client(container=self.SRC_CONTAINER, blob=self.BLOB_NAME) @@ -78,11 +78,11 @@ def test_ors_source(self, resource_group, location, storage_account, storage_acc props.object_replication_source_properties) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_ors_destination(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_ors_destination(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) blob = bsc.get_blob_client(container=self.DST_CONTAINER, blob=self.BLOB_NAME) diff --git a/sdk/storage/azure-storage-blob/tests/test_ors_async.py b/sdk/storage/azure-storage-blob/tests/test_ors_async.py index f60a21370404..07a185191a1f 100644 --- a/sdk/storage/azure-storage-blob/tests/test_ors_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_ors_async.py @@ -10,7 +10,7 @@ from multidict import CIMultiDict, CIMultiDictProxy from devtools_testutils.storage.aio import AsyncStorageTestCase -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from azure.storage.blob import BlobProperties from azure.storage.blob.aio import BlobServiceClient @@ -38,12 +38,12 @@ class StorageObjectReplicationTest(AsyncStorageTestCase): # TODO use generated account and set OR policy dynamically @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ors_source(self, resource_group, location, storage_account, storage_account_key): + async def test_ors_source(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport(connection_data_block_size=1024)) blob = bsc.get_blob_client(container=self.SRC_CONTAINER, blob=self.BLOB_NAME) @@ -69,12 +69,12 @@ async def test_ors_source(self, resource_group, location, storage_account, stora props.object_replication_source_properties) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ors_destination(self, resource_group, location, storage_account, storage_account_key): + async def test_ors_destination(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key, transport=AiohttpTestTransport(connection_data_block_size=1024)) blob = bsc.get_blob_client(container=self.DST_CONTAINER, blob=self.BLOB_NAME) diff --git a/sdk/storage/azure-storage-blob/tests/test_page_blob.py b/sdk/storage/azure-storage-blob/tests/test_page_blob.py index 8f92947aba96..10d7ff125cee 100644 --- a/sdk/storage/azure-storage-blob/tests/test_page_blob.py +++ b/sdk/storage/azure-storage-blob/tests/test_page_blob.py @@ -33,7 +33,7 @@ from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, BlobAccountPreparer, \ CachedResourceGroupPreparer from azure.storage.blob._shared.policies import StorageContentValidation -from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase #------------------------------------------------------------------------------ @@ -131,9 +131,9 @@ def read(self, count): return self.wrapped_file.read(count) #--Test cases for page blobs -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -145,10 +145,9 @@ def test_create_blob(self, resource_group, location, storage_account, storage_ac self.assertIsNotNone(resp.get('last_modified')) self.assertTrue(blob.get_blob_properties()) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", random_name_enabled=True) - def test_create_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_blob_with_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + bsc = BlobServiceClient(self.account_url(versioned_storage_account_name, "blob"), credential=versioned_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) container_name = self.get_resource_name('vlwcontainer') @@ -158,7 +157,7 @@ def test_create_blob_with_immutability_policy(self, resource_group, location, st mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) blob_name = self.get_resource_name("vlwblob") blob = bsc.get_blob_client(container_name, blob_name) @@ -181,12 +180,12 @@ def test_create_blob_with_immutability_policy(self, resource_group, location, st blob.delete_immutability_policy() blob.set_legal_hold(False) blob.delete_blob() - mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_create_page_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_page_blob_returns_vid(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -199,9 +198,9 @@ def test_create_page_blob_returns_vid(self, resource_group, location, storage_ac self.assertIsNotNone(resp.get('last_modified')) self.assertTrue(blob.get_blob_properties()) - @GlobalStorageAccountPreparer() - def test_create_blob_with_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_blob_with_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) metadata = {'hello': 'world', 'number': '42'} @@ -213,9 +212,9 @@ def test_create_blob_with_metadata(self, resource_group, location, storage_accou md = blob.get_blob_properties() self.assertDictEqual(md.metadata, metadata) - @GlobalStorageAccountPreparer() - def test_put_page_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_put_page_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) lease = blob.acquire_lease() @@ -228,10 +227,9 @@ def test_put_page_with_lease_id(self, resource_group, location, storage_account, content = blob.download_blob(lease=lease) self.assertEqual(content.readall(), data) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - def test_put_page_with_lease_id_and_if_tags(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_put_page_with_lease_id_and_if_tags(self, blob_storage_account_name, blob_storage_account_key): + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), credential=blob_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) tags = {"tag1 name": "my tag", "tag2": "secondtag", "tag3": "thirdtag"} blob = self._create_blob(bsc, tags=tags) @@ -252,9 +250,9 @@ def test_put_page_with_lease_id_and_if_tags(self, resource_group, location, stor self.assertEqual(content.readall(), data) self.assertEqual(1, len(page_ranges)) - @GlobalStorageAccountPreparer() - def test_update_page(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_page(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -268,9 +266,9 @@ def test_update_page(self, resource_group, location, storage_account, storage_ac self.assertIsNotNone(resp.get('blob_sequence_number')) self.assertBlobEqual(self.container_name, blob.blob_name, data, bsc) - @GlobalStorageAccountPreparer() - def test_create_8tb_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_8tb_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -286,9 +284,9 @@ def test_create_8tb_blob(self, resource_group, location, storage_account, storag self.assertEqual(props.size, EIGHT_TB) self.assertEqual(0, len(page_ranges)) - @GlobalStorageAccountPreparer() - def test_create_larger_than_8tb_blob_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_larger_than_8tb_blob_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -296,9 +294,9 @@ def test_create_larger_than_8tb_blob_fail(self, resource_group, location, storag with self.assertRaises(HttpResponseError): blob.create_page_blob(EIGHT_TB + 1) - @GlobalStorageAccountPreparer() - def test_update_8tb_blob_page(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_8tb_blob_page(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) blob.create_page_blob(EIGHT_TB) @@ -321,9 +319,9 @@ def test_update_8tb_blob_page(self, resource_group, location, storage_account, s self.assertEqual(page_ranges[0]['start'], start_offset) self.assertEqual(page_ranges[0]['end'], start_offset + length - 1) - @GlobalStorageAccountPreparer() - def test_update_page_with_md5(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_page_with_md5(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -333,9 +331,9 @@ def test_update_page_with_md5(self, resource_group, location, storage_account, s # Assert - @GlobalStorageAccountPreparer() - def test_clear_page(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_clear_page(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -348,9 +346,9 @@ def test_clear_page(self, resource_group, location, storage_account, storage_acc self.assertIsNotNone(resp.get('blob_sequence_number')) self.assertBlobEqual(self.container_name, blob.blob_name, b'\x00' * 512, bsc) - @GlobalStorageAccountPreparer() - def test_put_page_if_sequence_number_lt_success(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_put_page_if_sequence_number_lt_success(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -364,9 +362,9 @@ def test_put_page_if_sequence_number_lt_success(self, resource_group, location, # Assert self.assertBlobEqual(self.container_name, blob.blob_name, data, bsc) - @GlobalStorageAccountPreparer() - def test_update_page_if_sequence_number_lt_failure(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_page_if_sequence_number_lt_failure(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -379,9 +377,9 @@ def test_update_page_if_sequence_number_lt_failure(self, resource_group, locatio # Assert - @GlobalStorageAccountPreparer() - def test_update_page_if_sequence_number_lte_success(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_page_if_sequence_number_lte_success(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -394,9 +392,9 @@ def test_update_page_if_sequence_number_lte_success(self, resource_group, locati # Assert self.assertBlobEqual(self.container_name, blob.blob_name, data, bsc) - @GlobalStorageAccountPreparer() - def test_update_page_if_sequence_number_lte_failure(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_page_if_sequence_number_lte_failure(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -409,9 +407,9 @@ def test_update_page_if_sequence_number_lte_failure(self, resource_group, locati # Assert - @GlobalStorageAccountPreparer() - def test_update_page_if_sequence_number_eq_success(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_page_if_sequence_number_eq_success(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -424,9 +422,9 @@ def test_update_page_if_sequence_number_eq_success(self, resource_group, locatio # Assert self.assertBlobEqual(self.container_name, blob.blob_name, data, bsc) - @GlobalStorageAccountPreparer() - def test_update_page_if_sequence_number_eq_failure(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_page_if_sequence_number_eq_failure(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -437,9 +435,9 @@ def test_update_page_if_sequence_number_eq_failure(self, resource_group, locatio with self.assertRaises(HttpResponseError): blob.upload_page(data, offset=0, length=512, if_sequence_number_eq=start_sequence - 1) - @GlobalStorageAccountPreparer() - def test_update_page_unicode(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_page_unicode(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -451,10 +449,10 @@ def test_update_page_unicode(self, resource_group, location, storage_account, st self.assertIsNotNone(resp.get('etag')) self.assertIsNotNone(resp.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url(self, storage_account_name, storage_account_key): # Arrange - account_url = self.account_url(storage_account, "blob") + account_url = self.account_url(storage_account_name, "blob") if not isinstance(account_url, str): account_url = account_url.encode('utf-8') storage_account_key = storage_account_key.encode('utf-8') @@ -517,10 +515,10 @@ def test_upload_pages_from_url(self, resource_group, location, storage_account, self.assertEqual(blob_properties.get('etag'), source_with_special_chars_resp.get('etag')) self.assertEqual(blob_properties.get('last_modified'), source_with_special_chars_resp.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_oauth(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_oauth(self, storage_account_name, storage_account_key): # Arrange - account_url = self.account_url(storage_account, "blob") + account_url = self.account_url(storage_account_name, "blob") if not isinstance(account_url, str): account_url = account_url.encode('utf-8') storage_account_key = storage_account_key.encode('utf-8') @@ -542,10 +540,10 @@ def test_upload_pages_from_url_with_oauth(self, resource_group, location, storag destination_blob_data = destination_blob_client.download_blob().readall() self.assertEqual(source_blob_data, destination_blob_data) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_and_validate_content_md5(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_and_validate_content_md5(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -585,10 +583,10 @@ def test_upload_pages_from_url_and_validate_content_md5(self, resource_group, lo source_content_md5=StorageContentValidation.get_content_md5( b"POTATO")) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_source_if_modified(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_source_if_modified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -630,10 +628,10 @@ def test_upload_pages_from_url_with_source_if_modified(self, resource_group, loc source_if_modified_since=source_properties.get( 'last_modified')) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_source_if_unmodified(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_source_if_unmodified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -674,10 +672,10 @@ def test_upload_pages_from_url_with_source_if_unmodified(self, resource_group, l source_if_unmodified_since=source_properties.get('last_modified') - timedelta( hours=15)) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_source_if_match(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_source_if_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -719,10 +717,10 @@ def test_upload_pages_from_url_with_source_if_match(self, resource_group, locati source_etag='0x111111111111111', source_match_condition=MatchConditions.IfNotModified) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_source_if_none_match(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_source_if_none_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -764,10 +762,10 @@ def test_upload_pages_from_url_with_source_if_none_match(self, resource_group, l source_etag=source_properties.get('etag'), source_match_condition=MatchConditions.IfModified) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_if_modified(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_if_modified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -808,10 +806,10 @@ def test_upload_pages_from_url_with_if_modified(self, resource_group, location, source_offset=0, if_modified_since=blob_properties.get('last_modified')) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_if_unmodified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -853,10 +851,10 @@ def test_upload_pages_from_url_with_if_unmodified(self, resource_group, location if_unmodified_since=source_properties.get('last_modified') - timedelta( minutes=15)) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_if_match(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_if_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -893,10 +891,10 @@ def test_upload_pages_from_url_with_if_match(self, resource_group, location, sto etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_if_none_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -938,10 +936,10 @@ def test_upload_pages_from_url_with_if_none_match(self, resource_group, location etag=blob_properties.get('etag'), match_condition=MatchConditions.IfModified) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_sequence_number_lt(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_sequence_number_lt(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) start_sequence = 10 source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) @@ -981,10 +979,10 @@ def test_upload_pages_from_url_with_sequence_number_lt(self, resource_group, loc 0, if_sequence_number_lt=start_sequence) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_sequence_number_lte(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_sequence_number_lte(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) start_sequence = 10 source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) @@ -1024,10 +1022,10 @@ def test_upload_pages_from_url_with_sequence_number_lte(self, resource_group, lo 0, if_sequence_number_lte=start_sequence - 1) - @GlobalStorageAccountPreparer() - def test_upload_pages_from_url_with_sequence_number_eq(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_upload_pages_from_url_with_sequence_number_eq(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) start_sequence = 10 source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) @@ -1067,9 +1065,9 @@ def test_upload_pages_from_url_with_sequence_number_eq(self, resource_group, loc 0, if_sequence_number_eq=start_sequence + 1) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_no_pages(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_no_pages(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -1081,9 +1079,9 @@ def test_get_page_ranges_no_pages(self, resource_group, location, storage_accoun self.assertIsInstance(ranges, list) self.assertEqual(len(ranges), 0) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_2_pages(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_2_pages(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc, length=2048) data = self.get_random_bytes(512) @@ -1102,9 +1100,9 @@ def test_get_page_ranges_2_pages(self, resource_group, location, storage_account self.assertEqual(ranges[1]['start'], 1024) self.assertEqual(ranges[1]['end'], 1535) - @GlobalStorageAccountPreparer() - def test_get_page_ranges_diff(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_get_page_ranges_diff(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc, length=2048) data = self.get_random_bytes(1536) @@ -1139,9 +1137,9 @@ def test_get_page_ranges_diff(self, resource_group, location, storage_account, s self.assertEqual(cleared2[0]['end'], 1023) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_get_page_managed_disk_diff(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_get_page_managed_disk_diff(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc, length=2048) data = self.get_random_bytes(1536) @@ -1198,9 +1196,9 @@ def test_get_page_managed_disk_diff(self, resource_group, location, storage_acco self.assertEqual(cleared2[0]['start'], 512) self.assertEqual(cleared2[0]['end'], 1023) - @GlobalStorageAccountPreparer() - def test_update_page_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_update_page_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc, length=2048) data = self.get_random_bytes(512) @@ -1213,9 +1211,9 @@ def test_update_page_fail(self, resource_group, location, storage_account, stora # TODO # self.assertEqual(str(e), 'end_range must be an integer that aligns with 512 page size') - @GlobalStorageAccountPreparer() - def test_resize_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_resize_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc, length=1024) @@ -1230,9 +1228,9 @@ def test_resize_blob(self, resource_group, location, storage_account, storage_ac self.assertIsInstance(props, BlobProperties) self.assertEqual(props.size, 512) - @GlobalStorageAccountPreparer() - def test_set_sequence_number_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_set_sequence_number_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._create_blob(bsc) @@ -1247,9 +1245,9 @@ def test_set_sequence_number_blob(self, resource_group, location, storage_accoun self.assertIsInstance(props, BlobProperties) self.assertEqual(props.page_blob_sequence_number, 6) - @GlobalStorageAccountPreparer() - def test_create_page_blob_with_no_overwrite(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_page_blob_with_no_overwrite(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data1 = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1279,9 +1277,9 @@ def test_create_page_blob_with_no_overwrite(self, resource_group, location, stor self.assertEqual(props.size, LARGE_BLOB_SIZE) self.assertEqual(props.blob_type, BlobType.PageBlob) - @GlobalStorageAccountPreparer() - def test_create_page_blob_with_overwrite(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_page_blob_with_overwrite(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data1 = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1310,11 +1308,11 @@ def test_create_page_blob_with_overwrite(self, resource_group, location, storage self.assertEqual(props.blob_type, BlobType.PageBlob) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_bytes(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_bytes(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1329,11 +1327,11 @@ def test_create_blob_from_bytes(self, resource_group, location, storage_account, self.assertEqual(props.last_modified, create_resp.get('last_modified')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_0_bytes(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_0_bytes(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(0) @@ -1348,11 +1346,11 @@ def test_create_blob_from_0_bytes(self, resource_group, location, storage_accoun self.assertEqual(props.last_modified, create_resp.get('last_modified')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_bytes_with_progress_first(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_bytes_with_progress_first(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1376,11 +1374,11 @@ def callback(response): self.assert_upload_progress(LARGE_BLOB_SIZE, self.config.max_page_size, progress) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_bytes_with_index(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_bytes_with_index(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1392,9 +1390,9 @@ def test_create_blob_from_bytes_with_index(self, resource_group, location, stora # Assert self.assertBlobEqual(self.container_name, blob.blob_name, data[1024:], bsc) - @GlobalStorageAccountPreparer() - def test_create_blob_from_bytes_with_index_and_count(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_blob_from_bytes_with_index_and_count(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1411,11 +1409,11 @@ def test_create_blob_from_bytes_with_index_and_count(self, resource_group, locat self.assertEqual(props.last_modified, create_resp.get('last_modified')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_path(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_path(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1435,11 +1433,11 @@ def test_create_blob_from_path(self, resource_group, location, storage_account, self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_path_with_progress(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_path_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1464,11 +1462,11 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_stream(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_stream(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1489,11 +1487,11 @@ def test_create_blob_from_stream(self, resource_group, location, storage_account self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_stream_with_empty_pages(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_stream_with_empty_pages(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) # data is almost all empty (0s) except two ranges blob = self._get_blob_reference(bsc) @@ -1524,11 +1522,11 @@ def test_create_blob_from_stream_with_empty_pages(self, resource_group, location self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_stream_non_seekable(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_stream_non_seekable(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1551,11 +1549,11 @@ def test_create_blob_from_stream_non_seekable(self, resource_group, location, st self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_stream_with_progress(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_stream_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1582,11 +1580,11 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_stream_truncated(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_stream_truncated(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1604,11 +1602,11 @@ def test_create_blob_from_stream_truncated(self, resource_group, location, stora self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_from_stream_with_progress_truncated(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_from_stream_with_progress_truncated(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1634,9 +1632,9 @@ def callback(response): self.assert_upload_progress(blob_size, self.config.max_page_size, progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_create_blob_with_md5_small(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_create_blob_with_md5_small(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -1647,11 +1645,11 @@ def test_create_blob_with_md5_small(self, resource_group, location, storage_acco # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_create_blob_with_md5_large(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_create_blob_with_md5_large(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1663,11 +1661,11 @@ def test_create_blob_with_md5_large(self, resource_group, location, storage_acco @pytest.mark.skip(reason="Failing live test https://github.com/Azure/azure-sdk-for-python/issues/10473") @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_incremental_copy_blob(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_incremental_copy_blob(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) source_blob = self._create_blob(bsc, length=2048) data = self.get_random_bytes(512) @@ -1705,13 +1703,12 @@ def test_incremental_copy_blob(self, resource_group, location, storage_account, # strip off protocol self.assertTrue(copy_blob.copy.source.endswith(sas_blob.url[5:])) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage') - def test_blob_tier_on_create(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_blob_tier_on_create(self, premium_storage_account_name, premium_storage_account_key): + bsc = BlobServiceClient(self.account_url(premium_storage_account_name, "blob"), credential=premium_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) - url = self.account_url(storage_account, "blob") - credential = storage_account_key + url = self.account_url(premium_storage_account_name, "blob") + credential = premium_storage_account_key pbs = BlobServiceClient(url, credential=credential) try: @@ -1764,13 +1761,12 @@ def test_blob_tier_on_create(self, resource_group, location, storage_account, st container.delete_container() self._teardown(FILE_PATH) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage') - def test_blob_tier_set_tier_api(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + def test_blob_tier_set_tier_api(self, premium_storage_account_name, premium_storage_account_key): + bsc = BlobServiceClient(self.account_url(premium_storage_account_name, "blob"), credential=premium_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) - url = self.account_url(storage_account, "blob") - credential = storage_account_key + url = self.account_url(premium_storage_account_name, "blob") + credential = premium_storage_account_key pbs = BlobServiceClient(url, credential=credential) try: @@ -1820,11 +1816,11 @@ def test_blob_tier_set_tier_api(self, resource_group, location, storage_account, # TODO: check with service to see if premium blob supports tags # @GlobalResourceGroupPreparer() - # @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage') - # def test_blob_tier_set_tier_api_with_if_tags(self, resource_group, location, storage_account, storage_account_key): - # bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + # @BlobPreparer( + # def test_blob_tier_set_tier_api_with_if_tags(self, premium_storage_account_name, premium_storage_account_key): + # bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) # self._setup(bsc) - # url = self.account_url(storage_account, "blob") + # url = self.account_url(storage_account_name, "blob") # credential = storage_account_key # pbs = BlobServiceClient(url, credential=credential) # tags = {"tag1": "firsttag", "tag2": "secondtag", "tag3": "thirdtag"} @@ -1875,13 +1871,13 @@ def test_blob_tier_set_tier_api(self, resource_group, location, storage_account, # finally: # container.delete_container() - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage') - def test_blob_tier_copy_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + @pytest.mark.playback_test_only + def test_blob_tier_copy_blob(self, premium_storage_account_name, premium_storage_account_key): + bsc = BlobServiceClient(self.account_url(premium_storage_account_name, "blob"), credential=premium_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) - url = self.account_url(storage_account, "blob") - credential = storage_account_key + url = self.account_url(premium_storage_account_name, "blob") + credential = premium_storage_account_key pbs = BlobServiceClient(url, credential=credential) try: @@ -1901,7 +1897,7 @@ def test_blob_tier_copy_blob(self, resource_group, location, storage_account, st # Act source_blob_url = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), container_name, source_blob.blob_name) + self.account_url(premium_storage_account_name, "blob"), container_name, source_blob.blob_name) copy_blob = pbs.get_blob_client(container_name, 'blob1copy') copy = copy_blob.start_copy_from_url(source_blob_url, premium_page_blob_tier=PremiumPageBlobTier.P30) @@ -1920,7 +1916,7 @@ def test_blob_tier_copy_blob(self, resource_group, location, storage_account, st source_blob2.create_page_blob(1024) source_blob2_url = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), source_blob2.container_name, source_blob2.blob_name) + self.account_url(premium_storage_account_name, "blob"), source_blob2.container_name, source_blob2.blob_name) copy_blob2 = pbs.get_blob_client(container_name, 'blob2copy') copy2 = copy_blob2.start_copy_from_url(source_blob2_url, premium_page_blob_tier=PremiumPageBlobTier.P60) @@ -1944,10 +1940,10 @@ def test_blob_tier_copy_blob(self, resource_group, location, storage_account, st finally: container.delete_container() - @GlobalStorageAccountPreparer() - def test_download_sparse_page_blob_non_parallel(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_download_sparse_page_blob_non_parallel(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) self.config.max_single_get_size = 4*1024 self.config.max_chunk_get_size = 1024 @@ -1980,12 +1976,12 @@ def test_download_sparse_page_blob_non_parallel(self, resource_group, location, self.assertEqual(byte, 0) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_download_sparse_page_blob_parallel(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_download_sparse_page_blob_parallel(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) self._setup(bsc) self.config.max_single_get_size = 4 * 1024 self.config.max_chunk_get_size = 1024 diff --git a/sdk/storage/azure-storage-blob/tests/test_page_blob_async.py b/sdk/storage/azure-storage-blob/tests/test_page_blob_async.py index d15289df0898..be2688f74865 100644 --- a/sdk/storage/azure-storage-blob/tests/test_page_blob_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_page_blob_async.py @@ -40,7 +40,7 @@ BlobClient, ) -from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage.aio import AsyncStorageTestCase #------------------------------------------------------------------------------ @@ -146,11 +146,11 @@ def read(self, count): # --Test cases for page blobs -------------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_oauth(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_oauth(self, storage_account_name, storage_account_key): # Arrange - account_url = self.account_url(storage_account, "blob") + account_url = self.account_url(storage_account_name, "blob") if not isinstance(account_url, str): account_url = account_url.encode('utf-8') storage_account_key = storage_account_key.encode('utf-8') @@ -175,10 +175,10 @@ async def test_upload_pages_from_url_with_oauth(self, resource_group, location, destination_blob_data = await destination_blob.readall() self.assertEqual(source_blob_data, destination_blob_data) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -190,11 +190,9 @@ async def test_create_blob(self, resource_group, location, storage_account, stor self.assertIsNotNone(resp.get('last_modified')) self.assertTrue(await blob.get_blob_properties()) - @GlobalResourceGroupPreparer() - @BlobAccountPreparer(name_prefix='storagename', is_versioning_enabled=True, location="canadacentral", - random_name_enabled=True) - async def test_create_blob_with_immutability_policy(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + async def test_create_blob_with_immutability_policy(self, versioned_storage_account_name, versioned_storage_account_key, storage_resource_group_name): + bsc = BlobServiceClient(self.account_url(versioned_storage_account_name, "blob"), credential=versioned_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) await self._setup(bsc) container_name = self.get_resource_name('vlwcontainer') @@ -204,7 +202,7 @@ async def test_create_blob_with_immutability_policy(self, resource_group, locati mgmt_client = StorageManagementClient(token_credential, subscription_id, '2021-04-01') property = mgmt_client.models().BlobContainer( immutable_storage_with_versioning=mgmt_client.models().ImmutableStorageWithVersioning(enabled=True)) - await mgmt_client.blob_containers.create(resource_group.name, storage_account.name, container_name, blob_container=property) + await mgmt_client.blob_containers.create(storage_resource_group_name, versioned_storage_account_name, container_name, blob_container=property) blob_name = self.get_resource_name("vlwblob") blob = bsc.get_blob_client(container_name, blob_name) @@ -228,13 +226,13 @@ async def test_create_blob_with_immutability_policy(self, resource_group, locati await blob.delete_immutability_policy() await blob.set_legal_hold(False) await blob.delete_blob() - await mgmt_client.blob_containers.delete(resource_group.name, storage_account.name, container_name) + await mgmt_client.blob_containers.delete(storage_resource_group_name, versioned_storage_account_name, container_name) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_page_blob_returns_vid(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_page_blob_returns_vid(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -247,10 +245,10 @@ async def test_create_page_blob_returns_vid(self, resource_group, location, stor self.assertIsNotNone(resp.get('last_modified')) self.assertTrue(await blob.get_blob_properties()) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_metadata(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_blob_with_metadata(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) # Arrange await self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -263,10 +261,10 @@ async def test_create_blob_with_metadata(self, resource_group, location, storage md = await blob.get_blob_properties() self.assertDictEqual(md.metadata, metadata) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_page_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_page_with_lease_id(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) lease = await blob.acquire_lease() @@ -280,11 +278,9 @@ async def test_put_page_with_lease_id(self, resource_group, location, storage_ac actual = await content.readall() self.assertEqual(actual, data) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='storagename') - @AsyncStorageTestCase.await_prepared_test - async def test_put_page_with_lease_id_and_if_tags(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) + @BlobPreparer() + async def test_put_page_with_lease_id_and_if_tags(self, blob_storage_account_name, blob_storage_account_key): + bsc = BlobServiceClient(self.account_url(blob_storage_account_name, "blob"), credential=blob_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024) await self._setup(bsc) tags = {"tag1 name": "my tag", "tag2": "secondtag", "tag3": "thirdtag"} blob = await self._create_blob(bsc, tags=tags) @@ -305,10 +301,10 @@ async def test_put_page_with_lease_id_and_if_tags(self, resource_group, location self.assertEqual(content, data) self.assertEqual(1, len(page_ranges)) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -322,10 +318,10 @@ async def test_update_page(self, resource_group, location, storage_account, stor self.assertIsNotNone(resp.get('blob_sequence_number')) await self.assertBlobEqual(self.container_name, blob.blob_name, data, bsc) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_8tb_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_8tb_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -341,10 +337,10 @@ async def test_create_8tb_blob(self, resource_group, location, storage_account, self.assertEqual(props.size, EIGHT_TB) self.assertEqual(0, len(page_ranges)) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_larger_than_8tb_blob_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_larger_than_8tb_blob_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -352,10 +348,10 @@ async def test_create_larger_than_8tb_blob_fail(self, resource_group, location, with self.assertRaises(HttpResponseError): await blob.create_page_blob(EIGHT_TB + 1) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_8tb_blob_page(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_8tb_blob_page(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) await blob.create_page_blob(EIGHT_TB) @@ -378,10 +374,10 @@ async def test_update_8tb_blob_page(self, resource_group, location, storage_acco self.assertEqual(page_ranges[0]['start'], start_offset) self.assertEqual(page_ranges[0]['end'], start_offset + length - 1) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_with_md5(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_with_md5(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -390,10 +386,10 @@ async def test_update_page_with_md5(self, resource_group, location, storage_acco resp = await blob.upload_page(data, offset=0, length=512, validate_content=True) # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_clear_page(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_clear_page(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -405,10 +401,10 @@ async def test_clear_page(self, resource_group, location, storage_account, stora self.assertIsNotNone(resp.get('blob_sequence_number')) await self.assertBlobEqual(self.container_name, blob.blob_name, b'\x00' * 512, bsc) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_page_if_sequence_number_lt_success(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_put_page_if_sequence_number_lt_success(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -422,10 +418,10 @@ async def test_put_page_if_sequence_number_lt_success(self, resource_group, loca # Assert await self.assertBlobEqual(self.container_name, blob.blob_name, data, bsc) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_if_sequence_number_lt_failure(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_if_sequence_number_lt_failure(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -438,10 +434,10 @@ async def test_update_page_if_sequence_number_lt_failure(self, resource_group, l # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_if_sequence_number_lte_success(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_if_sequence_number_lte_success(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -454,10 +450,10 @@ async def test_update_page_if_sequence_number_lte_success(self, resource_group, # Assert await self.assertBlobEqual(self.container_name, blob.blob_name, data, bsc) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_if_sequence_number_lte_failure(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_if_sequence_number_lte_failure(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -470,10 +466,10 @@ async def test_update_page_if_sequence_number_lte_failure(self, resource_group, # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_if_sequence_number_eq_success(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_if_sequence_number_eq_success(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -486,10 +482,10 @@ async def test_update_page_if_sequence_number_eq_success(self, resource_group, l # Assert await self.assertBlobEqual(self.container_name, blob.blob_name, data, bsc) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_if_sequence_number_eq_failure(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_if_sequence_number_eq_failure(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -502,11 +498,11 @@ async def test_update_page_if_sequence_number_eq_failure(self, resource_group, l # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -538,11 +534,11 @@ async def test_upload_pages_from_url(self, resource_group, location, storage_acc self.assertEqual(blob_properties.get('etag'), resp.get('etag')) self.assertEqual(blob_properties.get('last_modified'), resp.get('last_modified')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_and_validate_content_md5(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_and_validate_content_md5(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -581,11 +577,11 @@ async def test_upload_pages_from_url_and_validate_content_md5(self, resource_gro source_content_md5=StorageContentValidation.get_content_md5( b"POTATO")) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_source_if_modified(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_source_if_modified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -626,11 +622,11 @@ async def test_upload_pages_from_url_with_source_if_modified(self, resource_grou source_if_modified_since=source_properties.get( 'last_modified')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_source_if_unmodified(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_source_if_unmodified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -671,11 +667,11 @@ async def test_upload_pages_from_url_with_source_if_unmodified(self, resource_gr 'last_modified') - timedelta( hours=15)) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_source_if_match(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_source_if_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -712,11 +708,11 @@ async def test_upload_pages_from_url_with_source_if_match(self, resource_group, source_etag='0x111111111111111', source_match_condition=MatchConditions.IfNotModified) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_source_if_none_match(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_source_if_none_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -751,11 +747,11 @@ async def test_upload_pages_from_url_with_source_if_none_match(self, resource_gr source_blob_client.url + "?" + sas, 0, SOURCE_BLOB_SIZE, 0, source_etag=source_properties.get('etag'), source_match_condition=MatchConditions.IfModified) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_if_modified(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_if_modified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -796,11 +792,11 @@ async def test_upload_pages_from_url_with_if_modified(self, resource_group, loca if_modified_since=blob_properties.get( 'last_modified')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_if_unmodified(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_if_unmodified(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -841,11 +837,11 @@ async def test_upload_pages_from_url_with_if_unmodified(self, resource_group, lo 'last_modified') - timedelta( minutes=15)) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_if_match(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_if_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -882,11 +878,11 @@ async def test_upload_pages_from_url_with_if_match(self, resource_group, locatio etag='0x111111111111111', match_condition=MatchConditions.IfNotModified) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_if_none_match(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_if_none_match(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) source_blob_client = await self._create_source_blob(bsc, source_blob_data, 0, SOURCE_BLOB_SIZE) @@ -925,11 +921,11 @@ async def test_upload_pages_from_url_with_if_none_match(self, resource_group, lo etag=blob_properties.get('etag'), match_condition=MatchConditions.IfModified) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_sequence_number_lt(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_sequence_number_lt(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) start_sequence = 10 source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) @@ -967,11 +963,11 @@ async def test_upload_pages_from_url_with_sequence_number_lt(self, resource_grou 0, if_sequence_number_lt=start_sequence) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_sequence_number_lte(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_sequence_number_lte(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) start_sequence = 10 source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) @@ -1009,11 +1005,11 @@ async def test_upload_pages_from_url_with_sequence_number_lte(self, resource_gro 0, if_sequence_number_lte=start_sequence - 1) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_upload_pages_from_url_with_sequence_number_eq(self, resource_group, location, storage_account, storage_account_key): + async def test_upload_pages_from_url_with_sequence_number_eq(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) start_sequence = 10 source_blob_data = self.get_random_bytes(SOURCE_BLOB_SIZE) @@ -1051,10 +1047,10 @@ async def test_upload_pages_from_url_with_sequence_number_eq(self, resource_grou 0, if_sequence_number_eq=start_sequence + 1) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_unicode(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_unicode(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1066,10 +1062,10 @@ async def test_update_page_unicode(self, resource_group, location, storage_accou self.assertIsNotNone(resp.get('etag')) self.assertIsNotNone(resp.get('last_modified')) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_no_pages(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_no_pages(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1081,10 +1077,10 @@ async def test_get_page_ranges_no_pages(self, resource_group, location, storage_ self.assertIsInstance(ranges, list) self.assertEqual(len(ranges), 0) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_2_pages(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_2_pages(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc, 2048) data = self.get_random_bytes(512) @@ -1103,10 +1099,10 @@ async def test_get_page_ranges_2_pages(self, resource_group, location, storage_a self.assertEqual(ranges[1]['start'], 1024) self.assertEqual(ranges[1]['end'], 1535) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_ranges_diff(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_ranges_diff(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc, 2048) data = self.get_random_bytes(1536) @@ -1141,10 +1137,10 @@ async def test_get_page_ranges_diff(self, resource_group, location, storage_acco self.assertEqual(cleared2[0]['end'], 1023) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_page_managed_disk_diff(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_get_page_managed_disk_diff(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc, 2048) data = self.get_random_bytes(1536) @@ -1201,10 +1197,10 @@ async def test_get_page_managed_disk_diff(self, resource_group, location, storag self.assertEqual(cleared2[0]['end'], 1023) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_page_fail(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_update_page_fail(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc, 2048) data = self.get_random_bytes(512) @@ -1219,10 +1215,10 @@ async def test_update_page_fail(self, resource_group, location, storage_account, # Assert raise Exception('Page range validation failed to throw on failure case') - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_resize_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_resize_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc, 1024) @@ -1237,10 +1233,10 @@ async def test_resize_blob(self, resource_group, location, storage_account, stor self.assertIsInstance(props, BlobProperties) self.assertEqual(props.size, 512) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_sequence_number_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_set_sequence_number_blob(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = await self._create_blob(bsc) @@ -1255,10 +1251,10 @@ async def test_set_sequence_number_blob(self, resource_group, location, storage_ self.assertIsInstance(props, BlobProperties) self.assertEqual(props.page_blob_sequence_number, 6) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_page_blob_with_no_overwrite(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_page_blob_with_no_overwrite(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data1 = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1288,10 +1284,10 @@ async def test_create_page_blob_with_no_overwrite(self, resource_group, location self.assertEqual(props.size, LARGE_BLOB_SIZE) self.assertEqual(props.blob_type, BlobType.PageBlob) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_page_blob_with_overwrite(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_page_blob_with_overwrite(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data1 = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1320,12 +1316,12 @@ async def test_create_page_blob_with_overwrite(self, resource_group, location, s self.assertEqual(props.blob_type, BlobType.PageBlob) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_bytes(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_bytes(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1340,12 +1336,12 @@ async def test_create_blob_from_bytes(self, resource_group, location, storage_ac self.assertEqual(props.last_modified, create_resp.get('last_modified')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_0_bytes(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_0_bytes(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(0) @@ -1360,12 +1356,12 @@ async def test_create_blob_from_0_bytes(self, resource_group, location, storage_ self.assertEqual(props.last_modified, create_resp.get('last_modified')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_bytes_with_progress_first(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_bytes_with_progress_first(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1389,12 +1385,12 @@ def callback(response): self.assert_upload_progress(LARGE_BLOB_SIZE, self.config.max_page_size, progress) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_bytes_with_index(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_bytes_with_index(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1406,10 +1402,10 @@ async def test_create_blob_from_bytes_with_index(self, resource_group, location, # Assert await self.assertBlobEqual(self.container_name, blob.blob_name, data[1024:], bsc) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_bytes_with_index_and_count(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_blob_from_bytes_with_index_and_count(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1426,12 +1422,12 @@ async def test_create_blob_from_bytes_with_index_and_count(self, resource_group, self.assertEqual(props.last_modified, create_resp.get('last_modified')) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_path(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_path(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1451,12 +1447,12 @@ async def test_create_blob_from_path(self, resource_group, location, storage_acc self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_path_with_progress(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_path_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1481,12 +1477,12 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_stream(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_stream(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1507,12 +1503,12 @@ async def test_create_blob_from_stream(self, resource_group, location, storage_a self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_stream_with_empty_pages(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_stream_with_empty_pages(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) # data is almost all empty (0s) except two ranges await self._setup(bsc) blob = self._get_blob_reference(bsc) @@ -1544,12 +1540,12 @@ async def test_create_blob_from_stream_with_empty_pages(self, resource_group, lo self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_stream_non_seekable(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_stream_non_seekable(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1572,12 +1568,12 @@ async def test_create_blob_from_stream_non_seekable(self, resource_group, locati self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_stream_with_progress(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_stream_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1604,12 +1600,12 @@ def callback(response): self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_stream_truncated(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_stream_truncated(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1627,12 +1623,12 @@ async def test_create_blob_from_stream_truncated(self, resource_group, location, self._teardown(FILE_PATH) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_from_stream_with_progress_truncated(self, resource_group, location, storage_account, storage_account_key): + async def test_create_blob_from_stream_with_progress_truncated(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1658,10 +1654,10 @@ def callback(response): self.assert_upload_progress(blob_size, self.config.max_page_size, progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_md5_small(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_blob_with_md5_small(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(512) @@ -1672,13 +1668,13 @@ async def test_create_blob_with_md5_small(self, resource_group, location, storag # Assert @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_blob_with_md5_large(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + async def test_create_blob_with_md5_large(self, storage_account_name, storage_account_key): + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) blob = self._get_blob_reference(bsc) data = self.get_random_bytes(LARGE_BLOB_SIZE) @@ -1689,12 +1685,12 @@ async def test_create_blob_with_md5_large(self, resource_group, location, storag @pytest.mark.skip(reason="Failing live test https://github.com/Azure/azure-sdk-for-python/issues/10473") @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_incremental_copy_blob(self, resource_group, location, storage_account, storage_account_key): + async def test_incremental_copy_blob(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) source_blob = await self._create_blob(bsc, 2048) data = self.get_random_bytes(512) @@ -1733,16 +1729,14 @@ async def test_incremental_copy_blob(self, resource_group, location, storage_acc self.assertTrue(copy_blob.copy.source.endswith(sas_blob.url[5:])) @pytest.mark.live_test_only - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage') - @AsyncStorageTestCase.await_prepared_test - async def test_blob_tier_on_create(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + async def test_blob_tier_on_create(self, premium_storage_account_name, premium_storage_account_key): # Test can only run live - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(premium_storage_account_name, "blob"), credential=premium_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) - url = self.account_url(storage_account, "blob") - credential = storage_account_key + url = self.account_url(premium_storage_account_name, "blob") + credential = premium_storage_account_key pbs = BlobServiceClient(url, credential=credential, transport=AiohttpTestTransport()) try: @@ -1796,14 +1790,12 @@ async def test_blob_tier_on_create(self, resource_group, location, storage_accou await container.delete_container() self._teardown(FILE_PATH) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage') - @AsyncStorageTestCase.await_prepared_test - async def test_blob_tier_set_tier_api(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + @BlobPreparer() + async def test_blob_tier_set_tier_api(self, premium_storage_account_name, premium_storage_account_key): + bsc = BlobServiceClient(self.account_url(premium_storage_account_name, "blob"), credential=premium_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) - url = self.account_url(storage_account, "blob") - credential = storage_account_key + url = self.account_url(premium_storage_account_name, "blob") + credential = premium_storage_account_key pbs = BlobServiceClient(url, credential=credential, transport=AiohttpTestTransport()) try: @@ -1855,14 +1847,12 @@ async def test_blob_tier_set_tier_api(self, resource_group, location, storage_ac finally: await container.delete_container() - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage') - @AsyncStorageTestCase.await_prepared_test - async def test_blob_tier_copy_blob(self, resource_group, location, storage_account, storage_account_key): - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + @BlobPreparer() + async def test_blob_tier_copy_blob(self, premium_storage_account_name, premium_storage_account_key): + bsc = BlobServiceClient(self.account_url(premium_storage_account_name, "blob"), credential=premium_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) - url = self.account_url(storage_account, "blob") - credential = storage_account_key + url = self.account_url(premium_storage_account_name, "blob") + credential = premium_storage_account_key pbs = BlobServiceClient(url, credential=credential, transport=AiohttpTestTransport()) try: @@ -1875,7 +1865,7 @@ async def test_blob_tier_copy_blob(self, resource_group, location, storage_accou except ResourceExistsError: pass - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(premium_storage_account_name, "blob"), credential=premium_storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) source_blob = pbs.get_blob_client( container_name, self.get_resource_name(TEST_BLOB_PREFIX)) @@ -1883,7 +1873,7 @@ async def test_blob_tier_copy_blob(self, resource_group, location, storage_accou # Act source_blob_url = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), container_name, source_blob.blob_name) + self.account_url(premium_storage_account_name, "blob"), container_name, source_blob.blob_name) copy_blob = pbs.get_blob_client(container_name, 'blob1copy') copy = await copy_blob.start_copy_from_url(source_blob_url, premium_page_blob_tier=PremiumPageBlobTier.P30) @@ -1902,7 +1892,7 @@ async def test_blob_tier_copy_blob(self, resource_group, location, storage_accou await source_blob2.create_page_blob(1024) source_blob2_url = '{0}/{1}/{2}'.format( - self.account_url(storage_account, "blob"), source_blob2.container_name, source_blob2.blob_name) + self.account_url(premium_storage_account_name, "blob"), source_blob2.container_name, source_blob2.blob_name) copy_blob2 = pbs.get_blob_client(container_name, 'blob2copy') copy2 = await copy_blob2.start_copy_from_url(source_blob2_url, premium_page_blob_tier=PremiumPageBlobTier.P60) @@ -1926,11 +1916,11 @@ async def test_blob_tier_copy_blob(self, resource_group, location, storage_accou finally: await container.delete_container() - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def _test_download_sparse_page_blob(self, resource_group, location, storage_account, storage_account_key): + async def _test_download_sparse_page_blob(self, storage_account_name, storage_account_key): # Arrange - bsc = BlobServiceClient(self.account_url(storage_account, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) + bsc = BlobServiceClient(self.account_url(storage_account_name, "blob"), credential=storage_account_key, connection_data_block_size=4 * 1024, max_page_size=4 * 1024, transport=AiohttpTestTransport()) await self._setup(bsc) self.config.max_single_get_size = 4*1024 self.config.max_chunk_get_size = 1024 diff --git a/sdk/storage/azure-storage-blob/tests/test_quick_query.py b/sdk/storage/azure-storage-blob/tests/test_quick_query.py index 1e307295603e..ff202213c50e 100644 --- a/sdk/storage/azure-storage-blob/tests/test_quick_query.py +++ b/sdk/storage/azure-storage-blob/tests/test_quick_query.py @@ -11,7 +11,7 @@ import pytest from devtools_testutils import StorageAccountPreparer -from _shared.testcase import GlobalStorageAccountPreparer, GlobalResourceGroupPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase from azure.storage.blob import ( BlobServiceClient, @@ -109,11 +109,11 @@ def _get_blob_reference(self): # -- Test cases for APIs supporting CPK ---------------------------------------------- - @GlobalStorageAccountPreparer() - def test_quick_query_readall(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_readall(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -136,11 +136,11 @@ def on_error(error): self.assertEqual(data, CSV_DATA.replace(b'\r\n', b'\n')) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -164,11 +164,11 @@ def test_quick_query_iter_records(self, resource_group, location, storage_accoun self.assertEqual(data, CSV_DATA.replace(b'\r\n', b'')) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_readall_with_encoding(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_readall_with_encoding(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -191,11 +191,11 @@ def on_error(error): self.assertEqual(data, CSV_DATA.replace(b'\r\n', b'\n').decode('utf-8')) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records_with_encoding(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records_with_encoding(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -214,11 +214,11 @@ def test_quick_query_iter_records_with_encoding(self, resource_group, location, self.assertEqual(data, CSV_DATA.replace(b'\r\n', b'').decode('utf-8')) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_output_records_excluding_headers(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_iter_output_records_excluding_headers(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -244,12 +244,11 @@ def test_quick_query_iter_output_records_excluding_headers(self, resource_group, self.assertEqual(data, CSV_DATA.replace(b'\r\n', b'')[44:]) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_output_records_including_headers(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_iter_output_records_including_headers(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -274,11 +273,11 @@ def test_quick_query_iter_output_records_including_headers(self, resource_group, self.assertEqual(data, CSV_DATA.replace(b'\r\n', b'')) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records_with_progress(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records_with_progress(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -300,12 +299,11 @@ def test_quick_query_iter_records_with_progress(self, resource_group, location, self.assertEqual(progress, reader._size) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_readall_with_serialization_setting(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_readall_with_serialization_setting(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -344,11 +342,11 @@ def on_error(error): self.assertEqual(query_result, CONVERTED_CSV_DATA) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records_with_serialization_setting(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records_with_serialization_setting(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -385,12 +383,11 @@ def test_quick_query_iter_records_with_serialization_setting(self, resource_grou self.assertEqual(len(data), 33) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_readall_with_fatal_error_handler(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_readall_with_fatal_error_handler(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -432,11 +429,11 @@ def on_error(error): self.assertEqual(query_result, b'') self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records_with_fatal_error_handler(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records_with_fatal_error_handler(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -480,12 +477,11 @@ def on_error(error): self.assertEqual(data, [b'']) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_readall_with_fatal_error_handler_raise(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_readall_with_fatal_error_handler_raise(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -524,11 +520,11 @@ def on_error(error): query_result = resp.readall() self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records_with_fatal_error_handler_raise(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records_with_fatal_error_handler_raise(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -569,12 +565,11 @@ def on_error(error): print(record) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_readall_with_fatal_error_ignore(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_readall_with_fatal_error_ignore(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -601,12 +596,11 @@ def test_quick_query_readall_with_fatal_error_ignore(self, resource_group, locat query_result = resp.readall() self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records_with_fatal_error_ignore(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records_with_fatal_error_ignore(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -640,12 +634,11 @@ def test_quick_query_iter_records_with_fatal_error_ignore(self, resource_group, print(record) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_readall_with_nonfatal_error_handler(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_readall_with_nonfatal_error_handler(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -684,12 +677,11 @@ def on_error(error): self.assertTrue(len(query_result) > 0) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records_with_nonfatal_error_handler(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records_with_nonfatal_error_handler(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -728,12 +720,11 @@ def on_error(error): self.assertEqual(len(data), 32) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_readall_with_nonfatal_error_ignore(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_readall_with_nonfatal_error_ignore(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -764,12 +755,11 @@ def test_quick_query_readall_with_nonfatal_error_ignore(self, resource_group, lo self.assertTrue(len(query_result) > 0) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records_with_nonfatal_error_ignore(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records_with_nonfatal_error_ignore(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -800,12 +790,11 @@ def test_quick_query_iter_records_with_nonfatal_error_ignore(self, resource_grou self.assertEqual(len(data), 32) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_readall_with_json_serialization_setting(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_readall_with_json_serialization_setting(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -837,12 +826,11 @@ def on_error(error): self.assertEqual(query_result, b'{"name":"owner"};{};{"name":"owner"};') self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_iter_records_with_json_serialization_setting(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_iter_records_with_json_serialization_setting(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -874,12 +862,11 @@ def on_error(error): self.assertEqual(listdata, [b'{"name":"owner"}',b'{}',b'{"name":"owner"}', b'']) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_with_only_input_json_serialization_setting(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_with_only_input_json_serialization_setting(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -911,12 +898,11 @@ def on_error(error): self.assertEqual(query_result, b'{"name":"owner"}\n{}\n{"name":"owner"}\n') self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_output_in_arrow_format(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_output_in_arrow_format(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -944,12 +930,11 @@ def on_error(error): self.assertEqual(query_result, expected_result) self._teardown(bsc) - @GlobalStorageAccountPreparer() - def test_quick_query_input_in_arrow_format(self, resource_group, location, storage_account, - storage_account_key): + @BlobPreparer() + def test_quick_query_input_in_arrow_format(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) @@ -969,12 +954,11 @@ def on_error(error): on_error=on_error, blob_format=input_format) - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, location="canadacentral", name_prefix='pytagstorage') - def test_quick_query_input_in_parquet_format(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_input_in_parquet_format(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) expression = "select * from blobstorage where id < 1;" @@ -991,11 +975,11 @@ def test_quick_query_input_in_parquet_format(self, resource_group, location, sto self.assertEqual(real_data, expected_data) - @GlobalStorageAccountPreparer() - def test_quick_query_output_in_parquet_format(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_quick_query_output_in_parquet_format(self, storage_account_name, storage_account_key): # Arrange bsc = BlobServiceClient( - self.account_url(storage_account, "blob"), + self.account_url(storage_account_name, "blob"), credential=storage_account_key) self._setup(bsc) expression = "SELECT * from BlobStorage" diff --git a/sdk/storage/azure-storage-blob/tests/test_retry.py b/sdk/storage/azure-storage-blob/tests/test_retry.py index 7226ee45c00e..6a15b04dd038 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry.py @@ -25,7 +25,7 @@ ExponentialRetry, ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase class RetryRequestTransport(RequestsTransport): @@ -50,11 +50,11 @@ def _create_storage_service(self, service_class, account, key, connection_string return service # --Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_retry_on_server_error(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_retry_on_server_error(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') - service = self._create_storage_service(BlobServiceClient, storage_account, storage_account_key) + service = self._create_storage_service(BlobServiceClient, storage_account_name, storage_account_key) # Force the create call to 'timeout' with a 408 callback = ResponseCallback(status=201, new_status=500).override_status @@ -70,13 +70,13 @@ def test_retry_on_server_error(self, resource_group, location, storage_account, # Assert - @GlobalStorageAccountPreparer() - def test_retry_on_timeout(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_retry_on_timeout(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = ExponentialRetry(initial_backoff=1, increment_base=2) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry) callback = ResponseCallback(status=201, new_status=408).override_status @@ -91,13 +91,13 @@ def test_retry_on_timeout(self, resource_group, location, storage_account, stora # Assert - @GlobalStorageAccountPreparer() - def test_retry_callback_and_retry_context(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_retry_callback_and_retry_context(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = LinearRetry(backoff=1) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry) # Force the create call to 'timeout' with a 408 callback = ResponseCallback(status=201, new_status=408).override_status @@ -119,15 +119,15 @@ def assert_exception_is_present_on_retry_context(**kwargs): service.delete_container(container_name) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_retry_on_socket_timeout(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_retry_on_socket_timeout(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = LinearRetry(backoff=1) retry_transport = RetryRequestTransport(connection_timeout=11, read_timeout=0.000000000001) # make the connect timeout reasonable, but packet timeout truly small, to make sure the request always times out service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, transport=retry_transport) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=retry_transport) assert service._client._client._pipeline._transport.connection_config.timeout == 11 assert service._client._client._pipeline._transport.connection_config.read_timeout == 0.000000000001 @@ -146,12 +146,12 @@ def test_retry_on_socket_timeout(self, resource_group, location, storage_account # we must make the timeout normal again to let the delete operation succeed service.delete_container(container_name, connection_timeout=(11, 11)) - @GlobalStorageAccountPreparer() - def test_no_retry(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_no_retry(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_total=0) + BlobServiceClient, storage_account_name, storage_account_key, retry_total=0) # Force the create call to 'timeout' with a 408 @@ -167,13 +167,13 @@ def test_no_retry(self, resource_group, location, storage_account, storage_accou finally: service.delete_container(container_name) - @GlobalStorageAccountPreparer() - def test_linear_retry(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_linear_retry(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = LinearRetry(backoff=1) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry) # Force the create call to 'timeout' with a 408 callback = ResponseCallback(status=201, new_status=408).override_status @@ -189,13 +189,13 @@ def test_linear_retry(self, resource_group, location, storage_account, storage_a # Assert - @GlobalStorageAccountPreparer() - def test_exponential_retry(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_exponential_retry(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = ExponentialRetry(initial_backoff=1, increment_base=3, retry_total=3) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry) try: container = service.create_container(container_name) @@ -213,8 +213,8 @@ def test_exponential_retry(self, resource_group, location, storage_account, stor # Clean up service.delete_container(container_name) - @GlobalStorageAccountPreparer() - def test_exponential_retry_interval(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_exponential_retry_interval(self, storage_account_name, storage_account_key): # Arrange retry_policy = ExponentialRetry(initial_backoff=1, increment_base=3, random_jitter_range=3) context_stub = {} @@ -248,8 +248,8 @@ def test_exponential_retry_interval(self, resource_group, location, storage_acco # Assert backoff interval is within +/- 3 of 28(1+3^3) self.assertTrue(25 <= backoff <= 31) - @GlobalStorageAccountPreparer() - def test_linear_retry_interval(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_linear_retry_interval(self, storage_account_name, storage_account_key): # Arrange context_stub = {} @@ -275,13 +275,13 @@ def test_linear_retry_interval(self, resource_group, location, storage_account, # Assert backoff interval is within +/- 3 of 15 self.assertTrue(12 <= backoff <= 18) - @GlobalStorageAccountPreparer() - def test_invalid_retry(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_invalid_retry(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = ExponentialRetry(initial_backoff=1, increment_base=2) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry) # Force the create call to fail by pretending it's a teapot callback = ResponseCallback(status=201, new_status=418).override_status @@ -295,13 +295,13 @@ def test_invalid_retry(self, resource_group, location, storage_account, storage_ finally: service.delete_container(container_name) - @GlobalStorageAccountPreparer() - def test_retry_with_deserialization(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_retry_with_deserialization(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('retry') retry = ExponentialRetry(initial_backoff=1, increment_base=2) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry) try: created = service.create_container(container_name) @@ -316,8 +316,8 @@ def test_retry_with_deserialization(self, resource_group, location, storage_acco finally: service.delete_container(container_name) - @GlobalStorageAccountPreparer() - def test_retry_secondary(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_retry_secondary(self, storage_account_name, storage_account_key): """Secondary location test. This test is special, since in practical term, we don't have time to wait @@ -362,7 +362,7 @@ def send(self, request, **kwargs): retry = ExponentialRetry(retry_to_secondary=True, initial_backoff=1, increment_base=2) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=MockTransport() ) @@ -412,13 +412,13 @@ def retry_callback(retry_count=None, location_mode=None, **kwargs): container.get_container_properties(retry_hook=retry_callback) assert retry_callback.called - @GlobalStorageAccountPreparer() - def test_invalid_account_key(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_invalid_account_key(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = ExponentialRetry(initial_backoff=1, increment_base=3, retry_total=3) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry) service.credential.account_name = "dummy_account_name" service.credential.account_key = "dummy_account_key" diff --git a/sdk/storage/azure-storage-blob/tests/test_retry_async.py b/sdk/storage/azure-storage-blob/tests/test_retry_async.py index 3fb0668507bf..d46ecd8eb851 100644 --- a/sdk/storage/azure-storage-blob/tests/test_retry_async.py +++ b/sdk/storage/azure-storage-blob/tests/test_retry_async.py @@ -28,7 +28,7 @@ BlobClient, ) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, RetryCounter, ResponseCallback from devtools_testutils.storage.aio import AsyncStorageTestCase @@ -67,12 +67,12 @@ def _create_storage_service(self, service_class, account, key, connection_string return service # --Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retry_on_server_error_async(self, resource_group, location, storage_account, storage_account_key): + async def test_retry_on_server_error_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') - service = self._create_storage_service(BlobServiceClient, storage_account, storage_account_key, transport=AiohttpTestTransport()) + service = self._create_storage_service(BlobServiceClient, storage_account_name, storage_account_key, transport=AiohttpTestTransport()) # Force the create call to 'timeout' with a 408 callback = ResponseCallback(status=201, new_status=500).override_status @@ -88,14 +88,14 @@ async def test_retry_on_server_error_async(self, resource_group, location, stora # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retry_on_timeout_async(self, resource_group, location, storage_account, storage_account_key): + async def test_retry_on_timeout_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = ExponentialRetry(initial_backoff=1, increment_base=2) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) callback = ResponseCallback(status=201, new_status=408).override_status @@ -110,14 +110,14 @@ async def test_retry_on_timeout_async(self, resource_group, location, storage_ac # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retry_callback_and_retry_context_async(self, resource_group, location, storage_account, storage_account_key): + async def test_retry_callback_and_retry_context_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = LinearRetry(backoff=1) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) # Force the create call to 'timeout' with a 408 callback = ResponseCallback(status=201, new_status=408).override_status @@ -139,16 +139,16 @@ def assert_exception_is_present_on_retry_context(**kwargs): await service.delete_container(container_name) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retry_on_socket_timeout_async(self, resource_group, location, storage_account, storage_account_key): + async def test_retry_on_socket_timeout_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = LinearRetry(backoff=1) retry_transport = AiohttpRetryTestTransport(connection_timeout=11, read_timeout=0.000000000001) # make the connect timeout reasonable, but packet timeout truly small, to make sure the request always times out service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, transport=retry_transport) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=retry_transport) assert service._client._client._pipeline._transport.connection_config.timeout == 11 assert service._client._client._pipeline._transport.connection_config.read_timeout == 0.000000000001 @@ -175,13 +175,13 @@ async def test_retry_on_socket_timeout_async(self, resource_group, location, sto except: pass - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_no_retry_async(self, resource_group, location, storage_account, storage_account_key): + async def test_no_retry_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_total=0, transport=AiohttpTestTransport()) + BlobServiceClient, storage_account_name, storage_account_key, retry_total=0, transport=AiohttpTestTransport()) # Force the create call to 'timeout' with a 408 @@ -197,14 +197,14 @@ async def test_no_retry_async(self, resource_group, location, storage_account, s finally: await service.delete_container(container_name) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_linear_retry_async(self, resource_group, location, storage_account, storage_account_key): + async def test_linear_retry_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = LinearRetry(backoff=1) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) # Force the create call to 'timeout' with a 408 callback = ResponseCallback(status=201, new_status=408).override_status @@ -220,14 +220,14 @@ async def test_linear_retry_async(self, resource_group, location, storage_accoun # Assert - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_exponential_retry_async(self, resource_group, location, storage_account, storage_account_key): + async def test_exponential_retry_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = ExponentialRetry(initial_backoff=1, increment_base=3, retry_total=3) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) try: container = await service.create_container(container_name) @@ -245,8 +245,8 @@ async def test_exponential_retry_async(self, resource_group, location, storage_a # Clean up await service.delete_container(container_name) - @GlobalStorageAccountPreparer() - def test_exponential_retry_interval_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_exponential_retry_interval_async(self, storage_account_name, storage_account_key): # Arrange retry_policy = ExponentialRetry(initial_backoff=1, increment_base=3, random_jitter_range=3) context_stub = {} @@ -280,8 +280,8 @@ def test_exponential_retry_interval_async(self, resource_group, location, storag # Assert backoff interval is within +/- 3 of 28(1+3^3) self.assertTrue(25 <= backoff <= 31) - @GlobalStorageAccountPreparer() - def test_linear_retry_interval_async(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_linear_retry_interval_async(self, storage_account_name, storage_account_key): # Arrange context_stub = {} @@ -307,14 +307,14 @@ def test_linear_retry_interval_async(self, resource_group, location, storage_acc # Assert backoff interval is within +/- 3 of 15 self.assertTrue(12 <= backoff <= 18) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_invalid_retry_async(self, resource_group, location, storage_account, storage_account_key): + async def test_invalid_retry_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = ExponentialRetry(initial_backoff=1, increment_base=2) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) # Force the create call to fail by pretending it's a teapot callback = ResponseCallback(status=201, new_status=418).override_status @@ -328,14 +328,14 @@ async def test_invalid_retry_async(self, resource_group, location, storage_accou finally: await service.delete_container(container_name) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retry_with_deserialization_async(self, resource_group, location, storage_account, storage_account_key): + async def test_retry_with_deserialization_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('retry') retry = ExponentialRetry(initial_backoff=1, increment_base=2) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) try: created = await service.create_container(container_name) @@ -352,9 +352,9 @@ async def test_retry_with_deserialization_async(self, resource_group, location, finally: await service.delete_container(container_name) - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retry_secondary_async(self, resource_group, location, storage_account, storage_account_key): + async def test_retry_secondary_async(self, storage_account_name, storage_account_key): """Secondary location test. This test is special, since in practical term, we don't have time to wait @@ -399,7 +399,7 @@ async def send(self, request, **kwargs): retry = ExponentialRetry(retry_to_secondary=True, initial_backoff=1, increment_base=2) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=MockTransport()) # Act @@ -448,14 +448,14 @@ def retry_callback(retry_count=None, location_mode=None, **kwargs): await container.get_container_properties(retry_hook=retry_callback) assert retry_callback.called - @GlobalStorageAccountPreparer() + @BlobPreparer() @AsyncStorageTestCase.await_prepared_test - async def test_invalid_account_key_async(self, resource_group, location, storage_account, storage_account_key): + async def test_invalid_account_key_async(self, storage_account_name, storage_account_key): # Arrange container_name = self.get_resource_name('utcontainer') retry = ExponentialRetry(initial_backoff=1, increment_base=3, retry_total=3) service = self._create_storage_service( - BlobServiceClient, storage_account, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) + BlobServiceClient, storage_account_name, storage_account_key, retry_policy=retry, transport=AiohttpTestTransport()) service.credential.account_name = "dummy_account_name" service.credential.account_key = "dummy_account_key" diff --git a/sdk/storage/azure-storage-blob/tests/test_upload_chunking.py b/sdk/storage/azure-storage-blob/tests/test_upload_chunking.py index f179cce27e76..ab14d59c0b46 100644 --- a/sdk/storage/azure-storage-blob/tests/test_upload_chunking.py +++ b/sdk/storage/azure-storage-blob/tests/test_upload_chunking.py @@ -14,7 +14,7 @@ from threading import Lock from io import (BytesIO, SEEK_SET) -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import BlobPreparer from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -23,8 +23,8 @@ class StorageBlobUploadChunkingTest(StorageTestCase): # this is a white box test that's designed to make sure _Substream behaves properly # when the buffer needs to be swapped out at least once - @GlobalStorageAccountPreparer() - def test_sub_stream_with_length_larger_than_buffer(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_sub_stream_with_length_larger_than_buffer(self, storage_account_name, storage_account_key): data = os.urandom(12 * 1024 * 1024) # assuming the max size of the buffer is 4MB, this test needs to be updated if that has changed @@ -76,8 +76,8 @@ def test_sub_stream_with_length_larger_than_buffer(self, resource_group, locatio # this is a white box test that's designed to make sure _Substream behaves properly # when block size is smaller than 4MB, thus there's no need for buffer swap - @GlobalStorageAccountPreparer() - def test_sub_stream_with_length_equal_to_buffer(self, resource_group, location, storage_account, storage_account_key): + @BlobPreparer() + def test_sub_stream_with_length_equal_to_buffer(self, storage_account_name, storage_account_key): data = os.urandom(6 * 1024 * 1024) # assuming the max size of the buffer is 4MB, this test needs to be updated if that has changed diff --git a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md index 7dee9165ed9f..f27bd5de0214 100644 --- a/sdk/storage/azure-storage-file-datalake/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-datalake/CHANGELOG.md @@ -1,5 +1,25 @@ # Release History +## 12.6.0b2 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 12.6.0b1 (2021-11-08) +**New features** +- Added support for batch deleting files using the `delete_files()` method from a `FileSystemClient` +- Account level SAS tokens now support two new permissions: + - `permanent_delete` + - `set_immutability_policy` +**Fixes** +- `FileSystemProperties` was not subscriptable. Now it is both subscriptable and attributes can also be accessed directly (#20772) +- Datalake Client Typing annotation issues have been resolved (#19906) + ## 12.5.0 (2021-09-15) **Stable release of preview features** - Added support for service version 2020-10-02 (STG78) diff --git a/sdk/storage/azure-storage-file-datalake/README.md b/sdk/storage/azure-storage-file-datalake/README.md index 7e8ead8ad8b4..f9a95d9ebb8f 100644 --- a/sdk/storage/azure-storage-file-datalake/README.md +++ b/sdk/storage/azure-storage-file-datalake/README.md @@ -159,6 +159,44 @@ for path in paths: print(path.name + '\n') ``` +## Optional Configuration + +Optional keyword arguments that can be passed in at the client and per-operation level. + +### Retry Policy configuration + +Use the following keyword arguments when instantiating a client to configure the retry policy: + +* __retry_total__ (int): Total number of retries to allow. Takes precedence over other counts. +Pass in `retry_total=0` if you do not want to retry on requests. Defaults to 10. +* __retry_connect__ (int): How many connection-related errors to retry on. Defaults to 3. +* __retry_read__ (int): How many times to retry on read errors. Defaults to 3. +* __retry_status__ (int): How many times to retry on bad status codes. Defaults to 3. +* __retry_to_secondary__ (bool): Whether the request should be retried to secondary, if able. +This should only be enabled of RA-GRS accounts are used and potentially stale data can be handled. +Defaults to `False`. + +### Other client / per-operation configuration + +Other optional configuration keyword arguments that can be specified on the client or per-operation. + +**Client keyword arguments:** + +* __connection_timeout__ (int): Optionally sets the connect and read timeout value, in seconds. +* __transport__ (Any): User-provided transport to send the HTTP request. + +**Per-operation keyword arguments:** + +* __raw_response_hook__ (callable): The given callback uses the response returned from the service. +* __raw_request_hook__ (callable): The given callback uses the request before being sent to service. +* __client_request_id__ (str): Optional user specified identification of the request. +* __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request. +* __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at +the client level to enable it for all requests. +* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at +the client level to enable it for all requests. +* __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}` + ## Troubleshooting ### General DataLake Storage clients raise exceptions defined in [Azure Core](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/README.md). diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py index 042fa0551590..49aac0887889 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_directory_client.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from typing import Any +from typing import Any, TypeVar try: from urllib.parse import quote, unquote @@ -16,6 +16,8 @@ from ._models import DirectoryProperties, FileProperties from ._path_client import PathClient +ClassType = TypeVar("ClassType") + class DataLakeDirectoryClient(PathClient): """A client to interact with the DataLake directory, even if the directory may not yet exist. @@ -67,12 +69,13 @@ def __init__( @classmethod def from_connection_string( - cls, conn_str, # type: str + cls, # type: Type[ClassType] + conn_str, # type: str file_system_name, # type: str directory_name, # type: str credential=None, # type: Optional[Any] **kwargs # type: Any - ): # type: (...) -> DataLakeDirectoryClient + ): # type: (...) -> ClassType """ Create DataLakeDirectoryClient from a Connection String. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py index fe074b3a49db..a06c1348908b 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_file_client.py @@ -4,7 +4,7 @@ # license information. # -------------------------------------------------------------------------- from io import BytesIO -from typing import Any +from typing import Any, TypeVar try: from urllib.parse import quote, unquote @@ -27,6 +27,8 @@ from ._deserialize import process_storage_error, deserialize_file_properties from ._models import FileProperties, DataLakeFileQueryError +ClassType = TypeVar("ClassType") + class DataLakeFileClient(PathClient): """A client to interact with the DataLake file, even if the file may not yet exist. @@ -76,12 +78,13 @@ def __init__( @classmethod def from_connection_string( - cls, conn_str, # type: str + cls, # type: Type[ClassType] + conn_str, # type: str file_system_name, # type: str file_path, # type: str credential=None, # type: Optional[Any] **kwargs # type: Any - ): # type: (...) -> DataLakeFileClient + ): # type: (...) -> ClassType """ Create DataLakeFileClient from a Connection String. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_service_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_service_client.py index 776b98cda9d6..dfd5ca5b6e5d 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_service_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_data_lake_service_client.py @@ -3,7 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from typing import Optional, Dict, Any +from typing import Optional, Dict, Any, TypeVar try: from urllib.parse import urlparse @@ -23,6 +23,8 @@ from ._serialize import convert_dfs_url_to_blob_url, get_api_version from ._generated import AzureDataLakeStorageRESTAPI +ClassType = TypeVar("ClassType") + class DataLakeServiceClient(StorageAccountHostsMixin): """A client to interact with the DataLake Service at the account level. @@ -120,10 +122,11 @@ def _format_url(self, hostname): @classmethod def from_connection_string( - cls, conn_str, # type: str + cls, # type: Type[ClassType] + conn_str, # type: str credential=None, # type: Optional[Any] **kwargs # type: Any - ): # type: (...) -> DataLakeServiceClient + ): # type: (...) -> ClassType """ Create DataLakeServiceClient from a Connection String. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py index a323995cebce..0a7c688528fc 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_deserialize.py @@ -49,6 +49,10 @@ def deserialize_path_properties(path_list): return [PathProperties._from_generated(path) for path in path_list] # pylint: disable=protected-access +def return_headers_and_deserialized_path_list(response, deserialized, response_headers): # pylint: disable=unused-argument + return deserialized.paths if deserialized.paths else {}, normalize_headers(response_headers) + + def get_deleted_path_properties_from_generated_code(generated): deleted_path = DeletedPathProperties() deleted_path.name = generated.name diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py index 148943c12cda..96c89ced28ae 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_file_system_client.py @@ -4,8 +4,7 @@ # license information. # -------------------------------------------------------------------------- import functools -from typing import Optional, Any, Union - +from typing import Optional, Any, Union, TypeVar, Iterator try: from urllib.parse import urlparse, quote, unquote @@ -14,13 +13,14 @@ from urllib2 import quote, unquote # type: ignore import six +from azure.core.pipeline.transport import HttpResponse from azure.core.pipeline import Pipeline from azure.core.exceptions import HttpResponseError from azure.core.paging import ItemPaged from azure.storage.blob import ContainerClient from ._shared.base_client import TransportWrapper, StorageAccountHostsMixin, parse_query, parse_connection_str from ._serialize import convert_dfs_url_to_blob_url, get_api_version -from ._list_paths_helper import DeletedPathPropertiesPaged +from ._list_paths_helper import DeletedPathPropertiesPaged, PathPropertiesPaged from ._models import LocationMode, FileSystemProperties, PublicAccess, DeletedPathProperties, FileProperties, \ DirectoryProperties from ._data_lake_file_client import DataLakeFileClient @@ -28,7 +28,10 @@ from ._data_lake_lease import DataLakeLeaseClient from ._generated import AzureDataLakeStorageRESTAPI from ._generated.models import ListBlobsIncludeItem -from ._deserialize import deserialize_path_properties, process_storage_error, is_file_path +from ._deserialize import process_storage_error, is_file_path + + +ClassType = TypeVar("ClassType") class FileSystemClient(StorageAccountHostsMixin): @@ -136,11 +139,12 @@ def close(self): @classmethod def from_connection_string( - cls, conn_str, # type: str + cls, # type: Type[ClassType] + conn_str, # type: str file_system_name, # type: str credential=None, # type: Optional[Any] **kwargs # type: Any - ): # type: (...) -> FileSystemClient + ): # type: (...) -> ClassType """ Create FileSystemClient from a Connection String. @@ -512,13 +516,14 @@ def get_paths(self, path=None, # type: Optional[str] :caption: List the paths in the file system. """ timeout = kwargs.pop('timeout', None) - return self._client.file_system.list_paths( - recursive=recursive, - max_results=max_results, + command = functools.partial( + self._client.file_system.list_paths, path=path, timeout=timeout, - cls=deserialize_path_properties, **kwargs) + return ItemPaged( + command, recursive, path=path, max_results=max_results, + page_iterator_class=PathPropertiesPaged, **kwargs) def create_directory(self, directory, # type: Union[DirectoryProperties, str] metadata=None, # type: Optional[Dict[str, str]] @@ -809,6 +814,71 @@ def _get_root_directory_client(self): """ return self.get_directory_client('/') + def delete_files(self, *files, **kwargs): + # type: (...) -> Iterator[HttpResponse] + """Marks the specified files or empty directories for deletion. + + The files/empty directories are later deleted during garbage collection. + + If a delete retention policy is enabled for the service, then this operation soft deletes the + files/empty directories and retains the files or snapshots for specified number of days. + After specified number of days, files' data is removed from the service during garbage collection. + Soft deleted files/empty directories are accessible through :func:`list_deleted_paths()`. + + :param files: + The files/empty directories to delete. This can be a single file/empty directory, or multiple values can + be supplied, where each value is either the name of the file/directory (str) or + FileProperties/DirectoryProperties. + + .. note:: + When the file/dir type is dict, here's a list of keys, value rules. + + blob name: + key: 'name', value type: str + if the file modified or not: + key: 'if_modified_since', 'if_unmodified_since', value type: datetime + etag: + key: 'etag', value type: str + match the etag or not: + key: 'match_condition', value type: MatchConditions + lease: + key: 'lease_id', value type: Union[str, LeaseClient] + timeout for subrequest: + key: 'timeout', value type: int + + :type files: list[str], list[dict], + or list[Union[~azure.storage.filedatalake.FileProperties, ~azure.storage.filedatalake.DirectoryProperties] + :keyword ~datetime.datetime if_modified_since: + A DateTime value. Azure expects the date value passed in to be UTC. + If timezone is included, any non-UTC datetimes will be converted to UTC. + If a date is passed in without timezone info, it is assumed to be UTC. + Specify this header to perform the operation only + if the resource has been modified since the specified time. + :keyword ~datetime.datetime if_unmodified_since: + A DateTime value. Azure expects the date value passed in to be UTC. + If timezone is included, any non-UTC datetimes will be converted to UTC. + If a date is passed in without timezone info, it is assumed to be UTC. + Specify this header to perform the operation only if + the resource has not been modified since the specified date/time. + :keyword bool raise_on_any_failure: + This is a boolean param which defaults to True. When this is set, an exception + is raised even if there is a single operation failure. + :keyword int timeout: + The timeout parameter is expressed in seconds. + :return: An iterator of responses, one for each blob in order + :rtype: Iterator[~azure.core.pipeline.transport.HttpResponse] + + .. admonition:: Example: + + .. literalinclude:: ../samples/datalake_samples_file_system_async.py + :start-after: [START batch_delete_files_or_empty_directories] + :end-before: [END batch_delete_files_or_empty_directories] + :language: python + :dedent: 4 + :caption: Deleting multiple files or empty directories. + """ + return self._container_client.delete_blobs(*files, **kwargs) + def get_directory_client(self, directory # type: Union[DirectoryProperties, str] ): # type: (...) -> DataLakeDirectoryClient diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_azure_data_lake_storage_restapi.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_azure_data_lake_storage_restapi.py index fbd0a7916e69..33e26f2ed8c8 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_azure_data_lake_storage_restapi.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_azure_data_lake_storage_restapi.py @@ -33,7 +33,7 @@ class AzureDataLakeStorageRESTAPI(object): :vartype file_system: azure.storage.filedatalake.operations.FileSystemOperations :ivar path: PathOperations operations :vartype path: azure.storage.filedatalake.operations.PathOperations - :param url: The URL of the service account, container, or blob that is the targe of the desired operation. + :param url: The URL of the service account, container, or blob that is the target of the desired operation. :type url: str """ diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_configuration.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_configuration.py index 3bfff366da7c..a930c8221140 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_configuration.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/_configuration.py @@ -23,7 +23,7 @@ class AzureDataLakeStorageRESTAPIConfiguration(Configuration): Note that all parameters used to create this instance are saved as instance attributes. - :param url: The URL of the service account, container, or blob that is the targe of the desired operation. + :param url: The URL of the service account, container, or blob that is the target of the desired operation. :type url: str """ diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_azure_data_lake_storage_restapi.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_azure_data_lake_storage_restapi.py index efeeeb3b5361..438366ec7b4e 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_azure_data_lake_storage_restapi.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_azure_data_lake_storage_restapi.py @@ -28,7 +28,7 @@ class AzureDataLakeStorageRESTAPI(object): :vartype file_system: azure.storage.filedatalake.aio.operations.FileSystemOperations :ivar path: PathOperations operations :vartype path: azure.storage.filedatalake.aio.operations.PathOperations - :param url: The URL of the service account, container, or blob that is the targe of the desired operation. + :param url: The URL of the service account, container, or blob that is the target of the desired operation. :type url: str """ diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_configuration.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_configuration.py index 82234727a630..065d86335a5f 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_configuration.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/_configuration.py @@ -19,7 +19,7 @@ class AzureDataLakeStorageRESTAPIConfiguration(Configuration): Note that all parameters used to create this instance are saved as instance attributes. - :param url: The URL of the service account, container, or blob that is the targe of the desired operation. + :param url: The URL of the service account, container, or blob that is the target of the desired operation. :type url: str """ diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_file_system_operations.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_file_system_operations.py index d4e206a6d054..17fe0a062f8e 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_file_system_operations.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_file_system_operations.py @@ -6,10 +6,9 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- import datetime -from typing import Any, AsyncIterable, Callable, Dict, Generic, List, Optional, TypeVar, Union +from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union import warnings -from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest @@ -46,7 +45,7 @@ async def create( request_id_parameter: Optional[str] = None, timeout: Optional[int] = None, properties: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: """Create FileSystem. @@ -57,8 +56,9 @@ async def create( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param properties: Optional. User-defined properties to be stored with the filesystem, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value @@ -130,21 +130,21 @@ async def set_properties( timeout: Optional[int] = None, properties: Optional[str] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> None: """Set FileSystem Properties. Set properties for the FileSystem. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param properties: Optional. User-defined properties to be stored with the filesystem, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value @@ -225,7 +225,7 @@ async def get_properties( self, request_id_parameter: Optional[str] = None, timeout: Optional[int] = None, - **kwargs + **kwargs: Any ) -> None: """Get FileSystem Properties. @@ -235,8 +235,9 @@ async def get_properties( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -298,7 +299,7 @@ async def delete( request_id_parameter: Optional[str] = None, timeout: Optional[int] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> None: """Delete FileSystem. @@ -310,15 +311,15 @@ async def delete( directories within the filesystem, will fail with status code 404 (Not Found) while the filesystem is being deleted. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param modified_access_conditions: Parameter group. :type modified_access_conditions: ~azure.storage.filedatalake.models.ModifiedAccessConditions @@ -383,7 +384,7 @@ async def delete( delete.metadata = {'url': '/{filesystem}'} # type: ignore - def list_paths( + async def list_paths( self, recursive: bool, request_id_parameter: Optional[str] = None, @@ -392,8 +393,8 @@ def list_paths( path: Optional[str] = None, max_results: Optional[int] = None, upn: Optional[bool] = None, - **kwargs - ) -> AsyncIterable["_models.PathList"]: + **kwargs: Any + ) -> "_models.PathList": """List Paths. List FileSystem paths and their properties. @@ -404,8 +405,9 @@ def list_paths( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param continuation: Optional. When deleting a directory, the number of paths that are deleted with each invocation is limited. If the number of paths to be deleted exceeds this limit, a @@ -427,8 +429,8 @@ def list_paths( unique friendly names. :type upn: bool :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PathList or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.storage.filedatalake.models.PathList] + :return: PathList, or the result of cls(response) + :rtype: ~azure.storage.filedatalake.models.PathList :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PathList"] @@ -438,82 +440,57 @@ def list_paths( error_map.update(kwargs.pop('error_map', {})) accept = "application/json" - # TODO: change this once continuation/next_link autorest PR is merged - def prepare_request(next_link=None, cont_token=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", - request_id_parameter, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, - 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_paths.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['resource'] = self._serialize.query("self._config.resource", self._config.resource, - 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - # TODO: change this once continuation/next_link autorest PR is merged - if cont_token is not None: - query_parameters['continuation'] = self._serialize.query("continuation", cont_token, 'str') - if path is not None: - query_parameters['directory'] = self._serialize.query("path", path, 'str') - query_parameters['recursive'] = self._serialize.query("recursive", recursive, 'bool') - if max_results is not None: - query_parameters['maxResults'] = self._serialize.query("max_results", max_results, 'int', minimum=1) - if upn is not None: - query_parameters['upn'] = self._serialize.query("upn", upn, 'bool') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - return request - - async def extract_data(pipeline_response): - # TODO: change this once continuation/next_link autorest PR is merged - try: - cont_token = pipeline_response.http_response.headers['x-ms-continuation'] - except KeyError: - cont_token = None - deserialized = self._deserialize('PathList', pipeline_response) - list_of_elem = deserialized.paths - if cls: - list_of_elem = cls(list_of_elem) - return cont_token, AsyncList(list_of_elem) - - # TODO: change this once continuation/next_link autorest PR is merged - async def get_next(cont_token=None): - cont_token = cont_token if not continuation else continuation - request = prepare_request(cont_token=cont_token) - - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.StorageError, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return AsyncItemPaged( - get_next, extract_data - ) + # Construct URL + url = self.list_paths.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['resource'] = self._serialize.query("self._config.resource", self._config.resource, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + if continuation is not None: + query_parameters['continuation'] = self._serialize.query("continuation", continuation, 'str') + if path is not None: + query_parameters['directory'] = self._serialize.query("path", path, 'str') + query_parameters['recursive'] = self._serialize.query("recursive", recursive, 'bool') + if max_results is not None: + query_parameters['maxResults'] = self._serialize.query("max_results", max_results, 'int', minimum=1) + if upn is not None: + query_parameters['upn'] = self._serialize.query("upn", upn, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.StorageError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) + deserialized = self._deserialize('PathList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized list_paths.metadata = {'url': '/{filesystem}'} # type: ignore async def list_blob_hierarchy_segment( @@ -526,7 +503,7 @@ async def list_blob_hierarchy_segment( showonly: Optional[str] = "deleted", timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ListBlobsHierarchySegmentResponse": """The List Blobs operation returns a list of the blobs under the specified container. @@ -554,8 +531,9 @@ async def list_blob_hierarchy_segment( response. :type showonly: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_path_operations.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_path_operations.py index 7cec5890e122..3391320b3cbe 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_path_operations.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_path_operations.py @@ -56,23 +56,24 @@ async def create( lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, source_modified_access_conditions: Optional["_models.SourceModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> None: """Create File | Create Directory | Rename File | Rename Directory. Create or rename a file or directory. By default, the destination is overwritten and if the destination already exists and has a lease the lease is broken. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers for Blob - Service Operations `_. To fail if the destination already exists, - use a conditional request with If-None-Match: "*". + Service Operations + `_. + To fail if the destination already exists, use a conditional request with If-None-Match: "*". :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param resource: Required only for Create File and Create Directory. The value must be "file" or "directory". @@ -278,7 +279,7 @@ async def update( path_http_headers: Optional["_models.PathHTTPHeaders"] = None, lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.SetAccessControlRecursiveResponse"]: """Append Data | Flush Data | Set Properties | Set Access Control. @@ -286,8 +287,8 @@ async def update( sets properties for a file or directory, or sets access control for a file or directory. Data can only be appended to a file. Concurrent writes to the same file using multiple clients are not supported. This operation supports conditional HTTP requests. For more information, see - `Specifying Conditional Headers for Blob Service Operations `_. + `Specifying Conditional Headers for Blob Service Operations + `_. :param action: The action must be "append" to upload data to be appended to a file, "flush" to flush previously uploaded data to a file, "setProperties" to set the properties of a file or @@ -309,8 +310,9 @@ async def update( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param max_records: Optional. Valid for "SetAccessControlRecursive" operation. It specifies the maximum number of files or directories on which the acl change will be applied. If omitted or @@ -319,8 +321,8 @@ async def update( :param continuation: Optional. The number of paths processed with each invocation is limited. If the number of paths to be processed exceeds this limit, a continuation token is returned in the response header x-ms-continuation. When a continuation token is returned in the response, - it must be percent-encoded and specified in a subsequent invocation of setAcessControlRecursive - operation. + it must be percent-encoded and specified in a subsequent invocation of + setAccessControlRecursive operation. :type continuation: str :param force_flag: Optional. Valid for "SetAccessControlRecursive" operation. If set to false, the operation will terminate quickly on encountering user errors (4XX). If true, the operation @@ -373,9 +375,9 @@ async def update( Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. :type permissions: str - :param acl: Sets POSIX access control rights on files and directories. The value is a comma- - separated list of access control entries. Each access control entry (ACE) consists of a scope, - a type, a user or group identifier, and permissions in the format + :param acl: Sets POSIX access control rights on files and directories. The value is a + comma-separated list of access control entries. Each access control entry (ACE) consists of a + scope, a type, a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". :type acl: str :param path_http_headers: Parameter group. @@ -545,14 +547,14 @@ async def lease( proposed_lease_id: Optional[str] = None, lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> None: """Lease Path. Create and manage a lease to restrict write and delete access to the path. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers - for Blob Service Operations `_. + for Blob Service Operations + `_. :param x_ms_lease_action: There are five lease actions: "acquire", "break", "change", "renew", and "release". Use "acquire" and specify the "x-ms-proposed-lease-id" and "x-ms-lease-duration" @@ -568,8 +570,9 @@ async def lease( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param x_ms_lease_duration: The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or @@ -694,21 +697,22 @@ async def read( x_ms_range_get_content_md5: Optional[bool] = None, lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> IO: """Read File. Read the contents of a file. For read operations, range requests are supported. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers - for Blob Service Operations `_. + for Blob Service Operations + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param range: The HTTP Range request header specifies one or more byte ranges of the resource to be retrieved. @@ -850,22 +854,23 @@ async def get_properties( upn: Optional[bool] = None, lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> None: """Get Properties | Get Status | Get Access Control List. Get Properties returns all system and user defined properties for a path. Get Status returns all system defined properties for a path. Get Access Control List returns the access control list for a path. This operation supports conditional HTTP requests. For more information, see - `Specifying Conditional Headers for Blob Service Operations `_. + `Specifying Conditional Headers for Blob Service Operations + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param action: Optional. If the value is "getStatus" only the system defined properties for the path are returned. If the value is "getAccessControl" the access control list is returned in @@ -988,21 +993,21 @@ async def delete( continuation: Optional[str] = None, lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> None: """Delete File | Delete Directory. Delete the file or directory. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param recursive: Required. :type recursive: bool @@ -1105,13 +1110,14 @@ async def set_access_control( request_id_parameter: Optional[str] = None, lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> None: """Set the owner, group, permissions, or access control list for a path. :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param owner: Optional. The owner of the blob or directory. :type owner: str @@ -1122,9 +1128,9 @@ async def set_access_control( Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. :type permissions: str - :param acl: Sets POSIX access control rights on files and directories. The value is a comma- - separated list of access control entries. Each access control entry (ACE) consists of a scope, - a type, a user or group identifier, and permissions in the format + :param acl: Sets POSIX access control rights on files and directories. The value is a + comma-separated list of access control entries. Each access control entry (ACE) consists of a + scope, a type, a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". :type acl: str :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character @@ -1229,9 +1235,9 @@ async def set_access_control_recursive( max_records: Optional[int] = None, acl: Optional[str] = None, request_id_parameter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.SetAccessControlRecursiveResponse": - """Set the access control list for a path and subpaths. + """Set the access control list for a path and sub-paths. :param mode: Mode "set" sets POSIX access control rights on files and directories, "modify" modifies one or more POSIX access control rights that pre-exist on files and directories, @@ -1239,8 +1245,9 @@ async def set_access_control_recursive( and directories. :type mode: str or ~azure.storage.filedatalake.models.PathSetAccessControlRecursiveMode :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param continuation: Optional. When deleting a directory, the number of paths that are deleted with each invocation is limited. If the number of paths to be deleted exceeds this limit, a @@ -1258,9 +1265,9 @@ async def set_access_control_recursive( the acl change will be applied. If omitted or greater than 2,000, the request will process up to 2,000 items. :type max_records: int - :param acl: Sets POSIX access control rights on files and directories. The value is a comma- - separated list of access control entries. Each access control entry (ACE) consists of a scope, - a type, a user or group identifier, and permissions in the format + :param acl: Sets POSIX access control rights on files and directories. The value is a + comma-separated list of access control entries. Each access control entry (ACE) consists of a + scope, a type, a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". :type acl: str :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character @@ -1342,13 +1349,14 @@ async def flush_data( path_http_headers: Optional["_models.PathHTTPHeaders"] = None, lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, modified_access_conditions: Optional["_models.ModifiedAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> None: """Set the owner, group, permissions, or access control list for a path. :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param position: This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. It is required when uploading data to be appended @@ -1509,7 +1517,7 @@ async def append_data( request_id_parameter: Optional[str] = None, path_http_headers: Optional["_models.PathHTTPHeaders"] = None, lease_access_conditions: Optional["_models.LeaseAccessConditions"] = None, - **kwargs + **kwargs: Any ) -> None: """Append data to the file. @@ -1524,8 +1532,9 @@ async def append_data( written, and there must not be a request entity body included with the request. :type position: long :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param content_length: Required for "Append Data" and "Flush Data". Must be 0 for "Flush Data". Must be the length of the request content in bytes for "Append Data". @@ -1624,15 +1633,16 @@ async def set_expiry( timeout: Optional[int] = None, request_id_parameter: Optional[str] = None, expires_on: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: """Sets the time a blob will expire and be deleted. :param expiry_options: Required. Indicates mode of the expiry time. :type expiry_options: str or ~azure.storage.filedatalake.models.PathExpiryOptions :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. @@ -1702,13 +1712,14 @@ async def undelete( timeout: Optional[int] = None, undelete_source: Optional[str] = None, request_id_parameter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> None: """Undelete a path that was previously soft deleted. :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param undelete_source: Only for hierarchical namespace enabled accounts. Optional. The path of the soft deleted blob to undelete. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_service_operations.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_service_operations.py index f8ae878a37c3..4572042d12a6 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_service_operations.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/aio/operations/_service_operations.py @@ -47,7 +47,7 @@ def list_file_systems( max_results: Optional[int] = None, request_id_parameter: Optional[str] = None, timeout: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.FileSystemList"]: """List FileSystems. @@ -68,8 +68,9 @@ def list_file_systems( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FileSystemList or the result of cls(response) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_file_system_operations.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_file_system_operations.py index 991890ac4e2b..8f1c7fb37a15 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_file_system_operations.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_file_system_operations.py @@ -10,7 +10,6 @@ import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -18,7 +17,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -62,8 +61,9 @@ def create( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param properties: Optional. User-defined properties to be stored with the filesystem, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value @@ -142,15 +142,15 @@ def set_properties( Set properties for the FileSystem. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param properties: Optional. User-defined properties to be stored with the filesystem, in the format of a comma-separated list of name and value pairs "n1=v1, n2=v2, ...", where each value @@ -242,8 +242,9 @@ def get_properties( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -318,15 +319,15 @@ def delete( directories within the filesystem, will fail with status code 404 (Not Found) while the filesystem is being deleted. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param modified_access_conditions: Parameter group. :type modified_access_conditions: ~azure.storage.filedatalake.models.ModifiedAccessConditions @@ -402,7 +403,7 @@ def list_paths( upn=None, # type: Optional[bool] **kwargs # type: Any ): - # type: (...) -> Iterable["_models.PathList"] + # type: (...) -> "_models.PathList" """List Paths. List FileSystem paths and their properties. @@ -413,8 +414,9 @@ def list_paths( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param continuation: Optional. When deleting a directory, the number of paths that are deleted with each invocation is limited. If the number of paths to be deleted exceeds this limit, a @@ -436,8 +438,8 @@ def list_paths( unique friendly names. :type upn: bool :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either PathList or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.storage.filedatalake.models.PathList] + :return: PathList, or the result of cls(response) + :rtype: ~azure.storage.filedatalake.models.PathList :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PathList"] @@ -447,84 +449,57 @@ def list_paths( error_map.update(kwargs.pop('error_map', {})) accept = "application/json" - # TODO: change this once continuation/next_link autorest PR is merged - def prepare_request(next_link=None, cont_token=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - if request_id_parameter is not None: - header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", - request_id_parameter, 'str') - header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, - 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - if not next_link: - # Construct URL - url = self.list_paths.metadata['url'] # type: ignore - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['resource'] = self._serialize.query("self._config.resource", self._config.resource, - 'str') - if timeout is not None: - query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) - # TODO: change this once continuation/next_link autorest PR is merged - if cont_token is not None: - query_parameters['continuation'] = self._serialize.query("continuation", cont_token, 'str') - if path is not None: - query_parameters['directory'] = self._serialize.query("path", path, 'str') - query_parameters['recursive'] = self._serialize.query("recursive", recursive, 'bool') - if max_results is not None: - query_parameters['maxResults'] = self._serialize.query("max_results", max_results, 'int', minimum=1) - if upn is not None: - query_parameters['upn'] = self._serialize.query("upn", upn, 'bool') - - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - path_format_arguments = { - 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - request = self._client.get(url, query_parameters, header_parameters) - return request - - def extract_data(pipeline_response): - # TODO: change this once continuation/next_link autorest PR is merged - try: - cont_token = pipeline_response.http_response.headers['x-ms-continuation'] - except KeyError: - cont_token = None - deserialized = self._deserialize('PathList', pipeline_response) - list_of_elem = deserialized.paths - if cls: - list_of_elem = cls(list_of_elem) - # TODO: change this once continuation/next_link autorest PR is merged - return cont_token, iter(list_of_elem) - - # TODO: change this once continuation/next_link autorest PR is merged - def get_next(cont_token=None): - cont_token = cont_token if not continuation else continuation - request = prepare_request(cont_token=cont_token) - - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - error = self._deserialize.failsafe_deserialize(_models.StorageError, response) - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, model=error) - - return pipeline_response - - return ItemPaged( - get_next, extract_data - ) + # Construct URL + url = self.list_paths.metadata['url'] # type: ignore + path_format_arguments = { + 'url': self._serialize.url("self._config.url", self._config.url, 'str', skip_quote=True), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['resource'] = self._serialize.query("self._config.resource", self._config.resource, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'int', minimum=0) + if continuation is not None: + query_parameters['continuation'] = self._serialize.query("continuation", continuation, 'str') + if path is not None: + query_parameters['directory'] = self._serialize.query("path", path, 'str') + query_parameters['recursive'] = self._serialize.query("recursive", recursive, 'bool') + if max_results is not None: + query_parameters['maxResults'] = self._serialize.query("max_results", max_results, 'int', minimum=1) + if upn is not None: + query_parameters['upn'] = self._serialize.query("upn", upn, 'bool') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + if request_id_parameter is not None: + header_parameters['x-ms-client-request-id'] = self._serialize.header("request_id_parameter", request_id_parameter, 'str') + header_parameters['x-ms-version'] = self._serialize.header("self._config.version", self._config.version, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.StorageError, response) + raise HttpResponseError(response=response, model=error) + + response_headers = {} + response_headers['Date']=self._deserialize('rfc-1123', response.headers.get('Date')) + response_headers['ETag']=self._deserialize('str', response.headers.get('ETag')) + response_headers['Last-Modified']=self._deserialize('rfc-1123', response.headers.get('Last-Modified')) + response_headers['x-ms-request-id']=self._deserialize('str', response.headers.get('x-ms-request-id')) + response_headers['x-ms-version']=self._deserialize('str', response.headers.get('x-ms-version')) + response_headers['x-ms-continuation']=self._deserialize('str', response.headers.get('x-ms-continuation')) + deserialized = self._deserialize('PathList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized list_paths.metadata = {'url': '/{filesystem}'} # type: ignore def list_blob_hierarchy_segment( @@ -566,8 +541,9 @@ def list_blob_hierarchy_segment( response. :type showonly: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_path_operations.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_path_operations.py index 5517c96888bd..c1434092b3fe 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_path_operations.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_path_operations.py @@ -68,16 +68,17 @@ def create( Create or rename a file or directory. By default, the destination is overwritten and if the destination already exists and has a lease the lease is broken. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers for Blob - Service Operations `_. To fail if the destination already exists, - use a conditional request with If-None-Match: "*". + Service Operations + `_. + To fail if the destination already exists, use a conditional request with If-None-Match: "*". :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param resource: Required only for Create File and Create Directory. The value must be "file" or "directory". @@ -292,8 +293,8 @@ def update( sets properties for a file or directory, or sets access control for a file or directory. Data can only be appended to a file. Concurrent writes to the same file using multiple clients are not supported. This operation supports conditional HTTP requests. For more information, see - `Specifying Conditional Headers for Blob Service Operations `_. + `Specifying Conditional Headers for Blob Service Operations + `_. :param action: The action must be "append" to upload data to be appended to a file, "flush" to flush previously uploaded data to a file, "setProperties" to set the properties of a file or @@ -315,8 +316,9 @@ def update( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param max_records: Optional. Valid for "SetAccessControlRecursive" operation. It specifies the maximum number of files or directories on which the acl change will be applied. If omitted or @@ -325,8 +327,8 @@ def update( :param continuation: Optional. The number of paths processed with each invocation is limited. If the number of paths to be processed exceeds this limit, a continuation token is returned in the response header x-ms-continuation. When a continuation token is returned in the response, - it must be percent-encoded and specified in a subsequent invocation of setAcessControlRecursive - operation. + it must be percent-encoded and specified in a subsequent invocation of + setAccessControlRecursive operation. :type continuation: str :param force_flag: Optional. Valid for "SetAccessControlRecursive" operation. If set to false, the operation will terminate quickly on encountering user errors (4XX). If true, the operation @@ -379,9 +381,9 @@ def update( Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. :type permissions: str - :param acl: Sets POSIX access control rights on files and directories. The value is a comma- - separated list of access control entries. Each access control entry (ACE) consists of a scope, - a type, a user or group identifier, and permissions in the format + :param acl: Sets POSIX access control rights on files and directories. The value is a + comma-separated list of access control entries. Each access control entry (ACE) consists of a + scope, a type, a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". :type acl: str :param path_http_headers: Parameter group. @@ -558,8 +560,8 @@ def lease( Create and manage a lease to restrict write and delete access to the path. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers - for Blob Service Operations `_. + for Blob Service Operations + `_. :param x_ms_lease_action: There are five lease actions: "acquire", "break", "change", "renew", and "release". Use "acquire" and specify the "x-ms-proposed-lease-id" and "x-ms-lease-duration" @@ -575,8 +577,9 @@ def lease( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param x_ms_lease_duration: The lease duration is required to acquire a lease, and specifies the duration of the lease in seconds. The lease duration must be between 15 and 60 seconds or @@ -708,15 +711,16 @@ def read( Read the contents of a file. For read operations, range requests are supported. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers - for Blob Service Operations `_. + for Blob Service Operations + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param range: The HTTP Range request header specifies one or more byte ranges of the resource to be retrieved. @@ -866,15 +870,16 @@ def get_properties( Get Properties returns all system and user defined properties for a path. Get Status returns all system defined properties for a path. Get Access Control List returns the access control list for a path. This operation supports conditional HTTP requests. For more information, see - `Specifying Conditional Headers for Blob Service Operations `_. + `Specifying Conditional Headers for Blob Service Operations + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param action: Optional. If the value is "getStatus" only the system defined properties for the path are returned. If the value is "getAccessControl" the access control list is returned in @@ -1004,15 +1009,15 @@ def delete( Delete the file or directory. This operation supports conditional HTTP requests. For more information, see `Specifying Conditional Headers for Blob Service Operations - `_. + `_. :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param recursive: Required. :type recursive: bool @@ -1121,8 +1126,9 @@ def set_access_control( """Set the owner, group, permissions, or access control list for a path. :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param owner: Optional. The owner of the blob or directory. :type owner: str @@ -1133,9 +1139,9 @@ def set_access_control( Each class may be granted read, write, or execute permission. The sticky bit is also supported. Both symbolic (rwxrw-rw-) and 4-digit octal notation (e.g. 0766) are supported. :type permissions: str - :param acl: Sets POSIX access control rights on files and directories. The value is a comma- - separated list of access control entries. Each access control entry (ACE) consists of a scope, - a type, a user or group identifier, and permissions in the format + :param acl: Sets POSIX access control rights on files and directories. The value is a + comma-separated list of access control entries. Each access control entry (ACE) consists of a + scope, a type, a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". :type acl: str :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character @@ -1243,7 +1249,7 @@ def set_access_control_recursive( **kwargs # type: Any ): # type: (...) -> "_models.SetAccessControlRecursiveResponse" - """Set the access control list for a path and subpaths. + """Set the access control list for a path and sub-paths. :param mode: Mode "set" sets POSIX access control rights on files and directories, "modify" modifies one or more POSIX access control rights that pre-exist on files and directories, @@ -1251,8 +1257,9 @@ def set_access_control_recursive( and directories. :type mode: str or ~azure.storage.filedatalake.models.PathSetAccessControlRecursiveMode :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param continuation: Optional. When deleting a directory, the number of paths that are deleted with each invocation is limited. If the number of paths to be deleted exceeds this limit, a @@ -1270,9 +1277,9 @@ def set_access_control_recursive( the acl change will be applied. If omitted or greater than 2,000, the request will process up to 2,000 items. :type max_records: int - :param acl: Sets POSIX access control rights on files and directories. The value is a comma- - separated list of access control entries. Each access control entry (ACE) consists of a scope, - a type, a user or group identifier, and permissions in the format + :param acl: Sets POSIX access control rights on files and directories. The value is a + comma-separated list of access control entries. Each access control entry (ACE) consists of a + scope, a type, a user or group identifier, and permissions in the format "[scope:][type]:[id]:[permissions]". :type acl: str :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character @@ -1360,8 +1367,9 @@ def flush_data( """Set the owner, group, permissions, or access control list for a path. :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param position: This parameter allows the caller to upload data in parallel and control the order in which it is appended to the file. It is required when uploading data to be appended @@ -1538,8 +1546,9 @@ def append_data( written, and there must not be a request entity body included with the request. :type position: long :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param content_length: Required for "Append Data" and "Flush Data". Must be 0 for "Flush Data". Must be the length of the request content in bytes for "Append Data". @@ -1646,8 +1655,9 @@ def set_expiry( :param expiry_options: Required. Indicates mode of the expiry time. :type expiry_options: str or ~azure.storage.filedatalake.models.PathExpiryOptions :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param request_id_parameter: Provides a client-generated, opaque value with a 1 KB character limit that is recorded in the analytics logs when storage analytics logging is enabled. @@ -1723,8 +1733,9 @@ def undelete( """Undelete a path that was previously soft deleted. :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :param undelete_source: Only for hierarchical namespace enabled accounts. Optional. The path of the soft deleted blob to undelete. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_service_operations.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_service_operations.py index 2db3801abff8..fd5af5c4c8c7 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_service_operations.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_generated/operations/_service_operations.py @@ -73,8 +73,9 @@ def list_file_systems( limit that is recorded in the analytics logs when storage analytics logging is enabled. :type request_id_parameter: str :param timeout: The timeout parameter is expressed in seconds. For more information, see - :code:`Setting Timeouts for Blob Service Operations.`. + :code:`Setting + Timeouts for Blob Service Operations.`. :type timeout: int :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either FileSystemList or the result of cls(response) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_list_paths_helper.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_list_paths_helper.py index 543e1e115780..e5cb8f65714d 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_list_paths_helper.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_list_paths_helper.py @@ -6,10 +6,13 @@ from azure.core.paging import PageIterator from azure.core.exceptions import HttpResponseError -from ._deserialize import process_storage_error, get_deleted_path_properties_from_generated_code +from ._deserialize import process_storage_error, get_deleted_path_properties_from_generated_code, \ + return_headers_and_deserialized_path_list from ._generated.models import BlobItemInternal, BlobPrefix as GenBlobPrefix from ._shared.models import DictMixin from ._shared.response_handlers import return_context_and_deserialized +from ._models import PathProperties +from ._generated.models import Path class DeletedPathPropertiesPaged(PageIterator): @@ -106,3 +109,65 @@ def __init__(self, **kwargs): self.file_system = kwargs.get('container') self.delimiter = kwargs.get('delimiter') self.location_mode = kwargs.get('location_mode') + + +class PathPropertiesPaged(PageIterator): + """An Iterable of Path properties. + + :ivar str path: Filters the results to return only paths under the specified path. + :ivar int results_per_page: The maximum number of results retrieved per API call. + :ivar str continuation_token: The continuation token to retrieve the next page of results. + :ivar list(~azure.storage.filedatalake.PathProperties) current_page: The current page of listed results. + + :param callable command: Function to retrieve the next page of items. + :param str path: Filters the results to return only paths under the specified path. + :param int max_results: The maximum number of psths to retrieve per + call. + :param str continuation_token: An opaque continuation token. + """ + def __init__( + self, command, + recursive, + path=None, + max_results=None, + continuation_token=None, + upn=None): + super(PathPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command + self.recursive = recursive + self.results_per_page = max_results + self.path = path + self.upn = upn + self.current_page = None + self.path_list = None + + def _get_next_cb(self, continuation_token): + try: + return self._command( + self.recursive, + continuation=continuation_token or None, + path=self.path, + max_results=self.results_per_page, + upn=self.upn, + cls=return_headers_and_deserialized_path_list) + except HttpResponseError as error: + process_storage_error(error) + + def _extract_data_cb(self, get_next_return): + self.path_list, self._response = get_next_return + self.current_page = [self._build_item(item) for item in self.path_list] + + return self._response['continuation'] or None, self.current_page + + @staticmethod + def _build_item(item): + if isinstance(item, PathProperties): + return item + if isinstance(item, Path): + path = PathProperties._from_generated(item) # pylint: disable=protected-access + return path + return item diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_models.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_models.py index fab529e0aa91..5cfae58cc51e 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_models.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_models.py @@ -186,7 +186,7 @@ def __init__(self, **kwargs): self.content_settings = ContentSettings(**kwargs) -class PathProperties(object): +class PathProperties(DictMixin): """Path properties listed by get_paths api. :ivar str name: the full path for a file or directory. diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py index 0aeb96a8aea7..3d46f71da600 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/models.py @@ -329,6 +329,12 @@ class AccountSasPermissions(object): To enable set or get tags on the blobs in the container. :keyword bool filter_by_tags: To enable get blobs by tags, this should be used together with list permission. + :keyword bool set_immutability_policy: + To enable operations related to set/delete immutability policy. + To get immutability policy, you just need read permission. + :keyword bool permanent_delete: + To enable permanent delete on the blob is permitted. + Valid for Object resource type of Blob only. """ def __init__(self, read=False, write=False, delete=False, list=False, # pylint: disable=redefined-builtin @@ -337,6 +343,7 @@ def __init__(self, read=False, write=False, delete=False, self.write = write self.delete = delete self.delete_previous_version = delete_previous_version + self.permanent_delete = kwargs.pop('permanent_delete', False) self.list = list self.add = add self.create = create @@ -344,17 +351,20 @@ def __init__(self, read=False, write=False, delete=False, self.process = process self.tag = kwargs.pop('tag', False) self.filter_by_tags = kwargs.pop('filter_by_tags', False) + self.set_immutability_policy = kwargs.pop('set_immutability_policy', False) self._str = (('r' if self.read else '') + ('w' if self.write else '') + ('d' if self.delete else '') + ('x' if self.delete_previous_version else '') + + ('y' if self.permanent_delete else '') + ('l' if self.list else '') + ('a' if self.add else '') + ('c' if self.create else '') + ('u' if self.update else '') + ('p' if self.process else '') + ('f' if self.filter_by_tags else '') + - ('t' if self.tag else '') + ('t' if self.tag else '') + + ('i' if self.set_immutability_policy else '') ) def __str__(self): @@ -377,6 +387,7 @@ def from_string(cls, permission): p_write = 'w' in permission p_delete = 'd' in permission p_delete_previous_version = 'x' in permission + p_permanent_delete = 'y' in permission p_list = 'l' in permission p_add = 'a' in permission p_create = 'c' in permission @@ -384,9 +395,11 @@ def from_string(cls, permission): p_process = 'p' in permission p_tag = 't' in permission p_filter_by_tags = 'f' in permission + p_set_immutability_policy = 'i' in permission parsed = cls(read=p_read, write=p_write, delete=p_delete, delete_previous_version=p_delete_previous_version, list=p_list, add=p_add, create=p_create, update=p_update, process=p_process, tag=p_tag, - filter_by_tags=p_filter_by_tags) + filter_by_tags=p_filter_by_tags, set_immutability_policy=p_set_immutability_policy, + permanent_delete=p_permanent_delete) return parsed diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py index 00068a7ba112..c6c6bb9aa5cc 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/policies.py @@ -12,7 +12,6 @@ from io import SEEK_SET, UnsupportedOperation import logging import uuid -import types from typing import Any, TYPE_CHECKING from wsgiref.handlers import format_date_time try: @@ -183,11 +182,15 @@ class StorageLoggingPolicy(NetworkTraceLoggingPolicy): This accepts both global configuration, and per-request level with "enable_http_logger" """ + def __init__(self, logging_enable=False, **kwargs): + self.logging_body = kwargs.pop("logging_body", False) + super(StorageLoggingPolicy, self).__init__(logging_enable=logging_enable, **kwargs) def on_request(self, request): # type: (PipelineRequest, Any) -> None http_request = request.http_request options = request.context.options + self.logging_body = self.logging_body or options.pop("logging_body", False) if options.pop("logging_enable", self.enable_http_logger): request.context["logging_enable"] = True if not _LOGGER.isEnabledFor(logging.DEBUG): @@ -216,11 +219,11 @@ def on_request(self, request): _LOGGER.debug(" %r: %r", header, value) _LOGGER.debug("Request body:") - # We don't want to log the binary data of a file upload. - if isinstance(http_request.body, types.GeneratorType): - _LOGGER.debug("File upload") - else: + if self.logging_body: _LOGGER.debug(str(http_request.body)) + else: + # We don't want to log the binary data of a file upload. + _LOGGER.debug("Hidden body, please use logging_body to show body") except Exception as err: # pylint: disable=broad-except _LOGGER.debug("Failed to log request: %r", err) @@ -240,19 +243,24 @@ def on_response(self, request, response): _LOGGER.debug("Response content:") pattern = re.compile(r'attachment; ?filename=["\w.]+', re.IGNORECASE) header = response.http_response.headers.get('content-disposition') + resp_content_type = response.http_response.headers.get("content-type", "") if header and pattern.match(header): filename = header.partition('=')[2] _LOGGER.debug("File attachments: %s", filename) - elif response.http_response.headers.get("content-type", "").endswith("octet-stream"): + elif resp_content_type.endswith("octet-stream"): _LOGGER.debug("Body contains binary data.") - elif response.http_response.headers.get("content-type", "").startswith("image"): + elif resp_content_type.startswith("image"): _LOGGER.debug("Body contains image data.") - else: - if response.context.options.get('stream', False): + + if self.logging_body and resp_content_type.startswith("text"): + _LOGGER.debug(response.http_response.text()) + elif self.logging_body: + try: + _LOGGER.debug(response.http_response.body()) + except ValueError: _LOGGER.debug("Body is streamable") - else: - _LOGGER.debug(response.http_response.text()) + except Exception as err: # pylint: disable=broad-except _LOGGER.debug("Failed to log response: %s", repr(err)) diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/response_handlers.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/response_handlers.py index 32a923f30a63..5c1558c0651a 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/response_handlers.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_shared/response_handlers.py @@ -98,6 +98,10 @@ def process_storage_error(storage_error): # pylint:disable=too-many-statements error_dict = {} try: error_body = ContentDecodePolicy.deserialize_from_http_generics(storage_error.response) + try: + error_body = error_body or storage_error.response.reason + except AttributeError: + error_body = '' # If it is an XML response if isinstance(error_body, Element): error_dict = { @@ -109,7 +113,7 @@ def process_storage_error(storage_error): # pylint:disable=too-many-statements error_dict = error_body.get('error', {}) elif not error_code: _LOGGER.warning( - 'Unexpected return type % from ContentDecodePolicy.deserialize_from_http_generics.', type(error_body)) + 'Unexpected return type %s from ContentDecodePolicy.deserialize_from_http_generics.', type(error_body)) error_dict = {'message': str(error_body)} # If we extracted from a Json or XML response diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py index d731da5c4072..fa1f7b91264e 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/_version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.5.0" +VERSION = "12.6.0b2" diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py index 90ace3e50697..bd375e942c81 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_file_system_client_async.py @@ -7,8 +7,10 @@ # pylint: disable=invalid-overridden-method import functools from typing import ( # pylint: disable=unused-import - Union, Optional, Any, Dict, TYPE_CHECKING -) + Union, Optional, Any, Dict, TYPE_CHECKING, + AsyncIterator) + +from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.exceptions import HttpResponseError from azure.core.tracing.decorator import distributed_trace @@ -25,13 +27,12 @@ from ._data_lake_file_client_async import DataLakeFileClient from ._data_lake_directory_client_async import DataLakeDirectoryClient from ._data_lake_lease_async import DataLakeLeaseClient -from .._deserialize import deserialize_path_properties from .._file_system_client import FileSystemClient as FileSystemClientBase from .._generated.aio import AzureDataLakeStorageRESTAPI from .._shared.base_client_async import AsyncTransportWrapper, AsyncStorageAccountHostsMixin from .._shared.policies_async import ExponentialRetry from .._models import FileSystemProperties, PublicAccess, DirectoryProperties, FileProperties, DeletedPathProperties -from ._list_paths_helper import DeletedPathPropertiesPaged +from ._list_paths_helper import DeletedPathPropertiesPaged, PathPropertiesPaged if TYPE_CHECKING: @@ -471,13 +472,14 @@ def get_paths(self, path=None, # type: Optional[str] :caption: List the blobs in the file system. """ timeout = kwargs.pop('timeout', None) - return self._client.file_system.list_paths( - recursive=recursive, - max_results=max_results, + command = functools.partial( + self._client.file_system.list_paths, path=path, timeout=timeout, - cls=deserialize_path_properties, **kwargs) + return AsyncItemPaged( + command, recursive, path=path, max_results=max_results, + page_iterator_class=PathPropertiesPaged, **kwargs) @distributed_trace_async async def create_directory(self, directory, # type: Union[DirectoryProperties, str] @@ -714,6 +716,72 @@ async def delete_file(self, file, # type: Union[FileProperties, str] await file_client.delete_file(**kwargs) return file_client + @distributed_trace_async + async def delete_files(self, *files, **kwargs): + # type: (...) -> AsyncIterator[AsyncHttpResponse] + """Marks the specified files or empty directories for deletion. + + The files/empty directories are later deleted during garbage collection. + + If a delete retention policy is enabled for the service, then this operation soft deletes the + files/empty directories and retains the files or snapshots for specified number of days. + After specified number of days, files' data is removed from the service during garbage collection. + Soft deleted files/empty directories are accessible through :func:`list_deleted_paths()`. + + :param files: + The files/empty directories to delete. This can be a single file/empty directory, or multiple values can + be supplied, where each value is either the name of the file/directory (str) or + FileProperties/DirectoryProperties. + + .. note:: + When the file/dir type is dict, here's a list of keys, value rules. + + blob name: + key: 'name', value type: str + if the file modified or not: + key: 'if_modified_since', 'if_unmodified_since', value type: datetime + etag: + key: 'etag', value type: str + match the etag or not: + key: 'match_condition', value type: MatchConditions + lease: + key: 'lease_id', value type: Union[str, LeaseClient] + timeout for subrequest: + key: 'timeout', value type: int + + :type files: list[str], list[dict], + or list[Union[~azure.storage.filedatalake.FileProperties, ~azure.storage.filedatalake.DirectoryProperties] + :keyword ~datetime.datetime if_modified_since: + A DateTime value. Azure expects the date value passed in to be UTC. + If timezone is included, any non-UTC datetimes will be converted to UTC. + If a date is passed in without timezone info, it is assumed to be UTC. + Specify this header to perform the operation only + if the resource has been modified since the specified time. + :keyword ~datetime.datetime if_unmodified_since: + A DateTime value. Azure expects the date value passed in to be UTC. + If timezone is included, any non-UTC datetimes will be converted to UTC. + If a date is passed in without timezone info, it is assumed to be UTC. + Specify this header to perform the operation only if + the resource has not been modified since the specified date/time. + :keyword bool raise_on_any_failure: + This is a boolean param which defaults to True. When this is set, an exception + is raised even if there is a single operation failure. + :keyword int timeout: + The timeout parameter is expressed in seconds. + :return: An iterator of responses, one for each blob in order + :rtype: AsyncIterator[~azure.core.pipeline.transport.AsyncHttpResponse] + + .. admonition:: Example: + + .. literalinclude:: ../samples/datalake_samples_file_system_async.py + :start-after: [START batch_delete_files_or_empty_directories] + :end-before: [END batch_delete_files_or_empty_directories] + :language: python + :dedent: 4 + :caption: Deleting multiple files or empty directories. + """ + return await self._container_client.delete_blobs(*files, **kwargs) + @distributed_trace_async async def _undelete_path(self, deleted_path_name, deletion_id, **kwargs): # type: (str, str, **Any) -> Union[DataLakeDirectoryClient, DataLakeFileClient] diff --git a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_list_paths_helper.py b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_list_paths_helper.py index 03831a5ecc5c..74ce2d778e28 100644 --- a/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_list_paths_helper.py +++ b/sdk/storage/azure-storage-file-datalake/azure/storage/filedatalake/aio/_list_paths_helper.py @@ -8,11 +8,14 @@ from azure.core.exceptions import HttpResponseError from azure.core.async_paging import AsyncPageIterator -from .._deserialize import process_storage_error, get_deleted_path_properties_from_generated_code +from .._deserialize import process_storage_error, get_deleted_path_properties_from_generated_code, \ + return_headers_and_deserialized_path_list from .._generated.models import BlobItemInternal, BlobPrefix as GenBlobPrefix from .._shared.models import DictMixin from .._shared.response_handlers import return_context_and_deserialized +from .._generated.models import Path +from .._models import PathProperties class DeletedPathPropertiesPaged(AsyncPageIterator): @@ -73,7 +76,7 @@ async def _extract_data_cb(self, get_next_return): self.marker = self._response.marker self.results_per_page = self._response.max_results self.container = self._response.container_name - self.current_page = self._response.segment.blob_prefixes + self._response.segment.blob_items + self.current_page = self._response.segment.blob_prefixes + self._response.segment.blob_items self.current_page = [self._build_item(item) for item in self.current_page] self.delimiter = self._response.delimiter @@ -109,3 +112,66 @@ def __init__(self, **kwargs): self.file_system = kwargs.get('container') self.delimiter = kwargs.get('delimiter') self.location_mode = kwargs.get('location_mode') + + +class PathPropertiesPaged(AsyncPageIterator): + """An Iterable of Path properties. + + :ivar str path: Filters the results to return only paths under the specified path. + :ivar int results_per_page: The maximum number of results retrieved per API call. + :ivar str continuation_token: The continuation token to retrieve the next page of results. + :ivar list(~azure.storage.filedatalake.PathProperties) current_page: The current page of listed results. + + :param callable command: Function to retrieve the next page of items. + :param str path: Filters the results to return only paths under the specified path. + :param int max_results: The maximum number of psths to retrieve per + call. + :param str continuation_token: An opaque continuation token. + """ + + def __init__( + self, command, + recursive, + path=None, + max_results=None, + continuation_token=None, + upn=None): + super(PathPropertiesPaged, self).__init__( + get_next=self._get_next_cb, + extract_data=self._extract_data_cb, + continuation_token=continuation_token or "" + ) + self._command = command + self.recursive = recursive + self.results_per_page = max_results + self.path = path + self.upn = upn + self.current_page = None + self.path_list = None + + async def _get_next_cb(self, continuation_token): + try: + return await self._command( + self.recursive, + continuation=continuation_token or None, + path=self.path, + max_results=self.results_per_page, + upn=self.upn, + cls=return_headers_and_deserialized_path_list) + except HttpResponseError as error: + process_storage_error(error) + + async def _extract_data_cb(self, get_next_return): + self.path_list, self._response = get_next_return + self.current_page = [self._build_item(item) for item in self.path_list] + + return self._response['continuation'] or None, self.current_page + + @staticmethod + def _build_item(item): + if isinstance(item, PathProperties): + return item + if isinstance(item, Path): + path = PathProperties._from_generated(item) # pylint: disable=protected-access + return path + return item diff --git a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system.py b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system.py index 33c2955d10aa..dfa0c4b021fd 100644 --- a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system.py +++ b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system.py @@ -209,6 +209,55 @@ def create_file_from_file_system(self): file_system_client.delete_file_system() + # [START batch_delete_files_or_empty_directories] + def batch_delete_files_or_empty_directories(self): + from azure.storage.filedatalake import FileSystemClient + file_system_client = FileSystemClient.from_connection_string(self.connection_string, "filesystem") + + file_system_client.create_file_system() + + data = b'hello world' + + try: + # create file1 + file_system_client.get_file_client('file1').upload_data(data, overwrite=True) + + # create file2, then pass file properties in batch delete later + file2 = file_system_client.get_file_client('file2') + file2.upload_data(data, overwrite=True) + file2_properties = file2.get_file_properties() + + # create file3 and batch delete it later only etag matches this file3 etag + file3 = file_system_client.get_file_client('file3') + file3.upload_data(data, overwrite=True) + file3_etag = file3.get_file_properties().etag + + # create dir1. Empty directory can be deleted using delete_files + file_system_client.get_directory_client('dir1').create_directory(), + + # create dir2, then pass directory properties in batch delete later + dir2 = file_system_client.get_directory_client('dir2') + dir2.create_directory() + dir2_properties = dir2.get_directory_properties() + except: + pass + + # Act + response = file_system_client.delete_files( + 'file1', + file2_properties, + {'name': 'file3', 'etag': file3_etag}, + 'dir1', + dir2_properties, + raise_on_any_failure=False + ) + print("total number of sub-responses:" + len(response)) + print(response[0].status_code) + print(response[2].status_code) + print(response[3].status_code) + # [END batch_delete_files_or_empty_directories] + + if __name__ == '__main__': sample = FileSystemSamples() sample.file_system_sample() @@ -217,3 +266,4 @@ def create_file_from_file_system(self): sample.list_paths_in_file_system() sample.get_file_client_from_file_system() sample.create_file_from_file_system() + sample.batch_delete_files_or_empty_directories() diff --git a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system_async.py b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system_async.py index 286ce724ba0a..6a4b43305273 100644 --- a/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system_async.py +++ b/sdk/storage/azure-storage-file-datalake/samples/datalake_samples_file_system_async.py @@ -217,6 +217,64 @@ async def create_file_from_file_system(self): await file_system_client.delete_file_system() + # [START batch_delete_files_or_empty_directories] + async def batch_delete_files_or_empty_directories(self): + from azure.storage.filedatalake.aio import FileSystemClient + file_system_client = FileSystemClient.from_connection_string(self.connection_string, "filesystemforcreate") + + async with file_system_client: + await file_system_client.create_file_system() + + data = b'hello world' + + try: + # create file1 + await file_system_client.get_file_client('file1').upload_data(data, overwrite=True) + + # create file2, then pass file properties in batch delete later + file2 = file_system_client.get_file_client('file2') + await file2.upload_data(data, overwrite=True) + file2_properties = await file2.get_file_properties() + + # create file3 and batch delete it later only etag matches this file3 etag + file3 = file_system_client.get_file_client('file3') + await file3.upload_data(data, overwrite=True) + file3_props = await file3.get_file_properties() + file3_etag = file3_props.etag + + # create dir1 + # empty directory can be deleted using delete_files + await file_system_client.get_directory_client('dir1').create_directory(), + + # create dir2, then pass directory properties in batch delete later + dir2 = file_system_client.get_directory_client('dir2') + await dir2.create_directory() + dir2_properties = await dir2.get_directory_properties() + + except: + pass + + # Act + response = await self._to_list(await file_system_client.delete_files( + 'file1', + file2_properties, + {'name': 'file3', 'etag': file3_etag}, + 'dir1', + dir2_properties, + raise_on_any_failure=False + )) + print("total number of sub-responses:" + len(response)) + print(response[0].status_code) + print(response[2].status_code) + print(response[3].status_code) + + async def _to_list(self, async_iterator): + result = [] + async for item in async_iterator: + result.append(item) + return result + # [END batch_delete_files_or_empty_directories] + async def run(): sample = FileSystemSamplesAsync() @@ -226,6 +284,7 @@ async def run(): await sample.list_paths_in_file_system() await sample.get_file_client_from_file_system() await sample.create_file_from_file_system() + await sample.batch_delete_files_or_empty_directories() if __name__ == '__main__': loop = asyncio.get_event_loop() diff --git a/sdk/storage/azure-storage-file-datalake/setup.py b/sdk/storage/azure-storage-file-datalake/setup.py index 7c4e0eea3688..17bf399dd376 100644 --- a/sdk/storage/azure-storage-file-datalake/setup.py +++ b/sdk/storage/azure-storage-file-datalake/setup.py @@ -73,7 +73,7 @@ author_email='ascl@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/sdk/storage/azure-storage-file-datalake/swagger/README.md b/sdk/storage/azure-storage-file-datalake/swagger/README.md index 47cf1a3b4c8c..92f8e7a10eb5 100644 --- a/sdk/storage/azure-storage-file-datalake/swagger/README.md +++ b/sdk/storage/azure-storage-file-datalake/swagger/README.md @@ -35,4 +35,33 @@ directive: where: $["x-ms-paths"]["/{filesystem}?restype=container&comp=list&hierarchy"].get transform: > delete $["x-ms-pageable"]; +``` + +### Remove Filesystem and PathName from parameter list since they are not needed +``` yaml +directive: +- from: swagger-document + where: $["x-ms-paths"] + transform: > + for (const property in $) + { + if (property.includes('/{filesystem}/{path}')) + { + $[property]["parameters"] = $[property]["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/FileSystem") && false == param['$ref'].endsWith("#/parameters/Path"))}); + } + else if (property.includes('/{filesystem}')) + { + $[property]["parameters"] = $[property]["parameters"].filter(function(param) { return (typeof param['$ref'] === "undefined") || (false == param['$ref'].endsWith("#/parameters/FileSystem"))}); + } + } +``` + +### Remove x-ms-pageable +Currently breaking the latest version of autorest.python +``` yaml +directive: +- from: swagger-document + where: $["x-ms-paths"]["/{filesystem}?resource=filesystem"].get + transform: > + delete $["x-ms-pageable"]; ``` \ No newline at end of file diff --git a/sdk/storage/azure-storage-file-datalake/tests/asynctestcase.py b/sdk/storage/azure-storage-file-datalake/tests/asynctestcase.py deleted file mode 100644 index d8e4a2a29574..000000000000 --- a/sdk/storage/azure-storage-file-datalake/tests/asynctestcase.py +++ /dev/null @@ -1,38 +0,0 @@ - -# coding: utf-8 -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -from azure.core.credentials import AccessToken - -from testcase import StorageTestCase as StorageSyncTestCase - -LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' - -class AsyncFakeTokenCredential(object): - """Protocol for classes able to provide OAuth tokens. - :param str scopes: Lets you specify the type of access needed. - """ - def __init__(self): - self.token = AccessToken("YOU SHALL NOT PASS", 0) - - async def get_token(self, *args): - return self.token - - -class StorageTestCase(StorageSyncTestCase): - - def generate_oauth_token(self): - if self.is_live: - from azure.identity.aio import ClientSecretCredential - return ClientSecretCredential( - self.get_settings_value("TENANT_ID"), - self.get_settings_value("CLIENT_ID"), - self.get_settings_value("CLIENT_SECRET"), - ) - return self.generate_fake_token() - - def generate_fake_token(self): - return AsyncFakeTokenCredential() diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_simple_no_raise.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_simple_no_raise.yaml new file mode 100644 index 000000000000..f4aa5b5438a8 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_simple_no_raise.yaml @@ -0,0 +1,796 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:57 GMT + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.blob.core.windows.net/fs1d66148e?restype=container + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:58 GMT + etag: + - '"0x8D98DBBFC4B78F1"' + last-modified: + - Tue, 12 Oct 2021 20:07:58 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:58 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs1d66148e/file1?resource=file + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:58 GMT + etag: + - '"0x8D98DBBFC9BB3EB"' + last-modified: + - Tue, 12 Oct 2021 20:07:58 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: hello world + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:58 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs1d66148e/file1?action=append&position=0 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:58 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D98DBBFC9BB3EB"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:58 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs1d66148e/file1?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:58 GMT + etag: + - '"0x8D98DBBFCC3C29C"' + last-modified: + - Tue, 12 Oct 2021 20:07:58 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'false' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:58 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs1d66148e/file2?resource=file + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:58 GMT + etag: + - '"0x8D98DBBFCD401EE"' + last-modified: + - Tue, 12 Oct 2021 20:07:58 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: hello world + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs1d66148e/file2?action=append&position=0 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:58 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D98DBBFCD401EE"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs1d66148e/file2?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:58 GMT + etag: + - '"0x8D98DBBFCF62AAA"' + last-modified: + - Tue, 12 Oct 2021 20:07:59 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'false' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs1d66148e/file2 + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '11' + content-type: + - application/octet-stream + date: + - Tue, 12 Oct 2021 20:07:59 GMT + etag: + - '"0x8D98DBBFCF62AAA"' + last-modified: + - Tue, 12 Oct 2021 20:07:59 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-access-tier: + - Hot + x-ms-access-tier-inferred: + - 'true' + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 12 Oct 2021 20:07:58 GMT + x-ms-group: + - $superuser + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-owner: + - $superuser + x-ms-permissions: + - rw-r----- + x-ms-resource-type: + - file + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs1d66148e/file3?resource=file + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:58 GMT + etag: + - '"0x8D98DBBFD1819C2"' + last-modified: + - Tue, 12 Oct 2021 20:07:59 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: hello world + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs1d66148e/file3?action=append&position=0 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:59 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D98DBBFD1819C2"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs1d66148e/file3?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:59 GMT + etag: + - '"0x8D98DBBFD3E0CCA"' + last-modified: + - Tue, 12 Oct 2021 20:07:59 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'false' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs1d66148e/file3 + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '11' + content-type: + - application/octet-stream + date: + - Tue, 12 Oct 2021 20:07:59 GMT + etag: + - '"0x8D98DBBFD3E0CCA"' + last-modified: + - Tue, 12 Oct 2021 20:07:59 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-access-tier: + - Hot + x-ms-access-tier-inferred: + - 'true' + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-group: + - $superuser + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-owner: + - $superuser + x-ms-permissions: + - rw-r----- + x-ms-resource-type: + - file + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs1d66148e/dir1?resource=directory + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:59 GMT + etag: + - '"0x8D98DBBFD5E8FE5"' + last-modified: + - Tue, 12 Oct 2021 20:07:59 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs1d66148e/dir2?resource=directory + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:07:59 GMT + etag: + - '"0x8D98DBBFD6E735A"' + last-modified: + - Tue, 12 Oct 2021 20:07:59 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:00 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs1d66148e/dir2 + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '0' + content-type: + - application/octet-stream + date: + - Tue, 12 Oct 2021 20:07:59 GMT + etag: + - '"0x8D98DBBFD6E735A"' + last-modified: + - Tue, 12 Oct 2021 20:07:59 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-access-tier: + - Hot + x-ms-access-tier-inferred: + - 'true' + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 12 Oct 2021 20:07:59 GMT + x-ms-group: + - $superuser + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-hdi_isfolder: + - 'true' + x-ms-owner: + - $superuser + x-ms-permissions: + - rwxr-x--- + x-ms-resource-type: + - directory + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: "--batch_19514640-2b98-11ec-bd57-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 0\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/file1? HTTP/1.1\r\nx-ms-date: + Tue, 12 Oct 2021 20:08:00 GMT\r\nx-ms-client-request-id: 19514641-2b98-11ec-b645-001a7dda7113\r\nAuthorization: + SharedKey storagename:iYJo5j0NYLUbjKHEmfHr+UDrDFZnjH2eHv0keOxe2+0=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_19514640-2b98-11ec-bd57-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 1\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/file2? HTTP/1.1\r\nIf-Match: + \"0x8D98DBBFCF62AAA\"\r\nx-ms-date: Tue, 12 Oct 2021 20:08:00 GMT\r\nx-ms-client-request-id: + 19514642-2b98-11ec-b004-001a7dda7113\r\nAuthorization: SharedKey storagename:6GlTCV2sKGugHZr8Q+LMhH32bE7BEr2hAamgl7rgSmU=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_19514640-2b98-11ec-bd57-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 2\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/file3? HTTP/1.1\r\nIf-Match: + \"0x8D98DBBFD3E0CCA\"\r\nx-ms-date: Tue, 12 Oct 2021 20:08:00 GMT\r\nx-ms-client-request-id: + 19516d40-2b98-11ec-8954-001a7dda7113\r\nAuthorization: SharedKey storagename:TZHq/I+ouSPFCYCs3sN4ra/bi5TDJJpWiFPP3jPcW2g=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_19514640-2b98-11ec-bd57-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 3\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/dir1? HTTP/1.1\r\nx-ms-date: + Tue, 12 Oct 2021 20:08:00 GMT\r\nx-ms-client-request-id: 19516d41-2b98-11ec-be0a-001a7dda7113\r\nAuthorization: + SharedKey storagename:qc+jzUjMFa8lB0s0Zn97wOn0EZZaH2evGcTnEMv2uZE=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_19514640-2b98-11ec-bd57-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 4\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs1d66148e/dir2? HTTP/1.1\r\nIf-Match: + \"0x8D98DBBFD6E735A\"\r\nx-ms-date: Tue, 12 Oct 2021 20:08:00 GMT\r\nx-ms-client-request-id: + 19516d42-2b98-11ec-a7fa-001a7dda7113\r\nAuthorization: SharedKey storagename:rgY7D5nAXMfYPW2waRR/FfVpRCj5c1uuDIlkSIYOlYE=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_19514640-2b98-11ec-bd57-001a7dda7113--\r\n" + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2004' + Content-Type: + - multipart/mixed; boundary=batch_19514640-2b98-11ec-bd57-001a7dda7113 + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:00 GMT + x-ms-version: + - '2020-10-02' + method: POST + uri: https://storagename.blob.core.windows.net/fs1d66148e?restype=container&comp=batch + response: + body: + string: "--batchresponse_78ce1065-2169-4449-bf72-e6cfee00b70f\r\nContent-Type: + application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: 672671fa-d01e-0041-49a4-bf15701ea53c\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: 19514641-2b98-11ec-b645-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_78ce1065-2169-4449-bf72-e6cfee00b70f\r\nContent-Type: + application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: 672671fa-d01e-0041-49a4-bf15701ea53e\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: 19514642-2b98-11ec-b004-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_78ce1065-2169-4449-bf72-e6cfee00b70f\r\nContent-Type: + application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: 672671fa-d01e-0041-49a4-bf15701ea53f\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: 19516d40-2b98-11ec-8954-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_78ce1065-2169-4449-bf72-e6cfee00b70f\r\nContent-Type: + application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: 672671fa-d01e-0041-49a4-bf15701ea540\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: 19516d41-2b98-11ec-be0a-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_78ce1065-2169-4449-bf72-e6cfee00b70f\r\nContent-Type: + application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: 672671fa-d01e-0041-49a4-bf15701ea541\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: 19516d42-2b98-11ec-a7fa-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_78ce1065-2169-4449-bf72-e6cfee00b70f--" + headers: + content-type: + - multipart/mixed; boundary=batchresponse_78ce1065-2169-4449-bf72-e6cfee00b70f + date: + - Tue, 12 Oct 2021 20:08:00 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:00 GMT + x-ms-version: + - '2020-10-02' + method: DELETE + uri: https://storagename.blob.core.windows.net/fs1d66148e?restype=container + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:00 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_with_failed_subrequest.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_with_failed_subrequest.yaml new file mode 100644 index 000000000000..b363dc815c8e --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system.test_delete_files_with_failed_subrequest.yaml @@ -0,0 +1,801 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:24 GMT + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.blob.core.windows.net/fs2a8621787?restype=container + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:23 GMT + etag: + - '"0x8D98DBC0C28B092"' + last-modified: + - Tue, 12 Oct 2021 20:08:24 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:24 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2a8621787/file1?resource=file + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:24 GMT + etag: + - '"0x8D98DBC0C741922"' + last-modified: + - Tue, 12 Oct 2021 20:08:25 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: hello world + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:25 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2a8621787/file1?action=append&position=0 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:25 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D98DBC0C741922"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:25 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2a8621787/file1?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:25 GMT + etag: + - '"0x8D98DBC0C9A9CD6"' + last-modified: + - Tue, 12 Oct 2021 20:08:25 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'false' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:25 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2a8621787/file2?resource=file + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:25 GMT + etag: + - '"0x8D98DBC0CAE2520"' + last-modified: + - Tue, 12 Oct 2021 20:08:25 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: hello world + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:25 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2a8621787/file2?action=append&position=0 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:25 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D98DBC0CAE2520"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:25 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2a8621787/file2?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:25 GMT + etag: + - '"0x8D98DBC0CD424DE"' + last-modified: + - Tue, 12 Oct 2021 20:08:25 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'false' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:25 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs2a8621787/file2 + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '11' + content-type: + - application/octet-stream + date: + - Tue, 12 Oct 2021 20:08:24 GMT + etag: + - '"0x8D98DBC0CD424DE"' + last-modified: + - Tue, 12 Oct 2021 20:08:25 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-access-tier: + - Hot + x-ms-access-tier-inferred: + - 'true' + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 12 Oct 2021 20:08:25 GMT + x-ms-group: + - $superuser + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-owner: + - $superuser + x-ms-permissions: + - rw-r----- + x-ms-resource-type: + - file + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:25 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2a8621787/file3?resource=file + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:25 GMT + etag: + - '"0x8D98DBC0CF8DF36"' + last-modified: + - Tue, 12 Oct 2021 20:08:26 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: hello world + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2a8621787/file3?action=append&position=0 + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:25 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + If-Match: + - '"0x8D98DBC0CF8DF36"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2a8621787/file3?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:26 GMT + etag: + - '"0x8D98DBC0D201B93"' + last-modified: + - Tue, 12 Oct 2021 20:08:26 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'false' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs2a8621787/file3 + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '11' + content-type: + - application/octet-stream + date: + - Tue, 12 Oct 2021 20:08:25 GMT + etag: + - '"0x8D98DBC0D201B93"' + last-modified: + - Tue, 12 Oct 2021 20:08:26 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-access-tier: + - Hot + x-ms-access-tier-inferred: + - 'true' + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-group: + - $superuser + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-owner: + - $superuser + x-ms-permissions: + - rw-r----- + x-ms-resource-type: + - file + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2a8621787/dir1%2Ffile4?resource=file + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:26 GMT + etag: + - '"0x8D98DBC0D43955E"' + last-modified: + - Tue, 12 Oct 2021 20:08:26 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2a8621787/dir2?resource=directory + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:26 GMT + etag: + - '"0x8D98DBC0D5324FD"' + last-modified: + - Tue, 12 Oct 2021 20:08:26 GMT + server: + - Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs2a8621787/dir2 + response: + body: + string: '' + headers: + accept-ranges: + - bytes + content-length: + - '0' + content-type: + - application/octet-stream + date: + - Tue, 12 Oct 2021 20:08:25 GMT + etag: + - '"0x8D98DBC0D5324FD"' + last-modified: + - Tue, 12 Oct 2021 20:08:26 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-access-tier: + - Hot + x-ms-access-tier-inferred: + - 'true' + x-ms-blob-type: + - BlockBlob + x-ms-creation-time: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-group: + - $superuser + x-ms-lease-state: + - available + x-ms-lease-status: + - unlocked + x-ms-meta-hdi_isfolder: + - 'true' + x-ms-owner: + - $superuser + x-ms-permissions: + - rwxr-x--- + x-ms-resource-type: + - directory + x-ms-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 200 + message: OK +- request: + body: "--batch_2936bdca-2b98-11ec-aca2-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 0\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/file1? HTTP/1.1\r\nx-ms-date: + Tue, 12 Oct 2021 20:08:26 GMT\r\nx-ms-client-request-id: 2936e4ca-2b98-11ec-a035-001a7dda7113\r\nAuthorization: + SharedKey storagename:zFU2arTn79khb/XeVvNjXGhRjZdX/77i+WBwkZuPjMc=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_2936bdca-2b98-11ec-aca2-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 1\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/file2? HTTP/1.1\r\nIf-Match: + \"0x8D98DBC0CD424DE\"\r\nx-ms-date: Tue, 12 Oct 2021 20:08:26 GMT\r\nx-ms-client-request-id: + 2936e4cb-2b98-11ec-836f-001a7dda7113\r\nAuthorization: SharedKey storagename:F6tKUED15bxxx1vj1zU7M+Uy2sABAbpCKPFbbyNm9Pg=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_2936bdca-2b98-11ec-aca2-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 2\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/file3? HTTP/1.1\r\nIf-Match: + \"0x8D98DBC0D201B93\"\r\nx-ms-date: Tue, 12 Oct 2021 20:08:26 GMT\r\nx-ms-client-request-id: + 2936e4cc-2b98-11ec-8a38-001a7dda7113\r\nAuthorization: SharedKey storagename:Uvbq4cXT7uuAh1io3gDodl5+Xcc/IiMmqn3n41uKtI0=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_2936bdca-2b98-11ec-aca2-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 3\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/dir1? HTTP/1.1\r\nx-ms-date: + Tue, 12 Oct 2021 20:08:26 GMT\r\nx-ms-client-request-id: 29370bb6-2b98-11ec-8098-001a7dda7113\r\nAuthorization: + SharedKey storagename:GilhirMfedKdqtTWZdJs5VKi86Y1CJacY7Sk4aVAnIw=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_2936bdca-2b98-11ec-aca2-001a7dda7113\r\nContent-Type: application/http\r\nContent-ID: + 4\r\nContent-Transfer-Encoding: binary\r\n\r\nDELETE /fs2a8621787/dir8? HTTP/1.1\r\nx-ms-date: + Tue, 12 Oct 2021 20:08:26 GMT\r\nx-ms-client-request-id: 29370bb7-2b98-11ec-b93c-001a7dda7113\r\nAuthorization: + SharedKey storagename:UyGHWGJQRpS+TL8wAQ6tfH00ryhtf9OKq9oZP3xiCz4=\r\nContent-Length: + 0\r\n\r\n\r\n--batch_2936bdca-2b98-11ec-aca2-001a7dda7113--\r\n" + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1978' + Content-Type: + - multipart/mixed; boundary=batch_2936bdca-2b98-11ec-aca2-001a7dda7113 + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-version: + - '2020-10-02' + method: POST + uri: https://storagename.blob.core.windows.net/fs2a8621787?restype=container&comp=batch + response: + body: + string: "--batchresponse_51f9ad61-d59f-41f2-a902-7b9e3a087044\r\nContent-Type: + application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: a4e6e456-d01e-006e-72a4-bf18bb1e5f20\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: 2936e4ca-2b98-11ec-a035-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_51f9ad61-d59f-41f2-a902-7b9e3a087044\r\nContent-Type: + application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: a4e6e456-d01e-006e-72a4-bf18bb1e5f22\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: 2936e4cb-2b98-11ec-836f-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_51f9ad61-d59f-41f2-a902-7b9e3a087044\r\nContent-Type: + application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: a4e6e456-d01e-006e-72a4-bf18bb1e5f23\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: 2936e4cc-2b98-11ec-8a38-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_51f9ad61-d59f-41f2-a902-7b9e3a087044\r\nContent-Type: + application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 409 The directory involved + in this operation is not empty\r\nx-ms-error-code: DirectoryNotEmpty\r\nx-ms-request-id: + a4e6e456-d01e-006e-72a4-bf18bb1e5f24\r\nx-ms-version: 2020-10-02\r\nx-ms-client-request-id: + 29370bb6-2b98-11ec-8098-001a7dda7113\r\nContent-Length: 240\r\nContent-Type: + application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\uFEFF\nDirectoryNotEmptyThe directory + involved in this operation is not empty\nRequestId:a4e6e456-d01e-006e-72a4-bf18bb1e5f24\nTime:2021-10-12T20:08:26.8942162Z\r\n--batchresponse_51f9ad61-d59f-41f2-a902-7b9e3a087044\r\nContent-Type: + application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 404 The specified blob does + not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: a4e6e456-d01e-006e-72a4-bf18bb1e5f25\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: 29370bb7-2b98-11ec-b93c-001a7dda7113\r\nContent-Length: + 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\uFEFF\nBlobNotFoundThe + specified blob does not exist.\nRequestId:a4e6e456-d01e-006e-72a4-bf18bb1e5f25\nTime:2021-10-12T20:08:26.8882121Z\r\n--batchresponse_51f9ad61-d59f-41f2-a902-7b9e3a087044--" + headers: + content-type: + - multipart/mixed; boundary=batchresponse_51f9ad61-d59f-41f2-a902-7b9e3a087044 + date: + - Tue, 12 Oct 2021 20:08:25 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: + - chunked + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Tue, 12 Oct 2021 20:08:26 GMT + x-ms-version: + - '2020-10-02' + method: DELETE + uri: https://storagename.blob.core.windows.net/fs2a8621787?restype=container + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Tue, 12 Oct 2021 20:08:27 GMT + server: + - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_simple_no_raise.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_simple_no_raise.yaml new file mode 100644 index 000000000000..9da2e3ee8e56 --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_simple_no_raise.yaml @@ -0,0 +1,574 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:38 GMT + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.blob.core.windows.net/fs2932d170b?restype=container + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:37 GMT + etag: '"0x8D98E099CB3000A"' + last-modified: Wed, 13 Oct 2021 05:23:38 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.blob.core.windows.net/fs2932d170b?restype=container +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:38 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2932d170b/file1?resource=file + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:38 GMT + etag: '"0x8D98E099CD96656"' + last-modified: Wed, 13 Oct 2021 05:23:38 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/file1?resource=file +- request: + body: hello world + headers: + Accept: + - application/json + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:38 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2932d170b/file1?action=append&position=0 + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:38 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/file1?action=append&position=0 +- request: + body: null + headers: + Accept: + - application/json + If-Match: + - '"0x8D98E099CD96656"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:38 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2932d170b/file1?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:38 GMT + etag: '"0x8D98E099CEF9252"' + last-modified: Wed, 13 Oct 2021 05:23:38 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'false' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/file1?action=flush&position=11&close=true +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:38 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2932d170b/file2?resource=file + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:38 GMT + etag: '"0x8D98E099CFADF56"' + last-modified: Wed, 13 Oct 2021 05:23:38 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/file2?resource=file +- request: + body: hello world + headers: + Accept: + - application/json + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:38 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2932d170b/file2?action=append&position=0 + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:38 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/file2?action=append&position=0 +- request: + body: null + headers: + Accept: + - application/json + If-Match: + - '"0x8D98E099CFADF56"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:39 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2932d170b/file2?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:38 GMT + etag: '"0x8D98E099D0F2084"' + last-modified: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'false' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/file2?action=flush&position=11&close=true +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:39 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs2932d170b/file2 + response: + body: + string: '' + headers: + accept-ranges: bytes + content-length: '11' + content-type: application/octet-stream + date: Wed, 13 Oct 2021 05:23:38 GMT + etag: '"0x8D98E099D0F2084"' + last-modified: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin + x-ms-access-tier: Hot + x-ms-access-tier-inferred: 'true' + x-ms-blob-type: BlockBlob + x-ms-creation-time: Wed, 13 Oct 2021 05:23:38 GMT + x-ms-group: $superuser + x-ms-lease-state: available + x-ms-lease-status: unlocked + x-ms-owner: $superuser + x-ms-permissions: rw-r----- + x-ms-resource-type: file + x-ms-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.blob.core.windows.net/fs2932d170b/file2 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:39 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2932d170b/file3?resource=file + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:39 GMT + etag: '"0x8D98E099D268483"' + last-modified: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/file3?resource=file +- request: + body: hello world + headers: + Accept: + - application/json + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:39 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2932d170b/file3?action=append&position=0 + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/file3?action=append&position=0 +- request: + body: null + headers: + Accept: + - application/json + If-Match: + - '"0x8D98E099D268483"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:39 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs2932d170b/file3?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:39 GMT + etag: '"0x8D98E099D3DB80A"' + last-modified: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'false' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/file3?action=flush&position=11&close=true +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:39 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs2932d170b/file3 + response: + body: + string: '' + headers: + accept-ranges: bytes + content-length: '11' + content-type: application/octet-stream + date: Wed, 13 Oct 2021 05:23:39 GMT + etag: '"0x8D98E099D3DB80A"' + last-modified: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin + x-ms-access-tier: Hot + x-ms-access-tier-inferred: 'true' + x-ms-blob-type: BlockBlob + x-ms-creation-time: Wed, 13 Oct 2021 05:23:39 GMT + x-ms-group: $superuser + x-ms-lease-state: available + x-ms-lease-status: unlocked + x-ms-owner: $superuser + x-ms-permissions: rw-r----- + x-ms-resource-type: file + x-ms-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.blob.core.windows.net/fs2932d170b/file3 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:39 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2932d170b/dir1?resource=directory + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:39 GMT + etag: '"0x8D98E099D684536"' + last-modified: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/dir1?resource=directory +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:39 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs2932d170b/dir2?resource=directory + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:39 GMT + etag: '"0x8D98E099D739279"' + last-modified: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.dfs.core.windows.net/fs2932d170b/dir2?resource=directory +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:39 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs2932d170b/dir2 + response: + body: + string: '' + headers: + accept-ranges: bytes + content-length: '0' + content-type: application/octet-stream + date: Wed, 13 Oct 2021 05:23:39 GMT + etag: '"0x8D98E099D739279"' + last-modified: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin + x-ms-access-tier: Hot + x-ms-access-tier-inferred: 'true' + x-ms-blob-type: BlockBlob + x-ms-creation-time: Wed, 13 Oct 2021 05:23:39 GMT + x-ms-group: $superuser + x-ms-lease-state: available + x-ms-lease-status: unlocked + x-ms-meta-hdi_isfolder: 'true' + x-ms-owner: $superuser + x-ms-permissions: rwxr-x--- + x-ms-resource-type: directory + x-ms-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.blob.core.windows.net/fs2932d170b/dir2 +- request: + body: "--===============0810737550396990479==\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: + binary\r\nContent-ID: 0\r\n\r\nDELETE /fs2932d170b/file1? HTTP/1.1\r\nx-ms-date: + Wed, 13 Oct 2021 05:23:39 GMT\r\nx-ms-client-request-id: b967bb2c-2be5-11ec-b0c2-001a7dda7113\r\nAuthorization: + SharedKey storagename:EFsDd+ovFg6JczZmIc65s9Vvi2L/xkzVv45FKZwwri4=\r\n\r\n\r\n--===============0810737550396990479==\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 1\r\n\r\nDELETE + /fs2932d170b/file2? HTTP/1.1\r\nIf-Match: \"0x8D98E099D0F2084\"\r\nx-ms-date: + Wed, 13 Oct 2021 05:23:39 GMT\r\nx-ms-client-request-id: b967bb2d-2be5-11ec-82c4-001a7dda7113\r\nAuthorization: + SharedKey storagename:BT0pZyXbisnR94DrChcpG/eJ8RPJw1/TyrMbJx4qeN8=\r\n\r\n\r\n--===============0810737550396990479==\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 2\r\n\r\nDELETE + /fs2932d170b/file3? HTTP/1.1\r\nIf-Match: \"0x8D98E099D3DB80A\"\r\nx-ms-date: + Wed, 13 Oct 2021 05:23:39 GMT\r\nx-ms-client-request-id: b967bb2e-2be5-11ec-baf6-001a7dda7113\r\nAuthorization: + SharedKey storagename:rqkegiF/REYraIPMrzHBG+7w+35+ELPMO6lMU1/OWWk=\r\n\r\n\r\n--===============0810737550396990479==\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 3\r\n\r\nDELETE + /fs2932d170b/dir1? HTTP/1.1\r\nx-ms-date: Wed, 13 Oct 2021 05:23:39 GMT\r\nx-ms-client-request-id: + b967bb2f-2be5-11ec-8e58-001a7dda7113\r\nAuthorization: SharedKey storagename:B6GDDMRWTuhF6FK6C75U7aO6t7k3h0Zmvbhegm7bq8o=\r\n\r\n\r\n--===============0810737550396990479==\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 4\r\n\r\nDELETE + /fs2932d170b/dir2? HTTP/1.1\r\nIf-Match: \"0x8D98E099D739279\"\r\nx-ms-date: + Wed, 13 Oct 2021 05:23:39 GMT\r\nx-ms-client-request-id: b967bb30-2be5-11ec-b1c5-001a7dda7113\r\nAuthorization: + SharedKey storagename:jkvdU4RrSihIdLoFIrKpIAHL35ufShV1SuEuuQ9nwKc=\r\n\r\n\r\n--===============0810737550396990479==--\r\n" + headers: + Content-Length: + - '1878' + Content-Type: + - multipart/mixed; boundary================0810737550396990479== + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:40 GMT + x-ms-version: + - '2020-10-02' + method: POST + uri: https://storagename.blob.core.windows.net/fs2932d170b?restype=container&comp=batch + response: + body: + string: "--batchresponse_b2444cdd-2471-4064-b547-0b4a479a9930\r\nContent-Type: + application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: a4b36340-d01e-006e-65f2-bf18bb1ea404\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: b967bb2c-2be5-11ec-b0c2-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_b2444cdd-2471-4064-b547-0b4a479a9930\r\nContent-Type: + application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: a4b36340-d01e-006e-65f2-bf18bb1ea406\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: b967bb2d-2be5-11ec-82c4-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_b2444cdd-2471-4064-b547-0b4a479a9930\r\nContent-Type: + application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: a4b36340-d01e-006e-65f2-bf18bb1ea407\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: b967bb2e-2be5-11ec-baf6-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_b2444cdd-2471-4064-b547-0b4a479a9930\r\nContent-Type: + application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: a4b36340-d01e-006e-65f2-bf18bb1ea408\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: b967bb2f-2be5-11ec-8e58-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_b2444cdd-2471-4064-b547-0b4a479a9930\r\nContent-Type: + application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: a4b36340-d01e-006e-65f2-bf18bb1ea409\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: b967bb30-2be5-11ec-b1c5-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_b2444cdd-2471-4064-b547-0b4a479a9930--" + headers: + content-type: multipart/mixed; boundary=batchresponse_b2444cdd-2471-4064-b547-0b4a479a9930 + date: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.blob.core.windows.net/fs2932d170b?restype=container&comp=batch +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:40 GMT + x-ms-version: + - '2020-10-02' + method: DELETE + uri: https://storagename.blob.core.windows.net/fs2932d170b?restype=container + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:39 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.blob.core.windows.net/fs2932d170b?restype=container +version: 1 diff --git a/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_with_failed_subrequest.yaml b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_with_failed_subrequest.yaml new file mode 100644 index 000000000000..0f59ef7cadca --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/tests/recordings/test_file_system_async.test_delete_files_with_failed_subrequest.yaml @@ -0,0 +1,506 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:18 GMT + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.blob.core.windows.net/fs13fa31a04?restype=container + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:18 GMT + etag: '"0x8D98E0990AFACF5"' + last-modified: Wed, 13 Oct 2021 05:23:18 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.blob.core.windows.net/fs13fa31a04?restype=container +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:18 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file1?resource=file + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:18 GMT + etag: '"0x8D98E0991244A32"' + last-modified: Wed, 13 Oct 2021 05:23:19 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/file1?resource=file +- request: + body: hello world + headers: + Accept: + - application/json + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file1?action=append&position=0 + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:18 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/file1?action=append&position=0 +- request: + body: null + headers: + Accept: + - application/json + If-Match: + - '"0x8D98E0991244A32"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file1?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:18 GMT + etag: '"0x8D98E09913AEDE8"' + last-modified: Wed, 13 Oct 2021 05:23:19 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'false' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/file1?action=flush&position=11&close=true +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file2?resource=file + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:18 GMT + etag: '"0x8D98E09914C014F"' + last-modified: Wed, 13 Oct 2021 05:23:19 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/file2?resource=file +- request: + body: hello world + headers: + Accept: + - application/json + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file2?action=append&position=0 + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:18 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/file2?action=append&position=0 +- request: + body: null + headers: + Accept: + - application/json + If-Match: + - '"0x8D98E09914C014F"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file2?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:18 GMT + etag: '"0x8D98E099162D313"' + last-modified: Wed, 13 Oct 2021 05:23:19 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'false' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/file2?action=flush&position=11&close=true +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs13fa31a04/file2 + response: + body: + string: '' + headers: + accept-ranges: bytes + content-length: '11' + content-type: application/octet-stream + date: Wed, 13 Oct 2021 05:23:19 GMT + etag: '"0x8D98E099162D313"' + last-modified: Wed, 13 Oct 2021 05:23:19 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin + x-ms-access-tier: Hot + x-ms-access-tier-inferred: 'true' + x-ms-blob-type: BlockBlob + x-ms-creation-time: Wed, 13 Oct 2021 05:23:19 GMT + x-ms-group: $superuser + x-ms-lease-state: available + x-ms-lease-status: unlocked + x-ms-owner: $superuser + x-ms-permissions: rw-r----- + x-ms-resource-type: file + x-ms-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.blob.core.windows.net/fs13fa31a04/file2 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file3?resource=file + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:19 GMT + etag: '"0x8D98E09917E33A6"' + last-modified: Wed, 13 Oct 2021 05:23:19 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/file3?resource=file +- request: + body: hello world + headers: + Accept: + - application/json + Content-Length: + - '11' + Content-Type: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file3?action=append&position=0 + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:19 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/file3?action=append&position=0 +- request: + body: null + headers: + Accept: + - application/json + If-Match: + - '"0x8D98E09917E33A6"' + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-version: + - '2020-10-02' + method: PATCH + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/file3?action=flush&position=11&close=true + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:19 GMT + etag: '"0x8D98E0991948944"' + last-modified: Wed, 13 Oct 2021 05:23:19 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'false' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/file3?action=flush&position=11&close=true +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:19 GMT + x-ms-version: + - '2020-10-02' + method: HEAD + uri: https://storagename.blob.core.windows.net/fs13fa31a04/file3 + response: + body: + string: '' + headers: + accept-ranges: bytes + content-length: '11' + content-type: application/octet-stream + date: Wed, 13 Oct 2021 05:23:19 GMT + etag: '"0x8D98E0991948944"' + last-modified: Wed, 13 Oct 2021 05:23:19 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin + x-ms-access-tier: Hot + x-ms-access-tier-inferred: 'true' + x-ms-blob-type: BlockBlob + x-ms-creation-time: Wed, 13 Oct 2021 05:23:19 GMT + x-ms-group: $superuser + x-ms-lease-state: available + x-ms-lease-status: unlocked + x-ms-owner: $superuser + x-ms-permissions: rw-r----- + x-ms-resource-type: file + x-ms-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 200 + message: OK + url: https://xiafuhns.blob.core.windows.net/fs13fa31a04/file3 +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:20 GMT + x-ms-properties: + - '' + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.dfs.core.windows.net/fs13fa31a04/dir1%2Ffile4?resource=file + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:19 GMT + etag: '"0x8D98E0991CF03FC"' + last-modified: Wed, 13 Oct 2021 05:23:20 GMT + server: Windows-Azure-HDFS/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://xiafuhns.dfs.core.windows.net/fs13fa31a04/dir1%2Ffile4?resource=file +- request: + body: "--===============6780461154596971440==\r\nContent-Type: application/http\r\nContent-Transfer-Encoding: + binary\r\nContent-ID: 0\r\n\r\nDELETE /fs13fa31a04/file1? HTTP/1.1\r\nx-ms-date: + Wed, 13 Oct 2021 05:23:20 GMT\r\nx-ms-client-request-id: ada21de4-2be5-11ec-99c7-001a7dda7113\r\nAuthorization: + SharedKey storagename:GxN47YnUEaC9eyUfs5FihrbBMkN07qIU0fvisCDYMVY=\r\n\r\n\r\n--===============6780461154596971440==\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 1\r\n\r\nDELETE + /fs13fa31a04/file2? HTTP/1.1\r\nIf-Match: \"0x8D98E099162D313\"\r\nx-ms-date: + Wed, 13 Oct 2021 05:23:20 GMT\r\nx-ms-client-request-id: ada21de5-2be5-11ec-b3fd-001a7dda7113\r\nAuthorization: + SharedKey storagename:eouPVVvtHMbneV4UHA8xqQqnTlr43Nx7w2IkF7R0QkQ=\r\n\r\n\r\n--===============6780461154596971440==\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 2\r\n\r\nDELETE + /fs13fa31a04/file3? HTTP/1.1\r\nIf-Match: \"0x8D98E0991948944\"\r\nx-ms-date: + Wed, 13 Oct 2021 05:23:20 GMT\r\nx-ms-client-request-id: ada21de6-2be5-11ec-a965-001a7dda7113\r\nAuthorization: + SharedKey storagename:aLVZ7i3twkh2CA/28uY8vOcQM2TPSlCOt3MjVXWa5No=\r\n\r\n\r\n--===============6780461154596971440==\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 3\r\n\r\nDELETE + /fs13fa31a04/dir1? HTTP/1.1\r\nx-ms-date: Wed, 13 Oct 2021 05:23:20 GMT\r\nx-ms-client-request-id: + ada21de7-2be5-11ec-a2d0-001a7dda7113\r\nAuthorization: SharedKey storagename:dh+jBOfyUgNnt8qVjLGcpEio/omPkizijtCuz4revC0=\r\n\r\n\r\n--===============6780461154596971440==\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 4\r\n\r\nDELETE + /fs13fa31a04/dir8? HTTP/1.1\r\nx-ms-date: Wed, 13 Oct 2021 05:23:20 GMT\r\nx-ms-client-request-id: + ada21de8-2be5-11ec-838e-001a7dda7113\r\nAuthorization: SharedKey storagename:dg6ajybRQyJugzEADYEEdbdXx17d4R1cHKmdvl+V8CQ=\r\n\r\n\r\n--===============6780461154596971440==--\r\n" + headers: + Content-Length: + - '1847' + Content-Type: + - multipart/mixed; boundary================6780461154596971440== + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:20 GMT + x-ms-version: + - '2020-10-02' + method: POST + uri: https://storagename.blob.core.windows.net/fs13fa31a04?restype=container&comp=batch + response: + body: + string: "--batchresponse_63d5fb97-ad91-4e82-91a8-1774e8abc28b\r\nContent-Type: + application/http\r\nContent-ID: 0\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: 322270d1-d01e-0033-6bf2-bf123f1e0841\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: ada21de4-2be5-11ec-99c7-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_63d5fb97-ad91-4e82-91a8-1774e8abc28b\r\nContent-Type: + application/http\r\nContent-ID: 1\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: 322270d1-d01e-0033-6bf2-bf123f1e0843\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: ada21de5-2be5-11ec-b3fd-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_63d5fb97-ad91-4e82-91a8-1774e8abc28b\r\nContent-Type: + application/http\r\nContent-ID: 2\r\n\r\nHTTP/1.1 202 Accepted\r\nx-ms-delete-type-permanent: + true\r\nx-ms-request-id: 322270d1-d01e-0033-6bf2-bf123f1e0844\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: ada21de6-2be5-11ec-a965-001a7dda7113\r\nServer: + Windows-Azure-Blob/1.0\r\n\r\n--batchresponse_63d5fb97-ad91-4e82-91a8-1774e8abc28b\r\nContent-Type: + application/http\r\nContent-ID: 3\r\n\r\nHTTP/1.1 409 The directory involved + in this operation is not empty\r\nx-ms-error-code: DirectoryNotEmpty\r\nx-ms-request-id: + 322270d1-d01e-0033-6bf2-bf123f1e0845\r\nx-ms-version: 2020-10-02\r\nx-ms-client-request-id: + ada21de7-2be5-11ec-a2d0-001a7dda7113\r\nContent-Length: 240\r\nContent-Type: + application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\uFEFF\nDirectoryNotEmptyThe directory + involved in this operation is not empty\nRequestId:322270d1-d01e-0033-6bf2-bf123f1e0845\nTime:2021-10-13T05:23:20.4644470Z\r\n--batchresponse_63d5fb97-ad91-4e82-91a8-1774e8abc28b\r\nContent-Type: + application/http\r\nContent-ID: 4\r\n\r\nHTTP/1.1 404 The specified blob does + not exist.\r\nx-ms-error-code: BlobNotFound\r\nx-ms-request-id: 322270d1-d01e-0033-6bf2-bf123f1e0846\r\nx-ms-version: + 2020-10-02\r\nx-ms-client-request-id: ada21de8-2be5-11ec-838e-001a7dda7113\r\nContent-Length: + 216\r\nContent-Type: application/xml\r\nServer: Windows-Azure-Blob/1.0\r\n\r\n\uFEFF\nBlobNotFoundThe + specified blob does not exist.\nRequestId:322270d1-d01e-0033-6bf2-bf123f1e0846\nTime:2021-10-13T05:23:20.4584428Z\r\n--batchresponse_63d5fb97-ad91-4e82-91a8-1774e8abc28b--" + headers: + content-type: multipart/mixed; boundary=batchresponse_63d5fb97-ad91-4e82-91a8-1774e8abc28b + date: Wed, 13 Oct 2021 05:23:20 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.blob.core.windows.net/fs13fa31a04?restype=container&comp=batch +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-dfs/12.5.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Wed, 13 Oct 2021 05:23:20 GMT + x-ms-version: + - '2020-10-02' + method: DELETE + uri: https://storagename.blob.core.windows.net/fs13fa31a04?restype=container + response: + body: + string: '' + headers: + content-length: '0' + date: Wed, 13 Oct 2021 05:23:20 GMT + server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://xiafuhns.blob.core.windows.net/fs13fa31a04?restype=container +version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/_shared/__init__.py b/sdk/storage/azure-storage-file-datalake/tests/settings/__init__.py similarity index 100% rename from sdk/storage/azure-storage-file-share/tests/_shared/__init__.py rename to sdk/storage/azure-storage-file-datalake/tests/settings/__init__.py diff --git a/sdk/storage/azure-storage-blob/tests/_shared/settings_fake.py b/sdk/storage/azure-storage-file-datalake/tests/settings/settings_fake.py similarity index 63% rename from sdk/storage/azure-storage-blob/tests/_shared/settings_fake.py rename to sdk/storage/azure-storage-file-datalake/tests/settings/settings_fake.py index 7dba7c692a84..f6a05f3e570d 100644 --- a/sdk/storage/azure-storage-blob/tests/_shared/settings_fake.py +++ b/sdk/storage/azure-storage-file-datalake/tests/settings/settings_fake.py @@ -4,14 +4,15 @@ # license information. # -------------------------------------------------------------------------- -STORAGE_ACCOUNT_NAME = "" -STORAGE_ACCOUNT_KEY = "" +DATALAKE_STORAGE_ACCOUNT_NAME = "fakename" +DATALAKE_STORAGE_ACCOUNT_KEY = "fakekey" + +TENANT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_SECRET = "00000000-0000-0000-0000-000000000000" ACCOUNT_URL_SUFFIX = 'core.windows.net' RUN_IN_LIVE = "False" SKIP_LIVE_RECORDING = "True" PROTOCOL = "https" - -ENABLE_LOGGING = True - diff --git a/sdk/storage/azure-storage-file-datalake/tests/settings/testcase.py b/sdk/storage/azure-storage-file-datalake/tests/settings/testcase.py new file mode 100644 index 000000000000..10bf1c7af05d --- /dev/null +++ b/sdk/storage/azure-storage-file-datalake/tests/settings/testcase.py @@ -0,0 +1,45 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from __future__ import division + +import functools +import os.path + +from devtools_testutils import PowerShellPreparer, ACCOUNT_FAKE_KEY + +try: + from cStringIO import StringIO # Python 2 +except ImportError: + from io import StringIO + +try: + # Running locally - use configuration in settings_real.py + from .settings_real import * +except ImportError: + # Running on the pipeline - use fake values in order to create rg, etc. + from .settings_fake import * + + +LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' +LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' +os.environ['DATALAKE_STORAGE_ACCOUNT_NAME'] = os.environ.get('DATALAKE_STORAGE_ACCOUNT_NAME', None) or DATALAKE_STORAGE_ACCOUNT_NAME +os.environ['DATALAKE_STORAGE_ACCOUNT_KEY'] = os.environ.get('DATALAKE_STORAGE_ACCOUNT_KEY', None) or DATALAKE_STORAGE_ACCOUNT_KEY + +os.environ['AZURE_TEST_RUN_LIVE'] = os.environ.get('AZURE_TEST_RUN_LIVE', None) or RUN_IN_LIVE +os.environ['AZURE_SKIP_LIVE_RECORDING'] = os.environ.get('AZURE_SKIP_LIVE_RECORDING', None) or SKIP_LIVE_RECORDING +os.environ['PROTOCOL'] = PROTOCOL +os.environ['ACCOUNT_URL_SUFFIX'] = ACCOUNT_URL_SUFFIX + +os.environ['STORAGE_TENANT_ID'] = os.environ.get('STORAGE_TENANT_ID', None) or TENANT_ID +os.environ['STORAGE_CLIENT_ID'] = os.environ.get('STORAGE_CLIENT_ID', None) or CLIENT_ID +os.environ['STORAGE_CLIENT_SECRET'] = os.environ.get('STORAGE_CLIENT_SECRET', None) or CLIENT_SECRET + +DataLakePreparer = functools.partial( + PowerShellPreparer, "storage", + datalake_storage_account_name="storagename", + datalake_storage_account_key=ACCOUNT_FAKE_KEY +) diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_datalake_service_client.py b/sdk/storage/azure-storage-file-datalake/tests/test_datalake_service_client.py index 080c121e4971..299408b4c2c1 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_datalake_service_client.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_datalake_service_client.py @@ -11,9 +11,9 @@ from azure.storage.filedatalake import DataLakeServiceClient -from testcase import ( - StorageTestCase, - DataLakePreparer) + +from settings.testcase import DataLakePreparer +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ from azure.storage.filedatalake._models import AnalyticsLogging, Metrics, RetentionPolicy, \ @@ -24,7 +24,7 @@ class DatalakeServiceTest(StorageTestCase): def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.dsc = DataLakeServiceClient(url, account_key) self.config = self.dsc._config diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_datalake_service_client_async.py b/sdk/storage/azure-storage-file-datalake/tests/test_datalake_service_client_async.py index a5227fb090fc..593ceeb11e84 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_datalake_service_client_async.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_datalake_service_client_async.py @@ -12,8 +12,8 @@ from azure.storage.filedatalake.aio import DataLakeServiceClient -from asynctestcase import StorageTestCase -from testcase import DataLakePreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase as StorageTestCase +from settings.testcase import DataLakePreparer # ------------------------------------------------------------------------------ from azure.storage.filedatalake._models import AnalyticsLogging, Metrics, RetentionPolicy, \ @@ -24,7 +24,7 @@ class DatalakeServiceTest(StorageTestCase): def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.dsc = DataLakeServiceClient(url, credential=account_key, logging_enable=True) self.config = self.dsc._config diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_directory.py b/sdk/storage/azure-storage-file-datalake/tests/test_directory.py index f92fd49a1745..83060de9e10e 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_directory.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_directory.py @@ -18,10 +18,8 @@ from azure.storage.filedatalake._models import AccessControlChangeResult, AccessControlChangeCounters from azure.storage.filedatalake._serialize import _SUPPORTED_API_VERSIONS -from testcase import ( - StorageTestCase, - - DataLakePreparer) +from settings.testcase import DataLakePreparer +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ TEST_DIRECTORY_PREFIX = 'directory' @@ -35,7 +33,7 @@ class DirectoryTest(StorageTestCase): def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.dsc = DataLakeServiceClient(url, credential=account_key, logging_enable=True) self.config = self.dsc._config @@ -298,7 +296,7 @@ def test_get_access_control_with_match_conditions(self, datalake_storage_account response = directory_client.get_access_control(etag=resp['etag'], match_condition=MatchConditions.IfNotModified) # Assert self.assertIsNotNone(response) - self.assertEquals(response['permissions'], 'rwxrwxrwx') + self.assertEqual(response['permissions'], 'rwxrwxrwx') @DataLakePreparer() def test_set_access_control_recursive(self, datalake_storage_account_name, datalake_storage_account_key): @@ -939,7 +937,7 @@ def test_rename_to_an_existing_directory_in_another_file_system(self, datalake_s with self.assertRaises(HttpResponseError): source_directory_client.get_directory_properties() - self.assertEquals(res.url, destination_directory_client.url) + self.assertEqual(res.url, destination_directory_client.url) @DataLakePreparer() def test_rename_with_none_existing_destination_condition_and_source_unmodified_condition(self, datalake_storage_account_name, datalake_storage_account_key): @@ -968,7 +966,7 @@ def test_rename_with_none_existing_destination_condition_and_source_unmodified_c with self.assertRaises(HttpResponseError): source_directory_client.get_directory_properties() - self.assertEquals(non_existing_dir_name, res.path_name) + self.assertEqual(non_existing_dir_name, res.path_name) @DataLakePreparer() def test_rename_to_an_non_existing_directory_in_another_file_system(self, datalake_storage_account_name, datalake_storage_account_key): @@ -992,7 +990,7 @@ def test_rename_to_an_non_existing_directory_in_another_file_system(self, datala with self.assertRaises(HttpResponseError): source_directory_client.get_directory_properties() - self.assertEquals(non_existing_dir_name, res.path_name) + self.assertEqual(non_existing_dir_name, res.path_name) @DataLakePreparer() def test_rename_directory_to_non_empty_directory(self, datalake_storage_account_name, datalake_storage_account_key): diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_directory_async.py b/sdk/storage/azure-storage-file-datalake/tests/test_directory_async.py index 75b6d0c3d5e9..b8b59d19fc6f 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_directory_async.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_directory_async.py @@ -23,13 +23,9 @@ from azure.storage.filedatalake import AccessControlChangeResult, AccessControlChangeCounters from azure.storage.filedatalake._serialize import _SUPPORTED_API_VERSIONS -from asynctestcase import ( - StorageTestCase, -) - +from devtools_testutils.storage.aio import AsyncStorageTestCase as StorageTestCase +from settings.testcase import DataLakePreparer # ------------------------------------------------------------------------------ -from testcase import DataLakePreparer - TEST_DIRECTORY_PREFIX = 'directory' REMOVE_ACL = "mask," + "default:user,default:group," + \ "user:ec3595d6-2c17-4696-8caa-7e139758d24a,group:ec3595d6-2c17-4696-8caa-7e139758d24a," + \ @@ -53,7 +49,7 @@ async def send(self, request, **config): class DirectoryTest(StorageTestCase): async def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.dsc = DataLakeServiceClient(url, credential=account_key, transport=AiohttpTestTransport()) self.config = self.dsc._config @@ -319,7 +315,7 @@ async def test_get_access_control_with_match_conditions_async(self, datalake_sto match_condition=MatchConditions.IfNotModified) # Assert self.assertIsNotNone(response) - self.assertEquals(response['permissions'], 'rwxrwxrwx') + self.assertEqual(response['permissions'], 'rwxrwxrwx') @DataLakePreparer() async def test_set_access_control_recursive_async(self, datalake_storage_account_name, datalake_storage_account_key): @@ -904,7 +900,7 @@ async def test_rename_to_an_existing_directory_in_another_file_system_async(self with self.assertRaises(HttpResponseError): await source_directory_client.get_directory_properties() - self.assertEquals(res.url, destination_directory_client.url) + self.assertEqual(res.url, destination_directory_client.url) @DataLakePreparer() async def test_rename_with_none_existing_destination_condition_and_source_unmodified_condition_async(self, datalake_storage_account_name, datalake_storage_account_key): @@ -935,7 +931,7 @@ async def test_rename_with_none_existing_destination_condition_and_source_unmodi with self.assertRaises(HttpResponseError): await source_directory_client.get_directory_properties() - self.assertEquals(non_existing_dir_name, res.path_name) + self.assertEqual(non_existing_dir_name, res.path_name) @DataLakePreparer() async def test_rename_to_an_non_existing_directory_in_another_file_system_async(self, datalake_storage_account_name, datalake_storage_account_key): @@ -959,7 +955,7 @@ async def test_rename_to_an_non_existing_directory_in_another_file_system_async( with self.assertRaises(HttpResponseError): await source_directory_client.get_directory_properties() - self.assertEquals(non_existing_dir_name, res.path_name) + self.assertEqual(non_existing_dir_name, res.path_name) @DataLakePreparer() async def test_rename_directory_to_non_empty_directory_async(self, datalake_storage_account_name, datalake_storage_account_key): diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file.py b/sdk/storage/azure-storage-file-datalake/tests/test_file.py index fabf4f83de23..b5ad8f64e5d1 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file.py @@ -19,9 +19,8 @@ DataLakeFileClient, FileSystemClient, DataLakeDirectoryClient, FileSasPermissions, generate_file_system_sas, \ FileSystemSasPermissions from azure.storage.filedatalake import DataLakeServiceClient -from testcase import ( - StorageTestCase, - DataLakePreparer) +from settings.testcase import DataLakePreparer +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ TEST_DIRECTORY_PREFIX = 'directory' @@ -32,7 +31,7 @@ class FileTest(StorageTestCase): def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.dsc = DataLakeServiceClient(url, credential=account_key, logging_enable=True) self.config = self.dsc._config @@ -398,7 +397,7 @@ def test_read_file_with_user_delegation_key(self, datalake_storage_account_name, # Get user delegation key token_credential = self.generate_oauth_token() - service_client = DataLakeServiceClient(self._get_account_url(datalake_storage_account_name), credential=token_credential, logging_enable=True) + service_client = DataLakeServiceClient(self.account_url(datalake_storage_account_name, 'dfs'), credential=token_credential, logging_enable=True) user_delegation_key = service_client.get_user_delegation_key(datetime.utcnow(), datetime.utcnow() + timedelta(hours=1)) @@ -412,7 +411,7 @@ def test_read_file_with_user_delegation_key(self, datalake_storage_account_name, ) # doanload the data and make sure it is the same as uploaded data - new_file_client = DataLakeFileClient(self._get_account_url(datalake_storage_account_name), + new_file_client = DataLakeFileClient(self.account_url(datalake_storage_account_name, 'dfs'), file_client.file_system_name, file_client.path_name, credential=sas_token, logging_enable=True) @@ -434,7 +433,7 @@ def test_set_acl_with_user_delegation_key(self, datalake_storage_account_name, d # Get user delegation key token_credential = self.generate_oauth_token() - service_client = DataLakeServiceClient(self._get_account_url(datalake_storage_account_name), credential=token_credential) + service_client = DataLakeServiceClient(self.account_url(datalake_storage_account_name, 'dfs'), credential=token_credential) user_delegation_key = service_client.get_user_delegation_key(datetime.utcnow(), datetime.utcnow() + timedelta(hours=1)) @@ -449,7 +448,7 @@ def test_set_acl_with_user_delegation_key(self, datalake_storage_account_name, d ) # doanload the data and make sure it is the same as uploaded data - new_file_client = DataLakeFileClient(self._get_account_url(datalake_storage_account_name), + new_file_client = DataLakeFileClient(self.account_url(datalake_storage_account_name, 'dfs'), file_client.file_system_name, file_client.path_name, credential=sas_token) @@ -477,7 +476,7 @@ def test_preauthorize_user_with_user_delegation_key(self, datalake_storage_accou # Get user delegation key token_credential = self.generate_oauth_token() - service_client = DataLakeServiceClient(self._get_account_url(datalake_storage_account_name), credential=token_credential) + service_client = DataLakeServiceClient(self.account_url(datalake_storage_account_name, 'dfs'), credential=token_credential) user_delegation_key = service_client.get_user_delegation_key(datetime.utcnow(), datetime.utcnow() + timedelta(hours=1)) @@ -493,7 +492,7 @@ def test_preauthorize_user_with_user_delegation_key(self, datalake_storage_accou ) # doanload the data and make sure it is the same as uploaded data - new_file_client = DataLakeFileClient(self._get_account_url(datalake_storage_account_name), + new_file_client = DataLakeFileClient(self.account_url(datalake_storage_account_name, 'dfs'), file_client.file_system_name, file_client.path_name, credential=sas_token) diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file_async.py b/sdk/storage/azure-storage-file-datalake/tests/test_file_async.py index 4ade0e6ffc90..6f0572ba96c5 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file_async.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file_async.py @@ -20,11 +20,9 @@ ResourceTypes, AccountSasPermissions, FileSasPermissions from azure.storage.filedatalake.aio import DataLakeServiceClient, FileSystemClient, DataLakeDirectoryClient, \ DataLakeFileClient -from asynctestcase import ( - StorageTestCase) - +from devtools_testutils.storage.aio import AsyncStorageTestCase as StorageTestCase +from settings.testcase import DataLakePreparer # ------------------------------------------------------------------------------ -from testcase import DataLakePreparer TEST_DIRECTORY_PREFIX = 'directory' TEST_FILE_PREFIX = 'file' @@ -36,7 +34,7 @@ class FileTest(StorageTestCase): async def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.dsc = DataLakeServiceClient(url, credential=account_key) self.config = self.dsc._config @@ -417,7 +415,7 @@ async def test_read_file_with_user_delegation_key_async(self, datalake_storage_a # Get user delegation key token_credential = self.generate_oauth_token() - service_client = DataLakeServiceClient(self._get_oauth_account_url(datalake_storage_account_name), credential=token_credential) + service_client = DataLakeServiceClient(self.account_url(datalake_storage_account_name, 'dfs'), credential=token_credential) user_delegation_key = await service_client.get_user_delegation_key(datetime.utcnow(), datetime.utcnow() + timedelta(hours=1)) @@ -431,7 +429,7 @@ async def test_read_file_with_user_delegation_key_async(self, datalake_storage_a ) # doanload the data and make sure it is the same as uploaded data - new_file_client = DataLakeFileClient(self._get_account_url(datalake_storage_account_name), + new_file_client = DataLakeFileClient(self.account_url(datalake_storage_account_name, 'dfs'), file_client.file_system_name, file_client.path_name, credential=sas_token) diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py b/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py index 4079dad0db7e..39a511c0bb06 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file_system.py @@ -16,10 +16,8 @@ from azure.storage.filedatalake import DataLakeServiceClient, PublicAccess, generate_account_sas, ResourceTypes, \ AccountSasPermissions -from testcase import ( - StorageTestCase, - DataLakePreparer) - +from settings.testcase import DataLakePreparer +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ from azure.storage.filedatalake import AccessPolicy, FileSystemSasPermissions from azure.storage.filedatalake._list_paths_helper import DirectoryPrefix @@ -31,7 +29,7 @@ class FileSystemTest(StorageTestCase): def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.dsc = DataLakeServiceClient(url, account_key) self.config = self.dsc._config self.test_file_systems = [] @@ -53,7 +51,10 @@ def _get_file_system_reference(self, prefix=TEST_FILE_SYSTEM_PREFIX): return file_system_name def _create_file_system(self, file_system_prefix=TEST_FILE_SYSTEM_PREFIX): - return self.dsc.create_file_system(self._get_file_system_reference(prefix=file_system_prefix)) + try: + return self.dsc.create_file_system(self._get_file_system_reference(prefix=file_system_prefix)) + except: + pass # --Helpers----------------------------------------------------------------- @@ -603,6 +604,105 @@ def test_undelete_file_with_version_id(self, datalake_storage_account_name, data restored_file_client = file_system_client._undelete_path(file_path, resp['deletion_id']) resp = restored_file_client.get_file_properties() self.assertIsNotNone(resp) + + @DataLakePreparer() + def test_delete_files_simple_no_raise(self, datalake_storage_account_name, datalake_storage_account_key): + # Arrange + self._setUp(datalake_storage_account_name, datalake_storage_account_key) + filesystem = self._create_file_system("fs1") + data = b'hello world' + + try: + # create file1 + filesystem.get_file_client('file1').upload_data(data, overwrite=True) + + # create file2 + file2 = filesystem.get_file_client('file2') + file2.upload_data(data, overwrite=True) + file2_properties = file2.get_file_properties() + + # create file3 + file3 = filesystem.get_file_client('file3') + file3.upload_data(data, overwrite=True) + file3_etag = file3.get_file_properties().etag + + # create dir1 + # empty directory can be deleted using delete_files + filesystem.get_directory_client('dir1').create_directory(), + + # create dir2 + dir2 = filesystem.get_directory_client('dir2') + dir2.create_directory() + dir2_properties = dir2.get_directory_properties() + + except: + pass + + # Act + response = filesystem.delete_files( + 'file1', + file2_properties, + {'name': 'file3', 'etag': file3_etag}, + 'dir1', + dir2_properties, + raise_on_any_failure=False + ) + assert len(response) == 5 + assert response[0].status_code == 202 + assert response[1].status_code == 202 + assert response[2].status_code == 202 + assert response[3].status_code == 202 + assert response[4].status_code == 202 + + @DataLakePreparer() + def test_delete_files_with_failed_subrequest(self, datalake_storage_account_name, datalake_storage_account_key): + # Arrange + self._setUp(datalake_storage_account_name, datalake_storage_account_key) + filesystem = self._create_file_system("fs2") + data = b'hello world' + + try: + # create file1 + filesystem.get_file_client('file1').upload_data(data, overwrite=True) + + # create file2 + file2 = filesystem.get_file_client('file2') + file2.upload_data(data, overwrite=True) + file2_properties = file2.get_file_properties() + + # create file3 + file3 = filesystem.get_file_client('file3') + file3.upload_data(data, overwrite=True) + file3_etag = file3.get_file_properties().etag + + # create dir1 + dir1 = filesystem.get_directory_client('dir1') + dir1.create_file("file4") + + # create dir2 + dir2 = filesystem.get_directory_client('dir2') + dir2.create_directory() + dir2_properties = dir2.get_directory_properties() + + except: + pass + + # Act + response = filesystem.delete_files( + 'file1', + file2_properties, + {'name': 'file3', 'etag': file3_etag}, + 'dir1', # dir1 is not empty + 'dir8', # dir 8 doesn't exist + raise_on_any_failure=False + ) + assert len(response) == 5 + assert response[0].status_code == 202 + assert response[1].status_code == 202 + assert response[2].status_code == 202 + assert response[3].status_code == 409 + assert response[4].status_code == 404 + # ------------------------------------------------------------------------------ if __name__ == '__main__': unittest.main() diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_file_system_async.py b/sdk/storage/azure-storage-file-datalake/tests/test_file_system_async.py index c349dcb504ad..e500c60c649f 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_file_system_async.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_file_system_async.py @@ -23,12 +23,12 @@ from azure.storage.filedatalake import AccessPolicy, DirectorySasPermissions, generate_file_system_sas from azure.storage.filedatalake.aio import DataLakeServiceClient, DataLakeDirectoryClient, FileSystemClient from azure.storage.filedatalake import PublicAccess -from asynctestcase import ( - StorageTestCase) +from azure.storage.filedatalake import FileSystemSasPermissions + +from devtools_testutils.storage.aio import AsyncStorageTestCase as StorageTestCase +from settings.testcase import DataLakePreparer # ------------------------------------------------------------------------------ -from azure.storage.filedatalake import FileSystemSasPermissions -from testcase import DataLakePreparer TEST_FILE_SYSTEM_PREFIX = 'filesystem' @@ -49,7 +49,7 @@ async def send(self, request, **config): class FileSystemTest(StorageTestCase): def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.dsc = DataLakeServiceClient(url, credential=account_key, transport=AiohttpTestTransport(), logging_enable=True) self.config = self.dsc._config @@ -76,6 +76,11 @@ def _get_file_system_reference(self, prefix=TEST_FILE_SYSTEM_PREFIX): async def _create_file_system(self, file_system_prefix=TEST_FILE_SYSTEM_PREFIX): return await self.dsc.create_file_system(self._get_file_system_reference(prefix=file_system_prefix)) + async def _to_list(self, async_iterator): + result = [] + async for item in async_iterator: + result.append(item) + return result # --Helpers----------------------------------------------------------------- @DataLakePreparer() @@ -639,7 +644,7 @@ async def test_get_access_control_using_delegation_sas_async( self, datalake_storage_account_name, datalake_storage_account_key): self._setUp(datalake_storage_account_name, datalake_storage_account_key) - url = self._get_account_url(datalake_storage_account_name) + url = self.account_url(datalake_storage_account_name, 'dfs') token_credential = self.generate_oauth_token() dsc = DataLakeServiceClient(url, token_credential, logging_enable=True) file_system_name = self._get_file_system_reference() @@ -675,7 +680,7 @@ async def test_get_access_control_using_delegation_sas_async( async def test_list_paths_using_file_sys_delegation_sas_async( self, datalake_storage_account_name, datalake_storage_account_key): self._setUp(datalake_storage_account_name, datalake_storage_account_key) - url = self._get_account_url(datalake_storage_account_name) + url = self.account_url(datalake_storage_account_name, 'dfs') token_credential = self.generate_oauth_token() dsc = DataLakeServiceClient(url, token_credential) file_system_name = self._get_file_system_reference() @@ -752,6 +757,100 @@ async def test_undelete_file_with_version_id(self, datalake_storage_account_name resp = await restored_file_client.get_file_properties() self.assertIsNotNone(resp) + @DataLakePreparer() + async def test_delete_files_simple_no_raise(self, datalake_storage_account_name, datalake_storage_account_key): + # Arrange + self._setUp(datalake_storage_account_name, datalake_storage_account_key) + filesystem = await self._create_file_system("fs2") + data = b'hello world' + + try: + # create file1 + await filesystem.get_file_client('file1').upload_data(data, overwrite=True) + + # create file2, then pass file properties in batch delete later + file2 = filesystem.get_file_client('file2') + await file2.upload_data(data, overwrite=True) + file2_properties = await file2.get_file_properties() + + # create file3 and batch delete it later only etag matches this file3 etag + file3 = filesystem.get_file_client('file3') + await file3.upload_data(data, overwrite=True) + file3_props = await file3.get_file_properties() + file3_etag = file3_props.etag + + # create dir1 + # empty directory can be deleted using delete_files + await filesystem.get_directory_client('dir1').create_directory(), + + # create dir2, then pass directory properties in batch delete later + dir2 = filesystem.get_directory_client('dir2') + await dir2.create_directory() + dir2_properties = await dir2.get_directory_properties() + + except: + pass + + # Act + response = await self._to_list(await filesystem.delete_files( + 'file1', + file2_properties, + {'name': 'file3', 'etag': file3_etag}, + 'dir1', + dir2_properties, + raise_on_any_failure=False + )) + assert len(response) == 5 + assert response[0].status_code == 202 + assert response[1].status_code == 202 + assert response[2].status_code == 202 + assert response[3].status_code == 202 + assert response[4].status_code == 202 + + @DataLakePreparer() + async def test_delete_files_with_failed_subrequest(self, datalake_storage_account_name, datalake_storage_account_key): + # Arrange + self._setUp(datalake_storage_account_name, datalake_storage_account_key) + filesystem = await self._create_file_system("fs1") + data = b'hello world' + + try: + # create file1 + await filesystem.get_file_client('file1').upload_data(data, overwrite=True) + + # create file2 + file2 = filesystem.get_file_client('file2') + await file2.upload_data(data, overwrite=True) + file2_properties = await file2.get_file_properties() + + # create file3 + file3 = filesystem.get_file_client('file3') + await file3.upload_data(data, overwrite=True) + file3_props = await file3.get_file_properties() + file3_etag = file3_props.etag + + # create dir1 + dir1 = filesystem.get_directory_client('dir1') + await dir1.create_file("file4") + except: + pass + + # Act + response = await self._to_list(await filesystem.delete_files( + 'file1', + file2_properties, + {'name': 'file3', 'etag': file3_etag}, + 'dir1', # dir1 is not empty + 'dir8', # dir 8 doesn't exist + raise_on_any_failure=False + )) + assert len(response) == 5 + assert response[0].status_code == 202 + assert response[1].status_code == 202 + assert response[2].status_code == 202 + assert response[3].status_code == 409 + assert response[4].status_code == 404 + # ------------------------------------------------------------------------------ if __name__ == '__main__': unittest.main() diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_large_file.py b/sdk/storage/azure-storage-file-datalake/tests/test_large_file.py index 89afa0ab8620..1c6db679536c 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_large_file.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_large_file.py @@ -15,9 +15,8 @@ from azure.core.exceptions import ResourceExistsError from azure.storage.blob._shared.base_client import _format_shared_key_credential from azure.storage.filedatalake import DataLakeServiceClient -from testcase import ( - StorageTestCase, - DataLakePreparer) +from settings.testcase import DataLakePreparer +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ TEST_DIRECTORY_PREFIX = 'directory' @@ -29,7 +28,7 @@ class LargeFileTest(StorageTestCase): def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.payload_dropping_policy = PayloadDroppingPolicy() credential_policy = _format_shared_key_credential(account_name, account_key) diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_large_file_async.py b/sdk/storage/azure-storage-file-datalake/tests/test_large_file_async.py index 9e070af4e2f3..d0c970a30c6d 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_large_file_async.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_large_file_async.py @@ -17,13 +17,9 @@ from azure.core.pipeline.policies import SansIOHTTPPolicy from azure.storage.blob._shared.base_client import _format_shared_key_credential from azure.storage.filedatalake.aio import DataLakeServiceClient -from asynctestcase import ( - StorageTestCase, -) - +from devtools_testutils.storage.aio import AsyncStorageTestCase as StorageTestCase +from settings.testcase import DataLakePreparer # ------------------------------------------------------------------------------ -from testcase import DataLakePreparer - TEST_DIRECTORY_PREFIX = 'directory' TEST_FILE_PREFIX = 'file' FILE_PATH = 'file_output.temp.dat' @@ -33,7 +29,7 @@ class LargeFileTest(StorageTestCase): async def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.payload_dropping_policy = PayloadDroppingPolicy() credential_policy = _format_shared_key_credential(account_name, account_key) self.dsc = DataLakeServiceClient(url, diff --git a/sdk/storage/azure-storage-file-datalake/tests/test_quick_query.py b/sdk/storage/azure-storage-file-datalake/tests/test_quick_query.py index a16800952bf1..561bb2559648 100644 --- a/sdk/storage/azure-storage-file-datalake/tests/test_quick_query.py +++ b/sdk/storage/azure-storage-file-datalake/tests/test_quick_query.py @@ -15,9 +15,8 @@ DelimitedJsonDialect, ArrowDialect, ArrowType, QuickQueryDialect) -from testcase import ( - StorageTestCase, - DataLakePreparer) +from settings.testcase import DataLakePreparer +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ from azure.storage.filedatalake import DataLakeServiceClient @@ -115,7 +114,7 @@ class StorageQuickQueryTest(StorageTestCase): def _setUp(self, account_name, account_key): - url = self._get_account_url(account_name) + url = self.account_url(account_name, 'dfs') self.dsc = DataLakeServiceClient(url, credential=account_key, logging_enable=True) self.config = self.dsc._config self.filesystem_name = self.get_resource_name('utqqcontainer') diff --git a/sdk/storage/azure-storage-file-datalake/tests/testcase.py b/sdk/storage/azure-storage-file-datalake/tests/testcase.py deleted file mode 100644 index 9935e6176bf2..000000000000 --- a/sdk/storage/azure-storage-file-datalake/tests/testcase.py +++ /dev/null @@ -1,193 +0,0 @@ -# coding: utf-8 -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -from __future__ import division - -import functools -import logging -import os -import os.path -import random -import re -import sys -import time -import zlib - -from azure_devtools.scenario_tests import RecordingProcessor -from devtools_testutils import AzureTestCase, PowerShellPreparer -from fake_credentials import STORAGE_DATA_LAKE_ACCOUNT_FAKE_KEY - -try: - from cStringIO import StringIO # Python 2 -except ImportError: - from io import StringIO - -from azure.core.credentials import AccessToken - -try: - import settings_real as settings -except ImportError: - settings = None - - -LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' - - -DataLakePreparer = functools.partial( - PowerShellPreparer, "storage", - datalake_storage_account_name="storagename", - datalake_storage_account_key=STORAGE_DATA_LAKE_ACCOUNT_FAKE_KEY -) - - -class FakeTokenCredential(object): - """Protocol for classes able to provide OAuth tokens. - :param str scopes: Lets you specify the type of access needed. - """ - def __init__(self): - self.token = AccessToken("YOU SHALL NOT PASS", 0) - - def get_token(self, *args): - return self.token - - -class XMSRequestIDBody(RecordingProcessor): - """This process is used for Storage batch call only, to avoid the echo policy. - """ - def process_response(self, response): - content_type = None - for key, value in response.get('headers', {}).items(): - if key.lower() == 'content-type': - content_type = (value[0] if isinstance(value, list) else value).lower() - break - - if content_type and 'multipart/mixed' in content_type: - response['body']['string'] = re.sub(b"x-ms-client-request-id: [a-f0-9-]+\r\n", b"", response['body']['string']) - - return response - - -class StorageTestCase(AzureTestCase): - def __init__(self, *args, **kwargs): - super(StorageTestCase, self).__init__(*args, **kwargs) - self.replay_processors.append(XMSRequestIDBody()) - self.logger = logging.getLogger('azure.storage') - self.configure_logging() - - def configure_logging(self): - self.enable_logging() if os.environ.get('ENABLE_LOGGING', False) else self.disable_logging() - - def enable_logging(self): - handler = logging.StreamHandler() - handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) - self.logger.handlers = [handler] - self.logger.setLevel(logging.DEBUG) - self.logger.propagate = True - self.logger.disabled = False - - def disable_logging(self): - self.logger.propagate = False - self.logger.disabled = True - self.logger.handlers = [] - - def sleep(self, seconds): - if not self.is_playback(): - time.sleep(seconds) - - def get_resource_name(self, prefix=''): - # Append a suffix to the name, based on the fully qualified test name - # We use a checksum of the test name so that each test gets different - # resource names, but each test will get the same name on repeat runs, - # which is needed for playback. - # Most resource names have a length limit, so we use a crc32 - - checksum = zlib.adler32(self.qualified_test_name.encode()) & 0xffffffff - name = '{}{}'.format(prefix, hex(checksum)[2:]) - if name.endswith('L'): - name = name[:-1] - return name - - def get_random_bytes(self, size): - return b'a'*size - - def get_random_text_data(self, size): - '''Returns random unicode text data exceeding the size threshold for - chunking blob upload.''' - checksum = zlib.adler32(self.qualified_test_name.encode()) & 0xffffffff - rand = random.Random(checksum) - text = u'' - words = [u'hello', u'world', u'python', u'啊齄丂狛狜'] - while (len(text) < size): - index = int(rand.random()*(len(words) - 1)) - text = text + u' ' + words[index] - - return text - - @staticmethod - def _set_test_proxy(service, settings): - if settings.USE_PROXY: - service.set_proxy( - settings.PROXY_HOST, - settings.PROXY_PORT, - settings.PROXY_USER, - settings.PROXY_PASSWORD, - ) - - def _get_shared_key_credential(self, account_name, account_key): - return { - "account_name": account_name, - "account_key": account_key - } - - def _get_account_url(self, account_name): - return "https://{}.dfs.core.windows.net".format( - account_name - ) - - def _get_oauth_account_url(self, account_name): - return "https://{}.blob.core.windows.net".format( - account_name - ) - - def assertNamedItemInContainer(self, container, item_name, msg=None): - def _is_string(obj): - if sys.version_info >= (3,): - return isinstance(obj, str) - else: - return isinstance(obj, basestring) - for item in container: - if _is_string(item): - if item == item_name: - return - elif item.name == item_name: - return - elif hasattr(item, 'snapshot') and item.snapshot == item_name: - return - - - standardMsg = '{0} not found in {1}'.format( - repr(item_name), [str(c) for c in container]) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertNamedItemNotInContainer(self, container, item_name, msg=None): - for item in container: - if item.name == item_name: - standardMsg = '{0} unexpectedly found in {1}'.format( - repr(item_name), repr(container)) - self.fail(self._formatMessage(msg, standardMsg)) - - def generate_oauth_token(self): - if self.is_live: - from azure.identity import ClientSecretCredential - return ClientSecretCredential( - self.get_settings_value("TENANT_ID"), - self.get_settings_value("CLIENT_ID"), - self.get_settings_value("CLIENT_SECRET"), - ) - return self.generate_fake_token() - - def generate_fake_token(self): - return FakeTokenCredential() diff --git a/sdk/storage/azure-storage-file-share/CHANGELOG.md b/sdk/storage/azure-storage-file-share/CHANGELOG.md index e61e3980d687..edab7b6ce1ee 100644 --- a/sdk/storage/azure-storage-file-share/CHANGELOG.md +++ b/sdk/storage/azure-storage-file-share/CHANGELOG.md @@ -1,5 +1,7 @@ # Release History +## 12.7.0b1 (Unreleased) + ## 12.6.0 (2021-09-15) **Stable release of preview features** - Added support for service version 2020-10-02 (STG78) diff --git a/sdk/storage/azure-storage-file-share/README.md b/sdk/storage/azure-storage-file-share/README.md index 3d483fbdd42e..12e3d448fd4c 100644 --- a/sdk/storage/azure-storage-file-share/README.md +++ b/sdk/storage/azure-storage-file-share/README.md @@ -282,6 +282,8 @@ Other optional configuration keyword arguments that can be specified on the clie * __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request. * __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at the client level to enable it for all requests. +* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at +the client level to enable it for all requests. * __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}` diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.py index dbf265784bd7..488d5166d945 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_directory_client.py @@ -230,7 +230,7 @@ def get_file_client(self, file_name, **kwargs): policies=self._pipeline._impl_policies # pylint: disable = protected-access ) return ShareFileClient( - self.url, file_path=file_name, share_name=self.share_name, napshot=self.snapshot, + self.url, file_path=file_name, share_name=self.share_name, snapshot=self.snapshot, credential=self.credential, api_version=self.api_version, _hosts=self._hosts, _configuration=self._config, _pipeline=_pipeline, _location_mode=self._location_mode, **kwargs) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py index 1b5d324a888b..3ca9ad452641 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_file_client.py @@ -684,9 +684,9 @@ def abort_copy(self, copy_id, **kwargs): def download_file( self, offset=None, # type: Optional[int] length=None, # type: Optional[int] - **kwargs + **kwargs # type: Any ): - # type: (Optional[int], Optional[int], Any) -> StorageStreamDownloader + # type: (...) -> StorageStreamDownloader """Downloads a file to the StorageStreamDownloader. The readall() method must be used to read all the content or readinto() must be used to download the file into a stream. Using chunks() returns an iterator which allows the user to iterate over the content in chunks. diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py index 27cd2360f81c..355f569cd79e 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/models.py @@ -329,6 +329,12 @@ class AccountSasPermissions(object): To enable set or get tags on the blobs in the container. :keyword bool filter_by_tags: To enable get blobs by tags, this should be used together with list permission. + :keyword bool set_immutability_policy: + To enable operations related to set/delete immutability policy. + To get immutability policy, you just need read permission. + :keyword bool permanent_delete: + To enable permanent delete on the blob is permitted. + Valid for Object resource type of Blob only. """ def __init__(self, read=False, write=False, delete=False, list=False, # pylint: disable=redefined-builtin @@ -337,6 +343,7 @@ def __init__(self, read=False, write=False, delete=False, self.write = write self.delete = delete self.delete_previous_version = delete_previous_version + self.permanent_delete = kwargs.pop('permanent_delete', False) self.list = list self.add = add self.create = create @@ -344,17 +351,20 @@ def __init__(self, read=False, write=False, delete=False, self.process = process self.tag = kwargs.pop('tag', False) self.filter_by_tags = kwargs.pop('filter_by_tags', False) + self.set_immutability_policy = kwargs.pop('set_immutability_policy', False) self._str = (('r' if self.read else '') + ('w' if self.write else '') + ('d' if self.delete else '') + ('x' if self.delete_previous_version else '') + + ('y' if self.permanent_delete else '') + ('l' if self.list else '') + ('a' if self.add else '') + ('c' if self.create else '') + ('u' if self.update else '') + ('p' if self.process else '') + ('f' if self.filter_by_tags else '') + - ('t' if self.tag else '') + ('t' if self.tag else '') + + ('i' if self.set_immutability_policy else '') ) def __str__(self): @@ -377,6 +387,7 @@ def from_string(cls, permission): p_write = 'w' in permission p_delete = 'd' in permission p_delete_previous_version = 'x' in permission + p_permanent_delete = 'y' in permission p_list = 'l' in permission p_add = 'a' in permission p_create = 'c' in permission @@ -384,9 +395,11 @@ def from_string(cls, permission): p_process = 'p' in permission p_tag = 't' in permission p_filter_by_tags = 'f' in permission + p_set_immutability_policy = 'i' in permission parsed = cls(read=p_read, write=p_write, delete=p_delete, delete_previous_version=p_delete_previous_version, list=p_list, add=p_add, create=p_create, update=p_update, process=p_process, tag=p_tag, - filter_by_tags=p_filter_by_tags) + filter_by_tags=p_filter_by_tags, set_immutability_policy=p_set_immutability_policy, + permanent_delete=p_permanent_delete) return parsed diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py index 00068a7ba112..c6c6bb9aa5cc 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/policies.py @@ -12,7 +12,6 @@ from io import SEEK_SET, UnsupportedOperation import logging import uuid -import types from typing import Any, TYPE_CHECKING from wsgiref.handlers import format_date_time try: @@ -183,11 +182,15 @@ class StorageLoggingPolicy(NetworkTraceLoggingPolicy): This accepts both global configuration, and per-request level with "enable_http_logger" """ + def __init__(self, logging_enable=False, **kwargs): + self.logging_body = kwargs.pop("logging_body", False) + super(StorageLoggingPolicy, self).__init__(logging_enable=logging_enable, **kwargs) def on_request(self, request): # type: (PipelineRequest, Any) -> None http_request = request.http_request options = request.context.options + self.logging_body = self.logging_body or options.pop("logging_body", False) if options.pop("logging_enable", self.enable_http_logger): request.context["logging_enable"] = True if not _LOGGER.isEnabledFor(logging.DEBUG): @@ -216,11 +219,11 @@ def on_request(self, request): _LOGGER.debug(" %r: %r", header, value) _LOGGER.debug("Request body:") - # We don't want to log the binary data of a file upload. - if isinstance(http_request.body, types.GeneratorType): - _LOGGER.debug("File upload") - else: + if self.logging_body: _LOGGER.debug(str(http_request.body)) + else: + # We don't want to log the binary data of a file upload. + _LOGGER.debug("Hidden body, please use logging_body to show body") except Exception as err: # pylint: disable=broad-except _LOGGER.debug("Failed to log request: %r", err) @@ -240,19 +243,24 @@ def on_response(self, request, response): _LOGGER.debug("Response content:") pattern = re.compile(r'attachment; ?filename=["\w.]+', re.IGNORECASE) header = response.http_response.headers.get('content-disposition') + resp_content_type = response.http_response.headers.get("content-type", "") if header and pattern.match(header): filename = header.partition('=')[2] _LOGGER.debug("File attachments: %s", filename) - elif response.http_response.headers.get("content-type", "").endswith("octet-stream"): + elif resp_content_type.endswith("octet-stream"): _LOGGER.debug("Body contains binary data.") - elif response.http_response.headers.get("content-type", "").startswith("image"): + elif resp_content_type.startswith("image"): _LOGGER.debug("Body contains image data.") - else: - if response.context.options.get('stream', False): + + if self.logging_body and resp_content_type.startswith("text"): + _LOGGER.debug(response.http_response.text()) + elif self.logging_body: + try: + _LOGGER.debug(response.http_response.body()) + except ValueError: _LOGGER.debug("Body is streamable") - else: - _LOGGER.debug(response.http_response.text()) + except Exception as err: # pylint: disable=broad-except _LOGGER.debug("Failed to log response: %s", repr(err)) diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/response_handlers.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/response_handlers.py index 18639497e661..0c375f8e6366 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/response_handlers.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_shared/response_handlers.py @@ -98,6 +98,10 @@ def process_storage_error(storage_error): # pylint:disable=too-many-statements error_dict = {} try: error_body = ContentDecodePolicy.deserialize_from_http_generics(storage_error.response) + try: + error_body = error_body or storage_error.response.reason + except AttributeError: + error_body = '' # If it is an XML response if isinstance(error_body, Element): error_dict = { @@ -109,7 +113,7 @@ def process_storage_error(storage_error): # pylint:disable=too-many-statements error_dict = error_body.get('error', {}) elif not error_code: _LOGGER.warning( - 'Unexpected return type % from ContentDecodePolicy.deserialize_from_http_generics.', type(error_body)) + 'Unexpected return type %s from ContentDecodePolicy.deserialize_from_http_generics.', type(error_body)) error_dict = {'message': str(error_body)} # If we extracted from a Json or XML response diff --git a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py index c9d0e6003207..09c905edc6d3 100644 --- a/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py +++ b/sdk/storage/azure-storage-file-share/azure/storage/fileshare/_version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.6.0" +VERSION = "12.7.0b1" diff --git a/sdk/storage/azure-storage-file-share/setup.py b/sdk/storage/azure-storage-file-share/setup.py index 752f8c5df2af..8ddf56a91944 100644 --- a/sdk/storage/azure-storage-file-share/setup.py +++ b/sdk/storage/azure-storage-file-share/setup.py @@ -59,7 +59,7 @@ author_email='ascl@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-file-share', classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/sdk/storage/azure-storage-file-share/tests/_shared/asynctestcase.py b/sdk/storage/azure-storage-file-share/tests/_shared/asynctestcase.py deleted file mode 100644 index 0aea8459a332..000000000000 --- a/sdk/storage/azure-storage-file-share/tests/_shared/asynctestcase.py +++ /dev/null @@ -1,88 +0,0 @@ - -# coding: utf-8 -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -import asyncio -import functools - -from azure_devtools.scenario_tests.patches import mock_in_unit_test -from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function - -from azure.core.credentials import AccessToken - -from .testcase import StorageTestCase - -LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' - -class AsyncFakeTokenCredential(object): - """Protocol for classes able to provide OAuth tokens. - :param str scopes: Lets you specify the type of access needed. - """ - def __init__(self): - self.token = AccessToken("YOU SHALL NOT PASS", 0) - - async def get_token(self, *args): - return self.token - - -def patch_play_responses(unit_test): - """Fixes a bug affecting blob tests by applying https://github.com/kevin1024/vcrpy/pull/511 to vcrpy 3.0.0""" - - try: - from vcr.stubs.aiohttp_stubs import _serialize_headers, build_response, Request, URL - except ImportError: - # return a do-nothing patch when importing from vcr fails - return lambda _: None - - def fixed_play_responses(cassette, vcr_request): - history = [] - vcr_response = cassette.play_response(vcr_request) - response = build_response(vcr_request, vcr_response, history) - while 300 <= response.status <= 399: - if "location" not in response.headers: - break - next_url = URL(response.url).with_path(response.headers["location"]) - vcr_request = Request("GET", str(next_url), None, _serialize_headers(response.request_info.headers)) - vcr_request = cassette.find_requests_with_most_matches(vcr_request)[0][0] - history.append(response) - vcr_response = cassette.play_response(vcr_request) - response = build_response(vcr_request, vcr_response, history) - return response - - return mock_in_unit_test(unit_test, "vcr.stubs.aiohttp_stubs.play_responses", fixed_play_responses) - - -class AsyncStorageTestCase(StorageTestCase): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.replay_patches.append(patch_play_responses) - - @staticmethod - def await_prepared_test(test_fn): - """Synchronous wrapper for async test methods. Used to avoid making changes - upstream to AbstractPreparer (which doesn't await the functions it wraps) - """ - - @functools.wraps(test_fn) - def run(test_class_instance, *args, **kwargs): - trim_kwargs_from_test_function(test_fn, kwargs) - loop = asyncio.get_event_loop() - return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) - - return run - - def generate_oauth_token(self): - if self.is_live: - from azure.identity.aio import ClientSecretCredential - return ClientSecretCredential( - self.get_settings_value("TENANT_ID"), - self.get_settings_value("CLIENT_ID"), - self.get_settings_value("CLIENT_SECRET"), - ) - return self.generate_fake_token() - - def generate_fake_token(self): - return AsyncFakeTokenCredential() diff --git a/sdk/storage/azure-storage-file-share/tests/_shared/testcase.py b/sdk/storage/azure-storage-file-share/tests/_shared/testcase.py deleted file mode 100644 index d0a3a2be170e..000000000000 --- a/sdk/storage/azure-storage-file-share/tests/_shared/testcase.py +++ /dev/null @@ -1,504 +0,0 @@ -# coding: utf-8 -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -from __future__ import division -import os.path -import time -from datetime import datetime, timedelta - -try: - import unittest.mock as mock -except ImportError: - import mock - -import zlib -import math -import sys -import random -import re -import logging -from devtools_testutils import ( - AzureMgmtTestCase, - AzureMgmtPreparer, - ResourceGroupPreparer, - StorageAccountPreparer, - FakeResource, -) -from azure_devtools.scenario_tests import RecordingProcessor, AzureTestError, create_random_name -try: - from cStringIO import StringIO # Python 2 -except ImportError: - from io import StringIO - -from azure.core.exceptions import ResourceNotFoundError, HttpResponseError -from azure.core.credentials import AccessToken -from azure.storage.fileshare import generate_account_sas, AccountSasPermissions, ResourceTypes -from azure.mgmt.storage.models import StorageAccount, Endpoints -try: - # Running locally - use configuration in settings_real.py - from .settings_real import * -except ImportError: - # Running on the pipeline - use fake values in order to create rg, etc. - from .settings_fake import * - -try: - from devtools_testutils import mgmt_settings_real as settings -except ImportError: - from devtools_testutils import mgmt_settings_fake as settings - -import pytest - - -LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' -os.environ['AZURE_STORAGE_ACCOUNT_NAME'] = STORAGE_ACCOUNT_NAME -os.environ['AZURE_STORAGE_ACCOUNT_KEY'] = STORAGE_ACCOUNT_KEY -os.environ['AZURE_TEST_RUN_LIVE'] = os.environ.get('AZURE_TEST_RUN_LIVE', None) or RUN_IN_LIVE -os.environ['AZURE_SKIP_LIVE_RECORDING'] = os.environ.get('AZURE_SKIP_LIVE_RECORDING', None) or SKIP_LIVE_RECORDING - - -class FakeTokenCredential(object): - """Protocol for classes able to provide OAuth tokens. - :param str scopes: Lets you specify the type of access needed. - """ - def __init__(self): - self.token = AccessToken("YOU SHALL NOT PASS", 0) - self.get_token_count = 0 - - def get_token(self, *args): - self.get_token_count += 1 - return self.token - - -class XMSRequestIDBody(RecordingProcessor): - """This process is used for Storage batch call only, to avoid the echo policy. - """ - def process_response(self, response): - content_type = None - for key, value in response.get('headers', {}).items(): - if key.lower() == 'content-type': - content_type = (value[0] if isinstance(value, list) else value).lower() - break - - if content_type and 'multipart/mixed' in content_type: - response['body']['string'] = re.sub(b"x-ms-client-request-id: [a-f0-9-]+\r\n", b"", response['body']['string']) - - return response - - -class GlobalStorageAccountPreparer(AzureMgmtPreparer): - def __init__(self): - super(GlobalStorageAccountPreparer, self).__init__( - name_prefix='', - random_name_length=42 - ) - - def create_resource(self, name, **kwargs): - storage_account = StorageTestCase._STORAGE_ACCOUNT - if self.is_live: - self.test_class_instance.scrubber.register_name_pair( - storage_account.name, - "storagename" - ) - self.test_class_instance.scrubber.register_name_pair( - ":.{43}=\r", - ":fake_shared_key=\r" - ) - else: - name = "storagename" - storage_account.name = name - storage_account.primary_endpoints.blob = 'https://{}.{}.core.windows.net'.format(name, 'blob') - storage_account.primary_endpoints.queue = 'https://{}.{}.core.windows.net'.format(name, 'queue') - storage_account.primary_endpoints.table = 'https://{}.{}.core.windows.net'.format(name, 'table') - storage_account.primary_endpoints.file = 'https://{}.{}.core.windows.net'.format(name, 'file') - - return { - 'location': 'westus', - 'resource_group': StorageTestCase._RESOURCE_GROUP, - 'storage_account': storage_account, - 'storage_account_key': StorageTestCase._STORAGE_KEY, - 'storage_account_cs': StorageTestCase._STORAGE_CONNECTION_STRING, - } - - -class GlobalResourceGroupPreparer(AzureMgmtPreparer): - def __init__(self): - super(GlobalResourceGroupPreparer, self).__init__( - name_prefix='', - random_name_length=42 - ) - - def create_resource(self, name, **kwargs): - rg = StorageTestCase._RESOURCE_GROUP - if self.is_live: - self.test_class_instance.scrubber.register_name_pair( - rg.name, - "rgname" - ) - else: - rg = FakeResource( - name="rgname", - id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname" - ) - - return { - 'location': 'westus', - 'resource_group': rg, - } - - -class StorageTestCase(AzureMgmtTestCase): - - def __init__(self, *args, **kwargs): - super(StorageTestCase, self).__init__(*args, **kwargs) - self.replay_processors.append(XMSRequestIDBody()) - self.logger = logging.getLogger('azure.storage') - self.configure_logging() - - def connection_string(self, account, key): - return "DefaultEndpointsProtocol=https;AcCounTName=" + account.name + ";AccOuntKey=" + str(key) + ";EndpoIntSuffix=core.windows.net" - - def account_url(self, storage_account, storage_type): - """Return an url of storage account. - - :param str storage_account: Storage account name - :param str storage_type: The Storage type part of the URL. Should be "blob", or "queue", etc. - """ - try: - if storage_type == "blob": - return storage_account.primary_endpoints.blob.rstrip("/") - if storage_type == "queue": - return storage_account.primary_endpoints.queue.rstrip("/") - if storage_type == "file": - return storage_account.primary_endpoints.file.rstrip("/") - else: - raise ValueError("Unknown storage type {}".format(storage_type)) - except AttributeError: # Didn't find "primary_endpoints" - return 'https://{}.{}.core.windows.net'.format(storage_account, storage_type) - - def configure_logging(self): - enable_logging = ENABLE_LOGGING - - self.enable_logging() if enable_logging else self.disable_logging() - - def enable_logging(self): - handler = logging.StreamHandler() - handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) - self.logger.handlers = [handler] - self.logger.setLevel(logging.DEBUG) - self.logger.propagate = True - self.logger.disabled = False - - def disable_logging(self): - self.logger.propagate = False - self.logger.disabled = True - self.logger.handlers = [] - - def sleep(self, seconds): - if self.is_live: - time.sleep(seconds) - - def get_random_bytes(self, size): - # recordings don't like random stuff. making this more - # deterministic. - return b'a'*size - - def get_random_text_data(self, size): - '''Returns random unicode text data exceeding the size threshold for - chunking blob upload.''' - checksum = zlib.adler32(self.qualified_test_name.encode()) & 0xffffffff - rand = random.Random(checksum) - text = u'' - words = [u'hello', u'world', u'python', u'啊齄丂狛狜'] - while (len(text) < size): - index = int(rand.random()*(len(words) - 1)) - text = text + u' ' + words[index] - - return text - - @staticmethod - def _set_test_proxy(service, settings): - if settings.USE_PROXY: - service.set_proxy( - settings.PROXY_HOST, - settings.PROXY_PORT, - settings.PROXY_USER, - settings.PROXY_PASSWORD, - ) - - def assertNamedItemInContainer(self, container, item_name, msg=None): - def _is_string(obj): - if sys.version_info >= (3,): - return isinstance(obj, str) - else: - return isinstance(obj, basestring) - for item in container: - if _is_string(item): - if item == item_name: - return - elif isinstance(item, dict): - if item_name == item['name']: - return - elif item.name == item_name: - return - elif hasattr(item, 'snapshot') and item.snapshot == item_name: - return - - - standardMsg = '{0} not found in {1}'.format( - repr(item_name), [str(c) for c in container]) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertNamedItemNotInContainer(self, container, item_name, msg=None): - for item in container: - if item.name == item_name: - standardMsg = '{0} unexpectedly found in {1}'.format( - repr(item_name), repr(container)) - self.fail(self._formatMessage(msg, standardMsg)) - - def assert_upload_progress(self, size, max_chunk_size, progress, unknown_size=False): - '''Validates that the progress chunks align with our chunking procedure.''' - index = 0 - total = None if unknown_size else size - small_chunk_size = size % max_chunk_size - self.assertEqual(len(progress), math.ceil(size / max_chunk_size)) - for i in progress: - self.assertTrue(i[0] % max_chunk_size == 0 or i[0] % max_chunk_size == small_chunk_size) - self.assertEqual(i[1], total) - - def assert_download_progress(self, size, max_chunk_size, max_get_size, progress): - '''Validates that the progress chunks align with our chunking procedure.''' - if size <= max_get_size: - self.assertEqual(len(progress), 1) - self.assertTrue(progress[0][0], size) - self.assertTrue(progress[0][1], size) - else: - small_chunk_size = (size - max_get_size) % max_chunk_size - self.assertEqual(len(progress), 1 + math.ceil((size - max_get_size) / max_chunk_size)) - - self.assertTrue(progress[0][0], max_get_size) - self.assertTrue(progress[0][1], size) - for i in progress[1:]: - self.assertTrue(i[0] % max_chunk_size == 0 or i[0] % max_chunk_size == small_chunk_size) - self.assertEqual(i[1], size) - - def generate_oauth_token(self): - if self.is_live: - from azure.identity import ClientSecretCredential - return ClientSecretCredential( - self.get_settings_value("TENANT_ID"), - self.get_settings_value("CLIENT_ID"), - self.get_settings_value("CLIENT_SECRET"), - ) - return self.generate_fake_token() - - def generate_sas_token(self): - fake_key = 'a'*30 + 'b'*30 - - return '?' + generate_account_sas( - account_name = 'test', # name of the storage account - account_key = fake_key, # key for the storage account - resource_types = ResourceTypes(object=True), - permission = AccountSasPermissions(read=True,list=True), - start = datetime.now() - timedelta(hours = 24), - expiry = datetime.now() + timedelta(days = 8) - ) - - def generate_fake_token(self): - return FakeTokenCredential() - - -def not_for_emulator(test): - def skip_test_if_targeting_emulator(self): - test(self) - return skip_test_if_targeting_emulator - - -class RetryCounter(object): - def __init__(self): - self.count = 0 - - def simple_count(self, retry_context): - self.count += 1 - - -class ResponseCallback(object): - def __init__(self, status=None, new_status=None): - self.status = status - self.new_status = new_status - self.first = True - self.count = 0 - - def override_first_status(self, response): - if self.first and response.http_response.status_code == self.status: - response.http_response.status_code = self.new_status - self.first = False - self.count += 1 - - def override_status(self, response): - if response.http_response.status_code == self.status: - response.http_response.status_code = self.new_status - self.count += 1 - - -class LogCaptured(object): - def __init__(self, test_case=None): - # accept the test case so that we may reset logging after capturing logs - self.test_case = test_case - - def __enter__(self): - # enable logging - # it is possible that the global logging flag is turned off - self.test_case.enable_logging() - - # create a string stream to send the logs to - self.log_stream = StringIO() - - # the handler needs to be stored so that we can remove it later - self.handler = logging.StreamHandler(self.log_stream) - self.handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) - - # get and enable the logger to send the outputs to the string stream - self.logger = logging.getLogger('azure.storage') - self.logger.level = logging.DEBUG - self.logger.addHandler(self.handler) - - # the stream is returned to the user so that the capture logs can be retrieved - return self.log_stream - - def __exit__(self, exc_type, exc_val, exc_tb): - # stop the handler, and close the stream to exit - self.logger.removeHandler(self.handler) - self.log_stream.close() - - # reset logging since we messed with the setting - self.test_case.configure_logging() - - -@pytest.fixture(scope="session") -def storage_account(): - test_case = AzureMgmtTestCase("__init__") - rg_preparer = ResourceGroupPreparer(random_name_enabled=True, name_prefix='pystorage') - storage_preparer = StorageAccountPreparer(random_name_enabled=True, name_prefix='pyacrstorage') - - # Create - subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", None) - location = os.environ.get("AZURE_LOCATION", "westus") - - existing_rg_name = os.environ.get("AZURE_RESOURCEGROUP_NAME") - existing_storage_name = os.environ.get("AZURE_STORAGE_ACCOUNT_NAME") - existing_storage_key = os.environ.get("AZURE_STORAGE_ACCOUNT_KEY") - storage_connection_string = os.environ.get("AZURE_STORAGE_CONNECTION_STRING") - - i_need_to_create_rg = not (existing_rg_name or existing_storage_name or storage_connection_string) - got_storage_info_from_env = existing_storage_name or storage_connection_string - - try: - if i_need_to_create_rg: - rg_name, rg_kwargs = rg_preparer._prepare_create_resource(test_case) - rg = rg_kwargs['resource_group'] - else: - rg_name = existing_rg_name or "no_rg_needed" - rg = FakeResource( - name=rg_name, - id="/subscriptions/{}/resourceGroups/{}".format(subscription_id, rg_name) - ) - StorageTestCase._RESOURCE_GROUP = rg - - try: - if got_storage_info_from_env: - - if storage_connection_string: - storage_connection_string_parts = dict([ - part.split('=', 1) - for part in storage_connection_string.split(";") - ]) - - storage_account = None - if existing_storage_name: - storage_name = existing_storage_name - storage_account = StorageAccount( - location=location, - ) - storage_account.name = storage_name - storage_account.id = storage_name - storage_account.primary_endpoints = Endpoints() - storage_account.primary_endpoints.blob = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'blob', ACCOUNT_URL_SUFFIX) - storage_account.primary_endpoints.queue = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'queue', ACCOUNT_URL_SUFFIX) - storage_account.primary_endpoints.table = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'table', ACCOUNT_URL_SUFFIX) - storage_account.primary_endpoints.file = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'file', ACCOUNT_URL_SUFFIX) - storage_key = existing_storage_key - - if not storage_connection_string: - # It means I have received a storage name from env - storage_connection_string=";".join([ - "DefaultEndpointsProtocol=https", - "AccountName={}".format(storage_name), - "AccountKey={}".format(storage_key), - "BlobEndpoint={}".format(storage_account.primary_endpoints.blob), - "TableEndpoint={}".format(storage_account.primary_endpoints.table), - "QueueEndpoint={}".format(storage_account.primary_endpoints.queue), - "FileEndpoint={}".format(storage_account.primary_endpoints.file), - ]) - - if not storage_account: - # It means I have received a connection string - storage_name = storage_connection_string_parts["AccountName"] - storage_account = StorageAccount( - location=location, - ) - - def build_service_endpoint(service): - return "{}://{}.{}.{}".format( - storage_connection_string_parts.get("DefaultEndpointsProtocol", "https"), - storage_connection_string_parts["AccountName"], - service, - storage_connection_string_parts["EndpointSuffix"], # Let it fail if we don't even have that - ) - - storage_account.name = storage_name - storage_account.id = storage_name - storage_account.primary_endpoints=Endpoints() - storage_account.primary_endpoints.blob = storage_connection_string_parts.get("BlobEndpoint", build_service_endpoint("blob")) - storage_account.primary_endpoints.queue = storage_connection_string_parts.get("QueueEndpoint", build_service_endpoint("queue")) - storage_account.primary_endpoints.file = storage_connection_string_parts.get("FileEndpoint", build_service_endpoint("file")) - storage_account.secondary_endpoints=Endpoints() - storage_account.secondary_endpoints.blob = storage_connection_string_parts.get("BlobSecondaryEndpoint", build_service_endpoint("blob")) - storage_account.secondary_endpoints.queue = storage_connection_string_parts.get("QueueSecondaryEndpoint", build_service_endpoint("queue")) - storage_account.secondary_endpoints.file = storage_connection_string_parts.get("FileSecondaryEndpoint", build_service_endpoint("file")) - storage_key = storage_connection_string_parts["AccountKey"] - - else: - for i in range(5): - try: - time.sleep(i) if i == 0 else time.sleep(2 ** i) - storage_name, storage_kwargs = storage_preparer._prepare_create_resource( - test_case, **rg_kwargs) - break - # Some tests may be running on the storage account and a conflict may occur. Backoff & Retry. - except HttpResponseError: - continue - storage_account = storage_kwargs['storage_account'] - storage_key = storage_kwargs['storage_account_key'] - storage_connection_string = storage_kwargs['storage_account_cs'] - - StorageTestCase._STORAGE_ACCOUNT = storage_account - StorageTestCase._STORAGE_KEY = storage_key - StorageTestCase._STORAGE_CONNECTION_STRING = storage_connection_string - yield - finally: - if not got_storage_info_from_env: - storage_preparer.remove_resource( - storage_name, - resource_group=rg - ) - finally: - if i_need_to_create_rg: - try: - rg_preparer.remove_resource(rg_name) - # This covers the case where another test had already removed the resource group - except ResourceNotFoundError: - pass - StorageTestCase._RESOURCE_GROUP = None diff --git a/sdk/storage/azure-storage-file-share/tests/conftest.py b/sdk/storage/azure-storage-file-share/tests/conftest.py index 6440887d0b17..d1e8f4dcc6d6 100644 --- a/sdk/storage/azure-storage-file-share/tests/conftest.py +++ b/sdk/storage/azure-storage-file-share/tests/conftest.py @@ -23,19 +23,11 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- -import platform import sys # fixture needs to be visible from conftest -from _shared.testcase import storage_account # Ignore async tests for Python < 3.5 collect_ignore_glob = [] if sys.version_info < (3, 5): collect_ignore_glob.append("*_async.py") - -def pytest_configure(config): - # register an additional marker - config.addinivalue_line( - "usefixtures", "storage_account" - ) diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_snapshot_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_snapshot_exists.yaml new file mode 100644 index 000000000000..2451f8b107cb --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file.test_file_snapshot_exists.yaml @@ -0,0 +1,354 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 17:59:55 GMT + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.file.core.windows.net/utshare1490e7b?restype=share + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 14 Oct 2021 17:59:56 GMT + etag: + - '"0x8D98F3C6E7FA5DA"' + last-modified: + - Thu, 14 Oct 2021 17:59:56 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 17:59:56 GMT + x-ms-file-attributes: + - none + x-ms-file-creation-time: + - now + x-ms-file-last-write-time: + - now + x-ms-file-permission: + - inherit + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b?restype=directory + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 14 Oct 2021 17:59:56 GMT + etag: + - '"0x8D98F3C6EB478FA"' + last-modified: + - Thu, 14 Oct 2021 17:59:56 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-file-attributes: + - Directory + x-ms-file-change-time: + - '2021-10-14T17:59:56.7766778Z' + x-ms-file-creation-time: + - '2021-10-14T17:59:56.7766778Z' + x-ms-file-id: + - '13835128424026341376' + x-ms-file-last-write-time: + - '2021-10-14T17:59:56.7766778Z' + x-ms-file-parent-id: + - '0' + x-ms-file-permission-key: + - 17913408918638655783*10394889115079208622 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-content-length: + - '1024' + x-ms-date: + - Thu, 14 Oct 2021 17:59:56 GMT + x-ms-file-attributes: + - none + x-ms-file-creation-time: + - now + x-ms-file-last-write-time: + - now + x-ms-file-permission: + - Inherit + x-ms-type: + - file + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b/file1490e7b + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 14 Oct 2021 17:59:56 GMT + etag: + - '"0x8D98F3C6EBEB406"' + last-modified: + - Thu, 14 Oct 2021 17:59:56 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-file-attributes: + - Archive + x-ms-file-change-time: + - '2021-10-14T17:59:56.8437254Z' + x-ms-file-creation-time: + - '2021-10-14T17:59:56.8437254Z' + x-ms-file-id: + - '11529285414812647424' + x-ms-file-last-write-time: + - '2021-10-14T17:59:56.8437254Z' + x-ms-file-parent-id: + - '13835128424026341376' + x-ms-file-permission-key: + - 4099112195243312672*10394889115079208622 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1024' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 17:59:56 GMT + x-ms-range: + - bytes=0-1023 + x-ms-version: + - '2020-10-02' + x-ms-write: + - update + method: PUT + uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b/file1490e7b?comp=range + response: + body: + string: '' + headers: + content-length: + - '0' + content-md5: + - yaNM/IXZgmmMasifdgcavQ== + date: + - Thu, 14 Oct 2021 17:59:56 GMT + etag: + - '"0x8D98F3C6EC9B285"' + last-modified: + - Thu, 14 Oct 2021 17:59:56 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: + - 'true' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 17:59:56 GMT + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.file.core.windows.net/utshare1490e7b?restype=share&comp=snapshot + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 14 Oct 2021 17:59:57 GMT + etag: + - '"0x8D98F3C6E7FA5DA"' + last-modified: + - Thu, 14 Oct 2021 17:59:56 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-snapshot: + - '2021-10-14T17:59:57.0000000Z' + x-ms-version: + - '2020-10-02' + status: + code: 201 + message: Created +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 17:59:57 GMT + x-ms-version: + - '2020-10-02' + method: DELETE + uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b/file1490e7b + response: + body: + string: '' + headers: + content-length: + - '0' + date: + - Thu, 14 Oct 2021 17:59:57 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: + - '2020-10-02' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - application/xml + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 17:59:57 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2020-10-02' + method: GET + uri: https://storagename.file.core.windows.net/utshare1490e7b/directory1490e7b/file1490e7b?sharesnapshot=2021-10-14T17:59:57.0000000Z + response: + body: + string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + accept-ranges: + - bytes + content-length: + - '1024' + content-range: + - bytes 0-1023/1024 + content-type: + - application/octet-stream + date: + - Thu, 14 Oct 2021 17:59:57 GMT + etag: + - '"0x8D98F3C6EC9B285"' + last-modified: + - Thu, 14 Oct 2021 17:59:56 GMT + server: + - Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + vary: + - Origin + x-ms-file-attributes: + - Archive + x-ms-file-change-time: + - '2021-10-14T17:59:56.8437254Z' + x-ms-file-creation-time: + - '2021-10-14T17:59:56.8437254Z' + x-ms-file-id: + - '11529285414812647424' + x-ms-file-last-write-time: + - '2021-10-14T17:59:56.8437254Z' + x-ms-file-parent-id: + - '13835128424026341376' + x-ms-file-permission-key: + - 4099112195243312672*10394889115079208622 + x-ms-server-encrypted: + - 'true' + x-ms-type: + - File + x-ms-version: + - '2020-10-02' + status: + code: 206 + message: Partial Content +version: 1 diff --git a/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_snapshot_exists.yaml b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_snapshot_exists.yaml new file mode 100644 index 000000000000..333090173d55 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/recordings/test_file_async.test_snapshot_exists.yaml @@ -0,0 +1,251 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 18:12:07 GMT + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.file.core.windows.net/utshare125e0ef9?restype=share + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 14 Oct 2021 18:12:07 GMT + etag: '"0x8D98F3E22B0B3ED"' + last-modified: Thu, 14 Oct 2021 18:12:08 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://emilydevtest.file.core.windows.net/utshare125e0ef9?restype=share +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 18:12:08 GMT + x-ms-file-attributes: + - none + x-ms-file-creation-time: + - now + x-ms-file-last-write-time: + - now + x-ms-file-permission: + - inherit + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.file.core.windows.net/utshare125e0ef9/directory125e0ef9?restype=directory + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 14 Oct 2021 18:12:08 GMT + etag: '"0x8D98F3E22BE4EB3"' + last-modified: Thu, 14 Oct 2021 18:12:08 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-file-attributes: Directory + x-ms-file-change-time: '2021-10-14T18:12:08.3277491Z' + x-ms-file-creation-time: '2021-10-14T18:12:08.3277491Z' + x-ms-file-id: '13835128424026341376' + x-ms-file-last-write-time: '2021-10-14T18:12:08.3277491Z' + x-ms-file-parent-id: '0' + x-ms-file-permission-key: 17913408918638655783*10394889115079208622 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://emilydevtest.file.core.windows.net/utshare125e0ef9/directory125e0ef9?restype=directory +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-content-length: + - '1024' + x-ms-date: + - Thu, 14 Oct 2021 18:12:08 GMT + x-ms-file-attributes: + - none + x-ms-file-creation-time: + - now + x-ms-file-last-write-time: + - now + x-ms-file-permission: + - Inherit + x-ms-type: + - file + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.file.core.windows.net/utshare125e0ef9/directory125e0ef9/file125e0ef9 + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 14 Oct 2021 18:12:08 GMT + etag: '"0x8D98F3E22C26E23"' + last-modified: Thu, 14 Oct 2021 18:12:08 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-file-attributes: Archive + x-ms-file-change-time: '2021-10-14T18:12:08.3547683Z' + x-ms-file-creation-time: '2021-10-14T18:12:08.3547683Z' + x-ms-file-id: '11529285414812647424' + x-ms-file-last-write-time: '2021-10-14T18:12:08.3547683Z' + x-ms-file-parent-id: '13835128424026341376' + x-ms-file-permission-key: 4099112195243312672*10394889115079208622 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://emilydevtest.file.core.windows.net/utshare125e0ef9/directory125e0ef9/file125e0ef9 +- request: + body: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + Accept: + - application/xml + Content-Length: + - '1024' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 18:12:08 GMT + x-ms-range: + - bytes=0-1023 + x-ms-version: + - '2020-10-02' + x-ms-write: + - update + method: PUT + uri: https://storagename.file.core.windows.net/utshare125e0ef9/directory125e0ef9/file125e0ef9?comp=range + response: + body: + string: '' + headers: + content-length: '0' + content-md5: yaNM/IXZgmmMasifdgcavQ== + date: Thu, 14 Oct 2021 18:12:08 GMT + etag: '"0x8D98F3E22C68D97"' + last-modified: Thu, 14 Oct 2021 18:12:08 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-request-server-encrypted: 'true' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://emilydevtest.file.core.windows.net/utshare125e0ef9/directory125e0ef9/file125e0ef9?comp=range +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 18:12:08 GMT + x-ms-version: + - '2020-10-02' + method: PUT + uri: https://storagename.file.core.windows.net/utshare125e0ef9?restype=share&comp=snapshot + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 14 Oct 2021 18:12:08 GMT + etag: '"0x8D98F3E22B0B3ED"' + last-modified: Thu, 14 Oct 2021 18:12:08 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-snapshot: '2021-10-14T18:12:08.0000000Z' + x-ms-version: '2020-10-02' + status: + code: 201 + message: Created + url: https://emilydevtest.file.core.windows.net/utshare125e0ef9?restype=share&comp=snapshot +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 18:12:08 GMT + x-ms-version: + - '2020-10-02' + method: DELETE + uri: https://storagename.file.core.windows.net/utshare125e0ef9/directory125e0ef9/file125e0ef9 + response: + body: + string: '' + headers: + content-length: '0' + date: Thu, 14 Oct 2021 18:12:08 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + x-ms-version: '2020-10-02' + status: + code: 202 + message: Accepted + url: https://emilydevtest.file.core.windows.net/utshare125e0ef9/directory125e0ef9/file125e0ef9 +- request: + body: null + headers: + Accept: + - application/xml + User-Agent: + - azsdk-python-storage-file-share/12.6.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Thu, 14 Oct 2021 18:12:08 GMT + x-ms-range: + - bytes=0-33554431 + x-ms-version: + - '2020-10-02' + method: GET + uri: https://storagename.file.core.windows.net/utshare125e0ef9/directory125e0ef9/file125e0ef9?sharesnapshot=2021-10-14T18:12:08.0000000Z + response: + body: + string: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + headers: + accept-ranges: bytes + content-length: '1024' + content-range: bytes 0-1023/1024 + content-type: application/octet-stream + date: Thu, 14 Oct 2021 18:12:08 GMT + etag: '"0x8D98F3E22C68D97"' + last-modified: Thu, 14 Oct 2021 18:12:08 GMT + server: Windows-Azure-File/1.0 Microsoft-HTTPAPI/2.0 + vary: Origin + x-ms-file-attributes: Archive + x-ms-file-change-time: '2021-10-14T18:12:08.3547683Z' + x-ms-file-creation-time: '2021-10-14T18:12:08.3547683Z' + x-ms-file-id: '11529285414812647424' + x-ms-file-last-write-time: '2021-10-14T18:12:08.3547683Z' + x-ms-file-parent-id: '13835128424026341376' + x-ms-file-permission-key: 4099112195243312672*10394889115079208622 + x-ms-server-encrypted: 'true' + x-ms-type: File + x-ms-version: '2020-10-02' + status: + code: 206 + message: Partial Content + url: https://emilydevtest.file.core.windows.net/utshare125e0ef9/directory125e0ef9/file125e0ef9?sharesnapshot=2021-10-14T18:12:08.0000000Z +version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/_shared/__init__.py b/sdk/storage/azure-storage-file-share/tests/settings/__init__.py similarity index 100% rename from sdk/storage/azure-storage-queue/tests/_shared/__init__.py rename to sdk/storage/azure-storage-file-share/tests/settings/__init__.py diff --git a/sdk/storage/azure-storage-file-share/tests/settings/settings_fake.py b/sdk/storage/azure-storage-file-share/tests/settings/settings_fake.py new file mode 100644 index 000000000000..d795e08bf99f --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/settings/settings_fake.py @@ -0,0 +1,22 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +STORAGE_ACCOUNT_NAME = "fakename" +STORAGE_ACCOUNT_KEY = "fakekey" +PREMIUM_STORAGE_FILE_ACCOUNT_NAME = "fakename" +PREMIUM_STORAGE_FILE_ACCOUNT_KEY = "fakekey" +SECONDARY_STORAGE_ACCOUNT_NAME = "fakename" +SECONDARY_STORAGE_ACCOUNT_KEY = "fakekey" + +TENANT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_SECRET = "00000000-0000-0000-0000-000000000000" + +ACCOUNT_URL_SUFFIX = 'core.windows.net' +RUN_IN_LIVE = "False" +SKIP_LIVE_RECORDING = "True" + +PROTOCOL = "https" diff --git a/sdk/storage/azure-storage-file-share/tests/settings/testcase.py b/sdk/storage/azure-storage-file-share/tests/settings/testcase.py new file mode 100644 index 000000000000..4dae66819296 --- /dev/null +++ b/sdk/storage/azure-storage-file-share/tests/settings/testcase.py @@ -0,0 +1,71 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from __future__ import division + +import functools +import os.path + +try: + import unittest.mock as mock +except ImportError: + import mock + +import logging +from devtools_testutils import ( + PowerShellPreparer, ACCOUNT_FAKE_KEY) +try: + from cStringIO import StringIO # Python 2 +except ImportError: + from io import StringIO + +try: + # Running locally - use configuration in settings_real.py + from .settings_real import * +except ImportError: + # Running on the pipeline - use fake values in order to create rg, etc. + from .settings_fake import * + +try: + from devtools_testutils import mgmt_settings_real as settings +except ImportError: + from devtools_testutils import mgmt_settings_fake as settings + + + +LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' +os.environ['STORAGE_ACCOUNT_NAME'] = os.environ.get('STORAGE_ACCOUNT_NAME', None) or STORAGE_ACCOUNT_NAME +os.environ['STORAGE_ACCOUNT_KEY'] = os.environ.get('STORAGE_ACCOUNT_KEY', None) or STORAGE_ACCOUNT_KEY +os.environ['PREMIUM_STORAGE_FILE_ACCOUNT_NAME'] = os.environ.get('PREMIUM_STORAGE_FILE_ACCOUNT_NAME', None) or PREMIUM_STORAGE_FILE_ACCOUNT_NAME +os.environ['PREMIUM_STORAGE_FILE_ACCOUNT_KEY'] = os.environ.get('PREMIUM_STORAGE_FILE_ACCOUNT_KEY', None) or PREMIUM_STORAGE_FILE_ACCOUNT_KEY +os.environ['SECONDARY_STORAGE_ACCOUNT_NAME'] = os.environ.get('SECONDARY_STORAGE_ACCOUNT_NAME', None) or SECONDARY_STORAGE_ACCOUNT_NAME +os.environ['SECONDARY_STORAGE_ACCOUNT_KEY'] = os.environ.get('SECONDARY_STORAGE_ACCOUNT_KEY', None) or SECONDARY_STORAGE_ACCOUNT_KEY + +os.environ['AZURE_TEST_RUN_LIVE'] = os.environ.get('AZURE_TEST_RUN_LIVE', None) or RUN_IN_LIVE +os.environ['AZURE_SKIP_LIVE_RECORDING'] = os.environ.get('AZURE_SKIP_LIVE_RECORDING', None) or SKIP_LIVE_RECORDING +os.environ['PROTOCOL'] = PROTOCOL +os.environ['ACCOUNT_URL_SUFFIX'] = ACCOUNT_URL_SUFFIX + +os.environ['STORAGE_TENANT_ID'] = os.environ.get('STORAGE_TENANT_ID', None) or TENANT_ID +os.environ['STORAGE_CLIENT_ID'] = os.environ.get('STORAGE_CLIENT_ID', None) or CLIENT_ID +os.environ['STORAGE_CLIENT_SECRET'] = os.environ.get('STORAGE_CLIENT_SECRET', None) or CLIENT_SECRET + + +FileSharePreparer = functools.partial( + PowerShellPreparer, "storage", + storage_account_name="storagename", + storage_account_key=ACCOUNT_FAKE_KEY, + premium_storage_file_account_name="pyacrstoragestorname", + premium_storage_file_account_key=ACCOUNT_FAKE_KEY, + secondary_storage_account_name="pyrmtstoragestorname", + secondary_storage_account_key=ACCOUNT_FAKE_KEY, +) + + +def not_for_emulator(test): + def skip_test_if_targeting_emulator(self): + test(self) + return skip_test_if_targeting_emulator diff --git a/sdk/storage/azure-storage-file-share/tests/test_directory.py b/sdk/storage/azure-storage-file-share/tests/test_directory.py index b17056c82702..e256a45d926a 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_directory.py +++ b/sdk/storage/azure-storage-file-share/tests/test_directory.py @@ -9,24 +9,19 @@ from datetime import timedelta from azure.core.exceptions import ResourceNotFoundError, ResourceExistsError -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.storage.fileshare import ( ShareServiceClient, StorageErrorCode, ) -from _shared.testcase import ( - StorageTestCase, - LogCaptured, - GlobalStorageAccountPreparer -) - - +from devtools_testutils.storage import StorageTestCase +from settings.testcase import FileSharePreparer # ------------------------------------------------------------------------------ + class StorageDirectoryTest(StorageTestCase): - def _setup(self, storage_account, storage_account_key): - url = self.account_url(storage_account, "file") + def _setup(self, storage_account_name, storage_account_key): + url = self.account_url(storage_account_name, "file") credential = storage_account_key self.fsc = ShareServiceClient(url, credential=credential) self.share_name = self.get_resource_name('utshare') @@ -46,9 +41,9 @@ def _teardown(self, FILE_PATH): # --Helpers----------------------------------------------------------------- # --Test cases for directories ---------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_directories(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_directories(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) # Act @@ -57,9 +52,9 @@ def test_create_directories(self, resource_group, location, storage_account, sto # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() - def test_create_directories_with_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_directories_with_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) metadata = {'hello': 'world', 'number': '42'} @@ -70,9 +65,9 @@ def test_create_directories_with_metadata(self, resource_group, location, storag md = directory.get_directory_properties().metadata self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() - def test_create_directories_fail_on_exist(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_directories_fail_on_exist(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) # Act @@ -83,9 +78,9 @@ def test_create_directories_fail_on_exist(self, resource_group, location, storag # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() - def test_create_subdirectories(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_subdirectories(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') @@ -96,9 +91,9 @@ def test_create_subdirectories(self, resource_group, location, storage_account, self.assertTrue(created) self.assertEqual(created.directory_path, 'dir1/dir2') - @GlobalStorageAccountPreparer() - def test_create_subdirectories_with_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_subdirectories_with_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') metadata = {'hello': 'world', 'number': '42'} @@ -112,9 +107,9 @@ def test_create_subdirectories_with_metadata(self, resource_group, location, sto sub_metadata = created.get_directory_properties().metadata self.assertEqual(sub_metadata, metadata) - @GlobalStorageAccountPreparer() - def test_create_file_in_directory(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_in_directory(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_data = b'12345678' * 1024 file_name = self.get_resource_name('file') share_client = self.fsc.get_share_client(self.share_name) @@ -127,9 +122,9 @@ def test_create_file_in_directory(self, resource_group, location, storage_accoun file_content = new_file.download_file().readall() self.assertEqual(file_content, file_data) - @GlobalStorageAccountPreparer() - def test_delete_file_in_directory(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_file_in_directory(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self.get_resource_name('file') share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') @@ -143,9 +138,9 @@ def test_delete_file_in_directory(self, resource_group, location, storage_accoun with self.assertRaises(ResourceNotFoundError): new_file.get_file_properties() - @GlobalStorageAccountPreparer() - def test_delete_subdirectories(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_subdirectories(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') directory.create_subdirectory('dir2') @@ -159,9 +154,9 @@ def test_delete_subdirectories(self, resource_group, location, storage_account, with self.assertRaises(ResourceNotFoundError): subdir.get_directory_properties() - @GlobalStorageAccountPreparer() - def test_get_directory_properties(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_directory_properties(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') @@ -173,9 +168,9 @@ def test_get_directory_properties(self, resource_group, location, storage_accoun self.assertIsNotNone(props.etag) self.assertIsNotNone(props.last_modified) - @GlobalStorageAccountPreparer() - def test_get_directory_properties_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_directory_properties_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) metadata = {"test1": "foo", "test2": "bar"} directory = share_client.create_directory('dir1', metadata=metadata) @@ -194,9 +189,9 @@ def test_get_directory_properties_with_snapshot(self, resource_group, location, self.assertIsNotNone(props.last_modified) self.assertDictEqual(metadata, props.metadata) - @GlobalStorageAccountPreparer() - def test_get_directory_metadata_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_directory_metadata_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) metadata = {"test1": "foo", "test2": "bar"} directory = share_client.create_directory('dir1', metadata=metadata) @@ -213,9 +208,9 @@ def test_get_directory_metadata_with_snapshot(self, resource_group, location, st self.assertIsNotNone(snapshot_metadata) self.assertDictEqual(metadata, snapshot_metadata) - @GlobalStorageAccountPreparer() - def test_get_directory_properties_with_non_existing_directory(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_directory_properties_with_non_existing_directory(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.get_directory_client('dir1') @@ -225,9 +220,9 @@ def test_get_directory_properties_with_non_existing_directory(self, resource_gro # Assert - @GlobalStorageAccountPreparer() - def test_directory_exists(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_directory_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') @@ -237,9 +232,9 @@ def test_directory_exists(self, resource_group, location, storage_account, stora # Assert self.assertTrue(exists) - @GlobalStorageAccountPreparer() - def test_directory_not_exists(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_directory_not_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.get_directory_client('dir1') @@ -249,9 +244,9 @@ def test_directory_not_exists(self, resource_group, location, storage_account, s # Assert - @GlobalStorageAccountPreparer() - def test_directory_parent_not_exists(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_directory_parent_not_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.get_directory_client('missing1/missing2') @@ -262,9 +257,9 @@ def test_directory_parent_not_exists(self, resource_group, location, storage_acc # Assert self.assertEqual(e.exception.error_code, StorageErrorCode.parent_not_found) - @GlobalStorageAccountPreparer() - def test_directory_exists_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_directory_exists_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') snapshot = share_client.create_snapshot() @@ -278,9 +273,9 @@ def test_directory_exists_with_snapshot(self, resource_group, location, storage_ # Assert self.assertTrue(exists) - @GlobalStorageAccountPreparer() - def test_directory_not_exists_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_directory_not_exists_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) snapshot = share_client.create_snapshot() directory = share_client.create_directory('dir1') @@ -294,9 +289,9 @@ def test_directory_not_exists_with_snapshot(self, resource_group, location, stor # Assert - @GlobalStorageAccountPreparer() - def test_get_set_directory_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_set_directory_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') metadata = {'hello': 'world', 'number': '43'} @@ -308,9 +303,9 @@ def test_get_set_directory_metadata(self, resource_group, location, storage_acco # Assert self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() - def test_set_directory_properties_with_empty_smb_properties(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_directory_properties_with_empty_smb_properties(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory_client = share_client.create_directory('dir1') directory_properties_on_creation = directory_client.get_directory_properties() @@ -328,9 +323,9 @@ def test_set_directory_properties_with_empty_smb_properties(self, resource_group self.assertEqual(directory_properties_on_creation.permission_key, directory_properties.permission_key) - @GlobalStorageAccountPreparer() - def test_set_directory_properties_with_file_permission_key(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_directory_properties_with_file_permission_key(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory_client = share_client.create_directory('dir1') @@ -353,9 +348,9 @@ def test_set_directory_properties_with_file_permission_key(self, resource_group, self.assertEqual(directory_properties.creation_time, new_creation_time) self.assertEqual(directory_properties.last_write_time, new_last_write_time) - @GlobalStorageAccountPreparer() - def test_list_subdirectories_and_files(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_subdirectories_and_files(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') directory.create_subdirectory("subdir1") @@ -383,9 +378,9 @@ def test_list_subdirectories_and_files(self, resource_group, location, storage_a self.assertEqual(list_dir[5]['name'], 'file3') self.assertEqual(list_dir[5]['is_directory'], False) - @GlobalStorageAccountPreparer() - def test_list_subdirectories_and_files_include_other_data(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_subdirectories_and_files_include_other_data(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') directory.create_subdirectory("subdir1") @@ -411,9 +406,9 @@ def test_list_subdirectories_and_files_include_other_data(self, resource_group, except: pass - @GlobalStorageAccountPreparer() - def test_list_subdirectories_and_files_include_extended_info(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_subdirectories_and_files_include_extended_info(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') directory.create_subdirectory("subdir1") @@ -424,9 +419,9 @@ def test_list_subdirectories_and_files_include_extended_info(self, resource_grou self.assertIsNone(list_dir[0].file_attributes) self.assertIsNone(list_dir[0].last_access_time) - @GlobalStorageAccountPreparer() - def test_list_subdirectories_and_files_with_prefix(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_subdirectories_and_files_with_prefix(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') directory.create_subdirectory("subdir1") @@ -448,9 +443,9 @@ def test_list_subdirectories_and_files_with_prefix(self, resource_group, locatio self.assertEqual(list_dir[2]['name'], 'subdir3') self.assertEqual(list_dir[2]['is_directory'], True) - @GlobalStorageAccountPreparer() - def test_list_subdirectories_and_files_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_subdirectories_and_files_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') directory.create_subdirectory("subdir1") @@ -478,9 +473,9 @@ def test_list_subdirectories_and_files_with_snapshot(self, resource_group, locat self.assertEqual(list_dir[2]['is_directory'], False) self.assertEqual(list_dir[2]['size'], 5) - @GlobalStorageAccountPreparer() - def test_list_nested_subdirectories_and_files(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_nested_subdirectories_and_files(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') subdir = directory.create_subdirectory("subdir1") @@ -501,9 +496,9 @@ def test_list_nested_subdirectories_and_files(self, resource_group, location, st self.assertEqual(list_dir[1]['is_directory'], False) self.assertEqual(list_dir[1]['size'], 5) - @GlobalStorageAccountPreparer() - def test_delete_directory_with_existing_share(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_directory_with_existing_share(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') @@ -515,9 +510,9 @@ def test_delete_directory_with_existing_share(self, resource_group, location, st with self.assertRaises(ResourceNotFoundError): directory.get_directory_properties() - @GlobalStorageAccountPreparer() - def test_delete_directory_with_non_existing_directory(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_directory_with_non_existing_directory(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.get_directory_client('dir1') @@ -527,9 +522,9 @@ def test_delete_directory_with_non_existing_directory(self, resource_group, loca # Assert - @GlobalStorageAccountPreparer() - def test_get_directory_properties_server_encryption(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_directory_properties_server_encryption(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.create_directory('dir1') diff --git a/sdk/storage/azure-storage-file-share/tests/test_directory_async.py b/sdk/storage/azure-storage-file-share/tests/test_directory_async.py index 5716b69112d3..32810a4c949d 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_directory_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_directory_async.py @@ -14,13 +14,8 @@ from multidict import CIMultiDict, CIMultiDictProxy from azure.storage.fileshare import StorageErrorCode from azure.storage.fileshare.aio import ShareServiceClient -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer - -from _shared.testcase import ( - LogCaptured, - GlobalStorageAccountPreparer -) -from _shared.asynctestcase import AsyncStorageTestCase +from settings.testcase import FileSharePreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -37,8 +32,8 @@ async def send(self, request, **config): class StorageDirectoryTest(AsyncStorageTestCase): # --Helpers----------------------------------------------------------------- - async def _setup(self, storage_account, storage_account_key): - url = self.account_url(storage_account, "file") + async def _setup(self, storage_account_name, storage_account_key): + url = self.account_url(storage_account_name, "file") credential = storage_account_key self.fsc = ShareServiceClient(url, credential=credential, transport=AiohttpTestTransport()) self.share_name = self.get_resource_name('utshare') @@ -56,11 +51,11 @@ def _teardown(self, FILE_PATH): pass # --Test cases for directories ---------------------------------------------- - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_directories_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_directories_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) # Act @@ -69,11 +64,11 @@ async def test_create_directories_async(self, resource_group, location, storage_ # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_directories_with_metadata_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_directories_with_metadata_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) metadata = {'hello': 'world', 'number': '42'} @@ -84,11 +79,11 @@ async def test_create_directories_with_metadata_async(self, resource_group, loca props = await directory.get_directory_properties() self.assertDictEqual(props.metadata, metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_directories_fail_on_exist_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_directories_fail_on_exist_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) # Act @@ -99,11 +94,11 @@ async def test_create_directories_fail_on_exist_async(self, resource_group, loca # Assert self.assertTrue(created) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_subdirectories_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_subdirectories_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') @@ -115,11 +110,11 @@ async def test_create_subdirectories_async(self, resource_group, location, stora self.assertEqual(created.directory_path, 'dir1/dir2') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_subdirectories_with_metadata_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_subdirectories_with_metadata_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') metadata = {'hello': 'world', 'number': '42'} @@ -133,11 +128,11 @@ async def test_create_subdirectories_with_metadata_async(self, resource_group, l properties = await created.get_directory_properties() self.assertEqual(properties.metadata, metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_in_directory_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_in_directory_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_data = b'12345678' * 1024 file_name = self.get_resource_name('file') share_client = self.fsc.get_share_client(self.share_name) @@ -151,11 +146,11 @@ async def test_create_file_in_directory_async(self, resource_group, location, st file_content = await file_content.readall() self.assertEqual(file_content, file_data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_file_in_directory_async(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_file_in_directory_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_name = self.get_resource_name('file') share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') @@ -169,11 +164,11 @@ async def test_delete_file_in_directory_async(self, resource_group, location, st with self.assertRaises(ResourceNotFoundError): await new_file.get_file_properties() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_subdirectories_async(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_subdirectories_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') await directory.create_subdirectory('dir2') @@ -187,11 +182,11 @@ async def test_delete_subdirectories_async(self, resource_group, location, stora with self.assertRaises(ResourceNotFoundError): await subdir.get_directory_properties() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_directory_properties_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_directory_properties_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') @@ -203,11 +198,11 @@ async def test_get_directory_properties_async(self, resource_group, location, st self.assertIsNotNone(props.etag) self.assertIsNotNone(props.last_modified) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_directory_properties_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_directory_properties_with_snapshot_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) metadata = {"test1": "foo", "test2": "bar"} directory = await share_client.create_directory('dir1', metadata=metadata) @@ -226,11 +221,11 @@ async def test_get_directory_properties_with_snapshot_async(self, resource_group self.assertIsNotNone(props.last_modified) self.assertDictEqual(metadata, props.metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_directory_metadata_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_directory_metadata_with_snapshot_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) metadata = {"test1": "foo", "test2": "bar"} directory = await share_client.create_directory('dir1', metadata=metadata) @@ -247,11 +242,11 @@ async def test_get_directory_metadata_with_snapshot_async(self, resource_group, self.assertIsNotNone(snapshot_props.metadata) self.assertDictEqual(metadata, snapshot_props.metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_directory_properties_with_non_existing_directory_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_directory_properties_with_non_existing_directory_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.get_directory_client('dir1') @@ -261,11 +256,11 @@ async def test_get_directory_properties_with_non_existing_directory_async(self, # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_directory_exists_async(self, resource_group, location, storage_account, storage_account_key): + async def test_directory_exists_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') @@ -275,11 +270,11 @@ async def test_directory_exists_async(self, resource_group, location, storage_ac # Assert self.assertTrue(exists) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_directory_not_exists_async(self, resource_group, location, storage_account, storage_account_key): + async def test_directory_not_exists_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.get_directory_client('dir1') @@ -289,11 +284,11 @@ async def test_directory_not_exists_async(self, resource_group, location, storag # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_directory_parent_not_exists_async(self, resource_group, location, storage_account, storage_account_key): + async def test_directory_parent_not_exists_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.get_directory_client('missing1/missing2') @@ -304,11 +299,11 @@ async def test_directory_parent_not_exists_async(self, resource_group, location, # Assert self.assertEqual(e.exception.error_code, StorageErrorCode.parent_not_found) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_directory_exists_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_directory_exists_with_snapshot_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') snapshot = await share_client.create_snapshot() @@ -322,11 +317,11 @@ async def test_directory_exists_with_snapshot_async(self, resource_group, locati # Assert self.assertTrue(exists) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_directory_not_exists_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_directory_not_exists_with_snapshot_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) snapshot = await share_client.create_snapshot() directory = await share_client.create_directory('dir1') @@ -340,11 +335,11 @@ async def test_directory_not_exists_with_snapshot_async(self, resource_group, lo # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_set_directory_metadata_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_set_directory_metadata_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') metadata = {'hello': 'world', 'number': '43'} @@ -356,11 +351,11 @@ async def test_get_set_directory_metadata_async(self, resource_group, location, # Assert self.assertDictEqual(props.metadata, metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_directory_properties_with_empty_smb_properties(self, resource_group, location, storage_account, storage_account_key): + async def test_set_directory_properties_with_empty_smb_properties(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory_client = await share_client.create_directory('dir1') directory_properties_on_creation = await directory_client.get_directory_properties() @@ -378,11 +373,11 @@ async def test_set_directory_properties_with_empty_smb_properties(self, resource self.assertEqual(directory_properties_on_creation.permission_key, directory_properties.permission_key) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_directory_properties_with_file_permission_key(self, resource_group, location, storage_account, storage_account_key): + async def test_set_directory_properties_with_file_permission_key(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory_client = await share_client.create_directory('dir1') @@ -405,11 +400,11 @@ async def test_set_directory_properties_with_file_permission_key(self, resource_ self.assertEqual(directory_properties.creation_time, new_creation_time) self.assertEqual(directory_properties.last_write_time, new_last_write_time) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_subdirectories_and_files_async(self, resource_group, location, storage_account, storage_account_key): + async def test_list_subdirectories_and_files_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') await asyncio.gather( @@ -444,11 +439,11 @@ async def test_list_subdirectories_and_files_async(self, resource_group, locatio self.assertEqual(list_dir[5]['is_directory'], False) self.assertEqual(list_dir[5]['size'], 5) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_subdirectories_and_files_include_other_data_async(self, resource_group, location, storage_account, storage_account_key): + async def test_list_subdirectories_and_files_include_other_data_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') await asyncio.gather( @@ -478,11 +473,11 @@ async def test_list_subdirectories_and_files_include_other_data_async(self, reso except: pass - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_subdirectories_and_files_include_extended_info_async(self, resource_group, location, storage_account, storage_account_key): + async def test_list_subdirectories_and_files_include_extended_info_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') await asyncio.gather( @@ -498,11 +493,11 @@ async def test_list_subdirectories_and_files_include_extended_info_async(self, r self.assertIsNone(list_dir[0].file_attributes) self.assertIsNone(list_dir[0].last_access_time) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_subdirectories_and_files_with_prefix_async(self, resource_group, location, storage_account, storage_account_key): + async def test_list_subdirectories_and_files_with_prefix_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') await asyncio.gather( @@ -527,11 +522,11 @@ async def test_list_subdirectories_and_files_with_prefix_async(self, resource_gr self.assertEqual(list_dir[2]['name'], 'subdir3') self.assertEqual(list_dir[2]['is_directory'], True) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_subdirectories_and_files_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_list_subdirectories_and_files_with_snapshot_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') await asyncio.gather( @@ -563,11 +558,11 @@ async def test_list_subdirectories_and_files_with_snapshot_async(self, resource_ self.assertEqual(list_dir[2]['is_directory'], False) self.assertEqual(list_dir[2]['size'], 5) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_nested_subdirectories_and_files_async(self, resource_group, location, storage_account, storage_account_key): + async def test_list_nested_subdirectories_and_files_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') subdir = await directory.create_subdirectory("subdir1") @@ -591,11 +586,11 @@ async def test_list_nested_subdirectories_and_files_async(self, resource_group, self.assertEqual(list_dir[1]['is_directory'], False) self.assertEqual(list_dir[1]['size'], 5) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_directory_with_existing_share_async(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_directory_with_existing_share_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') @@ -607,11 +602,11 @@ async def test_delete_directory_with_existing_share_async(self, resource_group, with self.assertRaises(ResourceNotFoundError): await directory.get_directory_properties() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_directory_with_non_existing_directory_async(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_directory_with_non_existing_directory_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = share_client.get_directory_client('dir1') @@ -621,11 +616,11 @@ async def test_delete_directory_with_non_existing_directory_async(self, resource # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_directory_properties_server_encryption_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_directory_properties_server_encryption_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) directory = await share_client.create_directory('dir1') diff --git a/sdk/storage/azure-storage-file-share/tests/test_file.py b/sdk/storage/azure-storage-file-share/tests/test_file.py index f55d2e133bac..aea01bf84168 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file.py @@ -32,12 +32,8 @@ StorageErrorCode, NTFSAttributes) from azure.storage.fileshare._parser import _datetime_to_str -from _shared.testcase import ( - StorageTestCase, - LogCaptured, - GlobalStorageAccountPreparer -) - +from devtools_testutils.storage import StorageTestCase +from settings.testcase import FileSharePreparer # ------------------------------------------------------------------------------ TEST_SHARE_PREFIX = 'share' TEST_BLOB_PREFIX = 'blob' @@ -51,11 +47,11 @@ # ------------------------------------------------------------------------------ class StorageFileTest(StorageTestCase): - def _setup(self, storage_account, storage_account_key, rmt_account=None, rmt_key=None): + def _setup(self, storage_account_name, storage_account_key, rmt_account=None, rmt_key=None): super(StorageFileTest, self).setUp() - url = self.account_url(storage_account, "file") - blob_url = self.account_url(storage_account, "blob") + url = self.account_url(storage_account_name, "file") + blob_url = self.account_url(storage_account_name, "blob") credential = storage_account_key # test chunking functionality by reducing the threshold @@ -166,9 +162,9 @@ def read(self, count): return self.wrapped_file.read(count) # --Test cases for files ---------------------------------------------- - @GlobalStorageAccountPreparer() - def test_make_file_url(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_make_file_url(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client("vhds") file_client = share.get_file_client("vhd_dir/my.vhd") @@ -177,12 +173,12 @@ def test_make_file_url(self, resource_group, location, storage_account, storage_ res = file_client.url # Assert - self.assertEqual(res, 'https://' + storage_account.name + self.assertEqual(res, 'https://' + storage_account_name + '.file.core.windows.net/vhds/vhd_dir/my.vhd') - @GlobalStorageAccountPreparer() - def test_make_file_url_no_directory(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_make_file_url_no_directory(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client("vhds") file_client = share.get_file_client("my.vhd") @@ -190,13 +186,13 @@ def test_make_file_url_no_directory(self, resource_group, location, storage_acco res = file_client.url # Assert - self.assertEqual(res, 'https://' + storage_account.name + self.assertEqual(res, 'https://' + storage_account_name + '.file.core.windows.net/vhds/my.vhd') - @GlobalStorageAccountPreparer() - def test_make_file_url_with_protocol(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - url = self.account_url(storage_account, "file").replace('https', 'http') + @FileSharePreparer() + def test_make_file_url_with_protocol(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + url = self.account_url(storage_account_name, "file").replace('https', 'http') fsc = ShareServiceClient(url, credential=storage_account_key) share = fsc.get_share_client("vhds") file_client = share.get_file_client("vhd_dir/my.vhd") @@ -205,15 +201,15 @@ def test_make_file_url_with_protocol(self, resource_group, location, storage_acc res = file_client.url # Assert - self.assertEqual(res, 'http://' + storage_account.name + self.assertEqual(res, 'http://' + storage_account_name + '.file.core.windows.net/vhds/vhd_dir/my.vhd') - @GlobalStorageAccountPreparer() - def test_make_file_url_with_sas(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_make_file_url_with_sas(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) sas = '?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name="vhds", file_path="vhd_dir/my.vhd", credential=sas @@ -223,15 +219,15 @@ def test_make_file_url_with_sas(self, resource_group, location, storage_account, res = file_client.url # Assert - self.assertEqual(res, 'https://' + storage_account.name + + self.assertEqual(res, 'https://' + storage_account_name + '.file.core.windows.net/vhds/vhd_dir/my.vhd{}'.format(sas)) - @GlobalStorageAccountPreparer() - def test_create_file(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -248,13 +244,13 @@ def test_create_file(self, resource_group, location, storage_account, storage_ac self.assertEqual(props.etag, resp['etag']) self.assertEqual(props.last_modified, resp['last_modified']) - @GlobalStorageAccountPreparer() - def test_create_file_with_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_with_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -269,25 +265,25 @@ def test_create_file_with_metadata(self, resource_group, location, storage_accou self.assertEqual(props.last_modified, resp['last_modified']) self.assertDictEqual(props.metadata, metadata) - @GlobalStorageAccountPreparer() - def test_create_file_when_file_permission_is_too_long(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_when_file_permission_is_too_long(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._get_file_client() permission = str(self.get_random_bytes(8 * 1024 + 1)) with self.assertRaises(ValueError): file_client.create_file(1024, file_permission=permission) - @GlobalStorageAccountPreparer() - def test_create_file_with_invalid_file_permission(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_with_invalid_file_permission(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_client() with self.assertRaises(HttpResponseError): file_name.create_file(1024, file_permission="abcde") - @GlobalStorageAccountPreparer() - def test_create_file_with_lease(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_with_lease(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._get_file_client() file_client.create_file(1024) @@ -302,9 +298,9 @@ def test_create_file_with_lease(self, resource_group, location, storage_account, # There is currently a lease on the file so delete the file with the lease will succeed file_client.delete_file(lease=lease) - @GlobalStorageAccountPreparer() - def test_create_file_with_changed_lease(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_with_changed_lease(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._get_file_client() file_client.create_file(1024) @@ -321,9 +317,9 @@ def test_create_file_with_changed_lease(self, resource_group, location, storage_ self.assertIsNotNone(resp) - @GlobalStorageAccountPreparer() - def test_create_file_will_set_all_smb_properties(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_will_set_all_smb_properties(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._get_file_client() # Act @@ -337,9 +333,9 @@ def test_create_file_will_set_all_smb_properties(self, resource_group, location, self.assertIsNotNone(file_properties.file_attributes) self.assertIsNotNone(file_properties.last_write_time) - @GlobalStorageAccountPreparer() - def test_file_exists(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_file_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -348,12 +344,12 @@ def test_file_exists(self, resource_group, location, storage_account, storage_ac # Assert self.assertTrue(exists) - @GlobalStorageAccountPreparer() - def test_file_not_exists(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_file_not_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path="missingdir/" + file_name, credential=storage_account_key) @@ -364,9 +360,9 @@ def test_file_not_exists(self, resource_group, location, storage_account, storag # Assert - @GlobalStorageAccountPreparer() - def test_file_exists_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_file_exists_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() share_client = self.fsc.get_share_client(self.share_name) snapshot = share_client.create_snapshot() @@ -374,7 +370,7 @@ def test_file_exists_with_snapshot(self, resource_group, location, storage_accou # Act snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -384,9 +380,32 @@ def test_file_exists_with_snapshot(self, resource_group, location, storage_accou # Assert self.assertTrue(props) - @GlobalStorageAccountPreparer() - def test_file_not_exists_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_file_snapshot_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + + share_client = self.fsc.get_share_client(self.share_name) + directory_name = self.get_resource_name("directory") + directory_client = share_client.create_directory(directory_name) + file_name = self._get_file_reference() + file_client = directory_client.get_file_client(file_name) + file_client.upload_file(self.short_byte_data) + + snapshot = share_client.create_snapshot() + share_snapshot_client = self.fsc.get_share_client(self.share_name, snapshot=snapshot) + file_snapshot_client = share_snapshot_client.get_directory_client(directory_name).get_file_client(file_name) + + file_client.delete_file() + + # Act + props = file_snapshot_client.download_file() + + # Assert + self.assertTrue(props) + + @FileSharePreparer() + def test_file_not_exists_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) snapshot = share_client.create_snapshot() @@ -394,7 +413,7 @@ def test_file_not_exists_with_snapshot(self, resource_group, location, storage_a # Act snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -404,9 +423,9 @@ def test_file_not_exists_with_snapshot(self, resource_group, location, storage_a with self.assertRaises(ResourceNotFoundError): snapshot_client.get_file_properties() - @GlobalStorageAccountPreparer() - def test_resize_file(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_resize_file(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -416,9 +435,9 @@ def test_resize_file(self, resource_group, location, storage_account, storage_ac props = file_client.get_file_properties() self.assertEqual(props.size, 5) - @GlobalStorageAccountPreparer() - def test_resize_file_with_lease(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_resize_file_with_lease(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() lease = file_client.acquire_lease() @@ -431,9 +450,9 @@ def test_resize_file_with_lease(self, resource_group, location, storage_account, props = file_client.get_file_properties() self.assertEqual(props.size, 5) - @GlobalStorageAccountPreparer() - def test_set_file_properties(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_file_properties(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -450,9 +469,9 @@ def test_set_file_properties(self, resource_group, location, storage_account, st self.assertIsNotNone(properties.creation_time) self.assertIsNotNone(properties.permission_key) - @GlobalStorageAccountPreparer() - def test_set_file_properties_with_file_permission(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_file_properties_with_file_permission(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() properties_on_creation = file_client.get_file_properties() @@ -481,9 +500,9 @@ def test_set_file_properties_with_file_permission(self, resource_group, location self.assertIn("Archive", properties.file_attributes) self.assertIn("Temporary", properties.file_attributes) - @GlobalStorageAccountPreparer() - def test_get_file_properties(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_properties(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -493,9 +512,9 @@ def test_get_file_properties(self, resource_group, location, storage_account, st self.assertIsNotNone(properties) self.assertEqual(properties.size, len(self.short_byte_data)) - @GlobalStorageAccountPreparer() - def test_get_file_properties_with_invalid_lease_fails(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_properties_with_invalid_lease_fails(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() file_client.acquire_lease() @@ -509,9 +528,9 @@ def test_get_file_properties_with_invalid_lease_fails(self, resource_group, loca self.assertIsNotNone(properties) self.assertEqual(properties.size, len(self.short_byte_data)) - @GlobalStorageAccountPreparer() - def test_get_file_properties_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_properties_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() metadata = {"test1": "foo", "test2": "bar"} file_client.set_file_metadata(metadata) @@ -525,7 +544,7 @@ def test_get_file_properties_with_snapshot(self, resource_group, location, stora # Act file_props = file_client.get_file_properties() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -538,9 +557,9 @@ def test_get_file_properties_with_snapshot(self, resource_group, location, stora self.assertEqual(file_props.size, snapshot_props.size) self.assertDictEqual(metadata, snapshot_props.metadata) - @GlobalStorageAccountPreparer() - def test_get_file_metadata_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_metadata_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() metadata = {"test1": "foo", "test2": "bar"} file_client.set_file_metadata(metadata) @@ -548,7 +567,7 @@ def test_get_file_metadata_with_snapshot(self, resource_group, location, storage share_client = self.fsc.get_share_client(self.share_name) snapshot = share_client.create_snapshot() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -565,12 +584,12 @@ def test_get_file_metadata_with_snapshot(self, resource_group, location, storage self.assertDictEqual(metadata2, file_metadata) self.assertDictEqual(metadata, file_snapshot_metadata) - @GlobalStorageAccountPreparer() - def test_get_file_properties_with_non_existing_file(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_properties_with_non_existing_file(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -581,9 +600,9 @@ def test_get_file_properties_with_non_existing_file(self, resource_group, locati # Assert - @GlobalStorageAccountPreparer() - def test_get_file_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -593,9 +612,9 @@ def test_get_file_metadata(self, resource_group, location, storage_account, stor self.assertIsNotNone(md) self.assertEqual(0, len(md)) - @GlobalStorageAccountPreparer() - def test_set_file_metadata_with_upper_case(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_file_metadata_with_upper_case(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42', 'UP': 'UPval'} file_client = self._create_file() @@ -610,9 +629,9 @@ def test_set_file_metadata_with_upper_case(self, resource_group, location, stora self.assertEqual(md['UP'], 'UPval') self.assertFalse('up' in md) - @GlobalStorageAccountPreparer() - def test_break_lease_with_broken_period_fails(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_break_lease_with_broken_period_fails(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() lease = file_client.acquire_lease() @@ -621,9 +640,9 @@ def test_break_lease_with_broken_period_fails(self, resource_group, location, st with self.assertRaises(TypeError): lease.break_lease(lease_break_period=5) - @GlobalStorageAccountPreparer() - def test_set_file_metadata_with_broken_lease(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_file_metadata_with_broken_lease(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42', 'UP': 'UPval'} file_client = self._create_file() @@ -654,9 +673,9 @@ def test_set_file_metadata_with_broken_lease(self, resource_group, location, sto self.assertEqual(md['UP'], 'UPval') self.assertFalse('up' in md) - @GlobalStorageAccountPreparer() - def test_delete_file_with_existing_file(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_file_with_existing_file(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -666,12 +685,12 @@ def test_delete_file_with_existing_file(self, resource_group, location, storage_ with self.assertRaises(ResourceNotFoundError): file_client.get_file_properties() - @GlobalStorageAccountPreparer() - def test_delete_file_with_non_existing_file(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_file_with_non_existing_file(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -682,9 +701,9 @@ def test_delete_file_with_non_existing_file(self, resource_group, location, stor # Assert - @GlobalStorageAccountPreparer() - def test_update_range(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_update_range(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -697,9 +716,9 @@ def test_update_range(self, resource_group, location, storage_account, storage_a self.assertEqual(data, content[:512]) self.assertEqual(self.short_byte_data[512:], content[512:]) - @GlobalStorageAccountPreparer() - def test_update_range_with_lease(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_update_range_with_lease(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() lease = file_client.acquire_lease() @@ -716,9 +735,9 @@ def test_update_range_with_lease(self, resource_group, location, storage_account self.assertEqual(data, content[:512]) self.assertEqual(self.short_byte_data[512:], content[512:]) - @GlobalStorageAccountPreparer() - def test_update_range_with_md5(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_update_range_with_md5(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -727,9 +746,9 @@ def test_update_range_with_md5(self, resource_group, location, storage_account, # Assert - @GlobalStorageAccountPreparer() - def test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_file_name = 'testfile1' source_file_client = self._create_file(source_file_name) @@ -751,9 +770,9 @@ def test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes( # when the source file has less bytes than 2050, throw exception destination_file_client.upload_range_from_url(source_file_url, offset=0, length=2050, source_offset=0) - @GlobalStorageAccountPreparer() - def test_update_range_from_file_url(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_update_range_from_file_url(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_file_name = 'testfile' source_file_client = self._create_file(file_name=source_file_name) data = b'abcdefghijklmnop' * 32 @@ -786,10 +805,10 @@ def test_update_range_from_file_url(self, resource_group, location, storage_acco self.assertEqual(511, file_ranges[0].get('end')) self.assertEqual(data, file_content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() def test_update_range_from_file_url_with_oauth( - self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_blob_client = self._create_source_blob() token = "Bearer {}".format(self.generate_oauth_token().get_token("https://storage.azure.com/.default").token) @@ -801,9 +820,9 @@ def test_update_range_from_file_url_with_oauth( destination_file_client.upload_range_from_url(source_blob_client.url, offset=0, length=512, source_offset=0, source_authorization=token) - @GlobalStorageAccountPreparer() - def test_update_range_from_file_url_with_lease(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_update_range_from_file_url_with_lease(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_file_name = 'testfile' source_file_client = self._create_file(file_name=source_file_name) data = b'abcdefghijklmnop' * 32 @@ -843,9 +862,9 @@ def test_update_range_from_file_url_with_lease(self, resource_group, location, s self.assertEqual(511, file_ranges[0].get('end')) self.assertEqual(data, file_content) - @GlobalStorageAccountPreparer() - def test_update_big_range_from_file_url(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_update_big_range_from_file_url(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_file_name = 'testfile1' end = 1048575 @@ -879,9 +898,9 @@ def test_update_big_range_from_file_url(self, resource_group, location, storage_ self.assertEqual(end, file_ranges[0].get('end')) self.assertEqual(data, file_content) - @GlobalStorageAccountPreparer() - def test_clear_range(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_clear_range(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -892,9 +911,9 @@ def test_clear_range(self, resource_group, location, storage_account, storage_ac self.assertEqual(b'\x00' * 512, content[:512]) self.assertEqual(self.short_byte_data[512:], content[512:]) - @GlobalStorageAccountPreparer() - def test_update_file_unicode(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_update_file_unicode(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() # Act @@ -910,12 +929,12 @@ def test_update_file_unicode(self, resource_group, location, storage_account, st # Assert - @GlobalStorageAccountPreparer() - def test_list_ranges_none(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_ranges_none(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -928,12 +947,12 @@ def test_list_ranges_none(self, resource_group, location, storage_account, stora self.assertIsNotNone(ranges) self.assertEqual(len(ranges), 0) - @GlobalStorageAccountPreparer() - def test_list_ranges_none_with_invalid_lease_fails(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_ranges_none_with_invalid_lease_fails(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -953,12 +972,12 @@ def test_list_ranges_none_with_invalid_lease_fails(self, resource_group, locatio self.assertEqual(len(ranges), 0) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_list_ranges_diff(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_ranges_diff(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -996,12 +1015,12 @@ def test_list_ranges_diff(self, resource_group, location, storage_account, stora self.assertEqual(cleared2[0]['start'], 512) self.assertEqual(cleared2[0]['end'], 1023) - @GlobalStorageAccountPreparer() - def test_list_ranges_2(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_ranges_2(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1022,12 +1041,12 @@ def test_list_ranges_2(self, resource_group, location, storage_account, storage_ self.assertEqual(ranges[1]['start'], 1024) self.assertEqual(ranges[1]['end'], 1535) - @GlobalStorageAccountPreparer() - def test_list_ranges_none_from_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_ranges_none_from_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1036,7 +1055,7 @@ def test_list_ranges_none_from_snapshot(self, resource_group, location, storage_ share_client = self.fsc.get_share_client(self.share_name) snapshot = share_client.create_snapshot() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -1051,12 +1070,12 @@ def test_list_ranges_none_from_snapshot(self, resource_group, location, storage_ self.assertIsNotNone(ranges) self.assertEqual(len(ranges), 0) - @GlobalStorageAccountPreparer() - def test_list_ranges_2_from_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_ranges_2_from_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1068,7 +1087,7 @@ def test_list_ranges_2_from_snapshot(self, resource_group, location, storage_acc share_client = self.fsc.get_share_client(self.share_name) snapshot = share_client.create_snapshot() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -1087,12 +1106,12 @@ def test_list_ranges_2_from_snapshot(self, resource_group, location, storage_acc self.assertEqual(ranges[1]['start'], 1024) self.assertEqual(ranges[1]['end'], 1535) - @GlobalStorageAccountPreparer() - def test_copy_file_with_existing_file(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_copy_file_with_existing_file(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_client = self._create_file() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path='file1copy', credential=storage_account_key) @@ -1108,12 +1127,12 @@ def test_copy_file_with_existing_file(self, resource_group, location, storage_ac copy_file = file_client.download_file().readall() self.assertEqual(copy_file, self.short_byte_data) - @GlobalStorageAccountPreparer() - def test_copy_existing_file_with_lease(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_copy_existing_file_with_lease(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_client = self._create_file() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path='file1copy', credential=storage_account_key) @@ -1134,15 +1153,15 @@ def test_copy_existing_file_with_lease(self, resource_group, location, storage_a copy_file = file_client.download_file().readall() self.assertEqual(copy_file, self.short_byte_data) - @GlobalStorageAccountPreparer() - def test_copy_file_with_specifying_acl_copy_behavior_attributes(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_copy_file_with_specifying_acl_copy_behavior_attributes(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_client = self._create_file() user_given_permission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-" \ "1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;" \ "S-1-5-21-397955417-626881126-188441444-3053964)" file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path='file1copy', credential=storage_account_key) @@ -1174,14 +1193,14 @@ def test_copy_file_with_specifying_acl_copy_behavior_attributes(self, resource_g copy_file = file_client.download_file().readall() self.assertEqual(copy_file, self.short_byte_data) - @GlobalStorageAccountPreparer() - def test_copy_file_with_specifying_acl_and_attributes_from_source(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_copy_file_with_specifying_acl_and_attributes_from_source(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_client = self._create_file() source_prop = source_client.get_file_properties() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path='file1copy', credential=storage_account_key) @@ -1204,17 +1223,16 @@ def test_copy_file_with_specifying_acl_and_attributes_from_source(self, resource copy_file = file_client.download_file().readall() self.assertEqual(copy_file, self.short_byte_data) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_copy_file_async_private_file(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key, rmt, rmt_key) + @FileSharePreparer() + def test_copy_file_async_private_file(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key) self._create_remote_share() source_file = self._create_remote_file() # Act target_file_name = 'targetfile' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=target_file_name, credential=storage_account_key) @@ -1224,10 +1242,9 @@ def test_copy_file_async_private_file(self, resource_group, location, storage_ac # Assert self.assertEqual(e.exception.error_code, StorageErrorCode.cannot_verify_copy_source) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_copy_file_async_private_file_with_sas(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key, rmt, rmt_key) + @FileSharePreparer() + def test_copy_file_async_private_file_with_sas(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key) data = b'12345678' * 1024 * 1024 self._create_remote_share() source_file = self._create_remote_file(file_data=data) @@ -1244,7 +1261,7 @@ def test_copy_file_async_private_file_with_sas(self, resource_group, location, s # Act target_file_name = 'targetfile' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=target_file_name, credential=storage_account_key) @@ -1257,10 +1274,9 @@ def test_copy_file_async_private_file_with_sas(self, resource_group, location, s actual_data = file_client.download_file().readall() self.assertEqual(actual_data, data) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') - def test_abort_copy_file(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key, rmt, rmt_key) + @FileSharePreparer() + def test_abort_copy_file(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key) data = b'12345678' * 1024 * 1024 self._create_remote_share() source_file = self._create_remote_file(file_data=data) @@ -1277,7 +1293,7 @@ def test_abort_copy_file(self, resource_group, location, storage_account, storag # Act target_file_name = 'targetfile' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=target_file_name, credential=storage_account_key) @@ -1290,15 +1306,15 @@ def test_abort_copy_file(self, resource_group, location, storage_account, storag self.assertEqual(target_file.readall(), b'') self.assertEqual(target_file.properties.copy.status, 'aborted') - @GlobalStorageAccountPreparer() - def test_abort_copy_file_with_synchronous_copy_fails(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_abort_copy_file_with_synchronous_copy_fails(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_file = self._create_file() # Act target_file_name = 'targetfile' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=target_file_name, credential=storage_account_key) @@ -1310,12 +1326,12 @@ def test_abort_copy_file_with_synchronous_copy_fails(self, resource_group, locat # Assert self.assertEqual(copy_resp['copy_status'], 'success') - @GlobalStorageAccountPreparer() - def test_unicode_get_file_unicode_name(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_unicode_get_file_unicode_name(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = '啊齄丂狛狜' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1327,12 +1343,12 @@ def test_unicode_get_file_unicode_name(self, resource_group, location, storage_a # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() - def test_unicode_get_file_unicode_name_with_lease(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_unicode_get_file_unicode_name_with_lease(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = '啊齄丂狛狜' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1353,12 +1369,12 @@ def test_unicode_get_file_unicode_name_with_lease(self, resource_group, location # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() - def test_file_unicode_data(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_file_unicode_data(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1371,9 +1387,9 @@ def test_file_unicode_data(self, resource_group, location, storage_account, stor content = file_client.download_file().readall() self.assertEqual(content, data) - @GlobalStorageAccountPreparer() - def test_file_unicode_data_and_file_attributes(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_file_unicode_data_and_file_attributes(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = self._get_file_client() # Act @@ -1386,15 +1402,15 @@ def test_file_unicode_data_and_file_attributes(self, resource_group, location, s self.assertEqual(content, data) self.assertIn('Temporary', properties.file_attributes) - @GlobalStorageAccountPreparer() - def test_unicode_get_file_binary_data(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_unicode_get_file_binary_data(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) base64_data = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==' binary_data = base64.b64decode(base64_data) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1406,17 +1422,17 @@ def test_unicode_get_file_binary_data(self, resource_group, location, storage_ac # Assert self.assertEqual(content, binary_data) - @GlobalStorageAccountPreparer() - def test_create_file_from_bytes_with_progress(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_bytes_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1438,18 +1454,18 @@ def callback(response): # Assert self.assertFileEqual(file_client, data) - @GlobalStorageAccountPreparer() - def test_create_file_from_bytes_with_index(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_bytes_with_index(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) index = 1024 file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1464,19 +1480,19 @@ def test_create_file_from_bytes_with_index(self, resource_group, location, stora # Assert self.assertFileEqual(file_client, data[1024:]) - @GlobalStorageAccountPreparer() - def test_create_file_from_bytes_with_index_and_count(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_bytes_with_index_and_count(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) index = 512 count = 1024 file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1491,19 +1507,19 @@ def test_create_file_from_bytes_with_index_and_count(self, resource_group, locat # Assert self.assertFileEqual(file_client, data[index:index + count]) - @GlobalStorageAccountPreparer() - def test_create_file_from_path(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_path(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1520,19 +1536,19 @@ def test_create_file_from_path(self, resource_group, location, storage_account, self.assertFileEqual(file_client, data) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() - def test_create_file_from_path_with_progress(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_path_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1560,19 +1576,19 @@ def callback(response): progress, unknown_size=False) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() - def test_create_file_from_stream(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_stream(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1590,19 +1606,19 @@ def test_create_file_from_stream(self, resource_group, location, storage_account self.assertFileEqual(file_client, data[:file_size]) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() - def test_create_file_from_stream_non_seekable(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_stream_non_seekable(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1618,19 +1634,19 @@ def test_create_file_from_stream_non_seekable(self, resource_group, location, st self.assertFileEqual(file_client, data[:file_size]) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() - def test_create_file_from_stream_with_progress(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_stream_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1656,19 +1672,19 @@ def callback(response): progress, unknown_size=False) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() - def test_create_file_from_stream_truncated(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_stream_truncated(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1683,19 +1699,19 @@ def test_create_file_from_stream_truncated(self, resource_group, location, stora self.assertFileEqual(file_client, data[:file_size]) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() - def test_create_file_from_stream_with_progress_truncated(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_stream_with_progress_truncated(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1722,14 +1738,14 @@ def callback(response): progress, unknown_size=False) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() - def test_create_file_from_text(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_from_text(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-8') file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1741,14 +1757,14 @@ def test_create_file_from_text(self, resource_group, location, storage_account, # Assert self.assertFileEqual(file_client, data) - @GlobalStorageAccountPreparer() - def test_create_file_from_text_with_encoding(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_from_text_with_encoding(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1760,18 +1776,18 @@ def test_create_file_from_text_with_encoding(self, resource_group, location, sto # Assert self.assertFileEqual(file_client, data) - @GlobalStorageAccountPreparer() - def test_create_file_from_text_chunked_upload(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_from_text_chunked_upload(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_text_data(LARGE_FILE_SIZE) encoded_data = data.encode('utf-8') file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1783,13 +1799,13 @@ def test_create_file_from_text_chunked_upload(self, resource_group, location, st # Assert self.assertFileEqual(file_client, encoded_data) - @GlobalStorageAccountPreparer() - def test_create_file_with_md5_small(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_file_with_md5_small(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(512) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1800,17 +1816,17 @@ def test_create_file_with_md5_small(self, resource_group, location, storage_acco # Assert - @GlobalStorageAccountPreparer() - def test_create_file_with_md5_large(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_file_with_md5_large(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1822,13 +1838,13 @@ def test_create_file_with_md5_large(self, resource_group, location, storage_acco # Assert # --Test cases for sas & acl ------------------------------------------------ - @GlobalStorageAccountPreparer() - def test_sas_access_file(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_sas_access_file(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() token = generate_file_sas( file_client.account_name, @@ -1841,7 +1857,7 @@ def test_sas_access_file(self, resource_group, location, storage_account, storag # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=token) @@ -1850,13 +1866,13 @@ def test_sas_access_file(self, resource_group, location, storage_account, storag # Assert self.assertEqual(self.short_byte_data, content) - @GlobalStorageAccountPreparer() - def test_sas_signed_identifier(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_sas_signed_identifier(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() share_client = self.fsc.get_share_client(self.share_name) @@ -1884,13 +1900,13 @@ def test_sas_signed_identifier(self, resource_group, location, storage_account, # Assert self.assertEqual(self.short_byte_data, content) - @GlobalStorageAccountPreparer() - def test_account_sas(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_account_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() token = generate_account_sas( self.fsc.account_name, @@ -1902,7 +1918,7 @@ def test_account_sas(self, resource_group, location, storage_account, storage_ac # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=token) @@ -1913,13 +1929,13 @@ def test_account_sas(self, resource_group, location, storage_account, storage_ac self.assertTrue(response.ok) self.assertEqual(self.short_byte_data, response.content) - @GlobalStorageAccountPreparer() - def test_account_sas_credential(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_account_sas_credential(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() token = generate_account_sas( self.fsc.account_name, @@ -1931,7 +1947,7 @@ def test_account_sas_credential(self, resource_group, location, storage_account, # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=AzureSasCredential(token)) @@ -1941,22 +1957,22 @@ def test_account_sas_credential(self, resource_group, location, storage_account, # Assert self.assertIsNotNone(properties) - @GlobalStorageAccountPreparer() - def test_account_sas_raises_if_sas_already_in_uri(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_account_sas_raises_if_sas_already_in_uri(self, storage_account_name, storage_account_key): with self.assertRaises(ValueError): ShareFileClient( - self.account_url(storage_account, "file") + "?sig=foo", + self.account_url(storage_account_name, "file") + "?sig=foo", share_name="foo", file_path="foo", credential=AzureSasCredential("?foo=bar")) - @GlobalStorageAccountPreparer() - def test_shared_read_access_file(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_shared_read_access_file(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() token = generate_file_sas( file_client.account_name, @@ -1969,7 +1985,7 @@ def test_shared_read_access_file(self, resource_group, location, storage_account # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=token) @@ -1979,13 +1995,13 @@ def test_shared_read_access_file(self, resource_group, location, storage_account self.assertTrue(response.ok) self.assertEqual(self.short_byte_data, response.content) - @GlobalStorageAccountPreparer() - def test_shared_read_access_file_with_content_query_params(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_shared_read_access_file_with_content_query_params(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = self._create_file() token = generate_file_sas( file_client.account_name, @@ -2003,7 +2019,7 @@ def test_shared_read_access_file_with_content_query_params(self, resource_group, # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=token) @@ -2017,13 +2033,13 @@ def test_shared_read_access_file_with_content_query_params(self, resource_group, self.assertEqual(response.headers['content-language'], 'fr') self.assertEqual(response.headers['content-type'], 'text') - @GlobalStorageAccountPreparer() - def test_shared_write_access_file(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_shared_write_access_file(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) updated_data = b'updated file data' file_client_admin = self._create_file() token = generate_file_sas( @@ -2035,7 +2051,7 @@ def test_shared_write_access_file(self, resource_group, location, storage_accoun expiry=datetime.utcnow() + timedelta(hours=1), ) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client_admin.file_name, credential=token) @@ -2049,13 +2065,13 @@ def test_shared_write_access_file(self, resource_group, location, storage_accoun file_content = file_client_admin.download_file().readall() self.assertEqual(updated_data, file_content[:len(updated_data)]) - @GlobalStorageAccountPreparer() - def test_shared_delete_access_file(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_shared_delete_access_file(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client_admin = self._create_file() token = generate_file_sas( file_client_admin.account_name, @@ -2066,7 +2082,7 @@ def test_shared_delete_access_file(self, resource_group, location, storage_accou expiry=datetime.utcnow() + timedelta(hours=1), ) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client_admin.file_name, credential=token) diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_api_version.py b/sdk/storage/azure-storage-file-share/tests/test_file_api_version.py index 0c7266f68b5f..b7468014e914 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_api_version.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_api_version.py @@ -5,7 +5,6 @@ # -------------------------------------------------------------------------- import pytest -from _shared.testcase import StorageTestCase, GlobalStorageAccountPreparer from azure.core.exceptions import ResourceExistsError from azure.storage.fileshare._shared.constants import X_MS_VERSION from azure.storage.fileshare import ( @@ -14,6 +13,8 @@ ShareDirectoryClient, ShareFileClient ) +from devtools_testutils.storage import StorageTestCase +from settings.testcase import FileSharePreparer # ------------------------------------------------------------------------------ TEST_FILE_PREFIX = 'file' @@ -173,10 +174,10 @@ def test_invalid_api_version(self): api_version="foo") self.assertTrue(str(error.value).startswith("Unsupported API version 'foo'.")) - @GlobalStorageAccountPreparer() - def test_old_api_copy_file_succeeds(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_old_api_copy_file_succeeds(self, storage_account_name, storage_account_key): fsc = ShareServiceClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), credential=storage_account_key, max_range_size=4 * 1024, api_version=self.api_version_1 @@ -189,7 +190,7 @@ def test_old_api_copy_file_succeeds(self, resource_group, location, storage_acco source_prop = source_client.get_file_properties() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, file_path='file1copy', credential=storage_account_key, diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_api_version_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_api_version_async.py index ae4b856017e5..c7b6a8591356 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_api_version_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_api_version_async.py @@ -5,8 +5,6 @@ # -------------------------------------------------------------------------- import pytest -from _shared.asynctestcase import AsyncStorageTestCase -from _shared.testcase import GlobalStorageAccountPreparer from azure.core.exceptions import ResourceExistsError from azure.storage.fileshare._shared.constants import X_MS_VERSION from azure.storage.fileshare.aio import ( @@ -15,6 +13,8 @@ ShareDirectoryClient, ShareFileClient ) +from settings.testcase import FileSharePreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ TEST_FILE_PREFIX = 'file' @@ -174,11 +174,11 @@ def test_invalid_api_version(self): api_version="foo") self.assertTrue(str(error.value).startswith("Unsupported API version 'foo'.")) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_old_api_copy_file_succeeds_async(self, resource_group, location, storage_account, storage_account_key): + async def test_old_api_copy_file_succeeds_async(self, storage_account_name, storage_account_key): fsc = ShareServiceClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), credential=storage_account_key, max_range_size=4 * 1024, api_version=self.api_version_1 @@ -191,7 +191,7 @@ async def test_old_api_copy_file_succeeds_async(self, resource_group, location, source_prop = await source_client.get_file_properties() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, file_path='file1copy', credential=storage_account_key, diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_async.py index 8e26444d8289..29fc7cc5ac5d 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_async.py @@ -35,11 +35,8 @@ ShareFileClient, ShareServiceClient, ) -from _shared.testcase import ( - LogCaptured, - GlobalStorageAccountPreparer -) -from _shared.asynctestcase import AsyncStorageTestCase +from settings.testcase import FileSharePreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ TEST_SHARE_PREFIX = 'share' @@ -65,9 +62,9 @@ async def send(self, request, **config): class StorageFileAsyncTest(AsyncStorageTestCase): - def _setup(self, storage_account, storage_account_key, rmt_account=None, rmt_key=None): - url = self.account_url(storage_account, "file") - blob_url = self.account_url(storage_account, "blob") + def _setup(self, storage_account_name, storage_account_key, rmt_account=None, rmt_key=None): + url = self.account_url(storage_account_name, "file") + blob_url = self.account_url(storage_account_name, "blob") credential = storage_account_key # test chunking functionality by reducing the threshold @@ -106,10 +103,10 @@ async def _create_source_blob(self): await blob_client.upload_blob(b'abcdefghijklmnop' * 32, overwrite=True) return blob_client - async def _setup_share(self, storage_account, storage_account_key, remote=False): + async def _setup_share(self, storage_account_name, storage_account_key, remote=False): share_name = self.remote_share_name if remote else self.share_name async with ShareServiceClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), credential=storage_account_key, max_range_size=4 * 1024) as fsc: if not self.is_playback(): @@ -118,24 +115,24 @@ async def _setup_share(self, storage_account, storage_account_key, remote=False) except: pass - async def _create_file(self, storage_account, storage_account_key, file_name=None): - await self._setup_share(storage_account, storage_account_key) + async def _create_file(self, storage_account_name, storage_account_key, file_name=None): + await self._setup_share(storage_account_name, storage_account_key) file_name = self._get_file_reference() if file_name is None else file_name share_client = self.fsc.get_share_client(self.share_name) file_client = share_client.get_file_client(file_name) await file_client.upload_file(self.short_byte_data) return file_client - async def _create_empty_file(self, storage_account, storage_account_key, file_name=None, file_size=2048): - await self._setup_share(storage_account, storage_account_key) + async def _create_empty_file(self, storage_account_name, storage_account_key, file_name=None, file_size=2048): + await self._setup_share(storage_account_name, storage_account_key) file_name = self._get_file_reference() if file_name is None else file_name share_client = self.fsc.get_share_client(self.share_name) file_client = share_client.get_file_client(file_name) await file_client.create_file(file_size) return file_client - async def _get_file_client(self, storage_account, storage_account_key): - await self._setup_share(storage_account, storage_account_key) + async def _get_file_client(self, storage_account_name, storage_account_key): + await self._setup_share(storage_account_name, storage_account_key) file_name = self._get_file_reference() share_client = self.fsc.get_share_client(self.share_name) file_client = share_client.get_file_client(file_name) @@ -188,10 +185,10 @@ def read(self, count): return self.wrapped_file.read(count) # --Test cases for files ---------------------------------------------- - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_make_file_url_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_make_file_url_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client("vhds") file_client = share.get_file_client("vhd_dir/my.vhd") @@ -200,13 +197,13 @@ async def test_make_file_url_async(self, resource_group, location, storage_accou res = file_client.url # Assert - self.assertEqual(res, 'https://' + storage_account.name + self.assertEqual(res, 'https://' + storage_account_name + '.file.core.windows.net/vhds/vhd_dir/my.vhd') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_make_file_url_no_directory_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_make_file_url_no_directory_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client("vhds") file_client = share.get_file_client("my.vhd") @@ -214,14 +211,14 @@ async def test_make_file_url_no_directory_async(self, resource_group, location, res = file_client.url # Assert - self.assertEqual(res, 'https://' + storage_account.name + self.assertEqual(res, 'https://' + storage_account_name + '.file.core.windows.net/vhds/my.vhd') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_make_file_url_with_protocol(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - url = self.account_url(storage_account, "file").replace('https', 'http') + async def test_make_file_url_with_protocol(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + url = self.account_url(storage_account_name, "file").replace('https', 'http') fsc = ShareServiceClient(url, credential=storage_account_key) share = fsc.get_share_client("vhds") file_client = share.get_file_client("vhd_dir/my.vhd") @@ -230,16 +227,16 @@ async def test_make_file_url_with_protocol(self, resource_group, location, stora res = file_client.url # Assert - self.assertEqual(res, 'http://' + storage_account.name + self.assertEqual(res, 'http://' + storage_account_name + '.file.core.windows.net/vhds/vhd_dir/my.vhd') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_make_file_url_with_sas(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_make_file_url_with_sas(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) sas = '?sv=2015-04-05&st=2015-04-29T22%3A18%3A26Z&se=2015-04-30T02%3A23%3A26Z&sr=b&sp=rw&sip=168.1.5.60-168.1.5.70&spr=https&sig=Z%2FRHIX5Xcg0Mq2rqI3OlWTjEg2tYkboXr1P9ZUXDtkk%3D' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name="vhds", file_path="vhd_dir/my.vhd", credential=sas @@ -249,17 +246,17 @@ async def test_make_file_url_with_sas(self, resource_group, location, storage_ac res = file_client.url # Assert - self.assertEqual(res, 'https://' + storage_account.name + + self.assertEqual(res, 'https://' + storage_account_name + '.file.core.windows.net/vhds/vhd_dir/my.vhd{}'.format(sas)) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - await self._setup_share(storage_account, storage_account_key) + async def test_create_file_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_name = self._get_file_reference() async with ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) as file_client: @@ -273,15 +270,15 @@ async def test_create_file_async(self, resource_group, location, storage_account self.assertEqual(props.etag, resp['etag']) self.assertEqual(props.last_modified, resp['last_modified']) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_with_metadata_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - await self._setup_share(storage_account, storage_account_key) + async def test_create_file_with_metadata_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} file_name = self._get_file_reference() async with ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) as file_client: @@ -296,29 +293,29 @@ async def test_create_file_with_metadata_async(self, resource_group, location, s self.assertEqual(props.last_modified, resp['last_modified']) self.assertDictEqual(props.metadata, metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_when_file_permission_is_too_long(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._get_file_client(storage_account, storage_account_key) + async def test_create_file_when_file_permission_is_too_long(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._get_file_client(storage_account_name, storage_account_key) permission = str(self.get_random_bytes(8 * 1024 + 1)) with self.assertRaises(ValueError): await file_client.create_file(1024, file_permission=permission) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_with_invalid_file_permission(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_name = await self._get_file_client(storage_account, storage_account_key) + async def test_create_file_with_invalid_file_permission(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_name = await self._get_file_client(storage_account_name, storage_account_key) with self.assertRaises(HttpResponseError): await file_name.create_file(1024, file_permission="abcde") - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_with_lease_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._get_file_client(storage_account, storage_account_key) + async def test_create_file_with_lease_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._get_file_client(storage_account_name, storage_account_key) await file_client.create_file(1024) lease = await file_client.acquire_lease() @@ -332,11 +329,11 @@ async def test_create_file_with_lease_async(self, resource_group, location, stor # There is currently a lease on the file so delete the file with the lease will succeed await file_client.delete_file(lease=lease) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_with_changed_lease_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._get_file_client(storage_account, storage_account_key) + async def test_create_file_with_changed_lease_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._get_file_client(storage_account_name, storage_account_key) await file_client.create_file(1024) lease = await file_client.acquire_lease() @@ -352,11 +349,11 @@ async def test_create_file_with_changed_lease_async(self, resource_group, locati self.assertIsNotNone(resp) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_will_set_all_smb_properties(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._get_file_client(storage_account, storage_account_key) + async def test_create_file_will_set_all_smb_properties(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._get_file_client(storage_account_name, storage_account_key) # Act await file_client.create_file(1024) @@ -369,11 +366,11 @@ async def test_create_file_will_set_all_smb_properties(self, resource_group, loc self.assertIsNotNone(file_properties.file_attributes) self.assertIsNotNone(file_properties.last_write_time) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_file_exists_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_file_exists_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act exists = await file_client.get_file_properties() @@ -381,13 +378,36 @@ async def test_file_exists_async(self, resource_group, location, storage_account # Assert self.assertTrue(exists) - @GlobalStorageAccountPreparer() + @FileSharePreparer() + async def test_snapshot_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) + share_client = self.fsc.get_share_client(self.share_name) + directory_name = self.get_resource_name("directory") + directory_client = await share_client.create_directory(directory_name) + file_name = self._get_file_reference() + file_client = directory_client.get_file_client(file_name) + await file_client.upload_file(self.short_byte_data) + + snapshot = await share_client.create_snapshot() + share_snapshot_client = self.fsc.get_share_client(self.share_name, snapshot=snapshot) + file_snapshot_client = share_snapshot_client.get_directory_client(directory_name).get_file_client(file_name) + + await file_client.delete_file() + + # Act + props = await file_snapshot_client.download_file() + + # Assert + self.assertTrue(props) + + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_file_not_exists_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_file_not_exists_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path="missingdir/" + file_name, credential=storage_account_key) @@ -396,18 +416,18 @@ async def test_file_not_exists_async(self, resource_group, location, storage_acc with self.assertRaises(ResourceNotFoundError): await file_client.get_file_properties() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_file_exists_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_file_exists_with_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) snapshot = await share_client.create_snapshot() await file_client.delete_file() # Act snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -417,19 +437,19 @@ async def test_file_exists_with_snapshot_async(self, resource_group, location, s # Assert self.assertTrue(props) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_file_not_exists_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - await self._setup_share(storage_account, storage_account_key) + async def test_file_not_exists_with_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) snapshot = await share_client.create_snapshot() - file_client = await self._create_file(storage_account, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -439,11 +459,11 @@ async def test_file_not_exists_with_snapshot_async(self, resource_group, locatio with self.assertRaises(ResourceNotFoundError): await snapshot_client.get_file_properties() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_resize_file_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_resize_file_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act await file_client.resize_file(5) @@ -452,11 +472,11 @@ async def test_resize_file_async(self, resource_group, location, storage_account props = await file_client.get_file_properties() self.assertEqual(props.size, 5) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_resize_file_with_lease_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_resize_file_with_lease_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) lease = await file_client.acquire_lease() # Act @@ -468,11 +488,11 @@ async def test_resize_file_with_lease_async(self, resource_group, location, stor props = await file_client.get_file_properties() self.assertEqual(props.size, 5) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_file_properties_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_set_file_properties_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act content_settings = ContentSettings( @@ -488,11 +508,11 @@ async def test_set_file_properties_async(self, resource_group, location, storage self.assertIsNotNone(properties.creation_time) self.assertIsNotNone(properties.permission_key) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_file_properties_with_file_permission(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_set_file_properties_with_file_permission(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) properties_on_creation = await file_client.get_file_properties() content_settings = ContentSettings( @@ -520,11 +540,11 @@ async def test_set_file_properties_with_file_permission(self, resource_group, lo self.assertIn("Archive", properties.file_attributes) self.assertIn("Temporary", properties.file_attributes) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_properties_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_get_file_properties_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act properties = await file_client.get_file_properties() @@ -533,11 +553,11 @@ async def test_get_file_properties_async(self, resource_group, location, storage self.assertIsNotNone(properties) self.assertEqual(properties.size, len(self.short_byte_data)) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_properties_with_invalid_lease_fails_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_get_file_properties_with_invalid_lease_fails_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) file_client.acquire_lease() # Act @@ -551,11 +571,11 @@ async def test_get_file_properties_with_invalid_lease_fails_async(self, resource self.assertIsNotNone(properties) self.assertEqual(properties.size, len(self.short_byte_data)) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_properties_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_get_file_properties_with_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) metadata = {"test1": "foo", "test2": "bar"} await file_client.set_file_metadata(metadata) @@ -568,7 +588,7 @@ async def test_get_file_properties_with_snapshot_async(self, resource_group, loc # Act file_props = await file_client.get_file_properties() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -580,18 +600,18 @@ async def test_get_file_properties_with_snapshot_async(self, resource_group, loc self.assertEqual(snapshot_props.snapshot, snapshot_client.snapshot) self.assertDictEqual(metadata, snapshot_props.metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_metadata_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_get_file_metadata_with_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) metadata = {"test1": "foo", "test2": "bar"} await file_client.set_file_metadata(metadata) share_client = self.fsc.get_share_client(self.share_name) snapshot = await share_client.create_snapshot() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -608,13 +628,13 @@ async def test_get_file_metadata_with_snapshot_async(self, resource_group, locat self.assertDictEqual(metadata2, file_metadata.metadata) self.assertDictEqual(metadata, file_snapshot_metadata.metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_properties_with_non_existing_file_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_get_file_properties_with_non_existing_file_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -625,11 +645,11 @@ async def test_get_file_properties_with_non_existing_file_async(self, resource_g # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_metadata_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_get_file_metadata_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act md = await file_client.get_file_properties() @@ -639,13 +659,13 @@ async def test_get_file_metadata_async(self, resource_group, location, storage_a self.assertEqual(0, len(md.metadata)) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_file_metadata_with_upper_case_async(self, resource_group, location, storage_account, storage_account_key): + async def test_set_file_metadata_with_upper_case_async(self, storage_account_name, storage_account_key): # Make this test live test only, for the reason that metadata can only be recorded in lower case. - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42', 'UP': 'UPval'} - file_client = await self._create_file(storage_account, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act await file_client.set_file_metadata(metadata) @@ -660,11 +680,11 @@ async def test_set_file_metadata_with_upper_case_async(self, resource_group, loc self.assertFalse('up' in md) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_break_lease_with_broken_period_fails(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_break_lease_with_broken_period_fails(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) lease = await file_client.acquire_lease() # Assert @@ -673,13 +693,13 @@ async def test_break_lease_with_broken_period_fails(self, resource_group, locati await lease.break_lease(lease_break_period=5) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_file_metadata_with_broken_lease_async(self, resource_group, location, storage_account, storage_account_key): + async def test_set_file_metadata_with_broken_lease_async(self, storage_account_name, storage_account_key): # Make this test live test only, for the reason that metadata can only be recorded in lower case. - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42', 'UP': 'UPval'} - file_client = await self._create_file(storage_account, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) lease = await file_client.acquire_lease() with self.assertRaises(HttpResponseError): @@ -708,11 +728,11 @@ async def test_set_file_metadata_with_broken_lease_async(self, resource_group, l self.assertEqual(md['UP'], 'UPval') self.assertFalse('up' in md) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_file_with_existing_file_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_delete_file_with_existing_file_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act await file_client.delete_file() @@ -721,13 +741,13 @@ async def test_delete_file_with_existing_file_async(self, resource_group, locati with self.assertRaises(ResourceNotFoundError): await file_client.get_file_properties() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_file_with_non_existing_file_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_delete_file_with_non_existing_file_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -739,11 +759,11 @@ async def test_delete_file_with_non_existing_file_async(self, resource_group, lo # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_range_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_update_range_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act data = b'abcdefghijklmnop' * 32 @@ -755,11 +775,11 @@ async def test_update_range_async(self, resource_group, location, storage_accoun self.assertEqual(data, content[:512]) self.assertEqual(self.short_byte_data[512:], content[512:]) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_range_with_lease_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_update_range_with_lease_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) lease = await file_client.acquire_lease() # Act @@ -774,11 +794,11 @@ async def test_update_range_with_lease_async(self, resource_group, location, sto self.assertEqual(data, content[:512]) self.assertEqual(self.short_byte_data[512:], content[512:]) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_range_with_md5_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_update_range_with_md5_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act data = b'abcdefghijklmnop' * 32 @@ -786,15 +806,15 @@ async def test_update_range_with_md5_async(self, resource_group, location, stora # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_update_range_from_file_url_when_source_file_does_not_have_enough_bytes(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_file_name = 'testfile1' - source_file_client = await self._create_file(storage_account, storage_account_key, file_name=source_file_name) + source_file_client = await self._create_file(storage_account_name, storage_account_key, file_name=source_file_name) destination_file_name = 'filetoupdate' - destination_file_client = await self._create_file(storage_account, storage_account_key, file_name=destination_file_name) + destination_file_client = await self._create_file(storage_account_name, storage_account_key, file_name=destination_file_name) # generate SAS for the source file sas_token_for_source_file = generate_file_sas( @@ -810,17 +830,17 @@ async def test_update_range_from_file_url_when_source_file_does_not_have_enough_ # when the source file has less bytes than 2050, throw exception await destination_file_client.upload_range_from_url(source_file_url, offset=0, length=2050, source_offset=0) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_range_from_file_url(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_update_range_from_file_url(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_file_name = 'testfile' - source_file_client = await self._create_file(storage_account, storage_account_key, file_name=source_file_name) + source_file_client = await self._create_file(storage_account_name, storage_account_key, file_name=source_file_name) data = b'abcdefghijklmnop' * 32 await source_file_client.upload_range(data, offset=0, length=512) destination_file_name = 'filetoupdate' - destination_file_client = await self._create_empty_file(storage_account, storage_account_key, file_name=destination_file_name) + destination_file_client = await self._create_empty_file(storage_account_name, storage_account_key, file_name=destination_file_name) # generate SAS for the source file sas_token_for_source_file = generate_file_sas( @@ -845,18 +865,18 @@ async def test_update_range_from_file_url(self, resource_group, location, storag self.assertEqual(511, file_ranges[0].get('end')) self.assertEqual(data, file_content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test async def test_update_range_from_file_url_with_oauth( - self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_blob_client = await self._create_source_blob() access_token = await self.generate_oauth_token().get_token("https://storage.azure.com/.default") token = "Bearer {}".format(access_token.token) destination_file_name = 'filetoupdate' destination_file_client = await self._create_empty_file( - storage_account, storage_account_key, file_name=destination_file_name) + storage_account_name, storage_account_key, file_name=destination_file_name) with self.assertRaises(HttpResponseError): await destination_file_client.upload_range_from_url( source_blob_client.url, offset=0, length=512, source_offset=0) @@ -864,17 +884,17 @@ async def test_update_range_from_file_url_with_oauth( await destination_file_client.upload_range_from_url( source_blob_client.url, offset=0, length=512, source_offset=0, source_authorization=token) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_range_from_file_url_with_lease_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_update_range_from_file_url_with_lease_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_file_name = 'testfile' - source_file_client = await self._create_file(storage_account, storage_account_key, file_name=source_file_name) + source_file_client = await self._create_file(storage_account_name, storage_account_key, file_name=source_file_name) data = b'abcdefghijklmnop' * 32 await source_file_client.upload_range(data, offset=0, length=512) destination_file_name = 'filetoupdate' - destination_file_client = await self._create_empty_file(storage_account, storage_account_key, file_name=destination_file_name) + destination_file_client = await self._create_empty_file(storage_account_name, storage_account_key, file_name=destination_file_name) lease = await destination_file_client.acquire_lease() # generate SAS for the source file @@ -903,19 +923,19 @@ async def test_update_range_from_file_url_with_lease_async(self, resource_group, self.assertEqual(511, file_ranges[0].get('end')) self.assertEqual(data, file_content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_big_range_from_file_url(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_update_big_range_from_file_url(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) source_file_name = 'testfile1' end = 1048575 - source_file_client = await self._create_empty_file(storage_account, storage_account_key, file_name=source_file_name, file_size=1024 * 1024) + source_file_client = await self._create_empty_file(storage_account_name, storage_account_key, file_name=source_file_name, file_size=1024 * 1024) data = b'abcdefghijklmnop' * 65536 await source_file_client.upload_range(data, offset=0, length=end+1) destination_file_name = 'filetoupdate1' - destination_file_client = await self._create_empty_file(storage_account, storage_account_key, file_name=destination_file_name, file_size=1024 * 1024) + destination_file_client = await self._create_empty_file(storage_account_name, storage_account_key, file_name=destination_file_name, file_size=1024 * 1024) # generate SAS for the source file sas_token_for_source_file = generate_file_sas( @@ -941,11 +961,11 @@ async def test_update_big_range_from_file_url(self, resource_group, location, st self.assertEqual(end, file_ranges[0].get('end')) self.assertEqual(data, file_content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_clear_range_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_clear_range_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act resp = await file_client.clear_range(offset=0, length=512) @@ -956,11 +976,11 @@ async def test_clear_range_async(self, resource_group, location, storage_account self.assertEqual(b'\x00' * 512, content[:512]) self.assertEqual(self.short_byte_data[512:], content[512:]) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_file_unicode_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + async def test_update_file_unicode_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) # Act data = u'abcdefghijklmnop' * 32 @@ -976,14 +996,14 @@ async def test_update_file_unicode_async(self, resource_group, location, storage # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_ranges_none_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_ranges_none_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -997,14 +1017,14 @@ async def test_list_ranges_none_async(self, resource_group, location, storage_ac self.assertIsNotNone(ranges) self.assertEqual(len(ranges), 0) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_ranges_none_with_invalid_lease_fails_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_ranges_none_with_invalid_lease_fails_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1024,14 +1044,14 @@ async def test_list_ranges_none_with_invalid_lease_fails_async(self, resource_gr self.assertEqual(len(ranges), 0) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_ranges_diff(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_ranges_diff(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1069,14 +1089,14 @@ async def test_list_ranges_diff(self, resource_group, location, storage_account, self.assertEqual(cleared2[0]['start'], 512) self.assertEqual(cleared2[0]['end'], 1023) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_ranges_2_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_ranges_2_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1098,14 +1118,14 @@ async def test_list_ranges_2_async(self, resource_group, location, storage_accou self.assertEqual(ranges[1]['start'], 1024) self.assertEqual(ranges[1]['end'], 1535) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_ranges_none_from_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_ranges_none_from_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1114,7 +1134,7 @@ async def test_list_ranges_none_from_snapshot_async(self, resource_group, locati share_client = self.fsc.get_share_client(self.share_name) snapshot = await share_client.create_snapshot() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -1130,14 +1150,14 @@ async def test_list_ranges_none_from_snapshot_async(self, resource_group, locati self.assertIsNotNone(ranges) self.assertEqual(len(ranges), 0) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_ranges_2_from_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_ranges_2_from_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1150,7 +1170,7 @@ async def test_list_ranges_2_from_snapshot_async(self, resource_group, location, share_client = self.fsc.get_share_client(self.share_name) snapshot = await share_client.create_snapshot() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, snapshot=snapshot, @@ -1170,13 +1190,13 @@ async def test_list_ranges_2_from_snapshot_async(self, resource_group, location, self.assertEqual(ranges[1]['start'], 1024) self.assertEqual(ranges[1]['end'], 1535) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_file_with_existing_file_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - source_client = await self._create_file(storage_account, storage_account_key) + async def test_copy_file_with_existing_file_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + source_client = await self._create_file(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path='file1copy', credential=storage_account_key, @@ -1194,13 +1214,13 @@ async def test_copy_file_with_existing_file_async(self, resource_group, location content = await copy_file.readall() self.assertEqual(content, self.short_byte_data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_existing_file_with_lease_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - source_client = await self._create_file(storage_account, storage_account_key) + async def test_copy_existing_file_with_lease_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + source_client = await self._create_file(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path='file1copy', credential=storage_account_key) @@ -1222,16 +1242,16 @@ async def test_copy_existing_file_with_lease_async(self, resource_group, locatio content = await copy_file.readall() self.assertEqual(content, self.short_byte_data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_file_with_specifying_acl_copy_behavior_attributes_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - source_client = await self._create_file(storage_account, storage_account_key) + async def test_copy_file_with_specifying_acl_copy_behavior_attributes_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + source_client = await self._create_file(storage_account_name, storage_account_key) user_given_permission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-" \ "1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;" \ "S-1-5-21-397955417-626881126-188441444-3053964)" file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path='file1copy', credential=storage_account_key, @@ -1265,14 +1285,14 @@ async def test_copy_file_with_specifying_acl_copy_behavior_attributes_async(self content = await copy_file.readall() self.assertEqual(content, self.short_byte_data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_file_with_specifying_acl_and_attributes_from_source_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - source_client = await self._create_file(storage_account, storage_account_key) + async def test_copy_file_with_specifying_acl_and_attributes_from_source_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + source_client = await self._create_file(storage_account_name, storage_account_key) source_prop = await source_client.get_file_properties() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path='file1copy', credential=storage_account_key, @@ -1297,19 +1317,18 @@ async def test_copy_file_with_specifying_acl_and_attributes_from_source_async(se content = await copy_file.readall() self.assertEqual(content, self.short_byte_data) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_file_async_private_file_async(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key, rmt, rmt_key) - await self._setup_share(storage_account, storage_account_key) + async def test_copy_file_async_private_file_async(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) await self._create_remote_share() source_file = await self._create_remote_file() # Act target_file_name = 'targetfile' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=target_file_name, credential=storage_account_key, @@ -1321,11 +1340,10 @@ async def test_copy_file_async_private_file_async(self, resource_group, location self.assertEqual(e.exception.error_code, StorageErrorCode.cannot_verify_copy_source) await self.fsc2.delete_share(self.remote_share_name) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_copy_file_async_private_file_with_sas_async(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key, rmt, rmt_key) + async def test_copy_file_async_private_file_with_sas_async(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key) data = b'12345678' * 1024 * 1024 await self._create_remote_share() source_file = await self._create_remote_file(file_data=data) @@ -1341,9 +1359,9 @@ async def test_copy_file_async_private_file_with_sas_async(self, resource_group, # Act target_file_name = 'targetfile' - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=target_file_name, credential=storage_account_key, @@ -1358,13 +1376,12 @@ async def test_copy_file_async_private_file_with_sas_async(self, resource_group, actual_data = await content.readall() self.assertEqual(actual_data, data) - @GlobalStorageAccountPreparer() - @StorageAccountPreparer(random_name_enabled=True, name_prefix='pyrmtstorage', parameter_name='rmt') + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_abort_copy_file_async(self, resource_group, location, storage_account, storage_account_key, rmt, rmt_key): - self._setup(storage_account, storage_account_key, rmt, rmt_key) + async def test_abort_copy_file_async(self, storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key): + self._setup(storage_account_name, storage_account_key, secondary_storage_account_name, secondary_storage_account_key) data = b'12345678' * 1024 * 1024 - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) await self._create_remote_share() source_file = await self._create_remote_file(file_data=data) sas_token = generate_file_sas( @@ -1380,7 +1397,7 @@ async def test_abort_copy_file_async(self, resource_group, location, storage_acc # Act target_file_name = 'targetfile' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=target_file_name, credential=storage_account_key, @@ -1395,16 +1412,16 @@ async def test_abort_copy_file_async(self, resource_group, location, storage_acc self.assertEqual(content, b'') self.assertEqual(target_file.properties.copy.status, 'aborted') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_abort_copy_file_with_synchronous_copy_fails_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - source_file = await self._create_file(storage_account, storage_account_key) + async def test_abort_copy_file_with_synchronous_copy_fails_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + source_file = await self._create_file(storage_account_name, storage_account_key) # Act target_file_name = 'targetfile' file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=target_file_name, credential=storage_account_key, @@ -1417,14 +1434,14 @@ async def test_abort_copy_file_with_synchronous_copy_fails_async(self, resource_ # Assert self.assertEqual(copy_resp['copy_status'], 'success') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_get_file_unicode_name_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_unicode_get_file_unicode_name_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = '啊齄丂狛狜' - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1438,14 +1455,14 @@ async def test_unicode_get_file_unicode_name_async(self, resource_group, locatio # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_get_file_unicode_name_with_lease_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_unicode_get_file_unicode_name_with_lease_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = '啊齄丂狛狜' - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1469,14 +1486,14 @@ async def test_unicode_get_file_unicode_name_with_lease_async(self, resource_gro # Assert self.assertEqual(content, b'hello world') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_file_unicode_data_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_file_unicode_data_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1490,11 +1507,11 @@ async def test_file_unicode_data_async(self, resource_group, location, storage_a content = await content.readall() self.assertEqual(content, data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_file_unicode_data_and_file_attributes(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - file_client = await self._get_file_client(storage_account, storage_account_key) + async def test_file_unicode_data_and_file_attributes(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + file_client = await self._get_file_client(storage_account_name, storage_account_key) # Act data = u'hello world啊齄丂狛狜'.encode('utf-8') @@ -1507,17 +1524,17 @@ async def test_file_unicode_data_and_file_attributes(self, resource_group, locat self.assertEqual(transformed_content, data) self.assertIn('Temporary', properties.file_attributes) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_get_file_binary_data_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_unicode_get_file_binary_data_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) base64_data = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==' binary_data = base64.b64decode(base64_data) - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key) @@ -1531,19 +1548,19 @@ async def test_unicode_get_file_binary_data_async(self, resource_group, location self.assertEqual(content, binary_data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_bytes_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_bytes_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) - await self._setup_share(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) file_name = self._get_file_reference() data = self.get_random_bytes(LARGE_FILE_SIZE) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1562,20 +1579,20 @@ def callback(response): # Assert await self.assertFileEqual(file_client, data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_bytes_with_index_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_bytes_with_index_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) index = 1024 file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1590,21 +1607,21 @@ async def test_create_file_from_bytes_with_index_async(self, resource_group, loc # Assert await self.assertFileEqual(file_client, data[1024:]) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_bytes_with_index_and_count_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_bytes_with_index_and_count_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) index = 512 count = 1024 file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1619,21 +1636,21 @@ async def test_create_file_from_bytes_with_index_and_count_async(self, resource_ # Assert await self.assertFileEqual(file_client, data[index:index + count]) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_path_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_path_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1650,21 +1667,21 @@ async def test_create_file_from_path_async(self, resource_group, location, stora await self.assertFileEqual(file_client, data) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_path_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_path_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1692,21 +1709,21 @@ def callback(response): progress, unknown_size=False) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_stream_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_stream_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1724,21 +1741,21 @@ async def test_create_file_from_stream_async(self, resource_group, location, sto await self.assertFileEqual(file_client, data[:file_size]) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_stream_non_seekable_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_stream_non_seekable_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1754,21 +1771,21 @@ async def test_create_file_from_stream_non_seekable_async(self, resource_group, await self.assertFileEqual(file_client, data[:file_size]) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_stream_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_stream_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1794,21 +1811,21 @@ def callback(response): progress, unknown_size=False) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_stream_truncated_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_stream_truncated_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1823,21 +1840,21 @@ async def test_create_file_from_stream_truncated_async(self, resource_group, loc await self.assertFileEqual(file_client, data[:file_size]) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_stream_with_progress_truncated_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_stream_with_progress_truncated_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) with open(INPUT_FILE_PATH, 'wb') as stream: stream.write(data) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1864,16 +1881,16 @@ def callback(response): progress, unknown_size=False) self._teardown(INPUT_FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_text_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_file_from_text_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-8') file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1885,16 +1902,16 @@ async def test_create_file_from_text_async(self, resource_group, location, stora # Assert await self.assertFileEqual(file_client, data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_text_with_encoding_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_file_from_text_with_encoding_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1907,20 +1924,20 @@ async def test_create_file_from_text_with_encoding_async(self, resource_group, l await self.assertFileEqual(file_client, data) self._teardown(file_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_from_text_chunked_upload_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_from_text_chunked_upload_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_text_data(LARGE_FILE_SIZE) encoded_data = data.encode('utf-8') file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1933,15 +1950,15 @@ async def test_create_file_from_text_chunked_upload_async(self, resource_group, await self.assertFileEqual(file_client, encoded_data) self._teardown(file_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_with_md5_small_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_file_with_md5_small_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(512) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1952,19 +1969,19 @@ async def test_create_file_with_md5_small_async(self, resource_group, location, self._teardown(file_name) # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_file_with_md5_large_async(self, resource_group, location, storage_account, storage_account_key): + async def test_create_file_with_md5_large_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() - await self._setup_share(storage_account, storage_account_key) + await self._setup_share(storage_account_name, storage_account_key) data = self.get_random_bytes(LARGE_FILE_SIZE) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_name, credential=storage_account_key, @@ -1976,15 +1993,15 @@ async def test_create_file_with_md5_large_async(self, resource_group, location, # Assert # --Test cases for sas & acl ------------------------------------------------ - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_access_file_async(self, resource_group, location, storage_account, storage_account_key): + async def test_sas_access_file_async(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) token = generate_file_sas( file_client.account_name, file_client.share_name, @@ -1996,7 +2013,7 @@ async def test_sas_access_file_async(self, resource_group, location, storage_acc # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=token) @@ -2006,15 +2023,15 @@ async def test_sas_access_file_async(self, resource_group, location, storage_acc # Assert self.assertEqual(self.short_byte_data, content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_signed_identifier_async(self, resource_group, location, storage_account, storage_account_key): + async def test_sas_signed_identifier_async(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) share_client = self.fsc.get_share_client(self.share_name) access_policy = AccessPolicy() @@ -2042,15 +2059,15 @@ async def test_sas_signed_identifier_async(self, resource_group, location, stora # Assert self.assertEqual(self.short_byte_data, content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_account_sas_async(self, resource_group, location, storage_account, storage_account_key): + async def test_account_sas_async(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) token = generate_account_sas( self.fsc.account_name, self.fsc.credential.account_key, @@ -2061,7 +2078,7 @@ async def test_account_sas_async(self, resource_group, location, storage_account # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=token) @@ -2072,15 +2089,15 @@ async def test_account_sas_async(self, resource_group, location, storage_account self.assertTrue(response.ok) self.assertEqual(self.short_byte_data, response.content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_account_sas_credential_async(self, resource_group, location, storage_account, storage_account_key): + async def test_account_sas_credential_async(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) token = generate_account_sas( self.fsc.account_name, self.fsc.credential.account_key, @@ -2091,7 +2108,7 @@ async def test_account_sas_credential_async(self, resource_group, location, stor # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=AzureSasCredential(token)) @@ -2101,24 +2118,24 @@ async def test_account_sas_credential_async(self, resource_group, location, stor # Assert self.assertIsNotNone(properties) - @GlobalStorageAccountPreparer() - def test_account_sas_raises_if_sas_already_in_uri(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_account_sas_raises_if_sas_already_in_uri(self, storage_account_name, storage_account_key): with self.assertRaises(ValueError): ShareFileClient( - self.account_url(storage_account, "file") + "?sig=foo", + self.account_url(storage_account_name, "file") + "?sig=foo", share_name="foo", file_path="foo", credential=AzureSasCredential("?foo=bar")) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_read_access_file_async(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_read_access_file_async(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) token = generate_file_sas( file_client.account_name, file_client.share_name, @@ -2130,7 +2147,7 @@ async def test_shared_read_access_file_async(self, resource_group, location, sto # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=token) @@ -2140,15 +2157,15 @@ async def test_shared_read_access_file_async(self, resource_group, location, sto self.assertTrue(response.ok) self.assertEqual(self.short_byte_data, response.content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_read_access_file_with_content_query_params_async(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_read_access_file_with_content_query_params_async(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) - file_client = await self._create_file(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) + file_client = await self._create_file(storage_account_name, storage_account_key) token = generate_file_sas( file_client.account_name, file_client.share_name, @@ -2165,7 +2182,7 @@ async def test_shared_read_access_file_with_content_query_params_async(self, res # Act file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client.file_name, credential=token) @@ -2179,16 +2196,16 @@ async def test_shared_read_access_file_with_content_query_params_async(self, res self.assertEqual(response.headers['content-language'], 'fr') self.assertEqual(response.headers['content-type'], 'text') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_write_access_file_async(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_write_access_file_async(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) updated_data = b'updated file data' - file_client_admin = await self._create_file(storage_account, storage_account_key) + file_client_admin = await self._create_file(storage_account_name, storage_account_key) token = generate_file_sas( file_client_admin.account_name, file_client_admin.share_name, @@ -2198,7 +2215,7 @@ async def test_shared_write_access_file_async(self, resource_group, location, st expiry=datetime.utcnow() + timedelta(hours=1), ) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client_admin.file_name, credential=token) @@ -2213,15 +2230,15 @@ async def test_shared_write_access_file_async(self, resource_group, location, st file_content = await file_content.readall() self.assertEqual(updated_data, file_content[:len(updated_data)]) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_delete_access_file_async(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_delete_access_file_async(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) - file_client_admin = await self._create_file(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) + file_client_admin = await self._create_file(storage_account_name, storage_account_key) token = generate_file_sas( file_client_admin.account_name, file_client_admin.share_name, @@ -2231,7 +2248,7 @@ async def test_shared_delete_access_file_async(self, resource_group, location, s expiry=datetime.utcnow() + timedelta(hours=1), ) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=file_client_admin.file_name, credential=token) diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_client.py b/sdk/storage/azure-storage-file-share/tests/test_file_client.py index 89f95dcb0ef6..e2d690b33232 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_client.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_client.py @@ -14,12 +14,8 @@ ShareClient, ShareDirectoryClient, ShareFileClient) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import ( - StorageTestCase, - LogCaptured, - GlobalStorageAccountPreparer -) +from devtools_testutils.storage import StorageTestCase +from settings.testcase import FileSharePreparer #from azure.storage.common import TokenCredential # ------------------------------------------------------------------------------ @@ -35,8 +31,8 @@ _CONNECTION_ENDPOINTS_SECONDARY = {'file': 'FileSecondaryEndpoint'} class StorageFileClientTest(StorageTestCase): - def _setup(self, storage_account, storage_account_key): - self.account_name = storage_account.name + def _setup(self, storage_account_name, storage_account_key): + self.account_name = storage_account_name self.account_key = storage_account_key self.sas_token = self.generate_sas_token() @@ -58,28 +54,28 @@ def validate_standard_account_endpoints(self, service, service_type, protocol='h protocol, self.account_name, service_type))) # --Direct Parameters Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_key(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_key(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "file"), credential=self.account_key, + self.account_url(storage_account_name, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') # Assert self.validate_standard_account_endpoints(service, url) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_sas(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_sas(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "file"), credential=self.sas_token, + self.account_url(storage_account_name, "file"), credential=self.sas_token, share_name='foo', directory_path='bar', file_path='baz') # Assert @@ -88,21 +84,21 @@ def test_create_service_with_sas(self, resource_group, location, storage_account self.assertEqual(service.account_name, self.account_name) self.assertTrue(service.url.endswith(self.sas_token)) - @GlobalStorageAccountPreparer() - def test_create_service_with_token(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_token(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES: # Act # token credential is not available for FileService token_credential = self.generate_oauth_token() with self.assertRaises(ValueError): - service_type(self.account_url(storage_account, "file"), credential=token_credential, + service_type(self.account_url(storage_account_name, "file"), credential=token_credential, share_name='foo', directory_path='bar', file_path='baz') - @GlobalStorageAccountPreparer() - def test_create_service_china(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - url = self.account_url(storage_account, "file").replace('core.windows.net', 'core.chinacloudapi.cn') + @FileSharePreparer() + def test_create_service_china(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + url = self.account_url(storage_account_name, "file").replace('core.windows.net', 'core.chinacloudapi.cn') for service_type in SERVICES.items(): # Act service = service_type[0]( @@ -119,10 +115,10 @@ def test_create_service_china(self, resource_group, location, storage_account, s self.assertEqual(service.secondary_hostname, '{}-secondary.{}.core.chinacloudapi.cn'.format(self.account_name, service_type[1])) - @GlobalStorageAccountPreparer() - def test_create_service_protocol(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - url = self.account_url(storage_account, "file").replace('https', 'http') + @FileSharePreparer() + def test_create_service_protocol(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + url = self.account_url(storage_account_name, "file").replace('https', 'http') for service_type in SERVICES.items(): # Act service = service_type[0]( @@ -133,31 +129,31 @@ def test_create_service_protocol(self, resource_group, location, storage_account self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_empty_key(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_empty_key(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES: # Act # Passing an empty key to create account should fail. with self.assertRaises(ValueError) as e: service_type( - self.account_url(storage_account, "file"), share_name='foo', directory_path='bar', file_path='baz') + self.account_url(storage_account_name, "file"), share_name='foo', directory_path='bar', file_path='baz') self.assertEqual( str(e.exception), 'You need to provide either an account shared key or SAS token when creating a storage service.') - @GlobalStorageAccountPreparer() - def test_create_service_with_socket_timeout(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_socket_timeout(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act default_service = service_type[0]( - self.account_url(storage_account, "file"), credential=self.account_key, + self.account_url(storage_account_name, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') service = service_type[0]( - self.account_url(storage_account, "file"), credential=self.account_key, connection_timeout=22, + self.account_url(storage_account_name, "file"), credential=self.account_key, connection_timeout=22, share_name='foo', directory_path='bar', file_path='baz') # Assert @@ -167,9 +163,9 @@ def test_create_service_with_socket_timeout(self, resource_group, location, stor # --Connection String Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_key(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_connection_string_key(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};AccountKey={};'.format(self.account_name, self.account_key) for service_type in SERVICES.items(): @@ -181,9 +177,9 @@ def test_create_service_with_connection_string_key(self, resource_group, locatio self.validate_standard_account_endpoints(service, service_type[1]) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_sas(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_connection_string_sas(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};SharedAccessSignature={};'.format(self.account_name, self.sas_token) for service_type in SERVICES.items(): @@ -197,9 +193,9 @@ def test_create_service_with_connection_string_sas(self, resource_group, locatio self.assertEqual(service.account_name, self.account_name) self.assertTrue(service.url.endswith(self.sas_token)) - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_endpoint_protocol(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_connection_string_endpoint_protocol(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};AccountKey={};DefaultEndpointsProtocol=http;EndpointSuffix=core.chinacloudapi.cn;'.format( self.account_name, self.account_key) @@ -218,9 +214,9 @@ def test_create_service_with_connection_string_endpoint_protocol(self, resource_ '{}-secondary.{}.core.chinacloudapi.cn'.format(self.account_name, service_type[1])) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_emulated(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_connection_string_emulated(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES.items(): conn_string = 'UseDevelopmentStorage=true;' @@ -229,10 +225,10 @@ def test_create_service_with_connection_string_emulated(self, resource_group, lo service_type[0].from_connection_string( conn_string, share_name='foo', directory_path='bar', file_path='baz') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_fails_if_secondary_without_primary(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_service_with_connection_string_fails_if_secondary_without_primary(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;'.format( self.account_name, self.account_key, _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) @@ -243,10 +239,10 @@ def test_create_service_with_connection_string_fails_if_secondary_without_primar service_type[0].from_connection_string( conn_string, share_name='foo', directory_path='bar', file_path='baz') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_succeeds_if_secondary_with_primary(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_service_with_connection_string_succeeds_if_secondary_with_primary(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;{}=www-sec.mydomain.com;'.format( self.account_name, self.account_key, _CONNECTION_ENDPOINTS.get(service_type[1]), @@ -264,9 +260,9 @@ def test_create_service_with_connection_string_succeeds_if_secondary_with_primar self.assertEqual(service.primary_hostname, 'www.mydomain.com') self.assertEqual(service.secondary_hostname, 'www-sec.mydomain.com') - @GlobalStorageAccountPreparer() - def test_create_service_with_custom_account_endpoint_path(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_custom_account_endpoint_path(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) custom_account_url = "http://local-machine:11002/custom/account/path/" + self.sas_token for service_type in SERVICES.items(): conn_string = 'DefaultEndpointsProtocol=http;AccountName={};AccountKey={};FileEndpoint={};'.format( @@ -336,16 +332,16 @@ def test_create_service_with_custom_account_endpoint_path(self, resource_group, self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo/file?')) - @GlobalStorageAccountPreparer() - def test_client_request_id_echo(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_client_request_id_echo(self, storage_account_name, storage_account_key): # client request id is different for every request, so it will never match the recorded one pytest.skip("Issue tracked here: https://github.com/Azure/azure-sdk-for-python/issues/8098") if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) request_id_header_name = 'x-ms-client-request-id' - service = ShareServiceClient(self.account_url(storage_account, "file"), credential=self.account_key) + service = ShareServiceClient(self.account_url(storage_account_name, "file"), credential=self.account_key) # Act make the client request ID slightly different def callback(response): @@ -364,10 +360,10 @@ def callback(response): # Assert the client request ID validation is not throwing when the ID is not echoed service.get_service_properties(raw_response_hook=callback) - @GlobalStorageAccountPreparer() - def test_user_agent_default(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - service = ShareServiceClient(self.account_url(storage_account, "file"), credential=self.account_key) + @FileSharePreparer() + def test_user_agent_default(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + service = ShareServiceClient(self.account_url(storage_account_name, "file"), credential=self.account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -375,12 +371,12 @@ def callback(response): service.get_service_properties(raw_response_hook=callback) - @GlobalStorageAccountPreparer() - def test_user_agent_custom(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_user_agent_custom(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) custom_app = "TestApp/v1.0" service = ShareServiceClient( - self.account_url(storage_account, "file"), credential=self.account_key, user_agent=custom_app) + self.account_url(storage_account_name, "file"), credential=self.account_key, user_agent=custom_app) def callback1(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -400,10 +396,10 @@ def callback2(response): service.get_service_properties(raw_response_hook=callback2, user_agent="TestApp/v2.0") - @GlobalStorageAccountPreparer() - def test_user_agent_append(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - service = ShareServiceClient(self.account_url(storage_account, "file"), credential=self.account_key) + @FileSharePreparer() + def test_user_agent_append(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + service = ShareServiceClient(self.account_url(storage_account_name, "file"), credential=self.account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -414,9 +410,9 @@ def callback(response): service.get_service_properties(raw_response_hook=callback, user_agent='customer_user_agent') - @GlobalStorageAccountPreparer() - def test_error_with_malformed_conn_str(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_error_with_malformed_conn_str(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for conn_str in ["", "foobar", "foobar=baz=foo", "foo;bar;baz", "foo=;bar=;", "=", ";", "=;=="]: for service_type in SERVICES.items(): @@ -431,27 +427,27 @@ def test_error_with_malformed_conn_str(self, resource_group, location, storage_a self.assertEqual( str(e.exception), "Connection string missing required connection details.") - @GlobalStorageAccountPreparer() - def test_closing_pipeline_client(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_closing_pipeline_client(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') + self.account_url(storage_account_name, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') # Assert with service: assert hasattr(service, 'close') service.close() - @GlobalStorageAccountPreparer() - def test_closing_pipeline_client_simple(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_closing_pipeline_client_simple(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') + self.account_url(storage_account_name, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') service.close() diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_client_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_client_async.py index ce55082b7771..ca6542185558 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_client_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_client_async.py @@ -14,13 +14,9 @@ ShareClient, ShareDirectoryClient, ShareFileClient) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import ( - LogCaptured, - GlobalStorageAccountPreparer -) -from _shared.asynctestcase import AsyncStorageTestCase -#from azure.storage.common import TokenCredential + +from settings.testcase import FileSharePreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ SERVICES = { @@ -47,8 +43,8 @@ async def send(self, request, **config): class StorageFileClientTest(AsyncStorageTestCase): - def _setup(self, storage_account, storage_account_key): - self.account_name = storage_account.name + def _setup(self, storage_account_name, storage_account_key): + self.account_name = storage_account_name self.account_key = storage_account_key self.sas_token = self.generate_sas_token() self.token_credential = self.generate_oauth_token() @@ -71,28 +67,28 @@ def validate_standard_account_endpoints(self, service, service_type, protocol='h protocol, self.account_name, service_type))) # --Direct Parameters Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_key_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_key_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "file"), credential=self.account_key, + self.account_url(storage_account_name, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') # Assert self.validate_standard_account_endpoints(service, url) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_sas_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_sas_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "file"), credential=self.sas_token, + self.account_url(storage_account_name, "file"), credential=self.sas_token, share_name='foo', directory_path='bar', file_path='baz') # Assert @@ -101,20 +97,20 @@ def test_create_service_with_sas_async(self, resource_group, location, storage_a self.assertEqual(service.account_name, self.account_name) self.assertTrue(service.url.endswith(self.sas_token)) - @GlobalStorageAccountPreparer() - def test_create_service_with_token_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_token_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES: # Act # token credential is not available for FileService with self.assertRaises(ValueError): - service_type(self.account_url(storage_account, "file"), credential=self.token_credential, + service_type(self.account_url(storage_account_name, "file"), credential=self.token_credential, share_name='foo', directory_path='bar', file_path='baz') - @GlobalStorageAccountPreparer() - def test_create_service_china_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - url = self.account_url(storage_account, "file").replace('core.windows.net', 'core.chinacloudapi.cn') + @FileSharePreparer() + def test_create_service_china_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + url = self.account_url(storage_account_name, "file").replace('core.windows.net', 'core.chinacloudapi.cn') for service_type in SERVICES.items(): # Act service = service_type[0]( @@ -130,10 +126,10 @@ def test_create_service_china_async(self, resource_group, location, storage_acco self.account_name, service_type[1])) self.assertEqual(service.secondary_hostname, '{}-secondary.{}.core.chinacloudapi.cn'.format(self.account_name, service_type[1])) - @GlobalStorageAccountPreparer() - def test_create_service_protocol_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - url = self.account_url(storage_account, "file").replace('https', 'http') + @FileSharePreparer() + def test_create_service_protocol_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + url = self.account_url(storage_account_name, "file").replace('https', 'http') for service_type in SERVICES.items(): # Act service = service_type[0]( @@ -143,31 +139,31 @@ def test_create_service_protocol_async(self, resource_group, location, storage_a self.validate_standard_account_endpoints(service, service_type[1], protocol='http') self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_empty_key_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_empty_key_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES: # Act # Passing an empty key to create account should fail. with self.assertRaises(ValueError) as e: service_type( - self.account_url(storage_account, "file"), share_name='foo', directory_path='bar', file_path='baz') + self.account_url(storage_account_name, "file"), share_name='foo', directory_path='bar', file_path='baz') self.assertEqual( str(e.exception), 'You need to provide either an account shared key or SAS token when creating a storage service.') - @GlobalStorageAccountPreparer() - def test_create_service_with_socket_timeout_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_socket_timeout_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act default_service = service_type[0]( - self.account_url(storage_account, "file"), credential=self.account_key, + self.account_url(storage_account_name, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') service = service_type[0]( - self.account_url(storage_account, "file"), credential=self.account_key, connection_timeout=22, + self.account_url(storage_account_name, "file"), credential=self.account_key, connection_timeout=22, share_name='foo', directory_path='bar', file_path='baz') # Assert @@ -177,9 +173,9 @@ def test_create_service_with_socket_timeout_async(self, resource_group, location # --Connection String Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_key_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_connection_string_key_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};AccountKey={};'.format(self.account_name, self.account_key) for service_type in SERVICES.items(): @@ -191,9 +187,9 @@ def test_create_service_with_connection_string_key_async(self, resource_group, l self.validate_standard_account_endpoints(service, service_type[1]) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_sas_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_connection_string_sas_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};SharedAccessSignature={};'.format(self.account_name, self.sas_token) for service_type in SERVICES.items(): @@ -207,9 +203,9 @@ def test_create_service_with_connection_string_sas_async(self, resource_group, l self.assertEqual(service.account_name, self.account_name) self.assertTrue(service.url.endswith(self.sas_token)) - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_endpoint_protocol_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_connection_string_endpoint_protocol_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};AccountKey={};DefaultEndpointsProtocol=http;EndpointSuffix=core.chinacloudapi.cn;'.format( self.account_name, self.account_key) @@ -228,9 +224,9 @@ def test_create_service_with_connection_string_endpoint_protocol_async(self, res '{}-secondary.{}.core.chinacloudapi.cn'.format(self.account_name, service_type[1])) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_emulated_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_connection_string_emulated_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for service_type in SERVICES.items(): conn_string = 'UseDevelopmentStorage=true;' @@ -239,10 +235,10 @@ def test_create_service_with_connection_string_emulated_async(self, resource_gro service_type[0].from_connection_string( conn_string, share_name='foo', directory_path='bar', file_path='baz', transport=AiohttpTestTransport()) - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_fails_if_secondary_without_primary_async(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_service_with_connection_string_fails_if_secondary_without_primary_async(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;'.format( self.account_name, self.account_key, _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) @@ -253,10 +249,10 @@ def test_create_service_with_connection_string_fails_if_secondary_without_primar service_type[0].from_connection_string( conn_string, share_name='foo', directory_path='bar', file_path='baz') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_succeeds_if_secondary_with_primary_async(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_create_service_with_connection_string_succeeds_if_secondary_with_primary_async(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;{}=www-sec.mydomain.com;'.format( self.account_name, self.account_key, _CONNECTION_ENDPOINTS.get(service_type[1]), @@ -274,9 +270,9 @@ def test_create_service_with_connection_string_succeeds_if_secondary_with_primar self.assertEqual(service.primary_hostname, 'www.mydomain.com') self.assertEqual(service.secondary_hostname, 'www-sec.mydomain.com') - @GlobalStorageAccountPreparer() - def test_create_service_with_custom_account_endpoint_path(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_service_with_custom_account_endpoint_path(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) custom_account_url = "http://local-machine:11002/custom/account/path/" + self.sas_token for service_type in SERVICES.items(): conn_string = 'DefaultEndpointsProtocol=http;AccountName={};AccountKey={};FileEndpoint={};'.format( @@ -346,11 +342,11 @@ def test_create_service_with_custom_account_endpoint_path(self, resource_group, self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo/file?')) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_user_agent_default_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - service = ShareServiceClient(self.account_url(storage_account, "file"), credential=self.account_key, transport=AiohttpTestTransport()) + async def test_user_agent_default_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + service = ShareServiceClient(self.account_url(storage_account_name, "file"), credential=self.account_key, transport=AiohttpTestTransport()) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -358,13 +354,13 @@ def callback(response): await service.get_service_properties(raw_response_hook=callback) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_user_agent_custom_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_user_agent_custom_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) custom_app = "TestApp/v1.0" service = ShareServiceClient( - self.account_url(storage_account, "file"), credential=self.account_key, user_agent=custom_app, transport=AiohttpTestTransport()) + self.account_url(storage_account_name, "file"), credential=self.account_key, user_agent=custom_app, transport=AiohttpTestTransport()) def callback1(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -384,11 +380,11 @@ def callback2(response): await service.get_service_properties(raw_response_hook=callback2, user_agent="TestApp/v2.0") - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_user_agent_append_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) - service = ShareServiceClient(self.account_url(storage_account, "file"), credential=self.account_key, transport=AiohttpTestTransport()) + async def test_user_agent_append_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) + service = ShareServiceClient(self.account_url(storage_account_name, "file"), credential=self.account_key, transport=AiohttpTestTransport()) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -400,30 +396,30 @@ def callback(response): await service.get_service_properties(raw_response_hook=callback, user_agent='customer_user_agent') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_closing_pipeline_client_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_closing_pipeline_client_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') + self.account_url(storage_account_name, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') # Assert async with service: assert hasattr(service, 'close') await service.close() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_closing_pipeline_client_simple_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_closing_pipeline_client_simple_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') + self.account_url(storage_account_name, "file"), credential=self.account_key, share_name='foo', directory_path='bar', file_path='baz') await service.close() diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py index e90a90aa8d64..c2acdb2a2536 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties.py @@ -21,20 +21,15 @@ ShareProtocolSettings, ) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import ( - StorageTestCase, - LogCaptured, - GlobalStorageAccountPreparer -) - +from devtools_testutils.storage import StorageTestCase +from settings.testcase import FileSharePreparer # ------------------------------------------------------------------------------ class FileServicePropertiesTest(StorageTestCase): - def _setup(self, storage_account, storage_account_key): - url = self.account_url(storage_account, "file") + def _setup(self, storage_account_name, storage_account_key): + url = self.account_url(storage_account_name, "file") credential = storage_account_key self.fsc = ShareServiceClient(url, credential=credential) @@ -77,9 +72,9 @@ def _assert_retention_equal(self, ret1, ret2): # --Test cases per service --------------------------------------- @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_file_service_properties(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_file_service_properties(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) protocol_properties1 = ShareProtocolSettings(smb=ShareSmbSettings(multichannel=SmbMultichannel(enabled=False))) protocol_properties2 = ShareProtocolSettings(smb=ShareSmbSettings(multichannel=SmbMultichannel(enabled=True))) @@ -109,9 +104,9 @@ def test_file_service_properties(self, resource_group, location, storage_account self.assertEqual(props['protocol'].smb.multichannel.enabled, True) # --Test cases per feature --------------------------------------- - @GlobalStorageAccountPreparer() - def test_set_hour_metrics(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_hour_metrics(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -121,9 +116,9 @@ def test_set_hour_metrics(self, resource_group, location, storage_account, stora received_props = self.fsc.get_service_properties() self._assert_metrics_equal(received_props['hour_metrics'], hour_metrics) - @GlobalStorageAccountPreparer() - def test_set_minute_metrics(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_minute_metrics(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) @@ -134,9 +129,9 @@ def test_set_minute_metrics(self, resource_group, location, storage_account, sto received_props = self.fsc.get_service_properties() self._assert_metrics_equal(received_props['minute_metrics'], minute_metrics) - @GlobalStorageAccountPreparer() - def test_set_cors(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_cors(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] @@ -161,17 +156,17 @@ def test_set_cors(self, resource_group, location, storage_account, storage_accou self._assert_cors_equal(received_props['cors'], cors) # --Test cases for errors --------------------------------------- - @GlobalStorageAccountPreparer() - def test_retention_no_days(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_retention_no_days(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) # Assert self.assertRaises(ValueError, RetentionPolicy, True, None) - @GlobalStorageAccountPreparer() - def test_too_many_cors_rules(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_too_many_cors_rules(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) cors = [] for i in range(0, 6): cors.append(CorsRule(['www.xyz.com'], ['GET'])) diff --git a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py index 160decc56068..3b1c67afe353 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_file_service_properties_async.py @@ -22,12 +22,8 @@ ShareSmbSettings, ) from azure.storage.fileshare.aio import ShareServiceClient -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import ( - LogCaptured, - GlobalStorageAccountPreparer -) -from _shared.asynctestcase import AsyncStorageTestCase +from settings.testcase import FileSharePreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ @@ -43,8 +39,8 @@ async def send(self, request, **config): class FileServicePropertiesTest(AsyncStorageTestCase): - def _setup(self, storage_account, storage_account_key): - url = self.account_url(storage_account, "file") + def _setup(self, storage_account_name, storage_account_key): + url = self.account_url(storage_account_name, "file") credential = storage_account_key self.fsc = ShareServiceClient(url, credential=credential, transport=AiohttpTestTransport()) @@ -87,10 +83,10 @@ def _assert_retention_equal(self, ret1, ret2): # --Test cases per service --------------------------------------- @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_file_service_properties_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_file_service_properties_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) protocol_properties1 = ShareProtocolSettings(smb=ShareSmbSettings(multichannel=SmbMultichannel(enabled=False))) protocol_properties2 = ShareProtocolSettings(smb=ShareSmbSettings(multichannel=SmbMultichannel(enabled=True))) @@ -120,10 +116,10 @@ async def test_file_service_properties_async(self, resource_group, location, sto self.assertEqual(props['protocol'].smb.multichannel.enabled, True) # --Test cases per feature --------------------------------------- - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_hour_metrics_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_hour_metrics_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -133,10 +129,10 @@ async def test_set_hour_metrics_async(self, resource_group, location, storage_ac received_props = await self.fsc.get_service_properties() self._assert_metrics_equal(received_props['hour_metrics'], hour_metrics) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_minute_metrics_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_minute_metrics_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) @@ -147,10 +143,10 @@ async def test_set_minute_metrics_async(self, resource_group, location, storage_ received_props = await self.fsc.get_service_properties() self._assert_metrics_equal(received_props['minute_metrics'], minute_metrics) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_cors_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_cors_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] @@ -177,10 +173,10 @@ async def test_set_cors_async(self, resource_group, location, storage_account, s # --Test cases for errors --------------------------------------- - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_too_many_cors_rules_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_too_many_cors_rules_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) cors = [] for i in range(0, 6): cors.append(CorsRule(['www.xyz.com'], ['GET'])) diff --git a/sdk/storage/azure-storage-file-share/tests/test_get_file.py b/sdk/storage/azure-storage-file-share/tests/test_get_file.py index 2a61bea590ee..d3e6e1da2b63 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_get_file.py +++ b/sdk/storage/azure-storage-file-share/tests/test_get_file.py @@ -18,12 +18,8 @@ ShareServiceClient, FileProperties ) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import ( - StorageTestCase, - LogCaptured, - GlobalStorageAccountPreparer -) +from devtools_testutils.storage import StorageTestCase +from settings.testcase import FileSharePreparer # ------------------------------------------------------------------------------ TEST_FILE_PREFIX = 'file' @@ -32,14 +28,14 @@ # ------------------------------------------------------------------------------ class StorageGetFileTest(StorageTestCase): - def _setup(self, storage_account, storage_account_key): + def _setup(self, storage_account_name, storage_account_key): # test chunking functionality by reducing the threshold # for chunking and the size of each chunk, otherwise # the tests would take too long to execute self.MAX_SINGLE_GET_SIZE = 32 * 1024 self.MAX_CHUNK_GET_SIZE = 4 * 1024 - url = self.account_url(storage_account, "file") + url = self.account_url(storage_account_name, "file") credential = storage_account_key self.fsc = ShareServiceClient( @@ -60,7 +56,7 @@ def _setup(self, storage_account, storage_account_key): if not self.is_playback(): byte_file = self.directory_name + '/' + self.byte_file file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=byte_file, credential=credential @@ -93,13 +89,13 @@ def seekable(self): # -- Get test cases for files ---------------------------------------------- - @GlobalStorageAccountPreparer() - def test_unicode_get_file_unicode_data(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_unicode_get_file_unicode_data(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_data = u'hello world啊齄丂狛狜'.encode('utf-8') file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -113,15 +109,15 @@ def test_unicode_get_file_unicode_data(self, resource_group, location, storage_a # Assert self.assertEqual(file_content, file_data) - @GlobalStorageAccountPreparer() - def test_unicode_get_file_binary_data(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_unicode_get_file_binary_data(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) base64_data = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==' binary_data = base64.b64decode(base64_data) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -135,13 +131,13 @@ def test_unicode_get_file_binary_data(self, resource_group, location, storage_ac # Assert self.assertEqual(file_content, binary_data) - @GlobalStorageAccountPreparer() - def test_get_file_no_content(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_no_content(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_data = b'' file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -156,15 +152,15 @@ def test_get_file_no_content(self, resource_group, location, storage_account, st self.assertEqual(file_data, file_output.readall()) self.assertEqual(0, file_output.properties.size) - @GlobalStorageAccountPreparer() - def test_get_file_to_bytes(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_to_bytes(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -177,15 +173,15 @@ def test_get_file_to_bytes(self, resource_group, location, storage_account, stor # Assert self.assertEqual(self.byte_data, file_content) - @GlobalStorageAccountPreparer() - def test_get_file_to_bytes_with_progress(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_to_bytes_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -210,11 +206,11 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - def test_get_file_to_bytes_non_parallel(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_bytes_non_parallel(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -239,13 +235,13 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - def test_get_file_to_bytes_small(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_bytes_small(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -271,12 +267,12 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - def test_download_file_modified(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_download_file_modified(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -294,15 +290,15 @@ def test_download_file_modified(self, resource_group, location, storage_account, with self.assertRaises(ResourceModifiedError): data += next(chunks) - @GlobalStorageAccountPreparer() - def test_get_file_with_iter(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_with_iter(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -324,15 +320,15 @@ def test_get_file_with_iter(self, resource_group, location, storage_account, sto self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_to_stream(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_to_stream(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -350,15 +346,15 @@ def test_get_file_to_stream(self, resource_group, location, storage_account, sto self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_to_stream_with_progress(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_to_stream_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -388,11 +384,11 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_to_stream_non_parallel(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_stream_non_parallel(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -422,13 +418,13 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_to_stream_small(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_stream_small(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -459,25 +455,25 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_to_stream_from_snapshot(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_to_stream_from_snapshot(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -496,25 +492,25 @@ def test_get_file_to_stream_from_snapshot(self, resource_group, location, storag self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_to_stream_with_progress_from_snapshot(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_to_stream_with_progress_from_snapshot(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -545,21 +541,21 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_to_stream_non_parallel_from_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_stream_non_parallel_from_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -590,13 +586,13 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_to_stream_small_from_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_stream_small_from_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key) @@ -608,7 +604,7 @@ def test_get_file_to_stream_small_from_snapshot(self, resource_group, location, file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, snapshot=share_snapshot, @@ -639,15 +635,15 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_ranged_get_file_to_path(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_ranged_get_file_to_path(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -666,15 +662,15 @@ def test_ranged_get_file_to_path(self, resource_group, location, storage_account self.assertEqual(self.byte_data[1:end_range + 1], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_ranged_get_file_to_path_with_single_byte(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_ranged_get_file_to_path_with_single_byte(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -694,13 +690,13 @@ def test_ranged_get_file_to_path_with_single_byte(self, resource_group, location self.assertEqual(self.byte_data[0], actual[0]) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_ranged_get_file_to_bytes_with_zero_byte(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_ranged_get_file_to_bytes_with_zero_byte(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_data = b'' file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -716,15 +712,15 @@ def test_ranged_get_file_to_bytes_with_zero_byte(self, resource_group, location, with self.assertRaises(HttpResponseError): file_client.download_file(offset=3, length=5).readall() - @GlobalStorageAccountPreparer() - def test_ranged_get_file_to_path_with_progress(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_ranged_get_file_to_path_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -761,11 +757,11 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_ranged_get_file_to_path_small(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_ranged_get_file_to_path_small(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -783,11 +779,11 @@ def test_ranged_get_file_to_path_small(self, resource_group, location, storage_a self.assertEqual(self.byte_data[1:5], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_ranged_get_file_to_path_non_parallel(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_ranged_get_file_to_path_non_parallel(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -805,18 +801,18 @@ def test_ranged_get_file_to_path_non_parallel(self, resource_group, location, st self.assertEqual(self.byte_data[1:4], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_ranged_get_file_to_path_invalid_range_parallel(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_ranged_get_file_to_path_invalid_range_parallel(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_size = self.MAX_SINGLE_GET_SIZE + 1 file_data = self.get_random_bytes(file_size) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -838,15 +834,15 @@ def test_ranged_get_file_to_path_invalid_range_parallel(self, resource_group, lo self.assertEqual(file_data[start:file_size], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_ranged_get_file_to_path_invalid_range_non_parallel(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_ranged_get_file_to_path_invalid_range_non_parallel(self, storage_account_name, storage_account_key): - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_size = 1024 file_data = self.get_random_bytes(file_size) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -868,17 +864,17 @@ def test_ranged_get_file_to_path_invalid_range_non_parallel(self, resource_group self.assertEqual(file_data[start:file_size], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_to_text(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_to_text(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) text_file = self.get_resource_name('textfile') text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, credential=storage_account_key, @@ -892,17 +888,17 @@ def test_get_file_to_text(self, resource_group, location, storage_account, stora # Assert self.assertEqual(text_data, file_content) - @GlobalStorageAccountPreparer() - def test_get_file_to_text_with_progress(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_to_text_with_progress(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) text_file = self.get_resource_name('textfile') text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, credential=storage_account_key, @@ -929,13 +925,13 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - def test_get_file_to_text_non_parallel(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_text_non_parallel(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) text_file = self._get_file_reference() text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, credential=storage_account_key, @@ -962,13 +958,13 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - def test_get_file_to_text_small(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_text_small(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_data = self.get_random_text_data(1024) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -994,14 +990,14 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - def test_get_file_to_text_with_encoding(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_text_with_encoding(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -1015,14 +1011,14 @@ def test_get_file_to_text_with_encoding(self, resource_group, location, storage_ # Assert self.assertEqual(text, file_content) - @GlobalStorageAccountPreparer() - def test_get_file_to_text_with_encoding_and_progress(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_to_text_with_encoding_and_progress(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -1048,11 +1044,11 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - def test_get_file_non_seekable(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_non_seekable(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1071,15 +1067,15 @@ def test_get_file_non_seekable(self, resource_group, location, storage_account, self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_non_seekable_parallel(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_non_seekable_parallel(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1096,21 +1092,21 @@ def test_get_file_non_seekable_parallel(self, resource_group, location, storage_ # Assert self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_non_seekable_from_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_non_seekable_from_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -1130,25 +1126,25 @@ def test_get_file_non_seekable_from_snapshot(self, resource_group, location, sto self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_non_seekable_parallel_from_snapshot(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_non_seekable_parallel_from_snapshot(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -1164,13 +1160,13 @@ def test_get_file_non_seekable_parallel_from_snapshot(self, resource_group, loca snapshot_client.download_file(max_concurrency=2).readinto(non_seekable_stream) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() - def test_get_file_exact_get_size(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_file_exact_get_size(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() byte_data = self.get_random_bytes(self.MAX_SINGLE_GET_SIZE) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -1196,17 +1192,17 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - def test_get_file_exact_chunk_size(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_exact_chunk_size(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() byte_data = self.get_random_bytes(self.MAX_SINGLE_GET_SIZE + self.MAX_CHUNK_GET_SIZE) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -1232,15 +1228,15 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - def test_get_file_with_md5(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_with_md5(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1253,14 +1249,14 @@ def test_get_file_with_md5(self, resource_group, location, storage_account, stor # Assert self.assertEqual(self.byte_data, file_content.readall()) - @GlobalStorageAccountPreparer() - def test_get_file_range_with_md5(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_range_with_md5(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1282,12 +1278,12 @@ def test_get_file_range_with_md5(self, resource_group, location, storage_account # Assert self.assertEqual(b'MDAwMDAwMDA=', file_content.properties.content_settings.content_md5) - @GlobalStorageAccountPreparer() - def test_get_file_server_encryption(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_server_encryption(self, storage_account_name, storage_account_key): - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1300,12 +1296,12 @@ def test_get_file_server_encryption(self, resource_group, location, storage_acco # Assert self.assertTrue(file_content.properties.server_encrypted) - @GlobalStorageAccountPreparer() - def test_get_file_properties_server_encryption(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_get_file_properties_server_encryption(self, storage_account_name, storage_account_key): - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, diff --git a/sdk/storage/azure-storage-file-share/tests/test_get_file_async.py b/sdk/storage/azure-storage-file-share/tests/test_get_file_async.py index a37218b572f8..91a05fe6a99f 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_get_file_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_get_file_async.py @@ -20,12 +20,8 @@ ShareFileClient, ShareServiceClient, ) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import ( - LogCaptured, - GlobalStorageAccountPreparer -) -from _shared.asynctestcase import AsyncStorageTestCase +from settings.testcase import FileSharePreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ TEST_FILE_PREFIX = 'file' FILE_PATH = 'file_output.temp.{}.dat'.format(str(uuid.uuid4())) @@ -49,11 +45,11 @@ class StorageGetFileTest(AsyncStorageTestCase): def _get_file_reference(self): return self.get_resource_name(TEST_FILE_PREFIX) - async def _setup(self, storage_account, storage_account_key): + async def _setup(self, storage_account_name, storage_account_key): self.MAX_SINGLE_GET_SIZE = 32 * 1024 self.MAX_CHUNK_GET_SIZE = 4 * 1024 - url = self.account_url(storage_account, "file") + url = self.account_url(storage_account_name, "file") credential = storage_account_key self.fsc = ShareServiceClient( @@ -74,7 +70,7 @@ async def _setup(self, storage_account, storage_account_key): pass byte_file = self.directory_name + '/' + self.byte_file file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=byte_file, credential=storage_account_key @@ -106,15 +102,15 @@ def seekable(self): # -- Get test cases for files ---------------------------------------------- - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_get_file_unicode_data_async(self, resource_group, location, storage_account, storage_account_key): + async def test_unicode_get_file_unicode_data_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_data = u'hello world啊齄丂狛狜'.encode('utf-8') file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -129,17 +125,17 @@ async def test_unicode_get_file_unicode_data_async(self, resource_group, locatio # Assert self.assertEqual(file_content, file_data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_get_file_binary_data_async(self, resource_group, location, storage_account, storage_account_key): + async def test_unicode_get_file_binary_data_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) base64_data = 'AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/wABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEiIyQlJicoKSorLC0uLzAxMjM0NTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gIGCg4SFhoeIiYqLjI2Oj5CRkpOUlZaXmJmam5ydnp+goaKjpKWmp6ipqqusra6vsLGys7S1tre4ubq7vL2+v8DBwsPExcbHyMnKy8zNzs/Q0dLT1NXW19jZ2tvc3d7f4OHi4+Tl5ufo6err7O3u7/Dx8vP09fb3+Pn6+/z9/v8AAQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2Nzg5Ojs8PT4/QEFCQ0RFRkdISUpLTE1OT1BRUlNUVVZXWFlaW1xdXl9gYWJjZGVmZ2hpamtsbW5vcHFyc3R1dnd4eXp7fH1+f4CBgoOEhYaHiImKi4yNjo+QkZKTlJWWl5iZmpucnZ6foKGio6SlpqeoqaqrrK2ur7CxsrO0tba3uLm6u7y9vr/AwcLDxMXGx8jJysvMzc7P0NHS09TV1tfY2drb3N3e3+Dh4uPk5ebn6Onq6+zt7u/w8fLz9PX29/j5+vv8/f7/AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWGh4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKztLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==' binary_data = base64.b64decode(base64_data) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -154,15 +150,15 @@ async def test_unicode_get_file_binary_data_async(self, resource_group, location # Assert self.assertEqual(file_content, binary_data) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_no_content_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_no_content_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_data = b'' file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -179,17 +175,17 @@ async def test_get_file_no_content_async(self, resource_group, location, storage self.assertEqual(file_data, file_content) self.assertEqual(0, file_output.properties.size) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_bytes_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_bytes_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -203,17 +199,17 @@ async def test_get_file_to_bytes_async(self, resource_group, location, storage_a # Assert self.assertEqual(self.byte_data, file_content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_bytes_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_bytes_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -239,13 +235,13 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_bytes_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_bytes_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -271,15 +267,15 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_bytes_small_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_bytes_small_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -306,12 +302,12 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() - async def test_download_file_modified(self, resource_group, location, storage_account, storage_account_key): - await self._setup(storage_account, storage_account_key) + @FileSharePreparer() + async def test_download_file_modified(self, storage_account_name, storage_account_key): + await self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -329,17 +325,17 @@ async def test_download_file_modified(self, resource_group, location, storage_ac with self.assertRaises(ResourceModifiedError): data += await chunks.__anext__() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_stream_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_stream_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -359,17 +355,17 @@ async def test_get_file_to_stream_async(self, resource_group, location, storage_ self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_with_iter_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_with_iter_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -393,17 +389,17 @@ async def test_get_file_with_iter_async(self, resource_group, location, storage_ self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_stream_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_stream_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -434,13 +430,13 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_stream_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_stream_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -471,15 +467,15 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_stream_small_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_stream_small_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -511,27 +507,27 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_stream_from_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_stream_from_snapshot_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) await file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -551,27 +547,27 @@ async def test_get_file_to_stream_from_snapshot_async(self, resource_group, loca self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_stream_with_progress_from_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_stream_with_progress_from_snapshot_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) await file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -603,23 +599,23 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_stream_non_parallel_from_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_stream_non_parallel_from_snapshot_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) await file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -651,15 +647,15 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_stream_small_from_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_stream_small_from_snapshot_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_data = self.get_random_bytes(1024) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key) @@ -671,7 +667,7 @@ async def test_get_file_to_stream_small_from_snapshot_async(self, resource_group await file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, snapshot=share_snapshot, @@ -703,17 +699,17 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_file_to_path_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_file_to_path_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -734,17 +730,17 @@ async def test_ranged_get_file_to_path_async(self, resource_group, location, sto self.assertEqual(self.byte_data[start:end_range + 1], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_file_to_path_with_single_byte_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_file_to_path_with_single_byte_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -765,15 +761,15 @@ async def test_ranged_get_file_to_path_with_single_byte_async(self, resource_gro self.assertEqual(self.byte_data[0], actual[0]) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_file_to_bytes_with_zero_byte_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_file_to_bytes_with_zero_byte_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_data = b'' file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -792,17 +788,17 @@ async def test_ranged_get_file_to_bytes_with_zero_byte_async(self, resource_grou props = await file_client.download_file(offset=3, length=5) await props.readall() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_file_to_path_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_file_to_path_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -839,13 +835,13 @@ def callback(response): progress) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_file_to_path_small_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_file_to_path_small_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -864,13 +860,13 @@ async def test_ranged_get_file_to_path_small_async(self, resource_group, locatio self.assertEqual(self.byte_data[1:5], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_file_to_path_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_file_to_path_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -889,20 +885,20 @@ async def test_ranged_get_file_to_path_non_parallel_async(self, resource_group, self.assertEqual(self.byte_data[1:4], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_file_to_path_invalid_range_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_file_to_path_invalid_range_parallel_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_size = self.MAX_SINGLE_GET_SIZE + 1 file_data = self.get_random_bytes(file_size) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -923,17 +919,17 @@ async def test_ranged_get_file_to_path_invalid_range_parallel_async(self, resour self.assertEqual(file_data[1:file_size], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_ranged_get_file_to_path_invalid_range_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_ranged_get_file_to_path_invalid_range_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_size = 1024 file_data = self.get_random_bytes(file_size) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -955,19 +951,19 @@ async def test_ranged_get_file_to_path_invalid_range_non_parallel_async(self, re self.assertEqual(file_data[start:file_size], actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_text_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_text_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text_file = self.get_resource_name('textfile') text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, credential=storage_account_key, @@ -982,19 +978,19 @@ async def test_get_file_to_text_async(self, resource_group, location, storage_ac # Assert self.assertEqual(text_data, file_content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_text_with_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_text_with_progress_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text_file = self.get_resource_name('textfile') text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, credential=storage_account_key, @@ -1022,15 +1018,15 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_text_non_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_text_non_parallel_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text_file = self._get_file_reference() text_data = self.get_random_text_data(self.MAX_SINGLE_GET_SIZE + 1) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + text_file, credential=storage_account_key, @@ -1058,15 +1054,15 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_text_small_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_text_small_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_data = self.get_random_text_data(1024) file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -1093,16 +1089,16 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_text_with_encoding_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_text_with_encoding_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -1117,16 +1113,16 @@ async def test_get_file_to_text_with_encoding_async(self, resource_group, locati # Assert self.assertEqual(text, file_content) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_to_text_with_encoding_and_progress_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_to_text_with_encoding_and_progress_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) text = u'hello 啊齄丂狛狜 world' data = text.encode('utf-16') file_name = self._get_file_reference() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -1153,13 +1149,13 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_non_seekable_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_non_seekable_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1179,17 +1175,17 @@ async def test_get_file_non_seekable_async(self, resource_group, location, stora self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_non_seekable_parallel_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_non_seekable_parallel_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1207,23 +1203,23 @@ async def test_get_file_non_seekable_parallel_async(self, resource_group, locati # Assert self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_non_seekable_from_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_non_seekable_from_snapshot_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) await file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -1244,27 +1240,27 @@ async def test_get_file_non_seekable_from_snapshot_async(self, resource_group, l self.assertEqual(self.byte_data, actual) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_non_seekable_parallel_from_snapshot_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_non_seekable_parallel_from_snapshot_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) # Create a snapshot of the share and delete the file share_client = self.fsc.get_share_client(self.share_name) share_snapshot = await share_client.create_snapshot() file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key) await file_client.delete_file() snapshot_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, snapshot=share_snapshot, @@ -1281,15 +1277,15 @@ async def test_get_file_non_seekable_parallel_from_snapshot_async(self, resource await data.readinto(non_seekable_stream) self._teardown(FILE_PATH) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_exact_get_size_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_exact_get_size_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() byte_data = self.get_random_bytes(self.MAX_SINGLE_GET_SIZE) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -1316,19 +1312,19 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_exact_chunk_size_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_exact_chunk_size_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_name = self._get_file_reference() byte_data = self.get_random_bytes(self.MAX_SINGLE_GET_SIZE + self.MAX_CHUNK_GET_SIZE) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + file_name, credential=storage_account_key, @@ -1355,17 +1351,17 @@ def callback(response): self.MAX_SINGLE_GET_SIZE, progress) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_with_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_with_md5_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1379,16 +1375,16 @@ async def test_get_file_with_md5_async(self, resource_group, location, storage_a # Assert self.assertEqual(self.byte_data, file_bytes) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_range_with_md5_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_range_with_md5_async(self, storage_account_name, storage_account_key): # parallel tests introduce random order of requests, can only run live if not self.is_live: return - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1411,14 +1407,14 @@ async def test_get_file_range_with_md5_async(self, resource_group, location, sto # Assert self.assertEqual(b'MDAwMDAwMDA=', file_content.properties.content_settings.content_md5) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_server_encryption_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_server_encryption_async(self, storage_account_name, storage_account_key): #Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, @@ -1431,14 +1427,14 @@ async def test_get_file_server_encryption_async(self, resource_group, location, # Assert self.assertTrue(file_content.properties.server_encrypted) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_file_properties_server_encryption_async(self, resource_group, location, storage_account, storage_account_key): + async def test_get_file_properties_server_encryption_async(self, storage_account_name, storage_account_key): # Arrange - await self._setup(storage_account, storage_account_key) + await self._setup(storage_account_name, storage_account_key) file_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=self.share_name, file_path=self.directory_name + '/' + self.byte_file, credential=storage_account_key, diff --git a/sdk/storage/azure-storage-file-share/tests/test_handle.py b/sdk/storage/azure-storage-file-share/tests/test_handle.py index 63af52c428ab..794954d32137 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_handle.py +++ b/sdk/storage/azure-storage-file-share/tests/test_handle.py @@ -8,24 +8,14 @@ import unittest import pytest -from azure.core.exceptions import ( - HttpResponseError, - ResourceNotFoundError, - ResourceExistsError) - from azure.storage.fileshare import ( ShareServiceClient, ShareDirectoryClient, ShareFileClient, ShareClient ) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import ( - StorageTestCase, - LogCaptured, - GlobalStorageAccountPreparer -) - +from devtools_testutils.storage import StorageTestCase +from settings.testcase import FileSharePreparer # ------------------------------------------------------------------------------ TEST_SHARE_NAME = 'test' TEST_SHARE_PREFIX = 'share' @@ -34,8 +24,8 @@ # ------------------------------------------------------------------------------ class StorageHandleTest(StorageTestCase): - def _setup(self, storage_account, storage_account_key): - file_url = self.account_url(storage_account, "file") + def _setup(self, storage_account_name, storage_account_key): + file_url = self.account_url(storage_account_name, "file") credentials = storage_account_key self.fsc = ShareServiceClient(account_url=file_url, credential=credentials) self.test_shares = [] @@ -68,14 +58,14 @@ def _validate_handles(self, handles): self.assertIsNotNone(handles[0].client_ip) self.assertIsNotNone(handles[0].open_time) - @GlobalStorageAccountPreparer() - def test_list_handles_on_share(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_list_handles_on_share(self, storage_account_name, storage_account_key): # don't run live, since the test set up was highly manual # only run when recording, or playing back in CI if self.is_live: pytest.skip("Cannot run in live without manual setup") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client(TEST_SHARE_NAME) root = share.get_directory_client() @@ -86,14 +76,14 @@ def test_list_handles_on_share(self, resource_group, location, storage_account, self._validate_handles(handles) # - @GlobalStorageAccountPreparer() - def test_list_handles_on_share_snapshot(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_list_handles_on_share_snapshot(self, storage_account_name, storage_account_key): # don't run live, since the test set up was highly manual # only run when recording, or playing back in CI if self.is_live: pytest.skip("Cannot run in live without manual setup") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client(TEST_SHARE_NAME, snapshot="2019-05-08T23:27:24.0000000Z") root = share.get_directory_client() @@ -103,14 +93,14 @@ def test_list_handles_on_share_snapshot(self, resource_group, location, storage_ # Assert self._validate_handles(handles) - @GlobalStorageAccountPreparer() - def test_list_handles_with_marker(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_list_handles_with_marker(self, storage_account_name, storage_account_key): # don't run live, since the test set up was highly manual # only run when recording, or playing back in CI if self.is_live: pytest.skip("Cannot run in live without manual setup") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client(TEST_SHARE_NAME) root = share.get_directory_client() @@ -137,14 +127,14 @@ def test_list_handles_with_marker(self, resource_group, location, storage_accoun old_handle_not_present = all([old_handle.id != handle.id for handle in remaining_handles]) self.assertTrue(old_handle_not_present) - @GlobalStorageAccountPreparer() - def test_list_handles_on_directory(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_list_handles_on_directory(self, storage_account_name, storage_account_key): # don't run live, since the test set up was highly manual # only run when recording, or playing back in CI if self.is_live: pytest.skip("Cannot run in live without manual setup") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client(TEST_SHARE_NAME) dir = share.get_directory_client('wut') @@ -160,14 +150,14 @@ def test_list_handles_on_directory(self, resource_group, location, storage_accou # Assert recursive option is functioning when disabled self.assertTrue(len(handles) == 0) - @GlobalStorageAccountPreparer() - def test_list_handles_on_file(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_list_handles_on_file(self, storage_account_name, storage_account_key): # don't run live, since the test set up was highly manual # only run when recording, or playing back in CI if self.is_live: pytest.skip("Cannot run in live without manual setup") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client(TEST_SHARE_NAME) client = share.get_file_client('wut/bla.txt') @@ -177,14 +167,14 @@ def test_list_handles_on_file(self, resource_group, location, storage_account, s # Assert self._validate_handles(handles) - @GlobalStorageAccountPreparer() - def test_close_single_handle(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_close_single_handle(self, storage_account_name, storage_account_key): # don't run live, since the test set up was highly manual # only run when recording, or playing back in CI if self.is_live: pytest.skip("Cannot run in live without manual setup") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client(TEST_SHARE_NAME) root = share.get_directory_client() handles = list(root.list_handles(recursive=True)) @@ -200,14 +190,14 @@ def test_close_single_handle(self, resource_group, location, storage_account, st self.assertEqual(1, handles_info['closed_handles_count']) self.assertEqual(handles_info['failed_handles_count'], 0) - @GlobalStorageAccountPreparer() - def test_close_all_handle(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_close_all_handle(self, storage_account_name, storage_account_key): # don't run live, since the test set up was highly manual # only run when recording, or playing back in CI if self.is_live: pytest.skip("Cannot run in live without manual setup") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client(TEST_SHARE_NAME) root = share.get_directory_client() handles = list(root.list_handles(recursive=True)) diff --git a/sdk/storage/azure-storage-file-share/tests/test_handle_async.py b/sdk/storage/azure-storage-file-share/tests/test_handle_async.py index 7dd03e6e6241..6432bb77eeea 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_handle_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_handle_async.py @@ -16,12 +16,8 @@ from azure.storage.fileshare.aio import ( ShareServiceClient, ) -from _shared.testcase import ( - LogCaptured, - GlobalStorageAccountPreparer, - GlobalResourceGroupPreparer -) -from _shared.asynctestcase import AsyncStorageTestCase +from settings.testcase import FileSharePreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ TEST_SHARE_NAME = 'test' @@ -42,7 +38,7 @@ async def send(self, request, **config): class StorageHandleTest(AsyncStorageTestCase): def _setup(self, storage_account, storage_account_key): - file_url = self.account_url(storage_account, "file") + file_url = self.account_url(storage_account_name, "file") credentials = storage_account_key self.fsc = ShareServiceClient(account_url=file_url, credential=credentials, transport=AiohttpTestTransport()) self.test_shares = [] @@ -65,16 +61,16 @@ def _validate_handles(self, handles): self.assertIsNotNone(handles[0].client_ip) self.assertIsNotNone(handles[0].open_time) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_close_single_handle_async(self, resource_group, location, storage_account, storage_account_key): + async def test_close_single_handle_async(self, storage_account_name, storage_account_key): pytest.skip("investigate later") # don't run live, since the test set up was highly manual # only run when recording, or playing back in CI if self.is_live: pytest.skip("Cannot run in live without manual setup") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client(TEST_SHARE_NAME) root = share.get_directory_client() handles = [] @@ -92,16 +88,16 @@ async def test_close_single_handle_async(self, resource_group, location, storage self.assertEqual(1, handles_info['closed_handles_count']) self.assertEqual(handles_info['failed_handles_count'], 0) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_close_all_handle_async(self, resource_group, location, storage_account, storage_account_key): + async def test_close_all_handle_async(self, storage_account_name, storage_account_key): pytest.skip("investigate later") # don't run live, since the test set up was highly manual # only run when recording, or playing back in CI if self.is_live: pytest.skip("Cannot run in live without manual setup") - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share = self.fsc.get_share_client(TEST_SHARE_NAME) root = share.get_directory_client() handles = [] diff --git a/sdk/storage/azure-storage-file-share/tests/test_share.py b/sdk/storage/azure-storage-file-share/tests/test_share.py index 93450b6a59ee..1d314dadecba 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_share.py +++ b/sdk/storage/azure-storage-file-share/tests/test_share.py @@ -28,14 +28,8 @@ generate_share_sas, ShareRootSquash, ShareProtocols) -from azure.storage.fileshare._generated.models import DeleteSnapshotsOptionType, ListSharesIncludeType -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import ( - StorageTestCase, - LogCaptured, - GlobalStorageAccountPreparer, - GlobalResourceGroupPreparer -) +from devtools_testutils.storage import StorageTestCase, LogCaptured +from settings.testcase import FileSharePreparer # ------------------------------------------------------------------------------ TEST_SHARE_PREFIX = 'share' @@ -44,8 +38,8 @@ # ------------------------------------------------------------------------------ class StorageShareTest(StorageTestCase): - def _setup(self, storage_account, storage_account_key): - file_url = self.account_url(storage_account, "file") + def _setup(self, storage_account_name, storage_account_key): + file_url = self.account_url(storage_account_name, "file") credentials = storage_account_key self.fsc = ShareServiceClient(account_url=file_url, credential=credentials) self.test_shares = [] @@ -88,9 +82,9 @@ def test_create_share_client(self): self.assertEqual(share_client.share_name, "share") self.assertEqual(share_client.snapshot, "baz") - @GlobalStorageAccountPreparer() - def test_create_share(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_share(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -100,9 +94,9 @@ def test_create_share(self, resource_group, location, storage_account, storage_a self.assertTrue(created) self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() - def test_create_share_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_share_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -116,9 +110,9 @@ def test_create_share_snapshot(self, resource_group, location, storage_account, self.assertIsNotNone(snapshot['last_modified']) self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() - def test_create_snapshot_with_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_snapshot_with_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() metadata = {"test1": "foo", "test2": "bar"} metadata2 = {"test100": "foo100", "test200": "bar200"} @@ -129,7 +123,7 @@ def test_create_snapshot_with_metadata(self, resource_group, location, storage_a share_props = share.get_share_properties() snapshot_client = ShareClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, snapshot=snapshot, credential=storage_account_key @@ -144,9 +138,9 @@ def test_create_snapshot_with_metadata(self, resource_group, location, storage_a self.assertEqual(snapshot_props.metadata, metadata2) self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() - def test_delete_share_with_snapshots(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_share_with_snapshots(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() share.create_share() snapshot = share.create_snapshot() @@ -160,10 +154,10 @@ def test_delete_share_with_snapshots(self, resource_group, location, storage_acc self._delete_shares() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_undelete_share(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_undelete_share(self, storage_account_name, storage_account_key): # share soft delete should enabled by SRP call or use armclient, so make this test as playback only. - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share_client = self._create_share(prefix="sharerestore") # Act @@ -186,18 +180,18 @@ def test_undelete_share(self, resource_group, location, storage_account, storage props = restored_share_client.get_share_properties() self.assertIsNotNone(props) - @GlobalStorageAccountPreparer() - def test_lease_share_acquire_and_release(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_lease_share_acquire_and_release(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') # Act lease = share_client.acquire_lease() lease.release() # Assert - @GlobalStorageAccountPreparer() - def test_acquire_lease_on_sharesnapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_acquire_lease_on_sharesnapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference("testshare1") # Act @@ -205,7 +199,7 @@ def test_acquire_lease_on_sharesnapshot(self, resource_group, location, storage_ snapshot = share.create_snapshot() snapshot_client = ShareClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, snapshot=snapshot, credential=storage_account_key @@ -232,9 +226,9 @@ def test_acquire_lease_on_sharesnapshot(self, resource_group, location, storage_ share_lease.release() self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() - def test_lease_share_renew(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_lease_share_renew(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') lease = share_client.acquire_lease(lease_duration=15) self.sleep(10) @@ -251,9 +245,9 @@ def test_lease_share_renew(self, resource_group, location, storage_account, stor self.sleep(10) share_client.delete_share() - @GlobalStorageAccountPreparer() - def test_lease_share_with_duration(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_lease_share_with_duration(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') # Act @@ -265,9 +259,9 @@ def test_lease_share_with_duration(self, resource_group, location, storage_accou self.sleep(15) share_client.acquire_lease() - @GlobalStorageAccountPreparer() - def test_lease_share_twice(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_lease_share_twice(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') # Act @@ -277,9 +271,9 @@ def test_lease_share_twice(self, resource_group, location, storage_account, stor lease2 = share_client.acquire_lease(lease_id=lease.id) self.assertEqual(lease.id, lease2.id) - @GlobalStorageAccountPreparer() - def test_lease_share_with_proposed_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_lease_share_with_proposed_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') # Act @@ -289,9 +283,9 @@ def test_lease_share_with_proposed_lease_id(self, resource_group, location, stor # Assert self.assertEqual(proposed_lease_id, lease.id) - @GlobalStorageAccountPreparer() - def test_lease_share_change_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_lease_share_change_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') # Act @@ -308,9 +302,9 @@ def test_lease_share_change_lease_id(self, resource_group, location, storage_acc self.assertNotEqual(lease_id1, lease_id) self.assertEqual(lease_id2, lease_id) - @GlobalStorageAccountPreparer() - def test_set_share_metadata_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_share_metadata_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') metadata = {'hello': 'world', 'number': '43'} lease_id = share_client.acquire_lease() @@ -322,9 +316,9 @@ def test_set_share_metadata_with_lease_id(self, resource_group, location, storag md = share_client.get_share_properties().metadata self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() - def test_get_share_metadata_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_share_metadata_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') metadata = {'hello': 'world', 'number': '43'} share_client.set_share_metadata(metadata) @@ -336,9 +330,9 @@ def test_get_share_metadata_with_lease_id(self, resource_group, location, storag # Assert self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() - def test_get_share_properties_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_share_properties_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') metadata = {'hello': 'world', 'number': '43'} share_client.set_share_metadata(metadata) @@ -355,9 +349,9 @@ def test_get_share_properties_with_lease_id(self, resource_group, location, stor self.assertEqual(props.lease.state, 'leased') self.assertEqual(props.lease.status, 'locked') - @GlobalStorageAccountPreparer() - def test_get_share_acl_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_share_acl_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') lease_id = share_client.acquire_lease() @@ -368,9 +362,9 @@ def test_get_share_acl_with_lease_id(self, resource_group, location, storage_acc self.assertIsNotNone(acl) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_set_share_acl_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_share_acl_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') lease_id = share_client.acquire_lease() @@ -387,9 +381,9 @@ def test_set_share_acl_with_lease_id(self, resource_group, location, storage_acc self.assertIsNotNone(acl) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() - def test_lease_share_break_period(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_lease_share_break_period(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') # Act @@ -401,9 +395,9 @@ def test_lease_share_break_period(self, resource_group, location, storage_accoun with self.assertRaises(HttpResponseError): share_client.delete_share(lease=lease) - @GlobalStorageAccountPreparer() - def test_delete_share_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_share_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = self._create_share('test') lease = share_client.acquire_lease(lease_duration=15) @@ -420,10 +414,10 @@ def test_delete_share_with_lease_id(self, resource_group, location, storage_acco share_client.get_share_properties() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_restore_to_existing_share(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_restore_to_existing_share(self, storage_account_name, storage_account_key): # share soft delete should enabled by SRP call or use armclient, so make this test as playback only. - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) # Act share_client = self._create_share() share_client.delete_share() @@ -445,9 +439,9 @@ def test_restore_to_existing_share(self, resource_group, location, storage_accou with self.assertRaises(HttpResponseError): self.fsc.undelete_share(share.name, share.version) - @GlobalStorageAccountPreparer() - def test_delete_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() share.create_share() snapshot = share.create_snapshot() @@ -457,7 +451,7 @@ def test_delete_snapshot(self, resource_group, location, storage_account, storag share.delete_share() snapshot_client = ShareClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, snapshot=snapshot, credential=storage_account_key @@ -467,9 +461,9 @@ def test_delete_snapshot(self, resource_group, location, storage_account, storag self.assertIsNone(deleted) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_create_share_fail_on_exist(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_share_fail_on_exist(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -479,9 +473,9 @@ def test_create_share_fail_on_exist(self, resource_group, location, storage_acco self.assertTrue(created) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_create_share_with_already_existing_share_fail_on_exist(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_share_with_already_existing_share_fail_on_exist(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -493,9 +487,9 @@ def test_create_share_with_already_existing_share_fail_on_exist(self, resource_g self.assertTrue(created) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_create_share_with_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_share_with_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} # Act @@ -508,9 +502,9 @@ def test_create_share_with_metadata(self, resource_group, location, storage_acco self.assertDictEqual(md, metadata) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_create_share_with_quota(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_share_with_quota(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) # Act client = self._get_share_reference() @@ -522,9 +516,9 @@ def test_create_share_with_quota(self, resource_group, location, storage_account self.assertEqual(props.quota, 1) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_create_share_with_access_tier(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_share_with_access_tier(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) # Act client = self._get_share_reference() @@ -536,9 +530,9 @@ def test_create_share_with_access_tier(self, resource_group, location, storage_a self.assertEqual(props.access_tier, "Hot") self._delete_shares() - @GlobalStorageAccountPreparer() - def test_share_exists(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_share_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._create_share() # Act @@ -548,9 +542,9 @@ def test_share_exists(self, resource_group, location, storage_account, storage_a self.assertTrue(exists) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_share_not_exists(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_share_not_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -560,9 +554,9 @@ def test_share_not_exists(self, resource_group, location, storage_account, stora # Assert self._delete_shares() - @GlobalStorageAccountPreparer() - def test_share_snapshot_exists(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_share_snapshot_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._create_share() snapshot = share.create_snapshot() @@ -574,9 +568,9 @@ def test_share_snapshot_exists(self, resource_group, location, storage_account, self.assertTrue(exists) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_share_snapshot_not_exists(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_share_snapshot_not_exists(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._create_share() made_up_snapshot = '2017-07-19T06:53:46.0000000Z' @@ -588,9 +582,9 @@ def test_share_snapshot_not_exists(self, resource_group, location, storage_accou # Assert self._delete_shares() - @GlobalStorageAccountPreparer() - def test_unicode_create_share_unicode_name(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_unicode_create_share_unicode_name(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_name = u'啊齄丂狛狜' # Act @@ -602,9 +596,9 @@ def test_unicode_create_share_unicode_name(self, resource_group, location, stora # Assert self._delete_shares() - @GlobalStorageAccountPreparer() - def test_list_shares_no_options(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_shares_no_options(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._create_share() # Act shares = list(self.fsc.list_shares()) @@ -616,10 +610,9 @@ def test_list_shares_no_options(self, resource_group, location, storage_account, self.assertNamedItemInContainer(shares, share.share_name) self._delete_shares() - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage', kind='FileStorage') - def test_list_shares_no_options_for_premium_account(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_shares_no_options_for_premium_account(self, premium_storage_file_account_name, premium_storage_file_account_key): + self._setup(premium_storage_file_account_name, premium_storage_file_account_key) share = self._create_share() # Act @@ -635,9 +628,9 @@ def test_list_shares_no_options_for_premium_account(self, resource_group, locati self.assertIsNotNone(shares[0].next_allowed_quota_downgrade_time) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_list_shares_leased_share(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_shares_leased_share(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._create_share("test1") # Act @@ -655,9 +648,9 @@ def test_list_shares_leased_share(self, resource_group, location, storage_accoun self._delete_shares() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_list_shares_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_shares_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) #share = self._get_share_reference() share = self._create_share('random') snapshot1 = share.create_snapshot() @@ -676,9 +669,9 @@ def test_list_shares_with_snapshot(self, resource_group, location, storage_accou self._delete_shares() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_list_shares_with_prefix(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_shares_with_prefix(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() share.create_share() @@ -692,9 +685,9 @@ def test_list_shares_with_prefix(self, resource_group, location, storage_account self.assertIsNone(shares[0].metadata) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_list_shares_with_include_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_shares_with_include_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} share = self._get_share_reference() share.create_share(metadata=metadata) @@ -711,9 +704,9 @@ def test_list_shares_with_include_metadata(self, resource_group, location, stora self.assertDictEqual(shares[0].metadata, metadata) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_list_shares_with_num_results_and_marker(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_shares_with_num_results_and_marker(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) prefix = 'listshare' share_names = [] for i in range(0, 4): @@ -740,9 +733,9 @@ def test_list_shares_with_num_results_and_marker(self, resource_group, location, self.assertNamedItemInContainer(shares2, share_names[3]) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_set_share_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_share_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._create_share() metadata = {'hello': 'world', 'number': '42'} @@ -754,9 +747,9 @@ def test_set_share_metadata(self, resource_group, location, storage_account, sto self.assertDictEqual(md, metadata) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_get_share_metadata(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_share_metadata(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} # Act @@ -769,9 +762,9 @@ def test_get_share_metadata(self, resource_group, location, storage_account, sto self.assertDictEqual(md, metadata) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_get_share_metadata_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_share_metadata_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} # Act @@ -786,9 +779,9 @@ def test_get_share_metadata_with_snapshot(self, resource_group, location, storag self.assertDictEqual(md, metadata) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_set_share_properties(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_share_properties(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share1 = self._create_share("share1") share2 = self._create_share("share2") @@ -815,9 +808,9 @@ def test_set_share_properties(self, resource_group, location, storage_account, s self._delete_shares() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_create_share_with_protocol(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_share_with_protocol(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) # Act share_client = self._get_share_reference("testshare2") @@ -833,9 +826,9 @@ def test_create_share_with_protocol(self, resource_group, location, storage_acco share_client.delete_share() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() - def test_set_share_properties_with_root_squash(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_share_properties_with_root_squash(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share1 = self._create_share("share1", protocols=ShareProtocols.NFS) share2 = self._create_share("share2", protocols=ShareProtocols.NFS) @@ -853,10 +846,10 @@ def test_set_share_properties_with_root_squash(self, resource_group, location, s self.assertEqual(share2_props.protocols, ['NFS']) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() def test_list_shares_with_root_squash_and_protocols( - self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) self._create_share(prefix="testshare1", protocols="NFS", root_squash=ShareRootSquash.all_squash) self._create_share(prefix="testshare2", protocols=ShareProtocols.SMB) # Act @@ -873,10 +866,9 @@ def test_list_shares_with_root_squash_and_protocols( self.assertEqual(share2_props.protocols, ["SMB"]) self._delete_shares() - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage', kind='FileStorage') - def test_get_share_properties_for_premium_account(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_share_properties_for_premium_account(self, premium_storage_file_account_name, premium_storage_file_account_key): + self._setup(premium_storage_file_account_name, premium_storage_file_account_key) share = self._create_share() # Act @@ -891,9 +883,9 @@ def test_get_share_properties_for_premium_account(self, resource_group, location self.assertIsNotNone(props.next_allowed_quota_downgrade_time) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_delete_share_with_existing_share(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_share_with_existing_share(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() share.create_share() @@ -904,9 +896,9 @@ def test_delete_share_with_existing_share(self, resource_group, location, storag self.assertIsNone(deleted) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_delete_share_with_existing_share_fail_not_exist(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_share_with_existing_share_fail_not_exist(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) client = self._get_share_reference() # Act @@ -917,9 +909,9 @@ def test_delete_share_with_existing_share_fail_not_exist(self, resource_group, l log_as_str = log_captured.getvalue() self._delete_shares() - @GlobalStorageAccountPreparer() - def test_delete_share_with_non_existing_share(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_share_with_non_existing_share(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) client = self._get_share_reference() # Act @@ -931,9 +923,9 @@ def test_delete_share_with_non_existing_share(self, resource_group, location, st self.assertTrue('ERROR' not in log_as_str) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_delete_share_with_non_existing_share_fail_not_exist(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_share_with_non_existing_share_fail_not_exist(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) client = self._get_share_reference() # Act @@ -944,9 +936,9 @@ def test_delete_share_with_non_existing_share_fail_not_exist(self, resource_grou log_as_str = log_captured.getvalue() self._delete_shares() - @GlobalStorageAccountPreparer() - def test_get_share_stats(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_get_share_stats(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() share.create_share() @@ -957,9 +949,9 @@ def test_get_share_stats(self, resource_group, location, storage_account, storag self.assertEqual(share_usage, 0) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_set_share_acl(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_share_acl(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() share.create_share() @@ -971,9 +963,9 @@ def test_set_share_acl(self, resource_group, location, storage_account, storage_ self.assertIsNotNone(acl) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_set_share_acl_with_empty_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_share_acl_with_empty_signed_identifiers(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() share.create_share() @@ -986,9 +978,9 @@ def test_set_share_acl_with_empty_signed_identifiers(self, resource_group, locat self.assertEqual(len(acl.get('signed_identifiers')), 0) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_set_share_acl_with_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_share_acl_with_signed_identifiers(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() share.create_share() @@ -1009,9 +1001,9 @@ def test_set_share_acl_with_signed_identifiers(self, resource_group, location, s self.assertEqual(acl['signed_identifiers'][0].id, 'testid') self._delete_shares() - @GlobalStorageAccountPreparer() - def test_set_share_acl_too_many_ids(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_set_share_acl_too_many_ids(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() share.create_share() @@ -1029,9 +1021,9 @@ def test_set_share_acl_too_many_ids(self, resource_group, location, storage_acco ) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_list_directories_and_files(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_directories_and_files(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._create_share() dir0 = share.get_directory_client() dir0.upload_file('file1', 'data1') @@ -1053,9 +1045,9 @@ def test_list_directories_and_files(self, resource_group, location, storage_acco self.assertNamedItemInContainer(resp, 'file1') self._delete_shares() - @GlobalStorageAccountPreparer() - def test_list_directories_and_files_with_snapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_directories_and_files_with_snapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_name = self._create_share() dir1 = share_name.get_directory_client('dir1') dir1.create_directory() @@ -1080,9 +1072,9 @@ def test_list_directories_and_files_with_snapshot(self, resource_group, location self.assertNamedItemInContainer(resp, 'dir2') self._delete_shares() - @GlobalStorageAccountPreparer() - def test_list_directories_and_files_with_num_results(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_directories_and_files_with_num_results(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_name = self._create_share() dir1 = share_name.create_directory('dir1') root = share_name.get_directory_client() @@ -1102,9 +1094,9 @@ def test_list_directories_and_files_with_num_results(self, resource_group, locat self.assertNamedItemInContainer(result, 'filea1') self._delete_shares() - @GlobalStorageAccountPreparer() - def test_list_directories_and_files_with_num_results_and_marker(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_directories_and_files_with_num_results_and_marker(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_name = self._create_share() dir1 = share_name.get_directory_client('dir1') dir1.create_directory() @@ -1132,9 +1124,9 @@ def test_list_directories_and_files_with_num_results_and_marker(self, resource_g self.assertEqual(generator2.continuation_token, None) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_list_directories_and_files_with_prefix(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_list_directories_and_files_with_prefix(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._create_share() dir1 = share.create_directory('dir1') share.create_directory('dir1/pref_dir3') @@ -1156,13 +1148,13 @@ def test_list_directories_and_files_with_prefix(self, resource_group, location, self.assertNamedItemInContainer(resp, 'pref_dir3') self._delete_shares() - @GlobalStorageAccountPreparer() - def test_shared_access_share(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_shared_access_share(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = 'file1' dir_name = 'dir1' data = b'hello world' @@ -1179,7 +1171,7 @@ def test_shared_access_share(self, resource_group, location, storage_account, st permission=ShareSasPermissions(read=True), ) sas_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, file_path=dir_name + '/' + file_name, credential=token, @@ -1194,9 +1186,9 @@ def test_shared_access_share(self, resource_group, location, storage_account, st self.assertEqual(data, response.content) self._delete_shares() - @GlobalStorageAccountPreparer() - def test_create_permission_for_share(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_create_permission_for_share(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) user_given_permission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-" \ "1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;" \ "S-1-5-21-397955417-626881126-188441444-3053964)" @@ -1212,13 +1204,13 @@ def test_create_permission_for_share(self, resource_group, location, storage_acc # server returned permission self.assertEqual(permission_key, permission_key2) - @GlobalStorageAccountPreparer() - def test_transport_closed_only_once(self, resource_group, location, storage_account, storage_account_key): + @FileSharePreparer() + def test_transport_closed_only_once(self, storage_account_name, storage_account_key): if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) transport = RequestsTransport() - url = self.account_url(storage_account, "file") + url = self.account_url(storage_account_name, "file") credential = storage_account_key prefix = TEST_SHARE_PREFIX share_name = self.get_resource_name(prefix) @@ -1230,9 +1222,9 @@ def test_transport_closed_only_once(self, resource_group, location, storage_acco fsc.get_service_properties() assert transport.session is not None - @GlobalStorageAccountPreparer() - def test_delete_directory_from_share(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + @FileSharePreparer() + def test_delete_directory_from_share(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._create_share() dir1 = share.create_directory('dir1') share.create_directory('dir2') diff --git a/sdk/storage/azure-storage-file-share/tests/test_share_async.py b/sdk/storage/azure-storage-file-share/tests/test_share_async.py index e6f9ec6ba6b3..9c326a8d63e7 100644 --- a/sdk/storage/azure-storage-file-share/tests/test_share_async.py +++ b/sdk/storage/azure-storage-file-share/tests/test_share_async.py @@ -32,15 +32,9 @@ ShareFileClient, ShareClient, ) -from azure.storage.fileshare._generated.models import DeleteSnapshotsOptionType, ListSharesIncludeType -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import ( - LogCaptured, - GlobalStorageAccountPreparer, - GlobalResourceGroupPreparer -) -from _shared.asynctestcase import AsyncStorageTestCase - +from settings.testcase import FileSharePreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase +from devtools_testutils.storage import LogCaptured # ------------------------------------------------------------------------------ TEST_SHARE_PREFIX = 'share' @@ -60,8 +54,8 @@ async def send(self, request, **config): class StorageShareTest(AsyncStorageTestCase): - def _setup(self, storage_account, storage_account_key): - file_url = self.account_url(storage_account, "file") + def _setup(self, storage_account_name, storage_account_key): + file_url = self.account_url(storage_account_name, "file") credentials = storage_account_key self.fsc = ShareServiceClient(account_url=file_url, credential=credentials, transport=AiohttpTestTransport()) self.test_shares = [] @@ -95,10 +89,10 @@ async def _create_share(self, prefix=TEST_SHARE_PREFIX, **kwargs): return share_client # --Test cases for shares ----------------------------------------- - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_share_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_share_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -108,10 +102,10 @@ async def test_create_share_async(self, resource_group, location, storage_accoun self.assertTrue(created) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_share_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_share_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -126,10 +120,10 @@ async def test_create_share_snapshot_async(self, resource_group, location, stora await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_snapshot_with_metadata_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_snapshot_with_metadata_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() metadata = {"test1": "foo", "test2": "bar"} metadata2 = {"test100": "foo100", "test200": "bar200"} @@ -140,7 +134,7 @@ async def test_create_snapshot_with_metadata_async(self, resource_group, locatio share_props = await share.get_share_properties() snapshot_client = ShareClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, snapshot=snapshot, credential=storage_account_key @@ -156,10 +150,10 @@ async def test_create_snapshot_with_metadata_async(self, resource_group, locatio await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_share_with_snapshots_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_delete_share_with_snapshots_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() snapshot = await share.create_snapshot() @@ -173,11 +167,11 @@ async def test_delete_share_with_snapshots_async(self, resource_group, location, await self._delete_shares(share.share_name) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_undelete_share(self, resource_group, location, storage_account, storage_account_key): + async def test_undelete_share(self, storage_account_name, storage_account_key): # share soft delete should enabled by SRP call or use armclient, so make this test as playback only. - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share(prefix="sharerestore") # Act @@ -203,20 +197,20 @@ async def test_undelete_share(self, resource_group, location, storage_account, s self.assertIsNotNone(props) break - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_share_acquire_and_release(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_lease_share_acquire_and_release(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') # Act lease = await share_client.acquire_lease() await lease.release() # Assert - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_acquire_lease_on_sharesnapshot(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_acquire_lease_on_sharesnapshot(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -224,7 +218,7 @@ async def test_acquire_lease_on_sharesnapshot(self, resource_group, location, st snapshot = await share.create_snapshot() snapshot_client = ShareClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, snapshot=snapshot, credential=storage_account_key @@ -251,10 +245,10 @@ async def test_acquire_lease_on_sharesnapshot(self, resource_group, location, st await share_lease.release() await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_share_renew(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_lease_share_renew(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') lease = await share_client.acquire_lease(lease_duration=15) self.sleep(10) @@ -271,10 +265,10 @@ async def test_lease_share_renew(self, resource_group, location, storage_account self.sleep(10) await share_client.delete_share() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_share_with_duration(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_lease_share_with_duration(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') # Act @@ -286,10 +280,10 @@ async def test_lease_share_with_duration(self, resource_group, location, storage self.sleep(15) await share_client.acquire_lease() - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_share_twice(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_lease_share_twice(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') # Act @@ -299,10 +293,10 @@ async def test_lease_share_twice(self, resource_group, location, storage_account lease2 = await share_client.acquire_lease(lease_id=lease.id) self.assertEqual(lease.id, lease2.id) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_share_with_proposed_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_lease_share_with_proposed_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') # Act @@ -312,10 +306,10 @@ async def test_lease_share_with_proposed_lease_id(self, resource_group, location # Assert self.assertEqual(proposed_lease_id, lease.id) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_share_change_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_lease_share_change_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') # Act @@ -332,10 +326,10 @@ async def test_lease_share_change_lease_id(self, resource_group, location, stora self.assertNotEqual(lease_id1, lease_id) self.assertEqual(lease_id2, lease_id) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_share_metadata_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_share_metadata_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test1') metadata = {'hello': 'world', 'number': '43'} lease_id = await share_client.acquire_lease() @@ -348,10 +342,10 @@ async def test_set_share_metadata_with_lease_id(self, resource_group, location, md = props.metadata self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_share_metadata_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_get_share_metadata_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') metadata = {'hello': 'world', 'number': '43'} await share_client.set_share_metadata(metadata) @@ -364,10 +358,10 @@ async def test_get_share_metadata_with_lease_id(self, resource_group, location, # Assert self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_share_properties_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_get_share_properties_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') metadata = {'hello': 'world', 'number': '43'} await share_client.set_share_metadata(metadata) @@ -384,10 +378,10 @@ async def test_get_share_properties_with_lease_id(self, resource_group, location self.assertEqual(props.lease.state, 'leased') self.assertEqual(props.lease.status, 'locked') - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_share_acl_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_get_share_acl_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') lease_id = await share_client.acquire_lease() @@ -398,10 +392,10 @@ async def test_get_share_acl_with_lease_id(self, resource_group, location, stora self.assertIsNotNone(acl) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_share_acl_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_share_acl_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') lease_id = await share_client.acquire_lease() @@ -418,10 +412,10 @@ async def test_set_share_acl_with_lease_id(self, resource_group, location, stora self.assertIsNotNone(acl) self.assertIsNone(acl.get('public_access')) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_lease_share_break_period(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_lease_share_break_period(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') # Act @@ -433,10 +427,10 @@ async def test_lease_share_break_period(self, resource_group, location, storage_ with self.assertRaises(HttpResponseError): await share_client.delete_share(lease=lease) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_share_with_lease_id(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_delete_share_with_lease_id(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_client = await self._create_share('test') lease = await share_client.acquire_lease(lease_duration=15) @@ -453,11 +447,11 @@ async def test_delete_share_with_lease_id(self, resource_group, location, storag await share_client.get_share_properties() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_restore_to_existing_share(self, resource_group, location, storage_account, storage_account_key): + async def test_restore_to_existing_share(self, storage_account_name, storage_account_key): # share soft delete should enabled by SRP call or use armclient, so make this test as playback only. - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) # Act share_client = await self._create_share() await share_client.delete_share() @@ -482,10 +476,10 @@ async def test_restore_to_existing_share(self, resource_group, location, storage await self.fsc.undelete_share(share.name, share.version) break - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_delete_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() snapshot = await share.create_snapshot() @@ -495,7 +489,7 @@ async def test_delete_snapshot_async(self, resource_group, location, storage_acc await share.delete_share() snapshot_client = ShareClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, snapshot=snapshot, credential=storage_account_key @@ -505,10 +499,10 @@ async def test_delete_snapshot_async(self, resource_group, location, storage_acc self.assertIsNone(deleted) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_share_fail_on_exist(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_share_fail_on_exist(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -518,10 +512,10 @@ async def test_create_share_fail_on_exist(self, resource_group, location, storag self.assertTrue(created) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_share_with_already_existing_share_fail_on_exist_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_share_with_already_existing_share_fail_on_exist_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -533,10 +527,10 @@ async def test_create_share_with_already_existing_share_fail_on_exist_async(self self.assertTrue(created) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_share_with_metadata_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_share_with_metadata_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} # Act @@ -549,10 +543,10 @@ async def test_create_share_with_metadata_async(self, resource_group, location, self.assertDictEqual(props.metadata, metadata) await self._delete_shares(client.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_share_with_quota_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_share_with_quota_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) # Act client = self._get_share_reference() @@ -564,10 +558,10 @@ async def test_create_share_with_quota_async(self, resource_group, location, sto self.assertEqual(props.quota, 1) await self._delete_shares(client.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_share_with_access_tier(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_share_with_access_tier(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) # Act client = self._get_share_reference() @@ -579,10 +573,10 @@ async def test_create_share_with_access_tier(self, resource_group, location, sto self.assertEqual(props.access_tier, "Hot") await self._delete_shares(client.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_share_exists_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_share_exists_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = await self._create_share() # Act @@ -592,10 +586,10 @@ async def test_share_exists_async(self, resource_group, location, storage_accoun self.assertTrue(exists) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_share_not_exists_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_share_not_exists_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() # Act @@ -605,10 +599,10 @@ async def test_share_not_exists_async(self, resource_group, location, storage_ac # Assert await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_share_snapshot_exists_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_share_snapshot_exists_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = await self._create_share() snapshot = await share.create_snapshot() @@ -620,10 +614,10 @@ async def test_share_snapshot_exists_async(self, resource_group, location, stora self.assertTrue(exists) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_share_snapshot_not_exists_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_share_snapshot_not_exists_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = await self._create_share() made_up_snapshot = '2017-07-19T06:53:46.0000000Z' @@ -635,10 +629,10 @@ async def test_share_snapshot_not_exists_async(self, resource_group, location, s # Assert await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_create_share_unicode_name_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_unicode_create_share_unicode_name_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_name = u'啊齄丂狛狜' # Act @@ -650,10 +644,10 @@ async def test_unicode_create_share_unicode_name_async(self, resource_group, loc # Assert await self._delete_shares(share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_shares_no_options_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_shares_no_options_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = await self._create_share() # Act shares = [] @@ -668,12 +662,11 @@ async def test_list_shares_no_options_async(self, resource_group, location, stor await self._delete_shares(share.share_name) @pytest.mark.live_test_only - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage', kind='FileStorage') + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_shares_no_options_for_premium_account_async(self, resource_group, location, storage_account, storage_account_key): + async def test_list_shares_no_options_for_premium_account_async(self, premium_storage_file_account_name, premium_storage_file_account_key): # TODO: add recordings to this test - self._setup(storage_account, storage_account_key) + self._setup(premium_storage_file_account_name, premium_storage_file_account_key) share = await self._create_share() # Act @@ -691,10 +684,10 @@ async def test_list_shares_no_options_for_premium_account_async(self, resource_g self.assertIsNotNone(shares[0].next_allowed_quota_downgrade_time) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_shares_leased_share(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_shares_leased_share(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = await self._create_share() # Act @@ -714,10 +707,10 @@ async def test_list_shares_leased_share(self, resource_group, location, storage_ await self._delete_shares() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_shares_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_shares_with_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() snapshot1 = await share.create_snapshot() @@ -738,10 +731,10 @@ async def test_list_shares_with_snapshot_async(self, resource_group, location, s await self._delete_shares(share.share_name) @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_shares_with_prefix_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_shares_with_prefix_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() @@ -757,10 +750,10 @@ async def test_list_shares_with_prefix_async(self, resource_group, location, sto self.assertIsNone(shares[0].metadata) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_shares_with_include_metadata_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_shares_with_include_metadata_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} share = self._get_share_reference() await share.create_share(metadata=metadata) @@ -779,10 +772,10 @@ async def test_list_shares_with_include_metadata_async(self, resource_group, loc await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_shares_with_num_results_and_marker_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_shares_with_num_results_and_marker_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) prefix = 'listshare' share_names = [] for i in range(0, 4): @@ -814,10 +807,10 @@ async def test_list_shares_with_num_results_and_marker_async(self, resource_grou await self._delete_shares(prefix) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_share_metadata_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_share_metadata_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = await self._create_share() metadata = {'hello': 'world', 'number': '42'} @@ -830,10 +823,10 @@ async def test_set_share_metadata_async(self, resource_group, location, storage_ self.assertDictEqual(md, metadata) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_share_metadata_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_get_share_metadata_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} # Act @@ -846,10 +839,10 @@ async def test_get_share_metadata_async(self, resource_group, location, storage_ self.assertDictEqual(props.metadata, metadata) await self._delete_shares(client.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_share_metadata_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_get_share_metadata_with_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) metadata = {'hello': 'world', 'number': '42'} # Act @@ -864,10 +857,10 @@ async def test_get_share_metadata_with_snapshot_async(self, resource_group, loca self.assertDictEqual(props.metadata, metadata) await self._delete_shares(client.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_share_properties_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_share_properties_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share1 = await self._create_share("share1") share2 = await self._create_share("share2") @@ -894,10 +887,10 @@ async def test_set_share_properties_async(self, resource_group, location, storag await self._delete_shares() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_share_with_protocol(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_share_with_protocol(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) # Act share_client = self._get_share_reference("testshare2") @@ -914,10 +907,10 @@ async def test_create_share_with_protocol(self, resource_group, location, storag await share_client.delete_share() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_share_properties_with_root_squash(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_share_properties_with_root_squash(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share1 = await self._create_share("share1", protocols=ShareProtocols.NFS) share2 = await self._create_share("share2", protocols=ShareProtocols.NFS) @@ -937,11 +930,11 @@ async def test_set_share_properties_with_root_squash(self, resource_group, locat await self._delete_shares() @pytest.mark.playback_test_only - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test async def test_list_shares_with_root_squash_and_protocols( - self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) await self._create_share(prefix="testshare1", protocols="NFS", root_squash=ShareRootSquash.all_squash) await self._create_share(prefix="testshare2", protocols=ShareProtocols.SMB) # Act @@ -960,11 +953,10 @@ async def test_list_shares_with_root_squash_and_protocols( self.assertEqual(share2_props.protocols, ["SMB"]) await self._delete_shares() - @GlobalResourceGroupPreparer() - @StorageAccountPreparer(random_name_enabled=True, sku='premium_LRS', name_prefix='pyacrstorage', kind='FileStorage') + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_share_properties_for_premium_account_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_get_share_properties_for_premium_account_async(self, premium_storage_file_account_name, premium_storage_file_account_key): + self._setup(premium_storage_file_account_name, premium_storage_file_account_key) share = await self._create_share() # Act @@ -979,10 +971,10 @@ async def test_get_share_properties_for_premium_account_async(self, resource_gro self.assertIsNotNone(props.provisioned_egress_mbps) self.assertIsNotNone(props.next_allowed_quota_downgrade_time) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_share_with_existing_share_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_delete_share_with_existing_share_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() @@ -993,10 +985,10 @@ async def test_delete_share_with_existing_share_async(self, resource_group, loca self.assertIsNone(deleted) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_share_with_existing_share_fail_not_exist_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_delete_share_with_existing_share_fail_not_exist_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) client = self._get_share_reference() # Act @@ -1007,10 +999,10 @@ async def test_delete_share_with_existing_share_fail_not_exist_async(self, resou log_as_str = log_captured.getvalue() await self._delete_shares(client.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_share_with_non_existing_share_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_delete_share_with_non_existing_share_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) client = self._get_share_reference() # Act @@ -1022,10 +1014,10 @@ async def test_delete_share_with_non_existing_share_async(self, resource_group, self.assertTrue('ERROR' not in log_as_str) await self._delete_shares(client.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_share_with_non_existing_share_fail_not_exist_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_delete_share_with_non_existing_share_fail_not_exist_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) client = self._get_share_reference() # Act @@ -1036,10 +1028,10 @@ async def test_delete_share_with_non_existing_share_fail_not_exist_async(self, r log_as_str = log_captured.getvalue() await self._delete_shares(client.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_share_stats_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_get_share_stats_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() @@ -1050,10 +1042,10 @@ async def test_get_share_stats_async(self, resource_group, location, storage_acc self.assertEqual(share_usage, 0) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_share_acl_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_share_acl_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() @@ -1065,10 +1057,10 @@ async def test_set_share_acl_async(self, resource_group, location, storage_accou self.assertIsNotNone(acl) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_share_acl_with_empty_signed_identifiers_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_share_acl_with_empty_signed_identifiers_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() @@ -1081,10 +1073,10 @@ async def test_set_share_acl_with_empty_signed_identifiers_async(self, resource_ self.assertEqual(len(acl.get('signed_identifiers')), 0) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_share_acl_with_signed_identifiers_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_share_acl_with_signed_identifiers_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() @@ -1105,10 +1097,10 @@ async def test_set_share_acl_with_signed_identifiers_async(self, resource_group, self.assertEqual(acl['signed_identifiers'][0].id, 'testid') await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_share_acl_too_many_ids_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_set_share_acl_too_many_ids_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = self._get_share_reference() await share.create_share() @@ -1126,10 +1118,10 @@ async def test_set_share_acl_too_many_ids_async(self, resource_group, location, ) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_directories_and_files_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_directories_and_files_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = await self._create_share() dir0 = share.get_directory_client() await dir0.upload_file('file1', 'data1') @@ -1153,10 +1145,10 @@ async def test_list_directories_and_files_async(self, resource_group, location, self.assertNamedItemInContainer(resp, 'file1') await self._delete_shares(share) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_directories_and_files_with_snapshot_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_directories_and_files_with_snapshot_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_name = await self._create_share() dir1 = share_name.get_directory_client('dir1') await dir1.create_directory() @@ -1183,10 +1175,10 @@ async def test_list_directories_and_files_with_snapshot_async(self, resource_gro self.assertNamedItemInContainer(resp, 'dir2') await self._delete_shares(share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_directories_and_files_with_num_results_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_directories_and_files_with_num_results_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_name = await self._create_share() dir1 = await share_name.create_directory('dir1') root = share_name.get_directory_client() @@ -1208,10 +1200,10 @@ async def test_list_directories_and_files_with_num_results_async(self, resource_ self.assertNamedItemInContainer(results, 'filea1') await self._delete_shares(share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_directories_and_files_with_num_results_and_marker_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_directories_and_files_with_num_results_and_marker_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share_name = await self._create_share() dir1 = share_name.get_directory_client('dir1') await dir1.create_directory() @@ -1243,10 +1235,10 @@ async def test_list_directories_and_files_with_num_results_and_marker_async(self self.assertEqual(generator2.continuation_token, None) await self._delete_shares(share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_directories_and_files_with_prefix_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_list_directories_and_files_with_prefix_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = await self._create_share() dir1 = await share.create_directory('dir1') await share.create_directory('dir1/pref_dir3') @@ -1270,14 +1262,14 @@ async def test_list_directories_and_files_with_prefix_async(self, resource_group self.assertNamedItemInContainer(resp, 'pref_dir3') await self._delete_shares(share) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_shared_access_share_async(self, resource_group, location, storage_account, storage_account_key): + async def test_shared_access_share_async(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) file_name = 'file1' dir_name = 'dir1' data = b'hello world' @@ -1294,7 +1286,7 @@ async def test_shared_access_share_async(self, resource_group, location, storage permission=ShareSasPermissions(read=True), ) sas_client = ShareFileClient( - self.account_url(storage_account, "file"), + self.account_url(storage_account_name, "file"), share_name=share.share_name, file_path=dir_name + '/' + file_name, credential=token, @@ -1308,10 +1300,10 @@ async def test_shared_access_share_async(self, resource_group, location, storage self.assertEqual(data, response.content) await self._delete_shares(share.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_permission_for_share(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_create_permission_for_share(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) user_given_permission = "O:S-1-5-21-2127521184-1604012920-1887927527-21560751G:S-1-5-21-2127521184-" \ "1604012920-1887927527-513D:AI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;" \ "S-1-5-21-397955417-626881126-188441444-3053964)" @@ -1328,14 +1320,14 @@ async def test_create_permission_for_share(self, resource_group, location, stora self.assertEqual(permission_key, permission_key2) await self._delete_shares(share_client.share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_transport_closed_only_once_async(self, resource_group, location, storage_account, storage_account_key): + async def test_transport_closed_only_once_async(self, storage_account_name, storage_account_key): if not self.is_live: return - self._setup(storage_account, storage_account_key) + self._setup(storage_account_name, storage_account_key) transport = AioHttpTransport() - url = self.account_url(storage_account, "file") + url = self.account_url(storage_account_name, "file") credential = storage_account_key prefix = TEST_SHARE_PREFIX share_name = self.get_resource_name(prefix) @@ -1348,10 +1340,10 @@ async def test_transport_closed_only_once_async(self, resource_group, location, assert transport.session is not None await self._delete_shares(share_name) - @GlobalStorageAccountPreparer() + @FileSharePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_directory_from_share_async(self, resource_group, location, storage_account, storage_account_key): - self._setup(storage_account, storage_account_key) + async def test_delete_directory_from_share_async(self, storage_account_name, storage_account_key): + self._setup(storage_account_name, storage_account_key) share = await self._create_share() await share.create_directory('dir1') await share.create_directory('dir2') diff --git a/sdk/storage/azure-storage-queue/CHANGELOG.md b/sdk/storage/azure-storage-queue/CHANGELOG.md index 9c7819c84872..8524db53efce 100644 --- a/sdk/storage/azure-storage-queue/CHANGELOG.md +++ b/sdk/storage/azure-storage-queue/CHANGELOG.md @@ -1,5 +1,7 @@ # Release History +## 12.2.0b1 (Unreleased) + ## 12.1.6 (2021-04-20) **Fixes** - Make `AccountName`, `AccountKey` etc. in conn_str case insensitive diff --git a/sdk/storage/azure-storage-queue/README.md b/sdk/storage/azure-storage-queue/README.md index 4a953ef4686c..c8c714c7beb0 100644 --- a/sdk/storage/azure-storage-queue/README.md +++ b/sdk/storage/azure-storage-queue/README.md @@ -298,6 +298,8 @@ Other optional configuration keyword arguments that can be specified on the clie * __user_agent__ (str): Appends the custom value to the user-agent header to be sent with the request. * __logging_enable__ (bool): Enables logging at the DEBUG level. Defaults to False. Can also be passed in at the client level to enable it for all requests. +* __logging_body__ (bool): Enables logging the request and response body. Defaults to False. Can also be passed in at +the client level to enable it for all requests. * __headers__ (dict): Pass in custom headers as key, value pairs. E.g. `headers={'CustomValue': value}` diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py index 4a8d4a3dc513..761e3de2ba7c 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/models.py @@ -329,6 +329,12 @@ class AccountSasPermissions(object): To enable set or get tags on the blobs in the container. :keyword bool filter_by_tags: To enable get blobs by tags, this should be used together with list permission. + :keyword bool set_immutability_policy: + To enable operations related to set/delete immutability policy. + To get immutability policy, you just need read permission. + :keyword bool permanent_delete: + To enable permanent delete on the blob is permitted. + Valid for Object resource type of Blob only. """ def __init__(self, read=False, write=False, delete=False, list=False, # pylint: disable=redefined-builtin @@ -337,6 +343,7 @@ def __init__(self, read=False, write=False, delete=False, self.write = write self.delete = delete self.delete_previous_version = delete_previous_version + self.permanent_delete = kwargs.pop('permanent_delete', False) self.list = list self.add = add self.create = create @@ -344,17 +351,20 @@ def __init__(self, read=False, write=False, delete=False, self.process = process self.tag = kwargs.pop('tag', False) self.filter_by_tags = kwargs.pop('filter_by_tags', False) + self.set_immutability_policy = kwargs.pop('set_immutability_policy', False) self._str = (('r' if self.read else '') + ('w' if self.write else '') + ('d' if self.delete else '') + ('x' if self.delete_previous_version else '') + + ('y' if self.permanent_delete else '') + ('l' if self.list else '') + ('a' if self.add else '') + ('c' if self.create else '') + ('u' if self.update else '') + ('p' if self.process else '') + ('f' if self.filter_by_tags else '') + - ('t' if self.tag else '') + ('t' if self.tag else '') + + ('i' if self.set_immutability_policy else '') ) def __str__(self): @@ -377,6 +387,7 @@ def from_string(cls, permission): p_write = 'w' in permission p_delete = 'd' in permission p_delete_previous_version = 'x' in permission + p_permanent_delete = 'y' in permission p_list = 'l' in permission p_add = 'a' in permission p_create = 'c' in permission @@ -384,9 +395,11 @@ def from_string(cls, permission): p_process = 'p' in permission p_tag = 't' in permission p_filter_by_tags = 'f' in permission + p_set_immutability_policy = 'i' in permission parsed = cls(read=p_read, write=p_write, delete=p_delete, delete_previous_version=p_delete_previous_version, list=p_list, add=p_add, create=p_create, update=p_update, process=p_process, tag=p_tag, - filter_by_tags=p_filter_by_tags) + filter_by_tags=p_filter_by_tags, set_immutability_policy=p_set_immutability_policy, + permanent_delete=p_permanent_delete) return parsed diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py index 00068a7ba112..c6c6bb9aa5cc 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/policies.py @@ -12,7 +12,6 @@ from io import SEEK_SET, UnsupportedOperation import logging import uuid -import types from typing import Any, TYPE_CHECKING from wsgiref.handlers import format_date_time try: @@ -183,11 +182,15 @@ class StorageLoggingPolicy(NetworkTraceLoggingPolicy): This accepts both global configuration, and per-request level with "enable_http_logger" """ + def __init__(self, logging_enable=False, **kwargs): + self.logging_body = kwargs.pop("logging_body", False) + super(StorageLoggingPolicy, self).__init__(logging_enable=logging_enable, **kwargs) def on_request(self, request): # type: (PipelineRequest, Any) -> None http_request = request.http_request options = request.context.options + self.logging_body = self.logging_body or options.pop("logging_body", False) if options.pop("logging_enable", self.enable_http_logger): request.context["logging_enable"] = True if not _LOGGER.isEnabledFor(logging.DEBUG): @@ -216,11 +219,11 @@ def on_request(self, request): _LOGGER.debug(" %r: %r", header, value) _LOGGER.debug("Request body:") - # We don't want to log the binary data of a file upload. - if isinstance(http_request.body, types.GeneratorType): - _LOGGER.debug("File upload") - else: + if self.logging_body: _LOGGER.debug(str(http_request.body)) + else: + # We don't want to log the binary data of a file upload. + _LOGGER.debug("Hidden body, please use logging_body to show body") except Exception as err: # pylint: disable=broad-except _LOGGER.debug("Failed to log request: %r", err) @@ -240,19 +243,24 @@ def on_response(self, request, response): _LOGGER.debug("Response content:") pattern = re.compile(r'attachment; ?filename=["\w.]+', re.IGNORECASE) header = response.http_response.headers.get('content-disposition') + resp_content_type = response.http_response.headers.get("content-type", "") if header and pattern.match(header): filename = header.partition('=')[2] _LOGGER.debug("File attachments: %s", filename) - elif response.http_response.headers.get("content-type", "").endswith("octet-stream"): + elif resp_content_type.endswith("octet-stream"): _LOGGER.debug("Body contains binary data.") - elif response.http_response.headers.get("content-type", "").startswith("image"): + elif resp_content_type.startswith("image"): _LOGGER.debug("Body contains image data.") - else: - if response.context.options.get('stream', False): + + if self.logging_body and resp_content_type.startswith("text"): + _LOGGER.debug(response.http_response.text()) + elif self.logging_body: + try: + _LOGGER.debug(response.http_response.body()) + except ValueError: _LOGGER.debug("Body is streamable") - else: - _LOGGER.debug(response.http_response.text()) + except Exception as err: # pylint: disable=broad-except _LOGGER.debug("Failed to log response: %s", repr(err)) diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/response_handlers.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/response_handlers.py index cb280aeba7bf..ab146e9a980a 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/response_handlers.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_shared/response_handlers.py @@ -100,6 +100,10 @@ def process_storage_error(storage_error): # pylint:disable=too-many-statements error_dict = {} try: error_body = ContentDecodePolicy.deserialize_from_http_generics(storage_error.response) + try: + error_body = error_body or storage_error.response.reason + except AttributeError: + error_body = '' # If it is an XML response if isinstance(error_body, Element): error_dict = { @@ -111,7 +115,7 @@ def process_storage_error(storage_error): # pylint:disable=too-many-statements error_dict = error_body.get('error', {}) elif not error_code: _LOGGER.warning( - 'Unexpected return type % from ContentDecodePolicy.deserialize_from_http_generics.', type(error_body)) + 'Unexpected return type %s from ContentDecodePolicy.deserialize_from_http_generics.', type(error_body)) error_dict = {'message': str(error_body)} # If we extracted from a Json or XML response diff --git a/sdk/storage/azure-storage-queue/azure/storage/queue/_version.py b/sdk/storage/azure-storage-queue/azure/storage/queue/_version.py index c3c2d29a7016..30f8a8b1db75 100644 --- a/sdk/storage/azure-storage-queue/azure/storage/queue/_version.py +++ b/sdk/storage/azure-storage-queue/azure/storage/queue/_version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "12.1.6" +VERSION = "12.2.0b1" diff --git a/sdk/storage/azure-storage-queue/setup.py b/sdk/storage/azure-storage-queue/setup.py index d0f1847577ae..8e8878016510 100644 --- a/sdk/storage/azure-storage-queue/setup.py +++ b/sdk/storage/azure-storage-queue/setup.py @@ -60,7 +60,7 @@ author_email='ascl@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-queue', classifiers=[ - "Development Status :: 5 - Production/Stable", + "Development Status :: 4 - Beta", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', diff --git a/sdk/storage/azure-storage-queue/tests/_shared/asynctestcase.py b/sdk/storage/azure-storage-queue/tests/_shared/asynctestcase.py deleted file mode 100644 index 0aea8459a332..000000000000 --- a/sdk/storage/azure-storage-queue/tests/_shared/asynctestcase.py +++ /dev/null @@ -1,88 +0,0 @@ - -# coding: utf-8 -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -import asyncio -import functools - -from azure_devtools.scenario_tests.patches import mock_in_unit_test -from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function - -from azure.core.credentials import AccessToken - -from .testcase import StorageTestCase - -LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' - -class AsyncFakeTokenCredential(object): - """Protocol for classes able to provide OAuth tokens. - :param str scopes: Lets you specify the type of access needed. - """ - def __init__(self): - self.token = AccessToken("YOU SHALL NOT PASS", 0) - - async def get_token(self, *args): - return self.token - - -def patch_play_responses(unit_test): - """Fixes a bug affecting blob tests by applying https://github.com/kevin1024/vcrpy/pull/511 to vcrpy 3.0.0""" - - try: - from vcr.stubs.aiohttp_stubs import _serialize_headers, build_response, Request, URL - except ImportError: - # return a do-nothing patch when importing from vcr fails - return lambda _: None - - def fixed_play_responses(cassette, vcr_request): - history = [] - vcr_response = cassette.play_response(vcr_request) - response = build_response(vcr_request, vcr_response, history) - while 300 <= response.status <= 399: - if "location" not in response.headers: - break - next_url = URL(response.url).with_path(response.headers["location"]) - vcr_request = Request("GET", str(next_url), None, _serialize_headers(response.request_info.headers)) - vcr_request = cassette.find_requests_with_most_matches(vcr_request)[0][0] - history.append(response) - vcr_response = cassette.play_response(vcr_request) - response = build_response(vcr_request, vcr_response, history) - return response - - return mock_in_unit_test(unit_test, "vcr.stubs.aiohttp_stubs.play_responses", fixed_play_responses) - - -class AsyncStorageTestCase(StorageTestCase): - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - self.replay_patches.append(patch_play_responses) - - @staticmethod - def await_prepared_test(test_fn): - """Synchronous wrapper for async test methods. Used to avoid making changes - upstream to AbstractPreparer (which doesn't await the functions it wraps) - """ - - @functools.wraps(test_fn) - def run(test_class_instance, *args, **kwargs): - trim_kwargs_from_test_function(test_fn, kwargs) - loop = asyncio.get_event_loop() - return loop.run_until_complete(test_fn(test_class_instance, **kwargs)) - - return run - - def generate_oauth_token(self): - if self.is_live: - from azure.identity.aio import ClientSecretCredential - return ClientSecretCredential( - self.get_settings_value("TENANT_ID"), - self.get_settings_value("CLIENT_ID"), - self.get_settings_value("CLIENT_SECRET"), - ) - return self.generate_fake_token() - - def generate_fake_token(self): - return AsyncFakeTokenCredential() diff --git a/sdk/storage/azure-storage-queue/tests/_shared/testcase.py b/sdk/storage/azure-storage-queue/tests/_shared/testcase.py deleted file mode 100644 index a9bff2fe5460..000000000000 --- a/sdk/storage/azure-storage-queue/tests/_shared/testcase.py +++ /dev/null @@ -1,534 +0,0 @@ -# coding: utf-8 -# ------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -------------------------------------------------------------------------- -from __future__ import division -import os.path -import time -from datetime import datetime, timedelta - -try: - import unittest.mock as mock -except ImportError: - import mock - -import zlib -import math -import sys -import string -import random -import re -import logging -from devtools_testutils import ( - AzureMgmtTestCase, - AzureMgmtPreparer, - ResourceGroupPreparer, - StorageAccountPreparer, - FakeResource, -) -from azure_devtools.scenario_tests import RecordingProcessor, AzureTestError, create_random_name -try: - from cStringIO import StringIO # Python 2 -except ImportError: - from io import StringIO - -from azure.core.pipeline.policies import SansIOHTTPPolicy -from azure.core.exceptions import ResourceNotFoundError, HttpResponseError -from azure.core.credentials import AccessToken -from azure.storage.queue import generate_account_sas, AccountSasPermissions, ResourceTypes -from azure.mgmt.storage.models import StorageAccount, Endpoints -try: - # Running locally - use configuration in settings_real.py - from .settings_real import * -except ImportError: - # Running on the pipeline - use fake values in order to create rg, etc. - from .settings_fake import * - -try: - from devtools_testutils import mgmt_settings_real as settings -except ImportError: - from devtools_testutils import mgmt_settings_fake as settings - -import pytest - -from .service_versions import service_version_map - - -LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' -os.environ['AZURE_STORAGE_ACCOUNT_NAME'] = STORAGE_ACCOUNT_NAME -os.environ['AZURE_STORAGE_ACCOUNT_KEY'] = STORAGE_ACCOUNT_KEY -os.environ['AZURE_TEST_RUN_LIVE'] = os.environ.get('AZURE_TEST_RUN_LIVE', None) or RUN_IN_LIVE -os.environ['AZURE_SKIP_LIVE_RECORDING'] = os.environ.get('AZURE_SKIP_LIVE_RECORDING', None) or SKIP_LIVE_RECORDING - - -class FakeTokenCredential(object): - """Protocol for classes able to provide OAuth tokens. - :param str scopes: Lets you specify the type of access needed. - """ - def __init__(self): - self.token = AccessToken("YOU SHALL NOT PASS", 0) - self.get_token_count = 0 - - def get_token(self, *args): - self.get_token_count += 1 - return self.token - - -class XMSRequestIDBody(RecordingProcessor): - """This process is used for Storage batch call only, to avoid the echo policy. - """ - def process_response(self, response): - content_type = None - for key, value in response.get('headers', {}).items(): - if key.lower() == 'content-type': - content_type = (value[0] if isinstance(value, list) else value).lower() - break - - if content_type and 'multipart/mixed' in content_type: - response['body']['string'] = re.sub(b"x-ms-client-request-id: [a-f0-9-]+\r\n", b"", response['body']['string']) - - return response - - -class GlobalStorageAccountPreparer(AzureMgmtPreparer): - def __init__(self): - super(GlobalStorageAccountPreparer, self).__init__( - name_prefix='', - random_name_length=42 - ) - - def create_resource(self, name, **kwargs): - storage_account = StorageTestCase._STORAGE_ACCOUNT - if self.is_live: - self.test_class_instance.scrubber.register_name_pair( - storage_account.name, - "storagename" - ) - self.test_class_instance.scrubber.register_name_pair( - ":.{43}=\r", - ":fake_shared_key=\r" - ) - else: - name = "storagename" - storage_account.name = name - storage_account.primary_endpoints.blob = 'https://{}.{}.core.windows.net'.format(name, 'blob') - storage_account.primary_endpoints.queue = 'https://{}.{}.core.windows.net'.format(name, 'queue') - storage_account.primary_endpoints.table = 'https://{}.{}.core.windows.net'.format(name, 'table') - storage_account.primary_endpoints.file = 'https://{}.{}.core.windows.net'.format(name, 'file') - - return { - 'location': 'westus', - 'resource_group': StorageTestCase._RESOURCE_GROUP, - 'storage_account': storage_account, - 'storage_account_key': StorageTestCase._STORAGE_KEY, - 'storage_account_cs': StorageTestCase._STORAGE_CONNECTION_STRING, - } - - -class GlobalResourceGroupPreparer(AzureMgmtPreparer): - def __init__(self): - super(GlobalResourceGroupPreparer, self).__init__( - name_prefix='', - random_name_length=42 - ) - - def create_resource(self, name, **kwargs): - rg = StorageTestCase._RESOURCE_GROUP - if self.is_live: - self.test_class_instance.scrubber.register_name_pair( - rg.name, - "rgname" - ) - else: - rg = FakeResource( - name="rgname", - id="/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname" - ) - - return { - 'location': 'westus', - 'resource_group': rg, - } - - -class StorageTestCase(AzureMgmtTestCase): - - def __init__(self, *args, **kwargs): - super(StorageTestCase, self).__init__(*args, **kwargs) - self.replay_processors.append(XMSRequestIDBody()) - self.logger = logging.getLogger('azure.storage') - self.configure_logging() - - def connection_string(self, account, key): - return "DefaultEndpointsProtocol=https;AcCounTName=" + account.name + ";AccOuntKey=" + str(key) + ";EndpoIntSuffix=core.windows.net" - - def account_url(self, storage_account, storage_type): - """Return an url of storage account. - - :param str storage_account: Storage account name - :param str storage_type: The Storage type part of the URL. Should be "blob", or "queue", etc. - """ - try: - if storage_type == "blob": - return storage_account.primary_endpoints.blob.rstrip("/") - if storage_type == "queue": - return storage_account.primary_endpoints.queue.rstrip("/") - if storage_type == "file": - return storage_account.primary_endpoints.file.rstrip("/") - else: - raise ValueError("Unknown storage type {}".format(storage_type)) - except AttributeError: # Didn't find "primary_endpoints" - return 'https://{}.{}.core.windows.net'.format(storage_account, storage_type) - - def configure_logging(self): - enable_logging = ENABLE_LOGGING - - self.enable_logging() if enable_logging else self.disable_logging() - - def enable_logging(self): - handler = logging.StreamHandler() - handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) - self.logger.handlers = [handler] - self.logger.setLevel(logging.DEBUG) - self.logger.propagate = True - self.logger.disabled = False - - def disable_logging(self): - self.logger.propagate = False - self.logger.disabled = True - self.logger.handlers = [] - - def sleep(self, seconds): - if self.is_live: - time.sleep(seconds) - - def get_random_bytes(self, size): - # recordings don't like random stuff. making this more - # deterministic. - return b'a'*size - - def get_random_text_data(self, size): - '''Returns random unicode text data exceeding the size threshold for - chunking blob upload.''' - checksum = zlib.adler32(self.qualified_test_name.encode()) & 0xffffffff - rand = random.Random(checksum) - text = u'' - words = [u'hello', u'world', u'python', u'啊齄丂狛狜'] - while (len(text) < size): - index = int(rand.random()*(len(words) - 1)) - text = text + u' ' + words[index] - - return text - - @staticmethod - def _set_test_proxy(service, settings): - if settings.USE_PROXY: - service.set_proxy( - settings.PROXY_HOST, - settings.PROXY_PORT, - settings.PROXY_USER, - settings.PROXY_PASSWORD, - ) - - def assertNamedItemInContainer(self, container, item_name, msg=None): - def _is_string(obj): - if sys.version_info >= (3,): - return isinstance(obj, str) - else: - return isinstance(obj, basestring) - for item in container: - if _is_string(item): - if item == item_name: - return - elif isinstance(item, dict): - if item_name == item['name']: - return - elif item.name == item_name: - return - elif hasattr(item, 'snapshot') and item.snapshot == item_name: - return - - - standardMsg = '{0} not found in {1}'.format( - repr(item_name), [str(c) for c in container]) - self.fail(self._formatMessage(msg, standardMsg)) - - def assertNamedItemNotInContainer(self, container, item_name, msg=None): - for item in container: - if item.name == item_name: - standardMsg = '{0} unexpectedly found in {1}'.format( - repr(item_name), repr(container)) - self.fail(self._formatMessage(msg, standardMsg)) - - def assert_upload_progress(self, size, max_chunk_size, progress, unknown_size=False): - '''Validates that the progress chunks align with our chunking procedure.''' - index = 0 - total = None if unknown_size else size - small_chunk_size = size % max_chunk_size - self.assertEqual(len(progress), math.ceil(size / max_chunk_size)) - for i in progress: - self.assertTrue(i[0] % max_chunk_size == 0 or i[0] % max_chunk_size == small_chunk_size) - self.assertEqual(i[1], total) - - def assert_download_progress(self, size, max_chunk_size, max_get_size, progress): - '''Validates that the progress chunks align with our chunking procedure.''' - if size <= max_get_size: - self.assertEqual(len(progress), 1) - self.assertTrue(progress[0][0], size) - self.assertTrue(progress[0][1], size) - else: - small_chunk_size = (size - max_get_size) % max_chunk_size - self.assertEqual(len(progress), 1 + math.ceil((size - max_get_size) / max_chunk_size)) - - self.assertTrue(progress[0][0], max_get_size) - self.assertTrue(progress[0][1], size) - for i in progress[1:]: - self.assertTrue(i[0] % max_chunk_size == 0 or i[0] % max_chunk_size == small_chunk_size) - self.assertEqual(i[1], size) - - def generate_oauth_token(self): - if self.is_live: - from azure.identity import ClientSecretCredential - return ClientSecretCredential( - self.get_settings_value("TENANT_ID"), - self.get_settings_value("CLIENT_ID"), - self.get_settings_value("CLIENT_SECRET"), - ) - return self.generate_fake_token() - - def generate_sas_token(self): - fake_key = 'a'*30 + 'b'*30 - - return '?' + generate_account_sas( - account_name = 'test', # name of the storage account - account_key = fake_key, # key for the storage account - resource_types = ResourceTypes(object=True), - permission = AccountSasPermissions(read=True,list=True), - start = datetime.now() - timedelta(hours = 24), - expiry = datetime.now() + timedelta(days = 8) - ) - - def generate_fake_token(self): - return FakeTokenCredential() - - def _get_service_version(self, **kwargs): - env_version = service_version_map.get(os.environ.get("AZURE_LIVE_TEST_SERVICE_VERSION","LATEST")) - return kwargs.pop("service_version", env_version) - - def create_storage_client(self, client, *args, **kwargs): - kwargs["api_version"] = self._get_service_version(**kwargs) - kwargs["_additional_pipeline_policies"] = [ApiVersionAssertPolicy(kwargs["api_version"])] - return client(*args, **kwargs) - - def create_storage_client_from_conn_str(self, client, *args, **kwargs): - kwargs["api_version"] = self._get_service_version(**kwargs) - kwargs["_additional_pipeline_policies"] = [ApiVersionAssertPolicy(kwargs["api_version"])] - return client.from_connection_string(*args, **kwargs) - - -def not_for_emulator(test): - def skip_test_if_targeting_emulator(self): - test(self) - return skip_test_if_targeting_emulator - - -class ApiVersionAssertPolicy(SansIOHTTPPolicy): - """ - Assert the ApiVersion is set properly on the response - """ - - def __init__(self, api_version): - self.api_version = api_version - - def on_request(self, request): - assert request.http_request.headers['x-ms-version'] == self.api_version - - -class RetryCounter(object): - def __init__(self): - self.count = 0 - - def simple_count(self, retry_context): - self.count += 1 - - -class ResponseCallback(object): - def __init__(self, status=None, new_status=None): - self.status = status - self.new_status = new_status - self.first = True - self.count = 0 - - def override_first_status(self, response): - if self.first and response.http_response.status_code == self.status: - response.http_response.status_code = self.new_status - self.first = False - self.count += 1 - - def override_status(self, response): - if response.http_response.status_code == self.status: - response.http_response.status_code = self.new_status - self.count += 1 - - -class LogCaptured(object): - def __init__(self, test_case=None): - # accept the test case so that we may reset logging after capturing logs - self.test_case = test_case - - def __enter__(self): - # enable logging - # it is possible that the global logging flag is turned off - self.test_case.enable_logging() - - # create a string stream to send the logs to - self.log_stream = StringIO() - - # the handler needs to be stored so that we can remove it later - self.handler = logging.StreamHandler(self.log_stream) - self.handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) - - # get and enable the logger to send the outputs to the string stream - self.logger = logging.getLogger('azure.storage') - self.logger.level = logging.DEBUG - self.logger.addHandler(self.handler) - - # the stream is returned to the user so that the capture logs can be retrieved - return self.log_stream - - def __exit__(self, exc_type, exc_val, exc_tb): - # stop the handler, and close the stream to exit - self.logger.removeHandler(self.handler) - self.log_stream.close() - - # reset logging since we messed with the setting - self.test_case.configure_logging() - - -@pytest.fixture(scope="session") -def storage_account(): - test_case = AzureMgmtTestCase("__init__") - rg_preparer = ResourceGroupPreparer(random_name_enabled=True, name_prefix='pystorage') - storage_preparer = StorageAccountPreparer(random_name_enabled=True, name_prefix='pyacrstorage') - - # Create - subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", None) - location = os.environ.get("AZURE_LOCATION", "westus") - - existing_rg_name = os.environ.get("AZURE_RESOURCEGROUP_NAME") - existing_storage_name = os.environ.get("AZURE_STORAGE_ACCOUNT_NAME") - existing_storage_key = os.environ.get("AZURE_STORAGE_ACCOUNT_KEY") - storage_connection_string = os.environ.get("AZURE_STORAGE_CONNECTION_STRING") - - i_need_to_create_rg = not (existing_rg_name or existing_storage_name or storage_connection_string) - got_storage_info_from_env = existing_storage_name or storage_connection_string - - try: - if i_need_to_create_rg: - rg_name, rg_kwargs = rg_preparer._prepare_create_resource(test_case) - rg = rg_kwargs['resource_group'] - else: - rg_name = existing_rg_name or "no_rg_needed" - rg = FakeResource( - name=rg_name, - id="/subscriptions/{}/resourceGroups/{}".format(subscription_id, rg_name) - ) - StorageTestCase._RESOURCE_GROUP = rg - - try: - if got_storage_info_from_env: - - if storage_connection_string: - storage_connection_string_parts = dict([ - part.split('=', 1) - for part in storage_connection_string.split(";") - ]) - - storage_account = None - if existing_storage_name: - storage_name = existing_storage_name - storage_account = StorageAccount( - location=location, - ) - storage_account.name = storage_name - storage_account.id = storage_name - storage_account.primary_endpoints = Endpoints() - storage_account.primary_endpoints.blob = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'blob', ACCOUNT_URL_SUFFIX) - storage_account.primary_endpoints.queue = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'queue', ACCOUNT_URL_SUFFIX) - storage_account.primary_endpoints.table = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'table', ACCOUNT_URL_SUFFIX) - storage_account.primary_endpoints.file = '{}://{}.{}.{}'.format(PROTOCOL, storage_name, 'file', ACCOUNT_URL_SUFFIX) - storage_key = existing_storage_key - - if not storage_connection_string: - # It means I have received a storage name from env - storage_connection_string=";".join([ - "DefaultEndpointsProtocol=https", - "AccountName={}".format(storage_name), - "AccountKey={}".format(storage_key), - "BlobEndpoint={}".format(storage_account.primary_endpoints.blob), - "TableEndpoint={}".format(storage_account.primary_endpoints.table), - "QueueEndpoint={}".format(storage_account.primary_endpoints.queue), - "FileEndpoint={}".format(storage_account.primary_endpoints.file), - ]) - - if not storage_account: - # It means I have received a connection string - storage_name = storage_connection_string_parts["AccountName"] - storage_account = StorageAccount( - location=location, - ) - - def build_service_endpoint(service): - return "{}://{}.{}.{}".format( - storage_connection_string_parts.get("DefaultEndpointsProtocol", "https"), - storage_connection_string_parts["AccountName"], - service, - storage_connection_string_parts["EndpointSuffix"], # Let it fail if we don't even have that - ) - - storage_account.name = storage_name - storage_account.id = storage_name - storage_account.primary_endpoints=Endpoints() - storage_account.primary_endpoints.blob = storage_connection_string_parts.get("BlobEndpoint", build_service_endpoint("blob")) - storage_account.primary_endpoints.queue = storage_connection_string_parts.get("QueueEndpoint", build_service_endpoint("queue")) - storage_account.primary_endpoints.file = storage_connection_string_parts.get("FileEndpoint", build_service_endpoint("file")) - storage_account.secondary_endpoints=Endpoints() - storage_account.secondary_endpoints.blob = storage_connection_string_parts.get("BlobSecondaryEndpoint", build_service_endpoint("blob")) - storage_account.secondary_endpoints.queue = storage_connection_string_parts.get("QueueSecondaryEndpoint", build_service_endpoint("queue")) - storage_account.secondary_endpoints.file = storage_connection_string_parts.get("FileSecondaryEndpoint", build_service_endpoint("file")) - storage_key = storage_connection_string_parts["AccountKey"] - - else: - for i in range(5): - try: - time.sleep(i) if i == 0 else time.sleep(2 ** i) - storage_name, storage_kwargs = storage_preparer._prepare_create_resource( - test_case, **rg_kwargs) - break - # Some tests may be running on the storage account and a conflict may occur. Backoff & Retry. - except HttpResponseError: - continue - storage_account = storage_kwargs['storage_account'] - storage_key = storage_kwargs['storage_account_key'] - storage_connection_string = storage_kwargs['storage_account_cs'] - - StorageTestCase._STORAGE_ACCOUNT = storage_account - StorageTestCase._STORAGE_KEY = storage_key - StorageTestCase._STORAGE_CONNECTION_STRING = storage_connection_string - yield - finally: - if not got_storage_info_from_env: - storage_preparer.remove_resource( - storage_name, - resource_group=rg - ) - finally: - if i_need_to_create_rg: - try: - rg_preparer.remove_resource(rg_name) - # This covers the case where another test had already removed the resource group - except ResourceNotFoundError: - pass - StorageTestCase._RESOURCE_GROUP = None diff --git a/sdk/storage/azure-storage-queue/tests/conftest.py b/sdk/storage/azure-storage-queue/tests/conftest.py index b73f2c91f9b2..06999e12155c 100644 --- a/sdk/storage/azure-storage-queue/tests/conftest.py +++ b/sdk/storage/azure-storage-queue/tests/conftest.py @@ -26,15 +26,7 @@ import sys # fixture needs to be visible from conftest -from _shared.testcase import storage_account - # Ignore async tests for Python < 3.5 collect_ignore_glob = [] if sys.version_info < (3, 5): collect_ignore_glob.append("*_async.py") - -def pytest_configure(config): - # register an additional marker - config.addinivalue_line( - "usefixtures", "storage_account" - ) diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats.test_queue_service_stats_f.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats.test_queue_service_stats_f.yaml index 9b0c8f39fab4..861b4a569bf2 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats.test_queue_service_stats_f.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats.test_queue_service_stats_f.yaml @@ -9,29 +9,30 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-queue/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-queue/12.1.6 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 30 Oct 2019 19:52:24 GMT + - Thu, 07 Oct 2021 23:07:54 GMT x-ms-version: - - '2018-03-28' + - '2020-08-04' method: GET - uri: https://pyacrstoragestorname-secondary.queue.core.windows.net/?restype=service&comp=stats + uri: https://storagename-secondary.queue.core.windows.net/?restype=service&comp=stats response: body: - string: "\uFEFFunavailable" + string: "\uFEFFliveThu, + 07 Oct 2021 23:05:07 GMT" headers: cache-control: - no-cache content-type: - application/xml date: - - Wed, 30 Oct 2019 19:52:24 GMT + - Thu, 07 Oct 2021 23:07:53 GMT server: - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2018-03-28' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats.test_queue_service_stats_when_unavailable.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats.test_queue_service_stats_when_unavailable.yaml index 5fc02fbb92d1..bd7720772a64 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats.test_queue_service_stats_when_unavailable.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats.test_queue_service_stats_when_unavailable.yaml @@ -9,29 +9,30 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-storage-queue/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-queue/12.1.6 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 30 Oct 2019 19:52:46 GMT + - Thu, 07 Oct 2021 23:07:54 GMT x-ms-version: - - '2018-03-28' + - '2020-08-04' method: GET - uri: https://pyacrstoragestorname-secondary.queue.core.windows.net/?restype=service&comp=stats + uri: https://storagename-secondary.queue.core.windows.net/?restype=service&comp=stats response: body: - string: "\uFEFFunavailable" + string: "\uFEFFliveThu, + 07 Oct 2021 23:05:07 GMT" headers: cache-control: - no-cache content-type: - application/xml date: - - Wed, 30 Oct 2019 19:52:45 GMT + - Thu, 07 Oct 2021 23:07:54 GMT server: - Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: - chunked x-ms-version: - - '2018-03-28' + - '2020-08-04' status: code: 200 message: OK diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats_async.test_queue_service_stats_f.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats_async.test_queue_service_stats_f.yaml index e9ea1ac86c68..4bf75114556b 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats_async.test_queue_service_stats_f.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats_async.test_queue_service_stats_f.yaml @@ -5,32 +5,26 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-queue/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-queue/12.1.6 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 30 Oct 2019 19:53:07 GMT + - Thu, 07 Oct 2021 23:08:44 GMT x-ms-version: - - '2018-03-28' + - '2020-10-02' method: GET - uri: https://pyacrstoragestorname-secondary.queue.core.windows.net/?restype=service&comp=stats + uri: https://storagename-secondary.queue.core.windows.net/?restype=service&comp=stats response: body: - string: "\uFEFFunavailable" + string: "\uFEFFliveThu, + 07 Oct 2021 23:05:07 GMT" headers: cache-control: no-cache content-type: application/xml - date: Wed, 30 Oct 2019 19:53:06 GMT + date: Thu, 07 Oct 2021 23:08:44 GMT server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2018-03-28' + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstoragerl63rbz2p4k5-secondary.queue.core.windows.net - - / - - restype=service&comp=stats - - '' + url: https://emilydevtest-secondary.queue.core.windows.net/?restype=service&comp=stats version: 1 diff --git a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats_async.test_queue_service_stats_when_unavailable.yaml b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats_async.test_queue_service_stats_when_unavailable.yaml index 09bf20cf0d01..7f4d2038acac 100644 --- a/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats_async.test_queue_service_stats_when_unavailable.yaml +++ b/sdk/storage/azure-storage-queue/tests/recordings/test_queue_service_stats_async.test_queue_service_stats_when_unavailable.yaml @@ -5,33 +5,26 @@ interactions: Accept: - application/xml User-Agent: - - azsdk-python-storage-queue/12.0.0b5 Python/3.6.3 (Windows-10-10.0.18362-SP0) + - azsdk-python-storage-queue/12.1.6 Python/3.7.3 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 30 Oct 2019 19:53:28 GMT + - Thu, 07 Oct 2021 23:08:45 GMT x-ms-version: - - '2018-03-28' + - '2020-10-02' method: GET - uri: https://pyacrstoragestorname-secondary.queue.core.windows.net/?restype=service&comp=stats + uri: https://storagename-secondary.queue.core.windows.net/?restype=service&comp=stats response: body: - string: "\uFEFFliveWed, - 30 Oct 2019 19:51:23 GMT" + string: "\uFEFFliveThu, + 07 Oct 2021 23:05:07 GMT" headers: cache-control: no-cache content-type: application/xml - date: Wed, 30 Oct 2019 19:53:27 GMT + date: Thu, 07 Oct 2021 23:08:44 GMT server: Windows-Azure-Queue/1.0 Microsoft-HTTPAPI/2.0 transfer-encoding: chunked - x-ms-version: '2018-03-28' + x-ms-version: '2020-10-02' status: code: 200 message: OK - url: !!python/object/new:yarl.URL - state: !!python/tuple - - !!python/object/new:urllib.parse.SplitResult - - https - - pyacrstorage6c7ojz37crlh-secondary.queue.core.windows.net - - / - - restype=service&comp=stats - - '' + url: https://emilydevtest-secondary.queue.core.windows.net/?restype=service&comp=stats version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/__init__.py b/sdk/storage/azure-storage-queue/tests/settings/__init__.py similarity index 100% rename from sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/__init__.py rename to sdk/storage/azure-storage-queue/tests/settings/__init__.py diff --git a/sdk/storage/azure-storage-queue/tests/_shared/service_versions.py b/sdk/storage/azure-storage-queue/tests/settings/service_versions.py similarity index 100% rename from sdk/storage/azure-storage-queue/tests/_shared/service_versions.py rename to sdk/storage/azure-storage-queue/tests/settings/service_versions.py diff --git a/sdk/storage/azure-storage-queue/tests/_shared/settings_fake.py b/sdk/storage/azure-storage-queue/tests/settings/settings_fake.py similarity index 65% rename from sdk/storage/azure-storage-queue/tests/_shared/settings_fake.py rename to sdk/storage/azure-storage-queue/tests/settings/settings_fake.py index 7dba7c692a84..2dd5c4fe04a7 100644 --- a/sdk/storage/azure-storage-queue/tests/_shared/settings_fake.py +++ b/sdk/storage/azure-storage-queue/tests/settings/settings_fake.py @@ -4,14 +4,15 @@ # license information. # -------------------------------------------------------------------------- -STORAGE_ACCOUNT_NAME = "" -STORAGE_ACCOUNT_KEY = "" +STORAGE_ACCOUNT_NAME = "fakename" +STORAGE_ACCOUNT_KEY = "fakekey" + +TENANT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_ID = "00000000-0000-0000-0000-000000000000" +CLIENT_SECRET = "00000000-0000-0000-0000-000000000000" ACCOUNT_URL_SUFFIX = 'core.windows.net' RUN_IN_LIVE = "False" SKIP_LIVE_RECORDING = "True" PROTOCOL = "https" - -ENABLE_LOGGING = True - diff --git a/sdk/storage/azure-storage-queue/tests/settings/testcase.py b/sdk/storage/azure-storage-queue/tests/settings/testcase.py new file mode 100644 index 000000000000..315e0c3ff455 --- /dev/null +++ b/sdk/storage/azure-storage-queue/tests/settings/testcase.py @@ -0,0 +1,54 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from __future__ import division + +import functools +import os.path + +try: + import unittest.mock as mock +except ImportError: + import mock + +from devtools_testutils import ( + PowerShellPreparer, ACCOUNT_FAKE_KEY) + +try: + from cStringIO import StringIO # Python 2 +except ImportError: + from io import StringIO +try: + # Running locally - use configuration in settings_real.py + from .settings_real import * +except ImportError: + # Running on the pipeline - use fake values in order to create rg, etc. + from .settings_fake import * + + +LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s' +os.environ['STORAGE_ACCOUNT_NAME'] = os.environ.get('STORAGE_ACCOUNT_NAME', None) or STORAGE_ACCOUNT_NAME +os.environ['STORAGE_ACCOUNT_KEY'] = os.environ.get('STORAGE_ACCOUNT_KEY', None) or STORAGE_ACCOUNT_KEY + +os.environ['AZURE_TEST_RUN_LIVE'] = os.environ.get('AZURE_TEST_RUN_LIVE', None) or RUN_IN_LIVE +os.environ['AZURE_SKIP_LIVE_RECORDING'] = os.environ.get('AZURE_SKIP_LIVE_RECORDING', None) or SKIP_LIVE_RECORDING +os.environ['PROTOCOL'] = PROTOCOL +os.environ['ACCOUNT_URL_SUFFIX'] = ACCOUNT_URL_SUFFIX + +os.environ['STORAGE_TENANT_ID'] = os.environ.get('STORAGE_TENANT_ID', None) or TENANT_ID +os.environ['STORAGE_CLIENT_ID'] = os.environ.get('STORAGE_CLIENT_ID', None) or CLIENT_ID +os.environ['STORAGE_CLIENT_SECRET'] = os.environ.get('STORAGE_CLIENT_SECRET', None) or CLIENT_SECRET + +QueuePreparer = functools.partial( + PowerShellPreparer, "storage", + storage_account_name="storagename", + storage_account_key=ACCOUNT_FAKE_KEY, +) + +def not_for_emulator(test): + def skip_test_if_targeting_emulator(self): + test(self) + return skip_test_if_targeting_emulator diff --git a/sdk/storage/azure-storage-queue/tests/test_queue.py b/sdk/storage/azure-storage-queue/tests/test_queue.py index 58deba7c5552..16b7da288f97 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue.py @@ -18,7 +18,7 @@ timedelta, date, ) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer +from devtools_testutils.storage import StorageTestCase from azure.mgmt.storage.models import Endpoints from azure.core.pipeline.transport import RequestsTransport from azure.core.exceptions import ( @@ -38,7 +38,7 @@ generate_queue_sas ) -from _shared.testcase import GlobalStorageAccountPreparer, StorageTestCase, LogCaptured +from settings.testcase import QueuePreparer # ------------------------------------------------------------------------------ TEST_QUEUE_PREFIX = 'pyqueuesync' @@ -60,20 +60,20 @@ def _create_queue(self, qsc, prefix=TEST_QUEUE_PREFIX, queue_list=None): return queue # --Test cases for queues ---------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_queue(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_queue(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) created = queue_client.create_queue() # Asserts self.assertTrue(created) - @GlobalStorageAccountPreparer() - def test_create_queue_fail_on_exist(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_queue_fail_on_exist(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) created = queue_client.create_queue() with self.assertRaises(ResourceExistsError): @@ -82,10 +82,10 @@ def test_create_queue_fail_on_exist(self, resource_group, location, storage_acco # Asserts self.assertTrue(created) - @GlobalStorageAccountPreparer() - def test_create_queue_fail_on_exist_different_metadata(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_queue_fail_on_exist_different_metadata(self, storage_account_name, storage_account_key): # Action - url = self.account_url(storage_account, "queue") + url = self.account_url(storage_account_name, "queue") qsc = QueueServiceClient(url, storage_account_key) queue_client = self._get_queue_reference(qsc) created = queue_client.create_queue() @@ -95,10 +95,10 @@ def test_create_queue_fail_on_exist_different_metadata(self, resource_group, loc # Asserts self.assertTrue(created) - @GlobalStorageAccountPreparer() - def test_create_queue_with_options(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_queue_with_options(self, storage_account_name, storage_account_key): # Action - url = self.account_url(storage_account, "queue") + url = self.account_url(storage_account_name, "queue") qsc = QueueServiceClient(url, storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue( @@ -111,20 +111,20 @@ def test_create_queue_with_options(self, resource_group, location, storage_accou self.assertEqual('test', props.metadata['val1']) self.assertEqual('blah', props.metadata['val2']) - @GlobalStorageAccountPreparer() - def test_delete_non_existing_queue(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_delete_non_existing_queue(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) # Asserts with self.assertRaises(ResourceNotFoundError): queue_client.delete_queue() - @GlobalStorageAccountPreparer() - def test_delete_existing_queue_fail_not_exist(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_delete_existing_queue_fail_not_exist(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) created = queue_client.create_queue() @@ -133,10 +133,10 @@ def test_delete_existing_queue_fail_not_exist(self, resource_group, location, st # Asserts self.assertIsNone(deleted) - @GlobalStorageAccountPreparer() - def test_list_queues(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_list_queues(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queues = list(qsc.list_queues()) @@ -145,11 +145,11 @@ def test_list_queues(self, resource_group, location, storage_account, storage_ac self.assertIsNotNone(queues) assert len(queues) >= 1 - @GlobalStorageAccountPreparer() - def test_list_queues_with_options(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_list_queues_with_options(self, storage_account_name, storage_account_key): # Arrange prefix = 'listqueue' - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_list = [] for i in range(0, 4): self._create_queue(qsc, prefix + str(i), queue_list) @@ -178,10 +178,10 @@ def test_list_queues_with_options(self, resource_group, location, storage_accoun self.assertIsNotNone(queues2[0]) self.assertNotEqual('', queues2[0].name) - @GlobalStorageAccountPreparer() - def test_list_queues_with_metadata(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_list_queues_with_metadata(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._get_queue_reference(qsc) queue.create_queue() queue.set_queue_metadata(metadata={'val1': 'test', 'val2': 'blah'}) @@ -198,10 +198,10 @@ def test_list_queues_with_metadata(self, resource_group, location, storage_accou self.assertEqual(len(listed_queue.metadata), 2) self.assertEqual(listed_queue.metadata['val1'], 'test') - @GlobalStorageAccountPreparer() - def test_set_queue_metadata(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_queue_metadata(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._get_queue_reference(qsc) metadata = {'hello': 'world', 'number': '43'} queue.create_queue() @@ -212,10 +212,10 @@ def test_set_queue_metadata(self, resource_group, location, storage_account, sto # Assert self.assertDictEqual(metadata_from_response, metadata) - @GlobalStorageAccountPreparer() - def test_get_queue_metadata_message_count(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_get_queue_metadata_message_count(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() sent_message = queue_client.send_message(u'message1') @@ -226,10 +226,10 @@ def test_get_queue_metadata_message_count(self, resource_group, location, storag self.assertTrue(props.approximate_message_count >= 1) self.assertEqual(0, len(props.metadata)) - @GlobalStorageAccountPreparer() - def test_queue_exists(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_queue_exists(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._get_queue_reference(qsc) queue.create_queue() @@ -239,10 +239,10 @@ def test_queue_exists(self, resource_group, location, storage_account, storage_a # Assert self.assertTrue(exists) - @GlobalStorageAccountPreparer() - def test_queue_not_exists(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_queue_not_exists(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = qsc.get_queue_client(self.get_resource_name('missing')) # Act with self.assertRaises(ResourceNotFoundError): @@ -250,10 +250,10 @@ def test_queue_not_exists(self, resource_group, location, storage_account, stora # Assert - @GlobalStorageAccountPreparer() - def test_put_message(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_put_message(self, storage_account_name, storage_account_key): # Action. No exception means pass. No asserts needed. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -269,10 +269,10 @@ def test_put_message(self, resource_group, location, storage_account, storage_ac self.assertNotEqual('', message.pop_receipt) self.assertEqual(u'message4', message.content) - @GlobalStorageAccountPreparer() - def test_put_message_large_time_to_live(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_put_message_large_time_to_live(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() # There should be no upper bound on a queue message's time to live @@ -286,10 +286,10 @@ def test_put_message_large_time_to_live(self, resource_group, location, storage_ messages[0].expires_on, messages[0].inserted_on + timedelta(seconds=1024 * 1024 * 1024 - 3600)) - @GlobalStorageAccountPreparer() - def test_put_message_infinite_time_to_live(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_put_message_infinite_time_to_live(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1', time_to_live=-1) @@ -300,10 +300,10 @@ def test_put_message_infinite_time_to_live(self, resource_group, location, stora # Assert self.assertEqual(messages[0].expires_on.year, date.max.year) - @GlobalStorageAccountPreparer() - def test_get_messages(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_get_messages(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -324,10 +324,10 @@ def test_get_messages(self, resource_group, location, storage_account, storage_a self.assertIsInstance(message.expires_on, datetime) self.assertIsInstance(message.next_visible_on, datetime) - @GlobalStorageAccountPreparer() - def test_receive_one_message(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_receive_one_message(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() self.assertIsNone(queue_client.receive_message()) @@ -356,10 +356,10 @@ def test_receive_one_message(self, resource_group, location, storage_account, st self.assertEqual(u'message3', peeked_message3.content) self.assertEqual(0, peeked_message3.dequeue_count) - @GlobalStorageAccountPreparer() - def test_get_messages_with_options(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_get_messages_with_options(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -383,10 +383,10 @@ def test_get_messages_with_options(self, resource_group, location, storage_accou self.assertNotEqual('', message.expires_on) self.assertNotEqual('', message.next_visible_on) - @GlobalStorageAccountPreparer() - def test_peek_messages(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_peek_messages(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -408,10 +408,10 @@ def test_peek_messages(self, resource_group, location, storage_account, storage_ self.assertNotEqual('', message.expires_on) self.assertIsNone(message.next_visible_on) - @GlobalStorageAccountPreparer() - def test_peek_messages_with_options(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_peek_messages_with_options(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -433,10 +433,10 @@ def test_peek_messages_with_options(self, resource_group, location, storage_acco self.assertNotEqual('', message.expires_on) self.assertIsNone(message.next_visible_on) - @GlobalStorageAccountPreparer() - def test_clear_messages(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_clear_messages(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -450,10 +450,10 @@ def test_clear_messages(self, resource_group, location, storage_account, storage self.assertIsNotNone(result) self.assertEqual(0, len(result)) - @GlobalStorageAccountPreparer() - def test_delete_message(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_delete_message(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -470,10 +470,10 @@ def test_delete_message(self, resource_group, location, storage_account, storage assert messages is not None assert len(messages) == 3 - @GlobalStorageAccountPreparer() - def test_update_message(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_update_message(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -504,10 +504,10 @@ def test_update_message(self, resource_group, location, storage_account, storage self.assertIsNotNone(message.expires_on) self.assertIsNotNone(message.next_visible_on) - @GlobalStorageAccountPreparer() - def test_update_message_content(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_update_message_content(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -542,12 +542,12 @@ def test_update_message_content(self, resource_group, location, storage_account, self.assertIsNotNone(message.next_visible_on) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_account_sas(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_account_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -577,41 +577,41 @@ def test_account_sas(self, resource_group, location, storage_account, storage_ac self.assertNotEqual('', message.id) self.assertEqual(u'message1', message.content) - @GlobalStorageAccountPreparer() - def test_account_sas_raises_if_sas_already_in_uri(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_account_sas_raises_if_sas_already_in_uri(self, storage_account_name, storage_account_key): with self.assertRaises(ValueError): QueueServiceClient( - self.account_url(storage_account, "queue") + "?sig=foo", + self.account_url(storage_account_name, "queue") + "?sig=foo", credential=AzureSasCredential("?foo=bar")) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_token_credential(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_token_credential(self, storage_account_name, storage_account_key): token_credential = self.generate_oauth_token() # Action 1: make sure token works - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=token_credential) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=token_credential) queues = service.get_service_properties() self.assertIsNotNone(queues) # Action 2: change token value to make request fail fake_credential = self.generate_fake_token() - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=fake_credential) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=fake_credential) with self.assertRaises(ClientAuthenticationError): list(service.list_queues()) # Action 3: update token to make it working again - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=token_credential) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=token_credential) queues = list(service.list_queues()) self.assertIsNotNone(queues) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_sas_read(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_sas_read(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -640,12 +640,12 @@ def test_sas_read(self, resource_group, location, storage_account, storage_accou self.assertEqual(u'message1', message.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_sas_add(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_sas_add(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() token = generate_queue_sas( @@ -668,12 +668,12 @@ def test_sas_add(self, resource_group, location, storage_account, storage_accoun self.assertEqual(u'addedmessage', result.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_sas_update(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_sas_update(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -704,12 +704,12 @@ def test_sas_update(self, resource_group, location, storage_account, storage_acc self.assertEqual(u'updatedmessage1', result.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_sas_process(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_sas_process(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -734,8 +734,8 @@ def test_sas_process(self, resource_group, location, storage_account, storage_ac self.assertEqual(u'message1', message.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_sas_signed_identifier(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_sas_signed_identifier(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only # Arrange @@ -746,7 +746,7 @@ def test_sas_signed_identifier(self, resource_group, location, storage_account, identifiers = {'testid': access_policy} - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() resp = queue_client.set_queue_access_policy(identifiers) @@ -775,10 +775,10 @@ def test_sas_signed_identifier(self, resource_group, location, storage_account, self.assertNotEqual('', message.id) self.assertEqual(u'message1', message.content) - @GlobalStorageAccountPreparer() - def test_get_queue_acl(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_get_queue_acl(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() @@ -789,10 +789,10 @@ def test_get_queue_acl(self, resource_group, location, storage_account, storage_ self.assertIsNotNone(acl) self.assertEqual(len(acl), 0) - @GlobalStorageAccountPreparer() - def test_get_queue_acl_iter(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_get_queue_acl_iter(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() @@ -805,10 +805,10 @@ def test_get_queue_acl_iter(self, resource_group, location, storage_account, sto self.assertIsNotNone(acl) self.assertEqual(len(acl), 0) - @GlobalStorageAccountPreparer() - def test_get_queue_acl_with_non_existing_queue(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_get_queue_acl_with_non_existing_queue(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) # Act @@ -817,10 +817,10 @@ def test_get_queue_acl_with_non_existing_queue(self, resource_group, location, s # Assert - @GlobalStorageAccountPreparer() - def test_set_queue_acl(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_queue_acl(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() @@ -832,10 +832,10 @@ def test_set_queue_acl(self, resource_group, location, storage_account, storage_ acl = queue_client.get_queue_access_policy() self.assertIsNotNone(acl) - @GlobalStorageAccountPreparer() - def test_set_queue_acl_with_empty_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_queue_acl_with_empty_signed_identifiers(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() @@ -847,10 +847,10 @@ def test_set_queue_acl_with_empty_signed_identifiers(self, resource_group, locat self.assertIsNotNone(acl) self.assertEqual(len(acl), 0) - @GlobalStorageAccountPreparer() - def test_set_queue_acl_with_empty_signed_identifier(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_queue_acl_with_empty_signed_identifier(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() @@ -866,10 +866,10 @@ def test_set_queue_acl_with_empty_signed_identifier(self, resource_group, locati self.assertIsNone(acl['empty'].expiry) self.assertIsNone(acl['empty'].start) - @GlobalStorageAccountPreparer() - def test_set_queue_acl_with_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_queue_acl_with_signed_identifiers(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() @@ -888,10 +888,10 @@ def test_set_queue_acl_with_signed_identifiers(self, resource_group, location, s self.assertEqual(len(acl), 1) self.assertTrue('testid' in acl) - @GlobalStorageAccountPreparer() - def test_set_queue_acl_too_many_ids(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_queue_acl_too_many_ids(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() @@ -904,10 +904,10 @@ def test_set_queue_acl_too_many_ids(self, resource_group, location, storage_acco with self.assertRaises(ValueError): queue_client.set_queue_access_policy(identifiers) - @GlobalStorageAccountPreparer() - def test_set_queue_acl_with_non_existing_queue(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_queue_acl_with_non_existing_queue(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) # Act @@ -916,10 +916,10 @@ def test_set_queue_acl_with_non_existing_queue(self, resource_group, location, s # Assert - @GlobalStorageAccountPreparer() - def test_unicode_create_queue_unicode_name(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_unicode_create_queue_unicode_name(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_name = u'啊齄丂狛狜' with self.assertRaises(HttpResponseError): @@ -929,11 +929,11 @@ def test_unicode_create_queue_unicode_name(self, resource_group, location, stora # Asserts - @GlobalStorageAccountPreparer() - def test_unicode_get_messages_unicode_data(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_unicode_get_messages_unicode_data(self, storage_account_name, storage_account_key): # Action pytest.skip("Uncomment after msrest fix") - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1㚈') @@ -949,11 +949,11 @@ def test_unicode_get_messages_unicode_data(self, resource_group, location, stora self.assertIsInstance(message.expires_on, datetime) self.assertIsInstance(message.next_visible_on, datetime) - @GlobalStorageAccountPreparer() - def test_unicode_update_message_unicode_data(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_unicode_update_message_unicode_data(self, storage_account_name, storage_account_key): # Action pytest.skip("Uncomment after msrest fix") - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue_client = self._get_queue_reference(qsc) queue_client.create_queue() queue_client.send_message(u'message1') @@ -975,12 +975,12 @@ def test_unicode_update_message_unicode_data(self, resource_group, location, sto self.assertIsInstance(message.next_visible_on, datetime) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_transport_closed_only_once(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_transport_closed_only_once(self, storage_account_name, storage_account_key): transport = RequestsTransport() prefix = TEST_QUEUE_PREFIX queue_name = self.get_resource_name(prefix) - with QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key, transport=transport) as qsc: + with QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key, transport=transport) as qsc: qsc.get_service_properties() assert transport.session is not None with qsc.get_queue_client(queue_name) as qc: diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_api_version.py b/sdk/storage/azure-storage-queue/tests/test_queue_api_version.py index 55fc24674b21..91189ef7a018 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_api_version.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_api_version.py @@ -3,18 +3,15 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -import unittest + import pytest -import platform -from datetime import datetime, timedelta -from azure.core.exceptions import AzureError, ResourceExistsError from azure.storage.queue import ( QueueServiceClient, QueueClient ) from azure.storage.queue._serialize import _SUPPORTED_API_VERSIONS -from _shared.testcase import GlobalStorageAccountPreparer, StorageTestCase +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_api_version_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_api_version_async.py index b397846355e7..1ba22b78f014 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_api_version_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_api_version_async.py @@ -14,8 +14,7 @@ QueueClient ) from azure.storage.queue._serialize import _SUPPORTED_API_VERSIONS -from _shared.testcase import GlobalStorageAccountPreparer -from _shared.asynctestcase import AsyncStorageTestCase +from devtools_testutils.storage.aio import AsyncStorageTestCase # ------------------------------------------------------------------------------ diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_async.py index 49054ec94a70..cffd73b91c23 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_async.py @@ -16,9 +16,8 @@ timedelta, date, ) -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from multidict import CIMultiDict, CIMultiDictProxy -from azure.core.pipeline.transport import AsyncioRequestsTransport +from devtools_testutils.storage.aio import AsyncStorageTestCase from azure.core.exceptions import ( HttpResponseError, ResourceNotFoundError, @@ -36,9 +35,7 @@ ) from azure.storage.queue.aio import QueueServiceClient, QueueClient - -from _shared.asynctestcase import AsyncStorageTestCase -from _shared.testcase import GlobalStorageAccountPreparer +from settings.testcase import QueuePreparer # ------------------------------------------------------------------------------ TEST_QUEUE_PREFIX = 'pyqueueasync' @@ -72,22 +69,22 @@ async def _create_queue(self, qsc, prefix=TEST_QUEUE_PREFIX, queue_list=None): return queue # --Test cases for queues ---------------------------------------------- - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_queue(self, resource_group, location, storage_account, storage_account_key): + async def test_create_queue(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = self._get_queue_reference(qsc) created = await queue_client.create_queue() # Asserts self.assertTrue(created) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_queue_fail_on_exist(self, resource_group, location, storage_account, storage_account_key): + async def test_create_queue_fail_on_exist(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = self._get_queue_reference(qsc) created = await queue_client.create_queue() with self.assertRaises(ResourceExistsError): @@ -96,11 +93,11 @@ async def test_create_queue_fail_on_exist(self, resource_group, location, storag # Asserts self.assertTrue(created) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_queue_fail_on_exist_different_metadata(self, resource_group, location, storage_account, storage_account_key): + async def test_create_queue_fail_on_exist_different_metadata(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = self._get_queue_reference(qsc) created = await queue_client.create_queue() with self.assertRaises(ResourceExistsError): @@ -109,11 +106,11 @@ async def test_create_queue_fail_on_exist_different_metadata(self, resource_grou # Asserts self.assertTrue(created) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_create_queue_with_options(self, resource_group, location, storage_account, storage_account_key): + async def test_create_queue_with_options(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = self._get_queue_reference(qsc) await queue_client.create_queue( metadata={'val1': 'test', 'val2': 'blah'}) @@ -125,22 +122,22 @@ async def test_create_queue_with_options(self, resource_group, location, storage self.assertEqual('test', props.metadata['val1']) self.assertEqual('blah', props.metadata['val2']) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_non_existing_queue(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_non_existing_queue(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = self._get_queue_reference(qsc) # Asserts with self.assertRaises(ResourceNotFoundError): await queue_client.delete_queue() - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_existing_queue_fail_not_exist(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_existing_queue_fail_not_exist(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = self._get_queue_reference(qsc) created = await queue_client.create_queue() @@ -149,11 +146,11 @@ async def test_delete_existing_queue_fail_not_exist(self, resource_group, locati # Asserts self.assertIsNone(deleted) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_queues(self, resource_group, location, storage_account, storage_account_key): + async def test_list_queues(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = self._get_queue_reference(qsc) await queue_client.create_queue() queues = [] @@ -164,11 +161,11 @@ async def test_list_queues(self, resource_group, location, storage_account, stor self.assertIsNotNone(queues) assert len(queues) >= 1 - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_queues_with_options(self, resource_group, location, storage_account, storage_account_key): + async def test_list_queues_with_options(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_list = [] prefix = 'listqueue' for i in range(0, 4): @@ -201,11 +198,11 @@ async def test_list_queues_with_options(self, resource_group, location, storage_ self.assertIsNotNone(queues2[0]) self.assertNotEqual('', queues2[0].name) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_list_queues_with_metadata(self, resource_group, location, storage_account, storage_account_key): + async def test_list_queues_with_metadata(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue = await self._create_queue(qsc) await queue.set_queue_metadata(metadata={'val1': 'test', 'val2': 'blah'}) @@ -224,11 +221,11 @@ async def test_list_queues_with_metadata(self, resource_group, location, storage self.assertEqual(len(listed_queue.metadata), 2) self.assertEqual(listed_queue.metadata['val1'], 'test') - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_queue_metadata(self, resource_group, location, storage_account, storage_account_key): + async def test_set_queue_metadata(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) metadata = {'hello': 'world', 'number': '43'} queue = await self._create_queue(qsc) @@ -239,11 +236,11 @@ async def test_set_queue_metadata(self, resource_group, location, storage_accoun # Assert self.assertDictEqual(md, metadata) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_queue_metadata_message_count(self, resource_group, location, storage_account, storage_account_key): + async def test_get_queue_metadata_message_count(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') props = await queue_client.get_queue_properties() @@ -252,11 +249,11 @@ async def test_get_queue_metadata_message_count(self, resource_group, location, self.assertTrue(props.approximate_message_count >= 1) self.assertEqual(0, len(props.metadata)) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_queue_exists(self, resource_group, location, storage_account, storage_account_key): + async def test_queue_exists(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue = await self._create_queue(qsc) # Act @@ -265,11 +262,11 @@ async def test_queue_exists(self, resource_group, location, storage_account, sto # Assert self.assertTrue(exists) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_queue_not_exists(self, resource_group, location, storage_account, storage_account_key): + async def test_queue_not_exists(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue = qsc.get_queue_client(self.get_resource_name('missing')) # Act with self.assertRaises(ResourceNotFoundError): @@ -277,11 +274,11 @@ async def test_queue_not_exists(self, resource_group, location, storage_account, # Assert - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_message(self, resource_group, location, storage_account, storage_account_key): + async def test_put_message(self, storage_account_name, storage_account_key): # Action. No exception means pass. No asserts needed. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') await queue_client.send_message(u'message2') @@ -296,11 +293,11 @@ async def test_put_message(self, resource_group, location, storage_account, stor self.assertNotEqual('', message.pop_receipt) self.assertEqual(u'message4', message.content) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_message_large_time_to_live(self, resource_group, location, storage_account, storage_account_key): + async def test_put_message_large_time_to_live(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) # There should be no upper bound on a queue message's time to live await queue_client.send_message(u'message1', time_to_live=1024*1024*1024) @@ -313,11 +310,11 @@ async def test_put_message_large_time_to_live(self, resource_group, location, st messages[0].expires_on, messages[0].inserted_on + timedelta(seconds=1024 * 1024 * 1024 - 3600)) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_message_infinite_time_to_live(self, resource_group, location, storage_account, storage_account_key): + async def test_put_message_infinite_time_to_live(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1', time_to_live=-1) @@ -327,11 +324,11 @@ async def test_put_message_infinite_time_to_live(self, resource_group, location, # Assert self.assertEqual(messages[0].expires_on.year, date.max.year) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_messages(self, resource_group, location, storage_account, storage_account_key): + async def test_get_messages(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') await queue_client.send_message(u'message2') @@ -355,11 +352,11 @@ async def test_get_messages(self, resource_group, location, storage_account, sto self.assertIsInstance(message.expires_on, datetime) self.assertIsInstance(message.next_visible_on, datetime) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_receive_one_message(self, resource_group, location, storage_account, storage_account_key): + async def test_receive_one_message(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) self.assertIsNone(await queue_client.receive_message()) @@ -387,11 +384,11 @@ async def test_receive_one_message(self, resource_group, location, storage_accou self.assertEqual(u'message3', peeked_message3[0].content) self.assertEqual(0, peeked_message3[0].dequeue_count) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_messages_with_options(self, resource_group, location, storage_account, storage_account_key): + async def test_get_messages_with_options(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') await queue_client.send_message(u'message2') @@ -416,11 +413,11 @@ async def test_get_messages_with_options(self, resource_group, location, storage self.assertNotEqual('', message.expires_on) self.assertNotEqual('', message.next_visible_on) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_peek_messages(self, resource_group, location, storage_account, storage_account_key): + async def test_peek_messages(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') await queue_client.send_message(u'message2') @@ -441,11 +438,11 @@ async def test_peek_messages(self, resource_group, location, storage_account, st self.assertNotEqual('', message.expires_on) self.assertIsNone(message.next_visible_on) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_peek_messages_with_options(self, resource_group, location, storage_account, storage_account_key): + async def test_peek_messages_with_options(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') await queue_client.send_message(u'message2') @@ -466,11 +463,11 @@ async def test_peek_messages_with_options(self, resource_group, location, storag self.assertNotEqual('', message.expires_on) self.assertIsNone(message.next_visible_on) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_clear_messages(self, resource_group, location, storage_account, storage_account_key): + async def test_clear_messages(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') await queue_client.send_message(u'message2') @@ -483,11 +480,11 @@ async def test_clear_messages(self, resource_group, location, storage_account, s self.assertIsNotNone(result) self.assertEqual(0, len(result)) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_delete_message(self, resource_group, location, storage_account, storage_account_key): + async def test_delete_message(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') await queue_client.send_message(u'message2') @@ -503,11 +500,11 @@ async def test_delete_message(self, resource_group, location, storage_account, s self.assertIsNotNone(messages) self.assertEqual(3, len(messages)-1) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_message(self, resource_group, location, storage_account, storage_account_key): + async def test_update_message(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') messages = [] @@ -542,11 +539,11 @@ async def test_update_message(self, resource_group, location, storage_account, s self.assertIsNotNone(message.expires_on) self.assertIsNotNone(message.next_visible_on) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_message_content(self, resource_group, location, storage_account, storage_account_key): + async def test_update_message_content(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') @@ -586,11 +583,11 @@ async def test_update_message_content(self, resource_group, location, storage_ac self.assertIsNotNone(message.next_visible_on) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_account_sas(self, resource_group, location, storage_account, storage_account_key): + async def test_account_sas(self, storage_account_name, storage_account_key): # SAS URL is calculated from storage key, so this test runs live only - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue_client = await self._create_queue(qsc) @@ -621,41 +618,41 @@ async def test_account_sas(self, resource_group, location, storage_account, stor self.assertNotEqual('', message.id) self.assertEqual(u'message1', message.content) - @GlobalStorageAccountPreparer() - def test_account_sas_raises_if_sas_already_in_uri(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_account_sas_raises_if_sas_already_in_uri(self, storage_account_name, storage_account_key): with self.assertRaises(ValueError): QueueServiceClient( - self.account_url(storage_account, "queue") + "?sig=foo", + self.account_url(storage_account_name, "queue") + "?sig=foo", credential=AzureSasCredential("?foo=bar")) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_token_credential(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_token_credential(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) token_credential = self.generate_oauth_token() # Action 1: make sure token works - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=token_credential) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=token_credential) queues = await service.get_service_properties() self.assertIsNotNone(queues) # Action 2: change token value to make request fail fake_credential = self.generate_fake_token() - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=fake_credential) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=fake_credential) with self.assertRaises(ClientAuthenticationError): await service.get_service_properties() # Action 3: update token to make it working again - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=token_credential) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=token_credential) queues = await service.get_service_properties() # Not raise means success self.assertIsNotNone(queues) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_read(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_sas_read(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # SAS URL is calculated from storage key, so this test runs live only # Arrange @@ -686,10 +683,10 @@ async def test_sas_read(self, resource_group, location, storage_account, storage self.assertEqual(u'message1', message.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_add(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_sas_add(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # SAS URL is calculated from storage key, so this test runs live only # Arrange @@ -718,10 +715,10 @@ async def test_sas_add(self, resource_group, location, storage_account, storage_ self.assertEqual(u'addedmessage', result.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_update(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_sas_update(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # SAS URL is calculated from storage key, so this test runs live only # Arrange @@ -759,10 +756,10 @@ async def test_sas_update(self, resource_group, location, storage_account, stora self.assertEqual(u'updatedmessage1', result.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_process(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_sas_process(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # SAS URL is calculated from storage key, so this test runs live only # Arrange @@ -792,10 +789,10 @@ async def test_sas_process(self, resource_group, location, storage_account, stor self.assertEqual(u'message1', message.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_sas_signed_identifier(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_sas_signed_identifier(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # SAS URL is calculated from storage key, so this test runs live only # Arrange @@ -833,10 +830,10 @@ async def test_sas_signed_identifier(self, resource_group, location, storage_acc self.assertNotEqual('', message.id) self.assertEqual(u'message1', message.content) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_queue_acl(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_get_queue_acl(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue_client = await self._create_queue(qsc) @@ -847,10 +844,10 @@ async def test_get_queue_acl(self, resource_group, location, storage_account, st self.assertIsNotNone(acl) self.assertEqual(len(acl), 0) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_queue_acl_iter(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_get_queue_acl_iter(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue_client = await self._create_queue(qsc) @@ -863,10 +860,10 @@ async def test_get_queue_acl_iter(self, resource_group, location, storage_accoun self.assertIsNotNone(acl) self.assertEqual(len(acl), 0) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_queue_acl_with_non_existing_queue(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_get_queue_acl_with_non_existing_queue(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue_client = self._get_queue_reference(qsc) @@ -876,10 +873,10 @@ async def test_get_queue_acl_with_non_existing_queue(self, resource_group, locat # Assert - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_queue_acl(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_queue_acl(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue_client = await self._create_queue(qsc) @@ -891,10 +888,10 @@ async def test_set_queue_acl(self, resource_group, location, storage_account, st acl = await queue_client.get_queue_access_policy() self.assertIsNotNone(acl) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_queue_acl_with_empty_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_queue_acl_with_empty_signed_identifiers(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue_client = await self._create_queue(qsc) @@ -906,10 +903,10 @@ async def test_set_queue_acl_with_empty_signed_identifiers(self, resource_group, self.assertIsNotNone(acl) self.assertEqual(len(acl), 0) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_queue_acl_with_empty_signed_identifier(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_set_queue_acl_with_empty_signed_identifier(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue_client = await self._create_queue(qsc) @@ -925,11 +922,11 @@ async def test_set_queue_acl_with_empty_signed_identifier(self, resource_group, self.assertIsNone(acl['empty'].expiry) self.assertIsNone(acl['empty'].start) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_queue_acl_with_signed_identifiers(self, resource_group, location, storage_account, storage_account_key): + async def test_set_queue_acl_with_signed_identifiers(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) # Act @@ -947,11 +944,11 @@ async def test_set_queue_acl_with_signed_identifiers(self, resource_group, locat self.assertEqual(len(acl), 1) self.assertTrue('testid' in acl) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_queue_acl_too_many_ids(self, resource_group, location, storage_account, storage_account_key): + async def test_set_queue_acl_too_many_ids(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) # Act @@ -963,22 +960,22 @@ async def test_set_queue_acl_too_many_ids(self, resource_group, location, storag with self.assertRaises(ValueError): await queue_client.set_queue_access_policy(identifiers) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_queue_acl_with_non_existing_queue(self, resource_group, location, storage_account, storage_account_key): + async def test_set_queue_acl_with_non_existing_queue(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = self._get_queue_reference(qsc) # Act with self.assertRaises(ResourceNotFoundError): await queue_client.set_queue_access_policy(signed_identifiers=dict()) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_create_queue_unicode_name(self, resource_group, location, storage_account, storage_account_key): + async def test_unicode_create_queue_unicode_name(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_name = u'啊齄丂狛狜' with self.assertRaises(HttpResponseError): @@ -988,11 +985,11 @@ async def test_unicode_create_queue_unicode_name(self, resource_group, location, # Asserts - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_get_messages_unicode_data(self, resource_group, location, storage_account, storage_account_key): + async def test_unicode_get_messages_unicode_data(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1㚈') message = None @@ -1008,11 +1005,11 @@ async def test_unicode_get_messages_unicode_data(self, resource_group, location, self.assertIsInstance(message.expires_on, datetime) self.assertIsInstance(message.next_visible_on, datetime) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_unicode_update_message_unicode_data(self, resource_group, location, storage_account, storage_account_key): + async def test_unicode_update_message_unicode_data(self, storage_account_name, storage_account_key): # Action - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue_client = await self._create_queue(qsc) await queue_client.send_message(u'message1') messages = [] @@ -1037,13 +1034,13 @@ async def test_unicode_update_message_unicode_data(self, resource_group, locatio self.assertIsInstance(message.next_visible_on, datetime) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_transport_closed_only_once_async(self, resource_group, location, storage_account, storage_account_key): + async def test_transport_closed_only_once_async(self, storage_account_name, storage_account_key): transport = AioHttpTransport() prefix = TEST_QUEUE_PREFIX queue_name = self.get_resource_name(prefix) - async with QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key, transport=transport) as qsc: + async with QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key, transport=transport) as qsc: await qsc.get_service_properties() assert transport.session is not None async with qsc.get_queue_client(queue_name) as qc: diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_client.py b/sdk/storage/azure-storage-queue/tests/test_queue_client.py index 5bea41109afe..af97c8888f16 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_client.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_client.py @@ -6,14 +6,13 @@ import unittest import pytest import platform -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.storage.queue import ( VERSION, QueueServiceClient, QueueClient, ) -from azure.storage.queue._serialize import _SUPPORTED_API_VERSIONS -from _shared.testcase import GlobalStorageAccountPreparer, StorageTestCase +from settings.testcase import QueuePreparer +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ SERVICES = { @@ -41,106 +40,106 @@ def validate_standard_account_endpoints(self, service, url_type, account_name, a self.assertTrue('{}-secondary.{}.core.windows.net'.format(account_name, url_type) in service.secondary_endpoint) # --Direct Parameters Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_key(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_key(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "queue"), credential=storage_account_key, queue_name='foo') + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='foo') # Assert - self.validate_standard_account_endpoints(service, url, storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, url, storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Act service = service_type[0].from_connection_string( - self.connection_string(storage_account, storage_account_key), queue_name="test") + self.connection_string(storage_account_name, storage_account_key), queue_name="test") # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_sas(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_sas(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "queue"), credential=self.sas_token, queue_name='foo') + self.account_url(storage_account_name, "queue"), credential=self.sas_token, queue_name='foo') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.queue.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.queue.core.windows.net')) self.assertTrue(service.url.endswith(self.sas_token)) self.assertIsNone(service.credential) - @GlobalStorageAccountPreparer() - def test_create_service_with_token(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_token(self, storage_account_name, storage_account_key): for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "queue"), credential=self.token_credential, queue_name='foo') + self.account_url(storage_account_name, "queue"), credential=self.token_credential, queue_name='foo') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.queue.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.queue.core.windows.net')) self.assertEqual(service.credential, self.token_credential) self.assertFalse(hasattr(service.credential, 'account_key')) self.assertTrue(hasattr(service.credential, 'get_token')) - @GlobalStorageAccountPreparer() - def test_create_service_with_token_and_http(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_token_and_http(self, storage_account_name, storage_account_key): for service_type in SERVICES: # Act with self.assertRaises(ValueError): - url = self.account_url(storage_account, "queue").replace('https', 'http') + url = self.account_url(storage_account_name, "queue").replace('https', 'http') service_type(url, credential=self.token_credential, queue_name='foo') - @GlobalStorageAccountPreparer() - def test_create_service_china(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_china(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act - url = self.account_url(storage_account, "queue").replace('core.windows.net', 'core.chinacloudapi.cn') + url = self.account_url(storage_account_name, "queue").replace('core.windows.net', 'core.chinacloudapi.cn') service = service_type[0]( url, credential=storage_account_key, queue_name='foo') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith( - 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) self.assertTrue(service.secondary_endpoint.startswith( - 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) - @GlobalStorageAccountPreparer() - def test_create_service_protocol(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_protocol(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act - url = self.account_url(storage_account, "queue").replace('https', 'http') + url = self.account_url(storage_account_name, "queue").replace('https', 'http') service = service_type[0]( url, credential=storage_account_key, queue_name='foo') # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_empty_key(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_empty_key(self, storage_account_name, storage_account_key): # Arrange QUEUE_SERVICES = [QueueServiceClient, QueueClient] @@ -152,41 +151,41 @@ def test_create_service_empty_key(self, resource_group, location, storage_accoun self.assertEqual( str(e.exception), "You need to provide either a SAS token or an account shared key to authenticate.") - @GlobalStorageAccountPreparer() - def test_create_service_with_socket_timeout(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_socket_timeout(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act default_service = service_type[0]( - self.account_url(storage_account, "queue"), credential=storage_account_key, queue_name='foo') + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='foo') service = service_type[0]( - self.account_url(storage_account, "queue"), credential=storage_account_key, + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='foo', connection_timeout=22) # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) assert service._client._client._pipeline._transport.connection_config.timeout == 22 assert default_service._client._client._pipeline._transport.connection_config.timeout in [20, (20, 2000)] # --Connection String Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_key(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string_key(self, storage_account_name, storage_account_key): # Arrange - conn_string = 'AccountName={};AccountKey={};'.format(storage_account.name, storage_account_key) + conn_string = 'AccountName={};AccountKey={};'.format(storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act service = service_type[0].from_connection_string(conn_string, queue_name='foo') # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account.name, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_sas(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string_sas(self, storage_account_name, storage_account_key): # Arrange - conn_string = 'AccountName={};SharedAccessSignature={};'.format(storage_account.name, self.sas_token) + conn_string = 'AccountName={};SharedAccessSignature={};'.format(storage_account_name, self.sas_token) for service_type in SERVICES: # Act @@ -194,16 +193,16 @@ def test_create_service_with_connection_string_sas(self, resource_group, locatio # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.queue.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.queue.core.windows.net')) self.assertTrue(service.url.endswith(self.sas_token)) self.assertIsNone(service.credential) - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_endpoint_protocol(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string_endpoint_protocol(self, storage_account_name, storage_account_key): # Arrange conn_string = 'AccountName={};AccountKey={};DefaultEndpointsProtocol=http;EndpointSuffix=core.chinacloudapi.cn;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act @@ -211,69 +210,69 @@ def test_create_service_with_connection_string_endpoint_protocol(self, resource_ # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue( service.primary_endpoint.startswith( - 'http://{}.{}.core.chinacloudapi.cn/'.format(storage_account.name, service_type[1]))) + 'http://{}.{}.core.chinacloudapi.cn/'.format(storage_account_name, service_type[1]))) self.assertTrue( service.secondary_endpoint.startswith( - 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_emulated(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string_emulated(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): - conn_string = 'UseDevelopmentStorage=true;'.format(storage_account.name, storage_account_key) + conn_string = 'UseDevelopmentStorage=true;'.format(storage_account_name, storage_account_key) # Act with self.assertRaises(ValueError): service = service_type[0].from_connection_string(conn_string, queue_name="foo") - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_custom_domain(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string_custom_domain(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};QueueEndpoint=www.mydomain.com;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string(conn_string, queue_name="foo") # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.queue.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.queue.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_create_service_with_conn_str_custom_domain_trailing_slash(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_conn_str_custom_domain_trailing_slash(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};QueueEndpoint=www.mydomain.com/;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string(conn_string, queue_name="foo") # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.queue.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.queue.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_create_service_with_conn_str_custom_domain_sec_override(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_conn_str_custom_domain_sec_override(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};QueueEndpoint=www.mydomain.com/;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string( @@ -281,18 +280,18 @@ def test_create_service_with_conn_str_custom_domain_sec_override(self, resource_ # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com/')) - @GlobalStorageAccountPreparer() - def test_create_service_with_conn_str_fails_if_sec_without_primary(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_conn_str_fails_if_sec_without_primary(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Arrange conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;'.format( - storage_account.name, storage_account_key, + storage_account_name, storage_account_key, _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) # Act @@ -301,12 +300,12 @@ def test_create_service_with_conn_str_fails_if_sec_without_primary(self, resourc with self.assertRaises(ValueError): service = service_type[0].from_connection_string(conn_string, queue_name="foo") - @GlobalStorageAccountPreparer() - def test_create_service_with_conn_str_succeeds_if_sec_with_primary(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_conn_str_succeeds_if_sec_with_primary(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Arrange conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;{}=www-sec.mydomain.com;'.format( - storage_account.name, + storage_account_name, storage_account_key, _CONNECTION_ENDPOINTS.get(service_type[1]), _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) @@ -316,25 +315,25 @@ def test_create_service_with_conn_str_succeeds_if_sec_with_primary(self, resourc # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com/')) - @GlobalStorageAccountPreparer() - def test_create_service_with_custom_account_endpoint_path(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_custom_account_endpoint_path(self, storage_account_name, storage_account_key): custom_account_url = "http://local-machine:11002/custom/account/path/" + self.sas_token for service_type in SERVICES.items(): conn_string = 'DefaultEndpointsProtocol=http;AccountName={};AccountKey={};QueueEndpoint={};'.format( - storage_account.name, storage_account_key, custom_account_url) + storage_account_name, storage_account_key, custom_account_url) # Act service = service_type[0].from_connection_string(conn_string, queue_name="foo") # Assert - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') @@ -358,10 +357,10 @@ def test_create_service_with_custom_account_endpoint_path(self, resource_group, self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo?')) - @GlobalStorageAccountPreparer() - def test_request_callback_signed_header(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_request_callback_signed_header(self, storage_account_name, storage_account_key): # Arrange - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key) name = self.get_resource_name('cont') # Act @@ -375,10 +374,10 @@ def test_request_callback_signed_header(self, resource_group, location, storage_ finally: service.delete_queue(name) - @GlobalStorageAccountPreparer() - def test_response_callback(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_response_callback(self, storage_account_name, storage_account_key): # Arrange - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key) name = self.get_resource_name('cont') queue = service.get_queue_client(name) @@ -391,9 +390,9 @@ def callback(response): exists = queue.get_queue_properties(raw_response_hook=callback) self.assertTrue(exists) - @GlobalStorageAccountPreparer() - def test_user_agent_default(self, resource_group, location, storage_account, storage_account_key): - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key) + @QueuePreparer() + def test_user_agent_default(self, storage_account_name, storage_account_key): + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -401,11 +400,11 @@ def callback(response): service.get_service_properties(raw_response_hook=callback) - @GlobalStorageAccountPreparer() - def test_user_agent_custom(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_user_agent_custom(self, storage_account_name, storage_account_key): custom_app = "TestApp/v1.0" service = QueueServiceClient( - self.account_url(storage_account, "queue"), credential=storage_account_key, user_agent=custom_app) + self.account_url(storage_account_name, "queue"), credential=storage_account_key, user_agent=custom_app) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -425,9 +424,9 @@ def callback(response): service.get_service_properties(raw_response_hook=callback, user_agent="TestApp/v2.0") - @GlobalStorageAccountPreparer() - def test_user_agent_append(self, resource_group, location, storage_account, storage_account_key): - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key) + @QueuePreparer() + def test_user_agent_append(self, storage_account_name, storage_account_key): + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -438,10 +437,10 @@ def callback(response): service.get_service_properties(raw_response_hook=callback, user_agent='customer_user_agent') - @GlobalStorageAccountPreparer() - def test_create_queue_client_with_complete_queue_url(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_queue_client_with_complete_queue_url(self, storage_account_name, storage_account_key): # Arrange - queue_url = self.account_url(storage_account, "queue") + "/foo" + queue_url = self.account_url(storage_account_name, "queue") + "/foo" service = QueueClient(queue_url, queue_name='bar', credential=storage_account_key) # Assert @@ -464,26 +463,26 @@ def test_error_with_malformed_conn_str(self): self.assertEqual( str(e.exception), "Connection string missing required connection details.") - @GlobalStorageAccountPreparer() - def test_closing_pipeline_client(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_closing_pipeline_client(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "queue"), credential=storage_account_key, queue_name='queue') + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='queue') # Assert with service: assert hasattr(service, 'close') service.close() - @GlobalStorageAccountPreparer() - def test_closing_pipeline_client_simple(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_closing_pipeline_client_simple(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "queue"), credential=storage_account_key, queue_name='queue') + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='queue') service.close() diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_client_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_client_async.py index d2c91d8c29b8..a56e65b2bd78 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_client_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_client_async.py @@ -7,17 +7,17 @@ import pytest import platform import asyncio + from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.storage.queue import VERSION from azure.storage.queue.aio import ( QueueServiceClient, QueueClient ) -from azure.storage.queue._serialize import _SUPPORTED_API_VERSIONS -from _shared.asynctestcase import AsyncStorageTestCase -from _shared.testcase import GlobalStorageAccountPreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase +from settings.testcase import QueuePreparer + # ------------------------------------------------------------------------------ SERVICES = { QueueServiceClient: 'queue', @@ -46,115 +46,115 @@ def setUp(self): self.token_credential = self.generate_oauth_token() # --Helpers----------------------------------------------------------------- - def validate_standard_account_endpoints(self, service, url_type, storage_account, storage_account_key): + def validate_standard_account_endpoints(self, service, url_type, storage_account_name, storage_account_key): self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) - self.assertTrue('{}.{}.core.windows.net'.format(storage_account.name, url_type) in service.url) - self.assertTrue('{}-secondary.{}.core.windows.net'.format(storage_account.name, url_type) in service.secondary_endpoint) + self.assertTrue('{}.{}.core.windows.net'.format(storage_account_name, url_type) in service.url) + self.assertTrue('{}-secondary.{}.core.windows.net'.format(storage_account_name, url_type) in service.secondary_endpoint) # --Direct Parameters Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_key(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_key(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "queue"), credential=storage_account_key, queue_name='foo', transport=AiohttpTestTransport()) + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='foo', transport=AiohttpTestTransport()) # Assert - self.validate_standard_account_endpoints(service, url, storage_account, storage_account_key) + self.validate_standard_account_endpoints(service, url, storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Act service = service_type[0].from_connection_string( - self.connection_string(storage_account, storage_account_key), queue_name="test") + self.connection_string(storage_account_name, storage_account_key), queue_name="test") # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_sas(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_sas(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "queue"), credential=self.sas_token, queue_name='foo') + self.account_url(storage_account_name, "queue"), credential=self.sas_token, queue_name='foo') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.queue.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.queue.core.windows.net')) self.assertTrue(service.url.endswith(self.sas_token)) self.assertIsNone(service.credential) - @GlobalStorageAccountPreparer() - def test_create_service_with_token(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_token(self, storage_account_name, storage_account_key): for service_type in SERVICES: # Act service = service_type( - self.account_url(storage_account, "queue"), credential=self.token_credential, queue_name='foo') + self.account_url(storage_account_name, "queue"), credential=self.token_credential, queue_name='foo') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.queue.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.queue.core.windows.net')) self.assertEqual(service.credential, self.token_credential) self.assertFalse(hasattr(service.credential, 'account_key')) self.assertTrue(hasattr(service.credential, 'get_token')) - @GlobalStorageAccountPreparer() - def test_create_service_with_token_and_http(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_token_and_http(self, storage_account_name, storage_account_key): for service_type in SERVICES: # Act with self.assertRaises(ValueError): - url = self.account_url(storage_account, "queue").replace('https', 'http') + url = self.account_url(storage_account_name, "queue").replace('https', 'http') service_type(url, credential=self.token_credential, queue_name='foo') - @GlobalStorageAccountPreparer() - def test_create_service_china(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_china(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act - url = self.account_url(storage_account, "queue").replace('core.windows.net', 'core.chinacloudapi.cn') + url = self.account_url(storage_account_name, "queue").replace('core.windows.net', 'core.chinacloudapi.cn') service = service_type[0]( url, credential=storage_account_key, queue_name='foo') # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith( - 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'https://{}.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) self.assertTrue(service.secondary_endpoint.startswith( - 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'https://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) - @GlobalStorageAccountPreparer() - def test_create_service_protocol(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_protocol(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act - url = self.account_url(storage_account, "queue").replace('https', 'http') + url = self.account_url(storage_account_name, "queue").replace('https', 'http') service = service_type[0]( url, credential=storage_account_key, queue_name='foo') # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_empty_key(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_empty_key(self, storage_account_name, storage_account_key): # Arrange QUEUE_SERVICES = [QueueServiceClient, QueueClient] @@ -166,41 +166,41 @@ def test_create_service_empty_key(self, resource_group, location, storage_accoun self.assertEqual( str(e.exception), "You need to provide either a SAS token or an account shared key to authenticate.") - @GlobalStorageAccountPreparer() - def test_create_service_with_socket_timeout(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_socket_timeout(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): # Act default_service = service_type[0]( - self.account_url(storage_account, "queue"), credential=storage_account_key, queue_name='foo') + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='foo') service = service_type[0]( - self.account_url(storage_account, "queue"), credential=storage_account_key, + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='foo', connection_timeout=22) # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) assert service._client._client._pipeline._transport.connection_config.timeout == 22 assert default_service._client._client._pipeline._transport.connection_config.timeout in [20, (20, 2000)] # --Connection String Test Cases -------------------------------------------- - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_key(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string_key(self, storage_account_name, storage_account_key): # Arrange - conn_string = 'AccountName={};AccountKey={};'.format(storage_account.name, storage_account_key) + conn_string = 'AccountName={};AccountKey={};'.format(storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act service = service_type[0].from_connection_string(conn_string, queue_name='foo') # Assert - self.validate_standard_account_endpoints(service, service_type[1], storage_account, storage_account_key) + self.validate_standard_account_endpoints(service, service_type[1], storage_account_name, storage_account_key) self.assertEqual(service.scheme, 'https') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_sas(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string_sas(self, storage_account_name, storage_account_key): # Arrange - conn_string = 'AccountName={};SharedAccessSignature={};'.format(storage_account.name, self.sas_token) + conn_string = 'AccountName={};SharedAccessSignature={};'.format(storage_account_name, self.sas_token) for service_type in SERVICES: # Act @@ -208,16 +208,16 @@ def test_create_service_with_connection_string_sas(self, resource_group, locatio # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertTrue(service.url.startswith('https://' + storage_account.name + '.queue.core.windows.net')) + self.assertEqual(service.account_name, storage_account_name) + self.assertTrue(service.url.startswith('https://' + storage_account_name + '.queue.core.windows.net')) self.assertTrue(service.url.endswith(self.sas_token)) self.assertIsNone(service.credential) - @GlobalStorageAccountPreparer() - def test_create_service_with_conn_str_endpoint_protocol(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_conn_str_endpoint_protocol(self, storage_account_name, storage_account_key): # Arrange conn_string = 'AccountName={};AccountKey={};DefaultEndpointsProtocol=http;EndpointSuffix=core.chinacloudapi.cn;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) for service_type in SERVICES.items(): # Act @@ -225,70 +225,70 @@ def test_create_service_with_conn_str_endpoint_protocol(self, resource_group, lo # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue( service.primary_endpoint.startswith( - 'http://{}.{}.core.chinacloudapi.cn/'.format(storage_account.name, service_type[1]))) + 'http://{}.{}.core.chinacloudapi.cn/'.format(storage_account_name, service_type[1]))) self.assertTrue( service.secondary_endpoint.startswith( - 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account.name, service_type[1]))) + 'http://{}-secondary.{}.core.chinacloudapi.cn'.format(storage_account_name, service_type[1]))) self.assertEqual(service.scheme, 'http') - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_emulated(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string_emulated(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): - conn_string = 'UseDevelopmentStorage=true;'.format(storage_account.name, storage_account_key) + conn_string = 'UseDevelopmentStorage=true;'.format(storage_account_name, storage_account_key) # Act with self.assertRaises(ValueError): service = service_type[0].from_connection_string(conn_string, queue_name="foo") - @GlobalStorageAccountPreparer() - def test_create_service_with_connection_string_custom_domain(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_connection_string_custom_domain(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};QueueEndpoint=www.mydomain.com;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string(conn_string, queue_name="foo") # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.queue.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.queue.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_create_serv_with_cs_custom_dmn_trlng_slash(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_serv_with_cs_custom_dmn_trlng_slash(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};QueueEndpoint=www.mydomain.com/;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string(conn_string, queue_name="foo") # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) - self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account.name + '-secondary.queue.core.windows.net')) + self.assertTrue(service.secondary_endpoint.startswith('https://' + storage_account_name + '-secondary.queue.core.windows.net')) - @GlobalStorageAccountPreparer() - def test_create_service_with_cs_custom_dmn_sec_override(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_cs_custom_dmn_sec_override(self, storage_account_name, storage_account_key): # Arrange for service_type in SERVICES.items(): conn_string = 'AccountName={};AccountKey={};QueueEndpoint=www.mydomain.com/;'.format( - storage_account.name, storage_account_key) + storage_account_name, storage_account_key) # Act service = service_type[0].from_connection_string( @@ -296,18 +296,18 @@ def test_create_service_with_cs_custom_dmn_sec_override(self, resource_group, lo # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com/')) - @GlobalStorageAccountPreparer() - def test_create_service_with_cs_fails_if_sec_without_prim(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_cs_fails_if_sec_without_prim(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Arrange conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;'.format( - storage_account.name, storage_account_key, + storage_account_name, storage_account_key, _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) # Act @@ -316,12 +316,12 @@ def test_create_service_with_cs_fails_if_sec_without_prim(self, resource_group, with self.assertRaises(ValueError): service = service_type[0].from_connection_string(conn_string, queue_name="foo") - @GlobalStorageAccountPreparer() - def test_create_service_with_cs_succeeds_if_sec_with_prim(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_cs_succeeds_if_sec_with_prim(self, storage_account_name, storage_account_key): for service_type in SERVICES.items(): # Arrange conn_string = 'AccountName={};AccountKey={};{}=www.mydomain.com;{}=www-sec.mydomain.com;'.format( - storage_account.name, + storage_account_name, storage_account_key, _CONNECTION_ENDPOINTS.get(service_type[1]), _CONNECTION_ENDPOINTS_SECONDARY.get(service_type[1])) @@ -331,25 +331,25 @@ def test_create_service_with_cs_succeeds_if_sec_with_prim(self, resource_group, # Assert self.assertIsNotNone(service) - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertTrue(service.primary_endpoint.startswith('https://www.mydomain.com/')) self.assertTrue(service.secondary_endpoint.startswith('https://www-sec.mydomain.com/')) - @GlobalStorageAccountPreparer() - def test_create_service_with_custom_account_endpoint_path(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_create_service_with_custom_account_endpoint_path(self, storage_account_name, storage_account_key): custom_account_url = "http://local-machine:11002/custom/account/path/" + self.sas_token for service_type in SERVICES.items(): conn_string = 'DefaultEndpointsProtocol=http;AccountName={};AccountKey={};QueueEndpoint={};'.format( - storage_account.name, storage_account_key, custom_account_url) + storage_account_name, storage_account_key, custom_account_url) # Act service = service_type[0].from_connection_string(conn_string, queue_name="foo") # Assert - self.assertEqual(service.account_name, storage_account.name) - self.assertEqual(service.credential.account_name, storage_account.name) + self.assertEqual(service.account_name, storage_account_name) + self.assertEqual(service.credential.account_name, storage_account_name) self.assertEqual(service.credential.account_key, storage_account_key) self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') @@ -373,11 +373,11 @@ def test_create_service_with_custom_account_endpoint_path(self, resource_group, self.assertEqual(service.primary_hostname, 'local-machine:11002/custom/account/path') self.assertTrue(service.url.startswith('http://local-machine:11002/custom/account/path/foo?')) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_request_callback_signed_header(self, resource_group, location, storage_account, storage_account_key): + async def test_request_callback_signed_header(self, storage_account_name, storage_account_key): # Arrange - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key) name = self.get_resource_name('cont') # Act @@ -392,11 +392,11 @@ async def test_request_callback_signed_header(self, resource_group, location, st finally: await service.delete_queue(name) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_response_callback(self, resource_group, location, storage_account, storage_account_key): + async def test_response_callback(self, storage_account_name, storage_account_key): # Arrange - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key, transport=AiohttpTestTransport()) + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key, transport=AiohttpTestTransport()) name = self.get_resource_name('cont') queue = service.get_queue_client(name) @@ -409,10 +409,10 @@ def callback(response): exists = await queue.get_queue_properties(raw_response_hook=callback) self.assertTrue(exists) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_user_agent_default(self, resource_group, location, storage_account, storage_account_key): - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_user_agent_default(self, storage_account_name, storage_account_key): + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key, transport=AiohttpTestTransport()) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -420,12 +420,12 @@ def callback(response): await service.get_service_properties(raw_response_hook=callback) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_user_agent_custom(self, resource_group, location, storage_account, storage_account_key): + async def test_user_agent_custom(self, storage_account_name, storage_account_key): custom_app = "TestApp/v1.0" service = QueueServiceClient( - self.account_url(storage_account, "queue"), credential=storage_account_key, user_agent=custom_app, transport=AiohttpTestTransport()) + self.account_url(storage_account_name, "queue"), credential=storage_account_key, user_agent=custom_app, transport=AiohttpTestTransport()) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -445,10 +445,10 @@ def callback(response): await service.get_service_properties(raw_response_hook=callback, user_agent="TestApp/v2.0") - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_user_agent_append(self, resource_group, location, storage_account, storage_account_key): - service = QueueServiceClient(self.account_url(storage_account, "queue"), credential=storage_account_key, transport=AiohttpTestTransport()) + async def test_user_agent_append(self, storage_account_name, storage_account_key): + service = QueueServiceClient(self.account_url(storage_account_name, "queue"), credential=storage_account_key, transport=AiohttpTestTransport()) def callback(response): self.assertTrue('User-Agent' in response.http_request.headers) @@ -459,28 +459,28 @@ def callback(response): await service.get_service_properties(raw_response_hook=callback, user_agent='customer_user_agent') - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_closing_pipeline_client_async(self, resource_group, location, storage_account, storage_account_key): + async def test_closing_pipeline_client_async(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "queue"), credential=storage_account_key, queue_name='queue') + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='queue') # Assert async with service: assert hasattr(service, 'close') await service.close() - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_closing_pipeline_client_simple_async(self, resource_group, location, storage_account, storage_account_key): + async def test_closing_pipeline_client_simple_async(self, storage_account_name, storage_account_key): # Arrange for client, url in SERVICES.items(): # Act service = client( - self.account_url(storage_account, "queue"), credential=storage_account_key, queue_name='queue') + self.account_url(storage_account_name, "queue"), credential=storage_account_key, queue_name='queue') await service.close() diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_encodings.py b/sdk/storage/azure-storage-queue/tests/test_queue_encodings.py index f9314e778c73..fb6e5955141b 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_encodings.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_encodings.py @@ -9,7 +9,6 @@ import pytest import sys from azure.core.exceptions import HttpResponseError, DecodeError, ResourceExistsError -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.storage.queue import ( QueueClient, QueueServiceClient, @@ -19,8 +18,9 @@ BinaryBase64DecodePolicy ) from azure.storage.queue._message_encoding import NoEncodePolicy, NoDecodePolicy +from settings.testcase import QueuePreparer -from _shared.testcase import GlobalStorageAccountPreparer, StorageTestCase +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ TEST_QUEUE_PREFIX = 'mytestqueue' @@ -59,10 +59,10 @@ def _validate_encoding(self, queue, message): # -------------------------------------------------------------------------- - @GlobalStorageAccountPreparer() - def test_message_text_xml(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_message_text_xml(self, storage_account_name, storage_account_key): # Arrange. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) message = u'' queue = qsc.get_queue_client(self.get_resource_name(TEST_QUEUE_PREFIX)) @@ -71,20 +71,20 @@ def test_message_text_xml(self, resource_group, location, storage_account, stora assert isinstance(queue._config.message_decode_policy, NoDecodePolicy) self._validate_encoding(queue, message) - @GlobalStorageAccountPreparer() - def test_message_text_xml_whitespace(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_message_text_xml_whitespace(self, storage_account_name, storage_account_key): # Arrange. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) message = u' mess\t age1\n' queue = qsc.get_queue_client(self.get_resource_name(TEST_QUEUE_PREFIX)) # Asserts self._validate_encoding(queue, message) - @GlobalStorageAccountPreparer() - def test_message_text_xml_invalid_chars(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_message_text_xml_invalid_chars(self, storage_account_name, storage_account_key): # Action. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._get_queue_reference(qsc) message = u'\u0001' @@ -92,12 +92,12 @@ def test_message_text_xml_invalid_chars(self, resource_group, location, storage_ with self.assertRaises(HttpResponseError): queue.send_message(message) - @GlobalStorageAccountPreparer() - def test_message_text_base64(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_message_text_base64(self, storage_account_name, storage_account_key): # Arrange. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = QueueClient( - account_url=self.account_url(storage_account, "queue"), + account_url=self.account_url(storage_account_name, "queue"), queue_name=self.get_resource_name(TEST_QUEUE_PREFIX), credential=storage_account_key, message_encode_policy=TextBase64EncodePolicy(), @@ -108,12 +108,12 @@ def test_message_text_base64(self, resource_group, location, storage_account, st # Asserts self._validate_encoding(queue, message) - @GlobalStorageAccountPreparer() - def test_message_bytes_base64(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_message_bytes_base64(self, storage_account_name, storage_account_key): # Arrange. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = QueueClient( - account_url=self.account_url(storage_account, "queue"), + account_url=self.account_url(storage_account_name, "queue"), queue_name=self.get_resource_name(TEST_QUEUE_PREFIX), credential=storage_account_key, message_encode_policy=BinaryBase64EncodePolicy(), @@ -125,10 +125,10 @@ def test_message_bytes_base64(self, resource_group, location, storage_account, s self._validate_encoding(queue, message) @pytest.mark.skipif(sys.version_info < (3, 0), reason="Not applicable on Python 2.7") - @GlobalStorageAccountPreparer() - def test_message_bytes_fails(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_message_bytes_fails(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = qsc.get_queue_client(self.get_resource_name(TEST_QUEUE_PREFIX)) queue.create_queue() @@ -141,12 +141,12 @@ def test_message_bytes_fails(self, resource_group, location, storage_account, st # Asserts self.assertTrue(str(e.exception).startswith('Message content must not be bytes. Use the BinaryBase64EncodePolicy to send bytes.')) - @GlobalStorageAccountPreparer() - def test_message_text_fails(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_message_text_fails(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = QueueClient( - account_url=self.account_url(storage_account, "queue"), + account_url=self.account_url(storage_account_name, "queue"), queue_name=self.get_resource_name(TEST_QUEUE_PREFIX), credential=storage_account_key, message_encode_policy=BinaryBase64EncodePolicy(), @@ -160,12 +160,12 @@ def test_message_text_fails(self, resource_group, location, storage_account, sto # Asserts self.assertTrue(str(e.exception).startswith('Message content must be bytes')) - @GlobalStorageAccountPreparer() - def test_message_base64_decode_fails(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_message_base64_decode_fails(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = QueueClient( - account_url=self.account_url(storage_account, "queue"), + account_url=self.account_url(storage_account_name, "queue"), queue_name=self.get_resource_name(TEST_QUEUE_PREFIX), credential=storage_account_key, message_encode_policy=None, diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_encodings_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_encodings_async.py index 176c9795e24b..429658e8e55b 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_encodings_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_encodings_async.py @@ -6,10 +6,8 @@ # license information. # -------------------------------------------------------------------------- import unittest -import pytest -import asyncio + from azure.core.exceptions import HttpResponseError, DecodeError, ResourceExistsError -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer, FakeStorageAccount from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy from azure.storage.queue import ( @@ -24,8 +22,8 @@ QueueServiceClient ) -from _shared.asynctestcase import AsyncStorageTestCase -from _shared.testcase import GlobalStorageAccountPreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase +from settings.testcase import QueuePreparer # ------------------------------------------------------------------------------ TEST_QUEUE_PREFIX = 'mytestqueue' @@ -75,33 +73,33 @@ async def _validate_encoding(self, queue, message): self.assertEqual(message, dequeued.content) # -------------------------------------------------------------------------- - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_message_text_xml(self, resource_group, location, storage_account, storage_account_key): + async def test_message_text_xml(self, storage_account_name, storage_account_key): # Arrange. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) message = u'' queue = qsc.get_queue_client(self.get_resource_name(TEST_QUEUE_PREFIX)) # Asserts await self._validate_encoding(queue, message) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_message_text_xml_whitespace(self, resource_group, location, storage_account, storage_account_key): + async def test_message_text_xml_whitespace(self, storage_account_name, storage_account_key): # Arrange. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) message = u' mess\t age1\n' queue = qsc.get_queue_client(self.get_resource_name(TEST_QUEUE_PREFIX)) # Asserts await self._validate_encoding(queue, message) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_message_text_xml_invalid_chars(self, resource_group, location, storage_account, storage_account_key): + async def test_message_text_xml_invalid_chars(self, storage_account_name, storage_account_key): # Action. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue = self._get_queue_reference(qsc) message = u'\u0001' @@ -109,13 +107,13 @@ async def test_message_text_xml_invalid_chars(self, resource_group, location, st with self.assertRaises(HttpResponseError): await queue.send_message(message) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_message_text_base64(self, resource_group, location, storage_account, storage_account_key): + async def test_message_text_base64(self, storage_account_name, storage_account_key): # Arrange. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue = QueueClient( - account_url=self.account_url(storage_account, "queue"), + account_url=self.account_url(storage_account_name, "queue"), queue_name=self.get_resource_name(TEST_QUEUE_PREFIX), credential=storage_account_key, message_encode_policy=TextBase64EncodePolicy(), @@ -127,13 +125,13 @@ async def test_message_text_base64(self, resource_group, location, storage_accou # Asserts await self._validate_encoding(queue, message) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_message_bytes_base64(self, resource_group, location, storage_account, storage_account_key): + async def test_message_bytes_base64(self, storage_account_name, storage_account_key): # Arrange. - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue = QueueClient( - account_url=self.account_url(storage_account, "queue"), + account_url=self.account_url(storage_account_name, "queue"), queue_name=self.get_resource_name(TEST_QUEUE_PREFIX), credential=storage_account_key, message_encode_policy=BinaryBase64EncodePolicy(), @@ -145,11 +143,11 @@ async def test_message_bytes_base64(self, resource_group, location, storage_acco # Asserts await self._validate_encoding(queue, message) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_message_bytes_fails(self, resource_group, location, storage_account, storage_account_key): + async def test_message_bytes_fails(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue = self._get_queue_reference(qsc) # Action. with self.assertRaises(TypeError) as e: @@ -159,13 +157,13 @@ async def test_message_bytes_fails(self, resource_group, location, storage_accou # Asserts self.assertTrue(str(e.exception).startswith('Message content must not be bytes. Use the BinaryBase64EncodePolicy to send bytes.')) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_message_text_fails(self, resource_group, location, storage_account, storage_account_key): + async def test_message_text_fails(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue = QueueClient( - account_url=self.account_url(storage_account, "queue"), + account_url=self.account_url(storage_account_name, "queue"), queue_name=self.get_resource_name(TEST_QUEUE_PREFIX), credential=storage_account_key, message_encode_policy=BinaryBase64EncodePolicy(), @@ -180,13 +178,13 @@ async def test_message_text_fails(self, resource_group, location, storage_accoun # Asserts self.assertTrue(str(e.exception).startswith('Message content must be bytes')) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_message_base64_decode_fails(self, resource_group, location, storage_account, storage_account_key): + async def test_message_base64_decode_fails(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) queue = QueueClient( - account_url=self.account_url(storage_account, "queue"), + account_url=self.account_url(storage_account_name, "queue"), queue_name=self.get_resource_name(TEST_QUEUE_PREFIX), credential=storage_account_key, message_encode_policy=None, diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_encryption.py b/sdk/storage/azure-storage-queue/tests/test_queue_encryption.py index 2d0758145484..935bcfe37cc4 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_encryption.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_encryption.py @@ -19,7 +19,6 @@ from cryptography.hazmat.primitives.ciphers.algorithms import AES from cryptography.hazmat.primitives.ciphers.modes import CBC from cryptography.hazmat.primitives.padding import PKCS7 -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.core.exceptions import HttpResponseError, ResourceExistsError from azure.storage.queue._shared import decode_base64_to_bytes from azure.storage.queue._shared.encryption import ( @@ -41,7 +40,8 @@ KeyResolver, RSAKeyWrapper, ) -from _shared.testcase import GlobalStorageAccountPreparer, StorageTestCase +from settings.testcase import QueuePreparer +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ TEST_QUEUE_PREFIX = 'encryptionqueue' @@ -71,10 +71,10 @@ def _create_queue(self, qsc, prefix=TEST_QUEUE_PREFIX, **kwargs): # -------------------------------------------------------------------------- - @GlobalStorageAccountPreparer() - def test_get_messages_encrypted_kek(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_get_messages_encrypted_kek(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) qsc.key_encryption_key = KeyWrapper('key1') queue = self._create_queue(qsc) queue.send_message(u'encrypted_message_2') @@ -85,10 +85,10 @@ def test_get_messages_encrypted_kek(self, resource_group, location, storage_acco # Assert self.assertEqual(li.content, u'encrypted_message_2') - @GlobalStorageAccountPreparer() - def test_get_messages_encrypted_resolver(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_get_messages_encrypted_resolver(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) qsc.key_encryption_key = KeyWrapper('key1') queue = self._create_queue(qsc) queue.send_message(u'encrypted_message_2') @@ -103,10 +103,10 @@ def test_get_messages_encrypted_resolver(self, resource_group, location, storage # Assert self.assertEqual(li.content, u'encrypted_message_2') - @GlobalStorageAccountPreparer() - def test_peek_messages_encrypted_kek(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_peek_messages_encrypted_kek(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) qsc.key_encryption_key = KeyWrapper('key1') queue = self._create_queue(qsc) queue.send_message(u'encrypted_message_3') @@ -117,10 +117,10 @@ def test_peek_messages_encrypted_kek(self, resource_group, location, storage_acc # Assert self.assertEqual(li[0].content, u'encrypted_message_3') - @GlobalStorageAccountPreparer() - def test_peek_messages_encrypted_resolver(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_peek_messages_encrypted_resolver(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) qsc.key_encryption_key = KeyWrapper('key1') queue = self._create_queue(qsc) queue.send_message(u'encrypted_message_4') @@ -136,14 +136,14 @@ def test_peek_messages_encrypted_resolver(self, resource_group, location, storag self.assertEqual(li[0].content, u'encrypted_message_4') @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_peek_messages_encrypted_kek_RSA(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_peek_messages_encrypted_kek_RSA(self, storage_account_name, storage_account_key): # We can only generate random RSA keys, so this must be run live or # the playback test will fail due to a change in kek values. # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) qsc.key_encryption_key = RSAKeyWrapper('key2') queue = self._create_queue(qsc) queue.send_message(u'encrypted_message_3') @@ -155,11 +155,11 @@ def test_peek_messages_encrypted_kek_RSA(self, resource_group, location, storage self.assertEqual(li[0].content, u'encrypted_message_3') @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_update_encrypted_message(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_update_encrypted_message(self, storage_account_name, storage_account_key): # TODO: Recording doesn't work # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) queue.key_encryption_key = KeyWrapper('key1') queue.send_message(u'Update Me') @@ -175,10 +175,10 @@ def test_update_encrypted_message(self, resource_group, location, storage_accoun # Assert self.assertEqual(u'Updated', list_result2.content) - @GlobalStorageAccountPreparer() - def test_update_encrypted_binary_message(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_update_encrypted_binary_message(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc, message_encode_policy=BinaryBase64EncodePolicy(), message_decode_policy=BinaryBase64DecodePolicy()) queue.key_encryption_key = KeyWrapper('key1') @@ -203,11 +203,11 @@ def test_update_encrypted_binary_message(self, resource_group, location, storage self.assertEqual(binary_message, list_result2.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_update_encrypted_raw_text_message(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_update_encrypted_raw_text_message(self, storage_account_name, storage_account_key): # TODO: Recording doesn't work # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc, message_encode_policy=None, message_decode_policy=None) queue.key_encryption_key = KeyWrapper('key1') @@ -227,11 +227,11 @@ def test_update_encrypted_raw_text_message(self, resource_group, location, stora self.assertEqual(raw_text, list_result2.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() - def test_update_encrypted_json_message(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_update_encrypted_json_message(self, storage_account_name, storage_account_key): # TODO: Recording doesn't work # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc, message_encode_policy=None, message_decode_policy=None) queue.key_encryption_key = KeyWrapper('key1') @@ -253,10 +253,10 @@ def test_update_encrypted_json_message(self, resource_group, location, storage_a # Assert self.assertEqual(message_dict, loads(list_result2.content)) - @GlobalStorageAccountPreparer() - def test_invalid_value_kek_wrap(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_invalid_value_kek_wrap(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) queue.key_encryption_key = KeyWrapper('key1') queue.key_encryption_key.get_kid = None @@ -276,10 +276,10 @@ def test_invalid_value_kek_wrap(self, resource_group, location, storage_account, with self.assertRaises(AttributeError): queue.send_message(u'message') - @GlobalStorageAccountPreparer() - def test_missing_attribute_kek_wrap(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_missing_attribute_kek_wrap(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) valid_key = KeyWrapper('key1') @@ -309,10 +309,10 @@ def test_missing_attribute_kek_wrap(self, resource_group, location, storage_acco with self.assertRaises(AttributeError): queue.send_message(u'message') - @GlobalStorageAccountPreparer() - def test_invalid_value_kek_unwrap(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_invalid_value_kek_unwrap(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) queue.key_encryption_key = KeyWrapper('key1') queue.send_message(u'message') @@ -326,10 +326,10 @@ def test_invalid_value_kek_unwrap(self, resource_group, location, storage_accoun with self.assertRaises(HttpResponseError): queue.peek_messages() - @GlobalStorageAccountPreparer() - def test_missing_attribute_kek_unrwap(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_missing_attribute_kek_unrwap(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) queue.key_encryption_key = KeyWrapper('key1') queue.send_message(u'message') @@ -352,10 +352,10 @@ def test_missing_attribute_kek_unrwap(self, resource_group, location, storage_ac with self.assertRaises(HttpResponseError): queue.peek_messages() - @GlobalStorageAccountPreparer() - def test_validate_encryption(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_validate_encryption(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) kek = KeyWrapper('key1') queue.key_encryption_key = kek @@ -411,10 +411,10 @@ def test_validate_encryption(self, resource_group, location, storage_account, st # Assert self.assertEqual(decrypted_data, u'message') - @GlobalStorageAccountPreparer() - def test_put_with_strict_mode(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_put_with_strict_mode(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) kek = KeyWrapper('key1') queue.key_encryption_key = kek @@ -429,10 +429,10 @@ def test_put_with_strict_mode(self, resource_group, location, storage_account, s self.assertEqual(str(e.exception), "Encryption required but no key was provided.") - @GlobalStorageAccountPreparer() - def test_get_with_strict_mode(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_get_with_strict_mode(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) queue.send_message(u'message') @@ -443,10 +443,10 @@ def test_get_with_strict_mode(self, resource_group, location, storage_account, s self.assertEqual(str(e.exception), 'Message was not encrypted.') - @GlobalStorageAccountPreparer() - def test_encryption_add_encrypted_64k_message(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_encryption_add_encrypted_64k_message(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) message = u'a' * 1024 * 64 @@ -458,10 +458,10 @@ def test_encryption_add_encrypted_64k_message(self, resource_group, location, st with self.assertRaises(HttpResponseError): queue.send_message(message) - @GlobalStorageAccountPreparer() - def test_encryption_nonmatching_kid(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_encryption_nonmatching_kid(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) queue = self._create_queue(qsc) queue.key_encryption_key = KeyWrapper('key1') queue.send_message(u'message') diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_encryption_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_encryption_async.py index 8c455a743137..d4f4ba4e8da4 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_encryption_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_encryption_async.py @@ -47,8 +47,8 @@ KeyResolver, RSAKeyWrapper, ) -from _shared.asynctestcase import AsyncStorageTestCase -from _shared.testcase import GlobalStorageAccountPreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase +from settings.testcase import QueuePreparer # ------------------------------------------------------------------------------ TEST_QUEUE_PREFIX = 'encryptionqueue' @@ -86,11 +86,11 @@ async def _create_queue(self, qsc, prefix=TEST_QUEUE_PREFIX, **kwargs): pass return queue # -------------------------------------------------------------------------- - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_messages_encrypted_kek(self, resource_group, location, storage_account, storage_account_key): + async def test_get_messages_encrypted_kek(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) qsc.key_encryption_key = KeyWrapper('key1') queue = await self._create_queue(qsc) await queue.send_message(u'encrypted_message_2') @@ -103,11 +103,11 @@ async def test_get_messages_encrypted_kek(self, resource_group, location, storag # Assert self.assertEqual(li.content, u'encrypted_message_2') - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_messages_encrypted_resolver(self, resource_group, location, storage_account, storage_account_key): + async def test_get_messages_encrypted_resolver(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) qsc.key_encryption_key = KeyWrapper('key1') queue = await self._create_queue(qsc) await queue.send_message(u'encrypted_message_2') @@ -124,10 +124,10 @@ async def test_get_messages_encrypted_resolver(self, resource_group, location, s # Assert self.assertEqual(li.content, u'encrypted_message_2') - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_peek_messages_encrypted_kek(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_peek_messages_encrypted_kek(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange qsc.key_encryption_key = KeyWrapper('key1') queue = await self._create_queue(qsc) @@ -139,10 +139,10 @@ async def test_peek_messages_encrypted_kek(self, resource_group, location, stora # Assert self.assertEqual(li[0].content, u'encrypted_message_3') - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_peek_messages_encrypted_resolver(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_peek_messages_encrypted_resolver(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange qsc.key_encryption_key = KeyWrapper('key1') queue = await self._create_queue(qsc) @@ -159,10 +159,10 @@ async def test_peek_messages_encrypted_resolver(self, resource_group, location, self.assertEqual(li[0].content, u'encrypted_message_4') @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_peek_messages_encrypted_kek_RSA(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_peek_messages_encrypted_kek_RSA(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # We can only generate random RSA keys, so this must be run live or # the playback test will fail due to a change in kek values. @@ -178,10 +178,10 @@ async def test_peek_messages_encrypted_kek_RSA(self, resource_group, location, s self.assertEqual(li[0].content, u'encrypted_message_3') @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_encrypted_message(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_update_encrypted_message(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # TODO: Recording doesn't work # Arrange queue = await self._create_queue(qsc) @@ -203,10 +203,10 @@ async def test_update_encrypted_message(self, resource_group, location, storage_ # Assert self.assertEqual(u'Updated', list_result2.content) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_encrypted_binary_message(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_update_encrypted_binary_message(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc, message_encode_policy=BinaryBase64EncodePolicy(), message_decode_policy=BinaryBase64DecodePolicy()) queue.key_encryption_key = KeyWrapper('key1') @@ -231,10 +231,10 @@ async def test_update_encrypted_binary_message(self, resource_group, location, s self.assertEqual(binary_message, list_result2.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_encrypted_raw_text_message(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_update_encrypted_raw_text_message(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # TODO: Recording doesn't work # Arrange queue = await self._create_queue(qsc, message_encode_policy=None, message_decode_policy=None) @@ -258,10 +258,10 @@ async def test_update_encrypted_raw_text_message(self, resource_group, location, self.assertEqual(raw_text, list_result2.content) @pytest.mark.live_test_only - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_update_encrypted_json_message(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_update_encrypted_json_message(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # TODO: Recording doesn't work # Arrange queue = await self._create_queue(qsc, message_encode_policy=None, message_decode_policy=None) @@ -289,10 +289,10 @@ async def test_update_encrypted_json_message(self, resource_group, location, sto # Assert self.assertEqual(message_dict, loads(list_result2.content)) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_invalid_value_kek_wrap(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_invalid_value_kek_wrap(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc) queue.key_encryption_key = KeyWrapper('key1') @@ -313,10 +313,10 @@ async def test_invalid_value_kek_wrap(self, resource_group, location, storage_ac with self.assertRaises(AttributeError): await queue.send_message(u'message') - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_missing_attribute_kek_wrap(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_missing_attribute_kek_wrap(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc) @@ -347,10 +347,10 @@ async def test_missing_attribute_kek_wrap(self, resource_group, location, storag with self.assertRaises(AttributeError): await queue.send_message(u'message') - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_invalid_value_kek_unwrap(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_invalid_value_kek_unwrap(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc) queue.key_encryption_key = KeyWrapper('key1') @@ -365,10 +365,10 @@ async def test_invalid_value_kek_unwrap(self, resource_group, location, storage_ with self.assertRaises(HttpResponseError): await queue.peek_messages() - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_missing_attribute_kek_unrwap(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_missing_attribute_kek_unrwap(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc) queue.key_encryption_key = KeyWrapper('key1') @@ -392,10 +392,10 @@ async def test_missing_attribute_kek_unrwap(self, resource_group, location, stor with self.assertRaises(HttpResponseError): await queue.peek_messages() - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_validate_encryption(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_validate_encryption(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc) kek = KeyWrapper('key1') @@ -452,10 +452,10 @@ async def test_validate_encryption(self, resource_group, location, storage_accou # Assert self.assertEqual(decrypted_data, u'message') - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_put_with_strict_mode(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_put_with_strict_mode(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc) kek = KeyWrapper('key1') @@ -471,10 +471,10 @@ async def test_put_with_strict_mode(self, resource_group, location, storage_acco self.assertEqual(str(e.exception), "Encryption required but no key was provided.") - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_get_with_strict_mode(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_get_with_strict_mode(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc) await queue.send_message(u'message') @@ -488,10 +488,10 @@ async def test_get_with_strict_mode(self, resource_group, location, storage_acco _ = messages[0] self.assertEqual(str(e.exception), 'Message was not encrypted.') - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_encryption_add_encrypted_64k_message(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_encryption_add_encrypted_64k_message(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc) message = u'a' * 1024 * 64 @@ -504,10 +504,10 @@ async def test_encryption_add_encrypted_64k_message(self, resource_group, locati with self.assertRaises(HttpResponseError): await queue.send_message(message) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_encryption_nonmatching_kid(self, resource_group, location, storage_account, storage_account_key): - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + async def test_encryption_nonmatching_kid(self, storage_account_name, storage_account_key): + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Arrange queue = await self._create_queue(qsc) queue.key_encryption_key = KeyWrapper('key1') diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py index 22e216a28c04..58b7379a9850 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties.py @@ -7,8 +7,6 @@ # -------------------------------------------------------------------------- import unittest -from msrest.exceptions import ValidationError # TODO This should be an azure-core error. -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.core.exceptions import HttpResponseError from azure.storage.queue import ( @@ -20,7 +18,8 @@ RetentionPolicy, ) -from _shared.testcase import GlobalStorageAccountPreparer, StorageTestCase +from settings.testcase import QueuePreparer +from devtools_testutils.storage import StorageTestCase # ------------------------------------------------------------------------------ @@ -103,10 +102,10 @@ def _assert_retention_equal(self, ret1, ret2): # --Test cases per service --------------------------------------- - @GlobalStorageAccountPreparer() - def test_queue_service_properties(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_queue_service_properties(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) # Act resp = qsc.set_service_properties( analytics_logging=QueueAnalyticsLogging(), @@ -121,10 +120,10 @@ def test_queue_service_properties(self, resource_group, location, storage_accoun # --Test cases per feature --------------------------------------- - @GlobalStorageAccountPreparer() - def test_set_logging(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_logging(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) logging = QueueAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -134,10 +133,10 @@ def test_set_logging(self, resource_group, location, storage_account, storage_ac received_props = qsc.get_service_properties() self._assert_logging_equal(received_props['analytics_logging'], logging) - @GlobalStorageAccountPreparer() - def test_set_hour_metrics(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_hour_metrics(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -147,10 +146,10 @@ def test_set_hour_metrics(self, resource_group, location, storage_account, stora received_props = qsc.get_service_properties() self._assert_metrics_equal(received_props['hour_metrics'], hour_metrics) - @GlobalStorageAccountPreparer() - def test_set_minute_metrics(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_minute_metrics(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) @@ -161,10 +160,10 @@ def test_set_minute_metrics(self, resource_group, location, storage_account, sto received_props = qsc.get_service_properties() self._assert_metrics_equal(received_props['minute_metrics'], minute_metrics) - @GlobalStorageAccountPreparer() - def test_set_cors(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_set_cors(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] @@ -189,17 +188,17 @@ def test_set_cors(self, resource_group, location, storage_account, storage_accou self._assert_cors_equal(received_props['cors'], cors) # --Test cases for errors --------------------------------------- - @GlobalStorageAccountPreparer() - def test_retention_no_days(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_retention_no_days(self, storage_account_name, storage_account_key): # Assert self.assertRaises(ValueError, RetentionPolicy, True, None) - @GlobalStorageAccountPreparer() - def test_too_many_cors_rules(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_too_many_cors_rules(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) cors = [] for i in range(0, 6): cors.append(CorsRule(['www.xyz.com'], ['GET'])) @@ -208,10 +207,10 @@ def test_too_many_cors_rules(self, resource_group, location, storage_account, st self.assertRaises(HttpResponseError, qsc.set_service_properties, None, None, None, cors) - @GlobalStorageAccountPreparer() - def test_retention_too_long(self, resource_group, location, storage_account, storage_account_key): + @QueuePreparer() + def test_retention_too_long(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=366)) diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py index b05189bcdbcc..904cafcedd37 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_service_properties_async.py @@ -6,9 +6,6 @@ # license information. # -------------------------------------------------------------------------- import unittest -import pytest -import asyncio -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer from azure.core.pipeline.transport import AioHttpTransport from multidict import CIMultiDict, CIMultiDictProxy from azure.core.exceptions import HttpResponseError @@ -23,8 +20,8 @@ QueueClient, ) -from _shared.asynctestcase import AsyncStorageTestCase -from _shared.testcase import GlobalStorageAccountPreparer +from devtools_testutils.storage.aio import AsyncStorageTestCase +from settings.testcase import QueuePreparer # ------------------------------------------------------------------------------ @@ -116,11 +113,11 @@ def _assert_retention_equal(self, ret1, ret2): # --Test cases per service --------------------------------------- - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_queue_service_properties(self, resource_group, location, storage_account, storage_account_key): + async def test_queue_service_properties(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) # Act resp = await qsc.set_service_properties( @@ -135,11 +132,11 @@ async def test_queue_service_properties(self, resource_group, location, storage_ self._assert_properties_default(props) # --Test cases per feature --------------------------------------- - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_logging(self, resource_group, location, storage_account, storage_account_key): + async def test_set_logging(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) logging = QueueAnalyticsLogging(read=True, write=True, delete=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -149,11 +146,11 @@ async def test_set_logging(self, resource_group, location, storage_account, stor received_props = await qsc.get_service_properties() self._assert_logging_equal(received_props['analytics_logging'], logging) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_hour_metrics(self, resource_group, location, storage_account, storage_account_key): + async def test_set_hour_metrics(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) hour_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) # Act @@ -163,11 +160,11 @@ async def test_set_hour_metrics(self, resource_group, location, storage_account, received_props = await qsc.get_service_properties() self._assert_metrics_equal(received_props['hour_metrics'], hour_metrics) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_minute_metrics(self, resource_group, location, storage_account, storage_account_key): + async def test_set_minute_metrics(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=5)) @@ -178,11 +175,11 @@ async def test_set_minute_metrics(self, resource_group, location, storage_accoun received_props = await qsc.get_service_properties() self._assert_metrics_equal(received_props['minute_metrics'], minute_metrics) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_set_cors(self, resource_group, location, storage_account, storage_account_key): + async def test_set_cors(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) cors_rule1 = CorsRule(['www.xyz.com'], ['GET']) allowed_origins = ['www.xyz.com', "www.ab.com", "www.bc.com"] @@ -208,20 +205,20 @@ async def test_set_cors(self, resource_group, location, storage_account, storage # --Test cases for errors --------------------------------------- - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retention_no_days(self, resource_group, location, storage_account, storage_account_key): + async def test_retention_no_days(self, storage_account_name, storage_account_key): # Assert - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) self.assertRaises(ValueError, RetentionPolicy, True, None) - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_too_many_cors_rules(self, resource_group, location, storage_account, storage_account_key): + async def test_too_many_cors_rules(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) cors = [] for _ in range(0, 6): cors.append(CorsRule(['www.xyz.com'], ['GET'])) @@ -230,11 +227,11 @@ async def test_too_many_cors_rules(self, resource_group, location, storage_accou with self.assertRaises(HttpResponseError): await qsc.set_service_properties() - @GlobalStorageAccountPreparer() + @QueuePreparer() @AsyncStorageTestCase.await_prepared_test - async def test_retention_too_long(self, resource_group, location, storage_account, storage_account_key): + async def test_retention_too_long(self, storage_account_name, storage_account_key): # Arrange - qsc = QueueServiceClient(self.account_url(storage_account, "queue"), storage_account_key, transport=AiohttpTestTransport()) + qsc = QueueServiceClient(self.account_url(storage_account_name, "queue"), storage_account_key, transport=AiohttpTestTransport()) minute_metrics = Metrics(enabled=True, include_apis=True, retention_policy=RetentionPolicy(enabled=True, days=366)) diff --git a/sdk/storage/azure-storage-queue/tests/test_queue_service_stats.py b/sdk/storage/azure-storage-queue/tests/test_queue_service_stats.py index b02be69e8f22..513162ce5f4f 100644 --- a/sdk/storage/azure-storage-queue/tests/test_queue_service_stats.py +++ b/sdk/storage/azure-storage-queue/tests/test_queue_service_stats.py @@ -4,11 +4,10 @@ # license information. # -------------------------------------------------------------------------- import unittest -import pytest from azure.storage.queue import QueueServiceClient -from devtools_testutils import ResourceGroupPreparer, StorageAccountPreparer -from _shared.testcase import GlobalResourceGroupPreparer, StorageTestCase +from settings.testcase import QueuePreparer +from devtools_testutils.storage import StorageTestCase SERVICE_UNAVAILABLE_RESP_BODY = 'unavailableunavailable AsyncLROPoller["_models.DiskPool"]: - """Create or Update Disk pool. + """Create or Update Disk pool. This create or update operation can take 15 minutes to complete. + This is expected service behavior. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -322,7 +323,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -448,7 +449,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -488,7 +489,8 @@ async def begin_delete( disk_pool_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """Delete a Disk pool. + """Delete a Disk pool; attached disks are not affected. This delete operation can take 10 minutes + to complete. This is expected service behavior. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -568,7 +570,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -627,7 +629,7 @@ def list_outbound_network_dependencies_endpoints( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -691,7 +693,7 @@ async def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -731,7 +733,8 @@ async def begin_start( disk_pool_name: str, **kwargs: Any ) -> AsyncLROPoller[None]: - """The operation to start a Disk Pool. + """The operation to start a Disk Pool. This start operation can take 10 minutes to complete. This + is expected service behavior. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -800,7 +803,7 @@ async def _deallocate_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -841,7 +844,8 @@ async def begin_deallocate( **kwargs: Any ) -> AsyncLROPoller[None]: """Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute - resources that this Disk Pool uses. + resources that this Disk Pool uses. This operation can take 10 minutes to complete. This is + expected service behavior. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -898,3 +902,113 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/deallocate'} # type: ignore + + async def _upgrade_initial( + self, + resource_group_name: str, + disk_pool_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self._upgrade_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]*[0-9A-Za-z]$'), + 'diskPoolName': self._serialize.url("disk_pool_name", disk_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _upgrade_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/upgrade'} # type: ignore + + async def begin_upgrade( + self, + resource_group_name: str, + disk_pool_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Upgrade replaces the underlying virtual machine hosts one at a time. This operation can take + 10-15 minutes to complete. This is expected service behavior. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param disk_pool_name: The name of the Disk Pool. + :type disk_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._upgrade_initial( + resource_group_name=resource_group_name, + disk_pool_name=disk_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]*[0-9A-Za-z]$'), + 'diskPoolName': self._serialize.url("disk_pool_name", disk_pool_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/upgrade'} # type: ignore diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_iscsi_targets_operations.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_iscsi_targets_operations.py index 65dfed807e2f..3b6d541bb9dc 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_iscsi_targets_operations.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_iscsi_targets_operations.py @@ -65,7 +65,7 @@ def list_by_disk_pool( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -131,7 +131,7 @@ async def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -267,7 +267,7 @@ async def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -400,7 +400,7 @@ async def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -529,7 +529,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_operations.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_operations.py index 10c4e5799e7a..f11ffd1a95c9 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_operations.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_operations.py @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_usages_operations.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_resource_skus_operations.py similarity index 79% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_usages_operations.py rename to sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_resource_skus_operations.py index 70ff633786e3..8844b20b9e0f 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_08_01/aio/operations/_usages_operations.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/aio/operations/_resource_skus_operations.py @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class UsagesOperations: - """UsagesOperations async operations. +class ResourceSkusOperations: + """ResourceSkusOperations async operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_08_01.models + :type models: ~storage_pool_management.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -45,23 +45,23 @@ def list( self, location: str, **kwargs: Any - ) -> AsyncIterable["_models.UsagesListResult"]: - """List network usages for a subscription. + ) -> AsyncIterable["_models.ResourceSkuListResult"]: + """Lists available StoragePool resources and skus in an Azure location. - :param location: The location where resource usage is queried. + :param location: The location of the resource. :type location: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either UsagesListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.network.v2017_08_01.models.UsagesListResult] + :return: An iterator like instance of either ResourceSkuListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~storage_pool_management.models.ResourceSkuListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.UsagesListResult"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceSkuListResult"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-08-01" - accept = "application/json, text/json" + api_version = "2021-08-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers @@ -72,8 +72,8 @@ def prepare_request(next_link=None): # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { - 'location': self._serialize.url("location", location, 'str', pattern=r'^[-\w\._]+$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters @@ -88,7 +88,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('UsagesListResult', pipeline_response) + deserialized = self._deserialize('ResourceSkuListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -101,12 +101,13 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Network/locations/{location}/usages'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.StoragePool/locations/{location}/skus'} # type: ignore diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/__init__.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/__init__.py index 1bd7f4b2711b..c85dc990cc73 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/__init__.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/__init__.py @@ -29,6 +29,13 @@ from ._models_py3 import OutboundEnvironmentEndpointList from ._models_py3 import ProxyResource from ._models_py3 import Resource + from ._models_py3 import ResourceSkuCapability + from ._models_py3 import ResourceSkuInfo + from ._models_py3 import ResourceSkuListResult + from ._models_py3 import ResourceSkuLocationInfo + from ._models_py3 import ResourceSkuRestrictionInfo + from ._models_py3 import ResourceSkuRestrictions + from ._models_py3 import ResourceSkuZoneDetails from ._models_py3 import Sku from ._models_py3 import StoragePoolOperationDisplay from ._models_py3 import StoragePoolOperationListResult @@ -58,6 +65,13 @@ from ._models import OutboundEnvironmentEndpointList # type: ignore from ._models import ProxyResource # type: ignore from ._models import Resource # type: ignore + from ._models import ResourceSkuCapability # type: ignore + from ._models import ResourceSkuInfo # type: ignore + from ._models import ResourceSkuListResult # type: ignore + from ._models import ResourceSkuLocationInfo # type: ignore + from ._models import ResourceSkuRestrictionInfo # type: ignore + from ._models import ResourceSkuRestrictions # type: ignore + from ._models import ResourceSkuZoneDetails # type: ignore from ._models import Sku # type: ignore from ._models import StoragePoolOperationDisplay # type: ignore from ._models import StoragePoolOperationListResult # type: ignore @@ -71,6 +85,8 @@ IscsiTargetAclMode, OperationalStatus, ProvisioningStates, + ResourceSkuRestrictionsReasonCode, + ResourceSkuRestrictionsType, ) __all__ = [ @@ -96,6 +112,13 @@ 'OutboundEnvironmentEndpointList', 'ProxyResource', 'Resource', + 'ResourceSkuCapability', + 'ResourceSkuInfo', + 'ResourceSkuListResult', + 'ResourceSkuLocationInfo', + 'ResourceSkuRestrictionInfo', + 'ResourceSkuRestrictions', + 'ResourceSkuZoneDetails', 'Sku', 'StoragePoolOperationDisplay', 'StoragePoolOperationListResult', @@ -107,4 +130,6 @@ 'IscsiTargetAclMode', 'OperationalStatus', 'ProvisioningStates', + 'ResourceSkuRestrictionsReasonCode', + 'ResourceSkuRestrictionsType', ] diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_models.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_models.py index c99710d4e861..da0de2c071db 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_models.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_models.py @@ -167,6 +167,11 @@ class DiskPool(TrackedResource): :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str + :ivar managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :vartype managed_by: str + :ivar managed_by_extended: List of Azure resource ids that manage this resource. + :vartype managed_by_extended: list[str] :ivar system_data: Resource metadata required by ARM RPC. :vartype system_data: ~storage_pool_management.models.SystemMetadata :ivar provisioning_state: Required. State of the operation on the resource. Possible values @@ -196,6 +201,8 @@ class DiskPool(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'managed_by_extended': {'readonly': True}, 'system_data': {'readonly': True}, 'provisioning_state': {'required': True, 'readonly': True}, 'availability_zones': {'required': True}, @@ -209,6 +216,8 @@ class DiskPool(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'system_data': {'key': 'systemData', 'type': 'SystemMetadata'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, @@ -225,6 +234,8 @@ def __init__( **kwargs ): super(DiskPool, self).__init__(**kwargs) + self.managed_by = None + self.managed_by_extended = None self.system_data = None self.provisioning_state = None self.availability_zones = kwargs['availability_zones'] @@ -257,6 +268,11 @@ class DiskPoolCreate(msrest.serialization.Model): :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str + :param managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :type managed_by: str + :param managed_by_extended: List of Azure resource ids that manage this resource. + :type managed_by_extended: list[str] :param availability_zones: Logical zone for Disk Pool resource; example: ["1"]. :type availability_zones: list[str] :param disks: List of Azure Managed Disks to attach to a Disk Pool. @@ -283,6 +299,8 @@ class DiskPoolCreate(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, 'disks': {'key': 'properties.disks', 'type': '[Disk]'}, 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, @@ -300,6 +318,8 @@ def __init__( self.id = None self.name = None self.type = None + self.managed_by = kwargs.get('managed_by', None) + self.managed_by_extended = kwargs.get('managed_by_extended', None) self.availability_zones = kwargs.get('availability_zones', None) self.disks = kwargs.get('disks', None) self.subnet_id = kwargs['subnet_id'] @@ -341,6 +361,13 @@ def __init__( class DiskPoolUpdate(msrest.serialization.Model): """Request payload for Update Disk Pool request. + :param managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :type managed_by: str + :param managed_by_extended: List of Azure resource ids that manage this resource. + :type managed_by_extended: list[str] + :param sku: Determines the SKU of the Disk Pool. + :type sku: ~storage_pool_management.models.Sku :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param disks: List of Azure Managed Disks to attach to a Disk Pool. @@ -348,6 +375,9 @@ class DiskPoolUpdate(msrest.serialization.Model): """ _attribute_map = { + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'disks': {'key': 'properties.disks', 'type': '[Disk]'}, } @@ -357,21 +387,32 @@ def __init__( **kwargs ): super(DiskPoolUpdate, self).__init__(**kwargs) + self.managed_by = kwargs.get('managed_by', None) + self.managed_by_extended = kwargs.get('managed_by_extended', None) + self.sku = kwargs.get('sku', None) self.tags = kwargs.get('tags', None) self.disks = kwargs.get('disks', None) class DiskPoolZoneInfo(msrest.serialization.Model): - """Disk Pool Sku Details. + """Disk Pool SKU Details. - :param availability_zones: Logical zone for Disk Pool resource; example: ["1"]. - :type availability_zones: list[str] - :param additional_capabilities: List of additional capabilities for Disk Pool. - :type additional_capabilities: list[str] - :param sku: Determines the SKU of VM deployed for Disk Pool. - :type sku: ~storage_pool_management.models.Sku + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar availability_zones: Logical zone for Disk Pool resource; example: ["1"]. + :vartype availability_zones: list[str] + :ivar additional_capabilities: List of additional capabilities for Disk Pool. + :vartype additional_capabilities: list[str] + :ivar sku: Determines the SKU of VM deployed for Disk Pool. + :vartype sku: ~storage_pool_management.models.Sku """ + _validation = { + 'availability_zones': {'readonly': True}, + 'additional_capabilities': {'readonly': True}, + 'sku': {'readonly': True}, + } + _attribute_map = { 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, 'additional_capabilities': {'key': 'additionalCapabilities', 'type': '[str]'}, @@ -383,20 +424,27 @@ def __init__( **kwargs ): super(DiskPoolZoneInfo, self).__init__(**kwargs) - self.availability_zones = kwargs.get('availability_zones', None) - self.additional_capabilities = kwargs.get('additional_capabilities', None) - self.sku = kwargs.get('sku', None) + self.availability_zones = None + self.additional_capabilities = None + self.sku = None class DiskPoolZoneListResult(msrest.serialization.Model): """List Disk Pool skus operation response. - :param value: The list of Disk Pool Skus. - :type value: list[~storage_pool_management.models.DiskPoolZoneInfo] - :param next_link: URI to fetch the next section of the paginated response. - :type next_link: str + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of Disk Pool Skus. + :vartype value: list[~storage_pool_management.models.DiskPoolZoneInfo] + :ivar next_link: URI to fetch the next section of the paginated response. + :vartype next_link: str """ + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + _attribute_map = { 'value': {'key': 'value', 'type': '[DiskPoolZoneInfo]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, @@ -407,8 +455,8 @@ def __init__( **kwargs ): super(DiskPoolZoneListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) + self.value = None + self.next_link = None class EndpointDependency(msrest.serialization.Model): @@ -649,6 +697,11 @@ class IscsiTarget(ProxyResource): :vartype type: str :ivar system_data: Resource metadata required by ARM RPC. :vartype system_data: ~storage_pool_management.models.SystemMetadata + :ivar managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :vartype managed_by: str + :ivar managed_by_extended: List of Azure resource ids that manage this resource. + :vartype managed_by_extended: list[str] :param acl_mode: Required. Mode for Target connectivity. Possible values include: "Dynamic", "Static". :type acl_mode: str or ~storage_pool_management.models.IscsiTargetAclMode @@ -671,6 +724,8 @@ class IscsiTarget(ProxyResource): :type endpoints: list[str] :param port: The port used by iSCSI Target portal group. :type port: int + :ivar sessions: List of identifiers for active sessions on the iSCSI target. + :vartype sessions: list[str] """ _validation = { @@ -678,10 +733,13 @@ class IscsiTarget(ProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'managed_by_extended': {'readonly': True}, 'acl_mode': {'required': True}, 'target_iqn': {'required': True}, 'provisioning_state': {'required': True, 'readonly': True}, 'status': {'required': True}, + 'sessions': {'readonly': True}, } _attribute_map = { @@ -689,6 +747,8 @@ class IscsiTarget(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'system_data': {'key': 'systemData', 'type': 'SystemMetadata'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'acl_mode': {'key': 'properties.aclMode', 'type': 'str'}, 'static_acls': {'key': 'properties.staticAcls', 'type': '[Acl]'}, 'luns': {'key': 'properties.luns', 'type': '[IscsiLun]'}, @@ -697,6 +757,7 @@ class IscsiTarget(ProxyResource): 'status': {'key': 'properties.status', 'type': 'str'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[str]'}, 'port': {'key': 'properties.port', 'type': 'int'}, + 'sessions': {'key': 'properties.sessions', 'type': '[str]'}, } def __init__( @@ -705,6 +766,8 @@ def __init__( ): super(IscsiTarget, self).__init__(**kwargs) self.system_data = None + self.managed_by = None + self.managed_by_extended = None self.acl_mode = kwargs['acl_mode'] self.static_acls = kwargs.get('static_acls', None) self.luns = kwargs.get('luns', None) @@ -713,6 +776,7 @@ def __init__( self.status = kwargs['status'] self.endpoints = kwargs.get('endpoints', None) self.port = kwargs.get('port', None) + self.sessions = None class IscsiTargetCreate(ProxyResource): @@ -730,6 +794,11 @@ class IscsiTargetCreate(ProxyResource): :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str + :param managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :type managed_by: str + :param managed_by_extended: List of Azure resource ids that manage this resource. + :type managed_by_extended: list[str] :param acl_mode: Required. Mode for Target connectivity. Possible values include: "Dynamic", "Static". :type acl_mode: str or ~storage_pool_management.models.IscsiTargetAclMode @@ -753,6 +822,8 @@ class IscsiTargetCreate(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'acl_mode': {'key': 'properties.aclMode', 'type': 'str'}, 'target_iqn': {'key': 'properties.targetIqn', 'type': 'str'}, 'static_acls': {'key': 'properties.staticAcls', 'type': '[Acl]'}, @@ -764,6 +835,8 @@ def __init__( **kwargs ): super(IscsiTargetCreate, self).__init__(**kwargs) + self.managed_by = kwargs.get('managed_by', None) + self.managed_by_extended = kwargs.get('managed_by_extended', None) self.acl_mode = kwargs['acl_mode'] self.target_iqn = kwargs.get('target_iqn', None) self.static_acls = kwargs.get('static_acls', None) @@ -815,6 +888,11 @@ class IscsiTargetUpdate(ProxyResource): :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str + :param managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :type managed_by: str + :param managed_by_extended: List of Azure resource ids that manage this resource. + :type managed_by_extended: list[str] :param static_acls: Access Control List (ACL) for an iSCSI Target; defines LUN masking policy. :type static_acls: list[~storage_pool_management.models.Acl] :param luns: List of LUNs to be exposed through iSCSI Target. @@ -831,6 +909,8 @@ class IscsiTargetUpdate(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'static_acls': {'key': 'properties.staticAcls', 'type': '[Acl]'}, 'luns': {'key': 'properties.luns', 'type': '[IscsiLun]'}, } @@ -840,6 +920,8 @@ def __init__( **kwargs ): super(IscsiTargetUpdate, self).__init__(**kwargs) + self.managed_by = kwargs.get('managed_by', None) + self.managed_by_extended = kwargs.get('managed_by_extended', None) self.static_acls = kwargs.get('static_acls', None) self.luns = kwargs.get('luns', None) @@ -900,6 +982,253 @@ def __init__( self.next_link = None +class ResourceSkuCapability(msrest.serialization.Model): + """Capability a resource SKU has. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Capability name. + :vartype name: str + :ivar value: Capability value. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCapability, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuInfo(msrest.serialization.Model): + """Resource SKU Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar api_version: StoragePool RP API version. + :vartype api_version: str + :ivar resource_type: StoragePool resource type. + :vartype resource_type: str + :ivar capabilities: List of additional capabilities for StoragePool resource. + :vartype capabilities: list[~storage_pool_management.models.ResourceSkuCapability] + :ivar location_info: Zones and zone capabilities in those locations where the SKU is available. + :vartype location_info: ~storage_pool_management.models.ResourceSkuLocationInfo + :ivar name: Sku name. + :vartype name: str + :ivar tier: Sku tier. + :vartype tier: str + :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if + there are no restrictions. + :vartype restrictions: list[~storage_pool_management.models.ResourceSkuRestrictions] + """ + + _validation = { + 'api_version': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'location_info': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapability]'}, + 'location_info': {'key': 'locationInfo', 'type': 'ResourceSkuLocationInfo'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuInfo, self).__init__(**kwargs) + self.api_version = None + self.resource_type = None + self.capabilities = None + self.location_info = None + self.name = None + self.tier = None + self.restrictions = None + + +class ResourceSkuListResult(msrest.serialization.Model): + """List Disk Pool skus operation response. + + :param value: The list of StoragePool resource skus. + :type value: list[~storage_pool_management.models.ResourceSkuInfo] + :param next_link: URI to fetch the next section of the paginated response. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceSkuInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class ResourceSkuLocationInfo(msrest.serialization.Model): + """Zone and capability info for resource sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar location: Location of the SKU. + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific zones. + :vartype zone_details: list[~storage_pool_management.models.ResourceSkuZoneDetails] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'zone_details': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None + + +class ResourceSkuRestrictionInfo(msrest.serialization.Model): + """Describes an available Compute SKU Restriction Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar locations: Locations where the SKU is restricted. + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None + + +class ResourceSkuRestrictions(msrest.serialization.Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of restrictions. Possible values include: "Location", "Zone". + :vartype type: str or ~storage_pool_management.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to location. This would + be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the SKU cannot be used. + :vartype restriction_info: ~storage_pool_management.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: "QuotaId", + "NotAvailableForSubscription". + :vartype reason_code: str or ~storage_pool_management.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None + + +class ResourceSkuZoneDetails(msrest.serialization.Model): + """Describes The zonal capabilities of a SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The set of zones that the SKU is available in with the specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU in the specified list + of zones. + :vartype capabilities: list[~storage_pool_management.models.ResourceSkuCapability] + """ + + _validation = { + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapability]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = None + self.capabilities = None + + class Sku(msrest.serialization.Model): """Sku for ARM resource. diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_models_py3.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_models_py3.py index 21148d542512..11a73512933d 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_models_py3.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_models_py3.py @@ -180,6 +180,11 @@ class DiskPool(TrackedResource): :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str + :ivar managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :vartype managed_by: str + :ivar managed_by_extended: List of Azure resource ids that manage this resource. + :vartype managed_by_extended: list[str] :ivar system_data: Resource metadata required by ARM RPC. :vartype system_data: ~storage_pool_management.models.SystemMetadata :ivar provisioning_state: Required. State of the operation on the resource. Possible values @@ -209,6 +214,8 @@ class DiskPool(TrackedResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'location': {'required': True}, + 'managed_by': {'readonly': True}, + 'managed_by_extended': {'readonly': True}, 'system_data': {'readonly': True}, 'provisioning_state': {'required': True, 'readonly': True}, 'availability_zones': {'required': True}, @@ -222,6 +229,8 @@ class DiskPool(TrackedResource): 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'system_data': {'key': 'systemData', 'type': 'SystemMetadata'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, @@ -248,6 +257,8 @@ def __init__( **kwargs ): super(DiskPool, self).__init__(tags=tags, location=location, **kwargs) + self.managed_by = None + self.managed_by_extended = None self.system_data = None self.provisioning_state = None self.availability_zones = availability_zones @@ -280,6 +291,11 @@ class DiskPoolCreate(msrest.serialization.Model): :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str + :param managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :type managed_by: str + :param managed_by_extended: List of Azure resource ids that manage this resource. + :type managed_by_extended: list[str] :param availability_zones: Logical zone for Disk Pool resource; example: ["1"]. :type availability_zones: list[str] :param disks: List of Azure Managed Disks to attach to a Disk Pool. @@ -306,6 +322,8 @@ class DiskPoolCreate(msrest.serialization.Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'availability_zones': {'key': 'properties.availabilityZones', 'type': '[str]'}, 'disks': {'key': 'properties.disks', 'type': '[Disk]'}, 'subnet_id': {'key': 'properties.subnetId', 'type': 'str'}, @@ -319,6 +337,8 @@ def __init__( location: str, subnet_id: str, tags: Optional[Dict[str, str]] = None, + managed_by: Optional[str] = None, + managed_by_extended: Optional[List[str]] = None, availability_zones: Optional[List[str]] = None, disks: Optional[List["Disk"]] = None, additional_capabilities: Optional[List[str]] = None, @@ -331,6 +351,8 @@ def __init__( self.id = None self.name = None self.type = None + self.managed_by = managed_by + self.managed_by_extended = managed_by_extended self.availability_zones = availability_zones self.disks = disks self.subnet_id = subnet_id @@ -374,6 +396,13 @@ def __init__( class DiskPoolUpdate(msrest.serialization.Model): """Request payload for Update Disk Pool request. + :param managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :type managed_by: str + :param managed_by_extended: List of Azure resource ids that manage this resource. + :type managed_by_extended: list[str] + :param sku: Determines the SKU of the Disk Pool. + :type sku: ~storage_pool_management.models.Sku :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param disks: List of Azure Managed Disks to attach to a Disk Pool. @@ -381,6 +410,9 @@ class DiskPoolUpdate(msrest.serialization.Model): """ _attribute_map = { + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'disks': {'key': 'properties.disks', 'type': '[Disk]'}, } @@ -388,26 +420,40 @@ class DiskPoolUpdate(msrest.serialization.Model): def __init__( self, *, + managed_by: Optional[str] = None, + managed_by_extended: Optional[List[str]] = None, + sku: Optional["Sku"] = None, tags: Optional[Dict[str, str]] = None, disks: Optional[List["Disk"]] = None, **kwargs ): super(DiskPoolUpdate, self).__init__(**kwargs) + self.managed_by = managed_by + self.managed_by_extended = managed_by_extended + self.sku = sku self.tags = tags self.disks = disks class DiskPoolZoneInfo(msrest.serialization.Model): - """Disk Pool Sku Details. + """Disk Pool SKU Details. - :param availability_zones: Logical zone for Disk Pool resource; example: ["1"]. - :type availability_zones: list[str] - :param additional_capabilities: List of additional capabilities for Disk Pool. - :type additional_capabilities: list[str] - :param sku: Determines the SKU of VM deployed for Disk Pool. - :type sku: ~storage_pool_management.models.Sku + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar availability_zones: Logical zone for Disk Pool resource; example: ["1"]. + :vartype availability_zones: list[str] + :ivar additional_capabilities: List of additional capabilities for Disk Pool. + :vartype additional_capabilities: list[str] + :ivar sku: Determines the SKU of VM deployed for Disk Pool. + :vartype sku: ~storage_pool_management.models.Sku """ + _validation = { + 'availability_zones': {'readonly': True}, + 'additional_capabilities': {'readonly': True}, + 'sku': {'readonly': True}, + } + _attribute_map = { 'availability_zones': {'key': 'availabilityZones', 'type': '[str]'}, 'additional_capabilities': {'key': 'additionalCapabilities', 'type': '[str]'}, @@ -416,27 +462,30 @@ class DiskPoolZoneInfo(msrest.serialization.Model): def __init__( self, - *, - availability_zones: Optional[List[str]] = None, - additional_capabilities: Optional[List[str]] = None, - sku: Optional["Sku"] = None, **kwargs ): super(DiskPoolZoneInfo, self).__init__(**kwargs) - self.availability_zones = availability_zones - self.additional_capabilities = additional_capabilities - self.sku = sku + self.availability_zones = None + self.additional_capabilities = None + self.sku = None class DiskPoolZoneListResult(msrest.serialization.Model): """List Disk Pool skus operation response. - :param value: The list of Disk Pool Skus. - :type value: list[~storage_pool_management.models.DiskPoolZoneInfo] - :param next_link: URI to fetch the next section of the paginated response. - :type next_link: str + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of Disk Pool Skus. + :vartype value: list[~storage_pool_management.models.DiskPoolZoneInfo] + :ivar next_link: URI to fetch the next section of the paginated response. + :vartype next_link: str """ + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + _attribute_map = { 'value': {'key': 'value', 'type': '[DiskPoolZoneInfo]'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, @@ -444,14 +493,11 @@ class DiskPoolZoneListResult(msrest.serialization.Model): def __init__( self, - *, - value: Optional[List["DiskPoolZoneInfo"]] = None, - next_link: Optional[str] = None, **kwargs ): super(DiskPoolZoneListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link + self.value = None + self.next_link = None class EndpointDependency(msrest.serialization.Model): @@ -705,6 +751,11 @@ class IscsiTarget(ProxyResource): :vartype type: str :ivar system_data: Resource metadata required by ARM RPC. :vartype system_data: ~storage_pool_management.models.SystemMetadata + :ivar managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :vartype managed_by: str + :ivar managed_by_extended: List of Azure resource ids that manage this resource. + :vartype managed_by_extended: list[str] :param acl_mode: Required. Mode for Target connectivity. Possible values include: "Dynamic", "Static". :type acl_mode: str or ~storage_pool_management.models.IscsiTargetAclMode @@ -727,6 +778,8 @@ class IscsiTarget(ProxyResource): :type endpoints: list[str] :param port: The port used by iSCSI Target portal group. :type port: int + :ivar sessions: List of identifiers for active sessions on the iSCSI target. + :vartype sessions: list[str] """ _validation = { @@ -734,10 +787,13 @@ class IscsiTarget(ProxyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'system_data': {'readonly': True}, + 'managed_by': {'readonly': True}, + 'managed_by_extended': {'readonly': True}, 'acl_mode': {'required': True}, 'target_iqn': {'required': True}, 'provisioning_state': {'required': True, 'readonly': True}, 'status': {'required': True}, + 'sessions': {'readonly': True}, } _attribute_map = { @@ -745,6 +801,8 @@ class IscsiTarget(ProxyResource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'system_data': {'key': 'systemData', 'type': 'SystemMetadata'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'acl_mode': {'key': 'properties.aclMode', 'type': 'str'}, 'static_acls': {'key': 'properties.staticAcls', 'type': '[Acl]'}, 'luns': {'key': 'properties.luns', 'type': '[IscsiLun]'}, @@ -753,6 +811,7 @@ class IscsiTarget(ProxyResource): 'status': {'key': 'properties.status', 'type': 'str'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[str]'}, 'port': {'key': 'properties.port', 'type': 'int'}, + 'sessions': {'key': 'properties.sessions', 'type': '[str]'}, } def __init__( @@ -769,6 +828,8 @@ def __init__( ): super(IscsiTarget, self).__init__(**kwargs) self.system_data = None + self.managed_by = None + self.managed_by_extended = None self.acl_mode = acl_mode self.static_acls = static_acls self.luns = luns @@ -777,6 +838,7 @@ def __init__( self.status = status self.endpoints = endpoints self.port = port + self.sessions = None class IscsiTargetCreate(ProxyResource): @@ -794,6 +856,11 @@ class IscsiTargetCreate(ProxyResource): :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str + :param managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :type managed_by: str + :param managed_by_extended: List of Azure resource ids that manage this resource. + :type managed_by_extended: list[str] :param acl_mode: Required. Mode for Target connectivity. Possible values include: "Dynamic", "Static". :type acl_mode: str or ~storage_pool_management.models.IscsiTargetAclMode @@ -817,6 +884,8 @@ class IscsiTargetCreate(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'acl_mode': {'key': 'properties.aclMode', 'type': 'str'}, 'target_iqn': {'key': 'properties.targetIqn', 'type': 'str'}, 'static_acls': {'key': 'properties.staticAcls', 'type': '[Acl]'}, @@ -827,12 +896,16 @@ def __init__( self, *, acl_mode: Union[str, "IscsiTargetAclMode"], + managed_by: Optional[str] = None, + managed_by_extended: Optional[List[str]] = None, target_iqn: Optional[str] = None, static_acls: Optional[List["Acl"]] = None, luns: Optional[List["IscsiLun"]] = None, **kwargs ): super(IscsiTargetCreate, self).__init__(**kwargs) + self.managed_by = managed_by + self.managed_by_extended = managed_by_extended self.acl_mode = acl_mode self.target_iqn = target_iqn self.static_acls = static_acls @@ -886,6 +959,11 @@ class IscsiTargetUpdate(ProxyResource): :ivar type: The type of the resource. Ex- Microsoft.Compute/virtualMachines or Microsoft.Storage/storageAccounts. :vartype type: str + :param managed_by: Azure resource id. Indicates if this resource is managed by another Azure + resource. + :type managed_by: str + :param managed_by_extended: List of Azure resource ids that manage this resource. + :type managed_by_extended: list[str] :param static_acls: Access Control List (ACL) for an iSCSI Target; defines LUN masking policy. :type static_acls: list[~storage_pool_management.models.Acl] :param luns: List of LUNs to be exposed through iSCSI Target. @@ -902,6 +980,8 @@ class IscsiTargetUpdate(ProxyResource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'managed_by_extended': {'key': 'managedByExtended', 'type': '[str]'}, 'static_acls': {'key': 'properties.staticAcls', 'type': '[Acl]'}, 'luns': {'key': 'properties.luns', 'type': '[IscsiLun]'}, } @@ -909,11 +989,15 @@ class IscsiTargetUpdate(ProxyResource): def __init__( self, *, + managed_by: Optional[str] = None, + managed_by_extended: Optional[List[str]] = None, static_acls: Optional[List["Acl"]] = None, luns: Optional[List["IscsiLun"]] = None, **kwargs ): super(IscsiTargetUpdate, self).__init__(**kwargs) + self.managed_by = managed_by + self.managed_by_extended = managed_by_extended self.static_acls = static_acls self.luns = luns @@ -979,6 +1063,256 @@ def __init__( self.next_link = None +class ResourceSkuCapability(msrest.serialization.Model): + """Capability a resource SKU has. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: Capability name. + :vartype name: str + :ivar value: Capability value. + :vartype value: str + """ + + _validation = { + 'name': {'readonly': True}, + 'value': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuCapability, self).__init__(**kwargs) + self.name = None + self.value = None + + +class ResourceSkuInfo(msrest.serialization.Model): + """Resource SKU Details. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar api_version: StoragePool RP API version. + :vartype api_version: str + :ivar resource_type: StoragePool resource type. + :vartype resource_type: str + :ivar capabilities: List of additional capabilities for StoragePool resource. + :vartype capabilities: list[~storage_pool_management.models.ResourceSkuCapability] + :ivar location_info: Zones and zone capabilities in those locations where the SKU is available. + :vartype location_info: ~storage_pool_management.models.ResourceSkuLocationInfo + :ivar name: Sku name. + :vartype name: str + :ivar tier: Sku tier. + :vartype tier: str + :ivar restrictions: The restrictions because of which SKU cannot be used. This is empty if + there are no restrictions. + :vartype restrictions: list[~storage_pool_management.models.ResourceSkuRestrictions] + """ + + _validation = { + 'api_version': {'readonly': True}, + 'resource_type': {'readonly': True}, + 'capabilities': {'readonly': True}, + 'location_info': {'readonly': True}, + 'name': {'readonly': True}, + 'tier': {'readonly': True}, + 'restrictions': {'readonly': True}, + } + + _attribute_map = { + 'api_version': {'key': 'apiVersion', 'type': 'str'}, + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapability]'}, + 'location_info': {'key': 'locationInfo', 'type': 'ResourceSkuLocationInfo'}, + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + 'restrictions': {'key': 'restrictions', 'type': '[ResourceSkuRestrictions]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuInfo, self).__init__(**kwargs) + self.api_version = None + self.resource_type = None + self.capabilities = None + self.location_info = None + self.name = None + self.tier = None + self.restrictions = None + + +class ResourceSkuListResult(msrest.serialization.Model): + """List Disk Pool skus operation response. + + :param value: The list of StoragePool resource skus. + :type value: list[~storage_pool_management.models.ResourceSkuInfo] + :param next_link: URI to fetch the next section of the paginated response. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[ResourceSkuInfo]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["ResourceSkuInfo"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(ResourceSkuListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class ResourceSkuLocationInfo(msrest.serialization.Model): + """Zone and capability info for resource sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar location: Location of the SKU. + :vartype location: str + :ivar zones: List of availability zones where the SKU is supported. + :vartype zones: list[str] + :ivar zone_details: Details of capabilities available to a SKU in specific zones. + :vartype zone_details: list[~storage_pool_management.models.ResourceSkuZoneDetails] + """ + + _validation = { + 'location': {'readonly': True}, + 'zones': {'readonly': True}, + 'zone_details': {'readonly': True}, + } + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + 'zone_details': {'key': 'zoneDetails', 'type': '[ResourceSkuZoneDetails]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuLocationInfo, self).__init__(**kwargs) + self.location = None + self.zones = None + self.zone_details = None + + +class ResourceSkuRestrictionInfo(msrest.serialization.Model): + """Describes an available Compute SKU Restriction Information. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar locations: Locations where the SKU is restricted. + :vartype locations: list[str] + :ivar zones: List of availability zones where the SKU is restricted. + :vartype zones: list[str] + """ + + _validation = { + 'locations': {'readonly': True}, + 'zones': {'readonly': True}, + } + + _attribute_map = { + 'locations': {'key': 'locations', 'type': '[str]'}, + 'zones': {'key': 'zones', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuRestrictionInfo, self).__init__(**kwargs) + self.locations = None + self.zones = None + + +class ResourceSkuRestrictions(msrest.serialization.Model): + """Describes scaling information of a SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of restrictions. Possible values include: "Location", "Zone". + :vartype type: str or ~storage_pool_management.models.ResourceSkuRestrictionsType + :ivar values: The value of restrictions. If the restriction type is set to location. This would + be different locations where the SKU is restricted. + :vartype values: list[str] + :ivar restriction_info: The information about the restriction where the SKU cannot be used. + :vartype restriction_info: ~storage_pool_management.models.ResourceSkuRestrictionInfo + :ivar reason_code: The reason for restriction. Possible values include: "QuotaId", + "NotAvailableForSubscription". + :vartype reason_code: str or ~storage_pool_management.models.ResourceSkuRestrictionsReasonCode + """ + + _validation = { + 'type': {'readonly': True}, + 'values': {'readonly': True}, + 'restriction_info': {'readonly': True}, + 'reason_code': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[str]'}, + 'restriction_info': {'key': 'restrictionInfo', 'type': 'ResourceSkuRestrictionInfo'}, + 'reason_code': {'key': 'reasonCode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuRestrictions, self).__init__(**kwargs) + self.type = None + self.values = None + self.restriction_info = None + self.reason_code = None + + +class ResourceSkuZoneDetails(msrest.serialization.Model): + """Describes The zonal capabilities of a SKU. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The set of zones that the SKU is available in with the specified capabilities. + :vartype name: list[str] + :ivar capabilities: A list of capabilities that are available for the SKU in the specified list + of zones. + :vartype capabilities: list[~storage_pool_management.models.ResourceSkuCapability] + """ + + _validation = { + 'name': {'readonly': True}, + 'capabilities': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': '[str]'}, + 'capabilities': {'key': 'capabilities', 'type': '[ResourceSkuCapability]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceSkuZoneDetails, self).__init__(**kwargs) + self.name = None + self.capabilities = None + + class Sku(msrest.serialization.Model): """Sku for ARM resource. diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_storage_pool_management_enums.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_storage_pool_management_enums.py index e0d37e8e0c09..ce18e1a3cb2e 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_storage_pool_management_enums.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/models/_storage_pool_management_enums.py @@ -75,3 +75,17 @@ class ProvisioningStates(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): CREATING = "Creating" UPDATING = "Updating" DELETING = "Deleting" + +class ResourceSkuRestrictionsReasonCode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The reason for restriction. + """ + + QUOTA_ID = "QuotaId" + NOT_AVAILABLE_FOR_SUBSCRIPTION = "NotAvailableForSubscription" + +class ResourceSkuRestrictionsType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of restrictions. + """ + + LOCATION = "Location" + ZONE = "Zone" diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/__init__.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/__init__.py index 1620075f15e8..5f769185377c 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/__init__.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/__init__.py @@ -9,11 +9,13 @@ from ._operations import Operations from ._disk_pools_operations import DiskPoolsOperations from ._disk_pool_zones_operations import DiskPoolZonesOperations +from ._resource_skus_operations import ResourceSkusOperations from ._iscsi_targets_operations import IscsiTargetsOperations __all__ = [ 'Operations', 'DiskPoolsOperations', 'DiskPoolZonesOperations', + 'ResourceSkusOperations', 'IscsiTargetsOperations', ] diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_disk_pool_zones_operations.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_disk_pool_zones_operations.py index 5fe18b0f3bc1..ad3ec8eb6995 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_disk_pool_zones_operations.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_disk_pool_zones_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_disk_pools_operations.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_disk_pools_operations.py index 9c0b82b6881b..815decfd2fa4 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_disk_pools_operations.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_disk_pools_operations.py @@ -64,7 +64,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -135,7 +135,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -200,7 +200,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -254,7 +254,8 @@ def begin_create_or_update( **kwargs # type: Any ): # type: (...) -> LROPoller["_models.DiskPool"] - """Create or Update Disk pool. + """Create or Update Disk pool. This create or update operation can take 15 minutes to complete. + This is expected service behavior. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -331,7 +332,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -459,7 +460,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -500,7 +501,8 @@ def begin_delete( **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """Delete a Disk pool. + """Delete a Disk pool; attached disks are not affected. This delete operation can take 10 minutes + to complete. This is expected service behavior. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -581,7 +583,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -641,7 +643,7 @@ def list_outbound_network_dependencies_endpoints( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -706,7 +708,7 @@ def _start_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -747,7 +749,8 @@ def begin_start( **kwargs # type: Any ): # type: (...) -> LROPoller[None] - """The operation to start a Disk Pool. + """The operation to start a Disk Pool. This start operation can take 10 minutes to complete. This + is expected service behavior. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -817,7 +820,7 @@ def _deallocate_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -859,7 +862,8 @@ def begin_deallocate( ): # type: (...) -> LROPoller[None] """Shuts down the Disk Pool and releases the compute resources. You are not billed for the compute - resources that this Disk Pool uses. + resources that this Disk Pool uses. This operation can take 10 minutes to complete. This is + expected service behavior. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -916,3 +920,115 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_deallocate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/deallocate'} # type: ignore + + def _upgrade_initial( + self, + resource_group_name, # type: str + disk_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + # Construct URL + url = self._upgrade_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]*[0-9A-Za-z]$'), + 'diskPoolName': self._serialize.url("disk_pool_name", disk_pool_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.Error, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _upgrade_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/upgrade'} # type: ignore + + def begin_upgrade( + self, + resource_group_name, # type: str + disk_pool_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Upgrade replaces the underlying virtual machine hosts one at a time. This operation can take + 10-15 minutes to complete. This is expected service behavior. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param disk_pool_name: The name of the Disk Pool. + :type disk_pool_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._upgrade_initial( + resource_group_name=resource_group_name, + disk_pool_name=disk_pool_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._]*[0-9A-Za-z]$'), + 'diskPoolName': self._serialize.url("disk_pool_name", disk_pool_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'azure-async-operation'}, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_upgrade.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StoragePool/diskPools/{diskPoolName}/upgrade'} # type: ignore diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_iscsi_targets_operations.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_iscsi_targets_operations.py index 50b40a40f4c9..5191f43263be 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_iscsi_targets_operations.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_iscsi_targets_operations.py @@ -70,7 +70,7 @@ def list_by_disk_pool( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +137,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -275,7 +275,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -410,7 +410,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL @@ -541,7 +541,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" # Construct URL diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_operations.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_operations.py index 1d6fed7ae229..f1219eda8bb5 100644 --- a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_operations.py +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-08-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_resource_skus_operations.py b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_resource_skus_operations.py new file mode 100644 index 000000000000..e3214639530b --- /dev/null +++ b/sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_resource_skus_operations.py @@ -0,0 +1,118 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ResourceSkusOperations(object): + """ResourceSkusOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~storage_pool_management.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + location, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.ResourceSkuListResult"] + """Lists available StoragePool resources and skus in an Azure location. + + :param location: The location of the resource. + :type location: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either ResourceSkuListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~storage_pool_management.models.ResourceSkuListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.ResourceSkuListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-08-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'location': self._serialize.url("location", location, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('ResourceSkuListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.Error, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.StoragePool/locations/{location}/skus'} # type: ignore diff --git a/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md b/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md index 7d59c90de0fd..4b18d9fbb7d1 100644 --- a/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md +++ b/sdk/synapse/azure-mgmt-synapse/CHANGELOG.md @@ -1,5 +1,16 @@ # Release History +## 2.1.0b3 (2021-11-08) + +**Features** + + - Model EventHubDataConnection has a new parameter managed_identity_resource_id + - Added operation KustoPoolsOperations.list_skus + +**Breaking changes** + + - Removed operation group KustoPoolOperations + ## 2.1.0b2 (2021-10-09) **Features** diff --git a/sdk/synapse/azure-mgmt-synapse/_meta.json b/sdk/synapse/azure-mgmt-synapse/_meta.json index 7514e021aad9..4e05c5bd974c 100644 --- a/sdk/synapse/azure-mgmt-synapse/_meta.json +++ b/sdk/synapse/azure-mgmt-synapse/_meta.json @@ -4,7 +4,7 @@ "@autorest/python@5.8.4", "@autorest/modelerfour@4.19.2" ], - "commit": "f8aa8bcbac3d389a1ed5b9c77f1bcb6cc2074a7d", + "commit": "64b91c09704b103f1a98719300b47c413c75bbe3", "repository_url": "https://github.com/Azure/azure-rest-api-specs", "autorest_command": "autorest specification/synapse/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/synapse/resource-manager/readme.md" diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_metadata.json b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_metadata.json index ad699fc1ace1..6e44ec221b94 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_metadata.json +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_metadata.json @@ -163,7 +163,6 @@ "spark_configuration": "SparkConfigurationOperations", "spark_configurations": "SparkConfigurationsOperations", "kusto_operations": "KustoOperationsOperations", - "kusto_pool": "KustoPoolOperations", "kusto_pools": "KustoPoolsOperations", "kusto_pool_child_resource": "KustoPoolChildResourceOperations", "kusto_pool_attached_database_configurations": "KustoPoolAttachedDatabaseConfigurationsOperations", diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py index efe1591e66ae..caf430b509b7 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_synapse_management_client.py @@ -84,7 +84,6 @@ from .operations import SparkConfigurationOperations from .operations import SparkConfigurationsOperations from .operations import KustoOperationsOperations -from .operations import KustoPoolOperations from .operations import KustoPoolsOperations from .operations import KustoPoolChildResourceOperations from .operations import KustoPoolAttachedDatabaseConfigurationsOperations @@ -228,8 +227,6 @@ class SynapseManagementClient(object): :vartype spark_configurations: azure.mgmt.synapse.operations.SparkConfigurationsOperations :ivar kusto_operations: KustoOperationsOperations operations :vartype kusto_operations: azure.mgmt.synapse.operations.KustoOperationsOperations - :ivar kusto_pool: KustoPoolOperations operations - :vartype kusto_pool: azure.mgmt.synapse.operations.KustoPoolOperations :ivar kusto_pools: KustoPoolsOperations operations :vartype kusto_pools: azure.mgmt.synapse.operations.KustoPoolsOperations :ivar kusto_pool_child_resource: KustoPoolChildResourceOperations operations @@ -400,8 +397,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.kusto_operations = KustoOperationsOperations( self._client, self._config, self._serialize, self._deserialize) - self.kusto_pool = KustoPoolOperations( - self._client, self._config, self._serialize, self._deserialize) self.kusto_pools = KustoPoolsOperations( self._client, self._config, self._serialize, self._deserialize) self.kusto_pool_child_resource = KustoPoolChildResourceOperations( diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_version.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_version.py index b2fff948b5bb..fdff35f9fc38 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_version.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.1.0b2" +VERSION = "2.1.0b3" diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_synapse_management_client.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_synapse_management_client.py index 30cf57d4f486..6bf1df182f5a 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_synapse_management_client.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/_synapse_management_client.py @@ -82,7 +82,6 @@ from .operations import SparkConfigurationOperations from .operations import SparkConfigurationsOperations from .operations import KustoOperationsOperations -from .operations import KustoPoolOperations from .operations import KustoPoolsOperations from .operations import KustoPoolChildResourceOperations from .operations import KustoPoolAttachedDatabaseConfigurationsOperations @@ -226,8 +225,6 @@ class SynapseManagementClient(object): :vartype spark_configurations: azure.mgmt.synapse.aio.operations.SparkConfigurationsOperations :ivar kusto_operations: KustoOperationsOperations operations :vartype kusto_operations: azure.mgmt.synapse.aio.operations.KustoOperationsOperations - :ivar kusto_pool: KustoPoolOperations operations - :vartype kusto_pool: azure.mgmt.synapse.aio.operations.KustoPoolOperations :ivar kusto_pools: KustoPoolsOperations operations :vartype kusto_pools: azure.mgmt.synapse.aio.operations.KustoPoolsOperations :ivar kusto_pool_child_resource: KustoPoolChildResourceOperations operations @@ -397,8 +394,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.kusto_operations = KustoOperationsOperations( self._client, self._config, self._serialize, self._deserialize) - self.kusto_pool = KustoPoolOperations( - self._client, self._config, self._serialize, self._deserialize) self.kusto_pools = KustoPoolsOperations( self._client, self._config, self._serialize, self._deserialize) self.kusto_pool_child_resource = KustoPoolChildResourceOperations( diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/__init__.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/__init__.py index 44b8ebef2ef3..4e5e7b165434 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/__init__.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/__init__.py @@ -71,7 +71,6 @@ from ._spark_configuration_operations import SparkConfigurationOperations from ._spark_configurations_operations import SparkConfigurationsOperations from ._kusto_operations_operations import KustoOperationsOperations -from ._kusto_pool_operations import KustoPoolOperations from ._kusto_pools_operations import KustoPoolsOperations from ._kusto_pool_child_resource_operations import KustoPoolChildResourceOperations from ._kusto_pool_attached_database_configurations_operations import KustoPoolAttachedDatabaseConfigurationsOperations @@ -146,7 +145,6 @@ 'SparkConfigurationOperations', 'SparkConfigurationsOperations', 'KustoOperationsOperations', - 'KustoPoolOperations', 'KustoPoolsOperations', 'KustoPoolChildResourceOperations', 'KustoPoolAttachedDatabaseConfigurationsOperations', diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pools_operations.py index cf1f5245cb23..0db7264d7864 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pools_operations.py @@ -43,6 +43,73 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config + def list_skus( + self, + **kwargs: Any + ) -> AsyncIterable["_models.SkuDescriptionList"]: + """Lists eligible SKUs for Kusto Pool resource. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SkuDescriptionList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.synapse.models.SkuDescriptionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('SkuDescriptionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/skus'} # type: ignore + async def check_name_availability( self, location: str, diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py index 4d2ba3db1eb2..30403b5065b1 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models.py @@ -2257,6 +2257,9 @@ class EventHubDataConnection(DataConnection): :ivar provisioning_state: The provisioned state of the resource. Possible values include: "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + :param managed_identity_resource_id: The resource ID of a managed identity (system or user + assigned) to be used to authenticate with event hub. + :type managed_identity_resource_id: str """ _validation = { @@ -2283,6 +2286,7 @@ class EventHubDataConnection(DataConnection): 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, 'compression': {'key': 'properties.compression', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'managed_identity_resource_id': {'key': 'properties.managedIdentityResourceId', 'type': 'str'}, } def __init__( @@ -2299,6 +2303,7 @@ def __init__( self.event_system_properties = kwargs.get('event_system_properties', None) self.compression = kwargs.get('compression', None) self.provisioning_state = None + self.managed_identity_resource_id = kwargs.get('managed_identity_resource_id', None) class ExtendedServerBlobAuditingPolicy(ProxyResource): diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py index 881fe9469108..d5ff5c616784 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/models/_models_py3.py @@ -2445,6 +2445,9 @@ class EventHubDataConnection(DataConnection): :ivar provisioning_state: The provisioned state of the resource. Possible values include: "Running", "Creating", "Deleting", "Succeeded", "Failed", "Moving", "Canceled". :vartype provisioning_state: str or ~azure.mgmt.synapse.models.ResourceProvisioningState + :param managed_identity_resource_id: The resource ID of a managed identity (system or user + assigned) to be used to authenticate with event hub. + :type managed_identity_resource_id: str """ _validation = { @@ -2471,6 +2474,7 @@ class EventHubDataConnection(DataConnection): 'event_system_properties': {'key': 'properties.eventSystemProperties', 'type': '[str]'}, 'compression': {'key': 'properties.compression', 'type': 'str'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'managed_identity_resource_id': {'key': 'properties.managedIdentityResourceId', 'type': 'str'}, } def __init__( @@ -2484,6 +2488,7 @@ def __init__( data_format: Optional[Union[str, "EventHubDataFormat"]] = None, event_system_properties: Optional[List[str]] = None, compression: Optional[Union[str, "Compression"]] = None, + managed_identity_resource_id: Optional[str] = None, **kwargs ): super(EventHubDataConnection, self).__init__(location=location, **kwargs) @@ -2496,6 +2501,7 @@ def __init__( self.event_system_properties = event_system_properties self.compression = compression self.provisioning_state = None + self.managed_identity_resource_id = managed_identity_resource_id class ExtendedServerBlobAuditingPolicy(ProxyResource): diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py index 44b8ebef2ef3..4e5e7b165434 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/__init__.py @@ -71,7 +71,6 @@ from ._spark_configuration_operations import SparkConfigurationOperations from ._spark_configurations_operations import SparkConfigurationsOperations from ._kusto_operations_operations import KustoOperationsOperations -from ._kusto_pool_operations import KustoPoolOperations from ._kusto_pools_operations import KustoPoolsOperations from ._kusto_pool_child_resource_operations import KustoPoolChildResourceOperations from ._kusto_pool_attached_database_configurations_operations import KustoPoolAttachedDatabaseConfigurationsOperations @@ -146,7 +145,6 @@ 'SparkConfigurationOperations', 'SparkConfigurationsOperations', 'KustoOperationsOperations', - 'KustoPoolOperations', 'KustoPoolsOperations', 'KustoPoolChildResourceOperations', 'KustoPoolAttachedDatabaseConfigurationsOperations', diff --git a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pools_operations.py b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pools_operations.py index 4b9075942848..d71307be4175 100644 --- a/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pools_operations.py +++ b/sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/operations/_kusto_pools_operations.py @@ -47,6 +47,74 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config + def list_skus( + self, + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.SkuDescriptionList"] + """Lists eligible SKUs for Kusto Pool resource. + + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either SkuDescriptionList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.synapse.models.SkuDescriptionList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuDescriptionList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-06-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('SkuDescriptionList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Synapse/skus'} # type: ignore + def check_name_availability( self, location, # type: str diff --git a/sdk/synapse/azure-synapse-accesscontrol/setup.py b/sdk/synapse/azure-synapse-accesscontrol/setup.py index 374016253dc9..610c8fbe2dbf 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/setup.py +++ b/sdk/synapse/azure-synapse-accesscontrol/setup.py @@ -84,7 +84,7 @@ install_requires=[ 'msrest>=0.5.0', 'azure-common~=1.1', - 'azure-core>=1.6.0,<2.0.0', + 'azure-core>=1.20.0,<2.0.0', ], extras_require={ ":python_version<'3.0'": ['azure-synapse-nspkg'], diff --git a/sdk/synapse/azure-synapse-artifacts/CHANGELOG.md b/sdk/synapse/azure-synapse-artifacts/CHANGELOG.md index 690612a583db..8ba620646962 100644 --- a/sdk/synapse/azure-synapse-artifacts/CHANGELOG.md +++ b/sdk/synapse/azure-synapse-artifacts/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 0.10.0 (Unreleased) +## 0.10.1 (Unreleased) ### Features Added @@ -12,6 +12,18 @@ - re-generated based on tag package-artifacts-composite-v1 +## 0.10.0 (2021-11-09) + +### Other Changes + +- Internal bugfixes (re-generated with latest generator) + +## 0.9.0 (2021-10-05) + +### Features Added + +- re-generated based on tag package-artifacts-composite-v1 + ## 0.8.0 (2021-08-10) - Updated API version to "2020-12-01" which is the default API version diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_artifacts_client.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_artifacts_client.py index 9eedec5137df..62e7a60fb6ec 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_artifacts_client.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_artifacts_client.py @@ -6,42 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from copy import deepcopy from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer +from . import models +from ._configuration import ArtifactsClientConfiguration +from .operations import BigDataPoolsOperations, DataFlowDebugSessionOperations, DataFlowOperations, DatasetOperations, IntegrationRuntimesOperations, KqlScriptOperations, KqlScriptsOperations, LibraryOperations, LinkedServiceOperations, NotebookOperationResultOperations, NotebookOperations, PipelineOperations, PipelineRunOperations, SparkConfigurationOperations, SparkJobDefinitionOperations, SqlPoolsOperations, SqlScriptOperations, TriggerOperations, TriggerRunOperations, WorkspaceGitRepoManagementOperations, WorkspaceOperations + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import ArtifactsClientConfiguration -from .operations import KqlScriptsOperations -from .operations import KqlScriptOperations -from .operations import SparkConfigurationOperations -from .operations import BigDataPoolsOperations -from .operations import DataFlowOperations -from .operations import DataFlowDebugSessionOperations -from .operations import DatasetOperations -from .operations import WorkspaceGitRepoManagementOperations -from .operations import IntegrationRuntimesOperations -from .operations import LibraryOperations -from .operations import LinkedServiceOperations -from .operations import NotebookOperations -from .operations import NotebookOperationResultOperations -from .operations import PipelineOperations -from .operations import PipelineRunOperations -from .operations import SparkJobDefinitionOperations -from .operations import SqlPoolsOperations -from .operations import SqlScriptOperations -from .operations import TriggerOperations -from .operations import TriggerRunOperations -from .operations import WorkspaceOperations -from . import models - + from azure.core.rest import HttpRequest, HttpResponse class ArtifactsClient(object): """ArtifactsClient. @@ -57,11 +37,13 @@ class ArtifactsClient(object): :ivar data_flow: DataFlowOperations operations :vartype data_flow: azure.synapse.artifacts.operations.DataFlowOperations :ivar data_flow_debug_session: DataFlowDebugSessionOperations operations - :vartype data_flow_debug_session: azure.synapse.artifacts.operations.DataFlowDebugSessionOperations + :vartype data_flow_debug_session: + azure.synapse.artifacts.operations.DataFlowDebugSessionOperations :ivar dataset: DatasetOperations operations :vartype dataset: azure.synapse.artifacts.operations.DatasetOperations :ivar workspace_git_repo_management: WorkspaceGitRepoManagementOperations operations - :vartype workspace_git_repo_management: azure.synapse.artifacts.operations.WorkspaceGitRepoManagementOperations + :vartype workspace_git_repo_management: + azure.synapse.artifacts.operations.WorkspaceGitRepoManagementOperations :ivar integration_runtimes: IntegrationRuntimesOperations operations :vartype integration_runtimes: azure.synapse.artifacts.operations.IntegrationRuntimesOperations :ivar library: LibraryOperations operations @@ -71,7 +53,8 @@ class ArtifactsClient(object): :ivar notebook: NotebookOperations operations :vartype notebook: azure.synapse.artifacts.operations.NotebookOperations :ivar notebook_operation_result: NotebookOperationResultOperations operations - :vartype notebook_operation_result: azure.synapse.artifacts.operations.NotebookOperationResultOperations + :vartype notebook_operation_result: + azure.synapse.artifacts.operations.NotebookOperationResultOperations :ivar pipeline: PipelineOperations operations :vartype pipeline: azure.synapse.artifacts.operations.PipelineOperations :ivar pipeline_run: PipelineRunOperations operations @@ -90,9 +73,11 @@ class ArtifactsClient(object): :vartype workspace: azure.synapse.artifacts.operations.WorkspaceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param endpoint: The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + :param endpoint: The workspace development endpoint, for example + https://myworkspace.dev.azuresynapse.net. :type endpoint: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( @@ -102,75 +87,67 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{endpoint}' - self._config = ArtifactsClientConfiguration(credential, endpoint, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + _base_url = '{endpoint}' + self._config = ArtifactsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) + self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) - - self.kql_scripts = KqlScriptsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.kql_script = KqlScriptOperations( - self._client, self._config, self._serialize, self._deserialize) - self.spark_configuration = SparkConfigurationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.big_data_pools = BigDataPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.data_flow = DataFlowOperations( - self._client, self._config, self._serialize, self._deserialize) - self.data_flow_debug_session = DataFlowDebugSessionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.dataset = DatasetOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workspace_git_repo_management = WorkspaceGitRepoManagementOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_runtimes = IntegrationRuntimesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.library = LibraryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.linked_service = LinkedServiceOperations( - self._client, self._config, self._serialize, self._deserialize) - self.notebook = NotebookOperations( - self._client, self._config, self._serialize, self._deserialize) - self.notebook_operation_result = NotebookOperationResultOperations( - self._client, self._config, self._serialize, self._deserialize) - self.pipeline = PipelineOperations( - self._client, self._config, self._serialize, self._deserialize) - self.pipeline_run = PipelineRunOperations( - self._client, self._config, self._serialize, self._deserialize) - self.spark_job_definition = SparkJobDefinitionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.sql_pools = SqlPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.sql_script = SqlScriptOperations( - self._client, self._config, self._serialize, self._deserialize) - self.trigger = TriggerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.trigger_run = TriggerRunOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workspace = WorkspaceOperations( - self._client, self._config, self._serialize, self._deserialize) - - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse + self._serialize.client_side_validation = False + self.kql_scripts = KqlScriptsOperations(self._client, self._config, self._serialize, self._deserialize) + self.kql_script = KqlScriptOperations(self._client, self._config, self._serialize, self._deserialize) + self.spark_configuration = SparkConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) + self.big_data_pools = BigDataPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_flow = DataFlowOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_flow_debug_session = DataFlowDebugSessionOperations(self._client, self._config, self._serialize, self._deserialize) + self.dataset = DatasetOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_git_repo_management = WorkspaceGitRepoManagementOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_runtimes = IntegrationRuntimesOperations(self._client, self._config, self._serialize, self._deserialize) + self.library = LibraryOperations(self._client, self._config, self._serialize, self._deserialize) + self.linked_service = LinkedServiceOperations(self._client, self._config, self._serialize, self._deserialize) + self.notebook = NotebookOperations(self._client, self._config, self._serialize, self._deserialize) + self.notebook_operation_result = NotebookOperationResultOperations(self._client, self._config, self._serialize, self._deserialize) + self.pipeline = PipelineOperations(self._client, self._config, self._serialize, self._deserialize) + self.pipeline_run = PipelineRunOperations(self._client, self._config, self._serialize, self._deserialize) + self.spark_job_definition = SparkJobDefinitionOperations(self._client, self._config, self._serialize, self._deserialize) + self.sql_pools = SqlPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.sql_script = SqlScriptOperations(self._client, self._config, self._serialize, self._deserialize) + self.trigger = TriggerOperations(self._client, self._config, self._serialize, self._deserialize) + self.trigger_run = TriggerRunOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace = WorkspaceOperations(self._client, self._config, self._serialize, self._deserialize) + + + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.HttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_configuration.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_configuration.py index eac5385e6a35..5446152c5a99 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_configuration.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_configuration.py @@ -39,11 +39,11 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None + super(ArtifactsClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") - super(ArtifactsClientConfiguration, self).__init__(**kwargs) self.credential = credential self.endpoint = endpoint diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_vendor.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_version.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_version.py index 3be5a009b42a..d74f5e34a125 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_version.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "0.10.0" +VERSION = "0.10.1" diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/__init__.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/__init__.py index 16f882fa0a48..0a8d3bc734b7 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/__init__.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/__init__.py @@ -8,3 +8,9 @@ from ._artifacts_client import ArtifactsClient __all__ = ['ArtifactsClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_artifacts_client.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_artifacts_client.py index 8e674570b855..b682aff5cb96 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_artifacts_client.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_artifacts_client.py @@ -6,42 +6,22 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from msrest import Deserializer, Serializer +from .. import models +from ._configuration import ArtifactsClientConfiguration +from .operations import BigDataPoolsOperations, DataFlowDebugSessionOperations, DataFlowOperations, DatasetOperations, IntegrationRuntimesOperations, KqlScriptOperations, KqlScriptsOperations, LibraryOperations, LinkedServiceOperations, NotebookOperationResultOperations, NotebookOperations, PipelineOperations, PipelineRunOperations, SparkConfigurationOperations, SparkJobDefinitionOperations, SqlPoolsOperations, SqlScriptOperations, TriggerOperations, TriggerRunOperations, WorkspaceGitRepoManagementOperations, WorkspaceOperations + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration import ArtifactsClientConfiguration -from .operations import KqlScriptsOperations -from .operations import KqlScriptOperations -from .operations import SparkConfigurationOperations -from .operations import BigDataPoolsOperations -from .operations import DataFlowOperations -from .operations import DataFlowDebugSessionOperations -from .operations import DatasetOperations -from .operations import WorkspaceGitRepoManagementOperations -from .operations import IntegrationRuntimesOperations -from .operations import LibraryOperations -from .operations import LinkedServiceOperations -from .operations import NotebookOperations -from .operations import NotebookOperationResultOperations -from .operations import PipelineOperations -from .operations import PipelineRunOperations -from .operations import SparkJobDefinitionOperations -from .operations import SqlPoolsOperations -from .operations import SqlScriptOperations -from .operations import TriggerOperations -from .operations import TriggerRunOperations -from .operations import WorkspaceOperations -from .. import models - - -class ArtifactsClient(object): +class ArtifactsClient: """ArtifactsClient. :ivar kql_scripts: KqlScriptsOperations operations @@ -49,19 +29,23 @@ class ArtifactsClient(object): :ivar kql_script: KqlScriptOperations operations :vartype kql_script: azure.synapse.artifacts.aio.operations.KqlScriptOperations :ivar spark_configuration: SparkConfigurationOperations operations - :vartype spark_configuration: azure.synapse.artifacts.aio.operations.SparkConfigurationOperations + :vartype spark_configuration: + azure.synapse.artifacts.aio.operations.SparkConfigurationOperations :ivar big_data_pools: BigDataPoolsOperations operations :vartype big_data_pools: azure.synapse.artifacts.aio.operations.BigDataPoolsOperations :ivar data_flow: DataFlowOperations operations :vartype data_flow: azure.synapse.artifacts.aio.operations.DataFlowOperations :ivar data_flow_debug_session: DataFlowDebugSessionOperations operations - :vartype data_flow_debug_session: azure.synapse.artifacts.aio.operations.DataFlowDebugSessionOperations + :vartype data_flow_debug_session: + azure.synapse.artifacts.aio.operations.DataFlowDebugSessionOperations :ivar dataset: DatasetOperations operations :vartype dataset: azure.synapse.artifacts.aio.operations.DatasetOperations :ivar workspace_git_repo_management: WorkspaceGitRepoManagementOperations operations - :vartype workspace_git_repo_management: azure.synapse.artifacts.aio.operations.WorkspaceGitRepoManagementOperations + :vartype workspace_git_repo_management: + azure.synapse.artifacts.aio.operations.WorkspaceGitRepoManagementOperations :ivar integration_runtimes: IntegrationRuntimesOperations operations - :vartype integration_runtimes: azure.synapse.artifacts.aio.operations.IntegrationRuntimesOperations + :vartype integration_runtimes: + azure.synapse.artifacts.aio.operations.IntegrationRuntimesOperations :ivar library: LibraryOperations operations :vartype library: azure.synapse.artifacts.aio.operations.LibraryOperations :ivar linked_service: LinkedServiceOperations operations @@ -69,13 +53,15 @@ class ArtifactsClient(object): :ivar notebook: NotebookOperations operations :vartype notebook: azure.synapse.artifacts.aio.operations.NotebookOperations :ivar notebook_operation_result: NotebookOperationResultOperations operations - :vartype notebook_operation_result: azure.synapse.artifacts.aio.operations.NotebookOperationResultOperations + :vartype notebook_operation_result: + azure.synapse.artifacts.aio.operations.NotebookOperationResultOperations :ivar pipeline: PipelineOperations operations :vartype pipeline: azure.synapse.artifacts.aio.operations.PipelineOperations :ivar pipeline_run: PipelineRunOperations operations :vartype pipeline_run: azure.synapse.artifacts.aio.operations.PipelineRunOperations :ivar spark_job_definition: SparkJobDefinitionOperations operations - :vartype spark_job_definition: azure.synapse.artifacts.aio.operations.SparkJobDefinitionOperations + :vartype spark_job_definition: + azure.synapse.artifacts.aio.operations.SparkJobDefinitionOperations :ivar sql_pools: SqlPoolsOperations operations :vartype sql_pools: azure.synapse.artifacts.aio.operations.SqlPoolsOperations :ivar sql_script: SqlScriptOperations operations @@ -88,9 +74,11 @@ class ArtifactsClient(object): :vartype workspace: azure.synapse.artifacts.aio.operations.WorkspaceOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param endpoint: The workspace development endpoint, for example https://myworkspace.dev.azuresynapse.net. + :param endpoint: The workspace development endpoint, for example + https://myworkspace.dev.azuresynapse.net. :type endpoint: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( @@ -99,74 +87,66 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: - base_url = '{endpoint}' - self._config = ArtifactsClientConfiguration(credential, endpoint, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + _base_url = '{endpoint}' + self._config = ArtifactsClientConfiguration(credential=credential, endpoint=endpoint, **kwargs) + self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False + self.kql_scripts = KqlScriptsOperations(self._client, self._config, self._serialize, self._deserialize) + self.kql_script = KqlScriptOperations(self._client, self._config, self._serialize, self._deserialize) + self.spark_configuration = SparkConfigurationOperations(self._client, self._config, self._serialize, self._deserialize) + self.big_data_pools = BigDataPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_flow = DataFlowOperations(self._client, self._config, self._serialize, self._deserialize) + self.data_flow_debug_session = DataFlowDebugSessionOperations(self._client, self._config, self._serialize, self._deserialize) + self.dataset = DatasetOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace_git_repo_management = WorkspaceGitRepoManagementOperations(self._client, self._config, self._serialize, self._deserialize) + self.integration_runtimes = IntegrationRuntimesOperations(self._client, self._config, self._serialize, self._deserialize) + self.library = LibraryOperations(self._client, self._config, self._serialize, self._deserialize) + self.linked_service = LinkedServiceOperations(self._client, self._config, self._serialize, self._deserialize) + self.notebook = NotebookOperations(self._client, self._config, self._serialize, self._deserialize) + self.notebook_operation_result = NotebookOperationResultOperations(self._client, self._config, self._serialize, self._deserialize) + self.pipeline = PipelineOperations(self._client, self._config, self._serialize, self._deserialize) + self.pipeline_run = PipelineRunOperations(self._client, self._config, self._serialize, self._deserialize) + self.spark_job_definition = SparkJobDefinitionOperations(self._client, self._config, self._serialize, self._deserialize) + self.sql_pools = SqlPoolsOperations(self._client, self._config, self._serialize, self._deserialize) + self.sql_script = SqlScriptOperations(self._client, self._config, self._serialize, self._deserialize) + self.trigger = TriggerOperations(self._client, self._config, self._serialize, self._deserialize) + self.trigger_run = TriggerRunOperations(self._client, self._config, self._serialize, self._deserialize) + self.workspace = WorkspaceOperations(self._client, self._config, self._serialize, self._deserialize) + - self.kql_scripts = KqlScriptsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.kql_script = KqlScriptOperations( - self._client, self._config, self._serialize, self._deserialize) - self.spark_configuration = SparkConfigurationOperations( - self._client, self._config, self._serialize, self._deserialize) - self.big_data_pools = BigDataPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.data_flow = DataFlowOperations( - self._client, self._config, self._serialize, self._deserialize) - self.data_flow_debug_session = DataFlowDebugSessionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.dataset = DatasetOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workspace_git_repo_management = WorkspaceGitRepoManagementOperations( - self._client, self._config, self._serialize, self._deserialize) - self.integration_runtimes = IntegrationRuntimesOperations( - self._client, self._config, self._serialize, self._deserialize) - self.library = LibraryOperations( - self._client, self._config, self._serialize, self._deserialize) - self.linked_service = LinkedServiceOperations( - self._client, self._config, self._serialize, self._deserialize) - self.notebook = NotebookOperations( - self._client, self._config, self._serialize, self._deserialize) - self.notebook_operation_result = NotebookOperationResultOperations( - self._client, self._config, self._serialize, self._deserialize) - self.pipeline = PipelineOperations( - self._client, self._config, self._serialize, self._deserialize) - self.pipeline_run = PipelineRunOperations( - self._client, self._config, self._serialize, self._deserialize) - self.spark_job_definition = SparkJobDefinitionOperations( - self._client, self._config, self._serialize, self._deserialize) - self.sql_pools = SqlPoolsOperations( - self._client, self._config, self._serialize, self._deserialize) - self.sql_script = SqlScriptOperations( - self._client, self._config, self._serialize, self._deserialize) - self.trigger = TriggerOperations( - self._client, self._config, self._serialize, self._deserialize) - self.trigger_run = TriggerRunOperations( - self._client, self._config, self._serialize, self._deserialize) - self.workspace = WorkspaceOperations( - self._client, self._config, self._serialize, self._deserialize) - - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.AsyncHttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) async def close(self) -> None: await self._client.close() diff --git a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_configuration.py b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_configuration.py index 0d67f9417b72..4fff8c3aa947 100644 --- a/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_configuration.py +++ b/sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/aio/_configuration.py @@ -36,11 +36,11 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: + super(ArtifactsClientConfiguration, self).__init__(**kwargs) if credential is None: raise ValueError("Parameter 'credential' must not be None.") if endpoint is None: raise ValueError("Parameter 'endpoint' must not be None.") - super(ArtifactsClientConfiguration, self).__init__(**kwargs) self.credential = credential self.endpoint = endpoint diff --git a/sdk/synapse/azure-synapse-artifacts/setup.py b/sdk/synapse/azure-synapse-artifacts/setup.py index 5b77e11d2441..64addfac8608 100644 --- a/sdk/synapse/azure-synapse-artifacts/setup.py +++ b/sdk/synapse/azure-synapse-artifacts/setup.py @@ -62,7 +62,7 @@ author_email='azpysdkhelp@microsoft.com', url='https://github.com/Azure/azure-sdk-for-python', classifiers=[ - 'Development Status :: 4 - Beta', + "Development Status :: 5 - Production/Stable", 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', @@ -84,7 +84,7 @@ install_requires=[ 'msrest>=0.5.0', 'azure-common~=1.1', - 'azure-core>=1.6.0,<2.0.0', + 'azure-core>=1.20.0,<2.0.0', ], extras_require={ ":python_version<'3.0'": ['azure-synapse-nspkg'], diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/README.md b/sdk/synapse/azure-synapse-managedprivateendpoints/README.md index b122d3f58af7..19bab0dbf4f9 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/README.md +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/README.md @@ -4,20 +4,18 @@ This is the Microsoft Azure Synapse Managed Private Endpoints Client Library. This package has been tested with Python 2.7, 3.6, 3.7, 3.8 and 3.9. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). +## _Disclaimer_ -# Usage - - +_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ +# Usage For code examples, see [Synapse Managed Private Endpoints](https://docs.microsoft.com/python/api/overview/azure/) on docs.microsoft.com. - # Provide Feedback If you encounter any bugs or have suggestions, please file an issue in the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. - ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-synapse-managedprivateendpoints%2FREADME.png) diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py b/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py index 53a54ff28128..b395fbfdc469 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py @@ -71,6 +71,7 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'License :: OSI Approved :: MIT License', ], zip_safe=False, @@ -83,7 +84,7 @@ install_requires=[ 'msrest>=0.5.0', 'azure-common~=1.1', - 'azure-core>=1.6.0,<2.0.0', + 'azure-core>=1.20.0,<2.0.0', ], extras_require={ ":python_version<'3.0'": ['azure-synapse-nspkg'], diff --git a/sdk/synapse/azure-synapse-monitoring/setup.py b/sdk/synapse/azure-synapse-monitoring/setup.py index 69b9ea42975a..67b841d55d87 100644 --- a/sdk/synapse/azure-synapse-monitoring/setup.py +++ b/sdk/synapse/azure-synapse-monitoring/setup.py @@ -84,7 +84,7 @@ install_requires=[ 'msrest>=0.5.0', 'azure-common~=1.1', - 'azure-core>=1.6.0,<2.0.0', + 'azure-core>=1.20.0,<2.0.0', ], extras_require={ ":python_version<'3.0'": ['azure-synapse-nspkg'], diff --git a/sdk/synapse/azure-synapse-spark/CHANGELOG.md b/sdk/synapse/azure-synapse-spark/CHANGELOG.md index 52cd26085aef..cdd00dd688da 100644 --- a/sdk/synapse/azure-synapse-spark/CHANGELOG.md +++ b/sdk/synapse/azure-synapse-spark/CHANGELOG.md @@ -12,6 +12,12 @@ - Added `LivyStatementStates` and `LivyStates` +## 0.7.0 (2021-10-05) + +### Features Added + +- Added `LivyStatementStates` and `LivyStates` + ## 0.6.0 (2021-08-10) - Updated API version to "2020-12-01" diff --git a/sdk/synapse/azure-synapse-spark/setup.py b/sdk/synapse/azure-synapse-spark/setup.py index 7953222cddce..d2106bae1aac 100644 --- a/sdk/synapse/azure-synapse-spark/setup.py +++ b/sdk/synapse/azure-synapse-spark/setup.py @@ -84,7 +84,7 @@ install_requires=[ 'msrest>=0.5.0', 'azure-common~=1.1', - 'azure-core>=1.6.0,<2.0.0', + 'azure-core>=1.20.0,<2.0.0', ], extras_require={ ":python_version<'3.0'": ['azure-synapse-nspkg'], diff --git a/sdk/tables/azure-data-tables/CHANGELOG.md b/sdk/tables/azure-data-tables/CHANGELOG.md index a10e7f5d0c82..f269a6cb16d3 100644 --- a/sdk/tables/azure-data-tables/CHANGELOG.md +++ b/sdk/tables/azure-data-tables/CHANGELOG.md @@ -1,15 +1,32 @@ # Release History -## 12.1.1 (2021-09-08) +## 12.2.1 (Unreleased) + +### Features Added + +### Breaking Changes ### Bugs Fixed -- Resolved bug where strings couldn't be used instead of enum value for entity Update Mode (#20247). -- Resolved bug where single quote characters in Partition and Row keys were not escaped correctly (#20301). +### Other Changes + +## 12.2.0 (2021-11-10) + +**Warning** This release involves a bug fix that may change the behaviour for some users. Partition and Row keys that contain a single quote character (`'`) will now be automatically escaped for upsert, update and delete entity operations. Partition and Row keys that were already escaped, or contained duplicate single quote char (`''`) will now be treated as unescaped values. + + +### Bugs Fixed + +* Resolved bug where strings couldn't be used instead of enum value for entity Update Mode (#20247). +* Resolved bug where single quote characters in Partition and Row keys were not escaped correctly (#20301). + +### Features Added + +* Added support for async iterators in `aio.TableClient.submit_transaction (#21083, thank you yashbhutoria). ### Other Changes -- Bumped dependency on `msrest` to `>=0.6.21` +* Bumped dependency on `msrest` to `>=0.6.21` ## 12.1.0 (2021-07-06) @@ -32,7 +49,7 @@ * Fixed support for Cosmos emulator endpoint, via URL/credential or connection string. * Fixed table name from URL parsing in `TableClient.from_table_url` classmethod. * The `account_name` attribute on clients will now be pulled from an `AzureNamedKeyCredential` if used. -* Any additional odata metadata is returned in entitys metadata. +* Any additional odata metadata is returned in entity's metadata. * The timestamp in entity metadata is now deserialized to a timestamp. * If the `prefer` header is added in the `create_entity` operation, the echo will be returned. * Errors raised on a 412 if-not-match error will now be a specific `azure.core.exceptions.ResourceModifiedError`. diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_batch.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_batch.py index f9aec1cfe4b5..741795d33a7a 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_batch.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_batch.py @@ -10,13 +10,14 @@ Dict, Mapping, Optional, - List + List, + Tuple ) from azure.core import MatchConditions from ._common_conversion import _transform_patch_to_cosmos_post -from ._models import UpdateMode +from ._models import UpdateMode, TransactionOperation from ._serialize import _get_match_headers, _add_entity_properties, _prepare_key from ._entity import TableEntity @@ -26,8 +27,10 @@ from ._generated import models, AzureTable from ._generated._configuration import AzureTableConfiguration -EntityType = Union[TableEntity, Mapping[str, Any]] +EntityType = Union[TableEntity, Mapping[str, Any]] +OperationType = Union[TransactionOperation, str] +TransactionOperationType = Union[Tuple[OperationType, EntityType], Tuple[OperationType, EntityType, Mapping[str, Any]]] class TableBatchOperations(object): @@ -91,6 +94,18 @@ def _verify_partition_key( elif entity["PartitionKey"] != self._partition_key: raise ValueError("Partition Keys must all be the same") + def add_operation(self, operation): + # type: (TransactionOperationType) -> None + """Add a single operation to a batch.""" + try: + operation_type, entity, kwargs = operation # type: ignore + except ValueError: + operation_type, entity, kwargs = operation[0], operation[1], {} # type: ignore + try: + getattr(self, operation_type.lower())(entity, **kwargs) + except AttributeError: + raise ValueError("Unrecognized operation: {}".format(operation)) + def create( self, entity, # type: EntityType diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py index 74370e179a95..7d41eed044cd 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_table_client.py @@ -5,7 +5,7 @@ # -------------------------------------------------------------------------- import functools -from typing import Optional, Any, TYPE_CHECKING, Union, List, Tuple, Dict, Mapping, Iterable, overload, cast +from typing import Optional, Any, TYPE_CHECKING, Union, List, Dict, Mapping, Iterable, overload, cast try: from urllib.parse import urlparse, unquote except ImportError: @@ -34,19 +34,14 @@ from ._base_client import parse_connection_str, TablesBaseClient from ._serialize import serialize_iso, _parameter_filter_substitution from ._deserialize import deserialize_iso, _return_headers_and_deserialized -from ._table_batch import TableBatchOperations +from ._table_batch import TableBatchOperations, EntityType, TransactionOperationType from ._models import ( TableEntityPropertiesPaged, UpdateMode, TableAccessPolicy, - TransactionOperation, TableItem ) -EntityType = Union[TableEntity, Mapping[str, Any]] -OperationType = Union[TransactionOperation, str] -TransactionOperationType = Union[Tuple[OperationType, EntityType], Tuple[OperationType, EntityType, Mapping[str, Any]]] - if TYPE_CHECKING: from azure.core.credentials import AzureNamedKeyCredential, AzureSasCredential @@ -691,10 +686,14 @@ def submit_transaction( If any one of these operations fails, the entire transaction will be rejected. - :param operations: The list of operations to commit in a transaction. This should be a list of + :param operations: The list of operations to commit in a transaction. This should be an iterable of tuples containing an operation name, the entity on which to operate, and optionally, a dict of additional - kwargs for that operation. - :type operations: Iterable[Tuple[str, EntityType]] + kwargs for that operation. For example:: + + - ('upsert', {'PartitionKey': 'A', 'RowKey': 'B'}) + - ('upsert', {'PartitionKey': 'A', 'RowKey': 'B'}, {'mode': UpdateMode.REPLACE}) + + :type operations: Iterable[Tuple[str, TableEntity, Mapping[str, Any]]] :return: A list of mappings with response metadata for each operation in the transaction. :rtype: List[Mapping[str, Any]] :raises: :class:`~azure.data.tables.TableTransactionError` @@ -717,13 +716,12 @@ def submit_transaction( is_cosmos_endpoint=self._cosmos_endpoint, **kwargs ) - for operation in operations: - try: - operation_kwargs = operation[2] # type: ignore - except IndexError: - operation_kwargs = {} - try: - getattr(batched_requests, operation[0].lower())(operation[1], **operation_kwargs) - except AttributeError: - raise ValueError("Unrecognized operation: {}".format(operation[0])) + try: + for operation in operations: + batched_requests.add_operation(operation) + except TypeError: + raise TypeError( + "The value of 'operations' must be an iterator " + "of Tuples. Please check documentation for correct Tuple format." + ) return self._batch_send(*batched_requests.requests, **kwargs) # type: ignore diff --git a/sdk/tables/azure-data-tables/azure/data/tables/_version.py b/sdk/tables/azure-data-tables/azure/data/tables/_version.py index 8a3a444714b3..c7e18b39cee7 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/_version.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/_version.py @@ -4,4 +4,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "12.1.1" +VERSION = "12.2.1" diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_batch_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_batch_async.py index 4e4627bf0a6f..a50f25c0e394 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_batch_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_batch_async.py @@ -11,7 +11,7 @@ from .._common_conversion import _transform_patch_to_cosmos_post from .._models import UpdateMode from .._entity import TableEntity -from .._table_batch import EntityType +from .._table_batch import EntityType, TransactionOperationType from .._serialize import ( _prepare_key, _get_match_headers, @@ -68,6 +68,17 @@ def _verify_partition_key( elif entity["PartitionKey"] != self._partition_key: raise ValueError("Partition Keys must all be the same") + def add_operation(self, operation: TransactionOperationType) -> None: + """Add a single operation to a batch.""" + try: + operation_type, entity, kwargs = operation # type: ignore + except ValueError: + operation_type, entity, kwargs = *operation, {} # type: ignore + try: + getattr(self, operation_type.lower())(entity, **kwargs) + except AttributeError: + raise ValueError("Unrecognized operation: {}".format(operation)) + def create( self, entity: EntityType, diff --git a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py index 7cb8637a3de2..0f8a5831656b 100644 --- a/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py +++ b/sdk/tables/azure-data-tables/azure/data/tables/aio/_table_client_async.py @@ -4,7 +4,7 @@ # license information. # -------------------------------------------------------------------------- import functools -from typing import List, Union, Any, Optional, Mapping, Iterable, Dict, overload, cast, TYPE_CHECKING +from typing import AsyncIterable, List, Union, Any, Optional, Mapping, Iterable, Dict, overload, cast, TYPE_CHECKING try: from urllib.parse import urlparse, unquote except ImportError: @@ -664,17 +664,24 @@ async def upsert_entity( @distributed_trace_async async def submit_transaction( self, - operations: Iterable[TransactionOperationType], + operations: Union[ + Iterable[TransactionOperationType], AsyncIterable[TransactionOperationType] + ], **kwargs ) -> List[Mapping[str, Any]]: """Commit a list of operations as a single transaction. If any one of these operations fails, the entire transaction will be rejected. - :param operations: The list of operations to commit in a transaction. This should be a list of - tuples containing an operation name, the entity on which to operate, and optionally, a dict of additional - kwargs for that operation. - :type operations: Iterable[Tuple[str, EntityType]] + :param operations: The list of operations to commit in a transaction. This should be an iterable + (or async iterable) of tuples containing an operation name, the entity on which to operate, + and optionally, a dict of additional kwargs for that operation. For example:: + + - ('upsert', {'PartitionKey': 'A', 'RowKey': 'B'}) + - ('upsert', {'PartitionKey': 'A', 'RowKey': 'B'}, {'mode': UpdateMode.REPLACE}) + + :type operations: + Union[Iterable[Tuple[str, Entity, Mapping[str, Any]]],AsyncIterable[Tuple[str, Entity, Mapping[str, Any]]]] :return: A list of mappings with response metadata for each operation in the transaction. :rtype: List[Mapping[str, Any]] :raises ~azure.data.tables.TableTransactionError: @@ -697,13 +704,17 @@ async def submit_transaction( is_cosmos_endpoint=self._cosmos_endpoint, **kwargs ) - for operation in operations: - try: - operation_kwargs = operation[2] # type: ignore - except IndexError: - operation_kwargs = {} + try: + for operation in operations: # type: ignore + batched_requests.add_operation(operation) + except TypeError: try: - getattr(batched_requests, operation[0].lower())(operation[1], **operation_kwargs) - except AttributeError: - raise ValueError("Unrecognized operation: {}".format(operation)) + async for operation in operations: # type: ignore + batched_requests.add_operation(operation) + except TypeError: + raise TypeError( + "The value of 'operations' must be an iterator or async iterator " + "of Tuples. Please check documentation for correct Tuple format." + ) + return await self._batch_send(*batched_requests.requests, **kwargs) diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_batch_async.test_async_batch_inserts.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_batch_async.test_async_batch_inserts.yaml new file mode 100644 index 000000000000..2b512eba4c26 --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_batch_async.test_async_batch_inserts.yaml @@ -0,0 +1,272 @@ +interactions: +- request: + body: '{"TableName": "uttablecb451339"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Fri, 08 Oct 2021 18:56:51 GMT + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:51 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables/@Element","TableName":"uttablecb451339"}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Fri, 08 Oct 2021 18:56:51 GMT + location: https://fake_table_account.table.core.windows.net/Tables('uttablecb451339') + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 201 + message: Created + url: https://pytestremote.table.core.windows.net/Tables +- request: + body: "--batch_d48048fb-c6db-468a-805a-2e864a6486e5\r\nContent-Type: multipart/mixed; + boundary=changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\n\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 0\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='0') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"0\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 1\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='1') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"1\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 2\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='2') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"2\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 3\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='3') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"3\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 4\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='4') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"4\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 5\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='5') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"5\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 6\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='6') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"6\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 7\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='7') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"7\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 8\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='8') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"8\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 9\r\n\r\nPATCH + https://pytestremote.table.core.windows.net/uttablecb451339(PartitionKey='async_inserts',RowKey='9') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nx-ms-date: + Fri, 08 Oct 2021 18:56:52 GMT\r\nDate: Fri, 08 Oct 2021 18:56:52 GMT\r\n\r\n{\"PartitionKey\": + \"async_inserts\", \"PartitionKey@odata.type\": \"Edm.String\", \"RowKey\": + \"9\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_a6adc80e-f301-4abc-b710-1dd92a2dcdd7--\r\n\r\n--batch_d48048fb-c6db-468a-805a-2e864a6486e5--\r\n" + headers: + Accept: + - application/json + Content-Length: + - '6118' + Content-Type: + - multipart/mixed; boundary=batch_d48048fb-c6db-468a-805a-2e864a6486e5 + DataServiceVersion: + - '3.0' + Date: + - Fri, 08 Oct 2021 18:56:52 GMT + MaxDataServiceVersion: + - 3.0;NetFx + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:52 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_table_account.table.core.windows.net/$batch + response: + body: + string: "--batchresponse_0ef921de-4c6e-4050-8e79-ec6bbe9b0843\r\nContent-Type: + multipart/mixed; boundary=changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0795449Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0795449Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0795449Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0795449Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0795449Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0805457Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0805457Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0805457Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0805457Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\n\r\nHTTP/1.1 204 + No Content\r\nX-Content-Type-Options: nosniff\r\nCache-Control: no-cache\r\nDataServiceVersion: + 1.0;\r\nETag: W/\"datetime'2021-10-08T18%3A56%3A52.0805457Z'\"\r\n\r\n\r\n--changesetresponse_808d1535-a83f-498f-8fd8-5834043c7e3b--\r\n--batchresponse_0ef921de-4c6e-4050-8e79-ec6bbe9b0843--\r\n" + headers: + cache-control: no-cache + content-type: multipart/mixed; boundary=batchresponse_0ef921de-4c6e-4050-8e79-ec6bbe9b0843 + date: Fri, 08 Oct 2021 18:56:51 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 202 + message: Accepted + url: https://pytestremote.table.core.windows.net/$batch +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Fri, 08 Oct 2021 18:56:52 GMT + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:52 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/uttablecb451339()?$filter=PartitionKey%20eq%20'async_inserts' + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#uttablecb451339","value":[{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0795449Z''\"","PartitionKey":"async_inserts","RowKey":"0","Timestamp":"2021-10-08T18:56:52.0795449Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0795449Z''\"","PartitionKey":"async_inserts","RowKey":"1","Timestamp":"2021-10-08T18:56:52.0795449Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0795449Z''\"","PartitionKey":"async_inserts","RowKey":"2","Timestamp":"2021-10-08T18:56:52.0795449Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0795449Z''\"","PartitionKey":"async_inserts","RowKey":"3","Timestamp":"2021-10-08T18:56:52.0795449Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0795449Z''\"","PartitionKey":"async_inserts","RowKey":"4","Timestamp":"2021-10-08T18:56:52.0795449Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0805457Z''\"","PartitionKey":"async_inserts","RowKey":"5","Timestamp":"2021-10-08T18:56:52.0805457Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0805457Z''\"","PartitionKey":"async_inserts","RowKey":"6","Timestamp":"2021-10-08T18:56:52.0805457Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0805457Z''\"","PartitionKey":"async_inserts","RowKey":"7","Timestamp":"2021-10-08T18:56:52.0805457Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0805457Z''\"","PartitionKey":"async_inserts","RowKey":"8","Timestamp":"2021-10-08T18:56:52.0805457Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A52.0805457Z''\"","PartitionKey":"async_inserts","RowKey":"9","Timestamp":"2021-10-08T18:56:52.0805457Z"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Fri, 08 Oct 2021 18:56:51 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pytestremote.table.core.windows.net/uttablecb451339()?$filter=PartitionKey%20eq%20'async_inserts' +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Fri, 08 Oct 2021 18:56:52 GMT + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:52 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_table_account.table.core.windows.net/Tables + response: + body: + string: '{"odata.metadata":"https://fake_table_account.table.core.windows.net/$metadata#Tables","value":[{"TableName":"uttablecb451339"}]}' + headers: + cache-control: no-cache + content-type: application/json;odata=minimalmetadata;streaming=true;charset=utf-8 + date: Fri, 08 Oct 2021 18:56:51 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + transfer-encoding: chunked + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 200 + message: OK + url: https://pytestremote.table.core.windows.net/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Fri, 08 Oct 2021 18:56:52 GMT + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:52 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_table_account.table.core.windows.net/Tables('uttablecb451339') + response: + body: + string: '' + headers: + cache-control: no-cache + content-length: '0' + date: Fri, 08 Oct 2021 18:56:52 GMT + server: Windows-Azure-Table/1.0 Microsoft-HTTPAPI/2.0 + x-content-type-options: nosniff + x-ms-version: '2019-02-02' + status: + code: 204 + message: No Content + url: https://pytestremote.table.core.windows.net/Tables('uttablecb451339') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/recordings/test_table_batch_cosmos_async.test_async_batch_inserts.yaml b/sdk/tables/azure-data-tables/tests/recordings/test_table_batch_cosmos_async.test_async_batch_inserts.yaml new file mode 100644 index 000000000000..66263609dafc --- /dev/null +++ b/sdk/tables/azure-data-tables/tests/recordings/test_table_batch_cosmos_async.test_async_batch_inserts.yaml @@ -0,0 +1,252 @@ +interactions: +- request: + body: '{"TableName": "uttable5ffa162c"}' + headers: + Accept: + - application/json;odata=minimalmetadata + Content-Length: + - '32' + Content-Type: + - application/json;odata=nometadata + DataServiceVersion: + - '3.0' + Date: + - Fri, 08 Oct 2021 18:56:52 GMT + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:52 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_cosmos_account.table.cosmos.azure.com/Tables + response: + body: + string: '{"TableName":"uttable5ffa162c","odata.metadata":"https://fake_cosmos_account.table.cosmos.azure.com/$metadata#Tables/@Element"}' + headers: + content-type: application/json;odata=minimalmetadata + date: Fri, 08 Oct 2021 18:56:53 GMT + etag: W/"datetime'2021-10-08T18%3A56%3A53.3285895Z'" + location: https://fake_cosmos_account.table.cosmos.azure.com/Tables('uttable5ffa162c') + transfer-encoding: chunked + status: + code: 201 + message: Ok + url: https://pytables3.table.cosmos.azure.com/Tables +- request: + body: "--batch_d4e6ff69-6b3e-4f7f-b872-3e0a5aa70054\r\nContent-Type: multipart/mixed; + boundary=changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\n\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 0\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='0') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"0\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 1\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='1') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"1\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 2\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='2') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"2\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 3\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='3') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"3\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 4\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='4') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"4\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 5\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='5') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"5\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 6\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='6') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"6\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 7\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='7') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"7\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 8\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='8') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"8\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8\r\nContent-Type: + application/http\r\nContent-Transfer-Encoding: binary\r\nContent-ID: 9\r\n\r\nPOST + https://pytables3.table.cosmos.azure.com/uttable5ffa162c(PartitionKey='async_inserts',RowKey='9') + HTTP/1.1\r\nx-ms-version: 2019-02-02\r\nDataServiceVersion: 3.0\r\nContent-Type: + application/json\r\nAccept: application/json\r\nContent-Length: 124\r\nX-HTTP-Method: + MERGE\r\nx-ms-date: Fri, 08 Oct 2021 18:56:53 GMT\r\nDate: Fri, 08 Oct 2021 + 18:56:53 GMT\r\n\r\n{\"PartitionKey\": \"async_inserts\", \"PartitionKey@odata.type\": + \"Edm.String\", \"RowKey\": \"9\", \"RowKey@odata.type\": \"Edm.String\"}\r\n--changeset_dc382a3e-6ffd-492d-8317-878ef05160a8--\r\n\r\n--batch_d4e6ff69-6b3e-4f7f-b872-3e0a5aa70054--\r\n" + headers: + Accept: + - application/json + Content-Length: + - '6298' + Content-Type: + - multipart/mixed; boundary=batch_d4e6ff69-6b3e-4f7f-b872-3e0a5aa70054 + DataServiceVersion: + - '3.0' + Date: + - Fri, 08 Oct 2021 18:56:53 GMT + MaxDataServiceVersion: + - 3.0;NetFx + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:53 GMT + x-ms-version: + - '2019-02-02' + method: POST + uri: https://fake_cosmos_account.table.cosmos.azure.com/$batch + response: + body: + string: "--batchresponse_2b3192e8-8c4a-4489-87d8-d0614573973e\r\nContent-Type: + multipart/mixed; boundary=changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0489735Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 1\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0494855Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 2\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0497927Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 3\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0500999Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 4\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0505095Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 5\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0508167Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 6\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0511239Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 7\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0514311Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 8\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0517383Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 9\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b\nContent-Type: + application/http\nContent-Transfer-Encoding: binary\n\nHTTP/1.1 204 No Content\r\nETag: + W/\"datetime'2021-10-08T18%3A56%3A54.0520455Z'\"\r\nContent-Type: application/json\r\nContent-ID: + 10\r\n\r\n\r\n--changesetresponse_e6acda92-1276-42f7-9005-a81dc1f6698b--\n--batchresponse_2b3192e8-8c4a-4489-87d8-d0614573973e--\r\n" + headers: + content-type: multipart/mixed; boundary=batchresponse_2b3192e8-8c4a-4489-87d8-d0614573973e + date: Fri, 08 Oct 2021 18:56:53 GMT + transfer-encoding: chunked + status: + code: 202 + message: Accepted + url: https://pytables3.table.cosmos.azure.com/$batch +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Fri, 08 Oct 2021 18:56:54 GMT + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:54 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_cosmos_account.table.cosmos.azure.com/uttable5ffa162c()?$filter=PartitionKey%20eq%20'async_inserts' + response: + body: + string: '{"value":[{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0489735Z''\"","PartitionKey":"async_inserts","RowKey":"0","Timestamp":"2021-10-08T18:56:54.0489735Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0494855Z''\"","PartitionKey":"async_inserts","RowKey":"1","Timestamp":"2021-10-08T18:56:54.0494855Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0497927Z''\"","PartitionKey":"async_inserts","RowKey":"2","Timestamp":"2021-10-08T18:56:54.0497927Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0500999Z''\"","PartitionKey":"async_inserts","RowKey":"3","Timestamp":"2021-10-08T18:56:54.0500999Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0505095Z''\"","PartitionKey":"async_inserts","RowKey":"4","Timestamp":"2021-10-08T18:56:54.0505095Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0508167Z''\"","PartitionKey":"async_inserts","RowKey":"5","Timestamp":"2021-10-08T18:56:54.0508167Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0511239Z''\"","PartitionKey":"async_inserts","RowKey":"6","Timestamp":"2021-10-08T18:56:54.0511239Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0514311Z''\"","PartitionKey":"async_inserts","RowKey":"7","Timestamp":"2021-10-08T18:56:54.0514311Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0517383Z''\"","PartitionKey":"async_inserts","RowKey":"8","Timestamp":"2021-10-08T18:56:54.0517383Z"},{"odata.etag":"W/\"datetime''2021-10-08T18%3A56%3A54.0520455Z''\"","PartitionKey":"async_inserts","RowKey":"9","Timestamp":"2021-10-08T18:56:54.0520455Z"}],"odata.metadata":"https://fake_cosmos_account.table.cosmos.azure.com/$metadata#uttable5ffa162c"}' + headers: + content-type: application/json;odata=minimalmetadata + date: Fri, 08 Oct 2021 18:56:53 GMT + transfer-encoding: chunked + status: + code: 200 + message: Ok + url: https://pytables3.table.cosmos.azure.com/uttable5ffa162c()?$filter=PartitionKey%20eq%20'async_inserts' +- request: + body: null + headers: + Accept: + - application/json;odata=minimalmetadata + DataServiceVersion: + - '3.0' + Date: + - Fri, 08 Oct 2021 18:56:54 GMT + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:54 GMT + x-ms-version: + - '2019-02-02' + method: GET + uri: https://fake_cosmos_account.table.cosmos.azure.com/Tables + response: + body: + string: '{"value":[{"TableName":"uttable5ffa162c"}],"odata.metadata":"https://fake_cosmos_account.table.cosmos.azure.com/$metadata#Tables"}' + headers: + content-type: application/json;odata=minimalmetadata + date: Fri, 08 Oct 2021 18:56:53 GMT + transfer-encoding: chunked + status: + code: 200 + message: Ok + url: https://pytables3.table.cosmos.azure.com/Tables +- request: + body: null + headers: + Accept: + - application/json + Date: + - Fri, 08 Oct 2021 18:56:54 GMT + User-Agent: + - azsdk-python-data-tables/12.1.1 Python/3.7.4 (Windows-10-10.0.19041-SP0) + x-ms-date: + - Fri, 08 Oct 2021 18:56:54 GMT + x-ms-version: + - '2019-02-02' + method: DELETE + uri: https://fake_cosmos_account.table.cosmos.azure.com/Tables('uttable5ffa162c') + response: + body: + string: '' + headers: + date: Fri, 08 Oct 2021 18:56:54 GMT + status: + code: 204 + message: No Content + url: https://pytables3.table.cosmos.azure.com/Tables('uttable5ffa162c') +version: 1 diff --git a/sdk/tables/azure-data-tables/tests/test_table_batch_async.py b/sdk/tables/azure-data-tables/tests/test_table_batch_async.py index 72ef7640c636..390c781cc1f8 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_batch_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_batch_async.py @@ -750,3 +750,29 @@ async def test_batch_with_specialchar_partitionkey(self, tables_storage_account_ finally: await self._tear_down() + + @tables_decorator_async + async def test_async_batch_inserts(self, tables_storage_account_name, tables_primary_storage_account_key): + # Arrange + await self._set_up(tables_storage_account_name, tables_primary_storage_account_key) + try: + # Act + transaction_count = 10 + async def generate_entities(count): + for i in range(count): + yield ("upsert", {'PartitionKey': 'async_inserts', 'RowKey': str(i)}) + + batch = generate_entities(transaction_count) + transaction_result = await self.table.submit_transaction(batch) + + # Assert + self._assert_valid_batch_transaction(transaction_result, transaction_count) + assert 'etag' in transaction_result[0] + + entities = self.table.query_entities("PartitionKey eq 'async_inserts'") + entities = [e async for e in entities] + + # Assert + assert len(entities) == transaction_count + finally: + await self._tear_down() diff --git a/sdk/tables/azure-data-tables/tests/test_table_batch_cosmos_async.py b/sdk/tables/azure-data-tables/tests/test_table_batch_cosmos_async.py index b952be5c2d81..7d17c40c8be1 100644 --- a/sdk/tables/azure-data-tables/tests/test_table_batch_cosmos_async.py +++ b/sdk/tables/azure-data-tables/tests/test_table_batch_cosmos_async.py @@ -662,3 +662,29 @@ async def test_batch_with_specialchar_partitionkey(self, tables_cosmos_account_n finally: await self._tear_down() + + @cosmos_decorator_async + async def test_async_batch_inserts(self, tables_cosmos_account_name, tables_primary_cosmos_account_key): + # Arrange + await self._set_up(tables_cosmos_account_name, tables_primary_cosmos_account_key, url="cosmos") + try: + # Act + transaction_count = 10 + async def generate_entities(count): + for i in range(count): + yield ("upsert", {'PartitionKey': 'async_inserts', 'RowKey': str(i)}) + + batch = generate_entities(transaction_count) + transaction_result = await self.table.submit_transaction(batch) + + # Assert + self._assert_valid_batch_transaction(transaction_result, transaction_count) + assert 'etag' in transaction_result[0] + + entities = self.table.query_entities("PartitionKey eq 'async_inserts'") + entities = [e async for e in entities] + + # Assert + assert len(entities) == transaction_count + finally: + await self._tear_down() diff --git a/sdk/tables/test-resources.json b/sdk/tables/test-resources.json index 1658eecf704d..d0cbf2d0a9a2 100644 --- a/sdk/tables/test-resources.json +++ b/sdk/tables/test-resources.json @@ -10,6 +10,13 @@ "metadata": { "description": "The principal to assign the role to. This is application object id." } + }, + "tablesStorageEndpointSuffix": { + "type": "string", + "defaultValue": "core.windows.net", + "metadata": { + "description": "The url suffix to use when accessing the storage data plane." + } } }, "variables": { @@ -107,6 +114,10 @@ } ], "outputs": { + "TABLES_STORAGE_ENDPOINT_SUFFIX": { + "type": "string", + "value": "[parameters('tablesStorageEndpointSuffix')]" + }, "TABLES_STORAGE_ACCOUNT_NAME": { "type": "string", "value": "[variables('primaryAccountName')]" @@ -124,4 +135,4 @@ "value": "[listKeys(resourceId('Microsoft.DocumentDB/databaseAccounts', variables('primaryAccountName')), '2020-04-01').primaryMasterKey]" } } -} \ No newline at end of file +} diff --git a/sdk/tables/tests.yml b/sdk/tables/tests.yml index acd3f2f37712..0934d4732b87 100644 --- a/sdk/tables/tests.yml +++ b/sdk/tables/tests.yml @@ -5,8 +5,6 @@ stages: parameters: BuildTargetingString: azure-data-tables ServiceDirectory: tables - AllocateResourceGroup: false - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true EnvVars: diff --git a/sdk/template/tests.yml b/sdk/template/tests.yml index c5986cd0cd62..b5a96eb083c8 100644 --- a/sdk/template/tests.yml +++ b/sdk/template/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - AllocateResourceGroup: false ServiceDirectory: template MatrixReplace: - TestSamples=.*/true diff --git a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md index c0b59419cb3c..fbc6d121f627 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md +++ b/sdk/textanalytics/azure-ai-textanalytics/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 5.2.0b2 (Unreleased) +## 5.2.0b3 (Unreleased) ### Features Added @@ -10,6 +10,23 @@ ### Other Changes +## 5.2.0b2 (2021-11-02) + +This version of the SDK defaults to the latest supported API version, which currently is `v3.2-preview.2`. + +### Features Added +- Added support for Custom Entities Recognition through the `begin_analyze_actions` API with the `RecognizeCustomEntitiesAction` and `RecognizeCustomEntitiesResult` types. +- Added support for Custom Single Classification through the `begin_analyze_actions` API with the `SingleCategoryClassifyAction` and `SingleCategoryClassifyActionResult` types. +- Added support for Custom Multi Classification through the `begin_analyze_actions` API with the `MultiCategoryClassifyAction` and `MultiCategoryClassifyActionResult` types. +- Multiple of the same action type is now supported with `begin_analyze_actions`. + +### Bugs Fixed +- Restarting a long-running operation from a saved state is now supported for the `begin_analyze_actions` and `begin_recognize_healthcare_entities` methods. +- In the event of an action level error, available partial results are now returned for any successful actions in `begin_analyze_actions`. + +### Other Changes +- Package requires [azure-core](https://pypi.org/project/azure-core/) version 1.19.1 or greater + ## 5.2.0b1 (2021-08-09) This version of the SDK defaults to the latest supported API version, which currently is `v3.2-preview.1`. diff --git a/sdk/textanalytics/azure-ai-textanalytics/README.md b/sdk/textanalytics/azure-ai-textanalytics/README.md index 5041adf62aa7..e54358b8928b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/README.md @@ -3,17 +3,21 @@ Text Analytics is a cloud-based service that provides advanced natural language processing over raw text, and includes the following main features: - Sentiment Analysis -- Named Entity Recognition -- Linked Entity Recognition -- Personally Identifiable Information (PII) Entity Recognition +- Entity Recognition (Named, Linked, and Personally Identifiable Information (PII) entities) - Language Detection - Key Phrase Extraction - Multiple Analysis - Healthcare Entities Analysis - Extractive Text Summarization +- Custom Entity Recognition +- Custom Single and Multi Category Classification [Source code][source_code] | [Package (PyPI)][ta_pypi] | [API reference documentation][ta_ref_docs] | [Product documentation][ta_product_documentation] | [Samples][ta_samples] +## _Disclaimer_ + +_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ + ## Getting started ### Prerequisites @@ -75,13 +79,13 @@ Install the Azure Text Analytics client library for Python with [pip][pip]: pip install azure-ai-textanalytics --pre ``` -> Note: This version of the client library defaults to the v3.2-preview.1 version of the service +> Note: This version of the client library defaults to the v3.2-preview.2 version of the service This table shows the relationship between SDK versions and supported API versions of the service | SDK version | Supported API version of service | | ------------ | --------------------------------- | -| 5.2.0b1 - Latest beta release | 3.0, 3.1, 3.2-preview.1 (default) | +| 5.2.0b2 - Latest beta release | 3.0, 3.1, 3.2-preview.2 (default) | | 5.1.0 - Latest GA release | 3.0, 3.1 (default) | | 5.0.0 | 3.0 | @@ -229,6 +233,10 @@ The following section provides several code snippets covering some of the most c - [Detect Language](#detect-language "Detect language") - [Healthcare Entities Analysis](#healthcare-entities-analysis "Healthcare Entities Analysis") - [Multiple Analysis](#multiple-analysis "Multiple analysis") +- [Extractive Summarization][extract_summary_sample] +- [Custom Entity Recognition][recognize_custom_entities_sample] +- [Custom Single Category Classification][single_category_classify_sample] +- [Custom Multi Category Classification][multi_category_classify_sample] ### Analyze sentiment @@ -506,6 +514,9 @@ Note: The Healthcare Entities Analysis service is available in API version v3.1 - Key Phrase Extraction - Sentiment Analysis - Extractive Summarization (see sample [here][extract_summary_sample]) +- Custom Entity Recognition (see sample [here][recognize_custom_entities_sample]) +- Custom Single Category Classification (see sample [here][single_category_classify_sample]) +- Custom Multi Category Classification (see sample [here][multi_category_classify_sample]) ```python from azure.core.credentials import AzureKeyCredential @@ -641,6 +652,9 @@ Common scenarios - Healthcare Entities Analysis: [sample_analyze_healthcare_entities.py][analyze_healthcare_entities_sample] ([async version][analyze_healthcare_entities_sample_async]) - Multiple Analysis: [sample_analyze_actions.py][analyze_sample] ([async version][analyze_sample_async]) - Extractive text summarization: [sample_extract_summary.py][extract_summary_sample] ([async version][extract_summary_sample_async]) +- Custom Entity Recognition: [sample_recognize_custom_entities.py][recognize_custom_entities_sample] ([async_version][recognize_custom_entities_sample_async]) +- Custom Single Classification: [sample_single_category_classify.py][single_category_classify_sample] ([async_version][single_category_classify_sample_async]) +- Custom Multi Classification: [sample_multi_category_classify.py][multi_category_classify_sample] ([async_version][multi_category_classify_sample_async]) Advanced scenarios @@ -738,6 +752,12 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [opinion_mining_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_sentiment_with_opinion_mining_async.py [extract_summary_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_summary.py [extract_summary_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_summary_async.py +[recognize_custom_entities_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py +[recognize_custom_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py +[single_category_classify_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_category_classify.py +[single_category_classify_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_category_classify_async.py +[multi_category_classify_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_category_classify.py +[multi_category_classify_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_category_classify_async.py [cla]: https://cla.microsoft.com [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py index d78a7244020b..c9812c7241cd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/__init__.py @@ -53,6 +53,13 @@ ExtractSummaryAction, ExtractSummaryResult, SummarySentence, + RecognizeCustomEntitiesAction, + RecognizeCustomEntitiesResult, + SingleCategoryClassifyAction, + SingleCategoryClassifyResult, + MultiCategoryClassifyAction, + MultiCategoryClassifyResult, + ClassificationCategory, ) from ._lro import AnalyzeHealthcareEntitiesLROPoller, AnalyzeActionsLROPoller @@ -107,6 +114,13 @@ "ExtractSummaryAction", "ExtractSummaryResult", "SummarySentence", + "RecognizeCustomEntitiesAction", + "RecognizeCustomEntitiesResult", + "SingleCategoryClassifyAction", + "SingleCategoryClassifyResult", + "MultiCategoryClassifyAction", + "MultiCategoryClassifyResult", + "ClassificationCategory", ] __version__ = VERSION diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py index 320a26d389eb..483a388761ea 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_base_client.py @@ -4,7 +4,7 @@ # Licensed under the MIT License. # ------------------------------------ from enum import Enum -from azure.core.pipeline.policies import AzureKeyCredentialPolicy +from azure.core.pipeline.policies import AzureKeyCredentialPolicy, HttpLoggingPolicy from azure.core.credentials import AzureKeyCredential from ._generated import TextAnalyticsClient as _TextAnalyticsClient from ._policies import TextAnalyticsResponseHookPolicy @@ -16,7 +16,7 @@ class TextAnalyticsApiVersion(str, Enum): """Text Analytics API versions supported by this package""" #: this is the default version - V3_2_PREVIEW = "v3.2-preview.1" + V3_2_PREVIEW = "v3.2-preview.2" V3_1 = "v3.1" V3_0 = "v3.0" @@ -39,13 +39,38 @@ def _authentication_policy(credential): class TextAnalyticsClientBase(object): def __init__(self, endpoint, credential, **kwargs): + http_logging_policy = HttpLoggingPolicy(**kwargs) + http_logging_policy.allowed_header_names.update( + { + "Operation-Location", + "apim-request-id", + "x-envoy-upstream-service-time", + "Strict-Transport-Security", + "x-content-type-options", + } + ) + http_logging_policy.allowed_query_params.update( + { + "model-version", + "showStats", + "loggingOptOut", + "domain", + "stringIndexType", + "piiCategories", + "$top", + "$skip", + "opinionMining", + } + ) + self._client = _TextAnalyticsClient( endpoint=endpoint, credential=credential, api_version=kwargs.pop("api_version", DEFAULT_API_VERSION), sdk_moniker=USER_AGENT, - authentication_policy=_authentication_policy(credential), - custom_hook_policy=TextAnalyticsResponseHookPolicy(**kwargs), + authentication_policy=kwargs.pop("authentication_policy", _authentication_policy(credential)), + custom_hook_policy=kwargs.pop("custom_hook_policy", TextAnalyticsResponseHookPolicy(**kwargs)), + http_logging_policy=kwargs.pop("http_logging_policy", http_logging_policy), **kwargs ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py index 9126c492e7bc..bc3cc2f45004 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_operations_mixin.py @@ -10,19 +10,14 @@ # -------------------------------------------------------------------------- from msrest import Serializer, Deserializer from typing import TYPE_CHECKING -import warnings - -# FIXME: have to manually reconfigure import path for multiapi operation mixin -from .._lro import AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod, AnalyzeHealthcareEntitiesLROPoller, AnalyzeHealthcareEntitiesLROPollingMethod -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse -from azure.core.polling import LROPoller, NoPolling, PollingMethod -from azure.core.polling.base_polling import LROBasePolling if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union + from typing import Any, List, Optional, Union + + # FIXME: have to manually reconfigure import path for multiapi operation mixin + from .._lro import AnalyzeActionsLROPoller, AnalyzeHealthcareEntitiesLROPoller + from azure.core.polling import LROPoller class TextAnalyticsClientOperationsMixin(object): @@ -35,6 +30,7 @@ def analyze_status( skip=0, # type: Optional[int] **kwargs # type: Any ): + # type: (...) -> "_models.AnalyzeJobState" """Get analysis status and results. Get the status of an analysis job. A job may consist of one or more tasks. Once all tasks are @@ -54,14 +50,14 @@ def analyze_status( :type skip: int :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('analyze_status') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_status'".format(api_version)) mixin_instance = OperationClass() @@ -77,28 +73,33 @@ def begin_analyze( body=None, # type: Optional["_models.AnalyzeBatchInput"] **kwargs # type: Any ): + # type: (...) -> AnalyzeActionsLROPoller["_models.AnalyzeJobState"] """Submit analysis job. Submit a collection of text documents for analysis. Specify one or more unique tasks to be executed. :param body: Collection of documents to analyze and tasks to execute. - :type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput + :type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. Pass + in False for this operation to not poll, or pass in your own initialized polling object for a + personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) - :rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the + result of cls(response) + :rtype: + ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_analyze') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze'".format(api_version)) mixin_instance = OperationClass() @@ -114,6 +115,7 @@ def begin_cancel_health_job( job_id, # type: str **kwargs # type: Any ): + # type: (...) -> LROPoller[None] """Cancel healthcare prediction job. Cancel healthcare prediction job. @@ -122,19 +124,21 @@ def begin_cancel_health_job( :type job_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be LROBasePolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_cancel_health_job') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_cancel_health_job'".format(api_version)) mixin_instance = OperationClass() @@ -153,20 +157,21 @@ def begin_health( logging_opt_out=None, # type: Optional[bool] **kwargs # type: Any ): + # type: (...) -> AnalyzeHealthcareEntitiesLROPoller["_models.HealthcareJobState"] """Submit healthcare analysis job. Start a healthcare analysis job to recognize healthcare related entities (drugs, conditions, symptoms, etc) and their relations. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language @@ -177,19 +182,23 @@ def begin_health( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AnalyzeHealthcareEntitiesLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be + AnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll, or + pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either + HealthcareJobState or the result of cls(response) + :rtype: + ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_health') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_health'".format(api_version)) mixin_instance = OperationClass() @@ -209,6 +218,7 @@ def entities_linking( string_index_type=None, # type: Optional[Union[str, "_models.StringIndexType"]] **kwargs # type: Any ): + # type: (...) -> "_models.EntityLinkingResult" """Linked entities from a well known knowledge base. The API returns a list of recognized entities with links to a well known knowledge base. See @@ -216,7 +226,7 @@ def entities_linking( the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -234,10 +244,10 @@ def entities_linking( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_linking') @@ -245,8 +255,8 @@ def entities_linking( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_linking'".format(api_version)) mixin_instance = OperationClass() @@ -258,7 +268,7 @@ def entities_linking( # FIXME: this is handwritten if api_version == 'v3.0': return mixin_instance.entities_linking(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return mixin_instance.entities_linking(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) def entities_recognition_general( @@ -270,6 +280,7 @@ def entities_recognition_general( string_index_type=None, # type: Optional[Union[str, "_models.StringIndexType"]] **kwargs # type: Any ): + # type: (...) -> "_models.EntitiesResult" """Named Entity Recognition. The API returns a list of general named entities in a given document. For the list of supported @@ -278,7 +289,7 @@ def entities_recognition_general( Analytics API` for the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -296,10 +307,10 @@ def entities_recognition_general( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_general') @@ -307,8 +318,8 @@ def entities_recognition_general( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_general'".format(api_version)) mixin_instance = OperationClass() @@ -320,7 +331,7 @@ def entities_recognition_general( # FIXME: this is handwritten if api_version == 'v3.0': return mixin_instance.entities_recognition_general(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return mixin_instance.entities_recognition_general(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) def entities_recognition_pii( @@ -334,6 +345,7 @@ def entities_recognition_pii( pii_categories=None, # type: Optional[List[Union[str, "_models.PiiCategory"]]] **kwargs # type: Any ): + # type: (...) -> "_models.PiiResult" """Entities containing personal information. The API returns a list of entities with personal information (\"SSN\", \"Bank Account\" etc) in @@ -343,7 +355,7 @@ def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -364,19 +376,19 @@ def entities_recognition_pii( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :keyword callable cls: A custom type or function that will be passed the direct response :return: PiiResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_pii') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_pii'".format(api_version)) mixin_instance = OperationClass() @@ -395,6 +407,7 @@ def health_status( show_stats=None, # type: Optional[bool] **kwargs # type: Any ): + # type: (...) -> "_models.HealthcareJobState" """Get healthcare analysis job status and results. Get details of the healthcare prediction job specified by the jobId. @@ -412,14 +425,14 @@ def health_status( :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: HealthcareJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('health_status') if api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'health_status'".format(api_version)) mixin_instance = OperationClass() @@ -438,6 +451,7 @@ def key_phrases( logging_opt_out=None, # type: Optional[bool] **kwargs # type: Any ): + # type: (...) -> "_models.KeyPhraseResult" """Key Phrases. The API returns a list of strings denoting the key phrases in the input text. See the :code:` "_models.LanguageResult" """Detect Language. The API returns the detected language and a numeric score between 0 and 1. Scores close to 1 @@ -502,7 +517,7 @@ def languages( enabled languages. :param documents: - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -519,7 +534,7 @@ def languages( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: LanguageResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('languages') @@ -527,8 +542,8 @@ def languages( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'languages'".format(api_version)) mixin_instance = OperationClass() @@ -540,7 +555,7 @@ def languages( # FIXME: this is handwritten if api_version == 'v3.0': return mixin_instance.languages(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return mixin_instance.languages(documents, model_version, show_stats, logging_opt_out, **kwargs) def sentiment( @@ -553,6 +568,7 @@ def sentiment( string_index_type=None, # type: Optional[Union[str, "_models.StringIndexType"]] **kwargs # type: Any ): + # type: (...) -> "_models.SentimentResponse" """Sentiment. The API returns a detailed sentiment analysis for the input text. The analysis is done in @@ -560,7 +576,7 @@ def sentiment( (targets and assessments). :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -581,10 +597,10 @@ def sentiment( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('sentiment') @@ -592,8 +608,8 @@ def sentiment( from .v3_0.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from .v3_1.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'sentiment'".format(api_version)) mixin_instance = OperationClass() @@ -605,5 +621,5 @@ def sentiment( # FIXME: this is handwritten if api_version == 'v3.0': return mixin_instance.sentiment(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return mixin_instance.sentiment(documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type, **kwargs) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py index 8954bdf48d9e..a797041e8e45 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/_text_analytics_client.py @@ -24,7 +24,6 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse class _SDKClient(object): def __init__(self, *args, **kwargs): @@ -55,7 +54,7 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = 'v3.2-preview.1' + DEFAULT_API_VERSION = 'v3.2-preview.2' _PROFILE_TAG = "azure.ai.textanalytics.TextAnalyticsClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -76,8 +75,8 @@ def __init__( base_url = '{Endpoint}/text/analytics/v3.0' elif api_version == 'v3.1': base_url = '{Endpoint}/text/analytics/v3.1' - elif api_version == 'v3.2-preview.1': - base_url = '{Endpoint}/text/analytics/v3.2-preview.1' + elif api_version == 'v3.2-preview.2': + base_url = '{Endpoint}/text/analytics/v3.2-preview.2' else: raise ValueError("API version {} is not available".format(api_version)) self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) @@ -97,7 +96,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * v3.0: :mod:`v3_0.models` * v3.1: :mod:`v3_1.models` - * v3.2-preview.1: :mod:`v3_2_preview_1.models` + * v3.2-preview.2: :mod:`v3_2_preview_2.models` """ if api_version == 'v3.0': from .v3_0 import models @@ -105,8 +104,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == 'v3.1': from .v3_1 import models return models - elif api_version == 'v3.2-preview.1': - from .v3_2_preview_1 import models + elif api_version == 'v3.2-preview.2': + from .v3_2_preview_2 import models return models raise ValueError("API version {} is not available".format(api_version)) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py index 1271b33c08b2..d2621eaa925a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_operations_mixin.py @@ -9,16 +9,11 @@ # regenerated. # -------------------------------------------------------------------------- from msrest import Serializer, Deserializer -from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union -import warnings +from typing import Any, List, Optional, Union # FIXME: have to manually reconfigure import path for multiapi operation mixin from ...aio._lro_async import AsyncAnalyzeHealthcareEntitiesLROPoller, AsyncAnalyzeHealthcareEntitiesLROPollingMethod, AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod -from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error -from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest -from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod -from azure.core.polling.async_base_polling import AsyncLROBasePolling +from azure.core.polling import AsyncLROPoller class TextAnalyticsClientOperationsMixin(object): @@ -50,14 +45,14 @@ async def analyze_status( :type skip: int :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('analyze_status') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'analyze_status'".format(api_version)) mixin_instance = OperationClass() @@ -79,22 +74,26 @@ async def begin_analyze( executed. :param body: Collection of documents to analyze and tasks to execute. - :type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput + :type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + Pass in False for this operation to not poll, or pass in your own initialized polling object + for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the + result of cls(response) + :rtype: + ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_analyze') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_analyze'".format(api_version)) mixin_instance = OperationClass() @@ -118,19 +117,21 @@ async def begin_cancel_health_job( :type job_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncLROBasePolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_cancel_health_job') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_cancel_health_job'".format(api_version)) mixin_instance = OperationClass() @@ -155,14 +156,14 @@ async def begin_health( symptoms, etc) and their relations. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language @@ -173,19 +174,23 @@ async def begin_health( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncAnalyzeHealthcareEntitiesLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be + AsyncAnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll, + or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either + HealthcareJobState or the result of cls(response) + :rtype: + ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('begin_health') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'begin_health'".format(api_version)) mixin_instance = OperationClass() @@ -212,7 +217,7 @@ async def entities_linking( the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -230,10 +235,10 @@ async def entities_linking( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_linking') @@ -241,8 +246,8 @@ async def entities_linking( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_linking'".format(api_version)) mixin_instance = OperationClass() @@ -254,7 +259,7 @@ async def entities_linking( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.entities_linking(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.entities_linking(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) async def entities_recognition_general( @@ -274,7 +279,7 @@ async def entities_recognition_general( Analytics API` for the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -292,10 +297,10 @@ async def entities_recognition_general( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_general') @@ -303,8 +308,8 @@ async def entities_recognition_general( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_general'".format(api_version)) mixin_instance = OperationClass() @@ -316,7 +321,7 @@ async def entities_recognition_general( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.entities_recognition_general(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.entities_recognition_general(documents, model_version, show_stats, logging_opt_out, string_index_type, **kwargs) async def entities_recognition_pii( @@ -339,7 +344,7 @@ async def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -360,19 +365,19 @@ async def entities_recognition_pii( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :keyword callable cls: A custom type or function that will be passed the direct response :return: PiiResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('entities_recognition_pii') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'entities_recognition_pii'".format(api_version)) mixin_instance = OperationClass() @@ -408,14 +413,14 @@ async def health_status( :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: HealthcareJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('health_status') if api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'health_status'".format(api_version)) mixin_instance = OperationClass() @@ -441,7 +446,7 @@ async def key_phrases( enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -458,7 +463,7 @@ async def key_phrases( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyPhraseResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('key_phrases') @@ -466,8 +471,8 @@ async def key_phrases( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'key_phrases'".format(api_version)) mixin_instance = OperationClass() @@ -479,7 +484,7 @@ async def key_phrases( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.key_phrases(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.key_phrases(documents, model_version, show_stats, logging_opt_out, **kwargs) async def languages( @@ -498,7 +503,7 @@ async def languages( enabled languages. :param documents: - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -515,7 +520,7 @@ async def languages( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: LanguageResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('languages') @@ -523,8 +528,8 @@ async def languages( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'languages'".format(api_version)) mixin_instance = OperationClass() @@ -536,7 +541,7 @@ async def languages( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.languages(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.languages(documents, model_version, show_stats, logging_opt_out, **kwargs) async def sentiment( @@ -556,7 +561,7 @@ async def sentiment( (targets and assessments). :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -577,10 +582,10 @@ async def sentiment( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :raises: ~azure.core.exceptions.HttpResponseError """ api_version = self._get_api_version('sentiment') @@ -588,8 +593,8 @@ async def sentiment( from ..v3_0.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass elif api_version == 'v3.1': from ..v3_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2.aio.operations import TextAnalyticsClientOperationsMixin as OperationClass else: raise ValueError("API version {} does not have operation 'sentiment'".format(api_version)) mixin_instance = OperationClass() @@ -601,5 +606,5 @@ async def sentiment( # FIXME: this is handwritten if api_version == 'v3.0': return await mixin_instance.sentiment(documents, model_version, show_stats, **kwargs) - elif api_version == 'v3.1' or api_version == "v3.2-preview.1": + elif api_version == 'v3.1' or api_version == "v3.2-preview.2": return await mixin_instance.sentiment(documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type, **kwargs) \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py index 00cada7d6d11..aeebabb40c25 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/aio/_text_analytics_client.py @@ -12,7 +12,6 @@ from typing import Any, Optional, TYPE_CHECKING from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin from msrest import Deserializer, Serializer @@ -22,6 +21,7 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials import TokenCredential from azure.core.credentials_async import AsyncTokenCredential class _SDKClient(object): @@ -53,7 +53,7 @@ class TextAnalyticsClient(TextAnalyticsClientOperationsMixin, MultiApiClientMixi :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ - DEFAULT_API_VERSION = 'v3.2-preview.1' + DEFAULT_API_VERSION = 'v3.2-preview.2' _PROFILE_TAG = "azure.ai.textanalytics.TextAnalyticsClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -74,8 +74,8 @@ def __init__( base_url = '{Endpoint}/text/analytics/v3.0' elif api_version == 'v3.1': base_url = '{Endpoint}/text/analytics/v3.1' - elif api_version == 'v3.2-preview.1': - base_url = '{Endpoint}/text/analytics/v3.2-preview.1' + elif api_version == 'v3.2-preview.2': + base_url = '{Endpoint}/text/analytics/v3.2-preview.2' else: raise ValueError("API version {} is not available".format(api_version)) self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) @@ -95,7 +95,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * v3.0: :mod:`v3_0.models` * v3.1: :mod:`v3_1.models` - * v3.2-preview.1: :mod:`v3_2_preview_1.models` + * v3.2-preview.2: :mod:`v3_2_preview_2.models` """ if api_version == 'v3.0': from ..v3_0 import models @@ -103,8 +103,8 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == 'v3.1': from ..v3_1 import models return models - elif api_version == 'v3.2-preview.1': - from ..v3_2_preview_1 import models + elif api_version == 'v3.2-preview.2': + from ..v3_2_preview_2 import models return models raise ValueError("API version {} is not available".format(api_version)) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/models.py index 2b7242edae9b..eb341f025c78 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/models.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from .v3_2_preview_1.models import * +from .v3_2_preview_2.models import * diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_metadata.json b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_metadata.json index 76307d2f859c..2c7bf3972632 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_metadata.json +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_metadata.json @@ -5,13 +5,13 @@ "name": "TextAnalyticsClient", "filename": "_text_analytics_client", "description": "The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview.", - "base_url": null, - "custom_base_url": "\u0027{Endpoint}/text/analytics/v3.0\u0027", + "host_value": null, + "parameterized_host_template": "\u0027{Endpoint}/text/analytics/v3.0\u0027", "azure_arm": false, "has_lro_operations": false, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"PipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"AsyncPipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"PipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"AsyncPipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -79,21 +79,20 @@ "config": { "credential": true, "credential_scopes": ["https://cognitiveservices.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, + "credential_call_sync": "policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)", "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { }, "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\"]}}}", + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"List\", \"Optional\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"List\", \"Optional\"]}}}", "operations": { "entities_recognition_general" : { "sync": { - "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.EntitiesResult\"\n", "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_0.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -105,7 +104,7 @@ }, "entities_linking" : { "sync": { - "signature": "def entities_linking(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "signature": "def entities_linking(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.EntityLinkingResult\"\n", "doc": "\"\"\"Linked entities from a well-known knowledge base.\n\nThe API returns a list of recognized entities with links to a well-known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_0.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -117,7 +116,7 @@ }, "key_phrases" : { "sync": { - "signature": "def key_phrases(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "signature": "def key_phrases(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.KeyPhraseResult\"\n", "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_0.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -129,7 +128,7 @@ }, "languages" : { "sync": { - "signature": "def languages(\n self,\n documents, # type: List[\"_models.LanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "signature": "def languages(\n self,\n documents, # type: List[\"_models.LanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.LanguageResult\"\n", "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_0.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -141,7 +140,7 @@ }, "sentiment" : { "sync": { - "signature": "def sentiment(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "signature": "def sentiment(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SentimentResponse\"\n", "doc": "\"\"\"Sentiment.\n\nThe API returns a sentiment prediction, as well as sentiment scores for each sentiment class\n(Positive, Negative, and Neutral) for the document and each sentence within it. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain input and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_0.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py index 1549d8848edb..27af5789fda3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_text_analytics_client.py @@ -6,29 +6,30 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from copy import deepcopy from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer +from . import models +from ._configuration import TextAnalyticsClientConfiguration +from .operations import TextAnalyticsClientOperationsMixin + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import TextAnalyticsClientConfiguration -from .operations import TextAnalyticsClientOperationsMixin -from . import models - + from azure.core.rest import HttpRequest, HttpResponse class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): """The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus.api.cognitive.microsoft.com). :type endpoint: str """ @@ -39,33 +40,46 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{Endpoint}/text/analytics/v3.0' + _base_url = '{Endpoint}/text/analytics/v3.0' self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.HttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_vendor.py new file mode 100644 index 000000000000..9a223d15524c --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/_vendor.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py index 2453bcc1b7cf..8b931109b766 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/_text_analytics_client.py @@ -6,27 +6,28 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from msrest import Deserializer, Serializer -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - +from .. import models from ._configuration import TextAnalyticsClientConfiguration from .operations import TextAnalyticsClientOperationsMixin -from .. import models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): """The Text Analytics API is a suite of text analytics web services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. No training data is needed to use this API; just bring your text data. This API uses advanced natural language processing techniques to deliver best in class predictions. Further documentation can be found in https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus.api.cognitive.microsoft.com). :type endpoint: str """ @@ -36,32 +37,45 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: - base_url = '{Endpoint}/text/analytics/v3.0' + _base_url = '{Endpoint}/text/analytics/v3.0' self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.AsyncHttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) async def close(self) -> None: await self._client.close() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py index 34b14601e9af..358d23615dee 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/aio/operations/_text_analytics_client_operations.py @@ -5,20 +5,26 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +from ..._vendor import _convert_request +from ...operations._text_analytics_client_operations import build_entities_linking_request, build_entities_recognition_general_request, build_key_phrases_request, build_languages_request, build_sentiment_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] class TextAnalyticsClientOperationsMixin: + @distributed_trace_async async def entities_recognition_general( self, documents: List["_models.MultiLanguageInput"], @@ -52,39 +58,30 @@ async def entities_recognition_general( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_general.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_general_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.entities_recognition_general.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -93,8 +90,11 @@ async def entities_recognition_general( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_general.metadata = {'url': '/entities/recognition/general'} # type: ignore + + @distributed_trace_async async def entities_linking( self, documents: List["_models.MultiLanguageInput"], @@ -127,39 +127,30 @@ async def entities_linking( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_linking.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_linking_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.entities_linking.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -168,8 +159,11 @@ async def entities_linking( return cls(pipeline_response, deserialized, {}) return deserialized + entities_linking.metadata = {'url': '/entities/linking'} # type: ignore + + @distributed_trace_async async def key_phrases( self, documents: List["_models.MultiLanguageInput"], @@ -202,39 +196,30 @@ async def key_phrases( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.key_phrases.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_key_phrases_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.key_phrases.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -243,8 +228,11 @@ async def key_phrases( return cls(pipeline_response, deserialized, {}) return deserialized + key_phrases.metadata = {'url': '/keyPhrases'} # type: ignore + + @distributed_trace_async async def languages( self, documents: List["_models.LanguageInput"], @@ -278,39 +266,30 @@ async def languages( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.LanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.languages.metadata['url'] # type: ignore + _input = _models.LanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'LanguageBatchInput') + + request = build_languages_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.languages.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'LanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -319,8 +298,11 @@ async def languages( return cls(pipeline_response, deserialized, {}) return deserialized + languages.metadata = {'url': '/languages'} # type: ignore + + @distributed_trace_async async def sentiment( self, documents: List["_models.MultiLanguageInput"], @@ -354,39 +336,30 @@ async def sentiment( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.sentiment.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_sentiment_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.sentiment.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) @@ -395,4 +368,6 @@ async def sentiment( return cls(pipeline_response, deserialized, {}) return deserialized + sentiment.metadata = {'url': '/sentiment'} # type: ignore + diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models.py index 9a13949fe30d..b47d3f0319b6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models.py @@ -15,14 +15,14 @@ class DetectedLanguage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Long name of a detected language (e.g. English, French). - :type name: str - :param iso6391_name: Required. A two letter representation of the detected language according - to the ISO 639-1 standard (e.g. en, fr). - :type iso6391_name: str - :param confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + :ivar name: Required. Long name of a detected language (e.g. English, French). + :vartype name: str + :ivar iso6391_name: Required. A two letter representation of the detected language according to + the ISO 639-1 standard (e.g. en, fr). + :vartype iso6391_name: str + :ivar confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. - :type confidence_score: float + :vartype confidence_score: float """ _validation = { @@ -41,6 +41,16 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Long name of a detected language (e.g. English, French). + :paramtype name: str + :keyword iso6391_name: Required. A two letter representation of the detected language according + to the ISO 639-1 standard (e.g. en, fr). + :paramtype iso6391_name: str + :keyword confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :paramtype confidence_score: float + """ super(DetectedLanguage, self).__init__(**kwargs) self.name = kwargs['name'] self.iso6391_name = kwargs['iso6391_name'] @@ -52,15 +62,15 @@ class DocumentEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_0.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_0.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics """ _validation = { @@ -80,6 +90,17 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_0.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + """ super(DocumentEntities, self).__init__(**kwargs) self.id = kwargs['id'] self.entities = kwargs['entities'] @@ -92,10 +113,10 @@ class DocumentError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Document Id. - :type id: str - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + :ivar id: Required. Document Id. + :vartype id: str + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError """ _validation = { @@ -112,6 +133,12 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Document Id. + :paramtype id: str + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + """ super(DocumentError, self).__init__(**kwargs) self.id = kwargs['id'] self.error = kwargs['error'] @@ -122,16 +149,16 @@ class DocumentKeyPhrases(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param key_phrases: Required. A list of representative words or phrases. The number of key + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar key_phrases: Required. A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. - :type key_phrases: list[str] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :vartype key_phrases: list[str] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics """ _validation = { @@ -151,6 +178,18 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :paramtype key_phrases: list[str] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + """ super(DocumentKeyPhrases, self).__init__(**kwargs) self.id = kwargs['id'] self.key_phrases = kwargs['key_phrases'] @@ -163,15 +202,15 @@ class DocumentLanguage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param detected_language: Required. Detected Language. - :type detected_language: ~azure.ai.textanalytics.v3_0.models.DetectedLanguage - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar detected_language: Required. Detected Language. + :vartype detected_language: ~azure.ai.textanalytics.v3_0.models.DetectedLanguage + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics """ _validation = { @@ -191,6 +230,17 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword detected_language: Required. Detected Language. + :paramtype detected_language: ~azure.ai.textanalytics.v3_0.models.DetectedLanguage + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + """ super(DocumentLanguage, self).__init__(**kwargs) self.id = kwargs['id'] self.detected_language = kwargs['detected_language'] @@ -203,15 +253,15 @@ class DocumentLinkedEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized well-known entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_0.models.LinkedEntity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized well-known entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_0.models.LinkedEntity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics """ _validation = { @@ -231,6 +281,17 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized well-known entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_0.models.LinkedEntity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + """ super(DocumentLinkedEntities, self).__init__(**kwargs) self.id = kwargs['id'] self.entities = kwargs['entities'] @@ -243,21 +304,22 @@ class DocumentSentiment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). Possible values include: "positive", "neutral", "negative", "mixed". - :type sentiment: str or ~azure.ai.textanalytics.v3_0.models.DocumentSentimentValue - :param statistics: if showStats=true was specified in the request this field will contain + :vartype sentiment: str or ~azure.ai.textanalytics.v3_0.models.DocumentSentimentValue + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics - :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :ivar confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 for each sentiment class. - :type confidence_scores: ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel - :param sentences: Required. Sentence level sentiment analysis. - :type sentences: list[~azure.ai.textanalytics.v3_0.models.SentenceSentiment] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel + :ivar sentences: Required. Sentence level sentiment analysis. + :vartype sentences: list[~azure.ai.textanalytics.v3_0.models.SentenceSentiment] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] """ _validation = { @@ -281,6 +343,24 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_0.models.DocumentSentimentValue + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :keyword confidence_scores: Required. Document level sentiment confidence scores between 0 and + 1 for each sentiment class. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel + :keyword sentences: Required. Sentence level sentiment analysis. + :paramtype sentences: list[~azure.ai.textanalytics.v3_0.models.SentenceSentiment] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + """ super(DocumentSentiment, self).__init__(**kwargs) self.id = kwargs['id'] self.sentiment = kwargs['sentiment'] @@ -295,10 +375,10 @@ class DocumentStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param characters_count: Required. Number of text elements recognized in the document. - :type characters_count: int - :param transactions_count: Required. Number of transactions for the document. - :type transactions_count: int + :ivar characters_count: Required. Number of text elements recognized in the document. + :vartype characters_count: int + :ivar transactions_count: Required. Number of transactions for the document. + :vartype transactions_count: int """ _validation = { @@ -315,6 +395,12 @@ def __init__( self, **kwargs ): + """ + :keyword characters_count: Required. Number of text elements recognized in the document. + :paramtype characters_count: int + :keyword transactions_count: Required. Number of transactions for the document. + :paramtype transactions_count: int + """ super(DocumentStatistics, self).__init__(**kwargs) self.characters_count = kwargs['characters_count'] self.transactions_count = kwargs['transactions_count'] @@ -325,15 +411,15 @@ class EntitiesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -353,6 +439,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(EntitiesResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -365,18 +462,18 @@ class Entity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Entity type, such as Person/Location/Org/SSN etc. - :type category: str - :param subcategory: Entity sub type, such as Age/Year/TimeRange etc. - :type subcategory: str - :param offset: Required. Start position (in Unicode characters) for the entity text. - :type offset: int - :param length: Required. Length (in Unicode characters) for the entity text. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Entity type, such as Person/Location/Org/SSN etc. + :vartype category: str + :ivar subcategory: Entity sub type, such as Age/Year/TimeRange etc. + :vartype subcategory: str + :ivar offset: Required. Start position (in Unicode characters) for the entity text. + :vartype offset: int + :ivar length: Required. Length (in Unicode characters) for the entity text. + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float """ _validation = { @@ -400,6 +497,20 @@ def __init__( self, **kwargs ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Entity type, such as Person/Location/Org/SSN etc. + :paramtype category: str + :keyword subcategory: Entity sub type, such as Age/Year/TimeRange etc. + :paramtype subcategory: str + :keyword offset: Required. Start position (in Unicode characters) for the entity text. + :paramtype offset: int + :keyword length: Required. Length (in Unicode characters) for the entity text. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ super(Entity, self).__init__(**kwargs) self.text = kwargs['text'] self.category = kwargs['category'] @@ -414,15 +525,15 @@ class EntityLinkingResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLinkedEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLinkedEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -442,6 +553,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLinkedEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(EntityLinkingResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -454,8 +576,8 @@ class ErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError """ _validation = { @@ -470,6 +592,10 @@ def __init__( self, **kwargs ): + """ + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + """ super(ErrorResponse, self).__init__(**kwargs) self.error = kwargs['error'] @@ -479,19 +605,19 @@ class InnerError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "invalidParameterValue", + :ivar code: Required. Error code. Possible values include: "invalidParameterValue", "invalidRequestBodyFormat", "emptyRequest", "missingInputRecords", "invalidDocument", "modelVersionIncorrect", "invalidDocumentBatch", "unsupportedLanguageCode", "invalidCountryHint". - :type code: str or ~azure.ai.textanalytics.v3_0.models.InnerErrorCodeValue - :param message: Required. Error message. - :type message: str - :param details: Error details. - :type details: dict[str, str] - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_0.models.InnerError + :vartype code: str or ~azure.ai.textanalytics.v3_0.models.InnerErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar details: Error details. + :vartype details: dict[str, str] + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError """ _validation = { @@ -511,6 +637,21 @@ def __init__( self, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "invalidParameterValue", + "invalidRequestBodyFormat", "emptyRequest", "missingInputRecords", "invalidDocument", + "modelVersionIncorrect", "invalidDocumentBatch", "unsupportedLanguageCode", + "invalidCountryHint". + :paramtype code: str or ~azure.ai.textanalytics.v3_0.models.InnerErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword details: Error details. + :paramtype details: dict[str, str] + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError + """ super(InnerError, self).__init__(**kwargs) self.code = kwargs['code'] self.message = kwargs['message'] @@ -524,15 +665,15 @@ class KeyPhraseResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentKeyPhrases] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentKeyPhrases] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -552,6 +693,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentKeyPhrases] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(KeyPhraseResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -564,8 +716,8 @@ class LanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. - :type documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput] + :ivar documents: Required. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput] """ _validation = { @@ -580,6 +732,10 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput] + """ super(LanguageBatchInput, self).__init__(**kwargs) self.documents = kwargs['documents'] @@ -589,12 +745,12 @@ class LanguageInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param text: Required. - :type text: str - :param country_hint: - :type country_hint: str + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. + :vartype text: str + :ivar country_hint: + :vartype country_hint: str """ _validation = { @@ -612,6 +768,14 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. + :paramtype text: str + :keyword country_hint: + :paramtype country_hint: str + """ super(LanguageInput, self).__init__(**kwargs) self.id = kwargs['id'] self.text = kwargs['text'] @@ -623,15 +787,15 @@ class LanguageResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLanguage] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLanguage] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -651,6 +815,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLanguage] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(LanguageResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -663,19 +838,18 @@ class LinkedEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Entity Linking formal name. - :type name: str - :param matches: Required. List of instances this entity appears in the text. - :type matches: list[~azure.ai.textanalytics.v3_0.models.Match] - :param language: Required. Language used in the data source. - :type language: str - :param id: Unique identifier of the recognized entity from the data source. - :type id: str - :param url: Required. URL for the entity's page from the data source. - :type url: str - :param data_source: Required. Data source used to extract entity linking, such as Wiki/Bing - etc. - :type data_source: str + :ivar name: Required. Entity Linking formal name. + :vartype name: str + :ivar matches: Required. List of instances this entity appears in the text. + :vartype matches: list[~azure.ai.textanalytics.v3_0.models.Match] + :ivar language: Required. Language used in the data source. + :vartype language: str + :ivar id: Unique identifier of the recognized entity from the data source. + :vartype id: str + :ivar url: Required. URL for the entity's page from the data source. + :vartype url: str + :ivar data_source: Required. Data source used to extract entity linking, such as Wiki/Bing etc. + :vartype data_source: str """ _validation = { @@ -699,6 +873,21 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Entity Linking formal name. + :paramtype name: str + :keyword matches: Required. List of instances this entity appears in the text. + :paramtype matches: list[~azure.ai.textanalytics.v3_0.models.Match] + :keyword language: Required. Language used in the data source. + :paramtype language: str + :keyword id: Unique identifier of the recognized entity from the data source. + :paramtype id: str + :keyword url: Required. URL for the entity's page from the data source. + :paramtype url: str + :keyword data_source: Required. Data source used to extract entity linking, such as Wiki/Bing + etc. + :paramtype data_source: str + """ super(LinkedEntity, self).__init__(**kwargs) self.name = kwargs['name'] self.matches = kwargs['matches'] @@ -713,15 +902,15 @@ class Match(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param confidence_score: Required. If a well-known item is recognized, a decimal number - denoting the confidence level between 0 and 1 will be returned. - :type confidence_score: float - :param text: Required. Entity text as appears in the request. - :type text: str - :param offset: Required. Start position (in Unicode characters) for the entity match text. - :type offset: int - :param length: Required. Length (in Unicode characters) for the entity match text. - :type length: int + :ivar confidence_score: Required. If a well-known item is recognized, a decimal number denoting + the confidence level between 0 and 1 will be returned. + :vartype confidence_score: float + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar offset: Required. Start position (in Unicode characters) for the entity match text. + :vartype offset: int + :ivar length: Required. Length (in Unicode characters) for the entity match text. + :vartype length: int """ _validation = { @@ -742,6 +931,17 @@ def __init__( self, **kwargs ): + """ + :keyword confidence_score: Required. If a well-known item is recognized, a decimal number + denoting the confidence level between 0 and 1 will be returned. + :paramtype confidence_score: float + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword offset: Required. Start position (in Unicode characters) for the entity match text. + :paramtype offset: int + :keyword length: Required. Length (in Unicode characters) for the entity match text. + :paramtype length: int + """ super(Match, self).__init__(**kwargs) self.confidence_score = kwargs['confidence_score'] self.text = kwargs['text'] @@ -754,8 +954,8 @@ class MultiLanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput] + :ivar documents: Required. The set of documents to process as part of this batch. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput] """ _validation = { @@ -770,6 +970,10 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. The set of documents to process as part of this batch. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput] + """ super(MultiLanguageBatchInput, self).__init__(**kwargs) self.documents = kwargs['documents'] @@ -779,14 +983,14 @@ class MultiLanguageInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. A unique, non-empty document identifier. - :type id: str - :param text: Required. The input text to process. - :type text: str - :param language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + :ivar id: Required. A unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. The input text to process. + :vartype text: str + :ivar language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. - :type language: str + :vartype language: str """ _validation = { @@ -804,6 +1008,16 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. A unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. The input text to process. + :paramtype text: str + :keyword language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + """ super(MultiLanguageInput, self).__init__(**kwargs) self.id = kwargs['id'] self.text = kwargs['text'] @@ -815,16 +1029,16 @@ class RequestStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents_count: Required. Number of documents submitted in the request. - :type documents_count: int - :param valid_documents_count: Required. Number of valid documents. This excludes empty, + :ivar documents_count: Required. Number of documents submitted in the request. + :vartype documents_count: int + :ivar valid_documents_count: Required. Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. - :type valid_documents_count: int - :param erroneous_documents_count: Required. Number of invalid documents. This includes empty, + :vartype valid_documents_count: int + :ivar erroneous_documents_count: Required. Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. - :type erroneous_documents_count: int - :param transactions_count: Required. Number of transactions for the request. - :type transactions_count: long + :vartype erroneous_documents_count: int + :ivar transactions_count: Required. Number of transactions for the request. + :vartype transactions_count: long """ _validation = { @@ -845,6 +1059,18 @@ def __init__( self, **kwargs ): + """ + :keyword documents_count: Required. Number of documents submitted in the request. + :paramtype documents_count: int + :keyword valid_documents_count: Required. Number of valid documents. This excludes empty, + over-size limit or non-supported languages documents. + :paramtype valid_documents_count: int + :keyword erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :paramtype erroneous_documents_count: int + :keyword transactions_count: Required. Number of transactions for the request. + :paramtype transactions_count: long + """ super(RequestStatistics, self).__init__(**kwargs) self.documents_count = kwargs['documents_count'] self.valid_documents_count = kwargs['valid_documents_count'] @@ -857,18 +1083,19 @@ class SentenceSentiment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. The sentence text. - :type text: str - :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: + :ivar text: Required. The sentence text. + :vartype text: str + :ivar sentiment: Required. The predicted Sentiment for the sentence. Possible values include: "positive", "neutral", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_0.models.SentenceSentimentValue - :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + :vartype sentiment: str or ~azure.ai.textanalytics.v3_0.models.SentenceSentimentValue + :ivar confidence_scores: Required. The sentiment confidence score between 0 and 1 for the sentence for all classes. - :type confidence_scores: ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel - :param offset: Required. The sentence offset from the start of the document. - :type offset: int - :param length: Required. The length of the sentence by Unicode standard. - :type length: int + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel + :ivar offset: Required. The sentence offset from the start of the document. + :vartype offset: int + :ivar length: Required. The length of the sentence by Unicode standard. + :vartype length: int """ _validation = { @@ -891,6 +1118,21 @@ def __init__( self, **kwargs ): + """ + :keyword text: Required. The sentence text. + :paramtype text: str + :keyword sentiment: Required. The predicted Sentiment for the sentence. Possible values + include: "positive", "neutral", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_0.models.SentenceSentimentValue + :keyword confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel + :keyword offset: Required. The sentence offset from the start of the document. + :paramtype offset: int + :keyword length: Required. The length of the sentence by Unicode standard. + :paramtype length: int + """ super(SentenceSentiment, self).__init__(**kwargs) self.text = kwargs['text'] self.sentiment = kwargs['sentiment'] @@ -904,12 +1146,12 @@ class SentimentConfidenceScorePerLabel(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param positive: Required. - :type positive: float - :param neutral: Required. - :type neutral: float - :param negative: Required. - :type negative: float + :ivar positive: Required. + :vartype positive: float + :ivar neutral: Required. + :vartype neutral: float + :ivar negative: Required. + :vartype negative: float """ _validation = { @@ -928,6 +1170,14 @@ def __init__( self, **kwargs ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword neutral: Required. + :paramtype neutral: float + :keyword negative: Required. + :paramtype negative: float + """ super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) self.positive = kwargs['positive'] self.neutral = kwargs['neutral'] @@ -939,15 +1189,15 @@ class SentimentResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Sentiment analysis per document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentSentiment] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Sentiment analysis per document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentSentiment] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -967,6 +1217,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Sentiment analysis per document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentSentiment] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(SentimentResponse, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -979,17 +1240,17 @@ class TextAnalyticsError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "invalidRequest", - "invalidArgument", "internalServerError", "serviceUnavailable". - :type code: str or ~azure.ai.textanalytics.v3_0.models.ErrorCodeValue - :param message: Required. Error message. - :type message: str - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_0.models.InnerError - :param details: Details about specific errors that led to this reported error. - :type details: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsError] + :ivar code: Required. Error code. Possible values include: "invalidRequest", "invalidArgument", + "internalServerError", "serviceUnavailable". + :vartype code: str or ~azure.ai.textanalytics.v3_0.models.ErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError + :ivar details: Details about specific errors that led to this reported error. + :vartype details: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsError] """ _validation = { @@ -1009,6 +1270,19 @@ def __init__( self, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "invalidRequest", + "invalidArgument", "internalServerError", "serviceUnavailable". + :paramtype code: str or ~azure.ai.textanalytics.v3_0.models.ErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError + :keyword details: Details about specific errors that led to this reported error. + :paramtype details: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsError] + """ super(TextAnalyticsError, self).__init__(**kwargs) self.code = kwargs['code'] self.message = kwargs['message'] @@ -1022,13 +1296,13 @@ class TextAnalyticsWarning(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "LongWordsInDocument", + :ivar code: Required. Error code. Possible values include: "LongWordsInDocument", "DocumentTruncated". - :type code: str or ~azure.ai.textanalytics.v3_0.models.WarningCodeValue - :param message: Required. Warning message. - :type message: str - :param target_ref: A JSON pointer reference indicating the target object. - :type target_ref: str + :vartype code: str or ~azure.ai.textanalytics.v3_0.models.WarningCodeValue + :ivar message: Required. Warning message. + :vartype message: str + :ivar target_ref: A JSON pointer reference indicating the target object. + :vartype target_ref: str """ _validation = { @@ -1046,6 +1320,15 @@ def __init__( self, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :paramtype code: str or ~azure.ai.textanalytics.v3_0.models.WarningCodeValue + :keyword message: Required. Warning message. + :paramtype message: str + :keyword target_ref: A JSON pointer reference indicating the target object. + :paramtype target_ref: str + """ super(TextAnalyticsWarning, self).__init__(**kwargs) self.code = kwargs['code'] self.message = kwargs['message'] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py index 56f6eaa51439..356e2c20b49e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_models_py3.py @@ -19,14 +19,14 @@ class DetectedLanguage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Long name of a detected language (e.g. English, French). - :type name: str - :param iso6391_name: Required. A two letter representation of the detected language according - to the ISO 639-1 standard (e.g. en, fr). - :type iso6391_name: str - :param confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + :ivar name: Required. Long name of a detected language (e.g. English, French). + :vartype name: str + :ivar iso6391_name: Required. A two letter representation of the detected language according to + the ISO 639-1 standard (e.g. en, fr). + :vartype iso6391_name: str + :ivar confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. - :type confidence_score: float + :vartype confidence_score: float """ _validation = { @@ -49,6 +49,16 @@ def __init__( confidence_score: float, **kwargs ): + """ + :keyword name: Required. Long name of a detected language (e.g. English, French). + :paramtype name: str + :keyword iso6391_name: Required. A two letter representation of the detected language according + to the ISO 639-1 standard (e.g. en, fr). + :paramtype iso6391_name: str + :keyword confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :paramtype confidence_score: float + """ super(DetectedLanguage, self).__init__(**kwargs) self.name = name self.iso6391_name = iso6391_name @@ -60,15 +70,15 @@ class DocumentEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_0.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_0.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics """ _validation = { @@ -93,6 +103,17 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_0.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + """ super(DocumentEntities, self).__init__(**kwargs) self.id = id self.entities = entities @@ -105,10 +126,10 @@ class DocumentError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Document Id. - :type id: str - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + :ivar id: Required. Document Id. + :vartype id: str + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError """ _validation = { @@ -128,6 +149,12 @@ def __init__( error: "TextAnalyticsError", **kwargs ): + """ + :keyword id: Required. Document Id. + :paramtype id: str + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + """ super(DocumentError, self).__init__(**kwargs) self.id = id self.error = error @@ -138,16 +165,16 @@ class DocumentKeyPhrases(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param key_phrases: Required. A list of representative words or phrases. The number of key + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar key_phrases: Required. A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. - :type key_phrases: list[str] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :vartype key_phrases: list[str] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics """ _validation = { @@ -172,6 +199,18 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :paramtype key_phrases: list[str] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + """ super(DocumentKeyPhrases, self).__init__(**kwargs) self.id = id self.key_phrases = key_phrases @@ -184,15 +223,15 @@ class DocumentLanguage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param detected_language: Required. Detected Language. - :type detected_language: ~azure.ai.textanalytics.v3_0.models.DetectedLanguage - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar detected_language: Required. Detected Language. + :vartype detected_language: ~azure.ai.textanalytics.v3_0.models.DetectedLanguage + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics """ _validation = { @@ -217,6 +256,17 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword detected_language: Required. Detected Language. + :paramtype detected_language: ~azure.ai.textanalytics.v3_0.models.DetectedLanguage + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + """ super(DocumentLanguage, self).__init__(**kwargs) self.id = id self.detected_language = detected_language @@ -229,15 +279,15 @@ class DocumentLinkedEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized well-known entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_0.models.LinkedEntity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized well-known entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_0.models.LinkedEntity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics """ _validation = { @@ -262,6 +312,17 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized well-known entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_0.models.LinkedEntity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + """ super(DocumentLinkedEntities, self).__init__(**kwargs) self.id = id self.entities = entities @@ -274,21 +335,22 @@ class DocumentSentiment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). Possible values include: "positive", "neutral", "negative", "mixed". - :type sentiment: str or ~azure.ai.textanalytics.v3_0.models.DocumentSentimentValue - :param statistics: if showStats=true was specified in the request this field will contain + :vartype sentiment: str or ~azure.ai.textanalytics.v3_0.models.DocumentSentimentValue + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics - :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :ivar confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 for each sentiment class. - :type confidence_scores: ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel - :param sentences: Required. Sentence level sentiment analysis. - :type sentences: list[~azure.ai.textanalytics.v3_0.models.SentenceSentiment] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel + :ivar sentences: Required. Sentence level sentiment analysis. + :vartype sentences: list[~azure.ai.textanalytics.v3_0.models.SentenceSentiment] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] """ _validation = { @@ -319,6 +381,24 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_0.models.DocumentSentimentValue + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.DocumentStatistics + :keyword confidence_scores: Required. Document level sentiment confidence scores between 0 and + 1 for each sentiment class. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel + :keyword sentences: Required. Sentence level sentiment analysis. + :paramtype sentences: list[~azure.ai.textanalytics.v3_0.models.SentenceSentiment] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsWarning] + """ super(DocumentSentiment, self).__init__(**kwargs) self.id = id self.sentiment = sentiment @@ -333,10 +413,10 @@ class DocumentStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param characters_count: Required. Number of text elements recognized in the document. - :type characters_count: int - :param transactions_count: Required. Number of transactions for the document. - :type transactions_count: int + :ivar characters_count: Required. Number of text elements recognized in the document. + :vartype characters_count: int + :ivar transactions_count: Required. Number of transactions for the document. + :vartype transactions_count: int """ _validation = { @@ -356,6 +436,12 @@ def __init__( transactions_count: int, **kwargs ): + """ + :keyword characters_count: Required. Number of text elements recognized in the document. + :paramtype characters_count: int + :keyword transactions_count: Required. Number of transactions for the document. + :paramtype transactions_count: int + """ super(DocumentStatistics, self).__init__(**kwargs) self.characters_count = characters_count self.transactions_count = transactions_count @@ -366,15 +452,15 @@ class EntitiesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -399,6 +485,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(EntitiesResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -411,18 +508,18 @@ class Entity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Entity type, such as Person/Location/Org/SSN etc. - :type category: str - :param subcategory: Entity sub type, such as Age/Year/TimeRange etc. - :type subcategory: str - :param offset: Required. Start position (in Unicode characters) for the entity text. - :type offset: int - :param length: Required. Length (in Unicode characters) for the entity text. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Entity type, such as Person/Location/Org/SSN etc. + :vartype category: str + :ivar subcategory: Entity sub type, such as Age/Year/TimeRange etc. + :vartype subcategory: str + :ivar offset: Required. Start position (in Unicode characters) for the entity text. + :vartype offset: int + :ivar length: Required. Length (in Unicode characters) for the entity text. + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float """ _validation = { @@ -453,6 +550,20 @@ def __init__( subcategory: Optional[str] = None, **kwargs ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Entity type, such as Person/Location/Org/SSN etc. + :paramtype category: str + :keyword subcategory: Entity sub type, such as Age/Year/TimeRange etc. + :paramtype subcategory: str + :keyword offset: Required. Start position (in Unicode characters) for the entity text. + :paramtype offset: int + :keyword length: Required. Length (in Unicode characters) for the entity text. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ super(Entity, self).__init__(**kwargs) self.text = text self.category = category @@ -467,15 +578,15 @@ class EntityLinkingResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLinkedEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLinkedEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -500,6 +611,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLinkedEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(EntityLinkingResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -512,8 +634,8 @@ class ErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError """ _validation = { @@ -530,6 +652,10 @@ def __init__( error: "TextAnalyticsError", **kwargs ): + """ + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_0.models.TextAnalyticsError + """ super(ErrorResponse, self).__init__(**kwargs) self.error = error @@ -539,19 +665,19 @@ class InnerError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "invalidParameterValue", + :ivar code: Required. Error code. Possible values include: "invalidParameterValue", "invalidRequestBodyFormat", "emptyRequest", "missingInputRecords", "invalidDocument", "modelVersionIncorrect", "invalidDocumentBatch", "unsupportedLanguageCode", "invalidCountryHint". - :type code: str or ~azure.ai.textanalytics.v3_0.models.InnerErrorCodeValue - :param message: Required. Error message. - :type message: str - :param details: Error details. - :type details: dict[str, str] - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_0.models.InnerError + :vartype code: str or ~azure.ai.textanalytics.v3_0.models.InnerErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar details: Error details. + :vartype details: dict[str, str] + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError """ _validation = { @@ -577,6 +703,21 @@ def __init__( innererror: Optional["InnerError"] = None, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "invalidParameterValue", + "invalidRequestBodyFormat", "emptyRequest", "missingInputRecords", "invalidDocument", + "modelVersionIncorrect", "invalidDocumentBatch", "unsupportedLanguageCode", + "invalidCountryHint". + :paramtype code: str or ~azure.ai.textanalytics.v3_0.models.InnerErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword details: Error details. + :paramtype details: dict[str, str] + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError + """ super(InnerError, self).__init__(**kwargs) self.code = code self.message = message @@ -590,15 +731,15 @@ class KeyPhraseResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentKeyPhrases] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentKeyPhrases] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -623,6 +764,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentKeyPhrases] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(KeyPhraseResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -635,8 +787,8 @@ class LanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. - :type documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput] + :ivar documents: Required. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput] """ _validation = { @@ -653,6 +805,10 @@ def __init__( documents: List["LanguageInput"], **kwargs ): + """ + :keyword documents: Required. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.LanguageInput] + """ super(LanguageBatchInput, self).__init__(**kwargs) self.documents = documents @@ -662,12 +818,12 @@ class LanguageInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param text: Required. - :type text: str - :param country_hint: - :type country_hint: str + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. + :vartype text: str + :ivar country_hint: + :vartype country_hint: str """ _validation = { @@ -689,6 +845,14 @@ def __init__( country_hint: Optional[str] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. + :paramtype text: str + :keyword country_hint: + :paramtype country_hint: str + """ super(LanguageInput, self).__init__(**kwargs) self.id = id self.text = text @@ -700,15 +864,15 @@ class LanguageResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLanguage] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLanguage] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -733,6 +897,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentLanguage] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(LanguageResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -745,19 +920,18 @@ class LinkedEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Entity Linking formal name. - :type name: str - :param matches: Required. List of instances this entity appears in the text. - :type matches: list[~azure.ai.textanalytics.v3_0.models.Match] - :param language: Required. Language used in the data source. - :type language: str - :param id: Unique identifier of the recognized entity from the data source. - :type id: str - :param url: Required. URL for the entity's page from the data source. - :type url: str - :param data_source: Required. Data source used to extract entity linking, such as Wiki/Bing - etc. - :type data_source: str + :ivar name: Required. Entity Linking formal name. + :vartype name: str + :ivar matches: Required. List of instances this entity appears in the text. + :vartype matches: list[~azure.ai.textanalytics.v3_0.models.Match] + :ivar language: Required. Language used in the data source. + :vartype language: str + :ivar id: Unique identifier of the recognized entity from the data source. + :vartype id: str + :ivar url: Required. URL for the entity's page from the data source. + :vartype url: str + :ivar data_source: Required. Data source used to extract entity linking, such as Wiki/Bing etc. + :vartype data_source: str """ _validation = { @@ -788,6 +962,21 @@ def __init__( id: Optional[str] = None, **kwargs ): + """ + :keyword name: Required. Entity Linking formal name. + :paramtype name: str + :keyword matches: Required. List of instances this entity appears in the text. + :paramtype matches: list[~azure.ai.textanalytics.v3_0.models.Match] + :keyword language: Required. Language used in the data source. + :paramtype language: str + :keyword id: Unique identifier of the recognized entity from the data source. + :paramtype id: str + :keyword url: Required. URL for the entity's page from the data source. + :paramtype url: str + :keyword data_source: Required. Data source used to extract entity linking, such as Wiki/Bing + etc. + :paramtype data_source: str + """ super(LinkedEntity, self).__init__(**kwargs) self.name = name self.matches = matches @@ -802,15 +991,15 @@ class Match(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param confidence_score: Required. If a well-known item is recognized, a decimal number - denoting the confidence level between 0 and 1 will be returned. - :type confidence_score: float - :param text: Required. Entity text as appears in the request. - :type text: str - :param offset: Required. Start position (in Unicode characters) for the entity match text. - :type offset: int - :param length: Required. Length (in Unicode characters) for the entity match text. - :type length: int + :ivar confidence_score: Required. If a well-known item is recognized, a decimal number denoting + the confidence level between 0 and 1 will be returned. + :vartype confidence_score: float + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar offset: Required. Start position (in Unicode characters) for the entity match text. + :vartype offset: int + :ivar length: Required. Length (in Unicode characters) for the entity match text. + :vartype length: int """ _validation = { @@ -836,6 +1025,17 @@ def __init__( length: int, **kwargs ): + """ + :keyword confidence_score: Required. If a well-known item is recognized, a decimal number + denoting the confidence level between 0 and 1 will be returned. + :paramtype confidence_score: float + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword offset: Required. Start position (in Unicode characters) for the entity match text. + :paramtype offset: int + :keyword length: Required. Length (in Unicode characters) for the entity match text. + :paramtype length: int + """ super(Match, self).__init__(**kwargs) self.confidence_score = confidence_score self.text = text @@ -848,8 +1048,8 @@ class MultiLanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput] + :ivar documents: Required. The set of documents to process as part of this batch. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput] """ _validation = { @@ -866,6 +1066,10 @@ def __init__( documents: List["MultiLanguageInput"], **kwargs ): + """ + :keyword documents: Required. The set of documents to process as part of this batch. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.MultiLanguageInput] + """ super(MultiLanguageBatchInput, self).__init__(**kwargs) self.documents = documents @@ -875,14 +1079,14 @@ class MultiLanguageInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. A unique, non-empty document identifier. - :type id: str - :param text: Required. The input text to process. - :type text: str - :param language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + :ivar id: Required. A unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. The input text to process. + :vartype text: str + :ivar language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. - :type language: str + :vartype language: str """ _validation = { @@ -904,6 +1108,16 @@ def __init__( language: Optional[str] = None, **kwargs ): + """ + :keyword id: Required. A unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. The input text to process. + :paramtype text: str + :keyword language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + """ super(MultiLanguageInput, self).__init__(**kwargs) self.id = id self.text = text @@ -915,16 +1129,16 @@ class RequestStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents_count: Required. Number of documents submitted in the request. - :type documents_count: int - :param valid_documents_count: Required. Number of valid documents. This excludes empty, + :ivar documents_count: Required. Number of documents submitted in the request. + :vartype documents_count: int + :ivar valid_documents_count: Required. Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. - :type valid_documents_count: int - :param erroneous_documents_count: Required. Number of invalid documents. This includes empty, + :vartype valid_documents_count: int + :ivar erroneous_documents_count: Required. Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. - :type erroneous_documents_count: int - :param transactions_count: Required. Number of transactions for the request. - :type transactions_count: long + :vartype erroneous_documents_count: int + :ivar transactions_count: Required. Number of transactions for the request. + :vartype transactions_count: long """ _validation = { @@ -950,6 +1164,18 @@ def __init__( transactions_count: int, **kwargs ): + """ + :keyword documents_count: Required. Number of documents submitted in the request. + :paramtype documents_count: int + :keyword valid_documents_count: Required. Number of valid documents. This excludes empty, + over-size limit or non-supported languages documents. + :paramtype valid_documents_count: int + :keyword erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :paramtype erroneous_documents_count: int + :keyword transactions_count: Required. Number of transactions for the request. + :paramtype transactions_count: long + """ super(RequestStatistics, self).__init__(**kwargs) self.documents_count = documents_count self.valid_documents_count = valid_documents_count @@ -962,18 +1188,19 @@ class SentenceSentiment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. The sentence text. - :type text: str - :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: + :ivar text: Required. The sentence text. + :vartype text: str + :ivar sentiment: Required. The predicted Sentiment for the sentence. Possible values include: "positive", "neutral", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_0.models.SentenceSentimentValue - :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + :vartype sentiment: str or ~azure.ai.textanalytics.v3_0.models.SentenceSentimentValue + :ivar confidence_scores: Required. The sentiment confidence score between 0 and 1 for the sentence for all classes. - :type confidence_scores: ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel - :param offset: Required. The sentence offset from the start of the document. - :type offset: int - :param length: Required. The length of the sentence by Unicode standard. - :type length: int + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel + :ivar offset: Required. The sentence offset from the start of the document. + :vartype offset: int + :ivar length: Required. The length of the sentence by Unicode standard. + :vartype length: int """ _validation = { @@ -1002,6 +1229,21 @@ def __init__( length: int, **kwargs ): + """ + :keyword text: Required. The sentence text. + :paramtype text: str + :keyword sentiment: Required. The predicted Sentiment for the sentence. Possible values + include: "positive", "neutral", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_0.models.SentenceSentimentValue + :keyword confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_0.models.SentimentConfidenceScorePerLabel + :keyword offset: Required. The sentence offset from the start of the document. + :paramtype offset: int + :keyword length: Required. The length of the sentence by Unicode standard. + :paramtype length: int + """ super(SentenceSentiment, self).__init__(**kwargs) self.text = text self.sentiment = sentiment @@ -1015,12 +1257,12 @@ class SentimentConfidenceScorePerLabel(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param positive: Required. - :type positive: float - :param neutral: Required. - :type neutral: float - :param negative: Required. - :type negative: float + :ivar positive: Required. + :vartype positive: float + :ivar neutral: Required. + :vartype neutral: float + :ivar negative: Required. + :vartype negative: float """ _validation = { @@ -1043,6 +1285,14 @@ def __init__( negative: float, **kwargs ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword neutral: Required. + :paramtype neutral: float + :keyword negative: Required. + :paramtype negative: float + """ super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) self.positive = positive self.neutral = neutral @@ -1054,15 +1304,15 @@ class SentimentResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Sentiment analysis per document. - :type documents: list[~azure.ai.textanalytics.v3_0.models.DocumentSentiment] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Sentiment analysis per document. + :vartype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentSentiment] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -1087,6 +1337,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Sentiment analysis per document. + :paramtype documents: list[~azure.ai.textanalytics.v3_0.models.DocumentSentiment] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_0.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_0.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(SentimentResponse, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -1099,17 +1360,17 @@ class TextAnalyticsError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "invalidRequest", - "invalidArgument", "internalServerError", "serviceUnavailable". - :type code: str or ~azure.ai.textanalytics.v3_0.models.ErrorCodeValue - :param message: Required. Error message. - :type message: str - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_0.models.InnerError - :param details: Details about specific errors that led to this reported error. - :type details: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsError] + :ivar code: Required. Error code. Possible values include: "invalidRequest", "invalidArgument", + "internalServerError", "serviceUnavailable". + :vartype code: str or ~azure.ai.textanalytics.v3_0.models.ErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError + :ivar details: Details about specific errors that led to this reported error. + :vartype details: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsError] """ _validation = { @@ -1135,6 +1396,19 @@ def __init__( details: Optional[List["TextAnalyticsError"]] = None, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "invalidRequest", + "invalidArgument", "internalServerError", "serviceUnavailable". + :paramtype code: str or ~azure.ai.textanalytics.v3_0.models.ErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_0.models.InnerError + :keyword details: Details about specific errors that led to this reported error. + :paramtype details: list[~azure.ai.textanalytics.v3_0.models.TextAnalyticsError] + """ super(TextAnalyticsError, self).__init__(**kwargs) self.code = code self.message = message @@ -1148,13 +1422,13 @@ class TextAnalyticsWarning(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "LongWordsInDocument", + :ivar code: Required. Error code. Possible values include: "LongWordsInDocument", "DocumentTruncated". - :type code: str or ~azure.ai.textanalytics.v3_0.models.WarningCodeValue - :param message: Required. Warning message. - :type message: str - :param target_ref: A JSON pointer reference indicating the target object. - :type target_ref: str + :vartype code: str or ~azure.ai.textanalytics.v3_0.models.WarningCodeValue + :ivar message: Required. Warning message. + :vartype message: str + :ivar target_ref: A JSON pointer reference indicating the target object. + :vartype target_ref: str """ _validation = { @@ -1176,6 +1450,15 @@ def __init__( target_ref: Optional[str] = None, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :paramtype code: str or ~azure.ai.textanalytics.v3_0.models.WarningCodeValue + :keyword message: Required. Warning message. + :paramtype message: str + :keyword target_ref: A JSON pointer reference indicating the target object. + :paramtype target_ref: str + """ super(TextAnalyticsWarning, self).__init__(**kwargs) self.code = code self.message = message diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py index 880e381d7da3..cae791e56103 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/models/_text_analytics_client_enums.py @@ -6,27 +6,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class DocumentSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DocumentSentimentValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). """ @@ -35,7 +20,7 @@ class DocumentSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) NEGATIVE = "negative" MIXED = "mixed" -class ErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ErrorCodeValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ @@ -44,7 +29,7 @@ class ErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): INTERNAL_SERVER_ERROR = "internalServerError" SERVICE_UNAVAILABLE = "serviceUnavailable" -class InnerErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class InnerErrorCodeValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ @@ -58,7 +43,7 @@ class InnerErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): UNSUPPORTED_LANGUAGE_CODE = "unsupportedLanguageCode" INVALID_COUNTRY_HINT = "invalidCountryHint" -class SentenceSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SentenceSentimentValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The predicted Sentiment for the sentence. """ @@ -66,7 +51,7 @@ class SentenceSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) NEUTRAL = "neutral" NEGATIVE = "negative" -class WarningCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WarningCodeValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py index 913f3155c4c1..cc979c8445bc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0/operations/_text_analytics_client_operations.py @@ -5,14 +5,19 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -21,8 +26,182 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_entities_recognition_general_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/recognition/general') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_entities_linking_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/linking') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_key_phrases_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/keyPhrases') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_languages_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/languages') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_sentiment_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/sentiment') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class TextAnalyticsClientOperationsMixin(object): + @distributed_trace def entities_recognition_general( self, documents, # type: List["_models.MultiLanguageInput"] @@ -57,39 +236,30 @@ def entities_recognition_general( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_general.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_general_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.entities_recognition_general.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -98,8 +268,11 @@ def entities_recognition_general( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_general.metadata = {'url': '/entities/recognition/general'} # type: ignore + + @distributed_trace def entities_linking( self, documents, # type: List["_models.MultiLanguageInput"] @@ -133,39 +306,30 @@ def entities_linking( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_linking.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_linking_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.entities_linking.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -174,8 +338,11 @@ def entities_linking( return cls(pipeline_response, deserialized, {}) return deserialized + entities_linking.metadata = {'url': '/entities/linking'} # type: ignore + + @distributed_trace def key_phrases( self, documents, # type: List["_models.MultiLanguageInput"] @@ -209,39 +376,30 @@ def key_phrases( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.key_phrases.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_key_phrases_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.key_phrases.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -250,8 +408,11 @@ def key_phrases( return cls(pipeline_response, deserialized, {}) return deserialized + key_phrases.metadata = {'url': '/keyPhrases'} # type: ignore + + @distributed_trace def languages( self, documents, # type: List["_models.LanguageInput"] @@ -286,39 +447,30 @@ def languages( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.LanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.languages.metadata['url'] # type: ignore + _input = _models.LanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'LanguageBatchInput') + + request = build_languages_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.languages.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'LanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -327,8 +479,11 @@ def languages( return cls(pipeline_response, deserialized, {}) return deserialized + languages.metadata = {'url': '/languages'} # type: ignore + + @distributed_trace def sentiment( self, documents, # type: List["_models.MultiLanguageInput"] @@ -363,39 +518,30 @@ def sentiment( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.sentiment.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_sentiment_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + json=json, + template_url=self.sentiment.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) @@ -404,4 +550,6 @@ def sentiment( return cls(pipeline_response, deserialized, {}) return deserialized + sentiment.metadata = {'url': '/sentiment'} # type: ignore + diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_metadata.json b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_metadata.json index 28bb0368c3b1..a3d69330a7ad 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_metadata.json +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_metadata.json @@ -5,13 +5,13 @@ "name": "TextAnalyticsClient", "filename": "_text_analytics_client", "description": "The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in :code:`\u003ca href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\"\u003ehttps://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\u003c/a\u003e`.", - "base_url": null, - "custom_base_url": "\u0027{Endpoint}/text/analytics/v3.1\u0027", + "host_value": null, + "parameterized_host_template": "\u0027{Endpoint}/text/analytics/v3.1\u0027", "azure_arm": false, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"PipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"AsyncPipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"PipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"AsyncPipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -79,45 +79,44 @@ "config": { "credential": true, "credential_scopes": ["https://cognitiveservices.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, + "credential_call_sync": "policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)", "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { }, "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"...._lro\": [\"AnalyzeActionsLROPoller\", \"AnalyzeActionsLROPollingMethod\", \"AnalyzeHealthcareEntitiesLROPoller\", \"AnalyzeHealthcareEntitiesLROPollingMethod\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.core.polling.base_polling\": [\"LROBasePolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \".....aio._lro_async\": [\"AsyncAnalyzeActionsLROPoller\", \"AsyncAnalyzeActionsLROPollingMethod\", \"AsyncAnalyzeHealthcareEntitiesLROPoller\", \"AsyncAnalyzeHealthcareEntitiesLROPollingMethod\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.core.polling.async_base_polling\": [\"AsyncLROBasePolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"List\", \"Optional\", \"Union\"]}, \"azurecore\": {\"...._lro\": [\"AnalyzeActionsLROPoller\", \"AnalyzeHealthcareEntitiesLROPoller\"], \"azure.core.polling\": [\"LROPoller\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"List\", \"Optional\", \"Union\"]}, \"azurecore\": {\".....aio._lro_async\": [\"AsyncAnalyzeActionsLROPoller\", \"AsyncAnalyzeHealthcareEntitiesLROPoller\"], \"azure.core.polling\": [\"AsyncLROPoller\"]}}}", "operations": { "_analyze_initial" : { "sync": { - "signature": "def _analyze_initial(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _analyze_initial(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.AnalyzeJobState\"]\n", + "doc": "\"\"\"Submit analysis job.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _analyze_initial(\n self,\n body: Optional[\"_models.AnalyzeBatchInput\"] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.AnalyzeJobState\"]:\n", - "doc": "\"\"\"\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Submit analysis job.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "body" }, "begin_analyze" : { "sync": { - "signature": "def begin_analyze(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response)\n:rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_1.models.AnalyzeJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_analyze(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n # type: (...) -\u003e AnalyzeActionsLROPoller[\"_models.AnalyzeJobState\"]\n", + "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. Pass\n in False for this operation to not poll, or pass in your own initialized polling object for a\n personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the\n result of cls(response)\n:rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_1.models.AnalyzeJobState]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_analyze(\n self,\n body: Optional[\"_models.AnalyzeBatchInput\"] = None,\n **kwargs: Any\n) -\u003e AsyncAnalyzeActionsLROPoller[\"_models.AnalyzeJobState\"]:\n", - "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response)\n:rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_1.models.AnalyzeJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object\n for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the\n result of cls(response)\n:rtype:\n ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_1.models.AnalyzeJobState]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "body" }, "analyze_status" : { "sync": { - "signature": "def analyze_status(\n self,\n job_id, # type: str\n show_stats=None, # type: Optional[bool]\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n **kwargs # type: Any\n):\n", + "signature": "def analyze_status(\n self,\n job_id, # type: str\n show_stats=None, # type: Optional[bool]\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.AnalyzeJobState\"\n", "doc": "\"\"\"Get analysis status and results.\n\nGet the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\ncompleted, the job will transition to the completed state and results will be available for\neach task.\n\n:param job_id: Job ID for Analyze.\n:type job_id: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.AnalyzeJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -129,7 +128,7 @@ }, "health_status" : { "sync": { - "signature": "def health_status(\n self,\n job_id, # type: str\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "signature": "def health_status(\n self,\n job_id, # type: str\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.HealthcareJobState\"\n", "doc": "\"\"\"Get healthcare analysis job status and results.\n\nGet details of the healthcare prediction job specified by the jobId.\n\n:param job_id: Job ID.\n:type job_id: str\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.HealthcareJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -141,55 +140,55 @@ }, "_cancel_health_job_initial" : { "sync": { - "signature": "def _cancel_health_job_initial(\n self,\n job_id, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _cancel_health_job_initial(\n self,\n job_id, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Cancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _cancel_health_job_initial(\n self,\n job_id: str,\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Cancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "job_id" }, "begin_cancel_health_job" : { "sync": { - "signature": "def begin_cancel_health_job(\n self,\n job_id, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Cancel healthcare prediction job.\n\nCancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_cancel_health_job(\n self,\n job_id, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[None]\n", + "doc": "\"\"\"Cancel healthcare prediction job.\n\nCancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_cancel_health_job(\n self,\n job_id: str,\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Cancel healthcare prediction job.\n\nCancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Cancel healthcare prediction job.\n\nCancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False\n for this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "job_id" }, "_health_initial" : { "sync": { - "signature": "def _health_initial(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _health_initial(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.HealthcareJobState\"]\n", + "doc": "\"\"\"Submit healthcare analysis job.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _health_initial(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.HealthcareJobState\"]:\n", - "doc": "\"\"\"\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Submit healthcare analysis job.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, string_index_type, logging_opt_out" }, "begin_health" : { "sync": { - "signature": "def begin_health(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeHealthcareEntitiesLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response)\n:rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_health(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e AnalyzeHealthcareEntitiesLROPoller[\"_models.HealthcareJobState\"]\n", + "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be\n AnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll, or\n pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either\n HealthcareJobState or the result of cls(response)\n:rtype:\n ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_health(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncAnalyzeHealthcareEntitiesLROPoller[\"_models.HealthcareJobState\"]:\n", - "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeHealthcareEntitiesLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response)\n:rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be\n AsyncAnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll,\n or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either\n HealthcareJobState or the result of cls(response)\n:rtype:\n ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, string_index_type, logging_opt_out" }, "entities_recognition_general" : { "sync": { - "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.EntitiesResult\"\n", "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -201,7 +200,7 @@ }, "entities_recognition_pii" : { "sync": { - "signature": "def entities_recognition_pii(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n domain=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n pii_categories=None, # type: Optional[List[Union[str, \"_models.PiiCategory\"]]]\n **kwargs # type: Any\n):\n", + "signature": "def entities_recognition_pii(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n domain=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n pii_categories=None, # type: Optional[List[Union[str, \"_models.PiiCategory\"]]]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.PiiResult\"\n", "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param domain: (Optional) if specified, will set the PII domain to include only a subset of the\n entity categories. Possible values include: \u0027PHI\u0027, \u0027none\u0027.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:param pii_categories: (Optional) describes the PII categories to return.\n:type pii_categories: list[str or ~azure.ai.textanalytics.v3_1.models.PiiCategory]\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.PiiResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -213,7 +212,7 @@ }, "entities_linking" : { "sync": { - "signature": "def entities_linking(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "signature": "def entities_linking(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.EntityLinkingResult\"\n", "doc": "\"\"\"Linked entities from a well known knowledge base.\n\nThe API returns a list of recognized entities with links to a well known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -225,7 +224,7 @@ }, "key_phrases" : { "sync": { - "signature": "def key_phrases(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "signature": "def key_phrases(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.KeyPhraseResult\"\n", "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -237,7 +236,7 @@ }, "languages" : { "sync": { - "signature": "def languages(\n self,\n documents, # type: List[\"_models.LanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", + "signature": "def languages(\n self,\n documents, # type: List[\"_models.LanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.LanguageResult\"\n", "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { @@ -249,7 +248,7 @@ }, "sentiment" : { "sync": { - "signature": "def sentiment(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n opinion_mining=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", + "signature": "def sentiment(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n opinion_mining=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SentimentResponse\"\n", "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(targets and assessments).\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param opinion_mining: (Optional) if set to true, response will contain not only sentiment\n prediction but also opinion mining (aspect-based sentiment analysis) results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_1.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py index 3ddfe5c33c8d..79760767eb6f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_text_analytics_client.py @@ -6,31 +6,33 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from copy import deepcopy from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer +from . import models +from ._configuration import TextAnalyticsClientConfiguration +from .operations import TextAnalyticsClientOperationsMixin + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import TextAnalyticsClientConfiguration -from .operations import TextAnalyticsClientOperationsMixin -from . import models - + from azure.core.rest import HttpRequest, HttpResponse class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): """The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in :code:`https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview`. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus.api.cognitive.microsoft.com). :type endpoint: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( @@ -40,33 +42,46 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{Endpoint}/text/analytics/v3.1' + _base_url = '{Endpoint}/text/analytics/v3.1' self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.HttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py index 32f4bb4051e0..975be64f0179 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/_text_analytics_client.py @@ -6,29 +6,31 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from msrest import Deserializer, Serializer -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - +from .. import models from ._configuration import TextAnalyticsClientConfiguration from .operations import TextAnalyticsClientOperationsMixin -from .. import models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): """The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in :code:`https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview`. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus.api.cognitive.microsoft.com). :type endpoint: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( @@ -37,32 +39,45 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: - base_url = '{Endpoint}/text/analytics/v3.1' + _base_url = '{Endpoint}/text/analytics/v3.1' self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.AsyncHttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) async def close(self) -> None: await self._client.close() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py index d8dd4b5e851a..f016a0f75863 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/aio/operations/_text_analytics_client_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union import warnings from .....aio._lro_async import AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod, AsyncAnalyzeHealthcareEntitiesLROPoller, AsyncAnalyzeHealthcareEntitiesLROPollingMethod from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.polling.async_base_polling import AsyncLROBasePolling +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +from ..._vendor import _convert_request +from ...operations._text_analytics_client_operations import build_analyze_request_initial, build_analyze_status_request, build_cancel_health_job_request_initial, build_entities_linking_request, build_entities_recognition_general_request, build_entities_recognition_pii_request, build_health_request_initial, build_health_status_request, build_key_phrases_request, build_languages_request, build_sentiment_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -32,53 +37,50 @@ async def _analyze_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - # Construct URL - url = self._analyze_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] if body is not None: - body_content = self._serialize.body(body, 'AnalyzeBatchInput') + json = self._serialize.body(body, 'AnalyzeBatchInput') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_analyze_request_initial( + content_type=content_type, + json=json, + template_url=self._analyze_initial.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('AnalyzeJobState', pipeline_response) if response.status_code == 202: response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + _analyze_initial.metadata = {'url': '/analyze'} # type: ignore + + @distributed_trace_async async def begin_analyze( self, body: Optional["_models.AnalyzeBatchInput"] = None, @@ -94,14 +96,19 @@ async def begin_analyze( :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + Pass in False for this operation to not poll, or pass in your own initialized polling object + for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_1.models.AnalyzeJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the + result of cls(response) + :rtype: + ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_1.models.AnalyzeJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeJobState"] lro_delay = kwargs.pop( 'polling_interval', @@ -111,25 +118,25 @@ async def begin_analyze( if cont_token is None: raw_result = await self._analyze_initial( body=body, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('AnalyzeJobState', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AsyncAnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncAnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -141,8 +148,10 @@ def get_long_running_output(pipeline_response): ) else: return AsyncAnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_analyze.metadata = {'url': '/analyze'} # type: ignore + @distributed_trace_async async def analyze_status( self, job_id: str, @@ -178,36 +187,27 @@ async def analyze_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self.analyze_status.metadata['url'] # type: ignore + + request = build_analyze_status_request( + job_id=job_id, + show_stats=show_stats, + top=top, + skip=skip, + template_url=self.analyze_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=50, minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AnalyzeJobState', pipeline_response) @@ -216,8 +216,11 @@ async def analyze_status( return cls(pipeline_response, deserialized, {}) return deserialized + analyze_status.metadata = {'url': '/analyze/jobs/{jobId}'} # type: ignore + + @distributed_trace_async async def health_status( self, job_id: str, @@ -251,36 +254,27 @@ async def health_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self.health_status.metadata['url'] # type: ignore + + request = build_health_status_request( + job_id=job_id, + top=top, + skip=skip, + show_stats=show_stats, + template_url=self.health_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=50, minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('HealthcareJobState', pipeline_response) @@ -289,8 +283,10 @@ async def health_status( return cls(pipeline_response, deserialized, {}) return deserialized + health_status.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore + async def _cancel_health_job_initial( self, job_id: str, @@ -301,40 +297,36 @@ async def _cancel_health_job_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self._cancel_health_job_initial.metadata['url'] # type: ignore + + request = build_cancel_health_job_request_initial( + job_id=job_id, + template_url=self._cancel_health_job_initial.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) response_headers = {} response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, None, response_headers) _cancel_health_job_initial.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore + + @distributed_trace_async async def begin_cancel_health_job( self, job_id: str, @@ -348,15 +340,17 @@ async def begin_cancel_health_job( :type job_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncLROBasePolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -369,20 +363,18 @@ async def begin_cancel_health_job( cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -394,6 +386,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel_health_job.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore async def _health_initial( @@ -410,57 +403,50 @@ async def _health_initial( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self._health_initial.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_health_request_initial( + content_type=content_type, + model_version=model_version, + string_index_type=string_index_type, + logging_opt_out=logging_opt_out, + json=json, + template_url=self._health_initial.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('HealthcareJobState', pipeline_response) if response.status_code == 202: response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + _health_initial.metadata = {'url': '/entities/health/jobs'} # type: ignore + + @distributed_trace_async async def begin_health( self, documents: List["_models.MultiLanguageInput"], @@ -493,15 +479,20 @@ async def begin_health( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncAnalyzeHealthcareEntitiesLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be + AsyncAnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll, + or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either + HealthcareJobState or the result of cls(response) + :rtype: + ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.HealthcareJobState"] lro_delay = kwargs.pop( 'polling_interval', @@ -514,25 +505,25 @@ async def begin_health( model_version=model_version, string_index_type=string_index_type, logging_opt_out=logging_opt_out, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('HealthcareJobState', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AsyncAnalyzeHealthcareEntitiesLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncAnalyzeHealthcareEntitiesLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -544,8 +535,10 @@ def get_long_running_output(pipeline_response): ) else: return AsyncAnalyzeHealthcareEntitiesLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_health.metadata = {'url': '/entities/health/jobs'} # type: ignore + @distributed_trace_async async def entities_recognition_general( self, documents: List["_models.MultiLanguageInput"], @@ -593,43 +586,32 @@ async def entities_recognition_general( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_general.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_general_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + string_index_type=string_index_type, + json=json, + template_url=self.entities_recognition_general.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -638,8 +620,11 @@ async def entities_recognition_general( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_general.metadata = {'url': '/entities/recognition/general'} # type: ignore + + @distributed_trace_async async def entities_recognition_pii( self, documents: List["_models.MultiLanguageInput"], @@ -695,47 +680,34 @@ async def entities_recognition_pii( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_pii.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_pii_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + domain=domain, + string_index_type=string_index_type, + pii_categories=pii_categories, + json=json, + template_url=self.entities_recognition_pii.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if domain is not None: - query_parameters['domain'] = self._serialize.query("domain", domain, 'str') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - if pii_categories is not None: - query_parameters['piiCategories'] = self._serialize.query("pii_categories", pii_categories, '[str]', div=',') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('PiiResult', pipeline_response) @@ -744,8 +716,11 @@ async def entities_recognition_pii( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_pii.metadata = {'url': '/entities/recognition/pii'} # type: ignore + + @distributed_trace_async async def entities_linking( self, documents: List["_models.MultiLanguageInput"], @@ -792,43 +767,32 @@ async def entities_linking( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_linking.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_linking_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + string_index_type=string_index_type, + json=json, + template_url=self.entities_linking.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -837,8 +801,11 @@ async def entities_linking( return cls(pipeline_response, deserialized, {}) return deserialized + entities_linking.metadata = {'url': '/entities/linking'} # type: ignore + + @distributed_trace_async async def key_phrases( self, documents: List["_models.MultiLanguageInput"], @@ -880,41 +847,31 @@ async def key_phrases( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.key_phrases.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_key_phrases_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + json=json, + template_url=self.key_phrases.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -923,8 +880,11 @@ async def key_phrases( return cls(pipeline_response, deserialized, {}) return deserialized + key_phrases.metadata = {'url': '/keyPhrases'} # type: ignore + + @distributed_trace_async async def languages( self, documents: List["_models.LanguageInput"], @@ -967,41 +927,31 @@ async def languages( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.LanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.languages.metadata['url'] # type: ignore + _input = _models.LanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'LanguageBatchInput') + + request = build_languages_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + json=json, + template_url=self.languages.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'LanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -1010,8 +960,11 @@ async def languages( return cls(pipeline_response, deserialized, {}) return deserialized + languages.metadata = {'url': '/languages'} # type: ignore + + @distributed_trace_async async def sentiment( self, documents: List["_models.MultiLanguageInput"], @@ -1062,45 +1015,33 @@ async def sentiment( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.sentiment.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_sentiment_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + opinion_mining=opinion_mining, + string_index_type=string_index_type, + json=json, + template_url=self.sentiment.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if opinion_mining is not None: - query_parameters['opinionMining'] = self._serialize.query("opinion_mining", opinion_mining, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) @@ -1109,4 +1050,6 @@ async def sentiment( return cls(pipeline_response, deserialized, {}) return deserialized + sentiment.metadata = {'url': '/sentiment'} # type: ignore + diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models.py index 69764c937670..f049bc1cdf92 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models.py @@ -15,9 +15,9 @@ class AnalysisInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param analysis_input: Required. Contains a set of input documents to be analyzed by the + :ivar analysis_input: Required. Contains a set of input documents to be analyzed by the service. - :type analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput + :vartype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput """ _validation = { @@ -32,6 +32,11 @@ def __init__( self, **kwargs ): + """ + :keyword analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :paramtype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput + """ super(AnalysisInput, self).__init__(**kwargs) self.analysis_input = kwargs['analysis_input'] @@ -41,9 +46,9 @@ class JobManifest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the + :ivar tasks: Required. The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks + :vartype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks """ _validation = { @@ -58,6 +63,11 @@ def __init__( self, **kwargs ): + """ + :keyword tasks: Required. The set of tasks to execute on the input documents. Cannot specify + the same task more than once. + :paramtype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks + """ super(JobManifest, self).__init__(**kwargs) self.tasks = kwargs['tasks'] @@ -65,8 +75,8 @@ def __init__( class JobDescriptor(msrest.serialization.Model): """JobDescriptor. - :param display_name: Optional display name for the analysis job. - :type display_name: str + :ivar display_name: Optional display name for the analysis job. + :vartype display_name: str """ _attribute_map = { @@ -77,6 +87,10 @@ def __init__( self, **kwargs ): + """ + :keyword display_name: Optional display name for the analysis job. + :paramtype display_name: str + """ super(JobDescriptor, self).__init__(**kwargs) self.display_name = kwargs.get('display_name', None) @@ -86,14 +100,14 @@ class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest): All required parameters must be populated in order to send to Azure. - :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the + :ivar tasks: Required. The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks - :param analysis_input: Required. Contains a set of input documents to be analyzed by the + :vartype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks + :ivar analysis_input: Required. Contains a set of input documents to be analyzed by the service. - :type analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput - :param display_name: Optional display name for the analysis job. - :type display_name: str + :vartype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput + :ivar display_name: Optional display name for the analysis job. + :vartype display_name: str """ _validation = { @@ -111,6 +125,16 @@ def __init__( self, **kwargs ): + """ + :keyword tasks: Required. The set of tasks to execute on the input documents. Cannot specify + the same task more than once. + :paramtype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks + :keyword analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :paramtype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput + :keyword display_name: Optional display name for the analysis job. + :paramtype display_name: str + """ super(AnalyzeBatchInput, self).__init__(**kwargs) self.tasks = kwargs['tasks'] self.analysis_input = kwargs['analysis_input'] @@ -123,8 +147,8 @@ def __init__( class AnalyzeJobDisplayName(msrest.serialization.Model): """AnalyzeJobDisplayName. - :param display_name: - :type display_name: str + :ivar display_name: + :vartype display_name: str """ _attribute_map = { @@ -135,6 +159,10 @@ def __init__( self, **kwargs ): + """ + :keyword display_name: + :paramtype display_name: str + """ super(AnalyzeJobDisplayName, self).__init__(**kwargs) self.display_name = kwargs.get('display_name', None) @@ -142,11 +170,11 @@ def __init__( class AnalyzeJobErrorsAndStatistics(msrest.serialization.Model): """AnalyzeJobErrorsAndStatistics. - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics """ _attribute_map = { @@ -158,6 +186,13 @@ def __init__( self, **kwargs ): + """ + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + """ super(AnalyzeJobErrorsAndStatistics, self).__init__(**kwargs) self.errors = kwargs.get('errors', None) self.statistics = kwargs.get('statistics', None) @@ -168,17 +203,17 @@ class JobMetadata(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -200,6 +235,19 @@ def __init__( self, **kwargs ): + """ + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(JobMetadata, self).__init__(**kwargs) self.created_date_time = kwargs['created_date_time'] self.expiration_date_time = kwargs.get('expiration_date_time', None) @@ -213,19 +261,19 @@ class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName): All required parameters must be populated in order to send to Azure. - :param display_name: - :type display_name: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar display_name: + :vartype display_name: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -248,6 +296,21 @@ def __init__( self, **kwargs ): + """ + :keyword display_name: + :paramtype display_name: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(AnalyzeJobMetadata, self).__init__(**kwargs) self.display_name = kwargs.get('display_name', None) self.created_date_time = kwargs['created_date_time'] @@ -260,8 +323,8 @@ def __init__( class Pagination(msrest.serialization.Model): """Pagination. - :param next_link: - :type next_link: str + :ivar next_link: + :vartype next_link: str """ _attribute_map = { @@ -272,6 +335,10 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: + :paramtype next_link: str + """ super(Pagination, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) @@ -281,8 +348,8 @@ class TasksState(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks + :ivar tasks: Required. + :vartype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks """ _validation = { @@ -297,6 +364,10 @@ def __init__( self, **kwargs ): + """ + :keyword tasks: Required. + :paramtype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks + """ super(TasksState, self).__init__(**kwargs) self.tasks = kwargs['tasks'] @@ -306,28 +377,28 @@ class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatist All required parameters must be populated in order to send to Azure. - :param next_link: - :type next_link: str - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar next_link: + :vartype next_link: str + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks - :param display_name: - :type display_name: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar tasks: Required. + :vartype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks + :ivar display_name: + :vartype display_name: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -355,6 +426,30 @@ def __init__( self, **kwargs ): + """ + :keyword next_link: + :paramtype next_link: str + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword tasks: Required. + :paramtype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks + :keyword display_name: + :paramtype display_name: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(AnalyzeJobState, self).__init__(**kwargs) self.next_link = kwargs.get('next_link', None) self.errors = kwargs.get('errors', None) @@ -393,14 +488,14 @@ class DetectedLanguage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Long name of a detected language (e.g. English, French). - :type name: str - :param iso6391_name: Required. A two letter representation of the detected language according - to the ISO 639-1 standard (e.g. en, fr). - :type iso6391_name: str - :param confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + :ivar name: Required. Long name of a detected language (e.g. English, French). + :vartype name: str + :ivar iso6391_name: Required. A two letter representation of the detected language according to + the ISO 639-1 standard (e.g. en, fr). + :vartype iso6391_name: str + :ivar confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. - :type confidence_score: float + :vartype confidence_score: float """ _validation = { @@ -419,6 +514,16 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Long name of a detected language (e.g. English, French). + :paramtype name: str + :keyword iso6391_name: Required. A two letter representation of the detected language according + to the ISO 639-1 standard (e.g. en, fr). + :paramtype iso6391_name: str + :keyword confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :paramtype confidence_score: float + """ super(DetectedLanguage, self).__init__(**kwargs) self.name = kwargs['name'] self.iso6391_name = kwargs['iso6391_name'] @@ -430,15 +535,15 @@ class DocumentEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_1.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -458,6 +563,17 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentEntities, self).__init__(**kwargs) self.id = kwargs['id'] self.entities = kwargs['entities'] @@ -470,10 +586,10 @@ class DocumentError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Document Id. - :type id: str - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError + :ivar id: Required. Document Id. + :vartype id: str + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError """ _validation = { @@ -490,6 +606,12 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Document Id. + :paramtype id: str + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError + """ super(DocumentError, self).__init__(**kwargs) self.id = kwargs['id'] self.error = kwargs['error'] @@ -500,17 +622,17 @@ class DocumentHealthcareEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Healthcare entities. - :type entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntity] - :param relations: Required. Healthcare entity relations. - :type relations: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelation] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Healthcare entities. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntity] + :ivar relations: Required. Healthcare entity relations. + :vartype relations: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelation] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -532,6 +654,19 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Healthcare entities. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntity] + :keyword relations: Required. Healthcare entity relations. + :paramtype relations: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelation] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentHealthcareEntities, self).__init__(**kwargs) self.id = kwargs['id'] self.entities = kwargs['entities'] @@ -545,16 +680,16 @@ class DocumentKeyPhrases(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param key_phrases: Required. A list of representative words or phrases. The number of key + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar key_phrases: Required. A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. - :type key_phrases: list[str] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :vartype key_phrases: list[str] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -574,6 +709,18 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :paramtype key_phrases: list[str] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentKeyPhrases, self).__init__(**kwargs) self.id = kwargs['id'] self.key_phrases = kwargs['key_phrases'] @@ -586,15 +733,15 @@ class DocumentLanguage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param detected_language: Required. Detected Language. - :type detected_language: ~azure.ai.textanalytics.v3_1.models.DetectedLanguage - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar detected_language: Required. Detected Language. + :vartype detected_language: ~azure.ai.textanalytics.v3_1.models.DetectedLanguage + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -614,6 +761,17 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword detected_language: Required. Detected Language. + :paramtype detected_language: ~azure.ai.textanalytics.v3_1.models.DetectedLanguage + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentLanguage, self).__init__(**kwargs) self.id = kwargs['id'] self.detected_language = kwargs['detected_language'] @@ -626,15 +784,15 @@ class DocumentLinkedEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized well known entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_1.models.LinkedEntity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized well known entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.LinkedEntity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -654,6 +812,17 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized well known entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.LinkedEntity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentLinkedEntities, self).__init__(**kwargs) self.id = kwargs['id'] self.entities = kwargs['entities'] @@ -666,21 +835,22 @@ class DocumentSentiment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). Possible values include: "positive", "neutral", "negative", "mixed". - :type sentiment: str or ~azure.ai.textanalytics.v3_1.models.DocumentSentimentValue - :param statistics: if showStats=true was specified in the request this field will contain + :vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.DocumentSentimentValue + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics - :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :ivar confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 for each sentiment class. - :type confidence_scores: ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel - :param sentences: Required. Sentence level sentiment analysis. - :type sentences: list[~azure.ai.textanalytics.v3_1.models.SentenceSentiment] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel + :ivar sentences: Required. Sentence level sentiment analysis. + :vartype sentences: list[~azure.ai.textanalytics.v3_1.models.SentenceSentiment] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] """ _validation = { @@ -704,6 +874,24 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.DocumentSentimentValue + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :keyword confidence_scores: Required. Document level sentiment confidence scores between 0 and + 1 for each sentiment class. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel + :keyword sentences: Required. Sentence level sentiment analysis. + :paramtype sentences: list[~azure.ai.textanalytics.v3_1.models.SentenceSentiment] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + """ super(DocumentSentiment, self).__init__(**kwargs) self.id = kwargs['id'] self.sentiment = kwargs['sentiment'] @@ -718,10 +906,10 @@ class DocumentStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param characters_count: Required. Number of text elements recognized in the document. - :type characters_count: int - :param transactions_count: Required. Number of transactions for the document. - :type transactions_count: int + :ivar characters_count: Required. Number of text elements recognized in the document. + :vartype characters_count: int + :ivar transactions_count: Required. Number of transactions for the document. + :vartype transactions_count: int """ _validation = { @@ -738,6 +926,12 @@ def __init__( self, **kwargs ): + """ + :keyword characters_count: Required. Number of text elements recognized in the document. + :paramtype characters_count: int + :keyword transactions_count: Required. Number of transactions for the document. + :paramtype transactions_count: int + """ super(DocumentStatistics, self).__init__(**kwargs) self.characters_count = kwargs['characters_count'] self.transactions_count = kwargs['transactions_count'] @@ -748,15 +942,15 @@ class EntitiesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -776,6 +970,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(EntitiesResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -786,10 +991,10 @@ def __init__( class EntitiesTask(msrest.serialization.Model): """EntitiesTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.EntitiesTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.EntitiesTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -801,6 +1006,12 @@ def __init__( self, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.EntitiesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(EntitiesTask, self).__init__(**kwargs) self.parameters = kwargs.get('parameters', None) self.task_name = kwargs.get('task_name', None) @@ -809,13 +1020,13 @@ def __init__( class EntitiesTaskParameters(msrest.serialization.Model): """EntitiesTaskParameters. - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + :vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType """ _attribute_map = { @@ -828,6 +1039,15 @@ def __init__( self, **kwargs ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + """ super(EntitiesTaskParameters, self).__init__(**kwargs) self.model_version = kwargs.get('model_version', "latest") self.logging_opt_out = kwargs.get('logging_opt_out', False) @@ -837,8 +1057,8 @@ def __init__( class EntitiesTaskResult(msrest.serialization.Model): """EntitiesTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult """ _attribute_map = { @@ -849,6 +1069,10 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult + """ super(EntitiesTaskResult, self).__init__(**kwargs) self.results = kwargs.get('results', None) @@ -858,20 +1082,20 @@ class Entity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Entity type. - :type category: str - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Entity type. + :vartype category: str + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float """ _validation = { @@ -895,6 +1119,22 @@ def __init__( self, **kwargs ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Entity type. + :paramtype category: str + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ super(Entity, self).__init__(**kwargs) self.text = kwargs['text'] self.category = kwargs['category'] @@ -909,15 +1149,15 @@ class EntityLinkingResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLinkedEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLinkedEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -937,6 +1177,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLinkedEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(EntityLinkingResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -947,10 +1198,10 @@ def __init__( class EntityLinkingTask(msrest.serialization.Model): """EntityLinkingTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.EntityLinkingTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.EntityLinkingTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -962,6 +1213,12 @@ def __init__( self, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.EntityLinkingTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(EntityLinkingTask, self).__init__(**kwargs) self.parameters = kwargs.get('parameters', None) self.task_name = kwargs.get('task_name', None) @@ -970,13 +1227,13 @@ def __init__( class EntityLinkingTaskParameters(msrest.serialization.Model): """EntityLinkingTaskParameters. - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + :vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType """ _attribute_map = { @@ -989,6 +1246,15 @@ def __init__( self, **kwargs ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + """ super(EntityLinkingTaskParameters, self).__init__(**kwargs) self.model_version = kwargs.get('model_version', "latest") self.logging_opt_out = kwargs.get('logging_opt_out', False) @@ -998,8 +1264,8 @@ def __init__( class EntityLinkingTaskResult(msrest.serialization.Model): """EntityLinkingTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult """ _attribute_map = { @@ -1010,6 +1276,10 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult + """ super(EntityLinkingTaskResult, self).__init__(**kwargs) self.results = kwargs.get('results', None) @@ -1019,8 +1289,8 @@ class ErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError """ _validation = { @@ -1035,6 +1305,10 @@ def __init__( self, **kwargs ): + """ + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError + """ super(ErrorResponse, self).__init__(**kwargs) self.error = kwargs['error'] @@ -1042,15 +1316,15 @@ def __init__( class HealthcareAssertion(msrest.serialization.Model): """HealthcareAssertion. - :param conditionality: Describes any conditionality on the entity. Possible values include: + :ivar conditionality: Describes any conditionality on the entity. Possible values include: "hypothetical", "conditional". - :type conditionality: str or ~azure.ai.textanalytics.v3_1.models.Conditionality - :param certainty: Describes the entities certainty and polarity. Possible values include: + :vartype conditionality: str or ~azure.ai.textanalytics.v3_1.models.Conditionality + :ivar certainty: Describes the entities certainty and polarity. Possible values include: "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". - :type certainty: str or ~azure.ai.textanalytics.v3_1.models.Certainty - :param association: Describes if the entity is the subject of the text or if it describes + :vartype certainty: str or ~azure.ai.textanalytics.v3_1.models.Certainty + :ivar association: Describes if the entity is the subject of the text or if it describes someone else. Possible values include: "subject", "other". - :type association: str or ~azure.ai.textanalytics.v3_1.models.Association + :vartype association: str or ~azure.ai.textanalytics.v3_1.models.Association """ _attribute_map = { @@ -1063,6 +1337,17 @@ def __init__( self, **kwargs ): + """ + :keyword conditionality: Describes any conditionality on the entity. Possible values include: + "hypothetical", "conditional". + :paramtype conditionality: str or ~azure.ai.textanalytics.v3_1.models.Conditionality + :keyword certainty: Describes the entities certainty and polarity. Possible values include: + "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". + :paramtype certainty: str or ~azure.ai.textanalytics.v3_1.models.Certainty + :keyword association: Describes if the entity is the subject of the text or if it describes + someone else. Possible values include: "subject", "other". + :paramtype association: str or ~azure.ai.textanalytics.v3_1.models.Association + """ super(HealthcareAssertion, self).__init__(**kwargs) self.conditionality = kwargs.get('conditionality', None) self.certainty = kwargs.get('certainty', None) @@ -1072,13 +1357,13 @@ def __init__( class HealthcareLinkingProperties(msrest.serialization.Model): """HealthcareLinkingProperties. - :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion - :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + :ivar assertion: + :vartype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion + :ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - :type name: str - :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] + :vartype name: str + :ivar links: Entity references in known data sources. + :vartype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] """ _attribute_map = { @@ -1091,6 +1376,15 @@ def __init__( self, **kwargs ): + """ + :keyword assertion: + :paramtype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion + :keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :paramtype name: str + :keyword links: Entity references in known data sources. + :paramtype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] + """ super(HealthcareLinkingProperties, self).__init__(**kwargs) self.assertion = kwargs.get('assertion', None) self.name = kwargs.get('name', None) @@ -1102,25 +1396,25 @@ class HealthcareEntityProperties(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Healthcare Entity Category. Possible values include: + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Healthcare Entity Category. Possible values include: "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' + :vartype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float """ _validation = { @@ -1144,6 +1438,27 @@ def __init__( self, **kwargs ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :paramtype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ super(HealthcareEntityProperties, self).__init__(**kwargs) self.text = kwargs['text'] self.category = kwargs['category'] @@ -1158,32 +1473,32 @@ class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): All required parameters must be populated in order to send to Azure. - :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion - :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + :ivar assertion: + :vartype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion + :ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - :type name: str - :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Healthcare Entity Category. Possible values include: + :vartype name: str + :ivar links: Entity references in known data sources. + :vartype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Healthcare Entity Category. Possible values include: "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' + :vartype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float """ _validation = { @@ -1210,6 +1525,34 @@ def __init__( self, **kwargs ): + """ + :keyword assertion: + :paramtype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion + :keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :paramtype name: str + :keyword links: Entity references in known data sources. + :paramtype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :paramtype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ super(HealthcareEntity, self).__init__(**kwargs) self.assertion = kwargs.get('assertion', None) self.name = kwargs.get('name', None) @@ -1227,10 +1570,10 @@ class HealthcareEntityLink(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. - :type data_source: str - :param id: Required. Entity id in the given source catalog. - :type id: str + :ivar data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. + :vartype data_source: str + :ivar id: Required. Entity id in the given source catalog. + :vartype id: str """ _validation = { @@ -1247,6 +1590,12 @@ def __init__( self, **kwargs ): + """ + :keyword data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. + :paramtype data_source: str + :keyword id: Required. Entity id in the given source catalog. + :paramtype id: str + """ super(HealthcareEntityLink, self).__init__(**kwargs) self.data_source = kwargs['data_source'] self.id = kwargs['id'] @@ -1255,10 +1604,10 @@ def __init__( class HealthcareTaskResult(msrest.serialization.Model): """HealthcareTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] """ _attribute_map = { @@ -1270,6 +1619,12 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + """ super(HealthcareTaskResult, self).__init__(**kwargs) self.results = kwargs.get('results', None) self.errors = kwargs.get('errors', None) @@ -1280,23 +1635,23 @@ class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] - :param next_link: - :type next_link: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar next_link: + :vartype next_link: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -1321,6 +1676,25 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :keyword next_link: + :paramtype next_link: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(HealthcareJobState, self).__init__(**kwargs) self.results = kwargs.get('results', None) self.errors = kwargs.get('errors', None) @@ -1345,16 +1719,16 @@ class HealthcareRelation(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or + :ivar relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". - :type relation_type: str or ~azure.ai.textanalytics.v3_1.models.RelationType - :param entities: Required. The entities in the relation. - :type entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelationEntity] + :vartype relation_type: str or ~azure.ai.textanalytics.v3_1.models.RelationType + :ivar entities: Required. The entities in the relation. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelationEntity] """ _validation = { @@ -1371,6 +1745,18 @@ def __init__( self, **kwargs ): + """ + :keyword relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or + 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", + "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", + "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", + "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", + "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", + "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". + :paramtype relation_type: str or ~azure.ai.textanalytics.v3_1.models.RelationType + :keyword entities: Required. The entities in the relation. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelationEntity] + """ super(HealthcareRelation, self).__init__(**kwargs) self.relation_type = kwargs['relation_type'] self.entities = kwargs['entities'] @@ -1381,13 +1767,13 @@ class HealthcareRelationEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment + :ivar ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity . - :type ref: str - :param role: Required. Role of entity in the relationship. For example: 'CD20-positive diffuse + :vartype ref: str + :ivar role: Required. Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). - :type role: str + :vartype role: str """ _validation = { @@ -1404,6 +1790,15 @@ def __init__( self, **kwargs ): + """ + :keyword ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment + Identifier Representation), pointing to the entity . + :paramtype ref: str + :keyword role: Required. Role of entity in the relationship. For example: 'CD20-positive + diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: + CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). + :paramtype role: str + """ super(HealthcareRelationEntity, self).__init__(**kwargs) self.ref = kwargs['ref'] self.role = kwargs['role'] @@ -1414,15 +1809,15 @@ class HealthcareResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentHealthcareEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentHealthcareEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -1442,6 +1837,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentHealthcareEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(HealthcareResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -1454,19 +1860,19 @@ class InnerError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "InvalidParameterValue", + :ivar code: Required. Error code. Possible values include: "InvalidParameterValue", "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", "InvalidCountryHint". - :type code: str or ~azure.ai.textanalytics.v3_1.models.InnerErrorCodeValue - :param message: Required. Error message. - :type message: str - :param details: Error details. - :type details: dict[str, str] - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_1.models.InnerError + :vartype code: str or ~azure.ai.textanalytics.v3_1.models.InnerErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar details: Error details. + :vartype details: dict[str, str] + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError """ _validation = { @@ -1486,6 +1892,21 @@ def __init__( self, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". + :paramtype code: str or ~azure.ai.textanalytics.v3_1.models.InnerErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword details: Error details. + :paramtype details: dict[str, str] + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError + """ super(InnerError, self).__init__(**kwargs) self.code = kwargs['code'] self.message = kwargs['message'] @@ -1497,16 +1918,17 @@ def __init__( class JobManifestTasks(msrest.serialization.Model): """The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :param entity_recognition_tasks: - :type entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.EntitiesTask] - :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.PiiTask] - :param key_phrase_extraction_tasks: - :type key_phrase_extraction_tasks: list[~azure.ai.textanalytics.v3_1.models.KeyPhrasesTask] - :param entity_linking_tasks: - :type entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.EntityLinkingTask] - :param sentiment_analysis_tasks: - :type sentiment_analysis_tasks: list[~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTask] + :ivar entity_recognition_tasks: + :vartype entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.EntitiesTask] + :ivar entity_recognition_pii_tasks: + :vartype entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.PiiTask] + :ivar key_phrase_extraction_tasks: + :vartype key_phrase_extraction_tasks: list[~azure.ai.textanalytics.v3_1.models.KeyPhrasesTask] + :ivar entity_linking_tasks: + :vartype entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.EntityLinkingTask] + :ivar sentiment_analysis_tasks: + :vartype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTask] """ _attribute_map = { @@ -1521,6 +1943,20 @@ def __init__( self, **kwargs ): + """ + :keyword entity_recognition_tasks: + :paramtype entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.EntitiesTask] + :keyword entity_recognition_pii_tasks: + :paramtype entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.PiiTask] + :keyword key_phrase_extraction_tasks: + :paramtype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_1.models.KeyPhrasesTask] + :keyword entity_linking_tasks: + :paramtype entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.EntityLinkingTask] + :keyword sentiment_analysis_tasks: + :paramtype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTask] + """ super(JobManifestTasks, self).__init__(**kwargs) self.entity_recognition_tasks = kwargs.get('entity_recognition_tasks', None) self.entity_recognition_pii_tasks = kwargs.get('entity_recognition_pii_tasks', None) @@ -1534,15 +1970,15 @@ class KeyPhraseResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentKeyPhrases] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentKeyPhrases] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -1562,6 +1998,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentKeyPhrases] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(KeyPhraseResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -1572,10 +2019,10 @@ def __init__( class KeyPhrasesTask(msrest.serialization.Model): """KeyPhrasesTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.KeyPhrasesTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.KeyPhrasesTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -1587,6 +2034,12 @@ def __init__( self, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.KeyPhrasesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(KeyPhrasesTask, self).__init__(**kwargs) self.parameters = kwargs.get('parameters', None) self.task_name = kwargs.get('task_name', None) @@ -1595,10 +2048,10 @@ def __init__( class KeyPhrasesTaskParameters(msrest.serialization.Model): """KeyPhrasesTaskParameters. - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool """ _attribute_map = { @@ -1610,6 +2063,12 @@ def __init__( self, **kwargs ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + """ super(KeyPhrasesTaskParameters, self).__init__(**kwargs) self.model_version = kwargs.get('model_version', "latest") self.logging_opt_out = kwargs.get('logging_opt_out', False) @@ -1618,8 +2077,8 @@ def __init__( class KeyPhraseTaskResult(msrest.serialization.Model): """KeyPhraseTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult """ _attribute_map = { @@ -1630,6 +2089,10 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult + """ super(KeyPhraseTaskResult, self).__init__(**kwargs) self.results = kwargs.get('results', None) @@ -1639,8 +2102,8 @@ class LanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. - :type documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput] + :ivar documents: Required. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput] """ _validation = { @@ -1655,6 +2118,10 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput] + """ super(LanguageBatchInput, self).__init__(**kwargs) self.documents = kwargs['documents'] @@ -1664,12 +2131,12 @@ class LanguageInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param text: Required. - :type text: str - :param country_hint: - :type country_hint: str + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. + :vartype text: str + :ivar country_hint: + :vartype country_hint: str """ _validation = { @@ -1687,6 +2154,14 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. + :paramtype text: str + :keyword country_hint: + :paramtype country_hint: str + """ super(LanguageInput, self).__init__(**kwargs) self.id = kwargs['id'] self.text = kwargs['text'] @@ -1698,15 +2173,15 @@ class LanguageResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLanguage] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLanguage] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -1726,6 +2201,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLanguage] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(LanguageResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -1738,21 +2224,20 @@ class LinkedEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Entity Linking formal name. - :type name: str - :param matches: Required. List of instances this entity appears in the text. - :type matches: list[~azure.ai.textanalytics.v3_1.models.Match] - :param language: Required. Language used in the data source. - :type language: str - :param id: Unique identifier of the recognized entity from the data source. - :type id: str - :param url: Required. URL for the entity's page from the data source. - :type url: str - :param data_source: Required. Data source used to extract entity linking, such as Wiki/Bing - etc. - :type data_source: str - :param bing_id: Bing Entity Search API unique identifier of the recognized entity. - :type bing_id: str + :ivar name: Required. Entity Linking formal name. + :vartype name: str + :ivar matches: Required. List of instances this entity appears in the text. + :vartype matches: list[~azure.ai.textanalytics.v3_1.models.Match] + :ivar language: Required. Language used in the data source. + :vartype language: str + :ivar id: Unique identifier of the recognized entity from the data source. + :vartype id: str + :ivar url: Required. URL for the entity's page from the data source. + :vartype url: str + :ivar data_source: Required. Data source used to extract entity linking, such as Wiki/Bing etc. + :vartype data_source: str + :ivar bing_id: Bing Entity Search API unique identifier of the recognized entity. + :vartype bing_id: str """ _validation = { @@ -1777,6 +2262,23 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Entity Linking formal name. + :paramtype name: str + :keyword matches: Required. List of instances this entity appears in the text. + :paramtype matches: list[~azure.ai.textanalytics.v3_1.models.Match] + :keyword language: Required. Language used in the data source. + :paramtype language: str + :keyword id: Unique identifier of the recognized entity from the data source. + :paramtype id: str + :keyword url: Required. URL for the entity's page from the data source. + :paramtype url: str + :keyword data_source: Required. Data source used to extract entity linking, such as Wiki/Bing + etc. + :paramtype data_source: str + :keyword bing_id: Bing Entity Search API unique identifier of the recognized entity. + :paramtype bing_id: str + """ super(LinkedEntity, self).__init__(**kwargs) self.name = kwargs['name'] self.matches = kwargs['matches'] @@ -1792,15 +2294,15 @@ class Match(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param confidence_score: Required. If a well known item is recognized, a decimal number - denoting the confidence level between 0 and 1 will be returned. - :type confidence_score: float - :param text: Required. Entity text as appears in the request. - :type text: str - :param offset: Required. Start position for the entity match text. - :type offset: int - :param length: Required. Length for the entity match text. - :type length: int + :ivar confidence_score: Required. If a well known item is recognized, a decimal number denoting + the confidence level between 0 and 1 will be returned. + :vartype confidence_score: float + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar offset: Required. Start position for the entity match text. + :vartype offset: int + :ivar length: Required. Length for the entity match text. + :vartype length: int """ _validation = { @@ -1821,6 +2323,17 @@ def __init__( self, **kwargs ): + """ + :keyword confidence_score: Required. If a well known item is recognized, a decimal number + denoting the confidence level between 0 and 1 will be returned. + :paramtype confidence_score: float + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword offset: Required. Start position for the entity match text. + :paramtype offset: int + :keyword length: Required. Length for the entity match text. + :paramtype length: int + """ super(Match, self).__init__(**kwargs) self.confidence_score = kwargs['confidence_score'] self.text = kwargs['text'] @@ -1833,8 +2346,8 @@ class MultiLanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput] + :ivar documents: Required. The set of documents to process as part of this batch. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput] """ _validation = { @@ -1849,6 +2362,10 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. The set of documents to process as part of this batch. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput] + """ super(MultiLanguageBatchInput, self).__init__(**kwargs) self.documents = kwargs['documents'] @@ -1858,14 +2375,14 @@ class MultiLanguageInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. A unique, non-empty document identifier. - :type id: str - :param text: Required. The input text to process. - :type text: str - :param language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + :ivar id: Required. A unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. The input text to process. + :vartype text: str + :ivar language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. - :type language: str + :vartype language: str """ _validation = { @@ -1883,6 +2400,16 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. A unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. The input text to process. + :paramtype text: str + :keyword language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + """ super(MultiLanguageInput, self).__init__(**kwargs) self.id = kwargs['id'] self.text = kwargs['text'] @@ -1894,17 +2421,17 @@ class PiiDocumentEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param redacted_text: Required. Returns redacted text. - :type redacted_text: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_1.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar redacted_text: Required. Returns redacted text. + :vartype redacted_text: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -1926,6 +2453,19 @@ def __init__( self, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword redacted_text: Required. Returns redacted text. + :paramtype redacted_text: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(PiiDocumentEntities, self).__init__(**kwargs) self.id = kwargs['id'] self.redacted_text = kwargs['redacted_text'] @@ -1939,15 +2479,15 @@ class PiiResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.PiiDocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.PiiDocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -1967,6 +2507,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.PiiDocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(PiiResult, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -1977,10 +2528,10 @@ def __init__( class PiiTask(msrest.serialization.Model): """PiiTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.PiiTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.PiiTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -1992,6 +2543,12 @@ def __init__( self, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.PiiTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(PiiTask, self).__init__(**kwargs) self.parameters = kwargs.get('parameters', None) self.task_name = kwargs.get('task_name', None) @@ -2000,17 +2557,17 @@ def __init__( class PiiTaskParameters(msrest.serialization.Model): """PiiTaskParameters. - :param domain: Possible values include: "phi", "none". Default value: "none". - :type domain: str or ~azure.ai.textanalytics.v3_1.models.PiiTaskParametersDomain - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_1.models.PiiCategory] - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + :ivar domain: Possible values include: "phi", "none". Default value: "none". + :vartype domain: str or ~azure.ai.textanalytics.v3_1.models.PiiTaskParametersDomain + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar pii_categories: (Optional) describes the PII categories to return. + :vartype pii_categories: list[str or ~azure.ai.textanalytics.v3_1.models.PiiCategory] + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + :vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType """ _validation = { @@ -2029,6 +2586,19 @@ def __init__( self, **kwargs ): + """ + :keyword domain: Possible values include: "phi", "none". Default value: "none". + :paramtype domain: str or ~azure.ai.textanalytics.v3_1.models.PiiTaskParametersDomain + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword pii_categories: (Optional) describes the PII categories to return. + :paramtype pii_categories: list[str or ~azure.ai.textanalytics.v3_1.models.PiiCategory] + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + """ super(PiiTaskParameters, self).__init__(**kwargs) self.domain = kwargs.get('domain', "none") self.model_version = kwargs.get('model_version', "latest") @@ -2040,8 +2610,8 @@ def __init__( class PiiTaskResult(msrest.serialization.Model): """PiiTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.PiiResult + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.PiiResult """ _attribute_map = { @@ -2052,6 +2622,10 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.PiiResult + """ super(PiiTaskResult, self).__init__(**kwargs) self.results = kwargs.get('results', None) @@ -2061,16 +2635,16 @@ class RequestStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents_count: Required. Number of documents submitted in the request. - :type documents_count: int - :param valid_documents_count: Required. Number of valid documents. This excludes empty, + :ivar documents_count: Required. Number of documents submitted in the request. + :vartype documents_count: int + :ivar valid_documents_count: Required. Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. - :type valid_documents_count: int - :param erroneous_documents_count: Required. Number of invalid documents. This includes empty, + :vartype valid_documents_count: int + :ivar erroneous_documents_count: Required. Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. - :type erroneous_documents_count: int - :param transactions_count: Required. Number of transactions for the request. - :type transactions_count: long + :vartype erroneous_documents_count: int + :ivar transactions_count: Required. Number of transactions for the request. + :vartype transactions_count: long """ _validation = { @@ -2091,6 +2665,18 @@ def __init__( self, **kwargs ): + """ + :keyword documents_count: Required. Number of documents submitted in the request. + :paramtype documents_count: int + :keyword valid_documents_count: Required. Number of valid documents. This excludes empty, + over-size limit or non-supported languages documents. + :paramtype valid_documents_count: int + :keyword erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :paramtype erroneous_documents_count: int + :keyword transactions_count: Required. Number of transactions for the request. + :paramtype transactions_count: long + """ super(RequestStatistics, self).__init__(**kwargs) self.documents_count = kwargs['documents_count'] self.valid_documents_count = kwargs['valid_documents_count'] @@ -2103,19 +2689,19 @@ class SentenceAssessment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sentiment: Required. Assessment sentiment in the sentence. Possible values include: + :ivar sentiment: Required. Assessment sentiment in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue - :param confidence_scores: Required. Assessment sentiment confidence scores in the sentence. - :type confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel - :param offset: Required. The assessment offset from the start of the sentence. - :type offset: int - :param length: Required. The length of the assessment. - :type length: int - :param text: Required. The assessment text detected. - :type text: str - :param is_negated: Required. The indicator representing if the assessment is negated. - :type is_negated: bool + :vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue + :ivar confidence_scores: Required. Assessment sentiment confidence scores in the sentence. + :vartype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel + :ivar offset: Required. The assessment offset from the start of the sentence. + :vartype offset: int + :ivar length: Required. The length of the assessment. + :vartype length: int + :ivar text: Required. The assessment text detected. + :vartype text: str + :ivar is_negated: Required. The indicator representing if the assessment is negated. + :vartype is_negated: bool """ _validation = { @@ -2140,6 +2726,21 @@ def __init__( self, **kwargs ): + """ + :keyword sentiment: Required. Assessment sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue + :keyword confidence_scores: Required. Assessment sentiment confidence scores in the sentence. + :paramtype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel + :keyword offset: Required. The assessment offset from the start of the sentence. + :paramtype offset: int + :keyword length: Required. The length of the assessment. + :paramtype length: int + :keyword text: Required. The assessment text detected. + :paramtype text: str + :keyword is_negated: Required. The indicator representing if the assessment is negated. + :paramtype is_negated: bool + """ super(SentenceAssessment, self).__init__(**kwargs) self.sentiment = kwargs['sentiment'] self.confidence_scores = kwargs['confidence_scores'] @@ -2154,22 +2755,23 @@ class SentenceSentiment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. The sentence text. - :type text: str - :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: + :ivar text: Required. The sentence text. + :vartype text: str + :ivar sentiment: Required. The predicted Sentiment for the sentence. Possible values include: "positive", "neutral", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1.models.SentenceSentimentValue - :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + :vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.SentenceSentimentValue + :ivar confidence_scores: Required. The sentiment confidence score between 0 and 1 for the sentence for all classes. - :type confidence_scores: ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel - :param offset: Required. The sentence offset from the start of the document. - :type offset: int - :param length: Required. The length of the sentence. - :type length: int - :param targets: The array of sentence targets for the sentence. - :type targets: list[~azure.ai.textanalytics.v3_1.models.SentenceTarget] - :param assessments: The array of assessments for the sentence. - :type assessments: list[~azure.ai.textanalytics.v3_1.models.SentenceAssessment] + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel + :ivar offset: Required. The sentence offset from the start of the document. + :vartype offset: int + :ivar length: Required. The length of the sentence. + :vartype length: int + :ivar targets: The array of sentence targets for the sentence. + :vartype targets: list[~azure.ai.textanalytics.v3_1.models.SentenceTarget] + :ivar assessments: The array of assessments for the sentence. + :vartype assessments: list[~azure.ai.textanalytics.v3_1.models.SentenceAssessment] """ _validation = { @@ -2194,6 +2796,25 @@ def __init__( self, **kwargs ): + """ + :keyword text: Required. The sentence text. + :paramtype text: str + :keyword sentiment: Required. The predicted Sentiment for the sentence. Possible values + include: "positive", "neutral", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.SentenceSentimentValue + :keyword confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel + :keyword offset: Required. The sentence offset from the start of the document. + :paramtype offset: int + :keyword length: Required. The length of the sentence. + :paramtype length: int + :keyword targets: The array of sentence targets for the sentence. + :paramtype targets: list[~azure.ai.textanalytics.v3_1.models.SentenceTarget] + :keyword assessments: The array of assessments for the sentence. + :paramtype assessments: list[~azure.ai.textanalytics.v3_1.models.SentenceAssessment] + """ super(SentenceSentiment, self).__init__(**kwargs) self.text = kwargs['text'] self.sentiment = kwargs['sentiment'] @@ -2209,21 +2830,21 @@ class SentenceTarget(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sentiment: Required. Targeted sentiment in the sentence. Possible values include: + :ivar sentiment: Required. Targeted sentiment in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue - :param confidence_scores: Required. Target sentiment confidence scores for the target in the + :vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue + :ivar confidence_scores: Required. Target sentiment confidence scores for the target in the sentence. - :type confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel - :param offset: Required. The target offset from the start of the sentence. - :type offset: int - :param length: Required. The length of the target. - :type length: int - :param text: Required. The target text detected. - :type text: str - :param relations: Required. The array of either assessment or target objects which is related - to the target. - :type relations: list[~azure.ai.textanalytics.v3_1.models.TargetRelation] + :vartype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel + :ivar offset: Required. The target offset from the start of the sentence. + :vartype offset: int + :ivar length: Required. The length of the target. + :vartype length: int + :ivar text: Required. The target text detected. + :vartype text: str + :ivar relations: Required. The array of either assessment or target objects which is related to + the target. + :vartype relations: list[~azure.ai.textanalytics.v3_1.models.TargetRelation] """ _validation = { @@ -2248,6 +2869,23 @@ def __init__( self, **kwargs ): + """ + :keyword sentiment: Required. Targeted sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue + :keyword confidence_scores: Required. Target sentiment confidence scores for the target in the + sentence. + :paramtype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel + :keyword offset: Required. The target offset from the start of the sentence. + :paramtype offset: int + :keyword length: Required. The length of the target. + :paramtype length: int + :keyword text: Required. The target text detected. + :paramtype text: str + :keyword relations: Required. The array of either assessment or target objects which is related + to the target. + :paramtype relations: list[~azure.ai.textanalytics.v3_1.models.TargetRelation] + """ super(SentenceTarget, self).__init__(**kwargs) self.sentiment = kwargs['sentiment'] self.confidence_scores = kwargs['confidence_scores'] @@ -2260,10 +2898,10 @@ def __init__( class SentimentAnalysisTask(msrest.serialization.Model): """SentimentAnalysisTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -2275,6 +2913,12 @@ def __init__( self, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(SentimentAnalysisTask, self).__init__(**kwargs) self.parameters = kwargs.get('parameters', None) self.task_name = kwargs.get('task_name', None) @@ -2283,15 +2927,15 @@ def __init__( class SentimentAnalysisTaskParameters(msrest.serialization.Model): """SentimentAnalysisTaskParameters. - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param opinion_mining: - :type opinion_mining: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar opinion_mining: + :vartype opinion_mining: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + :vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType """ _attribute_map = { @@ -2305,6 +2949,17 @@ def __init__( self, **kwargs ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword opinion_mining: + :paramtype opinion_mining: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + """ super(SentimentAnalysisTaskParameters, self).__init__(**kwargs) self.model_version = kwargs.get('model_version', "latest") self.logging_opt_out = kwargs.get('logging_opt_out', False) @@ -2317,12 +2972,12 @@ class SentimentConfidenceScorePerLabel(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param positive: Required. - :type positive: float - :param neutral: Required. - :type neutral: float - :param negative: Required. - :type negative: float + :ivar positive: Required. + :vartype positive: float + :ivar neutral: Required. + :vartype neutral: float + :ivar negative: Required. + :vartype negative: float """ _validation = { @@ -2341,6 +2996,14 @@ def __init__( self, **kwargs ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword neutral: Required. + :paramtype neutral: float + :keyword negative: Required. + :paramtype negative: float + """ super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) self.positive = kwargs['positive'] self.neutral = kwargs['neutral'] @@ -2352,15 +3015,15 @@ class SentimentResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Sentiment analysis per document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentSentiment] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Sentiment analysis per document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentSentiment] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -2380,6 +3043,17 @@ def __init__( self, **kwargs ): + """ + :keyword documents: Required. Sentiment analysis per document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentSentiment] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(SentimentResponse, self).__init__(**kwargs) self.documents = kwargs['documents'] self.errors = kwargs['errors'] @@ -2390,8 +3064,8 @@ def __init__( class SentimentTaskResult(msrest.serialization.Model): """SentimentTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse """ _attribute_map = { @@ -2402,6 +3076,10 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse + """ super(SentimentTaskResult, self).__init__(**kwargs) self.results = kwargs.get('results', None) @@ -2411,10 +3089,10 @@ class TargetConfidenceScoreLabel(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param positive: Required. - :type positive: float - :param negative: Required. - :type negative: float + :ivar positive: Required. + :vartype positive: float + :ivar negative: Required. + :vartype negative: float """ _validation = { @@ -2431,6 +3109,12 @@ def __init__( self, **kwargs ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword negative: Required. + :paramtype negative: float + """ super(TargetConfidenceScoreLabel, self).__init__(**kwargs) self.positive = kwargs['positive'] self.negative = kwargs['negative'] @@ -2441,11 +3125,11 @@ class TargetRelation(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param relation_type: Required. The type related to the target. Possible values include: + :ivar relation_type: Required. The type related to the target. Possible values include: "assessment", "target". - :type relation_type: str or ~azure.ai.textanalytics.v3_1.models.TargetRelationType - :param ref: Required. The JSON pointer indicating the linked object. - :type ref: str + :vartype relation_type: str or ~azure.ai.textanalytics.v3_1.models.TargetRelationType + :ivar ref: Required. The JSON pointer indicating the linked object. + :vartype ref: str """ _validation = { @@ -2462,6 +3146,13 @@ def __init__( self, **kwargs ): + """ + :keyword relation_type: Required. The type related to the target. Possible values include: + "assessment", "target". + :paramtype relation_type: str or ~azure.ai.textanalytics.v3_1.models.TargetRelationType + :keyword ref: Required. The JSON pointer indicating the linked object. + :paramtype ref: str + """ super(TargetRelation, self).__init__(**kwargs) self.relation_type = kwargs['relation_type'] self.ref = kwargs['ref'] @@ -2472,28 +3163,28 @@ class TasksStateTasks(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param completed: Required. - :type completed: int - :param failed: Required. - :type failed: int - :param in_progress: Required. - :type in_progress: int - :param total: Required. - :type total: int - :param entity_recognition_tasks: - :type entity_recognition_tasks: + :ivar completed: Required. + :vartype completed: int + :ivar failed: Required. + :vartype failed: int + :ivar in_progress: Required. + :vartype in_progress: int + :ivar total: Required. + :vartype total: int + :ivar entity_recognition_tasks: + :vartype entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionTasksItem] - :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: + :ivar entity_recognition_pii_tasks: + :vartype entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionPiiTasksItem] - :param key_phrase_extraction_tasks: - :type key_phrase_extraction_tasks: + :ivar key_phrase_extraction_tasks: + :vartype key_phrase_extraction_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksKeyPhraseExtractionTasksItem] - :param entity_linking_tasks: - :type entity_linking_tasks: + :ivar entity_linking_tasks: + :vartype entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityLinkingTasksItem] - :param sentiment_analysis_tasks: - :type sentiment_analysis_tasks: + :ivar sentiment_analysis_tasks: + :vartype sentiment_analysis_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksSentimentAnalysisTasksItem] """ @@ -2520,6 +3211,31 @@ def __init__( self, **kwargs ): + """ + :keyword completed: Required. + :paramtype completed: int + :keyword failed: Required. + :paramtype failed: int + :keyword in_progress: Required. + :paramtype in_progress: int + :keyword total: Required. + :paramtype total: int + :keyword entity_recognition_tasks: + :paramtype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionTasksItem] + :keyword entity_recognition_pii_tasks: + :paramtype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionPiiTasksItem] + :keyword key_phrase_extraction_tasks: + :paramtype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksKeyPhraseExtractionTasksItem] + :keyword entity_linking_tasks: + :paramtype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityLinkingTasksItem] + :keyword sentiment_analysis_tasks: + :paramtype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksSentimentAnalysisTasksItem] + """ super(TasksStateTasks, self).__init__(**kwargs) self.completed = kwargs['completed'] self.failed = kwargs['failed'] @@ -2537,13 +3253,13 @@ class TaskState(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -2562,6 +3278,15 @@ def __init__( self, **kwargs ): + """ + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TaskState, self).__init__(**kwargs) self.last_update_date_time = kwargs['last_update_date_time'] self.task_name = kwargs['task_name'] @@ -2573,15 +3298,15 @@ class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -2601,6 +3326,17 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksEntityLinkingTasksItem, self).__init__(**kwargs) self.results = kwargs.get('results', None) self.last_update_date_time = kwargs['last_update_date_time'] @@ -2613,15 +3349,15 @@ class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.PiiResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.PiiResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -2641,6 +3377,17 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.PiiResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksEntityRecognitionPiiTasksItem, self).__init__(**kwargs) self.results = kwargs.get('results', None) self.last_update_date_time = kwargs['last_update_date_time'] @@ -2653,15 +3400,15 @@ class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -2681,6 +3428,17 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksEntityRecognitionTasksItem, self).__init__(**kwargs) self.results = kwargs.get('results', None) self.last_update_date_time = kwargs['last_update_date_time'] @@ -2693,15 +3451,15 @@ class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -2721,6 +3479,17 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksKeyPhraseExtractionTasksItem, self).__init__(**kwargs) self.results = kwargs.get('results', None) self.last_update_date_time = kwargs['last_update_date_time'] @@ -2733,15 +3502,15 @@ class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -2761,6 +3530,17 @@ def __init__( self, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksSentimentAnalysisTasksItem, self).__init__(**kwargs) self.results = kwargs.get('results', None) self.last_update_date_time = kwargs['last_update_date_time'] @@ -2773,17 +3553,17 @@ class TextAnalyticsError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "InvalidRequest", - "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". - :type code: str or ~azure.ai.textanalytics.v3_1.models.ErrorCodeValue - :param message: Required. Error message. - :type message: str - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_1.models.InnerError - :param details: Details about specific errors that led to this reported error. - :type details: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar code: Required. Error code. Possible values include: "InvalidRequest", "InvalidArgument", + "InternalServerError", "ServiceUnavailable", "NotFound". + :vartype code: str or ~azure.ai.textanalytics.v3_1.models.ErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError + :ivar details: Details about specific errors that led to this reported error. + :vartype details: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] """ _validation = { @@ -2803,6 +3583,19 @@ def __init__( self, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "InvalidRequest", + "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". + :paramtype code: str or ~azure.ai.textanalytics.v3_1.models.ErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError + :keyword details: Details about specific errors that led to this reported error. + :paramtype details: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + """ super(TextAnalyticsError, self).__init__(**kwargs) self.code = kwargs['code'] self.message = kwargs['message'] @@ -2816,13 +3609,13 @@ class TextAnalyticsWarning(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "LongWordsInDocument", + :ivar code: Required. Error code. Possible values include: "LongWordsInDocument", "DocumentTruncated". - :type code: str or ~azure.ai.textanalytics.v3_1.models.WarningCodeValue - :param message: Required. Warning message. - :type message: str - :param target_ref: A JSON pointer reference indicating the target object. - :type target_ref: str + :vartype code: str or ~azure.ai.textanalytics.v3_1.models.WarningCodeValue + :ivar message: Required. Warning message. + :vartype message: str + :ivar target_ref: A JSON pointer reference indicating the target object. + :vartype target_ref: str """ _validation = { @@ -2840,6 +3633,15 @@ def __init__( self, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :paramtype code: str or ~azure.ai.textanalytics.v3_1.models.WarningCodeValue + :keyword message: Required. Warning message. + :paramtype message: str + :keyword target_ref: A JSON pointer reference indicating the target object. + :paramtype target_ref: str + """ super(TextAnalyticsWarning, self).__init__(**kwargs) self.code = kwargs['code'] self.message = kwargs['message'] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py index 956013a60c86..bd19b6e79753 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_models_py3.py @@ -20,9 +20,9 @@ class AnalysisInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param analysis_input: Required. Contains a set of input documents to be analyzed by the + :ivar analysis_input: Required. Contains a set of input documents to be analyzed by the service. - :type analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput + :vartype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput """ _validation = { @@ -39,6 +39,11 @@ def __init__( analysis_input: "MultiLanguageBatchInput", **kwargs ): + """ + :keyword analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :paramtype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput + """ super(AnalysisInput, self).__init__(**kwargs) self.analysis_input = analysis_input @@ -48,9 +53,9 @@ class JobManifest(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the + :ivar tasks: Required. The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks + :vartype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks """ _validation = { @@ -67,6 +72,11 @@ def __init__( tasks: "JobManifestTasks", **kwargs ): + """ + :keyword tasks: Required. The set of tasks to execute on the input documents. Cannot specify + the same task more than once. + :paramtype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks + """ super(JobManifest, self).__init__(**kwargs) self.tasks = tasks @@ -74,8 +84,8 @@ def __init__( class JobDescriptor(msrest.serialization.Model): """JobDescriptor. - :param display_name: Optional display name for the analysis job. - :type display_name: str + :ivar display_name: Optional display name for the analysis job. + :vartype display_name: str """ _attribute_map = { @@ -88,6 +98,10 @@ def __init__( display_name: Optional[str] = None, **kwargs ): + """ + :keyword display_name: Optional display name for the analysis job. + :paramtype display_name: str + """ super(JobDescriptor, self).__init__(**kwargs) self.display_name = display_name @@ -97,14 +111,14 @@ class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest): All required parameters must be populated in order to send to Azure. - :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the + :ivar tasks: Required. The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks - :param analysis_input: Required. Contains a set of input documents to be analyzed by the + :vartype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks + :ivar analysis_input: Required. Contains a set of input documents to be analyzed by the service. - :type analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput - :param display_name: Optional display name for the analysis job. - :type display_name: str + :vartype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput + :ivar display_name: Optional display name for the analysis job. + :vartype display_name: str """ _validation = { @@ -126,6 +140,16 @@ def __init__( display_name: Optional[str] = None, **kwargs ): + """ + :keyword tasks: Required. The set of tasks to execute on the input documents. Cannot specify + the same task more than once. + :paramtype tasks: ~azure.ai.textanalytics.v3_1.models.JobManifestTasks + :keyword analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :paramtype analysis_input: ~azure.ai.textanalytics.v3_1.models.MultiLanguageBatchInput + :keyword display_name: Optional display name for the analysis job. + :paramtype display_name: str + """ super(AnalyzeBatchInput, self).__init__(display_name=display_name, analysis_input=analysis_input, tasks=tasks, **kwargs) self.tasks = tasks self.analysis_input = analysis_input @@ -138,8 +162,8 @@ def __init__( class AnalyzeJobDisplayName(msrest.serialization.Model): """AnalyzeJobDisplayName. - :param display_name: - :type display_name: str + :ivar display_name: + :vartype display_name: str """ _attribute_map = { @@ -152,6 +176,10 @@ def __init__( display_name: Optional[str] = None, **kwargs ): + """ + :keyword display_name: + :paramtype display_name: str + """ super(AnalyzeJobDisplayName, self).__init__(**kwargs) self.display_name = display_name @@ -159,11 +187,11 @@ def __init__( class AnalyzeJobErrorsAndStatistics(msrest.serialization.Model): """AnalyzeJobErrorsAndStatistics. - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics """ _attribute_map = { @@ -178,6 +206,13 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + """ super(AnalyzeJobErrorsAndStatistics, self).__init__(**kwargs) self.errors = errors self.statistics = statistics @@ -188,17 +223,17 @@ class JobMetadata(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -226,6 +261,19 @@ def __init__( expiration_date_time: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(JobMetadata, self).__init__(**kwargs) self.created_date_time = created_date_time self.expiration_date_time = expiration_date_time @@ -239,19 +287,19 @@ class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName): All required parameters must be populated in order to send to Azure. - :param display_name: - :type display_name: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar display_name: + :vartype display_name: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -281,6 +329,21 @@ def __init__( expiration_date_time: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword display_name: + :paramtype display_name: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(AnalyzeJobMetadata, self).__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, display_name=display_name, **kwargs) self.display_name = display_name self.created_date_time = created_date_time @@ -293,8 +356,8 @@ def __init__( class Pagination(msrest.serialization.Model): """Pagination. - :param next_link: - :type next_link: str + :ivar next_link: + :vartype next_link: str """ _attribute_map = { @@ -307,6 +370,10 @@ def __init__( next_link: Optional[str] = None, **kwargs ): + """ + :keyword next_link: + :paramtype next_link: str + """ super(Pagination, self).__init__(**kwargs) self.next_link = next_link @@ -316,8 +383,8 @@ class TasksState(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks + :ivar tasks: Required. + :vartype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks """ _validation = { @@ -334,6 +401,10 @@ def __init__( tasks: "TasksStateTasks", **kwargs ): + """ + :keyword tasks: Required. + :paramtype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks + """ super(TasksState, self).__init__(**kwargs) self.tasks = tasks @@ -343,28 +414,28 @@ class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatist All required parameters must be populated in order to send to Azure. - :param next_link: - :type next_link: str - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar next_link: + :vartype next_link: str + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks - :param display_name: - :type display_name: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar tasks: Required. + :vartype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks + :ivar display_name: + :vartype display_name: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -403,6 +474,30 @@ def __init__( expiration_date_time: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword next_link: + :paramtype next_link: str + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword tasks: Required. + :paramtype tasks: ~azure.ai.textanalytics.v3_1.models.TasksStateTasks + :keyword display_name: + :paramtype display_name: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(AnalyzeJobState, self).__init__(display_name=display_name, created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, tasks=tasks, errors=errors, statistics=statistics, next_link=next_link, **kwargs) self.next_link = next_link self.errors = errors @@ -441,14 +536,14 @@ class DetectedLanguage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Long name of a detected language (e.g. English, French). - :type name: str - :param iso6391_name: Required. A two letter representation of the detected language according - to the ISO 639-1 standard (e.g. en, fr). - :type iso6391_name: str - :param confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + :ivar name: Required. Long name of a detected language (e.g. English, French). + :vartype name: str + :ivar iso6391_name: Required. A two letter representation of the detected language according to + the ISO 639-1 standard (e.g. en, fr). + :vartype iso6391_name: str + :ivar confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true. - :type confidence_score: float + :vartype confidence_score: float """ _validation = { @@ -471,6 +566,16 @@ def __init__( confidence_score: float, **kwargs ): + """ + :keyword name: Required. Long name of a detected language (e.g. English, French). + :paramtype name: str + :keyword iso6391_name: Required. A two letter representation of the detected language according + to the ISO 639-1 standard (e.g. en, fr). + :paramtype iso6391_name: str + :keyword confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :paramtype confidence_score: float + """ super(DetectedLanguage, self).__init__(**kwargs) self.name = name self.iso6391_name = iso6391_name @@ -482,15 +587,15 @@ class DocumentEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_1.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -515,6 +620,17 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentEntities, self).__init__(**kwargs) self.id = id self.entities = entities @@ -527,10 +643,10 @@ class DocumentError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Document Id. - :type id: str - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError + :ivar id: Required. Document Id. + :vartype id: str + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError """ _validation = { @@ -550,6 +666,12 @@ def __init__( error: "TextAnalyticsError", **kwargs ): + """ + :keyword id: Required. Document Id. + :paramtype id: str + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError + """ super(DocumentError, self).__init__(**kwargs) self.id = id self.error = error @@ -560,17 +682,17 @@ class DocumentHealthcareEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Healthcare entities. - :type entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntity] - :param relations: Required. Healthcare entity relations. - :type relations: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelation] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Healthcare entities. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntity] + :ivar relations: Required. Healthcare entity relations. + :vartype relations: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelation] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -598,6 +720,19 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Healthcare entities. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntity] + :keyword relations: Required. Healthcare entity relations. + :paramtype relations: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelation] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentHealthcareEntities, self).__init__(**kwargs) self.id = id self.entities = entities @@ -611,16 +746,16 @@ class DocumentKeyPhrases(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param key_phrases: Required. A list of representative words or phrases. The number of key + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar key_phrases: Required. A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document. - :type key_phrases: list[str] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :vartype key_phrases: list[str] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -645,6 +780,18 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :paramtype key_phrases: list[str] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentKeyPhrases, self).__init__(**kwargs) self.id = id self.key_phrases = key_phrases @@ -657,15 +804,15 @@ class DocumentLanguage(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param detected_language: Required. Detected Language. - :type detected_language: ~azure.ai.textanalytics.v3_1.models.DetectedLanguage - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar detected_language: Required. Detected Language. + :vartype detected_language: ~azure.ai.textanalytics.v3_1.models.DetectedLanguage + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -690,6 +837,17 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword detected_language: Required. Detected Language. + :paramtype detected_language: ~azure.ai.textanalytics.v3_1.models.DetectedLanguage + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentLanguage, self).__init__(**kwargs) self.id = id self.detected_language = detected_language @@ -702,15 +860,15 @@ class DocumentLinkedEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized well known entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_1.models.LinkedEntity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized well known entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.LinkedEntity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -735,6 +893,17 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized well known entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.LinkedEntity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(DocumentLinkedEntities, self).__init__(**kwargs) self.id = id self.entities = entities @@ -747,21 +916,22 @@ class DocumentSentiment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). Possible values include: "positive", "neutral", "negative", "mixed". - :type sentiment: str or ~azure.ai.textanalytics.v3_1.models.DocumentSentimentValue - :param statistics: if showStats=true was specified in the request this field will contain + :vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.DocumentSentimentValue + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics - :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :ivar confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 for each sentiment class. - :type confidence_scores: ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel - :param sentences: Required. Sentence level sentiment analysis. - :type sentences: list[~azure.ai.textanalytics.v3_1.models.SentenceSentiment] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel + :ivar sentences: Required. Sentence level sentiment analysis. + :vartype sentences: list[~azure.ai.textanalytics.v3_1.models.SentenceSentiment] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] """ _validation = { @@ -792,6 +962,24 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.DocumentSentimentValue + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :keyword confidence_scores: Required. Document level sentiment confidence scores between 0 and + 1 for each sentiment class. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel + :keyword sentences: Required. Sentence level sentiment analysis. + :paramtype sentences: list[~azure.ai.textanalytics.v3_1.models.SentenceSentiment] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + """ super(DocumentSentiment, self).__init__(**kwargs) self.id = id self.sentiment = sentiment @@ -806,10 +994,10 @@ class DocumentStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param characters_count: Required. Number of text elements recognized in the document. - :type characters_count: int - :param transactions_count: Required. Number of transactions for the document. - :type transactions_count: int + :ivar characters_count: Required. Number of text elements recognized in the document. + :vartype characters_count: int + :ivar transactions_count: Required. Number of transactions for the document. + :vartype transactions_count: int """ _validation = { @@ -829,6 +1017,12 @@ def __init__( transactions_count: int, **kwargs ): + """ + :keyword characters_count: Required. Number of text elements recognized in the document. + :paramtype characters_count: int + :keyword transactions_count: Required. Number of transactions for the document. + :paramtype transactions_count: int + """ super(DocumentStatistics, self).__init__(**kwargs) self.characters_count = characters_count self.transactions_count = transactions_count @@ -839,15 +1033,15 @@ class EntitiesResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -872,6 +1066,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(EntitiesResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -882,10 +1087,10 @@ def __init__( class EntitiesTask(msrest.serialization.Model): """EntitiesTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.EntitiesTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.EntitiesTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -900,6 +1105,12 @@ def __init__( task_name: Optional[str] = None, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.EntitiesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(EntitiesTask, self).__init__(**kwargs) self.parameters = parameters self.task_name = task_name @@ -908,13 +1119,13 @@ def __init__( class EntitiesTaskParameters(msrest.serialization.Model): """EntitiesTaskParameters. - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + :vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType """ _attribute_map = { @@ -931,6 +1142,15 @@ def __init__( string_index_type: Optional[Union[str, "StringIndexType"]] = None, **kwargs ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + """ super(EntitiesTaskParameters, self).__init__(**kwargs) self.model_version = model_version self.logging_opt_out = logging_opt_out @@ -940,8 +1160,8 @@ def __init__( class EntitiesTaskResult(msrest.serialization.Model): """EntitiesTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult """ _attribute_map = { @@ -954,6 +1174,10 @@ def __init__( results: Optional["EntitiesResult"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult + """ super(EntitiesTaskResult, self).__init__(**kwargs) self.results = results @@ -963,20 +1187,20 @@ class Entity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Entity type. - :type category: str - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Entity type. + :vartype category: str + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float """ _validation = { @@ -1007,6 +1231,22 @@ def __init__( subcategory: Optional[str] = None, **kwargs ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Entity type. + :paramtype category: str + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ super(Entity, self).__init__(**kwargs) self.text = text self.category = category @@ -1021,15 +1261,15 @@ class EntityLinkingResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLinkedEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLinkedEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -1054,6 +1294,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLinkedEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(EntityLinkingResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -1064,10 +1315,10 @@ def __init__( class EntityLinkingTask(msrest.serialization.Model): """EntityLinkingTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.EntityLinkingTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.EntityLinkingTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -1082,6 +1333,12 @@ def __init__( task_name: Optional[str] = None, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.EntityLinkingTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(EntityLinkingTask, self).__init__(**kwargs) self.parameters = parameters self.task_name = task_name @@ -1090,13 +1347,13 @@ def __init__( class EntityLinkingTaskParameters(msrest.serialization.Model): """EntityLinkingTaskParameters. - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + :vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType """ _attribute_map = { @@ -1113,6 +1370,15 @@ def __init__( string_index_type: Optional[Union[str, "StringIndexType"]] = None, **kwargs ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + """ super(EntityLinkingTaskParameters, self).__init__(**kwargs) self.model_version = model_version self.logging_opt_out = logging_opt_out @@ -1122,8 +1388,8 @@ def __init__( class EntityLinkingTaskResult(msrest.serialization.Model): """EntityLinkingTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult """ _attribute_map = { @@ -1136,6 +1402,10 @@ def __init__( results: Optional["EntityLinkingResult"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult + """ super(EntityLinkingTaskResult, self).__init__(**kwargs) self.results = results @@ -1145,8 +1415,8 @@ class ErrorResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError """ _validation = { @@ -1163,6 +1433,10 @@ def __init__( error: "TextAnalyticsError", **kwargs ): + """ + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_1.models.TextAnalyticsError + """ super(ErrorResponse, self).__init__(**kwargs) self.error = error @@ -1170,15 +1444,15 @@ def __init__( class HealthcareAssertion(msrest.serialization.Model): """HealthcareAssertion. - :param conditionality: Describes any conditionality on the entity. Possible values include: + :ivar conditionality: Describes any conditionality on the entity. Possible values include: "hypothetical", "conditional". - :type conditionality: str or ~azure.ai.textanalytics.v3_1.models.Conditionality - :param certainty: Describes the entities certainty and polarity. Possible values include: + :vartype conditionality: str or ~azure.ai.textanalytics.v3_1.models.Conditionality + :ivar certainty: Describes the entities certainty and polarity. Possible values include: "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". - :type certainty: str or ~azure.ai.textanalytics.v3_1.models.Certainty - :param association: Describes if the entity is the subject of the text or if it describes + :vartype certainty: str or ~azure.ai.textanalytics.v3_1.models.Certainty + :ivar association: Describes if the entity is the subject of the text or if it describes someone else. Possible values include: "subject", "other". - :type association: str or ~azure.ai.textanalytics.v3_1.models.Association + :vartype association: str or ~azure.ai.textanalytics.v3_1.models.Association """ _attribute_map = { @@ -1195,6 +1469,17 @@ def __init__( association: Optional[Union[str, "Association"]] = None, **kwargs ): + """ + :keyword conditionality: Describes any conditionality on the entity. Possible values include: + "hypothetical", "conditional". + :paramtype conditionality: str or ~azure.ai.textanalytics.v3_1.models.Conditionality + :keyword certainty: Describes the entities certainty and polarity. Possible values include: + "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". + :paramtype certainty: str or ~azure.ai.textanalytics.v3_1.models.Certainty + :keyword association: Describes if the entity is the subject of the text or if it describes + someone else. Possible values include: "subject", "other". + :paramtype association: str or ~azure.ai.textanalytics.v3_1.models.Association + """ super(HealthcareAssertion, self).__init__(**kwargs) self.conditionality = conditionality self.certainty = certainty @@ -1204,13 +1489,13 @@ def __init__( class HealthcareLinkingProperties(msrest.serialization.Model): """HealthcareLinkingProperties. - :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion - :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + :ivar assertion: + :vartype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion + :ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - :type name: str - :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] + :vartype name: str + :ivar links: Entity references in known data sources. + :vartype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] """ _attribute_map = { @@ -1227,6 +1512,15 @@ def __init__( links: Optional[List["HealthcareEntityLink"]] = None, **kwargs ): + """ + :keyword assertion: + :paramtype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion + :keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :paramtype name: str + :keyword links: Entity references in known data sources. + :paramtype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] + """ super(HealthcareLinkingProperties, self).__init__(**kwargs) self.assertion = assertion self.name = name @@ -1238,25 +1532,25 @@ class HealthcareEntityProperties(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Healthcare Entity Category. Possible values include: + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Healthcare Entity Category. Possible values include: "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' + :vartype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float """ _validation = { @@ -1287,6 +1581,27 @@ def __init__( subcategory: Optional[str] = None, **kwargs ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :paramtype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ super(HealthcareEntityProperties, self).__init__(**kwargs) self.text = text self.category = category @@ -1301,32 +1616,32 @@ class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): All required parameters must be populated in order to send to Azure. - :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion - :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + :ivar assertion: + :vartype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion + :ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of 'histologic'. - :type name: str - :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Healthcare Entity Category. Possible values include: + :vartype name: str + :ivar links: Entity references in known data sources. + :vartype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Healthcare Entity Category. Possible values include: "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' + :vartype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float """ _validation = { @@ -1363,6 +1678,34 @@ def __init__( subcategory: Optional[str] = None, **kwargs ): + """ + :keyword assertion: + :paramtype assertion: ~azure.ai.textanalytics.v3_1.models.HealthcareAssertion + :keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :paramtype name: str + :keyword links: Entity references in known data sources. + :paramtype links: list[~azure.ai.textanalytics.v3_1.models.HealthcareEntityLink] + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :paramtype category: str or ~azure.ai.textanalytics.v3_1.models.HealthcareEntityCategory + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ super(HealthcareEntity, self).__init__(text=text, category=category, subcategory=subcategory, offset=offset, length=length, confidence_score=confidence_score, assertion=assertion, name=name, links=links, **kwargs) self.assertion = assertion self.name = name @@ -1380,10 +1723,10 @@ class HealthcareEntityLink(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. - :type data_source: str - :param id: Required. Entity id in the given source catalog. - :type id: str + :ivar data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. + :vartype data_source: str + :ivar id: Required. Entity id in the given source catalog. + :vartype id: str """ _validation = { @@ -1403,6 +1746,12 @@ def __init__( id: str, **kwargs ): + """ + :keyword data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. + :paramtype data_source: str + :keyword id: Required. Entity id in the given source catalog. + :paramtype id: str + """ super(HealthcareEntityLink, self).__init__(**kwargs) self.data_source = data_source self.id = id @@ -1411,10 +1760,10 @@ def __init__( class HealthcareTaskResult(msrest.serialization.Model): """HealthcareTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] """ _attribute_map = { @@ -1429,6 +1778,12 @@ def __init__( errors: Optional[List["TextAnalyticsError"]] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + """ super(HealthcareTaskResult, self).__init__(**kwargs) self.results = results self.errors = errors @@ -1439,23 +1794,23 @@ class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] - :param next_link: - :type next_link: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar next_link: + :vartype next_link: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -1489,6 +1844,25 @@ def __init__( expiration_date_time: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.HealthcareResult + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :keyword next_link: + :paramtype next_link: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(HealthcareJobState, self).__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, next_link=next_link, results=results, errors=errors, **kwargs) self.results = results self.errors = errors @@ -1513,16 +1887,16 @@ class HealthcareRelation(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or + :ivar relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". - :type relation_type: str or ~azure.ai.textanalytics.v3_1.models.RelationType - :param entities: Required. The entities in the relation. - :type entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelationEntity] + :vartype relation_type: str or ~azure.ai.textanalytics.v3_1.models.RelationType + :ivar entities: Required. The entities in the relation. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelationEntity] """ _validation = { @@ -1542,6 +1916,18 @@ def __init__( entities: List["HealthcareRelationEntity"], **kwargs ): + """ + :keyword relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or + 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", + "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", + "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", + "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", + "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", + "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". + :paramtype relation_type: str or ~azure.ai.textanalytics.v3_1.models.RelationType + :keyword entities: Required. The entities in the relation. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.HealthcareRelationEntity] + """ super(HealthcareRelation, self).__init__(**kwargs) self.relation_type = relation_type self.entities = entities @@ -1552,13 +1938,13 @@ class HealthcareRelationEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment + :ivar ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment Identifier Representation), pointing to the entity . - :type ref: str - :param role: Required. Role of entity in the relationship. For example: 'CD20-positive diffuse + :vartype ref: str + :ivar role: Required. Role of entity in the relationship. For example: 'CD20-positive diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). - :type role: str + :vartype role: str """ _validation = { @@ -1578,6 +1964,15 @@ def __init__( role: str, **kwargs ): + """ + :keyword ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment + Identifier Representation), pointing to the entity . + :paramtype ref: str + :keyword role: Required. Role of entity in the relationship. For example: 'CD20-positive + diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: + CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). + :paramtype role: str + """ super(HealthcareRelationEntity, self).__init__(**kwargs) self.ref = ref self.role = role @@ -1588,15 +1983,15 @@ class HealthcareResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentHealthcareEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentHealthcareEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -1621,6 +2016,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentHealthcareEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(HealthcareResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -1633,19 +2039,19 @@ class InnerError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "InvalidParameterValue", + :ivar code: Required. Error code. Possible values include: "InvalidParameterValue", "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", "InvalidCountryHint". - :type code: str or ~azure.ai.textanalytics.v3_1.models.InnerErrorCodeValue - :param message: Required. Error message. - :type message: str - :param details: Error details. - :type details: dict[str, str] - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_1.models.InnerError + :vartype code: str or ~azure.ai.textanalytics.v3_1.models.InnerErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar details: Error details. + :vartype details: dict[str, str] + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError """ _validation = { @@ -1671,6 +2077,21 @@ def __init__( innererror: Optional["InnerError"] = None, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". + :paramtype code: str or ~azure.ai.textanalytics.v3_1.models.InnerErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword details: Error details. + :paramtype details: dict[str, str] + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError + """ super(InnerError, self).__init__(**kwargs) self.code = code self.message = message @@ -1682,16 +2103,17 @@ def __init__( class JobManifestTasks(msrest.serialization.Model): """The set of tasks to execute on the input documents. Cannot specify the same task more than once. - :param entity_recognition_tasks: - :type entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.EntitiesTask] - :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.PiiTask] - :param key_phrase_extraction_tasks: - :type key_phrase_extraction_tasks: list[~azure.ai.textanalytics.v3_1.models.KeyPhrasesTask] - :param entity_linking_tasks: - :type entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.EntityLinkingTask] - :param sentiment_analysis_tasks: - :type sentiment_analysis_tasks: list[~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTask] + :ivar entity_recognition_tasks: + :vartype entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.EntitiesTask] + :ivar entity_recognition_pii_tasks: + :vartype entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.PiiTask] + :ivar key_phrase_extraction_tasks: + :vartype key_phrase_extraction_tasks: list[~azure.ai.textanalytics.v3_1.models.KeyPhrasesTask] + :ivar entity_linking_tasks: + :vartype entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.EntityLinkingTask] + :ivar sentiment_analysis_tasks: + :vartype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTask] """ _attribute_map = { @@ -1712,6 +2134,20 @@ def __init__( sentiment_analysis_tasks: Optional[List["SentimentAnalysisTask"]] = None, **kwargs ): + """ + :keyword entity_recognition_tasks: + :paramtype entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.EntitiesTask] + :keyword entity_recognition_pii_tasks: + :paramtype entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.PiiTask] + :keyword key_phrase_extraction_tasks: + :paramtype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_1.models.KeyPhrasesTask] + :keyword entity_linking_tasks: + :paramtype entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.EntityLinkingTask] + :keyword sentiment_analysis_tasks: + :paramtype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTask] + """ super(JobManifestTasks, self).__init__(**kwargs) self.entity_recognition_tasks = entity_recognition_tasks self.entity_recognition_pii_tasks = entity_recognition_pii_tasks @@ -1725,15 +2161,15 @@ class KeyPhraseResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentKeyPhrases] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentKeyPhrases] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -1758,6 +2194,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentKeyPhrases] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(KeyPhraseResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -1768,10 +2215,10 @@ def __init__( class KeyPhrasesTask(msrest.serialization.Model): """KeyPhrasesTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.KeyPhrasesTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.KeyPhrasesTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -1786,6 +2233,12 @@ def __init__( task_name: Optional[str] = None, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.KeyPhrasesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(KeyPhrasesTask, self).__init__(**kwargs) self.parameters = parameters self.task_name = task_name @@ -1794,10 +2247,10 @@ def __init__( class KeyPhrasesTaskParameters(msrest.serialization.Model): """KeyPhrasesTaskParameters. - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool """ _attribute_map = { @@ -1812,6 +2265,12 @@ def __init__( logging_opt_out: Optional[bool] = False, **kwargs ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + """ super(KeyPhrasesTaskParameters, self).__init__(**kwargs) self.model_version = model_version self.logging_opt_out = logging_opt_out @@ -1820,8 +2279,8 @@ def __init__( class KeyPhraseTaskResult(msrest.serialization.Model): """KeyPhraseTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult """ _attribute_map = { @@ -1834,6 +2293,10 @@ def __init__( results: Optional["KeyPhraseResult"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult + """ super(KeyPhraseTaskResult, self).__init__(**kwargs) self.results = results @@ -1843,8 +2306,8 @@ class LanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. - :type documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput] + :ivar documents: Required. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput] """ _validation = { @@ -1861,6 +2324,10 @@ def __init__( documents: List["LanguageInput"], **kwargs ): + """ + :keyword documents: Required. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.LanguageInput] + """ super(LanguageBatchInput, self).__init__(**kwargs) self.documents = documents @@ -1870,12 +2337,12 @@ class LanguageInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param text: Required. - :type text: str - :param country_hint: - :type country_hint: str + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. + :vartype text: str + :ivar country_hint: + :vartype country_hint: str """ _validation = { @@ -1897,6 +2364,14 @@ def __init__( country_hint: Optional[str] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. + :paramtype text: str + :keyword country_hint: + :paramtype country_hint: str + """ super(LanguageInput, self).__init__(**kwargs) self.id = id self.text = text @@ -1908,15 +2383,15 @@ class LanguageResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLanguage] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLanguage] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -1941,6 +2416,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentLanguage] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(LanguageResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -1953,21 +2439,20 @@ class LinkedEntity(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Entity Linking formal name. - :type name: str - :param matches: Required. List of instances this entity appears in the text. - :type matches: list[~azure.ai.textanalytics.v3_1.models.Match] - :param language: Required. Language used in the data source. - :type language: str - :param id: Unique identifier of the recognized entity from the data source. - :type id: str - :param url: Required. URL for the entity's page from the data source. - :type url: str - :param data_source: Required. Data source used to extract entity linking, such as Wiki/Bing - etc. - :type data_source: str - :param bing_id: Bing Entity Search API unique identifier of the recognized entity. - :type bing_id: str + :ivar name: Required. Entity Linking formal name. + :vartype name: str + :ivar matches: Required. List of instances this entity appears in the text. + :vartype matches: list[~azure.ai.textanalytics.v3_1.models.Match] + :ivar language: Required. Language used in the data source. + :vartype language: str + :ivar id: Unique identifier of the recognized entity from the data source. + :vartype id: str + :ivar url: Required. URL for the entity's page from the data source. + :vartype url: str + :ivar data_source: Required. Data source used to extract entity linking, such as Wiki/Bing etc. + :vartype data_source: str + :ivar bing_id: Bing Entity Search API unique identifier of the recognized entity. + :vartype bing_id: str """ _validation = { @@ -2000,6 +2485,23 @@ def __init__( bing_id: Optional[str] = None, **kwargs ): + """ + :keyword name: Required. Entity Linking formal name. + :paramtype name: str + :keyword matches: Required. List of instances this entity appears in the text. + :paramtype matches: list[~azure.ai.textanalytics.v3_1.models.Match] + :keyword language: Required. Language used in the data source. + :paramtype language: str + :keyword id: Unique identifier of the recognized entity from the data source. + :paramtype id: str + :keyword url: Required. URL for the entity's page from the data source. + :paramtype url: str + :keyword data_source: Required. Data source used to extract entity linking, such as Wiki/Bing + etc. + :paramtype data_source: str + :keyword bing_id: Bing Entity Search API unique identifier of the recognized entity. + :paramtype bing_id: str + """ super(LinkedEntity, self).__init__(**kwargs) self.name = name self.matches = matches @@ -2015,15 +2517,15 @@ class Match(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param confidence_score: Required. If a well known item is recognized, a decimal number - denoting the confidence level between 0 and 1 will be returned. - :type confidence_score: float - :param text: Required. Entity text as appears in the request. - :type text: str - :param offset: Required. Start position for the entity match text. - :type offset: int - :param length: Required. Length for the entity match text. - :type length: int + :ivar confidence_score: Required. If a well known item is recognized, a decimal number denoting + the confidence level between 0 and 1 will be returned. + :vartype confidence_score: float + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar offset: Required. Start position for the entity match text. + :vartype offset: int + :ivar length: Required. Length for the entity match text. + :vartype length: int """ _validation = { @@ -2049,6 +2551,17 @@ def __init__( length: int, **kwargs ): + """ + :keyword confidence_score: Required. If a well known item is recognized, a decimal number + denoting the confidence level between 0 and 1 will be returned. + :paramtype confidence_score: float + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword offset: Required. Start position for the entity match text. + :paramtype offset: int + :keyword length: Required. Length for the entity match text. + :paramtype length: int + """ super(Match, self).__init__(**kwargs) self.confidence_score = confidence_score self.text = text @@ -2061,8 +2574,8 @@ class MultiLanguageBatchInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput] + :ivar documents: Required. The set of documents to process as part of this batch. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput] """ _validation = { @@ -2079,6 +2592,10 @@ def __init__( documents: List["MultiLanguageInput"], **kwargs ): + """ + :keyword documents: Required. The set of documents to process as part of this batch. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.MultiLanguageInput] + """ super(MultiLanguageBatchInput, self).__init__(**kwargs) self.documents = documents @@ -2088,14 +2605,14 @@ class MultiLanguageInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. A unique, non-empty document identifier. - :type id: str - :param text: Required. The input text to process. - :type text: str - :param language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + :ivar id: Required. A unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. The input text to process. + :vartype text: str + :ivar language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default. - :type language: str + :vartype language: str """ _validation = { @@ -2117,6 +2634,16 @@ def __init__( language: Optional[str] = None, **kwargs ): + """ + :keyword id: Required. A unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. The input text to process. + :paramtype text: str + :keyword language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + """ super(MultiLanguageInput, self).__init__(**kwargs) self.id = id self.text = text @@ -2128,17 +2655,17 @@ class PiiDocumentEntities(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param redacted_text: Required. Returns redacted text. - :type redacted_text: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_1.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar redacted_text: Required. Returns redacted text. + :vartype redacted_text: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_1.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics """ _validation = { @@ -2166,6 +2693,19 @@ def __init__( statistics: Optional["DocumentStatistics"] = None, **kwargs ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword redacted_text: Required. Returns redacted text. + :paramtype redacted_text: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_1.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.DocumentStatistics + """ super(PiiDocumentEntities, self).__init__(**kwargs) self.id = id self.redacted_text = redacted_text @@ -2179,15 +2719,15 @@ class PiiResult(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.PiiDocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.PiiDocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -2212,6 +2752,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.PiiDocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(PiiResult, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -2222,10 +2773,10 @@ def __init__( class PiiTask(msrest.serialization.Model): """PiiTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.PiiTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.PiiTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -2240,6 +2791,12 @@ def __init__( task_name: Optional[str] = None, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.PiiTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(PiiTask, self).__init__(**kwargs) self.parameters = parameters self.task_name = task_name @@ -2248,17 +2805,17 @@ def __init__( class PiiTaskParameters(msrest.serialization.Model): """PiiTaskParameters. - :param domain: Possible values include: "phi", "none". Default value: "none". - :type domain: str or ~azure.ai.textanalytics.v3_1.models.PiiTaskParametersDomain - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_1.models.PiiCategory] - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + :ivar domain: Possible values include: "phi", "none". Default value: "none". + :vartype domain: str or ~azure.ai.textanalytics.v3_1.models.PiiTaskParametersDomain + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar pii_categories: (Optional) describes the PII categories to return. + :vartype pii_categories: list[str or ~azure.ai.textanalytics.v3_1.models.PiiCategory] + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + :vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType """ _validation = { @@ -2283,6 +2840,19 @@ def __init__( string_index_type: Optional[Union[str, "StringIndexType"]] = None, **kwargs ): + """ + :keyword domain: Possible values include: "phi", "none". Default value: "none". + :paramtype domain: str or ~azure.ai.textanalytics.v3_1.models.PiiTaskParametersDomain + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword pii_categories: (Optional) describes the PII categories to return. + :paramtype pii_categories: list[str or ~azure.ai.textanalytics.v3_1.models.PiiCategory] + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + """ super(PiiTaskParameters, self).__init__(**kwargs) self.domain = domain self.model_version = model_version @@ -2294,8 +2864,8 @@ def __init__( class PiiTaskResult(msrest.serialization.Model): """PiiTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.PiiResult + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.PiiResult """ _attribute_map = { @@ -2308,6 +2878,10 @@ def __init__( results: Optional["PiiResult"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.PiiResult + """ super(PiiTaskResult, self).__init__(**kwargs) self.results = results @@ -2317,16 +2891,16 @@ class RequestStatistics(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents_count: Required. Number of documents submitted in the request. - :type documents_count: int - :param valid_documents_count: Required. Number of valid documents. This excludes empty, + :ivar documents_count: Required. Number of documents submitted in the request. + :vartype documents_count: int + :ivar valid_documents_count: Required. Number of valid documents. This excludes empty, over-size limit or non-supported languages documents. - :type valid_documents_count: int - :param erroneous_documents_count: Required. Number of invalid documents. This includes empty, + :vartype valid_documents_count: int + :ivar erroneous_documents_count: Required. Number of invalid documents. This includes empty, over-size limit or non-supported languages documents. - :type erroneous_documents_count: int - :param transactions_count: Required. Number of transactions for the request. - :type transactions_count: long + :vartype erroneous_documents_count: int + :ivar transactions_count: Required. Number of transactions for the request. + :vartype transactions_count: long """ _validation = { @@ -2352,6 +2926,18 @@ def __init__( transactions_count: int, **kwargs ): + """ + :keyword documents_count: Required. Number of documents submitted in the request. + :paramtype documents_count: int + :keyword valid_documents_count: Required. Number of valid documents. This excludes empty, + over-size limit or non-supported languages documents. + :paramtype valid_documents_count: int + :keyword erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :paramtype erroneous_documents_count: int + :keyword transactions_count: Required. Number of transactions for the request. + :paramtype transactions_count: long + """ super(RequestStatistics, self).__init__(**kwargs) self.documents_count = documents_count self.valid_documents_count = valid_documents_count @@ -2364,19 +2950,19 @@ class SentenceAssessment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sentiment: Required. Assessment sentiment in the sentence. Possible values include: + :ivar sentiment: Required. Assessment sentiment in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue - :param confidence_scores: Required. Assessment sentiment confidence scores in the sentence. - :type confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel - :param offset: Required. The assessment offset from the start of the sentence. - :type offset: int - :param length: Required. The length of the assessment. - :type length: int - :param text: Required. The assessment text detected. - :type text: str - :param is_negated: Required. The indicator representing if the assessment is negated. - :type is_negated: bool + :vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue + :ivar confidence_scores: Required. Assessment sentiment confidence scores in the sentence. + :vartype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel + :ivar offset: Required. The assessment offset from the start of the sentence. + :vartype offset: int + :ivar length: Required. The length of the assessment. + :vartype length: int + :ivar text: Required. The assessment text detected. + :vartype text: str + :ivar is_negated: Required. The indicator representing if the assessment is negated. + :vartype is_negated: bool """ _validation = { @@ -2408,6 +2994,21 @@ def __init__( is_negated: bool, **kwargs ): + """ + :keyword sentiment: Required. Assessment sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue + :keyword confidence_scores: Required. Assessment sentiment confidence scores in the sentence. + :paramtype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel + :keyword offset: Required. The assessment offset from the start of the sentence. + :paramtype offset: int + :keyword length: Required. The length of the assessment. + :paramtype length: int + :keyword text: Required. The assessment text detected. + :paramtype text: str + :keyword is_negated: Required. The indicator representing if the assessment is negated. + :paramtype is_negated: bool + """ super(SentenceAssessment, self).__init__(**kwargs) self.sentiment = sentiment self.confidence_scores = confidence_scores @@ -2422,22 +3023,23 @@ class SentenceSentiment(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param text: Required. The sentence text. - :type text: str - :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: + :ivar text: Required. The sentence text. + :vartype text: str + :ivar sentiment: Required. The predicted Sentiment for the sentence. Possible values include: "positive", "neutral", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1.models.SentenceSentimentValue - :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + :vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.SentenceSentimentValue + :ivar confidence_scores: Required. The sentiment confidence score between 0 and 1 for the sentence for all classes. - :type confidence_scores: ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel - :param offset: Required. The sentence offset from the start of the document. - :type offset: int - :param length: Required. The length of the sentence. - :type length: int - :param targets: The array of sentence targets for the sentence. - :type targets: list[~azure.ai.textanalytics.v3_1.models.SentenceTarget] - :param assessments: The array of assessments for the sentence. - :type assessments: list[~azure.ai.textanalytics.v3_1.models.SentenceAssessment] + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel + :ivar offset: Required. The sentence offset from the start of the document. + :vartype offset: int + :ivar length: Required. The length of the sentence. + :vartype length: int + :ivar targets: The array of sentence targets for the sentence. + :vartype targets: list[~azure.ai.textanalytics.v3_1.models.SentenceTarget] + :ivar assessments: The array of assessments for the sentence. + :vartype assessments: list[~azure.ai.textanalytics.v3_1.models.SentenceAssessment] """ _validation = { @@ -2470,6 +3072,25 @@ def __init__( assessments: Optional[List["SentenceAssessment"]] = None, **kwargs ): + """ + :keyword text: Required. The sentence text. + :paramtype text: str + :keyword sentiment: Required. The predicted Sentiment for the sentence. Possible values + include: "positive", "neutral", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.SentenceSentimentValue + :keyword confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_1.models.SentimentConfidenceScorePerLabel + :keyword offset: Required. The sentence offset from the start of the document. + :paramtype offset: int + :keyword length: Required. The length of the sentence. + :paramtype length: int + :keyword targets: The array of sentence targets for the sentence. + :paramtype targets: list[~azure.ai.textanalytics.v3_1.models.SentenceTarget] + :keyword assessments: The array of assessments for the sentence. + :paramtype assessments: list[~azure.ai.textanalytics.v3_1.models.SentenceAssessment] + """ super(SentenceSentiment, self).__init__(**kwargs) self.text = text self.sentiment = sentiment @@ -2485,21 +3106,21 @@ class SentenceTarget(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param sentiment: Required. Targeted sentiment in the sentence. Possible values include: + :ivar sentiment: Required. Targeted sentiment in the sentence. Possible values include: "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue - :param confidence_scores: Required. Target sentiment confidence scores for the target in the + :vartype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue + :ivar confidence_scores: Required. Target sentiment confidence scores for the target in the sentence. - :type confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel - :param offset: Required. The target offset from the start of the sentence. - :type offset: int - :param length: Required. The length of the target. - :type length: int - :param text: Required. The target text detected. - :type text: str - :param relations: Required. The array of either assessment or target objects which is related - to the target. - :type relations: list[~azure.ai.textanalytics.v3_1.models.TargetRelation] + :vartype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel + :ivar offset: Required. The target offset from the start of the sentence. + :vartype offset: int + :ivar length: Required. The length of the target. + :vartype length: int + :ivar text: Required. The target text detected. + :vartype text: str + :ivar relations: Required. The array of either assessment or target objects which is related to + the target. + :vartype relations: list[~azure.ai.textanalytics.v3_1.models.TargetRelation] """ _validation = { @@ -2531,6 +3152,23 @@ def __init__( relations: List["TargetRelation"], **kwargs ): + """ + :keyword sentiment: Required. Targeted sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_1.models.TokenSentimentValue + :keyword confidence_scores: Required. Target sentiment confidence scores for the target in the + sentence. + :paramtype confidence_scores: ~azure.ai.textanalytics.v3_1.models.TargetConfidenceScoreLabel + :keyword offset: Required. The target offset from the start of the sentence. + :paramtype offset: int + :keyword length: Required. The length of the target. + :paramtype length: int + :keyword text: Required. The target text detected. + :paramtype text: str + :keyword relations: Required. The array of either assessment or target objects which is related + to the target. + :paramtype relations: list[~azure.ai.textanalytics.v3_1.models.TargetRelation] + """ super(SentenceTarget, self).__init__(**kwargs) self.sentiment = sentiment self.confidence_scores = confidence_scores @@ -2543,10 +3181,10 @@ def __init__( class SentimentAnalysisTask(msrest.serialization.Model): """SentimentAnalysisTask. - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTaskParameters - :param task_name: - :type task_name: str + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTaskParameters + :ivar task_name: + :vartype task_name: str """ _attribute_map = { @@ -2561,6 +3199,12 @@ def __init__( task_name: Optional[str] = None, **kwargs ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_1.models.SentimentAnalysisTaskParameters + :keyword task_name: + :paramtype task_name: str + """ super(SentimentAnalysisTask, self).__init__(**kwargs) self.parameters = parameters self.task_name = task_name @@ -2569,15 +3213,15 @@ def __init__( class SentimentAnalysisTaskParameters(msrest.serialization.Model): """SentimentAnalysisTaskParameters. - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param opinion_mining: - :type opinion_mining: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar opinion_mining: + :vartype opinion_mining: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + :vartype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType """ _attribute_map = { @@ -2596,6 +3240,17 @@ def __init__( string_index_type: Optional[Union[str, "StringIndexType"]] = None, **kwargs ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword opinion_mining: + :paramtype opinion_mining: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or ~azure.ai.textanalytics.v3_1.models.StringIndexType + """ super(SentimentAnalysisTaskParameters, self).__init__(**kwargs) self.model_version = model_version self.logging_opt_out = logging_opt_out @@ -2608,12 +3263,12 @@ class SentimentConfidenceScorePerLabel(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param positive: Required. - :type positive: float - :param neutral: Required. - :type neutral: float - :param negative: Required. - :type negative: float + :ivar positive: Required. + :vartype positive: float + :ivar neutral: Required. + :vartype neutral: float + :ivar negative: Required. + :vartype negative: float """ _validation = { @@ -2636,6 +3291,14 @@ def __init__( negative: float, **kwargs ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword neutral: Required. + :paramtype neutral: float + :keyword negative: Required. + :paramtype negative: float + """ super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) self.positive = positive self.neutral = neutral @@ -2647,15 +3310,15 @@ class SentimentResponse(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param documents: Required. Sentiment analysis per document. - :type documents: list[~azure.ai.textanalytics.v3_1.models.DocumentSentiment] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain + :ivar documents: Required. Sentiment analysis per document. + :vartype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentSentiment] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str + :vartype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str """ _validation = { @@ -2680,6 +3343,17 @@ def __init__( statistics: Optional["RequestStatistics"] = None, **kwargs ): + """ + :keyword documents: Required. Sentiment analysis per document. + :paramtype documents: list[~azure.ai.textanalytics.v3_1.models.DocumentSentiment] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_1.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_1.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ super(SentimentResponse, self).__init__(**kwargs) self.documents = documents self.errors = errors @@ -2690,8 +3364,8 @@ def __init__( class SentimentTaskResult(msrest.serialization.Model): """SentimentTaskResult. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse """ _attribute_map = { @@ -2704,6 +3378,10 @@ def __init__( results: Optional["SentimentResponse"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse + """ super(SentimentTaskResult, self).__init__(**kwargs) self.results = results @@ -2713,10 +3391,10 @@ class TargetConfidenceScoreLabel(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param positive: Required. - :type positive: float - :param negative: Required. - :type negative: float + :ivar positive: Required. + :vartype positive: float + :ivar negative: Required. + :vartype negative: float """ _validation = { @@ -2736,6 +3414,12 @@ def __init__( negative: float, **kwargs ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword negative: Required. + :paramtype negative: float + """ super(TargetConfidenceScoreLabel, self).__init__(**kwargs) self.positive = positive self.negative = negative @@ -2746,11 +3430,11 @@ class TargetRelation(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param relation_type: Required. The type related to the target. Possible values include: + :ivar relation_type: Required. The type related to the target. Possible values include: "assessment", "target". - :type relation_type: str or ~azure.ai.textanalytics.v3_1.models.TargetRelationType - :param ref: Required. The JSON pointer indicating the linked object. - :type ref: str + :vartype relation_type: str or ~azure.ai.textanalytics.v3_1.models.TargetRelationType + :ivar ref: Required. The JSON pointer indicating the linked object. + :vartype ref: str """ _validation = { @@ -2770,6 +3454,13 @@ def __init__( ref: str, **kwargs ): + """ + :keyword relation_type: Required. The type related to the target. Possible values include: + "assessment", "target". + :paramtype relation_type: str or ~azure.ai.textanalytics.v3_1.models.TargetRelationType + :keyword ref: Required. The JSON pointer indicating the linked object. + :paramtype ref: str + """ super(TargetRelation, self).__init__(**kwargs) self.relation_type = relation_type self.ref = ref @@ -2780,28 +3471,28 @@ class TasksStateTasks(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param completed: Required. - :type completed: int - :param failed: Required. - :type failed: int - :param in_progress: Required. - :type in_progress: int - :param total: Required. - :type total: int - :param entity_recognition_tasks: - :type entity_recognition_tasks: + :ivar completed: Required. + :vartype completed: int + :ivar failed: Required. + :vartype failed: int + :ivar in_progress: Required. + :vartype in_progress: int + :ivar total: Required. + :vartype total: int + :ivar entity_recognition_tasks: + :vartype entity_recognition_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionTasksItem] - :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: + :ivar entity_recognition_pii_tasks: + :vartype entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionPiiTasksItem] - :param key_phrase_extraction_tasks: - :type key_phrase_extraction_tasks: + :ivar key_phrase_extraction_tasks: + :vartype key_phrase_extraction_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksKeyPhraseExtractionTasksItem] - :param entity_linking_tasks: - :type entity_linking_tasks: + :ivar entity_linking_tasks: + :vartype entity_linking_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityLinkingTasksItem] - :param sentiment_analysis_tasks: - :type sentiment_analysis_tasks: + :ivar sentiment_analysis_tasks: + :vartype sentiment_analysis_tasks: list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksSentimentAnalysisTasksItem] """ @@ -2838,6 +3529,31 @@ def __init__( sentiment_analysis_tasks: Optional[List["TasksStateTasksSentimentAnalysisTasksItem"]] = None, **kwargs ): + """ + :keyword completed: Required. + :paramtype completed: int + :keyword failed: Required. + :paramtype failed: int + :keyword in_progress: Required. + :paramtype in_progress: int + :keyword total: Required. + :paramtype total: int + :keyword entity_recognition_tasks: + :paramtype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionTasksItem] + :keyword entity_recognition_pii_tasks: + :paramtype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityRecognitionPiiTasksItem] + :keyword key_phrase_extraction_tasks: + :paramtype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksKeyPhraseExtractionTasksItem] + :keyword entity_linking_tasks: + :paramtype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksEntityLinkingTasksItem] + :keyword sentiment_analysis_tasks: + :paramtype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_1.models.TasksStateTasksSentimentAnalysisTasksItem] + """ super(TasksStateTasks, self).__init__(**kwargs) self.completed = completed self.failed = failed @@ -2855,13 +3571,13 @@ class TaskState(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -2884,6 +3600,15 @@ def __init__( status: Union[str, "State"], **kwargs ): + """ + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TaskState, self).__init__(**kwargs) self.last_update_date_time = last_update_date_time self.task_name = task_name @@ -2895,15 +3620,15 @@ class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -2928,6 +3653,17 @@ def __init__( results: Optional["EntityLinkingResult"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntityLinkingResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksEntityLinkingTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) self.results = results self.last_update_date_time = last_update_date_time @@ -2940,15 +3676,15 @@ class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.PiiResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.PiiResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -2973,6 +3709,17 @@ def __init__( results: Optional["PiiResult"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.PiiResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksEntityRecognitionPiiTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) self.results = results self.last_update_date_time = last_update_date_time @@ -2985,15 +3732,15 @@ class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -3018,6 +3765,17 @@ def __init__( results: Optional["EntitiesResult"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.EntitiesResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksEntityRecognitionTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) self.results = results self.last_update_date_time = last_update_date_time @@ -3030,15 +3788,15 @@ class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -3063,6 +3821,17 @@ def __init__( results: Optional["KeyPhraseResult"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.KeyPhraseResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksKeyPhraseExtractionTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) self.results = results self.last_update_date_time = last_update_date_time @@ -3075,15 +3844,15 @@ class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult): All required parameters must be populated in order to send to Azure. - :param results: - :type results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_1.models.State + :vartype status: str or ~azure.ai.textanalytics.v3_1.models.State """ _validation = { @@ -3108,6 +3877,17 @@ def __init__( results: Optional["SentimentResponse"] = None, **kwargs ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_1.models.SentimentResponse + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_1.models.State + """ super(TasksStateTasksSentimentAnalysisTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) self.results = results self.last_update_date_time = last_update_date_time @@ -3120,17 +3900,17 @@ class TextAnalyticsError(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "InvalidRequest", - "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". - :type code: str or ~azure.ai.textanalytics.v3_1.models.ErrorCodeValue - :param message: Required. Error message. - :type message: str - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_1.models.InnerError - :param details: Details about specific errors that led to this reported error. - :type details: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + :ivar code: Required. Error code. Possible values include: "InvalidRequest", "InvalidArgument", + "InternalServerError", "ServiceUnavailable", "NotFound". + :vartype code: str or ~azure.ai.textanalytics.v3_1.models.ErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError + :ivar details: Details about specific errors that led to this reported error. + :vartype details: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] """ _validation = { @@ -3156,6 +3936,19 @@ def __init__( details: Optional[List["TextAnalyticsError"]] = None, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "InvalidRequest", + "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". + :paramtype code: str or ~azure.ai.textanalytics.v3_1.models.ErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_1.models.InnerError + :keyword details: Details about specific errors that led to this reported error. + :paramtype details: list[~azure.ai.textanalytics.v3_1.models.TextAnalyticsError] + """ super(TextAnalyticsError, self).__init__(**kwargs) self.code = code self.message = message @@ -3169,13 +3962,13 @@ class TextAnalyticsWarning(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param code: Required. Error code. Possible values include: "LongWordsInDocument", + :ivar code: Required. Error code. Possible values include: "LongWordsInDocument", "DocumentTruncated". - :type code: str or ~azure.ai.textanalytics.v3_1.models.WarningCodeValue - :param message: Required. Warning message. - :type message: str - :param target_ref: A JSON pointer reference indicating the target object. - :type target_ref: str + :vartype code: str or ~azure.ai.textanalytics.v3_1.models.WarningCodeValue + :ivar message: Required. Warning message. + :vartype message: str + :ivar target_ref: A JSON pointer reference indicating the target object. + :vartype target_ref: str """ _validation = { @@ -3197,6 +3990,15 @@ def __init__( target_ref: Optional[str] = None, **kwargs ): + """ + :keyword code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :paramtype code: str or ~azure.ai.textanalytics.v3_1.models.WarningCodeValue + :keyword message: Required. Warning message. + :paramtype message: str + :keyword target_ref: A JSON pointer reference indicating the target object. + :paramtype target_ref: str + """ super(TextAnalyticsWarning, self).__init__(**kwargs) self.code = code self.message = message diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py index 615a94221ab2..1f5a08ecd567 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/models/_text_analytics_client_enums.py @@ -6,34 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class Association(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Association(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes if the entity is the subject of the text or if it describes someone else. """ SUBJECT = "subject" OTHER = "other" -class Certainty(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Certainty(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes the entities certainty and polarity. """ @@ -43,14 +28,14 @@ class Certainty(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NEGATIVE_POSSIBLE = "negativePossible" NEGATIVE = "negative" -class Conditionality(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Conditionality(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes any conditionality on the entity. """ HYPOTHETICAL = "hypothetical" CONDITIONAL = "conditional" -class DocumentSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DocumentSentimentValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). """ @@ -59,7 +44,7 @@ class DocumentSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) NEGATIVE = "negative" MIXED = "mixed" -class ErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ErrorCodeValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ @@ -69,7 +54,7 @@ class ErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SERVICE_UNAVAILABLE = "ServiceUnavailable" NOT_FOUND = "NotFound" -class HealthcareEntityCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class HealthcareEntityCategory(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Healthcare Entity Category. """ @@ -100,7 +85,7 @@ class HealthcareEntityCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enu FAMILY_RELATION = "FAMILY_RELATION" TREATMENT_NAME = "TREATMENT_NAME" -class InnerErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class InnerErrorCodeValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ @@ -114,7 +99,7 @@ class InnerErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): UNSUPPORTED_LANGUAGE_CODE = "UnsupportedLanguageCode" INVALID_COUNTRY_HINT = "InvalidCountryHint" -class PiiCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class PiiCategory(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): ABA_ROUTING_NUMBER = "ABARoutingNumber" AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" @@ -290,12 +275,12 @@ class PiiCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ALL = "All" DEFAULT = "Default" -class PiiTaskParametersDomain(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class PiiTaskParametersDomain(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): PHI = "phi" NONE = "none" -class RelationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RelationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc. """ @@ -321,7 +306,7 @@ class RelationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): VALUE_OF_CONDITION = "ValueOfCondition" VALUE_OF_EXAMINATION = "ValueOfExamination" -class SentenceSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SentenceSentimentValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The predicted Sentiment for the sentence. """ @@ -329,7 +314,7 @@ class SentenceSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) NEUTRAL = "neutral" NEGATIVE = "negative" -class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class State(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): NOT_STARTED = "notStarted" RUNNING = "running" @@ -339,7 +324,7 @@ class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): CANCELLED = "cancelled" CANCELLING = "cancelling" -class StringIndexType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class StringIndexType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Returned offset and length values will correspond to TextElements (Graphemes and Grapheme #: clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is @@ -352,14 +337,14 @@ class StringIndexType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: application is written in a language that support Unicode, for example Java, JavaScript. UTF16_CODE_UNIT = "Utf16CodeUnit" -class TargetRelationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TargetRelationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The type related to the target. """ ASSESSMENT = "assessment" TARGET = "target" -class TokenSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TokenSentimentValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Targeted sentiment in the sentence. """ @@ -367,7 +352,7 @@ class TokenSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MIXED = "mixed" NEGATIVE = "negative" -class WarningCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WarningCodeValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py index 4ce4a4ccb437..213b8704da59 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1/operations/_text_analytics_client_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING import warnings from ...._lro import AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod, AnalyzeHealthcareEntitiesLROPoller, AnalyzeHealthcareEntitiesLROPollingMethod from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.polling.base_polling import LROBasePolling +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -24,6 +29,419 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_analyze_request_initial( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/analyze') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_analyze_status_request( + job_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + top = kwargs.pop('top', 20) # type: Optional[int] + skip = kwargs.pop('skip', 0) # type: Optional[int] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/analyze/jobs/{jobId}') + path_format_arguments = { + "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int', maximum=50, minimum=1) + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'int', minimum=0) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_health_status_request( + job_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + top = kwargs.pop('top', 20) # type: Optional[int] + skip = kwargs.pop('skip', 0) # type: Optional[int] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/health/jobs/{jobId}') + path_format_arguments = { + "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int', maximum=50, minimum=1) + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'int', minimum=0) + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_cancel_health_job_request_initial( + job_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/health/jobs/{jobId}') + path_format_arguments = { + "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_health_request_initial( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/health/jobs') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_entities_recognition_general_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/recognition/general') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_entities_recognition_pii_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + domain = kwargs.pop('domain', None) # type: Optional[str] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + pii_categories = kwargs.pop('pii_categories', None) # type: Optional[List[Union[str, "_models.PiiCategory"]]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/recognition/pii') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + if domain is not None: + query_parameters['domain'] = _SERIALIZER.query("domain", domain, 'str') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + if pii_categories is not None: + query_parameters['piiCategories'] = _SERIALIZER.query("pii_categories", pii_categories, '[str]', div=',') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_entities_linking_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/linking') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_key_phrases_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/keyPhrases') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_languages_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/languages') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_sentiment_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + opinion_mining = kwargs.pop('opinion_mining', None) # type: Optional[bool] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/sentiment') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + if opinion_mining is not None: + query_parameters['opinionMining'] = _SERIALIZER.query("opinion_mining", opinion_mining, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class TextAnalyticsClientOperationsMixin(object): def _analyze_initial( @@ -37,53 +455,50 @@ def _analyze_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - # Construct URL - url = self._analyze_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] if body is not None: - body_content = self._serialize.body(body, 'AnalyzeBatchInput') + json = self._serialize.body(body, 'AnalyzeBatchInput') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_analyze_request_initial( + content_type=content_type, + json=json, + template_url=self._analyze_initial.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('AnalyzeJobState', pipeline_response) if response.status_code == 202: response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + _analyze_initial.metadata = {'url': '/analyze'} # type: ignore + + @distributed_trace def begin_analyze( self, body=None, # type: Optional["_models.AnalyzeBatchInput"] @@ -99,15 +514,19 @@ def begin_analyze( :type body: ~azure.ai.textanalytics.v3_1.models.AnalyzeBatchInput :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. Pass + in False for this operation to not poll, or pass in your own initialized polling object for a + personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the + result of cls(response) :rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_1.models.AnalyzeJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeJobState"] lro_delay = kwargs.pop( 'polling_interval', @@ -117,25 +536,25 @@ def begin_analyze( if cont_token is None: raw_result = self._analyze_initial( body=body, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('AnalyzeJobState', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -147,8 +566,10 @@ def get_long_running_output(pipeline_response): ) else: return AnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_analyze.metadata = {'url': '/analyze'} # type: ignore + @distributed_trace def analyze_status( self, job_id, # type: str @@ -185,36 +606,27 @@ def analyze_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self.analyze_status.metadata['url'] # type: ignore + + request = build_analyze_status_request( + job_id=job_id, + show_stats=show_stats, + top=top, + skip=skip, + template_url=self.analyze_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=50, minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AnalyzeJobState', pipeline_response) @@ -223,8 +635,11 @@ def analyze_status( return cls(pipeline_response, deserialized, {}) return deserialized + analyze_status.metadata = {'url': '/analyze/jobs/{jobId}'} # type: ignore + + @distributed_trace def health_status( self, job_id, # type: str @@ -259,36 +674,27 @@ def health_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self.health_status.metadata['url'] # type: ignore + + request = build_health_status_request( + job_id=job_id, + top=top, + skip=skip, + show_stats=show_stats, + template_url=self.health_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=50, minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('HealthcareJobState', pipeline_response) @@ -297,8 +703,10 @@ def health_status( return cls(pipeline_response, deserialized, {}) return deserialized + health_status.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore + def _cancel_health_job_initial( self, job_id, # type: str @@ -310,40 +718,36 @@ def _cancel_health_job_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self._cancel_health_job_initial.metadata['url'] # type: ignore + + request = build_cancel_health_job_request_initial( + job_id=job_id, + template_url=self._cancel_health_job_initial.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) response_headers = {} response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, None, response_headers) _cancel_health_job_initial.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore + + @distributed_trace def begin_cancel_health_job( self, job_id, # type: str @@ -358,15 +762,17 @@ def begin_cancel_health_job( :type job_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be LROBasePolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -379,20 +785,18 @@ def begin_cancel_health_job( cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -404,6 +808,7 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel_health_job.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore def _health_initial( @@ -421,57 +826,50 @@ def _health_initial( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self._health_initial.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_health_request_initial( + content_type=content_type, + model_version=model_version, + string_index_type=string_index_type, + logging_opt_out=logging_opt_out, + json=json, + template_url=self._health_initial.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('HealthcareJobState', pipeline_response) if response.status_code == 202: response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + _health_initial.metadata = {'url': '/entities/health/jobs'} # type: ignore + + @distributed_trace def begin_health( self, documents, # type: List["_models.MultiLanguageInput"] @@ -505,15 +903,20 @@ def begin_health( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AnalyzeHealthcareEntitiesLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be + AnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll, or + pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either + HealthcareJobState or the result of cls(response) + :rtype: + ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_1.models.HealthcareJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.HealthcareJobState"] lro_delay = kwargs.pop( 'polling_interval', @@ -526,25 +929,25 @@ def begin_health( model_version=model_version, string_index_type=string_index_type, logging_opt_out=logging_opt_out, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('HealthcareJobState', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AnalyzeHealthcareEntitiesLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AnalyzeHealthcareEntitiesLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -556,8 +959,10 @@ def get_long_running_output(pipeline_response): ) else: return AnalyzeHealthcareEntitiesLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_health.metadata = {'url': '/entities/health/jobs'} # type: ignore + @distributed_trace def entities_recognition_general( self, documents, # type: List["_models.MultiLanguageInput"] @@ -606,43 +1011,32 @@ def entities_recognition_general( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_general.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_general_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + string_index_type=string_index_type, + json=json, + template_url=self.entities_recognition_general.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -651,8 +1045,11 @@ def entities_recognition_general( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_general.metadata = {'url': '/entities/recognition/general'} # type: ignore + + @distributed_trace def entities_recognition_pii( self, documents, # type: List["_models.MultiLanguageInput"] @@ -709,47 +1106,34 @@ def entities_recognition_pii( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_pii.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_pii_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + domain=domain, + string_index_type=string_index_type, + pii_categories=pii_categories, + json=json, + template_url=self.entities_recognition_pii.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if domain is not None: - query_parameters['domain'] = self._serialize.query("domain", domain, 'str') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - if pii_categories is not None: - query_parameters['piiCategories'] = self._serialize.query("pii_categories", pii_categories, '[str]', div=',') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('PiiResult', pipeline_response) @@ -758,8 +1142,11 @@ def entities_recognition_pii( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_pii.metadata = {'url': '/entities/recognition/pii'} # type: ignore + + @distributed_trace def entities_linking( self, documents, # type: List["_models.MultiLanguageInput"] @@ -807,43 +1194,32 @@ def entities_linking( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_linking.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_linking_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + string_index_type=string_index_type, + json=json, + template_url=self.entities_linking.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -852,8 +1228,11 @@ def entities_linking( return cls(pipeline_response, deserialized, {}) return deserialized + entities_linking.metadata = {'url': '/entities/linking'} # type: ignore + + @distributed_trace def key_phrases( self, documents, # type: List["_models.MultiLanguageInput"] @@ -896,41 +1275,31 @@ def key_phrases( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.key_phrases.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_key_phrases_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + json=json, + template_url=self.key_phrases.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -939,8 +1308,11 @@ def key_phrases( return cls(pipeline_response, deserialized, {}) return deserialized + key_phrases.metadata = {'url': '/keyPhrases'} # type: ignore + + @distributed_trace def languages( self, documents, # type: List["_models.LanguageInput"] @@ -984,41 +1356,31 @@ def languages( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.LanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.languages.metadata['url'] # type: ignore + _input = _models.LanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'LanguageBatchInput') + + request = build_languages_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + json=json, + template_url=self.languages.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'LanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -1027,8 +1389,11 @@ def languages( return cls(pipeline_response, deserialized, {}) return deserialized + languages.metadata = {'url': '/languages'} # type: ignore + + @distributed_trace def sentiment( self, documents, # type: List["_models.MultiLanguageInput"] @@ -1080,45 +1445,33 @@ def sentiment( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.sentiment.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_sentiment_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + opinion_mining=opinion_mining, + string_index_type=string_index_type, + json=json, + template_url=self.sentiment.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if opinion_mining is not None: - query_parameters['opinionMining'] = self._serialize.query("opinion_mining", opinion_mining, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) @@ -1127,4 +1480,6 @@ def sentiment( return cls(pipeline_response, deserialized, {}) return deserialized + sentiment.metadata = {'url': '/sentiment'} # type: ignore + diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models.py deleted file mode 100644 index 4b7704342caa..000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models.py +++ /dev/null @@ -1,3106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - - -class AnalysisInput(msrest.serialization.Model): - """AnalysisInput. - - All required parameters must be populated in order to send to Azure. - - :param analysis_input: Required. Contains a set of input documents to be analyzed by the - service. - :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageBatchInput - """ - - _validation = { - 'analysis_input': {'required': True}, - } - - _attribute_map = { - 'analysis_input': {'key': 'analysisInput', 'type': 'MultiLanguageBatchInput'}, - } - - def __init__( - self, - **kwargs - ): - super(AnalysisInput, self).__init__(**kwargs) - self.analysis_input = kwargs['analysis_input'] - - -class JobManifest(msrest.serialization.Model): - """JobManifest. - - All required parameters must be populated in order to send to Azure. - - :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the - same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.JobManifestTasks - """ - - _validation = { - 'tasks': {'required': True}, - } - - _attribute_map = { - 'tasks': {'key': 'tasks', 'type': 'JobManifestTasks'}, - } - - def __init__( - self, - **kwargs - ): - super(JobManifest, self).__init__(**kwargs) - self.tasks = kwargs['tasks'] - - -class JobDescriptor(msrest.serialization.Model): - """JobDescriptor. - - :param display_name: Optional display name for the analysis job. - :type display_name: str - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(JobDescriptor, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - - -class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest): - """AnalyzeBatchInput. - - All required parameters must be populated in order to send to Azure. - - :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the - same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.JobManifestTasks - :param analysis_input: Required. Contains a set of input documents to be analyzed by the - service. - :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageBatchInput - :param display_name: Optional display name for the analysis job. - :type display_name: str - """ - - _validation = { - 'tasks': {'required': True}, - 'analysis_input': {'required': True}, - } - - _attribute_map = { - 'tasks': {'key': 'tasks', 'type': 'JobManifestTasks'}, - 'analysis_input': {'key': 'analysisInput', 'type': 'MultiLanguageBatchInput'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AnalyzeBatchInput, self).__init__(**kwargs) - self.tasks = kwargs['tasks'] - self.analysis_input = kwargs['analysis_input'] - self.tasks = kwargs['tasks'] - self.display_name = kwargs.get('display_name', None) - self.analysis_input = kwargs['analysis_input'] - self.display_name = kwargs.get('display_name', None) - - -class AnalyzeJobDisplayName(msrest.serialization.Model): - """AnalyzeJobDisplayName. - - :param display_name: - :type display_name: str - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AnalyzeJobDisplayName, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - - -class AnalyzeJobErrorsAndStatistics(msrest.serialization.Model): - """AnalyzeJobErrorsAndStatistics. - - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - """ - - _attribute_map = { - 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - } - - def __init__( - self, - **kwargs - ): - super(AnalyzeJobErrorsAndStatistics, self).__init__(**kwargs) - self.errors = kwargs.get('errors', None) - self.statistics = kwargs.get('statistics', None) - - -class JobMetadata(msrest.serialization.Model): - """JobMetadata. - - All required parameters must be populated in order to send to Azure. - - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(JobMetadata, self).__init__(**kwargs) - self.created_date_time = kwargs['created_date_time'] - self.expiration_date_time = kwargs.get('expiration_date_time', None) - self.job_id = kwargs['job_id'] - self.last_update_date_time = kwargs['last_update_date_time'] - self.status = kwargs['status'] - - -class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName): - """AnalyzeJobMetadata. - - All required parameters must be populated in order to send to Azure. - - :param display_name: - :type display_name: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AnalyzeJobMetadata, self).__init__(**kwargs) - self.display_name = kwargs.get('display_name', None) - self.created_date_time = kwargs['created_date_time'] - self.expiration_date_time = kwargs.get('expiration_date_time', None) - self.job_id = kwargs['job_id'] - self.last_update_date_time = kwargs['last_update_date_time'] - self.status = kwargs['status'] - - -class Pagination(msrest.serialization.Model): - """Pagination. - - :param next_link: - :type next_link: str - """ - - _attribute_map = { - 'next_link': {'key': '@nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(Pagination, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - - -class TasksState(msrest.serialization.Model): - """TasksState. - - All required parameters must be populated in order to send to Azure. - - :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasks - """ - - _validation = { - 'tasks': {'required': True}, - } - - _attribute_map = { - 'tasks': {'key': 'tasks', 'type': 'TasksStateTasks'}, - } - - def __init__( - self, - **kwargs - ): - super(TasksState, self).__init__(**kwargs) - self.tasks = kwargs['tasks'] - - -class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatistics, Pagination): - """AnalyzeJobState. - - All required parameters must be populated in order to send to Azure. - - :param next_link: - :type next_link: str - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasks - :param display_name: - :type display_name: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'tasks': {'required': True}, - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'next_link': {'key': '@nextLink', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'tasks': {'key': 'tasks', 'type': 'TasksStateTasks'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(AnalyzeJobState, self).__init__(**kwargs) - self.next_link = kwargs.get('next_link', None) - self.errors = kwargs.get('errors', None) - self.statistics = kwargs.get('statistics', None) - self.tasks = kwargs['tasks'] - self.next_link = kwargs.get('next_link', None) - self.errors = kwargs.get('errors', None) - self.statistics = kwargs.get('statistics', None) - self.display_name = kwargs.get('display_name', None) - self.created_date_time = kwargs['created_date_time'] - self.expiration_date_time = kwargs.get('expiration_date_time', None) - self.job_id = kwargs['job_id'] - self.last_update_date_time = kwargs['last_update_date_time'] - self.status = kwargs['status'] - self.next_link = kwargs.get('next_link', None) - self.tasks = kwargs['tasks'] - self.display_name = kwargs.get('display_name', None) - self.created_date_time = kwargs['created_date_time'] - self.expiration_date_time = kwargs.get('expiration_date_time', None) - self.job_id = kwargs['job_id'] - self.last_update_date_time = kwargs['last_update_date_time'] - self.status = kwargs['status'] - self.errors = kwargs.get('errors', None) - self.statistics = kwargs.get('statistics', None) - self.tasks = kwargs['tasks'] - self.display_name = kwargs.get('display_name', None) - self.created_date_time = kwargs['created_date_time'] - self.expiration_date_time = kwargs.get('expiration_date_time', None) - self.job_id = kwargs['job_id'] - self.last_update_date_time = kwargs['last_update_date_time'] - self.status = kwargs['status'] - - -class DetectedLanguage(msrest.serialization.Model): - """DetectedLanguage. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Long name of a detected language (e.g. English, French). - :type name: str - :param iso6391_name: Required. A two letter representation of the detected language according - to the ISO 639-1 standard (e.g. en, fr). - :type iso6391_name: str - :param confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 - indicate 100% certainty that the identified language is true. - :type confidence_score: float - """ - - _validation = { - 'name': {'required': True}, - 'iso6391_name': {'required': True}, - 'confidence_score': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'iso6391_name': {'key': 'iso6391Name', 'type': 'str'}, - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - super(DetectedLanguage, self).__init__(**kwargs) - self.name = kwargs['name'] - self.iso6391_name = kwargs['iso6391_name'] - self.confidence_score = kwargs['confidence_score'] - - -class DocumentEntities(msrest.serialization.Model): - """DocumentEntities. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[Entity]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - **kwargs - ): - super(DocumentEntities, self).__init__(**kwargs) - self.id = kwargs['id'] - self.entities = kwargs['entities'] - self.warnings = kwargs['warnings'] - self.statistics = kwargs.get('statistics', None) - - -class DocumentError(msrest.serialization.Model): - """DocumentError. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Document Id. - :type id: str - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError - """ - - _validation = { - 'id': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, - } - - def __init__( - self, - **kwargs - ): - super(DocumentError, self).__init__(**kwargs) - self.id = kwargs['id'] - self.error = kwargs['error'] - - -class DocumentHealthcareEntities(msrest.serialization.Model): - """DocumentHealthcareEntities. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Healthcare entities. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntity] - :param relations: Required. Healthcare entity relations. - :type relations: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareRelation] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'relations': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[HealthcareEntity]'}, - 'relations': {'key': 'relations', 'type': '[HealthcareRelation]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - **kwargs - ): - super(DocumentHealthcareEntities, self).__init__(**kwargs) - self.id = kwargs['id'] - self.entities = kwargs['entities'] - self.relations = kwargs['relations'] - self.warnings = kwargs['warnings'] - self.statistics = kwargs.get('statistics', None) - - -class DocumentKeyPhrases(msrest.serialization.Model): - """DocumentKeyPhrases. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param key_phrases: Required. A list of representative words or phrases. The number of key - phrases returned is proportional to the number of words in the input document. - :type key_phrases: list[str] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'key_phrases': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'key_phrases': {'key': 'keyPhrases', 'type': '[str]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - **kwargs - ): - super(DocumentKeyPhrases, self).__init__(**kwargs) - self.id = kwargs['id'] - self.key_phrases = kwargs['key_phrases'] - self.warnings = kwargs['warnings'] - self.statistics = kwargs.get('statistics', None) - - -class DocumentLanguage(msrest.serialization.Model): - """DocumentLanguage. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param detected_language: Required. Detected Language. - :type detected_language: ~azure.ai.textanalytics.v3_2_preview_1.models.DetectedLanguage - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'detected_language': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'detected_language': {'key': 'detectedLanguage', 'type': 'DetectedLanguage'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - **kwargs - ): - super(DocumentLanguage, self).__init__(**kwargs) - self.id = kwargs['id'] - self.detected_language = kwargs['detected_language'] - self.warnings = kwargs['warnings'] - self.statistics = kwargs.get('statistics', None) - - -class DocumentLinkedEntities(msrest.serialization.Model): - """DocumentLinkedEntities. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized well known entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.LinkedEntity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[LinkedEntity]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - **kwargs - ): - super(DocumentLinkedEntities, self).__init__(**kwargs) - self.id = kwargs['id'] - self.entities = kwargs['entities'] - self.warnings = kwargs['warnings'] - self.statistics = kwargs.get('statistics', None) - - -class DocumentSentiment(msrest.serialization.Model): - """DocumentSentiment. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or - Mixed). Possible values include: "positive", "neutral", "negative", "mixed". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentSentimentValue - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 - for each sentiment class. - :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentConfidenceScorePerLabel - :param sentences: Required. Sentence level sentiment analysis. - :type sentences: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceSentiment] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - """ - - _validation = { - 'id': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'sentences': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'sentiment': {'key': 'sentiment', 'type': 'str'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, - 'sentences': {'key': 'sentences', 'type': '[SentenceSentiment]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - } - - def __init__( - self, - **kwargs - ): - super(DocumentSentiment, self).__init__(**kwargs) - self.id = kwargs['id'] - self.sentiment = kwargs['sentiment'] - self.statistics = kwargs.get('statistics', None) - self.confidence_scores = kwargs['confidence_scores'] - self.sentences = kwargs['sentences'] - self.warnings = kwargs['warnings'] - - -class DocumentStatistics(msrest.serialization.Model): - """if showStats=true was specified in the request this field will contain information about the document payload. - - All required parameters must be populated in order to send to Azure. - - :param characters_count: Required. Number of text elements recognized in the document. - :type characters_count: int - :param transactions_count: Required. Number of transactions for the document. - :type transactions_count: int - """ - - _validation = { - 'characters_count': {'required': True}, - 'transactions_count': {'required': True}, - } - - _attribute_map = { - 'characters_count': {'key': 'charactersCount', 'type': 'int'}, - 'transactions_count': {'key': 'transactionsCount', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(DocumentStatistics, self).__init__(**kwargs) - self.characters_count = kwargs['characters_count'] - self.transactions_count = kwargs['transactions_count'] - - -class EntitiesResult(msrest.serialization.Model): - """EntitiesResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EntitiesResult, self).__init__(**kwargs) - self.documents = kwargs['documents'] - self.errors = kwargs['errors'] - self.statistics = kwargs.get('statistics', None) - self.model_version = kwargs['model_version'] - - -class EntitiesTask(msrest.serialization.Model): - """EntitiesTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'EntitiesTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EntitiesTask, self).__init__(**kwargs) - self.parameters = kwargs.get('parameters', None) - self.task_name = kwargs.get('task_name', None) - - -class EntitiesTaskParameters(msrest.serialization.Model): - """EntitiesTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EntitiesTaskParameters, self).__init__(**kwargs) - self.model_version = kwargs.get('model_version', "latest") - self.logging_opt_out = kwargs.get('logging_opt_out', False) - self.string_index_type = kwargs.get('string_index_type', None) - - -class EntitiesTaskResult(msrest.serialization.Model): - """EntitiesTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'EntitiesResult'}, - } - - def __init__( - self, - **kwargs - ): - super(EntitiesTaskResult, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - - -class Entity(msrest.serialization.Model): - """Entity. - - All required parameters must be populated in order to send to Azure. - - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Entity type. - :type category: str - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' - values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values - can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float - """ - - _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'subcategory': {'key': 'subcategory', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - super(Entity, self).__init__(**kwargs) - self.text = kwargs['text'] - self.category = kwargs['category'] - self.subcategory = kwargs.get('subcategory', None) - self.offset = kwargs['offset'] - self.length = kwargs['length'] - self.confidence_score = kwargs['confidence_score'] - - -class EntityLinkingResult(msrest.serialization.Model): - """EntityLinkingResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentLinkedEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentLinkedEntities]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EntityLinkingResult, self).__init__(**kwargs) - self.documents = kwargs['documents'] - self.errors = kwargs['errors'] - self.statistics = kwargs.get('statistics', None) - self.model_version = kwargs['model_version'] - - -class EntityLinkingTask(msrest.serialization.Model): - """EntityLinkingTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'EntityLinkingTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EntityLinkingTask, self).__init__(**kwargs) - self.parameters = kwargs.get('parameters', None) - self.task_name = kwargs.get('task_name', None) - - -class EntityLinkingTaskParameters(msrest.serialization.Model): - """EntityLinkingTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(EntityLinkingTaskParameters, self).__init__(**kwargs) - self.model_version = kwargs.get('model_version', "latest") - self.logging_opt_out = kwargs.get('logging_opt_out', False) - self.string_index_type = kwargs.get('string_index_type', None) - - -class EntityLinkingTaskResult(msrest.serialization.Model): - """EntityLinkingTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'EntityLinkingResult'}, - } - - def __init__( - self, - **kwargs - ): - super(EntityLinkingTaskResult, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - - -class ErrorResponse(msrest.serialization.Model): - """ErrorResponse. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, - } - - def __init__( - self, - **kwargs - ): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs['error'] - - -class ExtractedDocumentSummary(msrest.serialization.Model): - """ExtractedDocumentSummary. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param sentences: Required. A ranked list of sentences representing the extracted summary. - :type sentences: list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractedSummarySentence] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'sentences': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'sentences': {'key': 'sentences', 'type': '[ExtractedSummarySentence]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - **kwargs - ): - super(ExtractedDocumentSummary, self).__init__(**kwargs) - self.id = kwargs['id'] - self.sentences = kwargs['sentences'] - self.warnings = kwargs['warnings'] - self.statistics = kwargs.get('statistics', None) - - -class ExtractedSummarySentence(msrest.serialization.Model): - """ExtractedSummarySentence. - - All required parameters must be populated in order to send to Azure. - - :param text: Required. The extracted sentence text. - :type text: str - :param rank_score: Required. A double value representing the relevance of the sentence within - the summary. Higher values indicate higher importance. - :type rank_score: float - :param offset: Required. The sentence offset from the start of the document, based on the value - of the parameter StringIndexType. - :type offset: int - :param length: Required. The length of the sentence. - :type length: int - """ - - _validation = { - 'text': {'required': True}, - 'rank_score': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'rank_score': {'key': 'rankScore', 'type': 'float'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(ExtractedSummarySentence, self).__init__(**kwargs) - self.text = kwargs['text'] - self.rank_score = kwargs['rank_score'] - self.offset = kwargs['offset'] - self.length = kwargs['length'] - - -class ExtractiveSummarizationResult(msrest.serialization.Model): - """ExtractiveSummarizationResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractedDocumentSummary] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[ExtractedDocumentSummary]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExtractiveSummarizationResult, self).__init__(**kwargs) - self.documents = kwargs['documents'] - self.errors = kwargs['errors'] - self.statistics = kwargs.get('statistics', None) - self.model_version = kwargs['model_version'] - - -class ExtractiveSummarizationTask(msrest.serialization.Model): - """ExtractiveSummarizationTask. - - :param parameters: - :type parameters: - ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'ExtractiveSummarizationTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExtractiveSummarizationTask, self).__init__(**kwargs) - self.parameters = kwargs.get('parameters', None) - self.task_name = kwargs.get('task_name', None) - - -class ExtractiveSummarizationTaskParameters(msrest.serialization.Model): - """ExtractiveSummarizationTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - :param sentence_count: - :type sentence_count: int - :param sort_by: Possible values include: "Offset", "Rank". Default value: "Offset". - :type sort_by: str or - ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTaskParametersSortBy - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - 'sentence_count': {'key': 'sentenceCount', 'type': 'int'}, - 'sort_by': {'key': 'sortBy', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(ExtractiveSummarizationTaskParameters, self).__init__(**kwargs) - self.model_version = kwargs.get('model_version', "latest") - self.logging_opt_out = kwargs.get('logging_opt_out', False) - self.string_index_type = kwargs.get('string_index_type', None) - self.sentence_count = kwargs.get('sentence_count', 3) - self.sort_by = kwargs.get('sort_by', "Offset") - - -class ExtractiveSummarizationTaskResult(msrest.serialization.Model): - """ExtractiveSummarizationTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'ExtractiveSummarizationResult'}, - } - - def __init__( - self, - **kwargs - ): - super(ExtractiveSummarizationTaskResult, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - - -class HealthcareAssertion(msrest.serialization.Model): - """HealthcareAssertion. - - :param conditionality: Describes any conditionality on the entity. Possible values include: - "hypothetical", "conditional". - :type conditionality: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Conditionality - :param certainty: Describes the entities certainty and polarity. Possible values include: - "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". - :type certainty: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Certainty - :param association: Describes if the entity is the subject of the text or if it describes - someone else. Possible values include: "subject", "other". - :type association: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Association - """ - - _attribute_map = { - 'conditionality': {'key': 'conditionality', 'type': 'str'}, - 'certainty': {'key': 'certainty', 'type': 'str'}, - 'association': {'key': 'association', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareAssertion, self).__init__(**kwargs) - self.conditionality = kwargs.get('conditionality', None) - self.certainty = kwargs.get('certainty', None) - self.association = kwargs.get('association', None) - - -class HealthcareLinkingProperties(msrest.serialization.Model): - """HealthcareLinkingProperties. - - :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareAssertion - :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of - 'histologic'. - :type name: str - :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityLink] - """ - - _attribute_map = { - 'assertion': {'key': 'assertion', 'type': 'HealthcareAssertion'}, - 'name': {'key': 'name', 'type': 'str'}, - 'links': {'key': 'links', 'type': '[HealthcareEntityLink]'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareLinkingProperties, self).__init__(**kwargs) - self.assertion = kwargs.get('assertion', None) - self.name = kwargs.get('name', None) - self.links = kwargs.get('links', None) - - -class HealthcareEntityProperties(msrest.serialization.Model): - """HealthcareEntityProperties. - - All required parameters must be populated in order to send to Azure. - - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Healthcare Entity Category. Possible values include: - "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", - "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", - "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", - "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", - "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityCategory - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' - values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values - can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float - """ - - _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'subcategory': {'key': 'subcategory', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareEntityProperties, self).__init__(**kwargs) - self.text = kwargs['text'] - self.category = kwargs['category'] - self.subcategory = kwargs.get('subcategory', None) - self.offset = kwargs['offset'] - self.length = kwargs['length'] - self.confidence_score = kwargs['confidence_score'] - - -class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): - """HealthcareEntity. - - All required parameters must be populated in order to send to Azure. - - :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareAssertion - :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of - 'histologic'. - :type name: str - :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityLink] - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Healthcare Entity Category. Possible values include: - "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", - "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", - "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", - "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", - "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityCategory - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' - values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values - can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float - """ - - _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, - } - - _attribute_map = { - 'assertion': {'key': 'assertion', 'type': 'HealthcareAssertion'}, - 'name': {'key': 'name', 'type': 'str'}, - 'links': {'key': 'links', 'type': '[HealthcareEntityLink]'}, - 'text': {'key': 'text', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'subcategory': {'key': 'subcategory', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareEntity, self).__init__(**kwargs) - self.assertion = kwargs.get('assertion', None) - self.name = kwargs.get('name', None) - self.links = kwargs.get('links', None) - self.text = kwargs['text'] - self.category = kwargs['category'] - self.subcategory = kwargs.get('subcategory', None) - self.offset = kwargs['offset'] - self.length = kwargs['length'] - self.confidence_score = kwargs['confidence_score'] - - -class HealthcareEntityLink(msrest.serialization.Model): - """HealthcareEntityLink. - - All required parameters must be populated in order to send to Azure. - - :param data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. - :type data_source: str - :param id: Required. Entity id in the given source catalog. - :type id: str - """ - - _validation = { - 'data_source': {'required': True}, - 'id': {'required': True}, - } - - _attribute_map = { - 'data_source': {'key': 'dataSource', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareEntityLink, self).__init__(**kwargs) - self.data_source = kwargs['data_source'] - self.id = kwargs['id'] - - -class HealthcareTaskResult(msrest.serialization.Model): - """HealthcareTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareResult - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'HealthcareResult'}, - 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareTaskResult, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - self.errors = kwargs.get('errors', None) - - -class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): - """HealthcareJobState. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareResult - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - :param next_link: - :type next_link: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'HealthcareResult'}, - 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareJobState, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - self.errors = kwargs.get('errors', None) - self.next_link = kwargs.get('next_link', None) - self.results = kwargs.get('results', None) - self.errors = kwargs.get('errors', None) - self.created_date_time = kwargs['created_date_time'] - self.expiration_date_time = kwargs.get('expiration_date_time', None) - self.job_id = kwargs['job_id'] - self.last_update_date_time = kwargs['last_update_date_time'] - self.status = kwargs['status'] - self.next_link = kwargs.get('next_link', None) - self.created_date_time = kwargs['created_date_time'] - self.expiration_date_time = kwargs.get('expiration_date_time', None) - self.job_id = kwargs['job_id'] - self.last_update_date_time = kwargs['last_update_date_time'] - self.status = kwargs['status'] - - -class HealthcareRelation(msrest.serialization.Model): - """Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context. - - All required parameters must be populated in order to send to Azure. - - :param relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or - 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", - "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", - "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", - "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", - "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", - "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". - :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.RelationType - :param entities: Required. The entities in the relation. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareRelationEntity] - """ - - _validation = { - 'relation_type': {'required': True}, - 'entities': {'required': True}, - } - - _attribute_map = { - 'relation_type': {'key': 'relationType', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[HealthcareRelationEntity]'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareRelation, self).__init__(**kwargs) - self.relation_type = kwargs['relation_type'] - self.entities = kwargs['entities'] - - -class HealthcareRelationEntity(msrest.serialization.Model): - """HealthcareRelationEntity. - - All required parameters must be populated in order to send to Azure. - - :param ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment - Identifier Representation), pointing to the entity . - :type ref: str - :param role: Required. Role of entity in the relationship. For example: 'CD20-positive diffuse - large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 - (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). - :type role: str - """ - - _validation = { - 'ref': {'required': True}, - 'role': {'required': True}, - } - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - 'role': {'key': 'role', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareRelationEntity, self).__init__(**kwargs) - self.ref = kwargs['ref'] - self.role = kwargs['role'] - - -class HealthcareResult(msrest.serialization.Model): - """HealthcareResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentHealthcareEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentHealthcareEntities]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(HealthcareResult, self).__init__(**kwargs) - self.documents = kwargs['documents'] - self.errors = kwargs['errors'] - self.statistics = kwargs.get('statistics', None) - self.model_version = kwargs['model_version'] - - -class InnerError(msrest.serialization.Model): - """InnerError. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. Possible values include: "InvalidParameterValue", - "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", - "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", - "InvalidCountryHint". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.InnerErrorCodeValue - :param message: Required. Error message. - :type message: str - :param details: Error details. - :type details: dict[str, str] - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_2_preview_1.models.InnerError - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '{str}'}, - 'target': {'key': 'target', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - } - - def __init__( - self, - **kwargs - ): - super(InnerError, self).__init__(**kwargs) - self.code = kwargs['code'] - self.message = kwargs['message'] - self.details = kwargs.get('details', None) - self.target = kwargs.get('target', None) - self.innererror = kwargs.get('innererror', None) - - -class JobManifestTasks(msrest.serialization.Model): - """The set of tasks to execute on the input documents. Cannot specify the same task more than once. - - :param entity_recognition_tasks: - :type entity_recognition_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesTask] - :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_2_preview_1.models.PiiTask] - :param key_phrase_extraction_tasks: - :type key_phrase_extraction_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhrasesTask] - :param entity_linking_tasks: - :type entity_linking_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingTask] - :param sentiment_analysis_tasks: - :type sentiment_analysis_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.SentimentAnalysisTask] - :param extractive_summarization_tasks: - :type extractive_summarization_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTask] - """ - - _attribute_map = { - 'entity_recognition_tasks': {'key': 'entityRecognitionTasks', 'type': '[EntitiesTask]'}, - 'entity_recognition_pii_tasks': {'key': 'entityRecognitionPiiTasks', 'type': '[PiiTask]'}, - 'key_phrase_extraction_tasks': {'key': 'keyPhraseExtractionTasks', 'type': '[KeyPhrasesTask]'}, - 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[EntityLinkingTask]'}, - 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[SentimentAnalysisTask]'}, - 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[ExtractiveSummarizationTask]'}, - } - - def __init__( - self, - **kwargs - ): - super(JobManifestTasks, self).__init__(**kwargs) - self.entity_recognition_tasks = kwargs.get('entity_recognition_tasks', None) - self.entity_recognition_pii_tasks = kwargs.get('entity_recognition_pii_tasks', None) - self.key_phrase_extraction_tasks = kwargs.get('key_phrase_extraction_tasks', None) - self.entity_linking_tasks = kwargs.get('entity_linking_tasks', None) - self.sentiment_analysis_tasks = kwargs.get('sentiment_analysis_tasks', None) - self.extractive_summarization_tasks = kwargs.get('extractive_summarization_tasks', None) - - -class KeyPhraseResult(msrest.serialization.Model): - """KeyPhraseResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentKeyPhrases] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentKeyPhrases]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyPhraseResult, self).__init__(**kwargs) - self.documents = kwargs['documents'] - self.errors = kwargs['errors'] - self.statistics = kwargs.get('statistics', None) - self.model_version = kwargs['model_version'] - - -class KeyPhrasesTask(msrest.serialization.Model): - """KeyPhrasesTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhrasesTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'KeyPhrasesTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyPhrasesTask, self).__init__(**kwargs) - self.parameters = kwargs.get('parameters', None) - self.task_name = kwargs.get('task_name', None) - - -class KeyPhrasesTaskParameters(msrest.serialization.Model): - """KeyPhrasesTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyPhrasesTaskParameters, self).__init__(**kwargs) - self.model_version = kwargs.get('model_version', "latest") - self.logging_opt_out = kwargs.get('logging_opt_out', False) - - -class KeyPhraseTaskResult(msrest.serialization.Model): - """KeyPhraseTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'KeyPhraseResult'}, - } - - def __init__( - self, - **kwargs - ): - super(KeyPhraseTaskResult, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - - -class LanguageBatchInput(msrest.serialization.Model): - """LanguageBatchInput. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] - """ - - _validation = { - 'documents': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[LanguageInput]'}, - } - - def __init__( - self, - **kwargs - ): - super(LanguageBatchInput, self).__init__(**kwargs) - self.documents = kwargs['documents'] - - -class LanguageInput(msrest.serialization.Model): - """LanguageInput. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param text: Required. - :type text: str - :param country_hint: - :type country_hint: str - """ - - _validation = { - 'id': {'required': True}, - 'text': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'country_hint': {'key': 'countryHint', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LanguageInput, self).__init__(**kwargs) - self.id = kwargs['id'] - self.text = kwargs['text'] - self.country_hint = kwargs.get('country_hint', None) - - -class LanguageResult(msrest.serialization.Model): - """LanguageResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentLanguage] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentLanguage]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LanguageResult, self).__init__(**kwargs) - self.documents = kwargs['documents'] - self.errors = kwargs['errors'] - self.statistics = kwargs.get('statistics', None) - self.model_version = kwargs['model_version'] - - -class LinkedEntity(msrest.serialization.Model): - """LinkedEntity. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Entity Linking formal name. - :type name: str - :param matches: Required. List of instances this entity appears in the text. - :type matches: list[~azure.ai.textanalytics.v3_2_preview_1.models.Match] - :param language: Required. Language used in the data source. - :type language: str - :param id: Unique identifier of the recognized entity from the data source. - :type id: str - :param url: Required. URL for the entity's page from the data source. - :type url: str - :param data_source: Required. Data source used to extract entity linking, such as Wiki/Bing - etc. - :type data_source: str - :param bing_id: Bing Entity Search API unique identifier of the recognized entity. - :type bing_id: str - """ - - _validation = { - 'name': {'required': True}, - 'matches': {'required': True}, - 'language': {'required': True}, - 'url': {'required': True}, - 'data_source': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'matches': {'key': 'matches', 'type': '[Match]'}, - 'language': {'key': 'language', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'data_source': {'key': 'dataSource', 'type': 'str'}, - 'bing_id': {'key': 'bingId', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(LinkedEntity, self).__init__(**kwargs) - self.name = kwargs['name'] - self.matches = kwargs['matches'] - self.language = kwargs['language'] - self.id = kwargs.get('id', None) - self.url = kwargs['url'] - self.data_source = kwargs['data_source'] - self.bing_id = kwargs.get('bing_id', None) - - -class Match(msrest.serialization.Model): - """Match. - - All required parameters must be populated in order to send to Azure. - - :param confidence_score: Required. If a well known item is recognized, a decimal number - denoting the confidence level between 0 and 1 will be returned. - :type confidence_score: float - :param text: Required. Entity text as appears in the request. - :type text: str - :param offset: Required. Start position for the entity match text. - :type offset: int - :param length: Required. Length for the entity match text. - :type length: int - """ - - _validation = { - 'confidence_score': {'required': True}, - 'text': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - } - - _attribute_map = { - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'text': {'key': 'text', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - } - - def __init__( - self, - **kwargs - ): - super(Match, self).__init__(**kwargs) - self.confidence_score = kwargs['confidence_score'] - self.text = kwargs['text'] - self.offset = kwargs['offset'] - self.length = kwargs['length'] - - -class MultiLanguageBatchInput(msrest.serialization.Model): - """Contains a set of input documents to be analyzed by the service. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] - """ - - _validation = { - 'documents': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[MultiLanguageInput]'}, - } - - def __init__( - self, - **kwargs - ): - super(MultiLanguageBatchInput, self).__init__(**kwargs) - self.documents = kwargs['documents'] - - -class MultiLanguageInput(msrest.serialization.Model): - """Contains an input document to be analyzed by the service. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A unique, non-empty document identifier. - :type id: str - :param text: Required. The input text to process. - :type text: str - :param language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For - example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as - default. - :type language: str - """ - - _validation = { - 'id': {'required': True}, - 'text': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'language': {'key': 'language', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(MultiLanguageInput, self).__init__(**kwargs) - self.id = kwargs['id'] - self.text = kwargs['text'] - self.language = kwargs.get('language', None) - - -class PiiDocumentEntities(msrest.serialization.Model): - """PiiDocumentEntities. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param redacted_text: Required. Returns redacted text. - :type redacted_text: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'redacted_text': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'redacted_text': {'key': 'redactedText', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[Entity]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - **kwargs - ): - super(PiiDocumentEntities, self).__init__(**kwargs) - self.id = kwargs['id'] - self.redacted_text = kwargs['redacted_text'] - self.entities = kwargs['entities'] - self.warnings = kwargs['warnings'] - self.statistics = kwargs.get('statistics', None) - - -class PiiResult(msrest.serialization.Model): - """PiiResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.PiiDocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[PiiDocumentEntities]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PiiResult, self).__init__(**kwargs) - self.documents = kwargs['documents'] - self.errors = kwargs['errors'] - self.statistics = kwargs.get('statistics', None) - self.model_version = kwargs['model_version'] - - -class PiiTask(msrest.serialization.Model): - """PiiTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'PiiTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PiiTask, self).__init__(**kwargs) - self.parameters = kwargs.get('parameters', None) - self.task_name = kwargs.get('task_name', None) - - -class PiiTaskParameters(msrest.serialization.Model): - """PiiTaskParameters. - - :param domain: Possible values include: "phi", "none". Default value: "none". - :type domain: str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiTaskParametersDomain - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - """ - - _validation = { - 'pii_categories': {'unique': True}, - } - - _attribute_map = { - 'domain': {'key': 'domain', 'type': 'str'}, - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'pii_categories': {'key': 'piiCategories', 'type': '[str]'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(PiiTaskParameters, self).__init__(**kwargs) - self.domain = kwargs.get('domain', "none") - self.model_version = kwargs.get('model_version', "latest") - self.logging_opt_out = kwargs.get('logging_opt_out', True) - self.pii_categories = kwargs.get('pii_categories', None) - self.string_index_type = kwargs.get('string_index_type', None) - - -class PiiTaskResult(msrest.serialization.Model): - """PiiTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'PiiResult'}, - } - - def __init__( - self, - **kwargs - ): - super(PiiTaskResult, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - - -class RequestStatistics(msrest.serialization.Model): - """if showStats=true was specified in the request this field will contain information about the request payload. - - All required parameters must be populated in order to send to Azure. - - :param documents_count: Required. Number of documents submitted in the request. - :type documents_count: int - :param valid_documents_count: Required. Number of valid documents. This excludes empty, - over-size limit or non-supported languages documents. - :type valid_documents_count: int - :param erroneous_documents_count: Required. Number of invalid documents. This includes empty, - over-size limit or non-supported languages documents. - :type erroneous_documents_count: int - :param transactions_count: Required. Number of transactions for the request. - :type transactions_count: long - """ - - _validation = { - 'documents_count': {'required': True}, - 'valid_documents_count': {'required': True}, - 'erroneous_documents_count': {'required': True}, - 'transactions_count': {'required': True}, - } - - _attribute_map = { - 'documents_count': {'key': 'documentsCount', 'type': 'int'}, - 'valid_documents_count': {'key': 'validDocumentsCount', 'type': 'int'}, - 'erroneous_documents_count': {'key': 'erroneousDocumentsCount', 'type': 'int'}, - 'transactions_count': {'key': 'transactionsCount', 'type': 'long'}, - } - - def __init__( - self, - **kwargs - ): - super(RequestStatistics, self).__init__(**kwargs) - self.documents_count = kwargs['documents_count'] - self.valid_documents_count = kwargs['valid_documents_count'] - self.erroneous_documents_count = kwargs['erroneous_documents_count'] - self.transactions_count = kwargs['transactions_count'] - - -class SentenceAssessment(msrest.serialization.Model): - """SentenceAssessment. - - All required parameters must be populated in order to send to Azure. - - :param sentiment: Required. Assessment sentiment in the sentence. Possible values include: - "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TokenSentimentValue - :param confidence_scores: Required. Assessment sentiment confidence scores in the sentence. - :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.TargetConfidenceScoreLabel - :param offset: Required. The assessment offset from the start of the sentence. - :type offset: int - :param length: Required. The length of the assessment. - :type length: int - :param text: Required. The assessment text detected. - :type text: str - :param is_negated: Required. The indicator representing if the assessment is negated. - :type is_negated: bool - """ - - _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'is_negated': {'required': True}, - } - - _attribute_map = { - 'sentiment': {'key': 'sentiment', 'type': 'str'}, - 'confidence_scores': {'key': 'confidenceScores', 'type': 'TargetConfidenceScoreLabel'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'text': {'key': 'text', 'type': 'str'}, - 'is_negated': {'key': 'isNegated', 'type': 'bool'}, - } - - def __init__( - self, - **kwargs - ): - super(SentenceAssessment, self).__init__(**kwargs) - self.sentiment = kwargs['sentiment'] - self.confidence_scores = kwargs['confidence_scores'] - self.offset = kwargs['offset'] - self.length = kwargs['length'] - self.text = kwargs['text'] - self.is_negated = kwargs['is_negated'] - - -class SentenceSentiment(msrest.serialization.Model): - """SentenceSentiment. - - All required parameters must be populated in order to send to Azure. - - :param text: Required. The sentence text. - :type text: str - :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: - "positive", "neutral", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.SentenceSentimentValue - :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the - sentence for all classes. - :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentConfidenceScorePerLabel - :param offset: Required. The sentence offset from the start of the document. - :type offset: int - :param length: Required. The length of the sentence. - :type length: int - :param targets: The array of sentence targets for the sentence. - :type targets: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceTarget] - :param assessments: The array of assessments for the sentence. - :type assessments: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceAssessment] - """ - - _validation = { - 'text': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'sentiment': {'key': 'sentiment', 'type': 'str'}, - 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'targets': {'key': 'targets', 'type': '[SentenceTarget]'}, - 'assessments': {'key': 'assessments', 'type': '[SentenceAssessment]'}, - } - - def __init__( - self, - **kwargs - ): - super(SentenceSentiment, self).__init__(**kwargs) - self.text = kwargs['text'] - self.sentiment = kwargs['sentiment'] - self.confidence_scores = kwargs['confidence_scores'] - self.offset = kwargs['offset'] - self.length = kwargs['length'] - self.targets = kwargs.get('targets', None) - self.assessments = kwargs.get('assessments', None) - - -class SentenceTarget(msrest.serialization.Model): - """SentenceTarget. - - All required parameters must be populated in order to send to Azure. - - :param sentiment: Required. Targeted sentiment in the sentence. Possible values include: - "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TokenSentimentValue - :param confidence_scores: Required. Target sentiment confidence scores for the target in the - sentence. - :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.TargetConfidenceScoreLabel - :param offset: Required. The target offset from the start of the sentence. - :type offset: int - :param length: Required. The length of the target. - :type length: int - :param text: Required. The target text detected. - :type text: str - :param relations: Required. The array of either assessment or target objects which is related - to the target. - :type relations: list[~azure.ai.textanalytics.v3_2_preview_1.models.TargetRelation] - """ - - _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'relations': {'required': True}, - } - - _attribute_map = { - 'sentiment': {'key': 'sentiment', 'type': 'str'}, - 'confidence_scores': {'key': 'confidenceScores', 'type': 'TargetConfidenceScoreLabel'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'text': {'key': 'text', 'type': 'str'}, - 'relations': {'key': 'relations', 'type': '[TargetRelation]'}, - } - - def __init__( - self, - **kwargs - ): - super(SentenceTarget, self).__init__(**kwargs) - self.sentiment = kwargs['sentiment'] - self.confidence_scores = kwargs['confidence_scores'] - self.offset = kwargs['offset'] - self.length = kwargs['length'] - self.text = kwargs['text'] - self.relations = kwargs['relations'] - - -class SentimentAnalysisTask(msrest.serialization.Model): - """SentimentAnalysisTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentAnalysisTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'SentimentAnalysisTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SentimentAnalysisTask, self).__init__(**kwargs) - self.parameters = kwargs.get('parameters', None) - self.task_name = kwargs.get('task_name', None) - - -class SentimentAnalysisTaskParameters(msrest.serialization.Model): - """SentimentAnalysisTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param opinion_mining: - :type opinion_mining: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'opinion_mining': {'key': 'opinionMining', 'type': 'bool'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SentimentAnalysisTaskParameters, self).__init__(**kwargs) - self.model_version = kwargs.get('model_version', "latest") - self.logging_opt_out = kwargs.get('logging_opt_out', False) - self.opinion_mining = kwargs.get('opinion_mining', False) - self.string_index_type = kwargs.get('string_index_type', None) - - -class SentimentConfidenceScorePerLabel(msrest.serialization.Model): - """Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. - - All required parameters must be populated in order to send to Azure. - - :param positive: Required. - :type positive: float - :param neutral: Required. - :type neutral: float - :param negative: Required. - :type negative: float - """ - - _validation = { - 'positive': {'required': True}, - 'neutral': {'required': True}, - 'negative': {'required': True}, - } - - _attribute_map = { - 'positive': {'key': 'positive', 'type': 'float'}, - 'neutral': {'key': 'neutral', 'type': 'float'}, - 'negative': {'key': 'negative', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) - self.positive = kwargs['positive'] - self.neutral = kwargs['neutral'] - self.negative = kwargs['negative'] - - -class SentimentResponse(msrest.serialization.Model): - """SentimentResponse. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Sentiment analysis per document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentSentiment] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentSentiment]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SentimentResponse, self).__init__(**kwargs) - self.documents = kwargs['documents'] - self.errors = kwargs['errors'] - self.statistics = kwargs.get('statistics', None) - self.model_version = kwargs['model_version'] - - -class SentimentTaskResult(msrest.serialization.Model): - """SentimentTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'SentimentResponse'}, - } - - def __init__( - self, - **kwargs - ): - super(SentimentTaskResult, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - - -class TargetConfidenceScoreLabel(msrest.serialization.Model): - """Represents the confidence scores across all sentiment classes: positive, neutral, negative. - - All required parameters must be populated in order to send to Azure. - - :param positive: Required. - :type positive: float - :param negative: Required. - :type negative: float - """ - - _validation = { - 'positive': {'required': True}, - 'negative': {'required': True}, - } - - _attribute_map = { - 'positive': {'key': 'positive', 'type': 'float'}, - 'negative': {'key': 'negative', 'type': 'float'}, - } - - def __init__( - self, - **kwargs - ): - super(TargetConfidenceScoreLabel, self).__init__(**kwargs) - self.positive = kwargs['positive'] - self.negative = kwargs['negative'] - - -class TargetRelation(msrest.serialization.Model): - """TargetRelation. - - All required parameters must be populated in order to send to Azure. - - :param relation_type: Required. The type related to the target. Possible values include: - "assessment", "target". - :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TargetRelationType - :param ref: Required. The JSON pointer indicating the linked object. - :type ref: str - """ - - _validation = { - 'relation_type': {'required': True}, - 'ref': {'required': True}, - } - - _attribute_map = { - 'relation_type': {'key': 'relationType', 'type': 'str'}, - 'ref': {'key': 'ref', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TargetRelation, self).__init__(**kwargs) - self.relation_type = kwargs['relation_type'] - self.ref = kwargs['ref'] - - -class TasksStateTasks(msrest.serialization.Model): - """TasksStateTasks. - - All required parameters must be populated in order to send to Azure. - - :param completed: Required. - :type completed: int - :param failed: Required. - :type failed: int - :param in_progress: Required. - :type in_progress: int - :param total: Required. - :type total: int - :param entity_recognition_tasks: - :type entity_recognition_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityRecognitionTasksItem] - :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityRecognitionPiiTasksItem] - :param key_phrase_extraction_tasks: - :type key_phrase_extraction_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksKeyPhraseExtractionTasksItem] - :param entity_linking_tasks: - :type entity_linking_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityLinkingTasksItem] - :param sentiment_analysis_tasks: - :type sentiment_analysis_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksSentimentAnalysisTasksItem] - :param extractive_summarization_tasks: - :type extractive_summarization_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksExtractiveSummarizationTasksItem] - """ - - _validation = { - 'completed': {'required': True}, - 'failed': {'required': True}, - 'in_progress': {'required': True}, - 'total': {'required': True}, - } - - _attribute_map = { - 'completed': {'key': 'completed', 'type': 'int'}, - 'failed': {'key': 'failed', 'type': 'int'}, - 'in_progress': {'key': 'inProgress', 'type': 'int'}, - 'total': {'key': 'total', 'type': 'int'}, - 'entity_recognition_tasks': {'key': 'entityRecognitionTasks', 'type': '[TasksStateTasksEntityRecognitionTasksItem]'}, - 'entity_recognition_pii_tasks': {'key': 'entityRecognitionPiiTasks', 'type': '[TasksStateTasksEntityRecognitionPiiTasksItem]'}, - 'key_phrase_extraction_tasks': {'key': 'keyPhraseExtractionTasks', 'type': '[TasksStateTasksKeyPhraseExtractionTasksItem]'}, - 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[TasksStateTasksEntityLinkingTasksItem]'}, - 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[TasksStateTasksSentimentAnalysisTasksItem]'}, - 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[TasksStateTasksExtractiveSummarizationTasksItem]'}, - } - - def __init__( - self, - **kwargs - ): - super(TasksStateTasks, self).__init__(**kwargs) - self.completed = kwargs['completed'] - self.failed = kwargs['failed'] - self.in_progress = kwargs['in_progress'] - self.total = kwargs['total'] - self.entity_recognition_tasks = kwargs.get('entity_recognition_tasks', None) - self.entity_recognition_pii_tasks = kwargs.get('entity_recognition_pii_tasks', None) - self.key_phrase_extraction_tasks = kwargs.get('key_phrase_extraction_tasks', None) - self.entity_linking_tasks = kwargs.get('entity_linking_tasks', None) - self.sentiment_analysis_tasks = kwargs.get('sentiment_analysis_tasks', None) - self.extractive_summarization_tasks = kwargs.get('extractive_summarization_tasks', None) - - -class TaskState(msrest.serialization.Model): - """TaskState. - - All required parameters must be populated in order to send to Azure. - - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TaskState, self).__init__(**kwargs) - self.last_update_date_time = kwargs['last_update_date_time'] - self.task_name = kwargs['task_name'] - self.status = kwargs['status'] - - -class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult): - """TasksStateTasksEntityLinkingTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'EntityLinkingResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TasksStateTasksEntityLinkingTasksItem, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - self.last_update_date_time = kwargs['last_update_date_time'] - self.task_name = kwargs['task_name'] - self.status = kwargs['status'] - - -class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult): - """TasksStateTasksEntityRecognitionPiiTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'PiiResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TasksStateTasksEntityRecognitionPiiTasksItem, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - self.last_update_date_time = kwargs['last_update_date_time'] - self.task_name = kwargs['task_name'] - self.status = kwargs['status'] - - -class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult): - """TasksStateTasksEntityRecognitionTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'EntitiesResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TasksStateTasksEntityRecognitionTasksItem, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - self.last_update_date_time = kwargs['last_update_date_time'] - self.task_name = kwargs['task_name'] - self.status = kwargs['status'] - - -class TasksStateTasksExtractiveSummarizationTasksItem(TaskState, ExtractiveSummarizationTaskResult): - """TasksStateTasksExtractiveSummarizationTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'ExtractiveSummarizationResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TasksStateTasksExtractiveSummarizationTasksItem, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - self.last_update_date_time = kwargs['last_update_date_time'] - self.task_name = kwargs['task_name'] - self.status = kwargs['status'] - - -class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult): - """TasksStateTasksKeyPhraseExtractionTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'KeyPhraseResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TasksStateTasksKeyPhraseExtractionTasksItem, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - self.last_update_date_time = kwargs['last_update_date_time'] - self.task_name = kwargs['task_name'] - self.status = kwargs['status'] - - -class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult): - """TasksStateTasksSentimentAnalysisTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'SentimentResponse'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TasksStateTasksSentimentAnalysisTasksItem, self).__init__(**kwargs) - self.results = kwargs.get('results', None) - self.last_update_date_time = kwargs['last_update_date_time'] - self.task_name = kwargs['task_name'] - self.status = kwargs['status'] - - -class TextAnalyticsError(msrest.serialization.Model): - """TextAnalyticsError. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. Possible values include: "InvalidRequest", - "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.ErrorCodeValue - :param message: Required. Error message. - :type message: str - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_2_preview_1.models.InnerError - :param details: Details about specific errors that led to this reported error. - :type details: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'details': {'key': 'details', 'type': '[TextAnalyticsError]'}, - } - - def __init__( - self, - **kwargs - ): - super(TextAnalyticsError, self).__init__(**kwargs) - self.code = kwargs['code'] - self.message = kwargs['message'] - self.target = kwargs.get('target', None) - self.innererror = kwargs.get('innererror', None) - self.details = kwargs.get('details', None) - - -class TextAnalyticsWarning(msrest.serialization.Model): - """TextAnalyticsWarning. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. Possible values include: "LongWordsInDocument", - "DocumentTruncated". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.WarningCodeValue - :param message: Required. Warning message. - :type message: str - :param target_ref: A JSON pointer reference indicating the target object. - :type target_ref: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target_ref': {'key': 'targetRef', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(TextAnalyticsWarning, self).__init__(**kwargs) - self.code = kwargs['code'] - self.message = kwargs['message'] - self.target_ref = kwargs.get('target_ref', None) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models_py3.py deleted file mode 100644 index c4991dc07db7..000000000000 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_models_py3.py +++ /dev/null @@ -1,3496 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -import datetime -from typing import Dict, List, Optional, Union - -from azure.core.exceptions import HttpResponseError -import msrest.serialization - -from ._text_analytics_client_enums import * - - -class AnalysisInput(msrest.serialization.Model): - """AnalysisInput. - - All required parameters must be populated in order to send to Azure. - - :param analysis_input: Required. Contains a set of input documents to be analyzed by the - service. - :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageBatchInput - """ - - _validation = { - 'analysis_input': {'required': True}, - } - - _attribute_map = { - 'analysis_input': {'key': 'analysisInput', 'type': 'MultiLanguageBatchInput'}, - } - - def __init__( - self, - *, - analysis_input: "MultiLanguageBatchInput", - **kwargs - ): - super(AnalysisInput, self).__init__(**kwargs) - self.analysis_input = analysis_input - - -class JobManifest(msrest.serialization.Model): - """JobManifest. - - All required parameters must be populated in order to send to Azure. - - :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the - same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.JobManifestTasks - """ - - _validation = { - 'tasks': {'required': True}, - } - - _attribute_map = { - 'tasks': {'key': 'tasks', 'type': 'JobManifestTasks'}, - } - - def __init__( - self, - *, - tasks: "JobManifestTasks", - **kwargs - ): - super(JobManifest, self).__init__(**kwargs) - self.tasks = tasks - - -class JobDescriptor(msrest.serialization.Model): - """JobDescriptor. - - :param display_name: Optional display name for the analysis job. - :type display_name: str - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - **kwargs - ): - super(JobDescriptor, self).__init__(**kwargs) - self.display_name = display_name - - -class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest): - """AnalyzeBatchInput. - - All required parameters must be populated in order to send to Azure. - - :param tasks: Required. The set of tasks to execute on the input documents. Cannot specify the - same task more than once. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.JobManifestTasks - :param analysis_input: Required. Contains a set of input documents to be analyzed by the - service. - :type analysis_input: ~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageBatchInput - :param display_name: Optional display name for the analysis job. - :type display_name: str - """ - - _validation = { - 'tasks': {'required': True}, - 'analysis_input': {'required': True}, - } - - _attribute_map = { - 'tasks': {'key': 'tasks', 'type': 'JobManifestTasks'}, - 'analysis_input': {'key': 'analysisInput', 'type': 'MultiLanguageBatchInput'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__( - self, - *, - tasks: "JobManifestTasks", - analysis_input: "MultiLanguageBatchInput", - display_name: Optional[str] = None, - **kwargs - ): - super(AnalyzeBatchInput, self).__init__(display_name=display_name, analysis_input=analysis_input, tasks=tasks, **kwargs) - self.tasks = tasks - self.analysis_input = analysis_input - self.tasks = tasks - self.display_name = display_name - self.analysis_input = analysis_input - self.display_name = display_name - - -class AnalyzeJobDisplayName(msrest.serialization.Model): - """AnalyzeJobDisplayName. - - :param display_name: - :type display_name: str - """ - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - } - - def __init__( - self, - *, - display_name: Optional[str] = None, - **kwargs - ): - super(AnalyzeJobDisplayName, self).__init__(**kwargs) - self.display_name = display_name - - -class AnalyzeJobErrorsAndStatistics(msrest.serialization.Model): - """AnalyzeJobErrorsAndStatistics. - - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - """ - - _attribute_map = { - 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - } - - def __init__( - self, - *, - errors: Optional[List["TextAnalyticsError"]] = None, - statistics: Optional["RequestStatistics"] = None, - **kwargs - ): - super(AnalyzeJobErrorsAndStatistics, self).__init__(**kwargs) - self.errors = errors - self.statistics = statistics - - -class JobMetadata(msrest.serialization.Model): - """JobMetadata. - - All required parameters must be populated in order to send to Azure. - - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - created_date_time: datetime.datetime, - job_id: str, - last_update_date_time: datetime.datetime, - status: Union[str, "State"], - expiration_date_time: Optional[datetime.datetime] = None, - **kwargs - ): - super(JobMetadata, self).__init__(**kwargs) - self.created_date_time = created_date_time - self.expiration_date_time = expiration_date_time - self.job_id = job_id - self.last_update_date_time = last_update_date_time - self.status = status - - -class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName): - """AnalyzeJobMetadata. - - All required parameters must be populated in order to send to Azure. - - :param display_name: - :type display_name: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - created_date_time: datetime.datetime, - job_id: str, - last_update_date_time: datetime.datetime, - status: Union[str, "State"], - display_name: Optional[str] = None, - expiration_date_time: Optional[datetime.datetime] = None, - **kwargs - ): - super(AnalyzeJobMetadata, self).__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, display_name=display_name, **kwargs) - self.display_name = display_name - self.created_date_time = created_date_time - self.expiration_date_time = expiration_date_time - self.job_id = job_id - self.last_update_date_time = last_update_date_time - self.status = status - - -class Pagination(msrest.serialization.Model): - """Pagination. - - :param next_link: - :type next_link: str - """ - - _attribute_map = { - 'next_link': {'key': '@nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - next_link: Optional[str] = None, - **kwargs - ): - super(Pagination, self).__init__(**kwargs) - self.next_link = next_link - - -class TasksState(msrest.serialization.Model): - """TasksState. - - All required parameters must be populated in order to send to Azure. - - :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasks - """ - - _validation = { - 'tasks': {'required': True}, - } - - _attribute_map = { - 'tasks': {'key': 'tasks', 'type': 'TasksStateTasks'}, - } - - def __init__( - self, - *, - tasks: "TasksStateTasks", - **kwargs - ): - super(TasksState, self).__init__(**kwargs) - self.tasks = tasks - - -class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatistics, Pagination): - """AnalyzeJobState. - - All required parameters must be populated in order to send to Azure. - - :param next_link: - :type next_link: str - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param tasks: Required. - :type tasks: ~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasks - :param display_name: - :type display_name: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'tasks': {'required': True}, - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'next_link': {'key': '@nextLink', 'type': 'str'}, - 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'tasks': {'key': 'tasks', 'type': 'TasksStateTasks'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - tasks: "TasksStateTasks", - created_date_time: datetime.datetime, - job_id: str, - last_update_date_time: datetime.datetime, - status: Union[str, "State"], - next_link: Optional[str] = None, - errors: Optional[List["TextAnalyticsError"]] = None, - statistics: Optional["RequestStatistics"] = None, - display_name: Optional[str] = None, - expiration_date_time: Optional[datetime.datetime] = None, - **kwargs - ): - super(AnalyzeJobState, self).__init__(display_name=display_name, created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, tasks=tasks, errors=errors, statistics=statistics, next_link=next_link, **kwargs) - self.next_link = next_link - self.errors = errors - self.statistics = statistics - self.tasks = tasks - self.next_link = next_link - self.errors = errors - self.statistics = statistics - self.display_name = display_name - self.created_date_time = created_date_time - self.expiration_date_time = expiration_date_time - self.job_id = job_id - self.last_update_date_time = last_update_date_time - self.status = status - self.next_link = next_link - self.tasks = tasks - self.display_name = display_name - self.created_date_time = created_date_time - self.expiration_date_time = expiration_date_time - self.job_id = job_id - self.last_update_date_time = last_update_date_time - self.status = status - self.errors = errors - self.statistics = statistics - self.tasks = tasks - self.display_name = display_name - self.created_date_time = created_date_time - self.expiration_date_time = expiration_date_time - self.job_id = job_id - self.last_update_date_time = last_update_date_time - self.status = status - - -class DetectedLanguage(msrest.serialization.Model): - """DetectedLanguage. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Long name of a detected language (e.g. English, French). - :type name: str - :param iso6391_name: Required. A two letter representation of the detected language according - to the ISO 639-1 standard (e.g. en, fr). - :type iso6391_name: str - :param confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 - indicate 100% certainty that the identified language is true. - :type confidence_score: float - """ - - _validation = { - 'name': {'required': True}, - 'iso6391_name': {'required': True}, - 'confidence_score': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'iso6391_name': {'key': 'iso6391Name', 'type': 'str'}, - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - } - - def __init__( - self, - *, - name: str, - iso6391_name: str, - confidence_score: float, - **kwargs - ): - super(DetectedLanguage, self).__init__(**kwargs) - self.name = name - self.iso6391_name = iso6391_name - self.confidence_score = confidence_score - - -class DocumentEntities(msrest.serialization.Model): - """DocumentEntities. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[Entity]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - *, - id: str, - entities: List["Entity"], - warnings: List["TextAnalyticsWarning"], - statistics: Optional["DocumentStatistics"] = None, - **kwargs - ): - super(DocumentEntities, self).__init__(**kwargs) - self.id = id - self.entities = entities - self.warnings = warnings - self.statistics = statistics - - -class DocumentError(msrest.serialization.Model): - """DocumentError. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Document Id. - :type id: str - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError - """ - - _validation = { - 'id': {'required': True}, - 'error': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, - } - - def __init__( - self, - *, - id: str, - error: "TextAnalyticsError", - **kwargs - ): - super(DocumentError, self).__init__(**kwargs) - self.id = id - self.error = error - - -class DocumentHealthcareEntities(msrest.serialization.Model): - """DocumentHealthcareEntities. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Healthcare entities. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntity] - :param relations: Required. Healthcare entity relations. - :type relations: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareRelation] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'relations': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[HealthcareEntity]'}, - 'relations': {'key': 'relations', 'type': '[HealthcareRelation]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - *, - id: str, - entities: List["HealthcareEntity"], - relations: List["HealthcareRelation"], - warnings: List["TextAnalyticsWarning"], - statistics: Optional["DocumentStatistics"] = None, - **kwargs - ): - super(DocumentHealthcareEntities, self).__init__(**kwargs) - self.id = id - self.entities = entities - self.relations = relations - self.warnings = warnings - self.statistics = statistics - - -class DocumentKeyPhrases(msrest.serialization.Model): - """DocumentKeyPhrases. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param key_phrases: Required. A list of representative words or phrases. The number of key - phrases returned is proportional to the number of words in the input document. - :type key_phrases: list[str] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'key_phrases': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'key_phrases': {'key': 'keyPhrases', 'type': '[str]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - *, - id: str, - key_phrases: List[str], - warnings: List["TextAnalyticsWarning"], - statistics: Optional["DocumentStatistics"] = None, - **kwargs - ): - super(DocumentKeyPhrases, self).__init__(**kwargs) - self.id = id - self.key_phrases = key_phrases - self.warnings = warnings - self.statistics = statistics - - -class DocumentLanguage(msrest.serialization.Model): - """DocumentLanguage. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param detected_language: Required. Detected Language. - :type detected_language: ~azure.ai.textanalytics.v3_2_preview_1.models.DetectedLanguage - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'detected_language': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'detected_language': {'key': 'detectedLanguage', 'type': 'DetectedLanguage'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - *, - id: str, - detected_language: "DetectedLanguage", - warnings: List["TextAnalyticsWarning"], - statistics: Optional["DocumentStatistics"] = None, - **kwargs - ): - super(DocumentLanguage, self).__init__(**kwargs) - self.id = id - self.detected_language = detected_language - self.warnings = warnings - self.statistics = statistics - - -class DocumentLinkedEntities(msrest.serialization.Model): - """DocumentLinkedEntities. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param entities: Required. Recognized well known entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.LinkedEntity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[LinkedEntity]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - *, - id: str, - entities: List["LinkedEntity"], - warnings: List["TextAnalyticsWarning"], - statistics: Optional["DocumentStatistics"] = None, - **kwargs - ): - super(DocumentLinkedEntities, self).__init__(**kwargs) - self.id = id - self.entities = entities - self.warnings = warnings - self.statistics = statistics - - -class DocumentSentiment(msrest.serialization.Model): - """DocumentSentiment. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or - Mixed). Possible values include: "positive", "neutral", "negative", "mixed". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentSentimentValue - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - :param confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 - for each sentiment class. - :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentConfidenceScorePerLabel - :param sentences: Required. Sentence level sentiment analysis. - :type sentences: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceSentiment] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - """ - - _validation = { - 'id': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'sentences': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'sentiment': {'key': 'sentiment', 'type': 'str'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, - 'sentences': {'key': 'sentences', 'type': '[SentenceSentiment]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - } - - def __init__( - self, - *, - id: str, - sentiment: Union[str, "DocumentSentimentValue"], - confidence_scores: "SentimentConfidenceScorePerLabel", - sentences: List["SentenceSentiment"], - warnings: List["TextAnalyticsWarning"], - statistics: Optional["DocumentStatistics"] = None, - **kwargs - ): - super(DocumentSentiment, self).__init__(**kwargs) - self.id = id - self.sentiment = sentiment - self.statistics = statistics - self.confidence_scores = confidence_scores - self.sentences = sentences - self.warnings = warnings - - -class DocumentStatistics(msrest.serialization.Model): - """if showStats=true was specified in the request this field will contain information about the document payload. - - All required parameters must be populated in order to send to Azure. - - :param characters_count: Required. Number of text elements recognized in the document. - :type characters_count: int - :param transactions_count: Required. Number of transactions for the document. - :type transactions_count: int - """ - - _validation = { - 'characters_count': {'required': True}, - 'transactions_count': {'required': True}, - } - - _attribute_map = { - 'characters_count': {'key': 'charactersCount', 'type': 'int'}, - 'transactions_count': {'key': 'transactionsCount', 'type': 'int'}, - } - - def __init__( - self, - *, - characters_count: int, - transactions_count: int, - **kwargs - ): - super(DocumentStatistics, self).__init__(**kwargs) - self.characters_count = characters_count - self.transactions_count = transactions_count - - -class EntitiesResult(msrest.serialization.Model): - """EntitiesResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - documents: List["DocumentEntities"], - errors: List["DocumentError"], - model_version: str, - statistics: Optional["RequestStatistics"] = None, - **kwargs - ): - super(EntitiesResult, self).__init__(**kwargs) - self.documents = documents - self.errors = errors - self.statistics = statistics - self.model_version = model_version - - -class EntitiesTask(msrest.serialization.Model): - """EntitiesTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'EntitiesTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - *, - parameters: Optional["EntitiesTaskParameters"] = None, - task_name: Optional[str] = None, - **kwargs - ): - super(EntitiesTask, self).__init__(**kwargs) - self.parameters = parameters - self.task_name = task_name - - -class EntitiesTaskParameters(msrest.serialization.Model): - """EntitiesTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - } - - def __init__( - self, - *, - model_version: Optional[str] = "latest", - logging_opt_out: Optional[bool] = False, - string_index_type: Optional[Union[str, "StringIndexType"]] = None, - **kwargs - ): - super(EntitiesTaskParameters, self).__init__(**kwargs) - self.model_version = model_version - self.logging_opt_out = logging_opt_out - self.string_index_type = string_index_type - - -class EntitiesTaskResult(msrest.serialization.Model): - """EntitiesTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'EntitiesResult'}, - } - - def __init__( - self, - *, - results: Optional["EntitiesResult"] = None, - **kwargs - ): - super(EntitiesTaskResult, self).__init__(**kwargs) - self.results = results - - -class Entity(msrest.serialization.Model): - """Entity. - - All required parameters must be populated in order to send to Azure. - - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Entity type. - :type category: str - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' - values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values - can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float - """ - - _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'subcategory': {'key': 'subcategory', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - } - - def __init__( - self, - *, - text: str, - category: str, - offset: int, - length: int, - confidence_score: float, - subcategory: Optional[str] = None, - **kwargs - ): - super(Entity, self).__init__(**kwargs) - self.text = text - self.category = category - self.subcategory = subcategory - self.offset = offset - self.length = length - self.confidence_score = confidence_score - - -class EntityLinkingResult(msrest.serialization.Model): - """EntityLinkingResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentLinkedEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentLinkedEntities]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - documents: List["DocumentLinkedEntities"], - errors: List["DocumentError"], - model_version: str, - statistics: Optional["RequestStatistics"] = None, - **kwargs - ): - super(EntityLinkingResult, self).__init__(**kwargs) - self.documents = documents - self.errors = errors - self.statistics = statistics - self.model_version = model_version - - -class EntityLinkingTask(msrest.serialization.Model): - """EntityLinkingTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'EntityLinkingTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - *, - parameters: Optional["EntityLinkingTaskParameters"] = None, - task_name: Optional[str] = None, - **kwargs - ): - super(EntityLinkingTask, self).__init__(**kwargs) - self.parameters = parameters - self.task_name = task_name - - -class EntityLinkingTaskParameters(msrest.serialization.Model): - """EntityLinkingTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - } - - def __init__( - self, - *, - model_version: Optional[str] = "latest", - logging_opt_out: Optional[bool] = False, - string_index_type: Optional[Union[str, "StringIndexType"]] = None, - **kwargs - ): - super(EntityLinkingTaskParameters, self).__init__(**kwargs) - self.model_version = model_version - self.logging_opt_out = logging_opt_out - self.string_index_type = string_index_type - - -class EntityLinkingTaskResult(msrest.serialization.Model): - """EntityLinkingTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'EntityLinkingResult'}, - } - - def __init__( - self, - *, - results: Optional["EntityLinkingResult"] = None, - **kwargs - ): - super(EntityLinkingTaskResult, self).__init__(**kwargs) - self.results = results - - -class ErrorResponse(msrest.serialization.Model): - """ErrorResponse. - - All required parameters must be populated in order to send to Azure. - - :param error: Required. Document Error. - :type error: ~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError - """ - - _validation = { - 'error': {'required': True}, - } - - _attribute_map = { - 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, - } - - def __init__( - self, - *, - error: "TextAnalyticsError", - **kwargs - ): - super(ErrorResponse, self).__init__(**kwargs) - self.error = error - - -class ExtractedDocumentSummary(msrest.serialization.Model): - """ExtractedDocumentSummary. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param sentences: Required. A ranked list of sentences representing the extracted summary. - :type sentences: list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractedSummarySentence] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'sentences': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'sentences': {'key': 'sentences', 'type': '[ExtractedSummarySentence]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - *, - id: str, - sentences: List["ExtractedSummarySentence"], - warnings: List["TextAnalyticsWarning"], - statistics: Optional["DocumentStatistics"] = None, - **kwargs - ): - super(ExtractedDocumentSummary, self).__init__(**kwargs) - self.id = id - self.sentences = sentences - self.warnings = warnings - self.statistics = statistics - - -class ExtractedSummarySentence(msrest.serialization.Model): - """ExtractedSummarySentence. - - All required parameters must be populated in order to send to Azure. - - :param text: Required. The extracted sentence text. - :type text: str - :param rank_score: Required. A double value representing the relevance of the sentence within - the summary. Higher values indicate higher importance. - :type rank_score: float - :param offset: Required. The sentence offset from the start of the document, based on the value - of the parameter StringIndexType. - :type offset: int - :param length: Required. The length of the sentence. - :type length: int - """ - - _validation = { - 'text': {'required': True}, - 'rank_score': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'rank_score': {'key': 'rankScore', 'type': 'float'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - } - - def __init__( - self, - *, - text: str, - rank_score: float, - offset: int, - length: int, - **kwargs - ): - super(ExtractedSummarySentence, self).__init__(**kwargs) - self.text = text - self.rank_score = rank_score - self.offset = offset - self.length = length - - -class ExtractiveSummarizationResult(msrest.serialization.Model): - """ExtractiveSummarizationResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractedDocumentSummary] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[ExtractedDocumentSummary]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - documents: List["ExtractedDocumentSummary"], - errors: List["DocumentError"], - model_version: str, - statistics: Optional["RequestStatistics"] = None, - **kwargs - ): - super(ExtractiveSummarizationResult, self).__init__(**kwargs) - self.documents = documents - self.errors = errors - self.statistics = statistics - self.model_version = model_version - - -class ExtractiveSummarizationTask(msrest.serialization.Model): - """ExtractiveSummarizationTask. - - :param parameters: - :type parameters: - ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'ExtractiveSummarizationTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - *, - parameters: Optional["ExtractiveSummarizationTaskParameters"] = None, - task_name: Optional[str] = None, - **kwargs - ): - super(ExtractiveSummarizationTask, self).__init__(**kwargs) - self.parameters = parameters - self.task_name = task_name - - -class ExtractiveSummarizationTaskParameters(msrest.serialization.Model): - """ExtractiveSummarizationTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - :param sentence_count: - :type sentence_count: int - :param sort_by: Possible values include: "Offset", "Rank". Default value: "Offset". - :type sort_by: str or - ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTaskParametersSortBy - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - 'sentence_count': {'key': 'sentenceCount', 'type': 'int'}, - 'sort_by': {'key': 'sortBy', 'type': 'str'}, - } - - def __init__( - self, - *, - model_version: Optional[str] = "latest", - logging_opt_out: Optional[bool] = False, - string_index_type: Optional[Union[str, "StringIndexType"]] = None, - sentence_count: Optional[int] = 3, - sort_by: Optional[Union[str, "ExtractiveSummarizationTaskParametersSortBy"]] = "Offset", - **kwargs - ): - super(ExtractiveSummarizationTaskParameters, self).__init__(**kwargs) - self.model_version = model_version - self.logging_opt_out = logging_opt_out - self.string_index_type = string_index_type - self.sentence_count = sentence_count - self.sort_by = sort_by - - -class ExtractiveSummarizationTaskResult(msrest.serialization.Model): - """ExtractiveSummarizationTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'ExtractiveSummarizationResult'}, - } - - def __init__( - self, - *, - results: Optional["ExtractiveSummarizationResult"] = None, - **kwargs - ): - super(ExtractiveSummarizationTaskResult, self).__init__(**kwargs) - self.results = results - - -class HealthcareAssertion(msrest.serialization.Model): - """HealthcareAssertion. - - :param conditionality: Describes any conditionality on the entity. Possible values include: - "hypothetical", "conditional". - :type conditionality: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Conditionality - :param certainty: Describes the entities certainty and polarity. Possible values include: - "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". - :type certainty: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Certainty - :param association: Describes if the entity is the subject of the text or if it describes - someone else. Possible values include: "subject", "other". - :type association: str or ~azure.ai.textanalytics.v3_2_preview_1.models.Association - """ - - _attribute_map = { - 'conditionality': {'key': 'conditionality', 'type': 'str'}, - 'certainty': {'key': 'certainty', 'type': 'str'}, - 'association': {'key': 'association', 'type': 'str'}, - } - - def __init__( - self, - *, - conditionality: Optional[Union[str, "Conditionality"]] = None, - certainty: Optional[Union[str, "Certainty"]] = None, - association: Optional[Union[str, "Association"]] = None, - **kwargs - ): - super(HealthcareAssertion, self).__init__(**kwargs) - self.conditionality = conditionality - self.certainty = certainty - self.association = association - - -class HealthcareLinkingProperties(msrest.serialization.Model): - """HealthcareLinkingProperties. - - :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareAssertion - :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of - 'histologic'. - :type name: str - :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityLink] - """ - - _attribute_map = { - 'assertion': {'key': 'assertion', 'type': 'HealthcareAssertion'}, - 'name': {'key': 'name', 'type': 'str'}, - 'links': {'key': 'links', 'type': '[HealthcareEntityLink]'}, - } - - def __init__( - self, - *, - assertion: Optional["HealthcareAssertion"] = None, - name: Optional[str] = None, - links: Optional[List["HealthcareEntityLink"]] = None, - **kwargs - ): - super(HealthcareLinkingProperties, self).__init__(**kwargs) - self.assertion = assertion - self.name = name - self.links = links - - -class HealthcareEntityProperties(msrest.serialization.Model): - """HealthcareEntityProperties. - - All required parameters must be populated in order to send to Azure. - - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Healthcare Entity Category. Possible values include: - "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", - "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", - "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", - "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", - "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityCategory - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' - values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values - can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float - """ - - _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'subcategory': {'key': 'subcategory', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - } - - def __init__( - self, - *, - text: str, - category: Union[str, "HealthcareEntityCategory"], - offset: int, - length: int, - confidence_score: float, - subcategory: Optional[str] = None, - **kwargs - ): - super(HealthcareEntityProperties, self).__init__(**kwargs) - self.text = text - self.category = category - self.subcategory = subcategory - self.offset = offset - self.length = length - self.confidence_score = confidence_score - - -class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): - """HealthcareEntity. - - All required parameters must be populated in order to send to Azure. - - :param assertion: - :type assertion: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareAssertion - :param name: Preferred name for the entity. Example: 'histologically' would have a 'name' of - 'histologic'. - :type name: str - :param links: Entity references in known data sources. - :type links: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityLink] - :param text: Required. Entity text as appears in the request. - :type text: str - :param category: Required. Healthcare Entity Category. Possible values include: - "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", - "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", - "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", - "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", - "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". - :type category: str or ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareEntityCategory - :param subcategory: (Optional) Entity sub type. - :type subcategory: str - :param offset: Required. Start position for the entity text. Use of different 'stringIndexType' - values can affect the offset returned. - :type offset: int - :param length: Required. Length for the entity text. Use of different 'stringIndexType' values - can affect the length returned. - :type length: int - :param confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. - :type confidence_score: float - """ - - _validation = { - 'text': {'required': True}, - 'category': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'confidence_score': {'required': True}, - } - - _attribute_map = { - 'assertion': {'key': 'assertion', 'type': 'HealthcareAssertion'}, - 'name': {'key': 'name', 'type': 'str'}, - 'links': {'key': 'links', 'type': '[HealthcareEntityLink]'}, - 'text': {'key': 'text', 'type': 'str'}, - 'category': {'key': 'category', 'type': 'str'}, - 'subcategory': {'key': 'subcategory', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - } - - def __init__( - self, - *, - text: str, - category: Union[str, "HealthcareEntityCategory"], - offset: int, - length: int, - confidence_score: float, - assertion: Optional["HealthcareAssertion"] = None, - name: Optional[str] = None, - links: Optional[List["HealthcareEntityLink"]] = None, - subcategory: Optional[str] = None, - **kwargs - ): - super(HealthcareEntity, self).__init__(text=text, category=category, subcategory=subcategory, offset=offset, length=length, confidence_score=confidence_score, assertion=assertion, name=name, links=links, **kwargs) - self.assertion = assertion - self.name = name - self.links = links - self.text = text - self.category = category - self.subcategory = subcategory - self.offset = offset - self.length = length - self.confidence_score = confidence_score - - -class HealthcareEntityLink(msrest.serialization.Model): - """HealthcareEntityLink. - - All required parameters must be populated in order to send to Azure. - - :param data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. - :type data_source: str - :param id: Required. Entity id in the given source catalog. - :type id: str - """ - - _validation = { - 'data_source': {'required': True}, - 'id': {'required': True}, - } - - _attribute_map = { - 'data_source': {'key': 'dataSource', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - *, - data_source: str, - id: str, - **kwargs - ): - super(HealthcareEntityLink, self).__init__(**kwargs) - self.data_source = data_source - self.id = id - - -class HealthcareTaskResult(msrest.serialization.Model): - """HealthcareTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareResult - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'HealthcareResult'}, - 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, - } - - def __init__( - self, - *, - results: Optional["HealthcareResult"] = None, - errors: Optional[List["TextAnalyticsError"]] = None, - **kwargs - ): - super(HealthcareTaskResult, self).__init__(**kwargs) - self.results = results - self.errors = errors - - -class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): - """HealthcareJobState. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareResult - :param errors: - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - :param next_link: - :type next_link: str - :param created_date_time: Required. - :type created_date_time: ~datetime.datetime - :param expiration_date_time: - :type expiration_date_time: ~datetime.datetime - :param job_id: Required. - :type job_id: str - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'created_date_time': {'required': True}, - 'job_id': {'required': True}, - 'last_update_date_time': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'HealthcareResult'}, - 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, - 'next_link': {'key': '@nextLink', 'type': 'str'}, - 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, - 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, - 'job_id': {'key': 'jobId', 'type': 'str'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - created_date_time: datetime.datetime, - job_id: str, - last_update_date_time: datetime.datetime, - status: Union[str, "State"], - results: Optional["HealthcareResult"] = None, - errors: Optional[List["TextAnalyticsError"]] = None, - next_link: Optional[str] = None, - expiration_date_time: Optional[datetime.datetime] = None, - **kwargs - ): - super(HealthcareJobState, self).__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, next_link=next_link, results=results, errors=errors, **kwargs) - self.results = results - self.errors = errors - self.next_link = next_link - self.results = results - self.errors = errors - self.created_date_time = created_date_time - self.expiration_date_time = expiration_date_time - self.job_id = job_id - self.last_update_date_time = last_update_date_time - self.status = status - self.next_link = next_link - self.created_date_time = created_date_time - self.expiration_date_time = expiration_date_time - self.job_id = job_id - self.last_update_date_time = last_update_date_time - self.status = status - - -class HealthcareRelation(msrest.serialization.Model): - """Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context. - - All required parameters must be populated in order to send to Azure. - - :param relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or - 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", - "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", - "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", - "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", - "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", - "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". - :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.RelationType - :param entities: Required. The entities in the relation. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareRelationEntity] - """ - - _validation = { - 'relation_type': {'required': True}, - 'entities': {'required': True}, - } - - _attribute_map = { - 'relation_type': {'key': 'relationType', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[HealthcareRelationEntity]'}, - } - - def __init__( - self, - *, - relation_type: Union[str, "RelationType"], - entities: List["HealthcareRelationEntity"], - **kwargs - ): - super(HealthcareRelation, self).__init__(**kwargs) - self.relation_type = relation_type - self.entities = entities - - -class HealthcareRelationEntity(msrest.serialization.Model): - """HealthcareRelationEntity. - - All required parameters must be populated in order to send to Azure. - - :param ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment - Identifier Representation), pointing to the entity . - :type ref: str - :param role: Required. Role of entity in the relationship. For example: 'CD20-positive diffuse - large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 - (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). - :type role: str - """ - - _validation = { - 'ref': {'required': True}, - 'role': {'required': True}, - } - - _attribute_map = { - 'ref': {'key': 'ref', 'type': 'str'}, - 'role': {'key': 'role', 'type': 'str'}, - } - - def __init__( - self, - *, - ref: str, - role: str, - **kwargs - ): - super(HealthcareRelationEntity, self).__init__(**kwargs) - self.ref = ref - self.role = role - - -class HealthcareResult(msrest.serialization.Model): - """HealthcareResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentHealthcareEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentHealthcareEntities]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - documents: List["DocumentHealthcareEntities"], - errors: List["DocumentError"], - model_version: str, - statistics: Optional["RequestStatistics"] = None, - **kwargs - ): - super(HealthcareResult, self).__init__(**kwargs) - self.documents = documents - self.errors = errors - self.statistics = statistics - self.model_version = model_version - - -class InnerError(msrest.serialization.Model): - """InnerError. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. Possible values include: "InvalidParameterValue", - "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", - "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", - "InvalidCountryHint". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.InnerErrorCodeValue - :param message: Required. Error message. - :type message: str - :param details: Error details. - :type details: dict[str, str] - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_2_preview_1.models.InnerError - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'details': {'key': 'details', 'type': '{str}'}, - 'target': {'key': 'target', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - } - - def __init__( - self, - *, - code: Union[str, "InnerErrorCodeValue"], - message: str, - details: Optional[Dict[str, str]] = None, - target: Optional[str] = None, - innererror: Optional["InnerError"] = None, - **kwargs - ): - super(InnerError, self).__init__(**kwargs) - self.code = code - self.message = message - self.details = details - self.target = target - self.innererror = innererror - - -class JobManifestTasks(msrest.serialization.Model): - """The set of tasks to execute on the input documents. Cannot specify the same task more than once. - - :param entity_recognition_tasks: - :type entity_recognition_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesTask] - :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: list[~azure.ai.textanalytics.v3_2_preview_1.models.PiiTask] - :param key_phrase_extraction_tasks: - :type key_phrase_extraction_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhrasesTask] - :param entity_linking_tasks: - :type entity_linking_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingTask] - :param sentiment_analysis_tasks: - :type sentiment_analysis_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.SentimentAnalysisTask] - :param extractive_summarization_tasks: - :type extractive_summarization_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationTask] - """ - - _attribute_map = { - 'entity_recognition_tasks': {'key': 'entityRecognitionTasks', 'type': '[EntitiesTask]'}, - 'entity_recognition_pii_tasks': {'key': 'entityRecognitionPiiTasks', 'type': '[PiiTask]'}, - 'key_phrase_extraction_tasks': {'key': 'keyPhraseExtractionTasks', 'type': '[KeyPhrasesTask]'}, - 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[EntityLinkingTask]'}, - 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[SentimentAnalysisTask]'}, - 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[ExtractiveSummarizationTask]'}, - } - - def __init__( - self, - *, - entity_recognition_tasks: Optional[List["EntitiesTask"]] = None, - entity_recognition_pii_tasks: Optional[List["PiiTask"]] = None, - key_phrase_extraction_tasks: Optional[List["KeyPhrasesTask"]] = None, - entity_linking_tasks: Optional[List["EntityLinkingTask"]] = None, - sentiment_analysis_tasks: Optional[List["SentimentAnalysisTask"]] = None, - extractive_summarization_tasks: Optional[List["ExtractiveSummarizationTask"]] = None, - **kwargs - ): - super(JobManifestTasks, self).__init__(**kwargs) - self.entity_recognition_tasks = entity_recognition_tasks - self.entity_recognition_pii_tasks = entity_recognition_pii_tasks - self.key_phrase_extraction_tasks = key_phrase_extraction_tasks - self.entity_linking_tasks = entity_linking_tasks - self.sentiment_analysis_tasks = sentiment_analysis_tasks - self.extractive_summarization_tasks = extractive_summarization_tasks - - -class KeyPhraseResult(msrest.serialization.Model): - """KeyPhraseResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentKeyPhrases] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentKeyPhrases]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - documents: List["DocumentKeyPhrases"], - errors: List["DocumentError"], - model_version: str, - statistics: Optional["RequestStatistics"] = None, - **kwargs - ): - super(KeyPhraseResult, self).__init__(**kwargs) - self.documents = documents - self.errors = errors - self.statistics = statistics - self.model_version = model_version - - -class KeyPhrasesTask(msrest.serialization.Model): - """KeyPhrasesTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhrasesTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'KeyPhrasesTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - *, - parameters: Optional["KeyPhrasesTaskParameters"] = None, - task_name: Optional[str] = None, - **kwargs - ): - super(KeyPhrasesTask, self).__init__(**kwargs) - self.parameters = parameters - self.task_name = task_name - - -class KeyPhrasesTaskParameters(msrest.serialization.Model): - """KeyPhrasesTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - } - - def __init__( - self, - *, - model_version: Optional[str] = "latest", - logging_opt_out: Optional[bool] = False, - **kwargs - ): - super(KeyPhrasesTaskParameters, self).__init__(**kwargs) - self.model_version = model_version - self.logging_opt_out = logging_opt_out - - -class KeyPhraseTaskResult(msrest.serialization.Model): - """KeyPhraseTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'KeyPhraseResult'}, - } - - def __init__( - self, - *, - results: Optional["KeyPhraseResult"] = None, - **kwargs - ): - super(KeyPhraseTaskResult, self).__init__(**kwargs) - self.results = results - - -class LanguageBatchInput(msrest.serialization.Model): - """LanguageBatchInput. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] - """ - - _validation = { - 'documents': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[LanguageInput]'}, - } - - def __init__( - self, - *, - documents: List["LanguageInput"], - **kwargs - ): - super(LanguageBatchInput, self).__init__(**kwargs) - self.documents = documents - - -class LanguageInput(msrest.serialization.Model): - """LanguageInput. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param text: Required. - :type text: str - :param country_hint: - :type country_hint: str - """ - - _validation = { - 'id': {'required': True}, - 'text': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'country_hint': {'key': 'countryHint', 'type': 'str'}, - } - - def __init__( - self, - *, - id: str, - text: str, - country_hint: Optional[str] = None, - **kwargs - ): - super(LanguageInput, self).__init__(**kwargs) - self.id = id - self.text = text - self.country_hint = country_hint - - -class LanguageResult(msrest.serialization.Model): - """LanguageResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentLanguage] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentLanguage]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - documents: List["DocumentLanguage"], - errors: List["DocumentError"], - model_version: str, - statistics: Optional["RequestStatistics"] = None, - **kwargs - ): - super(LanguageResult, self).__init__(**kwargs) - self.documents = documents - self.errors = errors - self.statistics = statistics - self.model_version = model_version - - -class LinkedEntity(msrest.serialization.Model): - """LinkedEntity. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Entity Linking formal name. - :type name: str - :param matches: Required. List of instances this entity appears in the text. - :type matches: list[~azure.ai.textanalytics.v3_2_preview_1.models.Match] - :param language: Required. Language used in the data source. - :type language: str - :param id: Unique identifier of the recognized entity from the data source. - :type id: str - :param url: Required. URL for the entity's page from the data source. - :type url: str - :param data_source: Required. Data source used to extract entity linking, such as Wiki/Bing - etc. - :type data_source: str - :param bing_id: Bing Entity Search API unique identifier of the recognized entity. - :type bing_id: str - """ - - _validation = { - 'name': {'required': True}, - 'matches': {'required': True}, - 'language': {'required': True}, - 'url': {'required': True}, - 'data_source': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'matches': {'key': 'matches', 'type': '[Match]'}, - 'language': {'key': 'language', 'type': 'str'}, - 'id': {'key': 'id', 'type': 'str'}, - 'url': {'key': 'url', 'type': 'str'}, - 'data_source': {'key': 'dataSource', 'type': 'str'}, - 'bing_id': {'key': 'bingId', 'type': 'str'}, - } - - def __init__( - self, - *, - name: str, - matches: List["Match"], - language: str, - url: str, - data_source: str, - id: Optional[str] = None, - bing_id: Optional[str] = None, - **kwargs - ): - super(LinkedEntity, self).__init__(**kwargs) - self.name = name - self.matches = matches - self.language = language - self.id = id - self.url = url - self.data_source = data_source - self.bing_id = bing_id - - -class Match(msrest.serialization.Model): - """Match. - - All required parameters must be populated in order to send to Azure. - - :param confidence_score: Required. If a well known item is recognized, a decimal number - denoting the confidence level between 0 and 1 will be returned. - :type confidence_score: float - :param text: Required. Entity text as appears in the request. - :type text: str - :param offset: Required. Start position for the entity match text. - :type offset: int - :param length: Required. Length for the entity match text. - :type length: int - """ - - _validation = { - 'confidence_score': {'required': True}, - 'text': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - } - - _attribute_map = { - 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, - 'text': {'key': 'text', 'type': 'str'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - } - - def __init__( - self, - *, - confidence_score: float, - text: str, - offset: int, - length: int, - **kwargs - ): - super(Match, self).__init__(**kwargs) - self.confidence_score = confidence_score - self.text = text - self.offset = offset - self.length = length - - -class MultiLanguageBatchInput(msrest.serialization.Model): - """Contains a set of input documents to be analyzed by the service. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] - """ - - _validation = { - 'documents': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[MultiLanguageInput]'}, - } - - def __init__( - self, - *, - documents: List["MultiLanguageInput"], - **kwargs - ): - super(MultiLanguageBatchInput, self).__init__(**kwargs) - self.documents = documents - - -class MultiLanguageInput(msrest.serialization.Model): - """Contains an input document to be analyzed by the service. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. A unique, non-empty document identifier. - :type id: str - :param text: Required. The input text to process. - :type text: str - :param language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For - example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as - default. - :type language: str - """ - - _validation = { - 'id': {'required': True}, - 'text': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'text': {'key': 'text', 'type': 'str'}, - 'language': {'key': 'language', 'type': 'str'}, - } - - def __init__( - self, - *, - id: str, - text: str, - language: Optional[str] = None, - **kwargs - ): - super(MultiLanguageInput, self).__init__(**kwargs) - self.id = id - self.text = text - self.language = language - - -class PiiDocumentEntities(msrest.serialization.Model): - """PiiDocumentEntities. - - All required parameters must be populated in order to send to Azure. - - :param id: Required. Unique, non-empty document identifier. - :type id: str - :param redacted_text: Required. Returns redacted text. - :type redacted_text: str - :param entities: Required. Recognized entities in the document. - :type entities: list[~azure.ai.textanalytics.v3_2_preview_1.models.Entity] - :param warnings: Required. Warnings encountered while processing document. - :type warnings: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsWarning] - :param statistics: if showStats=true was specified in the request this field will contain - information about the document payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.DocumentStatistics - """ - - _validation = { - 'id': {'required': True}, - 'redacted_text': {'required': True}, - 'entities': {'required': True}, - 'warnings': {'required': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'redacted_text': {'key': 'redactedText', 'type': 'str'}, - 'entities': {'key': 'entities', 'type': '[Entity]'}, - 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, - 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, - } - - def __init__( - self, - *, - id: str, - redacted_text: str, - entities: List["Entity"], - warnings: List["TextAnalyticsWarning"], - statistics: Optional["DocumentStatistics"] = None, - **kwargs - ): - super(PiiDocumentEntities, self).__init__(**kwargs) - self.id = id - self.redacted_text = redacted_text - self.entities = entities - self.warnings = warnings - self.statistics = statistics - - -class PiiResult(msrest.serialization.Model): - """PiiResult. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Response by document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.PiiDocumentEntities] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[PiiDocumentEntities]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - documents: List["PiiDocumentEntities"], - errors: List["DocumentError"], - model_version: str, - statistics: Optional["RequestStatistics"] = None, - **kwargs - ): - super(PiiResult, self).__init__(**kwargs) - self.documents = documents - self.errors = errors - self.statistics = statistics - self.model_version = model_version - - -class PiiTask(msrest.serialization.Model): - """PiiTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'PiiTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - *, - parameters: Optional["PiiTaskParameters"] = None, - task_name: Optional[str] = None, - **kwargs - ): - super(PiiTask, self).__init__(**kwargs) - self.parameters = parameters - self.task_name = task_name - - -class PiiTaskParameters(msrest.serialization.Model): - """PiiTaskParameters. - - :param domain: Possible values include: "phi", "none". Default value: "none". - :type domain: str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiTaskParametersDomain - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - """ - - _validation = { - 'pii_categories': {'unique': True}, - } - - _attribute_map = { - 'domain': {'key': 'domain', 'type': 'str'}, - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'pii_categories': {'key': 'piiCategories', 'type': '[str]'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - } - - def __init__( - self, - *, - domain: Optional[Union[str, "PiiTaskParametersDomain"]] = "none", - model_version: Optional[str] = "latest", - logging_opt_out: Optional[bool] = True, - pii_categories: Optional[List[Union[str, "PiiCategory"]]] = None, - string_index_type: Optional[Union[str, "StringIndexType"]] = None, - **kwargs - ): - super(PiiTaskParameters, self).__init__(**kwargs) - self.domain = domain - self.model_version = model_version - self.logging_opt_out = logging_opt_out - self.pii_categories = pii_categories - self.string_index_type = string_index_type - - -class PiiTaskResult(msrest.serialization.Model): - """PiiTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'PiiResult'}, - } - - def __init__( - self, - *, - results: Optional["PiiResult"] = None, - **kwargs - ): - super(PiiTaskResult, self).__init__(**kwargs) - self.results = results - - -class RequestStatistics(msrest.serialization.Model): - """if showStats=true was specified in the request this field will contain information about the request payload. - - All required parameters must be populated in order to send to Azure. - - :param documents_count: Required. Number of documents submitted in the request. - :type documents_count: int - :param valid_documents_count: Required. Number of valid documents. This excludes empty, - over-size limit or non-supported languages documents. - :type valid_documents_count: int - :param erroneous_documents_count: Required. Number of invalid documents. This includes empty, - over-size limit or non-supported languages documents. - :type erroneous_documents_count: int - :param transactions_count: Required. Number of transactions for the request. - :type transactions_count: long - """ - - _validation = { - 'documents_count': {'required': True}, - 'valid_documents_count': {'required': True}, - 'erroneous_documents_count': {'required': True}, - 'transactions_count': {'required': True}, - } - - _attribute_map = { - 'documents_count': {'key': 'documentsCount', 'type': 'int'}, - 'valid_documents_count': {'key': 'validDocumentsCount', 'type': 'int'}, - 'erroneous_documents_count': {'key': 'erroneousDocumentsCount', 'type': 'int'}, - 'transactions_count': {'key': 'transactionsCount', 'type': 'long'}, - } - - def __init__( - self, - *, - documents_count: int, - valid_documents_count: int, - erroneous_documents_count: int, - transactions_count: int, - **kwargs - ): - super(RequestStatistics, self).__init__(**kwargs) - self.documents_count = documents_count - self.valid_documents_count = valid_documents_count - self.erroneous_documents_count = erroneous_documents_count - self.transactions_count = transactions_count - - -class SentenceAssessment(msrest.serialization.Model): - """SentenceAssessment. - - All required parameters must be populated in order to send to Azure. - - :param sentiment: Required. Assessment sentiment in the sentence. Possible values include: - "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TokenSentimentValue - :param confidence_scores: Required. Assessment sentiment confidence scores in the sentence. - :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.TargetConfidenceScoreLabel - :param offset: Required. The assessment offset from the start of the sentence. - :type offset: int - :param length: Required. The length of the assessment. - :type length: int - :param text: Required. The assessment text detected. - :type text: str - :param is_negated: Required. The indicator representing if the assessment is negated. - :type is_negated: bool - """ - - _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'is_negated': {'required': True}, - } - - _attribute_map = { - 'sentiment': {'key': 'sentiment', 'type': 'str'}, - 'confidence_scores': {'key': 'confidenceScores', 'type': 'TargetConfidenceScoreLabel'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'text': {'key': 'text', 'type': 'str'}, - 'is_negated': {'key': 'isNegated', 'type': 'bool'}, - } - - def __init__( - self, - *, - sentiment: Union[str, "TokenSentimentValue"], - confidence_scores: "TargetConfidenceScoreLabel", - offset: int, - length: int, - text: str, - is_negated: bool, - **kwargs - ): - super(SentenceAssessment, self).__init__(**kwargs) - self.sentiment = sentiment - self.confidence_scores = confidence_scores - self.offset = offset - self.length = length - self.text = text - self.is_negated = is_negated - - -class SentenceSentiment(msrest.serialization.Model): - """SentenceSentiment. - - All required parameters must be populated in order to send to Azure. - - :param text: Required. The sentence text. - :type text: str - :param sentiment: Required. The predicted Sentiment for the sentence. Possible values include: - "positive", "neutral", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.SentenceSentimentValue - :param confidence_scores: Required. The sentiment confidence score between 0 and 1 for the - sentence for all classes. - :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentConfidenceScorePerLabel - :param offset: Required. The sentence offset from the start of the document. - :type offset: int - :param length: Required. The length of the sentence. - :type length: int - :param targets: The array of sentence targets for the sentence. - :type targets: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceTarget] - :param assessments: The array of assessments for the sentence. - :type assessments: list[~azure.ai.textanalytics.v3_2_preview_1.models.SentenceAssessment] - """ - - _validation = { - 'text': {'required': True}, - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - } - - _attribute_map = { - 'text': {'key': 'text', 'type': 'str'}, - 'sentiment': {'key': 'sentiment', 'type': 'str'}, - 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'targets': {'key': 'targets', 'type': '[SentenceTarget]'}, - 'assessments': {'key': 'assessments', 'type': '[SentenceAssessment]'}, - } - - def __init__( - self, - *, - text: str, - sentiment: Union[str, "SentenceSentimentValue"], - confidence_scores: "SentimentConfidenceScorePerLabel", - offset: int, - length: int, - targets: Optional[List["SentenceTarget"]] = None, - assessments: Optional[List["SentenceAssessment"]] = None, - **kwargs - ): - super(SentenceSentiment, self).__init__(**kwargs) - self.text = text - self.sentiment = sentiment - self.confidence_scores = confidence_scores - self.offset = offset - self.length = length - self.targets = targets - self.assessments = assessments - - -class SentenceTarget(msrest.serialization.Model): - """SentenceTarget. - - All required parameters must be populated in order to send to Azure. - - :param sentiment: Required. Targeted sentiment in the sentence. Possible values include: - "positive", "mixed", "negative". - :type sentiment: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TokenSentimentValue - :param confidence_scores: Required. Target sentiment confidence scores for the target in the - sentence. - :type confidence_scores: - ~azure.ai.textanalytics.v3_2_preview_1.models.TargetConfidenceScoreLabel - :param offset: Required. The target offset from the start of the sentence. - :type offset: int - :param length: Required. The length of the target. - :type length: int - :param text: Required. The target text detected. - :type text: str - :param relations: Required. The array of either assessment or target objects which is related - to the target. - :type relations: list[~azure.ai.textanalytics.v3_2_preview_1.models.TargetRelation] - """ - - _validation = { - 'sentiment': {'required': True}, - 'confidence_scores': {'required': True}, - 'offset': {'required': True}, - 'length': {'required': True}, - 'text': {'required': True}, - 'relations': {'required': True}, - } - - _attribute_map = { - 'sentiment': {'key': 'sentiment', 'type': 'str'}, - 'confidence_scores': {'key': 'confidenceScores', 'type': 'TargetConfidenceScoreLabel'}, - 'offset': {'key': 'offset', 'type': 'int'}, - 'length': {'key': 'length', 'type': 'int'}, - 'text': {'key': 'text', 'type': 'str'}, - 'relations': {'key': 'relations', 'type': '[TargetRelation]'}, - } - - def __init__( - self, - *, - sentiment: Union[str, "TokenSentimentValue"], - confidence_scores: "TargetConfidenceScoreLabel", - offset: int, - length: int, - text: str, - relations: List["TargetRelation"], - **kwargs - ): - super(SentenceTarget, self).__init__(**kwargs) - self.sentiment = sentiment - self.confidence_scores = confidence_scores - self.offset = offset - self.length = length - self.text = text - self.relations = relations - - -class SentimentAnalysisTask(msrest.serialization.Model): - """SentimentAnalysisTask. - - :param parameters: - :type parameters: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentAnalysisTaskParameters - :param task_name: - :type task_name: str - """ - - _attribute_map = { - 'parameters': {'key': 'parameters', 'type': 'SentimentAnalysisTaskParameters'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - } - - def __init__( - self, - *, - parameters: Optional["SentimentAnalysisTaskParameters"] = None, - task_name: Optional[str] = None, - **kwargs - ): - super(SentimentAnalysisTask, self).__init__(**kwargs) - self.parameters = parameters - self.task_name = task_name - - -class SentimentAnalysisTaskParameters(msrest.serialization.Model): - """SentimentAnalysisTaskParameters. - - :param model_version: - :type model_version: str - :param logging_opt_out: - :type logging_opt_out: bool - :param opinion_mining: - :type opinion_mining: bool - :param string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", - "Utf16CodeUnit". - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType - """ - - _attribute_map = { - 'model_version': {'key': 'model-version', 'type': 'str'}, - 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, - 'opinion_mining': {'key': 'opinionMining', 'type': 'bool'}, - 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, - } - - def __init__( - self, - *, - model_version: Optional[str] = "latest", - logging_opt_out: Optional[bool] = False, - opinion_mining: Optional[bool] = False, - string_index_type: Optional[Union[str, "StringIndexType"]] = None, - **kwargs - ): - super(SentimentAnalysisTaskParameters, self).__init__(**kwargs) - self.model_version = model_version - self.logging_opt_out = logging_opt_out - self.opinion_mining = opinion_mining - self.string_index_type = string_index_type - - -class SentimentConfidenceScorePerLabel(msrest.serialization.Model): - """Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. - - All required parameters must be populated in order to send to Azure. - - :param positive: Required. - :type positive: float - :param neutral: Required. - :type neutral: float - :param negative: Required. - :type negative: float - """ - - _validation = { - 'positive': {'required': True}, - 'neutral': {'required': True}, - 'negative': {'required': True}, - } - - _attribute_map = { - 'positive': {'key': 'positive', 'type': 'float'}, - 'neutral': {'key': 'neutral', 'type': 'float'}, - 'negative': {'key': 'negative', 'type': 'float'}, - } - - def __init__( - self, - *, - positive: float, - neutral: float, - negative: float, - **kwargs - ): - super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) - self.positive = positive - self.neutral = neutral - self.negative = negative - - -class SentimentResponse(msrest.serialization.Model): - """SentimentResponse. - - All required parameters must be populated in order to send to Azure. - - :param documents: Required. Sentiment analysis per document. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentSentiment] - :param errors: Required. Errors by document id. - :type errors: list[~azure.ai.textanalytics.v3_2_preview_1.models.DocumentError] - :param statistics: if showStats=true was specified in the request this field will contain - information about the request payload. - :type statistics: ~azure.ai.textanalytics.v3_2_preview_1.models.RequestStatistics - :param model_version: Required. This field indicates which model is used for scoring. - :type model_version: str - """ - - _validation = { - 'documents': {'required': True}, - 'errors': {'required': True}, - 'model_version': {'required': True}, - } - - _attribute_map = { - 'documents': {'key': 'documents', 'type': '[DocumentSentiment]'}, - 'errors': {'key': 'errors', 'type': '[DocumentError]'}, - 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, - 'model_version': {'key': 'modelVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - documents: List["DocumentSentiment"], - errors: List["DocumentError"], - model_version: str, - statistics: Optional["RequestStatistics"] = None, - **kwargs - ): - super(SentimentResponse, self).__init__(**kwargs) - self.documents = documents - self.errors = errors - self.statistics = statistics - self.model_version = model_version - - -class SentimentTaskResult(msrest.serialization.Model): - """SentimentTaskResult. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse - """ - - _attribute_map = { - 'results': {'key': 'results', 'type': 'SentimentResponse'}, - } - - def __init__( - self, - *, - results: Optional["SentimentResponse"] = None, - **kwargs - ): - super(SentimentTaskResult, self).__init__(**kwargs) - self.results = results - - -class TargetConfidenceScoreLabel(msrest.serialization.Model): - """Represents the confidence scores across all sentiment classes: positive, neutral, negative. - - All required parameters must be populated in order to send to Azure. - - :param positive: Required. - :type positive: float - :param negative: Required. - :type negative: float - """ - - _validation = { - 'positive': {'required': True}, - 'negative': {'required': True}, - } - - _attribute_map = { - 'positive': {'key': 'positive', 'type': 'float'}, - 'negative': {'key': 'negative', 'type': 'float'}, - } - - def __init__( - self, - *, - positive: float, - negative: float, - **kwargs - ): - super(TargetConfidenceScoreLabel, self).__init__(**kwargs) - self.positive = positive - self.negative = negative - - -class TargetRelation(msrest.serialization.Model): - """TargetRelation. - - All required parameters must be populated in order to send to Azure. - - :param relation_type: Required. The type related to the target. Possible values include: - "assessment", "target". - :type relation_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.TargetRelationType - :param ref: Required. The JSON pointer indicating the linked object. - :type ref: str - """ - - _validation = { - 'relation_type': {'required': True}, - 'ref': {'required': True}, - } - - _attribute_map = { - 'relation_type': {'key': 'relationType', 'type': 'str'}, - 'ref': {'key': 'ref', 'type': 'str'}, - } - - def __init__( - self, - *, - relation_type: Union[str, "TargetRelationType"], - ref: str, - **kwargs - ): - super(TargetRelation, self).__init__(**kwargs) - self.relation_type = relation_type - self.ref = ref - - -class TasksStateTasks(msrest.serialization.Model): - """TasksStateTasks. - - All required parameters must be populated in order to send to Azure. - - :param completed: Required. - :type completed: int - :param failed: Required. - :type failed: int - :param in_progress: Required. - :type in_progress: int - :param total: Required. - :type total: int - :param entity_recognition_tasks: - :type entity_recognition_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityRecognitionTasksItem] - :param entity_recognition_pii_tasks: - :type entity_recognition_pii_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityRecognitionPiiTasksItem] - :param key_phrase_extraction_tasks: - :type key_phrase_extraction_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksKeyPhraseExtractionTasksItem] - :param entity_linking_tasks: - :type entity_linking_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksEntityLinkingTasksItem] - :param sentiment_analysis_tasks: - :type sentiment_analysis_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksSentimentAnalysisTasksItem] - :param extractive_summarization_tasks: - :type extractive_summarization_tasks: - list[~azure.ai.textanalytics.v3_2_preview_1.models.TasksStateTasksExtractiveSummarizationTasksItem] - """ - - _validation = { - 'completed': {'required': True}, - 'failed': {'required': True}, - 'in_progress': {'required': True}, - 'total': {'required': True}, - } - - _attribute_map = { - 'completed': {'key': 'completed', 'type': 'int'}, - 'failed': {'key': 'failed', 'type': 'int'}, - 'in_progress': {'key': 'inProgress', 'type': 'int'}, - 'total': {'key': 'total', 'type': 'int'}, - 'entity_recognition_tasks': {'key': 'entityRecognitionTasks', 'type': '[TasksStateTasksEntityRecognitionTasksItem]'}, - 'entity_recognition_pii_tasks': {'key': 'entityRecognitionPiiTasks', 'type': '[TasksStateTasksEntityRecognitionPiiTasksItem]'}, - 'key_phrase_extraction_tasks': {'key': 'keyPhraseExtractionTasks', 'type': '[TasksStateTasksKeyPhraseExtractionTasksItem]'}, - 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[TasksStateTasksEntityLinkingTasksItem]'}, - 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[TasksStateTasksSentimentAnalysisTasksItem]'}, - 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[TasksStateTasksExtractiveSummarizationTasksItem]'}, - } - - def __init__( - self, - *, - completed: int, - failed: int, - in_progress: int, - total: int, - entity_recognition_tasks: Optional[List["TasksStateTasksEntityRecognitionTasksItem"]] = None, - entity_recognition_pii_tasks: Optional[List["TasksStateTasksEntityRecognitionPiiTasksItem"]] = None, - key_phrase_extraction_tasks: Optional[List["TasksStateTasksKeyPhraseExtractionTasksItem"]] = None, - entity_linking_tasks: Optional[List["TasksStateTasksEntityLinkingTasksItem"]] = None, - sentiment_analysis_tasks: Optional[List["TasksStateTasksSentimentAnalysisTasksItem"]] = None, - extractive_summarization_tasks: Optional[List["TasksStateTasksExtractiveSummarizationTasksItem"]] = None, - **kwargs - ): - super(TasksStateTasks, self).__init__(**kwargs) - self.completed = completed - self.failed = failed - self.in_progress = in_progress - self.total = total - self.entity_recognition_tasks = entity_recognition_tasks - self.entity_recognition_pii_tasks = entity_recognition_pii_tasks - self.key_phrase_extraction_tasks = key_phrase_extraction_tasks - self.entity_linking_tasks = entity_linking_tasks - self.sentiment_analysis_tasks = sentiment_analysis_tasks - self.extractive_summarization_tasks = extractive_summarization_tasks - - -class TaskState(msrest.serialization.Model): - """TaskState. - - All required parameters must be populated in order to send to Azure. - - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - last_update_date_time: datetime.datetime, - task_name: str, - status: Union[str, "State"], - **kwargs - ): - super(TaskState, self).__init__(**kwargs) - self.last_update_date_time = last_update_date_time - self.task_name = task_name - self.status = status - - -class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult): - """TasksStateTasksEntityLinkingTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'EntityLinkingResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - last_update_date_time: datetime.datetime, - task_name: str, - status: Union[str, "State"], - results: Optional["EntityLinkingResult"] = None, - **kwargs - ): - super(TasksStateTasksEntityLinkingTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) - self.results = results - self.last_update_date_time = last_update_date_time - self.task_name = task_name - self.status = status - - -class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult): - """TasksStateTasksEntityRecognitionPiiTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'PiiResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - last_update_date_time: datetime.datetime, - task_name: str, - status: Union[str, "State"], - results: Optional["PiiResult"] = None, - **kwargs - ): - super(TasksStateTasksEntityRecognitionPiiTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) - self.results = results - self.last_update_date_time = last_update_date_time - self.task_name = task_name - self.status = status - - -class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult): - """TasksStateTasksEntityRecognitionTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'EntitiesResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - last_update_date_time: datetime.datetime, - task_name: str, - status: Union[str, "State"], - results: Optional["EntitiesResult"] = None, - **kwargs - ): - super(TasksStateTasksEntityRecognitionTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) - self.results = results - self.last_update_date_time = last_update_date_time - self.task_name = task_name - self.status = status - - -class TasksStateTasksExtractiveSummarizationTasksItem(TaskState, ExtractiveSummarizationTaskResult): - """TasksStateTasksExtractiveSummarizationTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.ExtractiveSummarizationResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'ExtractiveSummarizationResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - last_update_date_time: datetime.datetime, - task_name: str, - status: Union[str, "State"], - results: Optional["ExtractiveSummarizationResult"] = None, - **kwargs - ): - super(TasksStateTasksExtractiveSummarizationTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) - self.results = results - self.last_update_date_time = last_update_date_time - self.task_name = task_name - self.status = status - - -class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult): - """TasksStateTasksKeyPhraseExtractionTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'KeyPhraseResult'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - last_update_date_time: datetime.datetime, - task_name: str, - status: Union[str, "State"], - results: Optional["KeyPhraseResult"] = None, - **kwargs - ): - super(TasksStateTasksKeyPhraseExtractionTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) - self.results = results - self.last_update_date_time = last_update_date_time - self.task_name = task_name - self.status = status - - -class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult): - """TasksStateTasksSentimentAnalysisTasksItem. - - All required parameters must be populated in order to send to Azure. - - :param results: - :type results: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse - :param last_update_date_time: Required. - :type last_update_date_time: ~datetime.datetime - :param task_name: Required. - :type task_name: str - :param status: Required. Possible values include: "notStarted", "running", "succeeded", - "failed", "rejected", "cancelled", "cancelling". - :type status: str or ~azure.ai.textanalytics.v3_2_preview_1.models.State - """ - - _validation = { - 'last_update_date_time': {'required': True}, - 'task_name': {'required': True}, - 'status': {'required': True}, - } - - _attribute_map = { - 'results': {'key': 'results', 'type': 'SentimentResponse'}, - 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, - 'task_name': {'key': 'taskName', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - } - - def __init__( - self, - *, - last_update_date_time: datetime.datetime, - task_name: str, - status: Union[str, "State"], - results: Optional["SentimentResponse"] = None, - **kwargs - ): - super(TasksStateTasksSentimentAnalysisTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) - self.results = results - self.last_update_date_time = last_update_date_time - self.task_name = task_name - self.status = status - - -class TextAnalyticsError(msrest.serialization.Model): - """TextAnalyticsError. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. Possible values include: "InvalidRequest", - "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.ErrorCodeValue - :param message: Required. Error message. - :type message: str - :param target: Error target. - :type target: str - :param innererror: Inner error contains more specific information. - :type innererror: ~azure.ai.textanalytics.v3_2_preview_1.models.InnerError - :param details: Details about specific errors that led to this reported error. - :type details: list[~azure.ai.textanalytics.v3_2_preview_1.models.TextAnalyticsError] - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'innererror': {'key': 'innererror', 'type': 'InnerError'}, - 'details': {'key': 'details', 'type': '[TextAnalyticsError]'}, - } - - def __init__( - self, - *, - code: Union[str, "ErrorCodeValue"], - message: str, - target: Optional[str] = None, - innererror: Optional["InnerError"] = None, - details: Optional[List["TextAnalyticsError"]] = None, - **kwargs - ): - super(TextAnalyticsError, self).__init__(**kwargs) - self.code = code - self.message = message - self.target = target - self.innererror = innererror - self.details = details - - -class TextAnalyticsWarning(msrest.serialization.Model): - """TextAnalyticsWarning. - - All required parameters must be populated in order to send to Azure. - - :param code: Required. Error code. Possible values include: "LongWordsInDocument", - "DocumentTruncated". - :type code: str or ~azure.ai.textanalytics.v3_2_preview_1.models.WarningCodeValue - :param message: Required. Warning message. - :type message: str - :param target_ref: A JSON pointer reference indicating the target object. - :type target_ref: str - """ - - _validation = { - 'code': {'required': True}, - 'message': {'required': True}, - } - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target_ref': {'key': 'targetRef', 'type': 'str'}, - } - - def __init__( - self, - *, - code: Union[str, "WarningCodeValue"], - message: str, - target_ref: Optional[str] = None, - **kwargs - ): - super(TextAnalyticsWarning, self).__init__(**kwargs) - self.code = code - self.message = message - self.target_ref = target_ref diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/__init__.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/__init__.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_configuration.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_configuration.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_configuration.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_metadata.json b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_metadata.json similarity index 77% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_metadata.json rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_metadata.json index 2de55395aa4e..b7d22520fe4b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_metadata.json +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_metadata.json @@ -1,17 +1,17 @@ { - "chosen_version": "v3.2-preview.1", - "total_api_version_list": ["v3.2-preview.1"], + "chosen_version": "v3.2-preview.2", + "total_api_version_list": ["v3.2-preview.2"], "client": { "name": "TextAnalyticsClient", "filename": "_text_analytics_client", "description": "The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in :code:`\u003ca href=\"https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\"\u003ehttps://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview\u003c/a\u003e`.", - "base_url": null, - "custom_base_url": "\u0027{Endpoint}/text/analytics/v3.2-preview.1\u0027", + "host_value": null, + "parameterized_host_template": "\u0027{Endpoint}/text/analytics/v3.2-preview.2\u0027", "azure_arm": false, "has_lro_operations": true, "client_side_validation": false, - "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"PipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", - "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"AsyncPipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"PipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"], \"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"AsyncPipelineClient\"]}, \"local\": {\"._configuration\": [\"TextAnalyticsClientConfiguration\"], \"._operations_mixin\": [\"TextAnalyticsClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}" }, "global_parameters": { "sync": { @@ -79,183 +79,182 @@ "config": { "credential": true, "credential_scopes": ["https://cognitiveservices.azure.com/.default"], - "credential_default_policy_type": "BearerTokenCredentialPolicy", - "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null, + "credential_call_sync": "policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)", + "credential_call_async": "policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs)", "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { }, "operation_mixins": { - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"...._lro\": [\"AnalyzeActionsLROPoller\", \"AnalyzeActionsLROPollingMethod\", \"AnalyzeHealthcareEntitiesLROPoller\", \"AnalyzeHealthcareEntitiesLROPollingMethod\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.core.polling.base_polling\": [\"LROBasePolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \".....aio._lro_async\": [\"AsyncAnalyzeActionsLROPoller\", \"AsyncAnalyzeActionsLROPollingMethod\", \"AsyncAnalyzeHealthcareEntitiesLROPoller\", \"AsyncAnalyzeHealthcareEntitiesLROPollingMethod\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.core.polling.async_base_polling\": [\"AsyncLROBasePolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"List\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "sync_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"List\", \"Optional\", \"Union\"]}, \"azurecore\": {\"...._lro\": [\"AnalyzeActionsLROPoller\", \"AnalyzeHealthcareEntitiesLROPoller\"], \"azure.core.polling\": [\"LROPoller\"]}}}", + "async_imports": "{\"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"List\", \"Optional\", \"Union\"]}, \"azurecore\": {\".....aio._lro_async\": [\"AsyncAnalyzeActionsLROPoller\", \"AsyncAnalyzeHealthcareEntitiesLROPoller\"], \"azure.core.polling\": [\"AsyncLROPoller\"]}}}", "operations": { "_analyze_initial" : { "sync": { - "signature": "def _analyze_initial(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _analyze_initial(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.AnalyzeJobState\"]\n", + "doc": "\"\"\"Submit analysis job.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _analyze_initial(\n self,\n body: Optional[\"_models.AnalyzeBatchInput\"] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.AnalyzeJobState\"]:\n", - "doc": "\"\"\"\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Submit analysis job.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "body" }, "begin_analyze" : { "sync": { - "signature": "def begin_analyze(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response)\n:rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_analyze(\n self,\n body=None, # type: Optional[\"_models.AnalyzeBatchInput\"]\n **kwargs # type: Any\n):\n # type: (...) -\u003e AnalyzeActionsLROPoller[\"_models.AnalyzeJobState\"]\n", + "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. Pass\n in False for this operation to not poll, or pass in your own initialized polling object for a\n personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the\n result of cls(response)\n:rtype:\n ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_analyze(\n self,\n body: Optional[\"_models.AnalyzeBatchInput\"] = None,\n **kwargs: Any\n) -\u003e AsyncAnalyzeActionsLROPoller[\"_models.AnalyzeJobState\"]:\n", - "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response)\n:rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Submit analysis job.\n\nSubmit a collection of text documents for analysis. Specify one or more unique tasks to be\nexecuted.\n\n:param body: Collection of documents to analyze and tasks to execute.\n:type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object\n for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the\n result of cls(response)\n:rtype:\n ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "body" }, "analyze_status" : { "sync": { - "signature": "def analyze_status(\n self,\n job_id, # type: str\n show_stats=None, # type: Optional[bool]\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get analysis status and results.\n\nGet the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\ncompleted, the job will transition to the completed state and results will be available for\neach task.\n\n:param job_id: Job ID for Analyze.\n:type job_id: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def analyze_status(\n self,\n job_id, # type: str\n show_stats=None, # type: Optional[bool]\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.AnalyzeJobState\"\n", + "doc": "\"\"\"Get analysis status and results.\n\nGet the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\ncompleted, the job will transition to the completed state and results will be available for\neach task.\n\n:param job_id: Job ID for Analyze.\n:type job_id: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def analyze_status(\n self,\n job_id: str,\n show_stats: Optional[bool] = None,\n top: Optional[int] = 20,\n skip: Optional[int] = 0,\n **kwargs: Any\n) -\u003e \"_models.AnalyzeJobState\":\n", - "doc": "\"\"\"Get analysis status and results.\n\nGet the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\ncompleted, the job will transition to the completed state and results will be available for\neach task.\n\n:param job_id: Job ID for Analyze.\n:type job_id: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get analysis status and results.\n\nGet the status of an analysis job. A job may consist of one or more tasks. Once all tasks are\ncompleted, the job will transition to the completed state and results will be available for\neach task.\n\n:param job_id: Job ID for Analyze.\n:type job_id: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: AnalyzeJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "job_id, show_stats, top, skip" }, "health_status" : { "sync": { - "signature": "def health_status(\n self,\n job_id, # type: str\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Get healthcare analysis job status and results.\n\nGet details of the healthcare prediction job specified by the jobId.\n\n:param job_id: Job ID.\n:type job_id: str\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def health_status(\n self,\n job_id, # type: str\n top=20, # type: Optional[int]\n skip=0, # type: Optional[int]\n show_stats=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.HealthcareJobState\"\n", + "doc": "\"\"\"Get healthcare analysis job status and results.\n\nGet details of the healthcare prediction job specified by the jobId.\n\n:param job_id: Job ID.\n:type job_id: str\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def health_status(\n self,\n job_id: str,\n top: Optional[int] = 20,\n skip: Optional[int] = 0,\n show_stats: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.HealthcareJobState\":\n", - "doc": "\"\"\"Get healthcare analysis job status and results.\n\nGet details of the healthcare prediction job specified by the jobId.\n\n:param job_id: Job ID.\n:type job_id: str\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Get healthcare analysis job status and results.\n\nGet details of the healthcare prediction job specified by the jobId.\n\n:param job_id: Job ID.\n:type job_id: str\n:param top: (Optional) Set the maximum number of results per task. When both $top and $skip are\n specified, $skip is applied first.\n:type top: int\n:param skip: (Optional) Set the number of elements to offset in the response. When both $top\n and $skip are specified, $skip is applied first.\n:type skip: int\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "job_id, top, skip, show_stats" }, "_cancel_health_job_initial" : { "sync": { - "signature": "def _cancel_health_job_initial(\n self,\n job_id, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _cancel_health_job_initial(\n self,\n job_id, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e None\n", + "doc": "\"\"\"Cancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _cancel_health_job_initial(\n self,\n job_id: str,\n **kwargs: Any\n) -\u003e None:\n", - "doc": "\"\"\"\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Cancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: None, or the result of cls(response)\n:rtype: None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "job_id" }, "begin_cancel_health_job" : { "sync": { - "signature": "def begin_cancel_health_job(\n self,\n job_id, # type: str\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Cancel healthcare prediction job.\n\nCancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_cancel_health_job(\n self,\n job_id, # type: str\n **kwargs # type: Any\n):\n # type: (...) -\u003e LROPoller[None]\n", + "doc": "\"\"\"Cancel healthcare prediction job.\n\nCancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be LROBasePolling. Pass in False for\n this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of LROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_cancel_health_job(\n self,\n job_id: str,\n **kwargs: Any\n) -\u003e AsyncLROPoller[None]:\n", - "doc": "\"\"\"Cancel healthcare prediction job.\n\nCancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Cancel healthcare prediction job.\n\nCancel healthcare prediction job.\n\n:param job_id: Job ID.\n:type job_id: str\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False\n for this operation to not poll, or pass in your own initialized polling object for a personal\n polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either None or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[None]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "job_id" }, "_health_initial" : { "sync": { - "signature": "def _health_initial(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def _health_initial(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e Optional[\"_models.HealthcareJobState\"]\n", + "doc": "\"\"\"Submit healthcare analysis job.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def _health_initial(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e Optional[\"_models.HealthcareJobState\"]:\n", - "doc": "\"\"\"\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Submit healthcare analysis job.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: HealthcareJobState, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, string_index_type, logging_opt_out" }, "begin_health" : { "sync": { - "signature": "def begin_health(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AnalyzeHealthcareEntitiesLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response)\n:rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "signature": "def begin_health(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e AnalyzeHealthcareEntitiesLROPoller[\"_models.HealthcareJobState\"]\n", + "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be\n AnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll, or\n pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either\n HealthcareJobState or the result of cls(response)\n:rtype:\n ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def begin_health(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e AsyncAnalyzeHealthcareEntitiesLROPoller[\"_models.HealthcareJobState\"]:\n", - "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncAnalyzeHealthcareEntitiesLROPollingMethod.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response)\n:rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + "doc": "\"\"\"Submit healthcare analysis job.\n\nStart a healthcare analysis job to recognize healthcare related entities (drugs, conditions,\nsymptoms, etc) and their relations.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be\n AsyncAnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll,\n or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no\n Retry-After header is present.\n:return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either\n HealthcareJobState or the result of cls(response)\n:rtype:\n ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState]\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, string_index_type, logging_opt_out" }, "entities_recognition_general" : { "sync": { - "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def entities_recognition_general(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.EntitiesResult\"\n", + "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def entities_recognition_general(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n **kwargs: Any\n) -\u003e \"_models.EntitiesResult\":\n", - "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Named Entity Recognition.\n\nThe API returns a list of general named entities in a given document. For the list of supported\nentity types, check :code:`\u003ca href=\"https://aka.ms/taner\"\u003eSupported Entity Types in Text\nAnalytics API\u003c/a\u003e`. See the :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text\nAnalytics API\u003c/a\u003e` for the list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntitiesResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out, string_index_type" }, "entities_recognition_pii" : { "sync": { - "signature": "def entities_recognition_pii(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n domain=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n pii_categories=None, # type: Optional[List[Union[str, \"_models.PiiCategory\"]]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param domain: (Optional) if specified, will set the PII domain to include only a subset of the\n entity categories. Possible values include: \u0027PHI\u0027, \u0027none\u0027.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param pii_categories: (Optional) describes the PII categories to return.\n:type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory]\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def entities_recognition_pii(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n domain=None, # type: Optional[str]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n pii_categories=None, # type: Optional[List[Union[str, \"_models.PiiCategory\"]]]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.PiiResult\"\n", + "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param domain: (Optional) if specified, will set the PII domain to include only a subset of the\n entity categories. Possible values include: \u0027PHI\u0027, \u0027none\u0027.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param pii_categories: (Optional) describes the PII categories to return.\n:type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory]\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def entities_recognition_pii(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n domain: Optional[str] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n pii_categories: Optional[List[Union[str, \"_models.PiiCategory\"]]] = None,\n **kwargs: Any\n) -\u003e \"_models.PiiResult\":\n", - "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param domain: (Optional) if specified, will set the PII domain to include only a subset of the\n entity categories. Possible values include: \u0027PHI\u0027, \u0027none\u0027.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:param pii_categories: (Optional) describes the PII categories to return.\n:type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory]\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Entities containing personal information.\n\nThe API returns a list of entities with personal information (\\\"SSN\\\", \\\"Bank Account\\\" etc) in\nthe document. For the list of supported entity types, check :code:`\u003ca\nhref=\"https://aka.ms/tanerpii\"\u003eSupported Entity Types in Text Analytics API\u003c/a\u003e`. See the\n:code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the\nlist of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param domain: (Optional) if specified, will set the PII domain to include only a subset of the\n entity categories. Possible values include: \u0027PHI\u0027, \u0027none\u0027.\n:type domain: str\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:param pii_categories: (Optional) describes the PII categories to return.\n:type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory]\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: PiiResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out, domain, string_index_type, pii_categories" }, "entities_linking" : { "sync": { - "signature": "def entities_linking(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Linked entities from a well known knowledge base.\n\nThe API returns a list of recognized entities with links to a well known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def entities_linking(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.EntityLinkingResult\"\n", + "doc": "\"\"\"Linked entities from a well known knowledge base.\n\nThe API returns a list of recognized entities with links to a well known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def entities_linking(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n **kwargs: Any\n) -\u003e \"_models.EntityLinkingResult\":\n", - "doc": "\"\"\"Linked entities from a well known knowledge base.\n\nThe API returns a list of recognized entities with links to a well known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Linked entities from a well known knowledge base.\n\nThe API returns a list of recognized entities with links to a well known knowledge base. See\nthe :code:`\u003ca href=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for\nthe list of enabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: EntityLinkingResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out, string_index_type" }, "key_phrases" : { "sync": { - "signature": "def key_phrases(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def key_phrases(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.KeyPhraseResult\"\n", + "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def key_phrases(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.KeyPhraseResult\":\n", - "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Key Phrases.\n\nThe API returns a list of strings denoting the key phrases in the input text. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: KeyPhraseResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out" }, "languages" : { "sync": { - "signature": "def languages(\n self,\n documents, # type: List[\"_models.LanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def languages(\n self,\n documents, # type: List[\"_models.LanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.LanguageResult\"\n", + "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def languages(\n self,\n documents: List[\"_models.LanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n **kwargs: Any\n) -\u003e \"_models.LanguageResult\":\n", - "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Detect Language.\n\nThe API returns the detected language and a numeric score between 0 and 1. Scores close to 1\nindicate 100% certainty that the identified language is true. See the :code:`\u003ca\nhref=\"https://aka.ms/talangs\"\u003eSupported languages in Text Analytics API\u003c/a\u003e` for the list of\nenabled languages.\n\n:param documents:\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: LanguageResult, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out" }, "sentiment" : { "sync": { - "signature": "def sentiment(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n opinion_mining=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(targets and assessments).\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param opinion_mining: (Optional) if set to true, response will contain not only sentiment\n prediction but also opinion mining (aspect-based sentiment analysis) results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "signature": "def sentiment(\n self,\n documents, # type: List[\"_models.MultiLanguageInput\"]\n model_version=None, # type: Optional[str]\n show_stats=None, # type: Optional[bool]\n logging_opt_out=None, # type: Optional[bool]\n opinion_mining=None, # type: Optional[bool]\n string_index_type=None, # type: Optional[Union[str, \"_models.StringIndexType\"]]\n **kwargs # type: Any\n):\n # type: (...) -\u003e \"_models.SentimentResponse\"\n", + "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(targets and assessments).\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param opinion_mining: (Optional) if set to true, response will contain not only sentiment\n prediction but also opinion mining (aspect-based sentiment analysis) results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "async": { "coroutine": true, "signature": "async def sentiment(\n self,\n documents: List[\"_models.MultiLanguageInput\"],\n model_version: Optional[str] = None,\n show_stats: Optional[bool] = None,\n logging_opt_out: Optional[bool] = None,\n opinion_mining: Optional[bool] = None,\n string_index_type: Optional[Union[str, \"_models.StringIndexType\"]] = None,\n **kwargs: Any\n) -\u003e \"_models.SentimentResponse\":\n", - "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(targets and assessments).\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param opinion_mining: (Optional) if set to true, response will contain not only sentiment\n prediction but also opinion mining (aspect-based sentiment analysis) results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "doc": "\"\"\"Sentiment.\n\nThe API returns a detailed sentiment analysis for the input text. The analysis is done in\nmultiple levels of granularity, start from the a document level, down to sentence and key terms\n(targets and assessments).\n\n:param documents: The set of documents to process as part of this batch.\n:type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput]\n:param model_version: (Optional) This value indicates which model will be used for scoring. If\n a model-version is not specified, the API should default to the latest, non-preview version.\n:type model_version: str\n:param show_stats: (Optional) if set to true, response will contain request and document level\n statistics.\n:type show_stats: bool\n:param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged\n for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to\n allow for troubleshooting issues in providing you with the Text Analytics natural language\n processing functions. Setting this parameter to true, disables input logging and may limit our\n ability to remediate issues that occur. Please see Cognitive Services Compliance and Privacy\n notes at https://aka.ms/cs-compliance for additional details, and Microsoft Responsible AI\n principles at https://www.microsoft.com/en-us/ai/responsible-ai.\n:type logging_opt_out: bool\n:param opinion_mining: (Optional) if set to true, response will contain not only sentiment\n prediction but also opinion mining (aspect-based sentiment analysis) results.\n:type opinion_mining: bool\n:param string_index_type: (Optional) Specifies the method used to interpret string offsets.\n Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information\n see https://aka.ms/text-analytics-offsets.\n:type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: SentimentResponse, or the result of cls(response)\n:rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" }, "call": "documents, model_version, show_stats, logging_opt_out, opinion_mining, string_index_type" } diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_text_analytics_client.py similarity index 69% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_text_analytics_client.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_text_analytics_client.py index 508b5421ffa8..3acee814d2ea 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_text_analytics_client.py @@ -6,31 +6,33 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from copy import deepcopy from typing import TYPE_CHECKING from azure.core import PipelineClient from msrest import Deserializer, Serializer +from . import models +from ._configuration import TextAnalyticsClientConfiguration +from .operations import TextAnalyticsClientOperationsMixin + if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any from azure.core.credentials import TokenCredential - from azure.core.pipeline.transport import HttpRequest, HttpResponse - -from ._configuration import TextAnalyticsClientConfiguration -from .operations import TextAnalyticsClientOperationsMixin -from . import models - + from azure.core.rest import HttpRequest, HttpResponse class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): """The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in :code:`https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview`. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus.api.cognitive.microsoft.com). :type endpoint: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( @@ -40,33 +42,46 @@ def __init__( **kwargs # type: Any ): # type: (...) -> None - base_url = '{Endpoint}/text/analytics/v3.2-preview.1' + _base_url = '{Endpoint}/text/analytics/v3.2-preview.2' self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) - self._client = PipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client = PipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False - def _send_request(self, http_request, **kwargs): - # type: (HttpRequest, Any) -> HttpResponse + def _send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.HttpResponse + :rtype: ~azure.core.rest.HttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) def close(self): # type: () -> None diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_vendor.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_vendor.py new file mode 100644 index 000000000000..138f663c53a4 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/_vendor.py @@ -0,0 +1,27 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/__init__.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/__init__.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_configuration.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_configuration.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_configuration.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_configuration.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_text_analytics_client.py similarity index 68% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_text_analytics_client.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_text_analytics_client.py index c2363aa1e6a4..31b7cf350a6c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/_text_analytics_client.py @@ -6,29 +6,31 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, TYPE_CHECKING +from copy import deepcopy +from typing import Any, Awaitable, TYPE_CHECKING from azure.core import AsyncPipelineClient -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.rest import AsyncHttpResponse, HttpRequest from msrest import Deserializer, Serializer -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from azure.core.credentials_async import AsyncTokenCredential - +from .. import models from ._configuration import TextAnalyticsClientConfiguration from .operations import TextAnalyticsClientOperationsMixin -from .. import models +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential class TextAnalyticsClient(TextAnalyticsClientOperationsMixin): """The Text Analytics API is a suite of natural language processing (NLP) services built with best-in-class Microsoft machine learning algorithms. The API can be used to analyze unstructured text for tasks such as sentiment analysis, key phrase extraction and language detection. Functionality for analysis of text specific to the healthcare domain and personal information are also available in the API. Further documentation can be found in :code:`https://docs.microsoft.com/en-us/azure/cognitive-services/text-analytics/overview`. :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential - :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + :param endpoint: Supported Cognitive Services endpoints (protocol and hostname, for example: + https://westus.api.cognitive.microsoft.com). :type endpoint: str - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. """ def __init__( @@ -37,32 +39,45 @@ def __init__( endpoint: str, **kwargs: Any ) -> None: - base_url = '{Endpoint}/text/analytics/v3.2-preview.1' + _base_url = '{Endpoint}/text/analytics/v3.2-preview.2' self._config = TextAnalyticsClientConfiguration(credential, endpoint, **kwargs) - self._client = AsyncPipelineClient(base_url=base_url, config=self._config, **kwargs) + self._client = AsyncPipelineClient(base_url=_base_url, config=self._config, **kwargs) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) - self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self._serialize.client_side_validation = False - async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + def _send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: """Runs the network request through the client's chained policies. - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.core.pipeline.transport.HttpRequest - :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client._send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + :rtype: ~azure.core.rest.AsyncHttpResponse """ + + request_copy = deepcopy(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - http_request.url = self._client.format_url(http_request.url, **path_format_arguments) - stream = kwargs.pop("stream", True) - pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) - return pipeline_response.http_response + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) async def close(self) -> None: await self._client.close() diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/__init__.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/__init__.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/_text_analytics_client_operations.py similarity index 69% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/_text_analytics_client_operations.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/_text_analytics_client_operations.py index ab03931dd124..d497f4f9fe59 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/aio/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/aio/operations/_text_analytics_client_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union import warnings from .....aio._lro_async import AsyncAnalyzeActionsLROPoller, AsyncAnalyzeActionsLROPollingMethod, AsyncAnalyzeHealthcareEntitiesLROPoller, AsyncAnalyzeHealthcareEntitiesLROPollingMethod from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.core.polling.async_base_polling import AsyncLROBasePolling +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async from ... import models as _models +from ..._vendor import _convert_request +from ...operations._text_analytics_client_operations import build_analyze_request_initial, build_analyze_status_request, build_cancel_health_job_request_initial, build_entities_linking_request, build_entities_recognition_general_request, build_entities_recognition_pii_request, build_health_request_initial, build_health_status_request, build_key_phrases_request, build_languages_request, build_sentiment_request T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] @@ -32,53 +37,50 @@ async def _analyze_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - # Construct URL - url = self._analyze_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] if body is not None: - body_content = self._serialize.body(body, 'AnalyzeBatchInput') + json = self._serialize.body(body, 'AnalyzeBatchInput') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_analyze_request_initial( + content_type=content_type, + json=json, + template_url=self._analyze_initial.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('AnalyzeJobState', pipeline_response) if response.status_code == 202: response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + _analyze_initial.metadata = {'url': '/analyze'} # type: ignore + + @distributed_trace_async async def begin_analyze( self, body: Optional["_models.AnalyzeBatchInput"] = None, @@ -90,18 +92,23 @@ async def begin_analyze( executed. :param body: Collection of documents to analyze and tasks to execute. - :type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput + :type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncAnalyzeActionsLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + Pass in False for this operation to not poll, or pass in your own initialized polling object + for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncAnalyzeActionsLROPoller that returns either AnalyzeJobState or the + result of cls(response) + :rtype: + ~.....aio._lro_async.AsyncAnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeJobState"] lro_delay = kwargs.pop( 'polling_interval', @@ -111,25 +118,25 @@ async def begin_analyze( if cont_token is None: raw_result = await self._analyze_initial( body=body, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('AnalyzeJobState', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AsyncAnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncAnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -141,8 +148,10 @@ def get_long_running_output(pipeline_response): ) else: return AsyncAnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_analyze.metadata = {'url': '/analyze'} # type: ignore + @distributed_trace_async async def analyze_status( self, job_id: str, @@ -170,7 +179,7 @@ async def analyze_status( :type skip: int :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeJobState"] @@ -178,36 +187,27 @@ async def analyze_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self.analyze_status.metadata['url'] # type: ignore + + request = build_analyze_status_request( + job_id=job_id, + show_stats=show_stats, + top=top, + skip=skip, + template_url=self.analyze_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=50, minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AnalyzeJobState', pipeline_response) @@ -216,8 +216,11 @@ async def analyze_status( return cls(pipeline_response, deserialized, {}) return deserialized + analyze_status.metadata = {'url': '/analyze/jobs/{jobId}'} # type: ignore + + @distributed_trace_async async def health_status( self, job_id: str, @@ -243,7 +246,7 @@ async def health_status( :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: HealthcareJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.HealthcareJobState"] @@ -251,36 +254,27 @@ async def health_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self.health_status.metadata['url'] # type: ignore + + request = build_health_status_request( + job_id=job_id, + top=top, + skip=skip, + show_stats=show_stats, + template_url=self.health_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=50, minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('HealthcareJobState', pipeline_response) @@ -289,8 +283,10 @@ async def health_status( return cls(pipeline_response, deserialized, {}) return deserialized + health_status.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore + async def _cancel_health_job_initial( self, job_id: str, @@ -301,40 +297,36 @@ async def _cancel_health_job_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self._cancel_health_job_initial.metadata['url'] # type: ignore + + request = build_cancel_health_job_request_initial( + job_id=job_id, + template_url=self._cancel_health_job_initial.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) response_headers = {} response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, None, response_headers) _cancel_health_job_initial.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore + + @distributed_trace_async async def begin_cancel_health_job( self, job_id: str, @@ -348,15 +340,17 @@ async def begin_cancel_health_job( :type job_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncLROBasePolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncLROBasePolling. Pass in False + for this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.AsyncLROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -369,20 +363,18 @@ async def begin_cancel_health_job( cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncLROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -394,6 +386,7 @@ def get_long_running_output(pipeline_response): ) else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel_health_job.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore async def _health_initial( @@ -410,57 +403,50 @@ async def _health_initial( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self._health_initial.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_health_request_initial( + content_type=content_type, + model_version=model_version, + string_index_type=string_index_type, + logging_opt_out=logging_opt_out, + json=json, + template_url=self._health_initial.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('HealthcareJobState', pipeline_response) if response.status_code == 202: response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + _health_initial.metadata = {'url': '/entities/health/jobs'} # type: ignore + + @distributed_trace_async async def begin_health( self, documents: List["_models.MultiLanguageInput"], @@ -475,14 +461,14 @@ async def begin_health( symptoms, etc) and their relations. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language @@ -493,15 +479,20 @@ async def begin_health( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AsyncAnalyzeHealthcareEntitiesLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be + AsyncAnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll, + or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AsyncAnalyzeHealthcareEntitiesLROPoller that returns either + HealthcareJobState or the result of cls(response) + :rtype: + ~.....aio._lro_async.AsyncAnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.HealthcareJobState"] lro_delay = kwargs.pop( 'polling_interval', @@ -514,25 +505,25 @@ async def begin_health( model_version=model_version, string_index_type=string_index_type, logging_opt_out=logging_opt_out, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('HealthcareJobState', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AsyncAnalyzeHealthcareEntitiesLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AsyncAnalyzeHealthcareEntitiesLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = AsyncNoPolling() else: polling_method = polling if cont_token: @@ -544,8 +535,10 @@ def get_long_running_output(pipeline_response): ) else: return AsyncAnalyzeHealthcareEntitiesLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_health.metadata = {'url': '/entities/health/jobs'} # type: ignore + @distributed_trace_async async def entities_recognition_general( self, documents: List["_models.MultiLanguageInput"], @@ -563,7 +556,7 @@ async def entities_recognition_general( Analytics API` for the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -581,10 +574,10 @@ async def entities_recognition_general( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EntitiesResult"] @@ -593,43 +586,32 @@ async def entities_recognition_general( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_general.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_general_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + string_index_type=string_index_type, + json=json, + template_url=self.entities_recognition_general.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -638,8 +620,11 @@ async def entities_recognition_general( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_general.metadata = {'url': '/entities/recognition/general'} # type: ignore + + @distributed_trace_async async def entities_recognition_pii( self, documents: List["_models.MultiLanguageInput"], @@ -660,7 +645,7 @@ async def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -681,12 +666,12 @@ async def entities_recognition_pii( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :keyword callable cls: A custom type or function that will be passed the direct response :return: PiiResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PiiResult"] @@ -695,47 +680,34 @@ async def entities_recognition_pii( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_pii.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_pii_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + domain=domain, + string_index_type=string_index_type, + pii_categories=pii_categories, + json=json, + template_url=self.entities_recognition_pii.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if domain is not None: - query_parameters['domain'] = self._serialize.query("domain", domain, 'str') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - if pii_categories is not None: - query_parameters['piiCategories'] = self._serialize.query("pii_categories", pii_categories, '[str]', div=',') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('PiiResult', pipeline_response) @@ -744,8 +716,11 @@ async def entities_recognition_pii( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_pii.metadata = {'url': '/entities/recognition/pii'} # type: ignore + + @distributed_trace_async async def entities_linking( self, documents: List["_models.MultiLanguageInput"], @@ -762,7 +737,7 @@ async def entities_linking( the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -780,10 +755,10 @@ async def entities_linking( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EntityLinkingResult"] @@ -792,43 +767,32 @@ async def entities_linking( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_linking.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_linking_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + string_index_type=string_index_type, + json=json, + template_url=self.entities_linking.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -837,8 +801,11 @@ async def entities_linking( return cls(pipeline_response, deserialized, {}) return deserialized + entities_linking.metadata = {'url': '/entities/linking'} # type: ignore + + @distributed_trace_async async def key_phrases( self, documents: List["_models.MultiLanguageInput"], @@ -854,7 +821,7 @@ async def key_phrases( enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -871,7 +838,7 @@ async def key_phrases( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyPhraseResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyPhraseResult"] @@ -880,41 +847,31 @@ async def key_phrases( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.key_phrases.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_key_phrases_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + json=json, + template_url=self.key_phrases.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -923,8 +880,11 @@ async def key_phrases( return cls(pipeline_response, deserialized, {}) return deserialized + key_phrases.metadata = {'url': '/keyPhrases'} # type: ignore + + @distributed_trace_async async def languages( self, documents: List["_models.LanguageInput"], @@ -941,7 +901,7 @@ async def languages( enabled languages. :param documents: - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -958,7 +918,7 @@ async def languages( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: LanguageResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LanguageResult"] @@ -967,41 +927,31 @@ async def languages( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.LanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.languages.metadata['url'] # type: ignore + _input = _models.LanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'LanguageBatchInput') + + request = build_languages_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + json=json, + template_url=self.languages.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'LanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -1010,8 +960,11 @@ async def languages( return cls(pipeline_response, deserialized, {}) return deserialized + languages.metadata = {'url': '/languages'} # type: ignore + + @distributed_trace_async async def sentiment( self, documents: List["_models.MultiLanguageInput"], @@ -1029,7 +982,7 @@ async def sentiment( (targets and assessments). :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -1050,10 +1003,10 @@ async def sentiment( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SentimentResponse"] @@ -1062,45 +1015,33 @@ async def sentiment( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.sentiment.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_sentiment_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + opinion_mining=opinion_mining, + string_index_type=string_index_type, + json=json, + template_url=self.sentiment.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if opinion_mining is not None: - query_parameters['opinionMining'] = self._serialize.query("opinion_mining", opinion_mining, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) @@ -1109,4 +1050,6 @@ async def sentiment( return cls(pipeline_response, deserialized, {}) return deserialized + sentiment.metadata = {'url': '/sentiment'} # type: ignore + diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/__init__.py similarity index 80% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/__init__.py index a947b92f2552..4b2a6064fdfe 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/__init__.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/__init__.py @@ -13,6 +13,19 @@ from ._models_py3 import AnalyzeJobErrorsAndStatistics from ._models_py3 import AnalyzeJobMetadata from ._models_py3 import AnalyzeJobState + from ._models_py3 import ClassificationResult + from ._models_py3 import CustomEntitiesResult + from ._models_py3 import CustomEntitiesTask + from ._models_py3 import CustomEntitiesTaskParameters + from ._models_py3 import CustomEntitiesTaskResult + from ._models_py3 import CustomMultiClassificationResult + from ._models_py3 import CustomMultiClassificationTask + from ._models_py3 import CustomMultiClassificationTaskParameters + from ._models_py3 import CustomMultiClassificationTaskResult + from ._models_py3 import CustomSingleClassificationResult + from ._models_py3 import CustomSingleClassificationTask + from ._models_py3 import CustomSingleClassificationTaskParameters + from ._models_py3 import CustomSingleClassificationTaskResult from ._models_py3 import DetectedLanguage from ._models_py3 import DocumentEntities from ._models_py3 import DocumentError @@ -62,6 +75,7 @@ from ._models_py3 import LanguageResult from ._models_py3 import LinkedEntity from ._models_py3 import Match + from ._models_py3 import MultiClassificationDocument from ._models_py3 import MultiLanguageBatchInput from ._models_py3 import MultiLanguageInput from ._models_py3 import Pagination @@ -79,11 +93,15 @@ from ._models_py3 import SentimentConfidenceScorePerLabel from ._models_py3 import SentimentResponse from ._models_py3 import SentimentTaskResult + from ._models_py3 import SingleClassificationDocument from ._models_py3 import TargetConfidenceScoreLabel from ._models_py3 import TargetRelation from ._models_py3 import TaskState from ._models_py3 import TasksState from ._models_py3 import TasksStateTasks + from ._models_py3 import TasksStateTasksCustomEntityRecognitionTasksItem + from ._models_py3 import TasksStateTasksCustomMultiClassificationTasksItem + from ._models_py3 import TasksStateTasksCustomSingleClassificationTasksItem from ._models_py3 import TasksStateTasksEntityLinkingTasksItem from ._models_py3 import TasksStateTasksEntityRecognitionPiiTasksItem from ._models_py3 import TasksStateTasksEntityRecognitionTasksItem @@ -99,6 +117,19 @@ from ._models import AnalyzeJobErrorsAndStatistics # type: ignore from ._models import AnalyzeJobMetadata # type: ignore from ._models import AnalyzeJobState # type: ignore + from ._models import ClassificationResult # type: ignore + from ._models import CustomEntitiesResult # type: ignore + from ._models import CustomEntitiesTask # type: ignore + from ._models import CustomEntitiesTaskParameters # type: ignore + from ._models import CustomEntitiesTaskResult # type: ignore + from ._models import CustomMultiClassificationResult # type: ignore + from ._models import CustomMultiClassificationTask # type: ignore + from ._models import CustomMultiClassificationTaskParameters # type: ignore + from ._models import CustomMultiClassificationTaskResult # type: ignore + from ._models import CustomSingleClassificationResult # type: ignore + from ._models import CustomSingleClassificationTask # type: ignore + from ._models import CustomSingleClassificationTaskParameters # type: ignore + from ._models import CustomSingleClassificationTaskResult # type: ignore from ._models import DetectedLanguage # type: ignore from ._models import DocumentEntities # type: ignore from ._models import DocumentError # type: ignore @@ -148,6 +179,7 @@ from ._models import LanguageResult # type: ignore from ._models import LinkedEntity # type: ignore from ._models import Match # type: ignore + from ._models import MultiClassificationDocument # type: ignore from ._models import MultiLanguageBatchInput # type: ignore from ._models import MultiLanguageInput # type: ignore from ._models import Pagination # type: ignore @@ -165,11 +197,15 @@ from ._models import SentimentConfidenceScorePerLabel # type: ignore from ._models import SentimentResponse # type: ignore from ._models import SentimentTaskResult # type: ignore + from ._models import SingleClassificationDocument # type: ignore from ._models import TargetConfidenceScoreLabel # type: ignore from ._models import TargetRelation # type: ignore from ._models import TaskState # type: ignore from ._models import TasksState # type: ignore from ._models import TasksStateTasks # type: ignore + from ._models import TasksStateTasksCustomEntityRecognitionTasksItem # type: ignore + from ._models import TasksStateTasksCustomMultiClassificationTasksItem # type: ignore + from ._models import TasksStateTasksCustomSingleClassificationTasksItem # type: ignore from ._models import TasksStateTasksEntityLinkingTasksItem # type: ignore from ._models import TasksStateTasksEntityRecognitionPiiTasksItem # type: ignore from ._models import TasksStateTasksEntityRecognitionTasksItem # type: ignore @@ -206,6 +242,19 @@ 'AnalyzeJobErrorsAndStatistics', 'AnalyzeJobMetadata', 'AnalyzeJobState', + 'ClassificationResult', + 'CustomEntitiesResult', + 'CustomEntitiesTask', + 'CustomEntitiesTaskParameters', + 'CustomEntitiesTaskResult', + 'CustomMultiClassificationResult', + 'CustomMultiClassificationTask', + 'CustomMultiClassificationTaskParameters', + 'CustomMultiClassificationTaskResult', + 'CustomSingleClassificationResult', + 'CustomSingleClassificationTask', + 'CustomSingleClassificationTaskParameters', + 'CustomSingleClassificationTaskResult', 'DetectedLanguage', 'DocumentEntities', 'DocumentError', @@ -255,6 +304,7 @@ 'LanguageResult', 'LinkedEntity', 'Match', + 'MultiClassificationDocument', 'MultiLanguageBatchInput', 'MultiLanguageInput', 'Pagination', @@ -272,11 +322,15 @@ 'SentimentConfidenceScorePerLabel', 'SentimentResponse', 'SentimentTaskResult', + 'SingleClassificationDocument', 'TargetConfidenceScoreLabel', 'TargetRelation', 'TaskState', 'TasksState', 'TasksStateTasks', + 'TasksStateTasksCustomEntityRecognitionTasksItem', + 'TasksStateTasksCustomMultiClassificationTasksItem', + 'TasksStateTasksCustomSingleClassificationTasksItem', 'TasksStateTasksEntityLinkingTasksItem', 'TasksStateTasksEntityRecognitionPiiTasksItem', 'TasksStateTasksEntityRecognitionTasksItem', diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models.py new file mode 100644 index 000000000000..92e61a935ee7 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models.py @@ -0,0 +1,4842 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + + +class AnalysisInput(msrest.serialization.Model): + """AnalysisInput. + + All required parameters must be populated in order to send to Azure. + + :ivar analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :vartype analysis_input: ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput + """ + + _validation = { + 'analysis_input': {'required': True}, + } + + _attribute_map = { + 'analysis_input': {'key': 'analysisInput', 'type': 'MultiLanguageBatchInput'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :paramtype analysis_input: + ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput + """ + super(AnalysisInput, self).__init__(**kwargs) + self.analysis_input = kwargs['analysis_input'] + + +class JobManifest(msrest.serialization.Model): + """JobManifest. + + All required parameters must be populated in order to send to Azure. + + :ivar tasks: Required. The set of tasks to execute on the input documents. Cannot specify the + same task more than once. + :vartype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks + """ + + _validation = { + 'tasks': {'required': True}, + } + + _attribute_map = { + 'tasks': {'key': 'tasks', 'type': 'JobManifestTasks'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tasks: Required. The set of tasks to execute on the input documents. Cannot specify + the same task more than once. + :paramtype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks + """ + super(JobManifest, self).__init__(**kwargs) + self.tasks = kwargs['tasks'] + + +class JobDescriptor(msrest.serialization.Model): + """JobDescriptor. + + :ivar display_name: Optional display name for the analysis job. + :vartype display_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword display_name: Optional display name for the analysis job. + :paramtype display_name: str + """ + super(JobDescriptor, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + + +class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest): + """AnalyzeBatchInput. + + All required parameters must be populated in order to send to Azure. + + :ivar tasks: Required. The set of tasks to execute on the input documents. Cannot specify the + same task more than once. + :vartype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks + :ivar analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :vartype analysis_input: ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput + :ivar display_name: Optional display name for the analysis job. + :vartype display_name: str + """ + + _validation = { + 'tasks': {'required': True}, + 'analysis_input': {'required': True}, + } + + _attribute_map = { + 'tasks': {'key': 'tasks', 'type': 'JobManifestTasks'}, + 'analysis_input': {'key': 'analysisInput', 'type': 'MultiLanguageBatchInput'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tasks: Required. The set of tasks to execute on the input documents. Cannot specify + the same task more than once. + :paramtype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks + :keyword analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :paramtype analysis_input: + ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput + :keyword display_name: Optional display name for the analysis job. + :paramtype display_name: str + """ + super(AnalyzeBatchInput, self).__init__(**kwargs) + self.tasks = kwargs['tasks'] + self.analysis_input = kwargs['analysis_input'] + self.tasks = kwargs['tasks'] + self.display_name = kwargs.get('display_name', None) + self.analysis_input = kwargs['analysis_input'] + self.display_name = kwargs.get('display_name', None) + + +class AnalyzeJobDisplayName(msrest.serialization.Model): + """AnalyzeJobDisplayName. + + :ivar display_name: + :vartype display_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword display_name: + :paramtype display_name: str + """ + super(AnalyzeJobDisplayName, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + + +class AnalyzeJobErrorsAndStatistics(msrest.serialization.Model): + """AnalyzeJobErrorsAndStatistics. + + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + """ + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + """ + super(AnalyzeJobErrorsAndStatistics, self).__init__(**kwargs) + self.errors = kwargs.get('errors', None) + self.statistics = kwargs.get('statistics', None) + + +class JobMetadata(msrest.serialization.Model): + """JobMetadata. + + All required parameters must be populated in order to send to Azure. + + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'created_date_time': {'required': True}, + 'job_id': {'required': True}, + 'last_update_date_time': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(JobMetadata, self).__init__(**kwargs) + self.created_date_time = kwargs['created_date_time'] + self.expiration_date_time = kwargs.get('expiration_date_time', None) + self.job_id = kwargs['job_id'] + self.last_update_date_time = kwargs['last_update_date_time'] + self.status = kwargs['status'] + + +class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName): + """AnalyzeJobMetadata. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: + :vartype display_name: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'created_date_time': {'required': True}, + 'job_id': {'required': True}, + 'last_update_date_time': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword display_name: + :paramtype display_name: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(AnalyzeJobMetadata, self).__init__(**kwargs) + self.display_name = kwargs.get('display_name', None) + self.created_date_time = kwargs['created_date_time'] + self.expiration_date_time = kwargs.get('expiration_date_time', None) + self.job_id = kwargs['job_id'] + self.last_update_date_time = kwargs['last_update_date_time'] + self.status = kwargs['status'] + + +class Pagination(msrest.serialization.Model): + """Pagination. + + :ivar next_link: + :vartype next_link: str + """ + + _attribute_map = { + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: + :paramtype next_link: str + """ + super(Pagination, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + + +class TasksState(msrest.serialization.Model): + """TasksState. + + All required parameters must be populated in order to send to Azure. + + :ivar tasks: Required. + :vartype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks + """ + + _validation = { + 'tasks': {'required': True}, + } + + _attribute_map = { + 'tasks': {'key': 'tasks', 'type': 'TasksStateTasks'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword tasks: Required. + :paramtype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks + """ + super(TasksState, self).__init__(**kwargs) + self.tasks = kwargs['tasks'] + + +class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatistics, Pagination): + """AnalyzeJobState. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: + :vartype next_link: str + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar tasks: Required. + :vartype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks + :ivar display_name: + :vartype display_name: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'tasks': {'required': True}, + 'created_date_time': {'required': True}, + 'job_id': {'required': True}, + 'last_update_date_time': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': '@nextLink', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'tasks': {'key': 'tasks', 'type': 'TasksStateTasks'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword next_link: + :paramtype next_link: str + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword tasks: Required. + :paramtype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks + :keyword display_name: + :paramtype display_name: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(AnalyzeJobState, self).__init__(**kwargs) + self.next_link = kwargs.get('next_link', None) + self.errors = kwargs.get('errors', None) + self.statistics = kwargs.get('statistics', None) + self.tasks = kwargs['tasks'] + self.next_link = kwargs.get('next_link', None) + self.errors = kwargs.get('errors', None) + self.statistics = kwargs.get('statistics', None) + self.display_name = kwargs.get('display_name', None) + self.created_date_time = kwargs['created_date_time'] + self.expiration_date_time = kwargs.get('expiration_date_time', None) + self.job_id = kwargs['job_id'] + self.last_update_date_time = kwargs['last_update_date_time'] + self.status = kwargs['status'] + self.next_link = kwargs.get('next_link', None) + self.tasks = kwargs['tasks'] + self.display_name = kwargs.get('display_name', None) + self.created_date_time = kwargs['created_date_time'] + self.expiration_date_time = kwargs.get('expiration_date_time', None) + self.job_id = kwargs['job_id'] + self.last_update_date_time = kwargs['last_update_date_time'] + self.status = kwargs['status'] + self.errors = kwargs.get('errors', None) + self.statistics = kwargs.get('statistics', None) + self.tasks = kwargs['tasks'] + self.display_name = kwargs.get('display_name', None) + self.created_date_time = kwargs['created_date_time'] + self.expiration_date_time = kwargs.get('expiration_date_time', None) + self.job_id = kwargs['job_id'] + self.last_update_date_time = kwargs['last_update_date_time'] + self.status = kwargs['status'] + + +class ClassificationResult(msrest.serialization.Model): + """ClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :ivar category: Required. Classification type. + :vartype category: str + :ivar confidence_score: Required. Confidence score between 0 and 1 of the recognized + classification. + :vartype confidence_score: float + """ + + _validation = { + 'category': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword category: Required. Classification type. + :paramtype category: str + :keyword confidence_score: Required. Confidence score between 0 and 1 of the recognized + classification. + :paramtype confidence_score: float + """ + super(ClassificationResult, self).__init__(**kwargs) + self.category = kwargs['category'] + self.confidence_score = kwargs['confidence_score'] + + +class CustomEntitiesResult(msrest.serialization.Model): + """CustomEntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar project_name: Required. This field indicates the project name for the model. + :vartype project_name: str + :ivar deployment_name: Required. This field indicates the deployment name for the model. + :vartype deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword project_name: Required. This field indicates the project name for the model. + :paramtype project_name: str + :keyword deployment_name: Required. This field indicates the deployment name for the model. + :paramtype deployment_name: str + """ + super(CustomEntitiesResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + + +class CustomEntitiesTask(msrest.serialization.Model): + """CustomEntitiesTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomEntitiesTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(CustomEntitiesTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class CustomEntitiesTaskParameters(msrest.serialization.Model): + """CustomEntitiesTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :ivar project_name: Required. + :vartype project_name: str + :ivar deployment_name: Required. + :vartype deployment_name: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'project-name', 'type': 'str'}, + 'deployment_name': {'key': 'deployment-name', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword project_name: Required. + :paramtype project_name: str + :keyword deployment_name: Required. + :paramtype deployment_name: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(CustomEntitiesTaskParameters, self).__init__(**kwargs) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + self.logging_opt_out = kwargs.get('logging_opt_out', False) + self.string_index_type = kwargs.get('string_index_type', None) + + +class CustomEntitiesTaskResult(msrest.serialization.Model): + """CustomEntitiesTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomEntitiesResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + """ + super(CustomEntitiesTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class CustomMultiClassificationResult(msrest.serialization.Model): + """CustomMultiClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiClassificationDocument] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar project_name: Required. This field indicates the project name for the model. + :vartype project_name: str + :ivar deployment_name: Required. This field indicates the deployment name for the model. + :vartype deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[MultiClassificationDocument]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiClassificationDocument] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword project_name: Required. This field indicates the project name for the model. + :paramtype project_name: str + :keyword deployment_name: Required. This field indicates the deployment name for the model. + :paramtype deployment_name: str + """ + super(CustomMultiClassificationResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + + +class CustomMultiClassificationTask(msrest.serialization.Model): + """CustomMultiClassificationTask. + + :ivar parameters: + :vartype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomMultiClassificationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(CustomMultiClassificationTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class CustomMultiClassificationTaskParameters(msrest.serialization.Model): + """CustomMultiClassificationTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :ivar project_name: Required. + :vartype project_name: str + :ivar deployment_name: Required. + :vartype deployment_name: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'project-name', 'type': 'str'}, + 'deployment_name': {'key': 'deployment-name', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword project_name: Required. + :paramtype project_name: str + :keyword deployment_name: Required. + :paramtype deployment_name: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + """ + super(CustomMultiClassificationTaskParameters, self).__init__(**kwargs) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + self.logging_opt_out = kwargs.get('logging_opt_out', False) + + +class CustomMultiClassificationTaskResult(msrest.serialization.Model): + """CustomMultiClassificationTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomMultiClassificationResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + """ + super(CustomMultiClassificationTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class CustomSingleClassificationResult(msrest.serialization.Model): + """CustomSingleClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SingleClassificationDocument] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar project_name: Required. This field indicates the project name for the model. + :vartype project_name: str + :ivar deployment_name: Required. This field indicates the deployment name for the model. + :vartype deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[SingleClassificationDocument]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SingleClassificationDocument] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword project_name: Required. This field indicates the project name for the model. + :paramtype project_name: str + :keyword deployment_name: Required. This field indicates the deployment name for the model. + :paramtype deployment_name: str + """ + super(CustomSingleClassificationResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + + +class CustomSingleClassificationTask(msrest.serialization.Model): + """CustomSingleClassificationTask. + + :ivar parameters: + :vartype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomSingleClassificationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(CustomSingleClassificationTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class CustomSingleClassificationTaskParameters(msrest.serialization.Model): + """CustomSingleClassificationTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :ivar project_name: Required. + :vartype project_name: str + :ivar deployment_name: Required. + :vartype deployment_name: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'project-name', 'type': 'str'}, + 'deployment_name': {'key': 'deployment-name', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword project_name: Required. + :paramtype project_name: str + :keyword deployment_name: Required. + :paramtype deployment_name: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + """ + super(CustomSingleClassificationTaskParameters, self).__init__(**kwargs) + self.project_name = kwargs['project_name'] + self.deployment_name = kwargs['deployment_name'] + self.logging_opt_out = kwargs.get('logging_opt_out', False) + + +class CustomSingleClassificationTaskResult(msrest.serialization.Model): + """CustomSingleClassificationTaskResult. + + :ivar results: + :vartype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomSingleClassificationResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + """ + super(CustomSingleClassificationTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class DetectedLanguage(msrest.serialization.Model): + """DetectedLanguage. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Long name of a detected language (e.g. English, French). + :vartype name: str + :ivar iso6391_name: Required. A two letter representation of the detected language according to + the ISO 639-1 standard (e.g. en, fr). + :vartype iso6391_name: str + :ivar confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :vartype confidence_score: float + """ + + _validation = { + 'name': {'required': True}, + 'iso6391_name': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'iso6391_name': {'key': 'iso6391Name', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Long name of a detected language (e.g. English, French). + :paramtype name: str + :keyword iso6391_name: Required. A two letter representation of the detected language according + to the ISO 639-1 standard (e.g. en, fr). + :paramtype iso6391_name: str + :keyword confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :paramtype confidence_score: float + """ + super(DetectedLanguage, self).__init__(**kwargs) + self.name = kwargs['name'] + self.iso6391_name = kwargs['iso6391_name'] + self.confidence_score = kwargs['confidence_score'] + + +class DocumentEntities(msrest.serialization.Model): + """DocumentEntities. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[Entity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentEntities, self).__init__(**kwargs) + self.id = kwargs['id'] + self.entities = kwargs['entities'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class DocumentError(msrest.serialization.Model): + """DocumentError. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Document Id. + :vartype id: str + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError + """ + + _validation = { + 'id': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Document Id. + :paramtype id: str + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError + """ + super(DocumentError, self).__init__(**kwargs) + self.id = kwargs['id'] + self.error = kwargs['error'] + + +class DocumentHealthcareEntities(msrest.serialization.Model): + """DocumentHealthcareEntities. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Healthcare entities. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntity] + :ivar relations: Required. Healthcare entity relations. + :vartype relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelation] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'relations': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[HealthcareEntity]'}, + 'relations': {'key': 'relations', 'type': '[HealthcareRelation]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Healthcare entities. + :paramtype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntity] + :keyword relations: Required. Healthcare entity relations. + :paramtype relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelation] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentHealthcareEntities, self).__init__(**kwargs) + self.id = kwargs['id'] + self.entities = kwargs['entities'] + self.relations = kwargs['relations'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class DocumentKeyPhrases(msrest.serialization.Model): + """DocumentKeyPhrases. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :vartype key_phrases: list[str] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'key_phrases': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'key_phrases': {'key': 'keyPhrases', 'type': '[str]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :paramtype key_phrases: list[str] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentKeyPhrases, self).__init__(**kwargs) + self.id = kwargs['id'] + self.key_phrases = kwargs['key_phrases'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class DocumentLanguage(msrest.serialization.Model): + """DocumentLanguage. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar detected_language: Required. Detected Language. + :vartype detected_language: ~azure.ai.textanalytics.v3_2_preview_2.models.DetectedLanguage + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'detected_language': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'detected_language': {'key': 'detectedLanguage', 'type': 'DetectedLanguage'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword detected_language: Required. Detected Language. + :paramtype detected_language: ~azure.ai.textanalytics.v3_2_preview_2.models.DetectedLanguage + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentLanguage, self).__init__(**kwargs) + self.id = kwargs['id'] + self.detected_language = kwargs['detected_language'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class DocumentLinkedEntities(msrest.serialization.Model): + """DocumentLinkedEntities. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized well known entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.LinkedEntity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[LinkedEntity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized well known entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.LinkedEntity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentLinkedEntities, self).__init__(**kwargs) + self.id = kwargs['id'] + self.entities = kwargs['entities'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class DocumentSentiment(msrest.serialization.Model): + """DocumentSentiment. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :vartype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentimentValue + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + :ivar confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 + for each sentiment class. + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel + :ivar sentences: Required. Sentence level sentiment analysis. + :vartype sentences: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentiment] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + """ + + _validation = { + 'id': {'required': True}, + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'sentences': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, + 'sentences': {'key': 'sentences', 'type': '[SentenceSentiment]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :paramtype sentiment: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentimentValue + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + :keyword confidence_scores: Required. Document level sentiment confidence scores between 0 and + 1 for each sentiment class. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel + :keyword sentences: Required. Sentence level sentiment analysis. + :paramtype sentences: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentiment] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + """ + super(DocumentSentiment, self).__init__(**kwargs) + self.id = kwargs['id'] + self.sentiment = kwargs['sentiment'] + self.statistics = kwargs.get('statistics', None) + self.confidence_scores = kwargs['confidence_scores'] + self.sentences = kwargs['sentences'] + self.warnings = kwargs['warnings'] + + +class DocumentStatistics(msrest.serialization.Model): + """if showStats=true was specified in the request this field will contain information about the document payload. + + All required parameters must be populated in order to send to Azure. + + :ivar characters_count: Required. Number of text elements recognized in the document. + :vartype characters_count: int + :ivar transactions_count: Required. Number of transactions for the document. + :vartype transactions_count: int + """ + + _validation = { + 'characters_count': {'required': True}, + 'transactions_count': {'required': True}, + } + + _attribute_map = { + 'characters_count': {'key': 'charactersCount', 'type': 'int'}, + 'transactions_count': {'key': 'transactionsCount', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword characters_count: Required. Number of text elements recognized in the document. + :paramtype characters_count: int + :keyword transactions_count: Required. Number of transactions for the document. + :paramtype transactions_count: int + """ + super(DocumentStatistics, self).__init__(**kwargs) + self.characters_count = kwargs['characters_count'] + self.transactions_count = kwargs['transactions_count'] + + +class EntitiesResult(msrest.serialization.Model): + """EntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(EntitiesResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class EntitiesTask(msrest.serialization.Model): + """EntitiesTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'EntitiesTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(EntitiesTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class EntitiesTaskParameters(msrest.serialization.Model): + """EntitiesTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(EntitiesTaskParameters, self).__init__(**kwargs) + self.model_version = kwargs.get('model_version', "latest") + self.logging_opt_out = kwargs.get('logging_opt_out', False) + self.string_index_type = kwargs.get('string_index_type', None) + + +class EntitiesTaskResult(msrest.serialization.Model): + """EntitiesTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'EntitiesResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult + """ + super(EntitiesTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class Entity(msrest.serialization.Model): + """Entity. + + All required parameters must be populated in order to send to Azure. + + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Entity type. + :vartype category: str + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' + values can affect the offset returned. + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values + can affect the length returned. + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float + """ + + _validation = { + 'text': {'required': True}, + 'category': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'subcategory': {'key': 'subcategory', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Entity type. + :paramtype category: str + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ + super(Entity, self).__init__(**kwargs) + self.text = kwargs['text'] + self.category = kwargs['category'] + self.subcategory = kwargs.get('subcategory', None) + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.confidence_score = kwargs['confidence_score'] + + +class EntityLinkingResult(msrest.serialization.Model): + """EntityLinkingResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLinkedEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentLinkedEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLinkedEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(EntityLinkingResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class EntityLinkingTask(msrest.serialization.Model): + """EntityLinkingTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'EntityLinkingTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(EntityLinkingTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class EntityLinkingTaskParameters(msrest.serialization.Model): + """EntityLinkingTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(EntityLinkingTaskParameters, self).__init__(**kwargs) + self.model_version = kwargs.get('model_version', "latest") + self.logging_opt_out = kwargs.get('logging_opt_out', False) + self.string_index_type = kwargs.get('string_index_type', None) + + +class EntityLinkingTaskResult(msrest.serialization.Model): + """EntityLinkingTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'EntityLinkingResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult + """ + super(EntityLinkingTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + All required parameters must be populated in order to send to Azure. + + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError + """ + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs['error'] + + +class ExtractedDocumentSummary(msrest.serialization.Model): + """ExtractedDocumentSummary. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar sentences: Required. A ranked list of sentences representing the extracted summary. + :vartype sentences: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedSummarySentence] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'sentences': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'sentences': {'key': 'sentences', 'type': '[ExtractedSummarySentence]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword sentences: Required. A ranked list of sentences representing the extracted summary. + :paramtype sentences: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedSummarySentence] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(ExtractedDocumentSummary, self).__init__(**kwargs) + self.id = kwargs['id'] + self.sentences = kwargs['sentences'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class ExtractedSummarySentence(msrest.serialization.Model): + """ExtractedSummarySentence. + + All required parameters must be populated in order to send to Azure. + + :ivar text: Required. The extracted sentence text. + :vartype text: str + :ivar rank_score: Required. A double value representing the relevance of the sentence within + the summary. Higher values indicate higher importance. + :vartype rank_score: float + :ivar offset: Required. The sentence offset from the start of the document, based on the value + of the parameter StringIndexType. + :vartype offset: int + :ivar length: Required. The length of the sentence. + :vartype length: int + """ + + _validation = { + 'text': {'required': True}, + 'rank_score': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'rank_score': {'key': 'rankScore', 'type': 'float'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword text: Required. The extracted sentence text. + :paramtype text: str + :keyword rank_score: Required. A double value representing the relevance of the sentence within + the summary. Higher values indicate higher importance. + :paramtype rank_score: float + :keyword offset: Required. The sentence offset from the start of the document, based on the + value of the parameter StringIndexType. + :paramtype offset: int + :keyword length: Required. The length of the sentence. + :paramtype length: int + """ + super(ExtractedSummarySentence, self).__init__(**kwargs) + self.text = kwargs['text'] + self.rank_score = kwargs['rank_score'] + self.offset = kwargs['offset'] + self.length = kwargs['length'] + + +class ExtractiveSummarizationResult(msrest.serialization.Model): + """ExtractiveSummarizationResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedDocumentSummary] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[ExtractedDocumentSummary]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedDocumentSummary] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(ExtractiveSummarizationResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class ExtractiveSummarizationTask(msrest.serialization.Model): + """ExtractiveSummarizationTask. + + :ivar parameters: + :vartype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'ExtractiveSummarizationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(ExtractiveSummarizationTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class ExtractiveSummarizationTaskParameters(msrest.serialization.Model): + """ExtractiveSummarizationTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + :ivar sentence_count: + :vartype sentence_count: int + :ivar sort_by: Possible values include: "Offset", "Rank". Default value: "Offset". + :vartype sort_by: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParametersSortBy + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + 'sentence_count': {'key': 'sentenceCount', 'type': 'int'}, + 'sort_by': {'key': 'sortBy', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + :keyword sentence_count: + :paramtype sentence_count: int + :keyword sort_by: Possible values include: "Offset", "Rank". Default value: "Offset". + :paramtype sort_by: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParametersSortBy + """ + super(ExtractiveSummarizationTaskParameters, self).__init__(**kwargs) + self.model_version = kwargs.get('model_version', "latest") + self.logging_opt_out = kwargs.get('logging_opt_out', False) + self.string_index_type = kwargs.get('string_index_type', None) + self.sentence_count = kwargs.get('sentence_count', 3) + self.sort_by = kwargs.get('sort_by', "Offset") + + +class ExtractiveSummarizationTaskResult(msrest.serialization.Model): + """ExtractiveSummarizationTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'ExtractiveSummarizationResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult + """ + super(ExtractiveSummarizationTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class HealthcareAssertion(msrest.serialization.Model): + """HealthcareAssertion. + + :ivar conditionality: Describes any conditionality on the entity. Possible values include: + "hypothetical", "conditional". + :vartype conditionality: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Conditionality + :ivar certainty: Describes the entities certainty and polarity. Possible values include: + "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". + :vartype certainty: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Certainty + :ivar association: Describes if the entity is the subject of the text or if it describes + someone else. Possible values include: "subject", "other". + :vartype association: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Association + """ + + _attribute_map = { + 'conditionality': {'key': 'conditionality', 'type': 'str'}, + 'certainty': {'key': 'certainty', 'type': 'str'}, + 'association': {'key': 'association', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword conditionality: Describes any conditionality on the entity. Possible values include: + "hypothetical", "conditional". + :paramtype conditionality: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Conditionality + :keyword certainty: Describes the entities certainty and polarity. Possible values include: + "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". + :paramtype certainty: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Certainty + :keyword association: Describes if the entity is the subject of the text or if it describes + someone else. Possible values include: "subject", "other". + :paramtype association: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Association + """ + super(HealthcareAssertion, self).__init__(**kwargs) + self.conditionality = kwargs.get('conditionality', None) + self.certainty = kwargs.get('certainty', None) + self.association = kwargs.get('association', None) + + +class HealthcareLinkingProperties(msrest.serialization.Model): + """HealthcareLinkingProperties. + + :ivar assertion: + :vartype assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion + :ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :vartype name: str + :ivar links: Entity references in known data sources. + :vartype links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] + """ + + _attribute_map = { + 'assertion': {'key': 'assertion', 'type': 'HealthcareAssertion'}, + 'name': {'key': 'name', 'type': 'str'}, + 'links': {'key': 'links', 'type': '[HealthcareEntityLink]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword assertion: + :paramtype assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion + :keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :paramtype name: str + :keyword links: Entity references in known data sources. + :paramtype links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] + """ + super(HealthcareLinkingProperties, self).__init__(**kwargs) + self.assertion = kwargs.get('assertion', None) + self.name = kwargs.get('name', None) + self.links = kwargs.get('links', None) + + +class HealthcareEntityProperties(msrest.serialization.Model): + """HealthcareEntityProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :vartype category: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' + values can affect the offset returned. + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values + can affect the length returned. + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float + """ + + _validation = { + 'text': {'required': True}, + 'category': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'subcategory': {'key': 'subcategory', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :paramtype category: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ + super(HealthcareEntityProperties, self).__init__(**kwargs) + self.text = kwargs['text'] + self.category = kwargs['category'] + self.subcategory = kwargs.get('subcategory', None) + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.confidence_score = kwargs['confidence_score'] + + +class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): + """HealthcareEntity. + + All required parameters must be populated in order to send to Azure. + + :ivar assertion: + :vartype assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion + :ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :vartype name: str + :ivar links: Entity references in known data sources. + :vartype links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :vartype category: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' + values can affect the offset returned. + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values + can affect the length returned. + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float + """ + + _validation = { + 'text': {'required': True}, + 'category': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'assertion': {'key': 'assertion', 'type': 'HealthcareAssertion'}, + 'name': {'key': 'name', 'type': 'str'}, + 'links': {'key': 'links', 'type': '[HealthcareEntityLink]'}, + 'text': {'key': 'text', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'subcategory': {'key': 'subcategory', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword assertion: + :paramtype assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion + :keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :paramtype name: str + :keyword links: Entity references in known data sources. + :paramtype links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :paramtype category: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ + super(HealthcareEntity, self).__init__(**kwargs) + self.assertion = kwargs.get('assertion', None) + self.name = kwargs.get('name', None) + self.links = kwargs.get('links', None) + self.text = kwargs['text'] + self.category = kwargs['category'] + self.subcategory = kwargs.get('subcategory', None) + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.confidence_score = kwargs['confidence_score'] + + +class HealthcareEntityLink(msrest.serialization.Model): + """HealthcareEntityLink. + + All required parameters must be populated in order to send to Azure. + + :ivar data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. + :vartype data_source: str + :ivar id: Required. Entity id in the given source catalog. + :vartype id: str + """ + + _validation = { + 'data_source': {'required': True}, + 'id': {'required': True}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. + :paramtype data_source: str + :keyword id: Required. Entity id in the given source catalog. + :paramtype id: str + """ + super(HealthcareEntityLink, self).__init__(**kwargs) + self.data_source = kwargs['data_source'] + self.id = kwargs['id'] + + +class HealthcareTaskResult(msrest.serialization.Model): + """HealthcareTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'HealthcareResult'}, + 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + """ + super(HealthcareTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.errors = kwargs.get('errors', None) + + +class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): + """HealthcareJobState. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :ivar next_link: + :vartype next_link: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'created_date_time': {'required': True}, + 'job_id': {'required': True}, + 'last_update_date_time': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'HealthcareResult'}, + 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :keyword next_link: + :paramtype next_link: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(HealthcareJobState, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.errors = kwargs.get('errors', None) + self.next_link = kwargs.get('next_link', None) + self.results = kwargs.get('results', None) + self.errors = kwargs.get('errors', None) + self.created_date_time = kwargs['created_date_time'] + self.expiration_date_time = kwargs.get('expiration_date_time', None) + self.job_id = kwargs['job_id'] + self.last_update_date_time = kwargs['last_update_date_time'] + self.status = kwargs['status'] + self.next_link = kwargs.get('next_link', None) + self.created_date_time = kwargs['created_date_time'] + self.expiration_date_time = kwargs.get('expiration_date_time', None) + self.job_id = kwargs['job_id'] + self.last_update_date_time = kwargs['last_update_date_time'] + self.status = kwargs['status'] + + +class HealthcareRelation(msrest.serialization.Model): + """Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context. + + All required parameters must be populated in order to send to Azure. + + :ivar relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or + 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", + "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", + "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", + "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", + "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", + "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". + :vartype relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.RelationType + :ivar entities: Required. The entities in the relation. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelationEntity] + """ + + _validation = { + 'relation_type': {'required': True}, + 'entities': {'required': True}, + } + + _attribute_map = { + 'relation_type': {'key': 'relationType', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[HealthcareRelationEntity]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or + 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", + "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", + "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", + "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", + "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", + "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". + :paramtype relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.RelationType + :keyword entities: Required. The entities in the relation. + :paramtype entities: + list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelationEntity] + """ + super(HealthcareRelation, self).__init__(**kwargs) + self.relation_type = kwargs['relation_type'] + self.entities = kwargs['entities'] + + +class HealthcareRelationEntity(msrest.serialization.Model): + """HealthcareRelationEntity. + + All required parameters must be populated in order to send to Azure. + + :ivar ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment + Identifier Representation), pointing to the entity . + :vartype ref: str + :ivar role: Required. Role of entity in the relationship. For example: 'CD20-positive diffuse + large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 + (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). + :vartype role: str + """ + + _validation = { + 'ref': {'required': True}, + 'role': {'required': True}, + } + + _attribute_map = { + 'ref': {'key': 'ref', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment + Identifier Representation), pointing to the entity . + :paramtype ref: str + :keyword role: Required. Role of entity in the relationship. For example: 'CD20-positive + diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: + CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). + :paramtype role: str + """ + super(HealthcareRelationEntity, self).__init__(**kwargs) + self.ref = kwargs['ref'] + self.role = kwargs['role'] + + +class HealthcareResult(msrest.serialization.Model): + """HealthcareResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentHealthcareEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentHealthcareEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentHealthcareEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(HealthcareResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class InnerError(msrest.serialization.Model): + """InnerError. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". + :vartype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.InnerErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar details: Error details. + :vartype details: dict[str, str] + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '{str}'}, + 'target': {'key': 'target', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". + :paramtype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.InnerErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword details: Error details. + :paramtype details: dict[str, str] + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError + """ + super(InnerError, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.details = kwargs.get('details', None) + self.target = kwargs.get('target', None) + self.innererror = kwargs.get('innererror', None) + + +class JobManifestTasks(msrest.serialization.Model): + """The set of tasks to execute on the input documents. Cannot specify the same task more than once. + + :ivar entity_recognition_tasks: + :vartype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTask] + :ivar entity_recognition_pii_tasks: + :vartype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiTask] + :ivar key_phrase_extraction_tasks: + :vartype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTask] + :ivar entity_linking_tasks: + :vartype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTask] + :ivar sentiment_analysis_tasks: + :vartype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTask] + :ivar extractive_summarization_tasks: + :vartype extractive_summarization_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTask] + :ivar custom_entity_recognition_tasks: + :vartype custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTask] + :ivar custom_single_classification_tasks: + :vartype custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTask] + :ivar custom_multi_classification_tasks: + :vartype custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTask] + """ + + _attribute_map = { + 'entity_recognition_tasks': {'key': 'entityRecognitionTasks', 'type': '[EntitiesTask]'}, + 'entity_recognition_pii_tasks': {'key': 'entityRecognitionPiiTasks', 'type': '[PiiTask]'}, + 'key_phrase_extraction_tasks': {'key': 'keyPhraseExtractionTasks', 'type': '[KeyPhrasesTask]'}, + 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[EntityLinkingTask]'}, + 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[SentimentAnalysisTask]'}, + 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[ExtractiveSummarizationTask]'}, + 'custom_entity_recognition_tasks': {'key': 'customEntityRecognitionTasks', 'type': '[CustomEntitiesTask]'}, + 'custom_single_classification_tasks': {'key': 'customSingleClassificationTasks', 'type': '[CustomSingleClassificationTask]'}, + 'custom_multi_classification_tasks': {'key': 'customMultiClassificationTasks', 'type': '[CustomMultiClassificationTask]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword entity_recognition_tasks: + :paramtype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTask] + :keyword entity_recognition_pii_tasks: + :paramtype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiTask] + :keyword key_phrase_extraction_tasks: + :paramtype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTask] + :keyword entity_linking_tasks: + :paramtype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTask] + :keyword sentiment_analysis_tasks: + :paramtype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTask] + :keyword extractive_summarization_tasks: + :paramtype extractive_summarization_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTask] + :keyword custom_entity_recognition_tasks: + :paramtype custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTask] + :keyword custom_single_classification_tasks: + :paramtype custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTask] + :keyword custom_multi_classification_tasks: + :paramtype custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTask] + """ + super(JobManifestTasks, self).__init__(**kwargs) + self.entity_recognition_tasks = kwargs.get('entity_recognition_tasks', None) + self.entity_recognition_pii_tasks = kwargs.get('entity_recognition_pii_tasks', None) + self.key_phrase_extraction_tasks = kwargs.get('key_phrase_extraction_tasks', None) + self.entity_linking_tasks = kwargs.get('entity_linking_tasks', None) + self.sentiment_analysis_tasks = kwargs.get('sentiment_analysis_tasks', None) + self.extractive_summarization_tasks = kwargs.get('extractive_summarization_tasks', None) + self.custom_entity_recognition_tasks = kwargs.get('custom_entity_recognition_tasks', None) + self.custom_single_classification_tasks = kwargs.get('custom_single_classification_tasks', None) + self.custom_multi_classification_tasks = kwargs.get('custom_multi_classification_tasks', None) + + +class KeyPhraseResult(msrest.serialization.Model): + """KeyPhraseResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentKeyPhrases] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentKeyPhrases]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentKeyPhrases] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(KeyPhraseResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class KeyPhrasesTask(msrest.serialization.Model): + """KeyPhrasesTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'KeyPhrasesTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(KeyPhrasesTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class KeyPhrasesTaskParameters(msrest.serialization.Model): + """KeyPhrasesTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + """ + super(KeyPhrasesTaskParameters, self).__init__(**kwargs) + self.model_version = kwargs.get('model_version', "latest") + self.logging_opt_out = kwargs.get('logging_opt_out', False) + + +class KeyPhraseTaskResult(msrest.serialization.Model): + """KeyPhraseTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'KeyPhraseResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult + """ + super(KeyPhraseTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class LanguageBatchInput(msrest.serialization.Model): + """LanguageBatchInput. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] + """ + + _validation = { + 'documents': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[LanguageInput]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] + """ + super(LanguageBatchInput, self).__init__(**kwargs) + self.documents = kwargs['documents'] + + +class LanguageInput(msrest.serialization.Model): + """LanguageInput. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. + :vartype text: str + :ivar country_hint: + :vartype country_hint: str + """ + + _validation = { + 'id': {'required': True}, + 'text': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'country_hint': {'key': 'countryHint', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. + :paramtype text: str + :keyword country_hint: + :paramtype country_hint: str + """ + super(LanguageInput, self).__init__(**kwargs) + self.id = kwargs['id'] + self.text = kwargs['text'] + self.country_hint = kwargs.get('country_hint', None) + + +class LanguageResult(msrest.serialization.Model): + """LanguageResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLanguage] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentLanguage]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLanguage] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(LanguageResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class LinkedEntity(msrest.serialization.Model): + """LinkedEntity. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Entity Linking formal name. + :vartype name: str + :ivar matches: Required. List of instances this entity appears in the text. + :vartype matches: list[~azure.ai.textanalytics.v3_2_preview_2.models.Match] + :ivar language: Required. Language used in the data source. + :vartype language: str + :ivar id: Unique identifier of the recognized entity from the data source. + :vartype id: str + :ivar url: Required. URL for the entity's page from the data source. + :vartype url: str + :ivar data_source: Required. Data source used to extract entity linking, such as Wiki/Bing etc. + :vartype data_source: str + :ivar bing_id: Bing Entity Search API unique identifier of the recognized entity. + :vartype bing_id: str + """ + + _validation = { + 'name': {'required': True}, + 'matches': {'required': True}, + 'language': {'required': True}, + 'url': {'required': True}, + 'data_source': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'matches': {'key': 'matches', 'type': '[Match]'}, + 'language': {'key': 'language', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'bing_id': {'key': 'bingId', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. Entity Linking formal name. + :paramtype name: str + :keyword matches: Required. List of instances this entity appears in the text. + :paramtype matches: list[~azure.ai.textanalytics.v3_2_preview_2.models.Match] + :keyword language: Required. Language used in the data source. + :paramtype language: str + :keyword id: Unique identifier of the recognized entity from the data source. + :paramtype id: str + :keyword url: Required. URL for the entity's page from the data source. + :paramtype url: str + :keyword data_source: Required. Data source used to extract entity linking, such as Wiki/Bing + etc. + :paramtype data_source: str + :keyword bing_id: Bing Entity Search API unique identifier of the recognized entity. + :paramtype bing_id: str + """ + super(LinkedEntity, self).__init__(**kwargs) + self.name = kwargs['name'] + self.matches = kwargs['matches'] + self.language = kwargs['language'] + self.id = kwargs.get('id', None) + self.url = kwargs['url'] + self.data_source = kwargs['data_source'] + self.bing_id = kwargs.get('bing_id', None) + + +class Match(msrest.serialization.Model): + """Match. + + All required parameters must be populated in order to send to Azure. + + :ivar confidence_score: Required. If a well known item is recognized, a decimal number denoting + the confidence level between 0 and 1 will be returned. + :vartype confidence_score: float + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar offset: Required. Start position for the entity match text. + :vartype offset: int + :ivar length: Required. Length for the entity match text. + :vartype length: int + """ + + _validation = { + 'confidence_score': {'required': True}, + 'text': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'text': {'key': 'text', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword confidence_score: Required. If a well known item is recognized, a decimal number + denoting the confidence level between 0 and 1 will be returned. + :paramtype confidence_score: float + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword offset: Required. Start position for the entity match text. + :paramtype offset: int + :keyword length: Required. Length for the entity match text. + :paramtype length: int + """ + super(Match, self).__init__(**kwargs) + self.confidence_score = kwargs['confidence_score'] + self.text = kwargs['text'] + self.offset = kwargs['offset'] + self.length = kwargs['length'] + + +class MultiClassificationDocument(msrest.serialization.Model): + """MultiClassificationDocument. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar classifications: Required. Recognized classification results in the document. + :vartype classifications: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'classifications': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'classifications': {'key': 'classifications', 'type': '[ClassificationResult]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword classifications: Required. Recognized classification results in the document. + :paramtype classifications: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(MultiClassificationDocument, self).__init__(**kwargs) + self.id = kwargs['id'] + self.classifications = kwargs['classifications'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class MultiLanguageBatchInput(msrest.serialization.Model): + """Contains a set of input documents to be analyzed by the service. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. The set of documents to process as part of this batch. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] + """ + + _validation = { + 'documents': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[MultiLanguageInput]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. The set of documents to process as part of this batch. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] + """ + super(MultiLanguageBatchInput, self).__init__(**kwargs) + self.documents = kwargs['documents'] + + +class MultiLanguageInput(msrest.serialization.Model): + """Contains an input document to be analyzed by the service. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. A unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. The input text to process. + :vartype text: str + :ivar language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :vartype language: str + """ + + _validation = { + 'id': {'required': True}, + 'text': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. A unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. The input text to process. + :paramtype text: str + :keyword language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + """ + super(MultiLanguageInput, self).__init__(**kwargs) + self.id = kwargs['id'] + self.text = kwargs['text'] + self.language = kwargs.get('language', None) + + +class PiiDocumentEntities(msrest.serialization.Model): + """PiiDocumentEntities. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar redacted_text: Required. Returns redacted text. + :vartype redacted_text: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'redacted_text': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'redacted_text': {'key': 'redactedText', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[Entity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword redacted_text: Required. Returns redacted text. + :paramtype redacted_text: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(PiiDocumentEntities, self).__init__(**kwargs) + self.id = kwargs['id'] + self.redacted_text = kwargs['redacted_text'] + self.entities = kwargs['entities'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class PiiResult(msrest.serialization.Model): + """PiiResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiDocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[PiiDocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiDocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(PiiResult, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class PiiTask(msrest.serialization.Model): + """PiiTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'PiiTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(PiiTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class PiiTaskParameters(msrest.serialization.Model): + """PiiTaskParameters. + + :ivar domain: Possible values include: "phi", "none". Default value: "none". + :vartype domain: str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParametersDomain + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar pii_categories: (Optional) describes the PII categories to return. + :vartype pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _validation = { + 'pii_categories': {'unique': True}, + } + + _attribute_map = { + 'domain': {'key': 'domain', 'type': 'str'}, + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'pii_categories': {'key': 'piiCategories', 'type': '[str]'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword domain: Possible values include: "phi", "none". Default value: "none". + :paramtype domain: str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParametersDomain + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword pii_categories: (Optional) describes the PII categories to return. + :paramtype pii_categories: list[str or + ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(PiiTaskParameters, self).__init__(**kwargs) + self.domain = kwargs.get('domain', "none") + self.model_version = kwargs.get('model_version', "latest") + self.logging_opt_out = kwargs.get('logging_opt_out', True) + self.pii_categories = kwargs.get('pii_categories', None) + self.string_index_type = kwargs.get('string_index_type', None) + + +class PiiTaskResult(msrest.serialization.Model): + """PiiTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'PiiResult'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult + """ + super(PiiTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class RequestStatistics(msrest.serialization.Model): + """if showStats=true was specified in the request this field will contain information about the request payload. + + All required parameters must be populated in order to send to Azure. + + :ivar documents_count: Required. Number of documents submitted in the request. + :vartype documents_count: int + :ivar valid_documents_count: Required. Number of valid documents. This excludes empty, + over-size limit or non-supported languages documents. + :vartype valid_documents_count: int + :ivar erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :vartype erroneous_documents_count: int + :ivar transactions_count: Required. Number of transactions for the request. + :vartype transactions_count: long + """ + + _validation = { + 'documents_count': {'required': True}, + 'valid_documents_count': {'required': True}, + 'erroneous_documents_count': {'required': True}, + 'transactions_count': {'required': True}, + } + + _attribute_map = { + 'documents_count': {'key': 'documentsCount', 'type': 'int'}, + 'valid_documents_count': {'key': 'validDocumentsCount', 'type': 'int'}, + 'erroneous_documents_count': {'key': 'erroneousDocumentsCount', 'type': 'int'}, + 'transactions_count': {'key': 'transactionsCount', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents_count: Required. Number of documents submitted in the request. + :paramtype documents_count: int + :keyword valid_documents_count: Required. Number of valid documents. This excludes empty, + over-size limit or non-supported languages documents. + :paramtype valid_documents_count: int + :keyword erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :paramtype erroneous_documents_count: int + :keyword transactions_count: Required. Number of transactions for the request. + :paramtype transactions_count: long + """ + super(RequestStatistics, self).__init__(**kwargs) + self.documents_count = kwargs['documents_count'] + self.valid_documents_count = kwargs['valid_documents_count'] + self.erroneous_documents_count = kwargs['erroneous_documents_count'] + self.transactions_count = kwargs['transactions_count'] + + +class SentenceAssessment(msrest.serialization.Model): + """SentenceAssessment. + + All required parameters must be populated in order to send to Azure. + + :ivar sentiment: Required. Assessment sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :vartype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue + :ivar confidence_scores: Required. Assessment sentiment confidence scores in the sentence. + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel + :ivar offset: Required. The assessment offset from the start of the sentence. + :vartype offset: int + :ivar length: Required. The length of the assessment. + :vartype length: int + :ivar text: Required. The assessment text detected. + :vartype text: str + :ivar is_negated: Required. The indicator representing if the assessment is negated. + :vartype is_negated: bool + """ + + _validation = { + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'text': {'required': True}, + 'is_negated': {'required': True}, + } + + _attribute_map = { + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'TargetConfidenceScoreLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'is_negated': {'key': 'isNegated', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword sentiment: Required. Assessment sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue + :keyword confidence_scores: Required. Assessment sentiment confidence scores in the sentence. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel + :keyword offset: Required. The assessment offset from the start of the sentence. + :paramtype offset: int + :keyword length: Required. The length of the assessment. + :paramtype length: int + :keyword text: Required. The assessment text detected. + :paramtype text: str + :keyword is_negated: Required. The indicator representing if the assessment is negated. + :paramtype is_negated: bool + """ + super(SentenceAssessment, self).__init__(**kwargs) + self.sentiment = kwargs['sentiment'] + self.confidence_scores = kwargs['confidence_scores'] + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.text = kwargs['text'] + self.is_negated = kwargs['is_negated'] + + +class SentenceSentiment(msrest.serialization.Model): + """SentenceSentiment. + + All required parameters must be populated in order to send to Azure. + + :ivar text: Required. The sentence text. + :vartype text: str + :ivar sentiment: Required. The predicted Sentiment for the sentence. Possible values include: + "positive", "neutral", "negative". + :vartype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentimentValue + :ivar confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel + :ivar offset: Required. The sentence offset from the start of the document. + :vartype offset: int + :ivar length: Required. The length of the sentence. + :vartype length: int + :ivar targets: The array of sentence targets for the sentence. + :vartype targets: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceTarget] + :ivar assessments: The array of assessments for the sentence. + :vartype assessments: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceAssessment] + """ + + _validation = { + 'text': {'required': True}, + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'targets': {'key': 'targets', 'type': '[SentenceTarget]'}, + 'assessments': {'key': 'assessments', 'type': '[SentenceAssessment]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword text: Required. The sentence text. + :paramtype text: str + :keyword sentiment: Required. The predicted Sentiment for the sentence. Possible values + include: "positive", "neutral", "negative". + :paramtype sentiment: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentimentValue + :keyword confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel + :keyword offset: Required. The sentence offset from the start of the document. + :paramtype offset: int + :keyword length: Required. The length of the sentence. + :paramtype length: int + :keyword targets: The array of sentence targets for the sentence. + :paramtype targets: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceTarget] + :keyword assessments: The array of assessments for the sentence. + :paramtype assessments: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceAssessment] + """ + super(SentenceSentiment, self).__init__(**kwargs) + self.text = kwargs['text'] + self.sentiment = kwargs['sentiment'] + self.confidence_scores = kwargs['confidence_scores'] + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.targets = kwargs.get('targets', None) + self.assessments = kwargs.get('assessments', None) + + +class SentenceTarget(msrest.serialization.Model): + """SentenceTarget. + + All required parameters must be populated in order to send to Azure. + + :ivar sentiment: Required. Targeted sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :vartype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue + :ivar confidence_scores: Required. Target sentiment confidence scores for the target in the + sentence. + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel + :ivar offset: Required. The target offset from the start of the sentence. + :vartype offset: int + :ivar length: Required. The length of the target. + :vartype length: int + :ivar text: Required. The target text detected. + :vartype text: str + :ivar relations: Required. The array of either assessment or target objects which is related to + the target. + :vartype relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelation] + """ + + _validation = { + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'text': {'required': True}, + 'relations': {'required': True}, + } + + _attribute_map = { + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'TargetConfidenceScoreLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'relations': {'key': 'relations', 'type': '[TargetRelation]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword sentiment: Required. Targeted sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue + :keyword confidence_scores: Required. Target sentiment confidence scores for the target in the + sentence. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel + :keyword offset: Required. The target offset from the start of the sentence. + :paramtype offset: int + :keyword length: Required. The length of the target. + :paramtype length: int + :keyword text: Required. The target text detected. + :paramtype text: str + :keyword relations: Required. The array of either assessment or target objects which is related + to the target. + :paramtype relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelation] + """ + super(SentenceTarget, self).__init__(**kwargs) + self.sentiment = kwargs['sentiment'] + self.confidence_scores = kwargs['confidence_scores'] + self.offset = kwargs['offset'] + self.length = kwargs['length'] + self.text = kwargs['text'] + self.relations = kwargs['relations'] + + +class SentimentAnalysisTask(msrest.serialization.Model): + """SentimentAnalysisTask. + + :ivar parameters: + :vartype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'SentimentAnalysisTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(SentimentAnalysisTask, self).__init__(**kwargs) + self.parameters = kwargs.get('parameters', None) + self.task_name = kwargs.get('task_name', None) + + +class SentimentAnalysisTaskParameters(msrest.serialization.Model): + """SentimentAnalysisTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar opinion_mining: + :vartype opinion_mining: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'opinion_mining': {'key': 'opinionMining', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword opinion_mining: + :paramtype opinion_mining: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(SentimentAnalysisTaskParameters, self).__init__(**kwargs) + self.model_version = kwargs.get('model_version', "latest") + self.logging_opt_out = kwargs.get('logging_opt_out', False) + self.opinion_mining = kwargs.get('opinion_mining', False) + self.string_index_type = kwargs.get('string_index_type', None) + + +class SentimentConfidenceScorePerLabel(msrest.serialization.Model): + """Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. + + All required parameters must be populated in order to send to Azure. + + :ivar positive: Required. + :vartype positive: float + :ivar neutral: Required. + :vartype neutral: float + :ivar negative: Required. + :vartype negative: float + """ + + _validation = { + 'positive': {'required': True}, + 'neutral': {'required': True}, + 'negative': {'required': True}, + } + + _attribute_map = { + 'positive': {'key': 'positive', 'type': 'float'}, + 'neutral': {'key': 'neutral', 'type': 'float'}, + 'negative': {'key': 'negative', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword neutral: Required. + :paramtype neutral: float + :keyword negative: Required. + :paramtype negative: float + """ + super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) + self.positive = kwargs['positive'] + self.neutral = kwargs['neutral'] + self.negative = kwargs['negative'] + + +class SentimentResponse(msrest.serialization.Model): + """SentimentResponse. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Sentiment analysis per document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentiment] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentSentiment]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword documents: Required. Sentiment analysis per document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentiment] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(SentimentResponse, self).__init__(**kwargs) + self.documents = kwargs['documents'] + self.errors = kwargs['errors'] + self.statistics = kwargs.get('statistics', None) + self.model_version = kwargs['model_version'] + + +class SentimentTaskResult(msrest.serialization.Model): + """SentimentTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'SentimentResponse'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse + """ + super(SentimentTaskResult, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + + +class SingleClassificationDocument(msrest.serialization.Model): + """SingleClassificationDocument. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar classification: Required. + :vartype classification: ~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'classification': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'classification': {'key': 'classification', 'type': 'ClassificationResult'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword classification: Required. + :paramtype classification: ~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(SingleClassificationDocument, self).__init__(**kwargs) + self.id = kwargs['id'] + self.classification = kwargs['classification'] + self.warnings = kwargs['warnings'] + self.statistics = kwargs.get('statistics', None) + + +class TargetConfidenceScoreLabel(msrest.serialization.Model): + """Represents the confidence scores across all sentiment classes: positive, neutral, negative. + + All required parameters must be populated in order to send to Azure. + + :ivar positive: Required. + :vartype positive: float + :ivar negative: Required. + :vartype negative: float + """ + + _validation = { + 'positive': {'required': True}, + 'negative': {'required': True}, + } + + _attribute_map = { + 'positive': {'key': 'positive', 'type': 'float'}, + 'negative': {'key': 'negative', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword negative: Required. + :paramtype negative: float + """ + super(TargetConfidenceScoreLabel, self).__init__(**kwargs) + self.positive = kwargs['positive'] + self.negative = kwargs['negative'] + + +class TargetRelation(msrest.serialization.Model): + """TargetRelation. + + All required parameters must be populated in order to send to Azure. + + :ivar relation_type: Required. The type related to the target. Possible values include: + "assessment", "target". + :vartype relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelationType + :ivar ref: Required. The JSON pointer indicating the linked object. + :vartype ref: str + """ + + _validation = { + 'relation_type': {'required': True}, + 'ref': {'required': True}, + } + + _attribute_map = { + 'relation_type': {'key': 'relationType', 'type': 'str'}, + 'ref': {'key': 'ref', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword relation_type: Required. The type related to the target. Possible values include: + "assessment", "target". + :paramtype relation_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelationType + :keyword ref: Required. The JSON pointer indicating the linked object. + :paramtype ref: str + """ + super(TargetRelation, self).__init__(**kwargs) + self.relation_type = kwargs['relation_type'] + self.ref = kwargs['ref'] + + +class TasksStateTasks(msrest.serialization.Model): + """TasksStateTasks. + + All required parameters must be populated in order to send to Azure. + + :ivar completed: Required. + :vartype completed: int + :ivar failed: Required. + :vartype failed: int + :ivar in_progress: Required. + :vartype in_progress: int + :ivar total: Required. + :vartype total: int + :ivar entity_recognition_tasks: + :vartype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionTasksItem] + :ivar entity_recognition_pii_tasks: + :vartype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionPiiTasksItem] + :ivar key_phrase_extraction_tasks: + :vartype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksKeyPhraseExtractionTasksItem] + :ivar entity_linking_tasks: + :vartype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityLinkingTasksItem] + :ivar sentiment_analysis_tasks: + :vartype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksSentimentAnalysisTasksItem] + :ivar extractive_summarization_tasks: + :vartype extractive_summarization_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksExtractiveSummarizationTasksItem] + :ivar custom_entity_recognition_tasks: + :vartype custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomEntityRecognitionTasksItem] + :ivar custom_single_classification_tasks: + :vartype custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomSingleClassificationTasksItem] + :ivar custom_multi_classification_tasks: + :vartype custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomMultiClassificationTasksItem] + """ + + _validation = { + 'completed': {'required': True}, + 'failed': {'required': True}, + 'in_progress': {'required': True}, + 'total': {'required': True}, + } + + _attribute_map = { + 'completed': {'key': 'completed', 'type': 'int'}, + 'failed': {'key': 'failed', 'type': 'int'}, + 'in_progress': {'key': 'inProgress', 'type': 'int'}, + 'total': {'key': 'total', 'type': 'int'}, + 'entity_recognition_tasks': {'key': 'entityRecognitionTasks', 'type': '[TasksStateTasksEntityRecognitionTasksItem]'}, + 'entity_recognition_pii_tasks': {'key': 'entityRecognitionPiiTasks', 'type': '[TasksStateTasksEntityRecognitionPiiTasksItem]'}, + 'key_phrase_extraction_tasks': {'key': 'keyPhraseExtractionTasks', 'type': '[TasksStateTasksKeyPhraseExtractionTasksItem]'}, + 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[TasksStateTasksEntityLinkingTasksItem]'}, + 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[TasksStateTasksSentimentAnalysisTasksItem]'}, + 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[TasksStateTasksExtractiveSummarizationTasksItem]'}, + 'custom_entity_recognition_tasks': {'key': 'customEntityRecognitionTasks', 'type': '[TasksStateTasksCustomEntityRecognitionTasksItem]'}, + 'custom_single_classification_tasks': {'key': 'customSingleClassificationTasks', 'type': '[TasksStateTasksCustomSingleClassificationTasksItem]'}, + 'custom_multi_classification_tasks': {'key': 'customMultiClassificationTasks', 'type': '[TasksStateTasksCustomMultiClassificationTasksItem]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword completed: Required. + :paramtype completed: int + :keyword failed: Required. + :paramtype failed: int + :keyword in_progress: Required. + :paramtype in_progress: int + :keyword total: Required. + :paramtype total: int + :keyword entity_recognition_tasks: + :paramtype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionTasksItem] + :keyword entity_recognition_pii_tasks: + :paramtype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionPiiTasksItem] + :keyword key_phrase_extraction_tasks: + :paramtype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksKeyPhraseExtractionTasksItem] + :keyword entity_linking_tasks: + :paramtype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityLinkingTasksItem] + :keyword sentiment_analysis_tasks: + :paramtype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksSentimentAnalysisTasksItem] + :keyword extractive_summarization_tasks: + :paramtype extractive_summarization_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksExtractiveSummarizationTasksItem] + :keyword custom_entity_recognition_tasks: + :paramtype custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomEntityRecognitionTasksItem] + :keyword custom_single_classification_tasks: + :paramtype custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomSingleClassificationTasksItem] + :keyword custom_multi_classification_tasks: + :paramtype custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomMultiClassificationTasksItem] + """ + super(TasksStateTasks, self).__init__(**kwargs) + self.completed = kwargs['completed'] + self.failed = kwargs['failed'] + self.in_progress = kwargs['in_progress'] + self.total = kwargs['total'] + self.entity_recognition_tasks = kwargs.get('entity_recognition_tasks', None) + self.entity_recognition_pii_tasks = kwargs.get('entity_recognition_pii_tasks', None) + self.key_phrase_extraction_tasks = kwargs.get('key_phrase_extraction_tasks', None) + self.entity_linking_tasks = kwargs.get('entity_linking_tasks', None) + self.sentiment_analysis_tasks = kwargs.get('sentiment_analysis_tasks', None) + self.extractive_summarization_tasks = kwargs.get('extractive_summarization_tasks', None) + self.custom_entity_recognition_tasks = kwargs.get('custom_entity_recognition_tasks', None) + self.custom_single_classification_tasks = kwargs.get('custom_single_classification_tasks', None) + self.custom_multi_classification_tasks = kwargs.get('custom_multi_classification_tasks', None) + + +class TaskState(msrest.serialization.Model): + """TaskState. + + All required parameters must be populated in order to send to Azure. + + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TaskState, self).__init__(**kwargs) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksCustomEntityRecognitionTasksItem(TaskState, CustomEntitiesTaskResult): + """TasksStateTasksCustomEntityRecognitionTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomEntitiesResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksCustomEntityRecognitionTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksCustomMultiClassificationTasksItem(TaskState, CustomMultiClassificationTaskResult): + """TasksStateTasksCustomMultiClassificationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomMultiClassificationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksCustomMultiClassificationTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksCustomSingleClassificationTasksItem(TaskState, CustomSingleClassificationTaskResult): + """TasksStateTasksCustomSingleClassificationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomSingleClassificationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksCustomSingleClassificationTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult): + """TasksStateTasksEntityLinkingTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'EntityLinkingResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksEntityLinkingTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult): + """TasksStateTasksEntityRecognitionPiiTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'PiiResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksEntityRecognitionPiiTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult): + """TasksStateTasksEntityRecognitionTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'EntitiesResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksEntityRecognitionTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksExtractiveSummarizationTasksItem(TaskState, ExtractiveSummarizationTaskResult): + """TasksStateTasksExtractiveSummarizationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'ExtractiveSummarizationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksExtractiveSummarizationTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult): + """TasksStateTasksKeyPhraseExtractionTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'KeyPhraseResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksKeyPhraseExtractionTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult): + """TasksStateTasksSentimentAnalysisTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'SentimentResponse'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksSentimentAnalysisTasksItem, self).__init__(**kwargs) + self.results = kwargs.get('results', None) + self.last_update_date_time = kwargs['last_update_date_time'] + self.task_name = kwargs['task_name'] + self.status = kwargs['status'] + + +class TextAnalyticsError(msrest.serialization.Model): + """TextAnalyticsError. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Error code. Possible values include: "InvalidRequest", "InvalidArgument", + "InternalServerError", "ServiceUnavailable", "NotFound". + :vartype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.ErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError + :ivar details: Details about specific errors that led to this reported error. + :vartype details: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'details': {'key': 'details', 'type': '[TextAnalyticsError]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: Required. Error code. Possible values include: "InvalidRequest", + "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". + :paramtype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.ErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError + :keyword details: Details about specific errors that led to this reported error. + :paramtype details: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + """ + super(TextAnalyticsError, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.target = kwargs.get('target', None) + self.innererror = kwargs.get('innererror', None) + self.details = kwargs.get('details', None) + + +class TextAnalyticsWarning(msrest.serialization.Model): + """TextAnalyticsWarning. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :vartype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.WarningCodeValue + :ivar message: Required. Warning message. + :vartype message: str + :ivar target_ref: A JSON pointer reference indicating the target object. + :vartype target_ref: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target_ref': {'key': 'targetRef', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :paramtype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.WarningCodeValue + :keyword message: Required. Warning message. + :paramtype message: str + :keyword target_ref: A JSON pointer reference indicating the target object. + :paramtype target_ref: str + """ + super(TextAnalyticsWarning, self).__init__(**kwargs) + self.code = kwargs['code'] + self.message = kwargs['message'] + self.target_ref = kwargs.get('target_ref', None) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models_py3.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models_py3.py new file mode 100644 index 000000000000..3392037db5bd --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_models_py3.py @@ -0,0 +1,5312 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 datetime +from typing import Dict, List, Optional, Union + +from azure.core.exceptions import HttpResponseError +import msrest.serialization + +from ._text_analytics_client_enums import * + + +class AnalysisInput(msrest.serialization.Model): + """AnalysisInput. + + All required parameters must be populated in order to send to Azure. + + :ivar analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :vartype analysis_input: ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput + """ + + _validation = { + 'analysis_input': {'required': True}, + } + + _attribute_map = { + 'analysis_input': {'key': 'analysisInput', 'type': 'MultiLanguageBatchInput'}, + } + + def __init__( + self, + *, + analysis_input: "MultiLanguageBatchInput", + **kwargs + ): + """ + :keyword analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :paramtype analysis_input: + ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput + """ + super(AnalysisInput, self).__init__(**kwargs) + self.analysis_input = analysis_input + + +class JobManifest(msrest.serialization.Model): + """JobManifest. + + All required parameters must be populated in order to send to Azure. + + :ivar tasks: Required. The set of tasks to execute on the input documents. Cannot specify the + same task more than once. + :vartype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks + """ + + _validation = { + 'tasks': {'required': True}, + } + + _attribute_map = { + 'tasks': {'key': 'tasks', 'type': 'JobManifestTasks'}, + } + + def __init__( + self, + *, + tasks: "JobManifestTasks", + **kwargs + ): + """ + :keyword tasks: Required. The set of tasks to execute on the input documents. Cannot specify + the same task more than once. + :paramtype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks + """ + super(JobManifest, self).__init__(**kwargs) + self.tasks = tasks + + +class JobDescriptor(msrest.serialization.Model): + """JobDescriptor. + + :ivar display_name: Optional display name for the analysis job. + :vartype display_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + **kwargs + ): + """ + :keyword display_name: Optional display name for the analysis job. + :paramtype display_name: str + """ + super(JobDescriptor, self).__init__(**kwargs) + self.display_name = display_name + + +class AnalyzeBatchInput(JobDescriptor, AnalysisInput, JobManifest): + """AnalyzeBatchInput. + + All required parameters must be populated in order to send to Azure. + + :ivar tasks: Required. The set of tasks to execute on the input documents. Cannot specify the + same task more than once. + :vartype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks + :ivar analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :vartype analysis_input: ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput + :ivar display_name: Optional display name for the analysis job. + :vartype display_name: str + """ + + _validation = { + 'tasks': {'required': True}, + 'analysis_input': {'required': True}, + } + + _attribute_map = { + 'tasks': {'key': 'tasks', 'type': 'JobManifestTasks'}, + 'analysis_input': {'key': 'analysisInput', 'type': 'MultiLanguageBatchInput'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + *, + tasks: "JobManifestTasks", + analysis_input: "MultiLanguageBatchInput", + display_name: Optional[str] = None, + **kwargs + ): + """ + :keyword tasks: Required. The set of tasks to execute on the input documents. Cannot specify + the same task more than once. + :paramtype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.JobManifestTasks + :keyword analysis_input: Required. Contains a set of input documents to be analyzed by the + service. + :paramtype analysis_input: + ~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageBatchInput + :keyword display_name: Optional display name for the analysis job. + :paramtype display_name: str + """ + super(AnalyzeBatchInput, self).__init__(display_name=display_name, analysis_input=analysis_input, tasks=tasks, **kwargs) + self.tasks = tasks + self.analysis_input = analysis_input + self.tasks = tasks + self.display_name = display_name + self.analysis_input = analysis_input + self.display_name = display_name + + +class AnalyzeJobDisplayName(msrest.serialization.Model): + """AnalyzeJobDisplayName. + + :ivar display_name: + :vartype display_name: str + """ + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + } + + def __init__( + self, + *, + display_name: Optional[str] = None, + **kwargs + ): + """ + :keyword display_name: + :paramtype display_name: str + """ + super(AnalyzeJobDisplayName, self).__init__(**kwargs) + self.display_name = display_name + + +class AnalyzeJobErrorsAndStatistics(msrest.serialization.Model): + """AnalyzeJobErrorsAndStatistics. + + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + """ + + _attribute_map = { + 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + } + + def __init__( + self, + *, + errors: Optional[List["TextAnalyticsError"]] = None, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + """ + super(AnalyzeJobErrorsAndStatistics, self).__init__(**kwargs) + self.errors = errors + self.statistics = statistics + + +class JobMetadata(msrest.serialization.Model): + """JobMetadata. + + All required parameters must be populated in order to send to Azure. + + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'created_date_time': {'required': True}, + 'job_id': {'required': True}, + 'last_update_date_time': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + created_date_time: datetime.datetime, + job_id: str, + last_update_date_time: datetime.datetime, + status: Union[str, "State"], + expiration_date_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(JobMetadata, self).__init__(**kwargs) + self.created_date_time = created_date_time + self.expiration_date_time = expiration_date_time + self.job_id = job_id + self.last_update_date_time = last_update_date_time + self.status = status + + +class AnalyzeJobMetadata(JobMetadata, AnalyzeJobDisplayName): + """AnalyzeJobMetadata. + + All required parameters must be populated in order to send to Azure. + + :ivar display_name: + :vartype display_name: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'created_date_time': {'required': True}, + 'job_id': {'required': True}, + 'last_update_date_time': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + created_date_time: datetime.datetime, + job_id: str, + last_update_date_time: datetime.datetime, + status: Union[str, "State"], + display_name: Optional[str] = None, + expiration_date_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword display_name: + :paramtype display_name: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(AnalyzeJobMetadata, self).__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, display_name=display_name, **kwargs) + self.display_name = display_name + self.created_date_time = created_date_time + self.expiration_date_time = expiration_date_time + self.job_id = job_id + self.last_update_date_time = last_update_date_time + self.status = status + + +class Pagination(msrest.serialization.Model): + """Pagination. + + :ivar next_link: + :vartype next_link: str + """ + + _attribute_map = { + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + next_link: Optional[str] = None, + **kwargs + ): + """ + :keyword next_link: + :paramtype next_link: str + """ + super(Pagination, self).__init__(**kwargs) + self.next_link = next_link + + +class TasksState(msrest.serialization.Model): + """TasksState. + + All required parameters must be populated in order to send to Azure. + + :ivar tasks: Required. + :vartype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks + """ + + _validation = { + 'tasks': {'required': True}, + } + + _attribute_map = { + 'tasks': {'key': 'tasks', 'type': 'TasksStateTasks'}, + } + + def __init__( + self, + *, + tasks: "TasksStateTasks", + **kwargs + ): + """ + :keyword tasks: Required. + :paramtype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks + """ + super(TasksState, self).__init__(**kwargs) + self.tasks = tasks + + +class AnalyzeJobState(AnalyzeJobMetadata, TasksState, AnalyzeJobErrorsAndStatistics, Pagination): + """AnalyzeJobState. + + All required parameters must be populated in order to send to Azure. + + :ivar next_link: + :vartype next_link: str + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar tasks: Required. + :vartype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks + :ivar display_name: + :vartype display_name: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'tasks': {'required': True}, + 'created_date_time': {'required': True}, + 'job_id': {'required': True}, + 'last_update_date_time': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'next_link': {'key': '@nextLink', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'tasks': {'key': 'tasks', 'type': 'TasksStateTasks'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + tasks: "TasksStateTasks", + created_date_time: datetime.datetime, + job_id: str, + last_update_date_time: datetime.datetime, + status: Union[str, "State"], + next_link: Optional[str] = None, + errors: Optional[List["TextAnalyticsError"]] = None, + statistics: Optional["RequestStatistics"] = None, + display_name: Optional[str] = None, + expiration_date_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword next_link: + :paramtype next_link: str + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword tasks: Required. + :paramtype tasks: ~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasks + :keyword display_name: + :paramtype display_name: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(AnalyzeJobState, self).__init__(display_name=display_name, created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, tasks=tasks, errors=errors, statistics=statistics, next_link=next_link, **kwargs) + self.next_link = next_link + self.errors = errors + self.statistics = statistics + self.tasks = tasks + self.next_link = next_link + self.errors = errors + self.statistics = statistics + self.display_name = display_name + self.created_date_time = created_date_time + self.expiration_date_time = expiration_date_time + self.job_id = job_id + self.last_update_date_time = last_update_date_time + self.status = status + self.next_link = next_link + self.tasks = tasks + self.display_name = display_name + self.created_date_time = created_date_time + self.expiration_date_time = expiration_date_time + self.job_id = job_id + self.last_update_date_time = last_update_date_time + self.status = status + self.errors = errors + self.statistics = statistics + self.tasks = tasks + self.display_name = display_name + self.created_date_time = created_date_time + self.expiration_date_time = expiration_date_time + self.job_id = job_id + self.last_update_date_time = last_update_date_time + self.status = status + + +class ClassificationResult(msrest.serialization.Model): + """ClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :ivar category: Required. Classification type. + :vartype category: str + :ivar confidence_score: Required. Confidence score between 0 and 1 of the recognized + classification. + :vartype confidence_score: float + """ + + _validation = { + 'category': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + *, + category: str, + confidence_score: float, + **kwargs + ): + """ + :keyword category: Required. Classification type. + :paramtype category: str + :keyword confidence_score: Required. Confidence score between 0 and 1 of the recognized + classification. + :paramtype confidence_score: float + """ + super(ClassificationResult, self).__init__(**kwargs) + self.category = category + self.confidence_score = confidence_score + + +class CustomEntitiesResult(msrest.serialization.Model): + """CustomEntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar project_name: Required. This field indicates the project name for the model. + :vartype project_name: str + :ivar deployment_name: Required. This field indicates the deployment name for the model. + :vartype deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentEntities"], + errors: List["DocumentError"], + project_name: str, + deployment_name: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword project_name: Required. This field indicates the project name for the model. + :paramtype project_name: str + :keyword deployment_name: Required. This field indicates the deployment name for the model. + :paramtype deployment_name: str + """ + super(CustomEntitiesResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.project_name = project_name + self.deployment_name = deployment_name + + +class CustomEntitiesTask(msrest.serialization.Model): + """CustomEntitiesTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomEntitiesTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["CustomEntitiesTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(CustomEntitiesTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class CustomEntitiesTaskParameters(msrest.serialization.Model): + """CustomEntitiesTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :ivar project_name: Required. + :vartype project_name: str + :ivar deployment_name: Required. + :vartype deployment_name: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'project-name', 'type': 'str'}, + 'deployment_name': {'key': 'deployment-name', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + *, + project_name: str, + deployment_name: str, + logging_opt_out: Optional[bool] = False, + string_index_type: Optional[Union[str, "StringIndexType"]] = None, + **kwargs + ): + """ + :keyword project_name: Required. + :paramtype project_name: str + :keyword deployment_name: Required. + :paramtype deployment_name: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(CustomEntitiesTaskParameters, self).__init__(**kwargs) + self.project_name = project_name + self.deployment_name = deployment_name + self.logging_opt_out = logging_opt_out + self.string_index_type = string_index_type + + +class CustomEntitiesTaskResult(msrest.serialization.Model): + """CustomEntitiesTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomEntitiesResult'}, + } + + def __init__( + self, + *, + results: Optional["CustomEntitiesResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + """ + super(CustomEntitiesTaskResult, self).__init__(**kwargs) + self.results = results + + +class CustomMultiClassificationResult(msrest.serialization.Model): + """CustomMultiClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiClassificationDocument] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar project_name: Required. This field indicates the project name for the model. + :vartype project_name: str + :ivar deployment_name: Required. This field indicates the deployment name for the model. + :vartype deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[MultiClassificationDocument]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["MultiClassificationDocument"], + errors: List["DocumentError"], + project_name: str, + deployment_name: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiClassificationDocument] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword project_name: Required. This field indicates the project name for the model. + :paramtype project_name: str + :keyword deployment_name: Required. This field indicates the deployment name for the model. + :paramtype deployment_name: str + """ + super(CustomMultiClassificationResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.project_name = project_name + self.deployment_name = deployment_name + + +class CustomMultiClassificationTask(msrest.serialization.Model): + """CustomMultiClassificationTask. + + :ivar parameters: + :vartype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomMultiClassificationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["CustomMultiClassificationTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(CustomMultiClassificationTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class CustomMultiClassificationTaskParameters(msrest.serialization.Model): + """CustomMultiClassificationTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :ivar project_name: Required. + :vartype project_name: str + :ivar deployment_name: Required. + :vartype deployment_name: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'project-name', 'type': 'str'}, + 'deployment_name': {'key': 'deployment-name', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + *, + project_name: str, + deployment_name: str, + logging_opt_out: Optional[bool] = False, + **kwargs + ): + """ + :keyword project_name: Required. + :paramtype project_name: str + :keyword deployment_name: Required. + :paramtype deployment_name: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + """ + super(CustomMultiClassificationTaskParameters, self).__init__(**kwargs) + self.project_name = project_name + self.deployment_name = deployment_name + self.logging_opt_out = logging_opt_out + + +class CustomMultiClassificationTaskResult(msrest.serialization.Model): + """CustomMultiClassificationTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomMultiClassificationResult'}, + } + + def __init__( + self, + *, + results: Optional["CustomMultiClassificationResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + """ + super(CustomMultiClassificationTaskResult, self).__init__(**kwargs) + self.results = results + + +class CustomSingleClassificationResult(msrest.serialization.Model): + """CustomSingleClassificationResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SingleClassificationDocument] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar project_name: Required. This field indicates the project name for the model. + :vartype project_name: str + :ivar deployment_name: Required. This field indicates the deployment name for the model. + :vartype deployment_name: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[SingleClassificationDocument]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'project_name': {'key': 'projectName', 'type': 'str'}, + 'deployment_name': {'key': 'deploymentName', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["SingleClassificationDocument"], + errors: List["DocumentError"], + project_name: str, + deployment_name: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SingleClassificationDocument] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword project_name: Required. This field indicates the project name for the model. + :paramtype project_name: str + :keyword deployment_name: Required. This field indicates the deployment name for the model. + :paramtype deployment_name: str + """ + super(CustomSingleClassificationResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.project_name = project_name + self.deployment_name = deployment_name + + +class CustomSingleClassificationTask(msrest.serialization.Model): + """CustomSingleClassificationTask. + + :ivar parameters: + :vartype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'CustomSingleClassificationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["CustomSingleClassificationTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(CustomSingleClassificationTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class CustomSingleClassificationTaskParameters(msrest.serialization.Model): + """CustomSingleClassificationTaskParameters. + + All required parameters must be populated in order to send to Azure. + + :ivar project_name: Required. + :vartype project_name: str + :ivar deployment_name: Required. + :vartype deployment_name: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + """ + + _validation = { + 'project_name': {'required': True}, + 'deployment_name': {'required': True}, + } + + _attribute_map = { + 'project_name': {'key': 'project-name', 'type': 'str'}, + 'deployment_name': {'key': 'deployment-name', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + *, + project_name: str, + deployment_name: str, + logging_opt_out: Optional[bool] = False, + **kwargs + ): + """ + :keyword project_name: Required. + :paramtype project_name: str + :keyword deployment_name: Required. + :paramtype deployment_name: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + """ + super(CustomSingleClassificationTaskParameters, self).__init__(**kwargs) + self.project_name = project_name + self.deployment_name = deployment_name + self.logging_opt_out = logging_opt_out + + +class CustomSingleClassificationTaskResult(msrest.serialization.Model): + """CustomSingleClassificationTaskResult. + + :ivar results: + :vartype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomSingleClassificationResult'}, + } + + def __init__( + self, + *, + results: Optional["CustomSingleClassificationResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + """ + super(CustomSingleClassificationTaskResult, self).__init__(**kwargs) + self.results = results + + +class DetectedLanguage(msrest.serialization.Model): + """DetectedLanguage. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Long name of a detected language (e.g. English, French). + :vartype name: str + :ivar iso6391_name: Required. A two letter representation of the detected language according to + the ISO 639-1 standard (e.g. en, fr). + :vartype iso6391_name: str + :ivar confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :vartype confidence_score: float + """ + + _validation = { + 'name': {'required': True}, + 'iso6391_name': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'iso6391_name': {'key': 'iso6391Name', 'type': 'str'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + *, + name: str, + iso6391_name: str, + confidence_score: float, + **kwargs + ): + """ + :keyword name: Required. Long name of a detected language (e.g. English, French). + :paramtype name: str + :keyword iso6391_name: Required. A two letter representation of the detected language according + to the ISO 639-1 standard (e.g. en, fr). + :paramtype iso6391_name: str + :keyword confidence_score: Required. A confidence score between 0 and 1. Scores close to 1 + indicate 100% certainty that the identified language is true. + :paramtype confidence_score: float + """ + super(DetectedLanguage, self).__init__(**kwargs) + self.name = name + self.iso6391_name = iso6391_name + self.confidence_score = confidence_score + + +class DocumentEntities(msrest.serialization.Model): + """DocumentEntities. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[Entity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + entities: List["Entity"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentEntities, self).__init__(**kwargs) + self.id = id + self.entities = entities + self.warnings = warnings + self.statistics = statistics + + +class DocumentError(msrest.serialization.Model): + """DocumentError. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Document Id. + :vartype id: str + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError + """ + + _validation = { + 'id': {'required': True}, + 'error': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + *, + id: str, + error: "TextAnalyticsError", + **kwargs + ): + """ + :keyword id: Required. Document Id. + :paramtype id: str + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError + """ + super(DocumentError, self).__init__(**kwargs) + self.id = id + self.error = error + + +class DocumentHealthcareEntities(msrest.serialization.Model): + """DocumentHealthcareEntities. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Healthcare entities. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntity] + :ivar relations: Required. Healthcare entity relations. + :vartype relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelation] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'relations': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[HealthcareEntity]'}, + 'relations': {'key': 'relations', 'type': '[HealthcareRelation]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + entities: List["HealthcareEntity"], + relations: List["HealthcareRelation"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Healthcare entities. + :paramtype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntity] + :keyword relations: Required. Healthcare entity relations. + :paramtype relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelation] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentHealthcareEntities, self).__init__(**kwargs) + self.id = id + self.entities = entities + self.relations = relations + self.warnings = warnings + self.statistics = statistics + + +class DocumentKeyPhrases(msrest.serialization.Model): + """DocumentKeyPhrases. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :vartype key_phrases: list[str] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'key_phrases': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'key_phrases': {'key': 'keyPhrases', 'type': '[str]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + key_phrases: List[str], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword key_phrases: Required. A list of representative words or phrases. The number of key + phrases returned is proportional to the number of words in the input document. + :paramtype key_phrases: list[str] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentKeyPhrases, self).__init__(**kwargs) + self.id = id + self.key_phrases = key_phrases + self.warnings = warnings + self.statistics = statistics + + +class DocumentLanguage(msrest.serialization.Model): + """DocumentLanguage. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar detected_language: Required. Detected Language. + :vartype detected_language: ~azure.ai.textanalytics.v3_2_preview_2.models.DetectedLanguage + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'detected_language': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'detected_language': {'key': 'detectedLanguage', 'type': 'DetectedLanguage'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + detected_language: "DetectedLanguage", + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword detected_language: Required. Detected Language. + :paramtype detected_language: ~azure.ai.textanalytics.v3_2_preview_2.models.DetectedLanguage + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentLanguage, self).__init__(**kwargs) + self.id = id + self.detected_language = detected_language + self.warnings = warnings + self.statistics = statistics + + +class DocumentLinkedEntities(msrest.serialization.Model): + """DocumentLinkedEntities. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar entities: Required. Recognized well known entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.LinkedEntity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[LinkedEntity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + entities: List["LinkedEntity"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword entities: Required. Recognized well known entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.LinkedEntity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(DocumentLinkedEntities, self).__init__(**kwargs) + self.id = id + self.entities = entities + self.warnings = warnings + self.statistics = statistics + + +class DocumentSentiment(msrest.serialization.Model): + """DocumentSentiment. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :vartype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentimentValue + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + :ivar confidence_scores: Required. Document level sentiment confidence scores between 0 and 1 + for each sentiment class. + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel + :ivar sentences: Required. Sentence level sentiment analysis. + :vartype sentences: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentiment] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + """ + + _validation = { + 'id': {'required': True}, + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'sentences': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, + 'sentences': {'key': 'sentences', 'type': '[SentenceSentiment]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + } + + def __init__( + self, + *, + id: str, + sentiment: Union[str, "DocumentSentimentValue"], + confidence_scores: "SentimentConfidenceScorePerLabel", + sentences: List["SentenceSentiment"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword sentiment: Required. Predicted sentiment for document (Negative, Neutral, Positive, or + Mixed). Possible values include: "positive", "neutral", "negative", "mixed". + :paramtype sentiment: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentimentValue + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + :keyword confidence_scores: Required. Document level sentiment confidence scores between 0 and + 1 for each sentiment class. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel + :keyword sentences: Required. Sentence level sentiment analysis. + :paramtype sentences: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentiment] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + """ + super(DocumentSentiment, self).__init__(**kwargs) + self.id = id + self.sentiment = sentiment + self.statistics = statistics + self.confidence_scores = confidence_scores + self.sentences = sentences + self.warnings = warnings + + +class DocumentStatistics(msrest.serialization.Model): + """if showStats=true was specified in the request this field will contain information about the document payload. + + All required parameters must be populated in order to send to Azure. + + :ivar characters_count: Required. Number of text elements recognized in the document. + :vartype characters_count: int + :ivar transactions_count: Required. Number of transactions for the document. + :vartype transactions_count: int + """ + + _validation = { + 'characters_count': {'required': True}, + 'transactions_count': {'required': True}, + } + + _attribute_map = { + 'characters_count': {'key': 'charactersCount', 'type': 'int'}, + 'transactions_count': {'key': 'transactionsCount', 'type': 'int'}, + } + + def __init__( + self, + *, + characters_count: int, + transactions_count: int, + **kwargs + ): + """ + :keyword characters_count: Required. Number of text elements recognized in the document. + :paramtype characters_count: int + :keyword transactions_count: Required. Number of transactions for the document. + :paramtype transactions_count: int + """ + super(DocumentStatistics, self).__init__(**kwargs) + self.characters_count = characters_count + self.transactions_count = transactions_count + + +class EntitiesResult(msrest.serialization.Model): + """EntitiesResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentEntities"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(EntitiesResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class EntitiesTask(msrest.serialization.Model): + """EntitiesTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'EntitiesTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["EntitiesTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(EntitiesTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class EntitiesTaskParameters(msrest.serialization.Model): + """EntitiesTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + *, + model_version: Optional[str] = "latest", + logging_opt_out: Optional[bool] = False, + string_index_type: Optional[Union[str, "StringIndexType"]] = None, + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(EntitiesTaskParameters, self).__init__(**kwargs) + self.model_version = model_version + self.logging_opt_out = logging_opt_out + self.string_index_type = string_index_type + + +class EntitiesTaskResult(msrest.serialization.Model): + """EntitiesTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'EntitiesResult'}, + } + + def __init__( + self, + *, + results: Optional["EntitiesResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult + """ + super(EntitiesTaskResult, self).__init__(**kwargs) + self.results = results + + +class Entity(msrest.serialization.Model): + """Entity. + + All required parameters must be populated in order to send to Azure. + + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Entity type. + :vartype category: str + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' + values can affect the offset returned. + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values + can affect the length returned. + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float + """ + + _validation = { + 'text': {'required': True}, + 'category': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'subcategory': {'key': 'subcategory', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + *, + text: str, + category: str, + offset: int, + length: int, + confidence_score: float, + subcategory: Optional[str] = None, + **kwargs + ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Entity type. + :paramtype category: str + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ + super(Entity, self).__init__(**kwargs) + self.text = text + self.category = category + self.subcategory = subcategory + self.offset = offset + self.length = length + self.confidence_score = confidence_score + + +class EntityLinkingResult(msrest.serialization.Model): + """EntityLinkingResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLinkedEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentLinkedEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentLinkedEntities"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLinkedEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(EntityLinkingResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class EntityLinkingTask(msrest.serialization.Model): + """EntityLinkingTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'EntityLinkingTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["EntityLinkingTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(EntityLinkingTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class EntityLinkingTaskParameters(msrest.serialization.Model): + """EntityLinkingTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + *, + model_version: Optional[str] = "latest", + logging_opt_out: Optional[bool] = False, + string_index_type: Optional[Union[str, "StringIndexType"]] = None, + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(EntityLinkingTaskParameters, self).__init__(**kwargs) + self.model_version = model_version + self.logging_opt_out = logging_opt_out + self.string_index_type = string_index_type + + +class EntityLinkingTaskResult(msrest.serialization.Model): + """EntityLinkingTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'EntityLinkingResult'}, + } + + def __init__( + self, + *, + results: Optional["EntityLinkingResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult + """ + super(EntityLinkingTaskResult, self).__init__(**kwargs) + self.results = results + + +class ErrorResponse(msrest.serialization.Model): + """ErrorResponse. + + All required parameters must be populated in order to send to Azure. + + :ivar error: Required. Document Error. + :vartype error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError + """ + + _validation = { + 'error': {'required': True}, + } + + _attribute_map = { + 'error': {'key': 'error', 'type': 'TextAnalyticsError'}, + } + + def __init__( + self, + *, + error: "TextAnalyticsError", + **kwargs + ): + """ + :keyword error: Required. Document Error. + :paramtype error: ~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError + """ + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class ExtractedDocumentSummary(msrest.serialization.Model): + """ExtractedDocumentSummary. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar sentences: Required. A ranked list of sentences representing the extracted summary. + :vartype sentences: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedSummarySentence] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'sentences': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'sentences': {'key': 'sentences', 'type': '[ExtractedSummarySentence]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + sentences: List["ExtractedSummarySentence"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword sentences: Required. A ranked list of sentences representing the extracted summary. + :paramtype sentences: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedSummarySentence] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(ExtractedDocumentSummary, self).__init__(**kwargs) + self.id = id + self.sentences = sentences + self.warnings = warnings + self.statistics = statistics + + +class ExtractedSummarySentence(msrest.serialization.Model): + """ExtractedSummarySentence. + + All required parameters must be populated in order to send to Azure. + + :ivar text: Required. The extracted sentence text. + :vartype text: str + :ivar rank_score: Required. A double value representing the relevance of the sentence within + the summary. Higher values indicate higher importance. + :vartype rank_score: float + :ivar offset: Required. The sentence offset from the start of the document, based on the value + of the parameter StringIndexType. + :vartype offset: int + :ivar length: Required. The length of the sentence. + :vartype length: int + """ + + _validation = { + 'text': {'required': True}, + 'rank_score': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'rank_score': {'key': 'rankScore', 'type': 'float'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + } + + def __init__( + self, + *, + text: str, + rank_score: float, + offset: int, + length: int, + **kwargs + ): + """ + :keyword text: Required. The extracted sentence text. + :paramtype text: str + :keyword rank_score: Required. A double value representing the relevance of the sentence within + the summary. Higher values indicate higher importance. + :paramtype rank_score: float + :keyword offset: Required. The sentence offset from the start of the document, based on the + value of the parameter StringIndexType. + :paramtype offset: int + :keyword length: Required. The length of the sentence. + :paramtype length: int + """ + super(ExtractedSummarySentence, self).__init__(**kwargs) + self.text = text + self.rank_score = rank_score + self.offset = offset + self.length = length + + +class ExtractiveSummarizationResult(msrest.serialization.Model): + """ExtractiveSummarizationResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedDocumentSummary] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[ExtractedDocumentSummary]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["ExtractedDocumentSummary"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractedDocumentSummary] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(ExtractiveSummarizationResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class ExtractiveSummarizationTask(msrest.serialization.Model): + """ExtractiveSummarizationTask. + + :ivar parameters: + :vartype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'ExtractiveSummarizationTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["ExtractiveSummarizationTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(ExtractiveSummarizationTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class ExtractiveSummarizationTaskParameters(msrest.serialization.Model): + """ExtractiveSummarizationTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + :ivar sentence_count: + :vartype sentence_count: int + :ivar sort_by: Possible values include: "Offset", "Rank". Default value: "Offset". + :vartype sort_by: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParametersSortBy + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + 'sentence_count': {'key': 'sentenceCount', 'type': 'int'}, + 'sort_by': {'key': 'sortBy', 'type': 'str'}, + } + + def __init__( + self, + *, + model_version: Optional[str] = "latest", + logging_opt_out: Optional[bool] = False, + string_index_type: Optional[Union[str, "StringIndexType"]] = None, + sentence_count: Optional[int] = 3, + sort_by: Optional[Union[str, "ExtractiveSummarizationTaskParametersSortBy"]] = "Offset", + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + :keyword sentence_count: + :paramtype sentence_count: int + :keyword sort_by: Possible values include: "Offset", "Rank". Default value: "Offset". + :paramtype sort_by: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTaskParametersSortBy + """ + super(ExtractiveSummarizationTaskParameters, self).__init__(**kwargs) + self.model_version = model_version + self.logging_opt_out = logging_opt_out + self.string_index_type = string_index_type + self.sentence_count = sentence_count + self.sort_by = sort_by + + +class ExtractiveSummarizationTaskResult(msrest.serialization.Model): + """ExtractiveSummarizationTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'ExtractiveSummarizationResult'}, + } + + def __init__( + self, + *, + results: Optional["ExtractiveSummarizationResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult + """ + super(ExtractiveSummarizationTaskResult, self).__init__(**kwargs) + self.results = results + + +class HealthcareAssertion(msrest.serialization.Model): + """HealthcareAssertion. + + :ivar conditionality: Describes any conditionality on the entity. Possible values include: + "hypothetical", "conditional". + :vartype conditionality: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Conditionality + :ivar certainty: Describes the entities certainty and polarity. Possible values include: + "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". + :vartype certainty: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Certainty + :ivar association: Describes if the entity is the subject of the text or if it describes + someone else. Possible values include: "subject", "other". + :vartype association: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Association + """ + + _attribute_map = { + 'conditionality': {'key': 'conditionality', 'type': 'str'}, + 'certainty': {'key': 'certainty', 'type': 'str'}, + 'association': {'key': 'association', 'type': 'str'}, + } + + def __init__( + self, + *, + conditionality: Optional[Union[str, "Conditionality"]] = None, + certainty: Optional[Union[str, "Certainty"]] = None, + association: Optional[Union[str, "Association"]] = None, + **kwargs + ): + """ + :keyword conditionality: Describes any conditionality on the entity. Possible values include: + "hypothetical", "conditional". + :paramtype conditionality: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Conditionality + :keyword certainty: Describes the entities certainty and polarity. Possible values include: + "positive", "positivePossible", "neutralPossible", "negativePossible", "negative". + :paramtype certainty: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Certainty + :keyword association: Describes if the entity is the subject of the text or if it describes + someone else. Possible values include: "subject", "other". + :paramtype association: str or ~azure.ai.textanalytics.v3_2_preview_2.models.Association + """ + super(HealthcareAssertion, self).__init__(**kwargs) + self.conditionality = conditionality + self.certainty = certainty + self.association = association + + +class HealthcareLinkingProperties(msrest.serialization.Model): + """HealthcareLinkingProperties. + + :ivar assertion: + :vartype assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion + :ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :vartype name: str + :ivar links: Entity references in known data sources. + :vartype links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] + """ + + _attribute_map = { + 'assertion': {'key': 'assertion', 'type': 'HealthcareAssertion'}, + 'name': {'key': 'name', 'type': 'str'}, + 'links': {'key': 'links', 'type': '[HealthcareEntityLink]'}, + } + + def __init__( + self, + *, + assertion: Optional["HealthcareAssertion"] = None, + name: Optional[str] = None, + links: Optional[List["HealthcareEntityLink"]] = None, + **kwargs + ): + """ + :keyword assertion: + :paramtype assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion + :keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :paramtype name: str + :keyword links: Entity references in known data sources. + :paramtype links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] + """ + super(HealthcareLinkingProperties, self).__init__(**kwargs) + self.assertion = assertion + self.name = name + self.links = links + + +class HealthcareEntityProperties(msrest.serialization.Model): + """HealthcareEntityProperties. + + All required parameters must be populated in order to send to Azure. + + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :vartype category: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' + values can affect the offset returned. + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values + can affect the length returned. + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float + """ + + _validation = { + 'text': {'required': True}, + 'category': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'subcategory': {'key': 'subcategory', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + *, + text: str, + category: Union[str, "HealthcareEntityCategory"], + offset: int, + length: int, + confidence_score: float, + subcategory: Optional[str] = None, + **kwargs + ): + """ + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :paramtype category: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ + super(HealthcareEntityProperties, self).__init__(**kwargs) + self.text = text + self.category = category + self.subcategory = subcategory + self.offset = offset + self.length = length + self.confidence_score = confidence_score + + +class HealthcareEntity(HealthcareEntityProperties, HealthcareLinkingProperties): + """HealthcareEntity. + + All required parameters must be populated in order to send to Azure. + + :ivar assertion: + :vartype assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion + :ivar name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :vartype name: str + :ivar links: Entity references in known data sources. + :vartype links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :vartype category: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory + :ivar subcategory: (Optional) Entity sub type. + :vartype subcategory: str + :ivar offset: Required. Start position for the entity text. Use of different 'stringIndexType' + values can affect the offset returned. + :vartype offset: int + :ivar length: Required. Length for the entity text. Use of different 'stringIndexType' values + can affect the length returned. + :vartype length: int + :ivar confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :vartype confidence_score: float + """ + + _validation = { + 'text': {'required': True}, + 'category': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'confidence_score': {'required': True}, + } + + _attribute_map = { + 'assertion': {'key': 'assertion', 'type': 'HealthcareAssertion'}, + 'name': {'key': 'name', 'type': 'str'}, + 'links': {'key': 'links', 'type': '[HealthcareEntityLink]'}, + 'text': {'key': 'text', 'type': 'str'}, + 'category': {'key': 'category', 'type': 'str'}, + 'subcategory': {'key': 'subcategory', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + } + + def __init__( + self, + *, + text: str, + category: Union[str, "HealthcareEntityCategory"], + offset: int, + length: int, + confidence_score: float, + assertion: Optional["HealthcareAssertion"] = None, + name: Optional[str] = None, + links: Optional[List["HealthcareEntityLink"]] = None, + subcategory: Optional[str] = None, + **kwargs + ): + """ + :keyword assertion: + :paramtype assertion: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareAssertion + :keyword name: Preferred name for the entity. Example: 'histologically' would have a 'name' of + 'histologic'. + :paramtype name: str + :keyword links: Entity references in known data sources. + :paramtype links: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityLink] + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword category: Required. Healthcare Entity Category. Possible values include: + "BODY_STRUCTURE", "AGE", "GENDER", "EXAMINATION_NAME", "DATE", "DIRECTION", "FREQUENCY", + "MEASUREMENT_VALUE", "MEASUREMENT_UNIT", "RELATIONAL_OPERATOR", "TIME", "GENE_OR_PROTEIN", + "VARIANT", "ADMINISTRATIVE_EVENT", "CARE_ENVIRONMENT", "HEALTHCARE_PROFESSION", "DIAGNOSIS", + "SYMPTOM_OR_SIGN", "CONDITION_QUALIFIER", "MEDICATION_CLASS", "MEDICATION_NAME", "DOSAGE", + "MEDICATION_FORM", "MEDICATION_ROUTE", "FAMILY_RELATION", "TREATMENT_NAME". + :paramtype category: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareEntityCategory + :keyword subcategory: (Optional) Entity sub type. + :paramtype subcategory: str + :keyword offset: Required. Start position for the entity text. Use of different + 'stringIndexType' values can affect the offset returned. + :paramtype offset: int + :keyword length: Required. Length for the entity text. Use of different 'stringIndexType' + values can affect the length returned. + :paramtype length: int + :keyword confidence_score: Required. Confidence score between 0 and 1 of the extracted entity. + :paramtype confidence_score: float + """ + super(HealthcareEntity, self).__init__(text=text, category=category, subcategory=subcategory, offset=offset, length=length, confidence_score=confidence_score, assertion=assertion, name=name, links=links, **kwargs) + self.assertion = assertion + self.name = name + self.links = links + self.text = text + self.category = category + self.subcategory = subcategory + self.offset = offset + self.length = length + self.confidence_score = confidence_score + + +class HealthcareEntityLink(msrest.serialization.Model): + """HealthcareEntityLink. + + All required parameters must be populated in order to send to Azure. + + :ivar data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. + :vartype data_source: str + :ivar id: Required. Entity id in the given source catalog. + :vartype id: str + """ + + _validation = { + 'data_source': {'required': True}, + 'id': {'required': True}, + } + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + *, + data_source: str, + id: str, + **kwargs + ): + """ + :keyword data_source: Required. Entity Catalog. Examples include: UMLS, CHV, MSH, etc. + :paramtype data_source: str + :keyword id: Required. Entity id in the given source catalog. + :paramtype id: str + """ + super(HealthcareEntityLink, self).__init__(**kwargs) + self.data_source = data_source + self.id = id + + +class HealthcareTaskResult(msrest.serialization.Model): + """HealthcareTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'HealthcareResult'}, + 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, + } + + def __init__( + self, + *, + results: Optional["HealthcareResult"] = None, + errors: Optional[List["TextAnalyticsError"]] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + """ + super(HealthcareTaskResult, self).__init__(**kwargs) + self.results = results + self.errors = errors + + +class HealthcareJobState(JobMetadata, Pagination, HealthcareTaskResult): + """HealthcareJobState. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult + :ivar errors: + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :ivar next_link: + :vartype next_link: str + :ivar created_date_time: Required. + :vartype created_date_time: ~datetime.datetime + :ivar expiration_date_time: + :vartype expiration_date_time: ~datetime.datetime + :ivar job_id: Required. + :vartype job_id: str + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'created_date_time': {'required': True}, + 'job_id': {'required': True}, + 'last_update_date_time': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'HealthcareResult'}, + 'errors': {'key': 'errors', 'type': '[TextAnalyticsError]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + 'created_date_time': {'key': 'createdDateTime', 'type': 'iso-8601'}, + 'expiration_date_time': {'key': 'expirationDateTime', 'type': 'iso-8601'}, + 'job_id': {'key': 'jobId', 'type': 'str'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + created_date_time: datetime.datetime, + job_id: str, + last_update_date_time: datetime.datetime, + status: Union[str, "State"], + results: Optional["HealthcareResult"] = None, + errors: Optional[List["TextAnalyticsError"]] = None, + next_link: Optional[str] = None, + expiration_date_time: Optional[datetime.datetime] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareResult + :keyword errors: + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + :keyword next_link: + :paramtype next_link: str + :keyword created_date_time: Required. + :paramtype created_date_time: ~datetime.datetime + :keyword expiration_date_time: + :paramtype expiration_date_time: ~datetime.datetime + :keyword job_id: Required. + :paramtype job_id: str + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(HealthcareJobState, self).__init__(created_date_time=created_date_time, expiration_date_time=expiration_date_time, job_id=job_id, last_update_date_time=last_update_date_time, status=status, next_link=next_link, results=results, errors=errors, **kwargs) + self.results = results + self.errors = errors + self.next_link = next_link + self.results = results + self.errors = errors + self.created_date_time = created_date_time + self.expiration_date_time = expiration_date_time + self.job_id = job_id + self.last_update_date_time = last_update_date_time + self.status = status + self.next_link = next_link + self.created_date_time = created_date_time + self.expiration_date_time = expiration_date_time + self.job_id = job_id + self.last_update_date_time = last_update_date_time + self.status = status + + +class HealthcareRelation(msrest.serialization.Model): + """Every relation is an entity graph of a certain relationType, where all entities are connected and have specific roles within the relation context. + + All required parameters must be populated in order to send to Azure. + + :ivar relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or + 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", + "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", + "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", + "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", + "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", + "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". + :vartype relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.RelationType + :ivar entities: Required. The entities in the relation. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelationEntity] + """ + + _validation = { + 'relation_type': {'required': True}, + 'entities': {'required': True}, + } + + _attribute_map = { + 'relation_type': {'key': 'relationType', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[HealthcareRelationEntity]'}, + } + + def __init__( + self, + *, + relation_type: Union[str, "RelationType"], + entities: List["HealthcareRelationEntity"], + **kwargs + ): + """ + :keyword relation_type: Required. Type of relation. Examples include: ``DosageOfMedication`` or + 'FrequencyOfMedication', etc. Possible values include: "Abbreviation", + "DirectionOfBodyStructure", "DirectionOfCondition", "DirectionOfExamination", + "DirectionOfTreatment", "DosageOfMedication", "FormOfMedication", "FrequencyOfMedication", + "FrequencyOfTreatment", "QualifierOfCondition", "RelationOfExamination", "RouteOfMedication", + "TimeOfCondition", "TimeOfEvent", "TimeOfExamination", "TimeOfMedication", "TimeOfTreatment", + "UnitOfCondition", "UnitOfExamination", "ValueOfCondition", "ValueOfExamination". + :paramtype relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.RelationType + :keyword entities: Required. The entities in the relation. + :paramtype entities: + list[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareRelationEntity] + """ + super(HealthcareRelation, self).__init__(**kwargs) + self.relation_type = relation_type + self.entities = entities + + +class HealthcareRelationEntity(msrest.serialization.Model): + """HealthcareRelationEntity. + + All required parameters must be populated in order to send to Azure. + + :ivar ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment + Identifier Representation), pointing to the entity . + :vartype ref: str + :ivar role: Required. Role of entity in the relationship. For example: 'CD20-positive diffuse + large B-cell lymphoma' has the following entities with their roles in parenthesis: CD20 + (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). + :vartype role: str + """ + + _validation = { + 'ref': {'required': True}, + 'role': {'required': True}, + } + + _attribute_map = { + 'ref': {'key': 'ref', 'type': 'str'}, + 'role': {'key': 'role', 'type': 'str'}, + } + + def __init__( + self, + *, + ref: str, + role: str, + **kwargs + ): + """ + :keyword ref: Required. Reference link object, using a JSON pointer RFC 6901 (URI Fragment + Identifier Representation), pointing to the entity . + :paramtype ref: str + :keyword role: Required. Role of entity in the relationship. For example: 'CD20-positive + diffuse large B-cell lymphoma' has the following entities with their roles in parenthesis: + CD20 (GeneOrProtein), Positive (Expression), diffuse large B-cell lymphoma (Diagnosis). + :paramtype role: str + """ + super(HealthcareRelationEntity, self).__init__(**kwargs) + self.ref = ref + self.role = role + + +class HealthcareResult(msrest.serialization.Model): + """HealthcareResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentHealthcareEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentHealthcareEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentHealthcareEntities"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: + list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentHealthcareEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(HealthcareResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class InnerError(msrest.serialization.Model): + """InnerError. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". + :vartype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.InnerErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar details: Error details. + :vartype details: dict[str, str] + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'details': {'key': 'details', 'type': '{str}'}, + 'target': {'key': 'target', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + } + + def __init__( + self, + *, + code: Union[str, "InnerErrorCodeValue"], + message: str, + details: Optional[Dict[str, str]] = None, + target: Optional[str] = None, + innererror: Optional["InnerError"] = None, + **kwargs + ): + """ + :keyword code: Required. Error code. Possible values include: "InvalidParameterValue", + "InvalidRequestBodyFormat", "EmptyRequest", "MissingInputRecords", "InvalidDocument", + "ModelVersionIncorrect", "InvalidDocumentBatch", "UnsupportedLanguageCode", + "InvalidCountryHint". + :paramtype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.InnerErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword details: Error details. + :paramtype details: dict[str, str] + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError + """ + super(InnerError, self).__init__(**kwargs) + self.code = code + self.message = message + self.details = details + self.target = target + self.innererror = innererror + + +class JobManifestTasks(msrest.serialization.Model): + """The set of tasks to execute on the input documents. Cannot specify the same task more than once. + + :ivar entity_recognition_tasks: + :vartype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTask] + :ivar entity_recognition_pii_tasks: + :vartype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiTask] + :ivar key_phrase_extraction_tasks: + :vartype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTask] + :ivar entity_linking_tasks: + :vartype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTask] + :ivar sentiment_analysis_tasks: + :vartype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTask] + :ivar extractive_summarization_tasks: + :vartype extractive_summarization_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTask] + :ivar custom_entity_recognition_tasks: + :vartype custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTask] + :ivar custom_single_classification_tasks: + :vartype custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTask] + :ivar custom_multi_classification_tasks: + :vartype custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTask] + """ + + _attribute_map = { + 'entity_recognition_tasks': {'key': 'entityRecognitionTasks', 'type': '[EntitiesTask]'}, + 'entity_recognition_pii_tasks': {'key': 'entityRecognitionPiiTasks', 'type': '[PiiTask]'}, + 'key_phrase_extraction_tasks': {'key': 'keyPhraseExtractionTasks', 'type': '[KeyPhrasesTask]'}, + 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[EntityLinkingTask]'}, + 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[SentimentAnalysisTask]'}, + 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[ExtractiveSummarizationTask]'}, + 'custom_entity_recognition_tasks': {'key': 'customEntityRecognitionTasks', 'type': '[CustomEntitiesTask]'}, + 'custom_single_classification_tasks': {'key': 'customSingleClassificationTasks', 'type': '[CustomSingleClassificationTask]'}, + 'custom_multi_classification_tasks': {'key': 'customMultiClassificationTasks', 'type': '[CustomMultiClassificationTask]'}, + } + + def __init__( + self, + *, + entity_recognition_tasks: Optional[List["EntitiesTask"]] = None, + entity_recognition_pii_tasks: Optional[List["PiiTask"]] = None, + key_phrase_extraction_tasks: Optional[List["KeyPhrasesTask"]] = None, + entity_linking_tasks: Optional[List["EntityLinkingTask"]] = None, + sentiment_analysis_tasks: Optional[List["SentimentAnalysisTask"]] = None, + extractive_summarization_tasks: Optional[List["ExtractiveSummarizationTask"]] = None, + custom_entity_recognition_tasks: Optional[List["CustomEntitiesTask"]] = None, + custom_single_classification_tasks: Optional[List["CustomSingleClassificationTask"]] = None, + custom_multi_classification_tasks: Optional[List["CustomMultiClassificationTask"]] = None, + **kwargs + ): + """ + :keyword entity_recognition_tasks: + :paramtype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesTask] + :keyword entity_recognition_pii_tasks: + :paramtype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiTask] + :keyword key_phrase_extraction_tasks: + :paramtype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTask] + :keyword entity_linking_tasks: + :paramtype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingTask] + :keyword sentiment_analysis_tasks: + :paramtype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTask] + :keyword extractive_summarization_tasks: + :paramtype extractive_summarization_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationTask] + :keyword custom_entity_recognition_tasks: + :paramtype custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesTask] + :keyword custom_single_classification_tasks: + :paramtype custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationTask] + :keyword custom_multi_classification_tasks: + :paramtype custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationTask] + """ + super(JobManifestTasks, self).__init__(**kwargs) + self.entity_recognition_tasks = entity_recognition_tasks + self.entity_recognition_pii_tasks = entity_recognition_pii_tasks + self.key_phrase_extraction_tasks = key_phrase_extraction_tasks + self.entity_linking_tasks = entity_linking_tasks + self.sentiment_analysis_tasks = sentiment_analysis_tasks + self.extractive_summarization_tasks = extractive_summarization_tasks + self.custom_entity_recognition_tasks = custom_entity_recognition_tasks + self.custom_single_classification_tasks = custom_single_classification_tasks + self.custom_multi_classification_tasks = custom_multi_classification_tasks + + +class KeyPhraseResult(msrest.serialization.Model): + """KeyPhraseResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentKeyPhrases] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentKeyPhrases]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentKeyPhrases"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentKeyPhrases] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(KeyPhraseResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class KeyPhrasesTask(msrest.serialization.Model): + """KeyPhrasesTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'KeyPhrasesTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["KeyPhrasesTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhrasesTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(KeyPhrasesTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class KeyPhrasesTaskParameters(msrest.serialization.Model): + """KeyPhrasesTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + } + + def __init__( + self, + *, + model_version: Optional[str] = "latest", + logging_opt_out: Optional[bool] = False, + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + """ + super(KeyPhrasesTaskParameters, self).__init__(**kwargs) + self.model_version = model_version + self.logging_opt_out = logging_opt_out + + +class KeyPhraseTaskResult(msrest.serialization.Model): + """KeyPhraseTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'KeyPhraseResult'}, + } + + def __init__( + self, + *, + results: Optional["KeyPhraseResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult + """ + super(KeyPhraseTaskResult, self).__init__(**kwargs) + self.results = results + + +class LanguageBatchInput(msrest.serialization.Model): + """LanguageBatchInput. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] + """ + + _validation = { + 'documents': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[LanguageInput]'}, + } + + def __init__( + self, + *, + documents: List["LanguageInput"], + **kwargs + ): + """ + :keyword documents: Required. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] + """ + super(LanguageBatchInput, self).__init__(**kwargs) + self.documents = documents + + +class LanguageInput(msrest.serialization.Model): + """LanguageInput. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. + :vartype text: str + :ivar country_hint: + :vartype country_hint: str + """ + + _validation = { + 'id': {'required': True}, + 'text': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'country_hint': {'key': 'countryHint', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + text: str, + country_hint: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. + :paramtype text: str + :keyword country_hint: + :paramtype country_hint: str + """ + super(LanguageInput, self).__init__(**kwargs) + self.id = id + self.text = text + self.country_hint = country_hint + + +class LanguageResult(msrest.serialization.Model): + """LanguageResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLanguage] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentLanguage]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentLanguage"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentLanguage] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(LanguageResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class LinkedEntity(msrest.serialization.Model): + """LinkedEntity. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. Entity Linking formal name. + :vartype name: str + :ivar matches: Required. List of instances this entity appears in the text. + :vartype matches: list[~azure.ai.textanalytics.v3_2_preview_2.models.Match] + :ivar language: Required. Language used in the data source. + :vartype language: str + :ivar id: Unique identifier of the recognized entity from the data source. + :vartype id: str + :ivar url: Required. URL for the entity's page from the data source. + :vartype url: str + :ivar data_source: Required. Data source used to extract entity linking, such as Wiki/Bing etc. + :vartype data_source: str + :ivar bing_id: Bing Entity Search API unique identifier of the recognized entity. + :vartype bing_id: str + """ + + _validation = { + 'name': {'required': True}, + 'matches': {'required': True}, + 'language': {'required': True}, + 'url': {'required': True}, + 'data_source': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'matches': {'key': 'matches', 'type': '[Match]'}, + 'language': {'key': 'language', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'data_source': {'key': 'dataSource', 'type': 'str'}, + 'bing_id': {'key': 'bingId', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + matches: List["Match"], + language: str, + url: str, + data_source: str, + id: Optional[str] = None, + bing_id: Optional[str] = None, + **kwargs + ): + """ + :keyword name: Required. Entity Linking formal name. + :paramtype name: str + :keyword matches: Required. List of instances this entity appears in the text. + :paramtype matches: list[~azure.ai.textanalytics.v3_2_preview_2.models.Match] + :keyword language: Required. Language used in the data source. + :paramtype language: str + :keyword id: Unique identifier of the recognized entity from the data source. + :paramtype id: str + :keyword url: Required. URL for the entity's page from the data source. + :paramtype url: str + :keyword data_source: Required. Data source used to extract entity linking, such as Wiki/Bing + etc. + :paramtype data_source: str + :keyword bing_id: Bing Entity Search API unique identifier of the recognized entity. + :paramtype bing_id: str + """ + super(LinkedEntity, self).__init__(**kwargs) + self.name = name + self.matches = matches + self.language = language + self.id = id + self.url = url + self.data_source = data_source + self.bing_id = bing_id + + +class Match(msrest.serialization.Model): + """Match. + + All required parameters must be populated in order to send to Azure. + + :ivar confidence_score: Required. If a well known item is recognized, a decimal number denoting + the confidence level between 0 and 1 will be returned. + :vartype confidence_score: float + :ivar text: Required. Entity text as appears in the request. + :vartype text: str + :ivar offset: Required. Start position for the entity match text. + :vartype offset: int + :ivar length: Required. Length for the entity match text. + :vartype length: int + """ + + _validation = { + 'confidence_score': {'required': True}, + 'text': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'confidence_score': {'key': 'confidenceScore', 'type': 'float'}, + 'text': {'key': 'text', 'type': 'str'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + } + + def __init__( + self, + *, + confidence_score: float, + text: str, + offset: int, + length: int, + **kwargs + ): + """ + :keyword confidence_score: Required. If a well known item is recognized, a decimal number + denoting the confidence level between 0 and 1 will be returned. + :paramtype confidence_score: float + :keyword text: Required. Entity text as appears in the request. + :paramtype text: str + :keyword offset: Required. Start position for the entity match text. + :paramtype offset: int + :keyword length: Required. Length for the entity match text. + :paramtype length: int + """ + super(Match, self).__init__(**kwargs) + self.confidence_score = confidence_score + self.text = text + self.offset = offset + self.length = length + + +class MultiClassificationDocument(msrest.serialization.Model): + """MultiClassificationDocument. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar classifications: Required. Recognized classification results in the document. + :vartype classifications: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'classifications': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'classifications': {'key': 'classifications', 'type': '[ClassificationResult]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + classifications: List["ClassificationResult"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword classifications: Required. Recognized classification results in the document. + :paramtype classifications: + list[~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(MultiClassificationDocument, self).__init__(**kwargs) + self.id = id + self.classifications = classifications + self.warnings = warnings + self.statistics = statistics + + +class MultiLanguageBatchInput(msrest.serialization.Model): + """Contains a set of input documents to be analyzed by the service. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. The set of documents to process as part of this batch. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] + """ + + _validation = { + 'documents': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[MultiLanguageInput]'}, + } + + def __init__( + self, + *, + documents: List["MultiLanguageInput"], + **kwargs + ): + """ + :keyword documents: Required. The set of documents to process as part of this batch. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] + """ + super(MultiLanguageBatchInput, self).__init__(**kwargs) + self.documents = documents + + +class MultiLanguageInput(msrest.serialization.Model): + """Contains an input document to be analyzed by the service. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. A unique, non-empty document identifier. + :vartype id: str + :ivar text: Required. The input text to process. + :vartype text: str + :ivar language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :vartype language: str + """ + + _validation = { + 'id': {'required': True}, + 'text': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'text': {'key': 'text', 'type': 'str'}, + 'language': {'key': 'language', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + text: str, + language: Optional[str] = None, + **kwargs + ): + """ + :keyword id: Required. A unique, non-empty document identifier. + :paramtype id: str + :keyword text: Required. The input text to process. + :paramtype text: str + :keyword language: (Optional) This is the 2 letter ISO 639-1 representation of a language. For + example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as + default. + :paramtype language: str + """ + super(MultiLanguageInput, self).__init__(**kwargs) + self.id = id + self.text = text + self.language = language + + +class PiiDocumentEntities(msrest.serialization.Model): + """PiiDocumentEntities. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar redacted_text: Required. Returns redacted text. + :vartype redacted_text: str + :ivar entities: Required. Recognized entities in the document. + :vartype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'redacted_text': {'required': True}, + 'entities': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'redacted_text': {'key': 'redactedText', 'type': 'str'}, + 'entities': {'key': 'entities', 'type': '[Entity]'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + redacted_text: str, + entities: List["Entity"], + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword redacted_text: Required. Returns redacted text. + :paramtype redacted_text: str + :keyword entities: Required. Recognized entities in the document. + :paramtype entities: list[~azure.ai.textanalytics.v3_2_preview_2.models.Entity] + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(PiiDocumentEntities, self).__init__(**kwargs) + self.id = id + self.redacted_text = redacted_text + self.entities = entities + self.warnings = warnings + self.statistics = statistics + + +class PiiResult(msrest.serialization.Model): + """PiiResult. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Response by document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiDocumentEntities] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[PiiDocumentEntities]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["PiiDocumentEntities"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Response by document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.PiiDocumentEntities] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(PiiResult, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class PiiTask(msrest.serialization.Model): + """PiiTask. + + :ivar parameters: + :vartype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'PiiTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["PiiTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(PiiTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class PiiTaskParameters(msrest.serialization.Model): + """PiiTaskParameters. + + :ivar domain: Possible values include: "phi", "none". Default value: "none". + :vartype domain: str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParametersDomain + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar pii_categories: (Optional) describes the PII categories to return. + :vartype pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _validation = { + 'pii_categories': {'unique': True}, + } + + _attribute_map = { + 'domain': {'key': 'domain', 'type': 'str'}, + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'pii_categories': {'key': 'piiCategories', 'type': '[str]'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + *, + domain: Optional[Union[str, "PiiTaskParametersDomain"]] = "none", + model_version: Optional[str] = "latest", + logging_opt_out: Optional[bool] = True, + pii_categories: Optional[List[Union[str, "PiiCategory"]]] = None, + string_index_type: Optional[Union[str, "StringIndexType"]] = None, + **kwargs + ): + """ + :keyword domain: Possible values include: "phi", "none". Default value: "none". + :paramtype domain: str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiTaskParametersDomain + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword pii_categories: (Optional) describes the PII categories to return. + :paramtype pii_categories: list[str or + ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(PiiTaskParameters, self).__init__(**kwargs) + self.domain = domain + self.model_version = model_version + self.logging_opt_out = logging_opt_out + self.pii_categories = pii_categories + self.string_index_type = string_index_type + + +class PiiTaskResult(msrest.serialization.Model): + """PiiTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'PiiResult'}, + } + + def __init__( + self, + *, + results: Optional["PiiResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult + """ + super(PiiTaskResult, self).__init__(**kwargs) + self.results = results + + +class RequestStatistics(msrest.serialization.Model): + """if showStats=true was specified in the request this field will contain information about the request payload. + + All required parameters must be populated in order to send to Azure. + + :ivar documents_count: Required. Number of documents submitted in the request. + :vartype documents_count: int + :ivar valid_documents_count: Required. Number of valid documents. This excludes empty, + over-size limit or non-supported languages documents. + :vartype valid_documents_count: int + :ivar erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :vartype erroneous_documents_count: int + :ivar transactions_count: Required. Number of transactions for the request. + :vartype transactions_count: long + """ + + _validation = { + 'documents_count': {'required': True}, + 'valid_documents_count': {'required': True}, + 'erroneous_documents_count': {'required': True}, + 'transactions_count': {'required': True}, + } + + _attribute_map = { + 'documents_count': {'key': 'documentsCount', 'type': 'int'}, + 'valid_documents_count': {'key': 'validDocumentsCount', 'type': 'int'}, + 'erroneous_documents_count': {'key': 'erroneousDocumentsCount', 'type': 'int'}, + 'transactions_count': {'key': 'transactionsCount', 'type': 'long'}, + } + + def __init__( + self, + *, + documents_count: int, + valid_documents_count: int, + erroneous_documents_count: int, + transactions_count: int, + **kwargs + ): + """ + :keyword documents_count: Required. Number of documents submitted in the request. + :paramtype documents_count: int + :keyword valid_documents_count: Required. Number of valid documents. This excludes empty, + over-size limit or non-supported languages documents. + :paramtype valid_documents_count: int + :keyword erroneous_documents_count: Required. Number of invalid documents. This includes empty, + over-size limit or non-supported languages documents. + :paramtype erroneous_documents_count: int + :keyword transactions_count: Required. Number of transactions for the request. + :paramtype transactions_count: long + """ + super(RequestStatistics, self).__init__(**kwargs) + self.documents_count = documents_count + self.valid_documents_count = valid_documents_count + self.erroneous_documents_count = erroneous_documents_count + self.transactions_count = transactions_count + + +class SentenceAssessment(msrest.serialization.Model): + """SentenceAssessment. + + All required parameters must be populated in order to send to Azure. + + :ivar sentiment: Required. Assessment sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :vartype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue + :ivar confidence_scores: Required. Assessment sentiment confidence scores in the sentence. + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel + :ivar offset: Required. The assessment offset from the start of the sentence. + :vartype offset: int + :ivar length: Required. The length of the assessment. + :vartype length: int + :ivar text: Required. The assessment text detected. + :vartype text: str + :ivar is_negated: Required. The indicator representing if the assessment is negated. + :vartype is_negated: bool + """ + + _validation = { + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'text': {'required': True}, + 'is_negated': {'required': True}, + } + + _attribute_map = { + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'TargetConfidenceScoreLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'is_negated': {'key': 'isNegated', 'type': 'bool'}, + } + + def __init__( + self, + *, + sentiment: Union[str, "TokenSentimentValue"], + confidence_scores: "TargetConfidenceScoreLabel", + offset: int, + length: int, + text: str, + is_negated: bool, + **kwargs + ): + """ + :keyword sentiment: Required. Assessment sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue + :keyword confidence_scores: Required. Assessment sentiment confidence scores in the sentence. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel + :keyword offset: Required. The assessment offset from the start of the sentence. + :paramtype offset: int + :keyword length: Required. The length of the assessment. + :paramtype length: int + :keyword text: Required. The assessment text detected. + :paramtype text: str + :keyword is_negated: Required. The indicator representing if the assessment is negated. + :paramtype is_negated: bool + """ + super(SentenceAssessment, self).__init__(**kwargs) + self.sentiment = sentiment + self.confidence_scores = confidence_scores + self.offset = offset + self.length = length + self.text = text + self.is_negated = is_negated + + +class SentenceSentiment(msrest.serialization.Model): + """SentenceSentiment. + + All required parameters must be populated in order to send to Azure. + + :ivar text: Required. The sentence text. + :vartype text: str + :ivar sentiment: Required. The predicted Sentiment for the sentence. Possible values include: + "positive", "neutral", "negative". + :vartype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentimentValue + :ivar confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel + :ivar offset: Required. The sentence offset from the start of the document. + :vartype offset: int + :ivar length: Required. The length of the sentence. + :vartype length: int + :ivar targets: The array of sentence targets for the sentence. + :vartype targets: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceTarget] + :ivar assessments: The array of assessments for the sentence. + :vartype assessments: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceAssessment] + """ + + _validation = { + 'text': {'required': True}, + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + } + + _attribute_map = { + 'text': {'key': 'text', 'type': 'str'}, + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'SentimentConfidenceScorePerLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'targets': {'key': 'targets', 'type': '[SentenceTarget]'}, + 'assessments': {'key': 'assessments', 'type': '[SentenceAssessment]'}, + } + + def __init__( + self, + *, + text: str, + sentiment: Union[str, "SentenceSentimentValue"], + confidence_scores: "SentimentConfidenceScorePerLabel", + offset: int, + length: int, + targets: Optional[List["SentenceTarget"]] = None, + assessments: Optional[List["SentenceAssessment"]] = None, + **kwargs + ): + """ + :keyword text: Required. The sentence text. + :paramtype text: str + :keyword sentiment: Required. The predicted Sentiment for the sentence. Possible values + include: "positive", "neutral", "negative". + :paramtype sentiment: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.SentenceSentimentValue + :keyword confidence_scores: Required. The sentiment confidence score between 0 and 1 for the + sentence for all classes. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentConfidenceScorePerLabel + :keyword offset: Required. The sentence offset from the start of the document. + :paramtype offset: int + :keyword length: Required. The length of the sentence. + :paramtype length: int + :keyword targets: The array of sentence targets for the sentence. + :paramtype targets: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceTarget] + :keyword assessments: The array of assessments for the sentence. + :paramtype assessments: list[~azure.ai.textanalytics.v3_2_preview_2.models.SentenceAssessment] + """ + super(SentenceSentiment, self).__init__(**kwargs) + self.text = text + self.sentiment = sentiment + self.confidence_scores = confidence_scores + self.offset = offset + self.length = length + self.targets = targets + self.assessments = assessments + + +class SentenceTarget(msrest.serialization.Model): + """SentenceTarget. + + All required parameters must be populated in order to send to Azure. + + :ivar sentiment: Required. Targeted sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :vartype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue + :ivar confidence_scores: Required. Target sentiment confidence scores for the target in the + sentence. + :vartype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel + :ivar offset: Required. The target offset from the start of the sentence. + :vartype offset: int + :ivar length: Required. The length of the target. + :vartype length: int + :ivar text: Required. The target text detected. + :vartype text: str + :ivar relations: Required. The array of either assessment or target objects which is related to + the target. + :vartype relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelation] + """ + + _validation = { + 'sentiment': {'required': True}, + 'confidence_scores': {'required': True}, + 'offset': {'required': True}, + 'length': {'required': True}, + 'text': {'required': True}, + 'relations': {'required': True}, + } + + _attribute_map = { + 'sentiment': {'key': 'sentiment', 'type': 'str'}, + 'confidence_scores': {'key': 'confidenceScores', 'type': 'TargetConfidenceScoreLabel'}, + 'offset': {'key': 'offset', 'type': 'int'}, + 'length': {'key': 'length', 'type': 'int'}, + 'text': {'key': 'text', 'type': 'str'}, + 'relations': {'key': 'relations', 'type': '[TargetRelation]'}, + } + + def __init__( + self, + *, + sentiment: Union[str, "TokenSentimentValue"], + confidence_scores: "TargetConfidenceScoreLabel", + offset: int, + length: int, + text: str, + relations: List["TargetRelation"], + **kwargs + ): + """ + :keyword sentiment: Required. Targeted sentiment in the sentence. Possible values include: + "positive", "mixed", "negative". + :paramtype sentiment: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TokenSentimentValue + :keyword confidence_scores: Required. Target sentiment confidence scores for the target in the + sentence. + :paramtype confidence_scores: + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetConfidenceScoreLabel + :keyword offset: Required. The target offset from the start of the sentence. + :paramtype offset: int + :keyword length: Required. The length of the target. + :paramtype length: int + :keyword text: Required. The target text detected. + :paramtype text: str + :keyword relations: Required. The array of either assessment or target objects which is related + to the target. + :paramtype relations: list[~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelation] + """ + super(SentenceTarget, self).__init__(**kwargs) + self.sentiment = sentiment + self.confidence_scores = confidence_scores + self.offset = offset + self.length = length + self.text = text + self.relations = relations + + +class SentimentAnalysisTask(msrest.serialization.Model): + """SentimentAnalysisTask. + + :ivar parameters: + :vartype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTaskParameters + :ivar task_name: + :vartype task_name: str + """ + + _attribute_map = { + 'parameters': {'key': 'parameters', 'type': 'SentimentAnalysisTaskParameters'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + } + + def __init__( + self, + *, + parameters: Optional["SentimentAnalysisTaskParameters"] = None, + task_name: Optional[str] = None, + **kwargs + ): + """ + :keyword parameters: + :paramtype parameters: + ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentAnalysisTaskParameters + :keyword task_name: + :paramtype task_name: str + """ + super(SentimentAnalysisTask, self).__init__(**kwargs) + self.parameters = parameters + self.task_name = task_name + + +class SentimentAnalysisTaskParameters(msrest.serialization.Model): + """SentimentAnalysisTaskParameters. + + :ivar model_version: + :vartype model_version: str + :ivar logging_opt_out: + :vartype logging_opt_out: bool + :ivar opinion_mining: + :vartype opinion_mining: bool + :ivar string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :vartype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + + _attribute_map = { + 'model_version': {'key': 'model-version', 'type': 'str'}, + 'logging_opt_out': {'key': 'loggingOptOut', 'type': 'bool'}, + 'opinion_mining': {'key': 'opinionMining', 'type': 'bool'}, + 'string_index_type': {'key': 'stringIndexType', 'type': 'str'}, + } + + def __init__( + self, + *, + model_version: Optional[str] = "latest", + logging_opt_out: Optional[bool] = False, + opinion_mining: Optional[bool] = False, + string_index_type: Optional[Union[str, "StringIndexType"]] = None, + **kwargs + ): + """ + :keyword model_version: + :paramtype model_version: str + :keyword logging_opt_out: + :paramtype logging_opt_out: bool + :keyword opinion_mining: + :paramtype opinion_mining: bool + :keyword string_index_type: Possible values include: "TextElement_v8", "UnicodeCodePoint", + "Utf16CodeUnit". + :paramtype string_index_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType + """ + super(SentimentAnalysisTaskParameters, self).__init__(**kwargs) + self.model_version = model_version + self.logging_opt_out = logging_opt_out + self.opinion_mining = opinion_mining + self.string_index_type = string_index_type + + +class SentimentConfidenceScorePerLabel(msrest.serialization.Model): + """Represents the confidence scores between 0 and 1 across all sentiment classes: positive, neutral, negative. + + All required parameters must be populated in order to send to Azure. + + :ivar positive: Required. + :vartype positive: float + :ivar neutral: Required. + :vartype neutral: float + :ivar negative: Required. + :vartype negative: float + """ + + _validation = { + 'positive': {'required': True}, + 'neutral': {'required': True}, + 'negative': {'required': True}, + } + + _attribute_map = { + 'positive': {'key': 'positive', 'type': 'float'}, + 'neutral': {'key': 'neutral', 'type': 'float'}, + 'negative': {'key': 'negative', 'type': 'float'}, + } + + def __init__( + self, + *, + positive: float, + neutral: float, + negative: float, + **kwargs + ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword neutral: Required. + :paramtype neutral: float + :keyword negative: Required. + :paramtype negative: float + """ + super(SentimentConfidenceScorePerLabel, self).__init__(**kwargs) + self.positive = positive + self.neutral = neutral + self.negative = negative + + +class SentimentResponse(msrest.serialization.Model): + """SentimentResponse. + + All required parameters must be populated in order to send to Azure. + + :ivar documents: Required. Sentiment analysis per document. + :vartype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentiment] + :ivar errors: Required. Errors by document id. + :vartype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :ivar model_version: Required. This field indicates which model is used for scoring. + :vartype model_version: str + """ + + _validation = { + 'documents': {'required': True}, + 'errors': {'required': True}, + 'model_version': {'required': True}, + } + + _attribute_map = { + 'documents': {'key': 'documents', 'type': '[DocumentSentiment]'}, + 'errors': {'key': 'errors', 'type': '[DocumentError]'}, + 'statistics': {'key': 'statistics', 'type': 'RequestStatistics'}, + 'model_version': {'key': 'modelVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + documents: List["DocumentSentiment"], + errors: List["DocumentError"], + model_version: str, + statistics: Optional["RequestStatistics"] = None, + **kwargs + ): + """ + :keyword documents: Required. Sentiment analysis per document. + :paramtype documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentSentiment] + :keyword errors: Required. Errors by document id. + :paramtype errors: list[~azure.ai.textanalytics.v3_2_preview_2.models.DocumentError] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the request payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.RequestStatistics + :keyword model_version: Required. This field indicates which model is used for scoring. + :paramtype model_version: str + """ + super(SentimentResponse, self).__init__(**kwargs) + self.documents = documents + self.errors = errors + self.statistics = statistics + self.model_version = model_version + + +class SentimentTaskResult(msrest.serialization.Model): + """SentimentTaskResult. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse + """ + + _attribute_map = { + 'results': {'key': 'results', 'type': 'SentimentResponse'}, + } + + def __init__( + self, + *, + results: Optional["SentimentResponse"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse + """ + super(SentimentTaskResult, self).__init__(**kwargs) + self.results = results + + +class SingleClassificationDocument(msrest.serialization.Model): + """SingleClassificationDocument. + + All required parameters must be populated in order to send to Azure. + + :ivar id: Required. Unique, non-empty document identifier. + :vartype id: str + :ivar classification: Required. + :vartype classification: ~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult + :ivar warnings: Required. Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :ivar statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + + _validation = { + 'id': {'required': True}, + 'classification': {'required': True}, + 'warnings': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'classification': {'key': 'classification', 'type': 'ClassificationResult'}, + 'warnings': {'key': 'warnings', 'type': '[TextAnalyticsWarning]'}, + 'statistics': {'key': 'statistics', 'type': 'DocumentStatistics'}, + } + + def __init__( + self, + *, + id: str, + classification: "ClassificationResult", + warnings: List["TextAnalyticsWarning"], + statistics: Optional["DocumentStatistics"] = None, + **kwargs + ): + """ + :keyword id: Required. Unique, non-empty document identifier. + :paramtype id: str + :keyword classification: Required. + :paramtype classification: ~azure.ai.textanalytics.v3_2_preview_2.models.ClassificationResult + :keyword warnings: Required. Warnings encountered while processing document. + :paramtype warnings: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsWarning] + :keyword statistics: if showStats=true was specified in the request this field will contain + information about the document payload. + :paramtype statistics: ~azure.ai.textanalytics.v3_2_preview_2.models.DocumentStatistics + """ + super(SingleClassificationDocument, self).__init__(**kwargs) + self.id = id + self.classification = classification + self.warnings = warnings + self.statistics = statistics + + +class TargetConfidenceScoreLabel(msrest.serialization.Model): + """Represents the confidence scores across all sentiment classes: positive, neutral, negative. + + All required parameters must be populated in order to send to Azure. + + :ivar positive: Required. + :vartype positive: float + :ivar negative: Required. + :vartype negative: float + """ + + _validation = { + 'positive': {'required': True}, + 'negative': {'required': True}, + } + + _attribute_map = { + 'positive': {'key': 'positive', 'type': 'float'}, + 'negative': {'key': 'negative', 'type': 'float'}, + } + + def __init__( + self, + *, + positive: float, + negative: float, + **kwargs + ): + """ + :keyword positive: Required. + :paramtype positive: float + :keyword negative: Required. + :paramtype negative: float + """ + super(TargetConfidenceScoreLabel, self).__init__(**kwargs) + self.positive = positive + self.negative = negative + + +class TargetRelation(msrest.serialization.Model): + """TargetRelation. + + All required parameters must be populated in order to send to Azure. + + :ivar relation_type: Required. The type related to the target. Possible values include: + "assessment", "target". + :vartype relation_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelationType + :ivar ref: Required. The JSON pointer indicating the linked object. + :vartype ref: str + """ + + _validation = { + 'relation_type': {'required': True}, + 'ref': {'required': True}, + } + + _attribute_map = { + 'relation_type': {'key': 'relationType', 'type': 'str'}, + 'ref': {'key': 'ref', 'type': 'str'}, + } + + def __init__( + self, + *, + relation_type: Union[str, "TargetRelationType"], + ref: str, + **kwargs + ): + """ + :keyword relation_type: Required. The type related to the target. Possible values include: + "assessment", "target". + :paramtype relation_type: str or + ~azure.ai.textanalytics.v3_2_preview_2.models.TargetRelationType + :keyword ref: Required. The JSON pointer indicating the linked object. + :paramtype ref: str + """ + super(TargetRelation, self).__init__(**kwargs) + self.relation_type = relation_type + self.ref = ref + + +class TasksStateTasks(msrest.serialization.Model): + """TasksStateTasks. + + All required parameters must be populated in order to send to Azure. + + :ivar completed: Required. + :vartype completed: int + :ivar failed: Required. + :vartype failed: int + :ivar in_progress: Required. + :vartype in_progress: int + :ivar total: Required. + :vartype total: int + :ivar entity_recognition_tasks: + :vartype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionTasksItem] + :ivar entity_recognition_pii_tasks: + :vartype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionPiiTasksItem] + :ivar key_phrase_extraction_tasks: + :vartype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksKeyPhraseExtractionTasksItem] + :ivar entity_linking_tasks: + :vartype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityLinkingTasksItem] + :ivar sentiment_analysis_tasks: + :vartype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksSentimentAnalysisTasksItem] + :ivar extractive_summarization_tasks: + :vartype extractive_summarization_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksExtractiveSummarizationTasksItem] + :ivar custom_entity_recognition_tasks: + :vartype custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomEntityRecognitionTasksItem] + :ivar custom_single_classification_tasks: + :vartype custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomSingleClassificationTasksItem] + :ivar custom_multi_classification_tasks: + :vartype custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomMultiClassificationTasksItem] + """ + + _validation = { + 'completed': {'required': True}, + 'failed': {'required': True}, + 'in_progress': {'required': True}, + 'total': {'required': True}, + } + + _attribute_map = { + 'completed': {'key': 'completed', 'type': 'int'}, + 'failed': {'key': 'failed', 'type': 'int'}, + 'in_progress': {'key': 'inProgress', 'type': 'int'}, + 'total': {'key': 'total', 'type': 'int'}, + 'entity_recognition_tasks': {'key': 'entityRecognitionTasks', 'type': '[TasksStateTasksEntityRecognitionTasksItem]'}, + 'entity_recognition_pii_tasks': {'key': 'entityRecognitionPiiTasks', 'type': '[TasksStateTasksEntityRecognitionPiiTasksItem]'}, + 'key_phrase_extraction_tasks': {'key': 'keyPhraseExtractionTasks', 'type': '[TasksStateTasksKeyPhraseExtractionTasksItem]'}, + 'entity_linking_tasks': {'key': 'entityLinkingTasks', 'type': '[TasksStateTasksEntityLinkingTasksItem]'}, + 'sentiment_analysis_tasks': {'key': 'sentimentAnalysisTasks', 'type': '[TasksStateTasksSentimentAnalysisTasksItem]'}, + 'extractive_summarization_tasks': {'key': 'extractiveSummarizationTasks', 'type': '[TasksStateTasksExtractiveSummarizationTasksItem]'}, + 'custom_entity_recognition_tasks': {'key': 'customEntityRecognitionTasks', 'type': '[TasksStateTasksCustomEntityRecognitionTasksItem]'}, + 'custom_single_classification_tasks': {'key': 'customSingleClassificationTasks', 'type': '[TasksStateTasksCustomSingleClassificationTasksItem]'}, + 'custom_multi_classification_tasks': {'key': 'customMultiClassificationTasks', 'type': '[TasksStateTasksCustomMultiClassificationTasksItem]'}, + } + + def __init__( + self, + *, + completed: int, + failed: int, + in_progress: int, + total: int, + entity_recognition_tasks: Optional[List["TasksStateTasksEntityRecognitionTasksItem"]] = None, + entity_recognition_pii_tasks: Optional[List["TasksStateTasksEntityRecognitionPiiTasksItem"]] = None, + key_phrase_extraction_tasks: Optional[List["TasksStateTasksKeyPhraseExtractionTasksItem"]] = None, + entity_linking_tasks: Optional[List["TasksStateTasksEntityLinkingTasksItem"]] = None, + sentiment_analysis_tasks: Optional[List["TasksStateTasksSentimentAnalysisTasksItem"]] = None, + extractive_summarization_tasks: Optional[List["TasksStateTasksExtractiveSummarizationTasksItem"]] = None, + custom_entity_recognition_tasks: Optional[List["TasksStateTasksCustomEntityRecognitionTasksItem"]] = None, + custom_single_classification_tasks: Optional[List["TasksStateTasksCustomSingleClassificationTasksItem"]] = None, + custom_multi_classification_tasks: Optional[List["TasksStateTasksCustomMultiClassificationTasksItem"]] = None, + **kwargs + ): + """ + :keyword completed: Required. + :paramtype completed: int + :keyword failed: Required. + :paramtype failed: int + :keyword in_progress: Required. + :paramtype in_progress: int + :keyword total: Required. + :paramtype total: int + :keyword entity_recognition_tasks: + :paramtype entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionTasksItem] + :keyword entity_recognition_pii_tasks: + :paramtype entity_recognition_pii_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityRecognitionPiiTasksItem] + :keyword key_phrase_extraction_tasks: + :paramtype key_phrase_extraction_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksKeyPhraseExtractionTasksItem] + :keyword entity_linking_tasks: + :paramtype entity_linking_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksEntityLinkingTasksItem] + :keyword sentiment_analysis_tasks: + :paramtype sentiment_analysis_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksSentimentAnalysisTasksItem] + :keyword extractive_summarization_tasks: + :paramtype extractive_summarization_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksExtractiveSummarizationTasksItem] + :keyword custom_entity_recognition_tasks: + :paramtype custom_entity_recognition_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomEntityRecognitionTasksItem] + :keyword custom_single_classification_tasks: + :paramtype custom_single_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomSingleClassificationTasksItem] + :keyword custom_multi_classification_tasks: + :paramtype custom_multi_classification_tasks: + list[~azure.ai.textanalytics.v3_2_preview_2.models.TasksStateTasksCustomMultiClassificationTasksItem] + """ + super(TasksStateTasks, self).__init__(**kwargs) + self.completed = completed + self.failed = failed + self.in_progress = in_progress + self.total = total + self.entity_recognition_tasks = entity_recognition_tasks + self.entity_recognition_pii_tasks = entity_recognition_pii_tasks + self.key_phrase_extraction_tasks = key_phrase_extraction_tasks + self.entity_linking_tasks = entity_linking_tasks + self.sentiment_analysis_tasks = sentiment_analysis_tasks + self.extractive_summarization_tasks = extractive_summarization_tasks + self.custom_entity_recognition_tasks = custom_entity_recognition_tasks + self.custom_single_classification_tasks = custom_single_classification_tasks + self.custom_multi_classification_tasks = custom_multi_classification_tasks + + +class TaskState(msrest.serialization.Model): + """TaskState. + + All required parameters must be populated in order to send to Azure. + + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + **kwargs + ): + """ + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TaskState, self).__init__(**kwargs) + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksCustomEntityRecognitionTasksItem(TaskState, CustomEntitiesTaskResult): + """TasksStateTasksCustomEntityRecognitionTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomEntitiesResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["CustomEntitiesResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomEntitiesResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksCustomEntityRecognitionTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksCustomMultiClassificationTasksItem(TaskState, CustomMultiClassificationTaskResult): + """TasksStateTasksCustomMultiClassificationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomMultiClassificationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["CustomMultiClassificationResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomMultiClassificationResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksCustomMultiClassificationTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksCustomSingleClassificationTasksItem(TaskState, CustomSingleClassificationTaskResult): + """TasksStateTasksCustomSingleClassificationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'CustomSingleClassificationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["CustomSingleClassificationResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: + ~azure.ai.textanalytics.v3_2_preview_2.models.CustomSingleClassificationResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksCustomSingleClassificationTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksEntityLinkingTasksItem(TaskState, EntityLinkingTaskResult): + """TasksStateTasksEntityLinkingTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'EntityLinkingResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["EntityLinkingResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksEntityLinkingTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksEntityRecognitionPiiTasksItem(TaskState, PiiTaskResult): + """TasksStateTasksEntityRecognitionPiiTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'PiiResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["PiiResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksEntityRecognitionPiiTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksEntityRecognitionTasksItem(TaskState, EntitiesTaskResult): + """TasksStateTasksEntityRecognitionTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'EntitiesResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["EntitiesResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksEntityRecognitionTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksExtractiveSummarizationTasksItem(TaskState, ExtractiveSummarizationTaskResult): + """TasksStateTasksExtractiveSummarizationTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'ExtractiveSummarizationResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["ExtractiveSummarizationResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.ExtractiveSummarizationResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksExtractiveSummarizationTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksKeyPhraseExtractionTasksItem(TaskState, KeyPhraseTaskResult): + """TasksStateTasksKeyPhraseExtractionTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'KeyPhraseResult'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["KeyPhraseResult"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksKeyPhraseExtractionTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TasksStateTasksSentimentAnalysisTasksItem(TaskState, SentimentTaskResult): + """TasksStateTasksSentimentAnalysisTasksItem. + + All required parameters must be populated in order to send to Azure. + + :ivar results: + :vartype results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse + :ivar last_update_date_time: Required. + :vartype last_update_date_time: ~datetime.datetime + :ivar task_name: Required. + :vartype task_name: str + :ivar status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :vartype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + + _validation = { + 'last_update_date_time': {'required': True}, + 'task_name': {'required': True}, + 'status': {'required': True}, + } + + _attribute_map = { + 'results': {'key': 'results', 'type': 'SentimentResponse'}, + 'last_update_date_time': {'key': 'lastUpdateDateTime', 'type': 'iso-8601'}, + 'task_name': {'key': 'taskName', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + last_update_date_time: datetime.datetime, + task_name: str, + status: Union[str, "State"], + results: Optional["SentimentResponse"] = None, + **kwargs + ): + """ + :keyword results: + :paramtype results: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse + :keyword last_update_date_time: Required. + :paramtype last_update_date_time: ~datetime.datetime + :keyword task_name: Required. + :paramtype task_name: str + :keyword status: Required. Possible values include: "notStarted", "running", "succeeded", + "failed", "rejected", "cancelled", "cancelling". + :paramtype status: str or ~azure.ai.textanalytics.v3_2_preview_2.models.State + """ + super(TasksStateTasksSentimentAnalysisTasksItem, self).__init__(last_update_date_time=last_update_date_time, task_name=task_name, status=status, results=results, **kwargs) + self.results = results + self.last_update_date_time = last_update_date_time + self.task_name = task_name + self.status = status + + +class TextAnalyticsError(msrest.serialization.Model): + """TextAnalyticsError. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Error code. Possible values include: "InvalidRequest", "InvalidArgument", + "InternalServerError", "ServiceUnavailable", "NotFound". + :vartype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.ErrorCodeValue + :ivar message: Required. Error message. + :vartype message: str + :ivar target: Error target. + :vartype target: str + :ivar innererror: Inner error contains more specific information. + :vartype innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError + :ivar details: Details about specific errors that led to this reported error. + :vartype details: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'innererror': {'key': 'innererror', 'type': 'InnerError'}, + 'details': {'key': 'details', 'type': '[TextAnalyticsError]'}, + } + + def __init__( + self, + *, + code: Union[str, "ErrorCodeValue"], + message: str, + target: Optional[str] = None, + innererror: Optional["InnerError"] = None, + details: Optional[List["TextAnalyticsError"]] = None, + **kwargs + ): + """ + :keyword code: Required. Error code. Possible values include: "InvalidRequest", + "InvalidArgument", "InternalServerError", "ServiceUnavailable", "NotFound". + :paramtype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.ErrorCodeValue + :keyword message: Required. Error message. + :paramtype message: str + :keyword target: Error target. + :paramtype target: str + :keyword innererror: Inner error contains more specific information. + :paramtype innererror: ~azure.ai.textanalytics.v3_2_preview_2.models.InnerError + :keyword details: Details about specific errors that led to this reported error. + :paramtype details: list[~azure.ai.textanalytics.v3_2_preview_2.models.TextAnalyticsError] + """ + super(TextAnalyticsError, self).__init__(**kwargs) + self.code = code + self.message = message + self.target = target + self.innererror = innererror + self.details = details + + +class TextAnalyticsWarning(msrest.serialization.Model): + """TextAnalyticsWarning. + + All required parameters must be populated in order to send to Azure. + + :ivar code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :vartype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.WarningCodeValue + :ivar message: Required. Warning message. + :vartype message: str + :ivar target_ref: A JSON pointer reference indicating the target object. + :vartype target_ref: str + """ + + _validation = { + 'code': {'required': True}, + 'message': {'required': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target_ref': {'key': 'targetRef', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Union[str, "WarningCodeValue"], + message: str, + target_ref: Optional[str] = None, + **kwargs + ): + """ + :keyword code: Required. Error code. Possible values include: "LongWordsInDocument", + "DocumentTruncated". + :paramtype code: str or ~azure.ai.textanalytics.v3_2_preview_2.models.WarningCodeValue + :keyword message: Required. Warning message. + :paramtype message: str + :keyword target_ref: A JSON pointer reference indicating the target object. + :paramtype target_ref: str + """ + super(TextAnalyticsWarning, self).__init__(**kwargs) + self.code = code + self.message = message + self.target_ref = target_ref diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_text_analytics_client_enums.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_text_analytics_client_enums.py similarity index 89% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_text_analytics_client_enums.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_text_analytics_client_enums.py index 06156b3b116d..61ecf267b1a7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/models/_text_analytics_client_enums.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/models/_text_analytics_client_enums.py @@ -6,34 +6,19 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class Association(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Association(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes if the entity is the subject of the text or if it describes someone else. """ SUBJECT = "subject" OTHER = "other" -class Certainty(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Certainty(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes the entities certainty and polarity. """ @@ -43,14 +28,14 @@ class Certainty(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): NEGATIVE_POSSIBLE = "negativePossible" NEGATIVE = "negative" -class Conditionality(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class Conditionality(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes any conditionality on the entity. """ HYPOTHETICAL = "hypothetical" CONDITIONAL = "conditional" -class DocumentSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class DocumentSentimentValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Predicted sentiment for document (Negative, Neutral, Positive, or Mixed). """ @@ -59,7 +44,7 @@ class DocumentSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) NEGATIVE = "negative" MIXED = "mixed" -class ErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ErrorCodeValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ @@ -69,12 +54,12 @@ class ErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): SERVICE_UNAVAILABLE = "ServiceUnavailable" NOT_FOUND = "NotFound" -class ExtractiveSummarizationTaskParametersSortBy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ExtractiveSummarizationTaskParametersSortBy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): OFFSET = "Offset" RANK = "Rank" -class HealthcareEntityCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class HealthcareEntityCategory(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Healthcare Entity Category. """ @@ -105,7 +90,7 @@ class HealthcareEntityCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enu FAMILY_RELATION = "FAMILY_RELATION" TREATMENT_NAME = "TREATMENT_NAME" -class InnerErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class InnerErrorCodeValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ @@ -119,7 +104,7 @@ class InnerErrorCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): UNSUPPORTED_LANGUAGE_CODE = "UnsupportedLanguageCode" INVALID_COUNTRY_HINT = "InvalidCountryHint" -class PiiCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class PiiCategory(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): ABA_ROUTING_NUMBER = "ABARoutingNumber" AR_NATIONAL_IDENTITY_NUMBER = "ARNationalIdentityNumber" @@ -295,12 +280,12 @@ class PiiCategory(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ALL = "All" DEFAULT = "Default" -class PiiTaskParametersDomain(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class PiiTaskParametersDomain(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): PHI = "phi" NONE = "none" -class RelationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RelationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of relation. Examples include: ``DosageOfMedication`` or 'FrequencyOfMedication', etc. """ @@ -326,7 +311,7 @@ class RelationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): VALUE_OF_CONDITION = "ValueOfCondition" VALUE_OF_EXAMINATION = "ValueOfExamination" -class SentenceSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SentenceSentimentValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The predicted Sentiment for the sentence. """ @@ -334,7 +319,7 @@ class SentenceSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) NEUTRAL = "neutral" NEGATIVE = "negative" -class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class State(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): NOT_STARTED = "notStarted" RUNNING = "running" @@ -344,7 +329,7 @@ class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): CANCELLED = "cancelled" CANCELLING = "cancelling" -class StringIndexType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class StringIndexType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Returned offset and length values will correspond to TextElements (Graphemes and Grapheme #: clusters) confirming to the Unicode 8.0.0 standard. Use this option if your application is @@ -357,14 +342,14 @@ class StringIndexType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: application is written in a language that support Unicode, for example Java, JavaScript. UTF16_CODE_UNIT = "Utf16CodeUnit" -class TargetRelationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TargetRelationType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The type related to the target. """ ASSESSMENT = "assessment" TARGET = "target" -class TokenSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class TokenSentimentValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Targeted sentiment in the sentence. """ @@ -372,7 +357,7 @@ class TokenSentimentValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MIXED = "mixed" NEGATIVE = "negative" -class WarningCodeValue(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class WarningCodeValue(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Error code. """ diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/__init__.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/__init__.py similarity index 100% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/__init__.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/__init__.py diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/_text_analytics_client_operations.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/_text_analytics_client_operations.py similarity index 60% rename from sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/_text_analytics_client_operations.py rename to sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/_text_analytics_client_operations.py index 65b540342722..c226e00b86c4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_1/operations/_text_analytics_client_operations.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/operations/_text_analytics_client_operations.py @@ -5,17 +5,22 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING import warnings from ...._lro import AnalyzeActionsLROPoller, AnalyzeActionsLROPollingMethod, AnalyzeHealthcareEntitiesLROPoller, AnalyzeHealthcareEntitiesLROPollingMethod from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse -from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.pipeline.transport import HttpResponse from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.core.polling.base_polling import LROBasePolling +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer from .. import models as _models +from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -24,6 +29,419 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] +_SERIALIZER = Serializer() +# fmt: off + +def build_analyze_request_initial( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/analyze') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_analyze_status_request( + job_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + top = kwargs.pop('top', 20) # type: Optional[int] + skip = kwargs.pop('skip', 0) # type: Optional[int] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/analyze/jobs/{jobId}') + path_format_arguments = { + "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int', maximum=50, minimum=1) + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'int', minimum=0) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_health_status_request( + job_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + top = kwargs.pop('top', 20) # type: Optional[int] + skip = kwargs.pop('skip', 0) # type: Optional[int] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/health/jobs/{jobId}') + path_format_arguments = { + "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if top is not None: + query_parameters['$top'] = _SERIALIZER.query("top", top, 'int', maximum=50, minimum=1) + if skip is not None: + query_parameters['$skip'] = _SERIALIZER.query("skip", skip, 'int', minimum=0) + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="GET", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_cancel_health_job_request_initial( + job_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/health/jobs/{jobId}') + path_format_arguments = { + "jobId": _SERIALIZER.url("job_id", job_id, 'str'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + headers=header_parameters, + **kwargs + ) + + +def build_health_request_initial( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/health/jobs') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_entities_recognition_general_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/recognition/general') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_entities_recognition_pii_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + domain = kwargs.pop('domain', None) # type: Optional[str] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + pii_categories = kwargs.pop('pii_categories', None) # type: Optional[List[Union[str, "_models.PiiCategory"]]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/recognition/pii') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + if domain is not None: + query_parameters['domain'] = _SERIALIZER.query("domain", domain, 'str') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + if pii_categories is not None: + query_parameters['piiCategories'] = _SERIALIZER.query("pii_categories", pii_categories, '[str]', div=',') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_entities_linking_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/entities/linking') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_key_phrases_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/keyPhrases') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_languages_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/languages') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_sentiment_request( + **kwargs # type: Any +): + # type: (...) -> HttpRequest + content_type = kwargs.pop('content_type', None) # type: Optional[str] + model_version = kwargs.pop('model_version', None) # type: Optional[str] + show_stats = kwargs.pop('show_stats', None) # type: Optional[bool] + logging_opt_out = kwargs.pop('logging_opt_out', None) # type: Optional[bool] + opinion_mining = kwargs.pop('opinion_mining', None) # type: Optional[bool] + string_index_type = kwargs.pop('string_index_type', None) # type: Optional[Union[str, "_models.StringIndexType"]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/sentiment') + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if model_version is not None: + query_parameters['model-version'] = _SERIALIZER.query("model_version", model_version, 'str') + if show_stats is not None: + query_parameters['showStats'] = _SERIALIZER.query("show_stats", show_stats, 'bool') + if logging_opt_out is not None: + query_parameters['loggingOptOut'] = _SERIALIZER.query("logging_opt_out", logging_opt_out, 'bool') + if opinion_mining is not None: + query_parameters['opinionMining'] = _SERIALIZER.query("opinion_mining", opinion_mining, 'bool') + if string_index_type is not None: + query_parameters['stringIndexType'] = _SERIALIZER.query("string_index_type", string_index_type, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on class TextAnalyticsClientOperationsMixin(object): def _analyze_initial( @@ -37,53 +455,50 @@ def _analyze_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" - # Construct URL - url = self._analyze_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] if body is not None: - body_content = self._serialize.body(body, 'AnalyzeBatchInput') + json = self._serialize.body(body, 'AnalyzeBatchInput') else: - body_content = None - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + json = None + + request = build_analyze_request_initial( + content_type=content_type, + json=json, + template_url=self._analyze_initial.metadata['url'], + ) + request = _convert_request(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('AnalyzeJobState', pipeline_response) if response.status_code == 202: response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + _analyze_initial.metadata = {'url': '/analyze'} # type: ignore + + @distributed_trace def begin_analyze( self, body=None, # type: Optional["_models.AnalyzeBatchInput"] @@ -96,18 +511,23 @@ def begin_analyze( executed. :param body: Collection of documents to analyze and tasks to execute. - :type body: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeBatchInput + :type body: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeBatchInput :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AnalyzeActionsLROPollingMethod. Pass + in False for this operation to not poll, or pass in your own initialized polling object for a + personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the result of cls(response) - :rtype: ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AnalyzeActionsLROPoller that returns either AnalyzeJobState or the + result of cls(response) + :rtype: + ~...._lro.AnalyzeActionsLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeJobState"] lro_delay = kwargs.pop( 'polling_interval', @@ -117,25 +537,25 @@ def begin_analyze( if cont_token is None: raw_result = self._analyze_initial( body=body, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('AnalyzeJobState', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AnalyzeActionsLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -147,8 +567,10 @@ def get_long_running_output(pipeline_response): ) else: return AnalyzeActionsLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_analyze.metadata = {'url': '/analyze'} # type: ignore + @distributed_trace def analyze_status( self, job_id, # type: str @@ -177,7 +599,7 @@ def analyze_status( :type skip: int :keyword callable cls: A custom type or function that will be passed the direct response :return: AnalyzeJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.AnalyzeJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.AnalyzeJobState :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.AnalyzeJobState"] @@ -185,36 +607,27 @@ def analyze_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self.analyze_status.metadata['url'] # type: ignore + + request = build_analyze_status_request( + job_id=job_id, + show_stats=show_stats, + top=top, + skip=skip, + template_url=self.analyze_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=50, minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('AnalyzeJobState', pipeline_response) @@ -223,8 +636,11 @@ def analyze_status( return cls(pipeline_response, deserialized, {}) return deserialized + analyze_status.metadata = {'url': '/analyze/jobs/{jobId}'} # type: ignore + + @distributed_trace def health_status( self, job_id, # type: str @@ -251,7 +667,7 @@ def health_status( :type show_stats: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: HealthcareJobState, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.HealthcareJobState"] @@ -259,36 +675,27 @@ def health_status( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self.health_status.metadata['url'] # type: ignore + + request = build_health_status_request( + job_id=job_id, + top=top, + skip=skip, + show_stats=show_stats, + template_url=self.health_status.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int', maximum=50, minimum=1) - if skip is not None: - query_parameters['$skip'] = self._serialize.query("skip", skip, 'int', minimum=0) - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.get(url, query_parameters, header_parameters) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('HealthcareJobState', pipeline_response) @@ -297,8 +704,10 @@ def health_status( return cls(pipeline_response, deserialized, {}) return deserialized + health_status.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore + def _cancel_health_job_initial( self, job_id, # type: str @@ -310,40 +719,36 @@ def _cancel_health_job_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - accept = "application/json, text/json" - # Construct URL - url = self._cancel_health_job_initial.metadata['url'] # type: ignore + + request = build_cancel_health_job_request_initial( + job_id=job_id, + template_url=self._cancel_health_job_initial.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) + request.url = self._client.format_url(request.url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) response_headers = {} response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, None, response_headers) _cancel_health_job_initial.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore + + @distributed_trace def begin_cancel_health_job( self, job_id, # type: str @@ -358,15 +763,17 @@ def begin_cancel_health_job( :type job_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be LROBasePolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be LROBasePolling. Pass in False for + this operation to not poll, or pass in your own initialized polling object for a personal + polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -379,20 +786,18 @@ def begin_cancel_health_job( cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): if cls: return cls(pipeline_response, None, {}) + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), - 'jobId': self._serialize.url("job_id", job_id, 'str'), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = LROBasePolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -404,6 +809,7 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel_health_job.metadata = {'url': '/entities/health/jobs/{jobId}'} # type: ignore def _health_initial( @@ -421,57 +827,50 @@ def _health_initial( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self._health_initial.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_health_request_initial( + content_type=content_type, + model_version=model_version, + string_index_type=string_index_type, + logging_opt_out=logging_opt_out, + json=json, + template_url=self._health_initial.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error) + raise HttpResponseError(response=response) - response_headers = {} deserialized = None + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('HealthcareJobState', pipeline_response) if response.status_code == 202: response_headers['Operation-Location']=self._deserialize('str', response.headers.get('Operation-Location')) + if cls: return cls(pipeline_response, deserialized, response_headers) return deserialized + _health_initial.metadata = {'url': '/entities/health/jobs'} # type: ignore + + @distributed_trace def begin_health( self, documents, # type: List["_models.MultiLanguageInput"] @@ -487,14 +886,14 @@ def begin_health( symptoms, etc) and their relations. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param logging_opt_out: (Optional) If set to true, you opt-out of having your text input logged for troubleshooting. By default, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with the Text Analytics natural language @@ -505,15 +904,20 @@ def begin_health( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be AnalyzeHealthcareEntitiesLROPollingMethod. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be + AnalyzeHealthcareEntitiesLROPollingMethod. Pass in False for this operation to not poll, or + pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either HealthcareJobState or the result of cls(response) - :rtype: ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_1.models.HealthcareJobState] - :raises ~azure.core.exceptions.HttpResponseError: + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no + Retry-After header is present. + :return: An instance of AnalyzeHealthcareEntitiesLROPoller that returns either + HealthcareJobState or the result of cls(response) + :rtype: + ~...._lro.AnalyzeHealthcareEntitiesLROPoller[~azure.ai.textanalytics.v3_2_preview_2.models.HealthcareJobState] + :raises: ~azure.core.exceptions.HttpResponseError """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.HealthcareJobState"] lro_delay = kwargs.pop( 'polling_interval', @@ -526,25 +930,25 @@ def begin_health( model_version=model_version, string_index_type=string_index_type, logging_opt_out=logging_opt_out, + content_type=content_type, cls=lambda x,y,z: x, **kwargs ) - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): + response = pipeline_response.http_response deserialized = self._deserialize('HealthcareJobState', pipeline_response) - if cls: return cls(pipeline_response, deserialized, {}) return deserialized + path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - if polling is True: polling_method = AnalyzeHealthcareEntitiesLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + if polling is True: polling_method = AnalyzeHealthcareEntitiesLROPollingMethod(lro_delay, path_format_arguments=path_format_arguments, **kwargs) elif polling is False: polling_method = NoPolling() else: polling_method = polling if cont_token: @@ -556,8 +960,10 @@ def get_long_running_output(pipeline_response): ) else: return AnalyzeHealthcareEntitiesLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_health.metadata = {'url': '/entities/health/jobs'} # type: ignore + @distributed_trace def entities_recognition_general( self, documents, # type: List["_models.MultiLanguageInput"] @@ -576,7 +982,7 @@ def entities_recognition_general( Analytics API` for the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -594,10 +1000,10 @@ def entities_recognition_general( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntitiesResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntitiesResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntitiesResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EntitiesResult"] @@ -606,43 +1012,32 @@ def entities_recognition_general( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_general.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_general_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + string_index_type=string_index_type, + json=json, + template_url=self.entities_recognition_general.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntitiesResult', pipeline_response) @@ -651,8 +1046,11 @@ def entities_recognition_general( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_general.metadata = {'url': '/entities/recognition/general'} # type: ignore + + @distributed_trace def entities_recognition_pii( self, documents, # type: List["_models.MultiLanguageInput"] @@ -674,7 +1072,7 @@ def entities_recognition_pii( list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -695,12 +1093,12 @@ def entities_recognition_pii( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :param pii_categories: (Optional) describes the PII categories to return. - :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_1.models.PiiCategory] + :type pii_categories: list[str or ~azure.ai.textanalytics.v3_2_preview_2.models.PiiCategory] :keyword callable cls: A custom type or function that will be passed the direct response :return: PiiResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.PiiResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.PiiResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.PiiResult"] @@ -709,47 +1107,34 @@ def entities_recognition_pii( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_recognition_pii.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_recognition_pii_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + domain=domain, + string_index_type=string_index_type, + pii_categories=pii_categories, + json=json, + template_url=self.entities_recognition_pii.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if domain is not None: - query_parameters['domain'] = self._serialize.query("domain", domain, 'str') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - if pii_categories is not None: - query_parameters['piiCategories'] = self._serialize.query("pii_categories", pii_categories, '[str]', div=',') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('PiiResult', pipeline_response) @@ -758,8 +1143,11 @@ def entities_recognition_pii( return cls(pipeline_response, deserialized, {}) return deserialized + entities_recognition_pii.metadata = {'url': '/entities/recognition/pii'} # type: ignore + + @distributed_trace def entities_linking( self, documents, # type: List["_models.MultiLanguageInput"] @@ -777,7 +1165,7 @@ def entities_linking( the list of enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -795,10 +1183,10 @@ def entities_linking( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: EntityLinkingResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.EntityLinkingResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.EntityLinkingResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.EntityLinkingResult"] @@ -807,43 +1195,32 @@ def entities_linking( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.entities_linking.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_entities_linking_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + string_index_type=string_index_type, + json=json, + template_url=self.entities_linking.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('EntityLinkingResult', pipeline_response) @@ -852,8 +1229,11 @@ def entities_linking( return cls(pipeline_response, deserialized, {}) return deserialized + entities_linking.metadata = {'url': '/entities/linking'} # type: ignore + + @distributed_trace def key_phrases( self, documents, # type: List["_models.MultiLanguageInput"] @@ -870,7 +1250,7 @@ def key_phrases( enabled languages. :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -887,7 +1267,7 @@ def key_phrases( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: KeyPhraseResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.KeyPhraseResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.KeyPhraseResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyPhraseResult"] @@ -896,41 +1276,31 @@ def key_phrases( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.key_phrases.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_key_phrases_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + json=json, + template_url=self.key_phrases.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('KeyPhraseResult', pipeline_response) @@ -939,8 +1309,11 @@ def key_phrases( return cls(pipeline_response, deserialized, {}) return deserialized + key_phrases.metadata = {'url': '/keyPhrases'} # type: ignore + + @distributed_trace def languages( self, documents, # type: List["_models.LanguageInput"] @@ -958,7 +1331,7 @@ def languages( enabled languages. :param documents: - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.LanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.LanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -975,7 +1348,7 @@ def languages( :type logging_opt_out: bool :keyword callable cls: A custom type or function that will be passed the direct response :return: LanguageResult, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.LanguageResult + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.LanguageResult :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.LanguageResult"] @@ -984,41 +1357,31 @@ def languages( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.LanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.languages.metadata['url'] # type: ignore + _input = _models.LanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'LanguageBatchInput') + + request = build_languages_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + json=json, + template_url=self.languages.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'LanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('LanguageResult', pipeline_response) @@ -1027,8 +1390,11 @@ def languages( return cls(pipeline_response, deserialized, {}) return deserialized + languages.metadata = {'url': '/languages'} # type: ignore + + @distributed_trace def sentiment( self, documents, # type: List["_models.MultiLanguageInput"] @@ -1047,7 +1413,7 @@ def sentiment( (targets and assessments). :param documents: The set of documents to process as part of this batch. - :type documents: list[~azure.ai.textanalytics.v3_2_preview_1.models.MultiLanguageInput] + :type documents: list[~azure.ai.textanalytics.v3_2_preview_2.models.MultiLanguageInput] :param model_version: (Optional) This value indicates which model will be used for scoring. If a model-version is not specified, the API should default to the latest, non-preview version. :type model_version: str @@ -1068,10 +1434,10 @@ def sentiment( :param string_index_type: (Optional) Specifies the method used to interpret string offsets. Defaults to Text Elements (Graphemes) according to Unicode v8.0.0. For additional information see https://aka.ms/text-analytics-offsets. - :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_1.models.StringIndexType + :type string_index_type: str or ~azure.ai.textanalytics.v3_2_preview_2.models.StringIndexType :keyword callable cls: A custom type or function that will be passed the direct response :return: SentimentResponse, or the result of cls(response) - :rtype: ~azure.ai.textanalytics.v3_2_preview_1.models.SentimentResponse + :rtype: ~azure.ai.textanalytics.v3_2_preview_2.models.SentimentResponse :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.SentimentResponse"] @@ -1080,45 +1446,33 @@ def sentiment( } error_map.update(kwargs.pop('error_map', {})) - _input = _models.MultiLanguageBatchInput(documents=documents) - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - # Construct URL - url = self.sentiment.metadata['url'] # type: ignore + _input = _models.MultiLanguageBatchInput(documents=documents) + json = self._serialize.body(_input, 'MultiLanguageBatchInput') + + request = build_sentiment_request( + content_type=content_type, + model_version=model_version, + show_stats=show_stats, + logging_opt_out=logging_opt_out, + opinion_mining=opinion_mining, + string_index_type=string_index_type, + json=json, + template_url=self.sentiment.metadata['url'], + ) + request = _convert_request(request) path_format_arguments = { - 'Endpoint': self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - if model_version is not None: - query_parameters['model-version'] = self._serialize.query("model_version", model_version, 'str') - if show_stats is not None: - query_parameters['showStats'] = self._serialize.query("show_stats", show_stats, 'bool') - if logging_opt_out is not None: - query_parameters['loggingOptOut'] = self._serialize.query("logging_opt_out", logging_opt_out, 'bool') - if opinion_mining is not None: - query_parameters['opinionMining'] = self._serialize.query("opinion_mining", opinion_mining, 'bool') - if string_index_type is not None: - query_parameters['stringIndexType'] = self._serialize.query("string_index_type", string_index_type, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(_input, 'MultiLanguageBatchInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + request.url = self._client.format_url(request.url, **path_format_arguments) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response) raise HttpResponseError(response=response, model=error) deserialized = self._deserialize('SentimentResponse', pipeline_response) @@ -1127,4 +1481,6 @@ def sentiment( return cls(pipeline_response, deserialized, {}) return deserialized + sentiment.metadata = {'url': '/sentiment'} # type: ignore + diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/py.typed b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py index de42817c54d1..00c0ca51aee1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_lro.py @@ -3,6 +3,10 @@ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ + +import base64 +import functools +import json from typing import TYPE_CHECKING, Generic from six.moves.urllib.parse import urlencode from azure.core.polling._poller import PollingReturnType @@ -98,7 +102,14 @@ def _poll(self): self.update_status() if TextAnalyticsLROPollingMethod._failed(self.status()): - raise OperationFailed("Operation failed or canceled") + try: + job = json.loads(self._pipeline_response.http_response.text()) + error_message = "" + for err in job["errors"]: + error_message += "({}) {}".format(err["code"], err["message"]) + raise HttpResponseError(message=error_message, response=self._pipeline_response.http_response) + except KeyError: + raise OperationFailed("Operation failed or canceled") final_get_url = self._operation.get_final_get_url(self._pipeline_response) if final_get_url: @@ -110,6 +121,8 @@ def _poll(self): class AnalyzeHealthcareEntitiesLROPollingMethod(TextAnalyticsLROPollingMethod): def __init__(self, *args, **kwargs): + self._doc_id_order = kwargs.pop("doc_id_order", None) + self._show_stats = kwargs.pop("show_stats", None) self._text_analytics_client = kwargs.pop("text_analytics_client") super(AnalyzeHealthcareEntitiesLROPollingMethod, self).__init__(*args, **kwargs) @@ -143,6 +156,13 @@ def id(self): return None return self._current_body.job_id + def get_continuation_token(self): + # type: () -> str + import pickle + self._initial_response.context.options["doc_id_order"] = self._doc_id_order + self._initial_response.context.options["show_stats"] = self._show_stats + return base64.b64encode(pickle.dumps(self._initial_response)).decode('ascii') + class AnalyzeHealthcareEntitiesLROPoller(LROPoller, Generic[PollingReturnType]): def polling_method(self): @@ -190,6 +210,24 @@ def id(self): """ return self.polling_method().id + @classmethod + def from_continuation_token(cls, polling_method, continuation_token, **kwargs): # type: ignore + # type: (AnalyzeHealthcareEntitiesLROPollingMethod, str, Any) -> AnalyzeHealthcareEntitiesLROPoller + client, initial_response, deserialization_callback = polling_method.from_continuation_token( + continuation_token, **kwargs + ) + polling_method._lro_algorithms = [ # pylint: disable=protected-access + TextAnalyticsOperationResourcePolling( + show_stats=initial_response.context.options["show_stats"] + ) + ] + return cls( + client, + initial_response, + functools.partial(deserialization_callback, initial_response), + polling_method + ) + def cancel(self, **kwargs): # type: ignore # type: (Any) -> LROPoller[None] """Cancel the operation currently being polled. @@ -231,6 +269,12 @@ def cancel(self, **kwargs): # type: ignore class AnalyzeActionsLROPollingMethod(TextAnalyticsLROPollingMethod): + def __init__(self, *args, **kwargs): + self._doc_id_order = kwargs.pop("doc_id_order", None) + self._task_id_order = kwargs.pop("task_id_order", None) + self._show_stats = kwargs.pop("show_stats", None) + super(AnalyzeActionsLROPollingMethod, self).__init__(*args, **kwargs) + @property def _current_body(self): from ._generated.models import AnalyzeJobMetadata @@ -291,6 +335,14 @@ def id(self): return None return self._current_body.job_id + def get_continuation_token(self): + # type: () -> str + import pickle + self._initial_response.context.options["doc_id_order"] = self._doc_id_order + self._initial_response.context.options["task_id_order"] = self._task_id_order + self._initial_response.context.options["show_stats"] = self._show_stats + return base64.b64encode(pickle.dumps(self._initial_response)).decode('ascii') + class AnalyzeActionsLROPoller(LROPoller, Generic[PollingReturnType]): def polling_method(self): @@ -390,3 +442,21 @@ def id(self): :rtype: str """ return self.polling_method().id + + @classmethod + def from_continuation_token(cls, polling_method, continuation_token, **kwargs): # type: ignore + # type: (AnalyzeActionsLROPollingMethod, str, Any) -> AnalyzeActionsLROPoller + client, initial_response, deserialization_callback = polling_method.from_continuation_token( + continuation_token, **kwargs + ) + polling_method._lro_algorithms = [ # pylint: disable=protected-access + TextAnalyticsOperationResourcePolling( + show_stats=initial_response.context.options["show_stats"] + ) + ] + return cls( + client, + initial_response, + functools.partial(deserialization_callback, initial_response), + polling_method + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py index 8a43a22eaf52..2b6b35d6cf3e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_models.py @@ -11,7 +11,7 @@ ) from ._generated.v3_0 import models as _v3_0_models -from ._generated.v3_2_preview_1 import models as _v3_2_preview_1_models +from ._generated.v3_2_preview_2 import models as _v3_2_preview_models from ._version import DEFAULT_API_VERSION @@ -1746,6 +1746,21 @@ class _AnalyzeActionsType(str, Enum): ) ANALYZE_SENTIMENT = "analyze_sentiment" #: Sentiment Analysis action. EXTRACT_SUMMARY = "extract_summary" + RECOGNIZE_CUSTOM_ENTITIES = "recognize_custom_entities" + SINGLE_CATEGORY_CLASSIFY = "single_category_classify" + MULTI_CATEGORY_CLASSIFY = "multi_category_classify" + + +class ActionPointerKind(str, Enum): + RECOGNIZE_ENTITIES = "entityRecognitionTasks" + RECOGNIZE_PII_ENTITIES = "entityRecognitionPiiTasks" + EXTRACT_KEY_PHRASES = "keyPhraseExtractionTasks" + RECOGNIZE_LINKED_ENTITIES = "entityLinkingTasks" + ANALYZE_SENTIMENT = "sentimentAnalysisTasks" + EXTRACT_SUMMARY = "extractiveSummarizationTasks" + RECOGNIZE_CUSTOM_ENTITIES = "customEntityRecognitionTasks" + SINGLE_CATEGORY_CLASSIFY = "customSingleClassificationTasks" + MULTI_CATEGORY_CLASSIFY = "customMultiClassificationTasks" class RecognizeEntitiesAction(DictMixin): @@ -1795,9 +1810,9 @@ def __repr__(self, **kwargs): :1024 ] - def _to_generated(self, api_version): + def _to_generated(self, api_version, task_id): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.EntitiesTask( @@ -1805,7 +1820,8 @@ def _to_generated(self, api_version): model_version=self.model_version, string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, - ) + ), + task_name=task_id ) @@ -1872,9 +1888,9 @@ def __repr__(self, **kwargs): )[:1024] ) - def _to_generated(self, api_version): + def _to_generated(self, api_version, task_id): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.SentimentAnalysisTask( @@ -1883,7 +1899,8 @@ def _to_generated(self, api_version): opinion_mining=self.show_opinion_mining, string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, - ) + ), + task_name=task_id ) @@ -1954,9 +1971,9 @@ def __repr__(self, **kwargs): )[:1024] ) - def _to_generated(self, api_version): + def _to_generated(self, api_version, task_id): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.PiiTask( @@ -1966,7 +1983,8 @@ def _to_generated(self, api_version): pii_categories=self.categories_filter, string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, - ) + ), + task_name=task_id ) @@ -2009,16 +2027,17 @@ def __repr__(self, **kwargs): )[:1024] ) - def _to_generated(self, api_version): + def _to_generated(self, api_version, task_id): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.KeyPhrasesTask( parameters=models.KeyPhrasesTaskParameters( model_version=self.model_version, logging_opt_out=self.disable_service_logs, - ) + ), + task_name=task_id ) @@ -2071,9 +2090,9 @@ def __repr__(self, **kwargs): )[:1024] ) - def _to_generated(self, api_version): + def _to_generated(self, api_version, task_id): if api_version == DEFAULT_API_VERSION: - from ._generated.v3_2_preview_1 import models + from ._generated.v3_2_preview_2 import models else: from ._generated.v3_1 import models return models.EntityLinkingTask( @@ -2081,13 +2100,15 @@ def _to_generated(self, api_version): model_version=self.model_version, string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, - ) + ), + task_name=task_id ) class ExtractSummaryAction(DictMixin): - """ExtractSummaryAction encapsulates the parameters for starting a long-running Extractive - Text Summarization operation. + """ExtractSummaryAction encapsulates the parameters for starting a long-running Extractive Text + Summarization operation. For a conceptual discussion of extractive summarization, see the service documentation: + https://docs.microsoft.com/azure/cognitive-services/text-analytics/how-tos/extractive-summarization :keyword str model_version: The model version to use for the analysis. :keyword str string_index_type: Specifies the method used to interpret string offsets. @@ -2140,15 +2161,16 @@ def __repr__(self): )[:1024] ) - def _to_generated(self, api_version): # pylint: disable=unused-argument - return _v3_2_preview_1_models.ExtractiveSummarizationTask( - parameters=_v3_2_preview_1_models.ExtractiveSummarizationTaskParameters( + def _to_generated(self, api_version, task_id): # pylint: disable=unused-argument + return _v3_2_preview_models.ExtractiveSummarizationTask( + parameters=_v3_2_preview_models.ExtractiveSummarizationTaskParameters( model_version=self.model_version, string_index_type=self.string_index_type, logging_opt_out=self.disable_service_logs, sentence_count=self.max_sentence_count, sort_by=self.order_by, - ) + ), + task_name=task_id ) @@ -2244,3 +2266,381 @@ def _from_generated(cls, sentence): offset=sentence.offset, length=sentence.length, ) + + +class RecognizeCustomEntitiesAction(DictMixin): + """RecognizeCustomEntitiesAction encapsulates the parameters for starting a long-running custom entity + recognition operation. For information on regional support of custom features and how to train a model to + recognize custom entities, see https://aka.ms/azsdk/textanalytics/customentityrecognition + + :param str project_name: Required. This field indicates the project name for the model. + :param str deployment_name: This field indicates the deployment name for the model. + :keyword str string_index_type: Specifies the method used to interpret string offsets. + `UnicodeCodePoint`, the Python encoding, is the default. To override the Python default, + you can also pass in `Utf16CodePoint` or TextElement_v8`. For additional information + see https://aka.ms/text-analytics-offsets + :keyword bool disable_service_logs: If set to true, you opt-out of having your text input + logged on the service side for troubleshooting. By default, Text Analytics logs your + input text for 48 hours, solely to allow for troubleshooting issues in providing you with + the Text Analytics natural language processing functions. Setting this parameter to true, + disables input logging and may limit our ability to remediate issues that occur. Please see + Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for + additional details, and Microsoft Responsible AI principles at + https://www.microsoft.com/ai/responsible-ai. + :ivar str project_name: This field indicates the project name for the model. + :ivar str deployment_name: This field indicates the deployment name for the model. + :ivar str string_index_type: Specifies the method used to interpret string offsets. + `UnicodeCodePoint`, the Python encoding, is the default. To override the Python default, + you can also pass in `Utf16CodePoint` or TextElement_v8`. For additional information + see https://aka.ms/text-analytics-offsets + :ivar bool disable_service_logs: If set to true, you opt-out of having your text input + logged on the service side for troubleshooting. By default, Text Analytics logs your + input text for 48 hours, solely to allow for troubleshooting issues in providing you with + the Text Analytics natural language processing functions. Setting this parameter to true, + disables input logging and may limit our ability to remediate issues that occur. Please see + Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for + additional details, and Microsoft Responsible AI principles at + https://www.microsoft.com/ai/responsible-ai. + """ + + def __init__( + self, + project_name, + deployment_name, + **kwargs + ): + self.project_name = project_name + self.deployment_name = deployment_name + self.disable_service_logs = kwargs.get('disable_service_logs', None) + self.string_index_type = kwargs.get('string_index_type', None) + + def __repr__(self): + return "RecognizeCustomEntitiesAction(project_name={}, deployment_name={}, disable_service_logs={}, " \ + "string_index_type={})".format( + self.project_name, + self.deployment_name, + self.disable_service_logs, + self.string_index_type, + )[:1024] + + def _to_generated(self, api_version, task_id): # pylint: disable=unused-argument + return _v3_2_preview_models.CustomEntitiesTask( + parameters=_v3_2_preview_models.CustomEntitiesTaskParameters( + project_name=self.project_name, + deployment_name=self.deployment_name, + string_index_type=self.string_index_type, + logging_opt_out=self.disable_service_logs, + ), + task_name=task_id + ) + + +class RecognizeCustomEntitiesResult(DictMixin): + """RecognizeCustomEntitiesResult is a result object which contains + the custom recognized entities from a particular document. + + :ivar str id: Unique, non-empty document identifier that matches the + document id that was passed in with the request. If not specified + in the request, an id is assigned for the document. + :ivar entities: Recognized custom entities in the document. + :vartype entities: + list[~azure.ai.textanalytics.CategorizedEntity] + :ivar warnings: Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] + :ivar statistics: If `show_stats=True` was specified in the request this + field will contain information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.TextDocumentStatistics + :ivar bool is_error: Boolean check for error item when iterating over list of + results. Always False for an instance of a RecognizeCustomEntitiesResult. + """ + + def __init__(self, **kwargs): + self.id = kwargs.get("id", None) + self.entities = kwargs.get("entities", None) + self.warnings = kwargs.get("warnings", []) + self.statistics = kwargs.get("statistics", None) + self.is_error = False + + def __repr__(self): + return "RecognizeCustomEntitiesResult(id={}, entities={}, warnings={}, statistics={}, is_error={})".format( + self.id, + repr(self.entities), + repr(self.warnings), + repr(self.statistics), + self.is_error, + )[ + :1024 + ] + + @classmethod + def _from_generated(cls, result): + return cls( + id=result.id, + entities=[ + CategorizedEntity._from_generated(e) # pylint: disable=protected-access + for e in result.entities + ], + warnings=[ + TextAnalyticsWarning._from_generated( # pylint: disable=protected-access + w + ) + for w in result.warnings + ], + statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access + result.statistics + ), + ) + + +class MultiCategoryClassifyAction(DictMixin): + """MultiCategoryClassifyAction encapsulates the parameters for starting a long-running custom multi category + classification operation. For information on regional support of custom features and how to train a model to + classify your documents, see https://aka.ms/azsdk/textanalytics/customfunctionalities + + :param str project_name: Required. This field indicates the project name for the model. + :param str deployment_name: Required. This field indicates the deployment name for the model. + :keyword bool disable_service_logs: If set to true, you opt-out of having your text input + logged on the service side for troubleshooting. By default, Text Analytics logs your + input text for 48 hours, solely to allow for troubleshooting issues in providing you with + the Text Analytics natural language processing functions. Setting this parameter to true, + disables input logging and may limit our ability to remediate issues that occur. Please see + Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for + additional details, and Microsoft Responsible AI principles at + https://www.microsoft.com/ai/responsible-ai. + :ivar str project_name: This field indicates the project name for the model. + :ivar str deployment_name: This field indicates the deployment name for the model. + :ivar bool disable_service_logs: If set to true, you opt-out of having your text input + logged on the service side for troubleshooting. By default, Text Analytics logs your + input text for 48 hours, solely to allow for troubleshooting issues in providing you with + the Text Analytics natural language processing functions. Setting this parameter to true, + disables input logging and may limit our ability to remediate issues that occur. Please see + Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for + additional details, and Microsoft Responsible AI principles at + https://www.microsoft.com/ai/responsible-ai. + """ + + def __init__( + self, + project_name, + deployment_name, + **kwargs + ): + self.project_name = project_name + self.deployment_name = deployment_name + self.disable_service_logs = kwargs.get('disable_service_logs', None) + + def __repr__(self): + return "MultiCategoryClassifyAction(project_name={}, deployment_name={}, " \ + "disable_service_logs={})".format( + self.project_name, + self.deployment_name, + self.disable_service_logs, + )[:1024] + + def _to_generated(self, api_version, task_id): # pylint: disable=unused-argument + return _v3_2_preview_models.CustomMultiClassificationTask( + parameters=_v3_2_preview_models.CustomMultiClassificationTaskParameters( + project_name=self.project_name, + deployment_name=self.deployment_name, + logging_opt_out=self.disable_service_logs, + ), + task_name=task_id + ) + + +class MultiCategoryClassifyResult(DictMixin): + """MultiCategoryClassifyResult is a result object which contains + the classifications for a particular document. + + :ivar str id: Unique, non-empty document identifier. + :ivar classifications: Recognized classification results in the document. + :vartype classifications: list[~azure.ai.textanalytics.ClassificationCategory] + :ivar warnings: Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] + :ivar statistics: If `show_stats=True` was specified in the request this + field will contain information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.TextDocumentStatistics + :ivar bool is_error: Boolean check for error item when iterating over list of + results. Always False for an instance of a MultiCategoryClassifyResult. + """ + + def __init__( + self, + **kwargs + ): + self.id = kwargs.get('id', None) + self.classifications = kwargs.get('classifications', None) + self.warnings = kwargs.get('warnings', []) + self.statistics = kwargs.get('statistics', None) + self.is_error = False + + def __repr__(self): + return "MultiCategoryClassifyResult(id={}, classifications={}, warnings={}, statistics={}, " \ + "is_error={})".format( + self.id, + repr(self.classifications), + repr(self.warnings), + repr(self.statistics), + self.is_error, + )[ + :1024 + ] + + @classmethod + def _from_generated(cls, result): + return cls( + id=result.id, + classifications=[ + ClassificationCategory._from_generated(e) # pylint: disable=protected-access + for e in result.classifications + ], + warnings=[ + TextAnalyticsWarning._from_generated( # pylint: disable=protected-access + w + ) + for w in result.warnings + ], + statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access + result.statistics + ), + ) + + +class SingleCategoryClassifyAction(DictMixin): + """SingleCategoryClassifyAction encapsulates the parameters for starting a long-running custom single category + classification operation. For information on regional support of custom features and how to train a model to + classify your documents, see https://aka.ms/azsdk/textanalytics/customfunctionalities + + :param str project_name: Required. This field indicates the project name for the model. + :param str deployment_name: Required. This field indicates the deployment name for the model. + :keyword bool disable_service_logs: If set to true, you opt-out of having your text input + logged on the service side for troubleshooting. By default, Text Analytics logs your + input text for 48 hours, solely to allow for troubleshooting issues in providing you with + the Text Analytics natural language processing functions. Setting this parameter to true, + disables input logging and may limit our ability to remediate issues that occur. Please see + Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for + additional details, and Microsoft Responsible AI principles at + https://www.microsoft.com/ai/responsible-ai. + :ivar str project_name: This field indicates the project name for the model. + :ivar str deployment_name: This field indicates the deployment name for the model. + :ivar bool disable_service_logs: If set to true, you opt-out of having your text input + logged on the service side for troubleshooting. By default, Text Analytics logs your + input text for 48 hours, solely to allow for troubleshooting issues in providing you with + the Text Analytics natural language processing functions. Setting this parameter to true, + disables input logging and may limit our ability to remediate issues that occur. Please see + Cognitive Services Compliance and Privacy notes at https://aka.ms/cs-compliance for + additional details, and Microsoft Responsible AI principles at + https://www.microsoft.com/ai/responsible-ai. + """ + + def __init__( + self, + project_name, + deployment_name, + **kwargs + ): + self.project_name = project_name + self.deployment_name = deployment_name + self.disable_service_logs = kwargs.get('disable_service_logs', None) + + def __repr__(self): + return "SingleCategoryClassifyAction(project_name={}, deployment_name={}, " \ + "disable_service_logs={})".format( + self.project_name, + self.deployment_name, + self.disable_service_logs, + )[:1024] + + def _to_generated(self, api_version, task_id): # pylint: disable=unused-argument + return _v3_2_preview_models.CustomSingleClassificationTask( + parameters=_v3_2_preview_models.CustomSingleClassificationTaskParameters( + project_name=self.project_name, + deployment_name=self.deployment_name, + logging_opt_out=self.disable_service_logs, + ), + task_name=task_id + ) + + +class SingleCategoryClassifyResult(DictMixin): + """SingleCategoryClassifyResult is a result object which contains + the classification for a particular document. + + :ivar str id: Unique, non-empty document identifier. + :ivar classification: Recognized classification results in the document. + :vartype classification: ~azure.ai.textanalytics.ClassificationCategory + :ivar warnings: Warnings encountered while processing document. + :vartype warnings: list[~azure.ai.textanalytics.TextAnalyticsWarning] + :ivar statistics: If `show_stats=True` was specified in the request this + field will contain information about the document payload. + :vartype statistics: ~azure.ai.textanalytics.TextDocumentStatistics + :ivar bool is_error: Boolean check for error item when iterating over list of + results. Always False for an instance of a SingleCategoryClassifyResult. + """ + + def __init__( + self, + **kwargs + ): + self.id = kwargs.get('id', None) + self.classification = kwargs.get('classification', None) + self.warnings = kwargs.get('warnings', []) + self.statistics = kwargs.get('statistics', None) + self.is_error = False + + def __repr__(self): + return "SingleCategoryClassifyResult(id={}, classification={}, warnings={}, statistics={}, " \ + "is_error={})".format( + self.id, + repr(self.classification), + repr(self.warnings), + repr(self.statistics), + self.is_error, + )[ + :1024 + ] + + @classmethod + def _from_generated(cls, result): + return cls( + id=result.id, + classification= + ClassificationCategory._from_generated(result.classification), # pylint: disable=protected-access + warnings=[ + TextAnalyticsWarning._from_generated( # pylint: disable=protected-access + w + ) + for w in result.warnings + ], + statistics=TextDocumentStatistics._from_generated( # pylint: disable=protected-access + result.statistics + ), + ) + + +class ClassificationCategory(DictMixin): + """ClassificationCategory represents a classification of the input document. + + :ivar str category: Custom classification category for the document. + :ivar float confidence_score: Confidence score between 0 and 1 of the recognized classification. + """ + + def __init__( + self, + **kwargs + ): + self.category = kwargs.get('category', None) + self.confidence_score = kwargs.get('confidence_score', None) + + def __repr__(self): + return "ClassificationCategory(category={}, confidence_score={})".format( + self.category, + self.confidence_score, + )[:1024] + + @classmethod + def _from_generated(cls, result): + return cls( + category=result.category, + confidence_score=result.confidence_score + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_request_handlers.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_request_handlers.py index 2d94bfef3b31..497e12a361fa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_request_handlers.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_request_handlers.py @@ -6,15 +6,19 @@ import six - +from ._generated.models import ( + EntitiesTask, + PiiTask, + EntityLinkingTask, + SentimentAnalysisTask, + ExtractiveSummarizationTask, + CustomEntitiesTask, + CustomSingleClassificationTask, + CustomMultiClassificationTask, +) from ._models import ( DetectLanguageInput, TextDocumentInput, - RecognizeEntitiesAction, - RecognizePiiEntitiesAction, - RecognizeLinkedEntitiesAction, - AnalyzeSentimentAction, - ExtractSummaryAction, _AnalyzeActionsType, ) @@ -88,17 +92,23 @@ def _validate_input(documents, hint, whole_input_hint): return request_batch -def _determine_action_type(action): - if isinstance(action, RecognizeEntitiesAction): +def _determine_action_type(action): # pylint: disable=too-many-return-statements + if isinstance(action, EntitiesTask): return _AnalyzeActionsType.RECOGNIZE_ENTITIES - if isinstance(action, RecognizePiiEntitiesAction): + if isinstance(action, PiiTask): return _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES - if isinstance(action, RecognizeLinkedEntitiesAction): + if isinstance(action, EntityLinkingTask): return _AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES - if isinstance(action, AnalyzeSentimentAction): + if isinstance(action, SentimentAnalysisTask): return _AnalyzeActionsType.ANALYZE_SENTIMENT - if isinstance(action, ExtractSummaryAction): + if isinstance(action, ExtractiveSummarizationTask): return _AnalyzeActionsType.EXTRACT_SUMMARY + if isinstance(action, CustomEntitiesTask): + return _AnalyzeActionsType.RECOGNIZE_CUSTOM_ENTITIES + if isinstance(action, CustomSingleClassificationTask): + return _AnalyzeActionsType.SINGLE_CATEGORY_CLASSIFY + if isinstance(action, CustomMultiClassificationTask): + return _AnalyzeActionsType.MULTI_CATEGORY_CLASSIFY return _AnalyzeActionsType.EXTRACT_KEY_PHRASES diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py index d412ddf32643..226587368e20 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_response_handlers.py @@ -34,6 +34,10 @@ AnalyzeHealthcareEntitiesResult, ExtractSummaryResult, _AnalyzeActionsType, + RecognizeCustomEntitiesResult, + SingleCategoryClassifyResult, + MultiCategoryClassifyResult, + ActionPointerKind ) @@ -260,6 +264,32 @@ def summary_result( ) +@prepare_result +def custom_entities_result( + custom_entities, results, *args, **kwargs +): # pylint: disable=unused-argument + return RecognizeCustomEntitiesResult._from_generated( # pylint: disable=protected-access + custom_entities + ) + + +@prepare_result +def single_category_classify_result( + custom_category, results, *args, **kwargs +): # pylint: disable=unused-argument + return SingleCategoryClassifyResult._from_generated( # pylint: disable=protected-access + custom_category + ) + +@prepare_result +def multi_category_classify_result( + custom_categories, results, *args, **kwargs +): # pylint: disable=unused-argument + return MultiCategoryClassifyResult._from_generated( # pylint: disable=protected-access + custom_categories + ) + + def healthcare_extract_page_data( doc_id_order, obj, response_headers, health_job_state ): # pylint: disable=unused-argument @@ -271,7 +301,7 @@ def healthcare_extract_page_data( ) -def _get_deserialization_callback_from_task_type(task_type): +def _get_deserialization_callback_from_task_type(task_type): # pylint: disable=too-many-return-statements if task_type == _AnalyzeActionsType.RECOGNIZE_ENTITIES: return entities_result if task_type == _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES: @@ -282,10 +312,16 @@ def _get_deserialization_callback_from_task_type(task_type): return sentiment_result if task_type == _AnalyzeActionsType.EXTRACT_SUMMARY: return summary_result + if task_type == _AnalyzeActionsType.RECOGNIZE_CUSTOM_ENTITIES: + return custom_entities_result + if task_type == _AnalyzeActionsType.SINGLE_CATEGORY_CLASSIFY: + return single_category_classify_result + if task_type == _AnalyzeActionsType.MULTI_CATEGORY_CLASSIFY: + return multi_category_classify_result return key_phrases_result -def _get_property_name_from_task_type(task_type): +def _get_property_name_from_task_type(task_type): # pylint: disable=too-many-return-statements if task_type == _AnalyzeActionsType.RECOGNIZE_ENTITIES: return "entity_recognition_tasks" if task_type == _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES: @@ -296,23 +332,88 @@ def _get_property_name_from_task_type(task_type): return "sentiment_analysis_tasks" if task_type == _AnalyzeActionsType.EXTRACT_SUMMARY: return "extractive_summarization_tasks" + if task_type == _AnalyzeActionsType.RECOGNIZE_CUSTOM_ENTITIES: + return "custom_entity_recognition_tasks" + if task_type == _AnalyzeActionsType.SINGLE_CATEGORY_CLASSIFY: + return "custom_single_classification_tasks" + if task_type == _AnalyzeActionsType.MULTI_CATEGORY_CLASSIFY: + return "custom_multi_classification_tasks" return "key_phrase_extraction_tasks" -def _get_good_result( - current_task_type, - index_of_task_result, - doc_id_order, - response_headers, - returned_tasks_object, -): +def get_task_from_pointer(task_type): # pylint: disable=too-many-return-statements + if task_type == ActionPointerKind.RECOGNIZE_ENTITIES: + return "entity_recognition_tasks" + if task_type == ActionPointerKind.RECOGNIZE_PII_ENTITIES: + return "entity_recognition_pii_tasks" + if task_type == ActionPointerKind.RECOGNIZE_LINKED_ENTITIES: + return "entity_linking_tasks" + if task_type == ActionPointerKind.ANALYZE_SENTIMENT: + return "sentiment_analysis_tasks" + if task_type == ActionPointerKind.EXTRACT_SUMMARY: + return "extractive_summarization_tasks" + if task_type == ActionPointerKind.RECOGNIZE_CUSTOM_ENTITIES: + return "custom_entity_recognition_tasks" + if task_type == ActionPointerKind.SINGLE_CATEGORY_CLASSIFY: + return "custom_single_classification_tasks" + if task_type == ActionPointerKind.MULTI_CATEGORY_CLASSIFY: + return "custom_multi_classification_tasks" + return "key_phrase_extraction_tasks" + + +def resolve_action_pointer(pointer): + import re + pointer_union = "|".join(value for value in ActionPointerKind) + found = re.search(r"#/tasks/({})/\d+".format(pointer_union), pointer) + if found: + index = int(pointer[-1]) + task = pointer.split("#/tasks/")[1].split("/")[0] + property_name = get_task_from_pointer(task) + return property_name, index + raise ValueError( + "Unexpected response from service - action pointer '{}' is not a valid action pointer.".format(pointer) + ) + + +def get_ordered_errors(tasks_obj, task_name, doc_id_order): + # throw exception if error missing a target + missing_target = any([error for error in tasks_obj.errors if error.target is None]) + if missing_target: + message = "".join(["({}) {}".format(err.code, err.message) for err in tasks_obj.errors]) + raise HttpResponseError(message=message) + + # create a DocumentError per input doc with the action error details + for err in tasks_obj.errors: + property_name, index = resolve_action_pointer(err.target) + actions = getattr(tasks_obj.tasks, property_name) + action = actions[index] + if action.task_name == task_name: + errors = [ + DocumentError( + id=doc_id, + error=TextAnalyticsError(code=err.code, message=err.message) + ) for doc_id in doc_id_order + ] + return errors + raise ValueError("Unexpected response from service - no errors for missing action results.") + + +def _get_doc_results(task, doc_id_order, response_headers, returned_tasks_object): + returned_tasks = returned_tasks_object.tasks + current_task_type, task_name = task deserialization_callback = _get_deserialization_callback_from_task_type( current_task_type ) property_name = _get_property_name_from_task_type(current_task_type) - response_task_to_deserialize = getattr(returned_tasks_object, property_name)[ - index_of_task_result - ] + try: + response_task_to_deserialize = \ + next(task for task in getattr(returned_tasks, property_name) if task.task_name == task_name) + except StopIteration: + raise ValueError("Unexpected response from service - unable to deserialize result.") + + # if no results present, check for action errors + if response_task_to_deserialize.results is None: + return get_ordered_errors(returned_tasks_object, task_name, doc_id_order) return deserialization_callback( doc_id_order, response_task_to_deserialize.results, response_headers, lro=True ) @@ -320,15 +421,10 @@ def _get_good_result( def get_iter_items(doc_id_order, task_order, response_headers, analyze_job_state): iter_items = defaultdict(list) # map doc id to action results - task_type_to_index = defaultdict( - int - ) # need to keep track of how many of each type of tasks we've seen - returned_tasks_object = analyze_job_state.tasks - for current_task_type in task_order: - index_of_task_result = task_type_to_index[current_task_type] - results = _get_good_result( - current_task_type, - index_of_task_result, + returned_tasks_object = analyze_job_state + for task in task_order: + results = _get_doc_results( + task, doc_id_order, response_headers, returned_tasks_object, @@ -336,7 +432,6 @@ def get_iter_items(doc_id_order, task_order, response_headers, analyze_job_state for result in results: iter_items[result.id].append(result) - task_type_to_index[current_task_type] += 1 return [iter_items[doc_id] for doc_id in doc_id_order if doc_id in iter_items] diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py index bc93cc5d6ae7..06058ea46a55 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_text_analytics_client.py @@ -5,7 +5,6 @@ # ------------------------------------ # pylint: disable=too-many-lines -import copy from typing import ( Union, Any, @@ -18,6 +17,7 @@ from azure.core.tracing.decorator import distributed_trace from azure.core.exceptions import HttpResponseError from ._base_client import TextAnalyticsClientBase, TextAnalyticsApiVersion +from ._lro import AnalyzeActionsLROPoller, AnalyzeHealthcareEntitiesLROPoller from ._request_handlers import ( _validate_input, _determine_action_type, @@ -64,8 +64,13 @@ AnalyzeHealthcareEntitiesResult, ExtractSummaryAction, ExtractSummaryResult, + RecognizeCustomEntitiesAction, + RecognizeCustomEntitiesResult, + SingleCategoryClassifyAction, + SingleCategoryClassifyResult, + MultiCategoryClassifyAction, + MultiCategoryClassifyResult, ) - from ._lro import AnalyzeHealthcareEntitiesLROPoller, AnalyzeActionsLROPoller class TextAnalyticsClient(TextAnalyticsClientBase): @@ -558,7 +563,10 @@ def begin_analyze_healthcare_entities( # type: ignore see https://aka.ms/text-analytics-offsets :keyword int polling_interval: Waiting time between two polls for LRO operations if no Retry-After header is present. Defaults to 5 seconds. - :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword str continuation_token: + Call `continuation_token()` on the poller object to save the long-running operation (LRO) + state into an opaque token. Pass the value as the `continuation_token` keyword argument + to restart the LRO from a saved state. :keyword bool disable_service_logs: Defaults to true, meaning that Text Analytics will not log your input text on the service side for troubleshooting. If set to False, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with @@ -589,7 +597,6 @@ def begin_analyze_healthcare_entities( # type: ignore """ language_arg = kwargs.pop("language", None) language = language_arg if language_arg is not None else self._default_language - docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) polling_interval = kwargs.pop("polling_interval", 5) @@ -597,7 +604,28 @@ def begin_analyze_healthcare_entities( # type: ignore string_index_type = kwargs.pop( "string_index_type", self._string_index_type_default ) + disable_service_logs = kwargs.pop("disable_service_logs", None) + + if continuation_token: + def get_result_from_cont_token(initial_response, pipeline_response): + doc_id_order = initial_response.context.options["doc_id_order"] + show_stats = initial_response.context.options["show_stats"] + return self._healthcare_result_callback( + doc_id_order, pipeline_response, None, {}, show_stats=show_stats + ) + + return AnalyzeHealthcareEntitiesLROPoller.from_continuation_token( + polling_method=AnalyzeHealthcareEntitiesLROPollingMethod( + text_analytics_client=self._client, + timeout=polling_interval, + **kwargs + ), + client=self._client._client, # pylint: disable=protected-access + deserialization_callback=get_result_from_cont_token, + continuation_token=continuation_token + ) + docs = _validate_input(documents, "language", language) doc_id_order = [doc.get("id") for doc in docs] my_cls = kwargs.pop( "cls", @@ -605,28 +633,28 @@ def begin_analyze_healthcare_entities( # type: ignore self._healthcare_result_callback, doc_id_order, show_stats=show_stats ), ) - disable_service_logs = kwargs.pop("disable_service_logs", None) - polling_kwargs = kwargs - operation_kwargs = copy.copy(kwargs) - if disable_service_logs is not None: - operation_kwargs["logging_opt_out"] = disable_service_logs try: return self._client.begin_health( docs, model_version=model_version, string_index_type=string_index_type, + logging_opt_out=disable_service_logs, cls=my_cls, polling=AnalyzeHealthcareEntitiesLROPollingMethod( text_analytics_client=self._client, timeout=polling_interval, + doc_id_order=doc_id_order, + show_stats=show_stats, lro_algorithms=[ - TextAnalyticsOperationResourcePolling(show_stats=show_stats) + TextAnalyticsOperationResourcePolling( + show_stats=show_stats, + ) ], - **polling_kwargs + **kwargs ), continuation_token=continuation_token, - **operation_kwargs + **kwargs ) except ValueError as error: @@ -854,15 +882,18 @@ def _analyze_result_callback( def begin_analyze_actions( # type: ignore self, documents, # type: Union[List[str], List[TextDocumentInput], List[Dict[str, str]]] - actions, # type: List[Union[RecognizeEntitiesAction, RecognizeLinkedEntitiesAction, RecognizePiiEntitiesAction, ExtractKeyPhrasesAction, AnalyzeSentimentAction, ExtractSummaryAction]] # pylint: disable=line-too-long + actions, # type: List[Union[RecognizeEntitiesAction, RecognizeLinkedEntitiesAction, RecognizePiiEntitiesAction, ExtractKeyPhrasesAction, AnalyzeSentimentAction, ExtractSummaryAction, RecognizeCustomEntitiesAction, SingleCategoryClassifyAction, MultiCategoryClassifyAction]] # pylint: disable=line-too-long **kwargs # type: Any - ): # type: (...) -> AnalyzeActionsLROPoller[ItemPaged[List[Union[RecognizeEntitiesResult, RecognizeLinkedEntitiesResult, RecognizePiiEntitiesResult, ExtractKeyPhrasesResult, AnalyzeSentimentResult, ExtractSummaryResult, DocumentError]]]] # pylint: disable=line-too-long + ): # type: (...) -> AnalyzeActionsLROPoller[ItemPaged[List[Union[RecognizeEntitiesResult, RecognizeLinkedEntitiesResult, RecognizePiiEntitiesResult, ExtractKeyPhrasesResult, AnalyzeSentimentResult, ExtractSummaryResult, RecognizeCustomEntitiesResult, SingleCategoryClassifyResult, MultiCategoryClassifyResult, DocumentError]]]] # pylint: disable=line-too-long """Start a long-running operation to perform a variety of text analysis actions over a batch of documents. We recommend you use this function if you're looking to analyze larger documents, and / or combine multiple Text Analytics actions into one call. Otherwise, we recommend you use the action specific endpoints, for example :func:`analyze_sentiment`. + .. note:: See the service documentation for regional support of custom action features: + https://aka.ms/azsdk/textanalytics/customfunctionalities + :param documents: The set of documents to process as part of this batch. If you wish to specify the ID and language on a per-item basis you must use as input a list[:class:`~azure.ai.textanalytics.TextDocumentInput`] or a list of @@ -874,10 +905,10 @@ def begin_analyze_actions( # type: ignore :param actions: A heterogeneous list of actions to perform on the input documents. Each action object encapsulates the parameters used for the particular action type. The action results will be in the same order of the input actions. - Duplicate actions in list not supported. :type actions: list[RecognizeEntitiesAction or RecognizePiiEntitiesAction or ExtractKeyPhrasesAction or - RecognizeLinkedEntitiesAction or AnalyzeSentimentAction or ExtractSummaryAction] + RecognizeLinkedEntitiesAction or AnalyzeSentimentAction or ExtractSummaryAction or + RecognizeCustomEntitiesAction or SingleCategoryClassifyAction or MultiCategoryClassifyAction] :keyword str display_name: An optional display name to set for the requested analysis. :keyword str language: The 2 letter ISO 639-1 representation of language for the entire batch. For example, use "en" for English; "es" for Spanish etc. @@ -887,6 +918,10 @@ def begin_analyze_actions( # type: ignore :keyword bool show_stats: If set to true, response will contain document level statistics. :keyword int polling_interval: Waiting time between two polls for LRO operations if no Retry-After header is present. Defaults to 5 seconds. + :keyword str continuation_token: + Call `continuation_token()` on the poller object to save the long-running operation (LRO) + state into an opaque token. Pass the value as the `continuation_token` keyword argument + to restart the LRO from a saved state. :return: An instance of an AnalyzeActionsLROPoller. Call `result()` on the poller object to return a pageable heterogeneous list of lists. This list of lists is first ordered by the documents you input, then ordered by the actions you input. For example, @@ -901,13 +936,17 @@ def begin_analyze_actions( # type: ignore :rtype: ~azure.ai.textanalytics.AnalyzeActionsLROPoller[~azure.core.paging.ItemPaged[ list[Union[RecognizeEntitiesResult, RecognizeLinkedEntitiesResult, RecognizePiiEntitiesResult, - ExtractKeyPhrasesResult, AnalyzeSentimentResult, ExtractSummaryAction, DocumentError]]]] + ExtractKeyPhrasesResult, AnalyzeSentimentResult, ExtractSummaryAction, RecognizeCustomEntitiesResult, + SingleCategoryClassifyResult, MultiCategoryClassifyResult, DocumentError]]]] :raises ~azure.core.exceptions.HttpResponseError or TypeError or ValueError or NotImplementedError: .. versionadded:: v3.1 The *begin_analyze_actions* client method. .. versionadded:: v3.2-preview - The *ExtractSummaryAction* input option and *ExtractSummaryResult* result object + The *ExtractSummaryAction*, *RecognizeCustomEntitiesAction*, *SingleCategoryClassifyAction*, + and *MultiCategoryClassifyAction* input options and the corresponding *ExtractSummaryResult*, + *RecognizeCustomEntitiesResult*, *SingleCategoryClassifyResult*, and *MultiCategoryClassifyResult* + result objects .. admonition:: Example: @@ -920,92 +959,86 @@ def begin_analyze_actions( # type: ignore actions over a batch of documents. """ + continuation_token = kwargs.pop("continuation_token", None) display_name = kwargs.pop("display_name", None) language_arg = kwargs.pop("language", None) + show_stats = kwargs.pop("show_stats", False) + polling_interval = kwargs.pop("polling_interval", 5) language = language_arg if language_arg is not None else self._default_language + + if continuation_token: + def get_result_from_cont_token(initial_response, pipeline_response): + doc_id_order = initial_response.context.options["doc_id_order"] + task_id_order = initial_response.context.options["task_id_order"] + show_stats = initial_response.context.options["show_stats"] + return self._analyze_result_callback( + doc_id_order, task_id_order, pipeline_response, None, {}, show_stats=show_stats + ) + + return AnalyzeActionsLROPoller.from_continuation_token( + polling_method=AnalyzeActionsLROPollingMethod( + timeout=polling_interval, + **kwargs + ), + client=self._client._client, # pylint: disable=protected-access + deserialization_callback=get_result_from_cont_token, + continuation_token=continuation_token + ) + docs = self._client.models( api_version=self._api_version ).MultiLanguageBatchInput( documents=_validate_input(documents, "language", language) ) - show_stats = kwargs.pop("show_stats", False) - polling_interval = kwargs.pop("polling_interval", 5) - continuation_token = kwargs.pop("continuation_token", None) - doc_id_order = [doc.get("id") for doc in docs.documents] - task_order = [_determine_action_type(action) for action in actions] - if len(task_order) != len(set(task_order)): - raise ValueError("Multiple of the same action is not currently supported.") + try: + generated_tasks = [ + action._to_generated(self._api_version, str(idx)) # pylint: disable=protected-access + for idx, action in enumerate(actions) + ] + except AttributeError: + raise TypeError("Unsupported action type in list.") + task_order = [(_determine_action_type(a), a.task_name) for a in generated_tasks] try: analyze_tasks = self._client.models( api_version=self._api_version ).JobManifestTasks( entity_recognition_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.RECOGNIZE_ENTITIES - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_ENTITIES ], entity_recognition_pii_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES ], key_phrase_extraction_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.EXTRACT_KEY_PHRASES - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.EXTRACT_KEY_PHRASES ], entity_linking_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES ], sentiment_analysis_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.ANALYZE_SENTIMENT - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.ANALYZE_SENTIMENT ], extractive_summarization_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.EXTRACT_SUMMARY - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.EXTRACT_SUMMARY + ], + custom_entity_recognition_tasks=[ + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_CUSTOM_ENTITIES + ], + custom_single_classification_tasks=[ + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.SINGLE_CATEGORY_CLASSIFY + ], + custom_multi_classification_tasks=[ + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.MULTI_CATEGORY_CLASSIFY ], ) analyze_body = self._client.models( @@ -1026,8 +1059,13 @@ def begin_analyze_actions( # type: ignore ), polling=AnalyzeActionsLROPollingMethod( timeout=polling_interval, + show_stats=show_stats, + doc_id_order=doc_id_order, + task_id_order=task_order, lro_algorithms=[ - TextAnalyticsOperationResourcePolling(show_stats=show_stats) + TextAnalyticsOperationResourcePolling( + show_stats=show_stats, + ) ], **kwargs ), diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py index adb97393c714..164878621003 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_version.py @@ -4,5 +4,5 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "5.2.0b2" -DEFAULT_API_VERSION = "v3.2-preview.1" +VERSION = "5.2.0b3" +DEFAULT_API_VERSION = "v3.2-preview.2" diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_base_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_base_client_async.py index cdebda24c1af..7593f4c43028 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_base_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_base_client_async.py @@ -5,7 +5,7 @@ # ------------------------------------ from typing import Any from azure.core.credentials import AzureKeyCredential -from azure.core.pipeline.policies import AzureKeyCredentialPolicy +from azure.core.pipeline.policies import AzureKeyCredentialPolicy, HttpLoggingPolicy from .._generated.aio import TextAnalyticsClient as _TextAnalyticsClient from .._policies import TextAnalyticsResponseHookPolicy from .._user_agent import USER_AGENT @@ -30,13 +30,38 @@ def _authentication_policy(credential): class AsyncTextAnalyticsClientBase(object): def __init__(self, endpoint, credential, **kwargs): + http_logging_policy = HttpLoggingPolicy(**kwargs) + http_logging_policy.allowed_header_names.update( + { + "Operation-Location", + "apim-request-id", + "x-envoy-upstream-service-time", + "Strict-Transport-Security", + "x-content-type-options", + } + ) + http_logging_policy.allowed_query_params.update( + { + "model-version", + "showStats", + "loggingOptOut", + "domain", + "stringIndexType", + "piiCategories", + "$top", + "$skip", + "opinionMining", + } + ) + self._client = _TextAnalyticsClient( endpoint=endpoint, credential=credential, api_version=kwargs.pop("api_version", DEFAULT_API_VERSION), sdk_moniker=USER_AGENT, - authentication_policy=_authentication_policy(credential), - custom_hook_policy=TextAnalyticsResponseHookPolicy(**kwargs), + authentication_policy=kwargs.pop("authentication_policy", _authentication_policy(credential)), + custom_hook_policy=kwargs.pop("custom_hook_policy", TextAnalyticsResponseHookPolicy(**kwargs)), + http_logging_policy=kwargs.pop("http_logging_policy", http_logging_policy), **kwargs ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py index de578bb7e70b..af0a0807c088 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_lro_async.py @@ -4,12 +4,16 @@ # Licensed under the MIT License. # ------------------------------------ import datetime -from typing import Optional +import base64 +import functools +import json +from typing import Optional, Any from azure.core.exceptions import HttpResponseError from azure.core.polling import AsyncLROPoller from azure.core.polling.base_polling import OperationFailed, BadStatus from azure.core.polling.async_base_polling import AsyncLROBasePolling from azure.core.polling._async_poller import PollingReturnType +from .._lro import TextAnalyticsOperationResourcePolling _FINISHED = frozenset(["succeeded", "cancelled", "failed", "partiallycompleted"]) @@ -68,7 +72,14 @@ async def _poll(self): # pylint:disable=invalid-overridden-method await self.update_status() if TextAnalyticsAsyncLROPollingMethod._failed(self.status()): - raise OperationFailed("Operation failed or canceled") + try: + job = json.loads(self._pipeline_response.http_response.text()) + error_message = "" + for err in job["errors"]: + error_message += "({}) {}".format(err["code"], err["message"]) + raise HttpResponseError(message=error_message, response=self._pipeline_response.http_response) + except KeyError: + raise OperationFailed("Operation failed or canceled") final_get_url = self._operation.get_final_get_url(self._pipeline_response) if final_get_url: @@ -83,6 +94,8 @@ class AsyncAnalyzeHealthcareEntitiesLROPollingMethod( ): def __init__(self, *args, **kwargs): self._text_analytics_client = kwargs.pop("text_analytics_client") + self._doc_id_order = kwargs.pop("doc_id_order", None) + self._show_stats = kwargs.pop("show_stats", None) super(AsyncAnalyzeHealthcareEntitiesLROPollingMethod, self).__init__( *args, **kwargs ) @@ -117,6 +130,13 @@ def id(self): return None return self._current_body.job_id + def get_continuation_token(self): + # type() -> str + import pickle + self._initial_response.context.options["doc_id_order"] = self._doc_id_order + self._initial_response.context.options["show_stats"] = self._show_stats + return base64.b64encode(pickle.dumps(self._initial_response)).decode('ascii') + class AsyncAnalyzeHealthcareEntitiesLROPoller(AsyncLROPoller[PollingReturnType]): def polling_method(self) -> AsyncAnalyzeHealthcareEntitiesLROPollingMethod: # type: ignore @@ -159,6 +179,29 @@ def id(self) -> str: """ return self.polling_method().id + @classmethod + def from_continuation_token( # type: ignore + cls, + polling_method, # type: AsyncAnalyzeHealthcareEntitiesLROPollingMethod + continuation_token, # type: str + **kwargs # type: Any + ): + # type: (...) -> AsyncAnalyzeHealthcareEntitiesLROPoller + client, initial_response, deserialization_callback = polling_method.from_continuation_token( + continuation_token, **kwargs + ) + polling_method._lro_algorithms = [ # pylint: disable=protected-access + TextAnalyticsOperationResourcePolling( + show_stats=initial_response.context.options["show_stats"] + ) + ] + return cls( + client, + initial_response, + functools.partial(deserialization_callback, initial_response), + polling_method # type: ignore + ) + async def cancel(self, **kwargs) -> "AsyncLROPoller[None]": # type: ignore """Cancel the operation currently being polled. @@ -195,6 +238,12 @@ async def cancel(self, **kwargs) -> "AsyncLROPoller[None]": # type: ignore class AsyncAnalyzeActionsLROPollingMethod(TextAnalyticsAsyncLROPollingMethod): + def __init__(self, *args, **kwargs): + self._doc_id_order = kwargs.pop("doc_id_order", None) + self._task_id_order = kwargs.pop("task_id_order", None) + self._show_stats = kwargs.pop("show_stats", None) + super(AsyncAnalyzeActionsLROPollingMethod, self).__init__(*args, **kwargs) + @property def _current_body(self): from .._generated.models import AnalyzeJobMetadata @@ -255,6 +304,14 @@ def id(self): return None return self._current_body.job_id + def get_continuation_token(self): + # type: () -> str + import pickle + self._initial_response.context.options["doc_id_order"] = self._doc_id_order + self._initial_response.context.options["task_id_order"] = self._task_id_order + self._initial_response.context.options["show_stats"] = self._show_stats + return base64.b64encode(pickle.dumps(self._initial_response)).decode('ascii') + class AsyncAnalyzeActionsLROPoller(AsyncLROPoller[PollingReturnType]): def polling_method(self) -> AsyncAnalyzeActionsLROPollingMethod: # type: ignore @@ -344,3 +401,21 @@ def id(self) -> str: :rtype: str """ return self.polling_method().id + + @classmethod + def from_continuation_token(cls, polling_method, continuation_token, **kwargs): # type: ignore + # type: (AsyncAnalyzeActionsLROPollingMethod, str, Any) -> AsyncAnalyzeActionsLROPoller + client, initial_response, deserialization_callback = polling_method.from_continuation_token( + continuation_token, **kwargs + ) + polling_method._lro_algorithms = [ # pylint: disable=protected-access + TextAnalyticsOperationResourcePolling( + show_stats=initial_response.context.options["show_stats"] + ) + ] + return cls( + client, + initial_response, + functools.partial(deserialization_callback, initial_response), + polling_method # type: ignore + ) diff --git a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py index f85d08348cc4..d8678ecd6d11 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/aio/_text_analytics_client_async.py @@ -5,7 +5,6 @@ # ------------------------------------ # pylint: disable=too-many-lines -import copy from typing import Union, Any, List, Dict, TYPE_CHECKING from functools import partial from azure.core.async_paging import AsyncItemPaged @@ -49,6 +48,12 @@ AnalyzeHealthcareEntitiesResult, ExtractSummaryAction, ExtractSummaryResult, + RecognizeCustomEntitiesAction, + RecognizeCustomEntitiesResult, + SingleCategoryClassifyAction, + SingleCategoryClassifyResult, + MultiCategoryClassifyAction, + MultiCategoryClassifyResult, ) from .._lro import TextAnalyticsOperationResourcePolling from ._lro_async import ( @@ -745,7 +750,10 @@ async def begin_analyze_healthcare_entities( # type: ignore For additional information see https://aka.ms/text-analytics-offsets :keyword int polling_interval: Waiting time between two polls for LRO operations if no Retry-After header is present. Defaults to 5 seconds. - :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword str continuation_token: + Call `continuation_token()` on the poller object to save the long-running operation (LRO) + state into an opaque token. Pass the value as the `continuation_token` keyword argument + to restart the LRO from a saved state. :keyword bool disable_service_logs: Defaults to true, meaning that Text Analytics will not log your input text on the service side for troubleshooting. If set to False, Text Analytics logs your input text for 48 hours, solely to allow for troubleshooting issues in providing you with @@ -776,13 +784,33 @@ async def begin_analyze_healthcare_entities( # type: ignore """ language_arg = kwargs.pop("language", None) language = language_arg if language_arg is not None else self._default_language - docs = _validate_input(documents, "language", language) model_version = kwargs.pop("model_version", None) show_stats = kwargs.pop("show_stats", False) polling_interval = kwargs.pop("polling_interval", 5) continuation_token = kwargs.pop("continuation_token", None) string_index_type = kwargs.pop("string_index_type", self._string_code_unit) disable_service_logs = kwargs.pop("disable_service_logs", None) + + if continuation_token: + def get_result_from_cont_token(initial_response, pipeline_response): + doc_id_order = initial_response.context.options["doc_id_order"] + show_stats = initial_response.context.options["show_stats"] + return self._healthcare_result_callback( + doc_id_order, pipeline_response, None, {}, show_stats=show_stats + ) + + return AsyncAnalyzeHealthcareEntitiesLROPoller.from_continuation_token( + polling_method=AsyncAnalyzeHealthcareEntitiesLROPollingMethod( + text_analytics_client=self._client, + timeout=polling_interval, + **kwargs + ), + client=self._client._client, # pylint: disable=protected-access + deserialization_callback=get_result_from_cont_token, + continuation_token=continuation_token + ) + + docs = _validate_input(documents, "language", language) doc_id_order = [doc.get("id") for doc in docs] my_cls = kwargs.pop( "cls", @@ -790,27 +818,28 @@ async def begin_analyze_healthcare_entities( # type: ignore self._healthcare_result_callback, doc_id_order, show_stats=show_stats ), ) - polling_kwargs = kwargs - operation_kwargs = copy.copy(kwargs) - if disable_service_logs is not None: - operation_kwargs["logging_opt_out"] = disable_service_logs try: return await self._client.begin_health( docs, model_version=model_version, string_index_type=string_index_type, + logging_opt_out=disable_service_logs, cls=my_cls, polling=AsyncAnalyzeHealthcareEntitiesLROPollingMethod( text_analytics_client=self._client, + doc_id_order=doc_id_order, + show_stats=show_stats, timeout=polling_interval, lro_algorithms=[ - TextAnalyticsOperationResourcePolling(show_stats=show_stats) + TextAnalyticsOperationResourcePolling( + show_stats=show_stats, + ) ], - **polling_kwargs, + **kwargs, ), continuation_token=continuation_token, - **operation_kwargs, + **kwargs, ) except ValueError as error: @@ -851,6 +880,9 @@ async def begin_analyze_actions( # type: ignore ExtractKeyPhrasesAction, AnalyzeSentimentAction, ExtractSummaryAction, + RecognizeCustomEntitiesAction, + SingleCategoryClassifyAction, + MultiCategoryClassifyAction, ] ], # pylint: disable=line-too-long **kwargs: Any, @@ -864,6 +896,9 @@ async def begin_analyze_actions( # type: ignore ExtractKeyPhrasesResult, AnalyzeSentimentResult, ExtractSummaryResult, + RecognizeCustomEntitiesResult, + SingleCategoryClassifyResult, + MultiCategoryClassifyResult, DocumentError, ] ] @@ -875,6 +910,9 @@ async def begin_analyze_actions( # type: ignore combine multiple Text Analytics actions into one call. Otherwise, we recommend you use the action specific endpoints, for example :func:`analyze_sentiment`. + .. note:: See the service documentation for regional support of custom action features: + https://aka.ms/azsdk/textanalytics/customfunctionalities + :param documents: The set of documents to process as part of this batch. If you wish to specify the ID and language on a per-item basis you must use as input a list[:class:`~azure.ai.textanalytics.TextDocumentInput`] or a list of @@ -886,10 +924,11 @@ async def begin_analyze_actions( # type: ignore :param actions: A heterogeneous list of actions to perform on the input documents. Each action object encapsulates the parameters used for the particular action type. The action results will be in the same order of the input actions. - Duplicate actions in list not supported. :type actions: list[RecognizeEntitiesAction or RecognizePiiEntitiesAction or ExtractKeyPhrasesAction or - RecognizeLinkedEntitiesAction or AnalyzeSentimentAction, or ExtractSummaryAction] + RecognizeLinkedEntitiesAction or AnalyzeSentimentAction or ExtractSummaryAction or + RecognizeCustomEntitiesAction or SingleCategoryClassifyAction or + MultiCategoryClassifyAction] :keyword str display_name: An optional display name to set for the requested analysis. :keyword str language: The 2 letter ISO 639-1 representation of language for the entire batch. For example, use "en" for English; "es" for Spanish etc. @@ -899,6 +938,10 @@ async def begin_analyze_actions( # type: ignore :keyword bool show_stats: If set to true, response will contain document level statistics. :keyword int polling_interval: Waiting time between two polls for LRO operations if no Retry-After header is present. Defaults to 5 seconds. + :keyword str continuation_token: + Call `continuation_token()` on the poller object to save the long-running operation (LRO) + state into an opaque token. Pass the value as the `continuation_token` keyword argument + to restart the LRO from a saved state. :return: An instance of an AsyncAnalyzeActionsLROPoller. Call `result()` on the poller object to return a pageable heterogeneous list of lists. This list of lists is first ordered by the documents you input, then ordered by the actions you input. For example, @@ -913,13 +956,17 @@ async def begin_analyze_actions( # type: ignore :rtype: ~azure.ai.textanalytics.aio.AsyncAnalyzeActionsLROPoller[~azure.core.async_paging.AsyncItemPaged[ list[Union[RecognizeEntitiesResult, RecognizeLinkedEntitiesResult, RecognizePiiEntitiesResult, - ExtractKeyPhrasesResult, AnalyzeSentimentResult, ExtractSummaryResult, DocumentError]]]] + ExtractKeyPhrasesResult, AnalyzeSentimentResult, ExtractSummaryAction, RecognizeCustomEntitiesResult, + SingleCategoryClassifyResult, MultiCategoryClassifyResult, DocumentError]]]] :raises ~azure.core.exceptions.HttpResponseError or TypeError or ValueError or NotImplementedError: .. versionadded:: v3.1 The *begin_analyze_actions* client method. .. versionadded:: v3.2-preview - The *ExtractSummaryAction* input option and *ExtractSummaryResult* result object + The *ExtractSummaryAction*, *RecognizeCustomEntitiesAction*, *SingleCategoryClassifyAction*, + and *MultiCategoryClassifyAction* input options and the corresponding *ExtractSummaryResult*, + *RecognizeCustomEntitiesResult*, *SingleCategoryClassifyResult*, + and *MultiCategoryClassifyResult* result objects .. admonition:: Example: @@ -935,89 +982,84 @@ async def begin_analyze_actions( # type: ignore display_name = kwargs.pop("display_name", None) language_arg = kwargs.pop("language", None) language = language_arg if language_arg is not None else self._default_language + + show_stats = kwargs.pop("show_stats", False) + polling_interval = kwargs.pop("polling_interval", 5) + continuation_token = kwargs.pop("continuation_token", None) + + if continuation_token: + def get_result_from_cont_token(initial_response, pipeline_response): + doc_id_order = initial_response.context.options["doc_id_order"] + task_id_order = initial_response.context.options["task_id_order"] + show_stats = initial_response.context.options["show_stats"] + return self._analyze_result_callback( + doc_id_order, task_id_order, pipeline_response, None, {}, show_stats=show_stats + ) + + return AsyncAnalyzeActionsLROPoller.from_continuation_token( + polling_method=AsyncAnalyzeActionsLROPollingMethod( + timeout=polling_interval, + **kwargs + ), + client=self._client._client, # pylint: disable=protected-access + deserialization_callback=get_result_from_cont_token, + continuation_token=continuation_token + ) + docs = self._client.models( api_version=self._api_version ).MultiLanguageBatchInput( documents=_validate_input(documents, "language", language) ) - show_stats = kwargs.pop("show_stats", False) - polling_interval = kwargs.pop("polling_interval", 5) - continuation_token = kwargs.pop("continuation_token", None) - doc_id_order = [doc.get("id") for doc in docs.documents] - task_order = [_determine_action_type(action) for action in actions] - if len(task_order) != len(set(task_order)): - raise ValueError("Multiple of the same action is not currently supported.") + try: + generated_tasks = [ + action._to_generated(self._api_version, str(idx)) # pylint: disable=protected-access + for idx, action in enumerate(actions) + ] + except AttributeError: + raise TypeError("Unsupported action type in list.") + task_order = [(_determine_action_type(a), a.task_name) for a in generated_tasks] try: analyze_tasks = self._client.models( api_version=self._api_version ).JobManifestTasks( entity_recognition_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.RECOGNIZE_ENTITIES - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_ENTITIES ], entity_recognition_pii_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES ], key_phrase_extraction_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.EXTRACT_KEY_PHRASES - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.EXTRACT_KEY_PHRASES ], entity_linking_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_LINKED_ENTITIES ], sentiment_analysis_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.ANALYZE_SENTIMENT - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.ANALYZE_SENTIMENT ], extractive_summarization_tasks=[ - t._to_generated( # pylint: disable=protected-access - self._api_version - ) - for t in [ - a - for a in actions - if _determine_action_type(a) - == _AnalyzeActionsType.EXTRACT_SUMMARY - ] + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.EXTRACT_SUMMARY + ], + custom_entity_recognition_tasks=[ + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.RECOGNIZE_CUSTOM_ENTITIES + ], + custom_single_classification_tasks=[ + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.SINGLE_CATEGORY_CLASSIFY + ], + custom_multi_classification_tasks=[ + a for a in generated_tasks + if _determine_action_type(a) == _AnalyzeActionsType.MULTI_CATEGORY_CLASSIFY ], ) analyze_body = self._client.models( @@ -1038,8 +1080,13 @@ async def begin_analyze_actions( # type: ignore ), polling=AsyncAnalyzeActionsLROPollingMethod( timeout=polling_interval, + show_stats=show_stats, + doc_id_order=doc_id_order, + task_id_order=task_order, lro_algorithms=[ - TextAnalyticsOperationResourcePolling(show_stats=show_stats) + TextAnalyticsOperationResourcePolling( + show_stats=show_stats, + ) ], **kwargs, ), diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/README.md b/sdk/textanalytics/azure-ai-textanalytics/samples/README.md index ddb34aecd59c..78651d4214d6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/samples/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/README.md @@ -31,6 +31,9 @@ These sample programs show common scenarios for the Text Analytics client's offe |[sample_analyze_healthcare_entities.py][analyze_healthcare_entities_sample] and [sample_analyze_healthcare_entities_async.py][analyze_healthcare_entities_sample_async]|Analyze healthcare entities| |[sample_analyze_actions.py][analyze_sample] and [sample_analyze_actions_async.py][analyze_sample_async]|Run multiple analyses together in a single request| |[sample_extract_summary.py][extract_summary_sample] and [sample_extract_summary_async.py][extract_summary_sample_async]|As part of the analyze API, run extractive text summarization on documents| +|[sample_recognize_custom_entities.py][recognize_custom_entities_sample] and [sample_recognize_custom_entities_async.py][recognize_custom_entities_sample_async]|Use a custom model to recognize custom entities in documents| +|[sample_single_category_classify.py][single_category_classify_sample] and [sample_single_category_classify_async.py][single_category_classify_sample_async]|Use a custom model to classify documents into a single category| +|[sample_multi_category_classify.py][multi_category_classify_sample] and [sample_multi_category_classify_async.py][multi_category_classify_sample_async]|Use a custom model to classify documents into multiple categories| ## Prerequisites * Python 2.7, or 3.6 or later is required to use this package (3.6 or later if using asyncio) @@ -101,6 +104,12 @@ what you can do with the Azure Text Analytics client library. [sample_analyze_healthcare_entities_with_cancellation_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_analyze_healthcare_entities_with_cancellation_async.py [extract_summary_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_extract_summary.py [extract_summary_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_extract_summary_async.py +[recognize_custom_entities_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py +[recognize_custom_entities_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py +[single_category_classify_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_category_classify.py +[single_category_classify_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_category_classify_async.py +[multi_category_classify_sample]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_category_classify.py +[multi_category_classify_sample_async]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_category_classify_async.py [pip]: https://pypi.org/project/pip/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_text_analytics_account]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=singleservice%2Cwindows diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_category_classify_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_category_classify_async.py new file mode 100644 index 000000000000..d6d2bfc08869 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_multi_category_classify_async.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_multi_category_classify_async.py + +DESCRIPTION: + This sample demonstrates how to classify documents into multiple custom categories. For example, + movie plot summaries can be categorized into multiple movie genres like "Action" and "Thriller", + or "Comedy" and "Drama", etc. Classifying documents is available as an action type through + the begin_analyze_actions API. + + For information on regional support of custom features and how to train a model to + classify your documents, see https://aka.ms/azsdk/textanalytics/customfunctionalities + +USAGE: + python sample_multi_category_classify_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key + 3) MULTI_CATEGORY_CLASSIFY_PROJECT_NAME - your Text Analytics Language Studio project name + 4) MULTI_CATEGORY_CLASSIFY_DEPLOYMENT_NAME - your Text Analytics deployed model name +""" + + +import os +import asyncio + + +async def sample_classify_document_multi_categories_async(): + from azure.core.credentials import AzureKeyCredential + from azure.ai.textanalytics.aio import TextAnalyticsClient + from azure.ai.textanalytics import MultiCategoryClassifyAction + + endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"] + key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] + project_name = os.environ["MULTI_CATEGORY_CLASSIFY_PROJECT_NAME"] + deployed_model_name = os.environ["MULTI_CATEGORY_CLASSIFY_DEPLOYMENT_NAME"] + path_to_sample_document = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "..", + "./text_samples/custom_classify_sample.txt", + ) + ) + + with open(path_to_sample_document, "r") as fd: + document = [fd.read()] + + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, + credential=AzureKeyCredential(key), + ) + + async with text_analytics_client: + poller = await text_analytics_client.begin_analyze_actions( + document, + actions=[ + MultiCategoryClassifyAction( + project_name=project_name, + deployment_name=deployed_model_name + ), + ], + ) + + pages = await poller.result() + + document_results = [] + async for page in pages: + document_results.append(page) + for doc, classification_results in zip(document, document_results): + for classification_result in classification_results: + if not classification_result.is_error: + classifications = classification_result.classifications + print("\nThe movie plot '{}' was classified as the following genres:\n".format(doc)) + for classification in classifications: + print("'{}' with confidence score {}.".format( + classification.category, classification.confidence_score + )) + else: + print("Movie plot '{}' has an error with code '{}' and message '{}'".format( + doc, classification_result.code, classification_result.message + )) + + +async def main(): + await sample_classify_document_multi_categories_async() + + +if __name__ == '__main__': + asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py new file mode 100644 index 000000000000..8bcd5cc32eaf --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_recognize_custom_entities_async.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_recognize_custom_entities_async.py + +DESCRIPTION: + This sample demonstrates how to recognize custom entities in documents. + Recognizing custom entities is available as an action type through the begin_analyze_actions API. + + For information on regional support of custom features and how to train a model to + recognize custom entities, see https://aka.ms/azsdk/textanalytics/customentityrecognition + +USAGE: + python sample_recognize_custom_entities_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key + 3) CUSTOM_ENTITIES_PROJECT_NAME - your Text Analytics Language Studio project name + 4) CUSTOM_ENTITIES_DEPLOYMENT_NAME - your Text Analytics deployed model name +""" + + +import os +import asyncio + + +async def sample_recognize_custom_entities_async(): + from azure.core.credentials import AzureKeyCredential + from azure.ai.textanalytics.aio import TextAnalyticsClient + from azure.ai.textanalytics import RecognizeCustomEntitiesAction + + endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"] + key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] + project_name = os.environ["CUSTOM_ENTITIES_PROJECT_NAME"] + deployed_model_name = os.environ["CUSTOM_ENTITIES_DEPLOYMENT_NAME"] + path_to_sample_document = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "..", + "./text_samples/custom_entities_sample.txt", + ) + ) + + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, + credential=AzureKeyCredential(key), + ) + + with open(path_to_sample_document, "r") as fd: + document = [fd.read()] + + async with text_analytics_client: + poller = await text_analytics_client.begin_analyze_actions( + document, + actions=[ + RecognizeCustomEntitiesAction( + project_name=project_name, + deployment_name=deployed_model_name + ), + ], + ) + + document_results = await poller.result() + + async for result in document_results: + custom_entities_result = result[0] # first document, first result + if not custom_entities_result.is_error: + for entity in custom_entities_result.entities: + print( + "Entity '{}' has category '{}' with confidence score of '{}'".format( + entity.text, entity.category, entity.confidence_score + ) + ) + else: + print("...Is an error with code '{}' and message '{}'".format( + custom_entities_result.code, custom_entities_result.message + ) + ) + + +async def main(): + await sample_recognize_custom_entities_async() + + +if __name__ == '__main__': + asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_category_classify_async.py b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_category_classify_async.py new file mode 100644 index 000000000000..e8ca2333c316 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/async_samples/sample_single_category_classify_async.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_single_category_classify_async.py + +DESCRIPTION: + This sample demonstrates how to classify documents into a single custom category. For example, + movie plot summaries can be categorized into a single movie genre like "Mystery", "Drama", "Thriller", + "Comedy", "Action", etc. Classifying documents is available as an action type through + the begin_analyze_actions API. + + For information on regional support of custom features and how to train a model to + classify your documents, see https://aka.ms/azsdk/textanalytics/customfunctionalities + +USAGE: + python sample_single_category_classify_async.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key + 3) SINGLE_CATEGORY_CLASSIFY_PROJECT_NAME - your Text Analytics Language Studio project name + 4) SINGLE_CATEGORY_CLASSIFY_DEPLOYMENT_NAME - your Text Analytics deployed model name +""" + + +import os +import asyncio + + +async def sample_classify_document_single_category_async(): + from azure.core.credentials import AzureKeyCredential + from azure.ai.textanalytics.aio import TextAnalyticsClient + from azure.ai.textanalytics import SingleCategoryClassifyAction + + endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"] + key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] + project_name = os.environ["SINGLE_CATEGORY_CLASSIFY_PROJECT_NAME"] + deployed_model_name = os.environ["SINGLE_CATEGORY_CLASSIFY_DEPLOYMENT_NAME"] + path_to_sample_document = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "..", + "./text_samples/custom_classify_sample.txt", + ) + ) + + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, + credential=AzureKeyCredential(key), + ) + + with open(path_to_sample_document, "r") as fd: + document = [fd.read()] + + async with text_analytics_client: + poller = await text_analytics_client.begin_analyze_actions( + document, + actions=[ + SingleCategoryClassifyAction( + project_name=project_name, + deployment_name=deployed_model_name + ), + ], + ) + + pages = await poller.result() + + document_results = [] + async for page in pages: + document_results.append(page) + + for doc, classification_results in zip(document, document_results): + for classification_result in classification_results: + if not classification_result.is_error: + classification = classification_result.classification + print("The document text '{}' was classified as '{}' with confidence score {}.".format( + doc, classification.category, classification.confidence_score) + ) + else: + print("Document text '{}' has an error with code '{}' and message '{}'".format( + doc, classification_result.code, classification_result.message + )) + + +async def main(): + await sample_classify_document_single_category_async() + + +if __name__ == '__main__': + asyncio.run(main()) diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_category_classify.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_category_classify.py new file mode 100644 index 000000000000..8487bda97f0a --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_multi_category_classify.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_multi_category_classify.py + +DESCRIPTION: + This sample demonstrates how to classify documents into multiple custom categories. For example, + movie plot summaries can be categorized into multiple movie genres like "Action" and "Thriller", + or "Comedy" and "Drama", etc. Classifying documents is available as an action type through + the begin_analyze_actions API. + + For information on regional support of custom features and how to train a model to + classify your documents, see https://aka.ms/azsdk/textanalytics/customfunctionalities + +USAGE: + python sample_multi_category_classify.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key + 3) MULTI_CATEGORY_CLASSIFY_PROJECT_NAME - your Text Analytics Language Studio project name + 4) MULTI_CATEGORY_CLASSIFY_DEPLOYMENT_NAME - your Text Analytics deployed model name +""" + + +import os + + +def sample_classify_document_multi_categories(): + from azure.core.credentials import AzureKeyCredential + from azure.ai.textanalytics import ( + TextAnalyticsClient, + MultiCategoryClassifyAction + ) + + endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"] + key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] + project_name = os.environ["MULTI_CATEGORY_CLASSIFY_PROJECT_NAME"] + deployed_model_name = os.environ["MULTI_CATEGORY_CLASSIFY_DEPLOYMENT_NAME"] + path_to_sample_document = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "./text_samples/custom_classify_sample.txt", + ) + ) + + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, + credential=AzureKeyCredential(key), + ) + + with open(path_to_sample_document, "r") as fd: + document = [fd.read()] + + poller = text_analytics_client.begin_analyze_actions( + document, + actions=[ + MultiCategoryClassifyAction( + project_name=project_name, + deployment_name=deployed_model_name + ), + ], + ) + + document_results = poller.result() + for doc, classification_results in zip(document, document_results): + for classification_result in classification_results: + if not classification_result.is_error: + classifications = classification_result.classifications + print("\nThe movie plot '{}' was classified as the following genres:\n".format(doc)) + for classification in classifications: + print("'{}' with confidence score {}.".format( + classification.category, classification.confidence_score + )) + else: + print("Movie plot '{}' has an error with code '{}' and message '{}'".format( + doc, classification_result.code, classification_result.message + )) + + +if __name__ == "__main__": + sample_classify_document_multi_categories() \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py new file mode 100644 index 000000000000..579a603947fa --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_recognize_custom_entities.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_recognize_custom_entities.py + +DESCRIPTION: + This sample demonstrates how to recognize custom entities in documents. + Recognizing custom entities is available as an action type through the begin_analyze_actions API. + + For information on regional support of custom features and how to train a model to + recognize custom entities, see https://aka.ms/azsdk/textanalytics/customentityrecognition + +USAGE: + python sample_recognize_custom_entities.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key + 3) CUSTOM_ENTITIES_PROJECT_NAME - your Text Analytics Language Studio project name + 4) CUSTOM_ENTITIES_DEPLOYMENT_NAME - your Text Analytics deployed model name +""" + + +import os + + +def sample_recognize_custom_entities(): + from azure.core.credentials import AzureKeyCredential + from azure.ai.textanalytics import ( + TextAnalyticsClient, + RecognizeCustomEntitiesAction, + ) + + endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"] + key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] + project_name = os.environ["CUSTOM_ENTITIES_PROJECT_NAME"] + deployed_model_name = os.environ["CUSTOM_ENTITIES_DEPLOYMENT_NAME"] + path_to_sample_document = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "./text_samples/custom_entities_sample.txt", + ) + ) + + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, + credential=AzureKeyCredential(key), + ) + + with open(path_to_sample_document, "r") as fd: + document = [fd.read()] + + poller = text_analytics_client.begin_analyze_actions( + document, + actions=[ + RecognizeCustomEntitiesAction( + project_name=project_name, deployment_name=deployed_model_name + ), + ], + ) + + document_results = poller.result() + for result in document_results: + custom_entities_result = result[0] # first document, first result + if not custom_entities_result.is_error: + for entity in custom_entities_result.entities: + print( + "Entity '{}' has category '{}' with confidence score of '{}'".format( + entity.text, entity.category, entity.confidence_score + ) + ) + else: + print( + "...Is an error with code '{}' and message '{}'".format( + custom_entities_result.code, custom_entities_result.message + ) + ) + + +if __name__ == "__main__": + sample_recognize_custom_entities() \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_category_classify.py b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_category_classify.py new file mode 100644 index 000000000000..0d6f460dd9b9 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/sample_single_category_classify.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +""" +FILE: sample_single_category_classify.py + +DESCRIPTION: + This sample demonstrates how to classify documents into a single custom category. For example, + movie plot summaries can be categorized into a single movie genre like "Mystery", "Drama", "Thriller", + "Comedy", "Action", etc. Classifying documents is available as an action type through + the begin_analyze_actions API. + + For information on regional support of custom features and how to train a model to + classify your documents, see https://aka.ms/azsdk/textanalytics/customfunctionalities + +USAGE: + python sample_single_category_classify.py + + Set the environment variables with your own values before running the sample: + 1) AZURE_TEXT_ANALYTICS_ENDPOINT - the endpoint to your Cognitive Services resource. + 2) AZURE_TEXT_ANALYTICS_KEY - your Text Analytics subscription key + 3) SINGLE_CATEGORY_CLASSIFY_PROJECT_NAME - your Text Analytics Language Studio project name + 4) SINGLE_CATEGORY_CLASSIFY_DEPLOYMENT_NAME - your Text Analytics deployed model name +""" + + +import os + + +def sample_classify_document_single_category(): + from azure.core.credentials import AzureKeyCredential + from azure.ai.textanalytics import ( + TextAnalyticsClient, + SingleCategoryClassifyAction + ) + + endpoint = os.environ["AZURE_TEXT_ANALYTICS_ENDPOINT"] + key = os.environ["AZURE_TEXT_ANALYTICS_KEY"] + project_name = os.environ["SINGLE_CATEGORY_CLASSIFY_PROJECT_NAME"] + deployed_model_name = os.environ["SINGLE_CATEGORY_CLASSIFY_DEPLOYMENT_NAME"] + path_to_sample_document = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "./text_samples/custom_classify_sample.txt", + ) + ) + + text_analytics_client = TextAnalyticsClient( + endpoint=endpoint, + credential=AzureKeyCredential(key), + ) + + with open(path_to_sample_document, "r") as fd: + document = [fd.read()] + + poller = text_analytics_client.begin_analyze_actions( + document, + actions=[ + SingleCategoryClassifyAction( + project_name=project_name, + deployment_name=deployed_model_name + ), + ], + ) + + document_results = poller.result() + for doc, classification_results in zip(document, document_results): + for classification_result in classification_results: + if not classification_result.is_error: + classification = classification_result.classification + print("The document text '{}' was classified as '{}' with confidence score {}.".format( + doc, classification.category, classification.confidence_score) + ) + else: + print("Document text '{}' has an error with code '{}' and message '{}'".format( + doc, classification_result.code, classification_result.message + )) + + +if __name__ == "__main__": + sample_classify_document_single_category() \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/text_samples/custom_classify_sample.txt b/sdk/textanalytics/azure-ai-textanalytics/samples/text_samples/custom_classify_sample.txt new file mode 100644 index 000000000000..a2b0b87c6dde --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/text_samples/custom_classify_sample.txt @@ -0,0 +1 @@ +14-year-old Danny O'Neil is madly in love with his teacher, Miss Peggy Noble . Given the fact that she is engaged to the cold-tempered and vicious gym teacher, Roy Kilton , who is nicknamed Jackjaw for his constant threat of breaking his pupils' jaws, Danny goes through his school days somewhat uninspired and suffers in silence. One day, he oversees his geeky friend Lloyd Duffy , who happens to live next door with his uncle Herb and aunt May , growing fruits with an experimental growth accelerator. Danny becomes enthusiastic of turning himself into a grown man with the same machine, in order to break up Miss Noble's engagement, as well as convincing her to give him a chance. Lloyd is reluctant to help him out, aware of everything that could go wrong, so Danny secretly uses the machine at night. He saw that the timing was perfect, considering that his parents will leave the house for a week. Unaware of the consequences, he turns into a 30-year-old man . The next day, Lloyd immediately starts working on a machine with the opposite effect so Danny will be able to return to his 14-year-old body soon. During this process, Danny visits the high school to pursue Miss Noble. When he arrives, he is mistaken as the school newest principal, Harold Forndexter. He not only impresses his assistant Louisa Horton with the introduction of his new rules - which include having as much fun as possible - but also Peggy, who admires his youthful approach of life. Much to the dismay of Kilton, she agrees to go on a date with 'Harold'. Even though Kilton follows their every step, Peggy has a splendid evening with the new principal, and they almost kiss at the end of the night. During a school dance, 'Harold' convinces Peggy that Kilton is not right for her, and she breaks off the engagement. Immediately after, 'Harold' and Peggy become a couple. Kilton, refusing to accept this, tries to find out more on Forndexter, and finds out that 'Harold' is an impostor, as the real Forndexter looks quite differently. He immediately warns the police, who arrive quickly to arrest him. While 'Harold' tries to escape, Lloyd informs him that his machine is complete. After getting rid of the cops, 'Harold' tells Peggy that he has to leave town for good and then becomes 14 again. Peggy witnesses this transformation, and realizes that 'Harold' was actually Danny, one of her favorite students. Because she has fallen in love with him, she uses the same machine to turn herself into a 14-year-old , which enables her to be with Danny. Meanwhile, Lloyd turns himself into an old professor, Mr. Lloyd , and starts working at the same high school as a teacher. \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/samples/text_samples/custom_entities_sample.txt b/sdk/textanalytics/azure-ai-textanalytics/samples/text_samples/custom_entities_sample.txt new file mode 100644 index 000000000000..840a7ed54405 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/samples/text_samples/custom_entities_sample.txt @@ -0,0 +1,31 @@ +Date 6/29/2018 + +This is a Loan agreement between the two individuals mentioned below in the parties section of the agreement. + +I. Parties of agreement + +- Parker McLean with a mailing address of 9876 Fusce Rd, City of Frederick, State of Nebraska, (the "Borrower") +- Dylan Williams with a mailing address of 6789 May Street, City of Winchester, State of Kentucky (the "Lender") + +II. Amount +The loan amount given by lender to borrower is six hundred twenty-three thousand four hundred sixty-three Dollars ($623,463.00) ("The Note") + +III. Interest +The Note shall bear interest five percent (5%) compounded annually. + +IV. Payment +The amount mentioned in this agreement (the "Note"), including the principal and any accrued interest, is + +V. Payment Terms +Any delay in payment is subject to a fine with a flat amount of $50 for every week the payment is delayed. +All payments made by the Borrower shall be go into settling the the accrued interest and any late fess and then into the payment of the principal amount. + +VI. Prepayment +The borrower is able to pay back the Note in full at any time, thus terminating this agreement. +The borrower also can make additional payments at any time and this will take of from the amount of the latest installments. + +VII. Acceleration. +In case of Borrower's failure to pay any part of the principal or interest as and when due under this Note; or Borrower's becoming insolvent or not paying its debts as they become due. The lender has the right to declare an "Event of Acceleration" in which case the Lender has the right to to declare this Note immediately due and payable + +IX. Succession +This Note shall outlive the borrower and/or the lender in the even of their death. This note shall be binging to any of their successors. \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/setup.py b/sdk/textanalytics/azure-ai-textanalytics/setup.py index 0e99e4b17a6e..b3850e6a5409 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/setup.py +++ b/sdk/textanalytics/azure-ai-textanalytics/setup.py @@ -69,6 +69,7 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'License :: OSI Approved :: MIT License', ], zip_safe=False, @@ -79,7 +80,7 @@ 'azure.ai', ]), install_requires=[ - "azure-core<2.0.0,>=1.14.0", + "azure-core<2.0.0,>=1.19.1", "msrest>=0.6.21", 'azure-common~=1.1', 'six>=1.11.0', diff --git a/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md b/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md index ff1a29d6f5fe..fef874b4004a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md +++ b/sdk/textanalytics/azure-ai-textanalytics/swagger/README.md @@ -3,7 +3,7 @@ To generate this file, simply type ``` -autorest swagger/README.md +autorest swagger/README.md --python-sdks-folder= ``` We automatically hardcode in that this is `python` and `multiapi`. @@ -28,15 +28,15 @@ multiapi: true batch: - tag: release_3_0 - tag: release_3_1 - - tag: release_3_2_preview.1 + - tag: release_3_2_preview.2 - multiapiscript: true ``` ## Multiapiscript ```yaml $(multiapiscript) -output-folder: ../azure/ai/textanalytics/_generated/ -default-api: v3_2_preview_1 +output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/ +default-api: v3_2_preview_2 clear-output-folder: true perform-load: false ``` @@ -46,9 +46,9 @@ perform-load: false These settings apply only when `--tag=release_3_0` is specified on the command line. ```yaml $(tag) == 'release_3_0' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.0/TextAnalytics.json namespace: azure.ai.textanalytics.v3_0 -output-folder: ../azure/ai/textanalytics/_generated/v3_0 +output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_0 ``` ## Release 3.1 @@ -56,19 +56,19 @@ output-folder: ../azure/ai/textanalytics/_generated/v3_0 These settings apply only when `--tag=release_3_1` is specified on the command line. ```yaml $(tag) == 'release_3_1' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cognitiveservices/data-plane/TextAnalytics/stable/v3.1/TextAnalytics.json namespace: azure.ai.textanalytics.v3_1 -output-folder: ../azure/ai/textanalytics/_generated/v3_1 +output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_1 ``` -## Release 3.2-preview.1 +## Release 3.2-preview.2 -These settings apply only when `--tag=release_3_2_preview.1` is specified on the command line. +These settings apply only when `--tag=release_3_2_preview.2` is specified on the command line. -```yaml $(tag) == 'release_3_2_preview.1' -input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.1/TextAnalytics.json -namespace: azure.ai.textanalytics.v3_2_preview_1 -output-folder: ../azure/ai/textanalytics/_generated/v3_2_preview_1 +```yaml $(tag) == 'release_3_2_preview.2' +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/cognitiveservices/data-plane/TextAnalytics/preview/v3.2-preview.2/TextAnalytics.json +namespace: azure.ai.textanalytics.v3_2_preview_2 +output-folder: $(python-sdks-folder)/textanalytics/azure-ai-textanalytics/azure/ai/textanalytics/_generated/v3_2_preview_2 ``` ### Override Analyze's pager poller @@ -110,13 +110,13 @@ directive: $["parameters"] = [{"$ref": "#/parameters/Endpoint"}]; ``` -### Override parameterizing the ApiVersion v3.2-preview.1 +### Override parameterizing the ApiVersion v3.2-preview.2 -```yaml $(tag) == 'release_3_2_preview.1' +```yaml $(tag) == 'release_3_2_preview.2' directive: - from: swagger-document where: '$["x-ms-parameterized-host"]' transform: > - $["hostTemplate"] = "{Endpoint}/text/analytics/v3.2-preview.1"; + $["hostTemplate"] = "{Endpoint}/text/analytics/v3.2-preview.2"; $["parameters"] = [{"$ref": "#/parameters/Endpoint"}]; ``` \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/asynctestcase.py b/sdk/textanalytics/azure-ai-textanalytics/tests/asynctestcase.py index 708df984a98b..dd720bce3440 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/asynctestcase.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/asynctestcase.py @@ -5,10 +5,9 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -import asyncio + import os -import functools -from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function +import pytest from azure.core.credentials import AccessToken from testcase import TextAnalyticsTest @@ -24,6 +23,7 @@ async def get_token(self, *args): return self.token + class AsyncTextAnalyticsTest(TextAnalyticsTest): def generate_oauth_token(self): diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_error_no_target.json b/sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_error_no_target.json new file mode 100644 index 000000000000..28a1bedc64a6 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_error_no_target.json @@ -0,0 +1,40 @@ +{ + "jobId": "59678d1c-109e-4d93-a42f-05eb5e063525", + "lastUpdateDateTime": "2021-10-21T23:02:34Z", + "createdDateTime": "2021-10-21T23:02:27Z", + "expirationDateTime": "2021-10-22T23:02:27Z", + "status": "partiallyCompleted", + "errors": [ + { + "code": "InternalServerError", + "message": "1 out of 3 job tasks failed. Failed job tasks : v3.2-preview.2/custom/entities/general." + } + ], + "tasks": { + "completed": 2, + "failed": 1, + "inProgress": 0, + "total": 3, + "customEntityRecognitionTasks": [ + { + "lastUpdateDateTime": "2021-10-21T23:02:34.3218701Z", + "taskName": "2", + "state": "failed" + } + ], + "customSingleClassificationTasks": [ + { + "lastUpdateDateTime": "2021-10-21T23:02:29.3641823Z", + "taskName": "0", + "state": "succeeded" + } + ], + "customMultiClassificationTasks": [ + { + "lastUpdateDateTime": "2021-10-21T23:02:28.7184297Z", + "taskName": "1", + "state": "succeeded" + } + ] + } +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_error_with_targets.json b/sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_error_with_targets.json new file mode 100644 index 000000000000..49851103b41e --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_error_with_targets.json @@ -0,0 +1,175 @@ +{ + "jobId": "59678d1c-109e-4d93-a42f-05eb5e063525", + "lastUpdateDateTime": "2021-10-21T23:02:34Z", + "createdDateTime": "2021-10-21T23:02:27Z", + "expirationDateTime": "2021-10-22T23:02:27Z", + "status": "partiallyCompleted", + "errors": [ + { + "code": "InvalidRequest", + "message": "Some error2", + "target": "#/tasks/entityRecognitionPiiTasks/0" + }, + { + "code": "InvalidRequest", + "message": "Some error6", + "target": "#/tasks/entityRecognitionPiiTasks/1" + }, + { + "code": "InvalidRequest", + "message": "Some error0", + "target": "#/tasks/entityRecognitionTasks/0" + }, + { + "code": "InvalidRequest", + "message": "Some error1", + "target": "#/tasks/keyPhraseExtractionTasks/0" + }, + { + "code": "InvalidRequest", + "message": "Some error3", + "target": "#/tasks/entityLinkingTasks/0" + }, + { + "code": "InvalidRequest", + "message": "Some error4", + "target": "#/tasks/sentimentAnalysisTasks/0" + }, + { + "code": "InvalidRequest", + "message": "Some error5", + "target": "#/tasks/extractiveSummarizationTasks/0" + }, + { + "code": "InvalidRequest", + "message": "Some error9", + "target": "#/tasks/customEntityRecognitionTasks/0" + }, + { + "code": "InvalidRequest", + "message": "Some error7", + "target": "#/tasks/customSingleClassificationTasks/0" + }, + { + "code": "InvalidRequest", + "message": "Some error8", + "target": "#/tasks/customMultiClassificationTasks/0" + } + ], + "tasks": { + "completed": 1, + "failed": 10, + "inProgress": 0, + "total": 11, + "entityRecognitionTasks": [ + { + "lastUpdateDateTime": "2021-03-03T22:39:37.1716697Z", + "taskName": "0", + "state": "failed" + } + ], + "entityRecognitionPiiTasks": [ + { + "lastUpdateDateTime": "2021-03-03T22:39:37.1716697Z", + "taskName": "2", + "state": "failed" + }, + { + "lastUpdateDateTime": "2021-03-03T22:39:37.1716697Z", + "taskName": "6", + "state": "failed" + } + ], + "keyPhraseExtractionTasks": [ + { + "lastUpdateDateTime": "2021-03-03T22:39:37.1716697Z", + "taskName": "1", + "state": "failed" + } + ], + "entityLinkingTasks": [ + { + "lastUpdateDateTime": "2021-03-03T22:39:37.1716697Z", + "taskName": "3", + "state": "failed" + } + ], + "sentimentAnalysisTasks": [ + { + "lastUpdateDateTime": "2021-03-03T22:39:37.1716697Z", + "taskName": "4", + "state": "failed" + } + ], + "extractiveSummarizationTasks": [ + { + "lastUpdateDateTime": "2021-03-03T22:39:37.1716697Z", + "taskName": "5", + "state": "failed" + } + ], + "customEntityRecognitionTasks": [ + { + "lastUpdateDateTime": "2021-10-21T23:02:34.3218701Z", + "taskName": "9", + "state": "failed" + } + ], + "customSingleClassificationTasks": [ + { + "lastUpdateDateTime": "2021-10-21T23:02:34.3218701Z", + "taskName": "7", + "state": "failed" + }, + { + "lastUpdateDateTime": "2021-10-21T23:02:29.3641823Z", + "taskName": "10", + "state": "succeeded", + "results": { + "statistics": { + "documentsCount": 2, + "validDocumentsCount": 1, + "erroneousDocumentsCount": 1, + "transactionsCount": 1 + }, + "documents": [ + { + "id": "1", + "classification": { + "category": "RateBook", + "confidenceScore": 0.76 + }, + "statistics": { + "charactersCount": 295, + "transactionsCount": 1 + }, + "warnings": [] + } + ], + "errors": [ + { + "id": "2", + "error": { + "code": "InvalidArgument", + "message": "Invalid document in request.", + "innererror": { + "code": "InvalidDocument", + "message": "Document text is empty." + } + } + } + ], + "projectName": "single_category_classify_project_name", + "deploymentName": "single_category_classify_project_name" + } + } + ], + "customMultiClassificationTasks": [ + { + "lastUpdateDateTime": "2021-10-21T23:02:34.3218701Z", + "taskName": "8", + "state": "failed" + } + ] + } +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_job_failure.json b/sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_job_failure.json new file mode 100644 index 000000000000..42f93033d01f --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/mock_test_responses/action_job_failure.json @@ -0,0 +1,26 @@ +{ + "jobId": "59678d1c-109e-4d93-a42f-05eb5e063525", + "lastUpdateDateTime": "2021-10-21T23:02:34Z", + "createdDateTime": "2021-10-21T23:02:27Z", + "expirationDateTime": "2021-10-22T23:02:27Z", + "status": "failed", + "errors": [ + { + "code": "InternalServerError", + "message": "1 out of 1 job tasks failed. Failed job tasks : v3.2-preview.2/custom/entities/general." + } + ], + "tasks": { + "completed": 0, + "failed": 1, + "inProgress": 0, + "total": 1, + "customEntityRecognitionTasks": [ + { + "lastUpdateDateTime": "2021-10-21T23:02:34.3218701Z", + "taskName": "0", + "state": "failed" + } + ] + } +} \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_extract_summary_action.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_extract_summary_action.yaml index 259b97fcdaee..2e2dc5f2a66d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_extract_summary_action.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_extract_summary_action.yaml @@ -4,30 +4,31 @@ interactions: "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 3, "sortBy": "Offset"}}]}, "analysisInput": {"documents": [{"id": "1", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil - with the resignation of two senior Cabinet ministers in a deep split over her - Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours - after the resignation late on Sunday night of the minister in charge of Brexit - negotiations, David Davis. Their decision to leave the government came three - days after May appeared to have agreed a deal with herfractured Cabinet on the - UK''s post Brexit relationship with the EU. That plan is now in tatters and - her political future appears uncertain. May appeared in Parliament on Monday - afternoon to defend her plan, minutes after Downing Street confirmed the departure - of Johnson. May acknowledged the splits in her statement to MPs, saying of the - ministers who quit: We do not agree about the best way of delivering our shared - commitment to honoring the result of the referendum. The Prime Minister''s latest - plitical drama began late on Sunday night when Davis quit, declaring he could - not support May''s Brexit plan. He said it involved too close a relationship - with the EU and gave only an illusion of control being returned to the UK after - it left the EU. It seems to me we''re giving too much away, too easily, and - that''s a dangerous strategy at this time, Davis said in a BBC radio interview - Monday morning. Johnson''s resignation came Monday afternoon local time, just - before the Prime Minister was due to make a scheduled statement in Parliament. - This afternoon, the Prime Minister accepted the resignation of Boris Johnson - as Foreign Secretary, a statement from Downing Street said.", "language": "en"}, - {"id": "2", "text": "Microsoft fue fundado por Bill Gates y Paul Allen", "language": - "es"}]}}' + 3, "sortBy": "Offset"}, "taskName": "0"}], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "1", "text": "The government of British + Prime Minster Theresa May has been plunged into turmoil with the resignation + of two senior Cabinet ministers in a deep split over her Brexit strategy. The + Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation + late on Sunday night of the minister in charge of Brexit negotiations, David + Davis. Their decision to leave the government came three days after May appeared + to have agreed a deal with herfractured Cabinet on the UK''s post Brexit relationship + with the EU. That plan is now in tatters and her political future appears uncertain. + May appeared in Parliament on Monday afternoon to defend her plan, minutes after + Downing Street confirmed the departure of Johnson. May acknowledged the splits + in her statement to MPs, saying of the ministers who quit: We do not agree about + the best way of delivering our shared commitment to honoring the result of the + referendum. The Prime Minister''s latest plitical drama began late on Sunday + night when Davis quit, declaring he could not support May''s Brexit plan. He + said it involved too close a relationship with the EU and gave only an illusion + of control being returned to the UK after it left the EU. It seems to me we''re + giving too much away, too easily, and that''s a dangerous strategy at this time, + Davis said in a BBC radio interview Monday morning. Johnson''s resignation came + Monday afternoon local time, just before the Prime Minister was due to make + a scheduled statement in Parliament. This afternoon, the Prime Minister accepted + the resignation of Boris Johnson as Foreign Secretary, a statement from Downing + Street said.", "language": "en"}, {"id": "2", "text": "Microsoft fue fundado + por Bill Gates y Paul Allen", "language": "es"}]}}' headers: Accept: - application/json, text/json @@ -36,23 +37,23 @@ interactions: Connection: - keep-alive Content-Length: - - '2138' + - '2268' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - 9b8cecd9-2fcf-4ed5-a163-687ce277cfe4 + - 68966721-177c-4b3e-b196-a72dc1c5f869 date: - - Mon, 02 Aug 2021 21:28:42 GMT + - Thu, 07 Oct 2021 23:37:56 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/3272e64e-64b0-4a07-97aa-e91c225d05a2 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/8b252660-33b7-4d2c-a19c-fa59361ca1c9 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -60,7 +61,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '1408' + - '476' status: code: 202 message: Accepted @@ -74,19 +75,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/3272e64e-64b0-4a07-97aa-e91c225d05a2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/8b252660-33b7-4d2c-a19c-fa59361ca1c9?showStats=True response: body: - string: '{"jobId":"3272e64e-64b0-4a07-97aa-e91c225d05a2","lastUpdateDateTime":"2021-08-02T21:28:44Z","createdDateTime":"2021-08-02T21:28:42Z","expirationDateTime":"2021-08-03T21:28:42Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"8b252660-33b7-4d2c-a19c-fa59361ca1c9","lastUpdateDateTime":"2021-10-07T23:37:57Z","createdDateTime":"2021-10-07T23:37:56Z","expirationDateTime":"2021-10-08T23:37:56Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 9d6fb934-5c44-4f32-be3e-37d47e3dcbdb + - f55c994c-1f73-42a9-b842-ffcb2029849a content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:28:49 GMT + - Thu, 07 Oct 2021 23:38:01 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -94,7 +95,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '655' + - '756' status: code: 200 message: OK @@ -108,19 +109,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/3272e64e-64b0-4a07-97aa-e91c225d05a2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/8b252660-33b7-4d2c-a19c-fa59361ca1c9?showStats=True response: body: - string: '{"jobId":"3272e64e-64b0-4a07-97aa-e91c225d05a2","lastUpdateDateTime":"2021-08-02T21:28:44Z","createdDateTime":"2021-08-02T21:28:42Z","expirationDateTime":"2021-08-03T21:28:42Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"8b252660-33b7-4d2c-a19c-fa59361ca1c9","lastUpdateDateTime":"2021-10-07T23:37:57Z","createdDateTime":"2021-10-07T23:37:56Z","expirationDateTime":"2021-10-08T23:37:56Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 86933a07-0e1a-4624-a96f-5d467504d7b1 + - 649c89b9-aa97-4120-aef7-462c1be30b22 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:28:54 GMT + - Thu, 07 Oct 2021 23:38:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -128,7 +129,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '82' + - '685' status: code: 200 message: OK @@ -142,29 +143,63 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/3272e64e-64b0-4a07-97aa-e91c225d05a2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/8b252660-33b7-4d2c-a19c-fa59361ca1c9?showStats=True response: body: - string: '{"jobId":"3272e64e-64b0-4a07-97aa-e91c225d05a2","lastUpdateDateTime":"2021-08-02T21:28:56Z","createdDateTime":"2021-08-02T21:28:42Z","expirationDateTime":"2021-08-03T21:28:42Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:28:56.8777397Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":1625,"transactionsCount":2},"sentences":[{"text":"The + string: '{"jobId":"8b252660-33b7-4d2c-a19c-fa59361ca1c9","lastUpdateDateTime":"2021-10-07T23:37:57Z","createdDateTime":"2021-10-07T23:37:56Z","expirationDateTime":"2021-10-08T23:37:56Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: + - 6e580812-be12-4381-9f95-137b25bee4c9 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:38:13 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '968' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/8b252660-33b7-4d2c-a19c-fa59361ca1c9?showStats=True + response: + body: + string: '{"jobId":"8b252660-33b7-4d2c-a19c-fa59361ca1c9","lastUpdateDateTime":"2021-10-07T23:38:15Z","createdDateTime":"2021-10-07T23:37:56Z","expirationDateTime":"2021-10-08T23:37:56Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:38:15.3431529Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":1625,"transactionsCount":2},"sentences":[{"text":"The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over - her Brexit strategy.","rankScore":1.0,"offset":0,"length":176},{"text":"The + her Brexit strategy.","rankScore":0.57,"offset":0,"length":176},{"text":"The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David - Davis.","rankScore":0.9711179434493907,"offset":177,"length":164},{"text":"Their - decision to leave the government came three days after May appeared to have - agreed a deal with herfractured Cabinet on the UK''s post Brexit relationship - with the EU.","rankScore":0.9103508917712292,"offset":342,"length":171}],"warnings":[]},{"id":"2","statistics":{"charactersCount":49,"transactionsCount":1},"sentences":[{"text":"Microsoft + Davis.","rankScore":1.0,"offset":177,"length":164},{"text":"Their decision + to leave the government came three days after May appeared to have agreed + a deal with herfractured Cabinet on the UK''s post Brexit relationship with + the EU.","rankScore":0.47,"offset":342,"length":171}],"warnings":[]},{"id":"2","statistics":{"charactersCount":49,"transactionsCount":1},"sentences":[{"text":"Microsoft fue fundado por Bill Gates y Paul Allen","rankScore":1.0,"offset":0,"length":49}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}]}}' headers: apim-request-id: - - 557d8a8f-47e5-4e06-8e0c-fe1fc99ec680 + - dcd3b1b0-9c46-452a-8b02-4b22f52011a0 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:00 GMT + - Thu, 07 Oct 2021 23:38:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -172,7 +207,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '165' + - '325' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_key_phrase_task.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_key_phrase_task.yaml index 7a37fc46f567..24d2c7aed8fa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_key_phrase_task.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_key_phrase_task.yaml @@ -2,9 +2,11 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - false}}], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": - []}, "analysisInput": {"documents": [{"id": "1", "text": "Microsoft was founded - by Bill Gates and Paul Allen", "language": "en"}, {"id": "2", "text": "Microsoft + false}, "taskName": "0"}], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "1", "text": "Microsoft was founded by + Bill Gates and Paul Allen", "language": "en"}, {"id": "2", "text": "Microsoft fue fundado por Bill Gates y Paul Allen", "language": "es"}]}}' headers: Accept: @@ -14,23 +16,23 @@ interactions: Connection: - keep-alive Content-Length: - - '484' + - '614' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - d5a16525-283a-414b-864c-434902d16450 + - 4900bf99-d90f-4c71-82c7-605da7cb2a61 date: - - Mon, 02 Aug 2021 21:29:01 GMT + - Thu, 07 Oct 2021 23:38:19 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/7054258a-aa9c-4a39-9d92-354cc67e2b83 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fe68e29b-c0d8-4566-950d-20aa98a6470f strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '984' + - '391' status: code: 202 message: Accepted @@ -52,19 +54,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/7054258a-aa9c-4a39-9d92-354cc67e2b83?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fe68e29b-c0d8-4566-950d-20aa98a6470f?showStats=True response: body: - string: '{"jobId":"7054258a-aa9c-4a39-9d92-354cc67e2b83","lastUpdateDateTime":"2021-08-02T21:29:02Z","createdDateTime":"2021-08-02T21:29:01Z","expirationDateTime":"2021-08-03T21:29:01Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"fe68e29b-c0d8-4566-950d-20aa98a6470f","lastUpdateDateTime":"2021-10-07T23:38:20Z","createdDateTime":"2021-10-07T23:38:19Z","expirationDateTime":"2021-10-08T23:38:19Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 9ec35105-2bcf-407b-b72f-1774235716e1 + - bf6c5b95-e2f5-497c-87f6-2fc07c832e49 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:07 GMT + - Thu, 07 Oct 2021 23:38:24 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -72,7 +74,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '653' + - '9' status: code: 200 message: OK @@ -86,19 +88,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/7054258a-aa9c-4a39-9d92-354cc67e2b83?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fe68e29b-c0d8-4566-950d-20aa98a6470f?showStats=True response: body: - string: '{"jobId":"7054258a-aa9c-4a39-9d92-354cc67e2b83","lastUpdateDateTime":"2021-08-02T21:29:02Z","createdDateTime":"2021-08-02T21:29:01Z","expirationDateTime":"2021-08-03T21:29:01Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"fe68e29b-c0d8-4566-950d-20aa98a6470f","lastUpdateDateTime":"2021-10-07T23:38:20Z","createdDateTime":"2021-10-07T23:38:19Z","expirationDateTime":"2021-10-08T23:38:19Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 3660f2d9-64d5-4099-8125-44ba29ac0948 + - 33b7a3e6-12af-4c07-9eff-493b2ae60f35 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:12 GMT + - Thu, 07 Oct 2021 23:38:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -106,7 +108,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '43' + - '684' status: code: 200 message: OK @@ -120,21 +122,89 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/7054258a-aa9c-4a39-9d92-354cc67e2b83?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fe68e29b-c0d8-4566-950d-20aa98a6470f?showStats=True response: body: - string: '{"jobId":"7054258a-aa9c-4a39-9d92-354cc67e2b83","lastUpdateDateTime":"2021-08-02T21:29:14Z","createdDateTime":"2021-08-02T21:29:01Z","expirationDateTime":"2021-08-03T21:29:01Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:29:14.0101558Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","keyPhrases":["Bill + string: '{"jobId":"fe68e29b-c0d8-4566-950d-20aa98a6470f","lastUpdateDateTime":"2021-10-07T23:38:20Z","createdDateTime":"2021-10-07T23:38:19Z","expirationDateTime":"2021-10-08T23:38:19Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: + - 2247a90c-6c9b-46c0-b857-79c74346cc53 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:38:35 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '99' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fe68e29b-c0d8-4566-950d-20aa98a6470f?showStats=True + response: + body: + string: '{"jobId":"fe68e29b-c0d8-4566-950d-20aa98a6470f","lastUpdateDateTime":"2021-10-07T23:38:20Z","createdDateTime":"2021-10-07T23:38:19Z","expirationDateTime":"2021-10-08T23:38:19Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: + - 5e5038e6-e506-45f3-81f0-c52afcb7da7e + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:38:40 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '8' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fe68e29b-c0d8-4566-950d-20aa98a6470f?showStats=True + response: + body: + string: '{"jobId":"fe68e29b-c0d8-4566-950d-20aa98a6470f","lastUpdateDateTime":"2021-10-07T23:38:42Z","createdDateTime":"2021-10-07T23:38:19Z","expirationDateTime":"2021-10-08T23:38:19Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:38:42.0291176Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":50,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":49,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: apim-request-id: - - 57f36fd7-42be-4d3c-82d3-444ab5bd7284 + - c17b9765-d9b5-4861-8421-19601deb5d4f content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:17 GMT + - Thu, 07 Oct 2021 23:38:46 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -142,7 +212,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '76' + - '85' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_sentiment_task.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_sentiment_task.yaml index d65872d6dbb6..6ea7403dfc28 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_sentiment_task.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_dict_sentiment_task.yaml @@ -3,11 +3,13 @@ interactions: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": - false}}], "extractiveSummarizationTasks": []}, "analysisInput": {"documents": - [{"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen.", - "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at. - It was too expensive.", "language": "en"}, {"id": "3", "text": "The restaurant - had really good food. I recommend you try it.", "language": "en"}]}}' + false}, "taskName": "0"}], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "Microsoft was founded + by Bill Gates and Paul Allen.", "language": "en"}, {"id": "2", "text": "I did + not like the hotel we stayed at. It was too expensive.", "language": "en"}, + {"id": "3", "text": "The restaurant had really good food. I recommend you try + it.", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -16,23 +18,23 @@ interactions: Connection: - keep-alive Content-Length: - - '623' + - '753' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - 3f49be76-c28e-4156-b6f7-91e5222aa54d + - d0b49155-808e-4856-b491-5cf6f6065300 date: - - Mon, 02 Aug 2021 21:29:18 GMT + - Thu, 07 Oct 2021 23:38:46 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/477bb74c-51b1-475c-be3b-627bcf598555 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/0bbdff6d-3c1f-469a-8c9b-de6b71738330 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '134' + - '439' status: code: 202 message: Accepted @@ -54,19 +56,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/477bb74c-51b1-475c-be3b-627bcf598555?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/0bbdff6d-3c1f-469a-8c9b-de6b71738330?showStats=True response: body: - string: '{"jobId":"477bb74c-51b1-475c-be3b-627bcf598555","lastUpdateDateTime":"2021-08-02T21:29:18Z","createdDateTime":"2021-08-02T21:29:18Z","expirationDateTime":"2021-08-03T21:29:18Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"0bbdff6d-3c1f-469a-8c9b-de6b71738330","lastUpdateDateTime":"2021-10-07T23:38:47Z","createdDateTime":"2021-10-07T23:38:46Z","expirationDateTime":"2021-10-08T23:38:46Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - eee7eda7-ca32-40b9-a0ce-661b76f00d5e + - 91331033-03a5-4547-86b7-4e233039cd17 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:22 GMT + - Thu, 07 Oct 2021 23:38:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -74,7 +76,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '9' status: code: 200 message: OK @@ -88,19 +90,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/477bb74c-51b1-475c-be3b-627bcf598555?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/0bbdff6d-3c1f-469a-8c9b-de6b71738330?showStats=True response: body: - string: '{"jobId":"477bb74c-51b1-475c-be3b-627bcf598555","lastUpdateDateTime":"2021-08-02T21:29:18Z","createdDateTime":"2021-08-02T21:29:18Z","expirationDateTime":"2021-08-03T21:29:18Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"0bbdff6d-3c1f-469a-8c9b-de6b71738330","lastUpdateDateTime":"2021-10-07T23:38:47Z","createdDateTime":"2021-10-07T23:38:46Z","expirationDateTime":"2021-10-08T23:38:46Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 10c2ed5c-013e-4900-9492-b15cd421bf79 + - 23361bad-4577-4e88-b7d2-3bb45ebcc1e4 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:28 GMT + - Thu, 07 Oct 2021 23:38:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -108,7 +110,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '52' + - '8' status: code: 200 message: OK @@ -122,12 +124,46 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/477bb74c-51b1-475c-be3b-627bcf598555?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/0bbdff6d-3c1f-469a-8c9b-de6b71738330?showStats=True response: body: - string: '{"jobId":"477bb74c-51b1-475c-be3b-627bcf598555","lastUpdateDateTime":"2021-08-02T21:29:31Z","createdDateTime":"2021-08-02T21:29:18Z","expirationDateTime":"2021-08-03T21:29:18Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:29:31.9941035Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":51,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft + string: '{"jobId":"0bbdff6d-3c1f-469a-8c9b-de6b71738330","lastUpdateDateTime":"2021-10-07T23:38:47Z","createdDateTime":"2021-10-07T23:38:46Z","expirationDateTime":"2021-10-08T23:38:46Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: + - 4da259e6-d208-4c2f-9c32-39a081e1deef + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:39:01 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '8' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/0bbdff6d-3c1f-469a-8c9b-de6b71738330?showStats=True + response: + body: + string: '{"jobId":"0bbdff6d-3c1f-469a-8c9b-de6b71738330","lastUpdateDateTime":"2021-10-07T23:39:07Z","createdDateTime":"2021-10-07T23:38:46Z","expirationDateTime":"2021-10-08T23:38:46Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:07.2675012Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":51,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft was founded by Bill Gates and Paul Allen."}],"warnings":[]},{"id":"2","sentiment":"negative","statistics":{"charactersCount":60,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.22,"negative":0.77},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.45,"negative":0.54},"offset":0,"length":38,"text":"I did not like the hotel we stayed at."},{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":39,"length":21,"text":"It was too expensive."}],"warnings":[]},{"id":"3","sentiment":"positive","statistics":{"charactersCount":60,"transactionsCount":1},"confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The @@ -135,11 +171,11 @@ interactions: recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: apim-request-id: - - 9abb14b4-b1e3-4689-84fd-9376b7991745 + - 1dd56720-8cff-4969-915d-3eff982ee1cf content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:33 GMT + - Thu, 07 Oct 2021 23:39:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -147,7 +183,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '191' + - '995' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_string_pii_entities_task.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_string_pii_entities_task.yaml index 9fdf598a3ea7..335df01f9c52 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_string_pii_entities_task.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_string_pii_entities_task.yaml @@ -1,13 +1,15 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [{"parameters": - {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}}], - "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": - [], "extractiveSummarizationTasks": []}, "analysisInput": {"documents": [{"id": - "0", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "1", "text": - "Your ABA number - 111000025 - is the first 9 digits in the lower left hand - corner of your personal check.", "language": "en"}, {"id": "2", "text": "Is - 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}}' + {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, + "taskName": "0"}], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], + "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "My SSN is 859-98-0987.", + "language": "en"}, {"id": "1", "text": "Your ABA number - 111000025 - is the + first 9 digits in the lower left hand corner of your personal check.", "language": + "en"}, {"id": "2", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": + "en"}]}}' headers: Accept: - application/json, text/json @@ -16,23 +18,23 @@ interactions: Connection: - keep-alive Content-Length: - - '637' + - '767' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - fee3d8c7-eedc-483f-9a11-f6c305915dd3 + - 9958a898-b828-4d19-9713-f45f527a4243 date: - - Mon, 02 Aug 2021 21:29:35 GMT + - Thu, 07 Oct 2021 23:39:11 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/5c916be4-5997-42b2-866e-f945822914ac + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/712b5d55-16dc-4e4d-b087-b01bc353674b strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '250' + - '248' status: code: 202 message: Accepted @@ -54,57 +56,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/5c916be4-5997-42b2-866e-f945822914ac?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/712b5d55-16dc-4e4d-b087-b01bc353674b?showStats=True response: body: - string: '{"jobId":"5c916be4-5997-42b2-866e-f945822914ac","lastUpdateDateTime":"2021-08-02T21:29:35Z","createdDateTime":"2021-08-02T21:29:34Z","expirationDateTime":"2021-08-03T21:29:34Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' - headers: - apim-request-id: - - ecec385d-f686-42f4-abca-f760e0d18780 - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 21:29:40 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-envoy-upstream-service-time: - - '11' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/5c916be4-5997-42b2-866e-f945822914ac?showStats=True - response: - body: - string: '{"jobId":"5c916be4-5997-42b2-866e-f945822914ac","lastUpdateDateTime":"2021-08-02T21:29:42Z","createdDateTime":"2021-08-02T21:29:34Z","expirationDateTime":"2021-08-03T21:29:34Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:29:42.0349931Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"redactedText":"My + string: '{"jobId":"712b5d55-16dc-4e4d-b087-b01bc353674b","lastUpdateDateTime":"2021-10-07T23:39:15Z","createdDateTime":"2021-10-07T23:39:11Z","expirationDateTime":"2021-10-08T23:39:11Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:15.4940866Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"redactedText":"My SSN is ***********.","id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"USSocialSecurityNumber","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"redactedText":"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.","id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"PhoneNumber","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABARoutingNumber","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"NZSocialWelfareNumber","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"redactedText":"Is 998.214.865-68 your Brazilian CPF number?","id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}]}}' headers: apim-request-id: - - d6e48141-0598-4004-9523-40199c1d9093 + - 0dcbc202-3ecb-4b36-b6ab-f1c6a6669fb8 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:45 GMT + - Thu, 07 Oct 2021 23:39:17 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -112,7 +80,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '62' + - '220' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_text_document_input_entities_task.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_text_document_input_entities_task.yaml index 2970b52b1cbf..64ee4cc6daa1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_text_document_input_entities_task.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_all_successful_passing_text_document_input_entities_task.yaml @@ -1,14 +1,15 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": - [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": []}, "analysisInput": - {"documents": [{"id": "1", "text": "Microsoft was founded by Bill Gates and - Paul Allen on April 4, 1975", "language": "en"}, {"id": "2", "text": "Microsoft - fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", "language": - "es"}, {"id": "3", "text": "Microsoft wurde am 4. April 1975 von Bill Gates - und Paul Allen gegr\u00fcndet.", "language": "de"}]}}' + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": + [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "Microsoft was founded + by Bill Gates and Paul Allen on April 4, 1975", "language": "en"}, {"id": "2", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de + 1975.", "language": "es"}, {"id": "3", "text": "Microsoft wurde am 4. April + 1975 von Bill Gates und Paul Allen gegr\u00fcndet.", "language": "de"}]}}' headers: Accept: - application/json, text/json @@ -17,23 +18,23 @@ interactions: Connection: - keep-alive Content-Length: - - '684' + - '814' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - df686fe3-2d43-45c0-87a6-51445f92046c + - d91bc9ab-190d-4317-aae1-58f83d75de17 date: - - Mon, 02 Aug 2021 21:29:45 GMT + - Thu, 07 Oct 2021 23:39:17 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/6dc2549e-36d4-437f-bb7c-8340b68bf9a2 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f055f6f-8699-4b40-bf0d-38b0bb361e7f strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '128' + - '1000' status: code: 202 message: Accepted @@ -55,46 +56,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/6dc2549e-36d4-437f-bb7c-8340b68bf9a2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f055f6f-8699-4b40-bf0d-38b0bb361e7f?showStats=True response: body: - string: '{"jobId":"6dc2549e-36d4-437f-bb7c-8340b68bf9a2","lastUpdateDateTime":"2021-08-02T21:29:46Z","createdDateTime":"2021-08-02T21:29:46Z","expirationDateTime":"2021-08-03T21:29:46Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' - headers: - apim-request-id: - - 3f66e56e-1242-4455-8751-fb3674d71e2a - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 21:29:51 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-envoy-upstream-service-time: - - '13' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/6dc2549e-36d4-437f-bb7c-8340b68bf9a2?showStats=True - response: - body: - string: '{"jobId":"6dc2549e-36d4-437f-bb7c-8340b68bf9a2","lastUpdateDateTime":"2021-08-02T21:29:52Z","createdDateTime":"2021-08-02T21:29:46Z","expirationDateTime":"2021-08-03T21:29:46Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:29:52.7317463Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":67,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.99},{"text":"Bill + string: '{"jobId":"2f055f6f-8699-4b40-bf0d-38b0bb361e7f","lastUpdateDateTime":"2021-10-07T23:39:20Z","createdDateTime":"2021-10-07T23:39:18Z","expirationDateTime":"2021-10-08T23:39:18Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:20.6239035Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":67,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.99},{"text":"Bill Gates","category":"Person","offset":25,"length":10,"confidenceScore":1.0},{"text":"Paul Allen","category":"Person","offset":40,"length":10,"confidenceScore":1.0},{"text":"April 4, 1975","category":"DateTime","subcategory":"Date","offset":54,"length":13,"confidenceScore":0.8}],"warnings":[]},{"id":"2","statistics":{"charactersCount":72,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -106,11 +73,11 @@ interactions: Allen","category":"Person","offset":52,"length":10,"confidenceScore":1.0}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: apim-request-id: - - e93e46a1-9b09-4917-878f-710bb3c09f9a + - 3968f48b-ad8a-4f94-9a34-87963f422767 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:56 GMT + - Thu, 07 Oct 2021 23:39:23 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -118,7 +85,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '102' + - '905' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_analyze_continuation_token.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_analyze_continuation_token.yaml new file mode 100644 index 000000000000..5d27da4cf7f8 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_analyze_continuation_token.yaml @@ -0,0 +1,691 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "1"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "3"}], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": + false}, "taskName": "2"}], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "A recent report by + the Government Accountability Office (GAO) found that the dramatic increase + in oil and natural gas development on federal lands over the past six years + has stretched the staff of the BLM to a point that it has been unable to meet + its environmental protection responsibilities.", "language": "en"}, {"id": "2", + "text": "David Schmidt, senior vice president--Food Safety, International Food + Information Council (IFIC), Washington, D.C., discussed the physical activity + component.", "language": "en"}, {"id": "3", "text": "", "language": "en"}, {"id": + "4", "text": "I need a reservation for an indoor restaurant in China. Please + don''t stop the music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1528' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: + - ab0cb781-fe7f-4aeb-9902-d21d2354a35e + date: + - Mon, 25 Oct 2021 19:24:11 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '393' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:14Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":1,"failed":0,"inProgress":3,"total":4,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - fca0b61a-41bf-44dc-9e29-dd6288ffebec + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:18 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1912' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:19Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - e91c6d04-d36a-41ee-b3d8-3388b9f61211 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:22 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '143' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:19Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - c26a1d46-ea72-4ce9-9bc9-143e71c15330 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:26 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '3702' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:19Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - d208e6a1-041f-442d-8b6d-fd660ef99a8d + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:27 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '167' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:19Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - c16672fa-e0c2-4788-9fa7-e629b23ae41f + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:31 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '173' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:32Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":3,"failed":0,"inProgress":1,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - e0e5788c-e8bd-4d10-a078-51e123bc7c55 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:32 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '227' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:32Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":3,"failed":0,"inProgress":1,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - 9b52a9dd-f698-4e42-8866-563c312ce4be + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:37 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '241' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:32Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"running","errors":[],"tasks":{"completed":3,"failed":0,"inProgress":1,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - 3e951462-3a10-4788-ab89-2619f997e54f + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:38 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '372' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:41Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"succeeded","errors":[],"tasks":{"completed":4,"failed":0,"inProgress":0,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:41.0065874Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":295,"transactionsCount":1},"confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"offset":0,"length":295,"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities."}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":158,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"offset":0,"length":158,"text":"David + Schmidt, senior vice president--Food Safety, International Food Information + Council (IFIC), Washington, D.C., discussed the physical activity component."}],"warnings":[]},{"id":"4","sentiment":"positive","statistics":{"charactersCount":121,"transactionsCount":1},"confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":55,"text":"I + need a reservation for an indoor restaurant in China."},{"sentiment":"neutral","confidenceScores":{"positive":0.12,"neutral":0.78,"negative":0.1},"offset":56,"length":28,"text":"Please + don''t stop the music."},{"sentiment":"positive","confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"offset":85,"length":36,"text":"Play + music and add it to my playlist"}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}}]}}' + headers: + apim-request-id: + - 7d7905a7-275c-4857-b2d0-fbf55fb79cfa + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:43 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '306' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/2f741440-6838-4e66-b59d-fe9400de222b?showStats=True + response: + body: + string: '{"jobId":"2f741440-6838-4e66-b59d-fe9400de222b","lastUpdateDateTime":"2021-10-25T19:24:41Z","createdDateTime":"2021-10-25T19:24:11Z","expirationDateTime":"2021-10-26T19:24:11Z","status":"succeeded","errors":[],"tasks":{"completed":4,"failed":0,"inProgress":0,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:19.310668Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:14.7282104Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:32.7619484Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-25T19:24:41.0065874Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":295,"transactionsCount":1},"confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"offset":0,"length":295,"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities."}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":158,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"offset":0,"length":158,"text":"David + Schmidt, senior vice president--Food Safety, International Food Information + Council (IFIC), Washington, D.C., discussed the physical activity component."}],"warnings":[]},{"id":"4","sentiment":"positive","statistics":{"charactersCount":121,"transactionsCount":1},"confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":55,"text":"I + need a reservation for an indoor restaurant in China."},{"sentiment":"neutral","confidenceScores":{"positive":0.12,"neutral":0.78,"negative":0.1},"offset":56,"length":28,"text":"Please + don''t stop the music."},{"sentiment":"positive","confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"offset":85,"length":36,"text":"Play + music and add it to my playlist"}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}}]}}' + headers: + apim-request-id: + - 05b53899-25ee-44bc-bc86-538fbb3d530b + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 19:24:44 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '311' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_credentials.yaml index 0226ebcc74de..2327dc1a2230 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_credentials.yaml @@ -1,17 +1,19 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "0", "text": "This is written in English.", "language": - "en"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "This is written in + English.", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -20,13 +22,13 @@ interactions: Connection: - keep-alive Content-Length: - - '923' + - '1138' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -34,13 +36,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 7e1a0af6-06c6-4917-9f2a-52ac4a4cb2c1 + - 3c6b9c55-94ae-412d-8e5b-7135b77d987e content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:29:57 GMT + - Thu, 07 Oct 2021 23:39:24 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_model_version_error_all_tasks.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_model_version_error_all_tasks.yaml index 9927aedfaa59..44cb828ccc92 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_model_version_error_all_tasks.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_model_version_error_all_tasks.yaml @@ -1,16 +1,19 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], "entityRecognitionPiiTasks": - [{"parameters": {"model-version": "bad", "loggingOptOut": true, "stringIndexType": - "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false}}], "entityLinkingTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], "sentimentAnalysisTasks": - [{"parameters": {"model-version": "bad", "loggingOptOut": false, "opinionMining": - false}}], "extractiveSummarizationTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 3, "sortBy": "Offset"}}]}, "analysisInput": {"documents": [{"id": "1", "text": - "I did not like the hotel we stayed at.", "language": "english"}]}}' + "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "bad", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": + false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": + [{"parameters": {"model-version": "bad", "loggingOptOut": false, "stringIndexType": + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "I did not like the + hotel we stayed at.", "language": "english"}]}}' headers: Accept: - application/json, text/json @@ -19,13 +22,13 @@ interactions: Connection: - keep-alive Content-Length: - - '921' + - '1136' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid parameter in request","innererror":{"code":"InvalidParameterValue","message":"Job @@ -33,11 +36,11 @@ interactions: job task type KeyPhraseExtraction. Supported values latest,2019-10-01,2020-07-01,2021-05-01."}}}' headers: apim-request-id: - - 417134ca-d259-4d84-8aa0-8323fae697f1 + - 477a0d83-2bcc-4078-b8ae-c323964379b5 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:57 GMT + - Thu, 07 Oct 2021 23:39:25 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +48,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' + - '654' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_model_version_error_multiple_tasks.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_model_version_error_multiple_tasks.yaml index 7a4eb43fdc97..be6fae1efdda 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_model_version_error_multiple_tasks.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_model_version_error_multiple_tasks.yaml @@ -1,17 +1,19 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "bad", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "bad", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": + false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "bad", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "1", "text": "I did not like the hotel we stayed at.", - "language": "english"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "I did not like the + hotel we stayed at.", "language": "english"}]}}' headers: Accept: - application/json, text/json @@ -20,13 +22,13 @@ interactions: Connection: - keep-alive Content-Length: - - '924' + - '1139' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid parameter in request","innererror":{"code":"InvalidParameterValue","message":"Job @@ -34,11 +36,11 @@ interactions: job task type KeyPhraseExtraction. Supported values latest,2019-10-01,2020-07-01,2021-05-01."}}}' headers: apim-request-id: - - d89ccb83-73b2-4bc5-9d69-fce9f98a3c37 + - 093850c2-978a-48df-893e-01a66eb90561 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:58 GMT + - Thu, 07 Oct 2021 23:39:25 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -46,7 +48,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '16' + - '6' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_request_on_empty_document.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_request_on_empty_document.yaml index d98333e7837e..999d10fbc9a2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_request_on_empty_document.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_bad_request_on_empty_document.yaml @@ -2,8 +2,10 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - false}}], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": - []}, "analysisInput": {"documents": [{"id": "0", "text": "", "language": "en"}]}}' + false}, "taskName": "0"}], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "0", "text": "", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -12,24 +14,24 @@ interactions: Connection: - keep-alive Content-Length: - - '342' + - '472' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Document text is empty."}}}' headers: apim-request-id: - - 04acc0f2-d7c5-4b2f-9185-762b3e471998 + - 6eff5795-f82e-4f79-9aaf-19c0aa854ef4 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:29:58 GMT + - Thu, 07 Oct 2021 23:39:26 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '666' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_custom_partial_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_custom_partial_error.yaml new file mode 100644 index 000000000000..aa165030f375 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_custom_partial_error.yaml @@ -0,0 +1,95 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [{"parameters": + {"project-name": "textanalytics_custom_entities_project_name", "deployment-name": + "textanalytics_custom_entities_project_name"}, "taskName": "2"}], "customSingleClassificationTasks": + [{"parameters": {"project-name": "single_category_classify_project_name", "deployment-name": + "single_category_classify_project_name"}, "taskName": "0"}], "customMultiClassificationTasks": + [{"parameters": {"project-name": "textanalytics_multi_category_classify_project_name", + "deployment-name": "textanalytics_multi_category_classify_project_name"}, "taskName": + "1"}]}, "analysisInput": {"documents": [{"id": "1", "text": "A recent report + by the Government Accountability Office (GAO) found that the dramatic increase + in oil and natural gas development on federal lands over the past six years + has stretched the staff of the BLM to a point that it has been unable to meet + its environmental protection responsibilities.", "language": "en"}, {"id": "2", + "text": "", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1170' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: + - 78c01927-844e-43d5-b214-c434c262bee7 + date: + - Thu, 07 Oct 2021 23:39:29 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9cc91b62-6188-4333-99cf-a3c4ad7d5be2 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '2131' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9cc91b62-6188-4333-99cf-a3c4ad7d5be2?showStats=True + response: + body: + string: '{"jobId":"9cc91b62-6188-4333-99cf-a3c4ad7d5be2","lastUpdateDateTime":"2021-10-07T23:39:33Z","createdDateTime":"2021-10-07T23:39:28Z","expirationDateTime":"2021-10-08T23:39:28Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":0,"total":3,"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:32.2418795Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government","category":"restaurant_name","offset":23,"length":10,"confidenceScore":0.05},{"text":"Office","category":"restaurant_name","offset":49,"length":6,"confidenceScore":0.11},{"text":"GAO","category":"restaurant_name","offset":57,"length":3,"confidenceScore":0.04},{"text":"Accountability","category":"geographic_poi","offset":34,"length":14,"confidenceScore":0.07},{"text":"natural","category":"geographic_poi","offset":106,"length":7,"confidenceScore":0.04},{"text":"dramatic","category":"sort","offset":77,"length":8,"confidenceScore":0.03},{"text":"oil","category":"restaurant_type","offset":98,"length":3,"confidenceScore":0.03},{"text":"gas","category":"restaurant_type","offset":114,"length":3,"confidenceScore":0.09},{"text":"and","category":"served_dish","offset":102,"length":3,"confidenceScore":0.07},{"text":"development","category":"object_type","offset":118,"length":11,"confidenceScore":0.06},{"text":"federal","category":"state","offset":133,"length":7,"confidenceScore":0.07},{"text":"protection","category":"state","offset":267,"length":10,"confidenceScore":0.05},{"text":"lands","category":"poi","offset":141,"length":5,"confidenceScore":0.04},{"text":"BLM","category":"poi","offset":202,"length":3,"confidenceScore":0.07},{"text":"the","category":"timeRange","offset":152,"length":3,"confidenceScore":0.24},{"text":"past + six years","category":"timeRange","offset":156,"length":14,"confidenceScore":0.54}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}],"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:33.0466949Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"1","classification":{"category":"RateBook","confidenceScore":0.76},"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}],"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:32.745959Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"1","classifications":[],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' + headers: + apim-request-id: + - 46ce3d85-369f-487a-b447-f7ba08da19bb + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:39:34 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '244' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_disable_service_logs.yaml index c71e08904ced..d1a2a184856c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_disable_service_logs.yaml @@ -1,15 +1,24 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}}], "entityRecognitionPiiTasks": + "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + true}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": true, "stringIndexType": - "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": true}}], "entityLinkingTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}}], "sentimentAnalysisTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": true, "opinionMining": - false}}], "extractiveSummarizationTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 3, "sortBy": "Offset"}}]}, "analysisInput": {"documents": [{"id": "0", "text": + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [{"parameters": {"project-name": "textanalytics_custom_entities_project_name", + "deployment-name": "textanalytics_custom_entities_project_name", "loggingOptOut": + true}, "taskName": "8"}], "customSingleClassificationTasks": [{"parameters": + {"project-name": "single_category_classify_project_name", "deployment-name": + "single_category_classify_project_name", "loggingOptOut": true}, "taskName": + "6"}], "customMultiClassificationTasks": [{"parameters": {"project-name": "textanalytics_multi_category_classify_project_name", + "deployment-name": "textanalytics_multi_category_classify_project_name", "loggingOptOut": + true}, "taskName": "7"}]}, "analysisInput": {"documents": [{"id": "0", "text": "Test for logging disable", "language": "en"}]}}' headers: Accept: @@ -19,23 +28,23 @@ interactions: Connection: - keep-alive Content-Length: - - '915' + - '1643' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - 188a3007-12bf-45f2-bf92-a4138fb3119c + - 6ee56acd-876e-4b26-ae42-49f38d90c54b date: - - Mon, 02 Aug 2021 21:29:59 GMT + - Thu, 07 Oct 2021 23:39:36 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/183519e6-03c2-4c4c-9c58-8650a3cfd169 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9e1355ed-a3a6-4601-834d-7e64e00e7542 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -43,7 +52,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '327' + - '1258' status: code: 202 message: Accepted @@ -57,19 +66,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/183519e6-03c2-4c4c-9c58-8650a3cfd169 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9e1355ed-a3a6-4601-834d-7e64e00e7542 response: body: - string: '{"jobId":"183519e6-03c2-4c4c-9c58-8650a3cfd169","lastUpdateDateTime":"2021-08-02T21:30:01Z","createdDateTime":"2021-08-02T21:29:59Z","expirationDateTime":"2021-08-03T21:29:59Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + string: '{"jobId":"9e1355ed-a3a6-4601-834d-7e64e00e7542","lastUpdateDateTime":"2021-10-07T23:39:39Z","createdDateTime":"2021-10-07T23:39:35Z","expirationDateTime":"2021-10-08T23:39:35Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":6,"total":9,"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:36.4911537Z","taskName":"8","state":"succeeded","results":{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}],"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:38.7982983Z","taskName":"6","state":"succeeded","results":{"documents":[{"id":"0","classification":{"category":"PlayMusic","confidenceScore":0.6},"warnings":[]}],"errors":[],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}],"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:39.7682419Z","taskName":"7","state":"succeeded","results":{"documents":[{"id":"0","classifications":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' headers: apim-request-id: - - 397f3b2d-b72e-4a64-9146-0ba018e8d455 + - 2107abf6-7804-4461-887f-557ea1705ce5 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:04 GMT + - Thu, 07 Oct 2021 23:39:41 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -77,7 +86,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '13' + - '154' status: code: 200 message: OK @@ -91,22 +100,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/183519e6-03c2-4c4c-9c58-8650a3cfd169 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9e1355ed-a3a6-4601-834d-7e64e00e7542 response: body: - string: '{"jobId":"183519e6-03c2-4c4c-9c58-8650a3cfd169","lastUpdateDateTime":"2021-08-02T21:30:07Z","createdDateTime":"2021-08-02T21:29:59Z","expirationDateTime":"2021-08-03T21:29:59Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:07.0175711Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:06.8160554Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test + string: '{"jobId":"9e1355ed-a3a6-4601-834d-7e64e00e7542","lastUpdateDateTime":"2021-10-07T23:39:45Z","createdDateTime":"2021-10-07T23:39:35Z","expirationDateTime":"2021-10-08T23:39:35Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":4,"total":9,"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:45.7188108Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test (assessment)","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.04}],"language":"en","id":"Test - (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:06.955071Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"Test - for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:07.4495809Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:43.9036183Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":"Test + for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:36.4911537Z","taskName":"8","state":"succeeded","results":{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}],"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:38.7982983Z","taskName":"6","state":"succeeded","results":{"documents":[{"id":"0","classification":{"category":"PlayMusic","confidenceScore":0.6},"warnings":[]}],"errors":[],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}],"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:39.7682419Z","taskName":"7","state":"succeeded","results":{"documents":[{"id":"0","classifications":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' headers: apim-request-id: - - 436e11f7-ea15-4066-b80b-163924eb8f03 + - 0e9f61d4-175f-40d7-be34-f1223602e257 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:10 GMT + - Thu, 07 Oct 2021 23:39:45 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -114,7 +123,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '189' + - '386' status: code: 200 message: OK @@ -128,23 +137,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/183519e6-03c2-4c4c-9c58-8650a3cfd169 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9e1355ed-a3a6-4601-834d-7e64e00e7542 response: body: - string: '{"jobId":"183519e6-03c2-4c4c-9c58-8650a3cfd169","lastUpdateDateTime":"2021-08-02T21:30:12Z","createdDateTime":"2021-08-02T21:29:59Z","expirationDateTime":"2021-08-03T21:29:59Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:07.0175711Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:06.8160554Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test + string: '{"jobId":"9e1355ed-a3a6-4601-834d-7e64e00e7542","lastUpdateDateTime":"2021-10-07T23:39:50Z","createdDateTime":"2021-10-07T23:39:35Z","expirationDateTime":"2021-10-08T23:39:35Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":8,"failed":0,"inProgress":1,"total":9,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:49.1632088Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:45.7188108Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test (assessment)","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.04}],"language":"en","id":"Test - (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:06.955071Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"Test - for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:12.438369Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"documents":[{"id":"0","sentences":[{"text":"Test - for logging disable","rankScore":1.0,"offset":0,"length":24}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:07.4495809Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:43.9036183Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":"Test + for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:47.9178506Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"0","sentences":[{"text":"Test + for logging disable","rankScore":1.0,"offset":0,"length":24}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:50.0955163Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:36.4911537Z","taskName":"8","state":"succeeded","results":{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}],"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:38.7982983Z","taskName":"6","state":"succeeded","results":{"documents":[{"id":"0","classification":{"category":"PlayMusic","confidenceScore":0.6},"warnings":[]}],"errors":[],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}],"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:39.7682419Z","taskName":"7","state":"succeeded","results":{"documents":[{"id":"0","classifications":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' headers: apim-request-id: - - d3a06460-fe42-4df0-bd0e-1c8c88f72004 + - 58f16c18-2458-4e03-92c6-9911f203aaf6 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:15 GMT + - Thu, 07 Oct 2021 23:39:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -152,7 +161,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '201' + - '1084' status: code: 200 message: OK @@ -166,24 +175,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/183519e6-03c2-4c4c-9c58-8650a3cfd169 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9e1355ed-a3a6-4601-834d-7e64e00e7542 response: body: - string: '{"jobId":"183519e6-03c2-4c4c-9c58-8650a3cfd169","lastUpdateDateTime":"2021-08-02T21:30:18Z","createdDateTime":"2021-08-02T21:29:59Z","expirationDateTime":"2021-08-03T21:29:59Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:07.0175711Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:06.8160554Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test + string: '{"jobId":"9e1355ed-a3a6-4601-834d-7e64e00e7542","lastUpdateDateTime":"2021-10-07T23:39:50Z","createdDateTime":"2021-10-07T23:39:35Z","expirationDateTime":"2021-10-08T23:39:35Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":8,"failed":0,"inProgress":1,"total":9,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:49.1632088Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:45.7188108Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test (assessment)","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.04}],"language":"en","id":"Test - (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:06.955071Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"Test - for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:12.438369Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"documents":[{"id":"0","sentences":[{"text":"Test - for logging disable","rankScore":1.0,"offset":0,"length":24}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:07.4495809Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:18.0417199Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"offset":0,"length":24,"text":"Test - for logging disable"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' + (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:43.9036183Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":"Test + for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:47.9178506Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"0","sentences":[{"text":"Test + for logging disable","rankScore":1.0,"offset":0,"length":24}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:50.0955163Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:36.4911537Z","taskName":"8","state":"succeeded","results":{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}],"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:38.7982983Z","taskName":"6","state":"succeeded","results":{"documents":[{"id":"0","classification":{"category":"PlayMusic","confidenceScore":0.6},"warnings":[]}],"errors":[],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}],"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:39.7682419Z","taskName":"7","state":"succeeded","results":{"documents":[{"id":"0","classifications":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' headers: apim-request-id: - - 0f6c1811-819e-4dd2-b0aa-12d6a83085fa + - 7b9e1af8-4010-4180-8f67-06fc3abe41c1 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:20 GMT + - Thu, 07 Oct 2021 23:39:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -191,7 +199,84 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '215' + - '499' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9e1355ed-a3a6-4601-834d-7e64e00e7542 + response: + body: + string: '{"jobId":"9e1355ed-a3a6-4601-834d-7e64e00e7542","lastUpdateDateTime":"2021-10-07T23:39:50Z","createdDateTime":"2021-10-07T23:39:35Z","expirationDateTime":"2021-10-08T23:39:35Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":8,"failed":0,"inProgress":1,"total":9,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:49.1632088Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:45.7188108Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test + (assessment)","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.04}],"language":"en","id":"Test + (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:43.9036183Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":"Test + for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:47.9178506Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"0","sentences":[{"text":"Test + for logging disable","rankScore":1.0,"offset":0,"length":24}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:50.0955163Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:36.4911537Z","taskName":"8","state":"succeeded","results":{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}],"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:38.7982983Z","taskName":"6","state":"succeeded","results":{"documents":[{"id":"0","classification":{"category":"PlayMusic","confidenceScore":0.6},"warnings":[]}],"errors":[],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}],"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:39.7682419Z","taskName":"7","state":"succeeded","results":{"documents":[{"id":"0","classifications":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' + headers: + apim-request-id: + - 4f80ec6f-73b9-4545-8190-c169e6b4ae67 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:40:04 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '469' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9e1355ed-a3a6-4601-834d-7e64e00e7542 + response: + body: + string: '{"jobId":"9e1355ed-a3a6-4601-834d-7e64e00e7542","lastUpdateDateTime":"2021-10-07T23:40:04Z","createdDateTime":"2021-10-07T23:39:35Z","expirationDateTime":"2021-10-08T23:39:35Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":9,"failed":0,"inProgress":0,"total":9,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:49.1632088Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:45.7188108Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test + (assessment)","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.04}],"language":"en","id":"Test + (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:43.9036183Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":"Test + for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:47.9178506Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"0","sentences":[{"text":"Test + for logging disable","rankScore":1.0,"offset":0,"length":24}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:50.0955163Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:40:04.4303317Z","taskName":"4","state":"succeeded","results":{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"offset":0,"length":24,"text":"Test + for logging disable"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}],"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:36.4911537Z","taskName":"8","state":"succeeded","results":{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}],"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:38.7982983Z","taskName":"6","state":"succeeded","results":{"documents":[{"id":"0","classification":{"category":"PlayMusic","confidenceScore":0.6},"warnings":[]}],"errors":[],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}],"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:39:39.7682419Z","taskName":"7","state":"succeeded","results":{"documents":[{"id":"0","classifications":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' + headers: + apim-request-id: + - f3b4b7f9-8324-49ff-9c44-daf6bae0927c + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:40:09 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '587' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_empty_credential_class.yaml index d532ea471266..1f5d8b3c6702 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_empty_credential_class.yaml @@ -1,17 +1,19 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "0", "text": "This is written in English.", "language": - "en"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "This is written in + English.", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -20,13 +22,13 @@ interactions: Connection: - keep-alive Content-Length: - - '923' + - '1138' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -34,13 +36,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - c929d21c-ba93-41fb-aa46-f427bd389506 + - a6d8a10e-4116-4e50-8fa3-d0d65b8e1855 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:30:21 GMT + - Thu, 07 Oct 2021 23:40:09 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_extract_summary_action_with_options.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_extract_summary_action_with_options.yaml index b84886d7ac95..f26bba6a1a4b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_extract_summary_action_with_options.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_extract_summary_action_with_options.yaml @@ -4,28 +4,30 @@ interactions: "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 5, "sortBy": "Rank"}}]}, "analysisInput": {"documents": [{"id": "0", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil - with the resignation of two senior Cabinet ministers in a deep split over her - Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours - after the resignation late on Sunday night of the minister in charge of Brexit - negotiations, David Davis. Their decision to leave the government came three - days after May appeared to have agreed a deal with herfractured Cabinet on the - UK''s post Brexit relationship with the EU. That plan is now in tatters and - her political future appears uncertain. May appeared in Parliament on Monday - afternoon to defend her plan, minutes after Downing Street confirmed the departure - of Johnson. May acknowledged the splits in her statement to MPs, saying of the - ministers who quit: We do not agree about the best way of delivering our shared - commitment to honoring the result of the referendum. The Prime Minister''s latest - plitical drama began late on Sunday night when Davis quit, declaring he could - not support May''s Brexit plan. He said it involved too close a relationship - with the EU and gave only an illusion of control being returned to the UK after - it left the EU. It seems to me we''re giving too much away, too easily, and - that''s a dangerous strategy at this time, Davis said in a BBC radio interview - Monday morning. Johnson''s resignation came Monday afternoon local time, just - before the Prime Minister was due to make a scheduled statement in Parliament. - This afternoon, the Prime Minister accepted the resignation of Boris Johnson - as Foreign Secretary, a statement from Downing Street said.", "language": "en"}]}}' + 5, "sortBy": "Rank"}, "taskName": "0"}], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "0", "text": "The government of British + Prime Minster Theresa May has been plunged into turmoil with the resignation + of two senior Cabinet ministers in a deep split over her Brexit strategy. The + Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation + late on Sunday night of the minister in charge of Brexit negotiations, David + Davis. Their decision to leave the government came three days after May appeared + to have agreed a deal with herfractured Cabinet on the UK''s post Brexit relationship + with the EU. That plan is now in tatters and her political future appears uncertain. + May appeared in Parliament on Monday afternoon to defend her plan, minutes after + Downing Street confirmed the departure of Johnson. May acknowledged the splits + in her statement to MPs, saying of the ministers who quit: We do not agree about + the best way of delivering our shared commitment to honoring the result of the + referendum. The Prime Minister''s latest plitical drama began late on Sunday + night when Davis quit, declaring he could not support May''s Brexit plan. He + said it involved too close a relationship with the EU and gave only an illusion + of control being returned to the UK after it left the EU. It seems to me we''re + giving too much away, too easily, and that''s a dangerous strategy at this time, + Davis said in a BBC radio interview Monday morning. Johnson''s resignation came + Monday afternoon local time, just before the Prime Minister was due to make + a scheduled statement in Parliament. This afternoon, the Prime Minister accepted + the resignation of Boris Johnson as Foreign Secretary, a statement from Downing + Street said.", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -34,23 +36,23 @@ interactions: Connection: - keep-alive Content-Length: - - '2044' + - '2174' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - 47d03452-7749-4550-b364-3d448fe01fda + - 27cd70b7-9bca-444c-ba26-e26029e0c0a8 date: - - Mon, 02 Aug 2021 21:30:21 GMT + - Thu, 07 Oct 2021 23:40:10 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/099fcec2-c206-4414-9475-4f610c2f8097 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/776bd04e-618b-4459-803b-629deb914e42 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -58,7 +60,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '294' + - '185' status: code: 202 message: Accepted @@ -72,19 +74,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/099fcec2-c206-4414-9475-4f610c2f8097?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/776bd04e-618b-4459-803b-629deb914e42?showStats=True response: body: - string: '{"jobId":"099fcec2-c206-4414-9475-4f610c2f8097","lastUpdateDateTime":"2021-08-02T21:30:23Z","createdDateTime":"2021-08-02T21:30:22Z","expirationDateTime":"2021-08-03T21:30:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"776bd04e-618b-4459-803b-629deb914e42","lastUpdateDateTime":"2021-10-07T23:40:11Z","createdDateTime":"2021-10-07T23:40:10Z","expirationDateTime":"2021-10-08T23:40:10Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 773fcb61-425c-4be5-9b01-ae20b4fd8669 + - 5ce62e6d-bcc1-49b9-a833-b27f9c8ab1b6 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:27 GMT + - Thu, 07 Oct 2021 23:40:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -92,7 +94,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '41' status: code: 200 message: OK @@ -106,19 +108,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/099fcec2-c206-4414-9475-4f610c2f8097?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/776bd04e-618b-4459-803b-629deb914e42?showStats=True response: body: - string: '{"jobId":"099fcec2-c206-4414-9475-4f610c2f8097","lastUpdateDateTime":"2021-08-02T21:30:23Z","createdDateTime":"2021-08-02T21:30:22Z","expirationDateTime":"2021-08-03T21:30:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"776bd04e-618b-4459-803b-629deb914e42","lastUpdateDateTime":"2021-10-07T23:40:11Z","createdDateTime":"2021-10-07T23:40:10Z","expirationDateTime":"2021-10-08T23:40:10Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - e70b6d6c-e47f-45ba-8587-233823b3f54a + - 35e0add7-6008-43a5-8cba-84ae5a209f81 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:32 GMT + - Thu, 07 Oct 2021 23:40:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -126,7 +128,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '49' status: code: 200 message: OK @@ -140,19 +142,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/099fcec2-c206-4414-9475-4f610c2f8097?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/776bd04e-618b-4459-803b-629deb914e42?showStats=True response: body: - string: '{"jobId":"099fcec2-c206-4414-9475-4f610c2f8097","lastUpdateDateTime":"2021-08-02T21:30:23Z","createdDateTime":"2021-08-02T21:30:22Z","expirationDateTime":"2021-08-03T21:30:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"776bd04e-618b-4459-803b-629deb914e42","lastUpdateDateTime":"2021-10-07T23:40:11Z","createdDateTime":"2021-10-07T23:40:10Z","expirationDateTime":"2021-10-08T23:40:10Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 7baebcb9-df0c-4ce5-b70d-824f16cb95af + - 6d89a076-deee-403e-882b-6f69a5881737 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:37 GMT + - Thu, 07 Oct 2021 23:40:25 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -160,7 +162,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' + - '23' status: code: 200 message: OK @@ -174,31 +176,31 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/099fcec2-c206-4414-9475-4f610c2f8097?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/776bd04e-618b-4459-803b-629deb914e42?showStats=True response: body: - string: '{"jobId":"099fcec2-c206-4414-9475-4f610c2f8097","lastUpdateDateTime":"2021-08-02T21:30:41Z","createdDateTime":"2021-08-02T21:30:22Z","expirationDateTime":"2021-08-03T21:30:22Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:41.9003227Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"0","statistics":{"charactersCount":1625,"transactionsCount":2},"sentences":[{"text":"The - government of British Prime Minster Theresa May has been plunged into turmoil - with the resignation of two senior Cabinet ministers in a deep split over - her Brexit strategy.","rankScore":1.0,"offset":0,"length":176},{"text":"The + string: '{"jobId":"776bd04e-618b-4459-803b-629deb914e42","lastUpdateDateTime":"2021-10-07T23:40:27Z","createdDateTime":"2021-10-07T23:40:10Z","expirationDateTime":"2021-10-08T23:40:10Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:40:27.4693543Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"0","statistics":{"charactersCount":1625,"transactionsCount":2},"sentences":[{"text":"The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David - Davis.","rankScore":0.9711179434493907,"offset":177,"length":164},{"text":"Their - decision to leave the government came three days after May appeared to have - agreed a deal with herfractured Cabinet on the UK''s post Brexit relationship - with the EU.","rankScore":0.9103508917712292,"offset":342,"length":171},{"text":"That - plan is now in tatters and her political future appears uncertain.","rankScore":0.8227722338472695,"offset":514,"length":71},{"text":"May - appeared in Parliament on Monday afternoon to defend her plan, minutes after - Downing Street confirmed the departure of Johnson.","rankScore":0.6751042854876602,"offset":586,"length":131}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}]}}' + Davis.","rankScore":1.0,"offset":177,"length":164},{"text":"The government + of British Prime Minster Theresa May has been plunged into turmoil with the + resignation of two senior Cabinet ministers in a deep split over her Brexit + strategy.","rankScore":0.57,"offset":0,"length":176},{"text":"Their decision + to leave the government came three days after May appeared to have agreed + a deal with herfractured Cabinet on the UK''s post Brexit relationship with + the EU.","rankScore":0.47,"offset":342,"length":171},{"text":"That plan is + now in tatters and her political future appears uncertain.","rankScore":0.36,"offset":514,"length":71},{"text":"The + Prime Minister''s latest plitical drama began late on Sunday night when Davis + quit, declaring he could not support May''s Brexit plan.","rankScore":0.26,"offset":918,"length":136}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}]}}' headers: apim-request-id: - - e94dcf0d-2834-49be-a708-2c1611945cd5 + - d7c1df5a-5541-4b5c-8249-0414154ee829 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:42 GMT + - Thu, 07 Oct 2021 23:40:30 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -206,7 +208,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '50' + - '73' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_extract_summary_partial_results.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_extract_summary_partial_results.yaml index 8f0cea5f7d9b..d9b3e0427323 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_extract_summary_partial_results.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_extract_summary_partial_results.yaml @@ -4,8 +4,10 @@ interactions: "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 3, "sortBy": "Offset"}}]}, "analysisInput": {"documents": [{"id": "1", "text": - "", "language": "en"}, {"id": "2", "text": "hello world", "language": "en"}]}}' + 3, "sortBy": "Offset"}, "taskName": "0"}], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "1", "text": "", "language": "en"}, {"id": + "2", "text": "hello world", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -14,23 +16,23 @@ interactions: Connection: - keep-alive Content-Length: - - '475' + - '605' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - f58fa7d8-6aef-45e8-82ba-37fa2eaa9f55 + - e28db531-0925-4473-bff5-20b50687e22a date: - - Mon, 02 Aug 2021 21:30:44 GMT + - Thu, 07 Oct 2021 23:40:31 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/6d47b405-03f5-4fb0-9e35-f0abf05d5cd3 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/6028f03e-60c1-43d7-bc5a-a0e9d9023fec strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '111' + - '255' status: code: 202 message: Accepted @@ -52,19 +54,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/6d47b405-03f5-4fb0-9e35-f0abf05d5cd3?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/6028f03e-60c1-43d7-bc5a-a0e9d9023fec?showStats=True response: body: - string: '{"jobId":"6d47b405-03f5-4fb0-9e35-f0abf05d5cd3","lastUpdateDateTime":"2021-08-02T21:30:44Z","createdDateTime":"2021-08-02T21:30:44Z","expirationDateTime":"2021-08-03T21:30:44Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"6028f03e-60c1-43d7-bc5a-a0e9d9023fec","lastUpdateDateTime":"2021-10-07T23:40:32Z","createdDateTime":"2021-10-07T23:40:31Z","expirationDateTime":"2021-10-08T23:40:31Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 1bc526c0-2c9d-4e04-9eb7-c5ec382edf10 + - e66ee153-53b4-4944-88d5-7b4c2c39724e content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:49 GMT + - Thu, 07 Oct 2021 23:40:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -72,7 +74,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '46' status: code: 200 message: OK @@ -86,19 +88,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/6d47b405-03f5-4fb0-9e35-f0abf05d5cd3?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/6028f03e-60c1-43d7-bc5a-a0e9d9023fec?showStats=True response: body: - string: '{"jobId":"6d47b405-03f5-4fb0-9e35-f0abf05d5cd3","lastUpdateDateTime":"2021-08-02T21:30:44Z","createdDateTime":"2021-08-02T21:30:44Z","expirationDateTime":"2021-08-03T21:30:44Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"6028f03e-60c1-43d7-bc5a-a0e9d9023fec","lastUpdateDateTime":"2021-10-07T23:40:32Z","createdDateTime":"2021-10-07T23:40:31Z","expirationDateTime":"2021-10-08T23:40:31Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 24d815fe-1ec8-4a3c-bd2d-b6cbd0a14e04 + - 50c67605-32d5-461e-8b3e-01266d7f2ce3 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:53 GMT + - Thu, 07 Oct 2021 23:40:41 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -106,7 +108,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '15' status: code: 200 message: OK @@ -120,22 +122,55 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/6d47b405-03f5-4fb0-9e35-f0abf05d5cd3?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/6028f03e-60c1-43d7-bc5a-a0e9d9023fec?showStats=True response: body: - string: '{"jobId":"6d47b405-03f5-4fb0-9e35-f0abf05d5cd3","lastUpdateDateTime":"2021-08-02T21:30:56Z","createdDateTime":"2021-08-02T21:30:44Z","expirationDateTime":"2021-08-03T21:30:44Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:30:56.9573055Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"6028f03e-60c1-43d7-bc5a-a0e9d9023fec","lastUpdateDateTime":"2021-10-07T23:40:32Z","createdDateTime":"2021-10-07T23:40:31Z","expirationDateTime":"2021-10-08T23:40:31Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: + - 293e461c-58ed-4d1c-90ef-03258152d8d8 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:40:46 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '9' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/6028f03e-60c1-43d7-bc5a-a0e9d9023fec?showStats=True + response: + body: + string: '{"jobId":"6028f03e-60c1-43d7-bc5a-a0e9d9023fec","lastUpdateDateTime":"2021-10-07T23:40:49Z","createdDateTime":"2021-10-07T23:40:31Z","expirationDateTime":"2021-10-08T23:40:31Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:40:49.1817214Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-08-01"}}]}}' headers: apim-request-id: - - 2462db62-ebd3-4583-9bda-4fe5ec7e86a6 + - 1d1081f6-50fa-49b9-87eb-11b14d4a827c content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:30:59 GMT + - Thu, 07 Oct 2021 23:40:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -143,7 +178,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '70' + - '202' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_invalid_language_hint_method.yaml index e37c3438d599..990fdc09633f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_invalid_language_hint_method.yaml @@ -1,17 +1,19 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "0", "text": "This should fail because we''re passing - in an invalid language hint", "language": "notalanguage"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "This should fail because + we''re passing in an invalid language hint", "language": "notalanguage"}]}}' headers: Accept: - application/json, text/json @@ -20,23 +22,23 @@ interactions: Connection: - keep-alive Content-Length: - - '972' + - '1187' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - d84360c8-d4aa-4eb6-a779-913175112a9c + - 524fafc7-c206-4359-9490-4fc9f8c5a17b date: - - Mon, 02 Aug 2021 21:31:00 GMT + - Thu, 07 Oct 2021 23:40:53 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/10130184-69c8-4293-a072-d125494d6d91 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/20700fe9-a203-4c42-96c5-a902ca3cbbbb strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +46,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '269' + - '648' status: code: 202 message: Accepted @@ -58,19 +60,53 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/10130184-69c8-4293-a072-d125494d6d91 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/20700fe9-a203-4c42-96c5-a902ca3cbbbb response: body: - string: '{"jobId":"10130184-69c8-4293-a072-d125494d6d91","lastUpdateDateTime":"2021-08-02T21:31:01Z","createdDateTime":"2021-08-02T21:31:00Z","expirationDateTime":"2021-08-03T21:31:00Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + string: '{"jobId":"20700fe9-a203-4c42-96c5-a902ca3cbbbb","lastUpdateDateTime":"2021-10-07T23:40:53Z","createdDateTime":"2021-10-07T23:40:52Z","expirationDateTime":"2021-10-08T23:40:52Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' headers: apim-request-id: - - e46f3068-0b17-4099-9f3f-e5b15108a1aa + - 8d753749-2ad7-40c8-a744-34a44ac07e7b content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:31:05 GMT + - Thu, 07 Oct 2021 23:40:57 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '23' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/20700fe9-a203-4c42-96c5-a902ca3cbbbb + response: + body: + string: '{"jobId":"20700fe9-a203-4c42-96c5-a902ca3cbbbb","lastUpdateDateTime":"2021-10-07T23:40:59Z","createdDateTime":"2021-10-07T23:40:52Z","expirationDateTime":"2021-10-08T23:40:52Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + headers: + apim-request-id: + - 2e7abfa9-27b0-46fc-81dc-aaba3e76647a + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:41:03 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -92,25 +128,75 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/20700fe9-a203-4c42-96c5-a902ca3cbbbb + response: + body: + string: '{"jobId":"20700fe9-a203-4c42-96c5-a902ca3cbbbb","lastUpdateDateTime":"2021-10-07T23:41:08Z","createdDateTime":"2021-10-07T23:40:52Z","expirationDateTime":"2021-10-08T23:40:52Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:08.1351322Z","taskName":"0","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en,es,de,fr,zh-Hans,ar,cs,da,fi,hu,it,ja,ko,no,nl,pl,pt-BR,pt-PT,ru,sv,tr. + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.1967898Z","taskName":"3","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=entity-linking"}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.7816898Z","taskName":"2","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.4585937Z","taskName":"1","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: ja,ko,zh-Hans,da,fi,nl,pl,ru,sv,de,en,es,fr,it,pt-BR,pt-PT,af,bg,ca,el,et,hr,hu,id,lv,no,ro,sk,sl,tr. + For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - bf50252b-b8e4-4515-8a1e-9a8f618477ba + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:41:08 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '555' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/10130184-69c8-4293-a072-d125494d6d91 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/20700fe9-a203-4c42-96c5-a902ca3cbbbb response: body: - string: '{"jobId":"10130184-69c8-4293-a072-d125494d6d91","lastUpdateDateTime":"2021-08-02T21:31:07Z","createdDateTime":"2021-08-02T21:31:00Z","expirationDateTime":"2021-08-03T21:31:00Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":2,"failed":0,"inProgress":4,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:07.0426689Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"20700fe9-a203-4c42-96c5-a902ca3cbbbb","lastUpdateDateTime":"2021-10-07T23:41:08Z","createdDateTime":"2021-10-07T23:40:52Z","expirationDateTime":"2021-10-08T23:40:52Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:08.1351322Z","taskName":"0","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es,de,fr,zh-Hans,ar,cs,da,fi,hu,it,ja,ko,no,nl,pl,pt-BR,pt-PT,ru,sv,tr. - For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:06.9909423Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.1967898Z","taskName":"3","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=entity-linking"}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.7816898Z","taskName":"2","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. - For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}]}}' + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.4585937Z","taskName":"1","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: ja,ko,zh-Hans,da,fi,nl,pl,ru,sv,de,en,es,fr,it,pt-BR,pt-PT,af,bg,ca,el,et,hr,hu,id,lv,no,ro,sk,sl,tr. + For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}}]}}' headers: apim-request-id: - - f3e4ef19-4c81-4081-8cef-00b3f4a110d0 + - 5707d54d-5870-45dc-a4fb-93a8b0ffb53b content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:31:10 GMT + - Thu, 07 Oct 2021 23:41:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -118,7 +204,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '146' + - '248' status: code: 200 message: OK @@ -132,33 +218,33 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/10130184-69c8-4293-a072-d125494d6d91 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/20700fe9-a203-4c42-96c5-a902ca3cbbbb response: body: - string: '{"jobId":"10130184-69c8-4293-a072-d125494d6d91","lastUpdateDateTime":"2021-08-02T21:31:13Z","createdDateTime":"2021-08-02T21:31:00Z","expirationDateTime":"2021-08-03T21:31:00Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:07.0426689Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"20700fe9-a203-4c42-96c5-a902ca3cbbbb","lastUpdateDateTime":"2021-10-07T23:41:15Z","createdDateTime":"2021-10-07T23:40:52Z","expirationDateTime":"2021-10-08T23:40:52Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:08.1351322Z","taskName":"0","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es,de,fr,zh-Hans,ar,cs,da,fi,hu,it,ja,ko,no,nl,pl,pt-BR,pt-PT,ru,sv,tr. - For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:13.849641Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.1967898Z","taskName":"3","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=entity-linking"}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:06.9909423Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=entity-linking"}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.7816898Z","taskName":"2","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. - For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:12.4583147Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:15.8767191Z","taskName":"5","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-PT,pt-BR. - For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-08-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:12.6397836Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.4585937Z","taskName":"1","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en,ja,ko,zh-Hans,zh-Hant,de,es,fr,hi,no,tr,it,nl,pt-BR,pt-PT. - For additional details see https://aka.ms/text-analytics/language-support?tabs=sentiment-analysis"}}}],"modelVersion":"2020-04-01"}}]}}' + language code. Supported languages: ja,ko,zh-Hans,da,fi,nl,pl,ru,sv,de,en,es,fr,it,pt-BR,pt-PT,af,bg,ca,el,et,hr,hu,id,lv,no,ro,sk,sl,tr. + For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}}]}}' headers: apim-request-id: - - cba2f218-9627-452f-824d-50dc740fc781 + - 98d88870-1dd1-4dde-b473-c55e050af242 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:31:16 GMT + - Thu, 07 Oct 2021 23:41:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -166,7 +252,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '186' + - '254' status: code: 200 message: OK @@ -180,36 +266,36 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/10130184-69c8-4293-a072-d125494d6d91 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/20700fe9-a203-4c42-96c5-a902ca3cbbbb response: body: - string: '{"jobId":"10130184-69c8-4293-a072-d125494d6d91","lastUpdateDateTime":"2021-08-02T21:31:17Z","createdDateTime":"2021-08-02T21:31:00Z","expirationDateTime":"2021-08-03T21:31:00Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:07.0426689Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"20700fe9-a203-4c42-96c5-a902ca3cbbbb","lastUpdateDateTime":"2021-10-07T23:41:23Z","createdDateTime":"2021-10-07T23:40:52Z","expirationDateTime":"2021-10-08T23:40:52Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:08.1351322Z","taskName":"0","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es,de,fr,zh-Hans,ar,cs,da,fi,hu,it,ja,ko,no,nl,pl,pt-BR,pt-PT,ru,sv,tr. - For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:13.849641Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.1967898Z","taskName":"3","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid - language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=entity-linking"}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:06.9909423Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=entity-linking"}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.7816898Z","taskName":"2","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. - For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:12.4583147Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:15.8767191Z","taskName":"5","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-PT,pt-BR. - For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:17.9229613Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:06.4585937Z","taskName":"1","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ja,ko,zh-Hans,da,fi,nl,pl,ru,sv,de,en,es,fr,it,pt-BR,pt-PT,af,bg,ca,el,et,hr,hu,id,lv,no,ro,sk,sl,tr. - For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:12.6397836Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:23.605784Z","taskName":"4","state":"succeeded","results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,ja,ko,zh-Hans,zh-Hant,de,es,fr,hi,no,tr,it,nl,pt-BR,pt-PT. For additional details see https://aka.ms/text-analytics/language-support?tabs=sentiment-analysis"}}}],"modelVersion":"2020-04-01"}}]}}' headers: apim-request-id: - - 872f1b9e-f3ad-4eae-8c6f-c2376073763f + - 979736f8-8008-4b6a-b897-79bcc1de73cc content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:31:21 GMT + - Thu, 07 Oct 2021 23:41:24 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -217,7 +303,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '216' + - '334' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multi_category_classify.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multi_category_classify.yaml new file mode 100644 index 000000000000..bf229f1fd89b --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multi_category_classify.yaml @@ -0,0 +1,88 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": [{"parameters": + {"project-name": "textanalytics_multi_category_classify_project_name", "deployment-name": + "textanalytics_multi_category_classify_project_name"}, "taskName": "0"}]}, "analysisInput": + {"documents": [{"id": "1", "text": "A recent report by the Government Accountability + Office (GAO) found that the dramatic increase in oil and natural gas development + on federal lands over the past six years has stretched the staff of the BLM + to a point that it has been unable to meet its environmental protection responsibilities.", + "language": "en"}, {"id": "2", "text": "David Schmidt, senior vice president--Food + Safety, International Food Information Council (IFIC), Washington, D.C., discussed + the physical activity component.", "language": "en"}, {"id": "3", "text": "I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1196' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: + - 9e97987a-7066-4590-b132-a948c28014ba + date: + - Thu, 07 Oct 2021 23:41:25 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/15f01764-884e-46a6-805a-617e74dab0f9 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '226' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/15f01764-884e-46a6-805a-617e74dab0f9?showStats=True + response: + body: + string: '{"jobId":"15f01764-884e-46a6-805a-617e74dab0f9","lastUpdateDateTime":"2021-10-07T23:41:26Z","createdDateTime":"2021-10-07T23:41:25Z","expirationDateTime":"2021-10-08T23:41:25Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:26.4004139Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","classifications":[],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","classifications":[],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"3","classifications":[{"category":"BookRestaurant","confidenceScore":0.97}],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' + headers: + apim-request-id: + - 3572e3dc-1139-4c6d-aa4b-161f4c3eea43 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:41:30 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '178' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_of_same_action.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_of_same_action.yaml new file mode 100644 index 000000000000..b32c233ed998 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_of_same_action.yaml @@ -0,0 +1,918 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "2"}, {"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": + "UnicodeCodePoint"}, "taskName": "7"}], "entityRecognitionPiiTasks": [{"parameters": + {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, + "taskName": "1"}, {"parameters": {"model-version": "latest", "loggingOptOut": + true, "piiCategories": ["USSocialSecurityNumber"], "stringIndexType": "UnicodeCodePoint"}, + "taskName": "5"}], "keyPhraseExtractionTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false}, "taskName": "6"}, {"parameters": {"model-version": + "latest", "loggingOptOut": false}, "taskName": "11"}], "entityLinkingTasks": + [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": + "UnicodeCodePoint"}, "taskName": "3"}, {"parameters": {"model-version": "latest", + "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "9"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "0"}, {"parameters": + {"model-version": "latest", "loggingOptOut": false, "opinionMining": true}, + "taskName": "8"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": + 3, "sortBy": "Rank"}, "taskName": "4"}, {"parameters": {"model-version": "latest", + "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": + 1, "sortBy": "Offset"}, "taskName": "10"}], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "28", "text": "My SSN is 859-98-0987. + Here is another sentence.", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 + your Brazilian CPF number? Here is another sentence.", "language": "en"}, {"id": + "5", "text": "A recent report by the Government Accountability Office (GAO) + found that the dramatic increase in oil and natural gas development on federal + lands over the past six years has stretched the staff of the BLM to a point + that it has been unable to meet its environmental protection responsibilities.", + "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '2390' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: + - 10d2dad8-0cb9-49a8-9064-64fa8cc3c57d + date: + - Thu, 07 Oct 2021 23:41:33 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/265cca67-f8d7-4b75-aca0-88bce8803c8b + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1639' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/265cca67-f8d7-4b75-aca0-88bce8803c8b + response: + body: + string: '{"jobId":"265cca67-f8d7-4b75-aca0-88bce8803c8b","lastUpdateDateTime":"2021-10-07T23:41:38Z","createdDateTime":"2021-10-07T23:41:31Z","expirationDateTime":"2021-10-08T23:41:31Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":12,"total":12}}' + headers: + apim-request-id: + - 5cb18956-14de-498e-bd66-59bc1b6c9a1e + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:41:37 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '9' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/265cca67-f8d7-4b75-aca0-88bce8803c8b + response: + body: + string: '{"jobId":"265cca67-f8d7-4b75-aca0-88bce8803c8b","lastUpdateDateTime":"2021-10-07T23:41:40Z","createdDateTime":"2021-10-07T23:41:31Z","expirationDateTime":"2021-10-08T23:41:31Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":11,"total":12,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:41:40.7983208Z","taskName":"7","state":"succeeded","results":{"documents":[{"id":"28","entities":[{"text":"859","category":"Quantity","subcategory":"Number","offset":10,"length":3,"confidenceScore":0.8},{"text":"98","category":"Quantity","subcategory":"Number","offset":14,"length":2,"confidenceScore":0.8},{"text":"0987","category":"Quantity","subcategory":"Number","offset":17,"length":4,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[{"text":"998","category":"Quantity","subcategory":"Number","offset":3,"length":3,"confidenceScore":0.8},{"text":"214","category":"Quantity","subcategory":"Number","offset":7,"length":3,"confidenceScore":0.8},{"text":"865","category":"Quantity","subcategory":"Number","offset":11,"length":3,"confidenceScore":0.8},{"text":"68","category":"Quantity","subcategory":"Number","offset":15,"length":2,"confidenceScore":0.8}],"warnings":[]},{"id":"5","entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.95},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.66},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.65},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.94},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.83}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - cae9ab79-7122-49f1-9f9e-dc54982fa8ee + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:41:42 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '92' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/265cca67-f8d7-4b75-aca0-88bce8803c8b + response: + body: + string: "{\"jobId\":\"265cca67-f8d7-4b75-aca0-88bce8803c8b\",\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:47Z\",\"createdDateTime\":\"2021-10-07T23:41:31Z\",\"\ + expirationDateTime\":\"2021-10-08T23:41:31Z\",\"status\":\"running\",\"errors\"\ + :[],\"displayName\":\"NA\",\"tasks\":{\"completed\":4,\"failed\":0,\"inProgress\"\ + :8,\"total\":12,\"entityRecognitionTasks\":[{\"lastUpdateDateTime\":\"2021-10-07T23:41:40.7983208Z\"\ + ,\"taskName\":\"7\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[{\"text\":\"859\",\"category\":\"Quantity\",\"subcategory\"\ + :\"Number\",\"offset\":10,\"length\":3,\"confidenceScore\":0.8},{\"text\"\ + :\"98\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":14,\"\ + length\":2,\"confidenceScore\":0.8},{\"text\":\"0987\",\"category\":\"Quantity\"\ + ,\"subcategory\":\"Number\",\"offset\":17,\"length\":4,\"confidenceScore\"\ + :0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"998\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":3,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"214\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":7,\"length\":3,\"confidenceScore\":0.8},{\"text\":\"865\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":11,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"68\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":15,\"length\":2,\"confidenceScore\":0.8}],\"warnings\":[]},{\"\ + id\":\"5\",\"entities\":[{\"text\":\"Government Accountability Office\",\"\ + category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.99},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.95},{\"text\":\"oil\",\"category\":\"Product\",\"\ + offset\":98,\"length\":3,\"confidenceScore\":0.66},{\"text\":\"natural\",\"\ + category\":\"Product\",\"offset\":106,\"length\":7,\"confidenceScore\":0.65},{\"\ + text\":\"past six years\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\"\ + ,\"offset\":156,\"length\":14,\"confidenceScore\":0.8},{\"text\":\"BLM\",\"\ + category\":\"Organization\",\"offset\":202,\"length\":3,\"confidenceScore\"\ + :0.94},{\"text\":\"environmental protection\",\"category\":\"Skill\",\"offset\"\ + :253,\"length\":24,\"confidenceScore\":0.83}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-06-01\"}}],\"entityLinkingTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:44.8597665Z\",\"taskName\":\"3\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"entities\":[],\"warnings\":[]},{\"\ + id\":\"3\",\"entities\":[{\"bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\"\ + ,\"name\":\"Brazil\",\"matches\":[{\"text\":\"Brazilian\",\"offset\":23,\"\ + length\":9,\"confidenceScore\":0.07}],\"language\":\"en\",\"id\":\"Brazil\"\ + ,\"url\":\"https://en.wikipedia.org/wiki/Brazil\",\"dataSource\":\"Wikipedia\"\ + },{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\",\"name\":\"Cadastro\ + \ de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF number\",\"offset\"\ + :33,\"length\":10,\"confidenceScore\":0.82}],\"language\":\"en\",\"id\":\"\ + Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:44.8119202Z\"\ + ,\"taskName\":\"9\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"\ + bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\",\"name\":\"Brazil\",\"matches\"\ + :[{\"text\":\"Brazilian\",\"offset\":23,\"length\":9,\"confidenceScore\":0.07}],\"\ + language\":\"en\",\"id\":\"Brazil\",\"url\":\"https://en.wikipedia.org/wiki/Brazil\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\"\ + ,\"name\":\"Cadastro de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF\ + \ number\",\"offset\":33,\"length\":10,\"confidenceScore\":0.82}],\"language\"\ + :\"en\",\"id\":\"Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}}],\"entityRecognitionPiiTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:47.2930334Z\",\"taskName\":\"5\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"redactedText\":\"My SSN is ***********. Here\ + \ is another sentence.\",\"id\":\"28\",\"entities\":[{\"text\":\"859-98-0987\"\ + ,\"category\":\"USSocialSecurityNumber\",\"offset\":10,\"length\":11,\"confidenceScore\"\ + :0.65}],\"warnings\":[]},{\"redactedText\":\"Is 998.214.865-68 your Brazilian\ + \ CPF number? Here is another sentence.\",\"id\":\"3\",\"entities\":[],\"\ + warnings\":[]},{\"redactedText\":\"A recent report by the Government Accountability\ + \ Office (GAO) found that the dramatic increase in oil and natural gas development\ + \ on federal lands over the past six years has stretched the staff of the\ + \ BLM to a point that it has been unable to meet its environmental protection\ + \ responsibilities.\",\"id\":\"5\",\"entities\":[],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-01-15\"}}]}}" + headers: + apim-request-id: + - 96dd08bb-4639-4c54-b7d1-989a01b60237 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:41:48 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '333' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/265cca67-f8d7-4b75-aca0-88bce8803c8b + response: + body: + string: "{\"jobId\":\"265cca67-f8d7-4b75-aca0-88bce8803c8b\",\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:53Z\",\"createdDateTime\":\"2021-10-07T23:41:31Z\",\"\ + expirationDateTime\":\"2021-10-08T23:41:31Z\",\"status\":\"running\",\"errors\"\ + :[],\"displayName\":\"NA\",\"tasks\":{\"completed\":9,\"failed\":0,\"inProgress\"\ + :3,\"total\":12,\"entityRecognitionTasks\":[{\"lastUpdateDateTime\":\"2021-10-07T23:41:53.7576255Z\"\ + ,\"taskName\":\"2\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[{\"text\":\"859\",\"category\":\"Quantity\",\"subcategory\"\ + :\"Number\",\"offset\":10,\"length\":3,\"confidenceScore\":0.8},{\"text\"\ + :\"98\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":14,\"\ + length\":2,\"confidenceScore\":0.8},{\"text\":\"0987\",\"category\":\"Quantity\"\ + ,\"subcategory\":\"Number\",\"offset\":17,\"length\":4,\"confidenceScore\"\ + :0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"998\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":3,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"214\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":7,\"length\":3,\"confidenceScore\":0.8},{\"text\":\"865\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":11,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"68\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":15,\"length\":2,\"confidenceScore\":0.8}],\"warnings\":[]},{\"\ + id\":\"5\",\"entities\":[{\"text\":\"Government Accountability Office\",\"\ + category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.99},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.95},{\"text\":\"oil\",\"category\":\"Product\",\"\ + offset\":98,\"length\":3,\"confidenceScore\":0.66},{\"text\":\"natural\",\"\ + category\":\"Product\",\"offset\":106,\"length\":7,\"confidenceScore\":0.65},{\"\ + text\":\"past six years\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\"\ + ,\"offset\":156,\"length\":14,\"confidenceScore\":0.8},{\"text\":\"BLM\",\"\ + category\":\"Organization\",\"offset\":202,\"length\":3,\"confidenceScore\"\ + :0.94},{\"text\":\"environmental protection\",\"category\":\"Skill\",\"offset\"\ + :253,\"length\":24,\"confidenceScore\":0.83}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-06-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:40.7983208Z\"\ + ,\"taskName\":\"7\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[{\"text\":\"859\",\"category\":\"Quantity\",\"subcategory\"\ + :\"Number\",\"offset\":10,\"length\":3,\"confidenceScore\":0.8},{\"text\"\ + :\"98\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":14,\"\ + length\":2,\"confidenceScore\":0.8},{\"text\":\"0987\",\"category\":\"Quantity\"\ + ,\"subcategory\":\"Number\",\"offset\":17,\"length\":4,\"confidenceScore\"\ + :0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"998\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":3,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"214\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":7,\"length\":3,\"confidenceScore\":0.8},{\"text\":\"865\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":11,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"68\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":15,\"length\":2,\"confidenceScore\":0.8}],\"warnings\":[]},{\"\ + id\":\"5\",\"entities\":[{\"text\":\"Government Accountability Office\",\"\ + category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.99},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.95},{\"text\":\"oil\",\"category\":\"Product\",\"\ + offset\":98,\"length\":3,\"confidenceScore\":0.66},{\"text\":\"natural\",\"\ + category\":\"Product\",\"offset\":106,\"length\":7,\"confidenceScore\":0.65},{\"\ + text\":\"past six years\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\"\ + ,\"offset\":156,\"length\":14,\"confidenceScore\":0.8},{\"text\":\"BLM\",\"\ + category\":\"Organization\",\"offset\":202,\"length\":3,\"confidenceScore\"\ + :0.94},{\"text\":\"environmental protection\",\"category\":\"Skill\",\"offset\"\ + :253,\"length\":24,\"confidenceScore\":0.83}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-06-01\"}}],\"entityLinkingTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:44.8597665Z\",\"taskName\":\"3\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"entities\":[],\"warnings\":[]},{\"\ + id\":\"3\",\"entities\":[{\"bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\"\ + ,\"name\":\"Brazil\",\"matches\":[{\"text\":\"Brazilian\",\"offset\":23,\"\ + length\":9,\"confidenceScore\":0.07}],\"language\":\"en\",\"id\":\"Brazil\"\ + ,\"url\":\"https://en.wikipedia.org/wiki/Brazil\",\"dataSource\":\"Wikipedia\"\ + },{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\",\"name\":\"Cadastro\ + \ de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF number\",\"offset\"\ + :33,\"length\":10,\"confidenceScore\":0.82}],\"language\":\"en\",\"id\":\"\ + Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:44.8119202Z\"\ + ,\"taskName\":\"9\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"\ + bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\",\"name\":\"Brazil\",\"matches\"\ + :[{\"text\":\"Brazilian\",\"offset\":23,\"length\":9,\"confidenceScore\":0.07}],\"\ + language\":\"en\",\"id\":\"Brazil\",\"url\":\"https://en.wikipedia.org/wiki/Brazil\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\"\ + ,\"name\":\"Cadastro de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF\ + \ number\",\"offset\":33,\"length\":10,\"confidenceScore\":0.82}],\"language\"\ + :\"en\",\"id\":\"Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}}],\"entityRecognitionPiiTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:52.6444045Z\",\"taskName\":\"1\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"redactedText\":\"My SSN is ***********. Here\ + \ is another sentence.\",\"id\":\"28\",\"entities\":[{\"text\":\"859-98-0987\"\ + ,\"category\":\"USSocialSecurityNumber\",\"offset\":10,\"length\":11,\"confidenceScore\"\ + :0.65}],\"warnings\":[]},{\"redactedText\":\"Is 998.214.865-68 your Brazilian\ + \ CPF number? Here is another sentence.\",\"id\":\"3\",\"entities\":[],\"\ + warnings\":[]},{\"redactedText\":\"A recent report by the ********************************\ + \ (***) found that the dramatic increase in oil and natural gas development\ + \ on federal lands over the ************** has stretched the staff of the\ + \ *** to a point that it has been unable to meet its environmental protection\ + \ responsibilities.\",\"id\":\"5\",\"entities\":[{\"text\":\"Government Accountability\ + \ Office\",\"category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.96},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.93},{\"text\":\"past six years\",\"category\":\"\ + DateTime\",\"subcategory\":\"DateRange\",\"offset\":156,\"length\":14,\"confidenceScore\"\ + :0.8},{\"text\":\"BLM\",\"category\":\"Organization\",\"offset\":202,\"length\"\ + :3,\"confidenceScore\":0.9}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-01-15\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:47.2930334Z\"\ + ,\"taskName\":\"5\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + redactedText\":\"My SSN is ***********. Here is another sentence.\",\"id\"\ + :\"28\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"USSocialSecurityNumber\"\ + ,\"offset\":10,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"\ + redactedText\":\"Is 998.214.865-68 your Brazilian CPF number? Here is another\ + \ sentence.\",\"id\":\"3\",\"entities\":[],\"warnings\":[]},{\"redactedText\"\ + :\"A recent report by the Government Accountability Office (GAO) found that\ + \ the dramatic increase in oil and natural gas development on federal lands\ + \ over the past six years has stretched the staff of the BLM to a point that\ + \ it has been unable to meet its environmental protection responsibilities.\"\ + ,\"id\":\"5\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-01-15\"}}],\"extractiveSummarizationTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:51.6186346Z\",\"taskName\":\"10\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"sentences\":[{\"text\":\"My\ + \ SSN is 859-98-0987.\",\"rankScore\":1.0,\"offset\":0,\"length\":22}],\"\ + warnings\":[]},{\"id\":\"3\",\"sentences\":[{\"text\":\"Is 998.214.865-68\ + \ your Brazilian CPF number?\",\"rankScore\":1.0,\"offset\":0,\"length\":44}],\"\ + warnings\":[]},{\"id\":\"5\",\"sentences\":[{\"text\":\"A recent report by\ + \ the Government Accountability Office (GAO) found that the dramatic increase\ + \ in oil and natural gas development on federal lands over the past six years\ + \ has stretched the staff of the BLM to a point that it has been unable to\ + \ meet its environmental protection responsibilities.\",\"rankScore\":1.0,\"\ + offset\":0,\"length\":295}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-08-01\"}}],\"keyPhraseExtractionTasks\":[{\"lastUpdateDateTime\":\"\ + 2021-10-07T23:41:50.5445647Z\",\"taskName\":\"6\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"keyPhrases\":[\"SSN\",\"sentence\"\ + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"Brazilian CPF number\"\ + ,\"sentence\"],\"warnings\":[]},{\"id\":\"5\",\"keyPhrases\":[\"Government\ + \ Accountability Office\",\"natural gas development\",\"past six years\",\"\ + environmental protection responsibilities\",\"recent report\",\"dramatic increase\"\ + ,\"federal lands\",\"GAO\",\"oil\",\"staff\",\"BLM\",\"point\"],\"warnings\"\ + :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}},{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:51.5804408Z\",\"taskName\":\"11\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"keyPhrases\":[\"SSN\",\"sentence\"\ + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"Brazilian CPF number\"\ + ,\"sentence\"],\"warnings\":[]},{\"id\":\"5\",\"keyPhrases\":[\"Government\ + \ Accountability Office\",\"natural gas development\",\"past six years\",\"\ + environmental protection responsibilities\",\"recent report\",\"dramatic increase\"\ + ,\"federal lands\",\"GAO\",\"oil\",\"staff\",\"BLM\",\"point\"],\"warnings\"\ + :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}}]}}" + headers: + apim-request-id: + - 30c525e8-275d-4771-b881-0ea8b12603a6 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:41:54 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '790' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/265cca67-f8d7-4b75-aca0-88bce8803c8b + response: + body: + string: "{\"jobId\":\"265cca67-f8d7-4b75-aca0-88bce8803c8b\",\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:57Z\",\"createdDateTime\":\"2021-10-07T23:41:31Z\",\"\ + expirationDateTime\":\"2021-10-08T23:41:31Z\",\"status\":\"running\",\"errors\"\ + :[],\"displayName\":\"NA\",\"tasks\":{\"completed\":11,\"failed\":0,\"inProgress\"\ + :1,\"total\":12,\"entityRecognitionTasks\":[{\"lastUpdateDateTime\":\"2021-10-07T23:41:53.7576255Z\"\ + ,\"taskName\":\"2\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[{\"text\":\"859\",\"category\":\"Quantity\",\"subcategory\"\ + :\"Number\",\"offset\":10,\"length\":3,\"confidenceScore\":0.8},{\"text\"\ + :\"98\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":14,\"\ + length\":2,\"confidenceScore\":0.8},{\"text\":\"0987\",\"category\":\"Quantity\"\ + ,\"subcategory\":\"Number\",\"offset\":17,\"length\":4,\"confidenceScore\"\ + :0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"998\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":3,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"214\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":7,\"length\":3,\"confidenceScore\":0.8},{\"text\":\"865\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":11,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"68\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":15,\"length\":2,\"confidenceScore\":0.8}],\"warnings\":[]},{\"\ + id\":\"5\",\"entities\":[{\"text\":\"Government Accountability Office\",\"\ + category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.99},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.95},{\"text\":\"oil\",\"category\":\"Product\",\"\ + offset\":98,\"length\":3,\"confidenceScore\":0.66},{\"text\":\"natural\",\"\ + category\":\"Product\",\"offset\":106,\"length\":7,\"confidenceScore\":0.65},{\"\ + text\":\"past six years\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\"\ + ,\"offset\":156,\"length\":14,\"confidenceScore\":0.8},{\"text\":\"BLM\",\"\ + category\":\"Organization\",\"offset\":202,\"length\":3,\"confidenceScore\"\ + :0.94},{\"text\":\"environmental protection\",\"category\":\"Skill\",\"offset\"\ + :253,\"length\":24,\"confidenceScore\":0.83}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-06-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:40.7983208Z\"\ + ,\"taskName\":\"7\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[{\"text\":\"859\",\"category\":\"Quantity\",\"subcategory\"\ + :\"Number\",\"offset\":10,\"length\":3,\"confidenceScore\":0.8},{\"text\"\ + :\"98\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":14,\"\ + length\":2,\"confidenceScore\":0.8},{\"text\":\"0987\",\"category\":\"Quantity\"\ + ,\"subcategory\":\"Number\",\"offset\":17,\"length\":4,\"confidenceScore\"\ + :0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"998\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":3,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"214\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":7,\"length\":3,\"confidenceScore\":0.8},{\"text\":\"865\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":11,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"68\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":15,\"length\":2,\"confidenceScore\":0.8}],\"warnings\":[]},{\"\ + id\":\"5\",\"entities\":[{\"text\":\"Government Accountability Office\",\"\ + category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.99},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.95},{\"text\":\"oil\",\"category\":\"Product\",\"\ + offset\":98,\"length\":3,\"confidenceScore\":0.66},{\"text\":\"natural\",\"\ + category\":\"Product\",\"offset\":106,\"length\":7,\"confidenceScore\":0.65},{\"\ + text\":\"past six years\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\"\ + ,\"offset\":156,\"length\":14,\"confidenceScore\":0.8},{\"text\":\"BLM\",\"\ + category\":\"Organization\",\"offset\":202,\"length\":3,\"confidenceScore\"\ + :0.94},{\"text\":\"environmental protection\",\"category\":\"Skill\",\"offset\"\ + :253,\"length\":24,\"confidenceScore\":0.83}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-06-01\"}}],\"entityLinkingTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:44.8597665Z\",\"taskName\":\"3\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"entities\":[],\"warnings\":[]},{\"\ + id\":\"3\",\"entities\":[{\"bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\"\ + ,\"name\":\"Brazil\",\"matches\":[{\"text\":\"Brazilian\",\"offset\":23,\"\ + length\":9,\"confidenceScore\":0.07}],\"language\":\"en\",\"id\":\"Brazil\"\ + ,\"url\":\"https://en.wikipedia.org/wiki/Brazil\",\"dataSource\":\"Wikipedia\"\ + },{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\",\"name\":\"Cadastro\ + \ de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF number\",\"offset\"\ + :33,\"length\":10,\"confidenceScore\":0.82}],\"language\":\"en\",\"id\":\"\ + Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:44.8119202Z\"\ + ,\"taskName\":\"9\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"\ + bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\",\"name\":\"Brazil\",\"matches\"\ + :[{\"text\":\"Brazilian\",\"offset\":23,\"length\":9,\"confidenceScore\":0.07}],\"\ + language\":\"en\",\"id\":\"Brazil\",\"url\":\"https://en.wikipedia.org/wiki/Brazil\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\"\ + ,\"name\":\"Cadastro de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF\ + \ number\",\"offset\":33,\"length\":10,\"confidenceScore\":0.82}],\"language\"\ + :\"en\",\"id\":\"Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}}],\"entityRecognitionPiiTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:52.6444045Z\",\"taskName\":\"1\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"redactedText\":\"My SSN is ***********. Here\ + \ is another sentence.\",\"id\":\"28\",\"entities\":[{\"text\":\"859-98-0987\"\ + ,\"category\":\"USSocialSecurityNumber\",\"offset\":10,\"length\":11,\"confidenceScore\"\ + :0.65}],\"warnings\":[]},{\"redactedText\":\"Is 998.214.865-68 your Brazilian\ + \ CPF number? Here is another sentence.\",\"id\":\"3\",\"entities\":[],\"\ + warnings\":[]},{\"redactedText\":\"A recent report by the ********************************\ + \ (***) found that the dramatic increase in oil and natural gas development\ + \ on federal lands over the ************** has stretched the staff of the\ + \ *** to a point that it has been unable to meet its environmental protection\ + \ responsibilities.\",\"id\":\"5\",\"entities\":[{\"text\":\"Government Accountability\ + \ Office\",\"category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.96},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.93},{\"text\":\"past six years\",\"category\":\"\ + DateTime\",\"subcategory\":\"DateRange\",\"offset\":156,\"length\":14,\"confidenceScore\"\ + :0.8},{\"text\":\"BLM\",\"category\":\"Organization\",\"offset\":202,\"length\"\ + :3,\"confidenceScore\":0.9}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-01-15\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:47.2930334Z\"\ + ,\"taskName\":\"5\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + redactedText\":\"My SSN is ***********. Here is another sentence.\",\"id\"\ + :\"28\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"USSocialSecurityNumber\"\ + ,\"offset\":10,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"\ + redactedText\":\"Is 998.214.865-68 your Brazilian CPF number? Here is another\ + \ sentence.\",\"id\":\"3\",\"entities\":[],\"warnings\":[]},{\"redactedText\"\ + :\"A recent report by the Government Accountability Office (GAO) found that\ + \ the dramatic increase in oil and natural gas development on federal lands\ + \ over the past six years has stretched the staff of the BLM to a point that\ + \ it has been unable to meet its environmental protection responsibilities.\"\ + ,\"id\":\"5\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-01-15\"}}],\"extractiveSummarizationTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:57.3126417Z\",\"taskName\":\"4\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"sentences\":[{\"text\":\"My\ + \ SSN is 859-98-0987.\",\"rankScore\":1.0,\"offset\":0,\"length\":22},{\"\ + text\":\"Here is another sentence.\",\"rankScore\":0.0,\"offset\":23,\"length\"\ + :25}],\"warnings\":[]},{\"id\":\"3\",\"sentences\":[{\"text\":\"Is 998.214.865-68\ + \ your Brazilian CPF number?\",\"rankScore\":1.0,\"offset\":0,\"length\":44},{\"\ + text\":\"Here is another sentence.\",\"rankScore\":0.0,\"offset\":45,\"length\"\ + :25}],\"warnings\":[]},{\"id\":\"5\",\"sentences\":[{\"text\":\"A recent report\ + \ by the Government Accountability Office (GAO) found that the dramatic increase\ + \ in oil and natural gas development on federal lands over the past six years\ + \ has stretched the staff of the BLM to a point that it has been unable to\ + \ meet its environmental protection responsibilities.\",\"rankScore\":1.0,\"\ + offset\":0,\"length\":295}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-08-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:51.6186346Z\"\ + ,\"taskName\":\"10\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"sentences\":[{\"text\":\"My SSN is 859-98-0987.\",\"rankScore\"\ + :1.0,\"offset\":0,\"length\":22}],\"warnings\":[]},{\"id\":\"3\",\"sentences\"\ + :[{\"text\":\"Is 998.214.865-68 your Brazilian CPF number?\",\"rankScore\"\ + :1.0,\"offset\":0,\"length\":44}],\"warnings\":[]},{\"id\":\"5\",\"sentences\"\ + :[{\"text\":\"A recent report by the Government Accountability Office (GAO)\ + \ found that the dramatic increase in oil and natural gas development on federal\ + \ lands over the past six years has stretched the staff of the BLM to a point\ + \ that it has been unable to meet its environmental protection responsibilities.\"\ + ,\"rankScore\":1.0,\"offset\":0,\"length\":295}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-08-01\"}}],\"keyPhraseExtractionTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:50.5445647Z\",\"taskName\":\"6\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"keyPhrases\":[\"SSN\",\"sentence\"\ + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"Brazilian CPF number\"\ + ,\"sentence\"],\"warnings\":[]},{\"id\":\"5\",\"keyPhrases\":[\"Government\ + \ Accountability Office\",\"natural gas development\",\"past six years\",\"\ + environmental protection responsibilities\",\"recent report\",\"dramatic increase\"\ + ,\"federal lands\",\"GAO\",\"oil\",\"staff\",\"BLM\",\"point\"],\"warnings\"\ + :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}},{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:51.5804408Z\",\"taskName\":\"11\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"keyPhrases\":[\"SSN\",\"sentence\"\ + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"Brazilian CPF number\"\ + ,\"sentence\"],\"warnings\":[]},{\"id\":\"5\",\"keyPhrases\":[\"Government\ + \ Accountability Office\",\"natural gas development\",\"past six years\",\"\ + environmental protection responsibilities\",\"recent report\",\"dramatic increase\"\ + ,\"federal lands\",\"GAO\",\"oil\",\"staff\",\"BLM\",\"point\"],\"warnings\"\ + :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}}],\"sentimentAnalysisTasks\"\ + :[{\"lastUpdateDateTime\":\"2021-10-07T23:41:55.5919878Z\",\"taskName\":\"\ + 8\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"id\":\"28\",\"\ + sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\"\ + :0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.0,\"neutral\":1.0,\"negative\":0.0},\"offset\":0,\"length\"\ + :22,\"text\":\"My SSN is 859-98-0987.\",\"targets\":[],\"assessments\":[]},{\"\ + sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.02,\"neutral\"\ + :0.9,\"negative\":0.08},\"offset\":23,\"length\":25,\"text\":\"Here is another\ + \ sentence.\",\"targets\":[],\"assessments\":[]}],\"warnings\":[]},{\"id\"\ + :\"3\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"\ + neutral\":0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"neutral\"\ + ,\"confidenceScores\":{\"positive\":0.0,\"neutral\":1.0,\"negative\":0.0},\"\ + offset\":0,\"length\":44,\"text\":\"Is 998.214.865-68 your Brazilian CPF number?\"\ + ,\"targets\":[],\"assessments\":[]},{\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.02,\"neutral\":0.9,\"negative\":0.08},\"offset\":45,\"length\"\ + :25,\"text\":\"Here is another sentence.\",\"targets\":[],\"assessments\"\ + :[]}],\"warnings\":[]},{\"id\":\"5\",\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.23,\"neutral\":0.61,\"negative\":0.16},\"sentences\":[{\"\ + sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.23,\"neutral\"\ + :0.61,\"negative\":0.16},\"offset\":0,\"length\":295,\"text\":\"A recent report\ + \ by the Government Accountability Office (GAO) found that the dramatic increase\ + \ in oil and natural gas development on federal lands over the past six years\ + \ has stretched the staff of the BLM to a point that it has been unable to\ + \ meet its environmental protection responsibilities.\",\"targets\":[],\"\ + assessments\":[]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"\ + }}]}}" + headers: + apim-request-id: + - f61de0c4-1f1a-4ada-b111-6a8aef607e76 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:42:00 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '847' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/265cca67-f8d7-4b75-aca0-88bce8803c8b + response: + body: + string: "{\"jobId\":\"265cca67-f8d7-4b75-aca0-88bce8803c8b\",\"lastUpdateDateTime\"\ + :\"2021-10-07T23:42:01Z\",\"createdDateTime\":\"2021-10-07T23:41:31Z\",\"\ + expirationDateTime\":\"2021-10-08T23:41:31Z\",\"status\":\"succeeded\",\"\ + errors\":[],\"displayName\":\"NA\",\"tasks\":{\"completed\":12,\"failed\"\ + :0,\"inProgress\":0,\"total\":12,\"entityRecognitionTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:53.7576255Z\",\"taskName\":\"2\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"entities\":[{\"text\":\"859\"\ + ,\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":10,\"length\"\ + :3,\"confidenceScore\":0.8},{\"text\":\"98\",\"category\":\"Quantity\",\"\ + subcategory\":\"Number\",\"offset\":14,\"length\":2,\"confidenceScore\":0.8},{\"\ + text\":\"0987\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\"\ + :17,\"length\":4,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"3\"\ + ,\"entities\":[{\"text\":\"998\",\"category\":\"Quantity\",\"subcategory\"\ + :\"Number\",\"offset\":3,\"length\":3,\"confidenceScore\":0.8},{\"text\":\"\ + 214\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":7,\"\ + length\":3,\"confidenceScore\":0.8},{\"text\":\"865\",\"category\":\"Quantity\"\ + ,\"subcategory\":\"Number\",\"offset\":11,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"68\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":15,\"length\":2,\"confidenceScore\":0.8}],\"warnings\":[]},{\"\ + id\":\"5\",\"entities\":[{\"text\":\"Government Accountability Office\",\"\ + category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.99},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.95},{\"text\":\"oil\",\"category\":\"Product\",\"\ + offset\":98,\"length\":3,\"confidenceScore\":0.66},{\"text\":\"natural\",\"\ + category\":\"Product\",\"offset\":106,\"length\":7,\"confidenceScore\":0.65},{\"\ + text\":\"past six years\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\"\ + ,\"offset\":156,\"length\":14,\"confidenceScore\":0.8},{\"text\":\"BLM\",\"\ + category\":\"Organization\",\"offset\":202,\"length\":3,\"confidenceScore\"\ + :0.94},{\"text\":\"environmental protection\",\"category\":\"Skill\",\"offset\"\ + :253,\"length\":24,\"confidenceScore\":0.83}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-06-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:40.7983208Z\"\ + ,\"taskName\":\"7\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[{\"text\":\"859\",\"category\":\"Quantity\",\"subcategory\"\ + :\"Number\",\"offset\":10,\"length\":3,\"confidenceScore\":0.8},{\"text\"\ + :\"98\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":14,\"\ + length\":2,\"confidenceScore\":0.8},{\"text\":\"0987\",\"category\":\"Quantity\"\ + ,\"subcategory\":\"Number\",\"offset\":17,\"length\":4,\"confidenceScore\"\ + :0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"998\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":3,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"214\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":7,\"length\":3,\"confidenceScore\":0.8},{\"text\":\"865\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":11,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"68\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":15,\"length\":2,\"confidenceScore\":0.8}],\"warnings\":[]},{\"\ + id\":\"5\",\"entities\":[{\"text\":\"Government Accountability Office\",\"\ + category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.99},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.95},{\"text\":\"oil\",\"category\":\"Product\",\"\ + offset\":98,\"length\":3,\"confidenceScore\":0.66},{\"text\":\"natural\",\"\ + category\":\"Product\",\"offset\":106,\"length\":7,\"confidenceScore\":0.65},{\"\ + text\":\"past six years\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\"\ + ,\"offset\":156,\"length\":14,\"confidenceScore\":0.8},{\"text\":\"BLM\",\"\ + category\":\"Organization\",\"offset\":202,\"length\":3,\"confidenceScore\"\ + :0.94},{\"text\":\"environmental protection\",\"category\":\"Skill\",\"offset\"\ + :253,\"length\":24,\"confidenceScore\":0.83}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-06-01\"}}],\"entityLinkingTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:44.8597665Z\",\"taskName\":\"3\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"entities\":[],\"warnings\":[]},{\"\ + id\":\"3\",\"entities\":[{\"bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\"\ + ,\"name\":\"Brazil\",\"matches\":[{\"text\":\"Brazilian\",\"offset\":23,\"\ + length\":9,\"confidenceScore\":0.07}],\"language\":\"en\",\"id\":\"Brazil\"\ + ,\"url\":\"https://en.wikipedia.org/wiki/Brazil\",\"dataSource\":\"Wikipedia\"\ + },{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\",\"name\":\"Cadastro\ + \ de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF number\",\"offset\"\ + :33,\"length\":10,\"confidenceScore\":0.82}],\"language\":\"en\",\"id\":\"\ + Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:44.8119202Z\"\ + ,\"taskName\":\"9\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"\ + bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\",\"name\":\"Brazil\",\"matches\"\ + :[{\"text\":\"Brazilian\",\"offset\":23,\"length\":9,\"confidenceScore\":0.07}],\"\ + language\":\"en\",\"id\":\"Brazil\",\"url\":\"https://en.wikipedia.org/wiki/Brazil\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\"\ + ,\"name\":\"Cadastro de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF\ + \ number\",\"offset\":33,\"length\":10,\"confidenceScore\":0.82}],\"language\"\ + :\"en\",\"id\":\"Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}}],\"entityRecognitionPiiTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:52.6444045Z\",\"taskName\":\"1\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"redactedText\":\"My SSN is ***********. Here\ + \ is another sentence.\",\"id\":\"28\",\"entities\":[{\"text\":\"859-98-0987\"\ + ,\"category\":\"USSocialSecurityNumber\",\"offset\":10,\"length\":11,\"confidenceScore\"\ + :0.65}],\"warnings\":[]},{\"redactedText\":\"Is 998.214.865-68 your Brazilian\ + \ CPF number? Here is another sentence.\",\"id\":\"3\",\"entities\":[],\"\ + warnings\":[]},{\"redactedText\":\"A recent report by the ********************************\ + \ (***) found that the dramatic increase in oil and natural gas development\ + \ on federal lands over the ************** has stretched the staff of the\ + \ *** to a point that it has been unable to meet its environmental protection\ + \ responsibilities.\",\"id\":\"5\",\"entities\":[{\"text\":\"Government Accountability\ + \ Office\",\"category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.96},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.93},{\"text\":\"past six years\",\"category\":\"\ + DateTime\",\"subcategory\":\"DateRange\",\"offset\":156,\"length\":14,\"confidenceScore\"\ + :0.8},{\"text\":\"BLM\",\"category\":\"Organization\",\"offset\":202,\"length\"\ + :3,\"confidenceScore\":0.9}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-01-15\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:47.2930334Z\"\ + ,\"taskName\":\"5\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + redactedText\":\"My SSN is ***********. Here is another sentence.\",\"id\"\ + :\"28\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"USSocialSecurityNumber\"\ + ,\"offset\":10,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"\ + redactedText\":\"Is 998.214.865-68 your Brazilian CPF number? Here is another\ + \ sentence.\",\"id\":\"3\",\"entities\":[],\"warnings\":[]},{\"redactedText\"\ + :\"A recent report by the Government Accountability Office (GAO) found that\ + \ the dramatic increase in oil and natural gas development on federal lands\ + \ over the past six years has stretched the staff of the BLM to a point that\ + \ it has been unable to meet its environmental protection responsibilities.\"\ + ,\"id\":\"5\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-01-15\"}}],\"extractiveSummarizationTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:57.3126417Z\",\"taskName\":\"4\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"sentences\":[{\"text\":\"My\ + \ SSN is 859-98-0987.\",\"rankScore\":1.0,\"offset\":0,\"length\":22},{\"\ + text\":\"Here is another sentence.\",\"rankScore\":0.0,\"offset\":23,\"length\"\ + :25}],\"warnings\":[]},{\"id\":\"3\",\"sentences\":[{\"text\":\"Is 998.214.865-68\ + \ your Brazilian CPF number?\",\"rankScore\":1.0,\"offset\":0,\"length\":44},{\"\ + text\":\"Here is another sentence.\",\"rankScore\":0.0,\"offset\":45,\"length\"\ + :25}],\"warnings\":[]},{\"id\":\"5\",\"sentences\":[{\"text\":\"A recent report\ + \ by the Government Accountability Office (GAO) found that the dramatic increase\ + \ in oil and natural gas development on federal lands over the past six years\ + \ has stretched the staff of the BLM to a point that it has been unable to\ + \ meet its environmental protection responsibilities.\",\"rankScore\":1.0,\"\ + offset\":0,\"length\":295}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-08-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:51.6186346Z\"\ + ,\"taskName\":\"10\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"sentences\":[{\"text\":\"My SSN is 859-98-0987.\",\"rankScore\"\ + :1.0,\"offset\":0,\"length\":22}],\"warnings\":[]},{\"id\":\"3\",\"sentences\"\ + :[{\"text\":\"Is 998.214.865-68 your Brazilian CPF number?\",\"rankScore\"\ + :1.0,\"offset\":0,\"length\":44}],\"warnings\":[]},{\"id\":\"5\",\"sentences\"\ + :[{\"text\":\"A recent report by the Government Accountability Office (GAO)\ + \ found that the dramatic increase in oil and natural gas development on federal\ + \ lands over the past six years has stretched the staff of the BLM to a point\ + \ that it has been unable to meet its environmental protection responsibilities.\"\ + ,\"rankScore\":1.0,\"offset\":0,\"length\":295}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-08-01\"}}],\"keyPhraseExtractionTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:50.5445647Z\",\"taskName\":\"6\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"keyPhrases\":[\"SSN\",\"sentence\"\ + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"Brazilian CPF number\"\ + ,\"sentence\"],\"warnings\":[]},{\"id\":\"5\",\"keyPhrases\":[\"Government\ + \ Accountability Office\",\"natural gas development\",\"past six years\",\"\ + environmental protection responsibilities\",\"recent report\",\"dramatic increase\"\ + ,\"federal lands\",\"GAO\",\"oil\",\"staff\",\"BLM\",\"point\"],\"warnings\"\ + :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}},{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:41:51.5804408Z\",\"taskName\":\"11\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"keyPhrases\":[\"SSN\",\"sentence\"\ + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"Brazilian CPF number\"\ + ,\"sentence\"],\"warnings\":[]},{\"id\":\"5\",\"keyPhrases\":[\"Government\ + \ Accountability Office\",\"natural gas development\",\"past six years\",\"\ + environmental protection responsibilities\",\"recent report\",\"dramatic increase\"\ + ,\"federal lands\",\"GAO\",\"oil\",\"staff\",\"BLM\",\"point\"],\"warnings\"\ + :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}}],\"sentimentAnalysisTasks\"\ + :[{\"lastUpdateDateTime\":\"2021-10-07T23:42:01.0041001Z\",\"taskName\":\"\ + 0\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"id\":\"28\",\"\ + sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\"\ + :0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.0,\"neutral\":1.0,\"negative\":0.0},\"offset\":0,\"length\"\ + :22,\"text\":\"My SSN is 859-98-0987.\"},{\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.02,\"neutral\":0.9,\"negative\":0.08},\"offset\":23,\"length\"\ + :25,\"text\":\"Here is another sentence.\"}],\"warnings\":[]},{\"id\":\"3\"\ + ,\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\"\ + :0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.0,\"neutral\":1.0,\"negative\":0.0},\"offset\":0,\"length\"\ + :44,\"text\":\"Is 998.214.865-68 your Brazilian CPF number?\"},{\"sentiment\"\ + :\"neutral\",\"confidenceScores\":{\"positive\":0.02,\"neutral\":0.9,\"negative\"\ + :0.08},\"offset\":45,\"length\":25,\"text\":\"Here is another sentence.\"\ + }],\"warnings\":[]},{\"id\":\"5\",\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.23,\"neutral\":0.61,\"negative\":0.16},\"sentences\":[{\"\ + sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.23,\"neutral\"\ + :0.61,\"negative\":0.16},\"offset\":0,\"length\":295,\"text\":\"A recent report\ + \ by the Government Accountability Office (GAO) found that the dramatic increase\ + \ in oil and natural gas development on federal lands over the past six years\ + \ has stretched the staff of the BLM to a point that it has been unable to\ + \ meet its environmental protection responsibilities.\"}],\"warnings\":[]}],\"\ + errors\":[],\"modelVersion\":\"2020-04-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:41:55.5919878Z\"\ + ,\"taskName\":\"8\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"\ + neutral\":0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"neutral\"\ + ,\"confidenceScores\":{\"positive\":0.0,\"neutral\":1.0,\"negative\":0.0},\"\ + offset\":0,\"length\":22,\"text\":\"My SSN is 859-98-0987.\",\"targets\":[],\"\ + assessments\":[]},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\"\ + :0.02,\"neutral\":0.9,\"negative\":0.08},\"offset\":23,\"length\":25,\"text\"\ + :\"Here is another sentence.\",\"targets\":[],\"assessments\":[]}],\"warnings\"\ + :[]},{\"id\":\"3\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\"\ + :0.01,\"neutral\":0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"\ + neutral\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":1.0,\"negative\"\ + :0.0},\"offset\":0,\"length\":44,\"text\":\"Is 998.214.865-68 your Brazilian\ + \ CPF number?\",\"targets\":[],\"assessments\":[]},{\"sentiment\":\"neutral\"\ + ,\"confidenceScores\":{\"positive\":0.02,\"neutral\":0.9,\"negative\":0.08},\"\ + offset\":45,\"length\":25,\"text\":\"Here is another sentence.\",\"targets\"\ + :[],\"assessments\":[]}],\"warnings\":[]},{\"id\":\"5\",\"sentiment\":\"neutral\"\ + ,\"confidenceScores\":{\"positive\":0.23,\"neutral\":0.61,\"negative\":0.16},\"\ + sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\"\ + :0.23,\"neutral\":0.61,\"negative\":0.16},\"offset\":0,\"length\":295,\"text\"\ + :\"A recent report by the Government Accountability Office (GAO) found that\ + \ the dramatic increase in oil and natural gas development on federal lands\ + \ over the past six years has stretched the staff of the BLM to a point that\ + \ it has been unable to meet its environmental protection responsibilities.\"\ + ,\"targets\":[],\"assessments\":[]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2020-04-01\"}}]}}" + headers: + apim-request-id: + - d4247c88-dcf4-4dac-aed2-53df0f4478e3 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:42:05 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1001' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_of_same_action_with_partial_results.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_of_same_action_with_partial_results.yaml new file mode 100644 index 000000000000..57c4be616b45 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_of_same_action_with_partial_results.yaml @@ -0,0 +1,184 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [{"parameters": + {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, + "taskName": "1"}], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], + "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [{"parameters": + {"model-version": "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", + "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "0"}, {"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": + 5, "sortBy": "Offset"}, "taskName": "2"}], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "5", "text": "A recent report by the + Government Accountability Office (GAO) found that the dramatic increase in oil + and natural gas development on federal lands over the past six years has stretched + the staff of the BLM to a point that it has been unable to meet its environmental + protection responsibilities.", "language": "en"}, {"id": "2", "text": "", "language": + "en"}]}}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1176' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: + - 3bbd420f-7e91-4327-a413-3f4831d2a718 + date: + - Thu, 07 Oct 2021 23:42:07 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/bc5cc667-7a3d-4ce1-bde7-4943f2bd5ca3 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '394' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/bc5cc667-7a3d-4ce1-bde7-4943f2bd5ca3 + response: + body: + string: '{"jobId":"bc5cc667-7a3d-4ce1-bde7-4943f2bd5ca3","lastUpdateDateTime":"2021-10-07T23:42:07Z","createdDateTime":"2021-10-07T23:42:07Z","expirationDateTime":"2021-10-08T23:42:07Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":3,"total":3}}' + headers: + apim-request-id: + - 5d85e5f3-cbda-49fb-b34c-eabd0fa81072 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:42:12 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '9' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/bc5cc667-7a3d-4ce1-bde7-4943f2bd5ca3 + response: + body: + string: '{"jobId":"bc5cc667-7a3d-4ce1-bde7-4943f2bd5ca3","lastUpdateDateTime":"2021-10-07T23:42:16Z","createdDateTime":"2021-10-07T23:42:07Z","expirationDateTime":"2021-10-08T23:42:07Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":2,"total":3,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:16.4799137Z","taskName":"1","state":"succeeded","results":{"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"5","entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.96},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.93},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.9}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - d0878f94-3915-4b6b-8e70-ca979388f4b1 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:42:17 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '76' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/bc5cc667-7a3d-4ce1-bde7-4943f2bd5ca3 + response: + body: + string: '{"jobId":"bc5cc667-7a3d-4ce1-bde7-4943f2bd5ca3","lastUpdateDateTime":"2021-10-07T23:42:20Z","createdDateTime":"2021-10-07T23:42:07Z","expirationDateTime":"2021-10-08T23:42:07Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":0,"total":3,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:16.4799137Z","taskName":"1","state":"succeeded","results":{"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"5","entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.96},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.93},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.9}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:20.2399998Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"5","sentences":[{"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities.","rankScore":1.0,"offset":0,"length":295}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-08-01"}},{"lastUpdateDateTime":"2021-10-07T23:42:20.1526365Z","taskName":"2","state":"succeeded","results":{"documents":[{"id":"5","sentences":[{"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities.","rankScore":1.0,"offset":0,"length":295}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-08-01"}}]}}' + headers: + apim-request-id: + - 20afba51-5fee-4bb5-876a-33ff5850b8c8 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:42:22 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '187' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_pages_of_results_returned_successfully.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_pages_of_results_returned_successfully.yaml index 23eb38ed2268..5408a6a6aba4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_pages_of_results_returned_successfully.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_multiple_pages_of_results_returned_successfully.yaml @@ -1,25 +1,27 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "0", "text": "hello world", "language": "en"}, {"id": - "1", "text": "hello world", "language": "en"}, {"id": "2", "text": "hello world", - "language": "en"}, {"id": "3", "text": "hello world", "language": "en"}, {"id": - "4", "text": "hello world", "language": "en"}, {"id": "5", "text": "hello world", - "language": "en"}, {"id": "6", "text": "hello world", "language": "en"}, {"id": - "7", "text": "hello world", "language": "en"}, {"id": "8", "text": "hello world", - "language": "en"}, {"id": "9", "text": "hello world", "language": "en"}, {"id": - "10", "text": "hello world", "language": "en"}, {"id": "11", "text": "hello - world", "language": "en"}, {"id": "12", "text": "hello world", "language": "en"}, - {"id": "13", "text": "hello world", "language": "en"}, {"id": "14", "text": + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "hello world", "language": + "en"}, {"id": "1", "text": "hello world", "language": "en"}, {"id": "2", "text": + "hello world", "language": "en"}, {"id": "3", "text": "hello world", "language": + "en"}, {"id": "4", "text": "hello world", "language": "en"}, {"id": "5", "text": + "hello world", "language": "en"}, {"id": "6", "text": "hello world", "language": + "en"}, {"id": "7", "text": "hello world", "language": "en"}, {"id": "8", "text": + "hello world", "language": "en"}, {"id": "9", "text": "hello world", "language": + "en"}, {"id": "10", "text": "hello world", "language": "en"}, {"id": "11", "text": + "hello world", "language": "en"}, {"id": "12", "text": "hello world", "language": + "en"}, {"id": "13", "text": "hello world", "language": "en"}, {"id": "14", "text": "hello world", "language": "en"}, {"id": "15", "text": "hello world", "language": "en"}, {"id": "16", "text": "hello world", "language": "en"}, {"id": "17", "text": "hello world", "language": "en"}, {"id": "18", "text": "hello world", "language": @@ -36,23 +38,23 @@ interactions: Connection: - keep-alive Content-Length: - - '2218' + - '2433' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - f2e921c7-f115-4b34-bf2a-7394ec699c9b + - c79ca97c-5404-4d96-ba1b-a60783399b95 date: - - Mon, 02 Aug 2021 21:31:22 GMT + - Thu, 07 Oct 2021 23:42:23 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -60,7 +62,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '606' + - '1299' status: code: 202 message: Accepted @@ -74,73 +76,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?showStats=True response: body: - string: '{"jobId":"93090000-2b0e-4add-914c-78ba4241780c","lastUpdateDateTime":"2021-08-02T21:31:24Z","createdDateTime":"2021-08-02T21:31:22Z","expirationDateTime":"2021-08-03T21:31:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' - headers: - apim-request-id: - - c190e2ad-c885-4d34-a838-c7f75da5d887 - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 21:31:28 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-envoy-upstream-service-time: - - '9' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?showStats=True - response: - body: - string: '{"jobId":"93090000-2b0e-4add-914c-78ba4241780c","lastUpdateDateTime":"2021-08-02T21:31:32Z","createdDateTime":"2021-08-02T21:31:22Z","expirationDateTime":"2021-08-03T21:31:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":3,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.1614302Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:31.2963558Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.384961Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello - world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?$skip=20&$top=5&showStats=True"}' + string: '{"jobId":"a794e194-9ae5-4534-8bba-4e738c189838","lastUpdateDateTime":"2021-10-07T23:42:24Z","createdDateTime":"2021-10-07T23:42:23Z","expirationDateTime":"2021-10-08T23:42:23Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' headers: apim-request-id: - - 7753e58f-4d9f-4f32-8c1d-2754a65d4054 + - 197ae1f7-1b6f-46ee-bb22-3fe66c1b36eb content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:31:33 GMT + - Thu, 07 Oct 2021 23:42:29 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -148,7 +96,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '434' + - '10' status: code: 200 message: OK @@ -162,79 +110,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?showStats=True response: body: - string: '{"jobId":"93090000-2b0e-4add-914c-78ba4241780c","lastUpdateDateTime":"2021-08-02T21:31:38Z","createdDateTime":"2021-08-02T21:31:22Z","expirationDateTime":"2021-08-03T21:31:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.1614302Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:31.2963558Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.384961Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello - world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.2159509Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"3","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"5","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"6","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"7","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"8","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"9","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"10","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"11","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"12","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"13","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"14","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"15","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"16","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"17","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"18","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.014555Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"1","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"3","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"4","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"5","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"6","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"7","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"8","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"9","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"10","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"11","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"12","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"13","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"14","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"15","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"16","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"17","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"18","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?$skip=20&$top=5&showStats=True"}' + string: '{"jobId":"a794e194-9ae5-4534-8bba-4e738c189838","lastUpdateDateTime":"2021-10-07T23:42:30Z","createdDateTime":"2021-10-07T23:42:23Z","expirationDateTime":"2021-10-08T23:42:23Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' headers: apim-request-id: - - 2ad0305b-1818-4dd6-8829-d94205084dfd + - 818d7cd8-9e2e-4139-975b-32823cab817d content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:31:39 GMT + - Thu, 07 Oct 2021 23:42:34 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -242,7 +130,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '711' + - '8' status: code: 200 message: OK @@ -256,12 +144,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?showStats=True response: body: - string: '{"jobId":"93090000-2b0e-4add-914c-78ba4241780c","lastUpdateDateTime":"2021-08-02T21:31:38Z","createdDateTime":"2021-08-02T21:31:22Z","expirationDateTime":"2021-08-03T21:31:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.1614302Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:31.2963558Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.384961Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello + string: '{"jobId":"a794e194-9ae5-4534-8bba-4e738c189838","lastUpdateDateTime":"2021-10-07T23:42:38Z","createdDateTime":"2021-10-07T23:42:23Z","expirationDateTime":"2021-10-08T23:42:23Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":3,"total":6,"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.5531204Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.329959Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello @@ -281,7 +169,7 @@ interactions: world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.2159509Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello + world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:38.2241693Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"3","keyPhrases":["hello @@ -301,34 +189,14 @@ interactions: world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"17","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"18","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.014555Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"1","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"3","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"4","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"5","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"6","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"7","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"8","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"9","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"10","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"11","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"12","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"13","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"14","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"15","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"16","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"17","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"18","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?$skip=20&$top=5&showStats=True"}' + world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?$skip=20&$top=5&showStats=True"}' headers: apim-request-id: - - 22a6ae63-6d6d-4c9b-b591-559bb4b75fd0 + - dcd2cf61-6fe6-4356-ba27-0d3becd9aea8 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:31:44 GMT + - Thu, 07 Oct 2021 23:42:40 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -336,7 +204,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '693' + - '724' status: code: 200 message: OK @@ -350,12 +218,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?showStats=True response: body: - string: '{"jobId":"93090000-2b0e-4add-914c-78ba4241780c","lastUpdateDateTime":"2021-08-02T21:31:38Z","createdDateTime":"2021-08-02T21:31:22Z","expirationDateTime":"2021-08-03T21:31:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.1614302Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:31.2963558Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.384961Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello + string: '{"jobId":"a794e194-9ae5-4534-8bba-4e738c189838","lastUpdateDateTime":"2021-10-07T23:42:42Z","createdDateTime":"2021-10-07T23:42:23Z","expirationDateTime":"2021-10-08T23:42:23Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.5531204Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.329959Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello @@ -375,7 +243,7 @@ interactions: world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.2159509Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello + world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:38.2241693Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"3","keyPhrases":["hello @@ -395,7 +263,7 @@ interactions: world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"17","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"18","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.014555Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello + world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:42.2445153Z","taskName":"4","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"1","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"3","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello @@ -415,14 +283,14 @@ interactions: world"}],"warnings":[]},{"id":"17","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"18","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?$skip=20&$top=5&showStats=True"}' + world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?$skip=20&$top=5&showStats=True"}' headers: apim-request-id: - - f5145908-312a-4c9e-90e1-18d4a2dadef0 + - 656ecef9-7bf4-415b-96b1-27b751f03dc8 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:31:51 GMT + - Thu, 07 Oct 2021 23:42:46 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -430,7 +298,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '698' + - '1068' status: code: 200 message: OK @@ -444,12 +312,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?showStats=True response: body: - string: '{"jobId":"93090000-2b0e-4add-914c-78ba4241780c","lastUpdateDateTime":"2021-08-02T21:31:38Z","createdDateTime":"2021-08-02T21:31:22Z","expirationDateTime":"2021-08-03T21:31:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.1614302Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:31.2963558Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.384961Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello + string: '{"jobId":"a794e194-9ae5-4534-8bba-4e738c189838","lastUpdateDateTime":"2021-10-07T23:42:48Z","createdDateTime":"2021-10-07T23:42:23Z","expirationDateTime":"2021-10-08T23:42:23Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:48.3752273Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.5531204Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.329959Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello @@ -469,7 +337,7 @@ interactions: world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.2159509Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello + world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:38.2241693Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"3","keyPhrases":["hello @@ -489,7 +357,7 @@ interactions: world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"17","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"18","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.014555Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello + world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:42.2445153Z","taskName":"4","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"1","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"3","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello @@ -509,14 +377,14 @@ interactions: world"}],"warnings":[]},{"id":"17","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"18","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?$skip=20&$top=5&showStats=True"}' + world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?$skip=20&$top=5&showStats=True"}' headers: apim-request-id: - - e5d02b66-298c-4fb9-94b9-3acf1aacde28 + - b23fb705-13aa-4d64-b447-71f2cc0ac1c2 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:31:57 GMT + - Thu, 07 Oct 2021 23:42:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -524,7 +392,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '703' + - '1306' status: code: 200 message: OK @@ -538,12 +406,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?showStats=True response: body: - string: '{"jobId":"93090000-2b0e-4add-914c-78ba4241780c","lastUpdateDateTime":"2021-08-02T21:32:00Z","createdDateTime":"2021-08-02T21:31:22Z","expirationDateTime":"2021-08-03T21:31:22Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.1614302Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:31.2963558Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.384961Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello + string: '{"jobId":"a794e194-9ae5-4534-8bba-4e738c189838","lastUpdateDateTime":"2021-10-07T23:42:53Z","createdDateTime":"2021-10-07T23:42:23Z","expirationDateTime":"2021-10-08T23:42:23Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:48.3752273Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.5531204Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.329959Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello @@ -563,27 +431,7 @@ interactions: world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:00.0224503Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.2159509Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello + world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:53.6036308Z","taskName":"5","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:38.2241693Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"3","keyPhrases":["hello @@ -603,7 +451,7 @@ interactions: world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"17","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"18","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.014555Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello + world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:42.2445153Z","taskName":"4","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"1","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"3","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello @@ -623,14 +471,14 @@ interactions: world"}],"warnings":[]},{"id":"17","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"18","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?$skip=20&$top=5&showStats=True"}' + world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?$skip=20&$top=5&showStats=True"}' headers: apim-request-id: - - 175022da-4296-4d5b-bd7c-9efd9007e184 + - bdefdf20-586f-4b09-b80f-57314d7f228a content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:32:03 GMT + - Thu, 07 Oct 2021 23:42:59 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -638,7 +486,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '901' + - '1496' status: code: 200 message: OK @@ -652,27 +500,22 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/93090000-2b0e-4add-914c-78ba4241780c?showStats=true&$top=5&$skip=20 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a794e194-9ae5-4534-8bba-4e738c189838?showStats=true&$top=5&$skip=20 response: body: - string: '{"jobId":"93090000-2b0e-4add-914c-78ba4241780c","lastUpdateDateTime":"2021-08-02T21:32:00Z","createdDateTime":"2021-08-02T21:31:22Z","expirationDateTime":"2021-08-03T21:31:22Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.1614302Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"21","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"22","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"23","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"24","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:31.2963558Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"21","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"22","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"23","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"24","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:32.384961Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"redactedText":"hello + string: '{"jobId":"a794e194-9ae5-4534-8bba-4e738c189838","lastUpdateDateTime":"2021-10-07T23:42:53Z","createdDateTime":"2021-10-07T23:42:23Z","expirationDateTime":"2021-10-08T23:42:23Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:48.3752273Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"21","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"22","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"23","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"24","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.5531204Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"21","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"22","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"23","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"24","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:36.329959Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"redactedText":"hello world","id":"20","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"21","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"22","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"23","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"24","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:00.0224503Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"21","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"22","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"23","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"24","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.2159509Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","keyPhrases":["hello + world","id":"24","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:53.6036308Z","taskName":"5","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"21","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"22","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"23","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"24","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:38.2241693Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"21","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"22","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"23","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"24","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:31:38.014555Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello + world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:42:42.2445153Z","taskName":"4","state":"succeeded","results":{"statistics":{"documentsCount":5,"validDocumentsCount":5,"erroneousDocumentsCount":0,"transactionsCount":5},"documents":[{"id":"20","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"21","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"22","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"23","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello @@ -680,11 +523,11 @@ interactions: world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: apim-request-id: - - eea8500a-ec47-45b7-a828-9ecab1b3e645 + - f20359d4-fd18-45df-a59f-53e7946770a2 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:32:03 GMT + - Thu, 07 Oct 2021 23:43:00 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -692,7 +535,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '436' + - '653' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_out_of_order_ids_multiple_tasks.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_out_of_order_ids_multiple_tasks.yaml index 4a10ae024937..bacac50ef57c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_out_of_order_ids_multiple_tasks.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_out_of_order_ids_multiple_tasks.yaml @@ -1,18 +1,20 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "56", "text": ":)", "language": "en"}, {"id": "0", "text": - ":(", "language": "en"}, {"id": "19", "text": ":P", "language": "en"}, {"id": - "1", "text": ":D", "language": "en"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "56", "text": ":)", "language": + "en"}, {"id": "0", "text": ":(", "language": "en"}, {"id": "19", "text": ":P", + "language": "en"}, {"id": "1", "text": ":D", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -21,23 +23,23 @@ interactions: Connection: - keep-alive Content-Length: - - '1035' + - '1250' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - 8e8f2026-4b59-4ff7-a445-ea30f08eeb8a + - 8c018c8b-5265-4521-bd70-89e341154ab2 date: - - Mon, 02 Aug 2021 21:32:05 GMT + - Thu, 07 Oct 2021 23:43:01 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/24ccff39-99f7-44eb-ad15-f739b88cc2d0 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/38ceb190-50af-4347-b378-095735710ae6 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +47,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '426' + - '686' status: code: 202 message: Accepted @@ -59,19 +61,87 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/38ceb190-50af-4347-b378-095735710ae6 + response: + body: + string: '{"jobId":"38ceb190-50af-4347-b378-095735710ae6","lastUpdateDateTime":"2021-10-07T23:43:02Z","createdDateTime":"2021-10-07T23:43:01Z","expirationDateTime":"2021-10-08T23:43:01Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + headers: + apim-request-id: + - 8bba499d-e94a-4eb4-8107-55a13de63617 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:43:06 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '8' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/38ceb190-50af-4347-b378-095735710ae6 + response: + body: + string: '{"jobId":"38ceb190-50af-4347-b378-095735710ae6","lastUpdateDateTime":"2021-10-07T23:43:12Z","createdDateTime":"2021-10-07T23:43:01Z","expirationDateTime":"2021-10-08T23:43:01Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":5,"total":6,"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:12.3512285Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - 1b9b52e5-9aa4-4632-a61c-af3f732f84b5 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:43:11 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '241' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/24ccff39-99f7-44eb-ad15-f739b88cc2d0 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/38ceb190-50af-4347-b378-095735710ae6 response: body: - string: '{"jobId":"24ccff39-99f7-44eb-ad15-f739b88cc2d0","lastUpdateDateTime":"2021-08-02T21:32:07Z","createdDateTime":"2021-08-02T21:32:05Z","expirationDateTime":"2021-08-03T21:32:05Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + string: '{"jobId":"38ceb190-50af-4347-b378-095735710ae6","lastUpdateDateTime":"2021-10-07T23:43:17Z","createdDateTime":"2021-10-07T23:43:01Z","expirationDateTime":"2021-10-08T23:43:01Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:16.7495057Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:12.3512285Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:16.7193598Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:17.065272Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: apim-request-id: - - 9d1a08b5-36d4-432d-9b48-edae1bc119d6 + - bfbe953c-90ee-4f68-8b49-34ae23cc4f7f content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:32:11 GMT + - Thu, 07 Oct 2021 23:43:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -79,7 +149,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '13' + - '774' status: code: 200 message: OK @@ -93,19 +163,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/24ccff39-99f7-44eb-ad15-f739b88cc2d0 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/38ceb190-50af-4347-b378-095735710ae6 response: body: - string: '{"jobId":"24ccff39-99f7-44eb-ad15-f739b88cc2d0","lastUpdateDateTime":"2021-08-02T21:32:13Z","createdDateTime":"2021-08-02T21:32:05Z","expirationDateTime":"2021-08-03T21:32:05Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:12.6849312Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:13.0385961Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:12.814257Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:11.9047712Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + string: '{"jobId":"38ceb190-50af-4347-b378-095735710ae6","lastUpdateDateTime":"2021-10-07T23:43:21Z","createdDateTime":"2021-10-07T23:43:01Z","expirationDateTime":"2021-10-08T23:43:01Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:16.7495057Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:12.3512285Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:16.7193598Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:21.9574989Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"56","sentences":[],"warnings":[]},{"id":"0","sentences":[],"warnings":[]},{"id":"19","sentences":[],"warnings":[]},{"id":"1","sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:17.065272Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: apim-request-id: - - 25666d19-c85c-4518-a7f8-7b952b0f005c + - 69cc4ad6-27d5-49c0-b807-04558d936835 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:32:15 GMT + - Thu, 07 Oct 2021 23:43:23 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -113,7 +183,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '201' + - '385' status: code: 200 message: OK @@ -127,19 +197,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/24ccff39-99f7-44eb-ad15-f739b88cc2d0 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/38ceb190-50af-4347-b378-095735710ae6 response: body: - string: '{"jobId":"24ccff39-99f7-44eb-ad15-f739b88cc2d0","lastUpdateDateTime":"2021-08-02T21:32:17Z","createdDateTime":"2021-08-02T21:32:05Z","expirationDateTime":"2021-08-03T21:32:05Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:12.6849312Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:13.0385961Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:12.814257Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:17.8211152Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"documents":[{"id":"56","sentences":[{"text":":)","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"0","sentences":[{"text":":(","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"19","sentences":[{"text":":P","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"1","sentences":[{"text":":D","rankScore":1.0,"offset":0,"length":2}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:11.9047712Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:17.7229706Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' + string: '{"jobId":"38ceb190-50af-4347-b378-095735710ae6","lastUpdateDateTime":"2021-10-07T23:43:26Z","createdDateTime":"2021-10-07T23:43:01Z","expirationDateTime":"2021-10-08T23:43:01Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:16.7495057Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:12.3512285Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:16.7193598Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:21.9574989Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"56","sentences":[],"warnings":[]},{"id":"0","sentences":[],"warnings":[]},{"id":"19","sentences":[],"warnings":[]},{"id":"1","sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:17.065272Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:26.807498Z","taskName":"4","state":"succeeded","results":{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: apim-request-id: - - 0b68e9a1-b548-4694-9eeb-c903ca8ce8e5 + - d4ca067b-f737-449d-8a16-638d47255f14 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:32:22 GMT + - Thu, 07 Oct 2021 23:43:29 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -147,7 +217,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '309' + - '498' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_partial_success_for_actions.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_partial_success_for_actions.yaml index 63ee02a4f8c7..08d3e8532764 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_partial_success_for_actions.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_partial_success_for_actions.yaml @@ -1,12 +1,14 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [{"parameters": - {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}}], - "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": - false}}], "extractiveSummarizationTasks": []}, "analysisInput": {"documents": - [{"id": "1", "text": "I did not like the hotel we stayed at.", "language": "tr"}, - {"id": "2", "text": "I did not like the hotel we stayed at.", "language": "en"}]}}' + {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, + "taskName": "1"}], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], + "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false, "opinionMining": false}, "taskName": "0"}], "extractiveSummarizationTasks": + [], "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], + "customMultiClassificationTasks": []}, "analysisInput": {"documents": [{"id": + "1", "text": "I did not like the hotel we stayed at.", "language": "tr"}, {"id": + "2", "text": "I did not like the hotel we stayed at.", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -15,23 +17,23 @@ interactions: Connection: - keep-alive Content-Length: - - '590' + - '737' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - af1c16ae-8b8b-499f-8971-70e7d62df46d + - 2c80ce03-68fb-446e-b63d-da9c6d758b38 date: - - Mon, 02 Aug 2021 21:32:22 GMT + - Thu, 07 Oct 2021 23:43:29 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/aca87abf-123c-4418-89f1-b0d84d10cc9b + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/070567ec-e003-4d4d-84c4-5db891edcf01 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '166' + - '260' status: code: 202 message: Accepted @@ -53,19 +55,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/aca87abf-123c-4418-89f1-b0d84d10cc9b + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/070567ec-e003-4d4d-84c4-5db891edcf01 response: body: - string: '{"jobId":"aca87abf-123c-4418-89f1-b0d84d10cc9b","lastUpdateDateTime":"2021-08-02T21:32:24Z","createdDateTime":"2021-08-02T21:32:22Z","expirationDateTime":"2021-08-03T21:32:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":2,"total":2}}' + string: '{"jobId":"070567ec-e003-4d4d-84c4-5db891edcf01","lastUpdateDateTime":"2021-10-07T23:43:30Z","createdDateTime":"2021-10-07T23:43:29Z","expirationDateTime":"2021-10-08T23:43:29Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":2,"total":2}}' headers: apim-request-id: - - 882bf8ea-b5cd-437f-b149-b58ccff3eef1 + - 3843786a-a758-47ea-8a9c-13b74293052e content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:32:28 GMT + - Thu, 07 Oct 2021 23:43:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -73,7 +75,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '14' + - '10' status: code: 200 message: OK @@ -87,25 +89,139 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/aca87abf-123c-4418-89f1-b0d84d10cc9b + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/070567ec-e003-4d4d-84c4-5db891edcf01 response: body: - string: '{"jobId":"aca87abf-123c-4418-89f1-b0d84d10cc9b","lastUpdateDateTime":"2021-08-02T21:32:31Z","createdDateTime":"2021-08-02T21:32:22Z","expirationDateTime":"2021-08-03T21:32:22Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":2,"failed":0,"inProgress":0,"total":2,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:31.211693Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"I + string: '{"jobId":"070567ec-e003-4d4d-84c4-5db891edcf01","lastUpdateDateTime":"2021-10-07T23:43:37Z","createdDateTime":"2021-10-07T23:43:29Z","expirationDateTime":"2021-10-08T23:43:29Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":1,"total":2,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:37.3152811Z","taskName":"1","state":"succeeded","results":{"documents":[{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. - For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:29.7298876Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.55,"negative":0.39},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.55,"negative":0.39},"offset":0,"length":38,"text":"I + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - 0b4a118a-7ac8-45f9-a2da-3e629c7100d6 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:43:39 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '82' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/070567ec-e003-4d4d-84c4-5db891edcf01 + response: + body: + string: '{"jobId":"070567ec-e003-4d4d-84c4-5db891edcf01","lastUpdateDateTime":"2021-10-07T23:43:37Z","createdDateTime":"2021-10-07T23:43:29Z","expirationDateTime":"2021-10-08T23:43:29Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":1,"total":2,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:37.3152811Z","taskName":"1","state":"succeeded","results":{"documents":[{"redactedText":"I + did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - 6eb85911-2b68-49c8-897a-7875de7eb210 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:43:45 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '118' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/070567ec-e003-4d4d-84c4-5db891edcf01 + response: + body: + string: '{"jobId":"070567ec-e003-4d4d-84c4-5db891edcf01","lastUpdateDateTime":"2021-10-07T23:43:37Z","createdDateTime":"2021-10-07T23:43:29Z","expirationDateTime":"2021-10-08T23:43:29Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":1,"total":2,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:37.3152811Z","taskName":"1","state":"succeeded","results":{"documents":[{"redactedText":"I + did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: + - 356a38f2-01f4-4668-8455-71fd3d092f5b + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:43:50 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '70' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/070567ec-e003-4d4d-84c4-5db891edcf01 + response: + body: + string: '{"jobId":"070567ec-e003-4d4d-84c4-5db891edcf01","lastUpdateDateTime":"2021-10-07T23:43:54Z","createdDateTime":"2021-10-07T23:43:29Z","expirationDateTime":"2021-10-08T23:43:29Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":2,"failed":0,"inProgress":0,"total":2,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:37.3152811Z","taskName":"1","state":"succeeded","results":{"documents":[{"redactedText":"I + did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:54.8484842Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.55,"negative":0.39},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.55,"negative":0.39},"offset":0,"length":38,"text":"I did not like the hotel we stayed at."}],"warnings":[]},{"id":"2","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.45,"negative":0.54},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.45,"negative":0.54},"offset":0,"length":38,"text":"I did not like the hotel we stayed at."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: apim-request-id: - - a654639d-75dd-4e77-b12b-f6c5192c0759 + - 836f6963-ac3b-432d-ac32-9d4217108f05 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:32:33 GMT + - Thu, 07 Oct 2021 23:43:55 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -113,7 +229,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '72' + - '199' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_pass_cls.yaml index c75280436679..e621dd6fcfd6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_pass_cls.yaml @@ -1,11 +1,12 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": - [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": []}, "analysisInput": - {"documents": [{"id": "0", "text": "Test passing cls to endpoint", "language": - "en"}]}}' + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": + [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "Test passing cls to + endpoint", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -14,23 +15,23 @@ interactions: Connection: - keep-alive Content-Length: - - '409' + - '539' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - 5c26bcdc-5f1b-4b15-8a47-2d95f1f6ab0b + - bbd141a5-b8fb-49f5-bdfa-be382bcdea67 date: - - Mon, 02 Aug 2021 21:32:33 GMT + - Thu, 07 Oct 2021 23:43:56 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/c1a617ab-ebc7-4bd3-b81f-6a921aa1ffc2 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/7c259102-270e-4f34-af9d-130c44782743 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '84' + - '544' status: code: 202 message: Accepted @@ -52,19 +53,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/c1a617ab-ebc7-4bd3-b81f-6a921aa1ffc2 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/7c259102-270e-4f34-af9d-130c44782743 response: body: - string: '{"jobId":"c1a617ab-ebc7-4bd3-b81f-6a921aa1ffc2","lastUpdateDateTime":"2021-08-02T21:32:34Z","createdDateTime":"2021-08-02T21:32:33Z","expirationDateTime":"2021-08-03T21:32:33Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"7c259102-270e-4f34-af9d-130c44782743","lastUpdateDateTime":"2021-10-07T23:43:58Z","createdDateTime":"2021-10-07T23:43:56Z","expirationDateTime":"2021-10-08T23:43:56Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:43:58.4583892Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"Test","category":"Skill","offset":0,"length":4,"confidenceScore":0.97},{"text":"cls","category":"Skill","offset":13,"length":3,"confidenceScore":0.82}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: apim-request-id: - - 8198b38a-650f-4d6c-809f-1d1a7de36081 + - af8e5480-1c89-4250-ab36-66401649aa83 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:32:39 GMT + - Thu, 07 Oct 2021 23:44:01 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -72,41 +73,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/c1a617ab-ebc7-4bd3-b81f-6a921aa1ffc2 - response: - body: - string: '{"jobId":"c1a617ab-ebc7-4bd3-b81f-6a921aa1ffc2","lastUpdateDateTime":"2021-08-02T21:32:41Z","createdDateTime":"2021-08-02T21:32:33Z","expirationDateTime":"2021-08-03T21:32:33Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:41.1852682Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"Test","category":"Skill","offset":0,"length":4,"confidenceScore":0.97},{"text":"cls","category":"Skill","offset":13,"length":3,"confidenceScore":0.82}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' - headers: - apim-request-id: - - a650b611-a504-4efb-a450-649f780101c0 - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 21:32:43 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-envoy-upstream-service-time: - - '35' + - '87' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_pii_action_categories_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_pii_action_categories_filter.yaml index b07c5adcaf62..d7759c249ebd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_pii_action_categories_filter.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_pii_action_categories_filter.yaml @@ -2,9 +2,11 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": true, "piiCategories": ["USSocialSecurityNumber", - "ABARoutingNumber"], "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": - []}, "analysisInput": {"documents": [{"id": "1", "text": "My SSN is 859-98-0987.", + "ABARoutingNumber"], "stringIndexType": "UnicodeCodePoint"}, "taskName": "0"}], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "1", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": @@ -17,23 +19,23 @@ interactions: Connection: - keep-alive Content-Length: - - '702' + - '832' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - d1ef1468-d38e-4136-9d81-788d6f9f005a + - 64f413a4-4665-4446-9459-4a62ad36fa0f date: - - Mon, 02 Aug 2021 21:32:44 GMT + - Thu, 07 Oct 2021 23:44:01 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/e4464f16-0a8a-453c-89bf-2e391e1dc4ff + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/e399d85d-e759-425e-8a90-e362bfef6e01 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '119' + - '188' status: code: 202 message: Accepted @@ -55,57 +57,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/e4464f16-0a8a-453c-89bf-2e391e1dc4ff + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/e399d85d-e759-425e-8a90-e362bfef6e01 response: body: - string: '{"jobId":"e4464f16-0a8a-453c-89bf-2e391e1dc4ff","lastUpdateDateTime":"2021-08-02T21:32:46Z","createdDateTime":"2021-08-02T21:32:44Z","expirationDateTime":"2021-08-03T21:32:44Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' - headers: - apim-request-id: - - b25ae19a-2f54-456d-8467-21ccb43ca382 - content-type: - - application/json; charset=utf-8 - date: - - Mon, 02 Aug 2021 21:32:50 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - transfer-encoding: - - chunked - x-content-type-options: - - nosniff - x-envoy-upstream-service-time: - - '8' - status: - code: 200 - message: OK -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/e4464f16-0a8a-453c-89bf-2e391e1dc4ff - response: - body: - string: '{"jobId":"e4464f16-0a8a-453c-89bf-2e391e1dc4ff","lastUpdateDateTime":"2021-08-02T21:32:52Z","createdDateTime":"2021-08-02T21:32:44Z","expirationDateTime":"2021-08-03T21:32:44Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:32:52.2346395Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"My + string: '{"jobId":"e399d85d-e759-425e-8a90-e362bfef6e01","lastUpdateDateTime":"2021-10-07T23:44:04Z","createdDateTime":"2021-10-07T23:44:02Z","expirationDateTime":"2021-10-08T23:44:02Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:04.7479419Z","taskName":"0","state":"succeeded","results":{"documents":[{"redactedText":"My SSN is ***********.","id":"1","entities":[{"text":"859-98-0987","category":"USSocialSecurityNumber","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"redactedText":"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.","id":"2","entities":[{"text":"111000025","category":"ABARoutingNumber","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"redactedText":"Is 998.214.865-68 your Brazilian CPF number?","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}]}}' headers: apim-request-id: - - 60bc8d48-2d62-47de-981d-4414a10ee903 + - f256aafa-ac27-4e55-8caf-0428e49563fb content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:32:55 GMT + - Thu, 07 Oct 2021 23:44:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -113,7 +81,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '46' + - '311' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_poller_metadata.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_poller_metadata.yaml index 428ff095e51d..d4f86e283f62 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_poller_metadata.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_poller_metadata.yaml @@ -1,10 +1,12 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": - [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": []}, "analysisInput": - {"documents": [{"id": "56", "text": ":)", "language": "en"}]}}' + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": + [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "56", "text": ":)", "language": + "en"}]}}' headers: Accept: - application/json, text/json @@ -13,23 +15,23 @@ interactions: Connection: - keep-alive Content-Length: - - '384' + - '514' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - 17a76bb7-8bf6-4913-b610-250a48a19f20 + - ae80939d-9ac4-4628-8b12-1a401627cefa date: - - Mon, 02 Aug 2021 21:32:55 GMT + - Thu, 21 Oct 2021 22:27:15 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/484b15b3-3548-42d6-9c75-92610ef869f2 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/924b16fb-99ac-48ca-ac98-addcbd1be21f strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '88' + - '219' status: code: 202 message: Accepted @@ -51,19 +53,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/484b15b3-3548-42d6-9c75-92610ef869f2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/924b16fb-99ac-48ca-ac98-addcbd1be21f?showStats=True response: body: - string: '{"jobId":"484b15b3-3548-42d6-9c75-92610ef869f2","lastUpdateDateTime":"2021-08-02T21:32:57Z","createdDateTime":"2021-08-02T21:32:56Z","expirationDateTime":"2021-08-03T21:32:56Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"924b16fb-99ac-48ca-ac98-addcbd1be21f","lastUpdateDateTime":"2021-10-21T22:27:15Z","createdDateTime":"2021-10-21T22:27:15Z","expirationDateTime":"2021-10-22T22:27:15Z","status":"running","errors":[],"tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - bbbf415f-daed-4b83-95b0-c9d90c47e940 + - 315a3846-71e6-4b6d-9556-e22090af80de content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:33:01 GMT + - Thu, 21 Oct 2021 22:27:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -71,7 +73,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '8' status: code: 200 message: OK @@ -85,19 +87,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/484b15b3-3548-42d6-9c75-92610ef869f2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/924b16fb-99ac-48ca-ac98-addcbd1be21f?showStats=True response: body: - string: '{"jobId":"484b15b3-3548-42d6-9c75-92610ef869f2","lastUpdateDateTime":"2021-08-02T21:33:02Z","createdDateTime":"2021-08-02T21:32:56Z","expirationDateTime":"2021-08-03T21:32:56Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:33:02.6312201Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + string: '{"jobId":"924b16fb-99ac-48ca-ac98-addcbd1be21f","lastUpdateDateTime":"2021-10-21T22:27:22Z","createdDateTime":"2021-10-21T22:27:15Z","expirationDateTime":"2021-10-22T22:27:15Z","status":"succeeded","errors":[],"tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-21T22:27:22.5613392Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: apim-request-id: - - 3aff340d-c42a-4b40-a949-74ce3b1f56ba + - d8015601-abe7-454f-a101-c3738c564a91 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:33:06 GMT + - Thu, 21 Oct 2021 22:27:25 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -105,7 +107,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '39' + - '67' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_recognize_custom_entities.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_recognize_custom_entities.yaml new file mode 100644 index 000000000000..2ac660b12d05 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_recognize_custom_entities.yaml @@ -0,0 +1,93 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [{"parameters": + {"project-name": "textanalytics_custom_entities_project_name", "deployment-name": + "textanalytics_custom_entities_project_name"}, "taskName": "0"}], "customSingleClassificationTasks": + [], "customMultiClassificationTasks": []}, "analysisInput": {"documents": [{"id": + "1", "text": "A recent report by the Government Accountability Office (GAO) + found that the dramatic increase in oil and natural gas development on federal + lands over the past six years has stretched the staff of the BLM to a point + that it has been unable to meet its environmental protection responsibilities.", + "language": "en"}, {"id": "2", "text": "David Schmidt, senior vice president--Food + Safety, International Food Information Council (IFIC), Washington, D.C., discussed + the physical activity component.", "language": "en"}, {"id": "3", "text": "I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1196' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: + - 28f60fbf-2652-416e-8794-6b852a231568 + date: + - Thu, 07 Oct 2021 23:44:14 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/27fd50ac-754f-4c31-9f5e-ba252d89f20c + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '763' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/27fd50ac-754f-4c31-9f5e-ba252d89f20c?showStats=True + response: + body: + string: '{"jobId":"27fd50ac-754f-4c31-9f5e-ba252d89f20c","lastUpdateDateTime":"2021-10-07T23:44:18Z","createdDateTime":"2021-10-07T23:44:14Z","expirationDateTime":"2021-10-08T23:44:14Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:18.3570988Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government","category":"restaurant_name","offset":23,"length":10,"confidenceScore":0.05},{"text":"Office","category":"restaurant_name","offset":49,"length":6,"confidenceScore":0.11},{"text":"GAO","category":"restaurant_name","offset":57,"length":3,"confidenceScore":0.04},{"text":"Accountability","category":"geographic_poi","offset":34,"length":14,"confidenceScore":0.07},{"text":"natural","category":"geographic_poi","offset":106,"length":7,"confidenceScore":0.04},{"text":"dramatic","category":"sort","offset":77,"length":8,"confidenceScore":0.03},{"text":"oil","category":"restaurant_type","offset":98,"length":3,"confidenceScore":0.03},{"text":"gas","category":"restaurant_type","offset":114,"length":3,"confidenceScore":0.09},{"text":"and","category":"served_dish","offset":102,"length":3,"confidenceScore":0.07},{"text":"development","category":"object_type","offset":118,"length":11,"confidenceScore":0.06},{"text":"federal","category":"state","offset":133,"length":7,"confidenceScore":0.07},{"text":"protection","category":"state","offset":267,"length":10,"confidenceScore":0.05},{"text":"lands","category":"poi","offset":141,"length":5,"confidenceScore":0.04},{"text":"BLM","category":"poi","offset":202,"length":3,"confidenceScore":0.07},{"text":"the","category":"timeRange","offset":152,"length":3,"confidenceScore":0.24},{"text":"past + six years","category":"timeRange","offset":156,"length":14,"confidenceScore":0.54}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"artist","offset":0,"length":13,"confidenceScore":0.8},{"text":"Food","category":"service","offset":38,"length":4,"confidenceScore":0.03},{"text":"Safety","category":"geographic_poi","offset":43,"length":6,"confidenceScore":0.06},{"text":"International + Food","category":"geographic_poi","offset":51,"length":18,"confidenceScore":0.07},{"text":"IFIC","category":"geographic_poi","offset":91,"length":4,"confidenceScore":0.05},{"text":"Information + Council","category":"restaurant_name","offset":70,"length":19,"confidenceScore":0.1},{"text":"Washington, + D.C.","category":"state","offset":98,"length":16,"confidenceScore":0.49}],"warnings":[]},{"id":"3","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"facility","offset":28,"length":6,"confidenceScore":0.57},{"text":"restaurant","category":"restaurant_type","offset":35,"length":10,"confidenceScore":0.95},{"text":"China","category":"country","offset":49,"length":5,"confidenceScore":0.48},{"text":"music","category":"music_item","offset":78,"length":5,"confidenceScore":0.63},{"text":"my","category":"playlist_owner","offset":110,"length":2,"confidenceScore":0.84}],"warnings":[]}],"errors":[],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}]}}' + headers: + apim-request-id: + - c13741e8-429e-4a22-822b-9729324ec4a4 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:44:18 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '86' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_sentiment_analysis_task_with_opinion_mining.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_sentiment_analysis_task_with_opinion_mining.yaml index 479d88e641df..3a6038ff393b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_sentiment_analysis_task_with_opinion_mining.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_sentiment_analysis_task_with_opinion_mining.yaml @@ -3,10 +3,11 @@ interactions: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": - true}}], "extractiveSummarizationTasks": []}, "analysisInput": {"documents": - [{"id": "0", "text": "It has a sleek premium aluminum design that makes it beautiful - to look at.", "language": "en"}, {"id": "1", "text": "The food and service is - not good", "language": "en"}]}}' + true}, "taskName": "0"}], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "It has a sleek premium + aluminum design that makes it beautiful to look at.", "language": "en"}, {"id": + "1", "text": "The food and service is not good", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -15,23 +16,23 @@ interactions: Connection: - keep-alive Content-Length: - - '514' + - '644' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - 07e774c2-7f90-45bb-98c2-74d4d5d416aa + - 08c0dae7-ae9e-4c42-ae69-c691d28f60bd date: - - Mon, 02 Aug 2021 21:33:07 GMT + - Thu, 07 Oct 2021 23:44:19 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/b2a6c132-9ec6-49d8-bbcb-0dbd66410fb7 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/ce624af3-418a-4051-8f75-020cc7bd0f6b strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '113' + - '327' status: code: 202 message: Accepted @@ -53,19 +54,87 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/b2a6c132-9ec6-49d8-bbcb-0dbd66410fb7?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/ce624af3-418a-4051-8f75-020cc7bd0f6b?showStats=True response: body: - string: '{"jobId":"b2a6c132-9ec6-49d8-bbcb-0dbd66410fb7","lastUpdateDateTime":"2021-08-02T21:33:07Z","createdDateTime":"2021-08-02T21:33:07Z","expirationDateTime":"2021-08-03T21:33:07Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"ce624af3-418a-4051-8f75-020cc7bd0f6b","lastUpdateDateTime":"2021-10-07T23:44:20Z","createdDateTime":"2021-10-07T23:44:20Z","expirationDateTime":"2021-10-08T23:44:20Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: apim-request-id: - - 46d868a0-ffbd-4867-8d6c-a6fb922a3eef + - 76fccd8f-c564-4f0c-876e-706634cba873 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:33:12 GMT + - Thu, 07 Oct 2021 23:44:24 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '9' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/ce624af3-418a-4051-8f75-020cc7bd0f6b?showStats=True + response: + body: + string: '{"jobId":"ce624af3-418a-4051-8f75-020cc7bd0f6b","lastUpdateDateTime":"2021-10-07T23:44:20Z","createdDateTime":"2021-10-07T23:44:20Z","expirationDateTime":"2021-10-08T23:44:20Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: + - 1c547caf-bea0-412f-b727-6087953e9791 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:44:29 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '29' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/ce624af3-418a-4051-8f75-020cc7bd0f6b?showStats=True + response: + body: + string: '{"jobId":"ce624af3-418a-4051-8f75-020cc7bd0f6b","lastUpdateDateTime":"2021-10-07T23:44:20Z","createdDateTime":"2021-10-07T23:44:20Z","expirationDateTime":"2021-10-08T23:44:20Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: + - 6300e29e-064a-4b8a-9135-097bda662c94 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:44:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -87,21 +156,55 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/ce624af3-418a-4051-8f75-020cc7bd0f6b?showStats=True + response: + body: + string: '{"jobId":"ce624af3-418a-4051-8f75-020cc7bd0f6b","lastUpdateDateTime":"2021-10-07T23:44:20Z","createdDateTime":"2021-10-07T23:44:20Z","expirationDateTime":"2021-10-08T23:44:20Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: + - 2063a48f-4ac4-4888-a07d-b65aefb5c4f0 + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:44:40 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '15' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/b2a6c132-9ec6-49d8-bbcb-0dbd66410fb7?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/ce624af3-418a-4051-8f75-020cc7bd0f6b?showStats=True response: body: - string: '{"jobId":"b2a6c132-9ec6-49d8-bbcb-0dbd66410fb7","lastUpdateDateTime":"2021-08-02T21:33:13Z","createdDateTime":"2021-08-02T21:33:07Z","expirationDateTime":"2021-08-03T21:33:07Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:33:13.2322908Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"0","sentiment":"positive","statistics":{"charactersCount":74,"transactionsCount":1},"confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"offset":0,"length":74,"text":"It + string: '{"jobId":"ce624af3-418a-4051-8f75-020cc7bd0f6b","lastUpdateDateTime":"2021-10-07T23:44:42Z","createdDateTime":"2021-10-07T23:44:20Z","expirationDateTime":"2021-10-08T23:44:20Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:42.3690987Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"0","sentiment":"positive","statistics":{"charactersCount":74,"transactionsCount":1},"confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"offset":0,"length":74,"text":"It has a sleek premium aluminum design that makes it beautiful to look at.","targets":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":32,"length":6,"text":"design","relations":[{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/0"},{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/1"}]}],"assessments":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":9,"length":5,"text":"sleek","isNegated":false},{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":15,"length":7,"text":"premium","isNegated":false}]}],"warnings":[]},{"id":"1","sentiment":"negative","statistics":{"charactersCount":32,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":0,"length":32,"text":"The food and service is not good","targets":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":4,"length":4,"text":"food","relations":[{"relationType":"assessment","ref":"#/documents/1/sentences/0/assessments/0"}]},{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":13,"length":7,"text":"service","relations":[{"relationType":"assessment","ref":"#/documents/1/sentences/0/assessments/0"}]}],"assessments":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":28,"length":4,"text":"good","isNegated":true}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: apim-request-id: - - d9da7c16-228c-49db-b879-cb653b33b4e1 + - fb9034a6-abcf-49e4-9847-e131c9ffac5b content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:33:17 GMT + - Thu, 07 Oct 2021 23:44:45 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -109,7 +212,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '59' + - '140' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_show_stats_and_model_version_multiple_tasks.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_show_stats_and_model_version_multiple_tasks.yaml index ddcaa7548bc8..ee884449d539 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_show_stats_and_model_version_multiple_tasks.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_show_stats_and_model_version_multiple_tasks.yaml @@ -1,18 +1,20 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "56", "text": ":)", "language": "en"}, {"id": "0", "text": - ":(", "language": "en"}, {"id": "19", "text": ":P", "language": "en"}, {"id": - "1", "text": ":D", "language": "en"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "56", "text": ":)", "language": + "en"}, {"id": "0", "text": ":(", "language": "en"}, {"id": "19", "text": ":P", + "language": "en"}, {"id": "1", "text": ":D", "language": "en"}]}}' headers: Accept: - application/json, text/json @@ -21,23 +23,23 @@ interactions: Connection: - keep-alive Content-Length: - - '1035' + - '1250' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: apim-request-id: - - a928a82d-1093-458c-875c-4f8b9a8ea346 + - e58ad77a-99f2-437f-9adf-f21d50c66cce date: - - Mon, 02 Aug 2021 21:33:18 GMT + - Thu, 07 Oct 2021 23:44:46 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/edef5b8a-d216-4ab5-b256-7a260ce75d93 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/b1900ff0-f6f2-47b9-879e-09c76b63e19d strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +47,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '313' + - '603' status: code: 202 message: Accepted @@ -59,19 +61,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/edef5b8a-d216-4ab5-b256-7a260ce75d93?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/b1900ff0-f6f2-47b9-879e-09c76b63e19d?showStats=True response: body: - string: '{"jobId":"edef5b8a-d216-4ab5-b256-7a260ce75d93","lastUpdateDateTime":"2021-08-02T21:33:19Z","createdDateTime":"2021-08-02T21:33:18Z","expirationDateTime":"2021-08-03T21:33:18Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + string: '{"jobId":"b1900ff0-f6f2-47b9-879e-09c76b63e19d","lastUpdateDateTime":"2021-10-07T23:44:46Z","createdDateTime":"2021-10-07T23:44:46Z","expirationDateTime":"2021-10-08T23:44:46Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' headers: apim-request-id: - - 73c8dfd7-e2d7-4d76-b9e7-151351cddc92 + - a8671373-ce85-4c69-8b91-7d279bf3c5b2 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:33:23 GMT + - Thu, 07 Oct 2021 23:44:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -93,19 +95,121 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/b1900ff0-f6f2-47b9-879e-09c76b63e19d?showStats=True + response: + body: + string: '{"jobId":"b1900ff0-f6f2-47b9-879e-09c76b63e19d","lastUpdateDateTime":"2021-10-07T23:44:56Z","createdDateTime":"2021-10-07T23:44:46Z","expirationDateTime":"2021-10-08T23:44:46Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":2,"failed":0,"inProgress":4,"total":6,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:54.8394718Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:56.9054048Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - d04e2883-4e87-48b4-ac7a-3541932bf82c + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:44:57 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '176' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/b1900ff0-f6f2-47b9-879e-09c76b63e19d?showStats=True + response: + body: + string: '{"jobId":"b1900ff0-f6f2-47b9-879e-09c76b63e19d","lastUpdateDateTime":"2021-10-07T23:45:00Z","createdDateTime":"2021-10-07T23:44:46Z","expirationDateTime":"2021-10-08T23:44:46Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":3,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:45:00.815066Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:54.8394718Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:56.9054048Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - fa124770-a332-40c1-b603-ecc62162c9db + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:45:02 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '296' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/b1900ff0-f6f2-47b9-879e-09c76b63e19d?showStats=True + response: + body: + string: '{"jobId":"b1900ff0-f6f2-47b9-879e-09c76b63e19d","lastUpdateDateTime":"2021-10-07T23:45:07Z","createdDateTime":"2021-10-07T23:44:46Z","expirationDateTime":"2021-10-08T23:44:46Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:45:00.815066Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:54.8394718Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:45:07.4710598Z","taskName":"5","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:56.9054048Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: + - 7f6236b7-4bbf-4501-ae69-26ab0abdc91e + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:45:07 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '310' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/edef5b8a-d216-4ab5-b256-7a260ce75d93?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/b1900ff0-f6f2-47b9-879e-09c76b63e19d?showStats=True response: body: - string: '{"jobId":"edef5b8a-d216-4ab5-b256-7a260ce75d93","lastUpdateDateTime":"2021-08-02T21:33:26Z","createdDateTime":"2021-08-02T21:33:18Z","expirationDateTime":"2021-08-03T21:33:18Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:33:26.3701056Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:33:25.1769704Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:33:26.4006197Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:33:24.8847047Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[{"text":":)","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[{"text":":(","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[{"text":":P","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[{"text":":D","rankScore":1.0,"offset":0,"length":2}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:33:25.0969318Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:33:24.8714913Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' + string: '{"jobId":"b1900ff0-f6f2-47b9-879e-09c76b63e19d","lastUpdateDateTime":"2021-10-07T23:45:12Z","createdDateTime":"2021-10-07T23:44:46Z","expirationDateTime":"2021-10-08T23:44:46Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:45:00.815066Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:45:12.0977615Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:54.8394718Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:45:07.4710598Z","taskName":"5","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:44:56.9054048Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:45:10.2728918Z","taskName":"4","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: apim-request-id: - - 67c9efa2-adcb-43f3-8ec1-69ad6c3a40cd + - 7b76b088-ed01-448b-bcf5-31af08eb8c5e content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:33:29 GMT + - Thu, 07 Oct 2021 23:45:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -113,7 +217,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '279' + - '522' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_single_category_classify.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_single_category_classify.yaml new file mode 100644 index 000000000000..23aa00d1b814 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_single_category_classify.yaml @@ -0,0 +1,88 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [{"parameters": {"project-name": "single_category_classify_project_name", + "deployment-name": "single_category_classify_project_name"}, "taskName": "0"}], + "customMultiClassificationTasks": []}, "analysisInput": {"documents": [{"id": + "1", "text": "A recent report by the Government Accountability Office (GAO) + found that the dramatic increase in oil and natural gas development on federal + lands over the past six years has stretched the staff of the BLM to a point + that it has been unable to meet its environmental protection responsibilities.", + "language": "en"}, {"id": "2", "text": "David Schmidt, senior vice president--Food + Safety, International Food Information Council (IFIC), Washington, D.C., discussed + the physical activity component.", "language": "en"}, {"id": "3", "text": "I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '1196' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: + - 0973987b-0b20-4fe8-b95a-d361f0e481f5 + date: + - Thu, 07 Oct 2021 23:45:14 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/55f176a9-e2d9-469a-9629-31609def892c + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '800' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/55f176a9-e2d9-469a-9629-31609def892c?showStats=True + response: + body: + string: '{"jobId":"55f176a9-e2d9-469a-9629-31609def892c","lastUpdateDateTime":"2021-10-07T23:45:15Z","createdDateTime":"2021-10-07T23:45:14Z","expirationDateTime":"2021-10-08T23:45:14Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:45:15.6282742Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","classification":{"category":"RateBook","confidenceScore":0.76},"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","classification":{"category":"RateBook","confidenceScore":0.57},"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"3","classification":{"category":"BookRestaurant","confidenceScore":1.0},"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}]}}' + headers: + apim-request-id: + - cfc6675d-4d34-4f29-a93b-eefe1c74817b + content-type: + - application/json; charset=utf-8 + date: + - Thu, 07 Oct 2021 23:45:19 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '94' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_too_many_documents.yaml index 325161c736f6..ed649cedd4b6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze.test_too_many_documents.yaml @@ -1,23 +1,25 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "0", "text": "input document", "language": "en"}, {"id": - "1", "text": "input document", "language": "en"}, {"id": "2", "text": "input - document", "language": "en"}, {"id": "3", "text": "input document", "language": - "en"}, {"id": "4", "text": "input document", "language": "en"}, {"id": "5", - "text": "input document", "language": "en"}, {"id": "6", "text": "input document", - "language": "en"}, {"id": "7", "text": "input document", "language": "en"}, - {"id": "8", "text": "input document", "language": "en"}, {"id": "9", "text": - "input document", "language": "en"}, {"id": "10", "text": "input document", + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "input document", "language": + "en"}, {"id": "1", "text": "input document", "language": "en"}, {"id": "2", + "text": "input document", "language": "en"}, {"id": "3", "text": "input document", + "language": "en"}, {"id": "4", "text": "input document", "language": "en"}, + {"id": "5", "text": "input document", "language": "en"}, {"id": "6", "text": + "input document", "language": "en"}, {"id": "7", "text": "input document", "language": + "en"}, {"id": "8", "text": "input document", "language": "en"}, {"id": "9", + "text": "input document", "language": "en"}, {"id": "10", "text": "input document", "language": "en"}, {"id": "11", "text": "input document", "language": "en"}, {"id": "12", "text": "input document", "language": "en"}, {"id": "13", "text": "input document", "language": "en"}, {"id": "14", "text": "input document", @@ -38,24 +40,24 @@ interactions: Connection: - keep-alive Content-Length: - - '2351' + - '2566' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 25 records are permitted."}}}' headers: apim-request-id: - - 218fcde0-d8de-46c1-ad67-89cae1d96ca2 + - 6d3e7500-71f7-401c-a5c1-41f1d2b03a6e content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:33:29 GMT + - Thu, 07 Oct 2021 23:45:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_extract_summary_action.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_extract_summary_action.yaml index b68b15be348e..e7b5d5224b41 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_extract_summary_action.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_extract_summary_action.yaml @@ -4,174 +4,153 @@ interactions: "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 3, "sortBy": "Offset"}}]}, "analysisInput": {"documents": [{"id": "1", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil - with the resignation of two senior Cabinet ministers in a deep split over her - Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours - after the resignation late on Sunday night of the minister in charge of Brexit - negotiations, David Davis. Their decision to leave the government came three - days after May appeared to have agreed a deal with herfractured Cabinet on the - UK''s post Brexit relationship with the EU. That plan is now in tatters and - her political future appears uncertain. May appeared in Parliament on Monday - afternoon to defend her plan, minutes after Downing Street confirmed the departure - of Johnson. May acknowledged the splits in her statement to MPs, saying of the - ministers who quit: We do not agree about the best way of delivering our shared - commitment to honoring the result of the referendum. The Prime Minister''s latest - plitical drama began late on Sunday night when Davis quit, declaring he could - not support May''s Brexit plan. He said it involved too close a relationship - with the EU and gave only an illusion of control being returned to the UK after - it left the EU. It seems to me we''re giving too much away, too easily, and - that''s a dangerous strategy at this time, Davis said in a BBC radio interview - Monday morning. Johnson''s resignation came Monday afternoon local time, just - before the Prime Minister was due to make a scheduled statement in Parliament. - This afternoon, the Prime Minister accepted the resignation of Boris Johnson - as Foreign Secretary, a statement from Downing Street said.", "language": "en"}, - {"id": "2", "text": "Microsoft fue fundado por Bill Gates y Paul Allen", "language": - "es"}]}}' + 3, "sortBy": "Offset"}, "taskName": "0"}], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "1", "text": "The government of British + Prime Minster Theresa May has been plunged into turmoil with the resignation + of two senior Cabinet ministers in a deep split over her Brexit strategy. The + Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation + late on Sunday night of the minister in charge of Brexit negotiations, David + Davis. Their decision to leave the government came three days after May appeared + to have agreed a deal with herfractured Cabinet on the UK''s post Brexit relationship + with the EU. That plan is now in tatters and her political future appears uncertain. + May appeared in Parliament on Monday afternoon to defend her plan, minutes after + Downing Street confirmed the departure of Johnson. May acknowledged the splits + in her statement to MPs, saying of the ministers who quit: We do not agree about + the best way of delivering our shared commitment to honoring the result of the + referendum. The Prime Minister''s latest plitical drama began late on Sunday + night when Davis quit, declaring he could not support May''s Brexit plan. He + said it involved too close a relationship with the EU and gave only an illusion + of control being returned to the UK after it left the EU. It seems to me we''re + giving too much away, too easily, and that''s a dangerous strategy at this time, + Davis said in a BBC radio interview Monday morning. Johnson''s resignation came + Monday afternoon local time, just before the Prime Minister was due to make + a scheduled statement in Parliament. This afternoon, the Prime Minister accepted + the resignation of Boris Johnson as Foreign Secretary, a statement from Downing + Street said.", "language": "en"}, {"id": "2", "text": "Microsoft fue fundado + por Bill Gates y Paul Allen", "language": "es"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '2138' + - '2268' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: 72a47d03-6833-4dd4-aaab-be37d5dd61bc - date: Mon, 02 Aug 2021 21:44:21 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f + apim-request-id: 306a16db-e160-4731-b3c5-9e3feb65ce95 + date: Thu, 07 Oct 2021 23:45:44 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a9563c4c-c626-432e-96c7-9d5b5b54f6ac strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '247' + x-envoy-upstream-service-time: '283' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a9563c4c-c626-432e-96c7-9d5b5b54f6ac?showStats=True response: body: - string: '{"jobId":"e392f783-53c8-4a5a-b952-8a03fa0cb23f","lastUpdateDateTime":"2021-08-02T21:44:21Z","createdDateTime":"2021-08-02T21:44:21Z","expirationDateTime":"2021-08-03T21:44:21Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"a9563c4c-c626-432e-96c7-9d5b5b54f6ac","lastUpdateDateTime":"2021-10-07T23:45:45Z","createdDateTime":"2021-10-07T23:45:44Z","expirationDateTime":"2021-10-08T23:45:44Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: ea3e84b3-ca07-436b-84ea-7b122d253fd5 + apim-request-id: ae658669-84d1-4403-ba2f-3a5db351e816 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:44:26 GMT + date: Thu, 07 Oct 2021 23:45:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '63' - status: - code: 200 - message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True -- request: - body: null - headers: - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True - response: - body: - string: '{"jobId":"e392f783-53c8-4a5a-b952-8a03fa0cb23f","lastUpdateDateTime":"2021-08-02T21:44:21Z","createdDateTime":"2021-08-02T21:44:21Z","expirationDateTime":"2021-08-03T21:44:21Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' - headers: - apim-request-id: c9b35294-1127-436a-9b64-fa35fcafabff - content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:44:31 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '62' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a9563c4c-c626-432e-96c7-9d5b5b54f6ac?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a9563c4c-c626-432e-96c7-9d5b5b54f6ac?showStats=True response: body: - string: '{"jobId":"e392f783-53c8-4a5a-b952-8a03fa0cb23f","lastUpdateDateTime":"2021-08-02T21:44:21Z","createdDateTime":"2021-08-02T21:44:21Z","expirationDateTime":"2021-08-03T21:44:21Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"a9563c4c-c626-432e-96c7-9d5b5b54f6ac","lastUpdateDateTime":"2021-10-07T23:45:45Z","createdDateTime":"2021-10-07T23:45:44Z","expirationDateTime":"2021-10-08T23:45:44Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: 0f73ec86-2213-460b-8259-ba0a5b1c28cf + apim-request-id: 1248a855-eb53-4a4c-8c41-15d418b8f148 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:44:37 GMT + date: Thu, 07 Oct 2021 23:45:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a9563c4c-c626-432e-96c7-9d5b5b54f6ac?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a9563c4c-c626-432e-96c7-9d5b5b54f6ac?showStats=True response: body: - string: '{"jobId":"e392f783-53c8-4a5a-b952-8a03fa0cb23f","lastUpdateDateTime":"2021-08-02T21:44:21Z","createdDateTime":"2021-08-02T21:44:21Z","expirationDateTime":"2021-08-03T21:44:21Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"a9563c4c-c626-432e-96c7-9d5b5b54f6ac","lastUpdateDateTime":"2021-10-07T23:45:45Z","createdDateTime":"2021-10-07T23:45:44Z","expirationDateTime":"2021-10-08T23:45:44Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: ff5cf105-04a4-45ef-a821-00cdc6412045 + apim-request-id: 725588f4-f02a-4224-8c6c-0b9ce64f0732 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:44:42 GMT + date: Thu, 07 Oct 2021 23:46:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '20' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a9563c4c-c626-432e-96c7-9d5b5b54f6ac?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a9563c4c-c626-432e-96c7-9d5b5b54f6ac?showStats=True response: body: - string: '{"jobId":"e392f783-53c8-4a5a-b952-8a03fa0cb23f","lastUpdateDateTime":"2021-08-02T21:44:44Z","createdDateTime":"2021-08-02T21:44:21Z","expirationDateTime":"2021-08-03T21:44:21Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:44:44.7234071Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":1625,"transactionsCount":2},"sentences":[{"text":"The + string: '{"jobId":"a9563c4c-c626-432e-96c7-9d5b5b54f6ac","lastUpdateDateTime":"2021-10-07T23:46:02Z","createdDateTime":"2021-10-07T23:45:44Z","expirationDateTime":"2021-10-08T23:45:44Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:46:02.866601Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":1625,"transactionsCount":2},"sentences":[{"text":"The government of British Prime Minster Theresa May has been plunged into turmoil with the resignation of two senior Cabinet ministers in a deep split over - her Brexit strategy.","rankScore":1.0,"offset":0,"length":176},{"text":"The + her Brexit strategy.","rankScore":0.57,"offset":0,"length":176},{"text":"The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David - Davis.","rankScore":0.9692596246437071,"offset":177,"length":164},{"text":"Their - decision to leave the government came three days after May appeared to have - agreed a deal with herfractured Cabinet on the UK''s post Brexit relationship - with the EU.","rankScore":0.8793036866968857,"offset":342,"length":171}],"warnings":[]},{"id":"2","statistics":{"charactersCount":49,"transactionsCount":1},"sentences":[{"text":"Microsoft + Davis.","rankScore":1.0,"offset":177,"length":164},{"text":"Their decision + to leave the government came three days after May appeared to have agreed + a deal with herfractured Cabinet on the UK''s post Brexit relationship with + the EU.","rankScore":0.47,"offset":342,"length":171}],"warnings":[]},{"id":"2","statistics":{"charactersCount":49,"transactionsCount":1},"sentences":[{"text":"Microsoft fue fundado por Bill Gates y Paul Allen","rankScore":1.0,"offset":0,"length":49}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}]}}' headers: - apim-request-id: a71d0f83-2c5c-4c49-a74a-87aa2a06075c + apim-request-id: 9849b019-324e-47a5-8d89-07e2367af2d7 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:44:47 GMT + date: Thu, 07 Oct 2021 23:46:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '83' + x-envoy-upstream-service-time: '92' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/e392f783-53c8-4a5a-b952-8a03fa0cb23f?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a9563c4c-c626-432e-96c7-9d5b5b54f6ac?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_key_phrase_task.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_key_phrase_task.yaml index d990015a90d5..44ed310a6be2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_key_phrase_task.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_key_phrase_task.yaml @@ -2,80 +2,60 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - false}}], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": - []}, "analysisInput": {"documents": [{"id": "1", "text": "Microsoft was founded - by Bill Gates and Paul Allen", "language": "en"}, {"id": "2", "text": "Microsoft + false}, "taskName": "0"}], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "1", "text": "Microsoft was founded by + Bill Gates and Paul Allen", "language": "en"}, {"id": "2", "text": "Microsoft fue fundado por Bill Gates y Paul Allen", "language": "es"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '484' + - '614' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: 676b93e0-071f-47c1-b11a-6fbf71d34bb7 - date: Mon, 02 Aug 2021 21:44:47 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/db028196-004c-43a2-bcc5-2726b6ec7346 + apim-request-id: 3ef998f4-e5df-411e-9fdb-f25a751eece4 + date: Thu, 07 Oct 2021 23:46:05 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/8f5133fc-0e42-49ff-bedb-775d0138bc7d strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '130' + x-envoy-upstream-service-time: '337' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/db028196-004c-43a2-bcc5-2726b6ec7346?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/8f5133fc-0e42-49ff-bedb-775d0138bc7d?showStats=True response: body: - string: '{"jobId":"db028196-004c-43a2-bcc5-2726b6ec7346","lastUpdateDateTime":"2021-08-02T21:44:48Z","createdDateTime":"2021-08-02T21:44:47Z","expirationDateTime":"2021-08-03T21:44:47Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' - headers: - apim-request-id: add3fd6c-9b91-4b30-b088-75c30ac62125 - content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:44:53 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' - status: - code: 200 - message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/db028196-004c-43a2-bcc5-2726b6ec7346?showStats=True -- request: - body: null - headers: - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/db028196-004c-43a2-bcc5-2726b6ec7346?showStats=True - response: - body: - string: '{"jobId":"db028196-004c-43a2-bcc5-2726b6ec7346","lastUpdateDateTime":"2021-08-02T21:44:53Z","createdDateTime":"2021-08-02T21:44:47Z","expirationDateTime":"2021-08-03T21:44:47Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:44:53.8910887Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","keyPhrases":["Bill + string: '{"jobId":"8f5133fc-0e42-49ff-bedb-775d0138bc7d","lastUpdateDateTime":"2021-10-07T23:46:07Z","createdDateTime":"2021-10-07T23:46:05Z","expirationDateTime":"2021-10-08T23:46:05Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:46:07.9109923Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":50,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":49,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: - apim-request-id: 1d88f5e6-98cb-4827-b227-2da2be7e490c + apim-request-id: f0d04397-56b6-4169-b5ee-9289d40a421f content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:44:57 GMT + date: Thu, 07 Oct 2021 23:46:10 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '88' + x-envoy-upstream-service-time: '74' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/db028196-004c-43a2-bcc5-2726b6ec7346?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/8f5133fc-0e42-49ff-bedb-775d0138bc7d?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_sentiment_task.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_sentiment_task.yaml index d8b2d5011e27..ee767379e9eb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_sentiment_task.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_dict_sentiment_task.yaml @@ -3,106 +3,174 @@ interactions: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": - false}}], "extractiveSummarizationTasks": []}, "analysisInput": {"documents": - [{"id": "1", "text": "Microsoft was founded by Bill Gates and Paul Allen.", - "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at. - It was too expensive.", "language": "en"}, {"id": "3", "text": "The restaurant - had really good food. I recommend you try it.", "language": "en"}]}}' + false}, "taskName": "0"}], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "Microsoft was founded + by Bill Gates and Paul Allen.", "language": "en"}, {"id": "2", "text": "I did + not like the hotel we stayed at. It was too expensive.", "language": "en"}, + {"id": "3", "text": "The restaurant had really good food. I recommend you try + it.", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '623' + - '753' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: 056ed955-1a31-4308-bad9-540b8ade254b - date: Mon, 02 Aug 2021 21:44:58 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/a4e57223-6eea-451a-afa2-5248aad8c6ee + apim-request-id: 1ef9f8a9-71bd-4dd8-896e-c997e283d906 + date: Thu, 07 Oct 2021 23:46:10 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '118' + x-envoy-upstream-service-time: '319' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/a4e57223-6eea-451a-afa2-5248aad8c6ee?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True response: body: - string: '{"jobId":"a4e57223-6eea-451a-afa2-5248aad8c6ee","lastUpdateDateTime":"2021-08-02T21:44:59Z","createdDateTime":"2021-08-02T21:44:58Z","expirationDateTime":"2021-08-03T21:44:58Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"9cefa9e3-f4eb-4b61-9191-0065d883796d","lastUpdateDateTime":"2021-10-07T23:46:11Z","createdDateTime":"2021-10-07T23:46:11Z","expirationDateTime":"2021-10-08T23:46:11Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: 6a115012-bf69-4918-afe5-aa686435c9d9 + apim-request-id: 506a36c8-15aa-4aca-a579-b441db7947f3 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:03 GMT + date: Thu, 07 Oct 2021 23:46:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/a4e57223-6eea-451a-afa2-5248aad8c6ee?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/a4e57223-6eea-451a-afa2-5248aad8c6ee?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True response: body: - string: '{"jobId":"a4e57223-6eea-451a-afa2-5248aad8c6ee","lastUpdateDateTime":"2021-08-02T21:44:59Z","createdDateTime":"2021-08-02T21:44:58Z","expirationDateTime":"2021-08-03T21:44:58Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"9cefa9e3-f4eb-4b61-9191-0065d883796d","lastUpdateDateTime":"2021-10-07T23:46:11Z","createdDateTime":"2021-10-07T23:46:11Z","expirationDateTime":"2021-10-08T23:46:11Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: 3c9d5e33-5923-4c43-8806-badeadca5483 + apim-request-id: 5b15a57e-0dfd-4699-8913-3d9eb56eabc2 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:08 GMT + date: Thu, 07 Oct 2021 23:46:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '19' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/a4e57223-6eea-451a-afa2-5248aad8c6ee?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/a4e57223-6eea-451a-afa2-5248aad8c6ee?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True response: body: - string: '{"jobId":"a4e57223-6eea-451a-afa2-5248aad8c6ee","lastUpdateDateTime":"2021-08-02T21:45:12Z","createdDateTime":"2021-08-02T21:44:58Z","expirationDateTime":"2021-08-03T21:44:58Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:12.8030026Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":51,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft + string: '{"jobId":"9cefa9e3-f4eb-4b61-9191-0065d883796d","lastUpdateDateTime":"2021-10-07T23:46:11Z","createdDateTime":"2021-10-07T23:46:11Z","expirationDateTime":"2021-10-08T23:46:11Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: 0a52ede6-6c8e-48bf-b5a5-47dadfed104d + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:46:26 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '11' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True + response: + body: + string: '{"jobId":"9cefa9e3-f4eb-4b61-9191-0065d883796d","lastUpdateDateTime":"2021-10-07T23:46:11Z","createdDateTime":"2021-10-07T23:46:11Z","expirationDateTime":"2021-10-08T23:46:11Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: 0aca3639-f84a-4912-abe1-7e26bf7980ee + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:46:31 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '10' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True + response: + body: + string: '{"jobId":"9cefa9e3-f4eb-4b61-9191-0065d883796d","lastUpdateDateTime":"2021-10-07T23:46:11Z","createdDateTime":"2021-10-07T23:46:11Z","expirationDateTime":"2021-10-08T23:46:11Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: 285be7a3-03d4-4d87-89a4-3bc221792d81 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:46:36 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '28' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True + response: + body: + string: '{"jobId":"9cefa9e3-f4eb-4b61-9191-0065d883796d","lastUpdateDateTime":"2021-10-07T23:46:38Z","createdDateTime":"2021-10-07T23:46:11Z","expirationDateTime":"2021-10-08T23:46:11Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:46:38.358597Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":51,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft was founded by Bill Gates and Paul Allen."}],"warnings":[]},{"id":"2","sentiment":"negative","statistics":{"charactersCount":60,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.22,"negative":0.77},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.45,"negative":0.54},"offset":0,"length":38,"text":"I did not like the hotel we stayed at."},{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":39,"length":21,"text":"It was too expensive."}],"warnings":[]},{"id":"3","sentiment":"positive","statistics":{"charactersCount":60,"transactionsCount":1},"confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."},{"sentiment":"positive","confidenceScores":{"positive":0.96,"neutral":0.03,"negative":0.01},"offset":37,"length":23,"text":"I recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: - apim-request-id: 36f875ec-0833-4a58-83ae-38fef5153bbe + apim-request-id: bee3825d-da55-456f-9225-df761def6f7c content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:13 GMT + date: Thu, 07 Oct 2021 23:46:41 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '51' + x-envoy-upstream-service-time: '301' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/a4e57223-6eea-451a-afa2-5248aad8c6ee?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9cefa9e3-f4eb-4b61-9191-0065d883796d?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_string_pii_entities_task.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_string_pii_entities_task.yaml index fb6c7506519c..6beace08220c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_string_pii_entities_task.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_string_pii_entities_task.yaml @@ -1,85 +1,65 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [{"parameters": - {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}}], - "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": - [], "extractiveSummarizationTasks": []}, "analysisInput": {"documents": [{"id": - "0", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "1", "text": - "Your ABA number - 111000025 - is the first 9 digits in the lower left hand - corner of your personal check.", "language": "en"}, {"id": "2", "text": "Is - 998.214.865-68 your Brazilian CPF number?", "language": "en"}]}}' + {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, + "taskName": "0"}], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], + "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "My SSN is 859-98-0987.", + "language": "en"}, {"id": "1", "text": "Your ABA number - 111000025 - is the + first 9 digits in the lower left hand corner of your personal check.", "language": + "en"}, {"id": "2", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": + "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '637' + - '767' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: ec2e4dc2-e192-40e9-9e9d-0c4b48dc4ea5 - date: Mon, 02 Aug 2021 21:45:14 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/dac98643-9da2-427e-9ec2-5cf5d78f5482 + apim-request-id: bd7eb535-7a43-4457-ba68-4b2414ee7fe9 + date: Thu, 07 Oct 2021 23:46:42 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/7baf1033-498c-4e14-993e-4dd883b08473 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '123' + x-envoy-upstream-service-time: '257' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/dac98643-9da2-427e-9ec2-5cf5d78f5482?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/7baf1033-498c-4e14-993e-4dd883b08473?showStats=True response: body: - string: '{"jobId":"dac98643-9da2-427e-9ec2-5cf5d78f5482","lastUpdateDateTime":"2021-08-02T21:45:14Z","createdDateTime":"2021-08-02T21:45:14Z","expirationDateTime":"2021-08-03T21:45:14Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' - headers: - apim-request-id: c444482f-e325-46af-8a22-3ee76189990a - content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:20 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' - status: - code: 200 - message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/dac98643-9da2-427e-9ec2-5cf5d78f5482?showStats=True -- request: - body: null - headers: - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/dac98643-9da2-427e-9ec2-5cf5d78f5482?showStats=True - response: - body: - string: '{"jobId":"dac98643-9da2-427e-9ec2-5cf5d78f5482","lastUpdateDateTime":"2021-08-02T21:45:22Z","createdDateTime":"2021-08-02T21:45:14Z","expirationDateTime":"2021-08-03T21:45:14Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:22.0953999Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"redactedText":"My + string: '{"jobId":"7baf1033-498c-4e14-993e-4dd883b08473","lastUpdateDateTime":"2021-10-07T23:46:44Z","createdDateTime":"2021-10-07T23:46:42Z","expirationDateTime":"2021-10-08T23:46:42Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:46:44.6202158Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"redactedText":"My SSN is ***********.","id":"0","statistics":{"charactersCount":22,"transactionsCount":1},"entities":[{"text":"859-98-0987","category":"USSocialSecurityNumber","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"redactedText":"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.","id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"PhoneNumber","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABARoutingNumber","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"NZSocialWelfareNumber","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"redactedText":"Is 998.214.865-68 your Brazilian CPF number?","id":"2","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}]}}' headers: - apim-request-id: a6fffa3a-655d-475e-91dc-8b30159cb90f + apim-request-id: 457f5b33-2b11-4690-b1aa-ede212585e7b content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:24 GMT + date: Thu, 07 Oct 2021 23:46:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '46' + x-envoy-upstream-service-time: '144' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/dac98643-9da2-427e-9ec2-5cf5d78f5482?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/7baf1033-498c-4e14-993e-4dd883b08473?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_text_document_input_entities_task.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_text_document_input_entities_task.yaml index 9747e0c71a3d..3eebb82316c2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_text_document_input_entities_task.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_all_successful_passing_text_document_input_entities_task.yaml @@ -1,72 +1,51 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": - [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": []}, "analysisInput": - {"documents": [{"id": "1", "text": "Microsoft was founded by Bill Gates and - Paul Allen on April 4, 1975", "language": "en"}, {"id": "2", "text": "Microsoft - fue fundado por Bill Gates y Paul Allen el 4 de abril de 1975.", "language": - "es"}, {"id": "3", "text": "Microsoft wurde am 4. April 1975 von Bill Gates - und Paul Allen gegr\u00fcndet.", "language": "de"}]}}' + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": + [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "Microsoft was founded + by Bill Gates and Paul Allen on April 4, 1975", "language": "en"}, {"id": "2", + "text": "Microsoft fue fundado por Bill Gates y Paul Allen el 4 de abril de + 1975.", "language": "es"}, {"id": "3", "text": "Microsoft wurde am 4. April + 1975 von Bill Gates und Paul Allen gegr\u00fcndet.", "language": "de"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '684' + - '814' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: 7da3241b-1afc-444e-9d72-ad832624e011 - date: Mon, 02 Aug 2021 21:45:25 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/f547ce83-aac8-434c-a2b6-eff76d3102c6 + apim-request-id: ff57dc86-001f-43ef-a0e1-9168803e13a8 + date: Thu, 07 Oct 2021 23:46:47 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9e117462-7cbe-4f33-ac1d-bd58c3ecf303 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '117' + x-envoy-upstream-service-time: '265' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/f547ce83-aac8-434c-a2b6-eff76d3102c6?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/9e117462-7cbe-4f33-ac1d-bd58c3ecf303?showStats=True response: body: - string: '{"jobId":"f547ce83-aac8-434c-a2b6-eff76d3102c6","lastUpdateDateTime":"2021-08-02T21:45:26Z","createdDateTime":"2021-08-02T21:45:25Z","expirationDateTime":"2021-08-03T21:45:25Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' - headers: - apim-request-id: 6b6a751f-85ed-4247-b245-64dba4e7f38d - content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:30 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' - status: - code: 200 - message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/f547ce83-aac8-434c-a2b6-eff76d3102c6?showStats=True -- request: - body: null - headers: - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/f547ce83-aac8-434c-a2b6-eff76d3102c6?showStats=True - response: - body: - string: '{"jobId":"f547ce83-aac8-434c-a2b6-eff76d3102c6","lastUpdateDateTime":"2021-08-02T21:45:32Z","createdDateTime":"2021-08-02T21:45:25Z","expirationDateTime":"2021-08-03T21:45:25Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:32.9084611Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":67,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.99},{"text":"Bill + string: '{"jobId":"9e117462-7cbe-4f33-ac1d-bd58c3ecf303","lastUpdateDateTime":"2021-10-07T23:46:50Z","createdDateTime":"2021-10-07T23:46:48Z","expirationDateTime":"2021-10-08T23:46:48Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:46:50.5522957Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":67,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":0.99},{"text":"Bill Gates","category":"Person","offset":25,"length":10,"confidenceScore":1.0},{"text":"Paul Allen","category":"Person","offset":40,"length":10,"confidenceScore":1.0},{"text":"April 4, 1975","category":"DateTime","subcategory":"Date","offset":54,"length":13,"confidenceScore":0.8}],"warnings":[]},{"id":"2","statistics":{"charactersCount":72,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -77,15 +56,15 @@ interactions: Gates","category":"Person","offset":37,"length":10,"confidenceScore":1.0},{"text":"Paul Allen","category":"Person","offset":52,"length":10,"confidenceScore":1.0}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: - apim-request-id: 1f5d2969-ba50-4165-aa3c-7fe762c11d44 + apim-request-id: c5989d14-a32b-478b-800c-c2d1cef3b689 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:35 GMT + date: Thu, 07 Oct 2021 23:46:52 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '48' + x-envoy-upstream-service-time: '129' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/f547ce83-aac8-434c-a2b6-eff76d3102c6?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/9e117462-7cbe-4f33-ac1d-bd58c3ecf303?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_analyze_continuation_token.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_analyze_continuation_token.yaml new file mode 100644 index 000000000000..7eb39c3cf973 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_analyze_continuation_token.yaml @@ -0,0 +1,293 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "1"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "3"}], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": + false}, "taskName": "2"}], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "A recent report by + the Government Accountability Office (GAO) found that the dramatic increase + in oil and natural gas development on federal lands over the past six years + has stretched the staff of the BLM to a point that it has been unable to meet + its environmental protection responsibilities.", "language": "en"}, {"id": "2", + "text": "David Schmidt, senior vice president--Food Safety, International Food + Information Council (IFIC), Washington, D.C., discussed the physical activity + component.", "language": "en"}, {"id": "3", "text": "", "language": "en"}, {"id": + "4", "text": "I need a reservation for an indoor restaurant in China. Please + don''t stop the music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '1528' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: 6ec8348e-ca21-4d16-b84a-b1f9ec14830e + date: Mon, 25 Oct 2021 19:25:17 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '517' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:18Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"running","errors":[],"tasks":{"completed":0,"failed":0,"inProgress":4,"total":4}}' + headers: + apim-request-id: cd51fb39-8760-4d84-84f9-73923fcc6a9d + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:23 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '7' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:28Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"running","errors":[],"tasks":{"completed":2,"failed":0,"inProgress":2,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:28.1220369Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:26.6161059Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: e5209e22-5751-456f-84a4-9cd1ccb69958 + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:28 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '188' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:31Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"running","errors":[],"tasks":{"completed":3,"failed":0,"inProgress":1,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:28.1220369Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:31.9322667Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:26.6161059Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: 3cc4a635-3ddc-46ad-b129-3ff64c65a1d9 + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:34 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '713' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:36Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"succeeded","errors":[],"tasks":{"completed":4,"failed":0,"inProgress":0,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:28.1220369Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:31.9322667Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:26.6161059Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:36.1869152Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":295,"transactionsCount":1},"confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"offset":0,"length":295,"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities."}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":158,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"offset":0,"length":158,"text":"David + Schmidt, senior vice president--Food Safety, International Food Information + Council (IFIC), Washington, D.C., discussed the physical activity component."}],"warnings":[]},{"id":"4","sentiment":"positive","statistics":{"charactersCount":121,"transactionsCount":1},"confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":55,"text":"I + need a reservation for an indoor restaurant in China."},{"sentiment":"neutral","confidenceScores":{"positive":0.12,"neutral":0.78,"negative":0.1},"offset":56,"length":28,"text":"Please + don''t stop the music."},{"sentiment":"positive","confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"offset":85,"length":36,"text":"Play + music and add it to my playlist"}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}}]}}' + headers: + apim-request-id: de026245-1397-48a1-83ab-5eed81a5f74f + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:42 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '2893' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True + response: + body: + string: '{"jobId":"006e06bb-8866-4b6f-852d-ed9d75f13833","lastUpdateDateTime":"2021-10-25T19:25:36Z","createdDateTime":"2021-10-25T19:25:18Z","expirationDateTime":"2021-10-26T19:25:18Z","status":"succeeded","errors":[],"tasks":{"completed":4,"failed":0,"inProgress":0,"total":4,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:28.1220369Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.99},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.94},{"text":"oil","category":"Product","offset":98,"length":3,"confidenceScore":0.67},{"text":"natural","category":"Product","offset":106,"length":7,"confidenceScore":0.68},{"text":"gas","category":"Skill","offset":114,"length":3,"confidenceScore":0.57},{"text":"development","category":"Skill","offset":118,"length":11,"confidenceScore":0.48},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.96},{"text":"environmental + protection","category":"Skill","offset":253,"length":24,"confidenceScore":0.79}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.86},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.95},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.82},{"text":"Washington, + D.C.","category":"Location","subcategory":"GPE","offset":98,"length":16,"confidenceScore":0.89}],"warnings":[]},{"id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"Location","subcategory":"Structural","offset":28,"length":6,"confidenceScore":0.5},{"text":"restaurant","category":"Location","subcategory":"Structural","offset":35,"length":10,"confidenceScore":0.5},{"text":"China","category":"Location","subcategory":"GPE","offset":49,"length":5,"confidenceScore":1.0}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:31.9322667Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.95},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.9},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.87}],"warnings":[]},{"redactedText":"*************, + *********************--Food Safety, ************************************** + (****), Washington, D.C., discussed the physical activity component.","id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"Person","offset":0,"length":13,"confidenceScore":1.0},{"text":"senior + vice president","category":"PersonType","offset":15,"length":21,"confidenceScore":0.71},{"text":"International + Food Information Council","category":"Organization","offset":51,"length":38,"confidenceScore":0.96},{"text":"IFIC","category":"Organization","offset":91,"length":4,"confidenceScore":0.92}],"warnings":[]},{"redactedText":"I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist","id":"4","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:26.6161059Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","keyPhrases":["Government + Accountability Office","natural gas development","past six years","environmental + protection responsibilities","recent report","dramatic increase","federal + lands","GAO","oil","staff","BLM","point"],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["International + Food Information Council","senior vice president","physical activity component","Food + Safety","David Schmidt","D.C.","IFIC","Washington"],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["indoor + restaurant","reservation","China","music","playlist"],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-25T19:25:36.1869152Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":295,"transactionsCount":1},"confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.23,"neutral":0.61,"negative":0.16},"offset":0,"length":295,"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities."}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":158,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.0,"neutral":1.0,"negative":0.0},"offset":0,"length":158,"text":"David + Schmidt, senior vice president--Food Safety, International Food Information + Council (IFIC), Washington, D.C., discussed the physical activity component."}],"warnings":[]},{"id":"4","sentiment":"positive","statistics":{"charactersCount":121,"transactionsCount":1},"confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":55,"text":"I + need a reservation for an indoor restaurant in China."},{"sentiment":"neutral","confidenceScores":{"positive":0.12,"neutral":0.78,"negative":0.1},"offset":56,"length":28,"text":"Please + don''t stop the music."},{"sentiment":"positive","confidenceScores":{"positive":0.57,"neutral":0.41,"negative":0.02},"offset":85,"length":36,"text":"Play + music and add it to my playlist"}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2020-04-01"}}]}}' + headers: + apim-request-id: 98e476b5-9bdc-491a-b4d5-7f5e3ff5bdc9 + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:25:47 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '445' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/006e06bb-8866-4b6f-852d-ed9d75f13833?showStats=True +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_credentials.yaml index ac487b823ad1..2e5b7a08d757 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_credentials.yaml @@ -1,40 +1,42 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "0", "text": "This is written in English.", "language": - "en"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "This is written in + English.", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '923' + - '1138' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: a0cb994b-10b5-4f44-a0cf-19e425d5e36a + apim-request-id: 49798a43-11bd-4847-a789-4486dd4cd4bd content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:45:36 GMT + date: Thu, 07 Oct 2021 23:46:53 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_model_version_error_all_tasks.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_model_version_error_all_tasks.yaml index 891d3844d334..c00987601e23 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_model_version_error_all_tasks.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_model_version_error_all_tasks.yaml @@ -1,42 +1,45 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], "entityRecognitionPiiTasks": - [{"parameters": {"model-version": "bad", "loggingOptOut": true, "stringIndexType": - "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false}}], "entityLinkingTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], "sentimentAnalysisTasks": - [{"parameters": {"model-version": "bad", "loggingOptOut": false, "opinionMining": - false}}], "extractiveSummarizationTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 3, "sortBy": "Offset"}}]}, "analysisInput": {"documents": [{"id": "1", "text": - "I did not like the hotel we stayed at.", "language": "english"}]}}' + "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "bad", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": + false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": + [{"parameters": {"model-version": "bad", "loggingOptOut": false, "stringIndexType": + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "I did not like the + hotel we stayed at.", "language": "english"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '921' + - '1136' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid parameter in request","innererror":{"code":"InvalidParameterValue","message":"Job task parameter value bad is not supported for model-version parameter for job task type KeyPhraseExtraction. Supported values latest,2019-10-01,2020-07-01,2021-05-01."}}}' headers: - apim-request-id: aa60189c-60fa-46fb-94c9-d7c564fc0ebb + apim-request-id: 91f160a3-118d-42e7-a3d9-0c2749ebc5a7 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:35 GMT + date: Thu, 07 Oct 2021 23:46:53 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '6' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_model_version_error_multiple_tasks.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_model_version_error_multiple_tasks.yaml index 20646e400448..79bbc641e66c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_model_version_error_multiple_tasks.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_model_version_error_multiple_tasks.yaml @@ -1,43 +1,45 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "bad", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "bad", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "bad", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": + false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "bad", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "bad", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "bad", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "1", "text": "I did not like the hotel we stayed at.", - "language": "english"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "1", "text": "I did not like the + hotel we stayed at.", "language": "english"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '924' + - '1139' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid parameter in request","innererror":{"code":"InvalidParameterValue","message":"Job task parameter value bad is not supported for model-version parameter for job task type KeyPhraseExtraction. Supported values latest,2019-10-01,2020-07-01,2021-05-01."}}}' headers: - apim-request-id: 7531e4e0-eac1-4212-bb45-e27b4a2d2b5e + apim-request-id: cba552dc-3c2e-4306-ac2e-4333329f0051 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:36 GMT + date: Thu, 07 Oct 2021 23:46:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '7' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_request_on_empty_document.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_request_on_empty_document.yaml index b96b130f1733..b55398655a06 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_request_on_empty_document.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_bad_request_on_empty_document.yaml @@ -2,33 +2,35 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - false}}], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": - []}, "analysisInput": {"documents": [{"id": "0", "text": "", "language": "en"}]}}' + false}, "taskName": "0"}], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "0", "text": "", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '342' + - '472' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Document text is empty."}}}' headers: - apim-request-id: 1336207a-ba21-4c23-b724-30c7aa24b899 + apim-request-id: 144c4c76-208e-4dfd-aafc-5d29d4a351fa content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:37 GMT + date: Thu, 07 Oct 2021 23:46:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '12' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_custom_partial_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_custom_partial_error.yaml new file mode 100644 index 000000000000..617e9c4b6152 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_custom_partial_error.yaml @@ -0,0 +1,73 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [{"parameters": + {"project-name": "textanalytics_custom_entities_project_name", "deployment-name": + "textanalytics_custom_entities_project_name"}, "taskName": "2"}], "customSingleClassificationTasks": + [{"parameters": {"project-name": "single_category_classify_project_name", "deployment-name": + "single_category_classify_project_name"}, "taskName": "0"}], "customMultiClassificationTasks": + [{"parameters": {"project-name": "textanalytics_multi_category_classify_project_name", + "deployment-name": "textanalytics_multi_category_classify_project_name"}, "taskName": + "1"}]}, "analysisInput": {"documents": [{"id": "1", "text": "A recent report + by the Government Accountability Office (GAO) found that the dramatic increase + in oil and natural gas development on federal lands over the past six years + has stretched the staff of the BLM to a point that it has been unable to meet + its environmental protection responsibilities.", "language": "en"}, {"id": "2", + "text": "", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '1170' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: b23a9a32-1d32-4bf3-89fe-def1beb08e9c + date: Thu, 07 Oct 2021 23:46:55 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/253c147f-8adb-43ed-bc24-2ca53575d692 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '999' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/253c147f-8adb-43ed-bc24-2ca53575d692?showStats=True + response: + body: + string: '{"jobId":"253c147f-8adb-43ed-bc24-2ca53575d692","lastUpdateDateTime":"2021-10-07T23:46:59Z","createdDateTime":"2021-10-07T23:46:55Z","expirationDateTime":"2021-10-08T23:46:55Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":0,"total":3,"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:46:56.7982326Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government","category":"restaurant_name","offset":23,"length":10,"confidenceScore":0.05},{"text":"Office","category":"restaurant_name","offset":49,"length":6,"confidenceScore":0.11},{"text":"GAO","category":"restaurant_name","offset":57,"length":3,"confidenceScore":0.04},{"text":"Accountability","category":"geographic_poi","offset":34,"length":14,"confidenceScore":0.07},{"text":"natural","category":"geographic_poi","offset":106,"length":7,"confidenceScore":0.04},{"text":"dramatic","category":"sort","offset":77,"length":8,"confidenceScore":0.03},{"text":"oil","category":"restaurant_type","offset":98,"length":3,"confidenceScore":0.03},{"text":"gas","category":"restaurant_type","offset":114,"length":3,"confidenceScore":0.09},{"text":"and","category":"served_dish","offset":102,"length":3,"confidenceScore":0.07},{"text":"development","category":"object_type","offset":118,"length":11,"confidenceScore":0.06},{"text":"federal","category":"state","offset":133,"length":7,"confidenceScore":0.07},{"text":"protection","category":"state","offset":267,"length":10,"confidenceScore":0.05},{"text":"lands","category":"poi","offset":141,"length":5,"confidenceScore":0.04},{"text":"BLM","category":"poi","offset":202,"length":3,"confidenceScore":0.07},{"text":"the","category":"timeRange","offset":152,"length":3,"confidenceScore":0.24},{"text":"past + six years","category":"timeRange","offset":156,"length":14,"confidenceScore":0.54}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}],"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:46:59.9865888Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"1","classification":{"category":"RateBook","confidenceScore":0.76},"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}],"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:46:59.8622022Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"1","classifications":[],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' + headers: + apim-request-id: f0010dae-044e-4ee9-8330-de8353479dbb + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:47:01 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '268' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/253c147f-8adb-43ed-bc24-2ca53575d692?showStats=True +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_disable_service_logs.yaml index 482d933d1b8c..7049fa231fdc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_disable_service_logs.yaml @@ -1,114 +1,99 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}}], "entityRecognitionPiiTasks": + "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + true}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": true, "stringIndexType": - "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": true}}], "entityLinkingTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}}], "sentimentAnalysisTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": true, "opinionMining": - false}}], "extractiveSummarizationTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 3, "sortBy": "Offset"}}]}, "analysisInput": {"documents": [{"id": "0", "text": + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [{"parameters": {"project-name": "textanalytics_custom_entities_project_name", + "deployment-name": "textanalytics_custom_entities_project_name", "loggingOptOut": + true}, "taskName": "8"}], "customSingleClassificationTasks": [{"parameters": + {"project-name": "single_category_classify_project_name", "deployment-name": + "single_category_classify_project_name", "loggingOptOut": true}, "taskName": + "6"}], "customMultiClassificationTasks": [{"parameters": {"project-name": "textanalytics_multi_category_classify_project_name", + "deployment-name": "textanalytics_multi_category_classify_project_name", "loggingOptOut": + true}, "taskName": "7"}]}, "analysisInput": {"documents": [{"id": "0", "text": "Test for logging disable", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '915' + - '1643' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: 3fb79315-7a67-4783-b2b7-6d9213576ddb - date: Mon, 02 Aug 2021 21:45:38 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/43aedde3-0c7d-4794-a401-6cf5bedae3d8 + apim-request-id: 297233d4-d297-4547-b66f-3d9bd6633c5e + date: Thu, 07 Oct 2021 23:47:02 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/40f91a74-081e-4707-b099-b8ec5f9e3d9a strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '259' + x-envoy-upstream-service-time: '1497' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/43aedde3-0c7d-4794-a401-6cf5bedae3d8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/40f91a74-081e-4707-b099-b8ec5f9e3d9a response: body: - string: '{"jobId":"43aedde3-0c7d-4794-a401-6cf5bedae3d8","lastUpdateDateTime":"2021-08-02T21:45:39Z","createdDateTime":"2021-08-02T21:45:38Z","expirationDateTime":"2021-08-03T21:45:38Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + string: '{ "error": { "code": "Timeout", "message": "The operation was timeout." + } }' headers: - apim-request-id: 492d4486-76b5-4ac0-a87c-6161ae061408 - content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:42 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' - status: - code: 200 - message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/43aedde3-0c7d-4794-a401-6cf5bedae3d8 -- request: - body: null - headers: - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/43aedde3-0c7d-4794-a401-6cf5bedae3d8 - response: - body: - string: '{"jobId":"43aedde3-0c7d-4794-a401-6cf5bedae3d8","lastUpdateDateTime":"2021-08-02T21:45:45Z","createdDateTime":"2021-08-02T21:45:38Z","expirationDateTime":"2021-08-03T21:45:38Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:45.105061Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:44.7288427Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test - (assessment)","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.04}],"language":"en","id":"Test - (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:45.1349964Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"Test - for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:44.6626774Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' - headers: - apim-request-id: 598baa08-e0e0-4613-a930-9a056e59f8de - content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:48 GMT + apim-request-id: ea311519-5341-464c-a2ef-4acdd7ea6bd6 + content-length: '75' + content-type: application/json + date: Thu, 07 Oct 2021 23:49:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '115' status: - code: 200 - message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/43aedde3-0c7d-4794-a401-6cf5bedae3d8 + code: 408 + message: Timeout + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/40f91a74-081e-4707-b099-b8ec5f9e3d9a - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/43aedde3-0c7d-4794-a401-6cf5bedae3d8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/40f91a74-081e-4707-b099-b8ec5f9e3d9a response: body: - string: '{"jobId":"43aedde3-0c7d-4794-a401-6cf5bedae3d8","lastUpdateDateTime":"2021-08-02T21:45:51Z","createdDateTime":"2021-08-02T21:45:38Z","expirationDateTime":"2021-08-03T21:45:38Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:45.105061Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:44.7288427Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test + string: '{"jobId":"40f91a74-081e-4707-b099-b8ec5f9e3d9a","lastUpdateDateTime":"2021-10-07T23:47:40Z","createdDateTime":"2021-10-07T23:47:02Z","expirationDateTime":"2021-10-08T23:47:02Z","status":"partiallyCompleted","errors":[{"code":"InternalServerError","message":"1 + out of 9 job tasks failed. Failed job tasks : v3.2-preview.2/custom/classification/singlelabel."}],"displayName":"NA","tasks":{"completed":8,"failed":1,"inProgress":0,"total":9,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:47:16.4105713Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:47:10.2024096Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test (assessment)","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.04}],"language":"en","id":"Test - (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:45.1349964Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"Test - for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:51.7536788Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"documents":[{"id":"0","sentences":[{"text":"Test - for logging disable","rankScore":1.0,"offset":0,"length":24}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:44.6626774Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:45:50.5189175Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"offset":0,"length":24,"text":"Test - for logging disable"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' + (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:47:10.4578134Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":"Test + for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:47:15.2855057Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"0","sentences":[{"text":"Test + for logging disable","rankScore":1.0,"offset":0,"length":24}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:47:16.4314862Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:47:40.6325455Z","taskName":"4","state":"succeeded","results":{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"offset":0,"length":24,"text":"Test + for logging disable"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}],"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:47:06.2516036Z","taskName":"8","state":"succeeded","results":{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}],"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:47:09.1230326Z","taskName":"6","state":"failed"}],"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:47:03.5372914Z","taskName":"7","state":"succeeded","results":{"documents":[{"id":"0","classifications":[],"warnings":[]}],"errors":[],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' headers: - apim-request-id: f3c6b772-94e5-4be7-9e62-738691a0f407 + apim-request-id: 913b74dc-9e0b-40e9-ab30-75516d83c63d content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:45:54 GMT + date: Thu, 07 Oct 2021 23:49:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '173' + x-envoy-upstream-service-time: '621' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/43aedde3-0c7d-4794-a401-6cf5bedae3d8 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/40f91a74-081e-4707-b099-b8ec5f9e3d9a version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_empty_credential_class.yaml index 951467425de0..49ef7e30d18e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_empty_credential_class.yaml @@ -1,40 +1,42 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "0", "text": "This is written in English.", "language": - "en"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "This is written in + English.", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '923' + - '1138' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 1dc75455-c722-4377-9041-42323a9b5a31 + apim-request-id: f8fb617e-d0ad-4f11-82ea-7041c32ef04f content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:45:54 GMT + date: Thu, 07 Oct 2021 23:49:08 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_extract_summary_action_with_options.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_extract_summary_action_with_options.yaml index c790b6d35ae1..6e0e463b8ca6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_extract_summary_action_with_options.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_extract_summary_action_with_options.yaml @@ -4,130 +4,132 @@ interactions: "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 5, "sortBy": "Rank"}}]}, "analysisInput": {"documents": [{"id": "0", "text": - "The government of British Prime Minster Theresa May has been plunged into turmoil - with the resignation of two senior Cabinet ministers in a deep split over her - Brexit strategy. The Foreign Secretary Boris Johnson, quit on Monday, hours - after the resignation late on Sunday night of the minister in charge of Brexit - negotiations, David Davis. Their decision to leave the government came three - days after May appeared to have agreed a deal with herfractured Cabinet on the - UK''s post Brexit relationship with the EU. That plan is now in tatters and - her political future appears uncertain. May appeared in Parliament on Monday - afternoon to defend her plan, minutes after Downing Street confirmed the departure - of Johnson. May acknowledged the splits in her statement to MPs, saying of the - ministers who quit: We do not agree about the best way of delivering our shared - commitment to honoring the result of the referendum. The Prime Minister''s latest - plitical drama began late on Sunday night when Davis quit, declaring he could - not support May''s Brexit plan. He said it involved too close a relationship - with the EU and gave only an illusion of control being returned to the UK after - it left the EU. It seems to me we''re giving too much away, too easily, and - that''s a dangerous strategy at this time, Davis said in a BBC radio interview - Monday morning. Johnson''s resignation came Monday afternoon local time, just - before the Prime Minister was due to make a scheduled statement in Parliament. - This afternoon, the Prime Minister accepted the resignation of Boris Johnson - as Foreign Secretary, a statement from Downing Street said.", "language": "en"}]}}' + 5, "sortBy": "Rank"}, "taskName": "0"}], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "0", "text": "The government of British + Prime Minster Theresa May has been plunged into turmoil with the resignation + of two senior Cabinet ministers in a deep split over her Brexit strategy. The + Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation + late on Sunday night of the minister in charge of Brexit negotiations, David + Davis. Their decision to leave the government came three days after May appeared + to have agreed a deal with herfractured Cabinet on the UK''s post Brexit relationship + with the EU. That plan is now in tatters and her political future appears uncertain. + May appeared in Parliament on Monday afternoon to defend her plan, minutes after + Downing Street confirmed the departure of Johnson. May acknowledged the splits + in her statement to MPs, saying of the ministers who quit: We do not agree about + the best way of delivering our shared commitment to honoring the result of the + referendum. The Prime Minister''s latest plitical drama began late on Sunday + night when Davis quit, declaring he could not support May''s Brexit plan. He + said it involved too close a relationship with the EU and gave only an illusion + of control being returned to the UK after it left the EU. It seems to me we''re + giving too much away, too easily, and that''s a dangerous strategy at this time, + Davis said in a BBC radio interview Monday morning. Johnson''s resignation came + Monday afternoon local time, just before the Prime Minister was due to make + a scheduled statement in Parliament. This afternoon, the Prime Minister accepted + the resignation of Boris Johnson as Foreign Secretary, a statement from Downing + Street said.", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '2044' + - '2174' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: 01e208c6-d64d-4f57-92e6-79cbbbedf1a9 - date: Mon, 02 Aug 2021 21:45:54 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/c0301dcb-8661-4ffe-ae7a-a73b3a2de579 + apim-request-id: 72b20d62-cba5-4555-8f51-e742ca326cdd + date: Thu, 07 Oct 2021 23:49:09 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fba4a4ad-0fc8-465d-98e1-8008f6e5e5bc strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '86' + x-envoy-upstream-service-time: '288' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/c0301dcb-8661-4ffe-ae7a-a73b3a2de579?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fba4a4ad-0fc8-465d-98e1-8008f6e5e5bc?showStats=True response: body: - string: '{"jobId":"c0301dcb-8661-4ffe-ae7a-a73b3a2de579","lastUpdateDateTime":"2021-08-02T21:45:55Z","createdDateTime":"2021-08-02T21:45:55Z","expirationDateTime":"2021-08-03T21:45:55Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"fba4a4ad-0fc8-465d-98e1-8008f6e5e5bc","lastUpdateDateTime":"2021-10-07T23:49:09Z","createdDateTime":"2021-10-07T23:49:09Z","expirationDateTime":"2021-10-08T23:49:09Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: e76dd4cd-9f9f-4372-92ce-572c642c2da1 + apim-request-id: a27f862f-af80-4b81-8b2f-d2bb750f9178 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:00 GMT + date: Thu, 07 Oct 2021 23:49:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '12' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/c0301dcb-8661-4ffe-ae7a-a73b3a2de579?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fba4a4ad-0fc8-465d-98e1-8008f6e5e5bc?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/c0301dcb-8661-4ffe-ae7a-a73b3a2de579?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fba4a4ad-0fc8-465d-98e1-8008f6e5e5bc?showStats=True response: body: - string: '{"jobId":"c0301dcb-8661-4ffe-ae7a-a73b3a2de579","lastUpdateDateTime":"2021-08-02T21:45:55Z","createdDateTime":"2021-08-02T21:45:55Z","expirationDateTime":"2021-08-03T21:45:55Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{ "error": { "code": "Timeout", "message": "The operation was timeout." + } }' headers: - apim-request-id: f1b61876-41c4-4037-aa07-8e31c53c770a - content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:05 GMT + apim-request-id: da577ae4-5df1-422a-a9ac-08f1f410ce97 + content-length: '75' + content-type: application/json + date: Thu, 07 Oct 2021 23:51:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' status: - code: 200 - message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/c0301dcb-8661-4ffe-ae7a-a73b3a2de579?showStats=True + code: 408 + message: Timeout + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fba4a4ad-0fc8-465d-98e1-8008f6e5e5bc?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/c0301dcb-8661-4ffe-ae7a-a73b3a2de579?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/fba4a4ad-0fc8-465d-98e1-8008f6e5e5bc?showStats=True response: body: - string: '{"jobId":"c0301dcb-8661-4ffe-ae7a-a73b3a2de579","lastUpdateDateTime":"2021-08-02T21:46:07Z","createdDateTime":"2021-08-02T21:45:55Z","expirationDateTime":"2021-08-03T21:45:55Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:07.7279994Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"0","statistics":{"charactersCount":1625,"transactionsCount":2},"sentences":[{"text":"The - government of British Prime Minster Theresa May has been plunged into turmoil - with the resignation of two senior Cabinet ministers in a deep split over - her Brexit strategy.","rankScore":1.0,"offset":0,"length":176},{"text":"The + string: '{"jobId":"fba4a4ad-0fc8-465d-98e1-8008f6e5e5bc","lastUpdateDateTime":"2021-10-07T23:49:26Z","createdDateTime":"2021-10-07T23:49:09Z","expirationDateTime":"2021-10-08T23:49:09Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:49:26.5678948Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"0","statistics":{"charactersCount":1625,"transactionsCount":2},"sentences":[{"text":"The Foreign Secretary Boris Johnson, quit on Monday, hours after the resignation late on Sunday night of the minister in charge of Brexit negotiations, David - Davis.","rankScore":0.9711179434493907,"offset":177,"length":164},{"text":"Their - decision to leave the government came three days after May appeared to have - agreed a deal with herfractured Cabinet on the UK''s post Brexit relationship - with the EU.","rankScore":0.9103508917712292,"offset":342,"length":171},{"text":"That - plan is now in tatters and her political future appears uncertain.","rankScore":0.8227722338472695,"offset":514,"length":71},{"text":"May - appeared in Parliament on Monday afternoon to defend her plan, minutes after - Downing Street confirmed the departure of Johnson.","rankScore":0.6751042854876602,"offset":586,"length":131}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}]}}' + Davis.","rankScore":1.0,"offset":177,"length":164},{"text":"The government + of British Prime Minster Theresa May has been plunged into turmoil with the + resignation of two senior Cabinet ministers in a deep split over her Brexit + strategy.","rankScore":0.57,"offset":0,"length":176},{"text":"Their decision + to leave the government came three days after May appeared to have agreed + a deal with herfractured Cabinet on the UK''s post Brexit relationship with + the EU.","rankScore":0.47,"offset":342,"length":171},{"text":"That plan is + now in tatters and her political future appears uncertain.","rankScore":0.36,"offset":514,"length":71},{"text":"The + Prime Minister''s latest plitical drama began late on Sunday night when Davis + quit, declaring he could not support May''s Brexit plan.","rankScore":0.26,"offset":918,"length":136}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}]}}' headers: - apim-request-id: 5f4d746c-b0ac-4b3e-acac-cc5a9a8290b0 + apim-request-id: 4121b7bc-0ecc-4813-992b-f6ad2a000656 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:10 GMT + date: Thu, 07 Oct 2021 23:51:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '49' + x-envoy-upstream-service-time: '160' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/c0301dcb-8661-4ffe-ae7a-a73b3a2de579?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/fba4a4ad-0fc8-465d-98e1-8008f6e5e5bc?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_extract_summary_partial_results.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_extract_summary_partial_results.yaml index 832318b5a56a..69e753149e6c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_extract_summary_partial_results.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_extract_summary_partial_results.yaml @@ -4,70 +4,94 @@ interactions: "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": - 3, "sortBy": "Offset"}}]}, "analysisInput": {"documents": [{"id": "1", "text": - "", "language": "en"}, {"id": "2", "text": "hello world", "language": "en"}]}}' + 3, "sortBy": "Offset"}, "taskName": "0"}], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "1", "text": "", "language": "en"}, {"id": + "2", "text": "hello world", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '475' + - '605' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: a8092624-8d03-4f8d-b37f-96c98970eda8 - date: Mon, 02 Aug 2021 21:46:10 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6 + apim-request-id: cd8a22c1-6b70-4316-86d3-6a6d5041ff5e + date: Thu, 07 Oct 2021 23:51:20 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/04c4b0bb-cb57-40c9-8109-7038ac7d4af4 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '108' + x-envoy-upstream-service-time: '770' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/04c4b0bb-cb57-40c9-8109-7038ac7d4af4?showStats=True response: body: - string: '{"jobId":"d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6","lastUpdateDateTime":"2021-08-02T21:46:11Z","createdDateTime":"2021-08-02T21:46:11Z","expirationDateTime":"2021-08-03T21:46:11Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"04c4b0bb-cb57-40c9-8109-7038ac7d4af4","lastUpdateDateTime":"2021-10-07T23:51:21Z","createdDateTime":"2021-10-07T23:51:20Z","expirationDateTime":"2021-10-08T23:51:20Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: 9d52da4f-6963-475b-b2a2-5547e0d1f45c + apim-request-id: 17f3cbb8-e946-465b-af0c-678526bde310 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:15 GMT + date: Thu, 07 Oct 2021 23:51:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' + x-envoy-upstream-service-time: '138' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/04c4b0bb-cb57-40c9-8109-7038ac7d4af4?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/04c4b0bb-cb57-40c9-8109-7038ac7d4af4?showStats=True response: body: - string: '{"jobId":"d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6","lastUpdateDateTime":"2021-08-02T21:46:11Z","createdDateTime":"2021-08-02T21:46:11Z","expirationDateTime":"2021-08-03T21:46:11Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"04c4b0bb-cb57-40c9-8109-7038ac7d4af4","lastUpdateDateTime":"2021-10-07T23:51:21Z","createdDateTime":"2021-10-07T23:51:20Z","expirationDateTime":"2021-10-08T23:51:20Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: e799acf4-87ee-4673-9c47-00549e7556e9 + apim-request-id: 0fef54a1-23dd-4f5f-a18c-b5bef09e4e6e content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:21 GMT + date: Thu, 07 Oct 2021 23:51:31 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '9' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/04c4b0bb-cb57-40c9-8109-7038ac7d4af4?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/04c4b0bb-cb57-40c9-8109-7038ac7d4af4?showStats=True + response: + body: + string: '{"jobId":"04c4b0bb-cb57-40c9-8109-7038ac7d4af4","lastUpdateDateTime":"2021-10-07T23:51:21Z","createdDateTime":"2021-10-07T23:51:20Z","expirationDateTime":"2021-10-08T23:51:20Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: 11025182-9c9b-42d3-ab85-d77aa5d73a32 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:51:35 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -75,30 +99,29 @@ interactions: status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/04c4b0bb-cb57-40c9-8109-7038ac7d4af4?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/04c4b0bb-cb57-40c9-8109-7038ac7d4af4?showStats=True response: body: - string: '{"jobId":"d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6","lastUpdateDateTime":"2021-08-02T21:46:23Z","createdDateTime":"2021-08-02T21:46:11Z","expirationDateTime":"2021-08-03T21:46:11Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:23.4007285Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"04c4b0bb-cb57-40c9-8109-7038ac7d4af4","lastUpdateDateTime":"2021-10-07T23:51:38Z","createdDateTime":"2021-10-07T23:51:20Z","expirationDateTime":"2021-10-08T23:51:20Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:51:38.9373184Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":1,"erroneousDocumentsCount":1,"transactionsCount":1},"documents":[{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-08-01"}}]}}' headers: - apim-request-id: 895237c8-02c9-40fb-a7c2-58c25042ad4e + apim-request-id: fce52636-9b50-4b96-8ccd-63c87c42eee3 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:26 GMT + date: Thu, 07 Oct 2021 23:51:40 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '49' + x-envoy-upstream-service-time: '186' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/d3dc5f3a-b2f5-4055-9d5c-b6fd068c04d6?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/04c4b0bb-cb57-40c9-8109-7038ac7d4af4?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multi_category_classify.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multi_category_classify.yaml new file mode 100644 index 000000000000..92a763119c6f --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multi_category_classify.yaml @@ -0,0 +1,66 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": [{"parameters": + {"project-name": "textanalytics_multi_category_classify_project_name", "deployment-name": + "textanalytics_multi_category_classify_project_name"}, "taskName": "0"}]}, "analysisInput": + {"documents": [{"id": "1", "text": "A recent report by the Government Accountability + Office (GAO) found that the dramatic increase in oil and natural gas development + on federal lands over the past six years has stretched the staff of the BLM + to a point that it has been unable to meet its environmental protection responsibilities.", + "language": "en"}, {"id": "2", "text": "David Schmidt, senior vice president--Food + Safety, International Food Information Council (IFIC), Washington, D.C., discussed + the physical activity component.", "language": "en"}, {"id": "3", "text": "I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '1196' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: 6d9011ee-6e31-4028-b93c-c2857ad53a6a + date: Thu, 07 Oct 2021 23:51:42 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/e80afa11-69df-43f9-8497-d9f888c2b56a + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '426' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/e80afa11-69df-43f9-8497-d9f888c2b56a?showStats=True + response: + body: + string: '{"jobId":"e80afa11-69df-43f9-8497-d9f888c2b56a","lastUpdateDateTime":"2021-10-07T23:51:43Z","createdDateTime":"2021-10-07T23:51:42Z","expirationDateTime":"2021-10-08T23:51:42Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"customMultiClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:51:43.4957598Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","classifications":[],"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","classifications":[],"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"3","classifications":[{"category":"BookRestaurant","confidenceScore":0.97}],"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[],"projectName":"textanalytics_multi_category_classify_project_name","deploymentName":"textanalytics_multi_category_classify_project_name"}}]}}' + headers: + apim-request-id: 21e54369-d37d-441e-bd50-e90462fcf289 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:51:47 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '159' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/e80afa11-69df-43f9-8497-d9f888c2b56a?showStats=True +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_of_same_action.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_of_same_action.yaml new file mode 100644 index 000000000000..37272ed82a57 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_of_same_action.yaml @@ -0,0 +1,340 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "2"}, {"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": + "UnicodeCodePoint"}, "taskName": "7"}], "entityRecognitionPiiTasks": [{"parameters": + {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, + "taskName": "1"}, {"parameters": {"model-version": "latest", "loggingOptOut": + true, "piiCategories": ["USSocialSecurityNumber"], "stringIndexType": "UnicodeCodePoint"}, + "taskName": "5"}], "keyPhraseExtractionTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false}, "taskName": "6"}, {"parameters": {"model-version": + "latest", "loggingOptOut": false}, "taskName": "11"}], "entityLinkingTasks": + [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": + "UnicodeCodePoint"}, "taskName": "3"}, {"parameters": {"model-version": "latest", + "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "9"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "0"}, {"parameters": + {"model-version": "latest", "loggingOptOut": false, "opinionMining": true}, + "taskName": "8"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": + 3, "sortBy": "Rank"}, "taskName": "4"}, {"parameters": {"model-version": "latest", + "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": + 1, "sortBy": "Offset"}, "taskName": "10"}], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "28", "text": "My SSN is 859-98-0987. + Here is another sentence.", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 + your Brazilian CPF number? Here is another sentence.", "language": "en"}, {"id": + "5", "text": "A recent report by the Government Accountability Office (GAO) + found that the dramatic increase in oil and natural gas development on federal + lands over the past six years has stretched the staff of the BLM to a point + that it has been unable to meet its environmental protection responsibilities.", + "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '2390' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: e74616e9-4341-4673-a43a-f6553115a952 + date: Thu, 07 Oct 2021 23:51:48 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/cd102a7a-8695-4a06-8a8e-69e68ca7758f + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '1514' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/cd102a7a-8695-4a06-8a8e-69e68ca7758f + response: + body: + string: '{"jobId":"cd102a7a-8695-4a06-8a8e-69e68ca7758f","lastUpdateDateTime":"2021-10-07T23:51:49Z","createdDateTime":"2021-10-07T23:51:47Z","expirationDateTime":"2021-10-08T23:51:47Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":12,"total":12}}' + headers: + apim-request-id: 30c3cca1-99d6-4bee-8890-c2d29dcc53c7 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:51:53 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '13' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/cd102a7a-8695-4a06-8a8e-69e68ca7758f +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/cd102a7a-8695-4a06-8a8e-69e68ca7758f + response: + body: + string: '{ "error": { "code": "Timeout", "message": "The operation was timeout." + } }' + headers: + apim-request-id: 59fc1801-cfab-43e7-9482-aadc4ecedcd1 + content-length: '75' + content-type: application/json + date: Thu, 07 Oct 2021 23:53:58 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + x-content-type-options: nosniff + status: + code: 408 + message: Timeout + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/cd102a7a-8695-4a06-8a8e-69e68ca7758f +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/cd102a7a-8695-4a06-8a8e-69e68ca7758f + response: + body: + string: "{\"jobId\":\"cd102a7a-8695-4a06-8a8e-69e68ca7758f\",\"lastUpdateDateTime\"\ + :\"2021-10-07T23:52:25Z\",\"createdDateTime\":\"2021-10-07T23:51:47Z\",\"\ + expirationDateTime\":\"2021-10-08T23:51:47Z\",\"status\":\"succeeded\",\"\ + errors\":[],\"displayName\":\"NA\",\"tasks\":{\"completed\":12,\"failed\"\ + :0,\"inProgress\":0,\"total\":12,\"entityRecognitionTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:52:02.6412737Z\",\"taskName\":\"2\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"entities\":[{\"text\":\"859\"\ + ,\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":10,\"length\"\ + :3,\"confidenceScore\":0.8},{\"text\":\"98\",\"category\":\"Quantity\",\"\ + subcategory\":\"Number\",\"offset\":14,\"length\":2,\"confidenceScore\":0.8},{\"\ + text\":\"0987\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\"\ + :17,\"length\":4,\"confidenceScore\":0.8}],\"warnings\":[]},{\"id\":\"3\"\ + ,\"entities\":[{\"text\":\"998\",\"category\":\"Quantity\",\"subcategory\"\ + :\"Number\",\"offset\":3,\"length\":3,\"confidenceScore\":0.8},{\"text\":\"\ + 214\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":7,\"\ + length\":3,\"confidenceScore\":0.8},{\"text\":\"865\",\"category\":\"Quantity\"\ + ,\"subcategory\":\"Number\",\"offset\":11,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"68\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":15,\"length\":2,\"confidenceScore\":0.8}],\"warnings\":[]},{\"\ + id\":\"5\",\"entities\":[{\"text\":\"Government Accountability Office\",\"\ + category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.99},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.95},{\"text\":\"oil\",\"category\":\"Product\",\"\ + offset\":98,\"length\":3,\"confidenceScore\":0.66},{\"text\":\"natural\",\"\ + category\":\"Product\",\"offset\":106,\"length\":7,\"confidenceScore\":0.65},{\"\ + text\":\"past six years\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\"\ + ,\"offset\":156,\"length\":14,\"confidenceScore\":0.8},{\"text\":\"BLM\",\"\ + category\":\"Organization\",\"offset\":202,\"length\":3,\"confidenceScore\"\ + :0.94},{\"text\":\"environmental protection\",\"category\":\"Skill\",\"offset\"\ + :253,\"length\":24,\"confidenceScore\":0.83}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-06-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:52:03.6794157Z\"\ + ,\"taskName\":\"7\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[{\"text\":\"859\",\"category\":\"Quantity\",\"subcategory\"\ + :\"Number\",\"offset\":10,\"length\":3,\"confidenceScore\":0.8},{\"text\"\ + :\"98\",\"category\":\"Quantity\",\"subcategory\":\"Number\",\"offset\":14,\"\ + length\":2,\"confidenceScore\":0.8},{\"text\":\"0987\",\"category\":\"Quantity\"\ + ,\"subcategory\":\"Number\",\"offset\":17,\"length\":4,\"confidenceScore\"\ + :0.8}],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"text\":\"998\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":3,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"214\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":7,\"length\":3,\"confidenceScore\":0.8},{\"text\":\"865\",\"category\"\ + :\"Quantity\",\"subcategory\":\"Number\",\"offset\":11,\"length\":3,\"confidenceScore\"\ + :0.8},{\"text\":\"68\",\"category\":\"Quantity\",\"subcategory\":\"Number\"\ + ,\"offset\":15,\"length\":2,\"confidenceScore\":0.8}],\"warnings\":[]},{\"\ + id\":\"5\",\"entities\":[{\"text\":\"Government Accountability Office\",\"\ + category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.99},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.95},{\"text\":\"oil\",\"category\":\"Product\",\"\ + offset\":98,\"length\":3,\"confidenceScore\":0.66},{\"text\":\"natural\",\"\ + category\":\"Product\",\"offset\":106,\"length\":7,\"confidenceScore\":0.65},{\"\ + text\":\"past six years\",\"category\":\"DateTime\",\"subcategory\":\"DateRange\"\ + ,\"offset\":156,\"length\":14,\"confidenceScore\":0.8},{\"text\":\"BLM\",\"\ + category\":\"Organization\",\"offset\":202,\"length\":3,\"confidenceScore\"\ + :0.94},{\"text\":\"environmental protection\",\"category\":\"Skill\",\"offset\"\ + :253,\"length\":24,\"confidenceScore\":0.83}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-06-01\"}}],\"entityLinkingTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:52:04.7730864Z\",\"taskName\":\"3\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"entities\":[],\"warnings\":[]},{\"\ + id\":\"3\",\"entities\":[{\"bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\"\ + ,\"name\":\"Brazil\",\"matches\":[{\"text\":\"Brazilian\",\"offset\":23,\"\ + length\":9,\"confidenceScore\":0.07}],\"language\":\"en\",\"id\":\"Brazil\"\ + ,\"url\":\"https://en.wikipedia.org/wiki/Brazil\",\"dataSource\":\"Wikipedia\"\ + },{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\",\"name\":\"Cadastro\ + \ de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF number\",\"offset\"\ + :33,\"length\":10,\"confidenceScore\":0.82}],\"language\":\"en\",\"id\":\"\ + Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:52:14.3765305Z\"\ + ,\"taskName\":\"9\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"entities\":[],\"warnings\":[]},{\"id\":\"3\",\"entities\":[{\"\ + bingId\":\"a828cf41-b938-49fe-7986-4b336618d413\",\"name\":\"Brazil\",\"matches\"\ + :[{\"text\":\"Brazilian\",\"offset\":23,\"length\":9,\"confidenceScore\":0.07}],\"\ + language\":\"en\",\"id\":\"Brazil\",\"url\":\"https://en.wikipedia.org/wiki/Brazil\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"f4df6dc5-6807-165b-d7ad-9cfb628549f4\"\ + ,\"name\":\"Cadastro de Pessoas F\xEDsicas\",\"matches\":[{\"text\":\"CPF\ + \ number\",\"offset\":33,\"length\":10,\"confidenceScore\":0.82}],\"language\"\ + :\"en\",\"id\":\"Cadastro de Pessoas F\xEDsicas\",\"url\":\"https://en.wikipedia.org/wiki/Cadastro_de_Pessoas_F\xED\ + sicas\",\"dataSource\":\"Wikipedia\"}],\"warnings\":[]},{\"id\":\"5\",\"entities\"\ + :[{\"bingId\":\"e6fa81f3-561c-8207-0ca8-5b0163484c4d\",\"name\":\"Government\ + \ Accountability Office\",\"matches\":[{\"text\":\"Government Accountability\ + \ Office (GAO\",\"offset\":23,\"length\":37,\"confidenceScore\":0.82}],\"\ + language\":\"en\",\"id\":\"Government Accountability Office\",\"url\":\"https://en.wikipedia.org/wiki/Government_Accountability_Office\"\ + ,\"dataSource\":\"Wikipedia\"},{\"bingId\":\"936aa335-4726-b0db-03a5-2f3755b776e6\"\ + ,\"name\":\"Bureau of Land Management\",\"matches\":[{\"text\":\"BLM\",\"\ + offset\":202,\"length\":3,\"confidenceScore\":0.5}],\"language\":\"en\",\"\ + id\":\"Bureau of Land Management\",\"url\":\"https://en.wikipedia.org/wiki/Bureau_of_Land_Management\"\ + ,\"dataSource\":\"Wikipedia\"}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-06-01\"}}],\"entityRecognitionPiiTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:52:02.7634295Z\",\"taskName\":\"1\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"redactedText\":\"My SSN is ***********. Here\ + \ is another sentence.\",\"id\":\"28\",\"entities\":[{\"text\":\"859-98-0987\"\ + ,\"category\":\"USSocialSecurityNumber\",\"offset\":10,\"length\":11,\"confidenceScore\"\ + :0.65}],\"warnings\":[]},{\"redactedText\":\"Is 998.214.865-68 your Brazilian\ + \ CPF number? Here is another sentence.\",\"id\":\"3\",\"entities\":[],\"\ + warnings\":[]},{\"redactedText\":\"A recent report by the ********************************\ + \ (***) found that the dramatic increase in oil and natural gas development\ + \ on federal lands over the ************** has stretched the staff of the\ + \ *** to a point that it has been unable to meet its environmental protection\ + \ responsibilities.\",\"id\":\"5\",\"entities\":[{\"text\":\"Government Accountability\ + \ Office\",\"category\":\"Organization\",\"offset\":23,\"length\":32,\"confidenceScore\"\ + :0.96},{\"text\":\"GAO\",\"category\":\"Organization\",\"offset\":57,\"length\"\ + :3,\"confidenceScore\":0.93},{\"text\":\"past six years\",\"category\":\"\ + DateTime\",\"subcategory\":\"DateRange\",\"offset\":156,\"length\":14,\"confidenceScore\"\ + :0.8},{\"text\":\"BLM\",\"category\":\"Organization\",\"offset\":202,\"length\"\ + :3,\"confidenceScore\":0.9}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-01-15\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:51:57.0105372Z\"\ + ,\"taskName\":\"5\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + redactedText\":\"My SSN is ***********. Here is another sentence.\",\"id\"\ + :\"28\",\"entities\":[{\"text\":\"859-98-0987\",\"category\":\"USSocialSecurityNumber\"\ + ,\"offset\":10,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]},{\"\ + redactedText\":\"Is 998.214.865-68 your Brazilian CPF number? Here is another\ + \ sentence.\",\"id\":\"3\",\"entities\":[],\"warnings\":[]},{\"redactedText\"\ + :\"A recent report by the Government Accountability Office (GAO) found that\ + \ the dramatic increase in oil and natural gas development on federal lands\ + \ over the past six years has stretched the staff of the BLM to a point that\ + \ it has been unable to meet its environmental protection responsibilities.\"\ + ,\"id\":\"5\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-01-15\"}}],\"extractiveSummarizationTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:52:14.5961259Z\",\"taskName\":\"4\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"sentences\":[{\"text\":\"My\ + \ SSN is 859-98-0987.\",\"rankScore\":1.0,\"offset\":0,\"length\":22},{\"\ + text\":\"Here is another sentence.\",\"rankScore\":0.0,\"offset\":23,\"length\"\ + :25}],\"warnings\":[]},{\"id\":\"3\",\"sentences\":[{\"text\":\"Is 998.214.865-68\ + \ your Brazilian CPF number?\",\"rankScore\":1.0,\"offset\":0,\"length\":44},{\"\ + text\":\"Here is another sentence.\",\"rankScore\":0.0,\"offset\":45,\"length\"\ + :25}],\"warnings\":[]},{\"id\":\"5\",\"sentences\":[{\"text\":\"A recent report\ + \ by the Government Accountability Office (GAO) found that the dramatic increase\ + \ in oil and natural gas development on federal lands over the past six years\ + \ has stretched the staff of the BLM to a point that it has been unable to\ + \ meet its environmental protection responsibilities.\",\"rankScore\":1.0,\"\ + offset\":0,\"length\":295}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2021-08-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:52:02.7537509Z\"\ + ,\"taskName\":\"10\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"sentences\":[{\"text\":\"My SSN is 859-98-0987.\",\"rankScore\"\ + :1.0,\"offset\":0,\"length\":22}],\"warnings\":[]},{\"id\":\"3\",\"sentences\"\ + :[{\"text\":\"Is 998.214.865-68 your Brazilian CPF number?\",\"rankScore\"\ + :1.0,\"offset\":0,\"length\":44}],\"warnings\":[]},{\"id\":\"5\",\"sentences\"\ + :[{\"text\":\"A recent report by the Government Accountability Office (GAO)\ + \ found that the dramatic increase in oil and natural gas development on federal\ + \ lands over the past six years has stretched the staff of the BLM to a point\ + \ that it has been unable to meet its environmental protection responsibilities.\"\ + ,\"rankScore\":1.0,\"offset\":0,\"length\":295}],\"warnings\":[]}],\"errors\"\ + :[],\"modelVersion\":\"2021-08-01\"}}],\"keyPhraseExtractionTasks\":[{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:52:04.3857477Z\",\"taskName\":\"6\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"keyPhrases\":[\"SSN\",\"sentence\"\ + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"Brazilian CPF number\"\ + ,\"sentence\"],\"warnings\":[]},{\"id\":\"5\",\"keyPhrases\":[\"Government\ + \ Accountability Office\",\"natural gas development\",\"past six years\",\"\ + environmental protection responsibilities\",\"recent report\",\"dramatic increase\"\ + ,\"federal lands\",\"GAO\",\"oil\",\"staff\",\"BLM\",\"point\"],\"warnings\"\ + :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}},{\"lastUpdateDateTime\"\ + :\"2021-10-07T23:52:09.9366089Z\",\"taskName\":\"11\",\"state\":\"succeeded\"\ + ,\"results\":{\"documents\":[{\"id\":\"28\",\"keyPhrases\":[\"SSN\",\"sentence\"\ + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"Brazilian CPF number\"\ + ,\"sentence\"],\"warnings\":[]},{\"id\":\"5\",\"keyPhrases\":[\"Government\ + \ Accountability Office\",\"natural gas development\",\"past six years\",\"\ + environmental protection responsibilities\",\"recent report\",\"dramatic increase\"\ + ,\"federal lands\",\"GAO\",\"oil\",\"staff\",\"BLM\",\"point\"],\"warnings\"\ + :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}}],\"sentimentAnalysisTasks\"\ + :[{\"lastUpdateDateTime\":\"2021-10-07T23:52:25.6594929Z\",\"taskName\":\"\ + 0\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"id\":\"28\",\"\ + sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\"\ + :0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.0,\"neutral\":1.0,\"negative\":0.0},\"offset\":0,\"length\"\ + :22,\"text\":\"My SSN is 859-98-0987.\"},{\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.02,\"neutral\":0.9,\"negative\":0.08},\"offset\":23,\"length\"\ + :25,\"text\":\"Here is another sentence.\"}],\"warnings\":[]},{\"id\":\"3\"\ + ,\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"neutral\"\ + :0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.0,\"neutral\":1.0,\"negative\":0.0},\"offset\":0,\"length\"\ + :44,\"text\":\"Is 998.214.865-68 your Brazilian CPF number?\"},{\"sentiment\"\ + :\"neutral\",\"confidenceScores\":{\"positive\":0.02,\"neutral\":0.9,\"negative\"\ + :0.08},\"offset\":45,\"length\":25,\"text\":\"Here is another sentence.\"\ + }],\"warnings\":[]},{\"id\":\"5\",\"sentiment\":\"neutral\",\"confidenceScores\"\ + :{\"positive\":0.23,\"neutral\":0.61,\"negative\":0.16},\"sentences\":[{\"\ + sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.23,\"neutral\"\ + :0.61,\"negative\":0.16},\"offset\":0,\"length\":295,\"text\":\"A recent report\ + \ by the Government Accountability Office (GAO) found that the dramatic increase\ + \ in oil and natural gas development on federal lands over the past six years\ + \ has stretched the staff of the BLM to a point that it has been unable to\ + \ meet its environmental protection responsibilities.\"}],\"warnings\":[]}],\"\ + errors\":[],\"modelVersion\":\"2020-04-01\"}},{\"lastUpdateDateTime\":\"2021-10-07T23:52:19.6628124Z\"\ + ,\"taskName\":\"8\",\"state\":\"succeeded\",\"results\":{\"documents\":[{\"\ + id\":\"28\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\":0.01,\"\ + neutral\":0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"neutral\"\ + ,\"confidenceScores\":{\"positive\":0.0,\"neutral\":1.0,\"negative\":0.0},\"\ + offset\":0,\"length\":22,\"text\":\"My SSN is 859-98-0987.\",\"targets\":[],\"\ + assessments\":[]},{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\"\ + :0.02,\"neutral\":0.9,\"negative\":0.08},\"offset\":23,\"length\":25,\"text\"\ + :\"Here is another sentence.\",\"targets\":[],\"assessments\":[]}],\"warnings\"\ + :[]},{\"id\":\"3\",\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\"\ + :0.01,\"neutral\":0.95,\"negative\":0.04},\"sentences\":[{\"sentiment\":\"\ + neutral\",\"confidenceScores\":{\"positive\":0.0,\"neutral\":1.0,\"negative\"\ + :0.0},\"offset\":0,\"length\":44,\"text\":\"Is 998.214.865-68 your Brazilian\ + \ CPF number?\",\"targets\":[],\"assessments\":[]},{\"sentiment\":\"neutral\"\ + ,\"confidenceScores\":{\"positive\":0.02,\"neutral\":0.9,\"negative\":0.08},\"\ + offset\":45,\"length\":25,\"text\":\"Here is another sentence.\",\"targets\"\ + :[],\"assessments\":[]}],\"warnings\":[]},{\"id\":\"5\",\"sentiment\":\"neutral\"\ + ,\"confidenceScores\":{\"positive\":0.23,\"neutral\":0.61,\"negative\":0.16},\"\ + sentences\":[{\"sentiment\":\"neutral\",\"confidenceScores\":{\"positive\"\ + :0.23,\"neutral\":0.61,\"negative\":0.16},\"offset\":0,\"length\":295,\"text\"\ + :\"A recent report by the Government Accountability Office (GAO) found that\ + \ the dramatic increase in oil and natural gas development on federal lands\ + \ over the past six years has stretched the staff of the BLM to a point that\ + \ it has been unable to meet its environmental protection responsibilities.\"\ + ,\"targets\":[],\"assessments\":[]}],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ + :\"2020-04-01\"}}]}}" + headers: + apim-request-id: 2b863227-7c8d-4a73-9acf-8bb8e886a776 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:53:59 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '894' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/cd102a7a-8695-4a06-8a8e-69e68ca7758f +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_of_same_action_with_partial_results.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_of_same_action_with_partial_results.yaml new file mode 100644 index 000000000000..5d70fd48fc81 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_of_same_action_with_partial_results.yaml @@ -0,0 +1,129 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [{"parameters": + {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, + "taskName": "1"}], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], + "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [{"parameters": + {"model-version": "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", + "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "0"}, {"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint", "sentenceCount": + 5, "sortBy": "Offset"}, "taskName": "2"}], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "5", "text": "A recent report by the + Government Accountability Office (GAO) found that the dramatic increase in oil + and natural gas development on federal lands over the past six years has stretched + the staff of the BLM to a point that it has been unable to meet its environmental + protection responsibilities.", "language": "en"}, {"id": "2", "text": "", "language": + "en"}]}}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '1176' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: 8f41bc8b-bff4-4462-95d0-0b196420faf0 + date: Thu, 07 Oct 2021 23:54:01 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a59e81f0-4bdf-493c-8df2-491ab134fb0c + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '386' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a59e81f0-4bdf-493c-8df2-491ab134fb0c + response: + body: + string: '{"jobId":"a59e81f0-4bdf-493c-8df2-491ab134fb0c","lastUpdateDateTime":"2021-10-07T23:54:01Z","createdDateTime":"2021-10-07T23:54:00Z","expirationDateTime":"2021-10-08T23:54:00Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":3,"total":3}}' + headers: + apim-request-id: 9fd820b5-2887-4901-9c1f-648ea26fd1b3 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:54:06 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '9' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a59e81f0-4bdf-493c-8df2-491ab134fb0c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a59e81f0-4bdf-493c-8df2-491ab134fb0c + response: + body: + string: upstream request timeout + headers: + apim-request-id: fce116e8-cbc3-4b5d-988b-6a256fd1d663 + content-type: text/plain + date: Thu, 07 Oct 2021 23:56:10 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + status: + code: 504 + message: Gateway Timeout + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a59e81f0-4bdf-493c-8df2-491ab134fb0c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/a59e81f0-4bdf-493c-8df2-491ab134fb0c + response: + body: + string: '{"jobId":"a59e81f0-4bdf-493c-8df2-491ab134fb0c","lastUpdateDateTime":"2021-10-07T23:54:24Z","createdDateTime":"2021-10-07T23:54:00Z","expirationDateTime":"2021-10-08T23:54:00Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":0,"total":3,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:54:08.3388571Z","taskName":"1","state":"succeeded","results":{"documents":[{"redactedText":"A + recent report by the ******************************** (***) found that the + dramatic increase in oil and natural gas development on federal lands over + the ************** has stretched the staff of the *** to a point that it has + been unable to meet its environmental protection responsibilities.","id":"5","entities":[{"text":"Government + Accountability Office","category":"Organization","offset":23,"length":32,"confidenceScore":0.96},{"text":"GAO","category":"Organization","offset":57,"length":3,"confidenceScore":0.93},{"text":"past + six years","category":"DateTime","subcategory":"DateRange","offset":156,"length":14,"confidenceScore":0.8},{"text":"BLM","category":"Organization","offset":202,"length":3,"confidenceScore":0.9}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:54:24.2285759Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"5","sentences":[{"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities.","rankScore":1.0,"offset":0,"length":295}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-08-01"}},{"lastUpdateDateTime":"2021-10-07T23:54:13.1157958Z","taskName":"2","state":"succeeded","results":{"documents":[{"id":"5","sentences":[{"text":"A + recent report by the Government Accountability Office (GAO) found that the + dramatic increase in oil and natural gas development on federal lands over + the past six years has stretched the staff of the BLM to a point that it has + been unable to meet its environmental protection responsibilities.","rankScore":1.0,"offset":0,"length":295}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-08-01"}}]}}' + headers: + apim-request-id: 0978d8a6-2dca-49d3-91d3-18dc1bb905ae + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:56:12 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '650' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/a59e81f0-4bdf-493c-8df2-491ab134fb0c +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_pages_of_results_returned_successfully.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_pages_of_results_returned_successfully.yaml index 5a4d22ea91f5..ddb2b0c2bcc7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_pages_of_results_returned_successfully.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_multiple_pages_of_results_returned_successfully.yaml @@ -1,25 +1,27 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "0", "text": "hello world", "language": "en"}, {"id": - "1", "text": "hello world", "language": "en"}, {"id": "2", "text": "hello world", - "language": "en"}, {"id": "3", "text": "hello world", "language": "en"}, {"id": - "4", "text": "hello world", "language": "en"}, {"id": "5", "text": "hello world", - "language": "en"}, {"id": "6", "text": "hello world", "language": "en"}, {"id": - "7", "text": "hello world", "language": "en"}, {"id": "8", "text": "hello world", - "language": "en"}, {"id": "9", "text": "hello world", "language": "en"}, {"id": - "10", "text": "hello world", "language": "en"}, {"id": "11", "text": "hello - world", "language": "en"}, {"id": "12", "text": "hello world", "language": "en"}, - {"id": "13", "text": "hello world", "language": "en"}, {"id": "14", "text": + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "hello world", "language": + "en"}, {"id": "1", "text": "hello world", "language": "en"}, {"id": "2", "text": + "hello world", "language": "en"}, {"id": "3", "text": "hello world", "language": + "en"}, {"id": "4", "text": "hello world", "language": "en"}, {"id": "5", "text": + "hello world", "language": "en"}, {"id": "6", "text": "hello world", "language": + "en"}, {"id": "7", "text": "hello world", "language": "en"}, {"id": "8", "text": + "hello world", "language": "en"}, {"id": "9", "text": "hello world", "language": + "en"}, {"id": "10", "text": "hello world", "language": "en"}, {"id": "11", "text": + "hello world", "language": "en"}, {"id": "12", "text": "hello world", "language": + "en"}, {"id": "13", "text": "hello world", "language": "en"}, {"id": "14", "text": "hello world", "language": "en"}, {"id": "15", "text": "hello world", "language": "en"}, {"id": "16", "text": "hello world", "language": "en"}, {"id": "17", "text": "hello world", "language": "en"}, {"id": "18", "text": "hello world", "language": @@ -32,60 +34,82 @@ interactions: Accept: - application/json, text/json Content-Length: - - '2218' + - '2433' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: d776de9b-7b95-41d3-a6e1-570d25a1f529 - date: Mon, 02 Aug 2021 21:46:28 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2 + apim-request-id: 095a2a29-6b80-4a43-afe7-fb81e4665a3e + date: Thu, 07 Oct 2021 23:56:13 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '611' + x-envoy-upstream-service-time: '1424' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True + response: + body: + string: '{"jobId":"917f1d3b-2f41-4b9e-8cae-52038ed2d740","lastUpdateDateTime":"2021-10-07T23:56:13Z","createdDateTime":"2021-10-07T23:56:12Z","expirationDateTime":"2021-10-08T23:56:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + headers: + apim-request-id: 8df2b276-a96e-426c-90b1-6563a255c9fe + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:56:18 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '11' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True response: body: - string: '{"jobId":"bba0231d-9098-48a3-b505-82461b35e6d2","lastUpdateDateTime":"2021-08-02T21:46:28Z","createdDateTime":"2021-08-02T21:46:27Z","expirationDateTime":"2021-08-03T21:46:27Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + string: '{"jobId":"917f1d3b-2f41-4b9e-8cae-52038ed2d740","lastUpdateDateTime":"2021-10-07T23:56:20Z","createdDateTime":"2021-10-07T23:56:12Z","expirationDateTime":"2021-10-08T23:56:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' headers: - apim-request-id: 6a2a626f-edaa-43b8-8d0a-9f58322b3d90 + apim-request-id: 5554ad54-073c-47c9-ae73-c3f2d67f6b1c content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:33 GMT + date: Thu, 07 Oct 2021 23:56:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '16' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True response: body: - string: '{"jobId":"bba0231d-9098-48a3-b505-82461b35e6d2","lastUpdateDateTime":"2021-08-02T21:46:35Z","createdDateTime":"2021-08-02T21:46:27Z","expirationDateTime":"2021-08-03T21:46:27Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:34.8334376Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.0157689Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.064167Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello + string: '{"jobId":"917f1d3b-2f41-4b9e-8cae-52038ed2d740","lastUpdateDateTime":"2021-10-07T23:56:26Z","createdDateTime":"2021-10-07T23:56:12Z","expirationDateTime":"2021-10-08T23:56:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":2,"failed":0,"inProgress":4,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:25.2634688Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:26.0452805Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello @@ -105,49 +129,29 @@ interactions: world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.5412821Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"3","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"5","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"6","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"7","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"8","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"9","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"10","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"11","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"12","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"13","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"14","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"15","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"16","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"17","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"18","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?$skip=20&$top=5&showStats=True"}' + world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?$skip=20&$top=5&showStats=True"}' headers: - apim-request-id: 345cd50d-a0e2-491f-a609-0100b88e83f1 + apim-request-id: c20ab7e4-8fb3-4fad-a275-2f9a73ca8220 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:38 GMT + date: Thu, 07 Oct 2021 23:56:29 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '636' + x-envoy-upstream-service-time: '598' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True response: body: - string: '{"jobId":"bba0231d-9098-48a3-b505-82461b35e6d2","lastUpdateDateTime":"2021-08-02T21:46:40Z","createdDateTime":"2021-08-02T21:46:27Z","expirationDateTime":"2021-08-03T21:46:27Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:34.8334376Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.0157689Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.064167Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello + string: '{"jobId":"917f1d3b-2f41-4b9e-8cae-52038ed2d740","lastUpdateDateTime":"2021-10-07T23:56:34Z","createdDateTime":"2021-10-07T23:56:12Z","expirationDateTime":"2021-10-08T23:56:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":3,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:25.2634688Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:34.3879195Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:26.0452805Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello @@ -167,69 +171,29 @@ interactions: world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.5412821Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"3","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"5","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"6","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"7","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"8","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"9","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"10","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"11","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"12","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"13","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"14","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"15","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"16","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"17","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"18","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:40.7074119Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"1","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"3","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"4","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"5","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"6","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"7","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"8","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"9","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"10","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"11","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"12","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"13","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"14","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"15","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"16","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"17","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"18","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?$skip=20&$top=5&showStats=True"}' + world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?$skip=20&$top=5&showStats=True"}' headers: - apim-request-id: 73c52cfd-a953-48ee-ba84-b0b56311a071 + apim-request-id: 7efb9e40-baeb-4069-98aa-118118fb4184 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:44 GMT + date: Thu, 07 Oct 2021 23:56:34 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '735' + x-envoy-upstream-service-time: '715' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True response: body: - string: '{"jobId":"bba0231d-9098-48a3-b505-82461b35e6d2","lastUpdateDateTime":"2021-08-02T21:46:40Z","createdDateTime":"2021-08-02T21:46:27Z","expirationDateTime":"2021-08-03T21:46:27Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:34.8334376Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.0157689Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.064167Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello + string: '{"jobId":"917f1d3b-2f41-4b9e-8cae-52038ed2d740","lastUpdateDateTime":"2021-10-07T23:56:34Z","createdDateTime":"2021-10-07T23:56:12Z","expirationDateTime":"2021-10-08T23:56:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":3,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:25.2634688Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:34.3879195Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:26.0452805Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello @@ -249,69 +213,29 @@ interactions: world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.5412821Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"3","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"4","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"5","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"6","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"7","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"8","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"9","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"10","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"11","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"12","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"13","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"14","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"15","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"16","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"17","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"18","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:40.7074119Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"1","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"3","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"4","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"5","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"6","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"7","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"8","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"9","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"10","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"11","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"12","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"13","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"14","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"15","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"16","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"17","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"18","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?$skip=20&$top=5&showStats=True"}' + world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?$skip=20&$top=5&showStats=True"}' headers: - apim-request-id: 7dbe88f4-6a73-48cf-be88-332cbd8e0b30 + apim-request-id: ea3f3e6b-456f-4021-a6bb-5bcb4d9499f1 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:50 GMT + date: Thu, 07 Oct 2021 23:56:40 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '711' + x-envoy-upstream-service-time: '706' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True response: body: - string: '{"jobId":"bba0231d-9098-48a3-b505-82461b35e6d2","lastUpdateDateTime":"2021-08-02T21:46:53Z","createdDateTime":"2021-08-02T21:46:27Z","expirationDateTime":"2021-08-03T21:46:27Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:34.8334376Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.0157689Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.064167Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello + string: '{"jobId":"917f1d3b-2f41-4b9e-8cae-52038ed2d740","lastUpdateDateTime":"2021-10-07T23:56:43Z","createdDateTime":"2021-10-07T23:56:12Z","expirationDateTime":"2021-10-08T23:56:12Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:25.2634688Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:34.3879195Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:26.0452805Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"redactedText":"hello world","id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello @@ -331,27 +255,7 @@ interactions: world","id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello world","id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":"hello - world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:53.9909405Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.5412821Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello + world","id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:43.6796446Z","taskName":"5","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"3","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"4","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"5","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"6","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"7","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"8","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"9","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"10","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"11","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"12","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"13","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"14","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"15","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"16","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"17","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"18","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":11,"transactionsCount":1},"sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:42.9523696Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"3","keyPhrases":["hello @@ -371,7 +275,7 @@ interactions: world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"17","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"18","keyPhrases":["hello world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":["hello - world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:40.7074119Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello + world"],"statistics":{"charactersCount":11,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:43.1729497Z","taskName":"4","state":"succeeded","results":{"statistics":{"documentsCount":20,"validDocumentsCount":20,"erroneousDocumentsCount":0,"transactionsCount":20},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"1","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"2","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"3","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello @@ -391,57 +295,52 @@ interactions: world"}],"warnings":[]},{"id":"17","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"18","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":11,"transactionsCount":1},"confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello - world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?$skip=20&$top=5&showStats=True"}' + world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]},"@nextLink":"https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?$skip=20&$top=5&showStats=True"}' headers: - apim-request-id: 6d0b3311-7486-40c0-a982-b8f902cda715 + apim-request-id: 2360e371-412f-40f5-9e9e-d30631c532a7 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:56 GMT + date: Thu, 07 Oct 2021 23:56:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '895' + x-envoy-upstream-service-time: '2163' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=True - request: body: null headers: Accept: - application/json, text/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=false&$top=5&$skip=20 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=false&$top=5&$skip=20 response: body: - string: '{"jobId":"bba0231d-9098-48a3-b505-82461b35e6d2","lastUpdateDateTime":"2021-08-02T21:46:53Z","createdDateTime":"2021-08-02T21:46:27Z","expirationDateTime":"2021-08-03T21:46:27Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:34.8334376Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"20","entities":[],"warnings":[]},{"id":"21","entities":[],"warnings":[]},{"id":"22","entities":[],"warnings":[]},{"id":"23","entities":[],"warnings":[]},{"id":"24","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.0157689Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"20","entities":[],"warnings":[]},{"id":"21","entities":[],"warnings":[]},{"id":"22","entities":[],"warnings":[]},{"id":"23","entities":[],"warnings":[]},{"id":"24","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.064167Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"hello + string: '{"jobId":"917f1d3b-2f41-4b9e-8cae-52038ed2d740","lastUpdateDateTime":"2021-10-07T23:56:43Z","createdDateTime":"2021-10-07T23:56:12Z","expirationDateTime":"2021-10-08T23:56:12Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:25.2634688Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"20","entities":[],"warnings":[]},{"id":"21","entities":[],"warnings":[]},{"id":"22","entities":[],"warnings":[]},{"id":"23","entities":[],"warnings":[]},{"id":"24","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:34.3879195Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"20","entities":[],"warnings":[]},{"id":"21","entities":[],"warnings":[]},{"id":"22","entities":[],"warnings":[]},{"id":"23","entities":[],"warnings":[]},{"id":"24","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:26.0452805Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":"hello world","id":"20","entities":[],"warnings":[]},{"redactedText":"hello world","id":"21","entities":[],"warnings":[]},{"redactedText":"hello world","id":"22","entities":[],"warnings":[]},{"redactedText":"hello world","id":"23","entities":[],"warnings":[]},{"redactedText":"hello - world","id":"24","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:53.9909405Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"documents":[{"id":"20","sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"21","sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"22","sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"23","sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]},{"id":"24","sentences":[{"text":"hello - world","rankScore":1.0,"offset":0,"length":11}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:35.5412821Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"20","keyPhrases":["hello + world","id":"24","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:43.6796446Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"20","sentences":[],"warnings":[]},{"id":"21","sentences":[],"warnings":[]},{"id":"22","sentences":[],"warnings":[]},{"id":"23","sentences":[],"warnings":[]},{"id":"24","sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:42.9523696Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"20","keyPhrases":["hello world"],"warnings":[]},{"id":"21","keyPhrases":["hello world"],"warnings":[]},{"id":"22","keyPhrases":["hello world"],"warnings":[]},{"id":"23","keyPhrases":["hello world"],"warnings":[]},{"id":"24","keyPhrases":["hello - world"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:46:40.7074119Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"documents":[{"id":"20","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello + world"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:43.1729497Z","taskName":"4","state":"succeeded","results":{"documents":[{"id":"20","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"21","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"22","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"23","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]},{"id":"24","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"hello world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: - apim-request-id: 607064d5-dde2-4d88-a2c3-22b699673cfa + apim-request-id: ff3b0bec-39ea-4d51-acf0-07d44f553c5e content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:46:56 GMT + date: Thu, 07 Oct 2021 23:56:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '363' + x-envoy-upstream-service-time: '578' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze/jobs/bba0231d-9098-48a3-b505-82461b35e6d2?showStats=false&$top=5&$skip=20 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze/jobs/917f1d3b-2f41-4b9e-8cae-52038ed2d740?showStats=false&$top=5&$skip=20 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_out_of_order_ids_multiple_tasks.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_out_of_order_ids_multiple_tasks.yaml index cf5aa0f2b77e..d306054bec33 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_out_of_order_ids_multiple_tasks.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_out_of_order_ids_multiple_tasks.yaml @@ -1,108 +1,176 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "56", "text": ":)", "language": "en"}, {"id": "0", "text": - ":(", "language": "en"}, {"id": "19", "text": ":P", "language": "en"}, {"id": - "1", "text": ":D", "language": "en"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "56", "text": ":)", "language": + "en"}, {"id": "0", "text": ":(", "language": "en"}, {"id": "19", "text": ":P", + "language": "en"}, {"id": "1", "text": ":D", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '1035' + - '1250' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: e8424112-9878-4972-af8c-6e047528c643 - date: Mon, 02 Aug 2021 21:46:58 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/9828f1ed-769e-4ee5-b6ce-d87d9fe0f116 + apim-request-id: 8d152277-fd28-482a-a223-9e51a30c5973 + date: Thu, 07 Oct 2021 23:56:49 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '320' + x-envoy-upstream-service-time: '783' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f + response: + body: + string: '{"jobId":"1947e3bc-675c-42c4-8ee0-255c7a795e0f","lastUpdateDateTime":"2021-10-07T23:56:50Z","createdDateTime":"2021-10-07T23:56:49Z","expirationDateTime":"2021-10-08T23:56:49Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + headers: + apim-request-id: 26370b51-e243-4d8b-8910-87a0e6d8b702 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:56:54 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '16' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f + response: + body: + string: '{"jobId":"1947e3bc-675c-42c4-8ee0-255c7a795e0f","lastUpdateDateTime":"2021-10-07T23:56:57Z","createdDateTime":"2021-10-07T23:56:49Z","expirationDateTime":"2021-10-08T23:56:49Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":5,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:57.8937555Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + headers: + apim-request-id: 3e46941c-ac3f-4ffe-8f91-cb198c782a14 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:57:00 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '93' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f + response: + body: + string: '{"jobId":"1947e3bc-675c-42c4-8ee0-255c7a795e0f","lastUpdateDateTime":"2021-10-07T23:57:04Z","createdDateTime":"2021-10-07T23:56:49Z","expirationDateTime":"2021-10-08T23:56:49Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":3,"failed":0,"inProgress":3,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:57.8937555Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:04.5909725Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:03.8574516Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: 90834804-d2e4-4a91-9d8d-99548dcf4c7d + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:57:05 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '261' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/9828f1ed-769e-4ee5-b6ce-d87d9fe0f116 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f response: body: - string: '{"jobId":"9828f1ed-769e-4ee5-b6ce-d87d9fe0f116","lastUpdateDateTime":"2021-08-02T21:46:59Z","createdDateTime":"2021-08-02T21:46:58Z","expirationDateTime":"2021-08-03T21:46:58Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + string: '{"jobId":"1947e3bc-675c-42c4-8ee0-255c7a795e0f","lastUpdateDateTime":"2021-10-07T23:57:09Z","createdDateTime":"2021-10-07T23:56:49Z","expirationDateTime":"2021-10-08T23:56:49Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:57.8937555Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:04.5909725Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:03.8574516Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:09.8843237Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"56","sentences":[],"warnings":[]},{"id":"0","sentences":[],"warnings":[]},{"id":"19","sentences":[],"warnings":[]},{"id":"1","sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}]}}' headers: - apim-request-id: c09cc62a-8e29-46f8-b0e6-a644b82e0e45 + apim-request-id: 2c37efc0-c522-4012-8cf1-6426b5dd0f5a content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:03 GMT + date: Thu, 07 Oct 2021 23:57:10 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '327' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/9828f1ed-769e-4ee5-b6ce-d87d9fe0f116 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/9828f1ed-769e-4ee5-b6ce-d87d9fe0f116 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f response: body: - string: '{"jobId":"9828f1ed-769e-4ee5-b6ce-d87d9fe0f116","lastUpdateDateTime":"2021-08-02T21:47:05Z","createdDateTime":"2021-08-02T21:46:58Z","expirationDateTime":"2021-08-03T21:46:58Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:05.2917781Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:03.9905407Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:05.299537Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:05.6267931Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"documents":[{"id":"56","sentences":[{"text":":)","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"0","sentences":[{"text":":(","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"19","sentences":[{"text":":P","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"1","sentences":[{"text":":D","rankScore":1.0,"offset":0,"length":2}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:04.9356175Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' + string: '{"jobId":"1947e3bc-675c-42c4-8ee0-255c7a795e0f","lastUpdateDateTime":"2021-10-07T23:57:15Z","createdDateTime":"2021-10-07T23:56:49Z","expirationDateTime":"2021-10-08T23:56:49Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:57.8937555Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:04.5909725Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:03.8574516Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:09.8843237Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"56","sentences":[],"warnings":[]},{"id":"0","sentences":[],"warnings":[]},{"id":"19","sentences":[],"warnings":[]},{"id":"1","sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:15.796298Z","taskName":"4","state":"succeeded","results":{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: - apim-request-id: 0a291357-0994-44af-abf6-a11bb8d39a19 + apim-request-id: 08a3d91c-6b21-49af-9c81-46fe69bd65b7 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:08 GMT + date: Thu, 07 Oct 2021 23:57:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '235' + x-envoy-upstream-service-time: '427' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/9828f1ed-769e-4ee5-b6ce-d87d9fe0f116 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/9828f1ed-769e-4ee5-b6ce-d87d9fe0f116 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f response: body: - string: '{"jobId":"9828f1ed-769e-4ee5-b6ce-d87d9fe0f116","lastUpdateDateTime":"2021-08-02T21:47:10Z","createdDateTime":"2021-08-02T21:46:58Z","expirationDateTime":"2021-08-03T21:46:58Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:05.2917781Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:03.9905407Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:05.299537Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:05.6267931Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"documents":[{"id":"56","sentences":[{"text":":)","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"0","sentences":[{"text":":(","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"19","sentences":[{"text":":P","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"1","sentences":[{"text":":D","rankScore":1.0,"offset":0,"length":2}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:04.9356175Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:10.6387869Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' + string: '{"jobId":"1947e3bc-675c-42c4-8ee0-255c7a795e0f","lastUpdateDateTime":"2021-10-07T23:57:21Z","createdDateTime":"2021-10-07T23:56:49Z","expirationDateTime":"2021-10-08T23:56:49Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:56:57.8937555Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:04.5909725Z","taskName":"3","state":"succeeded","results":{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:03.8574516Z","taskName":"2","state":"succeeded","results":{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:09.8843237Z","taskName":"5","state":"succeeded","results":{"documents":[{"id":"56","sentences":[],"warnings":[]},{"id":"0","sentences":[],"warnings":[]},{"id":"19","sentences":[],"warnings":[]},{"id":"1","sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:21.1834841Z","taskName":"1","state":"succeeded","results":{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:15.796298Z","taskName":"4","state":"succeeded","results":{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: - apim-request-id: 8a3d1924-7d1a-480d-8ec5-18850128339b + apim-request-id: 77fdf504-0d8e-44a3-8435-3fa365b76d3e content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:13 GMT + date: Thu, 07 Oct 2021 23:57:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '275' + x-envoy-upstream-service-time: '531' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/9828f1ed-769e-4ee5-b6ce-d87d9fe0f116 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/1947e3bc-675c-42c4-8ee0-255c7a795e0f version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_partial_success_for_actions.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_partial_success_for_actions.yaml index 8e2838e796f9..7926d8055871 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_partial_success_for_actions.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_partial_success_for_actions.yaml @@ -1,86 +1,136 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [{"parameters": - {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}}], - "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": - false}}], "extractiveSummarizationTasks": []}, "analysisInput": {"documents": - [{"id": "1", "text": "I did not like the hotel we stayed at.", "language": "tr"}, - {"id": "2", "text": "I did not like the hotel we stayed at.", "language": "en"}]}}' + {"model-version": "latest", "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, + "taskName": "1"}], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], + "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false, "opinionMining": false}, "taskName": "0"}], "extractiveSummarizationTasks": + [], "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], + "customMultiClassificationTasks": []}, "analysisInput": {"documents": [{"id": + "1", "text": "I did not like the hotel we stayed at.", "language": "tr"}, {"id": + "2", "text": "I did not like the hotel we stayed at.", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '590' + - '737' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: dbd55e81-5e5e-4618-a3bf-29fe042d4fa8 - date: Mon, 02 Aug 2021 21:47:15 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/9719c87f-d476-42f3-b361-dafc7e06de1c + apim-request-id: 69aa1b1b-83c3-42fb-bf39-bdcc1f50a66d + date: Thu, 07 Oct 2021 23:57:22 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/c600d945-94d3-4db6-821b-42d33eff12c6 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '140' + x-envoy-upstream-service-time: '243' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/9719c87f-d476-42f3-b361-dafc7e06de1c + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/c600d945-94d3-4db6-821b-42d33eff12c6 response: body: - string: '{"jobId":"9719c87f-d476-42f3-b361-dafc7e06de1c","lastUpdateDateTime":"2021-08-02T21:47:16Z","createdDateTime":"2021-08-02T21:47:15Z","expirationDateTime":"2021-08-03T21:47:15Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":2,"total":2}}' + string: '{"jobId":"c600d945-94d3-4db6-821b-42d33eff12c6","lastUpdateDateTime":"2021-10-07T23:57:22Z","createdDateTime":"2021-10-07T23:57:22Z","expirationDateTime":"2021-10-08T23:57:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":2,"total":2}}' headers: - apim-request-id: 6e943eac-89e3-474c-845f-26d0aa5a640b + apim-request-id: 938ac093-efff-48a4-be30-4e5fdd6230d4 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:20 GMT + date: Thu, 07 Oct 2021 23:57:27 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '39' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/9719c87f-d476-42f3-b361-dafc7e06de1c + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/c600d945-94d3-4db6-821b-42d33eff12c6 - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/9719c87f-d476-42f3-b361-dafc7e06de1c + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/c600d945-94d3-4db6-821b-42d33eff12c6 response: body: - string: '{"jobId":"9719c87f-d476-42f3-b361-dafc7e06de1c","lastUpdateDateTime":"2021-08-02T21:47:22Z","createdDateTime":"2021-08-02T21:47:15Z","expirationDateTime":"2021-08-03T21:47:15Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":2,"failed":0,"inProgress":0,"total":2,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:22.9517148Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"I + string: '{"jobId":"c600d945-94d3-4db6-821b-42d33eff12c6","lastUpdateDateTime":"2021-10-07T23:57:28Z","createdDateTime":"2021-10-07T23:57:22Z","expirationDateTime":"2021-10-08T23:57:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":2,"total":2}}' + headers: + apim-request-id: 26ca24e1-50e5-4b1b-8979-cdb28b297c66 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:57:32 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '11' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/c600d945-94d3-4db6-821b-42d33eff12c6 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/c600d945-94d3-4db6-821b-42d33eff12c6 + response: + body: + string: '{"jobId":"c600d945-94d3-4db6-821b-42d33eff12c6","lastUpdateDateTime":"2021-10-07T23:57:36Z","createdDateTime":"2021-10-07T23:57:22Z","expirationDateTime":"2021-10-08T23:57:22Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":1,"total":2,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:36.3576004Z","taskName":"1","state":"succeeded","results":{"documents":[{"redactedText":"I + did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid + language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}]}}' + headers: + apim-request-id: b6edafd9-fa99-4af3-9da8-9b74facc8634 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:57:37 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '240' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/c600d945-94d3-4db6-821b-42d33eff12c6 +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/c600d945-94d3-4db6-821b-42d33eff12c6 + response: + body: + string: '{"jobId":"c600d945-94d3-4db6-821b-42d33eff12c6","lastUpdateDateTime":"2021-10-07T23:57:39Z","createdDateTime":"2021-10-07T23:57:22Z","expirationDateTime":"2021-10-08T23:57:22Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":2,"failed":0,"inProgress":0,"total":2,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:36.3576004Z","taskName":"1","state":"succeeded","results":{"documents":[{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: ja,ko,zh-Hans,de,en,es,fr,it,pt-BR,pt-PT. - For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:22.8569865Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.55,"negative":0.39},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.55,"negative":0.39},"offset":0,"length":38,"text":"I + For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:39.896461Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.55,"negative":0.39},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.55,"negative":0.39},"offset":0,"length":38,"text":"I did not like the hotel we stayed at."}],"warnings":[]},{"id":"2","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.45,"negative":0.54},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.45,"negative":0.54},"offset":0,"length":38,"text":"I did not like the hotel we stayed at."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: - apim-request-id: c4c8d496-3c16-47e1-919d-acf0fe2e77a3 + apim-request-id: d3d0a485-37da-4eec-a31a-6c6a4334ea3d content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:25 GMT + date: Thu, 07 Oct 2021 23:57:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '78' + x-envoy-upstream-service-time: '250' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/9719c87f-d476-42f3-b361-dafc7e06de1c + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/c600d945-94d3-4db6-821b-42d33eff12c6 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_pass_cls.yaml index 640285c9713f..f852e4457fb4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_pass_cls.yaml @@ -1,79 +1,58 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": - [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": []}, "analysisInput": - {"documents": [{"id": "0", "text": "Test passing cls to endpoint", "language": - "en"}]}}' + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": + [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "Test passing cls to + endpoint", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '409' + - '539' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: cefe65e4-51ee-49ab-8b55-2f3dfcb424b8 - date: Mon, 02 Aug 2021 21:47:26 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/90c92ca0-333b-42e7-85b8-24ddd966a71d + apim-request-id: 52705e9c-aabc-493e-a19c-94bf8ee3b27c + date: Thu, 07 Oct 2021 23:57:44 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/af1e62b5-fea4-41a4-9497-30d00a2327a2 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '95' + x-envoy-upstream-service-time: '303' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/90c92ca0-333b-42e7-85b8-24ddd966a71d + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/af1e62b5-fea4-41a4-9497-30d00a2327a2 response: body: - string: '{"jobId":"90c92ca0-333b-42e7-85b8-24ddd966a71d","lastUpdateDateTime":"2021-08-02T21:47:26Z","createdDateTime":"2021-08-02T21:47:26Z","expirationDateTime":"2021-08-03T21:47:26Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"af1e62b5-fea4-41a4-9497-30d00a2327a2","lastUpdateDateTime":"2021-10-07T23:57:45Z","createdDateTime":"2021-10-07T23:57:43Z","expirationDateTime":"2021-10-08T23:57:43Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:45.6372402Z","taskName":"0","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"Test","category":"Skill","offset":0,"length":4,"confidenceScore":0.97},{"text":"cls","category":"Skill","offset":13,"length":3,"confidenceScore":0.82}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: - apim-request-id: b01ccb25-c623-4a21-9221-17aedcc9026f + apim-request-id: bf46287a-264d-4b33-8cdd-0257da93238c content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:31 GMT + date: Thu, 07 Oct 2021 23:57:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '83' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/90c92ca0-333b-42e7-85b8-24ddd966a71d -- request: - body: null - headers: - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/90c92ca0-333b-42e7-85b8-24ddd966a71d - response: - body: - string: '{"jobId":"90c92ca0-333b-42e7-85b8-24ddd966a71d","lastUpdateDateTime":"2021-08-02T21:47:32Z","createdDateTime":"2021-08-02T21:47:26Z","expirationDateTime":"2021-08-03T21:47:26Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:32.9243147Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"documents":[{"id":"0","entities":[{"text":"Test","category":"Skill","offset":0,"length":4,"confidenceScore":0.97},{"text":"cls","category":"Skill","offset":13,"length":3,"confidenceScore":0.82}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' - headers: - apim-request-id: 7badcfc1-a583-48a8-bceb-8fc66c08aeae - content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:36 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '52' - status: - code: 200 - message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/90c92ca0-333b-42e7-85b8-24ddd966a71d + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/af1e62b5-fea4-41a4-9497-30d00a2327a2 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_pii_action_categories_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_pii_action_categories_filter.yaml index c0f46d99c4d0..ad6e54198f62 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_pii_action_categories_filter.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_pii_action_categories_filter.yaml @@ -2,9 +2,11 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": true, "piiCategories": ["USSocialSecurityNumber", - "ABARoutingNumber"], "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": - []}, "analysisInput": {"documents": [{"id": "1", "text": "My SSN is 859-98-0987.", + "ABARoutingNumber"], "stringIndexType": "UnicodeCodePoint"}, "taskName": "0"}], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [], "customMultiClassificationTasks": []}, + "analysisInput": {"documents": [{"id": "1", "text": "My SSN is 859-98-0987.", "language": "en"}, {"id": "2", "text": "Your ABA number - 111000025 - is the first 9 digits in the lower left hand corner of your personal check.", "language": "en"}, {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number?", "language": @@ -13,74 +15,74 @@ interactions: Accept: - application/json, text/json Content-Length: - - '702' + - '832' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: ca4fe218-a596-47fd-9dac-b5c2d60471e8 - date: Mon, 02 Aug 2021 21:47:36 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/8fb35b51-c335-4468-9c52-e32b334dd4ae + apim-request-id: 16acffbf-0e94-4b55-b5e2-e578653fbaab + date: Thu, 07 Oct 2021 23:57:49 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/88800de8-44f7-4be9-b0dc-9ea9121af761 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '117' + x-envoy-upstream-service-time: '358' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/8fb35b51-c335-4468-9c52-e32b334dd4ae + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/88800de8-44f7-4be9-b0dc-9ea9121af761 response: body: - string: '{"jobId":"8fb35b51-c335-4468-9c52-e32b334dd4ae","lastUpdateDateTime":"2021-08-02T21:47:37Z","createdDateTime":"2021-08-02T21:47:36Z","expirationDateTime":"2021-08-03T21:47:36Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"88800de8-44f7-4be9-b0dc-9ea9121af761","lastUpdateDateTime":"2021-10-07T23:57:49Z","createdDateTime":"2021-10-07T23:57:49Z","expirationDateTime":"2021-10-08T23:57:49Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: 425dbe54-886f-4376-8615-dd0ec5d39ee1 + apim-request-id: ff3a5213-b827-4424-bad1-e1e535118aeb content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:42 GMT + date: Thu, 07 Oct 2021 23:57:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '22' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/8fb35b51-c335-4468-9c52-e32b334dd4ae + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/88800de8-44f7-4be9-b0dc-9ea9121af761 - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/8fb35b51-c335-4468-9c52-e32b334dd4ae + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/88800de8-44f7-4be9-b0dc-9ea9121af761 response: body: - string: '{"jobId":"8fb35b51-c335-4468-9c52-e32b334dd4ae","lastUpdateDateTime":"2021-08-02T21:47:43Z","createdDateTime":"2021-08-02T21:47:36Z","expirationDateTime":"2021-08-03T21:47:36Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:43.6049398Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"documents":[{"redactedText":"My + string: '{"jobId":"88800de8-44f7-4be9-b0dc-9ea9121af761","lastUpdateDateTime":"2021-10-07T23:57:57Z","createdDateTime":"2021-10-07T23:57:49Z","expirationDateTime":"2021-10-08T23:57:49Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:57:57.3713039Z","taskName":"0","state":"succeeded","results":{"documents":[{"redactedText":"My SSN is ***********.","id":"1","entities":[{"text":"859-98-0987","category":"USSocialSecurityNumber","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]},{"redactedText":"Your ABA number - ********* - is the first 9 digits in the lower left hand corner of your personal check.","id":"2","entities":[{"text":"111000025","category":"ABARoutingNumber","offset":18,"length":9,"confidenceScore":0.75}],"warnings":[]},{"redactedText":"Is 998.214.865-68 your Brazilian CPF number?","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}]}}' headers: - apim-request-id: bfb76840-790d-4542-8aa3-67ce115ea8cb + apim-request-id: c7248dc8-7202-407d-a343-7cc89556c245 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:47 GMT + date: Thu, 07 Oct 2021 23:57:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '55' + x-envoy-upstream-service-time: '213' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/8fb35b51-c335-4468-9c52-e32b334dd4ae + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/88800de8-44f7-4be9-b0dc-9ea9121af761 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_poller_metadata.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_poller_metadata.yaml index 496b98f2b90d..780853dbbeac 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_poller_metadata.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_poller_metadata.yaml @@ -1,78 +1,58 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": - [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": []}, "analysisInput": - {"documents": [{"id": "56", "text": ":)", "language": "en"}]}}' + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": + [], "sentimentAnalysisTasks": [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "56", "text": ":)", "language": + "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '384' + - '514' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: 51ff96e6-52bd-4141-a6b0-4efa8edea5ef - date: Mon, 02 Aug 2021 21:47:47 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/877861d2-4186-494a-9833-efee6771102c + apim-request-id: 4d3de006-4acd-49eb-8ad3-db78994f467a + date: Thu, 21 Oct 2021 22:27:38 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/222c47e7-1897-4f05-b46d-8ce627c02b38 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '87' + x-envoy-upstream-service-time: '224' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/877861d2-4186-494a-9833-efee6771102c?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/222c47e7-1897-4f05-b46d-8ce627c02b38?showStats=True response: body: - string: '{"jobId":"877861d2-4186-494a-9833-efee6771102c","lastUpdateDateTime":"2021-08-02T21:47:48Z","createdDateTime":"2021-08-02T21:47:47Z","expirationDateTime":"2021-08-03T21:47:47Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"222c47e7-1897-4f05-b46d-8ce627c02b38","lastUpdateDateTime":"2021-10-21T22:27:40Z","createdDateTime":"2021-10-21T22:27:38Z","expirationDateTime":"2021-10-22T22:27:38Z","status":"succeeded","errors":[],"tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-21T22:27:40.1795342Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: - apim-request-id: d505a01e-e350-4f46-9002-d3286c53984d + apim-request-id: 21444939-4a44-4229-b6ab-5672411bb0f2 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:53 GMT + date: Thu, 21 Oct 2021 22:27:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '59' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/877861d2-4186-494a-9833-efee6771102c?showStats=True -- request: - body: null - headers: - User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/877861d2-4186-494a-9833-efee6771102c?showStats=True - response: - body: - string: '{"jobId":"877861d2-4186-494a-9833-efee6771102c","lastUpdateDateTime":"2021-08-02T21:47:53Z","createdDateTime":"2021-08-02T21:47:47Z","expirationDateTime":"2021-08-03T21:47:47Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:47:53.8985415Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' - headers: - apim-request-id: 7363dda3-499a-443f-9ca5-95f3a87adae1 - content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:47:58 GMT - strict-transport-security: max-age=31536000; includeSubDomains; preload - transfer-encoding: chunked - x-content-type-options: nosniff - x-envoy-upstream-service-time: '33' - status: - code: 200 - message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/877861d2-4186-494a-9833-efee6771102c?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/222c47e7-1897-4f05-b46d-8ce627c02b38?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_recognize_custom_entities.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_recognize_custom_entities.yaml new file mode 100644 index 000000000000..7283090b57fc --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_recognize_custom_entities.yaml @@ -0,0 +1,71 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [{"parameters": + {"project-name": "textanalytics_custom_entities_project_name", "deployment-name": + "textanalytics_custom_entities_project_name"}, "taskName": "0"}], "customSingleClassificationTasks": + [], "customMultiClassificationTasks": []}, "analysisInput": {"documents": [{"id": + "1", "text": "A recent report by the Government Accountability Office (GAO) + found that the dramatic increase in oil and natural gas development on federal + lands over the past six years has stretched the staff of the BLM to a point + that it has been unable to meet its environmental protection responsibilities.", + "language": "en"}, {"id": "2", "text": "David Schmidt, senior vice president--Food + Safety, International Food Information Council (IFIC), Washington, D.C., discussed + the physical activity component.", "language": "en"}, {"id": "3", "text": "I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '1196' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: b5db4ea3-582a-40d3-a50b-8fe525e7036e + date: Thu, 07 Oct 2021 23:58:06 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/49ba6ccf-b34e-48e6-ae5e-8ec76b7367bf + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '873' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/49ba6ccf-b34e-48e6-ae5e-8ec76b7367bf?showStats=True + response: + body: + string: '{"jobId":"49ba6ccf-b34e-48e6-ae5e-8ec76b7367bf","lastUpdateDateTime":"2021-10-07T23:58:08Z","createdDateTime":"2021-10-07T23:58:06Z","expirationDateTime":"2021-10-08T23:58:06Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"customEntityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:08.4152227Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":295,"transactionsCount":1},"entities":[{"text":"Government","category":"restaurant_name","offset":23,"length":10,"confidenceScore":0.05},{"text":"Office","category":"restaurant_name","offset":49,"length":6,"confidenceScore":0.11},{"text":"GAO","category":"restaurant_name","offset":57,"length":3,"confidenceScore":0.04},{"text":"Accountability","category":"geographic_poi","offset":34,"length":14,"confidenceScore":0.07},{"text":"natural","category":"geographic_poi","offset":106,"length":7,"confidenceScore":0.04},{"text":"dramatic","category":"sort","offset":77,"length":8,"confidenceScore":0.03},{"text":"oil","category":"restaurant_type","offset":98,"length":3,"confidenceScore":0.03},{"text":"gas","category":"restaurant_type","offset":114,"length":3,"confidenceScore":0.09},{"text":"and","category":"served_dish","offset":102,"length":3,"confidenceScore":0.07},{"text":"development","category":"object_type","offset":118,"length":11,"confidenceScore":0.06},{"text":"federal","category":"state","offset":133,"length":7,"confidenceScore":0.07},{"text":"protection","category":"state","offset":267,"length":10,"confidenceScore":0.05},{"text":"lands","category":"poi","offset":141,"length":5,"confidenceScore":0.04},{"text":"BLM","category":"poi","offset":202,"length":3,"confidenceScore":0.07},{"text":"the","category":"timeRange","offset":152,"length":3,"confidenceScore":0.24},{"text":"past + six years","category":"timeRange","offset":156,"length":14,"confidenceScore":0.54}],"warnings":[]},{"id":"2","statistics":{"charactersCount":158,"transactionsCount":1},"entities":[{"text":"David + Schmidt","category":"artist","offset":0,"length":13,"confidenceScore":0.8},{"text":"Food","category":"service","offset":38,"length":4,"confidenceScore":0.03},{"text":"Safety","category":"geographic_poi","offset":43,"length":6,"confidenceScore":0.06},{"text":"International + Food","category":"geographic_poi","offset":51,"length":18,"confidenceScore":0.07},{"text":"IFIC","category":"geographic_poi","offset":91,"length":4,"confidenceScore":0.05},{"text":"Information + Council","category":"restaurant_name","offset":70,"length":19,"confidenceScore":0.1},{"text":"Washington, + D.C.","category":"state","offset":98,"length":16,"confidenceScore":0.49}],"warnings":[]},{"id":"3","statistics":{"charactersCount":121,"transactionsCount":1},"entities":[{"text":"indoor","category":"facility","offset":28,"length":6,"confidenceScore":0.57},{"text":"restaurant","category":"restaurant_type","offset":35,"length":10,"confidenceScore":0.95},{"text":"China","category":"country","offset":49,"length":5,"confidenceScore":0.48},{"text":"music","category":"music_item","offset":78,"length":5,"confidenceScore":0.63},{"text":"my","category":"playlist_owner","offset":110,"length":2,"confidenceScore":0.84}],"warnings":[]}],"errors":[],"projectName":"textanalytics_custom_entities_project_name","deploymentName":"textanalytics_custom_entities_project_name"}}]}}' + headers: + apim-request-id: b41bef4b-72d1-4d59-8f28-2d32a6e88525 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:58:11 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '168' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/49ba6ccf-b34e-48e6-ae5e-8ec76b7367bf?showStats=True +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_sentiment_analysis_task_with_opinion_mining.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_sentiment_analysis_task_with_opinion_mining.yaml index 03636ea15f70..93ec90debb8a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_sentiment_analysis_task_with_opinion_mining.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_sentiment_analysis_task_with_opinion_mining.yaml @@ -3,102 +3,169 @@ interactions: body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "opinionMining": - true}}], "extractiveSummarizationTasks": []}, "analysisInput": {"documents": - [{"id": "0", "text": "It has a sleek premium aluminum design that makes it beautiful - to look at.", "language": "en"}, {"id": "1", "text": "The food and service is - not good", "language": "en"}]}}' + true}, "taskName": "0"}], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": + [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "It has a sleek premium + aluminum design that makes it beautiful to look at.", "language": "en"}, {"id": + "1", "text": "The food and service is not good", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '514' + - '644' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: 9351a21a-9119-4fbc-910c-c997d311f377 - date: Mon, 02 Aug 2021 21:47:58 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/a179fa2d-9e79-4756-b9ee-c07da1c99ec2 + apim-request-id: efd32cfb-4242-4ddb-bd2f-bced91f3ddfa + date: Thu, 07 Oct 2021 23:58:12 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '114' + x-envoy-upstream-service-time: '205' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/a179fa2d-9e79-4756-b9ee-c07da1c99ec2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True response: body: - string: '{"jobId":"a179fa2d-9e79-4756-b9ee-c07da1c99ec2","lastUpdateDateTime":"2021-08-02T21:47:59Z","createdDateTime":"2021-08-02T21:47:58Z","expirationDateTime":"2021-08-03T21:47:58Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"f44e6dd3-85c0-49fd-b660-030d89ce919c","lastUpdateDateTime":"2021-10-07T23:58:12Z","createdDateTime":"2021-10-07T23:58:12Z","expirationDateTime":"2021-10-08T23:58:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: 4512a405-efed-4946-8f11-13d8d08fe9a4 + apim-request-id: d57d3f3d-a044-4df2-bfa0-6190892490de content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:48:03 GMT + date: Thu, 07 Oct 2021 23:58:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '47' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/a179fa2d-9e79-4756-b9ee-c07da1c99ec2?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/a179fa2d-9e79-4756-b9ee-c07da1c99ec2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True response: body: - string: '{"jobId":"a179fa2d-9e79-4756-b9ee-c07da1c99ec2","lastUpdateDateTime":"2021-08-02T21:47:59Z","createdDateTime":"2021-08-02T21:47:58Z","expirationDateTime":"2021-08-03T21:47:58Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + string: '{"jobId":"f44e6dd3-85c0-49fd-b660-030d89ce919c","lastUpdateDateTime":"2021-10-07T23:58:12Z","createdDateTime":"2021-10-07T23:58:12Z","expirationDateTime":"2021-10-08T23:58:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' headers: - apim-request-id: f6dd237d-4df7-4e4b-83c0-04c29c133263 + apim-request-id: 2c83c24e-4110-4b9d-b465-58ebf0daa0f9 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:48:08 GMT + date: Thu, 07 Oct 2021 23:58:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/a179fa2d-9e79-4756-b9ee-c07da1c99ec2?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/a179fa2d-9e79-4756-b9ee-c07da1c99ec2?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True response: body: - string: '{"jobId":"a179fa2d-9e79-4756-b9ee-c07da1c99ec2","lastUpdateDateTime":"2021-08-02T21:48:12Z","createdDateTime":"2021-08-02T21:47:58Z","expirationDateTime":"2021-08-03T21:47:58Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:12.9627545Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"0","sentiment":"positive","statistics":{"charactersCount":74,"transactionsCount":1},"confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"offset":0,"length":74,"text":"It + string: '{"jobId":"f44e6dd3-85c0-49fd-b660-030d89ce919c","lastUpdateDateTime":"2021-10-07T23:58:12Z","createdDateTime":"2021-10-07T23:58:12Z","expirationDateTime":"2021-10-08T23:58:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: 288470b0-5aaa-4eb9-b650-3fee26afcd41 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:58:27 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '8' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True + response: + body: + string: '{"jobId":"f44e6dd3-85c0-49fd-b660-030d89ce919c","lastUpdateDateTime":"2021-10-07T23:58:12Z","createdDateTime":"2021-10-07T23:58:12Z","expirationDateTime":"2021-10-08T23:58:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: 541bcb7c-a6cf-4e09-82db-79f4f63244d8 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:58:32 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '8' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True + response: + body: + string: '{"jobId":"f44e6dd3-85c0-49fd-b660-030d89ce919c","lastUpdateDateTime":"2021-10-07T23:58:12Z","createdDateTime":"2021-10-07T23:58:12Z","expirationDateTime":"2021-10-08T23:58:12Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":1,"total":1}}' + headers: + apim-request-id: 8096504b-09ec-4183-9bec-435534b653cb + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:58:37 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '6' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True + response: + body: + string: '{"jobId":"f44e6dd3-85c0-49fd-b660-030d89ce919c","lastUpdateDateTime":"2021-10-07T23:58:40Z","createdDateTime":"2021-10-07T23:58:12Z","expirationDateTime":"2021-10-08T23:58:12Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:40.0746684Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"0","sentiment":"positive","statistics":{"charactersCount":74,"transactionsCount":1},"confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"offset":0,"length":74,"text":"It has a sleek premium aluminum design that makes it beautiful to look at.","targets":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":32,"length":6,"text":"design","relations":[{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/0"},{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/1"}]}],"assessments":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":9,"length":5,"text":"sleek","isNegated":false},{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":15,"length":7,"text":"premium","isNegated":false}]}],"warnings":[]},{"id":"1","sentiment":"negative","statistics":{"charactersCount":32,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":0,"length":32,"text":"The food and service is not good","targets":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":4,"length":4,"text":"food","relations":[{"relationType":"assessment","ref":"#/documents/1/sentences/0/assessments/0"}]},{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":13,"length":7,"text":"service","relations":[{"relationType":"assessment","ref":"#/documents/1/sentences/0/assessments/0"}]}],"assessments":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":28,"length":4,"text":"good","isNegated":true}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: - apim-request-id: 1134ef58-3c94-4b04-87fc-230900a21382 + apim-request-id: dafaba7b-6769-4b2f-a651-514afe7a8a9c content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:48:14 GMT + date: Thu, 07 Oct 2021 23:58:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '52' + x-envoy-upstream-service-time: '75' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/a179fa2d-9e79-4756-b9ee-c07da1c99ec2?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/f44e6dd3-85c0-49fd-b660-030d89ce919c?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_show_stats_and_model_version_multiple_tasks.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_show_stats_and_model_version_multiple_tasks.yaml index c4a500075de7..7846dcc1b687 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_show_stats_and_model_version_multiple_tasks.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_show_stats_and_model_version_multiple_tasks.yaml @@ -1,130 +1,154 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "56", "text": ":)", "language": "en"}, {"id": "0", "text": - ":(", "language": "en"}, {"id": "19", "text": ":P", "language": "en"}, {"id": - "1", "text": ":D", "language": "en"}]}}' + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "56", "text": ":)", "language": + "en"}, {"id": "0", "text": ":(", "language": "en"}, {"id": "19", "text": ":P", + "language": "en"}, {"id": "1", "text": ":D", "language": "en"}]}}' headers: Accept: - application/json, text/json Content-Length: - - '1035' + - '1250' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '' headers: - apim-request-id: 860d4c59-4bed-479d-8286-b9bab30e1c14 - date: Mon, 02 Aug 2021 21:48:15 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/b840d736-fd28-4c94-8200-fa21a7dfa869 + apim-request-id: c0a6af82-24a7-4663-b134-6e957b901172 + date: Thu, 07 Oct 2021 23:58:44 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '306' + x-envoy-upstream-service-time: '995' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True + response: + body: + string: '{"jobId":"3149144f-357f-40b1-af2d-26f67d7973b8","lastUpdateDateTime":"2021-10-07T23:58:44Z","createdDateTime":"2021-10-07T23:58:43Z","expirationDateTime":"2021-10-08T23:58:43Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + headers: + apim-request-id: ece3e627-f17b-4a96-a017-5e3b5d070ad6 + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:58:49 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '8' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/b840d736-fd28-4c94-8200-fa21a7dfa869?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True response: body: - string: '{"jobId":"b840d736-fd28-4c94-8200-fa21a7dfa869","lastUpdateDateTime":"2021-08-02T21:48:17Z","createdDateTime":"2021-08-02T21:48:14Z","expirationDateTime":"2021-08-03T21:48:14Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":0,"failed":0,"inProgress":6,"total":6}}' + string: '{"jobId":"3149144f-357f-40b1-af2d-26f67d7973b8","lastUpdateDateTime":"2021-10-07T23:58:54Z","createdDateTime":"2021-10-07T23:58:43Z","expirationDateTime":"2021-10-08T23:58:43Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:51.8509311Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:54.2202072Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:52.2528101Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:52.9770416Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: - apim-request-id: 2151d8d8-56b7-4371-bf6d-88602b414663 + apim-request-id: 1a5b4657-0f02-425c-96c0-bb063bcb911c content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:48:20 GMT + date: Thu, 07 Oct 2021 23:58:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '353' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/b840d736-fd28-4c94-8200-fa21a7dfa869?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/b840d736-fd28-4c94-8200-fa21a7dfa869?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True response: body: - string: '{"jobId":"b840d736-fd28-4c94-8200-fa21a7dfa869","lastUpdateDateTime":"2021-08-02T21:48:23Z","createdDateTime":"2021-08-02T21:48:14Z","expirationDateTime":"2021-08-03T21:48:14Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:23.1398039Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:22.6467037Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:23.2634965Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:22.5602253Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:23.0657387Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' + string: '{"jobId":"3149144f-357f-40b1-af2d-26f67d7973b8","lastUpdateDateTime":"2021-10-07T23:58:54Z","createdDateTime":"2021-10-07T23:58:43Z","expirationDateTime":"2021-10-08T23:58:43Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:51.8509311Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:54.2202072Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:52.2528101Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:52.9770416Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: - apim-request-id: 8528b872-8aed-4b8c-9f1a-1b98f3e2b9a3 + apim-request-id: b63169d8-2368-46b6-b827-aa9cec2a8594 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:48:25 GMT + date: Thu, 07 Oct 2021 23:59:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '251' + x-envoy-upstream-service-time: '750' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/b840d736-fd28-4c94-8200-fa21a7dfa869?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/b840d736-fd28-4c94-8200-fa21a7dfa869?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True response: body: - string: '{"jobId":"b840d736-fd28-4c94-8200-fa21a7dfa869","lastUpdateDateTime":"2021-08-02T21:48:23Z","createdDateTime":"2021-08-02T21:48:14Z","expirationDateTime":"2021-08-03T21:48:14Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":5,"failed":0,"inProgress":1,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:23.1398039Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:22.6467037Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:23.2634965Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:22.5602253Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:23.0657387Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' + string: '{"jobId":"3149144f-357f-40b1-af2d-26f67d7973b8","lastUpdateDateTime":"2021-10-07T23:58:54Z","createdDateTime":"2021-10-07T23:58:43Z","expirationDateTime":"2021-10-08T23:58:43Z","status":"running","errors":[],"displayName":"NA","tasks":{"completed":4,"failed":0,"inProgress":2,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:51.8509311Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:54.2202072Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:52.2528101Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:52.9770416Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}]}}' headers: - apim-request-id: ef06f0b3-5a21-4649-b516-c58a893f8db2 + apim-request-id: 7bd6e155-45f2-4c0d-99ae-c1beb072a97c content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:48:31 GMT + date: Thu, 07 Oct 2021 23:59:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '333' + x-envoy-upstream-service-time: '328' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/b840d736-fd28-4c94-8200-fa21a7dfa869?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze/jobs/b840d736-fd28-4c94-8200-fa21a7dfa869?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True response: body: - string: '{"jobId":"b840d736-fd28-4c94-8200-fa21a7dfa869","lastUpdateDateTime":"2021-08-02T21:48:33Z","createdDateTime":"2021-08-02T21:48:14Z","expirationDateTime":"2021-08-03T21:48:14Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:23.1398039Z","taskName":"NamedEntityRecognition_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:22.6467037Z","taskName":"EntityLinking_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:23.2634965Z","taskName":"PersonallyIdentifiableInformation_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:33.5849009Z","taskName":"ExtractiveSummarization_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[{"text":":)","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[{"text":":(","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[{"text":":P","rankScore":1.0,"offset":0,"length":2}],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[{"text":":D","rankScore":1.0,"offset":0,"length":2}],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:22.5602253Z","taskName":"KeyPhraseExtraction_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-08-02T21:48:23.0657387Z","taskName":"SentimentAnalysis_latest","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' + string: '{"jobId":"3149144f-357f-40b1-af2d-26f67d7973b8","lastUpdateDateTime":"2021-10-07T23:59:06Z","createdDateTime":"2021-10-07T23:58:43Z","expirationDateTime":"2021-10-08T23:58:43Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":6,"failed":0,"inProgress":0,"total":6,"entityRecognitionTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:51.8509311Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityLinkingTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:54.2202072Z","taskName":"3","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"entityRecognitionPiiTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:52.2528101Z","taskName":"2","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}}],"extractiveSummarizationTasks":[{"lastUpdateDateTime":"2021-10-07T23:59:05.9620129Z","taskName":"5","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"sentences":[],"warnings":[]}],"errors":[],"modelVersion":"2021-08-01"}}],"keyPhraseExtractionTasks":[{"lastUpdateDateTime":"2021-10-07T23:58:52.9770416Z","taskName":"1","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}}],"sentimentAnalysisTasks":[{"lastUpdateDateTime":"2021-10-07T23:59:06.576964Z","taskName":"4","state":"succeeded","results":{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}}]}}' headers: - apim-request-id: cfb7b846-0124-4753-b98e-2d76c964a69d + apim-request-id: 5998b2fe-a637-4e06-8af9-d54c7eed426b content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:48:36 GMT + date: Thu, 07 Oct 2021 23:59:11 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '299' + x-envoy-upstream-service-time: '448' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/analyze/jobs/b840d736-fd28-4c94-8200-fa21a7dfa869?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/3149144f-357f-40b1-af2d-26f67d7973b8?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_single_category_classify.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_single_category_classify.yaml new file mode 100644 index 000000000000..33ce2fde0104 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_single_category_classify.yaml @@ -0,0 +1,66 @@ +interactions: +- request: + body: '{"tasks": {"entityRecognitionTasks": [], "entityRecognitionPiiTasks": [], + "keyPhraseExtractionTasks": [], "entityLinkingTasks": [], "sentimentAnalysisTasks": + [], "extractiveSummarizationTasks": [], "customEntityRecognitionTasks": [], + "customSingleClassificationTasks": [{"parameters": {"project-name": "single_category_classify_project_name", + "deployment-name": "single_category_classify_project_name"}, "taskName": "0"}], + "customMultiClassificationTasks": []}, "analysisInput": {"documents": [{"id": + "1", "text": "A recent report by the Government Accountability Office (GAO) + found that the dramatic increase in oil and natural gas development on federal + lands over the past six years has stretched the staff of the BLM to a point + that it has been unable to meet its environmental protection responsibilities.", + "language": "en"}, {"id": "2", "text": "David Schmidt, senior vice president--Food + Safety, International Food Information Council (IFIC), Washington, D.C., discussed + the physical activity component.", "language": "en"}, {"id": "3", "text": "I + need a reservation for an indoor restaurant in China. Please don''t stop the + music. Play music and add it to my playlist", "language": "en"}]}}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '1196' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze + response: + body: + string: '' + headers: + apim-request-id: f9824da7-7fe4-4af5-8251-8b98331ad1a2 + date: Thu, 07 Oct 2021 23:59:12 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/885c214e-654c-4e58-b9d5-16ca756d6d11 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '482' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze/jobs/885c214e-654c-4e58-b9d5-16ca756d6d11?showStats=True + response: + body: + string: '{"jobId":"885c214e-654c-4e58-b9d5-16ca756d6d11","lastUpdateDateTime":"2021-10-07T23:59:13Z","createdDateTime":"2021-10-07T23:59:12Z","expirationDateTime":"2021-10-08T23:59:12Z","status":"succeeded","errors":[],"displayName":"NA","tasks":{"completed":1,"failed":0,"inProgress":0,"total":1,"customSingleClassificationTasks":[{"lastUpdateDateTime":"2021-10-07T23:59:13.7403633Z","taskName":"0","state":"succeeded","results":{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","classification":{"category":"RateBook","confidenceScore":0.76},"statistics":{"charactersCount":295,"transactionsCount":1},"warnings":[]},{"id":"2","classification":{"category":"RateBook","confidenceScore":0.57},"statistics":{"charactersCount":158,"transactionsCount":1},"warnings":[]},{"id":"3","classification":{"category":"BookRestaurant","confidenceScore":1.0},"statistics":{"charactersCount":121,"transactionsCount":1},"warnings":[]}],"errors":[],"projectName":"single_category_classify_project_name","deploymentName":"single_category_classify_project_name"}}]}}' + headers: + apim-request-id: 8783048e-2cff-48e2-a819-a44262eb7bec + content-type: application/json; charset=utf-8 + date: Thu, 07 Oct 2021 23:59:17 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '196' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.2/analyze/jobs/885c214e-654c-4e58-b9d5-16ca756d6d11?showStats=True +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_too_many_documents.yaml index 6d6fe93a0c7c..400dbac6fe35 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_async.test_too_many_documents.yaml @@ -1,23 +1,25 @@ interactions: - request: body: '{"tasks": {"entityRecognitionTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}}], - "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": - true, "stringIndexType": "UnicodeCodePoint"}}], "keyPhraseExtractionTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false}}], "entityLinkingTasks": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "0"}], "entityRecognitionPiiTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": true, "stringIndexType": "UnicodeCodePoint"}, "taskName": "2"}], + "keyPhraseExtractionTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": + false}, "taskName": "1"}], "entityLinkingTasks": [{"parameters": {"model-version": + "latest", "loggingOptOut": false, "stringIndexType": "UnicodeCodePoint"}, "taskName": + "3"}], "sentimentAnalysisTasks": [{"parameters": {"model-version": "latest", + "loggingOptOut": false, "opinionMining": false}, "taskName": "4"}], "extractiveSummarizationTasks": [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint"}}], "sentimentAnalysisTasks": [{"parameters": {"model-version": - "latest", "loggingOptOut": false, "opinionMining": false}}], "extractiveSummarizationTasks": - [{"parameters": {"model-version": "latest", "loggingOptOut": false, "stringIndexType": - "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}}]}, "analysisInput": - {"documents": [{"id": "0", "text": "input document", "language": "en"}, {"id": - "1", "text": "input document", "language": "en"}, {"id": "2", "text": "input - document", "language": "en"}, {"id": "3", "text": "input document", "language": - "en"}, {"id": "4", "text": "input document", "language": "en"}, {"id": "5", - "text": "input document", "language": "en"}, {"id": "6", "text": "input document", - "language": "en"}, {"id": "7", "text": "input document", "language": "en"}, - {"id": "8", "text": "input document", "language": "en"}, {"id": "9", "text": - "input document", "language": "en"}, {"id": "10", "text": "input document", + "UnicodeCodePoint", "sentenceCount": 3, "sortBy": "Offset"}, "taskName": "5"}], + "customEntityRecognitionTasks": [], "customSingleClassificationTasks": [], "customMultiClassificationTasks": + []}, "analysisInput": {"documents": [{"id": "0", "text": "input document", "language": + "en"}, {"id": "1", "text": "input document", "language": "en"}, {"id": "2", + "text": "input document", "language": "en"}, {"id": "3", "text": "input document", + "language": "en"}, {"id": "4", "text": "input document", "language": "en"}, + {"id": "5", "text": "input document", "language": "en"}, {"id": "6", "text": + "input document", "language": "en"}, {"id": "7", "text": "input document", "language": + "en"}, {"id": "8", "text": "input document", "language": "en"}, {"id": "9", + "text": "input document", "language": "en"}, {"id": "10", "text": "input document", "language": "en"}, {"id": "11", "text": "input document", "language": "en"}, {"id": "12", "text": "input document", "language": "en"}, {"id": "13", "text": "input document", "language": "en"}, {"id": "14", "text": "input document", @@ -34,21 +36,21 @@ interactions: Accept: - application/json, text/json Content-Length: - - '2351' + - '2566' Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/analyze + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/analyze response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 25 records are permitted."}}}' headers: - apim-request-id: 93ed61cf-5065-4080-87f6-469e573db369 + apim-request-id: 3f4f9ff0-fd80-4013-a47b-5d9d3880e784 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:48:37 GMT + date: Thu, 07 Oct 2021 23:59:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -56,5 +58,5 @@ interactions: status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/analyze + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/analyze version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_bad_model_version_error.yaml index ad70a0bedf64..b7430cb33837 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_bad_model_version_error.yaml @@ -14,19 +14,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?model-version=bad&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?model-version=bad&stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 31d07ef9-7556-427d-876c-49eb8e435d9e + - 52bd1376-0e61-4135-8708-418b42e77665 date: - - Tue, 03 Aug 2021 17:29:57 GMT + - Wed, 06 Oct 2021 20:59:20 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/af7dec3f-b9f1-4d88-b5d6-eeb8c51c5a05 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/7b424cc2-08a5-4d0a-8486-60ac0ab10a95 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -34,7 +34,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '137' + - '871' status: code: 202 message: Accepted @@ -48,21 +48,123 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/af7dec3f-b9f1-4d88-b5d6-eeb8c51c5a05 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/7b424cc2-08a5-4d0a-8486-60ac0ab10a95 response: body: - string: '{"jobId":"af7dec3f-b9f1-4d88-b5d6-eeb8c51c5a05","lastUpdateDateTime":"2021-08-03T17:30:02Z","createdDateTime":"2021-08-03T17:29:57Z","expirationDateTime":"2021-08-04T17:29:57Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"7b424cc2-08a5-4d0a-8486-60ac0ab10a95","lastUpdateDateTime":"2021-10-06T20:59:20Z","createdDateTime":"2021-10-06T20:59:20Z","expirationDateTime":"2021-10-07T20:59:20Z","status":"notStarted","errors":[]}' + headers: + apim-request-id: + - 5a36fdd0-e6ba-4a7f-a059-9b0a5e954db9 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 06 Oct 2021 20:59:25 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '9' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/7b424cc2-08a5-4d0a-8486-60ac0ab10a95 + response: + body: + string: '{"jobId":"7b424cc2-08a5-4d0a-8486-60ac0ab10a95","lastUpdateDateTime":"2021-10-06T20:59:20Z","createdDateTime":"2021-10-06T20:59:20Z","expirationDateTime":"2021-10-07T20:59:20Z","status":"notStarted","errors":[]}' + headers: + apim-request-id: + - 6bcf986e-c7f8-4903-810b-d998b7c8120e + content-type: + - application/json; charset=utf-8 + date: + - Wed, 06 Oct 2021 20:59:30 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '13' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/7b424cc2-08a5-4d0a-8486-60ac0ab10a95 + response: + body: + string: '{"jobId":"7b424cc2-08a5-4d0a-8486-60ac0ab10a95","lastUpdateDateTime":"2021-10-06T20:59:31Z","createdDateTime":"2021-10-06T20:59:20Z","expirationDateTime":"2021-10-07T20:59:20Z","status":"running","errors":[]}' + headers: + apim-request-id: + - edaa83d9-53b5-4a8a-a0ac-47aa1cadcd68 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 06 Oct 2021 20:59:35 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '12' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/7b424cc2-08a5-4d0a-8486-60ac0ab10a95 + response: + body: + string: '{"jobId":"7b424cc2-08a5-4d0a-8486-60ac0ab10a95","lastUpdateDateTime":"2021-10-06T20:59:36Z","createdDateTime":"2021-10-06T20:59:20Z","expirationDateTime":"2021-10-07T20:59:20Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 8460441e-b553-4119-b0bd-57307d03f42c + - 0d828eae-af43-4108-ad5c-0bc898c40afb content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:01 GMT + - Wed, 06 Oct 2021 20:59:41 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -70,7 +172,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '51' + - '80' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_cancellation.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_cancellation.yaml index cb09569471e4..4709dd53f6a6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_cancellation.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_cancellation.yaml @@ -19,19 +19,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - ae151444-790d-40bf-8df7-f9ff700e1a60 + - 0cd06666-b61b-415e-b8c7-302951db93f0 date: - - Tue, 03 Aug 2021 17:30:03 GMT + - Wed, 06 Oct 2021 20:59:42 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/af90b266-e1b4-4567-a86c-cbc212830e31 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/3edcc9b4-a90c-476a-891d-02653ddd6b65 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '369' + - '1093' status: code: 202 message: Accepted @@ -53,19 +53,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/af90b266-e1b4-4567-a86c-cbc212830e31 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/3edcc9b4-a90c-476a-891d-02653ddd6b65 response: body: - string: '{"jobId":"af90b266-e1b4-4567-a86c-cbc212830e31","lastUpdateDateTime":"2021-08-03T17:30:07Z","createdDateTime":"2021-08-03T17:30:03Z","expirationDateTime":"2021-08-04T17:30:03Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]},{"id":"1","entities":[],"relations":[],"warnings":[]},{"id":"2","entities":[],"relations":[],"warnings":[]},{"id":"3","entities":[],"relations":[],"warnings":[]},{"id":"4","entities":[],"relations":[],"warnings":[]},{"id":"5","entities":[],"relations":[],"warnings":[]},{"id":"6","entities":[],"relations":[],"warnings":[]},{"id":"7","entities":[],"relations":[],"warnings":[]},{"id":"8","entities":[],"relations":[],"warnings":[]},{"id":"9","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"3edcc9b4-a90c-476a-891d-02653ddd6b65","lastUpdateDateTime":"2021-10-06T20:59:42Z","createdDateTime":"2021-10-06T20:59:41Z","expirationDateTime":"2021-10-07T20:59:41Z","status":"notStarted","errors":[]}' headers: apim-request-id: - - 4ad894e3-fdee-42df-b71d-351fa3e4f619 + - b4bb40ca-9ee0-469a-a2fa-cadd3b5e4c94 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:08 GMT + - Wed, 06 Oct 2021 20:59:47 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -73,7 +73,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '145' + - '78' status: code: 200 message: OK @@ -87,19 +87,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/af90b266-e1b4-4567-a86c-cbc212830e31 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/3edcc9b4-a90c-476a-891d-02653ddd6b65 response: body: - string: '{"jobId":"af90b266-e1b4-4567-a86c-cbc212830e31","lastUpdateDateTime":"2021-08-03T17:30:07Z","createdDateTime":"2021-08-03T17:30:03Z","expirationDateTime":"2021-08-04T17:30:03Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]},{"id":"1","entities":[],"relations":[],"warnings":[]},{"id":"2","entities":[],"relations":[],"warnings":[]},{"id":"3","entities":[],"relations":[],"warnings":[]},{"id":"4","entities":[],"relations":[],"warnings":[]},{"id":"5","entities":[],"relations":[],"warnings":[]},{"id":"6","entities":[],"relations":[],"warnings":[]},{"id":"7","entities":[],"relations":[],"warnings":[]},{"id":"8","entities":[],"relations":[],"warnings":[]},{"id":"9","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"3edcc9b4-a90c-476a-891d-02653ddd6b65","lastUpdateDateTime":"2021-10-06T20:59:42Z","createdDateTime":"2021-10-06T20:59:41Z","expirationDateTime":"2021-10-07T20:59:41Z","status":"notStarted","errors":[]}' headers: apim-request-id: - - 4476ef2e-970c-414a-9f58-24e76285f9c5 + - 89d1acef-04af-4df2-9f73-e358abcb5179 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:08 GMT + - Wed, 06 Oct 2021 20:59:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -107,7 +107,75 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '95' + - '9' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/3edcc9b4-a90c-476a-891d-02653ddd6b65 + response: + body: + string: '{"jobId":"3edcc9b4-a90c-476a-891d-02653ddd6b65","lastUpdateDateTime":"2021-10-06T20:59:56Z","createdDateTime":"2021-10-06T20:59:41Z","expirationDateTime":"2021-10-07T20:59:41Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]},{"id":"1","entities":[],"relations":[],"warnings":[]},{"id":"2","entities":[],"relations":[],"warnings":[]},{"id":"3","entities":[],"relations":[],"warnings":[]},{"id":"4","entities":[],"relations":[],"warnings":[]},{"id":"5","entities":[],"relations":[],"warnings":[]},{"id":"6","entities":[],"relations":[],"warnings":[]},{"id":"7","entities":[],"relations":[],"warnings":[]},{"id":"8","entities":[],"relations":[],"warnings":[]},{"id":"9","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: + - 4666204b-da08-4381-b847-eb7d7ba9e68f + content-type: + - application/json; charset=utf-8 + date: + - Wed, 06 Oct 2021 20:59:57 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '159' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/3edcc9b4-a90c-476a-891d-02653ddd6b65 + response: + body: + string: '{"jobId":"3edcc9b4-a90c-476a-891d-02653ddd6b65","lastUpdateDateTime":"2021-10-06T20:59:56Z","createdDateTime":"2021-10-06T20:59:41Z","expirationDateTime":"2021-10-07T20:59:41Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]},{"id":"1","entities":[],"relations":[],"warnings":[]},{"id":"2","entities":[],"relations":[],"warnings":[]},{"id":"3","entities":[],"relations":[],"warnings":[]},{"id":"4","entities":[],"relations":[],"warnings":[]},{"id":"5","entities":[],"relations":[],"warnings":[]},{"id":"6","entities":[],"relations":[],"warnings":[]},{"id":"7","entities":[],"relations":[],"warnings":[]},{"id":"8","entities":[],"relations":[],"warnings":[]},{"id":"9","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: + - 22a5c23c-137d-42bc-aa8b-8b83cce7ba60 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 06 Oct 2021 20:59:58 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '246' status: code: 200 message: OK @@ -123,20 +191,20 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/af90b266-e1b4-4567-a86c-cbc212830e31 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs/3edcc9b4-a90c-476a-891d-02653ddd6b65 response: body: string: '{"error":{"code":"InvalidRequest","message":"Failed to cancel job with - job id af90b266-e1b4-4567-a86c-cbc212830e31 as its already completed."}}' + job id 3edcc9b4-a90c-476a-891d-02653ddd6b65 as its already completed."}}' headers: apim-request-id: - - 24a70ce3-acfa-4a83-9f05-db205d044141 + - c25cbc04-ac48-4b90-805f-8bfc3d5513cd content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:08 GMT + - Wed, 06 Oct 2021 20:59:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -144,7 +212,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '27' + - '22' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_default_string_index_type_is_UnicodeCodePoint.yaml index 61e34adb7fcf..099b42c8bef7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -13,19 +13,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 637374fb-852d-4bfe-959f-0f1f1132ddd5 + - bcb7bd36-d580-4f7b-85a6-4446dd440e07 date: - - Tue, 03 Aug 2021 17:30:10 GMT + - Wed, 06 Oct 2021 20:59:57 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/e5d8c146-cc54-42c1-8e52-310a1c04d150 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9b20e790-33b9-483d-8711-282017b72a6a strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -33,7 +33,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '164' + - '168' status: code: 202 message: Accepted @@ -47,19 +47,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/e5d8c146-cc54-42c1-8e52-310a1c04d150 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9b20e790-33b9-483d-8711-282017b72a6a response: body: - string: '{"jobId":"e5d8c146-cc54-42c1-8e52-310a1c04d150","lastUpdateDateTime":"2021-08-03T17:30:12Z","createdDateTime":"2021-08-03T17:30:10Z","expirationDateTime":"2021-08-04T17:30:10Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"9b20e790-33b9-483d-8711-282017b72a6a","lastUpdateDateTime":"2021-10-06T20:59:58Z","createdDateTime":"2021-10-06T20:59:58Z","expirationDateTime":"2021-10-07T20:59:58Z","status":"notStarted","errors":[]}' headers: apim-request-id: - - 91bb8d59-a42d-4709-ab46-a454726afb21 + - 529db425-4107-490f-82eb-f43b632c2a76 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:15 GMT + - Wed, 06 Oct 2021 21:00:02 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -67,7 +67,75 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '51' + - '18' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9b20e790-33b9-483d-8711-282017b72a6a + response: + body: + string: '{"jobId":"9b20e790-33b9-483d-8711-282017b72a6a","lastUpdateDateTime":"2021-10-06T21:00:06Z","createdDateTime":"2021-10-06T20:59:58Z","expirationDateTime":"2021-10-07T20:59:58Z","status":"running","errors":[]}' + headers: + apim-request-id: + - 7a6d6efb-f92c-4e86-8bee-ade29d8fd0cb + content-type: + - application/json; charset=utf-8 + date: + - Wed, 06 Oct 2021 21:00:07 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '7' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9b20e790-33b9-483d-8711-282017b72a6a + response: + body: + string: '{"jobId":"9b20e790-33b9-483d-8711-282017b72a6a","lastUpdateDateTime":"2021-10-06T21:00:11Z","createdDateTime":"2021-10-06T20:59:58Z","expirationDateTime":"2021-10-07T20:59:58Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: + - 881886d3-6b83-4bfb-a8b3-0567fc621ca4 + content-type: + - application/json; charset=utf-8 + date: + - Wed, 06 Oct 2021 21:00:13 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '79' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_disable_service_logs.yaml index e6d08c0d1f57..fa8d17b15d19 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_disable_service_logs.yaml @@ -14,19 +14,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint&loggingOptOut=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint&loggingOptOut=true response: body: string: '' headers: apim-request-id: - - 545a404a-b127-436d-8cdb-6695b870b20b + - d736bff2-1457-46cc-b7ab-6805adedbd87 date: - - Tue, 03 Aug 2021 17:30:16 GMT + - Wed, 06 Oct 2021 21:00:14 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/e4ee63ff-d1e6-4695-9dcb-3e9e8a2eb95a + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/998f0fdb-a7d0-427e-8124-fbbd60873ea7 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -34,7 +34,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '149' + - '175' status: code: 202 message: Accepted @@ -48,19 +48,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/e4ee63ff-d1e6-4695-9dcb-3e9e8a2eb95a + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/998f0fdb-a7d0-427e-8124-fbbd60873ea7 response: body: - string: '{"jobId":"e4ee63ff-d1e6-4695-9dcb-3e9e8a2eb95a","lastUpdateDateTime":"2021-08-03T17:30:17Z","createdDateTime":"2021-08-03T17:30:16Z","expirationDateTime":"2021-08-04T17:30:16Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"998f0fdb-a7d0-427e-8124-fbbd60873ea7","lastUpdateDateTime":"2021-10-06T21:00:14Z","createdDateTime":"2021-10-06T21:00:14Z","expirationDateTime":"2021-10-07T21:00:14Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 655a3ec4-0484-455d-8866-8734b7de8467 + - 5fca1cd3-f06c-4fe6-9a78-5a7fc836c3e1 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:21 GMT + - Wed, 06 Oct 2021 21:00:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -68,7 +68,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '174' + - '101' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_document_attribute_error_no_result_attribute.yaml index a626b459b719..35d100c83fbe 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_document_attribute_error_no_result_attribute.yaml @@ -13,19 +13,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 3e4cff2d-d7d5-40cc-85d3-6220c74e9958 + - 6133d634-07a8-4c70-8a00-77014bc91c24 date: - - Tue, 03 Aug 2021 17:30:22 GMT + - Wed, 06 Oct 2021 21:00:19 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/0c1cc586-b31f-41c0-94c2-7a0d6e945138 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4a729570-dba6-431f-9643-096b1454bc0b strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -33,7 +33,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '162' + - '204' status: code: 202 message: Accepted @@ -47,21 +47,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/0c1cc586-b31f-41c0-94c2-7a0d6e945138 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4a729570-dba6-431f-9643-096b1454bc0b response: body: - string: '{"jobId":"0c1cc586-b31f-41c0-94c2-7a0d6e945138","lastUpdateDateTime":"2021-08-03T17:30:27Z","createdDateTime":"2021-08-03T17:30:22Z","expirationDateTime":"2021-08-04T17:30:22Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"4a729570-dba6-431f-9643-096b1454bc0b","lastUpdateDateTime":"2021-10-06T21:00:20Z","createdDateTime":"2021-10-06T21:00:19Z","expirationDateTime":"2021-10-07T21:00:19Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 6ff9f4e2-0b77-4f01-9152-05cabfd1bd11 + - d7c38340-6636-4ca3-9215-d6ee8923e07f content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:27 GMT + - Wed, 06 Oct 2021 21:00:24 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -69,7 +69,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '101' + - '71' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_document_errors.yaml index 1ad578fd424e..b370245667ac 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_document_errors.yaml @@ -16,19 +16,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 531e3070-ebd9-4cfd-b81c-ddc9b8931ec9 + - babbcb9d-429e-40ca-9069-8b403b2a7274 date: - - Tue, 03 Aug 2021 17:30:28 GMT + - Wed, 06 Oct 2021 21:00:24 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a867df06-137e-46a8-a778-035680da3a36 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a26b209e-1f7e-4a27-842a-733780d5f63e strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '118' + - '266' status: code: 202 message: Accepted @@ -50,12 +50,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a867df06-137e-46a8-a778-035680da3a36 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a26b209e-1f7e-4a27-842a-733780d5f63e response: body: - string: '{"jobId":"a867df06-137e-46a8-a778-035680da3a36","lastUpdateDateTime":"2021-08-03T17:30:32Z","createdDateTime":"2021-08-03T17:30:28Z","expirationDateTime":"2021-08-04T17:30:28Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"a26b209e-1f7e-4a27-842a-733780d5f63e","lastUpdateDateTime":"2021-10-06T21:00:25Z","createdDateTime":"2021-10-06T21:00:25Z","expirationDateTime":"2021-10-07T21:00:25Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid @@ -66,11 +66,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 892b635d-1350-4cd5-adc4-e1c72f0d3d5b + - d4c1b433-82d4-471c-9d02-58189b8be7ed content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:33 GMT + - Wed, 06 Oct 2021 21:00:29 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -78,7 +78,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '53' + - '75' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_duplicate_ids_error.yaml index 979794f03ad4..715a41b73f46 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_duplicate_ids_error.yaml @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 66121894-e9b1-4e35-bf06-ec6e746e1dd5 + - a380fd57-b12a-4fe3-b0fd-f85a2010df9e content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:33 GMT + - Wed, 06 Oct 2021 21:00:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '21' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_explicit_set_string_index_type.yaml index 107d8b6aeb47..d825ab5a683f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_explicit_set_string_index_type.yaml @@ -13,19 +13,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=TextElements_v8 response: body: string: '' headers: apim-request-id: - - ee8997cc-77ac-4d54-b678-eef6c0d32c8e + - 3d74d515-4b77-4d9d-aefd-bc58c45b674d date: - - Tue, 03 Aug 2021 17:30:35 GMT + - Wed, 06 Oct 2021 21:00:31 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/ed811964-297f-449b-af5e-d00d47e4eb6c + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/14ac300c-e689-4d97-9baf-dc525fd0c3d5 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -33,7 +33,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '95' + - '165' status: code: 202 message: Accepted @@ -47,19 +47,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/ed811964-297f-449b-af5e-d00d47e4eb6c + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/14ac300c-e689-4d97-9baf-dc525fd0c3d5 response: body: - string: '{"jobId":"ed811964-297f-449b-af5e-d00d47e4eb6c","lastUpdateDateTime":"2021-08-03T17:30:37Z","createdDateTime":"2021-08-03T17:30:35Z","expirationDateTime":"2021-08-04T17:30:35Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"14ac300c-e689-4d97-9baf-dc525fd0c3d5","lastUpdateDateTime":"2021-10-06T21:00:31Z","createdDateTime":"2021-10-06T21:00:31Z","expirationDateTime":"2021-10-07T21:00:31Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 85342d14-0aee-4052-9b62-740deaece305 + - 734e1688-f909-4243-af66-1ca34535a1f2 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:40 GMT + - Wed, 06 Oct 2021 21:00:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -67,7 +67,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '44' + - '211' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_assertion.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_assertion.yaml index 45372302d7f6..02580059d371 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_assertion.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_assertion.yaml @@ -15,19 +15,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 8c41bdfa-8252-4e67-816d-40a1f036301b + - 38023f65-aa0f-4eb4-9e64-16dcf42a400d date: - - Tue, 03 Aug 2021 17:30:40 GMT + - Wed, 06 Oct 2021 21:00:37 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8b4c15b8-a9fa-4807-b29a-14548fb1e0bb + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/c1b06403-1580-44b0-bb01-d25f933214e0 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '96' + - '208' status: code: 202 message: Accepted @@ -49,20 +49,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8b4c15b8-a9fa-4807-b29a-14548fb1e0bb + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/c1b06403-1580-44b0-bb01-d25f933214e0 response: body: - string: '{"jobId":"8b4c15b8-a9fa-4807-b29a-14548fb1e0bb","lastUpdateDateTime":"2021-08-03T17:30:42Z","createdDateTime":"2021-08-03T17:30:40Z","expirationDateTime":"2021-08-04T17:30:40Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + string: '{"jobId":"c1b06403-1580-44b0-bb01-d25f933214e0","lastUpdateDateTime":"2021-10-06T21:00:37Z","createdDateTime":"2021-10-06T21:00:37Z","expirationDateTime":"2021-10-07T21:00:37Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - b4586a14-d998-43ac-afd8-54280777204e + - b1eb0554-9937-4e19-ae1c-4c6c10c8901f content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:46 GMT + - Wed, 06 Oct 2021 21:00:41 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -70,7 +70,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '50' + - '61' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_continuation_token.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_continuation_token.yaml new file mode 100644 index 000000000000..2c1b7de32458 --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_healthcare_continuation_token.yaml @@ -0,0 +1,300 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "Baby not likely to have Meningitis. + In case of fever in the mother, consider Penicillin for the baby too.", "language": + "en"}, {"id": "2", "text": "patients must have histologically confirmed NHL", + "language": "en"}, {"id": "3", "text": "", "language": "en"}, {"id": "4", "text": + "The patient was diagnosed with Parkinsons Disease (PD)", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '393' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint + response: + body: + string: '' + headers: + apim-request-id: + - ea1692fd-0f77-42e4-8dc1-fb82e253ae6d + date: + - Mon, 25 Oct 2021 18:35:46 GMT + operation-location: + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200 + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1566' + status: + code: 202 + message: Accepted +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:35:46Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"notStarted","errors":[]}' + headers: + apim-request-id: + - 71ac1ee4-f149-42ac-a84e-af081a0de2bc + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:35:51 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '8' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:35:52Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"running","errors":[]}' + headers: + apim-request-id: + - e7d78131-1d19-4f9d-a4f7-a891b33e74a4 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:35:56 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '130' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:35:52Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"running","errors":[]}' + headers: + apim-request-id: + - 98a7200c-99e8-4bf2-bfe6-95d67a9680c4 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:35:57 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '126' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:35:52Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"running","errors":[]}' + headers: + apim-request-id: + - f71cfcfb-f4d2-4d30-a159-ae07401851b7 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:36:01 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '55' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:36:02Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"running","errors":[]}' + headers: + apim-request-id: + - dd2fe871-7503-4e52-b438-d1c529938382 + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:36:02 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '8' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:36:02Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":47,"transactionsCount":1},"entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/1/entities/0","role":"Examination"},{"ref":"#/results/documents/1/entities/1","role":"Condition"}]}],"warnings":[]},{"id":"4","statistics":{"charactersCount":54,"transactionsCount":1},"entities":[{"offset":31,"length":18,"text":"Parkinsons + Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson + Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/2/entities/0","role":"FullTerm"},{"ref":"#/results/documents/2/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: + - 5b99bd19-d94d-4361-b049-8a09287e188e + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:36:06 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '324' + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8dee58e0-04ae-4494-8eda-b5e2a432a200?showStats=True + response: + body: + string: '{"jobId":"8dee58e0-04ae-4494-8eda-b5e2a432a200","lastUpdateDateTime":"2021-10-25T18:36:02Z","createdDateTime":"2021-10-25T18:35:45Z","expirationDateTime":"2021-10-26T18:35:45Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":47,"transactionsCount":1},"entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/1/entities/0","role":"Examination"},{"ref":"#/results/documents/1/entities/1","role":"Condition"}]}],"warnings":[]},{"id":"4","statistics":{"charactersCount":54,"transactionsCount":1},"entities":[{"offset":31,"length":18,"text":"Parkinsons + Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson + Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/2/entities/0","role":"FullTerm"},{"ref":"#/results/documents/2/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: + - 3e39f1f1-1a86-4fde-a222-503bc8ecdc6a + content-type: + - application/json; charset=utf-8 + date: + - Mon, 25 Oct 2021 18:36:08 GMT + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-envoy-upstream-service-time: + - '1789' + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_input_with_some_errors.yaml index 169e55fff508..4d82e1c3c5d8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_input_with_some_errors.yaml @@ -16,19 +16,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 493b3267-d383-48cd-bd72-86c5b39c1023 + - 07d3d9d6-bbc8-493d-838c-ffbe9d232d58 date: - - Tue, 03 Aug 2021 17:30:47 GMT + - Wed, 06 Oct 2021 21:00:43 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/85b7e43d-052a-43a2-8d84-8c664f004f15 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/feeff47b-bd6c-40ab-970d-e1ea33342084 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '120' + - '287' status: code: 202 message: Accepted @@ -50,12 +50,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/85b7e43d-052a-43a2-8d84-8c664f004f15 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/feeff47b-bd6c-40ab-970d-e1ea33342084 response: body: - string: '{"jobId":"85b7e43d-052a-43a2-8d84-8c664f004f15","lastUpdateDateTime":"2021-08-03T17:30:47Z","createdDateTime":"2021-08-03T17:30:46Z","expirationDateTime":"2021-08-04T17:30:46Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"3","entities":[{"offset":11,"length":5,"text":"100mg","category":"Dosage","confidenceScore":1.0},{"offset":17,"length":9,"text":"ibuprofen","category":"MedicationName","confidenceScore":1.0,"name":"ibuprofen","links":[{"dataSource":"UMLS","id":"C0020740"},{"dataSource":"AOD","id":"0000019879"},{"dataSource":"ATC","id":"M01AE01"},{"dataSource":"CCPSS","id":"0046165"},{"dataSource":"CHV","id":"0000006519"},{"dataSource":"CSP","id":"2270-2077"},{"dataSource":"DRUGBANK","id":"DB01050"},{"dataSource":"GS","id":"1611"},{"dataSource":"LCH_NW","id":"sh97005926"},{"dataSource":"LNC","id":"LP16165-0"},{"dataSource":"MEDCIN","id":"40458"},{"dataSource":"MMSL","id":"d00015"},{"dataSource":"MSH","id":"D007052"},{"dataSource":"MTHSPL","id":"WK2XYI10QM"},{"dataSource":"NCI","id":"C561"},{"dataSource":"NCI_CTRP","id":"C561"},{"dataSource":"NCI_DCP","id":"00803"},{"dataSource":"NCI_DTP","id":"NSC0256857"},{"dataSource":"NCI_FDA","id":"WK2XYI10QM"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000613511"},{"dataSource":"NDDF","id":"002377"},{"dataSource":"PDQ","id":"CDR0000040475"},{"dataSource":"RCD","id":"x02MO"},{"dataSource":"RXNORM","id":"5640"},{"dataSource":"SNM","id":"E-7772"},{"dataSource":"SNMI","id":"C-603C0"},{"dataSource":"SNOMEDCT_US","id":"387207008"},{"dataSource":"USP","id":"m39860"},{"dataSource":"USPMG","id":"MTHU000060"},{"dataSource":"VANDF","id":"4017840"}]},{"offset":34,"length":11,"text":"twice + string: '{"jobId":"feeff47b-bd6c-40ab-970d-e1ea33342084","lastUpdateDateTime":"2021-10-06T21:00:43Z","createdDateTime":"2021-10-06T21:00:42Z","expirationDateTime":"2021-10-07T21:00:42Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"3","entities":[{"offset":11,"length":5,"text":"100mg","category":"Dosage","confidenceScore":1.0},{"offset":17,"length":9,"text":"ibuprofen","category":"MedicationName","confidenceScore":1.0,"name":"ibuprofen","links":[{"dataSource":"UMLS","id":"C0020740"},{"dataSource":"AOD","id":"0000019879"},{"dataSource":"ATC","id":"M01AE01"},{"dataSource":"CCPSS","id":"0046165"},{"dataSource":"CHV","id":"0000006519"},{"dataSource":"CSP","id":"2270-2077"},{"dataSource":"DRUGBANK","id":"DB01050"},{"dataSource":"GS","id":"1611"},{"dataSource":"LCH_NW","id":"sh97005926"},{"dataSource":"LNC","id":"LP16165-0"},{"dataSource":"MEDCIN","id":"40458"},{"dataSource":"MMSL","id":"d00015"},{"dataSource":"MSH","id":"D007052"},{"dataSource":"MTHSPL","id":"WK2XYI10QM"},{"dataSource":"NCI","id":"C561"},{"dataSource":"NCI_CTRP","id":"C561"},{"dataSource":"NCI_DCP","id":"00803"},{"dataSource":"NCI_DTP","id":"NSC0256857"},{"dataSource":"NCI_FDA","id":"WK2XYI10QM"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000613511"},{"dataSource":"NDDF","id":"002377"},{"dataSource":"PDQ","id":"CDR0000040475"},{"dataSource":"RCD","id":"x02MO"},{"dataSource":"RXNORM","id":"5640"},{"dataSource":"SNM","id":"E-7772"},{"dataSource":"SNMI","id":"C-603C0"},{"dataSource":"SNOMEDCT_US","id":"387207008"},{"dataSource":"USP","id":"m39860"},{"dataSource":"USPMG","id":"MTHU000060"},{"dataSource":"VANDF","id":"4017840"}]},{"offset":34,"length":11,"text":"twice daily","category":"Frequency","confidenceScore":1.0}],"relations":[{"relationType":"DosageOfMedication","entities":[{"ref":"#/results/documents/0/entities/0","role":"Dosage"},{"ref":"#/results/documents/0/entities/1","role":"Medication"}]},{"relationType":"FrequencyOfMedication","entities":[{"ref":"#/results/documents/0/entities/1","role":"Medication"},{"ref":"#/results/documents/0/entities/2","role":"Frequency"}]}],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid @@ -63,11 +63,11 @@ interactions: language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 5fcdf59d-f6e4-4eb4-94e5-f5f02efd5bc7 + - 590efa50-86bf-4a7b-8cf0-307389146c40 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:52 GMT + - Wed, 06 Oct 2021 21:00:47 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -75,7 +75,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '62' + - '88' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_invalid_language_hint_docs.yaml index bc611a8a8e8d..29b7d6fab214 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_invalid_language_hint_docs.yaml @@ -14,19 +14,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 3e35dedd-3b2b-4612-8294-eb46db9dd30c + - 29b6cdd8-22ef-4aa3-917b-59549e282f72 date: - - Tue, 03 Aug 2021 17:30:52 GMT + - Wed, 06 Oct 2021 21:00:48 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/b50c0271-ab40-435b-8f0c-7c68a2e2535a + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/b294255f-a952-4d17-abec-35c6c0a37706 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -34,7 +34,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '89' + - '163' status: code: 202 message: Accepted @@ -48,21 +48,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/b50c0271-ab40-435b-8f0c-7c68a2e2535a + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/b294255f-a952-4d17-abec-35c6c0a37706 response: body: - string: '{"jobId":"b50c0271-ab40-435b-8f0c-7c68a2e2535a","lastUpdateDateTime":"2021-08-03T17:30:57Z","createdDateTime":"2021-08-03T17:30:52Z","expirationDateTime":"2021-08-04T17:30:52Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"b294255f-a952-4d17-abec-35c6c0a37706","lastUpdateDateTime":"2021-10-06T21:00:49Z","createdDateTime":"2021-10-06T21:00:48Z","expirationDateTime":"2021-10-07T21:00:48Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 55d7517f-6bb7-4d84-95df-d4d3aacee3a1 + - 94594dda-e17b-4a99-a27b-fcf9703b0cda content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:30:58 GMT + - Wed, 06 Oct 2021 21:00:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -70,7 +70,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '44' + - '66' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_invalid_language_hint_method.yaml index df082868d656..b35d6f098728 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_invalid_language_hint_method.yaml @@ -14,19 +14,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - d7be58dd-d2b1-4f6c-9671-07e2957393d8 + - 5ed37298-d57a-4aa3-813f-76a1e3bc8b79 date: - - Tue, 03 Aug 2021 17:30:59 GMT + - Wed, 06 Oct 2021 21:00:54 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/ab4f7df9-8925-45d3-80a7-4232eb9c92c6 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/50c103ef-a550-4dcb-be35-6b4f3463dfaf strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -34,7 +34,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '101' + - '166' status: code: 202 message: Accepted @@ -48,21 +48,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/ab4f7df9-8925-45d3-80a7-4232eb9c92c6 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/50c103ef-a550-4dcb-be35-6b4f3463dfaf response: body: - string: '{"jobId":"ab4f7df9-8925-45d3-80a7-4232eb9c92c6","lastUpdateDateTime":"2021-08-03T17:31:02Z","createdDateTime":"2021-08-03T17:30:59Z","expirationDateTime":"2021-08-04T17:30:59Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"50c103ef-a550-4dcb-be35-6b4f3463dfaf","lastUpdateDateTime":"2021-10-06T21:00:54Z","createdDateTime":"2021-10-06T21:00:54Z","expirationDateTime":"2021-10-07T21:00:54Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - dea6fe94-a9c8-427e-a47c-d2c98ac55f21 + - 4bb978bb-666f-4865-b85f-6ee09b641334 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:03 GMT + - Wed, 06 Oct 2021 21:00:59 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -70,7 +70,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '47' + - '58' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_normalized_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_normalized_text.yaml index cb88ec6d0f97..1cfd53e63153 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_normalized_text.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_normalized_text.yaml @@ -14,19 +14,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 9429a83c-ed96-4d9c-a36b-4c0a52259308 + - c9978209-8222-4f13-864a-cb457319ddf5 date: - - Tue, 03 Aug 2021 17:31:04 GMT + - Wed, 06 Oct 2021 21:00:58 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9fa46be5-5449-4639-b559-66749c9ea053 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/eb76df63-5216-4bcd-8326-21580f351d66 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -34,7 +34,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '90' + - '140' status: code: 202 message: Accepted @@ -48,21 +48,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9fa46be5-5449-4639-b559-66749c9ea053 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/eb76df63-5216-4bcd-8326-21580f351d66 response: body: - string: '{"jobId":"9fa46be5-5449-4639-b559-66749c9ea053","lastUpdateDateTime":"2021-08-03T17:31:07Z","createdDateTime":"2021-08-03T17:31:04Z","expirationDateTime":"2021-08-04T17:31:04Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + string: '{"jobId":"eb76df63-5216-4bcd-8326-21580f351d66","lastUpdateDateTime":"2021-10-06T21:01:00Z","createdDateTime":"2021-10-06T21:00:59Z","expirationDateTime":"2021-10-07T21:00:59Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/0/entities/0","role":"Examination"},{"ref":"#/results/documents/0/entities/1","role":"Condition"}]}],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - f02eb6a3-705d-4540-a112-2bb6aa2e9f6a + - a37001bc-fa58-46af-ae8f-1a0b60c033f1 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:09 GMT + - Wed, 06 Oct 2021 21:01:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -70,7 +70,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '37' + - '78' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_out_of_order_ids.yaml index aead2833137c..771b370282f3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_out_of_order_ids.yaml @@ -16,19 +16,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 815f8be6-c59f-4e0e-9c6e-d27e8364c5d5 + - 5ab76da6-5979-4508-9332-a22bcf6dcbb9 date: - - Tue, 03 Aug 2021 17:31:11 GMT + - Wed, 06 Oct 2021 21:01:05 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/e18ed664-abb5-4ad8-81d7-5339c5ccd106 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8eb17c77-5892-4504-b483-7e342e1088b3 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '147' + - '343' status: code: 202 message: Accepted @@ -50,21 +50,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/e18ed664-abb5-4ad8-81d7-5339c5ccd106 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8eb17c77-5892-4504-b483-7e342e1088b3 response: body: - string: '{"jobId":"e18ed664-abb5-4ad8-81d7-5339c5ccd106","lastUpdateDateTime":"2021-08-03T17:31:12Z","createdDateTime":"2021-08-03T17:31:10Z","expirationDateTime":"2021-08-04T17:31:10Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"56","entities":[],"relations":[],"warnings":[]},{"id":"0","entities":[],"relations":[],"warnings":[]},{"id":"19","entities":[],"relations":[],"warnings":[]},{"id":"1","entities":[],"relations":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"8eb17c77-5892-4504-b483-7e342e1088b3","lastUpdateDateTime":"2021-10-06T21:01:06Z","createdDateTime":"2021-10-06T21:01:05Z","expirationDateTime":"2021-10-07T21:01:05Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"56","entities":[],"relations":[],"warnings":[]},{"id":"0","entities":[],"relations":[],"warnings":[]},{"id":"19","entities":[],"relations":[],"warnings":[]},{"id":"1","entities":[],"relations":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 55fd9745-e170-4ac7-9b81-8175f032a7ab + - 0db90c62-04bf-4de3-8df8-29363a40d0e6 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:15 GMT + - Wed, 06 Oct 2021 21:01:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -72,7 +72,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '64' + - '98' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_pass_cls.yaml index 63715d9b1f6d..32fd1b22f79a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_pass_cls.yaml @@ -14,19 +14,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 2bf56b3f-074f-43e7-bdef-d27bb59aa99d + - 24f6f9f8-2163-45ee-88f4-69b2c0d14f8e date: - - Tue, 03 Aug 2021 17:31:17 GMT + - Wed, 06 Oct 2021 21:01:11 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/464cb2ed-696c-4d54-b291-c2f508fe097e + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/606071b6-8b65-4510-8c91-900d50b37c4e strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -34,7 +34,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '166' + - '153' status: code: 202 message: Accepted @@ -48,20 +48,20 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/464cb2ed-696c-4d54-b291-c2f508fe097e + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/606071b6-8b65-4510-8c91-900d50b37c4e response: body: - string: '{"jobId":"464cb2ed-696c-4d54-b291-c2f508fe097e","lastUpdateDateTime":"2021-08-03T17:31:17Z","createdDateTime":"2021-08-03T17:31:17Z","expirationDateTime":"2021-08-04T17:31:17Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":5,"length":7,"text":"passing","category":"MeasurementValue","confidenceScore":0.78},{"offset":13,"length":3,"text":"cls","category":"Diagnosis","confidenceScore":1.0,"name":"Coffin-Lowry + string: '{"jobId":"606071b6-8b65-4510-8c91-900d50b37c4e","lastUpdateDateTime":"2021-10-06T21:01:11Z","createdDateTime":"2021-10-06T21:01:11Z","expirationDateTime":"2021-10-07T21:01:11Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":5,"length":7,"text":"passing","category":"MeasurementValue","confidenceScore":0.78},{"offset":13,"length":3,"text":"cls","category":"Diagnosis","confidenceScore":1.0,"name":"Coffin-Lowry syndrome","links":[{"dataSource":"UMLS","id":"C0265252"},{"dataSource":"CHV","id":"0000025867"},{"dataSource":"JABL","id":"238"},{"dataSource":"MDR","id":"10081806"},{"dataSource":"MEDCIN","id":"311935"},{"dataSource":"MSH","id":"D038921"},{"dataSource":"NCI","id":"C84643"},{"dataSource":"NCI_CELLOSAURUS","id":"C84643"},{"dataSource":"OMIM","id":"303600"},{"dataSource":"RCD","id":"Xa0Zc"},{"dataSource":"SNM","id":"D-5122"},{"dataSource":"SNMI","id":"D4-00811"},{"dataSource":"SNOMEDCT_US","id":"15182000"}]}],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 61b66a13-20e8-4d20-af64-ac48ab745021 + - b4c1c249-f993-40c0-960c-3fcf8de44276 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:22 GMT + - Wed, 06 Oct 2021 21:01:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -69,7 +69,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '44' + - '60' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_passing_only_string.yaml index 7dc32f259bfd..27a11f54ca7b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_passing_only_string.yaml @@ -16,19 +16,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 9a773dea-2708-41f0-8577-12c315d23e1c + - 3e406d78-8634-4fb6-be54-0e721ffbc71d date: - - Tue, 03 Aug 2021 17:31:22 GMT + - Wed, 06 Oct 2021 21:01:16 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9e7f6c16-8095-470a-a114-d36b489a74d5 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9f947551-5b2c-4e62-aae6-40b1eefd4db4 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '130' + - '250' status: code: 202 message: Accepted @@ -50,12 +50,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9e7f6c16-8095-470a-a114-d36b489a74d5 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/9f947551-5b2c-4e62-aae6-40b1eefd4db4 response: body: - string: '{"jobId":"9e7f6c16-8095-470a-a114-d36b489a74d5","lastUpdateDateTime":"2021-08-03T17:31:27Z","createdDateTime":"2021-08-03T17:31:22Z","expirationDateTime":"2021-08-04T17:31:22Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":29,"length":19,"text":"high + string: '{"jobId":"9f947551-5b2c-4e62-aae6-40b1eefd4db4","lastUpdateDateTime":"2021-10-06T21:01:17Z","createdDateTime":"2021-10-06T21:01:16Z","expirationDateTime":"2021-10-07T21:01:16Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":29,"length":19,"text":"high blood pressure","category":"SymptomOrSign","confidenceScore":1.0,"assertion":{"certainty":"negative"},"name":"Hypertensive disease","links":[{"dataSource":"UMLS","id":"C0020538"},{"dataSource":"AOD","id":"0000023317"},{"dataSource":"BI","id":"BI00001"},{"dataSource":"CCPSS","id":"1017493"},{"dataSource":"CCS","id":"7.1"},{"dataSource":"CHV","id":"0000015800"},{"dataSource":"COSTAR","id":"397"},{"dataSource":"CSP","id":"0571-5243"},{"dataSource":"CST","id":"HYPERTENS"},{"dataSource":"DXP","id":"U002034"},{"dataSource":"HPO","id":"HP:0000822"},{"dataSource":"ICD10","id":"I10-I15.9"},{"dataSource":"ICD10AM","id":"I10-I15.9"},{"dataSource":"ICD10CM","id":"I10"},{"dataSource":"ICD9CM","id":"997.91"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU035456"},{"dataSource":"ICPC2P","id":"K85004"},{"dataSource":"LCH","id":"U002317"},{"dataSource":"LCH_NW","id":"sh85063723"},{"dataSource":"LNC","id":"LA14293-7"},{"dataSource":"MDR","id":"10020772"},{"dataSource":"MEDCIN","id":"33288"},{"dataSource":"MEDLINEPLUS","id":"34"},{"dataSource":"MSH","id":"D006973"},{"dataSource":"MTH","id":"005"},{"dataSource":"MTHICD9","id":"997.91"},{"dataSource":"NANDA-I","id":"00905"},{"dataSource":"NCI","id":"C3117"},{"dataSource":"NCI_CPTAC","id":"C3117"},{"dataSource":"NCI_CTCAE","id":"E13785"},{"dataSource":"NCI_CTRP","id":"C3117"},{"dataSource":"NCI_FDA","id":"1908"},{"dataSource":"NCI_GDC","id":"C3117"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000458091"},{"dataSource":"NCI_NICHD","id":"C3117"},{"dataSource":"NOC","id":"060808"},{"dataSource":"OMIM","id":"MTHU002068"},{"dataSource":"PCDS","id":"PRB_11000.06"},{"dataSource":"PDQ","id":"CDR0000686951"},{"dataSource":"PSY","id":"23830"},{"dataSource":"RCD","id":"XE0Ub"},{"dataSource":"SNM","id":"F-70700"},{"dataSource":"SNMI","id":"D3-02000"},{"dataSource":"SNOMEDCT_US","id":"38341003"},{"dataSource":"WHO","id":"0210"}]}],"relations":[],"warnings":[]},{"id":"1","entities":[{"offset":11,"length":5,"text":"100mg","category":"Dosage","confidenceScore":1.0},{"offset":17,"length":9,"text":"ibuprofen","category":"MedicationName","confidenceScore":1.0,"name":"ibuprofen","links":[{"dataSource":"UMLS","id":"C0020740"},{"dataSource":"AOD","id":"0000019879"},{"dataSource":"ATC","id":"M01AE01"},{"dataSource":"CCPSS","id":"0046165"},{"dataSource":"CHV","id":"0000006519"},{"dataSource":"CSP","id":"2270-2077"},{"dataSource":"DRUGBANK","id":"DB01050"},{"dataSource":"GS","id":"1611"},{"dataSource":"LCH_NW","id":"sh97005926"},{"dataSource":"LNC","id":"LP16165-0"},{"dataSource":"MEDCIN","id":"40458"},{"dataSource":"MMSL","id":"d00015"},{"dataSource":"MSH","id":"D007052"},{"dataSource":"MTHSPL","id":"WK2XYI10QM"},{"dataSource":"NCI","id":"C561"},{"dataSource":"NCI_CTRP","id":"C561"},{"dataSource":"NCI_DCP","id":"00803"},{"dataSource":"NCI_DTP","id":"NSC0256857"},{"dataSource":"NCI_FDA","id":"WK2XYI10QM"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000613511"},{"dataSource":"NDDF","id":"002377"},{"dataSource":"PDQ","id":"CDR0000040475"},{"dataSource":"RCD","id":"x02MO"},{"dataSource":"RXNORM","id":"5640"},{"dataSource":"SNM","id":"E-7772"},{"dataSource":"SNMI","id":"C-603C0"},{"dataSource":"SNOMEDCT_US","id":"387207008"},{"dataSource":"USP","id":"m39860"},{"dataSource":"USPMG","id":"MTHU000060"},{"dataSource":"VANDF","id":"4017840"}]},{"offset":34,"length":11,"text":"twice daily","category":"Frequency","confidenceScore":1.0}],"relations":[{"relationType":"DosageOfMedication","entities":[{"ref":"#/results/documents/1/entities/0","role":"Dosage"},{"ref":"#/results/documents/1/entities/1","role":"Medication"}]},{"relationType":"FrequencyOfMedication","entities":[{"ref":"#/results/documents/1/entities/1","role":"Medication"},{"ref":"#/results/documents/1/entities/2","role":"Frequency"}]}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid @@ -63,11 +63,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - b982cb3a-980f-497f-9360-4a89121d89ca + - 8f70e5e8-565d-435e-a34e-5ca56555c7b8 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:27 GMT + - Wed, 06 Oct 2021 21:01:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -75,7 +75,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '59' + - '86' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_payload_too_large.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_payload_too_large.yaml index 6abd20ae3a41..131b8f5dcc22 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_payload_too_large.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_payload_too_large.yaml @@ -8513,20 +8513,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Request Payload sent is too large to be processed. Limit request size to: 524288"}}}' headers: apim-request-id: - - 039876ee-ad6c-46e2-b42d-7d6f801ba628 + - f4b4c4c9-fe12-414b-b916-b659e93a529e content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:30 GMT + - Wed, 06 Oct 2021 21:01:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -8534,7 +8534,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '41' + - '22' status: code: 413 message: Payload Too Large diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_relations.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_relations.yaml index dac0b01ef13a..7b92826845a9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_relations.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_relations.yaml @@ -14,19 +14,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 43864fac-5bae-44be-9916-d3bdd3c0eaf7 + - d2c81693-2192-4594-9dcf-cbaae82b4a84 date: - - Tue, 03 Aug 2021 17:31:32 GMT + - Wed, 06 Oct 2021 21:01:23 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/feb8a48f-b493-48c8-9df9-9a1a54aefbfa + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/354ce5c3-e260-4205-ba98-cd7942b210d7 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -34,7 +34,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '95' + - '210' status: code: 202 message: Accepted @@ -48,23 +48,23 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/feb8a48f-b493-48c8-9df9-9a1a54aefbfa + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/354ce5c3-e260-4205-ba98-cd7942b210d7 response: body: - string: '{"jobId":"feb8a48f-b493-48c8-9df9-9a1a54aefbfa","lastUpdateDateTime":"2021-08-03T17:31:37Z","createdDateTime":"2021-08-03T17:31:32Z","expirationDateTime":"2021-08-04T17:31:32Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":31,"length":18,"text":"Parkinsons + string: '{"jobId":"354ce5c3-e260-4205-ba98-cd7942b210d7","lastUpdateDateTime":"2021-10-06T21:01:24Z","createdDateTime":"2021-10-06T21:01:24Z","expirationDateTime":"2021-10-07T21:01:24Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":31,"length":18,"text":"Parkinsons Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/0/entities/0","role":"FullTerm"},{"ref":"#/results/documents/0/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 0fa5086c-a8e6-4869-a06f-06751fa84bb8 + - 17aeea63-8f19-4435-9d70-3ad34fd876b6 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:37 GMT + - Wed, 06 Oct 2021 21:01:29 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -72,7 +72,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '43' + - '88' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_show_stats_and_model_version.yaml index 978bff3d10b7..6a92a851bf45 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_show_stats_and_model_version.yaml @@ -16,19 +16,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?model-version=2021-01-11&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?model-version=2021-01-11&stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - f9d0aa45-e54e-4aa7-8534-0e837f393238 + - 569af522-67ff-4031-be22-becdd0c4236d date: - - Tue, 03 Aug 2021 17:31:38 GMT + - Wed, 06 Oct 2021 21:01:29 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/db74621f-7558-4203-b6e3-adbf629656af + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/fa1686bc-5e44-458d-9096-29b291955fdb strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '165' + - '281' status: code: 202 message: Accepted @@ -50,21 +50,21 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/db74621f-7558-4203-b6e3-adbf629656af?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/fa1686bc-5e44-458d-9096-29b291955fdb?showStats=True response: body: - string: '{"jobId":"db74621f-7558-4203-b6e3-adbf629656af","lastUpdateDateTime":"2021-08-03T17:31:42Z","createdDateTime":"2021-08-03T17:31:38Z","expirationDateTime":"2021-08-04T17:31:38Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"fa1686bc-5e44-458d-9096-29b291955fdb","lastUpdateDateTime":"2021-10-06T21:01:30Z","createdDateTime":"2021-10-06T21:01:29Z","expirationDateTime":"2021-10-07T21:01:29Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 32cd507e-8560-47b6-b5be-ae9802b58659 + - 3b24a1a0-0351-4f83-83d3-dc72ae99219f content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:43 GMT + - Wed, 06 Oct 2021 21:01:34 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -72,7 +72,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '63' + - '93' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_too_many_documents.yaml index 4fddcc600740..df755f01ae86 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_too_many_documents.yaml @@ -21,20 +21,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - 25b5a792-bed1-496d-bd26-315a7fd2229d + - cf9ab841-f039-4001-a556-833deb99a3d3 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:43 GMT + - Wed, 06 Oct 2021 21:01:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_user_agent.yaml index aba4d2d718d8..546b9fc84813 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_user_agent.yaml @@ -14,19 +14,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - 2e3969b9-0d39-40d2-b6ce-c1535ccf4a02 + - cf37d2dd-c335-4479-860f-e3244bf08c84 date: - - Tue, 03 Aug 2021 17:31:45 GMT + - Wed, 06 Oct 2021 21:01:35 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/02227605-e159-4cc2-9acd-4a821aef9715 + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/266cf9d5-fa6b-4faa-8a24-88e91b30d914 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -34,7 +34,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '96' + - '183' status: code: 202 message: Accepted @@ -48,19 +48,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/02227605-e159-4cc2-9acd-4a821aef9715 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/266cf9d5-fa6b-4faa-8a24-88e91b30d914 response: body: - string: '{"jobId":"02227605-e159-4cc2-9acd-4a821aef9715","lastUpdateDateTime":"2021-08-03T17:31:47Z","createdDateTime":"2021-08-03T17:31:45Z","expirationDateTime":"2021-08-04T17:31:45Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"1","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"266cf9d5-fa6b-4faa-8a24-88e91b30d914","lastUpdateDateTime":"2021-10-06T21:01:36Z","createdDateTime":"2021-10-06T21:01:35Z","expirationDateTime":"2021-10-07T21:01:35Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"1","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 3d67282c-a66a-491c-9dab-134e4b37111d + - 6aba02f4-6ad2-414c-b0e3-8f3f390fe739 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:50 GMT + - Wed, 06 Oct 2021 21:01:41 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -68,7 +68,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '476' + - '67' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_whole_batch_language_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_whole_batch_language_hint_and_dict_input.yaml index db14109f9654..a5ded21804f5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_whole_batch_language_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare.test_whole_batch_language_hint_and_dict_input.yaml @@ -16,19 +16,19 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: apim-request-id: - - d81d65d4-93d2-4ff2-bfe5-5cf2ef6879dc + - 13adf861-bce4-44f3-8e50-8b50913a85e6 date: - - Tue, 03 Aug 2021 17:31:51 GMT + - Wed, 06 Oct 2021 21:01:41 GMT operation-location: - - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d7206ad3-b765-46ef-90af-d7954f19c58a + - https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/dcde9975-9dbd-4f73-99f2-bef128e882c4 strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '210' + - '269' status: code: 202 message: Accepted @@ -50,19 +50,19 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d7206ad3-b765-46ef-90af-d7954f19c58a + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/dcde9975-9dbd-4f73-99f2-bef128e882c4 response: body: - string: '{"jobId":"d7206ad3-b765-46ef-90af-d7954f19c58a","lastUpdateDateTime":"2021-08-03T17:31:52Z","createdDateTime":"2021-08-03T17:31:51Z","expirationDateTime":"2021-08-04T17:31:51Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"1","entities":[],"relations":[],"warnings":[]},{"id":"2","entities":[],"relations":[],"warnings":[]},{"id":"3","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"dcde9975-9dbd-4f73-99f2-bef128e882c4","lastUpdateDateTime":"2021-10-06T21:01:44Z","createdDateTime":"2021-10-06T21:01:41Z","expirationDateTime":"2021-10-07T21:01:41Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"1","entities":[],"relations":[],"warnings":[]},{"id":"2","entities":[],"relations":[],"warnings":[]},{"id":"3","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: apim-request-id: - - 2de05b50-a1ec-4378-80f1-238ad9f1519a + - 40aff08d-4355-46fc-90c1-52e9e73c6791 content-type: - application/json; charset=utf-8 date: - - Tue, 03 Aug 2021 17:31:57 GMT + - Wed, 06 Oct 2021 21:01:46 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -70,7 +70,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '130' + - '100' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_bad_model_version_error.yaml index c12823751703..d6a6d9a9d33d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_bad_model_version_error.yaml @@ -10,46 +10,46 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?model-version=bad&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?model-version=bad&stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: 84299dfd-f6a6-4f5b-956c-e70d3fcc6d46 - date: Tue, 03 Aug 2021 17:33:05 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a247cfed-df90-48e4-b3f1-aeac03d2c49a + apim-request-id: 39adbaeb-c8b2-4aa3-8582-3fe6a9ff6794 + date: Wed, 06 Oct 2021 21:01:46 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8441fdea-9be6-4629-850a-9b1ca4e69642 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '100' + x-envoy-upstream-service-time: '168' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?model-version=bad&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?model-version=bad&stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a247cfed-df90-48e4-b3f1-aeac03d2c49a + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8441fdea-9be6-4629-850a-9b1ca4e69642 response: body: - string: '{"jobId":"a247cfed-df90-48e4-b3f1-aeac03d2c49a","lastUpdateDateTime":"2021-08-03T17:33:07Z","createdDateTime":"2021-08-03T17:33:04Z","expirationDateTime":"2021-08-04T17:33:04Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"8441fdea-9be6-4629-850a-9b1ca4e69642","lastUpdateDateTime":"2021-10-06T21:01:47Z","createdDateTime":"2021-10-06T21:01:47Z","expirationDateTime":"2021-10-07T21:01:47Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 63c9bb94-785a-49ad-8705-9a60e6d5bc1f + apim-request-id: c64fce61-2250-4e78-b7ff-56bf02c3d831 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:10 GMT + date: Wed, 06 Oct 2021 21:01:51 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '44' + x-envoy-upstream-service-time: '125' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/a247cfed-df90-48e4-b3f1-aeac03d2c49a + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/8441fdea-9be6-4629-850a-9b1ca4e69642 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_cancellation.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_cancellation.yaml index 528fdd633628..48d31ba5795b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_cancellation.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_cancellation.yaml @@ -15,90 +15,90 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: 9f8090b1-c415-4e32-b1b9-96fd200150a4 - date: Tue, 03 Aug 2021 17:33:11 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4098ef0e-6f9c-4f74-a697-a3a9aeab6d64 + apim-request-id: 83e72a3a-f907-4ca9-92f9-7132f6cb6d41 + date: Wed, 06 Oct 2021 21:01:52 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/49db803f-adcf-4a32-b573-5a441fb96d7a strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '318' + x-envoy-upstream-service-time: '437' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4098ef0e-6f9c-4f74-a697-a3a9aeab6d64 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/49db803f-adcf-4a32-b573-5a441fb96d7a response: body: - string: '{"jobId":"4098ef0e-6f9c-4f74-a697-a3a9aeab6d64","lastUpdateDateTime":"2021-08-03T17:33:11Z","createdDateTime":"2021-08-03T17:33:10Z","expirationDateTime":"2021-08-04T17:33:10Z","status":"notStarted","errors":[]}' + string: '{"jobId":"49db803f-adcf-4a32-b573-5a441fb96d7a","lastUpdateDateTime":"2021-10-06T21:01:53Z","createdDateTime":"2021-10-06T21:01:52Z","expirationDateTime":"2021-10-07T21:01:52Z","status":"running","errors":[]}' headers: - apim-request-id: 9411e7b6-2aa3-42f0-8ee7-d19a972320d7 + apim-request-id: 541b048e-26b5-4567-81b1-0e54321054c3 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:11 GMT + date: Wed, 06 Oct 2021 21:01:52 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '13' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/4098ef0e-6f9c-4f74-a697-a3a9aeab6d64 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/49db803f-adcf-4a32-b573-5a441fb96d7a - request: body: null headers: Accept: - application/json, text/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: DELETE - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4098ef0e-6f9c-4f74-a697-a3a9aeab6d64 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs/49db803f-adcf-4a32-b573-5a441fb96d7a response: body: string: '' headers: - apim-request-id: 364eb0ed-fd00-4e1e-a72b-24a0348f5e9c - date: Tue, 03 Aug 2021 17:33:11 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4098ef0e-6f9c-4f74-a697-a3a9aeab6d64 + apim-request-id: 25a4fcc1-e607-4f65-ad12-9f6c0ae4101a + date: Wed, 06 Oct 2021 21:01:53 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/49db803f-adcf-4a32-b573-5a441fb96d7a strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '35' + x-envoy-upstream-service-time: '49' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs/4098ef0e-6f9c-4f74-a697-a3a9aeab6d64 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs/49db803f-adcf-4a32-b573-5a441fb96d7a - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4098ef0e-6f9c-4f74-a697-a3a9aeab6d64 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/49db803f-adcf-4a32-b573-5a441fb96d7a response: body: - string: '{"jobId":"4098ef0e-6f9c-4f74-a697-a3a9aeab6d64","lastUpdateDateTime":"2021-08-03T17:33:11Z","createdDateTime":"2021-08-03T17:33:10Z","expirationDateTime":"2021-08-04T17:33:10Z","status":"cancelled","errors":[]}' + string: '{"jobId":"49db803f-adcf-4a32-b573-5a441fb96d7a","lastUpdateDateTime":"2021-10-06T21:01:53Z","createdDateTime":"2021-10-06T21:01:52Z","expirationDateTime":"2021-10-07T21:01:52Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]},{"id":"1","entities":[],"relations":[],"warnings":[]},{"id":"2","entities":[],"relations":[],"warnings":[]},{"id":"3","entities":[],"relations":[],"warnings":[]},{"id":"4","entities":[],"relations":[],"warnings":[]},{"id":"5","entities":[],"relations":[],"warnings":[]},{"id":"6","entities":[],"relations":[],"warnings":[]},{"id":"7","entities":[],"relations":[],"warnings":[]},{"id":"8","entities":[],"relations":[],"warnings":[]},{"id":"9","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 8529f28e-3b4c-4b35-93b4-eacc5e27ad2d + apim-request-id: df1360f9-54be-4858-bdb0-888c8a9c7d4c content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:16 GMT + date: Wed, 06 Oct 2021 21:01:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '14' + x-envoy-upstream-service-time: '288' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/4098ef0e-6f9c-4f74-a697-a3a9aeab6d64 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/49db803f-adcf-4a32-b573-5a441fb96d7a version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_default_string_index_type_is_UnicodeCodePoint.yaml index 73d8040178a9..eac52cbaf749 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -9,44 +9,44 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: b4964073-b0eb-4b8d-8149-f953d8442e0c - date: Tue, 03 Aug 2021 17:33:17 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/237e292b-da59-413a-b246-01d7b761e22b + apim-request-id: 0a6bedb4-e3b8-47cb-a3e6-d51e645abfdd + date: Wed, 06 Oct 2021 21:01:58 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/2207e166-8869-43ed-bd77-0aa241b4630b strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '95' + x-envoy-upstream-service-time: '267' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/237e292b-da59-413a-b246-01d7b761e22b + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/2207e166-8869-43ed-bd77-0aa241b4630b response: body: - string: '{"jobId":"237e292b-da59-413a-b246-01d7b761e22b","lastUpdateDateTime":"2021-08-03T17:33:17Z","createdDateTime":"2021-08-03T17:33:17Z","expirationDateTime":"2021-08-04T17:33:17Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"2207e166-8869-43ed-bd77-0aa241b4630b","lastUpdateDateTime":"2021-10-06T21:01:59Z","createdDateTime":"2021-10-06T21:01:58Z","expirationDateTime":"2021-10-07T21:01:58Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 403e097e-9ceb-4421-99de-eaffe3aaae97 + apim-request-id: 9d0840cc-7fad-44d0-b919-87152d632be8 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:21 GMT + date: Wed, 06 Oct 2021 21:02:04 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '44' + x-envoy-upstream-service-time: '140' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/237e292b-da59-413a-b246-01d7b761e22b + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/2207e166-8869-43ed-bd77-0aa241b4630b version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_disable_service_logs.yaml index c9c2e030e2ef..dcf50f9913a3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_disable_service_logs.yaml @@ -10,44 +10,44 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint&loggingOptOut=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint&loggingOptOut=true response: body: string: '' headers: - apim-request-id: 0e430b68-0f76-4a66-82b9-abbb4bc185b1 - date: Tue, 03 Aug 2021 17:33:22 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/1917a84a-9f08-44b6-9f5b-3cc51f1b2005 + apim-request-id: 223d4122-176d-46c6-9311-89fc2418740f + date: Wed, 06 Oct 2021 21:02:04 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/dd2d6866-1690-4194-8533-f9a24f1bcd9b strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '101' + x-envoy-upstream-service-time: '561' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint&loggingOptOut=true + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint&loggingOptOut=true - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/1917a84a-9f08-44b6-9f5b-3cc51f1b2005 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/dd2d6866-1690-4194-8533-f9a24f1bcd9b response: body: - string: '{"jobId":"1917a84a-9f08-44b6-9f5b-3cc51f1b2005","lastUpdateDateTime":"2021-08-03T17:33:27Z","createdDateTime":"2021-08-03T17:33:22Z","expirationDateTime":"2021-08-04T17:33:22Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"dd2d6866-1690-4194-8533-f9a24f1bcd9b","lastUpdateDateTime":"2021-10-06T21:02:05Z","createdDateTime":"2021-10-06T21:02:04Z","expirationDateTime":"2021-10-07T21:02:04Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: c6f90752-c608-4681-8f2a-30f7306ea3d8 + apim-request-id: 6e32939c-3a1a-4d2f-8b75-56c7e96f9747 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:28 GMT + date: Wed, 06 Oct 2021 21:02:09 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '48' + x-envoy-upstream-service-time: '154' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/1917a84a-9f08-44b6-9f5b-3cc51f1b2005 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/dd2d6866-1690-4194-8533-f9a24f1bcd9b version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_document_errors.yaml index ada1f75179b0..9a45ce5bc759 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_document_errors.yaml @@ -12,34 +12,34 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: 6f40ade0-2fc3-4849-aad2-7539d21ae2e3 - date: Tue, 03 Aug 2021 17:33:28 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a20f3ec9-553c-42e6-a74c-568d9eafd48e + apim-request-id: 5aa9d41c-1e0a-440f-abad-62818fc1a2e8 + date: Wed, 06 Oct 2021 21:02:10 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/fc017c6f-ec2c-4d68-be54-fd3b34dfceaf strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '121' + x-envoy-upstream-service-time: '380' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a20f3ec9-553c-42e6-a74c-568d9eafd48e + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/fc017c6f-ec2c-4d68-be54-fd3b34dfceaf response: body: - string: '{"jobId":"a20f3ec9-553c-42e6-a74c-568d9eafd48e","lastUpdateDateTime":"2021-08-03T17:33:32Z","createdDateTime":"2021-08-03T17:33:28Z","expirationDateTime":"2021-08-04T17:33:28Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"fc017c6f-ec2c-4d68-be54-fd3b34dfceaf","lastUpdateDateTime":"2021-10-06T21:02:11Z","createdDateTime":"2021-10-06T21:02:10Z","expirationDateTime":"2021-10-07T21:02:10Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid @@ -49,15 +49,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 06de25ee-705f-4d9d-9eac-1f01d3829b4d + apim-request-id: 10d73066-ef26-4e95-98b9-53f1b129eac9 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:33 GMT + date: Wed, 06 Oct 2021 21:02:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '57' + x-envoy-upstream-service-time: '69' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/a20f3ec9-553c-42e6-a74c-568d9eafd48e + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/fc017c6f-ec2c-4d68-be54-fd3b34dfceaf version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_duplicate_ids_error.yaml index 40587785db67..50c71b53753b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_duplicate_ids_error.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: 800387d7-4261-4a33-a239-5581d2b4effe + apim-request-id: 2c729d08-852e-4e2d-bfe0-c2ec514dff73 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:34 GMT + date: Wed, 06 Oct 2021 21:02:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '6' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_explicit_set_string_index_type.yaml index 0c11b963cfec..ccd5f4f4c9ac 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_explicit_set_string_index_type.yaml @@ -9,44 +9,44 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=TextElements_v8 response: body: string: '' headers: - apim-request-id: 6ea2e2ac-5b2f-4ae6-9ece-48be02904935 - date: Tue, 03 Aug 2021 17:33:34 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/736315d8-cb86-48f1-a82c-0d7bd02839b9 + apim-request-id: ced7bbec-28a2-4338-8e41-5ba4d1bb77f0 + date: Wed, 06 Oct 2021 21:02:16 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/72095637-188c-44b2-9354-88bcacdf9c5b strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '114' + x-envoy-upstream-service-time: '340' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=TextElements_v8 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=TextElements_v8 - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/736315d8-cb86-48f1-a82c-0d7bd02839b9 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/72095637-188c-44b2-9354-88bcacdf9c5b response: body: - string: '{"jobId":"736315d8-cb86-48f1-a82c-0d7bd02839b9","lastUpdateDateTime":"2021-08-03T17:33:37Z","createdDateTime":"2021-08-03T17:33:34Z","expirationDateTime":"2021-08-04T17:33:34Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"72095637-188c-44b2-9354-88bcacdf9c5b","lastUpdateDateTime":"2021-10-06T21:02:17Z","createdDateTime":"2021-10-06T21:02:16Z","expirationDateTime":"2021-10-07T21:02:16Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: ea64f001-0871-4517-80d5-141511e966df + apim-request-id: 846030f1-c7bd-44b4-8c1b-ccba5bde5add content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:40 GMT + date: Wed, 06 Oct 2021 21:02:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '40' + x-envoy-upstream-service-time: '57' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/736315d8-cb86-48f1-a82c-0d7bd02839b9 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/72095637-188c-44b2-9354-88bcacdf9c5b version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_assertion.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_assertion.yaml index a89f9c321b92..6b92f51d1120 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_assertion.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_assertion.yaml @@ -11,45 +11,45 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: 0371e3fa-d0bb-419b-b4db-0fadcd1b9263 - date: Tue, 03 Aug 2021 17:33:40 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/3d495714-8233-4ad6-aa38-218256b05f82 + apim-request-id: 1c670973-e107-466d-a7fa-3e97940d3ed3 + date: Wed, 06 Oct 2021 21:02:21 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/bc7d9aeb-5adf-4813-9106-db5b578b5695 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '172' + x-envoy-upstream-service-time: '173' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/3d495714-8233-4ad6-aa38-218256b05f82 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/bc7d9aeb-5adf-4813-9106-db5b578b5695 response: body: - string: '{"jobId":"3d495714-8233-4ad6-aa38-218256b05f82","lastUpdateDateTime":"2021-08-03T17:33:42Z","createdDateTime":"2021-08-03T17:33:40Z","expirationDateTime":"2021-08-04T17:33:40Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + string: '{"jobId":"bc7d9aeb-5adf-4813-9106-db5b578b5695","lastUpdateDateTime":"2021-10-06T21:02:22Z","createdDateTime":"2021-10-06T21:02:22Z","expirationDateTime":"2021-10-07T21:02:22Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: ec5429da-1845-4cc9-b9b5-66d7aa179d6c + apim-request-id: be5eb31a-22db-4c6f-b330-a9d6229e5e43 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:46 GMT + date: Wed, 06 Oct 2021 21:02:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '50' + x-envoy-upstream-service-time: '67' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/3d495714-8233-4ad6-aa38-218256b05f82 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/bc7d9aeb-5adf-4813-9106-db5b578b5695 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_continuation_token.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_continuation_token.yaml new file mode 100644 index 000000000000..869ffc97d56f --- /dev/null +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_healthcare_continuation_token.yaml @@ -0,0 +1,96 @@ +interactions: +- request: + body: '{"documents": [{"id": "1", "text": "Baby not likely to have Meningitis. + In case of fever in the mother, consider Penicillin for the baby too.", "language": + "en"}, {"id": "2", "text": "patients must have histologically confirmed NHL", + "language": "en"}, {"id": "3", "text": "", "language": "en"}, {"id": "4", "text": + "The patient was diagnosed with Parkinsons Disease (PD)", "language": "en"}]}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '393' + Content-Type: + - application/json + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint + response: + body: + string: '' + headers: + apim-request-id: e4937493-c255-4e5e-8ee4-2d6e63777d9f + date: Mon, 25 Oct 2021 19:22:45 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982 + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '235' + status: + code: 202 + message: Accepted + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982?showStats=True + response: + body: + string: '{"jobId":"53509204-49cd-4066-8864-6469dd11c982","lastUpdateDateTime":"2021-10-25T19:22:47Z","createdDateTime":"2021-10-25T19:22:45Z","expirationDateTime":"2021-10-26T19:22:45Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":47,"transactionsCount":1},"entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/1/entities/0","role":"Examination"},{"ref":"#/results/documents/1/entities/1","role":"Condition"}]}],"warnings":[]},{"id":"4","statistics":{"charactersCount":54,"transactionsCount":1},"entities":[{"offset":31,"length":18,"text":"Parkinsons + Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson + Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/2/entities/0","role":"FullTerm"},{"ref":"#/results/documents/2/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: 2d69e095-4583-4bf7-aa9f-9281ae0bdb0e + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:22:50 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '129' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982?showStats=True +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982?showStats=True + response: + body: + string: '{"jobId":"53509204-49cd-4066-8864-6469dd11c982","lastUpdateDateTime":"2021-10-25T19:22:47Z","createdDateTime":"2021-10-25T19:22:45Z","expirationDateTime":"2021-10-26T19:22:45Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"offset":0,"length":4,"text":"Baby","category":"Age","confidenceScore":0.94,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]},{"offset":24,"length":10,"text":"Meningitis","category":"Diagnosis","confidenceScore":1.0,"assertion":{"certainty":"negativePossible"},"name":"Meningitis","links":[{"dataSource":"UMLS","id":"C0025289"},{"dataSource":"AOD","id":"0000006185"},{"dataSource":"BI","id":"BI00546"},{"dataSource":"CCPSS","id":"1018016"},{"dataSource":"CCSR_10","id":"NVS001"},{"dataSource":"CHV","id":"0000007932"},{"dataSource":"COSTAR","id":"478"},{"dataSource":"CSP","id":"2042-5301"},{"dataSource":"CST","id":"MENINGITIS"},{"dataSource":"DXP","id":"U002543"},{"dataSource":"HPO","id":"HP:0001287"},{"dataSource":"ICD10","id":"G03.9"},{"dataSource":"ICD10AM","id":"G03.9"},{"dataSource":"ICD10CM","id":"G03.9"},{"dataSource":"ICD9CM","id":"322.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU048434"},{"dataSource":"ICPC2P","id":"N71002"},{"dataSource":"LCH","id":"U002901"},{"dataSource":"LCH_NW","id":"sh85083562"},{"dataSource":"LNC","id":"LP20756-0"},{"dataSource":"MDR","id":"10027199"},{"dataSource":"MEDCIN","id":"31192"},{"dataSource":"MEDLINEPLUS","id":"324"},{"dataSource":"MSH","id":"D008581"},{"dataSource":"NANDA-I","id":"02899"},{"dataSource":"NCI","id":"C26828"},{"dataSource":"NCI_CPTAC","id":"C26828"},{"dataSource":"NCI_CTCAE","id":"E11458"},{"dataSource":"NCI_FDA","id":"2389"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000471780"},{"dataSource":"NCI_NICHD","id":"C26828"},{"dataSource":"OMIM","id":"MTHU005994"},{"dataSource":"PSY","id":"30660"},{"dataSource":"RCD","id":"X000H"},{"dataSource":"SNM","id":"M-40000"},{"dataSource":"SNMI","id":"DA-10010"},{"dataSource":"SNOMEDCT_US","id":"7180009"},{"dataSource":"WHO","id":"0955"}]},{"offset":47,"length":5,"text":"fever","category":"SymptomOrSign","confidenceScore":1.0,"name":"Fever","links":[{"dataSource":"UMLS","id":"C0015967"},{"dataSource":"AIR","id":"FEVER"},{"dataSource":"AOD","id":"0000004396"},{"dataSource":"BI","id":"BI00751"},{"dataSource":"CCC","id":"K25.2"},{"dataSource":"CCPSS","id":"1017166"},{"dataSource":"CCSR_10","id":"SYM002"},{"dataSource":"CHV","id":"0000005010"},{"dataSource":"COSTAR","id":"300"},{"dataSource":"CPM","id":"65287"},{"dataSource":"CSP","id":"2871-4310"},{"dataSource":"CST","id":"FEVER"},{"dataSource":"DXP","id":"U001483"},{"dataSource":"GO","id":"GO:0001660"},{"dataSource":"HPO","id":"HP:0001945"},{"dataSource":"ICD10","id":"R50.9"},{"dataSource":"ICD10AM","id":"R50.9"},{"dataSource":"ICD10CM","id":"R50.9"},{"dataSource":"ICD9CM","id":"780.60"},{"dataSource":"ICNP","id":"10041539"},{"dataSource":"ICPC","id":"A03"},{"dataSource":"ICPC2EENG","id":"A03"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU041751"},{"dataSource":"ICPC2P","id":"A03002"},{"dataSource":"LCH","id":"U001776"},{"dataSource":"LCH_NW","id":"sh85047994"},{"dataSource":"LNC","id":"MTHU013518"},{"dataSource":"MDR","id":"10005911"},{"dataSource":"MEDCIN","id":"6005"},{"dataSource":"MEDLINEPLUS","id":"511"},{"dataSource":"MSH","id":"D005334"},{"dataSource":"MTHICD9","id":"780.60"},{"dataSource":"NANDA-I","id":"01128"},{"dataSource":"NCI","id":"C3038"},{"dataSource":"NCI_CTCAE","id":"E11102"},{"dataSource":"NCI_FDA","id":"1858"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000450108"},{"dataSource":"NCI_NICHD","id":"C3038"},{"dataSource":"NOC","id":"070307"},{"dataSource":"OMIM","id":"MTHU005439"},{"dataSource":"OMS","id":"50.03"},{"dataSource":"PCDS","id":"PRB_11020.02"},{"dataSource":"PDQ","id":"CDR0000775882"},{"dataSource":"PSY","id":"23840"},{"dataSource":"QMR","id":"Q0200115"},{"dataSource":"RCD","id":"X76EI"},{"dataSource":"SNM","id":"F-03003"},{"dataSource":"SNMI","id":"F-03003"},{"dataSource":"SNOMEDCT_US","id":"386661006"},{"dataSource":"WHO","id":"0725"}]},{"offset":60,"length":6,"text":"mother","category":"FamilyRelation","confidenceScore":0.99,"name":"Mother + (person)","links":[{"dataSource":"UMLS","id":"C0026591"},{"dataSource":"AOD","id":"0000027173"},{"dataSource":"CCPSS","id":"U000286"},{"dataSource":"CHV","id":"0000008266"},{"dataSource":"CSP","id":"1124-5492"},{"dataSource":"HL7V3.0","id":"MTH"},{"dataSource":"LCH","id":"U003028"},{"dataSource":"LCH_NW","id":"sh85087526"},{"dataSource":"LNC","id":"LA10417-6"},{"dataSource":"MSH","id":"D009035"},{"dataSource":"NCI","id":"C25189"},{"dataSource":"NCI_CDISC","id":"C25189"},{"dataSource":"NCI_GDC","id":"C25189"},{"dataSource":"PSY","id":"32140"},{"dataSource":"RCD","id":"X78ym"},{"dataSource":"SNMI","id":"S-10120"},{"dataSource":"SNOMEDCT_US","id":"72705000"}]},{"offset":77,"length":10,"text":"Penicillin","category":"MedicationName","confidenceScore":0.9,"assertion":{"certainty":"neutralPossible"},"name":"penicillins","links":[{"dataSource":"UMLS","id":"C0030842"},{"dataSource":"AOD","id":"0000019206"},{"dataSource":"ATC","id":"J01C"},{"dataSource":"CCPSS","id":"0014106"},{"dataSource":"CHV","id":"0000009423"},{"dataSource":"CSP","id":"0199-8025"},{"dataSource":"GS","id":"4011"},{"dataSource":"LCH","id":"U003521"},{"dataSource":"LCH_NW","id":"sh85099402"},{"dataSource":"LNC","id":"LP14319-5"},{"dataSource":"MEDCIN","id":"40319"},{"dataSource":"MMSL","id":"d00116"},{"dataSource":"MSH","id":"D010406"},{"dataSource":"NCI","id":"C1500"},{"dataSource":"NCI_DTP","id":"NSC0402815"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045296"},{"dataSource":"NDDF","id":"016121"},{"dataSource":"PSY","id":"37190"},{"dataSource":"RCD","id":"x009C"},{"dataSource":"SNM","id":"E-7260"},{"dataSource":"SNMI","id":"C-54000"},{"dataSource":"SNOMEDCT_US","id":"764146007"},{"dataSource":"VANDF","id":"4019880"}]},{"offset":96,"length":4,"text":"baby","category":"FamilyRelation","confidenceScore":1.0,"name":"Infant","links":[{"dataSource":"UMLS","id":"C0021270"},{"dataSource":"AOD","id":"0000005273"},{"dataSource":"CCPSS","id":"0030805"},{"dataSource":"CHV","id":"0000006675"},{"dataSource":"DXP","id":"U002089"},{"dataSource":"LCH","id":"U002421"},{"dataSource":"LCH_NW","id":"sh85066022"},{"dataSource":"LNC","id":"LA19747-7"},{"dataSource":"MDR","id":"10021731"},{"dataSource":"MSH","id":"D007223"},{"dataSource":"NCI","id":"C27956"},{"dataSource":"NCI_FDA","id":"C27956"},{"dataSource":"NCI_NICHD","id":"C27956"},{"dataSource":"SNOMEDCT_US","id":"133931009"}]}],"relations":[],"warnings":[]},{"id":"2","statistics":{"charactersCount":47,"transactionsCount":1},"entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, + Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/1/entities/0","role":"Examination"},{"ref":"#/results/documents/1/entities/1","role":"Condition"}]}],"warnings":[]},{"id":"4","statistics":{"charactersCount":54,"transactionsCount":1},"entities":[{"offset":31,"length":18,"text":"Parkinsons + Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson + Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR + SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/2/entities/0","role":"FullTerm"},{"ref":"#/results/documents/2/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[{"id":"3","error":{"code":"InvalidArgument","message":"Invalid + document in request.","innererror":{"code":"InvalidDocument","message":"Document + text is empty."}}}],"modelVersion":"2021-05-15"}}' + headers: + apim-request-id: d68dfa45-1581-4f85-b80c-551681ff1646 + content-type: application/json; charset=utf-8 + date: Mon, 25 Oct 2021 19:22:55 GMT + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + x-content-type-options: nosniff + x-envoy-upstream-service-time: '115' + status: + code: 200 + message: OK + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/53509204-49cd-4066-8864-6469dd11c982?showStats=True +version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_input_with_some_errors.yaml index 7cc52b1cf8b1..8d4a958390d5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_input_with_some_errors.yaml @@ -12,49 +12,49 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: b879ab7a-a683-4b17-8a57-e115c7cc19b7 - date: Tue, 03 Aug 2021 17:33:46 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/de5f6dd9-2f68-4181-89e6-1809d9fe14ba + apim-request-id: 07dfe726-4d0f-4f31-b795-272d53deadf0 + date: Wed, 06 Oct 2021 21:02:26 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/0ae45d30-aa33-4a9c-a2dc-6258db3e0fcc strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '127' + x-envoy-upstream-service-time: '229' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/de5f6dd9-2f68-4181-89e6-1809d9fe14ba + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/0ae45d30-aa33-4a9c-a2dc-6258db3e0fcc response: body: - string: '{"jobId":"de5f6dd9-2f68-4181-89e6-1809d9fe14ba","lastUpdateDateTime":"2021-08-03T17:33:47Z","createdDateTime":"2021-08-03T17:33:46Z","expirationDateTime":"2021-08-04T17:33:46Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"3","entities":[{"offset":11,"length":5,"text":"100mg","category":"Dosage","confidenceScore":1.0},{"offset":17,"length":9,"text":"ibuprofen","category":"MedicationName","confidenceScore":1.0,"name":"ibuprofen","links":[{"dataSource":"UMLS","id":"C0020740"},{"dataSource":"AOD","id":"0000019879"},{"dataSource":"ATC","id":"M01AE01"},{"dataSource":"CCPSS","id":"0046165"},{"dataSource":"CHV","id":"0000006519"},{"dataSource":"CSP","id":"2270-2077"},{"dataSource":"DRUGBANK","id":"DB01050"},{"dataSource":"GS","id":"1611"},{"dataSource":"LCH_NW","id":"sh97005926"},{"dataSource":"LNC","id":"LP16165-0"},{"dataSource":"MEDCIN","id":"40458"},{"dataSource":"MMSL","id":"d00015"},{"dataSource":"MSH","id":"D007052"},{"dataSource":"MTHSPL","id":"WK2XYI10QM"},{"dataSource":"NCI","id":"C561"},{"dataSource":"NCI_CTRP","id":"C561"},{"dataSource":"NCI_DCP","id":"00803"},{"dataSource":"NCI_DTP","id":"NSC0256857"},{"dataSource":"NCI_FDA","id":"WK2XYI10QM"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000613511"},{"dataSource":"NDDF","id":"002377"},{"dataSource":"PDQ","id":"CDR0000040475"},{"dataSource":"RCD","id":"x02MO"},{"dataSource":"RXNORM","id":"5640"},{"dataSource":"SNM","id":"E-7772"},{"dataSource":"SNMI","id":"C-603C0"},{"dataSource":"SNOMEDCT_US","id":"387207008"},{"dataSource":"USP","id":"m39860"},{"dataSource":"USPMG","id":"MTHU000060"},{"dataSource":"VANDF","id":"4017840"}]},{"offset":34,"length":11,"text":"twice + string: '{"jobId":"0ae45d30-aa33-4a9c-a2dc-6258db3e0fcc","lastUpdateDateTime":"2021-10-06T21:02:28Z","createdDateTime":"2021-10-06T21:02:27Z","expirationDateTime":"2021-10-07T21:02:27Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"3","entities":[{"offset":11,"length":5,"text":"100mg","category":"Dosage","confidenceScore":1.0},{"offset":17,"length":9,"text":"ibuprofen","category":"MedicationName","confidenceScore":1.0,"name":"ibuprofen","links":[{"dataSource":"UMLS","id":"C0020740"},{"dataSource":"AOD","id":"0000019879"},{"dataSource":"ATC","id":"M01AE01"},{"dataSource":"CCPSS","id":"0046165"},{"dataSource":"CHV","id":"0000006519"},{"dataSource":"CSP","id":"2270-2077"},{"dataSource":"DRUGBANK","id":"DB01050"},{"dataSource":"GS","id":"1611"},{"dataSource":"LCH_NW","id":"sh97005926"},{"dataSource":"LNC","id":"LP16165-0"},{"dataSource":"MEDCIN","id":"40458"},{"dataSource":"MMSL","id":"d00015"},{"dataSource":"MSH","id":"D007052"},{"dataSource":"MTHSPL","id":"WK2XYI10QM"},{"dataSource":"NCI","id":"C561"},{"dataSource":"NCI_CTRP","id":"C561"},{"dataSource":"NCI_DCP","id":"00803"},{"dataSource":"NCI_DTP","id":"NSC0256857"},{"dataSource":"NCI_FDA","id":"WK2XYI10QM"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000613511"},{"dataSource":"NDDF","id":"002377"},{"dataSource":"PDQ","id":"CDR0000040475"},{"dataSource":"RCD","id":"x02MO"},{"dataSource":"RXNORM","id":"5640"},{"dataSource":"SNM","id":"E-7772"},{"dataSource":"SNMI","id":"C-603C0"},{"dataSource":"SNOMEDCT_US","id":"387207008"},{"dataSource":"USP","id":"m39860"},{"dataSource":"USPMG","id":"MTHU000060"},{"dataSource":"VANDF","id":"4017840"}]},{"offset":34,"length":11,"text":"twice daily","category":"Frequency","confidenceScore":1.0}],"relations":[{"relationType":"DosageOfMedication","entities":[{"ref":"#/results/documents/0/entities/0","role":"Dosage"},{"ref":"#/results/documents/0/entities/1","role":"Medication"}]},{"relationType":"FrequencyOfMedication","entities":[{"ref":"#/results/documents/0/entities/1","role":"Medication"},{"ref":"#/results/documents/0/entities/2","role":"Frequency"}]}],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}},{"id":"2","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 77742f78-4fcf-4354-adbb-68214fdb4956 + apim-request-id: c796bb31-064c-4ad3-854d-7849598ce2dd content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:51 GMT + date: Wed, 06 Oct 2021 21:02:32 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '66' + x-envoy-upstream-service-time: '123' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/de5f6dd9-2f68-4181-89e6-1809d9fe14ba + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/0ae45d30-aa33-4a9c-a2dc-6258db3e0fcc version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_invalid_language_hint_docs.yaml index 569f3b650b05..7c0f146c8d1f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_invalid_language_hint_docs.yaml @@ -10,46 +10,46 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: 40f53957-10ac-45a9-876e-61d16d99f7cb - date: Tue, 03 Aug 2021 17:33:52 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d6f7adad-79c5-40a6-a95b-c9840072dd53 + apim-request-id: fd98224a-d051-45c0-82ad-2390a07006af + date: Wed, 06 Oct 2021 21:02:32 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8056f80a-bdad-41c9-b072-590ae86f94b9 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '120' + x-envoy-upstream-service-time: '215' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d6f7adad-79c5-40a6-a95b-c9840072dd53 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/8056f80a-bdad-41c9-b072-590ae86f94b9 response: body: - string: '{"jobId":"d6f7adad-79c5-40a6-a95b-c9840072dd53","lastUpdateDateTime":"2021-08-03T17:33:57Z","createdDateTime":"2021-08-03T17:33:52Z","expirationDateTime":"2021-08-04T17:33:52Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"8056f80a-bdad-41c9-b072-590ae86f94b9","lastUpdateDateTime":"2021-10-06T21:02:33Z","createdDateTime":"2021-10-06T21:02:33Z","expirationDateTime":"2021-10-07T21:02:33Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 0b5a4c59-79f9-460a-b4dd-be9f43881545 + apim-request-id: 482c6dd9-80bf-4494-825d-b647a10c8752 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:33:57 GMT + date: Wed, 06 Oct 2021 21:02:37 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '44' + x-envoy-upstream-service-time: '80' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/d6f7adad-79c5-40a6-a95b-c9840072dd53 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/8056f80a-bdad-41c9-b072-590ae86f94b9 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_invalid_language_hint_method.yaml index 6fba19bac4e2..3422f2c70746 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_invalid_language_hint_method.yaml @@ -10,46 +10,46 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: 49d29e0e-5dd9-40ea-a0a1-02af3a3eaee5 - date: Tue, 03 Aug 2021 17:33:58 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4f47b172-7e42-4a94-a674-5b2947ee79df + apim-request-id: 96d5a808-5c2b-47ae-b3a7-c5c443381dc2 + date: Wed, 06 Oct 2021 21:02:38 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/613f0af7-0a4e-41be-ba6e-313467b2ff0d strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '96' + x-envoy-upstream-service-time: '166' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4f47b172-7e42-4a94-a674-5b2947ee79df + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/613f0af7-0a4e-41be-ba6e-313467b2ff0d response: body: - string: '{"jobId":"4f47b172-7e42-4a94-a674-5b2947ee79df","lastUpdateDateTime":"2021-08-03T17:34:02Z","createdDateTime":"2021-08-03T17:33:58Z","expirationDateTime":"2021-08-04T17:33:58Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"613f0af7-0a4e-41be-ba6e-313467b2ff0d","lastUpdateDateTime":"2021-10-06T21:02:39Z","createdDateTime":"2021-10-06T21:02:38Z","expirationDateTime":"2021-10-07T21:02:38Z","status":"succeeded","errors":[],"results":{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en. For additional details see https://aka.ms/text-analytics/language-support"}}}],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: e2d7fc05-cda3-47b1-951a-7ec1a3636da9 + apim-request-id: d7c04443-0024-4394-93b1-bf424aa593e7 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:03 GMT + date: Wed, 06 Oct 2021 21:02:43 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '40' + x-envoy-upstream-service-time: '68' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/4f47b172-7e42-4a94-a674-5b2947ee79df + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/613f0af7-0a4e-41be-ba6e-313467b2ff0d version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_normalized_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_normalized_text.yaml index 2b24467405af..a69fb0458336 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_normalized_text.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_normalized_text.yaml @@ -10,46 +10,46 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: c631521d-568d-4ddf-a6c8-42daaaf16454 - date: Tue, 03 Aug 2021 17:34:03 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/1375f236-d5cb-4868-9a49-142d19b119fd + apim-request-id: ba3b3943-136f-4e8c-9297-edc93f06a67c + date: Wed, 06 Oct 2021 21:02:44 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/1f8029d5-b77f-4ae6-8f2b-79b743f23015 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '201' + x-envoy-upstream-service-time: '173' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/1375f236-d5cb-4868-9a49-142d19b119fd + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/1f8029d5-b77f-4ae6-8f2b-79b743f23015 response: body: - string: '{"jobId":"1375f236-d5cb-4868-9a49-142d19b119fd","lastUpdateDateTime":"2021-08-03T17:34:07Z","createdDateTime":"2021-08-03T17:34:04Z","expirationDateTime":"2021-08-04T17:34:04Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology + string: '{"jobId":"1f8029d5-b77f-4ae6-8f2b-79b743f23015","lastUpdateDateTime":"2021-10-06T21:02:44Z","createdDateTime":"2021-10-06T21:02:44Z","expirationDateTime":"2021-10-07T21:02:44Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":19,"length":14,"text":"histologically","category":"ExaminationName","confidenceScore":1.0,"name":"Histology Procedure","links":[{"dataSource":"UMLS","id":"C0344441"},{"dataSource":"CHV","id":"0000030964"},{"dataSource":"LNC","id":"MTHU010496"},{"dataSource":"MDR","id":"10062005"},{"dataSource":"MTH","id":"U002823"},{"dataSource":"MTHMST","id":"MT140012"},{"dataSource":"NCI","id":"C49131"},{"dataSource":"SNOMEDCT_US","id":"714797009"}]},{"offset":44,"length":3,"text":"NHL","category":"Diagnosis","confidenceScore":1.0,"name":"Lymphoma, Non-Hodgkin","links":[{"dataSource":"UMLS","id":"C0024305"},{"dataSource":"BI","id":"BI00323"},{"dataSource":"CCPSS","id":"0001640"},{"dataSource":"CCS","id":"2.10.2"},{"dataSource":"CCSR_10","id":"NEO058"},{"dataSource":"CHV","id":"0000007621"},{"dataSource":"COSTAR","id":"U000045"},{"dataSource":"CSP","id":"4001-0094"},{"dataSource":"DXP","id":"U002830"},{"dataSource":"HPO","id":"HP:0012539"},{"dataSource":"ICD10","id":"C85.9"},{"dataSource":"ICD10AM","id":"M9672/3"},{"dataSource":"ICD10CM","id":"C85.9"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU053464"},{"dataSource":"ICPC2P","id":"B74002"},{"dataSource":"MDR","id":"10029547"},{"dataSource":"MEDCIN","id":"35839"},{"dataSource":"MEDLINEPLUS","id":"117"},{"dataSource":"MSH","id":"D008228"},{"dataSource":"NCI","id":"C3211"},{"dataSource":"NCI_CELLOSAURUS","id":"C3211"},{"dataSource":"NCI_CPTAC","id":"C3211"},{"dataSource":"NCI_CTEP-SDC","id":"10029593"},{"dataSource":"NCI_CTRP","id":"C3211"},{"dataSource":"NCI_GDC","id":"C3211"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000045148"},{"dataSource":"NCI_NICHD","id":"C3211"},{"dataSource":"OMIM","id":"MTHU014311"},{"dataSource":"PDQ","id":"CDR0000038957"},{"dataSource":"QMR","id":"R0121804"},{"dataSource":"RCD","id":"B627."},{"dataSource":"SNM","id":"M-YYX54"},{"dataSource":"SNMI","id":"M-96723"},{"dataSource":"SNOMEDCT_US","id":"1929004"},{"dataSource":"WHO","id":"1544"}]}],"relations":[{"relationType":"ExaminationFindsCondition","entities":[{"ref":"#/results/documents/0/entities/0","role":"Examination"},{"ref":"#/results/documents/0/entities/1","role":"Condition"}]}],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 97381180-04c5-4449-97a0-b62e87535263 + apim-request-id: 2708bb8d-2ee6-441c-b43f-223cf5fcaa73 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:09 GMT + date: Wed, 06 Oct 2021 21:02:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '139' + x-envoy-upstream-service-time: '108' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/1375f236-d5cb-4868-9a49-142d19b119fd + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/1f8029d5-b77f-4ae6-8f2b-79b743f23015 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_out_of_order_ids.yaml index 09c2699d3978..032c3985deb1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_out_of_order_ids.yaml @@ -12,46 +12,46 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: cd04b90a-9ec4-4aaa-8c21-54f0ac5b0487 - date: Tue, 03 Aug 2021 17:34:10 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d7c091f9-592d-47cc-9965-5083eb221e7b + apim-request-id: 7678d6a2-f6ac-40b3-9334-a941e0345ec5 + date: Wed, 06 Oct 2021 21:02:49 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/c47de496-3d98-460a-a397-c595f5291548 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '154' + x-envoy-upstream-service-time: '238' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d7c091f9-592d-47cc-9965-5083eb221e7b + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/c47de496-3d98-460a-a397-c595f5291548 response: body: - string: '{"jobId":"d7c091f9-592d-47cc-9965-5083eb221e7b","lastUpdateDateTime":"2021-08-03T17:34:12Z","createdDateTime":"2021-08-03T17:34:10Z","expirationDateTime":"2021-08-04T17:34:10Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"56","entities":[],"relations":[],"warnings":[]},{"id":"0","entities":[],"relations":[],"warnings":[]},{"id":"19","entities":[],"relations":[],"warnings":[]},{"id":"1","entities":[],"relations":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"c47de496-3d98-460a-a397-c595f5291548","lastUpdateDateTime":"2021-10-06T21:02:51Z","createdDateTime":"2021-10-06T21:02:49Z","expirationDateTime":"2021-10-07T21:02:49Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"56","entities":[],"relations":[],"warnings":[]},{"id":"0","entities":[],"relations":[],"warnings":[]},{"id":"19","entities":[],"relations":[],"warnings":[]},{"id":"1","entities":[],"relations":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 549ad899-81d9-4c18-88f3-d310f2980928 + apim-request-id: f132ae6c-5f5f-40e6-b85b-765c2a7cd5ce content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:15 GMT + date: Wed, 06 Oct 2021 21:02:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '68' + x-envoy-upstream-service-time: '124' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/d7c091f9-592d-47cc-9965-5083eb221e7b + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/c47de496-3d98-460a-a397-c595f5291548 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_pass_cls.yaml index 100b85c29272..e2936318f32e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_pass_cls.yaml @@ -10,45 +10,45 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: 3e6e625c-7004-4364-9d8e-17d8b4690714 - date: Tue, 03 Aug 2021 17:34:16 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/b04d0571-a37d-4153-a9db-4a386fa8b535 + apim-request-id: e384fc8c-993b-47e9-8ead-0b7e8f1a3450 + date: Wed, 06 Oct 2021 21:02:55 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4ef38851-0eea-4cd0-8055-97bd23d431f6 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '107' + x-envoy-upstream-service-time: '177' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/b04d0571-a37d-4153-a9db-4a386fa8b535 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/4ef38851-0eea-4cd0-8055-97bd23d431f6 response: body: - string: '{"jobId":"b04d0571-a37d-4153-a9db-4a386fa8b535","lastUpdateDateTime":"2021-08-03T17:34:17Z","createdDateTime":"2021-08-03T17:34:16Z","expirationDateTime":"2021-08-04T17:34:16Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":5,"length":7,"text":"passing","category":"MeasurementValue","confidenceScore":0.78},{"offset":13,"length":3,"text":"cls","category":"Diagnosis","confidenceScore":1.0,"name":"Coffin-Lowry + string: '{"jobId":"4ef38851-0eea-4cd0-8055-97bd23d431f6","lastUpdateDateTime":"2021-10-06T21:02:56Z","createdDateTime":"2021-10-06T21:02:55Z","expirationDateTime":"2021-10-07T21:02:55Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":5,"length":7,"text":"passing","category":"MeasurementValue","confidenceScore":0.78},{"offset":13,"length":3,"text":"cls","category":"Diagnosis","confidenceScore":1.0,"name":"Coffin-Lowry syndrome","links":[{"dataSource":"UMLS","id":"C0265252"},{"dataSource":"CHV","id":"0000025867"},{"dataSource":"JABL","id":"238"},{"dataSource":"MDR","id":"10081806"},{"dataSource":"MEDCIN","id":"311935"},{"dataSource":"MSH","id":"D038921"},{"dataSource":"NCI","id":"C84643"},{"dataSource":"NCI_CELLOSAURUS","id":"C84643"},{"dataSource":"OMIM","id":"303600"},{"dataSource":"RCD","id":"Xa0Zc"},{"dataSource":"SNM","id":"D-5122"},{"dataSource":"SNMI","id":"D4-00811"},{"dataSource":"SNOMEDCT_US","id":"15182000"}]}],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 6fcd3e60-7d45-4abc-bc23-e876d4e53353 + apim-request-id: 991a2288-66f0-4612-a5da-f8927cf74394 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:21 GMT + date: Wed, 06 Oct 2021 21:03:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '48' + x-envoy-upstream-service-time: '71' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/b04d0571-a37d-4153-a9db-4a386fa8b535 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/4ef38851-0eea-4cd0-8055-97bd23d431f6 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_passing_only_string.yaml index 148a309da4fb..11ade9bb673a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_passing_only_string.yaml @@ -12,49 +12,49 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: dd8ec9a1-d7ea-4437-aa52-ff70360d2dc9 - date: Tue, 03 Aug 2021 17:34:21 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a9c83aca-b2a0-41ab-94e0-99708f91993a + apim-request-id: e26e886f-f6b2-4d8f-af4b-ce62cf396ba5 + date: Wed, 06 Oct 2021 21:03:01 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/bcdf7930-1c05-44df-8bd6-71b1ea659864 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '125' + x-envoy-upstream-service-time: '218' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/a9c83aca-b2a0-41ab-94e0-99708f91993a + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/bcdf7930-1c05-44df-8bd6-71b1ea659864 response: body: - string: '{"jobId":"a9c83aca-b2a0-41ab-94e0-99708f91993a","lastUpdateDateTime":"2021-08-03T17:34:22Z","createdDateTime":"2021-08-03T17:34:21Z","expirationDateTime":"2021-08-04T17:34:21Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":29,"length":19,"text":"high + string: '{"jobId":"bcdf7930-1c05-44df-8bd6-71b1ea659864","lastUpdateDateTime":"2021-10-06T21:03:02Z","createdDateTime":"2021-10-06T21:03:01Z","expirationDateTime":"2021-10-07T21:03:01Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":29,"length":19,"text":"high blood pressure","category":"SymptomOrSign","confidenceScore":1.0,"assertion":{"certainty":"negative"},"name":"Hypertensive disease","links":[{"dataSource":"UMLS","id":"C0020538"},{"dataSource":"AOD","id":"0000023317"},{"dataSource":"BI","id":"BI00001"},{"dataSource":"CCPSS","id":"1017493"},{"dataSource":"CCS","id":"7.1"},{"dataSource":"CHV","id":"0000015800"},{"dataSource":"COSTAR","id":"397"},{"dataSource":"CSP","id":"0571-5243"},{"dataSource":"CST","id":"HYPERTENS"},{"dataSource":"DXP","id":"U002034"},{"dataSource":"HPO","id":"HP:0000822"},{"dataSource":"ICD10","id":"I10-I15.9"},{"dataSource":"ICD10AM","id":"I10-I15.9"},{"dataSource":"ICD10CM","id":"I10"},{"dataSource":"ICD9CM","id":"997.91"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU035456"},{"dataSource":"ICPC2P","id":"K85004"},{"dataSource":"LCH","id":"U002317"},{"dataSource":"LCH_NW","id":"sh85063723"},{"dataSource":"LNC","id":"LA14293-7"},{"dataSource":"MDR","id":"10020772"},{"dataSource":"MEDCIN","id":"33288"},{"dataSource":"MEDLINEPLUS","id":"34"},{"dataSource":"MSH","id":"D006973"},{"dataSource":"MTH","id":"005"},{"dataSource":"MTHICD9","id":"997.91"},{"dataSource":"NANDA-I","id":"00905"},{"dataSource":"NCI","id":"C3117"},{"dataSource":"NCI_CPTAC","id":"C3117"},{"dataSource":"NCI_CTCAE","id":"E13785"},{"dataSource":"NCI_CTRP","id":"C3117"},{"dataSource":"NCI_FDA","id":"1908"},{"dataSource":"NCI_GDC","id":"C3117"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000458091"},{"dataSource":"NCI_NICHD","id":"C3117"},{"dataSource":"NOC","id":"060808"},{"dataSource":"OMIM","id":"MTHU002068"},{"dataSource":"PCDS","id":"PRB_11000.06"},{"dataSource":"PDQ","id":"CDR0000686951"},{"dataSource":"PSY","id":"23830"},{"dataSource":"RCD","id":"XE0Ub"},{"dataSource":"SNM","id":"F-70700"},{"dataSource":"SNMI","id":"D3-02000"},{"dataSource":"SNOMEDCT_US","id":"38341003"},{"dataSource":"WHO","id":"0210"}]}],"relations":[],"warnings":[]},{"id":"1","entities":[{"offset":11,"length":5,"text":"100mg","category":"Dosage","confidenceScore":1.0},{"offset":17,"length":9,"text":"ibuprofen","category":"MedicationName","confidenceScore":1.0,"name":"ibuprofen","links":[{"dataSource":"UMLS","id":"C0020740"},{"dataSource":"AOD","id":"0000019879"},{"dataSource":"ATC","id":"M01AE01"},{"dataSource":"CCPSS","id":"0046165"},{"dataSource":"CHV","id":"0000006519"},{"dataSource":"CSP","id":"2270-2077"},{"dataSource":"DRUGBANK","id":"DB01050"},{"dataSource":"GS","id":"1611"},{"dataSource":"LCH_NW","id":"sh97005926"},{"dataSource":"LNC","id":"LP16165-0"},{"dataSource":"MEDCIN","id":"40458"},{"dataSource":"MMSL","id":"d00015"},{"dataSource":"MSH","id":"D007052"},{"dataSource":"MTHSPL","id":"WK2XYI10QM"},{"dataSource":"NCI","id":"C561"},{"dataSource":"NCI_CTRP","id":"C561"},{"dataSource":"NCI_DCP","id":"00803"},{"dataSource":"NCI_DTP","id":"NSC0256857"},{"dataSource":"NCI_FDA","id":"WK2XYI10QM"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000613511"},{"dataSource":"NDDF","id":"002377"},{"dataSource":"PDQ","id":"CDR0000040475"},{"dataSource":"RCD","id":"x02MO"},{"dataSource":"RXNORM","id":"5640"},{"dataSource":"SNM","id":"E-7772"},{"dataSource":"SNMI","id":"C-603C0"},{"dataSource":"SNOMEDCT_US","id":"387207008"},{"dataSource":"USP","id":"m39860"},{"dataSource":"USPMG","id":"MTHU000060"},{"dataSource":"VANDF","id":"4017840"}]},{"offset":34,"length":11,"text":"twice daily","category":"Frequency","confidenceScore":1.0}],"relations":[{"relationType":"DosageOfMedication","entities":[{"ref":"#/results/documents/1/entities/0","role":"Dosage"},{"ref":"#/results/documents/1/entities/1","role":"Medication"}]},{"relationType":"FrequencyOfMedication","entities":[{"ref":"#/results/documents/1/entities/1","role":"Medication"},{"ref":"#/results/documents/1/entities/2","role":"Frequency"}]}],"warnings":[]}],"errors":[{"id":"2","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 6581fece-c8c1-4e6e-a159-8edb3a263ad7 + apim-request-id: 17270312-617a-4c9e-8c1b-c1bb2c3a024a content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:26 GMT + date: Wed, 06 Oct 2021 21:03:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '63' + x-envoy-upstream-service-time: '96' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/a9c83aca-b2a0-41ab-94e0-99708f91993a + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/bcdf7930-1c05-44df-8bd6-71b1ea659864 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_payload_too_large.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_payload_too_large.yaml index 9e7301c98dbb..73b9d043b4e7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_payload_too_large.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_payload_too_large.yaml @@ -8509,23 +8509,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Request Payload sent is too large to be processed. Limit request size to: 524288"}}}' headers: - apim-request-id: e2007a7d-b5c0-4d90-8df5-4eaf9e68c812 + apim-request-id: a67470ed-2188-46a6-b067-7c22c1423e38 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:29 GMT + date: Wed, 06 Oct 2021 21:03:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '47' + x-envoy-upstream-service-time: '26' status: code: 413 message: Payload Too Large - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_relations.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_relations.yaml index 06b9565c204f..2437cc2464c5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_relations.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_relations.yaml @@ -10,48 +10,48 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: 5c28a03d-4266-4540-b6f1-4f494621c943 - date: Tue, 03 Aug 2021 17:34:31 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/5a87aafb-2e31-40d7-a528-6f1180f6ab88 + apim-request-id: 1b6bbb4c-4d5f-4953-9698-6fe6a6134bce + date: Wed, 06 Oct 2021 21:03:08 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d0c9cfaf-88e0-4d9c-875f-cc3645232457 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '92' + x-envoy-upstream-service-time: '194' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/5a87aafb-2e31-40d7-a528-6f1180f6ab88 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d0c9cfaf-88e0-4d9c-875f-cc3645232457 response: body: - string: '{"jobId":"5a87aafb-2e31-40d7-a528-6f1180f6ab88","lastUpdateDateTime":"2021-08-03T17:34:32Z","createdDateTime":"2021-08-03T17:34:31Z","expirationDateTime":"2021-08-04T17:34:31Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":31,"length":18,"text":"Parkinsons + string: '{"jobId":"d0c9cfaf-88e0-4d9c-875f-cc3645232457","lastUpdateDateTime":"2021-10-06T21:03:09Z","createdDateTime":"2021-10-06T21:03:08Z","expirationDateTime":"2021-10-07T21:03:08Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"0","entities":[{"offset":31,"length":18,"text":"Parkinsons Disease","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]},{"offset":51,"length":2,"text":"PD","category":"Diagnosis","confidenceScore":1.0,"name":"Parkinson Disease","links":[{"dataSource":"UMLS","id":"C0030567"},{"dataSource":"AOD","id":"0000006203"},{"dataSource":"BI","id":"BI00554"},{"dataSource":"CCPSS","id":"1018057"},{"dataSource":"CCS","id":"6.2.1"},{"dataSource":"CCSR_10","id":"NVS004"},{"dataSource":"CHV","id":"0000009319"},{"dataSource":"COSTAR","id":"559"},{"dataSource":"CSP","id":"2057-3689"},{"dataSource":"CST","id":"EXTRAPYR SYND"},{"dataSource":"ICD10","id":"G20"},{"dataSource":"ICD10AM","id":"G20"},{"dataSource":"ICD10CM","id":"G20"},{"dataSource":"ICD9CM","id":"332.0"},{"dataSource":"ICPC2ICD10ENG","id":"MTHU004748"},{"dataSource":"ICPC2P","id":"N87001"},{"dataSource":"LCH_NW","id":"sh85098115"},{"dataSource":"LNC","id":"MTHU020807"},{"dataSource":"MDR","id":"10061536"},{"dataSource":"MEDCIN","id":"32004"},{"dataSource":"MEDLINEPLUS","id":"85"},{"dataSource":"MSH","id":"D010300"},{"dataSource":"NANDA-I","id":"03003"},{"dataSource":"NCI","id":"C26845"},{"dataSource":"NCI_CELLOSAURUS","id":"C26845"},{"dataSource":"NCI_CPTAC","id":"C26845"},{"dataSource":"NCI_NCI-GLOSS","id":"CDR0000044140"},{"dataSource":"OMIM","id":"516000"},{"dataSource":"PSY","id":"36720"},{"dataSource":"QMR","id":"R0121461"},{"dataSource":"RAM","id":"DX353"},{"dataSource":"RCD","id":"F12.."},{"dataSource":"SNM","id":"D-8450"},{"dataSource":"SNMI","id":"DA-21012"},{"dataSource":"SNOMEDCT_US","id":"49049000"},{"dataSource":"WHO","id":"0106"}]}],"relations":[{"relationType":"Abbreviation","entities":[{"ref":"#/results/documents/0/entities/0","role":"FullTerm"},{"ref":"#/results/documents/0/entities/1","role":"AbbreviatedTerm"}]}],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: a043f084-c491-46e4-b282-0edf6119079a + apim-request-id: c2f6a1e3-cfcf-49b0-9378-49a1e13f1418 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:36 GMT + date: Wed, 06 Oct 2021 21:03:13 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '49' + x-envoy-upstream-service-time: '71' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/5a87aafb-2e31-40d7-a528-6f1180f6ab88 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/d0c9cfaf-88e0-4d9c-875f-cc3645232457 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_show_stats_and_model_version.yaml index 2b77f8fde0b7..6d161c18b270 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_show_stats_and_model_version.yaml @@ -12,46 +12,46 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?model-version=2021-01-11&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?model-version=2021-01-11&stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: 8e43c4cf-ec9b-4d91-888d-56d1c729f07e - date: Tue, 03 Aug 2021 17:34:37 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/196e0284-c276-4458-a15f-a5b79a416daf + apim-request-id: 701018e3-17db-4400-9e13-f6cbea2a070d + date: Wed, 06 Oct 2021 21:03:13 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/1d8db3b7-d41a-47db-89d9-a26e8532dbc7 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '160' + x-envoy-upstream-service-time: '230' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?model-version=2021-01-11&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?model-version=2021-01-11&stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/196e0284-c276-4458-a15f-a5b79a416daf?showStats=True + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/1d8db3b7-d41a-47db-89d9-a26e8532dbc7?showStats=True response: body: - string: '{"jobId":"196e0284-c276-4458-a15f-a5b79a416daf","lastUpdateDateTime":"2021-08-03T17:34:37Z","createdDateTime":"2021-08-03T17:34:37Z","expirationDateTime":"2021-08-04T17:34:37Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid + string: '{"jobId":"1d8db3b7-d41a-47db-89d9-a26e8532dbc7","lastUpdateDateTime":"2021-10-06T21:03:14Z","createdDateTime":"2021-10-06T21:03:13Z","expirationDateTime":"2021-10-07T21:03:13Z","status":"succeeded","errors":[],"results":{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"relations":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 7d7a546b-746f-49d8-a91f-c464b6f0cb9c + apim-request-id: 7098373c-6b8f-4f3e-842b-a9ce87aceadb content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:41 GMT + date: Wed, 06 Oct 2021 21:03:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '67' + x-envoy-upstream-service-time: '247' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/196e0284-c276-4458-a15f-a5b79a416daf?showStats=True + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/1d8db3b7-d41a-47db-89d9-a26e8532dbc7?showStats=True version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_too_many_documents.yaml index a0d636b28886..4d26c529a276 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_too_many_documents.yaml @@ -759,23 +759,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 9e8a570a-e036-4ff7-8044-8d378c8a576b + apim-request-id: b183000d-ac02-433c-80a1-bc42d87443f9 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:43 GMT + date: Wed, 06 Oct 2021 21:03:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '16' + x-envoy-upstream-service-time: '9' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_user_agent.yaml index fb40020985b4..27485ee8bb4c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_user_agent.yaml @@ -10,44 +10,44 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: aa142638-505d-49ff-81b5-2a21f69e466a - date: Tue, 03 Aug 2021 17:34:43 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/91352098-18a5-414d-b645-65b732d7398b + apim-request-id: 21362260-f9e5-4bb2-a5d2-5b2d2a8ad678 + date: Wed, 06 Oct 2021 21:03:20 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/41213479-1aa9-42dc-a51c-cec82b8f42bf strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '103' + x-envoy-upstream-service-time: '159' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/91352098-18a5-414d-b645-65b732d7398b + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/41213479-1aa9-42dc-a51c-cec82b8f42bf response: body: - string: '{"jobId":"91352098-18a5-414d-b645-65b732d7398b","lastUpdateDateTime":"2021-08-03T17:34:47Z","createdDateTime":"2021-08-03T17:34:43Z","expirationDateTime":"2021-08-04T17:34:43Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"1","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"41213479-1aa9-42dc-a51c-cec82b8f42bf","lastUpdateDateTime":"2021-10-06T21:03:20Z","createdDateTime":"2021-10-06T21:03:20Z","expirationDateTime":"2021-10-07T21:03:20Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"1","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: 72da4f32-7fc5-445f-bcda-7d809b51a9e9 + apim-request-id: 865870e4-7ddb-49b9-806f-4f697d59dd75 content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:49 GMT + date: Wed, 06 Oct 2021 21:03:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '45' + x-envoy-upstream-service-time: '81' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/91352098-18a5-414d-b645-65b732d7398b + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/41213479-1aa9-42dc-a51c-cec82b8f42bf version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_whole_batch_language_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_whole_batch_language_hint_and_dict_input.yaml index da14bd835722..42f0f29408f2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_whole_batch_language_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_healthcare_async.test_whole_batch_language_hint_and_dict_input.yaml @@ -12,44 +12,44 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint response: body: string: '' headers: - apim-request-id: d7ba666e-af43-431b-a8c1-c945eadded26 - date: Tue, 03 Aug 2021 17:34:49 GMT - operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/aac0a7da-2c41-4665-a137-dc91345f3d5b + apim-request-id: 5f32ef7c-fa1b-48d5-aba8-f5e8e384e39c + date: Wed, 06 Oct 2021 21:03:25 GMT + operation-location: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d8506888-791b-4e23-983b-85775cd7f2a4 strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '129' + x-envoy-upstream-service-time: '176' status: code: 202 message: Accepted - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/health/jobs?stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/health/jobs?stringIndexType=UnicodeCodePoint - request: body: null headers: User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/aac0a7da-2c41-4665-a137-dc91345f3d5b + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/health/jobs/d8506888-791b-4e23-983b-85775cd7f2a4 response: body: - string: '{"jobId":"aac0a7da-2c41-4665-a137-dc91345f3d5b","lastUpdateDateTime":"2021-08-03T17:34:52Z","createdDateTime":"2021-08-03T17:34:49Z","expirationDateTime":"2021-08-04T17:34:49Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"1","entities":[],"relations":[],"warnings":[]},{"id":"2","entities":[],"relations":[],"warnings":[]},{"id":"3","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' + string: '{"jobId":"d8506888-791b-4e23-983b-85775cd7f2a4","lastUpdateDateTime":"2021-10-06T21:03:26Z","createdDateTime":"2021-10-06T21:03:25Z","expirationDateTime":"2021-10-07T21:03:25Z","status":"succeeded","errors":[],"results":{"documents":[{"id":"1","entities":[],"relations":[],"warnings":[]},{"id":"2","entities":[],"relations":[],"warnings":[]},{"id":"3","entities":[],"relations":[],"warnings":[]}],"errors":[],"modelVersion":"2021-05-15"}}' headers: - apim-request-id: b8b55429-378b-4adb-80bd-224350566052 + apim-request-id: 3b08f5d5-b6f8-459e-b355-95bd0c8af05c content-type: application/json; charset=utf-8 - date: Tue, 03 Aug 2021 17:34:55 GMT + date: Wed, 06 Oct 2021 21:03:30 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '61' + x-envoy-upstream-service-time: '85' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/aac0a7da-2c41-4665-a137-dc91345f3d5b + url: https://javatextanalyticstestresources.cognitiveservices.azure.com/text/analytics/v3.2-preview.1/entities/health/jobs/d8506888-791b-4e23-983b-85775cd7f2a4 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_dict.yaml index d8d68696e8f9..d1ea004bf2c9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_dict.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":51,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -30,13 +30,13 @@ interactions: recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - d70919de-26fa-4240-9b99-8a0ba418c47c + - d84cde76-6e31-4aad-a2f7-2bd0e5696bdb content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:14:26 GMT + - Wed, 06 Oct 2021 21:03:30 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11602' + - '103' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_text_document_input.yaml index a557cfbd7b5b..32917841ef15 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_all_successful_passing_text_document_input.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -30,13 +30,13 @@ interactions: recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 1dfc2996-6605-4a86-ba44-4a7e00445068 + - 69764653-38cb-46de-968d-bbe2b50827a4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:14:39 GMT + - Wed, 06 Oct 2021 21:03:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10957' + - '81' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_credentials.yaml index 8f1be5fc2509..33b4b3c4c811 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_credentials.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - e0686411-8e2d-4dae-ada6-7c2e35f1db28 + - bc8224ca-b148-4c9d-9f4b-274108196758 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 19:14:39 GMT + - Wed, 06 Oct 2021 21:03:31 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_model_version_error.yaml index 465763c40b1d..65f3d720092f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_bad_model_version_error.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid @@ -24,11 +24,11 @@ interactions: details see https://aka.ms/text-analytics-model-versioning"}}}' headers: apim-request-id: - - a3256862-352e-43f8-9342-bbcb6e4303e6 + - 5edbe6d2-fffc-4aeb-bf6b-2c5a59fdd837 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:14:50 GMT + - Wed, 06 Oct 2021 21:03:32 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10449' + - '6' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit.yaml index 95d5446775bf..5b2b76ebe4c0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit.yaml @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - d59aa044-98f3-4183-8374-8608980ca095 + - ac1c1545-b31d-4425-bcb8-bdd389a270c8 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:14:52 GMT + - Wed, 06 Oct 2021 21:03:32 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '133' + - '12' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit_error.yaml index 2f1a3c182dd3..f763144920ef 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_batch_size_over_limit_error.yaml @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - 71eeafa3-8471-404c-8df2-3c74643a3225 + - e3022306-d3dd-41ae-ace1-33c2c9fd93d4 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:15:04 GMT + - Wed, 06 Oct 2021 21:03:32 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9967' + - '11' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_client_passed_default_language_hint.yaml index 4e81df49c1d4..4d765b176eed 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_client_passed_default_language_hint.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - fbe5229a-25eb-42b7-b48e-a141346deb59 + - 965691d5-4c47-4654-9638-d1a1e70236a4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:15:17 GMT + - Wed, 06 Oct 2021 21:03:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11706' + - '280' status: code: 200 message: OK @@ -62,9 +62,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -73,13 +73,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 9f1ac85f-5b54-4e77-a246-206b309de279 + - 6fcc2f1e-3e80-4c8c-b255-ae6a8f936291 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:15:17 GMT + - Wed, 06 Oct 2021 21:03:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -87,7 +87,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '407' + - '104' status: code: 200 message: OK @@ -108,9 +108,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -119,13 +119,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 0113a65f-3e95-4777-94dd-04cbb939e9f9 + - 160a1e78-4f5b-4103-bd44-7c72e2010b56 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:15:29 GMT + - Wed, 06 Oct 2021 21:03:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -133,7 +133,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10971' + - '110' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_default_string_index_type_is_UnicodeCodePoint.yaml index 9283a40b9f76..a86b1c4d4acb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -13,22 +13,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"Hello world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 89dc04c2-eee1-48f5-91db-0b9c442842b1 + - ddf8d82c-5eb8-4ec3-877b-7f76a5d6c14d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:30 GMT + - Wed, 06 Oct 2021 21:03:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '145' + - '196' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_disable_service_logs.yaml index 7eb398a89a18..80f7cf8561aa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_disable_service_logs.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"offset":0,"length":24,"text":"Test for logging disable"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 4a37b0ce-fb77-4c3a-985f-5017a25a3c0f + - 49f2d84e-1a28-485b-b7fa-102ff1f23704 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:31 GMT + - Wed, 06 Oct 2021 21:03:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '420' + - '110' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_no_result_attribute.yaml index a811b41f8918..79ee8a66f7f5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_no_result_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - d723306b-6400-48d2-8236-a3b94c11115a + - 62a5ce1a-d45f-4dd9-9bd7-cacaa00eebc2 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:15:31 GMT + - Wed, 06 Oct 2021 21:03:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '30' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_nonexistent_attribute.yaml index 6d944e6d1dc9..e88d2254ed30 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_attribute_error_nonexistent_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 58fceae4-a594-4286-a356-64bd438582d3 + - 3f272c20-6f75-4858-87df-e1019a835348 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:15:33 GMT + - Wed, 06 Oct 2021 21:03:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '33' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_errors.yaml index aa82e8180e15..f1113e877473 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_errors.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -33,11 +33,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 16c7f174-3b9e-4560-a5ad-8094abddbb89 + - 512cd576-06a3-446d-abb5-74060ef500eb content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:15:34 GMT + - Wed, 06 Oct 2021 21:03:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '18' + - '4' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_warnings.yaml index 93d3526cbf70..b3f3d4d6d06f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_document_warnings.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":40,"text":"This won''t actually create a warning :''("}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 4e1de182-be9b-4cda-807b-fbea4f918b24 + - 675a696e-89ad-4250-9cfc-aa838b8af7c4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:35 GMT + - Wed, 06 Oct 2021 21:03:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '106' + - '103' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_duplicate_ids_error.yaml index c66f6f2a24bc..68ac64b25dd3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_duplicate_ids_error.yaml @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 3fa8844e-d651-435a-ac2d-0d09dfe4d824 + - 04906e91-7975-438c-9bfd-24a7f0efcd96 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:15:35 GMT + - Wed, 06 Oct 2021 21:03:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '22' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_empty_credential_class.yaml index 62e2709f5da7..c02a68b17e16 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_empty_credential_class.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 9a50353b-ae26-4dfa-b1a8-0e85364852d7 + - ed033f81-735c-43bc-b3ad-a9d68e50c533 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 19:15:36 GMT + - Wed, 06 Oct 2021 21:03:36 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_explicit_set_string_index_type.yaml index b082c5ba9f54..c0aac6acc982 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_explicit_set_string_index_type.yaml @@ -13,22 +13,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=TextElements_v8 response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"Hello world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - a6225306-fbd6-4464-8250-0b89426670cb + - 4709db4f-6446-4637-8410-859242948f58 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:37 GMT + - Wed, 06 Oct 2021 21:03:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '278' + - '87' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_all_errors.yaml index 12321abf6e9e..b94d7074b84e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_all_errors.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -30,11 +30,11 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - d7a9d6ea-e5a9-44bd-a4db-76a70d0b537c + - d652f89c-07dc-4953-8834-d7fd9ba753f6 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:15:38 GMT + - Wed, 06 Oct 2021 21:03:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '23' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_some_errors.yaml index 94ee9296af8b..001b0929624f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_input_with_some_errors.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The @@ -31,13 +31,13 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=sentiment-analysis"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 50dafb41-30c7-4a7c-a6ff-127e0f6ac5ec + - a9ac4d8d-cab8-43ea-9b00-2497f56572d4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:39 GMT + - Wed, 06 Oct 2021 21:03:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '357' + - '151' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_docs.yaml index be2642ab7454..bafaa30e7eca 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_docs.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=sentiment-analysis"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - eb1829bc-7d16-442e-b21e-61763c6d82a9 + - 8c3aabb2-fc3f-47ba-82e1-0fd953c1fb49 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:15:39 GMT + - Wed, 06 Oct 2021 21:03:38 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '49' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_method.yaml index 78450def3213..64aa97fff29d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_invalid_language_hint_method.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=sentiment-analysis"}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 53a00115-c342-4aa9-9946-1c610b8ee400 + - 866ac4ae-8524-4f4a-b1fe-b4a4c2714747 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:15:40 GMT + - Wed, 06 Oct 2021 21:03:38 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '23' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_language_kwarg_spanish.yaml index 1e7bb680471d..2163577bc718 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_language_kwarg_spanish.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":35,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.98,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.98,"negative":0.01},"offset":0,"length":35,"text":"Bill Gates is the CEO of Microsoft."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 951954e5-d4d2-4c75-9fa9-450b8f8ba1c8 + - 30cdba09-4634-49c6-9839-15d6d5b2aa21 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:41 GMT + - Wed, 06 Oct 2021 21:03:38 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '317' + - '107' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_no_offset_v3_sentence_sentiment.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_no_offset_v3_sentence_sentiment.yaml index cee4de34c2fd..1d46136c22a3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_no_offset_v3_sentence_sentiment.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_no_offset_v3_sentence_sentiment.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/sentiment?showStats=false response: @@ -24,13 +24,13 @@ interactions: do not like being inside"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 46616c2c-76e2-433d-a9fe-67bd59485aa5 + - 2629cb83-9878-4d4f-b625-636687d816c1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:48 GMT + - Wed, 06 Oct 2021 21:03:39 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5509' + - '116' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_offset.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_offset.yaml index 538952c1b3f6..969e64d23f2f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_offset.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_offset.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"mixed","confidenceScores":{"positive":0.44,"neutral":0.27,"negative":0.29},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.88,"neutral":0.11,"negative":0.01},"offset":0,"length":14,"text":"I @@ -24,13 +24,13 @@ interactions: do not like being inside"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - d9d53e6a-f5da-4ed7-a366-41639ddf3db3 + - 8b942013-ea50-4881-82a0-122d90c34c6d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:50 GMT + - Wed, 06 Oct 2021 21:03:39 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '250' + - '102' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining.yaml index d7b7396deb5c..982fbf035440 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"offset":0,"length":74,"text":"It has a sleek premium aluminum design that makes it beautiful to look at.","targets":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":32,"length":6,"text":"design","relations":[{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/0"},{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/1"}]}],"assessments":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":9,"length":5,"text":"sleek","isNegated":false},{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":15,"length":7,"text":"premium","isNegated":false}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 1cc6f7c6-0c35-48ee-9f93-c5d97758672e + - 97531bf1-7a96-4e59-b595-40f5813cd043 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:51 GMT + - Wed, 06 Oct 2021 21:03:39 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '393' + - '87' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_more_than_5_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_more_than_5_documents.yaml index cbee9910d9ee..2dfb1935fe68 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_more_than_5_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_more_than_5_documents.yaml @@ -21,9 +21,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":0,"length":25,"text":"The @@ -38,13 +38,13 @@ interactions: toilet smelled.","targets":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":4,"length":6,"text":"toilet","relations":[{"relationType":"assessment","ref":"#/documents/6/sentences/0/assessments/0"}]}],"assessments":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":11,"length":7,"text":"smelled","isNegated":false}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 048badb2-2389-4b33-b964-c7ff6fcd5fd5 + - 8beff58a-6cda-49f3-914f-8bea77cae707 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=7,CognitiveServices.TextAnalytics.TextRecords=7 date: - - Mon, 02 Aug 2021 19:15:52 GMT + - Wed, 06 Oct 2021 21:03:40 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -52,7 +52,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '423' + - '229' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_no_mined_opinions.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_no_mined_opinions.yaml index b378194e529f..c52a500bd618 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_no_mined_opinions.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_no_mined_opinions.yaml @@ -13,22 +13,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.1,"neutral":0.88,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.1,"neutral":0.88,"negative":0.02},"offset":0,"length":18,"text":"today is a hot day","targets":[],"assessments":[]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 689abf61-ff09-4d7c-a5f0-0126452b3afb + - 7bab511d-a637-442f-b404-75bc0145a79b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:54 GMT + - Wed, 06 Oct 2021 21:03:40 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '314' + - '93' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_with_negated_opinion.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_with_negated_opinion.yaml index d64e64d19172..f1dfcf7c1412 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_with_negated_opinion.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_opinion_mining_with_negated_opinion.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":0,"length":32,"text":"The food and service is not good","targets":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":4,"length":4,"text":"food","relations":[{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/0"}]},{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":13,"length":7,"text":"service","relations":[{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/0"}]}],"assessments":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":28,"length":4,"text":"good","isNegated":true}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 1493f185-1fa6-4f19-8389-77ecfd88d108 + - 8fc65550-3207-4d6b-8ac7-464b6b2dcdae content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:54 GMT + - Wed, 06 Oct 2021 21:03:41 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '350' + - '81' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_out_of_order_ids.yaml index eddfa460e93a..81e5358d1b02 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_out_of_order_ids.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 96efd581-d21a-46bb-8b10-d5c36a954aff + - 724ab4dc-945b-4ecf-a618-6bae293c93b1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 19:15:55 GMT + - Wed, 06 Oct 2021 21:03:41 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '280' + - '95' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_output_same_order_as_input.yaml index efb408016296..5731c6c27b4b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_output_same_order_as_input.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.9,"negative":0.04},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.9,"negative":0.04},"offset":0,"length":3,"text":"one"}],"warnings":[]},{"id":"2","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.97,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.97,"negative":0.02},"offset":0,"length":3,"text":"two"}],"warnings":[]},{"id":"3","sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"offset":0,"length":5,"text":"three"}],"warnings":[]},{"id":"4","sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":4,"text":"four"}],"warnings":[]},{"id":"5","sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"offset":0,"length":4,"text":"five"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - a4b47813-ac29-4e3a-a6fb-dfe0268b75a5 + - 27c3d9d8-149f-48d9-a0dd-aadb7b67acc1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 date: - - Mon, 02 Aug 2021 19:15:57 GMT + - Wed, 06 Oct 2021 21:03:42 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '316' + - '86' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_pass_cls.yaml index 457b1bf5e7c1..8c550d071e42 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_pass_cls.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.32,"neutral":0.65,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.32,"neutral":0.65,"negative":0.03},"offset":0,"length":28,"text":"Test passing cls to endpoint"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 757636d3-0a1c-42c3-b80f-97e5f0f95c62 + - 1da8940e-721f-4e62-a213-fbc3d003eba2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:15:58 GMT + - Wed, 06 Oct 2021 21:03:42 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '130' + - '101' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_passing_only_string.yaml index 62d8a6efeff3..1412b63df591 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_passing_only_string.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -32,13 +32,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 331f51ea-4025-432f-be0c-0059adfdda02 + - a165245e-d1da-47d3-80f5-e3b19f0f1a95 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:15:59 GMT + - Wed, 06 Oct 2021 21:03:43 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -46,7 +46,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '268' + - '93' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_per_item_dont_use_language_hint.yaml index 20cb2c708d22..9d1070b12a9c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_per_item_dont_use_language_hint.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - b4259c0b-787f-4df1-a4a1-d37f74c54477 + - ff348204-df21-47cd-81e5-e971073e379d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:01 GMT + - Wed, 06 Oct 2021 21:03:43 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '132' + - '81' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_rotate_subscription_key.yaml index 8d69c88e26f8..1fe4b944607c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_rotate_subscription_key.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 60c4fd71-76a1-402b-a9ba-bbf7ace63164 + - 97e57552-4ff4-4ba6-a54d-da4c63088f3b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:01 GMT + - Wed, 06 Oct 2021 21:03:43 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '107' + - '110' status: code: 200 message: OK @@ -62,9 +62,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -72,13 +72,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 4906dd58-86db-4ae5-826b-a765d9146927 + - a51cc0a8-4658-4974-85e0-2ca05d91ede6 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 19:16:01 GMT + - Wed, 06 Oct 2021 21:03:43 GMT status: code: 401 message: PermissionDenied @@ -99,9 +99,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -110,13 +110,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - e1b64cf4-0ded-4714-8920-f322fb7eead0 + - b71386c4-1404-4f97-bbf1-d453f206a949 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:02 GMT + - Wed, 06 Oct 2021 21:03:43 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -124,7 +124,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '118' + - '81' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_show_stats_and_model_version.yaml index d1eee0a1ec2a..32d626912304 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_show_stats_and_model_version.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 02d27ca8-3fe3-43df-8c2e-df69c124160e + - 9dd15d6c-7270-4833-8e81-67fe2ba1e38b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 19:16:03 GMT + - Wed, 06 Oct 2021 21:03:44 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '284' + - '100' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_string_index_type_not_fail_v3.yaml index cdaaa4538837..3c4d6f556742 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_string_index_type_not_fail_v3.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/sentiment?showStats=false response: @@ -22,13 +22,13 @@ interactions: don''t fail"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - c6c9d39c-ccf1-4541-a797-111c167c01e9 + - 5daa90e3-acfc-46e6-9cc5-44077ba51a79 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 19:16:04 GMT + - Wed, 06 Oct 2021 21:03:44 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '131' + - '113' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_too_many_documents.yaml index 68a9de603d9b..81636bf8a6be 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_too_many_documents.yaml @@ -19,20 +19,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - d8948348-f97a-4f7a-b8ec-8577983bc3b6 + - 8db3a0f7-e27f-4e66-8022-7fb55cd0216e content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 19:16:05 GMT + - Wed, 06 Oct 2021 21:03:44 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '7' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_user_agent.yaml index 7cf843cae5b5..b6b04a748887 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_user_agent.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - e646d44a-69cf-4c71-a3d0-251fd9b35475 + - 6a433712-fd9d-4b8c-be5b-edc13590692d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:07 GMT + - Wed, 06 Oct 2021 21:03:45 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '134' + - '112' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_dont_use_language_hint.yaml index a8c37a7cd417..cbedd9dfc401 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_dont_use_language_hint.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":33,"text":"This @@ -28,13 +28,13 @@ interactions: restaurant was not as good as I hoped."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 146ceb6b-774d-4e9b-8307-a1b3e1d39409 + - 27f86092-8f02-4f47-9d1c-0af79ab68e07 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:08 GMT + - Wed, 06 Oct 2021 21:03:45 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '130' + - '78' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint.yaml index d8991a40186a..8e4a08716244 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.07,"neutral":0.93,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.07,"neutral":0.93,"negative":0.0},"offset":0,"length":33,"text":"This @@ -28,13 +28,13 @@ interactions: restaurant was not as good as I hoped."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 3aca7521-2c4f-4b0d-8fdd-d3845840e1b1 + - e19e3f79-32f7-4345-83c5-e39d38c8dd04 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:08 GMT + - Wed, 06 Oct 2021 21:03:45 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '165' + - '160' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_input.yaml index c8e882e0a472..c284a8a89749 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_input.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - cd153106-93c4-49cb-a377-5ce69e45b638 + - 3c87d375-47f7-43a0-8d3a-e260abc3cf1b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:10 GMT + - Wed, 06 Oct 2021 21:03:46 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '161' + - '81' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index f9f561e3ce94..6b9b01f52ee9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -27,13 +27,13 @@ interactions: restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: apim-request-id: - - 7909131e-ff4e-4a41-a7ec-97ef6996ec6f + - dca754d4-50c5-4600-806f-b28114619e7e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:11 GMT + - Wed, 06 Oct 2021 21:03:46 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '254' + - '118' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_input.yaml index b3da2f1a7f92..e886483a3d5d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_input.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"neutral\",\"confidenceScores\"\ @@ -37,13 +37,13 @@ interactions: warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}" headers: apim-request-id: - - e86fbb02-dc55-4ffd-b053-bf0c7df58c55 + - 40a00784-a226-494e-aad4-1fed404259ac content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:12 GMT + - Wed, 06 Oct 2021 21:03:47 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -51,7 +51,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '103' + - '111' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 87ce2b6a93db..1e6728450281 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"neutral\",\"confidenceScores\"\ @@ -37,13 +37,13 @@ interactions: warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}" headers: apim-request-id: - - c96ef28e-989b-4a19-a743-6b34e7d00d0f + - e2ade69c-a83c-4425-9eaf-0a8b1d677e7d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 19:16:13 GMT + - Wed, 06 Oct 2021 21:03:47 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -51,7 +51,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '257' + - '156' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_dict.yaml index a5e8d7a357cf..f53b42ccdb0e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_dict.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","sentiment":"neutral","statistics":{"charactersCount":51,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -25,16 +25,16 @@ interactions: restaurant had really good food."},{"sentiment":"positive","confidenceScores":{"positive":0.96,"neutral":0.03,"negative":0.01},"offset":37,"length":23,"text":"I recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 63b4617b-5b40-43b2-ad09-51c65d41e020 + apim-request-id: a39d4775-cc86-4afd-9aec-a61dd0186bac content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:01 GMT + date: Wed, 06 Oct 2021 21:03:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '136' + x-envoy-upstream-service-time: '133' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_text_document_input.yaml index 4d186a48ed81..4437004f0757 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_all_successful_passing_text_document_input.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -25,16 +25,16 @@ interactions: restaurant had really good food."},{"sentiment":"positive","confidenceScores":{"positive":0.96,"neutral":0.03,"negative":0.01},"offset":37,"length":23,"text":"I recommend you try it."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 4c073764-a09d-445b-96ce-de944a59b29c + apim-request-id: a298e76c-51a1-4b0b-af2d-fe9f1425bce3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:02 GMT + date: Wed, 06 Oct 2021 21:03:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '104' + x-envoy-upstream-service-time: '84' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_credentials.yaml index 23a28f10ff0a..c359760b6d74 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_credentials.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: ef22bbf9-a4fb-4712-b443-04c8a65ace1a + apim-request-id: f8538597-b27b-4796-9a65-6c71830947c4 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 19:22:03 GMT + date: Wed, 06 Oct 2021 21:03:48 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_model_version_error.yaml index 8e14984534f3..f053b10d259d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_bad_model_version_error.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid model version. Possible values are: latest,2019-10-01,2020-04-01. For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: - apim-request-id: eea02227-0ef9-493b-b5dc-5f02296bba8b + apim-request-id: 77f75632-ddef-4e6b-990a-583accc379da content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:04 GMT + date: Wed, 06 Oct 2021 21:03:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '373' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit.yaml index acea3ed067ca..31a2aba21c2f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit.yaml @@ -754,23 +754,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 9ea755c3-fafe-4336-8b3f-c622dd40bea7 + apim-request-id: 9d6a4a76-dae9-4577-ace3-82c75ff66c3f content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:05 GMT + date: Wed, 06 Oct 2021 21:03:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '26' + x-envoy-upstream-service-time: '12' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit_error.yaml index d9d71afc891c..04ccb5b45215 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_batch_size_over_limit_error.yaml @@ -719,23 +719,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: b13c4372-c495-4db5-a279-2c62547ffecf + apim-request-id: d8f16cf2-1507-47b2-ace7-9ff5e852acbd content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:06 GMT + date: Wed, 06 Oct 2021 21:03:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '24' + x-envoy-upstream-service-time: '9' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_client_passed_default_language_hint.yaml index d2099b684833..e52daca4ad84 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_client_passed_default_language_hint.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,18 +22,18 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 77d6375d-6086-48e7-9d63-307d8d08b409 + apim-request-id: d4da1d6d-1820-49fa-8824-e11e11be890f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:07 GMT + date: Wed, 06 Oct 2021 21:03:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '251' + x-envoy-upstream-service-time: '138' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -47,9 +47,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -57,18 +57,18 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: d2d59073-402c-4a1b-ad66-49c86a41b2bf + apim-request-id: 6e1b4cb5-a429-4143-8f69-b05a53ae7603 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:07 GMT + date: Wed, 06 Oct 2021 21:03:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '128' + x-envoy-upstream-service-time: '115' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -82,9 +82,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -92,16 +92,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 82613660-f5ca-406e-a450-80d94ecab98c + apim-request-id: e203748f-67c7-4072-98d4-5b1664a93052 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:07 GMT + date: Wed, 06 Oct 2021 21:03:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '319' + x-envoy-upstream-service-time: '111' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_default_string_index_type_is_UnicodeCodePoint.yaml index f6b61dabcdb5..efd91d756ab0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"Hello world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 4730dc45-23ee-420b-a900-d5d8aab26a5b + apim-request-id: b423e78d-ac1c-4863-b47a-983d12e3b500 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:09 GMT + date: Wed, 06 Oct 2021 21:03:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '117' + x-envoy-upstream-service-time: '95' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_disable_service_logs.yaml index eda6cd043f84..c682243e12e6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_disable_service_logs.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.02,"neutral":0.12,"negative":0.86},"offset":0,"length":24,"text":"Test for logging disable"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: daa31e55-3e41-4992-bf2a-23a6e43e4d43 + apim-request-id: fee062ad-0d78-4f8b-a104-86c2f91ecf36 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:10 GMT + date: Wed, 06 Oct 2021 21:03:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '417' + x-envoy-upstream-service-time: '82' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_no_result_attribute.yaml index 7b6c373386e0..52c2091f2ebf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_no_result_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 0845769f-6cc7-49bb-a89f-b88c8d58e687 + apim-request-id: a98a7ce7-cf28-43c3-ba9e-07c2452e1c53 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:10 GMT + date: Wed, 06 Oct 2021 21:03:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_nonexistent_attribute.yaml index b30270b148e2..ce0c59b804cd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: c6a580d0-0358-4445-85fb-2f69d8091e39 + apim-request-id: eeb1fc8f-1212-427a-ab18-921036d8d0db content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:11 GMT + date: Wed, 06 Oct 2021 21:03:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_errors.yaml index 6f127b68ac26..ba4604502189 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_errors.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -28,15 +28,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 09133517-b294-4148-afdc-102aa59aee6d + apim-request-id: 88e518e2-98b4-4a99-aec0-0ed1f19ac115 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:12 GMT + date: Wed, 06 Oct 2021 21:03:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_warnings.yaml index a85b93ecfbc7..0ce33727bb69 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_document_warnings.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":40,"text":"This won''t actually create a warning :''("}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: f77db013-ae8d-4b4b-881b-4e36239e0a0e + apim-request-id: e78c45a5-1e83-4947-a674-08b554fb1fe9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:12 GMT + date: Wed, 06 Oct 2021 21:03:51 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '256' + x-envoy-upstream-service-time: '118' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_duplicate_ids_error.yaml index d03e18b6df4a..d3b988cef626 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_duplicate_ids_error.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: f5636391-66b5-4565-ae58-170d9303e163 + apim-request-id: 21f40836-b926-4876-a375-d84ddb4df189 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:13 GMT + date: Wed, 06 Oct 2021 21:03:51 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '119' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_empty_credential_class.yaml index cd29d9223a9e..134f0c76a28b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_empty_credential_class.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 08e792dc-15c3-4bb3-83a8-bb1ee22f8f4d + apim-request-id: 1ced06eb-a307-48e5-98ec-b74760cedd1f content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 19:22:14 GMT + date: Wed, 06 Oct 2021 21:03:52 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_explicit_set_string_index_type.yaml index d6d6d44c8cce..01384f1214aa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_explicit_set_string_index_type.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=TextElements_v8 response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.02,"neutral":0.97,"negative":0.01},"offset":0,"length":11,"text":"Hello world"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: cf51db53-788c-4378-98a9-2e3ba95092c0 + apim-request-id: 93106a1b-a928-49e8-b0ce-7dc3edcd6398 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:14 GMT + date: Wed, 06 Oct 2021 21:03:51 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '121' + x-envoy-upstream-service-time: '144' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=TextElements_v8 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=TextElements_v8 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_all_errors.yaml index 8c45e2ae9261..f39a79e5aca6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_all_errors.yaml @@ -11,9 +11,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,15 +25,15 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: a5790f68-f346-4735-86ec-224515ce4545 + apim-request-id: d043f084-4c4a-4c81-951e-fc27bdec2ee1 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:16 GMT + date: Wed, 06 Oct 2021 21:03:51 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_some_errors.yaml index 464584ba53fe..804854967e02 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_input_with_some_errors.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The @@ -26,16 +26,16 @@ interactions: language code. Supported languages: de,en,es,fr,hi,it,ja,ko,nl,no,pt-BR,pt-PT,tr,zh-Hans,zh-Hant. For additional details see https://aka.ms/text-analytics/language-support?tabs=sentiment-analysis"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: caae02d5-9328-43be-abc7-a8261d412864 + apim-request-id: 27b9c241-891f-4500-8b87-d061c6cca0d3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:17 GMT + date: Wed, 06 Oct 2021 21:03:52 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '127' + x-envoy-upstream-service-time: '100' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_docs.yaml index f7fa927ee143..7145e933ca81 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_docs.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -20,15 +20,15 @@ interactions: language code. Supported languages: de,en,es,fr,hi,it,ja,ko,nl,no,pt-BR,pt-PT,tr,zh-Hans,zh-Hant. For additional details see https://aka.ms/text-analytics/language-support?tabs=sentiment-analysis"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 6a3eaa07-bc59-4f45-a654-b00e55c52dc1 + apim-request-id: 182498b1-6add-46db-b644-826ad5ece2ad content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:17 GMT + date: Wed, 06 Oct 2021 21:03:52 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_method.yaml index 28edfe100fb7..ff5812759df4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_invalid_language_hint_method.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -20,15 +20,15 @@ interactions: language code. Supported languages: de,en,es,fr,hi,it,ja,ko,nl,no,pt-BR,pt-PT,tr,zh-Hans,zh-Hant. For additional details see https://aka.ms/text-analytics/language-support?tabs=sentiment-analysis"}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: b3733871-391c-4b09-a28d-78a507b39014 + apim-request-id: 9c3520c0-f760-4a2b-97f8-99e3db558b84 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:18 GMT + date: Wed, 06 Oct 2021 21:03:53 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '248' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_language_kwarg_spanish.yaml index f802ba8589e9..0f06f5bddab8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_language_kwarg_spanish.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","sentiment":"neutral","statistics":{"charactersCount":35,"transactionsCount":1},"confidenceScores":{"positive":0.01,"neutral":0.98,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.98,"negative":0.01},"offset":0,"length":35,"text":"Bill Gates is the CEO of Microsoft."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: d78afa88-e788-4e28-bab3-b44a74e6e7af + apim-request-id: aa55a310-a317-4515-84f8-9b5bf4532566 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:19 GMT + date: Wed, 06 Oct 2021 21:03:53 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '135' + x-envoy-upstream-service-time: '114' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_no_offset_v3_sentence_sentiment.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_no_offset_v3_sentence_sentiment.yaml index 5c1b3654ebb4..cc20042fce01 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_no_offset_v3_sentence_sentiment.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_no_offset_v3_sentence_sentiment.yaml @@ -10,7 +10,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/sentiment?showStats=false response: @@ -19,16 +19,16 @@ interactions: like nature."},{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.43,"negative":0.56},"offset":15,"length":26,"text":"I do not like being inside"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 4ede9988-43f0-4de4-9c99-1a20a1c1008f + apim-request-id: 7352dc99-9df8-4de3-8301-852ed5e67f1e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:25 GMT + date: Wed, 06 Oct 2021 21:03:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5654' + x-envoy-upstream-service-time: '86' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.0/sentiment?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.0/sentiment?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_offset.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_offset.yaml index 94ae971d0301..f5063db3ff96 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_offset.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_offset.yaml @@ -10,25 +10,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"mixed","confidenceScores":{"positive":0.44,"neutral":0.27,"negative":0.29},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.88,"neutral":0.11,"negative":0.01},"offset":0,"length":14,"text":"I like nature."},{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.43,"negative":0.56},"offset":15,"length":26,"text":"I do not like being inside"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: dadef5e6-4e95-4094-9562-25d10aeaadca + apim-request-id: 62d9dea1-e070-4555-a063-3c384e31236c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:26 GMT + date: Wed, 06 Oct 2021 21:03:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '111' + x-envoy-upstream-service-time: '90' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining.yaml index fdd4db7ea6e9..2d570decbcc6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.98,"neutral":0.02,"negative":0.0},"offset":0,"length":74,"text":"It has a sleek premium aluminum design that makes it beautiful to look at.","targets":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":32,"length":6,"text":"design","relations":[{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/0"},{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/1"}]}],"assessments":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":9,"length":5,"text":"sleek","isNegated":false},{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":15,"length":7,"text":"premium","isNegated":false}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: b5fc4b83-8957-4c3e-8e8c-05d2ce44d6e8 + apim-request-id: 685f7156-4afd-47d7-b063-d4134b38fa09 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:27 GMT + date: Wed, 06 Oct 2021 21:03:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '268' + x-envoy-upstream-service-time: '111' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_more_than_5_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_more_than_5_documents.yaml index 7a0fb358e799..08640ca97e1b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_more_than_5_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_more_than_5_documents.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":0,"length":25,"text":"The @@ -33,16 +33,16 @@ interactions: rooms but bathrooms were old and the toilet was dirty when we arrived.","targets":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":5,"length":5,"text":"rooms","relations":[{"relationType":"assessment","ref":"#/documents/5/sentences/0/assessments/0"}]},{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":15,"length":9,"text":"bathrooms","relations":[{"relationType":"assessment","ref":"#/documents/5/sentences/0/assessments/1"}]},{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":42,"length":6,"text":"toilet","relations":[{"relationType":"assessment","ref":"#/documents/5/sentences/0/assessments/2"}]}],"assessments":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"negative":0.0},"offset":0,"length":4,"text":"nice","isNegated":false},{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":30,"length":3,"text":"old","isNegated":false},{"sentiment":"negative","confidenceScores":{"positive":0.0,"negative":1.0},"offset":53,"length":5,"text":"dirty","isNegated":false}]}],"warnings":[]},{"id":"6","sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.63,"negative":0.34},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.63,"negative":0.34},"offset":0,"length":19,"text":"The toilet smelled.","targets":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":4,"length":6,"text":"toilet","relations":[{"relationType":"assessment","ref":"#/documents/6/sentences/0/assessments/0"}]}],"assessments":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":11,"length":7,"text":"smelled","isNegated":false}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: c11ac65f-05f3-403f-9dd0-e5a266afc43b + apim-request-id: 97daf61a-73fe-4d70-8426-f1da78c88555 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=7,CognitiveServices.TextAnalytics.TextRecords=7 - date: Mon, 02 Aug 2021 19:22:28 GMT + date: Wed, 06 Oct 2021 21:03:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '370' + x-envoy-upstream-service-time: '109' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_no_mined_opinions.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_no_mined_opinions.yaml index bdb247879c80..7d65f43e4b91 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_no_mined_opinions.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_no_mined_opinions.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.1,"neutral":0.88,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.1,"neutral":0.88,"negative":0.02},"offset":0,"length":18,"text":"today is a hot day","targets":[],"assessments":[]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: d8abfde8-358e-44af-8dca-76c1ee1d1aee + apim-request-id: d350343c-13ef-4910-b6e9-b1a93251995c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:29 GMT + date: Wed, 06 Oct 2021 21:03:54 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '154' + x-envoy-upstream-service-time: '95' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_with_negated_opinion.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_with_negated_opinion.yaml index bff3f8e82069..f6f2db891029 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_with_negated_opinion.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_opinion_mining_with_negated_opinion.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.0,"negative":1.0},"offset":0,"length":32,"text":"The food and service is not good","targets":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":4,"length":4,"text":"food","relations":[{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/0"}]},{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":13,"length":7,"text":"service","relations":[{"relationType":"assessment","ref":"#/documents/0/sentences/0/assessments/0"}]}],"assessments":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"negative":0.99},"offset":28,"length":4,"text":"good","isNegated":true}]}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 911005d5-e947-4cfd-bffc-72d2d3e9224d + apim-request-id: 30e5d6d3-7898-432c-8755-38b9606728c4 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:30 GMT + date: Wed, 06 Oct 2021 21:03:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '167' + x-envoy-upstream-service-time: '124' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&opinionMining=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_out_of_order_ids.yaml index 8ce44e980d8f..5121516f8029 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_out_of_order_ids.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 1d037baa-85c4-486d-904f-ad418c3ad5f8 + apim-request-id: 0452a693-f835-4028-89ab-ff3af691df9e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 19:22:31 GMT + date: Wed, 06 Oct 2021 21:03:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '109' + x-envoy-upstream-service-time: '113' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_output_same_order_as_input.yaml index 0344b04798aa..910fb99edc0f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_output_same_order_as_input.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.9,"negative":0.04},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.06,"neutral":0.9,"negative":0.04},"offset":0,"length":3,"text":"one"}],"warnings":[]},{"id":"2","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.97,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.97,"negative":0.02},"offset":0,"length":3,"text":"two"}],"warnings":[]},{"id":"3","sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"offset":0,"length":5,"text":"three"}],"warnings":[]},{"id":"4","sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.03,"neutral":0.96,"negative":0.01},"offset":0,"length":4,"text":"four"}],"warnings":[]},{"id":"5","sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.05,"neutral":0.93,"negative":0.02},"offset":0,"length":4,"text":"five"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 8670dc2d-fc91-4b56-b394-d80d124df167 + apim-request-id: fa06b750-26fc-48d5-9801-29e8f2ad406d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 - date: Mon, 02 Aug 2021 19:22:31 GMT + date: Wed, 06 Oct 2021 21:03:55 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '100' + x-envoy-upstream-service-time: '92' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_pass_cls.yaml index 98672ce8a95e..2ba2f051d505 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_pass_cls.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.32,"neutral":0.65,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.32,"neutral":0.65,"negative":0.03},"offset":0,"length":28,"text":"Test passing cls to endpoint"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 9af42900-e7dc-41d6-9762-d5e522304eb6 + apim-request-id: 96dd1477-31f2-49fe-b583-faebd46ae839 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:32 GMT + date: Wed, 06 Oct 2021 21:03:56 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '106' + x-envoy-upstream-service-time: '97' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_passing_only_string.yaml index c8adb955b251..b72cd52743e1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_passing_only_string.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.01,"neutral":0.99,"negative":0.0},"offset":0,"length":51,"text":"Microsoft @@ -27,16 +27,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 5ccdd10a-ee44-4aae-998b-c28bd808060c + apim-request-id: 5396f3a1-cd84-4528-a2e9-9389e9d2fbd3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:32 GMT + date: Wed, 06 Oct 2021 21:03:56 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '108' + x-envoy-upstream-service-time: '85' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_per_item_dont_use_language_hint.yaml index 30612db7b00d..3f31e574bf46 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_per_item_dont_use_language_hint.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,16 +22,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: e5f134bb-f44f-4ba4-8f92-41884171f2aa + apim-request-id: a1af7a70-8631-4ecc-a016-482de4a166ae content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:33 GMT + date: Wed, 06 Oct 2021 21:03:57 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '121' + x-envoy-upstream-service-time: '105' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_rotate_subscription_key.yaml index 5cda6b8f24c5..d29e0f458644 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_rotate_subscription_key.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,18 +22,18 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 6fa78515-5e03-43f0-ba6b-47abce3008d7 + apim-request-id: f9a67766-ef0f-4c95-b7a7-3627e3146635 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:32 GMT + date: Wed, 06 Oct 2021 21:03:56 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '117' + x-envoy-upstream-service-time: '94' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -47,23 +47,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 46b27034-4e26-44d0-840d-3b4562520afc + apim-request-id: 20b8b783-962b-4bed-86fc-de8189c6d950 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 19:22:33 GMT + date: Wed, 06 Oct 2021 21:03:57 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -77,9 +77,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -87,16 +87,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 2c86679a-8937-4900-a863-788e6efddaad + apim-request-id: 7eb0a079-db2e-4984-9482-ab3724ae9cd6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:33 GMT + date: Wed, 06 Oct 2021 21:03:57 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '142' + x-envoy-upstream-service-time: '105' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_show_stats_and_model_version.yaml index ac8cef6f9930..b0ea8ffd5333 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_show_stats_and_model_version.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":)"}],"warnings":[]},{"id":"0","sentiment":"negative","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.0,"neutral":0.02,"negative":0.98},"offset":0,"length":2,"text":":("}],"warnings":[]},{"id":"19","sentiment":"neutral","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.3,"neutral":0.67,"negative":0.03},"offset":0,"length":2,"text":":P"}],"warnings":[]},{"id":"1","sentiment":"positive","statistics":{"charactersCount":2,"transactionsCount":1},"confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.89,"neutral":0.1,"negative":0.01},"offset":0,"length":2,"text":":D"}],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2020-04-01"}' headers: - apim-request-id: d724defe-5795-473e-abd1-708fd77eabe7 + apim-request-id: f173468d-862e-43d8-b69f-90e56eb512d1 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 19:22:34 GMT + date: Wed, 06 Oct 2021 21:03:57 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '107' + x-envoy-upstream-service-time: '105' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_string_index_type_not_fail_v3.yaml index ba8ad1afa049..e236dbf57179 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_string_index_type_not_fail_v3.yaml @@ -9,7 +9,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/sentiment?showStats=false response: @@ -17,16 +17,16 @@ interactions: string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.0,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.99,"neutral":0.0,"negative":0.01},"offset":0,"length":17,"text":"please don''t fail"}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 8c972b8b-2509-481a-b726-0d478c4326bb + apim-request-id: 35d4be8b-312a-4797-b87e-c5a77c716ad8 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 19:22:40 GMT + date: Wed, 06 Oct 2021 21:03:57 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5372' + x-envoy-upstream-service-time: '106' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.0/sentiment?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.0/sentiment?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_too_many_documents.yaml index 37920050a488..cb1c3ce086b8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_too_many_documents.yaml @@ -15,23 +15,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 816602e9-1505-4f8e-b4f0-93ff94c0a97e + apim-request-id: 876ae955-8f69-42b0-9dc9-0c833dac1796 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 19:22:41 GMT + date: Wed, 06 Oct 2021 21:03:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '5' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_user_agent.yaml index dcfccb03abca..dec825fce612 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_user_agent.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.09,"neutral":0.9,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,16 +22,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 65f89539-6c0b-404e-a86f-51c86783bb9e + apim-request-id: c7bb8f02-9497-443b-9ae4-afb50f98a791 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:41 GMT + date: Wed, 06 Oct 2021 21:03:58 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '97' + x-envoy-upstream-service-time: '113' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_dont_use_language_hint.yaml index d690a5186b74..248164bbf6dc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_dont_use_language_hint.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":33,"text":"This @@ -23,16 +23,16 @@ interactions: was too expensive."}],"warnings":[]},{"id":"2","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.0,"negative":0.99},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.0,"negative":0.99},"offset":0,"length":42,"text":"The restaurant was not as good as I hoped."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 90ed4cc2-1087-4848-8888-43938181ff98 + apim-request-id: f41db6f7-6f7a-41f0-9535-afae386bb3d9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:41 GMT + date: Wed, 06 Oct 2021 21:03:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '98' + x-envoy-upstream-service-time: '115' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint.yaml index 8486578594da..3211eafdf928 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","sentiment":"neutral","confidenceScores":{"positive":0.07,"neutral":0.93,"negative":0.0},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.07,"neutral":0.93,"negative":0.0},"offset":0,"length":33,"text":"This @@ -23,16 +23,16 @@ interactions: was too expensive."}],"warnings":[]},{"id":"2","sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.32,"negative":0.67},"sentences":[{"sentiment":"negative","confidenceScores":{"positive":0.01,"neutral":0.32,"negative":0.67},"offset":0,"length":42,"text":"The restaurant was not as good as I hoped."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: ff49a838-805f-4d19-ab36-05eff84a0df6 + apim-request-id: 74d2abaa-bba2-47f7-8755-f7d9d8b79cc5 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:42 GMT + date: Wed, 06 Oct 2021 21:03:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '131' + x-envoy-upstream-service-time: '112' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_input.yaml index 26f972368c17..3fe098c11672 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_input.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,16 +22,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":0.97,"neutral":0.02,"negative":0.01},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: bcc36b9c-c328-4ff8-8ead-63e3986c5fdb + apim-request-id: a9c29541-9374-4685-9ed2-f77bcf098d58 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:43 GMT + date: Wed, 06 Oct 2021 21:03:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '294' + x-envoy-upstream-service-time: '193' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 14f7145a2a0f..99ca7f642add 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"sentences":[{"sentiment":"neutral","confidenceScores":{"positive":0.04,"neutral":0.95,"negative":0.01},"offset":0,"length":22,"text":"I @@ -22,16 +22,16 @@ interactions: did not like the hotel we stayed at."}],"warnings":[]},{"id":"3","sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"sentences":[{"sentiment":"positive","confidenceScores":{"positive":1.0,"neutral":0.0,"negative":0.0},"offset":0,"length":36,"text":"The restaurant had really good food."}],"warnings":[]}],"errors":[],"modelVersion":"2020-04-01"}' headers: - apim-request-id: 8e372782-604f-45c3-9cb0-c70f02c5db8c + apim-request-id: ed55ff37-fa6d-41cc-b81c-3d52492f93e9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:43 GMT + date: Wed, 06 Oct 2021 21:03:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '175' + x-envoy-upstream-service-time: '119' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_input.yaml index 85d89023c63e..e2a1b2ec71e1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"neutral\",\"confidenceScores\"\ @@ -32,16 +32,16 @@ interactions: :0.06},\"offset\":0,\"length\":4,\"text\":\"\u732B\u306F\u5E78\u305B\"}],\"\ warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}" headers: - apim-request-id: c6591a02-286b-4536-a4dc-54be0c20de22 + apim-request-id: 6c9ca22a-ca67-4e01-adcd-c37ac9ffd681 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:44 GMT + date: Wed, 06 Oct 2021 21:04:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '134' + x-envoy-upstream-service-time: '113' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index de6c8576d16f..91e3872c604d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_analyze_sentiment_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"sentiment\":\"neutral\",\"confidenceScores\"\ @@ -32,16 +32,16 @@ interactions: :0.06},\"offset\":0,\"length\":4,\"text\":\"\u732B\u306F\u5E78\u305B\"}],\"\ warnings\":[]}],\"errors\":[],\"modelVersion\":\"2020-04-01\"}" headers: - apim-request-id: b1714f8b-d578-4bfa-9c07-d6bc7be283b1 + apim-request-id: 40ab7a31-c90e-4da6-82a8-6c9603683873 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 19:22:44 GMT + date: Wed, 06 Oct 2021 21:04:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '120' + x-envoy-upstream-service-time: '404' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/sentiment?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/sentiment?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_dict.yaml index 1d6b7e126438..0ac81194002f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_dict.yaml @@ -17,21 +17,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=true response: body: string: '{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"statistics":{"charactersCount":41,"transactionsCount":1},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":39,"transactionsCount":1},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"statistics":{"charactersCount":4,"transactionsCount":1},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":0.99},"statistics":{"charactersCount":46,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - f2c1dafe-c364-4a67-9eb4-40d05e86fa5e + - e02d7cbd-a0e8-4a21-9b5c-6fe8ad097dfa content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 20:19:47 GMT + - Wed, 06 Oct 2021 21:04:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5581' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_text_document_input.yaml index 1e3b634a4db7..4ac813ae560b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_all_successful_passing_text_document_input.yaml @@ -17,21 +17,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - d6260eea-7a44-44e4-a1e0-0cb64cdc210b + - dd9b2600-5817-4c40-b8fc-8eff97744f04 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 20:19:54 GMT + - Wed, 06 Oct 2021 21:04:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6058' + - '16' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_credentials.yaml index 3779f74463d5..910a23b199ad 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_credentials.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 9dfebd00-2c89-4ab0-8292-bc920245c0b9 + - e40d476b-ede2-4865-a880-b6d1aa703574 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 20:19:53 GMT + - Wed, 06 Oct 2021 21:04:04 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_model_version_error.yaml index 30811c2e0fbd..edc45a21faa7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_bad_model_version_error.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?model-version=bad&showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid @@ -24,11 +24,11 @@ interactions: For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: apim-request-id: - - 4138d72b-774c-4bd3-9bdd-dde542dfd1f7 + - bfd2e80b-dc99-47c7-a0db-89db3d4758b1 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:00 GMT + - Wed, 06 Oct 2021 21:04:04 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5561' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit.yaml index d9aa90f99dfe..4984f397da60 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit.yaml @@ -763,20 +763,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 1000 records are permitted."}}}' headers: apim-request-id: - - 771dc8a6-b107-4a2c-a32f-c381d90c1f52 + - f0f53621-dade-4f33-9b0f-675a42957960 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:00 GMT + - Wed, 06 Oct 2021 21:04:05 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -784,7 +784,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '18' + - '11' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit_error.yaml index 5de77335a8ff..d7b348bc64ab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_batch_size_over_limit_error.yaml @@ -728,20 +728,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 1000 records are permitted."}}}' headers: apim-request-id: - - 34881f82-fdc5-47d2-81b7-3ce242f4dbf2 + - 8fb4a16c-f546-42cc-83fb-4498e31660cd content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:07 GMT + - Wed, 06 Oct 2021 21:04:05 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -749,7 +749,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5333' + - '464' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_client_passed_default_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_client_passed_default_country_hint.yaml index 59c6a1b759b3..730fe7ef1345 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_client_passed_default_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_client_passed_default_country_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 9e6e0ee6-87a6-455d-9ae6-aff3b6545e08 + - 1398eb1b-9f03-4730-a3cd-a2b455a7d11d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:13 GMT + - Wed, 06 Oct 2021 21:04:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5636' + - '9' status: code: 200 message: OK @@ -59,21 +59,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 34bef030-01f5-4e17-aad1-2cc65627d8b1 + - 1f9238b5-66f1-41b4-b040-963ae61a0608 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:19 GMT + - Wed, 06 Oct 2021 21:04:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -81,7 +81,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5711' + - '8' status: code: 200 message: OK @@ -102,21 +102,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 341ccb02-0523-4e7e-9e03-eaff8a2a2b21 + - 29bea6f2-844d-4b0a-86c7-2a480be8c32a content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:19 GMT + - Wed, 06 Oct 2021 21:04:06 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -124,7 +124,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '32' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_kwarg.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_kwarg.yaml index 5cd52ad4694a..f062ec57dcd7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_kwarg.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_kwarg.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":26,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 9ace338d-f1ab-48e0-b7fd-b437823cd7ae + - af26b62d-54a4-4933-b5e2-6acbab3417bc content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:20:19 GMT + - Wed, 06 Oct 2021 21:04:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '104' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_none.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_none.yaml index 95395f55358c..dbbd8f2208d0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_none.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_country_hint_none.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 7ab2405c-b87f-423c-9fff-bfdb2a91c12e + - 583d300c-8e93-47ca-8931-b3f7f118a9a3 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:20:21 GMT + - Wed, 06 Oct 2021 21:04:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '136' + - '9' status: code: 200 message: OK @@ -55,21 +55,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - bdbf32ef-16d8-4f85-b9f4-c39960f11a90 + - a6786520-bbae-45d6-b8a0-649a6fe539fb content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:20:22 GMT + - Wed, 06 Oct 2021 21:04:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -77,7 +77,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '505' + - '7' status: code: 200 message: OK @@ -96,21 +96,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - a5b7e345-143b-4927-bf95-a1c321cf440a + - bc662bb3-be8b-4680-979c-13b46fff6220 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:20:22 GMT + - Wed, 06 Oct 2021 21:04:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -118,7 +118,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '518' + - '9' status: code: 200 message: OK @@ -137,21 +137,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 8a0726cd-4eae-4c91-bf41-6d53d3add65b + - 4bc5fec9-0ae2-4329-8803-9622f5cecf8f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:20:23 GMT + - Wed, 06 Oct 2021 21:04:07 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -159,7 +159,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '24' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_disable_service_logs.yaml index 48c02ae46273..b0f7786b5c65 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_disable_service_logs.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false&loggingOptOut=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false&loggingOptOut=true response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.88},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 4dcf5acc-0a03-4436-bee6-c21eef57f07d + - 91396326-e99b-4dba-8a14-cc7ce77aa96d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:20:23 GMT + - Wed, 06 Oct 2021 21:04:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '110' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_no_result_attribute.yaml index e58f1d827699..191c805822bc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_no_result_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - f5b1fdb3-7b98-4419-ab87-328d5450ef64 + - f3bbe5c9-0bf9-40ec-be1c-3fad7358b5ca content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:23 GMT + - Wed, 06 Oct 2021 21:04:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_nonexistent_attribute.yaml index cb2f4d51f5d8..5836e2a419f5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_attribute_error_nonexistent_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 31aad89d-b516-4ccf-933a-f2bb823b2715 + - 365a3a0e-fbeb-4d19-b4a7-4d1fd29e78f0 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:24 GMT + - Wed, 06 Oct 2021 21:04:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_errors.yaml index ce7981879395..67428dd39163 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_errors.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -29,11 +29,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - f3261b59-3e87-46d3-898c-88bbedc61e15 + - c3a98696-afa4-41b0-bbd2-08bac7e843d2 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:24 GMT + - Wed, 06 Oct 2021 21:04:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_warnings.yaml index 4c9499db587f..237d648c4e58 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_document_warnings.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - d91e87f8-53af-4f35-b433-813912c14613 + - bc9d02e8-9cfc-433c-b8eb-81a203459da7 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:20:25 GMT + - Wed, 06 Oct 2021 21:04:08 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '26' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_duplicate_ids_error.yaml index c756ff8987d6..edcf2399e549 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_duplicate_ids_error.yaml @@ -15,20 +15,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 454b440f-57e6-4726-968d-61611514a0a8 + - c8422b34-e06b-4d51-94d5-51adde3c2b7a content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:26 GMT + - Wed, 06 Oct 2021 21:04:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_empty_credential_class.yaml index 02a26eeeab81..4bbfad087420 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_empty_credential_class.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 41615899-1718-4fae-b331-09257423c6d1 + - 1fb2b8f0-76d6-4ab0-a032-82759a36f6ce content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 20:20:26 GMT + - Wed, 06 Oct 2021 21:04:09 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_all_errors.yaml index 8d3be5fe86e0..7564cfb72782 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_all_errors.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -34,11 +34,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 25cca461-2c00-4650-8a88-d8a00541d368 + - 4b5e5b1f-8147-4c92-8bbd-460f668399c6 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:27 GMT + - Wed, 06 Oct 2021 21:04:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -46,7 +46,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_some_errors.yaml index 85c07f2564ec..54183fd55bee 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_input_with_some_errors.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":0.99},"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -30,13 +30,13 @@ interactions: is empty."}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - a1679e2b-ecf0-438a-9f46-0becbc533e1b + - 2ce869ae-ff93-41fe-896d-6e1aafe1de07 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 date: - - Mon, 02 Aug 2021 20:20:28 GMT + - Wed, 06 Oct 2021 21:04:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '162' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_docs.yaml index 2fb16d17f85b..4a5e516d3f6a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_docs.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: code."}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - ad472d08-6e16-413e-b9f4-cccf0d8e54bb + - f2bf9f46-fcb0-4470-b5c6-527152624226 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:28 GMT + - Wed, 06 Oct 2021 21:04:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_method.yaml index 93e942ec648d..fdd8d9d49f54 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_invalid_country_hint_method.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: code."}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 26654212-af0e-4ca5-a544-1a4e202feb3f + - 15371fcc-d430-4196-9c7f-8242b612ee5d content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 20:20:29 GMT + - Wed, 06 Oct 2021 21:04:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_out_of_order_ids.yaml index 13a7e7bce89f..ebf6f92510f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_out_of_order_ids.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"56","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"0","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"19","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - a00f70ab-248b-403b-a942-5081a62ae024 + - b771ac5c-ab64-4130-b548-766b09e77327 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 20:20:29 GMT + - Wed, 06 Oct 2021 21:04:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '26' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_output_same_order_as_input.yaml index 791e396bcce9..616519bf6551 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_output_same_order_as_input.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.93},"warnings":[]},{"id":"4","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"5","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 84e70611-1760-4aa6-965e-37bd46bae977 + - 6d28639a-9aa8-4118-be5e-06e943ba3b76 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 date: - - Mon, 02 Aug 2021 20:20:30 GMT + - Wed, 06 Oct 2021 21:04:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '31' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_pass_cls.yaml index f84bb83fd401..faa1b7707fbb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_pass_cls.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 8f6ac700-fba0-4310-8034-4781abefad6b + - 8497db1e-b240-4d00-9cce-5fabf924bf76 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:20:30 GMT + - Wed, 06 Oct 2021 21:04:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '25' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_passing_only_string.yaml index 2c6ba974aaa8..0f4293226d0a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_passing_only_string.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":0.99},"warnings":[]}],"errors":[{"id":"4","error":{"code":"InvalidArgument","message":"Invalid @@ -27,13 +27,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - fb761f80-7848-4e62-9a75-1b93e301f23f + - 6ea3423b-917f-4d4f-bdf5-a59af12d7f00 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 20:20:31 GMT + - Wed, 06 Oct 2021 21:04:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '25' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_per_item_dont_use_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_per_item_dont_use_country_hint.yaml index cf41e9a88707..6ef23ac2f576 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_per_item_dont_use_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_per_item_dont_use_country_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 97108ad7-3fa2-4bf0-a39e-d2516fc48c17 + - e5d4842f-6154-4cc5-899b-083fe0544e59 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:32 GMT + - Wed, 06 Oct 2021 21:04:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '17' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_rotate_subscription_key.yaml index de9595166bbf..ca20b55db9d1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_rotate_subscription_key.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 6ffe2ea4-ddd0-4aab-9d87-2ededffa12f7 + - 7236e2fa-d62b-4ed9-b81c-b4a64b198423 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:32 GMT + - Wed, 06 Oct 2021 21:04:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '27' + - '7' status: code: 200 message: OK @@ -59,9 +59,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -69,13 +69,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 2b3f80fa-594a-4b69-bfb3-c2a2607721d1 + - d7c848ed-efcd-4621-bf98-4ed1210aa94a content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 20:20:32 GMT + - Wed, 06 Oct 2021 21:04:12 GMT status: code: 401 message: PermissionDenied @@ -96,21 +96,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 602ee9e7-6ae4-467b-847f-0ac6e69aa887 + - 6dac516a-8cbe-4736-8ad4-9d6967edbf4c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:32 GMT + - Wed, 06 Oct 2021 21:04:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -118,7 +118,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '32' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_show_stats_and_model_version.yaml index ef77e67b14a0..ec00f3bfbb48 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_show_stats_and_model_version.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - c1719f9b-aee9-4844-96a6-e58b943c54f2 + - f9ffb32c-10b9-4183-a654-88d02e02fef4 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 20:20:33 GMT + - Wed, 06 Oct 2021 21:04:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '23' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_string_index_type_not_fail_v3.yaml index abb3949a609a..6751cc0f7443 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_string_index_type_not_fail_v3.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/languages?showStats=false response: @@ -22,13 +22,13 @@ interactions: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - a43e64dd-4560-4b76-9ea8-3b33fa65172d + - 5eef97fd-dd1a-4e04-9929-916aef62dd3d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:20:33 GMT + - Wed, 06 Oct 2021 21:04:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '33' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_user_agent.yaml index 59a97d44faa4..13c309f87f69 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_user_agent.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - e7d6b198-70e2-4634-9e4e-402a76226eb3 + - e164ae9f-49cc-4a0e-948e-b7b5d023c196 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:34 GMT + - Wed, 06 Oct 2021 21:04:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '38' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint.yaml index 5475f39d1ed5..e59813546646 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 77fbfc06-1e25-40ef-ae0a-e433d0465b18 + - f5eb5e78-4ecb-4062-a860-002f2dfc450d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:34 GMT + - Wed, 06 Oct 2021 21:04:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '25' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_input.yaml index e6b738feb778..39ee74faf6cc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_input.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 0f689ee7-ea67-4822-a5b5-d4967e7dbe3a + - cb3b32f4-ace8-4940-9dd3-0437000a5e12 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:35 GMT + - Wed, 06 Oct 2021 21:04:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '20' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_per_item_hints.yaml index 71b62582ccae..0cbe2840eb49 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_dict_per_item_hints.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 362744e1-5bb7-4cd3-978f-0d81b8f2caee + - d72104d3-df63-4e0c-8be0-bbd7e3f15486 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:36 GMT + - Wed, 06 Oct 2021 21:04:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '23' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_input.yaml index db512dc54a17..b2369ce16abc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_input.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":0.75},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - f1bac836-36f2-451f-9da6-07921da99da7 + - e47742c4-1567-4a56-bba0-a3b322f6fc7e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:36 GMT + - Wed, 06 Oct 2021 21:04:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '19' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_per_item_hints.yaml index b81b4d3bd7a3..4d0493057d72 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_country_hint_and_obj_per_item_hints.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"warnings":[]},{"id":"4","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":0.75},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - 9b9ebbe7-6ac5-47d0-95bb-ea7a24942736 + - ab42eba2-c6f4-4823-a022-d814151716a0 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:37 GMT + - Wed, 06 Oct 2021 21:04:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '23' + - '7' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_dont_use_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_dont_use_country_hint.yaml index 70a1ed6ee937..4b3758706605 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_dont_use_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language.test_whole_batch_dont_use_country_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: apim-request-id: - - ee030a5d-40ec-49d0-8dfd-0a09b6947237 + - 361eadc3-b803-4c3a-b57b-625c6e2da7a8 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 20:20:37 GMT + - Wed, 06 Oct 2021 21:04:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '25' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_dict.yaml index e4c28fcfaec4..d0de35138beb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_dict.yaml @@ -13,23 +13,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=true response: body: string: '{"statistics":{"documentsCount":4,"validDocumentsCount":4,"erroneousDocumentsCount":0,"transactionsCount":4},"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"statistics":{"charactersCount":41,"transactionsCount":1},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":39,"transactionsCount":1},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"statistics":{"charactersCount":4,"transactionsCount":1},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":0.99},"statistics":{"charactersCount":46,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: f8e20e8a-d67a-4876-8238-9da032f2d9ba + apim-request-id: 9a9ae519-7b2b-4be1-9c3a-38f4570d8f21 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 20:42:32 GMT + date: Wed, 06 Oct 2021 21:04:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '56' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=true + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=true version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_text_document_input.yaml index 5a43a3943d0f..f707168946a0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_all_successful_passing_text_document_input.yaml @@ -13,23 +13,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 574da8ee-fe69-4019-92c7-e43404d77adf + apim-request-id: 763b2fe7-bfba-4b44-b22e-b097956cc5bd content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 20:42:32 GMT + date: Wed, 06 Oct 2021 21:04:14 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '36' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_credentials.yaml index fc6d1e713c9e..0977a745a75a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_credentials.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 0079cc57-c1e1-4d9b-81ec-8f8344e29edc + apim-request-id: 96d34562-8b6e-43fe-8566-e67830bb43c5 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 20:42:33 GMT + date: Wed, 06 Oct 2021 21:04:14 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_model_version_error.yaml index 8c5f2b9724e1..440802f06321 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_bad_model_version_error.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?model-version=bad&showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid model version. Possible values are: latest,2019-10-01,2020-07-01,2020-09-01,2021-01-05. For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: - apim-request-id: 5dba0e9d-7bf4-422f-ae75-d35519072eb5 + apim-request-id: 88ed9f17-126c-4074-9541-b4fd1eee9318 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:34 GMT + date: Wed, 06 Oct 2021 21:04:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '14' + x-envoy-upstream-service-time: '6' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?model-version=bad&showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?model-version=bad&showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit.yaml index 9c99804930e7..57d53ed417bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit.yaml @@ -759,23 +759,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 1000 records are permitted."}}}' headers: - apim-request-id: 80efc4e2-1b57-4827-919e-fa411d88c837 + apim-request-id: f5b031db-0e67-4287-9e3c-fc378f3fa9ec content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:35 GMT + date: Wed, 06 Oct 2021 21:04:15 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '31' + x-envoy-upstream-service-time: '9' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit_error.yaml index 8ac3dd2e28f1..07746a298df2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_batch_size_over_limit_error.yaml @@ -724,23 +724,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 1000 records are permitted."}}}' headers: - apim-request-id: 342c7e6b-765a-45ee-a105-a6a2ff91f47a + apim-request-id: 7a86bb4f-062e-473a-892d-535d4c729f90 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:36 GMT + date: Wed, 06 Oct 2021 21:04:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '19' + x-envoy-upstream-service-time: '8' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_client_passed_default_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_client_passed_default_country_hint.yaml index 2833af8ab6a1..0ee0c5fa38f4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_client_passed_default_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_client_passed_default_country_hint.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 5f94ca5f-1a03-4d02-a653-92d465726c21 + apim-request-id: 41497108-30f6-438a-ba58-caafcf901179 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:36 GMT + date: Wed, 06 Oct 2021 21:04:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '31' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "countryHint": "DE"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "countryHint": @@ -44,25 +44,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: de29f210-7705-4930-ad27-1c0edbe00433 + apim-request-id: e42f856e-4376-42b2-ac8a-30dedcdae00c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:36 GMT + date: Wed, 06 Oct 2021 21:04:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '24' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "countryHint": "CA"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "countryHint": @@ -76,23 +76,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 6e906434-ffdd-4b6a-82b2-4384bf93d61c + apim-request-id: 1c9d848b-db4f-4782-8b61-d879cfb63537 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:36 GMT + date: Wed, 06 Oct 2021 21:04:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '48' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_kwarg.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_kwarg.yaml index 299b4cd5f3a0..b99fe807251a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_kwarg.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_kwarg.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"statistics":{"charactersCount":26,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: e7d44f16-947b-404c-b659-a57fe05e0faa + apim-request-id: 428c53cd-e630-46d3-a7ae-c0b13bb76ada content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:42:36 GMT + date: Wed, 06 Oct 2021 21:04:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '16' + x-envoy-upstream-service-time: '20' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?model-version=latest&showStats=true + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?model-version=latest&showStats=true version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_none.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_none.yaml index 3e7dcee5dd25..febac275cc52 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_none.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_country_hint_none.yaml @@ -10,25 +10,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 69f1774a-b881-42e2-9996-fe7068fae610 + apim-request-id: ac9dc402-9788-46d3-b2fa-966aef68d9c8 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:42:38 GMT + date: Wed, 06 Oct 2021 21:04:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '21' + x-envoy-upstream-service-time: '6' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false - request: body: '{"documents": [{"id": "1", "text": "This is written in English.", "countryHint": ""}]}' @@ -40,25 +40,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: ed410781-869f-4e3a-9163-388ce704b5e8 + apim-request-id: 97ae8493-f5b1-43f5-9c38-49e1abc2f23c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:42:38 GMT + date: Wed, 06 Oct 2021 21:04:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '38' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false - request: body: '{"documents": [{"id": "0", "text": "this is written in english", "countryHint": ""}]}' @@ -70,25 +70,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 0241a248-38da-4c07-b10e-4476d7cd58f6 + apim-request-id: 84b8915d-69f7-4ee3-8665-506f7a6a3e2b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:42:38 GMT + date: Wed, 06 Oct 2021 21:04:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '24' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false - request: body: '{"documents": [{"id": "0", "text": "this is written in english", "countryHint": ""}]}' @@ -100,23 +100,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: dc3af545-9414-4894-95a9-ea10cfcc502d + apim-request-id: 0cb7f8fa-5448-40e7-a67e-f843da5ad301 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:42:38 GMT + date: Wed, 06 Oct 2021 21:04:16 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '23' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_disable_service_logs.yaml index 22a16c4c8e46..d53d05cbe274 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_disable_service_logs.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false&loggingOptOut=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false&loggingOptOut=true response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.88},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 2a13e43d-9d53-476c-b667-4378da960116 + apim-request-id: e0cdc51c-962a-44c3-97c4-7ee0324b5ad2 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:42:39 GMT + date: Wed, 06 Oct 2021 21:04:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '22' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false&loggingOptOut=true + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false&loggingOptOut=true version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_no_result_attribute.yaml index 3ae83362dc7c..db38e8501be5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_no_result_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 82ca21b8-5155-4bae-8e6f-00f2ee93eb2b + apim-request-id: 1c2290f7-5835-4182-8e9f-2450f22f40f5 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:39 GMT + date: Wed, 06 Oct 2021 21:04:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_nonexistent_attribute.yaml index 98598cef2d02..d5917148a5b7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 2f59fc51-cdb7-49fc-aeaa-f1b0f8c3f1a7 + apim-request-id: c89fd253-c31c-4391-b22b-5a428ebf576e content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:39 GMT + date: Wed, 06 Oct 2021 21:04:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_errors.yaml index 912c48ea8d93..e01949484b0d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_errors.yaml @@ -11,9 +11,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -24,15 +24,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: baf1d6d4-37c4-4962-808e-6d81a6a3d2d6 + apim-request-id: 23ed9a91-8dcf-42b9-9c0a-d099cf2c8168 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:40 GMT + date: Wed, 06 Oct 2021 21:04:18 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_warnings.yaml index 917e4cf3dc2c..d2d6419e18ef 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_document_warnings.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 27a18e2a-c80d-49d2-8312-c11abbe3a681 + apim-request-id: 3618cca0-2ff0-49f1-80d0-6e258bad9d3b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:42:40 GMT + date: Wed, 06 Oct 2021 21:04:17 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '23' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_duplicate_ids_error.yaml index 453a5810802b..cda9f3542d3a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_duplicate_ids_error.yaml @@ -11,23 +11,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: 35b7675c-6cbf-41df-9e30-2e3334493293 + apim-request-id: 717069b3-6000-4254-9b84-72c7c6908b67 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:41 GMT + date: Wed, 06 Oct 2021 21:04:18 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '12' + x-envoy-upstream-service-time: '13' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_empty_credential_class.yaml index 0c490373fdb7..0c00426fd154 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_empty_credential_class.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 66176ca7-ecbb-4914-84ec-65375b4268fa + apim-request-id: d7c7723c-0d70-42af-bfda-15caa8857340 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 20:42:42 GMT + date: Wed, 06 Oct 2021 21:04:18 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_all_errors.yaml index e7e79e1b11c4..3b6e8676b4d7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_all_errors.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -29,15 +29,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: d9d0a3b8-317e-47d6-82ab-c91bc04dbcfc + apim-request-id: e2a12243-a35b-4367-9b85-21b92a7e5348 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:42 GMT + date: Wed, 06 Oct 2021 21:04:18 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '4' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_some_errors.yaml index d7364f0dfc17..d5ac16fcdb36 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_input_with_some_errors.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"4","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":0.99},"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,16 +25,16 @@ interactions: in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: eec1faac-2858-460f-b844-c034d6137cf4 + apim-request-id: bcbf3829-85ec-4192-b4de-8d457f569a0a content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 - date: Mon, 02 Aug 2021 20:42:43 GMT + date: Wed, 06 Oct 2021 21:04:18 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '26' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_docs.yaml index 673584382717..0c6b124170ee 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_docs.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -20,15 +20,15 @@ interactions: hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code."}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 06c2a1bc-1341-4139-aab2-755321dbd9e1 + apim-request-id: 3c2ebac7-ab93-49ae-b9f4-1892fc39aa4f content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:43 GMT + date: Wed, 06 Oct 2021 21:04:18 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_method.yaml index 2af54b1f14b8..fac4b689e9c0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_invalid_country_hint_method.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -20,15 +20,15 @@ interactions: hint is not valid. Please specify an ISO 3166-1 alpha-2 two letter country code."}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: b10b5969-dd79-458a-8d1f-545b2f4201ba + apim-request-id: 8c3e6840-ea13-437f-8a2f-61ddafaeebb3 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 20:42:43 GMT + date: Wed, 06 Oct 2021 21:04:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_out_of_order_ids.yaml index 97cebe3746ed..474e8c09cb1e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_out_of_order_ids.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"56","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"0","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"19","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: c407a28e-c32d-4a42-8bbb-6a743297d8fd + apim-request-id: 8443dedd-383a-4d08-a517-34c153c60a12 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 20:42:43 GMT + date: Wed, 06 Oct 2021 21:04:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_output_same_order_as_input.yaml index 4392920e16b7..92342ddf787b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_output_same_order_as_input.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.93},"warnings":[]},{"id":"4","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"5","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 61887549-7344-4511-b851-8090a694351a + apim-request-id: 78a0f602-c6be-4617-ae31-4a3aa4cb9e2d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 - date: Mon, 02 Aug 2021 20:42:45 GMT + date: Wed, 06 Oct 2021 21:04:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '21' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_pass_cls.yaml index 3211a2504e40..58071a59fd2c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_pass_cls.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: c4a42b6a-deac-4312-9d8f-99e2e715776b + apim-request-id: 17ba4f6f-4e11-4106-8e5d-ffb6002b974c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:42:45 GMT + date: Wed, 06 Oct 2021 21:04:19 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '44' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_passing_only_string.yaml index 995f4718873e..0f670392a92d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_passing_only_string.yaml @@ -13,25 +13,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"German","iso6391Name":"de","confidenceScore":0.99},"warnings":[]}],"errors":[{"id":"4","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 290851f1-c99e-4651-a6ad-cb264dbb863f + apim-request-id: f9c65c91-b1fc-4167-8a7f-2097fc731967 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 20:42:46 GMT + date: Wed, 06 Oct 2021 21:04:20 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_per_item_dont_use_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_per_item_dont_use_country_hint.yaml index ee12368f8019..bd95b8721818 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_per_item_dont_use_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_per_item_dont_use_country_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 64a6c3f6-ce74-4006-b7f2-ac3da45956c0 + apim-request-id: 4a7987d9-1713-426e-9728-2212ba68689d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:46 GMT + date: Wed, 06 Oct 2021 21:04:20 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '14' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_rotate_subscription_key.yaml index 566b60930a68..6d568e2b3a9b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_rotate_subscription_key.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 7ddc9c64-e40f-44eb-8ee9-b60d568714eb + apim-request-id: 910eba28-f8b3-49a4-8cbb-0f5d87463c48 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:47 GMT + date: Wed, 06 Oct 2021 21:04:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '23' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "countryHint": "US"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "countryHint": @@ -44,23 +44,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: ba6f91be-92bc-41c2-baeb-179566dbe026 + apim-request-id: fbb75b30-d041-48ff-b0aa-9d5dfd2ebd7e content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 20:42:47 GMT + date: Wed, 06 Oct 2021 21:04:21 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "countryHint": "US"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "countryHint": @@ -74,23 +74,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 335f4547-1c25-4d76-8424-000d0876b882 + apim-request-id: 78cc564c-88c1-4f61-a41d-18c334363ee3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:47 GMT + date: Wed, 06 Oct 2021 21:04:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '20' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_show_stats_and_model_version.yaml index 926f5ef0a7ac..5837401fb4b4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_show_stats_and_model_version.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","detectedLanguage":{"name":"(Unknown)","iso6391Name":"(Unknown)","confidenceScore":0.0},"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 9211864a-a363-489d-b637-b021af115d07 + apim-request-id: 48be2f2b-3d30-49cb-8c3f-0ca40975296d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 20:42:47 GMT + date: Wed, 06 Oct 2021 21:04:20 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '23' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?model-version=latest&showStats=true + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?model-version=latest&showStats=true version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_string_index_type_not_fail_v3.yaml index d661254fa462..fa5e1b21f741 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_string_index_type_not_fail_v3.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 9b292b2a-51ad-4da5-a3c6-6986c477e61f + apim-request-id: 396802f8-2654-4fde-b334-c1022d0af293 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:42:48 GMT + date: Wed, 06 Oct 2021 21:04:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '21' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.0/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.0/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_user_agent.yaml index 901b8f7e4a57..1853cac71deb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_user_agent.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 46cdf286-9582-4215-a8fc-9c9abc95b14c + apim-request-id: ab52d02b-ab06-4cc1-894d-8f3937713a37 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:48 GMT + date: Wed, 06 Oct 2021 21:04:20 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '24' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint.yaml index 867093a2eea6..db25c6487a13 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 9486538d-4dce-4d73-af13-e891d948d65c + apim-request-id: 7d36b336-b9ae-4f33-831c-6a58f763650f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:48 GMT + date: Wed, 06 Oct 2021 21:04:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_input.yaml index 10e95c432c2f..b95514ab0988 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_input.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 618d8376-f024-4d22-8fa9-e5e91c2f67ff + apim-request-id: d2c72681-788d-4872-bbeb-77600a52e4b0 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:49 GMT + date: Wed, 06 Oct 2021 21:04:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_per_item_hints.yaml index bec4847eb87d..85104754b252 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_dict_per_item_hints.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"3","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 5b192e61-81e4-48d5-b2cd-f79e5472c2b5 + apim-request-id: b66280a5-e64c-4021-931d-4e346e6d3a9a content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:49 GMT + date: Wed, 06 Oct 2021 21:04:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '7' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_input.yaml index e299ae448911..0b349d8badb1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_input.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"warnings":[]},{"id":"2","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":0.75},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 865c4194-2ece-45af-a967-e0392f51cc37 + apim-request-id: 3e6b7461-88fa-4d0f-bb9c-e2736927abcd content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:49 GMT + date: Wed, 06 Oct 2021 21:04:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_per_item_hints.yaml index adb6faa8c176..bcd88810ec8c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_country_hint_and_obj_per_item_hints.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.97},"warnings":[]},{"id":"4","detectedLanguage":{"name":"Spanish","iso6391Name":"es","confidenceScore":0.75},"warnings":[]},{"id":"3","detectedLanguage":{"name":"Japanese","iso6391Name":"ja","confidenceScore":1.0},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 95d64c68-87b6-4158-8a9b-8994366574e3 + apim-request-id: c7a4c01d-944e-4046-bde9-6d9d7f64f0e7 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:50 GMT + date: Wed, 06 Oct 2021 21:04:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '15' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_dont_use_country_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_dont_use_country_hint.yaml index 5235989a3df9..0b7f664fad87 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_dont_use_country_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_detect_language_async.test_whole_batch_dont_use_country_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/languages?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/languages?showStats=false response: body: string: '{"documents":[{"id":"0","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"1","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":1.0},"warnings":[]},{"id":"2","detectedLanguage":{"name":"English","iso6391Name":"en","confidenceScore":0.99},"warnings":[]}],"errors":[],"modelVersion":"2021-01-05"}' headers: - apim-request-id: 67f5e1a7-77b1-4fb8-adaf-0f4991add6a0 + apim-request-id: 70f477e1-dc17-4eca-abc2-a17985e813cb content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 20:42:50 GMT + date: Wed, 06 Oct 2021 21:04:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '14' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/languages?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/languages?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfc.yaml index 5be1f6af2cf6..baef9c2145f2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfc.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfc.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"a\xF1o SSN: ***********\",\"id\"\ @@ -25,13 +25,13 @@ interactions: errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: apim-request-id: - - 671bbe52-b969-4d34-9788-a02b3dd258dc + - 232cff4c-1c0e-4ce6-8da9-f86f650744d6 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:47:15 GMT + - Wed, 06 Oct 2021 21:04:22 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10956' + - '25' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfd.yaml index 2e6375be1213..19321b78075d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfd.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_diacritics_nfd.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"an\u0303o SSN: ***********\",\"\ @@ -25,13 +25,13 @@ interactions: errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: apim-request-id: - - 56c90146-8561-4650-924d-e7ba7603230a + - ddb400d2-6dd8-49b3-a7da-b56fc6910483 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:47:24 GMT + - Wed, 06 Oct 2021 21:04:22 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10195' + - '24' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji.yaml index 8aabd08351fd..2d71c49d749c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\U0001F469 SSN: ***********\",\"\ @@ -25,13 +25,13 @@ interactions: errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: apim-request-id: - - 0ad5084b-863d-492b-9ded-aa68dadec244 + - ca73ac00-a40c-49d9-b141-0d6d01fd63f9 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:47:36 GMT + - Wed, 06 Oct 2021 21:04:23 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10645' + - '26' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family.yaml index 11bbcdd7399c..f88abf0eeee2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\U0001F469\u200D\U0001F469\u200D\ @@ -26,13 +26,13 @@ interactions: :[],\"modelVersion\":\"2021-01-15\"}" headers: apim-request-id: - - 69dd4e19-8466-4e42-8baf-86b64da6650a + - 2d1f9da0-256c-4a34-af7d-5f039142c352 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:47:48 GMT + - Wed, 06 Oct 2021 21:04:23 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11286' + - '34' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family_with_skin_tone_modifier.yaml index 116b6038cf21..a44a49bd34ef 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family_with_skin_tone_modifier.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_family_with_skin_tone_modifier.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\U0001F469\U0001F3FB\u200D\U0001F469\ @@ -26,13 +26,13 @@ interactions: errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: apim-request-id: - - 1f9abe25-8be5-4f74-8982-445c8fd7724e + - 7f243014-b76c-4c9c-858a-14fa2e52e174 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:47:50 GMT + - Wed, 06 Oct 2021 21:04:23 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '502' + - '26' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_with_skin_tone_modifier.yaml index 16b4eb9af683..b069ce036ca4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_with_skin_tone_modifier.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_emoji_with_skin_tone_modifier.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\U0001F469\U0001F3FB SSN: ***********\"\ @@ -25,13 +25,13 @@ interactions: errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: apim-request-id: - - ed689bbb-563e-4c9c-bbb4-bff24336e6d2 + - 30c48386-b531-4a84-9086-818edfb495da content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:47:50 GMT + - Wed, 06 Oct 2021 21:04:24 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '355' + - '25' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfc.yaml index a1570fb68cae..ac5cc533ae09 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfc.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfc.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\uC544\uAC00 SSN: ***********\"\ @@ -25,13 +25,13 @@ interactions: errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: apim-request-id: - - b6ccba31-555f-4084-b7b6-498a7b66f337 + - e17cc662-62b5-4096-8593-c94d177bf9c1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:48:03 GMT + - Wed, 06 Oct 2021 21:04:25 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11636' + - '25' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfd.yaml index d150a46ce098..f9388075dea5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfd.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_korean_nfd.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\uC544\uAC00 SSN: ***********\"\ @@ -25,13 +25,13 @@ interactions: errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: apim-request-id: - - d6473258-5cca-45ce-9bdd-562bcdc30c9e + - 375f60a0-2eba-4525-ac79-20a67185f21f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:48:13 GMT + - Wed, 06 Oct 2021 21:04:25 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10646' + - '26' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_zalgo_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_zalgo_text.yaml index a8546eeea3ef..aac1ff3bd02a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_zalgo_text.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding.test_zalgo_text.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"o\u0335\u0308\u0307\u0312\u0303\ @@ -34,13 +34,13 @@ interactions: modelVersion\":\"2021-01-15\"}" headers: apim-request-id: - - 617017ed-b83b-4fd1-8ffa-21b69cf7e651 + - b098ec65-a14d-4cb6-97af-d30024db4382 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 20:48:15 GMT + - Wed, 06 Oct 2021 21:04:25 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -48,7 +48,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '107' + - '57' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfc.yaml index c2940bc543f0..41236d7be8b6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfc.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfc.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"a\xF1o SSN: ***********\",\"id\"\ @@ -20,16 +20,16 @@ interactions: ,\"offset\":9,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"\ errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: - apim-request-id: 51d95e1c-31b6-49e7-887b-a373c88c6362 + apim-request-id: cd08e06c-83ba-4f6f-84a3-43cacd41bf1d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:53:15 GMT + date: Wed, 06 Oct 2021 21:04:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '428' + x-envoy-upstream-service-time: '24' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfd.yaml index ad08c6755b9b..3ea5f455463c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfd.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_diacritics_nfd.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"an\u0303o SSN: ***********\",\"\ @@ -20,16 +20,16 @@ interactions: ,\"offset\":10,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"\ errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: - apim-request-id: 820b44df-0032-4877-8198-381090b80467 + apim-request-id: c87ad575-cd67-4931-85b3-819c3ab6075c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:53:15 GMT + date: Wed, 06 Oct 2021 21:04:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '548' + x-envoy-upstream-service-time: '24' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji.yaml index 49aa29b98485..ef9670b7bdd5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\U0001F469 SSN: ***********\",\"\ @@ -20,16 +20,16 @@ interactions: ,\"offset\":7,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"\ errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: - apim-request-id: 9b1384ee-a517-4605-861a-8f9f42ca0462 + apim-request-id: 1abfdd71-156d-4a63-bf47-8581615685ba content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:53:16 GMT + date: Wed, 06 Oct 2021 21:04:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '407' + x-envoy-upstream-service-time: '26' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family.yaml index 267d3754c37d..98a825ad06ec 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\U0001F469\u200D\U0001F469\u200D\ @@ -21,16 +21,16 @@ interactions: :13,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\"\ :[],\"modelVersion\":\"2021-01-15\"}" headers: - apim-request-id: f3502f20-124e-4b8a-8a5a-beee828a00d0 + apim-request-id: 34f4052a-8f96-4b8a-8d08-6bd8b3c87945 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:53:17 GMT + date: Wed, 06 Oct 2021 21:04:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '475' + x-envoy-upstream-service-time: '28' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family_with_skin_tone_modifier.yaml index d383f5027973..f4e505f5e415 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family_with_skin_tone_modifier.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_family_with_skin_tone_modifier.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\U0001F469\U0001F3FB\u200D\U0001F469\ @@ -21,16 +21,16 @@ interactions: ,\"offset\":17,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"\ errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: - apim-request-id: 71431bb8-b6c1-4364-9190-fca6e6e7d02a + apim-request-id: aefccd75-39d6-4914-ba64-135b1eb22df1 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:53:18 GMT + date: Wed, 06 Oct 2021 21:04:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '511' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_with_skin_tone_modifier.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_with_skin_tone_modifier.yaml index 714a17dba879..f173584372fd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_with_skin_tone_modifier.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_emoji_with_skin_tone_modifier.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\U0001F469\U0001F3FB SSN: ***********\"\ @@ -20,16 +20,16 @@ interactions: ,\"offset\":8,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"\ errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: - apim-request-id: c8a2c644-6bc1-4f4c-ae03-a3938623b6ce + apim-request-id: 6ee852c0-b8b3-4fc9-850c-1881a1c2e054 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:53:19 GMT + date: Wed, 06 Oct 2021 21:04:27 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '394' + x-envoy-upstream-service-time: '24' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfc.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfc.yaml index f17a50a09951..0282ebc7c188 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfc.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfc.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\uC544\uAC00 SSN: ***********\"\ @@ -20,16 +20,16 @@ interactions: ,\"offset\":8,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"\ errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: - apim-request-id: 02ebeb1f-9dbe-4f17-8718-cb2ff3cf988a + apim-request-id: 3e0d00ad-32a6-4262-bd98-3a7a197772da content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:53:20 GMT + date: Wed, 06 Oct 2021 21:04:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '377' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfd.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfd.yaml index 57fdc0b48cb4..41d39554f9fc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfd.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_korean_nfd.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"\uC544\uAC00 SSN: ***********\"\ @@ -20,16 +20,16 @@ interactions: ,\"offset\":8,\"length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"\ errors\":[],\"modelVersion\":\"2021-01-15\"}" headers: - apim-request-id: 05af4bd7-2aa6-49b1-9746-14c57bb56c25 + apim-request-id: e53413ad-5317-443d-b148-d2c0306a4696 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:53:20 GMT + date: Wed, 06 Oct 2021 21:04:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '44' + x-envoy-upstream-service-time: '26' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_zalgo_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_zalgo_text.yaml index 5aa82c4ce90f..953b951f2249 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_zalgo_text.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_encoding_async.test_zalgo_text.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"o\u0335\u0308\u0307\u0312\u0303\ @@ -29,16 +29,16 @@ interactions: length\":11,\"confidenceScore\":0.65}],\"warnings\":[]}],\"errors\":[],\"\ modelVersion\":\"2021-01-15\"}" headers: - apim-request-id: d04aa78f-6135-4a28-acc2-92dda9e9f9fd + apim-request-id: 6b4ee1a1-f71f-4f34-b9cb-5eb6e26f8cb6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 20:53:21 GMT + date: Wed, 06 Oct 2021 21:04:27 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '543' + x-envoy-upstream-service-time: '57' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_dict.yaml index 9f7e4f7e44dc..9c2844dcbda0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_dict.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=true response: body: string: '{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","keyPhrases":["Bill @@ -25,13 +25,13 @@ interactions: Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":49,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 42c358da-91b1-408d-a2aa-ea15ae406d9a + - 983c0836-c5e7-4b82-ad12-d569f239a833 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 date: - - Mon, 02 Aug 2021 21:04:59 GMT + - Wed, 06 Oct 2021 21:04:27 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5231' + - '12' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_text_document_input.yaml index 5c01f562cb08..408a978ceedc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_all_successful_passing_text_document_input.yaml @@ -15,22 +15,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]},{"id":"2","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - a1d28287-9cd4-40ad-bbda-fea4128d2dad + - 877c88c4-9af5-4836-b43f-5196dfd0a59c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 date: - - Mon, 02 Aug 2021 21:05:00 GMT + - Wed, 06 Oct 2021 21:04:27 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '221' + - '13' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_credentials.yaml index 31375845f05d..f9e9557206dc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_credentials.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - d3891dff-490c-4f14-9bbb-a3343b95ab2c + - d823a6dc-a74c-415a-a6e8-9e9ca4952c6c content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:05:00 GMT + - Wed, 06 Oct 2021 21:04:28 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_model_version_error.yaml index 461733c14297..c80f542b7518 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_bad_model_version_error.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?model-version=bad&showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid @@ -24,11 +24,11 @@ interactions: For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: apim-request-id: - - f9fce8d8-1c33-44f4-9201-a0835eeb1591 + - 5f170022-3dc9-418e-bd90-638ceb3662e5 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:06 GMT + - Wed, 06 Oct 2021 21:04:28 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5515' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit.yaml index 8fe4c5fcbc67..ab08d1a7461f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit.yaml @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - e6592fb9-ea61-428b-81ec-c16100b07404 + - 6e089cbc-8338-42cb-8a59-226cb58022b2 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:12 GMT + - Wed, 06 Oct 2021 21:04:28 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5160' + - '15' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit_error.yaml index e08bbdca763f..d667539048a2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_batch_size_over_limit_error.yaml @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - f1299cc4-f408-4c51-bae2-59c6a3c42310 + - f388ebcd-117f-4086-86a4-b4b55f66530c content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:18 GMT + - Wed, 06 Oct 2021 21:04:28 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5112' + - '10' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_client_passed_default_language_hint.yaml index a609b8f3038a..ce6a182938ed 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_client_passed_default_language_hint.yaml @@ -16,22 +16,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - f8f669e0-411f-40df-a0a8-fe9c6d78b142 + - a1880740-b6b3-485a-9e17-b8b667224e75 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:24 GMT + - Wed, 06 Oct 2021 21:04:29 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5275' + - '324' status: code: 200 message: OK @@ -60,22 +60,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 929de9d0-dcab-4272-bb98-5a01dbbb3976 + - c57d322b-6b89-44a7-a251-1f7a646c9488 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:24 GMT + - Wed, 06 Oct 2021 21:04:30 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -83,7 +83,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '55' + - '56' status: code: 200 message: OK @@ -104,22 +104,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 97e86d7d-2028-4580-a5aa-508f07d768ee + - 49c6a04d-825d-49dd-9ca4-29b6f6a761f5 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:24 GMT + - Wed, 06 Oct 2021 21:04:30 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -127,7 +127,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '105' + - '73' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_disable_service_logs.yaml index 178ea72ed92b..140f48936f59 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_disable_service_logs.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false&loggingOptOut=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false&loggingOptOut=true response: body: string: '{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 824778d0-0946-4f9a-a5c4-b42a4dd70496 + - b0cb2313-b38c-404c-8068-9ae59e4db80f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:05:25 GMT + - Wed, 06 Oct 2021 21:04:29 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '43' + - '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_no_result_attribute.yaml index 66f946a0a316..7dcbb15683a5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_no_result_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 1d620f02-6b29-48d9-af24-fd95f6e734d4 + - 9f58e025-a815-4bb9-9205-780cd7bef27c content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:31 GMT + - Wed, 06 Oct 2021 21:04:30 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5345' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_nonexistent_attribute.yaml index c0591a5aab44..406ffae0f64a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_attribute_error_nonexistent_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 5f443381-2cc3-46cd-a585-a4acbf3ace01 + - 6687427f-6602-42b0-ba1d-3f0bfbecb8c1 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:31 GMT + - Wed, 06 Oct 2021 21:04:30 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_errors.yaml index 54de6d15dd97..674023827246 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_errors.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -33,11 +33,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ad4cfd10-3c67-45d9-ab83-88bb8a693535 + - 031c1284-7cef-48bf-ad55-f69a0ac469ce content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:32 GMT + - Wed, 06 Oct 2021 21:04:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '14' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_duplicate_ids_error.yaml index bc2c4c9da990..4c9e06b0893a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_duplicate_ids_error.yaml @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 37918354-1674-428b-9946-c929897a49ab + - 1615814e-b0f5-4b9e-abea-976a289a1952 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:33 GMT + - Wed, 06 Oct 2021 21:04:30 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10' + - '7' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_empty_credential_class.yaml index 8fce73fd44b2..3baaa1283c41 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_empty_credential_class.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 4a155d62-5d76-43c7-9362-085dbb768bdf + - fb46d679-c0c9-4f73-b011-835a9eb40aeb content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:05:33 GMT + - Wed, 06 Oct 2021 21:04:31 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_all_errors.yaml index 22ec852d068c..a56111a78978 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_all_errors.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -28,11 +28,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 5bff1ec4-a259-42c6-937d-1beaeaa9cbf4 + - 979fa878-0bf7-4d8a-8831-e4885ef15f42 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:33 GMT + - Wed, 06 Oct 2021 21:04:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_some_errors.yaml index 43c6fe87a3d8..745ae444505a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_input_with_some_errors.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"2","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 37ff03af-3e89-4136-a7f8-10737c8b0c3a + - b18c6829-e874-4dd5-8aaa-08831caec715 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:05:34 GMT + - Wed, 06 Oct 2021 21:04:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '233' + - '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_docs.yaml index f164a7b57681..0985a84cf59c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_docs.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - e7e37f7f-7df6-4217-8dd8-983c59cb2f89 + - 4a5e545f-0439-403a-80ea-25dd80239e34 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:35 GMT + - Wed, 06 Oct 2021 21:04:32 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_method.yaml index 007f9265e9ba..93a9ebffbd56 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_invalid_language_hint_method.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - e3c88013-acb3-4c31-a00e-148978453f9a + - c699b5be-2e05-4b47-9810-3fe299a3b023 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:35 GMT + - Wed, 06 Oct 2021 21:04:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_language_kwarg_spanish.yaml index 94085cf29511..6b17d3f88cb7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_language_kwarg_spanish.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","keyPhrases":["Bill Gates","CEO","Microsoft"],"statistics":{"charactersCount":35,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - c456bf24-44b4-406f-b944-0fbe280911c0 + - a090b05d-0422-470d-9bb9-13c9d2e70194 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:05:36 GMT + - Wed, 06 Oct 2021 21:04:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '31' + - '110' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_out_of_order_ids.yaml index 7ea626c01e61..5f3856b69a9b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_out_of_order_ids.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 62758b98-e374-454e-85f8-b3e05fa43a52 + - 582d85e0-ba4f-48b0-9a9e-2bf511315317 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 21:05:37 GMT + - Wed, 06 Oct 2021 21:04:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '97' + - '144' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_output_same_order_as_input.yaml index 687f8a4fa8e2..ae03bdceb6c0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_output_same_order_as_input.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":[],"warnings":[]},{"id":"2","keyPhrases":[],"warnings":[]},{"id":"3","keyPhrases":[],"warnings":[]},{"id":"4","keyPhrases":[],"warnings":[]},{"id":"5","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - a2d42dfb-06d5-4040-af1d-745e99f991ba + - 159a1e5f-029c-48f0-accb-3e639003d4ec content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 date: - - Mon, 02 Aug 2021 21:05:38 GMT + - Wed, 06 Oct 2021 21:04:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '36' + - '48' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_pass_cls.yaml index 836cc6fe1f55..621766c0aaac 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_pass_cls.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["Test","cls","endpoint"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - d900052e-592d-44b5-b615-4fa34cecf40b + - fc5ebe2b-a5f9-4fc9-ad81-e8e094eafcd8 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:05:38 GMT + - Wed, 06 Oct 2021 21:04:34 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '82' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_passing_only_string.yaml index fcc338e9328a..201fbb4e3d37 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_passing_only_string.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]},{"id":"1","keyPhrases":["Bill @@ -27,13 +27,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ec37f2f3-23bd-4269-8c2d-de32bddddbaf + - c8ad629f-5b04-4004-978b-f4717dd778ef content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 date: - - Mon, 02 Aug 2021 21:05:39 GMT + - Wed, 06 Oct 2021 21:04:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '51' + - '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_per_item_dont_use_language_hint.yaml index 2d726a19ad0e..89a8b8be6aba 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_per_item_dont_use_language_hint.yaml @@ -16,22 +16,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - a6f5a53a-2828-468a-88d4-b386886f61f4 + - a32160a2-55bc-42ad-bafe-8202525d8269 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:39 GMT + - Wed, 06 Oct 2021 21:04:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '38' + - '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_rotate_subscription_key.yaml index 41d48f97eed1..d4d845b3b235 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_rotate_subscription_key.yaml @@ -16,22 +16,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - fadbc289-be4d-4819-9cc9-2cb9f1e224a2 + - 387fd780-aaf6-4c25-b17d-1723f4ff8112 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:40 GMT + - Wed, 06 Oct 2021 21:04:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '33' + - '10' status: code: 200 message: OK @@ -60,9 +60,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -70,13 +70,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 9cd05957-ca31-4c0a-b958-02e62b2a3042 + - 0a0a17e2-44dd-4758-814e-2751ae561b70 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:05:40 GMT + - Wed, 06 Oct 2021 21:04:36 GMT status: code: 401 message: PermissionDenied @@ -97,22 +97,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ad0e552c-cefa-429c-8ae7-e5fbe9958a12 + - 665e0d95-c0ae-445a-9ae0-be65b8fdd1c7 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:40 GMT + - Wed, 06 Oct 2021 21:04:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -120,7 +120,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '48' + - '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_show_stats_and_model_version.yaml index ec43dc577c9a..9869f8984252 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_show_stats_and_model_version.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 65d75a87-c79b-4f84-9ce3-747b05024f72 + - e6660020-f76b-40bd-bd23-997b8ee5b011 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 21:05:41 GMT + - Wed, 06 Oct 2021 21:04:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '22' + - '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_string_index_type_not_fail_v3.yaml index 2b4929f1681b..eca633b41d91 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_string_index_type_not_fail_v3.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/keyPhrases?showStats=false response: @@ -21,13 +21,13 @@ interactions: string: '{"documents":[{"id":"0","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 25c34be9-197e-41c8-b186-db26b7cd1440 + - 7470b865-a897-4fa3-8eaf-e3233524b15f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:05:41 GMT + - Wed, 06 Oct 2021 21:04:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '32' + - '71' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_too_many_documents.yaml index e94d03a500a2..7fc8b6b343b3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_too_many_documents.yaml @@ -19,20 +19,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: apim-request-id: - - 0decb6ba-e1ad-4005-a2ab-2b971f49cbe6 + - bb25bf13-b818-4fc4-9253-8e4d5c4f4d89 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:05:41 GMT + - Wed, 06 Oct 2021 21:04:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_user_agent.yaml index 7c3c5f5693c7..5c5d18e28156 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_user_agent.yaml @@ -16,22 +16,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - f2628a2e-fca9-4d05-87c4-0fcc5ea08923 + - 8cfe4da3-fe21-4e97-b05d-c95ead481651 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:42 GMT + - Wed, 06 Oct 2021 21:04:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '50' + - '12' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_dont_use_language_hint.yaml index 5f916fe19a36..e9115fea4a14 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_dont_use_language_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["best day","life"],"warnings":[]},{"id":"1","keyPhrases":["hotel"],"warnings":[]},{"id":"2","keyPhrases":["restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - f2a0d599-339f-4bf3-beb2-22924669ffe4 + - 21392ba9-ddb1-4c45-b360-322117434a37 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:42 GMT + - Wed, 06 Oct 2021 21:04:38 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '31' + - '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint.yaml index 2ade963d8d1b..4274d6390e41 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["best day","life"],"warnings":[]},{"id":"1","keyPhrases":["hotel"],"warnings":[]},{"id":"2","keyPhrases":["restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 7f2fbd14-1ee4-480c-b1b4-a97703bc44cd + - 517380a0-e889-492c-8e10-ea4fbfe6e872 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:44 GMT + - Wed, 06 Oct 2021 21:04:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '46' + - '13' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 156a26d15574..0575a65ba8dd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -16,22 +16,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - b6bbe47e-0244-4ed5-b726-e212542f4818 + - 2f73291f-13d7-4546-adf1-0a98c1d9d0ac content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:44 GMT + - Wed, 06 Oct 2021 21:04:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -39,7 +39,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '46' + - '13' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_input.yaml index 078b3093d216..1c9786ed5d83 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_input.yaml @@ -16,24 +16,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: "{\"documents\":[{\"id\":\"1\",\"keyPhrases\":[\"cat\",\"veterinarian\"\ ],\"warnings\":[]},{\"id\":\"4\",\"keyPhrases\":[\"Espa\xF1ol\",\"document\"\ - ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"\u305B\"],\"warnings\"\ - :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"\u306F\u5E78\u305B\"],\"\ + warnings\":[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" headers: apim-request-id: - - f729cee9-daf6-4867-85bb-da784dfa7bd8 + - ed93f859-953f-4484-949d-08ee666b9db2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:45 GMT + - Wed, 06 Oct 2021 21:04:39 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '36' + - '13' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 02a95f4ec7c8..0d38ea859ee4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -16,24 +16,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: "{\"documents\":[{\"id\":\"1\",\"keyPhrases\":[\"cat\",\"veterinarian\"\ ],\"warnings\":[]},{\"id\":\"2\",\"keyPhrases\":[\"Espa\xF1ol\",\"document\"\ - ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"\u305B\"],\"warnings\"\ - :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"\u306F\u5E78\u305B\"],\"\ + warnings\":[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" headers: apim-request-id: - - 6eec1d6b-6743-4343-9eb7-630a2f0a58ed + - 72d7708c-7167-434e-bfac-1fdd8b9d8983 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:05:45 GMT + - Wed, 06 Oct 2021 21:04:38 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '42' + - '148' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_dict.yaml index fab18284cac5..d00b1fb468bc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_dict.yaml @@ -11,25 +11,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=true response: body: string: '{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":50,"transactionsCount":1},"warnings":[]},{"id":"2","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"statistics":{"charactersCount":49,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: b15bf1ce-a0b1-4419-8edb-b1058187b230 + apim-request-id: 4c4235e9-a398-4978-b3eb-45ece4ede89b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 - date: Mon, 02 Aug 2021 21:05:54 GMT + date: Wed, 06 Oct 2021 21:04:39 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '40' + x-envoy-upstream-service-time: '175' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=true + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=true version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_text_document_input.yaml index f0e226b177ce..a6bfe8c83308 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_all_successful_passing_text_document_input.yaml @@ -11,24 +11,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]},{"id":"2","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 41565c69-c804-44ee-954d-a04279251a85 + apim-request-id: aaec8719-936c-4add-a164-5d444559b076 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 - date: Mon, 02 Aug 2021 21:05:55 GMT + date: Wed, 06 Oct 2021 21:04:39 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '40' + x-envoy-upstream-service-time: '181' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_credentials.yaml index ea4b8630590a..3534b8313950 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_credentials.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: c9ba1da3-c9bf-4981-a7b3-66d73685594f + apim-request-id: 1ed56f7a-061e-4e65-8b5a-224274f25be4 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:05:55 GMT + date: Wed, 06 Oct 2021 21:04:39 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_model_version_error.yaml index 701ddce3cc85..aaef929391b3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_bad_model_version_error.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?model-version=bad&showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?model-version=bad&showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid model version. Possible values are: latest,2019-10-01,2020-07-01,2021-06-01. For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: - apim-request-id: 0d25bd98-5ae5-4011-97d9-1fbf3580d658 + apim-request-id: 1f9c0416-93f1-461f-8c40-35b875b7358e content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:05:56 GMT + date: Wed, 06 Oct 2021 21:04:40 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '11' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?model-version=bad&showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?model-version=bad&showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit.yaml index 8e87b3864a65..7650f419fd01 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit.yaml @@ -754,23 +754,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 2b6f7e7f-7c8c-4a09-ad94-96db309faa9f + apim-request-id: 3651b60b-912c-48a4-a569-260352413350 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:05:57 GMT + date: Wed, 06 Oct 2021 21:04:40 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '14' + x-envoy-upstream-service-time: '13' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit_error.yaml index 3526ec1a4693..3b634eb9f6fb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_batch_size_over_limit_error.yaml @@ -719,23 +719,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 8de1f409-2b70-4c9f-a550-af3a8d33529e + apim-request-id: 4e91c4f4-9dd3-40c0-adb7-85bd7a45f3c5 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:05:58 GMT + date: Wed, 06 Oct 2021 21:04:40 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '12' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_client_passed_default_language_hint.yaml index 0dd60032c895..a8808165144a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_client_passed_default_language_hint.yaml @@ -12,26 +12,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 71fe5aa6-1cc5-4683-8d59-dad08b35b995 + apim-request-id: e858d960-9c07-4e73-a8b6-949da67661a5 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:05:59 GMT + date: Wed, 06 Oct 2021 21:04:41 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '39' + x-envoy-upstream-service-time: '307' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -45,26 +45,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 4448b2fc-eb67-4c75-b56a-7cdf798736a2 + apim-request-id: fa02079d-af27-4a49-8307-61255055119e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:05:59 GMT + date: Wed, 06 Oct 2021 21:04:41 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '35' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -78,24 +78,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: f18983ee-ad1b-4b83-a9fe-0de1bc66e69a + apim-request-id: 3efe6f81-d223-453e-9cfe-3bf925752df7 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:05:59 GMT + date: Wed, 06 Oct 2021 21:04:41 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '39' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_disable_service_logs.yaml index 11616642df3f..bae251e19004 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_disable_service_logs.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false&loggingOptOut=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false&loggingOptOut=true response: body: string: '{"documents":[{"id":"0","keyPhrases":["Test","logging"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 5a3b4489-a2fd-41b6-8c4b-083404a2237b + apim-request-id: 185fc880-3bf0-4460-8c88-00f4fdad8a80 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:05:59 GMT + date: Wed, 06 Oct 2021 21:04:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '31' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false&loggingOptOut=true + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false&loggingOptOut=true version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_no_result_attribute.yaml index 09823e14e671..f2a5e2ed3edd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_no_result_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 68c904c0-016a-44f8-a191-d0046dff71a2 + apim-request-id: 645bd0ca-f0a0-4b64-b043-dd0c5eb8ac44 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:06:00 GMT + date: Wed, 06 Oct 2021 21:04:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_nonexistent_attribute.yaml index 8d0e2df8e7af..43ba94a234ef 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 754b74d5-5756-49dc-b575-e69d939f4c4c + apim-request-id: 7f0a5de4-924f-498e-a863-fcc4e8103b51 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:06:00 GMT + date: Wed, 06 Oct 2021 21:04:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_errors.yaml index 136b9a6269b6..585603f58c57 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_errors.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -28,15 +28,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 7f3776c4-afc1-4136-a307-2faed8bb1e0b + apim-request-id: d24a0cd3-f52b-4f75-a133-c3e955ce0142 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:06:01 GMT + date: Wed, 06 Oct 2021 21:04:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_duplicate_ids_error.yaml index ce21cacd8c1a..a58353f54caa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_duplicate_ids_error.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: 79e034cf-4275-4795-b267-9eee5dc44705 + apim-request-id: d48fbc4f-ecc5-4f11-a444-99df0cf46fdc content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:06:01 GMT + date: Wed, 06 Oct 2021 21:04:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '5' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_empty_credential_class.yaml index 14b89525f3fc..1d1a3b4deaf5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_empty_credential_class.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 52ebee45-b521-49d8-bd6e-fb064fa3c0b6 + apim-request-id: 04e144ed-5f16-48e6-b23d-9fb5042b7f82 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:06:01 GMT + date: Wed, 06 Oct 2021 21:04:43 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_all_errors.yaml index 8c7d16be4f45..1392c9d95354 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_all_errors.yaml @@ -11,9 +11,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,15 +23,15 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: c097f4b7-7bc9-43a0-a16e-7e5b4e936a17 + apim-request-id: 1ed1cf82-5c05-42a6-ba41-93cc89e7d4c0 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:06:02 GMT + date: Wed, 06 Oct 2021 21:04:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_some_errors.yaml index 0940678b829d..ce8f487e8412 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_input_with_some_errors.yaml @@ -11,9 +11,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"2","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]}],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -21,16 +21,16 @@ interactions: language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr,zh-Hans. For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: ef49991d-86ea-4bad-8e19-f2d5d32f402a + apim-request-id: 93e9e06f-98a0-4d43-b334-9e56a015ddc0 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:06:02 GMT + date: Wed, 06 Oct 2021 21:04:43 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '34' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_docs.yaml index f6759e51fa26..4c28a2aacf9b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_docs.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -20,15 +20,15 @@ interactions: language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr,zh-Hans. For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 7e5068c9-871e-43b1-99f5-dbd64cb2a8d9 + apim-request-id: 0c036589-d639-49e3-89fb-92a6a40cbbb5 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:06:03 GMT + date: Wed, 06 Oct 2021 21:04:43 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_method.yaml index 62c644802619..a5040e8986b9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_invalid_language_hint_method.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -20,15 +20,15 @@ interactions: language code. Supported languages: af,bg,ca,da,de,el,en,es,et,fi,fr,hr,hu,id,it,ja,ko,lv,nl,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sv,tr,zh-Hans. For additional details see https://aka.ms/text-analytics/language-support?tabs=key-phrase-extraction"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: e4c19e3f-3431-4773-bca9-0f1edb87688d + apim-request-id: a8ed0e8a-c7d6-40e6-9c5a-907693cebc5c content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:06:03 GMT + date: Wed, 06 Oct 2021 21:04:43 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_language_kwarg_spanish.yaml index 5ff129c1fda3..d13ab7690e07 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_language_kwarg_spanish.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","keyPhrases":["Bill Gates","CEO","Microsoft"],"statistics":{"charactersCount":35,"transactionsCount":1},"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 7b9a5fc1-1ebb-4390-91a0-4c42bb406cd7 + apim-request-id: 94becafd-dfbb-4f0e-8f43-a6070e0c7afa content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:06:04 GMT + date: Wed, 06 Oct 2021 21:04:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '31' + x-envoy-upstream-service-time: '20' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?model-version=latest&showStats=true + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?model-version=latest&showStats=true version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_out_of_order_ids.yaml index b38417b4c551..4da7e2aea05d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_out_of_order_ids.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"56","keyPhrases":[],"warnings":[]},{"id":"0","keyPhrases":[],"warnings":[]},{"id":"19","keyPhrases":[],"warnings":[]},{"id":"1","keyPhrases":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 393c7e6d-820f-41bf-abc3-d4bd68d84c95 + apim-request-id: 727e5d7b-1c99-4bae-859b-925746b7b359 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 21:06:04 GMT + date: Wed, 06 Oct 2021 21:04:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '24' + x-envoy-upstream-service-time: '50' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_output_same_order_as_input.yaml index 15014548b600..c6fcd56df94f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_output_same_order_as_input.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":[],"warnings":[]},{"id":"2","keyPhrases":[],"warnings":[]},{"id":"3","keyPhrases":[],"warnings":[]},{"id":"4","keyPhrases":[],"warnings":[]},{"id":"5","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 5b3a70e7-1ac5-4b4b-ad9b-985d12a0ab36 + apim-request-id: 503a7e57-66e1-4b00-9ab8-030f740382eb content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 - date: Mon, 02 Aug 2021 21:06:04 GMT + date: Wed, 06 Oct 2021 21:04:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '27' + x-envoy-upstream-service-time: '47' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_pass_cls.yaml index 485a9b4022de..48a4538fbcfd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_pass_cls.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["Test","cls","endpoint"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 007a5fcf-30f2-402b-b74c-2beceb6dcbe6 + apim-request-id: 00c3278a-2f84-4cc0-825b-5cceed47cf5b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:06:05 GMT + date: Wed, 06 Oct 2021 21:04:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_passing_only_string.yaml index 83a320617e84..a80b94d6684d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_passing_only_string.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["Bill Gates","Paul Allen","Microsoft"],"warnings":[]},{"id":"1","keyPhrases":["Bill @@ -22,16 +22,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 5c5b4fd8-dd6b-4c8d-9e96-0691aa12d38a + apim-request-id: f8ce980a-86f7-40e7-a877-6cd950d1f11f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 - date: Mon, 02 Aug 2021 21:06:06 GMT + date: Wed, 06 Oct 2021 21:04:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '26' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_per_item_dont_use_language_hint.yaml index f6ac801b1462..1f74f297ff22 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_per_item_dont_use_language_hint.yaml @@ -12,24 +12,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 4e4bb973-10f5-484e-a486-8943b9b9226e + apim-request-id: 63ba05aa-fef3-46de-a7ca-740d7236e8c0 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:06:05 GMT + date: Wed, 06 Oct 2021 21:04:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '33' + x-envoy-upstream-service-time: '13' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_rotate_subscription_key.yaml index 5fb87fed0eab..a175c09971dd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_rotate_subscription_key.yaml @@ -12,26 +12,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: b9c8153e-37ef-4804-b03b-361dc76ae322 + apim-request-id: f54f848f-3a06-4c2b-85d7-a1596ffd4109 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:06:06 GMT + date: Wed, 06 Oct 2021 21:04:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '35' + x-envoy-upstream-service-time: '12' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -45,23 +45,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: e8ac84df-1c9e-4398-9d82-dbbe6bd26de4 + apim-request-id: 2caddd03-5452-49ff-adfd-ab8f2dd9222f content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:06:07 GMT + date: Wed, 06 Oct 2021 21:04:45 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -75,24 +75,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 1d347265-fb1a-46a8-a9bf-4b88e8a17b30 + apim-request-id: ce37d17a-16cf-4c23-9ebc-b4cb254c2454 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:06:07 GMT + date: Wed, 06 Oct 2021 21:04:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '36' + x-envoy-upstream-service-time: '12' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_show_stats_and_model_version.yaml index d8b39ead954c..6fb8456b7f3b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_show_stats_and_model_version.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?model-version=latest&showStats=true + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?model-version=latest&showStats=true response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"0","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"19","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]},{"id":"1","keyPhrases":[],"statistics":{"charactersCount":2,"transactionsCount":1},"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 8e4a95ca-d195-4fd9-bc90-b50de695f37e + apim-request-id: 64624a19-211e-4148-83d4-c7f67dc26796 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 21:06:07 GMT + date: Wed, 06 Oct 2021 21:04:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '26' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?model-version=latest&showStats=true + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?model-version=latest&showStats=true version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_string_index_type_not_fail_v3.yaml index 80be0c5f6027..624b2fe97013 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_string_index_type_not_fail_v3.yaml @@ -9,23 +9,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 3347cdbf-5cdf-41f1-bc4c-06984e8064df + apim-request-id: aa492b58-7586-4fe5-8f1f-a07ac83b6bff content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:06:08 GMT + date: Wed, 06 Oct 2021 21:04:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '35' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.0/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.0/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_too_many_documents.yaml index 005d84503a75..8c6481cbceab 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_too_many_documents.yaml @@ -15,23 +15,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 10 records are permitted."}}}' headers: - apim-request-id: 968951a6-be13-488f-bb1b-0fbdfd5fd27c + apim-request-id: 695c8bfd-fc19-438e-9e4b-807fb98e1c63 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:06:07 GMT + date: Wed, 06 Oct 2021 21:04:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_user_agent.yaml index 370f2beeb294..eccd70f6c14c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_user_agent.yaml @@ -12,24 +12,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 8f2bbd92-0420-407a-8401-0a8b4d0124b1 + apim-request-id: 90fe610e-a904-49f8-a304-c774f81d2dbe content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:06:08 GMT + date: Wed, 06 Oct 2021 21:04:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '24' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_dont_use_language_hint.yaml index cd3a8b7378a6..f5007438956e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_dont_use_language_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["best day","life"],"warnings":[]},{"id":"1","keyPhrases":["hotel"],"warnings":[]},{"id":"2","keyPhrases":["restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 56dd2014-6df6-467c-bb96-f1e42e8fa26e + apim-request-id: 2ca4ba7b-25eb-495c-8bff-e3816794a4eb content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:06:09 GMT + date: Wed, 06 Oct 2021 21:04:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '37' + x-envoy-upstream-service-time: '13' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint.yaml index 0b83c198fdeb..cdd1052e0780 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"0","keyPhrases":["best day","life"],"warnings":[]},{"id":"1","keyPhrases":["hotel"],"warnings":[]},{"id":"2","keyPhrases":["restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 96c5e15d-d0f7-49e0-81c8-03f329bc902f + apim-request-id: 455ca9ba-04d1-4fc0-8e4c-52df855b94bb content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:06:09 GMT + date: Wed, 06 Oct 2021 21:04:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '37' + x-envoy-upstream-service-time: '13' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 1afb3daf263e..622d6f73b9cf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -12,24 +12,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: '{"documents":[{"id":"1","keyPhrases":["park"],"warnings":[]},{"id":"2","keyPhrases":["hotel"],"warnings":[]},{"id":"3","keyPhrases":["good food","restaurant"],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 73103e3a-da25-4c60-8322-aaceb9dd65c7 + apim-request-id: e428928c-9aa0-407b-b4bc-fa59e01cedcf content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:06:09 GMT + date: Wed, 06 Oct 2021 21:04:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '36' + x-envoy-upstream-service-time: '12' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_input.yaml index 17b4db2a420a..198b383a894f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -12,26 +12,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: "{\"documents\":[{\"id\":\"1\",\"keyPhrases\":[\"cat\",\"veterinarian\"\ ],\"warnings\":[]},{\"id\":\"4\",\"keyPhrases\":[\"Espa\xF1ol\",\"document\"\ - ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"\u305B\"],\"warnings\"\ - :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"\u306F\u5E78\u305B\"],\"\ + warnings\":[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" headers: - apim-request-id: bb9824fb-204a-4631-8f3f-2dd510eb5646 + apim-request-id: 29698525-b045-4809-a0b8-a5f855265c5a content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:06:10 GMT + date: Wed, 06 Oct 2021 21:04:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '33' + x-envoy-upstream-service-time: '12' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index e6ec3d550551..58a8dcb070aa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -12,26 +12,26 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/keyPhrases?showStats=false + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/keyPhrases?showStats=false response: body: string: "{\"documents\":[{\"id\":\"1\",\"keyPhrases\":[\"cat\",\"veterinarian\"\ ],\"warnings\":[]},{\"id\":\"2\",\"keyPhrases\":[\"Espa\xF1ol\",\"document\"\ - ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"\u305B\"],\"warnings\"\ - :[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" + ],\"warnings\":[]},{\"id\":\"3\",\"keyPhrases\":[\"\u306F\u5E78\u305B\"],\"\ + warnings\":[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" headers: - apim-request-id: 3ac23e9d-87a7-4bd8-a9f6-d578a4aa6d46 + apim-request-id: 52799a62-d39b-4b11-adba-234641e24c2c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:06:11 GMT + date: Wed, 06 Oct 2021 21:04:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '29' + x-envoy-upstream-service-time: '12' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/keyPhrases?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/keyPhrases?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_dict.yaml index 1201d252abe5..48135cd2b113 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_dict.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=2020-02-01&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":68,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -30,13 +30,13 @@ interactions: April 1975","category":"DateTime","subcategory":"Date","offset":19,"length":13,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - 8aed0b0d-1dab-43a6-8439-608fa7ef2888 + - cb863621-2722-45ae-b703-3d0580118874 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:11:48 GMT + - Wed, 06 Oct 2021 21:04:48 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5823' + - '205' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_text_document_input.yaml index 6c6d02e0a245..529d5dc11a77 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_all_successful_passing_text_document_input.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=2020-02-01&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -30,13 +30,13 @@ interactions: April 1975","category":"DateTime","subcategory":"Date","offset":19,"length":13,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: apim-request-id: - - fb5166f9-cf29-4f6b-b267-ab8e386c1220 + - 75fafb86-b2c4-424e-b4f3-b8891dc13adc content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:11:54 GMT + - Wed, 06 Oct 2021 21:04:48 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5257' + - '102' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_credentials.yaml index 2d581e3731e3..579634493f01 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_credentials.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - f7a6b445-a595-423a-9c4c-f46cec75acdd + - 3ec231e4-e860-4d14-a5f8-f1696537bc27 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:11:55 GMT + - Wed, 06 Oct 2021 21:04:48 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_model_version_error.yaml index bc6052f877f4..5e6cad367dd8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_bad_model_version_error.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid @@ -24,11 +24,11 @@ interactions: For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: apim-request-id: - - bc09a392-ad09-4166-b6b4-9d673af93669 + - e0dcef04-f0f1-4250-ad18-7e5d9c1f7f89 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:01 GMT + - Wed, 06 Oct 2021 21:04:48 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5446' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit.yaml index 88762bdffdfb..5df6337421d1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit.yaml @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 6375b842-e71e-4b70-b813-e03745e5f276 + - 7e2c7579-ea89-4185-b6d2-612cd54d8d4b content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:02 GMT + - Wed, 06 Oct 2021 21:04:49 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '15' + - '9' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit_error.yaml index 7a2a4bbbe185..88fc56689ce1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_batch_size_over_limit_error.yaml @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 03345101-7baa-4045-aa17-a31210f375b3 + - ae533611-7a64-4382-84c5-5209f23af431 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:08 GMT + - Wed, 06 Oct 2021 21:04:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5574' + - '8' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_client_passed_default_language_hint.yaml index ec42ea124906..85f5beebb9c9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_client_passed_default_language_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - f5085fdb-2dab-4172-96a2-18f97ff6cd3a + - 242df0bf-21d5-4199-8752-8a0bb10da1df content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:09 GMT + - Wed, 06 Oct 2021 21:04:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '188' + - '29' status: code: 200 message: OK @@ -59,21 +59,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 765f8afc-adbe-468a-b1dc-d0f2747221d7 + - cfa7e659-8dcd-4d93-aae3-bc642bbf0eed content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:09 GMT + - Wed, 06 Oct 2021 21:04:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -81,7 +81,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '177' + - '26' status: code: 200 message: OK @@ -102,21 +102,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - b1a28679-eaf9-4beb-a4e0-077a2fd43590 + - 634124a1-b9c8-434d-b458-66b7c148dd35 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:15 GMT + - Wed, 06 Oct 2021 21:04:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -124,7 +124,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5435' + - '24' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml index bf0d83141037..08461c1ce01c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -13,21 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ec5d33d5-0e8b-4443-b5ac-fc4026abe4fb + - 63f4b61b-60d0-48a8-b14e-90b839738a35 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:20 GMT + - Wed, 06 Oct 2021 21:04:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5138' + - '19' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_disable_service_logs.yaml index c0b3045776f9..8be4d75b1f0e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_disable_service_logs.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 2ccf9a25-c0d2-49f2-8417-cddc5c465765 + - 2f78fb84-6ab5-49a8-bd55-210ec81a9bac content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:21 GMT + - Wed, 06 Oct 2021 21:04:50 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '82' + - '20' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_no_result_attribute.yaml index 2337d728df5e..84747173d193 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_no_result_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - d320d8cb-547f-43f5-abab-4922bbad3fb3 + - dd435f86-7382-4495-bbe7-dd330ff3df7e content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:21 GMT + - Wed, 06 Oct 2021 21:04:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_nonexistent_attribute.yaml index 55abb6d6844f..94a2d366b337 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_attribute_error_nonexistent_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 757f9e18-0f2c-4bb9-9f66-9f218bdc1ce8 + - 1d8cfb04-2865-4af1-832a-0e84b4bddbcf content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:22 GMT + - Wed, 06 Oct 2021 21:04:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_errors.yaml index fe9077031442..026280e41a0d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_errors.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -33,11 +33,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 40575ae9-4a3e-4037-b830-2ded6a5a5112 + - ed659c89-3767-4235-a3e0-114efe29dc78 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:23 GMT + - Wed, 06 Oct 2021 21:04:51 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_warnings.yaml index 66a2efd56e53..c0a2a5310fe3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_document_warnings.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - f7831442-f3ac-446b-99a7-1c361e8a1c58 + - bf3a6997-7de9-43f9-af96-724d0b4070e6 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:23 GMT + - Wed, 06 Oct 2021 21:04:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '147' + - '27' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_duplicate_ids_error.yaml index 4c6868e1e692..bc61b03bc9d6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_duplicate_ids_error.yaml @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 3fe07d26-755a-467a-9542-4a3602a3d851 + - 4b27dbe8-c5fc-4115-b4ec-aa9f1dd51fab content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:24 GMT + - Wed, 06 Oct 2021 21:04:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '10' + - '6' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_empty_credential_class.yaml index 1fb7d09239f1..e9f5a8ae7080 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_empty_credential_class.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 67bbee20-f517-4af4-ad2b-ea29db5a2052 + - 93d8106b-ee06-4bad-a3e9-a715651869e3 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:12:24 GMT + - Wed, 06 Oct 2021 21:04:52 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_explicit_set_string_index_type.yaml index 119670a26d33..5b46e36f75a3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_explicit_set_string_index_type.yaml @@ -13,21 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=TextElements_v8 response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 64281867-e0a7-42c6-bc91-87964a9d09c6 + - 441d5c9a-2ea4-4d96-aece-78b6acdb7ca3 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:25 GMT + - Wed, 06 Oct 2021 21:04:52 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '41' + - '20' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_all_errors.yaml index 3e85e8d75541..49449c5e85e4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_all_errors.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -29,11 +29,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 089f820f-fb0c-465e-90e1-831d725cbf63 + - b854fdca-f92a-4bf0-b84f-b4bdd04b8576 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:26 GMT + - Wed, 06 Oct 2021 21:04:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_some_errors.yaml index f00508cfe95e..371d86fc0261 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_input_with_some_errors.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -31,13 +31,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ce4fc16d-482c-487b-91a7-044c2333343b + - 0ab57be3-916e-4fe1-81c8-170e0b812d86 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:26 GMT + - Wed, 06 Oct 2021 21:04:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '152' + - '32' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_docs.yaml index 4fbb12c6508b..26edca820ebc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_docs.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 85f7bd5b-9b06-4c6b-8ea9-7b5762da8b15 + - 21cad490-61aa-41e5-926b-7d6d58a22b49 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:27 GMT + - Wed, 06 Oct 2021 21:04:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_method.yaml index 5db6fdca53c4..c53ff49a6a0f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_invalid_language_hint_method.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 1d0bdde2-3ad8-47ad-a6a7-73c82c6f1e2b + - 25b966d9-dd8e-47f0-a16b-c68d7b9fb379 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:27 GMT + - Wed, 06 Oct 2021 21:04:53 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_language_kwarg_spanish.yaml index ef4018caedf9..0aebe8b70eee 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_language_kwarg_spanish.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill Gates","category":"Person","offset":0,"length":10,"confidenceScore":1.0},{"text":"CEO","category":"PersonType","offset":18,"length":3,"confidenceScore":0.97},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.99}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - eaf1df86-da54-43b1-9f16-9cbb3544c46f + - f6a04245-8b94-4dc9-a246-ff5d751678ed content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:27 GMT + - Wed, 06 Oct 2021 21:04:54 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '152' + - '23' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_no_offset_v3_categorized_entities.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_no_offset_v3_categorized_entities.yaml index b78bf41387d4..7b51426a29a6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_no_offset_v3_categorized_entities.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_no_offset_v3_categorized_entities.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/recognition/general?showStats=false response: @@ -24,13 +24,13 @@ interactions: Allen","category":"Person","offset":40,"length":10,"confidenceScore":1.0}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - f1b52be4-83e7-47a2-9aaa-bc97e62c2ae6 + - 95ffae98-bc4a-4ce3-9e4d-96b9b902b922 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:29 GMT + - Wed, 06 Oct 2021 21:04:54 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '155' + - '25' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_offset.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_offset.yaml index 3d786a9711ec..9c1214eb726f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_offset.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_offset.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -24,13 +24,13 @@ interactions: Allen","category":"Person","offset":40,"length":10,"confidenceScore":1.0}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 74b6be4a-ed01-437b-81a5-21b5f66844cb + - ef185a96-6f53-4d05-95e2-ef53d78832f8 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:29 GMT + - Wed, 06 Oct 2021 21:04:54 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '31' + - '23' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_out_of_order_ids.yaml index e0f708bbb8de..4f3c0b9d7713 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_out_of_order_ids.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - eb2d5d40-74b8-4781-a485-f46435b7f8f6 + - 87eabac0-4948-444b-b30f-40f32c05af48 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 21:12:30 GMT + - Wed, 06 Oct 2021 21:04:55 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '38' + - '22' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_output_same_order_as_input.yaml index 3e7b17391e5e..6f45f984d627 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_output_same_order_as_input.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"one","category":"Quantity","subcategory":"Number","offset":0,"length":3,"confidenceScore":0.8}],"warnings":[]},{"id":"2","entities":[{"text":"two","category":"Quantity","subcategory":"Number","offset":0,"length":3,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[{"text":"three","category":"Quantity","subcategory":"Number","offset":0,"length":5,"confidenceScore":0.8}],"warnings":[]},{"id":"4","entities":[{"text":"four","category":"Quantity","subcategory":"Number","offset":0,"length":4,"confidenceScore":0.8}],"warnings":[]},{"id":"5","entities":[{"text":"five","category":"Quantity","subcategory":"Number","offset":0,"length":4,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 18793f51-a723-46a4-8748-57bc15a4318a + - dfd0bb8b-37f3-4cf6-8070-29a9831782d8 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 date: - - Mon, 02 Aug 2021 21:12:31 GMT + - Wed, 06 Oct 2021 21:04:55 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '422' + - '163' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_pass_cls.yaml index ca616f6804d4..196f7e8f3284 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_pass_cls.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"Test","category":"Skill","offset":0,"length":4,"confidenceScore":0.97},{"text":"cls","category":"Skill","offset":13,"length":3,"confidenceScore":0.82}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 141d4a88-f4a5-4669-85b9-5fb8697df61d + - b9cef195-1633-4cee-b994-45d9f52c19ca content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:31 GMT + - Wed, 06 Oct 2021 21:04:55 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '40' + - '22' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_passing_only_string.yaml index dc8d88c49117..aa287e6a1de0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_passing_only_string.yaml @@ -18,9 +18,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -36,13 +36,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 9e9279c9-1031-4547-addb-30d0450c67f1 + - 7cc29da2-e2d1-4f75-b8f5-2cc749702109 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:31 GMT + - Wed, 06 Oct 2021 21:04:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -50,7 +50,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '202' + - '30' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_per_item_dont_use_language_hint.yaml index b1e094604ffc..0e0ed96bc024 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_per_item_dont_use_language_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 8c64fb4a-c27f-48d4-a71a-2da18c55449d + - 3b474254-c2a5-421c-8205-f51d16d8033c content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:33 GMT + - Wed, 06 Oct 2021 21:04:55 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '86' + - '26' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_rotate_subscription_key.yaml index 4389a66140ae..dcf1b76e8743 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_rotate_subscription_key.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 962f4dd3-27c0-49f4-81f0-92afe5407df2 + - fc70226e-5680-4b65-aee7-fa0d5cc764cd content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:33 GMT + - Wed, 06 Oct 2021 21:04:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '40' + - '26' status: code: 200 message: OK @@ -59,9 +59,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -69,13 +69,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 7a08a429-5ee9-45cb-bc4e-dadeeb912003 + - ef63706c-3505-4576-ab36-f5ce58a50ef2 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:12:33 GMT + - Wed, 06 Oct 2021 21:04:56 GMT status: code: 401 message: PermissionDenied @@ -96,21 +96,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - d07b7e4a-7914-4f50-8f49-b8a1a0523859 + - 5633d788-8419-4f25-b522-c2bf14092d01 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:33 GMT + - Wed, 06 Oct 2021 21:04:56 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -118,7 +118,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '144' + - '27' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_show_stats_and_model_version.yaml index d45213f84900..a6bc122df2da 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_show_stats_and_model_version.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - c6a91ac2-1bb4-4ef8-ae42-b0640024b701 + - bf115ea9-bf3a-4895-89a9-5f94293b2b43 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 21:12:34 GMT + - Wed, 06 Oct 2021 21:04:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '41' + - '25' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_string_index_type_not_fail_v3.yaml index f6f699f83b2e..adb0793e56d9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_string_index_type_not_fail_v3.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/recognition/general?showStats=false response: @@ -21,13 +21,13 @@ interactions: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 651e8edb-ec6b-4610-98ef-158cabd06faf + - b7d87fc5-cf22-491d-8be3-d378608cf272 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:12:35 GMT + - Wed, 06 Oct 2021 21:04:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '55' + - '30' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_too_many_documents.yaml index fd9cffac3969..ba33289a1117 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_too_many_documents.yaml @@ -16,20 +16,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 26071190-d20b-4ef0-bb92-cda5a57cdc2d + - b6326737-a31b-48d9-86ae-1dfc992e60e6 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:12:35 GMT + - Wed, 06 Oct 2021 21:04:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_user_agent.yaml index 117590225910..37b95d807a6a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_user_agent.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 01461986-8c1d-488d-a07b-169411766eac + - ae62b50d-23a2-4362-a0f1-6a17c045ca13 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:36 GMT + - Wed, 06 Oct 2021 21:04:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '51' + - '28' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_dont_use_language_hint.yaml index a8254722dc46..2c10911f4837 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_dont_use_language_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.96}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - f52cfaec-6546-48cb-b176-405ac3fc231b + - 9470f9e7-acbc-458a-ba54-657388981379 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:36 GMT + - Wed, 06 Oct 2021 21:04:57 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '58' + - '42' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint.yaml index b34066c11c89..ed3cf97c381e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"restaurant","category":"Location","offset":4,"length":10,"confidenceScore":0.96}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ed947fef-ed69-48f3-8b48-0281c9cdf5dc + - 48a7de23-26d3-419b-b9e7-5181602b841e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:37 GMT + - Wed, 06 Oct 2021 21:04:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '60' + - '24' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 2f8a146150bb..4b4a9f3464fd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 54c7b168-5a56-4eec-9319-ddcea7000796 + - 1e8f378e-a025-4da1-83d7-e31e75cc0a51 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:37 GMT + - Wed, 06 Oct 2021 21:04:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '49' + - '23' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_input.yaml index d6f3bceb9652..741dfe047017 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_input.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"text\":\"veterinarian\"\ @@ -29,13 +29,13 @@ interactions: :[],\"modelVersion\":\"2021-06-01\"}" headers: apim-request-id: - - 8cf52364-b45a-49ef-8eac-dcf5e2d12dbc + - e4c3dbf7-3599-45a0-9d55-96e0854fbc79 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:38 GMT + - Wed, 06 Oct 2021 21:04:58 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '56' + - '24' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index e0399fe64144..2b393635901b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"text\":\"veterinarian\"\ @@ -30,13 +30,13 @@ interactions: :[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" headers: apim-request-id: - - dd08cab0-6da2-4878-a316-d660a899b44a + - 305e172d-e8fc-44fa-a68e-95868c073db9 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:12:38 GMT + - Wed, 06 Oct 2021 21:04:59 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '333' + - '211' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_dict.yaml index b51978308711..8148a2489f1e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_dict.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=2020-02-01&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"id":"1","statistics":{"charactersCount":68,"transactionsCount":1},"entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -25,16 +25,16 @@ interactions: de abril de 1975","category":"DateTime","subcategory":"Date","offset":53,"length":18,"confidenceScore":0.8}],"warnings":[]},{"id":"3","statistics":{"charactersCount":73,"transactionsCount":1},"entities":[{"text":"4. April 1975","category":"DateTime","subcategory":"Date","offset":19,"length":13,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 42ac00c3-a2b1-47cd-8b89-36c781541e41 + apim-request-id: d0a8c45f-f79d-4966-b6b3-086a124a6a01 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:15:54 GMT + date: Wed, 06 Oct 2021 21:04:59 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '727' + x-envoy-upstream-service-time: '136' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?model-version=2020-02-01&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_text_document_input.yaml index 4f283e67ab36..546d46b5b4a8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_all_successful_passing_text_document_input.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=2020-02-01&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -25,16 +25,16 @@ interactions: de abril de 1975","category":"DateTime","subcategory":"Date","offset":53,"length":18,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[{"text":"4. April 1975","category":"DateTime","subcategory":"Date","offset":19,"length":13,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2020-02-01"}' headers: - apim-request-id: 2dba9360-7b65-4474-b95e-ad600fc34be1 + apim-request-id: da0c7559-766d-4f0b-bc61-c25f80e8f495 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:15:55 GMT + date: Wed, 06 Oct 2021 21:05:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '280' + x-envoy-upstream-service-time: '77' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?model-version=2020-02-01&showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?model-version=2020-02-01&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_credentials.yaml index 669aab5cccb1..15c2fb502bbe 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_credentials.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: c3b1a446-1ee8-4156-9a78-afa32a835ea6 + apim-request-id: cfa4753c-2b5d-4ffa-8579-9c2401dfea03 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:15:54 GMT + date: Wed, 06 Oct 2021 21:04:59 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_model_version_error.yaml index d93b2179a0bd..6be9c2d08ad9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_bad_model_version_error.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid model version. Possible values are: latest,2019-10-01,2020-02-01,2020-04-01,2021-01-15,2021-06-01. For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: - apim-request-id: cd747de8-b357-4d8d-80ce-3fb0d61d0ab0 + apim-request-id: e275d1ac-a353-4054-ae0e-437d0d8b512c content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:15:56 GMT + date: Wed, 06 Oct 2021 21:05:00 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '7' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit.yaml index a32da7dbec51..8db61414d7a1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit.yaml @@ -754,17 +754,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: 8d6b339d-60fa-4a13-addd-62a82239b1e3 + apim-request-id: 8bd64c34-9ab2-4925-8f0e-8cc8069343b8 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:15:57 GMT + date: Wed, 06 Oct 2021 21:05:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -772,5 +772,5 @@ interactions: status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit_error.yaml index 628594781ac0..b4256dcc9400 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_batch_size_over_limit_error.yaml @@ -719,23 +719,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: ace28cd9-90e9-4a5a-aedb-fed15290d4ee + apim-request-id: 58fe2576-3821-40d3-826d-a51eff8db186 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:15:57 GMT + date: Wed, 06 Oct 2021 21:05:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '10' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_client_passed_default_language_hint.yaml index 8e1784e1f55a..92db94dc65c8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_client_passed_default_language_hint.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: a0c85666-d873-4392-b276-f00e2f236d63 + apim-request-id: e687587e-4f93-48d4-a34e-0b61ae4042a9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:15:57 GMT + date: Wed, 06 Oct 2021 21:05:01 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '53' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -44,25 +44,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 92e6cbcb-53ea-4be0-ace8-65ad4efb32e5 + apim-request-id: e7ca641b-37c3-4b34-a7e9-ea74070fe310 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:15:57 GMT + date: Wed, 06 Oct 2021 21:05:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '65' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -76,23 +76,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: c0e577ea-2d52-410b-a827-71a715639ca6 + apim-request-id: ff5f110d-76e5-4e07-a167-1f10d67e39f9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:15:57 GMT + date: Wed, 06 Oct 2021 21:05:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '60' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml index 46541bf049e8..3e6b54c8e6cf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -9,23 +9,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 806fb681-6ee4-412e-8f27-b7feac41646c + apim-request-id: 55b8bbec-6e8a-42a6-a7b9-dd69ab93815d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:15:59 GMT + date: Wed, 06 Oct 2021 21:05:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '39' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_disable_service_logs.yaml index 1075f60527ec..ec507c474e36 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_disable_service_logs.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"logging","category":"Skill","offset":9,"length":7,"confidenceScore":0.61}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 06e31cfb-c5b0-4471-a3ff-499714c15b25 + apim-request-id: 8043fdac-7977-4827-8681-e633e29f33a9 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:15:59 GMT + date: Wed, 06 Oct 2021 21:05:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '35' + x-envoy-upstream-service-time: '21' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_no_result_attribute.yaml index d0c1b124a4fb..14cba4173c99 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_no_result_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 989f215a-314c-4113-af36-455929330686 + apim-request-id: 518563ea-e01e-4367-b1a1-57fe7f8671bf content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:16:00 GMT + date: Wed, 06 Oct 2021 21:05:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_nonexistent_attribute.yaml index c14ef47854b2..70790321dfd5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 5d4969b0-db2b-462d-b34f-3f7d24c5f191 + apim-request-id: 5772d67f-0299-40d6-8cfa-cfd41b45ce9b content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:16:00 GMT + date: Wed, 06 Oct 2021 21:05:02 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_errors.yaml index e831d751caae..f3adc1bd45c3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_errors.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -28,15 +28,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: b2c2b9c4-afb3-40fc-944a-c6a5ad116a61 + apim-request-id: c35851a6-c37d-430c-86a9-9b5c78e2ea6f content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:16:01 GMT + date: Wed, 06 Oct 2021 21:05:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '4' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_warnings.yaml index 299a833d5e82..303c459b1785 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_document_warnings.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 7db1163a-c11a-4283-b555-c311893a54fb + apim-request-id: cbb2bc02-dcef-434c-96e9-87f4c9b6da13 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:16:01 GMT + date: Wed, 06 Oct 2021 21:05:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '40' + x-envoy-upstream-service-time: '29' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_duplicate_ids_error.yaml index c96f3b4dbbee..170f7e807b47 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_duplicate_ids_error.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: bcf27c28-3ea4-4895-a640-269d9a128761 + apim-request-id: f18ab104-afd8-45ad-a84b-d8eeba76226e content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:16:02 GMT + date: Wed, 06 Oct 2021 21:05:03 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '10' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_empty_credential_class.yaml index 2be60e59e609..da44ad20dd30 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_empty_credential_class.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: b72dc605-c454-4178-a109-3d629aa622d8 + apim-request-id: 6e0e2636-cd87-421c-8d8c-fcaf20c0c870 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:16:02 GMT + date: Wed, 06 Oct 2021 21:05:04 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_explicit_set_string_index_type.yaml index cec0d3f28173..2ff682fe3ef6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_explicit_set_string_index_type.yaml @@ -9,23 +9,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=TextElements_v8 response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: e7daeee2-2ee3-446a-b54e-bd660ef16ba3 + apim-request-id: 9322fbf5-069e-4a3d-bd18-4b84e7103a40 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:16:02 GMT + date: Wed, 06 Oct 2021 21:05:04 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '35' + x-envoy-upstream-service-time: '22' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=TextElements_v8 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=TextElements_v8 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_all_errors.yaml index 54e4357dcbd6..36266d1b4789 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_all_errors.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -24,15 +24,15 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 6f021617-db3a-4699-a7e2-13fe86776e70 + apim-request-id: 14f20e5b-2c80-40e8-88f5-776538ac9a37 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:16:03 GMT + date: Wed, 06 Oct 2021 21:05:04 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_some_errors.yaml index f9a9803156da..2f8ce97f28e4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_input_with_some_errors.yaml @@ -11,9 +11,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -26,16 +26,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 197cd499-54fe-41d0-bfe2-80a2a78dd1a7 + apim-request-id: b85683bc-fceb-45ee-838f-841aafa52e37 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:16:04 GMT + date: Wed, 06 Oct 2021 21:05:04 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '80' + x-envoy-upstream-service-time: '27' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_docs.yaml index be4000ef3f35..94c8db8ebe4a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_docs.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -20,15 +20,15 @@ interactions: language code. Supported languages: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: ffefc417-a875-4bd9-823e-0b60d36a4793 + apim-request-id: e8d50259-b69c-446f-98be-5714346f36c8 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:16:04 GMT + date: Wed, 06 Oct 2021 21:05:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_method.yaml index 0decac738913..3d069dc3452b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_invalid_language_hint_method.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -20,15 +20,15 @@ interactions: language code. Supported languages: ar,cs,da,de,en,es,fi,fr,hu,it,ja,ko,nl,no,pl,pt-BR,pt-PT,ru,sv,tr,zh-Hans. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 561a266d-9078-4953-a4cb-907b71e99f2e + apim-request-id: c82ea7ff-1b1c-4657-a9c9-2e80c98b639b content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:16:04 GMT + date: Wed, 06 Oct 2021 21:05:04 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '7' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_language_kwarg_spanish.yaml index 1b3f83a0e84b..80cd15d69014 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_language_kwarg_spanish.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill Gates","category":"Person","offset":0,"length":10,"confidenceScore":1.0},{"text":"CEO","category":"PersonType","offset":18,"length":3,"confidenceScore":0.97},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.99}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 81c911d5-c1b2-465a-9c5e-00b41c034419 + apim-request-id: ff68ee6b-c61f-4e91-8a93-3f53ffcf2a3f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:16:05 GMT + date: Wed, 06 Oct 2021 21:05:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '57' + x-envoy-upstream-service-time: '28' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_no_offset_v3_categorized_entities.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_no_offset_v3_categorized_entities.yaml index 26cd8b496d8e..af7c350afb29 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_no_offset_v3_categorized_entities.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_no_offset_v3_categorized_entities.yaml @@ -10,7 +10,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/recognition/general?showStats=false response: @@ -19,16 +19,16 @@ interactions: Gates","category":"Person","offset":25,"length":10,"confidenceScore":1.0},{"text":"Paul Allen","category":"Person","offset":40,"length":10,"confidenceScore":1.0}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 7243e2ad-1d78-4fed-97ff-65dba0f126f8 + apim-request-id: ff49ae18-d855-4eeb-b7c9-1a9c08f4ce59 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:16:05 GMT + date: Wed, 06 Oct 2021 21:05:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '72' + x-envoy-upstream-service-time: '22' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.0/entities/recognition/general?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.0/entities/recognition/general?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_offset.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_offset.yaml index 25c363eccb90..a8f1f92bcc76 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_offset.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_offset.yaml @@ -10,25 +10,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill Gates","category":"Person","offset":25,"length":10,"confidenceScore":1.0},{"text":"Paul Allen","category":"Person","offset":40,"length":10,"confidenceScore":1.0}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: a79ede16-2727-42c2-a35b-53fb8fd50da6 + apim-request-id: 450afcd8-9bfc-4f9f-bf67-480289f47a3d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:16:06 GMT + date: Wed, 06 Oct 2021 21:05:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '53' + x-envoy-upstream-service-time: '26' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_out_of_order_ids.yaml index 99fcf508aef4..c1fb0d9b9b9d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_out_of_order_ids.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: cfc4965e-3e51-4e82-a747-a5d3c90f90c1 + apim-request-id: 94d3b01c-df1e-47fd-a721-4cc73495f1aa content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 21:16:07 GMT + date: Wed, 06 Oct 2021 21:05:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '51' + x-envoy-upstream-service-time: '24' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_output_same_order_as_input.yaml index f37d3bb346de..493cdaf87b42 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_output_same_order_as_input.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"one","category":"Quantity","subcategory":"Number","offset":0,"length":3,"confidenceScore":0.8}],"warnings":[]},{"id":"2","entities":[{"text":"two","category":"Quantity","subcategory":"Number","offset":0,"length":3,"confidenceScore":0.8}],"warnings":[]},{"id":"3","entities":[{"text":"three","category":"Quantity","subcategory":"Number","offset":0,"length":5,"confidenceScore":0.8}],"warnings":[]},{"id":"4","entities":[{"text":"four","category":"Quantity","subcategory":"Number","offset":0,"length":4,"confidenceScore":0.8}],"warnings":[]},{"id":"5","entities":[{"text":"five","category":"Quantity","subcategory":"Number","offset":0,"length":4,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 137a68a0-11bd-4612-8162-2d2e520e2994 + apim-request-id: ab84a3c7-0269-41a1-985d-f780ee505f92 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 - date: Mon, 02 Aug 2021 21:16:07 GMT + date: Wed, 06 Oct 2021 21:05:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '311' + x-envoy-upstream-service-time: '19' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_pass_cls.yaml index 281d16a8ce00..7efe7f9fd2dd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_pass_cls.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"Test","category":"Skill","offset":0,"length":4,"confidenceScore":0.97},{"text":"cls","category":"Skill","offset":13,"length":3,"confidenceScore":0.82}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 3dfe5552-942b-4203-a670-46ce3d95ccd0 + apim-request-id: 4a4059ac-fad7-41a3-b765-465d39e68f80 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:16:07 GMT + date: Wed, 06 Oct 2021 21:05:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '44' + x-envoy-upstream-service-time: '22' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_passing_only_string.yaml index 1f427b2ab477..06c6b42d10fb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_passing_only_string.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":0,"length":9,"confidenceScore":1.0},{"text":"Bill @@ -31,16 +31,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: d6c60e1b-df19-496c-ad61-2e427dc7bd94 + apim-request-id: 3cc7ceb9-d978-453f-9af1-8e9dcb5a6dc6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:08 GMT + date: Wed, 06 Oct 2021 21:05:05 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '78' + x-envoy-upstream-service-time: '34' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_per_item_dont_use_language_hint.yaml index 08bbc242d5c7..1b45fff97a0c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_per_item_dont_use_language_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: f05b80c0-708a-4c81-ac6b-da5891793ab0 + apim-request-id: bc81cb6b-208d-40c1-b543-5e4b3ee02273 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:09 GMT + date: Wed, 06 Oct 2021 21:05:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '36' + x-envoy-upstream-service-time: '24' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_rotate_subscription_key.yaml index dca3be8d1855..45b4b94df0a7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_rotate_subscription_key.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: c960651a-f661-4e59-babf-c5f4db456a96 + apim-request-id: 78e28330-a6a2-4f90-91fc-4b7a86ca63af content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:10 GMT + date: Wed, 06 Oct 2021 21:05:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '38' + x-envoy-upstream-service-time: '24' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -44,23 +44,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 538000c1-6566-4003-a6f5-aa9e1771c9db + apim-request-id: 9d3e6212-1a88-4b68-a43a-f7926e6b1d36 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:16:10 GMT + date: Wed, 06 Oct 2021 21:05:06 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -74,23 +74,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 7f44d7b8-607f-4a56-b1cb-9b9dfdacbd1f + apim-request-id: 4ddd2c20-720d-4019-9b83-5356da6e87e5 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:10 GMT + date: Wed, 06 Oct 2021 21:05:06 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '101' + x-envoy-upstream-service-time: '26' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_show_stats_and_model_version.yaml index 5076f13d73f5..167ed6e20ae2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_show_stats_and_model_version.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 8b709f7a-5869-4542-bd7e-209a607e5876 + apim-request-id: 06a939ce-3c9c-43cc-a662-7a6f34bb5673 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 21:16:10 GMT + date: Wed, 06 Oct 2021 21:05:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '49' + x-envoy-upstream-service-time: '26' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_string_index_type_not_fail_v3.yaml index e0838454669e..0fe56d1e3713 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_string_index_type_not_fail_v3.yaml @@ -9,23 +9,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/recognition/general?showStats=false response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: edfeb1a9-f059-469a-bb66-6d9c3cb7de94 + apim-request-id: 2ddbb0d3-a263-4824-a0e2-37661dff702e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:16:10 GMT + date: Wed, 06 Oct 2021 21:05:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '43' + x-envoy-upstream-service-time: '23' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.0/entities/recognition/general?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.0/entities/recognition/general?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_too_many_documents.yaml index 916f5654ffe6..393323a15ade 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_too_many_documents.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: f78c8969-0684-469a-a767-f66be871f830 + apim-request-id: fc696898-2bc9-4810-8f95-2f9ebb1d49b7 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:16:11 GMT + date: Wed, 06 Oct 2021 21:05:07 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '9' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_user_agent.yaml index 87d8812f4bbd..182dbb8d0232 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_user_agent.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 1e22c942-3847-479d-8467-09f201a70ffc + apim-request-id: 991c898a-66bb-4e35-abb2-af536bd0df16 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:12 GMT + date: Wed, 06 Oct 2021 21:05:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '36' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_dont_use_language_hint.yaml index a52f5d8e2b34..be90aae730f5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_dont_use_language_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.96}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: d615752b-3b8e-482b-b79a-7e62eb687e32 + apim-request-id: 76e15fd8-c7b2-41bd-a425-0f75ff7f3761 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:12 GMT + date: Wed, 06 Oct 2021 21:05:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '51' + x-envoy-upstream-service-time: '32' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint.yaml index d033a006152b..239b61f93d93 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"restaurant","category":"Location","offset":4,"length":10,"confidenceScore":0.96}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: a5f0fa5e-b58c-43c8-8895-dd0933174aa1 + apim-request-id: d540e6ec-d735-4ddb-ae35-3d1bc374283b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:12 GMT + date: Wed, 06 Oct 2021 21:05:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '64' + x-envoy-upstream-service-time: '27' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 5dab4bcd74a5..97e956e0387d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"text":"park","category":"Location","offset":17,"length":4,"confidenceScore":0.99}],"warnings":[]},{"id":"2","entities":[{"text":"hotel","category":"Location","offset":19,"length":5,"confidenceScore":0.99}],"warnings":[]},{"id":"3","entities":[{"text":"restaurant","category":"Location","subcategory":"Structural","offset":4,"length":10,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: f3d337a4-bf28-43c4-b607-337cc9e53c88 + apim-request-id: ccc1dbcd-a4c6-428a-8ed8-28cc064d7f36 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:13 GMT + date: Wed, 06 Oct 2021 21:05:08 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '35' + x-envoy-upstream-service-time: '24' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_input.yaml index 6094540325c6..796868e422b7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"text\":\"veterinarian\"\ @@ -24,16 +24,16 @@ interactions: warnings\":[]},{\"id\":\"3\",\"entities\":[],\"warnings\":[]}],\"errors\"\ :[],\"modelVersion\":\"2021-06-01\"}" headers: - apim-request-id: b5dfaaf4-67fd-4e78-921a-8ee8bf7a38a5 + apim-request-id: f115ffc4-0f6e-4086-b367-43e60861a35f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:14 GMT + date: Wed, 06 Oct 2021 21:05:09 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '60' + x-envoy-upstream-service-time: '31' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 80792b629a9a..62d23d20c17e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"id\":\"1\",\"entities\":[{\"text\":\"veterinarian\"\ @@ -25,16 +25,16 @@ interactions: :7,\"confidenceScore\":0.92}],\"warnings\":[]},{\"id\":\"3\",\"entities\"\ :[],\"warnings\":[]}],\"errors\":[],\"modelVersion\":\"2021-06-01\"}" headers: - apim-request-id: 28561acd-b263-4dd7-ba77-587c83610570 + apim-request-id: 191ffedd-5526-4dce-9884-c25bf9cbf0ff content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:16:15 GMT + date: Wed, 06 Oct 2021 21:05:09 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '252' + x-envoy-upstream-service-time: '230' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/general?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_dict.yaml index d416ba924717..e1205ad0a992 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_dict.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","statistics":{"charactersCount":50,"transactionsCount":1},"entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -31,13 +31,13 @@ interactions: Allen","url":"https://es.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - abcdd44a-22b4-485c-a0cf-f6ab593678a1 + - 53c106fb-5cbd-46dc-a068-da4f8cd30f2f content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 date: - - Mon, 02 Aug 2021 21:16:33 GMT + - Wed, 06 Oct 2021 21:05:09 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5377' + - '26' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_text_document_input.yaml index b81afc99eb3e..ab23d9cdfbe5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_all_successful_passing_text_document_input.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -31,13 +31,13 @@ interactions: Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - f39bd82d-384d-4825-a4ae-64835bfb362e + - a8fedcde-5b8e-432c-9e36-ef9f64bcac25 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 date: - - Mon, 02 Aug 2021 21:16:40 GMT + - Wed, 06 Oct 2021 21:05:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5601' + - '37' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_credentials.yaml index 6dae10fc8298..dec1f808086e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_credentials.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - ebe89c35-1ab9-4ae1-a472-1eae2e413002 + - 69d1a8c4-ad3f-4df4-9ab1-9d2953eb0da6 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:16:40 GMT + - Wed, 06 Oct 2021 21:05:09 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_model_version_error.yaml index 72d7644b2b98..c47d464fbcf7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bad_model_version_error.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid @@ -24,11 +24,11 @@ interactions: For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: apim-request-id: - - e532531d-b918-4157-9456-e85de8c71e9e + - fb24721c-0a60-4d72-b060-6b5e26a11ba5 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:16:46 GMT + - Wed, 06 Oct 2021 21:05:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5346' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit.yaml index 500502ff14af..deb820acb3ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit.yaml @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - df84091c-393f-4e97-a833-39183eeb8dc6 + - ea3d5c80-952c-4712-bc67-b69f018fdafd content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:16:52 GMT + - Wed, 06 Oct 2021 21:05:10 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5150' + - '11' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit_error.yaml index 28aa04a2c80c..f01dcf3397fd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_batch_size_over_limit_error.yaml @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 0a910be7-eb8d-4ad4-99a0-615f8f1a2932 + - 35df85d5-bad1-497e-a4ac-0109a7f0ce04 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:16:52 GMT + - Wed, 06 Oct 2021 21:05:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '12' + - '7' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml index ec59931f6856..3d4939de32b9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_bing_id.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -26,13 +26,13 @@ interactions: Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ab5daf4d-e9a3-4a55-836b-922f24e353f7 + - 825f1c1a-2aee-4d76-94cd-a509d9101abf content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:16:54 GMT + - Wed, 06 Oct 2021 21:05:11 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '447' + - '13' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_client_passed_default_language_hint.yaml index 7696fb5d3042..a97e7ab5beea 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_client_passed_default_language_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 79d44f78-5c78-4fe9-85aa-467c275ea026 + - 29931e9f-fc37-45d1-a0f5-2d893be821a1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:00 GMT + - Wed, 06 Oct 2021 21:05:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6006' + - '97' status: code: 200 message: OK @@ -59,21 +59,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - dababed5-953c-455a-af5d-7aa4304dc491 + - 4213505c-122e-49ef-8466-37f4d2002f41 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:00 GMT + - Wed, 06 Oct 2021 21:05:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -81,7 +81,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '402' + - '15' status: code: 200 message: OK @@ -102,21 +102,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - b02719db-826d-4f29-ad64-4ee62441d92e + - a612f55e-9ad0-4d3e-8d0b-15776e355325 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:06 GMT + - Wed, 06 Oct 2021 21:05:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -124,7 +124,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5780' + - '214' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml index c401b19ccf44..19328aa25628 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"7b4d3717-77ab-39ff-d8ec-1c7fd8723bd2","name":"\"Hello, @@ -23,13 +23,13 @@ interactions: World!\" program","url":"https://en.wikipedia.org/wiki/\"Hello,_World!\"_program","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 12975b5d-d50a-4a78-b5e0-f954182e3c31 + - 3bae19df-60fc-4257-9f5a-c4d08a8961bb content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:08 GMT + - Wed, 06 Oct 2021 21:05:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '550' + - '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_disable_service_logs.yaml index c2a6874f2796..6259a1bec74e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_disable_service_logs.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test @@ -24,13 +24,13 @@ interactions: (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 81f782f8-a237-46d7-a993-91d9984a5703 + - abbcfa2e-638f-4502-8dcc-53a0f25b4f08 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:09 GMT + - Wed, 06 Oct 2021 21:05:12 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '519' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_no_result_attribute.yaml index 76b7a052c926..614a2e3c962a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_no_result_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 6da32c78-5bf7-45f3-98fc-565255a933ad + - d2f21f18-894c-4040-87d1-77cf16358337 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:10 GMT + - Wed, 06 Oct 2021 21:05:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_nonexistent_attribute.yaml index a686fdf2d3bb..392de060fe36 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_attribute_error_nonexistent_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ce829419-c6f9-48b8-8b6f-af8bcad91fa7 + - b31b47ef-7d4b-4e08-82fd-f5967d7d3976 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:10 GMT + - Wed, 06 Oct 2021 21:05:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_errors.yaml index 17d2dac234bb..107f3f601c20 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_errors.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -32,11 +32,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 5b2b3155-db7f-46fa-aad0-5ecd1fb8526f + - 965bf6d7-dbf4-47cf-bc7a-9b45dc79566f content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:11 GMT + - Wed, 06 Oct 2021 21:05:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_warnings.yaml index 752458f02d0a..8ba12f0dad61 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_document_warnings.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - a1080254-48f8-4723-802e-efbadced869c + - 251f250d-2b70-45e4-9e64-b961308d8025 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:12 GMT + - Wed, 06 Oct 2021 21:05:13 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '430' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_duplicate_ids_error.yaml index e44fbebfca0e..281784b3bf75 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_duplicate_ids_error.yaml @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 7d54efc5-c120-4d2b-bda2-70c64a2b23ff + - 401343a0-c215-48bd-ad84-e709acea7926 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:12 GMT + - Wed, 06 Oct 2021 21:05:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_empty_credential_class.yaml index 7389068bca9c..bce4e0236d4c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_empty_credential_class.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 248073f1-9fc8-4831-8604-ffbc8b5cd999 + - 07bb6ddf-16f5-425a-93c6-fde6444d40ec content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:17:13 GMT + - Wed, 06 Oct 2021 21:05:14 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_explicit_set_string_index_type.yaml index 7b45ce6d57d4..80aca73b1ef2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_explicit_set_string_index_type.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=TextElements_v8 response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"7b4d3717-77ab-39ff-d8ec-1c7fd8723bd2","name":"\"Hello, @@ -23,13 +23,13 @@ interactions: World!\" program","url":"https://en.wikipedia.org/wiki/\"Hello,_World!\"_program","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ac8d2001-4204-4d1c-80ad-ebe47cb01523 + - f88dfe22-cb2a-4e81-bae1-4af46c56cb25 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:13 GMT + - Wed, 06 Oct 2021 21:05:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '40' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_all_errors.yaml index 990a8187491e..67a5bc4b4f08 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_all_errors.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -26,11 +26,11 @@ interactions: language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 6c645f3a-7d4c-45ea-92d0-a0c86a998242 + - 1942ab9a-f66e-4703-aed6-da18541cfcf0 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:14 GMT + - Wed, 06 Oct 2021 21:05:14 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '9' + - '3' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_some_errors.yaml index c05537570a50..63c534e390b1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_input_with_some_errors.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"2","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.38}],"language":"es","id":"Microsoft","url":"https://es.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -28,13 +28,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 2d3c9a12-d91d-4bea-ab4b-732ed64d0b07 + - 0da8f234-a193-4cbd-9e1b-576e3cef1ae8 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:15 GMT + - Wed, 06 Oct 2021 21:05:15 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '139' + - '242' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_docs.yaml index fa7a156f8e12..9dfdfcfb390a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_docs.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -24,11 +24,11 @@ interactions: language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - c328f026-548d-48a1-94f9-678de0c542eb + - 3df1370a-09c3-4561-9b6b-0e577892c467 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:15 GMT + - Wed, 06 Oct 2021 21:05:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_method.yaml index b086f9b85408..bce33fc55c6f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_invalid_language_hint_method.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -24,11 +24,11 @@ interactions: language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 6556ac17-b0e8-4dde-9f4d-eda08d53d797 + - 2f539b40-2eb5-4b4e-8067-9272416afb4e content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:16 GMT + - Wed, 06 Oct 2021 21:05:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '8' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_language_kwarg_spanish.yaml index 1d809ed5f51c..3b772ed215bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_language_kwarg_spanish.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -26,13 +26,13 @@ interactions: ejecutivo","url":"https://es.wikipedia.org/wiki/Director_ejecutivo","dataSource":"Wikipedia"},{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":25,"length":9,"confidenceScore":0.3}],"language":"es","id":"Microsoft","url":"https://es.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 03a04c84-6e04-46f4-99a1-2e2db17b1f3b + - bc6970ec-e543-4f80-8809-83f632a16fb3 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:17 GMT + - Wed, 06 Oct 2021 21:05:16 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '566' + - '17' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_no_offset_v3_linked_entity_match.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_no_offset_v3_linked_entity_match.yaml index 5ee3a1dc4259..2b3d9e76822c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_no_offset_v3_linked_entity_match.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_no_offset_v3_linked_entity_match.yaml @@ -14,7 +14,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/linking?showStats=false response: @@ -26,13 +26,13 @@ interactions: Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 761419d4-c7b7-4710-aaa0-23000f9014b7 + - aaa464a2-612a-4783-bd56-b0f141aacbb2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:23 GMT + - Wed, 06 Oct 2021 21:05:17 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '5475' + - '33' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_offset.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_offset.yaml index 60bc4ff38239..bc7561013a44 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_offset.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_offset.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -26,13 +26,13 @@ interactions: Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 25f7f8d0-48c2-4b3c-9387-f9b67ac1a41c + - 3960fe69-fe29-49b8-8a93-3a465ec42fa1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:24 GMT + - Wed, 06 Oct 2021 21:05:17 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '509' + - '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_out_of_order_ids.yaml index b8abe06b51e4..181c3795460a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_out_of_order_ids.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - eb907402-e59f-4da5-9383-8fb44edc88ae + - ecd70a8d-0bd0-4d2c-bfc5-a07efcb71134 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 21:17:25 GMT + - Wed, 06 Oct 2021 21:05:17 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '51' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_output_same_order_as_input.yaml index 3f2234d5a112..b110f7c15d52 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_output_same_order_as_input.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - fb358b6c-dfbb-4955-aeae-3c847a83400a + - 517430c9-9d1c-4bc8-8c28-b365c510c45a content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 date: - - Mon, 02 Aug 2021 21:17:25 GMT + - Wed, 06 Oct 2021 21:05:17 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '39' + - '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_pass_cls.yaml index ba6e7ccd7584..13de15417c3d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_pass_cls.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"9d84a0ad-fb96-8089-b2e7-9bdb0ee2551e","name":".test","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.02}],"language":"en","id":".test","url":"https://en.wikipedia.org/wiki/.test","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 91b21b19-c124-4e24-b010-e1e01817a736 + - d51a0b30-439f-4480-a322-cab05908794e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:26 GMT + - Wed, 06 Oct 2021 21:05:17 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '399' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_passing_only_string.yaml index 021afd9863d0..3a2d7464f34f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_passing_only_string.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -34,13 +34,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 96ee3f16-dad0-486c-9da4-16c46bf571e0 + - 84f36052-36d1-4934-bf8d-80010f5dd464 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 date: - - Mon, 02 Aug 2021 21:17:27 GMT + - Wed, 06 Oct 2021 21:05:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -48,7 +48,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '30' + - '13' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_per_item_dont_use_language_hint.yaml index 16f3489df61b..b9eb9c5e6c84 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_per_item_dont_use_language_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 3619c403-a3bb-436a-9bc3-2e42922ad5e1 + - 9142caa1-8c1e-44e6-add9-fc358d0ee910 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:27 GMT + - Wed, 06 Oct 2021 21:05:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '436' + - '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_rotate_subscription_key.yaml index 5da09e6361b1..5723ce8ffd65 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_rotate_subscription_key.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - a9b74633-39b7-4654-9565-daad3b71f98d + - 0bee66ee-22ea-4d55-aff3-107da5fd6f6d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:28 GMT + - Wed, 06 Oct 2021 21:05:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '395' + - '10' status: code: 200 message: OK @@ -59,9 +59,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -69,13 +69,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - fb6e55d7-5b2c-40b4-9d8f-709513332f27 + - 17cb77b8-ac90-4094-8c08-8c0511659579 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:17:29 GMT + - Wed, 06 Oct 2021 21:05:18 GMT status: code: 401 message: PermissionDenied @@ -96,21 +96,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - dcd3fb3e-b5f9-4588-b494-e49282af4cea + - aac5e95f-355f-45e1-bc00-87191e5ec727 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:29 GMT + - Wed, 06 Oct 2021 21:05:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -118,7 +118,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '473' + - '9' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_show_stats_and_model_version.yaml index 710f6c12dbf0..32587e294828 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_show_stats_and_model_version.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - cec8e246-4bcd-4780-a3ed-6614de044f1a + - 1e34afc4-9903-444f-98c2-3883cc5cf7b3 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 21:17:30 GMT + - Wed, 06 Oct 2021 21:05:18 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '369' + - '8' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_string_index_type_not_fail_v3.yaml index b07fc01fec95..4eabb87d8f89 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_string_index_type_not_fail_v3.yaml @@ -13,7 +13,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/linking?showStats=false response: @@ -21,13 +21,13 @@ interactions: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - ccb8cb80-5099-433e-829f-8125e0dae14c + - 5bb7e03d-d908-4c65-845f-74d9959c8ca2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:17:31 GMT + - Wed, 06 Oct 2021 21:05:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '52' + - '12' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_too_many_documents.yaml index 0634fcc39959..65d260a0faf5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_too_many_documents.yaml @@ -16,20 +16,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - d2b21a18-104e-45c5-a253-1b964c825216 + - d96300d6-ef01-47d2-8985-58fda4093eb9 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:31 GMT + - Wed, 06 Oct 2021 21:05:19 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '7' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_user_agent.yaml index 5eb416a28df4..085a1a6e8426 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_user_agent.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 2813eb0a-0587-4ccd-8fb4-6b3e7bbfefec + - 4510ef67-3b0c-4be3-8fec-61cf6a2115ea content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:32 GMT + - Wed, 06 Oct 2021 21:05:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '45' + - '11' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_dont_use_language_hint.yaml index dfcc1df73d6f..6779fbbb4cd7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_dont_use_language_hint.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - db23e299-ea23-44b3-9cb6-6d2d329e9d3d + - 7029ec1e-dd55-4def-b357-d7d3fb54bebd content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:32 GMT + - Wed, 06 Oct 2021 21:05:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '49' + - '10' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint.yaml index 2714666e6328..47bf1367a93a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -30,11 +30,11 @@ interactions: language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 7beff3a7-1c1a-4e99-954b-cc7ce17313e6 + - d75854ab-023b-492d-985e-d854f0c4bf39 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:33 GMT + - Wed, 06 Oct 2021 21:05:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 9936136749d5..9b91920ee9e5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 2d5f3d73-01da-4888-97db-53fcaaa332a3 + - 93c58f90-d741-4830-bfb4-743475178bfb content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:34 GMT + - Wed, 06 Oct 2021 21:05:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '521' + - '14' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_input.yaml index f3e1c3a7607a..318b172c7dcb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_input.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -30,11 +30,11 @@ interactions: language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 5bdc7e99-4753-4d82-9144-c2d9aeecf60f + - b1ec7efb-89f5-4fd8-a115-2df2ea5aa6f1 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:17:34 GMT + - Wed, 06 Oct 2021 21:05:20 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 58e0133e984e..70f4c4238d2c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: apim-request-id: - - 05a7fd4d-2741-4758-bc1c-44792fce2a7f + - 0d90e3b7-1c1d-4478-a904-56b07b562d70 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:17:34 GMT + - Wed, 06 Oct 2021 21:05:21 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '43' + - '17' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_dict.yaml index a3feb81fbc3e..6b5538e1d078 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_dict.yaml @@ -11,9 +11,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":2,"validDocumentsCount":2,"erroneousDocumentsCount":0,"transactionsCount":2},"documents":[{"id":"1","statistics":{"charactersCount":50,"transactionsCount":1},"entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -26,16 +26,16 @@ interactions: Allen","matches":[{"text":"Paul Allen","offset":39,"length":10,"confidenceScore":0.9}],"language":"es","id":"Paul Allen","url":"https://es.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 0f45e4f5-7772-40b1-bff8-dc452aa6abb3 + apim-request-id: 58fab485-ede4-4db9-9843-6dd99eac1c0e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 - date: Mon, 02 Aug 2021 21:18:05 GMT + date: Wed, 06 Oct 2021 21:05:20 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '665' + x-envoy-upstream-service-time: '16' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_text_document_input.yaml index 9ac0541eba7e..44be287be51e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_all_successful_passing_text_document_input.yaml @@ -11,9 +11,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -26,16 +26,16 @@ interactions: Allen","matches":[{"text":"Paul Allen","offset":39,"length":10,"confidenceScore":0.55}],"language":"en","id":"Paul Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: b6546b32-2f14-4714-99b2-98ba1cd45259 + apim-request-id: 92481c74-f0ec-460d-961d-a737ebf8c7e7 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 - date: Mon, 02 Aug 2021 21:18:05 GMT + date: Wed, 06 Oct 2021 21:05:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '55' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_credentials.yaml index f3b9b60d8669..8c817da7df8f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_credentials.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 5f44c085-0aba-4b5a-a7b8-5f066ba90773 + apim-request-id: b2125e6a-7e79-4af0-af1b-c390f8a344c2 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:18:06 GMT + date: Wed, 06 Oct 2021 21:05:22 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_model_version_error.yaml index fb99531066cf..b2893f432926 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bad_model_version_error.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid model version. Possible values are: latest,2019-10-01,2020-02-01,2021-06-01. For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: - apim-request-id: eb013117-7cbd-4fc4-b82c-dc743b6437bb + apim-request-id: 25ca4c22-6b2c-4956-ae14-1c67aa10e8ab content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:06 GMT + date: Wed, 06 Oct 2021 21:05:21 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit.yaml index e7e39b8e453f..b52806568912 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit.yaml @@ -754,17 +754,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: 3cae59c2-4f4f-4ebe-ac4d-52ed0089776e + apim-request-id: 96b83cf4-f9c5-497b-8946-117b11772bc1 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:07 GMT + date: Wed, 06 Oct 2021 21:05:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -772,5 +772,5 @@ interactions: status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit_error.yaml index 30814ad9e82e..ee451b424a8d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_batch_size_over_limit_error.yaml @@ -719,23 +719,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: c9fe32ed-a558-4dc4-9cee-6dbdf90d9996 + apim-request-id: 4bd917e0-2c72-4ffd-ba56-b5d3f036da3f content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:08 GMT + date: Wed, 06 Oct 2021 21:05:22 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '12' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml index 3292cae2b56f..0d3c252f8595 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_bing_id.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -21,16 +21,16 @@ interactions: Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 48174734-b650-462c-b367-dee6ee038469 + apim-request-id: 10ef9364-4768-4407-b37a-745f2bea8b41 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:09 GMT + date: Wed, 06 Oct 2021 21:05:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '553' + x-envoy-upstream-service-time: '20' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_client_passed_default_language_hint.yaml index 2b4655ea598f..b386ebc592c2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_client_passed_default_language_hint.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 10ff26e1-d4f9-4367-a508-566c2563b3cb + apim-request-id: 9d85ef7a-7906-4df6-8e6a-b4d560f65514 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:09 GMT + date: Wed, 06 Oct 2021 21:05:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '122' + x-envoy-upstream-service-time: '16' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -44,25 +44,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 1f9e370a-4b62-4b05-8718-0b4e7c006d7c + apim-request-id: f3afc368-1f27-48f9-93cb-36c050f04a0c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:09 GMT + date: Wed, 06 Oct 2021 21:05:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '26' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -76,23 +76,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 602f8f87-8f76-4e02-9cec-60928d4bb3ae + apim-request-id: 9d977751-499e-45de-a179-d050604f09bf content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:09 GMT + date: Wed, 06 Oct 2021 21:05:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '632' + x-envoy-upstream-service-time: '82' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml index d832af1a50f3..f5e123ee5e1f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -9,25 +9,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"7b4d3717-77ab-39ff-d8ec-1c7fd8723bd2","name":"\"Hello, World!\" program","matches":[{"text":"Hello world","offset":0,"length":11,"confidenceScore":0.03}],"language":"en","id":"\"Hello, World!\" program","url":"https://en.wikipedia.org/wiki/\"Hello,_World!\"_program","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 53829f84-75a0-495e-897a-07a1143870ee + apim-request-id: 1f9bb5e2-66ad-401d-9093-3e5842979325 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:10 GMT + date: Wed, 06 Oct 2021 21:05:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '43' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_disable_service_logs.yaml index b280662b3459..0b89b06a9662 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_disable_service_logs.yaml @@ -10,25 +10,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"a7b11e27-5b63-19a5-b4dd-37b71149ecac","name":"Test (assessment)","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.04}],"language":"en","id":"Test (assessment)","url":"https://en.wikipedia.org/wiki/Test_(assessment)","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 4a0a480b-9bfd-4a05-8195-028ddc09c32e + apim-request-id: 4d4685c4-ee0a-46ef-b27d-c9632c09a989 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:11 GMT + date: Wed, 06 Oct 2021 21:05:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_no_result_attribute.yaml index 6b6f80e907e0..fa94b8944e3c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_no_result_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 5a791092-cc43-45a7-ae36-0b1452613aec + apim-request-id: f4d4d5cb-8abf-403c-8fa4-5603b1942917 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:11 GMT + date: Wed, 06 Oct 2021 21:05:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_nonexistent_attribute.yaml index df721baf8219..e7722c18e1c8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 8c9656e5-bf6a-4321-9448-b08ec4832d04 + apim-request-id: 4bcfa111-3278-4ddb-b2a5-eab7a5712ce7 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:12 GMT + date: Wed, 06 Oct 2021 21:05:23 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_errors.yaml index c59d27a40f57..9212397e1ca9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_errors.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -27,15 +27,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: a2afcb6b-2cd8-40e1-b885-53a646bc4abb + apim-request-id: 944723ab-0c8f-48b0-8c4e-942beef8e0d3 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:12 GMT + date: Wed, 06 Oct 2021 21:05:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_warnings.yaml index 7350512edf97..3160a567c424 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_document_warnings.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 2cecde48-3647-45f0-8eb5-7be4c798332d + apim-request-id: 36277386-b6a4-4192-9ded-8b3a1e0b02cf content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:13 GMT + date: Wed, 06 Oct 2021 21:05:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '20' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_duplicate_ids_error.yaml index 1b81a8509e8f..19263893a720 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_duplicate_ids_error.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: f1dd79f1-563a-4b9c-8f72-bfbac96e6f20 + apim-request-id: f3d9b73b-6b72-48bf-906f-dd070dbf4caa content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:13 GMT + date: Wed, 06 Oct 2021 21:05:24 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '4' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_empty_credential_class.yaml index b6cb737a01fd..1666554720ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_empty_credential_class.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: e378b2d6-6aa8-4630-a6b5-9cda9467f580 + apim-request-id: bb869600-1d40-47ae-b476-9a5458d591f3 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:18:14 GMT + date: Wed, 06 Oct 2021 21:05:24 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_explicit_set_string_index_type.yaml index 89fbaec9684e..8221b6ee5d0a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_explicit_set_string_index_type.yaml @@ -9,25 +9,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=TextElements_v8 response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"7b4d3717-77ab-39ff-d8ec-1c7fd8723bd2","name":"\"Hello, World!\" program","matches":[{"text":"Hello world","offset":0,"length":11,"confidenceScore":0.03}],"language":"en","id":"\"Hello, World!\" program","url":"https://en.wikipedia.org/wiki/\"Hello,_World!\"_program","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: e3ea2553-5c2c-46f8-beb8-06e39d198ba3 + apim-request-id: 1f394ce5-5b1d-479f-a599-62e2a56b6d13 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:14 GMT + date: Wed, 06 Oct 2021 21:05:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '41' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=TextElements_v8 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=TextElements_v8 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_all_errors.yaml index b10bd591f055..815acb5d127e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_all_errors.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -21,15 +21,15 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: d1c8b8d6-9cd0-40a3-a65c-6d1cfedd7e8d + apim-request-id: 12f72520-fe31-4e8e-a00d-cb8af3892934 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:14 GMT + date: Wed, 06 Oct 2021 21:05:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_some_errors.yaml index b1938bb7467a..97ffa1702c18 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_input_with_some_errors.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"2","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.38}],"language":"es","id":"Microsoft","url":"https://es.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -23,16 +23,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: bb54e6b4-18e9-41cc-a8a5-138fd1bf7f16 + apim-request-id: 7149ec4f-bb4c-4e84-afd4-cc984abf64d7 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:14 GMT + date: Wed, 06 Oct 2021 21:05:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '26' + x-envoy-upstream-service-time: '21' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_docs.yaml index 54e5936a7bb4..4e40576aa8bb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_docs.yaml @@ -10,18 +10,18 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 2433ae2c-7a50-43ac-bbb5-9c3bfcc4d7c5 + apim-request-id: f694625d-64a8-40ed-9e37-998f833191fe content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:15 GMT + date: Wed, 06 Oct 2021 21:05:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -29,5 +29,5 @@ interactions: status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_method.yaml index 28a244b2819c..d671e4adcb73 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_invalid_language_hint_method.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 2aec1d39-302f-4d8d-9844-b0baa16a633a + apim-request-id: e9e73461-2737-456c-8386-9df46cde9158 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:16 GMT + date: Wed, 06 Oct 2021 21:05:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_language_kwarg_spanish.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_language_kwarg_spanish.yaml index 29fe626f5442..05c1497dffe3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_language_kwarg_spanish.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_language_kwarg_spanish.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -21,16 +21,16 @@ interactions: ejecutivo","matches":[{"text":"CEO","offset":18,"length":3,"confidenceScore":0.22}],"language":"es","id":"Director ejecutivo","url":"https://es.wikipedia.org/wiki/Director_ejecutivo","dataSource":"Wikipedia"},{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":25,"length":9,"confidenceScore":0.3}],"language":"es","id":"Microsoft","url":"https://es.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: c3c296c3-84aa-4d1d-bdaa-46e19d17d17a + apim-request-id: 78a8fca6-3c30-44b2-b79b-785c426bf878 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:16 GMT + date: Wed, 06 Oct 2021 21:05:25 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '106' + x-envoy-upstream-service-time: '28' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_no_offset_v3_linked_entity_match.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_no_offset_v3_linked_entity_match.yaml index d778ee2f545f..9365977eb48b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_no_offset_v3_linked_entity_match.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_no_offset_v3_linked_entity_match.yaml @@ -10,7 +10,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/linking?showStats=false response: @@ -21,16 +21,16 @@ interactions: Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 4c96661d-47cf-4c04-8fe5-675cbe5600c3 + apim-request-id: fda46758-1649-4203-92ea-a7f34ce4b03c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:22 GMT + date: Wed, 06 Oct 2021 21:05:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5964' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.0/entities/linking?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.0/entities/linking?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_offset.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_offset.yaml index 40d9391c2002..5070607ad0ff 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_offset.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_offset.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -21,16 +21,16 @@ interactions: Allen","matches":[{"text":"Paul Allen","offset":40,"length":10,"confidenceScore":0.54}],"language":"en","id":"Paul Allen","url":"https://en.wikipedia.org/wiki/Paul_Allen","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 557808cf-a374-4ef0-9f24-90995bd40fad + apim-request-id: a7212e66-e8cb-4736-92b0-1d81dabcdb30 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:23 GMT + date: Wed, 06 Oct 2021 21:05:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '26' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_out_of_order_ids.yaml index 4457b64b2418..7f3c7c7679fb 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_out_of_order_ids.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"56","entities":[],"warnings":[]},{"id":"0","entities":[],"warnings":[]},{"id":"19","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: d4033e1b-7611-4d3b-8bd3-58ef1ebf7b1e + apim-request-id: dc7787ba-ff49-4eb4-96ec-4b02b4d9d11f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 21:18:24 GMT + date: Wed, 06 Oct 2021 21:05:26 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '27' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_output_same_order_as_input.yaml index 7c08ea7102df..6a29f2e5e781 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_output_same_order_as_input.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]},{"id":"4","entities":[],"warnings":[]},{"id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 3fff7540-9dc2-45e1-9ad1-337a4f6154c6 + apim-request-id: 4a17dc45-37c2-4376-a288-f618754b1e7e content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 - date: Mon, 02 Aug 2021 21:18:24 GMT + date: Wed, 06 Oct 2021 21:05:27 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '17' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_pass_cls.yaml index a886e80b95ae..5d75d3fdb27e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_pass_cls.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"9d84a0ad-fb96-8089-b2e7-9bdb0ee2551e","name":".test","matches":[{"text":"Test","offset":0,"length":4,"confidenceScore":0.02}],"language":"en","id":".test","url":"https://en.wikipedia.org/wiki/.test","dataSource":"Wikipedia"}],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 3a896b3a-3ecd-47b9-8184-a71061ef5df5 + apim-request-id: 2da4ce2e-9ab7-4d01-a042-aca619302a3d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:24 GMT + date: Wed, 06 Oct 2021 21:05:27 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '55' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_passing_only_string.yaml index 2b5ff81f4254..b246c5b6e356 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_passing_only_string.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[{"bingId":"a093e9b9-90f5-a3d5-c4b8-5855e1b01f85","name":"Microsoft","matches":[{"text":"Microsoft","offset":0,"length":9,"confidenceScore":0.49}],"language":"en","id":"Microsoft","url":"https://en.wikipedia.org/wiki/Microsoft","dataSource":"Wikipedia"},{"bingId":"0d47c987-0042-5576-15e8-97af601614fa","name":"Bill @@ -29,16 +29,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: b3dfbead-ae9a-4f29-9261-509af48fc8a2 + apim-request-id: 192bff96-87a4-4fc8-bb4e-24258a319046 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=2,CognitiveServices.TextAnalytics.TextRecords=2 - date: Mon, 02 Aug 2021 21:18:25 GMT + date: Wed, 06 Oct 2021 21:05:27 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '63' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_per_item_dont_use_language_hint.yaml index bb3d1b338e2e..9c48cfae6067 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_per_item_dont_use_language_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 69faa0b6-27cf-40a2-9a88-185451762ff4 + apim-request-id: c3f85c67-0b39-4c34-adde-486e281a56b3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:26 GMT + date: Wed, 06 Oct 2021 21:05:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '436' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_rotate_subscription_key.yaml index dcd4cd85e440..b517dad6d316 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_rotate_subscription_key.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: da477128-49b5-4d12-b87a-ca3313285b5a + apim-request-id: edf0f8e7-614b-4503-a564-ebb55cb080da content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:26 GMT + date: Wed, 06 Oct 2021 21:05:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '32' + x-envoy-upstream-service-time: '8' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -44,23 +44,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 1cffced3-e254-4517-883a-251b7dd3f098 + apim-request-id: 59bcffbc-e4aa-43c0-ac5f-e3941aae5570 content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:18:26 GMT + date: Wed, 06 Oct 2021 21:05:28 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -74,23 +74,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: a764bbe8-d292-43d7-b3e0-125e66879baa + apim-request-id: c817fc57-90c9-4f77-b574-ccb3d09dc93d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:26 GMT + date: Wed, 06 Oct 2021 21:05:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '26' + x-envoy-upstream-service-time: '10' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_show_stats_and_model_version.yaml index 67a80dfda4cf..72e8678ed3f8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_show_stats_and_model_version.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: a864978c-f5c6-47f1-b83d-e2afaa0de562 + apim-request-id: 7430b870-77ff-4955-a3bd-49863552fb77 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 21:18:27 GMT + date: Wed, 06 Oct 2021 21:05:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '28' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_string_index_type_not_fail_v3.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_string_index_type_not_fail_v3.yaml index 498f10b1e9d5..680b31643f66 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_string_index_type_not_fail_v3.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_string_index_type_not_fail_v3.yaml @@ -9,23 +9,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.0/entities/linking?showStats=false response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: cd6cd44a-92d9-44a5-9f0a-aeeb0b64ac79 + apim-request-id: ad037180-12da-4ed2-9547-42f09e5dd98c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:18:33 GMT + date: Wed, 06 Oct 2021 21:05:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '5232' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.0/entities/linking?showStats=false + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.0/entities/linking?showStats=false version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_too_many_documents.yaml index c450569c519c..8e71369e92dd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_too_many_documents.yaml @@ -12,17 +12,17 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: 9cb7ccc7-1c78-4bae-9a8e-9be215c90675 + apim-request-id: 1c729312-7012-439f-ace2-201dfa72a7b0 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:33 GMT + date: Wed, 06 Oct 2021 21:05:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -30,5 +30,5 @@ interactions: status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_user_agent.yaml index dd045d85624d..798428d77207 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_user_agent.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 4cfcd916-8289-42d8-8c96-9973b2e6ea66 + apim-request-id: 6b142281-f910-4930-9cf0-08ccb4181ec8 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:33 GMT + date: Wed, 06 Oct 2021 21:05:28 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '9' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_dont_use_language_hint.yaml index eaa919ac7e35..e83bae5c7a6c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_dont_use_language_hint.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"0","entities":[],"warnings":[]},{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: d42ccb55-c85f-48ec-b9a1-2bb8cd99b121 + apim-request-id: 02c42fb0-0dff-46e5-9c2f-d87510b03b55 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:35 GMT + date: Wed, 06 Oct 2021 21:05:29 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '18' + x-envoy-upstream-service-time: '11' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint.yaml index 247d2b020b18..7bf1809db372 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -25,15 +25,15 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 821f5b76-19ee-4ce6-b44e-c1befea36d68 + apim-request-id: 6d46294d-0b59-4991-b87a-676add600e1b content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:35 GMT + date: Wed, 06 Oct 2021 21:05:29 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '2' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index b1aa5b6009de..1951d6920527 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 589e54f7-f92b-4ab9-b5a2-a7e48881a7b1 + apim-request-id: 9c98ae90-079e-4f38-9873-335820fc9856 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:35 GMT + date: Wed, 06 Oct 2021 21:05:29 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '47' + x-envoy-upstream-service-time: '15' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_input.yaml index a24e94833e7e..713a707682df 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,9 +25,9 @@ interactions: Language Code.","innererror":{"code":"UnsupportedLanguageCode","message":"Invalid language code. Supported languages: en,es. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 900ad1bb-6fea-48c0-af44-c4fcdaf8e309 + apim-request-id: a7247655-db73-41ed-bb73-acb6309a8a0c content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:18:36 GMT + date: Wed, 06 Oct 2021 21:05:30 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -35,5 +35,5 @@ interactions: status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 420131135829..700ec9ee1300 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_linked_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"id":"1","entities":[],"warnings":[]},{"id":"2","entities":[],"warnings":[]},{"id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-06-01"}' headers: - apim-request-id: 5e68a767-7dca-453c-bcb3-8d40421e0d76 + apim-request-id: 0d1d4ea1-a390-4c93-9721-f105661d21d4 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:18:35 GMT + date: Wed, 06 Oct 2021 21:05:29 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '32' + x-envoy-upstream-service-time: '13' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/linking?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml index ff51fa67f65a..3dc172be65f9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_dict.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"redactedText":"My @@ -28,13 +28,13 @@ interactions: 998.214.865-68 your Brazilian CPF number?","id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - beb98127-49ae-4b73-874e-eaf7a8fe0e5b + - 87eb4cf6-608c-4f55-8345-4c9fa1d4b7c7 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:18:48 GMT + - Wed, 06 Oct 2021 21:05:29 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '273' + - '27' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml index 9020cb35a1c0..4203fd3107db 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_all_successful_passing_text_document_input.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"redactedText":"My @@ -28,13 +28,13 @@ interactions: 998.214.865-68 your Brazilian CPF number?","id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 66183429-f6d9-4c35-9e8a-f0a0e6a2c1d4 + - 24c76c34-e939-404f-9a8a-7d96b074cb26 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:18:48 GMT + - Wed, 06 Oct 2021 21:05:30 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -42,7 +42,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '412' + - '34' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml index ce25bc824391..f1bfd9c582d7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_credentials.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 3fdf5d26-e2b4-42f9-bc32-e89a9dd07ebf + - db69694c-bfd3-410e-bb3f-4065c2624221 content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:18:49 GMT + - Wed, 06 Oct 2021 21:05:30 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml index 733255b84abc..7453d7fa1337 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_bad_model_version_error.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid @@ -24,11 +24,11 @@ interactions: For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: apim-request-id: - - bc52a20a-ffe7-4bb2-b2ea-e9bd618ceb5a + - 359e09fb-37d7-41ac-9fb1-4680960f5bca content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:18:50 GMT + - Wed, 06 Oct 2021 21:05:30 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '5' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml index 3bdaef81b145..20151e02b2d0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit.yaml @@ -758,20 +758,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 0dceb30d-34a2-4bd3-a9a8-73025c626c72 + - 687a858b-00cb-4507-87b9-fa2047a8e66e content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:18:50 GMT + - Wed, 06 Oct 2021 21:05:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -779,7 +779,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '12' + - '14' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml index 58f7650df657..badcac6488b9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_batch_size_over_limit_error.yaml @@ -723,20 +723,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - e532e3c1-90ba-40d9-9571-33f4a8a6aee2 + - 3a5c213e-e238-4fbc-b4c5-d99a95b12772 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:18:52 GMT + - Wed, 06 Oct 2021 21:05:32 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -744,7 +744,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '11' + - '20' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_categories_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_categories_filter.yaml index 9c4291fc9eb4..177aa2053594 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_categories_filter.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_categories_filter.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"My name is *************, my SSN in @@ -24,13 +24,13 @@ interactions: Montoya","category":"Person","offset":11,"length":13,"confidenceScore":0.99},{"text":"243-56-0987","category":"USSocialSecurityNumber","offset":36,"length":11,"confidenceScore":0.85},{"text":"333-3333","category":"PhoneNumber","offset":71,"length":8,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - d7321118-14ae-4d1a-b946-2b87197c5e47 + - 73289f18-0438-40d9-ab9e-831d934d0bda content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:18:53 GMT + - Wed, 06 Oct 2021 21:05:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '359' + - '32' status: code: 200 message: OK @@ -57,22 +57,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber response: body: string: '{"documents":[{"redactedText":"My name is Inigo Montoya, my SSN in *********** and my phone number is 333-3333.","id":"0","entities":[{"text":"243-56-0987","category":"USSocialSecurityNumber","offset":36,"length":11,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - efd792fc-5dd7-4d3b-9c48-05698b574dbc + - e1c47b7d-aef5-498a-b00b-03230632fb54 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:18:53 GMT + - Wed, 06 Oct 2021 21:05:31 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -80,7 +80,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '77' + - '35' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_categories_filter_with_domain_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_categories_filter_with_domain_filter.yaml index c97c0d9012ea..b7b24c68cbe9 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_categories_filter_with_domain_filter.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_categories_filter_with_domain_filter.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber response: body: string: '{"documents":[{"redactedText":"My name is Inigo Montoya, my SSN in *********** and my phone number is 333-3333.","id":"0","entities":[{"text":"243-56-0987","category":"USSocialSecurityNumber","offset":36,"length":11,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - ffaac5dc-6d7f-4086-8a1e-c3224f0b52d9 + - 0faa0dc3-58b0-4794-b558-b917bd1d39b2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:18:54 GMT + - Wed, 06 Oct 2021 21:05:32 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '76' + - '39' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml index 5614fd2c12dd..89a1c4aebc68 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_client_passed_default_language_hint.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I @@ -26,13 +26,13 @@ interactions: restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 08f3855f-3d86-4989-a08c-599220c9b7dc + - d98926de-c8b9-4b30-a6cf-1b28db0940c3 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:18:54 GMT + - Wed, 06 Oct 2021 21:05:32 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '69' + - '24' status: code: 200 message: OK @@ -61,9 +61,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I @@ -71,13 +71,13 @@ interactions: restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 57ac0e7d-095b-4643-8dfa-3b6989e0d4e1 + - 23d94ffe-2054-4782-b501-d1c5efdc274d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:18:54 GMT + - Wed, 06 Oct 2021 21:05:32 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -85,7 +85,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '51' + - '26' status: code: 200 message: OK @@ -106,9 +106,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I @@ -116,13 +116,13 @@ interactions: restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - bde22212-fabe-4f9c-997f-3dc74d105eef + - bc61cbec-f8f9-4819-ab43-ae4fe0fc8d23 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:18:54 GMT + - Wed, 06 Oct 2021 21:05:32 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -130,7 +130,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '74' + - '26' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml index 53f5719ea28e..1e3798d82045 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -13,21 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"Hello world","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - d01f5512-5db7-473b-b91a-14e472ab8608 + - 9090d663-4fed-45a0-a49b-c75d0cd26617 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:18:55 GMT + - Wed, 06 Oct 2021 21:05:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '59' + - '19' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_disable_service_logs.yaml index 9b1e5c941cd2..8aa1a51e772b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_disable_service_logs.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"Test for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 4519616d-c553-4e37-b61d-19da8542e650 + - f3611dca-de37-4d3a-84ab-88bb8a9e61bd content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:18:55 GMT + - Wed, 06 Oct 2021 21:05:33 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '29' + - '20' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml index 9c688f156349..021dbbe488e0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_no_result_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 4ff1defc-3b0f-4af3-8667-d8eb61c56bfc + - f50a9720-1679-46fa-8caf-838f9a059471 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:18:56 GMT + - Wed, 06 Oct 2021 21:05:34 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml index 4e6b2be374fa..46bb14d78f46 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_attribute_error_nonexistent_attribute.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -23,11 +23,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 9cc7ee4d-0c3c-4d46-9548-eceecf0a8642 + - da526092-6295-4a2b-9e61-a63fe8a42f8f content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:18:57 GMT + - Wed, 06 Oct 2021 21:05:34 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml index f095d6b994b4..a85dbd7638c5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_errors.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -33,11 +33,11 @@ interactions: see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 66b5724a-6667-41bd-af37-fa7787ee2489 + - 97c6c524-4390-44eb-9530-eb2c657c1a06 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:18:57 GMT + - Wed, 06 Oct 2021 21:05:34 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml index 33716d2a9fff..add3096d46b6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_document_warnings.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"This won''t actually create a warning :''(","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 60723155-2ecd-4d8a-b879-f4f95e429167 + - e6e087fb-c768-4896-9a3c-d2a0964d77b0 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:18:57 GMT + - Wed, 06 Oct 2021 21:05:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '43' + - '26' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml index 7f4d4a742a4a..97522778b8e1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_duplicate_ids_error.yaml @@ -14,20 +14,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: apim-request-id: - - 8d4ef8e1-5af5-4b8a-86dc-fe0a1092aa2e + - 6f1f8140-5f13-4e16-a10f-d551c43f8ba9 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:18:58 GMT + - Wed, 06 Oct 2021 21:05:34 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '7' + - '4' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml index 3fbbc563accc..c56b2c9e716d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_empty_credential_class.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -24,13 +24,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 31dc20ff-c06c-4354-a47d-53c3e0279a35 + - ab303e23-b036-4a84-bf75-0d6c911fde4c content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:18:59 GMT + - Wed, 06 Oct 2021 21:05:35 GMT status: code: 401 message: PermissionDenied diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_explicit_set_string_index_type.yaml index 3d778446f699..5267ab01077c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_explicit_set_string_index_type.yaml @@ -13,21 +13,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=TextElements_v8 response: body: string: '{"documents":[{"redactedText":"Hello world","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - bf6c388a-6b4d-4588-b2e2-cedd71e1df26 + - 9e3af2dc-363a-416c-a4e1-ce1a5219b25d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:18:59 GMT + - Wed, 06 Oct 2021 21:05:34 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -35,7 +35,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '33' + - '29' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml index ff73360dad15..33fa9c63db91 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_all_errors.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -29,11 +29,11 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 5dfad707-5922-46bf-8d9d-09bc4133075a + - 6094fb4d-0dc0-4137-add4-9cb8f4950b7f content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:19:00 GMT + - Wed, 06 Oct 2021 21:05:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -41,7 +41,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '4' + - '2' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml index cd6997f685b4..55854c01a58b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_input_with_some_errors.yaml @@ -15,9 +15,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"Is 998.214.865-68 your Brazilian CPF @@ -29,13 +29,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 6e1be0b4-ed72-44df-9cfa-68d4f40a1173 + - 9ecc2d51-aa17-473f-bf08-71157e14b434 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:19:00 GMT + - Wed, 06 Oct 2021 21:05:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -43,7 +43,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '43' + - '26' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml index 03e4d17d3be6..4ffeef5b05aa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_docs.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - efb4a9de-035d-42cf-b18e-752156fe049d + - 4d10618f-6264-46a5-8aa9-fd9a70a6f33f content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:19:01 GMT + - Wed, 06 Oct 2021 21:05:35 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '3' + - '1' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml index 042ce8ff8a3f..2c2ed180268f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_invalid_language_hint_method.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -25,11 +25,11 @@ interactions: For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - b5e657ac-922a-406e-b689-2ab67c0ba128 + - ef1e57d7-5671-46cb-9c0f-621e0aa7f551 content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:19:01 GMT + - Wed, 06 Oct 2021 21:05:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '2' + - '6' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml index 05d0ed9b6f76..6c72692e80bf 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_language_kwarg_english.yaml @@ -14,9 +14,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"redactedText":"********** @@ -24,13 +24,13 @@ interactions: Gates","category":"Person","offset":0,"length":10,"confidenceScore":1.0},{"text":"CEO","category":"PersonType","offset":18,"length":3,"confidenceScore":0.95},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 2439cda3-8691-4112-bd03-fa312e38a7de + - c9a177ab-5b3c-41ef-9acd-b7309b197b0e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:19:02 GMT + - Wed, 06 Oct 2021 21:05:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '53' + - '34' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml index aee76d13d6cd..798eb1975060 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_out_of_order_ids.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 98a96024-e9c7-4eb9-baba-0951c994f985 + - 9a6fd375-aaac-4578-9f27-a4222cc7b9e1 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 21:19:03 GMT + - Wed, 06 Oct 2021 21:05:36 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '55' + - '29' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml index b00fd0712243..c6bd43bef5b1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_output_same_order_as_input.yaml @@ -16,21 +16,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"one","id":"1","entities":[],"warnings":[]},{"redactedText":"two","id":"2","entities":[],"warnings":[]},{"redactedText":"three","id":"3","entities":[],"warnings":[]},{"redactedText":"four","id":"4","entities":[],"warnings":[]},{"redactedText":"five","id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - bda3f67d-ff23-4531-b10d-871ea15677aa + - e9e1baaf-e0f0-4849-8329-97cb14265228 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 date: - - Mon, 02 Aug 2021 21:19:03 GMT + - Wed, 06 Oct 2021 21:05:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -38,7 +38,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '242' + - '29' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml index 62eb28f3bb9d..2925cc589ec5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_pass_cls.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"Test passing cls to endpoint","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 9df75387-2a8c-4b5e-95fe-e8cc11219d38 + - 12293a2f-6291-42ed-a76a-ebc69d1ddddc content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:19:04 GMT + - Wed, 06 Oct 2021 21:05:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '147' + - '23' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml index 7977bdc33185..c980106b0e1c 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_passing_only_string.yaml @@ -17,9 +17,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"My @@ -31,13 +31,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 315ed1ae-753b-49f4-b8ed-afa1d6fc7c50 + - 85554dd2-e608-4f2c-b411-2959fb38e13b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:04 GMT + - Wed, 06 Oct 2021 21:05:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -45,7 +45,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '143' + - '30' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml index f16ade540392..187ed62c26ca 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_per_item_dont_use_language_hint.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I @@ -26,13 +26,13 @@ interactions: restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 65e25b8c-6986-4ea7-a7e0-7b49048a32e5 + - 9e2df3ca-c2ed-4e50-8f6f-17f0b4088be2 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:05 GMT + - Wed, 06 Oct 2021 21:05:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '63' + - '23' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml index 14f3f12e3d69..34947eec8a17 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_phi_domain_filter.yaml @@ -14,22 +14,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I work at ********* and my phone number is ************","id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":10,"length":9,"confidenceScore":0.95},{"text":"333-333-3333","category":"PhoneNumber","offset":43,"length":12,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - f9272972-84e2-4d1a-a99a-ad70865cec4c + - 32eda87d-4285-4849-bb1c-1e2c1958b494 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:19:06 GMT + - Wed, 06 Oct 2021 21:05:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '45' + - '25' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text.yaml index bb2fbff1dc8f..53218876b1c2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_redacted_text.yaml @@ -14,21 +14,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"My SSN is ***********.","id":"0","entities":[{"text":"859-98-0987","category":"USSocialSecurityNumber","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - b2086784-47cd-44e3-ac35-556a1c7c980b + - c783a5f6-fd9c-47c8-8696-ff95e2d9e92e content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 date: - - Mon, 02 Aug 2021 21:19:07 GMT + - Wed, 06 Oct 2021 21:05:37 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -36,7 +36,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '42' + - '26' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml index fd506e1db337..a20b0b13a6da 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_rotate_subscription_key.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I @@ -26,13 +26,13 @@ interactions: restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 512a3e77-10b6-4f41-b282-233a94ea4cda + - 4528ab88-3555-4dd0-a5b4-754b0801de5b content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:07 GMT + - Wed, 06 Oct 2021 21:05:38 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '42' + - '26' status: code: 200 message: OK @@ -61,9 +61,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription @@ -71,13 +71,13 @@ interactions: subscription and use a correct regional API endpoint for your resource."}}' headers: apim-request-id: - - 9d9d6d95-aca8-4a02-ba27-c5b25292909b + - 990c2aa1-54a7-4b67-a88c-b16b5736101e content-length: - '224' content-type: - application/json date: - - Mon, 02 Aug 2021 21:19:07 GMT + - Wed, 06 Oct 2021 21:05:38 GMT status: code: 401 message: PermissionDenied @@ -98,9 +98,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I @@ -108,13 +108,13 @@ interactions: restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 3f1c4833-9536-4b38-8bd6-b42ead516008 + - 234f3647-4187-46df-93a7-a6a08b047942 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:07 GMT + - Wed, 06 Oct 2021 21:05:38 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -122,7 +122,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '51' + - '47' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml index fdb279cacedb..4dc95c07802f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_show_stats_and_model_version.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid @@ -26,13 +26,13 @@ interactions: text is empty."}}}],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - abc0f333-202c-4bf8-832d-4a16e82487f2 + - eaa22568-4239-4e97-a6ad-6b89326df9b7 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 date: - - Mon, 02 Aug 2021 21:19:08 GMT + - Wed, 06 Oct 2021 21:05:38 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '47' + - '23' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml index 8ae0468aa848..f32acebc76d4 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_too_many_documents.yaml @@ -16,20 +16,20 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: apim-request-id: - - 3e6b4dee-56ed-4b76-890c-c189d9c234b8 + - 493bfb81-c6bb-46e2-8ed0-16d11403c7dd content-type: - application/json; charset=utf-8 date: - - Mon, 02 Aug 2021 21:19:08 GMT + - Wed, 06 Oct 2021 21:05:39 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -37,7 +37,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '6' + - '9' status: code: 400 message: Bad Request diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml index 0dd1187840a0..b14735e820a3 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_user_agent.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I @@ -26,13 +26,13 @@ interactions: restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - e33d9042-0ce5-4d5a-8e01-8ec8ac330866 + - 9055f47e-f31b-4adb-b46e-c09453beb633 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:09 GMT + - Wed, 06 Oct 2021 21:05:39 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '50' + - '23' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml index 30f18e207634..b916811415f8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_dont_use_language_hint.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"This was the best day of my life.","id":"0","entities":[],"warnings":[]},{"redactedText":"I @@ -26,13 +26,13 @@ interactions: restaurant was not as good as I hoped.","id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 113bbf4a-ac28-40c9-b192-b6e938e2ef40 + - 3ec7d903-38b4-4a90-bd37-d9ae428120b8 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:09 GMT + - Wed, 06 Oct 2021 21:05:39 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '62' + - '24' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml index 0f0fe752c347..11479cbb7ce5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"This was the best day of my life.","id":"0","entities":[],"warnings":[]},{"redactedText":"I @@ -26,13 +26,13 @@ interactions: restaurant was not as good as I hoped.","id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 914cfa28-5b27-47cf-b53e-31308bc498e8 + - e54c8305-3e1d-40d2-af55-3ee1df7d8642 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:10 GMT + - Wed, 06 Oct 2021 21:05:40 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '61' + - '24' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index fa22971e0592..bf0358f96f92 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I @@ -26,13 +26,13 @@ interactions: restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: apim-request-id: - - 7dc55d0d-10c7-4a40-9918-abecf0236ab7 + - b36c2cb6-e21c-48b2-a7b8-7a9a2f948aef content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:11 GMT + - Wed, 06 Oct 2021 21:05:40 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -40,7 +40,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '40' + - '25' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml index d0de0a4a239c..913509311d59 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_input.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"I should take my cat to the ************.\"\ @@ -30,13 +30,13 @@ interactions: :\"2021-01-15\"}" headers: apim-request-id: - - 5382a1a7-f583-433f-8931-f7d5be601591 + - c4bdf579-eadc-410d-a092-f3315dacb29d content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:11 GMT + - Wed, 06 Oct 2021 21:05:40 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '40' + - '32' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 0dde6f04653c..3b5f0c609393 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -16,9 +16,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"I should take my cat to the ************.\"\ @@ -30,13 +30,13 @@ interactions: :\"2021-01-15\"}" headers: apim-request-id: - - bf6151f4-48bb-4d15-a7e5-5459146d0c4b + - fea262ee-7292-48d4-bfa6-65f0d56dcc28 content-type: - application/json; charset=utf-8 csp-billing-usage: - CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 date: - - Mon, 02 Aug 2021 21:19:12 GMT + - Wed, 06 Oct 2021 21:05:40 GMT strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -44,7 +44,7 @@ interactions: x-content-type-options: - nosniff x-envoy-upstream-service-time: - - '359' + - '25' status: code: 200 message: OK diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml index 38ccf8bbfb99..00f480bd5247 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_dict.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"redactedText":"My @@ -23,16 +23,16 @@ interactions: of your personal check.","id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"PhoneNumber","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABARoutingNumber","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"NZSocialWelfareNumber","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"redactedText":"Is 998.214.865-68 your Brazilian CPF number?","id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 1b9b82ca-be09-48aa-82b6-0994e22e4f3b + apim-request-id: 23f43ecc-6021-4442-92af-6405867bfd20 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:23 GMT + date: Wed, 06 Oct 2021 21:05:41 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '231' + x-envoy-upstream-service-time: '31' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml index 4263b54c4985..1c2c11299c7d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_all_successful_passing_text_document_input.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":3,"validDocumentsCount":3,"erroneousDocumentsCount":0,"transactionsCount":3},"documents":[{"redactedText":"My @@ -23,16 +23,16 @@ interactions: of your personal check.","id":"2","statistics":{"charactersCount":105,"transactionsCount":1},"entities":[{"text":"111000025","category":"PhoneNumber","offset":18,"length":9,"confidenceScore":0.8},{"text":"111000025","category":"ABARoutingNumber","offset":18,"length":9,"confidenceScore":0.75},{"text":"111000025","category":"NZSocialWelfareNumber","offset":18,"length":9,"confidenceScore":0.65}],"warnings":[]},{"redactedText":"Is 998.214.865-68 your Brazilian CPF number?","id":"3","statistics":{"charactersCount":44,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 161301a1-8b9b-4aca-b241-388e0683800a + apim-request-id: 3f2a7738-09bf-4553-be6d-88de7a785334 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:24 GMT + date: Wed, 06 Oct 2021 21:05:41 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '273' + x-envoy-upstream-service-time: '37' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml index 99060103682f..78ff9bb238d1 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_credentials.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 611ea3a3-fe4d-4dc2-a917-69f483b8e236 + apim-request-id: de39d748-701b-4e9a-9a61-c435ab20c44a content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:19:24 GMT + date: Wed, 06 Oct 2021 21:05:41 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml index 978fc2def136..1499912a0400 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_bad_model_version_error.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid Request.","innererror":{"code":"ModelVersionIncorrect","message":"Invalid model version. Possible values are: latest,2019-10-01,2020-02-01,2020-04-01,2020-07-01,2021-01-15. For additional details see https://aka.ms/text-analytics-model-versioning"}}}' headers: - apim-request-id: 7dcc61d1-28a4-408c-95ac-4cac04543263 + apim-request-id: 9e8651aa-d993-4a6d-b42b-67d5f9d8eac1 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:25 GMT + date: Wed, 06 Oct 2021 21:05:41 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '5' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?model-version=bad&showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml index fd0596191b47..7c0d9d3dfd43 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit.yaml @@ -754,23 +754,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: 63ddc92a-6edb-4ac4-b6d4-76ee1f7e9176 + apim-request-id: 14b70432-a0b0-4587-a14f-2c0c0d1b6955 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:26 GMT + date: Wed, 06 Oct 2021 21:05:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '95' + x-envoy-upstream-service-time: '11' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml index 80da9a0220f9..451e4dcffa98 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_batch_size_over_limit_error.yaml @@ -719,23 +719,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: ced41174-d954-42b6-b0b9-f5fe68a6a479 + apim-request-id: c053aa5d-f22a-4938-b7b2-5c303f8a5274 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:26 GMT + date: Wed, 06 Oct 2021 21:05:42 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '11' + x-envoy-upstream-service-time: '17' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_categories_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_categories_filter.yaml index d2b2cd6b52e9..08715721b22b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_categories_filter.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_categories_filter.yaml @@ -10,27 +10,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"My name is *************, my SSN in *********** and my phone number is ********.","id":"0","entities":[{"text":"Inigo Montoya","category":"Person","offset":11,"length":13,"confidenceScore":0.99},{"text":"243-56-0987","category":"USSocialSecurityNumber","offset":36,"length":11,"confidenceScore":0.85},{"text":"333-3333","category":"PhoneNumber","offset":71,"length":8,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 070eaca2-dbf5-4d8e-9bdb-d7c81f04b87f + apim-request-id: 72903777-9703-4370-9ec1-209fe85f771d content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:27 GMT + date: Wed, 06 Oct 2021 21:05:43 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '53' + x-envoy-upstream-service-time: '36' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "0", "text": "My name is Inigo Montoya, my SSN in 243-56-0987 and my phone number is 333-3333.", "language": "en"}]}' @@ -42,24 +42,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber response: body: string: '{"documents":[{"redactedText":"My name is Inigo Montoya, my SSN in *********** and my phone number is 333-3333.","id":"0","entities":[{"text":"243-56-0987","category":"USSocialSecurityNumber","offset":36,"length":11,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 5d2f07c0-6ba8-49c9-ad44-0a582efdf502 + apim-request-id: 9c53ef0b-6cd1-436c-9fb8-ee346fe9c6b5 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:27 GMT + date: Wed, 06 Oct 2021 21:05:43 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '56' + x-envoy-upstream-service-time: '35' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_categories_filter_with_domain_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_categories_filter_with_domain_filter.yaml index 8714de7dd486..d962e369a286 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_categories_filter_with_domain_filter.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_categories_filter_with_domain_filter.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber response: body: string: '{"documents":[{"redactedText":"My name is Inigo Montoya, my SSN in *********** and my phone number is 333-3333.","id":"0","entities":[{"text":"243-56-0987","category":"USSocialSecurityNumber","offset":36,"length":11,"confidenceScore":0.85}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: faea001c-c446-44e1-8d62-07474105a5d2 + apim-request-id: d7bcc008-1dcd-4e79-b5f3-b3358f42c0ed content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:28 GMT + date: Wed, 06 Oct 2021 21:05:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '111' + x-envoy-upstream-service-time: '42' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint&piiCategories=USSocialSecurityNumber version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml index 42089e84918c..46bad91086a5 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_client_passed_default_language_hint.yaml @@ -12,27 +12,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]},{"redactedText":"The restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: c21627eb-2b41-489b-8284-ffe84b6816b7 + apim-request-id: caaea443-81a2-4981-ab56-900c59b14057 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:28 GMT + date: Wed, 06 Oct 2021 21:05:43 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '53' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -46,27 +46,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]},{"redactedText":"The restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 89b8de7f-c21f-40fe-b29a-8655e256a564 + apim-request-id: 0c877107-01da-4a69-b94f-630f52304727 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:28 GMT + date: Wed, 06 Oct 2021 21:05:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '61' + x-envoy-upstream-service-time: '27' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "es"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -80,25 +80,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]},{"redactedText":"The restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 603a41f6-d389-4cb1-9ba8-547236651943 + apim-request-id: 28e042d6-0181-40d6-9ec1-69bc2b827dfc content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:28 GMT + date: Wed, 06 Oct 2021 21:05:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '34' + x-envoy-upstream-service-time: '28' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml index 57869423a162..95151c0adce0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_default_string_index_type_is_UnicodeCodePoint.yaml @@ -9,23 +9,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"Hello world","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 02aa4057-b6af-49e3-a8ef-1de56f3172c7 + apim-request-id: a1e62586-2f30-4dc4-b2a1-83e2ee10742c content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:29 GMT + date: Wed, 06 Oct 2021 21:05:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '34' + x-envoy-upstream-service-time: '19' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_disable_service_logs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_disable_service_logs.yaml index fc9834eeb898..289c8d17ab4e 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_disable_service_logs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_disable_service_logs.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"Test for logging disable","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: a495efce-ea57-48f5-a131-e418924bc8ff + apim-request-id: 3a0488ce-5ec9-431b-8a5f-e411b4975729 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:29 GMT + date: Wed, 06 Oct 2021 21:05:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '38' + x-envoy-upstream-service-time: '21' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&loggingOptOut=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml index d6569755896f..31c39634c37a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_no_result_attribute.yaml @@ -9,24 +9,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: ab4162e2-298b-4a79-8b80-264d443ca6c7 + apim-request-id: 965566e6-1a07-43aa-95ea-d988481530fa content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:29 GMT + date: Wed, 06 Oct 2021 21:05:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '3' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml index a20810c587a2..ceba191b8af8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_attribute_error_nonexistent_attribute.yaml @@ -9,18 +9,18 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: e3d7f289-f499-4240-bed2-e076f60688e5 + apim-request-id: 82d5b0ba-3309-43d5-9baf-9071a72bae14 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:30 GMT + date: Wed, 06 Oct 2021 21:05:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -28,5 +28,5 @@ interactions: status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml index 2421272de5ec..d68f3937b261 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_errors.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -28,15 +28,15 @@ interactions: size to: 5120 text elements. For additional details on the data limitations see https://aka.ms/text-analytics-data-limits"}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 5497af95-7a3f-42bb-90d9-f3eacfc0496d + apim-request-id: 9910aaef-e7bd-4d1f-8592-22e899acfbb3 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:30 GMT + date: Wed, 06 Oct 2021 21:05:44 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '3' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml index 06b3a0bddd71..17343c918177 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_document_warnings.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"This won''t actually create a warning :''(","id":"1","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: e9991b16-605e-4fb0-b540-0701bb68cc34 + apim-request-id: cadca668-818a-44bc-9309-8ee539f45a02 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:30 GMT + date: Wed, 06 Oct 2021 21:05:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '38' + x-envoy-upstream-service-time: '22' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml index 17f214b96b47..9f85866ec770 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_duplicate_ids_error.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Request contains duplicated Ids. Make sure each document has a unique Id."}}}' headers: - apim-request-id: dd5bc21e-0baf-497b-9b7d-dac5799f2779 + apim-request-id: 0b8bf1fe-6e0e-4ad2-88ee-b21a6378ef3b content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:31 GMT + date: Wed, 06 Oct 2021 21:05:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '8' + x-envoy-upstream-service-time: '5' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml index 4cf34203f31f..622590a2d172 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_empty_credential_class.yaml @@ -10,21 +10,21 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 5eeae319-cd31-4e74-9a38-02813e9bd209 + apim-request-id: b95c1e74-155f-41d1-8c5b-5b93aafb828b content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:19:32 GMT + date: Wed, 06 Oct 2021 21:05:45 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_explicit_set_string_index_type.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_explicit_set_string_index_type.yaml index 4a5222366603..d9d2ef7cfddc 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_explicit_set_string_index_type.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_explicit_set_string_index_type.yaml @@ -9,23 +9,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=TextElements_v8 + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=TextElements_v8 response: body: string: '{"documents":[{"redactedText":"Hello world","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 7146ebab-e286-4204-8385-a8669aaca537 + apim-request-id: 9065c65c-748e-49e3-a2b3-6f74c36e11fe content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:32 GMT + date: Wed, 06 Oct 2021 21:05:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '36' + x-envoy-upstream-service-time: '19' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=TextElements_v8 + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=TextElements_v8 version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml index 0b475ba5ae05..cb05493be5fa 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_all_errors.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -24,9 +24,9 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 5373eea3-4a0f-4039-80c9-088ea1840015 + apim-request-id: dcdab0d4-8bac-4900-b5de-e1811de58f84 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:32 GMT + date: Wed, 06 Oct 2021 21:05:45 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -34,5 +34,5 @@ interactions: status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml index ef69eaf3b0f6..97133223a2e2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_input_with_some_errors.yaml @@ -11,9 +11,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"Is 998.214.865-68 your Brazilian CPF @@ -24,16 +24,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 865634fd-6550-457a-9a4a-b85f554d7a42 + apim-request-id: ad89564d-2521-404f-aa9f-231b9b2559e3 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:33 GMT + date: Wed, 06 Oct 2021 21:05:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '41' + x-envoy-upstream-service-time: '26' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml index 1fc58364651f..a65b7345a16b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_docs.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"1","error":{"code":"InvalidArgument","message":"Invalid @@ -20,15 +20,15 @@ interactions: language code. Supported languages: de,en,es,fr,it,ja,ko,pt-BR,pt-PT,zh-Hans. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 51fbaa43-0970-4834-b1e4-0d0f306f3bc0 + apim-request-id: 6011c659-5259-41a4-a88b-4c26e3aeb5be content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:33 GMT + date: Wed, 06 Oct 2021 21:05:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '4' + x-envoy-upstream-service-time: '2' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml index f7d7ef188498..a3f1544624c2 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_invalid_language_hint_method.yaml @@ -10,9 +10,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[],"errors":[{"id":"0","error":{"code":"InvalidArgument","message":"Invalid @@ -20,9 +20,9 @@ interactions: language code. Supported languages: de,en,es,fr,it,ja,ko,pt-BR,pt-PT,zh-Hans. For additional details see https://aka.ms/text-analytics/language-support?tabs=named-entity-recognition"}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 8f5dd642-bb97-4dd7-a781-bebf942092ff + apim-request-id: 3759e13e-b83b-4889-9a88-dfee22296d49 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:34 GMT + date: Wed, 06 Oct 2021 21:05:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff @@ -30,5 +30,5 @@ interactions: status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml index 15b4f8a648b5..4735ccf078f6 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_language_kwarg_english.yaml @@ -10,25 +10,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":1,"validDocumentsCount":1,"erroneousDocumentsCount":0,"transactionsCount":1},"documents":[{"redactedText":"********** is the *** of *********.","id":"0","statistics":{"charactersCount":35,"transactionsCount":1},"entities":[{"text":"Bill Gates","category":"Person","offset":0,"length":10,"confidenceScore":1.0},{"text":"CEO","category":"PersonType","offset":18,"length":3,"confidenceScore":0.95},{"text":"Microsoft","category":"Organization","offset":25,"length":9,"confidenceScore":0.97}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 965c559c-ac8a-4400-bf89-b6f672f392ee + apim-request-id: ae21aa4d-33b2-407a-9eec-1a49a63dd9b6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:35 GMT + date: Wed, 06 Oct 2021 21:05:46 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '33' + x-envoy-upstream-service-time: '23' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml index c77b0a9aa68b..49c35a6c9186 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_out_of_order_ids.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":":)","id":"56","entities":[],"warnings":[]},{"redactedText":":(","id":"0","entities":[],"warnings":[]},{"redactedText":":P","id":"19","entities":[],"warnings":[]},{"redactedText":":D","id":"1","entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 6c8483d5-bd47-4d3f-98dc-1d196e18ab3e + apim-request-id: ae04eb89-0c76-496e-ba54-7a23975afb2b content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 21:19:34 GMT + date: Wed, 06 Oct 2021 21:05:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '48' + x-envoy-upstream-service-time: '43' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml index aea74d752cb4..7b4abc55306a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_output_same_order_as_input.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"one","id":"1","entities":[],"warnings":[]},{"redactedText":"two","id":"2","entities":[],"warnings":[]},{"redactedText":"three","id":"3","entities":[],"warnings":[]},{"redactedText":"four","id":"4","entities":[],"warnings":[]},{"redactedText":"five","id":"5","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 285193ad-f610-4fb3-a6b6-761a909e73a4 + apim-request-id: 36ce39f3-310e-417b-b7a5-e587df4c6129 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=5,CognitiveServices.TextAnalytics.TextRecords=5 - date: Mon, 02 Aug 2021 21:19:36 GMT + date: Wed, 06 Oct 2021 21:05:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '193' + x-envoy-upstream-service-time: '30' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml index dec786543d70..69532680b696 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_pass_cls.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"Test passing cls to endpoint","id":"0","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 78f8e5f6-eec4-4a5a-8099-0600fc2f8a63 + apim-request-id: 486d2fbf-8f9b-4ba7-b55c-1d1683fbdab4 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:36 GMT + date: Wed, 06 Oct 2021 21:05:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '31' + x-envoy-upstream-service-time: '23' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml index b0ccf9b61356..05781b56d3fd 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_passing_only_string.yaml @@ -13,9 +13,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":4,"validDocumentsCount":3,"erroneousDocumentsCount":1,"transactionsCount":3},"documents":[{"redactedText":"My @@ -26,16 +26,16 @@ interactions: document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 6b05ea93-d96a-498a-a4f5-990ed8edde6d + apim-request-id: b8681a60-2eb9-4ca4-8fd6-63eedd13ab0a content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:37 GMT + date: Wed, 06 Oct 2021 21:05:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '88' + x-envoy-upstream-service-time: '33' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml index 47dec181218e..af5e796af0ec 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_per_item_dont_use_language_hint.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]},{"redactedText":"The restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 749193c7-afdf-4e3c-a7c8-40e029d81247 + apim-request-id: fb62d956-0863-4a94-8e13-5dfb5cabb6df content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:37 GMT + date: Wed, 06 Oct 2021 21:05:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '58' + x-envoy-upstream-service-time: '32' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml index 3a8357285cb4..8d48709de32a 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_phi_domain_filter.yaml @@ -10,24 +10,24 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I work at ********* and my phone number is ************","id":"0","entities":[{"text":"Microsoft","category":"Organization","offset":10,"length":9,"confidenceScore":0.95},{"text":"333-333-3333","category":"PhoneNumber","offset":43,"length":12,"confidenceScore":0.8}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 41c37b9f-f184-454a-9702-0faf0b1ecced + apim-request-id: 3d2c020a-5272-4b4d-b799-dc368b7c0f22 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:38 GMT + date: Wed, 06 Oct 2021 21:05:47 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '226' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&domain=phi&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text.yaml index 5389c13068f3..8b4eb3f0354f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_redacted_text.yaml @@ -10,23 +10,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"My SSN is ***********.","id":"0","entities":[{"text":"859-98-0987","category":"USSocialSecurityNumber","offset":10,"length":11,"confidenceScore":0.65}],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: bf429218-b94a-49b0-93af-e47cabbb7a9f + apim-request-id: eb018fb6-a6d4-4582-8155-bf444acaaf00 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=1,CognitiveServices.TextAnalytics.TextRecords=1 - date: Mon, 02 Aug 2021 21:19:38 GMT + date: Wed, 06 Oct 2021 21:05:48 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '36' + x-envoy-upstream-service-time: '23' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml index f741a2a5a148..857ba21e991f 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_rotate_subscription_key.yaml @@ -12,27 +12,27 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]},{"redactedText":"The restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: d73ff0ff-f68a-417b-9055-4f9d781ec1e9 + apim-request-id: b6d5872c-b190-4fde-b34d-52412e3841ec content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:38 GMT + date: Wed, 06 Oct 2021 21:05:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '45' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -46,23 +46,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}' headers: - apim-request-id: 0e81fea3-a6b8-40d3-9c3f-0c959fe5b086 + apim-request-id: fd048194-e1bf-4e22-bdbb-ec3c5efdecfe content-length: '224' content-type: application/json - date: Mon, 02 Aug 2021 21:19:39 GMT + date: Wed, 06 Oct 2021 21:05:49 GMT status: code: 401 message: PermissionDenied - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint - request: body: '{"documents": [{"id": "1", "text": "I will go to the park.", "language": "en"}, {"id": "2", "text": "I did not like the hotel we stayed at.", "language": @@ -76,25 +76,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]},{"redactedText":"The restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 77760a30-e6c6-4242-9221-0d08d928e94f + apim-request-id: 491f3e86-ae80-4345-b28e-d48cadaf686f content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:39 GMT + date: Wed, 06 Oct 2021 21:05:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '37' + x-envoy-upstream-service-time: '26' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml index 03d8de38a23f..721df05bedc8 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_show_stats_and_model_version.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint response: body: string: '{"statistics":{"documentsCount":5,"validDocumentsCount":4,"erroneousDocumentsCount":1,"transactionsCount":4},"documents":[{"redactedText":":)","id":"56","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":(","id":"0","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":P","id":"19","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]},{"redactedText":":D","id":"1","statistics":{"charactersCount":2,"transactionsCount":1},"entities":[],"warnings":[]}],"errors":[{"id":"22","error":{"code":"InvalidArgument","message":"Invalid document in request.","innererror":{"code":"InvalidDocument","message":"Document text is empty."}}}],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 11999f40-3f15-4c8a-8948-8845da6e7265 + apim-request-id: ca7824fa-04b3-4dc8-9d73-b8fc82bac736 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=4,CognitiveServices.TextAnalytics.TextRecords=4 - date: Mon, 02 Aug 2021 21:19:39 GMT + date: Wed, 06 Oct 2021 21:05:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '33' + x-envoy-upstream-service-time: '42' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?model-version=latest&showStats=true&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml index 65035ff93fca..23b3763bef6d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_too_many_documents.yaml @@ -12,23 +12,23 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"error":{"code":"InvalidRequest","message":"Invalid document in request.","innererror":{"code":"InvalidDocumentBatch","message":"Batch request contains too many records. Max 5 records are permitted."}}}' headers: - apim-request-id: a98bcb4d-9d04-485c-a1e3-691f24ce8cc9 + apim-request-id: 3cba63b8-6230-4826-9773-e18cb892cbe8 content-type: application/json; charset=utf-8 - date: Mon, 02 Aug 2021 21:19:40 GMT + date: Wed, 06 Oct 2021 21:05:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '6' + x-envoy-upstream-service-time: '5' status: code: 400 message: Bad Request - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml index c954174d50ba..3f25289dfb14 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_user_agent.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]},{"redactedText":"The restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 914aaab7-9f7e-4ffa-b89b-f0d3788fbb9e + apim-request-id: 528fe3ce-d65e-417b-96b3-88fd170b4877 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:41 GMT + date: Wed, 06 Oct 2021 21:05:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '56' + x-envoy-upstream-service-time: '27' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml index ebe3bf5fe3e1..8b68de3c3e80 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_dont_use_language_hint.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"This was the best day of my life.","id":"0","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at. It was too expensive.","id":"1","entities":[],"warnings":[]},{"redactedText":"The restaurant was not as good as I hoped.","id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 2e984ff9-62dd-40b3-ae16-6a0ff01fa611 + apim-request-id: 1390001c-6cd2-40a2-bc82-cd2d750d68e6 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:40 GMT + date: Wed, 06 Oct 2021 21:05:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '70' + x-envoy-upstream-service-time: '27' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml index 85e4e335ae30..416dbf4b0b78 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"This was the best day of my life.","id":"0","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at. It was too expensive.","id":"1","entities":[],"warnings":[]},{"redactedText":"The restaurant was not as good as I hoped.","id":"2","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 57ddc675-db56-40e0-b29b-8f5c2176bafd + apim-request-id: 41c9d09e-986f-4a25-b88f-37eff84968f7 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:42 GMT + date: Wed, 06 Oct 2021 21:05:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '51' + x-envoy-upstream-service-time: '29' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml index 731ce7c95a2c..3142b8f3182b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_dict_per_item_hints.yaml @@ -12,25 +12,25 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: '{"documents":[{"redactedText":"I will go to the park.","id":"1","entities":[],"warnings":[]},{"redactedText":"I did not like the hotel we stayed at.","id":"2","entities":[],"warnings":[]},{"redactedText":"The restaurant had really good food.","id":"3","entities":[],"warnings":[]}],"errors":[],"modelVersion":"2021-01-15"}' headers: - apim-request-id: 0f5d0e0b-093d-46c0-884b-1393a724a8e1 + apim-request-id: 1dfe1542-f210-4182-916d-4ef66c23c964 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:42 GMT + date: Wed, 06 Oct 2021 21:05:49 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '40' + x-envoy-upstream-service-time: '59' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml index 1df638422f54..e8bf5abd3303 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_input.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"I should take my cat to the ************.\"\ @@ -25,16 +25,16 @@ interactions: \",\"id\":\"3\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ :\"2021-01-15\"}" headers: - apim-request-id: 6d0a6a3f-4a4e-4cf4-8adf-98d3cf481327 + apim-request-id: fa7935e1-57f1-4cc1-a49c-4dfe686f6a81 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:42 GMT + date: Wed, 06 Oct 2021 21:05:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '31' + x-envoy-upstream-service-time: '24' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml index 130ee9768b46..cd838f750c66 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_recognize_pii_entities_async.test_whole_batch_language_hint_and_obj_per_item_hints.yaml @@ -12,9 +12,9 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-textanalytics/5.2.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-textanalytics/5.2.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST - uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + uri: https://westus2.api.cognitive.microsoft.com/text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint response: body: string: "{\"documents\":[{\"redactedText\":\"I should take my cat to the ************.\"\ @@ -25,16 +25,16 @@ interactions: \",\"id\":\"3\",\"entities\":[],\"warnings\":[]}],\"errors\":[],\"modelVersion\"\ :\"2021-01-15\"}" headers: - apim-request-id: c8d3dd5e-7ac4-4b1c-9465-dd376ede46f0 + apim-request-id: 642adfc9-714f-47f4-ab74-bf1ebe721d98 content-type: application/json; charset=utf-8 csp-billing-usage: CognitiveServices.TextAnalytics.BatchScoring=3,CognitiveServices.TextAnalytics.TextRecords=3 - date: Mon, 02 Aug 2021 21:19:43 GMT + date: Wed, 06 Oct 2021 21:05:50 GMT strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked x-content-type-options: nosniff - x-envoy-upstream-service-time: '293' + x-envoy-upstream-service-time: '25' status: code: 200 message: OK - url: https://tacanaryjava.cognitiveservices.azure.com//text/analytics/v3.2-preview.1/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint + url: https://javatextanalyticstestresources.cognitiveservices.azure.com//text/analytics/v3.2-preview.2/entities/recognition/pii?showStats=false&stringIndexType=UnicodeCodePoint version: 1 diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py index ab2272ee4194..266a769ec561 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py @@ -12,6 +12,10 @@ import itertools import datetime import json +try: + from unittest import mock +except ImportError: # python < 3.3 + import mock # type: ignore from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.credentials import AzureKeyCredential @@ -35,7 +39,13 @@ RecognizePiiEntitiesResult, ExtractSummaryAction, PiiEntityCategory, - ExtractSummaryResult + ExtractSummaryResult, + SingleCategoryClassifyAction, + MultiCategoryClassifyAction, + RecognizeCustomEntitiesAction, + SingleCategoryClassifyResult, + MultiCategoryClassifyResult, + RecognizeCustomEntitiesResult ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below @@ -429,7 +439,7 @@ def test_poller_metadata(self, client): poller.result() assert isinstance(poller.created_on, datetime.datetime) - assert poller.display_name + assert not poller.display_name assert isinstance(poller.expires_on, datetime.datetime) assert poller.actions_failed_count == 0 assert poller.actions_in_progress_count == 0 @@ -670,8 +680,19 @@ def test_too_many_documents(self, client): assert excinfo.value.status_code == 400 @TextAnalyticsPreparer() - @TextAnalyticsClientPreparer() - def test_disable_service_logs(self, client): + def test_disable_service_logs( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) actions = [ RecognizeEntitiesAction(disable_service_logs=True), ExtractKeyPhrasesAction(disable_service_logs=True), @@ -679,6 +700,21 @@ def test_disable_service_logs(self, client): RecognizeLinkedEntitiesAction(disable_service_logs=True), AnalyzeSentimentAction(disable_service_logs=True), ExtractSummaryAction(disable_service_logs=True), + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name, + disable_service_logs=True + ), + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name, + disable_service_logs=True + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name, + disable_service_logs=True + ) ] for action in actions: @@ -764,20 +800,129 @@ def test_partial_success_for_actions(self, client): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() - def test_multiple_of_same_action_fail(self, client): - docs = [{"id": "1", "language": "en", "text": "I did not like the hotel we stayed at."}, - {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at."}] + def test_multiple_of_same_action(self, client): + docs = [ + {"id": "28", "text": "My SSN is 859-98-0987. Here is another sentence."}, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number? Here is another sentence."}, + {"id": "5", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + ] - with pytest.raises(ValueError) as e: - client.begin_analyze_actions( - docs, - actions=[ - RecognizePiiEntitiesAction(domain_filter="phi"), - RecognizePiiEntitiesAction(), - ], - polling_interval=self._interval(), - ).result() - assert "Multiple of the same action is not currently supported." in str(e.value) + actions = [ + AnalyzeSentimentAction(), + RecognizePiiEntitiesAction(), + RecognizeEntitiesAction(), + RecognizeLinkedEntitiesAction(), + ExtractSummaryAction(order_by="Rank"), + RecognizePiiEntitiesAction(categories_filter=[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER]), + ExtractKeyPhrasesAction(), + RecognizeEntitiesAction(), + AnalyzeSentimentAction(show_opinion_mining=True), + RecognizeLinkedEntitiesAction(), + ExtractSummaryAction(max_sentence_count=1), + ExtractKeyPhrasesAction(), + ] + + response = client.begin_analyze_actions( + docs, + actions=actions, + polling_interval=self._interval(), + ).result() + + action_results = list(response) + assert len(action_results) == len(docs) + assert len(action_results[0]) == len(actions) + assert len(action_results[1]) == len(actions) + assert len(action_results[2]) == len(actions) + + for idx, action_result in enumerate(action_results): + if idx == 0: + doc_id = "28" + elif idx == 1: + doc_id = "3" + else: + doc_id = "5" + + assert isinstance(action_result[0], AnalyzeSentimentResult) + assert not all([sentence.mined_opinions for sentence in action_result[0].sentences]) + assert action_result[0].id == doc_id + + assert isinstance(action_result[1], RecognizePiiEntitiesResult) + assert action_result[1].id == doc_id + + assert isinstance(action_result[2], RecognizeEntitiesResult) + assert action_result[2].id == doc_id + + assert isinstance(action_result[3], RecognizeLinkedEntitiesResult) + assert action_result[3].id == doc_id + + assert isinstance(action_result[4], ExtractSummaryResult) + previous_score = 1.0 + for sentence in action_result[4].sentences: + assert sentence.rank_score <= previous_score + previous_score = sentence.rank_score + assert action_result[4].id == doc_id + + assert isinstance(action_result[5], RecognizePiiEntitiesResult) + assert action_result[5].id == doc_id + if doc_id == "28": + assert action_result[5].entities + else: + assert not action_result[5].entities + + assert isinstance(action_result[6], ExtractKeyPhrasesResult) + assert action_result[6].id == doc_id + + assert isinstance(action_result[7], RecognizeEntitiesResult) + assert action_result[7].id == doc_id + + assert isinstance(action_result[8], AnalyzeSentimentResult) + assert [sentence.mined_opinions for sentence in action_result[0].sentences] + assert action_result[8].id == doc_id + + assert isinstance(action_result[9], RecognizeLinkedEntitiesResult) + assert action_result[9].id == doc_id + + assert isinstance(action_result[10], ExtractSummaryResult) + assert len(action_result[10].sentences) == 1 + + assert isinstance(action_result[11], ExtractKeyPhrasesResult) + assert action_result[11].id == doc_id + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + def test_multiple_of_same_action_with_partial_results(self, client): + docs = [{"id": "5", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "text": ""}] + + actions = [ + ExtractSummaryAction(max_sentence_count=3), + RecognizePiiEntitiesAction(), + ExtractSummaryAction(max_sentence_count=5) + ] + + response = client.begin_analyze_actions( + docs, + actions=actions, + polling_interval=self._interval(), + ).result() + + action_results = list(response) + assert len(action_results) == len(docs) + assert len(action_results[0]) == len(actions) + assert len(action_results[1]) == len(actions) + + # first doc + assert isinstance(action_results[0][0], ExtractSummaryResult) + assert action_results[0][0].id == "5" + assert isinstance(action_results[0][1], RecognizePiiEntitiesResult) + assert action_results[0][1].id == "5" + assert isinstance(action_results[0][2], ExtractSummaryResult) + assert action_results[0][2].id == "5" + + # second doc + assert action_results[1][0].is_error + assert action_results[1][1].is_error + assert action_results[1][2].is_error @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -887,3 +1032,425 @@ def test_extract_summary_partial_results(self, client): assert not document_results[1][0].is_error assert isinstance(document_results[1][0], ExtractSummaryResult) + + @TextAnalyticsPreparer() + def test_single_category_classify( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name + ): + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + response = client.begin_analyze_actions( + docs, + actions=[ + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ) + ], + show_stats=True, + polling_interval=self._interval(), + ).result() + + document_results = list(response) + for doc_result in document_results: + for result in doc_result: + assert result.id + assert not result.is_error + assert not result.warnings + assert result.statistics + assert result.classification.category + assert result.classification.confidence_score + + @TextAnalyticsPreparer() + def test_multi_category_classify( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name + ): + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + response = client.begin_analyze_actions( + docs, + actions=[ + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name + ) + ], + show_stats=True, + polling_interval=self._interval(), + ).result() + + document_results = list(response) + for doc_result in document_results: + for result in doc_result: + assert result.id + assert not result.is_error + assert not result.warnings + assert result.statistics + for classification in result.classifications: + assert classification.category + assert classification.confidence_score + + @TextAnalyticsPreparer() + def test_recognize_custom_entities( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + response = client.begin_analyze_actions( + docs, + actions=[ + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ) + ], + show_stats=True, + polling_interval=self._interval(), + ).result() + + document_results = list(response) + for doc_result in document_results: + for result in doc_result: + assert result.id + assert not result.is_error + assert not result.warnings + assert result.statistics + for entity in result.entities: + assert entity.text + assert entity.category + assert entity.offset is not None + assert entity.length is not None + assert entity.confidence_score is not None + + @pytest.mark.skip("https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/12409536 and https://github.com/Azure/azure-sdk-for-python/issues/21369") + @TextAnalyticsPreparer() + def test_custom_partial_error( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": ""}, + ] + + response = client.begin_analyze_actions( + docs, + actions=[ + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ), + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ) + ], + show_stats=True, + polling_interval=self._interval(), + ).result() + + document_results = list(response) + assert len(document_results) == 2 + assert isinstance(document_results[0][0], SingleCategoryClassifyResult) + assert isinstance(document_results[0][1], MultiCategoryClassifyResult) + assert isinstance(document_results[0][2], RecognizeCustomEntitiesResult) + assert document_results[1][0].is_error + assert document_results[1][1].is_error + assert document_results[1][2].is_error + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + def test_analyze_continuation_token(self, client): + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "text": ""}, + {"id": "4", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + actions = [ + RecognizeEntitiesAction(), + RecognizePiiEntitiesAction(), + AnalyzeSentimentAction(), + ExtractKeyPhrasesAction(), + ] + + initial_poller = client.begin_analyze_actions( + docs, + actions=actions, + show_stats=True, + polling_interval=self._interval(), + ) + + cont_token = initial_poller.continuation_token() + + poller = client.begin_analyze_actions( + None, + None, + continuation_token=cont_token, + polling_interval=self._interval(), + ) + response = poller.result() + + action_results = list(response) + assert len(action_results) == len(docs) + action_order = [ + _AnalyzeActionsType.RECOGNIZE_ENTITIES, + _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, + _AnalyzeActionsType.ANALYZE_SENTIMENT, + _AnalyzeActionsType.EXTRACT_KEY_PHRASES, + ] + document_order = ["1", "2", "3", "4"] + for doc_idx, document_results in enumerate(action_results): + assert len(document_results) == 4 + for action_idx, document_result in enumerate(document_results): + if doc_idx == 2: + assert document_result.id == document_order[doc_idx] + assert document_result.is_error + else: + assert document_result.id == document_order[doc_idx] + assert document_result.statistics + assert self.document_result_to_action_type(document_result) == action_order[action_idx] + + initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error + + @TextAnalyticsPreparer() + def test_generic_action_error_no_target( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": ""}, + ] + + response = mock.Mock( + status_code=200, + headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + ) + + path_to_mock_json_response = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "./mock_test_responses/action_error_no_target.json", + ) + ) + with open(path_to_mock_json_response, "r") as fd: + mock_json_response = json.loads(fd.read()) + + response.text = lambda encoding=None: json.dumps(mock_json_response) + response.content_type = "application/json" + transport = mock.Mock(send=lambda request, **kwargs: response) + + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), transport=transport) + + with pytest.raises(HttpResponseError) as e: + response = list(client.begin_analyze_actions( + docs, + actions=[ + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ), + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ) + ], + show_stats=True, + polling_interval=self._interval(), + ).result()) + assert e.value.message == "(InternalServerError) 1 out of 3 job tasks failed. Failed job tasks : v3.2-preview.2/custom/entities/general." + + @TextAnalyticsPreparer() + def test_action_errors_with_targets( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": ""}, + ] + + response = mock.Mock( + status_code=200, + headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + ) + + # a mix of action errors to translate to doc errors, regular doc errors, and a successful response + path_to_mock_json_response = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "./mock_test_responses/action_error_with_targets.json", + ) + ) + with open(path_to_mock_json_response, "r") as fd: + mock_json_response = json.loads(fd.read()) + + response.text = lambda encoding=None: json.dumps(mock_json_response) + response.content_type = "application/json" + transport = mock.Mock(send=lambda request, **kwargs: response) + + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), transport=transport) + + response = list(client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ExtractSummaryAction(), + RecognizePiiEntitiesAction(domain_filter="phi"), + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ), + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ), + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ), + ], + show_stats=True, + polling_interval=self._interval(), + ).result()) + assert len(response) == len(docs) + for idx, result in enumerate(response[0]): + assert result.id == "1" + if idx == 10: + assert not result.is_error + assert isinstance(result, SingleCategoryClassifyResult) + else: + assert result.is_error + assert result.error.code == "InvalidRequest" + assert result.error.message == "Some error" + str(idx) # confirms correct doc error order + + for idx, result in enumerate(response[1]): + assert result.id == "2" + assert result.is_error + if idx == 10: + assert result.error.code == "InvalidDocument" + assert result.error.message == "Document text is empty." + else: + assert result.error.code == "InvalidRequest" + assert result.error.message == "Some error" + str(idx) # confirms correct doc error order + + @TextAnalyticsPreparer() + def test_action_job_failure( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + docs = [ + {"id": "1", "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": ""}, + ] + + response = mock.Mock( + status_code=200, + headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + ) + + # action job failure with status=="failed", no partial results so we raise an exception in this case + path_to_mock_json_response = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "./mock_test_responses/action_job_failure.json", + ) + ) + with open(path_to_mock_json_response, "r") as fd: + mock_json_response = json.loads(fd.read()) + + response.text = lambda encoding=None: json.dumps(mock_json_response) + response.content_type = "application/json" + transport = mock.Mock(send=lambda request, **kwargs: response) + + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), + transport=transport) + + with pytest.raises(HttpResponseError) as e: + response = list(client.begin_analyze_actions( + docs, + actions=[ + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ), + ], + show_stats=True, + polling_interval=self._interval(), + ).result()) + assert len(response) == len(docs) + assert e.value.message == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : v3.2-preview.2/custom/entities/general." diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py index c73ffc8db329..8b59c0304288 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_async.py @@ -12,6 +12,9 @@ import itertools import json import time +import sys +import asyncio +from unittest import mock from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.credentials import AzureKeyCredential @@ -34,12 +37,52 @@ ExtractKeyPhrasesResult, PiiEntityCategory, ExtractSummaryAction, - ExtractSummaryResult + ExtractSummaryResult, + SingleCategoryClassifyAction, + MultiCategoryClassifyAction, + RecognizeCustomEntitiesAction, + SingleCategoryClassifyResult, + MultiCategoryClassifyResult, + RecognizeCustomEntitiesResult ) # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) +def get_completed_future(result=None): + future = asyncio.Future() + future.set_result(result) + return future + + +def wrap_in_future(fn): + """Return a completed Future whose result is the return of fn. + Added to simplify using unittest.Mock in async code. Python 3.8's AsyncMock would be preferable. + """ + + @functools.wraps(fn) + def wrapper(*args, **kwargs): + result = fn(*args, **kwargs) + return get_completed_future(result) + return wrapper + + +class AsyncMockTransport(mock.MagicMock): + """Mock with do-nothing aenter/exit for mocking async transport. + + This is unnecessary on 3.8+, where MagicMocks implement aenter/exit. + """ + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + if sys.version_info < (3, 8): + self.__aenter__ = mock.Mock(return_value=get_completed_future()) + self.__aexit__ = mock.Mock(return_value=get_completed_future()) + + async def sleep(self, duration): + await asyncio.sleep(duration) + class TestAnalyzeAsync(AsyncTextAnalyticsTest): @@ -455,7 +498,7 @@ async def test_poller_metadata(self, client): response = await poller.result() assert isinstance(poller.created_on, datetime.datetime) - assert poller.display_name + assert not poller.display_name assert isinstance(poller.expires_on, datetime.datetime) assert poller.actions_failed_count == 0 assert poller.actions_in_progress_count == 0 @@ -710,8 +753,18 @@ async def test_too_many_documents(self, client): assert excinfo.value.status_code == 400 @TextAnalyticsPreparer() - @TextAnalyticsClientPreparer() - async def test_disable_service_logs(self, client): + async def test_disable_service_logs( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) actions = [ RecognizeEntitiesAction(disable_service_logs=True), ExtractKeyPhrasesAction(disable_service_logs=True), @@ -719,6 +772,21 @@ async def test_disable_service_logs(self, client): RecognizeLinkedEntitiesAction(disable_service_logs=True), AnalyzeSentimentAction(disable_service_logs=True), ExtractSummaryAction(disable_service_logs=True), + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name, + disable_service_logs=True + ), + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name, + disable_service_logs=True + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name, + disable_service_logs=True + ) ] for action in actions: @@ -803,20 +871,135 @@ async def test_partial_success_for_actions(self, client): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() - async def test_multiple_of_same_action_fail(self, client): - docs = [{"id": "1", "language": "en", "text": "I did not like the hotel we stayed at."}, - {"id": "2", "language": "en", "text": "I did not like the hotel we stayed at."}] + async def test_multiple_of_same_action(self, client): + docs = [ + {"id": "28", "text": "My SSN is 859-98-0987. Here is another sentence."}, + {"id": "3", "text": "Is 998.214.865-68 your Brazilian CPF number? Here is another sentence."}, + {"id": "5", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + ] - with pytest.raises(ValueError) as e: - await client.begin_analyze_actions( + actions = [ + AnalyzeSentimentAction(), + RecognizePiiEntitiesAction(), + RecognizeEntitiesAction(), + RecognizeLinkedEntitiesAction(), + ExtractSummaryAction(order_by="Rank"), + RecognizePiiEntitiesAction(categories_filter=[PiiEntityCategory.US_SOCIAL_SECURITY_NUMBER]), + ExtractKeyPhrasesAction(), + RecognizeEntitiesAction(), + AnalyzeSentimentAction(show_opinion_mining=True), + RecognizeLinkedEntitiesAction(), + ExtractSummaryAction(max_sentence_count=1), + ExtractKeyPhrasesAction(), + ] + async with client: + response = await (await client.begin_analyze_actions( docs, - actions=[ - RecognizePiiEntitiesAction(domain_filter="phi"), - RecognizePiiEntitiesAction(), - ], + actions=actions, polling_interval=self._interval(), - ) - assert "Multiple of the same action is not currently supported." in str(e.value) + )).result() + + action_results = [] + async for p in response: + action_results.append(p) + assert len(action_results) == len(docs) + assert len(action_results[0]) == len(actions) + assert len(action_results[1]) == len(actions) + assert len(action_results[2]) == len(actions) + + for idx, action_result in enumerate(action_results): + if idx == 0: + doc_id = "28" + elif idx == 1: + doc_id = "3" + else: + doc_id = "5" + + assert isinstance(action_result[0], AnalyzeSentimentResult) + assert not all([sentence.mined_opinions for sentence in action_result[0].sentences]) + assert action_result[0].id == doc_id + + assert isinstance(action_result[1], RecognizePiiEntitiesResult) + assert action_result[1].id == doc_id + + assert isinstance(action_result[2], RecognizeEntitiesResult) + assert action_result[2].id == doc_id + + assert isinstance(action_result[3], RecognizeLinkedEntitiesResult) + assert action_result[3].id == doc_id + + assert isinstance(action_result[4], ExtractSummaryResult) + previous_score = 1.0 + for sentence in action_result[4].sentences: + assert sentence.rank_score <= previous_score + previous_score = sentence.rank_score + assert action_result[4].id == doc_id + + assert isinstance(action_result[5], RecognizePiiEntitiesResult) + assert action_result[5].id == doc_id + if doc_id == "28": + assert action_result[5].entities + else: + assert not action_result[5].entities + + assert isinstance(action_result[6], ExtractKeyPhrasesResult) + assert action_result[6].id == doc_id + + assert isinstance(action_result[7], RecognizeEntitiesResult) + assert action_result[7].id == doc_id + + assert isinstance(action_result[8], AnalyzeSentimentResult) + assert [sentence.mined_opinions for sentence in action_result[0].sentences] + assert action_result[8].id == doc_id + + assert isinstance(action_result[9], RecognizeLinkedEntitiesResult) + assert action_result[9].id == doc_id + + assert isinstance(action_result[10], ExtractSummaryResult) + assert len(action_result[10].sentences) == 1 + + assert isinstance(action_result[11], ExtractKeyPhrasesResult) + assert action_result[11].id == doc_id + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + async def test_multiple_of_same_action_with_partial_results(self, client): + docs = [{"id": "5", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "text": ""}] + + actions = [ + ExtractSummaryAction(max_sentence_count=3), + RecognizePiiEntitiesAction(), + ExtractSummaryAction(max_sentence_count=5) + ] + + async with client: + response = await (await client.begin_analyze_actions( + docs, + actions=actions, + polling_interval=self._interval(), + )).result() + + action_results = [] + async for p in response: + action_results.append(p) + + assert len(action_results) == len(docs) + assert len(action_results[0]) == len(actions) + assert len(action_results[1]) == len(actions) + + # first doc + assert isinstance(action_results[0][0], ExtractSummaryResult) + assert action_results[0][0].id == "5" + assert isinstance(action_results[0][1], RecognizePiiEntitiesResult) + assert action_results[0][1].id == "5" + assert isinstance(action_results[0][2], ExtractSummaryResult) + assert action_results[0][2].id == "5" + + # second doc + assert action_results[1][0].is_error + assert action_results[1][1].is_error + assert action_results[1][2].is_error @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() @@ -935,3 +1118,452 @@ async def test_extract_summary_partial_results(self, client): assert not document_results[1][0].is_error assert isinstance(document_results[1][0], ExtractSummaryResult) + + @TextAnalyticsPreparer() + async def test_single_category_classify( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name + ): + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + async with client: + response = await (await client.begin_analyze_actions( + docs, + actions=[ + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ), + ], + show_stats=True, + polling_interval=self._interval(), + )).result() + + document_results = [] + async for doc in response: + document_results.append(doc) + for doc_result in document_results: + for result in doc_result: + assert result.id + assert not result.is_error + assert not result.warnings + assert result.statistics + assert result.classification.category + assert result.classification.confidence_score + + @TextAnalyticsPreparer() + async def test_multi_category_classify( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name + ): + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + async with client: + response = await (await client.begin_analyze_actions( + docs, + actions=[ + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name + ), + ], + show_stats=True, + polling_interval=self._interval(), + )).result() + + document_results = [] + async for doc in response: + document_results.append(doc) + + for doc_result in document_results: + for result in doc_result: + assert result.id + assert not result.is_error + assert not result.warnings + assert result.statistics + for classification in result.classifications: + assert classification.category + assert classification.confidence_score + + @TextAnalyticsPreparer() + async def test_recognize_custom_entities( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + async with client: + response = await (await client.begin_analyze_actions( + docs, + actions=[ + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ) + ], + show_stats=True, + polling_interval=self._interval(), + )).result() + + document_results = [] + async for doc in response: + document_results.append(doc) + + for doc_result in document_results: + for result in doc_result: + assert result.id + assert not result.is_error + assert not result.warnings + assert result.statistics + for entity in result.entities: + assert entity.text + assert entity.category + assert entity.offset is not None + assert entity.length is not None + assert entity.confidence_score is not None + + @pytest.mark.skip("https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/12409536 and https://github.com/Azure/azure-sdk-for-python/issues/21369") + @TextAnalyticsPreparer() + async def test_custom_partial_error( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key)) + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": ""}, + ] + async with client: + response = await (await client.begin_analyze_actions( + docs, + actions=[ + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ), + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ) + ], + show_stats=True, + polling_interval=self._interval(), + )).result() + + document_results = [] + async for doc in response: + document_results.append(doc) + + assert len(document_results) == 2 + assert isinstance(document_results[0][0], SingleCategoryClassifyResult) + assert isinstance(document_results[0][1], MultiCategoryClassifyResult) + assert isinstance(document_results[0][2], RecognizeCustomEntitiesResult) + assert document_results[1][0].is_error + assert document_results[1][1].is_error + assert document_results[1][2].is_error + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + async def test_analyze_continuation_token(self, client): + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": "David Schmidt, senior vice president--Food Safety, International Food Information Council (IFIC), Washington, D.C., discussed the physical activity component."}, + {"id": "3", "text": ""}, + {"id": "4", "language": "en", "text": "I need a reservation for an indoor restaurant in China. Please don't stop the music. Play music and add it to my playlist"}, + ] + + actions = [ + RecognizeEntitiesAction(), + RecognizePiiEntitiesAction(), + AnalyzeSentimentAction(), + ExtractKeyPhrasesAction(), + ] + async with client: + initial_poller = await client.begin_analyze_actions( + docs, + actions=actions, + show_stats=True, + polling_interval=self._interval(), + ) + + cont_token = initial_poller.continuation_token() + + poller = await client.begin_analyze_actions( + None, + None, + continuation_token=cont_token, + polling_interval=self._interval(), + ) + response = await poller.result() + + action_results = [] + async for action_result in response: + action_results.append(action_result) + + assert len(action_results) == len(docs) + action_order = [ + _AnalyzeActionsType.RECOGNIZE_ENTITIES, + _AnalyzeActionsType.RECOGNIZE_PII_ENTITIES, + _AnalyzeActionsType.ANALYZE_SENTIMENT, + _AnalyzeActionsType.EXTRACT_KEY_PHRASES, + ] + document_order = ["1", "2", "3", "4"] + for doc_idx, document_results in enumerate(action_results): + assert len(document_results) == 4 + for action_idx, document_result in enumerate(document_results): + if doc_idx == 2: + assert document_result.id == document_order[doc_idx] + assert document_result.is_error + else: + assert document_result.id == document_order[doc_idx] + assert document_result.statistics + assert self.document_result_to_action_type(document_result) == action_order[action_idx] + + await initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error + + @TextAnalyticsPreparer() + async def test_generic_action_error_no_target( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": ""}, + ] + + response = mock.MagicMock( + status_code=200, + headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + ) + path_to_mock_json_response = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "./mock_test_responses/action_error_no_target.json", + ) + ) + with open(path_to_mock_json_response, "r") as fd: + mock_json_response = json.loads(fd.read()) + + response.text = lambda encoding=None: json.dumps(mock_json_response) + response.content_type = "application/json" + transport = AsyncMockTransport(send=wrap_in_future(lambda request, **kwargs: response)) + + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), transport=transport) + + with pytest.raises(HttpResponseError) as e: + async with client: + response = await (await client.begin_analyze_actions( + docs, + actions=[ + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ), + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ) + ], + show_stats=True, + polling_interval=self._interval(), + )).result() + results = [] + async for resp in response: + results.append(resp) + assert e.value.message == "(InternalServerError) 1 out of 3 job tasks failed. Failed job tasks : v3.2-preview.2/custom/entities/general." + + @TextAnalyticsPreparer() + async def test_action_errors_with_targets( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_single_category_classify_project_name, + textanalytics_single_category_classify_deployment_name, + textanalytics_multi_category_classify_project_name, + textanalytics_multi_category_classify_deployment_name, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + docs = [ + {"id": "1", "language": "en", "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": ""}, + ] + + response = mock.MagicMock( + status_code=200, + headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + ) + + # a mix of action errors to translate to doc errors, regular doc errors, and a successful response + path_to_mock_json_response = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "./mock_test_responses/action_error_with_targets.json", + ) + ) + with open(path_to_mock_json_response, "r") as fd: + mock_json_response = json.loads(fd.read()) + + response.text = lambda encoding=None: json.dumps(mock_json_response) + response.content_type = "application/json" + transport = AsyncMockTransport(send=wrap_in_future(lambda request, **kwargs: response)) + + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), transport=transport) + + async with client: + response = await (await client.begin_analyze_actions( + docs, + actions=[ + RecognizeEntitiesAction(), + ExtractKeyPhrasesAction(), + RecognizePiiEntitiesAction(), + RecognizeLinkedEntitiesAction(), + AnalyzeSentimentAction(), + ExtractSummaryAction(), + RecognizePiiEntitiesAction(domain_filter="phi"), + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ), + MultiCategoryClassifyAction( + project_name=textanalytics_multi_category_classify_project_name, + deployment_name=textanalytics_multi_category_classify_deployment_name + ), + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ), + SingleCategoryClassifyAction( + project_name=textanalytics_single_category_classify_project_name, + deployment_name=textanalytics_single_category_classify_deployment_name + ), + ], + show_stats=True, + polling_interval=self._interval(), + )).result() + results = [] + async for resp in response: + results.append(resp) + + assert len(results) == len(docs) + for idx, result in enumerate(results[0]): + assert result.id == "1" + if idx == 10: + assert not result.is_error + assert isinstance(result, SingleCategoryClassifyResult) + else: + assert result.is_error + assert result.error.code == "InvalidRequest" + assert result.error.message == "Some error" + str(idx) # confirms correct doc error order + + for idx, result in enumerate(results[1]): + assert result.id == "2" + assert result.is_error + if idx == 10: + assert result.error.code == "InvalidDocument" + assert result.error.message == "Document text is empty." + else: + assert result.error.code == "InvalidRequest" + assert result.error.message == "Some error" + str(idx) # confirms correct doc error order + + @TextAnalyticsPreparer() + async def test_action_job_failure( + self, + textanalytics_custom_text_endpoint, + textanalytics_custom_text_key, + textanalytics_custom_entities_project_name, + textanalytics_custom_entities_deployment_name + ): + docs = [ + {"id": "1", "language": "en", + "text": "A recent report by the Government Accountability Office (GAO) found that the dramatic increase in oil and natural gas development on federal lands over the past six years has stretched the staff of the BLM to a point that it has been unable to meet its environmental protection responsibilities."}, + {"id": "2", "language": "en", "text": ""}, + ] + + response = mock.MagicMock( + status_code=200, + headers={"Content-Type": "application/json", "operation-location": "https://fakeurl.com"} + ) + + # action job failure with status=="failed", no partial results so we raise an exception in this case + path_to_mock_json_response = os.path.abspath( + os.path.join( + os.path.abspath(__file__), + "..", + "./mock_test_responses/action_job_failure.json", + ) + ) + with open(path_to_mock_json_response, "r") as fd: + mock_json_response = json.loads(fd.read()) + + response.text = lambda encoding=None: json.dumps(mock_json_response) + response.content_type = "application/json" + transport = AsyncMockTransport(send=wrap_in_future(lambda request, **kwargs: response)) + + client = TextAnalyticsClient(textanalytics_custom_text_endpoint, AzureKeyCredential(textanalytics_custom_text_key), transport=transport) + + async with client: + with pytest.raises(HttpResponseError) as e: + response = await (await client.begin_analyze_actions( + docs, + actions=[ + RecognizeCustomEntitiesAction( + project_name=textanalytics_custom_entities_project_name, + deployment_name=textanalytics_custom_entities_deployment_name + ), + ], + show_stats=True, + polling_interval=self._interval(), + )).result() + results = [] + async for resp in response: + results.append(resp) + assert e.value.message == "(InternalServerError) 1 out of 1 job tasks failed. Failed job tasks : v3.2-preview.2/custom/entities/general." diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py index b4ccdfba9769..074da697f306 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare.py @@ -430,3 +430,38 @@ def callback(resp): disable_service_logs=True, raw_response_hook=callback, ).result() + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + def test_healthcare_continuation_token(self, client): + initial_poller = client.begin_analyze_healthcare_entities( + documents=[ + {"id": "1", "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + {"id": "2", "text": "patients must have histologically confirmed NHL"}, + {"id": "3", "text": ""}, + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + ], + show_stats=True, + polling_interval=self._interval(), + ) + + cont_token = initial_poller.continuation_token() + poller = client.begin_analyze_healthcare_entities( + None, + continuation_token=cont_token, + polling_interval=self._interval(), + ) + response = poller.result() + + results = list(response) + document_order = ["1", "2", "3", "4"] + for doc_idx, result in enumerate(results): + if doc_idx == 2: + assert result.id == document_order[doc_idx] + assert result.is_error + else: + assert result.id == document_order[doc_idx] + assert result.statistics + assert result.entities + + initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error \ No newline at end of file diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py index e22c034c133a..d8a1624a8057 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze_healthcare_async.py @@ -475,3 +475,42 @@ def callback(resp): disable_service_logs=True, raw_response_hook=callback, )).result() + + @TextAnalyticsPreparer() + @TextAnalyticsClientPreparer() + async def test_healthcare_continuation_token(self, client): + async with client: + initial_poller = await client.begin_analyze_healthcare_entities( + documents=[ + {"id": "1", "text": "Baby not likely to have Meningitis. In case of fever in the mother, consider Penicillin for the baby too."}, + {"id": "2", "text": "patients must have histologically confirmed NHL"}, + {"id": "3", "text": ""}, + {"id": "4", "text": "The patient was diagnosed with Parkinsons Disease (PD)"} + ], + show_stats=True, + polling_interval=self._interval(), + ) + + cont_token = initial_poller.continuation_token() + poller = await client.begin_analyze_healthcare_entities( + None, + continuation_token=cont_token, + polling_interval=self._interval(), + ) + response = await poller.result() + + results = [] + async for result in response: + results.append(result) + + document_order = ["1", "2", "3", "4"] + for doc_idx, result in enumerate(results): + if doc_idx == 2: + assert result.id == document_order[doc_idx] + assert result.is_error + else: + assert result.id == document_order[doc_idx] + assert result.statistics + assert result.entities + + await initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py index 0e4e49bf83a7..9d404a1e524d 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi.py @@ -12,11 +12,11 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) -class TestRecognizeEntities(TextAnalyticsTest): +class TestMultiApi(TextAnalyticsTest): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() def test_default_api_version(self, client): - assert "v3.2-preview.1" in client._client._client._base_url + assert "v3.2-preview.2" in client._client._client._base_url @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) @@ -31,4 +31,4 @@ def test_v3_1_api_version(self, client): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_2_PREVIEW}) def test_v3_2_api_version(self, client): - assert "v3.2-preview.1" in client._client._client._base_url + assert "v3.2-preview.2" in client._client._client._base_url diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py index aa4a916e4735..80f9bdc3b0e0 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_multiapi_async.py @@ -12,11 +12,11 @@ # pre-apply the client_cls positional argument so it needn't be explicitly passed below TextAnalyticsClientPreparer = functools.partial(_TextAnalyticsClientPreparer, TextAnalyticsClient) -class TestRecognizeEntities(TextAnalyticsTest): +class TestMultiApiAsync(TextAnalyticsTest): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer() def test_default_api_version(self, client): - assert "v3.2-preview.1" in client._client._client._base_url + assert "v3.2-preview.2" in client._client._client._base_url @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_0}) @@ -31,4 +31,4 @@ def test_v3_1_api_version(self, client): @TextAnalyticsPreparer() @TextAnalyticsClientPreparer(client_kwargs={"api_version": TextAnalyticsApiVersion.V3_2_PREVIEW}) def test_v3_2_api_version(self, client): - assert "v3.2-preview.1" in client._client._client._base_url + assert "v3.2-preview.2" in client._client._client._base_url diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py index 47e37be4ed62..6c86e873daa7 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities.py @@ -604,7 +604,7 @@ def test_categories_filter(self, client): ["My name is Inigo Montoya, my SSN in 243-56-0987 and my phone number is 333-3333."], ) - self.assertEqual(len(result[0].entities), 3) + # self.assertEqual(len(result[0].entities), 3) FIXME service returning entity for "333-3333" and "333-3333." result = client.recognize_pii_entities( ["My name is Inigo Montoya, my SSN in 243-56-0987 and my phone number is 333-3333."], diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py index 28cf45b7a7f3..e767c6b1617b 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py @@ -605,7 +605,7 @@ async def test_categories_filter(self, client): ["My name is Inigo Montoya, my SSN in 243-56-0987 and my phone number is 333-3333."], ) - self.assertEqual(len(result[0].entities), 3) + # self.assertEqual(len(result[0].entities), 3) FIXME service returning entity for "333-3333" and "333-3333." result = await client.recognize_pii_entities( ["My name is Inigo Montoya, my SSN in 243-56-0987 and my phone number is 333-3333."], diff --git a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py index 7d49ea26d2fb..ea3349ae8c62 100644 --- a/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py +++ b/sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py @@ -31,6 +31,14 @@ 'textanalytics', textanalytics_test_endpoint="https://westus2.api.cognitive.microsoft.com/", textanalytics_test_api_key="fakeZmFrZV9hY29jdW50X2tleQ==", + textanalytics_custom_text_endpoint="https://westus2.api.cognitive.microsoft.com/", + textanalytics_custom_text_key="fakeZmFrZV9hY29jdW50X2tleQ==", + textanalytics_single_category_classify_project_name="single_category_classify_project_name", + textanalytics_single_category_classify_deployment_name="textanalytics_single_category_classify_deployment_name", + textanalytics_multi_category_classify_project_name="textanalytics_multi_category_classify_project_name", + textanalytics_multi_category_classify_deployment_name="textanalytics_multi_category_classify_deployment_name", + textanalytics_custom_entities_project_name="textanalytics_custom_entities_project_name", + textanalytics_custom_entities_deployment_name="textanalytics_custom_entities_deployment_name", ) diff --git a/sdk/textanalytics/test-resources.json b/sdk/textanalytics/test-resources.json index f94060cd61e8..3f7279172b1c 100644 --- a/sdk/textanalytics/test-resources.json +++ b/sdk/textanalytics/test-resources.json @@ -101,14 +101,6 @@ "TEXTANALYTICS_TEST_ENDPOINT": { "type": "string", "value": "[variables('azureTextAnalyticsUrl')]" - }, - "AZURE_TEXT_ANALYTICS_KEY": { - "type": "string", - "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('textAnalyticsBaseName')), variables('cognitiveApiVersion')).key1]" - }, - "AZURE_TEXT_ANALYTICS_ENDPOINT": { - "type": "string", - "value": "[variables('azureTextAnalyticsUrl')]" } } } diff --git a/sdk/textanalytics/tests.yml b/sdk/textanalytics/tests.yml index b5ffb1e0e8a1..9e16b049fbed 100644 --- a/sdk/textanalytics/tests.yml +++ b/sdk/textanalytics/tests.yml @@ -5,7 +5,6 @@ stages: parameters: BuildTargetingString: $(BuildTargetingString) ServiceDirectory: textanalytics - DeployArmTemplate: true MatrixReplace: - TestSamples=.*/true EnvVars: @@ -13,6 +12,24 @@ stages: AZURE_TENANT_ID: $(aad-azure-sdk-test-tenant-id) AZURE_CLIENT_SECRET: $(aad-azure-sdk-test-client-secret) AZURE_CLIENT_ID: $(aad-azure-sdk-test-client-id) + # temporary env vars for custom text features + TEXTANALYTICS_CUSTOM_TEXT_ENDPOINT: $(js-textanalytics-test-service-endpoint) + TEXTANALYTICS_CUSTOM_TEXT_KEY: $(js-textanalytics-api-key-new) + TEXTANALYTICS_SINGLE_CATEGORY_CLASSIFY_PROJECT_NAME: $(js-single-category-classify-project-name) + TEXTANALYTICS_SINGLE_CATEGORY_CLASSIFY_DEPLOYMENT_NAME: $(js-single-category-classify-deployment-name) + TEXTANALYTICS_MULTI_CATEGORY_CLASSIFY_PROJECT_NAME: $(js-multi-category-classify-project-name) + TEXTANALYTICS_MULTI_CATEGORY_CLASSIFY_DEPLOYMENT_NAME: $(js-multi-category-classify-deployment-name) + TEXTANALYTICS_CUSTOM_ENTITIES_PROJECT_NAME: $(js-recognize-custom-entities-project-name) + TEXTANALYTICS_CUSTOM_ENTITIES_DEPLOYMENT_NAME: $(js-recognize-custom-entities-deployment-name) + # temporary env vars for custom text samples + AZURE_TEXT_ANALYTICS_ENDPOINT: $(js-textanalytics-test-service-endpoint) + AZURE_TEXT_ANALYTICS_KEY: $(js-textanalytics-api-key-new) + SINGLE_CATEGORY_CLASSIFY_PROJECT_NAME: $(js-single-category-classify-project-name) + SINGLE_CATEGORY_CLASSIFY_DEPLOYMENT_NAME: $(js-single-category-classify-deployment-name) + MULTI_CATEGORY_CLASSIFY_PROJECT_NAME: $(js-multi-category-classify-project-name) + MULTI_CATEGORY_CLASSIFY_DEPLOYMENT_NAME: $(js-multi-category-classify-deployment-name) + CUSTOM_ENTITIES_PROJECT_NAME: $(js-recognize-custom-entities-project-name) + CUSTOM_ENTITIES_DEPLOYMENT_NAME: $(js-recognize-custom-entities-deployment-name) TEST_MODE: 'RunLiveNoRecord' AZURE_SKIP_LIVE_RECORDING: 'True' AZURE_TEST_RUN_LIVE: 'true' diff --git a/sdk/translation/azure-ai-translation-document/tests/recordings/test_translation.test_empty_document.yaml b/sdk/translation/azure-ai-translation-document/tests/recordings/test_translation.test_empty_document.yaml index d100a39a7868..9b30efc0c7a5 100644 --- a/sdk/translation/azure-ai-translation-document/tests/recordings/test_translation.test_empty_document.yaml +++ b/sdk/translation/azure-ai-translation-document/tests/recordings/test_translation.test_empty_document.yaml @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.9.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:19 GMT x-ms-version: - - '2020-08-04' + - '2020-10-02' method: PUT - uri: https://redacted.blob.core.windows.net/srcdf416b05-6dc9-4082-abe5-eb606774efdd?restype=container + uri: https://redacted.blob.core.windows.net/src36942309-8863-46f6-936b-5d575faaa14f?restype=container response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:17 GMT etag: - - '"0x8D925946AC6F8E9"' + - '"0x8D994AF3AFF7E11"' last-modified: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:17 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2020-08-04' + - '2020-10-02' status: code: 201 message: Created @@ -53,15 +53,15 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.9.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:19 GMT x-ms-version: - - '2020-08-04' + - '2020-10-02' method: PUT - uri: https://redacted.blob.core.windows.net/srcdf416b05-6dc9-4082-abe5-eb606774efdd/5989239b-a0bc-4f05-a12a-b461af735d1b.txt + uri: https://redacted.blob.core.windows.net/src36942309-8863-46f6-936b-5d575faaa14f/c5313540-4db3-4459-b092-fa031504ea64.txt response: body: string: '' @@ -71,11 +71,11 @@ interactions: content-md5: - 1B2M2Y8AsgTpgAmY7PhCfg== date: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:17 GMT etag: - - '"0x8D925946ACF3C6B"' + - '"0x8D994AF3B07A945"' last-modified: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:18 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +83,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2020-08-04' + - '2020-10-02' status: code: 201 message: Created @@ -99,13 +99,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.9.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:19 GMT x-ms-version: - - '2020-08-04' + - '2020-10-02' method: PUT - uri: https://redacted.blob.core.windows.net/targetdb7fbf42-e0b4-4631-bb13-f934337437a8?restype=container + uri: https://redacted.blob.core.windows.net/target817d9058-d097-4068-8af7-4b85ddee1af2?restype=container response: body: string: '' @@ -113,21 +113,21 @@ interactions: content-length: - '0' date: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:17 GMT etag: - - '"0x8D925946AF0B2D7"' + - '"0x8D994AF3B245CA4"' last-modified: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:18 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2020-08-04' + - '2020-10-02' status: code: 201 message: Created - request: - body: '{"inputs": [{"source": {"sourceUrl": "https://redacted.blob.core.windows.net/srcdf416b05-6dc9-4082-abe5-eb606774efdd?se=end&sp=rl&sv=2020-08-04&sr=c&sig=fake_token_value", - "filter": {}}, "targets": [{"targetUrl": "https://redacted.blob.core.windows.net/targetdb7fbf42-e0b4-4631-bb13-f934337437a8?se=end&sp=rw&sv=2020-08-04&sr=c&sig=fake_token_value", + body: '{"inputs": [{"source": {"sourceUrl": "https://redacted.blob.core.windows.net/src36942309-8863-46f6-936b-5d575faaa14f?se=end&sp=rl&sv=2020-10-02&sr=c&sig=fake_token_value", + "filter": {}}, "targets": [{"targetUrl": "https://redacted.blob.core.windows.net/target817d9058-d097-4068-8af7-4b85ddee1af2?se=end&sp=wl&sv=2020-10-02&sr=c&sig=fake_token_value", "language": "es"}]}]}' headers: Accept: @@ -141,7 +141,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-translation-document/1.0.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches response: @@ -149,16 +149,16 @@ interactions: string: '' headers: apim-request-id: - - a7436c72-e39b-4ff8-b6a3-32f096beef49 + - 4d177129-d57a-4bb2-ad81-aad2d9756531 content-length: - '0' date: - - Wed, 02 Jun 2021 07:02:42 GMT + - Thu, 21 Oct 2021 16:24:18 GMT operation-location: - - https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/5948f436-c1b1-414c-9b2c-6d3af57f3021 + - https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb set-cookie: - - ARRAffinity=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com - - ARRAffinitySameSite=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + - ARRAffinity=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com + - ARRAffinitySameSite=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com strict-transport-security: - max-age=31536000; includeSubDomains; preload x-content-type-options: @@ -166,7 +166,7 @@ interactions: x-powered-by: - ASP.NET x-requestid: - - a7436c72-e39b-4ff8-b6a3-32f096beef49 + - 4d177129-d57a-4bb2-ad81-aad2d9756531 status: code: 202 message: Accepted @@ -180,15 +180,62 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-translation-document/1.0.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/5948f436-c1b1-414c-9b2c-6d3af57f3021 + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb response: body: - string: '{"id":"5948f436-c1b1-414c-9b2c-6d3af57f3021","createdDateTimeUtc":"2021-06-02T07:02:43.6134937Z","lastActionDateTimeUtc":"2021-06-02T07:02:46.2264979Z","status":"Failed","summary":{"total":1,"failed":1,"success":0,"inProgress":0,"notYetStarted":0,"cancelled":0,"totalCharacterCharged":0}}' + string: '{"id":"1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb","createdDateTimeUtc":"2021-10-21T16:24:18.9192862Z","lastActionDateTimeUtc":"2021-10-21T16:24:19.0946808Z","status":"NotStarted","summary":{"total":1,"failed":0,"success":0,"inProgress":0,"notYetStarted":1,"cancelled":0,"totalCharacterCharged":0}}' headers: apim-request-id: - - 66a1627c-042c-47af-8813-f0a31dc87cdc + - 31d16fc8-831b-418e-8f53-5888b7b51ecc + cache-control: + - public,max-age=1 + content-length: + - '292' + content-type: + - application/json; charset=utf-8 + date: + - Thu, 21 Oct 2021 16:24:19 GMT + etag: + - '"3D20CA8B8E01C88AC06D5FECF91D6B3F82EAAD3C1639AB616027418908C758C0"' + set-cookie: + - ARRAffinity=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com + - ARRAffinitySameSite=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + vary: + - Accept-Encoding + x-content-type-options: + - nosniff + x-powered-by: + - ASP.NET + x-requestid: + - 31d16fc8-831b-418e-8f53-5888b7b51ecc + status: + code: 200 + message: OK +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb + response: + body: + string: '{"id":"1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb","createdDateTimeUtc":"2021-10-21T16:24:18.9192862Z","lastActionDateTimeUtc":"2021-10-21T16:24:20.6763938Z","status":"Failed","summary":{"total":1,"failed":1,"success":0,"inProgress":0,"notYetStarted":0,"cancelled":0,"totalCharacterCharged":0}}' + headers: + apim-request-id: + - beffce8d-2b96-44ef-804c-1509c55ed285 cache-control: - public,max-age=1 content-length: @@ -196,12 +243,12 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 02 Jun 2021 07:02:47 GMT + - Thu, 21 Oct 2021 16:24:21 GMT etag: - - '"6ED5F477EBC611A428E0CC54B364CDD28525164E61F4F9439DC3BE5CD6D3B139"' + - '"34C367899FEB7BA18820DF56A932E5ED928640E8D1340109474346553ACBFDCA"' set-cookie: - - ARRAffinity=20358cd7aa5d6b0695f01ef171fc9a95880154357830e1c6bb513b73834a2e5f;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com - - ARRAffinitySameSite=20358cd7aa5d6b0695f01ef171fc9a95880154357830e1c6bb513b73834a2e5f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + - ARRAffinity=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com + - ARRAffinitySameSite=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -213,7 +260,7 @@ interactions: x-powered-by: - ASP.NET x-requestid: - - 66a1627c-042c-47af-8813-f0a31dc87cdc + - beffce8d-2b96-44ef-804c-1509c55ed285 status: code: 200 message: OK @@ -227,30 +274,30 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-ai-translation-document/1.0.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/5948f436-c1b1-414c-9b2c-6d3af57f3021/documents?$skip=0 + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/1722e8e6-3bc4-48dd-8fa5-cf1aaf978bdb/documents?$skip=0 response: body: - string: '{"value":[{"sourcePath":"https://redacted.blob.core.windows.net/srcdf416b05-6dc9-4082-abe5-eb606774efdd/5989239b-a0bc-4f05-a12a-b461af735d1b.txt","createdDateTimeUtc":"2021-06-02T07:02:45.9579201Z","lastActionDateTimeUtc":"2021-06-02T07:02:46.1811007Z","status":"Failed","to":"es","error":{"code":"InvalidRequest","message":"Document - has wrong encoding or is binary file.","target":"Document","innerError":{"code":"WrongDocumentEncoding","message":"Document - has wrong encoding or is binary file."}},"progress":0,"id":"0007ee3d-0000-0000-0000-000000000000","characterCharged":0}]}' + string: '{"value":[{"sourcePath":"https://redacted.blob.core.windows.net/src36942309-8863-46f6-936b-5d575faaa14f/c5313540-4db3-4459-b092-fa031504ea64.txt","createdDateTimeUtc":"2021-10-21T16:24:20.14822Z","lastActionDateTimeUtc":"2021-10-21T16:24:20.6538416Z","status":"Failed","to":"es","error":{"code":"InvalidRequest","message":"The + document does not have any translatable text.","target":"Document","innerError":{"code":"NoTranslatableText","message":"The + document does not have any translatable text."}},"progress":0,"id":"000efdde-0000-0000-0000-000000000000","characterCharged":0}]}' headers: apim-request-id: - - 6c6d0f4e-0902-459c-8f11-ff070e6cc466 + - 4a2a09b3-8389-489d-8b8f-4314d22c1d2d cache-control: - public,max-age=1 content-length: - - '583' + - '584' content-type: - application/json; charset=utf-8 date: - - Wed, 02 Jun 2021 07:02:48 GMT + - Thu, 21 Oct 2021 16:24:21 GMT etag: - - '"E8EDCBBF14607A5F27B97D996EC6B54935A63AD8522BF0B4E56BF307B3ED4290"' + - '"73DF7E86592D6ED984CF81F8F537CB438D65202479D8F67BB914F9D0A8FB1E2C"' set-cookie: - - ARRAffinity=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com - - ARRAffinitySameSite=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + - ARRAffinity=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;Secure;Domain=mtbatch.nam.microsofttranslator.com + - ARRAffinitySameSite=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com strict-transport-security: - max-age=31536000; includeSubDomains; preload transfer-encoding: @@ -262,7 +309,7 @@ interactions: x-powered-by: - ASP.NET x-requestid: - - 6c6d0f4e-0902-459c-8f11-ff070e6cc466 + - 4a2a09b3-8389-489d-8b8f-4314d22c1d2d status: code: 200 message: OK diff --git a/sdk/translation/azure-ai-translation-document/tests/recordings/test_translation_async.test_empty_document.yaml b/sdk/translation/azure-ai-translation-document/tests/recordings/test_translation_async.test_empty_document.yaml index d5b905f05106..812dbc16c22d 100644 --- a/sdk/translation/azure-ai-translation-document/tests/recordings/test_translation_async.test_empty_document.yaml +++ b/sdk/translation/azure-ai-translation-document/tests/recordings/test_translation_async.test_empty_document.yaml @@ -11,13 +11,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.9.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 02 Jun 2021 07:06:27 GMT + - Thu, 21 Oct 2021 16:24:38 GMT x-ms-version: - - '2020-08-04' + - '2020-10-02' method: PUT - uri: https://redacted.blob.core.windows.net/src59c590e0-2c10-453d-9afa-9c16b77301ed?restype=container + uri: https://redacted.blob.core.windows.net/srcdb5a8f58-1118-4a40-8d2a-6acb0cdd9215?restype=container response: body: string: '' @@ -25,15 +25,15 @@ interactions: content-length: - '0' date: - - Wed, 02 Jun 2021 07:06:26 GMT + - Thu, 21 Oct 2021 16:24:36 GMT etag: - - '"0x8D92594F0CCE1F1"' + - '"0x8D994AF460BC34D"' last-modified: - - Wed, 02 Jun 2021 07:06:27 GMT + - Thu, 21 Oct 2021 16:24:36 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2020-08-04' + - '2020-10-02' status: code: 201 message: Created @@ -53,15 +53,15 @@ interactions: If-None-Match: - '*' User-Agent: - - azsdk-python-storage-blob/12.9.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-blob-type: - BlockBlob x-ms-date: - - Wed, 02 Jun 2021 07:06:27 GMT + - Thu, 21 Oct 2021 16:24:38 GMT x-ms-version: - - '2020-08-04' + - '2020-10-02' method: PUT - uri: https://redacted.blob.core.windows.net/src59c590e0-2c10-453d-9afa-9c16b77301ed/fd57340a-40ff-4ae5-95ea-365c4f81e866.txt + uri: https://redacted.blob.core.windows.net/srcdb5a8f58-1118-4a40-8d2a-6acb0cdd9215/62ad42cf-bbd9-4eab-8b37-ac80c233adb4.txt response: body: string: '' @@ -71,11 +71,11 @@ interactions: content-md5: - 1B2M2Y8AsgTpgAmY7PhCfg== date: - - Wed, 02 Jun 2021 07:06:27 GMT + - Thu, 21 Oct 2021 16:24:36 GMT etag: - - '"0x8D92594F0D6D9F0"' + - '"0x8D994AF46148F7F"' last-modified: - - Wed, 02 Jun 2021 07:06:27 GMT + - Thu, 21 Oct 2021 16:24:36 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-content-crc64: @@ -83,7 +83,7 @@ interactions: x-ms-request-server-encrypted: - 'true' x-ms-version: - - '2020-08-04' + - '2020-10-02' status: code: 201 message: Created @@ -99,13 +99,13 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-storage-blob/12.9.0b1 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-storage-blob/12.9.0 Python/3.9.0 (Windows-10-10.0.19041-SP0) x-ms-date: - - Wed, 02 Jun 2021 07:06:27 GMT + - Thu, 21 Oct 2021 16:24:38 GMT x-ms-version: - - '2020-08-04' + - '2020-10-02' method: PUT - uri: https://redacted.blob.core.windows.net/target0fa43756-0efa-4c0a-a878-18612108057d?restype=container + uri: https://redacted.blob.core.windows.net/target59d9592b-9a63-4bf8-979e-9e2bcfe8c1d1?restype=container response: body: string: '' @@ -113,21 +113,21 @@ interactions: content-length: - '0' date: - - Wed, 02 Jun 2021 07:06:27 GMT + - Thu, 21 Oct 2021 16:24:35 GMT etag: - - '"0x8D92594F0F36719"' + - '"0x8D994AF4632C82D"' last-modified: - - Wed, 02 Jun 2021 07:06:27 GMT + - Thu, 21 Oct 2021 16:24:36 GMT server: - Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0 x-ms-version: - - '2020-08-04' + - '2020-10-02' status: code: 201 message: Created - request: - body: '{"inputs": [{"source": {"sourceUrl": "https://redacted.blob.core.windows.net/src59c590e0-2c10-453d-9afa-9c16b77301ed?se=end&sp=rl&sv=2020-08-04&sr=c&sig=fake_token_value", - "filter": {}}, "targets": [{"targetUrl": "https://redacted.blob.core.windows.net/target0fa43756-0efa-4c0a-a878-18612108057d?se=end&sp=rw&sv=2020-08-04&sr=c&sig=fake_token_value", + body: '{"inputs": [{"source": {"sourceUrl": "https://redacted.blob.core.windows.net/srcdb5a8f58-1118-4a40-8d2a-6acb0cdd9215?se=end&sp=rl&sv=2020-10-02&sr=c&sig=fake_token_value", + "filter": {}}, "targets": [{"targetUrl": "https://redacted.blob.core.windows.net/target59d9592b-9a63-4bf8-979e-9e2bcfe8c1d1?se=end&sp=wl&sv=2020-10-02&sr=c&sig=fake_token_value", "language": "es"}]}]}' headers: Accept: @@ -137,22 +137,22 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-ai-translation-document/1.0.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: POST uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches response: body: string: '' headers: - apim-request-id: 3d5853bf-309d-4b70-a4ac-19b5e349ad30 + apim-request-id: 93dba04f-cec0-4e0e-a1eb-bd6fd4a1d7b3 content-length: '0' - date: Wed, 02 Jun 2021 07:06:27 GMT - operation-location: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/384343e6-a44b-49e9-91ef-d62cf39d44dc - set-cookie: ARRAffinitySameSite=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + date: Thu, 21 Oct 2021 16:24:36 GMT + operation-location: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c + set-cookie: ARRAffinitySameSite=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com strict-transport-security: max-age=31536000; includeSubDomains; preload x-content-type-options: nosniff x-powered-by: ASP.NET - x-requestid: 3d5853bf-309d-4b70-a4ac-19b5e349ad30 + x-requestid: 93dba04f-cec0-4e0e-a1eb-bd6fd4a1d7b3 status: code: 202 message: Accepted @@ -161,58 +161,247 @@ interactions: body: null headers: User-Agent: - - azsdk-python-ai-translation-document/1.0.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/384343e6-a44b-49e9-91ef-d62cf39d44dc + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c response: body: - string: '{"id":"384343e6-a44b-49e9-91ef-d62cf39d44dc","createdDateTimeUtc":"2021-06-02T07:06:28.0100687Z","lastActionDateTimeUtc":"2021-06-02T07:06:31.4305067Z","status":"Failed","summary":{"total":1,"failed":1,"success":0,"inProgress":0,"notYetStarted":0,"cancelled":0,"totalCharacterCharged":0}}' + string: '{"id":"f3c58187-8cb1-4036-bad5-4623c6c1d38c","createdDateTimeUtc":"2021-10-21T16:24:37.1494371Z","lastActionDateTimeUtc":"2021-10-21T16:24:37.3617446Z","status":"NotStarted","summary":{"total":1,"failed":0,"success":0,"inProgress":0,"notYetStarted":1,"cancelled":0,"totalCharacterCharged":0}}' headers: - apim-request-id: dad6cdc0-f511-4e38-b303-3a33562d1786 + apim-request-id: ac9196a5-170f-4981-9edd-7b0847f9f26a cache-control: public,max-age=1 content-type: application/json; charset=utf-8 - date: Wed, 02 Jun 2021 07:06:32 GMT - etag: '"FCBE0E4375916D2789CAE920698E61149E07C7CD73412A2DA33D87590B727C10"' - set-cookie: ARRAffinitySameSite=20358cd7aa5d6b0695f01ef171fc9a95880154357830e1c6bb513b73834a2e5f;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + date: Thu, 21 Oct 2021 16:24:37 GMT + etag: '"BE250AB44DD1A44D7A6016BDD8368B61C8739D94283F01CA92C8B15B511E31CB"' + set-cookie: ARRAffinitySameSite=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff x-powered-by: ASP.NET - x-requestid: dad6cdc0-f511-4e38-b303-3a33562d1786 + x-requestid: ac9196a5-170f-4981-9edd-7b0847f9f26a status: code: 200 message: OK - url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/384343e6-a44b-49e9-91ef-d62cf39d44dc + url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c + response: + body: + string: '{"id":"f3c58187-8cb1-4036-bad5-4623c6c1d38c","createdDateTimeUtc":"2021-10-21T16:24:37.1494371Z","lastActionDateTimeUtc":"2021-10-21T16:24:37.3617446Z","status":"NotStarted","summary":{"total":1,"failed":0,"success":0,"inProgress":0,"notYetStarted":1,"cancelled":0,"totalCharacterCharged":0}}' + headers: + apim-request-id: 46036a87-e571-4b94-8b45-d73c059b2e93 + cache-control: public,max-age=1 + content-type: application/json; charset=utf-8 + date: Thu, 21 Oct 2021 16:24:38 GMT + etag: '"BE250AB44DD1A44D7A6016BDD8368B61C8739D94283F01CA92C8B15B511E31CB"' + set-cookie: ARRAffinitySameSite=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + vary: Accept-Encoding + x-content-type-options: nosniff + x-powered-by: ASP.NET + x-requestid: 46036a87-e571-4b94-8b45-d73c059b2e93 + status: + code: 200 + message: OK + url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c + response: + body: + string: '{"id":"f3c58187-8cb1-4036-bad5-4623c6c1d38c","createdDateTimeUtc":"2021-10-21T16:24:37.1494371Z","lastActionDateTimeUtc":"2021-10-21T16:24:37.3617446Z","status":"NotStarted","summary":{"total":1,"failed":0,"success":0,"inProgress":0,"notYetStarted":1,"cancelled":0,"totalCharacterCharged":0}}' + headers: + apim-request-id: c5255490-60e2-48d0-84ac-464b2a64e320 + cache-control: public,max-age=1 + content-type: application/json; charset=utf-8 + date: Thu, 21 Oct 2021 16:24:39 GMT + etag: '"BE250AB44DD1A44D7A6016BDD8368B61C8739D94283F01CA92C8B15B511E31CB"' + set-cookie: ARRAffinitySameSite=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + vary: Accept-Encoding + x-content-type-options: nosniff + x-powered-by: ASP.NET + x-requestid: c5255490-60e2-48d0-84ac-464b2a64e320 + status: + code: 200 + message: OK + url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c + response: + body: + string: '{"id":"f3c58187-8cb1-4036-bad5-4623c6c1d38c","createdDateTimeUtc":"2021-10-21T16:24:37.1494371Z","lastActionDateTimeUtc":"2021-10-21T16:24:37.3617446Z","status":"NotStarted","summary":{"total":1,"failed":0,"success":0,"inProgress":0,"notYetStarted":1,"cancelled":0,"totalCharacterCharged":0}}' + headers: + apim-request-id: ad51fdc6-6688-4825-870c-8274c052187a + cache-control: public,max-age=1 + content-type: application/json; charset=utf-8 + date: Thu, 21 Oct 2021 16:24:40 GMT + etag: '"BE250AB44DD1A44D7A6016BDD8368B61C8739D94283F01CA92C8B15B511E31CB"' + set-cookie: ARRAffinitySameSite=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + vary: Accept-Encoding + x-content-type-options: nosniff + x-powered-by: ASP.NET + x-requestid: ad51fdc6-6688-4825-870c-8274c052187a + status: + code: 200 + message: OK + url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c + response: + body: + string: '{"id":"f3c58187-8cb1-4036-bad5-4623c6c1d38c","createdDateTimeUtc":"2021-10-21T16:24:37.1494371Z","lastActionDateTimeUtc":"2021-10-21T16:24:37.3617446Z","status":"NotStarted","summary":{"total":1,"failed":0,"success":0,"inProgress":0,"notYetStarted":1,"cancelled":0,"totalCharacterCharged":0}}' + headers: + apim-request-id: fbd81bc3-4719-42c5-b73f-b06ce525190d + cache-control: public,max-age=1 + content-length: '325' + content-type: application/json; charset=utf-8 + date: Thu, 21 Oct 2021 16:24:41 GMT + etag: '"BE250AB44DD1A44D7A6016BDD8368B61C8739D94283F01CA92C8B15B511E31CB"' + set-cookie: ARRAffinitySameSite=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + strict-transport-security: max-age=31536000; includeSubDomains; preload + vary: Accept-Encoding + x-content-type-options: nosniff + x-powered-by: ASP.NET + x-requestid: fbd81bc3-4719-42c5-b73f-b06ce525190d + status: + code: 200 + message: OK + url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c + response: + body: + string: '{"id":"f3c58187-8cb1-4036-bad5-4623c6c1d38c","createdDateTimeUtc":"2021-10-21T16:24:37.1494371Z","lastActionDateTimeUtc":"2021-10-21T16:24:37.3617446Z","status":"NotStarted","summary":{"total":1,"failed":0,"success":0,"inProgress":0,"notYetStarted":1,"cancelled":0,"totalCharacterCharged":0}}' + headers: + apim-request-id: bccb5bd9-fcbb-45cf-8131-1d72d77888ad + cache-control: public,max-age=1 + content-type: application/json; charset=utf-8 + date: Thu, 21 Oct 2021 16:24:42 GMT + etag: '"BE250AB44DD1A44D7A6016BDD8368B61C8739D94283F01CA92C8B15B511E31CB"' + set-cookie: ARRAffinitySameSite=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + vary: Accept-Encoding + x-content-type-options: nosniff + x-powered-by: ASP.NET + x-requestid: bccb5bd9-fcbb-45cf-8131-1d72d77888ad + status: + code: 200 + message: OK + url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c + response: + body: + string: '{"id":"f3c58187-8cb1-4036-bad5-4623c6c1d38c","createdDateTimeUtc":"2021-10-21T16:24:37.1494371Z","lastActionDateTimeUtc":"2021-10-21T16:24:37.3617446Z","status":"NotStarted","summary":{"total":1,"failed":0,"success":0,"inProgress":0,"notYetStarted":1,"cancelled":0,"totalCharacterCharged":0}}' + headers: + apim-request-id: e14f241e-162c-4881-8814-1d8999800392 + cache-control: public,max-age=1 + content-type: application/json; charset=utf-8 + date: Thu, 21 Oct 2021 16:24:43 GMT + etag: '"BE250AB44DD1A44D7A6016BDD8368B61C8739D94283F01CA92C8B15B511E31CB"' + set-cookie: ARRAffinitySameSite=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + vary: Accept-Encoding + x-content-type-options: nosniff + x-powered-by: ASP.NET + x-requestid: e14f241e-162c-4881-8814-1d8999800392 + status: + code: 200 + message: OK + url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c +- request: + body: null + headers: + User-Agent: + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) + method: GET + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c + response: + body: + string: '{"id":"f3c58187-8cb1-4036-bad5-4623c6c1d38c","createdDateTimeUtc":"2021-10-21T16:24:37.1494371Z","lastActionDateTimeUtc":"2021-10-21T16:24:45.7074149Z","status":"Failed","summary":{"total":1,"failed":1,"success":0,"inProgress":0,"notYetStarted":0,"cancelled":0,"totalCharacterCharged":0}}' + headers: + apim-request-id: 128bbd4b-0b26-45d2-8279-0ea53287b857 + cache-control: public,max-age=1 + content-type: application/json; charset=utf-8 + date: Thu, 21 Oct 2021 16:24:45 GMT + etag: '"82E6FEE24F8589DBFC103B4CF53C8400EA57AF769694E02147A2C45B6F33A915"' + set-cookie: ARRAffinitySameSite=8cda94a7913d3ab33ee9f4c90adb24581c27bc03c71f0482ecf77d7381f35e6d;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + strict-transport-security: max-age=31536000; includeSubDomains; preload + transfer-encoding: chunked + vary: Accept-Encoding + x-content-type-options: nosniff + x-powered-by: ASP.NET + x-requestid: 128bbd4b-0b26-45d2-8279-0ea53287b857 + status: + code: 200 + message: OK + url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-ai-translation-document/1.0.0b2 Python/3.9.0 (Windows-10-10.0.19041-SP0) + - azsdk-python-ai-translation-document/1.0.0b5 Python/3.9.0 (Windows-10-10.0.19041-SP0) method: GET - uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/384343e6-a44b-49e9-91ef-d62cf39d44dc/documents?$skip=0 + uri: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c/documents?$skip=0 response: body: - string: '{"value":[{"sourcePath":"https://redacted.blob.core.windows.net/src59c590e0-2c10-453d-9afa-9c16b77301ed/fd57340a-40ff-4ae5-95ea-365c4f81e866.txt","createdDateTimeUtc":"2021-06-02T07:06:31.2435395Z","lastActionDateTimeUtc":"2021-06-02T07:06:31.3944075Z","status":"Failed","to":"es","error":{"code":"InvalidRequest","message":"Document - has wrong encoding or is binary file.","target":"Document","innerError":{"code":"WrongDocumentEncoding","message":"Document - has wrong encoding or is binary file."}},"progress":0,"id":"0007ee42-0000-0000-0000-000000000000","characterCharged":0}]}' + string: '{"value":[{"sourcePath":"https://redacted.blob.core.windows.net/srcdb5a8f58-1118-4a40-8d2a-6acb0cdd9215/62ad42cf-bbd9-4eab-8b37-ac80c233adb4.txt","createdDateTimeUtc":"2021-10-21T16:24:45.1710233Z","lastActionDateTimeUtc":"2021-10-21T16:24:45.6764271Z","status":"Failed","to":"es","error":{"code":"InvalidRequest","message":"The + document does not have any translatable text.","target":"Document","innerError":{"code":"NoTranslatableText","message":"The + document does not have any translatable text."}},"progress":0,"id":"000efde1-0000-0000-0000-000000000000","characterCharged":0}]}' headers: - apim-request-id: fae6de51-0756-4dd5-9c11-a77a87668c78 + apim-request-id: ce3c0ecc-bbec-4f00-bc8b-69a28863c6bc cache-control: public,max-age=1 content-type: application/json; charset=utf-8 - date: Wed, 02 Jun 2021 07:06:32 GMT - etag: '"7B165BEAED07F648B7A2C2BD13629AB9DC9311D6AA6FD68E0EB6A826315DC960"' - set-cookie: ARRAffinitySameSite=0ff46fa6d58b00f2d44b7073721903c0eace480139d8ecfc38f61130af5e1587;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com + date: Thu, 21 Oct 2021 16:24:45 GMT + etag: '"92C7DDA63277AAB0029A30C3BA18DEBE015CF09A2E67CC7A7484525E52C09873"' + set-cookie: ARRAffinitySameSite=09a10d9e036c982a6acf1ed7f4e9558b44845127dddc55af67b87cd656dd4d77;Path=/;HttpOnly;SameSite=None;Secure;Domain=mtbatch.nam.microsofttranslator.com strict-transport-security: max-age=31536000; includeSubDomains; preload transfer-encoding: chunked vary: Accept-Encoding x-content-type-options: nosniff x-powered-by: ASP.NET - x-requestid: fae6de51-0756-4dd5-9c11-a77a87668c78 + x-requestid: ce3c0ecc-bbec-4f00-bc8b-69a28863c6bc status: code: 200 message: OK - url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/384343e6-a44b-49e9-91ef-d62cf39d44dc/documents?$skip=0 + url: https://redacted.cognitiveservices.azure.com/translator/text/batch/v1.0/batches/f3c58187-8cb1-4036-bad5-4623c6c1d38c/documents?$skip=0 version: 1 diff --git a/sdk/translation/azure-ai-translation-document/tests/test_translation.py b/sdk/translation/azure-ai-translation-document/tests/test_translation.py index b5a763adef77..ecaccc1e3da3 100644 --- a/sdk/translation/azure-ai-translation-document/tests/test_translation.py +++ b/sdk/translation/azure-ai-translation-document/tests/test_translation.py @@ -355,7 +355,7 @@ def test_empty_document(self, client): for doc in result: assert doc.status == "Failed" - assert doc.error.code == "WrongDocumentEncoding" + assert doc.error.code == "NoTranslatableText" @DocumentTranslationPreparer() @DocumentTranslationClientPreparer() diff --git a/sdk/translation/azure-ai-translation-document/tests/test_translation_async.py b/sdk/translation/azure-ai-translation-document/tests/test_translation_async.py index ff828e6dbcdf..d75dff93c780 100644 --- a/sdk/translation/azure-ai-translation-document/tests/test_translation_async.py +++ b/sdk/translation/azure-ai-translation-document/tests/test_translation_async.py @@ -352,7 +352,7 @@ async def test_empty_document(self, client): async for doc in result: assert doc.status == "Failed" - assert doc.error.code == "WrongDocumentEncoding" + assert doc.error.code == "NoTranslatableText" @DocumentTranslationPreparer() @DocumentTranslationClientPreparer() diff --git a/sdk/translation/tests.yml b/sdk/translation/tests.yml index 2dad0c62e8bd..8d46c6742c50 100644 --- a/sdk/translation/tests.yml +++ b/sdk/translation/tests.yml @@ -3,7 +3,6 @@ trigger: none stages: - template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml parameters: - DeployArmTemplate: true BuildTargetingString: azure-ai-translation-document ServiceDirectory: translation MatrixReplace: diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md index 4b7f8c58ec3e..5974d1df8356 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/CHANGELOG.md @@ -1,8 +1,24 @@ # Release History -## 1.0.0b2 (2021-05-24) +## 1.0.0b4 (Unreleased) -- Updated title and description of the package and updates to readme +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + +## 1.0.0b3 (2021-11-09) + +- Added device discovery and device detail request for ONVIF enabled devices. +- Added Remote Device Adapter configuration for ingesting video in a private network +- Added retention policy to VideoSink + +## 1.0.0b2 (2021-05-19) + +- Updated the title and description of the package. ## 1.0.0b1 (2021-05-19) diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/README.md b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/README.md index 5be3e445bb8c..c5b81498ac9b 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/README.md +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/README.md @@ -1,6 +1,6 @@ # Azure Video Analyzer Edge client library for Python -Azure Video Analyzer provides a platform to build intelligent video applications that span the edge and the cloud. The platform offers the capability to capture, record, and analyze live video along with publishing the results, video and video analytics, to Azure services in the cloud or the edge. It is designed to be an extensible platform, enabling you to connect different video analysis edge modules (such as Cognitive services containers, custom edge modules built by you with open-source machine learning models or custom models trained with your own data) to it and use them to analyze live video without worrying about the complexity of building and running a live video pipeline. +Azure Video Analyzer is an [Azure Applied AI Service][applied-ai-service] that provides a platform for you to build intelligent video applications that can span both edge and cloud infrastructures. The platform offers the capability to capture, record, and analyze live video along with publishing the results, video and video analytics, to Azure services at the edge or in the cloud. It is designed to be an extensible platform, enabling you to connect different video inferencing edge modules such as Cognitive services modules, or custom inferencing modules that have been trained with your own data using either open-source machine learning or [Azure Machine Learning][machine-learning]. Use the client library for Video Analyzer Edge to: @@ -28,6 +28,8 @@ pip install azure-media-videoanalyzer-edge | SDK | Video Analyzer edge module | |---|---| + | 1.0.0b3 | 1.1 | + | 1.0.0b2 | 1.0 | | 1.0.0b1 | 1.0 | ### Creating a pipeline topology and making requests @@ -148,3 +150,5 @@ additional questions or comments. [iot-device-sdk]: https://pypi.org/project/azure-iot-device/ [iot-hub-sdk]: https://pypi.org/project/azure-iot-hub/ [github-page-issues]: https://github.com/Azure/azure-sdk-for-python/issues +[applied-ai-service]: https://azure.microsoft.com/product-categories/applied-ai-services/#services +[machine-learning]: https://azure.microsoft.com/services/machine-learning diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/__init__.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/__init__.py index c30621a55bb6..4a86b4aac81a 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/__init__.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/__init__.py @@ -27,3 +27,12 @@ def _OverrideInstanceSetRequestSerialize(self): return live_pipeline_body.serialize() LivePipelineSetRequest.serialize = _OverrideInstanceSetRequestSerialize + +def _OverrideRemoteDeviceAdapterSetRequestSerialize(self): + remote_device_adapter_body = RemoteDeviceAdapterSetRequestBody(name=self.remote_device_adapter.name) + remote_device_adapter_body.system_data = self.remote_device_adapter.system_data + remote_device_adapter_body.properties = self.remote_device_adapter.properties + + return remote_device_adapter_body.serialize() + +RemoteDeviceAdapterSetRequest.serialize = _OverrideRemoteDeviceAdapterSetRequestSerialize diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/_vendor.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/_vendor.py new file mode 100644 index 000000000000..9a223d15524c --- /dev/null +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/_vendor.py @@ -0,0 +1,15 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from azure.core.pipeline.transport import HttpRequest + +def _convert_request(request, files=None): + data = request.content if not files else None + request = HttpRequest(method=request.method, url=request.url, headers=request.headers, data=data) + if files: + request.set_formdata_body(files) + return request diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/__init__.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/__init__.py index 9604f73040dc..097ed5f499bd 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/__init__.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/__init__.py @@ -10,11 +10,14 @@ from ._models_py3 import CertificateSource from ._models_py3 import CognitiveServicesVisionProcessor from ._models_py3 import CredentialsBase + from ._models_py3 import DiscoveredOnvifDevice + from ._models_py3 import DiscoveredOnvifDeviceCollection from ._models_py3 import EndpointBase from ._models_py3 import ExtensionProcessorBase from ._models_py3 import FileSink from ._models_py3 import GrpcExtension from ._models_py3 import GrpcExtensionDataTransfer + from ._models_py3 import H264Configuration from ._models_py3 import HttpExtension from ._models_py3 import HttpHeaderCredentials from ._models_py3 import ImageFormatBmp @@ -24,6 +27,7 @@ from ._models_py3 import ImageFormatRaw from ._models_py3 import ImageProperties from ._models_py3 import ImageScale + from ._models_py3 import IotHubDeviceConnection from ._models_py3 import IotHubMessageSink from ._models_py3 import IotHubMessageSource from ._models_py3 import LineCrossingProcessor @@ -37,6 +41,9 @@ from ._models_py3 import LivePipelineProperties from ._models_py3 import LivePipelineSetRequest from ._models_py3 import LivePipelineSetRequestBody + from ._models_py3 import MPEG4Configuration + from ._models_py3 import MediaProfile + from ._models_py3 import MediaUri from ._models_py3 import MethodRequest from ._models_py3 import MethodRequestEmptyBodyBase from ._models_py3 import MotionDetectionProcessor @@ -46,6 +53,12 @@ from ._models_py3 import NamedPolygonString from ._models_py3 import NodeInput from ._models_py3 import ObjectTrackingProcessor + from ._models_py3 import OnvifDevice + from ._models_py3 import OnvifDeviceDiscoverRequest + from ._models_py3 import OnvifDeviceGetRequest + from ._models_py3 import OnvifDns + from ._models_py3 import OnvifHostName + from ._models_py3 import OnvifSystemDateTime from ._models_py3 import OutputSelector from ._models_py3 import ParameterDeclaration from ._models_py3 import ParameterDefinition @@ -59,6 +72,16 @@ from ._models_py3 import PipelineTopologySetRequest from ._models_py3 import PipelineTopologySetRequestBody from ._models_py3 import ProcessorNodeBase + from ._models_py3 import RateControl + from ._models_py3 import RemoteDeviceAdapter + from ._models_py3 import RemoteDeviceAdapterCollection + from ._models_py3 import RemoteDeviceAdapterDeleteRequest + from ._models_py3 import RemoteDeviceAdapterGetRequest + from ._models_py3 import RemoteDeviceAdapterListRequest + from ._models_py3 import RemoteDeviceAdapterProperties + from ._models_py3 import RemoteDeviceAdapterSetRequest + from ._models_py3 import RemoteDeviceAdapterSetRequestBody + from ._models_py3 import RemoteDeviceAdapterTarget from ._models_py3 import RtspSource from ._models_py3 import SamplingOptions from ._models_py3 import SignalGateProcessor @@ -80,22 +103,29 @@ from ._models_py3 import SpatialAnalysisPersonZoneCrossingOperation from ._models_py3 import SpatialAnalysisPersonZoneCrossingZoneEvents from ._models_py3 import SpatialAnalysisTypedOperationBase + from ._models_py3 import SymmetricKeyCredentials from ._models_py3 import SystemData from ._models_py3 import TlsEndpoint from ._models_py3 import TlsValidationOptions from ._models_py3 import UnsecuredEndpoint from ._models_py3 import UsernamePasswordCredentials from ._models_py3 import VideoCreationProperties + from ._models_py3 import VideoEncoderConfiguration + from ._models_py3 import VideoPublishingOptions + from ._models_py3 import VideoResolution from ._models_py3 import VideoSink except (SyntaxError, ImportError): from ._models import CertificateSource # type: ignore from ._models import CognitiveServicesVisionProcessor # type: ignore from ._models import CredentialsBase # type: ignore + from ._models import DiscoveredOnvifDevice # type: ignore + from ._models import DiscoveredOnvifDeviceCollection # type: ignore from ._models import EndpointBase # type: ignore from ._models import ExtensionProcessorBase # type: ignore from ._models import FileSink # type: ignore from ._models import GrpcExtension # type: ignore from ._models import GrpcExtensionDataTransfer # type: ignore + from ._models import H264Configuration # type: ignore from ._models import HttpExtension # type: ignore from ._models import HttpHeaderCredentials # type: ignore from ._models import ImageFormatBmp # type: ignore @@ -105,6 +135,7 @@ from ._models import ImageFormatRaw # type: ignore from ._models import ImageProperties # type: ignore from ._models import ImageScale # type: ignore + from ._models import IotHubDeviceConnection # type: ignore from ._models import IotHubMessageSink # type: ignore from ._models import IotHubMessageSource # type: ignore from ._models import LineCrossingProcessor # type: ignore @@ -118,6 +149,9 @@ from ._models import LivePipelineProperties # type: ignore from ._models import LivePipelineSetRequest # type: ignore from ._models import LivePipelineSetRequestBody # type: ignore + from ._models import MPEG4Configuration # type: ignore + from ._models import MediaProfile # type: ignore + from ._models import MediaUri # type: ignore from ._models import MethodRequest # type: ignore from ._models import MethodRequestEmptyBodyBase # type: ignore from ._models import MotionDetectionProcessor # type: ignore @@ -127,6 +161,12 @@ from ._models import NamedPolygonString # type: ignore from ._models import NodeInput # type: ignore from ._models import ObjectTrackingProcessor # type: ignore + from ._models import OnvifDevice # type: ignore + from ._models import OnvifDeviceDiscoverRequest # type: ignore + from ._models import OnvifDeviceGetRequest # type: ignore + from ._models import OnvifDns # type: ignore + from ._models import OnvifHostName # type: ignore + from ._models import OnvifSystemDateTime # type: ignore from ._models import OutputSelector # type: ignore from ._models import ParameterDeclaration # type: ignore from ._models import ParameterDefinition # type: ignore @@ -140,6 +180,16 @@ from ._models import PipelineTopologySetRequest # type: ignore from ._models import PipelineTopologySetRequestBody # type: ignore from ._models import ProcessorNodeBase # type: ignore + from ._models import RateControl # type: ignore + from ._models import RemoteDeviceAdapter # type: ignore + from ._models import RemoteDeviceAdapterCollection # type: ignore + from ._models import RemoteDeviceAdapterDeleteRequest # type: ignore + from ._models import RemoteDeviceAdapterGetRequest # type: ignore + from ._models import RemoteDeviceAdapterListRequest # type: ignore + from ._models import RemoteDeviceAdapterProperties # type: ignore + from ._models import RemoteDeviceAdapterSetRequest # type: ignore + from ._models import RemoteDeviceAdapterSetRequestBody # type: ignore + from ._models import RemoteDeviceAdapterTarget # type: ignore from ._models import RtspSource # type: ignore from ._models import SamplingOptions # type: ignore from ._models import SignalGateProcessor # type: ignore @@ -161,21 +211,28 @@ from ._models import SpatialAnalysisPersonZoneCrossingOperation # type: ignore from ._models import SpatialAnalysisPersonZoneCrossingZoneEvents # type: ignore from ._models import SpatialAnalysisTypedOperationBase # type: ignore + from ._models import SymmetricKeyCredentials # type: ignore from ._models import SystemData # type: ignore from ._models import TlsEndpoint # type: ignore from ._models import TlsValidationOptions # type: ignore from ._models import UnsecuredEndpoint # type: ignore from ._models import UsernamePasswordCredentials # type: ignore from ._models import VideoCreationProperties # type: ignore + from ._models import VideoEncoderConfiguration # type: ignore + from ._models import VideoPublishingOptions # type: ignore + from ._models import VideoResolution # type: ignore from ._models import VideoSink # type: ignore from ._azure_video_analyzerfor_edge_enums import ( GrpcExtensionDataTransferMode, + H264Profile, ImageFormatRawPixelFormat, ImageScaleMode, LivePipelineState, + MPEG4Profile, MotionDetectionSensitivity, ObjectTrackingAccuracy, + OnvifSystemDateTimeType, OutputSelectorOperator, OutputSelectorProperty, ParameterType, @@ -184,17 +241,21 @@ SpatialAnalysisPersonCountEventTrigger, SpatialAnalysisPersonDistanceEventTrigger, SpatialAnalysisPersonZoneCrossingEventType, + VideoEncoding, ) __all__ = [ 'CertificateSource', 'CognitiveServicesVisionProcessor', 'CredentialsBase', + 'DiscoveredOnvifDevice', + 'DiscoveredOnvifDeviceCollection', 'EndpointBase', 'ExtensionProcessorBase', 'FileSink', 'GrpcExtension', 'GrpcExtensionDataTransfer', + 'H264Configuration', 'HttpExtension', 'HttpHeaderCredentials', 'ImageFormatBmp', @@ -204,6 +265,7 @@ 'ImageFormatRaw', 'ImageProperties', 'ImageScale', + 'IotHubDeviceConnection', 'IotHubMessageSink', 'IotHubMessageSource', 'LineCrossingProcessor', @@ -217,6 +279,9 @@ 'LivePipelineProperties', 'LivePipelineSetRequest', 'LivePipelineSetRequestBody', + 'MPEG4Configuration', + 'MediaProfile', + 'MediaUri', 'MethodRequest', 'MethodRequestEmptyBodyBase', 'MotionDetectionProcessor', @@ -226,6 +291,12 @@ 'NamedPolygonString', 'NodeInput', 'ObjectTrackingProcessor', + 'OnvifDevice', + 'OnvifDeviceDiscoverRequest', + 'OnvifDeviceGetRequest', + 'OnvifDns', + 'OnvifHostName', + 'OnvifSystemDateTime', 'OutputSelector', 'ParameterDeclaration', 'ParameterDefinition', @@ -239,6 +310,16 @@ 'PipelineTopologySetRequest', 'PipelineTopologySetRequestBody', 'ProcessorNodeBase', + 'RateControl', + 'RemoteDeviceAdapter', + 'RemoteDeviceAdapterCollection', + 'RemoteDeviceAdapterDeleteRequest', + 'RemoteDeviceAdapterGetRequest', + 'RemoteDeviceAdapterListRequest', + 'RemoteDeviceAdapterProperties', + 'RemoteDeviceAdapterSetRequest', + 'RemoteDeviceAdapterSetRequestBody', + 'RemoteDeviceAdapterTarget', 'RtspSource', 'SamplingOptions', 'SignalGateProcessor', @@ -260,19 +341,26 @@ 'SpatialAnalysisPersonZoneCrossingOperation', 'SpatialAnalysisPersonZoneCrossingZoneEvents', 'SpatialAnalysisTypedOperationBase', + 'SymmetricKeyCredentials', 'SystemData', 'TlsEndpoint', 'TlsValidationOptions', 'UnsecuredEndpoint', 'UsernamePasswordCredentials', 'VideoCreationProperties', + 'VideoEncoderConfiguration', + 'VideoPublishingOptions', + 'VideoResolution', 'VideoSink', 'GrpcExtensionDataTransferMode', + 'H264Profile', 'ImageFormatRawPixelFormat', 'ImageScaleMode', 'LivePipelineState', + 'MPEG4Profile', 'MotionDetectionSensitivity', 'ObjectTrackingAccuracy', + 'OnvifSystemDateTimeType', 'OutputSelectorOperator', 'OutputSelectorProperty', 'ParameterType', @@ -281,4 +369,5 @@ 'SpatialAnalysisPersonCountEventTrigger', 'SpatialAnalysisPersonDistanceEventTrigger', 'SpatialAnalysisPersonZoneCrossingEventType', + 'VideoEncoding', ] diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_azure_video_analyzerfor_edge_enums.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_azure_video_analyzerfor_edge_enums.py index 3b80cbeecd08..35371307bdbb 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_azure_video_analyzerfor_edge_enums.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_azure_video_analyzerfor_edge_enums.py @@ -6,27 +6,12 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum, EnumMeta +from enum import Enum from six import with_metaclass +from azure.core import CaseInsensitiveEnumMeta -class _CaseInsensitiveEnumMeta(EnumMeta): - def __getitem__(self, name): - return super().__getitem__(name.upper()) - def __getattr__(cls, name): - """Return the enum member matching `name` - We use __getattr__ instead of descriptors or inserting into the enum - class' __dict__ in order to support `name` and `value` being both - properties for enum members (which live in the class' __dict__) and - enum members themselves. - """ - try: - return cls._member_map_[name.upper()] - except KeyError: - raise AttributeError(name) - - -class GrpcExtensionDataTransferMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class GrpcExtensionDataTransferMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Data transfer mode: embedded or sharedMemory. """ @@ -39,7 +24,16 @@ class GrpcExtensionDataTransferMode(with_metaclass(_CaseInsensitiveEnumMeta, str #: sharing the same shared memory space. SHARED_MEMORY = "sharedMemory" -class ImageFormatRawPixelFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class H264Profile(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The H264 Profile + """ + + BASELINE = "Baseline" + MAIN = "Main" + EXTENDED = "Extended" + HIGH = "High" + +class ImageFormatRawPixelFormat(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Pixel format to be applied to the raw image. """ @@ -66,7 +60,7 @@ class ImageFormatRawPixelFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, En #: Packed BGRA 8:8:8:8, 32bpp, BGRABGRA. BGRA = "bgra" -class ImageScaleMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ImageScaleMode(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Describes the image scaling mode to be applied. Default mode is 'pad'. """ @@ -82,7 +76,7 @@ class ImageScaleMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: Stretches the original image so it resized to the specified dimensions. STRETCH = "stretch" -class LivePipelineState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class LivePipelineState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Current pipeline state (read-only). """ @@ -98,7 +92,7 @@ class LivePipelineState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: The live pipeline is transitioning into the inactive state. DEACTIVATING = "deactivating" -class MotionDetectionSensitivity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class MotionDetectionSensitivity(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Motion detection sensitivity: low, medium, high. """ @@ -109,7 +103,16 @@ class MotionDetectionSensitivity(with_metaclass(_CaseInsensitiveEnumMeta, str, E #: High sensitivity. HIGH = "high" -class ObjectTrackingAccuracy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class MPEG4Profile(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The MPEG4 Profile + """ + + #: Simple Profile. + SP = "SP" + #: Advanced Simple Profile. + ASP = "ASP" + +class ObjectTrackingAccuracy(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Object tracker accuracy: low, medium, high. Higher accuracy leads to higher CPU consumption in average. """ @@ -121,7 +124,14 @@ class ObjectTrackingAccuracy(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) #: High accuracy. HIGH = "high" -class OutputSelectorOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OnvifSystemDateTimeType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """An enum value determining whether the date time was configured using NTP or manual. + """ + + NTP = "Ntp" + MANUAL = "Manual" + +class OutputSelectorOperator(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The operator to compare properties by. """ @@ -130,14 +140,14 @@ class OutputSelectorOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) #: The property is not of the type defined by value. IS_NOT = "isNot" -class OutputSelectorProperty(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class OutputSelectorProperty(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The property of the data stream to be used as the selection criteria. """ #: The stream's MIME type or subtype: audio, video or application. MEDIA_TYPE = "mediaType" -class ParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class ParameterType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Type of the parameter. """ @@ -152,7 +162,7 @@ class ParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: The parameter's value is a boolean value that is either true or false. BOOL = "bool" -class RtspTransport(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class RtspTransport(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged through long lived HTTP connections, and the RTP packages are interleaved in the HTTP @@ -166,7 +176,7 @@ class RtspTransport(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: channel. TCP = "tcp" -class SpatialAnalysisOperationFocus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SpatialAnalysisOperationFocus(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The operation focus type. """ @@ -177,7 +187,7 @@ class SpatialAnalysisOperationFocus(with_metaclass(_CaseInsensitiveEnumMeta, str #: The footprint. FOOTPRINT = "footprint" -class SpatialAnalysisPersonCountEventTrigger(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SpatialAnalysisPersonCountEventTrigger(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The event trigger type. """ @@ -186,7 +196,7 @@ class SpatialAnalysisPersonCountEventTrigger(with_metaclass(_CaseInsensitiveEnum #: Interval trigger. INTERVAL = "interval" -class SpatialAnalysisPersonDistanceEventTrigger(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SpatialAnalysisPersonDistanceEventTrigger(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The event trigger type. """ @@ -195,7 +205,7 @@ class SpatialAnalysisPersonDistanceEventTrigger(with_metaclass(_CaseInsensitiveE #: Interval trigger. INTERVAL = "interval" -class SpatialAnalysisPersonZoneCrossingEventType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): +class SpatialAnalysisPersonZoneCrossingEventType(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The event type. """ @@ -203,3 +213,14 @@ class SpatialAnalysisPersonZoneCrossingEventType(with_metaclass(_CaseInsensitive ZONE_CROSSING = "zoneCrossing" #: Zone dwell time event type. ZONE_DWELL_TIME = "zoneDwellTime" + +class VideoEncoding(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): + """The video codec used by the Media Profile. + """ + + #: The Media Profile uses JPEG encoding. + JPEG = "JPEG" + #: The Media Profile uses H264 encoding. + H264 = "H264" + #: The Media Profile uses MPEG4 encoding. + MPEG4 = "MPEG4" diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models.py index e0bc4bb2f07f..fc9639f4f6ac 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models.py @@ -17,8 +17,8 @@ class CertificateSource(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -37,6 +37,8 @@ def __init__( self, **kwargs ): + """ + """ super(CertificateSource, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -49,13 +51,13 @@ class ProcessorNodeBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] """ _validation = { @@ -78,6 +80,13 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + """ super(ProcessorNodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = kwargs['name'] @@ -89,23 +98,23 @@ class CognitiveServicesVisionProcessor(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param endpoint: Required. Endpoint to which this processor should connect. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase - :param image: Describes the parameters of the image that is sent as input to the endpoint. - :type image: ~azure.media.videoanalyzer.edge.models.ImageProperties - :param sampling_options: Describes the sampling options to be applied when forwarding samples - to the extension. - :type sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions - :param operation: Required. Describes the Spatial Analysis operation to be used in the - Cognitive Services Vision processor. - :type operation: ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationBase + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar endpoint: Required. Endpoint to which this processor should connect. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :ivar image: Describes the parameters of the image that is sent as input to the endpoint. + :vartype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :ivar sampling_options: Describes the sampling options to be applied when forwarding samples to + the extension. + :vartype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :ivar operation: Required. Describes the Spatial Analysis operation to be used in the Cognitive + Services Vision processor. + :vartype operation: ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationBase """ _validation = { @@ -130,6 +139,23 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword endpoint: Required. Endpoint to which this processor should connect. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :keyword image: Describes the parameters of the image that is sent as input to the endpoint. + :paramtype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :keyword sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :keyword operation: Required. Describes the Spatial Analysis operation to be used in the + Cognitive Services Vision processor. + :paramtype operation: ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationBase + """ super(CognitiveServicesVisionProcessor, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor' # type: str self.endpoint = kwargs['endpoint'] @@ -142,12 +168,12 @@ class CredentialsBase(msrest.serialization.Model): """Base class for credential objects. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: HttpHeaderCredentials, UsernamePasswordCredentials. + sub-classes are: HttpHeaderCredentials, SymmetricKeyCredentials, UsernamePasswordCredentials. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -159,17 +185,92 @@ class CredentialsBase(msrest.serialization.Model): } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.HttpHeaderCredentials': 'HttpHeaderCredentials', '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} + 'type': {'#Microsoft.VideoAnalyzer.HttpHeaderCredentials': 'HttpHeaderCredentials', '#Microsoft.VideoAnalyzer.SymmetricKeyCredentials': 'SymmetricKeyCredentials', '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} } def __init__( self, **kwargs ): + """ + """ super(CredentialsBase, self).__init__(**kwargs) self.type = None # type: Optional[str] +class DiscoveredOnvifDevice(msrest.serialization.Model): + """The discovered properties of the ONVIF device that are returned during the discovery. + + :ivar service_identifier: The unique identifier of the ONVIF device that was discovered in the + same subnet as the IoT Edge device. + :vartype service_identifier: str + :ivar remote_ip_address: The IP address of the ONVIF device that was discovered in the same + subnet as the IoT Edge device. + :vartype remote_ip_address: str + :ivar scopes: An array of hostnames for the ONVIF discovered devices that are in the same + subnet as the IoT Edge device. + :vartype scopes: list[str] + :ivar endpoints: An array of media profile endpoints that the ONVIF discovered device supports. + :vartype endpoints: list[str] + """ + + _attribute_map = { + 'service_identifier': {'key': 'serviceIdentifier', 'type': 'str'}, + 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'endpoints': {'key': 'endpoints', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword service_identifier: The unique identifier of the ONVIF device that was discovered in + the same subnet as the IoT Edge device. + :paramtype service_identifier: str + :keyword remote_ip_address: The IP address of the ONVIF device that was discovered in the same + subnet as the IoT Edge device. + :paramtype remote_ip_address: str + :keyword scopes: An array of hostnames for the ONVIF discovered devices that are in the same + subnet as the IoT Edge device. + :paramtype scopes: list[str] + :keyword endpoints: An array of media profile endpoints that the ONVIF discovered device + supports. + :paramtype endpoints: list[str] + """ + super(DiscoveredOnvifDevice, self).__init__(**kwargs) + self.service_identifier = kwargs.get('service_identifier', None) + self.remote_ip_address = kwargs.get('remote_ip_address', None) + self.scopes = kwargs.get('scopes', None) + self.endpoints = kwargs.get('endpoints', None) + + +class DiscoveredOnvifDeviceCollection(msrest.serialization.Model): + """A list of ONVIF devices that were discovered in the same subnet as the IoT Edge device. + + :ivar value: An array of ONVIF devices that have been discovered in the same subnet as the IoT + Edge device. + :vartype value: list[~azure.media.videoanalyzer.edge.models.DiscoveredOnvifDevice] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiscoveredOnvifDevice]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: An array of ONVIF devices that have been discovered in the same subnet as the + IoT Edge device. + :paramtype value: list[~azure.media.videoanalyzer.edge.models.DiscoveredOnvifDevice] + """ + super(DiscoveredOnvifDeviceCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + class EndpointBase(msrest.serialization.Model): """Base class for endpoints. @@ -178,12 +279,12 @@ class EndpointBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param credentials: Credentials to be presented to the endpoint. - :type credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase - :param url: Required. The endpoint URL for Video Analyzer to connect to. - :type url: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar credentials: Credentials to be presented to the endpoint. + :vartype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :ivar url: Required. The endpoint URL for Video Analyzer to connect to. + :vartype url: str """ _validation = { @@ -205,6 +306,12 @@ def __init__( self, **kwargs ): + """ + :keyword credentials: Credentials to be presented to the endpoint. + :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :keyword url: Required. The endpoint URL for Video Analyzer to connect to. + :paramtype url: str + """ super(EndpointBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.credentials = kwargs.get('credentials', None) @@ -219,21 +326,21 @@ class ExtensionProcessorBase(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param endpoint: Required. Endpoint details of the pipeline extension plugin. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase - :param image: Required. Image transformations and formatting options to be applied to the video + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar endpoint: Required. Endpoint details of the pipeline extension plugin. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :ivar image: Required. Image transformations and formatting options to be applied to the video frame(s) prior submission to the pipeline extension plugin. - :type image: ~azure.media.videoanalyzer.edge.models.ImageProperties - :param sampling_options: Media sampling parameters that define how often media is submitted to + :vartype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :ivar sampling_options: Media sampling parameters that define how often media is submitted to the extension plugin. - :type sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :vartype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions """ _validation = { @@ -261,6 +368,21 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword endpoint: Required. Endpoint details of the pipeline extension plugin. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :keyword image: Required. Image transformations and formatting options to be applied to the + video frame(s) prior submission to the pipeline extension plugin. + :paramtype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :keyword sampling_options: Media sampling parameters that define how often media is submitted + to the extension plugin. + :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + """ super(ExtensionProcessorBase, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ExtensionProcessorBase' # type: str self.endpoint = kwargs['endpoint'] @@ -276,13 +398,13 @@ class SinkNodeBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] """ _validation = { @@ -305,6 +427,13 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + """ super(SinkNodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = kwargs['name'] @@ -316,22 +445,22 @@ class FileSink(SinkNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param base_directory_path: Required. Absolute directory path where media files will be stored. - :type base_directory_path: str - :param file_name_pattern: Required. File name pattern for creating new files when performing + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar base_directory_path: Required. Absolute directory path where media files will be stored. + :vartype base_directory_path: str + :ivar file_name_pattern: Required. File name pattern for creating new files when performing event based recording. The pattern must include at least one system variable. - :type file_name_pattern: str - :param maximum_size_mi_b: Required. Maximum amount of disk space that can be used for storing + :vartype file_name_pattern: str + :ivar maximum_size_mi_b: Required. Maximum amount of disk space that can be used for storing files from this sink. Once this limit is reached, the oldest files from this sink will be automatically deleted. - :type maximum_size_mi_b: str + :vartype maximum_size_mi_b: str """ _validation = { @@ -356,6 +485,23 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword base_directory_path: Required. Absolute directory path where media files will be + stored. + :paramtype base_directory_path: str + :keyword file_name_pattern: Required. File name pattern for creating new files when performing + event based recording. The pattern must include at least one system variable. + :paramtype file_name_pattern: str + :keyword maximum_size_mi_b: Required. Maximum amount of disk space that can be used for storing + files from this sink. Once this limit is reached, the oldest files from this sink will be + automatically deleted. + :paramtype maximum_size_mi_b: str + """ super(FileSink, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.FileSink' # type: str self.base_directory_path = kwargs['base_directory_path'] @@ -368,27 +514,27 @@ class GrpcExtension(ExtensionProcessorBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param endpoint: Required. Endpoint details of the pipeline extension plugin. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase - :param image: Required. Image transformations and formatting options to be applied to the video + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar endpoint: Required. Endpoint details of the pipeline extension plugin. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :ivar image: Required. Image transformations and formatting options to be applied to the video frame(s) prior submission to the pipeline extension plugin. - :type image: ~azure.media.videoanalyzer.edge.models.ImageProperties - :param sampling_options: Media sampling parameters that define how often media is submitted to + :vartype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :ivar sampling_options: Media sampling parameters that define how often media is submitted to the extension plugin. - :type sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions - :param data_transfer: Required. Specifies how media is transferred to the extension plugin. - :type data_transfer: ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransfer - :param extension_configuration: An optional configuration string that is sent to the extension + :vartype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :ivar data_transfer: Required. Specifies how media is transferred to the extension plugin. + :vartype data_transfer: ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransfer + :ivar extension_configuration: An optional configuration string that is sent to the extension plugin. The configuration string is specific to each custom extension and it not understood neither validated by Video Analyzer. Please see https://aka.ms/ava-extension-grpc for details. - :type extension_configuration: str + :vartype extension_configuration: str """ _validation = { @@ -415,6 +561,28 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword endpoint: Required. Endpoint details of the pipeline extension plugin. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :keyword image: Required. Image transformations and formatting options to be applied to the + video frame(s) prior submission to the pipeline extension plugin. + :paramtype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :keyword sampling_options: Media sampling parameters that define how often media is submitted + to the extension plugin. + :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :keyword data_transfer: Required. Specifies how media is transferred to the extension plugin. + :paramtype data_transfer: ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransfer + :keyword extension_configuration: An optional configuration string that is sent to the + extension plugin. The configuration string is specific to each custom extension and it not + understood neither validated by Video Analyzer. Please see https://aka.ms/ava-extension-grpc + for details. + :paramtype extension_configuration: str + """ super(GrpcExtension, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.GrpcExtension' # type: str self.data_transfer = kwargs['data_transfer'] @@ -426,12 +594,12 @@ class GrpcExtensionDataTransfer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param shared_memory_size_mi_b: The share memory buffer for sample transfers, in mebibytes. It + :ivar shared_memory_size_mi_b: The share memory buffer for sample transfers, in mebibytes. It can only be used with the 'SharedMemory' transfer mode. - :type shared_memory_size_mi_b: str - :param mode: Required. Data transfer mode: embedded or sharedMemory. Possible values include: + :vartype shared_memory_size_mi_b: str + :ivar mode: Required. Data transfer mode: embedded or sharedMemory. Possible values include: "embedded", "sharedMemory". - :type mode: str or ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransferMode + :vartype mode: str or ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransferMode """ _validation = { @@ -447,31 +615,70 @@ def __init__( self, **kwargs ): + """ + :keyword shared_memory_size_mi_b: The share memory buffer for sample transfers, in mebibytes. + It can only be used with the 'SharedMemory' transfer mode. + :paramtype shared_memory_size_mi_b: str + :keyword mode: Required. Data transfer mode: embedded or sharedMemory. Possible values include: + "embedded", "sharedMemory". + :paramtype mode: str or ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransferMode + """ super(GrpcExtensionDataTransfer, self).__init__(**kwargs) self.shared_memory_size_mi_b = kwargs.get('shared_memory_size_mi_b', None) self.mode = kwargs['mode'] +class H264Configuration(msrest.serialization.Model): + """Class representing the H264 Configuration. + + :ivar gov_length: Group of Video frames length. + :vartype gov_length: float + :ivar profile: The H264 Profile. Possible values include: "Baseline", "Main", "Extended", + "High". + :vartype profile: str or ~azure.media.videoanalyzer.edge.models.H264Profile + """ + + _attribute_map = { + 'gov_length': {'key': 'govLength', 'type': 'float'}, + 'profile': {'key': 'profile', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword gov_length: Group of Video frames length. + :paramtype gov_length: float + :keyword profile: The H264 Profile. Possible values include: "Baseline", "Main", "Extended", + "High". + :paramtype profile: str or ~azure.media.videoanalyzer.edge.models.H264Profile + """ + super(H264Configuration, self).__init__(**kwargs) + self.gov_length = kwargs.get('gov_length', None) + self.profile = kwargs.get('profile', None) + + class HttpExtension(ExtensionProcessorBase): """HTTP extension processor allows pipeline extension plugins to be connected to the pipeline through over the HTTP protocol. Extension plugins must act as an HTTP server. Please see https://aka.ms/ava-extension-http for details. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param endpoint: Required. Endpoint details of the pipeline extension plugin. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase - :param image: Required. Image transformations and formatting options to be applied to the video + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar endpoint: Required. Endpoint details of the pipeline extension plugin. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :ivar image: Required. Image transformations and formatting options to be applied to the video frame(s) prior submission to the pipeline extension plugin. - :type image: ~azure.media.videoanalyzer.edge.models.ImageProperties - :param sampling_options: Media sampling parameters that define how often media is submitted to + :vartype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :ivar sampling_options: Media sampling parameters that define how often media is submitted to the extension plugin. - :type sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :vartype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions """ _validation = { @@ -495,6 +702,21 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword endpoint: Required. Endpoint details of the pipeline extension plugin. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :keyword image: Required. Image transformations and formatting options to be applied to the + video frame(s) prior submission to the pipeline extension plugin. + :paramtype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :keyword sampling_options: Media sampling parameters that define how often media is submitted + to the extension plugin. + :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + """ super(HttpExtension, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.HttpExtension' # type: str @@ -504,14 +726,14 @@ class HttpHeaderCredentials(CredentialsBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param header_name: Required. HTTP header name. - :type header_name: str - :param header_value: Required. HTTP header value. It is recommended that this value is + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar header_name: Required. HTTP header name. + :vartype header_name: str + :ivar header_value: Required. HTTP header value. It is recommended that this value is parameterized as a secret string in order to prevent this value to be returned as part of the resource on API requests. - :type header_value: str + :vartype header_value: str """ _validation = { @@ -530,6 +752,14 @@ def __init__( self, **kwargs ): + """ + :keyword header_name: Required. HTTP header name. + :paramtype header_name: str + :keyword header_value: Required. HTTP header value. It is recommended that this value is + parameterized as a secret string in order to prevent this value to be returned as part of the + resource on API requests. + :paramtype header_value: str + """ super(HttpHeaderCredentials, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.HttpHeaderCredentials' # type: str self.header_name = kwargs['header_name'] @@ -544,8 +774,8 @@ class ImageFormatProperties(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -564,6 +794,8 @@ def __init__( self, **kwargs ): + """ + """ super(ImageFormatProperties, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -573,8 +805,8 @@ class ImageFormatBmp(ImageFormatProperties): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -589,6 +821,8 @@ def __init__( self, **kwargs ): + """ + """ super(ImageFormatBmp, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ImageFormatBmp' # type: str @@ -598,10 +832,10 @@ class ImageFormatJpeg(ImageFormatProperties): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param quality: Image quality value between 0 to 100 (best quality). - :type quality: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar quality: Image quality value between 0 to 100 (best quality). + :vartype quality: str """ _validation = { @@ -617,6 +851,10 @@ def __init__( self, **kwargs ): + """ + :keyword quality: Image quality value between 0 to 100 (best quality). + :paramtype quality: str + """ super(ImageFormatJpeg, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ImageFormatJpeg' # type: str self.quality = kwargs.get('quality', None) @@ -627,8 +865,8 @@ class ImageFormatPng(ImageFormatProperties): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -643,6 +881,8 @@ def __init__( self, **kwargs ): + """ + """ super(ImageFormatPng, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ImageFormatPng' # type: str @@ -652,12 +892,12 @@ class ImageFormatRaw(ImageFormatProperties): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param pixel_format: Required. Pixel format to be applied to the raw image. Possible values + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar pixel_format: Required. Pixel format to be applied to the raw image. Possible values include: "yuv420p", "rgb565be", "rgb565le", "rgb555be", "rgb555le", "rgb24", "bgr24", "argb", "rgba", "abgr", "bgra". - :type pixel_format: str or ~azure.media.videoanalyzer.edge.models.ImageFormatRawPixelFormat + :vartype pixel_format: str or ~azure.media.videoanalyzer.edge.models.ImageFormatRawPixelFormat """ _validation = { @@ -674,6 +914,13 @@ def __init__( self, **kwargs ): + """ + :keyword pixel_format: Required. Pixel format to be applied to the raw image. Possible values + include: "yuv420p", "rgb565be", "rgb565le", "rgb555be", "rgb555le", "rgb24", "bgr24", "argb", + "rgba", "abgr", "bgra". + :paramtype pixel_format: str or + ~azure.media.videoanalyzer.edge.models.ImageFormatRawPixelFormat + """ super(ImageFormatRaw, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ImageFormatRaw' # type: str self.pixel_format = kwargs['pixel_format'] @@ -682,10 +929,10 @@ def __init__( class ImageProperties(msrest.serialization.Model): """Image transformations and formatting options to be applied to the video frame(s). - :param scale: Image scaling mode. - :type scale: ~azure.media.videoanalyzer.edge.models.ImageScale - :param format: Base class for image formatting properties. - :type format: ~azure.media.videoanalyzer.edge.models.ImageFormatProperties + :ivar scale: Image scaling mode. + :vartype scale: ~azure.media.videoanalyzer.edge.models.ImageScale + :ivar format: Base class for image formatting properties. + :vartype format: ~azure.media.videoanalyzer.edge.models.ImageFormatProperties """ _attribute_map = { @@ -697,6 +944,12 @@ def __init__( self, **kwargs ): + """ + :keyword scale: Image scaling mode. + :paramtype scale: ~azure.media.videoanalyzer.edge.models.ImageScale + :keyword format: Base class for image formatting properties. + :paramtype format: ~azure.media.videoanalyzer.edge.models.ImageFormatProperties + """ super(ImageProperties, self).__init__(**kwargs) self.scale = kwargs.get('scale', None) self.format = kwargs.get('format', None) @@ -705,13 +958,13 @@ def __init__( class ImageScale(msrest.serialization.Model): """Image scaling mode. - :param mode: Describes the image scaling mode to be applied. Default mode is 'pad'. Possible + :ivar mode: Describes the image scaling mode to be applied. Default mode is 'pad'. Possible values include: "preserveAspectRatio", "pad", "stretch". - :type mode: str or ~azure.media.videoanalyzer.edge.models.ImageScaleMode - :param width: The desired output image width. - :type width: str - :param height: The desired output image height. - :type height: str + :vartype mode: str or ~azure.media.videoanalyzer.edge.models.ImageScaleMode + :ivar width: The desired output image width. + :vartype width: str + :ivar height: The desired output image height. + :vartype height: str """ _attribute_map = { @@ -724,27 +977,75 @@ def __init__( self, **kwargs ): + """ + :keyword mode: Describes the image scaling mode to be applied. Default mode is 'pad'. Possible + values include: "preserveAspectRatio", "pad", "stretch". + :paramtype mode: str or ~azure.media.videoanalyzer.edge.models.ImageScaleMode + :keyword width: The desired output image width. + :paramtype width: str + :keyword height: The desired output image height. + :paramtype height: str + """ super(ImageScale, self).__init__(**kwargs) self.mode = kwargs.get('mode', None) self.width = kwargs.get('width', None) self.height = kwargs.get('height', None) +class IotHubDeviceConnection(msrest.serialization.Model): + """Information that enables communication between the IoT Hub and the IoT device - allowing this edge module to act as a transparent gateway between the two. + + All required parameters must be populated in order to send to Azure. + + :ivar device_id: Required. The name of the IoT device configured and managed in IoT Hub. + (case-sensitive). + :vartype device_id: str + :ivar credentials: IoT device connection credentials. Currently IoT device symmetric key + credentials are supported. + :vartype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + """ + + _validation = { + 'device_id': {'required': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword device_id: Required. The name of the IoT device configured and managed in IoT Hub. + (case-sensitive). + :paramtype device_id: str + :keyword credentials: IoT device connection credentials. Currently IoT device symmetric key + credentials are supported. + :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + """ + super(IotHubDeviceConnection, self).__init__(**kwargs) + self.device_id = kwargs['device_id'] + self.credentials = kwargs.get('credentials', None) + + class IotHubMessageSink(SinkNodeBase): """IoT Hub Message sink allows for pipeline messages to published into the IoT Edge Hub. Published messages can then be delivered to the cloud and other modules via routes declared in the IoT Edge deployment manifest. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param hub_output_name: Required. Name of the Iot Edge Hub output to which the messages will be + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar hub_output_name: Required. Name of the Iot Edge Hub output to which the messages will be published. - :type hub_output_name: str + :vartype hub_output_name: str """ _validation = { @@ -765,6 +1066,16 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword hub_output_name: Required. Name of the Iot Edge Hub output to which the messages will + be published. + :paramtype hub_output_name: str + """ super(IotHubMessageSink, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.IotHubMessageSink' # type: str self.hub_output_name = kwargs['hub_output_name'] @@ -778,10 +1089,10 @@ class SourceNodeBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str """ _validation = { @@ -802,6 +1113,10 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + """ super(SourceNodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = kwargs['name'] @@ -812,12 +1127,12 @@ class IotHubMessageSource(SourceNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param hub_input_name: Name of the IoT Edge Hub input from which messages will be consumed. - :type hub_input_name: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar hub_input_name: Name of the IoT Edge Hub input from which messages will be consumed. + :vartype hub_input_name: str """ _validation = { @@ -835,6 +1150,12 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword hub_input_name: Name of the IoT Edge Hub input from which messages will be consumed. + :paramtype hub_input_name: str + """ super(IotHubMessageSource, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.IotHubMessageSource' # type: str self.hub_input_name = kwargs.get('hub_input_name', None) @@ -845,15 +1166,15 @@ class LineCrossingProcessor(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param lines: Required. An array of lines used to compute line crossing events. - :type lines: list[~azure.media.videoanalyzer.edge.models.NamedLineBase] + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar lines: Required. An array of lines used to compute line crossing events. + :vartype lines: list[~azure.media.videoanalyzer.edge.models.NamedLineBase] """ _validation = { @@ -874,6 +1195,15 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword lines: Required. An array of lines used to compute line crossing events. + :paramtype lines: list[~azure.media.videoanalyzer.edge.models.NamedLineBase] + """ super(LineCrossingProcessor, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.LineCrossingProcessor' # type: str self.lines = kwargs['lines'] @@ -884,12 +1214,12 @@ class LivePipeline(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Live pipeline unique identifier. - :type name: str - :param system_data: Read-only system metadata associated with this object. - :type system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :param properties: Live pipeline properties. - :type properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties + :ivar name: Required. Live pipeline unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Live pipeline properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties """ _validation = { @@ -906,6 +1236,14 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Live pipeline unique identifier. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Live pipeline properties. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties + """ super(LivePipeline, self).__init__(**kwargs) self.name = kwargs['name'] self.system_data = kwargs.get('system_data', None) @@ -916,7 +1254,7 @@ class MethodRequest(msrest.serialization.Model): """Base class for direct method calls. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LivePipelineSetRequestBody, MethodRequestEmptyBodyBase, PipelineTopologySetRequestBody, LivePipelineListRequest, LivePipelineSetRequest, PipelineTopologyListRequest, PipelineTopologySetRequest. + sub-classes are: LivePipelineSetRequestBody, MethodRequestEmptyBodyBase, PipelineTopologySetRequestBody, RemoteDeviceAdapterSetRequestBody, LivePipelineListRequest, LivePipelineSetRequest, OnvifDeviceDiscoverRequest, OnvifDeviceGetRequest, PipelineTopologyListRequest, PipelineTopologySetRequest, RemoteDeviceAdapterListRequest, RemoteDeviceAdapterSetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -924,13 +1262,13 @@ class MethodRequest(msrest.serialization.Model): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, } _attribute_map = { @@ -939,24 +1277,28 @@ class MethodRequest(msrest.serialization.Model): } _subtype_map = { - 'method_name': {'LivePipelineSetRequestBody': 'LivePipelineSetRequestBody', 'MethodRequestEmptyBodyBase': 'MethodRequestEmptyBodyBase', 'PipelineTopologySetRequestBody': 'PipelineTopologySetRequestBody', 'livePipelineList': 'LivePipelineListRequest', 'livePipelineSet': 'LivePipelineSetRequest', 'pipelineTopologyList': 'PipelineTopologyListRequest', 'pipelineTopologySet': 'PipelineTopologySetRequest'} + 'method_name': {'LivePipelineSetRequestBody': 'LivePipelineSetRequestBody', 'MethodRequestEmptyBodyBase': 'MethodRequestEmptyBodyBase', 'PipelineTopologySetRequestBody': 'PipelineTopologySetRequestBody', 'RemoteDeviceAdapterSetRequestBody': 'RemoteDeviceAdapterSetRequestBody', 'livePipelineList': 'LivePipelineListRequest', 'livePipelineSet': 'LivePipelineSetRequest', 'onvifDeviceDiscover': 'OnvifDeviceDiscoverRequest', 'onvifDeviceGet': 'OnvifDeviceGetRequest', 'pipelineTopologyList': 'PipelineTopologyListRequest', 'pipelineTopologySet': 'PipelineTopologySetRequest', 'remoteDeviceAdapterList': 'RemoteDeviceAdapterListRequest', 'remoteDeviceAdapterSet': 'RemoteDeviceAdapterSetRequest'} } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + """ super(MethodRequest, self).__init__(**kwargs) self.method_name = None # type: Optional[str] + self.api_version = kwargs.get('api_version', "1.1") class MethodRequestEmptyBodyBase(MethodRequest): """MethodRequestEmptyBodyBase. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LivePipelineActivateRequest, LivePipelineDeactivateRequest, LivePipelineDeleteRequest, LivePipelineGetRequest, PipelineTopologyDeleteRequest, PipelineTopologyGetRequest. + sub-classes are: LivePipelineActivateRequest, LivePipelineDeactivateRequest, LivePipelineDeleteRequest, LivePipelineGetRequest, PipelineTopologyDeleteRequest, PipelineTopologyGetRequest, RemoteDeviceAdapterDeleteRequest, RemoteDeviceAdapterGetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -964,15 +1306,15 @@ class MethodRequestEmptyBodyBase(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -983,15 +1325,20 @@ class MethodRequestEmptyBodyBase(MethodRequest): } _subtype_map = { - 'method_name': {'livePipelineActivate': 'LivePipelineActivateRequest', 'livePipelineDeactivate': 'LivePipelineDeactivateRequest', 'livePipelineDelete': 'LivePipelineDeleteRequest', 'livePipelineGet': 'LivePipelineGetRequest', 'pipelineTopologyDelete': 'PipelineTopologyDeleteRequest', 'pipelineTopologyGet': 'PipelineTopologyGetRequest'} + 'method_name': {'livePipelineActivate': 'LivePipelineActivateRequest', 'livePipelineDeactivate': 'LivePipelineDeactivateRequest', 'livePipelineDelete': 'LivePipelineDeleteRequest', 'livePipelineGet': 'LivePipelineGetRequest', 'pipelineTopologyDelete': 'PipelineTopologyDeleteRequest', 'pipelineTopologyGet': 'PipelineTopologyGetRequest', 'remoteDeviceAdapterDelete': 'RemoteDeviceAdapterDeleteRequest', 'remoteDeviceAdapterGet': 'RemoteDeviceAdapterGetRequest'} } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ super(MethodRequestEmptyBodyBase, self).__init__(**kwargs) self.method_name = 'MethodRequestEmptyBodyBase' # type: str self.name = kwargs['name'] @@ -1006,15 +1353,15 @@ class LivePipelineActivateRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1024,12 +1371,17 @@ class LivePipelineActivateRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ super(LivePipelineActivateRequest, self).__init__(**kwargs) self.method_name = 'livePipelineActivate' # type: str @@ -1037,12 +1389,12 @@ def __init__( class LivePipelineCollection(msrest.serialization.Model): """A collection of live pipelines. - :param value: List of live pipelines. - :type value: list[~azure.media.videoanalyzer.edge.models.LivePipeline] - :param continuation_token: A continuation token to be used in subsequent calls when enumerating + :ivar value: List of live pipelines. + :vartype value: list[~azure.media.videoanalyzer.edge.models.LivePipeline] + :ivar continuation_token: A continuation token to be used in subsequent calls when enumerating through the collection. This is returned when the collection results won't fit in a single response. - :type continuation_token: str + :vartype continuation_token: str """ _attribute_map = { @@ -1054,6 +1406,14 @@ def __init__( self, **kwargs ): + """ + :keyword value: List of live pipelines. + :paramtype value: list[~azure.media.videoanalyzer.edge.models.LivePipeline] + :keyword continuation_token: A continuation token to be used in subsequent calls when + enumerating through the collection. This is returned when the collection results won't fit in a + single response. + :paramtype continuation_token: str + """ super(LivePipelineCollection, self).__init__(**kwargs) self.value = kwargs.get('value', None) self.continuation_token = kwargs.get('continuation_token', None) @@ -1068,15 +1428,15 @@ class LivePipelineDeactivateRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1086,12 +1446,17 @@ class LivePipelineDeactivateRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ super(LivePipelineDeactivateRequest, self).__init__(**kwargs) self.method_name = 'livePipelineDeactivate' # type: str @@ -1105,15 +1470,15 @@ class LivePipelineDeleteRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1123,12 +1488,17 @@ class LivePipelineDeleteRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ super(LivePipelineDeleteRequest, self).__init__(**kwargs) self.method_name = 'livePipelineDelete' # type: str @@ -1142,15 +1512,15 @@ class LivePipelineGetRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1160,12 +1530,17 @@ class LivePipelineGetRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ super(LivePipelineGetRequest, self).__init__(**kwargs) self.method_name = 'livePipelineGet' # type: str @@ -1179,13 +1554,13 @@ class LivePipelineListRequest(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, } _attribute_map = { @@ -1193,12 +1568,15 @@ class LivePipelineListRequest(MethodRequest): 'api_version': {'key': '@apiVersion', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + """ super(LivePipelineListRequest, self).__init__(**kwargs) self.method_name = 'livePipelineList' # type: str @@ -1206,20 +1584,20 @@ def __init__( class LivePipelineProperties(msrest.serialization.Model): """Live pipeline properties. - :param description: An optional description of the live pipeline. - :type description: str - :param topology_name: The reference to an existing pipeline topology defined for real-time + :ivar description: An optional description of the live pipeline. + :vartype description: str + :ivar topology_name: The reference to an existing pipeline topology defined for real-time content processing. When activated, this live pipeline will process content according to the pipeline topology definition. - :type topology_name: str - :param parameters: List of the instance level parameter values for the user-defined topology + :vartype topology_name: str + :ivar parameters: List of the instance level parameter values for the user-defined topology parameters. A pipeline can only define or override parameters values for parameters which have been declared in the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a default value can be optionally be overridden. - :type parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDefinition] - :param state: Current pipeline state (read-only). Possible values include: "inactive", + :vartype parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDefinition] + :ivar state: Current pipeline state (read-only). Possible values include: "inactive", "activating", "active", "deactivating". - :type state: str or ~azure.media.videoanalyzer.edge.models.LivePipelineState + :vartype state: str or ~azure.media.videoanalyzer.edge.models.LivePipelineState """ _attribute_map = { @@ -1233,6 +1611,22 @@ def __init__( self, **kwargs ): + """ + :keyword description: An optional description of the live pipeline. + :paramtype description: str + :keyword topology_name: The reference to an existing pipeline topology defined for real-time + content processing. When activated, this live pipeline will process content according to the + pipeline topology definition. + :paramtype topology_name: str + :keyword parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :paramtype parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDefinition] + :keyword state: Current pipeline state (read-only). Possible values include: "inactive", + "activating", "active", "deactivating". + :paramtype state: str or ~azure.media.videoanalyzer.edge.models.LivePipelineState + """ super(LivePipelineProperties, self).__init__(**kwargs) self.description = kwargs.get('description', None) self.topology_name = kwargs.get('topology_name', None) @@ -1249,16 +1643,16 @@ class LivePipelineSetRequest(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param live_pipeline: Required. Live Pipeline represents an unique instance of a pipeline + :ivar live_pipeline: Required. Live Pipeline represents an unique instance of a pipeline topology which is used for real-time content ingestion and analysis. - :type live_pipeline: ~azure.media.videoanalyzer.edge.models.LivePipeline + :vartype live_pipeline: ~azure.media.videoanalyzer.edge.models.LivePipeline """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'live_pipeline': {'required': True}, } @@ -1268,19 +1662,25 @@ class LivePipelineSetRequest(MethodRequest): 'live_pipeline': {'key': 'livePipeline', 'type': 'LivePipeline'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword live_pipeline: Required. Live Pipeline represents an unique instance of a pipeline + topology which is used for real-time content ingestion and analysis. + :paramtype live_pipeline: ~azure.media.videoanalyzer.edge.models.LivePipeline + """ super(LivePipelineSetRequest, self).__init__(**kwargs) self.method_name = 'livePipelineSet' # type: str self.live_pipeline = kwargs['live_pipeline'] class LivePipelineSetRequestBody(LivePipeline, MethodRequest): - """Live pipeline resource representation. + """Live Pipeline represents an unique instance of a pipeline topology which is used for real-time content ingestion and analysis. Variables are only populated by the server, and will be ignored when sending a request. @@ -1288,19 +1688,19 @@ class LivePipelineSetRequestBody(LivePipeline, MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Live pipeline unique identifier. - :type name: str - :param system_data: Read-only system metadata associated with this object. - :type system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :param properties: Live pipeline properties. - :type properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties + :ivar name: Required. Live pipeline unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Live pipeline properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1312,42 +1712,113 @@ class LivePipelineSetRequestBody(LivePipeline, MethodRequest): 'properties': {'key': 'properties', 'type': 'LivePipelineProperties'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Live pipeline unique identifier. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Live pipeline properties. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties + """ super(LivePipelineSetRequestBody, self).__init__(**kwargs) self.method_name = 'LivePipelineSetRequestBody' # type: str + self.api_version = kwargs.get('api_version', "1.1") self.method_name = 'LivePipelineSetRequestBody' # type: str self.name = kwargs['name'] self.system_data = kwargs.get('system_data', None) self.properties = kwargs.get('properties', None) +class MediaProfile(msrest.serialization.Model): + """Class representing the ONVIF MediaProfiles. + + :ivar name: The name of the Media Profile. + :vartype name: str + :ivar media_uri: Object representing the URI that will be used to request for media streaming. + :vartype media_uri: any + :ivar video_encoder_configuration: The Video encoder configuration. + :vartype video_encoder_configuration: + ~azure.media.videoanalyzer.edge.models.VideoEncoderConfiguration + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'media_uri': {'key': 'mediaUri', 'type': 'object'}, + 'video_encoder_configuration': {'key': 'videoEncoderConfiguration', 'type': 'VideoEncoderConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: The name of the Media Profile. + :paramtype name: str + :keyword media_uri: Object representing the URI that will be used to request for media + streaming. + :paramtype media_uri: any + :keyword video_encoder_configuration: The Video encoder configuration. + :paramtype video_encoder_configuration: + ~azure.media.videoanalyzer.edge.models.VideoEncoderConfiguration + """ + super(MediaProfile, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.media_uri = kwargs.get('media_uri', None) + self.video_encoder_configuration = kwargs.get('video_encoder_configuration', None) + + +class MediaUri(msrest.serialization.Model): + """Object representing the URI that will be used to request for media streaming. + + :ivar uri: URI that can be used for media streaming. + :vartype uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword uri: URI that can be used for media streaming. + :paramtype uri: str + """ + super(MediaUri, self).__init__(**kwargs) + self.uri = kwargs.get('uri', None) + + class MotionDetectionProcessor(ProcessorNodeBase): """Motion detection processor allows for motion detection on the video stream. It generates motion events whenever motion is present on the video. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param sensitivity: Motion detection sensitivity: low, medium, high. Possible values include: + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar sensitivity: Motion detection sensitivity: low, medium, high. Possible values include: "low", "medium", "high". - :type sensitivity: str or ~azure.media.videoanalyzer.edge.models.MotionDetectionSensitivity - :param output_motion_region: Indicates whether the processor should detect and output the + :vartype sensitivity: str or ~azure.media.videoanalyzer.edge.models.MotionDetectionSensitivity + :ivar output_motion_region: Indicates whether the processor should detect and output the regions within the video frame where motion was detected. Default is true. - :type output_motion_region: bool - :param event_aggregation_window: Time window duration on which events are aggregated before + :vartype output_motion_region: bool + :ivar event_aggregation_window: Time window duration on which events are aggregated before being emitted. Value must be specified in ISO8601 duration format (i.e. "PT2S" equals 2 seconds). Use 0 seconds for no aggregation. Default is 1 second. - :type event_aggregation_window: str + :vartype event_aggregation_window: str """ _validation = { @@ -1369,6 +1840,24 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword sensitivity: Motion detection sensitivity: low, medium, high. Possible values include: + "low", "medium", "high". + :paramtype sensitivity: str or + ~azure.media.videoanalyzer.edge.models.MotionDetectionSensitivity + :keyword output_motion_region: Indicates whether the processor should detect and output the + regions within the video frame where motion was detected. Default is true. + :paramtype output_motion_region: bool + :keyword event_aggregation_window: Time window duration on which events are aggregated before + being emitted. Value must be specified in ISO8601 duration format (i.e. "PT2S" equals 2 + seconds). Use 0 seconds for no aggregation. Default is 1 second. + :paramtype event_aggregation_window: str + """ super(MotionDetectionProcessor, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.MotionDetectionProcessor' # type: str self.sensitivity = kwargs.get('sensitivity', None) @@ -1376,6 +1865,35 @@ def __init__( self.event_aggregation_window = kwargs.get('event_aggregation_window', None) +class MPEG4Configuration(msrest.serialization.Model): + """Class representing the MPEG4 Configuration. + + :ivar gov_length: Group of Video frames length. + :vartype gov_length: float + :ivar profile: The MPEG4 Profile. Possible values include: "SP", "ASP". + :vartype profile: str or ~azure.media.videoanalyzer.edge.models.MPEG4Profile + """ + + _attribute_map = { + 'gov_length': {'key': 'govLength', 'type': 'float'}, + 'profile': {'key': 'profile', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword gov_length: Group of Video frames length. + :paramtype gov_length: float + :keyword profile: The MPEG4 Profile. Possible values include: "SP", "ASP". + :paramtype profile: str or ~azure.media.videoanalyzer.edge.models.MPEG4Profile + """ + super(MPEG4Configuration, self).__init__(**kwargs) + self.gov_length = kwargs.get('gov_length', None) + self.profile = kwargs.get('profile', None) + + class NamedLineBase(msrest.serialization.Model): """Base class for named lines. @@ -1384,10 +1902,10 @@ class NamedLineBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Line name. Must be unique within the node. - :type name: str + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Line name. Must be unique within the node. + :vartype name: str """ _validation = { @@ -1408,6 +1926,10 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Line name. Must be unique within the node. + :paramtype name: str + """ super(NamedLineBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = kwargs['name'] @@ -1418,15 +1940,15 @@ class NamedLineString(NamedLineBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Line name. Must be unique within the node. - :type name: str - :param line: Required. Point coordinates for the line start and end, respectively. Example: + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Line name. Must be unique within the node. + :vartype name: str + :ivar line: Required. Point coordinates for the line start and end, respectively. Example: '[[0.3, 0.2],[0.9, 0.8]]'. Each point is expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to 1.0, where [0,0] is the upper-left frame corner and [1, 1] is the bottom-right frame corner. - :type line: str + :vartype line: str """ _validation = { @@ -1445,6 +1967,15 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Line name. Must be unique within the node. + :paramtype name: str + :keyword line: Required. Point coordinates for the line start and end, respectively. Example: + '[[0.3, 0.2],[0.9, 0.8]]'. Each point is expressed as [LEFT, TOP] coordinate ratios ranging + from 0.0 to 1.0, where [0,0] is the upper-left frame corner and [1, 1] is the bottom-right + frame corner. + :paramtype line: str + """ super(NamedLineString, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.NamedLineString' # type: str self.line = kwargs['line'] @@ -1458,10 +1989,10 @@ class NamedPolygonBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Polygon name. Must be unique within the node. - :type name: str + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Polygon name. Must be unique within the node. + :vartype name: str """ _validation = { @@ -1482,6 +2013,10 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Polygon name. Must be unique within the node. + :paramtype name: str + """ super(NamedPolygonBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = kwargs['name'] @@ -1492,14 +2027,14 @@ class NamedPolygonString(NamedPolygonBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Polygon name. Must be unique within the node. - :type name: str - :param polygon: Required. Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9, + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Polygon name. Must be unique within the node. + :vartype name: str + :ivar polygon: Required. Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9, 0.8],[0.7, 0.6]]'. Each point is expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to 1.0, where [0,0] is the upper-left frame corner and [1, 1] is the bottom-right frame corner. - :type polygon: str + :vartype polygon: str """ _validation = { @@ -1518,6 +2053,14 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Polygon name. Must be unique within the node. + :paramtype name: str + :keyword polygon: Required. Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9, + 0.8],[0.7, 0.6]]'. Each point is expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to + 1.0, where [0,0] is the upper-left frame corner and [1, 1] is the bottom-right frame corner. + :paramtype polygon: str + """ super(NamedPolygonString, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.NamedPolygonString' # type: str self.polygon = kwargs['polygon'] @@ -1528,12 +2071,12 @@ class NodeInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param node_name: Required. The name of the upstream node in the pipeline which output is used + :ivar node_name: Required. The name of the upstream node in the pipeline which output is used as input of the current node. - :type node_name: str - :param output_selectors: Allows for the selection of specific data streams (eg. video only) - from another node. - :type output_selectors: list[~azure.media.videoanalyzer.edge.models.OutputSelector] + :vartype node_name: str + :ivar output_selectors: Allows for the selection of specific data streams (eg. video only) from + another node. + :vartype output_selectors: list[~azure.media.videoanalyzer.edge.models.OutputSelector] """ _validation = { @@ -1549,6 +2092,14 @@ def __init__( self, **kwargs ): + """ + :keyword node_name: Required. The name of the upstream node in the pipeline which output is + used as input of the current node. + :paramtype node_name: str + :keyword output_selectors: Allows for the selection of specific data streams (eg. video only) + from another node. + :paramtype output_selectors: list[~azure.media.videoanalyzer.edge.models.OutputSelector] + """ super(NodeInput, self).__init__(**kwargs) self.node_name = kwargs['node_name'] self.output_selectors = kwargs.get('output_selectors', None) @@ -1559,16 +2110,16 @@ class ObjectTrackingProcessor(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param accuracy: Object tracker accuracy: low, medium, high. Higher accuracy leads to higher - CPU consumption in average. Possible values include: "low", "medium", "high". - :type accuracy: str or ~azure.media.videoanalyzer.edge.models.ObjectTrackingAccuracy + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar accuracy: Object tracker accuracy: low, medium, high. Higher accuracy leads to higher CPU + consumption in average. Possible values include: "low", "medium", "high". + :vartype accuracy: str or ~azure.media.videoanalyzer.edge.models.ObjectTrackingAccuracy """ _validation = { @@ -1588,21 +2139,260 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword accuracy: Object tracker accuracy: low, medium, high. Higher accuracy leads to higher + CPU consumption in average. Possible values include: "low", "medium", "high". + :paramtype accuracy: str or ~azure.media.videoanalyzer.edge.models.ObjectTrackingAccuracy + """ super(ObjectTrackingProcessor, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ObjectTrackingProcessor' # type: str self.accuracy = kwargs.get('accuracy', None) +class OnvifDevice(msrest.serialization.Model): + """The ONVIF device properties. + + :ivar hostname: The hostname of the ONVIF device. + :vartype hostname: ~azure.media.videoanalyzer.edge.models.OnvifHostName + :ivar system_date_time: The system date and time of the ONVIF device. + :vartype system_date_time: ~azure.media.videoanalyzer.edge.models.OnvifSystemDateTime + :ivar dns: The ONVIF device DNS properties. + :vartype dns: ~azure.media.videoanalyzer.edge.models.OnvifDns + :ivar media_profiles: An array of of ONVIF media profiles supported by the ONVIF device. + :vartype media_profiles: list[~azure.media.videoanalyzer.edge.models.MediaProfile] + """ + + _attribute_map = { + 'hostname': {'key': 'hostname', 'type': 'OnvifHostName'}, + 'system_date_time': {'key': 'systemDateTime', 'type': 'OnvifSystemDateTime'}, + 'dns': {'key': 'dns', 'type': 'OnvifDns'}, + 'media_profiles': {'key': 'mediaProfiles', 'type': '[MediaProfile]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword hostname: The hostname of the ONVIF device. + :paramtype hostname: ~azure.media.videoanalyzer.edge.models.OnvifHostName + :keyword system_date_time: The system date and time of the ONVIF device. + :paramtype system_date_time: ~azure.media.videoanalyzer.edge.models.OnvifSystemDateTime + :keyword dns: The ONVIF device DNS properties. + :paramtype dns: ~azure.media.videoanalyzer.edge.models.OnvifDns + :keyword media_profiles: An array of of ONVIF media profiles supported by the ONVIF device. + :paramtype media_profiles: list[~azure.media.videoanalyzer.edge.models.MediaProfile] + """ + super(OnvifDevice, self).__init__(**kwargs) + self.hostname = kwargs.get('hostname', None) + self.system_date_time = kwargs.get('system_date_time', None) + self.dns = kwargs.get('dns', None) + self.media_profiles = kwargs.get('media_profiles', None) + + +class OnvifDeviceDiscoverRequest(MethodRequest): + """Lists all the discoverable ONVIF devices on the same subnet as the Edge Module. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar discovery_duration: The amount of time that the ONVIF device discovery will wait for + supported device responses. + :vartype discovery_duration: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'discovery_duration': {'key': 'discoveryDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword discovery_duration: The amount of time that the ONVIF device discovery will wait for + supported device responses. + :paramtype discovery_duration: str + """ + super(OnvifDeviceDiscoverRequest, self).__init__(**kwargs) + self.method_name = 'onvifDeviceDiscover' # type: str + self.discovery_duration = kwargs.get('discovery_duration', None) + + +class OnvifDeviceGetRequest(MethodRequest): + """Retrieves properties and media profiles of an ONVIF device. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar endpoint: Required. Base class for endpoints. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'endpoint': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword endpoint: Required. Base class for endpoints. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + """ + super(OnvifDeviceGetRequest, self).__init__(**kwargs) + self.method_name = 'onvifDeviceGet' # type: str + self.endpoint = kwargs['endpoint'] + + +class OnvifDns(msrest.serialization.Model): + """The ONVIF device DNS properties. + + :ivar from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. + :vartype from_dhcp: bool + :ivar ipv4_address: An array of IPv4 address for the discovered ONVIF device. + :vartype ipv4_address: list[str] + :ivar ipv6_address: An array of IPv6 address for the discovered ONVIF device. + :vartype ipv6_address: list[str] + """ + + _attribute_map = { + 'from_dhcp': {'key': 'fromDhcp', 'type': 'bool'}, + 'ipv4_address': {'key': 'ipv4Address', 'type': '[str]'}, + 'ipv6_address': {'key': 'ipv6Address', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. + :paramtype from_dhcp: bool + :keyword ipv4_address: An array of IPv4 address for the discovered ONVIF device. + :paramtype ipv4_address: list[str] + :keyword ipv6_address: An array of IPv6 address for the discovered ONVIF device. + :paramtype ipv6_address: list[str] + """ + super(OnvifDns, self).__init__(**kwargs) + self.from_dhcp = kwargs.get('from_dhcp', None) + self.ipv4_address = kwargs.get('ipv4_address', None) + self.ipv6_address = kwargs.get('ipv6_address', None) + + +class OnvifHostName(msrest.serialization.Model): + """The ONVIF device DNS properties. + + :ivar from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. + :vartype from_dhcp: bool + :ivar hostname: The hostname of the ONVIF device. + :vartype hostname: str + """ + + _attribute_map = { + 'from_dhcp': {'key': 'fromDhcp', 'type': 'bool'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. + :paramtype from_dhcp: bool + :keyword hostname: The hostname of the ONVIF device. + :paramtype hostname: str + """ + super(OnvifHostName, self).__init__(**kwargs) + self.from_dhcp = kwargs.get('from_dhcp', None) + self.hostname = kwargs.get('hostname', None) + + +class OnvifSystemDateTime(msrest.serialization.Model): + """The ONVIF device DNS properties. + + :ivar type: An enum value determining whether the date time was configured using NTP or manual. + Possible values include: "Ntp", "Manual". + :vartype type: str or ~azure.media.videoanalyzer.edge.models.OnvifSystemDateTimeType + :ivar time: The device datetime returned when calling the request. + :vartype time: str + :ivar time_zone: The timezone of the ONVIF device datetime. + :vartype time_zone: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'str'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword type: An enum value determining whether the date time was configured using NTP or + manual. Possible values include: "Ntp", "Manual". + :paramtype type: str or ~azure.media.videoanalyzer.edge.models.OnvifSystemDateTimeType + :keyword time: The device datetime returned when calling the request. + :paramtype time: str + :keyword time_zone: The timezone of the ONVIF device datetime. + :paramtype time_zone: str + """ + super(OnvifSystemDateTime, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.time = kwargs.get('time', None) + self.time_zone = kwargs.get('time_zone', None) + + class OutputSelector(msrest.serialization.Model): """Allows for the selection of particular streams from another node. - :param property: The property of the data stream to be used as the selection criteria. Possible + :ivar property: The property of the data stream to be used as the selection criteria. Possible values include: "mediaType". - :type property: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorProperty - :param operator: The operator to compare properties by. Possible values include: "is", "isNot". - :type operator: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorOperator - :param value: Value to compare against. - :type value: str + :vartype property: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorProperty + :ivar operator: The operator to compare properties by. Possible values include: "is", "isNot". + :vartype operator: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorOperator + :ivar value: Value to compare against. + :vartype value: str """ _attribute_map = { @@ -1615,6 +2405,16 @@ def __init__( self, **kwargs ): + """ + :keyword property: The property of the data stream to be used as the selection criteria. + Possible values include: "mediaType". + :paramtype property: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorProperty + :keyword operator: The operator to compare properties by. Possible values include: "is", + "isNot". + :paramtype operator: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorOperator + :keyword value: Value to compare against. + :paramtype value: str + """ super(OutputSelector, self).__init__(**kwargs) self.property = kwargs.get('property', None) self.operator = kwargs.get('operator', None) @@ -1626,16 +2426,16 @@ class ParameterDeclaration(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Name of the parameter. - :type name: str - :param type: Required. Type of the parameter. Possible values include: "string", - "secretString", "int", "double", "bool". - :type type: str or ~azure.media.videoanalyzer.edge.models.ParameterType - :param description: Description of the parameter. - :type description: str - :param default: The default value for the parameter to be used if the live pipeline does not + :ivar name: Required. Name of the parameter. + :vartype name: str + :ivar type: Required. Type of the parameter. Possible values include: "string", "secretString", + "int", "double", "bool". + :vartype type: str or ~azure.media.videoanalyzer.edge.models.ParameterType + :ivar description: Description of the parameter. + :vartype description: str + :ivar default: The default value for the parameter to be used if the live pipeline does not specify a value. - :type default: str + :vartype default: str """ _validation = { @@ -1654,6 +2454,18 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Name of the parameter. + :paramtype name: str + :keyword type: Required. Type of the parameter. Possible values include: "string", + "secretString", "int", "double", "bool". + :paramtype type: str or ~azure.media.videoanalyzer.edge.models.ParameterType + :keyword description: Description of the parameter. + :paramtype description: str + :keyword default: The default value for the parameter to be used if the live pipeline does not + specify a value. + :paramtype default: str + """ super(ParameterDeclaration, self).__init__(**kwargs) self.name = kwargs['name'] self.type = kwargs['type'] @@ -1666,10 +2478,10 @@ class ParameterDefinition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Name of the parameter declared in the pipeline topology. - :type name: str - :param value: Parameter value to be applied on this specific live pipeline. - :type value: str + :ivar name: Required. Name of the parameter declared in the pipeline topology. + :vartype name: str + :ivar value: Parameter value to be applied on this specific live pipeline. + :vartype value: str """ _validation = { @@ -1685,6 +2497,12 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Name of the parameter declared in the pipeline topology. + :paramtype name: str + :keyword value: Parameter value to be applied on this specific live pipeline. + :paramtype value: str + """ super(ParameterDefinition, self).__init__(**kwargs) self.name = kwargs['name'] self.value = kwargs.get('value', None) @@ -1695,10 +2513,10 @@ class PemCertificateList(CertificateSource): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param certificates: Required. PEM formatted public certificates. One certificate per entry. - :type certificates: list[str] + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar certificates: Required. PEM formatted public certificates. One certificate per entry. + :vartype certificates: list[str] """ _validation = { @@ -1715,6 +2533,10 @@ def __init__( self, **kwargs ): + """ + :keyword certificates: Required. PEM formatted public certificates. One certificate per entry. + :paramtype certificates: list[str] + """ super(PemCertificateList, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.PemCertificateList' # type: str self.certificates = kwargs['certificates'] @@ -1731,12 +2553,12 @@ class PipelineTopology(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Pipeline topology unique identifier. - :type name: str - :param system_data: Read-only system metadata associated with this object. - :type system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :param properties: Pipeline topology properties. - :type properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + :ivar name: Required. Pipeline topology unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Pipeline topology properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ _validation = { @@ -1753,6 +2575,14 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Pipeline topology unique identifier. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Pipeline topology properties. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + """ super(PipelineTopology, self).__init__(**kwargs) self.name = kwargs['name'] self.system_data = kwargs.get('system_data', None) @@ -1762,12 +2592,12 @@ def __init__( class PipelineTopologyCollection(msrest.serialization.Model): """A collection of pipeline topologies. - :param value: List of pipeline topologies. - :type value: list[~azure.media.videoanalyzer.edge.models.PipelineTopology] - :param continuation_token: A continuation token to be used in subsequent calls when enumerating + :ivar value: List of pipeline topologies. + :vartype value: list[~azure.media.videoanalyzer.edge.models.PipelineTopology] + :ivar continuation_token: A continuation token to be used in subsequent calls when enumerating through the collection. This is returned when the collection results won't fit in a single response. - :type continuation_token: str + :vartype continuation_token: str """ _attribute_map = { @@ -1779,6 +2609,14 @@ def __init__( self, **kwargs ): + """ + :keyword value: List of pipeline topologies. + :paramtype value: list[~azure.media.videoanalyzer.edge.models.PipelineTopology] + :keyword continuation_token: A continuation token to be used in subsequent calls when + enumerating through the collection. This is returned when the collection results won't fit in a + single response. + :paramtype continuation_token: str + """ super(PipelineTopologyCollection, self).__init__(**kwargs) self.value = kwargs.get('value', None) self.continuation_token = kwargs.get('continuation_token', None) @@ -1793,15 +2631,15 @@ class PipelineTopologyDeleteRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1811,12 +2649,17 @@ class PipelineTopologyDeleteRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ super(PipelineTopologyDeleteRequest, self).__init__(**kwargs) self.method_name = 'pipelineTopologyDelete' # type: str @@ -1830,15 +2673,15 @@ class PipelineTopologyGetRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1848,12 +2691,17 @@ class PipelineTopologyGetRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ super(PipelineTopologyGetRequest, self).__init__(**kwargs) self.method_name = 'pipelineTopologyGet' # type: str @@ -1867,13 +2715,13 @@ class PipelineTopologyListRequest(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, } _attribute_map = { @@ -1881,12 +2729,15 @@ class PipelineTopologyListRequest(MethodRequest): 'api_version': {'key': '@apiVersion', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + """ super(PipelineTopologyListRequest, self).__init__(**kwargs) self.method_name = 'pipelineTopologyList' # type: str @@ -1894,23 +2745,23 @@ def __init__( class PipelineTopologyProperties(msrest.serialization.Model): """Pipeline topology properties. - :param description: An optional description of the pipeline topology. It is recommended that - the expected use of the topology to be described here. - :type description: str - :param parameters: List of the topology parameter declarations. Parameters declared here can be + :ivar description: An optional description of the pipeline topology. It is recommended that the + expected use of the topology to be described here. + :vartype description: str + :ivar parameters: List of the topology parameter declarations. Parameters declared here can be referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can have optional default values and can later be defined in individual instances of the pipeline. - :type parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDeclaration] - :param sources: List of the topology source nodes. Source nodes enable external data to be + :vartype parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDeclaration] + :ivar sources: List of the topology source nodes. Source nodes enable external data to be ingested by the pipeline. - :type sources: list[~azure.media.videoanalyzer.edge.models.SourceNodeBase] - :param processors: List of the topology processor nodes. Processor nodes enable pipeline data - to be analyzed, processed or transformed. - :type processors: list[~azure.media.videoanalyzer.edge.models.ProcessorNodeBase] - :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + :vartype sources: list[~azure.media.videoanalyzer.edge.models.SourceNodeBase] + :ivar processors: List of the topology processor nodes. Processor nodes enable pipeline data to + be analyzed, processed or transformed. + :vartype processors: list[~azure.media.videoanalyzer.edge.models.ProcessorNodeBase] + :ivar sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - :type sinks: list[~azure.media.videoanalyzer.edge.models.SinkNodeBase] + :vartype sinks: list[~azure.media.videoanalyzer.edge.models.SinkNodeBase] """ _attribute_map = { @@ -1925,6 +2776,25 @@ def __init__( self, **kwargs ): + """ + :keyword description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :paramtype description: str + :keyword parameters: List of the topology parameter declarations. Parameters declared here can + be referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string + pattern. Parameters can have optional default values and can later be defined in individual + instances of the pipeline. + :paramtype parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDeclaration] + :keyword sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :paramtype sources: list[~azure.media.videoanalyzer.edge.models.SourceNodeBase] + :keyword processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :paramtype processors: list[~azure.media.videoanalyzer.edge.models.ProcessorNodeBase] + :keyword sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :paramtype sinks: list[~azure.media.videoanalyzer.edge.models.SinkNodeBase] + """ super(PipelineTopologyProperties, self).__init__(**kwargs) self.description = kwargs.get('description', None) self.parameters = kwargs.get('parameters', None) @@ -1942,9 +2812,10 @@ class PipelineTopologySetRequest(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param pipeline_topology: Required. Pipeline topology describes the processing steps to be + :ivar pipeline_topology: Required. Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which acquires @@ -1963,12 +2834,11 @@ class PipelineTopologySetRequest(MethodRequest): * Processors: list of nodes which perform data analysis or transformations. -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - :type pipeline_topology: ~azure.media.videoanalyzer.edge.models.PipelineTopology + :vartype pipeline_topology: ~azure.media.videoanalyzer.edge.models.PipelineTopology """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'pipeline_topology': {'required': True}, } @@ -1978,19 +2848,48 @@ class PipelineTopologySetRequest(MethodRequest): 'pipeline_topology': {'key': 'pipelineTopology', 'type': 'PipelineTopology'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword pipeline_topology: Required. Pipeline topology describes the processing steps to be + applied when processing media for a particular outcome. The topology should be defined + according to the scenario to be achieved and can be reused across many pipeline instances which + share the same processing characteristics. For instance, a pipeline topology which acquires + data from a RTSP camera, process it with an specific AI model and stored the data on the cloud + can be reused across many different cameras, as long as the same processing should be applied + across all the cameras. Individual instance properties can be defined through the use of + user-defined parameters, which allow for a topology to be parameterized, thus allowing + individual pipelines to refer to different values, such as individual cameras RTSP endpoints + and credentials. Overall a topology is composed of the following: + + + * Parameters: list of user defined parameters that can be references across the topology + nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for + media to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + -Sinks: list of one or more data sinks which allow for data to be stored or exported to + other destinations. + :paramtype pipeline_topology: ~azure.media.videoanalyzer.edge.models.PipelineTopology + """ super(PipelineTopologySetRequest, self).__init__(**kwargs) self.method_name = 'pipelineTopologySet' # type: str self.pipeline_topology = kwargs['pipeline_topology'] class PipelineTopologySetRequestBody(PipelineTopology, MethodRequest): - """Pipeline topology resource representation. + """Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which acquires data from a RTSP camera, process it with an specific AI model and stored the data on the cloud can be reused across many different cameras, as long as the same processing should be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: + + +* Parameters: list of user defined parameters that can be references across the topology nodes. +* Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. +* Processors: list of nodes which perform data analysis or transformations. + -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. Variables are only populated by the server, and will be ignored when sending a request. @@ -1998,19 +2897,19 @@ class PipelineTopologySetRequestBody(PipelineTopology, MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Pipeline topology unique identifier. - :type name: str - :param system_data: Read-only system metadata associated with this object. - :type system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :param properties: Pipeline topology properties. - :type properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + :ivar name: Required. Pipeline topology unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Pipeline topology properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -2022,39 +2921,471 @@ class PipelineTopologySetRequestBody(PipelineTopology, MethodRequest): 'properties': {'key': 'properties', 'type': 'PipelineTopologyProperties'}, } - api_version = "1.0" - def __init__( self, **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Pipeline topology unique identifier. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Pipeline topology properties. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + """ super(PipelineTopologySetRequestBody, self).__init__(**kwargs) self.method_name = 'PipelineTopologySetRequestBody' # type: str + self.api_version = kwargs.get('api_version', "1.1") self.method_name = 'PipelineTopologySetRequestBody' # type: str self.name = kwargs['name'] self.system_data = kwargs.get('system_data', None) self.properties = kwargs.get('properties', None) +class RateControl(msrest.serialization.Model): + """Class representing the video's rate control. + + :ivar bit_rate_limit: the maximum output bitrate in kbps. + :vartype bit_rate_limit: float + :ivar encoding_interval: Interval at which images are encoded and transmitted. + :vartype encoding_interval: float + :ivar frame_rate_limit: Maximum output framerate in fps. + :vartype frame_rate_limit: float + :ivar guaranteed_frame_rate: A value of true indicates that frame rate is a fixed value rather + than an upper limit, and that the video encoder shall prioritize frame rate over all other + adaptable configuration values such as bitrate. + :vartype guaranteed_frame_rate: bool + """ + + _attribute_map = { + 'bit_rate_limit': {'key': 'bitRateLimit', 'type': 'float'}, + 'encoding_interval': {'key': 'encodingInterval', 'type': 'float'}, + 'frame_rate_limit': {'key': 'frameRateLimit', 'type': 'float'}, + 'guaranteed_frame_rate': {'key': 'guaranteedFrameRate', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword bit_rate_limit: the maximum output bitrate in kbps. + :paramtype bit_rate_limit: float + :keyword encoding_interval: Interval at which images are encoded and transmitted. + :paramtype encoding_interval: float + :keyword frame_rate_limit: Maximum output framerate in fps. + :paramtype frame_rate_limit: float + :keyword guaranteed_frame_rate: A value of true indicates that frame rate is a fixed value + rather than an upper limit, and that the video encoder shall prioritize frame rate over all + other adaptable configuration values such as bitrate. + :paramtype guaranteed_frame_rate: bool + """ + super(RateControl, self).__init__(**kwargs) + self.bit_rate_limit = kwargs.get('bit_rate_limit', None) + self.encoding_interval = kwargs.get('encoding_interval', None) + self.frame_rate_limit = kwargs.get('frame_rate_limit', None) + self.guaranteed_frame_rate = kwargs.get('guaranteed_frame_rate', None) + + +class RemoteDeviceAdapter(msrest.serialization.Model): + """The Video Analyzer edge module can act as a transparent gateway for video, enabling IoT devices to send video to the cloud from behind a firewall. A remote device adapter should be created for each such IoT device. Communication between the cloud and IoT device would then flow via the Video Analyzer edge module. + + All required parameters must be populated in order to send to Azure. + + :ivar name: Required. The unique identifier for the remote device adapter. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Properties of the remote device adapter. + :vartype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'RemoteDeviceAdapterProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword name: Required. The unique identifier for the remote device adapter. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Properties of the remote device adapter. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties + """ + super(RemoteDeviceAdapter, self).__init__(**kwargs) + self.name = kwargs['name'] + self.system_data = kwargs.get('system_data', None) + self.properties = kwargs.get('properties', None) + + +class RemoteDeviceAdapterCollection(msrest.serialization.Model): + """A list of remote device adapters. + + :ivar value: An array of remote device adapters. + :vartype value: list[~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter] + :ivar continuation_token: A continuation token to use in subsequent calls to enumerate through + the remote device adapter collection. This is used when the collection contains too many + results to return in one response. + :vartype continuation_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RemoteDeviceAdapter]'}, + 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword value: An array of remote device adapters. + :paramtype value: list[~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter] + :keyword continuation_token: A continuation token to use in subsequent calls to enumerate + through the remote device adapter collection. This is used when the collection contains too + many results to return in one response. + :paramtype continuation_token: str + """ + super(RemoteDeviceAdapterCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.continuation_token = kwargs.get('continuation_token', None) + + +class RemoteDeviceAdapterDeleteRequest(MethodRequestEmptyBodyBase): + """Deletes an existing remote device adapter. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar name: Required. Resource name. + :vartype name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(RemoteDeviceAdapterDeleteRequest, self).__init__(**kwargs) + self.method_name = 'remoteDeviceAdapterDelete' # type: str + + +class RemoteDeviceAdapterGetRequest(MethodRequestEmptyBodyBase): + """Retrieves an existing remote device adapter. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar name: Required. Resource name. + :vartype name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(RemoteDeviceAdapterGetRequest, self).__init__(**kwargs) + self.method_name = 'remoteDeviceAdapterGet' # type: str + + +class RemoteDeviceAdapterListRequest(MethodRequest): + """List all existing remote device adapters. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + """ + super(RemoteDeviceAdapterListRequest, self).__init__(**kwargs) + self.method_name = 'remoteDeviceAdapterList' # type: str + + +class RemoteDeviceAdapterProperties(msrest.serialization.Model): + """Remote device adapter properties. + + All required parameters must be populated in order to send to Azure. + + :ivar description: An optional description for the remote device adapter. + :vartype description: str + :ivar target: Required. The IoT device to which this remote device will connect. + :vartype target: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterTarget + :ivar iot_hub_device_connection: Required. Information that enables communication between the + IoT Hub and the IoT device - allowing this edge module to act as a transparent gateway between + the two. + :vartype iot_hub_device_connection: + ~azure.media.videoanalyzer.edge.models.IotHubDeviceConnection + """ + + _validation = { + 'target': {'required': True}, + 'iot_hub_device_connection': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'RemoteDeviceAdapterTarget'}, + 'iot_hub_device_connection': {'key': 'iotHubDeviceConnection', 'type': 'IotHubDeviceConnection'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword description: An optional description for the remote device adapter. + :paramtype description: str + :keyword target: Required. The IoT device to which this remote device will connect. + :paramtype target: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterTarget + :keyword iot_hub_device_connection: Required. Information that enables communication between + the IoT Hub and the IoT device - allowing this edge module to act as a transparent gateway + between the two. + :paramtype iot_hub_device_connection: + ~azure.media.videoanalyzer.edge.models.IotHubDeviceConnection + """ + super(RemoteDeviceAdapterProperties, self).__init__(**kwargs) + self.description = kwargs.get('description', None) + self.target = kwargs['target'] + self.iot_hub_device_connection = kwargs['iot_hub_device_connection'] + + +class RemoteDeviceAdapterSetRequest(MethodRequest): + """Creates a new remote device adapter or updates an existing one. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar remote_device_adapter: Required. The Video Analyzer edge module can act as a transparent + gateway for video, enabling IoT devices to send video to the cloud from behind a firewall. A + remote device adapter should be created for each such IoT device. Communication between the + cloud and IoT device would then flow via the Video Analyzer edge module. + :vartype remote_device_adapter: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'remote_device_adapter': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'remote_device_adapter': {'key': 'remoteDeviceAdapter', 'type': 'RemoteDeviceAdapter'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword remote_device_adapter: Required. The Video Analyzer edge module can act as a + transparent gateway for video, enabling IoT devices to send video to the cloud from behind a + firewall. A remote device adapter should be created for each such IoT device. Communication + between the cloud and IoT device would then flow via the Video Analyzer edge module. + :paramtype remote_device_adapter: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter + """ + super(RemoteDeviceAdapterSetRequest, self).__init__(**kwargs) + self.method_name = 'remoteDeviceAdapterSet' # type: str + self.remote_device_adapter = kwargs['remote_device_adapter'] + + +class RemoteDeviceAdapterSetRequestBody(RemoteDeviceAdapter, MethodRequest): + """The Video Analyzer edge module can act as a transparent gateway for video, enabling IoT devices to send video to the cloud from behind a firewall. A remote device adapter should be created for each such IoT device. Communication between the cloud and IoT device would then flow via the Video Analyzer edge module. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar name: Required. The unique identifier for the remote device adapter. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Properties of the remote device adapter. + :vartype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'RemoteDeviceAdapterProperties'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. The unique identifier for the remote device adapter. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Properties of the remote device adapter. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties + """ + super(RemoteDeviceAdapterSetRequestBody, self).__init__(**kwargs) + self.method_name = 'RemoteDeviceAdapterSetRequestBody' # type: str + self.api_version = kwargs.get('api_version', "1.1") + self.method_name = 'RemoteDeviceAdapterSetRequestBody' # type: str + self.name = kwargs['name'] + self.system_data = kwargs.get('system_data', None) + self.properties = kwargs.get('properties', None) + + +class RemoteDeviceAdapterTarget(msrest.serialization.Model): + """Properties of the remote device adapter target. + + All required parameters must be populated in order to send to Azure. + + :ivar host: Required. Hostname or IP address of the remote device. + :vartype host: str + """ + + _validation = { + 'host': {'required': True}, + } + + _attribute_map = { + 'host': {'key': 'host', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword host: Required. Hostname or IP address of the remote device. + :paramtype host: str + """ + super(RemoteDeviceAdapterTarget, self).__init__(**kwargs) + self.host = kwargs['host'] + + class RtspSource(SourceNodeBase): """RTSP source allows for media from an RTSP camera or generic RTSP server to be ingested into a live pipeline. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param transport: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar transport: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are exchanged through long lived HTTP connections, and the RTP packages are interleaved in the HTTP connections alongside the RTSP messages. Possible values include: "http", "tcp". - :type transport: str or ~azure.media.videoanalyzer.edge.models.RtspTransport - :param endpoint: Required. RTSP endpoint information for Video Analyzer to connect to. This + :vartype transport: str or ~azure.media.videoanalyzer.edge.models.RtspTransport + :ivar endpoint: Required. RTSP endpoint information for Video Analyzer to connect to. This contains the required information for Video Analyzer to connect to RTSP cameras and/or generic RTSP servers. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase """ _validation = { @@ -2074,6 +3405,20 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword transport: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When + using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the + RTSP messages are exchanged through long lived HTTP connections, and the RTP packages are + interleaved in the HTTP connections alongside the RTSP messages. Possible values include: + "http", "tcp". + :paramtype transport: str or ~azure.media.videoanalyzer.edge.models.RtspTransport + :keyword endpoint: Required. RTSP endpoint information for Video Analyzer to connect to. This + contains the required information for Video Analyzer to connect to RTSP cameras and/or generic + RTSP servers. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + """ super(RtspSource, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.RtspSource' # type: str self.transport = kwargs.get('transport', None) @@ -2083,15 +3428,15 @@ def __init__( class SamplingOptions(msrest.serialization.Model): """Defines how often media is submitted to the extension plugin. - :param skip_samples_without_annotation: When set to 'true', prevents frames without upstream + :ivar skip_samples_without_annotation: When set to 'true', prevents frames without upstream inference data to be sent to the extension plugin. This is useful to limit the frames sent to the extension to pre-analyzed frames only. For example, when used downstream from a motion detector, this can enable for only frames in which motion has been detected to be further analyzed. - :type skip_samples_without_annotation: str - :param maximum_samples_per_second: Maximum rate of samples submitted to the extension. This + :vartype skip_samples_without_annotation: str + :ivar maximum_samples_per_second: Maximum rate of samples submitted to the extension. This prevents an extension plugin to be overloaded with data. - :type maximum_samples_per_second: str + :vartype maximum_samples_per_second: str """ _attribute_map = { @@ -2103,6 +3448,17 @@ def __init__( self, **kwargs ): + """ + :keyword skip_samples_without_annotation: When set to 'true', prevents frames without upstream + inference data to be sent to the extension plugin. This is useful to limit the frames sent to + the extension to pre-analyzed frames only. For example, when used downstream from a motion + detector, this can enable for only frames in which motion has been detected to be further + analyzed. + :paramtype skip_samples_without_annotation: str + :keyword maximum_samples_per_second: Maximum rate of samples submitted to the extension. This + prevents an extension plugin to be overloaded with data. + :paramtype maximum_samples_per_second: str + """ super(SamplingOptions, self).__init__(**kwargs) self.skip_samples_without_annotation = kwargs.get('skip_samples_without_annotation', None) self.maximum_samples_per_second = kwargs.get('maximum_samples_per_second', None) @@ -2113,31 +3469,31 @@ class SignalGateProcessor(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param activation_evaluation_window: The period of time over which the gate gathers input - events before evaluating them. - :type activation_evaluation_window: str - :param activation_signal_offset: Signal offset once the gate is activated (can be negative). It + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar activation_evaluation_window: The period of time over which the gate gathers input events + before evaluating them. + :vartype activation_evaluation_window: str + :ivar activation_signal_offset: Signal offset once the gate is activated (can be negative). It determines the how much farther behind of after the signal will be let through based on the activation time. A negative offset indicates that data prior the activation time must be included on the signal that is let through, once the gate is activated. When used upstream of a file or video sink, this allows for scenarios such as recording buffered media prior an event, such as: record video 5 seconds prior motions is detected. - :type activation_signal_offset: str - :param minimum_activation_time: The minimum period for which the gate remains open in the + :vartype activation_signal_offset: str + :ivar minimum_activation_time: The minimum period for which the gate remains open in the absence of subsequent triggers (events). When used upstream of a file or video sink, it determines the minimum length of the recorded video clip. - :type minimum_activation_time: str - :param maximum_activation_time: The maximum period for which the gate remains open in the + :vartype minimum_activation_time: str + :ivar maximum_activation_time: The maximum period for which the gate remains open in the presence of subsequent triggers (events). When used upstream of a file or video sink, it determines the maximum length of the recorded video clip. - :type maximum_activation_time: str + :vartype maximum_activation_time: str """ _validation = { @@ -2160,6 +3516,31 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword activation_evaluation_window: The period of time over which the gate gathers input + events before evaluating them. + :paramtype activation_evaluation_window: str + :keyword activation_signal_offset: Signal offset once the gate is activated (can be negative). + It determines the how much farther behind of after the signal will be let through based on the + activation time. A negative offset indicates that data prior the activation time must be + included on the signal that is let through, once the gate is activated. When used upstream of a + file or video sink, this allows for scenarios such as recording buffered media prior an event, + such as: record video 5 seconds prior motions is detected. + :paramtype activation_signal_offset: str + :keyword minimum_activation_time: The minimum period for which the gate remains open in the + absence of subsequent triggers (events). When used upstream of a file or video sink, it + determines the minimum length of the recorded video clip. + :paramtype minimum_activation_time: str + :keyword maximum_activation_time: The maximum period for which the gate remains open in the + presence of subsequent triggers (events). When used upstream of a file or video sink, it + determines the maximum length of the recorded video clip. + :paramtype maximum_activation_time: str + """ super(SignalGateProcessor, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.SignalGateProcessor' # type: str self.activation_evaluation_window = kwargs.get('activation_evaluation_window', None) @@ -2176,8 +3557,8 @@ class SpatialAnalysisOperationBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -2196,6 +3577,8 @@ def __init__( self, **kwargs ): + """ + """ super(SpatialAnalysisOperationBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -2205,11 +3588,11 @@ class SpatialAnalysisCustomOperation(SpatialAnalysisOperationBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param extension_configuration: Required. Custom configuration to pass to the Azure Cognitive + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar extension_configuration: Required. Custom configuration to pass to the Azure Cognitive Services Spatial Analysis module. - :type extension_configuration: str + :vartype extension_configuration: str """ _validation = { @@ -2226,6 +3609,11 @@ def __init__( self, **kwargs ): + """ + :keyword extension_configuration: Required. Custom configuration to pass to the Azure Cognitive + Services Spatial Analysis module. + :paramtype extension_configuration: str + """ super(SpatialAnalysisCustomOperation, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation' # type: str self.extension_configuration = kwargs['extension_configuration'] @@ -2234,11 +3622,11 @@ def __init__( class SpatialAnalysisOperationEventBase(msrest.serialization.Model): """Defines the Azure Cognitive Services Spatial Analysis operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus """ _attribute_map = { @@ -2250,6 +3638,13 @@ def __init__( self, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + """ super(SpatialAnalysisOperationEventBase, self).__init__(**kwargs) self.threshold = kwargs.get('threshold', None) self.focus = kwargs.get('focus', None) @@ -2258,16 +3653,16 @@ def __init__( class SpatialAnalysisPersonCountEvent(SpatialAnalysisOperationEventBase): """Defines a Spatial Analysis person count operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus - :param trigger: The event trigger type. Possible values include: "event", "interval". - :type trigger: str or + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :ivar trigger: The event trigger type. Possible values include: "event", "interval". + :vartype trigger: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEventTrigger - :param output_frequency: The event or interval output frequency. - :type output_frequency: str + :ivar output_frequency: The event or interval output frequency. + :vartype output_frequency: str """ _attribute_map = { @@ -2281,6 +3676,18 @@ def __init__( self, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :keyword trigger: The event trigger type. Possible values include: "event", "interval". + :paramtype trigger: str or + ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEventTrigger + :keyword output_frequency: The event or interval output frequency. + :paramtype output_frequency: str + """ super(SpatialAnalysisPersonCountEvent, self).__init__(**kwargs) self.trigger = kwargs.get('trigger', None) self.output_frequency = kwargs.get('output_frequency', None) @@ -2294,17 +3701,23 @@ class SpatialAnalysisTypedOperationBase(SpatialAnalysisOperationBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str + :vartype enable_face_mask_classifier: str """ _validation = { @@ -2314,8 +3727,11 @@ class SpatialAnalysisTypedOperationBase(SpatialAnalysisOperationBase): _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, } @@ -2327,11 +3743,31 @@ def __init__( self, **kwargs ): + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + """ super(SpatialAnalysisTypedOperationBase, self).__init__(**kwargs) self.type = 'SpatialAnalysisTypedOperationBase' # type: str self.debug = kwargs.get('debug', None) + self.calibration_configuration = kwargs.get('calibration_configuration', None) self.camera_configuration = kwargs.get('camera_configuration', None) + self.camera_calibrator_node_configuration = kwargs.get('camera_calibrator_node_configuration', None) self.detector_node_configuration = kwargs.get('detector_node_configuration', None) + self.tracker_node_configuration = kwargs.get('tracker_node_configuration', None) self.enable_face_mask_classifier = kwargs.get('enable_face_mask_classifier', None) @@ -2340,19 +3776,26 @@ class SpatialAnalysisPersonCountOperation(SpatialAnalysisTypedOperationBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str - :param zones: Required. The list of zones and optional events. - :type zones: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountZoneEvents] + :vartype enable_face_mask_classifier: str + :ivar zones: Required. The list of zones and optional events. + :vartype zones: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountZoneEvents] """ _validation = { @@ -2363,8 +3806,11 @@ class SpatialAnalysisPersonCountOperation(SpatialAnalysisTypedOperationBase): _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonCountZoneEvents]'}, } @@ -2373,6 +3819,26 @@ def __init__( self, **kwargs ): + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + :keyword zones: Required. The list of zones and optional events. + :paramtype zones: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountZoneEvents] + """ super(SpatialAnalysisPersonCountOperation, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation' # type: str self.zones = kwargs['zones'] @@ -2383,10 +3849,10 @@ class SpatialAnalysisPersonCountZoneEvents(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param zone: Required. The named zone. - :type zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase - :param events: The event configuration. - :type events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEvent] + :ivar zone: Required. The named zone. + :vartype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :ivar events: The event configuration. + :vartype events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEvent] """ _validation = { @@ -2402,6 +3868,12 @@ def __init__( self, **kwargs ): + """ + :keyword zone: Required. The named zone. + :paramtype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :keyword events: The event configuration. + :paramtype events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEvent] + """ super(SpatialAnalysisPersonCountZoneEvents, self).__init__(**kwargs) self.zone = kwargs['zone'] self.events = kwargs.get('events', None) @@ -2410,20 +3882,20 @@ def __init__( class SpatialAnalysisPersonDistanceEvent(SpatialAnalysisOperationEventBase): """Defines a Spatial Analysis person distance operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus - :param trigger: The event trigger type. Possible values include: "event", "interval". - :type trigger: str or + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :ivar trigger: The event trigger type. Possible values include: "event", "interval". + :vartype trigger: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEventTrigger - :param output_frequency: The event or interval output frequency. - :type output_frequency: str - :param minimum_distance_threshold: The minimum distance threshold. - :type minimum_distance_threshold: str - :param maximum_distance_threshold: The maximum distance threshold. - :type maximum_distance_threshold: str + :ivar output_frequency: The event or interval output frequency. + :vartype output_frequency: str + :ivar minimum_distance_threshold: The minimum distance threshold. + :vartype minimum_distance_threshold: str + :ivar maximum_distance_threshold: The maximum distance threshold. + :vartype maximum_distance_threshold: str """ _attribute_map = { @@ -2439,6 +3911,22 @@ def __init__( self, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :keyword trigger: The event trigger type. Possible values include: "event", "interval". + :paramtype trigger: str or + ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEventTrigger + :keyword output_frequency: The event or interval output frequency. + :paramtype output_frequency: str + :keyword minimum_distance_threshold: The minimum distance threshold. + :paramtype minimum_distance_threshold: str + :keyword maximum_distance_threshold: The maximum distance threshold. + :paramtype maximum_distance_threshold: str + """ super(SpatialAnalysisPersonDistanceEvent, self).__init__(**kwargs) self.trigger = kwargs.get('trigger', None) self.output_frequency = kwargs.get('output_frequency', None) @@ -2451,19 +3939,25 @@ class SpatialAnalysisPersonDistanceOperation(SpatialAnalysisTypedOperationBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str - :param zones: Required. The list of zones with optional events. - :type zones: + :vartype enable_face_mask_classifier: str + :ivar zones: Required. The list of zones with optional events. + :vartype zones: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceZoneEvents] """ @@ -2475,8 +3969,11 @@ class SpatialAnalysisPersonDistanceOperation(SpatialAnalysisTypedOperationBase): _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonDistanceZoneEvents]'}, } @@ -2485,6 +3982,26 @@ def __init__( self, **kwargs ): + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + :keyword zones: Required. The list of zones with optional events. + :paramtype zones: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceZoneEvents] + """ super(SpatialAnalysisPersonDistanceOperation, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation' # type: str self.zones = kwargs['zones'] @@ -2495,10 +4012,11 @@ class SpatialAnalysisPersonDistanceZoneEvents(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param zone: Required. The named zone. - :type zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase - :param events: The event configuration. - :type events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEvent] + :ivar zone: Required. The named zone. + :vartype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :ivar events: The event configuration. + :vartype events: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEvent] """ _validation = { @@ -2514,6 +4032,13 @@ def __init__( self, **kwargs ): + """ + :keyword zone: Required. The named zone. + :paramtype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :keyword events: The event configuration. + :paramtype events: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEvent] + """ super(SpatialAnalysisPersonDistanceZoneEvents, self).__init__(**kwargs) self.zone = kwargs['zone'] self.events = kwargs.get('events', None) @@ -2522,11 +4047,11 @@ def __init__( class SpatialAnalysisPersonLineCrossingEvent(SpatialAnalysisOperationEventBase): """Defines a Spatial Analysis person line crossing operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus """ _attribute_map = { @@ -2538,6 +4063,13 @@ def __init__( self, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + """ super(SpatialAnalysisPersonLineCrossingEvent, self).__init__(**kwargs) @@ -2546,10 +4078,10 @@ class SpatialAnalysisPersonLineCrossingLineEvents(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param line: Required. The named line. - :type line: ~azure.media.videoanalyzer.edge.models.NamedLineBase - :param events: The event configuration. - :type events: + :ivar line: Required. The named line. + :vartype line: ~azure.media.videoanalyzer.edge.models.NamedLineBase + :ivar events: The event configuration. + :vartype events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingEvent] """ @@ -2566,6 +4098,13 @@ def __init__( self, **kwargs ): + """ + :keyword line: Required. The named line. + :paramtype line: ~azure.media.videoanalyzer.edge.models.NamedLineBase + :keyword events: The event configuration. + :paramtype events: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingEvent] + """ super(SpatialAnalysisPersonLineCrossingLineEvents, self).__init__(**kwargs) self.line = kwargs['line'] self.events = kwargs.get('events', None) @@ -2576,19 +4115,25 @@ class SpatialAnalysisPersonLineCrossingOperation(SpatialAnalysisTypedOperationBa All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str - :param lines: Required. The list of lines with optional events. - :type lines: + :vartype enable_face_mask_classifier: str + :ivar lines: Required. The list of lines with optional events. + :vartype lines: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingLineEvents] """ @@ -2600,8 +4145,11 @@ class SpatialAnalysisPersonLineCrossingOperation(SpatialAnalysisTypedOperationBa _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, 'lines': {'key': 'lines', 'type': '[SpatialAnalysisPersonLineCrossingLineEvents]'}, } @@ -2610,6 +4158,26 @@ def __init__( self, **kwargs ): + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + :keyword lines: Required. The list of lines with optional events. + :paramtype lines: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingLineEvents] + """ super(SpatialAnalysisPersonLineCrossingOperation, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation' # type: str self.lines = kwargs['lines'] @@ -2618,13 +4186,13 @@ def __init__( class SpatialAnalysisPersonZoneCrossingEvent(SpatialAnalysisOperationEventBase): """Defines a Spatial Analysis person crossing zone operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus - :param event_type: The event type. Possible values include: "zoneCrossing", "zoneDwellTime". - :type event_type: str or + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :ivar event_type: The event type. Possible values include: "zoneCrossing", "zoneDwellTime". + :vartype event_type: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEventType """ @@ -2638,6 +4206,16 @@ def __init__( self, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :keyword event_type: The event type. Possible values include: "zoneCrossing", "zoneDwellTime". + :paramtype event_type: str or + ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEventType + """ super(SpatialAnalysisPersonZoneCrossingEvent, self).__init__(**kwargs) self.event_type = kwargs.get('event_type', None) @@ -2647,19 +4225,25 @@ class SpatialAnalysisPersonZoneCrossingOperation(SpatialAnalysisTypedOperationBa All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str - :param zones: Required. The list of zones with optional events. - :type zones: + :vartype enable_face_mask_classifier: str + :ivar zones: Required. The list of zones with optional events. + :vartype zones: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingZoneEvents] """ @@ -2671,8 +4255,11 @@ class SpatialAnalysisPersonZoneCrossingOperation(SpatialAnalysisTypedOperationBa _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonZoneCrossingZoneEvents]'}, } @@ -2681,6 +4268,26 @@ def __init__( self, **kwargs ): + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + :keyword zones: Required. The list of zones with optional events. + :paramtype zones: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingZoneEvents] + """ super(SpatialAnalysisPersonZoneCrossingOperation, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation' # type: str self.zones = kwargs['zones'] @@ -2691,10 +4298,10 @@ class SpatialAnalysisPersonZoneCrossingZoneEvents(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param zone: Required. The named zone. - :type zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase - :param events: The event configuration. - :type events: + :ivar zone: Required. The named zone. + :vartype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :ivar events: The event configuration. + :vartype events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEvent] """ @@ -2711,20 +4318,61 @@ def __init__( self, **kwargs ): + """ + :keyword zone: Required. The named zone. + :paramtype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :keyword events: The event configuration. + :paramtype events: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEvent] + """ super(SpatialAnalysisPersonZoneCrossingZoneEvents, self).__init__(**kwargs) self.zone = kwargs['zone'] self.events = kwargs.get('events', None) +class SymmetricKeyCredentials(CredentialsBase): + """Symmetric key credential. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar key: Required. Symmetric key credential. + :vartype key: str + """ + + _validation = { + 'type': {'required': True}, + 'key': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword key: Required. Symmetric key credential. + :paramtype key: str + """ + super(SymmetricKeyCredentials, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.SymmetricKeyCredentials' # type: str + self.key = kwargs['key'] + + class SystemData(msrest.serialization.Model): """Read-only system metadata associated with a resource. - :param created_at: Date and time when this resource was first created. Value is represented in + :ivar created_at: Date and time when this resource was first created. Value is represented in UTC according to the ISO8601 date format. - :type created_at: ~datetime.datetime - :param last_modified_at: Date and time when this resource was last modified. Value is + :vartype created_at: ~datetime.datetime + :ivar last_modified_at: Date and time when this resource was last modified. Value is represented in UTC according to the ISO8601 date format. - :type last_modified_at: ~datetime.datetime + :vartype last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -2736,6 +4384,14 @@ def __init__( self, **kwargs ): + """ + :keyword created_at: Date and time when this resource was first created. Value is represented + in UTC according to the ISO8601 date format. + :paramtype created_at: ~datetime.datetime + :keyword last_modified_at: Date and time when this resource was last modified. Value is + represented in UTC according to the ISO8601 date format. + :paramtype last_modified_at: ~datetime.datetime + """ super(SystemData, self).__init__(**kwargs) self.created_at = kwargs.get('created_at', None) self.last_modified_at = kwargs.get('last_modified_at', None) @@ -2746,19 +4402,19 @@ class TlsEndpoint(EndpointBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param credentials: Credentials to be presented to the endpoint. - :type credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase - :param url: Required. The endpoint URL for Video Analyzer to connect to. - :type url: str - :param trusted_certificates: List of trusted certificate authorities when authenticating a TLS + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar credentials: Credentials to be presented to the endpoint. + :vartype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :ivar url: Required. The endpoint URL for Video Analyzer to connect to. + :vartype url: str + :ivar trusted_certificates: List of trusted certificate authorities when authenticating a TLS connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used. - :type trusted_certificates: ~azure.media.videoanalyzer.edge.models.CertificateSource - :param validation_options: Validation options to use when authenticating a TLS connection. By + :vartype trusted_certificates: ~azure.media.videoanalyzer.edge.models.CertificateSource + :ivar validation_options: Validation options to use when authenticating a TLS connection. By default, strict validation is used. - :type validation_options: ~azure.media.videoanalyzer.edge.models.TlsValidationOptions + :vartype validation_options: ~azure.media.videoanalyzer.edge.models.TlsValidationOptions """ _validation = { @@ -2778,6 +4434,19 @@ def __init__( self, **kwargs ): + """ + :keyword credentials: Credentials to be presented to the endpoint. + :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :keyword url: Required. The endpoint URL for Video Analyzer to connect to. + :paramtype url: str + :keyword trusted_certificates: List of trusted certificate authorities when authenticating a + TLS connection. A null list designates that Azure Video Analyzer's list of trusted authorities + should be used. + :paramtype trusted_certificates: ~azure.media.videoanalyzer.edge.models.CertificateSource + :keyword validation_options: Validation options to use when authenticating a TLS connection. By + default, strict validation is used. + :paramtype validation_options: ~azure.media.videoanalyzer.edge.models.TlsValidationOptions + """ super(TlsEndpoint, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.TlsEndpoint' # type: str self.trusted_certificates = kwargs.get('trusted_certificates', None) @@ -2787,12 +4456,12 @@ def __init__( class TlsValidationOptions(msrest.serialization.Model): """Options for controlling the validation of TLS endpoints. - :param ignore_hostname: When set to 'true' causes the certificate subject name validation to be + :ivar ignore_hostname: When set to 'true' causes the certificate subject name validation to be skipped. Default is 'false'. - :type ignore_hostname: str - :param ignore_signature: When set to 'true' causes the certificate chain trust validation to be + :vartype ignore_hostname: str + :ivar ignore_signature: When set to 'true' causes the certificate chain trust validation to be skipped. Default is 'false'. - :type ignore_signature: str + :vartype ignore_signature: str """ _attribute_map = { @@ -2804,6 +4473,14 @@ def __init__( self, **kwargs ): + """ + :keyword ignore_hostname: When set to 'true' causes the certificate subject name validation to + be skipped. Default is 'false'. + :paramtype ignore_hostname: str + :keyword ignore_signature: When set to 'true' causes the certificate chain trust validation to + be skipped. Default is 'false'. + :paramtype ignore_signature: str + """ super(TlsValidationOptions, self).__init__(**kwargs) self.ignore_hostname = kwargs.get('ignore_hostname', None) self.ignore_signature = kwargs.get('ignore_signature', None) @@ -2814,12 +4491,12 @@ class UnsecuredEndpoint(EndpointBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param credentials: Credentials to be presented to the endpoint. - :type credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase - :param url: Required. The endpoint URL for Video Analyzer to connect to. - :type url: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar credentials: Credentials to be presented to the endpoint. + :vartype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :ivar url: Required. The endpoint URL for Video Analyzer to connect to. + :vartype url: str """ _validation = { @@ -2837,6 +4514,12 @@ def __init__( self, **kwargs ): + """ + :keyword credentials: Credentials to be presented to the endpoint. + :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :keyword url: Required. The endpoint URL for Video Analyzer to connect to. + :paramtype url: str + """ super(UnsecuredEndpoint, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.UnsecuredEndpoint' # type: str @@ -2846,14 +4529,14 @@ class UsernamePasswordCredentials(CredentialsBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param username: Required. Username to be presented as part of the credentials. - :type username: str - :param password: Required. Password to be presented as part of the credentials. It is + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar username: Required. Username to be presented as part of the credentials. + :vartype username: str + :ivar password: Required. Password to be presented as part of the credentials. It is recommended that this value is parameterized as a secret string in order to prevent this value to be returned as part of the resource on API requests. - :type password: str + :vartype password: str """ _validation = { @@ -2872,6 +4555,14 @@ def __init__( self, **kwargs ): + """ + :keyword username: Required. Username to be presented as part of the credentials. + :paramtype username: str + :keyword password: Required. Password to be presented as part of the credentials. It is + recommended that this value is parameterized as a secret string in order to prevent this value + to be returned as part of the resource on API requests. + :paramtype password: str + """ super(UsernamePasswordCredentials, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials' # type: str self.username = kwargs['username'] @@ -2881,36 +4572,170 @@ def __init__( class VideoCreationProperties(msrest.serialization.Model): """Optional video properties to be used in case a new video resource needs to be created on the service. These will not take effect if the video already exists. - :param title: Optional video title provided by the user. Value can be up to 256 characters - long. - :type title: str - :param description: Optional video description provided by the user. Value can be up to 2048 + :ivar title: Optional video title provided by the user. Value can be up to 256 characters long. + :vartype title: str + :ivar description: Optional video description provided by the user. Value can be up to 2048 characters long. - :type description: str - :param segment_length: Video segment length indicates the length of individual video files + :vartype description: str + :ivar segment_length: Video segment length indicates the length of individual video files (segments) which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the archive playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the video is initially created can lead to errors when uploading media to the archive. Default value is 30 seconds. - :type segment_length: str + :vartype segment_length: str + :ivar retention_period: Video retention period indicates how long the video is kept in storage, + and must be a multiple of 1 day. For example, if this is set to 30 days, then content older + than 30 days will be deleted. + :vartype retention_period: str """ _attribute_map = { 'title': {'key': 'title', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, } def __init__( self, **kwargs ): + """ + :keyword title: Optional video title provided by the user. Value can be up to 256 characters + long. + :paramtype title: str + :keyword description: Optional video description provided by the user. Value can be up to 2048 + characters long. + :paramtype description: str + :keyword segment_length: Video segment length indicates the length of individual video files + (segments) which are persisted to storage. Smaller segments provide lower archive playback + latency but generate larger volume of storage transactions. Larger segments reduce the amount + of storage transactions while increasing the archive playback latency. Value must be specified + in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary between 30 seconds to + 5 minutes, in 30 seconds increments. Changing this value after the video is initially created + can lead to errors when uploading media to the archive. Default value is 30 seconds. + :paramtype segment_length: str + :keyword retention_period: Video retention period indicates how long the video is kept in + storage, and must be a multiple of 1 day. For example, if this is set to 30 days, then content + older than 30 days will be deleted. + :paramtype retention_period: str + """ super(VideoCreationProperties, self).__init__(**kwargs) self.title = kwargs.get('title', None) self.description = kwargs.get('description', None) self.segment_length = kwargs.get('segment_length', None) + self.retention_period = kwargs.get('retention_period', None) + + +class VideoEncoderConfiguration(msrest.serialization.Model): + """Class representing the MPEG4 Configuration. + + :ivar encoding: The video codec used by the Media Profile. Possible values include: "JPEG", + "H264", "MPEG4". + :vartype encoding: str or ~azure.media.videoanalyzer.edge.models.VideoEncoding + :ivar quality: Relative value representing the quality of the video. + :vartype quality: float + :ivar resolution: The Video Resolution. + :vartype resolution: ~azure.media.videoanalyzer.edge.models.VideoResolution + :ivar rate_control: The Video's rate control. + :vartype rate_control: ~azure.media.videoanalyzer.edge.models.RateControl + :ivar h264: The H264 Configuration. + :vartype h264: ~azure.media.videoanalyzer.edge.models.H264Configuration + :ivar mpeg4: The H264 Configuration. + :vartype mpeg4: ~azure.media.videoanalyzer.edge.models.MPEG4Configuration + """ + + _attribute_map = { + 'encoding': {'key': 'encoding', 'type': 'str'}, + 'quality': {'key': 'quality', 'type': 'float'}, + 'resolution': {'key': 'resolution', 'type': 'VideoResolution'}, + 'rate_control': {'key': 'rateControl', 'type': 'RateControl'}, + 'h264': {'key': 'h264', 'type': 'H264Configuration'}, + 'mpeg4': {'key': 'mpeg4', 'type': 'MPEG4Configuration'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword encoding: The video codec used by the Media Profile. Possible values include: "JPEG", + "H264", "MPEG4". + :paramtype encoding: str or ~azure.media.videoanalyzer.edge.models.VideoEncoding + :keyword quality: Relative value representing the quality of the video. + :paramtype quality: float + :keyword resolution: The Video Resolution. + :paramtype resolution: ~azure.media.videoanalyzer.edge.models.VideoResolution + :keyword rate_control: The Video's rate control. + :paramtype rate_control: ~azure.media.videoanalyzer.edge.models.RateControl + :keyword h264: The H264 Configuration. + :paramtype h264: ~azure.media.videoanalyzer.edge.models.H264Configuration + :keyword mpeg4: The H264 Configuration. + :paramtype mpeg4: ~azure.media.videoanalyzer.edge.models.MPEG4Configuration + """ + super(VideoEncoderConfiguration, self).__init__(**kwargs) + self.encoding = kwargs.get('encoding', None) + self.quality = kwargs.get('quality', None) + self.resolution = kwargs.get('resolution', None) + self.rate_control = kwargs.get('rate_control', None) + self.h264 = kwargs.get('h264', None) + self.mpeg4 = kwargs.get('mpeg4', None) + + +class VideoPublishingOptions(msrest.serialization.Model): + """Options for changing video publishing behavior on the video sink and output video. + + :ivar enable_video_preview_image: When set to 'true' the video will publish preview images. + Default is 'false'. + :vartype enable_video_preview_image: str + """ + + _attribute_map = { + 'enable_video_preview_image': {'key': 'enableVideoPreviewImage', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword enable_video_preview_image: When set to 'true' the video will publish preview images. + Default is 'false'. + :paramtype enable_video_preview_image: str + """ + super(VideoPublishingOptions, self).__init__(**kwargs) + self.enable_video_preview_image = kwargs.get('enable_video_preview_image', None) + + +class VideoResolution(msrest.serialization.Model): + """The Video resolution. + + :ivar width: The number of columns of the Video image. + :vartype width: float + :ivar height: The number of lines of the Video image. + :vartype height: float + """ + + _attribute_map = { + 'width': {'key': 'width', 'type': 'float'}, + 'height': {'key': 'height', 'type': 'float'}, + } + + def __init__( + self, + **kwargs + ): + """ + :keyword width: The number of columns of the Video image. + :paramtype width: float + :keyword height: The number of lines of the Video image. + :paramtype height: float + """ + super(VideoResolution, self).__init__(**kwargs) + self.width = kwargs.get('width', None) + self.height = kwargs.get('height', None) class VideoSink(SinkNodeBase): @@ -2918,28 +4743,33 @@ class VideoSink(SinkNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param video_name: Required. Name of a new or existing Video Analyzer video resource used for + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar video_name: Required. Name of a new or existing Video Analyzer video resource used for the media recording. - :type video_name: str - :param video_creation_properties: Optional video properties to be used in case a new video + :vartype video_name: str + :ivar video_creation_properties: Optional video properties to be used in case a new video resource needs to be created on the service. - :type video_creation_properties: ~azure.media.videoanalyzer.edge.models.VideoCreationProperties - :param local_media_cache_path: Required. Path to a local file system directory for caching of + :vartype video_creation_properties: + ~azure.media.videoanalyzer.edge.models.VideoCreationProperties + :ivar video_publishing_options: Optional video publishing options to be used for changing + publishing behavior of the output video. + :vartype video_publishing_options: + ~azure.media.videoanalyzer.edge.models.VideoPublishingOptions + :ivar local_media_cache_path: Required. Path to a local file system directory for caching of temporary media files. This will also be used to store content which cannot be immediately uploaded to Azure due to Internet connectivity issues. - :type local_media_cache_path: str - :param local_media_cache_maximum_size_mi_b: Required. Maximum amount of disk space that can be + :vartype local_media_cache_path: str + :ivar local_media_cache_maximum_size_mi_b: Required. Maximum amount of disk space that can be used for caching of temporary media files. Once this limit is reached, the oldest segments of the media archive will be continuously deleted in order to make space for new media, thus leading to gaps in the cloud recorded content. - :type local_media_cache_maximum_size_mi_b: str + :vartype local_media_cache_maximum_size_mi_b: str """ _validation = { @@ -2957,6 +4787,7 @@ class VideoSink(SinkNodeBase): 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, 'video_name': {'key': 'videoName', 'type': 'str'}, 'video_creation_properties': {'key': 'videoCreationProperties', 'type': 'VideoCreationProperties'}, + 'video_publishing_options': {'key': 'videoPublishingOptions', 'type': 'VideoPublishingOptions'}, 'local_media_cache_path': {'key': 'localMediaCachePath', 'type': 'str'}, 'local_media_cache_maximum_size_mi_b': {'key': 'localMediaCacheMaximumSizeMiB', 'type': 'str'}, } @@ -2965,9 +4796,37 @@ def __init__( self, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword video_name: Required. Name of a new or existing Video Analyzer video resource used for + the media recording. + :paramtype video_name: str + :keyword video_creation_properties: Optional video properties to be used in case a new video + resource needs to be created on the service. + :paramtype video_creation_properties: + ~azure.media.videoanalyzer.edge.models.VideoCreationProperties + :keyword video_publishing_options: Optional video publishing options to be used for changing + publishing behavior of the output video. + :paramtype video_publishing_options: + ~azure.media.videoanalyzer.edge.models.VideoPublishingOptions + :keyword local_media_cache_path: Required. Path to a local file system directory for caching of + temporary media files. This will also be used to store content which cannot be immediately + uploaded to Azure due to Internet connectivity issues. + :paramtype local_media_cache_path: str + :keyword local_media_cache_maximum_size_mi_b: Required. Maximum amount of disk space that can + be used for caching of temporary media files. Once this limit is reached, the oldest segments + of the media archive will be continuously deleted in order to make space for new media, thus + leading to gaps in the cloud recorded content. + :paramtype local_media_cache_maximum_size_mi_b: str + """ super(VideoSink, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.VideoSink' # type: str self.video_name = kwargs['video_name'] self.video_creation_properties = kwargs.get('video_creation_properties', None) + self.video_publishing_options = kwargs.get('video_publishing_options', None) self.local_media_cache_path = kwargs['local_media_cache_path'] self.local_media_cache_maximum_size_mi_b = kwargs['local_media_cache_maximum_size_mi_b'] diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models_py3.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models_py3.py index e606b102579c..a78b99e43b11 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models_py3.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_generated/models/_models_py3.py @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import List, Optional, Union +from typing import Any, List, Optional, Union import msrest.serialization @@ -22,8 +22,8 @@ class CertificateSource(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -42,6 +42,8 @@ def __init__( self, **kwargs ): + """ + """ super(CertificateSource, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -54,13 +56,13 @@ class ProcessorNodeBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] """ _validation = { @@ -86,6 +88,13 @@ def __init__( inputs: List["NodeInput"], **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + """ super(ProcessorNodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = name @@ -97,23 +106,23 @@ class CognitiveServicesVisionProcessor(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param endpoint: Required. Endpoint to which this processor should connect. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase - :param image: Describes the parameters of the image that is sent as input to the endpoint. - :type image: ~azure.media.videoanalyzer.edge.models.ImageProperties - :param sampling_options: Describes the sampling options to be applied when forwarding samples - to the extension. - :type sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions - :param operation: Required. Describes the Spatial Analysis operation to be used in the - Cognitive Services Vision processor. - :type operation: ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationBase + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar endpoint: Required. Endpoint to which this processor should connect. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :ivar image: Describes the parameters of the image that is sent as input to the endpoint. + :vartype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :ivar sampling_options: Describes the sampling options to be applied when forwarding samples to + the extension. + :vartype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :ivar operation: Required. Describes the Spatial Analysis operation to be used in the Cognitive + Services Vision processor. + :vartype operation: ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationBase """ _validation = { @@ -145,6 +154,23 @@ def __init__( sampling_options: Optional["SamplingOptions"] = None, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword endpoint: Required. Endpoint to which this processor should connect. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :keyword image: Describes the parameters of the image that is sent as input to the endpoint. + :paramtype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :keyword sampling_options: Describes the sampling options to be applied when forwarding samples + to the extension. + :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :keyword operation: Required. Describes the Spatial Analysis operation to be used in the + Cognitive Services Vision processor. + :paramtype operation: ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationBase + """ super(CognitiveServicesVisionProcessor, self).__init__(name=name, inputs=inputs, **kwargs) self.type = '#Microsoft.VideoAnalyzer.CognitiveServicesVisionProcessor' # type: str self.endpoint = endpoint @@ -157,12 +183,12 @@ class CredentialsBase(msrest.serialization.Model): """Base class for credential objects. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: HttpHeaderCredentials, UsernamePasswordCredentials. + sub-classes are: HttpHeaderCredentials, SymmetricKeyCredentials, UsernamePasswordCredentials. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -174,17 +200,99 @@ class CredentialsBase(msrest.serialization.Model): } _subtype_map = { - 'type': {'#Microsoft.VideoAnalyzer.HttpHeaderCredentials': 'HttpHeaderCredentials', '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} + 'type': {'#Microsoft.VideoAnalyzer.HttpHeaderCredentials': 'HttpHeaderCredentials', '#Microsoft.VideoAnalyzer.SymmetricKeyCredentials': 'SymmetricKeyCredentials', '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} } def __init__( self, **kwargs ): + """ + """ super(CredentialsBase, self).__init__(**kwargs) self.type = None # type: Optional[str] +class DiscoveredOnvifDevice(msrest.serialization.Model): + """The discovered properties of the ONVIF device that are returned during the discovery. + + :ivar service_identifier: The unique identifier of the ONVIF device that was discovered in the + same subnet as the IoT Edge device. + :vartype service_identifier: str + :ivar remote_ip_address: The IP address of the ONVIF device that was discovered in the same + subnet as the IoT Edge device. + :vartype remote_ip_address: str + :ivar scopes: An array of hostnames for the ONVIF discovered devices that are in the same + subnet as the IoT Edge device. + :vartype scopes: list[str] + :ivar endpoints: An array of media profile endpoints that the ONVIF discovered device supports. + :vartype endpoints: list[str] + """ + + _attribute_map = { + 'service_identifier': {'key': 'serviceIdentifier', 'type': 'str'}, + 'remote_ip_address': {'key': 'remoteIPAddress', 'type': 'str'}, + 'scopes': {'key': 'scopes', 'type': '[str]'}, + 'endpoints': {'key': 'endpoints', 'type': '[str]'}, + } + + def __init__( + self, + *, + service_identifier: Optional[str] = None, + remote_ip_address: Optional[str] = None, + scopes: Optional[List[str]] = None, + endpoints: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword service_identifier: The unique identifier of the ONVIF device that was discovered in + the same subnet as the IoT Edge device. + :paramtype service_identifier: str + :keyword remote_ip_address: The IP address of the ONVIF device that was discovered in the same + subnet as the IoT Edge device. + :paramtype remote_ip_address: str + :keyword scopes: An array of hostnames for the ONVIF discovered devices that are in the same + subnet as the IoT Edge device. + :paramtype scopes: list[str] + :keyword endpoints: An array of media profile endpoints that the ONVIF discovered device + supports. + :paramtype endpoints: list[str] + """ + super(DiscoveredOnvifDevice, self).__init__(**kwargs) + self.service_identifier = service_identifier + self.remote_ip_address = remote_ip_address + self.scopes = scopes + self.endpoints = endpoints + + +class DiscoveredOnvifDeviceCollection(msrest.serialization.Model): + """A list of ONVIF devices that were discovered in the same subnet as the IoT Edge device. + + :ivar value: An array of ONVIF devices that have been discovered in the same subnet as the IoT + Edge device. + :vartype value: list[~azure.media.videoanalyzer.edge.models.DiscoveredOnvifDevice] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[DiscoveredOnvifDevice]'}, + } + + def __init__( + self, + *, + value: Optional[List["DiscoveredOnvifDevice"]] = None, + **kwargs + ): + """ + :keyword value: An array of ONVIF devices that have been discovered in the same subnet as the + IoT Edge device. + :paramtype value: list[~azure.media.videoanalyzer.edge.models.DiscoveredOnvifDevice] + """ + super(DiscoveredOnvifDeviceCollection, self).__init__(**kwargs) + self.value = value + + class EndpointBase(msrest.serialization.Model): """Base class for endpoints. @@ -193,12 +301,12 @@ class EndpointBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param credentials: Credentials to be presented to the endpoint. - :type credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase - :param url: Required. The endpoint URL for Video Analyzer to connect to. - :type url: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar credentials: Credentials to be presented to the endpoint. + :vartype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :ivar url: Required. The endpoint URL for Video Analyzer to connect to. + :vartype url: str """ _validation = { @@ -223,6 +331,12 @@ def __init__( credentials: Optional["CredentialsBase"] = None, **kwargs ): + """ + :keyword credentials: Credentials to be presented to the endpoint. + :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :keyword url: Required. The endpoint URL for Video Analyzer to connect to. + :paramtype url: str + """ super(EndpointBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.credentials = credentials @@ -237,21 +351,21 @@ class ExtensionProcessorBase(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param endpoint: Required. Endpoint details of the pipeline extension plugin. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase - :param image: Required. Image transformations and formatting options to be applied to the video + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar endpoint: Required. Endpoint details of the pipeline extension plugin. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :ivar image: Required. Image transformations and formatting options to be applied to the video frame(s) prior submission to the pipeline extension plugin. - :type image: ~azure.media.videoanalyzer.edge.models.ImageProperties - :param sampling_options: Media sampling parameters that define how often media is submitted to + :vartype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :ivar sampling_options: Media sampling parameters that define how often media is submitted to the extension plugin. - :type sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :vartype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions """ _validation = { @@ -285,6 +399,21 @@ def __init__( sampling_options: Optional["SamplingOptions"] = None, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword endpoint: Required. Endpoint details of the pipeline extension plugin. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :keyword image: Required. Image transformations and formatting options to be applied to the + video frame(s) prior submission to the pipeline extension plugin. + :paramtype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :keyword sampling_options: Media sampling parameters that define how often media is submitted + to the extension plugin. + :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + """ super(ExtensionProcessorBase, self).__init__(name=name, inputs=inputs, **kwargs) self.type = '#Microsoft.VideoAnalyzer.ExtensionProcessorBase' # type: str self.endpoint = endpoint @@ -300,13 +429,13 @@ class SinkNodeBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] """ _validation = { @@ -332,6 +461,13 @@ def __init__( inputs: List["NodeInput"], **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + """ super(SinkNodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = name @@ -343,22 +479,22 @@ class FileSink(SinkNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param base_directory_path: Required. Absolute directory path where media files will be stored. - :type base_directory_path: str - :param file_name_pattern: Required. File name pattern for creating new files when performing + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar base_directory_path: Required. Absolute directory path where media files will be stored. + :vartype base_directory_path: str + :ivar file_name_pattern: Required. File name pattern for creating new files when performing event based recording. The pattern must include at least one system variable. - :type file_name_pattern: str - :param maximum_size_mi_b: Required. Maximum amount of disk space that can be used for storing + :vartype file_name_pattern: str + :ivar maximum_size_mi_b: Required. Maximum amount of disk space that can be used for storing files from this sink. Once this limit is reached, the oldest files from this sink will be automatically deleted. - :type maximum_size_mi_b: str + :vartype maximum_size_mi_b: str """ _validation = { @@ -389,6 +525,23 @@ def __init__( maximum_size_mi_b: str, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword base_directory_path: Required. Absolute directory path where media files will be + stored. + :paramtype base_directory_path: str + :keyword file_name_pattern: Required. File name pattern for creating new files when performing + event based recording. The pattern must include at least one system variable. + :paramtype file_name_pattern: str + :keyword maximum_size_mi_b: Required. Maximum amount of disk space that can be used for storing + files from this sink. Once this limit is reached, the oldest files from this sink will be + automatically deleted. + :paramtype maximum_size_mi_b: str + """ super(FileSink, self).__init__(name=name, inputs=inputs, **kwargs) self.type = '#Microsoft.VideoAnalyzer.FileSink' # type: str self.base_directory_path = base_directory_path @@ -401,27 +554,27 @@ class GrpcExtension(ExtensionProcessorBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param endpoint: Required. Endpoint details of the pipeline extension plugin. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase - :param image: Required. Image transformations and formatting options to be applied to the video + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar endpoint: Required. Endpoint details of the pipeline extension plugin. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :ivar image: Required. Image transformations and formatting options to be applied to the video frame(s) prior submission to the pipeline extension plugin. - :type image: ~azure.media.videoanalyzer.edge.models.ImageProperties - :param sampling_options: Media sampling parameters that define how often media is submitted to + :vartype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :ivar sampling_options: Media sampling parameters that define how often media is submitted to the extension plugin. - :type sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions - :param data_transfer: Required. Specifies how media is transferred to the extension plugin. - :type data_transfer: ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransfer - :param extension_configuration: An optional configuration string that is sent to the extension + :vartype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :ivar data_transfer: Required. Specifies how media is transferred to the extension plugin. + :vartype data_transfer: ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransfer + :ivar extension_configuration: An optional configuration string that is sent to the extension plugin. The configuration string is specific to each custom extension and it not understood neither validated by Video Analyzer. Please see https://aka.ms/ava-extension-grpc for details. - :type extension_configuration: str + :vartype extension_configuration: str """ _validation = { @@ -456,6 +609,28 @@ def __init__( extension_configuration: Optional[str] = None, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword endpoint: Required. Endpoint details of the pipeline extension plugin. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :keyword image: Required. Image transformations and formatting options to be applied to the + video frame(s) prior submission to the pipeline extension plugin. + :paramtype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :keyword sampling_options: Media sampling parameters that define how often media is submitted + to the extension plugin. + :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :keyword data_transfer: Required. Specifies how media is transferred to the extension plugin. + :paramtype data_transfer: ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransfer + :keyword extension_configuration: An optional configuration string that is sent to the + extension plugin. The configuration string is specific to each custom extension and it not + understood neither validated by Video Analyzer. Please see https://aka.ms/ava-extension-grpc + for details. + :paramtype extension_configuration: str + """ super(GrpcExtension, self).__init__(name=name, inputs=inputs, endpoint=endpoint, image=image, sampling_options=sampling_options, **kwargs) self.type = '#Microsoft.VideoAnalyzer.GrpcExtension' # type: str self.data_transfer = data_transfer @@ -467,12 +642,12 @@ class GrpcExtensionDataTransfer(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param shared_memory_size_mi_b: The share memory buffer for sample transfers, in mebibytes. It + :ivar shared_memory_size_mi_b: The share memory buffer for sample transfers, in mebibytes. It can only be used with the 'SharedMemory' transfer mode. - :type shared_memory_size_mi_b: str - :param mode: Required. Data transfer mode: embedded or sharedMemory. Possible values include: + :vartype shared_memory_size_mi_b: str + :ivar mode: Required. Data transfer mode: embedded or sharedMemory. Possible values include: "embedded", "sharedMemory". - :type mode: str or ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransferMode + :vartype mode: str or ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransferMode """ _validation = { @@ -491,31 +666,73 @@ def __init__( shared_memory_size_mi_b: Optional[str] = None, **kwargs ): + """ + :keyword shared_memory_size_mi_b: The share memory buffer for sample transfers, in mebibytes. + It can only be used with the 'SharedMemory' transfer mode. + :paramtype shared_memory_size_mi_b: str + :keyword mode: Required. Data transfer mode: embedded or sharedMemory. Possible values include: + "embedded", "sharedMemory". + :paramtype mode: str or ~azure.media.videoanalyzer.edge.models.GrpcExtensionDataTransferMode + """ super(GrpcExtensionDataTransfer, self).__init__(**kwargs) self.shared_memory_size_mi_b = shared_memory_size_mi_b self.mode = mode +class H264Configuration(msrest.serialization.Model): + """Class representing the H264 Configuration. + + :ivar gov_length: Group of Video frames length. + :vartype gov_length: float + :ivar profile: The H264 Profile. Possible values include: "Baseline", "Main", "Extended", + "High". + :vartype profile: str or ~azure.media.videoanalyzer.edge.models.H264Profile + """ + + _attribute_map = { + 'gov_length': {'key': 'govLength', 'type': 'float'}, + 'profile': {'key': 'profile', 'type': 'str'}, + } + + def __init__( + self, + *, + gov_length: Optional[float] = None, + profile: Optional[Union[str, "H264Profile"]] = None, + **kwargs + ): + """ + :keyword gov_length: Group of Video frames length. + :paramtype gov_length: float + :keyword profile: The H264 Profile. Possible values include: "Baseline", "Main", "Extended", + "High". + :paramtype profile: str or ~azure.media.videoanalyzer.edge.models.H264Profile + """ + super(H264Configuration, self).__init__(**kwargs) + self.gov_length = gov_length + self.profile = profile + + class HttpExtension(ExtensionProcessorBase): """HTTP extension processor allows pipeline extension plugins to be connected to the pipeline through over the HTTP protocol. Extension plugins must act as an HTTP server. Please see https://aka.ms/ava-extension-http for details. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param endpoint: Required. Endpoint details of the pipeline extension plugin. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase - :param image: Required. Image transformations and formatting options to be applied to the video + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar endpoint: Required. Endpoint details of the pipeline extension plugin. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :ivar image: Required. Image transformations and formatting options to be applied to the video frame(s) prior submission to the pipeline extension plugin. - :type image: ~azure.media.videoanalyzer.edge.models.ImageProperties - :param sampling_options: Media sampling parameters that define how often media is submitted to + :vartype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :ivar sampling_options: Media sampling parameters that define how often media is submitted to the extension plugin. - :type sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + :vartype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions """ _validation = { @@ -545,6 +762,21 @@ def __init__( sampling_options: Optional["SamplingOptions"] = None, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword endpoint: Required. Endpoint details of the pipeline extension plugin. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :keyword image: Required. Image transformations and formatting options to be applied to the + video frame(s) prior submission to the pipeline extension plugin. + :paramtype image: ~azure.media.videoanalyzer.edge.models.ImageProperties + :keyword sampling_options: Media sampling parameters that define how often media is submitted + to the extension plugin. + :paramtype sampling_options: ~azure.media.videoanalyzer.edge.models.SamplingOptions + """ super(HttpExtension, self).__init__(name=name, inputs=inputs, endpoint=endpoint, image=image, sampling_options=sampling_options, **kwargs) self.type = '#Microsoft.VideoAnalyzer.HttpExtension' # type: str @@ -554,14 +786,14 @@ class HttpHeaderCredentials(CredentialsBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param header_name: Required. HTTP header name. - :type header_name: str - :param header_value: Required. HTTP header value. It is recommended that this value is + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar header_name: Required. HTTP header name. + :vartype header_name: str + :ivar header_value: Required. HTTP header value. It is recommended that this value is parameterized as a secret string in order to prevent this value to be returned as part of the resource on API requests. - :type header_value: str + :vartype header_value: str """ _validation = { @@ -583,6 +815,14 @@ def __init__( header_value: str, **kwargs ): + """ + :keyword header_name: Required. HTTP header name. + :paramtype header_name: str + :keyword header_value: Required. HTTP header value. It is recommended that this value is + parameterized as a secret string in order to prevent this value to be returned as part of the + resource on API requests. + :paramtype header_value: str + """ super(HttpHeaderCredentials, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.HttpHeaderCredentials' # type: str self.header_name = header_name @@ -597,8 +837,8 @@ class ImageFormatProperties(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -617,6 +857,8 @@ def __init__( self, **kwargs ): + """ + """ super(ImageFormatProperties, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -626,8 +868,8 @@ class ImageFormatBmp(ImageFormatProperties): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -642,6 +884,8 @@ def __init__( self, **kwargs ): + """ + """ super(ImageFormatBmp, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ImageFormatBmp' # type: str @@ -651,10 +895,10 @@ class ImageFormatJpeg(ImageFormatProperties): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param quality: Image quality value between 0 to 100 (best quality). - :type quality: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar quality: Image quality value between 0 to 100 (best quality). + :vartype quality: str """ _validation = { @@ -672,6 +916,10 @@ def __init__( quality: Optional[str] = None, **kwargs ): + """ + :keyword quality: Image quality value between 0 to 100 (best quality). + :paramtype quality: str + """ super(ImageFormatJpeg, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ImageFormatJpeg' # type: str self.quality = quality @@ -682,8 +930,8 @@ class ImageFormatPng(ImageFormatProperties): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -698,6 +946,8 @@ def __init__( self, **kwargs ): + """ + """ super(ImageFormatPng, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ImageFormatPng' # type: str @@ -707,12 +957,12 @@ class ImageFormatRaw(ImageFormatProperties): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param pixel_format: Required. Pixel format to be applied to the raw image. Possible values + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar pixel_format: Required. Pixel format to be applied to the raw image. Possible values include: "yuv420p", "rgb565be", "rgb565le", "rgb555be", "rgb555le", "rgb24", "bgr24", "argb", "rgba", "abgr", "bgra". - :type pixel_format: str or ~azure.media.videoanalyzer.edge.models.ImageFormatRawPixelFormat + :vartype pixel_format: str or ~azure.media.videoanalyzer.edge.models.ImageFormatRawPixelFormat """ _validation = { @@ -731,6 +981,13 @@ def __init__( pixel_format: Union[str, "ImageFormatRawPixelFormat"], **kwargs ): + """ + :keyword pixel_format: Required. Pixel format to be applied to the raw image. Possible values + include: "yuv420p", "rgb565be", "rgb565le", "rgb555be", "rgb555le", "rgb24", "bgr24", "argb", + "rgba", "abgr", "bgra". + :paramtype pixel_format: str or + ~azure.media.videoanalyzer.edge.models.ImageFormatRawPixelFormat + """ super(ImageFormatRaw, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.ImageFormatRaw' # type: str self.pixel_format = pixel_format @@ -739,10 +996,10 @@ def __init__( class ImageProperties(msrest.serialization.Model): """Image transformations and formatting options to be applied to the video frame(s). - :param scale: Image scaling mode. - :type scale: ~azure.media.videoanalyzer.edge.models.ImageScale - :param format: Base class for image formatting properties. - :type format: ~azure.media.videoanalyzer.edge.models.ImageFormatProperties + :ivar scale: Image scaling mode. + :vartype scale: ~azure.media.videoanalyzer.edge.models.ImageScale + :ivar format: Base class for image formatting properties. + :vartype format: ~azure.media.videoanalyzer.edge.models.ImageFormatProperties """ _attribute_map = { @@ -757,6 +1014,12 @@ def __init__( format: Optional["ImageFormatProperties"] = None, **kwargs ): + """ + :keyword scale: Image scaling mode. + :paramtype scale: ~azure.media.videoanalyzer.edge.models.ImageScale + :keyword format: Base class for image formatting properties. + :paramtype format: ~azure.media.videoanalyzer.edge.models.ImageFormatProperties + """ super(ImageProperties, self).__init__(**kwargs) self.scale = scale self.format = format @@ -765,13 +1028,13 @@ def __init__( class ImageScale(msrest.serialization.Model): """Image scaling mode. - :param mode: Describes the image scaling mode to be applied. Default mode is 'pad'. Possible + :ivar mode: Describes the image scaling mode to be applied. Default mode is 'pad'. Possible values include: "preserveAspectRatio", "pad", "stretch". - :type mode: str or ~azure.media.videoanalyzer.edge.models.ImageScaleMode - :param width: The desired output image width. - :type width: str - :param height: The desired output image height. - :type height: str + :vartype mode: str or ~azure.media.videoanalyzer.edge.models.ImageScaleMode + :ivar width: The desired output image width. + :vartype width: str + :ivar height: The desired output image height. + :vartype height: str """ _attribute_map = { @@ -788,27 +1051,78 @@ def __init__( height: Optional[str] = None, **kwargs ): + """ + :keyword mode: Describes the image scaling mode to be applied. Default mode is 'pad'. Possible + values include: "preserveAspectRatio", "pad", "stretch". + :paramtype mode: str or ~azure.media.videoanalyzer.edge.models.ImageScaleMode + :keyword width: The desired output image width. + :paramtype width: str + :keyword height: The desired output image height. + :paramtype height: str + """ super(ImageScale, self).__init__(**kwargs) self.mode = mode self.width = width self.height = height +class IotHubDeviceConnection(msrest.serialization.Model): + """Information that enables communication between the IoT Hub and the IoT device - allowing this edge module to act as a transparent gateway between the two. + + All required parameters must be populated in order to send to Azure. + + :ivar device_id: Required. The name of the IoT device configured and managed in IoT Hub. + (case-sensitive). + :vartype device_id: str + :ivar credentials: IoT device connection credentials. Currently IoT device symmetric key + credentials are supported. + :vartype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + """ + + _validation = { + 'device_id': {'required': True}, + } + + _attribute_map = { + 'device_id': {'key': 'deviceId', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + } + + def __init__( + self, + *, + device_id: str, + credentials: Optional["CredentialsBase"] = None, + **kwargs + ): + """ + :keyword device_id: Required. The name of the IoT device configured and managed in IoT Hub. + (case-sensitive). + :paramtype device_id: str + :keyword credentials: IoT device connection credentials. Currently IoT device symmetric key + credentials are supported. + :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + """ + super(IotHubDeviceConnection, self).__init__(**kwargs) + self.device_id = device_id + self.credentials = credentials + + class IotHubMessageSink(SinkNodeBase): """IoT Hub Message sink allows for pipeline messages to published into the IoT Edge Hub. Published messages can then be delivered to the cloud and other modules via routes declared in the IoT Edge deployment manifest. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param hub_output_name: Required. Name of the Iot Edge Hub output to which the messages will be + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar hub_output_name: Required. Name of the Iot Edge Hub output to which the messages will be published. - :type hub_output_name: str + :vartype hub_output_name: str """ _validation = { @@ -833,6 +1147,16 @@ def __init__( hub_output_name: str, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword hub_output_name: Required. Name of the Iot Edge Hub output to which the messages will + be published. + :paramtype hub_output_name: str + """ super(IotHubMessageSink, self).__init__(name=name, inputs=inputs, **kwargs) self.type = '#Microsoft.VideoAnalyzer.IotHubMessageSink' # type: str self.hub_output_name = hub_output_name @@ -846,10 +1170,10 @@ class SourceNodeBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str """ _validation = { @@ -872,6 +1196,10 @@ def __init__( name: str, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + """ super(SourceNodeBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = name @@ -882,12 +1210,12 @@ class IotHubMessageSource(SourceNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param hub_input_name: Name of the IoT Edge Hub input from which messages will be consumed. - :type hub_input_name: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar hub_input_name: Name of the IoT Edge Hub input from which messages will be consumed. + :vartype hub_input_name: str """ _validation = { @@ -908,6 +1236,12 @@ def __init__( hub_input_name: Optional[str] = None, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword hub_input_name: Name of the IoT Edge Hub input from which messages will be consumed. + :paramtype hub_input_name: str + """ super(IotHubMessageSource, self).__init__(name=name, **kwargs) self.type = '#Microsoft.VideoAnalyzer.IotHubMessageSource' # type: str self.hub_input_name = hub_input_name @@ -918,15 +1252,15 @@ class LineCrossingProcessor(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param lines: Required. An array of lines used to compute line crossing events. - :type lines: list[~azure.media.videoanalyzer.edge.models.NamedLineBase] + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar lines: Required. An array of lines used to compute line crossing events. + :vartype lines: list[~azure.media.videoanalyzer.edge.models.NamedLineBase] """ _validation = { @@ -951,6 +1285,15 @@ def __init__( lines: List["NamedLineBase"], **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword lines: Required. An array of lines used to compute line crossing events. + :paramtype lines: list[~azure.media.videoanalyzer.edge.models.NamedLineBase] + """ super(LineCrossingProcessor, self).__init__(name=name, inputs=inputs, **kwargs) self.type = '#Microsoft.VideoAnalyzer.LineCrossingProcessor' # type: str self.lines = lines @@ -961,12 +1304,12 @@ class LivePipeline(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Live pipeline unique identifier. - :type name: str - :param system_data: Read-only system metadata associated with this object. - :type system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :param properties: Live pipeline properties. - :type properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties + :ivar name: Required. Live pipeline unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Live pipeline properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties """ _validation = { @@ -987,6 +1330,14 @@ def __init__( properties: Optional["LivePipelineProperties"] = None, **kwargs ): + """ + :keyword name: Required. Live pipeline unique identifier. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Live pipeline properties. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties + """ super(LivePipeline, self).__init__(**kwargs) self.name = name self.system_data = system_data @@ -997,7 +1348,7 @@ class MethodRequest(msrest.serialization.Model): """Base class for direct method calls. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LivePipelineSetRequestBody, MethodRequestEmptyBodyBase, PipelineTopologySetRequestBody, LivePipelineListRequest, LivePipelineSetRequest, PipelineTopologyListRequest, PipelineTopologySetRequest. + sub-classes are: LivePipelineSetRequestBody, MethodRequestEmptyBodyBase, PipelineTopologySetRequestBody, RemoteDeviceAdapterSetRequestBody, LivePipelineListRequest, LivePipelineSetRequest, OnvifDeviceDiscoverRequest, OnvifDeviceGetRequest, PipelineTopologyListRequest, PipelineTopologySetRequest, RemoteDeviceAdapterListRequest, RemoteDeviceAdapterSetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1005,13 +1356,13 @@ class MethodRequest(msrest.serialization.Model): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, } _attribute_map = { @@ -1020,24 +1371,30 @@ class MethodRequest(msrest.serialization.Model): } _subtype_map = { - 'method_name': {'LivePipelineSetRequestBody': 'LivePipelineSetRequestBody', 'MethodRequestEmptyBodyBase': 'MethodRequestEmptyBodyBase', 'PipelineTopologySetRequestBody': 'PipelineTopologySetRequestBody', 'livePipelineList': 'LivePipelineListRequest', 'livePipelineSet': 'LivePipelineSetRequest', 'pipelineTopologyList': 'PipelineTopologyListRequest', 'pipelineTopologySet': 'PipelineTopologySetRequest'} + 'method_name': {'LivePipelineSetRequestBody': 'LivePipelineSetRequestBody', 'MethodRequestEmptyBodyBase': 'MethodRequestEmptyBodyBase', 'PipelineTopologySetRequestBody': 'PipelineTopologySetRequestBody', 'RemoteDeviceAdapterSetRequestBody': 'RemoteDeviceAdapterSetRequestBody', 'livePipelineList': 'LivePipelineListRequest', 'livePipelineSet': 'LivePipelineSetRequest', 'onvifDeviceDiscover': 'OnvifDeviceDiscoverRequest', 'onvifDeviceGet': 'OnvifDeviceGetRequest', 'pipelineTopologyList': 'PipelineTopologyListRequest', 'pipelineTopologySet': 'PipelineTopologySetRequest', 'remoteDeviceAdapterList': 'RemoteDeviceAdapterListRequest', 'remoteDeviceAdapterSet': 'RemoteDeviceAdapterSetRequest'} } - api_version = "1.0" - def __init__( self, + *, + api_version: Optional[str] = "1.1", **kwargs ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + """ super(MethodRequest, self).__init__(**kwargs) self.method_name = None # type: Optional[str] + self.api_version = api_version class MethodRequestEmptyBodyBase(MethodRequest): """MethodRequestEmptyBodyBase. You probably want to use the sub-classes and not this class directly. Known - sub-classes are: LivePipelineActivateRequest, LivePipelineDeactivateRequest, LivePipelineDeleteRequest, LivePipelineGetRequest, PipelineTopologyDeleteRequest, PipelineTopologyGetRequest. + sub-classes are: LivePipelineActivateRequest, LivePipelineDeactivateRequest, LivePipelineDeleteRequest, LivePipelineGetRequest, PipelineTopologyDeleteRequest, PipelineTopologyGetRequest, RemoteDeviceAdapterDeleteRequest, RemoteDeviceAdapterGetRequest. Variables are only populated by the server, and will be ignored when sending a request. @@ -1045,15 +1402,15 @@ class MethodRequestEmptyBodyBase(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1064,18 +1421,24 @@ class MethodRequestEmptyBodyBase(MethodRequest): } _subtype_map = { - 'method_name': {'livePipelineActivate': 'LivePipelineActivateRequest', 'livePipelineDeactivate': 'LivePipelineDeactivateRequest', 'livePipelineDelete': 'LivePipelineDeleteRequest', 'livePipelineGet': 'LivePipelineGetRequest', 'pipelineTopologyDelete': 'PipelineTopologyDeleteRequest', 'pipelineTopologyGet': 'PipelineTopologyGetRequest'} + 'method_name': {'livePipelineActivate': 'LivePipelineActivateRequest', 'livePipelineDeactivate': 'LivePipelineDeactivateRequest', 'livePipelineDelete': 'LivePipelineDeleteRequest', 'livePipelineGet': 'LivePipelineGetRequest', 'pipelineTopologyDelete': 'PipelineTopologyDeleteRequest', 'pipelineTopologyGet': 'PipelineTopologyGetRequest', 'remoteDeviceAdapterDelete': 'RemoteDeviceAdapterDeleteRequest', 'remoteDeviceAdapterGet': 'RemoteDeviceAdapterGetRequest'} } - api_version = "1.0" - def __init__( self, *, name: str, + api_version: Optional[str] = "1.1", **kwargs ): - super(MethodRequestEmptyBodyBase, self).__init__(**kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(MethodRequestEmptyBodyBase, self).__init__(api_version=api_version, **kwargs) self.method_name = 'MethodRequestEmptyBodyBase' # type: str self.name = name @@ -1089,15 +1452,15 @@ class LivePipelineActivateRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1107,27 +1470,33 @@ class LivePipelineActivateRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, *, name: str, + api_version: Optional[str] = "1.1", **kwargs ): - super(LivePipelineActivateRequest, self).__init__(name=name, **kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(LivePipelineActivateRequest, self).__init__(api_version=api_version, name=name, **kwargs) self.method_name = 'livePipelineActivate' # type: str class LivePipelineCollection(msrest.serialization.Model): """A collection of live pipelines. - :param value: List of live pipelines. - :type value: list[~azure.media.videoanalyzer.edge.models.LivePipeline] - :param continuation_token: A continuation token to be used in subsequent calls when enumerating + :ivar value: List of live pipelines. + :vartype value: list[~azure.media.videoanalyzer.edge.models.LivePipeline] + :ivar continuation_token: A continuation token to be used in subsequent calls when enumerating through the collection. This is returned when the collection results won't fit in a single response. - :type continuation_token: str + :vartype continuation_token: str """ _attribute_map = { @@ -1142,6 +1511,14 @@ def __init__( continuation_token: Optional[str] = None, **kwargs ): + """ + :keyword value: List of live pipelines. + :paramtype value: list[~azure.media.videoanalyzer.edge.models.LivePipeline] + :keyword continuation_token: A continuation token to be used in subsequent calls when + enumerating through the collection. This is returned when the collection results won't fit in a + single response. + :paramtype continuation_token: str + """ super(LivePipelineCollection, self).__init__(**kwargs) self.value = value self.continuation_token = continuation_token @@ -1156,15 +1533,15 @@ class LivePipelineDeactivateRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1174,15 +1551,21 @@ class LivePipelineDeactivateRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, *, name: str, + api_version: Optional[str] = "1.1", **kwargs ): - super(LivePipelineDeactivateRequest, self).__init__(name=name, **kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(LivePipelineDeactivateRequest, self).__init__(api_version=api_version, name=name, **kwargs) self.method_name = 'livePipelineDeactivate' # type: str @@ -1195,15 +1578,15 @@ class LivePipelineDeleteRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1213,15 +1596,21 @@ class LivePipelineDeleteRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, *, name: str, + api_version: Optional[str] = "1.1", **kwargs ): - super(LivePipelineDeleteRequest, self).__init__(name=name, **kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(LivePipelineDeleteRequest, self).__init__(api_version=api_version, name=name, **kwargs) self.method_name = 'livePipelineDelete' # type: str @@ -1234,15 +1623,15 @@ class LivePipelineGetRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1252,15 +1641,21 @@ class LivePipelineGetRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, *, name: str, + api_version: Optional[str] = "1.1", **kwargs ): - super(LivePipelineGetRequest, self).__init__(name=name, **kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(LivePipelineGetRequest, self).__init__(api_version=api_version, name=name, **kwargs) self.method_name = 'livePipelineGet' # type: str @@ -1273,13 +1668,13 @@ class LivePipelineListRequest(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, } _attribute_map = { @@ -1287,33 +1682,38 @@ class LivePipelineListRequest(MethodRequest): 'api_version': {'key': '@apiVersion', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, + *, + api_version: Optional[str] = "1.1", **kwargs ): - super(LivePipelineListRequest, self).__init__(**kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + """ + super(LivePipelineListRequest, self).__init__(api_version=api_version, **kwargs) self.method_name = 'livePipelineList' # type: str class LivePipelineProperties(msrest.serialization.Model): """Live pipeline properties. - :param description: An optional description of the live pipeline. - :type description: str - :param topology_name: The reference to an existing pipeline topology defined for real-time + :ivar description: An optional description of the live pipeline. + :vartype description: str + :ivar topology_name: The reference to an existing pipeline topology defined for real-time content processing. When activated, this live pipeline will process content according to the pipeline topology definition. - :type topology_name: str - :param parameters: List of the instance level parameter values for the user-defined topology + :vartype topology_name: str + :ivar parameters: List of the instance level parameter values for the user-defined topology parameters. A pipeline can only define or override parameters values for parameters which have been declared in the referenced topology. Topology parameters without a default value must be defined. Topology parameters with a default value can be optionally be overridden. - :type parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDefinition] - :param state: Current pipeline state (read-only). Possible values include: "inactive", + :vartype parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDefinition] + :ivar state: Current pipeline state (read-only). Possible values include: "inactive", "activating", "active", "deactivating". - :type state: str or ~azure.media.videoanalyzer.edge.models.LivePipelineState + :vartype state: str or ~azure.media.videoanalyzer.edge.models.LivePipelineState """ _attribute_map = { @@ -1332,6 +1732,22 @@ def __init__( state: Optional[Union[str, "LivePipelineState"]] = None, **kwargs ): + """ + :keyword description: An optional description of the live pipeline. + :paramtype description: str + :keyword topology_name: The reference to an existing pipeline topology defined for real-time + content processing. When activated, this live pipeline will process content according to the + pipeline topology definition. + :paramtype topology_name: str + :keyword parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :paramtype parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDefinition] + :keyword state: Current pipeline state (read-only). Possible values include: "inactive", + "activating", "active", "deactivating". + :paramtype state: str or ~azure.media.videoanalyzer.edge.models.LivePipelineState + """ super(LivePipelineProperties, self).__init__(**kwargs) self.description = description self.topology_name = topology_name @@ -1348,16 +1764,16 @@ class LivePipelineSetRequest(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param live_pipeline: Required. Live Pipeline represents an unique instance of a pipeline + :ivar live_pipeline: Required. Live Pipeline represents an unique instance of a pipeline topology which is used for real-time content ingestion and analysis. - :type live_pipeline: ~azure.media.videoanalyzer.edge.models.LivePipeline + :vartype live_pipeline: ~azure.media.videoanalyzer.edge.models.LivePipeline """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'live_pipeline': {'required': True}, } @@ -1367,21 +1783,28 @@ class LivePipelineSetRequest(MethodRequest): 'live_pipeline': {'key': 'livePipeline', 'type': 'LivePipeline'}, } - api_version = "1.0" - def __init__( self, *, live_pipeline: "LivePipeline", + api_version: Optional[str] = "1.1", **kwargs ): - super(LivePipelineSetRequest, self).__init__(**kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword live_pipeline: Required. Live Pipeline represents an unique instance of a pipeline + topology which is used for real-time content ingestion and analysis. + :paramtype live_pipeline: ~azure.media.videoanalyzer.edge.models.LivePipeline + """ + super(LivePipelineSetRequest, self).__init__(api_version=api_version, **kwargs) self.method_name = 'livePipelineSet' # type: str self.live_pipeline = live_pipeline class LivePipelineSetRequestBody(LivePipeline, MethodRequest): - """Live pipeline resource representation. + """Live Pipeline represents an unique instance of a pipeline topology which is used for real-time content ingestion and analysis. Variables are only populated by the server, and will be ignored when sending a request. @@ -1389,19 +1812,19 @@ class LivePipelineSetRequestBody(LivePipeline, MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Live pipeline unique identifier. - :type name: str - :param system_data: Read-only system metadata associated with this object. - :type system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :param properties: Live pipeline properties. - :type properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties + :ivar name: Required. Live pipeline unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Live pipeline properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1413,46 +1836,124 @@ class LivePipelineSetRequestBody(LivePipeline, MethodRequest): 'properties': {'key': 'properties', 'type': 'LivePipelineProperties'}, } - api_version = "1.0" - def __init__( self, *, name: str, + api_version: Optional[str] = "1.1", system_data: Optional["SystemData"] = None, properties: Optional["LivePipelineProperties"] = None, **kwargs ): - super(LivePipelineSetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, **kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Live pipeline unique identifier. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Live pipeline properties. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.LivePipelineProperties + """ + super(LivePipelineSetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, api_version=api_version, **kwargs) self.method_name = 'LivePipelineSetRequestBody' # type: str + self.api_version = api_version self.method_name = 'LivePipelineSetRequestBody' # type: str self.name = name self.system_data = system_data self.properties = properties +class MediaProfile(msrest.serialization.Model): + """Class representing the ONVIF MediaProfiles. + + :ivar name: The name of the Media Profile. + :vartype name: str + :ivar media_uri: Object representing the URI that will be used to request for media streaming. + :vartype media_uri: any + :ivar video_encoder_configuration: The Video encoder configuration. + :vartype video_encoder_configuration: + ~azure.media.videoanalyzer.edge.models.VideoEncoderConfiguration + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'media_uri': {'key': 'mediaUri', 'type': 'object'}, + 'video_encoder_configuration': {'key': 'videoEncoderConfiguration', 'type': 'VideoEncoderConfiguration'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + media_uri: Optional[Any] = None, + video_encoder_configuration: Optional["VideoEncoderConfiguration"] = None, + **kwargs + ): + """ + :keyword name: The name of the Media Profile. + :paramtype name: str + :keyword media_uri: Object representing the URI that will be used to request for media + streaming. + :paramtype media_uri: any + :keyword video_encoder_configuration: The Video encoder configuration. + :paramtype video_encoder_configuration: + ~azure.media.videoanalyzer.edge.models.VideoEncoderConfiguration + """ + super(MediaProfile, self).__init__(**kwargs) + self.name = name + self.media_uri = media_uri + self.video_encoder_configuration = video_encoder_configuration + + +class MediaUri(msrest.serialization.Model): + """Object representing the URI that will be used to request for media streaming. + + :ivar uri: URI that can be used for media streaming. + :vartype uri: str + """ + + _attribute_map = { + 'uri': {'key': 'uri', 'type': 'str'}, + } + + def __init__( + self, + *, + uri: Optional[str] = None, + **kwargs + ): + """ + :keyword uri: URI that can be used for media streaming. + :paramtype uri: str + """ + super(MediaUri, self).__init__(**kwargs) + self.uri = uri + + class MotionDetectionProcessor(ProcessorNodeBase): """Motion detection processor allows for motion detection on the video stream. It generates motion events whenever motion is present on the video. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param sensitivity: Motion detection sensitivity: low, medium, high. Possible values include: + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar sensitivity: Motion detection sensitivity: low, medium, high. Possible values include: "low", "medium", "high". - :type sensitivity: str or ~azure.media.videoanalyzer.edge.models.MotionDetectionSensitivity - :param output_motion_region: Indicates whether the processor should detect and output the + :vartype sensitivity: str or ~azure.media.videoanalyzer.edge.models.MotionDetectionSensitivity + :ivar output_motion_region: Indicates whether the processor should detect and output the regions within the video frame where motion was detected. Default is true. - :type output_motion_region: bool - :param event_aggregation_window: Time window duration on which events are aggregated before + :vartype output_motion_region: bool + :ivar event_aggregation_window: Time window duration on which events are aggregated before being emitted. Value must be specified in ISO8601 duration format (i.e. "PT2S" equals 2 seconds). Use 0 seconds for no aggregation. Default is 1 second. - :type event_aggregation_window: str + :vartype event_aggregation_window: str """ _validation = { @@ -1480,6 +1981,24 @@ def __init__( event_aggregation_window: Optional[str] = None, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword sensitivity: Motion detection sensitivity: low, medium, high. Possible values include: + "low", "medium", "high". + :paramtype sensitivity: str or + ~azure.media.videoanalyzer.edge.models.MotionDetectionSensitivity + :keyword output_motion_region: Indicates whether the processor should detect and output the + regions within the video frame where motion was detected. Default is true. + :paramtype output_motion_region: bool + :keyword event_aggregation_window: Time window duration on which events are aggregated before + being emitted. Value must be specified in ISO8601 duration format (i.e. "PT2S" equals 2 + seconds). Use 0 seconds for no aggregation. Default is 1 second. + :paramtype event_aggregation_window: str + """ super(MotionDetectionProcessor, self).__init__(name=name, inputs=inputs, **kwargs) self.type = '#Microsoft.VideoAnalyzer.MotionDetectionProcessor' # type: str self.sensitivity = sensitivity @@ -1487,6 +2006,38 @@ def __init__( self.event_aggregation_window = event_aggregation_window +class MPEG4Configuration(msrest.serialization.Model): + """Class representing the MPEG4 Configuration. + + :ivar gov_length: Group of Video frames length. + :vartype gov_length: float + :ivar profile: The MPEG4 Profile. Possible values include: "SP", "ASP". + :vartype profile: str or ~azure.media.videoanalyzer.edge.models.MPEG4Profile + """ + + _attribute_map = { + 'gov_length': {'key': 'govLength', 'type': 'float'}, + 'profile': {'key': 'profile', 'type': 'str'}, + } + + def __init__( + self, + *, + gov_length: Optional[float] = None, + profile: Optional[Union[str, "MPEG4Profile"]] = None, + **kwargs + ): + """ + :keyword gov_length: Group of Video frames length. + :paramtype gov_length: float + :keyword profile: The MPEG4 Profile. Possible values include: "SP", "ASP". + :paramtype profile: str or ~azure.media.videoanalyzer.edge.models.MPEG4Profile + """ + super(MPEG4Configuration, self).__init__(**kwargs) + self.gov_length = gov_length + self.profile = profile + + class NamedLineBase(msrest.serialization.Model): """Base class for named lines. @@ -1495,10 +2046,10 @@ class NamedLineBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Line name. Must be unique within the node. - :type name: str + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Line name. Must be unique within the node. + :vartype name: str """ _validation = { @@ -1521,6 +2072,10 @@ def __init__( name: str, **kwargs ): + """ + :keyword name: Required. Line name. Must be unique within the node. + :paramtype name: str + """ super(NamedLineBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = name @@ -1531,15 +2086,15 @@ class NamedLineString(NamedLineBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Line name. Must be unique within the node. - :type name: str - :param line: Required. Point coordinates for the line start and end, respectively. Example: + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Line name. Must be unique within the node. + :vartype name: str + :ivar line: Required. Point coordinates for the line start and end, respectively. Example: '[[0.3, 0.2],[0.9, 0.8]]'. Each point is expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to 1.0, where [0,0] is the upper-left frame corner and [1, 1] is the bottom-right frame corner. - :type line: str + :vartype line: str """ _validation = { @@ -1561,6 +2116,15 @@ def __init__( line: str, **kwargs ): + """ + :keyword name: Required. Line name. Must be unique within the node. + :paramtype name: str + :keyword line: Required. Point coordinates for the line start and end, respectively. Example: + '[[0.3, 0.2],[0.9, 0.8]]'. Each point is expressed as [LEFT, TOP] coordinate ratios ranging + from 0.0 to 1.0, where [0,0] is the upper-left frame corner and [1, 1] is the bottom-right + frame corner. + :paramtype line: str + """ super(NamedLineString, self).__init__(name=name, **kwargs) self.type = '#Microsoft.VideoAnalyzer.NamedLineString' # type: str self.line = line @@ -1574,10 +2138,10 @@ class NamedPolygonBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Polygon name. Must be unique within the node. - :type name: str + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Polygon name. Must be unique within the node. + :vartype name: str """ _validation = { @@ -1600,6 +2164,10 @@ def __init__( name: str, **kwargs ): + """ + :keyword name: Required. Polygon name. Must be unique within the node. + :paramtype name: str + """ super(NamedPolygonBase, self).__init__(**kwargs) self.type = None # type: Optional[str] self.name = name @@ -1610,14 +2178,14 @@ class NamedPolygonString(NamedPolygonBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Polygon name. Must be unique within the node. - :type name: str - :param polygon: Required. Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9, + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Polygon name. Must be unique within the node. + :vartype name: str + :ivar polygon: Required. Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9, 0.8],[0.7, 0.6]]'. Each point is expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to 1.0, where [0,0] is the upper-left frame corner and [1, 1] is the bottom-right frame corner. - :type polygon: str + :vartype polygon: str """ _validation = { @@ -1639,6 +2207,14 @@ def __init__( polygon: str, **kwargs ): + """ + :keyword name: Required. Polygon name. Must be unique within the node. + :paramtype name: str + :keyword polygon: Required. Point coordinates for the polygon. Example: '[[0.3, 0.2],[0.9, + 0.8],[0.7, 0.6]]'. Each point is expressed as [LEFT, TOP] coordinate ratios ranging from 0.0 to + 1.0, where [0,0] is the upper-left frame corner and [1, 1] is the bottom-right frame corner. + :paramtype polygon: str + """ super(NamedPolygonString, self).__init__(name=name, **kwargs) self.type = '#Microsoft.VideoAnalyzer.NamedPolygonString' # type: str self.polygon = polygon @@ -1649,12 +2225,12 @@ class NodeInput(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param node_name: Required. The name of the upstream node in the pipeline which output is used + :ivar node_name: Required. The name of the upstream node in the pipeline which output is used as input of the current node. - :type node_name: str - :param output_selectors: Allows for the selection of specific data streams (eg. video only) - from another node. - :type output_selectors: list[~azure.media.videoanalyzer.edge.models.OutputSelector] + :vartype node_name: str + :ivar output_selectors: Allows for the selection of specific data streams (eg. video only) from + another node. + :vartype output_selectors: list[~azure.media.videoanalyzer.edge.models.OutputSelector] """ _validation = { @@ -1673,6 +2249,14 @@ def __init__( output_selectors: Optional[List["OutputSelector"]] = None, **kwargs ): + """ + :keyword node_name: Required. The name of the upstream node in the pipeline which output is + used as input of the current node. + :paramtype node_name: str + :keyword output_selectors: Allows for the selection of specific data streams (eg. video only) + from another node. + :paramtype output_selectors: list[~azure.media.videoanalyzer.edge.models.OutputSelector] + """ super(NodeInput, self).__init__(**kwargs) self.node_name = node_name self.output_selectors = output_selectors @@ -1683,16 +2267,16 @@ class ObjectTrackingProcessor(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param accuracy: Object tracker accuracy: low, medium, high. Higher accuracy leads to higher - CPU consumption in average. Possible values include: "low", "medium", "high". - :type accuracy: str or ~azure.media.videoanalyzer.edge.models.ObjectTrackingAccuracy + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar accuracy: Object tracker accuracy: low, medium, high. Higher accuracy leads to higher CPU + consumption in average. Possible values include: "low", "medium", "high". + :vartype accuracy: str or ~azure.media.videoanalyzer.edge.models.ObjectTrackingAccuracy """ _validation = { @@ -1716,21 +2300,282 @@ def __init__( accuracy: Optional[Union[str, "ObjectTrackingAccuracy"]] = None, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword accuracy: Object tracker accuracy: low, medium, high. Higher accuracy leads to higher + CPU consumption in average. Possible values include: "low", "medium", "high". + :paramtype accuracy: str or ~azure.media.videoanalyzer.edge.models.ObjectTrackingAccuracy + """ super(ObjectTrackingProcessor, self).__init__(name=name, inputs=inputs, **kwargs) self.type = '#Microsoft.VideoAnalyzer.ObjectTrackingProcessor' # type: str self.accuracy = accuracy +class OnvifDevice(msrest.serialization.Model): + """The ONVIF device properties. + + :ivar hostname: The hostname of the ONVIF device. + :vartype hostname: ~azure.media.videoanalyzer.edge.models.OnvifHostName + :ivar system_date_time: The system date and time of the ONVIF device. + :vartype system_date_time: ~azure.media.videoanalyzer.edge.models.OnvifSystemDateTime + :ivar dns: The ONVIF device DNS properties. + :vartype dns: ~azure.media.videoanalyzer.edge.models.OnvifDns + :ivar media_profiles: An array of of ONVIF media profiles supported by the ONVIF device. + :vartype media_profiles: list[~azure.media.videoanalyzer.edge.models.MediaProfile] + """ + + _attribute_map = { + 'hostname': {'key': 'hostname', 'type': 'OnvifHostName'}, + 'system_date_time': {'key': 'systemDateTime', 'type': 'OnvifSystemDateTime'}, + 'dns': {'key': 'dns', 'type': 'OnvifDns'}, + 'media_profiles': {'key': 'mediaProfiles', 'type': '[MediaProfile]'}, + } + + def __init__( + self, + *, + hostname: Optional["OnvifHostName"] = None, + system_date_time: Optional["OnvifSystemDateTime"] = None, + dns: Optional["OnvifDns"] = None, + media_profiles: Optional[List["MediaProfile"]] = None, + **kwargs + ): + """ + :keyword hostname: The hostname of the ONVIF device. + :paramtype hostname: ~azure.media.videoanalyzer.edge.models.OnvifHostName + :keyword system_date_time: The system date and time of the ONVIF device. + :paramtype system_date_time: ~azure.media.videoanalyzer.edge.models.OnvifSystemDateTime + :keyword dns: The ONVIF device DNS properties. + :paramtype dns: ~azure.media.videoanalyzer.edge.models.OnvifDns + :keyword media_profiles: An array of of ONVIF media profiles supported by the ONVIF device. + :paramtype media_profiles: list[~azure.media.videoanalyzer.edge.models.MediaProfile] + """ + super(OnvifDevice, self).__init__(**kwargs) + self.hostname = hostname + self.system_date_time = system_date_time + self.dns = dns + self.media_profiles = media_profiles + + +class OnvifDeviceDiscoverRequest(MethodRequest): + """Lists all the discoverable ONVIF devices on the same subnet as the Edge Module. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar discovery_duration: The amount of time that the ONVIF device discovery will wait for + supported device responses. + :vartype discovery_duration: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'discovery_duration': {'key': 'discoveryDuration', 'type': 'str'}, + } + + def __init__( + self, + *, + api_version: Optional[str] = "1.1", + discovery_duration: Optional[str] = None, + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword discovery_duration: The amount of time that the ONVIF device discovery will wait for + supported device responses. + :paramtype discovery_duration: str + """ + super(OnvifDeviceDiscoverRequest, self).__init__(api_version=api_version, **kwargs) + self.method_name = 'onvifDeviceDiscover' # type: str + self.discovery_duration = discovery_duration + + +class OnvifDeviceGetRequest(MethodRequest): + """Retrieves properties and media profiles of an ONVIF device. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar endpoint: Required. Base class for endpoints. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'endpoint': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + } + + def __init__( + self, + *, + endpoint: "EndpointBase", + api_version: Optional[str] = "1.1", + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword endpoint: Required. Base class for endpoints. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + """ + super(OnvifDeviceGetRequest, self).__init__(api_version=api_version, **kwargs) + self.method_name = 'onvifDeviceGet' # type: str + self.endpoint = endpoint + + +class OnvifDns(msrest.serialization.Model): + """The ONVIF device DNS properties. + + :ivar from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. + :vartype from_dhcp: bool + :ivar ipv4_address: An array of IPv4 address for the discovered ONVIF device. + :vartype ipv4_address: list[str] + :ivar ipv6_address: An array of IPv6 address for the discovered ONVIF device. + :vartype ipv6_address: list[str] + """ + + _attribute_map = { + 'from_dhcp': {'key': 'fromDhcp', 'type': 'bool'}, + 'ipv4_address': {'key': 'ipv4Address', 'type': '[str]'}, + 'ipv6_address': {'key': 'ipv6Address', 'type': '[str]'}, + } + + def __init__( + self, + *, + from_dhcp: Optional[bool] = None, + ipv4_address: Optional[List[str]] = None, + ipv6_address: Optional[List[str]] = None, + **kwargs + ): + """ + :keyword from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. + :paramtype from_dhcp: bool + :keyword ipv4_address: An array of IPv4 address for the discovered ONVIF device. + :paramtype ipv4_address: list[str] + :keyword ipv6_address: An array of IPv6 address for the discovered ONVIF device. + :paramtype ipv6_address: list[str] + """ + super(OnvifDns, self).__init__(**kwargs) + self.from_dhcp = from_dhcp + self.ipv4_address = ipv4_address + self.ipv6_address = ipv6_address + + +class OnvifHostName(msrest.serialization.Model): + """The ONVIF device DNS properties. + + :ivar from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. + :vartype from_dhcp: bool + :ivar hostname: The hostname of the ONVIF device. + :vartype hostname: str + """ + + _attribute_map = { + 'from_dhcp': {'key': 'fromDhcp', 'type': 'bool'}, + 'hostname': {'key': 'hostname', 'type': 'str'}, + } + + def __init__( + self, + *, + from_dhcp: Optional[bool] = None, + hostname: Optional[str] = None, + **kwargs + ): + """ + :keyword from_dhcp: Result value showing if the ONVIF device is configured to use DHCP. + :paramtype from_dhcp: bool + :keyword hostname: The hostname of the ONVIF device. + :paramtype hostname: str + """ + super(OnvifHostName, self).__init__(**kwargs) + self.from_dhcp = from_dhcp + self.hostname = hostname + + +class OnvifSystemDateTime(msrest.serialization.Model): + """The ONVIF device DNS properties. + + :ivar type: An enum value determining whether the date time was configured using NTP or manual. + Possible values include: "Ntp", "Manual". + :vartype type: str or ~azure.media.videoanalyzer.edge.models.OnvifSystemDateTimeType + :ivar time: The device datetime returned when calling the request. + :vartype time: str + :ivar time_zone: The timezone of the ONVIF device datetime. + :vartype time_zone: str + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'time': {'key': 'time', 'type': 'str'}, + 'time_zone': {'key': 'timeZone', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Optional[Union[str, "OnvifSystemDateTimeType"]] = None, + time: Optional[str] = None, + time_zone: Optional[str] = None, + **kwargs + ): + """ + :keyword type: An enum value determining whether the date time was configured using NTP or + manual. Possible values include: "Ntp", "Manual". + :paramtype type: str or ~azure.media.videoanalyzer.edge.models.OnvifSystemDateTimeType + :keyword time: The device datetime returned when calling the request. + :paramtype time: str + :keyword time_zone: The timezone of the ONVIF device datetime. + :paramtype time_zone: str + """ + super(OnvifSystemDateTime, self).__init__(**kwargs) + self.type = type + self.time = time + self.time_zone = time_zone + + class OutputSelector(msrest.serialization.Model): """Allows for the selection of particular streams from another node. - :param property: The property of the data stream to be used as the selection criteria. Possible + :ivar property: The property of the data stream to be used as the selection criteria. Possible values include: "mediaType". - :type property: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorProperty - :param operator: The operator to compare properties by. Possible values include: "is", "isNot". - :type operator: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorOperator - :param value: Value to compare against. - :type value: str + :vartype property: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorProperty + :ivar operator: The operator to compare properties by. Possible values include: "is", "isNot". + :vartype operator: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorOperator + :ivar value: Value to compare against. + :vartype value: str """ _attribute_map = { @@ -1747,6 +2592,16 @@ def __init__( value: Optional[str] = None, **kwargs ): + """ + :keyword property: The property of the data stream to be used as the selection criteria. + Possible values include: "mediaType". + :paramtype property: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorProperty + :keyword operator: The operator to compare properties by. Possible values include: "is", + "isNot". + :paramtype operator: str or ~azure.media.videoanalyzer.edge.models.OutputSelectorOperator + :keyword value: Value to compare against. + :paramtype value: str + """ super(OutputSelector, self).__init__(**kwargs) self.property = property self.operator = operator @@ -1758,16 +2613,16 @@ class ParameterDeclaration(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Name of the parameter. - :type name: str - :param type: Required. Type of the parameter. Possible values include: "string", - "secretString", "int", "double", "bool". - :type type: str or ~azure.media.videoanalyzer.edge.models.ParameterType - :param description: Description of the parameter. - :type description: str - :param default: The default value for the parameter to be used if the live pipeline does not + :ivar name: Required. Name of the parameter. + :vartype name: str + :ivar type: Required. Type of the parameter. Possible values include: "string", "secretString", + "int", "double", "bool". + :vartype type: str or ~azure.media.videoanalyzer.edge.models.ParameterType + :ivar description: Description of the parameter. + :vartype description: str + :ivar default: The default value for the parameter to be used if the live pipeline does not specify a value. - :type default: str + :vartype default: str """ _validation = { @@ -1791,6 +2646,18 @@ def __init__( default: Optional[str] = None, **kwargs ): + """ + :keyword name: Required. Name of the parameter. + :paramtype name: str + :keyword type: Required. Type of the parameter. Possible values include: "string", + "secretString", "int", "double", "bool". + :paramtype type: str or ~azure.media.videoanalyzer.edge.models.ParameterType + :keyword description: Description of the parameter. + :paramtype description: str + :keyword default: The default value for the parameter to be used if the live pipeline does not + specify a value. + :paramtype default: str + """ super(ParameterDeclaration, self).__init__(**kwargs) self.name = name self.type = type @@ -1803,10 +2670,10 @@ class ParameterDefinition(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Name of the parameter declared in the pipeline topology. - :type name: str - :param value: Parameter value to be applied on this specific live pipeline. - :type value: str + :ivar name: Required. Name of the parameter declared in the pipeline topology. + :vartype name: str + :ivar value: Parameter value to be applied on this specific live pipeline. + :vartype value: str """ _validation = { @@ -1825,6 +2692,12 @@ def __init__( value: Optional[str] = None, **kwargs ): + """ + :keyword name: Required. Name of the parameter declared in the pipeline topology. + :paramtype name: str + :keyword value: Parameter value to be applied on this specific live pipeline. + :paramtype value: str + """ super(ParameterDefinition, self).__init__(**kwargs) self.name = name self.value = value @@ -1835,10 +2708,10 @@ class PemCertificateList(CertificateSource): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param certificates: Required. PEM formatted public certificates. One certificate per entry. - :type certificates: list[str] + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar certificates: Required. PEM formatted public certificates. One certificate per entry. + :vartype certificates: list[str] """ _validation = { @@ -1857,6 +2730,10 @@ def __init__( certificates: List[str], **kwargs ): + """ + :keyword certificates: Required. PEM formatted public certificates. One certificate per entry. + :paramtype certificates: list[str] + """ super(PemCertificateList, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.PemCertificateList' # type: str self.certificates = certificates @@ -1873,12 +2750,12 @@ class PipelineTopology(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param name: Required. Pipeline topology unique identifier. - :type name: str - :param system_data: Read-only system metadata associated with this object. - :type system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :param properties: Pipeline topology properties. - :type properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + :ivar name: Required. Pipeline topology unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Pipeline topology properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ _validation = { @@ -1899,6 +2776,14 @@ def __init__( properties: Optional["PipelineTopologyProperties"] = None, **kwargs ): + """ + :keyword name: Required. Pipeline topology unique identifier. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Pipeline topology properties. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + """ super(PipelineTopology, self).__init__(**kwargs) self.name = name self.system_data = system_data @@ -1908,12 +2793,12 @@ def __init__( class PipelineTopologyCollection(msrest.serialization.Model): """A collection of pipeline topologies. - :param value: List of pipeline topologies. - :type value: list[~azure.media.videoanalyzer.edge.models.PipelineTopology] - :param continuation_token: A continuation token to be used in subsequent calls when enumerating + :ivar value: List of pipeline topologies. + :vartype value: list[~azure.media.videoanalyzer.edge.models.PipelineTopology] + :ivar continuation_token: A continuation token to be used in subsequent calls when enumerating through the collection. This is returned when the collection results won't fit in a single response. - :type continuation_token: str + :vartype continuation_token: str """ _attribute_map = { @@ -1928,6 +2813,14 @@ def __init__( continuation_token: Optional[str] = None, **kwargs ): + """ + :keyword value: List of pipeline topologies. + :paramtype value: list[~azure.media.videoanalyzer.edge.models.PipelineTopology] + :keyword continuation_token: A continuation token to be used in subsequent calls when + enumerating through the collection. This is returned when the collection results won't fit in a + single response. + :paramtype continuation_token: str + """ super(PipelineTopologyCollection, self).__init__(**kwargs) self.value = value self.continuation_token = continuation_token @@ -1942,15 +2835,15 @@ class PipelineTopologyDeleteRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1960,15 +2853,21 @@ class PipelineTopologyDeleteRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, *, name: str, + api_version: Optional[str] = "1.1", **kwargs ): - super(PipelineTopologyDeleteRequest, self).__init__(name=name, **kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(PipelineTopologyDeleteRequest, self).__init__(api_version=api_version, name=name, **kwargs) self.method_name = 'pipelineTopologyDelete' # type: str @@ -1981,15 +2880,15 @@ class PipelineTopologyGetRequest(MethodRequestEmptyBodyBase): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Resource name. - :type name: str + :ivar name: Required. Resource name. + :vartype name: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -1999,15 +2898,21 @@ class PipelineTopologyGetRequest(MethodRequestEmptyBodyBase): 'name': {'key': 'name', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, *, name: str, + api_version: Optional[str] = "1.1", **kwargs ): - super(PipelineTopologyGetRequest, self).__init__(name=name, **kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(PipelineTopologyGetRequest, self).__init__(api_version=api_version, name=name, **kwargs) self.method_name = 'pipelineTopologyGet' # type: str @@ -2020,13 +2925,13 @@ class PipelineTopologyListRequest(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, } _attribute_map = { @@ -2034,36 +2939,41 @@ class PipelineTopologyListRequest(MethodRequest): 'api_version': {'key': '@apiVersion', 'type': 'str'}, } - api_version = "1.0" - def __init__( self, + *, + api_version: Optional[str] = "1.1", **kwargs ): - super(PipelineTopologyListRequest, self).__init__(**kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + """ + super(PipelineTopologyListRequest, self).__init__(api_version=api_version, **kwargs) self.method_name = 'pipelineTopologyList' # type: str class PipelineTopologyProperties(msrest.serialization.Model): """Pipeline topology properties. - :param description: An optional description of the pipeline topology. It is recommended that - the expected use of the topology to be described here. - :type description: str - :param parameters: List of the topology parameter declarations. Parameters declared here can be + :ivar description: An optional description of the pipeline topology. It is recommended that the + expected use of the topology to be described here. + :vartype description: str + :ivar parameters: List of the topology parameter declarations. Parameters declared here can be referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. Parameters can have optional default values and can later be defined in individual instances of the pipeline. - :type parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDeclaration] - :param sources: List of the topology source nodes. Source nodes enable external data to be + :vartype parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDeclaration] + :ivar sources: List of the topology source nodes. Source nodes enable external data to be ingested by the pipeline. - :type sources: list[~azure.media.videoanalyzer.edge.models.SourceNodeBase] - :param processors: List of the topology processor nodes. Processor nodes enable pipeline data - to be analyzed, processed or transformed. - :type processors: list[~azure.media.videoanalyzer.edge.models.ProcessorNodeBase] - :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + :vartype sources: list[~azure.media.videoanalyzer.edge.models.SourceNodeBase] + :ivar processors: List of the topology processor nodes. Processor nodes enable pipeline data to + be analyzed, processed or transformed. + :vartype processors: list[~azure.media.videoanalyzer.edge.models.ProcessorNodeBase] + :ivar sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or exported. - :type sinks: list[~azure.media.videoanalyzer.edge.models.SinkNodeBase] + :vartype sinks: list[~azure.media.videoanalyzer.edge.models.SinkNodeBase] """ _attribute_map = { @@ -2084,6 +2994,25 @@ def __init__( sinks: Optional[List["SinkNodeBase"]] = None, **kwargs ): + """ + :keyword description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :paramtype description: str + :keyword parameters: List of the topology parameter declarations. Parameters declared here can + be referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string + pattern. Parameters can have optional default values and can later be defined in individual + instances of the pipeline. + :paramtype parameters: list[~azure.media.videoanalyzer.edge.models.ParameterDeclaration] + :keyword sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :paramtype sources: list[~azure.media.videoanalyzer.edge.models.SourceNodeBase] + :keyword processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :paramtype processors: list[~azure.media.videoanalyzer.edge.models.ProcessorNodeBase] + :keyword sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :paramtype sinks: list[~azure.media.videoanalyzer.edge.models.SinkNodeBase] + """ super(PipelineTopologyProperties, self).__init__(**kwargs) self.description = description self.parameters = parameters @@ -2101,9 +3030,10 @@ class PipelineTopologySetRequest(MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param pipeline_topology: Required. Pipeline topology describes the processing steps to be + :ivar pipeline_topology: Required. Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which acquires @@ -2122,12 +3052,11 @@ class PipelineTopologySetRequest(MethodRequest): * Processors: list of nodes which perform data analysis or transformations. -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. - :type pipeline_topology: ~azure.media.videoanalyzer.edge.models.PipelineTopology + :vartype pipeline_topology: ~azure.media.videoanalyzer.edge.models.PipelineTopology """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'pipeline_topology': {'required': True}, } @@ -2137,21 +3066,51 @@ class PipelineTopologySetRequest(MethodRequest): 'pipeline_topology': {'key': 'pipelineTopology', 'type': 'PipelineTopology'}, } - api_version = "1.0" - def __init__( self, *, pipeline_topology: "PipelineTopology", + api_version: Optional[str] = "1.1", **kwargs ): - super(PipelineTopologySetRequest, self).__init__(**kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword pipeline_topology: Required. Pipeline topology describes the processing steps to be + applied when processing media for a particular outcome. The topology should be defined + according to the scenario to be achieved and can be reused across many pipeline instances which + share the same processing characteristics. For instance, a pipeline topology which acquires + data from a RTSP camera, process it with an specific AI model and stored the data on the cloud + can be reused across many different cameras, as long as the same processing should be applied + across all the cameras. Individual instance properties can be defined through the use of + user-defined parameters, which allow for a topology to be parameterized, thus allowing + individual pipelines to refer to different values, such as individual cameras RTSP endpoints + and credentials. Overall a topology is composed of the following: + + + * Parameters: list of user defined parameters that can be references across the topology + nodes. + * Sources: list of one or more data sources nodes such as an RTSP source which allows for + media to be ingested from cameras. + * Processors: list of nodes which perform data analysis or transformations. + -Sinks: list of one or more data sinks which allow for data to be stored or exported to + other destinations. + :paramtype pipeline_topology: ~azure.media.videoanalyzer.edge.models.PipelineTopology + """ + super(PipelineTopologySetRequest, self).__init__(api_version=api_version, **kwargs) self.method_name = 'pipelineTopologySet' # type: str self.pipeline_topology = pipeline_topology class PipelineTopologySetRequestBody(PipelineTopology, MethodRequest): - """Pipeline topology resource representation. + """Pipeline topology describes the processing steps to be applied when processing media for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which acquires data from a RTSP camera, process it with an specific AI model and stored the data on the cloud can be reused across many different cameras, as long as the same processing should be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized, thus allowing individual pipelines to refer to different values, such as individual cameras RTSP endpoints and credentials. Overall a topology is composed of the following: + + +* Parameters: list of user defined parameters that can be references across the topology nodes. +* Sources: list of one or more data sources nodes such as an RTSP source which allows for media to be ingested from cameras. +* Processors: list of nodes which perform data analysis or transformations. + -Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. Variables are only populated by the server, and will be ignored when sending a request. @@ -2159,19 +3118,19 @@ class PipelineTopologySetRequestBody(PipelineTopology, MethodRequest): :ivar method_name: Required. Direct method method name.Constant filled by server. :vartype method_name: str - :ivar api_version: Video Analyzer API version. Default value: "1.0". + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". :vartype api_version: str - :param name: Required. Pipeline topology unique identifier. - :type name: str - :param system_data: Read-only system metadata associated with this object. - :type system_data: ~azure.media.videoanalyzer.edge.models.SystemData - :param properties: Pipeline topology properties. - :type properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + :ivar name: Required. Pipeline topology unique identifier. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Pipeline topology properties. + :vartype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties """ _validation = { 'method_name': {'required': True, 'readonly': True}, - 'api_version': {'constant': True}, 'name': {'required': True}, } @@ -2183,84 +3142,565 @@ class PipelineTopologySetRequestBody(PipelineTopology, MethodRequest): 'properties': {'key': 'properties', 'type': 'PipelineTopologyProperties'}, } - api_version = "1.0" - def __init__( self, *, name: str, + api_version: Optional[str] = "1.1", system_data: Optional["SystemData"] = None, properties: Optional["PipelineTopologyProperties"] = None, **kwargs ): - super(PipelineTopologySetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, **kwargs) + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Pipeline topology unique identifier. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Pipeline topology properties. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.PipelineTopologyProperties + """ + super(PipelineTopologySetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, api_version=api_version, **kwargs) self.method_name = 'PipelineTopologySetRequestBody' # type: str + self.api_version = api_version self.method_name = 'PipelineTopologySetRequestBody' # type: str self.name = name self.system_data = system_data self.properties = properties -class RtspSource(SourceNodeBase): - """RTSP source allows for media from an RTSP camera or generic RTSP server to be ingested into a live pipeline. +class RateControl(msrest.serialization.Model): + """Class representing the video's rate control. + + :ivar bit_rate_limit: the maximum output bitrate in kbps. + :vartype bit_rate_limit: float + :ivar encoding_interval: Interval at which images are encoded and transmitted. + :vartype encoding_interval: float + :ivar frame_rate_limit: Maximum output framerate in fps. + :vartype frame_rate_limit: float + :ivar guaranteed_frame_rate: A value of true indicates that frame rate is a fixed value rather + than an upper limit, and that the video encoder shall prioritize frame rate over all other + adaptable configuration values such as bitrate. + :vartype guaranteed_frame_rate: bool + """ + + _attribute_map = { + 'bit_rate_limit': {'key': 'bitRateLimit', 'type': 'float'}, + 'encoding_interval': {'key': 'encodingInterval', 'type': 'float'}, + 'frame_rate_limit': {'key': 'frameRateLimit', 'type': 'float'}, + 'guaranteed_frame_rate': {'key': 'guaranteedFrameRate', 'type': 'bool'}, + } + + def __init__( + self, + *, + bit_rate_limit: Optional[float] = None, + encoding_interval: Optional[float] = None, + frame_rate_limit: Optional[float] = None, + guaranteed_frame_rate: Optional[bool] = None, + **kwargs + ): + """ + :keyword bit_rate_limit: the maximum output bitrate in kbps. + :paramtype bit_rate_limit: float + :keyword encoding_interval: Interval at which images are encoded and transmitted. + :paramtype encoding_interval: float + :keyword frame_rate_limit: Maximum output framerate in fps. + :paramtype frame_rate_limit: float + :keyword guaranteed_frame_rate: A value of true indicates that frame rate is a fixed value + rather than an upper limit, and that the video encoder shall prioritize frame rate over all + other adaptable configuration values such as bitrate. + :paramtype guaranteed_frame_rate: bool + """ + super(RateControl, self).__init__(**kwargs) + self.bit_rate_limit = bit_rate_limit + self.encoding_interval = encoding_interval + self.frame_rate_limit = frame_rate_limit + self.guaranteed_frame_rate = guaranteed_frame_rate + + +class RemoteDeviceAdapter(msrest.serialization.Model): + """The Video Analyzer edge module can act as a transparent gateway for video, enabling IoT devices to send video to the cloud from behind a firewall. A remote device adapter should be created for each such IoT device. Communication between the cloud and IoT device would then flow via the Video Analyzer edge module. All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param transport: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When - using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the - RTSP messages are exchanged through long lived HTTP connections, and the RTP packages are - interleaved in the HTTP connections alongside the RTSP messages. Possible values include: - "http", "tcp". - :type transport: str or ~azure.media.videoanalyzer.edge.models.RtspTransport - :param endpoint: Required. RTSP endpoint information for Video Analyzer to connect to. This - contains the required information for Video Analyzer to connect to RTSP cameras and/or generic - RTSP servers. - :type endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + :ivar name: Required. The unique identifier for the remote device adapter. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Properties of the remote device adapter. + :vartype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties """ _validation = { - 'type': {'required': True}, 'name': {'required': True}, - 'endpoint': {'required': True}, } _attribute_map = { - 'type': {'key': '@type', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'transport': {'key': 'transport', 'type': 'str'}, - 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'RemoteDeviceAdapterProperties'}, } def __init__( self, *, name: str, - endpoint: "EndpointBase", - transport: Optional[Union[str, "RtspTransport"]] = None, + system_data: Optional["SystemData"] = None, + properties: Optional["RemoteDeviceAdapterProperties"] = None, **kwargs ): - super(RtspSource, self).__init__(name=name, **kwargs) - self.type = '#Microsoft.VideoAnalyzer.RtspSource' # type: str - self.transport = transport - self.endpoint = endpoint - + """ + :keyword name: Required. The unique identifier for the remote device adapter. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Properties of the remote device adapter. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties + """ + super(RemoteDeviceAdapter, self).__init__(**kwargs) + self.name = name + self.system_data = system_data + self.properties = properties + + +class RemoteDeviceAdapterCollection(msrest.serialization.Model): + """A list of remote device adapters. + + :ivar value: An array of remote device adapters. + :vartype value: list[~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter] + :ivar continuation_token: A continuation token to use in subsequent calls to enumerate through + the remote device adapter collection. This is used when the collection contains too many + results to return in one response. + :vartype continuation_token: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RemoteDeviceAdapter]'}, + 'continuation_token': {'key': '@continuationToken', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["RemoteDeviceAdapter"]] = None, + continuation_token: Optional[str] = None, + **kwargs + ): + """ + :keyword value: An array of remote device adapters. + :paramtype value: list[~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter] + :keyword continuation_token: A continuation token to use in subsequent calls to enumerate + through the remote device adapter collection. This is used when the collection contains too + many results to return in one response. + :paramtype continuation_token: str + """ + super(RemoteDeviceAdapterCollection, self).__init__(**kwargs) + self.value = value + self.continuation_token = continuation_token + + +class RemoteDeviceAdapterDeleteRequest(MethodRequestEmptyBodyBase): + """Deletes an existing remote device adapter. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar name: Required. Resource name. + :vartype name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + api_version: Optional[str] = "1.1", + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(RemoteDeviceAdapterDeleteRequest, self).__init__(api_version=api_version, name=name, **kwargs) + self.method_name = 'remoteDeviceAdapterDelete' # type: str + + +class RemoteDeviceAdapterGetRequest(MethodRequestEmptyBodyBase): + """Retrieves an existing remote device adapter. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar name: Required. Resource name. + :vartype name: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + api_version: Optional[str] = "1.1", + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. Resource name. + :paramtype name: str + """ + super(RemoteDeviceAdapterGetRequest, self).__init__(api_version=api_version, name=name, **kwargs) + self.method_name = 'remoteDeviceAdapterGet' # type: str + + +class RemoteDeviceAdapterListRequest(MethodRequest): + """List all existing remote device adapters. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + api_version: Optional[str] = "1.1", + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + """ + super(RemoteDeviceAdapterListRequest, self).__init__(api_version=api_version, **kwargs) + self.method_name = 'remoteDeviceAdapterList' # type: str + + +class RemoteDeviceAdapterProperties(msrest.serialization.Model): + """Remote device adapter properties. + + All required parameters must be populated in order to send to Azure. + + :ivar description: An optional description for the remote device adapter. + :vartype description: str + :ivar target: Required. The IoT device to which this remote device will connect. + :vartype target: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterTarget + :ivar iot_hub_device_connection: Required. Information that enables communication between the + IoT Hub and the IoT device - allowing this edge module to act as a transparent gateway between + the two. + :vartype iot_hub_device_connection: + ~azure.media.videoanalyzer.edge.models.IotHubDeviceConnection + """ + + _validation = { + 'target': {'required': True}, + 'iot_hub_device_connection': {'required': True}, + } + + _attribute_map = { + 'description': {'key': 'description', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'RemoteDeviceAdapterTarget'}, + 'iot_hub_device_connection': {'key': 'iotHubDeviceConnection', 'type': 'IotHubDeviceConnection'}, + } + + def __init__( + self, + *, + target: "RemoteDeviceAdapterTarget", + iot_hub_device_connection: "IotHubDeviceConnection", + description: Optional[str] = None, + **kwargs + ): + """ + :keyword description: An optional description for the remote device adapter. + :paramtype description: str + :keyword target: Required. The IoT device to which this remote device will connect. + :paramtype target: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterTarget + :keyword iot_hub_device_connection: Required. Information that enables communication between + the IoT Hub and the IoT device - allowing this edge module to act as a transparent gateway + between the two. + :paramtype iot_hub_device_connection: + ~azure.media.videoanalyzer.edge.models.IotHubDeviceConnection + """ + super(RemoteDeviceAdapterProperties, self).__init__(**kwargs) + self.description = description + self.target = target + self.iot_hub_device_connection = iot_hub_device_connection + + +class RemoteDeviceAdapterSetRequest(MethodRequest): + """Creates a new remote device adapter or updates an existing one. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar remote_device_adapter: Required. The Video Analyzer edge module can act as a transparent + gateway for video, enabling IoT devices to send video to the cloud from behind a firewall. A + remote device adapter should be created for each such IoT device. Communication between the + cloud and IoT device would then flow via the Video Analyzer edge module. + :vartype remote_device_adapter: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'remote_device_adapter': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'remote_device_adapter': {'key': 'remoteDeviceAdapter', 'type': 'RemoteDeviceAdapter'}, + } + + def __init__( + self, + *, + remote_device_adapter: "RemoteDeviceAdapter", + api_version: Optional[str] = "1.1", + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword remote_device_adapter: Required. The Video Analyzer edge module can act as a + transparent gateway for video, enabling IoT devices to send video to the cloud from behind a + firewall. A remote device adapter should be created for each such IoT device. Communication + between the cloud and IoT device would then flow via the Video Analyzer edge module. + :paramtype remote_device_adapter: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapter + """ + super(RemoteDeviceAdapterSetRequest, self).__init__(api_version=api_version, **kwargs) + self.method_name = 'remoteDeviceAdapterSet' # type: str + self.remote_device_adapter = remote_device_adapter + + +class RemoteDeviceAdapterSetRequestBody(RemoteDeviceAdapter, MethodRequest): + """The Video Analyzer edge module can act as a transparent gateway for video, enabling IoT devices to send video to the cloud from behind a firewall. A remote device adapter should be created for each such IoT device. Communication between the cloud and IoT device would then flow via the Video Analyzer edge module. + + 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. + + :ivar method_name: Required. Direct method method name.Constant filled by server. + :vartype method_name: str + :ivar api_version: Video Analyzer API version. The only acceptable values to pass in are None + and "1.1". The default value is "1.1". + :vartype api_version: str + :ivar name: Required. The unique identifier for the remote device adapter. + :vartype name: str + :ivar system_data: Read-only system metadata associated with this object. + :vartype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :ivar properties: Properties of the remote device adapter. + :vartype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties + """ + + _validation = { + 'method_name': {'required': True, 'readonly': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'method_name': {'key': 'methodName', 'type': 'str'}, + 'api_version': {'key': '@apiVersion', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'RemoteDeviceAdapterProperties'}, + } + + def __init__( + self, + *, + name: str, + api_version: Optional[str] = "1.1", + system_data: Optional["SystemData"] = None, + properties: Optional["RemoteDeviceAdapterProperties"] = None, + **kwargs + ): + """ + :keyword api_version: Video Analyzer API version. The only acceptable values to pass in are + None and "1.1". The default value is "1.1". + :paramtype api_version: str + :keyword name: Required. The unique identifier for the remote device adapter. + :paramtype name: str + :keyword system_data: Read-only system metadata associated with this object. + :paramtype system_data: ~azure.media.videoanalyzer.edge.models.SystemData + :keyword properties: Properties of the remote device adapter. + :paramtype properties: ~azure.media.videoanalyzer.edge.models.RemoteDeviceAdapterProperties + """ + super(RemoteDeviceAdapterSetRequestBody, self).__init__(name=name, system_data=system_data, properties=properties, api_version=api_version, **kwargs) + self.method_name = 'RemoteDeviceAdapterSetRequestBody' # type: str + self.api_version = api_version + self.method_name = 'RemoteDeviceAdapterSetRequestBody' # type: str + self.name = name + self.system_data = system_data + self.properties = properties + + +class RemoteDeviceAdapterTarget(msrest.serialization.Model): + """Properties of the remote device adapter target. + + All required parameters must be populated in order to send to Azure. + + :ivar host: Required. Hostname or IP address of the remote device. + :vartype host: str + """ + + _validation = { + 'host': {'required': True}, + } + + _attribute_map = { + 'host': {'key': 'host', 'type': 'str'}, + } + + def __init__( + self, + *, + host: str, + **kwargs + ): + """ + :keyword host: Required. Hostname or IP address of the remote device. + :paramtype host: str + """ + super(RemoteDeviceAdapterTarget, self).__init__(**kwargs) + self.host = host + + +class RtspSource(SourceNodeBase): + """RTSP source allows for media from an RTSP camera or generic RTSP server to be ingested into a live pipeline. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar transport: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When + using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the + RTSP messages are exchanged through long lived HTTP connections, and the RTP packages are + interleaved in the HTTP connections alongside the RTSP messages. Possible values include: + "http", "tcp". + :vartype transport: str or ~azure.media.videoanalyzer.edge.models.RtspTransport + :ivar endpoint: Required. RTSP endpoint information for Video Analyzer to connect to. This + contains the required information for Video Analyzer to connect to RTSP cameras and/or generic + RTSP servers. + :vartype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'endpoint': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'transport': {'key': 'transport', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + } + + def __init__( + self, + *, + name: str, + endpoint: "EndpointBase", + transport: Optional[Union[str, "RtspTransport"]] = None, + **kwargs + ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword transport: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When + using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the + RTSP messages are exchanged through long lived HTTP connections, and the RTP packages are + interleaved in the HTTP connections alongside the RTSP messages. Possible values include: + "http", "tcp". + :paramtype transport: str or ~azure.media.videoanalyzer.edge.models.RtspTransport + :keyword endpoint: Required. RTSP endpoint information for Video Analyzer to connect to. This + contains the required information for Video Analyzer to connect to RTSP cameras and/or generic + RTSP servers. + :paramtype endpoint: ~azure.media.videoanalyzer.edge.models.EndpointBase + """ + super(RtspSource, self).__init__(name=name, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.RtspSource' # type: str + self.transport = transport + self.endpoint = endpoint + class SamplingOptions(msrest.serialization.Model): """Defines how often media is submitted to the extension plugin. - :param skip_samples_without_annotation: When set to 'true', prevents frames without upstream + :ivar skip_samples_without_annotation: When set to 'true', prevents frames without upstream inference data to be sent to the extension plugin. This is useful to limit the frames sent to the extension to pre-analyzed frames only. For example, when used downstream from a motion detector, this can enable for only frames in which motion has been detected to be further analyzed. - :type skip_samples_without_annotation: str - :param maximum_samples_per_second: Maximum rate of samples submitted to the extension. This + :vartype skip_samples_without_annotation: str + :ivar maximum_samples_per_second: Maximum rate of samples submitted to the extension. This prevents an extension plugin to be overloaded with data. - :type maximum_samples_per_second: str + :vartype maximum_samples_per_second: str """ _attribute_map = { @@ -2275,6 +3715,17 @@ def __init__( maximum_samples_per_second: Optional[str] = None, **kwargs ): + """ + :keyword skip_samples_without_annotation: When set to 'true', prevents frames without upstream + inference data to be sent to the extension plugin. This is useful to limit the frames sent to + the extension to pre-analyzed frames only. For example, when used downstream from a motion + detector, this can enable for only frames in which motion has been detected to be further + analyzed. + :paramtype skip_samples_without_annotation: str + :keyword maximum_samples_per_second: Maximum rate of samples submitted to the extension. This + prevents an extension plugin to be overloaded with data. + :paramtype maximum_samples_per_second: str + """ super(SamplingOptions, self).__init__(**kwargs) self.skip_samples_without_annotation = skip_samples_without_annotation self.maximum_samples_per_second = maximum_samples_per_second @@ -2285,31 +3736,31 @@ class SignalGateProcessor(ProcessorNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param activation_evaluation_window: The period of time over which the gate gathers input - events before evaluating them. - :type activation_evaluation_window: str - :param activation_signal_offset: Signal offset once the gate is activated (can be negative). It + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar activation_evaluation_window: The period of time over which the gate gathers input events + before evaluating them. + :vartype activation_evaluation_window: str + :ivar activation_signal_offset: Signal offset once the gate is activated (can be negative). It determines the how much farther behind of after the signal will be let through based on the activation time. A negative offset indicates that data prior the activation time must be included on the signal that is let through, once the gate is activated. When used upstream of a file or video sink, this allows for scenarios such as recording buffered media prior an event, such as: record video 5 seconds prior motions is detected. - :type activation_signal_offset: str - :param minimum_activation_time: The minimum period for which the gate remains open in the + :vartype activation_signal_offset: str + :ivar minimum_activation_time: The minimum period for which the gate remains open in the absence of subsequent triggers (events). When used upstream of a file or video sink, it determines the minimum length of the recorded video clip. - :type minimum_activation_time: str - :param maximum_activation_time: The maximum period for which the gate remains open in the + :vartype minimum_activation_time: str + :ivar maximum_activation_time: The maximum period for which the gate remains open in the presence of subsequent triggers (events). When used upstream of a file or video sink, it determines the maximum length of the recorded video clip. - :type maximum_activation_time: str + :vartype maximum_activation_time: str """ _validation = { @@ -2339,6 +3790,31 @@ def __init__( maximum_activation_time: Optional[str] = None, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword activation_evaluation_window: The period of time over which the gate gathers input + events before evaluating them. + :paramtype activation_evaluation_window: str + :keyword activation_signal_offset: Signal offset once the gate is activated (can be negative). + It determines the how much farther behind of after the signal will be let through based on the + activation time. A negative offset indicates that data prior the activation time must be + included on the signal that is let through, once the gate is activated. When used upstream of a + file or video sink, this allows for scenarios such as recording buffered media prior an event, + such as: record video 5 seconds prior motions is detected. + :paramtype activation_signal_offset: str + :keyword minimum_activation_time: The minimum period for which the gate remains open in the + absence of subsequent triggers (events). When used upstream of a file or video sink, it + determines the minimum length of the recorded video clip. + :paramtype minimum_activation_time: str + :keyword maximum_activation_time: The maximum period for which the gate remains open in the + presence of subsequent triggers (events). When used upstream of a file or video sink, it + determines the maximum length of the recorded video clip. + :paramtype maximum_activation_time: str + """ super(SignalGateProcessor, self).__init__(name=name, inputs=inputs, **kwargs) self.type = '#Microsoft.VideoAnalyzer.SignalGateProcessor' # type: str self.activation_evaluation_window = activation_evaluation_window @@ -2355,8 +3831,8 @@ class SpatialAnalysisOperationBase(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str """ _validation = { @@ -2375,6 +3851,8 @@ def __init__( self, **kwargs ): + """ + """ super(SpatialAnalysisOperationBase, self).__init__(**kwargs) self.type = None # type: Optional[str] @@ -2384,11 +3862,11 @@ class SpatialAnalysisCustomOperation(SpatialAnalysisOperationBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param extension_configuration: Required. Custom configuration to pass to the Azure Cognitive + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar extension_configuration: Required. Custom configuration to pass to the Azure Cognitive Services Spatial Analysis module. - :type extension_configuration: str + :vartype extension_configuration: str """ _validation = { @@ -2407,6 +3885,11 @@ def __init__( extension_configuration: str, **kwargs ): + """ + :keyword extension_configuration: Required. Custom configuration to pass to the Azure Cognitive + Services Spatial Analysis module. + :paramtype extension_configuration: str + """ super(SpatialAnalysisCustomOperation, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisCustomOperation' # type: str self.extension_configuration = extension_configuration @@ -2415,11 +3898,11 @@ def __init__( class SpatialAnalysisOperationEventBase(msrest.serialization.Model): """Defines the Azure Cognitive Services Spatial Analysis operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus """ _attribute_map = { @@ -2434,6 +3917,13 @@ def __init__( focus: Optional[Union[str, "SpatialAnalysisOperationFocus"]] = None, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + """ super(SpatialAnalysisOperationEventBase, self).__init__(**kwargs) self.threshold = threshold self.focus = focus @@ -2442,16 +3932,16 @@ def __init__( class SpatialAnalysisPersonCountEvent(SpatialAnalysisOperationEventBase): """Defines a Spatial Analysis person count operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus - :param trigger: The event trigger type. Possible values include: "event", "interval". - :type trigger: str or + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :ivar trigger: The event trigger type. Possible values include: "event", "interval". + :vartype trigger: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEventTrigger - :param output_frequency: The event or interval output frequency. - :type output_frequency: str + :ivar output_frequency: The event or interval output frequency. + :vartype output_frequency: str """ _attribute_map = { @@ -2470,6 +3960,18 @@ def __init__( output_frequency: Optional[str] = None, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :keyword trigger: The event trigger type. Possible values include: "event", "interval". + :paramtype trigger: str or + ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEventTrigger + :keyword output_frequency: The event or interval output frequency. + :paramtype output_frequency: str + """ super(SpatialAnalysisPersonCountEvent, self).__init__(threshold=threshold, focus=focus, **kwargs) self.trigger = trigger self.output_frequency = output_frequency @@ -2483,17 +3985,23 @@ class SpatialAnalysisTypedOperationBase(SpatialAnalysisOperationBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str + :vartype enable_face_mask_classifier: str """ _validation = { @@ -2503,8 +4011,11 @@ class SpatialAnalysisTypedOperationBase(SpatialAnalysisOperationBase): _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, } @@ -2516,16 +4027,39 @@ def __init__( self, *, debug: Optional[str] = None, + calibration_configuration: Optional[str] = None, camera_configuration: Optional[str] = None, + camera_calibrator_node_configuration: Optional[str] = None, detector_node_configuration: Optional[str] = None, + tracker_node_configuration: Optional[str] = None, enable_face_mask_classifier: Optional[str] = None, **kwargs ): + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + """ super(SpatialAnalysisTypedOperationBase, self).__init__(**kwargs) self.type = 'SpatialAnalysisTypedOperationBase' # type: str self.debug = debug + self.calibration_configuration = calibration_configuration self.camera_configuration = camera_configuration + self.camera_calibrator_node_configuration = camera_calibrator_node_configuration self.detector_node_configuration = detector_node_configuration + self.tracker_node_configuration = tracker_node_configuration self.enable_face_mask_classifier = enable_face_mask_classifier @@ -2534,19 +4068,26 @@ class SpatialAnalysisPersonCountOperation(SpatialAnalysisTypedOperationBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str - :param zones: Required. The list of zones and optional events. - :type zones: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountZoneEvents] + :vartype enable_face_mask_classifier: str + :ivar zones: Required. The list of zones and optional events. + :vartype zones: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountZoneEvents] """ _validation = { @@ -2557,8 +4098,11 @@ class SpatialAnalysisPersonCountOperation(SpatialAnalysisTypedOperationBase): _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonCountZoneEvents]'}, } @@ -2568,12 +4112,35 @@ def __init__( *, zones: List["SpatialAnalysisPersonCountZoneEvents"], debug: Optional[str] = None, + calibration_configuration: Optional[str] = None, camera_configuration: Optional[str] = None, + camera_calibrator_node_configuration: Optional[str] = None, detector_node_configuration: Optional[str] = None, + tracker_node_configuration: Optional[str] = None, enable_face_mask_classifier: Optional[str] = None, **kwargs ): - super(SpatialAnalysisPersonCountOperation, self).__init__(debug=debug, camera_configuration=camera_configuration, detector_node_configuration=detector_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + :keyword zones: Required. The list of zones and optional events. + :paramtype zones: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountZoneEvents] + """ + super(SpatialAnalysisPersonCountOperation, self).__init__(debug=debug, calibration_configuration=calibration_configuration, camera_configuration=camera_configuration, camera_calibrator_node_configuration=camera_calibrator_node_configuration, detector_node_configuration=detector_node_configuration, tracker_node_configuration=tracker_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonCountOperation' # type: str self.zones = zones @@ -2583,10 +4150,10 @@ class SpatialAnalysisPersonCountZoneEvents(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param zone: Required. The named zone. - :type zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase - :param events: The event configuration. - :type events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEvent] + :ivar zone: Required. The named zone. + :vartype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :ivar events: The event configuration. + :vartype events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEvent] """ _validation = { @@ -2605,6 +4172,12 @@ def __init__( events: Optional[List["SpatialAnalysisPersonCountEvent"]] = None, **kwargs ): + """ + :keyword zone: Required. The named zone. + :paramtype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :keyword events: The event configuration. + :paramtype events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonCountEvent] + """ super(SpatialAnalysisPersonCountZoneEvents, self).__init__(**kwargs) self.zone = zone self.events = events @@ -2613,20 +4186,20 @@ def __init__( class SpatialAnalysisPersonDistanceEvent(SpatialAnalysisOperationEventBase): """Defines a Spatial Analysis person distance operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus - :param trigger: The event trigger type. Possible values include: "event", "interval". - :type trigger: str or + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :ivar trigger: The event trigger type. Possible values include: "event", "interval". + :vartype trigger: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEventTrigger - :param output_frequency: The event or interval output frequency. - :type output_frequency: str - :param minimum_distance_threshold: The minimum distance threshold. - :type minimum_distance_threshold: str - :param maximum_distance_threshold: The maximum distance threshold. - :type maximum_distance_threshold: str + :ivar output_frequency: The event or interval output frequency. + :vartype output_frequency: str + :ivar minimum_distance_threshold: The minimum distance threshold. + :vartype minimum_distance_threshold: str + :ivar maximum_distance_threshold: The maximum distance threshold. + :vartype maximum_distance_threshold: str """ _attribute_map = { @@ -2649,6 +4222,22 @@ def __init__( maximum_distance_threshold: Optional[str] = None, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :keyword trigger: The event trigger type. Possible values include: "event", "interval". + :paramtype trigger: str or + ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEventTrigger + :keyword output_frequency: The event or interval output frequency. + :paramtype output_frequency: str + :keyword minimum_distance_threshold: The minimum distance threshold. + :paramtype minimum_distance_threshold: str + :keyword maximum_distance_threshold: The maximum distance threshold. + :paramtype maximum_distance_threshold: str + """ super(SpatialAnalysisPersonDistanceEvent, self).__init__(threshold=threshold, focus=focus, **kwargs) self.trigger = trigger self.output_frequency = output_frequency @@ -2661,19 +4250,25 @@ class SpatialAnalysisPersonDistanceOperation(SpatialAnalysisTypedOperationBase): All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str - :param zones: Required. The list of zones with optional events. - :type zones: + :vartype enable_face_mask_classifier: str + :ivar zones: Required. The list of zones with optional events. + :vartype zones: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceZoneEvents] """ @@ -2685,8 +4280,11 @@ class SpatialAnalysisPersonDistanceOperation(SpatialAnalysisTypedOperationBase): _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonDistanceZoneEvents]'}, } @@ -2696,12 +4294,35 @@ def __init__( *, zones: List["SpatialAnalysisPersonDistanceZoneEvents"], debug: Optional[str] = None, + calibration_configuration: Optional[str] = None, camera_configuration: Optional[str] = None, + camera_calibrator_node_configuration: Optional[str] = None, detector_node_configuration: Optional[str] = None, + tracker_node_configuration: Optional[str] = None, enable_face_mask_classifier: Optional[str] = None, **kwargs ): - super(SpatialAnalysisPersonDistanceOperation, self).__init__(debug=debug, camera_configuration=camera_configuration, detector_node_configuration=detector_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + :keyword zones: Required. The list of zones with optional events. + :paramtype zones: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceZoneEvents] + """ + super(SpatialAnalysisPersonDistanceOperation, self).__init__(debug=debug, calibration_configuration=calibration_configuration, camera_configuration=camera_configuration, camera_calibrator_node_configuration=camera_calibrator_node_configuration, detector_node_configuration=detector_node_configuration, tracker_node_configuration=tracker_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonDistanceOperation' # type: str self.zones = zones @@ -2711,10 +4332,11 @@ class SpatialAnalysisPersonDistanceZoneEvents(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param zone: Required. The named zone. - :type zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase - :param events: The event configuration. - :type events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEvent] + :ivar zone: Required. The named zone. + :vartype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :ivar events: The event configuration. + :vartype events: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEvent] """ _validation = { @@ -2733,6 +4355,13 @@ def __init__( events: Optional[List["SpatialAnalysisPersonDistanceEvent"]] = None, **kwargs ): + """ + :keyword zone: Required. The named zone. + :paramtype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :keyword events: The event configuration. + :paramtype events: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonDistanceEvent] + """ super(SpatialAnalysisPersonDistanceZoneEvents, self).__init__(**kwargs) self.zone = zone self.events = events @@ -2741,11 +4370,11 @@ def __init__( class SpatialAnalysisPersonLineCrossingEvent(SpatialAnalysisOperationEventBase): """Defines a Spatial Analysis person line crossing operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus """ _attribute_map = { @@ -2760,6 +4389,13 @@ def __init__( focus: Optional[Union[str, "SpatialAnalysisOperationFocus"]] = None, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + """ super(SpatialAnalysisPersonLineCrossingEvent, self).__init__(threshold=threshold, focus=focus, **kwargs) @@ -2768,10 +4404,10 @@ class SpatialAnalysisPersonLineCrossingLineEvents(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param line: Required. The named line. - :type line: ~azure.media.videoanalyzer.edge.models.NamedLineBase - :param events: The event configuration. - :type events: + :ivar line: Required. The named line. + :vartype line: ~azure.media.videoanalyzer.edge.models.NamedLineBase + :ivar events: The event configuration. + :vartype events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingEvent] """ @@ -2791,6 +4427,13 @@ def __init__( events: Optional[List["SpatialAnalysisPersonLineCrossingEvent"]] = None, **kwargs ): + """ + :keyword line: Required. The named line. + :paramtype line: ~azure.media.videoanalyzer.edge.models.NamedLineBase + :keyword events: The event configuration. + :paramtype events: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingEvent] + """ super(SpatialAnalysisPersonLineCrossingLineEvents, self).__init__(**kwargs) self.line = line self.events = events @@ -2801,19 +4444,25 @@ class SpatialAnalysisPersonLineCrossingOperation(SpatialAnalysisTypedOperationBa All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str - :param lines: Required. The list of lines with optional events. - :type lines: + :vartype enable_face_mask_classifier: str + :ivar lines: Required. The list of lines with optional events. + :vartype lines: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingLineEvents] """ @@ -2825,8 +4474,11 @@ class SpatialAnalysisPersonLineCrossingOperation(SpatialAnalysisTypedOperationBa _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, 'lines': {'key': 'lines', 'type': '[SpatialAnalysisPersonLineCrossingLineEvents]'}, } @@ -2836,12 +4488,35 @@ def __init__( *, lines: List["SpatialAnalysisPersonLineCrossingLineEvents"], debug: Optional[str] = None, + calibration_configuration: Optional[str] = None, camera_configuration: Optional[str] = None, + camera_calibrator_node_configuration: Optional[str] = None, detector_node_configuration: Optional[str] = None, + tracker_node_configuration: Optional[str] = None, enable_face_mask_classifier: Optional[str] = None, **kwargs ): - super(SpatialAnalysisPersonLineCrossingOperation, self).__init__(debug=debug, camera_configuration=camera_configuration, detector_node_configuration=detector_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + :keyword lines: Required. The list of lines with optional events. + :paramtype lines: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonLineCrossingLineEvents] + """ + super(SpatialAnalysisPersonLineCrossingOperation, self).__init__(debug=debug, calibration_configuration=calibration_configuration, camera_configuration=camera_configuration, camera_calibrator_node_configuration=camera_calibrator_node_configuration, detector_node_configuration=detector_node_configuration, tracker_node_configuration=tracker_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonLineCrossingOperation' # type: str self.lines = lines @@ -2849,13 +4524,13 @@ def __init__( class SpatialAnalysisPersonZoneCrossingEvent(SpatialAnalysisOperationEventBase): """Defines a Spatial Analysis person crossing zone operation eventing configuration. - :param threshold: The event threshold. - :type threshold: str - :param focus: The operation focus type. Possible values include: "center", "bottomCenter", + :ivar threshold: The event threshold. + :vartype threshold: str + :ivar focus: The operation focus type. Possible values include: "center", "bottomCenter", "footprint". - :type focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus - :param event_type: The event type. Possible values include: "zoneCrossing", "zoneDwellTime". - :type event_type: str or + :vartype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :ivar event_type: The event type. Possible values include: "zoneCrossing", "zoneDwellTime". + :vartype event_type: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEventType """ @@ -2873,6 +4548,16 @@ def __init__( event_type: Optional[Union[str, "SpatialAnalysisPersonZoneCrossingEventType"]] = None, **kwargs ): + """ + :keyword threshold: The event threshold. + :paramtype threshold: str + :keyword focus: The operation focus type. Possible values include: "center", "bottomCenter", + "footprint". + :paramtype focus: str or ~azure.media.videoanalyzer.edge.models.SpatialAnalysisOperationFocus + :keyword event_type: The event type. Possible values include: "zoneCrossing", "zoneDwellTime". + :paramtype event_type: str or + ~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEventType + """ super(SpatialAnalysisPersonZoneCrossingEvent, self).__init__(threshold=threshold, focus=focus, **kwargs) self.event_type = event_type @@ -2882,19 +4567,25 @@ class SpatialAnalysisPersonZoneCrossingOperation(SpatialAnalysisTypedOperationBa All required parameters must be populated in order to send to Azure. - :param type: Required. The Type discriminator for the derived types.Constant filled by server. - :type type: str - :param debug: If set to 'true', enables debugging mode for this operation. - :type debug: str - :param camera_configuration: Advanced camera configuration. - :type camera_configuration: str - :param detector_node_configuration: Advanced detector node configuration. - :type detector_node_configuration: str - :param enable_face_mask_classifier: If set to 'true', enables face mask detection for this + :ivar type: Required. The Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar debug: If set to 'true', enables debugging mode for this operation. + :vartype debug: str + :ivar calibration_configuration: Advanced calibration configuration. + :vartype calibration_configuration: str + :ivar camera_configuration: Advanced camera configuration. + :vartype camera_configuration: str + :ivar camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :vartype camera_calibrator_node_configuration: str + :ivar detector_node_configuration: Advanced detector node configuration. + :vartype detector_node_configuration: str + :ivar tracker_node_configuration: Advanced tracker node configuration. + :vartype tracker_node_configuration: str + :ivar enable_face_mask_classifier: If set to 'true', enables face mask detection for this operation. - :type enable_face_mask_classifier: str - :param zones: Required. The list of zones with optional events. - :type zones: + :vartype enable_face_mask_classifier: str + :ivar zones: Required. The list of zones with optional events. + :vartype zones: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingZoneEvents] """ @@ -2906,8 +4597,11 @@ class SpatialAnalysisPersonZoneCrossingOperation(SpatialAnalysisTypedOperationBa _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, 'debug': {'key': 'debug', 'type': 'str'}, + 'calibration_configuration': {'key': 'calibrationConfiguration', 'type': 'str'}, 'camera_configuration': {'key': 'cameraConfiguration', 'type': 'str'}, + 'camera_calibrator_node_configuration': {'key': 'cameraCalibratorNodeConfiguration', 'type': 'str'}, 'detector_node_configuration': {'key': 'detectorNodeConfiguration', 'type': 'str'}, + 'tracker_node_configuration': {'key': 'trackerNodeConfiguration', 'type': 'str'}, 'enable_face_mask_classifier': {'key': 'enableFaceMaskClassifier', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[SpatialAnalysisPersonZoneCrossingZoneEvents]'}, } @@ -2917,12 +4611,35 @@ def __init__( *, zones: List["SpatialAnalysisPersonZoneCrossingZoneEvents"], debug: Optional[str] = None, + calibration_configuration: Optional[str] = None, camera_configuration: Optional[str] = None, + camera_calibrator_node_configuration: Optional[str] = None, detector_node_configuration: Optional[str] = None, + tracker_node_configuration: Optional[str] = None, enable_face_mask_classifier: Optional[str] = None, **kwargs ): - super(SpatialAnalysisPersonZoneCrossingOperation, self).__init__(debug=debug, camera_configuration=camera_configuration, detector_node_configuration=detector_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) + """ + :keyword debug: If set to 'true', enables debugging mode for this operation. + :paramtype debug: str + :keyword calibration_configuration: Advanced calibration configuration. + :paramtype calibration_configuration: str + :keyword camera_configuration: Advanced camera configuration. + :paramtype camera_configuration: str + :keyword camera_calibrator_node_configuration: Advanced camera calibrator configuration. + :paramtype camera_calibrator_node_configuration: str + :keyword detector_node_configuration: Advanced detector node configuration. + :paramtype detector_node_configuration: str + :keyword tracker_node_configuration: Advanced tracker node configuration. + :paramtype tracker_node_configuration: str + :keyword enable_face_mask_classifier: If set to 'true', enables face mask detection for this + operation. + :paramtype enable_face_mask_classifier: str + :keyword zones: Required. The list of zones with optional events. + :paramtype zones: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingZoneEvents] + """ + super(SpatialAnalysisPersonZoneCrossingOperation, self).__init__(debug=debug, calibration_configuration=calibration_configuration, camera_configuration=camera_configuration, camera_calibrator_node_configuration=camera_calibrator_node_configuration, detector_node_configuration=detector_node_configuration, tracker_node_configuration=tracker_node_configuration, enable_face_mask_classifier=enable_face_mask_classifier, **kwargs) self.type = '#Microsoft.VideoAnalyzer.SpatialAnalysisPersonZoneCrossingOperation' # type: str self.zones = zones @@ -2932,10 +4649,10 @@ class SpatialAnalysisPersonZoneCrossingZoneEvents(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param zone: Required. The named zone. - :type zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase - :param events: The event configuration. - :type events: + :ivar zone: Required. The named zone. + :vartype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :ivar events: The event configuration. + :vartype events: list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEvent] """ @@ -2955,20 +4672,63 @@ def __init__( events: Optional[List["SpatialAnalysisPersonZoneCrossingEvent"]] = None, **kwargs ): + """ + :keyword zone: Required. The named zone. + :paramtype zone: ~azure.media.videoanalyzer.edge.models.NamedPolygonBase + :keyword events: The event configuration. + :paramtype events: + list[~azure.media.videoanalyzer.edge.models.SpatialAnalysisPersonZoneCrossingEvent] + """ super(SpatialAnalysisPersonZoneCrossingZoneEvents, self).__init__(**kwargs) self.zone = zone self.events = events +class SymmetricKeyCredentials(CredentialsBase): + """Symmetric key credential. + + All required parameters must be populated in order to send to Azure. + + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar key: Required. Symmetric key credential. + :vartype key: str + """ + + _validation = { + 'type': {'required': True}, + 'key': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__( + self, + *, + key: str, + **kwargs + ): + """ + :keyword key: Required. Symmetric key credential. + :paramtype key: str + """ + super(SymmetricKeyCredentials, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.SymmetricKeyCredentials' # type: str + self.key = key + + class SystemData(msrest.serialization.Model): """Read-only system metadata associated with a resource. - :param created_at: Date and time when this resource was first created. Value is represented in + :ivar created_at: Date and time when this resource was first created. Value is represented in UTC according to the ISO8601 date format. - :type created_at: ~datetime.datetime - :param last_modified_at: Date and time when this resource was last modified. Value is + :vartype created_at: ~datetime.datetime + :ivar last_modified_at: Date and time when this resource was last modified. Value is represented in UTC according to the ISO8601 date format. - :type last_modified_at: ~datetime.datetime + :vartype last_modified_at: ~datetime.datetime """ _attribute_map = { @@ -2983,6 +4743,14 @@ def __init__( last_modified_at: Optional[datetime.datetime] = None, **kwargs ): + """ + :keyword created_at: Date and time when this resource was first created. Value is represented + in UTC according to the ISO8601 date format. + :paramtype created_at: ~datetime.datetime + :keyword last_modified_at: Date and time when this resource was last modified. Value is + represented in UTC according to the ISO8601 date format. + :paramtype last_modified_at: ~datetime.datetime + """ super(SystemData, self).__init__(**kwargs) self.created_at = created_at self.last_modified_at = last_modified_at @@ -2993,19 +4761,19 @@ class TlsEndpoint(EndpointBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param credentials: Credentials to be presented to the endpoint. - :type credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase - :param url: Required. The endpoint URL for Video Analyzer to connect to. - :type url: str - :param trusted_certificates: List of trusted certificate authorities when authenticating a TLS + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar credentials: Credentials to be presented to the endpoint. + :vartype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :ivar url: Required. The endpoint URL for Video Analyzer to connect to. + :vartype url: str + :ivar trusted_certificates: List of trusted certificate authorities when authenticating a TLS connection. A null list designates that Azure Video Analyzer's list of trusted authorities should be used. - :type trusted_certificates: ~azure.media.videoanalyzer.edge.models.CertificateSource - :param validation_options: Validation options to use when authenticating a TLS connection. By + :vartype trusted_certificates: ~azure.media.videoanalyzer.edge.models.CertificateSource + :ivar validation_options: Validation options to use when authenticating a TLS connection. By default, strict validation is used. - :type validation_options: ~azure.media.videoanalyzer.edge.models.TlsValidationOptions + :vartype validation_options: ~azure.media.videoanalyzer.edge.models.TlsValidationOptions """ _validation = { @@ -3030,6 +4798,19 @@ def __init__( validation_options: Optional["TlsValidationOptions"] = None, **kwargs ): + """ + :keyword credentials: Credentials to be presented to the endpoint. + :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :keyword url: Required. The endpoint URL for Video Analyzer to connect to. + :paramtype url: str + :keyword trusted_certificates: List of trusted certificate authorities when authenticating a + TLS connection. A null list designates that Azure Video Analyzer's list of trusted authorities + should be used. + :paramtype trusted_certificates: ~azure.media.videoanalyzer.edge.models.CertificateSource + :keyword validation_options: Validation options to use when authenticating a TLS connection. By + default, strict validation is used. + :paramtype validation_options: ~azure.media.videoanalyzer.edge.models.TlsValidationOptions + """ super(TlsEndpoint, self).__init__(credentials=credentials, url=url, **kwargs) self.type = '#Microsoft.VideoAnalyzer.TlsEndpoint' # type: str self.trusted_certificates = trusted_certificates @@ -3039,12 +4820,12 @@ def __init__( class TlsValidationOptions(msrest.serialization.Model): """Options for controlling the validation of TLS endpoints. - :param ignore_hostname: When set to 'true' causes the certificate subject name validation to be + :ivar ignore_hostname: When set to 'true' causes the certificate subject name validation to be skipped. Default is 'false'. - :type ignore_hostname: str - :param ignore_signature: When set to 'true' causes the certificate chain trust validation to be + :vartype ignore_hostname: str + :ivar ignore_signature: When set to 'true' causes the certificate chain trust validation to be skipped. Default is 'false'. - :type ignore_signature: str + :vartype ignore_signature: str """ _attribute_map = { @@ -3059,6 +4840,14 @@ def __init__( ignore_signature: Optional[str] = None, **kwargs ): + """ + :keyword ignore_hostname: When set to 'true' causes the certificate subject name validation to + be skipped. Default is 'false'. + :paramtype ignore_hostname: str + :keyword ignore_signature: When set to 'true' causes the certificate chain trust validation to + be skipped. Default is 'false'. + :paramtype ignore_signature: str + """ super(TlsValidationOptions, self).__init__(**kwargs) self.ignore_hostname = ignore_hostname self.ignore_signature = ignore_signature @@ -3069,12 +4858,12 @@ class UnsecuredEndpoint(EndpointBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param credentials: Credentials to be presented to the endpoint. - :type credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase - :param url: Required. The endpoint URL for Video Analyzer to connect to. - :type url: str + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar credentials: Credentials to be presented to the endpoint. + :vartype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :ivar url: Required. The endpoint URL for Video Analyzer to connect to. + :vartype url: str """ _validation = { @@ -3095,6 +4884,12 @@ def __init__( credentials: Optional["CredentialsBase"] = None, **kwargs ): + """ + :keyword credentials: Credentials to be presented to the endpoint. + :paramtype credentials: ~azure.media.videoanalyzer.edge.models.CredentialsBase + :keyword url: Required. The endpoint URL for Video Analyzer to connect to. + :paramtype url: str + """ super(UnsecuredEndpoint, self).__init__(credentials=credentials, url=url, **kwargs) self.type = '#Microsoft.VideoAnalyzer.UnsecuredEndpoint' # type: str @@ -3104,14 +4899,14 @@ class UsernamePasswordCredentials(CredentialsBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param username: Required. Username to be presented as part of the credentials. - :type username: str - :param password: Required. Password to be presented as part of the credentials. It is + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar username: Required. Username to be presented as part of the credentials. + :vartype username: str + :ivar password: Required. Password to be presented as part of the credentials. It is recommended that this value is parameterized as a secret string in order to prevent this value to be returned as part of the resource on API requests. - :type password: str + :vartype password: str """ _validation = { @@ -3133,6 +4928,14 @@ def __init__( password: str, **kwargs ): + """ + :keyword username: Required. Username to be presented as part of the credentials. + :paramtype username: str + :keyword password: Required. Password to be presented as part of the credentials. It is + recommended that this value is parameterized as a secret string in order to prevent this value + to be returned as part of the resource on API requests. + :paramtype password: str + """ super(UsernamePasswordCredentials, self).__init__(**kwargs) self.type = '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials' # type: str self.username = username @@ -3142,26 +4945,30 @@ def __init__( class VideoCreationProperties(msrest.serialization.Model): """Optional video properties to be used in case a new video resource needs to be created on the service. These will not take effect if the video already exists. - :param title: Optional video title provided by the user. Value can be up to 256 characters - long. - :type title: str - :param description: Optional video description provided by the user. Value can be up to 2048 + :ivar title: Optional video title provided by the user. Value can be up to 256 characters long. + :vartype title: str + :ivar description: Optional video description provided by the user. Value can be up to 2048 characters long. - :type description: str - :param segment_length: Video segment length indicates the length of individual video files + :vartype description: str + :ivar segment_length: Video segment length indicates the length of individual video files (segments) which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the archive playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary between 30 seconds to 5 minutes, in 30 seconds increments. Changing this value after the video is initially created can lead to errors when uploading media to the archive. Default value is 30 seconds. - :type segment_length: str + :vartype segment_length: str + :ivar retention_period: Video retention period indicates how long the video is kept in storage, + and must be a multiple of 1 day. For example, if this is set to 30 days, then content older + than 30 days will be deleted. + :vartype retention_period: str """ _attribute_map = { 'title': {'key': 'title', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, } def __init__( @@ -3170,12 +4977,155 @@ def __init__( title: Optional[str] = None, description: Optional[str] = None, segment_length: Optional[str] = None, + retention_period: Optional[str] = None, **kwargs ): + """ + :keyword title: Optional video title provided by the user. Value can be up to 256 characters + long. + :paramtype title: str + :keyword description: Optional video description provided by the user. Value can be up to 2048 + characters long. + :paramtype description: str + :keyword segment_length: Video segment length indicates the length of individual video files + (segments) which are persisted to storage. Smaller segments provide lower archive playback + latency but generate larger volume of storage transactions. Larger segments reduce the amount + of storage transactions while increasing the archive playback latency. Value must be specified + in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary between 30 seconds to + 5 minutes, in 30 seconds increments. Changing this value after the video is initially created + can lead to errors when uploading media to the archive. Default value is 30 seconds. + :paramtype segment_length: str + :keyword retention_period: Video retention period indicates how long the video is kept in + storage, and must be a multiple of 1 day. For example, if this is set to 30 days, then content + older than 30 days will be deleted. + :paramtype retention_period: str + """ super(VideoCreationProperties, self).__init__(**kwargs) self.title = title self.description = description self.segment_length = segment_length + self.retention_period = retention_period + + +class VideoEncoderConfiguration(msrest.serialization.Model): + """Class representing the MPEG4 Configuration. + + :ivar encoding: The video codec used by the Media Profile. Possible values include: "JPEG", + "H264", "MPEG4". + :vartype encoding: str or ~azure.media.videoanalyzer.edge.models.VideoEncoding + :ivar quality: Relative value representing the quality of the video. + :vartype quality: float + :ivar resolution: The Video Resolution. + :vartype resolution: ~azure.media.videoanalyzer.edge.models.VideoResolution + :ivar rate_control: The Video's rate control. + :vartype rate_control: ~azure.media.videoanalyzer.edge.models.RateControl + :ivar h264: The H264 Configuration. + :vartype h264: ~azure.media.videoanalyzer.edge.models.H264Configuration + :ivar mpeg4: The H264 Configuration. + :vartype mpeg4: ~azure.media.videoanalyzer.edge.models.MPEG4Configuration + """ + + _attribute_map = { + 'encoding': {'key': 'encoding', 'type': 'str'}, + 'quality': {'key': 'quality', 'type': 'float'}, + 'resolution': {'key': 'resolution', 'type': 'VideoResolution'}, + 'rate_control': {'key': 'rateControl', 'type': 'RateControl'}, + 'h264': {'key': 'h264', 'type': 'H264Configuration'}, + 'mpeg4': {'key': 'mpeg4', 'type': 'MPEG4Configuration'}, + } + + def __init__( + self, + *, + encoding: Optional[Union[str, "VideoEncoding"]] = None, + quality: Optional[float] = None, + resolution: Optional["VideoResolution"] = None, + rate_control: Optional["RateControl"] = None, + h264: Optional["H264Configuration"] = None, + mpeg4: Optional["MPEG4Configuration"] = None, + **kwargs + ): + """ + :keyword encoding: The video codec used by the Media Profile. Possible values include: "JPEG", + "H264", "MPEG4". + :paramtype encoding: str or ~azure.media.videoanalyzer.edge.models.VideoEncoding + :keyword quality: Relative value representing the quality of the video. + :paramtype quality: float + :keyword resolution: The Video Resolution. + :paramtype resolution: ~azure.media.videoanalyzer.edge.models.VideoResolution + :keyword rate_control: The Video's rate control. + :paramtype rate_control: ~azure.media.videoanalyzer.edge.models.RateControl + :keyword h264: The H264 Configuration. + :paramtype h264: ~azure.media.videoanalyzer.edge.models.H264Configuration + :keyword mpeg4: The H264 Configuration. + :paramtype mpeg4: ~azure.media.videoanalyzer.edge.models.MPEG4Configuration + """ + super(VideoEncoderConfiguration, self).__init__(**kwargs) + self.encoding = encoding + self.quality = quality + self.resolution = resolution + self.rate_control = rate_control + self.h264 = h264 + self.mpeg4 = mpeg4 + + +class VideoPublishingOptions(msrest.serialization.Model): + """Options for changing video publishing behavior on the video sink and output video. + + :ivar enable_video_preview_image: When set to 'true' the video will publish preview images. + Default is 'false'. + :vartype enable_video_preview_image: str + """ + + _attribute_map = { + 'enable_video_preview_image': {'key': 'enableVideoPreviewImage', 'type': 'str'}, + } + + def __init__( + self, + *, + enable_video_preview_image: Optional[str] = None, + **kwargs + ): + """ + :keyword enable_video_preview_image: When set to 'true' the video will publish preview images. + Default is 'false'. + :paramtype enable_video_preview_image: str + """ + super(VideoPublishingOptions, self).__init__(**kwargs) + self.enable_video_preview_image = enable_video_preview_image + + +class VideoResolution(msrest.serialization.Model): + """The Video resolution. + + :ivar width: The number of columns of the Video image. + :vartype width: float + :ivar height: The number of lines of the Video image. + :vartype height: float + """ + + _attribute_map = { + 'width': {'key': 'width', 'type': 'float'}, + 'height': {'key': 'height', 'type': 'float'}, + } + + def __init__( + self, + *, + width: Optional[float] = None, + height: Optional[float] = None, + **kwargs + ): + """ + :keyword width: The number of columns of the Video image. + :paramtype width: float + :keyword height: The number of lines of the Video image. + :paramtype height: float + """ + super(VideoResolution, self).__init__(**kwargs) + self.width = width + self.height = height class VideoSink(SinkNodeBase): @@ -3183,28 +5133,33 @@ class VideoSink(SinkNodeBase): All required parameters must be populated in order to send to Azure. - :param type: Required. Type discriminator for the derived types.Constant filled by server. - :type type: str - :param name: Required. Node name. Must be unique within the topology. - :type name: str - :param inputs: Required. An array of upstream node references within the topology to be used as + :ivar type: Required. Type discriminator for the derived types.Constant filled by server. + :vartype type: str + :ivar name: Required. Node name. Must be unique within the topology. + :vartype name: str + :ivar inputs: Required. An array of upstream node references within the topology to be used as inputs for this node. - :type inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] - :param video_name: Required. Name of a new or existing Video Analyzer video resource used for + :vartype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :ivar video_name: Required. Name of a new or existing Video Analyzer video resource used for the media recording. - :type video_name: str - :param video_creation_properties: Optional video properties to be used in case a new video + :vartype video_name: str + :ivar video_creation_properties: Optional video properties to be used in case a new video resource needs to be created on the service. - :type video_creation_properties: ~azure.media.videoanalyzer.edge.models.VideoCreationProperties - :param local_media_cache_path: Required. Path to a local file system directory for caching of + :vartype video_creation_properties: + ~azure.media.videoanalyzer.edge.models.VideoCreationProperties + :ivar video_publishing_options: Optional video publishing options to be used for changing + publishing behavior of the output video. + :vartype video_publishing_options: + ~azure.media.videoanalyzer.edge.models.VideoPublishingOptions + :ivar local_media_cache_path: Required. Path to a local file system directory for caching of temporary media files. This will also be used to store content which cannot be immediately uploaded to Azure due to Internet connectivity issues. - :type local_media_cache_path: str - :param local_media_cache_maximum_size_mi_b: Required. Maximum amount of disk space that can be + :vartype local_media_cache_path: str + :ivar local_media_cache_maximum_size_mi_b: Required. Maximum amount of disk space that can be used for caching of temporary media files. Once this limit is reached, the oldest segments of the media archive will be continuously deleted in order to make space for new media, thus leading to gaps in the cloud recorded content. - :type local_media_cache_maximum_size_mi_b: str + :vartype local_media_cache_maximum_size_mi_b: str """ _validation = { @@ -3222,6 +5177,7 @@ class VideoSink(SinkNodeBase): 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, 'video_name': {'key': 'videoName', 'type': 'str'}, 'video_creation_properties': {'key': 'videoCreationProperties', 'type': 'VideoCreationProperties'}, + 'video_publishing_options': {'key': 'videoPublishingOptions', 'type': 'VideoPublishingOptions'}, 'local_media_cache_path': {'key': 'localMediaCachePath', 'type': 'str'}, 'local_media_cache_maximum_size_mi_b': {'key': 'localMediaCacheMaximumSizeMiB', 'type': 'str'}, } @@ -3235,11 +5191,40 @@ def __init__( local_media_cache_path: str, local_media_cache_maximum_size_mi_b: str, video_creation_properties: Optional["VideoCreationProperties"] = None, + video_publishing_options: Optional["VideoPublishingOptions"] = None, **kwargs ): + """ + :keyword name: Required. Node name. Must be unique within the topology. + :paramtype name: str + :keyword inputs: Required. An array of upstream node references within the topology to be used + as inputs for this node. + :paramtype inputs: list[~azure.media.videoanalyzer.edge.models.NodeInput] + :keyword video_name: Required. Name of a new or existing Video Analyzer video resource used for + the media recording. + :paramtype video_name: str + :keyword video_creation_properties: Optional video properties to be used in case a new video + resource needs to be created on the service. + :paramtype video_creation_properties: + ~azure.media.videoanalyzer.edge.models.VideoCreationProperties + :keyword video_publishing_options: Optional video publishing options to be used for changing + publishing behavior of the output video. + :paramtype video_publishing_options: + ~azure.media.videoanalyzer.edge.models.VideoPublishingOptions + :keyword local_media_cache_path: Required. Path to a local file system directory for caching of + temporary media files. This will also be used to store content which cannot be immediately + uploaded to Azure due to Internet connectivity issues. + :paramtype local_media_cache_path: str + :keyword local_media_cache_maximum_size_mi_b: Required. Maximum amount of disk space that can + be used for caching of temporary media files. Once this limit is reached, the oldest segments + of the media archive will be continuously deleted in order to make space for new media, thus + leading to gaps in the cloud recorded content. + :paramtype local_media_cache_maximum_size_mi_b: str + """ super(VideoSink, self).__init__(name=name, inputs=inputs, **kwargs) self.type = '#Microsoft.VideoAnalyzer.VideoSink' # type: str self.video_name = video_name self.video_creation_properties = video_creation_properties + self.video_publishing_options = video_publishing_options self.local_media_cache_path = local_media_cache_path self.local_media_cache_maximum_size_mi_b = local_media_cache_maximum_size_mi_b diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_version.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_version.py index 4dd1b2d847f8..5684f6e3fbce 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_version.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/azure/media/videoanalyzeredge/_version.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0b4" diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/samples/sample_lva.py b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/samples/sample_lva.py index 2ab1f294951a..71a5b419674b 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/samples/sample_lva.py +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/samples/sample_lva.py @@ -6,12 +6,13 @@ from azure.iot.hub.models import CloudToDeviceMethod, CloudToDeviceMethodResult from datetime import time -device_id = "lva-sample-device" -module_d = "mediaEdge" -connection_string = "connectionString" +device_id = os.getenv("iothub_deviceid"); +module_d = os.getenv("iothub_moduleid"); +connection_string = os.getenv("iothub_connectionstring"); live_pipeline_name = "pipelineInstance1" pipeline_topology_name = "pipelineTopology1" -url = "rtsp://sample-url-from-camera" +url = "rtsp://camerasimulator:8554" + def build_pipeline_topology(): pipeline_topology_properties = PipelineTopologyProperties() @@ -19,18 +20,18 @@ def build_pipeline_topology(): user_name_param = ParameterDeclaration(name="rtspUserName",type="String",default="testusername") password_param = ParameterDeclaration(name="rtspPassword",type="SecretString",default="testpassword") url_param = ParameterDeclaration(name="rtspUrl",type="String",default="rtsp://www.sample.com") - hub_param = ParameterDeclaration(name="hubSinkOutputName",type="String") source = RtspSource(name="rtspSource", endpoint=UnsecuredEndpoint(url="${rtspUrl}",credentials=UsernamePasswordCredentials(username="${rtspUserName}",password="${rtspPassword}"))) node = NodeInput(node_name="rtspSource") - sink = IotHubMessageSink("msgSink", node, "${hubSinkOutputName}") - pipeline_topology_properties.parameters = [user_name_param, password_param, url_param, hub_param] + sink = VideoSink(name="videoSink", inputs=[node], video_name="video", local_media_cache_path="/var/lib/videoanalyzer/tmp/", local_media_cache_maximum_size_mi_b="1024"); + pipeline_topology_properties.parameters = [user_name_param, password_param, url_param] pipeline_topology_properties.sources = [source] pipeline_topology_properties.sinks = [sink] pipeline_topology = PipelineTopology(name=pipeline_topology_name,properties=pipeline_topology_properties) return pipeline_topology + def build_live_pipeline(): url_param = ParameterDefinition(name="rtspUrl", value=url) pass_param = ParameterDefinition(name="rtspPassword", value="secret_password") @@ -40,49 +41,93 @@ def build_live_pipeline(): return live_pipeline + def invoke_method_helper(method): direct_method = CloudToDeviceMethod(method_name=method.method_name, payload=method.serialize()) - registry_manager = IoTHubRegistryManager(connection_string) + registry_manager = IoTHubRegistryManager(connection_string=connection_string) - payload = registry_manager.invoke_device_module_method(device_id, module_d, direct_method).payload + payload = registry_manager.invoke_device_module_method(device_id=device_id, module_id=module_d, direct_method_request=direct_method).payload if payload is not None and 'error' in payload: print(payload['error']) return None return payload -def main(): - pipeline_topology = build_pipeline_topology() - live_pipeline = build_live_pipeline() +def create_remote_device_adapter(device_name, iot_device_name): + registry_manager = IoTHubRegistryManager(connection_string=connection_string) try: - set_pipeline_top_response = invoke_method_helper(PipelineTopologySetRequest(pipeline_topology=pipeline_topology)) - print(set_pipeline_top_response) - - list_pipeline_top_response = invoke_method_helper(PipelineTopologyListRequest()) - if list_pipeline_top_response: - list_pipeline_top_result = PipelineTopologyCollection.deserialize(list_pipeline_top_response) + iot_device = registry_manager.get_device(device_id=iot_device_name) + except Exception as ex: + iot_device = registry_manager.create_device_with_certificate_authority(device_id=iot_device_name, status="enabled") + + remote_device_properties = RemoteDeviceAdapterProperties(target=RemoteDeviceAdapterTarget(host="camerasimulator"), iot_hub_device_connection=IotHubDeviceConnection(device_id=iot_device_name,credentials=SymmetricKeyCredentials(key=iot_device.authentication.symmetric_key))) + return RemoteDeviceAdapter(name=device_name, properties=remote_device_properties) + + +def sendPipelineRequests(pipeline_topology, live_pipeline): + set_pipeline_top_response = invoke_method_helper(PipelineTopologySetRequest(pipeline_topology=pipeline_topology)) + if set_pipeline_top_response: + set_pipeline_top_result = PipelineTopology.deserialize((set_pipeline_top_response)) + + list_pipeline_top_response = invoke_method_helper(PipelineTopologyListRequest()) + if list_pipeline_top_response: + list_pipeline_top_result = PipelineTopologyCollection.deserialize(list_pipeline_top_response) + + get_pipeline_top_response = invoke_method_helper(PipelineTopologyGetRequest(name=pipeline_topology_name)) + if get_pipeline_top_response: + get_pipeline_top_result = PipelineTopology.deserialize(get_pipeline_top_response) - get_pipeline_top_response = invoke_method_helper(PipelineTopologyGetRequest(name=pipeline_topology_name)) - if get_pipeline_top_response: - get_pipeline_top_result = PipelineTopology.deserialize(get_pipeline_top_response) + set_live_pipeline_response = invoke_method_helper(LivePipelineSetRequest(live_pipeline=live_pipeline)) - set_live_pipeline_response = invoke_method_helper(LivePipelineSetRequest(live_pipeline=live_pipeline)) + activate_pipeline_response = invoke_method_helper(LivePipelineActivateRequest(name=live_pipeline_name)) - activate_pipeline_response = invoke_method_helper(LivePipelineActivateRequest(name=live_pipeline_name)) + get_pipeline_response = invoke_method_helper(LivePipelineGetRequest(name=live_pipeline_name)) + if get_pipeline_response: + get_pipeline_result = LivePipeline.deserialize(get_pipeline_response) - get_pipeline_response = invoke_method_helper(LivePipelineGetRequest(name=live_pipeline_name)) - if get_pipeline_response: - get_pipeline_result = LivePipeline.deserialize(get_pipeline_response) + deactivate_pipeline_response = invoke_method_helper(LivePipelineDeactivateRequest(name=live_pipeline_name)) - deactivate_pipeline_response = invoke_method_helper(LivePipelineDeactivateRequest(name=live_pipeline_name)) + delete_pipeline_response = invoke_method_helper(LivePipelineDeleteRequest(name=live_pipeline_name)) - delete_pipeline_response = invoke_method_helper(LivePipelineDeleteRequest(name=live_pipeline_name)) + delete_pipeline_response = invoke_method_helper(PipelineTopologyDeleteRequest(name=pipeline_topology_name)) - delete_pipeline_response = invoke_method_helper(PipelineTopologyDeleteRequest(name=pipeline_topology_name)) +def sendDeviceRequests(remote_device_adapter): + remote_device_adapter_set_response = invoke_method_helper( + RemoteDeviceAdapterSetRequest(remote_device_adapter=remote_device_adapter)) + if remote_device_adapter_set_response: + remote_device_adapter_set_result = RemoteDeviceAdapter.deserialize(remote_device_adapter_set_response) + + remote_device_adapter_get_response = invoke_method_helper( + RemoteDeviceAdapterGetRequest(name=remote_device_adapter.name)) + if remote_device_adapter_get_response: + remote_device_adapter_get_result = RemoteDeviceAdapter.deserialize(remote_device_adapter_get_response) + + remote_device_adapter_list_response = invoke_method_helper(RemoteDeviceAdapterListRequest()) + if remote_device_adapter_list_response: + remote_device_adapter_list_result = RemoteDeviceAdapterCollection.deserialize( + remote_device_adapter_list_response) + + remote_device_adapter_delete_response = invoke_method_helper( + RemoteDeviceAdapterDeleteRequest(name=remote_device_adapter.name)) + + onvif_list_response = invoke_method_helper(OnvifDeviceDiscoverRequest()) + + onvif_get_response = invoke_method_helper( + OnvifDeviceGetRequest(endpoint=UnsecuredEndpoint(url="rtsp://camerasimulator:8554"))) + + +def main(): + pipeline_topology = build_pipeline_topology() + live_pipeline = build_live_pipeline() + remote_device_adapter = create_remote_device_adapter(device_name="RemoteDeviceAdapter1", iot_device_name="iotdevicesample1") + try: + sendPipelineRequests(pipeline_topology=pipeline_topology, live_pipeline=live_pipeline) + sendDeviceRequests(remote_device_adapter=remote_device_adapter) except Exception as ex: print(ex) + if __name__ == "__main__": main() \ No newline at end of file diff --git a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/autorest.md b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/autorest.md index a9238e7e0c9f..79a0c25697df 100644 --- a/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/autorest.md +++ b/sdk/videoanalyzer/azure-media-videoanalyzer-edge/swagger/autorest.md @@ -10,7 +10,7 @@ autorest --v3 --python ## Settings ```yaml -require: https://github.com/Azure/azure-rest-api-specs/blob/55b3e2d075398ec62f9322829494ff6a4323e299/specification/videoanalyzer/data-plane/readme.md +require: https://github.com/Azure/azure-rest-api-specs/blob/694fe69245024447f8d3647be1da88e9ad942058/specification/videoanalyzer/data-plane/readme.md output-folder: ../azure/media/videoanalyzeredge/_generated namespace: azure.media.videoanalyzer.edge no-namespace-folders: true diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/CHANGELOG.md b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/CHANGELOG.md index f5aac310c0f8..dc15641ef7f3 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/CHANGELOG.md +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/CHANGELOG.md @@ -1,5 +1,52 @@ # Release History +## 1.0.0b3 (2021-10-25) + +**Features** + + - Model ProxyResource has a new parameter system_data + - Model Resource has a new parameter system_data + - Model TrackedResource has a new parameter system_data + - Model VideoAnalyzerUpdate has a new parameter provisioning_state + - Model VideoAnalyzerUpdate has a new parameter iot_hubs + - Model VideoAnalyzerUpdate has a new parameter network_access_control + - Model VideoAnalyzerUpdate has a new parameter private_endpoint_connections + - Model VideoAnalyzerUpdate has a new parameter public_network_access + - Model VideoAnalyzer has a new parameter provisioning_state + - Model VideoAnalyzer has a new parameter iot_hubs + - Model VideoAnalyzer has a new parameter network_access_control + - Model VideoAnalyzer has a new parameter private_endpoint_connections + - Model VideoAnalyzer has a new parameter public_network_access + - Model VideoEntity has a new parameter archival + - Model VideoEntity has a new parameter content_urls + - Added operation VideoAnalyzersOperations.begin_update + - Added operation VideoAnalyzersOperations.begin_create_or_update + - Added operation VideosOperations.list_content_token + - Added operation group PrivateEndpointConnectionsOperations + - Added operation group PrivateLinkResourcesOperations + - Added operation group OperationStatusesOperations + - Added operation group PipelineJobsOperations + - Added operation group PipelineTopologiesOperations + - Added operation group VideoAnalyzerOperationStatusesOperations + - Added operation group LivePipelineOperationStatusesOperations + - Added operation group LivePipelinesOperations + - Added operation group OperationResultsOperations + - Added operation group PipelineJobOperationStatusesOperations + - Added operation group VideoAnalyzerOperationResultsOperations + +**Breaking changes** + + - Parameter id of model StorageAccount is now required + - Operation EdgeModulesOperations.list has a new signature + - Operation EdgeModulesOperations.list has a new signature + - Model VideoFlags no longer has parameter is_recording + - Model VideoFlags has a new required parameter is_in_use + - Model VideoEntity no longer has parameter streaming + - Removed operation VideoAnalyzersOperations.create_or_update + - Removed operation VideoAnalyzersOperations.update + - Removed operation VideoAnalyzersOperations.sync_storage_keys + - Removed operation VideosOperations.list_streaming_token + ## 1.0.0b2 (2021-05-24) - Update README.md diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/_meta.json b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/_meta.json index 99fe2b92ff5c..4b1621a97952 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/_meta.json +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.3.0", - "use": "@autorest/python@5.6.6", - "commit": "eb9ccccdb6561516fdd75082309877565a303bb7", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "6959ec51046a91ffe26627ba8df2ead27c5ffd46", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/videoanalyzer/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "autorest_command": "autorest specification/videoanalyzer/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/videoanalyzer/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_configuration.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_configuration.py index 5189da18bb31..2bab80227252 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_configuration.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-05-01-preview" + self.api_version = "2021-11-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-videoanalyzer/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_metadata.json b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_metadata.json index 5210ce1facf2..f0468762497e 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_metadata.json +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_metadata.json @@ -1,14 +1,14 @@ { - "chosen_version": "2021-05-01-preview", - "total_api_version_list": ["2021-05-01-preview"], + "chosen_version": "2021-11-01-preview", + "total_api_version_list": ["2021-11-01-preview"], "client": { "name": "VideoAnalyzer", "filename": "_video_analyzer", - "description": "Azure Video Analyzer ARM Client.", + "description": "Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud.", "base_url": "\u0027https://management.azure.com\u0027", "custom_base_url": null, "azure_arm": true, - "has_lro_operations": false, + "has_lro_operations": true, "client_side_validation": false, "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"VideoAnalyzerConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"VideoAnalyzerConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" @@ -98,10 +98,21 @@ "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { + "edge_modules": "EdgeModulesOperations", + "pipeline_topologies": "PipelineTopologiesOperations", + "live_pipelines": "LivePipelinesOperations", + "pipeline_jobs": "PipelineJobsOperations", + "live_pipeline_operation_statuses": "LivePipelineOperationStatusesOperations", + "pipeline_job_operation_statuses": "PipelineJobOperationStatusesOperations", "operations": "Operations", "video_analyzers": "VideoAnalyzersOperations", + "private_link_resources": "PrivateLinkResourcesOperations", + "private_endpoint_connections": "PrivateEndpointConnectionsOperations", + "operation_statuses": "OperationStatusesOperations", + "operation_results": "OperationResultsOperations", + "video_analyzer_operation_statuses": "VideoAnalyzerOperationStatusesOperations", + "video_analyzer_operation_results": "VideoAnalyzerOperationResultsOperations", "locations": "LocationsOperations", - "edge_modules": "EdgeModulesOperations", "videos": "VideosOperations", "access_policies": "AccessPoliciesOperations" } diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_version.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_version.py index dfa6ee022f15..20971492f129 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_version.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0b3" diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_video_analyzer.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_video_analyzer.py index 2a4ed30dd70e..5f81517d5367 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_video_analyzer.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/_video_analyzer.py @@ -19,26 +19,59 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import VideoAnalyzerConfiguration +from .operations import EdgeModulesOperations +from .operations import PipelineTopologiesOperations +from .operations import LivePipelinesOperations +from .operations import PipelineJobsOperations +from .operations import LivePipelineOperationStatusesOperations +from .operations import PipelineJobOperationStatusesOperations from .operations import Operations from .operations import VideoAnalyzersOperations +from .operations import PrivateLinkResourcesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import OperationStatusesOperations +from .operations import OperationResultsOperations +from .operations import VideoAnalyzerOperationStatusesOperations +from .operations import VideoAnalyzerOperationResultsOperations from .operations import LocationsOperations -from .operations import EdgeModulesOperations from .operations import VideosOperations from .operations import AccessPoliciesOperations from . import models class VideoAnalyzer(object): - """Azure Video Analyzer ARM Client. + """Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. + :ivar edge_modules: EdgeModulesOperations operations + :vartype edge_modules: video_analyzer.operations.EdgeModulesOperations + :ivar pipeline_topologies: PipelineTopologiesOperations operations + :vartype pipeline_topologies: video_analyzer.operations.PipelineTopologiesOperations + :ivar live_pipelines: LivePipelinesOperations operations + :vartype live_pipelines: video_analyzer.operations.LivePipelinesOperations + :ivar pipeline_jobs: PipelineJobsOperations operations + :vartype pipeline_jobs: video_analyzer.operations.PipelineJobsOperations + :ivar live_pipeline_operation_statuses: LivePipelineOperationStatusesOperations operations + :vartype live_pipeline_operation_statuses: video_analyzer.operations.LivePipelineOperationStatusesOperations + :ivar pipeline_job_operation_statuses: PipelineJobOperationStatusesOperations operations + :vartype pipeline_job_operation_statuses: video_analyzer.operations.PipelineJobOperationStatusesOperations :ivar operations: Operations operations :vartype operations: video_analyzer.operations.Operations :ivar video_analyzers: VideoAnalyzersOperations operations :vartype video_analyzers: video_analyzer.operations.VideoAnalyzersOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: video_analyzer.operations.PrivateLinkResourcesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: video_analyzer.operations.PrivateEndpointConnectionsOperations + :ivar operation_statuses: OperationStatusesOperations operations + :vartype operation_statuses: video_analyzer.operations.OperationStatusesOperations + :ivar operation_results: OperationResultsOperations operations + :vartype operation_results: video_analyzer.operations.OperationResultsOperations + :ivar video_analyzer_operation_statuses: VideoAnalyzerOperationStatusesOperations operations + :vartype video_analyzer_operation_statuses: video_analyzer.operations.VideoAnalyzerOperationStatusesOperations + :ivar video_analyzer_operation_results: VideoAnalyzerOperationResultsOperations operations + :vartype video_analyzer_operation_results: video_analyzer.operations.VideoAnalyzerOperationResultsOperations :ivar locations: LocationsOperations operations :vartype locations: video_analyzer.operations.LocationsOperations - :ivar edge_modules: EdgeModulesOperations operations - :vartype edge_modules: video_analyzer.operations.EdgeModulesOperations :ivar videos: VideosOperations operations :vartype videos: video_analyzer.operations.VideosOperations :ivar access_policies: AccessPoliciesOperations operations @@ -48,6 +81,7 @@ class VideoAnalyzer(object): :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( @@ -68,13 +102,35 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self.edge_modules = EdgeModulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.pipeline_topologies = PipelineTopologiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.live_pipelines = LivePipelinesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.pipeline_jobs = PipelineJobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.live_pipeline_operation_statuses = LivePipelineOperationStatusesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.pipeline_job_operation_statuses = PipelineJobOperationStatusesOperations( + self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) self.video_analyzers = VideoAnalyzersOperations( self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations( + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) - self.edge_modules = EdgeModulesOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_statuses = OperationStatusesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_results = OperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.video_analyzer_operation_statuses = VideoAnalyzerOperationStatusesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.video_analyzer_operation_results = VideoAnalyzerOperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.locations = LocationsOperations( self._client, self._config, self._serialize, self._deserialize) self.videos = VideosOperations( self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_configuration.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_configuration.py index 463b9ec5754d..38c602c95f7f 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_configuration.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-05-01-preview" + self.api_version = "2021-11-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-videoanalyzer/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_video_analyzer.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_video_analyzer.py index 879877551fef..6c943e0ea78d 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_video_analyzer.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/_video_analyzer.py @@ -17,26 +17,59 @@ from azure.core.credentials_async import AsyncTokenCredential from ._configuration import VideoAnalyzerConfiguration +from .operations import EdgeModulesOperations +from .operations import PipelineTopologiesOperations +from .operations import LivePipelinesOperations +from .operations import PipelineJobsOperations +from .operations import LivePipelineOperationStatusesOperations +from .operations import PipelineJobOperationStatusesOperations from .operations import Operations from .operations import VideoAnalyzersOperations +from .operations import PrivateLinkResourcesOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import OperationStatusesOperations +from .operations import OperationResultsOperations +from .operations import VideoAnalyzerOperationStatusesOperations +from .operations import VideoAnalyzerOperationResultsOperations from .operations import LocationsOperations -from .operations import EdgeModulesOperations from .operations import VideosOperations from .operations import AccessPoliciesOperations from .. import models class VideoAnalyzer(object): - """Azure Video Analyzer ARM Client. + """Azure Video Analyzer provides a platform for you to build intelligent video applications that span the edge and the cloud. + :ivar edge_modules: EdgeModulesOperations operations + :vartype edge_modules: video_analyzer.aio.operations.EdgeModulesOperations + :ivar pipeline_topologies: PipelineTopologiesOperations operations + :vartype pipeline_topologies: video_analyzer.aio.operations.PipelineTopologiesOperations + :ivar live_pipelines: LivePipelinesOperations operations + :vartype live_pipelines: video_analyzer.aio.operations.LivePipelinesOperations + :ivar pipeline_jobs: PipelineJobsOperations operations + :vartype pipeline_jobs: video_analyzer.aio.operations.PipelineJobsOperations + :ivar live_pipeline_operation_statuses: LivePipelineOperationStatusesOperations operations + :vartype live_pipeline_operation_statuses: video_analyzer.aio.operations.LivePipelineOperationStatusesOperations + :ivar pipeline_job_operation_statuses: PipelineJobOperationStatusesOperations operations + :vartype pipeline_job_operation_statuses: video_analyzer.aio.operations.PipelineJobOperationStatusesOperations :ivar operations: Operations operations :vartype operations: video_analyzer.aio.operations.Operations :ivar video_analyzers: VideoAnalyzersOperations operations :vartype video_analyzers: video_analyzer.aio.operations.VideoAnalyzersOperations + :ivar private_link_resources: PrivateLinkResourcesOperations operations + :vartype private_link_resources: video_analyzer.aio.operations.PrivateLinkResourcesOperations + :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations + :vartype private_endpoint_connections: video_analyzer.aio.operations.PrivateEndpointConnectionsOperations + :ivar operation_statuses: OperationStatusesOperations operations + :vartype operation_statuses: video_analyzer.aio.operations.OperationStatusesOperations + :ivar operation_results: OperationResultsOperations operations + :vartype operation_results: video_analyzer.aio.operations.OperationResultsOperations + :ivar video_analyzer_operation_statuses: VideoAnalyzerOperationStatusesOperations operations + :vartype video_analyzer_operation_statuses: video_analyzer.aio.operations.VideoAnalyzerOperationStatusesOperations + :ivar video_analyzer_operation_results: VideoAnalyzerOperationResultsOperations operations + :vartype video_analyzer_operation_results: video_analyzer.aio.operations.VideoAnalyzerOperationResultsOperations :ivar locations: LocationsOperations operations :vartype locations: video_analyzer.aio.operations.LocationsOperations - :ivar edge_modules: EdgeModulesOperations operations - :vartype edge_modules: video_analyzer.aio.operations.EdgeModulesOperations :ivar videos: VideosOperations operations :vartype videos: video_analyzer.aio.operations.VideosOperations :ivar access_policies: AccessPoliciesOperations operations @@ -46,6 +79,7 @@ class VideoAnalyzer(object): :param subscription_id: The ID of the target subscription. :type subscription_id: str :param str base_url: Service URL + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. """ def __init__( @@ -65,13 +99,35 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self.edge_modules = EdgeModulesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.pipeline_topologies = PipelineTopologiesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.live_pipelines = LivePipelinesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.pipeline_jobs = PipelineJobsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.live_pipeline_operation_statuses = LivePipelineOperationStatusesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.pipeline_job_operation_statuses = PipelineJobOperationStatusesOperations( + self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) self.video_analyzers = VideoAnalyzersOperations( self._client, self._config, self._serialize, self._deserialize) - self.locations = LocationsOperations( + self.private_link_resources = PrivateLinkResourcesOperations( self._client, self._config, self._serialize, self._deserialize) - self.edge_modules = EdgeModulesOperations( + self.private_endpoint_connections = PrivateEndpointConnectionsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_statuses = OperationStatusesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.operation_results = OperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.video_analyzer_operation_statuses = VideoAnalyzerOperationStatusesOperations( + self._client, self._config, self._serialize, self._deserialize) + self.video_analyzer_operation_results = VideoAnalyzerOperationResultsOperations( + self._client, self._config, self._serialize, self._deserialize) + self.locations = LocationsOperations( self._client, self._config, self._serialize, self._deserialize) self.videos = VideosOperations( self._client, self._config, self._serialize, self._deserialize) diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/__init__.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/__init__.py index 1ee2a23110a0..62393a002a63 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/__init__.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/__init__.py @@ -6,18 +6,40 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._edge_modules_operations import EdgeModulesOperations +from ._pipeline_topologies_operations import PipelineTopologiesOperations +from ._live_pipelines_operations import LivePipelinesOperations +from ._pipeline_jobs_operations import PipelineJobsOperations +from ._live_pipeline_operation_statuses_operations import LivePipelineOperationStatusesOperations +from ._pipeline_job_operation_statuses_operations import PipelineJobOperationStatusesOperations from ._operations import Operations from ._video_analyzers_operations import VideoAnalyzersOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._operation_statuses_operations import OperationStatusesOperations +from ._operation_results_operations import OperationResultsOperations +from ._video_analyzer_operation_statuses_operations import VideoAnalyzerOperationStatusesOperations +from ._video_analyzer_operation_results_operations import VideoAnalyzerOperationResultsOperations from ._locations_operations import LocationsOperations -from ._edge_modules_operations import EdgeModulesOperations from ._videos_operations import VideosOperations from ._access_policies_operations import AccessPoliciesOperations __all__ = [ + 'EdgeModulesOperations', + 'PipelineTopologiesOperations', + 'LivePipelinesOperations', + 'PipelineJobsOperations', + 'LivePipelineOperationStatusesOperations', + 'PipelineJobOperationStatusesOperations', 'Operations', 'VideoAnalyzersOperations', + 'PrivateLinkResourcesOperations', + 'PrivateEndpointConnectionsOperations', + 'OperationStatusesOperations', + 'OperationResultsOperations', + 'VideoAnalyzerOperationStatusesOperations', + 'VideoAnalyzerOperationResultsOperations', 'LocationsOperations', - 'EdgeModulesOperations', 'VideosOperations', 'AccessPoliciesOperations', ] diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_access_policies_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_access_policies_operations.py index 41824113eb94..919cb8290d9b 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_access_policies_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_access_policies_operations.py @@ -46,11 +46,11 @@ def list( resource_group_name: str, account_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AccessPolicyEntityCollection"]: - """List access policy resources. + """List all existing access policy resources. - List all existing access policy resources for the specified account. + Retrieves all existing access policy resources, along with their JSON representations. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -70,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -83,7 +83,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -130,17 +130,17 @@ async def get( resource_group_name: str, account_name: str, access_policy_name: str, - **kwargs + **kwargs: Any ) -> "_models.AccessPolicyEntity": - """Retrieves an access policy resource. + """Retrieves an existing access policy resource. - Retrieves an existing access policy resource from an account by name. + Retrieves an existing access policy resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param access_policy_name: The name of the access policy to retrieve. + :param access_policy_name: The Access Policy name. :type access_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AccessPolicyEntity, or the result of cls(response) @@ -152,14 +152,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), } @@ -196,17 +196,17 @@ async def create_or_update( account_name: str, access_policy_name: str, parameters: "_models.AccessPolicyEntity", - **kwargs + **kwargs: Any ) -> "_models.AccessPolicyEntity": - """Creates or updates an access policy. + """Creates a new access policy resource or updates an existing one. - Creates a new access policy resource or updates an existing one. + Creates a new access policy resource or updates an existing one with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param access_policy_name: The name of the access policy to create or update. + :param access_policy_name: The Access Policy name. :type access_policy_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.AccessPolicyEntity @@ -220,7 +220,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -228,7 +228,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), } @@ -272,17 +272,17 @@ async def delete( resource_group_name: str, account_name: str, access_policy_name: str, - **kwargs + **kwargs: Any ) -> None: - """Deletes an access policy. + """Deletes an existing access policy resource. - Deletes an existing access policy resource. + Deletes an existing access policy resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param access_policy_name: The name of the access policy to delete. + :param access_policy_name: The Access Policy name. :type access_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -294,14 +294,14 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), } @@ -335,17 +335,17 @@ async def update( account_name: str, access_policy_name: str, parameters: "_models.AccessPolicyEntity", - **kwargs + **kwargs: Any ) -> "_models.AccessPolicyEntity": - """Updates an existing access policy. + """Updates individual properties of an existing access policy resource. - Updates individual properties of an existing access policy resource. + Updates individual properties of an existing access policy resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param access_policy_name: The name of the access policy to update. + :param access_policy_name: The Access Policy name. :type access_policy_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.AccessPolicyEntity @@ -359,7 +359,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -367,7 +367,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), } diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_edge_modules_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_edge_modules_operations.py index 640fedb98d67..903012e62088 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_edge_modules_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_edge_modules_operations.py @@ -45,27 +45,21 @@ def list( self, resource_group_name: str, account_name: str, - filter: Optional[str] = None, top: Optional[int] = None, - orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.EdgeModuleEntityCollection"]: - """List edge module resources. + """List all existing edge module resources. - List all of the existing edge module resources for a given Video Analyzer account. + List all existing edge module resources, along with their JSON representations. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param filter: Restricts the set of items returned. - :type filter: str :param top: Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. :type top: int - :param orderby: Specifies the key by which the result collection should be ordered. - :type orderby: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either EdgeModuleEntityCollection or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.EdgeModuleEntityCollection] @@ -76,7 +70,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -89,19 +83,15 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') request = self._client.get(url, query_parameters, header_parameters) else: @@ -140,17 +130,17 @@ async def get( resource_group_name: str, account_name: str, edge_module_name: str, - **kwargs + **kwargs: Any ) -> "_models.EdgeModuleEntity": """Retrieves an existing edge module resource. - Retrieves a specific existing edge module resource in the given Video Analyzer account. + Retrieves an existing edge module resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param edge_module_name: The name of the edge module to retrieve. + :param edge_module_name: The Edge Module name. :type edge_module_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: EdgeModuleEntity, or the result of cls(response) @@ -162,14 +152,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), } @@ -206,7 +196,7 @@ async def create_or_update( account_name: str, edge_module_name: str, parameters: "_models.EdgeModuleEntity", - **kwargs + **kwargs: Any ) -> "_models.EdgeModuleEntity": """Creates a new edge module or updates an existing one. @@ -222,7 +212,7 @@ async def create_or_update( :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param edge_module_name: The name of the edge module to create or update. + :param edge_module_name: The Edge Module name. :type edge_module_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.EdgeModuleEntity @@ -236,7 +226,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -244,7 +234,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), } @@ -288,7 +278,7 @@ async def delete( resource_group_name: str, account_name: str, edge_module_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes an existing edge module resource. @@ -300,7 +290,7 @@ async def delete( :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param edge_module_name: The name of the edge module to be deleted. + :param edge_module_name: The Edge Module name. :type edge_module_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -312,14 +302,14 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), } @@ -353,7 +343,7 @@ async def list_provisioning_token( account_name: str, edge_module_name: str, parameters: "_models.ListProvisioningTokenInput", - **kwargs + **kwargs: Any ) -> "_models.EdgeModuleProvisioningToken": """Creates a new provisioning token. @@ -369,7 +359,7 @@ async def list_provisioning_token( :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param edge_module_name: The name of the edge module used to create a new provisioning token. + :param edge_module_name: The Edge Module name. :type edge_module_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.ListProvisioningTokenInput @@ -383,7 +373,7 @@ async def list_provisioning_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -391,7 +381,7 @@ async def list_provisioning_token( url = self.list_provisioning_token.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), } diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py new file mode 100644 index 000000000000..0bc9c78b712d --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipeline_operation_statuses_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class LivePipelineOperationStatusesOperations: + """LivePipelineOperationStatusesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + live_pipeline_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.LivePipelineOperationStatus": + """Get the operation status. + + Get the operation status of a live pipeline. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :param operation_id: The operation ID. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LivePipelineOperationStatus, or the result of cls(response) + :rtype: ~video_analyzer.models.LivePipelineOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipelineOperationStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LivePipelineOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/operationStatuses/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipelines_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipelines_operations.py new file mode 100644 index 000000000000..62e6a76d6e6d --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_live_pipelines_operations.py @@ -0,0 +1,650 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class LivePipelinesOperations: + """LivePipelinesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + account_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.LivePipelineCollection"]: + """Retrieves a list of live pipelines. + + Retrieves a list of live pipelines that have been created, along with their JSON + representations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param filter: Restricts the set of items returned. + :type filter: str + :param top: Specifies a non-negative integer n that limits the number of items returned from a + collection. The service returns the number of available items up to but not greater than the + specified value n. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LivePipelineCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.LivePipelineCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipelineCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('LivePipelineCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + live_pipeline_name: str, + **kwargs: Any + ) -> "_models.LivePipeline": + """Retrieves a specific live pipeline by name. + + Retrieves a specific live pipeline by name. If a live pipeline with that name has been + previously created, the call will return the JSON representation of that instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LivePipeline, or the result of cls(response) + :rtype: ~video_analyzer.models.LivePipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LivePipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + account_name: str, + live_pipeline_name: str, + parameters: "_models.LivePipeline", + **kwargs: Any + ) -> "_models.LivePipeline": + """Creates or updates a live pipeline. + + Creates a new live pipeline or updates an existing one, with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.LivePipeline + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LivePipeline, or the result of cls(response) + :rtype: ~video_analyzer.models.LivePipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'LivePipeline') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('LivePipeline', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('LivePipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + account_name: str, + live_pipeline_name: str, + **kwargs: Any + ) -> None: + """Deletes a live pipeline. + + Deletes a live pipeline with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + account_name: str, + live_pipeline_name: str, + parameters: "_models.LivePipelineUpdate", + **kwargs: Any + ) -> "_models.LivePipeline": + """Updates an existing live pipeline. + + Updates an existing live pipeline with the given name. Properties that can be updated include: + description, bitrateKbps, and parameter definitions. Only the description can be updated while + the live pipeline is active. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.LivePipelineUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LivePipeline, or the result of cls(response) + :rtype: ~video_analyzer.models.LivePipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'LivePipelineUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LivePipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + async def _activate_initial( + self, + resource_group_name: str, + account_name: str, + live_pipeline_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self._activate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _activate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate'} # type: ignore + + async def begin_activate( + self, + resource_group_name: str, + account_name: str, + live_pipeline_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Activates a live pipeline. + + Activates a live pipeline with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._activate_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_pipeline_name=live_pipeline_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_activate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate'} # type: ignore + + async def _deactivate_initial( + self, + resource_group_name: str, + account_name: str, + live_pipeline_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self._deactivate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _deactivate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate'} # type: ignore + + async def begin_deactivate( + self, + resource_group_name: str, + account_name: str, + live_pipeline_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Deactivates a live pipeline. + + Deactivates a live pipeline with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._deactivate_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_pipeline_name=live_pipeline_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_deactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_locations_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_locations_operations.py index 725f6840db0b..14693f0b4139 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_locations_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_locations_operations.py @@ -44,13 +44,13 @@ async def check_name_availability( self, location_name: str, parameters: "_models.CheckNameAvailabilityRequest", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityResponse": """Check Name Availability. Checks whether the Video Analyzer resource name is available. - :param location_name: The name of the location. + :param location_name: Location Name. :type location_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.CheckNameAvailabilityRequest @@ -64,7 +64,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_results_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_results_operations.py new file mode 100644 index 000000000000..c5156f79a9bc --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_results_operations.py @@ -0,0 +1,112 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationResultsOperations: + """OperationResultsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + name: str, + operation_id: str, + **kwargs: Any + ) -> Optional["_models.PrivateEndpointConnection"]: + """Get operation result. + + Get private endpoint connection operation result. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateEndpointConnection or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationResults/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_statuses_operations.py new file mode 100644 index 000000000000..5e58c11175ea --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operation_statuses_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OperationStatusesOperations: + """OperationStatusesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.VideoAnalyzerPrivateEndpointConnectionOperationStatus": + """Get operation status. + + Get private endpoint connection operation status. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VideoAnalyzerPrivateEndpointConnectionOperationStatus, or the result of cls(response) + :rtype: ~video_analyzer.models.VideoAnalyzerPrivateEndpointConnectionOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerPrivateEndpointConnectionOperationStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VideoAnalyzerPrivateEndpointConnectionOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationStatuses/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operations.py index 1e62411a0a0d..a832bb39898d 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_operations.py @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, - **kwargs + **kwargs: Any ) -> "_models.OperationCollection": """List Operations. @@ -58,7 +58,7 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_job_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_job_operation_statuses_operations.py new file mode 100644 index 000000000000..8709efef2199 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_job_operation_statuses_operations.py @@ -0,0 +1,110 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PipelineJobOperationStatusesOperations: + """PipelineJobOperationStatusesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + resource_group_name: str, + account_name: str, + pipeline_job_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.PipelineJobOperationStatus": + """Get the operation statuses. + + Get the operation status of a pipeline job with the given operationId. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :param operation_id: The operation ID. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineJobOperationStatus, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineJobOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJobOperationStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineJobOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/operationStatuses/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_jobs_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_jobs_operations.py new file mode 100644 index 000000000000..516fa720eb04 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_jobs_operations.py @@ -0,0 +1,531 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PipelineJobsOperations: + """PipelineJobsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + account_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.PipelineJobCollection"]: + """Retrieves a list of pipeline jobs. + + Retrieves a list of all live pipelines that have been created, along with their JSON + representations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param filter: Restricts the set of items returned. + :type filter: str + :param top: Specifies a non-negative integer n that limits the number of items returned from a + collection. The service returns the number of available items up to but not greater than the + specified value n. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PipelineJobCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.PipelineJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PipelineJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + pipeline_job_name: str, + **kwargs: Any + ) -> "_models.PipelineJob": + """Gets a specific pipeline job by name. + + Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously + created, the call will return the JSON representation of that instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineJob, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + account_name: str, + pipeline_job_name: str, + parameters: "_models.PipelineJob", + **kwargs: Any + ) -> "_models.PipelineJob": + """Creates or updates a pipeline job. + + Creates a new pipeline job or updates an existing one, with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PipelineJob + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineJob, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PipelineJob') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PipelineJob', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PipelineJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + account_name: str, + pipeline_job_name: str, + **kwargs: Any + ) -> None: + """Deletes a pipeline job. + + Deletes a pipeline job with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + account_name: str, + pipeline_job_name: str, + parameters: "_models.PipelineJobUpdate", + **kwargs: Any + ) -> "_models.PipelineJob": + """Updates an existing pipeline job. + + Updates an existing pipeline job with the given name. Properties that can be updated include: + description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PipelineJobUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineJob, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PipelineJobUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + async def _cancel_initial( + self, + resource_group_name: str, + account_name: str, + pipeline_job_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self._cancel_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel'} # type: ignore + + async def begin_cancel( + self, + resource_group_name: str, + account_name: str, + pipeline_job_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Cancels a pipeline job. + + Cancels a pipeline job with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._cancel_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pipeline_job_name=pipeline_job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_topologies_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_topologies_operations.py new file mode 100644 index 000000000000..f98c82443f10 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_pipeline_topologies_operations.py @@ -0,0 +1,417 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PipelineTopologiesOperations: + """PipelineTopologiesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + account_name: str, + filter: Optional[str] = None, + top: Optional[int] = None, + **kwargs: Any + ) -> AsyncIterable["_models.PipelineTopologyCollection"]: + """Retrieves a list of pipeline topologies. + + Retrieves a list of pipeline topologies that have been added to the account, if any, along with + their JSON representation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param filter: Restricts the set of items returned. + :type filter: str + :param top: Specifies a non-negative integer n that limits the number of items returned from a + collection. The service returns the number of available items up to but not greater than the + specified value n. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PipelineTopologyCollection or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~video_analyzer.models.PipelineTopologyCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopologyCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('PipelineTopologyCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + pipeline_topology_name: str, + **kwargs: Any + ) -> "_models.PipelineTopology": + """Retrieves a specific pipeline topology by name. + + Retrieves a specific pipeline topology by name. If a topology with that name has been + previously created, the call will return the JSON representation of that topology. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_topology_name: Pipeline topology unique identifier. + :type pipeline_topology_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineTopology, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineTopology + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineTopology', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + account_name: str, + pipeline_topology_name: str, + parameters: "_models.PipelineTopology", + **kwargs: Any + ) -> "_models.PipelineTopology": + """Creates or updates a pipeline topology. + + Creates a new pipeline topology or updates an existing one, with the given name. A pipeline + topology describes the processing steps to be applied when processing content for a particular + outcome. The topology should be defined according to the scenario to be achieved and can be + reused across many pipeline instances which share the same processing characteristics. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_topology_name: Pipeline topology unique identifier. + :type pipeline_topology_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PipelineTopology + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineTopology, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineTopology + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PipelineTopology') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PipelineTopology', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PipelineTopology', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + account_name: str, + pipeline_topology_name: str, + **kwargs: Any + ) -> None: + """Deletes a pipeline topology. + + Deletes a pipeline topology with the given name. This method should be called after all + instances of the topology have been stopped and deleted. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_topology_name: Pipeline topology unique identifier. + :type pipeline_topology_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + async def update( + self, + resource_group_name: str, + account_name: str, + pipeline_topology_name: str, + parameters: "_models.PipelineTopologyUpdate", + **kwargs: Any + ) -> "_models.PipelineTopology": + """Updates an existing pipeline topology. + + Updates an existing pipeline topology with the given name. If the associated live pipelines or + pipeline jobs are in active or processing state, respectively, then only the description can be + updated. Else, the properties that can be updated include: description, parameter declarations, + sources, processors, and sinks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_topology_name: Pipeline topology unique identifier. + :type pipeline_topology_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PipelineTopologyUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineTopology, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineTopology + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PipelineTopologyUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineTopology', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_endpoint_connections_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..525355f49003 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,306 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations: + """PrivateEndpointConnectionsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnectionListResult": + """Get all private endpoint connections. + + Get all private endpoint connections under video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + name: str, + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Get private endpoint connection. + + Get private endpoint connection under video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore + + async def create_or_update( + self, + resource_group_name: str, + account_name: str, + name: str, + parameters: "_models.PrivateEndpointConnection", + **kwargs: Any + ) -> "_models.PrivateEndpointConnection": + """Update private endpoint connection. + + Update private endpoint connection state under video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore + + async def delete( + self, + resource_group_name: str, + account_name: str, + name: str, + **kwargs: Any + ) -> None: + """Delete private endpoint connection. + + Delete private endpoint connection under video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_link_resources_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..c8c38a4a8f15 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_private_link_resources_operations.py @@ -0,0 +1,167 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations: + """PrivateLinkResourcesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list( + self, + resource_group_name: str, + account_name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResourceListResult": + """Get list of group IDs. + + Get list of group IDs for video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources'} # type: ignore + + async def get( + self, + resource_group_name: str, + account_name: str, + name: str, + **kwargs: Any + ) -> "_models.PrivateLinkResource": + """Get group ID. + + Get group ID for video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Name of the private link resource (Group ID). + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources/{name}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_results_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_results_operations.py new file mode 100644 index 000000000000..423a0915794b --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_results_operations.py @@ -0,0 +1,104 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VideoAnalyzerOperationResultsOperations: + """VideoAnalyzerOperationResultsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + location_name: str, + operation_id: str, + **kwargs: Any + ) -> Optional["_models.VideoAnalyzer"]: + """Get operation result. + + Get video analyzer operation result. + + :param location_name: Location name. + :type location_name: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VideoAnalyzer, or the result of cls(response) + :rtype: ~video_analyzer.models.VideoAnalyzer or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VideoAnalyzer"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationResults/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_statuses_operations.py new file mode 100644 index 000000000000..c4b276f70f37 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzer_operation_statuses_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. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class VideoAnalyzerOperationStatusesOperations: + """VideoAnalyzerOperationStatusesOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def get( + self, + location_name: str, + operation_id: str, + **kwargs: Any + ) -> "_models.VideoAnalyzerOperationStatus": + """Get operation status. + + Get video analyzer operation status. + + :param location_name: Location name. + :type location_name: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VideoAnalyzerOperationStatus, or the result of cls(response) + :rtype: ~video_analyzer.models.VideoAnalyzerOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerOperationStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VideoAnalyzerOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationStatuses/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzers_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzers_operations.py index 59270599e4aa..9381a44dd49c 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzers_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_video_analyzers_operations.py @@ -11,7 +11,9 @@ from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling from ... import models as _models @@ -43,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def list( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.VideoAnalyzerCollection": """List Video Analyzer accounts. @@ -61,14 +63,14 @@ async def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -101,7 +103,7 @@ async def get( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> "_models.VideoAnalyzer": """Get a Video Analyzer account. @@ -121,14 +123,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -158,42 +160,27 @@ async def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore - async def create_or_update( + async def _create_or_update_initial( self, resource_group_name: str, account_name: str, parameters: "_models.VideoAnalyzer", - **kwargs + **kwargs: Any ) -> "_models.VideoAnalyzer": - """Create or update a Video Analyzer account. - - Create or update an instance of a Video Analyzer account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param account_name: The Video Analyzer account name. - :type account_name: str - :param parameters: The request parameters. - :type parameters: ~video_analyzer.models.VideoAnalyzer - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VideoAnalyzer, or the result of cls(response) - :rtype: ~video_analyzer.models.VideoAnalyzer - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -219,23 +206,100 @@ async def create_or_update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('VideoAnalyzer', pipeline_response) if response.status_code == 201: + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) deserialized = self._deserialize('VideoAnalyzer', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + async def begin_create_or_update( + self, + resource_group_name: str, + account_name: str, + parameters: "_models.VideoAnalyzer", + **kwargs: Any + ) -> AsyncLROPoller["_models.VideoAnalyzer"]: + """Create or update a Video Analyzer account. + + Create or update an instance of a Video Analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.VideoAnalyzer + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VideoAnalyzer or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~video_analyzer.models.VideoAnalyzer] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore async def delete( self, resource_group_name: str, account_name: str, - **kwargs + **kwargs: Any ) -> None: """Delete a Video Analyzer account. @@ -255,14 +319,14 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -289,42 +353,27 @@ async def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore - async def update( + async def _update_initial( self, resource_group_name: str, account_name: str, parameters: "_models.VideoAnalyzerUpdate", - **kwargs + **kwargs: Any ) -> "_models.VideoAnalyzer": - """Update a Video Analyzer account. - - Updates an existing instance of Video Analyzer account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param account_name: The Video Analyzer account name. - :type account_name: str - :param parameters: The request parameters. - :type parameters: ~video_analyzer.models.VideoAnalyzerUpdate - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VideoAnalyzer, or the result of cls(response) - :rtype: ~video_analyzer.models.VideoAnalyzer - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -345,93 +394,108 @@ async def update( pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) deserialized = self._deserialize('VideoAnalyzer', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore - async def sync_storage_keys( + async def begin_update( self, resource_group_name: str, account_name: str, - parameters: "_models.SyncStorageKeysInput", - **kwargs - ) -> None: - """Synchronizes Storage Account Keys. + parameters: "_models.VideoAnalyzerUpdate", + **kwargs: Any + ) -> AsyncLROPoller["_models.VideoAnalyzer"]: + """Update a Video Analyzer account. - Synchronizes storage account keys for a storage account associated with the Video Analyzer - account. + Updates an existing instance of Video Analyzer account. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Video Analyzer account name. :type account_name: str :param parameters: The request parameters. - :type parameters: ~video_analyzer.models.SyncStorageKeysInput + :type parameters: ~video_analyzer.models.VideoAnalyzerUpdate :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either VideoAnalyzer or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~video_analyzer.models.VideoAnalyzer] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized - # Construct URL - url = self.sync_storage_keys.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SyncStorageKeysInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - sync_storage_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/syncStorageKeys'} # type: ignore + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore async def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> "_models.VideoAnalyzerCollection": """List Video Analyzer accounts. - Lists the Video Analyzer accounts in the specific subscription. + List all Video Analyzer accounts in the specified subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: VideoAnalyzerCollection, or the result of cls(response) @@ -443,7 +507,7 @@ async def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_videos_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_videos_operations.py index 042b77432ff6..5c2b6b7bf85a 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_videos_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/aio/operations/_videos_operations.py @@ -46,11 +46,12 @@ def list( resource_group_name: str, account_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VideoEntityCollection"]: - """List all existing video resources. + """Retrieves all existing video resources. - List all existing video resources in the specified account. + Retrieves a list of video resources that have been created, along with their JSON + representations. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -70,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -83,7 +84,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -130,17 +131,17 @@ async def get( resource_group_name: str, account_name: str, video_name: str, - **kwargs + **kwargs: Any ) -> "_models.VideoEntity": - """Retrieves a video resource. + """Retrieves an existing video resource. - Retrieves an existing video resource within an account with a given name. + Retrieves an existing video resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to retrieve. + :param video_name: The Video name. :type video_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VideoEntity, or the result of cls(response) @@ -152,14 +153,14 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -196,17 +197,17 @@ async def create_or_update( account_name: str, video_name: str, parameters: "_models.VideoEntity", - **kwargs + **kwargs: Any ) -> "_models.VideoEntity": - """Create or updates a video resource. + """Creates a new video resource or updates an existing one. - Creates a new video resource or updates an existing one in an account. + Creates a new video resource or updates an existing video resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to create or update. + :param video_name: The Video name. :type video_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.VideoEntity @@ -220,7 +221,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -228,7 +229,7 @@ async def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -272,9 +273,9 @@ async def delete( resource_group_name: str, account_name: str, video_name: str, - **kwargs + **kwargs: Any ) -> None: - """Deletes a video resource. + """Deletes an existing video resource and its underlying data. Deletes an existing video resource and its underlying data. This operation is irreversible. @@ -282,7 +283,7 @@ async def delete( :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to delete. + :param video_name: The Video name. :type video_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -294,14 +295,14 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -335,17 +336,17 @@ async def update( account_name: str, video_name: str, parameters: "_models.VideoEntity", - **kwargs + **kwargs: Any ) -> "_models.VideoEntity": - """Updates the properties of a video resource. + """Updates individual properties of an existing video resource. - Updates individual properties of an existing video resource. + Updates individual properties of an existing video resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to update. + :param video_name: The Video name. :type video_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.VideoEntity @@ -359,7 +360,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -367,7 +368,7 @@ async def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -402,41 +403,42 @@ async def update( return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore - async def list_streaming_token( + async def list_content_token( self, resource_group_name: str, account_name: str, video_name: str, - **kwargs - ) -> "_models.VideoStreamingToken": - """Generates a streaming token for video playback. + **kwargs: Any + ) -> "_models.VideoContentToken": + """Generates a streaming token which can be used for accessing content from video content URLs. - Generates a streaming token used for authenticating video playback. + Generates a streaming token which can be used for accessing content from video content URLs, + for a video resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to generate a token for playback. + :param video_name: The Video name. :type video_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: VideoStreamingToken, or the result of cls(response) - :rtype: ~video_analyzer.models.VideoStreamingToken + :return: VideoContentToken, or the result of cls(response) + :rtype: ~video_analyzer.models.VideoContentToken :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoStreamingToken"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoContentToken"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list_streaming_token.metadata['url'] # type: ignore + url = self.list_content_token.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -459,10 +461,10 @@ async def list_streaming_token( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoStreamingToken', pipeline_response) + deserialized = self._deserialize('VideoContentToken', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_streaming_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}/listStreamingToken'} # type: ignore + list_content_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}/listContentToken'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/__init__.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/__init__.py index 59a61c4c87ab..780b3ad61910 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/__init__.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/__init__.py @@ -10,100 +10,212 @@ from ._models_py3 import AccessPolicyEntity from ._models_py3 import AccessPolicyEntityCollection from ._models_py3 import AccountEncryption + from ._models_py3 import AudioEncoderAac + from ._models_py3 import AudioEncoderBase from ._models_py3 import AuthenticationBase + from ._models_py3 import CertificateSource from ._models_py3 import CheckNameAvailabilityRequest from ._models_py3 import CheckNameAvailabilityResponse + from ._models_py3 import CredentialsBase from ._models_py3 import EccTokenKey from ._models_py3 import EdgeModuleEntity from ._models_py3 import EdgeModuleEntityCollection from ._models_py3 import EdgeModuleProvisioningToken + from ._models_py3 import EncoderCustomPreset + from ._models_py3 import EncoderPresetBase + from ._models_py3 import EncoderProcessor + from ._models_py3 import EncoderSystemPreset from ._models_py3 import Endpoint + from ._models_py3 import EndpointBase from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse + from ._models_py3 import GroupLevelAccessControl + from ._models_py3 import IotHub from ._models_py3 import JwtAuthentication from ._models_py3 import KeyVaultProperties from ._models_py3 import ListProvisioningTokenInput + from ._models_py3 import LivePipeline + from ._models_py3 import LivePipelineCollection + from ._models_py3 import LivePipelineOperationStatus + from ._models_py3 import LivePipelineUpdate from ._models_py3 import LogSpecification from ._models_py3 import MetricDimension from ._models_py3 import MetricSpecification + from ._models_py3 import NetworkAccessControl + from ._models_py3 import NodeBase + from ._models_py3 import NodeInput from ._models_py3 import Operation from ._models_py3 import OperationCollection from ._models_py3 import OperationDisplay + from ._models_py3 import ParameterDeclaration + from ._models_py3 import ParameterDefinition + from ._models_py3 import PemCertificateList + from ._models_py3 import PipelineJob + from ._models_py3 import PipelineJobCollection + from ._models_py3 import PipelineJobError + from ._models_py3 import PipelineJobOperationStatus + from ._models_py3 import PipelineJobUpdate + from ._models_py3 import PipelineTopology + from ._models_py3 import PipelineTopologyCollection + from ._models_py3 import PipelineTopologyUpdate + from ._models_py3 import PrivateEndpoint + from ._models_py3 import PrivateEndpointConnection + from ._models_py3 import PrivateEndpointConnectionListResult + from ._models_py3 import PrivateLinkResource + from ._models_py3 import PrivateLinkResourceListResult + from ._models_py3 import PrivateLinkServiceConnectionState + from ._models_py3 import ProcessorNodeBase from ._models_py3 import Properties from ._models_py3 import ProxyResource from ._models_py3 import Resource from ._models_py3 import ResourceIdentity from ._models_py3 import RsaTokenKey + from ._models_py3 import RtspSource + from ._models_py3 import SecureIotDeviceRemoteTunnel from ._models_py3 import ServiceSpecification + from ._models_py3 import SinkNodeBase + from ._models_py3 import Sku + from ._models_py3 import SourceNodeBase from ._models_py3 import StorageAccount - from ._models_py3 import SyncStorageKeysInput from ._models_py3 import SystemData + from ._models_py3 import TimeSequenceBase + from ._models_py3 import TlsEndpoint + from ._models_py3 import TlsValidationOptions from ._models_py3 import TokenClaim from ._models_py3 import TokenKey from ._models_py3 import TrackedResource + from ._models_py3 import TunnelBase + from ._models_py3 import UnsecuredEndpoint from ._models_py3 import UserAssignedManagedIdentity + from ._models_py3 import UsernamePasswordCredentials from ._models_py3 import VideoAnalyzer from ._models_py3 import VideoAnalyzerCollection from ._models_py3 import VideoAnalyzerIdentity - from ._models_py3 import VideoAnalyzerProperties - from ._models_py3 import VideoAnalyzerPropertiesUpdate + from ._models_py3 import VideoAnalyzerOperationStatus + from ._models_py3 import VideoAnalyzerPrivateEndpointConnectionOperationStatus from ._models_py3 import VideoAnalyzerUpdate + from ._models_py3 import VideoArchival + from ._models_py3 import VideoContentToken + from ._models_py3 import VideoContentUrls + from ._models_py3 import VideoCreationProperties + from ._models_py3 import VideoEncoderBase + from ._models_py3 import VideoEncoderH264 from ._models_py3 import VideoEntity from ._models_py3 import VideoEntityCollection from ._models_py3 import VideoFlags from ._models_py3 import VideoMediaInfo - from ._models_py3 import VideoStreaming - from ._models_py3 import VideoStreamingToken + from ._models_py3 import VideoPreviewImageUrls + from ._models_py3 import VideoPublishingOptions + from ._models_py3 import VideoScale + from ._models_py3 import VideoSequenceAbsoluteTimeMarkers + from ._models_py3 import VideoSink + from ._models_py3 import VideoSource except (SyntaxError, ImportError): from ._models import AccessPolicyEntity # type: ignore from ._models import AccessPolicyEntityCollection # type: ignore from ._models import AccountEncryption # type: ignore + from ._models import AudioEncoderAac # type: ignore + from ._models import AudioEncoderBase # type: ignore from ._models import AuthenticationBase # type: ignore + from ._models import CertificateSource # type: ignore from ._models import CheckNameAvailabilityRequest # type: ignore from ._models import CheckNameAvailabilityResponse # type: ignore + from ._models import CredentialsBase # type: ignore from ._models import EccTokenKey # type: ignore from ._models import EdgeModuleEntity # type: ignore from ._models import EdgeModuleEntityCollection # type: ignore from ._models import EdgeModuleProvisioningToken # type: ignore + from ._models import EncoderCustomPreset # type: ignore + from ._models import EncoderPresetBase # type: ignore + from ._models import EncoderProcessor # type: ignore + from ._models import EncoderSystemPreset # type: ignore from ._models import Endpoint # type: ignore + from ._models import EndpointBase # type: ignore from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore + from ._models import GroupLevelAccessControl # type: ignore + from ._models import IotHub # type: ignore from ._models import JwtAuthentication # type: ignore from ._models import KeyVaultProperties # type: ignore from ._models import ListProvisioningTokenInput # type: ignore + from ._models import LivePipeline # type: ignore + from ._models import LivePipelineCollection # type: ignore + from ._models import LivePipelineOperationStatus # type: ignore + from ._models import LivePipelineUpdate # type: ignore from ._models import LogSpecification # type: ignore from ._models import MetricDimension # type: ignore from ._models import MetricSpecification # type: ignore + from ._models import NetworkAccessControl # type: ignore + from ._models import NodeBase # type: ignore + from ._models import NodeInput # type: ignore from ._models import Operation # type: ignore from ._models import OperationCollection # type: ignore from ._models import OperationDisplay # type: ignore + from ._models import ParameterDeclaration # type: ignore + from ._models import ParameterDefinition # type: ignore + from ._models import PemCertificateList # type: ignore + from ._models import PipelineJob # type: ignore + from ._models import PipelineJobCollection # type: ignore + from ._models import PipelineJobError # type: ignore + from ._models import PipelineJobOperationStatus # type: ignore + from ._models import PipelineJobUpdate # type: ignore + from ._models import PipelineTopology # type: ignore + from ._models import PipelineTopologyCollection # type: ignore + from ._models import PipelineTopologyUpdate # type: ignore + from ._models import PrivateEndpoint # type: ignore + from ._models import PrivateEndpointConnection # type: ignore + from ._models import PrivateEndpointConnectionListResult # type: ignore + from ._models import PrivateLinkResource # type: ignore + from ._models import PrivateLinkResourceListResult # type: ignore + from ._models import PrivateLinkServiceConnectionState # type: ignore + from ._models import ProcessorNodeBase # type: ignore from ._models import Properties # type: ignore from ._models import ProxyResource # type: ignore from ._models import Resource # type: ignore from ._models import ResourceIdentity # type: ignore from ._models import RsaTokenKey # type: ignore + from ._models import RtspSource # type: ignore + from ._models import SecureIotDeviceRemoteTunnel # type: ignore from ._models import ServiceSpecification # type: ignore + from ._models import SinkNodeBase # type: ignore + from ._models import Sku # type: ignore + from ._models import SourceNodeBase # type: ignore from ._models import StorageAccount # type: ignore - from ._models import SyncStorageKeysInput # type: ignore from ._models import SystemData # type: ignore + from ._models import TimeSequenceBase # type: ignore + from ._models import TlsEndpoint # type: ignore + from ._models import TlsValidationOptions # type: ignore from ._models import TokenClaim # type: ignore from ._models import TokenKey # type: ignore from ._models import TrackedResource # type: ignore + from ._models import TunnelBase # type: ignore + from ._models import UnsecuredEndpoint # type: ignore from ._models import UserAssignedManagedIdentity # type: ignore + from ._models import UsernamePasswordCredentials # type: ignore from ._models import VideoAnalyzer # type: ignore from ._models import VideoAnalyzerCollection # type: ignore from ._models import VideoAnalyzerIdentity # type: ignore - from ._models import VideoAnalyzerProperties # type: ignore - from ._models import VideoAnalyzerPropertiesUpdate # type: ignore + from ._models import VideoAnalyzerOperationStatus # type: ignore + from ._models import VideoAnalyzerPrivateEndpointConnectionOperationStatus # type: ignore from ._models import VideoAnalyzerUpdate # type: ignore + from ._models import VideoArchival # type: ignore + from ._models import VideoContentToken # type: ignore + from ._models import VideoContentUrls # type: ignore + from ._models import VideoCreationProperties # type: ignore + from ._models import VideoEncoderBase # type: ignore + from ._models import VideoEncoderH264 # type: ignore from ._models import VideoEntity # type: ignore from ._models import VideoEntityCollection # type: ignore from ._models import VideoFlags # type: ignore from ._models import VideoMediaInfo # type: ignore - from ._models import VideoStreaming # type: ignore - from ._models import VideoStreamingToken # type: ignore + from ._models import VideoPreviewImageUrls # type: ignore + from ._models import VideoPublishingOptions # type: ignore + from ._models import VideoScale # type: ignore + from ._models import VideoSequenceAbsoluteTimeMarkers # type: ignore + from ._models import VideoSink # type: ignore + from ._models import VideoSource # type: ignore from ._video_analyzer_enums import ( AccessPolicyEccAlgo, @@ -113,9 +225,22 @@ ActionType, CheckNameAvailabilityReason, CreatedByType, + EncoderSystemPresetType, + Kind, + LivePipelineState, MetricAggregationType, MetricUnit, + ParameterType, + PipelineJobState, + PrivateEndpointConnectionProvisioningState, + PrivateEndpointServiceConnectionStatus, + ProvisioningState, + PublicNetworkAccess, + RtspTransport, + SkuName, + SkuTier, VideoAnalyzerEndpointType, + VideoScaleMode, VideoType, ) @@ -123,51 +248,107 @@ 'AccessPolicyEntity', 'AccessPolicyEntityCollection', 'AccountEncryption', + 'AudioEncoderAac', + 'AudioEncoderBase', 'AuthenticationBase', + 'CertificateSource', 'CheckNameAvailabilityRequest', 'CheckNameAvailabilityResponse', + 'CredentialsBase', 'EccTokenKey', 'EdgeModuleEntity', 'EdgeModuleEntityCollection', 'EdgeModuleProvisioningToken', + 'EncoderCustomPreset', + 'EncoderPresetBase', + 'EncoderProcessor', + 'EncoderSystemPreset', 'Endpoint', + 'EndpointBase', 'ErrorAdditionalInfo', 'ErrorDetail', 'ErrorResponse', + 'GroupLevelAccessControl', + 'IotHub', 'JwtAuthentication', 'KeyVaultProperties', 'ListProvisioningTokenInput', + 'LivePipeline', + 'LivePipelineCollection', + 'LivePipelineOperationStatus', + 'LivePipelineUpdate', 'LogSpecification', 'MetricDimension', 'MetricSpecification', + 'NetworkAccessControl', + 'NodeBase', + 'NodeInput', 'Operation', 'OperationCollection', 'OperationDisplay', + 'ParameterDeclaration', + 'ParameterDefinition', + 'PemCertificateList', + 'PipelineJob', + 'PipelineJobCollection', + 'PipelineJobError', + 'PipelineJobOperationStatus', + 'PipelineJobUpdate', + 'PipelineTopology', + 'PipelineTopologyCollection', + 'PipelineTopologyUpdate', + 'PrivateEndpoint', + 'PrivateEndpointConnection', + 'PrivateEndpointConnectionListResult', + 'PrivateLinkResource', + 'PrivateLinkResourceListResult', + 'PrivateLinkServiceConnectionState', + 'ProcessorNodeBase', 'Properties', 'ProxyResource', 'Resource', 'ResourceIdentity', 'RsaTokenKey', + 'RtspSource', + 'SecureIotDeviceRemoteTunnel', 'ServiceSpecification', + 'SinkNodeBase', + 'Sku', + 'SourceNodeBase', 'StorageAccount', - 'SyncStorageKeysInput', 'SystemData', + 'TimeSequenceBase', + 'TlsEndpoint', + 'TlsValidationOptions', 'TokenClaim', 'TokenKey', 'TrackedResource', + 'TunnelBase', + 'UnsecuredEndpoint', 'UserAssignedManagedIdentity', + 'UsernamePasswordCredentials', 'VideoAnalyzer', 'VideoAnalyzerCollection', 'VideoAnalyzerIdentity', - 'VideoAnalyzerProperties', - 'VideoAnalyzerPropertiesUpdate', + 'VideoAnalyzerOperationStatus', + 'VideoAnalyzerPrivateEndpointConnectionOperationStatus', 'VideoAnalyzerUpdate', + 'VideoArchival', + 'VideoContentToken', + 'VideoContentUrls', + 'VideoCreationProperties', + 'VideoEncoderBase', + 'VideoEncoderH264', 'VideoEntity', 'VideoEntityCollection', 'VideoFlags', 'VideoMediaInfo', - 'VideoStreaming', - 'VideoStreamingToken', + 'VideoPreviewImageUrls', + 'VideoPublishingOptions', + 'VideoScale', + 'VideoSequenceAbsoluteTimeMarkers', + 'VideoSink', + 'VideoSource', 'AccessPolicyEccAlgo', 'AccessPolicyRole', 'AccessPolicyRsaAlgo', @@ -175,8 +356,21 @@ 'ActionType', 'CheckNameAvailabilityReason', 'CreatedByType', + 'EncoderSystemPresetType', + 'Kind', + 'LivePipelineState', 'MetricAggregationType', 'MetricUnit', + 'ParameterType', + 'PipelineJobState', + 'PrivateEndpointConnectionProvisioningState', + 'PrivateEndpointServiceConnectionStatus', + 'ProvisioningState', + 'PublicNetworkAccess', + 'RtspTransport', + 'SkuName', + 'SkuTier', 'VideoAnalyzerEndpointType', + 'VideoScaleMode', 'VideoType', ] diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py index f4df260b9765..4c4dd7e5ec76 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models.py @@ -23,18 +23,23 @@ class Resource(msrest.serialization.Model): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -45,6 +50,7 @@ def __init__( self.id = None self.name = None self.type = None + self.system_data = None class ProxyResource(Resource): @@ -60,18 +66,23 @@ class ProxyResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -82,7 +93,7 @@ def __init__( class AccessPolicyEntity(ProxyResource): - """Policy that determines how a video can be accessed. + """Access policies help define the authentication rules, and control access to specific video resources. Variables are only populated by the server, and will be ignored when sending a request. @@ -94,7 +105,8 @@ class AccessPolicyEntity(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: The system metadata relating to this resource. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~video_analyzer.models.SystemData :param role: Defines the access level granted by this policy. Possible values include: "Reader". @@ -124,7 +136,6 @@ def __init__( **kwargs ): super(AccessPolicyEntity, self).__init__(**kwargs) - self.system_data = None self.role = kwargs.get('role', None) self.authentication = kwargs.get('authentication', None) @@ -194,6 +205,74 @@ def __init__( self.status = None +class AudioEncoderBase(msrest.serialization.Model): + """Base type for all audio encoder presets, which define the recipe or instructions on how audio should be processed. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AudioEncoderAac. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param bitrate_kbps: Bitrate, in kilobits per second or Kbps, at which audio should be encoded + (2-channel stereo audio at a sampling rate of 48 kHz). Allowed values are 96, 112, 128, 160, + 192, 224, and 256. If omitted, the bitrate of the input audio is used. + :type bitrate_kbps: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.AudioEncoderAac': 'AudioEncoderAac'} + } + + def __init__( + self, + **kwargs + ): + super(AudioEncoderBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.bitrate_kbps = kwargs.get('bitrate_kbps', None) + + +class AudioEncoderAac(AudioEncoderBase): + """A custom preset for encoding audio with the AAC codec. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param bitrate_kbps: Bitrate, in kilobits per second or Kbps, at which audio should be encoded + (2-channel stereo audio at a sampling rate of 48 kHz). Allowed values are 96, 112, 128, 160, + 192, 224, and 256. If omitted, the bitrate of the input audio is used. + :type bitrate_kbps: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(AudioEncoderAac, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.AudioEncoderAac' # type: str + + class AuthenticationBase(msrest.serialization.Model): """Base class for access policies authentication methods. @@ -226,6 +305,38 @@ def __init__( self.type = None # type: Optional[str] +class CertificateSource(msrest.serialization.Model): + """Base class for certificate sources. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PemCertificateList. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.PemCertificateList': 'PemCertificateList'} + } + + def __init__( + self, + **kwargs + ): + super(CertificateSource, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + class CheckNameAvailabilityRequest(msrest.serialization.Model): """The check availability request body. @@ -277,6 +388,38 @@ def __init__( self.message = kwargs.get('message', None) +class CredentialsBase(msrest.serialization.Model): + """Base class for credential objects. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: UsernamePasswordCredentials. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} + } + + def __init__( + self, + **kwargs + ): + super(CredentialsBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + class TokenKey(msrest.serialization.Model): """Key properties for JWT token validation. @@ -374,7 +517,8 @@ class EdgeModuleEntity(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: The system metadata relating to this resource. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~video_analyzer.models.SystemData :ivar edge_module_id: Internal ID generated for the instance of the Video Analyzer edge module. :vartype edge_module_id: str @@ -401,7 +545,6 @@ def __init__( **kwargs ): super(EdgeModuleEntity, self).__init__(**kwargs) - self.system_data = None self.edge_module_id = None @@ -462,15 +605,16 @@ def __init__( self.token = None -class Endpoint(msrest.serialization.Model): - """The endpoint details. +class EncoderPresetBase(msrest.serialization.Model): + """Base type for all encoder presets, which define the recipe or instructions on how the input content should be processed. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EncoderCustomPreset, EncoderSystemPreset. All required parameters must be populated in order to send to Azure. - :param endpoint_url: The URL of the endpoint. - :type endpoint_url: str - :param type: Required. The type of the endpoint. Possible values include: "ClientApi". - :type type: str or ~video_analyzer.models.VideoAnalyzerEndpointType + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str """ _validation = { @@ -478,562 +622,1997 @@ class Endpoint(msrest.serialization.Model): } _attribute_map = { - 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.EncoderCustomPreset': 'EncoderCustomPreset', '#Microsoft.VideoAnalyzer.EncoderSystemPreset': 'EncoderSystemPreset'} } def __init__( self, **kwargs ): - super(Endpoint, self).__init__(**kwargs) - self.endpoint_url = kwargs.get('endpoint_url', None) - self.type = kwargs['type'] + super(EncoderPresetBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] -class ErrorAdditionalInfo(msrest.serialization.Model): - """The resource management error additional info. +class EncoderCustomPreset(EncoderPresetBase): + """Describes a custom preset for encoding the input content using the encoder processor. - 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. - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: str + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param audio_encoder: Describes a custom preset for encoding audio. + :type audio_encoder: ~video_analyzer.models.AudioEncoderBase + :param video_encoder: Describes a custom preset for encoding video. + :type video_encoder: ~video_analyzer.models.VideoEncoderBase """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'audio_encoder': {'key': 'audioEncoder', 'type': 'AudioEncoderBase'}, + 'video_encoder': {'key': 'videoEncoder', 'type': 'VideoEncoderBase'}, } def __init__( self, **kwargs ): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None + super(EncoderCustomPreset, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.EncoderCustomPreset' # type: str + self.audio_encoder = kwargs.get('audio_encoder', None) + self.video_encoder = kwargs.get('video_encoder', None) -class ErrorDetail(msrest.serialization.Model): - """The error detail. +class NodeBase(msrest.serialization.Model): + """Base class for nodes. - Variables are only populated by the server, and will be ignored when sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ProcessorNodeBase, SinkNodeBase, SourceNodeBase. - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~video_analyzer.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~video_analyzer.models.ErrorAdditionalInfo] + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, + 'type': {'required': True}, + 'name': {'required': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.ProcessorNodeBase': 'ProcessorNodeBase', '#Microsoft.VideoAnalyzer.SinkNodeBase': 'SinkNodeBase', '#Microsoft.VideoAnalyzer.SourceNodeBase': 'SourceNodeBase'} } def __init__( self, **kwargs ): - super(ErrorDetail, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None + super(NodeBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = kwargs['name'] -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). +class ProcessorNodeBase(NodeBase): + """Base class for topology processor nodes. - :param error: The error object. - :type error: ~video_analyzer.models.ErrorDetail + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EncoderProcessor. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param inputs: Required. An array of upstream node references within the topology to be used as + inputs for this node. + :type inputs: list[~video_analyzer.models.NodeInput] """ + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.EncoderProcessor': 'EncoderProcessor'} } def __init__( self, **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) - self.error = kwargs.get('error', None) + super(ProcessorNodeBase, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.ProcessorNodeBase' # type: str + self.inputs = kwargs['inputs'] -class JwtAuthentication(AuthenticationBase): - """Properties for access validation based on JSON Web Tokens (JWT). +class EncoderProcessor(ProcessorNodeBase): + """Encoder processor allows for encoding of the input content. For example, it can used to change the resolution from 4K to 1280x720. All required parameters must be populated in order to send to Azure. :param type: Required. The discriminator for derived types.Constant filled by server. :type type: str - :param issuers: List of expected token issuers. Token issuer is valid if it matches at least - one of the given values. - :type issuers: list[str] - :param audiences: List of expected token audiences. Token audience is valid if it matches at - least one of the given values. - :type audiences: list[str] - :param claims: List of additional token claims to be validated. Token must contains all claims - and respective values for it to be valid. - :type claims: list[~video_analyzer.models.TokenClaim] - :param keys: List of keys which can be used to validate access tokens. Having multiple keys - allow for seamless key rotation of the token signing key. Token signature must match exactly - one key. - :type keys: list[~video_analyzer.models.TokenKey] + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param inputs: Required. An array of upstream node references within the topology to be used as + inputs for this node. + :type inputs: list[~video_analyzer.models.NodeInput] + :param preset: Required. The encoder preset, which defines the recipe or instructions on how + the input content should be processed. + :type preset: ~video_analyzer.models.EncoderPresetBase """ _validation = { 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'preset': {'required': True}, } _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, - 'issuers': {'key': 'issuers', 'type': '[str]'}, - 'audiences': {'key': 'audiences', 'type': '[str]'}, - 'claims': {'key': 'claims', 'type': '[TokenClaim]'}, - 'keys': {'key': 'keys', 'type': '[TokenKey]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + 'preset': {'key': 'preset', 'type': 'EncoderPresetBase'}, } def __init__( self, **kwargs ): - super(JwtAuthentication, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.JwtAuthentication' # type: str - self.issuers = kwargs.get('issuers', None) - self.audiences = kwargs.get('audiences', None) - self.claims = kwargs.get('claims', None) - self.keys = kwargs.get('keys', None) + super(EncoderProcessor, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.EncoderProcessor' # type: str + self.preset = kwargs['preset'] -class KeyVaultProperties(msrest.serialization.Model): - """The details for accessing the encryption keys in Key Vault. - - Variables are only populated by the server, and will be ignored when sending a request. +class EncoderSystemPreset(EncoderPresetBase): + """Describes a built-in preset for encoding the input content using the encoder processor. All required parameters must be populated in order to send to Azure. - :param key_identifier: Required. The URL of the Key Vault key used to encrypt the account. The - key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key - without a version (for example https://vault/keys/mykey). - :type key_identifier: str - :ivar current_key_identifier: The current key used to encrypt Video Analyzer account, including - the key version. - :vartype current_key_identifier: str - """ + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Name of the built-in encoding preset. Possible values include: + "SingleLayer_540p_H264_AAC", "SingleLayer_720p_H264_AAC", "SingleLayer_1080p_H264_AAC", + "SingleLayer_2160p_H264_AAC". + :type name: str or ~video_analyzer.models.EncoderSystemPresetType + """ _validation = { - 'key_identifier': {'required': True}, - 'current_key_identifier': {'readonly': True}, + 'type': {'required': True}, + 'name': {'required': True}, } _attribute_map = { - 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, - 'current_key_identifier': {'key': 'currentKeyIdentifier', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, } def __init__( self, **kwargs ): - super(KeyVaultProperties, self).__init__(**kwargs) - self.key_identifier = kwargs['key_identifier'] - self.current_key_identifier = None + super(EncoderSystemPreset, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.EncoderSystemPreset' # type: str + self.name = kwargs['name'] -class ListProvisioningTokenInput(msrest.serialization.Model): - """The input parameters to generate registration token for the Azure Video Analyzer IoT edge module. +class Endpoint(msrest.serialization.Model): + """The endpoint details. All required parameters must be populated in order to send to Azure. - :param expiration_date: Required. The desired expiration date of the registration token. The - Azure Video Analyzer IoT edge module must be initialized and connected to the Internet prior to - the token expiration date. - :type expiration_date: ~datetime.datetime + :param endpoint_url: The URL of the endpoint. + :type endpoint_url: str + :param type: Required. The type of the endpoint. Possible values include: "ClientApi". + :type type: str or ~video_analyzer.models.VideoAnalyzerEndpointType """ _validation = { - 'expiration_date': {'required': True}, + 'type': {'required': True}, } _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__( self, **kwargs ): - super(ListProvisioningTokenInput, self).__init__(**kwargs) - self.expiration_date = kwargs['expiration_date'] + super(Endpoint, self).__init__(**kwargs) + self.endpoint_url = kwargs.get('endpoint_url', None) + self.type = kwargs['type'] -class LogSpecification(msrest.serialization.Model): - """A diagnostic log emitted by service. +class EndpointBase(msrest.serialization.Model): + """Base class for endpoints. - Variables are only populated by the server, and will be ignored when sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: TlsEndpoint, UnsecuredEndpoint. - :ivar name: The diagnostic log category name. - :vartype name: str - :ivar display_name: The diagnostic log category display name. - :vartype display_name: str - :ivar blob_duration: The time range for requests in each blob. - :vartype blob_duration: str + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Required. Credentials to be presented to the endpoint. + :type credentials: ~video_analyzer.models.CredentialsBase + :param url: Required. The endpoint URL for Video Analyzer to connect to. + :type url: str + :param tunnel: Describes the tunnel through which Video Analyzer can connect to the endpoint + URL. This is an optional property, typically used when the endpoint is behind a firewall. + :type tunnel: ~video_analyzer.models.TunnelBase """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'blob_duration': {'readonly': True}, + 'type': {'required': True}, + 'credentials': {'required': True}, + 'url': {'required': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.TlsEndpoint': 'TlsEndpoint', '#Microsoft.VideoAnalyzer.UnsecuredEndpoint': 'UnsecuredEndpoint'} } def __init__( self, **kwargs ): - super(LogSpecification, self).__init__(**kwargs) - self.name = None - self.display_name = None - self.blob_duration = None + super(EndpointBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.credentials = kwargs['credentials'] + self.url = kwargs['url'] + self.tunnel = kwargs.get('tunnel', None) -class MetricDimension(msrest.serialization.Model): - """A metric dimension. +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The metric dimension name. - :vartype name: str - :ivar display_name: The display name for the dimension. - :vartype display_name: str - :ivar to_be_exported_for_shoebox: Whether to export metric to shoebox. - :vartype to_be_exported_for_shoebox: bool + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'to_be_exported_for_shoebox': {'readonly': True}, + 'type': {'readonly': True}, + 'info': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, } def __init__( self, **kwargs ): - super(MetricDimension, self).__init__(**kwargs) - self.name = None - self.display_name = None - self.to_be_exported_for_shoebox = None + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None -class MetricSpecification(msrest.serialization.Model): - """A metric emitted by service. +class ErrorDetail(msrest.serialization.Model): + """The error detail. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The metric name. - :vartype name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar display_description: The metric display description. - :vartype display_description: str - :ivar unit: The metric unit. Possible values include: "Bytes", "Count", "Milliseconds". - :vartype unit: str or ~video_analyzer.models.MetricUnit - :ivar aggregation_type: The metric aggregation type. Possible values include: "Average", - "Count", "Total". - :vartype aggregation_type: str or ~video_analyzer.models.MetricAggregationType - :ivar lock_aggregation_type: The metric lock aggregation type. Possible values include: - "Average", "Count", "Total". - :vartype lock_aggregation_type: str or ~video_analyzer.models.MetricAggregationType - :param supported_aggregation_types: Supported aggregation types. - :type supported_aggregation_types: list[str] - :ivar dimensions: The metric dimensions. - :vartype dimensions: list[~video_analyzer.models.MetricDimension] - :ivar enable_regional_mdm_account: Indicates whether regional MDM account is enabled. - :vartype enable_regional_mdm_account: bool - :ivar source_mdm_account: The source MDM account. - :vartype source_mdm_account: str - :ivar source_mdm_namespace: The source MDM namespace. - :vartype source_mdm_namespace: str - :ivar supported_time_grain_types: The supported time grain types. - :vartype supported_time_grain_types: list[str] + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~video_analyzer.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~video_analyzer.models.ErrorAdditionalInfo] """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'display_description': {'readonly': True}, - 'unit': {'readonly': True}, - 'aggregation_type': {'readonly': True}, - 'lock_aggregation_type': {'readonly': True}, - 'dimensions': {'readonly': True}, - 'enable_regional_mdm_account': {'readonly': True}, - 'source_mdm_account': {'readonly': True}, - 'source_mdm_namespace': {'readonly': True}, - 'supported_time_grain_types': {'readonly': True}, + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, } _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'}, - 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, - 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, } def __init__( self, **kwargs ): - super(MetricSpecification, self).__init__(**kwargs) - self.name = None - self.display_name = None - self.display_description = None - self.unit = None - self.aggregation_type = None - self.lock_aggregation_type = None - self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) - self.dimensions = None - self.enable_regional_mdm_account = None - self.source_mdm_account = None - self.source_mdm_namespace = None - self.supported_time_grain_types = None - + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None -class Operation(msrest.serialization.Model): - """An operation. - All required parameters must be populated in order to send to Azure. +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). - :param name: Required. The operation name. - :type name: str - :param display: The operation display name. - :type display: ~video_analyzer.models.OperationDisplay - :param origin: Origin of the operation. - :type origin: str - :param properties: Operation properties format. - :type properties: ~video_analyzer.models.Properties - :param is_data_action: Whether the operation applies to data-plane. - :type is_data_action: bool - :param action_type: Indicates the action type. Possible values include: "Internal". - :type action_type: str or ~video_analyzer.models.ActionType + :param error: The error object. + :type error: ~video_analyzer.models.ErrorDetail """ - _validation = { - 'name': {'required': True}, - } - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'Properties'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( self, **kwargs ): - super(Operation, self).__init__(**kwargs) - self.name = kwargs['name'] - self.display = kwargs.get('display', None) - self.origin = kwargs.get('origin', None) - self.properties = kwargs.get('properties', None) - self.is_data_action = kwargs.get('is_data_action', None) - self.action_type = kwargs.get('action_type', None) + super(ErrorResponse, self).__init__(**kwargs) + self.error = kwargs.get('error', None) -class OperationCollection(msrest.serialization.Model): - """A collection of Operation items. +class GroupLevelAccessControl(msrest.serialization.Model): + """Group level network access control. - :param value: A collection of Operation items. - :type value: list[~video_analyzer.models.Operation] + :param public_network_access: Whether or not public network access is allowed for specified + resources under the Video Analyzer account. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~video_analyzer.models.PublicNetworkAccess """ _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, } def __init__( self, **kwargs ): - super(OperationCollection, self).__init__(**kwargs) - self.value = kwargs.get('value', None) + super(GroupLevelAccessControl, self).__init__(**kwargs) + self.public_network_access = kwargs.get('public_network_access', None) -class OperationDisplay(msrest.serialization.Model): - """Operation details. +class IotHub(msrest.serialization.Model): + """The IoT Hub details. - :param provider: The service provider. - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - :param operation: The operation type. - :type operation: str - :param description: The operation description. - :type description: str + 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 id: Required. The IoT Hub resource identifier. + :type id: str + :param identity: Required. The IoT Hub identity. + :type identity: ~video_analyzer.models.ResourceIdentity + :ivar status: The current status of the Iot Hub mapping. + :vartype status: str """ - _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, - 'description': {'key': 'description', 'type': 'str'}, + _validation = { + 'id': {'required': True}, + 'identity': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(IotHub, self).__init__(**kwargs) + self.id = kwargs['id'] + self.identity = kwargs['identity'] + self.status = None + + +class JwtAuthentication(AuthenticationBase): + """Properties for access validation based on JSON Web Tokens (JWT). + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param issuers: List of expected token issuers. Token issuer is valid if it matches at least + one of the given values. + :type issuers: list[str] + :param audiences: List of expected token audiences. Token audience is valid if it matches at + least one of the given values. + :type audiences: list[str] + :param claims: List of additional token claims to be validated. Token must contains all claims + and respective values for it to be valid. + :type claims: list[~video_analyzer.models.TokenClaim] + :param keys: List of keys which can be used to validate access tokens. Having multiple keys + allow for seamless key rotation of the token signing key. Token signature must match exactly + one key. + :type keys: list[~video_analyzer.models.TokenKey] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'issuers': {'key': 'issuers', 'type': '[str]'}, + 'audiences': {'key': 'audiences', 'type': '[str]'}, + 'claims': {'key': 'claims', 'type': '[TokenClaim]'}, + 'keys': {'key': 'keys', 'type': '[TokenKey]'}, + } + + def __init__( + self, + **kwargs + ): + super(JwtAuthentication, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.JwtAuthentication' # type: str + self.issuers = kwargs.get('issuers', None) + self.audiences = kwargs.get('audiences', None) + self.claims = kwargs.get('claims', None) + self.keys = kwargs.get('keys', None) + + +class KeyVaultProperties(msrest.serialization.Model): + """The details for accessing the encryption keys in Key Vault. + + 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 key_identifier: Required. The URL of the Key Vault key used to encrypt the account. The + key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key + without a version (for example https://vault/keys/mykey). + :type key_identifier: str + :ivar current_key_identifier: The current key used to encrypt Video Analyzer account, including + the key version. + :vartype current_key_identifier: str + """ + + _validation = { + 'key_identifier': {'required': True}, + 'current_key_identifier': {'readonly': True}, + } + + _attribute_map = { + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + 'current_key_identifier': {'key': 'currentKeyIdentifier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_identifier = kwargs['key_identifier'] + self.current_key_identifier = None + + +class ListProvisioningTokenInput(msrest.serialization.Model): + """The input parameters to generate registration token for the Azure Video Analyzer IoT edge module. + + All required parameters must be populated in order to send to Azure. + + :param expiration_date: Required. The desired expiration date of the registration token. The + Azure Video Analyzer IoT edge module must be initialized and connected to the Internet prior to + the token expiration date. + :type expiration_date: ~datetime.datetime + """ + + _validation = { + 'expiration_date': {'required': True}, + } + + _attribute_map = { + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(ListProvisioningTokenInput, self).__init__(**kwargs) + self.expiration_date = kwargs['expiration_date'] + + +class LivePipeline(ProxyResource): + """Live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving and publishing of content for a unique RTSP camera. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param topology_name: The reference to an existing pipeline topology defined for real-time + content processing. When activated, this live pipeline will process content according to the + pipeline topology definition. + :type topology_name: str + :param description: An optional description for the pipeline. + :type description: str + :param bitrate_kbps: Maximum bitrate capacity in Kbps reserved for the live pipeline. The + allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds + this capacity, then the service will disconnect temporarily from the camera. It will retry to + re-establish connection (with exponential backoff), checking to see if the camera bitrate is + now below the reserved capacity. Doing so will ensure that one 'noisy neighbor' does not affect + other live pipelines in your account. + :type bitrate_kbps: int + :ivar state: Current state of the pipeline (read-only). Possible values include: "Inactive", + "Activating", "Active", "Deactivating". + :vartype state: str or ~video_analyzer.models.LivePipelineState + :param parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :type parameters: list[~video_analyzer.models.ParameterDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'bitrate_kbps': {'key': 'properties.bitrateKbps', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + } + + def __init__( + self, + **kwargs + ): + super(LivePipeline, self).__init__(**kwargs) + self.topology_name = kwargs.get('topology_name', None) + self.description = kwargs.get('description', None) + self.bitrate_kbps = kwargs.get('bitrate_kbps', None) + self.state = None + self.parameters = kwargs.get('parameters', None) + + +class LivePipelineCollection(msrest.serialization.Model): + """A collection of LivePipeline items. + + :param value: A collection of LivePipeline items. + :type value: list[~video_analyzer.models.LivePipeline] + :param next_link: A link to the next page of the collection (when the collection contains too + many results to return in one response). + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LivePipeline]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LivePipelineCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class LivePipelineOperationStatus(msrest.serialization.Model): + """Used for tracking the status of an operation on the live pipeline. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the live pipeline operation. + :vartype name: str + :ivar status: The status of the live pipeline operation. + :vartype status: str + :ivar error: The error details for the live pipeline operation. + :vartype error: ~video_analyzer.models.ErrorDetail + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(LivePipelineOperationStatus, self).__init__(**kwargs) + self.name = None + self.status = None + self.error = None + + +class LivePipelineUpdate(ProxyResource): + """Live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving and publishing of content for a unique RTSP camera. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param topology_name: The reference to an existing pipeline topology defined for real-time + content processing. When activated, this live pipeline will process content according to the + pipeline topology definition. + :type topology_name: str + :param description: An optional description for the pipeline. + :type description: str + :param bitrate_kbps: Maximum bitrate capacity in Kbps reserved for the live pipeline. The + allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds + this capacity, then the service will disconnect temporarily from the camera. It will retry to + re-establish connection (with exponential backoff), checking to see if the camera bitrate is + now below the reserved capacity. Doing so will ensure that one 'noisy neighbor' does not affect + other live pipelines in your account. + :type bitrate_kbps: int + :ivar state: Current state of the pipeline (read-only). Possible values include: "Inactive", + "Activating", "Active", "Deactivating". + :vartype state: str or ~video_analyzer.models.LivePipelineState + :param parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :type parameters: list[~video_analyzer.models.ParameterDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'bitrate_kbps': {'key': 'properties.bitrateKbps', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + } + + def __init__( + self, + **kwargs + ): + super(LivePipelineUpdate, self).__init__(**kwargs) + self.topology_name = kwargs.get('topology_name', None) + self.description = kwargs.get('description', None) + self.bitrate_kbps = kwargs.get('bitrate_kbps', None) + self.state = None + self.parameters = kwargs.get('parameters', None) + + +class LogSpecification(msrest.serialization.Model): + """A diagnostic log emitted by service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The diagnostic log category name. + :vartype name: str + :ivar display_name: The diagnostic log category display name. + :vartype display_name: str + :ivar blob_duration: The time range for requests in each blob. + :vartype blob_duration: str + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'blob_duration': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.blob_duration = None + + +class MetricDimension(msrest.serialization.Model): + """A metric dimension. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The metric dimension name. + :vartype name: str + :ivar display_name: The display name for the dimension. + :vartype display_name: str + :ivar to_be_exported_for_shoebox: Whether to export metric to shoebox. + :vartype to_be_exported_for_shoebox: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'to_be_exported_for_shoebox': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricDimension, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.to_be_exported_for_shoebox = None + + +class MetricSpecification(msrest.serialization.Model): + """A metric emitted by service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The metric name. + :vartype name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar display_description: The metric display description. + :vartype display_description: str + :ivar unit: The metric unit. Possible values include: "Bytes", "Count", "Milliseconds". + :vartype unit: str or ~video_analyzer.models.MetricUnit + :ivar aggregation_type: The metric aggregation type. Possible values include: "Average", + "Count", "Total". + :vartype aggregation_type: str or ~video_analyzer.models.MetricAggregationType + :ivar lock_aggregation_type: The metric lock aggregation type. Possible values include: + "Average", "Count", "Total". + :vartype lock_aggregation_type: str or ~video_analyzer.models.MetricAggregationType + :param supported_aggregation_types: Supported aggregation types. + :type supported_aggregation_types: list[str] + :ivar dimensions: The metric dimensions. + :vartype dimensions: list[~video_analyzer.models.MetricDimension] + :ivar enable_regional_mdm_account: Indicates whether regional MDM account is enabled. + :vartype enable_regional_mdm_account: bool + :ivar source_mdm_account: The source MDM account. + :vartype source_mdm_account: str + :ivar source_mdm_namespace: The source MDM namespace. + :vartype source_mdm_namespace: str + :ivar supported_time_grain_types: The supported time grain types. + :vartype supported_time_grain_types: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'display_description': {'readonly': True}, + 'unit': {'readonly': True}, + 'aggregation_type': {'readonly': True}, + 'lock_aggregation_type': {'readonly': True}, + 'dimensions': {'readonly': True}, + 'enable_regional_mdm_account': {'readonly': True}, + 'source_mdm_account': {'readonly': True}, + 'source_mdm_namespace': {'readonly': True}, + 'supported_time_grain_types': {'readonly': True}, + } + + _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'}, + 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricSpecification, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.display_description = None + self.unit = None + self.aggregation_type = None + self.lock_aggregation_type = None + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.dimensions = None + self.enable_regional_mdm_account = None + self.source_mdm_account = None + self.source_mdm_namespace = None + self.supported_time_grain_types = None + + +class NetworkAccessControl(msrest.serialization.Model): + """Network access control for video analyzer account. + + :param integration: Public network access for integration group. + :type integration: ~video_analyzer.models.GroupLevelAccessControl + :param ingestion: Public network access for ingestion group. + :type ingestion: ~video_analyzer.models.GroupLevelAccessControl + :param consumption: Public network access for consumption group. + :type consumption: ~video_analyzer.models.GroupLevelAccessControl + """ + + _attribute_map = { + 'integration': {'key': 'integration', 'type': 'GroupLevelAccessControl'}, + 'ingestion': {'key': 'ingestion', 'type': 'GroupLevelAccessControl'}, + 'consumption': {'key': 'consumption', 'type': 'GroupLevelAccessControl'}, + } + + def __init__( + self, + **kwargs + ): + super(NetworkAccessControl, self).__init__(**kwargs) + self.integration = kwargs.get('integration', None) + self.ingestion = kwargs.get('ingestion', None) + self.consumption = kwargs.get('consumption', None) + + +class NodeInput(msrest.serialization.Model): + """Describes an input signal to be used on a pipeline node. + + All required parameters must be populated in order to send to Azure. + + :param node_name: Required. The name of the upstream node in the pipeline which output is used + as input of the current node. + :type node_name: str + """ + + _validation = { + 'node_name': {'required': True}, + } + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(NodeInput, self).__init__(**kwargs) + self.node_name = kwargs['node_name'] + + +class Operation(msrest.serialization.Model): + """An operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The operation name. + :type name: str + :param display: The operation display name. + :type display: ~video_analyzer.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param properties: Operation properties format. + :type properties: ~video_analyzer.models.Properties + :param is_data_action: Whether the operation applies to data-plane. + :type is_data_action: bool + :param action_type: Indicates the action type. Possible values include: "Internal". + :type action_type: str or ~video_analyzer.models.ActionType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'Properties'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = kwargs['name'] + self.display = kwargs.get('display', None) + self.origin = kwargs.get('origin', None) + self.properties = kwargs.get('properties', None) + self.is_data_action = kwargs.get('is_data_action', None) + self.action_type = kwargs.get('action_type', None) + + +class OperationCollection(msrest.serialization.Model): + """A collection of Operation items. + + :param value: A collection of Operation items. + :type value: list[~video_analyzer.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class OperationDisplay(msrest.serialization.Model): + """Operation details. + + :param provider: The service provider. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: The operation type. + :type operation: str + :param description: The operation description. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class ParameterDeclaration(msrest.serialization.Model): + """Single topology parameter declaration. Declared parameters can and must be referenced throughout the topology and can optionally have default values to be used when they are not defined in the pipelines. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the parameter. + :type name: str + :param type: Required. Type of the parameter. Possible values include: "String", + "SecretString", "Int", "Double", "Bool". + :type type: str or ~video_analyzer.models.ParameterType + :param description: Description of the parameter. + :type description: str + :param default: The default value for the parameter to be used if the pipeline does not specify + a value. + :type default: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ParameterDeclaration, self).__init__(**kwargs) + self.name = kwargs['name'] + self.type = kwargs['type'] + self.description = kwargs.get('description', None) + self.default = kwargs.get('default', None) + + +class ParameterDefinition(msrest.serialization.Model): + """Defines the parameter value of an specific pipeline topology parameter. See pipeline topology parameters for more information. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the parameter declared in the pipeline topology. + :type name: str + :param value: Parameter value to be applied on this specific pipeline. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ParameterDefinition, self).__init__(**kwargs) + self.name = kwargs['name'] + self.value = kwargs.get('value', None) + + +class PemCertificateList(CertificateSource): + """A list of PEM formatted certificates. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param certificates: Required. PEM formatted public certificates. One certificate per entry. + :type certificates: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'certificates': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'certificates': {'key': 'certificates', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PemCertificateList, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.PemCertificateList' # type: str + self.certificates = kwargs['certificates'] + + +class PipelineJob(ProxyResource): + """Pipeline job represents a unique instance of a batch topology, used for offline processing of selected portions of archived content. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param topology_name: Reference to an existing pipeline topology. When activated, this pipeline + job will process content according to the pipeline topology definition. + :type topology_name: str + :param description: An optional description for the pipeline. + :type description: str + :ivar state: Current state of the pipeline (read-only). Possible values include: "Processing", + "Canceled", "Completed", "Failed". + :vartype state: str or ~video_analyzer.models.PipelineJobState + :ivar expiration: The date-time by when this pipeline job will be automatically deleted from + your account. + :vartype expiration: ~datetime.datetime + :ivar error: Details about the error, in case the pipeline job fails. + :vartype error: ~video_analyzer.models.PipelineJobError + :param parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :type parameters: list[~video_analyzer.models.ParameterDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, + 'expiration': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'expiration': {'key': 'properties.expiration', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'PipelineJobError'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineJob, self).__init__(**kwargs) + self.topology_name = kwargs.get('topology_name', None) + self.description = kwargs.get('description', None) + self.state = None + self.expiration = None + self.error = None + self.parameters = kwargs.get('parameters', None) + + +class PipelineJobCollection(msrest.serialization.Model): + """A collection of PipelineJob items. + + :param value: A collection of PipelineJob items. + :type value: list[~video_analyzer.models.PipelineJob] + :param next_link: A link to the next page of the collection (when the collection contains too + many results to return in one response). + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PipelineJob]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineJobCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PipelineJobError(msrest.serialization.Model): + """Details about the error for a failed pipeline job. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineJobError, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class PipelineJobOperationStatus(msrest.serialization.Model): + """Used for tracking the status of an operation on the pipeline job. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the pipeline job operation. + :vartype name: str + :ivar status: The status of the pipeline job operation. + :vartype status: str + :ivar error: The error details for the pipeline job operation. + :vartype error: ~video_analyzer.models.ErrorDetail + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineJobOperationStatus, self).__init__(**kwargs) + self.name = None + self.status = None + self.error = None + + +class PipelineJobUpdate(ProxyResource): + """Pipeline job represents a unique instance of a batch topology, used for offline processing of selected portions of archived content. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param topology_name: Reference to an existing pipeline topology. When activated, this pipeline + job will process content according to the pipeline topology definition. + :type topology_name: str + :param description: An optional description for the pipeline. + :type description: str + :ivar state: Current state of the pipeline (read-only). Possible values include: "Processing", + "Canceled", "Completed", "Failed". + :vartype state: str or ~video_analyzer.models.PipelineJobState + :ivar expiration: The date-time by when this pipeline job will be automatically deleted from + your account. + :vartype expiration: ~datetime.datetime + :ivar error: Details about the error, in case the pipeline job fails. + :vartype error: ~video_analyzer.models.PipelineJobError + :param parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :type parameters: list[~video_analyzer.models.ParameterDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, + 'expiration': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'expiration': {'key': 'properties.expiration', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'PipelineJobError'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineJobUpdate, self).__init__(**kwargs) + self.topology_name = kwargs.get('topology_name', None) + self.description = kwargs.get('description', None) + self.state = None + self.expiration = None + self.error = None + self.parameters = kwargs.get('parameters', None) + + +class PipelineTopology(ProxyResource): + """Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP camera and archives the content can be reused across many different cameras, as long as the same processing is to be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: + + +* Parameters: list of user defined parameters that can be references across the topology nodes. +* Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. +* Processors: list of nodes which perform data analysis or transformations. +* Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + + 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. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param kind: Required. Topology kind. Possible values include: "Live", "Batch". + :type kind: str or ~video_analyzer.models.Kind + :param sku: Required. Describes the properties of a SKU. + :type sku: ~video_analyzer.models.Sku + :param description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :type description: str + :param parameters: List of the topology parameter declarations. Parameters declared here can be + referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. + Parameters can have optional default values and can later be defined in individual instances of + the pipeline. + :type parameters: list[~video_analyzer.models.ParameterDeclaration] + :param sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :type sources: list[~video_analyzer.models.SourceNodeBase] + :param processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :type processors: list[~video_analyzer.models.ProcessorNodeBase] + :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :type sinks: list[~video_analyzer.models.SinkNodeBase] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'kind': {'required': True}, + 'sku': {'required': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDeclaration]'}, + 'sources': {'key': 'properties.sources', 'type': '[SourceNodeBase]'}, + 'processors': {'key': 'properties.processors', 'type': '[ProcessorNodeBase]'}, + 'sinks': {'key': 'properties.sinks', 'type': '[SinkNodeBase]'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineTopology, self).__init__(**kwargs) + self.kind = kwargs['kind'] + self.sku = kwargs['sku'] + self.description = kwargs.get('description', None) + self.parameters = kwargs.get('parameters', None) + self.sources = kwargs.get('sources', None) + self.processors = kwargs.get('processors', None) + self.sinks = kwargs.get('sinks', None) + + +class PipelineTopologyCollection(msrest.serialization.Model): + """A collection of PipelineTopology items. + + :param value: A collection of PipelineTopology items. + :type value: list[~video_analyzer.models.PipelineTopology] + :param next_link: A link to the next page of the collection (when the collection contains too + many results to return in one response). + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PipelineTopology]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineTopologyCollection, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class PipelineTopologyUpdate(ProxyResource): + """Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP camera and archives the content can be reused across many different cameras, as long as the same processing is to be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: + + +* Parameters: list of user defined parameters that can be references across the topology nodes. +* Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. +* Processors: list of nodes which perform data analysis or transformations. +* Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param kind: Topology kind. Possible values include: "Live", "Batch". + :type kind: str or ~video_analyzer.models.Kind + :param sku: Describes the properties of a SKU. + :type sku: ~video_analyzer.models.Sku + :param description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :type description: str + :param parameters: List of the topology parameter declarations. Parameters declared here can be + referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. + Parameters can have optional default values and can later be defined in individual instances of + the pipeline. + :type parameters: list[~video_analyzer.models.ParameterDeclaration] + :param sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :type sources: list[~video_analyzer.models.SourceNodeBase] + :param processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :type processors: list[~video_analyzer.models.ProcessorNodeBase] + :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :type sinks: list[~video_analyzer.models.SinkNodeBase] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDeclaration]'}, + 'sources': {'key': 'properties.sources', 'type': '[SourceNodeBase]'}, + 'processors': {'key': 'properties.processors', 'type': '[ProcessorNodeBase]'}, + 'sinks': {'key': 'properties.sinks', 'type': '[SinkNodeBase]'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineTopologyUpdate, self).__init__(**kwargs) + self.kind = kwargs.get('kind', None) + self.sku = kwargs.get('sku', None) + self.description = kwargs.get('description', None) + self.parameters = kwargs.get('parameters', None) + self.sources = kwargs.get('sources', None) + self.processors = kwargs.get('processors', None) + self.sinks = kwargs.get('sinks', None) + + +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None + + +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~video_analyzer.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~video_analyzer.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~video_analyzer.models.PrivateEndpointConnectionProvisioningState + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = kwargs.get('private_endpoint', None) + self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) + self.provisioning_state = None + + +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connection associated with the specified storage account. + + :param value: Array of private endpoint connections. + :type value: list[~video_analyzer.models.PrivateEndpointConnection] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = kwargs.get('required_zone_names', None) + + +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. + + :param value: Array of private link resources. + :type value: list[~video_analyzer.models.PrivateLinkResource] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkResourceListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + + +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. + + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or ~video_analyzer.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. + :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.description = kwargs.get('description', None) + self.actions_required = kwargs.get('actions_required', None) + + +class Properties(msrest.serialization.Model): + """Metric properties. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar service_specification: The service specifications. + :vartype service_specification: ~video_analyzer.models.ServiceSpecification + """ + + _validation = { + 'service_specification': {'readonly': True}, + } + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__( + self, + **kwargs + ): + super(Properties, self).__init__(**kwargs) + self.service_specification = None + + +class ResourceIdentity(msrest.serialization.Model): + """The user assigned managed identity to use when accessing a resource. + + All required parameters must be populated in order to send to Azure. + + :param user_assigned_identity: Required. The user assigned managed identity's resource + identifier to use when accessing a resource. + :type user_assigned_identity: str + """ + + _validation = { + 'user_assigned_identity': {'required': True}, + } + + _attribute_map = { + 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceIdentity, self).__init__(**kwargs) + self.user_assigned_identity = kwargs['user_assigned_identity'] + + +class RsaTokenKey(TokenKey): + """Required validation properties for tokens generated with RSA algorithm. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param kid: Required. JWT token key id. Validation keys are looked up based on the key id + present on the JWT token header. + :type kid: str + :param alg: Required. RSA algorithm to be used: RS256, RS384 or RS512. Possible values include: + "RS256", "RS384", "RS512". + :type alg: str or ~video_analyzer.models.AccessPolicyRsaAlgo + :param n: Required. RSA public key modulus. + :type n: str + :param e: Required. RSA public key exponent. + :type e: str + """ + + _validation = { + 'type': {'required': True}, + 'kid': {'required': True}, + 'alg': {'required': True}, + 'n': {'required': True}, + 'e': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'kid': {'key': 'kid', 'type': 'str'}, + 'alg': {'key': 'alg', 'type': 'str'}, + 'n': {'key': 'n', 'type': 'str'}, + 'e': {'key': 'e', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(RsaTokenKey, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.RsaTokenKey' # type: str + self.alg = kwargs['alg'] + self.n = kwargs['n'] + self.e = kwargs['e'] + + +class SourceNodeBase(NodeBase): + """Base class for topology source nodes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RtspSource, VideoSource. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.RtspSource': 'RtspSource', '#Microsoft.VideoAnalyzer.VideoSource': 'VideoSource'} } def __init__( self, **kwargs ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = kwargs.get('provider', None) - self.resource = kwargs.get('resource', None) - self.operation = kwargs.get('operation', None) - self.description = kwargs.get('description', None) + super(SourceNodeBase, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.SourceNodeBase' # type: str -class Properties(msrest.serialization.Model): - """Metric properties. +class RtspSource(SourceNodeBase): + """RTSP source allows for media from an RTSP camera or generic RTSP server to be ingested into a pipeline. - 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. - :ivar service_specification: The service specifications. - :vartype service_specification: ~video_analyzer.models.ServiceSpecification + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param transport: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When + using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the + RTSP messages are exchanged through long lived HTTP connections, and the RTP packages are + interleaved in the HTTP connections alongside the RTSP messages. Possible values include: + "Http", "Tcp". + :type transport: str or ~video_analyzer.models.RtspTransport + :param endpoint: Required. RTSP endpoint information for Video Analyzer to connect to. This + contains the required information for Video Analyzer to connect to RTSP cameras and/or generic + RTSP servers. + :type endpoint: ~video_analyzer.models.EndpointBase """ _validation = { - 'service_specification': {'readonly': True}, + 'type': {'required': True}, + 'name': {'required': True}, + 'endpoint': {'required': True}, } _attribute_map = { - 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'transport': {'key': 'transport', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, } def __init__( self, **kwargs ): - super(Properties, self).__init__(**kwargs) - self.service_specification = None + super(RtspSource, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.RtspSource' # type: str + self.transport = kwargs.get('transport', None) + self.endpoint = kwargs['endpoint'] -class ResourceIdentity(msrest.serialization.Model): - """The user assigned managed identity to use when accessing a resource. +class TunnelBase(msrest.serialization.Model): + """Base class for tunnel objects. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecureIotDeviceRemoteTunnel. All required parameters must be populated in order to send to Azure. - :param user_assigned_identity: Required. The user assigned managed identity's resource - identifier to use when accessing a resource. - :type user_assigned_identity: str + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str """ _validation = { - 'user_assigned_identity': {'required': True}, + 'type': {'required': True}, } _attribute_map = { - 'user_assigned_identity': {'key': 'userAssignedIdentity', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel': 'SecureIotDeviceRemoteTunnel'} } def __init__( self, **kwargs ): - super(ResourceIdentity, self).__init__(**kwargs) - self.user_assigned_identity = kwargs['user_assigned_identity'] + super(TunnelBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] -class RsaTokenKey(TokenKey): - """Required validation properties for tokens generated with RSA algorithm. +class SecureIotDeviceRemoteTunnel(TunnelBase): + """A remote tunnel securely established using IoT Hub device information. All required parameters must be populated in order to send to Azure. :param type: Required. The discriminator for derived types.Constant filled by server. :type type: str - :param kid: Required. JWT token key id. Validation keys are looked up based on the key id - present on the JWT token header. - :type kid: str - :param alg: Required. RSA algorithm to be used: RS256, RS384 or RS512. Possible values include: - "RS256", "RS384", "RS512". - :type alg: str or ~video_analyzer.models.AccessPolicyRsaAlgo - :param n: Required. RSA public key modulus. - :type n: str - :param e: Required. RSA public key exponent. - :type e: str + :param iot_hub_name: Required. Name of the IoT Hub. + :type iot_hub_name: str + :param device_id: Required. The IoT device id to use when establishing the remote tunnel. This + string is case-sensitive. + :type device_id: str """ _validation = { 'type': {'required': True}, - 'kid': {'required': True}, - 'alg': {'required': True}, - 'n': {'required': True}, - 'e': {'required': True}, + 'iot_hub_name': {'required': True}, + 'device_id': {'required': True}, } _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, - 'kid': {'key': 'kid', 'type': 'str'}, - 'alg': {'key': 'alg', 'type': 'str'}, - 'n': {'key': 'n', 'type': 'str'}, - 'e': {'key': 'e', 'type': 'str'}, + 'iot_hub_name': {'key': 'iotHubName', 'type': 'str'}, + 'device_id': {'key': 'deviceId', 'type': 'str'}, } def __init__( self, **kwargs ): - super(RsaTokenKey, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.RsaTokenKey' # type: str - self.alg = kwargs['alg'] - self.n = kwargs['n'] - self.e = kwargs['e'] + super(SecureIotDeviceRemoteTunnel, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel' # type: str + self.iot_hub_name = kwargs['iot_hub_name'] + self.device_id = kwargs['device_id'] class ServiceSpecification(msrest.serialization.Model): @@ -1066,13 +2645,89 @@ def __init__( self.metric_specifications = None +class SinkNodeBase(NodeBase): + """Base class for topology sink nodes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VideoSink. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param inputs: Required. An array of upstream node references within the topology to be used as + inputs for this node. + :type inputs: list[~video_analyzer.models.NodeInput] + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.VideoSink': 'VideoSink'} + } + + def __init__( + self, + **kwargs + ): + super(SinkNodeBase, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.SinkNodeBase' # type: str + self.inputs = kwargs['inputs'] + + +class Sku(msrest.serialization.Model): + """The SKU details. + + 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 name: Required. The SKU name. Possible values include: "Live_S1", "Batch_S1". + :type name: str or ~video_analyzer.models.SkuName + :ivar tier: The SKU tier. Possible values include: "Standard". + :vartype tier: str or ~video_analyzer.models.SkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = kwargs['name'] + self.tier = None + + class StorageAccount(msrest.serialization.Model): """The details about the associated storage account. Variables are only populated by the server, and will be ignored when sending a request. - :param id: The ID of the storage account resource. Video Analyzer relies on tables, queues, and - blobs. The primary storage account must be a Standard Storage account (either + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the storage account resource. Video Analyzer relies on tables, + queues, and blobs. The primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). :type id: str :param identity: A managed identity that Video Analyzer will use to access the storage account. @@ -1082,6 +2737,7 @@ class StorageAccount(msrest.serialization.Model): """ _validation = { + 'id': {'required': True}, 'status': {'readonly': True}, } @@ -1096,30 +2752,11 @@ def __init__( **kwargs ): super(StorageAccount, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.id = kwargs['id'] self.identity = kwargs.get('identity', None) self.status = None -class SyncStorageKeysInput(msrest.serialization.Model): - """The input to the sync storage keys request. - - :param id: The ID of the storage account resource. - :type id: str - """ - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SyncStorageKeysInput, self).__init__(**kwargs) - self.id = kwargs.get('id', None) - - class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -1161,6 +2798,111 @@ def __init__( self.last_modified_at = kwargs.get('last_modified_at', None) +class TimeSequenceBase(msrest.serialization.Model): + """A sequence of datetime ranges as a string. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VideoSequenceAbsoluteTimeMarkers. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers': 'VideoSequenceAbsoluteTimeMarkers'} + } + + def __init__( + self, + **kwargs + ): + super(TimeSequenceBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class TlsEndpoint(EndpointBase): + """TLS endpoint describes an endpoint that the pipeline can connect to over TLS transport (data is encrypted in transit). + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Required. Credentials to be presented to the endpoint. + :type credentials: ~video_analyzer.models.CredentialsBase + :param url: Required. The endpoint URL for Video Analyzer to connect to. + :type url: str + :param tunnel: Describes the tunnel through which Video Analyzer can connect to the endpoint + URL. This is an optional property, typically used when the endpoint is behind a firewall. + :type tunnel: ~video_analyzer.models.TunnelBase + :param trusted_certificates: List of trusted certificate authorities when authenticating a TLS + connection. A null list designates that Azure Video Analyzer's list of trusted authorities + should be used. + :type trusted_certificates: ~video_analyzer.models.CertificateSource + :param validation_options: Validation options to use when authenticating a TLS connection. By + default, strict validation is used. + :type validation_options: ~video_analyzer.models.TlsValidationOptions + """ + + _validation = { + 'type': {'required': True}, + 'credentials': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + 'trusted_certificates': {'key': 'trustedCertificates', 'type': 'CertificateSource'}, + 'validation_options': {'key': 'validationOptions', 'type': 'TlsValidationOptions'}, + } + + def __init__( + self, + **kwargs + ): + super(TlsEndpoint, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.TlsEndpoint' # type: str + self.trusted_certificates = kwargs.get('trusted_certificates', None) + self.validation_options = kwargs.get('validation_options', None) + + +class TlsValidationOptions(msrest.serialization.Model): + """Options for controlling the validation of TLS endpoints. + + :param ignore_hostname: When set to 'true' causes the certificate subject name validation to be + skipped. Default is 'false'. + :type ignore_hostname: str + :param ignore_signature: When set to 'true' causes the certificate chain trust validation to be + skipped. Default is 'false'. + :type ignore_signature: str + """ + + _attribute_map = { + 'ignore_hostname': {'key': 'ignoreHostname', 'type': 'str'}, + 'ignore_signature': {'key': 'ignoreSignature', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(TlsValidationOptions, self).__init__(**kwargs) + self.ignore_hostname = kwargs.get('ignore_hostname', None) + self.ignore_signature = kwargs.get('ignore_signature', None) + + class TokenClaim(msrest.serialization.Model): """Properties for expected token claims. @@ -1206,6 +2948,9 @@ class TrackedResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. @@ -1216,6 +2961,7 @@ class TrackedResource(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, } @@ -1223,6 +2969,7 @@ class TrackedResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, } @@ -1236,6 +2983,43 @@ def __init__( self.location = kwargs['location'] +class UnsecuredEndpoint(EndpointBase): + """Unsecured endpoint describes an endpoint that the pipeline can connect to over clear transport (no encryption in transit). + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Required. Credentials to be presented to the endpoint. + :type credentials: ~video_analyzer.models.CredentialsBase + :param url: Required. The endpoint URL for Video Analyzer to connect to. + :type url: str + :param tunnel: Describes the tunnel through which Video Analyzer can connect to the endpoint + URL. This is an optional property, typically used when the endpoint is behind a firewall. + :type tunnel: ~video_analyzer.models.TunnelBase + """ + + _validation = { + 'type': {'required': True}, + 'credentials': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + } + + def __init__( + self, + **kwargs + ): + super(UnsecuredEndpoint, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.UnsecuredEndpoint' # type: str + + class UserAssignedManagedIdentity(msrest.serialization.Model): """The details of the user assigned managed identity used by the Video Analyzer resource. @@ -1266,8 +3050,45 @@ def __init__( self.principal_id = None +class UsernamePasswordCredentials(CredentialsBase): + """Username and password credentials. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param username: Required. Username to be presented as part of the credentials. + :type username: str + :param password: Required. Password to be presented as part of the credentials. It is + recommended that this value is parameterized as a secret string in order to prevent this value + to be returned as part of the resource on API requests. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(UsernamePasswordCredentials, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials' # type: str + self.username = kwargs['username'] + self.password = kwargs['password'] + + class VideoAnalyzer(TrackedResource): - """A Video Analyzer account. + """The Video Analyzer account. Variables are only populated by the server, and will be ignored when sending a request. @@ -1281,42 +3102,63 @@ class VideoAnalyzer(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. :type location: str - :ivar system_data: The system data of the Video Analyzer account. - :vartype system_data: ~video_analyzer.models.SystemData - :param identity: The set of managed identities associated with the Video Analyzer resource. + :param identity: The identities associated to the Video Analyzer resource. :type identity: ~video_analyzer.models.VideoAnalyzerIdentity :param storage_accounts: The storage accounts for this resource. :type storage_accounts: list[~video_analyzer.models.StorageAccount] - :ivar endpoints: The list of endpoints associated with this resource. + :ivar endpoints: The endpoints associated with this resource. :vartype endpoints: list[~video_analyzer.models.Endpoint] :param encryption: The account encryption properties. :type encryption: ~video_analyzer.models.AccountEncryption + :param iot_hubs: The IoT Hubs for this resource. + :type iot_hubs: list[~video_analyzer.models.IotHub] + :param public_network_access: Whether or not public network access is allowed for resources + under the Video Analyzer account. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~video_analyzer.models.PublicNetworkAccess + :param network_access_control: Network access control for Video Analyzer. + :type network_access_control: ~video_analyzer.models.NetworkAccessControl + :ivar provisioning_state: Provisioning state of the Video Analyzer account. Possible values + include: "Failed", "InProgress", "Succeeded". + :vartype provisioning_state: str or ~video_analyzer.models.ProvisioningState + :ivar private_endpoint_connections: Private Endpoint Connections created under Video Analyzer + account. + :vartype private_endpoint_connections: list[~video_analyzer.models.PrivateEndpointConnection] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'location': {'required': True}, 'system_data': {'readonly': True}, + 'location': {'required': True}, 'endpoints': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'identity': {'key': 'identity', 'type': 'VideoAnalyzerIdentity'}, 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHub]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_access_control': {'key': 'properties.networkAccessControl', 'type': 'NetworkAccessControl'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, } def __init__( @@ -1324,11 +3166,15 @@ def __init__( **kwargs ): super(VideoAnalyzer, self).__init__(**kwargs) - self.system_data = None self.identity = kwargs.get('identity', None) self.storage_accounts = kwargs.get('storage_accounts', None) self.endpoints = None self.encryption = kwargs.get('encryption', None) + self.iot_hubs = kwargs.get('iot_hubs', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.network_access_control = kwargs.get('network_access_control', None) + self.provisioning_state = None + self.private_endpoint_connections = None class VideoAnalyzerCollection(msrest.serialization.Model): @@ -1379,67 +3225,94 @@ def __init__( self.user_assigned_identities = kwargs.get('user_assigned_identities', None) -class VideoAnalyzerPropertiesUpdate(msrest.serialization.Model): - """Properties of the Video Analyzer account. +class VideoAnalyzerOperationStatus(msrest.serialization.Model): + """Status of video analyzer operation. - 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 storage_accounts: The storage accounts for this resource. - :type storage_accounts: list[~video_analyzer.models.StorageAccount] - :ivar endpoints: The list of endpoints associated with this resource. - :vartype endpoints: list[~video_analyzer.models.Endpoint] - :param encryption: The account encryption properties. - :type encryption: ~video_analyzer.models.AccountEncryption + :param name: Required. Operation identifier. + :type name: str + :param id: Operation resource ID. + :type id: str + :param start_time: Operation start time. + :type start_time: str + :param end_time: Operation end time. + :type end_time: str + :param status: Operation status. + :type status: str + :param error: The error detail. + :type error: ~video_analyzer.models.ErrorDetail """ _validation = { - 'endpoints': {'readonly': True}, + 'name': {'required': True}, } _attribute_map = { - 'storage_accounts': {'key': 'storageAccounts', 'type': '[StorageAccount]'}, - 'endpoints': {'key': 'endpoints', 'type': '[Endpoint]'}, - 'encryption': {'key': 'encryption', 'type': 'AccountEncryption'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( self, **kwargs ): - super(VideoAnalyzerPropertiesUpdate, self).__init__(**kwargs) - self.storage_accounts = kwargs.get('storage_accounts', None) - self.endpoints = None - self.encryption = kwargs.get('encryption', None) + super(VideoAnalyzerOperationStatus, self).__init__(**kwargs) + self.name = kwargs['name'] + self.id = kwargs.get('id', 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 VideoAnalyzerProperties(VideoAnalyzerPropertiesUpdate): - """VideoAnalyzerProperties. +class VideoAnalyzerPrivateEndpointConnectionOperationStatus(msrest.serialization.Model): + """Status of private endpoint connection operation. - 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 storage_accounts: The storage accounts for this resource. - :type storage_accounts: list[~video_analyzer.models.StorageAccount] - :ivar endpoints: The list of endpoints associated with this resource. - :vartype endpoints: list[~video_analyzer.models.Endpoint] - :param encryption: The account encryption properties. - :type encryption: ~video_analyzer.models.AccountEncryption + :param name: Required. Operation identifier. + :type name: str + :param id: Operation resource ID. + :type id: str + :param start_time: Operation start time. + :type start_time: str + :param end_time: Operation end time. + :type end_time: str + :param status: Operation status. + :type status: str + :param error: The error detail. + :type error: ~video_analyzer.models.ErrorDetail """ _validation = { - 'endpoints': {'readonly': True}, + 'name': {'required': True}, } _attribute_map = { - 'storage_accounts': {'key': 'storageAccounts', 'type': '[StorageAccount]'}, - 'endpoints': {'key': 'endpoints', 'type': '[Endpoint]'}, - 'encryption': {'key': 'encryption', 'type': 'AccountEncryption'}, + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, } def __init__( self, **kwargs ): - super(VideoAnalyzerProperties, self).__init__(**kwargs) + super(VideoAnalyzerPrivateEndpointConnectionOperationStatus, self).__init__(**kwargs) + self.name = kwargs['name'] + self.id = kwargs.get('id', 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 VideoAnalyzerUpdate(msrest.serialization.Model): @@ -1453,14 +3326,29 @@ class VideoAnalyzerUpdate(msrest.serialization.Model): :type identity: ~video_analyzer.models.VideoAnalyzerIdentity :param storage_accounts: The storage accounts for this resource. :type storage_accounts: list[~video_analyzer.models.StorageAccount] - :ivar endpoints: The list of endpoints associated with this resource. + :ivar endpoints: The endpoints associated with this resource. :vartype endpoints: list[~video_analyzer.models.Endpoint] :param encryption: The account encryption properties. :type encryption: ~video_analyzer.models.AccountEncryption + :param iot_hubs: The IoT Hubs for this resource. + :type iot_hubs: list[~video_analyzer.models.IotHub] + :param public_network_access: Whether or not public network access is allowed for resources + under the Video Analyzer account. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~video_analyzer.models.PublicNetworkAccess + :param network_access_control: Network access control for Video Analyzer. + :type network_access_control: ~video_analyzer.models.NetworkAccessControl + :ivar provisioning_state: Provisioning state of the Video Analyzer account. Possible values + include: "Failed", "InProgress", "Succeeded". + :vartype provisioning_state: str or ~video_analyzer.models.ProvisioningState + :ivar private_endpoint_connections: Private Endpoint Connections created under Video Analyzer + account. + :vartype private_endpoint_connections: list[~video_analyzer.models.PrivateEndpointConnection] """ _validation = { 'endpoints': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { @@ -1469,6 +3357,11 @@ class VideoAnalyzerUpdate(msrest.serialization.Model): 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHub]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_access_control': {'key': 'properties.networkAccessControl', 'type': 'NetworkAccessControl'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, } def __init__( @@ -1481,10 +3374,255 @@ def __init__( self.storage_accounts = kwargs.get('storage_accounts', None) self.endpoints = None self.encryption = kwargs.get('encryption', None) + self.iot_hubs = kwargs.get('iot_hubs', None) + self.public_network_access = kwargs.get('public_network_access', None) + self.network_access_control = kwargs.get('network_access_control', None) + self.provisioning_state = None + self.private_endpoint_connections = None + + +class VideoArchival(msrest.serialization.Model): + """Video archival properties. + + :param retention_period: Video retention period indicates the maximum age of the video archive + segments which are intended to be kept in storage. It must be provided in the ISO8601 duration + format in the granularity of days, up to a maximum of 10 years. For example, if this is set to + P30D (30 days), content older than 30 days will be periodically deleted. This value can be + updated at any time and the new desired retention period will be effective within 24 hours. + :type retention_period: str + """ + + _attribute_map = { + 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VideoArchival, self).__init__(**kwargs) + self.retention_period = kwargs.get('retention_period', None) + + +class VideoContentToken(msrest.serialization.Model): + """"Video content token grants access to the video content URLs.". + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar expiration_date: The content token expiration date in ISO8601 format (eg. + 2021-01-01T00:00:00Z). + :vartype expiration_date: ~datetime.datetime + :ivar token: The content token value to be added to the video content URL as the value for the + "token" query string parameter. The token is specific to a single video. + :vartype token: str + """ + + _validation = { + 'expiration_date': {'readonly': True}, + 'token': {'readonly': True}, + } + + _attribute_map = { + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'token': {'key': 'token', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VideoContentToken, self).__init__(**kwargs) + self.expiration_date = None + self.token = None + + +class VideoContentUrls(msrest.serialization.Model): + """Set of URLs to the video content. + + :param download_url: Video file download URL. This URL can be used in conjunction with the + video content authorization token to download the video MP4 file. The resulting MP4 file can be + played on any standard media player. It is available when the video type is 'file' and video + file is available for consumption. + :type download_url: str + :param archive_base_url: Video archive streaming base URL. The archived content can be + automatically played by the Azure Video Analyzer player widget. Alternatively, this URL can be + used in conjunction with the video content authorization token on any compatible DASH or HLS + players by appending the following to the base URL: + + .. code-block:: + + - HLSv4: /manifest(format=m3u8-aapl).m3u8 + - HLS CMAF: /manifest(format=m3u8-cmaf) + - DASH CMAF: /manifest(format=mpd-time-cmaf) + + Moreover, an ongoing video recording can be played in "live mode" with latencies which are + approximately double of the chosen video segment length. It is available when the video type is + 'archive' and video archiving is enabled. + :type archive_base_url: str + :param rtsp_tunnel_url: Video low-latency streaming URL. The live content can be automatically + played by the Azure Video Analyzer player widget. Alternatively, this URL can be used in + conjunction with the video content authorization token to expose a WebSocket tunneled RTSP + stream. It is available when the video type is 'archive' and a live, low-latency feed is + available from the source. + :type rtsp_tunnel_url: str + :param preview_image_urls: Video preview image URLs. These URLs can be used in conjunction with + the video content authorization token to download the most recent still image from the video + archive in different resolutions. They are available when the video type is 'archive' and + preview images are enabled. + :type preview_image_urls: ~video_analyzer.models.VideoPreviewImageUrls + """ + + _attribute_map = { + 'download_url': {'key': 'downloadUrl', 'type': 'str'}, + 'archive_base_url': {'key': 'archiveBaseUrl', 'type': 'str'}, + 'rtsp_tunnel_url': {'key': 'rtspTunnelUrl', 'type': 'str'}, + 'preview_image_urls': {'key': 'previewImageUrls', 'type': 'VideoPreviewImageUrls'}, + } + + def __init__( + self, + **kwargs + ): + super(VideoContentUrls, self).__init__(**kwargs) + self.download_url = kwargs.get('download_url', None) + self.archive_base_url = kwargs.get('archive_base_url', None) + self.rtsp_tunnel_url = kwargs.get('rtsp_tunnel_url', None) + self.preview_image_urls = kwargs.get('preview_image_urls', None) + + +class VideoCreationProperties(msrest.serialization.Model): + """Optional properties to be used in case a new video resource needs to be created on the service. These will not take effect if the video already exists. + + :param title: Optional title provided by the user. Value can be up to 256 characters long. + :type title: str + :param description: Optional description provided by the user. Value can be up to 2048 + characters long. + :type description: str + :param segment_length: Segment length indicates the length of individual content files + (segments) which are persisted to storage. Smaller segments provide lower archive playback + latency but generate larger volume of storage transactions. Larger segments reduce the amount + of storage transactions while increasing the archive playback latency. Value must be specified + in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary between 30 seconds to + 5 minutes, in 30 seconds increments. Changing this value after the initial call to create the + video resource can lead to errors when uploading content to the archive. Default value is 30 + seconds. This property is only allowed for topologies where "kind" is set to "live". + :type segment_length: str + :param retention_period: Video retention period indicates how long the video is kept in + storage. Value must be specified in ISO8601 duration format (i.e. "P1D" equals 1 day) and can + vary between 1 day to 10 years, in 1 day increments. When absent (null), all video content is + retained indefinitely. This property is only allowed for topologies where "kind" is set to + "live". + :type retention_period: str + """ + + _attribute_map = { + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VideoCreationProperties, self).__init__(**kwargs) + self.title = kwargs.get('title', None) + self.description = kwargs.get('description', None) + self.segment_length = kwargs.get('segment_length', None) + self.retention_period = kwargs.get('retention_period', None) + + +class VideoEncoderBase(msrest.serialization.Model): + """Base type for all video encoding presets, which define the recipe or instructions on how the input video should be processed. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VideoEncoderH264. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param bitrate_kbps: The maximum bitrate, in kilobits per second or Kbps, at which video should + be encoded. If omitted, encoder sets it automatically to try and match the quality of the input + video. + :type bitrate_kbps: str + :param frame_rate: The frame rate (in frames per second) of the encoded video. The value must + be greater than zero, and less than or equal to 300. If omitted, the encoder uses the average + frame rate of the input video. + :type frame_rate: str + :param scale: Describes the resolution of the encoded video. If omitted, the encoder uses the + resolution of the input video. + :type scale: ~video_analyzer.models.VideoScale + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + 'frame_rate': {'key': 'frameRate', 'type': 'str'}, + 'scale': {'key': 'scale', 'type': 'VideoScale'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.VideoEncoderH264': 'VideoEncoderH264'} + } + + def __init__( + self, + **kwargs + ): + super(VideoEncoderBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.bitrate_kbps = kwargs.get('bitrate_kbps', None) + self.frame_rate = kwargs.get('frame_rate', None) + self.scale = kwargs.get('scale', None) + + +class VideoEncoderH264(VideoEncoderBase): + """A custom preset for encoding video with the H.264 (AVC) codec. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param bitrate_kbps: The maximum bitrate, in kilobits per second or Kbps, at which video should + be encoded. If omitted, encoder sets it automatically to try and match the quality of the input + video. + :type bitrate_kbps: str + :param frame_rate: The frame rate (in frames per second) of the encoded video. The value must + be greater than zero, and less than or equal to 300. If omitted, the encoder uses the average + frame rate of the input video. + :type frame_rate: str + :param scale: Describes the resolution of the encoded video. If omitted, the encoder uses the + resolution of the input video. + :type scale: ~video_analyzer.models.VideoScale + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + 'frame_rate': {'key': 'frameRate', 'type': 'str'}, + 'scale': {'key': 'scale', 'type': 'VideoScale'}, + } + + def __init__( + self, + **kwargs + ): + super(VideoEncoderH264, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.VideoEncoderH264' # type: str class VideoEntity(ProxyResource): - """The representation of a single video in a Video Analyzer account. + """Represents a video resource within Azure Video Analyzer. Videos can be ingested from RTSP cameras through live pipelines or can be created by exporting sequences from existing captured video through a pipeline job. Videos ingested through live pipelines can be streamed through Azure Video Analyzer Player Widget or compatible players. Exported videos can be downloaded as MP4 files. Variables are only populated by the server, and will be ignored when sending a request. @@ -1496,7 +3634,8 @@ class VideoEntity(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: The system metadata relating to this resource. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~video_analyzer.models.SystemData :param title: Optional video title provided by the user. Value can be up to 256 characters long. @@ -1504,16 +3643,18 @@ class VideoEntity(ProxyResource): :param description: Optional video description provided by the user. Value can be up to 2048 characters long. :type description: str - :ivar type_properties_type: Type of the video archive. Different archive formats provide - different capabilities. Possible values include: "Archive". + :ivar type_properties_type: Video content type. Different content types are suitable for + different applications and scenarios. Possible values include: "Archive", "File". :vartype type_properties_type: str or ~video_analyzer.models.VideoType :ivar flags: Video flags contain information about the available video actions and its dynamic properties based on the current video state. :vartype flags: ~video_analyzer.models.VideoFlags - :ivar streaming: Video streaming holds information about video streaming URLs. - :vartype streaming: ~video_analyzer.models.VideoStreaming - :ivar media_info: Contains information about the video and audio content. - :vartype media_info: ~video_analyzer.models.VideoMediaInfo + :ivar content_urls: Set of URLs to the video content. + :vartype content_urls: ~video_analyzer.models.VideoContentUrls + :param media_info: Contains information about the video and audio content. + :type media_info: ~video_analyzer.models.VideoMediaInfo + :param archival: Video archival properties. + :type archival: ~video_analyzer.models.VideoArchival """ _validation = { @@ -1523,8 +3664,7 @@ class VideoEntity(ProxyResource): 'system_data': {'readonly': True}, 'type_properties_type': {'readonly': True}, 'flags': {'readonly': True}, - 'streaming': {'readonly': True}, - 'media_info': {'readonly': True}, + 'content_urls': {'readonly': True}, } _attribute_map = { @@ -1536,8 +3676,9 @@ class VideoEntity(ProxyResource): 'description': {'key': 'properties.description', 'type': 'str'}, 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'flags': {'key': 'properties.flags', 'type': 'VideoFlags'}, - 'streaming': {'key': 'properties.streaming', 'type': 'VideoStreaming'}, + 'content_urls': {'key': 'properties.contentUrls', 'type': 'VideoContentUrls'}, 'media_info': {'key': 'properties.mediaInfo', 'type': 'VideoMediaInfo'}, + 'archival': {'key': 'properties.archival', 'type': 'VideoArchival'}, } def __init__( @@ -1545,13 +3686,13 @@ def __init__( **kwargs ): super(VideoEntity, self).__init__(**kwargs) - self.system_data = None self.title = kwargs.get('title', None) self.description = kwargs.get('description', None) self.type_properties_type = None self.flags = None - self.streaming = None - self.media_info = None + self.content_urls = None + self.media_info = kwargs.get('media_info', None) + self.archival = kwargs.get('archival', None) class VideoEntityCollection(msrest.serialization.Model): @@ -1589,23 +3730,23 @@ class VideoFlags(msrest.serialization.Model): :param has_data: Required. Value indicating whether or not there has ever been data recorded or uploaded into the video. Newly created videos have this value set to false. :type has_data: bool - :param is_recording: Required. Value indicating whether or not the video is currently being - referenced be an active live pipeline. The fact that is being referenced, doesn't necessarily + :param is_in_use: Required. Value indicating whether or not the video is currently being + referenced be an active pipeline. The fact that is being referenced, doesn't necessarily indicate that data is being received. For example, video recording may be gated on events or camera may not be accessible at the time. - :type is_recording: bool + :type is_in_use: bool """ _validation = { 'can_stream': {'required': True}, 'has_data': {'required': True}, - 'is_recording': {'required': True}, + 'is_in_use': {'required': True}, } _attribute_map = { 'can_stream': {'key': 'canStream', 'type': 'bool'}, 'has_data': {'key': 'hasData', 'type': 'bool'}, - 'is_recording': {'key': 'isRecording', 'type': 'bool'}, + 'is_in_use': {'key': 'isInUse', 'type': 'bool'}, } def __init__( @@ -1615,95 +3756,236 @@ def __init__( super(VideoFlags, self).__init__(**kwargs) self.can_stream = kwargs['can_stream'] self.has_data = kwargs['has_data'] - self.is_recording = kwargs['is_recording'] + self.is_in_use = kwargs['is_in_use'] class VideoMediaInfo(msrest.serialization.Model): """Contains information about the video and audio content. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar segment_length: Video segment length indicates the length of individual video files + :param segment_length: Video segment length indicates the length of individual video files (segments) which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the archive playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary between 30 seconds to 5 minutes, in 30 seconds increments. - :vartype segment_length: str + :type segment_length: str + """ + + _attribute_map = { + 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VideoMediaInfo, self).__init__(**kwargs) + self.segment_length = kwargs.get('segment_length', None) + + +class VideoPreviewImageUrls(msrest.serialization.Model): + """Video preview image URLs. These URLs can be used in conjunction with the video content authorization token to download the most recent still image from the video archive in different resolutions. They are available when the video type is 'archive' and preview images are enabled. + + :param small: Low resolution preview image URL. + :type small: str + :param medium: Medium resolution preview image URL. + :type medium: str + :param large: High resolution preview image URL. + :type large: str + """ + + _attribute_map = { + 'small': {'key': 'small', 'type': 'str'}, + 'medium': {'key': 'medium', 'type': 'str'}, + 'large': {'key': 'large', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VideoPreviewImageUrls, self).__init__(**kwargs) + self.small = kwargs.get('small', None) + self.medium = kwargs.get('medium', None) + self.large = kwargs.get('large', None) + + +class VideoPublishingOptions(msrest.serialization.Model): + """Optional flags used to change how video is published. These are only allowed for topologies where "kind" is set to "live". + + :param disable_archive: When set to 'true' content will not be archived or recorded. This is + used, for example, when the topology is used only for low latency video streaming. Default is + 'false'. If set to 'true', then "disableRtspPublishing" must be set to 'false'. + :type disable_archive: str + :param disable_rtsp_publishing: When set to 'true' the RTSP playback URL will not be published, + disabling low latency streaming. This is used, for example, when the topology is used only for + archiving content. Default is 'false'. If set to 'true', then "disableArchive" must be set to + 'false'. + :type disable_rtsp_publishing: str + """ + + _attribute_map = { + 'disable_archive': {'key': 'disableArchive', 'type': 'str'}, + 'disable_rtsp_publishing': {'key': 'disableRtspPublishing', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VideoPublishingOptions, self).__init__(**kwargs) + self.disable_archive = kwargs.get('disable_archive', None) + self.disable_rtsp_publishing = kwargs.get('disable_rtsp_publishing', None) + + +class VideoScale(msrest.serialization.Model): + """The video scaling information. + + :param height: The desired output video height. + :type height: str + :param width: The desired output video width. + :type width: str + :param mode: Describes the video scaling mode to be applied. Default mode is 'Pad'. If the mode + is 'Pad' or 'Stretch' then both width and height must be specified. Else if the mode is + 'PreserveAspectRatio' then only one of width or height need be provided. Possible values + include: "Pad", "PreserveAspectRatio", "Stretch". + :type mode: str or ~video_analyzer.models.VideoScaleMode + """ + + _attribute_map = { + 'height': {'key': 'height', 'type': 'str'}, + 'width': {'key': 'width', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(VideoScale, self).__init__(**kwargs) + self.height = kwargs.get('height', None) + self.width = kwargs.get('width', None) + self.mode = kwargs.get('mode', None) + + +class VideoSequenceAbsoluteTimeMarkers(TimeSequenceBase): + """A sequence of absolute datetime ranges as a string. The datetime values should follow IS08601, and the sum of the ranges should add up to 24 hours or less. Currently, there can be only one range specified in the sequence. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param ranges: Required. The sequence of datetime ranges. Example: '[["2021-10-05T03:30:00Z", + "2021-10-05T03:40:00Z"]]'. + :type ranges: str """ _validation = { - 'segment_length': {'readonly': True}, + 'type': {'required': True}, + 'ranges': {'required': True}, } _attribute_map = { - 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'ranges': {'key': 'ranges', 'type': 'str'}, } def __init__( self, **kwargs ): - super(VideoMediaInfo, self).__init__(**kwargs) - self.segment_length = None + super(VideoSequenceAbsoluteTimeMarkers, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers' # type: str + self.ranges = kwargs['ranges'] -class VideoStreaming(msrest.serialization.Model): - """Video streaming holds information about video streaming URLs. +class VideoSink(SinkNodeBase): + """Video sink in a live topology allows for video and audio to be captured, optionally archived, and published via a video resource. If archiving is enabled, this results in a video of type 'archive'. If used in a batch topology, this allows for video and audio to be stored as a file, and published via a video resource of type 'file'. - :param archive_base_url: Video streaming base URL for the video archive. When present, archived - video can be played through the Azure Video Analyzer player. Alternatively, this URL can be - used with compatible DASH or HLS players by appending the following to the base URL: - - - * HLSv4: /manifest(format=m3u8-aapl).m3u8 - * HLS CMAF: /manifest(format=m3u8-cmaf) - * DASH CMAF: /manifest(format=mpd-time-cmaf) - - Moreover, an ongoing video recording can be played in "live mode" with latencies which are - approximately double of the chosen video segment length. - :type archive_base_url: str + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param inputs: Required. An array of upstream node references within the topology to be used as + inputs for this node. + :type inputs: list[~video_analyzer.models.NodeInput] + :param video_name: Required. Name of a new or existing video resource used to capture and + publish content. Note: if downstream of RTSP source, and if disableArchive is set to true, then + no content is archived. + :type video_name: str + :param video_creation_properties: Optional video properties to be used in case a new video + resource needs to be created on the service. + :type video_creation_properties: ~video_analyzer.models.VideoCreationProperties + :param video_publishing_options: Options to change how the video sink publishes content via the + video resource. This property is only allowed for topologies where "kind" is set to "live". + :type video_publishing_options: ~video_analyzer.models.VideoPublishingOptions """ + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'video_name': {'required': True}, + } + _attribute_map = { - 'archive_base_url': {'key': 'archiveBaseUrl', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + 'video_name': {'key': 'videoName', 'type': 'str'}, + 'video_creation_properties': {'key': 'videoCreationProperties', 'type': 'VideoCreationProperties'}, + 'video_publishing_options': {'key': 'videoPublishingOptions', 'type': 'VideoPublishingOptions'}, } def __init__( self, **kwargs ): - super(VideoStreaming, self).__init__(**kwargs) - self.archive_base_url = kwargs.get('archive_base_url', None) + super(VideoSink, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.VideoSink' # type: str + self.video_name = kwargs['video_name'] + self.video_creation_properties = kwargs.get('video_creation_properties', None) + self.video_publishing_options = kwargs.get('video_publishing_options', None) -class VideoStreamingToken(msrest.serialization.Model): - """Video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or DASH player. +class VideoSource(SourceNodeBase): + """Video source allows for content from a Video Analyzer video resource to be ingested into a pipeline. Currently supported only with batch pipelines. - 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. - :ivar expiration_date: The streaming token expiration date in ISO8601 format (eg. - 2021-01-01T00:00:00Z). - :vartype expiration_date: ~datetime.datetime - :ivar token: The streaming token value to be added to the video streaming URL as the value for - a "token" query string parameter. The token is specific to a single video. - :vartype token: str + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param video_name: Required. Name of the Video Analyzer video resource to be used as the + source. + :type video_name: str + :param time_sequences: Required. Describes a sequence of datetime ranges. The video source only + picks up recorded media within these ranges. + :type time_sequences: ~video_analyzer.models.TimeSequenceBase """ _validation = { - 'expiration_date': {'readonly': True}, - 'token': {'readonly': True}, + 'type': {'required': True}, + 'name': {'required': True}, + 'video_name': {'required': True}, + 'time_sequences': {'required': True}, } _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'token': {'key': 'token', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'video_name': {'key': 'videoName', 'type': 'str'}, + 'time_sequences': {'key': 'timeSequences', 'type': 'TimeSequenceBase'}, } def __init__( self, **kwargs ): - super(VideoStreamingToken, self).__init__(**kwargs) - self.expiration_date = None - self.token = None + super(VideoSource, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.VideoSource' # type: str + self.video_name = kwargs['video_name'] + self.time_sequences = kwargs['time_sequences'] diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models_py3.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models_py3.py index 29a6e66ece3b..ef25e8dafefc 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models_py3.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_models_py3.py @@ -28,18 +28,23 @@ class Resource(msrest.serialization.Model): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -50,6 +55,7 @@ def __init__( self.id = None self.name = None self.type = None + self.system_data = None class ProxyResource(Resource): @@ -65,18 +71,23 @@ class ProxyResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__( @@ -87,7 +98,7 @@ def __init__( class AccessPolicyEntity(ProxyResource): - """Policy that determines how a video can be accessed. + """Access policies help define the authentication rules, and control access to specific video resources. Variables are only populated by the server, and will be ignored when sending a request. @@ -99,7 +110,8 @@ class AccessPolicyEntity(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: The system metadata relating to this resource. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~video_analyzer.models.SystemData :param role: Defines the access level granted by this policy. Possible values include: "Reader". @@ -132,7 +144,6 @@ def __init__( **kwargs ): super(AccessPolicyEntity, self).__init__(**kwargs) - self.system_data = None self.role = role self.authentication = authentication @@ -209,6 +220,78 @@ def __init__( self.status = None +class AudioEncoderBase(msrest.serialization.Model): + """Base type for all audio encoder presets, which define the recipe or instructions on how audio should be processed. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: AudioEncoderAac. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param bitrate_kbps: Bitrate, in kilobits per second or Kbps, at which audio should be encoded + (2-channel stereo audio at a sampling rate of 48 kHz). Allowed values are 96, 112, 128, 160, + 192, 224, and 256. If omitted, the bitrate of the input audio is used. + :type bitrate_kbps: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.AudioEncoderAac': 'AudioEncoderAac'} + } + + def __init__( + self, + *, + bitrate_kbps: Optional[str] = None, + **kwargs + ): + super(AudioEncoderBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.bitrate_kbps = bitrate_kbps + + +class AudioEncoderAac(AudioEncoderBase): + """A custom preset for encoding audio with the AAC codec. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param bitrate_kbps: Bitrate, in kilobits per second or Kbps, at which audio should be encoded + (2-channel stereo audio at a sampling rate of 48 kHz). Allowed values are 96, 112, 128, 160, + 192, 224, and 256. If omitted, the bitrate of the input audio is used. + :type bitrate_kbps: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + } + + def __init__( + self, + *, + bitrate_kbps: Optional[str] = None, + **kwargs + ): + super(AudioEncoderAac, self).__init__(bitrate_kbps=bitrate_kbps, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.AudioEncoderAac' # type: str + + class AuthenticationBase(msrest.serialization.Model): """Base class for access policies authentication methods. @@ -241,6 +324,38 @@ def __init__( self.type = None # type: Optional[str] +class CertificateSource(msrest.serialization.Model): + """Base class for certificate sources. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: PemCertificateList. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.PemCertificateList': 'PemCertificateList'} + } + + def __init__( + self, + **kwargs + ): + super(CertificateSource, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + class CheckNameAvailabilityRequest(msrest.serialization.Model): """The check availability request body. @@ -299,6 +414,38 @@ def __init__( self.message = message +class CredentialsBase(msrest.serialization.Model): + """Base class for credential objects. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: UsernamePasswordCredentials. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.UsernamePasswordCredentials': 'UsernamePasswordCredentials'} + } + + def __init__( + self, + **kwargs + ): + super(CredentialsBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + class TokenKey(msrest.serialization.Model): """Key properties for JWT token validation. @@ -403,7 +550,8 @@ class EdgeModuleEntity(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: The system metadata relating to this resource. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~video_analyzer.models.SystemData :ivar edge_module_id: Internal ID generated for the instance of the Video Analyzer edge module. :vartype edge_module_id: str @@ -430,7 +578,6 @@ def __init__( **kwargs ): super(EdgeModuleEntity, self).__init__(**kwargs) - self.system_data = None self.edge_module_id = None @@ -494,15 +641,16 @@ def __init__( self.token = None -class Endpoint(msrest.serialization.Model): - """The endpoint details. +class EncoderPresetBase(msrest.serialization.Model): + """Base type for all encoder presets, which define the recipe or instructions on how the input content should be processed. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EncoderCustomPreset, EncoderSystemPreset. All required parameters must be populated in order to send to Azure. - :param endpoint_url: The URL of the endpoint. - :type endpoint_url: str - :param type: Required. The type of the endpoint. Possible values include: "ClientApi". - :type type: str or ~video_analyzer.models.VideoAnalyzerEndpointType + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str """ _validation = { @@ -510,495 +658,1880 @@ class Endpoint(msrest.serialization.Model): } _attribute_map = { - 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.EncoderCustomPreset': 'EncoderCustomPreset', '#Microsoft.VideoAnalyzer.EncoderSystemPreset': 'EncoderSystemPreset'} } def __init__( self, - *, - type: Union[str, "VideoAnalyzerEndpointType"], - endpoint_url: Optional[str] = None, **kwargs ): - super(Endpoint, self).__init__(**kwargs) - self.endpoint_url = endpoint_url - self.type = type + super(EncoderPresetBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] -class ErrorAdditionalInfo(msrest.serialization.Model): - """The resource management error additional info. +class EncoderCustomPreset(EncoderPresetBase): + """Describes a custom preset for encoding the input content using the encoder processor. - 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. - :ivar type: The additional info type. - :vartype type: str - :ivar info: The additional info. - :vartype info: str + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param audio_encoder: Describes a custom preset for encoding audio. + :type audio_encoder: ~video_analyzer.models.AudioEncoderBase + :param video_encoder: Describes a custom preset for encoding video. + :type video_encoder: ~video_analyzer.models.VideoEncoderBase """ _validation = { - 'type': {'readonly': True}, - 'info': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'info': {'key': 'info', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'audio_encoder': {'key': 'audioEncoder', 'type': 'AudioEncoderBase'}, + 'video_encoder': {'key': 'videoEncoder', 'type': 'VideoEncoderBase'}, } def __init__( self, + *, + audio_encoder: Optional["AudioEncoderBase"] = None, + video_encoder: Optional["VideoEncoderBase"] = None, **kwargs ): - super(ErrorAdditionalInfo, self).__init__(**kwargs) - self.type = None - self.info = None + super(EncoderCustomPreset, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.EncoderCustomPreset' # type: str + self.audio_encoder = audio_encoder + self.video_encoder = video_encoder -class ErrorDetail(msrest.serialization.Model): - """The error detail. +class NodeBase(msrest.serialization.Model): + """Base class for nodes. - Variables are only populated by the server, and will be ignored when sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: ProcessorNodeBase, SinkNodeBase, SourceNodeBase. - :ivar code: The error code. - :vartype code: str - :ivar message: The error message. - :vartype message: str - :ivar target: The error target. - :vartype target: str - :ivar details: The error details. - :vartype details: list[~video_analyzer.models.ErrorDetail] - :ivar additional_info: The error additional info. - :vartype additional_info: list[~video_analyzer.models.ErrorAdditionalInfo] + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str """ _validation = { - 'code': {'readonly': True}, - 'message': {'readonly': True}, - 'target': {'readonly': True}, - 'details': {'readonly': True}, - 'additional_info': {'readonly': True}, + 'type': {'required': True}, + 'name': {'required': True}, } _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - 'target': {'key': 'target', 'type': 'str'}, - 'details': {'key': 'details', 'type': '[ErrorDetail]'}, - 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.ProcessorNodeBase': 'ProcessorNodeBase', '#Microsoft.VideoAnalyzer.SinkNodeBase': 'SinkNodeBase', '#Microsoft.VideoAnalyzer.SourceNodeBase': 'SourceNodeBase'} } def __init__( self, + *, + name: str, **kwargs ): - super(ErrorDetail, self).__init__(**kwargs) - self.code = None - self.message = None - self.target = None - self.details = None - self.additional_info = None + super(NodeBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.name = name -class ErrorResponse(msrest.serialization.Model): - """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). +class ProcessorNodeBase(NodeBase): + """Base class for topology processor nodes. - :param error: The error object. - :type error: ~video_analyzer.models.ErrorDetail + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: EncoderProcessor. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param inputs: Required. An array of upstream node references within the topology to be used as + inputs for this node. + :type inputs: list[~video_analyzer.models.NodeInput] """ + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + _attribute_map = { - 'error': {'key': 'error', 'type': 'ErrorDetail'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.EncoderProcessor': 'EncoderProcessor'} } def __init__( self, *, - error: Optional["ErrorDetail"] = None, + name: str, + inputs: List["NodeInput"], **kwargs ): - super(ErrorResponse, self).__init__(**kwargs) - self.error = error + super(ProcessorNodeBase, self).__init__(name=name, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.ProcessorNodeBase' # type: str + self.inputs = inputs -class JwtAuthentication(AuthenticationBase): - """Properties for access validation based on JSON Web Tokens (JWT). +class EncoderProcessor(ProcessorNodeBase): + """Encoder processor allows for encoding of the input content. For example, it can used to change the resolution from 4K to 1280x720. All required parameters must be populated in order to send to Azure. :param type: Required. The discriminator for derived types.Constant filled by server. :type type: str - :param issuers: List of expected token issuers. Token issuer is valid if it matches at least - one of the given values. - :type issuers: list[str] - :param audiences: List of expected token audiences. Token audience is valid if it matches at - least one of the given values. - :type audiences: list[str] - :param claims: List of additional token claims to be validated. Token must contains all claims - and respective values for it to be valid. - :type claims: list[~video_analyzer.models.TokenClaim] - :param keys: List of keys which can be used to validate access tokens. Having multiple keys - allow for seamless key rotation of the token signing key. Token signature must match exactly - one key. - :type keys: list[~video_analyzer.models.TokenKey] + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param inputs: Required. An array of upstream node references within the topology to be used as + inputs for this node. + :type inputs: list[~video_analyzer.models.NodeInput] + :param preset: Required. The encoder preset, which defines the recipe or instructions on how + the input content should be processed. + :type preset: ~video_analyzer.models.EncoderPresetBase """ _validation = { 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'preset': {'required': True}, } _attribute_map = { 'type': {'key': '@type', 'type': 'str'}, - 'issuers': {'key': 'issuers', 'type': '[str]'}, - 'audiences': {'key': 'audiences', 'type': '[str]'}, - 'claims': {'key': 'claims', 'type': '[TokenClaim]'}, - 'keys': {'key': 'keys', 'type': '[TokenKey]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + 'preset': {'key': 'preset', 'type': 'EncoderPresetBase'}, } def __init__( self, *, - issuers: Optional[List[str]] = None, - audiences: Optional[List[str]] = None, - claims: Optional[List["TokenClaim"]] = None, - keys: Optional[List["TokenKey"]] = None, + name: str, + inputs: List["NodeInput"], + preset: "EncoderPresetBase", **kwargs ): - super(JwtAuthentication, self).__init__(**kwargs) - self.type = '#Microsoft.VideoAnalyzer.JwtAuthentication' # type: str - self.issuers = issuers + super(EncoderProcessor, self).__init__(name=name, inputs=inputs, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.EncoderProcessor' # type: str + self.preset = preset + + +class EncoderSystemPreset(EncoderPresetBase): + """Describes a built-in preset for encoding the input content using the encoder processor. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Name of the built-in encoding preset. Possible values include: + "SingleLayer_540p_H264_AAC", "SingleLayer_720p_H264_AAC", "SingleLayer_1080p_H264_AAC", + "SingleLayer_2160p_H264_AAC". + :type name: str or ~video_analyzer.models.EncoderSystemPresetType + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Union[str, "EncoderSystemPresetType"], + **kwargs + ): + super(EncoderSystemPreset, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.EncoderSystemPreset' # type: str + self.name = name + + +class Endpoint(msrest.serialization.Model): + """The endpoint details. + + All required parameters must be populated in order to send to Azure. + + :param endpoint_url: The URL of the endpoint. + :type endpoint_url: str + :param type: Required. The type of the endpoint. Possible values include: "ClientApi". + :type type: str or ~video_analyzer.models.VideoAnalyzerEndpointType + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'endpoint_url': {'key': 'endpointUrl', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__( + self, + *, + type: Union[str, "VideoAnalyzerEndpointType"], + endpoint_url: Optional[str] = None, + **kwargs + ): + super(Endpoint, self).__init__(**kwargs) + self.endpoint_url = endpoint_url + self.type = type + + +class EndpointBase(msrest.serialization.Model): + """Base class for endpoints. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: TlsEndpoint, UnsecuredEndpoint. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Required. Credentials to be presented to the endpoint. + :type credentials: ~video_analyzer.models.CredentialsBase + :param url: Required. The endpoint URL for Video Analyzer to connect to. + :type url: str + :param tunnel: Describes the tunnel through which Video Analyzer can connect to the endpoint + URL. This is an optional property, typically used when the endpoint is behind a firewall. + :type tunnel: ~video_analyzer.models.TunnelBase + """ + + _validation = { + 'type': {'required': True}, + 'credentials': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.TlsEndpoint': 'TlsEndpoint', '#Microsoft.VideoAnalyzer.UnsecuredEndpoint': 'UnsecuredEndpoint'} + } + + def __init__( + self, + *, + credentials: "CredentialsBase", + url: str, + tunnel: Optional["TunnelBase"] = None, + **kwargs + ): + super(EndpointBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.credentials = credentials + self.url = url + self.tunnel = tunnel + + +class ErrorAdditionalInfo(msrest.serialization.Model): + """The resource management error additional info. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The additional info type. + :vartype type: str + :ivar info: The additional info. + :vartype info: any + """ + + _validation = { + 'type': {'readonly': True}, + 'info': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'info': {'key': 'info', 'type': 'object'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorAdditionalInfo, self).__init__(**kwargs) + self.type = None + self.info = None + + +class ErrorDetail(msrest.serialization.Model): + """The error detail. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar code: The error code. + :vartype code: str + :ivar message: The error message. + :vartype message: str + :ivar target: The error target. + :vartype target: str + :ivar details: The error details. + :vartype details: list[~video_analyzer.models.ErrorDetail] + :ivar additional_info: The error additional info. + :vartype additional_info: list[~video_analyzer.models.ErrorAdditionalInfo] + """ + + _validation = { + 'code': {'readonly': True}, + 'message': {'readonly': True}, + 'target': {'readonly': True}, + 'details': {'readonly': True}, + 'additional_info': {'readonly': True}, + } + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + 'target': {'key': 'target', 'type': 'str'}, + 'details': {'key': 'details', 'type': '[ErrorDetail]'}, + 'additional_info': {'key': 'additionalInfo', 'type': '[ErrorAdditionalInfo]'}, + } + + def __init__( + self, + **kwargs + ): + super(ErrorDetail, self).__init__(**kwargs) + self.code = None + self.message = None + self.target = None + self.details = None + self.additional_info = None + + +class ErrorResponse(msrest.serialization.Model): + """Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). + + :param error: The error object. + :type error: ~video_analyzer.models.ErrorDetail + """ + + _attribute_map = { + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(ErrorResponse, self).__init__(**kwargs) + self.error = error + + +class GroupLevelAccessControl(msrest.serialization.Model): + """Group level network access control. + + :param public_network_access: Whether or not public network access is allowed for specified + resources under the Video Analyzer account. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~video_analyzer.models.PublicNetworkAccess + """ + + _attribute_map = { + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, + } + + def __init__( + self, + *, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + **kwargs + ): + super(GroupLevelAccessControl, self).__init__(**kwargs) + self.public_network_access = public_network_access + + +class IotHub(msrest.serialization.Model): + """The IoT Hub details. + + 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 id: Required. The IoT Hub resource identifier. + :type id: str + :param identity: Required. The IoT Hub identity. + :type identity: ~video_analyzer.models.ResourceIdentity + :ivar status: The current status of the Iot Hub mapping. + :vartype status: str + """ + + _validation = { + 'id': {'required': True}, + 'identity': {'required': True}, + 'status': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ResourceIdentity'}, + 'status': {'key': 'status', 'type': 'str'}, + } + + def __init__( + self, + *, + id: str, + identity: "ResourceIdentity", + **kwargs + ): + super(IotHub, self).__init__(**kwargs) + self.id = id + self.identity = identity + self.status = None + + +class JwtAuthentication(AuthenticationBase): + """Properties for access validation based on JSON Web Tokens (JWT). + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param issuers: List of expected token issuers. Token issuer is valid if it matches at least + one of the given values. + :type issuers: list[str] + :param audiences: List of expected token audiences. Token audience is valid if it matches at + least one of the given values. + :type audiences: list[str] + :param claims: List of additional token claims to be validated. Token must contains all claims + and respective values for it to be valid. + :type claims: list[~video_analyzer.models.TokenClaim] + :param keys: List of keys which can be used to validate access tokens. Having multiple keys + allow for seamless key rotation of the token signing key. Token signature must match exactly + one key. + :type keys: list[~video_analyzer.models.TokenKey] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'issuers': {'key': 'issuers', 'type': '[str]'}, + 'audiences': {'key': 'audiences', 'type': '[str]'}, + 'claims': {'key': 'claims', 'type': '[TokenClaim]'}, + 'keys': {'key': 'keys', 'type': '[TokenKey]'}, + } + + def __init__( + self, + *, + issuers: Optional[List[str]] = None, + audiences: Optional[List[str]] = None, + claims: Optional[List["TokenClaim"]] = None, + keys: Optional[List["TokenKey"]] = None, + **kwargs + ): + super(JwtAuthentication, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.JwtAuthentication' # type: str + self.issuers = issuers self.audiences = audiences self.claims = claims self.keys = keys -class KeyVaultProperties(msrest.serialization.Model): - """The details for accessing the encryption keys in Key Vault. +class KeyVaultProperties(msrest.serialization.Model): + """The details for accessing the encryption keys in Key Vault. + + 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 key_identifier: Required. The URL of the Key Vault key used to encrypt the account. The + key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key + without a version (for example https://vault/keys/mykey). + :type key_identifier: str + :ivar current_key_identifier: The current key used to encrypt Video Analyzer account, including + the key version. + :vartype current_key_identifier: str + """ + + _validation = { + 'key_identifier': {'required': True}, + 'current_key_identifier': {'readonly': True}, + } + + _attribute_map = { + 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, + 'current_key_identifier': {'key': 'currentKeyIdentifier', 'type': 'str'}, + } + + def __init__( + self, + *, + key_identifier: str, + **kwargs + ): + super(KeyVaultProperties, self).__init__(**kwargs) + self.key_identifier = key_identifier + self.current_key_identifier = None + + +class ListProvisioningTokenInput(msrest.serialization.Model): + """The input parameters to generate registration token for the Azure Video Analyzer IoT edge module. + + All required parameters must be populated in order to send to Azure. + + :param expiration_date: Required. The desired expiration date of the registration token. The + Azure Video Analyzer IoT edge module must be initialized and connected to the Internet prior to + the token expiration date. + :type expiration_date: ~datetime.datetime + """ + + _validation = { + 'expiration_date': {'required': True}, + } + + _attribute_map = { + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + expiration_date: datetime.datetime, + **kwargs + ): + super(ListProvisioningTokenInput, self).__init__(**kwargs) + self.expiration_date = expiration_date + + +class LivePipeline(ProxyResource): + """Live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving and publishing of content for a unique RTSP camera. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param topology_name: The reference to an existing pipeline topology defined for real-time + content processing. When activated, this live pipeline will process content according to the + pipeline topology definition. + :type topology_name: str + :param description: An optional description for the pipeline. + :type description: str + :param bitrate_kbps: Maximum bitrate capacity in Kbps reserved for the live pipeline. The + allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds + this capacity, then the service will disconnect temporarily from the camera. It will retry to + re-establish connection (with exponential backoff), checking to see if the camera bitrate is + now below the reserved capacity. Doing so will ensure that one 'noisy neighbor' does not affect + other live pipelines in your account. + :type bitrate_kbps: int + :ivar state: Current state of the pipeline (read-only). Possible values include: "Inactive", + "Activating", "Active", "Deactivating". + :vartype state: str or ~video_analyzer.models.LivePipelineState + :param parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :type parameters: list[~video_analyzer.models.ParameterDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'bitrate_kbps': {'key': 'properties.bitrateKbps', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + } + + def __init__( + self, + *, + topology_name: Optional[str] = None, + description: Optional[str] = None, + bitrate_kbps: Optional[int] = None, + parameters: Optional[List["ParameterDefinition"]] = None, + **kwargs + ): + super(LivePipeline, self).__init__(**kwargs) + self.topology_name = topology_name + self.description = description + self.bitrate_kbps = bitrate_kbps + self.state = None + self.parameters = parameters + + +class LivePipelineCollection(msrest.serialization.Model): + """A collection of LivePipeline items. + + :param value: A collection of LivePipeline items. + :type value: list[~video_analyzer.models.LivePipeline] + :param next_link: A link to the next page of the collection (when the collection contains too + many results to return in one response). + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[LivePipeline]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["LivePipeline"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(LivePipelineCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class LivePipelineOperationStatus(msrest.serialization.Model): + """Used for tracking the status of an operation on the live pipeline. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the live pipeline operation. + :vartype name: str + :ivar status: The status of the live pipeline operation. + :vartype status: str + :ivar error: The error details for the live pipeline operation. + :vartype error: ~video_analyzer.models.ErrorDetail + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(LivePipelineOperationStatus, self).__init__(**kwargs) + self.name = None + self.status = None + self.error = None + + +class LivePipelineUpdate(ProxyResource): + """Live pipeline represents a unique instance of a live topology, used for real-time ingestion, archiving and publishing of content for a unique RTSP camera. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param topology_name: The reference to an existing pipeline topology defined for real-time + content processing. When activated, this live pipeline will process content according to the + pipeline topology definition. + :type topology_name: str + :param description: An optional description for the pipeline. + :type description: str + :param bitrate_kbps: Maximum bitrate capacity in Kbps reserved for the live pipeline. The + allowed range is from 500 to 3000 Kbps in increments of 100 Kbps. If the RTSP camera exceeds + this capacity, then the service will disconnect temporarily from the camera. It will retry to + re-establish connection (with exponential backoff), checking to see if the camera bitrate is + now below the reserved capacity. Doing so will ensure that one 'noisy neighbor' does not affect + other live pipelines in your account. + :type bitrate_kbps: int + :ivar state: Current state of the pipeline (read-only). Possible values include: "Inactive", + "Activating", "Active", "Deactivating". + :vartype state: str or ~video_analyzer.models.LivePipelineState + :param parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :type parameters: list[~video_analyzer.models.ParameterDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'bitrate_kbps': {'key': 'properties.bitrateKbps', 'type': 'int'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + } + + def __init__( + self, + *, + topology_name: Optional[str] = None, + description: Optional[str] = None, + bitrate_kbps: Optional[int] = None, + parameters: Optional[List["ParameterDefinition"]] = None, + **kwargs + ): + super(LivePipelineUpdate, self).__init__(**kwargs) + self.topology_name = topology_name + self.description = description + self.bitrate_kbps = bitrate_kbps + self.state = None + self.parameters = parameters + + +class LogSpecification(msrest.serialization.Model): + """A diagnostic log emitted by service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The diagnostic log category name. + :vartype name: str + :ivar display_name: The diagnostic log category display name. + :vartype display_name: str + :ivar blob_duration: The time range for requests in each blob. + :vartype blob_duration: str + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'blob_duration': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LogSpecification, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.blob_duration = None + + +class MetricDimension(msrest.serialization.Model): + """A metric dimension. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The metric dimension name. + :vartype name: str + :ivar display_name: The display name for the dimension. + :vartype display_name: str + :ivar to_be_exported_for_shoebox: Whether to export metric to shoebox. + :vartype to_be_exported_for_shoebox: bool + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'to_be_exported_for_shoebox': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricDimension, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.to_be_exported_for_shoebox = None + + +class MetricSpecification(msrest.serialization.Model): + """A metric emitted by service. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The metric name. + :vartype name: str + :ivar display_name: The metric display name. + :vartype display_name: str + :ivar display_description: The metric display description. + :vartype display_description: str + :ivar unit: The metric unit. Possible values include: "Bytes", "Count", "Milliseconds". + :vartype unit: str or ~video_analyzer.models.MetricUnit + :ivar aggregation_type: The metric aggregation type. Possible values include: "Average", + "Count", "Total". + :vartype aggregation_type: str or ~video_analyzer.models.MetricAggregationType + :ivar lock_aggregation_type: The metric lock aggregation type. Possible values include: + "Average", "Count", "Total". + :vartype lock_aggregation_type: str or ~video_analyzer.models.MetricAggregationType + :param supported_aggregation_types: Supported aggregation types. + :type supported_aggregation_types: list[str] + :ivar dimensions: The metric dimensions. + :vartype dimensions: list[~video_analyzer.models.MetricDimension] + :ivar enable_regional_mdm_account: Indicates whether regional MDM account is enabled. + :vartype enable_regional_mdm_account: bool + :ivar source_mdm_account: The source MDM account. + :vartype source_mdm_account: str + :ivar source_mdm_namespace: The source MDM namespace. + :vartype source_mdm_namespace: str + :ivar supported_time_grain_types: The supported time grain types. + :vartype supported_time_grain_types: list[str] + """ + + _validation = { + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'display_description': {'readonly': True}, + 'unit': {'readonly': True}, + 'aggregation_type': {'readonly': True}, + 'lock_aggregation_type': {'readonly': True}, + 'dimensions': {'readonly': True}, + 'enable_regional_mdm_account': {'readonly': True}, + 'source_mdm_account': {'readonly': True}, + 'source_mdm_namespace': {'readonly': True}, + 'supported_time_grain_types': {'readonly': True}, + } + + _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'}, + 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + } + + def __init__( + self, + *, + supported_aggregation_types: Optional[List[str]] = None, + **kwargs + ): + super(MetricSpecification, self).__init__(**kwargs) + self.name = None + self.display_name = None + self.display_description = None + self.unit = None + self.aggregation_type = None + self.lock_aggregation_type = None + self.supported_aggregation_types = supported_aggregation_types + self.dimensions = None + self.enable_regional_mdm_account = None + self.source_mdm_account = None + self.source_mdm_namespace = None + self.supported_time_grain_types = None + + +class NetworkAccessControl(msrest.serialization.Model): + """Network access control for video analyzer account. + + :param integration: Public network access for integration group. + :type integration: ~video_analyzer.models.GroupLevelAccessControl + :param ingestion: Public network access for ingestion group. + :type ingestion: ~video_analyzer.models.GroupLevelAccessControl + :param consumption: Public network access for consumption group. + :type consumption: ~video_analyzer.models.GroupLevelAccessControl + """ + + _attribute_map = { + 'integration': {'key': 'integration', 'type': 'GroupLevelAccessControl'}, + 'ingestion': {'key': 'ingestion', 'type': 'GroupLevelAccessControl'}, + 'consumption': {'key': 'consumption', 'type': 'GroupLevelAccessControl'}, + } + + def __init__( + self, + *, + integration: Optional["GroupLevelAccessControl"] = None, + ingestion: Optional["GroupLevelAccessControl"] = None, + consumption: Optional["GroupLevelAccessControl"] = None, + **kwargs + ): + super(NetworkAccessControl, self).__init__(**kwargs) + self.integration = integration + self.ingestion = ingestion + self.consumption = consumption + + +class NodeInput(msrest.serialization.Model): + """Describes an input signal to be used on a pipeline node. + + All required parameters must be populated in order to send to Azure. + + :param node_name: Required. The name of the upstream node in the pipeline which output is used + as input of the current node. + :type node_name: str + """ + + _validation = { + 'node_name': {'required': True}, + } + + _attribute_map = { + 'node_name': {'key': 'nodeName', 'type': 'str'}, + } + + def __init__( + self, + *, + node_name: str, + **kwargs + ): + super(NodeInput, self).__init__(**kwargs) + self.node_name = node_name + + +class Operation(msrest.serialization.Model): + """An operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The operation name. + :type name: str + :param display: The operation display name. + :type display: ~video_analyzer.models.OperationDisplay + :param origin: Origin of the operation. + :type origin: str + :param properties: Operation properties format. + :type properties: ~video_analyzer.models.Properties + :param is_data_action: Whether the operation applies to data-plane. + :type is_data_action: bool + :param action_type: Indicates the action type. Possible values include: "Internal". + :type action_type: str or ~video_analyzer.models.ActionType + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'Properties'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, + 'action_type': {'key': 'actionType', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + display: Optional["OperationDisplay"] = None, + origin: Optional[str] = None, + properties: Optional["Properties"] = None, + is_data_action: Optional[bool] = None, + action_type: Optional[Union[str, "ActionType"]] = None, + **kwargs + ): + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + self.origin = origin + self.properties = properties + self.is_data_action = is_data_action + self.action_type = action_type + + +class OperationCollection(msrest.serialization.Model): + """A collection of Operation items. + + :param value: A collection of Operation items. + :type value: list[~video_analyzer.models.Operation] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Operation]'}, + } + + def __init__( + self, + *, + value: Optional[List["Operation"]] = None, + **kwargs + ): + super(OperationCollection, self).__init__(**kwargs) + self.value = value + + +class OperationDisplay(msrest.serialization.Model): + """Operation details. + + :param provider: The service provider. + :type provider: str + :param resource: Resource on which the operation is performed. + :type resource: str + :param operation: The operation type. + :type operation: str + :param description: The operation description. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__( + self, + *, + provider: Optional[str] = None, + resource: Optional[str] = None, + operation: Optional[str] = None, + description: Optional[str] = None, + **kwargs + ): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class ParameterDeclaration(msrest.serialization.Model): + """Single topology parameter declaration. Declared parameters can and must be referenced throughout the topology and can optionally have default values to be used when they are not defined in the pipelines. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the parameter. + :type name: str + :param type: Required. Type of the parameter. Possible values include: "String", + "SecretString", "Int", "Double", "Bool". + :type type: str or ~video_analyzer.models.ParameterType + :param description: Description of the parameter. + :type description: str + :param default: The default value for the parameter to be used if the pipeline does not specify + a value. + :type default: str + """ + + _validation = { + 'name': {'required': True}, + 'type': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'default': {'key': 'default', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + type: Union[str, "ParameterType"], + description: Optional[str] = None, + default: Optional[str] = None, + **kwargs + ): + super(ParameterDeclaration, self).__init__(**kwargs) + self.name = name + self.type = type + self.description = description + self.default = default + + +class ParameterDefinition(msrest.serialization.Model): + """Defines the parameter value of an specific pipeline topology parameter. See pipeline topology parameters for more information. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Name of the parameter declared in the pipeline topology. + :type name: str + :param value: Parameter value to be applied on this specific pipeline. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + value: Optional[str] = None, + **kwargs + ): + super(ParameterDefinition, self).__init__(**kwargs) + self.name = name + self.value = value + + +class PemCertificateList(CertificateSource): + """A list of PEM formatted certificates. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param certificates: Required. PEM formatted public certificates. One certificate per entry. + :type certificates: list[str] + """ + + _validation = { + 'type': {'required': True}, + 'certificates': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'certificates': {'key': 'certificates', 'type': '[str]'}, + } + + def __init__( + self, + *, + certificates: List[str], + **kwargs + ): + super(PemCertificateList, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.PemCertificateList' # type: str + self.certificates = certificates + + +class PipelineJob(ProxyResource): + """Pipeline job represents a unique instance of a batch topology, used for offline processing of selected portions of archived content. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param topology_name: Reference to an existing pipeline topology. When activated, this pipeline + job will process content according to the pipeline topology definition. + :type topology_name: str + :param description: An optional description for the pipeline. + :type description: str + :ivar state: Current state of the pipeline (read-only). Possible values include: "Processing", + "Canceled", "Completed", "Failed". + :vartype state: str or ~video_analyzer.models.PipelineJobState + :ivar expiration: The date-time by when this pipeline job will be automatically deleted from + your account. + :vartype expiration: ~datetime.datetime + :ivar error: Details about the error, in case the pipeline job fails. + :vartype error: ~video_analyzer.models.PipelineJobError + :param parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :type parameters: list[~video_analyzer.models.ParameterDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, + 'expiration': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'expiration': {'key': 'properties.expiration', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'PipelineJobError'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + } + + def __init__( + self, + *, + topology_name: Optional[str] = None, + description: Optional[str] = None, + parameters: Optional[List["ParameterDefinition"]] = None, + **kwargs + ): + super(PipelineJob, self).__init__(**kwargs) + self.topology_name = topology_name + self.description = description + self.state = None + self.expiration = None + self.error = None + self.parameters = parameters + + +class PipelineJobCollection(msrest.serialization.Model): + """A collection of PipelineJob items. + + :param value: A collection of PipelineJob items. + :type value: list[~video_analyzer.models.PipelineJob] + :param next_link: A link to the next page of the collection (when the collection contains too + many results to return in one response). + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[PipelineJob]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["PipelineJob"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(PipelineJobCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class PipelineJobError(msrest.serialization.Model): + """Details about the error for a failed pipeline job. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__( + self, + *, + code: Optional[str] = None, + message: Optional[str] = None, + **kwargs + ): + super(PipelineJobError, self).__init__(**kwargs) + self.code = code + self.message = message + + +class PipelineJobOperationStatus(msrest.serialization.Model): + """Used for tracking the status of an operation on the pipeline job. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar name: The name of the pipeline job operation. + :vartype name: str + :ivar status: The status of the pipeline job operation. + :vartype status: str + :ivar error: The error details for the pipeline job operation. + :vartype error: ~video_analyzer.models.ErrorDetail + """ + + _validation = { + 'name': {'readonly': True}, + 'status': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + **kwargs + ): + super(PipelineJobOperationStatus, self).__init__(**kwargs) + self.name = None + self.status = None + self.error = None + + +class PipelineJobUpdate(ProxyResource): + """Pipeline job represents a unique instance of a batch topology, used for offline processing of selected portions of archived content. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param topology_name: Reference to an existing pipeline topology. When activated, this pipeline + job will process content according to the pipeline topology definition. + :type topology_name: str + :param description: An optional description for the pipeline. + :type description: str + :ivar state: Current state of the pipeline (read-only). Possible values include: "Processing", + "Canceled", "Completed", "Failed". + :vartype state: str or ~video_analyzer.models.PipelineJobState + :ivar expiration: The date-time by when this pipeline job will be automatically deleted from + your account. + :vartype expiration: ~datetime.datetime + :ivar error: Details about the error, in case the pipeline job fails. + :vartype error: ~video_analyzer.models.PipelineJobError + :param parameters: List of the instance level parameter values for the user-defined topology + parameters. A pipeline can only define or override parameters values for parameters which have + been declared in the referenced topology. Topology parameters without a default value must be + defined. Topology parameters with a default value can be optionally be overridden. + :type parameters: list[~video_analyzer.models.ParameterDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'state': {'readonly': True}, + 'expiration': {'readonly': True}, + 'error': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'topology_name': {'key': 'properties.topologyName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'state': {'key': 'properties.state', 'type': 'str'}, + 'expiration': {'key': 'properties.expiration', 'type': 'iso-8601'}, + 'error': {'key': 'properties.error', 'type': 'PipelineJobError'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDefinition]'}, + } + + def __init__( + self, + *, + topology_name: Optional[str] = None, + description: Optional[str] = None, + parameters: Optional[List["ParameterDefinition"]] = None, + **kwargs + ): + super(PipelineJobUpdate, self).__init__(**kwargs) + self.topology_name = topology_name + self.description = description + self.state = None + self.expiration = None + self.error = None + self.parameters = parameters + + +class PipelineTopology(ProxyResource): + """Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP camera and archives the content can be reused across many different cameras, as long as the same processing is to be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: + + +* Parameters: list of user defined parameters that can be references across the topology nodes. +* Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. +* Processors: list of nodes which perform data analysis or transformations. +* Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. 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 key_identifier: Required. The URL of the Key Vault key used to encrypt the account. The - key may either be versioned (for example https://vault/keys/mykey/version1) or reference a key - without a version (for example https://vault/keys/mykey). - :type key_identifier: str - :ivar current_key_identifier: The current key used to encrypt Video Analyzer account, including - the key version. - :vartype current_key_identifier: str + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param kind: Required. Topology kind. Possible values include: "Live", "Batch". + :type kind: str or ~video_analyzer.models.Kind + :param sku: Required. Describes the properties of a SKU. + :type sku: ~video_analyzer.models.Sku + :param description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :type description: str + :param parameters: List of the topology parameter declarations. Parameters declared here can be + referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. + Parameters can have optional default values and can later be defined in individual instances of + the pipeline. + :type parameters: list[~video_analyzer.models.ParameterDeclaration] + :param sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :type sources: list[~video_analyzer.models.SourceNodeBase] + :param processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :type processors: list[~video_analyzer.models.ProcessorNodeBase] + :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :type sinks: list[~video_analyzer.models.SinkNodeBase] """ _validation = { - 'key_identifier': {'required': True}, - 'current_key_identifier': {'readonly': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'kind': {'required': True}, + 'sku': {'required': True}, } _attribute_map = { - 'key_identifier': {'key': 'keyIdentifier', 'type': 'str'}, - 'current_key_identifier': {'key': 'currentKeyIdentifier', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDeclaration]'}, + 'sources': {'key': 'properties.sources', 'type': '[SourceNodeBase]'}, + 'processors': {'key': 'properties.processors', 'type': '[ProcessorNodeBase]'}, + 'sinks': {'key': 'properties.sinks', 'type': '[SinkNodeBase]'}, } def __init__( self, *, - key_identifier: str, + kind: Union[str, "Kind"], + sku: "Sku", + description: Optional[str] = None, + parameters: Optional[List["ParameterDeclaration"]] = None, + sources: Optional[List["SourceNodeBase"]] = None, + processors: Optional[List["ProcessorNodeBase"]] = None, + sinks: Optional[List["SinkNodeBase"]] = None, **kwargs ): - super(KeyVaultProperties, self).__init__(**kwargs) - self.key_identifier = key_identifier - self.current_key_identifier = None - + super(PipelineTopology, self).__init__(**kwargs) + self.kind = kind + self.sku = sku + self.description = description + self.parameters = parameters + self.sources = sources + self.processors = processors + self.sinks = sinks -class ListProvisioningTokenInput(msrest.serialization.Model): - """The input parameters to generate registration token for the Azure Video Analyzer IoT edge module. - All required parameters must be populated in order to send to Azure. +class PipelineTopologyCollection(msrest.serialization.Model): + """A collection of PipelineTopology items. - :param expiration_date: Required. The desired expiration date of the registration token. The - Azure Video Analyzer IoT edge module must be initialized and connected to the Internet prior to - the token expiration date. - :type expiration_date: ~datetime.datetime + :param value: A collection of PipelineTopology items. + :type value: list[~video_analyzer.models.PipelineTopology] + :param next_link: A link to the next page of the collection (when the collection contains too + many results to return in one response). + :type next_link: str """ - _validation = { - 'expiration_date': {'required': True}, - } - _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'value': {'key': 'value', 'type': '[PipelineTopology]'}, + 'next_link': {'key': '@nextLink', 'type': 'str'}, } def __init__( self, *, - expiration_date: datetime.datetime, + value: Optional[List["PipelineTopology"]] = None, + next_link: Optional[str] = None, **kwargs ): - super(ListProvisioningTokenInput, self).__init__(**kwargs) - self.expiration_date = expiration_date + super(PipelineTopologyCollection, self).__init__(**kwargs) + self.value = value + self.next_link = next_link -class LogSpecification(msrest.serialization.Model): - """A diagnostic log emitted by service. +class PipelineTopologyUpdate(ProxyResource): + """Pipeline topology describes the processing steps to be applied when processing content for a particular outcome. The topology should be defined according to the scenario to be achieved and can be reused across many pipeline instances which share the same processing characteristics. For instance, a pipeline topology which captures content from a RTSP camera and archives the content can be reused across many different cameras, as long as the same processing is to be applied across all the cameras. Individual instance properties can be defined through the use of user-defined parameters, which allow for a topology to be parameterized. This allows individual pipelines refer to different values, such as individual cameras' RTSP endpoints and credentials. Overall a topology is composed of the following: + + +* Parameters: list of user defined parameters that can be references across the topology nodes. +* Sources: list of one or more data sources nodes such as an RTSP source which allows for content to be ingested from cameras. +* Processors: list of nodes which perform data analysis or transformations. +* Sinks: list of one or more data sinks which allow for data to be stored or exported to other destinations. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The diagnostic log category name. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. :vartype name: str - :ivar display_name: The diagnostic log category display name. - :vartype display_name: str - :ivar blob_duration: The time range for requests in each blob. - :vartype blob_duration: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param kind: Topology kind. Possible values include: "Live", "Batch". + :type kind: str or ~video_analyzer.models.Kind + :param sku: Describes the properties of a SKU. + :type sku: ~video_analyzer.models.Sku + :param description: An optional description of the pipeline topology. It is recommended that + the expected use of the topology to be described here. + :type description: str + :param parameters: List of the topology parameter declarations. Parameters declared here can be + referenced throughout the topology nodes through the use of "${PARAMETER_NAME}" string pattern. + Parameters can have optional default values and can later be defined in individual instances of + the pipeline. + :type parameters: list[~video_analyzer.models.ParameterDeclaration] + :param sources: List of the topology source nodes. Source nodes enable external data to be + ingested by the pipeline. + :type sources: list[~video_analyzer.models.SourceNodeBase] + :param processors: List of the topology processor nodes. Processor nodes enable pipeline data + to be analyzed, processed or transformed. + :type processors: list[~video_analyzer.models.ProcessorNodeBase] + :param sinks: List of the topology sink nodes. Sink nodes allow pipeline data to be stored or + exported. + :type sinks: list[~video_analyzer.models.SinkNodeBase] """ _validation = { + 'id': {'readonly': True}, 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'blob_duration': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'parameters': {'key': 'properties.parameters', 'type': '[ParameterDeclaration]'}, + 'sources': {'key': 'properties.sources', 'type': '[SourceNodeBase]'}, + 'processors': {'key': 'properties.processors', 'type': '[ProcessorNodeBase]'}, + 'sinks': {'key': 'properties.sinks', 'type': '[SinkNodeBase]'}, } def __init__( self, + *, + kind: Optional[Union[str, "Kind"]] = None, + sku: Optional["Sku"] = None, + description: Optional[str] = None, + parameters: Optional[List["ParameterDeclaration"]] = None, + sources: Optional[List["SourceNodeBase"]] = None, + processors: Optional[List["ProcessorNodeBase"]] = None, + sinks: Optional[List["SinkNodeBase"]] = None, **kwargs ): - super(LogSpecification, self).__init__(**kwargs) - self.name = None - self.display_name = None - self.blob_duration = None + super(PipelineTopologyUpdate, self).__init__(**kwargs) + self.kind = kind + self.sku = sku + self.description = description + self.parameters = parameters + self.sources = sources + self.processors = processors + self.sinks = sinks -class MetricDimension(msrest.serialization.Model): - """A metric dimension. +class PrivateEndpoint(msrest.serialization.Model): + """The Private Endpoint resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The metric dimension name. - :vartype name: str - :ivar display_name: The display name for the dimension. - :vartype display_name: str - :ivar to_be_exported_for_shoebox: Whether to export metric to shoebox. - :vartype to_be_exported_for_shoebox: bool + :ivar id: The ARM identifier for Private Endpoint. + :vartype id: str """ _validation = { - 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'to_be_exported_for_shoebox': {'readonly': True}, + 'id': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'display_name': {'key': 'displayName', 'type': 'str'}, - 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + 'id': {'key': 'id', 'type': 'str'}, } def __init__( self, **kwargs ): - super(MetricDimension, self).__init__(**kwargs) - self.name = None - self.display_name = None - self.to_be_exported_for_shoebox = None + super(PrivateEndpoint, self).__init__(**kwargs) + self.id = None -class MetricSpecification(msrest.serialization.Model): - """A metric emitted by service. +class PrivateEndpointConnection(Resource): + """The Private Endpoint Connection resource. Variables are only populated by the server, and will be ignored when sending a request. - :ivar name: The metric name. + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. :vartype name: str - :ivar display_name: The metric display name. - :vartype display_name: str - :ivar display_description: The metric display description. - :vartype display_description: str - :ivar unit: The metric unit. Possible values include: "Bytes", "Count", "Milliseconds". - :vartype unit: str or ~video_analyzer.models.MetricUnit - :ivar aggregation_type: The metric aggregation type. Possible values include: "Average", - "Count", "Total". - :vartype aggregation_type: str or ~video_analyzer.models.MetricAggregationType - :ivar lock_aggregation_type: The metric lock aggregation type. Possible values include: - "Average", "Count", "Total". - :vartype lock_aggregation_type: str or ~video_analyzer.models.MetricAggregationType - :param supported_aggregation_types: Supported aggregation types. - :type supported_aggregation_types: list[str] - :ivar dimensions: The metric dimensions. - :vartype dimensions: list[~video_analyzer.models.MetricDimension] - :ivar enable_regional_mdm_account: Indicates whether regional MDM account is enabled. - :vartype enable_regional_mdm_account: bool - :ivar source_mdm_account: The source MDM account. - :vartype source_mdm_account: str - :ivar source_mdm_namespace: The source MDM namespace. - :vartype source_mdm_namespace: str - :ivar supported_time_grain_types: The supported time grain types. - :vartype supported_time_grain_types: list[str] + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param private_endpoint: The resource of private end point. + :type private_endpoint: ~video_analyzer.models.PrivateEndpoint + :param private_link_service_connection_state: A collection of information about the state of + the connection between service consumer and provider. + :type private_link_service_connection_state: + ~video_analyzer.models.PrivateLinkServiceConnectionState + :ivar provisioning_state: The provisioning state of the private endpoint connection resource. + Possible values include: "Succeeded", "Creating", "Deleting", "Failed". + :vartype provisioning_state: str or + ~video_analyzer.models.PrivateEndpointConnectionProvisioningState """ _validation = { + 'id': {'readonly': True}, 'name': {'readonly': True}, - 'display_name': {'readonly': True}, - 'display_description': {'readonly': True}, - 'unit': {'readonly': True}, - 'aggregation_type': {'readonly': True}, - 'lock_aggregation_type': {'readonly': True}, - 'dimensions': {'readonly': True}, - 'enable_regional_mdm_account': {'readonly': True}, - 'source_mdm_account': {'readonly': True}, - 'source_mdm_namespace': {'readonly': True}, - 'supported_time_grain_types': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'provisioning_state': {'readonly': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, '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'}, - 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, - 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, - 'dimensions': {'key': 'dimensions', 'type': '[MetricDimension]'}, - 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, - 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, - 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, - 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } def __init__( self, *, - supported_aggregation_types: Optional[List[str]] = None, + private_endpoint: Optional["PrivateEndpoint"] = None, + private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, **kwargs ): - super(MetricSpecification, self).__init__(**kwargs) - self.name = None - self.display_name = None - self.display_description = None - self.unit = None - self.aggregation_type = None - self.lock_aggregation_type = None - self.supported_aggregation_types = supported_aggregation_types - self.dimensions = None - self.enable_regional_mdm_account = None - self.source_mdm_account = None - self.source_mdm_namespace = None - self.supported_time_grain_types = None + super(PrivateEndpointConnection, self).__init__(**kwargs) + self.private_endpoint = private_endpoint + self.private_link_service_connection_state = private_link_service_connection_state + self.provisioning_state = None -class Operation(msrest.serialization.Model): - """An operation. +class PrivateEndpointConnectionListResult(msrest.serialization.Model): + """List of private endpoint connection associated with the specified storage account. - All required parameters must be populated in order to send to Azure. + :param value: Array of private endpoint connections. + :type value: list[~video_analyzer.models.PrivateEndpointConnection] + """ - :param name: Required. The operation name. - :type name: str - :param display: The operation display name. - :type display: ~video_analyzer.models.OperationDisplay - :param origin: Origin of the operation. - :type origin: str - :param properties: Operation properties format. - :type properties: ~video_analyzer.models.Properties - :param is_data_action: Whether the operation applies to data-plane. - :type is_data_action: bool - :param action_type: Indicates the action type. Possible values include: "Internal". - :type action_type: str or ~video_analyzer.models.ActionType + _attribute_map = { + 'value': {'key': 'value', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + *, + value: Optional[List["PrivateEndpointConnection"]] = None, + **kwargs + ): + super(PrivateEndpointConnectionListResult, self).__init__(**kwargs) + self.value = value + + +class PrivateLinkResource(Resource): + """A private link resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified resource ID for the resource. Ex - + /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + "Microsoft.Storage/storageAccounts". + :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :ivar group_id: The private link resource group id. + :vartype group_id: str + :ivar required_members: The private link resource required member names. + :vartype required_members: list[str] + :param required_zone_names: The private link resource Private link DNS zone name. + :type required_zone_names: list[str] """ _validation = { - 'name': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'group_id': {'readonly': True}, + 'required_members': {'readonly': True}, } _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, - 'display': {'key': 'display', 'type': 'OperationDisplay'}, - 'origin': {'key': 'origin', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'Properties'}, - 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, - 'action_type': {'key': 'actionType', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'group_id': {'key': 'properties.groupId', 'type': 'str'}, + 'required_members': {'key': 'properties.requiredMembers', 'type': '[str]'}, + 'required_zone_names': {'key': 'properties.requiredZoneNames', 'type': '[str]'}, } def __init__( self, *, - name: str, - display: Optional["OperationDisplay"] = None, - origin: Optional[str] = None, - properties: Optional["Properties"] = None, - is_data_action: Optional[bool] = None, - action_type: Optional[Union[str, "ActionType"]] = None, + required_zone_names: Optional[List[str]] = None, **kwargs ): - super(Operation, self).__init__(**kwargs) - self.name = name - self.display = display - self.origin = origin - self.properties = properties - self.is_data_action = is_data_action - self.action_type = action_type + super(PrivateLinkResource, self).__init__(**kwargs) + self.group_id = None + self.required_members = None + self.required_zone_names = required_zone_names -class OperationCollection(msrest.serialization.Model): - """A collection of Operation items. +class PrivateLinkResourceListResult(msrest.serialization.Model): + """A list of private link resources. - :param value: A collection of Operation items. - :type value: list[~video_analyzer.models.Operation] + :param value: Array of private link resources. + :type value: list[~video_analyzer.models.PrivateLinkResource] """ _attribute_map = { - 'value': {'key': 'value', 'type': '[Operation]'}, + 'value': {'key': 'value', 'type': '[PrivateLinkResource]'}, } def __init__( self, *, - value: Optional[List["Operation"]] = None, + value: Optional[List["PrivateLinkResource"]] = None, **kwargs ): - super(OperationCollection, self).__init__(**kwargs) + super(PrivateLinkResourceListResult, self).__init__(**kwargs) self.value = value -class OperationDisplay(msrest.serialization.Model): - """Operation details. +class PrivateLinkServiceConnectionState(msrest.serialization.Model): + """A collection of information about the state of the connection between service consumer and provider. - :param provider: The service provider. - :type provider: str - :param resource: Resource on which the operation is performed. - :type resource: str - :param operation: The operation type. - :type operation: str - :param description: The operation description. + :param status: Indicates whether the connection has been Approved/Rejected/Removed by the owner + of the service. Possible values include: "Pending", "Approved", "Rejected". + :type status: str or ~video_analyzer.models.PrivateEndpointServiceConnectionStatus + :param description: The reason for approval/rejection of the connection. :type description: str + :param actions_required: A message indicating if changes on the service provider require any + updates on the consumer. + :type actions_required: str """ _attribute_map = { - 'provider': {'key': 'provider', 'type': 'str'}, - 'resource': {'key': 'resource', 'type': 'str'}, - 'operation': {'key': 'operation', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, + 'actions_required': {'key': 'actionsRequired', 'type': 'str'}, } def __init__( - self, - *, - provider: Optional[str] = None, - resource: Optional[str] = None, - operation: Optional[str] = None, + self, + *, + status: Optional[Union[str, "PrivateEndpointServiceConnectionStatus"]] = None, description: Optional[str] = None, + actions_required: Optional[str] = None, **kwargs ): - super(OperationDisplay, self).__init__(**kwargs) - self.provider = provider - self.resource = resource - self.operation = operation + super(PrivateLinkServiceConnectionState, self).__init__(**kwargs) + self.status = status self.description = description + self.actions_required = actions_required class Properties(msrest.serialization.Model): @@ -1105,6 +2638,163 @@ def __init__( self.e = e +class SourceNodeBase(NodeBase): + """Base class for topology source nodes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: RtspSource, VideoSource. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.RtspSource': 'RtspSource', '#Microsoft.VideoAnalyzer.VideoSource': 'VideoSource'} + } + + def __init__( + self, + *, + name: str, + **kwargs + ): + super(SourceNodeBase, self).__init__(name=name, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.SourceNodeBase' # type: str + + +class RtspSource(SourceNodeBase): + """RTSP source allows for media from an RTSP camera or generic RTSP server to be ingested into a pipeline. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param transport: Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When + using TCP, the RTP packets are interleaved on the TCP RTSP connection. When using HTTP, the + RTSP messages are exchanged through long lived HTTP connections, and the RTP packages are + interleaved in the HTTP connections alongside the RTSP messages. Possible values include: + "Http", "Tcp". + :type transport: str or ~video_analyzer.models.RtspTransport + :param endpoint: Required. RTSP endpoint information for Video Analyzer to connect to. This + contains the required information for Video Analyzer to connect to RTSP cameras and/or generic + RTSP servers. + :type endpoint: ~video_analyzer.models.EndpointBase + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'endpoint': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'transport': {'key': 'transport', 'type': 'str'}, + 'endpoint': {'key': 'endpoint', 'type': 'EndpointBase'}, + } + + def __init__( + self, + *, + name: str, + endpoint: "EndpointBase", + transport: Optional[Union[str, "RtspTransport"]] = None, + **kwargs + ): + super(RtspSource, self).__init__(name=name, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.RtspSource' # type: str + self.transport = transport + self.endpoint = endpoint + + +class TunnelBase(msrest.serialization.Model): + """Base class for tunnel objects. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: SecureIotDeviceRemoteTunnel. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel': 'SecureIotDeviceRemoteTunnel'} + } + + def __init__( + self, + **kwargs + ): + super(TunnelBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class SecureIotDeviceRemoteTunnel(TunnelBase): + """A remote tunnel securely established using IoT Hub device information. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param iot_hub_name: Required. Name of the IoT Hub. + :type iot_hub_name: str + :param device_id: Required. The IoT device id to use when establishing the remote tunnel. This + string is case-sensitive. + :type device_id: str + """ + + _validation = { + 'type': {'required': True}, + 'iot_hub_name': {'required': True}, + 'device_id': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'iot_hub_name': {'key': 'iotHubName', 'type': 'str'}, + 'device_id': {'key': 'deviceId', 'type': 'str'}, + } + + def __init__( + self, + *, + iot_hub_name: str, + device_id: str, + **kwargs + ): + super(SecureIotDeviceRemoteTunnel, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.SecureIotDeviceRemoteTunnel' # type: str + self.iot_hub_name = iot_hub_name + self.device_id = device_id + + class ServiceSpecification(msrest.serialization.Model): """The service metric specifications. @@ -1135,13 +2825,94 @@ def __init__( self.metric_specifications = None +class SinkNodeBase(NodeBase): + """Base class for topology sink nodes. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VideoSink. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param inputs: Required. An array of upstream node references within the topology to be used as + inputs for this node. + :type inputs: list[~video_analyzer.models.NodeInput] + """ + + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.VideoSink': 'VideoSink'} + } + + def __init__( + self, + *, + name: str, + inputs: List["NodeInput"], + **kwargs + ): + super(SinkNodeBase, self).__init__(name=name, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.SinkNodeBase' # type: str + self.inputs = inputs + + +class Sku(msrest.serialization.Model): + """The SKU details. + + 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 name: Required. The SKU name. Possible values include: "Live_S1", "Batch_S1". + :type name: str or ~video_analyzer.models.SkuName + :ivar tier: The SKU tier. Possible values include: "Standard". + :vartype tier: str or ~video_analyzer.models.SkuTier + """ + + _validation = { + 'name': {'required': True}, + 'tier': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'tier': {'key': 'tier', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Union[str, "SkuName"], + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.name = name + self.tier = None + + class StorageAccount(msrest.serialization.Model): """The details about the associated storage account. Variables are only populated by the server, and will be ignored when sending a request. - :param id: The ID of the storage account resource. Video Analyzer relies on tables, queues, and - blobs. The primary storage account must be a Standard Storage account (either + All required parameters must be populated in order to send to Azure. + + :param id: Required. The ID of the storage account resource. Video Analyzer relies on tables, + queues, and blobs. The primary storage account must be a Standard Storage account (either Microsoft.ClassicStorage or Microsoft.Storage). :type id: str :param identity: A managed identity that Video Analyzer will use to access the storage account. @@ -1151,6 +2922,7 @@ class StorageAccount(msrest.serialization.Model): """ _validation = { + 'id': {'required': True}, 'status': {'readonly': True}, } @@ -1163,7 +2935,7 @@ class StorageAccount(msrest.serialization.Model): def __init__( self, *, - id: Optional[str] = None, + id: str, identity: Optional["ResourceIdentity"] = None, **kwargs ): @@ -1173,73 +2945,166 @@ def __init__( self.status = None -class SyncStorageKeysInput(msrest.serialization.Model): - """The input to the sync storage keys request. +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. - :param id: The ID of the storage account resource. - :type id: str + :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 ~video_analyzer.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.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 ~video_analyzer.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + '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, *, - id: Optional[str] = None, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + 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 TimeSequenceBase(msrest.serialization.Model): + """A sequence of datetime ranges as a string. + + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VideoSequenceAbsoluteTimeMarkers. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers': 'VideoSequenceAbsoluteTimeMarkers'} + } + + def __init__( + self, + **kwargs + ): + super(TimeSequenceBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + + +class TlsEndpoint(EndpointBase): + """TLS endpoint describes an endpoint that the pipeline can connect to over TLS transport (data is encrypted in transit). + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Required. Credentials to be presented to the endpoint. + :type credentials: ~video_analyzer.models.CredentialsBase + :param url: Required. The endpoint URL for Video Analyzer to connect to. + :type url: str + :param tunnel: Describes the tunnel through which Video Analyzer can connect to the endpoint + URL. This is an optional property, typically used when the endpoint is behind a firewall. + :type tunnel: ~video_analyzer.models.TunnelBase + :param trusted_certificates: List of trusted certificate authorities when authenticating a TLS + connection. A null list designates that Azure Video Analyzer's list of trusted authorities + should be used. + :type trusted_certificates: ~video_analyzer.models.CertificateSource + :param validation_options: Validation options to use when authenticating a TLS connection. By + default, strict validation is used. + :type validation_options: ~video_analyzer.models.TlsValidationOptions + """ + + _validation = { + 'type': {'required': True}, + 'credentials': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + 'trusted_certificates': {'key': 'trustedCertificates', 'type': 'CertificateSource'}, + 'validation_options': {'key': 'validationOptions', 'type': 'TlsValidationOptions'}, + } + + def __init__( + self, + *, + credentials: "CredentialsBase", + url: str, + tunnel: Optional["TunnelBase"] = None, + trusted_certificates: Optional["CertificateSource"] = None, + validation_options: Optional["TlsValidationOptions"] = None, **kwargs ): - super(SyncStorageKeysInput, self).__init__(**kwargs) - self.id = id + super(TlsEndpoint, self).__init__(credentials=credentials, url=url, tunnel=tunnel, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.TlsEndpoint' # type: str + self.trusted_certificates = trusted_certificates + self.validation_options = validation_options -class SystemData(msrest.serialization.Model): - """Metadata pertaining to creation and last modification of the resource. +class TlsValidationOptions(msrest.serialization.Model): + """Options for controlling the validation of TLS endpoints. - :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 ~video_analyzer.models.CreatedByType - :param created_at: The timestamp of resource creation (UTC). - :type created_at: ~datetime.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 ~video_analyzer.models.CreatedByType - :param last_modified_at: The timestamp of resource last modification (UTC). - :type last_modified_at: ~datetime.datetime + :param ignore_hostname: When set to 'true' causes the certificate subject name validation to be + skipped. Default is 'false'. + :type ignore_hostname: str + :param ignore_signature: When set to 'true' causes the certificate chain trust validation to be + skipped. Default is 'false'. + :type ignore_signature: str """ _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'}, + 'ignore_hostname': {'key': 'ignoreHostname', 'type': 'str'}, + 'ignore_signature': {'key': 'ignoreSignature', 'type': 'str'}, } def __init__( self, *, - created_by: Optional[str] = None, - created_by_type: Optional[Union[str, "CreatedByType"]] = None, - created_at: Optional[datetime.datetime] = None, - last_modified_by: Optional[str] = None, - last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, - last_modified_at: Optional[datetime.datetime] = None, + ignore_hostname: Optional[str] = None, + ignore_signature: Optional[str] = None, **kwargs ): - 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 + super(TlsValidationOptions, self).__init__(**kwargs) + self.ignore_hostname = ignore_hostname + self.ignore_signature = ignore_signature class TokenClaim(msrest.serialization.Model): @@ -1290,6 +3155,9 @@ class TrackedResource(Resource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData :param tags: A set of tags. Resource tags. :type tags: dict[str, str] :param location: Required. The geo-location where the resource lives. @@ -1300,6 +3168,7 @@ class TrackedResource(Resource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, } @@ -1307,6 +3176,7 @@ class TrackedResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'location': {'key': 'location', 'type': 'str'}, } @@ -1323,6 +3193,47 @@ def __init__( self.location = location +class UnsecuredEndpoint(EndpointBase): + """Unsecured endpoint describes an endpoint that the pipeline can connect to over clear transport (no encryption in transit). + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param credentials: Required. Credentials to be presented to the endpoint. + :type credentials: ~video_analyzer.models.CredentialsBase + :param url: Required. The endpoint URL for Video Analyzer to connect to. + :type url: str + :param tunnel: Describes the tunnel through which Video Analyzer can connect to the endpoint + URL. This is an optional property, typically used when the endpoint is behind a firewall. + :type tunnel: ~video_analyzer.models.TunnelBase + """ + + _validation = { + 'type': {'required': True}, + 'credentials': {'required': True}, + 'url': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'credentials': {'key': 'credentials', 'type': 'CredentialsBase'}, + 'url': {'key': 'url', 'type': 'str'}, + 'tunnel': {'key': 'tunnel', 'type': 'TunnelBase'}, + } + + def __init__( + self, + *, + credentials: "CredentialsBase", + url: str, + tunnel: Optional["TunnelBase"] = None, + **kwargs + ): + super(UnsecuredEndpoint, self).__init__(credentials=credentials, url=url, tunnel=tunnel, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.UnsecuredEndpoint' # type: str + + class UserAssignedManagedIdentity(msrest.serialization.Model): """The details of the user assigned managed identity used by the Video Analyzer resource. @@ -1353,8 +3264,48 @@ def __init__( self.principal_id = None +class UsernamePasswordCredentials(CredentialsBase): + """Username and password credentials. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param username: Required. Username to be presented as part of the credentials. + :type username: str + :param password: Required. Password to be presented as part of the credentials. It is + recommended that this value is parameterized as a secret string in order to prevent this value + to be returned as part of the resource on API requests. + :type password: str + """ + + _validation = { + 'type': {'required': True}, + 'username': {'required': True}, + 'password': {'required': True}, + } + + _attribute_map = { + 'type': {'key': '@type', 'type': 'str'}, + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + } + + def __init__( + self, + *, + username: str, + password: str, + **kwargs + ): + super(UsernamePasswordCredentials, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.UsernamePasswordCredentials' # type: str + self.username = username + self.password = password + + class VideoAnalyzer(TrackedResource): - """A Video Analyzer account. + """The Video Analyzer account. Variables are only populated by the server, and will be ignored when sending a request. @@ -1368,232 +3319,583 @@ class VideoAnalyzer(TrackedResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. + :vartype system_data: ~video_analyzer.models.SystemData + :param tags: A set of tags. Resource tags. + :type tags: dict[str, str] + :param location: Required. The geo-location where the resource lives. + :type location: str + :param identity: The identities associated to the Video Analyzer resource. + :type identity: ~video_analyzer.models.VideoAnalyzerIdentity + :param storage_accounts: The storage accounts for this resource. + :type storage_accounts: list[~video_analyzer.models.StorageAccount] + :ivar endpoints: The endpoints associated with this resource. + :vartype endpoints: list[~video_analyzer.models.Endpoint] + :param encryption: The account encryption properties. + :type encryption: ~video_analyzer.models.AccountEncryption + :param iot_hubs: The IoT Hubs for this resource. + :type iot_hubs: list[~video_analyzer.models.IotHub] + :param public_network_access: Whether or not public network access is allowed for resources + under the Video Analyzer account. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~video_analyzer.models.PublicNetworkAccess + :param network_access_control: Network access control for Video Analyzer. + :type network_access_control: ~video_analyzer.models.NetworkAccessControl + :ivar provisioning_state: Provisioning state of the Video Analyzer account. Possible values + include: "Failed", "InProgress", "Succeeded". + :vartype provisioning_state: str or ~video_analyzer.models.ProvisioningState + :ivar private_endpoint_connections: Private Endpoint Connections created under Video Analyzer + account. + :vartype private_endpoint_connections: list[~video_analyzer.models.PrivateEndpointConnection] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'location': {'required': True}, + 'endpoints': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'location': {'key': 'location', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'VideoAnalyzerIdentity'}, + 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, + 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, + 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHub]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_access_control': {'key': 'properties.networkAccessControl', 'type': 'NetworkAccessControl'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, + } + + def __init__( + self, + *, + location: str, + tags: Optional[Dict[str, str]] = None, + identity: Optional["VideoAnalyzerIdentity"] = None, + storage_accounts: Optional[List["StorageAccount"]] = None, + encryption: Optional["AccountEncryption"] = None, + iot_hubs: Optional[List["IotHub"]] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + network_access_control: Optional["NetworkAccessControl"] = None, + **kwargs + ): + super(VideoAnalyzer, self).__init__(tags=tags, location=location, **kwargs) + self.identity = identity + self.storage_accounts = storage_accounts + self.endpoints = None + self.encryption = encryption + self.iot_hubs = iot_hubs + self.public_network_access = public_network_access + self.network_access_control = network_access_control + self.provisioning_state = None + self.private_endpoint_connections = None + + +class VideoAnalyzerCollection(msrest.serialization.Model): + """A collection of VideoAnalyzer items. + + :param value: A collection of VideoAnalyzer items. + :type value: list[~video_analyzer.models.VideoAnalyzer] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[VideoAnalyzer]'}, + } + + def __init__( + self, + *, + value: Optional[List["VideoAnalyzer"]] = None, + **kwargs + ): + super(VideoAnalyzerCollection, self).__init__(**kwargs) + self.value = value + + +class VideoAnalyzerIdentity(msrest.serialization.Model): + """The managed identity for the Video Analyzer resource. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The identity type. + :type type: str + :param user_assigned_identities: The User Assigned Managed Identities. + :type user_assigned_identities: dict[str, ~video_analyzer.models.UserAssignedManagedIdentity] + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedManagedIdentity}'}, + } + + def __init__( + self, + *, + type: str, + user_assigned_identities: Optional[Dict[str, "UserAssignedManagedIdentity"]] = None, + **kwargs + ): + super(VideoAnalyzerIdentity, self).__init__(**kwargs) + self.type = type + self.user_assigned_identities = user_assigned_identities + + +class VideoAnalyzerOperationStatus(msrest.serialization.Model): + """Status of video analyzer operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Operation identifier. + :type name: str + :param id: Operation resource ID. + :type id: str + :param start_time: Operation start time. + :type start_time: str + :param end_time: Operation end time. + :type end_time: str + :param status: Operation status. + :type status: str + :param error: The error detail. + :type error: ~video_analyzer.models.ErrorDetail + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + name: str, + id: Optional[str] = None, + start_time: Optional[str] = None, + end_time: Optional[str] = None, + status: Optional[str] = None, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(VideoAnalyzerOperationStatus, self).__init__(**kwargs) + self.name = name + self.id = id + self.start_time = start_time + self.end_time = end_time + self.status = status + self.error = error + + +class VideoAnalyzerPrivateEndpointConnectionOperationStatus(msrest.serialization.Model): + """Status of private endpoint connection operation. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Operation identifier. + :type name: str + :param id: Operation resource ID. + :type id: str + :param start_time: Operation start time. + :type start_time: str + :param end_time: Operation end time. + :type end_time: str + :param status: Operation status. + :type status: str + :param error: The error detail. + :type error: ~video_analyzer.models.ErrorDetail + """ + + _validation = { + 'name': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'error': {'key': 'error', 'type': 'ErrorDetail'}, + } + + def __init__( + self, + *, + name: str, + id: Optional[str] = None, + start_time: Optional[str] = None, + end_time: Optional[str] = None, + status: Optional[str] = None, + error: Optional["ErrorDetail"] = None, + **kwargs + ): + super(VideoAnalyzerPrivateEndpointConnectionOperationStatus, self).__init__(**kwargs) + self.name = name + self.id = id + self.start_time = start_time + self.end_time = end_time + self.status = status + self.error = error + + +class VideoAnalyzerUpdate(msrest.serialization.Model): + """The update operation for a Video Analyzer account. + + Variables are only populated by the server, and will be ignored when sending a request. + :param tags: A set of tags. Resource tags. :type tags: dict[str, str] - :param location: Required. The geo-location where the resource lives. - :type location: str - :ivar system_data: The system data of the Video Analyzer account. - :vartype system_data: ~video_analyzer.models.SystemData - :param identity: The set of managed identities associated with the Video Analyzer resource. + :param identity: The identities associated to the Video Analyzer resource. :type identity: ~video_analyzer.models.VideoAnalyzerIdentity :param storage_accounts: The storage accounts for this resource. :type storage_accounts: list[~video_analyzer.models.StorageAccount] - :ivar endpoints: The list of endpoints associated with this resource. + :ivar endpoints: The endpoints associated with this resource. :vartype endpoints: list[~video_analyzer.models.Endpoint] :param encryption: The account encryption properties. :type encryption: ~video_analyzer.models.AccountEncryption + :param iot_hubs: The IoT Hubs for this resource. + :type iot_hubs: list[~video_analyzer.models.IotHub] + :param public_network_access: Whether or not public network access is allowed for resources + under the Video Analyzer account. Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~video_analyzer.models.PublicNetworkAccess + :param network_access_control: Network access control for Video Analyzer. + :type network_access_control: ~video_analyzer.models.NetworkAccessControl + :ivar provisioning_state: Provisioning state of the Video Analyzer account. Possible values + include: "Failed", "InProgress", "Succeeded". + :vartype provisioning_state: str or ~video_analyzer.models.ProvisioningState + :ivar private_endpoint_connections: Private Endpoint Connections created under Video Analyzer + account. + :vartype private_endpoint_connections: list[~video_analyzer.models.PrivateEndpointConnection] """ _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'system_data': {'readonly': True}, 'endpoints': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'private_endpoint_connections': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'location': {'key': 'location', 'type': 'str'}, - 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'identity': {'key': 'identity', 'type': 'VideoAnalyzerIdentity'}, 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, + 'iot_hubs': {'key': 'properties.iotHubs', 'type': '[IotHub]'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'network_access_control': {'key': 'properties.networkAccessControl', 'type': 'NetworkAccessControl'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, + 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, } def __init__( self, *, - location: str, tags: Optional[Dict[str, str]] = None, identity: Optional["VideoAnalyzerIdentity"] = None, storage_accounts: Optional[List["StorageAccount"]] = None, encryption: Optional["AccountEncryption"] = None, + iot_hubs: Optional[List["IotHub"]] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, + network_access_control: Optional["NetworkAccessControl"] = None, **kwargs ): - super(VideoAnalyzer, self).__init__(tags=tags, location=location, **kwargs) - self.system_data = None + super(VideoAnalyzerUpdate, self).__init__(**kwargs) + self.tags = tags self.identity = identity self.storage_accounts = storage_accounts self.endpoints = None self.encryption = encryption - - -class VideoAnalyzerCollection(msrest.serialization.Model): - """A collection of VideoAnalyzer items. - - :param value: A collection of VideoAnalyzer items. - :type value: list[~video_analyzer.models.VideoAnalyzer] + self.iot_hubs = iot_hubs + self.public_network_access = public_network_access + self.network_access_control = network_access_control + self.provisioning_state = None + self.private_endpoint_connections = None + + +class VideoArchival(msrest.serialization.Model): + """Video archival properties. + + :param retention_period: Video retention period indicates the maximum age of the video archive + segments which are intended to be kept in storage. It must be provided in the ISO8601 duration + format in the granularity of days, up to a maximum of 10 years. For example, if this is set to + P30D (30 days), content older than 30 days will be periodically deleted. This value can be + updated at any time and the new desired retention period will be effective within 24 hours. + :type retention_period: str """ _attribute_map = { - 'value': {'key': 'value', 'type': '[VideoAnalyzer]'}, + 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, } def __init__( self, *, - value: Optional[List["VideoAnalyzer"]] = None, + retention_period: Optional[str] = None, **kwargs ): - super(VideoAnalyzerCollection, self).__init__(**kwargs) - self.value = value + super(VideoArchival, self).__init__(**kwargs) + self.retention_period = retention_period -class VideoAnalyzerIdentity(msrest.serialization.Model): - """The managed identity for the Video Analyzer resource. +class VideoContentToken(msrest.serialization.Model): + """"Video content token grants access to the video content URLs.". - All required parameters must be populated in order to send to Azure. + Variables are only populated by the server, and will be ignored when sending a request. - :param type: Required. The identity type. - :type type: str - :param user_assigned_identities: The User Assigned Managed Identities. - :type user_assigned_identities: dict[str, ~video_analyzer.models.UserAssignedManagedIdentity] + :ivar expiration_date: The content token expiration date in ISO8601 format (eg. + 2021-01-01T00:00:00Z). + :vartype expiration_date: ~datetime.datetime + :ivar token: The content token value to be added to the video content URL as the value for the + "token" query string parameter. The token is specific to a single video. + :vartype token: str """ _validation = { - 'type': {'required': True}, + 'expiration_date': {'readonly': True}, + 'token': {'readonly': True}, } _attribute_map = { - 'type': {'key': 'type', 'type': 'str'}, - 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedManagedIdentity}'}, + 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, + 'token': {'key': 'token', 'type': 'str'}, } def __init__( self, - *, - type: str, - user_assigned_identities: Optional[Dict[str, "UserAssignedManagedIdentity"]] = None, **kwargs ): - super(VideoAnalyzerIdentity, self).__init__(**kwargs) - self.type = type - self.user_assigned_identities = user_assigned_identities - + super(VideoContentToken, self).__init__(**kwargs) + self.expiration_date = None + self.token = None -class VideoAnalyzerPropertiesUpdate(msrest.serialization.Model): - """Properties of the Video Analyzer account. - Variables are only populated by the server, and will be ignored when sending a request. +class VideoContentUrls(msrest.serialization.Model): + """Set of URLs to the video content. - :param storage_accounts: The storage accounts for this resource. - :type storage_accounts: list[~video_analyzer.models.StorageAccount] - :ivar endpoints: The list of endpoints associated with this resource. - :vartype endpoints: list[~video_analyzer.models.Endpoint] - :param encryption: The account encryption properties. - :type encryption: ~video_analyzer.models.AccountEncryption + :param download_url: Video file download URL. This URL can be used in conjunction with the + video content authorization token to download the video MP4 file. The resulting MP4 file can be + played on any standard media player. It is available when the video type is 'file' and video + file is available for consumption. + :type download_url: str + :param archive_base_url: Video archive streaming base URL. The archived content can be + automatically played by the Azure Video Analyzer player widget. Alternatively, this URL can be + used in conjunction with the video content authorization token on any compatible DASH or HLS + players by appending the following to the base URL: + + .. code-block:: + + - HLSv4: /manifest(format=m3u8-aapl).m3u8 + - HLS CMAF: /manifest(format=m3u8-cmaf) + - DASH CMAF: /manifest(format=mpd-time-cmaf) + + Moreover, an ongoing video recording can be played in "live mode" with latencies which are + approximately double of the chosen video segment length. It is available when the video type is + 'archive' and video archiving is enabled. + :type archive_base_url: str + :param rtsp_tunnel_url: Video low-latency streaming URL. The live content can be automatically + played by the Azure Video Analyzer player widget. Alternatively, this URL can be used in + conjunction with the video content authorization token to expose a WebSocket tunneled RTSP + stream. It is available when the video type is 'archive' and a live, low-latency feed is + available from the source. + :type rtsp_tunnel_url: str + :param preview_image_urls: Video preview image URLs. These URLs can be used in conjunction with + the video content authorization token to download the most recent still image from the video + archive in different resolutions. They are available when the video type is 'archive' and + preview images are enabled. + :type preview_image_urls: ~video_analyzer.models.VideoPreviewImageUrls """ - _validation = { - 'endpoints': {'readonly': True}, + _attribute_map = { + 'download_url': {'key': 'downloadUrl', 'type': 'str'}, + 'archive_base_url': {'key': 'archiveBaseUrl', 'type': 'str'}, + 'rtsp_tunnel_url': {'key': 'rtspTunnelUrl', 'type': 'str'}, + 'preview_image_urls': {'key': 'previewImageUrls', 'type': 'VideoPreviewImageUrls'}, } + def __init__( + self, + *, + download_url: Optional[str] = None, + archive_base_url: Optional[str] = None, + rtsp_tunnel_url: Optional[str] = None, + preview_image_urls: Optional["VideoPreviewImageUrls"] = None, + **kwargs + ): + super(VideoContentUrls, self).__init__(**kwargs) + self.download_url = download_url + self.archive_base_url = archive_base_url + self.rtsp_tunnel_url = rtsp_tunnel_url + self.preview_image_urls = preview_image_urls + + +class VideoCreationProperties(msrest.serialization.Model): + """Optional properties to be used in case a new video resource needs to be created on the service. These will not take effect if the video already exists. + + :param title: Optional title provided by the user. Value can be up to 256 characters long. + :type title: str + :param description: Optional description provided by the user. Value can be up to 2048 + characters long. + :type description: str + :param segment_length: Segment length indicates the length of individual content files + (segments) which are persisted to storage. Smaller segments provide lower archive playback + latency but generate larger volume of storage transactions. Larger segments reduce the amount + of storage transactions while increasing the archive playback latency. Value must be specified + in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary between 30 seconds to + 5 minutes, in 30 seconds increments. Changing this value after the initial call to create the + video resource can lead to errors when uploading content to the archive. Default value is 30 + seconds. This property is only allowed for topologies where "kind" is set to "live". + :type segment_length: str + :param retention_period: Video retention period indicates how long the video is kept in + storage. Value must be specified in ISO8601 duration format (i.e. "P1D" equals 1 day) and can + vary between 1 day to 10 years, in 1 day increments. When absent (null), all video content is + retained indefinitely. This property is only allowed for topologies where "kind" is set to + "live". + :type retention_period: str + """ + _attribute_map = { - 'storage_accounts': {'key': 'storageAccounts', 'type': '[StorageAccount]'}, - 'endpoints': {'key': 'endpoints', 'type': '[Endpoint]'}, - 'encryption': {'key': 'encryption', 'type': 'AccountEncryption'}, + 'title': {'key': 'title', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + 'retention_period': {'key': 'retentionPeriod', 'type': 'str'}, } def __init__( self, *, - storage_accounts: Optional[List["StorageAccount"]] = None, - encryption: Optional["AccountEncryption"] = None, + title: Optional[str] = None, + description: Optional[str] = None, + segment_length: Optional[str] = None, + retention_period: Optional[str] = None, **kwargs ): - super(VideoAnalyzerPropertiesUpdate, self).__init__(**kwargs) - self.storage_accounts = storage_accounts - self.endpoints = None - self.encryption = encryption + super(VideoCreationProperties, self).__init__(**kwargs) + self.title = title + self.description = description + self.segment_length = segment_length + self.retention_period = retention_period -class VideoAnalyzerProperties(VideoAnalyzerPropertiesUpdate): - """VideoAnalyzerProperties. +class VideoEncoderBase(msrest.serialization.Model): + """Base type for all video encoding presets, which define the recipe or instructions on how the input video should be processed. - Variables are only populated by the server, and will be ignored when sending a request. + You probably want to use the sub-classes and not this class directly. Known + sub-classes are: VideoEncoderH264. - :param storage_accounts: The storage accounts for this resource. - :type storage_accounts: list[~video_analyzer.models.StorageAccount] - :ivar endpoints: The list of endpoints associated with this resource. - :vartype endpoints: list[~video_analyzer.models.Endpoint] - :param encryption: The account encryption properties. - :type encryption: ~video_analyzer.models.AccountEncryption + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param bitrate_kbps: The maximum bitrate, in kilobits per second or Kbps, at which video should + be encoded. If omitted, encoder sets it automatically to try and match the quality of the input + video. + :type bitrate_kbps: str + :param frame_rate: The frame rate (in frames per second) of the encoded video. The value must + be greater than zero, and less than or equal to 300. If omitted, the encoder uses the average + frame rate of the input video. + :type frame_rate: str + :param scale: Describes the resolution of the encoded video. If omitted, the encoder uses the + resolution of the input video. + :type scale: ~video_analyzer.models.VideoScale """ _validation = { - 'endpoints': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'storage_accounts': {'key': 'storageAccounts', 'type': '[StorageAccount]'}, - 'endpoints': {'key': 'endpoints', 'type': '[Endpoint]'}, - 'encryption': {'key': 'encryption', 'type': 'AccountEncryption'}, + 'type': {'key': '@type', 'type': 'str'}, + 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + 'frame_rate': {'key': 'frameRate', 'type': 'str'}, + 'scale': {'key': 'scale', 'type': 'VideoScale'}, + } + + _subtype_map = { + 'type': {'#Microsoft.VideoAnalyzer.VideoEncoderH264': 'VideoEncoderH264'} } def __init__( self, *, - storage_accounts: Optional[List["StorageAccount"]] = None, - encryption: Optional["AccountEncryption"] = None, + bitrate_kbps: Optional[str] = None, + frame_rate: Optional[str] = None, + scale: Optional["VideoScale"] = None, **kwargs ): - super(VideoAnalyzerProperties, self).__init__(storage_accounts=storage_accounts, encryption=encryption, **kwargs) + super(VideoEncoderBase, self).__init__(**kwargs) + self.type = None # type: Optional[str] + self.bitrate_kbps = bitrate_kbps + self.frame_rate = frame_rate + self.scale = scale -class VideoAnalyzerUpdate(msrest.serialization.Model): - """The update operation for a Video Analyzer account. +class VideoEncoderH264(VideoEncoderBase): + """A custom preset for encoding video with the H.264 (AVC) codec. - 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 tags: A set of tags. Resource tags. - :type tags: dict[str, str] - :param identity: The identities associated to the Video Analyzer resource. - :type identity: ~video_analyzer.models.VideoAnalyzerIdentity - :param storage_accounts: The storage accounts for this resource. - :type storage_accounts: list[~video_analyzer.models.StorageAccount] - :ivar endpoints: The list of endpoints associated with this resource. - :vartype endpoints: list[~video_analyzer.models.Endpoint] - :param encryption: The account encryption properties. - :type encryption: ~video_analyzer.models.AccountEncryption + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param bitrate_kbps: The maximum bitrate, in kilobits per second or Kbps, at which video should + be encoded. If omitted, encoder sets it automatically to try and match the quality of the input + video. + :type bitrate_kbps: str + :param frame_rate: The frame rate (in frames per second) of the encoded video. The value must + be greater than zero, and less than or equal to 300. If omitted, the encoder uses the average + frame rate of the input video. + :type frame_rate: str + :param scale: Describes the resolution of the encoded video. If omitted, the encoder uses the + resolution of the input video. + :type scale: ~video_analyzer.models.VideoScale """ _validation = { - 'endpoints': {'readonly': True}, + 'type': {'required': True}, } _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'identity': {'key': 'identity', 'type': 'VideoAnalyzerIdentity'}, - 'storage_accounts': {'key': 'properties.storageAccounts', 'type': '[StorageAccount]'}, - 'endpoints': {'key': 'properties.endpoints', 'type': '[Endpoint]'}, - 'encryption': {'key': 'properties.encryption', 'type': 'AccountEncryption'}, + 'type': {'key': '@type', 'type': 'str'}, + 'bitrate_kbps': {'key': 'bitrateKbps', 'type': 'str'}, + 'frame_rate': {'key': 'frameRate', 'type': 'str'}, + 'scale': {'key': 'scale', 'type': 'VideoScale'}, } def __init__( self, *, - tags: Optional[Dict[str, str]] = None, - identity: Optional["VideoAnalyzerIdentity"] = None, - storage_accounts: Optional[List["StorageAccount"]] = None, - encryption: Optional["AccountEncryption"] = None, + bitrate_kbps: Optional[str] = None, + frame_rate: Optional[str] = None, + scale: Optional["VideoScale"] = None, **kwargs ): - super(VideoAnalyzerUpdate, self).__init__(**kwargs) - self.tags = tags - self.identity = identity - self.storage_accounts = storage_accounts - self.endpoints = None - self.encryption = encryption + super(VideoEncoderH264, self).__init__(bitrate_kbps=bitrate_kbps, frame_rate=frame_rate, scale=scale, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.VideoEncoderH264' # type: str class VideoEntity(ProxyResource): - """The representation of a single video in a Video Analyzer account. + """Represents a video resource within Azure Video Analyzer. Videos can be ingested from RTSP cameras through live pipelines or can be created by exporting sequences from existing captured video through a pipeline job. Videos ingested through live pipelines can be streamed through Azure Video Analyzer Player Widget or compatible players. Exported videos can be downloaded as MP4 files. Variables are only populated by the server, and will be ignored when sending a request. @@ -1605,7 +3907,8 @@ class VideoEntity(ProxyResource): :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". :vartype type: str - :ivar system_data: The system metadata relating to this resource. + :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy + information. :vartype system_data: ~video_analyzer.models.SystemData :param title: Optional video title provided by the user. Value can be up to 256 characters long. @@ -1613,16 +3916,18 @@ class VideoEntity(ProxyResource): :param description: Optional video description provided by the user. Value can be up to 2048 characters long. :type description: str - :ivar type_properties_type: Type of the video archive. Different archive formats provide - different capabilities. Possible values include: "Archive". + :ivar type_properties_type: Video content type. Different content types are suitable for + different applications and scenarios. Possible values include: "Archive", "File". :vartype type_properties_type: str or ~video_analyzer.models.VideoType :ivar flags: Video flags contain information about the available video actions and its dynamic properties based on the current video state. :vartype flags: ~video_analyzer.models.VideoFlags - :ivar streaming: Video streaming holds information about video streaming URLs. - :vartype streaming: ~video_analyzer.models.VideoStreaming - :ivar media_info: Contains information about the video and audio content. - :vartype media_info: ~video_analyzer.models.VideoMediaInfo + :ivar content_urls: Set of URLs to the video content. + :vartype content_urls: ~video_analyzer.models.VideoContentUrls + :param media_info: Contains information about the video and audio content. + :type media_info: ~video_analyzer.models.VideoMediaInfo + :param archival: Video archival properties. + :type archival: ~video_analyzer.models.VideoArchival """ _validation = { @@ -1632,8 +3937,7 @@ class VideoEntity(ProxyResource): 'system_data': {'readonly': True}, 'type_properties_type': {'readonly': True}, 'flags': {'readonly': True}, - 'streaming': {'readonly': True}, - 'media_info': {'readonly': True}, + 'content_urls': {'readonly': True}, } _attribute_map = { @@ -1645,8 +3949,9 @@ class VideoEntity(ProxyResource): 'description': {'key': 'properties.description', 'type': 'str'}, 'type_properties_type': {'key': 'properties.type', 'type': 'str'}, 'flags': {'key': 'properties.flags', 'type': 'VideoFlags'}, - 'streaming': {'key': 'properties.streaming', 'type': 'VideoStreaming'}, + 'content_urls': {'key': 'properties.contentUrls', 'type': 'VideoContentUrls'}, 'media_info': {'key': 'properties.mediaInfo', 'type': 'VideoMediaInfo'}, + 'archival': {'key': 'properties.archival', 'type': 'VideoArchival'}, } def __init__( @@ -1654,16 +3959,18 @@ def __init__( *, title: Optional[str] = None, description: Optional[str] = None, + media_info: Optional["VideoMediaInfo"] = None, + archival: Optional["VideoArchival"] = None, **kwargs ): super(VideoEntity, self).__init__(**kwargs) - self.system_data = None self.title = title self.description = description self.type_properties_type = None self.flags = None - self.streaming = None - self.media_info = None + self.content_urls = None + self.media_info = media_info + self.archival = archival class VideoEntityCollection(msrest.serialization.Model): @@ -1704,23 +4011,23 @@ class VideoFlags(msrest.serialization.Model): :param has_data: Required. Value indicating whether or not there has ever been data recorded or uploaded into the video. Newly created videos have this value set to false. :type has_data: bool - :param is_recording: Required. Value indicating whether or not the video is currently being - referenced be an active live pipeline. The fact that is being referenced, doesn't necessarily + :param is_in_use: Required. Value indicating whether or not the video is currently being + referenced be an active pipeline. The fact that is being referenced, doesn't necessarily indicate that data is being received. For example, video recording may be gated on events or camera may not be accessible at the time. - :type is_recording: bool + :type is_in_use: bool """ _validation = { 'can_stream': {'required': True}, 'has_data': {'required': True}, - 'is_recording': {'required': True}, + 'is_in_use': {'required': True}, } _attribute_map = { 'can_stream': {'key': 'canStream', 'type': 'bool'}, 'has_data': {'key': 'hasData', 'type': 'bool'}, - 'is_recording': {'key': 'isRecording', 'type': 'bool'}, + 'is_in_use': {'key': 'isInUse', 'type': 'bool'}, } def __init__( @@ -1728,103 +4035,267 @@ def __init__( *, can_stream: bool, has_data: bool, - is_recording: bool, + is_in_use: bool, **kwargs ): super(VideoFlags, self).__init__(**kwargs) self.can_stream = can_stream self.has_data = has_data - self.is_recording = is_recording + self.is_in_use = is_in_use class VideoMediaInfo(msrest.serialization.Model): """Contains information about the video and audio content. - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar segment_length: Video segment length indicates the length of individual video files + :param segment_length: Video segment length indicates the length of individual video files (segments) which are persisted to storage. Smaller segments provide lower archive playback latency but generate larger volume of storage transactions. Larger segments reduce the amount of storage transactions while increasing the archive playback latency. Value must be specified in ISO8601 duration format (i.e. "PT30S" equals 30 seconds) and can vary between 30 seconds to 5 minutes, in 30 seconds increments. - :vartype segment_length: str + :type segment_length: str + """ + + _attribute_map = { + 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + } + + def __init__( + self, + *, + segment_length: Optional[str] = None, + **kwargs + ): + super(VideoMediaInfo, self).__init__(**kwargs) + self.segment_length = segment_length + + +class VideoPreviewImageUrls(msrest.serialization.Model): + """Video preview image URLs. These URLs can be used in conjunction with the video content authorization token to download the most recent still image from the video archive in different resolutions. They are available when the video type is 'archive' and preview images are enabled. + + :param small: Low resolution preview image URL. + :type small: str + :param medium: Medium resolution preview image URL. + :type medium: str + :param large: High resolution preview image URL. + :type large: str + """ + + _attribute_map = { + 'small': {'key': 'small', 'type': 'str'}, + 'medium': {'key': 'medium', 'type': 'str'}, + 'large': {'key': 'large', 'type': 'str'}, + } + + def __init__( + self, + *, + small: Optional[str] = None, + medium: Optional[str] = None, + large: Optional[str] = None, + **kwargs + ): + super(VideoPreviewImageUrls, self).__init__(**kwargs) + self.small = small + self.medium = medium + self.large = large + + +class VideoPublishingOptions(msrest.serialization.Model): + """Optional flags used to change how video is published. These are only allowed for topologies where "kind" is set to "live". + + :param disable_archive: When set to 'true' content will not be archived or recorded. This is + used, for example, when the topology is used only for low latency video streaming. Default is + 'false'. If set to 'true', then "disableRtspPublishing" must be set to 'false'. + :type disable_archive: str + :param disable_rtsp_publishing: When set to 'true' the RTSP playback URL will not be published, + disabling low latency streaming. This is used, for example, when the topology is used only for + archiving content. Default is 'false'. If set to 'true', then "disableArchive" must be set to + 'false'. + :type disable_rtsp_publishing: str + """ + + _attribute_map = { + 'disable_archive': {'key': 'disableArchive', 'type': 'str'}, + 'disable_rtsp_publishing': {'key': 'disableRtspPublishing', 'type': 'str'}, + } + + def __init__( + self, + *, + disable_archive: Optional[str] = None, + disable_rtsp_publishing: Optional[str] = None, + **kwargs + ): + super(VideoPublishingOptions, self).__init__(**kwargs) + self.disable_archive = disable_archive + self.disable_rtsp_publishing = disable_rtsp_publishing + + +class VideoScale(msrest.serialization.Model): + """The video scaling information. + + :param height: The desired output video height. + :type height: str + :param width: The desired output video width. + :type width: str + :param mode: Describes the video scaling mode to be applied. Default mode is 'Pad'. If the mode + is 'Pad' or 'Stretch' then both width and height must be specified. Else if the mode is + 'PreserveAspectRatio' then only one of width or height need be provided. Possible values + include: "Pad", "PreserveAspectRatio", "Stretch". + :type mode: str or ~video_analyzer.models.VideoScaleMode + """ + + _attribute_map = { + 'height': {'key': 'height', 'type': 'str'}, + 'width': {'key': 'width', 'type': 'str'}, + 'mode': {'key': 'mode', 'type': 'str'}, + } + + def __init__( + self, + *, + height: Optional[str] = None, + width: Optional[str] = None, + mode: Optional[Union[str, "VideoScaleMode"]] = None, + **kwargs + ): + super(VideoScale, self).__init__(**kwargs) + self.height = height + self.width = width + self.mode = mode + + +class VideoSequenceAbsoluteTimeMarkers(TimeSequenceBase): + """A sequence of absolute datetime ranges as a string. The datetime values should follow IS08601, and the sum of the ranges should add up to 24 hours or less. Currently, there can be only one range specified in the sequence. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param ranges: Required. The sequence of datetime ranges. Example: '[["2021-10-05T03:30:00Z", + "2021-10-05T03:40:00Z"]]'. + :type ranges: str """ _validation = { - 'segment_length': {'readonly': True}, + 'type': {'required': True}, + 'ranges': {'required': True}, } _attribute_map = { - 'segment_length': {'key': 'segmentLength', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'ranges': {'key': 'ranges', 'type': 'str'}, } def __init__( self, + *, + ranges: str, **kwargs ): - super(VideoMediaInfo, self).__init__(**kwargs) - self.segment_length = None + super(VideoSequenceAbsoluteTimeMarkers, self).__init__(**kwargs) + self.type = '#Microsoft.VideoAnalyzer.VideoSequenceAbsoluteTimeMarkers' # type: str + self.ranges = ranges -class VideoStreaming(msrest.serialization.Model): - """Video streaming holds information about video streaming URLs. +class VideoSink(SinkNodeBase): + """Video sink in a live topology allows for video and audio to be captured, optionally archived, and published via a video resource. If archiving is enabled, this results in a video of type 'archive'. If used in a batch topology, this allows for video and audio to be stored as a file, and published via a video resource of type 'file'. - :param archive_base_url: Video streaming base URL for the video archive. When present, archived - video can be played through the Azure Video Analyzer player. Alternatively, this URL can be - used with compatible DASH or HLS players by appending the following to the base URL: - - - * HLSv4: /manifest(format=m3u8-aapl).m3u8 - * HLS CMAF: /manifest(format=m3u8-cmaf) - * DASH CMAF: /manifest(format=mpd-time-cmaf) - - Moreover, an ongoing video recording can be played in "live mode" with latencies which are - approximately double of the chosen video segment length. - :type archive_base_url: str + All required parameters must be populated in order to send to Azure. + + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param inputs: Required. An array of upstream node references within the topology to be used as + inputs for this node. + :type inputs: list[~video_analyzer.models.NodeInput] + :param video_name: Required. Name of a new or existing video resource used to capture and + publish content. Note: if downstream of RTSP source, and if disableArchive is set to true, then + no content is archived. + :type video_name: str + :param video_creation_properties: Optional video properties to be used in case a new video + resource needs to be created on the service. + :type video_creation_properties: ~video_analyzer.models.VideoCreationProperties + :param video_publishing_options: Options to change how the video sink publishes content via the + video resource. This property is only allowed for topologies where "kind" is set to "live". + :type video_publishing_options: ~video_analyzer.models.VideoPublishingOptions """ + _validation = { + 'type': {'required': True}, + 'name': {'required': True}, + 'inputs': {'required': True}, + 'video_name': {'required': True}, + } + _attribute_map = { - 'archive_base_url': {'key': 'archiveBaseUrl', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'inputs': {'key': 'inputs', 'type': '[NodeInput]'}, + 'video_name': {'key': 'videoName', 'type': 'str'}, + 'video_creation_properties': {'key': 'videoCreationProperties', 'type': 'VideoCreationProperties'}, + 'video_publishing_options': {'key': 'videoPublishingOptions', 'type': 'VideoPublishingOptions'}, } def __init__( self, *, - archive_base_url: Optional[str] = None, + name: str, + inputs: List["NodeInput"], + video_name: str, + video_creation_properties: Optional["VideoCreationProperties"] = None, + video_publishing_options: Optional["VideoPublishingOptions"] = None, **kwargs ): - super(VideoStreaming, self).__init__(**kwargs) - self.archive_base_url = archive_base_url + super(VideoSink, self).__init__(name=name, inputs=inputs, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.VideoSink' # type: str + self.video_name = video_name + self.video_creation_properties = video_creation_properties + self.video_publishing_options = video_publishing_options -class VideoStreamingToken(msrest.serialization.Model): - """Video streaming token grants access to the video streaming URLs which can be used by an compatible HLS or DASH player. +class VideoSource(SourceNodeBase): + """Video source allows for content from a Video Analyzer video resource to be ingested into a pipeline. Currently supported only with batch pipelines. - 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. - :ivar expiration_date: The streaming token expiration date in ISO8601 format (eg. - 2021-01-01T00:00:00Z). - :vartype expiration_date: ~datetime.datetime - :ivar token: The streaming token value to be added to the video streaming URL as the value for - a "token" query string parameter. The token is specific to a single video. - :vartype token: str + :param type: Required. The discriminator for derived types.Constant filled by server. + :type type: str + :param name: Required. Node name. Must be unique within the topology. + :type name: str + :param video_name: Required. Name of the Video Analyzer video resource to be used as the + source. + :type video_name: str + :param time_sequences: Required. Describes a sequence of datetime ranges. The video source only + picks up recorded media within these ranges. + :type time_sequences: ~video_analyzer.models.TimeSequenceBase """ _validation = { - 'expiration_date': {'readonly': True}, - 'token': {'readonly': True}, + 'type': {'required': True}, + 'name': {'required': True}, + 'video_name': {'required': True}, + 'time_sequences': {'required': True}, } _attribute_map = { - 'expiration_date': {'key': 'expirationDate', 'type': 'iso-8601'}, - 'token': {'key': 'token', 'type': 'str'}, + 'type': {'key': '@type', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'video_name': {'key': 'videoName', 'type': 'str'}, + 'time_sequences': {'key': 'timeSequences', 'type': 'TimeSequenceBase'}, } def __init__( self, + *, + name: str, + video_name: str, + time_sequences: "TimeSequenceBase", **kwargs ): - super(VideoStreamingToken, self).__init__(**kwargs) - self.expiration_date = None - self.token = None + super(VideoSource, self).__init__(name=name, **kwargs) + self.type = '#Microsoft.VideoAnalyzer.VideoSource' # type: str + self.video_name = video_name + self.time_sequences = time_sequences diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_video_analyzer_enums.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_video_analyzer_enums.py index 09fc0523fd7a..ad4050055efb 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_video_analyzer_enums.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/models/_video_analyzer_enums.py @@ -87,6 +87,56 @@ class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" +class EncoderSystemPresetType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Name of the built-in encoding preset. + """ + + #: Produces an MP4 file where the video is encoded with H.264 codec at a picture height of 540 + #: pixels, and at a maximum bitrate of 2000 Kbps. Encoded video has the same average frame rate as + #: the input. The aspect ratio of the input is preserved. If the input content has audio, then it + #: is encoded with AAC-LC codec at 96 Kbps. + SINGLE_LAYER540_P_H264_AAC = "SingleLayer_540p_H264_AAC" + #: Produces an MP4 file where the video is encoded with H.264 codec at a picture height of 720 + #: pixels, and at a maximum bitrate of 3500 Kbps. Encoded video has the same average frame rate as + #: the input. The aspect ratio of the input is preserved. If the input content has audio, then it + #: is encoded with AAC-LC codec at 96 Kbps. + SINGLE_LAYER720_P_H264_AAC = "SingleLayer_720p_H264_AAC" + #: Produces an MP4 file where the video is encoded with H.264 codec at a picture height of 1080 + #: pixels, and at a maximum bitrate of 6000 Kbps. Encoded video has the same average frame rate as + #: the input. The aspect ratio of the input is preserved. If the input content has audio, then it + #: is encoded with AAC-LC codec at 128 Kbps. + SINGLE_LAYER1080_P_H264_AAC = "SingleLayer_1080p_H264_AAC" + #: Produces an MP4 file where the video is encoded with H.264 codec at a picture height of 2160 + #: pixels, and at a maximum bitrate of 16000 Kbps. Encoded video has the same average frame rate + #: as the input. The aspect ratio of the input is preserved. If the input content has audio, then + #: it is encoded with AAC-LC codec at 128 Kbps. + SINGLE_LAYER2160_P_H264_AAC = "SingleLayer_2160p_H264_AAC" + +class Kind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Topology kind. + """ + + #: Live pipeline topology resource. + LIVE = "Live" + #: Batch pipeline topology resource. + BATCH = "Batch" + +class LivePipelineState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current state of the pipeline (read-only). + """ + + #: The live pipeline is idle and not processing media. + INACTIVE = "Inactive" + #: The live pipeline is transitioning into the active state. + ACTIVATING = "Activating" + #: The live pipeline is active and able to process media. If your data source is not available, + #: for instance, if your RTSP camera is powered off or unreachable, the pipeline will still be + #: active and periodically retrying the connection. Your Azure subscription will be billed for the + #: duration in which the live pipeline is in the active state. + ACTIVE = "Active" + #: The live pipeline is transitioning into the inactive state. + DEACTIVATING = "Deactivating" + class MetricAggregationType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The metric aggregation type """ @@ -109,6 +159,104 @@ class MetricUnit(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): #: The number of milliseconds. MILLISECONDS = "Milliseconds" +class ParameterType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Type of the parameter. + """ + + #: The parameter's value is a string. + STRING = "String" + #: The parameter's value is a string that holds sensitive information. + SECRET_STRING = "SecretString" + #: The parameter's value is a 32-bit signed integer. + INT = "Int" + #: The parameter's value is a 64-bit double-precision floating point. + DOUBLE = "Double" + #: The parameter's value is a boolean value that is either true or false. + BOOL = "Bool" + +class PipelineJobState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Current state of the pipeline (read-only). + """ + + #: Pipeline job is processing. + PROCESSING = "Processing" + #: Pipeline job is canceled. + CANCELED = "Canceled" + #: Pipeline job completed. + COMPLETED = "Completed" + #: Pipeline job failed. + FAILED = "Failed" + +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The current provisioning state. + """ + + SUCCEEDED = "Succeeded" + CREATING = "Creating" + DELETING = "Deleting" + FAILED = "Failed" + +class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The private endpoint connection status. + """ + + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Provisioning state of the Video Analyzer account. + """ + + #: Provisioning state failed. + FAILED = "Failed" + #: Provisioning state in progress. + IN_PROGRESS = "InProgress" + #: Provisioning state succeeded. + SUCCEEDED = "Succeeded" + +class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether or not public network access is allowed for resources under the Video Analyzer account. + """ + + #: Public network access is enabled. + ENABLED = "Enabled" + #: Public network access is disabled. + DISABLED = "Disabled" + +class RtspTransport(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Network transport utilized by the RTSP and RTP exchange: TCP or HTTP. When using TCP, the RTP + packets are interleaved on the TCP RTSP connection. When using HTTP, the RTSP messages are + exchanged through long lived HTTP connections, and the RTP packages are interleaved in the HTTP + connections alongside the RTSP messages. + """ + + #: HTTP transport. RTSP messages are exchanged over long running HTTP requests and RTP packets are + #: interleaved within the HTTP channel. + HTTP = "Http" + #: TCP transport. RTSP is used directly over TCP and RTP packets are interleaved within the TCP + #: channel. + TCP = "Tcp" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The SKU name. + """ + + #: Represents the Live S1 SKU name. Using this SKU you can create live pipelines to capture, + #: record, and stream live video from RTSP-capable cameras at bitrate settings from 0.5 Kbps to + #: 3000 Kbps. + LIVE_S1 = "Live_S1" + #: Represents the Batch S1 SKU name. Using this SKU you can create pipeline jobs to process + #: recorded content. + BATCH_S1 = "Batch_S1" + +class SkuTier(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The SKU tier. + """ + + #: Standard tier. + STANDARD = "Standard" + class VideoAnalyzerEndpointType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of the endpoint. """ @@ -116,15 +264,37 @@ class VideoAnalyzerEndpointType(with_metaclass(_CaseInsensitiveEnumMeta, str, En #: The client API endpoint. CLIENT_API = "ClientApi" +class VideoScaleMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Describes the video scaling mode to be applied. Default mode is 'Pad'. If the mode is 'Pad' or + 'Stretch' then both width and height must be specified. Else if the mode is + 'PreserveAspectRatio' then only one of width or height need be provided. + """ + + #: Pads the video with black horizontal stripes (letterbox) or black vertical stripes (pillar-box) + #: so the video is resized to the specified dimensions while not altering the content aspect + #: ratio. + PAD = "Pad" + #: Preserves the same aspect ratio as the input video. If only one video dimension is provided, + #: the second dimension is calculated based on the input video aspect ratio. When 2 dimensions are + #: provided, the video is resized to fit the most constraining dimension, considering the input + #: video size and aspect ratio. + PRESERVE_ASPECT_RATIO = "PreserveAspectRatio" + #: Stretches the original video so it resized to the specified dimensions. + STRETCH = "Stretch" + class VideoType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of the video archive. Different archive formats provide different capabilities. + """Video content type. Different content types are suitable for different applications and + scenarios. """ #: Archive is flexible format that represents a video stream associated with wall-clock time. The #: video archive can either be continuous or discontinuous. An archive is discontinuous when there #: are gaps in the recording due to various reasons, such as the live pipeline being stopped, #: camera being disconnected or due to the use of event based recordings through the use of a - #: signal gate. Finally, there is no limit to the archive duration and new video data can be - #: appended to the existing archive at any time, as long as the same video codec and codec - #: parameters are being used. + #: signal gate. There is no limit to the archive duration and new video data can be appended to + #: the existing archive at any time, as long as the same video codec and codec parameters are + #: being used. Videos of this type are suitable for appending and long term archival. ARCHIVE = "Archive" + #: File represents a video which is stored as a single media file, such as MP4. Videos of this + #: type are suitable to be downloaded for external consumption. + FILE = "File" diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/__init__.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/__init__.py index 1ee2a23110a0..62393a002a63 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/__init__.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/__init__.py @@ -6,18 +6,40 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._edge_modules_operations import EdgeModulesOperations +from ._pipeline_topologies_operations import PipelineTopologiesOperations +from ._live_pipelines_operations import LivePipelinesOperations +from ._pipeline_jobs_operations import PipelineJobsOperations +from ._live_pipeline_operation_statuses_operations import LivePipelineOperationStatusesOperations +from ._pipeline_job_operation_statuses_operations import PipelineJobOperationStatusesOperations from ._operations import Operations from ._video_analyzers_operations import VideoAnalyzersOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._operation_statuses_operations import OperationStatusesOperations +from ._operation_results_operations import OperationResultsOperations +from ._video_analyzer_operation_statuses_operations import VideoAnalyzerOperationStatusesOperations +from ._video_analyzer_operation_results_operations import VideoAnalyzerOperationResultsOperations from ._locations_operations import LocationsOperations -from ._edge_modules_operations import EdgeModulesOperations from ._videos_operations import VideosOperations from ._access_policies_operations import AccessPoliciesOperations __all__ = [ + 'EdgeModulesOperations', + 'PipelineTopologiesOperations', + 'LivePipelinesOperations', + 'PipelineJobsOperations', + 'LivePipelineOperationStatusesOperations', + 'PipelineJobOperationStatusesOperations', 'Operations', 'VideoAnalyzersOperations', + 'PrivateLinkResourcesOperations', + 'PrivateEndpointConnectionsOperations', + 'OperationStatusesOperations', + 'OperationResultsOperations', + 'VideoAnalyzerOperationStatusesOperations', + 'VideoAnalyzerOperationResultsOperations', 'LocationsOperations', - 'EdgeModulesOperations', 'VideosOperations', 'AccessPoliciesOperations', ] diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_access_policies_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_access_policies_operations.py index eeeb1c2ee1af..bc55cd89a9aa 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_access_policies_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_access_policies_operations.py @@ -53,9 +53,9 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.AccessPolicyEntityCollection"] - """List access policy resources. + """List all existing access policy resources. - List all existing access policy resources for the specified account. + Retrieves all existing access policy resources, along with their JSON representations. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -75,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -88,7 +88,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -138,15 +138,15 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.AccessPolicyEntity" - """Retrieves an access policy resource. + """Retrieves an existing access policy resource. - Retrieves an existing access policy resource from an account by name. + Retrieves an existing access policy resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param access_policy_name: The name of the access policy to retrieve. + :param access_policy_name: The Access Policy name. :type access_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AccessPolicyEntity, or the result of cls(response) @@ -158,14 +158,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), } @@ -205,15 +205,15 @@ def create_or_update( **kwargs # type: Any ): # type: (...) -> "_models.AccessPolicyEntity" - """Creates or updates an access policy. + """Creates a new access policy resource or updates an existing one. - Creates a new access policy resource or updates an existing one. + Creates a new access policy resource or updates an existing one with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param access_policy_name: The name of the access policy to create or update. + :param access_policy_name: The Access Policy name. :type access_policy_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.AccessPolicyEntity @@ -227,7 +227,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -235,7 +235,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), } @@ -282,15 +282,15 @@ def delete( **kwargs # type: Any ): # type: (...) -> None - """Deletes an access policy. + """Deletes an existing access policy resource. - Deletes an existing access policy resource. + Deletes an existing access policy resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param access_policy_name: The name of the access policy to delete. + :param access_policy_name: The Access Policy name. :type access_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -302,14 +302,14 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), } @@ -346,15 +346,15 @@ def update( **kwargs # type: Any ): # type: (...) -> "_models.AccessPolicyEntity" - """Updates an existing access policy. + """Updates individual properties of an existing access policy resource. - Updates individual properties of an existing access policy resource. + Updates individual properties of an existing access policy resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param access_policy_name: The name of the access policy to update. + :param access_policy_name: The Access Policy name. :type access_policy_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.AccessPolicyEntity @@ -368,7 +368,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -376,7 +376,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'accessPolicyName': self._serialize.url("access_policy_name", access_policy_name, 'str'), } diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_edge_modules_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_edge_modules_operations.py index 82fef48d3070..d0415efb1f00 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_edge_modules_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_edge_modules_operations.py @@ -49,28 +49,22 @@ def list( self, resource_group_name, # type: str account_name, # type: str - filter=None, # type: Optional[str] top=None, # type: Optional[int] - orderby=None, # type: Optional[str] **kwargs # type: Any ): # type: (...) -> Iterable["_models.EdgeModuleEntityCollection"] - """List edge module resources. + """List all existing edge module resources. - List all of the existing edge module resources for a given Video Analyzer account. + List all existing edge module resources, along with their JSON representations. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param filter: Restricts the set of items returned. - :type filter: str :param top: Specifies a non-negative integer n that limits the number of items returned from a collection. The service returns the number of available items up to but not greater than the specified value n. :type top: int - :param orderby: Specifies the key by which the result collection should be ordered. - :type orderby: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either EdgeModuleEntityCollection or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.EdgeModuleEntityCollection] @@ -81,7 +75,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -94,19 +88,15 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') if top is not None: query_parameters['$top'] = self._serialize.query("top", top, 'int') - if orderby is not None: - query_parameters['$orderby'] = self._serialize.query("orderby", orderby, 'str') request = self._client.get(url, query_parameters, header_parameters) else: @@ -150,13 +140,13 @@ def get( # type: (...) -> "_models.EdgeModuleEntity" """Retrieves an existing edge module resource. - Retrieves a specific existing edge module resource in the given Video Analyzer account. + Retrieves an existing edge module resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param edge_module_name: The name of the edge module to retrieve. + :param edge_module_name: The Edge Module name. :type edge_module_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: EdgeModuleEntity, or the result of cls(response) @@ -168,14 +158,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), } @@ -229,7 +219,7 @@ def create_or_update( :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param edge_module_name: The name of the edge module to create or update. + :param edge_module_name: The Edge Module name. :type edge_module_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.EdgeModuleEntity @@ -243,7 +233,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -251,7 +241,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), } @@ -308,7 +298,7 @@ def delete( :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param edge_module_name: The name of the edge module to be deleted. + :param edge_module_name: The Edge Module name. :type edge_module_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -320,14 +310,14 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), } @@ -378,7 +368,7 @@ def list_provisioning_token( :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param edge_module_name: The name of the edge module used to create a new provisioning token. + :param edge_module_name: The Edge Module name. :type edge_module_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.ListProvisioningTokenInput @@ -392,7 +382,7 @@ def list_provisioning_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -400,7 +390,7 @@ def list_provisioning_token( url = self.list_provisioning_token.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'edgeModuleName': self._serialize.url("edge_module_name", edge_module_name, 'str'), } diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipeline_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipeline_operation_statuses_operations.py new file mode 100644 index 000000000000..858c2ed4cecc --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipeline_operation_statuses_operations.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class LivePipelineOperationStatusesOperations(object): + """LivePipelineOperationStatusesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + live_pipeline_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.LivePipelineOperationStatus" + """Get the operation status. + + Get the operation status of a live pipeline. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :param operation_id: The operation ID. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LivePipelineOperationStatus, or the result of cls(response) + :rtype: ~video_analyzer.models.LivePipelineOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipelineOperationStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LivePipelineOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/operationStatuses/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipelines_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipelines_operations.py new file mode 100644 index 000000000000..3d5a77eb7619 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_live_pipelines_operations.py @@ -0,0 +1,663 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class LivePipelinesOperations(object): + """LivePipelinesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + account_name, # type: str + filter=None, # type: Optional[str] + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.LivePipelineCollection"] + """Retrieves a list of live pipelines. + + Retrieves a list of live pipelines that have been created, along with their JSON + representations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param filter: Restricts the set of items returned. + :type filter: str + :param top: Specifies a non-negative integer n that limits the number of items returned from a + collection. The service returns the number of available items up to but not greater than the + specified value n. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either LivePipelineCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.LivePipelineCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipelineCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('LivePipelineCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines'} # type: ignore + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + live_pipeline_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.LivePipeline" + """Retrieves a specific live pipeline by name. + + Retrieves a specific live pipeline by name. If a live pipeline with that name has been + previously created, the call will return the JSON representation of that instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LivePipeline, or the result of cls(response) + :rtype: ~video_analyzer.models.LivePipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LivePipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + account_name, # type: str + live_pipeline_name, # type: str + parameters, # type: "_models.LivePipeline" + **kwargs # type: Any + ): + # type: (...) -> "_models.LivePipeline" + """Creates or updates a live pipeline. + + Creates a new live pipeline or updates an existing one, with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.LivePipeline + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LivePipeline, or the result of cls(response) + :rtype: ~video_analyzer.models.LivePipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'LivePipeline') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('LivePipeline', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('LivePipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + account_name, # type: str + live_pipeline_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a live pipeline. + + Deletes a live pipeline with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + account_name, # type: str + live_pipeline_name, # type: str + parameters, # type: "_models.LivePipelineUpdate" + **kwargs # type: Any + ): + # type: (...) -> "_models.LivePipeline" + """Updates an existing live pipeline. + + Updates an existing live pipeline with the given name. Properties that can be updated include: + description, bitrateKbps, and parameter definitions. Only the description can be updated while + the live pipeline is active. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.LivePipelineUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: LivePipeline, or the result of cls(response) + :rtype: ~video_analyzer.models.LivePipeline + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.LivePipeline"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'LivePipelineUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('LivePipeline', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}'} # type: ignore + + def _activate_initial( + self, + resource_group_name, # type: str + account_name, # type: str + live_pipeline_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self._activate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _activate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate'} # type: ignore + + def begin_activate( + self, + resource_group_name, # type: str + account_name, # type: str + live_pipeline_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Activates a live pipeline. + + Activates a live pipeline with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._activate_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_pipeline_name=live_pipeline_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_activate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/activate'} # type: ignore + + def _deactivate_initial( + self, + resource_group_name, # type: str + account_name, # type: str + live_pipeline_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self._deactivate_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _deactivate_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate'} # type: ignore + + def begin_deactivate( + self, + resource_group_name, # type: str + account_name, # type: str + live_pipeline_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Deactivates a live pipeline. + + Deactivates a live pipeline with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param live_pipeline_name: Live pipeline unique identifier. + :type live_pipeline_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._deactivate_initial( + resource_group_name=resource_group_name, + account_name=account_name, + live_pipeline_name=live_pipeline_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'livePipelineName': self._serialize.url("live_pipeline_name", live_pipeline_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_deactivate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/livePipelines/{livePipelineName}/deactivate'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_locations_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_locations_operations.py index 5fb77c49ec05..75989ff00eda 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_locations_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_locations_operations.py @@ -55,7 +55,7 @@ def check_name_availability( Checks whether the Video Analyzer resource name is available. - :param location_name: The name of the location. + :param location_name: Location Name. :type location_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.CheckNameAvailabilityRequest @@ -69,7 +69,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_results_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_results_operations.py new file mode 100644 index 000000000000..80e1bcbfba54 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_results_operations.py @@ -0,0 +1,117 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationResultsOperations(object): + """OperationResultsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.PrivateEndpointConnection"] + """Get operation result. + + Get private endpoint connection operation result. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateEndpointConnection or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationResults/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_statuses_operations.py new file mode 100644 index 000000000000..d5ae754d7806 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operation_statuses_operations.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OperationStatusesOperations(object): + """OperationStatusesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VideoAnalyzerPrivateEndpointConnectionOperationStatus" + """Get operation status. + + Get private endpoint connection operation status. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VideoAnalyzerPrivateEndpointConnectionOperationStatus, or the result of cls(response) + :rtype: ~video_analyzer.models.VideoAnalyzerPrivateEndpointConnectionOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerPrivateEndpointConnectionOperationStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VideoAnalyzerPrivateEndpointConnectionOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}/operationStatuses/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operations.py index ba0392551bca..115ef91180df 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_operations.py @@ -63,7 +63,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_job_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_job_operation_statuses_operations.py new file mode 100644 index 000000000000..a734e3568bc0 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_job_operation_statuses_operations.py @@ -0,0 +1,115 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PipelineJobOperationStatusesOperations(object): + """PipelineJobOperationStatusesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_job_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PipelineJobOperationStatus" + """Get the operation statuses. + + Get the operation status of a pipeline job with the given operationId. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :param operation_id: The operation ID. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineJobOperationStatus, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineJobOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJobOperationStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineJobOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/operationStatuses/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_jobs_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_jobs_operations.py new file mode 100644 index 000000000000..b0135e4e436d --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_jobs_operations.py @@ -0,0 +1,542 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PipelineJobsOperations(object): + """PipelineJobsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + account_name, # type: str + filter=None, # type: Optional[str] + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PipelineJobCollection"] + """Retrieves a list of pipeline jobs. + + Retrieves a list of all live pipelines that have been created, along with their JSON + representations. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param filter: Restricts the set of items returned. + :type filter: str + :param top: Specifies a non-negative integer n that limits the number of items returned from a + collection. The service returns the number of available items up to but not greater than the + specified value n. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PipelineJobCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.PipelineJobCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJobCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PipelineJobCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs'} # type: ignore + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PipelineJob" + """Gets a specific pipeline job by name. + + Retrieves a specific pipeline job by name. If a pipeline job with that name has been previously + created, the call will return the JSON representation of that instance. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineJob, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_job_name, # type: str + parameters, # type: "_models.PipelineJob" + **kwargs # type: Any + ): + # type: (...) -> "_models.PipelineJob" + """Creates or updates a pipeline job. + + Creates a new pipeline job or updates an existing one, with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PipelineJob + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineJob, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PipelineJob') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PipelineJob', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PipelineJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a pipeline job. + + Deletes a pipeline job with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_job_name, # type: str + parameters, # type: "_models.PipelineJobUpdate" + **kwargs # type: Any + ): + # type: (...) -> "_models.PipelineJob" + """Updates an existing pipeline job. + + Updates an existing pipeline job with the given name. Properties that can be updated include: + description. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PipelineJobUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineJob, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineJob + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineJob"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PipelineJobUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineJob', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}'} # type: ignore + + def _cancel_initial( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self._cancel_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.post(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _cancel_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel'} # type: ignore + + def begin_cancel( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_job_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Cancels a pipeline job. + + Cancels a pipeline job with the given name. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_job_name: The pipeline job name. + :type pipeline_job_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._cancel_initial( + resource_group_name=resource_group_name, + account_name=account_name, + pipeline_job_name=pipeline_job_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineJobName': self._serialize.url("pipeline_job_name", pipeline_job_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_cancel.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineJobs/{pipelineJobName}/cancel'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_topologies_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_topologies_operations.py new file mode 100644 index 000000000000..11f276a05470 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_pipeline_topologies_operations.py @@ -0,0 +1,426 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PipelineTopologiesOperations(object): + """PipelineTopologiesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + account_name, # type: str + filter=None, # type: Optional[str] + top=None, # type: Optional[int] + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.PipelineTopologyCollection"] + """Retrieves a list of pipeline topologies. + + Retrieves a list of pipeline topologies that have been added to the account, if any, along with + their JSON representation. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param filter: Restricts the set of items returned. + :type filter: str + :param top: Specifies a non-negative integer n that limits the number of items returned from a + collection. The service returns the number of available items up to but not greater than the + specified value n. + :type top: int + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either PipelineTopologyCollection or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~video_analyzer.models.PipelineTopologyCollection] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopologyCollection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str') + if top is not None: + query_parameters['$top'] = self._serialize.query("top", top, 'int') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('PipelineTopologyCollection', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies'} # type: ignore + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_topology_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PipelineTopology" + """Retrieves a specific pipeline topology by name. + + Retrieves a specific pipeline topology by name. If a topology with that name has been + previously created, the call will return the JSON representation of that topology. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_topology_name: Pipeline topology unique identifier. + :type pipeline_topology_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineTopology, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineTopology + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineTopology', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_topology_name, # type: str + parameters, # type: "_models.PipelineTopology" + **kwargs # type: Any + ): + # type: (...) -> "_models.PipelineTopology" + """Creates or updates a pipeline topology. + + Creates a new pipeline topology or updates an existing one, with the given name. A pipeline + topology describes the processing steps to be applied when processing content for a particular + outcome. The topology should be defined according to the scenario to be achieved and can be + reused across many pipeline instances which share the same processing characteristics. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_topology_name: Pipeline topology unique identifier. + :type pipeline_topology_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PipelineTopology + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineTopology, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineTopology + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PipelineTopology') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('PipelineTopology', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('PipelineTopology', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_topology_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Deletes a pipeline topology. + + Deletes a pipeline topology with the given name. This method should be called after all + instances of the topology have been stopped and deleted. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_topology_name: Pipeline topology unique identifier. + :type pipeline_topology_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore + + def update( + self, + resource_group_name, # type: str + account_name, # type: str + pipeline_topology_name, # type: str + parameters, # type: "_models.PipelineTopologyUpdate" + **kwargs # type: Any + ): + # type: (...) -> "_models.PipelineTopology" + """Updates an existing pipeline topology. + + Updates an existing pipeline topology with the given name. If the associated live pipelines or + pipeline jobs are in active or processing state, respectively, then only the description can be + updated. Else, the properties that can be updated include: description, parameter declarations, + sources, processors, and sinks. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Azure Video Analyzer account name. + :type account_name: str + :param pipeline_topology_name: Pipeline topology unique identifier. + :type pipeline_topology_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PipelineTopologyUpdate + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PipelineTopology, or the result of cls(response) + :rtype: ~video_analyzer.models.PipelineTopology + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PipelineTopology"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'pipelineTopologyName': self._serialize.url("pipeline_topology_name", pipeline_topology_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PipelineTopologyUpdate') + body_content_kwargs['content'] = body_content + request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PipelineTopology', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/pipelineTopologies/{pipelineTopologyName}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_endpoint_connections_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_endpoint_connections_operations.py new file mode 100644 index 000000000000..c3b766fd902b --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_endpoint_connections_operations.py @@ -0,0 +1,314 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateEndpointConnectionsOperations(object): + """PrivateEndpointConnectionsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnectionListResult" + """Get all private endpoint connections. + + Get all private endpoint connections under video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnectionListResult, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateEndpointConnectionListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnectionListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnectionListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections'} # type: ignore + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Get private endpoint connection. + + Get private endpoint connection under video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore + + def create_or_update( + self, + resource_group_name, # type: str + account_name, # type: str + name, # type: str + parameters, # type: "_models.PrivateEndpointConnection" + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateEndpointConnection" + """Update private endpoint connection. + + Update private endpoint connection state under video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.PrivateEndpointConnection + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateEndpointConnection, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateEndpointConnection + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateEndpointConnection"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self.create_or_update.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'PrivateEndpointConnection') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('PrivateEndpointConnection', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + + return deserialized + create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore + + def delete( + self, + resource_group_name, # type: str + account_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Delete private endpoint connection. + + Delete private endpoint connection under video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Private endpoint connection name. + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: None, or the result of cls(response) + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.delete.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateEndpointConnections/{name}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_link_resources_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_link_resources_operations.py new file mode 100644 index 000000000000..939af8cae0e4 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_private_link_resources_operations.py @@ -0,0 +1,173 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class PrivateLinkResourcesOperations(object): + """PrivateLinkResourcesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name, # type: str + account_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResourceListResult" + """Get list of group IDs. + + Get list of group IDs for video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResourceListResult, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateLinkResourceListResult + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResourceListResult"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResourceListResult', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources'} # type: ignore + + def get( + self, + resource_group_name, # type: str + account_name, # type: str + name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.PrivateLinkResource" + """Get group ID. + + Get group ID for video analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param name: Name of the private link resource (Group ID). + :type name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: PrivateLinkResource, or the result of cls(response) + :rtype: ~video_analyzer.models.PrivateLinkResource + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.PrivateLinkResource"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + 'name': self._serialize.url("name", name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('PrivateLinkResource', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/privateLinkResources/{name}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_results_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_results_operations.py new file mode 100644 index 000000000000..6eb4b071fe57 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_results_operations.py @@ -0,0 +1,109 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VideoAnalyzerOperationResultsOperations(object): + """VideoAnalyzerOperationResultsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + location_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.VideoAnalyzer"] + """Get operation result. + + Get video analyzer operation result. + + :param location_name: Location name. + :type location_name: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VideoAnalyzer, or the result of cls(response) + :rtype: ~video_analyzer.models.VideoAnalyzer or None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.VideoAnalyzer"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationResults/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_statuses_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_statuses_operations.py new file mode 100644 index 000000000000..06a067e8df24 --- /dev/null +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzer_operation_statuses_operations.py @@ -0,0 +1,107 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class VideoAnalyzerOperationStatusesOperations(object): + """VideoAnalyzerOperationStatusesOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~video_analyzer.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def get( + self, + location_name, # type: str + operation_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.VideoAnalyzerOperationStatus" + """Get operation status. + + Get video analyzer operation status. + + :param location_name: Location name. + :type location_name: str + :param operation_id: Operation Id. + :type operation_id: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: VideoAnalyzerOperationStatus, or the result of cls(response) + :rtype: ~video_analyzer.models.VideoAnalyzerOperationStatus + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzerOperationStatus"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-11-01-preview" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'locationName': self._serialize.url("location_name", location_name, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('VideoAnalyzerOperationStatus', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Media/locations/{locationName}/videoAnalyzerOperationStatuses/{operationId}'} # type: ignore diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzers_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzers_operations.py index 080ee6d2e428..05b6b1a521c2 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzers_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_video_analyzers_operations.py @@ -11,7 +11,9 @@ from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling from .. import models as _models @@ -66,14 +68,14 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), } url = self._client.format_url(url, **path_format_arguments) @@ -127,14 +129,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -164,7 +166,7 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore - def create_or_update( + def _create_or_update_initial( self, resource_group_name, # type: str account_name, # type: str @@ -172,35 +174,20 @@ def create_or_update( **kwargs # type: Any ): # type: (...) -> "_models.VideoAnalyzer" - """Create or update a Video Analyzer account. - - Create or update an instance of a Video Analyzer account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param account_name: The Video Analyzer account name. - :type account_name: str - :param parameters: The request parameters. - :type parameters: ~video_analyzer.models.VideoAnalyzer - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VideoAnalyzer, or the result of cls(response) - :rtype: ~video_analyzer.models.VideoAnalyzer - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -226,17 +213,95 @@ def create_or_update( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers = {} if response.status_code == 200: deserialized = self._deserialize('VideoAnalyzer', pipeline_response) if response.status_code == 201: + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) deserialized = self._deserialize('VideoAnalyzer', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + + def begin_create_or_update( + self, + resource_group_name, # type: str + account_name, # type: str + parameters, # type: "_models.VideoAnalyzer" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.VideoAnalyzer"] + """Create or update a Video Analyzer account. + + Create or update an instance of a Video Analyzer account. + + :param resource_group_name: The name of the resource group. The name is case insensitive. + :type resource_group_name: str + :param account_name: The Video Analyzer account name. + :type account_name: str + :param parameters: The request parameters. + :type parameters: ~video_analyzer.models.VideoAnalyzer + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VideoAnalyzer or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~video_analyzer.models.VideoAnalyzer] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), + 'accountName': self._serialize.url("account_name", account_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore def delete( self, @@ -263,14 +328,14 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -297,7 +362,7 @@ def delete( delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore - def update( + def _update_initial( self, resource_group_name, # type: str account_name, # type: str @@ -305,35 +370,20 @@ def update( **kwargs # type: Any ): # type: (...) -> "_models.VideoAnalyzer" - """Update a Video Analyzer account. - - Updates an existing instance of Video Analyzer account. - - :param resource_group_name: The name of the resource group. The name is case insensitive. - :type resource_group_name: str - :param account_name: The Video Analyzer account name. - :type account_name: str - :param parameters: The request parameters. - :type parameters: ~video_analyzer.models.VideoAnalyzerUpdate - :keyword callable cls: A custom type or function that will be passed the direct response - :return: VideoAnalyzer, or the result of cls(response) - :rtype: ~video_analyzer.models.VideoAnalyzer - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + url = self._update_initial.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -354,86 +404,101 @@ def update( pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response - if response.status_code not in [200]: + if response.status_code not in [202]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + response_headers = {} + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) deserialized = self._deserialize('VideoAnalyzer', pipeline_response) if cls: - return cls(pipeline_response, deserialized, {}) + return cls(pipeline_response, deserialized, response_headers) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore - def sync_storage_keys( + def begin_update( self, resource_group_name, # type: str account_name, # type: str - parameters, # type: "_models.SyncStorageKeysInput" + parameters, # type: "_models.VideoAnalyzerUpdate" **kwargs # type: Any ): - # type: (...) -> None - """Synchronizes Storage Account Keys. + # type: (...) -> LROPoller["_models.VideoAnalyzer"] + """Update a Video Analyzer account. - Synchronizes storage account keys for a storage account associated with the Video Analyzer - account. + Updates an existing instance of Video Analyzer account. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Video Analyzer account name. :type account_name: str :param parameters: The request parameters. - :type parameters: ~video_analyzer.models.SyncStorageKeysInput + :type parameters: ~video_analyzer.models.VideoAnalyzerUpdate :keyword callable cls: A custom type or function that will be passed the direct response - :return: None, or the result of cls(response) - :rtype: None - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either VideoAnalyzer or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~video_analyzer.models.VideoAnalyzer] + :raises ~azure.core.exceptions.HttpResponseError: """ - cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = { - 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError - } - error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" - content_type = kwargs.pop("content_type", "application/json") - accept = "application/json" + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoAnalyzer"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._update_initial( + resource_group_name=resource_group_name, + account_name=account_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + response_headers = {} + response = pipeline_response.http_response + response_headers['Retry-After']=self._deserialize('int', response.headers.get('Retry-After')) + response_headers['Location']=self._deserialize('str', response.headers.get('Location')) + response_headers['Azure-AsyncOperation']=self._deserialize('str', response.headers.get('Azure-AsyncOperation')) + deserialized = self._deserialize('VideoAnalyzer', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, response_headers) + return deserialized - # Construct URL - url = self.sync_storage_keys.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SyncStorageKeysInput') - body_content_kwargs['content'] = body_content - request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response - - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) - raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - - if cls: - return cls(pipeline_response, None, {}) - sync_storage_keys.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/syncStorageKeys'} # type: ignore + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}'} # type: ignore def list_by_subscription( self, @@ -442,7 +507,7 @@ def list_by_subscription( # type: (...) -> "_models.VideoAnalyzerCollection" """List Video Analyzer accounts. - Lists the Video Analyzer accounts in the specific subscription. + List all Video Analyzer accounts in the specified subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: VideoAnalyzerCollection, or the result of cls(response) @@ -454,7 +519,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL diff --git a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_videos_operations.py b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_videos_operations.py index f87e0422fb76..31265c5126e2 100644 --- a/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_videos_operations.py +++ b/sdk/videoanalyzer/azure-mgmt-videoanalyzer/azure/mgmt/videoanalyzer/operations/_videos_operations.py @@ -53,9 +53,10 @@ def list( **kwargs # type: Any ): # type: (...) -> Iterable["_models.VideoEntityCollection"] - """List all existing video resources. + """Retrieves all existing video resources. - List all existing video resources in the specified account. + Retrieves a list of video resources that have been created, along with their JSON + representations. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str @@ -75,7 +76,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -88,7 +89,7 @@ def prepare_request(next_link=None): url = self.list.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -138,15 +139,15 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.VideoEntity" - """Retrieves a video resource. + """Retrieves an existing video resource. - Retrieves an existing video resource within an account with a given name. + Retrieves an existing video resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to retrieve. + :param video_name: The Video name. :type video_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VideoEntity, or the result of cls(response) @@ -158,14 +159,14 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -205,15 +206,15 @@ def create_or_update( **kwargs # type: Any ): # type: (...) -> "_models.VideoEntity" - """Create or updates a video resource. + """Creates a new video resource or updates an existing one. - Creates a new video resource or updates an existing one in an account. + Creates a new video resource or updates an existing video resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to create or update. + :param video_name: The Video name. :type video_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.VideoEntity @@ -227,7 +228,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -235,7 +236,7 @@ def create_or_update( url = self.create_or_update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -282,7 +283,7 @@ def delete( **kwargs # type: Any ): # type: (...) -> None - """Deletes a video resource. + """Deletes an existing video resource and its underlying data. Deletes an existing video resource and its underlying data. This operation is irreversible. @@ -290,7 +291,7 @@ def delete( :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to delete. + :param video_name: The Video name. :type video_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) @@ -302,14 +303,14 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -346,15 +347,15 @@ def update( **kwargs # type: Any ): # type: (...) -> "_models.VideoEntity" - """Updates the properties of a video resource. + """Updates individual properties of an existing video resource. - Updates individual properties of an existing video resource. + Updates individual properties of an existing video resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to update. + :param video_name: The Video name. :type video_name: str :param parameters: The request parameters. :type parameters: ~video_analyzer.models.VideoEntity @@ -368,7 +369,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -376,7 +377,7 @@ def update( url = self.update.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -411,42 +412,43 @@ def update( return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}'} # type: ignore - def list_streaming_token( + def list_content_token( self, resource_group_name, # type: str account_name, # type: str video_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.VideoStreamingToken" - """Generates a streaming token for video playback. + # type: (...) -> "_models.VideoContentToken" + """Generates a streaming token which can be used for accessing content from video content URLs. - Generates a streaming token used for authenticating video playback. + Generates a streaming token which can be used for accessing content from video content URLs, + for a video resource with the given name. :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str :param account_name: The Azure Video Analyzer account name. :type account_name: str - :param video_name: The name of the video to generate a token for playback. + :param video_name: The Video name. :type video_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: VideoStreamingToken, or the result of cls(response) - :rtype: ~video_analyzer.models.VideoStreamingToken + :return: VideoContentToken, or the result of cls(response) + :rtype: ~video_analyzer.models.VideoContentToken :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoStreamingToken"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.VideoContentToken"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-05-01-preview" + api_version = "2021-11-01-preview" accept = "application/json" # Construct URL - url = self.list_streaming_token.metadata['url'] # type: ignore + url = self.list_content_token.metadata['url'] # type: ignore path_format_arguments = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1), 'accountName': self._serialize.url("account_name", account_name, 'str'), 'videoName': self._serialize.url("video_name", video_name, 'str'), } @@ -469,10 +471,10 @@ def list_streaming_token( error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('VideoStreamingToken', pipeline_response) + deserialized = self._deserialize('VideoContentToken', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - list_streaming_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}/listStreamingToken'} # type: ignore + list_content_token.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Media/videoAnalyzers/{accountName}/videos/{videoName}/listContentToken'} # type: ignore diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/CHANGELOG.md b/sdk/webpubsub/azure-messaging-webpubsubservice/CHANGELOG.md index 45abf33ffcf2..8ba9deafec83 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/CHANGELOG.md +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/CHANGELOG.md @@ -1,9 +1,30 @@ # Release History -## 1.0.0b2 (Unreleased) +## 1.0.0 (2021-11-10) +### Breaking changes -## 1.0.0b1 (2021-04-27) +- rename operation `generate_client_token` to `get_client_access_token` +- moved operation `build_authentication_token` into `get_client_access_token` on the client +- rename parameter `role` to `roles` of operation `get_client_access_token` +- remove the `operations` namespace from `azure.messaging.webpubsubservice` +- rename operation `check_permission` to `has_permission` +- operations `connection_exists`, `group_exists`, `user_exists`, and `has_permission` now return boolean values instead of raising +- move parameter 'hub' from operation to client + +### Bug Fixes + +- add port to client's endpoint if included in connection string for `WebPubSubServiceClient.from_connection_string` +- fix proxy redirection to the endpoint specified in kwarg `reverse_proxy_endpoint` to run in correct policy placement and to not be overridden by `CustomHookPolicy`. +- fix bug that prevented users from calling `WebPubSubServiceClient.from_connection_string` with python 2.7 -Initial version +## 1.0.0b2 (2021-10-14) + +- Change api-version to `2021-10-01` +- Add operations to client +- Support AAD +- Support Api Management Proxy + +## 1.0.0b1 (2021-04-27) +- Initial version diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/MANIFEST.in b/sdk/webpubsub/azure-messaging-webpubsubservice/MANIFEST.in index a3b68055b727..2094336fbe77 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/MANIFEST.in +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/MANIFEST.in @@ -3,4 +3,4 @@ include azure/__init__.py include azure/messaging/__init__.py include LICENSE.txt recursive-include tests *.py -recursive-include examples *.py *.md \ No newline at end of file +recursive-include samples *.py *.md \ No newline at end of file diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/README.md b/sdk/webpubsub/azure-messaging-webpubsubservice/README.md index 9135d4d09e22..cc699068d5a6 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/README.md +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/README.md @@ -1,95 +1,81 @@ -# Azure WebPubSubService client library for Python +# Azure Web PubSub service client library for Python -[Azure Web PubSub Service](https://aka.ms/awps/doc) is a service that enables you to build real-time messaging web applications using WebSockets and the publish-subscribe pattern. Any platform supporting WebSocket APIs can connect to the service easily, e.g. web pages, mobile applications, edge devices, etc. The service manages the WebSocket connections for you and allows up to 100K concurrent connections. It provides powerful APIs for you to manage these clients and deliver real-time messages. +[Azure Web PubSub Service](https://aka.ms/awps/doc) is an Azure-managed service that helps developers easily build web applications with real-time features and publish-subscribe pattern. Any scenario that requires real-time publish-subscribe messaging between server and clients or among clients can use Azure Web PubSub service. Traditional real-time features that often require polling from server or submitting HTTP requests can also use Azure Web PubSub service. -Any scenario that requires real-time publish-subscribe messaging between server and clients or among clients, can use Azure Web PubSub service. Traditional real-time features that often require polling from server or submitting HTTP requests, can also use Azure Web PubSub service. +You can use this library in your app server side to manage the WebSocket client connections, as shown in below diagram: -We list some examples that are good to use Azure Web PubSub service: - -- **High frequency data updates:** gaming, voting, polling, auction. -- **Live dashboards and monitoring:** company dashboard, financial market data, instant sales update, multi-player game leader board, and IoT monitoring. -- **Cross-platform live chat:** live chat room, chat bot, on-line customer support, real-time shopping assistant, messenger, in-game chat, and so on. -- **Real-time location on map:** logistic tracking, delivery status tracking, transportation status updates, GPS apps. -- **Real-time targeted ads:** personalized real-time push ads and offers, interactive ads. -- **Collaborative apps:** coauthoring, whiteboard apps and team meeting software. -- **Push instant notifications:** social network, email, game, travel alert. -- **Real-time broadcasting:** live audio/video broadcasting, live captioning, translating, events/news broadcasting. -- **IoT and connected devices:** real-time IoT metrics, remote control, real-time status, and location tracking. -- **Automation:** real-time trigger from upstream events. - -Use the client library to: +![overflow](https://user-images.githubusercontent.com/668244/140014067-25a00959-04dc-47e8-ac25-6957bd0a71ce.png) +Use this library to: - Send messages to hubs and groups. - Send messages to particular users and connections. - Organize users and connections into groups. - Close connections -- Grant/revoke/check permissions for an existing connection +- Grant, revoke, and check permissions for an existing connection -[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/webpubsub/azure-messaging-webpubsubservice) | [Package (Pypi)][package] | [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/webpubsub/azure-messaging-webpubsubservice) | [Product documentation][webpubsubservice_docs] +[Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/webpubsub/azure-messaging-webpubsubservice) | [Package (Pypi)][package] | [API reference documentation](https://aka.ms/awps/sdk/python) | [Product documentation][webpubsubservice_docs] -## Getting started +## _Disclaimer_ -### Installating the package +_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_ -```bash -python -m pip install azure-messaging-webpubsubservice -``` +## Getting started -#### Prequisites +### Prerequisites - Python 2.7, or 3.6 or later is required to use this package. - You need an [Azure subscription][azure_sub], and a [Azure WebPubSub service instance][webpubsubservice_docs] to use this package. - An existing Azure Web PubSub service instance. -### Authenticating the client +### 1. Install the package + +```bash +python -m pip install azure-messaging-webpubsubservice +``` + +### 2. Create and authenticate a WebPubSubServiceClient -In order to interact with the Azure WebPubSub service, you'll need to create an instance of the [WebPubSubServiceClient][webpubsubservice_client_class] class. In order to authenticate against the service, you need to pass in an AzureKeyCredential instance with endpoint and api key. The endpoint and api key can be found on the azure portal. +You can authenticate the `WebPubSubServiceClient` using [connection string][connection_string]: ```python >>> from azure.messaging.webpubsubservice import WebPubSubServiceClient ->>> from azure.core.credentials import AzureKeyCredential ->>> client = WebPubSubServiceClient(endpoint='', credential=AzureKeyCredential('somesecret')) ->>> client -'> -``` -## Examples +>>> service = WebPubSubServiceClient.from_connection_string(connection_string='', hub='hub') +``` -### Sending a request +Or using the service endpoint and the access key: ```python >>> from azure.messaging.webpubsubservice import WebPubSubServiceClient >>> from azure.core.credentials import AzureKeyCredential ->>> from azure.messaging.webpubsubservice.rest import build_send_to_all_request ->>> client = WebPubSubServiceClient(endpoint='', credential=AzureKeyCredential('somesecret')) ->>> request = build_send_to_all_request('default', json={ 'Hello': 'webpubsub!' }) ->>> request - ->>> response = client.send_request(request) ->>> response - ->>> response.status_code -202 ->>> with open('file.json', 'r') as f: ->>> request = build_send_to_all_request('ahub', content=f, content_type='application/json') ->>> response = client.send_request(request) ->>> print(response) - + +>>> service = WebPubSubServiceClient(endpoint='', hub='hub', credential=AzureKeyCredential("")) ``` +Or using [Azure Active Directory][aad_doc]: +1. [pip][pip] install [`azure-identity`][azure_identity_pip] +2. Follow the document to [enable AAD authentication on your Webpubsub resource][aad_doc] +3. Update code to use [DefaultAzureCredential][default_azure_credential] + + ```python + >>> from azure.messaging.webpubsubservice import WebPubSubServiceClient + >>> from azure.identity import DefaultAzureCredential + >>> service = WebPubSubServiceClient(endpoint='', hub='hub', credential=DefaultAzureCredential()) + ``` + ## Key concepts ### Connection -Connections, represented by a connection id, represent an individual websocket connection to the Web PubSub service. Connection id is always unique. +A connection, also known as a client or a client connection, represents an individual WebSocket connection connected to the Web PubSub service. When successfully connected, a unique connection ID is assigned to this connection by the Web PubSub service. ### Hub -Hub is a logical concept for a set of connections. Connections are always connected to a specific hub. Messages that are broadcast to the hub are dispatched to all connections to that hub. Hub can be used for different applications, different applications can share one Azure Web PubSub service by using different hub names. +A hub is a logical concept for a set of client connections. Usually you use one hub for one purpose, for example, a chat hub, or a notification hub. When a client connection is created, it connects to a hub, and during its lifetime, it belongs to that hub. Different applications can share one Azure Web PubSub service by using different hub names. ### Group -Group allow broadcast messages to a subset of connections to the hub. You can add and remove users and connections as needed. A client can join multiple groups, and a group can contain multiple clients. +A group is a subset of connections to the hub. You can add a client connection to a group, or remove the client connection from the group, anytime you want. For example, when a client joins a chat room, or when a client leaves the chat room, this chat room can be considered to be a group. A client can join multiple groups, and a group can contain multiple clients. ### User @@ -97,7 +83,43 @@ Connections to Web PubSub can belong to one user. A user might have multiple con ### Message -Using this library, you can send messages to the client connections. A message can either be string text, JSON or binary payload. +When the client is connected, it can send messages to the upstream application, or receive messages from the upstream application, through the WebSocket connection. + +## Examples + +### Broadcast messages in JSON format + +```python +>>> from azure.messaging.webpubsubservice import WebPubSubServiceClient + +>>> service = WebPubSubServiceClient.from_connection_string('', hub='hub1') +>>> service.send_to_all(message = { + 'from': 'user1', + 'data': 'Hello world' + }) +``` + +The WebSocket client will receive JSON serialized text: `{"from": "user1", "data": "Hello world"}`. + +### Broadcast messages in plain-text format + +```python +>>> from azure.messaging.webpubsubservice import WebPubSubServiceClient +>>> service = WebPubSubServiceClient.from_connection_string('', hub='hub1') +>>> service.send_to_all(message = 'Hello world', content_type='text/plain') +``` + +The WebSocket client will receive text: `Hello world`. + +### Broadcast messages in binary format + +```python +>>> import io +>>> from azure.messaging.webpubsubservice import WebPubSubServiceClient +>>> service = WebPubSubServiceClient.from_connection_string('', hub='hub') +>>> service.send_to_all(message=io.StringIO('Hello World'), content_type='application/octet-stream') +``` +The WebSocket client will receive binary text: `b'Hello world'`. ## Troubleshooting @@ -107,16 +129,38 @@ This SDK uses Python standard logging library. You can configure logging print out debugging information to the stdout or anywhere you want. ```python +import sys import logging +from azure.identity import DefaultAzureCredential +>>> from azure.messaging.webpubsubservice import WebPubSubServiceClient + +# Create a logger for the 'azure' SDK +logger = logging.getLogger('azure') +logger.setLevel(logging.DEBUG) + +# Configure a console output +handler = logging.StreamHandler(stream=sys.stdout) +logger.addHandler(handler) -logging.basicConfig(level=logging.DEBUG) -```` +endpoint = "" +credential = DefaultAzureCredential() + +# This WebPubSubServiceClient will log detailed information about its HTTP sessions, at DEBUG level +service = WebPubSubServiceClient(endpoint=endpoint, hub='hub', credential=credential, logging_enable=True) +``` + +Similarly, `logging_enable` can enable detailed logging for a single call, +even when it isn't enabled for the WebPubSubServiceClient: + +```python +result = service.send_to_all(..., logging_enable=True) +``` Http request and response details are printed to stdout with this logging config. ## Next steps -More examples are coming soon... +Check [more samples here][samples]. ## Contributing @@ -139,10 +183,21 @@ additional questions or comments. [webpubsubservice_docs]: https://aka.ms/awps/doc [azure_cli]: https://docs.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ -[webpubsubservice_client_class]: https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/__init__.py [package]: https://pypi.org/project/azure-messaging-webpubsubservice/ [default_cred_ref]: https://aka.ms/azsdk-python-identity-default-cred-ref [cla]: https://cla.microsoft.com [code_of_conduct]: https://opensource.microsoft.com/codeofconduct/ [coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ [coc_contact]: mailto:opencode@microsoft.com +[authenticate_with_token]: https://docs.microsoft.com/azure/cognitive-services/authentication?tabs=powershell#authenticate-with-an-authentication-token +[azure_identity_credentials]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#credentials +[azure_identity_pip]: https://pypi.org/project/azure-identity/ +[default_azure_credential]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/identity/azure-identity#defaultazurecredential +[pip]: https://pypi.org/project/pip/ +[enable_aad]: https://docs.microsoft.com/azure/azure-web-pubsub/howto-develop-create-instance +[api_key]: https://docs.microsoft.com/azure/azure-web-pubsub/howto-websocket-connect?tabs=browser#authorization +[connection_string]: https://docs.microsoft.com/azure/azure-web-pubsub/howto-websocket-connect?tabs=browser#authorization +[azure_portal]: https://docs.microsoft.com/azure/azure-web-pubsub/howto-develop-create-instance +[azure-key-credential]: https://aka.ms/azsdk-python-core-azurekeycredential +[aad_doc]: https://aka.ms/awps/aad +[samples]: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/webpubsub/azure-messaging-webpubsubservice/samples diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/__init__.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/__init__.py index 529b1f7e9d7d..656cd0b03180 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/__init__.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/__init__.py @@ -1,232 +1,19 @@ # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# +# 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. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -__all__ = ["build_authentication_token", "WebPubSubServiceClient"] +from ._web_pub_sub_service_client import WebPubSubServiceClient +from ._version import VERSION -from copy import deepcopy -from datetime import datetime, timedelta -from typing import TYPE_CHECKING +__version__ = VERSION +__all__ = ['WebPubSubServiceClient'] -import jwt -import six - -import azure.core.credentials as corecredentials -import azure.core.pipeline as corepipeline -import azure.core.pipeline.policies as corepolicies -import azure.core.pipeline.transport as coretransport - - -# Temporary location for types that eventually graduate to Azure Core -from .core import rest as corerest -from ._version import VERSION as _VERSION -from ._policies import JwtCredentialPolicy -from ._utils import UTC as _UTC - -if TYPE_CHECKING: - from azure.core.pipeline.policies import HTTPPolicy, SansIOHTTPPolicy - from typing import Any, List, cast, Type, TypeVar - - ClientType = TypeVar("ClientType", bound="WebPubSubServiceClient") - - -def _parse_connection_string(connection_string, **kwargs): - for segment in connection_string.split(";"): - if "=" in segment: - key, value = segment.split("=", maxsplit=1) - key = key.lower() - if key not in ("version", ): - kwargs.setdefault(key, value) - elif segment: - raise ValueError( - "Malformed connection string - expected 'key=value', found segment '{}' in '{}'".format( - segment, connection_string - ) - ) - - if "endpoint" not in kwargs: - raise ValueError("connection_string missing 'endpoint' field") - - if "accesskey" not in kwargs: - raise ValueError("connection_string missing 'accesskey' field") - - return kwargs - -def build_authentication_token(endpoint, hub, **kwargs): - """Build an authentication token for the given endpoint, hub using the provided key. - - :keyword endpoint: connetion string or HTTP or HTTPS endpoint for the WebPubSub service instance. - :type endpoint: ~str - :keyword hub: The hub to give access to. - :type hub: ~str - :keyword accesskey: Key to sign the token with. Required if endpoint is not a connection string - :type accesskey: ~str - :keyword ttl: Optional ttl timedelta for the token. Default is 1 hour. - :type ttl: ~datetime.timedelta - :keyword user: Optional user name (subject) for the token. Default is no user. - :type user: ~str - :keyword roles: Roles for the token. - :type roles: typing.List[str]. Default is no roles. - :returns: ~dict containing the web socket endpoint, the token and a url with the generated access token. - :rtype: ~dict - - - Example: - >>> build_authentication_token(endpoint='https://contoso.com/api/webpubsub', hub='theHub', key='123') - { - 'baseUrl': 'wss://contoso.com/api/webpubsub/client/hubs/theHub', - 'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...', - 'url': 'wss://contoso.com/api/webpubsub/client/hubs/theHub?access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...' - } - """ - if 'accesskey' not in kwargs: - kwargs = _parse_connection_string(endpoint, **kwargs) - endpoint = kwargs.pop('endpoint') - - user = kwargs.pop("user", None) - key = kwargs.pop("accesskey") - ttl = kwargs.pop("ttl", timedelta(hours=1)) - roles = kwargs.pop("roles", []) - endpoint = endpoint.lower() - if not endpoint.startswith("http://") and not endpoint.startswith("https://"): - raise ValueError( - "Invalid endpoint: '{}' has unknown scheme - expected 'http://' or 'https://'".format( - endpoint - ) - ) - - # Ensure endpoint has no trailing slash - endpoint = endpoint.rstrip("/") - - # Switch from http(s) to ws(s) scheme - client_endpoint = "ws" + endpoint[4:] - client_url = "{}/client/hubs/{}".format(client_endpoint, hub) - audience = "{}/client/hubs/{}".format(endpoint, hub) - - payload = { - "aud": audience, - "iat": datetime.now(tz=_UTC), - "exp": datetime.now(tz=_UTC) + ttl, - } - if user: - payload["sub"] = user - if roles: - payload["role"] = roles - - token = six.ensure_str(jwt.encode(payload, key, algorithm="HS256")) - return { - "baseUrl": client_url, - "token": token, - "url": "{}?access_token={}".format(client_url, token), - } - - -class WebPubSubServiceClient(object): - def __init__(self, endpoint, credential, **kwargs): - # type: (str, corecredentials.AzureKeyCredential, Any) -> None - """Create a new WebPubSubServiceClient instance - - :param endpoint: Endpoint to connect to. - :type endpoint: ~str - :param credential: Credentials to use to connect to endpoint. - :type credential: ~azure.core.credentials.AzureKeyCredential - :keyword api_version: Api version to use when communicating with the service. - :type api_version: str - :keyword user: User to connect as. Optional. - :type user: ~str - """ - self.endpoint = endpoint.rstrip("/") - transport = kwargs.pop("transport", None) or coretransport.RequestsTransport( - **kwargs - ) - kwargs.setdefault( - "sdk_moniker", "messaging-webpubsubservice/{}".format(_VERSION) - ) - policies = [ - corepolicies.HeadersPolicy(**kwargs), - corepolicies.UserAgentPolicy(**kwargs), - corepolicies.RetryPolicy(**kwargs), - corepolicies.ProxyPolicy(**kwargs), - corepolicies.CustomHookPolicy(**kwargs), - corepolicies.RedirectPolicy(**kwargs), - JwtCredentialPolicy(credential, kwargs.get("user", None)), - corepolicies.NetworkTraceLoggingPolicy(**kwargs), - ] # type: Any - self._pipeline = corepipeline.Pipeline( - transport, - policies, - ) # type: corepipeline.Pipeline - - @classmethod - def from_connection_string(cls, connection_string, **kwargs): - # type: (Type[ClientType], str, Any) -> ClientType - """Create a new WebPubSubServiceClient from a connection string. - - :param connection_string: Connection string - :type connection_string: ~str - :rtype: WebPubSubServiceClient - """ - kwargs = _parse_connection_string(connection_string, **kwargs) - - kwargs["credential"] = corecredentials.AzureKeyCredential( - kwargs.pop("accesskey") - ) - return cls(**kwargs) - - def __repr__(self): - return " endpoint:'{}'".format(self.endpoint) - - def _format_url(self, url): - # type: (str) -> str - assert self.endpoint[-1] != "/", "My endpoint should not have a trailing slash" - return "/".join([self.endpoint, url.lstrip("/")]) - - def send_request(self, http_request, **kwargs): - # type: (corerest.HttpRequest, Any) -> corerest.HttpResponse - """Runs the network request through the client's chained policies. - - We have helper methods to create requests specific to this service in `azure.messaging.webpubsub.rest`. - Use these helper methods to create the request you pass to this method. See our example below: - - >>> from azure.messaging.webpubsub.rest import build_healthapi_get_health_status_request - >>> request = build_healthapi_get_health_status_request(api_version) - - >>> response = client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/llcwiki - - For advanced cases, you can also create your own :class:`~azure.messaging.webpubsub.core.rest.HttpRequest` - and pass it in. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.messaging.webpubsub.core.rest.HttpRequest - :keyword bool stream_response: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.messaging.webpubsub.core.rest.HttpResponse - """ - request_copy = deepcopy(http_request) - request_copy.url = self._format_url(request_copy.url) - - # can't do StreamCOntextManager yet. This client doesn't have a pipeline client, - # StreamContextManager requires a pipeline client. WIll look more into it - # if kwargs.pop("stream_response", False): - # return corerest._StreamContextManager( - # client=self._client, - # request=request_copy, - # ) - pipeline_response = self._pipeline.run(request_copy._internal_request, **kwargs) # pylint: disable=protected-access - response = corerest.HttpResponse( - status_code=pipeline_response.http_response.status_code, - request=request_copy, - _internal_response=pipeline_response.http_response, - ) - response.read() - return response +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_configuration.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_configuration.py new file mode 100644 index 000000000000..0ad85a86eb78 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_configuration.py @@ -0,0 +1,80 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from ._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any + + from azure.core.credentials import TokenCredential + + +class WebPubSubServiceClientConfiguration(Configuration): + """Configuration for WebPubSubServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param hub: Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. + :type hub: str + :param endpoint: HTTP or HTTPS endpoint for the Web PubSub service instance. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + hub, # type: str + endpoint, # type: str + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + super(WebPubSubServiceClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + if hub is None: + raise ValueError("Parameter 'hub' must not be None.") + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.hub = hub + self.endpoint = endpoint + self.credential = credential + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://webpubsub.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'messaging-webpubsubservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/__init__.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/__init__.py new file mode 100644 index 000000000000..af83bc4323b2 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import WebPubSubServiceClientOperationsMixin + +__all__ = [ + 'WebPubSubServiceClientOperationsMixin', +] diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/_operations.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/_operations.py new file mode 100644 index 000000000000..a3e45932a41a --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_operations/_operations.py @@ -0,0 +1,2042 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 functools +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer + +from .._vendor import _format_url_section + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union + T = TypeVar('T') + JSONType = Any + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +_SERIALIZER = Serializer() +_SERIALIZER.client_side_validation = False +# fmt: off + +def build_get_client_access_token_request( + hub, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + user_id = kwargs.pop('user_id', None) # type: Optional[str] + roles = kwargs.pop('roles', None) # type: Optional[List[str]] + minutes_to_expire = kwargs.pop('minutes_to_expire', 60) # type: Optional[int] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/:generateToken') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if user_id is not None: + query_parameters['userId'] = _SERIALIZER.query("user_id", user_id, 'str') + if roles is not None: + query_parameters['role'] = [_SERIALIZER.query("roles", q, 'str') if q is not None else '' for q in roles] + if minutes_to_expire is not None: + query_parameters['minutesToExpire'] = _SERIALIZER.query("minutes_to_expire", minutes_to_expire, 'int') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_close_all_connections_request( + hub, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + reason = kwargs.pop('reason', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/:closeConnections') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if excluded is not None: + query_parameters['excluded'] = [_SERIALIZER.query("excluded", q, 'str') if q is not None else '' for q in excluded] + if reason is not None: + query_parameters['reason'] = _SERIALIZER.query("reason", reason, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_send_to_all_request( + hub, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/:send') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if excluded is not None: + query_parameters['excluded'] = [_SERIALIZER.query("excluded", q, 'str') if q is not None else '' for q in excluded] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_connection_exists_request( + hub, # type: str + connection_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/connections/{connectionId}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "connectionId": _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="HEAD", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_close_connection_request( + hub, # type: str + connection_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + reason = kwargs.pop('reason', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/connections/{connectionId}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "connectionId": _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if reason is not None: + query_parameters['reason'] = _SERIALIZER.query("reason", reason, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_send_to_connection_request( + hub, # type: str + connection_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/connections/{connectionId}/:send') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "connectionId": _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_group_exists_request( + hub, # type: str + group, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/groups/{group}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "group": _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="HEAD", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_close_group_connections_request( + hub, # type: str + group, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + reason = kwargs.pop('reason', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/groups/{group}/:closeConnections') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "group": _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if excluded is not None: + query_parameters['excluded'] = [_SERIALIZER.query("excluded", q, 'str') if q is not None else '' for q in excluded] + if reason is not None: + query_parameters['reason'] = _SERIALIZER.query("reason", reason, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_send_to_group_request( + hub, # type: str + group, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/groups/{group}/:send') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "group": _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if excluded is not None: + query_parameters['excluded'] = [_SERIALIZER.query("excluded", q, 'str') if q is not None else '' for q in excluded] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_add_connection_to_group_request( + hub, # type: str + group, # type: str + connection_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/groups/{group}/connections/{connectionId}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "group": _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), + "connectionId": _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_remove_connection_from_group_request( + hub, # type: str + group, # type: str + connection_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/groups/{group}/connections/{connectionId}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "group": _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), + "connectionId": _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_user_exists_request( + hub, # type: str + user_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "userId": _SERIALIZER.url("user_id", user_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="HEAD", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_close_user_connections_request( + hub, # type: str + user_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + reason = kwargs.pop('reason', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}/:closeConnections') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "userId": _SERIALIZER.url("user_id", user_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if excluded is not None: + query_parameters['excluded'] = [_SERIALIZER.query("excluded", q, 'str') if q is not None else '' for q in excluded] + if reason is not None: + query_parameters['reason'] = _SERIALIZER.query("reason", reason, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_send_to_user_request( + hub, # type: str + user_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}/:send') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "userId": _SERIALIZER.url("user_id", user_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + if content_type is not None: + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="POST", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_add_user_to_group_request( + hub, # type: str + group, # type: str + user_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}/groups/{group}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "group": _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), + "userId": _SERIALIZER.url("user_id", user_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_remove_user_from_group_request( + hub, # type: str + group, # type: str + user_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}/groups/{group}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "group": _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), + "userId": _SERIALIZER.url("user_id", user_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_remove_user_from_all_groups_request( + hub, # type: str + user_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}/groups') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "userId": _SERIALIZER.url("user_id", user_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_grant_permission_request( + hub, # type: str + permission, # type: str + connection_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + target_name = kwargs.pop('target_name', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "permission": _SERIALIZER.url("permission", permission, 'str'), + "connectionId": _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if target_name is not None: + query_parameters['targetName'] = _SERIALIZER.query("target_name", target_name, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="PUT", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_revoke_permission_request( + hub, # type: str + permission, # type: str + connection_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + target_name = kwargs.pop('target_name', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "permission": _SERIALIZER.url("permission", permission, 'str'), + "connectionId": _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if target_name is not None: + query_parameters['targetName'] = _SERIALIZER.query("target_name", target_name, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="DELETE", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + + +def build_has_permission_request( + hub, # type: str + permission, # type: str + connection_id, # type: str + **kwargs # type: Any +): + # type: (...) -> HttpRequest + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + target_name = kwargs.pop('target_name', None) # type: Optional[str] + + accept = "application/json, text/json" + # Construct URL + url = kwargs.pop("template_url", '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}') + path_format_arguments = { + "hub": _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), + "permission": _SERIALIZER.url("permission", permission, 'str'), + "connectionId": _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), + } + + url = _format_url_section(url, **path_format_arguments) + + # Construct parameters + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + if target_name is not None: + query_parameters['targetName'] = _SERIALIZER.query("target_name", target_name, 'str') + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + + return HttpRequest( + method="HEAD", + url=url, + params=query_parameters, + headers=header_parameters, + **kwargs + ) + +# fmt: on +class WebPubSubServiceClientOperationsMixin(object): + + @distributed_trace + def get_client_access_token( + self, + **kwargs # type: Any + ): + # type: (...) -> JSONType + """Generate token for the client to connect Azure Web PubSub service. + + Generate token for the client to connect Azure Web PubSub service. + + :keyword user_id: User Id. + :paramtype user_id: str + :keyword roles: Roles that the connection with the generated token will have. + :paramtype roles: list[str] + :keyword minutes_to_expire: The expire time of the generated token. + :paramtype minutes_to_expire: int + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSONType + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "token": "str" # Optional. The token value for the WebSocket client to connect to the service. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[JSONType] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + user_id = kwargs.pop('user_id', None) # type: Optional[str] + roles = kwargs.pop('roles', None) # type: Optional[List[str]] + minutes_to_expire = kwargs.pop('minutes_to_expire', 60) # type: Optional[int] + + + request = build_get_client_access_token_request( + hub=self._config.hub, + api_version=api_version, + user_id=user_id, + roles=roles, + minutes_to_expire=minutes_to_expire, + template_url=self.get_client_access_token.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_client_access_token.metadata = {'url': '/api/hubs/{hub}/:generateToken'} # type: ignore + + + @distributed_trace + def close_all_connections( + self, + **kwargs # type: Any + ): + # type: (...) -> None + """Close the connections in the hub. + + Close the connections in the hub. + + :keyword excluded: Exclude these connectionIds when closing the connections in the hub. + :paramtype excluded: list[str] + :keyword reason: The reason closing the client connection. + :paramtype reason: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + reason = kwargs.pop('reason', None) # type: Optional[str] + + + request = build_close_all_connections_request( + hub=self._config.hub, + api_version=api_version, + excluded=excluded, + reason=reason, + template_url=self.close_all_connections.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + close_all_connections.metadata = {'url': '/api/hubs/{hub}/:closeConnections'} # type: ignore + + + @distributed_trace + def send_to_all( + self, + message, # type: Union[IO, str, JSONType] + **kwargs # type: Any + ): + # type: (...) -> None + """Broadcast content inside request body to all the connected client connections. + + Broadcast content inside request body to all the connected client connections. + + :param message: The payload body. + :type message: IO or str or JSONType + :keyword excluded: Excluded connection Ids. + :paramtype excluded: list[str] + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword str content_type: Media type of the body sent to the API. Default value is + "application/json". Allowed values are: "application/json", "application/octet-stream", + "text/plain." + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + + json = None + content = None + if content_type.split(";")[0] in ['application/json']: + json = message + elif content_type.split(";")[0] in ['application/octet-stream', 'text/plain']: + content = message + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json', 'application/octet-stream', 'text/plain']".format(content_type) + ) + + request = build_send_to_all_request( + hub=self._config.hub, + api_version=api_version, + content_type=content_type, + json=json, + content=content, + excluded=excluded, + template_url=self.send_to_all.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + send_to_all.metadata = {'url': '/api/hubs/{hub}/:send'} # type: ignore + + + @distributed_trace + def connection_exists( + self, + connection_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> bool + """Check if the connection with the given connectionId exists. + + Check if the connection with the given connectionId exists. + + :param connection_id: The connection Id. + :type connection_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: bool + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_connection_exists_request( + hub=self._config.hub, + connection_id=connection_id, + api_version=api_version, + template_url=self.connection_exists.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + connection_exists.metadata = {'url': '/api/hubs/{hub}/connections/{connectionId}'} # type: ignore + + + @distributed_trace + def close_connection( + self, + connection_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Close the client connection. + + Close the client connection. + + :param connection_id: Target connection Id. + :type connection_id: str + :keyword reason: The reason closing the client connection. + :paramtype reason: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + reason = kwargs.pop('reason', None) # type: Optional[str] + + + request = build_close_connection_request( + hub=self._config.hub, + connection_id=connection_id, + api_version=api_version, + reason=reason, + template_url=self.close_connection.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + close_connection.metadata = {'url': '/api/hubs/{hub}/connections/{connectionId}'} # type: ignore + + + @distributed_trace + def send_to_connection( + self, + connection_id, # type: str + message, # type: Union[IO, str, JSONType] + **kwargs # type: Any + ): + # type: (...) -> None + """Send content inside request body to the specific connection. + + Send content inside request body to the specific connection. + + :param connection_id: The connection Id. + :type connection_id: str + :param message: The payload body. + :type message: IO or str or JSONType + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword str content_type: Media type of the body sent to the API. Default value is + "application/json". Allowed values are: "application/json", "application/octet-stream", + "text/plain." + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = None + content = None + if content_type.split(";")[0] in ['application/json']: + json = message + elif content_type.split(";")[0] in ['application/octet-stream', 'text/plain']: + content = message + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json', 'application/octet-stream', 'text/plain']".format(content_type) + ) + + request = build_send_to_connection_request( + hub=self._config.hub, + connection_id=connection_id, + api_version=api_version, + content_type=content_type, + json=json, + content=content, + template_url=self.send_to_connection.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + send_to_connection.metadata = {'url': '/api/hubs/{hub}/connections/{connectionId}/:send'} # type: ignore + + + @distributed_trace + def group_exists( + self, + group, # type: str + **kwargs # type: Any + ): + # type: (...) -> bool + """Check if there are any client connections inside the given group. + + Check if there are any client connections inside the given group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: bool + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_group_exists_request( + hub=self._config.hub, + group=group, + api_version=api_version, + template_url=self.group_exists.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + group_exists.metadata = {'url': '/api/hubs/{hub}/groups/{group}'} # type: ignore + + + @distributed_trace + def close_group_connections( + self, + group, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Close connections in the specific group. + + Close connections in the specific group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :keyword excluded: Exclude these connectionIds when closing the connections in the group. + :paramtype excluded: list[str] + :keyword reason: The reason closing the client connection. + :paramtype reason: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + reason = kwargs.pop('reason', None) # type: Optional[str] + + + request = build_close_group_connections_request( + hub=self._config.hub, + group=group, + api_version=api_version, + excluded=excluded, + reason=reason, + template_url=self.close_group_connections.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + close_group_connections.metadata = {'url': '/api/hubs/{hub}/groups/{group}/:closeConnections'} # type: ignore + + + @distributed_trace + def send_to_group( + self, + group, # type: str + message, # type: Union[IO, str, JSONType] + **kwargs # type: Any + ): + # type: (...) -> None + """Send content inside request body to a group of connections. + + Send content inside request body to a group of connections. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param message: The payload body. + :type message: IO or str or JSONType + :keyword excluded: Excluded connection Ids. + :paramtype excluded: list[str] + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword str content_type: Media type of the body sent to the API. Default value is + "application/json". Allowed values are: "application/json", "application/octet-stream", + "text/plain." + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + + json = None + content = None + if content_type.split(";")[0] in ['application/json']: + json = message + elif content_type.split(";")[0] in ['application/octet-stream', 'text/plain']: + content = message + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json', 'application/octet-stream', 'text/plain']".format(content_type) + ) + + request = build_send_to_group_request( + hub=self._config.hub, + group=group, + api_version=api_version, + content_type=content_type, + json=json, + content=content, + excluded=excluded, + template_url=self.send_to_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + send_to_group.metadata = {'url': '/api/hubs/{hub}/groups/{group}/:send'} # type: ignore + + + @distributed_trace + def add_connection_to_group( + self, + group, # type: str + connection_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Add a connection to the target group. + + Add a connection to the target group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_add_connection_to_group_request( + hub=self._config.hub, + group=group, + connection_id=connection_id, + api_version=api_version, + template_url=self.add_connection_to_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + add_connection_to_group.metadata = {'url': '/api/hubs/{hub}/groups/{group}/connections/{connectionId}'} # type: ignore + + + @distributed_trace + def remove_connection_from_group( + self, + group, # type: str + connection_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a connection from the target group. + + Remove a connection from the target group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_remove_connection_from_group_request( + hub=self._config.hub, + group=group, + connection_id=connection_id, + api_version=api_version, + template_url=self.remove_connection_from_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + remove_connection_from_group.metadata = {'url': '/api/hubs/{hub}/groups/{group}/connections/{connectionId}'} # type: ignore + + + @distributed_trace + def user_exists( + self, + user_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> bool + """Check if there are any client connections connected for the given user. + + Check if there are any client connections connected for the given user. + + :param user_id: Target user Id. + :type user_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: bool + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_user_exists_request( + hub=self._config.hub, + user_id=user_id, + api_version=api_version, + template_url=self.user_exists.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + user_exists.metadata = {'url': '/api/hubs/{hub}/users/{userId}'} # type: ignore + + + @distributed_trace + def close_user_connections( + self, + user_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Close connections for the specific user. + + Close connections for the specific user. + + :param user_id: The user Id. + :type user_id: str + :keyword excluded: Exclude these connectionIds when closing the connections for the user. + :paramtype excluded: list[str] + :keyword reason: The reason closing the client connection. + :paramtype reason: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] + reason = kwargs.pop('reason', None) # type: Optional[str] + + + request = build_close_user_connections_request( + hub=self._config.hub, + user_id=user_id, + api_version=api_version, + excluded=excluded, + reason=reason, + template_url=self.close_user_connections.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + close_user_connections.metadata = {'url': '/api/hubs/{hub}/users/{userId}/:closeConnections'} # type: ignore + + + @distributed_trace + def send_to_user( + self, + user_id, # type: str + message, # type: Union[IO, str, JSONType] + **kwargs # type: Any + ): + # type: (...) -> None + """Send content inside request body to the specific user. + + Send content inside request body to the specific user. + + :param user_id: The user Id. + :type user_id: str + :param message: The payload body. + :type message: IO or str or JSONType + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword str content_type: Media type of the body sent to the API. Default value is + "application/json". Allowed values are: "application/json", "application/octet-stream", + "text/plain." + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = None + content = None + if content_type.split(";")[0] in ['application/json']: + json = message + elif content_type.split(";")[0] in ['application/octet-stream', 'text/plain']: + content = message + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json', 'application/octet-stream', 'text/plain']".format(content_type) + ) + + request = build_send_to_user_request( + hub=self._config.hub, + user_id=user_id, + api_version=api_version, + content_type=content_type, + json=json, + content=content, + template_url=self.send_to_user.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + send_to_user.metadata = {'url': '/api/hubs/{hub}/users/{userId}/:send'} # type: ignore + + + @distributed_trace + def add_user_to_group( + self, + group, # type: str + user_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Add a user to the target group. + + Add a user to the target group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param user_id: Target user Id. + :type user_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_add_user_to_group_request( + hub=self._config.hub, + group=group, + user_id=user_id, + api_version=api_version, + template_url=self.add_user_to_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + add_user_to_group.metadata = {'url': '/api/hubs/{hub}/users/{userId}/groups/{group}'} # type: ignore + + + @distributed_trace + def remove_user_from_group( + self, + group, # type: str + user_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a user from the target group. + + Remove a user from the target group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param user_id: Target user Id. + :type user_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_remove_user_from_group_request( + hub=self._config.hub, + group=group, + user_id=user_id, + api_version=api_version, + template_url=self.remove_user_from_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + remove_user_from_group.metadata = {'url': '/api/hubs/{hub}/users/{userId}/groups/{group}'} # type: ignore + + + @distributed_trace + def remove_user_from_all_groups( + self, + user_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Remove a user from all groups. + + Remove a user from all groups. + + :param user_id: Target user Id. + :type user_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_remove_user_from_all_groups_request( + hub=self._config.hub, + user_id=user_id, + api_version=api_version, + template_url=self.remove_user_from_all_groups.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + remove_user_from_all_groups.metadata = {'url': '/api/hubs/{hub}/users/{userId}/groups'} # type: ignore + + + @distributed_trace + def grant_permission( + self, + permission, # type: str + connection_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Grant permission to the connection. + + Grant permission to the connection. + + :param permission: The permission: current supported actions are joinLeaveGroup and + sendToGroup. Possible values are: "sendToGroup" or "joinLeaveGroup". + :type permission: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword target_name: The meaning of the target depends on the specific permission. For + joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. + :paramtype target_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + target_name = kwargs.pop('target_name', None) # type: Optional[str] + + + request = build_grant_permission_request( + hub=self._config.hub, + permission=permission, + connection_id=connection_id, + api_version=api_version, + target_name=target_name, + template_url=self.grant_permission.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + grant_permission.metadata = {'url': '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}'} # type: ignore + + + @distributed_trace + def revoke_permission( + self, + permission, # type: str + connection_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> None + """Revoke permission for the connection. + + Revoke permission for the connection. + + :param permission: The permission: current supported actions are joinLeaveGroup and + sendToGroup. Possible values are: "sendToGroup" or "joinLeaveGroup". + :type permission: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword target_name: The meaning of the target depends on the specific permission. For + joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. + :paramtype target_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + target_name = kwargs.pop('target_name', None) # type: Optional[str] + + + request = build_revoke_permission_request( + hub=self._config.hub, + permission=permission, + connection_id=connection_id, + api_version=api_version, + target_name=target_name, + template_url=self.revoke_permission.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + revoke_permission.metadata = {'url': '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}'} # type: ignore + + + @distributed_trace + def has_permission( + self, + permission, # type: str + connection_id, # type: str + **kwargs # type: Any + ): + # type: (...) -> bool + """Check if a connection has permission to the specified action. + + Check if a connection has permission to the specified action. + + :param permission: The permission: current supported actions are joinLeaveGroup and + sendToGroup. Possible values are: "sendToGroup" or "joinLeaveGroup". + :type permission: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword target_name: The meaning of the target depends on the specific permission. For + joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. + :paramtype target_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: bool + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + target_name = kwargs.pop('target_name', None) # type: Optional[str] + + + request = build_has_permission_request( + hub=self._config.hub, + permission=permission, + connection_id=connection_id, + api_version=api_version, + target_name=target_name, + template_url=self.has_permission.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + has_permission.metadata = {'url': '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}'} # type: ignore + diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py new file mode 100644 index 000000000000..992059ff47f7 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_patch.py @@ -0,0 +1,379 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import typing +import jwt +import six +from datetime import datetime, timedelta, tzinfo +from typing import TYPE_CHECKING +import importlib + +from ._version import VERSION +from ._web_pub_sub_service_client import WebPubSubServiceClient as GeneratedWebPubSubServiceClient + +from msrest import Deserializer, Serializer +from azure.core.pipeline import policies +from azure.core import PipelineClient +from azure.core.configuration import Configuration +from azure.core.pipeline.policies import SansIOHTTPPolicy, ProxyPolicy +from azure.core.credentials import AzureKeyCredential +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator import distributed_trace +from msrest import Serializer + + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Optional, TypeVar, Union + from ._operations._operations import JSONType + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Type, TypeVar, Any, Union, Dict + + ClientType = TypeVar("ClientType", bound="WebPubSubServiceClient") + + from azure.core.credentials import TokenCredential + from azure.core.pipeline import PipelineRequest + + +class _UTC_TZ(tzinfo): + """from https://docs.python.org/2/library/datetime.html#tzinfo-objects""" + + ZERO = timedelta(0) + + def utcoffset(self, dt): + return self.__class__.ZERO + + def tzname(self, dt): + return "UTC" + + def dst(self, dt): + return self.__class__.ZERO + + +def _get_token_by_key(endpoint, hub, key, **kwargs): + # type: (str, str, str, Any) -> str + """build token with access key. + + :param endpoint: HTTPS endpoint for the WebPubSub service instance. + :type endpoint: str + :param hub: The hub to give access to. + :type hub: str + :param key: The access key + :type hub: str + :keyword dict[str, any] jwt_headers: Any headers you want to pass to jwt encoding. + :returns: token + :rtype: str + """ + audience = "{}/client/hubs/{}".format(endpoint, hub) + user = kwargs.pop("user_id", None) + ttl = timedelta(minutes=kwargs.pop("minutes_to_expire", 60)) + roles = kwargs.pop("roles", []) + + payload = { + "aud": audience, + "iat": datetime.now(tz=_UTC_TZ()), + "exp": datetime.now(tz=_UTC_TZ()) + ttl, + } + if user: + payload["sub"] = user + if roles: + payload["role"] = roles + + return six.ensure_str(jwt.encode(payload, key, algorithm="HS256", headers=kwargs.pop("jwt_headers", {}))) + + +def _parse_connection_string(connection_string, **kwargs): + # type: (str, Any) -> JSONType + for segment in connection_string.split(";"): + if "=" in segment: + key, value = segment.split("=", 1) + key = key.lower() + if key not in ("version",): + kwargs.setdefault(key, value) + elif segment: + raise ValueError( + "Malformed connection string - expected 'key=value', found segment '{}' in '{}'".format( + segment, connection_string + ) + ) + + if "endpoint" not in kwargs: + raise ValueError("connection_string missing 'endpoint' field") + + if "accesskey" not in kwargs: + raise ValueError("connection_string missing 'accesskey' field") + + return kwargs + + +class JwtCredentialPolicy(SansIOHTTPPolicy): + + NAME_CLAIM_TYPE = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" + + def __init__(self, credential, user=None): + # type: (AzureKeyCredential, typing.Optional[str]) -> None + """Create a new instance of the policy associated with the given credential. + + :param credential: The azure.core.credentials.AzureKeyCredential instance to use + :type credential: ~azure.core.credentials.AzureKeyCredential + :param user: Optional user name associated with the credential. + :type user: str + """ + self._credential = credential + self._user = user + + def on_request(self, request): + # type: (PipelineRequest) -> typing.Union[None, typing.Awaitable[None]] + """Is executed before sending the request from next policy. + + :param request: Request to be modified before sent from next policy. + :type request: ~azure.core.pipeline.PipelineRequest + """ + request.http_request.headers["Authorization"] = "Bearer " + self._encode( + request.http_request.url + ) + return super(JwtCredentialPolicy, self).on_request(request) + + def _encode(self, url): + # type: (AzureKeyCredential) -> str + data = { + "aud": url, + "exp": datetime.now(tz=_UTC_TZ()) + timedelta(seconds=60), + } + if self._user: + data[self.NAME_CLAIM_TYPE] = self._user + + encoded = jwt.encode( + payload=data, + key=self._credential.key, + algorithm="HS256", + ) + return six.ensure_str(encoded) + + +class ApiManagementProxy(ProxyPolicy): + + def __init__(self, **kwargs): + # type: (Any) -> None + """Create a new instance of the policy. + + :param endpoint: endpoint to be replaced + :type endpoint: str + :param proxy_endpoint: proxy endpoint + :type proxy_endpoint: str + """ + super(ApiManagementProxy, self).__init__(**kwargs) + self._endpoint = kwargs.pop('origin_endpoint', None) + self._reverse_proxy_endpoint = kwargs.pop('reverse_proxy_endpoint', None) + + + def on_request(self, request): + # type: (PipelineRequest) -> None + """Is executed before sending the request from next policy. + + :param request: Request to be modified before sent from next policy. + :type request: ~azure.core.pipeline.PipelineRequest + """ + super(ApiManagementProxy, self).on_request(request) + if self._endpoint and self._reverse_proxy_endpoint: + request.http_request.url = request.http_request.url.replace(self._endpoint, self._reverse_proxy_endpoint) + + +class WebPubSubServiceClientConfiguration(Configuration): + """Configuration for WebPubSubServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param hub: Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. + :type hub: str + :param endpoint: HTTP or HTTPS endpoint for the Web PubSub service instance. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: Union[~azure.core.credentials.TokenCredential, ~azure.core.credentials.AzureKeyCredential] + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this default value may result in unsupported behavior. + """ + + def __init__( + self, + hub, # type: str + endpoint, # type: str + credential, # type: Union[TokenCredential, AzureKeyCredential] + **kwargs # type: Any + ): + # type: (...) -> None + super(WebPubSubServiceClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + if hub is None: + raise ValueError("Parameter 'hub' must not be None.") + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.hub = hub + self.endpoint = endpoint + self.credential = credential + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://webpubsub.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'messaging-webpubsubservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs # type: Any + ): + # type: (...) -> None + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or ApiManagementProxy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + if isinstance(self.credential, AzureKeyCredential): + self.authentication_policy = JwtCredentialPolicy(self.credential, kwargs.get('user')) + else: + self.authentication_policy = policies.BearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + + +class WebPubSubServiceClient(GeneratedWebPubSubServiceClient): + """WebPubSubServiceClient. + + :param endpoint: HTTP or HTTPS endpoint for the Web PubSub service instance. + :type endpoint: str + :param hub: Target hub name, which should start with alphabetic characters and only contain + alpha-numeric characters or underscore. + :type hub: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential or ~azure.core.credentials.AzureKeyCredential + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + endpoint, # type: str + hub, # type: str + credential, # type: Union[TokenCredential, AzureKeyCredential] + **kwargs # type: Any + ): + # type: (...) -> None + if kwargs.get("port") and endpoint: + endpoint = endpoint.rstrip("/") + ":{}".format(kwargs.pop('port')) + kwargs['origin_endpoint'] = endpoint + _endpoint = '{Endpoint}' + self._config = WebPubSubServiceClientConfiguration(hub=hub, endpoint=endpoint, credential=credential, **kwargs) + self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + @classmethod + def from_connection_string(cls, connection_string, hub, **kwargs): + # type: (Type[ClientType], str, str, Any) -> ClientType + """Create a new WebPubSubServiceClient from a connection string. + + :param connection_string: Connection string + :type connection_string: str + :param hub: Target hub name, which should start with alphabetic characters and only contain + alpha-numeric characters or underscore. + :type hub: str + :rtype: WebPubSubServiceClient + """ + kwargs = _parse_connection_string(connection_string, **kwargs) + + credential = AzureKeyCredential(kwargs.pop("accesskey")) + return cls(hub=hub, credential=credential, **kwargs) + + @distributed_trace + def get_client_access_token(self, **kwargs): + # type: (Any) -> JSONType + """Build an authentication token. + + :keyword user_id: User Id. + :paramtype user_id: str + :keyword roles: Roles that the connection with the generated token will have. + :paramtype roles: list[str] + :keyword minutes_to_expire: The expire time of the generated token. + :paramtype minutes_to_expire: int + :keyword dict[str, any] jwt_headers: Any headers you want to pass to jwt encoding. + :returns: JSON response containing the web socket endpoint, the token and a url with the generated access token. + :rtype: JSONType + + Example: + >>> get_client_access_token() + { + 'baseUrl': 'wss://contoso.com/api/webpubsub/client/hubs/theHub', + 'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...', + 'url': 'wss://contoso.com/api/webpubsub/client/hubs/theHub?access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...' + } + """ + endpoint = self._config.endpoint.lower() + if not endpoint.startswith("http://") and not endpoint.startswith("https://"): + raise ValueError( + "Invalid endpoint: '{}' has unknown scheme - expected 'http://' or 'https://'".format( + endpoint + ) + ) + + # Ensure endpoint has no trailing slash + endpoint = endpoint.rstrip("/") + + # Switch from http(s) to ws(s) scheme + client_endpoint = "ws" + endpoint[4:] + hub = self._config.hub + client_url = "{}/client/hubs/{}".format(client_endpoint, hub) + jwt_headers = kwargs.pop("jwt_headers", {}) + if isinstance(self._config.credential, AzureKeyCredential): + token = _get_token_by_key(endpoint, hub, self._config.credential.key, jwt_headers=jwt_headers, **kwargs) + else: + token = super(WebPubSubServiceClient, self).get_client_access_token(**kwargs).get('token') + + return { + "baseUrl": client_url, + "token": token, + "url": "{}?access_token={}".format(client_url, token), + } + get_client_access_token.metadata = {'url': '/api/hubs/{hub}/:generateToken'} # type: ignore + + +def patch_sdk(): + curr_package = importlib.import_module("azure.messaging.webpubsubservice") + curr_package.WebPubSubServiceClient = WebPubSubServiceClient diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_policies.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_policies.py deleted file mode 100644 index 6dc11981689a..000000000000 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_policies.py +++ /dev/null @@ -1,83 +0,0 @@ -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -import datetime -import typing -import jwt -import six - -from azure.core.pipeline.policies import SansIOHTTPPolicy - -from ._utils import UTC - -if typing.TYPE_CHECKING: - from azure.core.credentials import AzureKeyCredential - from azure.core.pipeline import PipelineRequest - - -class JwtCredentialPolicy(SansIOHTTPPolicy): - - NAME_CLAIM_TYPE = "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name" - - def __init__(self, credential, user=None): - # type: (AzureKeyCredential, typing.Optional[str]) -> None - """Create a new instance of the policy associated with the given credential. - - :param credential: The azure.core.credentials.AzureKeyCredential instance to use - :type credential: ~azure.core.credentials.AzureKeyCredential - :param user: Optional user name associated with the credential. - :type user: str - """ - self._credential = credential - self._user = user - - def on_request(self, request): - # type: (PipelineRequest) -> typing.Union[None, typing.Awaitable[None]] - """Is executed before sending the request from next policy. - - :param request: Request to be modified before sent from next policy. - :type request: ~azure.core.pipeline.PipelineRequest - """ - request.http_request.headers["Authorization"] = "Bearer " + self._encode( - request.http_request.url - ) - return super(JwtCredentialPolicy, self).on_request(request) - - def _encode(self, url): - # type: (AzureKeyCredential) -> str - data = { - "aud": url, - "exp": datetime.datetime.now(tz=UTC) + datetime.timedelta(seconds=60), - } - if self._user: - data[self.NAME_CLAIM_TYPE] = self._user - - encoded = jwt.encode( - payload=data, - key=self._credential.key, - algorithm="HS256", - ) - return six.ensure_str(encoded) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_utils.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_utils.py deleted file mode 100644 index 042b46dd8848..000000000000 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_utils.py +++ /dev/null @@ -1,45 +0,0 @@ -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -import datetime - - -class _UTC_TZ(datetime.tzinfo): - """from https://docs.python.org/2/library/datetime.html#tzinfo-objects""" - - ZERO = datetime.timedelta(0) - - def utcoffset(self, dt): - return self.__class__.ZERO - - def tzname(self, dt): - return "UTC" - - def dst(self, dt): - return self.__class__.ZERO - - -UTC = _UTC_TZ() diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_vendor.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_vendor.py new file mode 100644 index 000000000000..e12b61dea670 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_vendor.py @@ -0,0 +1,21 @@ +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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. +# -------------------------------------------------------------------------- + + + + +def _format_url_section(template, **kwargs): + components = template.split("/") + while components: + try: + return template.format(**kwargs) + except KeyError as key: + formatted_components = template.split("/") + components = [ + c for c in formatted_components if "{}".format(key.args[0]) not in c + ] + template = "/".join(components) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_version.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_version.py index e1816f2340d7..c47f66669f1b 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_version.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_version.py @@ -1,6 +1,9 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- -VERSION = "1.0.0b2" +VERSION = "1.0.0" diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_web_pub_sub_service_client.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_web_pub_sub_service_client.py new file mode 100644 index 000000000000..9d96f87e1225 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/_web_pub_sub_service_client.py @@ -0,0 +1,99 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import TYPE_CHECKING + +from azure.core import PipelineClient +from msrest import Deserializer, Serializer + +from ._configuration import WebPubSubServiceClientConfiguration +from ._operations import WebPubSubServiceClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Dict, Optional + + from azure.core.credentials import TokenCredential + from azure.core.rest import HttpRequest, HttpResponse + +class WebPubSubServiceClient(WebPubSubServiceClientOperationsMixin): + """WebPubSubServiceClient. + + :param hub: Target hub name, which should start with alphabetic characters and only contain + alpha-numeric characters or underscore. + :type hub: str + :param endpoint: HTTP or HTTPS endpoint for the Web PubSub service instance. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials.TokenCredential + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + hub, # type: str + endpoint, # type: str + credential, # type: "TokenCredential" + **kwargs # type: Any + ): + # type: (...) -> None + _endpoint = '{Endpoint}' + self._config = WebPubSubServiceClientConfiguration(hub=hub, endpoint=endpoint, credential=credential, **kwargs) + self._client = PipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + + def send_request( + self, + request, # type: HttpRequest + **kwargs # type: Any + ): + # type: (...) -> HttpResponse + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.HttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + def close(self): + # type: () -> None + self._client.close() + + def __enter__(self): + # type: () -> WebPubSubServiceClient + self._client.__enter__() + return self + + def __exit__(self, *exc_details): + # type: (Any) -> None + self._client.__exit__(*exc_details) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio.py deleted file mode 100644 index 0559416aa7bc..000000000000 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- -__all__ = ["WebPubSubServiceClient"] - -from typing import TYPE_CHECKING -from copy import deepcopy - -import azure.core.pipeline as corepipeline -import azure.core.pipeline.policies as corepolicies -import azure.core.pipeline.transport as coretransport - -# Temporary location for types that eventually graduate to Azure Core -from .core import rest as corerest - -from ._policies import JwtCredentialPolicy - -if TYPE_CHECKING: - import azure.core.credentials as corecredentials - from azure.core.pipeline.policies import HTTPPolicy, SansIOHTTPPolicy - from typing import Any, List, cast # pylint: disable=ungrouped-imports - - -class WebPubSubServiceClient(object): - def __init__(self, endpoint, credential, **kwargs): - # type: (str, corecredentials.AzureKeyCredential, Any) -> None - """Create a new WebPubSubServiceClient instance - - :param endpoint: Endpoint to connect to. - :type endpoint: ~str - :param credential: Credentials to use to connect to endpoint. - :type credential: ~azure.core.credentials.AzureKeyCredential - :keyword api_version: Api version to use when communicating with the service. - :type api_version: str - :keyword user: User to connect as. Optional. - :type user: ~str - """ - self.endpoint = endpoint.rstrip("/") - transport = kwargs.pop("transport", None) or coretransport.RequestsTransport( - **kwargs - ) - policies = [ - corepolicies.HeadersPolicy(**kwargs), - corepolicies.UserAgentPolicy(**kwargs), - corepolicies.AsyncRetryPolicy(**kwargs), - corepolicies.ProxyPolicy(**kwargs), - corepolicies.CustomHookPolicy(**kwargs), - corepolicies.AsyncRedirectPolicy(**kwargs), - JwtCredentialPolicy(credential, kwargs.get("user", None)), - corepolicies.NetworkTraceLoggingPolicy(**kwargs), - ] # type: Any - self._pipeline = corepipeline.AsyncPipeline( - transport, - policies, - ) # type: corepipeline.AsyncPipeline - - def _format_url(self, url): - # type: (str) -> str - assert self.endpoint[-1] != "/", "My endpoint should not have a trailing slash" - return "/".join([self.endpoint, url.lstrip("/")]) - - async def send_request( - self, http_request: corerest.HttpRequest, **kwargs: "Any" - ) -> corerest.AsyncHttpResponse: - """Runs the network request through the client's chained policies. - - We have helper methods to create requests specific to this service in `azure.messaging.webpubsub.rest`. - Use these helper methods to create the request you pass to this method. See our example below: - - >>> from azure.messaging.webpubsub.rest import build_healthapi_get_health_status_request - >>> request = build_healthapi_get_health_status_request(api_version) - - >>> response = await client.send_request(request) - - - For more information on this code flow, see https://aka.ms/azsdk/python/llcwiki - - For advanced cases, you can also create your own :class:`~azure.messaging.webpubsub.core.rest.HttpRequest` - and pass it in. - - :param http_request: The network request you want to make. Required. - :type http_request: ~azure.messaging.webpubsub.core.rest.HttpRequest - :keyword bool stream_response: Whether the response payload will be streamed. Defaults to False. - :return: The response of your network call. Does not do error handling on your response. - :rtype: ~azure.messaging.webpubsub.core.rest.AsyncHttpResponse - """ - request_copy = deepcopy(http_request) - request_copy.url = self._format_url(request_copy.url) - - # can't do AsyncStreamContextManager yet. This client doesn't have a pipeline client, - # AsyncStreamContextManager requires a pipeline client. WIll look more into it - # if kwargs.pop("stream_response", False): - # return corerest._AsyncStreamContextManager( - # client=self._client, - # request=request_copy, - # ) - pipeline_response = await self._pipeline.run( - request_copy._internal_request, **kwargs # pylint: disable=protected-access - ) - response = corerest.AsyncHttpResponse( - status_code=pipeline_response.http_response.status_code, - request=request_copy, - _internal_response=pipeline_response.http_response, - ) - await response.read() - return response diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/__init__.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/__init__.py new file mode 100644 index 000000000000..d33c98d8f4c4 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/__init__.py @@ -0,0 +1,16 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._web_pub_sub_service_client import WebPubSubServiceClient +__all__ = ['WebPubSubServiceClient'] + +try: + from ._patch import patch_sdk # type: ignore + patch_sdk() +except ImportError: + pass diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_configuration.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_configuration.py new file mode 100644 index 000000000000..24dea080d9bd --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_configuration.py @@ -0,0 +1,76 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from typing import Any, TYPE_CHECKING + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies + +from .._version import VERSION + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from azure.core.credentials_async import AsyncTokenCredential + + +class WebPubSubServiceClientConfiguration(Configuration): + """Configuration for WebPubSubServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param hub: Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. + :type hub: str + :param endpoint: HTTP or HTTPS endpoint for the Web PubSub service instance. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + hub: str, + endpoint: str, + credential: "AsyncTokenCredential", + **kwargs: Any + ) -> None: + super(WebPubSubServiceClientConfiguration, self).__init__(**kwargs) + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + if hub is None: + raise ValueError("Parameter 'hub' must not be None.") + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.hub = hub + self.endpoint = endpoint + self.credential = credential + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://webpubsub.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'messaging-webpubsubservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/__init__.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/__init__.py new file mode 100644 index 000000000000..af83bc4323b2 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/__init__.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from ._operations import WebPubSubServiceClientOperationsMixin + +__all__ = [ + 'WebPubSubServiceClientOperationsMixin', +] diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/_operations.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/_operations.py new file mode 100644 index 000000000000..0fe699744e5b --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_operations/_operations.py @@ -0,0 +1,1258 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights 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 functools +from typing import Any, Callable, Dict, Generic, IO, List, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +from ..._operations._operations import build_add_connection_to_group_request, build_add_user_to_group_request, build_close_all_connections_request, build_close_connection_request, build_close_group_connections_request, build_close_user_connections_request, build_connection_exists_request, build_get_client_access_token_request, build_grant_permission_request, build_group_exists_request, build_has_permission_request, build_remove_connection_from_group_request, build_remove_user_from_all_groups_request, build_remove_user_from_group_request, build_revoke_permission_request, build_send_to_all_request, build_send_to_connection_request, build_send_to_group_request, build_send_to_user_request, build_user_exists_request +T = TypeVar('T') +JSONType = Any +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WebPubSubServiceClientOperationsMixin: + + @distributed_trace_async + async def get_client_access_token( + self, + *, + user_id: Optional[str] = None, + roles: Optional[List[str]] = None, + minutes_to_expire: Optional[int] = 60, + **kwargs: Any + ) -> JSONType: + """Generate token for the client to connect Azure Web PubSub service. + + Generate token for the client to connect Azure Web PubSub service. + + :keyword user_id: User Id. + :paramtype user_id: str + :keyword roles: Roles that the connection with the generated token will have. + :paramtype roles: list[str] + :keyword minutes_to_expire: The expire time of the generated token. + :paramtype minutes_to_expire: int + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSONType + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + # response body for status code(s): 200 + response.json() == { + "token": "str" # Optional. The token value for the WebSocket client to connect to the service. + } + """ + cls = kwargs.pop('cls', None) # type: ClsType[JSONType] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_get_client_access_token_request( + hub=self._config.hub, + api_version=api_version, + user_id=user_id, + roles=roles, + minutes_to_expire=minutes_to_expire, + template_url=self.get_client_access_token.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if response.content: + deserialized = response.json() + else: + deserialized = None + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + + get_client_access_token.metadata = {'url': '/api/hubs/{hub}/:generateToken'} # type: ignore + + + @distributed_trace_async + async def close_all_connections( + self, + *, + excluded: Optional[List[str]] = None, + reason: Optional[str] = None, + **kwargs: Any + ) -> None: + """Close the connections in the hub. + + Close the connections in the hub. + + :keyword excluded: Exclude these connectionIds when closing the connections in the hub. + :paramtype excluded: list[str] + :keyword reason: The reason closing the client connection. + :paramtype reason: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_close_all_connections_request( + hub=self._config.hub, + api_version=api_version, + excluded=excluded, + reason=reason, + template_url=self.close_all_connections.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + close_all_connections.metadata = {'url': '/api/hubs/{hub}/:closeConnections'} # type: ignore + + + @distributed_trace_async + async def send_to_all( + self, + message: Union[IO, str, JSONType], + *, + excluded: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """Broadcast content inside request body to all the connected client connections. + + Broadcast content inside request body to all the connected client connections. + + :param message: The payload body. + :type message: IO or str or JSONType + :keyword excluded: Excluded connection Ids. + :paramtype excluded: list[str] + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword str content_type: Media type of the body sent to the API. Default value is + "application/json". Allowed values are: "application/json", "application/octet-stream", + "text/plain." + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = None + content = None + if content_type.split(";")[0] in ['application/json']: + json = message + elif content_type.split(";")[0] in ['application/octet-stream', 'text/plain']: + content = message + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json', 'application/octet-stream', 'text/plain']".format(content_type) + ) + + request = build_send_to_all_request( + hub=self._config.hub, + api_version=api_version, + content_type=content_type, + json=json, + content=content, + excluded=excluded, + template_url=self.send_to_all.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + send_to_all.metadata = {'url': '/api/hubs/{hub}/:send'} # type: ignore + + + @distributed_trace_async + async def connection_exists( + self, + connection_id: str, + **kwargs: Any + ) -> bool: + """Check if the connection with the given connectionId exists. + + Check if the connection with the given connectionId exists. + + :param connection_id: The connection Id. + :type connection_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: bool + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_connection_exists_request( + hub=self._config.hub, + connection_id=connection_id, + api_version=api_version, + template_url=self.connection_exists.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + connection_exists.metadata = {'url': '/api/hubs/{hub}/connections/{connectionId}'} # type: ignore + + + @distributed_trace_async + async def close_connection( + self, + connection_id: str, + *, + reason: Optional[str] = None, + **kwargs: Any + ) -> None: + """Close the client connection. + + Close the client connection. + + :param connection_id: Target connection Id. + :type connection_id: str + :keyword reason: The reason closing the client connection. + :paramtype reason: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_close_connection_request( + hub=self._config.hub, + connection_id=connection_id, + api_version=api_version, + reason=reason, + template_url=self.close_connection.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + close_connection.metadata = {'url': '/api/hubs/{hub}/connections/{connectionId}'} # type: ignore + + + @distributed_trace_async + async def send_to_connection( + self, + connection_id: str, + message: Union[IO, str, JSONType], + **kwargs: Any + ) -> None: + """Send content inside request body to the specific connection. + + Send content inside request body to the specific connection. + + :param connection_id: The connection Id. + :type connection_id: str + :param message: The payload body. + :type message: IO or str or JSONType + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword str content_type: Media type of the body sent to the API. Default value is + "application/json". Allowed values are: "application/json", "application/octet-stream", + "text/plain." + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = None + content = None + if content_type.split(";")[0] in ['application/json']: + json = message + elif content_type.split(";")[0] in ['application/octet-stream', 'text/plain']: + content = message + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json', 'application/octet-stream', 'text/plain']".format(content_type) + ) + + request = build_send_to_connection_request( + hub=self._config.hub, + connection_id=connection_id, + api_version=api_version, + content_type=content_type, + json=json, + content=content, + template_url=self.send_to_connection.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + send_to_connection.metadata = {'url': '/api/hubs/{hub}/connections/{connectionId}/:send'} # type: ignore + + + @distributed_trace_async + async def group_exists( + self, + group: str, + **kwargs: Any + ) -> bool: + """Check if there are any client connections inside the given group. + + Check if there are any client connections inside the given group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: bool + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_group_exists_request( + hub=self._config.hub, + group=group, + api_version=api_version, + template_url=self.group_exists.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + group_exists.metadata = {'url': '/api/hubs/{hub}/groups/{group}'} # type: ignore + + + @distributed_trace_async + async def close_group_connections( + self, + group: str, + *, + excluded: Optional[List[str]] = None, + reason: Optional[str] = None, + **kwargs: Any + ) -> None: + """Close connections in the specific group. + + Close connections in the specific group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :keyword excluded: Exclude these connectionIds when closing the connections in the group. + :paramtype excluded: list[str] + :keyword reason: The reason closing the client connection. + :paramtype reason: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_close_group_connections_request( + hub=self._config.hub, + group=group, + api_version=api_version, + excluded=excluded, + reason=reason, + template_url=self.close_group_connections.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + close_group_connections.metadata = {'url': '/api/hubs/{hub}/groups/{group}/:closeConnections'} # type: ignore + + + @distributed_trace_async + async def send_to_group( + self, + group: str, + message: Union[IO, str, JSONType], + *, + excluded: Optional[List[str]] = None, + **kwargs: Any + ) -> None: + """Send content inside request body to a group of connections. + + Send content inside request body to a group of connections. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param message: The payload body. + :type message: IO or str or JSONType + :keyword excluded: Excluded connection Ids. + :paramtype excluded: list[str] + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword str content_type: Media type of the body sent to the API. Default value is + "application/json". Allowed values are: "application/json", "application/octet-stream", + "text/plain." + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = None + content = None + if content_type.split(";")[0] in ['application/json']: + json = message + elif content_type.split(";")[0] in ['application/octet-stream', 'text/plain']: + content = message + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json', 'application/octet-stream', 'text/plain']".format(content_type) + ) + + request = build_send_to_group_request( + hub=self._config.hub, + group=group, + api_version=api_version, + content_type=content_type, + json=json, + content=content, + excluded=excluded, + template_url=self.send_to_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + send_to_group.metadata = {'url': '/api/hubs/{hub}/groups/{group}/:send'} # type: ignore + + + @distributed_trace_async + async def add_connection_to_group( + self, + group: str, + connection_id: str, + **kwargs: Any + ) -> None: + """Add a connection to the target group. + + Add a connection to the target group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_add_connection_to_group_request( + hub=self._config.hub, + group=group, + connection_id=connection_id, + api_version=api_version, + template_url=self.add_connection_to_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + add_connection_to_group.metadata = {'url': '/api/hubs/{hub}/groups/{group}/connections/{connectionId}'} # type: ignore + + + @distributed_trace_async + async def remove_connection_from_group( + self, + group: str, + connection_id: str, + **kwargs: Any + ) -> None: + """Remove a connection from the target group. + + Remove a connection from the target group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_remove_connection_from_group_request( + hub=self._config.hub, + group=group, + connection_id=connection_id, + api_version=api_version, + template_url=self.remove_connection_from_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + remove_connection_from_group.metadata = {'url': '/api/hubs/{hub}/groups/{group}/connections/{connectionId}'} # type: ignore + + + @distributed_trace_async + async def user_exists( + self, + user_id: str, + **kwargs: Any + ) -> bool: + """Check if there are any client connections connected for the given user. + + Check if there are any client connections connected for the given user. + + :param user_id: Target user Id. + :type user_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: bool + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_user_exists_request( + hub=self._config.hub, + user_id=user_id, + api_version=api_version, + template_url=self.user_exists.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + user_exists.metadata = {'url': '/api/hubs/{hub}/users/{userId}'} # type: ignore + + + @distributed_trace_async + async def close_user_connections( + self, + user_id: str, + *, + excluded: Optional[List[str]] = None, + reason: Optional[str] = None, + **kwargs: Any + ) -> None: + """Close connections for the specific user. + + Close connections for the specific user. + + :param user_id: The user Id. + :type user_id: str + :keyword excluded: Exclude these connectionIds when closing the connections for the user. + :paramtype excluded: list[str] + :keyword reason: The reason closing the client connection. + :paramtype reason: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_close_user_connections_request( + hub=self._config.hub, + user_id=user_id, + api_version=api_version, + excluded=excluded, + reason=reason, + template_url=self.close_user_connections.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + close_user_connections.metadata = {'url': '/api/hubs/{hub}/users/{userId}/:closeConnections'} # type: ignore + + + @distributed_trace_async + async def send_to_user( + self, + user_id: str, + message: Union[IO, str, JSONType], + **kwargs: Any + ) -> None: + """Send content inside request body to the specific user. + + Send content inside request body to the specific user. + + :param user_id: The user Id. + :type user_id: str + :param message: The payload body. + :type message: IO or str or JSONType + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :keyword str content_type: Media type of the body sent to the API. Default value is + "application/json". Allowed values are: "application/json", "application/octet-stream", + "text/plain." + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] + + json = None + content = None + if content_type.split(";")[0] in ['application/json']: + json = message + elif content_type.split(";")[0] in ['application/octet-stream', 'text/plain']: + content = message + else: + raise ValueError( + "The content_type '{}' is not one of the allowed values: " + "['application/json', 'application/octet-stream', 'text/plain']".format(content_type) + ) + + request = build_send_to_user_request( + hub=self._config.hub, + user_id=user_id, + api_version=api_version, + content_type=content_type, + json=json, + content=content, + template_url=self.send_to_user.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + send_to_user.metadata = {'url': '/api/hubs/{hub}/users/{userId}/:send'} # type: ignore + + + @distributed_trace_async + async def add_user_to_group( + self, + group: str, + user_id: str, + **kwargs: Any + ) -> None: + """Add a user to the target group. + + Add a user to the target group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param user_id: Target user Id. + :type user_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_add_user_to_group_request( + hub=self._config.hub, + group=group, + user_id=user_id, + api_version=api_version, + template_url=self.add_user_to_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + add_user_to_group.metadata = {'url': '/api/hubs/{hub}/users/{userId}/groups/{group}'} # type: ignore + + + @distributed_trace_async + async def remove_user_from_group( + self, + group: str, + user_id: str, + **kwargs: Any + ) -> None: + """Remove a user from the target group. + + Remove a user from the target group. + + :param group: Target group name, which length should be greater than 0 and less than 1025. + :type group: str + :param user_id: Target user Id. + :type user_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_remove_user_from_group_request( + hub=self._config.hub, + group=group, + user_id=user_id, + api_version=api_version, + template_url=self.remove_user_from_group.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + remove_user_from_group.metadata = {'url': '/api/hubs/{hub}/users/{userId}/groups/{group}'} # type: ignore + + + @distributed_trace_async + async def remove_user_from_all_groups( + self, + user_id: str, + **kwargs: Any + ) -> None: + """Remove a user from all groups. + + Remove a user from all groups. + + :param user_id: Target user Id. + :type user_id: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_remove_user_from_all_groups_request( + hub=self._config.hub, + user_id=user_id, + api_version=api_version, + template_url=self.remove_user_from_all_groups.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + remove_user_from_all_groups.metadata = {'url': '/api/hubs/{hub}/users/{userId}/groups'} # type: ignore + + + @distributed_trace_async + async def grant_permission( + self, + permission: str, + connection_id: str, + *, + target_name: Optional[str] = None, + **kwargs: Any + ) -> None: + """Grant permission to the connection. + + Grant permission to the connection. + + :param permission: The permission: current supported actions are joinLeaveGroup and + sendToGroup. Possible values are: "sendToGroup" or "joinLeaveGroup". + :type permission: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword target_name: The meaning of the target depends on the specific permission. For + joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. + :paramtype target_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_grant_permission_request( + hub=self._config.hub, + permission=permission, + connection_id=connection_id, + api_version=api_version, + target_name=target_name, + template_url=self.grant_permission.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + grant_permission.metadata = {'url': '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}'} # type: ignore + + + @distributed_trace_async + async def revoke_permission( + self, + permission: str, + connection_id: str, + *, + target_name: Optional[str] = None, + **kwargs: Any + ) -> None: + """Revoke permission for the connection. + + Revoke permission for the connection. + + :param permission: The permission: current supported actions are joinLeaveGroup and + sendToGroup. Possible values are: "sendToGroup" or "joinLeaveGroup". + :type permission: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword target_name: The meaning of the target depends on the specific permission. For + joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. + :paramtype target_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: None + :rtype: None + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_revoke_permission_request( + hub=self._config.hub, + permission=permission, + connection_id=connection_id, + api_version=api_version, + target_name=target_name, + template_url=self.revoke_permission.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + + revoke_permission.metadata = {'url': '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}'} # type: ignore + + + @distributed_trace_async + async def has_permission( + self, + permission: str, + connection_id: str, + *, + target_name: Optional[str] = None, + **kwargs: Any + ) -> bool: + """Check if a connection has permission to the specified action. + + Check if a connection has permission to the specified action. + + :param permission: The permission: current supported actions are joinLeaveGroup and + sendToGroup. Possible values are: "sendToGroup" or "joinLeaveGroup". + :type permission: str + :param connection_id: Target connection Id. + :type connection_id: str + :keyword target_name: The meaning of the target depends on the specific permission. For + joinLeaveGroup and sendToGroup, targetName is a required parameter standing for the group name. + :paramtype target_name: str + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: bool + :rtype: bool + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + + request = build_has_permission_request( + hub=self._config.hub, + permission=permission, + connection_id=connection_id, + api_version=api_version, + target_name=target_name, + template_url=self.has_permission.metadata['url'], + ) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + request.url = self._client.format_url(request.url, **path_format_arguments) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 404]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response) + + if cls: + return cls(pipeline_response, None, {}) + return 200 <= response.status_code <= 299 + + has_permission.metadata = {'url': '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}'} # type: ignore + diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_patch.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_patch.py new file mode 100644 index 000000000000..cbad58e985cc --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_patch.py @@ -0,0 +1,249 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- + +from typing import TYPE_CHECKING +import importlib + +from azure.core import AsyncPipelineClient +from msrest import Deserializer + +from .._version import VERSION +from .._patch import JwtCredentialPolicy, ApiManagementProxy, _parse_connection_string, _get_token_by_key +from ._web_pub_sub_service_client import WebPubSubServiceClient as GeneratedWebPubSubServiceClient + +from azure.core.configuration import Configuration +from azure.core.pipeline import policies +from azure.core.credentials import AzureKeyCredential +from msrest import Serializer +from typing import Any, Callable, Dict, Optional, TypeVar, Union, List + +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse +from azure.core.rest import HttpRequest +from azure.core.tracing.decorator_async import distributed_trace_async + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] +from ._operations._operations import JSONType + +if TYPE_CHECKING: + from azure.core.credentials_async import AsyncTokenCredential + + +class WebPubSubServiceClientConfiguration(Configuration): + """Configuration for WebPubSubServiceClient. + + Note that all parameters used to create this instance are saved as instance + attributes. + + :param hub: Target hub name, which should start with alphabetic characters and only contain alpha-numeric characters or underscore. + :type hub: str + :param endpoint: HTTP or HTTPS endpoint for the Web PubSub service instance. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: Union[~azure.core.credentials_async.AsyncTokenCredential, ~azure.core.credentials.AzureKeyCredential] + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + hub: str, + endpoint: str, + credential: Union["AsyncTokenCredential", "AzureKeyCredential"], + **kwargs: Any + ) -> None: + super(WebPubSubServiceClientConfiguration, self).__init__(**kwargs) + if kwargs.get("port") and endpoint: + endpoint = endpoint.rstrip("/") + ":{}".format(kwargs.pop('port')) + api_version = kwargs.pop('api_version', "2021-10-01") # type: str + + if hub is None: + raise ValueError("Parameter 'hub' must not be None.") + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + if credential is None: + raise ValueError("Parameter 'credential' must not be None.") + + self.hub = hub + self.endpoint = endpoint + self.credential = credential + self.api_version = api_version + self.credential_scopes = kwargs.pop('credential_scopes', ['https://webpubsub.azure.com/.default']) + kwargs.setdefault('sdk_moniker', 'messaging-webpubsubservice/{}'.format(VERSION)) + self._configure(**kwargs) + + def _configure( + self, + **kwargs: Any + ) -> None: + self.user_agent_policy = kwargs.get('user_agent_policy') or policies.UserAgentPolicy(**kwargs) + self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) + self.proxy_policy = kwargs.get('proxy_policy') or ApiManagementProxy(**kwargs) + self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or policies.HttpLoggingPolicy(**kwargs) + self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) + self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) + self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) + self.authentication_policy = kwargs.get('authentication_policy') + if self.credential and not self.authentication_policy: + if isinstance(self.credential, AzureKeyCredential): + self.authentication_policy = JwtCredentialPolicy(self.credential, kwargs.get('user')) + else: + self.authentication_policy = policies.AsyncBearerTokenCredentialPolicy(self.credential, *self.credential_scopes, **kwargs) + + +class WebPubSubServiceClient(GeneratedWebPubSubServiceClient): + """WebPubSubServiceClient. + + :param endpoint: HTTP or HTTPS endpoint for the Web PubSub service instance. + :type endpoint: str + :param hub: Target hub name, which should start with alphabetic characters and only contain + alpha-numeric characters or underscore. + :type hub: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential or ~azure.core.credentials.AzureKeyCredential + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + endpoint: str, + hub: str, + credential: Union["AsyncTokenCredential", "AzureKeyCredential"], + **kwargs: Any + ) -> None: + kwargs['origin_endpoint'] = endpoint + _endpoint = '{Endpoint}' + self._config = WebPubSubServiceClientConfiguration(hub=hub, endpoint=endpoint, credential=credential, **kwargs) + self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + @classmethod + def from_connection_string(cls, connection_string: str, hub: str, **kwargs: Any) -> "WebPubSubServiceClient": + """Create a new WebPubSubServiceClient from a connection string. + :param connection_string: Connection string + :type connection_string: ~str + :param hub: Target hub name, which should start with alphabetic characters and only contain + alpha-numeric characters or underscore. + :type hub: str + :rtype: WebPubSubServiceClient + """ + kwargs = _parse_connection_string(connection_string, **kwargs) + + credential = AzureKeyCredential(kwargs.pop("accesskey")) + return cls(hub=hub, credential=credential, **kwargs) + + @distributed_trace_async + async def get_client_access_token( + self, + *, + user_id: Optional[str] = None, + roles: Optional[List[str]] = None, + minutes_to_expire: Optional[int] = 60, + jwt_headers: Dict[str, Any] = None, + **kwargs: Any + ) -> JSONType: + """Generate token for the client to connect Azure Web PubSub service. + + Generate token for the client to connect Azure Web PubSub service. + + :keyword user_id: User Id. + :paramtype user_id: str + :keyword roles: Roles that the connection with the generated token will have. + :paramtype roles: list[str] + :keyword minutes_to_expire: The expire time of the generated token. + :paramtype minutes_to_expire: int + :keyword dict[str, any] jwt_headers: Any headers you want to pass to jwt encoding. + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + :return: JSON object + :rtype: JSONType + :raises: ~azure.core.exceptions.HttpResponseError + + Example: + .. code-block:: python + + >>> get_client_access_token() + { + 'baseUrl': 'wss://contoso.com/api/webpubsub/client/hubs/theHub', + 'token': 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...', + 'url': 'wss://contoso.com/api/webpubsub/client/hubs/theHub?access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...' + } + """ + endpoint = self._config.endpoint.lower() + if not endpoint.startswith("http://") and not endpoint.startswith("https://"): + raise ValueError( + "Invalid endpoint: '{}' has unknown scheme - expected 'http://' or 'https://'".format( + endpoint + ) + ) + + # Ensure endpoint has no trailing slash + endpoint = endpoint.rstrip("/") + + # Switch from http(s) to ws(s) scheme + client_endpoint = "ws" + endpoint[4:] + hub = self._config.hub + client_url = "{}/client/hubs/{}".format(client_endpoint, hub) + if isinstance(self._config.credential, AzureKeyCredential): + token = _get_token_by_key( + endpoint, + hub, + self._config.credential.key, + user_id=user_id, + roles=roles, + minutes_to_expire=minutes_to_expire, + jwt_headers=jwt_headers or {}, + **kwargs + ) + else: + access_token = await super().get_client_access_token( + user_id=user_id, + roles=roles, + minutes_to_expire=minutes_to_expire, + **kwargs + ) + token = access_token.get('token') + + return { + "baseUrl": client_url, + "token": token, + "url": "{}?access_token={}".format(client_url, token), + } + get_client_access_token.metadata = {'url': '/api/hubs/{hub}/:generateToken'} # type: ignore + + +def patch_sdk(): + curr_package = importlib.import_module("azure.messaging.webpubsubservice.aio") + curr_package.WebPubSubServiceClient = WebPubSubServiceClient diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_web_pub_sub_service_client.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_web_pub_sub_service_client.py new file mode 100644 index 000000000000..340adac20cc3 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/aio/_web_pub_sub_service_client.py @@ -0,0 +1,94 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- + +from copy import deepcopy +from typing import Any, Awaitable, Optional, TYPE_CHECKING + +from azure.core import AsyncPipelineClient +from azure.core.rest import AsyncHttpResponse, HttpRequest +from msrest import Deserializer, Serializer + +from ._configuration import WebPubSubServiceClientConfiguration +from ._operations import WebPubSubServiceClientOperationsMixin + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Dict + + from azure.core.credentials_async import AsyncTokenCredential + +class WebPubSubServiceClient(WebPubSubServiceClientOperationsMixin): + """WebPubSubServiceClient. + + :param hub: Target hub name, which should start with alphabetic characters and only contain + alpha-numeric characters or underscore. + :type hub: str + :param endpoint: HTTP or HTTPS endpoint for the Web PubSub service instance. + :type endpoint: str + :param credential: Credential needed for the client to connect to Azure. + :type credential: ~azure.core.credentials_async.AsyncTokenCredential + :keyword api_version: Api Version. The default value is "2021-10-01". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str + """ + + def __init__( + self, + hub: str, + endpoint: str, + credential: "AsyncTokenCredential", + **kwargs: Any + ) -> None: + _endpoint = '{Endpoint}' + self._config = WebPubSubServiceClientConfiguration(hub=hub, endpoint=endpoint, credential=credential, **kwargs) + self._client = AsyncPipelineClient(base_url=_endpoint, config=self._config, **kwargs) + + self._serialize = Serializer() + self._deserialize = Deserializer() + self._serialize.client_side_validation = False + + + def send_request( + self, + request: HttpRequest, + **kwargs: Any + ) -> Awaitable[AsyncHttpResponse]: + """Runs the network request through the client's chained policies. + + >>> from azure.core.rest import HttpRequest + >>> request = HttpRequest("GET", "https://www.example.org/") + + >>> response = await client.send_request(request) + + + For more information on this code flow, see https://aka.ms/azsdk/python/protocol/quickstart + + :param request: The network request you want to make. Required. + :type request: ~azure.core.rest.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to False. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.rest.AsyncHttpResponse + """ + + request_copy = deepcopy(request) + path_format_arguments = { + "Endpoint": self._serialize.url("self._config.endpoint", self._config.endpoint, 'str', skip_quote=True), + } + + request_copy.url = self._client.format_url(request_copy.url, **path_format_arguments) + return self._client.send_request(request_copy, **kwargs) + + async def close(self) -> None: + await self._client.close() + + async def __aenter__(self) -> "WebPubSubServiceClient": + await self._client.__aenter__() + return self + + async def __aexit__(self, *exc_details) -> None: + await self._client.__aexit__(*exc_details) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/_rest.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/_rest.py deleted file mode 100644 index cee1c039cbda..000000000000 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/_rest.py +++ /dev/null @@ -1,625 +0,0 @@ -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -# pylint currently complains about typing.Union not being subscriptable -# pylint: disable=unsubscriptable-object - -import codecs -import json -from enum import Enum -import xml.etree.ElementTree as ET -from typing import TYPE_CHECKING, Iterable - -import cgi -import six - -from azure.core.exceptions import HttpResponseError -from azure.core.pipeline.transport import ( - HttpRequest as _PipelineTransportHttpRequest, -) - - -if TYPE_CHECKING: - from typing import ( # pylint: disable=ungrouped-imports - Any, - Optional, - Union, - Mapping, - Sequence, - Tuple, - Iterator, - ) - - ByteStream = Iterable[bytes] - - HeadersType = Union[Mapping[str, str], Sequence[Tuple[str, str]]] - ContentType = Union[str, bytes, ByteStream] - from azure.core.pipeline.transport._base import ( - _HttpResponseBase as _PipelineTransportHttpResponseBase, - ) - from azure.core._pipeline_client import PipelineClient as _PipelineClient - - -class HttpVerbs(str, Enum): - GET = "GET" - PUT = "PUT" - POST = "POST" - HEAD = "HEAD" - PATCH = "PATCH" - DELETE = "DELETE" - MERGE = "MERGE" - - -########################### UTILS SECTION ################################# - - -def _is_stream_or_str_bytes(content): - return isinstance(content, (str, bytes)) or any( - hasattr(content, attr) for attr in ["read", "__iter__", "__aiter__"] - ) - - -def _lookup_encoding(encoding): - # type: (str) -> bool - # including check for whether encoding is known taken from httpx - try: - codecs.lookup(encoding) - return True - except LookupError: - return False - - -def _set_content_length_header(header_name, header_value, internal_request): - # type: (str, str, _PipelineTransportHttpRequest) -> None - valid_methods = ["put", "post", "patch"] - content_length_headers = ["Content-Length", "Transfer-Encoding"] - if internal_request.method.lower() in valid_methods and not any( - [c for c in content_length_headers if c in internal_request.headers] - ): - internal_request.headers[header_name] = header_value - - -def _set_content_type_header(header_value, internal_request): - # type: (str, _PipelineTransportHttpRequest) -> None - if not internal_request.headers.get("Content-Type"): - internal_request.headers["Content-Type"] = header_value - - -def _set_content_body(content, internal_request): - # type: (ContentType, _PipelineTransportHttpRequest) -> None - headers = internal_request.headers - content_type = headers.get("Content-Type") - if _is_stream_or_str_bytes(content): - # stream will be bytes / str, or iterator of bytes / str - internal_request.set_streamed_data_body(content) - if isinstance(content, (str, bytes)) and content: - _set_content_length_header( - "Content-Length", str(len(internal_request.data)), internal_request - ) - if isinstance(content, six.string_types): - _set_content_type_header("text/plain", internal_request) - else: - _set_content_type_header("application/octet-stream", internal_request) - elif isinstance( # pylint: disable=isinstance-second-argument-not-valid-type - content, Iterable - ): - # _set_content_length_header("Transfer-Encoding", "chunked", internal_request) - _set_content_type_header("application/octet-stream", internal_request) - elif isinstance(content, ET.Element): - # XML body - internal_request.set_xml_body(content) - _set_content_type_header("application/xml", internal_request) - _set_content_length_header( - "Content-Length", str(len(internal_request.data)), internal_request - ) - elif content_type and content_type.startswith("text/"): - # Text body - internal_request.set_text_body(content) - _set_content_length_header( - "Content-Length", str(len(internal_request.data)), internal_request - ) - else: - # Other body - internal_request.data = content - internal_request.headers = headers - - -def _set_body(content, data, files, json_body, internal_request): - # type: (ContentType, dict, Any, Any, _PipelineTransportHttpRequest) -> None - if data is not None and not isinstance(data, dict): - content = data - data = None - if content is not None: - _set_content_body(content, internal_request) - elif json_body is not None: - internal_request.set_json_body(json_body) - _set_content_type_header("application/json", internal_request) - elif files is not None: - internal_request.set_formdata_body(files) - # if you don't supply your content type, we'll create a boundary for you with multipart/form-data - # boundary = binascii.hexlify(os.urandom(16)).decode("ascii") # got logic from httpx, thanks httpx! - # _set_content_type_header("multipart/form-data; boundary={}".format(boundary), internal_request) - elif data: - _set_content_type_header("application/x-www-form-urlencoded", internal_request) - internal_request.set_formdata_body(data) - # need to set twice because Content-Type is being popped in set_formdata_body - # don't want to risk changing pipeline.transport, so doing twice here - _set_content_type_header("application/x-www-form-urlencoded", internal_request) - - -def _parse_lines_from_text(text): - # largely taken from httpx's LineDecoder code - lines = [] - last_chunk_of_text = "" - while text: - text_length = len(text) - for idx in range(text_length): - curr_char = text[idx] - next_char = None if idx == len(text) - 1 else text[idx + 1] - if curr_char == "\n": - lines.append(text[: idx + 1]) - text = text[idx + 1 :] - break - if curr_char == "\r" and next_char == "\n": - # if it ends with \r\n, we only do \n - lines.append(text[:idx] + "\n") - text = text[idx + 2 :] - break - if curr_char == "\r" and next_char is not None: - # if it's \r then a normal character, we switch \r to \n - lines.append(text[:idx] + "\n") - text = text[idx + 1 :] - break - if next_char is None: - text = "" - last_chunk_of_text += text - break - if last_chunk_of_text.endswith("\r"): - # if ends with \r, we switch \r to \n - lines.append(last_chunk_of_text[:-1] + "\n") - elif last_chunk_of_text: - lines.append(last_chunk_of_text) - return lines - - -################################## CLASSES ###################################### -class _StreamContextManager(object): - def __init__(self, client, request, **kwargs): - # type: (_PipelineClient, HttpRequest, Any) -> None - self.client = client - self.request = request - self.kwargs = kwargs - - def __enter__(self): - # type: (...) -> HttpResponse - """Actually make the call only when we enter. For sync stream_response calls""" - pipeline_transport_response = self.client._pipeline.run( - self.request._internal_request, stream=True, **self.kwargs - ).http_response - self.response = HttpResponse( # pylint: disable=attribute-defined-outside-init - request=self.request, _internal_response=pipeline_transport_response - ) - return self.response - - def __exit__(self, *args): - """Close our stream connection. For sync calls""" - self.response.__exit__(*args) - - def close(self): - self.response.close() - - -class HttpRequest(object): - """Represents an HTTP request. - - :param method: HTTP method (GET, HEAD, etc.) - :type method: str or ~azure.core.protocol.HttpVerbs - :param str url: The url for your request - :keyword params: Query parameters to be mapped into your URL. Your input - should be a mapping or sequence of query name to query value(s). - :paramtype params: mapping or sequence - :keyword headers: HTTP headers you want in your request. Your input should - be a mapping or sequence of header name to header value. - :paramtype headers: mapping or sequence - :keyword dict data: Form data you want in your request body. Use for form-encoded data, i.e. - HTML forms. - :keyword any json: A JSON serializable object. We handle JSON-serialization for your - object, so use this for more complicated data structures than `data`. - :keyword files: Files you want to in your request body. Use for uploading files with - multipart encoding. Your input should be a mapping or sequence of file name to file content. - Use the `data` kwarg in addition if you want to include non-file data files as part of your request. - :paramtype files: mapping or sequence - :keyword content: Content you want in your request body. Think of it as the kwarg you should input - if your data doesn't fit into `json`, `data`, or `files`. Accepts a bytes type, or a generator - that yields bytes. - :paramtype content: str or bytes or iterable[bytes] or asynciterable[bytes] - :ivar str url: The URL this request is against. - :ivar str method: The method type of this request. - :ivar headers: The HTTP headers you passed in to your request - :vartype headers: mapping or sequence - :ivar bytes content: The content passed in for the request - """ - - def __init__(self, method, url, **kwargs): - # type: (str, str, Any) -> None - - data = kwargs.pop("data", None) - content = kwargs.pop("content", None) - json_body = kwargs.pop("json", None) - files = kwargs.pop("files", None) - - self._internal_request = kwargs.pop( - "_internal_request", - _PipelineTransportHttpRequest( - method=method, - url=url, - headers=kwargs.pop("headers", None), - ), - ) - params = kwargs.pop("params", None) - - if params: - self._internal_request.format_parameters(params) - - _set_body( - content=content, - data=data, - files=files, - json_body=json_body, - internal_request=self._internal_request, - ) - - if kwargs: - raise TypeError( - "You have passed in kwargs '{}' that are not valid kwargs.".format( - "', '".join(list(kwargs.keys())) - ) - ) - - def _set_content_length_header(self): - method_check = self._internal_request.method.lower() in ["put", "post", "patch"] - content_length_unset = "Content-Length" not in self._internal_request.headers - if method_check and content_length_unset: - self._internal_request.headers["Content-Length"] = str( - len(self._internal_request.data) - ) - - @property - def url(self): - # type: (...) -> str - return self._internal_request.url - - @url.setter - def url(self, val): - # type: (str) -> None - self._internal_request.url = val - - @property - def method(self): - # type: (...) -> str - return self._internal_request.method - - @property - def headers(self): - # type: (...) -> HeadersType - return self._internal_request.headers - - @property - def content(self): - # type: (...) -> Any - """Gets the request content.""" - return self._internal_request.data or self._internal_request.files - - def __repr__(self): - return self._internal_request.__repr__() - - def __deepcopy__(self, memo=None): - return HttpRequest( - self.method, - self.url, - _internal_request=self._internal_request.__deepcopy__(memo), - ) - - -class _HttpResponseBase(object): - """Base class for HttpResponse and AsyncHttpResponse. - - :keyword request: The request that resulted in this response. - :paramtype request: ~azure.core.rest.HttpRequest - :ivar int status_code: The status code of this response - :ivar headers: The response headers - :vartype headers: dict[str, any] - :ivar str reason: The reason phrase for this response - :ivar bytes content: The response content in bytes - :ivar str url: The URL that resulted in this response - :ivar str encoding: The response encoding. Is settable, by default - is the response Content-Type header - :ivar str text: The response body as a string. - :ivar request: The request that resulted in this response. - :vartype request: ~azure.core.rest.HttpRequest - :ivar str content_type: The content type of the response - :ivar bool is_error: Whether this response is an error. - """ - - def __init__(self, **kwargs): - # type: (Any) -> None - self._internal_response = kwargs.pop( - "_internal_response" - ) # type: _PipelineTransportHttpResponseBase - self._request = kwargs.pop("request") - self.is_closed = False - self.is_stream_consumed = False - self._num_bytes_downloaded = 0 - - @property - def status_code(self): - # type: (...) -> int - """Returns the status code of the response""" - return self._internal_response.status_code - - @status_code.setter - def status_code(self, val): - # type: (int) -> None - """Set the status code of the response""" - self._internal_response.status_code = val - - @property - def headers(self): - # type: (...) -> HeadersType - """Returns the response headers""" - return self._internal_response.headers - - @property - def reason(self): - # type: (...) -> str - """Returns the reason phrase for the response""" - return self._internal_response.reason - - @property - def content(self): - # type: (...) -> bytes - """Returns the response content in bytes""" - raise NotImplementedError() - - @property - def url(self): - # type: (...) -> str - """Returns the URL that resulted in this response""" - return self._internal_response.request.url - - @property - def encoding(self): - # type: (...) -> Optional[str] - """Returns the response encoding. By default, is specified - by the response Content-Type header. - """ - - try: - return self._encoding - except AttributeError: - return self._get_charset_encoding() - - def _get_charset_encoding(self): - content_type = self.headers.get("Content-Type") - - if not content_type: - return None - _, params = cgi.parse_header(content_type) - encoding = params.get("charset") # -> utf-8 - if encoding is None or not _lookup_encoding(encoding): - return None - return encoding - - @encoding.setter - def encoding(self, value): - # type: (str) -> None - """Sets the response encoding""" - self._encoding = value - - @property - def text(self): - # type: (...) -> str - """Returns the response body as a string""" - _ = ( - self.content - ) # access content to make sure we trigger if response not fully read in - return self._internal_response.text(encoding=self.encoding) - - @property - def request(self): - # type: (...) -> HttpRequest - if self._request: - return self._request - raise RuntimeError( - "You are trying to access the 'request', but there is no request associated with this HttpResponse" - ) - - @request.setter - def request(self, val): - # type: (HttpRequest) -> None - self._request = val - - @property - def content_type(self): - # type: (...) -> Optional[str] - """Content Type of the response""" - return self._internal_response.content_type or self.headers.get("Content-Type") - - @property - def num_bytes_downloaded(self): - # type: (...) -> int - """See how many bytes of your stream response have been downloaded""" - return self._num_bytes_downloaded - - @property - def is_error(self): - # type: (...) -> bool - """See whether your HttpResponse is an error. - - Use .raise_for_status() if you want to raise if this response is an error. - """ - return self.status_code < 400 - - def json(self): - # type: (...) -> Any - """Returns the whole body as a json object. - - :return: The JSON deserialized response body - :rtype: any - :raises json.decoder.JSONDecodeError or ValueError (in python 2.7) if object is not JSON decodable: - """ - return json.loads(self.text) - - def raise_for_status(self): - # type: (...) -> None - """Raises an HttpResponseError if the response has an error status code. - - If response is good, does nothing. - """ - if self.status_code >= 400: - raise HttpResponseError(response=self) - - def __repr__(self): - # type: (...) -> str - content_type_str = ( - ", Content-Type: {}".format(self.content_type) if self.content_type else "" - ) - return "<{}: {} {}{}>".format( - type(self).__name__, self.status_code, self.reason, content_type_str - ) - - def _validate_streaming_access(self): - # type: (...) -> None - if self.is_closed: - raise ResponseClosedError() - if self.is_stream_consumed: - raise StreamConsumedError() - - -class HttpResponse(_HttpResponseBase): - @property - def content(self): - # type: (...) -> bytes - try: - return self._content - except AttributeError: - raise ResponseNotReadError() - - def close(self): - # type: (...) -> None - self.is_closed = True - self._internal_response.internal_response.close() - - def __exit__(self, *args): - # type: (...) -> None - self._internal_response.internal_response.__exit__(*args) - - def read(self): - # type: (...) -> bytes - """ - Read the response's bytes. - - """ - try: - return self._content - except AttributeError: - self._validate_streaming_access() - self._content = ( # pylint: disable=attribute-defined-outside-init - self._internal_response.body() or b"".join(self.iter_raw()) - ) - self._close_stream() - return self._content - - def iter_bytes(self, chunk_size=None): - # type: (int) -> Iterator[bytes] - """Iterate over the bytes in the response stream""" - try: - chunk_size = len(self._content) if chunk_size is None else chunk_size - for i in range(0, len(self._content), chunk_size): - yield self._content[i : i + chunk_size] - - except AttributeError: - for raw_bytes in self.iter_raw(chunk_size=chunk_size): - yield raw_bytes - - def iter_text(self, chunk_size=None): - # type: (int) -> Iterator[str] - """Iterate over the response text""" - for byte in self.iter_bytes(chunk_size): - text = byte.decode(self.encoding or "utf-8") - yield text - - def iter_lines(self, chunk_size=None): - # type: (int) -> Iterator[str] - for text in self.iter_text(chunk_size): - lines = _parse_lines_from_text(text) - for line in lines: - yield line - - def _close_stream(self): - # type: (...) -> None - self.is_stream_consumed = True - self.close() - - def iter_raw(self, **_): - # type: (int) -> Iterator[bytes] - """Iterate over the raw response bytes""" - self._validate_streaming_access() - stream_download = self._internal_response.stream_download(None) - for raw_bytes in stream_download: - self._num_bytes_downloaded += len(raw_bytes) - yield raw_bytes - - self._close_stream() - - -########################### ERRORS SECTION ################################# - - -class StreamConsumedError(Exception): - def __init__(self): - message = ( - "You are attempting to read or stream content that has already been streamed. " - "You have likely already consumed this stream, so it can not be accessed anymore." - ) - super(StreamConsumedError, self).__init__(message) - - -class ResponseClosedError(Exception): - def __init__(self): - message = ( - "You can not try to read or stream this response's content, since the " - "response has been closed." - ) - super(ResponseClosedError, self).__init__(message) - - -class ResponseNotReadError(Exception): - def __init__(self): - message = ( - "You have not read in the response's bytes yet. Call response.read() first." - ) - super(ResponseNotReadError, self).__init__(message) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/_rest_py3.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/_rest_py3.py deleted file mode 100644 index ed2908d69484..000000000000 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/_rest_py3.py +++ /dev/null @@ -1,739 +0,0 @@ -# -------------------------------------------------------------------------- -# -# Copyright (c) Microsoft Corporation. All rights reserved. -# -# The MIT License (MIT) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the ""Software""), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -# -------------------------------------------------------------------------- - -# pylint currently complains about typing.Union not being subscriptable -# pylint: disable=unsubscriptable-object - - -import asyncio -import codecs -import json -from enum import Enum -import xml.etree.ElementTree as ET -from typing import ( - Any, - AsyncIterable, - IO, - Iterable, - Iterator, - Optional, - Union, - Mapping, - Sequence, - Tuple, - List, -) -from abc import abstractmethod - -import cgi - -from azure.core.exceptions import HttpResponseError -from azure.core.pipeline.transport import ( - HttpRequest as _PipelineTransportHttpRequest, -) - -from azure.core.pipeline.transport._base import ( - _HttpResponseBase as _PipelineTransportHttpResponseBase, -) - -from azure.core._pipeline_client import PipelineClient as _PipelineClient -from azure.core._pipeline_client_async import ( - AsyncPipelineClient as _AsyncPipelineClient, -) - -################################### TYPES SECTION ######################### - -ByteStream = Union[Iterable[bytes], AsyncIterable[bytes]] -PrimitiveData = Optional[Union[str, int, float, bool]] - - -ParamsType = Union[ - Mapping[str, Union[PrimitiveData, Sequence[PrimitiveData]]], - List[Tuple[str, PrimitiveData]], -] - -HeadersType = Union[Mapping[str, str], Sequence[Tuple[str, str]]] - -ContentType = Union[str, bytes, ByteStream] - -FileContent = Union[str, bytes, IO[str], IO[bytes]] -FileType = Union[ - Tuple[Optional[str], FileContent], -] - -FilesType = Union[Mapping[str, FileType], Sequence[Tuple[str, FileType]]] - - - -class HttpVerbs(str, Enum): - GET = "GET" - PUT = "PUT" - POST = "POST" - HEAD = "HEAD" - PATCH = "PATCH" - DELETE = "DELETE" - MERGE = "MERGE" - - -########################### UTILS SECTION ################################# - - -def _is_stream_or_str_bytes(content: Any) -> bool: - return isinstance(content, (str, bytes)) or any( - hasattr(content, attr) for attr in ["read", "__iter__", "__aiter__"] - ) - - -def _lookup_encoding(encoding: str) -> bool: - # including check for whether encoding is known taken from httpx - try: - codecs.lookup(encoding) - return True - except LookupError: - return False - - -def _set_content_length_header( - header_name: str, header_value: str, internal_request: _PipelineTransportHttpRequest -) -> None: - valid_methods = ["put", "post", "patch"] - content_length_headers = ["Content-Length", "Transfer-Encoding"] - if internal_request.method.lower() in valid_methods and not any( - [c for c in content_length_headers if c in internal_request.headers] - ): - internal_request.headers[header_name] = header_value - - -def _set_content_type_header( - header_value: str, internal_request: _PipelineTransportHttpRequest -) -> None: - if not internal_request.headers.get("Content-Type"): - internal_request.headers["Content-Type"] = header_value - - -def _set_content_body( - content: ContentType, internal_request: _PipelineTransportHttpRequest -) -> None: - headers = internal_request.headers - content_type = headers.get("Content-Type") - if _is_stream_or_str_bytes(content): - # stream will be bytes / str, or iterator of bytes / str - internal_request.set_streamed_data_body(content) - if isinstance(content, str) and content: - _set_content_length_header( - "Content-Length", str(len(internal_request.data)), internal_request - ) - _set_content_type_header("text/plain", internal_request) - elif isinstance(content, bytes) and content: - _set_content_length_header( - "Content-Length", str(len(internal_request.data)), internal_request - ) - _set_content_type_header("application/octet-stream", internal_request) - elif isinstance(content, (Iterable, AsyncIterable)): # pylint: disable=isinstance-second-argument-not-valid-type - # _set_content_length_header("Transfer-Encoding", "chunked", internal_request) - _set_content_type_header("application/octet-stream", internal_request) - elif isinstance(content, ET.Element): - # XML body - internal_request.set_xml_body(content) - _set_content_type_header("application/xml", internal_request) - _set_content_length_header( - "Content-Length", str(len(internal_request.data)), internal_request - ) - elif content_type and content_type.startswith("text/"): - # Text body - internal_request.set_text_body(content) - _set_content_length_header( - "Content-Length", str(len(internal_request.data)), internal_request - ) - else: - # Other body - internal_request.data = content - internal_request.headers = headers - - -def _set_body( - content: ContentType, - data: dict, - files: Any, - json_body: Any, - internal_request: _PipelineTransportHttpRequest, -) -> None: - if data is not None and not isinstance(data, dict): - content = data - data = None - if content is not None: - _set_content_body(content, internal_request) - elif json_body is not None: - internal_request.set_json_body(json_body) - _set_content_type_header("application/json", internal_request) - elif files is not None: - internal_request.set_formdata_body(files) - # if you don't supply your content type, we'll create a boundary for you with multipart/form-data - # boundary = binascii.hexlify(os.urandom(16)).decode( - # "ascii" - #) # got logic from httpx, thanks httpx! - # _set_content_type_header("multipart/form-data; boundary={}".format(boundary), internal_request) - elif data: - _set_content_type_header("application/x-www-form-urlencoded", internal_request) - internal_request.set_formdata_body(data) - # need to set twice because Content-Type is being popped in set_formdata_body - # don't want to risk changing pipeline.transport, so doing twice here - _set_content_type_header("application/x-www-form-urlencoded", internal_request) - - -def _parse_lines_from_text(text): - # largely taken from httpx's LineDecoder code - lines = [] - last_chunk_of_text = "" - while text: - text_length = len(text) - for idx in range(text_length): - curr_char = text[idx] - next_char = None if idx == len(text) - 1 else text[idx + 1] - if curr_char == "\n": - lines.append(text[: idx + 1]) - text = text[idx + 1 :] - break - if curr_char == "\r" and next_char == "\n": - # if it ends with \r\n, we only do \n - lines.append(text[:idx] + "\n") - text = text[idx + 2 :] - break - if curr_char == "\r" and next_char is not None: - # if it's \r then a normal character, we switch \r to \n - lines.append(text[:idx] + "\n") - text = text[idx + 1 :] - break - if next_char is None: - text = "" - last_chunk_of_text += text - break - if last_chunk_of_text.endswith("\r"): - # if ends with \r, we switch \r to \n - lines.append(last_chunk_of_text[:-1] + "\n") - elif last_chunk_of_text: - lines.append(last_chunk_of_text) - return lines - - -class _StreamContextManagerBase: - def __init__( - self, - client: Union[_PipelineClient, _AsyncPipelineClient], - request: "HttpRequest", - **kwargs - ): - """Used so we can treat stream requests and responses as a context manager. - - In Autorest, we only return a `StreamContextManager` if users pass in `stream_response` True - - Actually sends request when we enter the context manager, closes response when we exit. - - Heavily inspired from httpx, we want the same behavior for it to feel consistent for users - """ - self.client = client - self.request = request - self.kwargs = kwargs - - @abstractmethod - def close(self): - ... - - -class _StreamContextManager(_StreamContextManagerBase): - def __enter__(self) -> "HttpResponse": - """Actually make the call only when we enter. For sync stream_response calls""" - pipeline_transport_response = self.client._pipeline.run( - self.request._internal_request, stream=True, **self.kwargs - ).http_response - self.response = HttpResponse( # pylint: disable=attribute-defined-outside-init - request=self.request, _internal_response=pipeline_transport_response - ) - return self.response - - def __exit__(self, *args): - """Close our stream connection. For sync calls""" - self.response.__exit__(*args) - - def close(self): - self.response.close() - - -class _AsyncStreamContextManager(_StreamContextManagerBase): - async def __aenter__(self) -> "AsyncHttpResponse": - """Actually make the call only when we enter. For async stream_response calls.""" - if not isinstance(self.client, _AsyncPipelineClient): - raise TypeError( - "Only sync calls should enter here. If you mean to do a sync call, " - "make sure to use 'with' instead." - ) - pipeline_transport_response = ( - await self.client._pipeline.run( - self.request._internal_request, stream=True, **self.kwargs - ) - ).http_response - self.response = AsyncHttpResponse( # pylint: disable=attribute-defined-outside-init - request=self.request, _internal_response=pipeline_transport_response - ) - return self.response - - async def __aexit__(self, *args): - await self.response.__aexit__(*args) - - async def close(self): # pylint: disable=invalid-overridden-method - await self.response.close() - - -################################## CLASSES ###################################### - - -class HttpRequest: - """Represents an HTTP request. - - :param method: HTTP method (GET, HEAD, etc.) - :type method: str or ~azure.core.protocol.HttpVerbs - :param str url: The url for your request - :keyword params: Query parameters to be mapped into your URL. Your input - should be a mapping or sequence of query name to query value(s). - :paramtype params: mapping or sequence - :keyword headers: HTTP headers you want in your request. Your input should - be a mapping or sequence of header name to header value. - :paramtype headers: mapping or sequence - :keyword any json: A JSON serializable object. We handle JSON-serialization for your - object, so use this for more complicated data structures than `data`. - :keyword content: Content you want in your request body. Think of it as the kwarg you should input - if your data doesn't fit into `json`, `data`, or `files`. Accepts a bytes type, or a generator - that yields bytes. - :paramtype content: str or bytes or iterable[bytes] or asynciterable[bytes] - :keyword dict data: Form data you want in your request body. Use for form-encoded data, i.e. - HTML forms. - :keyword files: Files you want to in your request body. Use for uploading files with - multipart encoding. Your input should be a mapping or sequence of file name to file content. - Use the `data` kwarg in addition if you want to include non-file data files as part of your request. - :paramtype files: mapping or sequence - :ivar str url: The URL this request is against. - :ivar str method: The method type of this request. - :ivar headers: The HTTP headers you passed in to your request - :vartype headers: mapping or sequence - :ivar bytes content: The content passed in for the request - """ - - def __init__( - self, - method: str, - url: str, - *, - params: Optional[ParamsType] = None, - headers: Optional[HeadersType] = None, - json: Any = None, # pylint: disable=redefined-outer-name - content: Optional[ContentType] = None, - data: Optional[dict] = None, - files: Optional[FilesType] = None, - **kwargs - ): - # type: (str, str, Any) -> None - - self._internal_request = kwargs.pop( - "_internal_request", - _PipelineTransportHttpRequest( - method=method, - url=url, - headers=headers, - ), - ) - - if params: - self._internal_request.format_parameters(params) - - _set_body( - content=content, - data=data, - files=files, - json_body=json, - internal_request=self._internal_request, - ) - - if kwargs: - raise TypeError( - "You have passed in kwargs '{}' that are not valid kwargs.".format( - "', '".join(list(kwargs.keys())) - ) - ) - - def _set_content_length_header(self) -> None: - method_check = self._internal_request.method.lower() in ["put", "post", "patch"] - content_length_unset = "Content-Length" not in self._internal_request.headers - if method_check and content_length_unset: - self._internal_request.headers["Content-Length"] = str( - len(self._internal_request.data) - ) - - @property - def url(self) -> str: - return self._internal_request.url - - @url.setter - def url(self, val: str) -> None: - self._internal_request.url = val - - @property - def method(self) -> str: - return self._internal_request.method - - @property - def headers(self) -> HeadersType: - return self._internal_request.headers - - @property - def content(self) -> Any: - """Gets the request content.""" - return self._internal_request.data or self._internal_request.files - - def __repr__(self) -> str: - return self._internal_request.__repr__() - - def __deepcopy__(self, memo=None) -> "HttpRequest": - return HttpRequest( - self.method, - self.url, - _internal_request=self._internal_request.__deepcopy__(memo), - ) - - -class _HttpResponseBase: - """Base class for HttpResponse and AsyncHttpResponse. - - :keyword request: The request that resulted in this response. - :paramtype request: ~azure.core.rest.HttpRequest - :ivar int status_code: The status code of this response - :ivar headers: The response headers - :vartype headers: dict[str, any] - :ivar str reason: The reason phrase for this response - :ivar bytes content: The response content in bytes - :ivar str url: The URL that resulted in this response - :ivar str encoding: The response encoding. Is settable, by default - is the response Content-Type header - :ivar str text: The response body as a string. - :ivar request: The request that resulted in this response. - :vartype request: ~azure.core.rest.HttpRequest - :ivar str content_type: The content type of the response - :ivar bool is_closed: Whether the network connection has been closed yet - :ivar bool is_stream_consumed: When getting a stream response, checks - whether the stream has been fully consumed - :ivar int num_bytes_downloaded: The number of bytes in your stream that - have been downloaded - """ - - def __init__(self, *, request: HttpRequest, **kwargs): - self._internal_response = kwargs.pop( - "_internal_response" - ) # type: _PipelineTransportHttpResponseBase - self._request = request - self.is_closed = False - self.is_stream_consumed = False - self._num_bytes_downloaded = 0 - - @property - def status_code(self) -> int: - """Returns the status code of the response""" - return self._internal_response.status_code - - @status_code.setter - def status_code(self, val: int) -> None: - """Set the status code of the response""" - self._internal_response.status_code = val - - @property - def headers(self) -> HeadersType: - """Returns the response headers""" - return self._internal_response.headers - - @property - def reason(self) -> str: - """Returns the reason phrase for the response""" - return self._internal_response.reason - - @property - def content(self) -> bytes: - """Returns the response content in bytes""" - raise NotImplementedError() - - @property - def url(self) -> str: - """Returns the URL that resulted in this response""" - return self._internal_response.request.url - - @property - def encoding(self) -> str: - """Returns the response encoding. By default, is specified - by the response Content-Type header. - """ - - try: - return self._encoding - except AttributeError: - return self._get_charset_encoding() - - def _get_charset_encoding(self) -> str: - content_type = self.headers.get("Content-Type") - - if not content_type: - return None - _, params = cgi.parse_header(content_type) - encoding = params.get("charset") # -> utf-8 - if encoding is None or not _lookup_encoding(encoding): - return None - return encoding - - @encoding.setter - def encoding(self, value: str) -> None: - # type: (str) -> None - """Sets the response encoding""" - self._encoding = value - - @property - def text(self) -> str: - """Returns the response body as a string""" - _ = self.content # access content to make sure we trigger if response not fully read in - return self._internal_response.text(encoding=self.encoding) - - @property - def request(self) -> HttpRequest: - if self._request: - return self._request - raise RuntimeError( - "You are trying to access the 'request', but there is no request associated with this HttpResponse" - ) - - @request.setter - def request(self, val: HttpRequest) -> None: - self._request = val - - @property - def content_type(self) -> Optional[str]: - """Content Type of the response""" - return self._internal_response.content_type or self.headers.get("Content-Type") - - @property - def num_bytes_downloaded(self) -> int: - """See how many bytes of your stream response have been downloaded""" - return self._num_bytes_downloaded - - def json(self) -> Any: - """Returns the whole body as a json object. - - :return: The JSON deserialized response body - :rtype: any - :raises json.decoder.JSONDecodeError or ValueError (in python 2.7) if object is not JSON decodable: - """ - return json.loads(self.text) - - def raise_for_status(self) -> None: - """Raises an HttpResponseError if the response has an error status code. - - If response is good, does nothing. - """ - if self.status_code >= 400: - raise HttpResponseError(response=self) - - def __repr__(self) -> str: - content_type_str = ( - ", Content-Type: {}".format(self.content_type) if self.content_type else "" - ) - return "<{}: {} {}{}>".format( - type(self).__name__, self.status_code, self.reason, content_type_str - ) - - def _validate_streaming_access(self) -> None: - if self.is_closed: - raise ResponseClosedError() - if self.is_stream_consumed: - raise StreamConsumedError() - - -class HttpResponse(_HttpResponseBase): - @property - def content(self): - # type: (...) -> bytes - try: - return self._content - except AttributeError: - raise ResponseNotReadError() - - def close(self) -> None: - self.is_closed = True - self._internal_response.internal_response.close() - - def __exit__(self, *args) -> None: - self._internal_response.internal_response.__exit__(*args) - - def read(self) -> bytes: - """ - Read the response's bytes. - - """ - try: - return self._content - except AttributeError: - self._validate_streaming_access() - self._content = (self._internal_response.body() or # pylint: disable=attribute-defined-outside-init - b"".join(self.iter_raw())) - self._close_stream() - return self._content - - def iter_bytes(self, chunk_size: int = None) -> Iterator[bytes]: - """Iterate over the bytes in the response stream""" - try: - chunk_size = len(self._content) if chunk_size is None else chunk_size - for i in range(0, len(self._content), chunk_size): - yield self._content[i : i + chunk_size] - - except AttributeError: - for raw_bytes in self.iter_raw(chunk_size=chunk_size): - yield raw_bytes - - def iter_text(self, chunk_size: int = None) -> Iterator[str]: - """Iterate over the response text""" - for byte in self.iter_bytes(chunk_size): - text = byte.decode(self.encoding or "utf-8") - yield text - - def iter_lines(self, chunk_size: int = None) -> Iterator[str]: - for text in self.iter_text(chunk_size): - lines = _parse_lines_from_text(text) - for line in lines: - yield line - - def _close_stream(self) -> None: - self.is_stream_consumed = True - self.close() - - def iter_raw(self, **_) -> Iterator[bytes]: - """Iterate over the raw response bytes""" - self._validate_streaming_access() - stream_download = self._internal_response.stream_download(None) - for raw_bytes in stream_download: - self._num_bytes_downloaded += len(raw_bytes) - yield raw_bytes - - self._close_stream() - - -class AsyncHttpResponse(_HttpResponseBase): - @property - def content(self) -> bytes: - try: - return self._content - except AttributeError: - raise ResponseNotReadError() - - async def _close_stream(self) -> None: - self.is_stream_consumed = True - await self.close() - - async def read(self) -> bytes: - """ - Read the response's bytes. - - """ - try: - return self._content - except AttributeError: - self._validate_streaming_access() - await self._internal_response.load_body() - self._content = self._internal_response._body # pylint: disable=protected-access,attribute-defined-outside-init - await self._close_stream() - return self._content - - async def iter_bytes(self, chunk_size: int = None) -> Iterator[bytes]: - """Iterate over the bytes in the response stream""" - try: - chunk_size = len(self._content) if chunk_size is None else chunk_size - for i in range(0, len(self._content), chunk_size): - yield self._content[i : i + chunk_size] - - except AttributeError: - async for raw_bytes in self.iter_raw(chunk_size=chunk_size): - yield raw_bytes - - async def iter_text(self, chunk_size: int = None) -> Iterator[str]: - """Iterate over the response text""" - async for byte in self.iter_bytes(chunk_size): - text = byte.decode(self.encoding or "utf-8") - yield text - - async def iter_lines(self, chunk_size: int = None) -> Iterator[str]: - async for text in self.iter_text(chunk_size): - lines = _parse_lines_from_text(text) - for line in lines: - yield line - - async def iter_raw(self, **_) -> Iterator[bytes]: - """Iterate over the raw response bytes""" - self._validate_streaming_access() - stream_download = self._internal_response.stream_download(None) - async for raw_bytes in stream_download: - self._num_bytes_downloaded += len(raw_bytes) - yield raw_bytes - - await self._close_stream() - - async def close(self) -> None: - self.is_closed = True - self._internal_response.internal_response.close() - await asyncio.sleep(0) - - async def __aexit__(self, *args) -> None: - await self._internal_response.internal_response.__aexit__(*args) - - -########################### ERRORS SECTION ################################# - - -class StreamConsumedError(Exception): - def __init__(self) -> None: - message = ( - "You are attempting to read or stream content that has already been streamed. " - "You have likely already consumed this stream, so it can not be accessed anymore." - ) - super().__init__(message) - - -class ResponseClosedError(Exception): - def __init__(self) -> None: - message = ( - "You can not try to read or stream this response's content, since the " - "response has been closed." - ) - super().__init__(message) - - -class ResponseNotReadError(Exception): - def __init__(self) -> None: - message = ( - "You have not read in the response's bytes yet. Call response.read() first." - ) - super().__init__(message) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/py.typed b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/py.typed new file mode 100644 index 000000000000..e5aff4f83af8 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. \ No newline at end of file diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/rest.py b/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/rest.py deleted file mode 100644 index 9d57abd5a1c0..000000000000 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/rest.py +++ /dev/null @@ -1,942 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is regenerated. -# -------------------------------------------------------------------------- - -# pylint: disable=line-too-long - -__all__ = [ - 'build_add_connection_to_group_request', - 'build_add_user_to_group_request', - 'build_connection_exists_request', - 'build_group_exists_request', - 'build_check_permission_request', - 'build_user_exists_request', - 'build_close_client_connection_request', - 'build_grant_permission_request', - 'build_healthapi_get_health_status_request', - 'build_remove_connection_from_group_request', - 'build_remove_user_from_all_groups_request', - 'build_remove_user_from_group_request', - 'build_revoke_permission_request', - 'build_send_to_all_request', - 'build_send_to_connection_request', - 'build_send_to_group_request', - 'build_send_to_user_request' -] -from typing import TYPE_CHECKING -from msrest import Serializer -from azure.core.pipeline.transport._base import _format_url_section -from azure.messaging.webpubsubservice.core.rest import HttpRequest - -if TYPE_CHECKING: - # pylint: disable=unused-import,ungrouped-imports - from typing import Any, IO, List, Optional, Union, Dict - from typing_extensions import Literal - Permissions = Union[Literal['joinLeaveGroup'], Literal['sendToGroup']] # pylint: disable=unsubscriptable-object - -_SERIALIZER = Serializer() - - -def build_healthapi_get_health_status_request( - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Get service health status. - - Get service health status. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/health') - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="HEAD", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_send_to_all_request( - hub, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Broadcast content inside request body to all the connected client connections. - - Broadcast content inside request body to all the connected client connections. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :keyword json: The payload body. - :paramtype json: Any - :keyword content: The payload body. - :paramtype content: IO - :keyword excluded: Excluded connection Ids. - :paramtype excluded: list[str] - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - - Example: - .. code-block:: python - - # JSON input template you can fill out and use as your `json` input. - json = "Any (optional)" - """ - excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - content_type = kwargs.pop("content_type", None) - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/:send') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if excluded is not None: - query_parameters['excluded'] = [_SERIALIZER.query("excluded", q, 'str') if q is not None else '' for q in excluded] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) - - -def build_connection_exists_request( - hub, # type: str - connection_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Check if the connection with the given connectionId exists. - - Check if the connection with the given connectionId exists. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param connection_id: The connection Id. - :type connection_id: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/connections/{connectionId}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'connectionId': _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="HEAD", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_close_client_connection_request( - hub, # type: str - connection_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Close the client connection. - - Close the client connection. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param connection_id: Target connection Id. - :type connection_id: str - :keyword reason: The reason closing the client connection. - :paramtype reason: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - reason = kwargs.pop('reason', None) # type: Optional[str] - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/connections/{connectionId}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'connectionId': _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if reason is not None: - query_parameters['reason'] = _SERIALIZER.query("reason", reason, 'str') - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_send_to_connection_request( - hub, # type: str - connection_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Send content inside request body to the specific connection. - - Send content inside request body to the specific connection. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param connection_id: The connection Id. - :type connection_id: str - :keyword json: The payload body. - :paramtype json: Any - :keyword content: The payload body. - :paramtype content: IO - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - - Example: - .. code-block:: python - - # JSON input template you can fill out and use as your `json` input. - json = "Any (optional)" - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - content_type = kwargs.pop("content_type", None) - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/connections/{connectionId}/:send') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'connectionId': _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) - - -def build_group_exists_request( - hub, # type: str - group, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Check if there are any client connections inside the given group. - - Check if there are any client connections inside the given group. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param group: Target group name, which length should be greater than 0 and less than 1025. - :type group: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/groups/{group}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'group': _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="HEAD", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_send_to_group_request( - hub, # type: str - group, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Send content inside request body to a group of connections. - - Send content inside request body to a group of connections. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param group: Target group name, which length should be greater than 0 and less than 1025. - :type group: str - :keyword json: The payload body. - :paramtype json: Any - :keyword content: The payload body. - :paramtype content: IO - :keyword excluded: Excluded connection Ids. - :paramtype excluded: list[str] - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - - Example: - .. code-block:: python - - # JSON input template you can fill out and use as your `json` input. - json = "Any (optional)" - """ - excluded = kwargs.pop('excluded', None) # type: Optional[List[str]] - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - content_type = kwargs.pop("content_type", None) - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/groups/{group}/:send') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'group': _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if excluded is not None: - query_parameters['excluded'] = [_SERIALIZER.query("excluded", q, 'str') if q is not None else '' for q in excluded] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) - - -def build_add_connection_to_group_request( - hub, # type: str - group, # type: str - connection_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Add a connection to the target group. - - Add a connection to the target group. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param group: Target group name, which length should be greater than 0 and less than 1025. - :type group: str - :param connection_id: Target connection Id. - :type connection_id: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/groups/{group}/connections/{connectionId}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'group': _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), - 'connectionId': _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_remove_connection_from_group_request( - hub, # type: str - group, # type: str - connection_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Remove a connection from the target group. - - Remove a connection from the target group. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param group: Target group name, which length should be greater than 0 and less than 1025. - :type group: str - :param connection_id: Target connection Id. - :type connection_id: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/groups/{group}/connections/{connectionId}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'group': _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), - 'connectionId': _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_user_exists_request( - hub, # type: str - user_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Check if there are any client connections connected for the given user. - - Check if there are any client connections connected for the given user. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param user_id: Target user Id. - :type user_id: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'userId': _SERIALIZER.url("user_id", user_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="HEAD", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_send_to_user_request( - hub, # type: str - user_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Send content inside request body to the specific user. - - Send content inside request body to the specific user. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param user_id: The user Id. - :type user_id: str - :keyword json: The payload body. - :paramtype json: Any - :keyword content: The payload body. - :paramtype content: IO - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - - Example: - .. code-block:: python - - # JSON input template you can fill out and use as your `json` input. - json = "Any (optional)" - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - content_type = kwargs.pop("content_type", None) - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}/:send') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'userId': _SERIALIZER.url("user_id", user_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - # Construct headers - header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - if content_type is not None: - header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - - return HttpRequest( - method="POST", - url=url, - params=query_parameters, - headers=header_parameters, - **kwargs - ) - - -def build_add_user_to_group_request( - hub, # type: str - group, # type: str - user_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Add a user to the target group. - - Add a user to the target group. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param group: Target group name, which length should be greater than 0 and less than 1025. - :type group: str - :param user_id: Target user Id. - :type user_id: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}/groups/{group}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'group': _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), - 'userId': _SERIALIZER.url("user_id", user_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_remove_user_from_group_request( - hub, # type: str - group, # type: str - user_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Remove a user from the target group. - - Remove a user from the target group. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param group: Target group name, which length should be greater than 0 and less than 1025. - :type group: str - :param user_id: Target user Id. - :type user_id: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}/groups/{group}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'group': _SERIALIZER.url("group", group, 'str', max_length=1024, min_length=1), - 'userId': _SERIALIZER.url("user_id", user_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_remove_user_from_all_groups_request( - hub, # type: str - user_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Remove a user from all groups. - - Remove a user from all groups. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param user_id: Target user Id. - :type user_id: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/users/{userId}/groups') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'userId': _SERIALIZER.url("user_id", user_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_grant_permission_request( - hub, # type: str - permission, # type: Permissions - connection_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Grant permission to the connection. - - Grant permission to the connection. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param permission: The permission: current supported actions are joinLeaveGroup and - sendToGroup. - :type permission: str or ~Permissions - :param connection_id: Target connection Id. - :type connection_id: str - :keyword target_name: Optional. If not set, grant the permission to all the targets. If set, - grant the permission to the specific target. The meaning of the target depends on the specific - permission. - :paramtype target_name: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - target_name = kwargs.pop('target_name', None) # type: Optional[str] - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'permission': _SERIALIZER.url("permission", permission, 'str'), - 'connectionId': _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if target_name is not None: - query_parameters['targetName'] = _SERIALIZER.query("target_name", target_name, 'str') - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="PUT", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_revoke_permission_request( - hub, # type: str - permission, # type: Permissions - connection_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Revoke permission for the connection. - - Revoke permission for the connection. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param permission: The permission: current supported actions are joinLeaveGroup and - sendToGroup. - :type permission: str or ~Permissions - :param connection_id: Target connection Id. - :type connection_id: str - :keyword target_name: Optional. If not set, revoke the permission for all targets. If set, - revoke the permission for the specific target. The meaning of the target depends on the - specific permission. - :paramtype target_name: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - target_name = kwargs.pop('target_name', None) # type: Optional[str] - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'permission': _SERIALIZER.url("permission", permission, 'str'), - 'connectionId': _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if target_name is not None: - query_parameters['targetName'] = _SERIALIZER.query("target_name", target_name, 'str') - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="DELETE", - url=url, - params=query_parameters, - **kwargs - ) - - -def build_check_permission_request( - hub, # type: str - permission, # type: Permissions - connection_id, # type: str - **kwargs # type: Any -): - # type: (...) -> HttpRequest - """Check if a connection has permission to the specified action. - - Check if a connection has permission to the specified action. - - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this request builder into your code flow. - - :param hub: Target hub name, which should start with alphabetic characters and only contain - alpha-numeric characters or underscore. - :type hub: str - :param permission: The permission: current supported actions are joinLeaveGroup and - sendToGroup. - :type permission: ~Permissions - :param connection_id: Target connection Id. - :type connection_id: str - :keyword target_name: Optional. If not set, get the permission for all targets. If set, get the - permission for the specific target. The meaning of the target depends on the specific - permission. - :paramtype target_name: str - :keyword api_version: Api Version. - :paramtype api_version: str - :return: Returns an :class:`~azure.messaging.webpubsubservice.core.rest.HttpRequest` that you will pass to the client's `send_request` method. - See https://aka.ms/azsdk/python/llcwiki for how to incorporate this response into your code flow. - :rtype: ~azure.messaging.webpubsubservice.core.rest.HttpRequest - """ - target_name = kwargs.pop('target_name', None) # type: Optional[str] - api_version = kwargs.pop('api_version', "2021-05-01-preview") # type: Optional[str] - - # Construct URL - url = kwargs.pop("template_url", '/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}') - path_format_arguments = { - 'hub': _SERIALIZER.url("hub", hub, 'str', pattern=r'^[A-Za-z][A-Za-z0-9_`,.[\]]{0,127}$'), - 'permission': _SERIALIZER.url("permission", permission, 'str'), - 'connectionId': _SERIALIZER.url("connection_id", connection_id, 'str', min_length=1), - } - url = _format_url_section(url, **path_format_arguments) - - # Construct parameters - query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - if target_name is not None: - query_parameters['targetName'] = _SERIALIZER.query("target_name", target_name, 'str') - if api_version is not None: - query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') - - return HttpRequest( - method="HEAD", - url=url, - params=query_parameters, - **kwargs - ) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/dev_requirements.txt b/sdk/webpubsub/azure-messaging-webpubsubservice/dev_requirements.txt index 7e186f5cb543..18a40815ebe0 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/dev_requirements.txt +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/dev_requirements.txt @@ -5,3 +5,4 @@ ../../nspkg/azure-messaging-nspkg aiohttp>=3.0; python_version >= '3.5' typing_extensions>=3.7.2 +asyncio; python_version >= '3.5' diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/examples/send_messages.py b/sdk/webpubsub/azure-messaging-webpubsubservice/examples/send_messages.py deleted file mode 100644 index 96913de2dde1..000000000000 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/examples/send_messages.py +++ /dev/null @@ -1,54 +0,0 @@ -import io -import logging -import os - -from azure.messaging.webpubsubservice import WebPubSubServiceClient -from azure.messaging.webpubsubservice.rest import * - -logging.basicConfig(level=logging.DEBUG) -LOG = logging.getLogger() - -try: - connection_string = os.environ['WEBPUBSUB_CONNECTION_STRING'] -except KeyError: - LOG.error("Missing environment variable 'WEBPUBSUB_CONNECTION_STRING' - please set if before running the example") - exit() - -# Build a client from the connection string. And for this example, we have enabled debug -# tracing. For production code, this should be turned off. -client = WebPubSubServiceClient.from_connection_string(connection_string, tracing_enabled=True) - -# Send a json message to everybody on the given hub... -request = build_send_to_all_request('myHub', json={ 'Hello': 'all!' }) -print(request.headers) -response = client.send_request(request) -try: - # Raise an exception if the service rejected the call - response.raise_for_status() - print('Successfully sent a JSON message') -except: - print('Failed to send JSON message: {}'.format(response)) - - -# Send a text message to everybody on the given hub... -request = build_send_to_all_request('ahub', content='hello, text!', content_type='text/plain') -response = client.send_request(request) -try: - # Raise an exception if the service rejected the call - response.raise_for_status() - print('Successfully sent a TEXT message') -except: - print('Failed to send TEXT message: {}'.format(response)) - - - -# Send a json message from a stream to everybody on the given hub... -request = build_send_to_all_request('ahub', content=io.BytesIO(b'{ "hello": "world" }'), content_type='application/json') -response = client.send_request(request) -try: - # Raise an exception if the service rejected the call - response.raise_for_status() - print('Successfully sent a JSON message from a stream') -except: - print('Failed to send JSON message from a stream: {}'.format(response)) - diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/samples/Readme.md b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/Readme.md new file mode 100644 index 000000000000..5797390624bb --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/Readme.md @@ -0,0 +1,52 @@ +--- +page_type: sample +languages: + - python +products: + - azure + - azure-messaging-webpubsubservice +urlFragment: azure-messaging-webpubsubservice-samples +--- + +# Azure Web PubSub service client library for Python Samples + +These are code samples that show common scenario operations with the Azure WebPubSub client library. +The async versions of the samples (the python sample files appended with `_async`) show asynchronous operations, +and require Python 3.6 or later. + +## Prerequisites + +* Python 2.7, or 3.6 or later is required to use this package (3.5 or later if using asyncio) +* You need an [Azure subscription][azure_sub], and a [Azure WebPubSub service instance][webpubsubservice_docs] to use this package. + +## Setup + +1. Install the Azure Web PubSub service client library for Python with [pip](https://pypi.org/project/pip/): + +```bash +pip install azure-messaging-webpubsubservice +``` + +2. Clone or download this sample repository +3. Open the sample folder in Visual Studio Code or your IDE of choice. + +## Running the samples + +1. Open a terminal window and `cd` to the directory that the samples are saved in. +2. Set the environment variables specified in the sample file you wish to run. +3. Follow the usage described in the file, e.g. `python get_client_access_token.py` + +## More samples + +Check [more samples here][servicesample]. + +## Next Steps + +Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. + + + +[azure_sub]: https://azure.microsoft.com/free/ +[webpubsubservice_docs]: https://aka.ms/awps/doc +[servicesample]: https://github.com/Azure/azure-webpubsub/tree/main/samples/python +[apiref]: https://aka.ms/awps/sdk/python diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/__init__.py b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token.py similarity index 51% rename from sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/__init__.py rename to sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token.py index a70aae7c472a..157c9efb8e1d 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/azure/messaging/webpubsubservice/core/rest/__init__.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token.py @@ -1,3 +1,4 @@ +# coding=utf-8 # -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. @@ -23,43 +24,34 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- +import logging +import os + +from azure.messaging.webpubsubservice import WebPubSubServiceClient +from azure.identity import DefaultAzureCredential + +logging.basicConfig(level=logging.DEBUG) +LOG = logging.getLogger() + +# Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: +# AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, WEBPUBSUB_ENDPOINT, WEBPUBSUB_CONNECTION_STRING try: - from ._rest_py3 import ( - HttpRequest, - HttpResponse, - AsyncHttpResponse, - _StreamContextManager, - _AsyncStreamContextManager, - StreamConsumedError, - ResponseNotReadError, - ResponseClosedError, - ) + endpoint = os.environ["WEBPUBSUB_ENDPOINT"] + connection_string = os.environ['WEBPUBSUB_CONNECTION_STRING'] +except KeyError: + LOG.error("Missing environment variable 'WEBPUBSUB_ENDPOINT' or 'WEBPUBSUB_CONNECTION_STRING' - please set if before running the example") + exit() + +# Build a client through AAD +client_aad = WebPubSubServiceClient(endpoint=endpoint, hub='hub', credential=DefaultAzureCredential()) + +# Build authentication token +token_aad = client_aad.get_client_access_token() +print('token by AAD: {}'.format(token_aad)) - __all__ = [ - "HttpRequest", - "HttpResponse", - "AsyncHttpResponse", - "_StreamContextManager", - "_AsyncStreamContextManager", - "StreamConsumedError", - "ResponseNotReadError", - "ResponseClosedError", - ] -except (SyntaxError, ImportError): - from ._rest import ( - HttpRequest, - HttpResponse, - _StreamContextManager, - StreamConsumedError, - ResponseNotReadError, - ResponseClosedError, - ) +# Build a client through connection string +client_key = WebPubSubServiceClient.from_connection_string(connection_string, hub='hub') - __all__ = [ - "HttpRequest", - "HttpResponse", - "_StreamContextManager", - "StreamConsumedError", - "ResponseNotReadError", - "ResponseClosedError", - ] +# Build authentication token +token_key = client_key.get_client_access_token() +print('token by access key: {}'.format(token_key)) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token_async.py b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token_async.py new file mode 100644 index 000000000000..792f209fec34 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/get_client_access_token_async.py @@ -0,0 +1,63 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import logging +import os +import asyncio + +from azure.messaging.webpubsubservice.aio import WebPubSubServiceClient as WebPubSubServiceClientAsync +from azure.identity.aio import DefaultAzureCredential + +logging.basicConfig(level=logging.DEBUG) +LOG = logging.getLogger() + + +async def main(): + # Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: + # AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, WEBPUBSUB_ENDPOINT, WEBPUBSUB_CONNECTION_STRING + try: + endpoint = os.environ["WEBPUBSUB_ENDPOINT"] + connection_string = os.environ['WEBPUBSUB_CONNECTION_STRING'] + except KeyError: + LOG.error("Missing environment variable 'WEBPUBSUB_ENDPOINT' or 'WEBPUBSUB_CONNECTION_STRING' - please set if before running the example") + exit() + + # Build a client through AAD(async) + async with DefaultAzureCredential() as credential: + async with WebPubSubServiceClientAsync(endpoint=endpoint, hub='hub', credential=credential) as client_aad_async: + # Build authentication token(async) + token_aad_async = await client_aad_async.get_client_access_token() + print('token by AAD(async): {}'.format(token_aad_async)) + + # Build a client through connection string(async) + async with WebPubSubServiceClientAsync.from_connection_string(connection_string, hub='hub') as client_key_async: + # Build authentication token(async) + token_key_async = await client_key_async.get_client_access_token() + print('token by access key(async): {}'.format(token_key_async)) + +if __name__ == '__main__': + loop = asyncio.get_event_loop() + loop.run_until_complete(main()) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad.py b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad.py new file mode 100644 index 000000000000..d70098d88dfa --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import io +import logging +import os + +from azure.messaging.webpubsubservice import WebPubSubServiceClient +from azure.identity import DefaultAzureCredential +from azure.core.exceptions import HttpResponseError + +logging.basicConfig(level=logging.DEBUG) +LOG = logging.getLogger() + +# Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: +# AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, WEBPUBSUB_ENDPOINT +try: + endpoint = os.environ["WEBPUBSUB_ENDPOINT"] +except KeyError: + LOG.error("Missing environment variable 'WEBPUBSUB_ENDPOINT' - please set if before running the example") + exit() + +# Build a client through AAD +client = WebPubSubServiceClient(endpoint=endpoint, hub='hub', credential=DefaultAzureCredential()) + +# Send a json message to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message={'Hello': 'all'}) + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + +# Send a text message to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message='hello, text!', content_type='text/plain') + print('Successfully sent a text message') +except HttpResponseError as e: + print('Failed to send text message: {}'.format(e.response.json())) + + +# Send a json message from a stream to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message=io.BytesIO(b'{ "hello": "world" }'), content_type='application/octet-stream') + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad_apim_proxy.py b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad_apim_proxy.py new file mode 100644 index 000000000000..a375d6eb8173 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_aad_apim_proxy.py @@ -0,0 +1,75 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import io +import logging +import os + +from azure.messaging.webpubsubservice import WebPubSubServiceClient +from azure.identity import DefaultAzureCredential +from azure.core.exceptions import HttpResponseError + +logging.basicConfig(level=logging.DEBUG) +LOG = logging.getLogger() + +# Set the values of the client ID, tenant ID, and client secret of the AAD application as environment variables: +# AZURE_CLIENT_ID, AZURE_TENANT_ID, AZURE_CLIENT_SECRET, WEBPUBSUB_ENDPOINT, WEBPUBSUB_REVERSE_PROXY_ENDPOINT +try: + endpoint = os.environ["WEBPUBSUB_ENDPOINT"] + reverse_proxy_endpoint = os.environ["WEBPUBSUB_REVERSE_PROXY_ENDPOINT"] +except KeyError: + LOG.error("Missing environment variable 'WEBPUBSUB_ENDPOINT' or 'WEBPUBSUB_REVERSE_PROXY_ENDPOINT' - please set if before running the example") + exit() + +# Build a client through AAD +# If you want to know more about the effect of `reverse_proxy_endpoint`, please reference: https://github.com/Azure/azure-webpubsub/issues/194 +client = WebPubSubServiceClient(endpoint=endpoint, hub='hub', credential=DefaultAzureCredential(), reverse_proxy_endpoint=reverse_proxy_endpoint) + +# Send a json message to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message={'Hello': 'reverse_proxy_endpoint!'}) + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + +# Send a text message to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message='hello, reverse_proxy_endpoint!', content_type='text/plain') + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + + +# Send a json message from a stream to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message=io.BytesIO(b'{ "hello": "reverse_proxy_endpoint" }'), content_type='application/octet-stream') + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_connection_string.py b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_connection_string.py new file mode 100644 index 000000000000..124fded6b5f7 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_connection_string.py @@ -0,0 +1,70 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import io +import logging +import os + +from azure.messaging.webpubsubservice import WebPubSubServiceClient +from azure.core.exceptions import HttpResponseError + +logging.basicConfig(level=logging.DEBUG) +LOG = logging.getLogger() + +try: + connection_string = os.environ['WEBPUBSUB_CONNECTION_STRING'] +except KeyError: + LOG.error("Missing environment variable 'WEBPUBSUB_CONNECTION_STRING' - please set if before running the example") + exit() + +# Build a client from the connection string. And for this example, we have enabled debug +# tracing. For production code, this should be turned off. +client = WebPubSubServiceClient.from_connection_string(connection_string, hub='hub', logging_enable=True) + +try: + # Raise an exception if the service rejected the call + client.send_to_all(message={'Hello': 'all!'}) + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + +# Send a text message to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message='hello, text!', content_type='text/plain') + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + + +# Send a json message from a stream to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message=io.BytesIO(b'{ "hello": "world" }'), content_type='application/octet-stream') + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_connection_string_apim_proxy.py b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_connection_string_apim_proxy.py new file mode 100644 index 000000000000..2025dc7f838c --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/samples/send_messages_connection_string_apim_proxy.py @@ -0,0 +1,72 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# +# Copyright (c) Microsoft Corporation. All rights reserved. +# +# The MIT License (MIT) +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the ""Software""), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. +# +# -------------------------------------------------------------------------- +import io +import logging +import os + +from azure.messaging.webpubsubservice import WebPubSubServiceClient +from azure.core.exceptions import HttpResponseError + +logging.basicConfig(level=logging.DEBUG) +LOG = logging.getLogger() + +try: + connection_string = os.environ['WEBPUBSUB_CONNECTION_STRING'] + reverse_proxy_endpoint = os.environ["WEBPUBSUB_REVERSE_PROXY_ENDPOINT"] +except KeyError: + LOG.error("Missing environment variable 'WEBPUBSUB_CONNECTION_STRING' or 'WEBPUBSUB_REVERSE_PROXY_ENDPOINT' - please set if before running the example") + exit() + +# Build a client from the connection string. And for this example, we have enabled debug +# tracing. For production code, this should be turned off. +# If you want to know more about the effect of `reverse_proxy_endpoint`, please reference: https://github.com/Azure/azure-webpubsub/issues/194 +client = WebPubSubServiceClient.from_connection_string(connection_string, hub='hub', logging_enable=True, reverse_proxy_endpoint=reverse_proxy_endpoint) + +try: + # Raise an exception if the service rejected the call + client.send_to_all(message={'Hello': 'connection_string_reverse_proxy!'}) + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + +# Send a text message to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message='hello, connection_string_reverse_proxy!', content_type='text/plain') + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + + +# Send a json message from a stream to everybody on the given hub... +try: + # Raise an exception if the service rejected the call + client.send_to_all(message=io.BytesIO(b'{ "hello": "connection_string_reverse_proxy" }'), content_type='application/octet-stream') + print('Successfully sent a JSON message') +except HttpResponseError as e: + print('Failed to send JSON message: {}'.format(e.response.json())) + diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/setup.py b/sdk/webpubsub/azure-messaging-webpubsubservice/setup.py index f5403c2290e5..c3db3d1d4080 100644 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/setup.py +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/setup.py @@ -39,9 +39,9 @@ license="MIT License", author="Microsoft Corporation", author_email="azpysdkhelp@microsoft.com", - url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/signalr/azure-messaging-webpubsubservice", + url="https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/webpubsub/azure-messaging-webpubsubservice", classifiers=[ - "Development Status :: 4 - Beta", + "Development Status :: 5 - Production/Stable", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", @@ -61,9 +61,9 @@ ] ), install_requires=[ - "azure-core<2.0.0,>=1.10.0", - "msrest>=0.6.18", - "cryptography>=2.1.4", + "azure-core<2.0.0,>=1.20.1", + "msrest>=0.6.21", + "cryptography>=2.8.0", "pyjwt>=1.7.1", "six>=1.12.0", ], diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/swagger/README.md b/sdk/webpubsub/azure-messaging-webpubsubservice/swagger/README.md new file mode 100644 index 000000000000..1e36db4cab71 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/swagger/README.md @@ -0,0 +1,247 @@ +# Azure Purview for Python + +> see https://aka.ms/autorest + +### Setup + +Install Autorest v3 + +```ps +npm install -g autorest +``` + +### Generation + +```ps +cd +autorest +``` + +### Settings + +```yaml +input-file: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/webpubsub/data-plane/WebPubSub/stable/2021-10-01/webpubsub.json +output-folder: ../azure/messaging/webpubsubservice +namespace: azure.messaging.webpubsubservice +package-name: azure-messaging-webpubsubservice +license-header: MICROSOFT_MIT_NO_VERSION +clear-output-folder: true +no-namespace-folders: true +python: true +title: WebPubSubServiceClient +version-tolerant: true +head-as-boolean: true +package-version: 1.0.0 +add-credential: true +credential-scopes: https://webpubsub.azure.com/.default +``` + + +Here's the directive to delete the health api operation that we don't need / want +```yaml + +directive: + - from: swagger-document + where: $["paths"]["/api/health"] + transform: > + delete $["head"]; +``` + +Here's the directive to move the operations from the webpubsub operation group directly onto the client + +```yaml + +directive: + - from: swagger-document + where: $["paths"][*] + transform: > + for (var op of Object.values($)) { + if (op["operationId"].includes("WebPubSub_")) { + op["operationId"] = op["operationId"].replace("WebPubSub_", ""); + } + } +``` + +```yaml +directive: + - from: swagger-document + where: $["paths"]["/api/hubs/{hub}/:generateToken"].post.parameters + transform: > + $[2]["x-ms-client-name"] = "roles" +``` + +```yaml +directive: + - from: swagger-document + where: $["paths"]["/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}"].head + transform: $["operationId"] = "HasPermission" +``` + +```yaml +directive: + - from: swagger-document + where: $["paths"]["/api/hubs/{hub}/:generateToken"].post + transform: $["operationId"] = "GetClientAccessToken" +``` + +### Add hub to client on generate token + +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/:generateToken"].post.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### SendToAll + +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/:send"].post.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### ConnectionExistsImpl +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/connections/{connectionId}"].head.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### CloseConnection +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/connections/{connectionId}"].delete.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### SendToConnection +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/connections/{connectionId}/:send"].post.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### GroupExistsImpl +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/groups/{group}"].head.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### SendToGroup +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/groups/{group}/:send"].post.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### AddConnectionToGroup +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/groups/{group}/connections/{connectionId}"].put.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### RemoveConnectionFromGroup +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/groups/{group}/connections/{connectionId}"].delete.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### UserExistsImpl +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/users/{userId}"].head.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### SendToUser +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/users/{userId}/:send"].post.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### AddUserToGroup +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/users/{userId}/groups/{group}"].put.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### RemoveUserFromGroup +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/users/{userId}/groups/{group}"].delete.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### RemoveUserFromAllGroups +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/users/{userId}/groups"].delete.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### GrantPermission +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}"].put.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### RevokePermission +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}"].delete.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### CheckPermission +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/permissions/{permission}/connections/{connectionId}"].head.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### CloseAllConnections +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/:closeConnections"].post.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### CloseGroupConnections +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/groups/{group}/:closeConnections"].post.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` + +### CloseUserConnections +``` yaml +directive: +- from: swagger-document + where: $.paths["/api/hubs/{hub}/users/{userId}/:closeConnections"].post.parameters["0"] + transform: $["x-ms-parameter-location"] = "client" +``` diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/conftest.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/conftest.py new file mode 100644 index 000000000000..a6ab83f7f5f0 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/conftest.py @@ -0,0 +1,15 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- + +import sys + +# fixture needs to be visible from conftest + +# Ignore async tests for Python < 3.5 +collect_ignore_glob = [] +if sys.version_info < (3, 5): + collect_ignore_glob.append("*_async.py") \ No newline at end of file diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_add_user_to_group.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_add_user_to_group.yaml new file mode 100644 index 000000000000..bdb85a75466f --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_add_user_to_group.yaml @@ -0,0 +1,39 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: PUT + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/users/some_user/groups/some_group?api-version=2021-10-01 + response: + body: + string: '{"code":"Warning.User.NotExisted","message":"User `some_user` is not + found.","target":"User","details":null,"innererror":null}' + headers: + api-supported-versions: + - '2021-10-01' + connection: + - keep-alive + content-length: + - '126' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 10 Nov 2021 01:09:11 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ms-error-code: + - Warning.User.NotExisted + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_get_client_access_token.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_get_client_access_token.yaml new file mode 100644 index 000000000000..21b9680f4384 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_get_client_access_token.yaml @@ -0,0 +1,40 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:generateToken?minutesToExpire=60&api-version=2021-10-01 + response: + body: + string: '{"token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InMtYTdhODUzZjMtZGE1NS00MGU5LWE0OGEtZTVhNTcxN2U4Yjk4IiwidHlwIjoiSldUIn0.eyJuYmYiOjE2MzY1MTYyNzEsImV4cCI6MTYzNjUxOTg3MSwiaWF0IjoxNjM2NTE2MjcxLCJhdWQiOiJodHRwczovL3dlYnB1YnN1Yi15eWMud2VicHVic3ViLmF6dXJlLmNvbS9jbGllbnQvaHVicy9odWIifQ.Wn9-TPRUG54A0GpMUwah86XG8yQxvH8HcQincCf7pAE"}' + headers: + api-supported-versions: + - '2021-10-01' + connection: + - keep-alive + content-length: + - '314' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 10 Nov 2021 03:51:11 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + transfer-encoding: + - chunked + vary: + - Accept-Encoding + status: + code: 200 + message: OK +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string.yaml new file mode 100644 index 000000000000..8f3814c8661f --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: Hello, World! + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '13' + Content-Type: + - text/plain + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2021-10-01' + connection: + - keep-alive + content-length: + - '0' + date: + - Wed, 10 Nov 2021 01:08:53 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string_binary.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string_binary.yaml new file mode 100644 index 000000000000..4a7ad1295214 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string_binary.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: Hello, World! + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '13' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2021-10-01' + connection: + - keep-alive + content-length: + - '0' + date: + - Wed, 10 Nov 2021 01:08:53 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string_json.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string_json.yaml new file mode 100644 index 000000000000..28a02cf06978 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_hello_world_with_connection_string_json.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"hello": "world!"}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2021-10-01' + connection: + - keep-alive + content-length: + - '0' + date: + - Wed, 10 Nov 2021 01:08:53 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_no_users_groups.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_no_users_groups.yaml new file mode 100644 index 000000000000..d3d035046786 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_no_users_groups.yaml @@ -0,0 +1,70 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: HEAD + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/users/fake%20user?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2021-10-01' + connection: + - keep-alive + content-length: + - '126' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 10 Nov 2021 19:20:56 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ms-error-code: + - Warning.User.NotExisted + status: + code: 404 + message: Not Found +- request: + body: null + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: HEAD + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/groups/fake%20group?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2021-10-01' + connection: + - keep-alive + content-length: + - '126' + content-type: + - application/json; charset=utf-8 + date: + - Wed, 10 Nov 2021 19:20:56 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + x-ms-error-code: + - Warning.Group.NotExisted + status: + code: 404 + message: Not Found +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_request.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_request.yaml new file mode 100644 index 000000000000..05404f3c3963 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_request.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: test_webpubsub_send_request + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '27' + Content-Type: + - text/plain + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/Hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2021-10-01' + connection: + - keep-alive + content-length: + - '0' + date: + - Wed, 10 Nov 2021 03:51:15 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_to_all.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_to_all.yaml new file mode 100644 index 000000000000..d6d6d0049321 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_to_all.yaml @@ -0,0 +1,36 @@ +interactions: +- request: + body: '{"hello": "test_webpubsub_send_to_all"}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '39' + Content-Type: + - application/json + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2021-10-01' + connection: + - keep-alive + content-length: + - '0' + date: + - Wed, 10 Nov 2021 03:51:17 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_to_all_api_management_proxy.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_to_all_api_management_proxy.yaml new file mode 100644 index 000000000000..142a7b0f15f7 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke.test_webpubsub_send_to_all_api_management_proxy.yaml @@ -0,0 +1,34 @@ +interactions: +- request: + body: '{"hello": "test_webpubsub_send_to_all_api_management_proxy"}' + headers: + Accept: + - application/json, text/json + Accept-Encoding: + - gzip, deflate + Connection: + - keep-alive + Content-Length: + - '60' + Content-Type: + - application/json + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://myservice.azure-api.net/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: + - '2021-10-01' + content-length: + - '0' + date: + - Wed, 10 Nov 2021 03:51:19 GMT + strict-transport-security: + - max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_get_client_access_token.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_get_client_access_token.yaml new file mode 100644 index 000000000000..be4c98613294 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_get_client_access_token.yaml @@ -0,0 +1,26 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json, text/json + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:generateToken?minutesToExpire=60&api-version=2021-10-01 + response: + body: + string: '{"token":"eyJhbGciOiJIUzI1NiIsImtpZCI6InMtYTdhODUzZjMtZGE1NS00MGU5LWE0OGEtZTVhNTcxN2U4Yjk4IiwidHlwIjoiSldUIn0.eyJuYmYiOjE2MzY1NzI1MDgsImV4cCI6MTYzNjU3NjEwOCwiaWF0IjoxNjM2NTcyNTA4LCJhdWQiOiJodHRwczovL3dlYnB1YnN1Yi15eWMud2VicHVic3ViLmF6dXJlLmNvbS9jbGllbnQvaHVicy9odWIifQ._o2GwCnKhYcU7XZ8DehcW2GAshDgXaCbJyx0kCzSOfo"}' + headers: + api-supported-versions: '2021-10-01' + connection: keep-alive + content-type: application/json; charset=utf-8 + date: Wed, 10 Nov 2021 19:28:28 GMT + strict-transport-security: max-age=15724800; includeSubDomains + transfer-encoding: chunked + vary: Accept-Encoding + status: + code: 200 + message: OK + url: https://webpubsub-yyc.webpubsub.azure.com/api/hubs/hub/:generateToken?minutesToExpire=60&api-version=2021-10-01 +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string.yaml new file mode 100644 index 000000000000..6a6dd3cb793d --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: Hello, World! + headers: + Accept: + - application/json, text/json + Content-Length: + - '13' + Content-Type: + - text/plain + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: '2021-10-01' + connection: keep-alive + content-length: '0' + date: Wed, 10 Nov 2021 19:28:28 GMT + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted + url: https://webpubsub-yyc.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string_binary.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string_binary.yaml new file mode 100644 index 000000000000..690e44297756 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string_binary.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: Hello, World! + headers: + Accept: + - application/json, text/json + Content-Length: + - '13' + Content-Type: + - application/octet-stream + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: '2021-10-01' + connection: keep-alive + content-length: '0' + date: Wed, 10 Nov 2021 19:28:28 GMT + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted + url: https://webpubsub-yyc.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string_json.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string_json.yaml new file mode 100644 index 000000000000..f0f36b315061 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_hello_world_with_connection_string_json.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"hello": "world!"}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '19' + Content-Type: + - application/json + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: '2021-10-01' + connection: keep-alive + content-length: '0' + date: Wed, 10 Nov 2021 19:28:28 GMT + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted + url: https://webpubsub-yyc.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_no_users_groups.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_no_users_groups.yaml new file mode 100644 index 000000000000..b6eab4f806e5 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_no_users_groups.yaml @@ -0,0 +1,50 @@ +interactions: +- request: + body: null + headers: + Accept: + - application/json, text/json + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: HEAD + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/users/fake%20user?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: '2021-10-01' + connection: keep-alive + content-length: '126' + content-type: application/json; charset=utf-8 + date: Wed, 10 Nov 2021 19:28:29 GMT + strict-transport-security: max-age=15724800; includeSubDomains + x-ms-error-code: Warning.User.NotExisted + status: + code: 404 + message: Not Found + url: https://webpubsub-yyc.webpubsub.azure.com/api/hubs/hub/users/fake%20user?api-version=2021-10-01 +- request: + body: null + headers: + Accept: + - application/json, text/json + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: HEAD + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/groups/fake%20group?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: '2021-10-01' + connection: keep-alive + content-length: '126' + content-type: application/json; charset=utf-8 + date: Wed, 10 Nov 2021 19:28:29 GMT + strict-transport-security: max-age=15724800; includeSubDomains + x-ms-error-code: Warning.Group.NotExisted + status: + code: 404 + message: Not Found + url: https://webpubsub-yyc.webpubsub.azure.com/api/hubs/hub/groups/fake%20group?api-version=2021-10-01 +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_webpubsub_send_to_all.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_webpubsub_send_to_all.yaml new file mode 100644 index 000000000000..b81946c44df0 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_webpubsub_send_to_all.yaml @@ -0,0 +1,28 @@ +interactions: +- request: + body: '{"hello": "test_webpubsub_send_to_all"}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '39' + Content-Type: + - application/json + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.9.5 (macOS-11.6-x86_64-i386-64bit) + method: POST + uri: https://myservice.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: '2021-10-01' + connection: keep-alive + content-length: '0' + date: Wed, 10 Nov 2021 19:28:29 GMT + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted + url: https://webpubsub-yyc.webpubsub.azure.com/api/hubs/hub/:send?api-version=2021-10-01 +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_webpubsub_send_to_all_apim_proxy.yaml b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_webpubsub_send_to_all_apim_proxy.yaml new file mode 100644 index 000000000000..d9eefa1e2bc7 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/recordings/test_smoke_async.test_webpubsub_send_to_all_apim_proxy.yaml @@ -0,0 +1,27 @@ +interactions: +- request: + body: '{"hello": "test_webpubsub_send_to_all_apim_proxy"}' + headers: + Accept: + - application/json, text/json + Content-Length: + - '50' + Content-Type: + - application/json + User-Agent: + - azsdk-python-messaging-webpubsubservice/1.0.0 Python/3.7.3 (Windows-10-10.0.19041-SP0) + method: POST + uri: https://myservice.azure-api.net/api/hubs/hub/:send?api-version=2021-10-01 + response: + body: + string: '' + headers: + api-supported-versions: '2021-10-01' + content-length: '0' + date: Wed, 10 Nov 2021 03:51:35 GMT + strict-transport-security: max-age=15724800; includeSubDomains + status: + code: 202 + message: Accepted + url: https://apimanagement-yyc.azure-api.net/api/hubs/hub/:send?api-version=2021-10-01 +version: 1 diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_jwt.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_jwt.py new file mode 100644 index 000000000000..7b53787b6551 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_jwt.py @@ -0,0 +1,113 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +import jwt +import pytest +from azure.messaging.webpubsubservice import WebPubSubServiceClient +from azure.core.credentials import AzureKeyCredential + +try: + from urlparse import urlparse +except ImportError: + from urllib.parse import urlparse + + +def _decode_token(client, token): + return jwt.decode( + token, + client._config.credential.key, + algorithms=["HS256"], + audience="{}/client/hubs/hub".format(client._config.endpoint) + ) + + +access_key = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGH" + +test_cases = [ + ("Endpoint=https://host;AccessKey={};Version=1.0;".format(access_key), "https://host"), + ("Endpoint=http://host;AccessKey={};Version=1.0;".format(access_key), "http://host"), + ("Endpoint=http://host;AccessKey={};Version=1.0;Port=8080;".format(access_key), "http://host:8080"), + ("AccessKey={};Endpoint=http://host;Version=1.0;".format(access_key), "http://host"), +] + +@pytest.mark.parametrize("connection_string,endpoint", test_cases) +def test_parse_connection_string(connection_string, endpoint): + client = WebPubSubServiceClient.from_connection_string(connection_string, "hub") + assert client._config.endpoint == endpoint + assert isinstance(client._config.credential, AzureKeyCredential) + assert client._config.credential.key == access_key + +test_cases = [ + (None, None), + ("ab", ["a"]), + ("ab", ["a", "a", "a"]), + ("ab", ["a", "b", "c"]), + ("ab", "") +] +@pytest.mark.parametrize("user_id,roles", test_cases) +def test_generate_uri_contains_expected_payloads_dto(user_id, roles): + client = WebPubSubServiceClient.from_connection_string( + "Endpoint=http://localhost;Port=8080;AccessKey={};Version=1.0;".format(access_key), + "hub" + ) + minutes_to_expire = 5 + token = client.get_client_access_token(user_id=user_id, roles=roles, minutes_to_expire=minutes_to_expire) + assert token + assert len(token) == 3 + assert set(token.keys()) == set(["baseUrl", "url", "token"]) + assert "access_token={}".format(token['token']) == urlparse(token["url"]).query + token = token['token'] + decoded_token = _decode_token(client, token) + assert decoded_token['aud'] == "{}/client/hubs/hub".format(client._config.endpoint) + + # default expire should be around 5 minutes + assert decoded_token['exp'] - decoded_token['iat'] >= minutes_to_expire * 60 - 5 + assert decoded_token['exp'] - decoded_token['iat'] <= minutes_to_expire * 60 + 5 + if user_id: + assert decoded_token['sub'] == user_id + else: + assert not decoded_token.get('sub') + + if roles: + assert decoded_token['role'] == roles + else: + assert not decoded_token.get('role') + +test_cases = [ + ("Endpoint=http://localhost;Port=8080;AccessKey={};Version=1.0;".format(access_key), "hub", "ws://localhost:8080/client/hubs/hub"), + ("Endpoint=https://a;AccessKey={};Version=1.0;".format(access_key), "hub", "wss://a/client/hubs/hub"), + ("Endpoint=http://a;AccessKey={};Version=1.0;".format(access_key), "hub", "ws://a/client/hubs/hub") +] +@pytest.mark.parametrize("connection_string,hub,expected_url", test_cases) +def test_generate_url_use_same_kid_with_same_key(connection_string, hub, expected_url): + client = WebPubSubServiceClient.from_connection_string(connection_string, hub) + url_1 = client.get_client_access_token()['url'] + url_2 = client.get_client_access_token()['url'] + + assert url_1.split("?")[0] == url_2.split("?")[0] == expected_url + + token_1 = urlparse(url_1).query[len("access_token="):] + token_2 = urlparse(url_2).query[len("access_token="):] + + decoded_token_1 = _decode_token(client, token_1) + decoded_token_2 = _decode_token(client, token_2) + + assert len(decoded_token_1) == len(decoded_token_2) == 3 + assert decoded_token_1['aud'] == decoded_token_2['aud'] == expected_url.replace('ws', 'http') + assert abs(decoded_token_1['iat'] - decoded_token_2['iat']) < 5 + assert abs(decoded_token_1['exp'] - decoded_token_2['exp']) < 5 + +test_cases = [ + ("Endpoint=http://localhost;Port=8080;AccessKey={};Version=1.0;".format(access_key)), + ("Endpoint=https://a;AccessKey={};Version=1.0;".format(access_key)), + ("Endpoint=http://a;AccessKey={};Version=1.0;".format(access_key)) +] +@pytest.mark.parametrize("connection_string", test_cases) +def test_pass_in_jwt_headers(connection_string): + client = WebPubSubServiceClient.from_connection_string(connection_string, "hub") + kid = '1234567890' + token = client.get_client_access_token(jwt_headers={"kid":kid })['token'] + assert jwt.get_unverified_header(token)['kid'] == kid diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_jwt_async.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_jwt_async.py new file mode 100644 index 000000000000..466be74b2898 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_jwt_async.py @@ -0,0 +1,115 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +import jwt +import pytest +from azure.messaging.webpubsubservice.aio import WebPubSubServiceClient +from azure.core.credentials import AzureKeyCredential + +try: + from urlparse import urlparse +except ImportError: + from urllib.parse import urlparse + + +def _decode_token(client, token): + return jwt.decode( + token, + client._config.credential.key, + algorithms=["HS256"], + audience=f"{client._config.endpoint}/client/hubs/hub" + ) + + +access_key = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789ABCDEFGH" + +test_cases = [ + (f"Endpoint=https://host;AccessKey={access_key};Version=1.0;", "https://host"), + (f"Endpoint=http://host;AccessKey={access_key};Version=1.0;", "http://host"), + (f"Endpoint=http://host;AccessKey={access_key};Version=1.0;Port=8080;", "http://host:8080"), + (f"AccessKey={access_key};Endpoint=http://host;Version=1.0;", "http://host"), +] + +@pytest.mark.parametrize("connection_string,endpoint", test_cases) +def test_parse_connection_string(connection_string, endpoint): + client = WebPubSubServiceClient.from_connection_string(connection_string, "hub") + assert client._config.endpoint == endpoint + assert isinstance(client._config.credential, AzureKeyCredential) + assert client._config.credential.key == access_key + +test_cases = [ + (None, None), + ("ab", ["a"]), + ("ab", ["a", "a", "a"]), + ("ab", ["a", "b", "c"]), + ("ab", "") +] +@pytest.mark.parametrize("user_id,roles", test_cases) +@pytest.mark.asyncio +async def test_generate_uri_contains_expected_payloads_dto(user_id, roles): + client = WebPubSubServiceClient.from_connection_string( + f"Endpoint=http://localhost;Port=8080;AccessKey={access_key};Version=1.0;", "hub" + ) + minutes_to_expire = 5 + token = await client.get_client_access_token(user_id=user_id, roles=roles, minutes_to_expire=minutes_to_expire) + assert token + assert len(token) == 3 + assert set(token.keys()) == set(["baseUrl", "url", "token"]) + assert f"access_token={token['token']}" == urlparse(token["url"]).query + token = token['token'] + decoded_token = _decode_token(client, token) + assert decoded_token['aud'] == f"{client._config.endpoint}/client/hubs/hub" + + # default expire should be around 5 minutes + assert decoded_token['exp'] - decoded_token['iat'] >= minutes_to_expire * 60 - 5 + assert decoded_token['exp'] - decoded_token['iat'] <= minutes_to_expire * 60 + 5 + if user_id: + assert decoded_token['sub'] == user_id + else: + assert not decoded_token.get('sub') + + if roles: + assert decoded_token['role'] == roles + else: + assert not decoded_token.get('role') + +test_cases = [ + ("Endpoint=http://localhost;Port=8080;AccessKey={};Version=1.0;".format(access_key), "hub", "ws://localhost:8080/client/hubs/hub"), + ("Endpoint=https://a;AccessKey={};Version=1.0;".format(access_key), "hub", "wss://a/client/hubs/hub"), + ("Endpoint=http://a;AccessKey={};Version=1.0;".format(access_key), "hub", "ws://a/client/hubs/hub") +] +@pytest.mark.parametrize("connection_string,hub,expected_url", test_cases) +@pytest.mark.asyncio +async def test_generate_url_use_same_kid_with_same_key(connection_string, hub, expected_url): + client = WebPubSubServiceClient.from_connection_string(connection_string, hub) + url_1 = (await client.get_client_access_token())['url'] + url_2 = (await client.get_client_access_token())['url'] + + assert url_1.split("?")[0] == url_2.split("?")[0] == expected_url + + token_1 = urlparse(url_1).query[len("access_token="):] + token_2 = urlparse(url_2).query[len("access_token="):] + + decoded_token_1 = _decode_token(client, token_1) + decoded_token_2 = _decode_token(client, token_2) + + assert len(decoded_token_1) == len(decoded_token_2) == 3 + assert decoded_token_1['aud'] == decoded_token_2['aud'] == expected_url.replace('ws', 'http') + assert abs(decoded_token_1['iat'] - decoded_token_2['iat']) < 5 + assert abs(decoded_token_1['exp'] - decoded_token_2['exp']) < 5 + +test_cases = [ + ("Endpoint=http://localhost;Port=8080;AccessKey={};Version=1.0;".format(access_key)), + ("Endpoint=https://a;AccessKey={};Version=1.0;".format(access_key)), + ("Endpoint=http://a;AccessKey={};Version=1.0;".format(access_key)) +] +@pytest.mark.parametrize("connection_string", test_cases) +@pytest.mark.asyncio +async def test_pass_in_jwt_headers(connection_string): + client = WebPubSubServiceClient.from_connection_string(connection_string, "hub") + kid = '1234567890' + token = (await client.get_client_access_token(jwt_headers={"kid":kid }))['token'] + assert jwt.get_unverified_header(token)['kid'] == kid diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_reverse_proxy.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_reverse_proxy.py new file mode 100644 index 000000000000..596f43244449 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_reverse_proxy.py @@ -0,0 +1,39 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +import pytest +from azure.messaging.webpubsubservice import WebPubSubServiceClient +from azure.messaging.webpubsubservice._operations._operations import build_send_to_all_request +from azure.core.credentials import AzureKeyCredential +from devtools_testutils.fake_credential import FakeTokenCredential + +def test_reverse_proxy_endpoint_redirection_azure_key_credential(): + def _callback(pipeline_request): + assert pipeline_request.http_request.url.startswith("https://apim.contoso.com/") + raise ValueError("Success!") + wps_endpoint = "https://wps.contoso.com/" + apim_endpoint = "https://apim.contoso.com/" + credential = AzureKeyCredential("abcdabcdabcdabcdabcdabcdabcdabcd") + client = WebPubSubServiceClient(wps_endpoint, "Hub", credential, reverse_proxy_endpoint=apim_endpoint) + request = build_send_to_all_request('Hub', content='test_webpubsub_send_request', content_type='text/plain') + + with pytest.raises(ValueError) as ex: + client.send_request(request, raw_request_hook=_callback) + assert "Success!" in str(ex.value) + +def test_reverse_proxy_endpoint_redirection_identity(): + def _callback(pipeline_request): + assert pipeline_request.http_request.url.startswith("https://apim.contoso.com/") + raise ValueError("Success!") + wps_endpoint = "https://wps.contoso.com/" + apim_endpoint = "https://apim.contoso.com/" + credential = FakeTokenCredential() + client = WebPubSubServiceClient(wps_endpoint, "Hub", credential, reverse_proxy_endpoint=apim_endpoint) + request = build_send_to_all_request('Hub', content='test_webpubsub_send_request', content_type='text/plain') + + with pytest.raises(ValueError) as ex: + client.send_request(request, raw_request_hook=_callback) + assert "Success!" in str(ex.value) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_reverse_proxy_async.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_reverse_proxy_async.py new file mode 100644 index 000000000000..3b4ba2df4a55 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_reverse_proxy_async.py @@ -0,0 +1,39 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +import pytest +from azure.messaging.webpubsubservice.aio import WebPubSubServiceClient +from azure.messaging.webpubsubservice._operations._operations import build_send_to_all_request +from azure.core.credentials import AzureKeyCredential +from devtools_testutils.fake_async_credential import AsyncFakeCredential + +@pytest.mark.asyncio +async def test_reverse_proxy_endpoint_redirection(): + def _callback(pipeline_request): + assert pipeline_request.http_request.url.startswith("https://apim.contoso.com/") + raise ValueError("Success!") + wps_endpoint = "https://wps.contoso.com/" + apim_endpoint = "https://apim.contoso.com/" + credential = AzureKeyCredential("abcdabcdabcdabcdabcdabcdabcdabcd") + request = build_send_to_all_request("Hub", content='test_webpubsub_send_request', content_type='text/plain') + async with WebPubSubServiceClient(wps_endpoint, "Hub", credential, reverse_proxy_endpoint=apim_endpoint) as client: + with pytest.raises(ValueError) as ex: + await client.send_request(request, raw_request_hook=_callback) + assert "Success!" in str(ex.value) + +@pytest.mark.asyncio +async def test_reverse_proxy_endpoint_redirection_identity(): + def _callback(pipeline_request): + assert pipeline_request.http_request.url.startswith("https://apim.contoso.com/") + raise ValueError("Success!") + wps_endpoint = "https://wps.contoso.com/" + apim_endpoint = "https://apim.contoso.com/" + credential = AsyncFakeCredential() + request = build_send_to_all_request('Hub', content='test_webpubsub_send_request', content_type='text/plain') + async with WebPubSubServiceClient(wps_endpoint, "Hub", credential, reverse_proxy_endpoint=apim_endpoint) as client: + with pytest.raises(ValueError) as ex: + await client.send_request(request, raw_request_hook=_callback) + assert "Success!" in str(ex.value) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_send_requests.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_send_requests.py deleted file mode 100644 index 4f402e2e719b..000000000000 --- a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_send_requests.py +++ /dev/null @@ -1,38 +0,0 @@ -import io - -from azure.messaging.webpubsubservice import WebPubSubServiceClient -from azure.messaging.webpubsubservice.rest import * - -from azure.core.credentials import AzureKeyCredential - -def test_build_text_request(): - request = build_send_to_all_request('hub', content='hello world', content_type='text/plain') - - assert request.headers['content-type'] == 'text/plain' - assert request.content == 'hello world' - -def test_build_json_request(): - client = WebPubSubServiceClient('https://www.microsoft.com/api', AzureKeyCredential('abcd')) - request = build_send_to_all_request('hub', json={'hello': 'world'}) - assert request.headers['content-type'] == 'application/json' - -def test_build_stream_request(): - stream = io.BytesIO(b'1234') - client = WebPubSubServiceClient('https://www.microsoft.com/api', AzureKeyCredential('abcd')) - request = build_send_to_all_request('hub', content=stream, content_type='application/octet-stream') - assert request.headers['content-type'] == 'application/octet-stream' - -def test_build_stream_json_request(): - stream = io.BytesIO(b'{ "hello": "web" }') - client = WebPubSubServiceClient('https://www.microsoft.com/api', AzureKeyCredential('abcd')) - request = build_send_to_all_request('hub', content=stream, content_type='application/octet-json') - assert request.headers['content-type'] == 'application/octet-json' - -def test_build_send_message_exclude(): - stream = io.BytesIO(b'{ "hello": "web" }') - client = WebPubSubServiceClient('https://www.microsoft.com/api', AzureKeyCredential('abcd')) - request = build_send_to_all_request('hub', content=stream, content_type='application/octet-json', excluded=['a', 'b', 'c']) - assert 'excluded=a&' in request.url - assert 'excluded=b&' in request.url - assert 'excluded=c' in request.url - assert 'excluded=d' not in request.url diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_smoke.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_smoke.py new file mode 100644 index 000000000000..abe212c03f88 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_smoke.py @@ -0,0 +1,68 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +import pytest +from requests.packages.urllib3.connection import connection +from testcase import WebpubsubTest, WebpubsubPowerShellPreparer +from azure.messaging.webpubsubservice._operations._operations import build_send_to_all_request +from azure.core.exceptions import ServiceRequestError + +class WebpubsubSmokeTest(WebpubsubTest): + + + @WebpubsubPowerShellPreparer() + def test_webpubsub_send_to_all(self, webpubsub_endpoint): + client = self.create_client(endpoint=webpubsub_endpoint, hub='hub') + client.send_to_all({'hello': 'test_webpubsub_send_to_all'}) + + @WebpubsubPowerShellPreparer() + def test_webpubsub_send_to_all_api_management_proxy(self, webpubsub_endpoint, webpubsub_reverse_proxy_endpoint=None): + client = self.create_client(endpoint=webpubsub_endpoint, hub='hub', reverse_proxy_endpoint=webpubsub_reverse_proxy_endpoint) + client.send_to_all({'hello': 'test_webpubsub_send_to_all_api_management_proxy'}) + + @WebpubsubPowerShellPreparer() + def test_webpubsub_send_request(self, webpubsub_endpoint): + client = self.create_client(endpoint=webpubsub_endpoint, hub='hub') + request = build_send_to_all_request('Hub', content='test_webpubsub_send_request', content_type='text/plain') + response = client.send_request(request) + assert response.status_code == 202 + + # If reverse_proxy_endpoint is not available, `ServiceRequestError` will be raised + @WebpubsubPowerShellPreparer() + def test_webpubsub_send_to_all_api_management_proxy_counter_test(self, webpubsub_endpoint): + client = self.create_client(endpoint=webpubsub_endpoint, hub='hub', reverse_proxy_endpoint='https://example.azure-api.net') + with pytest.raises(ServiceRequestError): + client.send_to_all({'hello': 'test_webpubsub_send_to_all_api_management_proxy_counter_test'}) + + @WebpubsubPowerShellPreparer() + def test_get_client_access_token(self, webpubsub_endpoint): + client = self.create_client(endpoint=webpubsub_endpoint, hub='hub') + access_token = client.get_client_access_token() + assert len(access_token) == 3 + assert access_token['baseUrl'][:3] == "wss" + assert access_token['token'] + assert access_token['url'][:3] == "wss" + + @WebpubsubPowerShellPreparer() + def test_hello_world_with_connection_string(self, webpubsub_connection_string): + client = self.create_client(connection_string=webpubsub_connection_string, hub="hub") + client.send_to_all(message="Hello, World!", content_type="text/plain") + + @WebpubsubPowerShellPreparer() + def test_hello_world_with_connection_string_json(self, webpubsub_connection_string): + client = self.create_client(connection_string=webpubsub_connection_string, hub="hub") + client.send_to_all(message={"hello": "world!"}) + + @WebpubsubPowerShellPreparer() + def test_hello_world_with_connection_string_binary(self, webpubsub_connection_string): + client = self.create_client(connection_string=webpubsub_connection_string, hub="hub") + client.send_to_all(message=b"Hello, World!", content_type="application/octet-stream") + + @WebpubsubPowerShellPreparer() + def test_no_users_groups(self, webpubsub_connection_string): + client = self.create_client(connection_string=webpubsub_connection_string, hub="hub") + assert not client.user_exists(user_id="fake user") + assert not client.group_exists(group="fake group") diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_smoke_async.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_smoke_async.py new file mode 100644 index 000000000000..139f48cbe1d9 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/test_smoke_async.py @@ -0,0 +1,51 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# ------------------------------------------------------------------------- +from testcase import WebpubsubPowerShellPreparer +from testcase_async import WebpubsubAsyncTest + + +class WebpubsubSmokeAsyncTest(WebpubsubAsyncTest): + + @WebpubsubPowerShellPreparer() + async def test_webpubsub_send_to_all(self, webpubsub_endpoint): + client = self.create_client(endpoint=webpubsub_endpoint, hub='hub') + await client.send_to_all({'hello': 'test_webpubsub_send_to_all'}) + + @WebpubsubPowerShellPreparer() + async def test_webpubsub_send_to_all_apim_proxy(self, webpubsub_endpoint, webpubsub_reverse_proxy_endpoint=None): + client = self.create_client(endpoint=webpubsub_endpoint, hub='hub', reverse_proxy_endpoint=webpubsub_reverse_proxy_endpoint) + await client.send_to_all({'hello': 'test_webpubsub_send_to_all_apim_proxy'}) + + @WebpubsubPowerShellPreparer() + async def test_get_client_access_token(self, webpubsub_endpoint): + client = self.create_client(endpoint=webpubsub_endpoint, hub='hub') + access_token = await client.get_client_access_token() + assert len(access_token) == 3 + assert access_token['baseUrl'][:3] == "wss" + assert access_token['token'] + assert access_token['url'][:3] == "wss" + + @WebpubsubPowerShellPreparer() + async def test_hello_world_with_connection_string(self, webpubsub_connection_string): + client = self.create_client(connection_string=webpubsub_connection_string, hub="hub") + await client.send_to_all(message="Hello, World!", content_type="text/plain") + + @WebpubsubPowerShellPreparer() + async def test_hello_world_with_connection_string_json(self, webpubsub_connection_string): + client = self.create_client(connection_string=webpubsub_connection_string, hub="hub") + await client.send_to_all(message={"hello": "world!"}) + + @WebpubsubPowerShellPreparer() + async def test_hello_world_with_connection_string_binary(self, webpubsub_connection_string): + client = self.create_client(connection_string=webpubsub_connection_string, hub="hub") + await client.send_to_all(message=b"Hello, World!", content_type="application/octet-stream") + + @WebpubsubPowerShellPreparer() + async def test_no_users_groups(self, webpubsub_connection_string): + client = self.create_client(connection_string=webpubsub_connection_string, hub="hub") + assert not await client.user_exists(user_id="fake user") + assert not await client.group_exists(group="fake group") diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/testcase.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/testcase.py new file mode 100644 index 000000000000..3acc53983e83 --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/testcase.py @@ -0,0 +1,35 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import functools +from devtools_testutils import AzureTestCase, PowerShellPreparer +from azure.messaging.webpubsubservice import WebPubSubServiceClient + + +class WebpubsubTest(AzureTestCase): + def __init__(self, method_name, **kwargs): + super(WebpubsubTest, self).__init__(method_name, **kwargs) + + def create_client(self, endpoint=None, hub=None, reverse_proxy_endpoint=None, **kwargs): + if kwargs.get("connection_string"): + return WebPubSubServiceClient.from_connection_string(kwargs.pop("connection_string"), hub) + credential = self.get_credential(WebPubSubServiceClient) + return self.create_client_from_credential( + WebPubSubServiceClient, + credential=credential, + endpoint=endpoint, + hub=hub, + reverse_proxy_endpoint=reverse_proxy_endpoint + ) + + +WebpubsubPowerShellPreparer = functools.partial( + PowerShellPreparer, + "webpubsub", + webpubsub_endpoint="https://myservice.webpubsub.azure.com", + webpubsub_reverse_proxy_endpoint="https://myservice.azure-api.net", + webpubsub_connection_string="Endpoint=https://myservice.webpubsub.azure.com;AccessKey=aaaaaaaaaaaaa;Version=1.0;" +) diff --git a/sdk/webpubsub/azure-messaging-webpubsubservice/tests/testcase_async.py b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/testcase_async.py new file mode 100644 index 000000000000..7cf49c357c7d --- /dev/null +++ b/sdk/webpubsub/azure-messaging-webpubsubservice/tests/testcase_async.py @@ -0,0 +1,25 @@ +# coding: utf-8 +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +from devtools_testutils import AzureTestCase +from azure.messaging.webpubsubservice.aio import WebPubSubServiceClient + + +class WebpubsubAsyncTest(AzureTestCase): + def __init__(self, method_name, **kwargs): + super(WebpubsubAsyncTest, self).__init__(method_name, **kwargs) + + def create_client(self, endpoint=None, hub=None, reverse_proxy_endpoint=None, **kwargs): + if kwargs.get("connection_string"): + return WebPubSubServiceClient.from_connection_string(kwargs.pop("connection_string"), hub) + credential = self.get_credential(WebPubSubServiceClient, is_async=True) + return self.create_client_from_credential( + WebPubSubServiceClient, + credential=credential, + endpoint=endpoint, + hub=hub, + reverse_proxy_endpoint=reverse_proxy_endpoint + ) diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/CHANGELOG.md b/sdk/webpubsub/azure-mgmt-webpubsub/CHANGELOG.md index a9d85c58a10d..59f423efac96 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/CHANGELOG.md +++ b/sdk/webpubsub/azure-mgmt-webpubsub/CHANGELOG.md @@ -1,5 +1,23 @@ # Release History +## 1.0.0 (2021-10-11) + +**Features** + + - Model PrivateEndpointConnection has a new parameter group_ids + - Model WebPubSubResource has a new parameter host_name_prefix + - Model WebPubSubResource has a new parameter disable_local_auth + - Model WebPubSubResource has a new parameter resource_log_configuration + - Model WebPubSubResource has a new parameter live_trace_configuration + - Model WebPubSubResource has a new parameter disable_aad_auth + - Added operation WebPubSubOperations.list_skus + - Added operation group WebPubSubHubsOperations + +**Breaking changes** + + - Model WebPubSubResource no longer has parameter features + - Model WebPubSubResource no longer has parameter event_handler + ## 1.0.0b1 (2021-04-16) * Initial Release diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/_meta.json b/sdk/webpubsub/azure-mgmt-webpubsub/_meta.json index cedc06806454..9d70c84fc90a 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/_meta.json +++ b/sdk/webpubsub/azure-mgmt-webpubsub/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.3.0", - "use": "@autorest/python@5.6.6", - "commit": "a4f67651dcaef459afabb647a05a45a5fbb72ffe", + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "f6de239922d6b23e97750ca3f508ac55c1d2f235", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/webpubsub/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.6 --version=3.3.0", + "autorest_command": "autorest specification/webpubsub/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", "readme": "specification/webpubsub/resource-manager/readme.md" } \ No newline at end of file diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_configuration.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_configuration.py index 179c5575f107..d649cad096a9 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_configuration.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-04-01-preview" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-webpubsub/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_metadata.json b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_metadata.json index ddf514dc80da..10de52fcd1df 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_metadata.json +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_metadata.json @@ -1,6 +1,6 @@ { - "chosen_version": "2021-04-01-preview", - "total_api_version_list": ["2021-04-01-preview"], + "chosen_version": "2021-10-01", + "total_api_version_list": ["2021-10-01"], "client": { "name": "WebPubSubManagementClient", "filename": "_web_pub_sub_management_client", @@ -101,6 +101,7 @@ "operations": "Operations", "web_pub_sub": "WebPubSubOperations", "usages": "UsagesOperations", + "web_pub_sub_hubs": "WebPubSubHubsOperations", "web_pub_sub_private_endpoint_connections": "WebPubSubPrivateEndpointConnectionsOperations", "web_pub_sub_private_link_resources": "WebPubSubPrivateLinkResourcesOperations", "web_pub_sub_shared_private_link_resources": "WebPubSubSharedPrivateLinkResourcesOperations" diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_version.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_version.py index e5754a47ce68..c47f66669f1b 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_version.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.0b1" +VERSION = "1.0.0" diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_web_pub_sub_management_client.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_web_pub_sub_management_client.py index 894aa8967eff..3bf621bf3149 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_web_pub_sub_management_client.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/_web_pub_sub_management_client.py @@ -22,6 +22,7 @@ from .operations import Operations from .operations import WebPubSubOperations from .operations import UsagesOperations +from .operations import WebPubSubHubsOperations from .operations import WebPubSubPrivateEndpointConnectionsOperations from .operations import WebPubSubPrivateLinkResourcesOperations from .operations import WebPubSubSharedPrivateLinkResourcesOperations @@ -37,6 +38,8 @@ class WebPubSubManagementClient(object): :vartype web_pub_sub: azure.mgmt.webpubsub.operations.WebPubSubOperations :ivar usages: UsagesOperations operations :vartype usages: azure.mgmt.webpubsub.operations.UsagesOperations + :ivar web_pub_sub_hubs: WebPubSubHubsOperations operations + :vartype web_pub_sub_hubs: azure.mgmt.webpubsub.operations.WebPubSubHubsOperations :ivar web_pub_sub_private_endpoint_connections: WebPubSubPrivateEndpointConnectionsOperations operations :vartype web_pub_sub_private_endpoint_connections: azure.mgmt.webpubsub.operations.WebPubSubPrivateEndpointConnectionsOperations :ivar web_pub_sub_private_link_resources: WebPubSubPrivateLinkResourcesOperations operations @@ -75,6 +78,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.usages = UsagesOperations( self._client, self._config, self._serialize, self._deserialize) + self.web_pub_sub_hubs = WebPubSubHubsOperations( + self._client, self._config, self._serialize, self._deserialize) self.web_pub_sub_private_endpoint_connections = WebPubSubPrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.web_pub_sub_private_link_resources = WebPubSubPrivateLinkResourcesOperations( diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_configuration.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_configuration.py index 1d8e95d4b445..dddb1c70eabc 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_configuration.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2021-04-01-preview" + self.api_version = "2021-10-01" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-webpubsub/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_web_pub_sub_management_client.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_web_pub_sub_management_client.py index 0d118d849291..e303dd3ca7cc 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_web_pub_sub_management_client.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/_web_pub_sub_management_client.py @@ -20,6 +20,7 @@ from .operations import Operations from .operations import WebPubSubOperations from .operations import UsagesOperations +from .operations import WebPubSubHubsOperations from .operations import WebPubSubPrivateEndpointConnectionsOperations from .operations import WebPubSubPrivateLinkResourcesOperations from .operations import WebPubSubSharedPrivateLinkResourcesOperations @@ -35,6 +36,8 @@ class WebPubSubManagementClient(object): :vartype web_pub_sub: azure.mgmt.webpubsub.aio.operations.WebPubSubOperations :ivar usages: UsagesOperations operations :vartype usages: azure.mgmt.webpubsub.aio.operations.UsagesOperations + :ivar web_pub_sub_hubs: WebPubSubHubsOperations operations + :vartype web_pub_sub_hubs: azure.mgmt.webpubsub.aio.operations.WebPubSubHubsOperations :ivar web_pub_sub_private_endpoint_connections: WebPubSubPrivateEndpointConnectionsOperations operations :vartype web_pub_sub_private_endpoint_connections: azure.mgmt.webpubsub.aio.operations.WebPubSubPrivateEndpointConnectionsOperations :ivar web_pub_sub_private_link_resources: WebPubSubPrivateLinkResourcesOperations operations @@ -72,6 +75,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.usages = UsagesOperations( self._client, self._config, self._serialize, self._deserialize) + self.web_pub_sub_hubs = WebPubSubHubsOperations( + self._client, self._config, self._serialize, self._deserialize) self.web_pub_sub_private_endpoint_connections = WebPubSubPrivateEndpointConnectionsOperations( self._client, self._config, self._serialize, self._deserialize) self.web_pub_sub_private_link_resources = WebPubSubPrivateLinkResourcesOperations( diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/__init__.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/__init__.py index adcd49212f72..595107f95576 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/__init__.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/__init__.py @@ -9,6 +9,7 @@ from ._operations import Operations from ._web_pub_sub_operations import WebPubSubOperations from ._usages_operations import UsagesOperations +from ._web_pub_sub_hubs_operations import WebPubSubHubsOperations from ._web_pub_sub_private_endpoint_connections_operations import WebPubSubPrivateEndpointConnectionsOperations from ._web_pub_sub_private_link_resources_operations import WebPubSubPrivateLinkResourcesOperations from ._web_pub_sub_shared_private_link_resources_operations import WebPubSubSharedPrivateLinkResourcesOperations @@ -17,6 +18,7 @@ 'Operations', 'WebPubSubOperations', 'UsagesOperations', + 'WebPubSubHubsOperations', 'WebPubSubPrivateEndpointConnectionsOperations', 'WebPubSubPrivateLinkResourcesOperations', 'WebPubSubSharedPrivateLinkResourcesOperations', diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_operations.py index f80f89b348cc..c5ce47e6815f 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationList"]: """Lists all of the available REST API operations of the Microsoft.SignalRService provider. @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_usages_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_usages_operations.py index ff20eed613dd..44e0da7c1aa6 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_usages_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_usages_operations.py @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, location: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SignalRServiceUsageList"]: """List resource usage quotas by location. @@ -60,7 +60,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_hubs_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_hubs_operations.py new file mode 100644 index 000000000000..515e4ef793df --- /dev/null +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_hubs_operations.py @@ -0,0 +1,438 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class WebPubSubHubsOperations: + """WebPubSubHubsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.webpubsub.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.WebPubSubHubList"]: + """List hub settings. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebPubSubHubList or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.webpubsub.models.WebPubSubHubList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebPubSubHubList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('WebPubSubHubList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs'} # type: ignore + + async def get( + self, + hub_name: str, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.WebPubSubHub": + """Get a hub setting. + + :param hub_name: The hub name. + :type hub_name: str + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: WebPubSubHub, or the result of cls(response) + :rtype: ~azure.mgmt.webpubsub.models.WebPubSubHub + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebPubSubHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self.get.metadata['url'] # type: ignore + path_format_arguments = { + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('WebPubSubHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore + + async def _create_or_update_initial( + self, + hub_name: str, + resource_group_name: str, + resource_name: str, + parameters: "_models.WebPubSubHub", + **kwargs: Any + ) -> "_models.WebPubSubHub": + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebPubSubHub"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._create_or_update_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'WebPubSubHub') + body_content_kwargs['content'] = body_content + request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 201]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if response.status_code == 200: + deserialized = self._deserialize('WebPubSubHub', pipeline_response) + + if response.status_code == 201: + deserialized = self._deserialize('WebPubSubHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore + + async def begin_create_or_update( + self, + hub_name: str, + resource_group_name: str, + resource_name: str, + parameters: "_models.WebPubSubHub", + **kwargs: Any + ) -> AsyncLROPoller["_models.WebPubSubHub"]: + """Create or update a hub setting. + + :param hub_name: The hub name. + :type hub_name: str + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :param parameters: The resource of WebPubSubHub and its properties. + :type parameters: ~azure.mgmt.webpubsub.models.WebPubSubHub + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either WebPubSubHub or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.webpubsub.models.WebPubSubHub] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebPubSubHub"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._create_or_update_initial( + hub_name=hub_name, + resource_group_name=resource_group_name, + resource_name=resource_name, + parameters=parameters, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('WebPubSubHub', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore + + async def _delete_initial( + self, + hub_name: str, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> None: + cls = kwargs.pop('cls', None) # type: ClsType[None] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + if cls: + return cls(pipeline_response, None, {}) + + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore + + async def begin_delete( + self, + hub_name: str, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> AsyncLROPoller[None]: + """Delete a hub setting. + + :param hub_name: The hub name. + :type hub_name: str + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._delete_initial( + hub_name=hub_name, + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_operations.py index 6baefcc1c96c..7d02073a2d8e 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_operations.py @@ -47,7 +47,7 @@ async def check_name_availability( self, location: str, parameters: "_models.NameAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.NameAvailability": """Checks that the resource name is valid and is not already in use. @@ -65,7 +65,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -108,7 +108,7 @@ async def check_name_availability( def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WebPubSubResourceList"]: """Handles requests to list all resources in a subscription. @@ -122,7 +122,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -176,7 +176,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.WebPubSubResourceList"]: """Handles requests to list all resources in a resource group. @@ -193,7 +193,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -249,7 +249,7 @@ async def get( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.WebPubSubResource": """Get the resource and its properties. @@ -268,7 +268,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -310,14 +310,14 @@ async def _create_or_update_initial( resource_group_name: str, resource_name: str, parameters: "_models.WebPubSubResource", - **kwargs + **kwargs: Any ) -> Optional["_models.WebPubSubResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WebPubSubResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -369,7 +369,7 @@ async def begin_create_or_update( resource_group_name: str, resource_name: str, parameters: "_models.WebPubSubResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WebPubSubResource"]: """Create or update a resource. @@ -382,8 +382,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.webpubsub.models.WebPubSubResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WebPubSubResource or the result of cls(response) @@ -440,14 +440,14 @@ async def _delete_initial( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -485,7 +485,7 @@ async def begin_delete( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Operation to delete a resource. @@ -496,8 +496,8 @@ async def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -551,14 +551,14 @@ async def _update_initial( resource_group_name: str, resource_name: str, parameters: "_models.WebPubSubResource", - **kwargs + **kwargs: Any ) -> Optional["_models.WebPubSubResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.WebPubSubResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -607,7 +607,7 @@ async def begin_update( resource_group_name: str, resource_name: str, parameters: "_models.WebPubSubResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WebPubSubResource"]: """Operation to update an exiting resource. @@ -620,8 +620,8 @@ async def begin_update( :type parameters: ~azure.mgmt.webpubsub.models.WebPubSubResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WebPubSubResource or the result of cls(response) @@ -678,7 +678,7 @@ async def list_keys( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.WebPubSubKeys": """Get the access keys of the resource. @@ -697,7 +697,7 @@ async def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -739,14 +739,14 @@ async def _regenerate_key_initial( resource_group_name: str, resource_name: str, parameters: "_models.RegenerateKeyParameters", - **kwargs + **kwargs: Any ) -> "_models.WebPubSubKeys": cls = kwargs.pop('cls', None) # type: ClsType["_models.WebPubSubKeys"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -793,7 +793,7 @@ async def begin_regenerate_key( resource_group_name: str, resource_name: str, parameters: "_models.RegenerateKeyParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.WebPubSubKeys"]: """Regenerate the access key for the resource. PrimaryKey and SecondaryKey cannot be regenerated at the same time. @@ -807,8 +807,8 @@ async def begin_regenerate_key( :type parameters: ~azure.mgmt.webpubsub.models.RegenerateKeyParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either WebPubSubKeys or the result of cls(response) @@ -865,14 +865,14 @@ async def _restart_initial( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -910,7 +910,7 @@ async def begin_restart( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Operation to restart a resource. @@ -921,8 +921,8 @@ async def begin_restart( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -970,3 +970,63 @@ def get_long_running_output(pipeline_response): else: return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart'} # type: ignore + + async def list_skus( + self, + resource_group_name: str, + resource_name: str, + **kwargs: Any + ) -> "_models.SkuList": + """List all available skus of the resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuList, or the result of cls(response) + :rtype: ~azure.mgmt.webpubsub.models.SkuList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SkuList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/skus'} # type: ignore diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_private_endpoint_connections_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_private_endpoint_connections_operations.py index 001f9cd692da..63f60dda479c 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_private_endpoint_connections_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_private_endpoint_connections_operations.py @@ -47,7 +47,7 @@ def list( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateEndpointConnectionList"]: """List private endpoint connections. @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -124,7 +124,7 @@ async def get( private_endpoint_connection_name: str, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Get the specified private endpoint connection. @@ -145,7 +145,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -189,7 +189,7 @@ async def update( resource_group_name: str, resource_name: str, parameters: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Update the state of specified private endpoint connection. @@ -212,7 +212,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -260,14 +260,14 @@ async def _delete_initial( private_endpoint_connection_name: str, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -307,7 +307,7 @@ async def begin_delete( private_endpoint_connection_name: str, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete the specified private endpoint connection. @@ -320,8 +320,8 @@ async def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_private_link_resources_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_private_link_resources_operations.py index e2355dbd1922..605739884249 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_private_link_resources_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_private_link_resources_operations.py @@ -45,7 +45,7 @@ def list( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateLinkResourceList"]: """Get the private link resources that need to be created for a resource. @@ -64,7 +64,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_shared_private_link_resources_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_shared_private_link_resources_operations.py index f1e47adef675..6329ad2173ff 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_shared_private_link_resources_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/aio/operations/_web_pub_sub_shared_private_link_resources_operations.py @@ -47,7 +47,7 @@ def list( self, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SharedPrivateLinkResourceList"]: """List shared private link resources. @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -124,7 +124,7 @@ async def get( shared_private_link_resource_name: str, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> "_models.SharedPrivateLinkResource": """Get the specified shared private link resource. @@ -145,7 +145,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -189,14 +189,14 @@ async def _create_or_update_initial( resource_group_name: str, resource_name: str, parameters: "_models.SharedPrivateLinkResource", - **kwargs + **kwargs: Any ) -> "_models.SharedPrivateLinkResource": cls = kwargs.pop('cls', None) # type: ClsType["_models.SharedPrivateLinkResource"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -249,7 +249,7 @@ async def begin_create_or_update( resource_group_name: str, resource_name: str, parameters: "_models.SharedPrivateLinkResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.SharedPrivateLinkResource"]: """Create or update a shared private link resource. @@ -264,8 +264,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.webpubsub.models.SharedPrivateLinkResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SharedPrivateLinkResource or the result of cls(response) @@ -325,14 +325,14 @@ async def _delete_initial( shared_private_link_resource_name: str, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -372,7 +372,7 @@ async def begin_delete( shared_private_link_resource_name: str, resource_group_name: str, resource_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Delete the specified shared private link resource. @@ -385,8 +385,8 @@ async def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/__init__.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/__init__.py index 3ce5731380a1..5ee551146124 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/__init__.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/__init__.py @@ -11,8 +11,9 @@ from ._models_py3 import ErrorAdditionalInfo from ._models_py3 import ErrorDetail from ._models_py3 import ErrorResponse - from ._models_py3 import EventHandlerSettings - from ._models_py3 import EventHandlerTemplate + from ._models_py3 import EventHandler + from ._models_py3 import LiveTraceCategory + from ._models_py3 import LiveTraceConfiguration from ._models_py3 import LogSpecification from ._models_py3 import ManagedIdentity from ._models_py3 import ManagedIdentitySettings @@ -34,6 +35,8 @@ from ._models_py3 import ProxyResource from ._models_py3 import RegenerateKeyParameters from ._models_py3 import Resource + from ._models_py3 import ResourceLogCategory + from ._models_py3 import ResourceLogConfiguration from ._models_py3 import ResourceSku from ._models_py3 import ServiceSpecification from ._models_py3 import ShareablePrivateLinkResourceProperties @@ -43,11 +46,16 @@ from ._models_py3 import SignalRServiceUsage from ._models_py3 import SignalRServiceUsageList from ._models_py3 import SignalRServiceUsageName + from ._models_py3 import Sku + from ._models_py3 import SkuCapacity + from ._models_py3 import SkuList from ._models_py3 import SystemData from ._models_py3 import TrackedResource from ._models_py3 import UpstreamAuthSettings from ._models_py3 import UserAssignedIdentityProperty - from ._models_py3 import WebPubSubFeature + from ._models_py3 import WebPubSubHub + from ._models_py3 import WebPubSubHubList + from ._models_py3 import WebPubSubHubProperties from ._models_py3 import WebPubSubKeys from ._models_py3 import WebPubSubNetworkACLs from ._models_py3 import WebPubSubResource @@ -58,8 +66,9 @@ from ._models import ErrorAdditionalInfo # type: ignore from ._models import ErrorDetail # type: ignore from ._models import ErrorResponse # type: ignore - from ._models import EventHandlerSettings # type: ignore - from ._models import EventHandlerTemplate # type: ignore + from ._models import EventHandler # type: ignore + from ._models import LiveTraceCategory # type: ignore + from ._models import LiveTraceConfiguration # type: ignore from ._models import LogSpecification # type: ignore from ._models import ManagedIdentity # type: ignore from ._models import ManagedIdentitySettings # type: ignore @@ -81,6 +90,8 @@ from ._models import ProxyResource # type: ignore from ._models import RegenerateKeyParameters # type: ignore from ._models import Resource # type: ignore + from ._models import ResourceLogCategory # type: ignore + from ._models import ResourceLogConfiguration # type: ignore from ._models import ResourceSku # type: ignore from ._models import ServiceSpecification # type: ignore from ._models import ShareablePrivateLinkResourceProperties # type: ignore @@ -90,11 +101,16 @@ from ._models import SignalRServiceUsage # type: ignore from ._models import SignalRServiceUsageList # type: ignore from ._models import SignalRServiceUsageName # type: ignore + from ._models import Sku # type: ignore + from ._models import SkuCapacity # type: ignore + from ._models import SkuList # type: ignore from ._models import SystemData # type: ignore from ._models import TrackedResource # type: ignore from ._models import UpstreamAuthSettings # type: ignore from ._models import UserAssignedIdentityProperty # type: ignore - from ._models import WebPubSubFeature # type: ignore + from ._models import WebPubSubHub # type: ignore + from ._models import WebPubSubHubList # type: ignore + from ._models import WebPubSubHubProperties # type: ignore from ._models import WebPubSubKeys # type: ignore from ._models import WebPubSubNetworkACLs # type: ignore from ._models import WebPubSubResource # type: ignore @@ -104,11 +120,11 @@ from ._web_pub_sub_management_client_enums import ( ACLAction, CreatedByType, - FeatureFlags, KeyType, ManagedIdentityType, PrivateLinkServiceConnectionStatus, ProvisioningState, + ScaleType, SharedPrivateLinkResourceStatus, UpstreamAuthType, WebPubSubRequestType, @@ -120,8 +136,9 @@ 'ErrorAdditionalInfo', 'ErrorDetail', 'ErrorResponse', - 'EventHandlerSettings', - 'EventHandlerTemplate', + 'EventHandler', + 'LiveTraceCategory', + 'LiveTraceConfiguration', 'LogSpecification', 'ManagedIdentity', 'ManagedIdentitySettings', @@ -143,6 +160,8 @@ 'ProxyResource', 'RegenerateKeyParameters', 'Resource', + 'ResourceLogCategory', + 'ResourceLogConfiguration', 'ResourceSku', 'ServiceSpecification', 'ShareablePrivateLinkResourceProperties', @@ -152,11 +171,16 @@ 'SignalRServiceUsage', 'SignalRServiceUsageList', 'SignalRServiceUsageName', + 'Sku', + 'SkuCapacity', + 'SkuList', 'SystemData', 'TrackedResource', 'UpstreamAuthSettings', 'UserAssignedIdentityProperty', - 'WebPubSubFeature', + 'WebPubSubHub', + 'WebPubSubHubList', + 'WebPubSubHubProperties', 'WebPubSubKeys', 'WebPubSubNetworkACLs', 'WebPubSubResource', @@ -164,11 +188,11 @@ 'WebPubSubTlsSettings', 'ACLAction', 'CreatedByType', - 'FeatureFlags', 'KeyType', 'ManagedIdentityType', 'PrivateLinkServiceConnectionStatus', 'ProvisioningState', + 'ScaleType', 'SharedPrivateLinkResourceStatus', 'UpstreamAuthType', 'WebPubSubRequestType', diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_models.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_models.py index ea0fcacc179a..94b32a08f4b2 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_models.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_models.py @@ -50,7 +50,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -136,28 +136,8 @@ def __init__( self.error = kwargs.get('error', None) -class EventHandlerSettings(msrest.serialization.Model): - """The settings for event handler in webpubsub service. - - :param items: Get or set the EventHandler items. The key is the hub name and the value is the - corresponding EventHandlerTemplate. - :type items: dict[str, list[~azure.mgmt.webpubsub.models.EventHandlerTemplate]] - """ - - _attribute_map = { - 'items': {'key': 'items', 'type': '{[EventHandlerTemplate]}'}, - } - - def __init__( - self, - **kwargs - ): - super(EventHandlerSettings, self).__init__(**kwargs) - self.items = kwargs.get('items', None) - - -class EventHandlerTemplate(msrest.serialization.Model): - """EventHandler template item settings. +class EventHandler(msrest.serialization.Model): + """Properties of event handler. All required parameters must be populated in order to send to Azure. @@ -177,15 +157,8 @@ class EventHandlerTemplate(msrest.serialization.Model): and "event2" 3. The single event name, for example, "event1", it matches "event1". :type user_event_pattern: str - :param system_event_pattern: Gets ot sets the system event pattern. - There are 2 kind of patterns supported: - - .. code-block:: - - 1. The single event name, for example, "connect", it matches "connect" - 2. Combine multiple events with ",", for example "connect,disconnected", it matches event - "connect" and "disconnected". - :type system_event_pattern: str + :param system_events: Gets ot sets the list of system events. + :type system_events: list[str] :param auth: Gets or sets the auth settings for an event handler. If not set, no auth is used. :type auth: ~azure.mgmt.webpubsub.models.UpstreamAuthSettings """ @@ -197,7 +170,7 @@ class EventHandlerTemplate(msrest.serialization.Model): _attribute_map = { 'url_template': {'key': 'urlTemplate', 'type': 'str'}, 'user_event_pattern': {'key': 'userEventPattern', 'type': 'str'}, - 'system_event_pattern': {'key': 'systemEventPattern', 'type': 'str'}, + 'system_events': {'key': 'systemEvents', 'type': '[str]'}, 'auth': {'key': 'auth', 'type': 'UpstreamAuthSettings'}, } @@ -205,13 +178,68 @@ def __init__( self, **kwargs ): - super(EventHandlerTemplate, self).__init__(**kwargs) + super(EventHandler, self).__init__(**kwargs) self.url_template = kwargs['url_template'] self.user_event_pattern = kwargs.get('user_event_pattern', None) - self.system_event_pattern = kwargs.get('system_event_pattern', None) + self.system_events = kwargs.get('system_events', None) self.auth = kwargs.get('auth', None) +class LiveTraceCategory(msrest.serialization.Model): + """Live trace category configuration of a Microsoft.SignalRService resource. + + :param name: Gets or sets the live trace category's name. + Available values: ConnectivityLogs, MessagingLogs. + Case insensitive. + :type name: str + :param enabled: Indicates whether or the live trace category is enabled. + Available values: true, false. + Case insensitive. + :type enabled: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(LiveTraceCategory, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.enabled = kwargs.get('enabled', None) + + +class LiveTraceConfiguration(msrest.serialization.Model): + """Live trace configuration of a Microsoft.SignalRService resource. + + :param enabled: Indicates whether or not enable live trace. + When it's set to true, live trace client can connect to the service. + Otherwise, live trace client can't connect to the service, so that you are unable to receive + any log, no matter what you configure in "categories". + Available values: true, false. + Case insensitive. + :type enabled: str + :param categories: Gets or sets the list of category configurations. + :type categories: list[~azure.mgmt.webpubsub.models.LiveTraceCategory] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'categories': {'key': 'categories', 'type': '[LiveTraceCategory]'}, + } + + def __init__( + self, + **kwargs + ): + super(LiveTraceConfiguration, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', "false") + self.categories = kwargs.get('categories', None) + + class LogSpecification(msrest.serialization.Model): """Specifications of the Logs for Azure Monitoring. @@ -683,6 +711,8 @@ class PrivateEndpointConnection(ProxyResource): :vartype provisioning_state: str or ~azure.mgmt.webpubsub.models.ProvisioningState :param private_endpoint: Private endpoint associated with the private endpoint connection. :type private_endpoint: ~azure.mgmt.webpubsub.models.PrivateEndpoint + :ivar group_ids: Group IDs. + :vartype group_ids: list[str] :param private_link_service_connection_state: Connection state. :type private_link_service_connection_state: ~azure.mgmt.webpubsub.models.PrivateLinkServiceConnectionState @@ -694,6 +724,7 @@ class PrivateEndpointConnection(ProxyResource): 'type': {'readonly': True}, 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'group_ids': {'readonly': True}, } _attribute_map = { @@ -703,6 +734,7 @@ class PrivateEndpointConnection(ProxyResource): 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'group_ids': {'key': 'properties.groupIds', 'type': '[str]'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } @@ -714,6 +746,7 @@ def __init__( self.system_data = None self.provisioning_state = None self.private_endpoint = kwargs.get('private_endpoint', None) + self.group_ids = None self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) @@ -850,7 +883,7 @@ class RegenerateKeyParameters(msrest.serialization.Model): """Parameters describes the request to regenerate access keys. :param key_type: The keyType to regenerate. Must be either 'primary' or - 'secondary'(case-insensitive). Possible values include: "Primary", "Secondary". + 'secondary'(case-insensitive). Possible values include: "Primary", "Secondary", "Salt". :type key_type: str or ~azure.mgmt.webpubsub.models.KeyType """ @@ -866,6 +899,52 @@ def __init__( self.key_type = kwargs.get('key_type', None) +class ResourceLogCategory(msrest.serialization.Model): + """Resource log category configuration of a Microsoft.SignalRService resource. + + :param name: Gets or sets the resource log category's name. + Available values: ConnectivityLogs, MessagingLogs. + Case insensitive. + :type name: str + :param enabled: Indicates whether or the resource log category is enabled. + Available values: true, false. + Case insensitive. + :type enabled: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceLogCategory, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.enabled = kwargs.get('enabled', None) + + +class ResourceLogConfiguration(msrest.serialization.Model): + """Resource log configuration of a Microsoft.SignalRService resource. + + :param categories: Gets or sets the list of category configurations. + :type categories: list[~azure.mgmt.webpubsub.models.ResourceLogCategory] + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[ResourceLogCategory]'}, + } + + def __init__( + self, + **kwargs + ): + super(ResourceLogConfiguration, self).__init__(**kwargs) + self.categories = kwargs.get('categories', None) + + class ResourceSku(msrest.serialization.Model): """The billing information of the resource. @@ -1172,6 +1251,118 @@ def __init__( self.localized_value = kwargs.get('localized_value', None) +class Sku(msrest.serialization.Model): + """Describes an available sku.". + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_type: The resource type that this object applies to. + :vartype resource_type: str + :ivar sku: The exact set of keys that define this sku. + :vartype sku: ~azure.mgmt.webpubsub.models.ResourceSku + :ivar capacity: Specifies the unit of the resource. + :vartype capacity: ~azure.mgmt.webpubsub.models.SkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class SkuCapacity(msrest.serialization.Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar minimum: The lowest permitted capacity for this resource. + :vartype minimum: int + :ivar maximum: The highest permitted capacity for this resource. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar allowed_values: Allows capacity value list. + :vartype allowed_values: list[int] + :ivar scale_type: The scale type applicable to the sku. Possible values include: "None", + "Manual", "Automatic". + :vartype scale_type: str or ~azure.mgmt.webpubsub.models.ScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'allowed_values': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'allowed_values': {'key': 'allowedValues', 'type': '[int]'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.allowed_values = None + self.scale_type = None + + +class SkuList(msrest.serialization.Model): + """The list skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of skus available for the resource. + :vartype value: list[~azure.mgmt.webpubsub.models.Sku] + :ivar next_link: The URL the client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Sku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -1310,51 +1501,102 @@ def __init__( self.client_id = None -class WebPubSubFeature(msrest.serialization.Model): - """Feature of a resource, which controls the runtime behavior. +class WebPubSubHub(ProxyResource): + """A hub setting. + + 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 flag: Required. FeatureFlags is the supported features of Azure SignalR service. - - - * EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category - respectively. - * EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category - respectively. - * EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR - service, it will give you live traces in real time, it will be helpful when you developing your - own Azure SignalR based web application or self-troubleshooting some issues. Please note that - live traces are counted as outbound messages that will be charged. Values allowed: - "true"/"false", to enable/disable live trace feature. Possible values include: - "EnableConnectivityLogs", "EnableMessagingLogs", "EnableLiveTrace". - :type flag: str or ~azure.mgmt.webpubsub.models.FeatureFlags - :param value: Required. Value of the feature flag. See Azure SignalR service document - https://docs.microsoft.com/azure/azure-signalr/ for allowed values. - :type value: str - :param properties: Optional properties related to this feature. - :type properties: dict[str, str] + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. "Microsoft.SignalRService/SignalR". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.webpubsub.models.SystemData + :param properties: Required. Properties of the hub setting. + :type properties: ~azure.mgmt.webpubsub.models.WebPubSubHubProperties """ _validation = { - 'flag': {'required': True}, - 'value': {'required': True, 'max_length': 128, 'min_length': 1}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, } _attribute_map = { - 'flag': {'key': 'flag', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'WebPubSubHubProperties'}, } def __init__( self, **kwargs ): - super(WebPubSubFeature, self).__init__(**kwargs) - self.flag = kwargs['flag'] - self.value = kwargs['value'] - self.properties = kwargs.get('properties', None) + super(WebPubSubHub, self).__init__(**kwargs) + self.system_data = None + self.properties = kwargs['properties'] + + +class WebPubSubHubList(msrest.serialization.Model): + """Hub setting list. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of hub settings to this resource. + :type value: list[~azure.mgmt.webpubsub.models.WebPubSubHub] + :ivar next_link: The URL the client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebPubSubHub]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebPubSubHubList, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None + + +class WebPubSubHubProperties(msrest.serialization.Model): + """Properties of a hub. + + :param event_handlers: Event handler of a hub. + :type event_handlers: list[~azure.mgmt.webpubsub.models.EventHandler] + :param anonymous_connect_policy: The settings for configuring if anonymous connections are + allowed for this hub: "allow" or "deny". Default to "deny". + :type anonymous_connect_policy: str + """ + + _attribute_map = { + 'event_handlers': {'key': 'eventHandlers', 'type': '[EventHandler]'}, + 'anonymous_connect_policy': {'key': 'anonymousConnectPolicy', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(WebPubSubHubProperties, self).__init__(**kwargs) + self.event_handlers = kwargs.get('event_handlers', None) + self.anonymous_connect_policy = kwargs.get('anonymous_connect_policy', "deny") class WebPubSubKeys(msrest.serialization.Model): @@ -1464,17 +1706,17 @@ class WebPubSubResource(TrackedResource): list[~azure.mgmt.webpubsub.models.SharedPrivateLinkResource] :param tls: TLS settings. :type tls: ~azure.mgmt.webpubsub.models.WebPubSubTlsSettings - :param features: List of the featureFlags. - - FeatureFlags that are not included in the parameters for the update operation will not be - modified. - And the response will only include featureFlags that are explicitly set. - When a featureFlag is not explicitly set, its globally default value will be used - But keep in mind, the default value doesn't mean "false". It varies in terms of different - FeatureFlags. - :type features: list[~azure.mgmt.webpubsub.models.WebPubSubFeature] - :param event_handler: The settings for event handler in webpubsub service. - :type event_handler: ~azure.mgmt.webpubsub.models.EventHandlerSettings + :ivar host_name_prefix: Deprecated. + :vartype host_name_prefix: str + :param live_trace_configuration: Live trace configuration of a Microsoft.SignalRService + resource. + :type live_trace_configuration: ~azure.mgmt.webpubsub.models.LiveTraceConfiguration + :param resource_log_configuration: Resource log configuration of a Microsoft.SignalRService + resource. + If resourceLogConfiguration isn't null or empty, it will override options + "EnableConnectivityLog" and "EnableMessagingLogs" in features. + Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in features. + :type resource_log_configuration: ~azure.mgmt.webpubsub.models.ResourceLogConfiguration :param network_ac_ls: Network ACLs. :type network_ac_ls: ~azure.mgmt.webpubsub.models.WebPubSubNetworkACLs :param public_network_access: Enable or disable public network access. Default to "Enabled". @@ -1482,6 +1724,14 @@ class WebPubSubResource(TrackedResource): When it's Disabled, public network access is always disabled no matter what you set in network ACLs. :type public_network_access: str + :param disable_local_auth: DisableLocalAuth + Enable or disable local auth with AccessKey + When set as true, connection with AccessKey=xxx won't work. + :type disable_local_auth: bool + :param disable_aad_auth: DisableLocalAuth + Enable or disable aad auth + When set as true, connection with AuthType=aad won't work. + :type disable_aad_auth: bool """ _validation = { @@ -1497,6 +1747,7 @@ class WebPubSubResource(TrackedResource): 'version': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, 'shared_private_link_resources': {'readonly': True}, + 'host_name_prefix': {'readonly': True}, } _attribute_map = { @@ -1517,10 +1768,13 @@ class WebPubSubResource(TrackedResource): 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, 'tls': {'key': 'properties.tls', 'type': 'WebPubSubTlsSettings'}, - 'features': {'key': 'properties.features', 'type': '[WebPubSubFeature]'}, - 'event_handler': {'key': 'properties.eventHandler', 'type': 'EventHandlerSettings'}, + 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, + 'live_trace_configuration': {'key': 'properties.liveTraceConfiguration', 'type': 'LiveTraceConfiguration'}, + 'resource_log_configuration': {'key': 'properties.resourceLogConfiguration', 'type': 'ResourceLogConfiguration'}, 'network_ac_ls': {'key': 'properties.networkACLs', 'type': 'WebPubSubNetworkACLs'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'disable_aad_auth': {'key': 'properties.disableAadAuth', 'type': 'bool'}, } def __init__( @@ -1540,10 +1794,13 @@ def __init__( self.private_endpoint_connections = None self.shared_private_link_resources = None self.tls = kwargs.get('tls', None) - self.features = kwargs.get('features', None) - self.event_handler = kwargs.get('event_handler', None) + self.host_name_prefix = None + self.live_trace_configuration = kwargs.get('live_trace_configuration', None) + self.resource_log_configuration = kwargs.get('resource_log_configuration', None) self.network_ac_ls = kwargs.get('network_ac_ls', None) self.public_network_access = kwargs.get('public_network_access', "Enabled") + self.disable_local_auth = kwargs.get('disable_local_auth', False) + self.disable_aad_auth = kwargs.get('disable_aad_auth', False) class WebPubSubResourceList(msrest.serialization.Model): @@ -1587,4 +1844,4 @@ def __init__( **kwargs ): super(WebPubSubTlsSettings, self).__init__(**kwargs) - self.client_cert_enabled = kwargs.get('client_cert_enabled', None) + self.client_cert_enabled = kwargs.get('client_cert_enabled', True) diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_models_py3.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_models_py3.py index f6b68d18a2e9..8597ca4899ab 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_models_py3.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_models_py3.py @@ -60,7 +60,7 @@ class ErrorAdditionalInfo(msrest.serialization.Model): :ivar type: The additional info type. :vartype type: str :ivar info: The additional info. - :vartype info: object + :vartype info: any """ _validation = { @@ -148,30 +148,8 @@ def __init__( self.error = error -class EventHandlerSettings(msrest.serialization.Model): - """The settings for event handler in webpubsub service. - - :param items: Get or set the EventHandler items. The key is the hub name and the value is the - corresponding EventHandlerTemplate. - :type items: dict[str, list[~azure.mgmt.webpubsub.models.EventHandlerTemplate]] - """ - - _attribute_map = { - 'items': {'key': 'items', 'type': '{[EventHandlerTemplate]}'}, - } - - def __init__( - self, - *, - items: Optional[Dict[str, List["EventHandlerTemplate"]]] = None, - **kwargs - ): - super(EventHandlerSettings, self).__init__(**kwargs) - self.items = items - - -class EventHandlerTemplate(msrest.serialization.Model): - """EventHandler template item settings. +class EventHandler(msrest.serialization.Model): + """Properties of event handler. All required parameters must be populated in order to send to Azure. @@ -191,15 +169,8 @@ class EventHandlerTemplate(msrest.serialization.Model): and "event2" 3. The single event name, for example, "event1", it matches "event1". :type user_event_pattern: str - :param system_event_pattern: Gets ot sets the system event pattern. - There are 2 kind of patterns supported: - - .. code-block:: - - 1. The single event name, for example, "connect", it matches "connect" - 2. Combine multiple events with ",", for example "connect,disconnected", it matches event - "connect" and "disconnected". - :type system_event_pattern: str + :param system_events: Gets ot sets the list of system events. + :type system_events: list[str] :param auth: Gets or sets the auth settings for an event handler. If not set, no auth is used. :type auth: ~azure.mgmt.webpubsub.models.UpstreamAuthSettings """ @@ -211,7 +182,7 @@ class EventHandlerTemplate(msrest.serialization.Model): _attribute_map = { 'url_template': {'key': 'urlTemplate', 'type': 'str'}, 'user_event_pattern': {'key': 'userEventPattern', 'type': 'str'}, - 'system_event_pattern': {'key': 'systemEventPattern', 'type': 'str'}, + 'system_events': {'key': 'systemEvents', 'type': '[str]'}, 'auth': {'key': 'auth', 'type': 'UpstreamAuthSettings'}, } @@ -220,17 +191,78 @@ def __init__( *, url_template: str, user_event_pattern: Optional[str] = None, - system_event_pattern: Optional[str] = None, + system_events: Optional[List[str]] = None, auth: Optional["UpstreamAuthSettings"] = None, **kwargs ): - super(EventHandlerTemplate, self).__init__(**kwargs) + super(EventHandler, self).__init__(**kwargs) self.url_template = url_template self.user_event_pattern = user_event_pattern - self.system_event_pattern = system_event_pattern + self.system_events = system_events self.auth = auth +class LiveTraceCategory(msrest.serialization.Model): + """Live trace category configuration of a Microsoft.SignalRService resource. + + :param name: Gets or sets the live trace category's name. + Available values: ConnectivityLogs, MessagingLogs. + Case insensitive. + :type name: str + :param enabled: Indicates whether or the live trace category is enabled. + Available values: true, false. + Case insensitive. + :type enabled: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + enabled: Optional[str] = None, + **kwargs + ): + super(LiveTraceCategory, self).__init__(**kwargs) + self.name = name + self.enabled = enabled + + +class LiveTraceConfiguration(msrest.serialization.Model): + """Live trace configuration of a Microsoft.SignalRService resource. + + :param enabled: Indicates whether or not enable live trace. + When it's set to true, live trace client can connect to the service. + Otherwise, live trace client can't connect to the service, so that you are unable to receive + any log, no matter what you configure in "categories". + Available values: true, false. + Case insensitive. + :type enabled: str + :param categories: Gets or sets the list of category configurations. + :type categories: list[~azure.mgmt.webpubsub.models.LiveTraceCategory] + """ + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'str'}, + 'categories': {'key': 'categories', 'type': '[LiveTraceCategory]'}, + } + + def __init__( + self, + *, + enabled: Optional[str] = "false", + categories: Optional[List["LiveTraceCategory"]] = None, + **kwargs + ): + super(LiveTraceConfiguration, self).__init__(**kwargs) + self.enabled = enabled + self.categories = categories + + class LogSpecification(msrest.serialization.Model): """Specifications of the Logs for Azure Monitoring. @@ -751,6 +783,8 @@ class PrivateEndpointConnection(ProxyResource): :vartype provisioning_state: str or ~azure.mgmt.webpubsub.models.ProvisioningState :param private_endpoint: Private endpoint associated with the private endpoint connection. :type private_endpoint: ~azure.mgmt.webpubsub.models.PrivateEndpoint + :ivar group_ids: Group IDs. + :vartype group_ids: list[str] :param private_link_service_connection_state: Connection state. :type private_link_service_connection_state: ~azure.mgmt.webpubsub.models.PrivateLinkServiceConnectionState @@ -762,6 +796,7 @@ class PrivateEndpointConnection(ProxyResource): 'type': {'readonly': True}, 'system_data': {'readonly': True}, 'provisioning_state': {'readonly': True}, + 'group_ids': {'readonly': True}, } _attribute_map = { @@ -771,6 +806,7 @@ class PrivateEndpointConnection(ProxyResource): 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, + 'group_ids': {'key': 'properties.groupIds', 'type': '[str]'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, } @@ -785,6 +821,7 @@ def __init__( self.system_data = None self.provisioning_state = None self.private_endpoint = private_endpoint + self.group_ids = None self.private_link_service_connection_state = private_link_service_connection_state @@ -936,7 +973,7 @@ class RegenerateKeyParameters(msrest.serialization.Model): """Parameters describes the request to regenerate access keys. :param key_type: The keyType to regenerate. Must be either 'primary' or - 'secondary'(case-insensitive). Possible values include: "Primary", "Secondary". + 'secondary'(case-insensitive). Possible values include: "Primary", "Secondary", "Salt". :type key_type: str or ~azure.mgmt.webpubsub.models.KeyType """ @@ -954,6 +991,57 @@ def __init__( self.key_type = key_type +class ResourceLogCategory(msrest.serialization.Model): + """Resource log category configuration of a Microsoft.SignalRService resource. + + :param name: Gets or sets the resource log category's name. + Available values: ConnectivityLogs, MessagingLogs. + Case insensitive. + :type name: str + :param enabled: Indicates whether or the resource log category is enabled. + Available values: true, false. + Case insensitive. + :type enabled: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'enabled': {'key': 'enabled', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + enabled: Optional[str] = None, + **kwargs + ): + super(ResourceLogCategory, self).__init__(**kwargs) + self.name = name + self.enabled = enabled + + +class ResourceLogConfiguration(msrest.serialization.Model): + """Resource log configuration of a Microsoft.SignalRService resource. + + :param categories: Gets or sets the list of category configurations. + :type categories: list[~azure.mgmt.webpubsub.models.ResourceLogCategory] + """ + + _attribute_map = { + 'categories': {'key': 'categories', 'type': '[ResourceLogCategory]'}, + } + + def __init__( + self, + *, + categories: Optional[List["ResourceLogCategory"]] = None, + **kwargs + ): + super(ResourceLogConfiguration, self).__init__(**kwargs) + self.categories = categories + + class ResourceSku(msrest.serialization.Model): """The billing information of the resource. @@ -1293,6 +1381,118 @@ def __init__( self.localized_value = localized_value +class Sku(msrest.serialization.Model): + """Describes an available sku.". + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar resource_type: The resource type that this object applies to. + :vartype resource_type: str + :ivar sku: The exact set of keys that define this sku. + :vartype sku: ~azure.mgmt.webpubsub.models.ResourceSku + :ivar capacity: Specifies the unit of the resource. + :vartype capacity: ~azure.mgmt.webpubsub.models.SkuCapacity + """ + + _validation = { + 'resource_type': {'readonly': True}, + 'sku': {'readonly': True}, + 'capacity': {'readonly': True}, + } + + _attribute_map = { + 'resource_type': {'key': 'resourceType', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'ResourceSku'}, + 'capacity': {'key': 'capacity', 'type': 'SkuCapacity'}, + } + + def __init__( + self, + **kwargs + ): + super(Sku, self).__init__(**kwargs) + self.resource_type = None + self.sku = None + self.capacity = None + + +class SkuCapacity(msrest.serialization.Model): + """Describes scaling information of a sku. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar minimum: The lowest permitted capacity for this resource. + :vartype minimum: int + :ivar maximum: The highest permitted capacity for this resource. + :vartype maximum: int + :ivar default: The default capacity. + :vartype default: int + :ivar allowed_values: Allows capacity value list. + :vartype allowed_values: list[int] + :ivar scale_type: The scale type applicable to the sku. Possible values include: "None", + "Manual", "Automatic". + :vartype scale_type: str or ~azure.mgmt.webpubsub.models.ScaleType + """ + + _validation = { + 'minimum': {'readonly': True}, + 'maximum': {'readonly': True}, + 'default': {'readonly': True}, + 'allowed_values': {'readonly': True}, + 'scale_type': {'readonly': True}, + } + + _attribute_map = { + 'minimum': {'key': 'minimum', 'type': 'int'}, + 'maximum': {'key': 'maximum', 'type': 'int'}, + 'default': {'key': 'default', 'type': 'int'}, + 'allowed_values': {'key': 'allowedValues', 'type': '[int]'}, + 'scale_type': {'key': 'scaleType', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuCapacity, self).__init__(**kwargs) + self.minimum = None + self.maximum = None + self.default = None + self.allowed_values = None + self.scale_type = None + + +class SkuList(msrest.serialization.Model): + """The list skus operation response. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar value: The list of skus available for the resource. + :vartype value: list[~azure.mgmt.webpubsub.models.Sku] + :ivar next_link: The URL the client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Sku]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(SkuList, self).__init__(**kwargs) + self.value = None + self.next_link = None + + class SystemData(msrest.serialization.Model): """Metadata pertaining to creation and last modification of the resource. @@ -1444,57 +1644,111 @@ def __init__( self.client_id = None -class WebPubSubFeature(msrest.serialization.Model): - """Feature of a resource, which controls the runtime behavior. +class WebPubSubHub(ProxyResource): + """A hub setting. + + 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 flag: Required. FeatureFlags is the supported features of Azure SignalR service. - - - * EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category - respectively. - * EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category - respectively. - * EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR - service, it will give you live traces in real time, it will be helpful when you developing your - own Azure SignalR based web application or self-troubleshooting some issues. Please note that - live traces are counted as outbound messages that will be charged. Values allowed: - "true"/"false", to enable/disable live trace feature. Possible values include: - "EnableConnectivityLogs", "EnableMessagingLogs", "EnableLiveTrace". - :type flag: str or ~azure.mgmt.webpubsub.models.FeatureFlags - :param value: Required. Value of the feature flag. See Azure SignalR service document - https://docs.microsoft.com/azure/azure-signalr/ for allowed values. - :type value: str - :param properties: Optional properties related to this feature. - :type properties: dict[str, str] + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource. + :vartype name: str + :ivar type: The type of the resource - e.g. "Microsoft.SignalRService/SignalR". + :vartype type: str + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.webpubsub.models.SystemData + :param properties: Required. Properties of the hub setting. + :type properties: ~azure.mgmt.webpubsub.models.WebPubSubHubProperties """ _validation = { - 'flag': {'required': True}, - 'value': {'required': True, 'max_length': 128, 'min_length': 1}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'system_data': {'readonly': True}, + 'properties': {'required': True}, } _attribute_map = { - 'flag': {'key': 'flag', 'type': 'str'}, - 'value': {'key': 'value', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': '{str}'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, + 'properties': {'key': 'properties', 'type': 'WebPubSubHubProperties'}, } def __init__( self, *, - flag: Union[str, "FeatureFlags"], - value: str, - properties: Optional[Dict[str, str]] = None, + properties: "WebPubSubHubProperties", **kwargs ): - super(WebPubSubFeature, self).__init__(**kwargs) - self.flag = flag - self.value = value + super(WebPubSubHub, self).__init__(**kwargs) + self.system_data = None self.properties = properties +class WebPubSubHubList(msrest.serialization.Model): + """Hub setting list. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param value: List of hub settings to this resource. + :type value: list[~azure.mgmt.webpubsub.models.WebPubSubHub] + :ivar next_link: The URL the client should use to fetch the next page (per server side paging). + It's null for now, added for future use. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[WebPubSubHub]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["WebPubSubHub"]] = None, + **kwargs + ): + super(WebPubSubHubList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + +class WebPubSubHubProperties(msrest.serialization.Model): + """Properties of a hub. + + :param event_handlers: Event handler of a hub. + :type event_handlers: list[~azure.mgmt.webpubsub.models.EventHandler] + :param anonymous_connect_policy: The settings for configuring if anonymous connections are + allowed for this hub: "allow" or "deny". Default to "deny". + :type anonymous_connect_policy: str + """ + + _attribute_map = { + 'event_handlers': {'key': 'eventHandlers', 'type': '[EventHandler]'}, + 'anonymous_connect_policy': {'key': 'anonymousConnectPolicy', 'type': 'str'}, + } + + def __init__( + self, + *, + event_handlers: Optional[List["EventHandler"]] = None, + anonymous_connect_policy: Optional[str] = "deny", + **kwargs + ): + super(WebPubSubHubProperties, self).__init__(**kwargs) + self.event_handlers = event_handlers + self.anonymous_connect_policy = anonymous_connect_policy + + class WebPubSubKeys(msrest.serialization.Model): """A class represents the access keys of the resource. @@ -1611,17 +1865,17 @@ class WebPubSubResource(TrackedResource): list[~azure.mgmt.webpubsub.models.SharedPrivateLinkResource] :param tls: TLS settings. :type tls: ~azure.mgmt.webpubsub.models.WebPubSubTlsSettings - :param features: List of the featureFlags. - - FeatureFlags that are not included in the parameters for the update operation will not be - modified. - And the response will only include featureFlags that are explicitly set. - When a featureFlag is not explicitly set, its globally default value will be used - But keep in mind, the default value doesn't mean "false". It varies in terms of different - FeatureFlags. - :type features: list[~azure.mgmt.webpubsub.models.WebPubSubFeature] - :param event_handler: The settings for event handler in webpubsub service. - :type event_handler: ~azure.mgmt.webpubsub.models.EventHandlerSettings + :ivar host_name_prefix: Deprecated. + :vartype host_name_prefix: str + :param live_trace_configuration: Live trace configuration of a Microsoft.SignalRService + resource. + :type live_trace_configuration: ~azure.mgmt.webpubsub.models.LiveTraceConfiguration + :param resource_log_configuration: Resource log configuration of a Microsoft.SignalRService + resource. + If resourceLogConfiguration isn't null or empty, it will override options + "EnableConnectivityLog" and "EnableMessagingLogs" in features. + Otherwise, use options "EnableConnectivityLog" and "EnableMessagingLogs" in features. + :type resource_log_configuration: ~azure.mgmt.webpubsub.models.ResourceLogConfiguration :param network_ac_ls: Network ACLs. :type network_ac_ls: ~azure.mgmt.webpubsub.models.WebPubSubNetworkACLs :param public_network_access: Enable or disable public network access. Default to "Enabled". @@ -1629,6 +1883,14 @@ class WebPubSubResource(TrackedResource): When it's Disabled, public network access is always disabled no matter what you set in network ACLs. :type public_network_access: str + :param disable_local_auth: DisableLocalAuth + Enable or disable local auth with AccessKey + When set as true, connection with AccessKey=xxx won't work. + :type disable_local_auth: bool + :param disable_aad_auth: DisableLocalAuth + Enable or disable aad auth + When set as true, connection with AuthType=aad won't work. + :type disable_aad_auth: bool """ _validation = { @@ -1644,6 +1906,7 @@ class WebPubSubResource(TrackedResource): 'version': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, 'shared_private_link_resources': {'readonly': True}, + 'host_name_prefix': {'readonly': True}, } _attribute_map = { @@ -1664,10 +1927,13 @@ class WebPubSubResource(TrackedResource): 'private_endpoint_connections': {'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'shared_private_link_resources': {'key': 'properties.sharedPrivateLinkResources', 'type': '[SharedPrivateLinkResource]'}, 'tls': {'key': 'properties.tls', 'type': 'WebPubSubTlsSettings'}, - 'features': {'key': 'properties.features', 'type': '[WebPubSubFeature]'}, - 'event_handler': {'key': 'properties.eventHandler', 'type': 'EventHandlerSettings'}, + 'host_name_prefix': {'key': 'properties.hostNamePrefix', 'type': 'str'}, + 'live_trace_configuration': {'key': 'properties.liveTraceConfiguration', 'type': 'LiveTraceConfiguration'}, + 'resource_log_configuration': {'key': 'properties.resourceLogConfiguration', 'type': 'ResourceLogConfiguration'}, 'network_ac_ls': {'key': 'properties.networkACLs', 'type': 'WebPubSubNetworkACLs'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, + 'disable_local_auth': {'key': 'properties.disableLocalAuth', 'type': 'bool'}, + 'disable_aad_auth': {'key': 'properties.disableAadAuth', 'type': 'bool'}, } def __init__( @@ -1678,10 +1944,12 @@ def __init__( sku: Optional["ResourceSku"] = None, identity: Optional["ManagedIdentity"] = None, tls: Optional["WebPubSubTlsSettings"] = None, - features: Optional[List["WebPubSubFeature"]] = None, - event_handler: Optional["EventHandlerSettings"] = None, + live_trace_configuration: Optional["LiveTraceConfiguration"] = None, + resource_log_configuration: Optional["ResourceLogConfiguration"] = None, network_ac_ls: Optional["WebPubSubNetworkACLs"] = None, public_network_access: Optional[str] = "Enabled", + disable_local_auth: Optional[bool] = False, + disable_aad_auth: Optional[bool] = False, **kwargs ): super(WebPubSubResource, self).__init__(location=location, tags=tags, **kwargs) @@ -1697,10 +1965,13 @@ def __init__( self.private_endpoint_connections = None self.shared_private_link_resources = None self.tls = tls - self.features = features - self.event_handler = event_handler + self.host_name_prefix = None + self.live_trace_configuration = live_trace_configuration + self.resource_log_configuration = resource_log_configuration self.network_ac_ls = network_ac_ls self.public_network_access = public_network_access + self.disable_local_auth = disable_local_auth + self.disable_aad_auth = disable_aad_auth class WebPubSubResourceList(msrest.serialization.Model): @@ -1745,7 +2016,7 @@ class WebPubSubTlsSettings(msrest.serialization.Model): def __init__( self, *, - client_cert_enabled: Optional[bool] = None, + client_cert_enabled: Optional[bool] = True, **kwargs ): super(WebPubSubTlsSettings, self).__init__(**kwargs) diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_web_pub_sub_management_client_enums.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_web_pub_sub_management_client_enums.py index c9da1141c856..04e396fef8a6 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_web_pub_sub_management_client_enums.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/models/_web_pub_sub_management_client_enums.py @@ -42,31 +42,13 @@ class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" -class FeatureFlags(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """FeatureFlags is the supported features of Azure SignalR service. - - - * EnableConnectivityLogs: "true"/"false", to enable/disable the connectivity log category - respectively. - * EnableMessagingLogs: "true"/"false", to enable/disable the connectivity log category - respectively. - * EnableLiveTrace: Live Trace allows you to know what's happening inside Azure SignalR service, - it will give you live traces in real time, it will be helpful when you developing your own - Azure SignalR based web application or self-troubleshooting some issues. Please note that live - traces are counted as outbound messages that will be charged. Values allowed: "true"/"false", - to enable/disable live trace feature. - """ - - ENABLE_CONNECTIVITY_LOGS = "EnableConnectivityLogs" - ENABLE_MESSAGING_LOGS = "EnableMessagingLogs" - ENABLE_LIVE_TRACE = "EnableLiveTrace" - class KeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The keyType to regenerate. Must be either 'primary' or 'secondary'(case-insensitive). """ PRIMARY = "Primary" SECONDARY = "Secondary" + SALT = "Salt" class ManagedIdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Represent the identity type: systemAssigned, userAssigned, None @@ -100,6 +82,14 @@ class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DELETING = "Deleting" MOVING = "Moving" +class ScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The scale type applicable to the sku. + """ + + NONE = "None" + MANUAL = "Manual" + AUTOMATIC = "Automatic" + class SharedPrivateLinkResourceStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of the shared private link resource """ diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/__init__.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/__init__.py index adcd49212f72..595107f95576 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/__init__.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/__init__.py @@ -9,6 +9,7 @@ from ._operations import Operations from ._web_pub_sub_operations import WebPubSubOperations from ._usages_operations import UsagesOperations +from ._web_pub_sub_hubs_operations import WebPubSubHubsOperations from ._web_pub_sub_private_endpoint_connections_operations import WebPubSubPrivateEndpointConnectionsOperations from ._web_pub_sub_private_link_resources_operations import WebPubSubPrivateLinkResourcesOperations from ._web_pub_sub_shared_private_link_resources_operations import WebPubSubSharedPrivateLinkResourcesOperations @@ -17,6 +18,7 @@ 'Operations', 'WebPubSubOperations', 'UsagesOperations', + 'WebPubSubHubsOperations', 'WebPubSubPrivateEndpointConnectionsOperations', 'WebPubSubPrivateLinkResourcesOperations', 'WebPubSubSharedPrivateLinkResourcesOperations', diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_operations.py index 64427f6bef1f..845aef05d550 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_usages_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_usages_operations.py index 11ad7ba94ed8..0b6ff51f70fd 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_usages_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_usages_operations.py @@ -65,7 +65,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_subnets_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_hubs_operations.py similarity index 72% rename from sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_subnets_operations.py rename to sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_hubs_operations.py index 5269f60637f8..dfe17167fae4 100644 --- a/sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_11_01/operations/_subnets_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_hubs_operations.py @@ -25,14 +25,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] -class SubnetsOperations(object): - """SubnetsOperations operations. +class WebPubSubHubsOperations(object): + """WebPubSubHubsOperations operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. - :type models: ~azure.mgmt.network.v2017_11_01.models + :type models: ~azure.mgmt.webpubsub.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. @@ -47,168 +47,126 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def _delete_initial( + def list( self, resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> None - cls = kwargs.pop('cls', None) # type: ClsType[None] + # type: (...) -> Iterable["_models.WebPubSubHubList"] + """List hub settings. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either WebPubSubHubList or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.webpubsub.models.WebPubSubHubList] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebPubSubHubList"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-10-01" + accept = "application/json" - # Construct URL - url = self._delete_initial.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) + def prepare_request(next_link=None): + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - # Construct headers - header_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request - request = self._client.delete(url, query_parameters, header_parameters) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + def extract_data(pipeline_response): + deserialized = self._deserialize('WebPubSubHubList', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) - if response.status_code not in [200, 202, 204]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + def get_next(next_link=None): + request = prepare_request(next_link) - if cls: - return cls(pipeline_response, None, {}) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + if response.status_code not in [200]: + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - def begin_delete( - self, - resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - **kwargs # type: Any - ): - # type: (...) -> LROPoller[None] - """Deletes the specified subnet. + return pipeline_response - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: By default, your polling method will be ARMPolling. - Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. - :paramtype polling: bool or ~azure.core.polling.PollingMethod - :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either None or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[None] - :raises ~azure.core.exceptions.HttpResponseError: - """ - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType[None] - lro_delay = kwargs.pop( - 'polling_interval', - self._config.polling_interval + return ItemPaged( + get_next, extract_data ) - cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] - if cont_token is None: - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, - cls=lambda x,y,z: x, - **kwargs - ) - - kwargs.pop('error_map', None) - kwargs.pop('content_type', None) - - def get_long_running_output(pipeline_response): - if cls: - return cls(pipeline_response, None, {}) - - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - - if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - if cont_token: - return LROPoller.from_continuation_token( - polling_method=polling_method, - continuation_token=cont_token, - client=self._client, - deserialization_callback=get_long_running_output - ) - else: - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs'} # type: ignore def get( self, + hub_name, # type: str resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - expand=None, # type: Optional[str] + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_models.Subnet" - """Gets the specified subnet by virtual network and resource group. + # type: (...) -> "_models.WebPubSubHub" + """Get a hub setting. - :param resource_group_name: The name of the resource group. + :param hub_name: The hub name. + :type hub_name: str + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param expand: Expands referenced resources. - :type expand: str + :param resource_name: The name of the resource. + :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Subnet, or the result of cls(response) - :rtype: ~azure.mgmt.network.v2017_11_01.models.Subnet + :return: WebPubSubHub, or the result of cls(response) + :rtype: ~azure.mgmt.webpubsub.models.WebPubSubHub :raises: ~azure.core.exceptions.HttpResponseError """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebPubSubHub"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-10-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - if expand is not None: - query_parameters['$expand'] = self._serialize.query("expand", expand, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] @@ -220,41 +178,42 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - deserialized = self._deserialize('Subnet', pipeline_response) + deserialized = self._deserialize('WebPubSubHub', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore def _create_or_update_initial( self, + hub_name, # type: str resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - subnet_parameters, # type: "_models.Subnet" + resource_name, # type: str + parameters, # type: "_models.WebPubSubHub" **kwargs # type: Any ): - # type: (...) -> "_models.Subnet" - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + # type: (...) -> "_models.WebPubSubHub" + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebPubSubHub"] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") - accept = "application/json, text/json" + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -268,7 +227,7 @@ def _create_or_update_initial( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(subnet_parameters, 'Subnet') + body_content = self._serialize.body(parameters, 'WebPubSubHub') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -276,51 +235,53 @@ def _create_or_update_initial( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: - deserialized = self._deserialize('Subnet', pipeline_response) + deserialized = self._deserialize('WebPubSubHub', pipeline_response) if response.status_code == 201: - deserialized = self._deserialize('Subnet', pipeline_response) + deserialized = self._deserialize('WebPubSubHub', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore def begin_create_or_update( self, + hub_name, # type: str resource_group_name, # type: str - virtual_network_name, # type: str - subnet_name, # type: str - subnet_parameters, # type: "_models.Subnet" + resource_name, # type: str + parameters, # type: "_models.WebPubSubHub" **kwargs # type: Any ): - # type: (...) -> LROPoller["_models.Subnet"] - """Creates or updates a subnet in the specified virtual network. + # type: (...) -> LROPoller["_models.WebPubSubHub"] + """Create or update a hub setting. - :param resource_group_name: The name of the resource group. + :param hub_name: The hub name. + :type hub_name: str + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :param subnet_name: The name of the subnet. - :type subnet_name: str - :param subnet_parameters: Parameters supplied to the create or update subnet operation. - :type subnet_parameters: ~azure.mgmt.network.v2017_11_01.models.Subnet + :param resource_name: The name of the resource. + :type resource_name: str + :param parameters: The resource of WebPubSubHub and its properties. + :type parameters: ~azure.mgmt.webpubsub.models.WebPubSubHub :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. - :return: An instance of LROPoller that returns either Subnet or the result of cls(response) - :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.network.v2017_11_01.models.Subnet] + :return: An instance of LROPoller that returns either WebPubSubHub or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.webpubsub.models.WebPubSubHub] :raises ~azure.core.exceptions.HttpResponseError: """ polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] - cls = kwargs.pop('cls', None) # type: ClsType["_models.Subnet"] + cls = kwargs.pop('cls', None) # type: ClsType["_models.WebPubSubHub"] lro_delay = kwargs.pop( 'polling_interval', self._config.polling_interval @@ -328,10 +289,10 @@ def begin_create_or_update( cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] if cont_token is None: raw_result = self._create_or_update_initial( + hub_name=hub_name, resource_group_name=resource_group_name, - virtual_network_name=virtual_network_name, - subnet_name=subnet_name, - subnet_parameters=subnet_parameters, + resource_name=resource_name, + parameters=parameters, cls=lambda x,y,z: x, **kwargs ) @@ -340,17 +301,17 @@ def begin_create_or_update( kwargs.pop('content_type', None) def get_long_running_output(pipeline_response): - deserialized = self._deserialize('Subnet', pipeline_response) + deserialized = self._deserialize('WebPubSubHub', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subnetName': self._serialize.url("subnet_name", subnet_name, 'str'), + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) @@ -365,79 +326,123 @@ def get_long_running_output(pipeline_response): ) else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets/{subnetName}'} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore - def list( + def _delete_initial( self, + hub_name, # type: str resource_group_name, # type: str - virtual_network_name, # type: str + resource_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_models.SubnetListResult"] - """Gets all subnets in a virtual network. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param virtual_network_name: The name of the virtual network. - :type virtual_network_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: An iterator like instance of either SubnetListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.network.v2017_11_01.models.SubnetListResult] - :raises: ~azure.core.exceptions.HttpResponseError - """ - cls = kwargs.pop('cls', None) # type: ClsType["_models.SubnetListResult"] + # type: (...) -> None + cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2017-11-01" - accept = "application/json, text/json" + api_version = "2021-10-01" + accept = "application/json" - def prepare_request(next_link=None): - # Construct headers - header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + # Construct URL + url = self._delete_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list.metadata['url'] # type: ignore - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'virtualNetworkName': self._serialize.url("virtual_network_name", virtual_network_name, 'str'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), - } - url = self._client.format_url(url, **path_format_arguments) - # Construct parameters - query_parameters = {} # type: Dict[str, Any] - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') - request = self._client.get(url, query_parameters, header_parameters) - else: - url = next_link - query_parameters = {} # type: Dict[str, Any] - request = self._client.get(url, query_parameters, header_parameters) - return request + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - def extract_data(pipeline_response): - deserialized = self._deserialize('SubnetListResult', pipeline_response) - list_of_elem = deserialized.value - if cls: - list_of_elem = cls(list_of_elem) - return deserialized.next_link or None, iter(list_of_elem) + request = self._client.delete(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response - def get_next(next_link=None): - request = prepare_request(next_link) + if response.status_code not in [200, 202, 204]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) - response = pipeline_response.http_response + if cls: + return cls(pipeline_response, None, {}) - if response.status_code not in [200]: - map_error(status_code=response.status_code, response=response, error_map=error_map) - raise HttpResponseError(response=response, error_format=ARMErrorFormat) + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore - return pipeline_response + def begin_delete( + self, + hub_name, # type: str + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> LROPoller[None] + """Delete a hub setting. - return ItemPaged( - get_next, extract_data + :param hub_name: The hub name. + :type hub_name: str + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType[None] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}/subnets'} # type: ignore + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._delete_initial( + hub_name=hub_name, + resource_group_name=resource_group_name, + resource_name=resource_name, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + if cls: + return cls(pipeline_response, None, {}) + + path_format_arguments = { + 'hubName': self._serialize.url("hub_name", hub_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/hubs/{hubName}'} # type: ignore diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_operations.py index 582c57d4e186..262a3d28441c 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_operations.py @@ -70,7 +70,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -128,7 +128,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -200,7 +200,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -276,7 +276,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -326,7 +326,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -392,8 +392,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.webpubsub.models.WebPubSubResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WebPubSubResource or the result of cls(response) @@ -458,7 +458,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -508,8 +508,8 @@ def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -571,7 +571,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -634,8 +634,8 @@ def begin_update( :type parameters: ~azure.mgmt.webpubsub.models.WebPubSubResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WebPubSubResource or the result of cls(response) @@ -712,7 +712,7 @@ def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -762,7 +762,7 @@ def _regenerate_key_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -824,8 +824,8 @@ def begin_regenerate_key( :type parameters: ~azure.mgmt.webpubsub.models.RegenerateKeyParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either WebPubSubKeys or the result of cls(response) @@ -890,7 +890,7 @@ def _restart_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -940,8 +940,8 @@ def begin_restart( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -989,3 +989,64 @@ def get_long_running_output(pipeline_response): else: return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/restart'} # type: ignore + + def list_skus( + self, + resource_group_name, # type: str + resource_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.SkuList" + """List all available skus of the resource. + + :param resource_group_name: The name of the resource group that contains the resource. You can + obtain this value from the Azure Resource Manager API or the portal. + :type resource_group_name: str + :param resource_name: The name of the resource. + :type resource_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: SkuList, or the result of cls(response) + :rtype: ~azure.mgmt.webpubsub.models.SkuList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.SkuList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-10-01" + accept = "application/json" + + # Construct URL + url = self.list_skus.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'resourceName': self._serialize.url("resource_name", resource_name, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('SkuList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_skus.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SignalRService/webPubSub/{resourceName}/skus'} # type: ignore diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_private_endpoint_connections_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_private_endpoint_connections_operations.py index c5c64a5ce78d..74d3d3738a30 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_private_endpoint_connections_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_private_endpoint_connections_operations.py @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -151,7 +151,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -219,7 +219,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -275,7 +275,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -329,8 +329,8 @@ def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_private_link_resources_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_private_link_resources_operations.py index a4ba2bff4eeb..466906384635 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_private_link_resources_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_private_link_resources_operations.py @@ -69,7 +69,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_shared_private_link_resources_operations.py b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_shared_private_link_resources_operations.py index 403ef3945665..c4f1e952e004 100644 --- a/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_shared_private_link_resources_operations.py +++ b/sdk/webpubsub/azure-mgmt-webpubsub/azure/mgmt/webpubsub/operations/_web_pub_sub_shared_private_link_resources_operations.py @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" def prepare_request(next_link=None): @@ -151,7 +151,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -272,8 +272,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.webpubsub.models.SharedPrivateLinkResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SharedPrivateLinkResource or the result of cls(response) @@ -341,7 +341,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2021-04-01-preview" + api_version = "2021-10-01" accept = "application/json" # Construct URL @@ -395,8 +395,8 @@ def begin_delete( :type resource_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/webpubsub/tests.yml b/sdk/webpubsub/tests.yml new file mode 100644 index 000000000000..4a27ae2ac85e --- /dev/null +++ b/sdk/webpubsub/tests.yml @@ -0,0 +1,23 @@ +trigger: none + +stages: + - template: ../../eng/pipelines/templates/stages/archetype-sdk-tests.yml + parameters: + BuildTargetingString: azure* + ServiceDirectory: webpubsub + MatrixReplace: + - TestSamples=.*/true + EnvVars: + WEBPUBSUB_TENANT_ID: $(webpubsub-tenant-id) + WEBPUBSUB_CLIENT_ID: $(webpubsub-client-id) + WEBPUBSUB_CLIENT_SECRET: $(webpubsub-client-secret) + WEBPUBSUB_SUBSCRIPTION_ID: $(webpubsub-subscription-id) + AZURE_TENANT_ID: $(webpubsub-tenant-id) + AZURE_CLIENT_ID: $(webpubsub-client-id) + AZURE_CLIENT_SECRET: $(webpubsub-client-secret) + AZURE_SUBSCRIPTION_ID: $(webpubsub-subscription-id) + WEBPUBSUB_REVERSE_PROXY_ENDPOINT: $(webpubsub-reverse-proxy-endpoint) + WEBPUBSUB_ENDPOINT: $(webpubsub-endpoint) + WEBPUBSUB_CONNECTION_STRING: $(webpubsub-connection-string) + TEST_MODE: "RunLiveNoRecord" # use when allowing preparers to create the rgs for you + AZURE_TEST_RUN_LIVE: "true" # use when utilizing the New-TestResources Script diff --git a/shared_requirements.txt b/shared_requirements.txt index 484200b802b7..1852bb6b7d73 100644 --- a/shared_requirements.txt +++ b/shared_requirements.txt @@ -90,12 +90,13 @@ azure-mgmt-trafficmanager~=0.50.0 azure-mgmt-web~=0.35.0 azure-messaging-nspkg azure-mixedreality-nspkg +azure-mixedreality-authentication azure-nspkg azure-keyvault-nspkg azure-media-nspkg azure-agrifood-nspkg azure-purview-nspkg -azure-schemaregistry==1.0.0b3 +azure-schemaregistry>=1.0.0,<2.0.0 azure-search-nspkg azure-security-nspkg azure-synapse-nspkg @@ -126,13 +127,14 @@ aiodns>=2.0 python-dateutil>=2.8.0 six>=1.11.0 isodate>=0.6.0 -avro<2.0.0,>=1.10.0 +avro==1.10.0 pyjwt>=1.7.1 chardet<5,>=3.0.2 backports.functools-lru-cache >= 1.6.4; python_version == "2.7" +#override azure-search-documents typing-extensions>=3.7.4.3 #override azure azure-keyvault~=1.0 #override azure-mgmt-core azure-core<2.0.0,>=1.15.0 -#override azure-containerregistry azure-core>=1.4.0,<2.0.0 +#override azure-containerregistry azure-core>=1.20.0,<2.0.0 #override azure-containerregistry msrest>=0.6.21 #override azure-core-tracing-opencensus azure-core<2.0.0,>=1.13.0 #override azure-core-tracing-opentelemetry azure-core<2.0.0,>=1.13.0 @@ -141,6 +143,10 @@ backports.functools-lru-cache >= 1.6.4; python_version == "2.7" #override azure-data-tables msrest>=0.6.21 #override azure-eventhub azure-core<2.0.0,>=1.14.0 #override azure-identity azure-core<2.0.0,>=1.11.0 +#override azure-keyvault-administration azure-core<2.0.0,>=1.15.0 +#override azure-keyvault-certificates azure-core<2.0.0,>=1.15.0 +#override azure-keyvault-keys azure-core<2.0.0,>=1.15.0 +#override azure-keyvault-secrets azure-core<2.0.0,>=1.15.0 #override azure-identity cryptography>=2.5 #override azure-keyvault-administration msrest>=0.6.21 #override azure-keyvault-administration azure-core<2.0.0,>=1.11.0 @@ -151,8 +157,8 @@ backports.functools-lru-cache >= 1.6.4; python_version == "2.7" #override azure-keyvault-keys azure-core<2.0.0,>=1.7.0 #override azure-keyvault-secrets azure-core<2.0.0,>=1.7.0 #override azure-ai-textanalytics msrest>=0.6.21 -#override azure-ai-textanalytics azure-core<2.0.0,>=1.14.0 -#override azure-ai-language-questionanswering azure-core<2.0.0,>=1.19.0 +#override azure-ai-textanalytics azure-core<2.0.0,>=1.19.1 +#override azure-ai-language-questionanswering azure-core<2.0.0,>=1.19.1 #override azure-ai-language-questionanswering msrest>=0.6.21 #override azure-search-documents azure-core<2.0.0,>=1.19.0 #override azure-ai-formrecognizer msrest>=0.6.21 @@ -170,7 +176,7 @@ backports.functools-lru-cache >= 1.6.4; python_version == "2.7" #override azure-security-attestation msrest>=0.6.21 #override azure-security-attestation azure-core<2.0.0,>=1.8.2 #override azure-data-tables msrest>=0.6.19 -#override azure-schemaregistry azure-core<2.0.0,>=1.19.0 +#override azure-schemaregistry azure-core<2.0.0,>=1.20.0 opencensus>=0.6.0 opencensus-ext-threading opencensus-ext-azure>=0.3.1 @@ -190,27 +196,27 @@ opentelemetry-sdk<2.0.0,>=1.5.0,!=1.10a0 #override azure-servicebus azure-core<2.0.0,>=1.14.0 #override azure-servicefabric msrest>=0.6.21 #override azure-search-documents msrest>=0.6.21 -#override azure-synapse-accesscontrol azure-core>=1.6.0,<2.0.0 -#override azure-synapse-spark azure-core>=1.6.0,<2.0.0 -#override azure-synapse-artifacts azure-core>=1.6.0,<2.0.0 -#override azure-synapse-monitoring azure-core>=1.6.0,<2.0.0 -#override azure-synapse-managedprivateendpoints azure-core>=1.6.0,<2.0.0 +#override azure-synapse-accesscontrol azure-core>=1.20.0,<2.0.0 +#override azure-synapse-spark azure-core>=1.20.0,<2.0.0 +#override azure-synapse-artifacts azure-core>=1.20.0,<2.0.0 +#override azure-synapse-monitoring azure-core>=1.20.0,<2.0.0 +#override azure-synapse-managedprivateendpoints azure-core>=1.20.0,<2.0.0 #override azure-data-tables msrest>=0.6.10 #override azure-ai-anomalydetector azure-core>=1.6.0,<2.0.0 #override azure-eventgrid msrest>=0.6.21 #override azure-eventgrid azure-core<2.0.0,>=1.18.0 #override azure-monitor-query msrest>=0.6.19 #override azure-monitor-query azure-core<2.0.0,>=1.12.0 -#override azure-communication-callingserver azure-core<2.0.0,>=1.16.0 -#override azure-communication-callingserver msrest>=0.6.0 -#override azure-communication-chat msrest>=0.6.0 +#override azure-communication-chat msrest>=0.6.21 #override azure-communication-sms msrest>=0.6.0 #override azure-communication-phonenumbers msrest>=0.6.0 -#override azure-communication-chat azure-core<2.0.0,>=1.11.0 +#override azure-communication-chat azure-core<2.0.0,>=1.19.1 #override azure-communication-sms azure-core<2.0.0,>=1.11.0 #override azure-communication-phonenumbers azure-core<2.0.0,>=1.11.0 -#override azure-communication-identity azure-core<2.0.0,>=1.11.0 -#override azure-communication-networktraversal azure-core<2.0.0,>=1.16.0 +#override azure-communication-identity azure-core<2.0.0,>=1.19.1 +#override azure-communication-identity msrest>=0.6.21 +#override azure-communication-networktraversal azure-core<2.0.0,>=1.19.1 +#override azure-communication-networktraversal msrest>=0.6.21 #override azure-mgmt-communication azure-core<2.0.0,>=1.9.0 #override azure-ai-metricsadvisor azure-core<2.0.0,>=1.6.0 #override azure-ai-metricsadvisor msrest>=0.6.21 @@ -223,10 +229,11 @@ opentelemetry-sdk<2.0.0,>=1.5.0,!=1.10a0 #override azure-core-tracing-opentelemetry opentelemetry-api<2.0.0,>=1.0.0 #override azure-identity six>=1.12.0 #override azure-keyvault-keys six>=1.12.0 -#override azure-messaging-webpubsubservice azure-core<2.0.0,>=1.10.0 -#override azure-messaging-webpubsubservice msrest>=0.6.18 +#override azure-messaging-webpubsubservice azure-core<2.0.0,>=1.20.1 +#override azure-messaging-webpubsubservice msrest>=0.6.21 #override azure-messaging-webpubsubservice pyjwt>=1.7.1 #override azure-messaging-webpubsubservice six>=1.12.0 +#override azure-messaging-webpubsubservice cryptography>=2.8.0 #override azure-mixedreality-authentication azure-core<2.0.0,>=1.4.0 #override azure-iot-deviceupdate azure-core<2.0.0,>=1.6.0 #override azure-mgmt-changeanalysis msrest>=0.6.21 @@ -286,6 +293,8 @@ opentelemetry-sdk<2.0.0,>=1.5.0,!=1.10a0 #override azure-purview-scanning msrest>=0.6.21 #override azure-purview-account msrest>=0.6.21 #override azure-purview-account azure-core<2.0.0,>=1.16.0 +#override azure-purview-administration msrest>=0.6.21 +#override azure-purview-administration azure-core<2.0.0,>=1.18.0 #override azure-mgmt-rdbms msrest>=0.6.21 #override azure-mgmt-peering msrest>=0.6.21 #override azure-mgmt-elastic msrest>=0.6.21 @@ -342,6 +351,8 @@ opentelemetry-sdk<2.0.0,>=1.5.0,!=1.10a0 #override azure-mgmt-datafactory msrest>=0.6.21 #override azure-mgmt-containerinstance msrest>=0.6.21 #override azure-mgmt-recoveryservicessiterecovery msrest>=0.6.21 +#override azure-mixedreality-remoterendering azure-core<2.0.0,>=1.6.0 +#override azure-mixedreality-remoterendering azure-mixedreality-authentication>=1.0.0b1 #override azure-mgmt-batch msrest>=0.6.21 #override azure-batch msrest>=0.6.21 #override azure-mgmt-servicebus msrest>=0.6.21 @@ -353,5 +364,11 @@ opentelemetry-sdk<2.0.0,>=1.5.0,!=1.10a0 #override azure-mgmt-azurearcdata msrest>=0.6.21 #override azure-mgmt-servicelinker msrest>=0.6.21 #override azure-mgmt-fluidrelay msrest>=0.6.21 -#override azure-ai-language-conversations azure-core<2.0.0,>=1.19.0 +#override azure-ai-language-conversations azure-core<2.0.0,>=1.19.1 #override azure-ai-language-conversations msrest>=0.6.21 +#override azure-mgmt-deviceupdate msrest>=0.6.21 +#override azure-mgmt-dataprotection msrest>=0.6.21 +#override azure-mgmt-chaos msrest>=0.6.21 +#override azure-mgmt-resourceconnector msrest>=0.6.21 +#override azure-mgmt-desktopvirtualization msrest>=0.6.21 +#override azure-mgmt-monitor msrest>=0.6.21 diff --git a/tools/azure-devtools/src/azure_devtools/perfstress_tests/perf_stress_runner.py b/tools/azure-devtools/src/azure_devtools/perfstress_tests/perf_stress_runner.py index a48ded31e10c..3d6de2dc5e68 100644 --- a/tools/azure-devtools/src/azure_devtools/perfstress_tests/perf_stress_runner.py +++ b/tools/azure-devtools/src/azure_devtools/perfstress_tests/perf_stress_runner.py @@ -97,7 +97,8 @@ def _parse_args(self): "--profile", action="store_true", help="Run tests with profiler. Default is False.", default=False ) per_test_arg_parser.add_argument( - "-x", "--test-proxy", help="URI of TestProxy Server" + "-x", "--test-proxies", help="URIs of TestProxy Servers (separated by ';')", + type=lambda s: s.split(';') ) # Per-test args @@ -142,7 +143,7 @@ async def start(self): await asyncio.gather(*[test.setup() for test in tests]) self.logger.info("") - if self.per_test_args.test_proxy: + if self.per_test_args.test_proxies: self.logger.info("=== Record and Start Playback ===") await asyncio.gather(*[test.record_and_start_playback() for test in tests]) self.logger.info("") @@ -162,7 +163,7 @@ async def start(self): except Exception as e: print("Exception: " + str(e)) finally: - if self.per_test_args.test_proxy: + if self.per_test_args.test_proxies: self.logger.info("=== Stop Playback ===") await asyncio.gather(*[test.stop_playback() for test in tests]) self.logger.info("") diff --git a/tools/azure-devtools/src/azure_devtools/perfstress_tests/perf_stress_test.py b/tools/azure-devtools/src/azure_devtools/perfstress_tests/perf_stress_test.py index 582251125fdb..a31da53ffa11 100644 --- a/tools/azure-devtools/src/azure_devtools/perfstress_tests/perf_stress_test.py +++ b/tools/azure-devtools/src/azure_devtools/perfstress_tests/perf_stress_test.py @@ -4,6 +4,7 @@ # -------------------------------------------------------------------------------------------- import os +import threading import aiohttp from urllib.parse import urljoin @@ -21,15 +22,22 @@ class PerfStressTest: """ args = {} + _global_parallel_index_lock = threading.Lock() + _global_parallel_index = 0 def __init__(self, arguments): self.args = arguments self._session = None + self._test_proxy = None self._test_proxy_policy = None self._client_kwargs = {} self._recording_id = None - if self.args.test_proxy: + with PerfStressTest._global_parallel_index_lock: + self._parallel_index = PerfStressTest._global_parallel_index + PerfStressTest._global_parallel_index += 1 + + if self.args.test_proxies: self._session = aiohttp.ClientSession(connector=aiohttp.TCPConnector(verify_ssl=False)) # SSL will be disabled for the test proxy requests, so suppress warnings @@ -38,7 +46,8 @@ def __init__(self, arguments): warnings.simplefilter('ignore', InsecureRequestWarning) # Add policy to redirect requests to the test proxy - self._test_proxy_policy = PerfTestProxyPolicy(self.args.test_proxy) + self._test_proxy = self.args.test_proxies[self._parallel_index % len(self.args.test_proxies)] + self._test_proxy_policy = PerfTestProxyPolicy(self._test_proxy) self._client_kwargs['per_retry_policies'] = [self._test_proxy_policy] async def global_setup(self): @@ -74,7 +83,7 @@ async def stop_playback(self): "x-recording-id": self._recording_id, "x-purge-inmemory-recording": "true" } - url = urljoin(self.args.test_proxy, "/playback/stop") + url = urljoin(self._test_proxy, "/playback/stop") async with self._session.post(url, headers=headers) as resp: assert resp.status == 200 @@ -98,20 +107,20 @@ async def run_async(self): raise Exception("run_async must be implemented for {}".format(self.__class__.__name__)) async def _start_recording(self): - url = urljoin(self.args.test_proxy, "/record/start") + url = urljoin(self._test_proxy, "/record/start") async with self._session.post(url) as resp: assert resp.status == 200 self._recording_id = resp.headers["x-recording-id"] async def _stop_recording(self): headers = {"x-recording-id": self._recording_id} - url = urljoin(self.args.test_proxy, "/record/stop") + url = urljoin(self._test_proxy, "/record/stop") async with self._session.post(url, headers=headers) as resp: assert resp.status == 200 async def _start_playback(self): headers = {"x-recording-id": self._recording_id} - url = urljoin(self.args.test_proxy, "/playback/start") + url = urljoin(self._test_proxy, "/playback/start") async with self._session.post(url, headers=headers) as resp: assert resp.status == 200 self._recording_id = resp.headers["x-recording-id"] diff --git a/tools/azure-sdk-tools/devtools_testutils/__init__.py b/tools/azure-sdk-tools/devtools_testutils/__init__.py index b5303641ae36..ab9d70a3c2e1 100644 --- a/tools/azure-sdk-tools/devtools_testutils/__init__.py +++ b/tools/azure-sdk-tools/devtools_testutils/__init__.py @@ -15,7 +15,8 @@ ) from .keyvault_preparer import KeyVaultPreparer from .powershell_preparer import PowerShellPreparer -from .proxy_testcase import RecordedByProxy +from .proxy_docker_startup import start_test_proxy, stop_test_proxy, test_proxy +from .proxy_testcase import recorded_by_proxy from .sanitizers import ( add_body_key_sanitizer, add_body_regex_sanitizer, @@ -28,7 +29,7 @@ add_uri_regex_sanitizer, ) from .helpers import ResponseCallback, RetryCounter -from .fake_credential import FakeTokenCredential +from .fake_credential import FakeTokenCredential, ACCOUNT_FAKE_KEY __all__ = [ "add_body_key_sanitizer", @@ -56,8 +57,12 @@ "RandomNameResourceGroupPreparer", "CachedResourceGroupPreparer", "PowerShellPreparer", - "RecordedByProxy", + "recorded_by_proxy", + "test_proxy", + "start_test_proxy", + "stop_test_proxy", "ResponseCallback", "RetryCounter", "FakeTokenCredential", + "ACCOUNT_FAKE_KEY" ] diff --git a/tools/azure-sdk-tools/devtools_testutils/aio/__init__.py b/tools/azure-sdk-tools/devtools_testutils/aio/__init__.py index 5265d80fe58e..678c2dd89152 100644 --- a/tools/azure-sdk-tools/devtools_testutils/aio/__init__.py +++ b/tools/azure-sdk-tools/devtools_testutils/aio/__init__.py @@ -1,3 +1,3 @@ -from .proxy_testcase_async import RecordedByProxyAsync +from .proxy_testcase_async import recorded_by_proxy_async -__all__ = ["RecordedByProxyAsync"] +__all__ = ["recorded_by_proxy_async"] diff --git a/tools/azure-sdk-tools/devtools_testutils/aio/proxy_testcase_async.py b/tools/azure-sdk-tools/devtools_testutils/aio/proxy_testcase_async.py index 11c8f9e44395..60e94c2812e6 100644 --- a/tools/azure-sdk-tools/devtools_testutils/aio/proxy_testcase_async.py +++ b/tools/azure-sdk-tools/devtools_testutils/aio/proxy_testcase_async.py @@ -3,6 +3,8 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- +import logging + from azure.core.pipeline.transport import AioHttpTransport from azure_devtools.scenario_tests.utilities import trim_kwargs_from_test_function @@ -14,10 +16,16 @@ ) -def RecordedByProxyAsync(func): +def recorded_by_proxy_async(test_func): + """Decorator that redirects network requests to target the azure-sdk-tools test proxy. Use with recorded tests. + + For more details and usage examples, refer to + https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md + """ + async def record_wrap(*args, **kwargs): test_id = get_test_id() - recording_id = start_record_or_playback(test_id) + recording_id, variables = start_record_or_playback(test_id) def transform_args(*args, **kwargs): copied_positional_args = list(args) @@ -28,23 +36,32 @@ def transform_args(*args, **kwargs): return tuple(copied_positional_args), kwargs trimmed_kwargs = {k: v for k, v in kwargs.items()} - trim_kwargs_from_test_function(func, trimmed_kwargs) + trim_kwargs_from_test_function(test_func, trimmed_kwargs) - original_func = AioHttpTransport.send + original_transport_func = AioHttpTransport.send async def combined_call(*args, **kwargs): adjusted_args, adjusted_kwargs = transform_args(*args, **kwargs) - return await original_func(*adjusted_args, **adjusted_kwargs) + return await original_transport_func(*adjusted_args, **adjusted_kwargs) AioHttpTransport.send = combined_call - # call the modified function. + # call the modified function + # we define test_output before invoking the test so the variable is defined in case of an exception + test_output = None try: - value = await func(*args, **trimmed_kwargs) + test_output = await test_func(*args, variables=variables, **trimmed_kwargs) + except TypeError: + logger = logging.getLogger() + logger.info( + "This test can't accept variables as input. The test method should accept `**kwargs` and/or a " + "`variables` parameter to make use of recorded test variables." + ) + test_output = await test_func(*args, **trimmed_kwargs) finally: - AioHttpTransport.send = original_func - stop_record_or_playback(test_id, recording_id) + AioHttpTransport.send = original_transport_func + stop_record_or_playback(test_id, recording_id, test_output) - return value + return test_output return record_wrap diff --git a/tools/azure-sdk-tools/devtools_testutils/fake_credential.py b/tools/azure-sdk-tools/devtools_testutils/fake_credential.py index 67dca16a2435..226dd0e08301 100644 --- a/tools/azure-sdk-tools/devtools_testutils/fake_credential.py +++ b/tools/azure-sdk-tools/devtools_testutils/fake_credential.py @@ -1,5 +1,7 @@ from azure.core.credentials import AccessToken +ACCOUNT_FAKE_KEY = "NzhL3hKZbJBuJ2484dPTR+xF30kYaWSSCbs2BzLgVVI1woqeST/1IgqaLm6QAOTxtGvxctSNbIR/1hW8yH+bJg==" + class FakeTokenCredential(object): """Protocol for classes able to provide OAuth tokens. diff --git a/tools/azure-sdk-tools/devtools_testutils/proxy_docker_startup.py b/tools/azure-sdk-tools/devtools_testutils/proxy_docker_startup.py new file mode 100644 index 000000000000..618727596fe8 --- /dev/null +++ b/tools/azure-sdk-tools/devtools_testutils/proxy_docker_startup.py @@ -0,0 +1,160 @@ +# ------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# -------------------------------------------------------------------------- +import json +import os +import logging +import requests +import shlex +import sys +import time +from typing import TYPE_CHECKING + +import pytest +import subprocess + +from .config import PROXY_URL + +if TYPE_CHECKING: + from typing import Optional + + +_LOGGER = logging.getLogger() + +CONTAINER_NAME = "ambitious_azsdk_test_proxy" +LINUX_IMAGE_SOURCE_PREFIX = "azsdkengsys.azurecr.io/engsys/testproxy-lin" +WINDOWS_IMAGE_SOURCE_PREFIX = "azsdkengsys.azurecr.io/engsys/testproxy-win" +CONTAINER_STARTUP_TIMEOUT = 6000 +PROXY_MANUALLY_STARTED = os.getenv('PROXY_MANUAL_START', False) + +REPO_ROOT = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..", "..")) + + +def get_image_tag(): + # type: () -> str + """Gets the test proxy Docker image tag from the docker-start-proxy.ps1 script in /eng/common""" + pwsh_script_location = os.path.abspath( + os.path.join(REPO_ROOT, os.path.relpath("eng/common/testproxy/docker-start-proxy.ps1")) + ) + + image_tag = None + with open(pwsh_script_location, "r") as f: + for line in f: + if line.startswith("$SELECTED_IMAGE_TAG"): + image_tag_with_quotes = line.split()[-1] + image_tag = image_tag_with_quotes.strip('"') + + return image_tag + + +def get_container_info(): + # type: () -> Optional[dict] + """Returns a dictionary containing the test proxy container's information, or None if the container isn't present""" + proc = subprocess.Popen( + shlex.split("docker container ls -a --format '{{json .}}' --filter name=" + CONTAINER_NAME), + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + ) + + output, stderr = proc.communicate() + try: + # This will succeed if we found a container with CONTAINER_NAME + return json.loads(output) + # We'll get a JSONDecodeError on Py3 (ValueError on Py2) if output is empty (i.e. there's no proxy container) + except ValueError: + # Didn't find a container with CONTAINER_NAME + return None + + +def create_container(): + # type: () -> None + """Creates the test proxy Docker container""" + # Most of the time, running this script on a Windows machine will work just fine, as Docker defaults to Linux + # containers. However, in CI, Windows images default to _Windows_ containers. We cannot swap them. We can tell + # if we're in a CI build by checking for the environment variable TF_BUILD. + if sys.platform.startswith("win") and os.environ.get("TF_BUILD"): + image_prefix = WINDOWS_IMAGE_SOURCE_PREFIX + path_prefix = "C:" + linux_container_args = "" + else: + image_prefix = LINUX_IMAGE_SOURCE_PREFIX + path_prefix = "" + linux_container_args = "--add-host=host.docker.internal:host-gateway" + + image_tag = get_image_tag() + proc = subprocess.Popen( + shlex.split( + "docker container create -v '{}:{}/etc/testproxy' {} -p 5001:5001 -p 5000:5000 --name {} {}:{}".format( + REPO_ROOT, path_prefix, linux_container_args, CONTAINER_NAME, image_prefix, image_tag + ) + ) + ) + proc.communicate() + + +def start_test_proxy(): + # type: () -> None + """Starts the test proxy and returns when the proxy server is ready to receive requests""" + + if not PROXY_MANUALLY_STARTED: + _LOGGER.info("Starting the test proxy container...") + + container_info = get_container_info() + if container_info: + _LOGGER.debug("Found an existing instance of the test proxy container.") + + if container_info["State"] == "running": + _LOGGER.debug("Proxy container is already running. Exiting...") + return + + else: + _LOGGER.debug("No instance of the test proxy container found. Attempting creation...") + create_container() + + _LOGGER.debug("Attempting to start the test proxy container...") + + proc = subprocess.Popen(shlex.split("docker container start " + CONTAINER_NAME)) + proc.communicate() + + # Wait for the proxy server to become available + start = time.time() + now = time.time() + status_code = 0 + while now - start < CONTAINER_STARTUP_TIMEOUT and status_code != 200: + try: + response = requests.get(PROXY_URL.rstrip("/") + "/Info/Available", timeout=60) + status_code = response.status_code + # We get an SSLError if the container is started but the endpoint isn't available yet + except requests.exceptions.SSLError: + pass + now = time.time() + + +def stop_test_proxy(): + # type: () -> None + """Stops any running instance of the test proxy""" + + if not PROXY_MANUALLY_STARTED: + _LOGGER.info("Stopping the test proxy container...") + + container_info = get_container_info() + if container_info: + if container_info["State"] == "running": + _LOGGER.debug("Found a running instance of the test proxy container; shutting it down...") + + proc = subprocess.Popen(shlex.split("docker container stop " + CONTAINER_NAME)) + proc.communicate() + else: + _LOGGER.debug("No running instance of the test proxy container found. Exiting...") + + +@pytest.fixture(scope="session") +def test_proxy(): + """Pytest fixture to be used before running any tests that are recorded with the test proxy""" + start_test_proxy() + # Everything before this yield will be run before fixtures that invoke this one are run + # Everything after it will be run after invoking fixtures are done executing + yield + stop_test_proxy() diff --git a/tools/azure-sdk-tools/devtools_testutils/proxy_testcase.py b/tools/azure-sdk-tools/devtools_testutils/proxy_testcase.py index 78918ab0063b..a189658aaea8 100644 --- a/tools/azure-sdk-tools/devtools_testutils/proxy_testcase.py +++ b/tools/azure-sdk-tools/devtools_testutils/proxy_testcase.py @@ -4,7 +4,10 @@ # license information. # -------------------------------------------------------------------------- import os +import logging import requests +import six +from typing import TYPE_CHECKING try: # py3 @@ -23,6 +26,9 @@ from .azure_recorded_testcase import is_live from .config import PROXY_URL +if TYPE_CHECKING: + from typing import Tuple + # To learn about how to migrate SDK tests to the test proxy, please refer to the migration guide at # https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md @@ -40,6 +46,7 @@ def get_test_id(): + # type: () -> str # pytest sets the current running test in an environment variable setting_value = os.getenv("PYTEST_CURRENT_TEST") @@ -55,8 +62,15 @@ def get_test_id(): def start_record_or_playback(test_id): - result = subprocess.check_output(["git", "rev-parse", "HEAD"]) - current_sha = result.decode("utf-8").strip() + # type: (str) -> Tuple(str, dict) + """Sends a request to begin recording or playing back the provided test. + + This returns a tuple, (a, b), where a is the recording ID of the test and b is the `variables` dictionary that maps + test variables to values. If no variable dictionary was stored when the test was recorded, b is an empty dictionary. + """ + head_commit = subprocess.check_output(["git", "rev-parse", "HEAD"]) + current_sha = head_commit.decode("utf-8").strip() + variables = {} # this stores a dictionary of test variable values that could have been stored with a recording if is_live(): result = requests.post( @@ -70,14 +84,28 @@ def start_record_or_playback(test_id): headers={"x-recording-file": test_id, "x-recording-sha": current_sha}, ) recording_id = result.headers["x-recording-id"] - return recording_id + try: + variables = result.json() + except ValueError as ex: # would be a JSONDecodeError on Python 3, which subclasses ValueError + six.raise_from( + ValueError("The response body returned from starting playback did not contain valid JSON"), ex + ) + + return (recording_id, variables) -def stop_record_or_playback(test_id, recording_id): +def stop_record_or_playback(test_id, recording_id, test_output): + # type: (str, str, dict) -> None if is_live(): requests.post( RECORDING_STOP_URL, - headers={"x-recording-file": test_id, "x-recording-id": recording_id, "x-recording-save": "true"}, + headers={ + "x-recording-file": test_id, + "x-recording-id": recording_id, + "x-recording-save": "true", + "Content-Type": "application/json" + }, + json=test_output ) else: requests.post( @@ -104,10 +132,16 @@ def transform_request(request, recording_id): request.url = updated_target -def RecordedByProxy(func): +def recorded_by_proxy(test_func): + """Decorator that redirects network requests to target the azure-sdk-tools test proxy. Use with recorded tests. + + For more details and usage examples, refer to + https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/test_proxy_migration_guide.md + """ + def record_wrap(*args, **kwargs): test_id = get_test_id() - recording_id = start_record_or_playback(test_id) + recording_id, variables = start_record_or_playback(test_id) def transform_args(*args, **kwargs): copied_positional_args = list(args) @@ -118,7 +152,7 @@ def transform_args(*args, **kwargs): return tuple(copied_positional_args), kwargs trimmed_kwargs = {k: v for k, v in kwargs.items()} - trim_kwargs_from_test_function(func, trimmed_kwargs) + trim_kwargs_from_test_function(test_func, trimmed_kwargs) original_transport_func = RequestsTransport.send @@ -128,13 +162,22 @@ def combined_call(*args, **kwargs): RequestsTransport.send = combined_call - # call the modified function. + # call the modified function + # we define test_output before invoking the test so the variable is defined in case of an exception + test_output = None try: - value = func(*args, **trimmed_kwargs) + test_output = test_func(*args, variables=variables, **trimmed_kwargs) + except TypeError: + logger = logging.getLogger() + logger.info( + "This test can't accept variables as input. The test method should accept `**kwargs` and/or a " + "`variables` parameter to make use of recorded test variables." + ) + test_output = test_func(*args, **trimmed_kwargs) finally: RequestsTransport.send = original_transport_func - stop_record_or_playback(test_id, recording_id) + stop_record_or_playback(test_id, recording_id, test_output) - return value + return test_output return record_wrap diff --git a/tools/azure-sdk-tools/devtools_testutils/storage/__init__.py b/tools/azure-sdk-tools/devtools_testutils/storage/__init__.py index d5de005a22db..05543cff09c2 100644 --- a/tools/azure-sdk-tools/devtools_testutils/storage/__init__.py +++ b/tools/azure-sdk-tools/devtools_testutils/storage/__init__.py @@ -1,5 +1,6 @@ from .api_version_policy import ApiVersionAssertPolicy from .service_versions import service_version_map, ServiceVersion, is_version_before -from .testcase import StorageTestCase +from .testcase import StorageTestCase, LogCaptured -__all__ = ["ApiVersionAssertPolicy", "service_version_map", "StorageTestCase", "ServiceVersion", "is_version_before"] +__all__ = ["ApiVersionAssertPolicy", "service_version_map", "StorageTestCase", "ServiceVersion", "is_version_before", + "LogCaptured"] diff --git a/tools/azure-sdk-tools/devtools_testutils/storage/testcase.py b/tools/azure-sdk-tools/devtools_testutils/storage/testcase.py index 93e7a77ddc95..69d2b503ef43 100644 --- a/tools/azure-sdk-tools/devtools_testutils/storage/testcase.py +++ b/tools/azure-sdk-tools/devtools_testutils/storage/testcase.py @@ -15,28 +15,41 @@ import time import zlib +from devtools_testutils import AzureTestCase + from .processors import XMSRequestIDBody from . import ApiVersionAssertPolicy, service_version_map -from .. import AzureMgmtTestCase, FakeTokenCredential +from .. import FakeTokenCredential + +try: + from cStringIO import StringIO # Python 2 +except ImportError: + from io import StringIO -from azure.storage.blob import generate_account_sas, AccountSasPermissions, ResourceTypes +try: + from azure.storage.blob import generate_account_sas, AccountSasPermissions, ResourceTypes +except: + try: + from azure.storage.queue import generate_account_sas, AccountSasPermissions, ResourceTypes + except: + from azure.storage.fileshare import generate_account_sas, AccountSasPermissions, ResourceTypes LOGGING_FORMAT = "%(asctime)s %(name)-20s %(levelname)-5s %(message)s" ENABLE_LOGGING = True -class StorageTestCase(AzureMgmtTestCase): +class StorageTestCase(AzureTestCase): def __init__(self, *args, **kwargs): super(StorageTestCase, self).__init__(*args, **kwargs) self.replay_processors.append(XMSRequestIDBody()) self.logger = logging.getLogger("azure.storage") self.configure_logging() - def connection_string(self, account, key): + def connection_string(self, account_name, key): return ( "DefaultEndpointsProtocol=https;AcCounTName=" - + account.name + + account_name + ";AccOuntKey=" + str(key) + ";EndpoIntSuffix=core.windows.net" @@ -48,17 +61,8 @@ def account_url(self, storage_account, storage_type): :param str storage_account: Storage account name :param str storage_type: The Storage type part of the URL. Should be "blob", or "queue", etc. """ - try: - if storage_type == "blob": - return storage_account.primary_endpoints.blob.rstrip("/") - if storage_type == "queue": - return storage_account.primary_endpoints.queue.rstrip("/") - if storage_type == "file": - return storage_account.primary_endpoints.file.rstrip("/") - else: - raise ValueError("Unknown storage type {}".format(storage_type)) - except AttributeError: # Didn't find "primary_endpoints" - return "https://{}.{}.core.windows.net".format(storage_account, storage_type) + return "{}://{}.{}.{}".format(os.environ.get("PROTOCOL", "https"), storage_account, storage_type, + os.environ.get("ACCOUNT_URL_SUFFIX", "core.windows.net")) def configure_logging(self): enable_logging = ENABLE_LOGGING @@ -203,3 +207,37 @@ def create_storage_client_from_conn_str(self, client, *args, **kwargs): kwargs["api_version"] = self._get_service_version(**kwargs) kwargs["_additional_pipeline_policies"] = [ApiVersionAssertPolicy(kwargs["api_version"])] return client.from_connection_string(*args, **kwargs) + + +class LogCaptured(object): + def __init__(self, test_case=None): + # accept the test case so that we may reset logging after capturing logs + self.test_case = test_case + + def __enter__(self): + # enable logging + # it is possible that the global logging flag is turned off + self.test_case.enable_logging() + + # create a string stream to send the logs to + self.log_stream = StringIO() + + # the handler needs to be stored so that we can remove it later + self.handler = logging.StreamHandler(self.log_stream) + self.handler.setFormatter(logging.Formatter(LOGGING_FORMAT)) + + # get and enable the logger to send the outputs to the string stream + self.logger = logging.getLogger('azure.storage') + self.logger.level = logging.DEBUG + self.logger.addHandler(self.handler) + + # the stream is returned to the user so that the capture logs can be retrieved + return self.log_stream + + def __exit__(self, exc_type, exc_val, exc_tb): + # stop the handler, and close the stream to exit + self.logger.removeHandler(self.handler) + self.log_stream.close() + + # reset logging since we messed with the setting + self.test_case.configure_logging() diff --git a/tools/azure-sdk-tools/packaging_tools/swaggertosdk/SwaggerToSdkCore.py b/tools/azure-sdk-tools/packaging_tools/swaggertosdk/SwaggerToSdkCore.py index fca72f913ad1..802d10013b2d 100644 --- a/tools/azure-sdk-tools/packaging_tools/swaggertosdk/SwaggerToSdkCore.py +++ b/tools/azure-sdk-tools/packaging_tools/swaggertosdk/SwaggerToSdkCore.py @@ -170,7 +170,7 @@ def read_config(sdk_git_folder, config_file): return json.loads(config_fd.read()) -def read_config_from_github(sdk_id, branch="master", gh_token=None): +def read_config_from_github(sdk_id, branch="main", gh_token=None): raw_link = str(get_configuration_github_path(sdk_id, branch)) _LOGGER.debug("Will try to download: %s", raw_link) _LOGGER.debug("Token is defined: %s", gh_token is not None) diff --git a/tools/azure-sdk-tools/packaging_tools/swaggertosdk/SwaggerToSdkNewCLI.py b/tools/azure-sdk-tools/packaging_tools/swaggertosdk/SwaggerToSdkNewCLI.py index e48f603604b0..26db8fbf1d55 100644 --- a/tools/azure-sdk-tools/packaging_tools/swaggertosdk/SwaggerToSdkNewCLI.py +++ b/tools/azure-sdk-tools/packaging_tools/swaggertosdk/SwaggerToSdkNewCLI.py @@ -202,7 +202,7 @@ def generate_sdk_from_git_object( sdk_git_id, base_branch_names, *, - fallback_base_branch_name="master", + fallback_base_branch_name="main", sdk_tag=None, ): """Generate SDK from a commit or a PR object. diff --git a/tools/azure-sdk-tools/packaging_tools/templates/LICENSE.txt b/tools/azure-sdk-tools/packaging_tools/templates/LICENSE.txt new file mode 100644 index 000000000000..2d3163745319 --- /dev/null +++ b/tools/azure-sdk-tools/packaging_tools/templates/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/tools/azure-sdk-tools/packaging_tools/templates/MANIFEST.in b/tools/azure-sdk-tools/packaging_tools/templates/MANIFEST.in index 986ca26c2f51..b67a47a42802 100644 --- a/tools/azure-sdk-tools/packaging_tools/templates/MANIFEST.in +++ b/tools/azure-sdk-tools/packaging_tools/templates/MANIFEST.in @@ -3,4 +3,4 @@ include *.md {%- for init_name in init_names %} include {{ init_name }} {%- endfor %} - +include LICENSE.txt